commit f98ff9d6d6182360def2e39e6d7f10a4b005a478 Author: Andrea Date: Sat Oct 10 14:36:42 2020 +0200 First commit diff --git a/vcpkg/.gitattributes b/vcpkg/.gitattributes new file mode 100644 index 0000000..d0c3b3e --- /dev/null +++ b/vcpkg/.gitattributes @@ -0,0 +1,5 @@ +* -text +ports/** -linguist-detectable + +# Declare files that will always have LF line endings on checkout. +scripts/ci.baseline.txt text eol=lf \ No newline at end of file diff --git a/vcpkg/.gitignore b/vcpkg/.gitignore new file mode 100644 index 0000000..a3d42ed --- /dev/null +++ b/vcpkg/.gitignore @@ -0,0 +1,322 @@ +############################################################ +# Visual Studio - Start +############################################################ + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +toolsrc/out* +toolsrc/CMakeSettings.json +# fuzzing +sync_dir* + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +# VS Code build +toolsrc/build +# Ignore the executable +/vcpkg +/vcpkg.exe + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +project.fragment.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +############################################################ +# Visual Studio - End +############################################################ + + +############################################################ +# vcpkg - Start +############################################################ + +.vscode/ +*.code-workspace +/buildtrees/ +/build*/ +/downloads/ +/installed*/ +/packages/ +/scripts/buildsystems/tmp/ +/toolsrc/build.rel/ +/toolsrc/windows-bootstrap/msbuild.x86.debug/ +/toolsrc/windows-bootstrap/msbuild.x86.release/ +/toolsrc/windows-bootstrap/msbuild.x64.debug/ +/toolsrc/windows-bootstrap/msbuild.x64.release/ +#ignore custom triplets +/triplets/* +#add vcpkg-designed triplets back in +!/triplets/arm-uwp.cmake +!/triplets/arm64-windows.cmake +!/triplets/x64-linux.cmake +!/triplets/x64-osx.cmake +!/triplets/x64-uwp.cmake +!/triplets/x64-windows-static.cmake +!/triplets/x64-windows.cmake +!/triplets/x86-windows.cmake + +!/triplets/community +!/triplets/community/** + +*.exe +*.zip + +############################################################ +# vcpkg - End +############################################################ +archives +.DS_Store +prefab/ +*.swp diff --git a/vcpkg/.vcpkg-root b/vcpkg/.vcpkg-root new file mode 100644 index 0000000..e69de29 diff --git a/vcpkg/CHANGELOG.md b/vcpkg/CHANGELOG.md new file mode 100644 index 0000000..dea1e5a --- /dev/null +++ b/vcpkg/CHANGELOG.md @@ -0,0 +1,12145 @@ +vcpkg (2020.06.16 - 2020.7.31) +--- +#### Total port count: 1429 +#### Total port count per triplet (tested): +|triplet|ports available| +|---|---| +|**x64-windows**|1304| +|x86-windows|1284| +|x64-windows-static|1213| +|**x64-osx**|1139| +|**x64-linux**|1210| +|arm64-windows|928| +|x64-uwp|700| +|arm-uwp|669| + +#### The following commands and options have been updated: +- `x-package-info` ***[NEW COMMAND]***: Allows viewing of port information in a requested format (currently json) + - [(#12845)](https://github.com/microsoft/vcpkg/pull/12845) [vcpkg] Lift `--x-json` to a global option, implement experimental `x-package-info` command (by @ras0219) +- `--editable` ***[NEW OPTION]***: Suppress binary caching and source re-extraction for packages listed on the command line + - [(#12200)](https://github.com/microsoft/vcpkg/pull/12200) [vcpkg] Implement --editable (by @ras0219) + - [(#12366)](https://github.com/microsoft/vcpkg/pull/12366) [vcpkg] Improve informational message for `--editable` while cleaning sources (by @ras0219) +- `--x-binarysource=` ***[NEW OPTION]***: Experimental: Support NuGet servers for retrieving and uploading of binary packages during builds + - [(#12058)](https://github.com/microsoft/vcpkg/pull/12058) [vcpkg] Implementation of --x-binarysource=nuget (and friends) (by @ras0219) +- `install` + - `--x-write-nuget-packages-config` ***[NEW OPTION]***: Experimental: Write out a NuGet packages config-formatted file for use with external binary caching + - [(#12138)](https://github.com/microsoft/vcpkg/pull/12138) [vcpkg] Implement --x-write-nuget-packages-config= setting for `install` and `x-set-installed` (by @ras0219) +- `x-set-installed` + - `--dry-run` ***[NEW OPTION]***: Perform a dry run by not actually building or installing + - [(#12132)](https://github.com/microsoft/vcpkg/pull/12132) [vcpkg-x-set-installed] Implement --dry-run (by @ras0219) +- `--x-json`: Lift this option to the global scope to request json output from compatible commands (see `x-package-info`) + - [(#12845)](https://github.com/microsoft/vcpkg/pull/12845) [vcpkg] Lift `--x-json` to a global option, implement experimental `x-package-info` command (by @ras0219) + +#### The following documentation has been updated: +- [vcpkg_from_sourceforge](docs/maintainers/vcpkg_from_sourceforge.md) ***[NEW]*** + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) (by @JackBoosY) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) (by @JackBoosY) + - [(#12254)](https://github.com/microsoft/vcpkg/pull/12254) [vcpkg] Track hashes of cmake script helpers in consuming portfiles (by @ras0219) +- [vcpkg_fixup_pkgconfig](docs/maintainers/vcpkg_fixup_pkgconfig.md) ***[NEW]*** + - [(#12254)](https://github.com/microsoft/vcpkg/pull/12254) [vcpkg] Track hashes of cmake script helpers in consuming portfiles (by @ras0219) +- [Binary Caching Specification](docs/specifications/binarycaching.md) ***[NEW]*** + - [(#11204)](https://github.com/microsoft/vcpkg/pull/11204) [vcpkg] RFC: Binarycaching (by @ras0219-msft) +- [README](README.md) + - [(#12093)](https://github.com/microsoft/vcpkg/pull/12093) [vcpkg docs] new README/Quick Start guide (by @strega-nil) +- [Patching Example](docs/examples/patching.md) + - [(#11952)](https://github.com/microsoft/vcpkg/pull/11952) [Document]Mention --ignore-space-at-eol in patching.md (by @Pospelove) + - [(#12200)](https://github.com/microsoft/vcpkg/pull/12200) [vcpkg] Implement --editable (by @ras0219) +- [vcpkg_fixup_cmake_targets](docs/maintainers/vcpkg_fixup_cmake_targets.md) + - [(#11275)](https://github.com/microsoft/vcpkg/pull/11275) [ignition-plugin1] Add new port 🤖 (by @traversaro) +- [Privacy](docs/about/privacy.md) + - [(#11757)](https://github.com/microsoft/vcpkg/pull/11757) [vcpkg manifest] Manifest Implementation (by @strega-nil) +- [Manifests](docs/specifications/manifests.md) + - [(#11757)](https://github.com/microsoft/vcpkg/pull/11757) [vcpkg manifest] Manifest Implementation (by @strega-nil) +- [Environment and Configuration](docs/users/config-environment.md) + - [(#11757)](https://github.com/microsoft/vcpkg/pull/11757) [vcpkg manifest] Manifest Implementation (by @strega-nil) + - [(#12640)](https://github.com/microsoft/vcpkg/pull/12640) [vcpkg] add environment variable VCPKG_OVERLAY_PORTS (by @Neumann-A) +- [Buildsystem Integration](docs/users/integration.md) + - [(#12145)](https://github.com/microsoft/vcpkg/pull/12145) [vcpkg] Update message in bootstrap.ps1 (by @PhoebeHui) + - [(#12873)](https://github.com/microsoft/vcpkg/pull/12873) [vcpkg] Fix bullet lists for integration.md on readthedocs.io (by @ftheile) +- [Installing and Using Packages](docs/examples/installing-and-using-packages.md) + - [(#12200)](https://github.com/microsoft/vcpkg/pull/12200) [vcpkg] Implement --editable (by @ras0219) + - [(#12516)](https://github.com/microsoft/vcpkg/pull/12516) [sqlite3] Namespaced targets with unofficial:: (by @PhoebeHui) +- [Packaging Zipfiles](docs/examples/packaging-zipfiles.md) + - [(#12200)](https://github.com/microsoft/vcpkg/pull/12200) [vcpkg] Implement --editable (by @ras0219) +- [CONTROL Files](docs/maintainers/control-files.md) + - [(#12227)](https://github.com/microsoft/vcpkg/pull/12227) [vcpkg manifests] fix some issues (by @strega-nil) +- [Portfile Functions](docs/maintainers/portfile-functions.md) + - [(#12254)](https://github.com/microsoft/vcpkg/pull/12254) [vcpkg] Track hashes of cmake script helpers in consuming portfiles (by @ras0219) +- [vcpkg_build_make](docs/maintainers/vcpkg_build_make.md) + - [(#12254)](https://github.com/microsoft/vcpkg/pull/12254) [vcpkg] Track hashes of cmake script helpers in consuming portfiles (by @ras0219) +- [vcpkg_common_definitions](docs/maintainers/vcpkg_common_definitions.md) + - [(#12254)](https://github.com/microsoft/vcpkg/pull/12254) [vcpkg] Track hashes of cmake script helpers in consuming portfiles (by @ras0219) +- [vcpkg_configure_make](docs/maintainers/vcpkg_configure_make.md) + - [(#12254)](https://github.com/microsoft/vcpkg/pull/12254) [vcpkg] Track hashes of cmake script helpers in consuming portfiles (by @ras0219) +- [vcpkg_find_acquire_program](docs/maintainers/vcpkg_find_acquire_program.md) + - [(#12254)](https://github.com/microsoft/vcpkg/pull/12254) [vcpkg] Track hashes of cmake script helpers in consuming portfiles (by @ras0219) +- [Triplets](docs/users/triplets.md) + - [(#12211)](https://github.com/microsoft/vcpkg/pull/12211) [corrade,magnum,*-plugins,*-extras,*-integration] Update to v2020.06 (by @Squareys) +- [Maintainer Guidelines and Policies](docs/maintainers/maintainer-guide.md) + - [(#12460)](https://github.com/microsoft/vcpkg/pull/12460) [vcpkg] Improve format check failure message (by @JackBoosY) +- [vcpkg_check_linkage.md](docs/maintainers/vcpkg_check_linkage.md) + - [(#12624)](https://github.com/microsoft/vcpkg/pull/12624) Fix .gitignore excluding triplets/community, sort, and driveby vcpkg_check_linkage.md doc bug. (by @BillyONeal) +- [Overlay Triplets Example: Dynamic Linux Library](docs/examples/overlay-triplets-linux-dynamic.md) + - [(#12516)](https://github.com/microsoft/vcpkg/pull/12516) [sqlite3] Namespaced targets with unofficial:: (by @PhoebeHui) + +#### The following *remarkable* changes have been made to vcpkg's infrastructure: +- Port Manifest: New feature to allow projects to state their dependencies in a declarative format + - [(#11757)](https://github.com/microsoft/vcpkg/pull/11757) [vcpkg manifest] Manifest Implementation (by @strega-nil) + - [(#12227)](https://github.com/microsoft/vcpkg/pull/12227) [vcpkg manifests] fix some issues (by @strega-nil) + - [(#12549)](https://github.com/microsoft/vcpkg/pull/12549) [vcpkg manifest] add feature support (by @strega-nil) +- `vcpkg_from_sourceforge`: New maintainer helper function to retrieve sources from SourceForge + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) (by @JackBoosY) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) (by @JackBoosY) +- `VCPKG_OVERLAY_PORTS`: New environment variable to allow users to override ports with alternate versions + - [(#12640)](https://github.com/microsoft/vcpkg/pull/12640) [vcpkg] add environment variable VCPKG_OVERLAY_PORTS (by @Neumann-A) + +#### The following *additional* changes have been made to vcpkg's infrastructure: +- [(#12174)](https://github.com/microsoft/vcpkg/pull/12174) [vcpkg] Fix `vcpkg export --nuget` regressions (by @ras0219) +- [(#11842)](https://github.com/microsoft/vcpkg/pull/11842) [vcpkg] Extract common paths settings to make_cmake_cmd... (by @BillyONeal) +- [(#11977)](https://github.com/microsoft/vcpkg/pull/11977) [CHANGELOG] Update to 2020.06.15 (by @vicroms) +- [(#11978)](https://github.com/microsoft/vcpkg/pull/11978) Attempt to mitigate Windows Defender detections by making provision-image.ps1 not a powershell script (by @BillyONeal) +- [(#11015)](https://github.com/microsoft/vcpkg/pull/11015) [vcpkg] Fix issue #9781 by exporting from the installed directory (by @ras0219) +- [(#11984)](https://github.com/microsoft/vcpkg/pull/11984) [breakpad] Fix build failure on OSX (by @JackBoosY) +- [(#11981)](https://github.com/microsoft/vcpkg/pull/11981) [thrift] Update to 0.13.0 and fix OSX build (by @JackBoosY) +- [(#11963)](https://github.com/microsoft/vcpkg/pull/11963) [libvpx] Support arm64-windows (by @JackBoosY) +- [(#12000)](https://github.com/microsoft/vcpkg/pull/12000) [vcpkg] Clean tombstones in every build except PR validations (by @BillyONeal) +- [(#11965)](https://github.com/microsoft/vcpkg/pull/11965) [vcpkg baseline] Retrigger failed ports in baseline (by @PhoebeHui) +- [(#11938)](https://github.com/microsoft/vcpkg/pull/11938) [vcpkg] Add mirror to download Strawberry Perl (by @AenBleidd) +- [(#11931)](https://github.com/microsoft/vcpkg/pull/11931) [vcpkg] Put user-defined configuration triplets path on top of the search queue (by @AenBleidd) +- [(#11999)](https://github.com/microsoft/vcpkg/pull/11999) [vcpkg] Use SSH keys instead of password authentication when minting Linux scale sets (by @BillyONeal) +- [(#12049)](https://github.com/microsoft/vcpkg/pull/12049) [vcpkg] Delete unused --purge-tombstones and introduce BufferedPrint class (by @BillyONeal) +- [(#11654)](https://github.com/microsoft/vcpkg/pull/11654) [vcpkg] Track compiler information in ABI (by @ras0219) +- [(#11983)](https://github.com/microsoft/vcpkg/pull/11983) [libmicrohttpd] Support build on UNIX and use msbuild on Windows (by @JackBoosY) +- [(#12080)](https://github.com/microsoft/vcpkg/pull/12080) Fix bootstrapping MSYS2 pacman (#11499) (by @endrift) +- [(#12074)](https://github.com/microsoft/vcpkg/pull/12074) [vcpkg] Do not fail just because cleaning tombstones failed in CI. (by @BillyONeal) +- [(#11275)](https://github.com/microsoft/vcpkg/pull/11275) [ignition-plugin1] Add new port 🤖 (by @traversaro) +- [(#12067)](https://github.com/microsoft/vcpkg/pull/12067) [vcpkg baseline] Fix baseline errors (by @JackBoosY) +- [(#12082)](https://github.com/microsoft/vcpkg/pull/12082) [vcpkg] Commonize pipelines build powershell and don't use binary caching in CI (rather than PR) builds (by @BillyONeal) +- [(#12113)](https://github.com/microsoft/vcpkg/pull/12113) [vcpkg] Add disk space report to Windows PR/CI (by @BillyONeal) +- [(#12072)](https://github.com/microsoft/vcpkg/pull/12072) [vcpkg build] fix build command (by @strega-nil) +- [(#12120)](https://github.com/microsoft/vcpkg/pull/12120) [vcpkg] Delete unnecessary tombstone deletion step now that CI rebuilds everything (by @BillyONeal) +- [(#12091)](https://github.com/microsoft/vcpkg/pull/12091) [vcpkg] Use XDG/LOCALAPPDATA for default binary caching path (by @ras0219) +- [(#12128)](https://github.com/microsoft/vcpkg/pull/12128) [vcpkg] Fix "[commands-build] build smoke test" (by @ras0219) +- [(#12130)](https://github.com/microsoft/vcpkg/pull/12130) [vcpkg] Add write-only binary caching for CI. (by @BillyONeal) +- [(#12101)](https://github.com/microsoft/vcpkg/pull/12101) [vcpkg] Add mingw dynamic libs triplet (by @longnguyen2004) +- [(#12069)](https://github.com/microsoft/vcpkg/pull/12069) Fix typo in comment (by @freddy77) +- [(#12144)](https://github.com/microsoft/vcpkg/pull/12144) [vcpkg baseline][paraview] Fix linux build (by @JackBoosY) +- [(#12172)](https://github.com/microsoft/vcpkg/pull/12172) [vcpkg ci] add macos scripts to vcpkg repo (by @strega-nil) +- [(#12176)](https://github.com/microsoft/vcpkg/pull/12176) [vcpkg] VM Update (by @BillyONeal) +- [(#12192)](https://github.com/microsoft/vcpkg/pull/12192) Fix sourceparagraph:BooleanField (by @strega-nil) +- [(#12191)](https://github.com/microsoft/vcpkg/pull/12191) Don't change manifest root when manifest isn't enabled. (by @dada2048) +- [(#12170)](https://github.com/microsoft/vcpkg/pull/12170) [vcpkg] Enable NuGet-based binary caching via mono (by @ras0219) +- [(#12145)](https://github.com/microsoft/vcpkg/pull/12145) [vcpkg] Update message in bootstrap.ps1 (by @PhoebeHui) +- [(#12201)](https://github.com/microsoft/vcpkg/pull/12201) [vcpkg] Remove all uses of Foo::Foo() noexcept = default; to fix #9955 (by @ras0219) +- [(#12203)](https://github.com/microsoft/vcpkg/pull/12203) [vcpkg] Improve performance of compiler tracking (by @ras0219) +- [(#12212)](https://github.com/microsoft/vcpkg/pull/12212) [msbuild] Revert the importance to Normal (by @PhoebeHui) +- [(#12197)](https://github.com/microsoft/vcpkg/pull/12197) [vcpkg] Remove the tombstones and 'ignore' baseline concepts. (by @BillyONeal) +- [(#4608)](https://github.com/microsoft/vcpkg/pull/4608) [vcpkg] Use IncludePath and LibraryPath properties (by @FrankHeimes) +- [(#12242)](https://github.com/microsoft/vcpkg/pull/12242) [vcpkg] Remove use of std::variant and std::visit to fix VS2015. (by @ras0219) +- [(#12272)](https://github.com/microsoft/vcpkg/pull/12272) [vcpkg] Revert change which causes sources to be purged by default in `vcpkg build` (by @ras0219) +- [(#12263)](https://github.com/microsoft/vcpkg/pull/12263) [vcpkg] Update toolsrc VERSION to 2020.06.15 (by @c72578) +- [(#12232)](https://github.com/microsoft/vcpkg/pull/12232) [opengl wincrypt winsock2] Use $ENV{WindowsSdkDir} instead of hard coding Windows SDK paths. (by @BillyONeal) +- [(#12177)](https://github.com/microsoft/vcpkg/pull/12177) [vcpkg] Added python script to generate all packages file list, added to azur… (by @yaoleo34) +- [(#11655)](https://github.com/microsoft/vcpkg/pull/11655) [vcpkg] Format the C++ in CI (by @strega-nil) +- [(#12300)](https://github.com/microsoft/vcpkg/pull/12300) [libbson, vcpkg baseline] Remove passing and fix spurious failure. (by @BillyONeal) +- [(#12140)](https://github.com/microsoft/vcpkg/pull/12140) [simdjson] Update to 0.4.6 (by @myd7349) +- [(#11967)](https://github.com/microsoft/vcpkg/pull/11967) [evpp] Fix build error on OSX (by @JackBoosY) +- [(#12314)](https://github.com/microsoft/vcpkg/pull/12314) [vcpkg ci] Update formatting CI (by @strega-nil) +- [(#12259)](https://github.com/microsoft/vcpkg/pull/12259) [triplets][osx] add support for arm64 'apple silicon' (by @eklipse2k8) +- [(#11754)](https://github.com/microsoft/vcpkg/pull/11754) [pcre2] Update to 10.35 (by @c72578) +- [(#11753)](https://github.com/microsoft/vcpkg/pull/11753) Fix support for toolchains that set CMAKE_FIND_ROOT_PATH_MODE_* variables to ONLY (by @traversaro) +- [(#12317)](https://github.com/microsoft/vcpkg/pull/12317) [vcpkg README] Fix links (by @strega-nil) +- [(#12319)](https://github.com/microsoft/vcpkg/pull/12319) [vcpkg.targets] Fix #12292 regression with MSBuild targets (by @ras0219-msft) +- [(#12323)](https://github.com/microsoft/vcpkg/pull/12323) [vcpkg] Ignore dependencies not found errors when downloading mode (by @JackBoosY) +- [(#12257)](https://github.com/microsoft/vcpkg/pull/12257) [vcpkg] Fix MSBuild regressions #12062 and #12086. (by @ras0219) +- [(#12037)](https://github.com/microsoft/vcpkg/pull/12037) [freerdp] Fix x64-osx triplet (by @AlexAltea) +- [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. (by @Neumann-A) +- [(#8322)](https://github.com/microsoft/vcpkg/pull/8322) [kfr] Add new port (by @myd7349) +- [(#12244)](https://github.com/microsoft/vcpkg/pull/12244) [cuda] correct env variables for newer cuda versions (by @Neumann-A) +- [(#12256)](https://github.com/microsoft/vcpkg/pull/12256) [vcpkg] Move default binary cache from `$root/archives` to user-wide directory (by @ras0219) +- [(#12350)](https://github.com/microsoft/vcpkg/pull/12350) [vcpkg] Remove unnecessary work queue (by @strega-nil) +- [(#12367)](https://github.com/microsoft/vcpkg/pull/12367) [vcpkg build] fix #12355 (by @strega-nil) +- [(#12369)](https://github.com/microsoft/vcpkg/pull/12369) [vcpkg formatting] Fix format regex (by @strega-nil) +- [(#12178)](https://github.com/microsoft/vcpkg/pull/12178) [vcpkg] Add a schema file for vcpkg.json (by @Edhebi) +- [(#12370)](https://github.com/microsoft/vcpkg/pull/12370) [vcpkg] Enable binary caching by default (by @ras0219) +- [(#12386)](https://github.com/microsoft/vcpkg/pull/12386) [vcpkg] Add CMake heuristics for header-only libraries (by @ras0219) +- [(#12378)](https://github.com/microsoft/vcpkg/pull/12378) [vcpkg] proper errorcheck during files installation (by @Maximus5) +- [(#12384)](https://github.com/microsoft/vcpkg/pull/12384) [vcpkg-ci] Always publish file lists (by @ras0219) +- [(#12254)](https://github.com/microsoft/vcpkg/pull/12254) [vcpkg] Track hashes of cmake script helpers in consuming portfiles (by @ras0219) +- [(#12361)](https://github.com/microsoft/vcpkg/pull/12361) [vcpkg] Fix iOS toolchain detection when using the iOS community triplets (by @alcroito) +- [(#12398)](https://github.com/microsoft/vcpkg/pull/12398) [libb2] Add supports and install pkg-conifg on macOS VM (by @PhoebeHui) +- [(#12368)](https://github.com/microsoft/vcpkg/pull/12368) [vcpkg formatting] Turn off DeriveLineEnding (by @strega-nil) +- [(#12429)](https://github.com/microsoft/vcpkg/pull/12429) [vcpkg] Fix ParagraphParser::required_field() (by @maksqwe) +- [(#12400)](https://github.com/microsoft/vcpkg/pull/12400) [vcpkg] implement copy_symlink working for non-elevated processes (by @Maximus5) +- [(#12432)](https://github.com/microsoft/vcpkg/pull/12432) vcpkg_configure_make: typo fix '_vcpkg_append_to_configure_environment' (by @kevinlul) +- [(#12351)](https://github.com/microsoft/vcpkg/pull/12351) [vcpkg] Clean up command switch code (by @strega-nil) +- [(#12179)](https://github.com/microsoft/vcpkg/pull/12179) [vcpkg] print list in json (by @dan-shaw) +- [(#12084)](https://github.com/microsoft/vcpkg/pull/12084) Build fix with MinGW GCC 9.2.0 (by @cristianadam) +- [(#12455)](https://github.com/microsoft/vcpkg/pull/12455) [libmicrohttpd] Add `platform.h` to restricted header list. (by @ras0219) +- [(#12468)](https://github.com/microsoft/vcpkg/pull/12468) [vcpkg] Add NVTOOLSEXT_PATH to the env passthrough list (by @Neumann-A) +- [(#12534)](https://github.com/microsoft/vcpkg/pull/12534) Add initial s390x support (by @lebdron) +- [(#11550)](https://github.com/microsoft/vcpkg/pull/11550) [vcpkg/scripts/pkgconfig] rewrite pkg-config check for libraries (by @Neumann-A) +- [(#11130)](https://github.com/microsoft/vcpkg/pull/11130) [opencv4] update to v4.3 (by @cenit) +- [(#12467)](https://github.com/microsoft/vcpkg/pull/12467) [vcpkg-acquire-msys] Install new keyring (by @emptyVoid) +- [(#12460)](https://github.com/microsoft/vcpkg/pull/12460) [vcpkg] Improve format check failure message (by @JackBoosY) +- [(#9248)](https://github.com/microsoft/vcpkg/pull/9248) fix issue #9228 : Add support to subgroups in gitlab (by @RamadanAhmed) +- [(#12513)](https://github.com/microsoft/vcpkg/pull/12513) [vcpkg] EOL LF for ci.baseline.txt (by @Neumann-A) +- [(#8628)](https://github.com/microsoft/vcpkg/pull/8628) [marble] Add new port (by @ig-or) +- [(#12118)](https://github.com/microsoft/vcpkg/pull/12118) [mozjpeg] fix build (by @saucecontrol) +- [(#12530)](https://github.com/microsoft/vcpkg/pull/12530) [libmodbus] Fix static linkage error (by @NancyLi1013) +- [(#12514)](https://github.com/microsoft/vcpkg/pull/12514) [mpir] Fix build error if VCPKG_BUILD_TYPE is set as release or debug (by @NancyLi1013) +- [(#12529)](https://github.com/microsoft/vcpkg/pull/12529) [qt5 components] Disable parallel build (by @JackBoosY) +- [(#12569)](https://github.com/microsoft/vcpkg/pull/12569) [vcpkg_fixup_pkgconfig] Remove required in first find_program call for pkg-config (by @Neumann-A) +- [(#12097)](https://github.com/microsoft/vcpkg/pull/12097) Fix vcpkg android toolchain so it adds flags that aren't just ignored (by @jamiebk) +- [(#11021)](https://github.com/microsoft/vcpkg/pull/11021) [rsocket] Add new port (by @curoky) +- [(#12104)](https://github.com/microsoft/vcpkg/pull/12104) Fix vcpkg_fixup_cmake_targets to work correctly on MinGW (by @koprok) +- [(#12661)](https://github.com/microsoft/vcpkg/pull/12661) [vcpkg] Fix typo in link for installing and using packages (by @varunagrawal) +- [(#12639)](https://github.com/microsoft/vcpkg/pull/12639) [vcpkg-ci] fix macos setup scripts (by @strega-nil) +- [(#12586)](https://github.com/microsoft/vcpkg/pull/12586) [vcpkg] Fix build on Windows 8.1 SDK (by @strega-nil) +- [(#12585)](https://github.com/microsoft/vcpkg/pull/12585) [vcpkg] Refactor Commands: Part 1 (by @strega-nil) +- [(#10770)](https://github.com/microsoft/vcpkg/pull/10770) [cmake] Add cmake port to test qt (by @Neumann-A) +- [(#10786)](https://github.com/microsoft/vcpkg/pull/10786) [tomlplusplus] Add new port (by @traversaro) +- [(#12641)](https://github.com/microsoft/vcpkg/pull/12641) Refactor commands 2: Electric Boogaloo (by @strega-nil) +- [(#12548)](https://github.com/microsoft/vcpkg/pull/12548) [vcpkg manifest] look at `platform` directives (by @strega-nil) +- [(#12494)](https://github.com/microsoft/vcpkg/pull/12494) [qt-webengine] Fix building with vs2017 (by @Neumann-A) +- [(#11376)](https://github.com/microsoft/vcpkg/pull/11376) [avro-cpp] new port (by @alexander-smyslov) +- [(#11535)](https://github.com/microsoft/vcpkg/pull/11535) [mpg123] Allow cross-compiling, fix previous builds tainting rebuilds (by @kevinlul) +- [(#12624)](https://github.com/microsoft/vcpkg/pull/12624) Fix .gitignore excluding triplets/community, sort, and driveby vcpkg_check_linkage.md doc bug. (by @BillyONeal) +- [(#12423)](https://github.com/microsoft/vcpkg/pull/12423) [vcpkg] Add environment variable VCPKG_DEFAULT_BINARY_CACHE (by @Neumann-A) +- [(#10670)](https://github.com/microsoft/vcpkg/pull/10670) [vcpkg] Fix [boost] find_package for MSVC2013 / v120 (by @ManuelKugelmann) +- [(#12471)](https://github.com/microsoft/vcpkg/pull/12471) [vcpkg format-manifest] Add convert-control flag (by @strega-nil) +- [(#11208)](https://github.com/microsoft/vcpkg/pull/11208) [ITK] Update to 5.1 (by @Neumann-A) +- [(#12742)](https://github.com/microsoft/vcpkg/pull/12742) [wavpack] Fix failure on linux and osx (by @PhoebeHui) +- [(#12727)](https://github.com/microsoft/vcpkg/pull/12727) [msbuild] Revert the importance to Normal (by @PhoebeHui) +- [(#12717)](https://github.com/microsoft/vcpkg/pull/12717) [vcpkg] Fix prettify output not working in some cases (by @Deadpikle) +- [(#12715)](https://github.com/microsoft/vcpkg/pull/12715) [vcpkg] Add VCPKG_TARGET_IS_IOS (by @Deadpikle) +- [(#12716)](https://github.com/microsoft/vcpkg/pull/12716) [vcpkg] Fix arm64-osx triplet not building for arm64 (by @Deadpikle) +- [(#12701)](https://github.com/microsoft/vcpkg/pull/12701) [vcpkg-ci-paraview] move into scripts/test_ports (by @Neumann-A) +- [(#12699)](https://github.com/microsoft/vcpkg/pull/12699) [vcpkg baseline] remove qt translations from skip list (by @Neumann-A) +- [(#12695)](https://github.com/microsoft/vcpkg/pull/12695) [ngspice] Initial port (by @marekr) +- [(#12678)](https://github.com/microsoft/vcpkg/pull/12678) [vcpkg] Add missing check for x86 (by @arves100) +- [(#12752)](https://github.com/microsoft/vcpkg/pull/12752) [vcpkg_build_qmake] Disable multi-threaded build when file fails to open (by @JackBoosY) +- [(#12789)](https://github.com/microsoft/vcpkg/pull/12789) [vcpkg] Fix vs2015 build (by @strega-nil) +- [(#12312)](https://github.com/microsoft/vcpkg/pull/12312) [fmt] Update to 7.0.2 + [spdlog] Update to 1.7.0 (by @kevinlul) +- [(#12515)](https://github.com/microsoft/vcpkg/pull/12515) [pangolin] Fix build failure on UNIX (by @JackBoosY) +- [(#12792)](https://github.com/microsoft/vcpkg/pull/12792) [log4cpp] Fix header file install path (by @LilyWangL) +- [(#12784)](https://github.com/microsoft/vcpkg/pull/12784) [gSoap] Update to 2.8.105 and add a required shared directory (by @xgcssch) +- [(#12768)](https://github.com/microsoft/vcpkg/pull/12768) [libtorrent] Update to 1.2.8 (by @FranciscoPombal) +- [(#12762)](https://github.com/microsoft/vcpkg/pull/12762) [boost] Add Supports fields and more accurately handle arm64-windows/x64-uwp (by @ras0219) +- [(#12630)](https://github.com/microsoft/vcpkg/pull/12630) [secp256k1] Fix build failures and export cmake targets (by @PhoebeHui) +- [(#12524)](https://github.com/microsoft/vcpkg/pull/12524) [asmjit] Update to the latest commit (by @ZehMatt) +- [(#12528)](https://github.com/microsoft/vcpkg/pull/12528) [libass] Fix build error on x64-windows-static (by @LilyWangL) +- [(#12634)](https://github.com/microsoft/vcpkg/pull/12634) [vcpkg] Improving android support (by @christophe-calmejane) +- [(#9162)](https://github.com/microsoft/vcpkg/pull/9162) [crashrpt] Add new port (by @tbdrake) +- [(#12810)](https://github.com/microsoft/vcpkg/pull/12810) [vcpkg] Make C++ the primary github language (by @strega-nil) +- [(#12198)](https://github.com/microsoft/vcpkg/pull/12198) [vcpkg] Add `vcpkg export` to E2E tests. Enable E2E tests on all platforms. (by @ras0219) +- [(#12698)](https://github.com/microsoft/vcpkg/pull/12698) [vcpkg] Rewrite CMake build system to be more target-based (by @strega-nil) +- [(#12776)](https://github.com/microsoft/vcpkg/pull/12776) [vcpkg_copy_tool_dependencies] Use vcpkg internal powershell (by @JackBoosY) +- [(#12805)](https://github.com/microsoft/vcpkg/pull/12805) [lapack-reference|fortran] Add new port (by @Neumann-A) +- [(#12829)](https://github.com/microsoft/vcpkg/pull/12829) [vcpkg] Fix resolution of default features when using Manifest mode (by @ras0219) +- [(#11836)](https://github.com/microsoft/vcpkg/pull/11836) [vcpkg/scripts/make] trying to iron out some issues (by @Neumann-A) +- [(#12818)](https://github.com/microsoft/vcpkg/pull/12818) [constexpr-contracts] Adds new port (by @cjdb) +- [(#12876)](https://github.com/microsoft/vcpkg/pull/12876) [vcpkg] Reduce dependencies and contents of vcpkgpaths.h (by @ras0219) +- [(#12866)](https://github.com/microsoft/vcpkg/pull/12866) [msys] Improve vcpkg_acquire_msys (by @PhoebeHui) +- [(#12897)](https://github.com/microsoft/vcpkg/pull/12897) [vcpkg] Restore layering and purge unused ParagraphParseResult (by @ras0219) +- [(#12895)](https://github.com/microsoft/vcpkg/pull/12895) [vcpkg_find_acquire_program] add version check for ninja (by @Neumann-A) +- [(#12927)](https://github.com/microsoft/vcpkg/pull/12927) [meson] Update meson to 0.55.1 (by @Neumann-A) +- [(#12837)](https://github.com/microsoft/vcpkg/pull/12837) Fix/clang10 linux (by @ignacionr) +- [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) (by @NancyLi1013) +- [(#12774)](https://github.com/microsoft/vcpkg/pull/12774) [vcpkg] Use std::filesystem when Visual Studio is greater than 2015 (by @JackBoosY) +- [(#12626)](https://github.com/microsoft/vcpkg/pull/12626) [vcpkg_find_acquire_program] Enable find_acquire(PKGCONFIG) (by @ras0219) +- [(#11277)](https://github.com/microsoft/vcpkg/pull/11277) [ffmpeg] Add feature support for zlib, iconv, fdk-aac, mp3lame, opus, soxr, theora. (by @Sibras) +- [(#12864)](https://github.com/microsoft/vcpkg/pull/12864) [vcpkg_execute_build_process] Re-fix qt5 components build (by @JackBoosY) +- [(#13000)](https://github.com/microsoft/vcpkg/pull/13000) [vcpkg] Fix baseline (by @NancyLi1013) +- [(#12985)](https://github.com/microsoft/vcpkg/pull/12985) [vcpkg] Add Forward Declarations (originally by @cngzhnp) (by @strega-nil) +- [(#12976)](https://github.com/microsoft/vcpkg/pull/12976) [vcpkg] Update hint message (by @PhoebeHui) +- [(#12974)](https://github.com/microsoft/vcpkg/pull/12974) [fluidsynth/redis-plus-plus] Update to the latest released version (by @NancyLi1013) +- [(#13017)](https://github.com/microsoft/vcpkg/pull/13017) remove registries.h and fwd/registries.h... (by @strega-nil) +- [(#12975)](https://github.com/microsoft/vcpkg/pull/12975) [openmpi/vcpkg_build_make] Disable parallel build (by @JackBoosY) +- [(#13043)](https://github.com/microsoft/vcpkg/pull/13043) [vcpkg] Fix hint message (by @PhoebeHui) +- [(#12046)](https://github.com/microsoft/vcpkg/pull/12046) [portmidi] Updated portmidi package to use alternative code source (by @stekyne) +- [(#13066)](https://github.com/microsoft/vcpkg/pull/13066) [typo] Fix incorrect Path in readme (by @ninjaoflight) +- [(#12910)](https://github.com/microsoft/vcpkg/pull/12910) [vcpkg] Fix editable bug (by @ras0219) +- [(#12523)](https://github.com/microsoft/vcpkg/pull/12523) [vcpkg.cmake] check for vcpkg.json only in `${CMAKE_SOURCE_DIR}` (by @strega-nil) +- [(#12964)](https://github.com/microsoft/vcpkg/pull/12964) [vcpkg] Do not use raw paths inside regexes (by @hanst99) +- [(#13092)](https://github.com/microsoft/vcpkg/pull/13092) [vcpkg] Hotfix regression in #12523 (by @ras0219) +- [(#13067)](https://github.com/microsoft/vcpkg/pull/13067) Sort file lists and failure logs together. (by @BillyONeal) +- [(#12738)](https://github.com/microsoft/vcpkg/pull/12738) [vcpkg] Use https sources for common tools (by @janisozaur) +- [(#13058)](https://github.com/microsoft/vcpkg/pull/13058) [Box2d] Update to 2.4.0 (by @JonLiu1993) +- [(#12977)](https://github.com/microsoft/vcpkg/pull/12977) fix vcpkg_configure_cmake for case when having semicolons in OPTIONS (by @jgehw) +- [(#12950)](https://github.com/microsoft/vcpkg/pull/12950) [vcpkg] Fix build on older compilers. (by @huahang) +- [(#13104)](https://github.com/microsoft/vcpkg/pull/13104) [vcpkg] Fix vcpkg_acquire_msys failing on path with spaces (by @SupSuper) +- [(#13125)](https://github.com/microsoft/vcpkg/pull/13125) Disable fluidlite in CI. (by @BillyONeal) +- [(#13117)](https://github.com/microsoft/vcpkg/pull/13117) [vcpkg] Fix #13094 by avoiding the comma operator. (by @BillyONeal) +- [(#13107)](https://github.com/microsoft/vcpkg/pull/13107) [VMSS] Fix the printed error message (by @JackBoosY) +- [(#13069)](https://github.com/microsoft/vcpkg/pull/13069) [vcpkg] Fix upgrade for port-version (by @strega-nil) +- [(#12982)](https://github.com/microsoft/vcpkg/pull/12982) [vcpkg_find_acquire_program] Cleanup and add CI testing (by @ras0219) +- [(#13142)](https://github.com/microsoft/vcpkg/pull/13142) Allow use of VS LLVM clang-format. (by @BillyONeal) +- [(#13148)](https://github.com/microsoft/vcpkg/pull/13148) [baseline] Skip check of clapack:x64-osx in the baseline (by @JackBoosY) + +
+The following 59 ports have been added: + +|port|version| +|---|---| +|[nanobench](https://github.com/microsoft/vcpkg/pull/11955)| 4.0.0 +|[cgns](https://github.com/microsoft/vcpkg/pull/9960)| 3.4.0-1 +|[paraview](https://github.com/microsoft/vcpkg/pull/9960)[#12067](https://github.com/microsoft/vcpkg/pull/12067) [#12144](https://github.com/microsoft/vcpkg/pull/12144) [#12149](https://github.com/microsoft/vcpkg/pull/12149) [#11596](https://github.com/microsoft/vcpkg/pull/11596) [#12342](https://github.com/microsoft/vcpkg/pull/12342) | 5.8.0-2 +|[drogon](https://github.com/microsoft/vcpkg/pull/12024)[#12931](https://github.com/microsoft/vcpkg/pull/12931) [#13007](https://github.com/microsoft/vcpkg/pull/13007) | v1.0.0-beta21 +|[libxdiff](https://github.com/microsoft/vcpkg/pull/12017)| 0.23 +|[efsw](https://github.com/microsoft/vcpkg/pull/11901)| 2020-06-08 +|[bitmagic](https://github.com/microsoft/vcpkg/pull/11890)| 6.4.0 +|[tgbot-cpp](https://github.com/microsoft/vcpkg/pull/11876)| 1.2.1 +|[ignition-plugin1](https://github.com/microsoft/vcpkg/pull/11275)| 1.1.0 +|[ppmagic](https://github.com/microsoft/vcpkg/pull/12253)| 2020-07-03 +|[getdns](https://github.com/microsoft/vcpkg/pull/12090)| 1.6.0 +|[font-chef](https://github.com/microsoft/vcpkg/pull/12293)| 1.0.1 +|[implot](https://github.com/microsoft/vcpkg/pull/11920)[#12835](https://github.com/microsoft/vcpkg/pull/12835) | 0.4 +|[threadpool](https://github.com/microsoft/vcpkg/pull/11650)| 0.2.5 +|[mygui](https://github.com/microsoft/vcpkg/pull/11991)| 2020-06-17 +|[kfr](https://github.com/microsoft/vcpkg/pull/8322)| 2020-06-15 +|[meshoptimizer](https://github.com/microsoft/vcpkg/pull/12211)| 0.14 +|[edlib](https://github.com/microsoft/vcpkg/pull/12490)| 1.2.6 +|[neargye-semver](https://github.com/microsoft/vcpkg/pull/12406)| 0.2.2 +|[marble](https://github.com/microsoft/vcpkg/pull/8628)| 19.08.2 +|[simple-fft](https://github.com/microsoft/vcpkg/pull/11929)| 2020-06-14 +|[stx](https://github.com/microsoft/vcpkg/pull/12011)| 1.0.1 +|[rsocket](https://github.com/microsoft/vcpkg/pull/11021)| 2020.05.04.00-1 +|[brpc](https://github.com/microsoft/vcpkg/pull/11524)| 0.9.7 +|[gamedev-framework](https://github.com/microsoft/vcpkg/pull/12426)[#12680](https://github.com/microsoft/vcpkg/pull/12680) | 0.17 +|[tomlplusplus](https://github.com/microsoft/vcpkg/pull/10786)[#12859](https://github.com/microsoft/vcpkg/pull/12859) | 2.1.0 +|[vcpkg-ci-paraview](https://github.com/microsoft/vcpkg/pull/12342)| 1 +|[avro-cpp](https://github.com/microsoft/vcpkg/pull/11376)| 1.9.2 +|[xframe](https://github.com/microsoft/vcpkg/pull/12427)| 0.3.0 +|[minc](https://github.com/microsoft/vcpkg/pull/11208)| 2.4.03 +|[nifticlib](https://github.com/microsoft/vcpkg/pull/11208)| 2020-04-30 +|[ngspice](https://github.com/microsoft/vcpkg/pull/12695)| 32 +|[josuttis-jthread](https://github.com/microsoft/vcpkg/pull/12497)[#13040](https://github.com/microsoft/vcpkg/pull/13040) | 2020-07-21 +|[lapack](https://github.com/microsoft/vcpkg/pull/12464)[#12805](https://github.com/microsoft/vcpkg/pull/12805) | 1 +|[qwtw](https://github.com/microsoft/vcpkg/pull/12748)[#12961](https://github.com/microsoft/vcpkg/pull/12961) | 3.1.0 +|[cppad](https://github.com/microsoft/vcpkg/pull/12560)| 20200000.3 +|[kf5completion](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0 +|[kf5config](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0 +|[kf5coreaddons](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0 +|[kf5crash](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0 +|[kf5guiaddons](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0 +|[kf5i18n](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0 +|[kf5itemmodels](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0 +|[kf5itemviews](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0 +|[kf5widgetsaddons](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0 +|[kf5windowsystem](https://github.com/microsoft/vcpkg/pull/11861)| 5.64.0 +|[libde265](https://github.com/microsoft/vcpkg/pull/11861)| 1.0.5 +|[libheif](https://github.com/microsoft/vcpkg/pull/11861)[#12856](https://github.com/microsoft/vcpkg/pull/12856) | 1.7.0 +|[quazip](https://github.com/microsoft/vcpkg/pull/11861)| 0.9.1 +|[vc](https://github.com/microsoft/vcpkg/pull/11861)| 1.4.1 +|[tlx](https://github.com/microsoft/vcpkg/pull/11943)| 0.5.20191212 +|[crashrpt](https://github.com/microsoft/vcpkg/pull/9162)| 1.4.3 +|[dbghelp](https://github.com/microsoft/vcpkg/pull/9162)| 0.0 +|[opencolorio-tools](https://github.com/microsoft/vcpkg/pull/12420)| 1.1.1 +|[lapack-reference](https://github.com/microsoft/vcpkg/pull/12805)[#12977](https://github.com/microsoft/vcpkg/pull/12977) [#12929](https://github.com/microsoft/vcpkg/pull/12929) | 3.8.0 +|[vcpkg-gfortran](https://github.com/microsoft/vcpkg/pull/12805)| 1 +|[constexpr-contracts](https://github.com/microsoft/vcpkg/pull/12818)| 2020-08-09 +|[fluidlite](https://github.com/microsoft/vcpkg/pull/13006)[#13125](https://github.com/microsoft/vcpkg/pull/13125) | 2020-08-20 +|[boost-uninstall](https://github.com/microsoft/vcpkg/pull/12851)| 1.73.0 +
+ +
+The following 345 ports have been updated: + +- slikenet `2019-10-22_1` -> `2019-10-22-2` + - [(#11987)](https://github.com/microsoft/vcpkg/pull/11987) [slikenet] Add cmake config and targets file + +- breakpad `2019-07-11-1` -> `2019-07-11-2` + - [(#11984)](https://github.com/microsoft/vcpkg/pull/11984) [breakpad] Fix build failure on OSX + +- plf-colony `2019-08-10` -> `5.33` + - [(#11993)](https://github.com/microsoft/vcpkg/pull/11993) [plf-colony] Update to 5.33 + +- thrift `2020-02-08` -> `0.13.0` + - [(#11981)](https://github.com/microsoft/vcpkg/pull/11981) [thrift] Update to 0.13.0 and fix OSX build + +- libvpx `1.8.1-5` -> `1.8.1-7` + - [(#11963)](https://github.com/microsoft/vcpkg/pull/11963) [libvpx] Support arm64-windows + - [(#12080)](https://github.com/microsoft/vcpkg/pull/12080) Fix bootstrapping MSYS2 pacman (#11499) + - [(#12401)](https://github.com/microsoft/vcpkg/pull/12401) [liblzma, libvpx] Add mingw support + - [(#12706)](https://github.com/microsoft/vcpkg/pull/12706) [libvpx] fix pdb paths + +- libzip `rel-1-6-1` -> `1.7.1` + - [(#11982)](https://github.com/microsoft/vcpkg/pull/11982) [libzip] Update to 1.7.1 + - [(#12610)](https://github.com/microsoft/vcpkg/pull/12610) [libzip] Fix find_package error + +- directxtex `jun2020` -> `jun2020b` + - [(#11971)](https://github.com/microsoft/vcpkg/pull/11971) [directxtk12][directxtex] Update to latest version + - [(#12332)](https://github.com/microsoft/vcpkg/pull/12332) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version + - [(#13060)](https://github.com/microsoft/vcpkg/pull/13060) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version + +- directxtk12 `jun2020` -> `jun2020b` + - [(#11971)](https://github.com/microsoft/vcpkg/pull/11971) [directxtk12][directxtex] Update to latest version + - [(#12332)](https://github.com/microsoft/vcpkg/pull/12332) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version + - [(#13060)](https://github.com/microsoft/vcpkg/pull/13060) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version + +- geographiclib `1.47-patch1-12` -> `1.47-patch1-16` + - [(#11965)](https://github.com/microsoft/vcpkg/pull/11965) [vcpkg baseline] Retrigger failed ports in baseline + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + - [(#12379)](https://github.com/microsoft/vcpkg/pull/12379) [geographiclib] Update to 1.50.1 + - [(#12471)](https://github.com/microsoft/vcpkg/pull/12471) [vcpkg format-manifest] Add convert-control flag + +- polyclipping `6.4.2` -> `6.4.2-4` + - [(#11965)](https://github.com/microsoft/vcpkg/pull/11965) [vcpkg baseline] Retrigger failed ports in baseline + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- qhull `7.3.2-2` -> `8.0.0` + - [(#12015)](https://github.com/microsoft/vcpkg/pull/12015) [qhull] update version 8.0.0 + +- jsoncons `0.153.0` -> `0.155.1` + - [(#12014)](https://github.com/microsoft/vcpkg/pull/12014) [jsoncons] Update to v0.153.3 + - [(#12372)](https://github.com/microsoft/vcpkg/pull/12372) [jsoncons] Update to v0.154.1 + - [(#12827)](https://github.com/microsoft/vcpkg/pull/12827) [jsoncons] Update to version 0.155.1 + +- azure-c-shared-utility `2020-02-04.1` -> `2020-07-19` + - [(#12013)](https://github.com/microsoft/vcpkg/pull/12013) [Azure-IoT-Sdk] Update to release 2020-06-17 + - [(#12493)](https://github.com/microsoft/vcpkg/pull/12493) [Azure-IoT-Sdk*] Update to 2020-07-19 + +- azure-iot-sdk-c `2020-02-04.1-1` -> `2020-07-19` + - [(#12013)](https://github.com/microsoft/vcpkg/pull/12013) [Azure-IoT-Sdk] Update to release 2020-06-17 + - [(#12209)](https://github.com/microsoft/vcpkg/pull/12209) [azure-iot-sdk-c] Fix feature name and enable to build + - [(#12493)](https://github.com/microsoft/vcpkg/pull/12493) [Azure-IoT-Sdk*] Update to 2020-07-19 + - [(#12605)](https://github.com/microsoft/vcpkg/pull/12605) [azure-iot-sdk-c] Fix passing hsm_type_symm_key + +- azure-macro-utils-c `2020-02-04.1` -> `2020-06-17-1` + - [(#12013)](https://github.com/microsoft/vcpkg/pull/12013) [Azure-IoT-Sdk] Update to release 2020-06-17 + +- azure-uamqp-c `2020-02-04.1` -> `2020-07-19` + - [(#12013)](https://github.com/microsoft/vcpkg/pull/12013) [Azure-IoT-Sdk] Update to release 2020-06-17 + - [(#12493)](https://github.com/microsoft/vcpkg/pull/12493) [Azure-IoT-Sdk*] Update to 2020-07-19 + +- azure-uhttp-c `2020-02-04.1` -> `2020-07-19` + - [(#12013)](https://github.com/microsoft/vcpkg/pull/12013) [Azure-IoT-Sdk] Update to release 2020-06-17 + - [(#12493)](https://github.com/microsoft/vcpkg/pull/12493) [Azure-IoT-Sdk*] Update to 2020-07-19 + +- azure-umqtt-c `2020-02-04.1` -> `2020-07-19` + - [(#12013)](https://github.com/microsoft/vcpkg/pull/12013) [Azure-IoT-Sdk] Update to release 2020-06-17 + - [(#12493)](https://github.com/microsoft/vcpkg/pull/12493) [Azure-IoT-Sdk*] Update to 2020-07-19 + +- umock-c `2020-02-04.1` -> `2020-06-17-1` + - [(#12013)](https://github.com/microsoft/vcpkg/pull/12013) [Azure-IoT-Sdk] Update to release 2020-06-17 + +- tinyxml2 `8.0.0` -> `8.0.0-1` + - [(#11966)](https://github.com/microsoft/vcpkg/pull/11966) [tinyxml2] Fix generation of pkg-config file + +- nlohmann-json `3.7.3` -> `3.9.1` + - [(#11941)](https://github.com/microsoft/vcpkg/pull/11941) [nlohmann-json] Upgrade to 3.8.0 + - [(#12117)](https://github.com/microsoft/vcpkg/pull/12117) [nlohmann-json] Always install multiple headers to allow forward declarations + - [(#12601)](https://github.com/microsoft/vcpkg/pull/12601) [nlohmann-json] Update to 3.9.0 + - [(#12787)](https://github.com/microsoft/vcpkg/pull/12787) [nlohmann-json] Update to 3.9.1 + +- trantor `v1.0.0-rc13` -> `v1.0.0-rc16` + - [(#11937)](https://github.com/microsoft/vcpkg/pull/11937) [trantor] Bump version to v1.0.0-rc14 + - [(#12930)](https://github.com/microsoft/vcpkg/pull/12930) [trantor] Update to 1.0.0-rc16 + +- graphicsmagick `1.3.35` -> `1.3.35-2` + - [(#11926)](https://github.com/microsoft/vcpkg/pull/11926) [graphicsmagick] fix Magick++.h header location. + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + +- bitsery `5.0.3` -> `5.1.0` + - [(#11912)](https://github.com/microsoft/vcpkg/pull/11912) [bitsery] Update to 5.1.0 version + +- skyr-url `1.10.0` -> `1.12.0` + - [(#11911)](https://github.com/microsoft/vcpkg/pull/11911) [skyr-url] Updated version number of skyr-url + - [(#12214)](https://github.com/microsoft/vcpkg/pull/12214) [skyr-url] Changed version number to 1.12.0 + +- vtk `9.0-2` -> `9.0.1` + - [(#9960)](https://github.com/microsoft/vcpkg/pull/9960) [CGNS/ParaView] Add new ports + - [(#12067)](https://github.com/microsoft/vcpkg/pull/12067) [vcpkg baseline] Fix baseline errors + - [(#11399)](https://github.com/microsoft/vcpkg/pull/11399) [vtk] Added opengl feature. + - [(#12149)](https://github.com/microsoft/vcpkg/pull/12149) [vtk] update to 9.0.1 + - [(#12472)](https://github.com/microsoft/vcpkg/pull/12472) [vtk|cuda] add nvcc to the path + - [(#12342)](https://github.com/microsoft/vcpkg/pull/12342) [qt5-base] Add zstd as a dependency + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + +- so5extra `1.4.0` -> `1.4.1` + - [(#12052)](https://github.com/microsoft/vcpkg/pull/12052) [so5extra] update to v.1.4.1. + +- sobjectizer `5.7.0.1` -> `5.7.1` + - [(#12051)](https://github.com/microsoft/vcpkg/pull/12051) [SObjectizer] update to v.5.7.1. + +- field3d `1.7.2` -> `1.7.3` + - [(#11747)](https://github.com/microsoft/vcpkg/pull/11747) [hdf5] Update HDF5 to 1.12 + - [(#11130)](https://github.com/microsoft/vcpkg/pull/11130) [opencv4] update to v4.3 + - [(#12342)](https://github.com/microsoft/vcpkg/pull/12342) [qt5-base] Add zstd as a dependency + +- hdf5 `1.10.5-12` -> `1.12.0` + - [(#11747)](https://github.com/microsoft/vcpkg/pull/11747) [hdf5] Update HDF5 to 1.12 + +- freerdp `2.0.0-1` -> `2.1.1-1` + - [(#12050)](https://github.com/microsoft/vcpkg/pull/12050) [freerdp] Update to version 2.1.1 + - [(#12037)](https://github.com/microsoft/vcpkg/pull/12037) [freerdp] Fix x64-osx triplet + +- openal-soft `1.20.1-1` -> `1.20.1-2` + - [(#12047)](https://github.com/microsoft/vcpkg/pull/12047) [openal-soft] Fix build failure by updating the library + - [(#12318)](https://github.com/microsoft/vcpkg/pull/12318) [openal-soft] Revert #12047 + - [(#12103)](https://github.com/microsoft/vcpkg/pull/12103) Mingw port fixes + +- absent `0.3.0` -> `0.3.1` + - [(#12036)](https://github.com/microsoft/vcpkg/pull/12036) [absent] Bump version 0.3.1 + +- cjson `2019-11-30` -> `2019-11-30-1` + - [(#12026)](https://github.com/microsoft/vcpkg/pull/12026) [cjson] fix windows-static for don't export symbols + +- open62541 `1.0.1` -> `1.1` + - [(#12023)](https://github.com/microsoft/vcpkg/pull/12023) [open62541] update to v1.1, add encryption support + +- abseil `2020-03-03-6` -> `2020-03-03-7` + - [(#12022)](https://github.com/microsoft/vcpkg/pull/12022) [abseil] Fix usage issue + - [(#11757)](https://github.com/microsoft/vcpkg/pull/11757) [vcpkg manifest] Manifest Implementation + - [(#12471)](https://github.com/microsoft/vcpkg/pull/12471) [vcpkg format-manifest] Add convert-control flag + - [(#12781)](https://github.com/microsoft/vcpkg/pull/12781) [abseil] Fix CMake warning + +- nowide `10.0.1` -> `11.0.0` + - [(#12020)](https://github.com/microsoft/vcpkg/pull/12020) [nowide] Update to 11.0.0 + +- cpp-httplib `0.5.1` -> `0.7.0` + - [(#12010)](https://github.com/microsoft/vcpkg/pull/12010) [cpp-httplib] Update library to 0.7.0 + +- openmesh `8.0` -> `8.1` + - [(#12007)](https://github.com/microsoft/vcpkg/pull/12007) [openmesh] Fix install *.dll and add vcpkg-cmake-wrapper.cmake + - [(#11739)](https://github.com/microsoft/vcpkg/pull/11739) [openmesh] Upgrade to 8.1 + +- cpprestsdk `2.10.16-2` -> `2.10.16-3` + - [(#12006)](https://github.com/microsoft/vcpkg/pull/12006) [cpprestsdk] Fix usage issue when building static + +- activemq-cpp `3.9.5-2` -> `3.9.5-3` + - [(#12005)](https://github.com/microsoft/vcpkg/pull/12005) [activemq-cpp] Fix static build + +- date `2019-11-08` -> `3.0.0` + - [(#11968)](https://github.com/microsoft/vcpkg/pull/11968) [date] Update to 3.0.0 + - [(#12739)](https://github.com/microsoft/vcpkg/pull/12739) [date] Fix config.cmake and usage + +- libmicrohttpd `0.9.63-2` -> `0.9.63-3` + - [(#11983)](https://github.com/microsoft/vcpkg/pull/11983) [libmicrohttpd] Support build on UNIX and use msbuild on Windows + - [(#12455)](https://github.com/microsoft/vcpkg/pull/12455) [libmicrohttpd] Add `platform.h` to restricted header list. + +- llvm `10.0.0-3` -> `10.0.0-4` + - [(#11956)](https://github.com/microsoft/vcpkg/pull/11956) [llvm] fix issue #11916 + +- ffmpeg `4.2-10` -> `4.2-13` + - [(#11946)](https://github.com/microsoft/vcpkg/pull/11946) [ffmpeg] Add avisynthplus support + - [(#12080)](https://github.com/microsoft/vcpkg/pull/12080) Fix bootstrapping MSYS2 pacman (#11499) + - [(#12083)](https://github.com/microsoft/vcpkg/pull/12083) [ffmpeg] Allow gpl builds without avisynthplus + - [(#12063)](https://github.com/microsoft/vcpkg/pull/12063) [ffmpeg] Fix tools dependency dll file + - [(#11130)](https://github.com/microsoft/vcpkg/pull/11130) [opencv4] update to v4.3 + - [(#12157)](https://github.com/microsoft/vcpkg/pull/12157) [many ports] Remove _find_package guards that break *_FOUND + - [(#12635)](https://github.com/microsoft/vcpkg/pull/12635) [ffmpeg] fix FindFFMPEG.cmake to work properly even without avresample + - [(#12843)](https://github.com/microsoft/vcpkg/pull/12843) [ffmpeg] Some libraries in ffmpeg can be optional + - [(#11277)](https://github.com/microsoft/vcpkg/pull/11277) [ffmpeg] Add feature support for zlib, iconv, fdk-aac, mp3lame, opus, soxr, theora. + - [(#13004)](https://github.com/microsoft/vcpkg/pull/13004) [ffmpeg] fix cmake module + +- imgui `1.76-1` -> `1.78` + - [(#11919)](https://github.com/microsoft/vcpkg/pull/11919) [imgui] Add Freetype feature + - [(#12155)](https://github.com/microsoft/vcpkg/pull/12155) [imgui] Update to 1.77 + - [(#12329)](https://github.com/microsoft/vcpkg/pull/12329) [imgui] Split bindings to multiple features + - [(#12210)](https://github.com/microsoft/vcpkg/pull/12210) [ogre] Update to version 1.12.7 and fix link error + - [(#12890)](https://github.com/microsoft/vcpkg/pull/12890) [imgui] Add messages for unsupported features + - [(#13064)](https://github.com/microsoft/vcpkg/pull/13064) [imgui] Update to 1.78 + - [(#12691)](https://github.com/microsoft/vcpkg/pull/12691) [libigl] fix imgui feature + +- x265 `3.2-3` -> `3.4` + - [(#11903)](https://github.com/microsoft/vcpkg/pull/11903) [x265] Delete the bin directory if the platform is Linux + - [(#11277)](https://github.com/microsoft/vcpkg/pull/11277) [ffmpeg] Add feature support for zlib, iconv, fdk-aac, mp3lame, opus, soxr, theora. + - [(#13048)](https://github.com/microsoft/vcpkg/pull/13048) [x265] Update source and version + +- wtl `10.0-5` -> `10.0.10077` + - [(#11893)](https://github.com/microsoft/vcpkg/pull/11893) [wtl] Update to 10.0.10077 + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + - [(#12688)](https://github.com/microsoft/vcpkg/pull/12688) [wtl ] Upgrade wtl to 10.0.10077. + +- icu `67.1` -> `67.1-2` + - [(#11897)](https://github.com/microsoft/vcpkg/pull/11897) [icu] Add tools + - [(#12080)](https://github.com/microsoft/vcpkg/pull/12080) Fix bootstrapping MSYS2 pacman (#11499) + +- cairo `1.16.0-4` -> `1.16.0-6` + - [(#11829)](https://github.com/microsoft/vcpkg/pull/11829) [cairo] Fix error in static build + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + - [(#12405)](https://github.com/microsoft/vcpkg/pull/12405) [brotli] add pkgconfig / [freetype] depend on brotli + +- pango `1.40.11-6` -> `1.40.11-7` + - [(#11829)](https://github.com/microsoft/vcpkg/pull/11829) [cairo] Fix error in static build + - [(#12405)](https://github.com/microsoft/vcpkg/pull/12405) [brotli] add pkgconfig / [freetype] depend on brotli + +- grpc `1.28.1-1` -> `1.31.1` + - [(#11791)](https://github.com/microsoft/vcpkg/pull/11791) [grpc] Update to 1.29.1 + - [(#12611)](https://github.com/microsoft/vcpkg/pull/12611) [grpc] Fix generate plugin grpc_csharp_ext + - [(#12920)](https://github.com/microsoft/vcpkg/pull/12920) [grpc] grpc v1.30.2 + - [(#13084)](https://github.com/microsoft/vcpkg/pull/13084) [grpc][upb][re2] grpc v1.31.1 + +- offscale-libetcd-cpp `2019-07-10` -> `2019-07-10-1` + - [(#11791)](https://github.com/microsoft/vcpkg/pull/11791) [grpc] Update to 1.29.1 + +- stlab `1.5.2` -> `1.5.2-1` + - [(#11787)](https://github.com/microsoft/vcpkg/pull/11787) [stlab] Fix cmake config file + +- ffnvcodec `9.1.23.1` -> `9.1.23.1-1` + - [(#12080)](https://github.com/microsoft/vcpkg/pull/12080) Fix bootstrapping MSYS2 pacman (#11499) + - [(#11277)](https://github.com/microsoft/vcpkg/pull/11277) [ffmpeg] Add feature support for zlib, iconv, fdk-aac, mp3lame, opus, soxr, theora. + +- libpq `12.2-2` -> `12.2-3` + - [(#12080)](https://github.com/microsoft/vcpkg/pull/12080) Fix bootstrapping MSYS2 pacman (#11499) + - [(#11757)](https://github.com/microsoft/vcpkg/pull/11757) [vcpkg manifest] Manifest Implementation + - [(#12196)](https://github.com/microsoft/vcpkg/pull/12196) [cmocka libarchive libiconv libpq libxml2 plibsys] fix drive-by error in vcpkg-cmake-wrappers + - [(#12415)](https://github.com/microsoft/vcpkg/pull/12415) [libpq] Remove broken features + - [(#12674)](https://github.com/microsoft/vcpkg/pull/12674) [libpq] only require bison and flex on Windows + +- tensorflow-cc `1.14-2` -> `1.14-3` + - [(#12080)](https://github.com/microsoft/vcpkg/pull/12080) Fix bootstrapping MSYS2 pacman (#11499) + - [(#12546)](https://github.com/microsoft/vcpkg/pull/12546) [tensorflow-cc] fix build issues on Windows + +- ignition-modularscripts `2020-05-09` -> `2020-05-16` + - [(#11275)](https://github.com/microsoft/vcpkg/pull/11275) [ignition-plugin1] Add new port 🤖 + - [(#11550)](https://github.com/microsoft/vcpkg/pull/11550) [vcpkg/scripts/pkgconfig] rewrite pkg-config check for libraries + +- apr `1.7.0` -> `1.7.0-1` + - [(#12067)](https://github.com/microsoft/vcpkg/pull/12067) [vcpkg baseline] Fix baseline errors + - [(#11550)](https://github.com/microsoft/vcpkg/pull/11550) [vcpkg/scripts/pkgconfig] rewrite pkg-config check for libraries + +- argtable2 `2.13-4` -> `2.13-7` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- cunit `2.1.3-3` -> `2.1.3-6` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- epsilon `0.9.2-1` -> `0.9.2-4` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- freeglut `3.2.1-1` -> `3.2.1-4` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- freeimage `3.18.0-9` -> `3.18.0-12` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + - [(#11130)](https://github.com/microsoft/vcpkg/pull/11130) [opencv4] update to v4.3 + +- giflib `5.1.4-3` -> `5.1.4-6` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- gsoap `2.8.102` -> `2.8.105` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + - [(#12784)](https://github.com/microsoft/vcpkg/pull/12784) [gSoap] Update to 2.8.105 and add a required shared directory + +- healpix `1.12.10-1` -> `1.12.10-5` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + - [(#11836)](https://github.com/microsoft/vcpkg/pull/11836) [vcpkg/scripts/make] trying to iron out some issues + +- irrlicht `1.8.4-5` -> `1.8.4-8` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + - [(#13137)](https://github.com/microsoft/vcpkg/pull/13137) [irrlicht] Patch moved sysctl.h header file + +- itpp `4.3.1-2` -> `4.3.1-5` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- libaiff `5.0-3` -> `5.0-6` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- libdisasm `0.23-3` -> `0.23-7` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- libmad `0.15.1-5` -> `0.15.1-8` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- libmikmod `3.3.11.1-5` -> `3.3.11.1-8` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- libsquish `1.15-3` -> `1.15-7` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- libssh `0.9.3-1` -> `0.9.3-2` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + +- libusb-win32 `1.2.6.0-3` -> `1.2.6.0-6` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- libuuid `1.0.3-4` -> `1.0.3-7` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- libxmp-lite `4.4.1-3` -> `4.4.1-6` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- mathgl `2.4.3-3` -> `2.4.3-6` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- mp3lame `3.100` -> `3.100-3` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- mpg123 `1.25.8-10` -> `1.25.8-12` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12287)](https://github.com/microsoft/vcpkg/pull/12287) [mpg123] Update portfile.cmake to accomodate OpenSUSE 15.x /lib /lib64 + - [(#11535)](https://github.com/microsoft/vcpkg/pull/11535) [mpg123] Allow cross-compiling, fix previous builds tainting rebuilds + +- pcre `8.44-1` -> `8.44-4` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + - [(#12252)](https://github.com/microsoft/vcpkg/pull/12252) [pcre] Use vcpkg_from_sourceforge as a fallback + - [(#11550)](https://github.com/microsoft/vcpkg/pull/11550) [vcpkg/scripts/pkgconfig] rewrite pkg-config check for libraries + - [(#12629)](https://github.com/microsoft/vcpkg/pull/12629) [pcre] Fix installation when only building release + +- pcre2 `10.30-7` -> `10.35` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12233)](https://github.com/microsoft/vcpkg/pull/12233) [pcre2] Restore the https://ftp.pcre.org/ mirror in addition to the SourceForge mirrors. + - [(#11754)](https://github.com/microsoft/vcpkg/pull/11754) [pcre2] Update to 10.35 + - [(#12347)](https://github.com/microsoft/vcpkg/pull/12347) [pcre2] Fix -mshstk needed with -fcf-protection + +- plplot `5.13.0-5` -> `5.13.0-8` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- podofo `0.9.6-8` -> `0.9.6-9` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + - [(#12405)](https://github.com/microsoft/vcpkg/pull/12405) [brotli] add pkgconfig / [freetype] depend on brotli + +- portmidi `0.217.1-1` -> `0.234` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + - [(#12046)](https://github.com/microsoft/vcpkg/pull/12046) [portmidi] Updated portmidi package to use alternative code source + +- pthreads `3.0.0-5` -> `3.0.0-6` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + +- qt5-base `5.12.8-4` -> `5.15.0` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12153)](https://github.com/microsoft/vcpkg/pull/12153) [qt5-base] fix static init fiasco and fix debug dll's not being copied + - [(#11757)](https://github.com/microsoft/vcpkg/pull/11757) [vcpkg manifest] Manifest Implementation + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + - [(#12529)](https://github.com/microsoft/vcpkg/pull/12529) [qt5 components] Disable parallel build + - [(#12342)](https://github.com/microsoft/vcpkg/pull/12342) [qt5-base] Add zstd as a dependency + - [(#12752)](https://github.com/microsoft/vcpkg/pull/12752) [vcpkg_build_qmake] Disable multi-threaded build when file fails to open + - [(#12405)](https://github.com/microsoft/vcpkg/pull/12405) [brotli] add pkgconfig / [freetype] depend on brotli + +- qwt `6.1.3-11` -> `6.1.4` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + - [(#12529)](https://github.com/microsoft/vcpkg/pull/12529) [qt5 components] Disable parallel build + +- rapidxml `1.13-1` -> `1.13-4` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- sigslot `1.0.0` -> `1.0.0-3` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- soxr `0.1.3.` -> `0.1.3-2` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + +- tclap `1.2.2-2` -> `1.2.2-3` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + +- tinyfiledialogs `3.4.3-2` -> `3.6.3` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12137)](https://github.com/microsoft/vcpkg/pull/12137) [tinyfiledialogs] Update version and download path to v3.6.3 + +- tinyxml `2.6.2-4` -> `2.6.2-7` + - [(#11899)](https://github.com/microsoft/vcpkg/pull/11899) [vcpkg] Add vcpkg_from_sourceforge (1/2) + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- openssl-unix `1.1.1d-4` -> `1.1.1g` + - [(#11882)](https://github.com/microsoft/vcpkg/pull/11882) [openssl] Update openssl 1.1.1g - continued from PR #11003 + - [(#12544)](https://github.com/microsoft/vcpkg/pull/12544) [openssl-unix] Add mingw with dynamic libs support - take 2 + - [(#12867)](https://github.com/microsoft/vcpkg/pull/12867) [openssl] Interrupt the build process when files conflict + - [(#12986)](https://github.com/microsoft/vcpkg/pull/12986) [openssl-unix] Fix #12919 + - [(#12527)](https://github.com/microsoft/vcpkg/pull/12527) [openssl-unix] use xcrun for iOS triplet build + +- openssl-uwp `1.1.1d-1` -> `1.1.1g` + - [(#11882)](https://github.com/microsoft/vcpkg/pull/11882) [openssl] Update openssl 1.1.1g - continued from PR #11003 + - [(#12867)](https://github.com/microsoft/vcpkg/pull/12867) [openssl] Interrupt the build process when files conflict + +- openssl-windows `1.1.1d-2` -> `1.1.1g` + - [(#11882)](https://github.com/microsoft/vcpkg/pull/11882) [openssl] Update openssl 1.1.1g - continued from PR #11003 + - [(#12056)](https://github.com/microsoft/vcpkg/pull/12056) [openssl-windows] Added feature option to build openssl with no-pinshared flag + - [(#12867)](https://github.com/microsoft/vcpkg/pull/12867) [openssl] Interrupt the build process when files conflict + +- openssl `1.1.1d` -> `1.1.1g` + - [(#11882)](https://github.com/microsoft/vcpkg/pull/11882) [openssl] Update openssl 1.1.1g - continued from PR #11003 + - [(#12867)](https://github.com/microsoft/vcpkg/pull/12867) [openssl] Interrupt the build process when files conflict + +- cmocka `1.1.5-1` -> `1.1.5` + - [(#11757)](https://github.com/microsoft/vcpkg/pull/11757) [vcpkg manifest] Manifest Implementation + - [(#12196)](https://github.com/microsoft/vcpkg/pull/12196) [cmocka libarchive libiconv libpq libxml2 plibsys] fix drive-by error in vcpkg-cmake-wrappers + - [(#12828)](https://github.com/microsoft/vcpkg/pull/12828) [cmocka] Update to 2020-08-01 + +- libarchive `3.4.1-3` -> `3.4.1` + - [(#11757)](https://github.com/microsoft/vcpkg/pull/11757) [vcpkg manifest] Manifest Implementation + - [(#12196)](https://github.com/microsoft/vcpkg/pull/12196) [cmocka libarchive libiconv libpq libxml2 plibsys] fix drive-by error in vcpkg-cmake-wrappers + +- libiconv `1.16-3` -> `1.16` + - [(#11757)](https://github.com/microsoft/vcpkg/pull/11757) [vcpkg manifest] Manifest Implementation + - [(#12196)](https://github.com/microsoft/vcpkg/pull/12196) [cmocka libarchive libiconv libpq libxml2 plibsys] fix drive-by error in vcpkg-cmake-wrappers + +- libxml2 `2.9.9-6` -> `2.9.9` + - [(#11757)](https://github.com/microsoft/vcpkg/pull/11757) [vcpkg manifest] Manifest Implementation + - [(#12196)](https://github.com/microsoft/vcpkg/pull/12196) [cmocka libarchive libiconv libpq libxml2 plibsys] fix drive-by error in vcpkg-cmake-wrappers + +- suitesparse `5.4.0-5` -> `5.4.0-6` + - [(#11945)](https://github.com/microsoft/vcpkg/pull/11945) [suitesparse] Fixing `SuiteSparse_INCLUDE_DIRS` is not usable from the port. + - [(#12464)](https://github.com/microsoft/vcpkg/pull/12464) [lapack] add metaport lapack to switch lapack impl with an overlay + +- boost-locale `1.73.0` -> `1.73.0-1` + - [(#10943)](https://github.com/microsoft/vcpkg/pull/10943) [boost-locale] Fix boost-locale failing to build with ICU + - [(#12762)](https://github.com/microsoft/vcpkg/pull/12762) [boost] Add Supports fields and more accurately handle arm64-windows/x64-uwp + +- monkeys-audio `5.38` -> `5.48` + - [(#12158)](https://github.com/microsoft/vcpkg/pull/12158) [monkeys-audio] Update to 5.46 + - [(#12690)](https://github.com/microsoft/vcpkg/pull/12690) [monkeys-audio] Update to 5.48 + +- google-cloud-cpp `1.14.0` -> `1.16.0` + - [(#12195)](https://github.com/microsoft/vcpkg/pull/12195) [google-cloud-cpp] Update to v1.15.0 + - [(#12747)](https://github.com/microsoft/vcpkg/pull/12747) [google-cloud-cpp] Update to v1.16.0 + +- infoware `0.5.3` -> `0.5.5` + - [(#12167)](https://github.com/microsoft/vcpkg/pull/12167) [infoware] Bump version to 0.5.4 + - [(#13010)](https://github.com/microsoft/vcpkg/pull/13010) [infoware] Bump version to 0.5.5 + +- sqlite3 `3.32.1` -> `3.32.3` + - [(#12185)](https://github.com/microsoft/vcpkg/pull/12185) update to sqlite3 3.32.3 + - [(#12516)](https://github.com/microsoft/vcpkg/pull/12516) [sqlite3] Namespaced targets with unofficial:: + - [(#11532)](https://github.com/microsoft/vcpkg/pull/11532) [sqlite3] Sqlite3 geopoly and json1 features + +- plibsys `0.0.4-3` -> `0.0.4` + - [(#12196)](https://github.com/microsoft/vcpkg/pull/12196) [cmocka libarchive libiconv libpq libxml2 plibsys] fix drive-by error in vcpkg-cmake-wrappers + +- span-lite `0.5.0` -> `0.7.0` + - [(#12206)](https://github.com/microsoft/vcpkg/pull/12206) [span-lite] Update to 0.7.0 + +- safeint `3.23` -> `3.24` + - [(#12217)](https://github.com/microsoft/vcpkg/pull/12217) [safeint] Update to 3.24 + +- xerces-c `3.2.3` -> `3.2.3-1` + - [(#12205)](https://github.com/microsoft/vcpkg/pull/12205) [xerces-c] rename feature from xmlch_wchar to xmlch-wchar + +- libnice `0.1.15-3` -> `0.1.15-4` + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + +- opencc `2020-04-26-4` -> `2020-04-26-6` + - [(#12018)](https://github.com/microsoft/vcpkg/pull/12018) [vcpkg_from_sourceforge] Add retry mirror function (2/2) + - [(#12246)](https://github.com/microsoft/vcpkg/pull/12246) [opencc] Fix regression on pipeline + +- exiv2 `0.27.2-1` -> `0.27.3` + - [(#12278)](https://github.com/microsoft/vcpkg/pull/12278) [Exiv2] update to 0.27.3 + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + +- nanodbc `2.12.4-8` -> `2.12.4` + - [(#12274)](https://github.com/microsoft/vcpkg/pull/12274) [nanodbc] Set unixodbc as a dependency under non-Windows + +- doctest `2.3.7` -> `2.4.0` + - [(#12239)](https://github.com/microsoft/vcpkg/pull/12239) [doctest] update to 2.4.0 + +- opengl `0.0-6` -> `0.0-7` + - [(#12232)](https://github.com/microsoft/vcpkg/pull/12232) [opengl wincrypt winsock2] Use $ENV{WindowsSdkDir} instead of hard coding Windows SDK paths. + +- wincrypt `0.0-1` -> `0.0-2` + - [(#12232)](https://github.com/microsoft/vcpkg/pull/12232) [opengl wincrypt winsock2] Use $ENV{WindowsSdkDir} instead of hard coding Windows SDK paths. + +- winsock2 `0.0-1` -> `0.0-2` + - [(#12232)](https://github.com/microsoft/vcpkg/pull/12232) [opengl wincrypt winsock2] Use $ENV{WindowsSdkDir} instead of hard coding Windows SDK paths. + +- openvr `1.10.30` -> `1.12.5` + - [(#12219)](https://github.com/microsoft/vcpkg/pull/12219) [openvr] Update to 1.12.5 + +- utf8h `841cb2deb8eb806e73fff0e1f43a11fca4f5da45` -> `2020-06-14` + - [(#12218)](https://github.com/microsoft/vcpkg/pull/12218) [utf8h] Update to latest version + +- libyuv `fec9121-1` -> `fec9121-2` + - [(#12213)](https://github.com/microsoft/vcpkg/pull/12213) [libyuv] Find dependency port libjpeg-turbo + - [(#12338)](https://github.com/microsoft/vcpkg/pull/12338) [libyuv] Fix static build issue + +- polyhook2 `2020-06-02` -> `2020-08-04` + - [(#12189)](https://github.com/microsoft/vcpkg/pull/12189) [polyhook2] Update to latest + - [(#12524)](https://github.com/microsoft/vcpkg/pull/12524) [asmjit] Update to the latest commit + +- ace `6.5.9-5` -> `6.5.11` + - [(#12183)](https://github.com/microsoft/vcpkg/pull/12183) [ace] 6.5.10 + - [(#12954)](https://github.com/microsoft/vcpkg/pull/12954) [ace] Update to 6.5.11 + +- curl `7.68.0-3` -> `7.71.1` + - [(#12141)](https://github.com/microsoft/vcpkg/pull/12141) [curl] Update to 7.71.0 + - [(#12758)](https://github.com/microsoft/vcpkg/pull/12758) [curl] Fix tools + - [(#12800)](https://github.com/microsoft/vcpkg/pull/12800) [curl] Fix static build + +- robin-hood-hashing `3.4.0` -> `3.8.0` + - [(#12147)](https://github.com/microsoft/vcpkg/pull/12147) [robin-hood-hashing] Update to 3.7.0 + - [(#12480)](https://github.com/microsoft/vcpkg/pull/12480) [robin-hood-hashing] Update to latest version + +- libexif `0.6.21-2` -> `0.6.22` + - [(#12161)](https://github.com/microsoft/vcpkg/pull/12161) [libexif] Update to 0.6.22 + +- cli `1.1.1` -> `1.2.0` + - [(#12139)](https://github.com/microsoft/vcpkg/pull/12139) [cli] update the version to 1.2.0 + +- libffi `3.3-2` -> `3.3-3` + - [(#12126)](https://github.com/microsoft/vcpkg/pull/12126) [libffi] Add pkgconfig file + - [(#12498)](https://github.com/microsoft/vcpkg/pull/12498) [libffi] fix crash in debug + +- angle `2020-05-15` -> `2020-05-15-1` + - [(#12111)](https://github.com/microsoft/vcpkg/pull/12111) [angle] Add egl renderer to list of files compiled for linux + +- caf `0.17.2` -> `0.17.3` + - [(#12068)](https://github.com/microsoft/vcpkg/pull/12068) [caf] Update to 0.17.3 + +- aws-sdk-cpp `1.7.333` -> `1.8.4` + - [(#12316)](https://github.com/microsoft/vcpkg/pull/12316) aws-sdk-cpp version update + +- libcopp `1.2.1` -> `1.3.1` + - [(#12264)](https://github.com/microsoft/vcpkg/pull/12264) [libcoppp] Update version to 1.3.0 + +- openimageio `2.1.9.0` -> `2.1.16.0-1` + - [(#11767)](https://github.com/microsoft/vcpkg/pull/11767) [openimageio] Update to version 2.1.16.0 + - [(#12157)](https://github.com/microsoft/vcpkg/pull/12157) [many ports] Remove _find_package guards that break *_FOUND + - [(#12592)](https://github.com/microsoft/vcpkg/pull/12592) [openimageio] Fix installed cmake file path + - [(#12856)](https://github.com/microsoft/vcpkg/pull/12856) [vcpkg baseline] Fix openimageio and pangolin build failures on Linux + +- evpp `0.7.0-2` -> `0.7.0-3` + - [(#11967)](https://github.com/microsoft/vcpkg/pull/11967) [evpp] Fix build error on OSX + - [(#12277)](https://github.com/microsoft/vcpkg/pull/12277) [libevent] update to 2.1.12 + +- protobuf `3.12.0-2` -> `3.13.0` + - [(#11851)](https://github.com/microsoft/vcpkg/pull/11851) [protobuf] Update to 3.12.3 + - [(#11550)](https://github.com/microsoft/vcpkg/pull/11550) [vcpkg/scripts/pkgconfig] rewrite pkg-config check for libraries + - [(#12103)](https://github.com/microsoft/vcpkg/pull/12103) Mingw port fixes + - [(#12776)](https://github.com/microsoft/vcpkg/pull/12776) [vcpkg_copy_tool_dependencies] Use vcpkg internal powershell + - [(#12918)](https://github.com/microsoft/vcpkg/pull/12918) [protobuf] protobuf v3.13.0 + +- fontconfig `2.12.4-10` -> `2.12.4` + - [(#12322)](https://github.com/microsoft/vcpkg/pull/12322) [fontconfig] Fix fonts.conf install path + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + +- faad2 `2.9.1-1` -> `2.9.1` + - [(#12306)](https://github.com/microsoft/vcpkg/pull/12306) [Many ports] Fix invalid character in feature name + +- freetype `2.10.1-6` -> `2.10.2` + - [(#11846)](https://github.com/microsoft/vcpkg/pull/11846) [freetype] Update to 2.10.2 + - [(#12405)](https://github.com/microsoft/vcpkg/pull/12405) [brotli] add pkgconfig / [freetype] depend on brotli + - [(#12886)](https://github.com/microsoft/vcpkg/pull/12886) [many ports] Fix various problems with mingw + +- cgal `5.0.2-1` -> `5.0.3` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + - [(#12711)](https://github.com/microsoft/vcpkg/pull/12711) [cgal] Update cgal to 5.0.3 + +- cutelyst2 `2.9.0` -> `2.9.0-1` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- kd-soap `1.8.0-1` -> `1.8.0-2` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- kf5archive `5.64.0` -> `5.64.0-1` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + - [(#11861)](https://github.com/microsoft/vcpkg/pull/11861) Adding libraries needed to build Krita + +- kf5holidays `5.64.0` -> `5.64.0-1` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- kf5plotting `5.64.0` -> `5.64.0-1` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- kf5syntaxhighlighting `5.64.0` -> `5.64.0-1` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- libqglviewer `2.7.2-2` -> `2.7.2-3` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- opencv2 `2.4.13.7-1` -> `2.4.13.7-2` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + - [(#11130)](https://github.com/microsoft/vcpkg/pull/11130) [opencv4] update to v4.3 + +- opencv3 `3.4.7-3` -> `3.4.7-4` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + - [(#11130)](https://github.com/microsoft/vcpkg/pull/11130) [opencv4] update to v4.3 + +- opencv4 `4.1.1-6` -> `4.3.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + - [(#11130)](https://github.com/microsoft/vcpkg/pull/11130) [opencv4] update to v4.3 + +- osg-qt `Qt4-1` -> `Qt4-2` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qca `2.2.1` -> `2.2.1-1` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qcustomplot `2.0.1-3` -> `2.0.1-4` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qscintilla `2.11.4-1` -> `2.11.4-2` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt-advanced-docking-system `3.2.5-1` -> `3.2.5-2` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-3d `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-activeqt `5.12.8-1` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-androidextras `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-canvas3d `5.12.8` -> `0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-charts `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-connectivity `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + - [(#12529)](https://github.com/microsoft/vcpkg/pull/12529) [qt5 components] Disable parallel build + +- qt5-datavis3d `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-declarative `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-doc `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-gamepad `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-graphicaleffects `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-imageformats `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + - [(#12529)](https://github.com/microsoft/vcpkg/pull/12529) [qt5 components] Disable parallel build + +- qt5-location `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + - [(#12529)](https://github.com/microsoft/vcpkg/pull/12529) [qt5 components] Disable parallel build + +- qt5-macextras `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-mqtt `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-multimedia `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-networkauth `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-purchasing `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-quickcontrols `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-quickcontrols2 `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-remoteobjects `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-script `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-scxml `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-sensors `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-serialbus `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-serialport `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-speech `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-svg `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-tools `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-translations `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-virtualkeyboard `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-wayland `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-webchannel `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-webengine `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + - [(#12494)](https://github.com/microsoft/vcpkg/pull/12494) [qt-webengine] Fix building with vs2017 + +- qt5-webglplugin `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-websockets `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-webview `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-winextras `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-x11extras `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5-xmlpatterns `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- qt5 `5.12.8` -> `5.15.0` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + - [(#12471)](https://github.com/microsoft/vcpkg/pull/12471) [vcpkg format-manifest] Add convert-control flag + - [(#12864)](https://github.com/microsoft/vcpkg/pull/12864) [vcpkg_execute_build_process] Re-fix qt5 components build + +- qtkeychain `v0.9.1` -> `v0.9.1-1` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- soqt `1.6.0` -> `1.6.0-1` + - [(#11596)](https://github.com/microsoft/vcpkg/pull/11596) [qt5] update qt to 5.15 and make ports depend on qt5-base[core]. + +- range-v3 `0.10.0-20200425` -> `0.10.0-20200708` + - [(#12346)](https://github.com/microsoft/vcpkg/pull/12346) [range-v3] updates range-v3 + +- azure-storage-cpp `7.4.0` -> `7.5.0` + - [(#12333)](https://github.com/microsoft/vcpkg/pull/12333) [azure-storage-cpp] Upgrade to 7.5.0 + +- directxmesh `jun2020` -> `jul2020` + - [(#12332)](https://github.com/microsoft/vcpkg/pull/12332) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version + - [(#13060)](https://github.com/microsoft/vcpkg/pull/13060) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version + +- directxtk `jun2020` -> `jul2020` + - [(#12332)](https://github.com/microsoft/vcpkg/pull/12332) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version + - [(#13060)](https://github.com/microsoft/vcpkg/pull/13060) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version + +- cuda `10.1-1` -> `10.1` + - [(#12244)](https://github.com/microsoft/vcpkg/pull/12244) [cuda] correct env variables for newer cuda versions + +- pybind11 `2.4.3` -> `2.5.0` + - [(#12394)](https://github.com/microsoft/vcpkg/pull/12394) [pybind11] Update to v2.5.0 + +- corrade `2019.10-1` -> `2020.06` + - [(#12211)](https://github.com/microsoft/vcpkg/pull/12211) [corrade,magnum,*-plugins,*-extras,*-integration] Update to v2020.06 + +- magnum-extras `2019.10` -> `2020.06` + - [(#12211)](https://github.com/microsoft/vcpkg/pull/12211) [corrade,magnum,*-plugins,*-extras,*-integration] Update to v2020.06 + +- magnum-integration `2019.10` -> `2020.06` + - [(#12211)](https://github.com/microsoft/vcpkg/pull/12211) [corrade,magnum,*-plugins,*-extras,*-integration] Update to v2020.06 + +- magnum-plugins `2019.10-2` -> `2020.06` + - [(#12211)](https://github.com/microsoft/vcpkg/pull/12211) [corrade,magnum,*-plugins,*-extras,*-integration] Update to v2020.06 + - [(#12458)](https://github.com/microsoft/vcpkg/pull/12458) [magnum-plugins] Fix file conflict with stb + +- magnum `2019.10-2` -> `2020.06` + - [(#12211)](https://github.com/microsoft/vcpkg/pull/12211) [corrade,magnum,*-plugins,*-extras,*-integration] Update to v2020.06 + +- zstd `1.4.4-1` -> `1.4.4` + - [(#12407)](https://github.com/microsoft/vcpkg/pull/12407) [zstd] fix pkg-config files + +- string-theory `3.2` -> `3.3` + - [(#12440)](https://github.com/microsoft/vcpkg/pull/12440) [string-theory] Update to 3.3 + +- nrf-ble-driver `4.1.1-2` -> `4.1.2` + - [(#12436)](https://github.com/microsoft/vcpkg/pull/12436) [nrf-ble-driver] Update to v4.1.2 + +- folly `2019.10.21.00-2` -> `2019.10.21.00` + - [(#12419)](https://github.com/microsoft/vcpkg/pull/12419) [folly] Fix build error C3861 + +- boost-modular-build-helper `1.73.0-1` -> `1.73.0` + - [(#12417)](https://github.com/microsoft/vcpkg/pull/12417) [boost-modular-build-helper] Remove has_icu.lib + - [(#12535)](https://github.com/microsoft/vcpkg/pull/12535) [boost] s390x support + - [(#12634)](https://github.com/microsoft/vcpkg/pull/12634) [vcpkg] Improving android support + - [(#9224)](https://github.com/microsoft/vcpkg/pull/9224) [boost-modular-build-helper] Fix issue that link incorrect dependent libraries + - [(#12851)](https://github.com/microsoft/vcpkg/pull/12851) [boost-uninstall] Add port to easily uninstall all boost components + +- liblzma `5.2.4-5` -> `5.2.5` + - [(#12401)](https://github.com/microsoft/vcpkg/pull/12401) [liblzma, libvpx] Add mingw support + - [(#7226)](https://github.com/microsoft/vcpkg/pull/7226) [liblzma] Patch headers to fix https://github.com/OpenTTD/OpenTTD/pull/7614 + +- pugixml `1.10-1` -> `1.10` + - [(#12441)](https://github.com/microsoft/vcpkg/pull/12441) [pugixml] Fix pkgconfig file + +- hiredis `2019-11-2-1` -> `2019-11-2` + - [(#12354)](https://github.com/microsoft/vcpkg/pull/12354) [hiredis] Fix feature ssl build error on windows + +- eigen3 `3.3.7-5` -> `3.3.7` + - [(#12279)](https://github.com/microsoft/vcpkg/pull/12279) [eigen3] Fix eigen3 and cuda compatibility issue + +- zlib `1.2.11-6` -> `1.2.11` + - [(#12133)](https://github.com/microsoft/vcpkg/pull/12133) [zlib] Add pkgconfig file + - [(#12753)](https://github.com/microsoft/vcpkg/pull/12753) [zlib, libpng] Fix pkg-config for mingw + - [(#11277)](https://github.com/microsoft/vcpkg/pull/11277) [ffmpeg] Add feature support for zlib, iconv, fdk-aac, mp3lame, opus, soxr, theora. + +- libmupdf `1.16.1-1` -> `1.17.0` + - [(#12483)](https://github.com/microsoft/vcpkg/pull/12483) [libmupdf] Update libmupdf to 1.17.0 + +- bzip2 `1.0.6-5` -> `1.0.6-6` + - [(#11550)](https://github.com/microsoft/vcpkg/pull/11550) [vcpkg/scripts/pkgconfig] rewrite pkg-config check for libraries + - [(#12880)](https://github.com/microsoft/vcpkg/pull/12880) [bzip2] fixes for building release-only + +- gmp `6.2.0-1` -> `6.2.0-2` + - [(#11550)](https://github.com/microsoft/vcpkg/pull/11550) [vcpkg/scripts/pkgconfig] rewrite pkg-config check for libraries + - [(#12664)](https://github.com/microsoft/vcpkg/pull/12664) [mpir, gmp] Add message to handle the conflicts between these two ports + +- libpng `1.6.37-9` -> `1.6.37-10` + - [(#11550)](https://github.com/microsoft/vcpkg/pull/11550) [vcpkg/scripts/pkgconfig] rewrite pkg-config check for libraries + - [(#12753)](https://github.com/microsoft/vcpkg/pull/12753) [zlib, libpng] Fix pkg-config for mingw + +- nettle `3.5.1-1` -> `3.5.1-2` + - [(#11550)](https://github.com/microsoft/vcpkg/pull/11550) [vcpkg/scripts/pkgconfig] rewrite pkg-config check for libraries + +- ompl `1.4.2-4` -> `1.5.0` + - [(#11550)](https://github.com/microsoft/vcpkg/pull/11550) [vcpkg/scripts/pkgconfig] rewrite pkg-config check for libraries + - [(#12529)](https://github.com/microsoft/vcpkg/pull/12529) [qt5 components] Disable parallel build + - [(#11737)](https://github.com/microsoft/vcpkg/pull/11737) [ompl]: upgrade to 1.5.0 + +- sdl1 `1.2.15-11` -> `1.2.15` + - [(#11550)](https://github.com/microsoft/vcpkg/pull/11550) [vcpkg/scripts/pkgconfig] rewrite pkg-config check for libraries + +- alembic `1.7.12-1` -> `1.7.13` + - [(#11130)](https://github.com/microsoft/vcpkg/pull/11130) [opencv4] update to v4.3 + - [(#12735)](https://github.com/microsoft/vcpkg/pull/12735) [alembic] Update to 1.7.13 + +- opencv `4.1.1-1` -> `4.3.0` + - [(#11130)](https://github.com/microsoft/vcpkg/pull/11130) [opencv4] update to v4.3 + +- openexr `2.3.0-5` -> `2.5.0` + - [(#11130)](https://github.com/microsoft/vcpkg/pull/11130) [opencv4] update to v4.3 + - [(#12157)](https://github.com/microsoft/vcpkg/pull/12157) [many ports] Remove _find_package guards that break *_FOUND + +- libftdi1 `1.4` -> `1.4-1` + - [(#9561)](https://github.com/microsoft/vcpkg/pull/9561) [libusb] Fix issue to support linux + +- libusb `1.0.23` -> `1.0.23-1` + - [(#9561)](https://github.com/microsoft/vcpkg/pull/9561) [libusb] Fix issue to support linux + - [(#12656)](https://github.com/microsoft/vcpkg/pull/12656) [libusb] build fails on windows due to symlink in extracted archive + - [(#13057)](https://github.com/microsoft/vcpkg/pull/13057) [libusb] Add vcpkg-cmake-wrapper + +- treehopper `1.11.3-3` -> `1.11.3-4` + - [(#9561)](https://github.com/microsoft/vcpkg/pull/9561) [libusb] Fix issue to support linux + +- outcome `2.1` -> `2.1.3` + - [(#12078)](https://github.com/microsoft/vcpkg/pull/12078) [outcome] Update library and fix portfile + +- librdkafka `1.2.0-2` -> `1.5.0` + - [(#12095)](https://github.com/microsoft/vcpkg/pull/12095) [librdkafka] Upgrade to 1.4.4 + - [(#12731)](https://github.com/microsoft/vcpkg/pull/12731) [librdkafka] Update to 1.5.0 + +- glew `2.1.0-7` -> `2.1.0-8` + - [(#12103)](https://github.com/microsoft/vcpkg/pull/12103) Mingw port fixes + +- mozjpeg `2020-06-02` -> `2020-06-02-1` + - [(#12118)](https://github.com/microsoft/vcpkg/pull/12118) [mozjpeg] fix build + +- fltk `1.3.5-2` -> `1.3.5` + - [(#12273)](https://github.com/microsoft/vcpkg/pull/12273) [fltk] Force static library due to global variables. Fix CMake Targets. + +- nana `1.7.2-3` -> `1.7.2` + - [(#12543)](https://github.com/microsoft/vcpkg/pull/12543) [nana] Fix the version and language standard + +- winpcap `4.1.3-3` -> `4.1.3` + - [(#12542)](https://github.com/microsoft/vcpkg/pull/12542) [winpcap] Remove the keyword 'inline' macro + +- boost-build `1.73.0-1` -> `1.73.0` + - [(#12535)](https://github.com/microsoft/vcpkg/pull/12535) [boost] s390x support + - [(#12851)](https://github.com/microsoft/vcpkg/pull/12851) [boost-uninstall] Add port to easily uninstall all boost components + +- restinio `0.6.8` -> `0.6.9` + - [(#12087)](https://github.com/microsoft/vcpkg/pull/12087) [RESTinio] Update to v.0.6.8.1 + - [(#12889)](https://github.com/microsoft/vcpkg/pull/12889) [restinio] update to 0.6.9 + - [(#13018)](https://github.com/microsoft/vcpkg/pull/13018) [restinio] update to v.0.6.10 + +- fizz `2020.02.03.00` -> `2020.02.03.00` + - [(#12277)](https://github.com/microsoft/vcpkg/pull/12277) [libevent] update to 2.1.12 + +- libevent `2.1.11-5` -> `2.1.12` + - [(#12277)](https://github.com/microsoft/vcpkg/pull/12277) [libevent] update to 2.1.12 + +- libflac `1.3.3-1` -> `1.3.3` + - [(#12374)](https://github.com/microsoft/vcpkg/pull/12374) [sdl2-mixer] Fix FLAC symbol export when static linking, add nativemidi default feature + - [(#12761)](https://github.com/microsoft/vcpkg/pull/12761) [flac] Disable stack smash protection and FORTIFY_SOURCE for mingw + +- libsndfile `1.0.29-9` -> `1.0.29` + - [(#12374)](https://github.com/microsoft/vcpkg/pull/12374) [sdl2-mixer] Fix FLAC symbol export when static linking, add nativemidi default feature + - [(#12921)](https://github.com/microsoft/vcpkg/pull/12921) [libsndfile] Update to 1.0.29 + +- sdl2-mixer `2.0.4-9` -> `2.0.4` + - [(#12374)](https://github.com/microsoft/vcpkg/pull/12374) [sdl2-mixer] Fix FLAC symbol export when static linking, add nativemidi default feature + +- physx `4.1.1-3` -> `4.1.1` + - [(#12413)](https://github.com/microsoft/vcpkg/pull/12413) [physx] Add patch for NVIDIAGameWorks/PhysX#322. + - [(#12710)](https://github.com/microsoft/vcpkg/pull/12710) [physx] Add support for checked and profile builds. + +- wxwidgets `3.1.3-1` -> `3.1.4` + - [(#12485)](https://github.com/microsoft/vcpkg/pull/12485) [wxwidgets] Adding wxWidgets resource compiler (wxrc) to /tools/wxwidgets directory + - [(#12733)](https://github.com/microsoft/vcpkg/pull/12733) [wxwidgets] Update to 3.1.4 + - [(#12885)](https://github.com/microsoft/vcpkg/pull/12885) [wxwidgets] copy pdbs + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + +- osgearth `2.10.2-1` -> `3.0` + - [(#12531)](https://github.com/microsoft/vcpkg/pull/12531) [osgearth] update to 3.0 + +- netcdf-c `4.7.3-1` -> `4.7.3` + - [(#12342)](https://github.com/microsoft/vcpkg/pull/12342) [qt5-base] Add zstd as a dependency + - [(#12755)](https://github.com/microsoft/vcpkg/pull/12755) [netcdf-c] also depend on embree on osx + - [(#12434)](https://github.com/microsoft/vcpkg/pull/12434) [netcdf-c] Fix dependency libmath + +- arrow `0.17.1` -> `1.0.0` + - [(#12537)](https://github.com/microsoft/vcpkg/pull/12537) [Arrow] Update to 1.0.0 + +- libigl `2.1.0-2` -> `2.2.0` + - [(#10252)](https://github.com/microsoft/vcpkg/pull/10252) [libigl] Fix configure error and dependencies + - [(#12691)](https://github.com/microsoft/vcpkg/pull/12691) [libigl] fix imgui feature + +- asiosdk `2.3.3` -> `2.3.3-1` + - [(#12157)](https://github.com/microsoft/vcpkg/pull/12157) [many ports] Remove _find_package guards that break *_FOUND + +- jxrlib `2019.10.9` -> `2019.10.9-1` + - [(#12157)](https://github.com/microsoft/vcpkg/pull/12157) [many ports] Remove _find_package guards that break *_FOUND + +- libmodman `2.0.1-1` -> `2.0.1-2` + - [(#12157)](https://github.com/microsoft/vcpkg/pull/12157) [many ports] Remove _find_package guards that break *_FOUND + +- libproxy `0.4.15-1` -> `0.4.15-2` + - [(#12157)](https://github.com/microsoft/vcpkg/pull/12157) [many ports] Remove _find_package guards that break *_FOUND + +- stb `2020-02-08` -> `2020-02-08-1` + - [(#12157)](https://github.com/microsoft/vcpkg/pull/12157) [many ports] Remove _find_package guards that break *_FOUND + +- itk `5.0.1-2` -> `5.1.0` + - [(#11208)](https://github.com/microsoft/vcpkg/pull/11208) [ITK] Update to 5.1 + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + +- opencl `2.2-2-1` -> `2.2` + - [(#11208)](https://github.com/microsoft/vcpkg/pull/11208) [ITK] Update to 5.1 + +- openjpeg `2.3.1-1` -> `2.3.1` + - [(#11208)](https://github.com/microsoft/vcpkg/pull/11208) [ITK] Update to 5.1 + +- pbc `0.5.14-2` -> `0.5.14` + - [(#12732)](https://github.com/microsoft/vcpkg/pull/12732) [vcpkg baseline] Fix pbc build failure with x64-osx + - [(#11836)](https://github.com/microsoft/vcpkg/pull/11836) [vcpkg/scripts/make] trying to iron out some issues + +- libodb-sqlite `2.4.0-6` -> `2.4.0` + - [(#12516)](https://github.com/microsoft/vcpkg/pull/12516) [sqlite3] Namespaced targets with unofficial:: + +- gtkmm `3.22.2-2` -> `3.22.2` + - [(#12637)](https://github.com/microsoft/vcpkg/pull/12637) [gtkmm] fix missing symbol exports with gtkmm release build + +- wavpack `5.2.0` -> `5.2.0` + - [(#12742)](https://github.com/microsoft/vcpkg/pull/12742) [wavpack] Fix failure on linux and osx + - [(#11277)](https://github.com/microsoft/vcpkg/pull/11277) [ffmpeg] Add feature support for zlib, iconv, fdk-aac, mp3lame, opus, soxr, theora. + +- shapelib `1.4.1-2` -> `1.5.0` + - [(#12737)](https://github.com/microsoft/vcpkg/pull/12737) [shapelib] Update to 1.5.0 + +- teemo `1.3` -> `2.1` + - [(#12728)](https://github.com/microsoft/vcpkg/pull/12728) [teemo] Update to v2.1 + +- quill `1.3.1` -> `1.4.0` + - [(#12683)](https://github.com/microsoft/vcpkg/pull/12683) [quill] Update to version 1.3.3 + - [(#12924)](https://github.com/microsoft/vcpkg/pull/12924) [quill] Update to 1.4.0 + +- libmariadb `3.1.7-1` -> `3.1.7` + - [(#12669)](https://github.com/microsoft/vcpkg/pull/12669) [libmariadb] Include bundled zlib and openssl + +- brotli `1.0.7-1` -> `1.0.7` + - [(#12405)](https://github.com/microsoft/vcpkg/pull/12405) [brotli] add pkgconfig / [freetype] depend on brotli + +- cairomm `1.15.3-4` -> `1.15.3` + - [(#12405)](https://github.com/microsoft/vcpkg/pull/12405) [brotli] add pkgconfig / [freetype] depend on brotli + +- freetype-gl `2019-03-29-3` -> `2019-03-29` + - [(#12405)](https://github.com/microsoft/vcpkg/pull/12405) [brotli] add pkgconfig / [freetype] depend on brotli + +- libraqm `0.7.0-1` -> `0.7.0` + - [(#12405)](https://github.com/microsoft/vcpkg/pull/12405) [brotli] add pkgconfig / [freetype] depend on brotli + +- sfml `2.5.1-7` -> `2.5.1` + - [(#12405)](https://github.com/microsoft/vcpkg/pull/12405) [brotli] add pkgconfig / [freetype] depend on brotli + - [(#11800)](https://github.com/microsoft/vcpkg/pull/11800) [sfml][imgui-sfml] Push SFML_STATIC_LIBRARIES setting into `sfml` + +- fmt `6.2.1` -> `7.0.3` + - [(#12312)](https://github.com/microsoft/vcpkg/pull/12312) [fmt] Update to 7.0.2 + [spdlog] Update to 1.7.0 + - [(#12806)](https://github.com/microsoft/vcpkg/pull/12806) [fmt] Update to 7.0.3 + +- spdlog `1.6.1` -> `1.7.0` + - [(#12312)](https://github.com/microsoft/vcpkg/pull/12312) [fmt] Update to 7.0.2 + [spdlog] Update to 1.7.0 + +- armadillo `2019-04-16-8` -> `2019-04-16` + - [(#12464)](https://github.com/microsoft/vcpkg/pull/12464) [lapack] add metaport lapack to switch lapack impl with an overlay + +- blaze `3.7` -> `3.8` + - [(#12464)](https://github.com/microsoft/vcpkg/pull/12464) [lapack] add metaport lapack to switch lapack impl with an overlay + - [(#12916)](https://github.com/microsoft/vcpkg/pull/12916) [blaze] Update to Blaze 3.8 + +- ceres `1.14.0-7` -> `1.14.0` + - [(#12464)](https://github.com/microsoft/vcpkg/pull/12464) [lapack] add metaport lapack to switch lapack impl with an overlay + +- clapack `3.2.1-13` -> `3.2.1` + - [(#12464)](https://github.com/microsoft/vcpkg/pull/12464) [lapack] add metaport lapack to switch lapack impl with an overlay + - [(#12805)](https://github.com/microsoft/vcpkg/pull/12805) [lapack-reference|fortran] Add new port + +- dlib `19.19-1` -> `19.21` + - [(#12464)](https://github.com/microsoft/vcpkg/pull/12464) [lapack] add metaport lapack to switch lapack impl with an overlay + - [(#13061)](https://github.com/microsoft/vcpkg/pull/13061) [dlib] Update to v19.21 + +- geogram `1.6.9-7` -> `1.7.5` + - [(#12464)](https://github.com/microsoft/vcpkg/pull/12464) [lapack] add metaport lapack to switch lapack impl with an overlay + - [(#12562)](https://github.com/microsoft/vcpkg/pull/12562) [geogram] update to 1.7.5 + - [(#12626)](https://github.com/microsoft/vcpkg/pull/12626) [vcpkg_find_acquire_program] Enable find_acquire(PKGCONFIG) + +- mlpack `3.2.2-3` -> `3.2.2` + - [(#12464)](https://github.com/microsoft/vcpkg/pull/12464) [lapack] add metaport lapack to switch lapack impl with an overlay + - [(#12805)](https://github.com/microsoft/vcpkg/pull/12805) [lapack-reference|fortran] Add new port + +- pangolin `0.5-7` -> `0.5` + - [(#12515)](https://github.com/microsoft/vcpkg/pull/12515) [pangolin] Fix build failure on UNIX + - [(#12856)](https://github.com/microsoft/vcpkg/pull/12856) [vcpkg baseline] Fix openimageio and pangolin build failures on Linux + +- orocos-kdl `1.4-2` -> `1.4` + - [(#12794)](https://github.com/microsoft/vcpkg/pull/12794) [ocoros-kdl] Fix the CMake config file + +- log4cpp `2.9.1-2` -> `2.9.1` + - [(#12792)](https://github.com/microsoft/vcpkg/pull/12792) [log4cpp] Fix header file install path + +- bond `9.0.0` -> `9.0.2` + - [(#12782)](https://github.com/microsoft/vcpkg/pull/12782) [bond] Update to v9.0.2 + +- libtorrent `1.2.7` -> `1.2.9` + - [(#12768)](https://github.com/microsoft/vcpkg/pull/12768) [libtorrent] Update to 1.2.8 + - [(#12762)](https://github.com/microsoft/vcpkg/pull/12762) [boost] Add Supports fields and more accurately handle arm64-windows/x64-uwp + - [(#12946)](https://github.com/microsoft/vcpkg/pull/12946) [libtorrent] minor version bump and python patch adjustment + +- boost-context `1.73.0-1` -> `1.73.0` + - [(#12762)](https://github.com/microsoft/vcpkg/pull/12762) [boost] Add Supports fields and more accurately handle arm64-windows/x64-uwp + +- secp256k1 `2017-19-10-0b7024185045a49a1a6a4c5615bf31c94f63d9c4-2` -> `2017-19-10` + - [(#12630)](https://github.com/microsoft/vcpkg/pull/12630) [secp256k1] Fix build failures and export cmake targets + +- xbyak `5.911` -> `5.93` + - [(#12577)](https://github.com/microsoft/vcpkg/pull/12577) [Xbyak] Update to 5.93 + +- tiff `4.0.10-9` -> `4.1.0` + - [(#12559)](https://github.com/microsoft/vcpkg/pull/12559) [tiff] Update 4.0.10 to 4.1.0 + +- asmjit `2020-05-08` -> `2020-07-22` + - [(#12524)](https://github.com/microsoft/vcpkg/pull/12524) [asmjit] Update to the latest commit + +- libressl `2.9.1-2` -> `2.9.1` + - [(#11949)](https://github.com/microsoft/vcpkg/pull/11949) [libressl] add download mirror + +- darknet `2020-03-02` -> `2020-06-29` + - [(#11037)](https://github.com/microsoft/vcpkg/pull/11037) [darknet] ready for yolo_v4 + +- embree3 `3.8.0` -> `3.11.0` + - [(#12555)](https://github.com/microsoft/vcpkg/pull/12555) [embree3] Update to 3.11.0 + +- fribidi `1.0.9-1` -> `1.0.10` + - [(#12517)](https://github.com/microsoft/vcpkg/pull/12517) [fribidi] Update to 1.0.10 + +- opencolorio `1.1.1-2` -> `1.1.1` + - [(#12420)](https://github.com/microsoft/vcpkg/pull/12420) [opencolorio-tools] Separate feature application to avoid circular dependency + - [(#12869)](https://github.com/microsoft/vcpkg/pull/12869) [opencolorio] Update repository + +- osg `3.6.4-3` -> `3.6.5` + - [(#12672)](https://github.com/microsoft/vcpkg/pull/12672) [osg] Update to 3.6.5 + +- openblas `0.3.9-1` -> `0.3.9` + - [(#12805)](https://github.com/microsoft/vcpkg/pull/12805) [lapack-reference|fortran] Add new port + - [(#12956)](https://github.com/microsoft/vcpkg/pull/12956) [openblas] Fix generating pkg-config file + +- farmhash `1.1-1` -> `1.1` + - [(#11836)](https://github.com/microsoft/vcpkg/pull/11836) [vcpkg/scripts/make] trying to iron out some issues + +- freexl `1.0.4-9` -> `1.0.4` + - [(#11836)](https://github.com/microsoft/vcpkg/pull/11836) [vcpkg/scripts/make] trying to iron out some issues + +- libcrafter `0.3-1` -> `0.3` + - [(#11836)](https://github.com/microsoft/vcpkg/pull/11836) [vcpkg/scripts/make] trying to iron out some issues + +- libmagic `5.37-1` -> `5.37` + - [(#11836)](https://github.com/microsoft/vcpkg/pull/11836) [vcpkg/scripts/make] trying to iron out some issues + +- libwandio `4.2.1-2` -> `4.2.1` + - [(#11836)](https://github.com/microsoft/vcpkg/pull/11836) [vcpkg/scripts/make] trying to iron out some issues + +- ocilib `4.6.4-1` -> `4.6.4` + - [(#11836)](https://github.com/microsoft/vcpkg/pull/11836) [vcpkg/scripts/make] trying to iron out some issues + +- x264 `157-303c484ec828ed0-8` -> `157-303c484ec828ed0` + - [(#11836)](https://github.com/microsoft/vcpkg/pull/11836) [vcpkg/scripts/make] trying to iron out some issues + +- wpilib `2020.1.1` -> `2020.3.2` + - [(#12373)](https://github.com/microsoft/vcpkg/pull/12373) [wpilib] Update to 2020.3.2 + +- proj4 `6.3.1-1` -> `6.3.1` + - [(#12875)](https://github.com/microsoft/vcpkg/pull/12875) [proj4] use sqlite3 config cmake, make sqlite3 private + +- tool-meson `0.54.2` -> `0.55.1` + - [(#12927)](https://github.com/microsoft/vcpkg/pull/12927) [meson] Update meson to 0.55.1 + +- apr-util `1.6.1-1` -> `1.6.1` + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + +- expat `2.2.7` -> `2.2.9` + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + +- gdal `2.4.1-9` -> `2.4.1` + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + - [(#12541)](https://github.com/microsoft/vcpkg/pull/12541) [gdal] Fix static build issue + +- io2d `2019-07-11-2` -> `2019-07-11` + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + +- libkml `1.3.0-4` -> `1.3.0` + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + +- poco `1.9.2-2` -> `1.9.2` + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + +- readosm `1.1.0-2` -> `1.1.0` + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + +- skia `2020-05-18-1` -> `2020-05-18` + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + +- spatialite-tools `4.3.0-2` -> `4.3.0` + - [(#9146)](https://github.com/microsoft/vcpkg/pull/9146) [expat] Update the version to 2.2.9 (add support for uwp) + +- xlnt `1.4.0-1` -> `1.5.0` + - [(#12972)](https://github.com/microsoft/vcpkg/pull/12972) [xlnt] Upgrade xlnt to 1.5.0 + +- fdk-aac `2018-07-08-1` -> `2018-07-08-2` + - [(#11277)](https://github.com/microsoft/vcpkg/pull/11277) [ffmpeg] Add feature support for zlib, iconv, fdk-aac, mp3lame, opus, soxr, theora. + +- opus `1.3.1-3` -> `1.3.1` + - [(#11277)](https://github.com/microsoft/vcpkg/pull/11277) [ffmpeg] Add feature support for zlib, iconv, fdk-aac, mp3lame, opus, soxr, theora. + - [(#12886)](https://github.com/microsoft/vcpkg/pull/12886) [many ports] Fix various problems with mingw + +- sdl2 `2.0.12-1` -> `2.0.12` + - [(#11277)](https://github.com/microsoft/vcpkg/pull/11277) [ffmpeg] Add feature support for zlib, iconv, fdk-aac, mp3lame, opus, soxr, theora. + +- speex `1.2.0-4` -> `1.2.0` + - [(#11277)](https://github.com/microsoft/vcpkg/pull/11277) [ffmpeg] Add feature support for zlib, iconv, fdk-aac, mp3lame, opus, soxr, theora. + +- pcl `1.9.1-13` -> `1.11.0` + - [(#10042)](https://github.com/microsoft/vcpkg/pull/10042) [pcl] Update to 1.10.0 + - [(#13020)](https://github.com/microsoft/vcpkg/pull/13020) [pcl] check SSE flags + +- tinygltf `2.2.0` -> `2020-07-28` + - [(#12608)](https://github.com/microsoft/vcpkg/pull/12608) [tinygltf] update to v2.4.0 + +- pmdk `1.8` -> `1.9` + - [(#12863)](https://github.com/microsoft/vcpkg/pull/12863) [pmdk] Update to 1.9 + +- kangaru `4.2.2` -> `4.2.4` + - [(#12932)](https://github.com/microsoft/vcpkg/pull/12932) [kangaru] Update to v4.2.4 + +- intel-mkl `2018.0.1` -> `2020.0.0` + - [(#12978)](https://github.com/microsoft/vcpkg/pull/12978) [intel-mkl] Update to 2020.0.0 + +- fluidsynth `2.1.0` -> `2.1.4` + - [(#12974)](https://github.com/microsoft/vcpkg/pull/12974) [fluidsynth/redis-plus-plus] Update to the latest released version + +- redis-plus-plus `1.1.1` -> `1.1.2` + - [(#12974)](https://github.com/microsoft/vcpkg/pull/12974) [fluidsynth/redis-plus-plus] Update to the latest released version + +- openxr-loader `1.0.3.0` -> `1.0.11` + - [(#12060)](https://github.com/microsoft/vcpkg/pull/12060) [openxr-loader] Update to latest version, official repo + +- libmediainfo `20.03` -> `20.08` + - [(#12944)](https://github.com/microsoft/vcpkg/pull/12944) [libmediainfo] Update to 20.08 + +- wt `4.2.2` -> `4.4.0` + - [(#13005)](https://github.com/microsoft/vcpkg/pull/13005) [wt] Update to 4.4.0 + +- libjpeg-turbo `2.0.4` -> `2.0.5` + - [(#12973)](https://github.com/microsoft/vcpkg/pull/12973) [libjpeg-turbo] Update to 2.0.5 + +- berkeleydb `4.8.30-4` -> `4.8.30` + - [(#12870)](https://github.com/microsoft/vcpkg/pull/12870) [berkeleydb] Fix build error with Visual Studio 16.7.0 + +- libmodplug `0.8.9.0-5` -> `0.8.9.0` + - [(#12886)](https://github.com/microsoft/vcpkg/pull/12886) [many ports] Fix various problems with mingw + +- imgui-sfml `2.1-1` -> `2.1-2` + - [(#11800)](https://github.com/microsoft/vcpkg/pull/11800) [sfml][imgui-sfml] Push SFML_STATIC_LIBRARIES setting into `sfml` + +- re2 `2020-01-01` -> `2020-06-01` + - [(#13084)](https://github.com/microsoft/vcpkg/pull/13084) [grpc][upb][re2] grpc v1.31.1 + +- upb `2019-10-21-2` -> `2020-08-19` + - [(#13084)](https://github.com/microsoft/vcpkg/pull/13084) [grpc][upb][re2] grpc v1.31.1 + +- box2d `2019-12-31` -> `2.4.0` + - [(#13058)](https://github.com/microsoft/vcpkg/pull/13058) [Box2d] Update to 2.4.0 + +- cpp-taskflow `2.2.0-1` -> `2.5.0` + - [(#12923)](https://github.com/microsoft/vcpkg/pull/12923) [cpp-taskflow] Update to 2.5.0 + +- aubio `0.4.9-1` -> `0.4.9` + - [(#12921)](https://github.com/microsoft/vcpkg/pull/12921) [libsndfile] Update to 1.0.29 + +- libfreenect2 `0.2.0-4` -> `0.2.0` + - [(#13057)](https://github.com/microsoft/vcpkg/pull/13057) [libusb] Add vcpkg-cmake-wrapper + +
+ +-- vcpkg team vcpkg@microsoft.com THU, 27 Aug 02:20:00 -0800 + +vcpkg (2020.04.20 - 2020.06.15) +--- +#### Total port count: 1402 +#### Total port count per triplet (tested): +|triplet|ports available| +|---|---| +|**x64-windows**|1282| +|**x64-osx**|1109| +|**x64-linux**|1181| +|x64-windows-static|1187| +|x86-windows|1261| +|x64-uwp|693| +|arm64-windows|903| +|arm-uwp|656| + +#### The following documentation has been updated: +- [Testing](docs/tool-maintainers/testing.md) + - [(#11007)](https://github.com/microsoft/vcpkg/pull/11007) [vcpkg] Fix Catch2 include path in documentation (by @horenmar) +- [Maintainer Guidelines and Policies](docs/maintainers/maintainer-guide.md) + - [(#8749)](https://github.com/microsoft/vcpkg/pull/8749) [vcpkg] Add new function vcpkg_copy_tools (by @myd7349) +- [Portfile helper functions](docs/maintainers/portfile-functions.md) + - [(#8749)](https://github.com/microsoft/vcpkg/pull/8749) [vcpkg] Add new function vcpkg_copy_tools (by @myd7349) + - [(#10505)](https://github.com/microsoft/vcpkg/pull/10505) [gn, crashpad] Add GN build support and crashpad port (by @myd7349) +- [vcpkg_clean_executables_in_bin](docs/maintainers/vcpkg_clean_executables_in_bin.md)***[NEW]*** + - [(#8749)](https://github.com/microsoft/vcpkg/pull/8749) [vcpkg] Add new function vcpkg_copy_tools (by @myd7349) +- [vcpkg_copy_tools](docs/maintainers/vcpkg_copy_tools.md)***[NEW]*** + - [(#8749)](https://github.com/microsoft/vcpkg/pull/8749) [vcpkg] Add new function vcpkg_copy_tools (by @myd7349) +- [vcpkg_build_gn](docs/maintainers/vcpkg_build_gn.md)***[NEW]*** + - [(#10505)](https://github.com/microsoft/vcpkg/pull/10505) [gn, crashpad] Add GN build support and crashpad port (by @vejmartin) +- [vcpkg_build_ninja](docs/maintainers/vcpkg_build_ninja.md)***[NEW]*** + - [(#10505)](https://github.com/microsoft/vcpkg/pull/10505) [gn, crashpad] Add GN build support and crashpad port (by @vejmartin) +- [vcpkg_configure_gn](docs/maintainers/vcpkg_configure_gn.md)***[NEW]*** + - [(#10505)](https://github.com/microsoft/vcpkg/pull/10505) [gn, crashpad] Add GN build support and crashpad port (by @vejmartin) +- [vcpkg_find_acquire_program](docs/maintainers/vcpkg_find_acquire_program.md) + - [(#10505)](https://github.com/microsoft/vcpkg/pull/10505) [gn, crashpad] Add GN build support and crashpad port (by @vejmartin) +- [vcpkg_install_gn](docs/maintainers/vcpkg_install_gn.md)***[NEW]*** + - [(#10505)](https://github.com/microsoft/vcpkg/pull/10505) [gn, crashpad] Add GN build support and crashpad port (by @vejmartin) +- [vcpkg and Android](docs/examples/vcpkg_android_example_cmake_script/cmake/vcpkg_android.cmake)***[NEW]*** + - [(#11264)](https://github.com/microsoft/vcpkg/pull/11264) Improve Android doc (triplets, usage with cmake and prefab) (by @pthom) +- [vcpkg telemetry and privacy](docs/about/privacy.md) + - [(#11542)](https://github.com/microsoft/vcpkg/pull/11542) [vcpkg metrics] Allow someone to opt out after build (by @strega-nil) +- [Manifests](docs/specifications/manifests.md)***[NEW]*** + - [(#11203)](https://github.com/microsoft/vcpkg/pull/11203) [vcpkg] RFC: Manifests (by @strega-nil) +- [CONTROL files](docs/maintainers/control-files.md) + - [(#11323)](https://github.com/microsoft/vcpkg/pull/11323) [vcpkg] add x86-wasm.cmake to community triplets (by @MoAlyousef) + - [(#11365)](https://github.com/microsoft/vcpkg/pull/11365) [vcpkg] [cudnn] [msmpi] [openmpi] Update VMSS (by @MoAlyousef) +- [Installing and Using Packagese Example: SQLite](docs/examples/installing-and-using-packages.md) + - [(#11763)](https://github.com/microsoft/vcpkg/pull/11763) docs: fix CMakeLists example for SQLite3 (by @disposedtrolley) + +#### The following changes have been made to the vcpkg tool and infrastructure: +- [(#10828)](https://github.com/microsoft/vcpkg/pull/10828) Onboard Windows PR tests to Azure Pipelines YAML and Scale Sets (by @BillyONeal) +- [(#10932)](https://github.com/microsoft/vcpkg/pull/10932) [vcpkg] Update git to 2.26.2 (by @Cheney-W) +- [(#10973)](https://github.com/microsoft/vcpkg/pull/10973) [vcpkg] Fix toolsrc CMake build error (by @NancyLi1013) +- [(#11009)](https://github.com/microsoft/vcpkg/pull/11009) Fix slack link to current, correct, location. (by @grafikrobot) +- [(#9861)](https://github.com/microsoft/vcpkg/pull/9861) [scripts] add new function vcpkg_fixup_pkgconfig (by @Neumann-A) +- [(#11064)](https://github.com/microsoft/vcpkg/pull/11064) [vcpkg] Copy macos pipelines into azure-pipelines.yml (by @BillyONeal) +- [(#10476)](https://github.com/microsoft/vcpkg/pull/10476) [vcpkg] Add support for VCPKG_BINARY_SOURCES and --x-binarysource=<> (by @ras0219-msft) +- [(#11068)](https://github.com/microsoft/vcpkg/pull/11068) [vcpkg] Small touchups for vcpkg unit tests (by @horenmar) +- [(#11085)](https://github.com/microsoft/vcpkg/pull/11085) [vcpkg] Correctly record default feature list in BinaryParagraphs. Fixes #10678. (by @ras0219-msft) +- [(#11090)](https://github.com/microsoft/vcpkg/pull/11090) [vcpkg] Bump macos build timeouts to 1 day (by @BillyONeal) +- [(#11091)](https://github.com/microsoft/vcpkg/pull/11091) [vcpkg baseline] Ignore mlpack on macOS (by @strega-nil) +- [(#11083)](https://github.com/microsoft/vcpkg/pull/11083) [vcpkg] Warn on unmatched removal with reasonable alternative (by @ras0219-msft) +- [(#11102)](https://github.com/microsoft/vcpkg/pull/11102) [vcpkg] fix undefined working dir in vcpkg_acquire_msys (by @Neumann-A) +- [(#11058)](https://github.com/microsoft/vcpkg/pull/11058) [msbuild]fix use UseEnv-True (by @Voskrese) +- [(#10980)](https://github.com/microsoft/vcpkg/pull/10980) [vcpkg] Onboard Linux to VMSS, open 'git' port, and switch back to Azure Spot (by @BillyONeal) +- [(#8749)](https://github.com/microsoft/vcpkg/pull/8749) [vcpkg] Add new function vcpkg_copy_tools (by @myd7349) +- [(#11166)](https://github.com/microsoft/vcpkg/pull/11166) [vcpkg] Add disk space report on Linux. (by @BillyONeal) +- [(#11170)](https://github.com/microsoft/vcpkg/pull/11170) [vcpkg] fix bug in Filesystem::absolute (by @strega-nil) +- [(#11175)](https://github.com/microsoft/vcpkg/pull/11175) [vcpkg] Point README.md to the correct status badge. (by @BillyONeal) +- [(#11171)](https://github.com/microsoft/vcpkg/pull/11171) [vcpkg] Add telemetry notice to `README.md`. (by @BillyONeal) +- [(#11189)](https://github.com/microsoft/vcpkg/pull/11189) [vcpkg] Add tombstone deletion scripts. (by @BillyONeal) +- [(#11105)](https://github.com/microsoft/vcpkg/pull/11105) [vcpkg/scripts] Fix ninja search path on windows and find binaries within vcpkg first (by @Neumann-A) +- [(#11202)](https://github.com/microsoft/vcpkg/pull/11202) [vcpkg] always pass VSCMD_SKIP_SENDTELEMETRY=1 (by @strega-nil) +- [(#8588)](https://github.com/microsoft/vcpkg/pull/8588) [vcpkg] Add x86 support for Linux toolchain (by @zhbanito) +- [(#11213)](https://github.com/microsoft/vcpkg/pull/11213) [vcpkg] Restrict telemetry uploads to TLS 1.2 (by @BillyONeal) +- [(#11234)](https://github.com/microsoft/vcpkg/pull/11234) [vcpkg] Don't build the metrics uploader when metrics are disabled. (by @BillyONeal) +- [(#11233)](https://github.com/microsoft/vcpkg/pull/11233) [vcpkg] Resolve relative overlay ports to the current working directory. (by @ras0219-msft) +- [(#10760)](https://github.com/microsoft/vcpkg/pull/10760) [vcpkg] Adding support for finding VS2019 by environment variable (by @Honeybunch) +- [(#11174)](https://github.com/microsoft/vcpkg/pull/11174) [vcpkg] [llvm] Bump Linux VM memory size and do all operations on the temporary disk. (by @BillyONeal) +- [(#11266)](https://github.com/microsoft/vcpkg/pull/11266) [vcpkg][android] Link C++ runtime according to VCPKG_CRT_LINKAGE (by @huangqinjin) +- [(#11260)](https://github.com/microsoft/vcpkg/pull/11260) [vcpkg] Update pull request template (by @PhoebeHui) +- [(#11302)](https://github.com/microsoft/vcpkg/pull/11302) [vcpkg] Resolve --overlay-ports is only working for relative parths since fix… (by @TobiasFunk) +- [(#11205)](https://github.com/microsoft/vcpkg/pull/11205) [vcpkg] Hopefully fix build on macOS 10.13/10.14 (by @strega-nil) +- [(#11093)](https://github.com/microsoft/vcpkg/pull/11093) [vcpkg] Fix nuget package import failed. (by @shihaonan369) +- [(#11239)](https://github.com/microsoft/vcpkg/pull/11239) [vcpkg] Turn on tests in CI. (by @BillyONeal) +- [(#11339)](https://github.com/microsoft/vcpkg/pull/11339) [vcpkg] Avoid naming Policheck sensitive term 'Virgin Islands' (by @BillyONeal) +- [(#11368)](https://github.com/microsoft/vcpkg/pull/11368) [vcpkg] Do not build the metrics uploader with MSBuild when metrics are disabled (by @rickertm) +- [(#11315)](https://github.com/microsoft/vcpkg/pull/11315) [vcpkg] Harden expand environment strings path with explicit integer overflow checks and resistance to CP_ACP. (by @BillyONeal) +- [(#11450)](https://github.com/microsoft/vcpkg/pull/11450) [vcpkg CI] Clean git directory before clone (by @strega-nil) +- [(#11432)](https://github.com/microsoft/vcpkg/pull/11432) [vcpkg] Harden file removals and clean directory contents in "CI" inside vcpkg itself. (by @BillyONeal) +- [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 (by @JackBoosY) +- [(#11433)](https://github.com/microsoft/vcpkg/pull/11433) [vcpkg] Optimize string split slightly. (by @BillyONeal) +- [(#11299)](https://github.com/microsoft/vcpkg/pull/11299) [vcpkg] pass -disableMetrics to bootstrap on git bash (by @strega-nil) +- [(#11453)](https://github.com/microsoft/vcpkg/pull/11453) Fix CMake PATH that fails Windows tests. (by @BillyONeal) +- [(#11343)](https://github.com/microsoft/vcpkg/pull/11343) [vcpkg] fix extern C around ctermid (by @strega-nil) +- [(#11380)](https://github.com/microsoft/vcpkg/pull/11380) [tool-meson] Update to 0.54.2 (by @c72578) +- [(#11057)](https://github.com/microsoft/vcpkg/pull/11057) [Vcpkg] Fix macOS applocal.py dependency bundling error (by @kevinhartman) +- [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds (by @Neumann-A) +- [(#11431)](https://github.com/microsoft/vcpkg/pull/11431) [vcpkg] Add static triplet for arm64-windows (by @orudge) +- [(#11466)](https://github.com/microsoft/vcpkg/pull/11466) [vcpkg] Fix cmake architecture detection on windows with ninja generator (by @Chronial) +- [(#11512)](https://github.com/microsoft/vcpkg/pull/11512) [vcpkg] Remove powershell from the 'run vcpkg ci' path to reduce hangs from msys components. (by @BillyONeal) +- [(#11443)](https://github.com/microsoft/vcpkg/pull/11443) [vcpkg-acquire-msys] Update pacman before any other package. (by @emptyVoid) +- [(#11496)](https://github.com/microsoft/vcpkg/pull/11496) [Baseline] Fix boost-*:arm-uwp failure and resolve conflicts in CI (by @PhoebeHui) +- [(#11559)](https://github.com/microsoft/vcpkg/pull/11559) [VCPKG baseline] Fix many ports (by @JackBoosY) +- [(#11545)](https://github.com/microsoft/vcpkg/pull/11545) [vcpkg] Move CI cleaning back out of the 'ci' command into a separate command to restore cross-compilation preinstalls. (by @BillyONeal) +- [(#11612)](https://github.com/microsoft/vcpkg/pull/11612) [vcpkg baseline] Fix baseline failures (by @PhoebeHui) +- [(#11542)](https://github.com/microsoft/vcpkg/pull/11542) [vcpkg metrics] Allow someone to opt out after build (by @strega-nil) +- [(#11653)](https://github.com/microsoft/vcpkg/pull/11653) [vcpkg] Rename the msbuild property VcpkgRoot (by @BillyONeal) +- [(#11629)](https://github.com/microsoft/vcpkg/pull/11629) [vcpkg] Use a crypto RNG to generate admin passwords (by @BillyONeal) +- [(#11697)](https://github.com/microsoft/vcpkg/pull/11697) [vcpkg baseline] fix libb2:x64-osx (by @strega-nil) +- [(#11668)](https://github.com/microsoft/vcpkg/pull/11668) [CI|python3] add setuptools (by @Neumann-A) +- [(#11613)](https://github.com/microsoft/vcpkg/pull/11613) [vcpkg-baseline][unixodbc/nanodbc] Fix unixodbc build failure and set it as a dependency on nanodbc (by @JackBoosY) +- [(#11692)](https://github.com/microsoft/vcpkg/pull/11692) [vcpkg baseline] Remove passing port from Ci baseline (by @PhoebeHui) +- [(#11323)](https://github.com/microsoft/vcpkg/pull/11323) [vcpkg] add x86-wasm.cmake to community triplets (by @MoAlyousef) +- [(#11647)](https://github.com/microsoft/vcpkg/pull/11647) [vcpkg baseline][libfabric] Only support dynamic build (by @JackBoosY) +- [(#11483)](https://github.com/microsoft/vcpkg/pull/11483) [vcpkg] Allow CI to pass in all relevant directories and remove use of symbolic links (by @BillyONeal) +- [(#11764)](https://github.com/microsoft/vcpkg/pull/11764) [vcpkg] Add directories to x-ci-clean lost in merge conflict resolution. (by @BillyONeal) +- [(#11742)](https://github.com/microsoft/vcpkg/pull/11742) [vcpkg-baseline][manyport] Fix baseline error (by @JackBoosY) +- [(#11779)](https://github.com/microsoft/vcpkg/pull/11779) [vcpkg] Provide $(VcpkgRoot) and $(VcpkgCurrentInstalledDir) for customers. (by @BillyONeal) +- [(#11750)](https://github.com/microsoft/vcpkg/pull/11750) [vcpkg README] Add #include channel (by @strega-nil) +- [(#11693)](https://github.com/microsoft/vcpkg/pull/11693) [CI|gfortran] Install gfortran for OSX and Linux CI (by @Neumann-A) +- [(#11839)](https://github.com/microsoft/vcpkg/pull/11839) [vcpkg] Fix OSX CI by ensuring the downloads directory exists (by @BillyONeal +- [(#11810)](https://github.com/microsoft/vcpkg/pull/11810) [vcpkg-acquire-msys] Improvement (by @emptyVoid) +- [(#11365)](https://github.com/microsoft/vcpkg/pull/11365) [vcpkg] [cudnn] [msmpi] [openmpi] Update VMSS (by @BillyONeal) +- [(#11146)](https://github.com/microsoft/vcpkg/pull/11146) [vcpkg] Add nologo to windows toolchain (by @Neumann-A) +- [(#11891)](https://github.com/microsoft/vcpkg/pull/11891) [vcpkg] Fix bootstrap on VS2015 (by @BillyONeal) +- [(#11858)](https://github.com/microsoft/vcpkg/pull/11858) [vcpkg] Merge unit test pass into x86-windows. (by @BillyONeal) +- [(#11896)](https://github.com/microsoft/vcpkg/pull/11896) [vcpkg baseline] Fix baseline error (by @JackBoosY) +- [(#4361)](https://github.com/microsoft/vcpkg/pull/4361) Adds vcpkg item to project settings in Visual Studio (by @Neumann-A) +- [(#11958)](https://github.com/microsoft/vcpkg/pull/11958) Delete g_binary_caching global that should be passed as a parameter. (by @BillyONeal) + +
+The following 79 ports have been added: + +|port|version| +|---|---| +|[ryml](https://github.com/microsoft/vcpkg/pull/10793)| 2020-04-12 +|[qt5-androidextras](https://github.com/microsoft/vcpkg/pull/10644)[#11026](https://github.com/microsoft/vcpkg/pull/11026) | 5.12.8 +|[qt5-canvas3d](https://github.com/microsoft/vcpkg/pull/10644)[#11026](https://github.com/microsoft/vcpkg/pull/11026) | 5.12.8 +|[qt5-doc](https://github.com/microsoft/vcpkg/pull/10644)[#11026](https://github.com/microsoft/vcpkg/pull/11026) | 5.12.8 +|[qt5-serialbus](https://github.com/microsoft/vcpkg/pull/10644)[#11026](https://github.com/microsoft/vcpkg/pull/11026) | 5.12.8 +|[qt5-translations](https://github.com/microsoft/vcpkg/pull/10644)[#11026](https://github.com/microsoft/vcpkg/pull/11026) | 5.12.8 +|[qt5-wayland](https://github.com/microsoft/vcpkg/pull/10644)[#11026](https://github.com/microsoft/vcpkg/pull/11026) | 5.12.8 +|[qt5-webengine](https://github.com/microsoft/vcpkg/pull/10644)[#11026](https://github.com/microsoft/vcpkg/pull/11026) [#11120](https://github.com/microsoft/vcpkg/pull/11120) [#11653](https://github.com/microsoft/vcpkg/pull/11653) | 5.12.8 +|[qt5-webglplugin](https://github.com/microsoft/vcpkg/pull/10644)[#11026](https://github.com/microsoft/vcpkg/pull/11026) | 5.12.8 +|[qt5-x11extras](https://github.com/microsoft/vcpkg/pull/10644)[#11026](https://github.com/microsoft/vcpkg/pull/11026) | 5.12.8 +|[iniparser](https://github.com/microsoft/vcpkg/pull/10710)| 2020-04-06 +|[quill](https://github.com/microsoft/vcpkg/pull/10902)[#11326](https://github.com/microsoft/vcpkg/pull/11326) | 1.3.1 +|[frozen](https://github.com/microsoft/vcpkg/pull/10766)| 1.0.0 +|[cppcoro](https://github.com/microsoft/vcpkg/pull/10693)| 2020-2-28-1 +|[libtomcrypt](https://github.com/microsoft/vcpkg/pull/10960)| 1.18.2-1 +|[libtommath](https://github.com/microsoft/vcpkg/pull/10960)| 1.2.0-1 +|[pe-parse](https://github.com/microsoft/vcpkg/pull/11012)| 1.2.0 +|[opencc](https://github.com/microsoft/vcpkg/pull/8474)[#10767](https://github.com/microsoft/vcpkg/pull/10767) [#11559](https://github.com/microsoft/vcpkg/pull/11559) [#11612](https://github.com/microsoft/vcpkg/pull/11612) | 2020-04-26-4 +|[uchardet](https://github.com/microsoft/vcpkg/pull/8477)| 2020-04-26 +|[libqcow](https://github.com/microsoft/vcpkg/pull/11036)[#11238](https://github.com/microsoft/vcpkg/pull/11238) | 20191221-1 +|[mstch](https://github.com/microsoft/vcpkg/pull/11020)| 1.0.2-2 +|[nowide](https://github.com/microsoft/vcpkg/pull/11066)[#11732](https://github.com/microsoft/vcpkg/pull/11732) [#11859](https://github.com/microsoft/vcpkg/pull/11859) | alias +|[discord-game-sdk](https://github.com/microsoft/vcpkg/pull/10763)[#11728](https://github.com/microsoft/vcpkg/pull/11728) | 2.5.6-1 +|[libmpeg2](https://github.com/microsoft/vcpkg/pull/8871)| 0.5.1 +|[opencv2](https://github.com/microsoft/vcpkg/pull/7849)[#11201](https://github.com/microsoft/vcpkg/pull/11201) | 2.4.13.7-1 +|[rtlsdr](https://github.com/microsoft/vcpkg/pull/10901)[#11575](https://github.com/microsoft/vcpkg/pull/11575) | 2020-04-16-1 +|[gasol](https://github.com/microsoft/vcpkg/pull/9550)| 2018-01-04 +|[coin](https://github.com/microsoft/vcpkg/pull/9880)| 4.0.0 +|[simage](https://github.com/microsoft/vcpkg/pull/9880)| 1.8.0 +|[soqt](https://github.com/microsoft/vcpkg/pull/9880)| 1.6.0 +|[gmp](https://github.com/microsoft/vcpkg/pull/10613)[#11565](https://github.com/microsoft/vcpkg/pull/11565) | 6.2.0-1 +|[nettle](https://github.com/microsoft/vcpkg/pull/10613)[#11565](https://github.com/microsoft/vcpkg/pull/11565) | 3.5.1-1 +|[vs-yasm](https://github.com/microsoft/vcpkg/pull/10613)| 0.5.0 +|[uthenticode](https://github.com/microsoft/vcpkg/pull/11199)[#11256](https://github.com/microsoft/vcpkg/pull/11256) [#11362](https://github.com/microsoft/vcpkg/pull/11362) | 1.0.4 +|[bitserializer-pugixml](https://github.com/microsoft/vcpkg/pull/11241)[#11683](https://github.com/microsoft/vcpkg/pull/11683) | alias +|[ignition-math6](https://github.com/microsoft/vcpkg/pull/11232)| 6.4.0 +|[vtk-m](https://github.com/microsoft/vcpkg/pull/11148)| 1.5.0 +|[crashpad](https://github.com/microsoft/vcpkg/pull/10505)| 2020-03-18 +|[bitserializer-rapidyaml](https://github.com/microsoft/vcpkg/pull/11242)[#11683](https://github.com/microsoft/vcpkg/pull/11683) | alias +|[ignition-msgs5](https://github.com/microsoft/vcpkg/pull/11272)[#11397](https://github.com/microsoft/vcpkg/pull/11397) | 5.1.0 +|[ignition-transport8](https://github.com/microsoft/vcpkg/pull/11272)| 8.0.0 +|[sdformat9](https://github.com/microsoft/vcpkg/pull/11265)[#11742](https://github.com/microsoft/vcpkg/pull/11742) | 9.2.0-1 +|[kissfft](https://github.com/microsoft/vcpkg/pull/9237)| 2020-03-30 +|[jaeger-client-cpp](https://github.com/microsoft/vcpkg/pull/9126)[#11583](https://github.com/microsoft/vcpkg/pull/11583) | 0.5.1-1 +|[libmediainfo](https://github.com/microsoft/vcpkg/pull/7005)| 20.03 +|[h5py-lzf](https://github.com/microsoft/vcpkg/pull/10871)| 2019-12-04 +|[microsoft-signalr](https://github.com/microsoft/vcpkg/pull/10833)[#11496](https://github.com/microsoft/vcpkg/pull/11496) | 0.1.0-alpha1-1 +|[oatpp-consul](https://github.com/microsoft/vcpkg/pull/9402)| 1.0.0 +|[oatpp-curl](https://github.com/microsoft/vcpkg/pull/9402)| 1.0.0 +|[oatpp-libressl](https://github.com/microsoft/vcpkg/pull/9402)| 1.0.0 +|[oatpp-mbedtls](https://github.com/microsoft/vcpkg/pull/9402)| 1.0.0 +|[oatpp-swagger](https://github.com/microsoft/vcpkg/pull/9402)| 1.0.0 +|[oatpp-websocket](https://github.com/microsoft/vcpkg/pull/9402)| 1.0.0 +|[oatpp](https://github.com/microsoft/vcpkg/pull/9402)| 1.0.0 +|[gperftools](https://github.com/microsoft/vcpkg/pull/8750)| 2019-09-02 +|[libvmdk](https://github.com/microsoft/vcpkg/pull/11010)| 2019-12-21 +|[ctp](https://github.com/microsoft/vcpkg/pull/10717)| 6.3.15_20190220_se +|[munit](https://github.com/microsoft/vcpkg/pull/6780)| 2019-04-06 +|[mmloader](https://github.com/microsoft/vcpkg/pull/11381)| 2020-05-15 +|[absent](https://github.com/microsoft/vcpkg/pull/11447)| 0.3.0 +|[ocilib](https://github.com/microsoft/vcpkg/pull/11549)[#11646](https://github.com/microsoft/vcpkg/pull/11646) | 4.6.4-1 +|[tinyply](https://github.com/microsoft/vcpkg/pull/11534)| 2020-05-22 +|[symengine](https://github.com/microsoft/vcpkg/pull/8752)| 2020-05-25 +|[nanoprintf](https://github.com/microsoft/vcpkg/pull/11605)| 2020-05-27 +|[wavelib](https://github.com/microsoft/vcpkg/pull/11611)| 2020-05-29 +|[refl-cpp](https://github.com/microsoft/vcpkg/pull/11622)| 0.9.1 +|[trantor](https://github.com/microsoft/vcpkg/pull/11533)| v1.0.0-rc13 +|[sockpp](https://github.com/microsoft/vcpkg/pull/11562)| 0.7 +|[protozero](https://github.com/microsoft/vcpkg/pull/11652)| 1.6.8 +|[p-ranav-csv2](https://github.com/microsoft/vcpkg/pull/11725)| 2020-06-02 +|[cr](https://github.com/microsoft/vcpkg/pull/11841)| 2020-04-26 +|[json-schema-validator](https://github.com/microsoft/vcpkg/pull/11599)| 2.1.0 +|[log4cxx](https://github.com/microsoft/vcpkg/pull/11659)| 0.10.0-2 +|[xbyak](https://github.com/microsoft/vcpkg/pull/11689)| 5.911 +|[licensepp](https://github.com/microsoft/vcpkg/pull/11711)| 2020-05-19 +|[v-hacd](https://github.com/microsoft/vcpkg/pull/11606)| 3.2.0 +|[libosmium](https://github.com/microsoft/vcpkg/pull/11863)| 2.15.5 +|[gzip-hpp](https://github.com/microsoft/vcpkg/pull/11735)| 0.1.0 +|[infoware](https://github.com/microsoft/vcpkg/pull/11410)| 0.5.3 +
+ +
+The following 375 ports have been updated: + +- otl `4.0.451` -> `4.0.455` + - [(#10922)](https://github.com/microsoft/vcpkg/pull/10922) [vcpkg baseline] Update hash for otl + - [(#11300)](https://github.com/microsoft/vcpkg/pull/11300) [otl] Update to 4.0.455 + +- vtk `8.2.0-12` -> `9.0-2` + - [(#10925)](https://github.com/microsoft/vcpkg/pull/10925) [VTK] Check if VTKTarget files exist + - [(#11148)](https://github.com/microsoft/vcpkg/pull/11148) [VTK/vtk-m] Update VTK to 9.0 and add vtk-m + - [(#11643)](https://github.com/microsoft/vcpkg/pull/11643) [vtk] Fix single configuration builds + - [(#11708)](https://github.com/microsoft/vcpkg/pull/11708) [python3] Update to Python 3.8 + +- winreg `1.2.1-1` -> `3.1.0` + - [(#10926)](https://github.com/microsoft/vcpkg/pull/10926) [winreg] Update to 2.2.0 + - [(#10976)](https://github.com/microsoft/vcpkg/pull/10976) [WinReg] update to v2.2.2 + - [(#11034)](https://github.com/microsoft/vcpkg/pull/11034) [winreg] Update to 2.2.3 + - [(#11766)](https://github.com/microsoft/vcpkg/pull/11766) [winreg] Update to 2.4.0 + - [(#11883)](https://github.com/microsoft/vcpkg/pull/11883) [WinReg] Update to 3.0.1 + - [(#11888)](https://github.com/microsoft/vcpkg/pull/11888) [WinReg] Update to 3.1.0 + +- libyaml `0.2.2-2` -> `0.2.2-3` + - [(#10908)](https://github.com/microsoft/vcpkg/pull/10908) [libyaml] Fix linkage in non-Windows systems + +- libzippp `2019-07-22` -> `3.1-1.6.1` + - [(#10893)](https://github.com/microsoft/vcpkg/pull/10893) [libzippp] Update to libzippp-v3.1-1.6.1 + +- blend2d `beta_2020-04-15` -> `beta_2020-06-01` + - [(#10891)](https://github.com/microsoft/vcpkg/pull/10891) [blend2d] Update to beta_2020-04-19 + - [(#11155)](https://github.com/microsoft/vcpkg/pull/11155) [blend2d] Update to beta_2020-05-04 + - [(#11778)](https://github.com/microsoft/vcpkg/pull/11778) [blend2d] Update to beta_2020-06-01 + +- pegtl `3.0.0-pre-9d58962` -> `3.0.0-pre-83b6cdc` + - [(#10870)](https://github.com/microsoft/vcpkg/pull/10870) [pegtl] Update to latest commit from 4/5/2020 + - [(#11148)](https://github.com/microsoft/vcpkg/pull/11148) [VTK/vtk-m] Update VTK to 9.0 and add vtk-m + - [(#11531)](https://github.com/microsoft/vcpkg/pull/11531) [pegtl/cppgraphqlgen] matching updates for dependency + +- skyr-url `1.5.1` -> `1.9.0` + - [(#10868)](https://github.com/microsoft/vcpkg/pull/10868) [skyr-url] Bump version to 1.7.0 + - [(#10954)](https://github.com/microsoft/vcpkg/pull/10954) [skyr-url] Updated port to use version 1.7.3 + - [(#11153)](https://github.com/microsoft/vcpkg/pull/11153) [skyr-url] Changed skyr-url version number to 1.7.5 + - [(#11568)](https://github.com/microsoft/vcpkg/pull/11568) [skyr-url] Changed version number to 1.9.0 + - [(#11774)](https://github.com/microsoft/vcpkg/pull/11774) [skyr-url] Changed version number for skyr-url + +- protobuf `3.11.3` -> `3.12.0-2` + - [(#10863)](https://github.com/microsoft/vcpkg/pull/10863) [protobuf] Update to 3.11.4 + - [(#11228)](https://github.com/microsoft/vcpkg/pull/11228) [protobuf] Correct protobuf under android (Fix issue #8218) + - [(#11397)](https://github.com/microsoft/vcpkg/pull/11397) [protobuf] protobuf v3.12.0 + - [(#11504)](https://github.com/microsoft/vcpkg/pull/11504) [protobuf] Fix RPATH error for static build + - [(#11516)](https://github.com/microsoft/vcpkg/pull/11516) [protobuf] Don't redefine PROTOBUF_USE_DLLS + +- sdformat6 `6.2.0` -> `6.2.0-1` + - [(#10859)](https://github.com/microsoft/vcpkg/pull/10859) [sdformat6] Migrate from Bitbucket to GitHub 🤖 + +- ompl `1.4.2-2` -> `1.4.2-4` + - [(#10854)](https://github.com/microsoft/vcpkg/pull/10854) [ompl] Fix ompl[app] build error + - [(#10972)](https://github.com/microsoft/vcpkg/pull/10972) [ompl] Fix patch apply error + +- dlib `19.17-1` -> `19.19-1` + - [(#10826)](https://github.com/microsoft/vcpkg/pull/10826) [dlib] Updated dlib to v19.19 + - [(#11195)](https://github.com/microsoft/vcpkg/pull/11195) [dlib] add more granularity in features + +- arrow `0.17.0` -> `0.17.1` + - [(#10800)](https://github.com/microsoft/vcpkg/pull/10800) [Arrow] Explicitly enable CSV and JSON + - [(#11016)](https://github.com/microsoft/vcpkg/pull/11016) [Arrow] Add filesystem feature + - [(#11472)](https://github.com/microsoft/vcpkg/pull/11472) [Arrow] Update to 0.17.1 + +- ace `6.5.8` -> `6.5.9-5` + - [(#10984)](https://github.com/microsoft/vcpkg/pull/10984) [ace] Add support for MacOSX + - [(#11112)](https://github.com/microsoft/vcpkg/pull/11112) [ace] Update to 6.5.9 + - [(#11369)](https://github.com/microsoft/vcpkg/pull/11369) [ace] Add patch to fix Visual Studio 2019 16.5 internal compiler error + - [(#11441)](https://github.com/microsoft/vcpkg/pull/11441) [ace] Add support for uwp + - [(#11464)](https://github.com/microsoft/vcpkg/pull/11464) [ace] Simplified port file + - [(#11713)](https://github.com/microsoft/vcpkg/pull/11713) [ace] Fix missing cpp files + - [(#11473)](https://github.com/microsoft/vcpkg/pull/11473) [ace] tao as feature + +- libaaplus `2.12` -> `2.12-1` + - [(#10981)](https://github.com/microsoft/vcpkg/pull/10981) [libaaplus] Use versioned download link + +- spscqueue `2019-07-26` -> `1.0` + - [(#10874)](https://github.com/microsoft/vcpkg/pull/10874) [spscqueue] Update to version 1.0 + +- googleapis `0.8.0` -> `alias` + - [(#10994)](https://github.com/microsoft/vcpkg/pull/10994) [googleapis] update to v0.9.0 + - [(#11698)](https://github.com/microsoft/vcpkg/pull/11698) [google-cloud-cpp] Consolidate all google-cloud* packages + +- ms-gsl `3.0.0` -> `3.0.1` + - [(#10993)](https://github.com/microsoft/vcpkg/pull/10993) [ms-gsl] Update to 3.0.1 + +- ryu `2.0-1` -> `2.0-2` + - [(#10989)](https://github.com/microsoft/vcpkg/pull/10989) [ryu]Ryu include fix + +- glm `0.9.9.7` -> `0.9.9.8` + - [(#10977)](https://github.com/microsoft/vcpkg/pull/10977) [glm, sqlitecpp] update to new version + +- sqlitecpp `2.3.0-1` -> `3.0.0` + - [(#10977)](https://github.com/microsoft/vcpkg/pull/10977) [glm, sqlitecpp] update to new version + +- nngpp `1.2.4` -> `1.3.0` + - [(#10975)](https://github.com/microsoft/vcpkg/pull/10975) [nngpp] Update to 1.3.0 + +- libvpx `1.8.1-1` -> `1.8.1-5` + - [(#10952)](https://github.com/microsoft/vcpkg/pull/10952) [libvpx][mpg123] Fix use of YASM in MSBuild (via path) + - [(#11058)](https://github.com/microsoft/vcpkg/pull/11058) [msbuild]fix use UseEnv-True + - [(#11022)](https://github.com/microsoft/vcpkg/pull/11022) [libvpx] Added support for build on MacOS and Linux + - [(#11500)](https://github.com/microsoft/vcpkg/pull/11500) [libvpx] Change default target on Unix + - [(#11795)](https://github.com/microsoft/vcpkg/pull/11795) [libvpx] Add cmake config file + +- mpg123 `1.25.8-6` -> `1.25.8-9` + - [(#10952)](https://github.com/microsoft/vcpkg/pull/10952) [libvpx][mpg123] Fix use of YASM in MSBuild (via path) + - [(#11058)](https://github.com/microsoft/vcpkg/pull/11058) [msbuild]fix use UseEnv-True + - [(#11287)](https://github.com/microsoft/vcpkg/pull/11287) [mpg123] Enable UWP support + - [(#11896)](https://github.com/microsoft/vcpkg/pull/11896) [vcpkg baseline] Fix baseline error + +- qt5-3d `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-activeqt `5.12.5-1` -> `5.12.8-1` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + - [(#11045)](https://github.com/microsoft/vcpkg/pull/11045) [qt5] reactivate qt5-activeqt for CI coverage + +- qt5-base `5.12.5-13` -> `5.12.8-4` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + - [(#11111)](https://github.com/microsoft/vcpkg/pull/11111) [qt5] Add -j to make to parallelize on Linux and MacOS + - [(#11371)](https://github.com/microsoft/vcpkg/pull/11371) [qt5-base] Add Xorg dependency libx11-xcb-dev + - [(#11416)](https://github.com/microsoft/vcpkg/pull/11416) [harfbuzz,skia] Update and replace Skia dependencies with vcpkg + - [(#11483)](https://github.com/microsoft/vcpkg/pull/11483) [vcpkg] Allow CI to pass in all relevant directories and remove use of symbolic links + +- qt5-charts `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-connectivity `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-datavis3d `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-declarative `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-gamepad `5.12.5-2` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-graphicaleffects `5.12.5-2` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-imageformats `5.12.5-3` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-location `5.12.5-2` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-macextras `5.12.5` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-mqtt `5.12.5` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-multimedia `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-networkauth `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-purchasing `5.12.5-2` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-quickcontrols `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-quickcontrols2 `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-remoteobjects `5.12.5-2` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-script `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-scxml `5.12.5` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-sensors `5.12.5-2` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-serialport `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-speech `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-svg `5.12.5` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-tools `5.12.5-5` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-virtualkeyboard `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-webchannel `5.12.5-2` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-websockets `5.12.5` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-webview `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-winextras `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5-xmlpatterns `5.12.5-1` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- qt5 `5.12.5` -> `5.12.8` + - [(#10644)](https://github.com/microsoft/vcpkg/pull/10644) [Qt[latest]] Update to 5.14.2 + - [(#10749)](https://github.com/microsoft/vcpkg/pull/10749) [Qt5] Update qt to 5.12.8 + +- libzip `rel-1-5-2--1` -> `rel-1-6-1` + - [(#10784)](https://github.com/microsoft/vcpkg/pull/10784) [libzip] update to rel-1-6-1 + +- nng `1.2.5` -> `1.3.0` + - [(#10974)](https://github.com/microsoft/vcpkg/pull/10974) [nng] Update to 1.3.0 + +- libmupdf `1.16.1` -> `1.16.1-1` + - [(#10708)](https://github.com/microsoft/vcpkg/pull/10708) [libmupdf] fix build error on Linux + +- catch2 `2.11.3` -> `2.12.1` + - [(#10996)](https://github.com/microsoft/vcpkg/pull/10996) [catch2] Update to 2.12.1 + +- websocketpp `0.8.1-1` -> `0.8.2` + - [(#10969)](https://github.com/microsoft/vcpkg/pull/10969) [websocketpp] Update to 0.8.2 + +- coroutine `2020-01-13` -> `1.5.0` + - [(#10692)](https://github.com/microsoft/vcpkg/pull/10692) [coroutine] update to 1.5.0 + +- boost-modular-build-helper `1.72.0-1` -> `1.73.0-1` + - [(#10285)](https://github.com/microsoft/vcpkg/pull/10285) [boost-modular-build-helper] Support Clang '--target=' syntax to enable Android builds + - [(#10814)](https://github.com/microsoft/vcpkg/pull/10814) [boost-modular-build] Fix lack of arm64-linux support + - [(#11427)](https://github.com/microsoft/vcpkg/pull/11427) [boost] MinGW build fixes + +- openssl-unix `1.1.1d-2` -> `1.1.1d-4` + - [(#10450)](https://github.com/microsoft/vcpkg/pull/10450) [openssl-unix] Update header path for shared library compilation + - [(#11344)](https://github.com/microsoft/vcpkg/pull/11344) [openssl-unix] Fix openssl-unix android build + +- sdl2-gfx `1.0.4-5` -> `1.0.4-6` + - [(#10575)](https://github.com/microsoft/vcpkg/pull/10575) [sdl2-gfx] Fix build error on non windows + +- hwloc `1.11.7-3` -> `1.11.7-4` + - [(#10615)](https://github.com/microsoft/vcpkg/pull/10615) [hwloc] Support UNIX + +- pixel `0.3` -> `0.3-1` + - [(#10638)](https://github.com/microsoft/vcpkg/pull/10638) [pixel] Add warning message on Linux + +- qt-advanced-docking-system `2019-08-14-1` -> `3.2.5-1` + - [(#10170)](https://github.com/microsoft/vcpkg/pull/10170) [qt-advanced-docking-system] updated qt-advanced-docking-system to 3.2.1 + - [(#10980)](https://github.com/microsoft/vcpkg/pull/10980) [vcpkg] Onboard Linux to VMSS, open 'git' port, and switch back to Azure Spot + +- libarchive `3.4.1-1` -> `3.4.1-3` + - [(#11044)](https://github.com/microsoft/vcpkg/pull/11044) [libarchive] expose zstd as a build feature + - [(#11570)](https://github.com/microsoft/vcpkg/pull/11570) [libarchive] Disable C4061 which causes build to fail in Visual Studio 2019 16.6 + +- azure-kinect-sensor-sdk `1.4.0-alpha.0-2` -> `1.4.0-alpha.0-5` + - [(#11033)](https://github.com/microsoft/vcpkg/pull/11033) [azure-kinect-sensor-sdk] Fix pipeline error + - [(#10253)](https://github.com/microsoft/vcpkg/pull/10253) [imgui] Add feature bindings and remove feature example + - [(#11116)](https://github.com/microsoft/vcpkg/pull/11116) [azure-kinect-sensor-sdk] Disable parallel configure due to source directory writes + - [(#11139)](https://github.com/microsoft/vcpkg/pull/11139) [azure-kinect-sensor-sdk] Fix Deploy Azure Kinect Sensor SDK on Windows + +- range-v3 `0.10.0` -> `0.10.0-20200425` + - [(#11031)](https://github.com/microsoft/vcpkg/pull/11031) [range-v3] Update to new version. + +- ode `0.16` -> `0.16.1` + - [(#11029)](https://github.com/microsoft/vcpkg/pull/11029) [ode] Bump version to 0.16.1 + +- boost-coroutine `1.72.0` -> `1.73.0` + - [(#10988)](https://github.com/microsoft/vcpkg/pull/10988) [boost-coroutine] Add patch from boost.org + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- libtorrent `1.2.2-1` -> `1.2.7` + - [(#10686)](https://github.com/microsoft/vcpkg/pull/10686) [libtorrent] Update to 1.2.6 and add features + - [(#11257)](https://github.com/microsoft/vcpkg/pull/11257) [libtorrent] add iconv feature on windows and clean up portfile + - [(#11389)](https://github.com/microsoft/vcpkg/pull/11389) [libtorrent] minor portfile simplification and version bump + - [(#11709)](https://github.com/microsoft/vcpkg/pull/11709) [libtorrent] Update to 1.2.7 + +- geos `3.6.3-3` -> `3.6.4` + - [(#10377)](https://github.com/microsoft/vcpkg/pull/10377) [geos] Upgrade to GEOS 3.6.4 + +- egl-registry `2020-02-03` -> `2020-02-20` + - [(#10676)](https://github.com/microsoft/vcpkg/pull/10676) [egl-registry, opengl-registry] Update egl-registry to 2020-02-20 and opengl-registry to 2020-03-25 + +- opengl-registry `2020-02-03` -> `2020-03-25` + - [(#10676)](https://github.com/microsoft/vcpkg/pull/10676) [egl-registry, opengl-registry] Update egl-registry to 2020-02-20 and opengl-registry to 2020-03-25 + +- murmurhash `2016-01-09` -> `2016-01-09-3` + - [(#11011)](https://github.com/microsoft/vcpkg/pull/11011) [murmurhash] installation fix + - [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 + +- gts `0.7.6-1` -> `0.7.6-3` + - [(#10055)](https://github.com/microsoft/vcpkg/pull/10055) [gts] Support for build with cmake in unix + - [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 + - [(#11884)](https://github.com/microsoft/vcpkg/pull/11884) [glib/gts] Add pkgconfig files + +- icu `65.1-3` -> `67.1` + - [(#10656)](https://github.com/microsoft/vcpkg/pull/10656) [icu] Fix configure failure due to not finding python + - [(#11714)](https://github.com/microsoft/vcpkg/pull/11714) [icu] Update to 67.1 + +- ffmpeg `4.2-7` -> `4.2-9` + - [(#8797)](https://github.com/microsoft/vcpkg/pull/8797) [ffmpeg] Fix ffmpeg[opencl, openssl, lzma] static build failed + - [(#11443)](https://github.com/microsoft/vcpkg/pull/11443) [vcpkg-acquire-msys] Update pacman before any other package. + - [(#11810)](https://github.com/microsoft/vcpkg/pull/11810) [vcpkg-acquire-msys] Improvement + +- liblzma `5.2.4-4` -> `5.2.4-5` + - [(#8797)](https://github.com/microsoft/vcpkg/pull/8797) [ffmpeg] Fix ffmpeg[opencl, openssl, lzma] static build failed + +- cpprestsdk `2.10.15-1` -> `2.10.16-2` + - [(#11018)](https://github.com/microsoft/vcpkg/pull/11018) [cpprestsdk] Update to v2.10.16 + - [(#11694)](https://github.com/microsoft/vcpkg/pull/11694) [cpprestsdk] Avoid using pkg-config to find OpenSSL libraries on Linux + - [(#11867)](https://github.com/microsoft/vcpkg/pull/11867) [cpprestsdk] Fix find dependency openssl + +- harfbuzz `2.5.3` -> `2.6.6` + - [(#11082)](https://github.com/microsoft/vcpkg/pull/11082) [harfbuzz] Change build depends from freetype to freetype[core] + - [(#11416)](https://github.com/microsoft/vcpkg/pull/11416) [harfbuzz,skia] Update and replace Skia dependencies with vcpkg + +- pcl `1.9.1-11` -> `1.9.1-13` + - [(#11047)](https://github.com/microsoft/vcpkg/pull/11047) [pcl] Fix link to libpng + - [(#11148)](https://github.com/microsoft/vcpkg/pull/11148) [VTK/vtk-m] Update VTK to 9.0 and add vtk-m + +- armadillo `2019-04-16-6` -> `2019-04-16-8` + - [(#11063)](https://github.com/microsoft/vcpkg/pull/11063) [armadillo] Add dependent port superlu on osx + +- abseil `2020-03-03-3` -> `2020-03-03-6` + - [(#11039)](https://github.com/microsoft/vcpkg/pull/11039) [abseil] Configure abseil to use std:: types when feature cxx17 is enabled + - [(#11630)](https://github.com/microsoft/vcpkg/pull/11630) [abseil] Fix arm build + - [(#11827)](https://github.com/microsoft/vcpkg/pull/11827) [abseil] Enable dynamic build on Windows + +- metrohash `1.1.3` -> `1.1.3-1` + - [(#10992)](https://github.com/microsoft/vcpkg/pull/10992) [metrohash] installation fix + - [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 + +- nana `1.7.2-1` -> `1.7.2-3` + - [(#10936)](https://github.com/microsoft/vcpkg/pull/10936) [nana] Revert 1 darkcacok patch nana + - [(#11494)](https://github.com/microsoft/vcpkg/pull/11494) [basisu, gppanel, msgpack11, nana, rapidcheck, folly] Add missing header file of STL + +- alembic `1.7.12` -> `1.7.12-1` + - [(#10912)](https://github.com/microsoft/vcpkg/pull/10912) [alembic] linux fixes + +- civetweb `2019-07-05-1` -> `1.12` + - [(#10591)](https://github.com/microsoft/vcpkg/pull/10591) [civetweb] Update to version 1.12 + +- argh `2018-12-18-1` -> `2018-12-18-2` + - [(#10980)](https://github.com/microsoft/vcpkg/pull/10980) [vcpkg] Onboard Linux to VMSS, open 'git' port, and switch back to Azure Spot + +- ceres `1.14.0-6` -> `1.14.0-7` + - [(#10980)](https://github.com/microsoft/vcpkg/pull/10980) [vcpkg] Onboard Linux to VMSS, open 'git' port, and switch back to Azure Spot + - [(#11200)](https://github.com/microsoft/vcpkg/pull/11200) [ceres] Added patch to add find_dependency() for suitesparse targets downstream + +- idevicerestore `1.0.12-3` -> `1.0.12-4` + - [(#10980)](https://github.com/microsoft/vcpkg/pull/10980) [vcpkg] Onboard Linux to VMSS, open 'git' port, and switch back to Azure Spot + - [(#11074)](https://github.com/microsoft/vcpkg/pull/11074) [idevicerestore] Fix libgen.h cannot be found + +- openblas `0.3.7` -> `0.3.9-1` + - [(#10980)](https://github.com/microsoft/vcpkg/pull/10980) [vcpkg] Onboard Linux to VMSS, open 'git' port, and switch back to Azure Spot + +- imgui `1.74` -> `1.76-1` + - [(#10253)](https://github.com/microsoft/vcpkg/pull/10253) [imgui] Add feature bindings and remove feature example + - [(#11388)](https://github.com/microsoft/vcpkg/pull/11388) [imgui] Update to 1.76 + +- libigl `2.1.0-1` -> `2.1.0-2` + - [(#10253)](https://github.com/microsoft/vcpkg/pull/10253) [imgui] Add feature bindings and remove feature example + +- opencv4 `4.1.1-3` -> `4.1.1-6` + - [(#10886)](https://github.com/microsoft/vcpkg/pull/10886) [opencv4] Add GTK support for opencv4 portfile + - [(#7849)](https://github.com/microsoft/vcpkg/pull/7849) [OpenCV2] add new "old" port + - [(#11201)](https://github.com/microsoft/vcpkg/pull/11201) [opencv4] Changed dependency on qt5 to qt5-base, closes microsoft/vcpkg#11138 + - [(#11429)](https://github.com/microsoft/vcpkg/pull/11429) [opencv4] Fix linking halide + +- libbson `1.15.1-1` -> `1.16.1` + - [(#10010)](https://github.com/microsoft/vcpkg/pull/10010) [libbson/mongo-c-driver] Update to 1.16.1 + +- mongo-c-driver `1.15.1-1` -> `1.16.1-1` + - [(#10010)](https://github.com/microsoft/vcpkg/pull/10010) [libbson/mongo-c-driver] Update to 1.16.1 + - [(#11217)](https://github.com/microsoft/vcpkg/pull/11217) [mongo-c-driver] Fix find_package error + +- mongo-cxx-driver `3.4.0-4` -> `3.4.0-5` + - [(#10010)](https://github.com/microsoft/vcpkg/pull/10010) [libbson/mongo-c-driver] Update to 1.16.1 + - [(#11584)](https://github.com/microsoft/vcpkg/pull/11584) [mongo-cxx-driver] Patch std::atomic P0883 changes + +- cpuinfo `2019-07-28` -> `2019-07-28-1` + - [(#8749)](https://github.com/microsoft/vcpkg/pull/8749) [vcpkg] Add new function vcpkg_copy_tools + +- czmq `2019-06-10-3` -> `2019-06-10-4` + - [(#8749)](https://github.com/microsoft/vcpkg/pull/8749) [vcpkg] Add new function vcpkg_copy_tools + +- libsvm `323` -> `323-1` + - [(#8749)](https://github.com/microsoft/vcpkg/pull/8749) [vcpkg] Add new function vcpkg_copy_tools + +- nanomsg `1.1.5-1` -> `1.1.5-2` + - [(#8749)](https://github.com/microsoft/vcpkg/pull/8749) [vcpkg] Add new function vcpkg_copy_tools + +- uriparser `0.9.3-4` -> `0.9.3-5` + - [(#8749)](https://github.com/microsoft/vcpkg/pull/8749) [vcpkg] Add new function vcpkg_copy_tools + +- zyre `2019-07-07` -> `2019-07-07-1` + - [(#8749)](https://github.com/microsoft/vcpkg/pull/8749) [vcpkg] Add new function vcpkg_copy_tools + +- halide `release_2019_08_27-2` -> `master_2020_03_07` + - [(#10295)](https://github.com/microsoft/vcpkg/pull/10295) [llvm] Update to version 10.0.0 and add new features + +- llvm `8.0.0-5` -> `10.0.0-3` + - [(#10295)](https://github.com/microsoft/vcpkg/pull/10295) [llvm] Update to version 10.0.0 and add new features + - [(#11174)](https://github.com/microsoft/vcpkg/pull/11174) [vcpkg] [llvm] Bump Linux VM memory size and do all operations on the temporary disk. + - [(#11268)](https://github.com/microsoft/vcpkg/pull/11268) [llvm] add more backend options, fix issues + - [(#11703)](https://github.com/microsoft/vcpkg/pull/11703) [llvm] fix llvm-tblgen build with MSVC v19.26 + +- sciter `4.4.1.5` -> `4.4.3.20` + - [(#11161)](https://github.com/microsoft/vcpkg/pull/11161) [sciter] Update to 4.4.3.15.7771 + - [(#11393)](https://github.com/microsoft/vcpkg/pull/11393) [sciter] Update to 4.4.3.18.7817 + - [(#11723)](https://github.com/microsoft/vcpkg/pull/11723) [sciter] Update to 4.4.3.20.7852 + +- apr-util `1.6.0-5` -> `1.6.1-1` + - [(#8579)](https://github.com/microsoft/vcpkg/pull/8579) [apr apr-util] Apr and apr-util for non windows systems + - [(#11559)](https://github.com/microsoft/vcpkg/pull/11559) [VCPKG baseline] Fix many ports + +- apr `1.6.5-3` -> `1.7.0` + - [(#8579)](https://github.com/microsoft/vcpkg/pull/8579) [apr apr-util] Apr and apr-util for non windows systems + +- opencv3 `3.4.7-2` -> `3.4.7-3` + - [(#7849)](https://github.com/microsoft/vcpkg/pull/7849) [OpenCV2] add new "old" port + - [(#11201)](https://github.com/microsoft/vcpkg/pull/11201) [opencv4] Changed dependency on qt5 to qt5-base, closes microsoft/vcpkg#11138 + +- gtest `2019-10-09-1` -> `1.10.0` + - [(#10963)](https://github.com/microsoft/vcpkg/pull/10963) [gtest] Rollback to a release version. + +- ignition-cmake0 `0.6.2-1` -> `0.6.2-2` + - [(#10858)](https://github.com/microsoft/vcpkg/pull/10858) [ignition-modular-scripts] Migrate from Bitbucket to GitHub 🤖 + +- ignition-cmake2 `2.1.1` -> `2.2.0-1` + - [(#10858)](https://github.com/microsoft/vcpkg/pull/10858) [ignition-modular-scripts] Migrate from Bitbucket to GitHub 🤖 + - [(#11232)](https://github.com/microsoft/vcpkg/pull/11232) [ignition-math6] Add new port 🤖 + - [(#11270)](https://github.com/microsoft/vcpkg/pull/11270) [eigen3] [ignition-modularscripts] Fix installed pkgconfig files + +- ignition-common1 `1.1.1` -> `1.1.1-1` + - [(#10858)](https://github.com/microsoft/vcpkg/pull/10858) [ignition-modular-scripts] Migrate from Bitbucket to GitHub 🤖 + +- ignition-fuel-tools1 `1.2.0` -> `1.2.0-2` + - [(#10858)](https://github.com/microsoft/vcpkg/pull/10858) [ignition-modular-scripts] Migrate from Bitbucket to GitHub 🤖 + - [(#11270)](https://github.com/microsoft/vcpkg/pull/11270) [eigen3] [ignition-modularscripts] Fix installed pkgconfig files + +- ignition-math4 `4.0.0` -> `4.0.0-1` + - [(#10858)](https://github.com/microsoft/vcpkg/pull/10858) [ignition-modular-scripts] Migrate from Bitbucket to GitHub 🤖 + +- ignition-modularscripts `2020-02-10` -> `2020-05-09` + - [(#10858)](https://github.com/microsoft/vcpkg/pull/10858) [ignition-modular-scripts] Migrate from Bitbucket to GitHub 🤖 + - [(#11270)](https://github.com/microsoft/vcpkg/pull/11270) [eigen3] [ignition-modularscripts] Fix installed pkgconfig files + +- ignition-msgs1 `1.0.0` -> `1.0.0-1` + - [(#10858)](https://github.com/microsoft/vcpkg/pull/10858) [ignition-modular-scripts] Migrate from Bitbucket to GitHub 🤖 + +- ignition-transport4 `4.0.0` -> `4.0.0-2` + - [(#10858)](https://github.com/microsoft/vcpkg/pull/10858) [ignition-modular-scripts] Migrate from Bitbucket to GitHub 🤖 + - [(#11270)](https://github.com/microsoft/vcpkg/pull/11270) [eigen3] [ignition-modularscripts] Fix installed pkgconfig files + +- cuda `10.1` -> `10.1-1` + - [(#10838)](https://github.com/microsoft/vcpkg/pull/10838) [cuda] Fix find cuda in UNIX + +- libiconv `1.16-1` -> `1.16-3` + - [(#9832)](https://github.com/microsoft/vcpkg/pull/9832) libiconv - Fix ICONV_CONST + - [(#11586)](https://github.com/microsoft/vcpkg/pull/11586) [vcpkg-baseline][zxing-cpp] Fix build failure + +- glib `2.52.3-14-5` -> `2.52.3-14-7` + - [(#10856)](https://github.com/microsoft/vcpkg/pull/10856) [glib] Update the usage of string(TOUPPER ...) + - [(#11884)](https://github.com/microsoft/vcpkg/pull/11884) [glib/gts] Add pkgconfig files + +- freerdp `2.0.0-rc4-7` -> `2.0.0-1` + - [(#11051)](https://github.com/microsoft/vcpkg/pull/11051) [freerdp] Update to 2.0.0 + - [(#11639)](https://github.com/microsoft/vcpkg/pull/11639) [freerdp] Optional 'urbdrc' feature + +- wxwidgets `3.1.3` -> `3.1.3-1` + - [(#11178)](https://github.com/microsoft/vcpkg/pull/11178) [wxwidgets] Apply fix to wxWidgets for copy and paste macOS + +- libsquish `1.15-2` -> `1.15-3` + - [(#11124)](https://github.com/microsoft/vcpkg/pull/11124) [libsquish] add missing SQUISH_EXPORT + +- bitserializer-cpprestjson `0.8` -> `alias` + - [(#11157)](https://github.com/microsoft/vcpkg/pull/11157) [BitSerializer] Update to version 0.9 + - [(#11683)](https://github.com/microsoft/vcpkg/pull/11683) [bitserializer] Update to new version 0.10 + +- bitserializer-rapidjson `0.8` -> `alias` + - [(#11157)](https://github.com/microsoft/vcpkg/pull/11157) [BitSerializer] Update to version 0.9 + - [(#11683)](https://github.com/microsoft/vcpkg/pull/11683) [bitserializer] Update to new version 0.10 + +- bitserializer `0.8` -> `0.9` + - [(#11157)](https://github.com/microsoft/vcpkg/pull/11157) [BitSerializer] Update to version 0.9 + - [(#11683)](https://github.com/microsoft/vcpkg/pull/11683) [bitserializer] Update to new version 0.10 + +- gsoap `2.8.93-2` -> `2.8.93-3` + - [(#11048)](https://github.com/microsoft/vcpkg/pull/11048) [gsoap] Add supports for gsoap + - [(#11355)](https://github.com/microsoft/vcpkg/pull/11355) [gSoap] Update to 2.8.102 and re-enable x64 Builds + +- lua `5.3.5-3` -> `5.3.5-5` + - [(#11163)](https://github.com/microsoft/vcpkg/pull/11163) [lua] Compile as position-independent code + - [(#11870)](https://github.com/microsoft/vcpkg/pull/11870) [lua] Add vcpkg-cmake-wrapper + +- gainput `1.0.0-2` -> `1.0.0-3` + - [(#11000)](https://github.com/microsoft/vcpkg/pull/11000) [gainput] imporve cmake search gainput library + +- opencl `2.2-2` -> `2.2-2-1` + - [(#10567)](https://github.com/microsoft/vcpkg/pull/10567) [opencl] Add build type when installing targets + +- azure-iot-sdk-c `2020-02-04.1` -> `2020-02-04.1-1` + - [(#11017)](https://github.com/microsoft/vcpkg/pull/11017) [azure-iot-sdk-c] Fixed the CMake config export. + +- sfml `2.5.1-6` -> `2.5.1-7` + - [(#11246)](https://github.com/microsoft/vcpkg/pull/11246) [sfml] Remove unnecessary patch + +- asmjit `2020-02-08` -> `2020-05-08` + - [(#11245)](https://github.com/microsoft/vcpkg/pull/11245) [asmjit] Update to the latest commit + +- libpq `12.0-1` -> `12.2-2` + - [(#11223)](https://github.com/microsoft/vcpkg/pull/11223) [libpq] link libdl on linux + - [(#10915)](https://github.com/microsoft/vcpkg/pull/10915) [libpq] Update to 12.2 and some feature fixes + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + - [(#11612)](https://github.com/microsoft/vcpkg/pull/11612) [vcpkg baseline] Fix baseline failures + - [(#11483)](https://github.com/microsoft/vcpkg/pull/11483) [vcpkg] Allow CI to pass in all relevant directories and remove use of symbolic links + +- allegro5 `5.2.5.0` -> `5.2.6.0` + - [(#11187)](https://github.com/microsoft/vcpkg/pull/11187) [Allegro] Update to 5.2.6.0 + +- lz4 `1.9.2-1` -> `1.9.2-2` + - [(#11148)](https://github.com/microsoft/vcpkg/pull/11148) [VTK/vtk-m] Update VTK to 9.0 and add vtk-m + +- pegtl-2 `2.8.1` -> `2.8.1-1` + - [(#11148)](https://github.com/microsoft/vcpkg/pull/11148) [VTK/vtk-m] Update VTK to 9.0 and add vtk-m + +- vtk-dicom `0.8.12` -> `0.8.12-1` + - [(#11148)](https://github.com/microsoft/vcpkg/pull/11148) [VTK/vtk-m] Update VTK to 9.0 and add vtk-m + +- libzen `0.4.37` -> `0.4.38` + - [(#11237)](https://github.com/microsoft/vcpkg/pull/11237) [libzen] Update to 0.4.38 + +- speexdsp `1.2.0-1` -> `1.2.0-2` + - [(#11218)](https://github.com/microsoft/vcpkg/pull/11218) [speexdsp] Change repo to github + +- restclient-cpp `0.5.1-3` -> `0.5.2` + - [(#9717)](https://github.com/microsoft/vcpkg/pull/9717) [restclient-cpp] Fix portfile and update version. + +- libpng `1.6.37-7` -> `1.6.37-9` + - [(#11162)](https://github.com/microsoft/vcpkg/pull/11162) [libpng] Fix missing symbols when compiling for ARM + - [(#11280)](https://github.com/microsoft/vcpkg/pull/11280) [libpng] Fix android build + +- capstone `4.0.1-120373dc` -> `4.0.2` + - [(#11250)](https://github.com/microsoft/vcpkg/pull/11250) [capstone] Update to 4.0.2 + +- nuspell `3.1.0` -> `3.1.1` + - [(#11291)](https://github.com/microsoft/vcpkg/pull/11291) [nuspell] update port to v3.1.1 + +- zydis `3.1.0` -> `3.1.0-1` + - [(#11173)](https://github.com/microsoft/vcpkg/pull/11173) Update zydis portfile.cmake + +- glog `0.4.0-2` -> `0.4.0-3` + - [(#11288)](https://github.com/microsoft/vcpkg/pull/11288) [glog] Disable tests + +- opus `1.3.1-2` -> `1.3.1-3` + - [(#11279)](https://github.com/microsoft/vcpkg/pull/11279) [opus] Update port to 1.3.1-2 + +- eigen3 `3.3.7-4` -> `3.3.7-5` + - [(#11270)](https://github.com/microsoft/vcpkg/pull/11270) [eigen3] [ignition-modularscripts] Fix installed pkgconfig files + +- nlopt `2.6.1-1` -> `2.6.2-1` + - [(#11254)](https://github.com/microsoft/vcpkg/pull/11254) [nlopt] Update to 2.6.2 + - [(#11398)](https://github.com/microsoft/vcpkg/pull/11398) [nlopt] Enable UWP support + +- string-theory `3.1` -> `3.2` + - [(#11310)](https://github.com/microsoft/vcpkg/pull/11310) [string-theory] Update to 3.2 + +- miniz `2.1.0` -> `2.1.0-1` + - [(#11316)](https://github.com/microsoft/vcpkg/pull/11316) [miniz] Fix broken cmake config file + +- z3 `4.8.6` -> `4.8.8` + - [(#11314)](https://github.com/microsoft/vcpkg/pull/11314) [z3] update port to 4.8.8 + +- jsoncons `0.150.0` -> `0.153.0` + - [(#11311)](https://github.com/microsoft/vcpkg/pull/11311) [jsoncons] Update to v0.151.0 + - [(#11505)](https://github.com/microsoft/vcpkg/pull/11505) [jsoncons] Update to v0.152.0 + - [(#11699)](https://github.com/microsoft/vcpkg/pull/11699) [jsoncons] Update to v0.153.0 + +- units `2.3.0` -> `2.3.1` + - [(#11308)](https://github.com/microsoft/vcpkg/pull/11308) [units] Update to 2.3.1 + +- boost-accumulators `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-algorithm `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-align `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-any `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-array `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-asio `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-assert `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-assign `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-atomic `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-beast `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-bimap `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-bind `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-build `1.72.0` -> `1.73.0-1` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + - [(#11427)](https://github.com/microsoft/vcpkg/pull/11427) [boost] MinGW build fixes + +- boost-callable-traits `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-chrono `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-circular-buffer `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-compatibility `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-compute `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-concept-check `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-config `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-container-hash `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-container `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-context `1.72.0` -> `1.73.0-1` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + - [(#11692)](https://github.com/microsoft/vcpkg/pull/11692) [vcpkg baseline] Remove passing port from Ci baseline + +- boost-contract `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-conversion `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-convert `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-core `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-coroutine2 `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-crc `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-date-time `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-detail `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-dll `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-dynamic-bitset `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-endian `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-exception `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-fiber `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-filesystem `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-flyweight `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-foreach `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-format `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-function-types `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-function `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-functional `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-fusion `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-geometry `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-gil `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-graph-parallel `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- boost-graph `1.72.0` -> `1.73.0` + - [(#11221)](https://github.com/microsoft/vcpkg/pull/11221) [boost] update to 1.73.0 + +- sobjectizer `5.7.0` -> `5.7.0.1` + - [(#11276)](https://github.com/microsoft/vcpkg/pull/11276) [sobjectizer] update to v.5.7.0.1. + +- imgui-sfml `2.1` -> `2.1-1` + - [(#10840)](https://github.com/microsoft/vcpkg/pull/10840) [imgui-sfml] Force imgui-sfml to be a static library + +- gdcm `3.0.4` -> `3.0.5` + - [(#11258)](https://github.com/microsoft/vcpkg/pull/11258) [gdcm] Update to version 3.0.5 + +- opengl `0.0-5` -> `0.0-6` + - [(#11294)](https://github.com/microsoft/vcpkg/pull/11294) [OpenGL] Fix lib files copy when VCPKG_BUILD_TYPE is set + +- libmysql `8.0.4-7` -> `8.0.20` + - [(#11303)](https://github.com/microsoft/vcpkg/pull/11303) [libmysql] Update to 8.0.20 + +- libodb-mysql `2.4.0-6` -> `2.4.0-7` + - [(#11303)](https://github.com/microsoft/vcpkg/pull/11303) [libmysql] Update to 8.0.20 + +- ogre-next `2019-10-20` -> `2019-10-20-1` + - [(#11325)](https://github.com/microsoft/vcpkg/pull/11325) [ogre/ogre-next] Add conflict error message + +- ogre `1.12.1` -> `1.12.1-1` + - [(#11325)](https://github.com/microsoft/vcpkg/pull/11325) [ogre/ogre-next] Add conflict error message + +- paho-mqttpp3 `1.0.1-3` -> `1.1` + - [(#11327)](https://github.com/microsoft/vcpkg/pull/11327) [paho-mqttpp3] update to 1.1 + +- gsl-lite `0.36.0` -> `0.37.0` + - [(#11351)](https://github.com/microsoft/vcpkg/pull/11351) [gsl-lite] update to 0.37.0 + +- restinio `0.6.6` -> `0.6.8` + - [(#11367)](https://github.com/microsoft/vcpkg/pull/11367) [restinio] update to v.0.6.8 + +- tiff `4.0.10-8` -> `4.0.10-9` + - [(#11364)](https://github.com/microsoft/vcpkg/pull/11364) [tiff] Install runtime deps for tiff[tool] + +- sqlite3 `3.31.1` -> `3.32.1` + - [(#11267)](https://github.com/microsoft/vcpkg/pull/11267) [sqlite3] Enable build for android + - [(#11635)](https://github.com/microsoft/vcpkg/pull/11635) [sqlite3] update to 3.32 + - [(#11716)](https://github.com/microsoft/vcpkg/pull/11716) [sqlite] Updated to 3.32.1 to fix a security vulnerability + +- aws-sdk-cpp `1.7.270` -> `1.7.333` + - [(#11332)](https://github.com/microsoft/vcpkg/pull/11332) [aws-sdk-cpp] Update to 1.7.333 + +- libxml2 `2.9.9-5` -> `2.9.9-6` + - [(#11072)](https://github.com/microsoft/vcpkg/pull/11072) [libxml2] Add iconv and charset linkage in vcpkg-cmake-wrapper on osx + +- libgo `2.8-2` -> `3.1-1` + - [(#11263)](https://github.com/microsoft/vcpkg/pull/11263) [libgo] Update to 3.1 + - [(#11435)](https://github.com/microsoft/vcpkg/pull/11435) [libgo] Update CONTROL file for typo + +- ixwebsocket `9.1.9` -> `9.6.2` + - [(#11030)](https://github.com/microsoft/vcpkg/pull/11030) [ixwebsocket] update to 9.6.2 + +- cpuid `0.4.1` -> `0.4.1-1` + - [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 + +- dmlc `2019-08-12-1` -> `2019-08-12-4` + - [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 + - [(#11612)](https://github.com/microsoft/vcpkg/pull/11612) [vcpkg baseline] Fix baseline failures + - [(#11896)](https://github.com/microsoft/vcpkg/pull/11896) [vcpkg baseline] Fix baseline error + +- libnice `0.1.15-2` -> `0.1.15-3` + - [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 + +- magnum `2019.10-1` -> `2019.10-2` + - [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 + +- mlpack `3.2.2-1` -> `3.2.2-3` + - [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 + - [(#11785)](https://github.com/microsoft/vcpkg/pull/11785) [mlpack] Explicitly depend on stb + +- nanodbc `2.12.4-5` -> `2.12.4-8` + - [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 + - [(#11613)](https://github.com/microsoft/vcpkg/pull/11613) [vcpkg-baseline][unixodbc/nanodbc] Fix unixodbc build failure and set it as a dependency on nanodbc + +- osg `3.6.4-2` -> `3.6.4-3` + - [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 + - [(#11715)](https://github.com/microsoft/vcpkg/pull/11715) [osg] Fix conflict when asio and boost-asio are installed. + +- podofo `0.9.6-7` -> `0.9.6-8` + - [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 + +- replxx `0.0.2` -> `0.0.2-2` + - [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 + - [(#11571)](https://github.com/microsoft/vcpkg/pull/11571) [replxx] Add missing header needed to name std::runtime_error for replxx. + +- stormlib `2019-05-10` -> `2019-05-10-1` + - [(#10767)](https://github.com/microsoft/vcpkg/pull/10767) [cmake] Update to 3.17.2 + +- parallelstl `20191218` -> `20200330` + - [(#11379)](https://github.com/microsoft/vcpkg/pull/11379) [parallelstl] update to 20200330 + +- angle `2019-12-31-2` -> `2020-05-15` + - [(#11394)](https://github.com/microsoft/vcpkg/pull/11394) [angle] update for gcc 10 compatibility + +- parallel-hashmap `1.30` -> `1.32` + - [(#11420)](https://github.com/microsoft/vcpkg/pull/11420) [parallel-hashmap] Update parallel-hashmap version + +- utfcpp `3.1` -> `3.1.1` + - [(#11426)](https://github.com/microsoft/vcpkg/pull/11426) [utfcpp] Update to 3.1.1 + +- realsense2 `2.33.1-1` -> `2.34.0` + - [(#11437)](https://github.com/microsoft/vcpkg/pull/11437) [realsense2] Update to 2.34.0 + +- grpc `1.27.3` -> `1.28.1-1` + - [(#11449)](https://github.com/microsoft/vcpkg/pull/11449) [grpc] upgrade to 1.28.1 + - [(#10307)](https://github.com/microsoft/vcpkg/pull/10307) [grpc] Add feature absl-sync + +- skia `2020-02-15-1` -> `2020-05-18-1` + - [(#11416)](https://github.com/microsoft/vcpkg/pull/11416) [harfbuzz,skia] Update and replace Skia dependencies with vcpkg + +- fribidi `1.0.9` -> `1.0.9-1` + - [(#11380)](https://github.com/microsoft/vcpkg/pull/11380) [tool-meson] Update to 0.54.2 + +- libepoxy `1.5.3-3` -> `1.5.4` + - [(#11380)](https://github.com/microsoft/vcpkg/pull/11380) [tool-meson] Update to 0.54.2 + - [(#11448)](https://github.com/microsoft/vcpkg/pull/11448) [libepoxy] Update to 1.5.4 + +- tool-meson `0.53.2` -> `0.54.2` + - [(#11380)](https://github.com/microsoft/vcpkg/pull/11380) [tool-meson] Update to 0.54.2 + +- monkeys-audio `5.24` -> `5.38` + - [(#11444)](https://github.com/microsoft/vcpkg/pull/11444) [monkeys-audio] Update to 5.38 + +- clapack `3.2.1-12` -> `3.2.1-13` + - [(#9957)](https://github.com/microsoft/vcpkg/pull/9957) [clapack] Add uwp support + +- fcl `0.6.0` -> `0.6.0-1` + - [(#11406)](https://github.com/microsoft/vcpkg/pull/11406) [fcl] Explicity handle FCL_USE_X64_SSE CMake option + +- farmhash `1.1` -> `1.1-1` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- freexl `1.0.4-8` -> `1.0.4-9` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- healpix `1.12.10` -> `1.12.10-1` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- libb2 `0.98.1` -> `0.98.1-2` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + - [(#11692)](https://github.com/microsoft/vcpkg/pull/11692) [vcpkg baseline] Remove passing port from Ci baseline + +- libcrafter `0.3` -> `0.3-1` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- libmagic `5.37` -> `5.37-1` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- libmesh `1.5.0` -> `1.5.0-1` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- libosip2 `5.1.0-3` -> `5.1.0-4` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- libudns `0.4-1` -> `0.4-2` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- libwandio `4.2.1` -> `4.2.1-2` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- libxslt `1.1.33-6` -> `1.1.33-7` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- pfring `2019-10-17-1` -> `2019-10-17-2` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- sdl1 `1.2.15-10` -> `1.2.15-11` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- tcl `8.6.10-3` -> `core-9-0-a1` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- x264 `157-303c484ec828ed0-7` -> `157-303c484ec828ed0-8` + - [(#10402)](https://github.com/microsoft/vcpkg/pull/10402) [vcpkg] Improve make builds + +- libflac `1.3.3` -> `1.3.3-1` + - [(#11152)](https://github.com/microsoft/vcpkg/pull/11152) [libflac] Update to 1.3.3-1 + +- libsndfile `1.0.29-8` -> `1.0.29-9` + - [(#11152)](https://github.com/microsoft/vcpkg/pull/11152) [libflac] Update to 1.3.3-1 + +- octomap `2017-03-11-7` -> `2017-03-11-8` + - [(#11408)](https://github.com/microsoft/vcpkg/pull/11408) [octomap] Cleanup + +- freeglut `3.0.0-9` -> `3.2.1-1` + - [(#11423)](https://github.com/microsoft/vcpkg/pull/11423) [freeglut] updated to 3.2.1 + - [(#11527)](https://github.com/microsoft/vcpkg/pull/11527) [freeglut] fix debug macro patch + +- libpqxx `6.4.5-2` -> `6.4.5-3` + - [(#11442)](https://github.com/microsoft/vcpkg/pull/11442) [libpqxx] linux support + +- marl `2019-09-13` -> `2020-05-21` + - [(#11465)](https://github.com/microsoft/vcpkg/pull/11465) [marl] Update to 2020-05-20 + +- python3 `3.7.3-2` -> `3.8.3` + - [(#11489)](https://github.com/microsoft/vcpkg/pull/11489) [python3] Fix dynamic build error on Linux + - [(#11708)](https://github.com/microsoft/vcpkg/pull/11708) [python3] Update to Python 3.8 + +- azure-storage-cpp `7.3.0` -> `7.4.0` + - [(#11510)](https://github.com/microsoft/vcpkg/pull/11510) [azure-storage-cpp] Upgrade to 7.4.0 + +- entt `3.3.2` -> `3.4.0` + - [(#11509)](https://github.com/microsoft/vcpkg/pull/11509) [entt] Update to 3.4.0 (#11507) + +- wil `2019-11-07` -> `2020-05-19` + - [(#11506)](https://github.com/microsoft/vcpkg/pull/11506) [wil] Update to 2020-05-19 + +- signalrclient `1.0.0-beta1-8` -> `1.0.0-beta1-9` + - [(#11496)](https://github.com/microsoft/vcpkg/pull/11496) [Baseline] Fix boost-*:arm-uwp failure and resolve conflicts in CI + +- bond `8.1.0-3` -> `9.0.0` + - [(#11559)](https://github.com/microsoft/vcpkg/pull/11559) [VCPKG baseline] Fix many ports + - [(#11628)](https://github.com/microsoft/vcpkg/pull/11628) [bond] Update to 9.0.0 + - [(#10319)](https://github.com/microsoft/vcpkg/pull/10319) [bond] updated version + added bond-over-grpc integration as feature + +- ccfits `2.5-4` -> `2.5-5` + - [(#11559)](https://github.com/microsoft/vcpkg/pull/11559) [VCPKG baseline] Fix many ports + +- geographiclib `1.47-patch1-10` -> `1.47-patch1-12` + - [(#11559)](https://github.com/microsoft/vcpkg/pull/11559) [VCPKG baseline] Fix many ports + - [(#11896)](https://github.com/microsoft/vcpkg/pull/11896) [vcpkg baseline] Fix baseline error + +- libaiff `5.0-2` -> `5.0-3` + - [(#11559)](https://github.com/microsoft/vcpkg/pull/11559) [VCPKG baseline] Fix many ports + +- ois `1.5` -> `1.5-1` + - [(#11559)](https://github.com/microsoft/vcpkg/pull/11559) [VCPKG baseline] Fix many ports + +- wtl `10.0-4` -> `10.0-5` + - [(#11559)](https://github.com/microsoft/vcpkg/pull/11559) [VCPKG baseline] Fix many ports + +- xmsh `0.5.2` -> `0.5.2-1` + - [(#11559)](https://github.com/microsoft/vcpkg/pull/11559) [VCPKG baseline] Fix many ports + +- xmlsec `1.2.29-2` -> `1.2.30` + - [(#11595)](https://github.com/microsoft/vcpkg/pull/11595) [Xmlsec] Update to 1.2.30 + +- activemq-cpp `3.9.5-1` -> `3.9.5-2` + - [(#11589)](https://github.com/microsoft/vcpkg/pull/11589) [libusbmuxd berkeleydb cppcms activemq-cpp] Add Supports and failure message + +- berkeleydb `4.8.30-3` -> `4.8.30-4` + - [(#11589)](https://github.com/microsoft/vcpkg/pull/11589) [libusbmuxd berkeleydb cppcms activemq-cpp] Add Supports and failure message + +- cppcms `1.2.1` -> `1.2.1-1` + - [(#11589)](https://github.com/microsoft/vcpkg/pull/11589) [libusbmuxd berkeleydb cppcms activemq-cpp] Add Supports and failure message + +- libusbmuxd `1.2.185` -> `1.2.185-1` + - [(#11589)](https://github.com/microsoft/vcpkg/pull/11589) [libusbmuxd berkeleydb cppcms activemq-cpp] Add Supports and failure message + +- seal `3.4.5` -> `3.4.5-1` + - [(#11588)](https://github.com/microsoft/vcpkg/pull/11588) [seal] Disable SEAL_USE_MSGSL and add default feature zlib + +- magic-get `2019-09-02` -> `2019-09-02-1` + - [(#11581)](https://github.com/microsoft/vcpkg/pull/11581) [magic-get] Fix improper direct reference to the "downloads" directory + +- lpeg `1.0.1-4` -> `1.0.2-1` + - [(#11554)](https://github.com/microsoft/vcpkg/pull/11554) [luafilesystem][lpeg] Bump versions + +- luafilesystem `1.7.0.2-1` -> `1.8.0-1` + - [(#11554)](https://github.com/microsoft/vcpkg/pull/11554) [luafilesystem][lpeg] Bump versions + +- scnlib `0.1.2` -> `0.3` + - [(#11540)](https://github.com/microsoft/vcpkg/pull/11540) [scnlib] Update to version 0.3 + +- cppgraphqlgen `3.2.1` -> `3.2.2` + - [(#11531)](https://github.com/microsoft/vcpkg/pull/11531) [pegtl/cppgraphqlgen] matching updates for dependency + +- protobuf-c `1.3.2` -> `1.3.2-2` + - [(#11517)](https://github.com/microsoft/vcpkg/pull/11517) [protobuf-c] Fix tool protoc-gen-c crash + - [(#11609)](https://github.com/microsoft/vcpkg/pull/11609) [protobuf-c] Fix wrong dependency for feature test + +- basisu `1.11-3` -> `1.11-4` + - [(#11494)](https://github.com/microsoft/vcpkg/pull/11494) [basisu, gppanel, msgpack11, nana, rapidcheck, folly] Add missing header file of STL + +- folly `2019.10.21.00-1` -> `2019.10.21.00-2` + - [(#11494)](https://github.com/microsoft/vcpkg/pull/11494) [basisu, gppanel, msgpack11, nana, rapidcheck, folly] Add missing header file of STL + +- gppanel `2018-04-06` -> `2020-05-20` + - [(#11494)](https://github.com/microsoft/vcpkg/pull/11494) [basisu, gppanel, msgpack11, nana, rapidcheck, folly] Add missing header file of STL + +- msgpack11 `0.0.10` -> `0.0.10-1` + - [(#11494)](https://github.com/microsoft/vcpkg/pull/11494) [basisu, gppanel, msgpack11, nana, rapidcheck, folly] Add missing header file of STL + +- rapidcheck `2018-11-05-1` -> `2018-11-05-2` + - [(#11494)](https://github.com/microsoft/vcpkg/pull/11494) [basisu, gppanel, msgpack11, nana, rapidcheck, folly] Add missing header file of STL + +- simdjson `2019-12-27` -> `2020-05-26` + - [(#11495)](https://github.com/microsoft/vcpkg/pull/11495) [simdjson] Fix error LNK2001 when compile with /fsanitize=address in MSVC + - [(#10709)](https://github.com/microsoft/vcpkg/pull/10709) [simdjson] Update to 0.3.1 + +- ponder `3.0.0` -> `3.0.0-1` + - [(#11582)](https://github.com/microsoft/vcpkg/pull/11582) [ponder] patch missing headers for Visual Studio 2019 16.6 + +- telnetpp `2.0-3` -> `2.0-4` + - [(#11573)](https://github.com/microsoft/vcpkg/pull/11573) [telnetpp] Add missing for Visual Studio 2019 16.6 + +- libpopt `1.16-12` -> `1.16-13` + - [(#11607)](https://github.com/microsoft/vcpkg/pull/11607) [libpopt] Remove invalid URL + +- cpputest `2019-9-16` -> `2019-9-16-1` + - [(#11585)](https://github.com/microsoft/vcpkg/pull/11585) [cpputest] Move library to manual-link + +- unixodbc `2.3.7` -> `2.3.7-1` + - [(#11613)](https://github.com/microsoft/vcpkg/pull/11613) [vcpkg-baseline][unixodbc/nanodbc] Fix unixodbc build failure and set it as a dependency on nanodbc + +- nghttp2 `1.39.2-1` -> `1.39.2-2` + - [(#11638)](https://github.com/microsoft/vcpkg/pull/11638) [nghttp2] Fix to build nghttp2 statically + +- gli `dd17acf` -> `dd17acf-1` + - [(#11634)](https://github.com/microsoft/vcpkg/pull/11634) [gli] Add CMake config support + +- mimalloc `1.6.1` -> `1.6.1-1` + - [(#11632)](https://github.com/microsoft/vcpkg/pull/11632) [mimalloc] Install mimalloc-redirect.dll to CMAKE_INSTALL_BINDIR + +- quickfix `1.15.1-3` -> `1.15.1-4` + - [(#11604)](https://github.com/microsoft/vcpkg/pull/11604) [vcpkg-baseline][quickfix] Fix build failure on arm64-windows + +- zxing-cpp `3.3.3-6` -> `3.3.3-7` + - [(#11586)](https://github.com/microsoft/vcpkg/pull/11586) [vcpkg-baseline][zxing-cpp] Fix build failure + +- ppconsul `0.5` -> `0.5-1` + - [(#11692)](https://github.com/microsoft/vcpkg/pull/11692) [vcpkg baseline] Remove passing port from Ci baseline + +- proj4 `6.3.1` -> `6.3.1-1` + - [(#11692)](https://github.com/microsoft/vcpkg/pull/11692) [vcpkg baseline] Remove passing port from Ci baseline + - [(#11086)](https://github.com/microsoft/vcpkg/pull/11086) [PROJ4] Add search path for sqlite.exe + +- jwt-cpp `2019-05-07-1` -> `0.4.0` + - [(#11625)](https://github.com/microsoft/vcpkg/pull/11625) [jwt-cpp] Update to v0.4.0 + +- polyhook2 `2020-02-17` -> `2020-06-02` + - [(#11561)](https://github.com/microsoft/vcpkg/pull/11561) [polyhook2] Update to 2020-05-25 + - [(#11729)](https://github.com/microsoft/vcpkg/pull/11729) [polyhook2] Update polyhook to latest + +- gdk-pixbuf `2.36.9-4` -> `2.36.9-5` + - [(#11721)](https://github.com/microsoft/vcpkg/pull/11721) [gdk-pixbuf] GdkPixbuf fix for building on macOS + +- yaml-cpp `0.6.2-3` -> `0.6.3` + - [(#11718)](https://github.com/microsoft/vcpkg/pull/11718) [yaml-cpp] Update to 0.6.3 and also fix headers cannot be found + +- fmt `6.2.0` -> `6.2.1` + - [(#11706)](https://github.com/microsoft/vcpkg/pull/11706) [fmt] add vcpkg_fixup_pkgconfig + - [(#11789)](https://github.com/microsoft/vcpkg/pull/11789) [fmt] Update to 6.2.1 + +- magic-enum `0.6.4` -> `0.6.6` + - [(#11704)](https://github.com/microsoft/vcpkg/pull/11704) [magic-enum] Update to v0.6.5 + - [(#11814)](https://github.com/microsoft/vcpkg/pull/11814) [magic-enum] Update to v0.6.6 + +- enet `1.3.13-1` -> `1.3.15` + - [(#11702)](https://github.com/microsoft/vcpkg/pull/11702) [enet] Update to 1.3.15 + +- libfabric `1.8.1` -> `1.8.1-1` + - [(#11647)](https://github.com/microsoft/vcpkg/pull/11647) [vcpkg baseline][libfabric] Only support dynamic build + +- google-cloud-cpp-common `0.25.0` -> `alias` + - [(#11698)](https://github.com/microsoft/vcpkg/pull/11698) [google-cloud-cpp] Consolidate all google-cloud* packages + +- google-cloud-cpp-spanner `1.1.0` -> `alias` + - [(#11698)](https://github.com/microsoft/vcpkg/pull/11698) [google-cloud-cpp] Consolidate all google-cloud* packages + +- google-cloud-cpp `0.21.0` -> `1.14.0` + - [(#11698)](https://github.com/microsoft/vcpkg/pull/11698) [google-cloud-cpp] Consolidate all google-cloud* packages + +- amqpcpp `4.1.5` -> `4.1.7` + - [(#11608)](https://github.com/microsoft/vcpkg/pull/11608) [amqpcpp] Update to 4.1.7 + +- shiva-sfml `1.0` -> `1.0-1` + - [(#11483)](https://github.com/microsoft/vcpkg/pull/11483) [vcpkg] Allow CI to pass in all relevant directories and remove use of symbolic links + +- spirv-tools `2020.1` -> `2020.1-1` + - [(#11483)](https://github.com/microsoft/vcpkg/pull/11483) [vcpkg] Allow CI to pass in all relevant directories and remove use of symbolic links + +- cpp-taskflow `2.2.0` -> `2.2.0-1` + - [(#11742)](https://github.com/microsoft/vcpkg/pull/11742) [vcpkg-baseline][manyport] Fix baseline error + +- eabase `2.09.12` -> `2.09.12-1` + - [(#11742)](https://github.com/microsoft/vcpkg/pull/11742) [vcpkg-baseline][manyport] Fix baseline error + +- fastrtps `1.5.0-2` -> `1.5.0-3` + - [(#11742)](https://github.com/microsoft/vcpkg/pull/11742) [vcpkg-baseline][manyport] Fix baseline error + +- librsvg `2.40.20` -> `2.40.20-2` + - [(#11722)](https://github.com/microsoft/vcpkg/pull/11722) [librsvg] Fix for macOS + - [(#11865)](https://github.com/microsoft/vcpkg/pull/11865) [vcpkg baseline] Fix baseline + +- mozjpeg `3.2-3` -> `2020-06-02` + - [(#11719)](https://github.com/microsoft/vcpkg/pull/11719) [mozjpeg] Update to latest commit + +- pcre `8.44` -> `8.44-1` + - [(#11564)](https://github.com/microsoft/vcpkg/pull/11564) [pcre] Add pkgconfig files + +- tensorflow-cc `1.14-1` -> `1.14-2` + - [(#11839)](https://github.com/microsoft/vcpkg/pull/11839) [vcpkg] Fix OSX CI by ensuring the downloads directory exists + +- sqlpp11-connector-mysql `0.29` -> `0.29-1` + - [(#11771)](https://github.com/microsoft/vcpkg/pull/11771) [sqlpp11] update to v0.59 + +- sqlpp11 `0.58-3` -> `0.59` + - [(#11771)](https://github.com/microsoft/vcpkg/pull/11771) [sqlpp11] update to v0.59 + +- unicorn-lib `2019-07-11` -> `2020-03-02` + - [(#11830)](https://github.com/microsoft/vcpkg/pull/11830) [unicorn-lib] Update to 01cc7fc (2020-03-02) + +- sol2 `3.2.0` -> `3.2.1` + - [(#11826)](https://github.com/microsoft/vcpkg/pull/11826) [sol] Update to version 3.2.1 + +- avisynthplus `3.5.0` -> `3.6.0` + - [(#11736)](https://github.com/microsoft/vcpkg/pull/11736) [avisynthplus] Upgrade to 3.6.0 + +- plibsys `0.0.4-2` -> `0.0.4-3` + - [(#11633)](https://github.com/microsoft/vcpkg/pull/11633) [plibsys] Fix failures on linux and osx + +- libxmp-lite `4.4.1-2` -> `4.4.1-3` + - [(#11865)](https://github.com/microsoft/vcpkg/pull/11865) [vcpkg baseline] Fix baseline + +- msix `1.7` -> `1.7-2` + - [(#11865)](https://github.com/microsoft/vcpkg/pull/11865) [vcpkg baseline] Fix baseline + - [(#11896)](https://github.com/microsoft/vcpkg/pull/11896) [vcpkg baseline] Fix baseline error + +- usd `20.02` -> `20.02-1` + - [(#11440)](https://github.com/microsoft/vcpkg/pull/11440) [usd] Fix build error on Linux + +- cryptopp `8.2.0-1` -> `8.2.0-2` + - [(#11711)](https://github.com/microsoft/vcpkg/pull/11711) [licensepp] Add new port + +- libpcap `1.9.1` -> `1.9.1-2` + - [(#9426)](https://github.com/microsoft/vcpkg/pull/9426) [libpcap] Fix pkgconfig libs and include path + - [(#10731)](https://github.com/microsoft/vcpkg/pull/10731) [libpcap] Enable compilation of libpcap port on x86-windows and x64-windows + +- ms-angle `2018-04-18-2` -> `alias` + - [(#11458)](https://github.com/microsoft/vcpkg/pull/11458) [ms-angle] Set ms-angle to empty package + +- libgit2 `1.0.0` -> `1.0.1` + - [(#11844)](https://github.com/microsoft/vcpkg/pull/11844) [libgit2] Update to 1.0.1 + +- uwebsockets `0.17.2` -> `18.1.0` + - [(#11866)](https://github.com/microsoft/vcpkg/pull/11866) [uWbSockets] Update to 18.1.0 + +- nameof `0.9.3` -> `0.9.4` + - [(#11815)](https://github.com/microsoft/vcpkg/pull/11815) [nameof] Update to 0.9.4 + +- cairo `1.16.0-3` -> `1.16.0-4` + - [(#11868)](https://github.com/microsoft/vcpkg/pull/11868) [cairo] Install the xlib header file when selecting feature x11 + +- directxmesh `dec2019-1` -> `jun2020` + - [(#11794)](https://github.com/microsoft/vcpkg/pull/11794) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version + +- directxtex `dec2019` -> `jun2020` + - [(#11794)](https://github.com/microsoft/vcpkg/pull/11794) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version + +- directxtk `2019-12-31` -> `jun2020` + - [(#11794)](https://github.com/microsoft/vcpkg/pull/11794) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version + +- directxtk12 `dec2019` -> `jun2020` + - [(#11794)](https://github.com/microsoft/vcpkg/pull/11794) [directxtk][directxtk12][directxtex][directxmesh] Update to latest version + +- spdlog `1.4.2-1` -> `1.6.1` + - [(#11793)](https://github.com/microsoft/vcpkg/pull/11793) [spdlog] Update to 1.61 + +- msmpi `10.0-2` -> `10.1` + - [(#11365)](https://github.com/microsoft/vcpkg/pull/11365) [vcpkg] [cudnn] [msmpi] [openmpi] Update VMSS + +- openmpi `4.0.1` -> `4.0.3` + - [(#11365)](https://github.com/microsoft/vcpkg/pull/11365) [vcpkg] [cudnn] [msmpi] [openmpi] Update VMSS + +- sdl2 `2.0.12` -> `2.0.12-1` + - [(#11365)](https://github.com/microsoft/vcpkg/pull/11365) [vcpkg] [cudnn] [msmpi] [openmpi] Update VMSS + +- gtk `3.22.19-3` -> `3.22.19-4` + - [(#11892)](https://github.com/microsoft/vcpkg/pull/11892) [gtk] DISABLE_PARALLEL_CONFIGURE + +- xalan-c `1.11-11` -> `1.11-12` + - [(#11869)](https://github.com/microsoft/vcpkg/pull/11869) [xalan-c] Fix import Xalan.exe + +- libuuid `1.0.3-3` -> `1.0.3-4` + - [(#11849)](https://github.com/microsoft/vcpkg/pull/11849) [libuuid] Install uuid.pc file + +- lastools `2019-07-10` -> `2020-05-09` + - [(#11796)](https://github.com/microsoft/vcpkg/pull/11796) [LAStools] Update to 200509 + +- libpmemobj-cpp `1.8` -> `1.10` + - [(#11738)](https://github.com/microsoft/vcpkg/pull/11738) [libpmemobj-cpp] Update to 1.10 + +- librabbitmq `0.10.0` -> `2020-06-03` + - [(#11733)](https://github.com/microsoft/vcpkg/pull/11733) [librabbitmq] Update to use rabbitmq-config.cmake + +- hyperscan `5.2.1` -> `5.2.1-1` + - [(#11708)](https://github.com/microsoft/vcpkg/pull/11708) [python3] Update to Python 3.8 + +- tinyxml2 `7.1.0` -> `8.0.0` + - [(#11616)](https://github.com/microsoft/vcpkg/pull/11616) [tinyxml2] Update to 8.0.0; avoid exporting symbols when building static libraries + +- winpcap `4.1.3-2` -> `4.1.3-3` + - [(#10731)](https://github.com/microsoft/vcpkg/pull/10731) [libpcap] Enable compilation of libpcap port on x86-windows and x64-windows + +- ccd `2.1-3` -> `2.1-4` + - [(#11407)](https://github.com/microsoft/vcpkg/pull/11407) [ccd] Add emscripten support + +- itpp `4.3.1-1` -> `4.3.1-2` + - [(#11896)](https://github.com/microsoft/vcpkg/pull/11896) [vcpkg baseline] Fix baseline error + +- plplot `5.13.0-4` -> `5.13.0-5` + - [(#11896)](https://github.com/microsoft/vcpkg/pull/11896) [vcpkg baseline] Fix baseline error + +- pthreads `3.0.0-4` -> `3.0.0-5` + - [(#11896)](https://github.com/microsoft/vcpkg/pull/11896) [vcpkg baseline] Fix baseline error + +- qwt `6.1.3-10` -> `6.1.3-11` + - [(#11896)](https://github.com/microsoft/vcpkg/pull/11896) [vcpkg baseline] Fix baseline error + +- soundtouch `2.0.0-4` -> `2.0.0-6` + - [(#11896)](https://github.com/microsoft/vcpkg/pull/11896) [vcpkg baseline] Fix baseline error + +- tclap `1.2.2-1` -> `1.2.2-2` + - [(#11896)](https://github.com/microsoft/vcpkg/pull/11896) [vcpkg baseline] Fix baseline error + +- tinyfiledialogs `3.4.3-1` -> `3.4.3-2` + - [(#11896)](https://github.com/microsoft/vcpkg/pull/11896) [vcpkg baseline] Fix baseline error + +- mpir `3.0.0-7` -> `3.0.0-8` + - [(#9205)](https://github.com/microsoft/vcpkg/pull/9205) [mpir] Add mpirxx.lib + +- fftw3 `3.3.8-6` -> `3.3.8-7` + - [(#4361)](https://github.com/microsoft/vcpkg/pull/4361) Adds vcpkg item to project settings in Visual Studio + +
+ +-- vcpkg team vcpkg@microsoft.com MON, 16 June 1400:00 -0700 + +vcpkg (2020.04.01 - 2020.04.20) +--- +#### Total port count: 1322 + +#### Total port count per triplet (tested): +|triplet|ports available| +|---|---| +|**x64-windows**|1218| +|x86-windows|1202| +|x64-windows-static|1130| +|**x64-linux**|1104| +|**x64-osx**|1041| +|arm64-windows|842| +|x64-uwp|654| +|arm-uwp|625| + +#### The following documentation has been updated: +- [vcpkg_from_git](docs/maintainers/vcpkg_from_git.md) + - [(#9446)](https://github.com/microsoft/vcpkg/pull/9446) vcpkg_from_git: Add support for git over ssh (by @marcrambo) +- [Exporting to Android Archives (AAR files)](docs/specifications/prefab.md) ***[NEW]*** + - [(#10271)](https://github.com/microsoft/vcpkg/pull/10271) Android Support: Exporting to Android Archive (AAR) (by @atkawa7) +- [Triplets](docs/users/triplets.md) + - [(#6275)](https://github.com/microsoft/vcpkg/pull/6275) Add initial iOS support (by @alcroito) + +#### The following *remarkable* changes have been made to vcpkg: +- [(#9446)](https://github.com/microsoft/vcpkg/pull/9446) vcpkg_from_git: Add support for git over ssh (by @marcrambo) +- [(#10271)](https://github.com/microsoft/vcpkg/pull/10271) Android Support: Exporting to Android Archive (AAR) (by @atkawa7) +- [(#10395)](https://github.com/microsoft/vcpkg/pull/10395) [vcpkg] Make configure meson sane and work for all targets. (by @Neumann-A) +- [(#10398)](https://github.com/microsoft/vcpkg/pull/10398) [vcpkg] New policy: SKIP_ARCHITECTURE_CHECK. (by @Neumann-A) +- [(#6275)](https://github.com/microsoft/vcpkg/pull/6275) Add initial iOS support (by @alcroito) +- [(#10817)](https://github.com/microsoft/vcpkg/pull/10817) [vcpkg] Add x-set-installed command (by @strega-nil) +- [(#10521)](https://github.com/microsoft/vcpkg/pull/10521) [vcpkg] Add initial JSON support (by @strega-nil) + +#### The following *additional* changes have been made to vcpkg: +- [(#10637)](https://github.com/microsoft/vcpkg/pull/10637) [vcpkg baseline] Ignore osg-qt (by @PhoebeHui) +- [(#10660)](https://github.com/microsoft/vcpkg/pull/10660) [vcpkg] Fix spec instance name (by @PhoebeHui) +- [(#10703)](https://github.com/microsoft/vcpkg/pull/10703) [vcpkg baseline] Remove replxx:x86-windows=fail (by @strega-nil) +- [(#10655)](https://github.com/microsoft/vcpkg/pull/10655) [vcpkg] Fix nuget/aria2/ninja version/filename inconsistent (by @LilyWangL) +- [(#10583)](https://github.com/microsoft/vcpkg/pull/10583) [vcpkg] Correct UInt128 code 😇 (by @strega-nil) +- [(#10543)](https://github.com/microsoft/vcpkg/pull/10543) [vcpkg-test] Fix the check for ability to make symlinks (by @strega-nil) +- [(#10621)](https://github.com/microsoft/vcpkg/pull/10621) [vcpkg] fix vcpkg_find_acquire_program for scripts (by @Neumann-A) +- [(#10834)](https://github.com/microsoft/vcpkg/pull/10834) [vcpkg] Clean up CMake build system (by @strega-nil) +- [(#10846)](https://github.com/microsoft/vcpkg/pull/10846) [vcpkg] Fix bootstrap from out of directory (by @strega-nil) +- [(#10796)](https://github.com/microsoft/vcpkg/pull/10796) [Ninja] Update to 1.10 (by @Voskrese) +- [(#10867)](https://github.com/microsoft/vcpkg/pull/10867) [vcpkg] Fix build scripts on openSUSE and g++9 (by @strega-nil) + +
+The following 5 ports have been added: + +|port|version| +|---|---| +|[skyr-url](https://github.com/microsoft/vcpkg/pull/10463)[#10694](https://github.com/microsoft/vcpkg/pull/10694) | 1.5.1 +|[boringssl](https://github.com/microsoft/vcpkg/pull/8455)| 2020-04-07 +|[quadtree](https://github.com/microsoft/vcpkg/pull/10787)| 2020-04-13 +|[avisynthplus](https://github.com/microsoft/vcpkg/pull/10496)| 3.5.0 +|[c4core](https://github.com/microsoft/vcpkg/pull/10791)| 2020-04-12 +
+ +
+The following 69 ports have been updated: + +- cub `1.8.0` -> `1.8.0-1` + - [(#10660)](https://github.com/microsoft/vcpkg/pull/10660) [vcpkg] Fix spec instance name + +- vulkan-hpp `2019-05-11` -> `2019-05-11-1` + - [(#10660)](https://github.com/microsoft/vcpkg/pull/10660) [vcpkg] Fix spec instance name + +- function2 `4.0.0` -> `4.1.0` + - [(#10666)](https://github.com/microsoft/vcpkg/pull/10666) [function2] Update to version 4.1.0 + +- libwebsockets `3.2.2-1` -> `4.0.1-1` + - [(#10658)](https://github.com/microsoft/vcpkg/pull/10658) [libwebsockets] Update to 4.0.1 + - [(#10636)](https://github.com/microsoft/vcpkg/pull/10636) [mosquitto] Add support for static build + +- googleapis `0.6.0` -> `0.8.0` + - [(#10651)](https://github.com/microsoft/vcpkg/pull/10651) [googleapis] upgrade to v0.7.0 release + - [(#10885)](https://github.com/microsoft/vcpkg/pull/10885) [googleapis] Update to v0.8.0 + +- ixwebsocket `8.0.5` -> `9.1.9` + - [(#10633)](https://github.com/microsoft/vcpkg/pull/10633) [ixwebsocket] Update to 9.1.9 + +- opus `1.3.1` -> `1.3.1-2` + - [(#10634)](https://github.com/microsoft/vcpkg/pull/10634) [opus] Make AVX an optional feature + +- freerdp `2.0.0-rc4-6` -> `2.0.0-rc4-7` + - [(#10630)](https://github.com/microsoft/vcpkg/pull/10630) [freerdp] Fix include paths and output + +- openvr `1.9.16` -> `1.10.30` + - [(#10629)](https://github.com/microsoft/vcpkg/pull/10629) [openvr] Added Linux support and updated to v1.10.30 + +- abseil `2020-03-03-1` -> `2020-03-03-3` + - [(#10620)](https://github.com/microsoft/vcpkg/pull/10620) [abseil] Fix feature name error + - [(#10721)](https://github.com/microsoft/vcpkg/pull/10721) [abseil] Fix CompressedTuple move constructor on MSVC + +- reproc `11.0.1` -> `12.0.0` + - [(#10594)](https://github.com/microsoft/vcpkg/pull/10594) [reproc] Update to version 12.0.0 + +- hunspell `1.7.0` -> `1.7.0-1` + - [(#10574)](https://github.com/microsoft/vcpkg/pull/10574) [hunspell] Disable build tools in non-Windows + +- sciter `4.4.0.7` -> `4.4.1.5` + - [(#10071)](https://github.com/microsoft/vcpkg/pull/10071) [sciter] Update to 4.4.1.5 + +- qt5-base `5.12.5-11` -> `5.12.5-13` + - [(#10641)](https://github.com/microsoft/vcpkg/pull/10641) [qt5-base] Fix EGL absolute path on Linux + - [(#10746)](https://github.com/microsoft/vcpkg/pull/10746) [qt5] fix some remaining absolute paths. + - [(#9705)](https://github.com/microsoft/vcpkg/pull/9705) [qt5-base, qt5-imageformat] fix issues on osx + +- nana `1.7.2` -> `1.7.2-1` + - [(#10605)](https://github.com/microsoft/vcpkg/pull/10605) [nana] Add Xorg dependency libxcursor-dev and modify deprecated functions + +- blend2d `beta_2019-12-27` -> `beta_2020-04-15` + - [(#10600)](https://github.com/microsoft/vcpkg/pull/10600) [blend2d] Update to beta_2020-03-29 + - [(#10844)](https://github.com/microsoft/vcpkg/pull/10844) [blend2d] Update to beta_2020-04-15 + +- libffi `3.3` -> `3.3-2` + - [(#10485)](https://github.com/microsoft/vcpkg/pull/10485) [libffi] Support arm/arm64 + - [(#10469)](https://github.com/microsoft/vcpkg/pull/10469) [libffi] Check return value of execute_process() + +- fribidi `2019-02-04-2` -> `2019-02-04-3` + - [(#10395)](https://github.com/microsoft/vcpkg/pull/10395) [vcpkg] Make configure meson sane and work for all targets. + - [(#10713)](https://github.com/microsoft/vcpkg/pull/10713) [fribidi] Updated to v1.0.9 + +- libepoxy `1.5.3-2` -> `1.5.3-3` + - [(#10395)](https://github.com/microsoft/vcpkg/pull/10395) [vcpkg] Make configure meson sane and work for all targets. + +- egl-registry `2019-08-08` -> `2020-02-03` + - [(#9965)](https://github.com/microsoft/vcpkg/pull/9965) [angle] Improve port + +- glad `0.1.33` -> `0.1.33-1` + - [(#9965)](https://github.com/microsoft/vcpkg/pull/9965) [angle] Improve port + +- opengl-registry `2019-08-22` -> `2020-02-03` + - [(#9965)](https://github.com/microsoft/vcpkg/pull/9965) [angle] Improve port + +- mpfr `4.0.2-1` -> `4.0.2-2` + - [(#10035)](https://github.com/microsoft/vcpkg/pull/10035) [mpfr] Add mirror for mpfr at gnu.org + +- google-cloud-cpp-common `0.21.0` -> `0.25.0` + - [(#10680)](https://github.com/microsoft/vcpkg/pull/10680) [google-cloud-cpp*] update to the latest release + +- google-cloud-cpp-spanner `0.9.0` -> `1.1.0` + - [(#10680)](https://github.com/microsoft/vcpkg/pull/10680) [google-cloud-cpp*] update to the latest release + +- google-cloud-cpp `0.20.0` -> `0.21.0` + - [(#10680)](https://github.com/microsoft/vcpkg/pull/10680) [google-cloud-cpp*] update to the latest release + +- jsoncons `0.149.0` -> `0.150.0` + - [(#10688)](https://github.com/microsoft/vcpkg/pull/10688) [jsoncons] update to v0.150.0 + +- osg-qt `Qt4` -> `Qt4-1` + - [(#9705)](https://github.com/microsoft/vcpkg/pull/9705) [qt5-base, qt5-imageformat] fix issues on osx + +- qt5-imageformats `5.12.5-2` -> `5.12.5-3` + - [(#9705)](https://github.com/microsoft/vcpkg/pull/9705) [qt5-base, qt5-imageformat] fix issues on osx + +- libpng `1.6.37-6` -> `1.6.37-7` + - [(#6275)](https://github.com/microsoft/vcpkg/pull/6275) Add initial iOS support + +- pcre2 `10.30-6` -> `10.30-7` + - [(#6275)](https://github.com/microsoft/vcpkg/pull/6275) Add initial iOS support + +- curlpp `2018-06-15-2` -> `2018-06-15-3` + - [(#10535)](https://github.com/microsoft/vcpkg/pull/10535) [curlpp] Fix target "curlpp" link "ZLIB::ZLIB" error + +- avro-c `1.9.2` -> `1.9.2-1` + - [(#10514)](https://github.com/microsoft/vcpkg/pull/10514) [avro-c] Fix building avro-c in Linux + +- nlohmann-fifo-map `2018.05.07` -> `2018.05.07-1` + - [(#10850)](https://github.com/microsoft/vcpkg/pull/10850) [nlohmann-fifo-map] Fix could not find a package "nlohmann-fifo-map" + +- cppitertools `2019-04-14-3` -> `2.0` + - [(#10848)](https://github.com/microsoft/vcpkg/pull/10848) [cppitertools] Update to version 2.0 + +- python3 `3.7.3-1` -> `3.7.3-2` + - [(#10841)](https://github.com/microsoft/vcpkg/pull/10841) [python3] fix build on macOS and linux + +- restinio `0.6.5` -> `0.6.6` + - [(#10813)](https://github.com/microsoft/vcpkg/pull/10813) [restinio] Updated to v.0.6.6 + +- libgit2 `0.99.0-1` -> `1.0.0` + - [(#10807)](https://github.com/microsoft/vcpkg/pull/10807) [libgit2] Upgrade to 1.0.0 + +- zstd `1.4.4` -> `1.4.4-1` + - [(#10815)](https://github.com/microsoft/vcpkg/pull/10815) [zstd] export zstd-config.cmake + +- blosc `1.17.1` -> `1.18.1-1` + - [(#10816)](https://github.com/microsoft/vcpkg/pull/10816) [blosc] Update to 1.18.1 + +- freetype `2.10.1-5` -> `2.10.1-6` + - [(#10835)](https://github.com/microsoft/vcpkg/pull/10835) [Freetype] Actually prevent linking HarfBuzz on POSIX + +- gsl `2.4-5` -> `2.6` + - [(#10758)](https://github.com/microsoft/vcpkg/pull/10758) [gsl] update to 2.6 + +- physfs `3.0.2-1` -> `3.0.2-2` + - [(#10781)](https://github.com/microsoft/vcpkg/pull/10781) [physfs] mirror url + +- openssl-windows `1.1.1d-1` -> `1.1.1d-2` + - [(#10743)](https://github.com/microsoft/vcpkg/pull/10743) [openssl-windows] Avoid to install docs for openssl-windows + +- coolprop `6.1.0-4` -> `6.1.0-5` + - [(#10755)](https://github.com/microsoft/vcpkg/pull/10755) [fmt] update to 6.2.0 + +- fmt `6.1.2` -> `6.2.0` + - [(#10755)](https://github.com/microsoft/vcpkg/pull/10755) [fmt] update to 6.2.0 + +- directxmesh `dec2019` -> `dec2019-1` + - [(#10739)](https://github.com/microsoft/vcpkg/pull/10739) [DirectXMesh] Add support build for DirectX12 + +- libvorbis `1.3.6-9eadecc-3` -> `1.3.6-4d963fe` + - [(#10756)](https://github.com/microsoft/vcpkg/pull/10756) [libvorbis] Update to latest commit + +- nuspell `3.0.0` -> `3.1.0` + - [(#10737)](https://github.com/microsoft/vcpkg/pull/10737) [nuspell] update port to v3.1.0 + +- raylib `2.6.0` -> `3.0.0` + - [(#10722)](https://github.com/microsoft/vcpkg/pull/10722) [raylib] Update to 3.0.0 + +- entt `3.3.0` -> `3.3.2` + - [(#10672)](https://github.com/microsoft/vcpkg/pull/10672) [entt] Update to version 3.3.2 + +- indicators `1.5` -> `1.7` + - [(#10685)](https://github.com/microsoft/vcpkg/pull/10685) [indicators] Updated indicators to 1.7 + +- realsense2 `2.33.1` -> `2.33.1-1` + - [(#10673)](https://github.com/microsoft/vcpkg/pull/10673) [realsense2] Add tm2 feature for support T265 devices + +- flatbuffers `1.11.0-1` -> `1.12.0` + - [(#10664)](https://github.com/microsoft/vcpkg/pull/10664) [flatbuffers] Update to 1.12.0 + +- curl `7.68.0-2` -> `7.68.0-3` + - [(#10659)](https://github.com/microsoft/vcpkg/pull/10659) [curl] Fix cmake configure error + +- ismrmrd `1.4.1` -> `1.4.2` + - [(#10618)](https://github.com/microsoft/vcpkg/pull/10618) [ismrmrd] updated to version 1.4.2 + +- mosquitto `1.6.8` -> `1.6.8-1` + - [(#10636)](https://github.com/microsoft/vcpkg/pull/10636) [mosquitto] Add support for static build + +- lz4 `1.9.2` -> `1.9.2-1` + - [(#10452)](https://github.com/microsoft/vcpkg/pull/10452) [lz4] Fix for building Linux shared libraries + +- sdl2 `2.0.10-3` -> `2.0.12` + - [(#10500)](https://github.com/microsoft/vcpkg/pull/10500) [sdl2] Update to 2.0.12 version + +- osg `3.6.4-1` -> `3.6.4-2` + - [(#10082)](https://github.com/microsoft/vcpkg/pull/10082) [osg] Add feature examples and plugins, fix configure options + +- osgearth `2.10.2` -> `2.10.2-1` + - [(#10082)](https://github.com/microsoft/vcpkg/pull/10082) [osg] Add feature examples and plugins, fix configure options + +- ms-gsl `2.1.0` -> `3.0.0` + - [(#10872)](https://github.com/microsoft/vcpkg/pull/10872) [ms-gsl] Update version to v3.0.0 + - [(#10831)](https://github.com/microsoft/vcpkg/pull/10831) [ms-gsl] Update to v3.0.0 + +- cppgraphqlgen `3.2.0` -> `3.2.1` + - [(#10869)](https://github.com/microsoft/vcpkg/pull/10869) [cppgraphqlgen] Update to v3.2.1 + +- cgal `5.0.2` -> `5.0.2-1` + - [(#10879)](https://github.com/microsoft/vcpkg/pull/10879) [cgal] Add dependency boost-interval + +- arrow `0.16.0` -> `0.17.0` + - [(#10883)](https://github.com/microsoft/vcpkg/pull/10883) [Arrow] Update to 0.17 + +- xerces-c `3.2.2-13` -> `3.2.3` + - [(#10779)](https://github.com/microsoft/vcpkg/pull/10779) [xerces-c] Update to version 3.2.3 + +- libarchive `3.4.1` -> `3.4.1-1` + - [(#10769)](https://github.com/microsoft/vcpkg/pull/10769) [libarchive, libuv]Fix static linkage + +- libuv `1.34.2` -> `1.34.2-1` + - [(#10769)](https://github.com/microsoft/vcpkg/pull/10769) [libarchive, libuv]Fix static linkage + +- qscintilla `2.10-11` -> `2.11.4-1` + - [(#10511)](https://github.com/microsoft/vcpkg/pull/10511) [qscintilla] Update to 2.11.4 + +
+ +-- vcpkg team vcpkg@microsoft.com MON, 20 April 15:00:00 -0700 + + +vcpkg (2020.01.31) +--- +#### Total port count: 1295 +#### Total port count per triplet (tested): +|triplet|ports available| +|---|---| +|**x64-windows**|1195| +|x86-windows|1183| +|x64-windows-static|1104| +|**x64-linux**|1054| +|**x64-osx**|970| +|arm64-windows|814| +|x64-uwp|644| +|arm-uwp|615| + +#### The following documentation has been updated: +- [Triplets](docs/users/triplets.md) + - [(#7976)](https://github.com/microsoft/vcpkg/pull/7976) Community Triplets 🤠(by @vicroms) + +#### The following *remarkable* changes have been made to vcpkg's infrastructure: +- Allow untested triplet configurations as "Community Triplets" + - [(#7976)](https://github.com/microsoft/vcpkg/pull/7976) Community Triplets 🤠(by @vicroms) +- Add community support for MinGW + - [(#9137)](https://github.com/microsoft/vcpkg/pull/9137) Add community support for building with MinGW (by @cristianadam) + - [(#9807)](https://github.com/microsoft/vcpkg/pull/9807) MinGW: Fix vcpkg common definitions (by @cristianadam) +- Allow ARM/ARM64 toolchains to be selected when building x86 targets, also allow ARM64 to target ARM + - [(#9578)](https://github.com/microsoft/vcpkg/pull/9578) [vcpkg] Mark ARM and x86 on ARM64 and x86 on ARM as supported architectures when searching for toolchains on Windows (by @cbezault) + +#### The following *additional* changes have been made to vcpkg's infrastructure: +- [(#9435)](https://github.com/microsoft/vcpkg/pull/9435) Update CI baseline (by @NancyLi1013) +- [(#9494)](https://github.com/microsoft/vcpkg/pull/9494) [charls] Upgrade to 2.1.0 (by @vbaderks) +- [(#9379)](https://github.com/microsoft/vcpkg/pull/9379) [uvatlas] Upgrade to dec2019 (by @AlvinZhangH) +- [(#9529)](https://github.com/microsoft/vcpkg/pull/9529) [box2d] Update to 2019-12-31 (by @PhoebeHui) +- [(#9513)](https://github.com/microsoft/vcpkg/pull/9513) [wpilib] Update to 2020.1.1 (by @ThadHouse) +- [(#9499)](https://github.com/microsoft/vcpkg/pull/9499) [akali] Add new port (by @winsoft666) +- [(#9301)](https://github.com/microsoft/vcpkg/pull/9301) [sdl1] Add build support for ARM64 Windows 10 (by @shibayan) +- [(#9260)](https://github.com/microsoft/vcpkg/pull/9260) [qt5-base] Fix Qt5 linux build and be a bit less flaky in CI (by @Neumann-A) +- [(#9308)](https://github.com/microsoft/vcpkg/pull/9308) [pdal] Fix static build (by @JackBoosY) +- [(#8701)](https://github.com/microsoft/vcpkg/pull/8701) [nethost] Adding a port for nethost (by @tannergooding) +- [(#8650)](https://github.com/microsoft/vcpkg/pull/8650) [libmagic] Add new port (by @NancyLi1013) +- [(#8386)](https://github.com/microsoft/vcpkg/pull/8386) [tfhe] Add new port (by @NancyLi1013) +- [(#8518)](https://github.com/microsoft/vcpkg/pull/8518) [libb2] Add new port (by @NancyLi1013) +- [(#9605)](https://github.com/microsoft/vcpkg/pull/9605) Add December changelog (by @grdowns) +- [(#9566)](https://github.com/microsoft/vcpkg/pull/9566) [vcpkg] Fix a typo (by @MaherJendoubi) +- [(#9207)](https://github.com/microsoft/vcpkg/pull/9207) [sdl1]Change build method to vcpkg_*_make (by @JackBoosY) +- [(#6393)](https://github.com/microsoft/vcpkg/pull/6393) Map MinSizeRel and RelWithDebInfo correctly (by @Neumann-A) +- [(#9458)](https://github.com/microsoft/vcpkg/pull/9458) [azure-kinect-sensor-sdk] Remove feature test and fix static build in Windows (by @JackBoosY) +- [(#8936)](https://github.com/microsoft/vcpkg/pull/8936) [libplist] Update to 1.2.137 (by @PhoebeHui) +- [(#8888)](https://github.com/microsoft/vcpkg/pull/8888) [caf] Update to 0.17.2 (by @JackBoosY) +- [(#8683)](https://github.com/microsoft/vcpkg/pull/8683) [libwandio] Add new port (by @NancyLi1013) +- [(#8678)](https://github.com/microsoft/vcpkg/pull/8678) [libevhtp] Add new port (by @NancyLi1013) +- [(#9600)](https://github.com/microsoft/vcpkg/pull/9600) Update baseline to fix osx failure (by @JackBoosY) +- [(#9669)](https://github.com/microsoft/vcpkg/pull/9669) [vcpkg] Update baseline for OSX (by @ras0219-msft) +- [(#9649)](https://github.com/microsoft/vcpkg/pull/9649) [tfhe] Fix Mac support (by @SeekingMeaning) +- [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d (by @Neumann-A) +- [(#9642)](https://github.com/microsoft/vcpkg/pull/9642) Introduce new policy to skip post verification of dll exports (by @martin-s) +- [(#9602)](https://github.com/microsoft/vcpkg/pull/9602) [vcpkg] Fix build type in vcpkg_build_make.cmake [x264] Modernize (by @NancyLi1013) +- [(#9536)](https://github.com/microsoft/vcpkg/pull/9536) Minor edit to help message for cli depend-info option. Fix for #9534. (by @dbird137) +- [(#9617)](https://github.com/microsoft/vcpkg/pull/9617) [akali] Update to v1.41 (by @winsoft666) +- [(#9572)](https://github.com/microsoft/vcpkg/pull/9572) [soem] Add new port (by @seanyen) +- [(#9574)](https://github.com/microsoft/vcpkg/pull/9574) [doxygen] Updated to 1.8.17 (by @tagsemb) +- [(#9372)](https://github.com/microsoft/vcpkg/pull/9372) [VCPKG] WinHTTPOption for company Proxy not correctly taken into account (by @xabbudm) +- [(#9720)](https://github.com/microsoft/vcpkg/pull/9720) [toolsrc] Added missing @ to FATAL_ERROR message (by @theriverman) +- [(#9555)](https://github.com/microsoft/vcpkg/pull/9555) [embree3] added cleanup command to embree3 port for static build (by @xelatihy) +- [(#9684)](https://github.com/microsoft/vcpkg/pull/9684) [teemo] new port. (by @winsoft666) +- [(#9591)](https://github.com/microsoft/vcpkg/pull/9591) [scintilla] Update to 4.2.3 (by @SeekingMeaning) +- [(#9767)](https://github.com/microsoft/vcpkg/pull/9767) [open62541] Update to v1.0 (by @yurybura) +- [(#9760)](https://github.com/microsoft/vcpkg/pull/9760) [monkeys-audio] Update to 5.14, add feature tools (by @JackBoosY) +- [(#9770)](https://github.com/microsoft/vcpkg/pull/9770) [asmjit] update to current version (by @jsmolka) +- [(#9708)](https://github.com/microsoft/vcpkg/pull/9708) [doxygen] Add alternative download URL (by @c72578) +- [(#9690)](https://github.com/microsoft/vcpkg/pull/9690) [string_theory] Update to 3.0 (by @zrax) +- [(#9680)](https://github.com/microsoft/vcpkg/pull/9680) [jasper] freeglut is not a dependency in macOS (by @david-antiteum) +- [(#9633)](https://github.com/microsoft/vcpkg/pull/9633) [cryptopp] Fixed build error on ARM32/ARM64 Windows (by @shibayan) +- [(#9281)](https://github.com/microsoft/vcpkg/pull/9281) [pbc] Correct non Windows build (by @decent-dcore) +- [(#9816)](https://github.com/microsoft/vcpkg/pull/9816) Make VS 2019 default to x64 triplet if CMAKE_GENERATOR_PLATFORM is not defined (by @Neumann-A) +- [(#9541)](https://github.com/microsoft/vcpkg/pull/9541) [memorymodule] Add new port (by @myd7349) +- [(#9521)](https://github.com/microsoft/vcpkg/pull/9521) [ftgl] Fix build failure #9520 (by @sma-github) +- [(#9456)](https://github.com/microsoft/vcpkg/pull/9456) [asiosdk] Add new port (by @batlogic) +- [(#9314)](https://github.com/microsoft/vcpkg/pull/9314) [sdl2-gfx] Fixed build error ARM64 Windows 10 (by @shibayan) +- [(#9265)](https://github.com/microsoft/vcpkg/pull/9265) Update the repo for jom 1.1.3 (by @zigguratvertigo) +- [(#8774)](https://github.com/microsoft/vcpkg/pull/8774) [vcpkg_find_acquire_program] Include version in downloaded python MSI… (by @ras0219-msft) +- [(#9698)](https://github.com/microsoft/vcpkg/pull/9698) [seal] Add new port (by @musaprg) +- [(#8832)](https://github.com/microsoft/vcpkg/pull/8832) [aws-*]Update version (by @JackBoosY) + +
+The following 22 ports have been added: + +|port|version| +|---|---| +|[argumentum](https://github.com/microsoft/vcpkg/pull/9478)| 0.2.2 +|[tabulate](https://github.com/microsoft/vcpkg/pull/9543)| 2019-01-06 +|[akali](https://github.com/microsoft/vcpkg/pull/9499)[#9617](https://github.com/microsoft/vcpkg/pull/9617) | 1.41 +|[nethost](https://github.com/microsoft/vcpkg/pull/8701)| 2019-12-21 +|[libmagic](https://github.com/microsoft/vcpkg/pull/8650)| 5.37 +|[yas](https://github.com/microsoft/vcpkg/pull/8891)| 7.0.4 +|[tfhe](https://github.com/microsoft/vcpkg/pull/8386)[#9649](https://github.com/microsoft/vcpkg/pull/9649) | 1.0.1-1 +|[libb2](https://github.com/microsoft/vcpkg/pull/8518)| 0.98.1 +|[libaaplus](https://github.com/microsoft/vcpkg/pull/9194)[#9579](https://github.com/microsoft/vcpkg/pull/9579) [#9664](https://github.com/microsoft/vcpkg/pull/9664) | 2.12 +|[libwandio](https://github.com/microsoft/vcpkg/pull/8683)| 4.2.1 +|[libevhtp](https://github.com/microsoft/vcpkg/pull/8678)| 1.2.18 +|[soem](https://github.com/microsoft/vcpkg/pull/9572)| 1.4.0 +|[glui](https://github.com/microsoft/vcpkg/pull/9155)| 2019-11-30 +|[teemo](https://github.com/microsoft/vcpkg/pull/9684)| 1.2 +|[mqtt-cpp](https://github.com/microsoft/vcpkg/pull/9787)| 7.0.1 +|[msgpack11](https://github.com/microsoft/vcpkg/pull/9524)| 0.0.10 +|[mcpp](https://github.com/microsoft/vcpkg/pull/9598)| 2.7.2.14 +|[memorymodule](https://github.com/microsoft/vcpkg/pull/9541)| 2019-12-31 +|[asiosdk](https://github.com/microsoft/vcpkg/pull/9456)| 2.3.3 +|[sfsexp](https://github.com/microsoft/vcpkg/pull/9420)| 1.3 +|[quaternions](https://github.com/microsoft/vcpkg/pull/9837)| 1.0.0 +|[seal](https://github.com/microsoft/vcpkg/pull/9698)| 3.4.5 +
+ +
+The following 226 ports have been updated: + +- simpleini `2018-08-31-3` -> `2018-08-31-4` + - [(#9429)](https://github.com/microsoft/vcpkg/pull/9429) [simpleini] Install missing code + +- directxtk `dec2019` -> `2019-12-31` + - [(#9508)](https://github.com/microsoft/vcpkg/pull/9508) [directxtk] Fix invalid solution configuration + +- nameof `0.9.2` -> `0.9.3` + - [(#9503)](https://github.com/microsoft/vcpkg/pull/9503) [nameof] Update to 0.9.3 + +- charls `2.0.0-3` -> `2.1.0-1` + - [(#9494)](https://github.com/microsoft/vcpkg/pull/9494) [charls] upgrade to 2.1.0 + +- ptex `2.3.2` -> `2.3.2-1` + - [(#9455)](https://github.com/microsoft/vcpkg/pull/9455) [ptext] Fix library cannot be found by find_package() + +- fruit `3.4.0-1` -> `3.4.0-2` + - [(#9445)](https://github.com/microsoft/vcpkg/pull/9445) [fruit] fix wchar.h import issue under Catalina + +- libxlsxwriter `0.8.7-1` -> `0.9.4` + - [(#9410)](https://github.com/microsoft/vcpkg/pull/9410) [libxlsxwriter] upgrade to 0.8.9 + - [(#9775)](https://github.com/microsoft/vcpkg/pull/9775) [libxlsxwriter] upgrade to 0.9.4 + +- uvatlas `apr2019` -> `dec2019` + - [(#9379)](https://github.com/microsoft/vcpkg/pull/9379) [uvatlas] Upgrade to dec2019 + +- grpc `1.23.1-1` -> `1.26.0` + - [(#9135)](https://github.com/microsoft/vcpkg/pull/9135) [grpc] Update grpc to 1.24.3 + - [(#9363)](https://github.com/microsoft/vcpkg/pull/9363) [grpc] Upgrade to gRPC-1.26.0 + +- freetype `2.10.1-1` -> `2.10.1-3` + - [(#9311)](https://github.com/microsoft/vcpkg/pull/9311) [freetype] use config and the correct alias + - [(#9706)](https://github.com/microsoft/vcpkg/pull/9706) [freetype] Add feature support + +- glibmm `2.52.1-10` -> `2.52.1-11` + - [(#9562)](https://github.com/microsoft/vcpkg/pull/9562) [glibmm] Fix build error on Linux + +- libfreenect2 `0.2.0-3` -> `0.2.0-4` + - [(#9551)](https://github.com/microsoft/vcpkg/pull/9551) [libfreenect2] add opengl and opencl features + +- jsoncons `0.140.0` -> `0.143.1` + - [(#9547)](https://github.com/microsoft/vcpkg/pull/9547) [jsoncons] Update to 0.143.1 + +- uwebsockets `0.16.5` -> `0.17.0a4` + - [(#9535)](https://github.com/microsoft/vcpkg/pull/9535) [uwebsockets] Update to 0.17.0 alpha 4 + +- box2d `2.3.1-374664b-2` -> `2019-12-31` + - [(#9529)](https://github.com/microsoft/vcpkg/pull/9529) [box2d] Update to 2019-12-31 + +- parallel-hashmap `1.27` -> `1.30` + - [(#9519)](https://github.com/microsoft/vcpkg/pull/9519) [parallel-hashmap] Update to 1.30 + +- wpilib `2019.6.1` -> `2020.1.1` + - [(#9513)](https://github.com/microsoft/vcpkg/pull/9513) [wpilib] update to 2020.1.1 + +- check `0.13.0-1` -> `0.13.0-2` + - [(#9510)](https://github.com/microsoft/vcpkg/pull/9510) [check/gettimeofday] Move static libraries to manual-link + +- gettimeofday `2017-10-14-2` -> `2017-10-14-3` + - [(#9510)](https://github.com/microsoft/vcpkg/pull/9510) [check/gettimeofday] Move static libraries to manual-link + +- magic-enum `0.6.3-1` -> `0.6.4` + - [(#9502)](https://github.com/microsoft/vcpkg/pull/9502) [magic-enum] Update to v0.6.4 + +- simdjson `2019-08-05` -> `2019-12-27` + - [(#9484)](https://github.com/microsoft/vcpkg/pull/9484) [simdjson] Update library + +- cpp-httplib `0.4.2` -> `0.5.1` + - [(#9480)](https://github.com/microsoft/vcpkg/pull/9480) [cpp-httplib] Update library to 0.5.1 + +- blend2d `beta_2019-10-09` -> `beta_2019-12-27` + - [(#9448)](https://github.com/microsoft/vcpkg/pull/9448) [blend2d] Update to beta_2019-12-27 + +- parallelstl `20190522-1` -> `20191218` + - [(#9443)](https://github.com/microsoft/vcpkg/pull/9443) [parallelstl] Update to latest version and fix find_package unable to find ParallelSTLConfig.cmake + +- sdl2pp `0.16.0-1` -> `0.16.0-2` + - [(#9428)](https://github.com/microsoft/vcpkg/pull/9428) [sdl2pp] Fix find dependencies + +- basisu `1.11-2` -> `1.11-3` + - [(#9425)](https://github.com/microsoft/vcpkg/pull/9425) [basisu] update from upstream repository, add support for pvrtc2 + +- devil `1.8.0-4` -> `1.8.0-5` + - [(#9341)](https://github.com/microsoft/vcpkg/pull/9341) [devil] fix OpenEXR not found + +- sdl1 `1.2.15-8` -> `1.2.15-9` + - [(#9301)](https://github.com/microsoft/vcpkg/pull/9301) [sdl1] Add build support for ARM64 Windows 10 + - [(#9207)](https://github.com/microsoft/vcpkg/pull/9207) [sdl1]Change build method to vcpkg_*_make + +- qt5-base `5.12.5-7` -> `5.12.5-8` + - [(#9260)](https://github.com/microsoft/vcpkg/pull/9260) [qt5-base] Fix Qt5 linux build and be a bit less flaky in CI + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- qt5-imageformats `5.12.5-1` -> `5.12.5-2` + - [(#9260)](https://github.com/microsoft/vcpkg/pull/9260) [qt5-base] Fix Qt5 linux build and be a bit less flaky in CI + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- qt5-tools `5.12.5-2` -> `5.12.5-3` + - [(#9260)](https://github.com/microsoft/vcpkg/pull/9260) [qt5-base] Fix Qt5 linux build and be a bit less flaky in CI + +- qt5-xmlpatterns `5.12.5` -> `5.12.5-1` + - [(#9260)](https://github.com/microsoft/vcpkg/pull/9260) [qt5-base] Fix Qt5 linux build and be a bit less flaky in CI + +- vtk `8.2.0-9` -> `8.2.0-10` + - [(#9260)](https://github.com/microsoft/vcpkg/pull/9260) [qt5-base] Fix Qt5 linux build and be a bit less flaky in CI + - [(#9219)](https://github.com/microsoft/vcpkg/pull/9219) [vtk] fix VTKConfig.cmake path + +- libevent `2.1.11-2` -> `2.1.11-4` + - [(#9292)](https://github.com/microsoft/vcpkg/pull/9292) [libevent] Fix include headers fails on x64-windows, using CMAKE + - [(#9232)](https://github.com/microsoft/vcpkg/pull/9232) [libevent] remove dependency of default feature + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- pdal `1.7.1-6` -> `1.7.1-8` + - [(#9308)](https://github.com/microsoft/vcpkg/pull/9308) [pdal] fix static build + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- xsimd `7.2.5` -> `7.4.5` + - [(#9158)](https://github.com/microsoft/vcpkg/pull/9158) [xsimd][xtensor][xtl] Update to lastest + +- xtensor-blas `0.16.1` -> `0.17.1` + - [(#9158)](https://github.com/microsoft/vcpkg/pull/9158) [xsimd][xtensor][xtl] Update to lastest + +- xtensor-io `0.7.0` -> `0.9.0` + - [(#9158)](https://github.com/microsoft/vcpkg/pull/9158) [xsimd][xtensor][xtl] Update to lastest + +- xtensor `0.20.8` -> `0.21.2` + - [(#9158)](https://github.com/microsoft/vcpkg/pull/9158) [xsimd][xtensor][xtl] Update to lastest + +- xtl `0.6.5` -> `0.6.10` + - [(#9158)](https://github.com/microsoft/vcpkg/pull/9158) [xsimd][xtensor][xtl] Update to lastest + +- freeimage `3.18.0-7` -> `3.18.0-8` + - [(#8707)](https://github.com/microsoft/vcpkg/pull/8707) [freeimage libraw] Fix case issue on Linux + +- libraw `201903-2` -> `201903-3` + - [(#8707)](https://github.com/microsoft/vcpkg/pull/8707) [freeimage libraw] Fix case issue on Linux + +- cgl `0.60.2-1` -> `0.60.2-2` + - [(#8807)](https://github.com/microsoft/vcpkg/pull/8807) [cgl] Fix cgl cannot be found + +- nanovg `2019-8-30-1` -> `2019-8-30-3` + - [(#8813)](https://github.com/microsoft/vcpkg/pull/8813) [nanovg] Add dependency port stb + +- hdf5 `1.10.5-8` -> `1.10.5-9` + - [(#9043)](https://github.com/microsoft/vcpkg/pull/9043) [hdf5] Fix static builds when building dynamic builds + - [(#9413)](https://github.com/microsoft/vcpkg/pull/9413) [HDF5] Correct SZIP linkage, modernize portfile + +- cgicc `3.2.19-3` -> `3.2.19-4` + - [(#9123)](https://github.com/microsoft/vcpkg/pull/9123) [many ports] Add mirror + - [(#8558)](https://github.com/microsoft/vcpkg/pull/8558) [cgicc]Fix usage error:lnk2019. + +- gsl `2.4-4` -> `2.4-5` + - [(#9123)](https://github.com/microsoft/vcpkg/pull/9123) [many ports] Add mirror + +- libidn2 `2.2.0` -> `2.2.0-1` + - [(#9123)](https://github.com/microsoft/vcpkg/pull/9123) [many ports] Add mirror + +- libmicrohttpd `0.9.63-1` -> `0.9.63-2` + - [(#9123)](https://github.com/microsoft/vcpkg/pull/9123) [many ports] Add mirror + +- libosip2 `5.1.0-1` -> `5.1.0-3` + - [(#9123)](https://github.com/microsoft/vcpkg/pull/9123) [many ports] Add mirror + - [(#9602)](https://github.com/microsoft/vcpkg/pull/9602) [vcpkg] Fix build type in vcpkg_build_make.cmake [x264] Modernize + +- libiconv `1.15-6` -> `1.16-1` + - [(#9229)](https://github.com/microsoft/vcpkg/pull/9229) [libiconv] Make built libraries relocatable + +- bullet3 `2.88-1` -> `2.89` + - [(#9098)](https://github.com/microsoft/vcpkg/pull/9098) [bullet3] Install CMake toolchain files and targets + - [(#9663)](https://github.com/microsoft/vcpkg/pull/9663) [bullet3] Update to 2.89 + +- fmt `6.0.0` -> `6.0.0-1` + - [(#9121)](https://github.com/microsoft/vcpkg/pull/9121) [fmt] Disable warning C4189 on Visual Studio 2015 + +- otl `4.0.448` -> `4.0.451` + - [(#9107)](https://github.com/microsoft/vcpkg/pull/9107) [otl] Fix header file name and version number + - [(#9579)](https://github.com/microsoft/vcpkg/pull/9579) [otl libaaplus forge] Fix build issues + - [(#9552)](https://github.com/microsoft/vcpkg/pull/9552) [otl] Update to version 4.0.451 + +- liblzma `5.2.4-2` -> `5.2.4-3` + - [(#9192)](https://github.com/microsoft/vcpkg/pull/9192) [liblzma] Stop exporting HAVE_CONFIG_H + +- glib `2.52.3-14-4` -> `2.52.3-14-5` + - [(#9054)](https://github.com/microsoft/vcpkg/pull/9054) [glib] Install msvc_recommended_pragmas.h to /installed/include + +- curl `7.66.0-1` -> `7.68.0` + - [(#8973)](https://github.com/microsoft/vcpkg/pull/8973) [curl] Disable export of Curl::curl targets when building 'tool' feature + - [(#9589)](https://github.com/microsoft/vcpkg/pull/9589) [curl] Update to 7.68.0 + +- forge `1.0.4-1` -> `1.0.4-2` + - [(#9579)](https://github.com/microsoft/vcpkg/pull/9579) [otl libaaplus forge] Fix build issues + +- reproc `9.0.0` -> `10.0.3` + - [(#9544)](https://github.com/microsoft/vcpkg/pull/9544) [reproc] Update to v10.0.3. + +- cpp-netlib `0.13.0-2` -> `0.13.0-3` + - [(#9537)](https://github.com/microsoft/vcpkg/pull/9537) [cpp-netlib] Fix cmake path, add homepage + +- proj4 `6.2.1-1` -> `6.3.0-1` + - [(#9437)](https://github.com/microsoft/vcpkg/pull/9437) [sqlite3] Rename sqlite3 tool as sqlite3.exe + - [(#9573)](https://github.com/microsoft/vcpkg/pull/9573) [proj4] Update to version 6.3.0 + +- sqlite3 `3.30.1-1` -> `3.30.1-2` + - [(#9437)](https://github.com/microsoft/vcpkg/pull/9437) [sqlite3] Rename sqlite3 tool as sqlite3.exe + +- msix `MsixCoreInstaller-preview-1` -> `1.7` + - [(#8934)](https://github.com/microsoft/vcpkg/pull/8934) [msix] Update to 1.7 + +- xmsh `0.4.1` -> `0.5.2` + - [(#7155)](https://github.com/microsoft/vcpkg/pull/7155) [xmsh]Upgrade version to 0.5.2 and fix build failure. + +- opencolorio `1.1.1` -> `1.1.1-2` + - [(#8920)](https://github.com/microsoft/vcpkg/pull/8920) [opencolorio] Modify find python2 to find python3 + - [(#9755)](https://github.com/microsoft/vcpkg/pull/9755) [opencolorio] fix lcms dependency + +- graphicsmagick `1.3.33-1` -> `1.3.34` + - [(#9596)](https://github.com/microsoft/vcpkg/pull/9596) [graphicsmagick] Updated to GraphicsMagick-1.3.34 + +- openal-soft `1.19.1-2` -> `1.20.0` + - [(#9583)](https://github.com/microsoft/vcpkg/pull/9583) [openal-soft] Update OpenAL Soft to 1.20.0 + +- google-cloud-cpp `0.15.0` -> `0.17.0` + - [(#9576)](https://github.com/microsoft/vcpkg/pull/9576) [google-cloud-cpp] Upgrade to v0.17.0 + +- openmvs `1.0-3` -> `1.0.1` + - [(#9563)](https://github.com/microsoft/vcpkg/pull/9563) [openmvs] Update to 1.0.1 + +- ixwebsocket `7.4.0` -> `7.9.2` + - [(#9397)](https://github.com/microsoft/vcpkg/pull/9397) [ixwebsocket] update to 7.6.3 + +- azure-kinect-sensor-sdk `1.4.0-alpha.0` -> `1.4.0-alpha.0-2` + - [(#9458)](https://github.com/microsoft/vcpkg/pull/9458) [azure-kinect-sensor-sdk] Remove feature test and fix static build in Windows + - [(#9763)](https://github.com/microsoft/vcpkg/pull/9763) [azure-kinect-sensor-sdk] Fix *.dll install path + +- netcdf-c `4.7.0-5` -> `4.7.3-1` + - [(#9361)](https://github.com/microsoft/vcpkg/pull/9361) [netcdf-c] Update to 4.7.3 and switched to use targets to generate valid targets + - [(#9721)](https://github.com/microsoft/vcpkg/pull/9721) [netcdf-c] Fix builds with hdf5[parallel] + +- realsense2 `2.22.0-2` -> `2.30.0` + - [(#9220)](https://github.com/microsoft/vcpkg/pull/9220) [realsense2] update to 2.30 + +- libplist `1.2.77` -> `1.2.137` + - [(#8936)](https://github.com/microsoft/vcpkg/pull/8936) [libplist] Update to 1.2.137 + +- ismrmrd `1.4.0-1` -> `1.4.1` + - [(#8880)](https://github.com/microsoft/vcpkg/pull/8880) [ismrmrd] Update to 1.4.1 + +- caf `0.16.3` -> `0.17.2` + - [(#8888)](https://github.com/microsoft/vcpkg/pull/8888) [caf] Update to 0.17.2 + +- openmvg `1.4-6` -> `1.4-7` + - [(#8824)](https://github.com/microsoft/vcpkg/pull/8824) [openmvg]Fix path in openmvg-config.cmake. + +- qhull `7.3.2-1` -> `7.3.2-2` + - [(#9651)](https://github.com/microsoft/vcpkg/pull/9651) [qhull] Fix Mac support + +- cppmicroservices `4.0.0-pre1` -> `v3.4.0` + - [(#9600)](https://github.com/microsoft/vcpkg/pull/9600) Update baseline to fix osx failure + +- libguarded `2019-08-27` -> `2019-08-27-1` + - [(#9600)](https://github.com/microsoft/vcpkg/pull/9600) Update baseline to fix osx failure + +- sfgui `0.4.0-2` -> `0.4.0-3` + - [(#9625)](https://github.com/microsoft/vcpkg/pull/9625) [sfgui] fix sfgui on macOS + +- azure-storage-cpp `7.0.0` -> `7.1.0-1` + - [(#9646)](https://github.com/microsoft/vcpkg/pull/9646) [azure-storage-cpp]Upgrade to 7.1.0 + - [(#9852)](https://github.com/microsoft/vcpkg/pull/9852) [azure-storage-cpp] Azure storage only requires gettext on OSX + +- ace `6.5.7` -> `6.5.7-1` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + - [(#9016)](https://github.com/microsoft/vcpkg/pull/9016) [ace] Let `ssl` feature able to work on Linux when selected + +- freerdp `2.0.0-rc4-3` -> `2.0.0-rc4-4` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- freetds `1.1.6-1` -> `1.1.17` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- libmysql `8.0.4-4` -> `8.0.4-5` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- libpq `9.6.3` -> `12.0` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- librtmp `2019-11-11` -> `2019-11-11_1` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- libssh `0.7.6-1` -> `0.9.0` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- libwebsockets `3.2.0` -> `3.2.2` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + - [(#9734)](https://github.com/microsoft/vcpkg/pull/9734) [libwebsockets] Update to v3.2.2 + +- mosquitto `1.6.7` -> `1.6.7-2` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + - [(#9754)](https://github.com/microsoft/vcpkg/pull/9754) [mosquitto] Install mosquittopp.lib to dest + +- nmap `7.70-1` -> `7.70-4` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + - [(#9703)](https://github.com/microsoft/vcpkg/pull/9703) Update portfiles to use VCPKG_BUILD_TYPE + +- openssl-unix `1.0.2s-1` -> `1.1.1d-1` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- openssl-uwp `1.0.2r-1` -> `1.1.1d-1` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + - [(#9703)](https://github.com/microsoft/vcpkg/pull/9703) Update portfiles to use VCPKG_BUILD_TYPE + +- openssl-windows `1.0.2s-2` -> `1.1.1d-1` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + - [(#9703)](https://github.com/microsoft/vcpkg/pull/9703) Update portfiles to use VCPKG_BUILD_TYPE + +- qt5-graphicaleffects `5.12.5` -> `5.12.5-1` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- quickfix `1.15.1-1` -> `1.15.1-3` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- slikenet `2019-10-22` -> `2019-10-22_1` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- xmlsec `1.2.29` -> `1.2.29-1` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- yara `3.10.0` -> `3.10.0-1` + - [(#8566)](https://github.com/microsoft/vcpkg/pull/8566) [libpq, openssl, librtmp] libpq 12 and others with openssl 1.1.1d + +- x264 `157-303c484ec828ed0-6` -> `157-303c484ec828ed0-7` + - [(#9602)](https://github.com/microsoft/vcpkg/pull/9602) [vcpkg] Fix build type in vcpkg_build_make.cmake [x264] Modernize + +- glfw3 `3.3-3` -> `3.3.1` + - [(#9626)](https://github.com/microsoft/vcpkg/pull/9626) [glfw3] Update to 3.3.1 + +- glad `0.1.31` -> `0.1.33` + - [(#9627)](https://github.com/microsoft/vcpkg/pull/9627) [glad] Update to 0.1.33 + +- libxml2 `2.9.9-4` -> `2.9.9-5` + - [(#9636)](https://github.com/microsoft/vcpkg/pull/9636) [libxml2] Apply fixes also to the target of libxml2. + - [(#9492)](https://github.com/microsoft/vcpkg/pull/9492) [libxml2] Embed resources in Windows-based shared library (#9474) + +- gettext `0.19-11` -> `0.19-13` + - [(#9610)](https://github.com/microsoft/vcpkg/pull/9610) [gettext] Add dependency on iconv + - [(#9797)](https://github.com/microsoft/vcpkg/pull/9797) [gettext] fix library placement on macOS + +- xlnt `1.3.0-2` -> `1.4.0` + - [(#9609)](https://github.com/microsoft/vcpkg/pull/9609) [xlnt] Upgrade to v1.4.0 + +- cpr `1.3.0-7` -> `1.3.0-8` + - [(#9567)](https://github.com/microsoft/vcpkg/pull/9567) [cpr] Add find_dependency to cprConfig.cmake + +- sfml `2.5.1-4` -> `2.5.1-6` + - [(#9190)](https://github.com/microsoft/vcpkg/pull/9190) [sfml] Declare Windows library export + - [(#9726)](https://github.com/microsoft/vcpkg/pull/9726) Fix osx baseline build failures + +- libtorrent `1.2.2` -> `1.2.2-1` + - [(#7345)](https://github.com/microsoft/vcpkg/pull/7345) [libtorrent] Fix linkage issues for dynamic builds + +- libffi `3.1-6` -> `3.1-7` + - [(#8895)](https://github.com/microsoft/vcpkg/pull/8895) [libffi] Add libffiConfigVersion.cmake file + +- plplot `5.13.0-3` -> `5.13.0-4` + - [(#8817)](https://github.com/microsoft/vcpkg/pull/8817) [plplot] Fix static build issue + +- libpqxx `6.4.5` -> `6.4.5-1` + - [(#9051)](https://github.com/microsoft/vcpkg/pull/9051) [libpqxx] Fix lib name on Linux + +- freeglut `3.0.0-7` -> `3.0.0-9` + - [(#9155)](https://github.com/microsoft/vcpkg/pull/9155) [glui] Add new port + - [(#9725)](https://github.com/microsoft/vcpkg/pull/9725) [freeglut] Patch header correctly + - [(#9745)](https://github.com/microsoft/vcpkg/pull/9745) [freeglut] check whether debug/release is enabled before moving files + +- ffmpeg `4.2-2` -> `4.2-4` + - [(#9695)](https://github.com/microsoft/vcpkg/pull/9695) [ffmpeg] fix openssl detection + - [(#9718)](https://github.com/microsoft/vcpkg/pull/9718) [ffmpeg] fix link order + +- catch2 `2.11.0` -> `2.11.1` + - [(#9685)](https://github.com/microsoft/vcpkg/pull/9685) [catch2] Update to 2.11.1 + +- boost-accumulators `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-algorithm `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-align `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-any `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-array `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-asio `1.71.0-1` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-assert `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-assign `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-atomic `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-beast `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-bimap `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-bind `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-build `1.70.0-1` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-callable-traits `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-chrono `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-circular-buffer `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-compatibility `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-compute `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-concept-check `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-config `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-container-hash `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-container `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-context `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-contract `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-conversion `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-convert `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-core `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-coroutine `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-coroutine2 `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-crc `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-date-time `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-detail `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-disjoint-sets `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-dll `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-dynamic-bitset `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-endian `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-exception `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-fiber `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-filesystem `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-flyweight `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-foreach `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-format `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-function-types `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-function `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-functional `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-fusion `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-geometry `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-gil `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-graph-parallel `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- boost-graph `1.71.0` -> `1.72.0` + - [(#9317)](https://github.com/microsoft/vcpkg/pull/9317) [boost] Update to 1.72.0 + +- embree3 `3.6.1` -> `3.6.1-1` + - [(#9555)](https://github.com/microsoft/vcpkg/pull/9555) [embree3] added cleanup command to embree3 port for static build + +- libarchive `3.4.0-2` -> `3.4.1` + - [(#9676)](https://github.com/microsoft/vcpkg/pull/9676) [libarchive] Update to 3.4.1 + +- tinyfiledialogs `3.3.8-1` -> `3.4.3` + - [(#9630)](https://github.com/microsoft/vcpkg/pull/9630) [tinyfiledialogs] Fix tinyfiledialogs not being fetchable from sourceforge + +- tesseract `4.1.0-4` -> `4.1.1` + - [(#9629)](https://github.com/microsoft/vcpkg/pull/9629) [tesseract] port update to 4.1.1 release + +- glm `0.9.9.5-3` -> `0.9.9.7` + - [(#9621)](https://github.com/microsoft/vcpkg/pull/9621) [glm] Updated to 0.9.9.7 + +- google-cloud-cpp-spanner `0.3.0` -> `0.5.0` + - [(#9611)](https://github.com/microsoft/vcpkg/pull/9611) [google-cloud-cpp-spanner] Upgrade to the v0.5.0 release. + +- scintilla `4.1.2` -> `4.2.3` + - [(#9591)](https://github.com/microsoft/vcpkg/pull/9591) [scintilla] Update to 4.2.3 + +- ppconsul `0.4` -> `0.5` + - [(#9752)](https://github.com/microsoft/vcpkg/pull/9752) [ppconsul] Add missing boost dependencies + - [(#9713)](https://github.com/microsoft/vcpkg/pull/9713) [ppconsul] Upgrade to latest version + +- boost-signals `1.68.0` -> `1.68.0-1` + - [(#9726)](https://github.com/microsoft/vcpkg/pull/9726) Fix osx baseline build failures + +- gtest `2019-10-09` -> `2019-10-09-1` + - [(#9726)](https://github.com/microsoft/vcpkg/pull/9726) Fix osx baseline build failures + +- pcl `1.9.1-9` -> `1.9.1-10` + - [(#9726)](https://github.com/microsoft/vcpkg/pull/9726) Fix osx baseline build failures + +- soil2 `release-1.11` -> `release-1.11-1` + - [(#9726)](https://github.com/microsoft/vcpkg/pull/9726) Fix osx baseline build failures + +- tmxparser `2.1.0-2` -> `2.1.0-3` + - [(#9726)](https://github.com/microsoft/vcpkg/pull/9726) Fix osx baseline build failures + +- xerces-c `3.2.2-11` -> `3.2.2-13` + - [(#9726)](https://github.com/microsoft/vcpkg/pull/9726) Fix osx baseline build failures + - [(#9702)](https://github.com/microsoft/vcpkg/pull/9702) [xerces-c] fixed issue #9654 + +- openssl `1` -> `1.1.1d` + - [(#9777)](https://github.com/microsoft/vcpkg/pull/9777) [openssl] Update the version + +- open62541 `0.3.0-4` -> `1.0` + - [(#9767)](https://github.com/microsoft/vcpkg/pull/9767) [open62541] Update to v1.0 + +- monkeys-audio `4.8.3-1` -> `5.14` + - [(#9760)](https://github.com/microsoft/vcpkg/pull/9760) [monkeys-audio] Update to 5.14, add feature tools + +- hpx `1.3.0-2` -> `1.4.0-1` + - [(#9773)](https://github.com/microsoft/vcpkg/pull/9773) Updating HPX to V1.4 + +- paho-mqtt `1.3.0-1` -> `1.3.0-2` + - [(#9753)](https://github.com/microsoft/vcpkg/pull/9753) [paho-mqtt] Fix Windows platform predefined macros + +- alembic `1.7.11-6` -> `1.7.12` + - [(#9737)](https://github.com/microsoft/vcpkg/pull/9737) Update Alembic version to 1.7.12 + +- libudns `0.4` -> `0.4-1` + - [(#9703)](https://github.com/microsoft/vcpkg/pull/9703) Update portfiles to use VCPKG_BUILD_TYPE + +- luajit `2.0.5-2` -> `2.0.5-3` + - [(#9703)](https://github.com/microsoft/vcpkg/pull/9703) Update portfiles to use VCPKG_BUILD_TYPE + - [(#9782)](https://github.com/microsoft/vcpkg/pull/9782) [luajit] Copy tool dependencies + +- pfring `2019-10-17` -> `2019-10-17-1` + - [(#9703)](https://github.com/microsoft/vcpkg/pull/9703) Update portfiles to use VCPKG_BUILD_TYPE + +- tcl `8.6.10-2` -> `8.6.10-3` + - [(#9703)](https://github.com/microsoft/vcpkg/pull/9703) Update portfiles to use VCPKG_BUILD_TYPE + +- asmjit `2019-07-11` -> `2020-01-20` + - [(#9770)](https://github.com/microsoft/vcpkg/pull/9770) [asmjit] update to current version + +- so5extra `1.3.1.1` -> `1.4.0` + - [(#9732)](https://github.com/microsoft/vcpkg/pull/9732) [sobjectizer][so5extra] updates to 5.7.0 and 1.4.0 + +- sobjectizer `5.6.1-1` -> `5.7.0` + - [(#9732)](https://github.com/microsoft/vcpkg/pull/9732) [sobjectizer][so5extra] updates to 5.7.0 and 1.4.0 + +- string-theory `2.3` -> `3.1` + - [(#9690)](https://github.com/microsoft/vcpkg/pull/9690) [string_theory] Update to 3.0 + - [(#9833)](https://github.com/microsoft/vcpkg/pull/9833) [string_theory] Update to 3.1 + +- anyrpc `2017-12-01-1` -> `2020-01-13-1` + - [(#9682)](https://github.com/microsoft/vcpkg/pull/9682) [anyrpc] Updated to latest commit + +- jasper `2.0.16-2` -> `2.0.16-3` + - [(#9680)](https://github.com/microsoft/vcpkg/pull/9680) [jasper] freeglut is not a dependency in macOS + +- cryptopp `8.2.0` -> `8.2.0-1` + - [(#9633)](https://github.com/microsoft/vcpkg/pull/9633) [cryptopp] Fixed build error on ARM32/ARM64 Windows + +- angle `2019-07-19-4` -> `2019-12-31` + - [(#9557)](https://github.com/microsoft/vcpkg/pull/9557) [angle] Update to 2019-12-31 + +- pbc `0.5.14-1` -> `0.5.14-2` + - [(#9281)](https://github.com/microsoft/vcpkg/pull/9281) [pbc] Correct non Windows build + +- fizz `2019.10.28.00` -> `2020.01.20.00` + - [(#9779)](https://github.com/microsoft/vcpkg/pull/9779) [fizz] Update to latest version + +- hyperscan `5.0.1-2` -> `5.1.0-3` + - [(#9618)](https://github.com/microsoft/vcpkg/pull/9618) [hyperscan] Update the portfile to remove debug/share file + +- coroutine `1.4.3` -> `2020-01-13` + - [(#9624)](https://github.com/microsoft/vcpkg/pull/9624) [ms-gsl] Update to v2.1.0, the "end of 2019 snapshot" + +- ms-gsl `2019-07-11` -> `2.1.0` + - [(#9624)](https://github.com/microsoft/vcpkg/pull/9624) [ms-gsl] Update to v2.1.0, the "end of 2019 snapshot" + +- ftgl `2.4.0-1` -> `2.4.0-2` + - [(#9521)](https://github.com/microsoft/vcpkg/pull/9521) [ftgl] Fix build failure #9520 + +- sdl2-mixer `2.0.4-7` -> `2.0.4-8` + - [(#9332)](https://github.com/microsoft/vcpkg/pull/9332) [sdl2-mixer] Fix dynamic loading when building static library + +- sdl2-gfx `1.0.4-4` -> `1.0.4-5` + - [(#9314)](https://github.com/microsoft/vcpkg/pull/9314) [sdl2-gfx] Fixed build error ARM64 Windows 10 + +- restclient-cpp `0.5.1-2` -> `0.5.1-3` + - [(#9487)](https://github.com/microsoft/vcpkg/pull/9487) [restclient-cpp]: correct the way to remove debug/include + +- jsoncpp `1.9.1` -> `1.9.2` + - [(#9759)](https://github.com/microsoft/vcpkg/pull/9759) [Jsoncpp] Update to 1.9.2 + +- loguru `v2.0.0` -> `v2.1.0` + - [(#8682)](https://github.com/microsoft/vcpkg/pull/8682) [loguru] Update to 2.1.0 and extend to generate proper binary on non-windows + +- gsl-lite `0.34.0` -> `0.36.0` + - [(#9827)](https://github.com/microsoft/vcpkg/pull/9827) [gsl-lite] Update to version 0.36.0 + +- telnetpp `2.0-2` -> `2.0-3` + - [(#9827)](https://github.com/microsoft/vcpkg/pull/9827) [gsl-lite] Update to version 0.36.0 + +- cgal `5.0` -> `5.0.1` + - [(#9831)](https://github.com/microsoft/vcpkg/pull/9831) [cgal] Upgrade to 5.0.1 + +- avro-c `1.8.2-3` -> `1.8.2-4` + - [(#9808)](https://github.com/microsoft/vcpkg/pull/9808) [avro-c] enable Snappy codec + +- pango `1.40.11-5` -> `1.40.11-6` + - [(#9801)](https://github.com/microsoft/vcpkg/pull/9801) [pango] fix macOS dynamic library + +- eigen3 `3.3.7-3` -> `3.3.7-4` + - [(#9821)](https://github.com/microsoft/vcpkg/pull/9821) Update eigen3's portfile to use new gitlab repo + +- aws-c-common `0.4.1` -> `0.4.15` + - [(#8832)](https://github.com/microsoft/vcpkg/pull/8832) [aws-*]Update version + +- aws-c-event-stream `0.1.1` -> `0.1.4` + - [(#8832)](https://github.com/microsoft/vcpkg/pull/8832) [aws-*]Update version + +- aws-checksums `0.1.3` -> `0.1.5` + - [(#8832)](https://github.com/microsoft/vcpkg/pull/8832) [aws-*]Update version + +- aws-lambda-cpp `0.1.0-2` -> `0.2.4` + - [(#8832)](https://github.com/microsoft/vcpkg/pull/8832) [aws-*]Update version + +- aws-sdk-cpp `1.7.142-1` -> `1.7.214` + - [(#8832)](https://github.com/microsoft/vcpkg/pull/8832) [aws-*]Update version + +- azure-c-shared-utility `2019-10-07.2-1` -> `2020-01-22` + - [(#9805)](https://github.com/microsoft/vcpkg/pull/9805) Azure-IoT-Sdk for C release 2020-01-22 + +- azure-iot-sdk-c `2019-11-27.1` -> `2020-01-22` + - [(#9805)](https://github.com/microsoft/vcpkg/pull/9805) Azure-IoT-Sdk for C release 2020-01-22 + +- azure-macro-utils-c `2019-11-27.1` -> `2020-01-22` + - [(#9805)](https://github.com/microsoft/vcpkg/pull/9805) Azure-IoT-Sdk for C release 2020-01-22 + +- azure-uamqp-c `2019-11-27.1` -> `2020-01-22` + - [(#9805)](https://github.com/microsoft/vcpkg/pull/9805) Azure-IoT-Sdk for C release 2020-01-22 + +- azure-uhttp-c `2019-11-27.1` -> `2020-01-22` + - [(#9805)](https://github.com/microsoft/vcpkg/pull/9805) Azure-IoT-Sdk for C release 2020-01-22 + +- azure-umqtt-c `2019-11-27.1` -> `2020-01-22` + - [(#9805)](https://github.com/microsoft/vcpkg/pull/9805) Azure-IoT-Sdk for C release 2020-01-22 + +- umock-c `2019-11-27.1` -> `2020-01-22` + - [(#9805)](https://github.com/microsoft/vcpkg/pull/9805) Azure-IoT-Sdk for C release 2020-01-22 + +
+ +-- vcpkg team vcpkg@microsoft.com THU, 05 Jan 15:00:00 -0800 + +vcpkg (2019.12.31) +--- +#### Total port count: 1268 +#### Total port count per triplet (tested): +|triplet|ports available| +|---|---| +|**x64-windows**|1181| +|x86-windows|1166| +|x64-windows-static|1087| +|**x64-linux**|1000| +|**x64-osx**|920| +|arm64-windows|795| +|x64-uwp|642| +|arm-uwp|615| + +#### The following documentation has been updated: +- [PR Review Checklist](docs/maintainers/pr-review-checklist.md) ***[NEW]*** + - [(#9264)](https://github.com/microsoft/vcpkg/pull/9264) [vcpkg] Initialize PR review checklist +- [vcpkg_install_qmake](docs/maintainers/vcpkg_install_qmake.md) ***[NEW]*** + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake +- [CONTROL Files](docs/maintainers/control-files.md) + - [(#9140)](https://github.com/microsoft/vcpkg/pull/9140) [docs] Fix CONTROL file default-features section header +- [Portfile Functions](docs/maintainers/portfile-functions.md) + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake +- [vcpkg_build_nmake](docs/maintainers/vcpkg_build_nmake.md) + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake +- [vcpkg_common_definitions](docs/maintainers/vcpkg_common_definitions.md) + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake +- [vcpkg_configure_make](docs/maintainers/vcpkg_configure_make.md) + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake +- [vcpkg_download_distfile](docs/maintainers/vcpkg_download_distfile.md) + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake +- [vcpkg_extract_source_archive_ex](docs/maintainers/vcpkg_extract_source_archive_ex.md) + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake +- [vcpkg_find_acquire_program](docs/maintainers/vcpkg_find_acquire_program.md) + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake +- [vcpkg_install_nmake](docs/maintainers/vcpkg_install_nmake.md) + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake + +#### The following changes have been made to vcpkg's infrastructure: +- [(#9160)](https://github.com/microsoft/vcpkg/pull/9160) [ffmpeg] Fixed build error ARM64 Windows 10 +- [(#9199)](https://github.com/microsoft/vcpkg/pull/9199) [vcpkg] Add November changelog +- [(#9203)](https://github.com/microsoft/vcpkg/pull/9203) [vcpkg] Check in baseline results for CI builds +- [(#9191)](https://github.com/microsoft/vcpkg/pull/9191) [vcpkg] Give hints for yasm with brew and apt +- [(#9242)](https://github.com/microsoft/vcpkg/pull/9242) [libxslt] Fix writing to locations outside vcpkg in Windows builds +- [(#9279)](https://github.com/microsoft/vcpkg/pull/9279) Removed umock-c:64-windows-static result in baseline +- [(#9280)](https://github.com/microsoft/vcpkg/pull/9280) [vcpkg] Add pull request template +- [(#9331)](https://github.com/microsoft/vcpkg/pull/9331) Update baseline to skip ogre conflicts +- [(#9349)](https://github.com/microsoft/vcpkg/pull/9349) Update baseline with 'leptonica:arm-uwp=fail' +- [(#9277)](https://github.com/microsoft/vcpkg/pull/9277) [brynet] Update to 1.0.5 +- [(#9330)](https://github.com/microsoft/vcpkg/pull/9330) [simpleini] Fix build failure on travis CI +- [(#9313)](https://github.com/microsoft/vcpkg/pull/9313) [opendnp3] Add new port +- [(#9255)](https://github.com/microsoft/vcpkg/pull/9255) [OpenEXR] add missing underscore for OpenEXR_IEXMATH_LIBRARY_DEBUG NAMES +- [(#9252)](https://github.com/microsoft/vcpkg/pull/9252) [rttr] Add dependency rapidjson +- [(#8533)](https://github.com/microsoft/vcpkg/pull/8533) Fix CMAKE_TRY_COMPILE_PLATFORM_VARIABLES +- [(#9382)](https://github.com/microsoft/vcpkg/pull/9382) [directxtk12] Update to dec2019 release +- [(#9383)](https://github.com/microsoft/vcpkg/pull/9383) [directxtex] Update to dec2019 release +- [(#9384)](https://github.com/microsoft/vcpkg/pull/9384) [directxmesh] Update to dec2019 release +- [(#9381)](https://github.com/microsoft/vcpkg/pull/9381) [directxtk] Update to dec2019 release +- [(#9287)](https://github.com/microsoft/vcpkg/pull/9287) Removed unused template function. +- [(#9411)](https://github.com/microsoft/vcpkg/pull/9411) [vcpkg-baseline] Fixes for vtk, libarchive, xalan-c, and openvpn3 on Linux +- [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake +- [(#9388)](https://github.com/microsoft/vcpkg/pull/9388) [hiredis] Support building static +- [(#8624)](https://github.com/microsoft/vcpkg/pull/8624) [protobuf-c]Add new port. +- [(#9389)](https://github.com/microsoft/vcpkg/pull/9389) Remove vtk:x64-linux result in baseline + +
+The following 8 ports have been added: + +|port|version| +|---|---| +|[proxywrapper](https://github.com/microsoft/vcpkg/pull/8916)| 1.0.0 +|[opendnp3](https://github.com/microsoft/vcpkg/pull/9313)| 2.3.2 +|[function2](https://github.com/microsoft/vcpkg/pull/9246)| 4.0.0 +|[protobuf-c](https://github.com/microsoft/vcpkg/pull/8624)| 1.3.2 +|[indicators](https://github.com/microsoft/vcpkg/pull/9315)| 1.5 +|[proxygen](https://github.com/microsoft/vcpkg/pull/8766)| 2019.10.21.00 +|[azure-kinect-sensor-sdk](https://github.com/microsoft/vcpkg/pull/8786)| 1.4.0-alpha.0 +|[xtensor-fftw](https://github.com/microsoft/vcpkg/pull/9159)| 2019-11-30 +
+ +
+The following 72 ports have been updated: + +- restinio `0.6.1` -> `0.6.2` + - [(#9174)](https://github.com/microsoft/vcpkg/pull/9174) [restinio] Update to v.0.6.1.1. + - [(#9293)](https://github.com/microsoft/vcpkg/pull/9293) [restinio] update to 0.6.2 + +- pixman `0.38.0-4` -> `0.38.4-1` + - [(#9170)](https://github.com/microsoft/vcpkg/pull/9170) [pixman] Update to version 0.38.4 + +- cjson `1.7.12` -> `2019-11-30` + - [(#9157)](https://github.com/microsoft/vcpkg/pull/9157) [cjson] Update to 2019-11-30 + +- parallel-hashmap `1.24` -> `1.27` + - [(#9152)](https://github.com/microsoft/vcpkg/pull/9152) [parallel-hashmap] Update to 1.27 + +- jsoncons `0.139.0` -> `0.140.0` + - [(#9124)](https://github.com/microsoft/vcpkg/pull/9124) [jsoncons] Update to v0.140.0 + +- boost-modular-build-helper `1.71.0` -> `1.71.0-1` + - [(#9108)](https://github.com/microsoft/vcpkg/pull/9108) [boost-modular-build-helper] put quotes around the directory + +- protobuf `3.10.0` -> `3.11.2` + - [(#9131)](https://github.com/microsoft/vcpkg/pull/9131) [protobuf] Update protobuf to 3.11.0 + - [(#9271)](https://github.com/microsoft/vcpkg/pull/9271) [protobuf] Update to 3.11.2 + +- ecsutil `1.0.7.3` -> `1.0.7.8` + - [(#8885)](https://github.com/microsoft/vcpkg/pull/8885) [ecsuti] Update to v1.0.7.8 + +- libmodman `2.0.1` -> `2.0.1-1` + - [(#8916)](https://github.com/microsoft/vcpkg/pull/8916) [proxywrapper] Add new port + +- libproxy `0.4.15` -> `0.4.15-1` + - [(#8916)](https://github.com/microsoft/vcpkg/pull/8916) [proxywrapper] Add new port + +- xalan-c `1.11-9` -> `1.11-11` + - [(#9203)](https://github.com/microsoft/vcpkg/pull/9203) [vcpkg] Check in baseline results for CI builds + - [(#9411)](https://github.com/microsoft/vcpkg/pull/9411) [vcpkg-baseline] Fixes for vtk, libarchive, xalan-c, and openvpn3 on Linux + +- libxslt `1.1.33-5` -> `1.1.33-6` + - [(#9242)](https://github.com/microsoft/vcpkg/pull/9242) [libxslt] Fix writing to locations outside vcpkg in Windows builds + +- azure-c-shared-utility `2019-10-07.2` -> `2019-10-07.2-1` + - [(#9117)](https://github.com/microsoft/vcpkg/pull/9117) [azure-iot-sdk-c] Update macro-utils and umock-c to differentiate master and public-preview installations + +- azure-iot-sdk-c `2019-11-21.1` -> `2019-11-27.1` + - [(#9117)](https://github.com/microsoft/vcpkg/pull/9117) [azure-iot-sdk-c] Update macro-utils and umock-c to differentiate master and public-preview installations + +- azure-macro-utils-c `2019-10-07.2` -> `2019-11-27.1` + - [(#9117)](https://github.com/microsoft/vcpkg/pull/9117) [azure-iot-sdk-c] Update macro-utils and umock-c to differentiate master and public-preview installations + +- azure-uamqp-c `2019-10-07.2` -> `2019-11-27.1` + - [(#9117)](https://github.com/microsoft/vcpkg/pull/9117) [azure-iot-sdk-c] Update macro-utils and umock-c to differentiate master and public-preview installations + +- azure-uhttp-c `2019-10-07.2` -> `2019-11-27.1` + - [(#9117)](https://github.com/microsoft/vcpkg/pull/9117) [azure-iot-sdk-c] Update macro-utils and umock-c to differentiate master and public-preview installations + +- azure-umqtt-c `2019-10-07.2` -> `2019-11-27.1` + - [(#9117)](https://github.com/microsoft/vcpkg/pull/9117) [azure-iot-sdk-c] Update macro-utils and umock-c to differentiate master and public-preview installations + +- umock-c `2019-10-07.2` -> `2019-11-27.1` + - [(#9117)](https://github.com/microsoft/vcpkg/pull/9117) [azure-iot-sdk-c] Update macro-utils and umock-c to differentiate master and public-preview installations + +- python3 `3.7.4` -> `3.7.3` + - [(#9173)](https://github.com/microsoft/vcpkg/pull/9173) [python3] Fix CONTROL Version + +- brynet `1.0.3` -> `1.0.5` + - [(#9277)](https://github.com/microsoft/vcpkg/pull/9277) [brynet] Update to 1.0.5 + +- cpp-httplib `0.2.5` -> `0.4.2` + - [(#9360)](https://github.com/microsoft/vcpkg/pull/9360) [cpp-httplib] Update library to 0.4.2 + +- botan `2.12.1` -> `2.12.1-1` + - [(#9335)](https://github.com/microsoft/vcpkg/pull/9335) [botan] Fix unrecognized compile flag MT/MD + +- simpleini `2018-08-31-2` -> `2018-08-31-3` + - [(#9330)](https://github.com/microsoft/vcpkg/pull/9330) [simpleini] Fix build failure on travis CI + +- libpcap `1.9.0` -> `1.9.1` + - [(#9329)](https://github.com/microsoft/vcpkg/pull/9329) [libpcap] update portfile for cmake build and bump version to 1.9.1 + +- live555 `latest` -> `latest-1` + - [(#9303)](https://github.com/microsoft/vcpkg/pull/9303) [live555] Fix live555:x86-windows-static build failure + +- usockets `0.3.1` -> `0.3.4` + - [(#9278)](https://github.com/microsoft/vcpkg/pull/9278) [usockets] update to 0.3.4 + +- uwebsockets `0.15.7` -> `0.16.5` + - [(#9276)](https://github.com/microsoft/vcpkg/pull/9276) [uwebsockets] update to 0.16.5 + +- check `0.13.0` -> `0.13.0-1` + - [(#9267)](https://github.com/microsoft/vcpkg/pull/9267) [check] Fix library cannot be found + +- tesseract `4.1.0-3` -> `4.1.0-4` + - [(#9266)](https://github.com/microsoft/vcpkg/pull/9266) [tesseract] Fix feature name and build error + +- libharu `2017-08-15-8` -> `2017-08-15-9` + - [(#9261)](https://github.com/microsoft/vcpkg/pull/9261) [libharu] Remove symbols also exported from tiff (as a default feature) + +- alembic `1.7.11-5` -> `1.7.11-6` + - [(#9255)](https://github.com/microsoft/vcpkg/pull/9255) [OpenEXR] add missing underscore for OpenEXR_IEXMATH_LIBRARY_DEBUG NAMES + +- openexr `2.3.0-4` -> `2.3.0-5` + - [(#9255)](https://github.com/microsoft/vcpkg/pull/9255) [OpenEXR] add missing underscore for OpenEXR_IEXMATH_LIBRARY_DEBUG NAMES + +- xeus `0.20.0` -> `0.20.0-1` + - [(#9254)](https://github.com/microsoft/vcpkg/pull/9254) [xeus] Fix build error with Visual Studio 2019 + +- libpq `9.6.1-8` -> `9.6.3` + - [(#9253)](https://github.com/microsoft/vcpkg/pull/9253) [libpq] Fix version mismatch between CONTROL and portfile + +- rttr `0.9.6-1` -> `0.9.6-2` + - [(#9252)](https://github.com/microsoft/vcpkg/pull/9252) [rttr] Add dependency rapidjson + +- proj4 `6.2.0-1` -> `6.2.1-1` + - [(#9227)](https://github.com/microsoft/vcpkg/pull/9227) [proj4] Update to version 6.2.1; disable exporting symbols for static libraries + +- geotrans `3.7` -> `3.7-1` + - [(#9217)](https://github.com/microsoft/vcpkg/pull/9217) [geotrans] Add macro LITTLE_ENDIAN + +- mongoose `6.15-1` -> `6.15-2` + - [(#9209)](https://github.com/microsoft/vcpkg/pull/9209) [mongoose] Add feature ssl + +- ecm `5.60.0-1` -> `5.60.0-2` + - [(#9210)](https://github.com/microsoft/vcpkg/pull/9210) [ecm] Add usage to fix printing error messages + +- tbb `2019_U8-2` -> `2019_U8-3` + - [(#9188)](https://github.com/microsoft/vcpkg/pull/9188) [tbb] Set fatal build tool requirements for UNIX + +- libqglviewer `2.7.0-2` -> `2.7.2-2` + - [(#9186)](https://github.com/microsoft/vcpkg/pull/9186) [libqglviewer] update to 2.7.2 + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake + +- nanodbc `2.12.4-4` -> `2.12.4-5` + - [(#9185)](https://github.com/microsoft/vcpkg/pull/9185) [nanodbc] Set NANODBC_ENABLE_UNICODE to OFF + +- libevent `2.1.11-1` -> `2.1.11-2` + - [(#9101)](https://github.com/microsoft/vcpkg/pull/9101) [libevent] Add thread as default feature + +- directxtk12 `oct2019` -> `dec2019` + - [(#9382)](https://github.com/microsoft/vcpkg/pull/9382) [directxtk12] Update to dec2019 release + +- directxtex `oct2019` -> `dec2019` + - [(#9383)](https://github.com/microsoft/vcpkg/pull/9383) [directxtex] Update to dec2019 release + +- directxmesh `aug2019` -> `dec2019` + - [(#9384)](https://github.com/microsoft/vcpkg/pull/9384) [directxmesh] Update to dec2019 release + +- directxtk `oct2019` -> `dec2019` + - [(#9381)](https://github.com/microsoft/vcpkg/pull/9381) [directxtk] Update to dec2019 release + +- nano-signal-slot `2018-08-25-1` -> `2.0.1` + - [(#9376)](https://github.com/microsoft/vcpkg/pull/9376) [nano-signal-slot] Update to latest version + +- libarchive `3.4.0-1` -> `3.4.0-2` + - [(#9411)](https://github.com/microsoft/vcpkg/pull/9411) [vcpkg-baseline] Fixes for vtk, libarchive, xalan-c, and openvpn3 on Linux + +- openvpn3 `3.4.1` -> `3.4.1-1` + - [(#9411)](https://github.com/microsoft/vcpkg/pull/9411) [vcpkg-baseline] Fixes for vtk, libarchive, xalan-c, and openvpn3 on Linux + +- ffmpeg `4.2-1` -> `4.2-2` + - [(#9405)](https://github.com/microsoft/vcpkg/pull/9405) [ffmpeg] portfile: fix typo Relase->Release + - [(#9090)](https://github.com/microsoft/vcpkg/pull/9090) [ffmpeg] install correct copyright file and enable (L)GPLv3 builds + +- entt `3.1.1` -> `3.2.2` + - [(#9409)](https://github.com/microsoft/vcpkg/pull/9409) [entt] Upgrade library to 3.2.2 + +- doctest `2.3.5` -> `2.3.6` + - [(#9403)](https://github.com/microsoft/vcpkg/pull/9403) [doctest] Update library to 2.3.6 + +- qcustomplot `2.0.1-1` -> `2.0.1-3` + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake + +- qscintilla `2.10-9` -> `2.10-11` + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake + +- qt5-base `5.12.5-3` -> `5.12.5-7` + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake + +- qwt `6.1.3-8` -> `6.1.3-10` + - [(#9412)](https://github.com/microsoft/vcpkg/pull/9412) [vcpkg_install_qmake] Add vcpkg_install_qmake + +- hiredis `2019-11-1` -> `2019-11-2` + - [(#9388)](https://github.com/microsoft/vcpkg/pull/9388) [hiredis] Support building static + +- argparse `2.0.1` -> `2.1` + - [(#9291)](https://github.com/microsoft/vcpkg/pull/9291) [argparse] Upgrade to v2.1 + +- angle `2019-07-19-3` -> `2019-07-19-4` + - [(#7923)](https://github.com/microsoft/vcpkg/pull/7923) [angle]Fix windows build error: cannot find definition far. + +- libwebp `1.0.2-7` -> `1.0.2-8` + - [(#9300)](https://github.com/microsoft/vcpkg/pull/9300) [libwebp] Fixed build error ARM64 Windows 10 + +- libpng `1.6.37-5` -> `1.6.37-6` + - [(#9198)](https://github.com/microsoft/vcpkg/pull/9198) [libpng] Strong cleanup of the port + +- libgit2 `0.28.3` -> `0.28.4` + - [(#9270)](https://github.com/microsoft/vcpkg/pull/9270) [libgit2] Update to 0.28.4 + +- embree3 `3.5.2-3` -> `3.6.1` + - [(#9073)](https://github.com/microsoft/vcpkg/pull/9073) [embree3] Update to version 3.6.1 + +- pmdk `1.7` -> `1.7-1` + - [(#9094)](https://github.com/microsoft/vcpkg/pull/9094) [pmdk] Remove non-ascii charactor + +- fftwpp `2.05` -> `2019-12-19` + - [(#9169)](https://github.com/microsoft/vcpkg/pull/9169) [fftwpp] Update to latest commit + +- freerdp `2.0.0-rc4-2` -> `2.0.0-rc4-3` + - [(#9176)](https://github.com/microsoft/vcpkg/pull/9176) [freerdp] Fix linux build, add dependency port glib + +- abseil `2019-05-08-1` -> `2019-12-19` + - [(#9367)](https://github.com/microsoft/vcpkg/pull/9367) [abseil] Update to the latest and fix link failure error using StrCat + +- sdl2-gfx `1.0.4-2` -> `1.0.4-4` + - [(#9319)](https://github.com/microsoft/vcpkg/pull/9319) [sdl2-gfx] Update CMake build and find_package support + +- io2d `2019-07-11-1` -> `2019-07-11-2` + - [(#8935)](https://github.com/microsoft/vcpkg/pull/8935) [io2d] Fix link to target "Cairo::Cairo" error + +- vtk `8.2.0-9` -> `8.2.0-10` + - [(#9389)](https://github.com/microsoft/vcpkg/pull/9389) Remove vtk:x64-linux result in baseline + +
+ +-- vcpkg team vcpkg@microsoft.com TUE, 09 Jan 05:45:00 -0800 + +vcpkg (2019.11.30) +--- +#### Total port count: 1262 +#### Total port count per triplet (tested): +|triplet|ports available| +|---|---| +|**x64-windows**|1182| +|x86-windows|1163| +|x64-windows-static|1094| +|**x64-linux**|1021| +|**x64-osx**|984| +|arm64-windows|782| +|x64-uwp|646| +|arm-uwp|614| + +#### The following commands and options have been updated: +- `export` + - `--x-chocolatey` ***[NEW OPTION]*** : Experimental option to export a port as a `chocolatey` package + - [(#6891)](https://github.com/microsoft/vcpkg/pull/6891) [feature] add `vcpkg export --x-chocolatey` support + +#### The following documentation has been updated: +- [vcpkg_from_github](docs/maintainers/vcpkg_from_github.md) + - [(#5719)](https://github.com/microsoft/vcpkg/pull/5719) [vcpkg_from_github] Allow targeting Github Enterprise instances +- [Privacy and Vcpkg](docs/about/privacy.md) + - [(#9080)](https://github.com/microsoft/vcpkg/pull/9080) [vcpkg] update telemetry + +#### The following additional changes have been made to vcpkg's infrastructure: +- [(#8853)](https://github.com/microsoft/vcpkg/pull/8853) Add October changelog +- [(#8894)](https://github.com/microsoft/vcpkg/pull/8894) Update README.md +- [(#8976)](https://github.com/microsoft/vcpkg/pull/8976) [libusb] upgrade and support arm64-windows +- [(#8924)](https://github.com/microsoft/vcpkg/pull/8924) [vcpkg] Remove libc++fs link dependency for clang/libc++ 9.* +- [(#7598)](https://github.com/microsoft/vcpkg/pull/7598) [vcpkg] QoL: add host specific path separator to common definitions +- [(#8941)](https://github.com/microsoft/vcpkg/pull/8941) [docs] Add the gcc+=7 prerequisite to the README +- [(#5719)](https://github.com/microsoft/vcpkg/pull/5719) [vcpkg_from_github] Allow targeting Github Enterprise instances +- [(#9080)](https://github.com/microsoft/vcpkg/pull/9080) [vcpkg] update telemetry + +
+The following 12 ports have been added: + +|port|version| +|---|---| +|[ogre-next](https://github.com/microsoft/vcpkg/pull/8677)| 2019-10-20 +|[hiredis](https://github.com/microsoft/vcpkg/pull/8843)[#8862](https://github.com/microsoft/vcpkg/pull/8862) | 2019-11-1 +|[cspice](https://github.com/microsoft/vcpkg/pull/8859)| 66-1 +|[ecos](https://github.com/microsoft/vcpkg/pull/9019)| 2.0.7 +|[redis-plus-plus](https://github.com/microsoft/vcpkg/pull/8846)| 1.1.1 +|[nanoflann](https://github.com/microsoft/vcpkg/pull/8962)| 1.3.1 +|[wxchartdir](https://github.com/microsoft/vcpkg/pull/7914)| 1.0.0 +|[faad2](https://github.com/microsoft/vcpkg/pull/9003)| 2.9.1-1 +|[pfring](https://github.com/microsoft/vcpkg/pull/8648)| 2019-10-17 +|[libmodman](https://github.com/microsoft/vcpkg/pull/8931)| 2.0.1 +|[libproxy](https://github.com/microsoft/vcpkg/pull/8931)| 0.4.15 +|[google-cloud-cpp-spanner](https://github.com/microsoft/vcpkg/pull/9096)| 0.3.0 +
+ +
+The following 67 ports have been updated: + +- tbb `2019_U8-1` -> `2019_U8-2` + - [(#8744)](https://github.com/microsoft/vcpkg/pull/8744) tbb: Fix compilation on OSX + +- openvpn3 `2018-03-21-1` -> `3.4.1` + - [(#8851)](https://github.com/microsoft/vcpkg/pull/8851) openvpn3: bump version + +- sqlpp11 `0.58-2` -> `0.58-3` + - [(#8837)](https://github.com/microsoft/vcpkg/pull/8837) [sqlpp11] fixed ddl2cpp path + +- jsonnet `0.13.0` -> `0.14.0` + - [(#8848)](https://github.com/microsoft/vcpkg/pull/8848) [jsonnet]Upgrade to 0.14.0. + +- pango `1.40.11-4` -> `1.40.11-5` + - [(#8745)](https://github.com/microsoft/vcpkg/pull/8745) [pango] Add missing link library + +- opencv3 `3.4.7-2` -> `3.4.8` + - [(#8623)](https://github.com/microsoft/vcpkg/pull/8623) [opencv3] Upgrade to version 3.4.8 + - [(#8911)](https://github.com/microsoft/vcpkg/pull/8911) Revert "[opencv3] Upgrade to version 3.4.8" + +- boost-modular-build-helper `1.70.0-2` -> `1.71.0` + - [(#8606)](https://github.com/microsoft/vcpkg/pull/8606) [boost-modular-build-helper] Update to 1.71. + +- libxslt `1.1.33-4` -> `1.1.33-5` + - [(#9014)](https://github.com/microsoft/vcpkg/pull/9014) Prevent python3 build failure + +- python3 `3.7.3` -> `3.7.4` + - [(#9014)](https://github.com/microsoft/vcpkg/pull/9014) Prevent python3 build failure + +- orc `1.5.6-1` -> `1.5.7` + - [(#8980)](https://github.com/microsoft/vcpkg/pull/8980) [orc]Upgrade to 1.5.7, disable tzdata test. + +- openvdb `6.1.0` -> `6.2.1` + - [(#8979)](https://github.com/microsoft/vcpkg/pull/8979) [openvdb]Upgrade to 6.2.1 + +- libusb `1.0.22-4` -> `1.0.23` + - [(#8976)](https://github.com/microsoft/vcpkg/pull/8976) [libusb] upgrade and support arm64-windows + +- libmad `0.15.1-4` -> `0.15.1-5` + - [(#8959)](https://github.com/microsoft/vcpkg/pull/8959) [libmad] Fix libmad header for non-x86 MSVC targets + +- wil `2019-07-16` -> `2019-11-07` + - [(#8948)](https://github.com/microsoft/vcpkg/pull/8948) Update WIL port + +- botan `2.11.0` -> `2.12.1` + - [(#8844)](https://github.com/microsoft/vcpkg/pull/8844) [botan]Upgrade to 2.12.1 + +- libbson `1.14.0-3` -> `1.15.1-1` + - [(#8790)](https://github.com/microsoft/vcpkg/pull/8790) [libbson][mongo-c-driver] Update to 1.15.1. Parse CONTROL file for version number + +- mongo-c-driver `1.14.0-5` -> `1.15.1-1` + - [(#8790)](https://github.com/microsoft/vcpkg/pull/8790) [libbson][mongo-c-driver] Update to 1.15.1. Parse CONTROL file for version number + +- libpopt `1.16-11` -> `1.16-12` + - [(#8652)](https://github.com/microsoft/vcpkg/pull/8652) [libpopt]Fix linux build. + +- libpng `1.6.37-4` -> `1.6.37-5` + - [(#8622)](https://github.com/microsoft/vcpkg/pull/8622) [lipng/libpng-apng]Remove port libpng-apng and add apng as a feature with libpng. + - [(#8716)](https://github.com/microsoft/vcpkg/pull/8716) [libpng] Fix CMake targets + +- evpp `0.7.0-1` -> `0.7.0-2` + - [(#8349)](https://github.com/microsoft/vcpkg/pull/8349) [libevent] add features + +- libevent `2.1.11` -> `2.1.11-1` + - [(#8349)](https://github.com/microsoft/vcpkg/pull/8349) [libevent] add features + +- restinio `0.6.0.1` -> `0.6.1` + - [(#8993)](https://github.com/microsoft/vcpkg/pull/8993) [restinio] Update to v.0.6.1 + +- google-cloud-cpp-common `0.15.0` -> `0.16.0-1` + - [(#8986)](https://github.com/microsoft/vcpkg/pull/8986) [google-cloud-cpp*] Update to 0.16.0 + - [(#9097)](https://github.com/microsoft/vcpkg/pull/9097) [google-cloud-cpp-common] Add test feature + +- google-cloud-cpp `0.14.0-1` -> `0.15.0` + - [(#8986)](https://github.com/microsoft/vcpkg/pull/8986) [google-cloud-cpp*] Update to 0.16.0 + +- freetype-gl `2019-03-29-2` -> `2019-03-29-3` + - [(#8992)](https://github.com/microsoft/vcpkg/pull/8992) [freetype-gl] Fix POST_BUILD_CHECKS_FAILED failure on Unix + +- tinyobjloader `1.0.7-1` -> `2.0.0-rc2` + - [(#8955)](https://github.com/microsoft/vcpkg/pull/8955) [tinyobjloader] Update to 2.0.0-rc2; Add feature to enable double precision + +- libzip `rel-1-5-2` -> `rel-1-5-2--1` + - [(#8918)](https://github.com/microsoft/vcpkg/pull/8918) [libzip] Fix patch not applying + +- tgui `0.8.5` -> `0.8.6` + - [(#8877)](https://github.com/microsoft/vcpkg/pull/8877) [tgui]Update to 0.8.6 + +- jsoncons `0.136.1` -> `0.139.0` + - [(#9058)](https://github.com/microsoft/vcpkg/pull/9058) [jsoncons] Update to v0.139.0 + +- azure-iot-sdk-c `2019-10-11.2` -> `2019-11-21.1` + - [(#9059)](https://github.com/microsoft/vcpkg/pull/9059) [azure-iot-sdk-c] Update public-preview feature to branch with fixed telemetry + +- tiff `4.0.10-7` -> `4.0.10-8` + - [(#9010)](https://github.com/microsoft/vcpkg/pull/9010) [tiff] Make BUILD_TOOLS option a feature + +- magic-enum `0.6.3` -> `0.6.3-1` + - [(#9007)](https://github.com/microsoft/vcpkg/pull/9007) [magic-enum] Fix export config.cmake issue + +- libflac `1.3.2-6` -> `1.3.3` + - [(#8988)](https://github.com/microsoft/vcpkg/pull/8988) [libflac] Update libflac to 1.3.3 + +- otl `4.0.447` -> `4.0.448` + - [(#8937)](https://github.com/microsoft/vcpkg/pull/8937) [otl] Upgrade to version 4.0.448 + +- librtmp `2.4-2` -> `2019-11-11` + - [(#8958)](https://github.com/microsoft/vcpkg/pull/8958) use latest librtmp + +- stlab `1.4.1-1` -> `1.5.1` + - [(#8901)](https://github.com/microsoft/vcpkg/pull/8901) [stlab] Update to 1.5.1 + +- bitsery `5.0.0` -> `5.0.1-1` + - [(#8892)](https://github.com/microsoft/vcpkg/pull/8892) [bitsery] Update to 5.0.1 + +- cereal `1.2.2-2` -> `1.3.0` + - [(#8913)](https://github.com/microsoft/vcpkg/pull/8913) [cereal] Update to 1.3.0 + +- fizz `2019.07.08.00` -> `2019.10.28.00` + - [(#8765)](https://github.com/microsoft/vcpkg/pull/8765) [folly/fizz]Upgrade version. + +- folly `2019.06.17.00` -> `2019.10.21.00` + - [(#8765)](https://github.com/microsoft/vcpkg/pull/8765) [folly/fizz]Upgrade version. + +- qt5-base `5.12.5-1` -> `5.12.5-3` + - [(#8793)](https://github.com/microsoft/vcpkg/pull/8793) [qt5] Modify qtdeploy to include qtquickshapes + - [(#8932)](https://github.com/microsoft/vcpkg/pull/8932) [qt5-base] Add option to link to OpenSSL at compile-time + +- nlohmann-json `3.7.0` -> `3.7.3` + - [(#9069)](https://github.com/microsoft/vcpkg/pull/9069) [nlohmann-json] Upgrade to 3.7.3 + +- json-dto `0.2.8-2` -> `0.2.9.2` + - [(#9057)](https://github.com/microsoft/vcpkg/pull/9057) [json-dto] Update to v0.2.9; Switch repo; Fix license installation + - [(#9083)](https://github.com/microsoft/vcpkg/pull/9083) [json_dto] Update to v.0.2.9.2 + +- prometheus-cpp `0.7.0` -> `0.8.0` + - [(#9047)](https://github.com/microsoft/vcpkg/pull/9047) [prometheus-cpp] Update to version 0.8.0 + +- date `2019-09-09` -> `2019-11-08` + - [(#9006)](https://github.com/microsoft/vcpkg/pull/9006) [date] Update to 2019-11-08 + +- netcdf-cxx4 `4.3.0-5` -> `4.3.1` + - [(#8978)](https://github.com/microsoft/vcpkg/pull/8978) [netcdf-cxx4] Update to 4.3.1 + +- libsodium `1.0.18-1` -> `1.0.18-2` + - [(#8974)](https://github.com/microsoft/vcpkg/pull/8974) [libsodium] Fix CPU feature not properly detected on Linux + +- cgal `4.14-3` -> `5.0` + - [(#8659)](https://github.com/microsoft/vcpkg/pull/8659) [cgal][openmvs] CGAL: Upgrade to 5.0 + +- openmvs `1.0-2` -> `1.0-3` + - [(#8659)](https://github.com/microsoft/vcpkg/pull/8659) [cgal][openmvs] CGAL: Upgrade to 5.0 + +- ace `6.5.6` -> `6.5.7` + - [(#9074)](https://github.com/microsoft/vcpkg/pull/9074) [ace] Upgrade to 6.5.7 + +- libmspack `0.10.1-2` -> `0.10.1-3` + - [(#8966)](https://github.com/microsoft/vcpkg/pull/8966) [libmspack] Fix several missing imports + +- mdnsresponder `765.30.11-1` -> `765.30.11-2` + - [(#8953)](https://github.com/microsoft/vcpkg/pull/8953) [mdnsresponder] Fix build with dynamic CRT + +- detours `4.0.1` -> `4.0.1-1` + - [(#8854)](https://github.com/microsoft/vcpkg/pull/8854) [detours] Update for vcpkg_build_nmake + +- curlpp `2018-06-15-1` -> `2018-06-15-2` + - [(#9065)](https://github.com/microsoft/vcpkg/pull/9065) [curlpp] Restore installing vcpkg-cmake-wrapper script + +- portaudio `2019-09-30` -> `2019-11-5` + - [(#8944)](https://github.com/microsoft/vcpkg/pull/8944) [portaudio] Fix library cannot be found + +- wt `4.0.5-1` -> `4.1.1` + - [(#8903)](https://github.com/microsoft/vcpkg/pull/8903) [wt] Update to 4.1.1 + +- z3 `4.8.5-1` -> `4.8.6` + - [(#8899)](https://github.com/microsoft/vcpkg/pull/8899) [z3] Update to 4.8.6 + +- pdcurses `3.8-1` -> `3.8-2` + - [(#9042)](https://github.com/microsoft/vcpkg/pull/9042) [pdcurses] Fix linkage error + +- angle `2019-07-19-2` -> `2019-07-19-3` + - [(#8785)](https://github.com/microsoft/vcpkg/pull/8785) [angle] Add option /bigobj to compiler + +- argparse `1.9` -> `2.0.1` + - [(#9088)](https://github.com/microsoft/vcpkg/pull/9088) [argparse] Update library to 2.0.1 + +- catch2 `2.10.1-1` -> `2.11.0` + - [(#9089)](https://github.com/microsoft/vcpkg/pull/9089) [catch2] Update library to 2.11.0 + +- magnum-plugins `2019.10` -> `2019.10-1` + - [(#8939)](https://github.com/microsoft/vcpkg/pull/8939) [magnum-plugins] Fix basisimporter/basisimageconverter features + +- spdlog `1.3.1-2` -> `1.4.2` + - [(#8779)](https://github.com/microsoft/vcpkg/pull/8779) [spdlog]Update to 1.4.2 + +- assimp `5.0.0-1` -> `5.0.0-2` + - [(#9075)](https://github.com/microsoft/vcpkg/pull/9075) [minizip, assimp] Export minizip CMake targets; Add minizip as assimp dependency + +- minizip `1.2.11-5` -> `1.2.11-6` + - [(#9075)](https://github.com/microsoft/vcpkg/pull/9075) [minizip, assimp] Export minizip CMake targets; Add minizip as assimp dependency + +- ixwebsocket `6.1.0` -> `7.4.0` + - [(#9099)](https://github.com/microsoft/vcpkg/pull/9099) [ixwebsocket] Update to 7.4.0 + +- ppconsul `0.3-1` -> `0.4` + - [(#9104)](https://github.com/microsoft/vcpkg/pull/9104) [ppconsul] Update to 0.4 + +
+ +-- vcpkg team vcpkg@microsoft.com TUE, 03 Dec 14:30:00 -0800 + +vcpkg (2019.10.31) +--- +#### Total port count: 1250 +#### Total port count per triplet (tested): +|triplet|ports available| +|---|---| +|**x64-windows**|1169| +|x86-windows|1154| +|x64-windows-static|1080| +|**x64-linux**|1014| +|**x64-osx**|976| +|arm64-windows|774| +|x64-uwp|638| +|arm-uwp|608| + +#### The following commands and options have been updated: +- `create` + - Port template updated with best practices, new CMake variables, `CONTROL` homepage field and example feature entries, links to relevant documentation, and maintainer function usage examples + - [(#8427)](https://github.com/microsoft/vcpkg/pull/8427) Update vcpkg create template + - [(#8488)](https://github.com/microsoft/vcpkg/pull/8488) update templates. + +#### The following documentation has been updated: +- [vcpkg_fixup_cmake_targets](docs/maintainers/cmake_fixup_cmake_targets.md) ***[NEW]*** + - [(#8365)](https://github.com/microsoft/vcpkg/pull/8365) [Documentation] Added documentation page for vcpkg_fixup_cmake_targets.cmake + - [(#8424)](https://github.com/microsoft/vcpkg/pull/8424) [Documentation] Update and rename cmake_fixup_cmake_targets.md to vcpkg_fixup_cmake_t… +- [vcpkg_build_make](docs/maintainers/vcpkg_build_make.md) ***[NEW]*** + - [(#8267)](https://github.com/microsoft/vcpkg/pull/8267) Add function vcpkg_configure_make/vcpkg_build_make/vcpkg_install_make/vcpkg_build_nmake/vcpkg_install_nmake +- [vcpkg_build_nmake](docs/maintainers/vcpkg_build_nmake.md) ***[NEW]*** + - [(#8267)](https://github.com/microsoft/vcpkg/pull/8267) Add function vcpkg_configure_make/vcpkg_build_make/vcpkg_install_make/vcpkg_build_nmake/vcpkg_install_nmake + - [(#8589)](https://github.com/microsoft/vcpkg/pull/8589) [libxslt]Using vcpkg_install_nmake in Windows, support unix. +- [vcpkg_configure_make](docs/maintainers/vcpkg_configure_make.md) ***[NEW]*** + - [(#8267)](https://github.com/microsoft/vcpkg/pull/8267) Add function vcpkg_configure_make/vcpkg_build_make/vcpkg_install_make/vcpkg_build_nmake/vcpkg_install_nmake + - [(#8647)](https://github.com/microsoft/vcpkg/pull/8647) support SKIP_CONFIGURE in vcpkg_configure_make. +- [vcpkg_install_make](docs/maintainers/vcpkg_install_make.md) ***[NEW]*** + - [(#8267)](https://github.com/microsoft/vcpkg/pull/8267) Add function vcpkg_configure_make/vcpkg_build_make/vcpkg_install_make/vcpkg_build_nmake/vcpkg_install_nmake +- [vcpkg_install_nmake](docs/maintainers/vcpkg_install_nmake.md) ***[NEW]*** + - [(#8267)](https://github.com/microsoft/vcpkg/pull/8267) Add function vcpkg_configure_make/vcpkg_build_make/vcpkg_install_make/vcpkg_build_nmake/vcpkg_install_nmake + - [(#8589)](https://github.com/microsoft/vcpkg/pull/8589) [libxslt]Using vcpkg_install_nmake in Windows, support unix. +- [Chinese README](README_zh_CN.md) ***[NEW]*** + - [(#8476)](https://github.com/microsoft/vcpkg/pull/8476) Add Chinese readme. +- [Portfile Helper Functions](docs/maintainers/portfile-functions.md) + - [(#8267)](https://github.com/microsoft/vcpkg/pull/8267) Add function vcpkg_configure_make/vcpkg_build_make/vcpkg_install_make/vcpkg_build_nmake/vcpkg_install_nmake +- [Maintainer Guidelines and Policies](docs/maintainers/maintainer-guide.md) + - [(#8720)](https://github.com/microsoft/vcpkg/pull/8720) maintainer-guide.md - Fix link + +#### The following *remarkable* changes have been made to vcpkg's infrastructure: +- New maintainer `portfile.cmake` helper functions for finer control over configuring/building/installing with `make` and `nmake` + - [(#8267)](https://github.com/microsoft/vcpkg/pull/8267) Add function vcpkg_configure_make/vcpkg_build_make/vcpkg_install_make/vcpkg_build_nmake/vcpkg_install_nmake + - [(#8540)](https://github.com/microsoft/vcpkg/pull/8540) Fix separate make and install execution error issue. + - [(#8589)](https://github.com/microsoft/vcpkg/pull/8589) [libxslt]Using vcpkg_install_nmake in Windows, support unix. + - [(#8610)](https://github.com/microsoft/vcpkg/pull/8610) Add AUTOCONF support with vcpkg_configure_make in Windows. + - [(#8647)](https://github.com/microsoft/vcpkg/pull/8647) support SKIP_CONFIGURE in vcpkg_configure_make. +- Support for the `go` compiler in `vcpkg_find_acquire_program` + - [(#8440)](https://github.com/microsoft/vcpkg/pull/8440) Add go to vcpkg_find_acquire_program + +#### The following *additional* changes have been made to vcpkg's infrastructure: +- [(#8365)](https://github.com/microsoft/vcpkg/pull/8365) [Documentation] Added documentation page for vcpkg_fixup_cmake_targets.cmake +- [(#8418)](https://github.com/microsoft/vcpkg/pull/8418) Add September changelog +- [(#8435)](https://github.com/microsoft/vcpkg/pull/8435) Find default for text/plain on Linux and Windows (#567) +- [(#8489)](https://github.com/microsoft/vcpkg/pull/8489) Fix option -j +- [(#8580)](https://github.com/microsoft/vcpkg/pull/8580) Fix CMake checks for Apple Clang 11.0 on macOS 10.15 +- [(#8638)](https://github.com/microsoft/vcpkg/pull/8638) Fix compile error in Visual Studio 2017 15.1 +- [(#8669)](https://github.com/microsoft/vcpkg/pull/8669) [vcpkg_download_distfile.cmake] Fix Examples +- [(#8667)](https://github.com/microsoft/vcpkg/pull/8667) vcpkg_configure_meson - Remove compiler flag /Oi +- [(#8639)](https://github.com/microsoft/vcpkg/pull/8639) mesonbuild - Update to 0.52.0 + +
+The following 24 ports have been added: + +|port|version| +|---|---| +|[cpp-base64](https://github.com/microsoft/vcpkg/pull/8368)| 2019-06-19 +|[mgnlibs](https://github.com/microsoft/vcpkg/pull/8390)| 2019-09-29 +|[mmx](https://github.com/microsoft/vcpkg/pull/8384)| 2019-09-29 +|[kcp](https://github.com/microsoft/vcpkg/pull/8278)| 2019-09-20 +|[dbow3](https://github.com/microsoft/vcpkg/pull/8547)| 1.0.0 +|[nlohmann-fifo-map](https://github.com/microsoft/vcpkg/pull/8458)| 2018.05.07 +|[libcrafter](https://github.com/microsoft/vcpkg/pull/8568)| 0.3 +|[libudns](https://github.com/microsoft/vcpkg/pull/8572)| 0.4 +|[ffnvcodec](https://github.com/microsoft/vcpkg/pull/8559)| 9.1.23.0 +|[bfgroup-lyra](https://github.com/microsoft/vcpkg/pull/8612)| 1.1 +|[google-cloud-cpp-common](https://github.com/microsoft/vcpkg/pull/8735)| 0.15.0 +|[libsrt](https://github.com/microsoft/vcpkg/pull/8712)| 1.3.4 +|[polyhook2](https://github.com/microsoft/vcpkg/pull/8719)| 2019-10-24 +|[tool-meson](https://github.com/microsoft/vcpkg/pull/8639)| 0.52.0 +|[slikenet](https://github.com/microsoft/vcpkg/pull/8693)| 2019-10-22 +|[libigl](https://github.com/microsoft/vcpkg/pull/8607)| 2.1.0-1 +|[libmesh](https://github.com/microsoft/vcpkg/pull/8592)| 1.5.0 +|[upb](https://github.com/microsoft/vcpkg/pull/8681)| 2019-10-21 +|[opencensus-cpp](https://github.com/microsoft/vcpkg/pull/8740)| 0.4.0 +|[openscap](https://github.com/microsoft/vcpkg/pull/8654)| 1.3.1 +|[fftwpp](https://github.com/microsoft/vcpkg/pull/8625)| 2.05 +|[ois](https://github.com/microsoft/vcpkg/pull/8507)| 1.5 +|[libdivide](https://github.com/microsoft/vcpkg/pull/8320)| 3.0 +|[wordnet](https://github.com/microsoft/vcpkg/pull/8816)| 3.0 +
+ +
+The following 151 ports have been updated: + +- kangaru `4.2.0` -> `4.2.1` + - [(#8414)](https://github.com/microsoft/vcpkg/pull/8414) [kangaru] Update library to 4.2.1 + +- magic-enum `0.6.0` -> `0.6.3` + - [(#8431)](https://github.com/microsoft/vcpkg/pull/8431) [magic_enum] Update to 0.6.1. Add HEAD_REF + - [(#8500)](https://github.com/microsoft/vcpkg/pull/8500) [magic-enum] Update to 0.6.2 + - [(#8656)](https://github.com/microsoft/vcpkg/pull/8656) [magic-enum] Update to 0.6.3 + +- json5-parser `1.0.0` -> `1.0.0-1` + - [(#8401)](https://github.com/microsoft/vcpkg/pull/8401) [json5-parser] fix find_package issue + +- reproc `8.0.1` -> `9.0.0` + - [(#8411)](https://github.com/microsoft/vcpkg/pull/8411) Update reproc to 9.0.0. + +- libfabric `1.8.0` -> `1.8.1` + - [(#8415)](https://github.com/microsoft/vcpkg/pull/8415) [libfabric] Update library to 1.8.1 + +- thrift `2019-05-07-3` -> `2019-05-07-4` + - [(#8410)](https://github.com/microsoft/vcpkg/pull/8410) [thrift]fix-paths + +- grpc `1.23.0` -> `1.23.1-1` + - [(#8438)](https://github.com/microsoft/vcpkg/pull/8438) [grpc] Update grpc to 1.23.1 + - [(#8737)](https://github.com/microsoft/vcpkg/pull/8737) [grpc]Fix build failure in Linux: duplicate function gettid. + +- protobuf `3.9.1` -> `3.10.0` + - [(#8439)](https://github.com/microsoft/vcpkg/pull/8439) [protobuf] Update protobuf to 3.10.0 + +- google-cloud-cpp `0.13.0` -> `0.14.0` + - [(#8441)](https://github.com/microsoft/vcpkg/pull/8441) [google-cloud-cpp] Update to v0.14.0 + +- nrf-ble-driver `4.1.1` -> `4.1.1-1` + - [(#8437)](https://github.com/microsoft/vcpkg/pull/8437) [nrf-ble-driver] Fix version number + +- plplot `5.13.0-2` -> `5.13.0-3` + - [(#8405)](https://github.com/microsoft/vcpkg/pull/8405) fix find_package(wxWidgets) issue in release build + +- freexl `1.0.4-2` -> `1.0.4-8` + - [(#8267)](https://github.com/microsoft/vcpkg/pull/8267) Add function vcpkg_configure_make/vcpkg_build_make/vcpkg_install_make/vcpkg_build_nmake/vcpkg_install_nmake + - [(#8489)](https://github.com/microsoft/vcpkg/pull/8489) Fix option -j + - [(#8540)](https://github.com/microsoft/vcpkg/pull/8540) Fix separate make and install execution error issue. + +- libosip2 `5.1.0` -> `5.1.0-1` + - [(#8267)](https://github.com/microsoft/vcpkg/pull/8267) Add function vcpkg_configure_make/vcpkg_build_make/vcpkg_install_make/vcpkg_build_nmake/vcpkg_install_nmake + +- x264 `157-303c484ec828ed0-2` -> `157-303c484ec828ed0-6` + - [(#8267)](https://github.com/microsoft/vcpkg/pull/8267) Add function vcpkg_configure_make/vcpkg_build_make/vcpkg_install_make/vcpkg_build_nmake/vcpkg_install_nmake + - [(#8489)](https://github.com/microsoft/vcpkg/pull/8489) Fix option -j + - [(#8540)](https://github.com/microsoft/vcpkg/pull/8540) Fix separate make and install execution error issue. + +- qt5-tools `5.12.5-1` -> `5.12.5-2` + - [(#8373)](https://github.com/microsoft/vcpkg/pull/8373) [qt5-tools] change control file so activeqt isn't a dependency on non windows + +- metis `5.1.0-5` -> `5.1.0-6` + - [(#8376)](https://github.com/microsoft/vcpkg/pull/8376) [metis][suitesparse] add metisConfig.cmake + +- suitesparse `5.4.0-3` -> `5.4.0-4` + - [(#8376)](https://github.com/microsoft/vcpkg/pull/8376) [metis][suitesparse] add metisConfig.cmake + +- activemq-cpp `3.9.5` -> `3.9.5-1` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- alac-decoder `0.2-1` -> `0.2-3` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- angelscript `2.33.1-1` -> `2.34.0` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + - [(#8520)](https://github.com/microsoft/vcpkg/pull/8520) [angelscript] Upgrade to version 2.34.0 + +- anyrpc `2017-12-01` -> `2017-12-01-1` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- apr-util `1.6.0-3` -> `1.6.0-5` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- apr `1.6.5-2` -> `1.6.5-3` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- argtable2 `2.13-2` -> `2.13-4` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- atk `2.24.0-4` -> `2.24.0-5` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- atkmm `2.24.2-1` -> `2.24.2-2` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- aubio `0.4.9` -> `0.4.9-1` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- azure-c-shared-utility `2019-08-20.1` -> `2019-10-07.2` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + - [(#8513)](https://github.com/microsoft/vcpkg/pull/8513) [azure] Update azure-iot-sdk-c for release of 2019-10-07 + - [(#8686)](https://github.com/microsoft/vcpkg/pull/8686) [azure] Update azure-iot-sdk-c for 07/2019 LTS refresh + - [(#8731)](https://github.com/microsoft/vcpkg/pull/8731) Revert "[azure] Update azure-iot-sdk-c for 07/2019 LTS refresh (#8686)" + +- berkeleydb `4.8.30-2` -> `4.8.30-3` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- bigint `2010.04.30-3` -> `2010.04.30-4` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- blaze `3.6` -> `3.6-1` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- bond `8.1.0-2` -> `8.1.0-3` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- boost-di `1.1.0` -> `1.1.0-1` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- butteraugli `2019-05-08` -> `2019-05-08-1` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- cairomm `1.15.3-3` -> `1.15.3-4` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- cartographer `1.0.0-1` -> `1.0.0-2` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- ccd `2.1-1` -> `2.1-3` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- ccfits `2.5-3` -> `2.5-4` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- cfitsio `3.410-2` -> `3.410-3` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- charls `2.0.0-2` -> `2.0.0-3` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- chmlib `0.40-3` -> `0.40-4` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- clblas `2.12-2` -> `2.12-3` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- clblast `1.5.0` -> `1.5.0-1` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- clfft `2.12.2-1` -> `2.12.2-2` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- collada-dom `2.5.0-2` -> `2.5.0-3` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- console-bridge `0.4.3-1` -> `0.4.3-2` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- cppkafka `0.3.1-1` -> `0.3.1-2` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- cppunit `1.14.0` -> `1.14.0-1` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- cunit `2.1.3-2` -> `2.1.3-3` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- dlfcn-win32 `1.1.1-3` -> `1.1.1-4` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- dmlc `2019-08-12` -> `2019-08-12-1` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- duktape `2.4.0-4` -> `2.4.0-6` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + - [(#8767)](https://github.com/microsoft/vcpkg/pull/8767) [duktape] fix pip and pyyaml install issue + +- entityx `1.3.0-1` -> `1.3.0-2` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- epsilon `0.9.2` -> `0.9.2-1` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- fcl `0.5.0-6` -> `0.5.0-7` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- flint `2.5.2-3` -> `2.5.2-4` + - [(#8087)](https://github.com/microsoft/vcpkg/pull/8087) [vcpkg] fatal_error when patch fails to apply + +- nameof `2019-07-13` -> `0.9.2` + - [(#8464)](https://github.com/microsoft/vcpkg/pull/8464) [nameof] Update to 0.9.1 + - [(#8671)](https://github.com/microsoft/vcpkg/pull/8671) [nameof] Update to 0.9.2 + +- gsl-lite `0.28.0` -> `0.34.0` + - [(#8465)](https://github.com/microsoft/vcpkg/pull/8465) [gsl-lite] Update to v0.34.0 + +- libffi `3.1-5` -> `3.1-6` + - [(#8162)](https://github.com/microsoft/vcpkg/pull/8162) [libffi] Add support for CMake config + +- mathgl `2.4.3-2` -> `2.4.3-3` + - [(#8369)](https://github.com/microsoft/vcpkg/pull/8369) [mathgl]Fix feature glut/hdf5/qt5. + +- yoga `1.14.0` -> `1.16.0-1` + - [(#8495)](https://github.com/microsoft/vcpkg/pull/8495) [yoga] Add project declaration and fix linux installation. + - [(#8630)](https://github.com/microsoft/vcpkg/pull/8630) [yoga] Update to 1.16.0 and enabled UWP builds + +- openssl-windows `1.0.2s-1` -> `1.0.2s-2` + - [(#8224)](https://github.com/microsoft/vcpkg/pull/8224) Including config file openssl.cnf in installation. + +- liblas `1.8.1-2` -> `1.8.1-3` + - [(#7920)](https://github.com/microsoft/vcpkg/pull/7920) [liblas]Fix ${_IMPORT_PREFIX} in liblas-depends-*.cmake. + - [(#7917)](https://github.com/microsoft/vcpkg/pull/7917) [proj4]Upgrade version to 6.1.1 and remove useless patches. + +- azure-storage-cpp `6.1.0-2` -> `7.0.0` + - [(#8499)](https://github.com/microsoft/vcpkg/pull/8499) [azure-storage-cpp]Upgrade to 7.0.0 + +- sdl2-mixer `2.0.4-6` -> `2.0.4-7` + - [(#8496)](https://github.com/microsoft/vcpkg/pull/8496) [sdl2-mixer]Fix usage issue. + +- armadillo `2019-04-16-5` -> `2019-04-16-6` + - [(#8494)](https://github.com/microsoft/vcpkg/pull/8494) [armadillo]Fix cmake path. + +- restinio `0.6.0` -> `0.6.0.1` + - [(#8493)](https://github.com/microsoft/vcpkg/pull/8493) [restinio] updated to v.0.6.0.1 + +- ode `0.15.1-3` -> `0.16` + - [(#8485)](https://github.com/microsoft/vcpkg/pull/8485) [ode] Upgrade to 0.16 + +- itk `5.0.1-1` -> `5.0.1-2` + - [(#8501)](https://github.com/microsoft/vcpkg/pull/8501) [itk]Fix use 64 bit ids. + +- irrlicht `1.8.4-2` -> `1.8.4-4` + - [(#8505)](https://github.com/microsoft/vcpkg/pull/8505) [irrlicht] Reorder link libraries + - [(#8535)](https://github.com/microsoft/vcpkg/pull/8535) [irrlicht] do not build exisiting dependencies + +- azure-iot-sdk-c `2019-08-20.1` -> `2019-10-11.2` + - [(#8513)](https://github.com/microsoft/vcpkg/pull/8513) [azure] Update azure-iot-sdk-c for release of 2019-10-07 + - [(#8565)](https://github.com/microsoft/vcpkg/pull/8565) azure-iot-sdk-c for release of 2019-10-10 + - [(#8686)](https://github.com/microsoft/vcpkg/pull/8686) [azure] Update azure-iot-sdk-c for 07/2019 LTS refresh + - [(#8731)](https://github.com/microsoft/vcpkg/pull/8731) Revert "[azure] Update azure-iot-sdk-c for 07/2019 LTS refresh (#8686)" + +- azure-macro-utils-c `2019-08-20.1` -> `2019-10-07.2` + - [(#8513)](https://github.com/microsoft/vcpkg/pull/8513) [azure] Update azure-iot-sdk-c for release of 2019-10-07 + - [(#8686)](https://github.com/microsoft/vcpkg/pull/8686) [azure] Update azure-iot-sdk-c for 07/2019 LTS refresh + - [(#8731)](https://github.com/microsoft/vcpkg/pull/8731) Revert "[azure] Update azure-iot-sdk-c for 07/2019 LTS refresh (#8686)" + +- azure-uamqp-c `2019-08-20.1` -> `2019-10-07.2` + - [(#8513)](https://github.com/microsoft/vcpkg/pull/8513) [azure] Update azure-iot-sdk-c for release of 2019-10-07 + - [(#8686)](https://github.com/microsoft/vcpkg/pull/8686) [azure] Update azure-iot-sdk-c for 07/2019 LTS refresh + - [(#8731)](https://github.com/microsoft/vcpkg/pull/8731) Revert "[azure] Update azure-iot-sdk-c for 07/2019 LTS refresh (#8686)" + +- azure-uhttp-c `2019-08-20.1` -> `2019-10-07.2` + - [(#8513)](https://github.com/microsoft/vcpkg/pull/8513) [azure] Update azure-iot-sdk-c for release of 2019-10-07 + - [(#8686)](https://github.com/microsoft/vcpkg/pull/8686) [azure] Update azure-iot-sdk-c for 07/2019 LTS refresh + - [(#8731)](https://github.com/microsoft/vcpkg/pull/8731) Revert "[azure] Update azure-iot-sdk-c for 07/2019 LTS refresh (#8686)" + +- azure-umqtt-c `2019-08-20.1` -> `2019-10-07.2` + - [(#8513)](https://github.com/microsoft/vcpkg/pull/8513) [azure] Update azure-iot-sdk-c for release of 2019-10-07 + - [(#8686)](https://github.com/microsoft/vcpkg/pull/8686) [azure] Update azure-iot-sdk-c for 07/2019 LTS refresh + - [(#8731)](https://github.com/microsoft/vcpkg/pull/8731) Revert "[azure] Update azure-iot-sdk-c for 07/2019 LTS refresh (#8686)" + +- umock-c `2019-08-20.1` -> `2019-10-07.2` + - [(#8513)](https://github.com/microsoft/vcpkg/pull/8513) [azure] Update azure-iot-sdk-c for release of 2019-10-07 + - [(#8686)](https://github.com/microsoft/vcpkg/pull/8686) [azure] Update azure-iot-sdk-c for 07/2019 LTS refresh + - [(#8731)](https://github.com/microsoft/vcpkg/pull/8731) Revert "[azure] Update azure-iot-sdk-c for 07/2019 LTS refresh (#8686)" + +- openxr-loader `2019-09-25` -> `1.0.3.0` + - [(#8515)](https://github.com/microsoft/vcpkg/pull/8515) [openxr-loader] Update to 1.0.3 release + latest C++ bindings header + +- gdcm `3.0.0-5` -> `3.0.3` + - [(#8522)](https://github.com/microsoft/vcpkg/pull/8522) [gdcm/libtorrent] Upgrade to new version + +- libtorrent `1.2.1-bcb26fd6` -> `1.2.2` + - [(#8522)](https://github.com/microsoft/vcpkg/pull/8522) [gdcm/libtorrent] Upgrade to new version + +- sfml `2.5.1-3` -> `2.5.1-4` + - [(#8523)](https://github.com/microsoft/vcpkg/pull/8523) [sfml]Add usage. + +- darknet `0.2.5.1` -> `0.2.5.1-1` + - [(#8527)](https://github.com/microsoft/vcpkg/pull/8527) [stb] update and add cmake module + +- stb `2019-07-11` -> `2019-08-17` + - [(#8527)](https://github.com/microsoft/vcpkg/pull/8527) [stb] update and add cmake module + +- curlpp `2018-06-15` -> `2018-06-15-1` + - [(#8532)](https://github.com/microsoft/vcpkg/pull/8532) [curlpp] fix regression introduced in #7331 + +- libjpeg-turbo `2.0.2` -> `2.0.3` + - [(#8412)](https://github.com/microsoft/vcpkg/pull/8412) [libjpeg-turbo] Update to 2.0.3. + +- opencv3 `3.4.7-1` -> `3.4.7-2` + - [(#8542)](https://github.com/microsoft/vcpkg/pull/8542) [opencv] add tesseract to fix downstream linking + +- opencv4 `4.1.1-2` -> `4.1.1-3` + - [(#8542)](https://github.com/microsoft/vcpkg/pull/8542) [opencv] add tesseract to fix downstream linking + +- gtest `2019-08-14-2` -> `2019-10-09` + - [(#8544)](https://github.com/microsoft/vcpkg/pull/8544) [gtest/pmdk] Upgrade to new version + +- pmdk `1.6-3` -> `2019-10-10` + - [(#8544)](https://github.com/microsoft/vcpkg/pull/8544) [gtest/pmdk] Upgrade to new version + - [(#8586)](https://github.com/microsoft/vcpkg/pull/8586) [pmdk] Upgrade to version 1.7 + +- imgui `1.72b` -> `1.73-1` + - [(#8504)](https://github.com/microsoft/vcpkg/pull/8504) [imgui] Update to 1.73 + - [(#8605)](https://github.com/microsoft/vcpkg/pull/8605) [imgui]Add feature example in windows. + +- sqlite3 `3.29.0-1` -> `3.30.1-1` + - [(#8567)](https://github.com/microsoft/vcpkg/pull/8567) [sqlite3] Update to 3.30.1 + - [(#7917)](https://github.com/microsoft/vcpkg/pull/7917) [proj4]Upgrade version to 6.1.1 and remove useless patches. + +- ffmpeg `4.2` -> `4.2-1` + - [(#8596)](https://github.com/microsoft/vcpkg/pull/8596) [ffmpeg] Pass Vcpkg compiler and linker flags to build script + +- libyuv `fec9121` -> `fec9121-1` + - [(#8576)](https://github.com/microsoft/vcpkg/pull/8576) [libyuv] fix include header installation + - [(#8709)](https://github.com/microsoft/vcpkg/pull/8709) [libyuv] Add Mac/Linux build support + - [(#8769)](https://github.com/microsoft/vcpkg/pull/8769) [libyuv]Build corresponding type library according to BUILD_SHARED_LIBS. + +- libarchive `3.4.0` -> `3.4.0-1` + - [(#8564)](https://github.com/microsoft/vcpkg/pull/8564) Mixed release and debug build in libarchive + +- aixlog `1.2.1-1` -> `1.2.2` + - [(#8587)](https://github.com/microsoft/vcpkg/pull/8587) [aixlog] Update library to 1.2.2 + +- portaudio `19.0.6.00-5` -> `2019-09-30` + - [(#8399)](https://github.com/microsoft/vcpkg/pull/8399) [portaudio] Update to the latest version + +- chakracore `1.11.13` -> `1.11.14` + - [(#8593)](https://github.com/microsoft/vcpkg/pull/8593) [chakracore] Update library to 1.11.14 + +- embree3 `3.5.2-2` -> `3.5.2-3` + - [(#8608)](https://github.com/microsoft/vcpkg/pull/8608) [embree3]Fix generated cmake files path. + - [(#8591)](https://github.com/microsoft/vcpkg/pull/8591) [embree3]Fix EMBREE_ROOT_DIR path setting,EMBREE_LIBRARY Debug/Release path setting. + +- cpp-httplib `0.2.4` -> `0.2.5` + - [(#8590)](https://github.com/microsoft/vcpkg/pull/8590) [cpp-httplib] Update library to 0.2.5 + +- range-v3 `0.9.0-20190822` -> `0.9.1` + - [(#8583)](https://github.com/microsoft/vcpkg/pull/8583) [range-v3] Update to 0.9.1 + +- otl `4.0.443-2` -> `4.0.447` + - [(#8581)](https://github.com/microsoft/vcpkg/pull/8581) otl version 447 + +- directxtex `aug2019` -> `oct2019` + - [(#8563)](https://github.com/microsoft/vcpkg/pull/8563) [directxtk][directxtk12][directxtex][directxmesh] Fixed missing pdbs + - [(#8723)](https://github.com/microsoft/vcpkg/pull/8723) [directxtex] Update library to oct2019 + +- directxtk `aug2019` -> `oct2019` + - [(#8563)](https://github.com/microsoft/vcpkg/pull/8563) [directxtk][directxtk12][directxtex][directxmesh] Fixed missing pdbs + - [(#8724)](https://github.com/microsoft/vcpkg/pull/8724) [directxtk] Update library to oct2019 + +- directxtk12 `aug2019` -> `oct2019` + - [(#8563)](https://github.com/microsoft/vcpkg/pull/8563) [directxtk][directxtk12][directxtex][directxmesh] Fixed missing pdbs + - [(#8725)](https://github.com/microsoft/vcpkg/pull/8725) [directxtk12] Update library to oct2019 + +- vtk `8.2.0-8` -> `8.2.0-9` + - [(#8554)](https://github.com/microsoft/vcpkg/pull/8554) [vtk] Change atlmfc as feature + - [(#7917)](https://github.com/microsoft/vcpkg/pull/7917) [proj4]Upgrade version to 6.1.1 and remove useless patches. + +- sdl2 `2.0.9-4` -> `2.0.10-2` + - [(#8643)](https://github.com/microsoft/vcpkg/pull/8643) [sdl2] Update to 2.0.10 + - [(#8760)](https://github.com/microsoft/vcpkg/pull/8760) Fix sdl2 build if there is space in the path + +- gdal `2.4.1-8` -> `2.4.1-9` + - [(#7917)](https://github.com/microsoft/vcpkg/pull/7917) [proj4]Upgrade version to 6.1.1 and remove useless patches. + - [(#8621)](https://github.com/microsoft/vcpkg/pull/8621) [proj4] Update to version 6.2.0 + +- libgeotiff `1.4.2-9` -> `1.4.2-10` + - [(#7917)](https://github.com/microsoft/vcpkg/pull/7917) [proj4]Upgrade version to 6.1.1 and remove useless patches. + +- proj4 `4.9.3-5` -> `6.2.0-1` + - [(#7917)](https://github.com/microsoft/vcpkg/pull/7917) [proj4]Upgrade version to 6.1.1 and remove useless patches. + - [(#8621)](https://github.com/microsoft/vcpkg/pull/8621) [proj4] Update to version 6.2.0 + +- tcl `8.6.5` -> `8.6.10-2` + - [(#8402)](https://github.com/microsoft/vcpkg/pull/8402) [tcl]Upgrade to 8.6.9 and use vcpkg_install_make/vcpkg_install_nmake. + +- physx `4.1.1-1` -> `4.1.1-3` + - [(#8561)](https://github.com/microsoft/vcpkg/pull/8561) [physx] Added a patch to fix missing typeinfo.h header with VS16.3 and missing pdb files + - [(#8658)](https://github.com/microsoft/vcpkg/pull/8658) [physx] Added UWP support + +- celero `2.5.0-1` -> `2.6.0` + - [(#8646)](https://github.com/microsoft/vcpkg/pull/8646) [celero] Updated to v2.6.0 + +- assimp `5.0.0` -> `5.0.0-1` + - [(#8665)](https://github.com/microsoft/vcpkg/pull/8665) [assimp] Fix cmake package config + +- mosquitto `1.6.3` -> `1.6.7` + - [(#8661)](https://github.com/microsoft/vcpkg/pull/8661) [mosquitto] Update to 1.6.7 + +- plog `1.1.4` -> `1.1.5` + - [(#8685)](https://github.com/microsoft/vcpkg/pull/8685) [plog] Update to 1.1.5 + +- catch2 `2.9.2` -> `2.10.1-1` + - [(#8684)](https://github.com/microsoft/vcpkg/pull/8684) [catch2] Update to 2.10.1 + +- nano-signal-slot `commit-25aa2aa90d450d3c7550c535c7993a9e2ed0764a` -> `2018-08-25-1` + - [(#8675)](https://github.com/microsoft/vcpkg/pull/8675) [nano-signal-slot] Enable UWP and dynamic builds + +- duckx `2019-08-06` -> `1.0.0` + - [(#8673)](https://github.com/microsoft/vcpkg/pull/8673) [duckx] update library to 1.0.0 + +- jsoncons `0.136.0` -> `0.136.1` + - [(#8689)](https://github.com/microsoft/vcpkg/pull/8689) [jsoncons] Update to v.0.136.1 + +- libpmemobj-cpp `1.7` -> `1.8` + - [(#8729)](https://github.com/microsoft/vcpkg/pull/8729) [libpmemobj-cpp] Update library to 1.8 + +- forest `12.0.3` -> `12.0.4` + - [(#8727)](https://github.com/microsoft/vcpkg/pull/8727) [forest] Update library to 12.0.4 + +- check `0.12.0-2` -> `0.13.0` + - [(#8722)](https://github.com/microsoft/vcpkg/pull/8722) [check] Update library to 0.13.0 + +- libcopp `1.2.0` -> `1.2.1` + - [(#8728)](https://github.com/microsoft/vcpkg/pull/8728) [libcopp] Update library to 1.2.1 + +- corrade `2019.01-1` -> `2019.10` + - [(#8742)](https://github.com/microsoft/vcpkg/pull/8742) Update magnum ports to new version + +- magnum-extras `2019.01-2` -> `2019.10` + - [(#8742)](https://github.com/microsoft/vcpkg/pull/8742) Update magnum ports to new version + +- magnum-integration `2019.01-2` -> `2019.10` + - [(#8742)](https://github.com/microsoft/vcpkg/pull/8742) Update magnum ports to new version + +- magnum-plugins `2019.01-2` -> `2019.10` + - [(#8742)](https://github.com/microsoft/vcpkg/pull/8742) Update magnum ports to new version + +- magnum `2019.01-2` -> `2019.10` + - [(#8742)](https://github.com/microsoft/vcpkg/pull/8742) Update magnum ports to new version + +- curl `7.66.0` -> `7.66.0-1` + - [(#8739)](https://github.com/microsoft/vcpkg/pull/8739) [curl]Fix tools depends zlib. + +- x265 `3.0-2` -> `3.2-1` + - [(#8738)](https://github.com/microsoft/vcpkg/pull/8738) update x265 to 3.2 + +- pixman `0.38.0-3` -> `0.38.0-4` + - [(#8736)](https://github.com/microsoft/vcpkg/pull/8736) [pixman] Improve Arm detection + +- xmlsec `1.2.28` -> `1.2.29` + - [(#8721)](https://github.com/microsoft/vcpkg/pull/8721) [xmlsec] Update to 1.2.29 + +- string-theory `2.2` -> `2.3` + - [(#8734)](https://github.com/microsoft/vcpkg/pull/8734) [string-theory] Update library to 2.3 + +- log4cpp `2.9.1-1` -> `2.9.1-2` + - [(#8741)](https://github.com/microsoft/vcpkg/pull/8741) [log4cpp] Fix link static library + +- so5extra `1.3.1-2` -> `1.3.1.1` + - [(#8770)](https://github.com/microsoft/vcpkg/pull/8770) [so5extra] updated to 1.3.1.1 + +- wangle `2019.07.08.00` -> `2019.07.08.00-1` + - [(#8764)](https://github.com/microsoft/vcpkg/pull/8764) [wangle]Fix config.cmake + +- fribidi `2019-02-04-1` -> `2019-02-04-2` + - [(#8639)](https://github.com/microsoft/vcpkg/pull/8639) mesonbuild - Update to 0.52.0 + +- libepoxy `1.5.3-1` -> `1.5.3-2` + - [(#8639)](https://github.com/microsoft/vcpkg/pull/8639) mesonbuild - Update to 0.52.0 + +- jxrlib `1.1-9` -> `2019.10.9` + - [(#8525)](https://github.com/microsoft/vcpkg/pull/8525) [jxrlib] Update port + +- fltk `1.3.4-8` -> `1.3.5-1` + - [(#8457)](https://github.com/microsoft/vcpkg/pull/8457) FLTK v1.3.5 + +- qt5-location `5.12.5-1` -> `5.12.5-2` + - [(#8777)](https://github.com/microsoft/vcpkg/pull/8777) [qt5-location] Modify clipper library name to avoid conflicts with vxl + +- pthreads `3.0.0-3` -> `3.0.0-4` + - [(#8651)](https://github.com/microsoft/vcpkg/pull/8651) [pthreads]Add usage. + +- glib `2.52.3-14-3` -> `2.52.3-14-4` + - [(#8653)](https://github.com/microsoft/vcpkg/pull/8653) [glib]Fix linux build. + +- libxslt `1.1.33-2` -> `1.1.33-4` + - [(#8589)](https://github.com/microsoft/vcpkg/pull/8589) [libxslt]Using vcpkg_install_nmake in Windows, support unix. + +- paho-mqtt `1.3.0` -> `1.3.0-1` + - [(#8492)](https://github.com/microsoft/vcpkg/pull/8492) Export paho-mqtt cmake targets, fix paho-mqttpp3 dependency. + +- paho-mqttpp3 `1.0.1-2` -> `1.0.1-3` + - [(#8492)](https://github.com/microsoft/vcpkg/pull/8492) Export paho-mqtt cmake targets, fix paho-mqttpp3 dependency. + +- pcre2 `10.30-5` -> `10.30-6` + - [(#8620)](https://github.com/microsoft/vcpkg/pull/8620) [pcre2]Fix uwp build failure. + +- arrow `0.14.1-1` -> `0.15.1` + - [(#8815)](https://github.com/microsoft/vcpkg/pull/8815) [Arrow] Update to Arrow 0.15.1 + +- netcdf-c `4.7.0-4` -> `4.7.0-5` + - [(#8398)](https://github.com/microsoft/vcpkg/pull/8398) [netcdf-c] Add usage + +- sol2 `3.0.3-1` -> `3.0.3-2` + - [(#8776)](https://github.com/microsoft/vcpkg/pull/8776) [sol2] Use the single header release + +- arb `2.16.0` -> `2.17.0` + - [(#8831)](https://github.com/microsoft/vcpkg/pull/8831) [arb]Upgrade to 2.17.0 + +- wxwidgets `3.1.2-2` -> `3.1.3` + - [(#8808)](https://github.com/microsoft/vcpkg/pull/8808) [wxwidgets] Upgrade to 3.1.3 + +
+ +-- vcpkg team vcpkg@microsoft.com FRI, 01 Nov 08:30:00 -0800 + +vcpkg (2019.09.30) +--- +#### Total port count: 1225 +#### Total port count per triplet (tested): +|triplet|ports available| +|---|---| +|**x64-windows**|1151| +|x86-windows|1136| +|x64-windows-static|1061| +|**x64-linux**|980| +|**x64-osx**|939| +|arm64-windows|766| +|x64-uwp|624| +|arm-uwp|594| + +#### The following commands and options have been updated: +- `x-history` ***[NEW COMMAND]*** + - Shows the full history of CONTROL version of a port, including the vcpkg commit hash, CONTROL version, and date of vcpkg commit + - [(#7377)](https://github.com/microsoft/vcpkg/pull/7377) [x-history] Prints CONTROL version history of a port 👻 + - [(#8101)](https://github.com/microsoft/vcpkg/pull/8101) fix x-history help desc. +- `depend-info` + - Constrain argument count to single port name as usage intends + - [(#8135)](https://github.com/microsoft/vcpkg/pull/8135) [vcpkg] Fix `depend-info` command arguments arity + +#### The following documentation has been updated: +- [Frequently Asked Questions](docs/about/faq.md) + - [(#8258)](https://github.com/microsoft/vcpkg/pull/8258) Add detailed instructions for custom configurations +- [Maintainer Guidelines and Policies](docs/maintainers/maintainer-guide.md) + - [(#8383)](https://github.com/microsoft/vcpkg/pull/8383) Fix a typo in maintainer-guide.md + +#### The following *remarkable* changes have been made to vcpkg's infrastructure: +- Add port features to CI test result XML as the first step in testing them in CI system + - [(#8342)](https://github.com/microsoft/vcpkg/pull/8342) [CI system] Add features to test result xml + +#### The following *additional* changes have been made to vcpkg's infrastructure: +- [(#8048)](https://github.com/microsoft/vcpkg/pull/8048) Add August changelog +- [(#8082)](https://github.com/microsoft/vcpkg/pull/8082) [vcpkg] remove text from license +- [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 +- [(#7954)](https://github.com/microsoft/vcpkg/pull/7954) Fix bug in `.vcpkg-root` detection that breaks `--overlay-triplets` +- [(#8131)](https://github.com/microsoft/vcpkg/pull/8131) [vcpkg] add missing implib definitions, fix shared lib extension on mac +- [(#8129)](https://github.com/microsoft/vcpkg/pull/8129) [vcpkg] Continue on malformed paths in PATH +- [(#8200)](https://github.com/microsoft/vcpkg/pull/8200) [vcpkg] Fix missing VCPKG_ROOT_PATH in create command +- [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats +- [(#5180)](https://github.com/microsoft/vcpkg/pull/5180) Use CMAKE_TRY_COMPILE_PLATFORM_VARIABLES to propagate values +- [(#8032)](https://github.com/microsoft/vcpkg/pull/8032) [vcpkg] Avoid RENAME usage to prevent cross-device link problems (#4245) +- [(#8304)](https://github.com/microsoft/vcpkg/pull/8304) [ports.cmake] Fixup capitalization inconsistencies of Windows drive letter + +
+The following 55 ports have been added: + +|port|version| +|---|---| +|[dmlc](https://github.com/microsoft/vcpkg/pull/7549)| 2019-08-12 +|[anyrpc](https://github.com/microsoft/vcpkg/pull/7438)| 2017-12-01 +|[imgui-sfml](https://github.com/microsoft/vcpkg/pull/7429)[#8004](https://github.com/microsoft/vcpkg/pull/8004) | 2.1 +|[ignition-cmake0](https://github.com/microsoft/vcpkg/pull/7781)[#8044](https://github.com/microsoft/vcpkg/pull/8044) [#8136](https://github.com/microsoft/vcpkg/pull/8136) | 0.6.2-1 +|[ignition-math4](https://github.com/microsoft/vcpkg/pull/7781)| 4.0.0 +|[ignition-modularscripts](https://github.com/microsoft/vcpkg/pull/7781)[#8136](https://github.com/microsoft/vcpkg/pull/8136) | 2019-09-11 +|[volk](https://github.com/microsoft/vcpkg/pull/8035)[#8364](https://github.com/microsoft/vcpkg/pull/8364) | 2019-09-26 +|[cppkafka](https://github.com/microsoft/vcpkg/pull/7987)[#8073](https://github.com/microsoft/vcpkg/pull/8073) | 0.3.1-1 +|[nativefiledialog](https://github.com/microsoft/vcpkg/pull/7944)| 2019-08-28 +|[cello](https://github.com/microsoft/vcpkg/pull/7386)| 2019-07-23 +|[libhydrogen](https://github.com/microsoft/vcpkg/pull/7436)| 2019-08-11 +|[quantlib](https://github.com/microsoft/vcpkg/pull/7283)| 2019-09-02 +|[magic-get](https://github.com/microsoft/vcpkg/pull/8072)| 2019-09-02 +|[cityhash](https://github.com/microsoft/vcpkg/pull/7879)| 2013-01-08 +|[ignition-common1](https://github.com/microsoft/vcpkg/pull/8111)| 1.1.1 +|[wampcc](https://github.com/microsoft/vcpkg/pull/7929)| 2019-09-04 +|[hidapi](https://github.com/microsoft/vcpkg/pull/8113)| 2019-08-30 +|[sokol](https://github.com/microsoft/vcpkg/pull/8107)| 2019-09-09 +|[parallelstl](https://github.com/microsoft/vcpkg/pull/8039)| 20190522-1 +|[marl](https://github.com/microsoft/vcpkg/pull/8132)[#8161](https://github.com/microsoft/vcpkg/pull/8161) | 2019-09-13 +|[vectorclass](https://github.com/microsoft/vcpkg/pull/7573)| 2.00.01 +|[wren](https://github.com/microsoft/vcpkg/pull/7242)| 2019-07-01 +|[libsrtp](https://github.com/microsoft/vcpkg/pull/8046)| 2.2.0 +|[ignition-msgs1](https://github.com/microsoft/vcpkg/pull/8044)| 1.0.0 +|[ignition-transport4](https://github.com/microsoft/vcpkg/pull/8044)| 4.0.0 +|[argtable3](https://github.com/microsoft/vcpkg/pull/7815)| 2019-08-21 +|[llgl](https://github.com/microsoft/vcpkg/pull/7701)| 2019-08-15 +|[sdformat6](https://github.com/microsoft/vcpkg/pull/8137)| 6.2.0 +|[grppi](https://github.com/microsoft/vcpkg/pull/8125)| 0.4.0 +|[opencolorio](https://github.com/microsoft/vcpkg/pull/8006)| 1.1.1 +|[cpputest](https://github.com/microsoft/vcpkg/pull/8188)| 2019-9-16 +|[winreg](https://github.com/microsoft/vcpkg/pull/8190)[#8371](https://github.com/microsoft/vcpkg/pull/8371) | 1.2.1-1 +|[zfp](https://github.com/microsoft/vcpkg/pull/7955)| 0.5.5-1 +|[libyuv](https://github.com/microsoft/vcpkg/pull/7486)| fec9121 +|[foonathan-memory](https://github.com/microsoft/vcpkg/pull/7350)[#8266](https://github.com/microsoft/vcpkg/pull/8266) | 2019-07-21-1 +|[jinja2cpplight](https://github.com/microsoft/vcpkg/pull/8207)| 2018-05-08 +|[liblbfgs](https://github.com/microsoft/vcpkg/pull/8186)| 1.10 +|[sigslot](https://github.com/microsoft/vcpkg/pull/8262)| 1.0.0 +|[cute-headers](https://github.com/microsoft/vcpkg/pull/8277)| 2019-09-20 +|[libsoundio](https://github.com/microsoft/vcpkg/pull/8273)| 2.0.0 +|[matplotlib-cpp](https://github.com/microsoft/vcpkg/pull/8313)| 2019-09-24 +|[asynch](https://github.com/microsoft/vcpkg/pull/8317)[#8371](https://github.com/microsoft/vcpkg/pull/8371) | 2019-09-21-1 +|[minimp3](https://github.com/microsoft/vcpkg/pull/8319)[#8371](https://github.com/microsoft/vcpkg/pull/8371) | 2019-07-24-1 +|[crfsuite](https://github.com/microsoft/vcpkg/pull/8233)| 2019-07-21 +|[cudnn](https://github.com/microsoft/vcpkg/pull/7536)| 7.6 +|[libosip2](https://github.com/microsoft/vcpkg/pull/8261)| 5.1.0 +|[portable-snippets](https://github.com/microsoft/vcpkg/pull/7783)| 2019-09-20 +|[ignition-fuel-tools1](https://github.com/microsoft/vcpkg/pull/8136)| 1.2.0 +|[clickhouse-cpp](https://github.com/microsoft/vcpkg/pull/7880)| 2019-05-22 +|[tweeny](https://github.com/microsoft/vcpkg/pull/8341)| 3.0 +|[nanogui](https://github.com/microsoft/vcpkg/pull/8302)| 2019-09-23 +|[wepoll](https://github.com/microsoft/vcpkg/pull/8280)| 1.5.5 +|[tcl](https://github.com/microsoft/vcpkg/pull/8026)| 8.6.5 +|[cpuinfo](https://github.com/microsoft/vcpkg/pull/7449)| 2019-07-28 +|[mathc](https://github.com/microsoft/vcpkg/pull/8394)| 2019-09-29 +
+ +
+The following 220 ports have been updated: + +- breakpad `2019-07-11` -> `2019-07-11-1` + - [(#7938)](https://github.com/microsoft/vcpkg/pull/7938) [breakpad] Fix build failed with Visual Studio 2019 + +- gtest `2019-08-14-1` -> `2019-08-14-2` + - [(#7887)](https://github.com/microsoft/vcpkg/pull/7887) [gtest]Re-fix gmock target. + +- libxslt `1.1.33` -> `1.1.33-2` + - [(#7451)](https://github.com/microsoft/vcpkg/pull/7451) [libxslt]Fix dependent ports in static builds. + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- pcre2 `10.30-4` -> `10.30-5` + - [(#7948)](https://github.com/microsoft/vcpkg/pull/7948) Fix build with Emscripten/WASM + +- entt `3.0.0-1` -> `3.1.1` + - [(#7984)](https://github.com/microsoft/vcpkg/pull/7984) [entt] Update to 3.1.0 + - [(#8098)](https://github.com/microsoft/vcpkg/pull/8098) [entt] Update to 3.1.1 + +- raylib `2019-04-27-2` -> `2.5.0` + - [(#7848)](https://github.com/microsoft/vcpkg/pull/7848) [raylib] update to 2.5.0 + +- jsoncons `0.132.1` -> `0.136.0` + - [(#8034)](https://github.com/microsoft/vcpkg/pull/8034) [jsoncons] Update to version 0.133.0 + - [(#8221)](https://github.com/microsoft/vcpkg/pull/8221) [jsoncons] Update to v0.134.0 + - [(#8348)](https://github.com/microsoft/vcpkg/pull/8348) [jsoncons] Update jsoncons to v0.135.0 + - [(#8382)](https://github.com/microsoft/vcpkg/pull/8382) [jsoncons] Update jsoncons to v0.136.0 + +- exiv2 `0.27.1-1` -> `0.27.2-1` + - [(#7992)](https://github.com/microsoft/vcpkg/pull/7992) [exiv2] Update library to 0.27.2 + +- gettext `0.19-10` -> `0.19-11` + - [(#7990)](https://github.com/microsoft/vcpkg/pull/7990) [gettext]Improve gettext on Linux. + +- wtl `10.0-2` -> `10.0-3` + - [(#8005)](https://github.com/microsoft/vcpkg/pull/8005) Update WTL to 10.0.9163. + +- aixlog `1.2.1` -> `1.2.1-1` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- chaiscript `6.1.0` -> `6.1.0-1` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- dlfcn-win32 `1.1.1-2` -> `1.1.1-3` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- enet `1.3.13` -> `1.3.13-1` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- fltk `1.3.4-6` -> `1.3.4-7` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- fmi4cpp `0.7.0-1` -> `0.7.0-2` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- fmilib `2.0.3-1` -> `2.0.3-2` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- freetds `1.1.6` -> `1.1.6-1` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- gainput `1.0.0-1` -> `1.0.0-2` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- geographiclib `1.47-patch1-7` -> `1.47-patch1-9` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + - [(#8115)](https://github.com/microsoft/vcpkg/pull/8115) [geographiclib]Fix usage error and cmake path in Linux. + +- glog `0.4.0-1` -> `0.4.0-2` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- irrlicht `1.8.4-1` -> `1.8.4-2` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- libmikmod `3.3.11.1-4` -> `3.3.11.1-5` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- libodb-mysql `2.4.0-3` -> `2.4.0-4` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- libodb-sqlite `2.4.0-4` -> `2.4.0-5` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- libodb `2.4.0-5` -> `2.4.0-6` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- libsquish `1.15-1` -> `1.15-2` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- lzo `2.10-2` -> `2.10-3` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- nanovg `master` -> `2019-8-30-1` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + - [(#8302)](https://github.com/microsoft/vcpkg/pull/8302) [nanogui] Add new port + +- ode `0.15.1-1` -> `0.15.1-2` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- opencsg `1.4.2` -> `1.4.2-1` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- orocos-kdl `1.4-1` -> `1.4-2` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- pangomm `2.40.1` -> `2.40.1-1` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- pcre `8.41-2` -> `8.41-3` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- qt5-gamepad `5.12.3-1` -> `5.12.5-1` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- wavpack `5.1.0-00d9a4a-1` -> `5.1.0-2` + - [(#7986)](https://github.com/microsoft/vcpkg/pull/7986) modernize many ports + +- tensorflow-cc `1.14` -> `1.14-1` + - [(#8023)](https://github.com/microsoft/vcpkg/pull/8023) [tensorflow-cc]Fix build error and add warning message. + +- glew `2.1.0-5` -> `2.1.0-6` + - [(#7967)](https://github.com/microsoft/vcpkg/pull/7967) [VTK/GLEW] Fix Regression of VTK with newer CMake Versions + +- libpq `9.6.1-7` -> `9.6.1-8` + - [(#8076)](https://github.com/microsoft/vcpkg/pull/8076) libpq requires HAVE_CRYPTO_LOCK for thread safety with openssl <1.1.0 + - [(#8080)](https://github.com/microsoft/vcpkg/pull/8080) [libpq] #undef int128 type if compiling for 32 bit architecture + - [(#8090)](https://github.com/microsoft/vcpkg/pull/8090) [libpq] Bump version number + +- sobjectizer `5.6.0.2` -> `5.6.1` + - [(#8052)](https://github.com/microsoft/vcpkg/pull/8052) [sobjectizer] updated to 5.6.1 + +- unrar `5.5.8-2` -> `5.8.1` + - [(#8053)](https://github.com/microsoft/vcpkg/pull/8053) [unrar] Don't use a custom struct member alignment + - [(#8108)](https://github.com/microsoft/vcpkg/pull/8108) [unrar] Update to 5.8.1 + +- xalan-c `1.11-7` -> `1.11-8` + - [(#7795)](https://github.com/microsoft/vcpkg/pull/7795) [xalan-c] fixed cmake files location + +- re2 `2019-08-01` -> `2019-09-01` + - [(#8089)](https://github.com/microsoft/vcpkg/pull/8089) [re2] Update library to 2019-09-01 + +- libvpx `1.7.0-3` -> `1.8.1` + - [(#8086)](https://github.com/microsoft/vcpkg/pull/8086) [libvpx] Update to 1.8.1. + - [(#8100)](https://github.com/microsoft/vcpkg/pull/8100) [libvpx] Fix build when VCPKG_BUILD_TYPE is set. + +- grpc `1.22.0` -> `1.23.0` + - [(#8109)](https://github.com/microsoft/vcpkg/pull/8109) [grpc] Update grpc to 1.23.0 + +- egl-registry `2018-06-30-1` -> `2019-08-08` + - [(#8095)](https://github.com/microsoft/vcpkg/pull/8095) Update egl-registry to 2019-08-08 and opengl-registry to 2019-08-22. + +- opengl-registry `2018-06-30-1` -> `2019-08-22` + - [(#8095)](https://github.com/microsoft/vcpkg/pull/8095) Update egl-registry to 2019-08-08 and opengl-registry to 2019-08-22. + +- dimcli `5.0.0` -> `5.0.1` + - [(#8024)](https://github.com/microsoft/vcpkg/pull/8024) [dimcli] Upgrade to version 5.0.1 + +- libwebsockets `3.1.0-3` -> `3.2.0` + - [(#8017)](https://github.com/microsoft/vcpkg/pull/8017) Update libwebsockets to v3.2.0 + +- mongo-c-driver `1.14.0-3-1` -> `1.14.0-4` + - [(#7974)](https://github.com/microsoft/vcpkg/pull/7974) [mongo-c-driver] fix debug linkage under linux + +- qwt `6.1.3-7` -> `6.1.3-8` + - [(#8030)](https://github.com/microsoft/vcpkg/pull/8030) [qwt]make qwt support unix + +- ixwebsocket `5.0.4` -> `6.1.0` + - [(#7839)](https://github.com/microsoft/vcpkg/pull/7839) [ixwebsocket] update to 6.1.0 to fix Windows problem + +- cpp-httplib `0.2.1` -> `0.2.4` + - [(#8054)](https://github.com/microsoft/vcpkg/pull/8054) [cpp-httplib] Update library to 0.2.2 + - [(#8172)](https://github.com/microsoft/vcpkg/pull/8172) [cpp-httplib] Update library to 0.2.4 + +- blend2d `beta_2019-07-16` -> `beta_2019-10-09` + - [(#8120)](https://github.com/microsoft/vcpkg/pull/8120) [blend2d] Port update beta_2019-10-09 + +- json-c `2019-05-31` -> `2019-09-10` + - [(#8121)](https://github.com/microsoft/vcpkg/pull/8121) [json-c] Add dynamic library support + +- glfw3 `3.3-1` -> `3.3-2` + - [(#7592)](https://github.com/microsoft/vcpkg/pull/7592) [glfw3] fix cmake config + +- google-cloud-cpp `0.12.0` -> `0.13.0` + - [(#8077)](https://github.com/microsoft/vcpkg/pull/8077) Update google-cloud-cpp and googleapis. + +- googleapis `0.1.3` -> `0.1.5` + - [(#8077)](https://github.com/microsoft/vcpkg/pull/8077) Update google-cloud-cpp and googleapis. + +- tbb `2019_U8` -> `2019_U8-1` + - [(#8018)](https://github.com/microsoft/vcpkg/pull/8018) [tbb]Fix static build. + +- openxr-loader `1.0.0-2` -> `2019-09-25` + - [(#8123)](https://github.com/microsoft/vcpkg/pull/8123) [openxr-loader] Update to 1.0.2 + - [(#8255)](https://github.com/microsoft/vcpkg/pull/8255) [openxr-loader] Add openxr C++ bindings + +- sdl1 `1.2.15-6` -> `1.2.15-8` + - [(#8070)](https://github.com/microsoft/vcpkg/pull/8070) [sdl1]Support linux build. + - [(#8327)](https://github.com/microsoft/vcpkg/pull/8327) [sdl1] fix windows sdk 18362 build failure + +- glslang `2019-03-05` -> `2019-03-05-1` + - [(#8051)](https://github.com/microsoft/vcpkg/pull/8051) [glslang]Fix generated cmake files. + +- opencl `2.2 (2017.07.18)-1` -> `2.2 (2018.08.31)` + - [(#4204)](https://github.com/microsoft/vcpkg/pull/4204) Linux support for the OpenCL SDK package + +- libspatialite `4.3.0a-3` -> `4.3.0a-4` + - [(#8025)](https://github.com/microsoft/vcpkg/pull/8025) [libspatialite]make libspatialite support linux and osx + +- libqrencode `4.0.2` -> `4.0.2-1` + - [(#8099)](https://github.com/microsoft/vcpkg/pull/8099) [libqrencode] Add tool feature; Remove unnecessary patch + +- sdl2-mixer `2.0.4-3` -> `2.0.4-6` + - [(#7720)](https://github.com/microsoft/vcpkg/pull/7720) [sdl2-mixer]Remove useless dependency link libraries. + - [(#8208)](https://github.com/microsoft/vcpkg/pull/8208) [sdl2-mixer] Fix features dependency link. + - [(#8335)](https://github.com/microsoft/vcpkg/pull/8335) [sdl2-mixer]Re-fix dynamic call. + +- evpp `0.7.0` -> `0.7.0-1` + - [(#8050)](https://github.com/microsoft/vcpkg/pull/8050) [evpp]Fix linux build. + +- libogg `1.3.3-4` -> `1.3.4` + - [(#8094)](https://github.com/microsoft/vcpkg/pull/8094) [libogg] Update to 1.3.4-1 + +- otl `4.0.442` -> `4.0.443` + - [(#8139)](https://github.com/microsoft/vcpkg/pull/8139) [otl] fix hash and update version + +- speexdsp `1.2rc3-3` -> `1.2.0` + - [(#8140)](https://github.com/microsoft/vcpkg/pull/8140) [speexdsp] update to 1.2.0 + +- pcl `1.9.1-8` -> `1.9.1-9` + - [(#8154)](https://github.com/microsoft/vcpkg/pull/8154) [pcl] Fix problem with link-type keywords in linked libraries + +- libqglviewer `2.7.0` -> `2.7.0-2` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + +- qt5-3d `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-activeqt `5.12.3-1` -> `5.12.5` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + +- qt5-base `5.12.3-4` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + - [(#8212)](https://github.com/microsoft/vcpkg/pull/8212) [Qt] feature latest to build 5.13.1 + +- qt5-charts `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-connectivity `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-datavis3d `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-declarative `5.12.3-2` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-graphicaleffects `5.12.3-1` -> `5.12.5` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + +- qt5-imageformats `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-location `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-macextras `5.12.3-1` -> `5.12.5` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + +- qt5-modularscripts `2019-04-30-1` -> `deprecated` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + +- qt5-mqtt `5.12.3-1` -> `5.12.5` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + +- qt5-multimedia `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-networkauth `5.12.3-1` -> `5.12.5` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + +- qt5-purchasing `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-quickcontrols `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-quickcontrols2 `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-remoteobjects `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-script `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-scxml `5.12.3-1` -> `5.12.5` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + +- qt5-sensors `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-serialport `5.12.3-1` -> `5.12.5` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + +- qt5-speech `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-svg `5.12.3-1` -> `5.12.5` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + +- qt5-tools `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-virtualkeyboard `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-webchannel `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-websockets `5.12.3-1` -> `5.12.5` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-webview `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-winextras `5.12.3-1` -> `5.12.5-1` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5-xmlpatterns `5.12.3-1` -> `5.12.5` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8222)](https://github.com/microsoft/vcpkg/pull/8222) [Qt] Fix static builds of qt5-imageformats + +- qt5 `5.12.3-1` -> `5.12.5` + - [(#7667)](https://github.com/microsoft/vcpkg/pull/7667) [Qt] Update to 5.12.4 + - [(#8159)](https://github.com/microsoft/vcpkg/pull/8159) [Qt] update to 5.12.5 + - [(#8212)](https://github.com/microsoft/vcpkg/pull/8212) [Qt] feature latest to build 5.13.1 + +- mathgl `2.4.3-1` -> `2.4.3-2` + - [(#8145)](https://github.com/microsoft/vcpkg/pull/8145) [mathgl]Fix build failure on x86-windows. + +- libpng `1.6.37-3` -> `1.6.37-4` + - [(#8079)](https://github.com/microsoft/vcpkg/pull/8079) [libpng] Replace find_library() with a simple set() for linking libm on UNIX + +- chakracore `1.11.12` -> `1.11.13` + - [(#8171)](https://github.com/microsoft/vcpkg/pull/8171) [chakracore] Update library to 1.11.13 + +- fastcdr `1.0.10` -> `1.0.11` + - [(#8173)](https://github.com/microsoft/vcpkg/pull/8173) [fastcdr] Update library to 1.0.11 + +- yara `e3439e4ead4ed5d3b75a0b46eaf15ddda2110bb9-2` -> `3.10.0` + - [(#8194)](https://github.com/microsoft/vcpkg/pull/8194) [yara] Update to 3.10.0 + +- rabit `0.1` -> `0.1-2` + - [(#8042)](https://github.com/microsoft/vcpkg/pull/8042) [rabit] Fix file conflict with dmlc + - [(#8206)](https://github.com/microsoft/vcpkg/pull/8206) [rabit] Fix cmake files path + +- gdcm `3.0.0-4` -> `3.0.0-5` + - [(#7852)](https://github.com/microsoft/vcpkg/pull/7852) [gdcm] Fix file UseGDCM.cmake path name + +- libyaml `0.2.2-1` -> `0.2.2-2` + - [(#8177)](https://github.com/microsoft/vcpkg/pull/8177) Fix libyaml CMake package and CMake targets + +- clapack `3.2.1-10` -> `3.2.1-12` + - [(#8191)](https://github.com/microsoft/vcpkg/pull/8191) [clapack] Fix clapack-targets.cmake path in clpack-config.cmake + - [(#8388)](https://github.com/microsoft/vcpkg/pull/8388) [clapack] fix clapack install + +- embree3 `3.5.2-1` -> `3.5.2-2` + - [(#8192)](https://github.com/microsoft/vcpkg/pull/8192) [embree3]Fix static build and cmake path. + +- llvm `8.0.0` -> `8.0.0-2` + - [(#7919)](https://github.com/microsoft/vcpkg/pull/7919) [llvm]Fix build error on Linux: cannot find -lxml2. + - [(#8102)](https://github.com/microsoft/vcpkg/pull/8102) [halide]Upgrade to release_2019_08_27. + +- vtk `8.2.0-5` -> `8.2.0-8` + - [(#7933)](https://github.com/microsoft/vcpkg/pull/7933) [VTK] VTK links with release version of LMZA in debug build instead of debu… + - [(#8345)](https://github.com/microsoft/vcpkg/pull/8345) [vtk] Fix vtk[python] build failure + - [(#8403)](https://github.com/microsoft/vcpkg/pull/8403) [vtk] fix typo in lzma and lz4 patch + +- dcmtk `3.6.4-1` -> `3.6.4-2` + - [(#8202)](https://github.com/microsoft/vcpkg/pull/8202) [dcmtk] Fix build error on Linux + +- openimageio `2019-08-08-2` -> `2019-08-08-4` + - [(#8210)](https://github.com/microsoft/vcpkg/pull/8210) [openimageio] Add opencolorio as feature + - [(#8230)](https://github.com/microsoft/vcpkg/pull/8230) [openimageio]Re-fix find openexr issue. + - [(#8379)](https://github.com/microsoft/vcpkg/pull/8379) [alembic,geogram,openimageio]: openexr and libraw debug linkage, minor fix for geogram + +- cli `1.1-1` -> `1.1.1` + - [(#8209)](https://github.com/microsoft/vcpkg/pull/8209) [cli] Update the version to 1.1.1 + +- libepoxy `1.5.3` -> `1.5.3-1` + - [(#7985)](https://github.com/microsoft/vcpkg/pull/7985) [libepoxy]Add support with unix. + +- atk `2.24.0-3` -> `2.24.0-4` + - [(#7991)](https://github.com/microsoft/vcpkg/pull/7991) [atk]Support UNIX. + +- date `2019-05-18-1` -> `2019-09-09` + - [(#8151)](https://github.com/microsoft/vcpkg/pull/8151) [date] Add official CMake targets support + +- riffcpp `2.2.2` -> `2.2.4` + - [(#8153)](https://github.com/microsoft/vcpkg/pull/8153) [riffcpp] Update to 2.2.4 + +- duktape `2.4.0-3` -> `2.4.0-4` + - [(#8144)](https://github.com/microsoft/vcpkg/pull/8144) [duktape] Change download path of pip. + +- cgicc `3.2.19-2` -> `3.2.19-3` + - [(#8232)](https://github.com/microsoft/vcpkg/pull/8232) [cgicc]Fix linux build. + +- graphicsmagick `1.3.32-1` -> `1.3.33` + - [(#8256)](https://github.com/microsoft/vcpkg/pull/8256) [graphicsmagick] updated to 1.3.33 + +- ecsutil `1.0.7.2` -> `1.0.7.3` + - [(#8253)](https://github.com/microsoft/vcpkg/pull/8253) update for ECSUtil 1.0.7.3 + +- cpp-redis `4.3.1-1` -> `4.3.1-2` + - [(#8245)](https://github.com/microsoft/vcpkg/pull/8245) [simpleini cpp-redis tacopie] ports update + +- simpleini `2018-08-31-1` -> `2018-08-31-2` + - [(#8245)](https://github.com/microsoft/vcpkg/pull/8245) [simpleini cpp-redis tacopie] ports update + +- tacopie `3.2.0-1` -> `3.2.0-2` + - [(#8245)](https://github.com/microsoft/vcpkg/pull/8245) [simpleini cpp-redis tacopie] ports update + +- cairo `1.16.0-1` -> `1.16.0-2` + - [(#8249)](https://github.com/microsoft/vcpkg/pull/8249) [cairo]Add feature X11. + +- tinynpy `1.0.0-2` -> `1.0.0-3` + - [(#8274)](https://github.com/microsoft/vcpkg/pull/8274) [tinynpy] update + +- io2d `2019-07-11` -> `2019-07-11-1` + - [(#8251)](https://github.com/microsoft/vcpkg/pull/8251) [io2d]Fix linux build: add dependency cairo[x11]. + +- linenoise-ng `4754bee2d8eb3` -> `4754bee2d8eb3-1` + - [(#8276)](https://github.com/microsoft/vcpkg/pull/8276) [linenoise-ng] Fix flaky config + +- zeromq `2019-07-09-1` -> `2019-09-20` + - [(#8119)](https://github.com/microsoft/vcpkg/pull/8119) [zeromq] Update to 2019-09-13 + +- basisu `1.11-1` -> `1.11-2` + - [(#8289)](https://github.com/microsoft/vcpkg/pull/8289) [basisu] Updating with latest upstream changes + +- doctest `2.3.4` -> `2.3.5` + - [(#8295)](https://github.com/microsoft/vcpkg/pull/8295) [doctest] Update library to 2.3.5 + +- mbedtls `2.16.2` -> `2.16.3` + - [(#8296)](https://github.com/microsoft/vcpkg/pull/8296) [mbedtls] Update library to 2.16.3 + +- pugixml `1.9-3` -> `1.10` + - [(#8297)](https://github.com/microsoft/vcpkg/pull/8297) [pugixml] Update library to 1.10 + +- armadillo `2019-04-16-4` -> `2019-04-16-5` + - [(#8299)](https://github.com/microsoft/vcpkg/pull/8299) [armadillo] Fix configure_file failed + +- parallel-hashmap `1.23` -> `1.24` + - [(#8301)](https://github.com/microsoft/vcpkg/pull/8301) [parallel-hashmap] Update library to 1.24 + +- realsense2 `2.22.0-1` -> `2.22.0-2` + - [(#8303)](https://github.com/microsoft/vcpkg/pull/8303) [realsense2] fix dependency glfw3 and mismatching number of debug and release binaries + +- ffmpeg `4.1-11` -> `4.2` + - [(#8021)](https://github.com/microsoft/vcpkg/pull/8021) [ffmpeg] update to 4.2 + +- open62541 `0.3.0-3` -> `0.3.0-4` + - [(#8252)](https://github.com/microsoft/vcpkg/pull/8252) [open62541] fix dynamic build + +- librdkafka `1.1.0-1` -> `1.2.0-2` + - [(#8307)](https://github.com/microsoft/vcpkg/pull/8307) [librdkafka] Update library to 1.2.0 + - [(#8355)](https://github.com/microsoft/vcpkg/pull/8355) [librdkafka] Add vcpkg-cmake-wrapper.cmake + +- chartdir `6.3.1` -> `6.3.1-1` + - [(#8308)](https://github.com/microsoft/vcpkg/pull/8308) [chartdir] fix hash for osx + +- mpfr `4.0.1` -> `4.0.2-1` + - [(#8324)](https://github.com/microsoft/vcpkg/pull/8324) update mpfr to 4.0.2 and fix build on osx + +- cuda `9.0` -> `10.1` + - [(#7536)](https://github.com/microsoft/vcpkg/pull/7536) [cudnn] add port and enable it in darknet + +- darknet `0.2.5-6` -> `0.2.5.1` + - [(#7536)](https://github.com/microsoft/vcpkg/pull/7536) [cudnn] add port and enable it in darknet + +- opencv4 `4.1.1-1` -> `4.1.1-2` + - [(#7536)](https://github.com/microsoft/vcpkg/pull/7536) [cudnn] add port and enable it in darknet + +- libiconv `1.15-5` -> `1.15-6` + - [(#8312)](https://github.com/microsoft/vcpkg/pull/8312) [libiconv] Guard imported targets in non-Windows + +- gsoap `2.8.87-1` -> `2.8.93-1` + - [(#8338)](https://github.com/microsoft/vcpkg/pull/8338) [gSoap] Update to 2.8.93 + +- arrow `0.14.1` -> `0.14.1-1` + - [(#8263)](https://github.com/microsoft/vcpkg/pull/8263) [arrow]Fix build error on Visual Studio 2019. + +- sol2 `3.0.3` -> `3.0.3-1` + - [(#8243)](https://github.com/microsoft/vcpkg/pull/8243) [sol2]Fix using namespace. + +- alembic `1.7.11-4` -> `1.7.11-5` + - [(#8331)](https://github.com/microsoft/vcpkg/pull/8331) [many ports] Warning to VCPKG long build path + - [(#8379)](https://github.com/microsoft/vcpkg/pull/8379) [alembic,geogram,openimageio]: openexr and libraw debug linkage, minor fix for geogram + +- avro-c `1.8.2-2` -> `1.8.2-3` + - [(#8331)](https://github.com/microsoft/vcpkg/pull/8331) [many ports] Warning to VCPKG long build path + +- aws-sdk-cpp `1.7.142` -> `1.7.142-1` + - [(#8331)](https://github.com/microsoft/vcpkg/pull/8331) [many ports] Warning to VCPKG long build path + +- boost-system `1.70.0` -> `1.70.0-1` + - [(#8331)](https://github.com/microsoft/vcpkg/pull/8331) [many ports] Warning to VCPKG long build path + +- cgal `4.14-2` -> `4.14-3` + - [(#8331)](https://github.com/microsoft/vcpkg/pull/8331) [many ports] Warning to VCPKG long build path + +- eigen3 `3.3.7-2` -> `3.3.7-3` + - [(#8331)](https://github.com/microsoft/vcpkg/pull/8331) [many ports] Warning to VCPKG long build path + +- itk `5.0.1` -> `5.0.1-1` + - [(#8331)](https://github.com/microsoft/vcpkg/pull/8331) [many ports] Warning to VCPKG long build path + +- kinectsdk2 `2.0-1` -> `2.0-2` + - [(#8331)](https://github.com/microsoft/vcpkg/pull/8331) [many ports] Warning to VCPKG long build path + +- ompl `1.4.2-1` -> `1.4.2-2` + - [(#8331)](https://github.com/microsoft/vcpkg/pull/8331) [many ports] Warning to VCPKG long build path + +- openmvg `1.4-5` -> `1.4-6` + - [(#8331)](https://github.com/microsoft/vcpkg/pull/8331) [many ports] Warning to VCPKG long build path + +- curl `7.65.2-1` -> `7.66.0` + - [(#7331)](https://github.com/microsoft/vcpkg/pull/7331) [curl] Update to 7.66.0 + +- halide `release_2018_02_15-1` -> `release_2019_08_27` + - [(#8102)](https://github.com/microsoft/vcpkg/pull/8102) [halide]Upgrade to release_2019_08_27. + +- boost-accumulators `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-algorithm `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-align `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-any `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-array `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-asio `1.70.0-2` -> `1.71.0-1` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-assert `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-assign `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-atomic `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-beast `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-bimap `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-bind `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-callable-traits `2.3.2` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-chrono `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-circular-buffer `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-compatibility `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-compute `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-concept-check `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-config `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-container-hash `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-container `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-context `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-contract `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-conversion `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-convert `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-core `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-coroutine `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-coroutine2 `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-crc `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-date-time `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-detail `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-disjoint-sets `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-dll `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-dynamic-bitset `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-endian `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-exception `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-fiber `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-filesystem `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-flyweight `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-foreach `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-format `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-function-types `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-function `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-functional `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-fusion `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-geometry `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-gil `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-graph-parallel `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-graph `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- boost-hana `1.70.0` -> `1.71.0` + - [(#7959)](https://github.com/microsoft/vcpkg/pull/7959) [boost] Update to 1.71.0 + +- hpx `1.3.0-1` -> `1.3.0-2` + - [(#8259)](https://github.com/microsoft/vcpkg/pull/8259) [hpx] Redirect --head to `stable` + +- assimp `4.1.0-8` -> `5.0.0` + - [(#8370)](https://github.com/microsoft/vcpkg/pull/8370) [assimp] Update the version to 5.0.0 + - [(#8381)](https://github.com/microsoft/vcpkg/pull/8381) [assimp] Update the version + +- angle `2019-06-13` -> `2019-07-19-2` + - [(#7329)](https://github.com/microsoft/vcpkg/pull/7329) [angle] Update to the latest commit. + - [(#8395)](https://github.com/microsoft/vcpkg/pull/8395) drop useless patch + +
+ +-- vcpkg team vcpkg@microsoft.com TUE, 01 Oct 22:00:00 -0800 + +vcpkg (2019.08.31) +--- +#### Total port count: 1169 +#### Total port count per triplet (tested): +|triplet|ports available| +|---|---| +|**x64-windows**|1099| +|x86-windows|1085| +|x64-windows-static|987| +|**x64-linux**|930| +|**x64-osx**|876| +|arm64-windows|726| +|x64-uwp|595| +|arm-uwp|571| + +#### The following commands and options have been updated: +- `depend-info` + - `--max-recurse` ***[NEW OPTION]***: Set the max depth of recursion for listing dependencies + - `--sort` ***[NEW OPTION]***: Sort the list of dependencies by `lexicographical`, `topological`, and `reverse` (topological) order + - `--show-depth` ***[NEW OPTION]***: Display the depth of each dependency in the list + - [(#7643)](https://github.com/microsoft/vcpkg/pull/7643) [depend-info] Fix bugs, add `--sort`, `--show-depth` and `--max-recurse` options +- `install --only-downloads` ***[NEW OPTION]*** + - Download sources for a package and its dependencies and don't build them + - [(#7950)](https://github.com/microsoft/vcpkg/pull/7950) [vcpkg install] Enable Download Mode ⬠+ +#### The following documentation has been updated: +- [Index](docs/index.md) + - [(#7506)](https://github.com/microsoft/vcpkg/pull/7506) Update tests, and add documentation! + - [(#7821)](https://github.com/microsoft/vcpkg/pull/7821) [vcpkg docs] More tool maintainer docs! ðŸ±â€ðŸ‘¤ +- [Tool maintainers: Testing](docs/tool-maintainers/testing.md) ***[NEW]*** + - [(#7506)](https://github.com/microsoft/vcpkg/pull/7506) Update tests, and add documentation! + - [(#7821)](https://github.com/microsoft/vcpkg/pull/7821) [vcpkg docs] More tool maintainer docs! ðŸ±â€ðŸ‘¤ +- [Examples: Overlay triplets example +](docs/examples/overlay-triplets-linux-dynamic.md) + - [(#7502)](https://github.com/microsoft/vcpkg/pull/7502) [vcpkg-docs] Reword and reorganize overlay-triplets-linux-dynamic.md +- [Portfile helper functions](docs/maintainers/portfile-functions.md) + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + - [(#7950)](https://github.com/microsoft/vcpkg/pull/7950) [vcpkg install] Enable Download Mode ⬠+- [`vcpkg_check_features`](docs/maintainers/vcpkg_check_features.md) + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check +- [`vcpkg_configure_cmake`](docs/maintainers/vcpkg_configure_cmake.md) + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check +- [`vcpkg_pretiffy_command`](docs/maintainers/vcpkg_prettify_command.md) ***[NEW]*** + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check +- [Maintainer Guidelines and Policies](docs/maintainers/maintainer-guide.md) + - [(#7751)](https://github.com/microsoft/vcpkg/pull/7751) Add guideline for overriding `VCPKG_` +- [Tool maintainers: Benchmarking](docs/tool-maintainers/benchmarking.md) ***[NEW]*** + - [(#7821)](https://github.com/microsoft/vcpkg/pull/7821) [vcpkg docs] More tool maintainer docs! ðŸ±â€ðŸ‘¤ +- [Tool maintainers: Layout of the vcpkg source tree](docs/tool-maintainers/layout.md) ***[NEW]*** + - [(#7821)](https://github.com/microsoft/vcpkg/pull/7821) [vcpkg docs] More tool maintainer docs! ðŸ±â€ðŸ‘¤ +- [`vcpkg_common_definitions`](docs/maintainers/vcpkg_common_definitions.md) ***[NEW]*** + - [(#7950)](https://github.com/microsoft/vcpkg/pull/7950) [vcpkg install] Enable Download Mode ⬠+- [`vcpkg_execute_required_process`](docs/maintainers/vcpkg_execute_required_process.md) + - [(#7950)](https://github.com/microsoft/vcpkg/pull/7950) [vcpkg install] Enable Download Mode ⬠+- [`vcpkg_fail_port_install`](docs/maintainers/vcpkg_fail_port_install.md) ***[NEW]*** + - [(#7950)](https://github.com/microsoft/vcpkg/pull/7950) [vcpkg install] Enable Download Mode ⬠+ +#### The following *remarkable* changes have been made to vcpkg's infrastructure: +- CONTROL files extended syntax + - The `Build-Depends` field now supports logical expressions as well as line breaks + - [(#7508)](https://github.com/microsoft/vcpkg/pull/7508) Improve logical evaluation of dependency qualifiers + - [(#7863)](https://github.com/microsoft/vcpkg/pull/7863) Fix list parsing logic and add error messages +- Quality-of-Life improvements for portfile maintainers + - [(#7601)](https://github.com/microsoft/vcpkg/pull/7601) [vcpkg/cmake] Added a function to fail from portfiles in a default way + - [(#7600)](https://github.com/microsoft/vcpkg/pull/7600) [vcpkg] QoL: add target dependent library prefix/suffix variables and enable find_library for portfiles + - [(#7773)](https://github.com/microsoft/vcpkg/pull/7773) [vcpkg] QoL: Make find_library useable without errors to console. + - [(#7599)](https://github.com/microsoft/vcpkg/pull/7599) [vcpkg] QoL: add host/target dependent variables for executable suffixes + +#### The following *additional* changes have been made to vcpkg's infrastructure: +- [(#4572)](https://github.com/microsoft/vcpkg/pull/4572) Change CMakeLists.txt in toolsrc to allow compiling with llvm toolset +- [(#7305)](https://github.com/microsoft/vcpkg/pull/7305) [vcpkg] Public ABI override option +- [(#7307)](https://github.com/microsoft/vcpkg/pull/7307) [vcpkg] Always calculate ABI tags +- [(#7491)](https://github.com/microsoft/vcpkg/pull/7491) Handle response files with Windows line-endings properly +- [(#7501)](https://github.com/microsoft/vcpkg/pull/7501) Add July changelog +- [(#7506)](https://github.com/microsoft/vcpkg/pull/7506) Update tests, and add documentation! +- [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check +- [(#7568)](https://github.com/microsoft/vcpkg/pull/7568) [tensorflow] Add new port for linux +- [(#7570)](https://github.com/microsoft/vcpkg/pull/7570) [vcpkg] Make `RealFilesystem::remove_all` much, much faster, and start benchmarking +- [(#7587)](https://github.com/microsoft/vcpkg/pull/7587) [vcpkg] Revert accidental removal of powershell-core usage in bb3a9ddb6ec917f54 +- [(#7619)](https://github.com/microsoft/vcpkg/pull/7619) [vcpkg] Fix `.vcpkg-root` detection issue +- [(#7620)](https://github.com/microsoft/vcpkg/pull/7620) [vcpkg] Fix warnings in `files.{h,cpp}` build under /W4 +- [(#7623)](https://github.com/microsoft/vcpkg/pull/7623) Fix VS 2019 detection bug +- [(#7637)](https://github.com/microsoft/vcpkg/pull/7637) [vcpkg] Fix the build on VS2015 debug +- [(#7638)](https://github.com/microsoft/vcpkg/pull/7638) [vcpkg] Make CMakelists nicer 😠+- [(#7687)](https://github.com/microsoft/vcpkg/pull/7687) [vcpkg] Port toolchains +- [(#7754)](https://github.com/microsoft/vcpkg/pull/7754) [vcpkg] Allow multiple spaces in a comma list +- [(#7757)](https://github.com/microsoft/vcpkg/pull/7757) [vcpkg] Switch to internal hash algorithms ðŸ±â€ðŸ’» +- [(#7793)](https://github.com/microsoft/vcpkg/pull/7793) Allow redirection of the scripts folder +- [(#7798)](https://github.com/microsoft/vcpkg/pull/7798) [vcpkg] Fix build on FreeBSD 😈 +- [(#7816)](https://github.com/microsoft/vcpkg/pull/7816) [vcpkg] Fix gcc-9 warning +- [(#7864)](https://github.com/microsoft/vcpkg/pull/7864) [vcpkg] Move `do_build_package_and_clean_buildtrees()` above generating vcpkg_abi_info.txt so it will be included in the package. +- [(#7930)](https://github.com/microsoft/vcpkg/pull/7930) [vcpkg] fix bug in StringView::operator== 😱 +
+The following 63 ports have been added: + +|port|version| +|---|---| +|[riffcpp](https://github.com/microsoft/vcpkg/pull/7509) [#7541](https://github.com/microsoft/vcpkg/pull/7541) [#7859](https://github.com/microsoft/vcpkg/pull/7859) | 2.2.2 +|[easyhook](https://github.com/microsoft/vcpkg/pull/7487)| 2.7.6789.0 +|[brigand](https://github.com/microsoft/vcpkg/pull/7518)| 1.3.0 +|[ctbignum](https://github.com/microsoft/vcpkg/pull/7512)| 2019-08-02 +|[gaussianlib](https://github.com/microsoft/vcpkg/pull/7542)| 2019-08-04 +|[tinycthread](https://github.com/microsoft/vcpkg/pull/7565)| 2019-08-06 +|[libcerf](https://github.com/microsoft/vcpkg/pull/7320)| 1.13 +|[tinynpy](https://github.com/microsoft/vcpkg/pull/7393)| 1.0.0-2 +|[googleapis](https://github.com/microsoft/vcpkg/pull/7557) [#7703](https://github.com/microsoft/vcpkg/pull/7703) | 0.1.3 +|[pdqsort](https://github.com/microsoft/vcpkg/pull/7464)| 2019-07-30 +|[discount](https://github.com/microsoft/vcpkg/pull/7400)| 2.2.6 +|[duckx](https://github.com/microsoft/vcpkg/pull/7561)| 2019-08-06 +|[opencv3](https://github.com/microsoft/vcpkg/pull/5169) [#7581](https://github.com/microsoft/vcpkg/pull/7581) [#7658](https://github.com/microsoft/vcpkg/pull/7658) [#7925](https://github.com/microsoft/vcpkg/pull/7925) | 3.4.7-1 +|[opencv4](https://github.com/microsoft/vcpkg/pull/5169) [#7558](https://github.com/microsoft/vcpkg/pull/7558) [#7581](https://github.com/microsoft/vcpkg/pull/7581) [#7658](https://github.com/microsoft/vcpkg/pull/7658) | 4.1.1-1 +|[tiny-bignum-c](https://github.com/microsoft/vcpkg/pull/7531)| 2019-07-31 +|[tgc](https://github.com/microsoft/vcpkg/pull/7644)| 2019-08-11 +|[bento4](https://github.com/microsoft/vcpkg/pull/7595)| 1.5.1-628 +|[dbow2](https://github.com/microsoft/vcpkg/pull/7552)| 2019-08-05 +|[tiny-aes-c](https://github.com/microsoft/vcpkg/pull/7530)| 2019-07-31 +|[drlibs](https://github.com/microsoft/vcpkg/pull/7656)| 2019-08-12 +|[nt-wrapper](https://github.com/microsoft/vcpkg/pull/7633)| 2019-08-10 +|[xorstr](https://github.com/microsoft/vcpkg/pull/7631)| 2019-08-10 +|[lazy-importer](https://github.com/microsoft/vcpkg/pull/7630)| 2019-08-10 +|[plf-colony](https://github.com/microsoft/vcpkg/pull/7627)| 2019-08-10 +|[plf-list](https://github.com/microsoft/vcpkg/pull/7627)| 2019-08-10 +|[plf-nanotimer](https://github.com/microsoft/vcpkg/pull/7627)| 2019-08-10 +|[plf-stack](https://github.com/microsoft/vcpkg/pull/7627)| 2019-08-10 +|[tiny-regex-c](https://github.com/microsoft/vcpkg/pull/7626)| 2019-07-31 +|[hayai](https://github.com/microsoft/vcpkg/pull/7624)| 2019-08-10 +|[yasm](https://github.com/microsoft/vcpkg/pull/7478)| 1.3.0 +|[fast-cpp-csv-parser](https://github.com/microsoft/vcpkg/pull/7681)| 2019-08-14 +|[wg21-sg14](https://github.com/microsoft/vcpkg/pull/7663)| 2019-08-13 +|[pistache](https://github.com/microsoft/vcpkg/pull/7547)| 2019-08-05 +|[hfsm2](https://github.com/microsoft/vcpkg/pull/7516)| beta7 +|[mpmcqueue](https://github.com/microsoft/vcpkg/pull/7437)| 2019-07-26 +|[spscqueue](https://github.com/microsoft/vcpkg/pull/7437)| 2019-07-26 +|[tinkerforge](https://github.com/microsoft/vcpkg/pull/7523)| 2.1.25 +|[field3d](https://github.com/microsoft/vcpkg/pull/7594)| 1.7.2 +|[libsvm](https://github.com/microsoft/vcpkg/pull/7664)| 323 +|[nanort](https://github.com/microsoft/vcpkg/pull/7778)| 2019-08-20 +|[libspatialindex](https://github.com/microsoft/vcpkg/pull/7762)| 1.9.0 +|[qtkeychain](https://github.com/microsoft/vcpkg/pull/7760)| v0.9.1 +|[sparsehash](https://github.com/microsoft/vcpkg/pull/7772)| 2.0.3 +|[tensorflow-cc](https://github.com/microsoft/vcpkg/pull/7568)| 1.14 +|[qt-advanced-docking-system](https://github.com/microsoft/vcpkg/pull/7621)| 2019-08-14 +|[quickfast](https://github.com/microsoft/vcpkg/pull/7814)| 1.5 +|[mp3lame](https://github.com/microsoft/vcpkg/pull/7830)| 3.100 +|[quickfix](https://github.com/microsoft/vcpkg/pull/7796)| 1.15.1 +|[fplus](https://github.com/microsoft/vcpkg/pull/7883)| 0.2.3-p0 +|[json5-parser](https://github.com/microsoft/vcpkg/pull/7915)| 1.0.0 +|[gppanel](https://github.com/microsoft/vcpkg/pull/7868)| 2018-04-06 +|[libguarded](https://github.com/microsoft/vcpkg/pull/7924)| 2019-08-27 +|[cgl](https://github.com/microsoft/vcpkg/pull/7810)| 0.60.2-1 +|[minifb](https://github.com/microsoft/vcpkg/pull/7766)| 2019-08-20-1 +|[log4cpp](https://github.com/microsoft/vcpkg/pull/7433)| 2.9.1-1 +|[chartdir](https://github.com/microsoft/vcpkg/pull/7912)| 6.3.1 +|[outcome](https://github.com/microsoft/vcpkg/pull/7940)| 2.1 +|[libP7Client](https://github.com/microsoft/vcpkg/pull/7605)| 5.2 +|[clue](https://github.com/microsoft/vcpkg/pull/7564)| 1.0.0-alpha.7 +|[status-value-lite](https://github.com/microsoft/vcpkg/pull/7563)| 1.1.0 +|[type-lite](https://github.com/microsoft/vcpkg/pull/7563)| 0.1.0 +|[value-ptr-lite](https://github.com/microsoft/vcpkg/pull/7563)| 0.2.1 +|[kvasir-mpl](https://github.com/microsoft/vcpkg/pull/7562)| 2019-08-06 +
+ +
+The following 199 ports have been updated: + +- pcl `1.9.1-5` -> `1.9.1-8` + - [(#7413)](https://github.com/microsoft/vcpkg/pull/7413) [pcl] Fix Build failure in linux + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + - [(#7700)](https://github.com/microsoft/vcpkg/pull/7700) [czmq/pcl] Fix judgment feature condition. + +- xalan-c `1.11-5` -> `1.11-7` + - [(#7496)](https://github.com/microsoft/vcpkg/pull/7496) [xalan-c] Bump version number + - [(#7505)](https://github.com/microsoft/vcpkg/pull/7505) [xalan-c] switch to https://github.com/apache/xalan-c (#7489) + +- catch2 `2.7.2-2` -> `2.9.2` + - [(#7497)](https://github.com/microsoft/vcpkg/pull/7497) [Catch2] Update to v2.9.1 + - [(#7702)](https://github.com/microsoft/vcpkg/pull/7702) [brynet, catch2, chakracore] Update some ports version + +- ade `0.1.1d` -> `0.1.1f` + - [(#7494)](https://github.com/microsoft/vcpkg/pull/7494) Update some ports version + - [(#7628)](https://github.com/microsoft/vcpkg/pull/7628) [ade] Update library to 0.1.1f + +- harfbuzz `2.5.1-1` -> `2.5.3` + - [(#7494)](https://github.com/microsoft/vcpkg/pull/7494) Update some ports version + +- libpmemobj-cpp `1.6-1` -> `1.7` + - [(#7494)](https://github.com/microsoft/vcpkg/pull/7494) Update some ports version + +- msgpack `3.1.1` -> `3.2.0` + - [(#7494)](https://github.com/microsoft/vcpkg/pull/7494) Update some ports version + +- protobuf `3.8.0-1` -> `3.9.1` + - [(#7494)](https://github.com/microsoft/vcpkg/pull/7494) Update some ports version + - [(#7671)](https://github.com/microsoft/vcpkg/pull/7671) [protobuf] Update from 3.9.0 to 3.9.1 + +- string-theory `2.1-1` -> `2.2` + - [(#7494)](https://github.com/microsoft/vcpkg/pull/7494) Update some ports version + +- ccfits `2.5-2` -> `2.5-3` + - [(#7484)](https://github.com/microsoft/vcpkg/pull/7484) [manyports] Regenerate patches and modify how the patches are used. + +- itpp `4.3.1` -> `4.3.1-1` + - [(#7484)](https://github.com/microsoft/vcpkg/pull/7484) [manyports] Regenerate patches and modify how the patches are used. + +- mpg123 `1.25.8-5` -> `1.25.8-6` + - [(#7484)](https://github.com/microsoft/vcpkg/pull/7484) [manyports] Regenerate patches and modify how the patches are used. + +- qwt `6.1.3-6` -> `6.1.3-7` + - [(#7484)](https://github.com/microsoft/vcpkg/pull/7484) [manyports] Regenerate patches and modify how the patches are used. + +- sdl1 `1.2.15-5` -> `1.2.15-6` + - [(#7484)](https://github.com/microsoft/vcpkg/pull/7484) [manyports] Regenerate patches and modify how the patches are used. + +- gdal `2.4.1-5` -> `2.4.1-8` + - [(#7520)](https://github.com/microsoft/vcpkg/pull/7520) [gdal] Fix duplicate pdb file + - [(#7434)](https://github.com/microsoft/vcpkg/pull/7434) [gdal] Fix dependent ports in static builds. + +- blosc `1.16.3-2` -> `1.17.0-1` + - [(#7525)](https://github.com/microsoft/vcpkg/pull/7525) Update some ports version + - [(#7649)](https://github.com/microsoft/vcpkg/pull/7649) [blosc] enable dependent ports to use debug builds + +- boost-callable-traits `1.70.0` -> `2.3.2` + - [(#7525)](https://github.com/microsoft/vcpkg/pull/7525) Update some ports version + +- cjson `1.7.10-1` -> `1.7.12` + - [(#7525)](https://github.com/microsoft/vcpkg/pull/7525) Update some ports version + +- cppzmq `4.3.0-1` -> `4.4.1` + - [(#7525)](https://github.com/microsoft/vcpkg/pull/7525) Update some ports version + +- restinio `0.5.1-1` -> `0.6.0` + - [(#7514)](https://github.com/microsoft/vcpkg/pull/7514) [RESTinio] updated to v.0.5.1.1 + - [(#7962)](https://github.com/microsoft/vcpkg/pull/7962) RESTinio updated to v.0.6.0 + +- argh `2018-12-18` -> `2018-12-18-1` + - [(#7527)](https://github.com/microsoft/vcpkg/pull/7527) [argh] fix flaky cmake config + +- libusb `1.0.22-3` -> `1.0.22-4` + - [(#7465)](https://github.com/microsoft/vcpkg/pull/7465) [libusb] Fix using mismatched CRT_linkage/library_linkage issue. + +- casclib `1.50` -> `1.50b-1` + - [(#7522)](https://github.com/microsoft/vcpkg/pull/7522) [casclib] Added CMake targets + - [(#7907)](https://github.com/microsoft/vcpkg/pull/7907) [casclib] Update library to 1.50b + +- opencv `3.4.3-9` -> `4.1.1-1` + - [(#7499)](https://github.com/microsoft/vcpkg/pull/7499) Add feature halide to OpenCV. + - [(#5169)](https://github.com/microsoft/vcpkg/pull/5169) [OpenCV] Update to v4.1.1 + - [(#7659)](https://github.com/microsoft/vcpkg/pull/7659) [opencv] Expose all features from `opencv4` in meta-package + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + +- openxr-loader `1.0.0-1` -> `1.0.0-2` + - [(#7560)](https://github.com/microsoft/vcpkg/pull/7560) [Openxr-loader] Remove the invalid patch + +- simdjson `2019-03-09` -> `2019-08-05` + - [(#7546)](https://github.com/microsoft/vcpkg/pull/7546) [simdjson] Update to 0.2.1 + +- alembic `1.7.11-3` -> `1.7.11-4` + - [(#7551)](https://github.com/microsoft/vcpkg/pull/7551) [alembic] fix hdf5 linkage + +- xerces-c `3.2.2-10` -> `3.2.2-11` + - [(#7500)](https://github.com/microsoft/vcpkg/pull/7500) [xercec-c] no symlinks in static build (#7490) + - [(#7622)](https://github.com/microsoft/vcpkg/pull/7622) [tiff][tesseract][xerces-c] Disable unmanaged optional dependencies + +- sol2 `3.0.2` -> `3.0.3` + - [(#7545)](https://github.com/microsoft/vcpkg/pull/7545) Update sol2 portfile to 579908 + - [(#7804)](https://github.com/microsoft/vcpkg/pull/7804) [sol2] Update library to 3.0.3 + +- cpprestsdk `2.10.14` -> `2.10.14-1` + - [(#7472)](https://github.com/microsoft/vcpkg/pull/7472) Repair compression dependency bugs in cpprestsdk + - [(#7863)](https://github.com/microsoft/vcpkg/pull/7863) fix list parsing logic and add error messages + +- libevent `2.1.10` -> `2.1.11` + - [(#7515)](https://github.com/microsoft/vcpkg/pull/7515) [libevent] update to 2.1.11 + +- imgui `1.70-1` -> `1.72b` + - [(#7534)](https://github.com/microsoft/vcpkg/pull/7534) Update some ports version + +- mbedtls `2.15.1` -> `2.16.2` + - [(#7534)](https://github.com/microsoft/vcpkg/pull/7534) Update some ports version + +- ffmpeg `4.1-8` -> `4.1-9` + - [(#7476)](https://github.com/microsoft/vcpkg/pull/7476) [ffmpeg] Fix debug build in Windows. + - [(#5169)](https://github.com/microsoft/vcpkg/pull/5169) [OpenCV] Update to v4.1.1 + - [(#7608)](https://github.com/microsoft/vcpkg/pull/7608) [ffmpeg] Add feature avresample. + - [(#7739)](https://github.com/microsoft/vcpkg/pull/7739) [ffmpeg] Fix static linking on Windows, FindFFMPEG + +- kangaru `4.1.3-2` -> `4.2.0` + - [(#7567)](https://github.com/microsoft/vcpkg/pull/7567) Updated kangaru version + +- cpp-taskflow `2018-11-30` -> `2.2.0` + - [(#7554)](https://github.com/microsoft/vcpkg/pull/7554) [cpp-taskflow] update to 2.2.0 + +- jsoncons `0.125.0` -> `0.132.1` + - [(#7529)](https://github.com/microsoft/vcpkg/pull/7529) Update jsoncons to v0.131.2 + - [(#7718)](https://github.com/microsoft/vcpkg/pull/7718) [jsoncons] Update library to 0.132.1 + +- tinyexif `1.0.2-5` -> `1.0.2-6` + - [(#7575)](https://github.com/microsoft/vcpkg/pull/7575) [TinyEXIF] fix linux/mac + +- itk `5.0.0-2` -> `5.0.1` + - [(#7241)](https://github.com/microsoft/vcpkg/pull/7241) ITK portfile support legacy user code by default + - [(#7586)](https://github.com/microsoft/vcpkg/pull/7586) [itk] Update library from 5.0.0 to 5.0.1 + +- stxxl `2018-11-15-1` -> `2018-11-15-2` + - [(#7330)](https://github.com/microsoft/vcpkg/pull/7330) [stxxl] compilation fix + +- chakracore `1.11.9` -> `1.11.12` + - [(#7576)](https://github.com/microsoft/vcpkg/pull/7576) [chakracore] Update library to 1.11.11 + - [(#7702)](https://github.com/microsoft/vcpkg/pull/7702) [brynet, catch2, chakracore] Update some ports version + +- qhull `7.3.2` -> `7.3.2-1` + - [(#7370)](https://github.com/microsoft/vcpkg/pull/7370) [Qhulluwp] fix uwp building + +- netcdf-c `4.7.0-3` -> `4.7.0-4` + - [(#7578)](https://github.com/microsoft/vcpkg/pull/7578) [netcdf-c] correctly fix hdf5 linkage + +- google-cloud-cpp `0.11.0` -> `0.12.0` + - [(#7557)](https://github.com/microsoft/vcpkg/pull/7557) Update google-cloud-cpp to 0.12.0. + +- stormlib `9.22` -> `2019-05-10` + - [(#7409)](https://github.com/microsoft/vcpkg/pull/7409) [stormlib] Add targets and streamline build + +- openimageio `2.0.8` -> `2019-08-08-2` + - [(#7419)](https://github.com/microsoft/vcpkg/pull/7419) [openimageio] Fix feature libraw build errors + - [(#7588)](https://github.com/microsoft/vcpkg/pull/7588) [openimageio] find_package support + - [(#7747)](https://github.com/microsoft/vcpkg/pull/7747) [openimageio] Fix find correct debug/release openexr libraries. + +- librdkafka `1.1.0` -> `1.1.0-1` + - [(#7469)](https://github.com/microsoft/vcpkg/pull/7469) Librdkafka snappy + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + +- open62541 `0.3.0-2` -> `0.3.0-3` + - [(#7607)](https://github.com/microsoft/vcpkg/pull/7607) [open62541] Fix flakiness/bugginess + +- jsonnet `2019-05-08` -> `2019-05-08-1` + - [(#7587)](https://github.com/microsoft/vcpkg/pull/7587) [vcpkg] Revert accidental removal of powershell-core usage in bb3a9ddb6ec917f54 + - [(#7374)](https://github.com/microsoft/vcpkg/pull/7374) [jsonnet] Upgrade version to 0.13.0 + +- expat `2.2.6` -> `2.2.7` + - [(#7596)](https://github.com/microsoft/vcpkg/pull/7596) [expat] Update library to 2.2.7 + +- aws-lambda-cpp `0.1.0-1` -> `0.1.0-2` + - [(#7601)](https://github.com/microsoft/vcpkg/pull/7601) [vcpkg/cmake] Added a function to fail from portfiles in a default way + +- rocksdb `6.1.2` -> `6.1.2-1` + - [(#7452)](https://github.com/microsoft/vcpkg/pull/7452) [rocksdb] Change linkage type to static. + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- freeimage `3.18.0-6` -> `3.18.0-7` + - [(#5169)](https://github.com/microsoft/vcpkg/pull/5169) [OpenCV] Update to v4.1.1 + +- gdcm `3.0.0-3` -> `3.0.0-4` + - [(#5169)](https://github.com/microsoft/vcpkg/pull/5169) [OpenCV] Update to v4.1.1 + +- ogre `1.12.0-1` -> `1.12.1` + - [(#5169)](https://github.com/microsoft/vcpkg/pull/5169) [OpenCV] Update to v4.1.1 + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- pthreads `3.0.0-2` -> `3.0.0-3` + - [(#5169)](https://github.com/microsoft/vcpkg/pull/5169) [OpenCV] Update to v4.1.1 + +- qt5 `5.12.3` -> `5.12.3-1` + - [(#5169)](https://github.com/microsoft/vcpkg/pull/5169) [OpenCV] Update to v4.1.1 + - [(#7642)](https://github.com/microsoft/vcpkg/pull/7642) [qt5] Only build qt5-activeqt on windows + +- zxing-cpp `3.3.3-5` -> `3.3.3-6` + - [(#5169)](https://github.com/microsoft/vcpkg/pull/5169) [OpenCV] Update to v4.1.1 + +- tesseract `4.1.0-1` -> `4.1.0-2` + - [(#7622)](https://github.com/microsoft/vcpkg/pull/7622) [tiff][tesseract][xerces-c] Disable unmanaged optional dependencies + +- tiff `4.0.10-6` -> `4.0.10-7` + - [(#7622)](https://github.com/microsoft/vcpkg/pull/7622) [tiff][tesseract][xerces-c] Disable unmanaged optional dependencies + +- osg `3.6.3-1` -> `3.6.4` + - [(#7653)](https://github.com/microsoft/vcpkg/pull/7653) [osg] Update osg version to 3.6.4 + - [(#7677)](https://github.com/microsoft/vcpkg/pull/7677) [osg] Fix Applying patch failed + +- cppgraphqlgen `3.0.0` -> `3.0.2` + - [(#7639)](https://github.com/microsoft/vcpkg/pull/7639) [cppgraphqlgen] Update with matching PEGTL + +- pegtl `3.0.0-pre` -> `3.0.0-pre-697aaa0` + - [(#7639)](https://github.com/microsoft/vcpkg/pull/7639) [cppgraphqlgen] Update with matching PEGTL + +- monkeys-audio `4.3.3-1` -> `4.8.3` + - [(#7634)](https://github.com/microsoft/vcpkg/pull/7634) [monkeys-audio] Update library to 4.8.3 + +- directxmesh `apr2019` -> `jun2019-1` + - [(#7665)](https://github.com/microsoft/vcpkg/pull/7665) [directxtk][directxtk12][directxmesh][directxtex] Updated to June version and improved platform toolset support + - [(#7869)](https://github.com/microsoft/vcpkg/pull/7869) [directxmesh] Update library to aug2019 + +- directxtex `apr2019` -> `jun2019-1` + - [(#7665)](https://github.com/microsoft/vcpkg/pull/7665) [directxtk][directxtk12][directxmesh][directxtex] Updated to June version and improved platform toolset support + - [(#7870)](https://github.com/microsoft/vcpkg/pull/7870) [directxtex] Update library to aug2019 + +- directxtk `apr2019-1` -> `jun2019-1` + - [(#7665)](https://github.com/microsoft/vcpkg/pull/7665) [directxtk][directxtk12][directxmesh][directxtex] Updated to June version and improved platform toolset support + - [(#7871)](https://github.com/microsoft/vcpkg/pull/7871) [directxtk] Update library to aug2019 + +- directxtk12 `dec2016-1` -> `jun2019-1` + - [(#7665)](https://github.com/microsoft/vcpkg/pull/7665) [directxtk][directxtk12][directxmesh][directxtex] Updated to June version and improved platform toolset support + - [(#7872)](https://github.com/microsoft/vcpkg/pull/7872) [directxtk12] Update library to aug2019 + +- usockets `0.1.2` -> `0.3.1` + - [(#7662)](https://github.com/microsoft/vcpkg/pull/7662) [usockets] upgrade to v0.3.1 + +- dimcli `4.1.0` -> `5.0.0` + - [(#7651)](https://github.com/microsoft/vcpkg/pull/7651) [dimcli] Fix build error C2220 + - [(#7785)](https://github.com/microsoft/vcpkg/pull/7785) [dimcli] Update library to 5.0.0 + +- czmq `2019-06-10-1` -> `2019-06-10-3` + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + - [(#7700)](https://github.com/microsoft/vcpkg/pull/7700) [czmq/pcl] Fix judgment feature condition. + +- darknet `0.2.5-5` -> `0.2.5-6` + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + +- mimalloc `2019-06-25` -> `2019-06-25-1` + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + +- mongo-c-driver `1.14.0-3` -> `1.14.0-3-1` + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + +- oniguruma `6.9.2-2` -> `6.9.3` + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + - [(#7721)](https://github.com/microsoft/vcpkg/pull/7721) [oniguruma] Update library 6.9.3 + +- paho-mqttpp3 `1.0.1` -> `1.0.1-2` + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + - [(#7769)](https://github.com/microsoft/vcpkg/pull/7769) [paho-mqttpp3] Fix missing reference to C library headers + +- xsimd `7.2.3-1` -> `7.2.3-2` + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + +- xtensor `0.20.7-1` -> `0.20.7-2` + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + +- zeromq `2019-07-09` -> `2019-07-09-1` + - [(#7558)](https://github.com/microsoft/vcpkg/pull/7558) [vcpkg_check_features] Set output variable explicitly and allow reverse-logic check + +- gtest `2019-01-04-2` -> `2019-08-14-1` + - [(#7692)](https://github.com/microsoft/vcpkg/pull/7692) [gtest] update to 90a443f9c2437ca8a682a1ac625eba64e1d74a8a + - [(#7316)](https://github.com/microsoft/vcpkg/pull/7316) [gtest] Re-fix port_main/port_maind libraries path and add gmock cmake files. + +- physx `commit-624f2cb6c0392013d54b235d9072a49d01c3cb6c` -> `4.1.1-1` + - [(#7679)](https://github.com/microsoft/vcpkg/pull/7679) [physx] Update to 4.1.1 (with Visual Studio 2019 support) + +- libidn2 `2.1.1-1` -> `2.2.0` + - [(#7685)](https://github.com/microsoft/vcpkg/pull/7685) [libidn2] Update to version 2.2.0. + +- poco `2.0.0-pre-3` -> `1.9.2-1` + - [(#7698)](https://github.com/microsoft/vcpkg/pull/7698) [poco] Upgrade version to 1.9.2 release. + - [(#7892)](https://github.com/microsoft/vcpkg/pull/7892) [poco] Fix conflicts with libharu. + +- osgearth `2.10.1` -> `2.10.2` + - [(#7695)](https://github.com/microsoft/vcpkg/pull/7695) [osgearth] Fix osgearth rocksdb plugin build falied + +- spdlog `1.3.1-1` -> `1.3.1-2` + - [(#7670)](https://github.com/microsoft/vcpkg/pull/7670) [spdlog] fix cmake targets path + +- libgit2 `0.28.2` -> `0.28.3` + - [(#7669)](https://github.com/microsoft/vcpkg/pull/7669) [libgit2] Upgrade to version 0.28.3 + +- brynet `1.0.2` -> `1.0.3` + - [(#7702)](https://github.com/microsoft/vcpkg/pull/7702) [brynet, catch2, chakracore] Update some ports version + +- nghttp2 `1.35.0` -> `1.39.2` + - [(#7699)](https://github.com/microsoft/vcpkg/pull/7699) [nghttp2] Upgrade to version 1.39.2 + +- leptonica `1.76.0-1` -> `1.78.0-1` + - [(#7358)](https://github.com/microsoft/vcpkg/pull/7358) [leptonica] Upgrade to 1.78.0 + - [(#7712)](https://github.com/microsoft/vcpkg/pull/7712) [leptonica] Add dependency port libwebp and fix find libwebp in debug/release + +- libtorrent `2019-04-19` -> `1.2.1-bcb26fd6` + - [(#7708)](https://github.com/microsoft/vcpkg/pull/7708) [libtorrent] Update to 1.2.1-bcb26fd6 + +- angelscript `2.33.0-1` -> `2.33.1-1` + - [(#7650)](https://github.com/microsoft/vcpkg/pull/7650) [angelscript] Added feature to optionally install all Angelscript standard addons + +- jsoncpp `1.8.4-1` -> `1.9.1` + - [(#7719)](https://github.com/microsoft/vcpkg/pull/7719) [jsoncpp] Update library to 1.9.1 + +- robin-hood-hashing `3.2.13` -> `3.4.0` + - [(#7722)](https://github.com/microsoft/vcpkg/pull/7722) [robin-hood-hashing] Update library to 3.4.0 + +- sqlite-orm `1.3-1` -> `1.4` + - [(#7723)](https://github.com/microsoft/vcpkg/pull/7723) [sqlite-orm] Update library to 1.4 + +- doctest `2.3.3` -> `2.3.4` + - [(#7716)](https://github.com/microsoft/vcpkg/pull/7716) [doctest] Update library to 2.3.4 + +- pegtl-2 `2.8.0` -> `2.8.1` + - [(#7715)](https://github.com/microsoft/vcpkg/pull/7715) [pegtl-2] Update library to 2.8.1 + +- cpp-httplib `0.2.0` -> `0.2.1` + - [(#7714)](https://github.com/microsoft/vcpkg/pull/7714) [cpp-httplib] Update library to 0.2.1 + +- geographiclib `1.47-patch1-6` -> `1.47-patch1-7` + - [(#7697)](https://github.com/microsoft/vcpkg/pull/7697) [geographiclib] Fix build error on Linux + +- libmariadb `3.0.10-3` -> `3.0.10-4` + - [(#7710)](https://github.com/microsoft/vcpkg/pull/7710) [libmariadb] Fix usage error LNK2001. + +- irrlicht `1.8.4-2` -> `1.8.4-1` + - [(#7726)](https://github.com/microsoft/vcpkg/pull/7726) Revert "[irrlicht] use unicode path on windows (#7354)" + +- cgltf `2019-04-30` -> `1.3` + - [(#7731)](https://github.com/microsoft/vcpkg/pull/7731) [cgltf] Update library to 1.2 + - [(#7774)](https://github.com/microsoft/vcpkg/pull/7774) [cgltf] Update library to 1.3 + +- duktape `2.3.0-2` -> `2.4.0-3` + - [(#7548)](https://github.com/microsoft/vcpkg/pull/7548) [ duktape] Update hash for pip. + - [(#7873)](https://github.com/microsoft/vcpkg/pull/7873) [duktape] Update library to 2.4.0 + +- double-conversion `3.1.4` -> `3.1.5` + - [(#7717)](https://github.com/microsoft/vcpkg/pull/7717) [double-conversion] Update library to 3.1.5 + +- libmorton `2018-19-07` -> `0.2` + - [(#7738)](https://github.com/microsoft/vcpkg/pull/7738) [libmorton] Update library to 0.2 + +- clp `1.17.2-2` -> `1.17.3` + - [(#7756)](https://github.com/microsoft/vcpkg/pull/7756) [clp] Update library to 1.17.3 + +- libfabric `1.7.1-1` -> `1.8.0` + - [(#7755)](https://github.com/microsoft/vcpkg/pull/7755) [libfabric] Update library to 1.8.0 + +- leaf `0.2.1-2` -> `0.2.2` + - [(#7782)](https://github.com/microsoft/vcpkg/pull/7782) [leaf] Update library to 0.2.2 + +- inih `44` -> `45` + - [(#7780)](https://github.com/microsoft/vcpkg/pull/7780) [inih] Update library to 45 + +- clara `2019-03-29` -> `1.1.5` + - [(#7775)](https://github.com/microsoft/vcpkg/pull/7775) [clara] Update library to 1.1.5 + +- distorm `2018-08-26-16e6f435-1` -> `3.4.1` + - [(#7777)](https://github.com/microsoft/vcpkg/pull/7777) [distorm] Update library to 3.4.1 + +- libcopp `1.1.0-2` -> `1.2.0` + - [(#7770)](https://github.com/microsoft/vcpkg/pull/7770) [libcopp] Update library to 1.2.0 + +- argparse `2019-06-10` -> `1.9` + - [(#7753)](https://github.com/microsoft/vcpkg/pull/7753) [argparse] Update library to 1.9 + +- argagg `2019-01-25` -> `0.4.6` + - [(#7752)](https://github.com/microsoft/vcpkg/pull/7752) [argagg] Update library to 0.4.6 + +- eastl `3.14.00` -> `3.14.01` + - [(#7786)](https://github.com/microsoft/vcpkg/pull/7786) [eastl] Update library to 3.14.01 + +- fribidi `58c6cb3` -> `2019-02-04-1` + - [(#7768)](https://github.com/microsoft/vcpkg/pull/7768) [fribidi] Fix static library suffix in windows-static + +- luajit `2.0.5-1` -> `2.0.5-2` + - [(#7764)](https://github.com/microsoft/vcpkg/pull/7764) [luajit] Separate debug/release build path and fix generate pdbs. + +- ixwebsocket `4.0.3` -> `5.0.4` + - [(#7789)](https://github.com/microsoft/vcpkg/pull/7789) [ixwebsocket] update to 5.0.4 + +- azure-c-shared-utility `2019-05-16.1` -> `2019-08-20.1` + - [(#7791)](https://github.com/microsoft/vcpkg/pull/7791) [azure-iot] vcpkg update for master/public-preview release + +- azure-iot-sdk-c `2019-07-01.1` -> `2019-08-20.1` + - [(#7791)](https://github.com/microsoft/vcpkg/pull/7791) [azure-iot] vcpkg update for master/public-preview release + +- azure-macro-utils-c `2019-05-16.1` -> `2019-08-20.1` + - [(#7791)](https://github.com/microsoft/vcpkg/pull/7791) [azure-iot] vcpkg update for master/public-preview release + +- azure-uamqp-c `2019-05-16.1` -> `2019-08-20.1` + - [(#7791)](https://github.com/microsoft/vcpkg/pull/7791) [azure-iot] vcpkg update for master/public-preview release + +- azure-uhttp-c `2019-05-16.1` -> `2019-08-20.1` + - [(#7791)](https://github.com/microsoft/vcpkg/pull/7791) [azure-iot] vcpkg update for master/public-preview release + +- azure-umqtt-c `2019-05-16.1` -> `2019-08-20.1` + - [(#7791)](https://github.com/microsoft/vcpkg/pull/7791) [azure-iot] vcpkg update for master/public-preview release + +- umock-c `2019-05-16.1` -> `2019-08-20.1` + - [(#7791)](https://github.com/microsoft/vcpkg/pull/7791) [azure-iot] vcpkg update for master/public-preview release + +- embree3 `3.5.2` -> `3.5.2-1` + - [(#7767)](https://github.com/microsoft/vcpkg/pull/7767) [embree3] Fix install path + +- re2 `2019-05-07-2` -> `2019-08-01` + - [(#7808)](https://github.com/microsoft/vcpkg/pull/7808) [re2] Update library to 2019-08-01 + +- reproc `6.0.0-2` -> `8.0.1` + - [(#7807)](https://github.com/microsoft/vcpkg/pull/7807) [reproc] Update library to 8.0.1 + +- safeint `3.20.0` -> `3.21` + - [(#7806)](https://github.com/microsoft/vcpkg/pull/7806) [safeint] Update library to 3.21 + +- snowhouse `3.1.0` -> `3.1.1` + - [(#7805)](https://github.com/microsoft/vcpkg/pull/7805) [snowhouse] Update library to 3.1.1 + +- spectra `0.8.0` -> `0.8.1` + - [(#7803)](https://github.com/microsoft/vcpkg/pull/7803) [spectra] Update library to 0.8.1 + +- spirv-cross `2019-05-09` -> `2019-07-26` + - [(#7802)](https://github.com/microsoft/vcpkg/pull/7802) [spirv-cross] Update library to 2019-07-26 + +- libmodbus `3.1.4-3` -> `3.1.6` + - [(#7834)](https://github.com/microsoft/vcpkg/pull/7834) [libmodbus] Update library to 3.1.6 + +- basisu `0.0.1-1` -> `1.11-1` + - [(#7836)](https://github.com/microsoft/vcpkg/pull/7836) [basisu] fix vcpkg version, merge upstream fixes + +- range-v3 `0.5.0` -> `0.9.0-20190822` + - [(#7845)](https://github.com/microsoft/vcpkg/pull/7845) Update range-v3 reference + +- cryptopp `8.1.0-2` -> `8.2.0` + - [(#7854)](https://github.com/microsoft/vcpkg/pull/7854) [cryptopp] Update library to 8.2.0 + +- lz4 `1.9.1-2` -> `1.9.2` + - [(#7860)](https://github.com/microsoft/vcpkg/pull/7860) [lz4] Update library to 1.9.2 + +- wxwidgets `3.1.2-1` -> `3.1.2-2` + - [(#7833)](https://github.com/microsoft/vcpkg/pull/7833) [wxwidgets] Windows ARM support + +- args `2019-05-01` -> `2019-07-11` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- asmjit `2019-03-29` -> `2019-07-11` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- aws-c-common `0.3.11-1` -> `0.4.1` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- aws-sdk-cpp `1.7.116` -> `1.7.142` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- bitsery `4.6.0` -> `5.0.0` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- botan `2.9.0-2` -> `2.11.0` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- breakpad `2019-05-08` -> `2019-07-11` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- chipmunk `7.0.2` -> `7.0.3` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- console-bridge `0.3.2-4` -> `0.4.3-1` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- coroutine `1.4.1-1` -> `1.4.3` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- crc32c `1.0.7-1` -> `1.1.0` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- exprtk `2019-03-29` -> `2019-07-11` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- fastcdr `1.0.9-1` -> `1.0.10` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + - [(#7862)](https://github.com/microsoft/vcpkg/pull/7862) [fastcdr] Update library 1.0.10 + +- fizz `2019.05.20.00-1` -> `2019.07.08.00` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- folly `2019.05.20.00-1` -> `2019.06.17.00` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- glad `0.1.30` -> `0.1.31` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- gmmlib `19.1.2` -> `19.2.3` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- graphite2 `1.3.12-1` -> `1.3.13` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- grpc `1.21.1-1` -> `1.22.0` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- io2d `0.1-2` -> `2019-07-11` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- libarchive `3.3.3-3` -> `3.4.0` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- libpqxx `6.4.4` -> `6.4.5` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- libssh2 `1.8.2` -> `1.9.0` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- libuv `1.29.1` -> `1.30.1` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- luabridge `2.3.1` -> `2.3.2` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- matio `1.5.15` -> `1.5.16` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- mosquitto `1.6.2-2` -> `1.6.3` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- ms-gsl `2019-04-19` -> `2019-07-11` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- nmslib `1.7.3.6-1` -> `1.8.1` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- nuklear `2019-03-29` -> `2019-07-11` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- openvr `1.4.18` -> `1.5.17` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- orc `1.5.5-1` -> `1.5.6` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + - [(#7908)](https://github.com/microsoft/vcpkg/pull/7908) Add homepage for orc + +- parson `2019-04-19` -> `2019-07-11` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- piex `2018-03-13-1` -> `2019-07-11` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- ptex `2.1.28-1` -> `2.3.2` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- pybind11 `2.2.4` -> `2.3.0` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- rs-core-lib `2019-05-07` -> `2019-07-11` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- shogun `6.1.3-3` -> `6.1.4` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- stb `2019-05-07` -> `2019-07-11` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- taocpp-json `2019-05-08` -> `2019-07-11` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- tbb `2019_U7-1` -> `2019_U8` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- telnetpp `1.2.4-1` -> `2.0` + - [(#7217)](https://github.com/microsoft/vcpkg/pull/7217) [many ports] Updates 2019.07.09 + +- blaze `3.5` -> `3.6` + - [(#7878)](https://github.com/microsoft/vcpkg/pull/7878) [blaze] Update to Blaze 3.6 + +- glfw3 `3.3-1` -> `3.3-2` + - [(#7885)](https://github.com/microsoft/vcpkg/pull/7885) [glfw3] Add more information about installing dependencies. + +- fmt `5.3.0-2` -> `6.0.0` + - [(#7910)](https://github.com/microsoft/vcpkg/pull/7910) [fmt] Update to 6.0.0 + - [(#7884)](https://github.com/microsoft/vcpkg/pull/7884) [fmt] missing VCPKG_BUILD_TYPE support added + +- magic-enum `2019-06-07` -> `0.6.0` + - [(#7916)](https://github.com/microsoft/vcpkg/pull/7916) [magic-enum] Update to v0.6.0 + +- liblsl `1.13.0-b6` -> `1.13.0-b11-1` + - [(#7906)](https://github.com/microsoft/vcpkg/pull/7906) [liblsl] Update library to 1.13.0-b11 + - [(#7945)](https://github.com/microsoft/vcpkg/pull/7945) [liblsl] Fix installation + +- yaml-cpp `0.6.2-2` -> `0.6.2-3` + - [(#7847)](https://github.com/microsoft/vcpkg/pull/7847) [yaml-cpp] Fix include path in yaml-cpp-config.cmake + +- fluidsynth `2.0.5` -> `2.0.5-1` + - [(#7837)](https://github.com/microsoft/vcpkg/pull/7837) [fluidsynth] add Windows ARM support + +- nmap `7.70` -> `7.70-1` + - [(#7811)](https://github.com/microsoft/vcpkg/pull/7811) [nmap] Fix build error. + +- moos-ui `10.0.1-1` -> `10.0.1-2` + - [(#7812)](https://github.com/microsoft/vcpkg/pull/7812) [moos-ui] Fix install path + +- openni2 `2.2.0.33-9` -> `2.2.0.33-10` + - [(#7809)](https://github.com/microsoft/vcpkg/pull/7809) [openni2] Add warning message when cannot find NETFXSDK. + +- abseil `2019-05-08` -> `2019-05-08-1` + - [(#7745)](https://github.com/microsoft/vcpkg/pull/7745) [abseil] fix cmake config issue + +- libwebp `1.0.2-6` -> `1.0.2-7` + - [(#7886)](https://github.com/microsoft/vcpkg/pull/7886) [libwebp] Fix two dependent windows library link conditions. + +- wpilib `2019.5.1` -> `2019.6.1` + - [(#7927)](https://github.com/microsoft/vcpkg/pull/7927) [wpilib] Update wpilib port to allow opencv4 + +- ogdf `2018-03-28-2` -> `2019-08-23` + - [(#7846)](https://github.com/microsoft/vcpkg/pull/7846) [ogdf] Update source link + +- libp7client `5.2` -> `5.2-1` + - [(#7977)](https://github.com/microsoft/vcpkg/pull/7977) [libp7client] Rename port folder to lowercase + +- libpng `1.6.37-2` -> `1.6.37-3` + - [(#7972)](https://github.com/microsoft/vcpkg/pull/7972) [libpng] Fix find_package() in CONFIG mode (#7968) + +- openblas `0.3.6-5` -> `0.3.6-6` + - [(#7888)](https://github.com/microsoft/vcpkg/pull/7888) [openblas] Enable x86 build and fix usage errors. + +- qt5-base `5.12.3-3` -> `5.12.3-4` + - [(#7973)](https://github.com/microsoft/vcpkg/pull/7973) [Qt5] Fix libpq linkage in wrapper + +- liblas `1.8.1` -> `1.8.1-2` + - [(#7975)](https://github.com/microsoft/vcpkg/pull/7975) [liblas] Fix Geotiff linkage + +- glib `2.52.3-14-2` -> `2.52.3-14-3` + - [(#7963)](https://github.com/microsoft/vcpkg/pull/7963) [glib] Fix install config.h + +
+ +-- vcpkg team vcpkg@microsoft.com THU, 04 Sept 14:00:00 -0800 + +vcpkg (2019.7.31) +--- +#### Total port count: 1105 +#### Total port count per triplet (tested): +|triplet|ports available| +|---|---| +|**x64-windows**|1039| +|x86-windows|1009| +|x64-windows-static|928| +|**x64-linux**|866| +|**x64-osx**|788| +|arm64-windows|678| +|x64-uwp|546| +|arm-uwp|522| + +#### The following commands and options have been updated: +- --scripts-root ***[NEW OPTION]*** + - Specify a directory to use in place of `/scripts`. Enables a shared script directory for those using a single vcpkg instance to manage distributed port directories + - [(#6552)](https://github.com/microsoft/vcpkg/pull/6552) Allow redirection of the scripts folder. +- depend-info + - Allow `vcpkg depend-info port[feature]` to display port-dependency information for a given port and the specified feature. + - [(#6797)](https://github.com/microsoft/vcpkg/pull/6797) Make `depend-info` subcommand able to handle features + +#### The following documentation has been updated: +- [Overlay triplets example: build dynamic libraries on Linux](docs/examples/overlay-triplets-linux-dynamic.md) ***[NEW]*** + - [(#7291)](https://github.com/microsoft/vcpkg/pull/7291) Example: Building dynamic libraries on Linux using overlay triplets +- [vcpkg_from_git](docs/maintainers/vcpkg_from_git.md) + - [(#7082)](https://github.com/microsoft/vcpkg/pull/7082) Fix vcpkg_from_git +- [Maintainer Guidelines and Policies](docs/maintainers/maintainer-guide.md) + - [(#7390)](https://github.com/microsoft/vcpkg/pull/7390) [docs] add notes about manual-link + +#### The following *remarkable* changes have been made to vcpkg's infrastructure: +- `VCPKG_ENV_PASSTHROUGH` triplet variable and `environment-overrides.cmake` + - Port authors can add an `environment-overrides.cmake` file to a port to override triplet settings globally or to define behavior of the vpckg binary on a per port basis + - [(#7290)](https://github.com/microsoft/vcpkg/pull/7290) [vcpkg] Environment Variable Passthrough + - [(#7292)](https://github.com/microsoft/vcpkg/pull/7292) [vcpkg] Portfile Settings +- Testing overhaul + - Tests have been migrated from the Visual Studio unit testing framework to the cross-platform [Catch2](https://github.com/catchorg/Catch2) + - [(#7315)](https://github.com/microsoft/vcpkg/pull/7315) Rewrite the tests! now they're cross-platform! + +#### The following *additional* changes have been made to vcpkg's infrastructure: +- [(#7080)](https://github.com/microsoft/vcpkg/pull/7080) [vcpkg] Use spaces instead of semicolons in the output +- [(#6791)](https://github.com/microsoft/vcpkg/pull/6791) Update python2, python3, perl, aria2, ninja, ruby, 7z +- [(#7082)](https://github.com/microsoft/vcpkg/pull/7082) Fix vcpkg_from_git +- [(#7117)](https://github.com/microsoft/vcpkg/pull/7117) Revert Visual Studio projects versions +- [(#7051)](https://github.com/microsoft/vcpkg/pull/7051) Fix Python3 tool on Windows +- [(#7135)](https://github.com/microsoft/vcpkg/pull/7135) revert ninja update +- [(#7136)](https://github.com/microsoft/vcpkg/pull/7136) Bump version to warn of outdated vcpkg sources +- [(#7094)](https://github.com/microsoft/vcpkg/pull/7094) [vcpkg] Fix powershell font corruption bug +- [(#7158)](https://github.com/microsoft/vcpkg/pull/7158) [vcpkg] Fix incorrect setting of FEATURE_OPTIONS +- [(#6792)](https://github.com/microsoft/vcpkg/pull/6792) Cleanup vcpkg_configure_cmake.cmake +- [(#7175)](https://github.com/microsoft/vcpkg/pull/7175) Added nasm mirror as nasm.us is down again +- [(#7216)](https://github.com/microsoft/vcpkg/pull/7216) [vcpkg] allow spaces in pathname on linux +- [(#7243)](https://github.com/microsoft/vcpkg/pull/7243) Testing for --overlay-ports and --overlay-triplets args +- [(#7294)](https://github.com/microsoft/vcpkg/pull/7294) Add June changelog +- [(#7229)](https://github.com/microsoft/vcpkg/pull/7229) Better error message when VCPKG_ROOT is independently defined +- [(#7336)](https://github.com/microsoft/vcpkg/pull/7336) Create issue templates +- [(#7322)](https://github.com/microsoft/vcpkg/pull/7322) Resolves "project is never up-to-date" problem (issue 6179) +- [(#7228)](https://github.com/microsoft/vcpkg/pull/7228) Parallel file operations +- [(#7403)](https://github.com/microsoft/vcpkg/pull/7403) Add third party notices -- copied from chakracore +- [(#7407)](https://github.com/microsoft/vcpkg/pull/7407) Modify CMakeLists to split up vcpkglib +- [(#7430)](https://github.com/microsoft/vcpkg/pull/7430) [vcpkg] Fix RealFilesystem::remove_all + +
+The following 37 ports have been added: + +|port|version| +|---|---| +|[septag-sx](https://github.com/microsoft/vcpkg/pull/6327)| 2019-05-07-1 +|[librdkafka](https://github.com/microsoft/vcpkg/pull/5921)| 1.1.0 +|[soxr](https://github.com/microsoft/vcpkg/pull/6478)| 0.1.3. +|[czmq](https://github.com/microsoft/vcpkg/pull/4979)[#7186](https://github.com/microsoft/vcpkg/pull/7186) | 2019-06-10-1 +|[cppmicroservices](https://github.com/microsoft/vcpkg/pull/6388)| 4.0.0-pre1 +|[zookeeper](https://github.com/microsoft/vcpkg/pull/7000)| 3.5.5 +|[xmlsec](https://github.com/microsoft/vcpkg/pull/7196)| 1.2.28 +|[librsvg](https://github.com/microsoft/vcpkg/pull/6807)| 2.40.20 +|[7zip](https://github.com/microsoft/vcpkg/pull/6920)| 19.00 +|[genann](https://github.com/microsoft/vcpkg/pull/7195)| 2019-07-10 +|[offscale-libetcd-cpp](https://github.com/microsoft/vcpkg/pull/6999)| 2019-07-10 +|[rabit](https://github.com/microsoft/vcpkg/pull/7234)| 0.1 +|[zyre](https://github.com/microsoft/vcpkg/pull/7189)| 2019-07-07 +|[cpp-peglib](https://github.com/microsoft/vcpkg/pull/7254)| 0.1.0 +|[paho-mqttpp3](https://github.com/microsoft/vcpkg/pull/7033)| 1.0.1 +|[openxr-loader](https://github.com/microsoft/vcpkg/pull/6339)[#7376](https://github.com/microsoft/vcpkg/pull/7376) [#7488](https://github.com/microsoft/vcpkg/pull/7488) | 1.0.0-1 +|[wintoast](https://github.com/microsoft/vcpkg/pull/7006)| 1.2.0 +|[scnlib](https://github.com/microsoft/vcpkg/pull/7014)| 0.1.2 +|[mongoose](https://github.com/microsoft/vcpkg/pull/7089)| 6.15-1 +|[nameof](https://github.com/microsoft/vcpkg/pull/7250)| 2019-07-13 +|[leaf](https://github.com/microsoft/vcpkg/pull/7319)[#7468](https://github.com/microsoft/vcpkg/pull/7468) | 0.2.1-2 +|[otl](https://github.com/microsoft/vcpkg/pull/7272)| 4.0.442 +|[dbg-macro](https://github.com/microsoft/vcpkg/pull/7237)| 2019-07-11 +|[p-ranav-csv](https://github.com/microsoft/vcpkg/pull/7236)| 2019-07-11 +|[lastools](https://github.com/microsoft/vcpkg/pull/7220)| 2019-07-10 +|[basisu](https://github.com/microsoft/vcpkg/pull/6995)[#7468](https://github.com/microsoft/vcpkg/pull/7468) | 0.0.1-1 +|[cmcstl2](https://github.com/microsoft/vcpkg/pull/7348)| 2019-07-20 +|[libconfuse](https://github.com/microsoft/vcpkg/pull/7252)| 2019-07-14 +|[boolinq](https://github.com/microsoft/vcpkg/pull/7362)| 2019-07-22 +|[libzippp](https://github.com/microsoft/vcpkg/pull/6801)| 2019-07-22 +|[mimalloc](https://github.com/microsoft/vcpkg/pull/7011)| 2019-06-25 +|[liblas](https://github.com/microsoft/vcpkg/pull/6746)| 1.8.1 +|[xtensor-io](https://github.com/microsoft/vcpkg/pull/7398)| 0.7.0 +|[easycl](https://github.com/microsoft/vcpkg/pull/7387)| 0.3 +|[nngpp](https://github.com/microsoft/vcpkg/pull/7417)| 2019-07-25 +|[mpi](https://github.com/microsoft/vcpkg/pull/7142)| 1 +|[openmpi](https://github.com/microsoft/vcpkg/pull/7142)| 4.0.1 +
+ +
+The following 160 ports have been updated: + +- openssl-unix `1.0.2q` -> `1.0.2s-1` + - [(#6854)](https://github.com/microsoft/vcpkg/pull/6854) Openssl version bump 1.0.2s + - [(#6512)](https://github.com/microsoft/vcpkg/pull/6512) [openssl-unix] Shared library support + +- openssl-windows `1.0.2q-2` -> `1.0.2s-1` + - [(#6854)](https://github.com/microsoft/vcpkg/pull/6854) Openssl version bump 1.0.2s + +- mongo-cxx-driver `3.4.0-2` -> `3.4.0-3` + - [(#7050)](https://github.com/microsoft/vcpkg/pull/7050) [mongo-cxx-driver] Do not delete the third_party include folder when building with mnmlstc + +- fdlibm `5.3-3` -> `5.3-4` + - [(#7082)](https://github.com/microsoft/vcpkg/pull/7082) Fix vcpkg_from_git + +- azure-iot-sdk-c `2019-05-16.1` -> `2019-07-01.1` + - [(#7123)](https://github.com/microsoft/vcpkg/pull/7123) [azure] Update azure-iot-sdk-c for public-preview release of 2019-07-01 + +- open62541 `0.3.0-1` -> `0.3.0-2` + - [(#7051)](https://github.com/microsoft/vcpkg/pull/7051) Fix Python3 tool on Windows + +- lua `5.3.5-1` -> `5.3.5-2` + - [(#7101)](https://github.com/microsoft/vcpkg/pull/7101) [lua] Add [cpp] feature to additionally build lua-c++ + +- flann `1.9.1-1` -> `2019-04-07-1` + - [(#7125)](https://github.com/microsoft/vcpkg/pull/7125) [flann]Change the version tag to the corresponding time of commit id. + +- tbb `2019_U7` -> `2019_U7-1` + - [(#6510)](https://github.com/microsoft/vcpkg/pull/6510) [tbb] Add shared library support for Linux and OSX + +- dcmtk `3.6.4` -> `3.6.4-1` + - [(#7059)](https://github.com/microsoft/vcpkg/pull/7059) [dcmtk] support wchar_t* filename + +- libmupdf `1.15.0` -> `1.15.0-1` + - [(#7107)](https://github.com/microsoft/vcpkg/pull/7107) [libmupdf] Enable the old patch for fixing C2169 + +- mongo-c-driver `1.14.0-2` -> `1.14.0-3` + - [(#7048)](https://github.com/microsoft/vcpkg/pull/7048) [mongo-c-driver] Add usage + - [(#7338)](https://github.com/microsoft/vcpkg/pull/7338) [mongo-c-driver] Disable snappy auto-detection + +- openimageio `1.8.16` -> `2.0.8` + - [(#7173)](https://github.com/microsoft/vcpkg/pull/7173) [openimageio] Upgrade to version 2.0.8 + +- duktape `2.3.0` -> `2.3.0-2` + - [(#7170)](https://github.com/microsoft/vcpkg/pull/7170) [duktape] Fix package not found by find_package. + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- poco `2.0.0-pre-2` -> `2.0.0-pre-3` + - [(#7169)](https://github.com/microsoft/vcpkg/pull/7169) [Poco] Add missing ipjlpapi.lib to foundation library + +- gsoap `2.8.84-1` -> `2.8.87-1` + - [(#7145)](https://github.com/microsoft/vcpkg/pull/7145) [gsoap] Update to 2.8.87 + +- qt5-mqtt `5.12.3` -> `5.12.3-1` + - [(#7130)](https://github.com/microsoft/vcpkg/pull/7130) [qt5-mqtt] crossplatform add to path + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- botan `2.9.0-1` -> `2.9.0-2` + - [(#7140)](https://github.com/microsoft/vcpkg/pull/7140) [botan] Fix build error C2039 with Visual Studio 2019 and C++17 + - [(#7303)](https://github.com/microsoft/vcpkg/pull/7303) [botan] Fix parallel build + +- kinectsdk2 `2.0` -> `2.0-1` + - [(#7143)](https://github.com/microsoft/vcpkg/pull/7143) kinectsdk2: fix missing header files + +- civetweb `1.11-1` -> `2019-07-05` + - [(#7166)](https://github.com/microsoft/vcpkg/pull/7166) [civetweb] Upgrade and enable feature websocket + +- curl `7.65.0-2` -> `7.65.2-1` + - [(#7156)](https://github.com/microsoft/vcpkg/pull/7156) [curl] Add features. + - [(#7093)](https://github.com/microsoft/vcpkg/pull/7093) [curl] Update to 7.65.2 + +- aws-checksums `0.1.2` -> `0.1.3` + - [(#7154)](https://github.com/microsoft/vcpkg/pull/7154) [aws-checksums]Upgrade version to 0.1.3 + +- rapidjson `1.1.0-3` -> `d87b698-1` + - [(#7152)](https://github.com/microsoft/vcpkg/pull/7152) [rapidjson] Update to the latest commit and also fix #3401. + - [(#7273)](https://github.com/microsoft/vcpkg/pull/7273) [rapidjson] Fix path RapidJSON_INCLUDE_DIRS + +- freetype `2.10.0` -> `2.10.1-1` + - [(#7141)](https://github.com/microsoft/vcpkg/pull/7141) [freetype]Re-fixed the issue of exporting symbols when building dynamic library. + - [(#7341)](https://github.com/microsoft/vcpkg/pull/7341) [freetype] Update to 2.10.1 + +- llvm `7.0.0-3` -> `8.0.0` + - [(#7209)](https://github.com/microsoft/vcpkg/pull/7209) [llvm] Update to 8.0.0 + +- reproc `6.0.0-1` -> `6.0.0-2` + - [(#7208)](https://github.com/microsoft/vcpkg/pull/7208) [reproc] Fix reproc++ installation path + +- wil `2019-06-10` -> `2019-07-16` + - [(#7215)](https://github.com/microsoft/vcpkg/pull/7215) [wil] Update + - [(#7285)](https://github.com/microsoft/vcpkg/pull/7285) Update wil port to match the commit used for NuGet package 1.0.190716.2 + +- tesseract `4.0.0-3` -> `4.1.0-1` + - [(#7144)](https://github.com/microsoft/vcpkg/pull/7144) [tesseract] Fix Port. Making it crossplatform + - [(#7227)](https://github.com/microsoft/vcpkg/pull/7227) [tesseract] port update to 4.1.0 release + - [(#7360)](https://github.com/microsoft/vcpkg/pull/7360) [tesseract[training_tools]] Fix build error + +- zeromq `2019-05-07` -> `2019-07-09` + - [(#7203)](https://github.com/microsoft/vcpkg/pull/7203) [zeromq] Update to 4.3.2 + +- spirv-tools `2019.3-dev` -> `2019.3-dev-1` + - [(#7204)](https://github.com/microsoft/vcpkg/pull/7204) [spirv-tools] Fix removed patch + +- libraqm `0.6.0` -> `0.7.0` + - [(#7149)](https://github.com/microsoft/vcpkg/pull/7149) [libraqm] Update libraqm to 0.7.0 + - [(#7263)](https://github.com/microsoft/vcpkg/pull/7263) [libraqm] Fix copying raqm-version.h to include directory + +- pthreads `3.0.0-1` -> `3.0.0-2` + - [(#7178)](https://github.com/microsoft/vcpkg/pull/7178) [pthreads4W] vcpkg wrapper fixes + +- libkml `1.3.0-2` -> `1.3.0-3` + - [(#7194)](https://github.com/microsoft/vcpkg/pull/7194) [libkml] Fix install path + - [(#7282)](https://github.com/microsoft/vcpkg/pull/7282) [minizip] Make BZip2 an optional feature + +- gherkin-c `4.1.2` -> `2019-10-07-1` + - [(#7231)](https://github.com/microsoft/vcpkg/pull/7231) [gherkin-b] update to latest + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- google-cloud-cpp `0.10.0` -> `0.11.0` + - [(#7134)](https://github.com/microsoft/vcpkg/pull/7134) Upgrade google-cloud-cpp to v0.11.0. + +- sqlite3 `3.28.0-1` -> `3.29.0-1` + - [(#7202)](https://github.com/microsoft/vcpkg/pull/7202) [sqlite3-tool]Fix build error on arm/uwp platform. + - [(#7342)](https://github.com/microsoft/vcpkg/pull/7342) [sqlite3] Update to 3.29.0 + +- nonius `2019-04-20` -> `2019-04-20-1` + - [(#7258)](https://github.com/microsoft/vcpkg/pull/7258) [nonius] properly install noniusConfig.cmake + +- leveldb `1.22` -> `1.22-1` + - [(#7245)](https://github.com/microsoft/vcpkg/pull/7245) [leveldb] Fix cmake config + +- bond `8.1.0` -> `8.1.0-2` + - [(#7273)](https://github.com/microsoft/vcpkg/pull/7273) [rapidjson] Fix path RapidJSON_INCLUDE_DIRS + - [(#7306)](https://github.com/microsoft/vcpkg/pull/7306) [bond] make haskell an external dependency + - [(#7142)](https://github.com/microsoft/vcpkg/pull/7142) [OpenMPI] add a new port + +- cpprestsdk `2.10.13-1` -> `2.10.14` + - [(#7286)](https://github.com/microsoft/vcpkg/pull/7286) Update cpprestsdk to v2.10.14. + +- qt5-base `5.12.3-1` -> `5.12.3-3` + - [(#6983)](https://github.com/microsoft/vcpkg/pull/6983) [qt5-base]Add a print message to inform the user to install the dependency package. + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-3d `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-activeqt `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-charts `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-connectivity `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-datavis3d `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-declarative `5.12.3-1` -> `5.12.3-2` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-gamepad `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-graphicaleffects `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-imageformats `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-location `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-macextras `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-modularscripts `2019-04-30` -> `2019-04-30-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-multimedia `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-networkauth `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-purchasing `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-quickcontrols `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-quickcontrols2 `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-remoteobjects `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-script `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-scxml `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-sensors `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-serialport `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-speech `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-svg `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-tools `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-virtualkeyboard `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-webchannel `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-websockets `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-webview `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- qt5-winextras `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + - [(#7298)](https://github.com/microsoft/vcpkg/pull/7298) [qt5-winextras, ecsutil, soundtouch] Fix build-depends + +- qt5-xmlpatterns `5.12.3` -> `5.12.3-1` + - [(#7230)](https://github.com/microsoft/vcpkg/pull/7230) [qt5]Fix build failure in linux + +- rocksdb `6.0.2` -> `6.1.2` + - [(#7304)](https://github.com/microsoft/vcpkg/pull/7304) [rocksdb] Update rocksdb to 6.1.2, adds optional zstd feature + +- metis `5.1.0-3` -> `5.1.0-5` + - [(#7299)](https://github.com/microsoft/vcpkg/pull/7299) [metis] Fix linux build error. + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- ecsutil `1.0.6.1` -> `1.0.7.2` + - [(#7298)](https://github.com/microsoft/vcpkg/pull/7298) [qt5-winextras, ecsutil, soundtouch] Fix build-depends + - [(#7427)](https://github.com/microsoft/vcpkg/pull/7427) [ECSUtil] update library to v1.0.7.2 + +- soundtouch `2.0.0-2` -> `2.0.0-3` + - [(#7298)](https://github.com/microsoft/vcpkg/pull/7298) [qt5-winextras, ecsutil, soundtouch] Fix build-depends + +- libsodium `1.0.18` -> `1.0.18-1` + - [(#7297)](https://github.com/microsoft/vcpkg/pull/7297) [libsodium] Fix Linux build error. + +- irrlicht `1.8.4` -> `1.8.4-2` + - [(#7296)](https://github.com/microsoft/vcpkg/pull/7296) [irrlicht] add vcpkg-cmake-wrapper + - [(#7354)](https://github.com/microsoft/vcpkg/pull/7354) [irrlicht] use unicode path on windows + +- libyaml `0.2.2` -> `0.2.2-1` + - [(#7277)](https://github.com/microsoft/vcpkg/pull/7277) [libyaml] Fix build error + +- eastl `3.13.05-1` -> `3.14.00` + - [(#7276)](https://github.com/microsoft/vcpkg/pull/7276) [eastl] Upgrade to 3.14 + +- boost-asio `1.70.0-1` -> `1.70.0-2` + - [(#7267)](https://github.com/microsoft/vcpkg/pull/7267) Fixed boost-asio on Windows + +- minizip `1.2.11-4` -> `1.2.11-5` + - [(#7282)](https://github.com/microsoft/vcpkg/pull/7282) [minizip] Make BZip2 an optional feature + +- blend2d `beta_2019-04-30` -> `beta_2019-07-16` + - [(#7239)](https://github.com/microsoft/vcpkg/pull/7239) [blend2d] Port update + +- so5extra `1.2.3-1` -> `1.3.1` + - [(#7238)](https://github.com/microsoft/vcpkg/pull/7238) [sobjectizer, so5extra] updates + +- sobjectizer `5.5.24.4-1` -> `5.6.0.2` + - [(#7238)](https://github.com/microsoft/vcpkg/pull/7238) [sobjectizer, so5extra] updates + +- directxtk `apr2019` -> `apr2019-1` + - [(#7233)](https://github.com/microsoft/vcpkg/pull/7233) [DirectXTK] Fix UWP build error + +- restbed `4.16-07-28-2018` -> `4.16-07-28-2018-1` + - [(#7232)](https://github.com/microsoft/vcpkg/pull/7232) [restbed] Add openssl feature + +- clapack `3.2.1-9` -> `3.2.1-10` + - [(#6786)](https://github.com/microsoft/vcpkg/pull/6786) [openblas/clapack] FindLapack/FindBLAS was not working. + +- geogram `1.6.9-6` -> `1.6.9-7` + - [(#6786)](https://github.com/microsoft/vcpkg/pull/6786) [openblas/clapack] FindLapack/FindBLAS was not working. + +- mlpack `3.1.1` -> `3.1.1-1` + - [(#6786)](https://github.com/microsoft/vcpkg/pull/6786) [openblas/clapack] FindLapack/FindBLAS was not working. + +- openblas `0.3.6-4` -> `0.3.6-5` + - [(#6786)](https://github.com/microsoft/vcpkg/pull/6786) [openblas/clapack] FindLapack/FindBLAS was not working. + +- pprint `2019-06-01` -> `2019-07-19` + - [(#7317)](https://github.com/microsoft/vcpkg/pull/7317) [pprint] Fix #7301 + +- boost-type-erasure `1.70.0` -> `1.70.0-1` + - [(#7325)](https://github.com/microsoft/vcpkg/pull/7325) [boost-type-erasure] fix depends on arm + +- armadillo `2019-04-16-3` -> `2019-04-16-4` + - [(#7041)](https://github.com/microsoft/vcpkg/pull/7041) [armadillo] Fix installation path + +- cutelyst2 `2.7.0` -> `2.8.0` + - [(#7327)](https://github.com/microsoft/vcpkg/pull/7327) [cutelyst2]Upgrade version to 2.8.0 + +- sdl2-image `2.0.4-3` -> `2.0.5` + - [(#7355)](https://github.com/microsoft/vcpkg/pull/7355) [sdl2-image] Updated to 2.0.5 + +- qhull `7.2.1-3` -> `7.3.2` + - [(#7340)](https://github.com/microsoft/vcpkg/pull/7340) [qhull] Update to 7.3.2 and fix postbuild validation + +- libexif `0.6.21-1` -> `0.6.21-2` + - [(#7344)](https://github.com/microsoft/vcpkg/pull/7344) [Libexif] update download location + +- arrow `0.13.0-4` -> `0.14.1` + - [(#7211)](https://github.com/microsoft/vcpkg/pull/7211) [Arrow] Update to Arrow v0.14.1 + +- date `ed0368f` -> `2019-05-18-1` + - [(#7399)](https://github.com/microsoft/vcpkg/pull/7399) [date] Fix issue with feature remote-api + +- libmariadb `3.0.10-1` -> `3.0.10-3` + - [(#7396)](https://github.com/microsoft/vcpkg/pull/7396) [libmariadb] Fix build library type and install path + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- inja `2.1.0` -> `2.1.0-1` + - [(#7402)](https://github.com/microsoft/vcpkg/pull/7402) [inja] Use inja CMakeLists.txt + +- pcl `1.9.1-4` -> `1.9.1-5` + - [(#7388)](https://github.com/microsoft/vcpkg/pull/7388) [pcl] Fix cuda building compatability issues with cuda 10.1 + +- thrift `2019-05-07-2` -> `2019-05-07-3` + - [(#7302)](https://github.com/microsoft/vcpkg/pull/7302) [Thrift] Make Thrift static again + +- forest `12.0.0` -> `12.0.3` + - [(#7410)](https://github.com/microsoft/vcpkg/pull/7410) [forest] Update to Version 12.0.3 + +- nlohmann-json `3.6.1` -> `3.7.0` + - [(#7459)](https://github.com/microsoft/vcpkg/pull/7459) [nlohmann-json] Update to 3.7.0 + +- ecm `5.58.0` -> `5.60.0-1` + - [(#7457)](https://github.com/microsoft/vcpkg/pull/7457) [ecm] Update library to v5.60.0 + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- gl2ps `1.4.0-1` -> `1.4.0-3` + - [(#7453)](https://github.com/microsoft/vcpkg/pull/7453) [gl2ps]Update to use vcpkg new functions(vcpkg_from_gitlab). + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- darknet `0.2.5-4` -> `0.2.5-5` + - [(#7450)](https://github.com/microsoft/vcpkg/pull/7450) [darknet] add training feature + +- g3log `2019-05-14-1` -> `2019-07-29` + - [(#7448)](https://github.com/microsoft/vcpkg/pull/7448) [g3log] Fix https://github.com/KjellKod/g3log/issues/319 + +- azure-storage-cpp `6.1.0` -> `6.1.0-2` + - [(#7404)](https://github.com/microsoft/vcpkg/pull/7404) [azure-storage-cpp] Removed gcov dependency in debug Linux build (#7311) + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- ace `6.5.5-1` -> `6.5.6` + - [(#7466)](https://github.com/microsoft/vcpkg/pull/7466) [ace] ace 6.5.6 + +- bullet3 `2.88` -> `2.88-1` + - [(#7474)](https://github.com/microsoft/vcpkg/pull/7474) [Bullet3] feature for multithreading + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- alembic `1.7.11-2` -> `1.7.11-3` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- ampl-mp `2019-03-21` -> `2019-03-21-1` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- anax `2.1.0-5` -> `2.1.0-6` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- apr `1.6.5-1` -> `1.6.5-2` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- blosc `1.16.3-1` -> `1.16.3-2` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- capnproto `0.7.0-2` -> `0.7.0-3` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- cgicc `3.2.19-1` -> `3.2.19-2` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- charls `2.0.0-1` -> `2.0.0-2` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- collada-dom `2.5.0-1` -> `2.5.0-2` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- ctemplate `2017-06-23-44b7c5-3` -> `2017-06-23-44b7c5-4` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- dlfcn-win32 `1.1.1-1` -> `1.1.1-2` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- easyloggingpp `9.96.7` -> `9.96.7-1` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- fastfeat `391d5e9` -> `391d5e9-1` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- fastlz `1.0-2` -> `1.0-3` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- freeglut `3.0.0-6` -> `3.0.0-7` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- glbinding `3.1.0-1` -> `3.1.0-2` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- glew `2.1.0-4` -> `2.1.0-5` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- glfw3 `3.3` -> `3.3-1` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- graphicsmagick `1.3.32` -> `1.3.32-1` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- hypre `2.11.2-1` -> `2.11.2-2` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + - [(#7142)](https://github.com/microsoft/vcpkg/pull/7142) [OpenMPI] add a new port + +- jack2 `1.9.12-1` -> `1.9.12-2` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- jxrlib `1.1-7` -> `1.1-8` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- kangaru `4.1.3-1` -> `4.1.3-2` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- libconfig `1.7.2` -> `1.7.2-1` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- libfreenect2 `0.2.0-2` -> `0.2.0-3` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- libmad `0.15.1-2` -> `0.15.1-3` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- libmspack `0.10.1` -> `0.10.1-1` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- libnice `0.1.15` -> `0.1.15-1` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- libodb-boost `2.4.0-2` -> `2.4.0-3` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- libodb-mysql `2.4.0-2` -> `2.4.0-3` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- libodb-pgsql `2.4.0-2` -> `2.4.0-3` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- libodb-sqlite `2.4.0-3` -> `2.4.0-4` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- libodb `2.4.0-4` -> `2.4.0-5` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- librabbitmq `0.9.0` -> `0.9.0-1` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- libsamplerate `0.1.9.0` -> `0.1.9.0-1` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- libwebsockets `3.1.0-2` -> `3.1.0-3` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- lmdb `0.9.23-1` -> `0.9.23-2` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- mozjpeg `3.2-2` -> `3.2-3` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- nanodbc `2.12.4-3` -> `2.12.4-4` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- nmslib `1.7.3.6` -> `1.7.3.6-1` + - [(#7468)](https://github.com/microsoft/vcpkg/pull/7468) Add PREFER_NINJA to many ports + +- amqpcpp `4.1.4` -> `4.1.5` + - [(#7475)](https://github.com/microsoft/vcpkg/pull/7475) [amqpcpp] Update library to v4.1.5 + +- cxxopts `2.1.2-1` -> `2.2.0` + - [(#7473)](https://github.com/microsoft/vcpkg/pull/7473) [cxxopts] Bumped to v2.2.0 + +- boost-mpi `1.70.0-1` -> `1.70.0-2` + - [(#7142)](https://github.com/microsoft/vcpkg/pull/7142) [OpenMPI] add a new port + +- hdf5 `1.10.5-7` -> `1.10.5-8` + - [(#7142)](https://github.com/microsoft/vcpkg/pull/7142) [OpenMPI] add a new port + +- kealib `1.4.11` -> `1.4.11-1` + - [(#7142)](https://github.com/microsoft/vcpkg/pull/7142) [OpenMPI] add a new port + +- parmetis `4.0.3-2` -> `4.0.3-3` + - [(#7142)](https://github.com/microsoft/vcpkg/pull/7142) [OpenMPI] add a new port + +- vtk `8.2.0-4` -> `8.2.0-5` + - [(#7142)](https://github.com/microsoft/vcpkg/pull/7142) [OpenMPI] add a new port + +
+ +-- vcpkg team vcpkg@microsoft.com THU, 01 Aug 07:00:00 -0800 + +vcpkg (2019.6.30) +--- +#### Total port count: 1068 +#### Total port count per triplet (tested): +|triplet|ports available| +|---|---| +|**x64-windows**|1006| +|x86-windows|977| +|x64-windows-static|895| +|**x64-osx**|755| +|**x64-linux**|823| +|arm64-windows|654| +|x64-uwp|532| +|arm-uwp|504| + +#### The following commands and options have been updated: +- [--overlay-ports](docs/specifications/ports-overlay.md) ***[NEW OPTION]*** + - Specify directories to be used when searching for ports + - [(#6981)](https://github.com/Microsoft/vcpkg/pull/6981) Ports Overlay partial implementation + - [(#7002)](https://github.com/Microsoft/vcpkg/pull/7002) [--overlay-ports] Show location of overriden ports during install plan +- --overlay-triplets ***[NEW OPTION]*** + - Specify directories containing triplets files + - [(#7053)](https://github.com/Microsoft/vcpkg/pull/7053) Triplets Overlay Implementation +- integrate + - [(#7095)](https://github.com/Microsoft/vcpkg/pull/7095) [vcpkg-integrate] Improve spelling, help, and autocomplete. + +#### The following documentation has been updated: +- [Maintainer Guidelines and Policies](docs/maintainers/maintainer-guide.md) ***[NEW]*** + - [(#6871)](https://github.com/Microsoft/vcpkg/pull/6871) [docs] Add maintainer guidelines +- [Ports Overlay](docs/specifications/ports-overlay.md) ***[NEW]*** + - [(#6981)](https://github.com/Microsoft/vcpkg/pull/6981) Ports Overlay partial implementation +- [vcpkg_check_features](docs/maintainers/vcpkg_check_features.md) ***[NEW]*** + - [(#6958)](https://github.com/Microsoft/vcpkg/pull/6958) [vcpkg] Add vcpkg_check_features + - [(#7091)](https://github.com/Microsoft/vcpkg/pull/7091) [vcpkg] Update vcpkg_check_features document +- [vcpkg_execute_build_process](docs/maintainers/vcpkg_execute_build_process.md) ***[NEW]*** + - [(#7039)](https://github.com/Microsoft/vcpkg/pull/7039) [docs]Update cmake docs +- [CONTROL files](docs/maintainers/control-files.md#Homepage) + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + - [(#6871)](https://github.com/Microsoft/vcpkg/pull/6871) [docs] Add maintainer guidelines +- [index](docs/index.md) + - [(#6871)](https://github.com/Microsoft/vcpkg/pull/6871) [docs] Add maintainer guidelines +- [Portfile helper functions](docs/maintainers/portfile-functions.md) + - [(#7039)](https://github.com/Microsoft/vcpkg/pull/7039) [docs]Update cmake docs +- [vcpkg_configure_cmake](docs/maintainers/vcpkg_configure_cmake.md) + - [(#7074)](https://github.com/Microsoft/vcpkg/pull/7074) [vcpkg_configure_cmake] Add NO_CHARSET_FLAG option + +#### The following *remarkable* changes have been made to vcpkg's infrastructure: +- [vcpkg_check_features.cmake](docs/maintainers/vcpkg_check_features.md) + - New portfile.cmake function for vcpkg contributors; Check if one or more features are a part of the package installation + - [(#6958)](https://github.com/Microsoft/vcpkg/pull/6958) [vcpkg] Add vcpkg_check_features + - [(#7091)](https://github.com/Microsoft/vcpkg/pull/7091) [vcpkg] Update vcpkg_check_features document +- [CONTROL file Homepage field](docs/maintainers/control-files.md#Homepage) + - CONTROL files may now contain a 'Homepage' field which links to the port's official website + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +#### The following *additional* changes have been made to vcpkg's infrastructure: +- [(#4942)](https://github.com/Microsoft/vcpkg/pull/4942) Update applocal.ps1 +- [(#5630)](https://github.com/Microsoft/vcpkg/pull/5630) [scripts] Fix vcpkg_fixup_cmake on non Windows platforms +- [(#6383)](https://github.com/Microsoft/vcpkg/pull/6383) [vcpkg] update python3 to 3.7.3 on windows +- [(#6590)](https://github.com/Microsoft/vcpkg/pull/6590) ffmpeg: enable arm/arm64 windows support +- [(#6653)](https://github.com/Microsoft/vcpkg/pull/6653) [vcpkg] Fix install from head when no-downloads +- [(#6667)](https://github.com/Microsoft/vcpkg/pull/6667) make meson not download things +- [(#6695)](https://github.com/Microsoft/vcpkg/pull/6695) [icu] Enable parallel builds +- [(#6704)](https://github.com/Microsoft/vcpkg/pull/6704) [DOXYGEN]Upgrade doxygen to 1.8.15. +- [(#6788)](https://github.com/Microsoft/vcpkg/pull/6788) [vcpkg] Bootstrap should use Get-CimInstance instead of Get-WmiObject. +- [(#6826)](https://github.com/Microsoft/vcpkg/pull/6826) [vcpkg] Apply clang format +- [(#6846)](https://github.com/Microsoft/vcpkg/pull/6846) Introduce an easier way to identify target systems... +- [(#6867)](https://github.com/Microsoft/vcpkg/pull/6867) Protect #pragma comment(lib, "foo") with _WIN32 checks +- [(#6872)](https://github.com/Microsoft/vcpkg/pull/6872) set CMAKE_SYSTEM_PROCESSOR in Linux +- [(#6880)](https://github.com/Microsoft/vcpkg/pull/6880) retry on flaky linker +- [(#6919)](https://github.com/Microsoft/vcpkg/pull/6919) [vcpkg] Improve vcpkg::Files::Filesystem error handling +- [(#6943)](https://github.com/Microsoft/vcpkg/pull/6943) address qhull flaky build with msvc linker +- [(#6952)](https://github.com/Microsoft/vcpkg/pull/6952) bootstrap.sh: Retry up to 3 times for transient download errors +- [(#6960)](https://github.com/Microsoft/vcpkg/pull/6960) Use correct path separators for each platform +- [(#6968)](https://github.com/Microsoft/vcpkg/pull/6968) VS 2019 16.3 deprecates . +- [(#6987)](https://github.com/Microsoft/vcpkg/pull/6987) Bump version to 2019.06.21 +- [(#7038)](https://github.com/Microsoft/vcpkg/pull/7038) #5248 make vcpkg buildable as 'system' user +- [(#7039)](https://github.com/Microsoft/vcpkg/pull/7039) [docs]Update cmake docs +- [(#7074)](https://github.com/Microsoft/vcpkg/pull/7074) [vcpkg_configure_cmake] Add NO_CHARSET_FLAG option +- [(#7086)](https://github.com/Microsoft/vcpkg/pull/7086) [vcpkg] fail archived port install when decompression fails + +
+The following 44 ports have been added: + +| port | version | +|---|---| +|[any-lite](https://github.com/Microsoft/vcpkg/pull/6629) | 0.2.0 +|[argparse](https://github.com/Microsoft/vcpkg/pull/6866) | 2019-06-10 +|[bdwgc](https://github.com/Microsoft/vcpkg/pull/6405) | 8.0.4-1 +|[byte-lite](https://github.com/Microsoft/vcpkg/pull/6630) | 0.2.0 +|[casclib](https://github.com/Microsoft/vcpkg/pull/6744) | 1.50 +|[cjson](https://github.com/Microsoft/vcpkg/pull/6081) | 1.7.10-1 +|[cpp-httplib](https://github.com/Microsoft/vcpkg/pull/7037) | 0.2.0 +|[cppcodec](https://github.com/Microsoft/vcpkg/pull/6651) | 0.2 +|[expected-lite](https://github.com/Microsoft/vcpkg/pull/6642) | 0.3.0 +|[greatest](https://github.com/Microsoft/vcpkg/pull/6934) | 1.4.2 +|[hedley](https://github.com/Microsoft/vcpkg/pull/6776) | 2019-05-08-1 +|[immer](https://github.com/Microsoft/vcpkg/pull/6814) | 2019-06-07 +|[itpp](https://github.com/Microsoft/vcpkg/pull/6672) | 4.3.1 +|[ixwebsocket](https://github.com/Microsoft/vcpkg/pull/6835) | 4.0.3 +|[json-c](https://github.com/Microsoft/vcpkg/pull/6446) | 2019-05-31 +|[libfabric](https://github.com/Microsoft/vcpkg/pull/4740)[(#7036)](https://github.com/Microsoft/vcpkg/pull/7036) | 1.7.1-1 +|[libftdi](https://github.com/Microsoft/vcpkg/pull/6843)[(#7015)](https://github.com/Microsoft/vcpkg/pull/7015) [(#7055)](https://github.com/Microsoft/vcpkg/pull/7055) | 0.20-1 +|[libftdi1](https://github.com/Microsoft/vcpkg/pull/6843) | 1.4 +|[libpmemobj-cpp](https://github.com/Microsoft/vcpkg/pull/7020)[(#7097)](https://github.com/Microsoft/vcpkg/pull/7095) | 1.6-1 +|[libraqm](https://github.com/Microsoft/vcpkg/pull/6659) | 0.6.0 +|[libu2f-server](https://github.com/Microsoft/vcpkg/pull/6781) | 1.1.0 +|[libzen](https://github.com/Microsoft/vcpkg/pull/7004) | 0.4.37 +|[magic-enum](https://github.com/Microsoft/vcpkg/pull/6817) | 2019-06-07 +|[networkdirect-sdk](https://github.com/Microsoft/vcpkg/pull/4740) | 2.0.1 +|[observer-ptr-lite](https://github.com/Microsoft/vcpkg/pull/6652) | 0.4.0 +|[openigtlink](https://github.com/Microsoft/vcpkg/pull/6769) | 3.0 +|[optional-bare](https://github.com/Microsoft/vcpkg/pull/6654) | 1.1.0 +|[optional-lite](https://github.com/Microsoft/vcpkg/pull/6655) | 3.2.0 +|[polyclipping](https://github.com/Microsoft/vcpkg/pull/6769) | 6.4.2 +|[ppconsul](https://github.com/Microsoft/vcpkg/pull/6911)[(#6967)](https://github.com/Microsoft/vcpkg/pull/6967) | 0.3-1 +|[pprint](https://github.com/Microsoft/vcpkg/pull/6678) | 2019-06-01 +|[restclient-cpp](https://github.com/Microsoft/vcpkg/pull/6936)[(#7054)](https://github.com/Microsoft/vcpkg/pull/7054) | 0.5.1-2 +|[ring-span-lite](https://github.com/Microsoft/vcpkg/pull/6696) | 0.3.0 +|[robin-hood-hashing](https://github.com/Microsoft/vcpkg/pull/6709) | 3.2.13 +|[simde](https://github.com/Microsoft/vcpkg/pull/6777) | 2019-06-05 +|[span-lite](https://github.com/Microsoft/vcpkg/pull/6703) | 0.5.0 +|[sprout](https://github.com/Microsoft/vcpkg/pull/6997) | 2019-06-20 +|[stormlib](https://github.com/Microsoft/vcpkg/pull/6428) | 9.22 +|[string-view-lite](https://github.com/Microsoft/vcpkg/pull/6758) | 1.3.0 +|[tl-function-ref](https://github.com/Microsoft/vcpkg/pull/7028) | 1.0.0-1 +|[variant-lite](https://github.com/Microsoft/vcpkg/pull/6720) | 1.2.2 +|[wpilib](https://github.com/Microsoft/vcpkg/pull/6716)[(#7087)](https://github.com/Microsoft/vcpkg/pull/7087) | 2019.5.1 +|[zstr](https://github.com/Microsoft/vcpkg/pull/6773) | 1.0.1 +|[zydis](https://github.com/Microsoft/vcpkg/pull/6861) | 2.0.3 +
+ +
+The following 291 ports have been updated: + +- alembic `1.7.11` -> `1.7.11-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- angelscript `2.33.0` -> `2.33.0-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- angle `2019-03-13-c2ee2cc-3` -> `2019-06-13` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6892)](https://github.com/Microsoft/vcpkg/pull/6892) [angle] Update to latest master + +- arb `2.11.1-2` -> `2.16.0` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6763)](https://github.com/Microsoft/vcpkg/pull/6763) [arb]Upgrade version to 2.16.0 and fix build error. + +- armadillo `2019-04-16-f00d3225` -> `2019-04-16-3` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#7022)](https://github.com/Microsoft/vcpkg/pull/7022) [armadillo] Fix build error in Linux + +- arrow `0.13.0-3` -> `0.13.0-4` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6757)](https://github.com/Microsoft/vcpkg/pull/6757) [arrow] fix findzstd patch + +- asio `1.12.2` -> `1.12.2-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6751)](https://github.com/Microsoft/vcpkg/pull/6751) [asio] Add cmake target + - [(#7083)](https://github.com/Microsoft/vcpkg/pull/7083) [asio] fix flaky build + +- assimp `4.1.0-4` -> `4.1.0-8` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6593)](https://github.com/Microsoft/vcpkg/pull/6593) [assimp]Fix lrrXML library dependencies. + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6887)](https://github.com/Microsoft/vcpkg/pull/6887) [assimp] Fix install assimp when passing --head + +- avro-c `1.8.2-1` -> `1.8.2-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- aws-c-common `0.3.0` -> `0.3.11-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6747)](https://github.com/Microsoft/vcpkg/pull/6747) [aws-c-common]Upgrade version to 0.3.11 + +- aws-sdk-cpp `1.7.106` -> `1.7.116` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6932)](https://github.com/Microsoft/vcpkg/pull/6932) [aws-sdk-cpp]Upgrade to 1.7.116 + +- azure-c-shared-utility `2019-05-16` -> `2019-05-16.1` + - [(#6804)](https://github.com/Microsoft/vcpkg/pull/6804) [azure] Update azure-iot-sdk-c for public-preview release of 2019-05-16 + +- azure-iot-sdk-c `2019-05-16` -> `2019-05-16.1` + - [(#6804)](https://github.com/Microsoft/vcpkg/pull/6804) [azure] Update azure-iot-sdk-c for public-preview release of 2019-05-16 + +- azure-macro-utils-c `2019-05-16` -> `2019-05-16.1` + - [(#6804)](https://github.com/Microsoft/vcpkg/pull/6804) [azure] Update azure-iot-sdk-c for public-preview release of 2019-05-16 + +- azure-uamqp-c `2019-05-16` -> `2019-05-16.1` + - [(#6804)](https://github.com/Microsoft/vcpkg/pull/6804) [azure] Update azure-iot-sdk-c for public-preview release of 2019-05-16 + +- azure-uhttp-c `2019-05-16` -> `2019-05-16.1` + - [(#6804)](https://github.com/Microsoft/vcpkg/pull/6804) [azure] Update azure-iot-sdk-c for public-preview release of 2019-05-16 + +- azure-umqtt-c `2019-05-16` -> `2019-05-16.1` + - [(#6804)](https://github.com/Microsoft/vcpkg/pull/6804) [azure] Update azure-iot-sdk-c for public-preview release of 2019-05-16 + +- blosc `1.16.3` -> `1.16.3-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6928)](https://github.com/Microsoft/vcpkg/pull/6928) [blosc] Fix the bug when building release-only. + +- bond `7.0.2-2` -> `8.1.0` + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + - [(#6954)](https://github.com/Microsoft/vcpkg/pull/6954) [bond]Upgrade version to 8.1.0 and add Linux/OSX support. + +- boost-thread `1.70.0` -> `1.70.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6840)](https://github.com/Microsoft/vcpkg/pull/6840) [boost-thread] Fix old patches + +- boost-variant `1.69.0` -> `1.70.0` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#7047)](https://github.com/Microsoft/vcpkg/pull/7047) [Boost-variant] Upgrade to 1.70.0 + +- botan `2.9.0` -> `2.9.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- c-ares `2019-5-2` -> `2019-5-2-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- cairo `1.16.0` -> `1.16.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6806)](https://github.com/Microsoft/vcpkg/pull/6806) [cairo] Fix linker errors on Linux and MacOS + +- capnproto `0.7.0-1` -> `0.7.0-2` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + - [(#7024)](https://github.com/Microsoft/vcpkg/pull/7024) [capnproto] Enable Linux and OSX support + +- cartographer `1.0.0` -> `1.0.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- catch2 `2.7.2` -> `2.7.2-2` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- ccd `2.1` -> `2.1-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- celero `2.4.0-1` -> `2.5.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6845)](https://github.com/Microsoft/vcpkg/pull/6845) Celero: Update to v2.5.0 release + +- cereal `1.2.2-1` -> `1.2.2-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- ceres `1.14.0-3` -> `1.14.0-6` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- clapack `3.2.1-4` -> `3.2.1-9` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- clblas `2.12-1` -> `2.12-2` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- clfft `2.12.2` -> `2.12.2-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- cli `1.1` -> `1.1-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- clp `1.17.2` -> `1.17.2-2` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- cnl `2019-01-09` -> `2019-06-23` + - [(#7031)](https://github.com/Microsoft/vcpkg/pull/7031) [cnl] Update cnl to latest + +- coinutils `2.11.2` -> `2.11.2-2` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- collada-dom `2.5.0` -> `2.5.0-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- console-bridge `0.3.2-3` -> `0.3.2-4` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- cpp-netlib `0.13.0-final` -> `0.13.0-2` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- cppcms `1.1.0-2` -> `1.2.1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- cpr `1.3.0-6` -> `1.3.0-7` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6429)](https://github.com/Microsoft/vcpkg/pull/6429) [Curl] Upgrades 2019.05.08 + +- crc32c `1.0.7` -> `1.0.7-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- cryptopp `8.1.0` -> `8.1.0-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6821)](https://github.com/Microsoft/vcpkg/pull/6821) [cryptopp] fix build by disabling assembly on osx + +- curl `7.61.1-7` -> `7.65.0-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6429)](https://github.com/Microsoft/vcpkg/pull/6429) [Curl] Upgrades 2019.05.08 + - [(#6649)](https://github.com/Microsoft/vcpkg/pull/6649) [Curl] Fix cmake target name + - [(#6698)](https://github.com/Microsoft/vcpkg/pull/6698) [curl] Revert revert of `-imp` suffix removal. + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- cxxopts `2.1.2` -> `2.1.2-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- darknet `0.2.5-1` -> `0.2.5-4` + - [(#6787)](https://github.com/Microsoft/vcpkg/pull/6787) [darknet] update to latest release + - [(#7064)](https://github.com/Microsoft/vcpkg/pull/7064) [darknet] enable ninja + +- darts-clone `1767ab87cffe` -> `1767ab87cffe-1` + - [(#6875)](https://github.com/Microsoft/vcpkg/pull/6875) [libsodium/darts-clone] remove conflicting makefile + +- dcmtk `3.6.3-1` -> `3.6.4` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- dlib `19.17` -> `19.17-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + +- doctest `2.3.2` -> `2.3.3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6998)](https://github.com/Microsoft/vcpkg/pull/6998) [doctest] Update to 2.3.3 + +- draco `1.3.3-2` -> `1.3.5` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6796)](https://github.com/Microsoft/vcpkg/pull/6796) [draco, flatbuffers, forge] Update to new version + +- duilib `2019-4-28-1` -> `2019-4-28-2` + - [(#7074)](https://github.com/Microsoft/vcpkg/pull/7074) [vcpkg_configure_cmake] Add NO_CHARSET_FLAG option + +- ebml `1.3.8` -> `1.3.9` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6662)](https://github.com/Microsoft/vcpkg/pull/6662) [ebml, matroska] Upgrade ebml to v1.3.9 and matroska to v1.5.2 + +- eigen3 `3.3.7-1` -> `3.3.7-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- ensmallen `1.15.0` -> `1.15.1` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- entityx `1.3.0` -> `1.3.0-1` + - [(#6736)](https://github.com/Microsoft/vcpkg/pull/6736) [entityx][entt] Disable parallel configure + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- entt `3.0.0` -> `3.0.0-1` + - [(#6736)](https://github.com/Microsoft/vcpkg/pull/6736) [entityx][entt] Disable parallel configure + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- exiv2 `0.27` -> `0.27.1-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + - [(#6905)](https://github.com/Microsoft/vcpkg/pull/6905) [Exiv2] update to 0.27.1 + +- fastcdr `1.0.6-2` -> `1.0.9-1` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- fcl `0.5.0-5` -> `0.5.0-6` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- ffmpeg `4.1-5` -> `4.1-8` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6590)](https://github.com/Microsoft/vcpkg/pull/6590) ffmpeg: enable arm/arm64 windows support + - [(#6694)](https://github.com/Microsoft/vcpkg/pull/6694) [ffmpeg] Correctly set environment variables for gcc/clang/icc + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6743)](https://github.com/Microsoft/vcpkg/pull/6743) [ffmpeg] Fix regression on windows + - [(#6784)](https://github.com/Microsoft/vcpkg/pull/6784) [FFmpeg] Add 'vpx' feature. + +- fizz `2019.05.13.00` -> `2019.05.20.00-1` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6969)](https://github.com/Microsoft/vcpkg/pull/6969) [libevent] Upgrade to version 2.1.10 + +- flann `jan2019` -> `1.9.1-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6931)](https://github.com/Microsoft/vcpkg/pull/6931) [flann]Upgrade version to 1.9.1 and fix build error. + - [(#7073)](https://github.com/Microsoft/vcpkg/pull/7073) [flann] fix flaky config + +- flatbuffers `1.10.0-1` -> `1.11.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6796)](https://github.com/Microsoft/vcpkg/pull/6796) [draco, flatbuffers, forge] Update to new version + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- fmi4cpp `0.7.0` -> `0.7.0-1` + - [(#7021)](https://github.com/Microsoft/vcpkg/pull/7021) [nana, fmi4cpp] Fix Visual Studio 2019 deprecates . + +- folly `2019.05.13.00` -> `2019.05.20.00-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6974)](https://github.com/Microsoft/vcpkg/pull/6974) [Folly] define _CRT_INTERNAL_NONSTDC_NAMES to 0 to disable non-underscore posix names on windows + +- fontconfig `2.12.4-8` -> `2.12.4-9` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + +- forest `11.0.1` -> `12.0.0` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6938)](https://github.com/Microsoft/vcpkg/pull/6938) [forest] move to 12.0.0 + +- forge `1.0.3-1` -> `1.0.4-1` + - [(#6796)](https://github.com/Microsoft/vcpkg/pull/6796) [draco, flatbuffers, forge] Update to new version + +- freeimage `3.18.0-5` -> `3.18.0-6` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- freerdp `2.0.0-rc4-1` -> `2.0.0-rc4-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- freetype `2.9.1-1` -> `2.10.0` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6754)](https://github.com/Microsoft/vcpkg/pull/6754) Fix freetype cmake config files + - [(#7057)](https://github.com/Microsoft/vcpkg/pull/7057) [freetype] Upgrade to version 2.10.0 + +- freexl `1.0.4-1` -> `1.0.4-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6813)](https://github.com/Microsoft/vcpkg/pull/6813) [freexl]: Linux build support + +- ftgl `2.3.1` -> `2.4.0-1` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- g2o `20170730_git-4` -> `20170730_git-5` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- gdcm `3.0.0` -> `3.0.0-3` + - [(#6710)](https://github.com/Microsoft/vcpkg/pull/6710) [gdcm,jbig2dec] move patches from #5169 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- gdk-pixbuf `2.36.9-2` -> `2.36.9-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6663)](https://github.com/Microsoft/vcpkg/pull/6663) [gdk-pixbuf] Fix Linux compilation. + +- geogram `1.6.9-3` -> `1.6.9-6` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- geographiclib `1.47-patch1-5` -> `1.47-patch1-6` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- gherkin-c `c-libs-e63e83104b` -> `4.1.2` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- gl3w `99ed3211` -> `2018-05-31-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- glad `0.1.29` -> `0.1.30` + - [(#6819)](https://github.com/Microsoft/vcpkg/pull/6819) [glad] update to 0.1.30 + +- glbinding `3.1.0` -> `3.1.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6872)](https://github.com/Microsoft/vcpkg/pull/6872) set CMAKE_SYSTEM_PROCESSOR in Linux + - [(#6876)](https://github.com/Microsoft/vcpkg/pull/6876) [glbinding] remove conflict with other opengl ports + +- glew `2.1.0-3` -> `2.1.0-4` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6853)](https://github.com/Microsoft/vcpkg/pull/6853) [glew] Disable the link option /nodefaultlib and /noentry + +- glib `2.52.3-14-1` -> `2.52.3-14-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6663)](https://github.com/Microsoft/vcpkg/pull/6663) [gdk-pixbuf] Fix Linux compilation. + +- glibmm `2.52.1-8` -> `2.52.1-9` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6550)](https://github.com/Microsoft/vcpkg/pull/6550) [glibmm] Reintroduce CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- globjects `1.1.0-2018-09-19-1` -> `1.1.0-2` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- glog `0.4.0` -> `0.4.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- glslang `2018-03-02-2` -> `2019-03-05` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6689)](https://github.com/Microsoft/vcpkg/pull/6689) [shaderc] update + +- google-cloud-cpp `0.9.0` -> `0.10.0` + - [(#6785)](https://github.com/Microsoft/vcpkg/pull/6785) Upgrade google-cloud-cpp to 0.10.0. + +- graphicsmagick `1.3.31-1` -> `1.3.32` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6947)](https://github.com/Microsoft/vcpkg/pull/6947) Graphicsmagick 1.3.32 + +- graphite2 `1.3.12` -> `1.3.12-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- grpc `1.20.1-1` -> `1.21.1-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#5630)](https://github.com/Microsoft/vcpkg/pull/5630) [scripts] Fix vcpkg_fixup_cmake on non Windows platforms + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- gsoap `2.8.82-2` -> `2.8.84-1` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6756)](https://github.com/Microsoft/vcpkg/pull/6756) update to 2.8.84 + +- gtk `3.22.19-2` -> `3.22.19-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6671)](https://github.com/Microsoft/vcpkg/pull/6671) [pango/gtk]Fix build error C2001. + +- harfbuzz `2.4.0` -> `2.5.1-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6659)](https://github.com/Microsoft/vcpkg/pull/6659) [libraqm] Add new port (0.6.0) + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6761)](https://github.com/Microsoft/vcpkg/pull/6761) [harfbuzz]Upgrade version to 2.5.1 and fix patches. + - [(#6879)](https://github.com/Microsoft/vcpkg/pull/6879) [harfbuzz] Propagate dependency on glib downstream + +- hdf5 `1.10.5-5` -> `1.10.5-7` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6771)](https://github.com/Microsoft/vcpkg/pull/6771) [netcdf-c/hdf5] improve/correct linkage + +- hpx `1.2.1-1` -> `1.3.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6755)](https://github.com/Microsoft/vcpkg/pull/6755) Updating HPX to V1.3.0 + +- http-parser `2.9.2` -> `2.9.2-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- icu `61.1-6` -> `61.1-7` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6695)](https://github.com/Microsoft/vcpkg/pull/6695) [icu] Enable parallel builds + +- idevicerestore `1.0.12-2` -> `1.0.12-3` + - [(#6698)](https://github.com/Microsoft/vcpkg/pull/6698) [curl] Revert revert of `-imp` suffix removal. + +- imgui `1.70` -> `1.70-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- inih `43` -> `44` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- ismrmrd `1.4` -> `1.4.0-1` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- itk `4.13.0-906736bd-3` -> `5.0.0-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6767)](https://github.com/Microsoft/vcpkg/pull/6767) [itk] Upgrade to 5.0.0 + +- jansson `2.11-2` -> `2.12-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- jasper `2.0.16-1` -> `2.0.16-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- jbig2dec `0.16` -> `0.16-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6710)](https://github.com/Microsoft/vcpkg/pull/6710) [gdcm,jbig2dec] move patches from #5169 + +- json-dto `0.2.8` -> `0.2.8-2` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- json11 `2017-06-20-1` -> `2017-06-20-2` + - [(#6967)](https://github.com/Microsoft/vcpkg/pull/6967) [ppconsul] remove conflict with json11 + +- jxrlib `1.1-6` -> `1.1-7` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- kangaru `4.1.3` -> `4.1.3-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- kd-soap `1.7.0` -> `1.8.0` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6838)](https://github.com/Microsoft/vcpkg/pull/6838) [kd-soap]Upgrade version to 1.8.0 + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- lcm `1.3.95-1` -> `1.4.0` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6836)](https://github.com/Microsoft/vcpkg/pull/6836) [lcm]Upgrade version to 1.4.0 and fix build error. + +- leptonica `1.76.0` -> `1.76.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- leveldb `2017-10-25-8b1cd3753b184341e837b30383832645135d3d73-3` -> `1.22` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6900)](https://github.com/Microsoft/vcpkg/pull/6900) [leveldb] Port update + +- libbson `1.13.0` -> `1.14.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6862)](https://github.com/Microsoft/vcpkg/pull/6862) [libbson mongo-c-driver mongo-cxx-driver] upgrades to new revision + +- libcroco `0.6.13` -> `0.6.13-1` + - [(#6663)](https://github.com/Microsoft/vcpkg/pull/6663) [gdk-pixbuf] Fix Linux compilation. + +- libevent `2.1.8-5` -> `2.1.10` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6969)](https://github.com/Microsoft/vcpkg/pull/6969) [libevent] Upgrade to version 2.1.10 + +- libfreenect2 `0.2.0-1` -> `0.2.0-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- libgeotiff `1.4.2-8` -> `1.4.2-9` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6000)](https://github.com/Microsoft/vcpkg/pull/6000) [LibLZMA] automatic configuration + +- libgit2 `0.28.1` -> `0.28.2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- libharu `2017-08-15-d84867ebf9f-6` -> `2017-08-15-8` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- libics `1.6.2` -> `1.6.3` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- libideviceactivation `1.2.68` -> `1.2.68-1` + - [(#6698)](https://github.com/Microsoft/vcpkg/pull/6698) [curl] Revert revert of `-imp` suffix removal. + +- libimobiledevice `1.2.1.215-1` -> `1.2.76` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- libjpeg-turbo `2.0.1-1` -> `2.0.2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6482)](https://github.com/Microsoft/vcpkg/pull/6482) [libjpeg-turbo] Upgrades 2019.05.08 + +- liblemon `1.3.1-4` -> `2019-06-13` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6679)](https://github.com/Microsoft/vcpkg/pull/6679) [liblemon] made into a rolling-release port + +- liblsl `1.13.0-b4` -> `1.13.0-b6` + - [(#6745)](https://github.com/Microsoft/vcpkg/pull/6745) [liblsl] Update liblsl port to 1.13.0-b6 + +- liblzma `5.2.4-1` -> `5.2.4-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6000)](https://github.com/Microsoft/vcpkg/pull/6000) [LibLZMA] automatic configuration + +- libmikmod `3.3.11.1-2` -> `3.3.11.1-4` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#7035)](https://github.com/Microsoft/vcpkg/pull/7035) [libmikmod] patch cmake warning + - [(#7052)](https://github.com/Microsoft/vcpkg/pull/7052) [libmikmod] resolve ninja error (-w dupbuild=err) + +- libmodbus `3.1.4-2` -> `3.1.4-3` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- libmupdf `1.12.0-2` -> `1.15.0` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6710)](https://github.com/Microsoft/vcpkg/pull/6710) [gdcm,jbig2dec] move patches from #5169 + - [(#7046)](https://github.com/Microsoft/vcpkg/pull/7046) [libmupdf] Update the port to version 1.15.0 + +- libmysql `8.0.4-3` -> `8.0.4-4` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6442)](https://github.com/Microsoft/vcpkg/pull/6442) [libmysql]Fix build error in linux. + +- libogg `1.3.3-2` -> `1.3.3-4` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6588)](https://github.com/Microsoft/vcpkg/pull/6588) [libogg] Update to 1.3.3-3 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- libopusenc `0.1-1` -> `0.2.1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6748)](https://github.com/Microsoft/vcpkg/pull/6748) [libopusenc]Upgrade version to 0.2.1 + +- libpff `2018-07-14` -> `2018-07-14-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- libplist `2.0.1.197-2` -> `1.2.77` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- libpng `1.6.37-1` -> `1.6.37-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- libqglviewer `2.7.1-1` -> `2.7.0` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- libraw `0.19.2` -> `201903-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6742)](https://github.com/Microsoft/vcpkg/pull/6742) [libraw] Add include for select_library_configurations [(#6715)](https://github.com/Microsoft/vcpkg/pull/6715) + +- libressl `2.9.1` -> `2.9.1-2` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- libsndfile `1.0.29-6830c42-6` -> `1.0.29-8` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6896)](https://github.com/Microsoft/vcpkg/pull/6896) [sndfile/libsndfile] remove duplicate port, forward to libsndfile + +- libsodium `1.0.17-2` -> `1.0.18` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6778)](https://github.com/Microsoft/vcpkg/pull/6778) [libsodium] Update to 1.0.18 + - [(#6875)](https://github.com/Microsoft/vcpkg/pull/6875) [libsodium/darts-clone] remove conflicting makefile + +- libspatialite `4.3.0a-2` -> `4.3.0a-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6000)](https://github.com/Microsoft/vcpkg/pull/6000) [LibLZMA] automatic configuration + +- libsquish `1.15` -> `1.15-1` + - [(#6893)](https://github.com/Microsoft/vcpkg/pull/6893) [libsquish] fix flaky build + +- libtins `4.0-2` -> `4.2` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#7008)](https://github.com/Microsoft/vcpkg/pull/7008) [libtins]Upgrade version to 4.2 and adds dependent ports to new version. + +- libunibreak `4.1` -> `4.2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- libusb `1.0.22-2` -> `1.0.22-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- libusbmuxd `1.0.107-2` -> `1.2.77` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- libuv `1.29.0` -> `1.29.1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- libwebp `1.0.2-3` -> `1.0.2-6` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6648)](https://github.com/Microsoft/vcpkg/pull/6648) [libwebp]Fix static build: add dependency libraries "dxguid winmm". + +- libwebsockets `3.1.0` -> `3.1.0-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6855)](https://github.com/Microsoft/vcpkg/pull/6855) [libwebsockets] Fix build error on Linux + +- libxlsxwriter `0.8.6-1` -> `0.8.7-1` + - [(#7034)](https://github.com/Microsoft/vcpkg/pull/7034) [libxlsxwriter] upgrade to 0.8.7 + +- libxslt `1.1.29` -> `1.1.33` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#7058)](https://github.com/Microsoft/vcpkg/pull/7058) [libxslt] Update the version to 1.1.33 and change the URL. + +- libyaml `0.2.1-1` -> `0.2.2` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- llvm `7.0.0-2` -> `7.0.0-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6631)](https://github.com/Microsoft/vcpkg/pull/6631) [llvm]Fix build error on x64-windows. + +- lmdb `0.9.23` -> `0.9.23-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- log4cplus `2.0.4` -> `2.0.4-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6930)](https://github.com/Microsoft/vcpkg/pull/6930) [log4cplus]Fix lnk2019 errors when using log4cplus. + +- lz4 `1.9.1-1` -> `1.9.1-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6735)](https://github.com/Microsoft/vcpkg/pull/6735) [lz4]Fix conflict file xxhash.h + +- magnum-extras `2019.01-1` -> `2019.01-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- magnum-integration `2019.01-1` -> `2019.01-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- mathgl `2.4.3` -> `2.4.3-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- matroska `1.5.1` -> `1.5.2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6662)](https://github.com/Microsoft/vcpkg/pull/6662) [ebml, matroska] Upgrade ebml to v1.3.9 and matroska to v1.5.2 + +- miniz `2.0.8` -> `2.1.0` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- mlpack `3.1.0-1` -> `3.1.1` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6907)](https://github.com/Microsoft/vcpkg/pull/6907) [mlpack] Updated to version 3.1.1 + +- mongo-c-driver `1.13.0` -> `1.14.0-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6862)](https://github.com/Microsoft/vcpkg/pull/6862) [libbson mongo-c-driver mongo-cxx-driver] upgrades to new revision + +- mongo-cxx-driver `3.2.0-2` -> `3.4.0-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6862)](https://github.com/Microsoft/vcpkg/pull/6862) [libbson mongo-c-driver mongo-cxx-driver] upgrades to new revision + +- moos-core `10.4.0-2` -> `10.4.0-3` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- mosquitto `1.5.0-3` -> `1.6.2-2` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- ms-angle `2018-04-18-1` -> `2018-04-18-2` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- msix `MsixCoreInstaller-preview` -> `MsixCoreInstaller-preview-1` + - [(#7074)](https://github.com/Microsoft/vcpkg/pull/7074) [vcpkg_configure_cmake] Add NO_CHARSET_FLAG option + +- msmpi `10.0` -> `10.0-2` + - [(#6945)](https://github.com/Microsoft/vcpkg/pull/6945) [msmpi] Fix /MD for static libs. + +- nana `1.7.1` -> `1.7.1-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#7021)](https://github.com/Microsoft/vcpkg/pull/7021) [nana, fmi4cpp] Fix Visual Studio 2019 deprecates . + +- nanomsg `1.1.5` -> `1.1.5-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- netcdf-c `4.7.0` -> `4.7.0-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6771)](https://github.com/Microsoft/vcpkg/pull/6771) [netcdf-c/hdf5] improve/correct linkage + - [(#6865)](https://github.com/Microsoft/vcpkg/pull/6865) [netcdf-c]Fix build error on linux. + - [(#6971)](https://github.com/Microsoft/vcpkg/pull/6971) [netcdf-c] Fix link error. + +- nlopt `2.6.1` -> `2.6.1-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6739)](https://github.com/Microsoft/vcpkg/pull/6739) [protobuf] Update to 3.8.0 + +- nmslib `1.7.2-1` -> `1.7.3.6` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- nrf-ble-driver `4.1.0` -> `4.1.1` + +- nvtt `2.1.0-3` -> `2.1.1` + - [(#6765)](https://github.com/Microsoft/vcpkg/pull/6765) [nvtt]Upgrade version to 2.1.1 and fix build error on windows. + +- octomap `cefed0c1d79afafa5aeb05273cf1246b093b771c-6` -> `2017-03-11-7` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- ogre `1.11.3-4` -> `1.12.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- oniguruma `6.9.2` -> `6.9.2-2` + - [(#6958)](https://github.com/Microsoft/vcpkg/pull/6958) [vcpkg] Add vcpkg_check_features + - [(#7091)](https://github.com/Microsoft/vcpkg/pull/7091) [vcpkg] Update vcpkg_check_features document + +- openblas `0.3.6-2` -> `0.3.6-4` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- opencv `3.4.3-7` -> `3.4.3-9` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6000)](https://github.com/Microsoft/vcpkg/pull/6000) [LibLZMA] automatic configuration + - [(#6812)](https://github.com/Microsoft/vcpkg/pull/6812) [opencv] Fixed OpenCV versioning using wrong commit + - [(#6901)](https://github.com/Microsoft/vcpkg/pull/6901) [opencv]Fix build error with feature gdcm: cannot find openjp2. + +- openexr `2.3.0-3` -> `2.3.0-4` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- openmama `6.2.3` -> `6.2.3-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- openmvg `1.4-2` -> `1.4-5` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- openmvs `0.9` -> `1.0-1` + - [(#6692)](https://github.com/Microsoft/vcpkg/pull/6692) update to v1.0 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- openni2 `2.2.0.33-8` -> `2.2.0.33-9` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- openssl `0` -> `1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- opentracing `1.5.1` -> `1.5.1-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- openvdb `6.0.0-2` -> `6.1.0` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6864)](https://github.com/Microsoft/vcpkg/pull/6864) [openvdb]Upgrade version to 6.1.0, regenerate patches and fix build errors. + +- openvpn3 `2018-03-21` -> `2018-03-21-1` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- openvr `1.1.3b` -> `1.4.18` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- opusfile `0.11-2` -> `0.11-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- orc `1.5.5` -> `1.5.5-1` + - [(#6739)](https://github.com/Microsoft/vcpkg/pull/6739) [protobuf] Update to 3.8.0 + +- orocos-kdl `1.4` -> `1.4-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- osi `0.108.4` -> `0.108.4-2` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- paho-mqtt `1.2.1-1` -> `1.3.0` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6762)](https://github.com/Microsoft/vcpkg/pull/6762) [paho-mqtt] Upgrade to 1.3.0 + +- pango `1.40.11-3` -> `1.40.11-4` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6671)](https://github.com/Microsoft/vcpkg/pull/6671) [pango/gtk]Fix build error C2001. + +- pangolin `0.5-6` -> `0.5-7` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- parallel-hashmap `1.22` -> `1.23` + - [(#6917)](https://github.com/Microsoft/vcpkg/pull/6917) [parallel-hashmap] Update to current 1.23 version and include natvis file. + +- pcl `1.9.1-3` -> `1.9.1-4` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- pdal `1.7.1-4` -> `1.7.1-5` + - [(#6000)](https://github.com/Microsoft/vcpkg/pull/6000) [LibLZMA] automatic configuration + - [(#6603)](https://github.com/Microsoft/vcpkg/pull/6603) [pdal] delete and replace different find modules + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- pdcurses `3.6` -> `3.8` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- poco `2.0.0-pre-1` -> `2.0.0-pre-2` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- podofo `0.9.6-6` -> `0.9.6-7` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6000)](https://github.com/Microsoft/vcpkg/pull/6000) [LibLZMA] automatic configuration + +- proj4 `4.9.3-1` -> `4.9.3-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6000)](https://github.com/Microsoft/vcpkg/pull/6000) [LibLZMA] automatic configuration + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- prometheus-cpp `0.6.0` -> `0.7.0` + - [(#6822)](https://github.com/Microsoft/vcpkg/pull/6822) [prometheus-cpp] Update to version 0.7.0 + +- protobuf `3.7.1` -> `3.8.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6739)](https://github.com/Microsoft/vcpkg/pull/6739) [protobuf] Update to 3.8.0 + +- pugixml `1.9-1` -> `1.9-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- qca `2.2.0-4` -> `2.2.1` + - [(#6839)](https://github.com/Microsoft/vcpkg/pull/6839) [qca]Upgrade version to 2.2.1 and fix build error. + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- qt5-base `5.12.3-1` -> `5.12.3-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#7019)](https://github.com/Microsoft/vcpkg/pull/7019) [qt5-base]Add execute permission when installing executables in Linux. + +- qt5-declarative `5.12.3` -> `5.12.3-1` + - [(#6927)](https://github.com/Microsoft/vcpkg/pull/6927) [qt5-declarative]Fix error when building release-only. + +- re2 `2019-05-07` -> `2019-05-07-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- realsense2 `2.16.1-2` -> `2.22.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#5275)](https://github.com/Microsoft/vcpkg/pull/5275) [realsense2] Enable OpenNI2 driver option + - [(#5777)](https://github.com/Microsoft/vcpkg/pull/5777) [realsense2] Update to v2.19.0 + +- reproc `6.0.0` -> `6.0.0-1` + - [(#6711)](https://github.com/Microsoft/vcpkg/pull/6711) [reproc] Enabled C++ target for version 6.0.0. + +- restinio `0.4.9` -> `0.5.1-1` + - [(#6669)](https://github.com/Microsoft/vcpkg/pull/6669) RESTinio updated to v.0.4.9.1 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6749)](https://github.com/Microsoft/vcpkg/pull/6749) RESTinio updated to v.0.5.0 + - [(#6933)](https://github.com/Microsoft/vcpkg/pull/6933) RESTinio updated to v.0.5.1 + +- robin-map `0.2.0` -> `0.6.1` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- rtmidi `2.1.1-2` -> `4.0.0` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6635)](https://github.com/Microsoft/vcpkg/pull/6635) [rtmidi] Update to version 4.0.0 + +- sdl2 `2.0.9-3` -> `2.0.9-4` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- sdl2-image `2.0.4-2` -> `2.0.4-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- sdl2-mixer `2.0.4-2` -> `2.0.4-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6929)](https://github.com/Microsoft/vcpkg/pull/6929) [sdl2-mixer]Fix build error with feature opusfile. + +- sdl2-net `2.0.1-6` -> `2.0.1-7` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- sdl2-ttf `2.0.15-2` -> `2.0.15-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- selene `0.3.1` -> `0.3.1-1` + - [(#6000)](https://github.com/Microsoft/vcpkg/pull/6000) [LibLZMA] automatic configuration + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- sf2cute `0.2.0` -> `0.2.0-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- shaderc `12fb656ab20ea9aa06e7084a74e5ff832b7ce2da-2` -> `2019-06-26` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6689)](https://github.com/Microsoft/vcpkg/pull/6689) [shaderc] update + +- shiva `1.0` -> `1.0-2` + - [(#6000)](https://github.com/Microsoft/vcpkg/pull/6000) [LibLZMA] automatic configuration + - [(#6637)](https://github.com/Microsoft/vcpkg/pull/6637) [shiva] Fix build error "Could NOT find PythonInterp" + +- shogun `6.1.3-1` -> `6.1.3-3` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6739)](https://github.com/Microsoft/vcpkg/pull/6739) [protobuf] Update to 3.8.0 + - [(#6872)](https://github.com/Microsoft/vcpkg/pull/6872) set CMAKE_SYSTEM_PROCESSOR in Linux + +- sndfile `1.0.29-cebfdf2-1` -> `0` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6896)](https://github.com/Microsoft/vcpkg/pull/6896) [sndfile/libsndfile] remove duplicate port, forward to libsndfile + +- snowhouse `3.0.1` -> `3.1.0` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- so5extra `1.2.3` -> `1.2.3-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- sobjectizer `5.5.24.4` -> `5.5.24.4-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- sol2 `2.20.6` -> `3.0.2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- sophus `1.0.0-1` -> `1.0.0-6` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + +- spdlog `1.3.1` -> `1.3.1-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6924)](https://github.com/Microsoft/vcpkg/pull/6924) [spdlog]Add feature[benchmark] + +- spirv-cross `2018-08-07-1` -> `2019-05-09` + - [(#6690)](https://github.com/Microsoft/vcpkg/pull/6690) update spirv cross + +- spirv-headers `2019-03-05` -> `2019-05-05` + - [(#6689)](https://github.com/Microsoft/vcpkg/pull/6689) [shaderc] update + +- spirv-tools `2018.1-2` -> `2019.3-dev` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6689)](https://github.com/Microsoft/vcpkg/pull/6689) [shaderc] update + +- sqlite-modern-cpp `3.2-e2248fa` -> `3.2-936cd0c8` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- sqlite-orm `1.3` -> `1.3-1` + - [(#6894)](https://github.com/Microsoft/vcpkg/pull/6894) [sqlite-orm] fix tag, update hash + +- sqlite3 `3.27.2` -> `3.28.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6856)](https://github.com/Microsoft/vcpkg/pull/6856) [sqlite3]: Switch back to CMAKE_SYSTEM_NAME checks per original PR + - [(#6856)](https://github.com/Microsoft/vcpkg/pull/6856) [sqlite3]: Shared library support for Linux + - [(#6921)](https://github.com/Microsoft/vcpkg/pull/6921) [sqlite3] Update to 3.28.0 + +- sqlitecpp `2.2-2` -> `2.3.0` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- strict-variant `v0.5` -> `0.5` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- string-theory `2.1` -> `2.1-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- suitesparse `5.1.2-2` -> `5.4.0-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- systemc `2.3.3-2` -> `2.3.3-3` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- szip `2.1.1-3` -> `2.1.1-4` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- taglib `1.11.1-4` -> `1.11.1-20190531` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6851)](https://github.com/Microsoft/vcpkg/pull/6851) [taglib]Upgrade version to 1.11.1-20190531. + +- tbb `2019_U6` -> `2019_U7` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- tesseract `4.0.0-1` -> `4.0.0-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6000)](https://github.com/Microsoft/vcpkg/pull/6000) [LibLZMA] automatic configuration + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- theia `0.8` -> `0.8-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + +- thor `2.0-2` -> `2.0-3` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6953)](https://github.com/Microsoft/vcpkg/pull/6953) [thor] Fix error on Linux. + +- thrift `2019-05-07` -> `2019-05-07-2` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6872)](https://github.com/Microsoft/vcpkg/pull/6872) set CMAKE_SYSTEM_PROCESSOR in Linux + - [(#7074)](https://github.com/Microsoft/vcpkg/pull/7074) [vcpkg_configure_cmake] Add NO_CHARSET_FLAG option + +- tidy-html5 `5.6.0` -> `5.6.0-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#7074)](https://github.com/Microsoft/vcpkg/pull/7074) [vcpkg_configure_cmake] Add NO_CHARSET_FLAG option + +- tiff `4.0.10-4` -> `4.0.10-6` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6000)](https://github.com/Microsoft/vcpkg/pull/6000) [LibLZMA] automatic configuration + +- tinyexif `1.0.2-4` -> `1.0.2-5` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- tinyobjloader `1.4.1-1` -> `1.0.7-1` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- tinyxml2 `7.0.1` -> `7.0.1-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- tl-expected `0.3-1` -> `1.0.0-1` + - [(#7028)](https://github.com/Microsoft/vcpkg/pull/7028) [tl] Update tl::expected and tl::optional, add tl::function_ref + +- tl-optional `0.5-1` -> `1.0.0-1` + - [(#7028)](https://github.com/Microsoft/vcpkg/pull/7028) [tl] Update tl::expected and tl::optional, add tl::function_ref + +- tmx `1.0.0` -> `1.0.0-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- treehopper `1.11.3-2` -> `1.11.3-3` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- trompeloeil `34` -> `34-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- umock-c `2019-05-16` -> `2019-05-16.1` + - [(#6804)](https://github.com/Microsoft/vcpkg/pull/6804) [azure] Update azure-iot-sdk-c for public-preview release of 2019-05-16 + +- urdfdom `1.0.3` -> `1.0.3-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- urdfdom-headers `1.0.3` -> `1.0.4-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- usd `0.8.4` -> `0.8.4-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- uvatlas `sept2016-1` -> `apr2019` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- uvw `1.17.0_libuv-v1.29` -> `1.17.0_libuv-v1.29-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6844)](https://github.com/Microsoft/vcpkg/pull/6844) [vcpkg] Add optional 'Homepage' field to CONTROL + +- visit-struct `1.0` -> `1.0-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- vlpp `0.9.3.1-2` -> `0.10.0.0` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6793)](https://github.com/Microsoft/vcpkg/pull/6793) [vlpp] Upgrade to 0.10.0.0 + +- vtk `8.2.0-2` -> `8.2.0-4` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6782)](https://github.com/Microsoft/vcpkg/pull/6782) [vtk] fix static hdf5 linkage. + +- vxl `v1.18.0-3` -> `v1.18.0-4` + - [(#6657)](https://github.com/Microsoft/vcpkg/pull/6657) [vxl] move problematic feature to optional one + +- wangle `2019.05.13.00` -> `2019.05.20.00-1` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- wil `2019-05-08` -> `2019-06-10` + - [(#6847)](https://github.com/Microsoft/vcpkg/pull/6847) Update commit for WIL + +- wt `4.0.5` -> `4.0.5-1` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6925)](https://github.com/Microsoft/vcpkg/pull/6925) [wt] Fix XML file installation path + +- xerces-c `3.2.2-9` -> `3.2.2-10` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6970)](https://github.com/Microsoft/vcpkg/pull/6970) [xerces-c]Replace the macro DLL_EXPORT with the macro XERCES_DLL_EXPORT + +- xeus `0.19.1-1` -> `0.19.2` + - [(#6618)](https://github.com/Microsoft/vcpkg/pull/6618) [many ports] Updates 2019.05.24 + +- xsimd `7.2.3` -> `7.2.3-1` + - [(#7091)](https://github.com/Microsoft/vcpkg/pull/7091) [vcpkg] Update vcpkg_check_features document + +- xtensor `0.20.7` -> `0.20.7-1` + - [(#6958)](https://github.com/Microsoft/vcpkg/pull/6958) [vcpkg] Add vcpkg_check_features + +- xxhash `0.6.4-1` -> `0.7.0` + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports + - [(#6750)](https://github.com/Microsoft/vcpkg/pull/6750) [xxhash]Upgrade version to 0.7.0 and fix arm/uwp build errors. + +- z3 `4.8.4-1` -> `4.8.5-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6803)](https://github.com/Microsoft/vcpkg/pull/6803) [z3] bump version to 4.8.5 + +- zopfli `2019-01-19` -> `2019-01-19-1` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- zserge-webview `2019-04-27-1` -> `2019-04-27-2` + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + +- zxing-cpp `3.3.3-3` -> `3.3.3-5` + - [(#6371)](https://github.com/Microsoft/vcpkg/pull/6371) [openexr,openimageio,suitesparse,theia] updates for non-win32 + - [(#6730)](https://github.com/Microsoft/vcpkg/pull/6730) [many ports] improvements for linux/wsl + - [(#6779)](https://github.com/Microsoft/vcpkg/pull/6779) [zxing-cpp] Fixed renaming zxing` -> `zxing-cpp` + +- zziplib `0.13.69-3` -> `0.13.69-4` + - [(#7090)](https://github.com/Microsoft/vcpkg/pull/7090) [zziplib] fix flaky build + - [(#2933)](https://github.com/Microsoft/vcpkg/pull/2933) [WIP] Add a Homepage URL entry for vcpkg ports +
+ +-- vcpkg team vcpkg@microsoft.com WED, 16 Jul 2019 05:17:00 -0800 + +vcpkg (2018.11.23) +-------------- + * Add ports: + - aixlog 1.2.1 + - civetweb 1.11-1 + - cli11 1.6.1 + - cub 1.8.0 + - cutelyst2 2.5.2-1 + - easyloggingpp 9.96.5-1 + - ecsutil 1.0.1.2-1 + - fdlibm 5.3-2 + - fizz 2018.10.15.00 + - fmi4cpp 0.4.0 + - fribidi 1.0.5 + - glad 0.1.28-3 + - igloo 1.1.1 + - libtins 4.0-2 + - linalg 2.1 + - miniupnpc 2.1 + - nanovg master + - orc 1.5.2-f47e02c-2 + - pixel 0.3 + - plustache 0.4.0-1 + - prometheus-cpp 0.6.0 + - rapidcheck 2018-11-05-1 + - reproc v1.0.0 + - sdl1 1.2.15-3 + - sdl1-net 1.2.8-2 + - snowhouse 3.0.1 + - so5extra 1.2.1 + - socket-io-client 1.6.1 + - stlab 1.3.3 + - tl-optional 0.5-1 + - trompeloeil 32-1 + - vulkan 1.1.82.1 + * Update ports: + - abseil 2018-09-18-3 -> 2018-11-08 + - args 2018-06-28 -> 2018-10-25 + - asio 1.12.1 -> 1.12.1-1 + - asmjit 673dcefaa048c5f5a2bf8b85daf8f7b9978d018a -> 2018-11-08 + - assimp 4.1.0-2 -> 4.1.0-3 + - aws-sdk-cpp 1.6.12-1 -> 1.6.47 + - azure-c-shared-utility 1.1.5 -> 1.1.10-1 + - azure-iot-sdk-c 1.2.3 -> 1.2.10-1 + - azure-storage-cpp 5.1.1 -> 5.2.0 + - azure-uamqp-c 1.2.3 -> 1.2.10-1 + - azure-uhttp-c LTS_01_2018_Ref01 -> 1.1.10-1 + - azure-umqtt-c 1.1.5 -> 1.1.10-1 + - berkeleydb 4.8.30 -> 4.8.30-2 + - boost-modular-build-helper 2018-08-21 -> 2018-10-19 + - brynet 0.9.0 -> 1.0.0 + - bzip2 1.0.6-2 -> 1.0.6-3 + - c-ares cares-1_14_0 -> cares-1_15_0 + - catch2 2.4.0 -> 2.4.2 + - celero 2.3.0-1 -> 2.4.0 + - cgal 4.13-1 -> 4.13-2 + - chakracore 1.11.1-1 -> 1.11.2 + - cimg 2.3.6 -> 2.4.1 + - clara 2018-04-02 -> 2018-11-01 + - corrade 2018.04-1 -> 2018.10-1 + - cpprestsdk 2.10.6-1 -> 2.10.6-3 + - cxxopts 2.1.0-1 -> 2.1.1 + - dimcli 3.1.1-2 -> 4.0.1-1 + - directxmesh aug2018 -> oct2018 + - directxtex aug2018b -> oct2018 + - directxtk aug2018 -> oct2018b + - doctest 2.0.0 -> 2.0.1 + - double-conversion 3.1.0 -> 3.1.0-1 + - eastl 3.12.01 -> 3.12.04 + - egl-registry 2018-06-30 -> 2018-06-30-1 + - entityx 1.2.0-1 -> 1.2.0-2 + - entt 2.7.3 -> 2.7.3-1 + - exiv2 2018-09-18 -> 2018-11-08 + - exprtk 2018.09.30-9836f21 -> 2018-10-11 + - fastcdr 1.0.6-1 -> 1.0.6-2 + - fftw3 3.3.7-2 -> 3.3.8 + - flann 1.9.1-7 -> 1.9.1-8 + - fmt 5.2.0 -> 5.2.1 + - folly 2018.09.17.00 -> 2018.11.05.00 + - forest 9.0.5 -> 9.0.6 + - freeimage 3.17.0-4 -> 3.18.0-2 + - gdcm2 2.8.7 -> 2.8.8 + - glm 0.9.9.2 -> 0.9.9.3 + - google-cloud-cpp 0.1.0-1 -> 0.3.0-1 + - gtest 1.8.0-9 -> 1.8.1-1 + - gtk 3.22.19-1 -> 3.22.19-2 + - hunspell 1.6.1-2 -> 1.6.1-3 + - jsonnet 2018-09-18 -> 2018-11-01 + - libfreenect2 0.2.0 -> 0.2.0-1 + - libgd 2.2.4-3 -> 2.2.4-4 + - libgeotiff 1.4.2-4 -> 1.4.2-6 + - liblinear 2.20 -> 221 + - libpng 1.6.35 -> 1.6.35-1 + - libpq 9.6.1-4 -> 9.6.1-5 + - libusb 1.0.21-fc99620 -> 1.0.22-1 + - libuv 1.23.0 -> 1.24.0 + - libwebm 1.0.0.27-2 -> 1.0.0.27-3 + - magnum 2018.04-1 -> 2018.10-1 + - magnum-extras 2018.04-1 -> 2018.10-1 + - magnum-integration 2018.04-1 -> 2018.10-1 + - magnum-plugins 2018.04-1 -> 2018.10-1 + - matio 1.5.12 -> 1.5.13 + - metis 5.1.0-1 -> 5.1.0-2 + - minizip 1.2.11-2 -> 1.2.11-3 + - mpir 3.0.0-4 -> 3.0.0-5 + - ms-gsl 2018-09-18 -> 2018-11-08 + - nghttp2 1.33.0 -> 1.34.0 + - nlohmann-json 3.3.0 -> 3.4.0 + - nng 1.0.1 -> 1.1.0 + - nuklear 2018-09-18 -> 2018-11-01 + - openal-soft 1.19.0 -> 1.19.1 + - opencv 3.4.1 -> 3.4.3-3 + - opengl-registry 2018-06-30 -> 2018-06-30-1 + - openimageio Release-1.8.13 -> 1.8.16 + - openssl-unix 1.0.2p -> 1.0.2p-1 + - opus 1.2.1-1 -> 1.3 + - osgearth 2.9-1 -> 2.9-2 + - pcl 1.8.1-12 -> 1.9.0-1 + - pixman 0.34.0-4 -> 0.34.0-5 + - portaudio 19.0.6.00-2 -> 19.0.6.00-4 + - qhull 2015.2-2 -> 2015.2-3 + - qscintilla 2.10-4 -> 2.10-7 + - qt5 5.9.2-1 -> 5.11.2 + - qt5-3d 5.9.2-0 -> 5.11.2 + - qt5-activeqt 5.9.2-0 -> 5.11.2 + - qt5-base 5.9.2-7 -> 5.11.2-1 + - qt5-charts 5.9.2-0 -> 5.11.2 + - qt5-datavis3d 5.9.2-0 -> 5.11.2 + - qt5-declarative 5.9.2-0 -> 5.11.2 + - qt5-gamepad 5.9.2-0 -> 5.11.2 + - qt5-graphicaleffects 5.9.2-0 -> 5.11.2 + - qt5-imageformats 5.9.2-0 -> 5.11.2 + - qt5-modularscripts 4 -> 2018-11-01-1 + - qt5-multimedia 5.9.2-0 -> 5.11.2 + - qt5-networkauth 5.9.2-0 -> 5.11.2 + - qt5-quickcontrols 5.9.2-1 -> 5.11.2 + - qt5-quickcontrols2 5.9.2-1 -> 5.11.2 + - qt5-script 5.9.2 -> 5.11.2 + - qt5-scxml 5.9.2-0 -> 5.11.2 + - qt5-serialport 5.9.2-0 -> 5.11.2 + - qt5-speech 5.9.2-0 -> 5.11.2 + - qt5-svg 5.9.2-0 -> 5.11.2 + - qt5-tools 5.9.2-0 -> 5.11.2 + - qt5-virtualkeyboard 5.9.2-0 -> 5.11.2 + - qt5-websockets 5.9.2-0 -> 5.11.2 + - qt5-winextras 5.9.2-0 -> 5.11.2 + - qt5-xmlpatterns 5.9.2-0 -> 5.11.2 + - qwt 6.1.3-5 -> 6.1.3-6 + - range-v3 0.3.5 -> 0.4.0-20181122 + - rapidjson 1.1.0-1 -> 1.1.0-2 + - re2 2018-09-18 -> 2018-11-01 + - rocksdb 5.14.2 -> 5.15.10 + - rs-core-lib 2018-09-18 -> 2018-10-25 + - rttr 0.9.5-2 -> 0.9.5-3 + - scintilla 4.0.3 -> 4.1.2 + - sdl2 2.0.8-1 -> 2.0.9-1 + - sfml 2.5.0-2 -> 2.5.1 + - sobjectizer 5.5.22.1 -> 5.5.23 + - spdlog 1.0.0 -> 1.2.1 + - sqlite3 3.24.0-1 -> 3.25.2 + - suitesparse 4.5.5-4 -> 5.1.2 + - tbb 2018_U5-4 -> 2018_U6 + - thrift 2018-09-18 -> 2018-11-01 + - tiff 4.0.9-4 -> 4.0.10 + - tiny-dnn 2018-09-18 -> 2018-10-25 + - unicorn 2018-09-18 -> 2018-10-25 + - unicorn-lib 2018-09-18 -> 2018-10-25 + - uriparser 0.8.6 -> 0.9.0 + - vtk 8.1.0-1 -> 8.1.0-3 + - vxl 20180414-7a130cf-1 -> v1.18.0-2 + - wangle v2018.07.30.00-1 -> 2018.11.05.00 + - websocketpp 0.7.0-1 -> 0.8.1 + - winpcap 4.1.3-1 -> 4.1.3-2 + - xalan-c 1.11-1 -> 1.11-4 + - xerces-c 3.1.4-3 -> 3.2.2-5 + - yoga 1.9.0 -> 1.10.0 + - zeromq 2018-09-18 -> 2018-11-01 + * `vcpkg install`: Improve error messages + * `vcpkg hash`: Now also tries `shaABCsum tools`, instead of only `shasum`. Allows building in OSes like Alpine. + * `vcpkg edit`: No longer launches the editor in a clean (purged) environment. + * `vcpkg upgrade`: now tab-completed in powershell (it was missing before). + * Add new function: `vcpkg_from_git()` + * Enable Visual Studio versions greater than 15. + * Add Visual Studio Code autotection on OSX (#4589) + * Work-around hash issue caused by NuGet adding signatures to all their files. + * Improve building `vcpkg.exe` (Windows-only): + - Builds out of source + - Temporary files are removed after bootstrap + - User Property Pages are ignored (#4620) + * `vcpkg` now prints URL and filepath, when downloading a tool (#4640) + * Bump version of `cmake` to 3.12.4 + * Bump version of `git` to 2.9.1 + +-- vcpkg team FRI, 23 Nov 2018 14:30:00 -0800 + + +vcpkg (2018.10.20) +-------------- + * Add ports: + - 3fd 2.6.2 + - argtable2 2.13-1 + - asyncplusplus 1.0-1 + - bde 3.2.0.0 + - boost-hana-msvc 1.67.0-1 + - boost-yap 1.68.0 + - check 0.12.0-1 + - concurrentqueue 1.0.0-beta + - crossguid 0.2.2-2018-06-16 + - darts-clone 1767ab87cffe + - dcmtk 3.6.3 + - docopt 2018-04-16-2 + - egl-registry 2018-06-30 + - embree2 2.16.4-3 + - embree3 3.2.0-2 + - esaxx ca7cb332011ec37 + - fastfeat 391d5e9 + - fmilib 2.0.3 + - fruit 3.4.0-1 + - getopt 0 + - getopt-win32 0.1 + - gmmlib 18.3.pre2-1 + - graphqlparser v0.7.0 + - ideviceinstaller 1.1.2.23-1 + - idevicerestore 1.0.12-1 + - inih 42 + - intelrdfpmathlib 20U2 + - io2d 0.1-1 + - json11 2017-06-20 + - kangaru 4.1.2 + - kf5archive 5.50.0 + - kf5holidays 5.50.0 + - laszip 3.2.2-1 + - libdshowcapture 0.6.0 + - libideviceactivation 1.0.38-1 + - libimobiledevice 1.2.1.215-1 + - libirecovery 1.0.25-2 + - liblemon 1.3.1-2 + - libmaxminddb 1.3.2-1 + - libmodbus 3.1.4-1 + - libmorton 2018-19-07 + - libplist 2.0.1.197-2 + - libusbmuxd 1.0.107-2 + - libyaml 0.2.1-1 + - linenoise-ng 4754bee2d8eb3 + - luabridge 2.1-1 + - milerius-sfml-imgui 1.1 + - minisat-master-keying 2.2-mod-1 + - mio 2018-10-18-1 + - modp-base64 + - morton-nd 2.0.0 + - nanorange 0.0.0 + - nng 1.0.1 + - ogdf 2018-03-28-2 + - opengl-registry 2018-06-30 + - openssl-unix 1.0.2p + - openssl-uwp 1.0.2l-winrt + - openssl-windows 1.0.2p-1 + - osg-qt 3.5.7 + - parquet 1.4.0 + - pcg 0.98.1 + - pegtl 2.7.1 + - plib 1.8.5-2 + - pngwriter 0.7.0-1 + - python2 2.7.15-1 + - qt5-activeqt 5.9.2-0 + - qt5-script 5.9.2 + - readerwriterqueue 1.0.0 + - readline 0 + - readline-win32 5.0-2 + - restbed 4.16-07-28-2018 + - safeint 3.19.2 + - sais 2.4.1 + - selene 0.1.1 + - shiva 1.0 + - shiva-sfml 1.0 + - simpleini 2018-08-31-1 + - soil 2008.07.07-1 + - sol2 2.20.4 + - spaceland 7.8.2-0 + - spirv-cross 2018-08-07-1 + - tinyfiledialogs 3.3.7-1 + - tinyobjloader 1.2.0-1 + - tinyspline 0.2.0-1 + - tinyutf8 2.1.1-1 + - tl-expected 0.3-1 + - tmx 1.0.0 + - tmxparser 2.1.0-1 + - usbmuxd 1.1.1.133-1 + - usrsctp 35c1d97020a + - uvw 1.11.2 + - vtk-dicom 0.8.8-alpha-1 + - vulkan-memory-allocator 2.1.0-1 + - wangle v2018.07.30.00-1 + - woff2 1.0.2 + * Update ports: + - abseil 2018-05-01-1 -> 2018-09-18-3 + - ace 6.4.8 -> 6.5.2 + - alembic 1.7.8 -> 1.7.9 + - allegro5 5.2.3.0 -> 5.2.4.0 + - angle 2017-06-14-8d471f-4 -> 2017-06-14-8d471f-5 + - apr 1.6.3 -> 1.6.5 + - args 2018-05-17 -> 2018-06-28 + - arrow 0.6.0-1 -> 0.9.0-1 + - asio 1.12.0-2 -> 1.12.1 + - assimp 4.1.0-1 -> 4.1.0-2 + - aws-sdk-cpp 1.4.52 -> 1.6.12-1 + - azure-c-shared-utility 1.1.3 -> 1.1.5 + - azure-storage-cpp 4.0.0 -> 5.1.1 + - azure-uhttp-c 2018-02-09 -> LTS_01_2018_Ref01 + - azure-umqtt-c 1.1.3 -> 1.1.5 + - benchmark 1.4.0 -> 1.4.1 + - blaze 3.3 -> 3.4-1 + - boost 1.67.0 -> 1.68.0 + - boost-accumulators 1.67.0 -> 1.68.0 + - boost-algorithm 1.67.0 -> 1.68.0 + - boost-align 1.67.0 -> 1.68.0 + - boost-any 1.67.0 -> 1.68.0 + - boost-array 1.67.0 -> 1.68.0 + - boost-asio 1.67.0-1 -> 1.68.0-1 + - boost-assert 1.67.0 -> 1.68.0 + - boost-assign 1.67.0 -> 1.68.0 + - boost-atomic 1.67.0 -> 1.68.0 + - boost-beast 1.67.0 -> 1.68.0 + - boost-bimap 1.67.0 -> 1.68.0 + - boost-bind 1.67.0 -> 1.68.0 + - boost-build 1.67.0 -> 1.68.0 + - boost-callable-traits 1.67.0 -> 1.68.0 + - boost-chrono 1.67.0 -> 1.68.0 + - boost-circular-buffer 1.67.0 -> 1.68.0 + - boost-compatibility 1.67.0 -> 1.68.0 + - boost-compute 1.67.0 -> 1.68.0 + - boost-concept-check 1.67.0 -> 1.68.0 + - boost-config 1.67.0 -> 1.68.0 + - boost-container 1.67.0 -> 1.68.0 + - boost-container-hash 1.67.0 -> 1.68.0 + - boost-context 1.67.0 -> 1.68.0-1 + - boost-contract 1.67.0 -> 1.68.0 + - boost-conversion 1.67.0 -> 1.68.0 + - boost-convert 1.67.0 -> 1.68.0 + - boost-core 1.67.0 -> 1.68.0 + - boost-coroutine 1.67.0 -> 1.68.0 + - boost-coroutine2 1.67.0 -> 1.68.0 + - boost-crc 1.67.0 -> 1.68.0 + - boost-date-time 1.67.0 -> 1.68.0 + - boost-detail 1.67.0 -> 1.68.0 + - boost-di 1.0.1 -> 1.0.2 + - boost-disjoint-sets 1.67.0 -> 1.68.0 + - boost-dll 1.67.0 -> 1.68.0 + - boost-dynamic-bitset 1.67.0 -> 1.68.0 + - boost-endian 1.67.0 -> 1.68.0 + - boost-exception 1.67.0 -> 1.68.0 + - boost-fiber 1.67.0 -> 1.68.0 + - boost-filesystem 1.67.0 -> 1.68.0 + - boost-flyweight 1.67.0 -> 1.68.0 + - boost-foreach 1.67.0 -> 1.68.0 + - boost-format 1.67.0 -> 1.68.0 + - boost-function 1.67.0 -> 1.68.0 + - boost-function-types 1.67.0 -> 1.68.0 + - boost-functional 1.67.0 -> 1.68.0 + - boost-fusion 1.67.0 -> 1.68.0 + - boost-geometry 1.67.0 -> 1.68.0 + - boost-gil 1.67.0 -> 1.68.0 + - boost-graph 1.67.0 -> 1.68.0 + - boost-graph-parallel 1.67.0 -> 1.68.0 + - boost-hana 1.67.0 -> 1.68.0-1 + - boost-heap 1.67.0 -> 1.68.0 + - boost-hof 1.67.0 -> 1.68.0 + - boost-icl 1.67.0 -> 1.68.0 + - boost-integer 1.67.0 -> 1.68.0 + - boost-interprocess 1.67.0 -> 1.68.0 + - boost-interval 1.67.0 -> 1.68.0 + - boost-intrusive 1.67.0 -> 1.68.0 + - boost-io 1.67.0 -> 1.68.0 + - boost-iostreams 1.67.0 -> 1.68.0 + - boost-iterator 1.67.0 -> 1.68.0 + - boost-lambda 1.67.0 -> 1.68.0 + - boost-lexical-cast 1.67.0 -> 1.68.0 + - boost-local-function 1.67.0 -> 1.68.0 + - boost-locale 1.67.0 -> 1.68.0 + - boost-lockfree 1.67.0 -> 1.68.0-1 + - boost-log 1.67.0 -> 1.68.0 + - boost-logic 1.67.0 -> 1.68.0 + - boost-math 1.67.0 -> 1.68.0 + - boost-metaparse 1.67.0 -> 1.68.0 + - boost-modular-build-helper 2018-05-14 -> 2018-08-21 + - boost-move 1.67.0 -> 1.68.0 + - boost-mp11 1.67.0 -> 1.68.0 + - boost-mpi 1.67.0-1 -> 1.68.0-1 + - boost-mpl 1.67.0 -> 1.68.0 + - boost-msm 1.67.0 -> 1.68.0 + - boost-multi-array 1.67.0 -> 1.68.0 + - boost-multi-index 1.67.0 -> 1.68.0 + - boost-multiprecision 1.67.0 -> 1.68.0 + - boost-numeric-conversion 1.67.0 -> 1.68.0 + - boost-odeint 1.67.0 -> 1.68.0 + - boost-optional 1.67.0 -> 1.68.0 + - boost-parameter 1.67.0 -> 1.68.0 + - boost-phoenix 1.67.0 -> 1.68.0 + - boost-poly-collection 1.67.0 -> 1.68.0 + - boost-polygon 1.67.0 -> 1.68.0 + - boost-pool 1.67.0 -> 1.68.0 + - boost-predef 1.67.0 -> 1.68.0 + - boost-preprocessor 1.67.0 -> 1.68.0 + - boost-process 1.67.0 -> 1.68.0 + - boost-program-options 1.67.0 -> 1.68.0 + - boost-property-map 1.67.0 -> 1.68.0 + - boost-property-tree 1.67.0 -> 1.68.0 + - boost-proto 1.67.0 -> 1.68.0 + - boost-ptr-container 1.67.0 -> 1.68.0 + - boost-python 1.67.0-1 -> 1.68.0-2 + - boost-qvm 1.67.0 -> 1.68.0 + - boost-random 1.67.0 -> 1.68.0 + - boost-range 1.67.0 -> 1.68.0 + - boost-ratio 1.67.0 -> 1.68.0 + - boost-rational 1.67.0 -> 1.68.0 + - boost-regex 1.67.0 -> 1.68.0 + - boost-scope-exit 1.67.0 -> 1.68.0 + - boost-serialization 1.67.0 -> 1.68.0 + - boost-signals 1.67.0 -> 1.68.0 + - boost-signals2 1.67.0 -> 1.68.0 + - boost-smart-ptr 1.67.0 -> 1.68.0 + - boost-sort 1.67.0 -> 1.68.0 + - boost-spirit 1.67.0 -> 1.68.0 + - boost-stacktrace 1.67.0 -> 1.68.0 + - boost-statechart 1.67.0 -> 1.68.0 + - boost-static-assert 1.67.0 -> 1.68.0 + - boost-system 1.67.0 -> 1.68.0 + - boost-test 1.67.0-2 -> 1.68.0-2 + - boost-thread 1.67.0 -> 1.68.0 + - boost-throw-exception 1.67.0 -> 1.68.0 + - boost-timer 1.67.0 -> 1.68.0 + - boost-tokenizer 1.67.0 -> 1.68.0 + - boost-tti 1.67.0 -> 1.68.0 + - boost-tuple 1.67.0 -> 1.68.0 + - boost-type-erasure 1.67.0 -> 1.68.0 + - boost-type-index 1.67.0 -> 1.68.0 + - boost-type-traits 1.67.0 -> 1.68.0 + - boost-typeof 1.67.0 -> 1.68.0 + - boost-ublas 1.67.0 -> 1.68.0 + - boost-units 1.67.0 -> 1.68.0 + - boost-unordered 1.67.0 -> 1.68.0 + - boost-utility 1.67.0 -> 1.68.0 + - boost-uuid 1.67.0 -> 1.68.0 + - boost-variant 1.67.0 -> 1.68.0 + - boost-vmd 1.67.0 -> 1.68.0 + - boost-wave 1.67.0 -> 1.68.0 + - boost-winapi 1.67.0 -> 1.68.0 + - boost-xpressive 1.67.0 -> 1.68.0 + - botan 2.0.1 -> 2.8.0 + - breakpad 2018-04-17 -> 2018-09-18 + - brotli 1.0.2-3 -> 1.0.2-4 + - cairo 1.15.8-1 -> 1.15.8-3 + - cartographer 0.3.0-4 -> 0.3.0-5 + - catch2 2.2.2 -> 2.4.0 + - celero 2.1.0-2 -> 2.3.0-1 + - cgal 4.12 -> 4.13-1 + - chaiscript 6.0.0 -> 6.1.0 + - chakracore 1.8.4 -> 1.11.1-1 + - cimg 2.2.3 -> 2.3.6 + - clockutils 1.1.1-3651f232c27074c4ceead169e223edf5f00247c5-1 -> 1.1.1-3651f232c27074c4ceead169e223edf5f00247c5-2 + - cmark 0.28.3-1 -> 0.28.3-2 + - coolprop 6.1.0-3 -> 6.1.0-4 + - cpprestsdk 2.10.2-1 -> 2.10.6-1 + - crc32c 1.0.5 -> 1.0.5-1 + - cryptopp 6.1.0-2 -> 7.0.0 + - curl 7.60.0 -> 7.61.1-1 + - cxxopts 1.3.0 -> 2.1.0-1 + - dimcli 3.1.1-1 -> 3.1.1-2 + - directxmesh may2018 -> aug2018 + - directxtex may2018 -> aug2018b + - directxtk may2018 -> aug2018 + - discord-rpc 3.3.0 -> 3.3.0-1 + - dlib 19.10-1 -> 19.16 + - doctest 1.2.9 -> 2.0.0 + - double-conversion 3.0.0-2 -> 3.1.0 + - draco 1.2.5 -> 1.3.3 + - eastl 3.09.00 -> 3.12.01 + - ecm 5.40.0 -> 5.50.0 + - eigen3 3.3.4-2 -> 3.3.5 + - entt 2.5.0 -> 2.7.3 + - exiv2 2018-05-17 -> 2018-09-18 + - expat 2.2.5 -> 2.2.6 + - exprtk 2018.04.30-46877b6 -> 2018.09.30-9836f21 + - fastrtps 1.5.0 -> 1.5.0-1 + - fdk-aac 2018-05-17 -> 2018-07-08 + - flatbuffers 1.8.0-2 -> 1.9.0-2 + - fmt 4.1.0 -> 5.2.0 + - folly 2018.05.14.00 -> 2018.09.17.00 + - fontconfig 2.12.4-1 -> 2.12.4-7 + - forest 7.0.7 -> 9.0.5 + - freeglut 3.0.0-4 -> 3.0.0-5 + - freetype-gl 2018-02-25 -> 2018-09-18 + - gdal 2.3.0-1 -> 2.3.2 + - gdcm2 2.8.6 -> 2.8.7 + - geogram 1.6.0-1 -> 1.6.4 + - geos 3.6.2-3 -> 3.6.3-2 + - glbinding 2.1.1-3 -> 3.0.2-3 + - glfw3 3.2.1-2 -> 3.2.1-3 + - glib 2.52.3-9 -> 2.52.3-11 + - glm 0.9.8.5-1 -> 0.9.9.2 + - globjects 1.0.0-1 -> 1.1.0-2018-09-19 + - glslang 2018-03-02 -> 2018-03-02-1 + - google-cloud-cpp 0.1.0 -> 0.1.0-1 + - graphicsmagick 1.3.28 -> 1.3.30-1 + - graphite2 1.3.10 -> 1.3.12 + - grpc 1.10.1-2 -> 1.14.1 + - gtest 1.8.0-8 -> 1.8.0-9 + - guetzli 2017-09-02-cb5e4a86f69628-1 -> 2018-07-30 + - gumbo 0.10.1-1 -> 0.10.1-2 + - harfbuzz 1.7.6-1 -> 1.8.4-2 + - http-parser 2.7.1-3 -> 2.8.1 + - hwloc 1.11.7-2 -> 1.11.7-3 + - icu 61.1-1 -> 61.1-4 + - imgui 1.60 -> 1.65 + - json-dto 0.2.5 -> 0.2.6 + - jsonnet 2018-05-17 -> 2018-09-18 + - kf5plotting 5.37.0 -> 5.50.0 + - lcms 2.8-4 -> 2.8-5 + - leptonica 1.74.4-3 -> 1.76.0 + - libarchive 3.3.2-1 -> 3.3.3-2 + - libflac 1.3.2-5 -> 1.3.2-6 + - libgeotiff 1.4.2-3 -> 1.4.2-4 + - libgit2 0.26.0 -> 0.27.4-2 + - libgo 2.7 -> 2.8-2 + - liblzma 5.2.3-2 -> 5.2.4 + - libmariadb 3.0.2 -> 3.0.2-1 + - libmysql 8.0.4-2 -> 8.0.4-3 + - libodb 2.4.0-2 -> 2.4.0-3 + - libodb-mysql 2.4.0-1 -> 2.4.0-2 + - libp7-baical 4.4-2 -> 4.4-3 + - libpng 1.6.34-3 -> 1.6.35 + - libpqxx 6.0.0 -> 6.0.0-1 + - libraw 0.18.2-5 -> 0.19.0-1 + - libsndfile 1.0.29-6830c42-3 -> 1.0.29-6830c42-5 + - libssh 0.7.5-4 -> 0.7.6 + - libssh2 1.8.0-3 -> 1.8.0-4 + - libuv 1.20.3-2 -> 1.23.0 + - libvorbis 1.3.5-143caf4-3 -> 1.3.6-112d3bd-1 + - libwebsockets 3.0.0 -> 3.0.1 + - libzip rel-1-5-1 -> rel-1-5-1-vcpkg1 + - live555 2018.02.28 -> latest + - llvm 6.0.0-1 -> 7.0.0 + - log4cplus REL_2_0_0-RC2 -> REL_2_0_1 + - luasocket 2018-02-25 -> 2018-09-18 + - lz4 1.8.2 -> 1.8.3 + - mbedtls 2.6.1 -> 2.13.1 + - mongo-cxx-driver 3.1.1-2 -> 3.1.1-3 + - monkeys-audio 4.3.3 -> 4.3.3-1 + - mosquitto 1.4.15 -> 1.5.0 + - ms-gsl 2018-05-17 -> 2018-09-18 + - mujs 2018-05-17 -> 2018-07-30 + - nana 1.5.5 -> 1.6.2 + - nanodbc 2.12.4-1 -> 2.12.4-2 + - nanomsg 1.1.2 -> 1.1.4 + - nghttp2 1.30.0-1 -> 1.33.0 + - nlohmann-json 3.1.2 -> 3.3.0 + - nlopt 2.4.2-c43afa08d~vcpkg1-1 -> 2.4.2-1226c127 + - nuklear 2018-05-17 -> 2018-09-18 + - octomap cefed0c1d79afafa5aeb05273cf1246b093b771c-2 -> cefed0c1d79afafa5aeb05273cf1246b093b771c-3 + - openal-soft 1.18.2-2 -> 1.19.0 + - openimageio Release-1.9.2dev -> Release-1.8.13 + - openmama 6.2.1-a5a93a24d2f89a0def0145552c8cd4a53c69e2de -> 6.2.2 + - openmesh 6.3 -> 7.0 + - openssl 1.0.2o-2 -> 0 + - openvr 1.0.15 -> 1.0.16 + - opusfile 0.9-1 -> 0.11-1 + - osg 3.5.6-2 -> 3.6.2 + - osgearth 2.9 -> 2.9-1 + - paho-mqtt 1.2.0-3 -> 1.2.1 + - parson 2018-05-17 -> 2018-09-18 + - pcl 1.8.1-10 -> 1.8.1-12 + - pdal 1.7.1-2 -> 1.7.1-3 + - pdcurses 3.4-1 -> 3.6 + - picosha2 2018-02-25 -> 2018-07-30 + - pixman 0.34.0-2 -> 0.34.0-4 + - plibsys 0.0.3-1 -> 0.0.4-1 + - pmdk 1.4-2 -> 1.4.2 + - poco 1.9.0 -> 1.9.0-1 + - podofo 0.9.5-2 -> 0.9.6 + - protobuf 3.5.1-4 -> 3.6.1-4 + - pybind11 2.2.1 -> 2.2.3-1 + - python3 3.6.4-1 -> 3.6.4-2 + - qpid-proton 0.18.1 -> 0.24.0 + - qt5-base 5.9.2-6 -> 5.9.2-7 + - qt5-modularscripts 3 -> 4 + - re2 2018-05-17 -> 2018-09-18 + - realsense2 2.10.4 -> 2.16.1 + - restinio 0.4.5.1 -> 0.4.8 + - rocksdb 5.13.1 -> 5.14.2 + - rs-core-lib 2018-05-17 -> 2018-09-18 + - sciter 4.1.7 -> 4.2.2 + - sdl2-image 2.0.2-1 -> 2.0.2-3 + - sfgui 0.3.2-1 -> 0.3.2-2 + - sfml 2.4.2-3 -> 2.5.0-2 + - shaderc 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da-1 -> 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da-2 + - signalrclient 1.0.0-beta1-3 -> 1.0.0-beta1-4 + - sobjectizer 5.5.22 -> 5.5.22.1 + - soci 2016.10.22-1 -> 3.2.3-1 + - spdlog 0.16.3 -> 1.0.0 + - sqlite-modern-cpp 3.2 -> 3.2-e2248fa + - sqlite-orm 1.1 -> 1.2 + - sqlite3 3.23.1-1 -> 3.24.0-1 + - string-theory 1.7 -> 2.1 + - strtk 2018.05.07-48c9554 -> 2018.09.30-b887974 + - sundials 2.7.0-1 -> 3.1.1 + - tbb 2018_U3 -> 2018_U5-4 + - tesseract 3.05.01-3 -> 3.05.02 + - thor 2.0-1 -> 2.0-2 + - thrift 2018-05-17 -> 2018-09-18 + - tiff 4.0.9 -> 4.0.9-4 + - tiny-dnn 2018-03-13 -> 2018-09-18 + - torch-th 20180131-89ede3ba90c906a8ec6b9a0f4bef188ba5bb2fd8-2 -> 2018-07-03 + - unicorn 2018-05-17 -> 2018-09-18 + - unicorn-lib 2018-05-17 -> 2018-09-18 + - uriparser 0.8.5 -> 0.8.6 + - wt 4.0.3 -> 4.0.4 + - x264 152-e9a5903edf8ca59-1 -> 157-303c484ec828ed0 + - xlnt 1.2.0-1 -> 1.3.0-1 + - yaml-cpp 0.6.2 -> 0.6.2-2 + - yara e3439e4ead4ed5d3b75a0b46eaf15ddda2110bb9 -> e3439e4ead4ed5d3b75a0b46eaf15ddda2110bb9-1 + - yoga 1.8.0-1 -> 1.9.0 + - zeromq 2018-05-17 -> 2018-09-18 + * Change version format of the `vcpkg` tool to a date + * Improve handling of ctrl-c inside `install` or `build` + * Improvements in `vcpkg edit`: + - Fix console blocking when using VSCode and no other instance of VSCode is running + - `--all` option now opens package folders + - Now checks the default user-wide installation dir of VSCode (in addition to system-wide) + * `vcpkg env`: add argument to execute a command in the environment of the selected triplet + - e.g. `vcpkg env --triplet x64-windows "cl.exe"` + * Survey message changes: + - Survey message may pop-up only in `install`, `remove`, `export`, `update`. This prevents issues with parsing the output of other more script-oriented commands + - Adjust the survey frequency to 6 months, with an additional once after 10 days of use + - Improve metrics performance on Windows + * Fix OSX build for old gcc versions + * Fix handling of symlink when installing or removing a library + * Use -fPIC in all builds to enable mixing static libs with shared objects. + * Move graph options to `vcpkg depend-info` (from `vcpkg search`) + * Add `vcpkg_from_gitlab` function + * Documentation improvements in various `vcpkg_*` cmake functions + +-- vcpkg team SAT, 20 Oct 2018 17:00:00 -0800 + + +vcpkg (0.0.113) +-------------- + * Add ports: + - json-dto 0.2.5 + - keystone 0.9.1 + - osgearth 2.9 + - pdal 1.7.1-2 + - sdl2pp 0.16.0-1 + * Update ports: + - args 2018-02-23 -> 2018-05-17 + - aws-sdk-cpp 1.4.40 -> 1.4.52 + - chakracore 1.8.3 -> 1.8.4 + - cimg 2.2.2 -> 2.2.3 + - curl 7_59_0-2 -> 7.60.0 + - directxmesh apr2018 -> may2018 + - directxtex apr2018 -> may2018 + - directxtk apr2018 -> may2018 + - doctest 1.2.8 -> 1.2.9 + - entt 2.4.2-1 -> 2.5.0 + - exiv2 2018-04-25 -> 2018-05-17 + - fdk-aac 2018-03-07 -> 2018-05-17 + - forest 7.0.6 -> 7.0.7 + - gdal 2.2.2-1 -> 2.3.0-1 + - grpc 1.10.1-1 -> 1.10.1-2 + - jsonnet 2018-05-01 -> 2018-05-17 + - libuv 1.20.2 -> 1.20.3-2 + - libwebsockets 2.4.2 -> 3.0.0 + - lodepng 2018-02-25 -> 2018-05-17 + - mpg123 1.25.8-4 -> 1.25.8-5 + - ms-gsl 2018-05-01 -> 2018-05-17 + - mujs 2018-05-01 -> 2018-05-17 + - nuklear 2018-04-25 -> 2018-05-17 + - opus 1.2.1 -> 1.2.1-1 + - parson 2018-04-17 -> 2018-05-17 + - pmdk 1.4-1 -> 1.4-2 + - podofo 0.9.5-1 -> 0.9.5-2 + - re2 2018-05-01 -> 2018-05-17 + - rocksdb 5.12.4 -> 5.13.1 + - rs-core-lib 2018-05-01 -> 2018-05-17 + - sdl2-mixer 2.0.2-2 -> 2.0.2-4 + - thrift 2018-05-01 -> 2018-05-17 + - unicorn 2018-04-25 -> 2018-05-17 + - unicorn-lib 2018-05-01 -> 2018-05-17 + - uwebsockets 0.14.8-1 -> 0.14.8-2 + - wtl 10.0 -> 10.0-1 + - zeromq 2018-05-01 -> 2018-05-17 + * `vcpkg` no longer calls `powershell` from `cmake`. + - This completes the fix for the issue where `vcpkg.exe` would change the console's font when invoking `powershell`. + - `Powershell` is no longer called other than for bootstrap and powershell integration for tab-completion. + +-- vcpkg team SAT, 16 May 2018 19:30:00 -0800 + + +vcpkg (0.0.112) +-------------- + * Add ports: + - robin-map 0.2.0 + * Update ports: + - abseil 2018-04-25-1 -> 2018-05-01-1 + - ace 6.4.7 -> 6.4.8 + - aws-sdk-cpp 1.4.38 -> 1.4.40 + - azure-storage-cpp 3.2.1 -> 4.0.0 + - blosc 1.13.5 -> 1.13.5-1 + - boost-modular-build-helper 2018-04-16-4 -> 2018-05-14 + - brotli 1.0.2-2 -> 1.0.2-3 + - catch-classic 1.12.1 -> 1.12.2 + - folly 2018.04.23.00 -> 2018.05.14.00 + - jsonnet 2018-04-25 -> 2018-05-01 + - ms-gsl 2018-04-25 -> 2018-05-01 + - mujs 25821e6d74fab5fcc200fe5e818362e03e114428 -> 2018-05-01 + - openimageio 1.8.10 -> Release-1.9.2dev + - openvr 1.0.14 -> 1.0.15 + - protobuf 3.5.1-3 -> 3.5.1-4 + - re2 2018-03-17 -> 2018-05-01 + - rs-core-lib 2018-04-25 -> 2018-05-01 + - sol 2.20.0 -> 2.20.0-1 + - thrift 2018-04-25 -> 2018-05-01 + - unicorn-lib 2018-04-09 -> 2018-05-01 + - zeromq 2018-04-25 -> 2018-05-01 + * `vcpkg` no longer calls powershell for downloading/extracting and detecting Visual Studio. + - This also fixes an issue where `vcpkg.exe` would change the console's font when invoking `powershell`. + +-- vcpkg team WED, 16 May 2018 19:00:00 -0800 + + +vcpkg (0.0.111) +-------------- + * Add ports: + - cmark 0.28.3-1 + - inja 1.0.0 + - libgo 2.7 + - range-v3-vs2015 20151130-vcpkg5 + - restinio 0.4.5.1 + - treehopper 1.11.3-1 + - yajl 2.1.0-1 + - yato 1.0-1 + * Update ports: + - abseil 2018-04-12 -> 2018-04-25-1 + - alembic 1.7.7 -> 1.7.8 + - aws-sdk-cpp 1.4.33 -> 1.4.38 + - bigint 2010.04.30-1 -> 2010.04.30-2 + - box2d 2.3.1-374664b -> 2.3.1-374664b-1 + - brotli 1.0.2-1 -> 1.0.2-2 + - cgal 4.11.1 -> 4.12 + - corrade 2018.02-1 -> 2018.04-1 + - directxmesh feb2018-eb751e0b631b05aa25c36c08e7d6bbf09f5e94a9 -> apr2018 + - directxtex feb2018b -> apr2018 + - directxtk feb2018 -> apr2018 + - discord-rpc 3.2.0 -> 3.3.0 + - exiv2 2018-04-12 -> 2018-04-25 + - exprtk 2018.01.01-f32d2b4 -> 2018.04.30-46877b6 + - folly 2018.04.16.00 -> 2018.04.23.00 + - freeglut 3.0.0-3 -> 3.0.0-4 + - gainput 1.0.0 -> 1.0.0-1 + - geos 3.6.2-2 -> 3.6.2-3 + - http-parser 2.7.1-2 -> 2.7.1-3 + - imgui 1.53 -> 1.60 + - ismrmrd 1.3.2-1 -> 1.3.2-2 + - jsonnet 2018-04-17 -> 2018-04-25 + - leveldb 2017-10-25-8b1cd3753b184341e837b30383832645135d3d73-1 -> 2017-10-25-8b1cd3753b184341e837b30383832645135d3d73-2 + - libflac 1.3.2-4 -> 1.3.2-5 + - libqrencode 4.0.0-1 -> 4.0.0-2 + - libuv 1.20.0 -> 1.20.2 + - libxmlpp 2.40.1-1 -> 2.40.1-2 + - llvm 6.0.0 -> 6.0.0-1 + - magnum 2018.02-2 -> 2018.04-1 + - magnum-extras 2018.02-2 -> 2018.04-1 + - magnum-integration 2018.02-1 -> 2018.04-1 + - magnum-plugins 2018.02-2 -> 2018.04-1 + - ms-gsl 2018-03-17 -> 2018-04-25 + - nuklear 2018-04-17 -> 2018-04-25 + - openal-soft 1.18.2-1 -> 1.18.2-2 + - physfs 2.0.3-2 -> 3.0.1 + - poco 1.8.1-1 -> 1.9.0 + - python3 3.6.4 -> 3.6.4-1 + - quirc 1.0-1 -> 1.0-2 + - range-v3 20151130-vcpkg5 -> 0.3.5 + - rapidjson 1.1.0 -> 1.1.0-1 + - realsense2 2.10.1-1 -> 2.10.4 + - rhash 1.3.5-1 -> 1.3.6 + - rocksdb 5.12.2 -> 5.12.4 + - rs-core-lib 2018-04-12 -> 2018-04-25 + - sciter 4.1.5 -> 4.1.7 + - sfml 2.4.2-2 -> 2.4.2-3 + - sobjectizer 5.5.21 -> 5.5.22 + - sol 2.19.5 -> 2.20.0 + - sqlite3 3.23.0 -> 3.23.1-1 + - strtk 2018.01.01-5579ed1 -> 2018.05.07-48c9554 + - thrift 2018-04-17 -> 2018-04-25 + - unicorn 2018-03-20 -> 2018-04-25 + - uwebsockets 0.14.7-1 -> 0.14.8-1 + - vlpp 0.9.3.1 -> 0.9.3.1-1 + - zeromq 2018-04-17 -> 2018-04-25 + - zstd 1.3.3 -> 1.3.4 + * Add clean patching for vcpkg_from_github() + - `vcpkg_from_github()` now takes a PATCHES argument (see the azure-storage-cpp [portfile](ports\azure-storage-cpp\portfile.cmake) as an example) + - A unique directory name is derived from the source hash and the patch hashes + - Modifying the patches would previously cause the new patches to fail to apply if sources with a previous version of the patches were present in the buildtrees. This is no longer the case. + * Fix various cross-platform issues + +-- vcpkg team FRI, 11 May 2018 21:45:00 -0800 + + +vcpkg (0.0.110) +-------------- + * `vcpkg` is now available for Linux and MacOS. More information [here](https://blogs.msdn.microsoft.com/vcblog/2018/04/24/announcing-a-single-c-library-manager-for-linux-macos-and-windows-vcpkg/). + +-- vcpkg team TUE, 24 Apr 2018 10:30:00 -0800 + + +vcpkg (0.0.109) +-------------- + * Add ports: + - boost-container-hash 1.67.0 + - boost-contract 1.67.0 + - boost-hof 1.67.0 + - fastrtps 1.5.0 + - fluidsynth 1.1.10 + - liblinear 2.20 + - libxmlpp 2.40.1-1 + - utf8h 841cb2deb8eb806e73fff0e1f43a11fca4f5da45 + - vxl 20180414-7a130cf-1 + * Update ports: + - abseil 2018-04-05 -> 2018-04-12 + - aws-sdk-cpp 1.4.30-1 -> 1.4.33 + - azure-c-shared-utility 1.1.2 -> 1.1.3 + - azure-iot-sdk-c 1.2.2 -> 1.2.3 + - azure-uamqp-c 1.2.2 -> 1.2.3 + - azure-umqtt-c 1.1.2 -> 1.1.3 + - benchmark 1.3.0-1 -> 1.4.0 + - boost 1.66.0 -> 1.67.0 + - boost-* 1.66.0 -> 1.67.0 + - breakpad 2018-04-05 -> 2018-04-17 + - cartographer 0.3.0-3 -> 0.3.0-4 + - catch2 2.2.1-1 -> 2.2.2 + - celero 2.1.0-1 -> 2.1.0-2 + - chakracore 1.8.2 -> 1.8.3 + - cimg 221 -> 2.2.2 + - cppzmq 4.2.2 -> 4.2.2-1 + - date 2.4 -> 2.4.1 + - directxmesh feb2018 -> feb2018-eb751e0b631b05aa25c36c08e7d6bbf09f5e94a9 + - exiv2 2018-04-05 -> 2018-04-12 + - folly 2018.03.19.00-2 -> 2018.04.16.00 + - forest 7.0.1 -> 7.0.6 + - gettext 0.19-2 -> 0.19-4 + - glib 2.52.3-2 -> 2.52.3-9 + - glibmm 2.52.1 -> 2.52.1-7 + - graphicsmagick 1.3.26-2 -> 1.3.28 + - grpc 1.10.1 -> 1.10.1-1 + - icu 59.1-1 -> 61.1-1 + - jsonnet 2018-03-17 -> 2018-04-17 + - libiconv 1.15-3 -> 1.15-4 + - libsigcpp 2.10 -> 2.10-1 + - libtorrent 1.1.6 -> 1.1.6-1 + - libuuid 1.0.3 -> 1.0.3-1 + - libzip rel-1-5-0 -> rel-1-5-1 + - llvm 5.0.1 -> 6.0.0 + - magnum 2018.02-1 -> 2018.02-2 + - magnum-plugins 2018.02-1 -> 2018.02-2 + - nuklear 2018-04-05 -> 2018-04-17 + - openssl 1.0.2o-1 -> 1.0.2o-2 + - openvr 1.0.13 -> 1.0.14 + - parson 2018-03-23 -> 2018-04-17 + - protobuf 3.5.1-1 -> 3.5.1-3 + - pugixml 1.8.1-3 -> 1.9-1 + - realsense2 2.10.1 -> 2.10.1-1 + - rs-core-lib 2018-04-05 -> 2018-04-12 + - sol 2.18.7 -> 2.19.5 + - sqlite3 3.21.0-1 -> 3.23.0 + - thrift 2018-04-05 -> 2018-04-17 + - tinyxml2 6.0.0-2 -> 6.2.0 + - unicorn-lib 2018-03-13 -> 2018-04-09 + - uwebsockets 0.14.6-1 -> 0.14.7-1 + - wt 4.0.2 -> 4.0.3 + - x264 152-e9a5903edf8ca59 -> 152-e9a5903edf8ca59-1 + - yoga 1.7.0-1 -> 1.8.0-1 + - zeromq 2018-04-05 -> 2018-04-17 + * Bump required version & auto-downloaded version of `nuget` to 4.6.2 + * Bump required version & auto-downloaded version of `vswhere` to 2.4.1 + * `vcpkg edit` improvements + - '--all' now will open both the buildtrees dir and the package dir + - Allow multiple ports to be specified as arguments + +-- vcpkg team MON, 23 Apr 2018 19:00:00 -0800 + + +vcpkg (0.0.108) +-------------- + * Add ports: + - google-cloud-cpp 0.1.0 + - mhook 2.5.1-1 + - mosquitto 1.4.15 + - pmdk 1.4-1 (renamed from nvml) + * Remove Ports: + - nvml 1.3-0 (renamed to pmdk) + * Update ports: + - abseil 2018-03-23 -> 2018-04-05 + - asio 1.12.0-1 -> 1.12.0-2 + - aws-sdk-cpp 1.4.21 -> 1.4.30-1 + - azure-c-shared-utility 1.0.0-pre-release-1.0.9 -> 1.1.2 + - azure-iot-sdk-c 1.0.0-pre-release-1.0.9 -> 1.2.2 + - azure-uamqp-c 1.0.0-pre-release-1.0.9 -> 1.2.2 + - azure-umqtt-c 1.0.0-pre-release-1.0.9 -> 1.1.2 + - breakpad 2018-03-13 -> 2018-04-05 + - clara 2018-03-23 -> 2018-04-02 + - cryptopp 5.6.5-1 -> 6.1.0-2 + - discord-rpc 3.1.0 -> 3.2.0 + - dlib 19.10 -> 19.10-1 + - eastl 3.08.00 -> 3.09.00 + - exiv2 2018-03-23 -> 2018-04-05 + - folly 2017.11.27.00-3 -> 2018.03.19.00-2 + - forest 4.5.0 -> 7.0.1 + - gdcm2 2.8.5 -> 2.8.6 + - grpc 1.10.0 -> 1.10.1 + - gtest 1.8.0-7 -> 1.8.0-8 + - libiconv 1.15-2 -> 1.15-3 + - libuv 1.19.2 -> 1.20.0 + - libvpx 1.6.1-2 -> 1.7.0 + - libxml2 2.9.4-4 -> 2.9.4-5 + - nuklear 2018-03-23 -> 2018-04-05 + - openimageio 1.8.9 -> 1.8.10 + - openssl 1.0.2n-3 -> 1.0.2o-1 + - qt5-base 5.9.2-5 -> 5.9.2-6 + - qt5-modularscripts 2 -> 3 + - qwt 6.1.3-4 -> 6.1.3-5 + - recast 1.5.1 -> 1.5.1-1 + - rocksdb 5.11.3 -> 5.12.2 + - rs-core-lib 2018-03-17 -> 2018-04-05 + - sciter 4.1.4 -> 4.1.5 + - tbb 2018_U2 -> 2018_U3 + - tesseract 3.05.01-2 -> 3.05.01-3 + - theia 0.7-d15154a-1 -> 0.7-d15154a-3 + - thrift 2018-03-23 -> 2018-04-05 + - unrar 5.5.8 -> 5.5.8-1 + - yoga 1.7.0 -> 1.7.0-1 + - zeromq 2018-03-23 -> 2018-04-05 + * `vcpkg.cmake`: Remove detection for Windows SDK. Let `cmake` detect it instead. + * Rework `vcpkgTools.xml`. + - `` renamed to `` + - `` renamed `` + - `` changed to `` + - `` tags now specify an `os="x"` property + - The version of the tools list (i.e. ``) is now verified by `vcpkg.exe`. + * Use [7zip](https://www.7-zip.org/) to extract vcpkg tools defined in `vcpkgTools.xml`. + * Use [aria2](https://aria2.github.io/) to download vcpkg tools defined in `vcpkgTools.xml`. + - The experimental flag `vcpkg install --x-use-aria2` allows you to use `aria2` for other downloads as well. + * `vckg hash` improvements + +-- vcpkg team FRI, 06 Apr 2018 19:30:00 -0800 + + +vcpkg (0.0.107) +-------------- + * Add ports: + - azmq 1.0.2 + - azure-c-shared-utility 1.0.0-pre-release-1.0.9 + - azure-iot-sdk-c 1.0.0-pre-release-1.0.9 + - azure-uamqp-c 1.0.0-pre-release-1.0.9 + - azure-uhttp-c 2018-02-09 + - azure-umqtt-c 1.0.0-pre-release-1.0.9 + - bitserializer 0.7 + - caf 0.15.7 + - fmem c-libs-2ccee3d2fb + - gherkin-c c-libs-e63e83104b + - librsync 2.0.2 + - libuuid 1.0.3 + - mpark-variant 1.3.0 + - nanomsg 1.1.2 + - nvml 1.3-0 + - nvtt 2.1.0 + - openvpn3 2018-03-21 + - parson 2018-03-23 + - plplot 5.13.0-1 + - sqlite-orm 1.1 + - tap-windows6 9.21.2-0e30f5c + * Update ports: + - abseil 2018-03-17 -> 2018-03-23 + - alembic 1.7.6 -> 1.7.7 + - asio 1.12.0 -> 1.12.0-1 + - aubio 0.4.6-1 -> 0.4.6-2 + - aws-sdk-cpp 1.3.58 -> 1.4.21 + - catch2 2.2.1 -> 2.2.1-1 + - ccfits 2.5-1 -> 2.5-2 + - ceres 1.13.0-4 -> 1.14.0-1 + - cfitsio 3.410-1 -> 3.410-2 + - clara 2018-03-11 -> 2018-03-23 + - cpprestsdk 2.10.2 -> 2.10.2-1 + - discord-rpc 3.0.0 -> 3.1.0 + - dlib 19.9-1 -> 19.10 + - eastl 3.07.02 -> 3.08.00 + - exiv2 2018-03-17 -> 2018-03-23 + - ffmpeg 3.3.3-4 -> 3.3.3-5 + - gdcm2 2.8.4 -> 2.8.5 + - harfbuzz 1.7.6 -> 1.7.6-1 + - hpx 1.0.0-8 -> 1.1.0-1 + - lcm 1.3.95 -> 1.3.95-1 + - libpq 9.6.1-1 -> 9.6.1-4 + - libvpx 1.6.1-1 -> 1.6.1-2 + - mpg123 1.25.8-2 -> 1.25.8-4 + - nuklear 2018-03-17 -> 2018-03-23 + - openssl 1.0.2n-2 -> 1.0.2n-3 + - paho-mqtt 1.2.0-2 -> 1.2.0-3 + - plog 1.1.3 -> 1.1.4 + - qt5-quickcontrols 5.9.2-0 -> 5.9.2-1 + - qt5-quickcontrols2 5.9.2-0 -> 5.9.2-1 + - sciter 4.1.3 -> 4.1.4 + - shapelib 1.4.1 -> 1.4.1-1 + - signalrclient 1.0.0-beta1-2 -> 1.0.0-beta1-3 + - soundtouch 2.0.0 -> 2.0.0-1 + - thrift 2018-03-17 -> 2018-03-23 + - unicorn 2018-03-13 -> 2018-03-20 + - zeromq 2018-03-17 -> 2018-03-23 + +-- vcpkg team TUE, 27 Mar 2018 22:00:00 -0800 + + +vcpkg (0.0.106) +-------------- + * Add ports: + - armadillo 8.400.0-1 + - boost-modular-build-helper 2 + - clblas 2.12-1 + - clfft 2.12.2 + - entt 2.4.2-1 + - fastcdr 1.0.6-1 + - gamma gamma-2018-01-27 + - gl3w 8f7f459d + - graphite2 1.3.10 + - ismrmrd 1.3.2-1 + - kealib 1.4.7-1 + - lcm 1.3.95 + - libcds 2.3.2 + - monkeys-audio 4.3.3 + - msix 1.0 + - nmslib 1.7.2 + - opencl 2.2 (2017.07.18) + - openmesh 6.3 + - quirc 1.0-1 + - shogun 6.1.3 + - x264 152-e9a5903edf8ca59 + - x265 2.7-1 + * Update ports: + - abseil 2018-2-5 -> 2018-03-17 + - ace 6.4.6 -> 6.4.7 + - alembic 1.7.5 -> 1.7.6 + - args d8905de -> 2018-02-23 + - asio 1.10.8-1 -> 1.12.0 + - atk 2.24.0-1 -> 2.24.0-2 + - avro-c 1.8.2 -> 1.8.2-1 + - azure-storage-cpp 3.0.0-4 -> 3.2.1 + - benchmark 1.3.0 -> 1.3.0-1 + - boost-build 1.66.0-5 -> 1.66.0-8 + - breakpad 2018-2-19 -> 2018-03-13 + - butteraugli 2017-09-02-8c60a2aefa19adb-1 -> 2018-02-25 + - c-ares 1.13.0-1 -> cares-1_14_0 + - catch-classic 1.12.0 -> 1.12.1 + - catch2 2.1.2 -> 2.2.1 + - cctz 2.1 -> 2.2 + - cgal 4.11-3 -> 4.11.1 + - chakracore 1.7.4 -> 1.8.2 + - chmlib 0.40-1 -> 0.40-2 + - cimg 2.1.8 -> 221 + - clara 2017-07-20-9661f2b4a50895d52ebb4c59382785a2b416c310 -> 2018-03-11 + - console-bridge 0.3.2-2 -> 0.3.2-3 + - coolprop 6.1.0-2 -> 6.1.0-3 + - cpp-redis 4.3.0 -> 4.3.1 + - cpr 1.3.0-1 -> 1.3.0-3 + - curl 7.58.0-1 -> 7_59_0-2 + - devil 1.8.0-1 -> 1.8.0-2 + - directxmesh dec2017 -> feb2018 + - directxtex dec2017 -> feb2018b + - directxtk dec2017 -> feb2018 + - dirent 2017-06-23-5c7194c2fe2c68c1a8212712c0b4b6195382d27d -> 1.23.1 + - discord-rpc 2.1.0 -> 3.0.0 + - doctest 1.2.6 -> 1.2.8 + - eastl 3.05.08 -> 3.07.02 + - evpp 0.6.1-1 -> 0.7.0 + - exiv2 8f5b795eaa4bc414d2d6041c1dbd1a7f7bf1fc99 -> 2018-03-17 + - fdk-aac 2017-11-02-1e351 -> 2018-03-07 + - ffmpeg 3.3.3-2 -> 3.3.3-4 + - freetype 2.8.1-1 -> 2.8.1-3 + - freetype-gl 2017-10-9-82fb152a74f01b1483ac80d15935fbdfaf3ed836 -> 2018-02-25 + - freexl 1.0.4 -> 1.0.4-1 + - g2o 20170730_git-2 -> 20170730_git-3 + - gdal 2.2.2 -> 2.2.2-1 + - gdcm2 2.8.3 -> 2.8.4 + - geogram 1.4.9-1 -> 1.6.0-1 + - gflags 2.2.1-1 -> 2.2.1-3 + - glib 2.52.3-1 -> 2.52.3-2 + - glslang 3a21c880500eac21cdf79bef5b80f970a55ac6af-1 -> 2018-03-02 + - grpc 1.8.3 -> 1.10.0 + - gsl 2.4-2 -> 2.4-3 + - gsl-lite 0.26.0 -> 0.28.0 + - gtest 1.8.0-6 -> 1.8.0-7 + - halide release_2017_10_30 -> release_2018_02_15 + - harfbuzz 1.7.4 -> 1.7.6 + - ilmbase 2.2.0-1 -> 2.2.1-1 + - jansson 2.11 -> 2.11-2 + - jsoncpp 1.8.1-1 -> 1.8.4 + - jsonnet 2017-09-02-11cf9fa9f2fe8acbb14b096316006082564ca580 -> 2018-03-17 + - leptonica 1.74.4-2 -> 1.74.4-3 + - libgeotiff 1.4.2-2 -> 1.4.2-3 + - libiconv 1.15-1 -> 1.15-2 + - libjpeg-turbo 1.5.3 -> 1.5.3-1 + - libmysql 5.7.17-3 -> 8.0.4-2 + - libpng 1.6.34-2 -> 1.6.34-3 + - librtmp 2.4 -> 2.4-1 + - libsndfile 1.0.29-6830c42-2 -> 1.0.29-6830c42-3 + - libsodium 1.0.15-1 -> 1.0.16-1 + - libspatialite 4.3.0a-1 -> 4.3.0a-2 + - libssh 0.7.5-1 -> 0.7.5-4 + - libuv 1.18.0 -> 1.19.2 + - libwebp 0.6.1-1 -> 0.6.1-2 + - libwebsockets 2.4.1 -> 2.4.2 + - libxml2 2.9.4-2 -> 2.9.4-4 + - libzip 1.4.0 -> rel-1-5-0 + - live555 2018.01.29 -> 2018.02.28 + - lodepng 2017-09-01-8a0f16afe74a6a-1 -> 2018-02-25 + - luasocket 2017.05.25.5a17f79b0301f0a1b4c7f1c73388757a7e2ed309 -> 2018-02-25 + - lz4 1.8.1.2 -> 1.8.1.2-1 + - magnum-extras 2018.02-1 -> 2018.02-2 + - matio 1.5.10-2 -> 1.5.12 + - mman git-f5ff813 -> git-f5ff813-2 + - ms-gsl 20171204-9d65e74400976b3509833f49b16d401600c7317d -> 2018-03-17 + - msinttypes 2017-06-26-f9e7c5758ed9e3b9f4b2394de1881c704dd79de0 -> 2018-02-25 + - msmpi 8.1 -> 9.0 + - nlohmann-json 3.1.0 -> 3.1.2 + - nuklear 2017-06-15-5c7194c2fe2c68c1a8212712c0b4b6195382d27d -> 2018-03-17 + - ogre 1.10.9-2 -> 1.10.11 + - opencv 3.4.0-3 -> 3.4.1 + - openexr 2.2.0-1 -> 2.2.1-1 + - openimageio 1.7.15-2 -> 1.8.9 + - openjpeg 2.2.0-1 -> 2.3.0 + - pcl 1.8.1-9 -> 1.8.1-10 + - picosha2 2017-09-01-c5ff159b6 -> 2018-02-25 + - piex 2017-09-01-473434f2dd974978b-1 -> 2018-03-13 + - protobuf 3.5.1 -> 3.5.1-1 + - qt5-modularscripts 1 -> 2 + - re2 2017-12-01-1 -> 2018-03-17 + - readosm 1.1.0 -> 1.1.0-1 + - realsense2 2.10.0 -> 2.10.1 + - rocksdb 2017-06-28-18c63af6ef2b9f014c404b88488ae52e6fead03c-1 -> 5.11.3 + - rs-core-lib commit-1ed2dadbda3977b13e5e83cc1f3eeca76b36ebe5 -> 2018-03-17 + - rttr 0.9.5-1 -> 0.9.5-2 + - scintilla 3.7.6 -> 4.0.3 + - sdl2 2.0.7-4 -> 2.0.8-1 + - snappy 1.1.7-1 -> 1.1.7-2 + - spatialite-tools 4.3.0 -> 4.3.0-1 + - spdlog 0.14.0-1 -> 0.16.3 + - spirv-tools 2017.1-dev-7e2d26c77b606b21af839b37fd21381c4a669f23-1 -> 2018.1-1 + - sqlite3 3.21.0 -> 3.21.0-1 + - stb 20170724-9d9f75e -> 2018-03-02 + - thrift 20172805-72ca60debae1d9fb35d9f0085118873669006d7f-2 -> 2018-03-17 + - tiny-dnn 2017-10-09-dd906fed8c8aff8dc837657c42f9d55f8b793b0e -> 2018-03-13 + - tinyxml2 6.0.0 -> 6.0.0-2 + - torch-th 20180131-89ede3ba90c906a8ec6b9a0f4bef188ba5bb2fd8-1 -> 20180131-89ede3ba90c906a8ec6b9a0f4bef188ba5bb2fd8-2 + - unicorn 2017-12-06-bc34c36eaeca0f4fc672015d24ce3efbcc81d6e4-1 -> 2018-03-13 + - unicorn-lib commit-3ffa7fe69a1d0c37fb52a4af61380c5fd84fa5aa -> 2018-03-13 + - uwebsockets 0.14.4-1 -> 0.14.6-1 + - wt 3.3.7-4 -> 4.0.2 + - wtl 9.1 -> 10.0 + - wxwidgets 3.1.0-1 -> 3.1.1 + - yaml-cpp 0.5.4-rc-2 -> 0.6.2 + - zeromq 20170908-18498f620f0f6d4076981ea16eb5760fe4d28dc2-2 -> 2018-03-17 + - zziplib 0.13.62-1 -> 0.13.69 + * Use TLS 1.2 for downloads. + * Tools used by `vcpkg` (`git`, `cmake` etc) are now specified in `scripts\vcpkgTools.xml`. + - Add `7zip` + * Fix various bugs regarding feature packages. Affects `install`, `upgrade` and `export`. + * `vcpkg hash`: Fix bug with whitespace in path. + * Visual Studio detection now properly identifies legacy versions (VS2015). + * Windows SDK detection no longer fails if certain registry keys are not in their expected places. + * Dependency qualifiers now support `!` for inversion. + * Add `VCPKG_DEFAULT_VS_PATH` environment variable. + - `vcpkg` automatically chooses the latest stable version of Visual Studio to use. + - You can now select the desired VS with the `VCPKG_DEFAULT_VS_PATH` environment variable + - You can also select the behavior by specifiying `VCPKG_VISUAL_STUDIO_PATH` in the triplet file (and this takes precedence over the new environment variable) + +-- vcpkg team MON, 19 Mar 2018 19:00:00 -0800 + + +vcpkg (0.0.105) +-------------- + * Add ports: + - breakpad 2018-2-19 + - cartographer 0.3.0-3 + - chipmunk 7.0.2 + - ebml 1.3.5-1 + - intel-mkl 2018.0.1 + - jbig2dec 0.13 + - libgeotiff 1.4.2-2 + - liblo 0.29-1 + - libpng-apng 1.6.34-2 + - magnum-extras 2018.02-1 + - magnum-integration 2018.02-1 + - matroska 1.4.8 + - mman git-f5ff813 + - qt5-graphicaleffects 5.9.2-0 + - qt5-quickcontrols 5.9.2-0 + - qt5-quickcontrols2 5.9.2-0 + - recast 1.5.1 + - tinydir 1.2.3 + - tinytoml 20180219-1 + * Update ports: + - aubio 0.4.6 -> 0.4.6-1 + - aws-sdk-cpp 1.3.15 -> 1.3.58 + - blaze 3.2-3 -> 3.3 + - boost-build 1.66.0-4 -> 1.66.0-5 + - boost-mpi 1.66.0 -> 1.66.0-1 + - catch2 2.1.1 -> 2.1.2 + - ceres 1.13.0-2 -> 1.13.0-4 + - corrade jan2018-1 -> 2018.02-1 + - cuda 8.0-1 -> 9.0 + - draco 0.10.0-1 -> 1.2.5 + - ffmpeg 3.3.3-1 -> 3.3.3-2 + - folly 2017.11.27.00-2 -> 2017.11.27.00-3 + - hpx 1.0.0-7 -> 1.0.0-8 + - jansson 2.10-1 -> 2.11 + - libdisasm 0.23 -> 0.23-1 + - libmupdf 1.11-1 -> 1.12.0 + - magnum jan2018-1 -> 2018.02-1 + - magnum-plugins jan2018-1 -> 2018.02-1 + - opencv 3.4.0-2 -> 3.4.0-3 + - openvr 1.0.12 -> 1.0.13 + - pcre2 10.30-1 -> 10.30-2 + - qt5-base 5.9.2-4 -> 5.9.2-5 + - realsense2 2.9.1 -> 2.10.0 + - sciter 4.1.2 -> 4.1.3 + - suitesparse 4.5.5-3 -> 4.5.5-4 + - szip 2.1.1 -> 2.1.1-1 + - uriparser 0.8.4-1 -> 0.8.5 + * Better handling of `feature packages`. + * Bump required version & auto-downloaded version of `git` to 2.6.2 + +-- vcpkg team TUE, 20 Feb 2018 18:30:00 -0800 + + +vcpkg (0.0.104) +-------------- + * Add ports: + - asmjit 673dcefaa048c5f5a2bf8b85daf8f7b9978d018a + - cccapstone 9b4128ee1153e78288a1b5433e2c06a0d47a4c4e + - crc32c 1.0.5 + - epsilon 0.9.2 + - exprtk 2018.01.01-f32d2b4 + - forest 4.5.0 + - libgta 1.0.8 + - libodb-mysql 2.4.0-1 + - libopenmpt 2017-01-28-cf2390140 + - libudis86 2018-01-28-56ff6c87 + - mujs 25821e6d74fab5fcc200fe5e818362e03e114428 + - muparser 6cf2746 + - openmama 6.2.1-a5a93a24d2f89a0def0145552c8cd4a53c69e2de + - torch-th 20180131-89ede3ba90c906a8ec6b9a0f4bef188ba5bb2fd8-1 + - yara e3439e4ead4ed5d3b75a0b46eaf15ddda2110bb9 + * Update ports: + - abseil 2017-11-10 -> 2018-2-5 + - blosc 1.12.1 -> 1.13.5 + - boost-build 1.66.0-3 -> 1.66.0-4 + - boost-test 1.66.0-1 -> 1.66.0-2 + - catch 2.0.1-1 -> alias + - catch2 2.1.0 -> 2.1.1 + - cgal 4.11-2 -> 4.11-3 + - cpprestsdk 2.10.1-1 -> 2.10.2 + - curl 7.58.0 -> 7.58.0-1 + - dlib 19.9 -> 19.9-1 + - flatbuffers 1.8.0 -> 1.8.0-2 + - freeimage 3.17.0-3 -> 3.17.0-4 + - gflags 2.2.1 -> 2.2.1-1 + - gtest 1.8.0-5 -> 1.8.0-6 + - highfive 1.3 -> 1.5 + - jack2 1.9.12.2 -> 1.9.12 + - libspatialite 4.3.0a -> 4.3.0a-1 + - libwebp 0.6.1 -> 0.6.1-1 + - libzip 1.3.2 -> 1.4.0 + - live555 2017.10.28 -> 2018.01.29 + - mpg123 1.25.8-1 -> 1.25.8-2 + - nghttp2 1.28.0 -> 1.30.0-1 + - nlohmann-json 3.0.1 -> 3.1.0 + - opencv 3.4.0 -> 3.4.0-2 + - opengl 0.0-4 -> 0.0-5 + - openssl 1.0.2n-1 -> 1.0.2n-2 + - openvr 1.0.9 -> 1.0.12 + - poco 1.8.1 -> 1.8.1-1 + - protobuf 3.5.0-1 -> 3.5.1 + - qt5-base 5.9.2-1 -> 5.9.2-4 + - realsense2 2.9.0 -> 2.9.1 + - sciter 4.1.1 -> 4.1.2 + - sobjectizer 5.5.20 -> 5.5.21 + - soundtouch 2.0.0.2 -> 2.0.0 + - strtk 2017.01.02-1e2960f -> 2018.01.01-5579ed1 + * The `configure` step for `release` and `debug` now happen in parallel. + - This can significantly reduce build times for libraries where the `configure` step was a good chunk of the total build time. For example, the total build time for `zlib` drops from ~30sec to ~20sec. + * Fix a few bootstraping issues introduced in previous release (with the clean environment) + +-- vcpkg team WED, 07 Feb 2018 20:30:00 -0800 + + +vcpkg (0.0.103) +-------------- + * `vcpkg upgrade`: Fix issue with any command executing more than 10 transactions with mixed transaction types (install + remove) + +-- vcpkg team WED, 24 Jan 2018 14:30:00 -0800 + + +vcpkg (0.0.102) +-------------- + * Add ports: + - catch-classic 1.12.0 + - catch2 2.1.0 + - cgicc 3.2.19 + - libdisasm 0.23 + - qt5-3d 5.9.2-0 + - qt5-base 5.9.2-1 + - qt5-charts 5.9.2-0 + - qt5-datavis3d 5.9.2-0 + - qt5-declarative 5.9.2-0 + - qt5-gamepad 5.9.2-0 + - qt5-imageformats 5.9.2-0 + - qt5-modularscripts 1 + - qt5-multimedia 5.9.2-0 + - qt5-networkauth 5.9.2-0 + - qt5-scxml 5.9.2-0 + - qt5-serialport 5.9.2-0 + - qt5-speech 5.9.2-0 + - qt5-svg 5.9.2-0 + - qt5-tools 5.9.2-0 + - qt5-virtualkeyboard 5.9.2-0 + - qt5-websockets 5.9.2-0 + - qt5-winextras 5.9.2-0 + - qt5-xmlpatterns 5.9.2-0 + - tre 0.8.0-1 + * Update ports: + - boost-asio 1.66.0 -> 1.66.0-1 + - boost-build 1.66.0 -> 1.66.0-3 + - boost-vcpkg-helpers 3 -> 4 + - corrade jun2017-3 -> jan2018-1 + - curl 7.57.0-1 -> 7.57.0-2 + - date 2.3-c286981b3bf83c79554769df68b27415cee68d77 -> 2.4 + - discord-rpc 2.0.1 -> 2.1.0 + - dlib 19.8 -> 19.9 + - libbson 1.9.0 -> 1.9.2 + - libconfig 1.7.1 -> 1.7.2 + - libjpeg-turbo 1.5.2-2 -> 1.5.3 + - libodb 2.4.0-1 -> 2.4.0-2 + - libogg 1.3.2-cab46b1-3 -> 1.3.3 + - libwebp 0.6.0-2 -> 0.6.1 + - libwebsockets 2.0.0-4 -> 2.4.1 + - lz4 1.8.0-1 -> 1.8.1.2 + - magnum jun2017-6 -> jan2018-1 + - magnum-plugins jun2017-5 -> jan2018-1 + - mongo-c-driver 1.9.0 -> 1.9.2 + - mpg123 1.25.8 -> 1.25.8-1 + - openni2 2.2.0.33-4 -> 2.2.0.33-7 + - osg 3.5.6-1 -> 3.5.6-2 + - poco 1.8.0.1 -> 1.8.1 + - qca 2.2.0-1 -> 2.2.0-2 + - qscintilla 2.10-1 -> 2.10-4 + - qt5 5.8-6 -> 5.9.2-1 + - qwt 6.1.3-2 -> 6.1.3-4 + - sciter 4.1.0 -> 4.1.1 + - sdl2 2.0.7-3 -> 2.0.7-4 + - tiff 4.0.8-1 -> 4.0.9 + - xxhash 0.6.3-1 -> 0.6.4 + * Remove usage of `BITS-transfer`. Use .NET functions (which used to be the fallback if `BITS-transfer` failed) by default. + * Enable the usage of `feature-packages` by default. More info [here](docs/specifications/feature-packages.md). + * Bootstrapping `vcpkg` now happens in a clean environment to avoid issues when building in a VS Developer Prompt among others. + * Update required version & auto-downloaded version of `cmake` to 3.10.2 + * Update required version & auto-downloaded version of `vswhere` to 2.3.2 + +-- vcpkg team TUE, 23 Jan 2018 17:00:00 -0800 + + +vcpkg (0.0.101) +-------------- + * Add ports: + - alac-decoder 0.2 + - args d8905de + - boost-accumulators 1.66.0 + - boost-algorithm 1.66.0 + - boost-align 1.66.0 + - boost-any 1.66.0 + - boost-array 1.66.0 + - boost-asio 1.66.0 + - boost-assert 1.66.0 + - boost-assign 1.66.0 + - boost-atomic 1.66.0 + - boost-beast 1.66.0 + - boost-bimap 1.66.0 + - boost-bind 1.66.0 + - boost-build 1.66.0 + - boost-callable-traits 1.66.0 + - boost-chrono 1.66.0 + - boost-circular-buffer 1.66.0 + - boost-compatibility 1.66.0 + - boost-compute 1.66.0 + - boost-concept-check 1.66.0 + - boost-config 1.66.0 + - boost-container 1.66.0 + - boost-context 1.66.0 + - boost-conversion 1.66.0 + - boost-convert 1.66.0 + - boost-core 1.66.0 + - boost-coroutine 1.66.0 + - boost-coroutine2 1.66.0 + - boost-crc 1.66.0 + - boost-date-time 1.66.0 + - boost-detail 1.66.0 + - boost-disjoint-sets 1.66.0 + - boost-dll 1.66.0 + - boost-dynamic-bitset 1.66.0 + - boost-endian 1.66.0 + - boost-exception 1.66.0 + - boost-fiber 1.66.0 + - boost-filesystem 1.66.0 + - boost-flyweight 1.66.0 + - boost-foreach 1.66.0 + - boost-format 1.66.0 + - boost-function 1.66.0 + - boost-function-types 1.66.0 + - boost-functional 1.66.0 + - boost-fusion 1.66.0 + - boost-geometry 1.66.0 + - boost-gil 1.66.0 + - boost-graph 1.66.0 + - boost-graph-parallel 1.66.0 + - boost-hana 1.66.0 + - boost-heap 1.66.0 + - boost-icl 1.66.0 + - boost-integer 1.66.0 + - boost-interprocess 1.66.0 + - boost-interval 1.66.0 + - boost-intrusive 1.66.0 + - boost-io 1.66.0 + - boost-iostreams 1.66.0 + - boost-iterator 1.66.0 + - boost-lambda 1.66.0 + - boost-lexical-cast 1.66.0 + - boost-local-function 1.66.0 + - boost-locale 1.66.0 + - boost-lockfree 1.66.0 + - boost-log 1.66.0 + - boost-logic 1.66.0 + - boost-math 1.66.0 + - boost-metaparse 1.66.0 + - boost-move 1.66.0 + - boost-mp11 1.66.0 + - boost-mpi 1.66.0 + - boost-mpl 1.66.0 + - boost-msm 1.66.0 + - boost-multi-array 1.66.0 + - boost-multi-index 1.66.0 + - boost-multiprecision 1.66.0 + - boost-numeric-conversion 1.66.0 + - boost-odeint 1.66.0 + - boost-optional 1.66.0 + - boost-parameter 1.66.0 + - boost-phoenix 1.66.0 + - boost-poly-collection 1.66.0 + - boost-polygon 1.66.0 + - boost-pool 1.66.0 + - boost-predef 1.66.0 + - boost-preprocessor 1.66.0 + - boost-process 1.66.0 + - boost-program-options 1.66.0 + - boost-property-map 1.66.0 + - boost-property-tree 1.66.0 + - boost-proto 1.66.0 + - boost-ptr-container 1.66.0 + - boost-python 1.66.0-1 + - boost-qvm 1.66.0 + - boost-random 1.66.0 + - boost-range 1.66.0 + - boost-ratio 1.66.0 + - boost-rational 1.66.0 + - boost-regex 1.66.0 + - boost-scope-exit 1.66.0 + - boost-serialization 1.66.0 + - boost-signals 1.66.0 + - boost-signals2 1.66.0 + - boost-smart-ptr 1.66.0 + - boost-sort 1.66.0 + - boost-spirit 1.66.0 + - boost-stacktrace 1.66.0 + - boost-statechart 1.66.0 + - boost-static-assert 1.66.0 + - boost-system 1.66.0 + - boost-test 1.66.0-1 + - boost-thread 1.66.0 + - boost-throw-exception 1.66.0 + - boost-timer 1.66.0 + - boost-tokenizer 1.66.0 + - boost-tti 1.66.0 + - boost-tuple 1.66.0 + - boost-type-erasure 1.66.0 + - boost-type-index 1.66.0 + - boost-type-traits 1.66.0 + - boost-typeof 1.66.0 + - boost-ublas 1.66.0 + - boost-units 1.66.0 + - boost-unordered 1.66.0 + - boost-utility 1.66.0 + - boost-uuid 1.66.0 + - boost-variant 1.66.0 + - boost-vcpkg-helpers 3 + - boost-vmd 1.66.0 + - boost-wave 1.66.0 + - boost-winapi 1.66.0 + - boost-xpressive 1.66.0 + - brynet 0.9.0 + - chaiscript 6.0.0 + - cimg 2.1.8 + - crow 0.1 + - gainput 1.0.0 + - jack2 1.9.12.2 + - libdatrie 0.2.10-2 + - libgit2 0.26.0 + - libmupdf 1.11-1 + - libpqxx 6.0.0 + - libqrencode 4.0.0-1 + - libsamplerate 0.1.9.0 + - mbedtls 2.6.1 + - nghttp2 1.28.0 + - portmidi 0.217.1 + - re2 2017-12-01-1 + - rs-core-lib commit-1ed2dadbda3977b13e5e83cc1f3eeca76b36ebe5 + - sol 2.18.7 + - soundtouch 2.0.0.2 + - sqlitecpp 2.2 + - tinyexif 1.0.1-1 + - unicorn 2017-12-06-bc34c36eaeca0f4fc672015d24ce3efbcc81d6e4-1 + - unicorn-lib commit-3ffa7fe69a1d0c37fb52a4af61380c5fd84fa5aa + - yoga 1.7.0 + * Update ports: + - ace 6.4.5 -> 6.4.6 + - alembic 1.7.4-1 -> 1.7.5 + - arrow 0.6.0 -> 0.6.0-1 + - asio 1.10.8 -> 1.10.8-1 + - assimp 4.0.1-3 -> 4.1.0-1 + - aubio 0.46 -> 0.4.6 + - aws-sdk-cpp 1.2.4 -> 1.3.15 + - beast v84-1 -> 0 + - blaze 3.2-2 -> 3.2-3 + - bond 7.0.2 -> 7.0.2-1 + - boost 1.65.1-3 -> 1.66.0 + - brotli 1.0.2 -> 1.0.2-1 + - bullet3 2.86.1-1 -> 2.87 + - cgal 4.11 -> 4.11-2 + - cpp-redis 3.5.2-2 -> 4.3.0 + - cpprestsdk 2.10.0 -> 2.10.1-1 + - curl 7.55.1-1 -> 7.57.0-1 + - directxmesh oct2016 -> dec2017 + - directxtex dec2016 -> dec2017 + - directxtk dec2016-1 -> dec2017 + - dlib 19.7 -> 19.8 + - exiv2 4f4add2cdcbe73af7098122a509dff0739d15908 -> 8f5b795eaa4bc414d2d6041c1dbd1a7f7bf1fc99 + - fcl 0.5.0-2 -> 0.5.0-3 + - fftw3 3.3.7-1 -> 3.3.7-2 + - flatbuffers 1.7.1-1 -> 1.8.0 + - fmt 4.0.0-1 -> 4.1.0 + - folly 2017.11.27.00 -> 2017.11.27.00-2 + - gflags 2.2.0-5 -> 2.2.1 + - glm 0.9.8.5 -> 0.9.8.5-1 + - gmime 3.0.2 -> 3.0.5 + - grpc 1.7.2 -> 1.8.3 + - gsl-lite 0.24.0 -> 0.26.0 + - gtest 1.8-1 -> 1.8.0-5 + - harfbuzz 1.6.3-1 -> 1.7.4 + - hdf5 1.10.0-patch1-2 -> 1.10.1-1 + - hpx 1.0.0-5 -> 1.0.0-7 + - imgui 1.52 -> 1.53 + - itk 4.11.0 -> 4.13.0 + - libbson 1.6.2-2 -> 1.9.0 + - libconfig 1.6.0-1 -> 1.7.1 + - libiconv 1.15 -> 1.15-1 + - libkml 1.3.0-1 -> 1.3.0-2 + - librtmp 2.3 -> 2.4 + - libsodium 1.0.15 -> 1.0.15-1 + - libtorrent 1.1.5 -> 1.1.6 + - live555 2017.09.12 -> 2017.10.28 + - llvm 5.0.0-2 -> 5.0.1 + - mongo-c-driver 1.6.2-1 -> 1.9.0 + - mongo-cxx-driver 3.1.1-1 -> 3.1.1-2 + - mpg123 1.24.0-1 -> 1.25.8 + - mpir 3.0.0-3 -> 3.0.0-4 + - ms-gsl 20171104-d10ebc6555b627c9d1196076a78467e7be505987 -> 20171204-9d65e74400976b3509833f49b16d401600c7317d + - nlohmann-json 2.1.1-1 -> 3.0.1 + - opencv 3.3.1-9 -> 3.4.0 + - openimageio 1.7.15-1 -> 1.7.15-2 + - openssl 1.0.2m -> 1.0.2n-1 + - openvdb 5.0.0 -> 5.0.0-1 + - pcl 1.8.1-7 -> 1.8.1-9 + - pybind11 2.2.0 -> 2.2.1 + - python3 3.6.1 -> 3.6.4 + - range-v3 20151130-vcpkg4 -> 20151130-vcpkg5 + - realsense2 2.8.2 -> 2.9.0 + - sciter 4.0.6 -> 4.1.0 + - sdl2-image 2.0.1-3 -> 2.0.2-1 + - sdl2-mixer 2.0.2-1 -> 2.0.2-2 + - sdl2-net 2.0.1-3 -> 2.0.1-4 + - sdl2-ttf 2.0.14-3 -> 2.0.14-4 + - sobjectizer 5.5.19.2-1 -> 5.5.20 + - speex 1.2.0-2 -> 1.2.0-4 + - string-theory 1.6-1 -> 1.7 + - szip 2.1-2 -> 2.1.1 + - tacopie 2.4.1-2 -> 3.2.0 + - tbb 2017_U7 -> 2018_U2 + - tclap 1.2.1 -> 1.2.2 + - thrift 20172805-72ca60debae1d9fb35d9f0085118873669006d7f-1 -> 20172805-72ca60debae1d9fb35d9f0085118873669006d7f-2 + - tinyxml2 5.0.1-1 -> 6.0.0 + - vtk 8.0.1-5 -> 8.1.0-1 + - wt 3.3.7-2 -> 3.3.7-4 + - zeromq 20170908-18498f620f0f6d4076981ea16eb5760fe4d28dc2-1 -> 20170908-18498f620f0f6d4076981ea16eb5760fe4d28dc2-2 + - zstd 1.3.1-1 -> 1.3.3 + * Introduce `vcpkg upgrade` command. This command automatically rebuilds outdated libraries to the latest version. + * `vcpkg list`: Improve output for long triplets + * Update required version & auto-downloaded version of `cmake` to 3.10.1 + +-- vcpkg team WED, 10 Jan 2018 17:00:00 -0800 + + +vcpkg (0.0.100) +-------------- + * Add ports: + - libmspack 0.6 + - scintilla 3.7.6 + - vlpp 0.9.3.1 + * Update ports: + - allegro5 5.2.2.0-1 -> 5.2.3.0 + - benchmark 1.2.0 -> 1.3.0 + - brotli 0.6.0-1 -> 1.0.2 + - chakracore 1.4.3 -> 1.7.4 + - cppunit 1.13.2 -> 1.14.0 + - doctest 1.2.0 -> 1.2.6 + - ecm 5.37.0-1 -> 5.40.0 + - expat 2.2.4-2 -> 2.2.5 + - flint 2.5.2 -> 2.5.2-1 + - folly 2017.10.02.00 -> 2017.11.27.00 + - freerdp 2.0.0-rc0~vcpkg1-1 -> 2.0.0-rc1~vcpkg1 + - libtorrent 1.1.4-1 -> 1.1.5 + - libuv 1.16.1 -> 1.18.0 + - libzip 1.2.0-2 -> 1.3.2 + - log4cplus REL_1_2_1-RC2-1 -> REL_2_0_0-RC2 + - mpfr 3.1.6-1 -> 3.1.6-2 + - nana 1.5.4-1 -> 1.5.5 + - poco 1.7.8-2 -> 1.8.0.1 + - pugixml 1.8.1-2 -> 1.8.1-3 + - sciter 4.0.4 -> 4.0.6 + - speex 1.2.0-1 -> 1.2.0-2 + * `vcpkg` has exceeded 400 libraries! + * `vcpkg` now supports Tab-Completion/Auto-Completion in Powershell. To enable it, simply run `.\vcpkg integrate powershell` and restart Powershell. + * `vcpkg` now requires the English language pack of Visual Studio to be installed. This is needed because several libraries fail to build in non-English languages, so `vcpkg` sets the build environment to English to bypass these issues. + +-- vcpkg team MON, 04 Dec 2017 17:00:00 -0800 + + +vcpkg (0.0.99) +-------------- + * Add ports: + - avro-c 1.8.2 + - devil 1.8.0-1 + - halide release_2017_10_30 + - librabbitmq 0.8.0 + - openvdb 5.0.0 + - qpid-proton 0.18.1 + - unittest-cpp 2.0.0 + * Update ports: + - alembic 1.7.4 -> 1.7.4-1 + - angle 2017-06-14-8d471f-2 -> 2017-06-14-8d471f-4 + - aubio 0.46~alpha-3 -> 0.46 + - date 2.2 -> 2.3-c286981b3bf83c79554769df68b27415cee68d77 + - fftw3 3.3.7 -> 3.3.7-1 + - grpc 1.7.0 -> 1.7.2 + - imgui 1.51-1 -> 1.52 + - lcms 2.8-3 -> 2.8-4 + - leptonica 1.74.4-1 -> 1.74.4-2 + - leveldb 2017-10-25-8b1cd3753b184341e837b30383832645135d3d73 -> 2017-10-25-8b1cd3753b184341e837b30383832645135d3d73-1 + - libflac 1.3.2-3 -> 1.3.2-4 + - libiconv 1.14-1 -> 1.15 + - libsndfile 1.0.29-6830c42-1 -> 1.0.29-6830c42-2 + - libssh2 1.8.0-2 -> 1.8.0-3 + - llvm 5.0.0-1 -> 5.0.0-2 + - mpfr 3.1.6 -> 3.1.6-1 + - ogre 1.9.0-1 -> 1.10.9-2 + - opencv 3.3.1-7 -> 3.3.1-9 + - opengl 0.0-3 -> 0.0-4 + - pcl 1.8.1-4 -> 1.8.1-7 + - protobuf 3.4.1-2 -> 3.5.0-1 + - qhull 2015.2-1 -> 2015.2-2 + - realsense2 2.8.1 -> 2.8.2 + - redshell 1.0.0 -> 1.1.2 + - sdl2 2.0.7-1 -> 2.0.7-3 + - string-theory 1.6 -> 1.6-1 + - tesseract 3.05.01-1 -> 3.05.01-2 + * `vcpkg` now autodetects CMake usage information in libraries and displays it after install + * `vcpkg integrate install`: Fix issue that would cause failure with unicode usernames + * Introduce experimental support for `VCPKG_BUILD_TYPE`. Adding `set(VCPKG_BUILD_TYPE release)` in a triplet: will cause *most* ports to only build release + * `vcpkg` now compiles inside WSL + * Update required version & auto-downloaded version of `cmake` to 3.10.0 + +-- vcpkg team SAT, 26 Nov 2017 03:30:00 -0800 + + +vcpkg (0.0.97) +-------------- + * Add ports: + - alac 2017-11-03-c38887c5 + - atkmm 2.24.2 + - blosc 1.12.1 + - coolprop 6.1.0-2 + - discord-rpc 2.0.1 + - freetype-gl 2017-10-9-82fb152a74f01b1483ac80d15935fbdfaf3ed836 + - glibmm 2.52.1 + - gtkmm 3.22.2 + - if97 2.1.0 + - luasocket 2017.05.25.5a17f79b0301f0a1b4c7f1c73388757a7e2ed309 + - pangomm 2.40.1 + - realsense2 2.8.1 + - refprop-headers 2017-11-7-882aec454b2bc3d5323b8691736ff09c288f4ed6 + - sfgui 0.3.2-1 + - tidy-html5 5.4.0-1 + * Update ports: + - abseil 2017-10-14 -> 2017-11-10 + - assimp 4.0.1-2 -> 4.0.1-3 + - bond 6.0.0-1 -> 7.0.2 + - catch 1.11.0 -> 2.0.1-1 + - dimcli 2.0.0-1 -> 3.1.1-1 + - dlib 19.4-5 -> 19.7 + - ffmpeg 3.3.3 -> 3.3.3-1 + - fftw3 3.3.6-p12-1 -> 3.3.7 + - freeglut 3.0.0-2 -> 3.0.0-3 + - freetype 2.8-1 -> 2.8.1-1 + - glbinding 2.1.1-2 -> 2.1.1-3 + - glm 0.9.8.4-1 -> 0.9.8.5 + - grpc 1.6.0-2 -> 1.7.0 + - jasper 2.0.13-1 -> 2.0.14-1 + - libpng 1.6.32-1 -> 1.6.34-2 + - libraw 0.18.2-4 -> 0.18.2-5 + - libsigcpp 2.99-1 -> 2.10 + - libuv 1.14.1-1 -> 1.16.1 + - libwebsockets 2.0.0-2 -> 2.0.0-4 + - ms-gsl 20170425-8b320e3f5d016f953e55dfc7ec8694c1349d3fe4 -> 20171104-d10ebc6555b627c9d1196076a78467e7be505987 + - openal-soft 1.18.1-1 -> 1.18.2-1 + - opencv 3.3.1-6 -> 3.3.1-7 + - openssl 1.0.2l-3 -> 1.0.2m + - pcl 1.8.1-3 -> 1.8.1-4 + - sdl2 2.0.6-1 -> 2.0.7-1 + - sdl2-mixer 2.0.1-3 -> 2.0.2-1 + - sqlite-modern-cpp 2.4 -> 3.2 + - vtk 8.0.1-1 -> 8.0.1-5 + - wincrypt 0.0 -> 0.0-1 + - winsock2 0.0 -> 0.0-1 + * MSBuild integration now outputs a warning when configuration is not determinable. + * Fix Powershell execution failures for users of PSCX. PSCX has an `Expand-Archive` cmdlet that has different parameter names than the same-named cmdlet in Powershell 5. + * `vcpkg_from_github()`: Handle '/' in REFs + +-- vcpkg team TUE, 14 Nov 2017 16:00:00 -0800 + + +vcpkg (0.0.96) +-------------- + * Add ports: + - arb 2.11.1 + - fdk-aac 2017-11-02-1e351 + - flint 2.5.2 + - itk 4.11.0 + - libaiff 5.0 + * Update ports: + - antlr4 4.6-1 -> 4.7 + - apr 1.6.2-1 -> 1.6.3 + - double-conversion 3.0.0-1 -> 3.0.0-2 + - flann 1.9.1-6 -> 1.9.1-7 + - opencv 3.3.1-4 -> 3.3.1-6 + - protobuf 3.4.1-1 -> 3.4.1-2 + * `vcpkg help`: Add help topics for commands. For example `vcpkg help install` + * `vcpkg` now downloads in a temp directory; after the download is complete, the file is moved to the destination. This avoids issues with hash mismatch on partially downloaded files. + * Update required version & auto-downloaded version of `cmake` to 3.9.5 + * Update required version & auto-downloaded version of `vswhere` to 2.2.11 + +-- vcpkg team WED, 03 Nov 2017 18:45:00 -0800 + + +vcpkg (0.0.95) +-------------- + * Update ports: + - assimp 4.0.1 -> 4.0.1-2 + - blaze 3.2-1 -> 3.2-2 + - boost 1.65.1-2 -> 1.65.1-3 + - catch 1.10.0 -> 1.11.0 + - libharu 2017-08-15-d84867ebf9f-2 -> 2017-08-15-d84867ebf9f-4 + - libsndfile libsndfile-1.0.29-6830c42-1 -> 1.0.29-6830c42-1 + - opencv 3.3.1 -> 3.3.1-4 + - pcl 1.8.1-2 -> 1.8.1-3 + - poco 1.7.8-1 -> 1.7.8-2 + - signalrclient 1.0.0-beta1-1 -> 1.0.0-beta1-2 + - vtk 8.0.0-3 -> 8.0.1-1 + - xlnt 1.1.0-1 -> 1.2.0-1 + * Various improvements in `vcpkg` when obtaining data from `PowerShell` scripts. It should now be more robust + * Fix Windows 7 (i.e. `PowerShell 2.0`) issues in `PowerShell` scripts + * Fix an issue with `feature packages` where an installed package would appear to be uninstalled if a feature of the package was installed and then uninstalled + * Bump required version & auto-downloaded version of `git` to 2.5.0 + +-- vcpkg team WED, 01 Nov 2017 15:30:00 -0800 + + +vcpkg (0.0.94) +-------------- + * Add ports: + - capstone 3.0.5-rc3 + - cgal 4.11 + - gettimeofday 2017-10-14-2 + - gmime 3.0.2 + - leveldb 2017-10-25-8b1cd3753b184341e837b30383832645135d3d73 + - rpclib 2.2.0 + * Update ports: + - alembic 1.7.1-4 -> 1.7.4 + - blaze 3.2 -> 3.2-1 + - boost 1.65.1-1 -> 1.65.1-2 + - ceres 1.13.0-1 -> 1.13.0-2 + - cpprestsdk 2.9.0-4 -> 2.10.0 + - cppwinrt spring_2017_creators_update_for_vs_15.3 -> fall_2017_creators_update_for_vs_15.3-2 + - cppzmq 4.2.1 -> 4.2.2 + - eigen3 3.3.4-1 -> 3.3.4-2 + - gdcm2 2.6.8-1 -> 2.8.3 + - harfbuzz 1.4.6-2 -> 1.6.3-1 + - libjpeg-turbo 1.5.2-1 -> 1.5.2-2 + - libmariadb 2.3.2-1 -> 3.0.2 + - libmysql 5.7.17-2 -> 5.7.17-3 + - live555 2017.06.04-1 -> 2017.09.12 + - mpir 3.0.0-2 -> 3.0.0-3 + - opencv 3.3.0-4 -> 3.3.1 + - pangolin 0.5-2 -> 0.5-3 + - pugixml 1.8.1-1 -> 1.8.1-2 + - secp256k1 2017-19-10-0b7024185045a49a1a6a4c5615bf31c94f63d9c4 -> 2017-19-10-0b7024185045a49a1a6a4c5615bf31c94f63d9c4-1 + - smpeg2 2.0.0-2 -> 2.0.0-3 + - sqlite3 3.20.1 -> 3.21.0 + * Bump required version & auto-downloaded version of `git` to 2.4.3 + +-- vcpkg team FRI, 27 Oct 2017 19:30:00 -0800 + + +vcpkg (0.0.93) +-------------- + * Add ports: + - berkeleydb 4.8.30 + - libsodium 1.0.15 + - secp256k1 2017-19-10-0b7024185045a49a1a6a4c5615bf31c94f63d9c4 + * Update ports: + - assimp 4.0.0-2 -> 4.0.1 + - azure-storage-cpp 3.0.0-3 -> 3.0.0-4 + - cctz v2.1 -> 2.1 + - folly v2017.07.17.01-1 -> 2017.10.02.00 + - grpc 1.6.0-1 -> 1.6.0-2 + - openblas v0.2.20-2 -> 0.2.20-2 + - pthreads 2.9.1-1 -> 2.9.1-2 + - sdl2-gfx 1.0.3-2 -> 1.0.3-3 + - sdl2-image 2.0.1-2 -> 2.0.1-3 + - sdl2-mixer 2.0.1-2 -> 2.0.1-3 + - sdl2-net 2.0.1-2 -> 2.0.1-3 + - sdl2-ttf 2.0.14-2 -> 2.0.14-3 + - spirv-tools v2017.1-dev-7e2d26c77b606b21af839b37fd21381c4a669f23-1 -> 2017.1-dev-7e2d26c77b606b21af839b37fd21381c4a669f23-1 + - thor v2.0-1 -> 2.0-1 + - tinyexr v0.9.5-d16ea6 -> 0.9.5-d16ea6 + * Fix issue where `vcpkg` was getting output from powershell scripts. Powershell adds newlines when the console width is reached; the extra newlines was causing `vcpkg`'s parsing to fail. + * Improve autocomplete/tab-completion for powershell (still experimental) + +-- vcpkg team THU, 19 Oct 2017 21:30:00 -0800 + + +vcpkg (0.0.92) +-------------- + * Add ports: + - cctz v2.1 + - celero 2.1.0-1 + - eastl 3.05.08 + - imgui 1.51-1 + - libidn2 2.0.4 + - mozjpeg 3.2-1 + - spatialite-tools 4.3.0 + - string-theory 1.6 + - tiny-dnn 2017-10-09-dd906fed8c8aff8dc837657c42f9d55f8b793b0e + - wincrypt 0.0 + - winsock2 0.0 + * Update ports: + - abseil 2017-09-28 -> 2017-10-14 + - boost 1.65.1 -> 1.65.1-1 + - cpprestsdk 2.9.0-3 -> 2.9.0-4 + - gdal 1.11.3-5 -> 2.2.2 + - jansson v2.10-1 -> 2.10-1 + - lua 5.3.4-2 -> 5.3.4-4 + - mpfr 3.1.5-1 -> 3.1.6 + - ogre 1.9.0 -1 -> 1.9.0-1 + - openni2 2.2.0.33-2 -> 2.2.0.33-4 + - pcl 1.8.1-1 -> 1.8.1-2 + - sciter 4.0.3 -> 4.0.4 + - vtk 8.0.0-2 -> 8.0.0-3 + - websocketpp 0.7.0 -> 0.7.0-1 + * Initial support for autocomplete/tab-completion for powershell (still experimental) + * Add `VCPKG_CHAINLOAD_TOOLCHAIN_FILE variable`. As the name suggests, you can chainload your own toolchain file along with the `vcpkg` toolchain file. + * Fix issues with the new Visual Studio detection ([`vswhere.exe`](https://github.com/Microsoft/vswhere)). Notably: + - Detect VS2015 BuildTools, VS2017 BuildTools and VS Express Edition + * Fix issues with Windows SDK detection + * Rework acquisition of `vcpkg` dependencies (e.g. `cmake`, `git`). It is now more robust and should be faster on modern Operating Systems while still having fallback functions for older ones. + * Bump required version & auto-downloaded version of `cmake` to 3.9.4 + * Bump required version & auto-downloaded version of `nuget` to 4.4.0 + * Bump required version & auto-downloaded version of `vswhere` to 2.2.7 + * Bump required version & auto-downloaded version of `git` to 2.4.2(.3) + * Bump ninja to version 1.8.0 + +-- vcpkg team TUE, 17 Oct 2017 16:00:00 -0800 + + +vcpkg (0.0.91) +-------------- + * Add ports: + - abseil 2017-09-28 + - enet 1.3.13 + - exiv2 4f4add2cdcbe73af7098122a509dff0739d15908 + - freexl 1.0.4 + - gts 0.7.6 + - kinectsdk2 2.0 + - libexif 0.6.21-1 + - libfreenect2 0.2.0 + - librtmp 2.3 + - libspatialite 4.3.0a + - libxmp-lite 4.4.1 + - proj4 4.9.3-1 + - readosm 1.1.0 + - spirit-po 1.1.2 + - telnetpp 1.2.4 + - wildmidi 0.4.1 + * Update ports: + - anax 2.1.0-2 -> 2.1.0-3 + - aws-sdk-cpp 1.0.61-1 -> 1.2.4 + - geos 3.5.0-1 -> 3.6.2-2 + - kinectsdk1 1.8-1 -> 1.8-2 + - lua 5.3.4-1 -> 5.3.4-2 + - openni2 2.2.0.33 -> 2.2.0.33-2 + - openssl 1.0.2l-2 -> 1.0.2l-3 + - pangolin 0.5-1 -> 0.5-2 + - proj 4.9.3-1 -> 0 + - sdl2 2.0.5-4 -> 2.0.6-1 + - zlib 1.2.11-2 -> 1.2.11-3 + * `vcpkg export`: Add new option `--ifw` which creates a standalone GUI installer for the exported packages. More information and screenshots [here](https://github.com/Microsoft/vcpkg/pull/1734) + * Complete rework of Visual Studio detection & selection: + - Use [`vswhere.exe`](https://github.com/Microsoft/vswhere) to detect Visual Studio installation instances + - Add the ability to specify the Visual Studio instance to use in the triplet file with the `VCPKG_VISUAL_STUDIO_PATH` variable + - Automatic selection now picks instances in order: stable, prerelease, legacy. Within each group, newer versions are preferred over old versions + - Fix issue where v140 toolset would not work if VS2017 (with v140) was installed but VS2015 was not installed + * Add message when downloading a `vcpkg` dependency (e.g. `cmake`) + +-- vcpkg team THU, 05 Oct 2017 19:00:00 -0800 + + +vcpkg (0.0.90) +-------------- + * Add ports: + - caffe2 0.8.1 + - date 2.2 + - jsonnet 2017-09-02-11cf9fa9f2fe8acbb14b096316006082564ca580 + - kf5plotting 5.37.0 + - units 2.3.0 + - winpcap 4.1.3-1 + * Update ports: + - arrow apache-arrow-0.4.0-2 -> 0.6.0 + - benchmark 1.1.0-1 -> 1.2.0 + - cppwinrt feb2017_refresh-14393 -> spring_2017_creators_update_for_vs_15.3 + - llvm 4.0.0-1 -> 5.0.0-1 + - luafilesystem 1.6.3-1 -> 1.7.0.2 + - opencv 3.2.0-4 -> 3.3.0-4 + - paho-mqtt 1.2.0-1 -> 1.2.0-2 + - protobuf 3.4.0-2 -> 3.4.1-1 + - qt5 5.8-5 -> 5.8-6 + - sfml 2.4.2-1 -> 2.4.2-2 + - xlnt 0.9.4-1 -> 1.1.0-1 + - zlib 1.2.11-1 -> 1.2.11-2 + * Bump required version & auto-downloaded version of `cmake` to 3.9.3 (was 3.9.1). Noteable changes: + - Fix codepage issues + - FindBoost: Add support for Boost 1.65.0 and 1.65.1 + * `vcpkg edit`: Fix inspected locations for VSCode + +-- vcpkg team SUN, 24 Sep 2017 03:30:00 -0800 + + +vcpkg (0.0.89) +-------------- + * Update ports: + - boost 1.65-1 -> 1.65.1 + - chmlib 0.40 -> 0.40-1 + - pybind11 2.1.0-2 -> 2.2.0 + - sciter 4.0.2-1 -> 4.0.3 + - sqlite3 3.19.1-2 -> 3.20.1 + * `vcpkg` now warns if the built version of the `vcpkg.exe` itself is outdated + * Update to latest python 3.5 + * `vcpkg install` improvements: + - Add `--keep-going` option to keep going if a package fails to install + - Add elapsed time to each invidial package as well as total time + - Add a counter to the install (e.g. Starting package 3/12: ) + * `vcpkg edit` now checks more location for VSCode Insiders + +-- vcpkg team WED, 14 Sep 2017 16:00:00 -0800 + + +vcpkg (0.0.88) +-------------- + * `vcpkg_configure_cmake` has been modified to embed debug symbols within static libraries (using the /Z7 option). Most of the libraries in `vcpkg` had their versions bumped due to this. + * `vcpkg_configure_meson` has been modified in the same manner. + +-- vcpkg team SAT, 09 Sep 2017 00:30:00 -0800 + + +vcpkg (0.0.87) +-------------- + * Add ports: + - console-bridge 0.3.2-1 + - leptonica 1.74.4 + - tesseract 3.05.01 + - urdfdom 1.0.0-1 + - urdfdom-headers 1.0.0-1 + * Update ports: + - ace 6.4.4 -> 6.4.5 + - c-ares 1.12.1-dev-40eb41f-1 -> 1.13.0 + - glslang 1c573fbcfba6b3d631008b1babc838501ca925d3-2 -> 3a21c880500eac21cdf79bef5b80f970a55ac6af + - grpc 1.4.1 -> 1.6.0 + - libuv 1.14.0 -> 1.14.1 + - meschach -> 1.2b + - openblas v0.2.20 -> v0.2.20-1 + - openssl 1.0.2l-1 -> 1.0.2l-2 + - protobuf 3.3.0-3 -> 3.4.0-1 + - qt5 5.8-4 -> 5.8-5 + - shaderc 2df47b51d83ad83cbc2e7f8ff2b56776293e8958-1 -> 12fb656ab20ea9aa06e7084a74e5ff832b7ce2da + - spirv-tools 1.1-f72189c249ba143c6a89a4cf1e7d53337b2ddd40 -> v2017.1-dev-7e2d26c77b606b21af839b37fd21381c4a669f23 + - xxhash 0.6.2 -> 0.6.3 + - zeromq 4.2.2 -> 20170908-18498f620f0f6d4076981ea16eb5760fe4d28dc2 + * Add new function `vcpkg_from_bitbucket` which the Bitbucket equivalent of `vcpkg_from_github` + +-- vcpkg team FRI, 08 Sep 2017 22:00:00 -0800 + + +vcpkg (0.0.86) +-------------- + * Add ports: + - bigint 2010.04.30 + - butteraugli 2017-09-02-8c60a2aefa19adb + - ccd 2.0.0-1 (Renamed from libccd) + - fadbad 2.1.0 + - fcl 0.5.0-1 + - guetzli 2017-09-02-cb5e4a86f69628 + - gumbo 0.10.1 + - libmicrohttpd 0.9.55 + - libstemmer 2017-9-02 + - libunibreak 4.0 + - lodepng 2017-09-01-8a0f16afe74a6a + - meschach + - nlopt 2.4.2-c43afa08d~vcpkg1 + - picosha2 2017-09-01-c5ff159b6 + - piex 2017-09-01-473434f2dd974978b + - pthreads 2.9.1 + - tinythread 1.1 + - tinyxml 2.6.2-1 + * Removed ports: + - libccd 2.0.0 (Renamed to ccd) + * Update ports: + - ace 6.4.3 -> 6.4.4 + - boost 1.65 -> 1.65-1 + - cairo 1.15.6 -> 1.15.8 + - gdk-pixbuf 2.36.6 -> 2.36.9 + - glib 2.52.2 -> 2.52.3 + - gtk 3.22.15 -> 3.22.19 + - jxrlib 1.1-2 -> 1.1-3 + - paho-mqtt Version 1.1.0 (Paho 1.2) -> 1.2.0 + - pango 1.40.6 -> 1.40.11 + - shaderc 2df47b51d83ad83cbc2e7f8ff2b56776293e8958 -> 2df47b51d83ad83cbc2e7f8ff2b56776293e8958-1 + * Fix warnings in bootstrap-vcpkg.ps1 + * Fix codepage related issues with ninja/cmake + * Improve handling for non-ascii environments + * Configurations names are now more tolerant: + - If a configuration name is prefixed with "Release", then it is compatible with "Release" + - If a configuration name is prefixed with "Debug", then it is compatible with "Debug" + * `vcpkg edit`: Improve detection of VSCode and add better messages when no path is found + * Fixes and improvements in the `vcpkg` tool itself + +-- vcpkg team MON, 04 Sep 2017 02:00:00 -0800 + + +vcpkg (0.0.85) +-------------- + * Add ports: + - ccfits 2.5 + - highfive 1.3 + - lzfse 1.0 + - pangolin 0.5 + - rhash 1.3.5 + - speexdsp 1.2rc3-1 + - unrar 5.5.8 + * Update ports: + - assimp 4.0.0 -> 4.0.0-1 + - catch 1.9.7 -> 1.10.0 + - ctemplate 2017-06-23-44b7c5b918a08ad561c63e9d28beecb40c10ebca -> 2017-06-23-44b7c5-2 + - curl 7.55.0 -> 7.55.1 + - ecm 5.32.0 -> 5.37.0 + - expat 2.1.1-1 -> 2.2.4-1 + - ffmpeg 3.2.4-3 -> 3.3.3 + - gl2ps OpenGL to PostScript Printing Library -> 1.4.0 + - jsoncpp 1.7.7 -> 1.8.1 + - libp7-baical 4.1 -> 4.4-1 + - libpng 1.6.31 -> 1.6.32 + - libraw 0.18.2-2 -> 0.18.2-3 + - libsigcpp 2.10 -> 2.99 + - snappy 1.1.6-be6dc3d -> 1.1.7 + * `vcpkg edit`: Add new option `--builtrees`; opens editor in buildtrees directory for examining build issues + * Improve Windows SDK support (contract version detection) + * Improve handling for non-ascii environments + * Fixes and improvements in the `vcpkg` tool itself + +-- vcpkg team SUN, 27 Aug 2017 22:00:00 -0800 + + +vcpkg (0.0.84) +-------------- + * Add ports: + - cfitsio 3.410 + - chmlib 0.40 + - gl2ps OpenGL to PostScript Printing Library + - libharu 2017-08-15-d84867ebf9f-1 + - mpfr 3.1.5 + - sophus 1.0.0 + * Update ports: + - allegro5 5.2.1.0 -> 5.2.2.0 + - blaze 3.1 -> 3.2 + - boost 1.64-5 -> 1.65 + - curl 7.51.0-3 -> 7.55.0 + - flann 1.9.1-4 -> 1.9.1-5 + - gdal 1.11.3-4 -> 1.11.3-5 + - glew 2.0.0-2 -> 2.1.0 + - lcms 2.8-1 -> 2.8-2 + - libogg 2017-07-27-cab46b19847 -> 1.3.2-cab46b1-2 + - libuv 1.13.1 -> 1.14.0 + - lz4 1.7.5 -> 1.8.0 + - pcre2 10.23 -> 10.30 + - spdlog 0.13.0 -> 0.14.0 + - zstd 1.3.0 -> 1.3.1 + * Bump required version & auto-downloaded version of `git` to 2.14.1 (due to a security vulnerability) + * Show more information when there are issues acquiring `vcpkg` tool dependencies (`git`, `cmake`, `nuget`) + * Remove download prompts for cmake/git. The prompts were causing a lot of issues for users and especially CI builds + * `vcpkg edit`: Fix detection of 64-bit VSCode + * Fixes and improvements in the `vcpkg` tool itself + +-- vcpkg team TUE, 22 Aug 2017 13:00:00 -0800 + + +vcpkg (0.0.83) +-------------- + * Add ports: + - fuzzylite 6.0 + - jemalloc 4.3.1-1 + - libkml 1.3.0 + - pcl 1.8.1 + - plog 1.1.3 + * Update ports: + - catch 1.9.6 -> 1.9.7 + - ceres 1.12.0-4 -> 1.13.0 + - cpp-redis 3.5.2 -> 3.5.2-1 + - gdal 1.11.3-3 -> 1.11.3-4 + - graphicsmagick 1.3.26 -> 1.3.26-1 + - hypre 2.11.1 -> 2.11.2 + - libtheora 1.1.1 -> 1.2.0alpha1-20170719~vcpkg1 + - minizip 1.2.11 -> 1.2.11-1 + - openblas v0.2.19-2 -> v0.2.20 + - openjpeg 2.1.2-2 -> 2.2.0 + - physfs 2.0.3 -> 2.0.3-1 + - stb 1.0 -> 20170724-9d9f75e + - uwebsockets 0.14.3 -> 0.14.4 + - vtk 7.1.1-1 -> 8.0.0-1 + - yaml-cpp 0.5.4 candidate -> 0.5.4-rc-1 + * Bump required version & auto-downloaded version of `cmake` to 3.9.1 (was 3.9.0) + * Fixes and improvements in the `vcpkg` tool itself + +-- vcpkg team FRI, 11 Aug 2017 12:00:00 -0800 + + +vcpkg (0.0.82) +-------------- + * Add ports: + - alembic 1.7.1-3 + - allegro5 5.2.1.0 + - angle 2017-06-14-8d471f-1 + - apr-util 1.6.0 + - arrow apache-arrow-0.4.0-1 + - aubio 0.46~alpha-2 + - aurora 2017-06-21-c75699d2a8caa726260c29b6d7a0fd35f8f28933 + - benchmark 1.1.0 + - blaze 3.1 + - brotli 0.6.0 + - c-ares 1.12.1-dev-40eb41f-1 + - ceres 1.12.0-4 + - clara 2017-07-20-9661f2b4a50895d52ebb4c59382785a2b416c310 + - corrade jun2017-2 + - cpp-redis 3.5.2 + - cppcms 1.1.0 + - cppunit 1.13.2 + - cpr 1.3.0 + - ctemplate 2017-06-23-44b7c5b918a08ad561c63e9d28beecb40c10ebca + - cunit 2.1.3-1 + - cxxopts 1.3.0 + - dirent 2017-06-23-5c7194c2fe2c68c1a8212712c0b4b6195382d27d + - draco 0.10.0 + - duktape 2.0.3-3 + - embree 2.16.4-1 + - evpp 0.6.1 + - flann 1.9.1-4 + - folly v2017.07.17.01 + - g2o 20170730_git-1 + - geogram 1.4.9 + - gsl-lite 0.24.0 + - hpx 1.0.0-4 + - hunspell 1.6.1-1 + - hwloc 1.11.7-1 + - hypre 2.11.1 + - ilmbase 2.2.0 + - jansson v2.10 + - jasper 2.0.13 + - kinectsdk1 1.8-1 + - libconfig 1.6.0 + - libmikmod 3.3.11.1 + - libopusenc 0.1 + - libssh 0.7.5 + - libtorrent 1.1.4 + - libusb 1.0.21-fc99620 + - libusb-win32 1.2.6.0 + - libzip 1.2.0-1 + - live555 2017.06.04 + - llvm 4.0.0 + - lpeg 1.0.1-2 + - luafilesystem 1.6.3 + - luajit 2.0.5 + - magnum jun2017-5 + - magnum-plugins jun2017-4 + - matio 1.5.10-1 + - minizip 1.2.11 + - msinttypes 2017-06-26-f9e7c5758ed9e3b9f4b2394de1881c704dd79de0 + - nuklear 2017-06-15-5c7194c2fe2c68c1a8212712c0b4b6195382d27d + - ode 0.15.1 + - openexr 2.2.0 + - openimageio 1.7.15 + - openni2 2.2.0.33 + - opusfile 0.9 + - osg 3.5.6 + - paho-mqtt Version 1.1.0 (Paho 1.2) + - plibsys 0.0.3 + - podofo 0.9.5 + - ptex 2.1.28 + - pystring 1.1.3 + - python3 3.6.1 + - qhull 2015.2 + - qscintilla 2.10-1 + - redshell 1.0.0 + - rocksdb 2017-06-28-18c63af6ef2b9f014c404b88488ae52e6fead03c + - rtmidi 2.1.1-1 + - rttr 0.9.5 + - sciter 4.0.2-1 + - sdl2-gfx 1.0.3-1 + - snappy 1.1.6-be6dc3d + - sobjectizer 5.5.19.2 + - speex 1.2.0 + - strtk 2017.01.02-1e2960f + - suitesparse 4.5.5-2 + - sundials 2.7.0 + - tacopie 2.4.1-1 + - theia 0.7-d15154a + - thor v2.0 + - thrift 20172805-72ca60debae1d9fb35d9f0085118873669006d7f + - uriparser 0.8.4 + - utf8proc 2.1.0 + - utfz 1.2 + - wxwidgets 3.1.0-1 + * Update ports: + - apr 1.5.2 -> 1.6.2 + - assimp 3.3.1 -> 4.0.0 + - beast 1.0.0-b30 -> v84-1 + - bond 5.3.1 -> 6.0.0 + - boost 1.64-2 -> 1.64-5 + - bzip2 1.0.6 -> 1.0.6-1 + - cairo 1.15.4 -> 1.15.6 + - catch 1.9.1 -> 1.9.6 + - cereal 1.2.1 -> 1.2.2 + - chakracore 1.4.0 -> 1.4.3 + - dimcli 1.0.3 -> 2.0.0 + - dlfcn-win32 1.1.0 -> 1.1.1 + - dlib 19.4-1 -> 19.4-4 + - doctest 1.1.0 -> 1.2.0 + - double-conversion 2.0.1 -> 3.0.0 + - eigen3 3.3.3 -> 3.3.4 + - expat 2.1.1 -> 2.1.1-1 + - ffmpeg 3.2.4-2 -> 3.2.4-3 + - fftw3 3.3.6-p11 -> 3.3.6-p12 + - flatbuffers 1.6.0 -> 1.7.1 + - fltk 1.3.4-2 -> 1.3.4-4 + - fmt 3.0.1-4 -> 4.0.0 + - fontconfig 2.12.1 -> 2.12.4 + - freeglut 3.0.0 -> 3.0.0-1 + - freeimage 3.17.0-1 -> 3.17.0-2 + - freerdp 2.0.0-beta1+android11 -> 2.0.0-rc0~vcpkg1 + - freetype 2.6.3-5 -> 2.8 + - gdcm2 2.6.7 -> 2.6.8 + - gettext 0.19 -> 0.19-1 + - gflags 2.2.0-2 -> 2.2.0-4 + - glew 2.0.0-1 -> 2.0.0-2 + - gli 0.8.2 -> 0.8.2-1 + - glib 2.52.1 -> 2.52.2 + - glm 0.9.8.1 -> 0.9.8.4 + - glog 0.3.4-0472b91-1 -> 0.3.5 + - glslang 1c573fbcfba6b3d631008b1babc838501ca925d3-1 -> 1c573fbcfba6b3d631008b1babc838501ca925d3-2 + - graphicsmagick 1.3.25 -> 1.3.26 + - grpc 1.2.3 -> 1.4.1 + - gsl 2.3 -> 2.4-1 + - gtk 3.22.11 -> 3.22.15 + - harfbuzz 1.4.6 -> 1.4.6-1 + - lcms 2.8 -> 2.8-1 + - libarchive 3.3.1 -> 3.3.2 + - libbson 1.6.2 -> 1.6.2-1 + - libepoxy 1.4.1-7d58fd3 -> 1.4.3 + - libevent 2.1.8-1 -> 2.1.8-2 + - libgd 2.2.4-1 -> 2.2.4-2 + - libjpeg-turbo 1.5.1-1 -> 1.5.2 + - libogg 1.3.2 -> 2017-07-27-cab46b19847 + - libpng 1.6.28-1 -> 1.6.31 + - libraw 0.18.0-1 -> 0.18.2-2 + - libuv 1.10.1-2 -> 1.13.1 + - log4cplus 1.1.3-RC7 -> REL_1_2_1-RC2 + - lzo 2.09 -> 2.10-1 + - msgpack 2.1.1 -> 2.1.5 + - msmpi 8.0-1 -> 8.1 + - nana 1.4.1-66be23c9204c5567d1c51e6f57ba23bffa517a7c -> 1.5.4 + - openal-soft 1.17.2 -> 1.18.1 + - openblas v0.2.19-1 -> v0.2.19-2 + - opencv 3.2.0-1 -> 3.2.0-3 + - openjpeg 2.1.2-1 -> 2.1.2-2 + - openssl 1.0.2k-2 -> 1.0.2l-1 + - openvr 1.0.5 -> 1.0.9 + - opus 1.1.4 -> 1.2.1 + - pango 1.40.5-1 -> 1.40.6 + - pcre 8.40 -> 8.41 + - pdcurses 3.4 -> 3.4-1 + - portaudio 19.0.6.00 -> 19.0.6.00-1 + - protobuf 3.2.0 -> 3.3.0-3 + - pybind11 2.1.0 -> 2.1.0-1 + - qt5 5.8-1 -> 5.8-4 + - qwt 6.1.3-1 -> 6.1.3-2 + - ragel 6.9 -> 6.10 + - range-v3 20150729-vcpkg3 -> 20151130-vcpkg4 + - rxcpp 3.0.0 -> 4.0.0-1 + - sdl2 2.0.5-2 -> 2.0.5-3 + - sdl2-image 2.0.1 -> 2.0.1-1 + - sdl2-mixer 2.0.1 -> 2.0.1-1 + - sdl2-net 2.0.1 -> 2.0.1-1 + - sdl2-ttf 2.0.14 -> 2.0.14-1 + - smpeg2 2.0.0 -> 2.0.0-1 + - spdlog 0.12.0 -> 0.13.0 + - sqlite3 3.18.0-1 -> 3.19.1-1 + - taglib 1.11.1-1 -> 1.11.1-3 + - tbb 20160916 -> 2017_U7 + - think-cell-range e2d3018 -> 498839d + - tiff 4.0.7-1 -> 4.0.8 + - tinyxml2 3.0.0 -> 5.0.1 + - utfcpp 2.3.4 -> 2.3.5 + - uwebsockets 0.14.2 -> 0.14.3 + - vtk 7.1.0 -> 7.1.1-1 + - wt 3.3.7 -> 3.3.7-1 + - zstd 1.1.1 -> 1.3.0 + * `vcpkg` has exceeded 300 libraries! + * Add the following options to `vcpkg export` command: `--nuget-id`, `--nuget-version` + * Improve `vcpkg help`: + - Improve clarity + - Add `vcpkg help ` option (example: `vcpkg help export`) + - Add `vcpkg help topics` option + * `vcpkg search` now also searches in the description of ports + * Documentation has been reworked and is now also available in ReadTheDocs: https://vcpkg.readthedocs.io/ + * Bump required version & auto-downloaded version of `cmake` to 3.9.0 (was 3.8.0) + * Bump required version & auto-downloaded version of `nuget` to 4.1.0 (was 3.5.0) + * Huge number of fixes and improvements in the `vcpkg` tool + +-- vcpkg team MON, 07 Aug 2017 16:00:00 -0800 + + +vcpkg (0.0.81) +-------------- + * Add ports: + - atlmfc 0 + - giflib 5.1.4 + - graphicsmagick 1.3.25 + - libmad 0.15.1 + - libsndfile libsndfile-1.0.29-6830c42 + - ms-gsl 20170425-8b320e3f5d016f953e55dfc7ec8694c1349d3fe4 (**see below) + - taglib 1.11.1-1 + - xalan-c 1.11-1 + * Update ports: + - ace 6.4.2 -> 6.4.3 + - bond 5.2.0 -> 5.3.1 + - boost 1.63-4 -> 1.64-2 + - cppzmq 0.0.0-1 -> 4.2.1 + - gdal 1.11.3-1 -> 1.11.3-3 + - gdk-pixbuf 2.36.5 -> 2.36.6 + - grpc 1.1.2-1 -> 1.2.3 + - gsl 0-fd5ad87bf -> 2.3 (**see below) + - harfbuzz 1.3.4-2 -> 1.4.6 + - icu 58.2-1 -> 59.1-1 + - libflac 1.3.2-1 -> 1.3.2-2 + - libmodplug 0.8.8.5-bb25b05 -> 0.8.9.0 + - pango 1.40.4 -> 1.40.5-1 + - pcre 8.38-1 -> 8.40 + - poco 1.7.6-4 -> 1.7.8 + - qt5 5.7.1-7 -> 5.8-1 + - wt 3.3.6-3 -> 3.3.7 + * The Guidelines Support Library has been renamed from`gsl` to `ms-gsl`. The GNU Scientific Library has been added as `gsl`. + * Introducing `vcpkg export` command: + - Exports one or more installed packages along with their dependencies + - Options for target format: --nuget --7zip --zip --raw (can specify more than one) + - Option `--dry-run`: This will print out the export plan, but will not actually perform the export + - More information and examples [here](https://blogs.msdn.microsoft.com/vcblog/2017/05/03/vcpkg-introducing-export-command/). + * Add `--head` option for `vcpkg install`. It only applies to github-based project and allows you to use the latest master commit + - For example: `./vcpkg install cpprestsdk:x64-windows --head` will build cpprestsdk from the latest master commit instead of version 2.9.0 specified in the `CONTROL` file + * Bump auto-downloaded version of `cmake` to 3.8.0 (was 3.8.0rc1) + * `--options` are now case-insensitive + * `vcpkg` now uses `clang-format` + * Fixes and improvements in the `vcpkg` tool + +-- vcpkg team WED, 03 May 2017 18:00:00 -0800 + + +vcpkg (0.0.80) +-------------- + * Add ports: + - clapack 3.2.1 + - geographiclib 1.47-patch1-3 + - libevent 2.1.8-1 + - mdnsresponder 765.30.11 + - openblas v0.2.19-1 + - picojson 1.3.0 + - sdl2-mixer 2.0.1 + - sdl2-net 2.0.1 + - sdl2-ttf 2.0.14 + * Update ports: + - azure-storage-cpp 3.0.0 -> 3.0.0-2 + - catch 1.8.2 -> 1.9.1 + - eigen3 3.3.0 -> 3.3.3 + - glib 2.50.3 -> 2.52.1 + - libbson 1.5.1 -> 1.6.2 + - libpng 1.6.28 -> 1.6.28-1 + - libvorbis 1.3.5-1-143caf4023a90c09a5eb685fdd46fb9b9c36b1ee -> 1.3.5-143caf4-2 + - libxml2 2.9.4 -> 2.9.4-1 + - mongo-c-driver 1.5.1 -> 1.6.2 + - mongo-cxx-driver 3.0.3-1 -> 3.1.1 + - opencv 3.2.0 -> 3.2.0-1 + - qwt 6.1.3 -> 6.1.3-1 + - uwebsockets 0.14.1 -> 0.14.2 + - xerces-c 3.1.4 -> 3.1.4-3 + * Added `System32\Wbem` to the sanizited environment + * `--debug` flag will now show environment information when launching external commands + * `vcpkg install` command has been enhanced: + - When a package build starts or ends, a message with the package name is diplayed + - Before the start of the build, a summary of the install plan is displayed + - Added new option `--dry-run`: This will print out the install plan, but will not actually perform the install + * Add CI badge in the front page + * Fix WindowsSDK detection to correctly handle the new optional c++ desktop deployment of the Windows SDK. + * Reduce verbosity of `vcpkg remove` when purging the package + * Fixes and improvements in the `vcpkg` tool itself + +-- vcpkg team WED, 18 Apr 2017 18:00:00 -0800 + + +vcpkg (0.0.79) +-------------- + * Add ports: + - ecm 5.32.0 + - libgd 2.2.4-1 + - octomap cefed0c1d79afafa5aeb05273cf1246b093b771c-1 + * Update ports: + - boost 1.63-3 -> 1.63-4 + - cuda 8.0 -> 8.0-1 + - freeimage 3.17.0 -> 3.17.0-1 + - freetype 2.6.3-4 -> 2.6.3-5 + - glfw3 3.2.1 -> 3.2.1-1 + - libarchive 3.2.2-2 -> 3.3.1 + - pqp 1.3 -> 1.3-1 + - qt5 5.7.1-6 -> 5.7.1-7 + - sqlite3 3.17.0 -> 3.18.0-1 + * `vcpkg` has exceeded 200 libraries! + * `vcpkg remove` command has been reworked: + - `vcpkg remove ` now uninstalls and deletes the package by default. Previously, this was the behavior of `vpckg remove --purge ` + - `vcpkg remove --no-purge` now uninstalls the package without deleting it. Previously, this was the behavior or `vcpkg remove ` + - Added new option `--dry-run`: This will print out the remove plan, but will not actually perform the removal + - Added new option `--outdated`: Using `vcpkg remove --outdated` will remove all packages for which updates are available + * Add `bootstrap-vcpkg.bat` in the root directory for easier building of `vcpkg` + - Also fix a regression with `vcpkg` bootstrapping + * Add information about how to use header-only libraries from cmake in [EXAMPLES.md](docs\EXAMPLES.md) + * `vcpkg build_external` changed to `vcpkg build-external` (underscore to dash) + * Fixes and improvements in existing portfiles and the `vcpkg` tool itself + +-- vcpkg team WED, 05 Apr 2017 15:00:00 -0800 + + +vcpkg (0.0.78) +-------------- + * Add ports: + - libp7-baical 4.1 + - pybind11 2.1.0 + - xxhash 0.6.2 + * Update ports: + - catch 1.8.1 -> 1.8.2 + - glog 0.3.4-0472b91 -> 0.3.4-0472b91-1 + - libuv 1.10.1 -> 1.10.1-2 + - libwebp 0.5.1-1 -> 0.6.0-1 + - range-v3 20150729-vcpkg2 -> 20150729-vcpkg3 + - tiff 4.0.6-2 -> 4.0.7 + - uwebsockets 0.13.0-1 -> 0.14.1 + * `--debug` flag enhanced to give line information on any exit. Applies to any `vcpkg` command + * Improve error messages when requesting a portfile that does not exist (for example via command line or via dependencies) + * Add `EMPTY_INCLUDE_FOLDER` policy + * Fixes and improvements in existing portfiles and the `vcpkg` tool itself + +-- vcpkg team TUE, 28 Mar 2017 21:15:00 -0800 + + +vcpkg (0.0.77) +-------------- + * Add ports: + - beast 1.0.0-b30 + - botan 2.0.1 + - cairomm 1.15.3-1 + - dlfcn-win32 1.1.0 + - freerdp 2.0.0-beta1+android11 + - gdcm2 2.6.7 + - jbigkit 2.1 + - libpopt 1.16-10~vcpkg1 + - libvpx 1.6.1-1 + - libwebm 1.0.0.27-1 + - msgpack 2.1.1 + - nlohmann-json 2.1.1 + - pcre2 10.23 + - tinyexr v0.9.5-d16ea6 + - xlnt 0.9.4 + * Update ports: + - antlr4 4.6 -> 4.6-1 + - atk 2.22.0 -> 2.24.0 + - boost 1.63-2 -> 1.63-3 + - dlib 19.2 -> 19.4-1 + - glib 2.50.2 -> 2.50.3 + - gtk 3.22.8 -> 3.22.11 + - libepoxy 1.4.0-2432daf-1 -> 1.4.1-7d58fd3 + - libjpeg-turbo 1.4.90-1 -> 1.5.1-1 + - liblzma 5.2.3 -> 5.2.3-1 + - mpg123 1.23.3 -> 1.24.0-1 + - mpir 2.7.2-1 -> 3.0.0-2 + - pango 1.40.3 -> 1.40.4 + - qt5 5.7.1-5 -> 5.7.1-6 + - uwebsockets 0.12.0 -> 0.13.0-1 + * Improvements and fixes in the sanizited environment introduced in the previous version + * `--debug` flag now gives line information when an error occurs. Applies to any `vcpkg` command + * Fixes and improvements around launching powershell scripts + - Correct handling of spaces in the path + - Ignore user profile (-NoProfile) + * `openssl`: Enable building in paths with space and ignore installed versions in `C:/OpenSSL/` + * Fixes and improvements in existing portfiles and the `vcpkg` tool itself + +-- vcpkg team WED, 22 Mar 2017 15:30:00 -0800 + + +vcpkg (0.0.76) +-------------- + * Add ports: + - ffmpeg 3.2.4-2 + - fftw3 3.3.6-p11 + - flatbuffers 1.6.0 + - netcdf-c 4.4.1.1-1 + - netcdf-cxx4 4.3.0 + - portaudio 19.0.6.00 + - vtk 7.1.0 + * Update ports: + - azure-storage-cpp 2.6.0 -> 3.0.0 + - boost 1.63 -> 1.63-2 + - bullet3 2.83.7.98d4780 -> 2.86.1 + - catch 1.5.7 -> 1.8.1 + - cppwinrt 1.010.0.14393.0 -> feb2017_refresh-14393 + - hdf5 1.8.18 -> 1.10.0-patch1-1 + - libflac 1.3.2 -> 1.3.2-1 + - libpng 1.6.24-1 -> 1.6.28 + - lua 5.3.3-2 -> 5.3.4 + - msmpi 8.0 -> 8.0-1 + - openjpeg 2.1.2 -> 2.1.2-1 + - poco 1.7.6-3 -> 1.7.6-4 + - szip 2.1 -> 2.1-1 + - zeromq 4.2.0 -> 4.2.2 + * `vcpkg` now launches external commands (most notably builds) in a sanitized environment + * Better proxy handling when fetching dependencies (cmake/git/nuget) + * Fix more VS2017 issues + * Fixes and improvements in existing portfiles and the `vcpkg` tool itself + +-- vcpkg team MON, 10 Mar 2017 17:45:00 -0800 + + +vcpkg (0.0.75) +-------------- + * Add ports: + - dlib 19.2 + - gtk 3.22.8 + - pqp 1.3 + - pugixml 1.8.1 + * Update ports: + - clockutils 1.1.1 -> 1.1.1-3651f232c27074c4ceead169e223edf5f00247c5 + - grpc 1.1.0-dev-1674f65-2 -> 1.1.2-1 + - libflac 1.3.1-1 -> 1.3.2 + - liblzma 5.2.2 -> 5.2.3 + - libmysql 5.7.17 -> 5.7.17-1 + - lz4 1.7.4.2 -> 1.7.5 + - mongo-cxx-driver 3.0.3 -> 3.0.3-1 + - nana 1.4.1 -> 1.4.1-66be23c9204c5567d1c51e6f57ba23bffa517a7c + - opengl 10.0.10240.0 -> 0.0-3 + - protobuf 3.0.2 -> 3.2.0 + - qt5 5.7.1-2 -> 5.7.1-5 + - spdlog 0.11.0 -> 0.12.0 + * Numerous improvements in Visual Studio, MSBuild and Windows SDK auto-detection + * `vcpkg integrate install` now outputs the specific toolchain file to use for CMake integration + * All commands now checks for `--options` and will issue an error on unknown options. + - Previously only commands with options would do this (for example `vcpkg remove --purge `) and commands with no options would ignore them, for example `vcpkg install --purge ` + * Update version of the automatically acquired JOM, python + - Also, for python: automatically acquire the 32-bit versions instead of the 64-bit ones + * Fixes and improvements in existing portfiles and the `vcpkg` tool itself + +-- vcpkg team MON, 27 Feb 2017 14:00:00 -0800 + + +vcpkg (0.0.74) +-------------- + * Bump required version & auto-downloaded version of `cmake` to 3.8.0 (was 3.7.x). This fixes UWP builds with Visual Studio 2017 + * Fix `vcpkg build` not printing out the missing dependencies on fail + * Fixes and improvements in the `vcpkg` tool itself + +-- vcpkg team THU, 16 Feb 2017 18:15:00 -0800 + + +vcpkg (0.0.73) +-------------- + * Add ports: + - gdk-pixbuf 2.36.5 + - openvr 1.0.5 + * Update ports: + - lmdb 0.9.18-1 -> 0.9.18-2 + - opencv 3.1.0-1 -> 3.2.0 + - sqlite3 3.15.0 -> 3.17.0 + * Add functions to correctly find the "Program Files" folders in all parts of `vcpkg` (C++, CMake, powershell) + * Flush std::cout before launching an external process. Fixes issues when redirecting std::cout to a file + * Update version of the automatically acquired nasm. Resolves build failure with libjpeg-turbo + * Change the format of the listfile. The file is now sorted and directories now have a trailing slash so they can easily be identified. + - Old listfiles will be automatically updated on first access. This will happen to all old listfiles when a new package is installed (`vcpkg install`) or after a call to `vcpkg owns`. + * Fixes and improvements in existing portfiles and the `vcpkg` tool itself + +-- vcpkg team WED, 15 Feb 2017 19:30:00 -0800 + + +vcpkg (0.0.72) +-------------- + * Add ports: + - cuda 8.0 + - hdf5 1.8.18 + - lcms 2.8 + - libepoxy 1.4.0-2432daf-1 + - libnice 0.1.13 + - msmpi 8.0 + - parmetis 4.0.3 + - sqlite-modern-cpp 2.4 + - websocketpp 0.7.0 + * Update ports: + - asio 1.10.6 -> 1.10.8 + - aws-sdk-cpp 1.0.47 -> 1.0.61 + - bond 5.0.0-4-g53ea136 -> 5.2.0 + - cpprestsdk 2.9.0-1 -> 2.9.0-2 + - fmt 3.0.1-1 -> 3.0.1-4 + - grpc 1.1.0-dev-1674f65-1 -> 1.1.0-dev-1674f65-2 + - libraw 0.17.2-2 -> 0.18.0-1 + - libvorbis 1.3.5-143caf4023a90c09a5eb685fdd46fb9b9c36b1ee -> 1.3.5-1-143caf4023a90c09a5eb685fdd46fb9b9c36b1ee + - poco 1.7.6-2 -> 1.7.6-3 + - rapidjson 1.0.2-1 -> 1.1.0 + - sfml 2.4.1 -> 2.4.2 + - wt 3.3.6-2 -> 3.3.6-3 + * Introduce Build Policies: + - Packages with special characteristics (e.g. CUDA) can now use Build Policies to control which post-build checks apply to them. + * Improve support for Visual Studio 2017 + - Add auto-detection for Windows SDK + - Fixed various issues with `bootstrap.ps1` and VS2017 support + * Automatic acquisition of perl now uses the 32-bit version isntead of the 64-bit version + * Fix `vcpkg remove --purge` not applying to non-installed packages + * Fixes and improvements in existing portfiles and the `vcpkg` tool itself + +-- vcpkg team TUE, 14 Feb 2017 11:30:00 -0800 + + +vcpkg (0.0.71) +-------------- + * Add ports: + - atk 2.22.0 + - fontconfig 2.12.1 + - opus 1.1.4 + - pango 1.40.3 + - xerces-c 3.1.4 + * Update ports: + - boost 1.62-11 -> 1.63 + - cairo 1.14.6 -> 1.15.4 + - directxtk dec2016 -> dec2016-1 + - fltk 1.3.4-1 -> 1.3.4-2 + - gdal 1.11.3 -> 1.11.3-1 + - harfbuzz 1.3.4 -> 1.3.4-2 + - libarchive 3.2.2 -> 3.2.2-2 + - libmariadb 2.3.1 -> 2.3.2 + - mpir 2.7.2 -> 2.7.2-1 + - openssl 1.0.2j-2 -> 1.0.2k-2 + - wt 3.3.6 -> 3.3.6-2 + * Improve `vcpkg remove`: + - Now shows all dependencies that need to be removed instead of just the immediate dependencies + - Add `--recurse` option that removes all dependencies + - Improve messages + * Improve support for Visual Studio 2017 + - Better VS2017 detection + - Fixed various issues with `bootstrap.ps1` and VS2017 support + * Fix `vcpkg_copy_pdbs()` under non-English locale + * Notable changes for buiding the `vcpkg` tool: + - Restructure `vcpkg` project hierarchy. Now only has 4 projects (down from 6). Most of the code now lives under vcpkglib.vcxproj + - Enable multiprocessor compilation + - Disable MinimalRebuild + - Use precompiled headers + * Fixes and improvements in existing portfiles and the `vcpkg` tool itself + +-- vcpkg team MON, 30 Jan 2017 23:00:00 -0800 + + +vcpkg (0.0.70) +-------------- + * Add ports: + - fltk 1.3.4-1 + - glib 2.50.2 + - lzo 2.09 + - uvatlas sept2016 + * Update ports: + - dx 1.0.0 -> 1.0.1 + - libmysql 5.7.16 -> 5.7.17 + * Add support for Visual Studio 2017 + - Previously, you could use Visual Studio 2017 for your own application and `vcpkg` integration would work, but you needed to have Visual Studio 2015 to build `vcpkg` itself as well as the libraries. This requirement has now been removed + - If both Visual Studio 2015 and Visual Studio 2017 are installed, Visual Studio 2017 tools will be preferred over those of Visual Studio 2015 + * Bump required version & auto-downloaded version of `cmake` to 3.7.2 (was 3.5.x), which includes generators for Visual Studio 2017 + * Bump auto-downloaded version of `nuget` to 3.5.0 (was 3.4.3) + * Bump auto-downloaded version of `git` to 2.11.0 (was 2.8.3) + * Fixes and improvements in existing portfiles and the `vcpkg` tool itself + +-- vcpkg team MON, 23 Jan 2017 19:50:00 -0800 + + +vcpkg (0.0.67) +-------------- + * Add ports: + - cereal 1.2.1 + - directxmesh oct2016 + - directxtex dec2016 + - metis 5.1.0 + - sdl2-image 2.0.1 + - szip 2.1 + * Update ports: + - ace 6.4.0 -> 6.4.2 + - boost 1.62-9 -> 1.62-11 + - curl 7.51.0-2 -> 7.51.0-3 + - directxtk oct2016-1 -> dec2016 + - directxtk12 oct2016 -> dec2016 + - freetype 2.6.3-3 -> 2.6.3-4 + - glew 2.0.0 -> 2.0.0-1 + - grpc 1.1.0-dev-1674f65 -> 1.1.0-dev-1674f65-1 + - http-parser 2.7.1 -> 2.7.1-1 + - libssh2 1.8.0 -> 1.8.0-1 + - libwebsockets 2.0.0 -> 2.0.0-1 + - openssl 1.0.2j-1 -> 1.0.2j-2 + - tiff 4.0.6-1 -> 4.0.6-2 + - zlib 1.2.10 -> 1.2.11 + * Add 7z to `vcpkg_find_acquire_program.cmake` + * Enhance `vcpkg_build_cmake.cmake` and `vcpkg_install_cmake.cmake`: + - Add option to disable parallel building (it is enabled by default) + - Add option to use the 64-bit toolset (for the 32-bit builds; output binaries are still 32-bit) + * Fix bug in `applocal.ps1` that would infinitely recurse when there were no depenndencies + * Fixes and improvements in existing portfiles and the `vcpkg` tool itself + +-- vcpkg team WED, 18 Jan 2017 13:45:00 -0800 + + +vcpkg (0.0.66) +-------------- + * Add ports: + - antlr4 4.6 + - bzip2 1.0.6 + - dx 1.0.0 + - gli 0.8.2 + - libarchive 3.2.2 + - libffi 3.1 + - liblzma 5.2.2 + - libmodplug 0.8.8.5-bb25b05 + - libsigcpp 2.10 + - lmdb 0.9.18-1 + - lz4 1.7.4.2 + - ogre 1.9.0 + - qwt 6.1.3 + - smpeg2 2.0.0 + - spirv-tools 1.1-f72189c249ba143c6a89a4cf1e7d53337b2ddd40 + * Update ports: + - aws-sdk-cpp 1.0.34-1 -> 1.0.47 + - azure-storage-cpp 2.5.0 -> 2.6.0 + - boost 1.62-8 -> 1.62-9 + - chakracore 1.3.1 -> 1.4.0 + - freetype 2.6.3-2 -> 2.6.3-3 + - icu 58.1 -> 58.2-1 + - libbson 1.5.0-rc6 -> 1.5.1 + - libvorbis -> 1.3.5-143caf4023a90c09a5eb685fdd46fb9b9c36b1ee + - lua 5.3.3-1 -> 5.3.3-2 + - mongo-c-driver 1.5.0-rc6 -> 1.5.1 + - pixman 0.34.0 -> 0.34.0-1 + - qt5 5.7-1 -> 5.7.1-2 + - sdl2 2.0.5 -> 2.0.5-2 + - zlib 1.2.8 -> 1.2.10 + * Improvements in pre-install checks: + - Refactor file-exists-check. Improved clarity and performance. + * Fixes and improvements in existing portfiles and the `vcpkg` tool itself + +-- vcpkg team TUE, 10 Jan 2017 17:15:00 -0800 + + +vcpkg (0.0.65) +-------------- + * Add ports: + - anax 2.1.0-1 + - aws-sdk-cpp 1.0.34-1 + - azure-storage-cpp 2.5.0 + - charls 2.0.0 + - dimcli 1.0.3 + - entityx 1.2.0 + - freeimage 3.17.0 + - gdal 1.11.3 + - globjects 1.0.0 + - http-parser 2.7.1 + - icu 58.1 + - libflac 1.3.1-1 + - libssh2 1.8.0 + - nana 1.4.1 + - qca 2.2.0 + - sfml 2.4.1 + - shaderc 2df47b51d83ad83cbc2e7f8ff2b56776293e8958 + - uwebsockets 0.12.0 + - yaml-cpp 0.5.4 candidate + * Update ports: + - boost 1.62-6 -> 1.62-8 + - curl 7.51.0-1 -> 7.51.0-2 + - gflags 2.1.2 -> 2.2.0-2 + - glbinding 2.1.1 -> 2.1.1-1 + - glslang 1c573fbcfba6b3d631008b1babc838501ca925d3 -> 1c573fbcfba6b3d631008b1babc838501ca925d3-1 + - harfbuzz 1.3.2 -> 1.3.4 + - jxrlib 1.1-1 -> 1.1-2 + - libraw 0.17.2 -> 0.17.2-2 + - lua 5.3.3 -> 5.3.3-1 + - openssl 1.0.2j -> 1.0.2j-1 + * Improvements in the post-build checks: + - Add check for files in the `\` dir and `\debug\` dir + * Introduce pre-install checks: + - The `install` command now checks that files will not be overwrriten when installing a package. A particular file can only be owned by a single package + * Introduce 'lib\manul-link\' directory. Libraries placing the lib files in that directory are not automatically added to the link line + * Disable all interactions with CMake registry + * `vcpkg /?` is now a valid equivalent of `vcpkg help` + * Fixes and improvements in existing portfiles and the `vcpkg` tool itself + +-- vcpkg team MON, 12 Dec 2016 18:15:00 -0800 + + +vcpkg (0.0.61) +-------------- + * Add ports: + - cairo 1.14.6 + - clockutils 1.1.1 + - directxtk oct2016-1 + - directxtk12 oct2016 + - glslang 1c573fbcfba6b3d631008b1babc838501ca925d3 + - libodb-pgsql 2.4.0 + - pixman 0.34.0 + - proj 4.9.3 + - zstd 1.1.1 + * Update ports: + - chakracore 1.3.0 -> 1.3.1 + - curl 7.51.0 -> 7.51.0-1 + - dxut 11.14 -> 11.14-2 + - fmt 3.0.1 -> 3.0.1-1 + - freetype 2.6.3-1 -> 2.6.3-2 + - rxcpp 2.3.0 -> 3.0.0 + - think-cell-range 1d785d9 -> e2d3018 + - tiff 4.0.6 -> 4.0.6-1 + * Fixes and improvements in existing portfiles and the `vcpkg` tool itself + +-- vcpkg team MON, 28 Nov 2016 18:30:00 -0800 + + +vcpkg (0.0.60) +-------------- + * Add ports: + - box2d 2.3.1-374664b + - decimal-for-cpp 1.12 + - jsoncpp 1.7.7 + - libpq 9.6.1 + - libxslt 1.1.29 + - poco 1.7.6-2 + - qt5 5.7-1 + - signalrclient 1.0.0-beta1 + - soci 2016.10.22 + - tclap 1.2.1 + * Update ports: + - boost 1.62-1 -> 1.62-6 + - chakracore 1.2.0.0 -> 1.3.0 + - eigen3 3.2.10-2 -> 3.3.0 + - fmt 3.0.0-1 -> 3.0.1 + - jxrlib 1.1 -> 1.1-1 + - libbson 1.4.2 -> 1.5.0-rc6 + - libuv 1.9.1 -> 1.10.1 + - libwebp 0.5.1 -> 0.5.1-1 + - mongo-c-driver 1.4.2 -> 1.5.0-rc6 + - mongo-cxx-driver 3.0.2 -> 3.0.3 + - pcre 8.38 -> 8.38-1 + - sdl2 2.0.4 -> 2.0.5 + * `vcpkg` has exceeded 100 libraries! + * Rework dependency handling + * Many more portfiles now support static builds. The remaining ones warn that static is not yet supported and will perform a dynamic build instead + * The triplet file is now automatically included and is available in every portfile + * Improvements in the post-build checks: + - Introduce `BUILD_INFO` file. This contains information about the settings used in the build. The post-build checks use this file to choose what checks to perform + - Add CRT checks + - Improve coff file reader. It is now more robust and it correctly handles a couple of corner cases + - A few miscellaneous checks to further prevent potential issues with the produced packages + * Improve integration and fix related issues + * Add support for VS 2017 + * Introduce function that tries to repeatedly build up to a number of failures. This reduces/resolves issues from libraries with flaky builds + * Many fixes and improvements in existing portfiles and the `vcpkg` tool itself + +-- vcpkg team WED, 23 Nov 2016 15:30:00 -0800 + + +vcpkg (0.0.51) +-------------- + * Add simple substring search to `vcpkg cache` + * Add simple substring search to `vcpkg list` + +-- vcpkg team MON, 07 Nov 2016 14:45:00 -0800 + + +vcpkg (0.0.50) +-------------- + * Add ports: + - apr 1.5.2 + - assimp 3.3.1 + - boost-di 1.0.1 + - bullet3 2.83.7.98d4780 + - catch 1.5.7 + - chakracore 1.2.0.0 + - cppwinrt 1.010.0.14393.0 + - cppzmq 0.0.0-1 + - cryptopp 5.6.5 + - double-conversion 2.0.1 + - dxut 11.14 + - fastlz 1.0 + - freeglut 3.0.0 + - geos 3.5.0 + - gettext 0.19 + - glbinding 2.1.1 + - glog 0.3.4-0472b91 + - harfbuzz 1.3.2 + - jxrlib 1.1 + - libbson 1.4.2 + - libccd 2.0.0 + - libmariadb 2.3.1 + - libmysql 5.7.16 + - libodb 2.4.0 + - libodb-sqlite 2.4.0 + - libogg 1.3.2 + - libraw 0.17.2 + - libtheora 1.1.1 + - libvorbis + - libwebp 0.5.1 + - libxml2 2.9.4 + - log4cplus 1.1.3-RC7 + - lua 5.3.3 + - mongo-c-driver 1.4.2 + - mongo-cxx-driver 3.0.2 + - nanodbc 2.12.4 + - openjpeg 2.1.2 + - pcre 8.38 + - pdcurses 3.4 + - physfs 2.0.3 + - rxcpp 2.3.0 + - spdlog 0.11.0 + - tbb 20160916 + - think-cell-range 1d785d9 + - utfcpp 2.3.4 + - wt 3.3.6 + - wtl 9.1 + - zeromq 4.2.0 + - zziplib 0.13.62 + * Update ports: + - boost 1.62 -> 1.62-1 + - cpprestsdk 2.8 -> 2.9.0-1 + - curl 7.48.0 -> 7.51.0 + - eigen3 3.2.9 -> 3.2.10-2 + - freetype 2.6.3 -> 2.6.3-1 + - glew 1.13.0 -> 2.0.0 + - openssl 1.0.2h -> 1.0.2j + - range-v3 0.0.0-1 -> 20150729-vcpkg2 + - sqlite3 3120200 -> 3.15.0 + * Add support for static libraries + * Add more post build checks + * Improve post build checks related to verifying information in the dll/pdb files (e.g. architecture) + * Many fixes in existing portfiles + * Various updates in FAQ + * Release builds now create pdbs (debug builds already did) + +-- vcpkg team MON, 07 Nov 2016 00:01:00 -0800 + + +vcpkg (0.0.40) +-------------- + * Add ports: + - ace 6.4.0 + - asio 1.10.6 + - bond 5.0.0 + - constexpr 1.0 + - doctest 1.1.0 + - eigen3 3.2.9 + - fmt 3.0.0 + - gflags 2.1.2 + - glm 0.9.8.1 + - grpc 1.1.0 + - gsl 0-fd5ad87bf + - gtest 1.8 + - libiconv 1.14 + - mpir 2.7.2 + - protobuf 3.0.2 + - ragel 6.9 + - rapidxml 1.13 + - sery 1.0.0 + - stb 1.0 + * Update ports: + - boost 1.62 + - glfw3 3.2.1 + - opencv 3.1.0-1 + * Various fixes in existing portfiles + * Introduce environment variable `VCPKG_DEFAULT_TRIPLET` + * Replace everything concerning MD5 with SHA512 + * Add mirror support + * `vcpkg` now checks for valid package names: only ASCII lowercase chars, digits, or dashes are allowed + * `vcpkg create` now also creates a templated CONTROL file + * `vcpkg create` now checks for invalid chars in the zip path + * `vcpkg edit` now throws an error if it cannot launch an editor + * Fix `vcpkg integrate` to only apply to C++ projects instead of all projects + * Fix `vcpkg integrate` locale-specific failures + * `vcpkg search` now does simple substring searching + * Fix path that assumed Visual Studio is installed in default location + * Enable multicore builds by default + * Add `.vcpkg-root` file to detect the root directory + * Fix `bootstrap.ps1` to work with older versions of powershell + * Add `SOURCE_PATH` variable to all portfiles. + * Many improvements in error messages shown by `vcpkg` + * Various updates in FAQ + * Move `CONTRIBUTING.md` to root + +-- vcpkg team WED, 05 Oct 2016 17:00:00 -0700 + + +vcpkg (0.0.30) +-------------- + * DLLs are now accompanied with their corresponding PDBs. + * Rework removal commands. `vcpkg remove ` now uninstalls the package. `vcpkg remove --purge ` now uninstalls and also deletes the package. + * Rename option --arch to --triplet. + * Extensively rework directory tree layout to make it more intuitive. + * Improve post-build verification checks. + * Improve post-build verification messages; they are now more compact, more consistent and contain more suggestions on how to resolve the issues found. + * Fix `vcpkg integrate project` in cases where the path contained non-alphanumeric chars. + * Improve handling of paths. In general, commands with whitespace and non-ascii characters should be handled better now. + * Add colorized output for `vcpkg clean` and `vcpkg purge`. + * Add colorized output for many more errors. + * Improved `vcpkg update` to identify installed libraries that are out of sync with their portfiles. + * Added list of example port files to EXAMPLES.md + * Rename common CMake utilities to use prefix `vcpkg_`. + * [libpng] Fixed x86-uwp and x64-uwp builds. + * [libjpeg-turbo] Fixed x86-uwp and x64-uwp builds via suppressing static CRT linkage. + * [rapidjson] New library. + +-- vcpkg team WED, 18 Sep 2016 20:50:00 -0700 diff --git a/vcpkg/CONTRIBUTING.md b/vcpkg/CONTRIBUTING.md new file mode 100644 index 0000000..6e019d9 --- /dev/null +++ b/vcpkg/CONTRIBUTING.md @@ -0,0 +1,33 @@ +# Contribution Guidelines + +Vcpkg is a community driven effort to build a productive and robust ecosystem of native libraries - your contributions are invaluable! + +## Issues + +The easiest way to contribute is by reporting issues with either `vcpkg.exe` or an existing package on [GitHub](https://github.com/Microsoft/vcpkg). When reporting an issue with `vcpkg.exe`, make sure to clearly state: +- The machine setup: "I'm using Windows 10 Anniversary Update. My machine is using the fr-fr locale. I successfully ran 'install boost'." +- The steps to reproduce: "I run 'vcpkg list'" +- The outcome you expected: "I expected to see 'boost:x86-windows'" +- The actual outcome: "I get no output at all" or "I get a crash dialog" + +When reporting an issue with a package, make sure to clearly state: +- The machine setup (as above) +- What package and version you're building: "opencv 3.1.0" +- Any relevant error logs from the build process. + +## Pull Requests + +We are happy to accept pull requests for fixes, features, new packages, and updates to existing packages. In order to avoid wasting your time, we highly encourage opening an issue to discuss whether the PR you're thinking about making will be acceptable. This is doubly true for features and new packages. + +### New package Guidelines + +We're glad you're interested in submitting a new package! Here are some guidelines to help you author an excellent portfile: +- Avoid functional patches. Patches should be considered a last resort to implement compatibility when there's no other way. +- When patches can't be avoided, do not modify the default behavior. The ideal lifecycle of a patch is to get merged upstream and no longer be needed. Try to keep this goal in mind when deciding how to patch something. +- Prefer to use the `vcpkg_xyz` functions over raw `execute_command` calls. This makes long term maintenance easier when new features (such as custom compiler flags or generators) are added. + +## Legal + +You will need to complete a Contributor License Agreement (CLA) before your pull request can be accepted. This agreement testifies that you are granting us permission to use the source code you are submitting, and that this work is being submitted under appropriate license that we can use it. + +You can complete the CLA by going through the steps at https://cla.microsoft.com. Once we have received the signed CLA, we'll review the request. You will only need to do this once. diff --git a/vcpkg/LICENSE.txt b/vcpkg/LICENSE.txt new file mode 100644 index 0000000..2e4eac8 --- /dev/null +++ b/vcpkg/LICENSE.txt @@ -0,0 +1,23 @@ +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vcpkg/NOTICE.txt b/vcpkg/NOTICE.txt new file mode 100644 index 0000000..0e2e960 --- /dev/null +++ b/vcpkg/NOTICE.txt @@ -0,0 +1,46 @@ +vcpkg uses third party material from the projects listed below. +The original copyright notice and the license under which Microsoft +received such third party material are set forth below. Microsoft +reserves all other rights not expressly granted, whether by +implication, estoppel or otherwise. + +In the event that we accidentally failed to list a required notice, please +bring it to our attention by posting an issue. + +THIRD-PARTY SOFTWARE NOTICES AND INFORMATION +Do Not Translate or Localize + +vcpkg incorporates third party material from the projects listed below. +The original copyright notice and the license under which Microsoft received +such third party materials are set forth below. Microsoft reserved all other +rights not expressly granted, whether by implication, estoppel or otherwise. + +1. Catch2 + +%% Catch2 NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. +========================================= +END OF Catch2 NOTICES, INFORMATION, AND LICENSE diff --git a/vcpkg/README.md b/vcpkg/README.md new file mode 100644 index 0000000..7cf3ad1 --- /dev/null +++ b/vcpkg/README.md @@ -0,0 +1,349 @@ +# Vcpkg: Overview + +[中文总览](README_zh_CN.md) +[Español](README_es.md) + +Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS. +This tool and ecosystem are constantly evolving, and we always appreciate contributions! + +If you've never used vcpkg before, or if you're trying to figure out how to use vcpkg, +check out our [Getting Started](#getting-started) section for how to start using vcpkg. + +For short description of available commands, once you've installed vcpkg, +you can run `vcpkg help`, or `vcpkg help [command]` for command-specific help. + +* Github: [https://github.com/microsoft/vcpkg](https://github.com/microsoft/vcpkg) +* Slack: [https://cppalliance.org/slack/](https://cppalliance.org/slack/), the #vcpkg channel +* Discord: [\#include \](https://www.includecpp.org), the #ðŸŒvcpkg channel +* Docs: [Documentation](docs/index.md) + +[![Build Status](https://dev.azure.com/vcpkg/public/_apis/build/status/microsoft.vcpkg.ci?branchName=master)](https://dev.azure.com/vcpkg/public/_build/latest?definitionId=29&branchName=master) + +# Table of Contents + +- [Vcpkg: Overview](#vcpkg-overview) +- [Table of Contents](#table-of-contents) +- [Getting Started](#getting-started) + - [Quick Start: Windows](#quick-start-windows) + - [Quick Start: Unix](#quick-start-unix) + - [Installing Linux Developer Tools](#installing-linux-developer-tools) + - [Installing macOS Developer Tools](#installing-macos-developer-tools) + - [Installing GCC for macOS before 10.15](#installing-gcc-for-macos-before-1015) + - [Using vcpkg with CMake](#using-vcpkg-with-cmake) + - [Visual Studio Code with CMake Tools](#visual-studio-code-with-cmake-tools) + - [Vcpkg with Visual Studio CMake Projects](#vcpkg-with-visual-studio-cmake-projects) + - [Vcpkg with CLion](#vcpkg-with-clion) + - [Vcpkg as a Submodule](#vcpkg-as-a-submodule) +- [Tab-Completion/Auto-Completion](#tab-completionauto-completion) +- [Examples](#examples) +- [Contributing](#contributing) +- [License](#license) +- [Telemetry](#telemetry) + +# Getting Started + +First, follow the quick start guide for either +[Windows](#quick-start-windows), or [macOS and Linux](#quick-start-unix), +depending on what you're using. + +For more information, see [Installing and Using Packages][getting-started:using-a-package]. +If a library you need is not present in the vcpkg catalog, +you can [open an issue on the GitHub repo][contributing:submit-issue] +where the vcpkg team and community can see it, +and potentially add the port to vcpkg. + +After you've gotten vcpkg installed and working, +you may wish to add [tab completion](#tab-completionauto-completion) to your shell. + +Finally, if you're interested in the future of vcpkg, +check out the [manifest][getting-started:manifest-spec] guide! +This is an experimental feature and will likely have bugs, +so try it out and [open all the issues][contributing:submit-issue]! + +## Quick Start: Windows + +Prerequisites: +- Windows 7 or newer +- [Git][getting-started:git] +- [Visual Studio][getting-started:visual-studio] 2015 Update 3 or greater with the English language pack + +First, download and bootstrap vcpkg itself; it can be installed anywhere, +but generally we recommend using vcpkg as a submodule for CMake projects, +and installing it globally for Visual Studio projects. +We recommend somewhere like `C:\src\vcpkg` or `C:\dev\vcpkg`, +since otherwise you may run into path issues for some port build systems. + +```cmd +> git clone https://github.com/microsoft/vcpkg +> .\vcpkg\bootstrap-vcpkg.bat +``` + +To install the libraries for your project, run: + +```cmd +> .\vcpkg\vcpkg install [packages to install] +``` + +You can also search for the libraries you need with the `search` subcommand: + +```cmd +> .\vcpkg\vcpkg search [search term] +``` + +In order to use vcpkg with Visual Studio, +run the following command (may require administrator elevation): + +```cmd +> .\vcpkg\vcpkg integrate install +``` + +After this, you can now create a New non-CMake Project (or open an existing one). +All installed libraries are immediately ready to be `#include`'d and used +in your project without additional configuration. + +If you're using CMake with Visual Studio, +continue [here](#vcpkg-with-visual-studio-cmake-projects). + +In order to use vcpkg with CMake outside of an IDE, +you can use the toolchain file: + +```cmd +> cmake -B [build directory] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake +> cmake --build [build directory] +``` + +With CMake, you will still need to `find_package` and the like to use the libraries. +Check out the [CMake section](#using-vcpkg-with-cmake) for more information, +including on using CMake with an IDE. + +For any other tools, including Visual Studio Code, +check out the [integration guide][getting-started:integration]. + +## Quick Start: Unix + +Prerequisites for Linux: +- [Git][getting-started:git] +- [g++][getting-started:linux-gcc] >= 6 + +Prerequisites for macOS: +- [Apple Developer Tools][getting-started:macos-dev-tools] +- On macOS 10.14 or below, you will also need: + - [Homebrew][getting-started:macos-brew] + - [g++][getting-started:macos-gcc] >= 6 from Homebrew + +First, download and bootstrap vcpkg itself; it can be installed anywhere, +but generally we recommend using vcpkg as a submodule for CMake projects. + +```sh +$ git clone https://github.com/microsoft/vcpkg +$ ./vcpkg/bootstrap-vcpkg.sh +``` + +To install the libraries for your project, run: + +```sh +$ ./vcpkg/vcpkg install [packages to install] +``` + +You can also search for the libraries you need with the `search` subcommand: + +```sh +$ ./vcpkg/vcpkg search [search term] +``` + +In order to use vcpkg with CMake, you can use the toolchain file: + +```sh +$ cmake -B [build directory] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake +$ cmake --build [build directory] +``` + +With CMake, you will still need to `find_package` and the like to use the libraries. +Check out the [CMake section](#using-vcpkg-with-cmake) +for more information on how best to use vcpkg with CMake, +and CMake Tools for VSCode. + +For any other tools, check out the [integration guide][getting-started:integration]. + +## Installing Linux Developer Tools + +Across the different distros of Linux, there are different packages you'll +need to install: + +- Debian, Ubuntu, popOS, and other Debian-based distributions: + +```sh +$ sudo apt-get update +$ sudo apt-get install build-essential tar curl zip unzip +``` + +- CentOS + +```sh +$ sudo yum install centos-release-scl +$ sudo yum install devtoolset-7 +$ scl enable devtoolset-7 bash +``` + +For any other distributions, make sure you're installing g++ 6 or above. +If you want to add instructions for your specific distro, +[please open a PR][contributing:submit-pr]! + +## Installing macOS Developer Tools + +On macOS 10.15, the only thing you should need to do is run the following in your terminal: + +```sh +$ xcode-select --install +``` + +Then follow along with the prompts in the windows that comes up. + +On macOS 10.14 and previous, you'll also need to install g++ from homebrew; +follow the instructions in the following section. + +### Installing GCC for macOS before 10.15 + +This will _only_ be necessary if you're using a macOS version from before 10.15. +Installing homebrew should be very easy; check out for more information, +but at its simplest, run the following command: + +```sh +$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" +``` + +Then, in order to grab an up-to-date version of gcc, run the following: + +```sh +$ brew install gcc +``` + +You'll then be able to bootstrap vcpkg along with the [quick start guide](#quick-start-unix) + +## Using vcpkg with CMake + +If you're using vcpkg with CMake, the following may help! + +### Visual Studio Code with CMake Tools + +Adding the following to your workspace `settings.json` will make +CMake Tools automatically use vcpkg for libraries: + +```json +{ + "cmake.configureSettings": { + "CMAKE_TOOLCHAIN_FILE": "[vcpkg root]/scripts/buildsystems/vcpkg.cmake" + } +} +``` + +### Vcpkg with Visual Studio CMake Projects + +Open the CMake Settings Editor, and under `CMake toolchain file`, +add the path to the vcpkg toolchain file: + +``` +[vcpkg root]/scripts/buildsystems/vcpkg.cmake +``` + +### Vcpkg with CLion + +Open the Toolchains settings +(File > Settings on Windows and Linux, CLion > Preferences on macOS), +and go to the CMake settings (Build, Execution, Deployment > CMake). +Finally, in `CMake options`, add the following line: + +``` +-DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake +``` + +Unfortunately, you'll have to add this to each profile. + +### Vcpkg as a Submodule + +When using vcpkg as a submodule of your project, +you can add the following to your CMakeLists.txt before the first `project()` call, +instead of passing `CMAKE_TOOLCHAIN_FILE` to the cmake invocation. + +```cmake +set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake + CACHE STRING "Vcpkg toolchain file") +``` + +This will still allow people to not use vcpkg, +by passing the `CMAKE_TOOLCHAIN_FILE` directly, +but it will make the configure-build step slightly easier. + +[getting-started:using-a-package]: docs/examples/installing-and-using-packages.md +[getting-started:integration]: docs/users/integration.md +[getting-started:git]: https://git-scm.com/downloads +[getting-started:cmake-tools]: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools +[getting-started:linux-gcc]: #installing-linux-developer-tools +[getting-started:macos-dev-tools]: #installing-macos-developer-tools +[getting-started:macos-brew]: #installing-gcc-on-macos +[getting-started:macos-gcc]: #installing-gcc-on-macos +[getting-started:visual-studio]: https://visualstudio.microsoft.com/ +[getting-started:manifest-spec]: docs/specifications/manifests.md + +# Tab-Completion/Auto-Completion + +`vcpkg` supports auto-completion of commands, package names, +and options in both powershell and bash. +To enable tab-completion in the shell of your choice, run: + +```pwsh +> .\vcpkg integrate powershell +``` + +or + +```sh +$ ./vcpkg integrate bash +``` + +depending on the shell you use, then restart your console. + +# Examples + +See the [documentation](docs/index.md) for specific walkthroughs, +including [installing and using a package](docs/examples/installing-and-using-packages.md), +[adding a new package from a zipfile](docs/examples/packaging-zipfiles.md), +and [adding a new package from a GitHub repo](docs/examples/packaging-github-repos.md). + +Our docs are now also available online at ReadTheDocs: ! + +See a 4 minute [video demo](https://www.youtube.com/watch?v=y41WFKbQFTw). + +# Contributing + +Vcpkg is an open source project, and is thus built with your contributions. +Here are some ways you can contribute: + +* [Submit Issues][contributing:submit-issue] in vcpkg or existing packages +* [Submit Fixes and New Packages][contributing:submit-pr] + +Please refer to our [Contributing Guide](CONTRIBUTING.md) for more details. + +This project has adopted the [Microsoft Open Source Code of Conduct][contributing:coc]. +For more information see the [Code of Conduct FAQ][contributing:coc-faq] +or email [opencode@microsoft.com](mailto:opencode@microsoft.com) +with any additional questions or comments. + +[contributing:submit-issue]: https://github.com/microsoft/vcpkg/issues/new/choose +[contributing:submit-pr]: https://github.com/microsoft/vcpkg/pulls +[contributing:coc]: https://opensource.microsoft.com/codeofconduct/ +[contributing:coc-faq]: https://opensource.microsoft.com/codeofconduct/ + +# License + +The code in this repository is licensed under the [MIT License](LICENSE.txt). + +# Telemetry + +vcpkg collects usage data in order to help us improve your experience. +The data collected by Microsoft is anonymous. +You can opt-out of telemetry by re-running the bootstrap-vcpkg script with -disableMetrics, +passing --disable-metrics to vcpkg on the command line, +or by setting the VCPKG_DISABLE_METRICS environment variable. + +Read more about vcpkg telemetry at docs/about/privacy.md diff --git a/vcpkg/README_es.md b/vcpkg/README_es.md new file mode 100644 index 0000000..74ad86e --- /dev/null +++ b/vcpkg/README_es.md @@ -0,0 +1,399 @@ +# Vcpkg + +Vcpkg ayuda a manejar librerías de C y C++ en Windows, Linux y MacOS. +Esta herramienta y ecosistema se encuentran en constante evolución ¡Siempre apreciamos contribuciones nuevas! + +Si nunca ha usado Vcpkg antes, +o si está intentando aprender a usar vcpkg, consulte nuestra sección +[Primeros pasos](#primeros-pasos) para iniciar a usar Vcpkg. + +Para una descripción corta de los comandos disponibles, +una vez instalado Vcpkg puede ejecutar `vcpkg help`, o +`vcpkg help [comando]` para obtener ayuda específica de un comando. + +* Github: [https://github.com/microsoft/vcpkg](https://github.com/microsoft/vcpkg) +* Slack: [https://cppalliance.org/slack/](https://cppalliance.org/slack/), en el canal #vcpkg +* Discord: [\#include \](https://www.includecpp.org), en el canal #ðŸŒvcpkg +* Docs: [Documentación](docs/index.md) + +[![Estado de compilación](https://dev.azure.com/vcpkg/public/_apis/build/status/microsoft.vcpkg.ci?branchName=master)](https://dev.azure.com/vcpkg/public/_build/latest?definitionId=29&branchName=master) + +## Tabla de contenido + +* [Vcpkg: General](#vcpkg-general) +* [Tabla de contenidos](#tabla-de-contenidos) +* ["Primeros pasos"](#primeros-pasos) + + [Inicio rápido: Windows](#inicio-rápido-windows) + + [Inicio rápido: Unix](#inicio-rápido-unix) + + [Instalando herramientas de desarrollo en Linux](#instalando-herramientas-de-desarrollo-en-Linux) + + [Instalando herramientas de desarrollo en macOS](#instalando-herramientas-de-desarrollo-en-macos) + - [Instalando GCC en MacOS previo a 10.15](#instalando-gcc-en-macos-previo-a-10.15) + + [Usando Vcpkg con CMake](#usando-vcpkg-con-cmake) + - [Visual Studio Code con CMake Tools](#visual-studio-code-con-cmake-tools) + - [Vcpkg con proyectos de Visual Studio (CMake)](#vcpkg-con-proyectos-de-visual-studio\(CMake\)) + - [Vcpkg con CLion](#vcpkg-con-clion) + - [Vcpkg como submódulo](#vcpkg-como-submódulo) + + [Inicio rápido: archivos de Manifiesto](#inicio-rápido-manifiestos) +* [Tab-Completado/Autocompletado](#Completado-TabAutocompletado) +* [Ejemplos](#ejemplos) +* [Contribuyendo](#contribuyendo) +* [Licencia](#licencia) +* [telemetría](#telemetría) + +## Primeros pasos + +Antes de iniciar, siga la guía ya sea para [Windows](#inicio-rápido-windows), +o [macOS y Linux](#inicio-rápido-unix) dependiendo del SO que use. + +Para más información, ver [Instalando y Usando Paquetes][getting-started:using-a-package]. +Si una librería que necesita no está presente en el catálogo de vcpkg, +puede [abrir una incidencia en el repositorio de GitHub][contributing:submit-issue] +donde el equipo de vcpkg y la comunidad pueden verlo, y potencialmente hacer un port a vcpkg. + +Después de tener Vcpkg instalado y funcionando, +puede que desee añadir [completado con tab](#Completado-TabAuto-Completado) en su terminal. + +Finalmente, si está interesado en el futuro de Vcpkg, +puede ver la guía de [archivos de manifiesto][getting-started:manifest-spec]! +esta es una característica experimental y es probable que tenga errores, +así que se recomienda revisar y [crear incidencias][contributing:submit-issue]! + +### Inicio Rápido: Windows + +Prerrequisitos: + +- Windows 7 o superior +- [Git][getting-started:git] +- [Visual Studio][getting-started:visual-studio] 2015 Update 3 o superior con el paquete Inglés de Visual Studio. + +Primero, descargue y compile vcpkg; puede ser instalado en cualquier lugar, +pero generalmente recomendamos usar vcpkg como submódulo para proyectos de CMake, +e instalándolo globalmente para Proyectos de Visual Studio. +recomendamos un lugar como `C:\src\vcpkg` o `C:\dev\vcpkg`, +ya que de otra forma puede encontrarse problemas de ruta para algunos sistemas de port. + +```cmd +> git clone https://github.com/microsoft/vcpkg +> .\vcpkg\bootstrap-vcpkg.bat +``` + +Para instalar las librerías para su proyecto, ejecute: + +```cmd +> .\vcpkg\vcpkg install [paquetes a instalar] +``` + +también puede buscar librerías que necesite usar el comando `search`: + +```cmd +> .\vcpkg\vcpkg search [término de búsqueda] +``` + +Para poder utilizar vcpkg con Visual Studio, +ejecute el siguiente comando (puede requerir privilegios de administrador): + +```cmd +> .\vcpkg\vcpkg integrate install +``` + +Después de esto, puede crear un nuevo proyecto que no sea de CMake(MSBuild) o abrir uno existente. +Todas las librerías estarán listas para ser incluidas y +usadas en su proyecto sin configuración adicional. + +Si está usando CMake con Visual Studio, +continúe [aquí](#vcpkg-con-proyectos-de-visual-studio\(CMake\)). + +Para utilizar Vcpkg con CMake sin un IDE, +puede utilizar el archivo de herramientas incluido: + +```cmd +> cmake -B [directorio de compilación] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake +> cmake --build [directorio de compilación] +``` + +Con CMake, todavía necesitara `find_package` y las configuraciones adicionales de la librería. +Revise la [Sección de Cmake](#usando-vcpkg-con-cmake) para más información, +incluyendo el uso de CMake con un IDE. + +Para cualquier otra herramienta, incluyendo Visual Studio Code, +reviste la [guía de integración][getting-started:integration]. + +### Inicio rápido: Unix + +Prerrequisitos para Linux: + +- [Git][getting-started:git] +- [G++/GCC][getting-started:linux-gcc] >= 6 + +Prerrequisitos para macOS: + +- [Herramientas de desarrollo de Apple][getting-started:macos-dev-tools] +- En macOS 10.14 o inferior, también necesita: + - [Homebrew][getting-started:macos-brew] + - [g++][getting-started:macos-gcc] >= 6 de Homebrew + +Primero, descargue y compile vcpkg, puede ser instalado donde sea, +pero recomendamos usar vcpkg como submodulo para proyectos de CMake. + +```sh +$ git clone https://github.com/microsoft/vcpkg +$ ./vcpkg/bootstrap-vcpkg.sh +``` + +Para instalar las librerías para su proyecto, ejecute: + +```sh +$ ./vcpkg/vcpkg install [paquetes a instalar] +``` + +También puede buscar las librerías que necesita con el subcomando `search`: + +```sh +$ ./vcpkg/vcpkg search [término de búsqueda] +``` + +Para usar vcpkg con CMake, tiene que usar el siguiente archivo toolchain: + +```sh +$ cmake -B [directorio de compilación] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake +$ cmake --build [directorio de compilación] +``` + +Con CMake, todavía necesitara `find_package` y las configuraciones adicionales de la librería. +Revise la [Sección de CMake](#usando-vcpkg-con-cmake) +para más información en cómo aprovechar mejor Vcpkg con CMake, +y CMake tools para VSCode. + +Para cualquier otra herramienta, visite la [guía de integración][getting-started:integration]. + +### Instalando Herramientas de desarrollo en Linux + +Según las distribuciones de Linux, hay diferentes paquetes +que necesitará instalar: + +- Debian, Ubuntu, popOS, y otra distribución basada en Debian: + +```sh +$ sudo apt-get update +$ sudo apt-get install build-essential tar curl zip unzip +``` + +- CentOS + +```sh +$ sudo yum install centos-release-scl +$ sudo yum install devtoolset-7 +$ scl enable devtoolset-7 bash +``` + +Para cualquier otra distribución, asegúrese que dispone de g++ 6 o superior. +Si desea añadir instrucción para una distribución específica, +[cree un pull request][contributing:submit-pr] + +### Instalando Herramientas de desarrollo en macOS + +En macOS 10.15, solo tiene que ejecutar el siguiente comando en la terminal: + +```sh +$ xcode-select --install +``` + +Luego seguir los pasos que aparecerán en las ventanas que se muestran. + +En macOS 10.14 y previos, también requiere instalar g++ de homebrew; +siguiendo los pasos en la sección siguiente. + +#### Instalando GCC en macOS previo a 10.15 + +Este paso _solo_ es requerido si está usando una versión de macOS previa a 10.15. +Instalar homebrew debería ser sencillo; visite para mas información, +pero de manera simple, ejecute el siguiente comando: + +```sh +$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" +``` + +luego, para obtener una versión actualizada de gcc, ejecute el comando: + +```sh +$ brew install gcc +``` + +Posteriormente podrá compilar vcpkg junto con la [guía de inicio rápido](#inicio-rápido-unix) + +### Usando Vcpkg con CMake + +¡Si está usando Vcpkg con CMake, lo siguiente puede ayudar! + +#### Visual Studio Code con CMake Tools + +Agregando lo siguiente al espacio de trabajo `settings.json` permitirá que +CMake Tools use automáticamente Vcpkg para las librerías: + +```json +{ + "cmake.configureSettings": { + "CMAKE_TOOLCHAIN_FILE": "[raíz de vcpkg]/scripts/buildsystems/vcpkg.cmake" + } +} +``` + +#### Vcpkg con proyectos de Visual Studio(CMake) + +Abra el editor de Ajustes de CMake, bajo la sección `CMake toolchain file`, +posteriormente agregue al path el archivo de cadena de herramientas de Vcpkg: + +```sh +[raíz de vcpkg]/scripts/buildsystems/vcpkg.cmake +``` + +#### Vcpkg con CLion + +Abra los ajustes de Cadena de Herramientas (Toolchains) +(File > Settings en Windows y Linux, Clion > Preferences en macOS), +y entre en la sección de ajustes de CMake (Build, Execution, Deployment > CMake). +Finalmente, en `CMake options`, agregue la línea siguiente: + +```sh +-DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake +``` + +Desafortunadamente, tendrá que hacerlo para cada perfil. + +#### Vcpkg como Submódulo + +Cuando este usando Vcpkg como un submódulo para su proyecto, +puede agregar lo siguiente as su CMakeLists,txt antes de la primera llamada a `project()`, +en vez de pasar `CMAKE_TOOLCHAIN_FILE` a la invocación de CMake. + +```cmake +set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake + CACHE STRING "Vcpkg toolchain file") +``` + +Esto permitirá a las personas no usar Vcpkg, +indicando el `CMAKE_TOOLCHAIN_FILE` directamente, +sin embargo, hará el proceso de configuración y compilación más sencillo. + +### Inicio rápido: Manifiestos + +Así que desea ver cómo será el futuro de Vcpkg! +realmente lo apreciamos. Sin embargo, primero una advertencia: +el soporte de archivos de manifiesto aún está en beta, +aun así la mayoría debería funcionar, +pero no hay garantía de esto y es muy probable que encuentre uno o más bugs +mientras use Vcpkg en este modo. +Adicionalmente, es probablemente que se rompan comportamientos antes de que se pueda considerar estable, +así que está advertido. +Por favor [Abra un Problema][contributing:submit-issue] si encuentra algún error + +Primero, instale vcpkg normalmente para [Windows](#inicio-rápido-windows) o +[Unix](#inicio-rápido-unix). +Puede que desee instalar Vcpkg en un lugar centralizado, +ya que el directorio existe localmente, +y está bien ejecutar múltiples comandos desde el mismo directorio de vcpkg al mismo tiempo. + +Luego, se requiere activar la bandera de característica `manifests` en vcpkg agregando +`manifests` a los valores separados por coma en la opción `--feature-flags`, +o agregándole en los valores separados por coma en la variable de entorno `VCPKG_FEATURE_FLAGS` + +también puede que desee agregar Vcpkg al `PATH`. + +Luego, todo lo que hay que hacer es crear un manifiesto; +cree un archivo llamado `vcpkg.json`, y escriba lo siguiente: + +```json +{ + "name": "", + "version-string": "", + "dependencies": [ + "abseil", + "boost" + ] +} +``` + +Las librerías serán instaladas en el directorio `vcpkg_installed`, +en el mismo directorio que su `vcpkg.json`. +Si puede usar el regular conjunto de herramientas de CMake, +o mediante la integración de Visual Studio/MSBuild, +este instalará las dependencias automáticamente, +pero necesitará ajustar `VcpkgManifestEnabled` en `On` para MSBuild. +Si desea instalar sus dependencias sin usar CMake o MSBuild, +puede usar un simple `vcpkg install --feature-flags=manifests` + +Para más información, revise la especificación de [manifiesto][getting-started:manifest-spec] + +[getting-started:using-a-package]: docs/examples/installing-and-using-packages.md +[getting-started:integration]: docs/users/integration.md +[getting-started:git]: https://git-scm.com/downloads +[getting-started:cmake-tools]: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools +[getting-started:linux-gcc]: #installing-linux-developer-tools +[getting-started:macos-dev-tools]: #installing-macos-developer-tools +[getting-started:macos-brew]: #installing-gcc-on-macos +[getting-started:macos-gcc]: #installing-gcc-on-macos +[getting-started:visual-studio]: https://visualstudio.microsoft.com/ +[getting-started:manifest-spec]: docs/specifications/manifests.md + +## Completado-Tab/Autocompletado + +`vcpkg` soporta autocompletado para los comandos, nombres de paquetes, +y opciones, tanto en PowerShell como en bash. +para activar el autocompletado en la terminal de elección ejecute: + +```pwsh +> .\vcpkg integrate powershell +``` + +o + +```sh +$ ./vcpkg integrate bash +``` + +según la terminal que use, luego reinicie la consola. + +## Ejemplos + +ver la [documentación](docs/index.md) para tutoriales específicos, incluyendo +[instalando y usando un paquete](docs/examples/installing-and-using-packages.md), +[agregando un nuevo paquete desde un archivo comprimido](docs/examples/packaging-zipfiles.md), +[agregando un nuevo paquete desde un repositorio en GitHub](docs/examples/packaging-github-repos.md). + +Nuestra documentación se encuentra online en ReadTheDocs: ! + +Ver un [video de demostración](https://www.youtube.com/watch?v=y41WFKbQFTw) de 4 minutos. + +## Contribuyendo + +Vcpkg es un proyecto de código abierto, y está construido con sus contribuciones. +Aquí hay unas de las maneras en las que puede contribuir: + +* [Creando Incidencias][contributing:submit-issue] en vcpkg o paquetes existentes +* [Creando Correcciones y Nuevos Paquetes][contributing:submit-pr] + +Por favor visite nuestra [Guía de Contribución](CONTRIBUTING.md) para más detalles. + +Este proyecto ha adoptado el [Código de Conducta de Microsoft de Código Abierto][contributing:coc]. +Para más información ver [Preguntas frecuentes del Código de Conducta][contributing:coc-faq] +o envíe un correo a [opencode@microsoft.com](mailto:opencode@microsoft.com) +con cualquier pregunta adicional o comentarios. + +[contributing:submit-issue]: https://github.com/microsoft/vcpkg/issues/new/choose +[contributing:submit-pr]: https://github.com/microsoft/vcpkg/pulls +[contributing:coc]: https://opensource.microsoft.com/codeofconduct/ +[contributing:coc-faq]: https://opensource.microsoft.com/codeofconduct/ + +## Licencia + +El código en este repositorio se encuentra licenciado mediante la [Licencia MIT](LICENSE.txt). + +## Telemetría + +vcpkg recolecta datos de uso para mejorar su experiencia. +La información obtenida por Microsoft es anónima. +puede ser dado de baja de la telemetría ejecutando de nuevo el script `bootstrap-vcpkg` con `-disableMetrics`, +pasando `--disable-metrics` a vcpkg en la línea de comandos, +o creando la variable de entorno `VCPKG_DISABLE_METRICS`. + +Se puede leer más sobre la telemetría de vcpkg en docs/about/privacy.md diff --git a/vcpkg/README_zh_CN.md b/vcpkg/README_zh_CN.md new file mode 100644 index 0000000..e6ce572 --- /dev/null +++ b/vcpkg/README_zh_CN.md @@ -0,0 +1,325 @@ +# Vcpkg: 总览 + +[English Overview](README.md) + +Vcpkg å¯å¸®åŠ©æ‚¨åœ¨ Windows〠Linux å’Œ MacOS ä¸Šç®¡ç† C å’Œ C++ 库。 +这个工具和生æ€é“¾æ­£åœ¨ä¸æ–­å‘å±•ï¼Œæˆ‘ä»¬ä¸€ç›´æœŸå¾…æ‚¨çš„è´¡çŒ®ï¼ + +若您从未使用过vcpkg或希望了解如何使用vcpkg,请查阅[快速开始](#入门)章节。 + +如需获å–有关å¯ç”¨å‘½ä»¤çš„简短æ述,请在编译vcpkgåŽæ‰§è¡Œ `vcpkg help` 或执行 `vcpkg help [command]` æ¥èŽ·å–具体的帮助信æ¯ã€‚ + +* Github: [https://github.com/microsoft/vcpkg](https://github.com/microsoft/vcpkg) +* Slack: [https://cppalliance.org/slack/](https://cppalliance.org/slack/), #vcpkg é¢‘é“ +* Discord: [\#include \](https://www.includecpp.org), #ðŸŒvcpkg é¢‘é“ +* 文档: [Documentation](docs/index.md) + +[![当å‰ç”ŸæˆçŠ¶æ€](https://dev.azure.com/vcpkg/public/_apis/build/status/microsoft.vcpkg.ci?branchName=master)](https://dev.azure.com/vcpkg/public/_build/latest?definitionId=29&branchName=master) + +# 目录 + +- [Vcpkg: 总览](#vcpkg-总览) +- [目录](#目录) +- [入门](#入门) + - [快速开始: Windows](#快速开始-windows) + - [快速开始: Unix](#快速开始-unix) + - [安装 Linux Developer Tools](#安装-linux-developer-tools) + - [安装 macOS Developer Tools](#安装-macos-developer-tools) + - [在 macOS 10.15 之å‰ç‰ˆæœ¬ä¸­å®‰è£… GCC](#在-macos-1015-之å‰ç‰ˆæœ¬ä¸­å®‰è£…-gcc) + - [在 CMake 中使用 vcpkg](#在-cmake-中使用-vcpkg) + - [Visual Studio Code 中的 CMake Tools](#visual-studio-code-中的-cmake-tools) + - [Visual Studio CMake 工程中使用 vcpkg](#visual-studio-cmake-工程中使用-vcpkg) + - [CLion 中使用 vcpkg](#clion-中使用-vcpkg) + - [å°† vcpkg 作为一个å­æ¨¡å—](#å°†-vcpkg-作为一个å­æ¨¡å—) +- [Tab补全/自动补全](#tab补全自动补全) + - [示例](#示例) + - [贡献者](#贡献者) +- [License](#license) +- [æ•°æ®æ”¶é›†](#æ•°æ®æ”¶é›†) + +# 入门 + +首先,请阅读以下任一方é¢çš„快速入门指å—: +[Windows](#快速开始-windows) 或 [macOSå’ŒLinux](#快速开始-unix), +è¿™å–决于您使用的是什么平å°ã€‚ + +有关更多信æ¯ï¼Œè¯·å‚è§ [安装和使用软件包][getting-started:using-a-package]。 +如果vcpkg目录中没有您需è¦çš„库, +您å¯ä»¥ [在GitHub上打开问题][contributing:submit-issue]。 +vcpkg团队和贡献者å¯ä»¥çœ‹åˆ°å®ƒçš„地方, +并å¯èƒ½å°†è¿™ä¸ªåº“添加到vcpkg。 + +安装并è¿è¡ŒvcpkgåŽï¼Œ +您å¯èƒ½å¸Œæœ›å°† [TAB补全](#tab补全自动补全) 添加到您的Shell中。 + +最åŽï¼Œå¦‚果您对vcpkg的未æ¥æ„Ÿå…´è¶£ï¼Œè¯·æŸ¥çœ‹ [清å•][getting-started:manifest-spec]ï¼ +这是一项实验性功能,å¯èƒ½ä¼šå‡ºçŽ°é”™è¯¯ã€‚ +因此,请å°è¯•ä¸€ä¸‹å¹¶[打开所有问题][contributing:submit-issue]! + +## 快速开始: Windows + +需求: +- Windows 7 或更新的版本 +- [Git][getting-started:git] +- [Visual Studio 2015 Update 3][getting-started:visual-studio] 或更新的版本(包å«è‹±æ–‡è¯­è¨€åŒ…) + +首先,请下载vcpkg并执行 bootstrap.bat 脚本。 +它å¯ä»¥å®‰è£…在任何地方,但是通常我们建议您使用 vcpkg 作为 CMake 项目的å­æ¨¡å—,并将其全局安装到 Visual Studio 项目中。 +我们建议您使用例如 `C:\src\vcpkg` 或 `C:\dev\vcpkg` 的安装目录,å¦åˆ™æ‚¨å¯èƒ½é‡åˆ°æŸäº›åº“构建系统的路径问题。 + +```cmd +> git clone https://github.com/microsoft/vcpkg +> .\vcpkg\bootstrap-vcpkg.bat +``` + +使用以下命令安装您的项目所需è¦çš„库: + +```cmd +> .\vcpkg\vcpkg install [packages to install] +``` + +您也å¯ä»¥ä½¿ç”¨ `search` å­å‘½ä»¤æ¥æŸ¥æ‰¾vcpkg中集æˆçš„库: + +```cmd +> .\vcpkg\vcpkg search [search term] +``` + +若您希望在 Visual Studio 中使用vcpkg,请è¿è¡Œä»¥ä¸‹å‘½ä»¤ (首次å¯åŠ¨éœ€è¦ç®¡ç†å‘˜æƒé™) + +```cmd +> .\vcpkg\vcpkg integrate install +``` + +在此之åŽï¼Œæ‚¨å¯ä»¥åˆ›å»ºä¸€ä¸ªéžcmake项目 (或打开已有的项目)。 +在您的项目中,所有已安装的库å‡å¯ç«‹å³ä½¿ç”¨ `#include` 包å«æ‚¨éœ€ä½¿ç”¨çš„库的头文件并无需添加é¢å¤–é…置。 + +若您在 Visual Studio 中使用cmake工程,请查阅[这里](#visual-studio-cmake-工程中使用-vcpkg)。 + +为了在IDE以外在cmake中使用vcpkg,您需è¦ä½¿ç”¨ä»¥ä¸‹å·¥å…·é“¾æ–‡ä»¶: + +```cmd +> cmake -B [build directory] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake +> cmake --build [build directory] +``` + +在cmake中,您ä»éœ€é€šè¿‡ `find_package` æ¥ä½¿ç”¨ç¬¬ä¸‰æ–¹åº“。 +请查阅 [CMake 章节](#在-cmake-中使用-vcpkg) 获å–更多信æ¯ï¼Œå…¶ä¸­åŒ…å«äº†åœ¨IDE中使用cmake的内容。 + +对于其他工具 (包括Visual Studio Code),请查阅 [集æˆæŒ‡å—][getting-started:integration]。 + +## 快速开始: Unix + +Linuxå¹³å°çš„使用需求: +- [Git][getting-started:git] +- [g++][getting-started:linux-gcc] >= 6 + +macOSå¹³å°çš„使用需求: +- [Apple Developer Tools][getting-started:macos-dev-tools] +- macOS 10.14 或更低版本中,您也需è¦: + - [Homebrew][getting-started:macos-brew] + - Homebrew 中 [g++][getting-started:macos-gcc] >= 6 + +首先,请下载vcpkg并执行 bootstrap.sh 脚本。 +我们建议您将vcpkg作为cmake项目的å­æ¨¡å—使用。 + +```sh +$ git clone https://github.com/microsoft/vcpkg +$ ./vcpkg/bootstrap-vcpkg.sh +``` + +使用以下命令安装任æ„包: + +```sh +$ ./vcpkg/vcpkg install [packages to install] +``` + +您也å¯ä»¥ä½¿ç”¨ `search` å­å‘½ä»¤æ¥æŸ¥æ‰¾vcpkg中已集æˆçš„库: + +```sh +$ ./vcpkg/vcpkg search [search term] +``` + +为了在cmake中使用vcpkg,您需è¦ä½¿ç”¨ä»¥ä¸‹å·¥å…·é“¾æ–‡ä»¶: + +```sh +$ cmake -B [build directory] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake +$ cmake --build [build directory] +``` + +在cmake中,您ä»éœ€é€šè¿‡ `find_package` æ¥ä½¿ç”¨ç¬¬ä¸‰æ–¹åº“。 +为了您更好的在cmake或 VSCode CMake Tools 中使用vcpkg, +请查阅 [CMake 章节](#在-cmake-中使用-vcpkg) 获å–更多信æ¯ï¼Œ +其中包å«äº†åœ¨IDE中使用cmake的内容。 + +对于其他工具,请查阅 [集æˆæŒ‡å—][getting-started:integration]。 + +## 安装 Linux Developer Tools + +在Linuxçš„ä¸åŒå‘行版中,您需è¦å®‰è£…ä¸åŒçš„工具包: + +- Debian,Ubuntu,popOS或其他基于 Debian çš„å‘行版: + +```sh +$ sudo apt-get update +$ sudo apt-get install build-essential tar curl zip unzip +``` + +- CentOS + +```sh +$ sudo yum install centos-release-scl +$ sudo yum install devtoolset-7 +$ scl enable devtoolset-7 bash +``` + +对于其他的å‘行版,请确ä¿å·²å®‰è£… g++ 6 或更新的版本。 +若您希望添加特定å‘行版的说明,[请æ交一个 PR][contributing:submit-pr]! + +## 安装 macOS Developer Tools + +在 macOS 10.15 中,唯一需è¦åšçš„是在终端中è¿è¡Œä»¥ä¸‹å‘½ä»¤: + +```sh +$ xcode-select --install +``` + +然åŽæŒ‰ç…§å‡ºçŽ°çš„窗å£ä¸­çš„æ示进行æ“作。 + +在 macOS 10.14 åŠå…ˆå‰ç‰ˆæœ¬ä¸­ï¼Œæ‚¨ä¹Ÿéœ€è¦ä½¿ç”¨ homebrew 安装 g++。 +请éµå¾ªä»¥ä¸‹éƒ¨åˆ†ä¸­çš„说明: + +### 在 macOS 10.15 之å‰ç‰ˆæœ¬ä¸­å®‰è£… GCC + +æ­¤æ¡åªåœ¨æ‚¨çš„macOS版本低于 10.15 时是必须的。 +安装homebrew应当很轻æ¾ï¼Œè¯·æŸ¥é˜… 以获å–更多信æ¯ã€‚ +为了更简便,请使用以下命令: + +```sh +$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" +``` + +然åŽï¼Œä¸ºäº†èŽ·å–最新版本的gcc,请è¿è¡Œä»¥ä¸‹å‘½ä»¤ï¼š + +```sh +$ brew install gcc +``` + +此时,您就å¯ä»¥ä½¿ç”¨ bootstrap.sh 编译vcpkg了。 请å‚阅 [快速开始](#快速开始-unix) + +## 在 CMake 中使用 vcpkg + +若您希望在CMake中使用vcpkg,以下内容å¯èƒ½å¸®åŠ©æ‚¨ï¼š + +### Visual Studio Code 中的 CMake Tools + +将以下内容添加到您的工作区的 `settings.json` 中将使CMake Tools自动使用vcpkg中的第三方库: + +```json +{ + "cmake.configureSettings": { + "CMAKE_TOOLCHAIN_FILE": "[vcpkg root]/scripts/buildsystems/vcpkg.cmake" + } +} +``` + +### Visual Studio CMake 工程中使用 vcpkg + +打开CMake设置选项,将 vcpkg toolchain 文件路径在 `CMake toolchain file` 中: + +``` +[vcpkg root]/scripts/buildsystems/vcpkg.cmake +``` + +### CLion 中使用 vcpkg + +打开 Toolchains 设置 +(File > Settings on Windows and Linux, CLion > Preferences on macOS), +并打开 CMake 设置 (Build, Execution, Deployment > CMake)。 +最åŽåœ¨ `CMake options` 中添加以下行: + +``` +-DCMAKE_TOOLCHAIN_FILE=[vcpkg root]/scripts/buildsystems/vcpkg.cmake +``` + +é—憾的是,您必须手动将此选项加入æ¯ä¸ªé¡¹ç›®é…置文件中。 + +### å°† vcpkg 作为一个å­æ¨¡å— + +当您希望将vcpkg作为一个å­æ¨¡å—加入到您的工程中时, +您å¯ä»¥åœ¨ç¬¬ä¸€ä¸ª `project()` 调用之å‰å°†ä»¥ä¸‹å†…容添加到 CMakeLists.txt 中, +而无需将 `CMAKE_TOOLCHAIN_FILE` 传递给cmake调用。 + +```cmake +set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake + CACHE STRING "Vcpkg toolchain file") +``` + +使用此ç§æ–¹å¼å¯æ— éœ€è®¾ç½® `CMAKE_TOOLCHAIN_FILE` å³å¯ä½¿ç”¨vcpkg,且更容易完æˆé…置工作。 + +[getting-started:using-a-package]: docs/examples/installing-and-using-packages.md +[getting-started:integration]: docs/users/integration.md +[getting-started:git]: https://git-scm.com/downloads +[getting-started:cmake-tools]: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools +[getting-started:linux-gcc]: #installing-linux-developer-tools +[getting-started:macos-dev-tools]: #installing-macos-developer-tools +[getting-started:macos-brew]: #installing-gcc-on-macos +[getting-started:macos-gcc]: #installing-gcc-on-macos +[getting-started:visual-studio]: https://visualstudio.microsoft.com/ +[getting-started:manifest-spec]: docs/specifications/manifests.md + +# Tab补全/自动补全 + +`vcpkg` 支æŒå‘½ä»¤ï¼ŒåŒ…åç§°ï¼Œä»¥åŠ Powershell å’Œ Bash 中的选项。 +若您需è¦åœ¨æŒ‡å®šçš„ shell 中å¯ç”¨Tab补全功能,请ä¾æ®æ‚¨ä½¿ç”¨çš„shellè¿è¡Œï¼š + +```pwsh +> .\vcpkg integrate powershell +``` + +或 + +```sh +$ ./vcpkg integrate bash +``` + +然åŽé‡æ–°å¯åŠ¨æŽ§åˆ¶å°ã€‚ + +## 示例 + +请查看 [文档](docs/index.md) 获å–具体示例, +å…¶åŒ…å« [安装并使用包](docs/examples/installing-and-using-packages.md), +[使用压缩文件添加包](docs/examples/packaging-zipfiles.md) +å’Œ [从GitHubæºä¸­æ·»åŠ ä¸€ä¸ªåŒ…](docs/examples/packaging-github-repos.md)。 + +我们的文档现在也å¯ä»¥ä»Ž [ReadTheDocs](https://vcpkg.readthedocs.io/) 在线获å–。 + +观看4分钟 [demo视频](https://www.youtube.com/watch?v=y41WFKbQFTw)。 + +## 贡献者 + +Vcpkg是一个开æºé¡¹ç›®ï¼Œå¹¶é€šè¿‡æ‚¨çš„贡献ä¸æ–­å‘展。 +下é¢æ˜¯ä¸€äº›æ‚¨å¯ä»¥è´¡çŒ®çš„æ–¹å¼: + +* [æ交一个关于vcpkg或已支æŒåŒ…çš„æ–°issue][contributing:submit-issue] +* [æ交修å¤PR和创建新包][contributing:submit-pr] + +请å‚阅我们的 [贡献准则](CONTRIBUTING.md) 了解更多详细信æ¯ã€‚ + +该项目采用了 [Microsoftå¼€æºè¡Œä¸ºå‡†åˆ™][contributing:coc]。 +获å–更多信æ¯è¯·æŸ¥çœ‹ [行为准则FAQ][contributing:coc-faq] 或è”ç³» [opencode@microsoft.com](mailto:opencode@microsoft.com)æ出其他问题或æ„è§ã€‚ + +[contributing:submit-issue]: https://github.com/microsoft/vcpkg/issues/new/choose +[contributing:submit-pr]: https://github.com/microsoft/vcpkg/pulls +[contributing:coc]: https://opensource.microsoft.com/codeofconduct/ +[contributing:coc-faq]: https://opensource.microsoft.com/codeofconduct/ + +# License + +在此存储库中使用的代ç å‡éµå¾ª [MIT License](LICENSE.txt)。 + +# æ•°æ®æ”¶é›† + +vcpkg会收集使用情况数æ®ï¼Œä»¥å¸®åŠ©æˆ‘们改善您的体验。 +Microsoft收集的数æ®æ˜¯åŒ¿å的。 +您也å¯ä»¥é€šè¿‡ä½¿ç”¨ `-disableMetrics` ã€åœ¨å‘½ä»¤è¡Œä¸Šå°†`--disable-metrics`传递给vcpkg,或通过设置环境å˜é‡ `VCPKG_DISABLE_METRICS` 并é‡æ–°è¿è¡Œ bootstrap-vcpkg 脚本æ¥é€‰æ‹©ç¦ç”¨æ•°æ®æ”¶é›†ã€‚ +请在 [privacy.md](docs/about/privacy.md) 中了解有关 vcpkg æ•°æ®æ”¶é›†çš„更多信æ¯ã€‚ diff --git a/vcpkg/bootstrap-vcpkg.bat b/vcpkg/bootstrap-vcpkg.bat new file mode 100644 index 0000000..1f9baa3 --- /dev/null +++ b/vcpkg/bootstrap-vcpkg.bat @@ -0,0 +1,2 @@ +@echo off +powershell.exe -NoProfile -ExecutionPolicy Bypass "& {& '%~dp0scripts\bootstrap.ps1' %*}" diff --git a/vcpkg/bootstrap-vcpkg.sh b/vcpkg/bootstrap-vcpkg.sh new file mode 100644 index 0000000..7165a72 --- /dev/null +++ b/vcpkg/bootstrap-vcpkg.sh @@ -0,0 +1,4 @@ +#!/bin/sh -e + +vcpkgRootDir=$(X= cd -- "$(dirname -- "$0")" && pwd -P) +. "$vcpkgRootDir/scripts/bootstrap.sh" diff --git a/vcpkg/ports/3fd/DataException.patch b/vcpkg/ports/3fd/DataException.patch new file mode 100644 index 0000000..106411c --- /dev/null +++ b/vcpkg/ports/3fd/DataException.patch @@ -0,0 +1,107 @@ +diff --git a/3FD/broker_impl_reader.cpp b/3FD/broker_impl_reader.cpp +index 98bd68a..d5948b5 100644 +--- a/3FD/broker_impl_reader.cpp ++++ b/3FD/broker_impl_reader.cpp +@@ -185,7 +185,7 @@ namespace broker + + core::Logger::Write(oss.str(), core::Logger::PRIO_INFORMATION); + } +- catch (Poco::Data::DataException &ex) ++ catch (Poco::DataException &ex) + { + CALL_STACK_TRACE; + std::ostringstream oss; +@@ -264,7 +264,7 @@ namespace broker + + m_messages.reserve(msgCountStepLimit); + } +- catch (Poco::Data::DataException &ex) ++ catch (Poco::DataException &ex) + { + CALL_STACK_TRACE; + std::ostringstream oss; +@@ -317,7 +317,7 @@ namespace broker + { + core::Logger::Write(ex, core::Logger::PRIO_CRITICAL); + } +- catch (Poco::Data::DataException &ex) ++ catch (Poco::DataException &ex) + { + std::ostringstream oss; + oss << "Failed to end transaction reading messages from broker queue. " +@@ -520,7 +520,7 @@ namespace broker + m_dbSession.rollback(); + return true; + } +- catch (Poco::Data::DataException &ex) ++ catch (Poco::DataException &ex) + { + std::ostringstream oss; + oss << "Failed to rollback transaction reading messages from broker queue. " +@@ -563,7 +563,7 @@ namespace broker + m_dbSession.commit(); + return true; + } +- catch (Poco::Data::DataException &ex) ++ catch (Poco::DataException &ex) + { + std::ostringstream oss; + oss << "Failed to commit transaction reading messages from broker queue. " +diff --git a/3FD/broker_impl_writer.cpp b/3FD/broker_impl_writer.cpp +index b237ba4..f9531c4 100644 +--- a/3FD/broker_impl_writer.cpp ++++ b/3FD/broker_impl_writer.cpp +@@ -241,7 +241,7 @@ namespace broker + + core::Logger::Write(oss.str(), core::Logger::PRIO_INFORMATION); + } +- catch (Poco::Data::DataException &ex) ++ catch (Poco::DataException &ex) + { + CALL_STACK_TRACE; + std::ostringstream oss; +@@ -348,7 +348,7 @@ namespace broker + { + core::Logger::Write(ex, core::Logger::PRIO_CRITICAL); + } +- catch (Poco::Data::DataException &ex) ++ catch (Poco::DataException &ex) + { + std::ostringstream oss; + oss << "Failed to end transaction writing messages into broker queue. " +@@ -405,7 +405,7 @@ namespace broker + { + m_future->get(); + } +- catch (Poco::Data::DataException &ex) ++ catch (Poco::DataException &ex) + { + std::ostringstream oss; + oss << "Failed to write messages into broker queue. " +@@ -455,7 +455,7 @@ namespace broker + m_dbSession.rollback(); + return true; + } +- catch (Poco::Data::DataException &ex) ++ catch (Poco::DataException &ex) + { + std::ostringstream oss; + oss << "Failed to rollback transaction writing messages into broker queue. " +@@ -498,7 +498,7 @@ namespace broker + m_dbSession.commit(); + return true; + } +- catch (Poco::Data::DataException &ex) ++ catch (Poco::DataException &ex) + { + std::ostringstream oss; + oss << "Failed to commit transaction writing messages into broker queue. " +@@ -589,7 +589,7 @@ namespace broker + { + throw; // just forward exceptions from errors known to have been already handled + } +- catch (Poco::Data::DataException &ex) ++ catch (Poco::DataException &ex) + { + std::ostringstream oss; + oss << "Failed to write messages into broker queue. " diff --git a/vcpkg/ports/3fd/RapidXML.patch b/vcpkg/ports/3fd/RapidXML.patch new file mode 100644 index 0000000..fdb6cd1 --- /dev/null +++ b/vcpkg/ports/3fd/RapidXML.patch @@ -0,0 +1,13 @@ +diff --git a/3FD/configuration.cpp b/3FD/configuration.cpp +index b9ca804..207a397 100644 +--- a/3FD/configuration.cpp ++++ b/3FD/configuration.cpp +@@ -2,7 +2,7 @@ + #include "configuration.h" + #include "exceptions.h" + #include "utils_io.h" +-#include ++#include + + #ifdef _3FD_PLATFORM_WINRT + # include "utils_winrt.h" diff --git a/vcpkg/ports/3fd/portfile.cmake b/vcpkg/ports/3fd/portfile.cmake new file mode 100644 index 0000000..40c9021 --- /dev/null +++ b/vcpkg/ports/3fd/portfile.cmake @@ -0,0 +1,105 @@ +include(vcpkg_common_functions) + +# Check architecture: +if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(BUILD_ARCH "Win32") +elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(BUILD_ARCH "x64") +elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(BUILD_ARCH "ARM") +else() + message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() + +# Check library linkage: +vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT) + +# Get source code: +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO faburaya/3FD + REF v2.6.2 + SHA512 a2444cc07d8741540c6071ac59bc8c63785db52e412a843aa18a5dfa0144b5001d428e44bcb520238e3d476440bc74526343f025005f05d534e732645f59cbe0 + HEAD_REF master + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/remove-seekpos.patch" + "${CMAKE_CURRENT_LIST_DIR}/DataException.patch" + "${CMAKE_CURRENT_LIST_DIR}/RapidXML.patch" +) + +# Copy the sources to ensure a clean, out-of-source build +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-all) +file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-all) +file(COPY ${SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-all) +get_filename_component(LAST_DIR_NAME "${SOURCE_PATH}" NAME) +set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-all/${LAST_DIR_NAME}") + +# Build: +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") # UWP: + vcpkg_build_msbuild( + USE_VCPKG_INTEGRATION + PROJECT_PATH ${SOURCE_PATH}/3FD/3FD.WinRT.UWP.vcxproj + PLATFORM ${BUILD_ARCH} + ) +elseif (NOT VCPKG_CMAKE_SYSTEM_NAME) # Win32: + vcpkg_build_msbuild( + USE_VCPKG_INTEGRATION + PROJECT_PATH ${SOURCE_PATH}/3FD/3FD.vcxproj + PLATFORM ${BUILD_ARCH} + TARGET Build + ) +else() + message(FATAL_ERROR "Unsupported system: 3FD is not currently ported to VCPKG in ${VCPKG_CMAKE_SYSTEM_NAME}!") +endif() + +# Install: +file(GLOB HEADER_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/3FD/*.h") +file(INSTALL + ${HEADER_FILES} + DESTINATION ${CURRENT_PACKAGES_DIR}/include/3FD + PATTERN "*_impl*.h" EXCLUDE + PATTERN "*example*.h" EXCLUDE + PATTERN "stdafx.h" EXCLUDE + PATTERN "targetver.h" EXCLUDE +) + +file(INSTALL ${SOURCE_PATH}/btree DESTINATION ${CURRENT_PACKAGES_DIR}/include/3FD) +file(INSTALL ${SOURCE_PATH}/OpenCL/CL DESTINATION ${CURRENT_PACKAGES_DIR}/include/3FD) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/3FD) +file(INSTALL + ${SOURCE_PATH}/3FD/3fd-config-template.xml + DESTINATION ${CURRENT_PACKAGES_DIR}/share/3FD +) + +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") # Visual C++, UWP app: + file(INSTALL + ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Debug/3FD.WinRT.UWP/3FD.WinRT.UWP.lib + ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Debug/3FD.WinRT.UWP/_3FD_WinRT_UWP.pri + ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Debug/WinRT.UWP/3FD.WinRT.UWP.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + file(INSTALL + ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Release/3FD.WinRT.UWP/3FD.WinRT.UWP.lib + ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Release/3FD.WinRT.UWP/_3FD_WinRT_UWP.pri + ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Release/WinRT.UWP/3FD.WinRT.UWP.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) +else() # Visual C++, Win32 app: + file(INSTALL + ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Debug/3FD.lib + ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Debug/3FD.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + file(INSTALL + ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Release/3FD.lib + ${SOURCE_PATH}/3FD/${BUILD_ARCH}/Release/3FD.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/3fd RENAME copyright) +file(INSTALL ${SOURCE_PATH}/Acknowledgements.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/3fd) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/3fd/remove-seekpos.patch b/vcpkg/ports/3fd/remove-seekpos.patch new file mode 100644 index 0000000..6c77cdc --- /dev/null +++ b/vcpkg/ports/3fd/remove-seekpos.patch @@ -0,0 +1,13 @@ +diff --git a/3fd/web_wws_impl_host.cpp b/3fd/web_wws_impl_host.cpp +index b87dc75..1cff45f 100644 +--- a/3fd/web_wws_impl_host.cpp ++++ b/3fd/web_wws_impl_host.cpp +@@ -48,7 +48,7 @@ namespace wws + throw AppException(oss.str()); + } + +- const auto fileSizeBytes = inputStream.seekg(0, std::ios::end).tellg().seekpos(); // move cursor to the end to get the zize ++ const auto fileSizeBytes = inputStream.seekg(0, std::ios::end).tellg(); // move cursor to the end to get the zize + + // File is not trunked: + if (fileSizeBytes > 0) diff --git a/vcpkg/ports/3fd/vcpkg.json b/vcpkg/ports/3fd/vcpkg.json new file mode 100644 index 0000000..92c53d3 --- /dev/null +++ b/vcpkg/ports/3fd/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "3fd", + "version-string": "2.6.2", + "port-version": 3, + "description": "C++ Framework For Fast Development", + "dependencies": [ + { + "name": "boost-lockfree", + "platform": "windows" + }, + { + "name": "boost-regex", + "platform": "windows" + }, + { + "name": "poco", + "platform": "windows" + }, + "rapidxml", + "sqlite3" + ] +} diff --git a/vcpkg/ports/7zip/CMakeLists.txt b/vcpkg/ports/7zip/CMakeLists.txt new file mode 100644 index 0000000..4ed9005 --- /dev/null +++ b/vcpkg/ports/7zip/CMakeLists.txt @@ -0,0 +1,384 @@ +# Created from 7-zip v19.00 - 7zip/CPP/7zip/Bundles/Format7zF + +cmake_minimum_required(VERSION 3.11) +cmake_policy(VERSION 3.11) + +project(7zip LANGUAGES C CXX ASM_MASM) + +set(SRC_ASM + Asm/x86/AesOpt.asm + Asm/x86/7zCrcOpt.asm + Asm/x86/XzCrc64Opt.asm +) + +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set_source_files_properties(${SRC_ASM} PROPERTIES COMPILE_FLAGS "-Dx64") +else() + set_source_files_properties(${SRC_ASM} PROPERTIES COMPILE_FLAGS "-safeseh") +endif() + +set(SRC_COMPRESS + CPP/7zip/Compress/Bcj2Coder.cpp + CPP/7zip/Compress/Bcj2Register.cpp + CPP/7zip/Compress/BcjCoder.cpp + CPP/7zip/Compress/BcjRegister.cpp + CPP/7zip/Compress/BitlDecoder.cpp + CPP/7zip/Compress/BranchMisc.cpp + CPP/7zip/Compress/BranchRegister.cpp + CPP/7zip/Compress/ByteSwap.cpp + CPP/7zip/Compress/BZip2Crc.cpp + CPP/7zip/Compress/BZip2Decoder.cpp + CPP/7zip/Compress/BZip2Encoder.cpp + CPP/7zip/Compress/BZip2Register.cpp + CPP/7zip/Compress/CopyCoder.cpp + CPP/7zip/Compress/CopyRegister.cpp + CPP/7zip/Compress/Deflate64Register.cpp + CPP/7zip/Compress/DeflateDecoder.cpp + CPP/7zip/Compress/DeflateEncoder.cpp + CPP/7zip/Compress/DeflateRegister.cpp + CPP/7zip/Compress/DeltaFilter.cpp + CPP/7zip/Compress/ImplodeDecoder.cpp + CPP/7zip/Compress/LzfseDecoder.cpp + CPP/7zip/Compress/LzhDecoder.cpp + CPP/7zip/Compress/Lzma2Decoder.cpp + CPP/7zip/Compress/Lzma2Encoder.cpp + CPP/7zip/Compress/Lzma2Register.cpp + CPP/7zip/Compress/LzmaDecoder.cpp + CPP/7zip/Compress/LzmaEncoder.cpp + CPP/7zip/Compress/LzmaRegister.cpp + CPP/7zip/Compress/LzmsDecoder.cpp + CPP/7zip/Compress/LzOutWindow.cpp + CPP/7zip/Compress/LzxDecoder.cpp + CPP/7zip/Compress/PpmdDecoder.cpp + CPP/7zip/Compress/PpmdEncoder.cpp + CPP/7zip/Compress/PpmdRegister.cpp + CPP/7zip/Compress/PpmdZip.cpp + CPP/7zip/Compress/QuantumDecoder.cpp + CPP/7zip/Compress/Rar1Decoder.cpp + CPP/7zip/Compress/Rar2Decoder.cpp + CPP/7zip/Compress/Rar3Decoder.cpp + CPP/7zip/Compress/Rar3Vm.cpp + CPP/7zip/Compress/Rar5Decoder.cpp + CPP/7zip/Compress/RarCodecsRegister.cpp + CPP/7zip/Compress/ShrinkDecoder.cpp + CPP/7zip/Compress/XpressDecoder.cpp + CPP/7zip/Compress/XzDecoder.cpp + CPP/7zip/Compress/XzEncoder.cpp + CPP/7zip/Compress/ZlibDecoder.cpp + CPP/7zip/Compress/ZlibEncoder.cpp + CPP/7zip/Compress/ZDecoder.cpp + CPP/7zip/Compress/CodecExports.cpp +) + +set(SRC_CRYPTO + CPP/7zip/Crypto/7zAes.cpp + CPP/7zip/Crypto/7zAesRegister.cpp + CPP/7zip/Crypto/HmacSha1.cpp + CPP/7zip/Crypto/HmacSha256.cpp + CPP/7zip/Crypto/MyAes.cpp + CPP/7zip/Crypto/MyAesReg.cpp + CPP/7zip/Crypto/Pbkdf2HmacSha1.cpp + CPP/7zip/Crypto/RandGen.cpp + CPP/7zip/Crypto/Rar20Crypto.cpp + CPP/7zip/Crypto/Rar5Aes.cpp + CPP/7zip/Crypto/RarAes.cpp + CPP/7zip/Crypto/WzAes.cpp + CPP/7zip/Crypto/ZipCrypto.cpp + CPP/7zip/Crypto/ZipStrong.cpp +) + +set(SRC_C + C/7zBuf2.c + C/7zStream.c + C/Alloc.c + C/Bcj2.c + C/Bcj2Enc.c + C/Blake2s.c + C/Bra.c + C/Bra86.c + C/BraIA64.c + C/BwtSort.c + C/CpuArch.c + C/Delta.c + C/HuffEnc.c + C/LzFind.c + C/LzFindMt.c + C/Lzma2Dec.c + C/Lzma2DecMt.c + C/Lzma2Enc.c + C/LzmaDec.c + C/LzmaEnc.c + C/LzmaLib.c + C/MtCoder.c + C/MtDec.c + C/Ppmd7.c + C/Ppmd7Dec.c + C/Ppmd7Enc.c + C/Ppmd8.c + C/Ppmd8Dec.c + C/Ppmd8Enc.c + C/Sha1.c + C/Sha256.c + C/Sort.c + C/Threads.c + C/Xz.c + C/XzDec.c + C/XzEnc.c + C/XzIn.c + C/Aes.c + C/7zCrc.c + C/XzCrc64.c +) + +set_source_files_properties( + ${SRC_COMPRESS} + ${SRC_CRYPTO} + ${SRC_C} + PROPERTIES + COMPILE_FLAGS $<$:"/O2"> +) + +set(SRC_OTHER + CPP/Common/CRC.cpp + CPP/Common/CrcReg.cpp + CPP/Common/DynLimBuf.cpp + CPP/Common/IntToString.cpp + CPP/Common/MyMap.cpp + CPP/Common/MyString.cpp + CPP/Common/MyVector.cpp + CPP/Common/MyXml.cpp + CPP/Common/NewHandler.cpp + CPP/Common/Sha1Reg.cpp + CPP/Common/Sha256Reg.cpp + CPP/Common/StringConvert.cpp + CPP/Common/StringToInt.cpp + CPP/Common/UTFConvert.cpp + CPP/Common/Wildcard.cpp + CPP/Common/XzCrc64Init.cpp + CPP/Common/XzCrc64Reg.cpp + + CPP/Windows/FileDir.cpp + CPP/Windows/FileFind.cpp + CPP/Windows/FileIO.cpp + CPP/Windows/FileName.cpp + CPP/Windows/PropVariant.cpp + CPP/Windows/PropVariantUtils.cpp + CPP/Windows/Synchronization.cpp + CPP/Windows/System.cpp + CPP/Windows/TimeUtils.cpp + + CPP/7zip/Common/CreateCoder.cpp + CPP/7zip/Common/CWrappers.cpp + CPP/7zip/Common/InBuffer.cpp + CPP/7zip/Common/InOutTempBuffer.cpp + CPP/7zip/Common/FilterCoder.cpp + CPP/7zip/Common/LimitedStreams.cpp + CPP/7zip/Common/LockedStream.cpp + CPP/7zip/Common/MemBlocks.cpp + CPP/7zip/Common/MethodId.cpp + CPP/7zip/Common/MethodProps.cpp + CPP/7zip/Common/OffsetStream.cpp + CPP/7zip/Common/OutBuffer.cpp + CPP/7zip/Common/OutMemStream.cpp + CPP/7zip/Common/ProgressMt.cpp + CPP/7zip/Common/ProgressUtils.cpp + CPP/7zip/Common/PropId.cpp + CPP/7zip/Common/StreamBinder.cpp + CPP/7zip/Common/StreamObjects.cpp + CPP/7zip/Common/StreamUtils.cpp + CPP/7zip/Common/UniqBlocks.cpp + CPP/7zip/Common/VirtThread.cpp + + CPP/7zip/Archive/ApmHandler.cpp + CPP/7zip/Archive/ArHandler.cpp + CPP/7zip/Archive/ArjHandler.cpp + CPP/7zip/Archive/Bz2Handler.cpp + CPP/7zip/Archive/ComHandler.cpp + CPP/7zip/Archive/CpioHandler.cpp + CPP/7zip/Archive/CramfsHandler.cpp + CPP/7zip/Archive/DeflateProps.cpp + CPP/7zip/Archive/DmgHandler.cpp + CPP/7zip/Archive/ElfHandler.cpp + CPP/7zip/Archive/ExtHandler.cpp + CPP/7zip/Archive/FatHandler.cpp + CPP/7zip/Archive/FlvHandler.cpp + CPP/7zip/Archive/GzHandler.cpp + CPP/7zip/Archive/GptHandler.cpp + CPP/7zip/Archive/HandlerCont.cpp + CPP/7zip/Archive/HfsHandler.cpp + CPP/7zip/Archive/IhexHandler.cpp + CPP/7zip/Archive/LzhHandler.cpp + CPP/7zip/Archive/LzmaHandler.cpp + CPP/7zip/Archive/MachoHandler.cpp + CPP/7zip/Archive/MbrHandler.cpp + CPP/7zip/Archive/MslzHandler.cpp + CPP/7zip/Archive/MubHandler.cpp + CPP/7zip/Archive/NtfsHandler.cpp + CPP/7zip/Archive/PeHandler.cpp + CPP/7zip/Archive/PpmdHandler.cpp + CPP/7zip/Archive/QcowHandler.cpp + CPP/7zip/Archive/RpmHandler.cpp + CPP/7zip/Archive/SplitHandler.cpp + CPP/7zip/Archive/SquashfsHandler.cpp + CPP/7zip/Archive/SwfHandler.cpp + CPP/7zip/Archive/UefiHandler.cpp + CPP/7zip/Archive/VdiHandler.cpp + CPP/7zip/Archive/VhdHandler.cpp + CPP/7zip/Archive/VmdkHandler.cpp + CPP/7zip/Archive/XarHandler.cpp + CPP/7zip/Archive/XzHandler.cpp + CPP/7zip/Archive/ZHandler.cpp + CPP/7zip/Archive/ArchiveExports.cpp + CPP/7zip/Archive/DllExports2.cpp + + CPP/7zip/Archive/Common/CoderMixer2.cpp + CPP/7zip/Archive/Common/DummyOutStream.cpp + CPP/7zip/Archive/Common/FindSignature.cpp + CPP/7zip/Archive/Common/InStreamWithCRC.cpp + CPP/7zip/Archive/Common/ItemNameUtils.cpp + CPP/7zip/Archive/Common/MultiStream.cpp + CPP/7zip/Archive/Common/OutStreamWithCRC.cpp + CPP/7zip/Archive/Common/OutStreamWithSha1.cpp + CPP/7zip/Archive/Common/HandlerOut.cpp + CPP/7zip/Archive/Common/ParseProperties.cpp + + CPP/7zip/Archive/7z/7zCompressionMode.cpp + CPP/7zip/Archive/7z/7zDecode.cpp + CPP/7zip/Archive/7z/7zEncode.cpp + CPP/7zip/Archive/7z/7zExtract.cpp + CPP/7zip/Archive/7z/7zFolderInStream.cpp + CPP/7zip/Archive/7z/7zHandler.cpp + CPP/7zip/Archive/7z/7zHandlerOut.cpp + CPP/7zip/Archive/7z/7zHeader.cpp + CPP/7zip/Archive/7z/7zIn.cpp + CPP/7zip/Archive/7z/7zOut.cpp + CPP/7zip/Archive/7z/7zProperties.cpp + CPP/7zip/Archive/7z/7zSpecStream.cpp + CPP/7zip/Archive/7z/7zUpdate.cpp + CPP/7zip/Archive/7z/7zRegister.cpp + + CPP/7zip/Archive/Cab/CabBlockInStream.cpp + CPP/7zip/Archive/Cab/CabHandler.cpp + CPP/7zip/Archive/Cab/CabHeader.cpp + CPP/7zip/Archive/Cab/CabIn.cpp + CPP/7zip/Archive/Cab/CabRegister.cpp + + CPP/7zip/Archive/Chm/ChmHandler.cpp + CPP/7zip/Archive/Chm/ChmIn.cpp + + CPP/7zip/Archive/Iso/IsoHandler.cpp + CPP/7zip/Archive/Iso/IsoHeader.cpp + CPP/7zip/Archive/Iso/IsoIn.cpp + CPP/7zip/Archive/Iso/IsoRegister.cpp + + CPP/7zip/Archive/Nsis/NsisDecode.cpp + CPP/7zip/Archive/Nsis/NsisHandler.cpp + CPP/7zip/Archive/Nsis/NsisIn.cpp + CPP/7zip/Archive/Nsis/NsisRegister.cpp + + CPP/7zip/Archive/Rar/RarHandler.cpp + CPP/7zip/Archive/Rar/Rar5Handler.cpp + + CPP/7zip/Archive/Tar/TarHandler.cpp + CPP/7zip/Archive/Tar/TarHandlerOut.cpp + CPP/7zip/Archive/Tar/TarHeader.cpp + CPP/7zip/Archive/Tar/TarIn.cpp + CPP/7zip/Archive/Tar/TarOut.cpp + CPP/7zip/Archive/Tar/TarUpdate.cpp + CPP/7zip/Archive/Tar/TarRegister.cpp + + CPP/7zip/Archive/Udf/UdfHandler.cpp + CPP/7zip/Archive/Udf/UdfIn.cpp + + CPP/7zip/Archive/Wim/WimHandler.cpp + CPP/7zip/Archive/Wim/WimHandlerOut.cpp + CPP/7zip/Archive/Wim/WimIn.cpp + CPP/7zip/Archive/Wim/WimRegister.cpp + + CPP/7zip/Archive/Zip/ZipAddCommon.cpp + CPP/7zip/Archive/Zip/ZipHandler.cpp + CPP/7zip/Archive/Zip/ZipHandlerOut.cpp + CPP/7zip/Archive/Zip/ZipIn.cpp + CPP/7zip/Archive/Zip/ZipItem.cpp + CPP/7zip/Archive/Zip/ZipOut.cpp + CPP/7zip/Archive/Zip/ZipUpdate.cpp + CPP/7zip/Archive/Zip/ZipRegister.cpp +) + +add_library(7zip + ${SRC_ASM} + ${SRC_OTHER} + ${SRC_COMPRESS} + ${SRC_CRYPTO} + ${SRC_C} + CPP/7zip/Archive/Archive2.def + C/Util/LzmaLib/LzmaLib.def +) + +target_compile_definitions(7zip + PUBLIC + -DEXTERNAL_CODECS + -D_7ZIP_LARGE_PAGES + -DUNICODE + -D_UNICODE +) + +target_compile_options(7zip + PRIVATE + /wd5043 + $<$:/guard:cf> +) + +target_include_directories(7zip + INTERFACE + $/7zip/CPP +) + +set(PUBLIC_HEADERS + C/7zTypes.h + C/Alloc.h + C/LzFind.h + C/LzFindMt.h + C/LzHash.h + C/LzmaDec.h + C/LzmaEnc.h + C/LzmaLib.h + C/Threads.h + CPP/7zip/Archive/IArchive.h + CPP/7zip/ICoder.h + CPP/7zip/IDecl.h + CPP/7zip/IPassword.h + CPP/7zip/IProgress.h + CPP/7zip/IStream.h + CPP/7zip/PropID.h + CPP/Common/Defs.h + CPP/Common/MyTypes.h + CPP/Common/MyUnknown.h + CPP/Common/MyWindows.h +) + +install( + TARGETS 7zip + EXPORT 7zip + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) + +# Headers makes relative includes so directory structure must be kept +foreach(HEADER ${PUBLIC_HEADERS}) + get_filename_component(HEADER_DIR ${HEADER} DIRECTORY) + install( + FILES ${HEADER} + CONFIGURATIONS Release + DESTINATION include/7zip/${HEADER_DIR} + ) +endforeach() + +install( + EXPORT 7zip + DESTINATION share/7zip + FILE 7zipConfig.cmake + NAMESPACE 7zip:: + CONFIGURATIONS Release +) diff --git a/vcpkg/ports/7zip/CONTROL b/vcpkg/ports/7zip/CONTROL new file mode 100644 index 0000000..b37fa18 --- /dev/null +++ b/vcpkg/ports/7zip/CONTROL @@ -0,0 +1,6 @@ +Source: 7zip +Version: 19.00 +Port-Version: 2 +Homepage: https://www.7-zip.org +Description: Library for archiving file with a high compression ratio. +Supports: !(linux|osx|arm|uwp) diff --git a/vcpkg/ports/7zip/License.txt b/vcpkg/ports/7zip/License.txt new file mode 100644 index 0000000..e911384 --- /dev/null +++ b/vcpkg/ports/7zip/License.txt @@ -0,0 +1,90 @@ + 7-Zip source code + ~~~~~~~~~~~~~~~~~ + License for use and distribution + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + 7-Zip Copyright (C) 1999-2019 Igor Pavlov. + + The licenses for files are: + + 1) CPP/7zip/Compress/Rar* files: the "GNU LGPL" with "unRAR license restriction" + 2) CPP/7zip/Compress/LzfseDecoder.cpp: the "BSD 3-clause License" + 3) Some files are "public domain" files, if "public domain" status is stated in source file. + 4) the "GNU LGPL" for all other files. If there is no license information in + some source file, that file is under the "GNU LGPL". + + The "GNU LGPL" with "unRAR license restriction" means that you must follow both + "GNU LGPL" rules and "unRAR license restriction" rules. + + + + + GNU LGPL information + -------------------- + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + + + BSD 3-clause License + -------------------- + + The "BSD 3-clause License" is used for the code in LzfseDecoder.cpp that implements LZFSE data decompression. + That code was derived from the code in the "LZFSE compression library" developed by Apple Inc, + that also uses the "BSD 3-clause License": + + ---- + Copyright (c) 2015-2016, Apple Inc. All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the distribution. + + 3. Neither the name of the copyright holder(s) nor the names of any contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ---- + + + + + unRAR license restriction + ------------------------- + + The decompression engine for RAR archives was developed using source + code of unRAR program. + All copyrights to original unRAR code are owned by Alexander Roshal. + + The license for original unRAR code has the following restriction: + + The unRAR sources cannot be used to re-create the RAR compression algorithm, + which is proprietary. Distribution of modified unRAR sources in separate form + or as a part of other software is permitted, provided that it is clearly + stated in the documentation and source comments that the code may + not be used to develop a RAR (WinRAR) compatible archiver. + + + -- + Igor Pavlov diff --git a/vcpkg/ports/7zip/portfile.cmake b/vcpkg/ports/7zip/portfile.cmake new file mode 100644 index 0000000..bffb9b4 --- /dev/null +++ b/vcpkg/ports/7zip/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp" "linux" "osx") + +set(7ZIP_VERSION 19.00) +vcpkg_download_distfile(ARCHIVE + URLS "https://www.7-zip.org/a/7z1900-src.7z" + FILENAME "7z1900-src.7z" + SHA512 d68b308e175224770adc8b1495f1ba3cf3e7f67168a7355000643d3d32560ae01aa34266f0002395181ed91fb5e682b86e0f79c20625b42d6e2c62dd24a5df93 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${7ZIP_VERSION} + NO_REMOVE_ONE_LEVEL +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file( + INSTALL ${CMAKE_CURRENT_LIST_DIR}/License.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) diff --git a/vcpkg/ports/7zip/unRarLicense.txt b/vcpkg/ports/7zip/unRarLicense.txt new file mode 100644 index 0000000..5f78b72 --- /dev/null +++ b/vcpkg/ports/7zip/unRarLicense.txt @@ -0,0 +1,41 @@ + ****** ***** ****** unRAR - free utility for RAR archives + ** ** ** ** ** ** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ****** ******* ****** License for use and distribution of + ** ** ** ** ** ** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ** ** ** ** ** ** FREE portable version + ~~~~~~~~~~~~~~~~~~~~~ + + The source code of unRAR utility is freeware. This means: + + 1. All copyrights to RAR and the utility unRAR are exclusively + owned by the author - Alexander Roshal. + + 2. The unRAR sources may be used in any software to handle RAR + archives without limitations free of charge, but cannot be used + to re-create the RAR compression algorithm, which is proprietary. + Distribution of modified unRAR sources in separate form or as a + part of other software is permitted, provided that it is clearly + stated in the documentation and source comments that the code may + not be used to develop a RAR (WinRAR) compatible archiver. + + 3. The unRAR utility may be freely distributed. No person or company + may charge a fee for the distribution of unRAR without written + permission from the copyright holder. + + 4. THE RAR ARCHIVER AND THE UNRAR UTILITY ARE DISTRIBUTED "AS IS". + NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED. YOU USE AT + YOUR OWN RISK. THE AUTHOR WILL NOT BE LIABLE FOR DATA LOSS, + DAMAGES, LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING + OR MISUSING THIS SOFTWARE. + + 5. Installing and using the unRAR utility signifies acceptance of + these terms and conditions of the license. + + 6. If you don't agree with terms of the license you must remove + unRAR files from your storage devices and cease to use the + utility. + + Thank you for your interest in RAR and unRAR. + + + Alexander L. Roshal \ No newline at end of file diff --git a/vcpkg/ports/abseil/fix-MSVCbuildfail.patch b/vcpkg/ports/abseil/fix-MSVCbuildfail.patch new file mode 100644 index 0000000..7c041c2 --- /dev/null +++ b/vcpkg/ports/abseil/fix-MSVCbuildfail.patch @@ -0,0 +1,65 @@ +diff --git a/absl/container/internal/compressed_tuple.h b/absl/container/internal/compressed_tuple.h +index 4bfe92f..02bfd03 100644 +--- a/absl/container/internal/compressed_tuple.h ++++ b/absl/container/internal/compressed_tuple.h +@@ -169,9 +169,33 @@ constexpr bool ShouldAnyUseBase() { + } + + template +-using TupleMoveConstructible = typename std::conditional< +- std::is_reference::value, std::is_convertible, +- std::is_constructible>::type; ++using TupleElementMoveConstructible = ++ typename std::conditional::value, ++ std::is_convertible, ++ std::is_constructible>::type; ++ ++template ++struct TupleMoveConstructible : std::false_type {}; ++ ++template ++struct TupleMoveConstructible, Vs...> ++ : std::integral_constant< ++ bool, absl::conjunction< ++ TupleElementMoveConstructible...>::value> {}; ++ ++template ++struct compressed_tuple_size; ++ ++template ++struct compressed_tuple_size> ++ : public std::integral_constant {}; ++ ++template ++struct TupleItemsMoveConstructible ++ : std::integral_constant< ++ bool, TupleMoveConstructible::value == ++ sizeof...(Vs), ++ T, Vs...>::value> {}; + + } // namespace internal_compressed_tuple + +@@ -217,17 +241,18 @@ class ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC CompressedTuple + explicit constexpr CompressedTuple(const Ts&... base) + : CompressedTuple::CompressedTupleImpl(absl::in_place, base...) {} + +- template ...)>>, +- internal_compressed_tuple::TupleMoveConstructible< +- Ts, Vs&&>...>::value, ++ void(absl::decay_t)>>, ++ internal_compressed_tuple::TupleItemsMoveConstructible< ++ CompressedTuple, First, Vs...>>::value, + bool> = true> +- explicit constexpr CompressedTuple(Vs&&... base) ++ explicit constexpr CompressedTuple(First&& first, Vs&&... base) + : CompressedTuple::CompressedTupleImpl(absl::in_place, ++ absl::forward(first), + absl::forward(base)...) {} + + template diff --git a/vcpkg/ports/abseil/fix-arm-build.patch b/vcpkg/ports/abseil/fix-arm-build.patch new file mode 100644 index 0000000..bf3347e --- /dev/null +++ b/vcpkg/ports/abseil/fix-arm-build.patch @@ -0,0 +1,23 @@ +diff --git a/absl/time/internal/cctz/src/zone_info_source.cc b/absl/time/internal/cctz/src/zone_info_source.cc +index 98ea161..3f75d56 100644 +--- a/absl/time/internal/cctz/src/zone_info_source.cc ++++ b/absl/time/internal/cctz/src/zone_info_source.cc +@@ -65,7 +65,7 @@ ZoneInfoSourceFactory zone_info_source_factory __attribute__((weak)) = + extern ZoneInfoSourceFactory zone_info_source_factory; + extern ZoneInfoSourceFactory default_factory; + ZoneInfoSourceFactory default_factory = DefaultFactory; +-#if defined(_M_IX86) ++#if defined(_M_IX86) || ((defined(_M_ARM) || defined(_M_ARM64)) && defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)) + #pragma comment( \ + linker, \ + "/alternatename:?zone_info_source_factory@cctz_extension@time_internal@" ABSL_INTERNAL_MANGLED_NS \ +@@ -83,7 +83,8 @@ ZoneInfoSourceFactory default_factory = DefaultFactory; + "@@U?$default_delete@VZoneInfoSource@cctz@time_internal@" ABSL_INTERNAL_MANGLED_NS \ + "@@@std@@@std@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@@Z@" ABSL_INTERNAL_MANGLED_BACKREFERENCE \ + "@@ZA") +-#elif defined(_M_IA_64) || defined(_M_AMD64) || defined(_M_ARM64) ++#elif defined(_M_IA_64) || defined(_M_AMD64) || defined(_M_ARM) || \ ++ defined(_M_ARM64) + #pragma comment( \ + linker, \ + "/alternatename:?zone_info_source_factory@cctz_extension@time_internal@" ABSL_INTERNAL_MANGLED_NS \ diff --git a/vcpkg/ports/abseil/fix-cmake-threads-dependency.patch b/vcpkg/ports/abseil/fix-cmake-threads-dependency.patch new file mode 100644 index 0000000..0dda75e --- /dev/null +++ b/vcpkg/ports/abseil/fix-cmake-threads-dependency.patch @@ -0,0 +1,13 @@ +diff --git a/CMake/abslConfig.cmake.in b/CMake/abslConfig.cmake.in +index 60847fa77..6d23f63d3 100644 +--- a/CMake/abslConfig.cmake.in ++++ b/CMake/abslConfig.cmake.in +@@ -1,6 +1,7 @@ + # absl CMake configuration file. + +-include(FindThreads) ++include(CMakeFindDependencyMacro) ++find_dependency(Threads) + + @PACKAGE_INIT@ + diff --git a/vcpkg/ports/abseil/fix-lnk2019-error.patch b/vcpkg/ports/abseil/fix-lnk2019-error.patch new file mode 100644 index 0000000..645d1e0 --- /dev/null +++ b/vcpkg/ports/abseil/fix-lnk2019-error.patch @@ -0,0 +1,40 @@ +diff --git a/absl/base/options.h b/absl/base/options.h +index 234137c..1fb77e4 100644 +--- a/absl/base/options.h ++++ b/absl/base/options.h +@@ -100,7 +100,7 @@ + // User code should not inspect this macro. To check in the preprocessor if + // absl::any is a typedef of std::any, use the feature macro ABSL_USES_STD_ANY. + +-#define ABSL_OPTION_USE_STD_ANY 2 ++#define ABSL_OPTION_USE_STD_ANY 0 + + + // ABSL_OPTION_USE_STD_OPTIONAL +@@ -127,7 +127,7 @@ + // absl::optional is a typedef of std::optional, use the feature macro + // ABSL_USES_STD_OPTIONAL. + +-#define ABSL_OPTION_USE_STD_OPTIONAL 2 ++#define ABSL_OPTION_USE_STD_OPTIONAL 0 + + + // ABSL_OPTION_USE_STD_STRING_VIEW +@@ -154,7 +154,7 @@ + // absl::string_view is a typedef of std::string_view, use the feature macro + // ABSL_USES_STD_STRING_VIEW. + +-#define ABSL_OPTION_USE_STD_STRING_VIEW 2 ++#define ABSL_OPTION_USE_STD_STRING_VIEW 0 + + // ABSL_OPTION_USE_STD_VARIANT + // +@@ -180,7 +180,7 @@ + // absl::variant is a typedef of std::variant, use the feature macro + // ABSL_USES_STD_VARIANT. + +-#define ABSL_OPTION_USE_STD_VARIANT 2 ++#define ABSL_OPTION_USE_STD_VARIANT 0 + + + // ABSL_OPTION_USE_INLINE_NAMESPACE diff --git a/vcpkg/ports/abseil/fix-use-cxx17-stdlib-types.patch b/vcpkg/ports/abseil/fix-use-cxx17-stdlib-types.patch new file mode 100644 index 0000000..8671582 --- /dev/null +++ b/vcpkg/ports/abseil/fix-use-cxx17-stdlib-types.patch @@ -0,0 +1,40 @@ +diff --git a/absl/base/options.h b/absl/base/options.h +index 234137c..1fb77e4 100644 +--- a/absl/base/options.h ++++ b/absl/base/options.h +@@ -100,7 +100,7 @@ + // User code should not inspect this macro. To check in the preprocessor if + // absl::any is a typedef of std::any, use the feature macro ABSL_USES_STD_ANY. + +-#define ABSL_OPTION_USE_STD_ANY 2 ++#define ABSL_OPTION_USE_STD_ANY 1 + + + // ABSL_OPTION_USE_STD_OPTIONAL +@@ -127,7 +127,7 @@ + // absl::optional is a typedef of std::optional, use the feature macro + // ABSL_USES_STD_OPTIONAL. + +-#define ABSL_OPTION_USE_STD_OPTIONAL 2 ++#define ABSL_OPTION_USE_STD_OPTIONAL 1 + + + // ABSL_OPTION_USE_STD_STRING_VIEW +@@ -154,7 +154,7 @@ + // absl::string_view is a typedef of std::string_view, use the feature macro + // ABSL_USES_STD_STRING_VIEW. + +-#define ABSL_OPTION_USE_STD_STRING_VIEW 2 ++#define ABSL_OPTION_USE_STD_STRING_VIEW 1 + + // ABSL_OPTION_USE_STD_VARIANT + // +@@ -180,7 +180,7 @@ + // absl::variant is a typedef of std::variant, use the feature macro + // ABSL_USES_STD_VARIANT. + +-#define ABSL_OPTION_USE_STD_VARIANT 2 ++#define ABSL_OPTION_USE_STD_VARIANT 1 + + + // ABSL_OPTION_USE_INLINE_NAMESPACE diff --git a/vcpkg/ports/abseil/fix-uwp-build.patch b/vcpkg/ports/abseil/fix-uwp-build.patch new file mode 100644 index 0000000..a9b4a0c --- /dev/null +++ b/vcpkg/ports/abseil/fix-uwp-build.patch @@ -0,0 +1,66 @@ +diff --git a/absl/base/internal/sysinfo.cc b/absl/base/internal/sysinfo.cc +index a0930e9..2ec5793 100644 +--- a/absl/base/internal/sysinfo.cc ++++ b/absl/base/internal/sysinfo.cc +@@ -72,6 +72,12 @@ static int GetNumCPUs() { + #if defined(_WIN32) + + static double GetNominalCPUFrequency() { ++// UWP apps don't have access to the registry and currently don't provide an ++// API informing about CPU nominal frequency. ++#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && \ ++ !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) ++ return 1.0; ++#else + #pragma comment(lib, "advapi32.lib") // For Reg* functions. + HKEY key; + // Use the Reg* functions rather than the SH functions because shlwapi.dll +@@ -91,6 +97,7 @@ static double GetNominalCPUFrequency() { + } + } + return 1.0; ++#endif // WINAPI_PARTITION_APP && !WINAPI_PARTITION_DESKTOP + } + + #elif defined(CTL_HW) && defined(HW_CPU_FREQ) +diff --git a/absl/debugging/symbolize_win32.inc b/absl/debugging/symbolize_win32.inc +index c3df46f..d324fc1 100644 +--- a/absl/debugging/symbolize_win32.inc ++++ b/absl/debugging/symbolize_win32.inc +@@ -36,6 +36,11 @@ ABSL_NAMESPACE_BEGIN + static HANDLE process = NULL; + + void InitializeSymbolizer(const char*) { ++// UWP doesn't support this function ++#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && \ ++ !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) ++ return; ++#else + if (process != nullptr) { + return; + } +@@ -52,9 +57,16 @@ void InitializeSymbolizer(const char*) { + const unsigned long long error{GetLastError()}; // NOLINT(runtime/int) + ABSL_RAW_LOG(FATAL, "SymInitialize() failed: %llu", error); + } ++#endif + } + + bool Symbolize(const void* pc, char* out, int out_size) { ++ ++// UWP doesn't support this function ++#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && \ ++ !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) ++ return false; ++#else + if (out_size <= 0) { + return false; + } +@@ -75,6 +87,7 @@ bool Symbolize(const void* pc, char* out, int out_size) { + out[out_size - 1] = '\0'; + } + return true; ++#endif + } + + ABSL_NAMESPACE_END diff --git a/vcpkg/ports/abseil/portfile.cmake b/vcpkg/ports/abseil/portfile.cmake new file mode 100644 index 0000000..0b62c6c --- /dev/null +++ b/vcpkg/ports/abseil/portfile.cmake @@ -0,0 +1,73 @@ +if (NOT VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +set(ABSEIL_PATCHES + fix-uwp-build.patch + + # This patch is an upstream commit, the related PR: https://github.com/abseil/abseil-cpp/pull/637 + fix-MSVCbuildfail.patch + + # Remove this patch in next update, see https://github.com/google/cctz/pull/145 + fix-arm-build.patch + + # This patch is an upstream commit: https://github.com/abseil/abseil-cpp/commit/68494aae959dfbbf781cdf03a988d2f5fc7e4802 + fix-cmake-threads-dependency.patch +) + +if("cxx17" IN_LIST FEATURES) + # in C++17 mode, use std::any, std::optional, std::string_view, std::variant + # instead of the library replacement types + list(APPEND ABSEIL_PATCHES fix-use-cxx17-stdlib-types.patch) +else() + # fore use of library replacement types, otherwise the automatic + # detection can cause ABI issues depending on which compiler options + # are enabled for consuming user code + list(APPEND ABSEIL_PATCHES fix-lnk2019-error.patch) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO abseil/abseil-cpp + REF 06f0e767d13d4d68071c4fc51e25724e0fc8bc74 #commit 2020-03-03 + SHA512 f6e2302676ddae39d84d8ec92dbd13520ae214013b43455f14ced3ae6938b94cedb06cfc40eb1781dac48f02cd35ed80673ed2d871541ef4438c282a9a4133b9 + HEAD_REF master + PATCHES ${ABSEIL_PATCHES} +) + +set(CMAKE_CXX_STANDARD 11) +if("cxx17" IN_LIST FEATURES) + set(CMAKE_CXX_STANDARD 17) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/absl TARGET_PATH share/absl) + +vcpkg_copy_pdbs() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/include/absl/copts + ${CURRENT_PACKAGES_DIR}/include/absl/strings/testdata + ${CURRENT_PACKAGES_DIR}/include/absl/time/internal/cctz/testdata +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/absl/base/config.h + "#elif defined(ABSL_CONSUME_DLL)" "#elif 1" + ) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/absl/base/internal/thread_identity.h + "&& !defined(ABSL_CONSUME_DLL)" "&& 0" + ) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/absl/container/internal/hashtablez_sampler.h + "!defined(ABSL_CONSUME_DLL)" "0" + ) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/abseil/vcpkg.json b/vcpkg/ports/abseil/vcpkg.json new file mode 100644 index 0000000..0fbb7ab --- /dev/null +++ b/vcpkg/ports/abseil/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "abseil", + "version-string": "2020-03-03", + "port-version": 8, + "description": [ + "an open-source collection designed to augment the C++ standard library.", + "Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives.", + "In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you.", + "Abseil is not meant to be a competitor to the standard library; we've just found that many of these utilities serve a purpose within our code base, and we now want to provide those resources to the C++ community as a whole." + ], + "homepage": "https://github.com/abseil/abseil-cpp", + "features": { + "cxx17": { + "description": "Enable compiler C++17." + } + } +} diff --git a/vcpkg/ports/absent/CONTROL b/vcpkg/ports/absent/CONTROL new file mode 100644 index 0000000..6d689b0 --- /dev/null +++ b/vcpkg/ports/absent/CONTROL @@ -0,0 +1,4 @@ +Source: absent +Version: 0.3.1 +Homepage: https://github.com/rvarago/absent +Description: A small C++17 library meant to simplify the composition of nullable types in a generic, type-safe, and declarative way diff --git a/vcpkg/ports/absent/portfile.cmake b/vcpkg/ports/absent/portfile.cmake new file mode 100644 index 0000000..1c8436a --- /dev/null +++ b/vcpkg/ports/absent/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rvarago/absent + REF 0.3.1 + SHA512 c7b7d29422ef8afc48e3093496e1dd055cfe9969ae037c2b06ea70fe4283e7a7e9129171efaa257e909c535e24df5861b992b24b00ec03f965730e6a22e13015 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets( + CONFIG_PATH lib/cmake/${PORT} +) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/lib +) + +file(INSTALL + ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} +) + +file(INSTALL + ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright +) + diff --git a/vcpkg/ports/ace/CONTROL b/vcpkg/ports/ace/CONTROL new file mode 100644 index 0000000..eca959e --- /dev/null +++ b/vcpkg/ports/ace/CONTROL @@ -0,0 +1,21 @@ +Source: ace +Version: 6.5.11 +Homepage: https://www.dre.vanderbilt.edu/~schmidt/ACE.html +Description: The ADAPTIVE Communication Environment + +Feature: wchar +Description: Enable extra wide char functions in ACE + +Feature: ssl +Description: Enable SSL/TLS features in ACE +Build-Depends: openssl + +Feature: xml +Description: Enable XML features in ACE + +Feature: zlib +Build-Depends: zlib +Description: Enable zlib support + +Feature: tao +Description: The ACE ORB diff --git a/vcpkg/ports/ace/portfile.cmake b/vcpkg/ports/ace/portfile.cmake new file mode 100644 index 0000000..6121281 --- /dev/null +++ b/vcpkg/ports/ace/portfile.cmake @@ -0,0 +1,340 @@ +# Using zip archive under Linux would cause sh/perl to report "No such file or directory" or "bad interpreter" +# when invoking `prj_install.pl`. +# So far this issue haven't yet be triggered under WSL 1 distributions. Not sure the root cause of it. +set(ACE_VERSION 6.5.11) +string(REPLACE "." "_" ACE_VERSION_DIRECTORY ${ACE_VERSION}) + +if("tao" IN_LIST FEATURES) + if(VCPKG_TARGET_IS_WINDOWS) + # Don't change to vcpkg_from_github! This points to a release and not an archive + vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-${ACE_VERSION_DIRECTORY}/ACE%2BTAO-src-${ACE_VERSION}.zip" + FILENAME ACE-TAO-${ACE_VERSION}.zip + SHA512 82c4aa9718814f72f6ecc45da064d8d30f104d9b4785f357525c4c4a8ceb709e5885ddb1c4729df0cab9f69282c8f58cce3a23573a74e1dbdc677a6a54c1c894 + ) + else() + # VCPKG_TARGET_IS_LINUX + vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-${ACE_VERSION_DIRECTORY}/ACE%2BTAO-src-${ACE_VERSION}.tar.gz" + FILENAME ACE-TAO-${ACE_VERSION}.tar.gz + SHA512 82d69ed23b049948b104677afb93fcaad4468335268b101e5b7d73aa15b380d120253415b42cadf6ba45bbf2ed3771d51f7b56c56eb93ff9e33a044f118f9191 + ) + endif() +else() + if(VCPKG_TARGET_IS_WINDOWS) + # Don't change to vcpkg_from_github! This points to a release and not an archive + vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-${ACE_VERSION_DIRECTORY}/ACE-src-${ACE_VERSION}.zip" + FILENAME ACE-src-${ACE_VERSION}.zip + SHA512 36f286240ac81c9de0c4a21a54e9e61a4efd0ae9e8381732dadfba496768b697dec9fb448e0d252293bfd686e114c644c7602ddbdbe74c5d73eb6423d00d0ae5 + ) + else(VCPKG_TARGET_IS_WINDOWS) + # VCPKG_TARGET_IS_LINUX + vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-${ACE_VERSION_DIRECTORY}/ACE-src-${ACE_VERSION}.tar.gz" + FILENAME ACE-src-${ACE_VERSION}.tar.gz + SHA512 e47e1ef2e8d517aed3c647a1e7dd9ac8b54ed187f9d6adf1e535bb7c4da6e8e808d72850ae18f2e42842ea9487ef774f7af90d1fbede17e0858e2b5846650580 + ) + endif() +endif() + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +set(ACE_ROOT ${SOURCE_PATH}) +set(ENV{ACE_ROOT} ${ACE_ROOT}) +set(ACE_SOURCE_PATH ${ACE_ROOT}/ace) +if("tao" IN_LIST FEATURES) + set(TAO_ROOT ${SOURCE_PATH}/TAO) + set(ENV{TAO_ROOT} ${TAO_ROOT}) + set(WORKSPACE ${TAO_ROOT}/TAO_ACE) +else() + set(WORKSPACE ${ACE_ROOT}/ace/ace) +endif() +if("wchar" IN_LIST FEATURES) + list(APPEND ACE_FEATURE_LIST "uses_wchar=1") +endif() +if("zlib" IN_LIST FEATURES) + list(APPEND ACE_FEATURE_LIST "zlib=1") + set(ENV{ZLIB_ROOT} ${CURRENT_INSTALLED_DIR}) +else() + list(APPEND ACE_FEATURE_LIST "zlib=0") +endif() +if("ssl" IN_LIST FEATURES) + list(APPEND ACE_FEATURE_LIST "ssl=1") + list(APPEND ACE_FEATURE_LIST "openssl11=1") + set(ENV{SSL_ROOT} ${CURRENT_INSTALLED_DIR}) +else() + list(APPEND ACE_FEATURE_LIST "ssl=0") +endif() +list(JOIN ACE_FEATURE_LIST "," ACE_FEATURES) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(MPC_STATIC_FLAG -static) +endif() + +# Acquire Perl and add it to PATH (for execution of MPC) +vcpkg_find_acquire_program(PERL) +get_filename_component(PERL_PATH ${PERL} DIRECTORY) +vcpkg_add_to_path(${PERL_PATH}) + +if (TRIPLET_SYSTEM_ARCH MATCHES "x86") + set(MSBUILD_PLATFORM "Win32") +else () + set(MSBUILD_PLATFORM ${TRIPLET_SYSTEM_ARCH}) +endif() + +# Add ace/config.h file +# see https://htmlpreview.github.io/?https://github.com/DOCGroup/ACE_TAO/blob/master/ACE/ACE-INSTALL.html +if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_PLATFORM_TOOLSET MATCHES "v142") + set(SOLUTION_TYPE vs2019) + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(SOLUTION_TYPE vs2017) + else() + set(SOLUTION_TYPE vc14) + endif() + file(WRITE ${ACE_SOURCE_PATH}/config.h "#include \"ace/config-windows.h\"") +elseif(VCPKG_TARGET_IS_LINUX) + set(SOLUTION_TYPE gnuace) + file(WRITE ${ACE_SOURCE_PATH}/config.h "#include \"ace/config-linux.h\"") + file(WRITE ${ACE_ROOT}/include/makeinclude/platform_macros.GNU "include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU") +elseif(VCPKG_TARGET_IS_OSX) + set(SOLUTION_TYPE gnuace) + file(WRITE ${ACE_SOURCE_PATH}/config.h "#include \"ace/config-macosx.h\"") + file(WRITE ${ACE_ROOT}/include/makeinclude/platform_macros.GNU "include $(ACE_ROOT)/include/makeinclude/platform_macosx.GNU") +endif() + +if(VCPKG_TARGET_IS_UWP) + set(MPC_VALUE_TEMPLATE -value_template link_options+=/APPCONTAINER) +endif() + +# Invoke mwc.pl to generate the necessary solution and project files +vcpkg_execute_build_process( + COMMAND ${PERL} ${ACE_ROOT}/bin/mwc.pl -type ${SOLUTION_TYPE} -features "${ACE_FEATURES}" ${WORKSPACE}.mwc ${MPC_STATIC_FLAG} ${MPC_VALUE_TEMPLATE} + WORKING_DIRECTORY ${ACE_ROOT} + LOGNAME mwc-${TARGET_TRIPLET} +) + +if(VCPKG_TARGET_IS_WINDOWS) + file(RELATIVE_PATH PROJECT_SUBPATH ${SOURCE_PATH} ${WORKSPACE}.sln) + vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH ${PROJECT_SUBPATH} + LICENSE_SUBPATH COPYING + PLATFORM ${MSBUILD_PLATFORM} + USE_VCPKG_INTEGRATION + ) + + # ACE itself does not define an install target, so it is not clear which + # headers are public and which not. For the moment we install everything + # that is in the source path and ends in .h, .inl + function(install_includes ORIGINAL_PATH RELATIVE_PATHS) + foreach(RELATIVE_PATH ${RELATIVE_PATHS}) + file( + GLOB + HEADER_FILES + ${ORIGINAL_PATH}/${RELATIVE_PATH}/*.h + ${ORIGINAL_PATH}/${RELATIVE_PATH}/*.hpp + ${ORIGINAL_PATH}/${RELATIVE_PATH}/*.inl + ${ORIGINAL_PATH}/${RELATIVE_PATH}/*.cpp + ${ORIGINAL_PATH}/${RELATIVE_PATH}/*.idl + ${ORIGINAL_PATH}/${RELATIVE_PATH}/*.pidl) + file(INSTALL ${HEADER_FILES} + DESTINATION ${CURRENT_PACKAGES_DIR}/include/${RELATIVE_PATH}) + endforeach() + endfunction() + + # Install headers in subdirectory + set(ACE_INCLUDE_FOLDERS + "ace" + "ace/Compression" + "ace/Compression/rle" + "ace/ETCL" + "ace/QoS" + "ace/Monitor_Control" + "ace/os_include" + "ace/os_include/arpa" + "ace/os_include/net" + "ace/os_include/netinet" + "ace/os_include/sys") + install_includes(${ACE_ROOT} "${ACE_INCLUDE_FOLDERS}") + + if("ssl" IN_LIST FEATURES) + install_includes(${ACE_ROOT} "ace/SSL") + endif() + + if("tao" IN_LIST FEATURES) + set(ACEXML_INCLUDE_FOLDERS "ACEXML/apps/svcconf" "ACEXML/common" + "ACEXML/parser/parser") + install_includes(${ACE_ROOT} "${ACEXML_INCLUDE_FOLDERS}") + + set(ACE_PROTOCOLS_INCLUDE_FOLDERS "ace/HTBP" "ace/INet" "ace/RMCast" + "ace/TMCast") + install_includes(${ACE_ROOT}/protocols "${ACE_PROTOCOLS_INCLUDE_FOLDERS}") + + install_includes(${ACE_ROOT} "Kokyu") + + set(TAO_ORBSVCS_INCLUDE_FOLDERS + "orbsvcs" + "orbsvcs/AV" + "orbsvcs/Concurrency" + "orbsvcs/CosEvent" + "orbsvcs/Event" + "orbsvcs/FaultTolerance" + "orbsvcs/FtRtEvent/ClientORB" + "orbsvcs/FtRtEvent/EventChannel" + "orbsvcs/FtRtEvent/Utils" + "orbsvcs/HTIOP" + "orbsvcs/IFRService" + "orbsvcs/LifeCycle" + "orbsvcs/LoadBalancing" + "orbsvcs/Log" + "orbsvcs/Naming" + "orbsvcs/Naming/FaultTolerant" + "orbsvcs/Notify" + "orbsvcs/Notify/Any" + "orbsvcs/Notify/MonitorControl" + "orbsvcs/Notify/MonitorControlExt" + "orbsvcs/Notify/Sequence" + "orbsvcs/Notify/Structured" + "orbsvcs/PortableGroup" + "orbsvcs/Property" + "orbsvcs/Sched" + "orbsvcs/Security" + "orbsvcs/Time" + "orbsvcs/Trader") + if("ssl" IN_LIST FEATURES) + list(APPEND TAO_ORBSVCS_INCLUDE_FOLDERS "orbsvcs/SSLIOP") + endif() + install_includes(${TAO_ROOT}/orbsvcs "${TAO_ORBSVCS_INCLUDE_FOLDERS}") + + set(TAO_ROOT_ORBSVCS_INCLUDE_FOLDERS "orbsvcs/FT_ReplicationManager" + "orbsvcs/Notify_Service") + install_includes(${TAO_ROOT} "${TAO_ROOT_ORBSVCS_INCLUDE_FOLDERS}") + + set(TAO_INCLUDE_FOLDERS + "tao" + "tao/AnyTypeCode" + "tao/BiDir_GIOP" + "tao/CSD_Framework" + "tao/CSD_ThreadPool" + "tao/CodecFactory" + "tao/Codeset" + "tao/Compression" + "tao/Compression/rle" + "tao/DiffServPolicy" + "tao/DynamicAny" + "tao/DynamicInterface" + "tao/Dynamic_TP" + "tao/ETCL" + "tao/EndpointPolicy" + "tao/IFR_Client" + "tao/IORInterceptor" + "tao/IORManipulation" + "tao/IORTable" + "tao/ImR_Client" + "tao/Messaging" + "tao/Monitor" + "tao/ObjRefTemplate" + "tao/PI" + "tao/PI_Server" + "tao/PortableServer" + "tao/RTCORBA" + "tao/RTPortableServer" + "tao/RTScheduling" + "tao/SmartProxies" + "tao/Strategies" + "tao/TransportCurrent" + "tao/TypeCodeFactory" + "tao/Utils" + "tao/Valuetype" + "tao/ZIOP") + if("zlib" IN_LIST FEATURES) + list(APPEND TAO_INCLUDE_FOLDERS "tao/Compression/zlib") + endif() + install_includes(${TAO_ROOT} "${TAO_INCLUDE_FOLDERS}") + endif() + + # Remove dlls without any export + if("tao" IN_LIST FEATURES) + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(REMOVE + ${CURRENT_PACKAGES_DIR}/bin/ACEXML_XML_Svc_Conf_Parser.dll + ${CURRENT_PACKAGES_DIR}/bin/ACEXML_XML_Svc_Conf_Parser.pdb + ${CURRENT_PACKAGES_DIR}/debug/bin/ACEXML_XML_Svc_Conf_Parserd.dll + ${CURRENT_PACKAGES_DIR}/debug/bin/ACEXML_XML_Svc_Conf_Parserd_dll.pdb) + endif() + endif() +elseif(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) + FIND_PROGRAM(MAKE make) + IF (NOT MAKE) + MESSAGE(FATAL_ERROR "MAKE not found") + ENDIF () + + if("ssl" IN_LIST FEATURES) + list(APPEND _ace_makefile_macros "ssl=1") + endif() + + set(ENV{INSTALL_PREFIX} ${CURRENT_PACKAGES_DIR}) + # Set `PWD` environment variable since ACE's `install` make target calculates install dir using this env. + set(_prev_env $ENV{PWD}) + get_filename_component(WORKING_DIR ${WORKSPACE} DIRECTORY) + set(ENV{PWD} ${WORKING_DIR}) + + message(STATUS "Building ${TARGET_TRIPLET}-dbg") + vcpkg_execute_build_process( + COMMAND make ${_ace_makefile_macros} "debug=1" "optimize=0" "-j${VCPKG_CONCURRENCY}" + WORKING_DIRECTORY ${WORKING_DIR} + LOGNAME make-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Building ${TARGET_TRIPLET}-dbg done") + message(STATUS "Packaging ${TARGET_TRIPLET}-dbg") + vcpkg_execute_build_process( + COMMAND make ${_ace_makefile_macros} install + WORKING_DIRECTORY ${WORKING_DIR} + LOGNAME install-${TARGET_TRIPLET}-dbg + ) + + file(COPY ${CURRENT_PACKAGES_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) + + file(GLOB _pkg_components ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/*.pc) + foreach(_pkg_comp ${_pkg_components}) + file(READ ${_pkg_comp} _content) + string(REPLACE "libdir=${CURRENT_PACKAGES_DIR}/lib" "libdir=${CURRENT_PACKAGES_DIR}/debug/lib" _content ${_content}) + file(WRITE ${_pkg_comp} ${_content}) + endforeach() + message(STATUS "Packaging ${TARGET_TRIPLET}-dbg done") + + vcpkg_execute_build_process( + COMMAND make ${_ace_makefile_macros} realclean + WORKING_DIRECTORY ${WORKING_DIR} + LOGNAME realclean-${TARGET_TRIPLET}-dbg + ) + + message(STATUS "Building ${TARGET_TRIPLET}-rel") + vcpkg_execute_build_process( + COMMAND make ${_ace_makefile_macros} "-j${VCPKG_CONCURRENCY}" + WORKING_DIRECTORY ${WORKING_DIR} + LOGNAME make-${TARGET_TRIPLET}-rel + ) + message(STATUS "Building ${TARGET_TRIPLET}-rel done") + message(STATUS "Packaging ${TARGET_TRIPLET}-rel") + vcpkg_execute_build_process( + COMMAND make ${_ace_makefile_macros} install + WORKING_DIRECTORY ${WORKING_DIR} + LOGNAME install-${TARGET_TRIPLET}-rel + ) + if("tao" IN_LIST FEATURES) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + endif() + message(STATUS "Packaging ${TARGET_TRIPLET}-rel done") + # Restore `PWD` environment variable + set($ENV{PWD} _prev_env) + + # Handle copyright + file(INSTALL ${ACE_ROOT}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +endif() diff --git a/vcpkg/ports/activemq-cpp/CONTROL b/vcpkg/ports/activemq-cpp/CONTROL new file mode 100644 index 0000000..3d06d97 --- /dev/null +++ b/vcpkg/ports/activemq-cpp/CONTROL @@ -0,0 +1,5 @@ +Source: activemq-cpp +Version: 3.9.5-3 +Build-Depends: apr +Description: Apache ActiveMQ is the most popular and powerful open source messaging and Integration Patterns server. +Supports: !(uwp|linux|osx) diff --git a/vcpkg/ports/activemq-cpp/FunctionLevelLinkingOn.diff b/vcpkg/ports/activemq-cpp/FunctionLevelLinkingOn.diff new file mode 100644 index 0000000..8d00b1d --- /dev/null +++ b/vcpkg/ports/activemq-cpp/FunctionLevelLinkingOn.diff @@ -0,0 +1,76 @@ +diff --git a/vs2010-build/activemq-cpp.vcxproj b/vs2010-build/activemq-cpp.vcxproj +index a43f072..54b4822 100644 +--- a/vs2010-build/activemq-cpp.vcxproj ++++ b/vs2010-build/activemq-cpp.vcxproj +@@ -2576,7 +2576,7 @@ + ../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories) + false + Default +- false ++ true + false + true + +@@ -2602,7 +2602,7 @@ + ../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories) + false + Default +- false ++ true + false + true + +@@ -2628,7 +2628,7 @@ + ../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories) + false + Default +- false ++ true + false + true + +@@ -2656,7 +2656,7 @@ + ../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories) + false + Default +- false ++ true + false + true + +@@ -2684,7 +2684,7 @@ + ../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories) + false + Default +- false ++ true + false + true + +@@ -2710,7 +2710,7 @@ + ../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories) + false + Default +- false ++ true + false + true + +@@ -2736,7 +2736,7 @@ + ../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories) + false + Default +- false ++ true + false + true + +@@ -2764,7 +2764,7 @@ + ../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories) + false + Default +- false ++ true + false + true + diff --git a/vcpkg/ports/activemq-cpp/fix-crt-linkage.patch b/vcpkg/ports/activemq-cpp/fix-crt-linkage.patch new file mode 100644 index 0000000..fcb74fd --- /dev/null +++ b/vcpkg/ports/activemq-cpp/fix-crt-linkage.patch @@ -0,0 +1,36 @@ +diff --git a/vs2010-build/activemq-cpp.vcxproj b/vs2010-build/activemq-cpp.vcxproj +index 54b4822..6b35511 100644 +--- a/vs2010-build/activemq-cpp.vcxproj ++++ b/vs2010-build/activemq-cpp.vcxproj +@@ -2578,6 +2578,7 @@ + Default + true + false ++ MultiThreadedDebug + true + + +@@ -2687,6 +2688,7 @@ + true + false + true ++ MultiThreadedDebug + + + +@@ -2794,6 +2796,7 @@ + ../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories) + false + true ++ MultiThreaded + + + +@@ -2906,6 +2909,7 @@ + ../src/main;$(APR_DIST)\$(PlatformName)\include;$(OPENSSL_DIST)\$(PlatformName)\include;$(PLATFORM_SDK)\include;%(AdditionalIncludeDirectories) + false + true ++ MultiThreaded + + + diff --git a/vcpkg/ports/activemq-cpp/portfile.cmake b/vcpkg/ports/activemq-cpp/portfile.cmake new file mode 100644 index 0000000..6afa95b --- /dev/null +++ b/vcpkg/ports/activemq-cpp/portfile.cmake @@ -0,0 +1,99 @@ +vcpkg_fail_port_install( ON_TARGET "uwp" "linux" "osx") + +set(VERSION 3.9.5) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.apache.org/dist/activemq/activemq-cpp/${VERSION}/activemq-cpp-library-${VERSION}-src.tar.bz2" + FILENAME "activemq-cpp-library-${VERSION}-src.tar.bz2" + SHA512 83692d3dfd5ecf557fc88d204a03bf169ce6180bcff27be41b09409b8f7793368ffbeed42d98ef6374c6b6b477d9beb8a4a9ac584df9e56725ec59ceceaa6ae2 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + FunctionLevelLinkingOn.diff + fix-crt-linkage.patch +) + +set(ACTIVEMQCPP_MSVC_PROJ ${SOURCE_PATH}/vs2010-build/activemq-cpp.vcxproj) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ACTIVEMQCPP_SHARED_LIB) + +if (ACTIVEMQCPP_SHARED_LIB) + set(RELEASE_CONF "ReleaseDLL") + set(DEBUG_CONF "DebugDLL") + + set(ACTIVEMQCPP_LIB_PREFFIX ) + set(ACTIVEMQCPP_LIB_SUFFIX d) + vcpkg_replace_string(${ACTIVEMQCPP_MSVC_PROJ} ";apr-1.lib" ";libapr-1.lib") +else() + set(RELEASE_CONF "Release") + set(DEBUG_CONF "Debug") + + set(ACTIVEMQCPP_LIB_PREFFIX lib) + set(ACTIVEMQCPP_LIB_SUFFIX ) + vcpkg_replace_string(${ACTIVEMQCPP_MSVC_PROJ} ";libapr-1.lib" ";apr-1.lib") +endif() + +if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") + set(BUILD_ARCH "Win32") + set(OUTPUT_DIR "Win32") +elseif (VCPKG_TARGET_ARCHITECTURE MATCHES "x64") + set(BUILD_ARCH "x64") + set(OUTPUT_DIR "Win64") +else() + message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() + +vcpkg_build_msbuild( + PROJECT_PATH ${ACTIVEMQCPP_MSVC_PROJ} + RELEASE_CONFIGURATION ${RELEASE_CONF} + DEBUG_CONFIGURATION ${DEBUG_CONF} + PLATFORM ${BUILD_ARCH} + USE_VCPKG_INTEGRATION +) + +vcpkg_copy_pdbs() + +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(COPY + ${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${RELEASE_CONF}/${ACTIVEMQCPP_LIB_PREFFIX}activemq-cpp.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) + + if (ACTIVEMQCPP_SHARED_LIB) + file(COPY + ${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${RELEASE_CONF}/activemq-cpp.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) + file(COPY + ${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${RELEASE_CONF}/activemq-cpp.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) + endif() +endif() + +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(COPY + ${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${DEBUG_CONF}/${ACTIVEMQCPP_LIB_PREFFIX}activemq-cpp${ACTIVEMQCPP_LIB_SUFFIX}.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + + if (ACTIVEMQCPP_SHARED_LIB) + file(COPY + ${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${DEBUG_CONF}/activemq-cpp${ACTIVEMQCPP_LIB_SUFFIX}.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) + file(COPY + ${SOURCE_PATH}/vs2010-build/${BUILD_ARCH}/${DEBUG_CONF}/activemq-cpp${ACTIVEMQCPP_LIB_SUFFIX}.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) + endif() +endif() + +file(COPY ${SOURCE_PATH}/src/main/activemq DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.h) +file(COPY ${SOURCE_PATH}/src/main/cms DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.h) +file(COPY ${SOURCE_PATH}/src/main/decaf DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.h) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/ade/CONTROL b/vcpkg/ports/ade/CONTROL new file mode 100644 index 0000000..fd8286e --- /dev/null +++ b/vcpkg/ports/ade/CONTROL @@ -0,0 +1,3 @@ +Source: ade +Version: 0.1.1f +Description: ADE Framework is a graph construction, manipulation, and processing framework. ADE Framework is suitable for organizing data flow processing and execution. \ No newline at end of file diff --git a/vcpkg/ports/ade/portfile.cmake b/vcpkg/ports/ade/portfile.cmake new file mode 100644 index 0000000..83d8503 --- /dev/null +++ b/vcpkg/ports/ade/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO opencv/ade + REF v0.1.1f + SHA512 fbdec8f3d5811a573abb81f1ceb6fb8d40274439013f749645db5430c6d9cdc52227c25203f1a68177b263d648bb65197ea7c2bea7871264a06585e59892631c + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DCMAKE_DEBUG_POSTFIX=d +) + +vcpkg_install_cmake() + +file(COPY ${CURRENT_PACKAGES_DIR}/debug/share/ade/adeTargets-debug.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/ade/) + +file(READ ${CURRENT_PACKAGES_DIR}/share/ade/adeTargets-debug.cmake ADE_TARGET_DEBUG) +string(REPLACE "/lib/" + "/debug/lib/" ADE_TARGET_DEBUG "${ADE_TARGET_DEBUG}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/ade/adeTargets-debug.cmake "${ADE_TARGET_DEBUG}") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ade RENAME copyright) diff --git a/vcpkg/ports/aixlog/CONTROL b/vcpkg/ports/aixlog/CONTROL new file mode 100644 index 0000000..6499b3b --- /dev/null +++ b/vcpkg/ports/aixlog/CONTROL @@ -0,0 +1,3 @@ +Source: aixlog +Version: 1.2.4 +Description: Header-only C++ logging library diff --git a/vcpkg/ports/aixlog/portfile.cmake b/vcpkg/ports/aixlog/portfile.cmake new file mode 100644 index 0000000..ecd69cb --- /dev/null +++ b/vcpkg/ports/aixlog/portfile.cmake @@ -0,0 +1,16 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO badaix/aixlog + REF 9e89f702b71320c49fee1d27cc2d1bffe330dcc6 # v1.2.4 + SHA512 77dbe9631bdabb5c7178a51ecd064be0e3baa76ffdae05d012ac55f6d3837c9c3fb0fd2a1993535756869fc944c89c89ca7093dddb1f1ac0fff5343328536d83 + ) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# Post-build test for cmake libraries +# vcpkg_test_cmake(PACKAGE_NAME aixlog) diff --git a/vcpkg/ports/akali/CONTROL b/vcpkg/ports/akali/CONTROL new file mode 100644 index 0000000..35f86f2 --- /dev/null +++ b/vcpkg/ports/akali/CONTROL @@ -0,0 +1,5 @@ +Source: akali +Version: 1.41 +Port-Version: 1 +Description: C++ Common Library. +Homepage: https://github.com/winsoft666/akali diff --git a/vcpkg/ports/akali/portfile.cmake b/vcpkg/ports/akali/portfile.cmake new file mode 100644 index 0000000..aa59b03 --- /dev/null +++ b/vcpkg/ports/akali/portfile.cmake @@ -0,0 +1,42 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO winsoft666/akali + REF aa0ee3b82cef325ca582fce30bf3bf177ed81e9b + SHA512 0d523191219b19bcf2becb2c9e78b32b50fbbd5a052dd5330e315a6310c0d5c322639434f710a37c6d98e23510506d294b52978f8487227d4461d29d4a6bb502 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" AKALI_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE + PREFER_NINJA + OPTIONS + -DAKALI_STATIC:BOOL=${AKALI_STATIC} + -DBUILD_TESTS:BOOL=OFF +) + +vcpkg_install_cmake() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/akali) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/akali) +elseif(EXISTS ${CURRENT_PACKAGES_DIR}/share/akali) + vcpkg_fixup_cmake_targets(CONFIG_PATH share/akali) +endif() + +file(READ ${CURRENT_PACKAGES_DIR}/include/akali/akali_export.h AKALI_EXPORT_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "#ifdef AKALI_STATIC" "#if 1" AKALI_EXPORT_H "${AKALI_EXPORT_H}") +else() + string(REPLACE "#ifdef AKALI_STATIC" "#if 0" AKALI_EXPORT_H "${AKALI_EXPORT_H}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/akali/akali_export.h "${AKALI_EXPORT_H}") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/alac-decoder/CMakeLists.txt b/vcpkg/ports/alac-decoder/CMakeLists.txt new file mode 100644 index 0000000..a7c62f6 --- /dev/null +++ b/vcpkg/ports/alac-decoder/CMakeLists.txt @@ -0,0 +1,48 @@ +cmake_minimum_required (VERSION 3.9) +project (alac_decoder) + +set(HEADERS + decomp.h + demux.h + stream.h + wavwriter.h +) + +set (SRCS + decomp.c + alac.c + demux.c + stream.c + wavwriter.c +) + +if(MSVC) + add_compile_options(/W4 -D_CRT_SECURE_NO_WARNINGS -DTARGET_OS_WIN32) +else() + add_compile_options(-Wno-error=implicit-function-declaration) +endif() + +include_directories(.) + +add_library(libalac_decoder ${SRCS}) + +add_executable(alac_decoder main.c) +target_link_libraries(alac_decoder libalac_decoder) + +install( + TARGETS libalac_decoder + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_TOOLS) + install ( + TARGETS alac_decoder + RUNTIME DESTINATION tools/alac-decoder + ) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES ${HEADERS} DESTINATION include/alac_decoder) +endif() diff --git a/vcpkg/ports/alac-decoder/CONTROL b/vcpkg/ports/alac-decoder/CONTROL new file mode 100644 index 0000000..e9bc6f6 --- /dev/null +++ b/vcpkg/ports/alac-decoder/CONTROL @@ -0,0 +1,5 @@ +Source: alac-decoder +Version: 0.2 +Port-Version: 4 +Homepage: https://distfiles.macports.org/alac_decoder +Description: ALAC C implementation of a decoder, written from reverse engineering the file format diff --git a/vcpkg/ports/alac-decoder/decomp.c b/vcpkg/ports/alac-decoder/decomp.c new file mode 100644 index 0000000..a769533 --- /dev/null +++ b/vcpkg/ports/alac-decoder/decomp.c @@ -0,0 +1,11 @@ +#include "decomp.h" +#include + +int set_endian() +{ + uint32_t integer = 0x000000aa; + unsigned char *p = (unsigned char*)&integer; + + if (p[0] == 0xaa) return 0; + else return 1; +} diff --git a/vcpkg/ports/alac-decoder/no-pragma-warning.patch b/vcpkg/ports/alac-decoder/no-pragma-warning.patch new file mode 100644 index 0000000..1dc7c06 --- /dev/null +++ b/vcpkg/ports/alac-decoder/no-pragma-warning.patch @@ -0,0 +1,14 @@ +diff --git a/alac.c b/alac.c +index b829e29..8e8805f 100644 +--- a/alac.c ++++ b/alac.c +@@ -284,7 +284,9 @@ static int count_leading_zeros(int input) + return output; + } + #else ++#if !defined(_MSC_VER) + #warning using generic count leading zeroes. You may wish to write one for your CPU / compiler ++#endif + static int count_leading_zeros(int input) + { + int output = 0; diff --git a/vcpkg/ports/alac-decoder/portfile.cmake b/vcpkg/ports/alac-decoder/portfile.cmake new file mode 100644 index 0000000..058179b --- /dev/null +++ b/vcpkg/ports/alac-decoder/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "https://distfiles.macports.org/alac_decoder/alac_decoder-0.2.0.tgz" + FILENAME "alac_decoder-0.2.0.tgz" + SHA512 4b37d4fe37681bfccaa4a27fbaf11eb2a1fba5f14e77d219a6d9814ff44d1168534d05eb19443dd2fd11e6fcdf4da3a22e3f3c79314cb7a6767c152351b13e29 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + remove_stdint_headers.patch + no-pragma-warning.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/decomp.c DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON + -DDISABLE_INSTALL_TOOLS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/alac-decoder/remove_stdint_headers.patch b/vcpkg/ports/alac-decoder/remove_stdint_headers.patch new file mode 100644 index 0000000..834b808 --- /dev/null +++ b/vcpkg/ports/alac-decoder/remove_stdint_headers.patch @@ -0,0 +1,193 @@ +diff --git a/alac.c b/alac.c +index 469000d..c6fe479 100644 +--- a/alac.c ++++ b/alac.c +@@ -33,11 +33,7 @@ + #include + #include + #include +-#ifdef _WIN32 +- #include "stdint_win.h" +-#else +- #include +-#endif ++#include + + #include "decomp.h" + +@@ -54,7 +50,7 @@ + struct {signed int x:24;} se_struct_24; + #define SignExtend24(val) (se_struct_24.x = val) + +-extern int host_bigendian; ++#define host_bigendian set_endian() + + struct alac_file + { +diff --git a/decomp.h b/decomp.h +index 23dbc52..679a320 100644 +--- a/decomp.h ++++ b/decomp.h +@@ -8,6 +8,7 @@ void decode_frame(alac_file *alac, + unsigned char *inbuffer, + void *outbuffer, int *outputsize); + void alac_set_info(alac_file *alac, char *inputbuffer); ++int set_endian(); + + #endif /* __ALAC__DECOMP_H */ + +diff --git a/demux.c b/demux.c +index ae77a9d..9e858a9 100644 +--- a/demux.c ++++ b/demux.c +@@ -33,11 +33,7 @@ + #include + #include + #include +-#ifdef _WIN32 +- #include "stdint_win.h" +-#else +- #include +-#endif ++#include + + #include "stream.h" + #include "demux.h" +diff --git a/demux.h b/demux.h +index 8447bf8..8874ba4 100644 +--- a/demux.h ++++ b/demux.h +@@ -1,11 +1,8 @@ + #ifndef DEMUX_H + #define DEMUX_H + +-#ifdef _WIN32 +- #include "stdint_win.h" +-#else +- #include +-#endif ++ ++#include + + #include "stream.h" + +diff --git a/main.c b/main.c +index 7449ca1..dd58699 100644 +--- a/main.c ++++ b/main.c +@@ -37,11 +37,7 @@ + #include + #include + #include +-#ifdef _WIN32 +- #include "stdint_win.h" +-#else +- #include +-#endif ++#include + + #include "demux.h" + #include "decomp.h" +@@ -267,19 +263,7 @@ static void setup_environment(int argc, char **argv) + } + } + +-/* this could quite easily be done at compile time, +- * however I don't want to have to bother with all the +- * various possible #define's for endianness, worrying about +- * different compilers etc. and I'm too lazy to use autoconf. +- */ +-void set_endian() +-{ +- uint32_t integer = 0x000000aa; +- unsigned char *p = (unsigned char*)&integer; + +- if (p[0] == 0xaa) host_bigendian = 0; +- else host_bigendian = 1; +-} + + int main(int argc, char **argv) + { +@@ -288,7 +272,7 @@ int main(int argc, char **argv) + + memset(&demux_res, 0, sizeof(demux_res)); + +- set_endian(); ++ host_bigendian = set_endian(); + + setup_environment(argc, argv); + +diff --git a/stream.c b/stream.c +index 565db54..56727a0 100644 +--- a/stream.c ++++ b/stream.c +@@ -33,13 +33,10 @@ + #include + #include + #include +-#ifdef _WIN32 +- #include "stdint_win.h" +-#else +- #include +-#endif ++#include + + #include "stream.h" ++#include "decomp.h" + + #define _Swap32(v) do { \ + v = (((v) & 0x000000FF) << 0x18) | \ +@@ -51,7 +48,7 @@ + v = (((v) & 0x00FF) << 0x08) | \ + (((v) & 0xFF00) >> 0x08); } while (0) + +-extern int host_bigendian; ++#define host_bigendian set_endian() + + struct stream_tTAG { + FILE *f; +diff --git a/stream.h b/stream.h +index 18d6aa0..ff6325e 100644 +--- a/stream.h ++++ b/stream.h +@@ -3,11 +3,8 @@ + + /* stream.h */ + +-#ifdef _WIN32 +- #include "stdint_win.h" +-#else +- #include +-#endif ++#include ++ + + typedef struct stream_tTAG stream_t; + +diff --git a/wavwriter.c b/wavwriter.c +index fd19502..ce941c7 100644 +--- a/wavwriter.c ++++ b/wavwriter.c +@@ -32,11 +32,8 @@ + + #include + #include +-#ifdef _WIN32 +- #include "stdint_win.h" +-#else +- #include +-#endif ++#include ++ + + #ifndef MAKEFOURCC + #define MAKEFOURCC(ch0, ch1, ch2, ch3) ( \ +@@ -56,7 +53,7 @@ + v = (((v) & 0x00FF) << 0x08) | \ + (((v) & 0xFF00) >> 0x08); } while (0) + +-extern int host_bigendian; ++#define host_bigendian set_endian() + + static void write_uint32(FILE *f, uint32_t v, int bigendian) + { diff --git a/vcpkg/ports/alac/CMakeLists.txt b/vcpkg/ports/alac/CMakeLists.txt new file mode 100644 index 0000000..fbe190b --- /dev/null +++ b/vcpkg/ports/alac/CMakeLists.txt @@ -0,0 +1,61 @@ +cmake_minimum_required (VERSION 3.9) +project (alac) + +set(HEADERS + codec/EndianPortable.h + codec/aglib.h + codec/ALACAudioTypes.h + codec/ALACBitUtilities.h + codec/ALACDecoder.h + codec/ALACEncoder.h + codec/dplib.h + codec/matrixlib.h +) + + +set (SRCS + codec/EndianPortable.c + codec/ALACBitUtilities.c + codec/ALACDecoder.cpp + codec/ALACEncoder.cpp + codec/ag_dec.c + codec/ag_enc.c + codec/dp_dec.c + codec/dp_enc.c + codec/matrix_dec.c + codec/matrix_enc.c +) + +set(EXE_SRCS + convert-utility/main.cpp + convert-utility/CAFFileALAC.cpp +) + +if(MSVC) + add_compile_options(/W4 -D_CRT_SECURE_NO_WARNINGS -DTARGET_OS_WIN32) +endif() + +include_directories(. codec convert-utility) + +add_library(libalac ${SRCS}) + +add_executable(alacconvert ${EXE_SRCS}) +target_link_libraries(alacconvert libalac) + +install( + TARGETS libalac + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_TOOLS) + install ( + TARGETS alacconvert + RUNTIME DESTINATION tools/alac + ) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES ${HEADERS} DESTINATION include/alac) +endif() diff --git a/vcpkg/ports/alac/CONTROL b/vcpkg/ports/alac/CONTROL new file mode 100644 index 0000000..7938d6b --- /dev/null +++ b/vcpkg/ports/alac/CONTROL @@ -0,0 +1,5 @@ +Source: alac +Version: 2017-11-03-c38887c5-1 +Homepage: https://github.com/macosforge/alac +Description: The Apple Lossless Audio Codec (ALAC) is a lossless audio codec developed by Apple and deployed on all of its platforms and devices. +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/alac/portfile.cmake b/vcpkg/ports/alac/portfile.cmake new file mode 100644 index 0000000..ce5c6ba --- /dev/null +++ b/vcpkg/ports/alac/portfile.cmake @@ -0,0 +1,28 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO macosforge/alac + REF c38887c5c5e64a4b31108733bd79ca9b2496d987 + SHA512 8da18df25807e76f9187f7bf30585aace303d55444f0a614ab00d98d11caca3fdc5c6f5b9fd11e5f4c92a2ab1e86fef73deeeada57e9d49951fea8b80ba383cc + 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 -DDISABLE_INSTALL_TOOLS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/alac) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/alac RENAME copyright) diff --git a/vcpkg/ports/alembic/CONTROL b/vcpkg/ports/alembic/CONTROL new file mode 100644 index 0000000..e58acda --- /dev/null +++ b/vcpkg/ports/alembic/CONTROL @@ -0,0 +1,7 @@ +Source: alembic +Version: 1.7.13 +Port-Version: 1 +Build-Depends: ilmbase, hdf5 +Description: Alembic is an open framework for storing and sharing scene data that includes a C++ library, a file format, and client plugins and applications. +Homepage: https://alembic.io/ +Supports: windows & !arm & !uwp & !static diff --git a/vcpkg/ports/alembic/fix-find-openexr-ilmbase.patch b/vcpkg/ports/alembic/fix-find-openexr-ilmbase.patch new file mode 100644 index 0000000..f35f17d --- /dev/null +++ b/vcpkg/ports/alembic/fix-find-openexr-ilmbase.patch @@ -0,0 +1,50 @@ +diff --git a/cmake/AlembicIlmBase.cmake b/cmake/AlembicIlmBase.cmake +index cd00d70..0e50512 100644 +--- a/cmake/AlembicIlmBase.cmake ++++ b/cmake/AlembicIlmBase.cmake +@@ -33,11 +33,17 @@ + ## + ##-***************************************************************************** + +-FIND_PACKAGE(IlmBase) ++FIND_PACKAGE(OpenEXR) + +-IF (ILMBASE_FOUND) ++IF (OPENEXR_FOUND) + SET(ALEMBIC_ILMBASE_FOUND 1 CACHE STRING "Set to 1 if IlmBase is found, 0 otherwise") + ++ set(ALEMBIC_ILMBASE_INCLUDE_DIRECTORY ${OpenEXR_INCLUDE_DIRS}/OpenEXR) ++ set(ALEMBIC_ILMBASE_HALF_LIB ${OPENEXR_HALF_LIBRARY}) ++ set(ALEMBIC_ILMBASE_IEX_LIB ${OPENEXR_IEX_LIBRARY}) ++ set(ALEMBIC_ILMBASE_IEXMATH_LIB ${OPENEXR_IEXMATH_LIBRARY} ${OPENEXR_IMATH_LIBRARY}) ++ set(ALEMBIC_ILMBASE_ILMTHREAD_LIB ${OPENEXR_ILMTHREAD_LIBRARY}) ++ set(ALEMBIC_ILMBASE_IMATH_LIB ${OPENEXR_IMATH_LIBRARY}) + SET(ALEMBIC_ILMBASE_LIBS + ${ALEMBIC_ILMBASE_IMATH_LIB} + ${ALEMBIC_ILMBASE_ILMTHREAD_LIB} +@@ -45,9 +59,9 @@ IF (ILMBASE_FOUND) + ${ALEMBIC_ILMBASE_HALF_LIB} + ) + +- if (${ALEMBIC_ILMBASE_IEXMATH_LIB}) ++ if (ALEMBIC_ILMBASE_IEXMATH_LIB) + SET(ALEMBIC_ILMBASE_LIBS ${ALEMBIC_ILMBASE_LIBS} ${ALEMBIC_ILMBASE_IEXMATH_LIB}) +- endif (${ALEMBIC_ILMBASE_IEXMATH_LIB}) ++ endif (ALEMBIC_ILMBASE_IEXMATH_LIB) + + ELSE() + SET(ALEMBIC_ILMBASE_FOUND 0 CACHE STRING "Set to 1 if IlmBase is found, 0 otherwise") +diff --git a/cmake/AlembicOpenEXR.cmake b/cmake/AlembicOpenEXR.cmake +index 0833b32..a9180cd 100644 +--- a/cmake/AlembicOpenEXR.cmake ++++ b/cmake/AlembicOpenEXR.cmake +@@ -38,8 +38,8 @@ + FIND_PACKAGE( OpenEXR ) + + IF( OPENEXR_FOUND ) +- SET( ALEMBIC_OPENEXR_INCLUDE_PATH ${OPENEXR_INCLUDE_PATHS} ) ++ SET( ALEMBIC_OPENEXR_INCLUDE_PATH ${OPENEXR_INCLUDE_PATHS}/OpenEXR ) + SET( ALEMBIC_OPENEXR_LIBRARIES ${OPENEXR_LIBRARIES} ) + # SET( ALEMBIC_OPENEXR_DEFINITIONS ${OPENEXR_DEFINITIONS} ) + + SET( ALEMBIC_OPENEXR_FOUND 1 CACHE STRING "Set to 1 if OpenEXR is found, 0 otherwise" ) diff --git a/vcpkg/ports/alembic/portfile.cmake b/vcpkg/ports/alembic/portfile.cmake new file mode 100644 index 0000000..6c9a2b5 --- /dev/null +++ b/vcpkg/ports/alembic/portfile.cmake @@ -0,0 +1,72 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP" "OSX" "Linux") + +vcpkg_buildpath_length_warning(37) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO alembic/alembic + REF cfe114639ef7ad084d61e71ab86a17e708d838ae #v1.7.13 + SHA512 38b797c1179e759870f10afc4a2182bc3e874eacecc9627c879d3a5cf35e49c83cae80600678427e5c22d6576d0e6280ce3cf0a2ac505f1df74ec4a8bdb083b5 + HEAD_REF master + PATCHES + fix-find-openexr-ilmbase.patch +) + +file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindIlmBase.cmake) +file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindOpenEXR.cmake) + +if(NOT VCPKG_TARGET_IS_WINDOWS) + # In debug mode with g++, alembic defines -Werror + # so we need to disable some warnings to avoid build errors + list(APPEND GXX_DEBUG_FLAGS + -DCMAKE_CXX_FLAGS_DEBUG=-Wno-deprecated + -DCMAKE_CXX_FLAGS_DEBUG=-Wno-error=implicit-fallthrough + ) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DUSE_HDF5=ON + OPTIONS_DEBUG + ${GXX_DEBUG_FLAGS} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Alembic) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +if(VCPKG_TARGET_IS_WINDOWS) + file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe) + file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + file(REMOVE ${EXE}) + file(REMOVE ${DEBUG_EXE}) + + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/Alembic.dll ${CURRENT_PACKAGES_DIR}/bin/Alembic.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/Alembic.dll ${CURRENT_PACKAGES_DIR}/debug/bin/Alembic.dll) + + file(READ ${CURRENT_PACKAGES_DIR}/share/${PORT}/AlembicTargets-debug.cmake DEBUG_CONFIG) + string(REPLACE "\${_IMPORT_PREFIX}/debug/lib/Alembic.dll" + "\${_IMPORT_PREFIX}/debug/bin/Alembic.dll" DEBUG_CONFIG "${DEBUG_CONFIG}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/AlembicTargets-debug.cmake "${DEBUG_CONFIG}") + + file(READ ${CURRENT_PACKAGES_DIR}/share/${PORT}/AlembicTargets-release.cmake RELEASE_CONFIG) + string(REPLACE "\${_IMPORT_PREFIX}/lib/Alembic.dll" + "\${_IMPORT_PREFIX}/bin/Alembic.dll" RELEASE_CONFIG "${RELEASE_CONFIG}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/AlembicTargets-release.cmake "${RELEASE_CONFIG}") +else() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/aliyun-oss-c-sdk/CONTROL b/vcpkg/ports/aliyun-oss-c-sdk/CONTROL new file mode 100644 index 0000000..4eaa98e --- /dev/null +++ b/vcpkg/ports/aliyun-oss-c-sdk/CONTROL @@ -0,0 +1,5 @@ +Source: aliyun-oss-c-sdk +Version: 3.9.1 +Description: Alibaba Cloud Object Storage Service (OSS) is a cloud storage service provided by Alibaba Cloud, featuring massive capacity, security, a low cost, and high reliability. +Build-Depends: curl, apr-util +Supports: !uwp diff --git a/vcpkg/ports/aliyun-oss-c-sdk/patch.patch b/vcpkg/ports/aliyun-oss-c-sdk/patch.patch new file mode 100644 index 0000000..31c18d8 --- /dev/null +++ b/vcpkg/ports/aliyun-oss-c-sdk/patch.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0abcb93..75195a9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -150,5 +150,5 @@ INSTALL(FILES + oss_c_sdk/oss_xml.h + DESTINATION include/oss_c_sdk) + +-add_subdirectory(oss_c_sdk_sample) +-add_subdirectory(oss_c_sdk_test) ++#add_subdirectory(oss_c_sdk_sample) ++#add_subdirectory(oss_c_sdk_test) diff --git a/vcpkg/ports/aliyun-oss-c-sdk/portfile.cmake b/vcpkg/ports/aliyun-oss-c-sdk/portfile.cmake new file mode 100644 index 0000000..738a0c3 --- /dev/null +++ b/vcpkg/ports/aliyun-oss-c-sdk/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO aliyun/aliyun-oss-c-sdk + REF 703ea9a0dee0ddf4eacc7f9782ba970adccc58e8 # 3.9.1 + SHA512 01f33d73031039d64433823c6b7b540071d18560ee0df762ef58b30898bde520c8cfb8bcf631a62cbd709d8c996b9dfc8c31c2286ceb9d1925161c39dbbe97fc + HEAD_REF master + PATCHES + patch.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/vcpkg/ports/allegro5/CONTROL b/vcpkg/ports/allegro5/CONTROL new file mode 100644 index 0000000..1672e4f --- /dev/null +++ b/vcpkg/ports/allegro5/CONTROL @@ -0,0 +1,5 @@ +Source: allegro5 +Version: 5.2.6.0 +Homepage: https://github.com/liballeg/allegro5 +Description: Allegro is a cross-platform library mainly aimed at video game and multimedia programming. It handles common, low-level tasks such as creating windows, accepting user input, loading data, drawing images, playing sounds, etc. and generally abstracting away the underlying platform. However, Allegro is not a game engine: you are free to design and structure your program as you like. +Build-Depends: opengl, zlib, freetype, libogg, libvorbis, libflac, openal-soft, libpng, bzip2, physfs, libtheora, opus, opusfile diff --git a/vcpkg/ports/allegro5/fix-pdb-install.patch b/vcpkg/ports/allegro5/fix-pdb-install.patch new file mode 100644 index 0000000..714c69c --- /dev/null +++ b/vcpkg/ports/allegro5/fix-pdb-install.patch @@ -0,0 +1,34 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 72348fe..c6fbecb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1010,14 +1010,9 @@ else() + set(PKG_CONFIG_FILES allegro ${ADDON_PKG_CONFIG_FILES}) + endif(WANT_MONOLITH) + +-# Install pkg-config files on Unix, and when cross-compiling on Unix. ++# Install pkg-config files + +-if(UNIX AND NOT WANT_FRAMEWORKS AND NOT IPHONE) +- set(INSTALL_PKG_CONFIG_FILES true) +-endif() +-if(CMAKE_CROSSCOMPILING AND CMAKE_HOST_UNIX) +- set(INSTALL_PKG_CONFIG_FILES true) +-endif() ++set(INSTALL_PKG_CONFIG_FILES true) + + if(INSTALL_PKG_CONFIG_FILES) + append_lib_type_suffix(lib_type) +diff --git a/cmake/Common.cmake b/cmake/Common.cmake +index 782196f..de29535 100644 +--- a/cmake/Common.cmake ++++ b/cmake/Common.cmake +@@ -223,7 +223,7 @@ function(install_our_library target filename) + # PUBLIC_HEADER DESTINATION "include" + ) + if(MSVC AND BUILD_SHARED_LIBS) +- install(FILES ${CMAKE_BINARY_DIR}/lib/\${CMAKE_INSTALL_CONFIG_NAME}/${filename}.pdb ++ install(FILES ${CMAKE_BINARY_DIR}/lib/${filename}.pdb + DESTINATION lib + CONFIGURATIONS Debug RelWithDebInfo + ) diff --git a/vcpkg/ports/allegro5/portfile.cmake b/vcpkg/ports/allegro5/portfile.cmake new file mode 100644 index 0000000..2ae7b48 --- /dev/null +++ b/vcpkg/ports/allegro5/portfile.cmake @@ -0,0 +1,76 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO liballeg/allegro5 + REF 5.2.6.0 + SHA512 d590c1a00d1b314c6946e0f6ad3e3a8b6e6309bada2ec38857186f817147ac99dae8a1c4412abe701af88da5dca3dd8f989a1da66630192643d3c08c0146b603 + HEAD_REF master + PATCHES + fix-pdb-install.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(VCPKG_BUILD_SHARED_LIBS ON) +else() + set(VCPKG_BUILD_SHARED_LIBS OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DWANT_DOCS=OFF + -DALLEGRO_SDL=OFF + -DWANT_DEMO=OFF + -DSHARED=${VCPKG_BUILD_SHARED_LIBS} + -DWANT_EXAMPLES=OFF + -DWANT_CURL_EXAMPLE=OFF + -DWANT_TESTS=OFF + -DWANT_AUDIO=ON + -DWANT_COLOR=ON + -DWANT_D3D=ON + -DWANT_D3D9EX=OFF # Not available on vcpkg + -DWANT_DSOUND=ON + -DWANT_FLAC=ON + -DWANT_FONT=ON + -DWANT_GLES2=ON + -DWANT_GLES3=ON + -DWANT_IMAGE=ON + -DWANT_IMAGE_JPG=ON + -DWANT_IMAGE_PNG=ON + -DWANT_MEMFILE=ON + -DWANT_MODAUDIO=OFF # Not available on vcpkg right now + -DWANT_NATIVE_DIALOG=ON + -DWANT_NATIVE_IMAGE_LOADER=ON + -DWANT_OGG_VIDEO=ON + -DWANT_OPENAL=ON + -DWANT_OPENGL=ON + -DWANT_OPENSL=OFF # Not yet available on vcpkg + -DWANT_OPUS=ON + -DWANT_PHYSFS=ON + -DWANT_POPUP_EXAMPLES=OFF + -DWANT_PRIMITIVES=ON + -DWANT_RELEASE_LOGGING=OFF + -DWANT_SHADERS_D3D=ON + -DWANT_SHADERS_GL=ON + -DWANT_TREMOR=OFF # Not yet available on vcpkg + -DWANT_TTF=ON + -DWANT_VIDEO=ON + -DWANT_VORBIS=ON + -DOPENAL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/AL + -DZLIB_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include + OPTIONS_RELEASE -DWANT_ALLOW_SSE=ON + OPTIONS_DEBUG -DWANT_ALLOW_SSE=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(GLOB PDB_GLOB ${CURRENT_BUILDTREES_DIR}-dbg/lib/*.pdb) +file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}-dbg/lib/Debug) +file(COPY ${PDB_GLOB} DESTINATION ${CURRENT_BUILDTREES_DIR}-dbg/lib/Debug) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/allegro5 RENAME copyright) diff --git a/vcpkg/ports/ampl-mp/CONTROL b/vcpkg/ports/ampl-mp/CONTROL new file mode 100644 index 0000000..a8f88ac --- /dev/null +++ b/vcpkg/ports/ampl-mp/CONTROL @@ -0,0 +1,4 @@ +Source: ampl-mp +Version: 2019-03-21-1 +Description: An open-source library for mathematical programming +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/ampl-mp/disable-matlab-mex.patch b/vcpkg/ports/ampl-mp/disable-matlab-mex.patch new file mode 100644 index 0000000..f1b8be4 --- /dev/null +++ b/vcpkg/ports/ampl-mp/disable-matlab-mex.patch @@ -0,0 +1,11 @@ +--- a/src/asl/CMakeLists.txt 2019-02-08 16:42:50.793071700 -0600 ++++ b/src/asl/CMakeLists.txt 2019-02-08 16:44:04.960894500 -0600 +@@ -266,7 +266,7 @@ endif () + + target_link_libraries(asl ${CMAKE_DL_LIBS}) + +-find_package(MATLAB) ++set(MATLAB_FOUND) + if (MATLAB_FOUND) + set(matlab_asl asl) + if (MSVC) diff --git a/vcpkg/ports/ampl-mp/install-targets.patch b/vcpkg/ports/ampl-mp/install-targets.patch new file mode 100644 index 0000000..8538920 --- /dev/null +++ b/vcpkg/ports/ampl-mp/install-targets.patch @@ -0,0 +1,44 @@ +--- a/CMakeLists.txt 2019-02-09 04:38:25.756325900 -0600 ++++ b/CMakeLists.txt 2019-02-09 04:39:55.299417600 -0600 +@@ -289,6 +289,8 @@ add_prefix(MP_SOURCES src/ + add_mp_library(mp ${MP_HEADERS} ${MP_SOURCES} ${MP_EXPR_INFO_FILE} + COMPILE_DEFINITIONS MP_DATE=${MP_DATE} MP_SYSINFO="${MP_SYSINFO}" + INCLUDE_DIRECTORIES src OBJECT_LIBRARIES format) ++set_property(TARGET mp PROPERTY ++ INTERFACE_INCLUDE_DIRECTORIES $) + set_target_properties(mp PROPERTIES + VERSION ${MP_VERSION} SOVERSION ${MP_VERSION_MAJOR}) + +@@ -385,5 +387,10 @@ if(BUILD_TESTING) + endif() + + install(DIRECTORY include/mp DESTINATION include) +-install(TARGETS mp DESTINATION lib RUNTIME DESTINATION bin) ++install(TARGETS mp EXPORT unofficial-mp-targets ++ DESTINATION lib RUNTIME DESTINATION bin) + install(FILES LICENSE.rst DESTINATION share/mp) ++install(EXPORT unofficial-mp-targets ++ FILE unofficial-mp-config.cmake ++ NAMESPACE unofficial::mp:: ++ DESTINATION share/unofficial-mp) +--- a/src/asl/CMakeLists.txt 2019-02-09 04:38:27.196322600 -0600 ++++ b/src/asl/CMakeLists.txt 2019-02-09 04:39:32.119889500 -0600 +@@ -235,6 +235,10 @@ add_mp_library(asl-extra OBJECT ${ASL_SO + + add_mp_library(asl STATIC OBJECT_LIBRARIES asl-core asl-extra + LIBRARIES mp INCLUDE_DIRECTORIES ${ASL_INCLUDE_DIRS}) ++set_property(TARGET asl PROPERTY ++ INTERFACE_INCLUDE_DIRECTORIES ++ $ ++ $) + + if (NOT WIN32) + target_link_libraries(asl m) +@@ -353,4 +357,6 @@ endif () + install(FILES ${ASL_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/arith.h + solvers/opcode.hd solvers/r_opn.hd + DESTINATION include/asl) +-install(TARGETS asl tableproxy DESTINATION lib RUNTIME DESTINATION bin) ++install(TARGETS tableproxy DESTINATION lib RUNTIME DESTINATION bin) ++install(TARGETS asl EXPORT unofficial-mp-targets ++ DESTINATION lib RUNTIME DESTINATION bin) diff --git a/vcpkg/ports/ampl-mp/portfile.cmake b/vcpkg/ports/ampl-mp/portfile.cmake new file mode 100644 index 0000000..00d577e --- /dev/null +++ b/vcpkg/ports/ampl-mp/portfile.cmake @@ -0,0 +1,47 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "Cross-compiling is not supported") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ampl/mp + REF 67875b71ef68511277ec2dc8224f613487cefce9 + SHA512 fad2496c10b843ddad7c4dba1eea1b4cd22e90be12dec2ad598fbd1ed5e1c492d92c5130490c7045ea608bc9ea2af191661c39b3bee3bc5159663f306ce50950 + HEAD_REF master + PATCHES + disable-matlab-mex.patch + workaround-msvc-optimizer-ice.patch + install-targets.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD=asl + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets( + CONFIG_PATH share/unofficial-mp + TARGET_PATH share/unofficial-mp +) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/tools/${PORT}) +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/bin + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/share/mp) + +configure_file(${SOURCE_PATH}/LICENSE.rst + ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +vcpkg_copy_pdbs() +vcpkg_test_cmake(PACKAGE_NAME unofficial-mp) diff --git a/vcpkg/ports/ampl-mp/workaround-msvc-optimizer-ice.patch b/vcpkg/ports/ampl-mp/workaround-msvc-optimizer-ice.patch new file mode 100644 index 0000000..7e6d736 --- /dev/null +++ b/vcpkg/ports/ampl-mp/workaround-msvc-optimizer-ice.patch @@ -0,0 +1,28 @@ +diff --git a/src/asl/solvers/avltree.c b/src/asl/solvers/avltree.c +index 7a9adaba..4dd97054 100644 +--- a/src/asl/solvers/avltree.c ++++ b/src/asl/solvers/avltree.c +@@ -54,6 +54,9 @@ AVL_Tree { + void (*Free)(void*); + }; + ++#if defined(_MSC_VER) && _MSC_VER < 1917 ++#pragma optimize("", off) ++#endif + AVL_Tree* + AVL_Tree_alloc2(void *v, AVL_Elcomp cmp, void *(*Malloc)(size_t), void (*Free)(void*)) + { +diff --git a/src/asl/solvers/sphes.c b/src/asl/solvers/sphes.c +index 326d997f..ae8952ed 100644 +--- a/src/asl/solvers/sphes.c ++++ b/src/asl/solvers/sphes.c +@@ -452,6 +452,9 @@ compar(const void *a, const void *b) + #undef del_mblk + #define del_mblk(b,c) Del_mblk_ASL(a,b,(Char*)(c)) + ++#if defined(_MSC_VER) && _MSC_VER < 1917 ++#pragma optimize("", off) ++#endif + static void + new_Hesoprod(ASL_pfgh *asl, ograd *L, ograd *R, real coef) + { diff --git a/vcpkg/ports/amqpcpp/CONTROL b/vcpkg/ports/amqpcpp/CONTROL new file mode 100644 index 0000000..910b53e --- /dev/null +++ b/vcpkg/ports/amqpcpp/CONTROL @@ -0,0 +1,6 @@ +Source: amqpcpp +Version: 4.1.7 +Homepage: https://github.com/CopernicaMarketingSoftware/AMQP-CPP +Description: AMQP-CPP is a C++ library for communicating with a RabbitMQ message broker +Build-Depends: openssl (linux) +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/amqpcpp/find-openssl.patch b/vcpkg/ports/amqpcpp/find-openssl.patch new file mode 100644 index 0000000..ad841ed --- /dev/null +++ b/vcpkg/ports/amqpcpp/find-openssl.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 645bb32..3ef5c4b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -89,6 +89,11 @@ else() + add_library(${PROJECT_NAME} STATIC ${src_MAIN} ${src_LINUX_TCP}) + endif() + ++if(AMQP-CPP_LINUX_TCP) ++ find_path(OPENSSL_INCLUDE_DIR openssl/ssl.h) ++ include_directories(${OPENSSL_INCLUDE_DIR}) ++endif() ++ + # install rules + # ------------------------------------------------------------------------------------------------------ + diff --git a/vcpkg/ports/amqpcpp/portfile.cmake b/vcpkg/ports/amqpcpp/portfile.cmake new file mode 100644 index 0000000..3b160e6 --- /dev/null +++ b/vcpkg/ports/amqpcpp/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO CopernicaMarketingSoftware/AMQP-CPP + REF e7f76bc75d7855012450763a638092925d52f417 #v4.1.7 + SHA512 ce105622d09014b51876911e95c4523b786d670bbd0bafa47874c6d52dca63f610dbb52561107bd1941c1fda79a4e200331779a79f9394c1ea437e0e1a4695bf + HEAD_REF master + PATCHES + find-openssl.patch +) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(LINUX_TCP ON) +else() + set(LINUX_TCP OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DAMQP-CPP_BUILD_SHARED=OFF + -DAMQP-CPP_LINUX_TCP=${LINUX_TCP} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/vcpkg/ports/anax/Add-bin-output.patch b/vcpkg/ports/anax/Add-bin-output.patch new file mode 100644 index 0000000..333a92f --- /dev/null +++ b/vcpkg/ports/anax/Add-bin-output.patch @@ -0,0 +1,10 @@ +--- a/CMakeLists.txt Tue Oct 13 13:47:40 2015 ++++ b/CMakeLists.txt Tue Dec 06 11:13:23 2016 +@@ -161,6 +161,7 @@ + # Library files + install( + TARGETS ${ANAX_LIBRARY_NAME} ++ RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + ) diff --git a/vcpkg/ports/anax/CONTROL b/vcpkg/ports/anax/CONTROL new file mode 100644 index 0000000..a672637 --- /dev/null +++ b/vcpkg/ports/anax/CONTROL @@ -0,0 +1,4 @@ +Source: anax +Version: 2.1.0-6 +Description: An open source C++ entity system. +Homepage: https://github.com/miguelmartin75/anax diff --git a/vcpkg/ports/anax/portfile.cmake b/vcpkg/ports/anax/portfile.cmake new file mode 100644 index 0000000..bdecbf3 --- /dev/null +++ b/vcpkg/ports/anax/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO miguelmartin75/anax + REF v2.1.0 + SHA512 b573733b5f9634bf8cfc5b0715074f9a8ee29ecb48dc981d9371254a1f6ff8afbbb9ba6aa0877d53e518e5486ecc398a6d331fb9b5dbfd17d8707679216e11a3 + HEAD_REF master + PATCHES + Add-bin-output.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/anax) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/anax/LICENSE ${CURRENT_PACKAGES_DIR}/share/anax/copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/angelscript/CONTROL b/vcpkg/ports/angelscript/CONTROL new file mode 100644 index 0000000..4ec91f2 --- /dev/null +++ b/vcpkg/ports/angelscript/CONTROL @@ -0,0 +1,6 @@ +Source: angelscript +Version: 2.34.0 +Description: The AngelCode Scripting Library, or AngelScript as it is also known, is an extremely flexible cross-platform scripting library designed to allow applications to extend their functionality through external scripts. It has been designed from the beginning to be an easy to use component, both for the application programmer and the script writer. + +Feature: addons +Description: Installs all addons for use in compiling scripts addons diff --git a/vcpkg/ports/angelscript/LICENSE b/vcpkg/ports/angelscript/LICENSE new file mode 100644 index 0000000..ea549c6 --- /dev/null +++ b/vcpkg/ports/angelscript/LICENSE @@ -0,0 +1,13 @@ +AngelCode Scripting Library + +Copyright © 2003-2018 Andreas Jönsson + +This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: + + The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. + + Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + + This notice may not be removed or altered from any source distribution. diff --git a/vcpkg/ports/angelscript/mark-threads-private.patch b/vcpkg/ports/angelscript/mark-threads-private.patch new file mode 100644 index 0000000..aaf28b4 --- /dev/null +++ b/vcpkg/ports/angelscript/mark-threads-private.patch @@ -0,0 +1,13 @@ +diff --git a/angelscript/projects/cmake/CMakeLists.txt b/angelscript/projects/cmake/CMakeLists.txt +index 7c800c5..982ad8b 100644 +--- a/angelscript/projects/cmake/CMakeLists.txt ++++ b/angelscript/projects/cmake/CMakeLists.txt +@@ -145,7 +145,7 @@ endif() + + # Don't override the default library output path to avoid conflicts when building for multiple target platforms + #set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/../../lib) +-target_link_libraries(${ANGELSCRIPT_LIBRARY_NAME} Threads::Threads) ++target_link_libraries(${ANGELSCRIPT_LIBRARY_NAME} PRIVATE Threads::Threads) + + set_target_properties(${ANGELSCRIPT_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION}) + diff --git a/vcpkg/ports/angelscript/portfile.cmake b/vcpkg/ports/angelscript/portfile.cmake new file mode 100644 index 0000000..c0d41d9 --- /dev/null +++ b/vcpkg/ports/angelscript/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "https://angelcode.com/angelscript/sdk/files/angelscript_2.34.0.zip" + FILENAME "angelscript_2.34.0.zip" + SHA512 c26dba452ab52c300da9c95fde8398acf4840cbc0e653ededf978d4a3e942cfe5b77292c74c49dc0279250a27cfd324c696c49d139a97c844b2a1eead9aae2f4 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + mark-threads-private.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/angelscript/projects/cmake + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Angelscript) + +# Copy the addon files +if("addons" IN_LIST FEATURES) + file(INSTALL ${SOURCE_PATH}/add_on/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/angelscript FILES_MATCHING PATTERN "*.h" PATTERN "*.cpp") +endif() + +file(INSTALL ${CURRENT_PORT_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/angle/001-fix-uwp.patch b/vcpkg/ports/angle/001-fix-uwp.patch new file mode 100644 index 0000000..cba68d6 --- /dev/null +++ b/vcpkg/ports/angle/001-fix-uwp.patch @@ -0,0 +1,30 @@ +diff --git a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp +index 7d3f078d6..fac057dd6 100644 +--- a/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp ++++ b/src/libANGLE/renderer/d3d/d3d11/winrt/CoreWindowNativeWindow.cpp +@@ -213,16 +213,20 @@ HRESULT GetCoreWindowSizeInPixels(const ComPtr displayProperties; ++ ComPtr displayInformationStatics; ++ ComPtr displayInformation; + + if (SUCCEEDED(GetActivationFactory( +- HStringReference(RuntimeClass_Windows_Graphics_Display_DisplayProperties).Get(), +- displayProperties.GetAddressOf()))) ++ HStringReference(RuntimeClass_Windows_Graphics_Display_DisplayInformation).Get(), ++ displayInformationStatics.GetAddressOf()))) + { + float dpi = 96.0f; +- if (SUCCEEDED(displayProperties->get_LogicalDpi(&dpi))) ++ if (SUCCEEDED(displayInformationStatics->GetForCurrentView(&displayInformation))) + { +- return dpi; ++ if (SUCCEEDED(displayInformation->get_LogicalDpi(&dpi))) ++ { ++ return dpi; ++ } + } + } + diff --git a/vcpkg/ports/angle/002-fix-builder-error.patch b/vcpkg/ports/angle/002-fix-builder-error.patch new file mode 100644 index 0000000..8c632d1 --- /dev/null +++ b/vcpkg/ports/angle/002-fix-builder-error.patch @@ -0,0 +1,28 @@ +diff --git a/src/gpu_info_util/SystemInfo_win.cpp b/src/gpu_info_util/SystemInfo_win.cpp +index f4bb137f2..86495013b 100644 +--- a/src/gpu_info_util/SystemInfo_win.cpp ++++ b/src/gpu_info_util/SystemInfo_win.cpp +@@ -6,11 +6,6 @@ + + // SystemInfo_win.cpp: implementation of the Windows-specific parts of SystemInfo.h + +-#include "gpu_info_util/SystemInfo_internal.h" +- +-#include "common/debug.h" +-#include "common/string_utils.h" +- + // Windows.h needs to be included first + #include + +@@ -19,6 +14,11 @@ + #include + #include + ++#include "gpu_info_util/SystemInfo_internal.h" ++ ++#include "common/debug.h" ++#include "common/string_utils.h" ++ + namespace angle + { + diff --git a/vcpkg/ports/angle/CMakeLists.txt b/vcpkg/ports/angle/CMakeLists.txt new file mode 100644 index 0000000..b5c662f --- /dev/null +++ b/vcpkg/ports/angle/CMakeLists.txt @@ -0,0 +1,476 @@ +cmake_minimum_required(VERSION 3.8) +project(angle CXX C) + +if(WIN32 AND NOT WINDOWS_STORE) + set(WINDOWS_DESKTOP 1) +else() + set(WINDOWS_DESKTOP 0) +endif() + +if(UNIX AND NOT APPLE) + set(LINUX 1) +else() + set(LINUX 0) +endif() + +if(MSVC) + add_compile_options(/d2guard4 /Wv:18 /guard:cf /permissive /bigobj) +else() + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_POSITION_INDEPENDENT_CODE ON) +endif() + +if (APPLE) + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -framework Cocoa -framework OpenGL -framework IOKit -framework CoreFoundation -framework IOSurface -framework QuartzCore -framework CoreGraphics") +endif() +set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS}") +set(CMAKE_STATIC_LIBRARY_PREFIX "") + +if (WINDOWS_STORE) + set(WINRT_DEFINES -DANGLE_ENABLE_WINDOWS_STORE) +else() + set(WINRT_DEFINES) +endif() +add_definitions( + -D_CRT_SECURE_NO_DEPRECATE + -D_SCL_SECURE_NO_WARNINGS + -DGL_SILENCE_DEPRECATION + -D_HAS_EXCEPTIONS=0 + -DNOMINMAX + -DANGLE_STANDALONE_BUILD + -DANGLE_ENABLE_DEBUG_ANNOTATIONS + ${WINRT_DEFINES} +) + +configure_file(commit.h include/id/commit.h COPYONLY) +#include_directories(include src ${CMAKE_CURRENT_BINARY_DIR}/include) +include_directories("$" "$" "$" "$") +########## +# angle::common +if(WINDOWS_DESKTOP) + set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_mac|_posix|_winuwp") +elseif(WINDOWS_STORE) + set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_mac|_posix|_win32") +elseif(LINUX) + set(ANGLE_COMMON_PLATFORM_FILTER "_win|_mac") +elseif(APPLE) + set(ANGLE_COMMON_PLATFORM_FILTER "_linux|_win") +endif() +file(GLOB ANGLE_COMMON_SOURCES + "src/common/*.h" + "src/common/*.inl" + "src/common/*.cpp" + "src/common/third_party/base/anglebase/*.h" + "src/common/third_party/base/anglebase/*.cc" + "src/common/third_party/base/anglebase/containers/*.h" + "src/common/third_party/base/anglebase/numerics/*.h" + "src/common/third_party/base/anglebase/numerics/*.cc" + "src/common/third_party/xxhash/*.h" + "src/common/third_party/xxhash/*.c" + "src/common/third_party/smhasher/src/*.h" + "src/common/third_party/smhasher/src/*.cpp") +list(FILTER ANGLE_COMMON_SOURCES EXCLUDE REGEX "_unittest|event_tracer|${ANGLE_COMMON_PLATFORM_FILTER}") +add_library(angle_common OBJECT ${ANGLE_COMMON_SOURCES}) +target_include_directories(angle_common PUBLIC "$") +add_library(angle::common ALIAS angle_common) + +########## +# 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 OBJECT ${ANGLE_IMAGE_UTIL_SOURCES}) +target_link_libraries(angle_image_util PRIVATE angle::common) +add_library(angle::image_util ALIAS angle_image_util) + +########## +# angle::translator +file(GLOB TRANSLATOR_SOURCES + "src/compiler/translator/glslang.l" + "src/compiler/translator/glslang.y" + "src/compiler/translator/*.h" + "src/compiler/translator/*.cpp" + "src/compiler/translator/tree_ops/*.h" + "src/compiler/translator/tree_ops/*.cpp" + "src/compiler/translator/tree_util/*.h" + "src/compiler/translator/tree_util/*.cpp" + "src/third_party/compiler/ArrayBoundsClamper.cpp" +) +list(FILTER TRANSLATOR_SOURCES EXCLUDE REGEX "_unittest") +add_library(angle_translator OBJECT ${TRANSLATOR_SOURCES}) +target_compile_definitions(angle_translator PUBLIC + -DANGLE_ENABLE_ESSL + -DANGLE_ENABLE_GLSL + -DANGLE_ENABLE_HLSL +) +target_link_libraries(angle_translator PRIVATE angle::common) +add_library(angle::translator ALIAS angle_translator) + +########## +# angle::preprocessor +file(GLOB PREPROCESSOR_SOURCES + "src/compiler/preprocessor/*.h" + "src/compiler/preprocessor/*.cpp" +) +add_library(angle_preprocessor OBJECT ${PREPROCESSOR_SOURCES}) +target_link_libraries(angle_preprocessor PRIVATE angle::common) +add_library(angle::preprocessor ALIAS angle_preprocessor) + +########## +# libANGLE + +## OpenGL Renderer +if(WINDOWS_DESKTOP OR LINUX OR APPLE) + if(WINDOWS_DESKTOP) + set(ANGLE_RENDERER_OPENGL_PLATFORM + "src/libANGLE/renderer/gl/wgl/*.cpp" + "src/libANGLE/renderer/gl/wgl/*.inl" + "src/libANGLE/renderer/gl/wgl/*.h" + ) + elseif(APPLE) + set(ANGLE_RENDERER_OPENGL_PLATFORM + "src/libANGLE/renderer/gl/cgl/*.mm" + "src/libANGLE/renderer/gl/cgl/*.cpp" + "src/libANGLE/renderer/gl/cgl/*.inl" + "src/libANGLE/renderer/gl/cgl/*.h" + "gpu_info_util/SystemInfo_macos.mm" + ) + elseif(LINUX) + set(ANGLE_RENDERER_OPENGL_PLATFORM + "src/libANGLE/renderer/gl/glx/*.cpp" + "src/libANGLE/renderer/gl/glx/*.inl" + "src/libANGLE/renderer/gl/glx/*.h" + "src/libANGLE/renderer/gl/egl/*.cpp" + "src/libANGLE/renderer/gl/egl/*.inl" + "src/libANGLE/renderer/gl/egl/*.h" + ) + endif() + + file(GLOB LIBANGLE_GL_SOURCES + "src/libANGLE/renderer/gl/*.cpp" + "src/libANGLE/renderer/gl/*.inl" + "src/libANGLE/renderer/gl/*.h" + + ${ANGLE_RENDERER_OPENGL_PLATFORM} + ) + list(FILTER LIBANGLE_GL_SOURCES EXCLUDE REGEX "_unittest") + add_library(angle_renderer_opengl INTERFACE) + target_sources(angle_renderer_opengl INTERFACE "$") + target_compile_definitions(angle_renderer_opengl INTERFACE -DANGLE_ENABLE_OPENGL) + add_library(angle::renderer::opengl ALIAS angle_renderer_opengl) +endif() + +# D3D Renderers +if(WIN32) + ## All D3D Sources + file(GLOB_RECURSE LIBANGLE_D3D_SOURCES + "src/libANGLE/renderer/d3d/*.cpp" + "src/libANGLE/renderer/d3d/*.inl" + "src/libANGLE/renderer/d3d/*.h" + ) + list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "_unittest") + + ## WinRT D3D Renderer + if(WINDOWS_STORE) + set(LIBANGLE_D3D_WINRT_SOURCES ${LIBANGLE_D3D_SOURCES}) + list(FILTER LIBANGLE_D3D_WINRT_SOURCES INCLUDE REGEX "winrt") + add_library(angle_renderer_winrt INTERFACE) + target_sources(angle_renderer_winrt INTERFACE "$") + add_library(angle::renderer::winrt ALIAS angle_renderer_winrt) + endif() + + ## Win32/d3d9 D3D Renderer + if(WINDOWS_DESKTOP) + set(LIBANGLE_D3D_DESKTOP_SOURCES ${LIBANGLE_D3D_SOURCES}) + list(FILTER LIBANGLE_D3D_DESKTOP_SOURCES INCLUDE REGEX "d3d9|win32|converged") + find_library(D3D9_LIB NAMES d3d9) + add_library(angle_renderer_win32 INTERFACE) + target_sources(angle_renderer_win32 INTERFACE "$") + target_compile_definitions(angle_renderer_win32 INTERFACE -DANGLE_ENABLE_D3D9) + target_link_libraries(angle_renderer_win32 INTERFACE ${D3D9_LIB}) + add_library(angle::renderer::win32 ALIAS angle_renderer_win32) + endif() + + ## D3D11 Base renderer + list(FILTER LIBANGLE_D3D_SOURCES EXCLUDE REGEX "winrt|d3d9|win32|converged") + find_library(DXGUID_LIB NAMES dxguid) + find_library(D3D11_LIB NAMES d3d11) + add_library(angle_renderer_d3d INTERFACE) + target_sources(angle_renderer_d3d INTERFACE "$") + target_compile_definitions(angle_renderer_d3d INTERFACE + -DANGLE_ENABLE_D3D11 + "-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ \"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }" + ) + target_link_libraries(angle_renderer_d3d INTERFACE d3d11 dxguid) + add_library(angle::renderer::d3d ALIAS angle_renderer_d3d) +endif() + +## angle::gpu_info_util +file(GLOB ANGLE_GPU_INFO_UTIL_SOURCES + "src/gpu_info_util/SystemInfo.h" + "src/gpu_info_util/SystemInfo_internal.h" + "src/gpu_info_util/SystemInfo.cpp" +) +add_library(angle_gpu_info_util OBJECT ${ANGLE_GPU_INFO_UTIL_SOURCES}) +if(WIN32) + target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_win.cpp") + target_link_libraries(angle_gpu_info_util PRIVATE setupapi.lib dxgi.lib) +elseif(APPLE) + target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_macos.mm") + find_library(IOKit IOKit) + find_library(CoreFoundation CoreFoundation) + find_library(CoreGraphics CoreGraphics) + target_link_libraries(angle_gpu_info_util PRIVATE ${IOKit} ${CoreFoundation} ${CoreGraphics}) +elseif(LINUX) + target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_linux.cpp" "src/gpu_info_util/SystemInfo_x11.cpp") + target_compile_definitions(angle_gpu_info_util PRIVATE GPU_INFO_USE_X11) + target_link_libraries(angle_gpu_info_util PRIVATE X11 Xi Xext) +elseif(ANDROID) + target_sources(angle_gpu_info_util PRIVATE "src/gpu_info_util/SystemInfo_android.cpp") +endif() +target_link_libraries(angle_gpu_info_util PRIVATE angle::common) +add_library(angle::gpu_info_util ALIAS angle_gpu_info_util) + +## Core libANGLE library +if(WIN32) + set(LIBANGLE_SOURCES_PLATFORM + "src/third_party/systeminfo/SystemInfo.cpp" + ) +elseif(APPLE) + file(GLOB LIBANGLE_SOURCES_PLATFORM + "src/libANGLE/renderer/*.mm" + ) +else() + set(LIBANGLE_SOURCES_PLATFORM) +endif() + +file(GLOB LIBANGLE_SOURCES + "src/common/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/null/*.cpp" + "src/libANGLE/renderer/null/*.inl" + "src/libANGLE/renderer/null/*.h" + + ${LIBANGLE_SOURCES_PLATFORM} +) +list(FILTER LIBANGLE_SOURCES EXCLUDE REGEX "_unittest|glslang_wrapper|capture|FrameCapture\.cpp") + +if(LINUX OR APPLE) + set(LIBANGLE_RENDERER_PLATFORM + angle::renderer::opengl + ) +elseif(WINDOWS_STORE) + set(LIBANGLE_RENDERER_PLATFORM + angle::renderer::d3d + angle::renderer::winrt + ) +elseif(WINDOWS_DESKTOP) + set(LIBANGLE_RENDERER_PLATFORM + angle::renderer::d3d + angle::renderer::win32 + angle::renderer::opengl + gdi32 + ) +else() + set(LIBANGLE_RENDERER_PLATFORM ) +endif() + +if(LINUX) + find_package(X11) + include_directories(${X11_INCLUDE_DIR}) + list(APPEND LIBANGLE_RENDERER_PLATFORM ${X11_LIBRARIES}) + set(LIBANGLE_RENDERER_COMPILEDEF + -DANGLE_USE_X11 + ) +else() + set(LIBANGLE_RENDERER_COMPILEDEF ) +endif() + +add_library(libANGLE STATIC ${LIBANGLE_SOURCES}) +target_link_libraries(libANGLE PRIVATE + angle::common + angle::image_util + angle::gpu_info_util + angle::translator + angle::preprocessor + ${LIBANGLE_RENDERER_PLATFORM} +) +target_include_directories(libANGLE PRIVATE "$") +target_compile_definitions(libANGLE + PRIVATE -DANGLE_ENABLE_NULL + PUBLIC + -DLIBANGLE_IMPLEMENTATION + ${LIBANGLE_RENDERER_COMPILEDEF} + -DANGLE_EXPORT= + -DANGLE_UTIL_EXPORT= + -DEGLAPI= + -DGL_APICALL= + -DGL_API= +) +add_library(angle::libANGLE ALIAS libANGLE) +if(BUILD_SHARED_LIBS) + target_compile_definitions(libANGLE + PRIVATE -DLIBANGLE_UTIL_IMPLEMENTATION + ) +endif() + +########## +# libGLESv2 +# Modified according to the file src/libGLESv2.gni +list(APPEND LIBGLESV2_SOURCES + "src/common/angleutils.h" + "src/common/debug.h" + "src/libANGLE/entry_points_enum_autogen.h" + "src/libANGLE/entry_points_utils.h" + "src/libGLESv2/entry_points_egl.cpp" + "src/libGLESv2/entry_points_egl.h" + "src/libGLESv2/entry_points_egl_ext.cpp" + "src/libGLESv2/entry_points_egl_ext.h" + "src/libGLESv2/entry_points_gles_1_0_autogen.cpp" + "src/libGLESv2/entry_points_gles_1_0_autogen.h" + "src/libGLESv2/entry_points_gles_2_0_autogen.cpp" + "src/libGLESv2/entry_points_gles_2_0_autogen.h" + "src/libGLESv2/entry_points_gles_3_0_autogen.cpp" + "src/libGLESv2/entry_points_gles_3_0_autogen.h" + "src/libGLESv2/entry_points_gles_3_1_autogen.cpp" + "src/libGLESv2/entry_points_gles_3_1_autogen.h" + "src/libGLESv2/entry_points_gles_3_2_autogen.cpp" + "src/libGLESv2/entry_points_gles_3_2_autogen.h" + "src/libGLESv2/entry_points_gles_ext_autogen.cpp" + "src/libGLESv2/entry_points_gles_ext_autogen.h" + "src/libGLESv2/global_state.cpp" + "src/libGLESv2/global_state.h" + "src/libGLESv2/libGLESv2_autogen.cpp" + "src/libGLESv2/libGLESv2.rc" + "src/libGLESv2/proc_table_egl.h" + "src/libGLESv2/proc_table_egl_autogen.cpp" + "src/libGLESv2/resource.h" + "src/libGLESv2/libGLESv2_autogen.def" +) +add_library(libGLESv2 ${LIBGLESV2_SOURCES}) +target_link_libraries(libGLESv2 PRIVATE angle::common angle::libANGLE) +target_compile_definitions(libGLESv2 + PRIVATE -DLIBGLESV2_IMPLEMENTATION + PUBLIC + "-DGL_GLES_PROTOTYPES=1" + "-DGL_GLEXT_PROTOTYPES" + "-DEGL_EGL_PROTOTYPES=1" + "-DEGL_EGLEXT_PROTOTYPES" +) +if(BUILD_SHARED_LIBS) +else() + if(WIN32) + target_compile_definitions(libGLESv2 PRIVATE + "-DGL_API=" + "-DGL_APICALL=" + "-DEGLAPI=" + ) + else() + target_compile_definitions(libGLESv2 PRIVATE + "-DGL_API=__attribute__((visibility(\"default\")))" + "-DGL_APICALL=__attribute__((visibility(\"default\")))" + "-DEGLAPI=__attribute__((visibility(\"default\")))" + ) + endif() +endif() + +target_include_directories(libGLESv2 PUBLIC "$") + +########## +# 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 angle::libANGLE libGLESv2) +target_include_directories(libEGL PUBLIC "$" "$") +target_compile_definitions(libEGL + PRIVATE -DLIBGLESV2_IMPLEMENTATION + PUBLIC + "-DGL_GLES_PROTOTYPES=1" + "-DGL_GLEXT_PROTOTYPES" + "-DEGL_EGL_PROTOTYPES=1" + "-DEGL_EGLEXT_PROTOTYPES" +) +add_library(GL_VISIBILITY INTERFACE) +if(WIN32) + target_compile_definitions(GL_VISIBILITY INTERFACE + "-DGL_API=" + "-DGL_APICALL=") +else() + target_compile_definitions(GL_VISIBILITY INTERFACE + "-DGL_API=__attribute__((visibility(\"default\")))" + "-DGL_APICALL=__attribute__((visibility(\"default\")))") +endif() +target_link_libraries(libEGL PRIVATE GL_VISIBILITY) +target_link_libraries(libGLESv2 PRIVATE GL_VISIBILITY) + +if(WIN32) + target_compile_definitions(libEGL PRIVATE + "-DEGLAPI=" + ) +else() + target_compile_definitions(libEGL PRIVATE + "-DEGLAPI=__attribute__((visibility(\"default\")))" + ) +endif() + +if(NOT BUILD_SHARED_LIBS) + add_definitions("-DANGLE_EXPORT=" "-DANGLE_UTIL_EXPORT=" "-DEGLAPI=" "-DGL_APICALL=" "-DGL_API=") +endif() + +SET_TARGET_PROPERTIES(libANGLE PROPERTIES PREFIX "") +SET_TARGET_PROPERTIES(libGLESv2 PROPERTIES PREFIX "") +SET_TARGET_PROPERTIES(libEGL PROPERTIES PREFIX "") + +install(TARGETS libEGL libGLESv2 libANGLE angle_common angle_image_util angle_gpu_info_util angle_translator angle_preprocessor GL_VISIBILITY EXPORT ANGLEExport + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(WINDOWS_DESKTOP) + install(TARGETS angle_renderer_d3d angle_renderer_win32 angle_renderer_opengl EXPORT ANGLEExport + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + ) +elseif(WINDOWS_STORE) + install(TARGETS angle_renderer_d3d angle_renderer_winrt EXPORT ANGLEExport + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + ) +else() + install(TARGETS angle_renderer_opengl EXPORT ANGLEExport + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + ) +endif() + +install(EXPORT ANGLEExport FILE unofficial-angle-config.cmake NAMESPACE unofficial::angle:: DESTINATION share/unofficial-angle) + +if(NOT DISABLE_INSTALL_HEADERS) + install( + DIRECTORY include/ + DESTINATION include + FILES_MATCHING + PATTERN "*.h" + PATTERN "*.inc" + PATTERN "GLSLANG" EXCLUDE + PATTERN "EGL" EXCLUDE + PATTERN "KHR" EXCLUDE + PATTERN "export.h" EXCLUDE + ) +endif() diff --git a/vcpkg/ports/angle/CONTROL b/vcpkg/ports/angle/CONTROL new file mode 100644 index 0000000..09fb30d --- /dev/null +++ b/vcpkg/ports/angle/CONTROL @@ -0,0 +1,6 @@ +Source: angle +Version: 2020-05-15-1 +Homepage: https://github.com/google/angle +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. +Build-Depends: egl-registry, opengl-registry diff --git a/vcpkg/ports/angle/commit.h b/vcpkg/ports/angle/commit.h new file mode 100644 index 0000000..57a20e3 --- /dev/null +++ b/vcpkg/ports/angle/commit.h @@ -0,0 +1,3 @@ +#define ANGLE_COMMIT_HASH "invalid-hash" +#define ANGLE_COMMIT_HASH_SIZE 12 +#define ANGLE_COMMIT_DATE "invalid-date" diff --git a/vcpkg/ports/angle/portfile.cmake b/vcpkg/ports/angle/portfile.cmake new file mode 100644 index 0000000..672e517 --- /dev/null +++ b/vcpkg/ports/angle/portfile.cmake @@ -0,0 +1,76 @@ +if (VCPKG_TARGET_IS_LINUX) + message(WARNING "Building with a gcc version less than 6.1 is not supported.") + message(WARNING "${PORT} currently requires the following libraries from the system package manager:\n libx11-dev\n libmesa-dev\n libxi-dev\n libxext-dev\n\nThese can be installed on Ubuntu systems via apt-get install libx11-dev libmesa-dev libxi-dev libxext-dev.") +endif() + +if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(ANGLE_CPU_BITNESS ANGLE_IS_32_BIT_CPU) +elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(ANGLE_CPU_BITNESS ANGLE_IS_64_BIT_CPU) +elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(ANGLE_CPU_BITNESS ANGLE_IS_32_BIT_CPU) +elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(ANGLE_CPU_BITNESS ANGLE_IS_64_BIT_CPU) +else() + message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/angle + REF d949154da428bb3e924e28a8eadfe2327631c8bb # chromium/4148 + SHA512 3ef1c94fccfca592057652e0ad305e3025184675e2323a714428ec934048496fbd242b5e1298bb5e3b3058b53d54f6889e446cbd81af7bea2cc6d5e13c7356bd + # On update check headers against opengl-registry + PATCHES + 001-fix-uwp.patch + 002-fix-builder-error.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/commit.h DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/commit.h DESTINATION ${SOURCE_PATH}/src/common) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=1 + OPTIONS + -D${ANGLE_CPU_BITNESS}=1 +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-angle TARGET_PATH share/unofficial-angle) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# File conflict with opengl-registry! Make sure headers are similar on Update! +# angle defines some additional entrypoints. +# opengl-registry probably needs an upstream update to account for those +# Due to that all angle headers get moved to include/angle. +# If you want to use those instead of the onces provided by opengl-registry make sure +# VCPKG_INSTALLED_DIR/include/angle is before VCPKG_INSTALLED_DIR/include +file(GLOB_RECURSE angle_includes "${CURRENT_PACKAGES_DIR}/include") +file(COPY ${angle_includes} DESTINATION "${CURRENT_PACKAGES_DIR}/include/angle") + +set(_double_files + include/GLES/egl.h + include/GLES/gl.h + include/GLES/glext.h + include/GLES/glplatform.h + include/GLES2/gl2.h + include/GLES2/gl2ext.h + include/GLES2/gl2platform.h + include/GLES3/gl3.h + include/GLES3/gl31.h + include/GLES3/gl32.h + include/GLES3/gl3platform.h) +foreach(_file ${_double_files}) + if(EXISTS "${CURRENT_PACKAGES_DIR}/${_file}") + file(REMOVE "${CURRENT_PACKAGES_DIR}/${_file}") + endif() +endforeach() + + diff --git a/vcpkg/ports/antlr4/CONTROL b/vcpkg/ports/antlr4/CONTROL new file mode 100644 index 0000000..46852db --- /dev/null +++ b/vcpkg/ports/antlr4/CONTROL @@ -0,0 +1,5 @@ +Source: antlr4 +Version: 4.7.1-3 +Homepage: https://www.antlr.org +Description: ANother Tool for Language Recognition +Build-Depends: libuuid (!uwp&!windows&!osx) \ No newline at end of file diff --git a/vcpkg/ports/antlr4/export_guid.patch b/vcpkg/ports/antlr4/export_guid.patch new file mode 100644 index 0000000..a92c034 --- /dev/null +++ b/vcpkg/ports/antlr4/export_guid.patch @@ -0,0 +1,22 @@ +diff -urN c/runtime/src/support/guid.h d/runtime/src/support/guid.h +--- c/runtime/src/support/guid.h 2017-07-01 09:51:22.000000000 +0800 ++++ d/runtime/src/support/guid.h 2018-09-05 10:16:23.847717700 +0800 +@@ -38,7 +38,7 @@ + // 16 byte value that can be passed around by value. It also supports + // conversion to string (via the stream operator <<) and conversion from a + // string via constructor. +-class Guid ++class ANTLR4CPP_PUBLIC Guid + { + public: + +@@ -90,7 +90,7 @@ + // function would no longer be cross-platform if we parameterized the android + // version. Instead, construction of the GuidGenerator may be different on + // each platform, but the use of newGuid is uniform. +-class GuidGenerator ++class ANTLR4CPP_PUBLIC GuidGenerator + { + public: + #ifdef GUID_ANDROID + \ No newline at end of file diff --git a/vcpkg/ports/antlr4/fixed_build.patch b/vcpkg/ports/antlr4/fixed_build.patch new file mode 100644 index 0000000..72697a3 --- /dev/null +++ b/vcpkg/ports/antlr4/fixed_build.patch @@ -0,0 +1,28 @@ +diff -urN a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt +--- a/runtime/CMakeLists.txt 2017-11-29 09:51:54.000000000 +0800 ++++ b/runtime/CMakeLists.txt 2018-08-30 19:06:03.718401800 +0800 +@@ -25,7 +25,7 @@ + add_library(antlr4_shared SHARED ${libantlrcpp_SRC}) + add_library(antlr4_static STATIC ${libantlrcpp_SRC}) + +-set(LIB_OUTPUT_DIR "${CMAKE_HOME_DIRECTORY}/dist") # put generated libraries here. ++# set(LIB_OUTPUT_DIR "${CMAKE_HOME_DIRECTORY}/dist") # put generated libraries here. + message(STATUS "Output libraries to ${LIB_OUTPUT_DIR}") + + # make sure 'make' works fine even if ${LIB_OUTPUT_DIR} is deleted. +@@ -63,10 +63,10 @@ + set(extra_share_compile_flags "-DANTLR4CPP_EXPORTS") + set(extra_static_compile_flags "-DANTLR4CPP_STATIC") + endif(WIN32) +-if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") +- target_compile_options(antlr4_shared PRIVATE "/MD$<$:d>") +- target_compile_options(antlr4_static PRIVATE "/MT$<$:d>") +-endif() ++# if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") ++# target_compile_options(antlr4_shared PRIVATE "/MD$<$:d>") ++# target_compile_options(antlr4_static PRIVATE "/MT$<$:d>") ++# endif() + + set(static_lib_suffix "") + if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + \ No newline at end of file diff --git a/vcpkg/ports/antlr4/portfile.cmake b/vcpkg/ports/antlr4/portfile.cmake new file mode 100644 index 0000000..b0749e1 --- /dev/null +++ b/vcpkg/ports/antlr4/portfile.cmake @@ -0,0 +1,93 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + +include(vcpkg_common_functions) + +set(VERSION 4.7.1) + +vcpkg_download_distfile(ARCHIVE + URLS "http://www.antlr.org/download/antlr4-cpp-runtime-${VERSION}-source.zip" + FILENAME "antlr4-cpp-runtime-${VERSION}-source.zip" + SHA512 24d53278db56b199e6787242f22339f74e07d2cd3ed56f851ad905b110c2ba3cb001e1e2fcbc8624f0e93e00ba1fe1b23630dd1a736558c694655aeb1c3129da +) + +# license not exist in antlr folder. +vcpkg_download_distfile(LICENSE + URLS https://raw.githubusercontent.com/antlr/antlr4/${VERSION}/LICENSE.txt + FILENAME "antlr4-copyright-${VERSION}" + SHA512 1e8414de5fdc211e3188a8ec3276c6b3c55235f5edaf48522045ae18fa79fd9049719cb8924d25145016f223ac9a178defada1eeb983ccff598a08b0c0f67a3b +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL + REF ${VERSION} + PATCHES fixed_build.patch + uuid_discovery_fix.patch + export_guid.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DLIB_OUTPUT_DIR=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/dist + OPTIONS_RELEASE -DLIB_OUTPUT_DIR=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/dist +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/debug/include +) + +if (NOT VCPKG_CMAKE_SYSTEM_NAME) + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/antlr4-runtime-static.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/antlr4-runtime-static.lib + ) + + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/antlr4-runtime.dll ${CURRENT_PACKAGES_DIR}/bin/antlr4-runtime.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/antlr4-runtime.dll ${CURRENT_PACKAGES_DIR}/debug/bin/antlr4-runtime.dll) + else() + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/antlr4-runtime.lib + ${CURRENT_PACKAGES_DIR}/lib/antlr4-runtime.dll + ${CURRENT_PACKAGES_DIR}/debug/lib/antlr4-runtime.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/antlr4-runtime.dll + ) + + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/antlr4-runtime-static.lib ${CURRENT_PACKAGES_DIR}/lib/antlr4-runtime.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/antlr4-runtime-static.lib ${CURRENT_PACKAGES_DIR}/debug/lib/antlr4-runtime.lib) + endif() +else() + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libantlr4-runtime.a + ${CURRENT_PACKAGES_DIR}/debug/lib/libantlr4-runtime.a + ) + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Linux) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libantlr4-runtime.so + ${CURRENT_PACKAGES_DIR}/lib/libantlr4-runtime.so.${VERSION} + ${CURRENT_PACKAGES_DIR}/debug/lib/libantlr4-runtime.so + ${CURRENT_PACKAGES_DIR}/debug/lib/libantlr4-runtime.so.${VERSION} + ) + else() + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libantlr4-runtime.dylib + ${CURRENT_PACKAGES_DIR}/lib/libantlr4-runtime.${VERSION}.dylib + ${CURRENT_PACKAGES_DIR}/debug/lib/libantlr4-runtime.dylib + ${CURRENT_PACKAGES_DIR}/debug/lib/libantlr4-runtime.${VERSION}.dylib + ) + endif() +endif() + +file(GLOB HDRS LIST_DIRECTORIES true ${CURRENT_PACKAGES_DIR}/include/antlr4-runtime/*) +file(COPY ${HDRS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/antlr4-runtime) + +vcpkg_copy_pdbs() + +file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/antlr4 RENAME copyright) + +message(STATUS "Installing done") \ No newline at end of file diff --git a/vcpkg/ports/antlr4/uuid_discovery_fix.patch b/vcpkg/ports/antlr4/uuid_discovery_fix.patch new file mode 100644 index 0000000..6d6e6fa --- /dev/null +++ b/vcpkg/ports/antlr4/uuid_discovery_fix.patch @@ -0,0 +1,53 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f4940c0..978b6ea 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -38,8 +38,10 @@ if(CMAKE_VERSION VERSION_EQUAL "3.3.0" OR + endif() + + if(CMAKE_SYSTEM_NAME MATCHES "Linux") +- find_package(PkgConfig REQUIRED) +- pkg_check_modules(UUID REQUIRED uuid) ++ find_path(UUID_INCLUDE_DIR uuid/uuid.h) ++ find_library(UUID_LIBRARY NAMES uuid) ++ include_directories(${UUID_INCLUDE_DIR}) ++ link_libraries(${UUID_LIBRARY}) + endif() + if(APPLE) + find_library(COREFOUNDATION_LIBRARY CoreFoundation) +@@ -115,7 +117,7 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND CMAKE_SYSTEM_NAME MATCHES + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") + endif() + elseif ( MSVC_VERSION GREATER 1800 OR MSVC_VERSION EQUAL 1800 ) +- # Visual Studio 2012+ supports c++11 features ++ # Visual Studio 2012+ supports c++11 features + else () + message(FATAL_ERROR "Your C++ compiler does not support C++11.") + endif () +@@ -129,10 +131,10 @@ endif(WITH_DEMO) + if( EXISTS LICENSE.txt) + install(FILES LICENSE.txt + DESTINATION "share/doc/libantlr4") +-elseif(EXISTS ../../LICENSE.txt) ++elseif(EXISTS ../../LICENSE.txt) + install(FILES ../../LICENSE.txt + DESTINATION "share/doc/libantlr4") + endif() + +-install(FILES README.md VERSION ++install(FILES README.md VERSION + DESTINATION "share/doc/libantlr4") +diff --git a/runtime/src/support/guid.cpp b/runtime/src/support/guid.cpp +index b6105d7..5baadb0 100644 +--- a/runtime/src/support/guid.cpp ++++ b/runtime/src/support/guid.cpp +@@ -21,7 +21,7 @@ + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ +- ++#include "antlr4-common.h" + #include "guid.h" + + #ifdef GUID_LIBUUID + \ No newline at end of file diff --git a/vcpkg/ports/any-lite/CONTROL b/vcpkg/ports/any-lite/CONTROL new file mode 100644 index 0000000..6eaf3d1 --- /dev/null +++ b/vcpkg/ports/any-lite/CONTROL @@ -0,0 +1,3 @@ +Source: any-lite +Version: 0.2.0 +Description: A C++17-like any, a type-safe container for single values of any type for C++98, C++11 and later in a single-file header-only library diff --git a/vcpkg/ports/any-lite/portfile.cmake b/vcpkg/ports/any-lite/portfile.cmake new file mode 100644 index 0000000..aba9051 --- /dev/null +++ b/vcpkg/ports/any-lite/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO martinmoene/any-lite + REF v0.2.0 + SHA512 703900d7bac96d41f903b6cabba4bce15ef3cf7ef0a6a66de76230498ededff110e43d68d4a3fd6996869b2edd001f69bd53039a214d06b774ce99518f384a68 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DANY_LITE_OPT_BUILD_TESTS=OFF + -DANY_LITE_OPT_BUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets( + CONFIG_PATH lib/cmake/${PORT} +) + +file( REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/lib +) + +file( INSTALL + ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright +) diff --git a/vcpkg/ports/anyrpc/CONTROL b/vcpkg/ports/anyrpc/CONTROL new file mode 100644 index 0000000..a763460 --- /dev/null +++ b/vcpkg/ports/anyrpc/CONTROL @@ -0,0 +1,4 @@ +Source: anyrpc +Version: 2020-01-13-1 +Homepage: https://github.com/sgieseking/anyrpc +Description: A multiprotocol remote procedure call system for C++. diff --git a/vcpkg/ports/anyrpc/portfile.cmake b/vcpkg/ports/anyrpc/portfile.cmake new file mode 100644 index 0000000..843e836 --- /dev/null +++ b/vcpkg/ports/anyrpc/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sgieseking/anyrpc + REF b288617d0ae1d6e227bcda7d3db7db5329fa2322 + SHA512 d50ef96ad13f06991e65e9912225b64c1f244bf89b67e4afcddbb18e08a885ec773aea88e1334d6deb73bb3824e916695b3b187b9023368aec3ba21a53dd2830 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ANYRPC_LIB_BUILD_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_EXAMPLES=OFF + -DBUILD_TESTS=OFF + -DBUILD_WITH_LOG4CPLUS=OFF + -DANYRPC_LIB_BUILD_SHARED=${ANYRPC_LIB_BUILD_SHARED} +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/anyrpc RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/apr-util/CONTROL b/vcpkg/ports/apr-util/CONTROL new file mode 100644 index 0000000..c419c43 --- /dev/null +++ b/vcpkg/ports/apr-util/CONTROL @@ -0,0 +1,6 @@ +Source: apr-util +Version: 1.6.1 +Port-Version: 3 +Homepage: https://apr.apache.org/ +Description: Apache Portable Runtime (APR) project mission is to create and maintain software libraries that provide a predictable and consistent interface to underlying platform-specific implementation +Build-Depends: expat, apr, openssl diff --git a/vcpkg/ports/apr-util/apr.patch b/vcpkg/ports/apr-util/apr.patch new file mode 100644 index 0000000..581907f --- /dev/null +++ b/vcpkg/ports/apr-util/apr.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 69e45541..19b86129 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -35,7 +35,7 @@ IF(NOT EXISTS "${APR_INCLUDE_DIR}/apr.h") + MESSAGE(FATAL_ERROR "APR include directory ${APR_INCLUDE_DIR} is not correct.") + ENDIF() + FOREACH(onelib ${APR_LIBRARIES}) +- IF(NOT EXISTS ${onelib}) ++ IF(${onelib} MATCHES "NOTFOUND") + MESSAGE(FATAL_ERROR "APR library ${onelib} was not found.") + ENDIF() + ENDFOREACH() diff --git a/vcpkg/ports/apr-util/portfile.cmake b/vcpkg/ports/apr-util/portfile.cmake new file mode 100644 index 0000000..1065bdb --- /dev/null +++ b/vcpkg/ports/apr-util/portfile.cmake @@ -0,0 +1,83 @@ +vcpkg_download_distfile(ARCHIVE + URLS "http://archive.apache.org/dist/apr/apr-util-1.6.1.tar.bz2" + FILENAME "apr-util-1.6.1.tar.bz2" + SHA512 40eff8a37c0634f7fdddd6ca5e596b38de15fd10767a34c30bbe49c632816e8f3e1e230678034f578dd5816a94f246fb5dfdf48d644829af13bf28de3225205d + +) + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + use-vcpkg-expat.patch + apr.patch + ) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(APU_DECLARE_EXPORT ON) + set(APU_DECLARE_STATIC OFF) + else() + set(APU_DECLARE_EXPORT OFF) + set(APU_DECLARE_STATIC ON) + endif() + + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DAPU_DECLARE_EXPORT=${APU_DECLARE_EXPORT} + -DAPU_DECLARE_STATIC=${APU_DECLARE_STATIC} + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON + ) + + vcpkg_install_cmake() + vcpkg_copy_pdbs() + + file(READ ${CURRENT_PACKAGES_DIR}/include/apu.h APU_H) + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + string(REPLACE "defined(APU_DECLARE_EXPORT)" "1" APU_H "${APU_H}") + else() + string(REPLACE "defined(APU_DECLARE_STATIC)" "1" APU_H "${APU_H}") + endif() + file(WRITE ${CURRENT_PACKAGES_DIR}/include/apu.h "${APU_H}") + +else(VCPKG_TARGET_IS_WINDOWS) + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + ) + + # To cross-compile you will need a triplet file that locates the tool chain and sets --host and --cache parameters of "./configure". + # The ${VCPKG_PLATFORM_TOOLSET}.cache file must have been generated on the targeted host using "./configure -C". + # For example, to target aarch64-linux-gnu, triplets/aarch64-linux-gnu.cmake should contain (beyond the standard content): + # set(VCPKG_PLATFORM_TOOLSET aarch64-linux-gnu) + # set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE ${MY_CROSS_DIR}/cmake/Toolchain-${VCPKG_PLATFORM_TOOLSET}.cmake) + # set(CONFIGURE_PARAMETER_1 --host=${VCPKG_PLATFORM_TOOLSET}) + # set(CONFIGURE_PARAMETER_2 --cache-file=${MY_CROSS_DIR}/autoconf/${VCPKG_PLATFORM_TOOLSET}.cache) + if(CONFIGURE_PARAMETER_1) + message(STATUS "Configuring apr-util with ${CONFIGURE_PARAMETER_1} ${CONFIGURE_PARAMETER_2} ${CONFIGURE_PARAMETER_3}") + else() + message(STATUS "Configuring apr-util") + endif() + + vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + NO_DEBUG + OPTIONS + "--prefix=${CURRENT_INSTALLED_DIR}" + "--with-apr=${CURRENT_INSTALLED_DIR}/tools/apr" + "--with-openssl=${CURRENT_INSTALLED_DIR}" + "-with-expat=${CURRENT_INSTALLED_DIR}" + "${CONFIGURE_PARAMETER_1}" + "${CONFIGURE_PARAMETER_2}" + "${CONFIGURE_PARAMETER_3}" + ) + + vcpkg_install_make() + +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/apr-util/use-vcpkg-expat.patch b/vcpkg/ports/apr-util/use-vcpkg-expat.patch new file mode 100644 index 0000000..8a35f2b --- /dev/null +++ b/vcpkg/ports/apr-util/use-vcpkg-expat.patch @@ -0,0 +1,124 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9ae90b1..71a50b0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -21,16 +21,14 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + + FIND_PACKAGE(OpenSSL) + +-FIND_PACKAGE(expat) +- + OPTION(APU_HAVE_CRYPTO "Crypto support" OFF) + OPTION(APU_HAVE_ODBC "Build ODBC DBD driver" ON) + OPTION(APR_HAS_LDAP "LDAP support" ON) + OPTION(INSTALL_PDB "Install .pdb files (if generated)" ON) + OPTION(APR_BUILD_TESTAPR "Build the test suite" OFF) + OPTION(TEST_STATIC_LIBS "Test programs use APR static libraries instead of shared libraries?" OFF) +-SET(APR_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE STRING "Directory with APR include files") +-SET(APR_LIBRARIES "${CMAKE_INSTALL_PREFIX}/lib/libapr-1.lib" CACHE STRING "APR library to link with") ++find_path(APR_INCLUDE_DIR apr.h) ++find_library(APR_LIBRARIES NAMES libapr-1 apr-1) + + IF(NOT EXISTS "${APR_INCLUDE_DIR}/apr.h") + MESSAGE(FATAL_ERROR "APR include directory ${APR_INCLUDE_DIR} is not correct.") +@@ -61,13 +59,13 @@ IF(APR_HAS_LDAP) + SET(apr_has_ldap_10 1) + ENDIF() + +-IF(NOT EXPAT_FOUND) ++find_package(expat) ++set(XMLLIB_INCLUDE_DIR ${EXPAT_INCLUDE_DIRS}) ++set(XMLLIB_LIBRARIES ${EXPAT_LIBRARIES}) ++IF(NOT XMLLIB_LIBRARIES) + MESSAGE(FATAL_ERROR "Expat is required, and it wasn't found!") + ENDIF() + +-SET(XMLLIB_INCLUDE_DIR ${EXPAT_INCLUDE_DIRS}) +-SET(XMLLIB_LIBRARIES ${EXPAT_LIBRARIES}) +- + SET(LDAP_LIBRARIES) + IF(APR_HAS_LDAP) + SET(LDAP_LIBRARIES wldap32) +@@ -229,17 +227,21 @@ SET(dbd_drivers) + # Note: The WINNT definition on some targets is used only by libaprutil.rc. + + # libaprutil-1 is shared, aprutil-1 is static ++if(BUILD_SHARED_LIBS) + ADD_LIBRARY(libaprutil-1 SHARED ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED} libaprutil.rc) + SET(install_targets ${install_targets} libaprutil-1) + SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/libaprutil-1.pdb) + TARGET_LINK_LIBRARIES(libaprutil-1 ${APR_LIBRARIES} ${XMLLIB_LIBRARIES}) +-SET_TARGET_PROPERTIES(libaprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_EXPORT;APR_DECLARE_EXPORT;XML_STATIC;WINNT") ++SET_TARGET_PROPERTIES(libaprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_EXPORT;APR_DECLARE_IMPORT;XML_STATIC;WINNT") + ++else(BUILD_SHARED_LIBS) + ADD_LIBRARY(aprutil-1 STATIC ${APR_SOURCES} ${APR_PUBLIC_HEADERS_GENERATED}) + SET(install_targets ${install_targets} aprutil-1) + TARGET_LINK_LIBRARIES(aprutil-1 ${APR_LIBRARIES} ${XMLLIB_LIBRARIES}) + SET_TARGET_PROPERTIES(aprutil-1 PROPERTIES COMPILE_DEFINITIONS "APU_DECLARE_STATIC;APR_DECLARE_STATIC;APU_DSO_MODULE_BUILD;XML_STATIC") ++endif(BUILD_SHARED_LIBS) + ++if(BUILD_SHARED_LIBS) + IF(APU_HAVE_CRYPTO) + IF(NOT OPENSSL_FOUND) + MESSAGE(FATAL_ERROR "Only OpenSSL-based crypto is currently implemented in the cmake build") +@@ -249,7 +251,7 @@ IF(APU_HAVE_CRYPTO) + SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_crypto_openssl-1.pdb) + SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES INCLUDE_DIRECTORIES "${APR_INCLUDE_DIRECTORIES};${OPENSSL_INCLUDE_DIR}") + SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES COMPILE_DEFINITIONS "WINNT") +- SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_EXPORT=1 -DAPU_DECLARE_EXPORT=1 -DDLL_NAME=apr_crypto_openssl") ++ SET_TARGET_PROPERTIES(apr_crypto_openssl-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_IMPORT -DAPU_DECLARE_IMPORT -DDLL_NAME=apr_crypto_openssl") + TARGET_LINK_LIBRARIES(apr_crypto_openssl-1 libaprutil-1 ${APR_LIBRARIES} ${OPENSSL_LIBRARIES}) + ENDIF() + +@@ -260,8 +262,8 @@ IF(APU_HAVE_ODBC) + SET(dbd_drivers ${dbd_drivers} odbc) + TARGET_LINK_LIBRARIES(apr_dbd_odbc-1 libaprutil-1 ${APR_LIBRARIES} odbc32 odbccp32) + SET_PROPERTY(TARGET apr_dbd_odbc-1 APPEND PROPERTY LINK_FLAGS /export:apr_dbd_odbc_driver) +- SET_TARGET_PROPERTIES(apr_dbd_odbc-1 PROPERTIES COMPILE_DEFINITIONS "APU_HAVE_ODBC;HAVE_SQL_H;APU_DECLARE_EXPORT;APR_DECLARE_EXPORT;APU_DSO_MODULE_BUILD;WINNT") +- SET_TARGET_PROPERTIES(apr_dbd_odbc-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_EXPORT=1 -DAPU_DECLARE_EXPORT=1 -DDLL_NAME=apr_dbd_odbc") ++ SET_TARGET_PROPERTIES(apr_dbd_odbc-1 PROPERTIES COMPILE_DEFINITIONS "APU_HAVE_ODBC;HAVE_SQL_H;APU_DECLARE_IMPORT;APR_DECLARE_IMPORT;APU_DSO_MODULE_BUILD;WINNT") ++ SET_TARGET_PROPERTIES(apr_dbd_odbc-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_IMPORT -DAPU_DECLARE_IMPORT -DDLL_NAME=apr_dbd_odbc") + ENDIF() + + IF(APR_HAS_LDAP) +@@ -271,11 +273,12 @@ IF(APR_HAS_LDAP) + SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/apr_ldap-1.pdb) + TARGET_LINK_LIBRARIES(apr_ldap-1 libaprutil-1 ${APR_LIBRARIES} ${LDAP_LIBRARIES}) + SET_TARGET_PROPERTIES(apr_ldap-1 PROPERTIES COMPILE_DEFINITIONS "WINNT") +- SET_TARGET_PROPERTIES(apr_ldap-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_EXPORT=1 -DAPU_DECLARE_EXPORT=1 -DDLL_NAME=apr_ldap") ++ SET_TARGET_PROPERTIES(apr_ldap-1 PROPERTIES COMPILE_FLAGS "-DAPR_DECLARE_IMPORT -DAPU_DECLARE_IMPORT -DDLL_NAME=apr_ldap") + SET(apr_ldap_libraries apr_ldap-1) + ELSE() + SET(apr_ldap_libraries) + ENDIF() ++endif(BUILD_SHARED_LIBS) + + IF(APR_BUILD_TESTAPR) + ENABLE_TESTING() +@@ -289,7 +292,7 @@ IF(APR_BUILD_TESTAPR) + ${PROJECT_SOURCE_DIR}/test/data/billion-laughs.xml + ${PROJECT_BINARY_DIR}/data/billion-laughs.xml) + +- IF(TEST_STATIC_LIBS) ++ IF(NOT BUILD_SHARED_LIBS) + SET(whichapr aprutil-1) + SET(apiflag "-DAPR_DECLARE_STATIC -DAPU_DECLARE_STATIC") + ELSE() +@@ -325,13 +328,9 @@ INSTALL(TARGETS ${install_targets} + ARCHIVE DESTINATION lib + ) + +-IF(INSTALL_PDB) +- INSTALL(FILES ${install_bin_pdb} +- DESTINATION bin +- CONFIGURATIONS RelWithDebInfo Debug) +-ENDIF() +- +-INSTALL(FILES ${APR_PUBLIC_HEADERS_STATIC} ${APR_PUBLIC_HEADERS_GENERATED} DESTINATION include) ++if(NOT DISABLE_INSTALL_HEADERS) ++ INSTALL(FILES ${APR_PUBLIC_HEADERS_STATIC} ${APR_PUBLIC_HEADERS_GENERATED} DESTINATION include) ++endif() + + STRING(TOUPPER "${CMAKE_BUILD_TYPE}" buildtype) + MESSAGE(STATUS "") diff --git a/vcpkg/ports/apr/CONTROL b/vcpkg/ports/apr/CONTROL new file mode 100644 index 0000000..cf2c007 --- /dev/null +++ b/vcpkg/ports/apr/CONTROL @@ -0,0 +1,9 @@ +Source: apr +Version: 1.7.0 +Port-Version: 3 +Homepage: https://apr.apache.org/ +Description: The Apache Portable Runtime (APR) is a C library that forms a system portability layer that covers many operating systems. +Supports: !uwp + +Feature: private-headers +Description: Install non-standard files required for building Apache httpd diff --git a/vcpkg/ports/apr/portfile.cmake b/vcpkg/ports/apr/portfile.cmake new file mode 100644 index 0000000..de969c2 --- /dev/null +++ b/vcpkg/ports/apr/portfile.cmake @@ -0,0 +1,91 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + +set(VERSION 1.7.0) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.apache.org/dist/apr/apr-${VERSION}.tar.bz2" + FILENAME "apr-${VERSION}.tar.bz2" + SHA512 3dc42d5caf17aab16f5c154080f020d5aed761e22db4c5f6506917f6bfd2bf8becfb40af919042bd4ce1077d5de74aa666f5edfba7f275efba78e8893c115148 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + private-headers INSTALL_PRIVATE_H + ) + + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DINSTALL_PDB=OFF + -DMIN_WINDOWS_VER=Windows7 + -DAPR_HAVE_IPV6=ON + -DAPR_INSTALL_PRIVATE_H=${INSTALL_PRIVATE_H} + ${FEATURE_OPTIONS} + ) + + vcpkg_install_cmake() + + # There is no way to suppress installation of the headers in debug builds. + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + + # Both dynamic and static are built, so keep only the one needed + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/apr-1.lib + ${CURRENT_PACKAGES_DIR}/lib/aprapp-1.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/apr-1.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/aprapp-1.lib) + else() + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libapr-1.lib + ${CURRENT_PACKAGES_DIR}/lib/libaprapp-1.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/libapr-1.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/libaprapp-1.lib) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() + + vcpkg_copy_pdbs() +else() + # To cross-compile you will need a triplet file that locates the tool chain and sets --host and --cache parameters of "./configure". + # The ${VCPKG_PLATFORM_TOOLSET}.cache file must have been generated on the targeted host using "./configure -C". + # For example, to target aarch64-linux-gnu, triplets/aarch64-linux-gnu.cmake should contain (beyond the standard content): + # set(VCPKG_PLATFORM_TOOLSET aarch64-linux-gnu) + # set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE ${MY_CROSS_DIR}/cmake/Toolchain-${VCPKG_PLATFORM_TOOLSET}.cmake) + # set(CONFIGURE_PARAMETER_1 --host=${VCPKG_PLATFORM_TOOLSET}) + # set(CONFIGURE_PARAMETER_2 --cache-file=${MY_CROSS_DIR}/autoconf/${VCPKG_PLATFORM_TOOLSET}.cache) + if(CONFIGURE_PARAMETER_1) + message(STATUS "Configuring apr with ${CONFIGURE_PARAMETER_1} ${CONFIGURE_PARAMETER_2} ${CONFIGURE_PARAMETER_3}") + else() + message(STATUS "Configuring apr") + endif() + set(ENV{CFLAGS} "$ENV{CFLAGS} -Wno-error=implicit-function-declaration") + vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + NO_DEBUG + OPTIONS + "--prefix=${CURRENT_INSTALLED_DIR}" + "${CONFIGURE_PARAMETER_1}" + "${CONFIGURE_PARAMETER_2}" + "${CONFIGURE_PARAMETER_3}" + ) + + vcpkg_install_make() + + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/apr-1.pc + "-lapr-\${APR_MAJOR_VERSION}" "-lapr-1" + ) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/lib/pkgconfig/apr-1.pc + "-lapr-\${APR_MAJOR_VERSION}" "-lapr-1" + ) + vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES pthread rt dl uuid crypt) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + diff --git a/vcpkg/ports/arb/CMakeLists.txt b/vcpkg/ports/arb/CMakeLists.txt new file mode 100644 index 0000000..300c200 --- /dev/null +++ b/vcpkg/ports/arb/CMakeLists.txt @@ -0,0 +1,87 @@ +cmake_minimum_required(VERSION 2.8.12) + +project(arb C) + +set (DEPS mpir mpfr pthreads flint2 gettimeofday) +set (mpir_lib gmp mpir) +set (mpfr_lib mpfr) +set (pthreads_lib pthreads pthread pthreadVC2 pthreadVC3) +set (flint2_lib ${LIBRARY_TYPE}_flint flint) +set (gettimeofday_lib gettimeofday) + +set (mpir_header gmp.h) +set (mpfr_header mpfr.h) +set (pthreads_header pthread.h) +set (flint2_header flint/flint.h) +set (gettimeofday_header gettimeofday.h) + +foreach (LIB ${DEPS}) + string (TOUPPER ${LIB} LIB_UPPER) + find_library(${LIB_UPPER}_LIBRARY NAMES ${${LIB}_lib}) + if (NOT ${LIB_UPPER}_LIBRARY) + message(FATAL_ERROR "${LIB} library not found.") + endif() + add_library(${LIB} UNKNOWN IMPORTED) + set_property(TARGET ${LIB} PROPERTY IMPORTED_LOCATION ${${LIB_UPPER}_LIBRARY}) + message("${LIB} found in ${${LIB_UPPER}_LIBRARY}") +endforeach () + +foreach (LIB ${DEPS}) + string(TOUPPER ${LIB} HEADER_PKG) + set (HEADER ${${LIB}_header}) + find_path(${HEADER_PKG}_INCLUDE_DIR NAMES ${HEADER}) + if (NOT ${HEADER_PKG}_INCLUDE_DIR) + message(FATAL_ERROR "${HEADER} header not found.") + endif() + message("${HEADER} found in ${${HEADER_PKG}_INCLUDE_DIR}") + set (DEP_INCLUDE_DIRS ${DEP_INCLUDE_DIRS} ${${HEADER_PKG}_INCLUDE_DIR}) +endforeach () + +file(GLOB TEMP "*.h") + +foreach (TEMP_H ${TEMP}) + get_filename_component(FOLDER ${TEMP_H} NAME_WE) + set(FOLDERS ${FOLDERS} ${FOLDER}) +endforeach() + +foreach (FOLDER ${FOLDERS}) + file(GLOB TEMP "${FOLDER}/*.c") + set(SRC ${SRC} ${TEMP}) +endforeach () + +include_directories(BEFORE ${arb_SOURCE_DIR}) +include_directories(BEFORE ${DEP_INCLUDE_DIRS}) + +add_library(arb ${SRC}) + +target_compile_definitions(arb PRIVATE HAVE_TLS=1 FLINT_REENTRANT=0) +target_compile_definitions(arb PRIVATE PTW32_STATIC_LIB) +MESSAGE( STATUS "Building static libraries" ) +target_compile_definitions(arb PRIVATE "ARB_BUILD_DLL") + +target_link_libraries(arb ${DEPS}) + +install(TARGETS arb + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + ) + +foreach (FOLDER ${FOLDERS}) + set(HEADERS ${HEADERS} ${FOLDER}.h) +endforeach () + +install(FILES ${HEADERS} DESTINATION include) + +if (BUILD_TESTS) + enable_testing() + foreach (FOLDER ${FOLDERS}) + file(GLOB TEMP "${FOLDER}/test/*.c") + foreach (TEST_SOURCE ${TEMP}) + get_filename_component(TEST_NAME ${TEST_SOURCE} NAME_WE) + add_executable(${FOLDER}-${TEST_NAME} ${TEST_SOURCE}) + target_link_libraries(${FOLDER}-${TEST_NAME} arb) + add_test(${FOLDER}-${TEST_NAME} ${FOLDER}-${TEST_NAME}) + endforeach () + endforeach () +endif () diff --git a/vcpkg/ports/arb/CONTROL b/vcpkg/ports/arb/CONTROL new file mode 100644 index 0000000..7103a96 --- /dev/null +++ b/vcpkg/ports/arb/CONTROL @@ -0,0 +1,5 @@ +Source: arb +Version: 2.17.0 +Homepage: https://github.com/fredrik-johansson/arb +Description: a C library for arbitrary-precision interval arithmetic +Build-Depends: flint diff --git a/vcpkg/ports/arb/portfile.cmake b/vcpkg/ports/arb/portfile.cmake new file mode 100644 index 0000000..a87ac40 --- /dev/null +++ b/vcpkg/ports/arb/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fredrik-johansson/arb + REF eeef7bdd349366be4d1691da05e49dcf9c01a394 # 2.17.0 + SHA512 d4c53c0343bec32e0b6c0d3a41e92663b13f9648a08c28c56a3098dd77d71248718b414dbb70c116bd7e07648646bdb663c1b9560e41d971d5c12d2d0466e9a0 + HEAD_REF master +) + +file(REMOVE ${SOURCE_PATH}/CMakeLists.txt) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Remove duplicate headers +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/argagg/CONTROL b/vcpkg/ports/argagg/CONTROL new file mode 100644 index 0000000..d317cbe --- /dev/null +++ b/vcpkg/ports/argagg/CONTROL @@ -0,0 +1,3 @@ +Source: argagg +Version: 0.4.6 +Description: A simple C++11 command line argument parser diff --git a/vcpkg/ports/argagg/portfile.cmake b/vcpkg/ports/argagg/portfile.cmake new file mode 100644 index 0000000..f32855e --- /dev/null +++ b/vcpkg/ports/argagg/portfile.cmake @@ -0,0 +1,27 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO vietjtnguyen/argagg + REF 0.4.6 + SHA512 7d8cf04a7c679518f01120830637c68719dd67a765457789eb4afedbead7be9efadc6bcdf640999329aaaf8659a5e5d1896f66587068cc668a7c49703aca3070 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DARGAGG_BUILD_EXAMPLES=OFF + -DARGAGG_BUILD_TESTS=OFF + -DARGAGG_BUILD_DOCS=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/argh/CONTROL b/vcpkg/ports/argh/CONTROL new file mode 100644 index 0000000..045c96e --- /dev/null +++ b/vcpkg/ports/argh/CONTROL @@ -0,0 +1,3 @@ +Source: argh +Version: 2018-12-18-2 +Description: Argh! A minimalist argument handler. diff --git a/vcpkg/ports/argh/portfile.cmake b/vcpkg/ports/argh/portfile.cmake new file mode 100644 index 0000000..eb64117 --- /dev/null +++ b/vcpkg/ports/argh/portfile.cmake @@ -0,0 +1,39 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO adishavit/argh + REF a1edee559757e076e570b8f6c2f555d8d00b373c + SHA512 a100c7ff20ef9ed39d53efeac5507a6ed59fb99ccba36ac4b5f8f5aaac6782f8e951b2f26b9b50f6c6fdbc53b5bceaabbb9dd9b9539f968fc1037733342e17a6 + HEAD_REF master + PATCHES + remove_unnamespaced_license_file.patch # https://github.com/adishavit/argh/pull/51 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DBUILD_TESTS=OFF + -DBUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +elseif(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/${PORT}) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) +file(REMOVE ${CURRENT_PACKAGES_DIR}/README.md) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/vcpkg/ports/argh/remove_unnamespaced_license_file.patch b/vcpkg/ports/argh/remove_unnamespaced_license_file.patch new file mode 100644 index 0000000..f6742c8 --- /dev/null +++ b/vcpkg/ports/argh/remove_unnamespaced_license_file.patch @@ -0,0 +1,67 @@ +From 83f364a2eb1b137453772ae9fcf5d7973770637f Mon Sep 17 00:00:00 2001 +From: Billy Robert O'Neal III +Date: Wed, 29 Apr 2020 13:01:31 -0700 +Subject: [PATCH] Don't install 'LICENSE' or 'README.md' directly to the + installation directory. + +This change unconditionally uses GNUInstallDirs which will correctly 'namespace' these files with the 'argh' project name. + +========= + +The names 'LICENSE' and 'README.md' are extremely common and likely to be taken by other ports. This happened in a recent full vcpkg catalog rebuild: + +Starting package 757/1254: qt-advanced-docking-system:x86-windows +Building package qt-advanced-docking-system[core]:x86-windows... +Could not locate cached archive: C:\agent\_work\1\s\archives\a1\a1507296ead5788137561997571557204aaac78f.zip +-- Downloading https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/archive/661d0c4356ab61d155b53718aa1bf6bab86dad13.tar.gz... +-- Extracting source C:/agent/_work/1/s/downloads/githubuser0xFFFF-Qt-Advanced-Docking-System-661d0c4356ab61d155b53718aa1bf6bab86dad13.tar.gz +-- Applying patch config_changes.patch +-- Using source at C:/agent/_work/1/s/buildtrees/qt-advanced-docking-system/src/bab86dad13-3088149a9b +-- Configuring x86-windows +-- Building x86-windows-dbg +-- Building x86-windows-rel +-- Installing: C:/agent/_work/1/s/packages/qt-advanced-docking-system_x86-windows/share/qt-advanced-docking-system/copyright +-- Performing post-build validation +-- Performing post-build validation done +Stored binary cache: C:\agent\_work\1\s\archives\a1\a1507296ead5788137561997571557204aaac78f.zip +Building package qt-advanced-docking-system[core]:x86-windows... done +Installing package qt-advanced-docking-system[core]:x86-windows... +The following files are already installed in C:/agent/_work/1/s/installed/x86-windows and are in conflict with qt-advanced-docking-system:x86-windows + +Installed by argh:x86-windows + license/LICENSE + +Elapsed time for package qt-advanced-docking-system:x86-windows: 11.09 s +--- + CMakeLists.txt | 12 +++++------- + 1 file changed, 5 insertions(+), 7 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 13bc879..f6264f3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -36,19 +36,17 @@ endif() + + install(TARGETS argh EXPORT arghTargets) + ++include(GNUInstallDirs) ++install(FILES "${CMAKE_CURRENT_LIST_DIR}/argh.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ++install(FILES "${CMAKE_CURRENT_LIST_DIR}/LICENSE" DESTINATION ${CMAKE_INSTALL_DOCDIR}) ++install(FILES "${CMAKE_CURRENT_LIST_DIR}/README.md" DESTINATION ${CMAKE_INSTALL_DOCDIR}) ++ + if(CMAKE_SYSTEM_NAME STREQUAL Linux) + # this might be a bit too restrictive, since for other (BSD, ...) this might apply also + # but this can be fixed later in extra pull requests from people on the platform +- include(GNUInstallDirs) +- install(FILES "${CMAKE_CURRENT_LIST_DIR}/argh.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +- install(FILES "${CMAKE_CURRENT_LIST_DIR}/LICENSE" DESTINATION ${CMAKE_INSTALL_DOCDIR}) +- install(FILES "${CMAKE_CURRENT_LIST_DIR}/README.md" DESTINATION ${CMAKE_INSTALL_DOCDIR}) + install(FILES argh-config.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/argh) + install(EXPORT arghTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/argh) + else() +- install(FILES "${CMAKE_CURRENT_LIST_DIR}/argh.h" DESTINATION include) +- install(FILES "${CMAKE_CURRENT_LIST_DIR}/LICENSE" DESTINATION license) +- install(FILES "${CMAKE_CURRENT_LIST_DIR}/README.md" DESTINATION .) + install(FILES argh-config.cmake DESTINATION CMake) + install(EXPORT arghTargets DESTINATION CMake) + endif() diff --git a/vcpkg/ports/argparse/portfile.cmake b/vcpkg/ports/argparse/portfile.cmake new file mode 100644 index 0000000..82216fd --- /dev/null +++ b/vcpkg/ports/argparse/portfile.cmake @@ -0,0 +1,30 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO p-ranav/argparse + REF 473d550ea313ea315a820b3b1b426254ad17061a # v2.1 + SHA512 59408a95e2ddb8d2e0f35229d58545569489f03b1a156fa9b9e92bbf7d669656045c3cffd8f2d939e1d749999cbc9ade7946eb2da1552b5edf2e069e893bdbaf + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DARGPARSE_BUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/vcpkg/ports/argparse/vcpkg.json b/vcpkg/ports/argparse/vcpkg.json new file mode 100644 index 0000000..4385222 --- /dev/null +++ b/vcpkg/ports/argparse/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "argparse", + "version-string": "2.1", + "description": "Argument parser for modern C++", + "homepage": "https://github.com/p-ranav/argparse", + "license": "MIT" +} diff --git a/vcpkg/ports/args/CONTROL b/vcpkg/ports/args/CONTROL new file mode 100644 index 0000000..3751ac0 --- /dev/null +++ b/vcpkg/ports/args/CONTROL @@ -0,0 +1,4 @@ +Source: args +Version: 2019-07-11 +Homepage: https://github.com/Taywee/args +Description: A simple header-only C++ argument parser library. diff --git a/vcpkg/ports/args/portfile.cmake b/vcpkg/ports/args/portfile.cmake new file mode 100644 index 0000000..6bab0e1 --- /dev/null +++ b/vcpkg/ports/args/portfile.cmake @@ -0,0 +1,29 @@ +#header-only library +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Taywee/args + REF 401663c1d57006566db6d8e5b37a21018fbd0bc3 + SHA512 2e0506f41ee8527e7fb67c0b926ff892fafe79db90920624c84eb603e374eb74c5640e4d0d0d88554db7a57424095b0da96238b4182ac515ae96dc202df95013 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DARGS_BUILD_UNITTESTS=OFF + -DARGS_BUILD_EXAMPLE=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +# Put the licence file where vcpkg expects it +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/args) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/args/LICENSE ${CURRENT_PACKAGES_DIR}/share/args/copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/argtable2/0001-fix-install-dirs.patch b/vcpkg/ports/argtable2/0001-fix-install-dirs.patch new file mode 100644 index 0000000..d852ffa --- /dev/null +++ b/vcpkg/ports/argtable2/0001-fix-install-dirs.patch @@ -0,0 +1,35 @@ +From 6594abbd953d0e26105fd6c982990eb702f27804 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 15:22:00 -0700 +Subject: [PATCH 1/2] fix install dirs + +--- + src/CMakeLists.txt | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 773c4c8..03e112c 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1,5 +1,4 @@ +-# for now, install in subdirectory of source directory by default +-SET( CMAKE_INSTALL_PREFIX .. ) ++include(GNUInstallDirs) + + IF( WIN32 ) + ADD_LIBRARY( argtable2 arg_dbl.c arg_end.c arg_file.c arg_int.c arg_lit.c arg_rem.c arg_str.c argtable2.c argtable2.h getopt.c getopt.h getopt1.c ) +@@ -7,5 +6,9 @@ ELSE( WIN32 ) + ADD_LIBRARY( argtable2 arg_date.c arg_dbl.c arg_end.c arg_file.c arg_int.c arg_lit.c arg_rem.c arg_rex.c arg_str.c argtable2.c argtable2.h getopt.c getopt.h getopt1.c ) + ENDIF( WIN32 ) + +-INSTALL( TARGETS argtable2 ARCHIVE DESTINATION lib) +-SET_TARGET_PROPERTIES( argtable2 PROPERTIES DEBUG_POSTFIX d ) ++INSTALL(TARGETS argtable2 ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++) ++INSTALL(FILES argtable2.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +-- +2.24.3 (Apple Git-128) + diff --git a/vcpkg/ports/argtable2/0002-include-correct-headers.patch b/vcpkg/ports/argtable2/0002-include-correct-headers.patch new file mode 100644 index 0000000..f2e4d5f --- /dev/null +++ b/vcpkg/ports/argtable2/0002-include-correct-headers.patch @@ -0,0 +1,60 @@ +From 271423adb2900c8bf4aad5d73d7ef1efbb5c35d8 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 15:17:18 -0700 +Subject: [PATCH 2/2] include correct headers + +--- + src/arg_date.c | 4 +++- + src/arg_int.c | 1 + + src/getopt.c | 1 + + 3 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/arg_date.c b/src/arg_date.c +index 22b59e2..5004b42 100644 +--- a/src/arg_date.c ++++ b/src/arg_date.c +@@ -37,6 +37,8 @@ USA. + #include + #endif + ++#include ++ + #include "argtable2.h" + + /* local error codes */ +@@ -112,7 +114,7 @@ static void errorfn(struct arg_date *parent, FILE *fp, int errorcode, const char + char buff[200]; + + fprintf(fp,"illegal timestamp format \"%s\"\n",argval); +- bzero(&tm,sizeof(tm)); ++ memset(&tm, 0, sizeof(tm)); + strptime("1999-12-31 23:59:59","%F %H:%M:%S",&tm); + strftime(buff, sizeof(buff), parent->format, &tm); + printf("correct format is \"%s\"\n", buff); +diff --git a/src/arg_int.c b/src/arg_int.c +index 29c20e5..bc10012 100644 +--- a/src/arg_int.c ++++ b/src/arg_int.c +@@ -30,6 +30,7 @@ USA. + + #include "argtable2.h" + #include ++#include + + /* local error codes */ + enum {EMINCOUNT=1,EMAXCOUNT,EBADINT,EOVERFLOW}; +diff --git a/src/getopt.c b/src/getopt.c +index b208529..b13acc6 100644 +--- a/src/getopt.c ++++ b/src/getopt.c +@@ -47,6 +47,7 @@ + #endif + + #include ++#include + + /* Comment out all this code if we are using the GNU C Library, and are not + actually compiling the library itself. This code is part of the GNU C +-- +2.24.3 (Apple Git-128) + diff --git a/vcpkg/ports/argtable2/CONTROL b/vcpkg/ports/argtable2/CONTROL new file mode 100644 index 0000000..734b973 --- /dev/null +++ b/vcpkg/ports/argtable2/CONTROL @@ -0,0 +1,5 @@ +Source: argtable2 +Version: 2.13 +Port-Version: 8 +Homepage: http://argtable.sourceforge.net +Description: Argtable is an ANSI C library for parsing GNU style command line options with a minimum of fuss. diff --git a/vcpkg/ports/argtable2/portfile.cmake b/vcpkg/ports/argtable2/portfile.cmake new file mode 100644 index 0000000..cf394f6 --- /dev/null +++ b/vcpkg/ports/argtable2/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO argtable/argtable + REF argtable-2.13 + FILENAME "argtable2-13.tar.gz" + SHA512 3d8303f3ba529e3241d918c0127a16402ece951efb964d14a06a3a7d29a252812ad3c44e96da28798871e9923e73a2cfe7ebc84139c1397817d632cae25c4585 + PATCHES + 0001-fix-install-dirs.patch + 0002-include-correct-headers.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_DEBUG_POSTFIX=d +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/argtable3/portfile.cmake b/vcpkg/ports/argtable3/portfile.cmake new file mode 100644 index 0000000..4e90c02 --- /dev/null +++ b/vcpkg/ports/argtable3/portfile.cmake @@ -0,0 +1,44 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO argtable/argtable3 + REF 1c1bb23b305c8cf349328fc0cacd7beb7a575ff4 # v3.1.5 + SHA512 13150c8adc1eda107b6df65a2e276510a66bd912f6067d7cc72951735a4c20307144b04cda959cdd24f160da3810ba8bb35e48992ff4281e44ed2331d030fb1d + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DARGTABLE3_ENABLE_CONAN=OFF + -DARGTABLE3_ENABLE_TESTS=OFF + -DARGTABLE3_BUILD_STATIC_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +elseif(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/${PORT}) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +endif() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + vcpkg_replace_string( + "${CURRENT_PACKAGES_DIR}/include/argtable3.h" + "defined(argtable3_IMPORTS)" + "1 // defined(argtable3_IMPORTS)" + ) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/argtable3/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/argtable3/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..9000246 --- /dev/null +++ b/vcpkg/ports/argtable3/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,9 @@ +_find_package(${ARGS}) + +if(TARGET argtable3 AND NOT TARGET argtable3_static) + add_library(argtable3_static INTERFACE IMPORTED) + set_target_properties(argtable3_static PROPERTIES INTERFACE_LINK_LIBRARIES argtable3) +elseif(TARGET argtable3_static AND NOT TARGET argtable3) + add_library(argtable3 INTERFACE IMPORTED) + set_target_properties(argtable3 PROPERTIES INTERFACE_LINK_LIBRARIES argtable3_static) +endif() diff --git a/vcpkg/ports/argtable3/vcpkg.json b/vcpkg/ports/argtable3/vcpkg.json new file mode 100644 index 0000000..37c2ec7 --- /dev/null +++ b/vcpkg/ports/argtable3/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "argtable3", + "version-string": "3.1.5", + "description": "A single-file, ANSI C, command-line parsing library that parses GNU-style command-line options", + "homepage": "www.argtable.org" +} diff --git a/vcpkg/ports/argumentum/CONTROL b/vcpkg/ports/argumentum/CONTROL new file mode 100644 index 0000000..a41e9c2 --- /dev/null +++ b/vcpkg/ports/argumentum/CONTROL @@ -0,0 +1,4 @@ +Source: argumentum +Version: 0.3.1 +Description: A C++17 command line argument parser inspired by Python argparse +Homepage: https://github.com/mmahnic/argumentum diff --git a/vcpkg/ports/argumentum/portfile.cmake b/vcpkg/ports/argumentum/portfile.cmake new file mode 100644 index 0000000..52d7d1c --- /dev/null +++ b/vcpkg/ports/argumentum/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mmahnic/argumentum + REF v0.3.1 + SHA512 96f3a2077dacabf95d06120e24a50147b153090ddb0b6da17c960f8fe6724567bcd3337409f4729e1d8d15058550ed9f34a861da16fb6c999207554154e411c1 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DARGUMENTUM_BUILD_EXAMPLES=OFF + -DARGUMENTUM_BUILD_TESTS=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Argumentum) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright) diff --git a/vcpkg/ports/armadillo/CONTROL b/vcpkg/ports/armadillo/CONTROL new file mode 100644 index 0000000..8508095 --- /dev/null +++ b/vcpkg/ports/armadillo/CONTROL @@ -0,0 +1,5 @@ +Source: armadillo +Version: 2019-04-16 +Port-Version: 10 +Description: Armadillo is a high quality linear algebra library (matrix maths) for the C++ language, aiming towards a good balance between speed and ease of use +Build-Depends: openblas, lapack diff --git a/vcpkg/ports/armadillo/add-disable-find-package.patch b/vcpkg/ports/armadillo/add-disable-find-package.patch new file mode 100644 index 0000000..65197e2 --- /dev/null +++ b/vcpkg/ports/armadillo/add-disable-find-package.patch @@ -0,0 +1,92 @@ +diff --git a/cmake_aux/Modules/ARMA_FindACML.cmake b/cmake_aux/Modules/ARMA_FindACML.cmake +index 7d0655e..fa435ff 100644 +--- a/cmake_aux/Modules/ARMA_FindACML.cmake ++++ b/cmake_aux/Modules/ARMA_FindACML.cmake +@@ -5,6 +5,11 @@ + # also defined, but not for general use are + # ACML_LIBRARY, where to find the ACML library. + ++if(CMAKE_DISABLE_FIND_PACKAGE_ACML) ++ set(ACML_FOUND "NO") ++ return() ++endif() ++ + SET(ACML_NAMES ${ACML_NAMES} acml) + FIND_LIBRARY(ACML_LIBRARY + NAMES ${ACML_NAMES} +diff --git a/cmake_aux/Modules/ARMA_FindACMLMP.cmake b/cmake_aux/Modules/ARMA_FindACMLMP.cmake +index 3390179..ead7b1e 100644 +--- a/cmake_aux/Modules/ARMA_FindACMLMP.cmake ++++ b/cmake_aux/Modules/ARMA_FindACMLMP.cmake +@@ -5,6 +5,11 @@ + # also defined, but not for general use are + # ACMLMP_LIBRARY, where to find the ACMLMP library. + ++if(CMAKE_DISABLE_FIND_PACKAGE_ACMLMP) ++ set(ACMLMP_FOUND NO) ++ return() ++endif() ++ + SET(ACMLMP_NAMES ${ACMLMP_NAMES} acml_mp) + FIND_LIBRARY(ACMLMP_LIBRARY + NAMES ${ACMLMP_NAMES} +diff --git a/cmake_aux/Modules/ARMA_FindARPACK.cmake b/cmake_aux/Modules/ARMA_FindARPACK.cmake +index 1a709ad..3029c25 100644 +--- a/cmake_aux/Modules/ARMA_FindARPACK.cmake ++++ b/cmake_aux/Modules/ARMA_FindARPACK.cmake +@@ -4,6 +4,10 @@ + # ARPACK_FOUND - system has ARPACK + # ARPACK_LIBRARY - Link this to use ARPACK + ++if(CMAKE_DISABLE_FIND_PACKAGE_ARPACK) ++ set(ARPACK_FOUND NO) ++ return() ++endif() + + find_library(ARPACK_LIBRARY + NAMES arpack +diff --git a/cmake_aux/Modules/ARMA_FindATLAS.cmake b/cmake_aux/Modules/ARMA_FindATLAS.cmake +index 491a361..e40a0ff 100644 +--- a/cmake_aux/Modules/ARMA_FindATLAS.cmake ++++ b/cmake_aux/Modules/ARMA_FindATLAS.cmake +@@ -1,3 +1,8 @@ ++if(CMAKE_DISABLE_FIND_PACKAGE_ATLAS) ++ set(ATLAS_FOUND NO) ++ return() ++endif() ++ + find_path(ATLAS_CBLAS_INCLUDE_DIR + NAMES cblas.h + PATHS /usr/include/atlas/ /usr/include/ /usr/local/include/atlas/ /usr/local/include/ +diff --git a/cmake_aux/Modules/ARMA_FindMKL.cmake b/cmake_aux/Modules/ARMA_FindMKL.cmake +index 0fd5b06..d6bcd49 100644 +--- a/cmake_aux/Modules/ARMA_FindMKL.cmake ++++ b/cmake_aux/Modules/ARMA_FindMKL.cmake +@@ -6,6 +6,11 @@ + ## the link below explains why we're linking only with mkl_rt + ## https://software.intel.com/en-us/articles/a-new-linking-model-single-dynamic-library-mkl_rt-since-intel-mkl-103 + ++if(CMAKE_DISABLE_FIND_PACKAGE_MKL) ++ set(MKL_FOUND NO) ++ return() ++endif() ++ + set(MKL_NAMES ${MKL_NAMES} mkl_rt) + #set(MKL_NAMES ${MKL_NAMES} mkl_lapack) + #set(MKL_NAMES ${MKL_NAMES} mkl_intel_thread) +diff --git a/cmake_aux/Modules/ARMA_FindSuperLU5.cmake b/cmake_aux/Modules/ARMA_FindSuperLU5.cmake +index abf046d..e496cb0 100644 +--- a/cmake_aux/Modules/ARMA_FindSuperLU5.cmake ++++ b/cmake_aux/Modules/ARMA_FindSuperLU5.cmake +@@ -5,6 +5,11 @@ + # SuperLU_LIBRARY - Link this to use SuperLU + # SuperLU_INCLUDE_DIR - directory of SuperLU headers + ++if(CMAKE_DISABLE_FIND_PACKAGE_SuperLU) ++ set(SuperLU_FOUND OFF) ++ return() ++endif() ++ + find_path(SuperLU_INCLUDE_DIR slu_ddefs.h + /usr/include/superlu/ + /usr/include/SuperLU/ diff --git a/vcpkg/ports/armadillo/fix-CMakePath.patch b/vcpkg/ports/armadillo/fix-CMakePath.patch new file mode 100644 index 0000000..58cca5c --- /dev/null +++ b/vcpkg/ports/armadillo/fix-CMakePath.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9fea721..e6a273d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -473,7 +473,7 @@ install(EXPORT ArmadilloLibraryDepends DESTINATION + # and install it + set(ARMADILLO_INCLUDE_DIRS "${CMAKE_INSTALL_FULL_INCLUDEDIR}") + set(ARMADILLO_LIB_DIR "${CMAKE_INSTALL_FULL_LIBDIR}") +-set(ARMADILLO_CMAKE_DIR "${CMAKE_INSTALL_FULL_DATADIR}/Armadillo/CMake") ++set(ARMADILLO_CMAKE_DIR "${CMAKE_INSTALL_FULL_DATADIR}/Armadillo") + + + message(STATUS "Generating '${PROJECT_BINARY_DIR}/InstallFiles/ArmadilloConfig.cmake'") diff --git a/vcpkg/ports/armadillo/portfile.cmake b/vcpkg/ports/armadillo/portfile.cmake new file mode 100644 index 0000000..5868644 --- /dev/null +++ b/vcpkg/ports/armadillo/portfile.cmake @@ -0,0 +1,50 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.com + OUT_SOURCE_PATH SOURCE_PATH + REPO conradsnicta/armadillo-code + REF f00d3225b1c005775044369723f31cecc3cd6569 + SHA512 ca3574edf5de8c752867403c3856ed9569fbed2ce9729585cae59be5751493c2e71121319b0a812e2ea56baada6b6f62fbc84ce6f1efb362347e5fd4141ccf1b + HEAD_REF 9.400.x + PATCHES + remove_custom_modules.patch + fix-CMakePath.patch + add-disable-find-package.patch +) + +file(REMOVE ${SOURCE_PATH}/cmake_aux/Modules/ARMA_FindBLAS.cmake) +file(REMOVE ${SOURCE_PATH}/cmake_aux/Modules/ARMA_FindLAPACK.cmake) +file(REMOVE ${SOURCE_PATH}/cmake_aux/Modules/ARMA_FindOpenBLAS.cmake) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE + PREFER_NINJA + OPTIONS + -DDETECT_HDF5=false + -DCMAKE_DISABLE_FIND_PACKAGE_SuperLU=ON + -DCMAKE_DISABLE_FIND_PACKAGE_ACML=ON + -DCMAKE_DISABLE_FIND_PACKAGE_ACMLMP=ON + -DCMAKE_DISABLE_FIND_PACKAGE_ARPACK=ON + -DCMAKE_DISABLE_FIND_PACKAGE_ATLAS=ON + -DCMAKE_DISABLE_FIND_PACKAGE_MKL=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/Armadillo/CMake TARGET_PATH share/Armadillo) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(GLOB SHARE_CONTENT ${CURRENT_PACKAGES_DIR}/share/Armadillo) +list(LENGTH SHARE_CONTENT SHARE_LEN) +if(SHARE_LEN EQUAL 0) + # On case sensitive file system there is an extra empty directory created that should be removed + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/Armadillo) +endif() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/armadillo/remove_custom_modules.patch b/vcpkg/ports/armadillo/remove_custom_modules.patch new file mode 100644 index 0000000..0723dbe --- /dev/null +++ b/vcpkg/ports/armadillo/remove_custom_modules.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0959127..9fea721 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -176,10 +176,9 @@ else() + include(ARMA_FindMKL) + include(ARMA_FindACMLMP) + include(ARMA_FindACML) +- include(ARMA_FindOpenBLAS) + include(ARMA_FindATLAS) +- include(ARMA_FindBLAS) +- include(ARMA_FindLAPACK) ++ find_package(BLAS) ++ find_package(LAPACK) + + message(STATUS " MKL_FOUND = ${MKL_FOUND}" ) + message(STATUS " ACMLMP_FOUND = ${ACMLMP_FOUND}" ) diff --git a/vcpkg/ports/armadillo/usage b/vcpkg/ports/armadillo/usage new file mode 100644 index 0000000..58066f6 --- /dev/null +++ b/vcpkg/ports/armadillo/usage @@ -0,0 +1,4 @@ +The package armadillo provides CMake targets: + + find_package(Armadillo CONFIG REQUIRED) + target_link_libraries(main PRIVATE ${ARMADILLO_LIBRARIES}) diff --git a/vcpkg/ports/arrow/CONTROL b/vcpkg/ports/arrow/CONTROL new file mode 100644 index 0000000..ed8a024 --- /dev/null +++ b/vcpkg/ports/arrow/CONTROL @@ -0,0 +1,20 @@ +Source: arrow +Version: 1.0.1 +Port-Version: 1 +Build-Depends: boost-system, boost-filesystem, boost-multiprecision, boost-algorithm, flatbuffers, rapidjson, zlib, lz4, brotli, bzip2, zstd, snappy, gflags, thrift, double-conversion, glog, uriparser, openssl, utf8proc +Homepage: https://github.com/apache/arrow +Description: Apache Arrow is a columnar in-memory analytics layer designed to accelerate big data. It houses a set of canonical in-memory representations of flat and hierarchical data along with multiple language-bindings for structure manipulation. It also provides IPC and common algorithm implementations. +Supports: x64 +Default-Features: csv, json, parquet, filesystem + +Feature: csv +Description: CSV file support + +Feature: json +Description: JSON file support + +Feature: parquet +Description: Parquet file support + +Feature: filesystem +Description: Local filesystem support diff --git a/vcpkg/ports/arrow/all.patch b/vcpkg/ports/arrow/all.patch new file mode 100644 index 0000000..65260b1 --- /dev/null +++ b/vcpkg/ports/arrow/all.patch @@ -0,0 +1,213 @@ +diff --git a/cpp/cmake_modules/BuildUtils.cmake b/cpp/cmake_modules/BuildUtils.cmake +index e4e13cb70..58ca626da 100644 +--- a/cpp/cmake_modules/BuildUtils.cmake ++++ b/cpp/cmake_modules/BuildUtils.cmake +@@ -335,7 +335,7 @@ function(ADD_ARROW_LIB LIB_NAME) + target_include_directories(${LIB_NAME}_static PRIVATE ${ARG_PRIVATE_INCLUDES}) + endif() + +- if(MSVC) ++ if(MSVC AND 0) + set(LIB_NAME_STATIC ${LIB_NAME}_static) + else() + set(LIB_NAME_STATIC ${LIB_NAME}) +diff --git a/cpp/cmake_modules/FindBrotli.cmake b/cpp/cmake_modules/FindBrotli.cmake +index bf47915c4..053e605a0 100644 +--- a/cpp/cmake_modules/FindBrotli.cmake ++++ b/cpp/cmake_modules/FindBrotli.cmake +@@ -64,8 +64,7 @@ if(BROTLI_ROOT) + PATH_SUFFIXES ${INCLUDE_PATH_SUFFIXES} + NO_DEFAULT_PATH) + else() +- pkg_check_modules(BROTLI_PC libbrotlicommon libbrotlienc libbrotlidec) +- if(BROTLI_PC_FOUND) ++ if(0) # Find via pkg_check_modules disabled as incompatible with vcpkg + set(BROTLI_INCLUDE_DIR "${BROTLI_PC_libbrotlicommon_INCLUDEDIR}") + + # Some systems (e.g. Fedora) don't fill Brotli_LIBRARY_DIRS, so add the other dirs here. +diff --git a/cpp/cmake_modules/FindLz4.cmake b/cpp/cmake_modules/FindLz4.cmake +index 841091643..bb5a00a50 100644 +--- a/cpp/cmake_modules/FindLz4.cmake ++++ b/cpp/cmake_modules/FindLz4.cmake +@@ -19,14 +19,16 @@ if(MSVC AND NOT DEFINED LZ4_MSVC_STATIC_LIB_SUFFIX) + set(LZ4_MSVC_STATIC_LIB_SUFFIX "_static") + endif() + +-set(LZ4_STATIC_LIB_SUFFIX "${LZ4_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") ++if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") ++ set(LZ4_LIB_NAME_DEBUG_SUFFIX d) ++endif() + +-set(LZ4_STATIC_LIB_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}lz4${LZ4_STATIC_LIB_SUFFIX}) ++set(LZ4_STATIC_LIB_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}lz4${LZ4_MSVC_STATIC_LIB_SUFFIX}${LZ4_LIB_NAME_DEBUG_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}) + + if(LZ4_ROOT) + find_library( + LZ4_LIB +- NAMES lz4 ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME} ++ NAMES lz4${LZ4_LIB_NAME_DEBUG_SUFFIX} ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME} + "${CMAKE_SHARED_LIBRARY_PREFIX}lz4_static${CMAKE_SHARED_LIBRARY_SUFFIX}" + PATHS ${LZ4_ROOT} + PATH_SUFFIXES ${LIB_PATH_SUFFIXES} +@@ -38,19 +40,19 @@ if(LZ4_ROOT) + PATH_SUFFIXES ${INCLUDE_PATH_SUFFIXES}) + + else() +- pkg_check_modules(LZ4_PC liblz4) +- if(LZ4_PC_FOUND) ++ #pkg_check_modules(LZ4_PC liblz4) ++ if(0) #if(LZ4_PC_FOUND) # Disabled as sometimes incompatible with vcpkg on Linux and OSX + set(LZ4_INCLUDE_DIR "${LZ4_PC_INCLUDEDIR}") + + list(APPEND LZ4_PC_LIBRARY_DIRS "${LZ4_PC_LIBDIR}") +- find_library(LZ4_LIB lz4 ++ find_library(LZ4_LIB lz4${LZ4_LIB_NAME_DEBUG_SUFFIX} ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME} + PATHS ${LZ4_PC_LIBRARY_DIRS} + NO_DEFAULT_PATH + PATH_SUFFIXES ${LIB_PATH_SUFFIXES}) + else() + find_library( + LZ4_LIB +- NAMES lz4 ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME} ++ NAMES lz4${LZ4_LIB_NAME_DEBUG_SUFFIX} ${LZ4_STATIC_LIB_NAME} lib${LZ4_STATIC_LIB_NAME} + "${CMAKE_SHARED_LIBRARY_PREFIX}lz4_static${CMAKE_SHARED_LIBRARY_SUFFIX}" + PATH_SUFFIXES ${LIB_PATH_SUFFIXES}) + find_path(LZ4_INCLUDE_DIR NAMES lz4.h PATH_SUFFIXES ${INCLUDE_PATH_SUFFIXES}) +diff --git a/cpp/cmake_modules/FindThrift.cmake b/cpp/cmake_modules/FindThrift.cmake +index bb3eb5608..0b03d37d3 100644 +--- a/cpp/cmake_modules/FindThrift.cmake ++++ b/cpp/cmake_modules/FindThrift.cmake +@@ -43,6 +43,10 @@ if(MSVC AND NOT THRIFT_MSVC_STATIC_LIB_SUFFIX) + set(THRIFT_MSVC_STATIC_LIB_SUFFIX md) + endif() + ++if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") ++ set(THRIFT_LIB_NAME_DEBUG_SUFFIX d) ++endif() ++ + if(Thrift_ROOT) + find_library(THRIFT_STATIC_LIB thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX} + PATHS ${Thrift_ROOT} +@@ -61,16 +65,14 @@ else() + + list(APPEND THRIFT_PC_LIBRARY_DIRS "${THRIFT_PC_LIBDIR}") + +- find_library(THRIFT_STATIC_LIB thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX} +- PATHS ${THRIFT_PC_LIBRARY_DIRS} +- NO_DEFAULT_PATH) ++ find_library(THRIFT_STATIC_LIB thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX}${THRIFT_LIB_NAME_DEBUG_SUFFIX} ++ PATHS ${THRIFT_PC_LIBRARY_DIRS}) + find_program(THRIFT_COMPILER thrift + HINTS ${THRIFT_PC_PREFIX} +- NO_DEFAULT_PATH + PATH_SUFFIXES "bin") + set(THRIFT_VERSION ${THRIFT_PC_VERSION}) + else() +- find_library(THRIFT_STATIC_LIB thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX} ++ find_library(THRIFT_STATIC_LIB thrift${THRIFT_MSVC_STATIC_LIB_SUFFIX}${THRIFT_LIB_NAME_DEBUG_SUFFIX} + PATH_SUFFIXES "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "lib") + find_path(THRIFT_INCLUDE_DIR thrift/Thrift.h PATH_SUFFIXES "include") + find_program(THRIFT_COMPILER thrift PATH_SUFFIXES "bin") +diff --git a/cpp/cmake_modules/FindZSTD.cmake b/cpp/cmake_modules/FindZSTD.cmake +index 84d21d2b5..971a9dec3 100644 +--- a/cpp/cmake_modules/FindZSTD.cmake ++++ b/cpp/cmake_modules/FindZSTD.cmake +@@ -24,11 +24,11 @@ if(ARROW_ZSTD_USE_SHARED) + list(APPEND ZSTD_LIB_NAMES + "${CMAKE_SHARED_LIBRARY_PREFIX}zstd${CMAKE_SHARED_LIBRARY_SUFFIX}") + else() +- if(MSVC AND NOT DEFINED ZSTD_MSVC_STATIC_LIB_SUFFIX) +- set(ZSTD_MSVC_STATIC_LIB_SUFFIX "_static") ++ if(MSVC AND CMAKE_BUILD_TYPE STREQUAL "DEBUG") ++ set(ZSTD_MSVC_DEBUG_LIB_SUFFIX d) + endif() + set(ZSTD_STATIC_LIB_SUFFIX +- "${ZSTD_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") ++ "${ZSTD_MSVC_DEBUG_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") + set(ZSTD_STATIC_LIB_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}zstd${ZSTD_STATIC_LIB_SUFFIX}) + set(ZSTD_LIB_NAMES "${ZSTD_STATIC_LIB_NAME}" "lib${ZSTD_STATIC_LIB_NAME}") + endif() +@@ -49,8 +49,8 @@ if(ZSTD_ROOT) + + else() + # Second, find via pkg_check_modules +- pkg_check_modules(ZSTD_PC libzstd) +- if(ZSTD_PC_FOUND) ++ #pkg_check_modules(ZSTD_PC libzstd) ++ if(0) #(ZSTD_PC_FOUND) # Disabled as sometimes incompatible with vcpkg on Linux and OSX + set(ZSTD_INCLUDE_DIR "${ZSTD_PC_INCLUDEDIR}") + + list(APPEND ZSTD_PC_LIBRARY_DIRS "${ZSTD_PC_LIBDIR}") +diff --git a/cpp/cmake_modules/DefineOptions.cmake b/cpp/cmake_modules/DefineOptions.cmake +index 3b229846c..da2c6d551 100644 +--- a/cpp/cmake_modules/DefineOptions.cmake ++++ b/cpp/cmake_modules/DefineOptions.cmake +@@ -297,6 +297,9 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") + define_option(ARROW_PROTOBUF_USE_SHARED + "Rely on Protocol Buffers shared libraries where relevant" ON) + ++ define_option(ARROW_UTF8PROC_USE_SHARED ++ "Rely on utf8proc shared libraries where relevant" ON) ++ + define_option(ARROW_ZSTD_USE_SHARED "Rely on zstd shared libraries where relevant" ON) + + define_option(ARROW_WITH_BACKTRACE "Build with backtrace support" ON) +diff --git a/cpp/cmake_modules/Findutf8proc.cmake b/cpp/cmake_modules/Findutf8proc.cmake +index ab9ae9f98..d3063827a 100644 +--- a/cpp/cmake_modules/Findutf8proc.cmake ++++ b/cpp/cmake_modules/Findutf8proc.cmake +@@ -15,11 +15,28 @@ + # specific language governing permissions and limitations + # under the License. + ++if(ARROW_UTF8PROC_USE_SHARED) ++ set(UTF8PROC_LIB_NAMES) ++ if(CMAKE_IMPORT_LIBRARY_SUFFIX) ++ list(APPEND UTF8PROC_LIB_NAMES ++ "${CMAKE_IMPORT_LIBRARY_PREFIX}utf8proc${CMAKE_IMPORT_LIBRARY_SUFFIX}") ++ endif() ++ list(APPEND UTF8PROC_LIB_NAMES ++ "${CMAKE_SHARED_LIBRARY_PREFIX}utf8proc${CMAKE_SHARED_LIBRARY_SUFFIX}") ++else() ++ if(MSVC AND NOT DEFINED UTF8PROC_MSVC_STATIC_LIB_SUFFIX) ++ set(UTF8PROC_MSVC_STATIC_LIB_SUFFIX "_static") ++ endif() ++ set(UTF8PROC_STATIC_LIB_SUFFIX ++ "${UTF8PROC_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}") ++ set(UTF8PROC_STATIC_LIB_NAME ${CMAKE_STATIC_LIBRARY_PREFIX}utf8proc${UTF8PROC_STATIC_LIB_SUFFIX}) ++ set(UTF8PROC_LIB_NAMES "${UTF8PROC_STATIC_LIB_NAME}" "lib${UTF8PROC_STATIC_LIB_NAME}") ++endif() ++ + if(utf8proc_ROOT) + find_library( + UTF8PROC_LIB +- NAMES utf8proc +- "${CMAKE_SHARED_LIBRARY_PREFIX}utf8proc${CMAKE_SHARED_LIBRARY_SUFFIX}" ++ NAMES ${UTF8PROC_LIB_NAMES} + PATHS ${utf8proc_ROOT} + PATH_SUFFIXES ${LIB_PATH_SUFFIXES} + NO_DEFAULT_PATH) +@@ -28,12 +45,10 @@ if(utf8proc_ROOT) + PATHS ${utf8proc_ROOT} + NO_DEFAULT_PATH + PATH_SUFFIXES ${INCLUDE_PATH_SUFFIXES}) +- + else() + find_library( + UTF8PROC_LIB +- NAMES utf8proc +- "${CMAKE_SHARED_LIBRARY_PREFIX}utf8proc${CMAKE_SHARED_LIBRARY_SUFFIX}" ++ NAMES ${UTF8PROC_LIB_NAMES} + PATH_SUFFIXES ${LIB_PATH_SUFFIXES}) + find_path(UTF8PROC_INCLUDE_DIR NAMES utf8proc.h PATH_SUFFIXES ${INCLUDE_PATH_SUFFIXES}) + endif() +@@ -47,5 +62,8 @@ if(UTF8PROC_FOUND OR utf8proc_FOUND) + set_target_properties(utf8proc::utf8proc + PROPERTIES IMPORTED_LOCATION "${UTF8PROC_LIB}" + INTERFACE_INCLUDE_DIRECTORIES "${UTF8PROC_INCLUDE_DIR}") ++ if(NOT ARROW_UTF8PROC_USE_SHARED) ++ set_target_properties(utf8proc::utf8proc ++ PROPERTIES INTERFACE_COMPILER_DEFINITIONS "UTF8PROC_STATIC") ++ endif() + endif() +- diff --git a/vcpkg/ports/arrow/portfile.cmake b/vcpkg/ports/arrow/portfile.cmake new file mode 100644 index 0000000..28f11a6 --- /dev/null +++ b/vcpkg/ports/arrow/portfile.cmake @@ -0,0 +1,66 @@ +vcpkg_fail_port_install(ON_ARCH "x86" "arm" "arm64") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO apache/arrow + REF apache-arrow-1.0.1 + SHA512 46fedecaf7fa0ff0d8b4ac5f3d7bcbcb75ce4f65d272f775dedd61f091f975cf03fc55e91e46021df9872a82712ca9c9e4eb35414cf46c0f49a26f7a5a3dd50c + HEAD_REF master + PATCHES + all.patch +) + +string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "dynamic" ARROW_BUILD_SHARED) +string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "static" ARROW_BUILD_STATIC) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + "csv" ARROW_CSV + "json" ARROW_JSON + "parquet" ARROW_PARQUET + "filesystem" ARROW_FILESYSTEM +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/cpp + PREFER_NINJA + OPTIONS + -DARROW_DEPENDENCY_SOURCE=SYSTEM + -Duriparser_SOURCE=SYSTEM + -DARROW_BUILD_TESTS=OFF + ${FEATURE_OPTIONS} + -DARROW_BUILD_STATIC=${ARROW_BUILD_STATIC} + -DARROW_BUILD_SHARED=${ARROW_BUILD_SHARED} + -DARROW_BROTLI_USE_SHARED=${ARROW_BUILD_SHARED} + -DARROW_GFLAGS_USE_SHARED=${ARROW_BUILD_SHARED} + -DARROW_UTF8PROC_USE_SHARED=${ARROW_BUILD_SHARED} + -DARROW_ZSTD_USE_SHARED=${ARROW_BUILD_SHARED} + -DARROW_JEMALLOC=OFF + -DARROW_BUILD_UTILITIES=OFF + -DARROW_WITH_BZ2=ON + -DARROW_WITH_ZLIB=ON + -DARROW_WITH_ZSTD=ON + -DARROW_WITH_LZ4=ON + -DARROW_WITH_SNAPPY=ON + -DARROW_WITH_BROTLI=ON + -DARROW_WITH_UTF8PROC=ON + -DPARQUET_REQUIRE_ENCRYPTION=ON + -DBUILD_WARNING_LEVEL=PRODUCTION +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/arrow_static.lib) + message(FATAL_ERROR "Installed lib file should be named 'arrow.lib' via patching the upstream build.") +endif() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/arrow) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/vcpkg/ports/asio/CMakeLists.txt b/vcpkg/ports/asio/CMakeLists.txt new file mode 100644 index 0000000..4241b1f --- /dev/null +++ b/vcpkg/ports/asio/CMakeLists.txt @@ -0,0 +1,28 @@ +cmake_minimum_required(VERSION 3.8) +project(asio) + +add_library(asio INTERFACE) + +# Export target +install(TARGETS asio + EXPORT asio + INCLUDES DESTINATION include/ +) + +install(EXPORT asio + DESTINATION "share/asio" + FILE asio-targets.cmake +) + +install(DIRECTORY + asio/include/asio + DESTINATION include/ + FILES_MATCHING + PATTERN "*.hpp" + PATTERN "*.ipp" +) + +install(FILES + asio/include/asio.hpp + DESTINATION include/ +) diff --git a/vcpkg/ports/asio/CONTROL b/vcpkg/ports/asio/CONTROL new file mode 100644 index 0000000..c0da68a --- /dev/null +++ b/vcpkg/ports/asio/CONTROL @@ -0,0 +1,4 @@ +Source: asio +Version: 1.12.2-2 +Homepage: https://github.com/chriskohlhoff/asio +Description: Asio is a cross-platform C++ library for network and low-level I/O programming that provides developers with a consistent asynchronous model using a modern C++ approach. diff --git a/vcpkg/ports/asio/asio-config.cmake b/vcpkg/ports/asio/asio-config.cmake new file mode 100644 index 0000000..32e0009 --- /dev/null +++ b/vcpkg/ports/asio/asio-config.cmake @@ -0,0 +1,6 @@ +include ("${CMAKE_CURRENT_LIST_DIR}/asio-targets.cmake") +add_library(asio::asio INTERFACE IMPORTED) +target_link_libraries(asio::asio INTERFACE asio) + +get_target_property(_ASIO_INCLUDE_DIR asio INTERFACE_INCLUDE_DIRECTORIES) +set(ASIO_INCLUDE_DIR "${_ASIO_INCLUDE_DIR}") diff --git a/vcpkg/ports/asio/portfile.cmake b/vcpkg/ports/asio/portfile.cmake new file mode 100644 index 0000000..6c6d438 --- /dev/null +++ b/vcpkg/ports/asio/portfile.cmake @@ -0,0 +1,34 @@ +#header-only library +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO chriskohlhoff/asio + REF asio-1-12-2 + SHA512 7c2e213ff154bb2e5776b37906d437a62206f973316c94706e6d42e3c2f0866e7d97f3e40225ab5f28bf2c4a33fa0b38a4b75421aef86ddf9f2da0811caa2d00 + HEAD_REF master +) + +# Always use "ASIO_STANDALONE" to avoid boost dependency +file(READ "${SOURCE_PATH}/asio/include/asio/detail/config.hpp" _contents) +string(REPLACE "defined(ASIO_STANDALONE)" "!defined(VCPKG_DISABLE_ASIO_STANDALONE)" _contents "${_contents}") +file(WRITE "${SOURCE_PATH}/asio/include/asio/detail/config.hpp" "${_contents}") + +# CMake install +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "share/asio") +file(INSTALL + ${CMAKE_CURRENT_LIST_DIR}/asio-config.cmake + DESTINATION ${CURRENT_PACKAGES_DIR}/share/asio/ +) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/asio/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + diff --git a/vcpkg/ports/asiosdk/CONTROL b/vcpkg/ports/asiosdk/CONTROL new file mode 100644 index 0000000..b97ebb6 --- /dev/null +++ b/vcpkg/ports/asiosdk/CONTROL @@ -0,0 +1,4 @@ +Source: asiosdk +Version: 2.3.3-1 +Homepage: https://www.steinberg.net/en/company/developers.html +Description: ASIO is a low latency audio API from Steinberg. diff --git a/vcpkg/ports/asiosdk/Findasiosdk.cmake b/vcpkg/ports/asiosdk/Findasiosdk.cmake new file mode 100644 index 0000000..b8f32f8 --- /dev/null +++ b/vcpkg/ports/asiosdk/Findasiosdk.cmake @@ -0,0 +1,37 @@ +if(WIN32) +else(WIN32) + message(FATAL_ERROR "Findasiosdk.cmake: Unsupported platform ${CMAKE_SYSTEM_NAME}" ) +endif(WIN32) + +find_path( + ASIOSDK_ROOT_DIR + asiosdk +) + +if (NOT "${ASIOSDK_ROOT_DIR}" STREQUAL "") + set(ASIOSDK_ROOT_DIR + ${ASIOSDK_ROOT_DIR}/asiosdk + ) +endif() + +find_path(ASIOSDK_INCLUDE_DIR + asio.h + PATHS + ${ASIOSDK_ROOT_DIR}/common +) + + +if (NOT "${ASIOSDK_ROOT_DIR}" STREQUAL "") + set (ASIOSDK_INCLUDE_DIR + ${ASIOSDK_ROOT_DIR}/common + ${ASIOSDK_ROOT_DIR}/host + ${ASIOSDK_ROOT_DIR}/hostpc + ) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(ASIOSDK DEFAULT_MSG ASIOSDK_ROOT_DIR ASIOSDK_INCLUDE_DIR) + +MARK_AS_ADVANCED( + ASIOSDK_ROOT_DIR ASIOSDK_INCLUDE_DIR +) diff --git a/vcpkg/ports/asiosdk/portfile.cmake b/vcpkg/ports/asiosdk/portfile.cmake new file mode 100644 index 0000000..e4ed662 --- /dev/null +++ b/vcpkg/ports/asiosdk/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_fail_port_install(MESSAGE "asiosdk currently only supports Windows platforms" ON_ARCH "arm" "arm64" ON_TARGET "Linux" "OSX" "uwp") + +set(VERSION 2.3.3) + +vcpkg_download_distfile(ARCHIVE + URLS "https://download.steinberg.net/sdk_downloads/asiosdk_2.3.3_2019-06-14.zip" + FILENAME "asiosdk_2.3.3_2019-06-14.zip" + SHA512 65d6f2fa4f0e23939fcdf46ff3b04760089c0f14e2ac3e37e63cbf6733f3acc93ab930ea9e3f1eb60483d4654f7ba4699ed506531074c4f55e763ad92736c231 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${VERSION} +) + +file(INSTALL ${SOURCE_PATH}/asio/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/asiosdk/asio) +file(INSTALL ${SOURCE_PATH}/common/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/asiosdk/common) +file(INSTALL ${SOURCE_PATH}/driver/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/asiosdk/driver) +file(INSTALL ${SOURCE_PATH}/host/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/asiosdk/host) +file(INSTALL ${SOURCE_PATH}/readme.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/asiosdk) +file(INSTALL ${SOURCE_PATH}/readme.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/asiosdk RENAME copyright) +file(INSTALL ${SOURCE_PATH}/changes.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/asiosdk) +file(INSTALL "${SOURCE_PATH}/Steinberg ASIO Logo Artwork.zip" DESTINATION ${CURRENT_PACKAGES_DIR}/share/asiosdk) +file(INSTALL "${SOURCE_PATH}/Steinberg ASIO Licensing Agreement.pdf" DESTINATION ${CURRENT_PACKAGES_DIR}/share/asiosdk) +file(INSTALL "${SOURCE_PATH}/ASIO SDK 2.3.pdf" DESTINATION ${CURRENT_PACKAGES_DIR}/share/asiosdk) + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/Findasiosdk.cmake" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + diff --git a/vcpkg/ports/asiosdk/usage b/vcpkg/ports/asiosdk/usage new file mode 100644 index 0000000..1afa2ae --- /dev/null +++ b/vcpkg/ports/asiosdk/usage @@ -0,0 +1,4 @@ +The package asiosdk provides CMake integration: + + find_package(asiosdk REQUIRED) + target_include_directories( PRIVATE ${ASIOSDK_INCLUDE_DIRS}) diff --git a/vcpkg/ports/asiosdk/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/asiosdk/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..df14d7c --- /dev/null +++ b/vcpkg/ports/asiosdk/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,6 @@ +set(ASIOSDK_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${ASIOSDK_PREV_MODULE_PATH}) diff --git a/vcpkg/ports/asmjit/CONTROL b/vcpkg/ports/asmjit/CONTROL new file mode 100644 index 0000000..44cc2e5 --- /dev/null +++ b/vcpkg/ports/asmjit/CONTROL @@ -0,0 +1,5 @@ +Source: asmjit +Version: 2020-09-14 +Homepage: https://github.com/asmjit/asmjit +Description: Complete x86/x64 JIT and Remote Assembler for C++ +Supports: !arm diff --git a/vcpkg/ports/asmjit/portfile.cmake b/vcpkg/ports/asmjit/portfile.cmake new file mode 100644 index 0000000..a33a61c --- /dev/null +++ b/vcpkg/ports/asmjit/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_fail_port_install(ON_ARCH "arm") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO asmjit/asmjit + REF 5bc166efdb419f88bd5b5774c62cfc4d08a0bfa4 # accessed on 2020-09-14 + SHA512 6e31617e62dccbec5fa4d8aeacb1076167f870578a0dd2915403d414f8fcaab16692968287f912dc41a2ec7d10a343d5b687144f04d2ec7adb2880044752543c + HEAD_REF master +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(ASMJIT_STATIC 1) +else() + set(ASMJIT_STATIC 0) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DASMJIT_STATIC=${ASMJIT_STATIC} + ) + + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/asmjit) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/assimp/CONTROL b/vcpkg/ports/assimp/CONTROL new file mode 100644 index 0000000..827cead --- /dev/null +++ b/vcpkg/ports/assimp/CONTROL @@ -0,0 +1,6 @@ +Source: assimp +Version: 5.0.1 +Port-Version: 2 +Homepage: https://github.com/assimp/assimp +Description: The Open Asset import library +Build-Depends: zlib, rapidjson, minizip, stb, kubazip, irrlicht, polyclipping, utfcpp, poly2tri diff --git a/vcpkg/ports/assimp/build_fixes.patch b/vcpkg/ports/assimp/build_fixes.patch new file mode 100644 index 0000000..ed7bcfa --- /dev/null +++ b/vcpkg/ports/assimp/build_fixes.patch @@ -0,0 +1,628 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dcafb64..4b131cc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -130,6 +130,17 @@ OPTION ( IGNORE_GIT_HASH + OFF + ) + ++find_package(Stb REQUIRED) ++include_directories(${Stb_INCLUDE_DIR}) ++find_package(irrXML CONFIG REQUIRED) ++find_path(UTF8_INCLUDE_DIRS "utf8.h") ++include_directories(${UTF8_INCLUDE_DIRS}) ++find_package(RapidJSON CONFIG REQUIRED) ++include_directories(${RAPIDJSON_INCLUDE_DIRS}) ++find_path(UNZIP_INCLUDE_DIRS "minizip/unzip.h") ++include_directories(${UNZIP_INCLUDE_DIRS}/minizip) ++include_directories(${CMAKE_CURRENT_SOURCE_DIR}/contrib) ++ + IF (IOS AND NOT HUNTER_ENABLED) + IF (NOT CMAKE_BUILD_TYPE) + SET(CMAKE_BUILD_TYPE "Release") +@@ -230,10 +241,8 @@ SET(LIBASSIMP-DEV_COMPONENT "libassimp${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_M + SET(CPACK_COMPONENTS_ALL assimp-bin ${LIBASSIMP_COMPONENT} ${LIBASSIMP-DEV_COMPONENT} assimp-dev) + SET(ASSIMP_LIBRARY_SUFFIX "" CACHE STRING "Suffix to append to library names") + +-IF( UNIX ) + # Use GNUInstallDirs for Unix predefined directories + INCLUDE(GNUInstallDirs) +-ENDIF( UNIX ) + + # Grouped compiler settings + IF ((CMAKE_C_COMPILER_ID MATCHES "GNU") AND NOT CMAKE_COMPILER_IS_MINGW) +@@ -253,7 +262,7 @@ ELSEIF(MSVC) + IF(MSVC12) + ADD_COMPILE_OPTIONS(/wd4351) + ENDIF() +- SET(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /MDd /Ob2 /DEBUG:FULL /Zi") ++# SET(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /MDd /Ob2 /DEBUG:FULL /Zi") + ELSEIF ( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" ) + IF(NOT HUNTER_ENABLED) + SET(CMAKE_CXX_FLAGS "-fPIC -std=c++11 ${CMAKE_CXX_FLAGS}") +@@ -352,35 +361,17 @@ IF (NOT TARGET uninstall) + ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") + ENDIF() + +-IF(HUNTER_ENABLED) +- set(CONFIG_INSTALL_DIR "lib/cmake/${PROJECT_NAME}") ++ set(CONFIG_INSTALL_DIR "share/assimp") + set(INCLUDE_INSTALL_DIR "include") + +- set(GENERATED_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated") +- +- # Configuration +- set(VERSION_CONFIG "${GENERATED_DIR}/${PROJECT_NAME}ConfigVersion.cmake") +- set(PROJECT_CONFIG "${GENERATED_DIR}/${PROJECT_NAME}Config.cmake") +- set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets") +- set(NAMESPACE "${PROJECT_NAME}::") ++ set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Config") ++ set(NAMESPACE "assimp::") + + # Include module with fuction 'write_basic_package_version_file' + include(CMakePackageConfigHelpers) + +- # Note: PROJECT_VERSION is used as a VERSION +- write_basic_package_version_file("${VERSION_CONFIG}" COMPATIBILITY SameMajorVersion) +- +- # Use variables: +- # * TARGETS_EXPORT_NAME +- # * PROJECT_NAME +- configure_package_config_file( +- "cmake/assimp-hunter-config.cmake.in" +- "${PROJECT_CONFIG}" +- INSTALL_DESTINATION "${CONFIG_INSTALL_DIR}" +- ) +- + install( +- FILES "${PROJECT_CONFIG}" "${VERSION_CONFIG}" ++ FILES ${VERSION_CONFIG} + DESTINATION "${CONFIG_INSTALL_DIR}" + ) + +@@ -389,30 +380,6 @@ IF(HUNTER_ENABLED) + NAMESPACE "${NAMESPACE}" + DESTINATION "${CONFIG_INSTALL_DIR}" + ) +-ELSE(HUNTER_ENABLED) +- # cmake configuration files +- CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimp-config.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimp-config.cmake" @ONLY IMMEDIATE) +- CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimpTargets.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets.cmake" @ONLY IMMEDIATE) +- IF (is_multi_config) +- CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimpTargets-debug.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-debug.cmake" @ONLY IMMEDIATE) +- CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimpTargets-release.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-release.cmake" @ONLY IMMEDIATE) +- SET(PACKAGE_TARGETS_FILE "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-debug.cmake" "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-release.cmake") +- ELSEIF (CMAKE_BUILD_TYPE STREQUAL Debug) +- CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimpTargets-debug.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-debug.cmake" @ONLY IMMEDIATE) +- SET(PACKAGE_TARGETS_FILE "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-debug.cmake") +- ELSE() +- CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimpTargets-release.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-release.cmake" @ONLY IMMEDIATE) +- SET(PACKAGE_TARGETS_FILE "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets-release.cmake") +- ENDIF() +- CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/assimp-config-version.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/assimp-config-version.cmake" @ONLY IMMEDIATE) +- #we should generated these scripts after CMake VERSION 3.0.2 using export(EXPORT ...) and write_basic_package_version_file(...) +- INSTALL(FILES +- "${CMAKE_CURRENT_BINARY_DIR}/assimp-config.cmake" +- "${CMAKE_CURRENT_BINARY_DIR}/assimp-config-version.cmake" +- "${CMAKE_CURRENT_BINARY_DIR}/assimpTargets.cmake" +- ${PACKAGE_TARGETS_FILE} +- DESTINATION "${ASSIMP_LIB_INSTALL_DIR}/cmake/assimp-${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}" COMPONENT ${LIBASSIMP-DEV_COMPONENT}) +-ENDIF(HUNTER_ENABLED) + + FIND_PACKAGE( DirectX ) + +@@ -422,63 +389,19 @@ ENDIF( BUILD_DOCS ) + + # Look for system installed irrXML + IF ( SYSTEM_IRRXML ) +- FIND_PACKAGE( IrrXML REQUIRED ) ++ FIND_PACKAGE( irrXML REQUIRED ) + ENDIF( SYSTEM_IRRXML ) + + # Search for external dependencies, and build them from source if not found + # Search for zlib +-IF(HUNTER_ENABLED) +- hunter_add_package(ZLIB) +- find_package(ZLIB CONFIG REQUIRED) ++ find_package(ZLIB REQUIRED) + + add_definitions(-DASSIMP_BUILD_NO_OWN_ZLIB) + set(ZLIB_FOUND TRUE) +- set(ZLIB_LIBRARIES ZLIB::zlib) +- set(ASSIMP_BUILD_MINIZIP TRUE) +-ELSE(HUNTER_ENABLED) +- IF ( NOT ASSIMP_BUILD_ZLIB ) +- FIND_PACKAGE(ZLIB) +- ENDIF( NOT ASSIMP_BUILD_ZLIB ) +- +- IF( NOT ZLIB_FOUND ) +- MESSAGE(STATUS "compiling zlib from sources") +- INCLUDE(CheckIncludeFile) +- INCLUDE(CheckTypeSize) +- INCLUDE(CheckFunctionExists) +- +- # Explicitly turn off ASM686 and AMD64 cmake options. +- # The AMD64 option causes a build failure on MSVC and the ASM builds seem to have problems: +- # https://github.com/madler/zlib/issues/41#issuecomment-125848075 +- # Also prevents these options from "polluting" the cmake options if assimp is being +- # included as a submodule. +- set( ASM686 FALSE CACHE INTERNAL "Override ZLIB flag to turn off assembly" FORCE ) +- set( AMD64 FALSE CACHE INTERNAL "Override ZLIB flag to turn off assembly" FORCE ) +- +- # compile from sources +- ADD_SUBDIRECTORY(contrib/zlib) +- SET(ZLIB_FOUND 1) +- SET(ZLIB_LIBRARIES zlibstatic) +- SET(ZLIB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/contrib/zlib ${CMAKE_CURRENT_BINARY_DIR}/contrib/zlib) +- # need to ensure we don't link with system zlib or minizip as well. +- SET(ASSIMP_BUILD_MINIZIP 1) +- ELSE(NOT ZLIB_FOUND) +- ADD_DEFINITIONS(-DASSIMP_BUILD_NO_OWN_ZLIB) +- SET(ZLIB_LIBRARIES_LINKED -lz) +- ENDIF(NOT ZLIB_FOUND) ++ set(ZLIB_LIBRARIES ZLIB::ZLIB) + INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) +-ENDIF(HUNTER_ENABLED) + +-IF( NOT IOS ) +- IF( NOT ASSIMP_BUILD_MINIZIP ) +- use_pkgconfig(UNZIP minizip) +- ENDIF( NOT ASSIMP_BUILD_MINIZIP ) +-ELSE ( NOT IOS ) +- IF( NOT BUILD_SHARED_LIBS ) +- IF( NOT ASSIMP_BUILD_MINIZIP ) +- use_pkgconfig(UNZIP minizip) +- ENDIF( NOT ASSIMP_BUILD_MINIZIP ) +- ENDIF ( NOT BUILD_SHARED_LIBS ) +-ENDIF ( NOT IOS ) ++ find_package(minizip CONFIG REQUIRED) + + IF ( ASSIMP_NO_EXPORT ) + ADD_DEFINITIONS( -DASSIMP_BUILD_NO_EXPORT) +@@ -633,7 +556,7 @@ IF(CMAKE_CPACK_COMMAND AND UNIX AND ASSIMP_OPT_BUILD_PACKAGES) + INCLUDE(DebSourcePPA) + ENDIF() + +-if(WIN32) ++if(0) + if (CMAKE_SIZEOF_VOID_P EQUAL 8) + SET(BIN_DIR "${PROJECT_SOURCE_DIR}/bin64/") + SET(LIB_DIR "${PROJECT_SOURCE_DIR}/lib64/") +@@ -677,4 +600,4 @@ if(WIN32) + ADD_CUSTOM_COMMAND(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb VERBATIM) + ENDIF() + ENDIF(MSVC12 OR MSVC14 OR MSVC15 ) +-ENDIF (WIN32) ++ENDIF (0) +diff --git a/assimpTargets.cmake.in b/assimpTargets.cmake.in +index ab1a8d2..4b0729b 100644 +--- a/assimpTargets.cmake.in ++++ b/assimpTargets.cmake.in +@@ -5,6 +5,8 @@ if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) + endif() + cmake_policy(PUSH) + cmake_policy(VERSION 2.6) ++# Required for the evaluation of "if(@BUILD_SHARED_LIBS@)" below to function ++cmake_policy(SET CMP0012 NEW) + #---------------------------------------------------------------- + # Generated CMake target import file. + #---------------------------------------------------------------- +diff --git a/code/3MF/D3MFExporter.cpp b/code/3MF/D3MFExporter.cpp +index 1f388ad..1ccd2aa 100644 +--- a/code/3MF/D3MFExporter.cpp ++++ b/code/3MF/D3MFExporter.cpp +@@ -58,7 +58,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #ifdef ASSIMP_USE_HUNTER + # include + #else +-# include ++# include + #endif + + namespace Assimp { +@@ -255,7 +255,7 @@ void D3MFExporter::writeBaseMaterials() { + hexDiffuseColor.clear(); + tmp.clear(); + hexDiffuseColor = "#"; +- ++ + tmp = DecimalToHexa( color.r ); + hexDiffuseColor += tmp; + tmp = DecimalToHexa( color.g ); +diff --git a/code/Blender/BlenderTessellator.h b/code/Blender/BlenderTessellator.h +index 518e56c..ec4a653 100644 +--- a/code/Blender/BlenderTessellator.h ++++ b/code/Blender/BlenderTessellator.h +@@ -147,7 +147,7 @@ namespace Assimp + #ifdef ASSIMP_USE_HUNTER + # include + #else +-# include "../contrib/poly2tri/poly2tri/poly2tri.h" ++# include + #endif + + namespace Assimp +diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt +index 55538d9..4f9b479 100644 +--- a/code/CMakeLists.txt ++++ b/code/CMakeLists.txt +@@ -862,89 +862,24 @@ SET( Extra_SRCS + SOURCE_GROUP( Extra FILES ${Extra_SRCS}) + + # irrXML +-IF(HUNTER_ENABLED) +- hunter_add_package(irrXML) + find_package(irrXML CONFIG REQUIRED) +-ELSE(HUNTER_ENABLED) +- # irrXML already included in contrib directory by parent CMakeLists.txt. +-ENDIF(HUNTER_ENABLED) +- +-# utf8 +-IF(HUNTER_ENABLED) +- hunter_add_package(utf8) +- find_package(utf8 CONFIG REQUIRED) +-ELSE(HUNTER_ENABLED) +- # utf8 is header-only, so Assimp doesn't need to do anything. +-ENDIF(HUNTER_ENABLED) + + # polyclipping +-IF(HUNTER_ENABLED) +- hunter_add_package(polyclipping) + find_package(polyclipping CONFIG REQUIRED) +-ELSE(HUNTER_ENABLED) + SET( Clipper_SRCS + ../contrib/clipper/clipper.hpp + ../contrib/clipper/clipper.cpp + ) + SOURCE_GROUP( Contrib\\Clipper FILES ${Clipper_SRCS}) +-ENDIF(HUNTER_ENABLED) + + # poly2tri +-IF(HUNTER_ENABLED) +- hunter_add_package(poly2tri) + find_package(poly2tri CONFIG REQUIRED) +-ELSE(HUNTER_ENABLED) +- SET( Poly2Tri_SRCS +- ../contrib/poly2tri/poly2tri/common/shapes.cc +- ../contrib/poly2tri/poly2tri/common/shapes.h +- ../contrib/poly2tri/poly2tri/common/utils.h +- ../contrib/poly2tri/poly2tri/sweep/advancing_front.h +- ../contrib/poly2tri/poly2tri/sweep/advancing_front.cc +- ../contrib/poly2tri/poly2tri/sweep/cdt.cc +- ../contrib/poly2tri/poly2tri/sweep/cdt.h +- ../contrib/poly2tri/poly2tri/sweep/sweep.cc +- ../contrib/poly2tri/poly2tri/sweep/sweep.h +- ../contrib/poly2tri/poly2tri/sweep/sweep_context.cc +- ../contrib/poly2tri/poly2tri/sweep/sweep_context.h +- ) +- SOURCE_GROUP( Contrib\\Poly2Tri FILES ${Poly2Tri_SRCS}) +-ENDIF(HUNTER_ENABLED) + + # minizip/unzip +-IF(HUNTER_ENABLED) +- hunter_add_package(minizip) + find_package(minizip CONFIG REQUIRED) +-ELSE(HUNTER_ENABLED) +- SET( unzip_SRCS +- ../contrib/unzip/crypt.h +- ../contrib/unzip/ioapi.c +- ../contrib/unzip/ioapi.h +- ../contrib/unzip/unzip.c +- ../contrib/unzip/unzip.h +- ) +- SOURCE_GROUP(Contrib\\unzip FILES ${unzip_SRCS}) +-ENDIF(HUNTER_ENABLED) + + # zip (https://github.com/kuba--/zip) +-IF(HUNTER_ENABLED) +- hunter_add_package(zip) +- find_package(zip CONFIG REQUIRED) +-ELSE(HUNTER_ENABLED) +- SET( ziplib_SRCS +- ../contrib/zip/src/miniz.h +- ../contrib/zip/src/zip.c +- ../contrib/zip/src/zip.h +- ) +- +- # TODO if cmake required version has been updated to >3.12.0, collapse this to the second case only +- if(${CMAKE_VERSION} VERSION_LESS "3.12.0") +- add_definitions(-DMINIZ_USE_UNALIGNED_LOADS_AND_STORES=0) +- else() +- add_compile_definitions(MINIZ_USE_UNALIGNED_LOADS_AND_STORES=0) +- endif() +- +- SOURCE_GROUP( ziplib FILES ${ziplib_SRCS} ) +-ENDIF(HUNTER_ENABLED) ++ find_package(kubazip CONFIG REQUIRED) + + # openddlparser + IF(HUNTER_ENABLED) +@@ -1021,13 +956,7 @@ ELSE () + ENDIF () + + # RapidJSON +-IF(HUNTER_ENABLED) +- hunter_add_package(RapidJSON) + find_package(RapidJSON CONFIG REQUIRED) +-ELSE(HUNTER_ENABLED) +- INCLUDE_DIRECTORIES( "../contrib/rapidjson/include" ) +- INCLUDE_DIRECTORIES( "../contrib" ) +-ENDIF(HUNTER_ENABLED) + + # VC2010 fixes + if(MSVC10) +@@ -1044,15 +973,6 @@ if ( MSVC ) + ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS ) + endif ( MSVC ) + +-IF(NOT HUNTER_ENABLED) +- if (UNZIP_FOUND) +- SET (unzip_compile_SRCS "") +- else (UNZIP_FOUND) +- SET (unzip_compile_SRCS ${unzip_SRCS}) +- INCLUDE_DIRECTORIES( "../contrib/unzip/" ) +- endif (UNZIP_FOUND) +-ENDIF(NOT HUNTER_ENABLED) +- + MESSAGE(STATUS "Enabled importer formats:${ASSIMP_IMPORTERS_ENABLED}") + MESSAGE(STATUS "Disabled importer formats:${ASSIMP_IMPORTERS_DISABLED}") + +@@ -1111,22 +1031,14 @@ TARGET_INCLUDE_DIRECTORIES ( assimp PUBLIC + $ + ) + +-IF(HUNTER_ENABLED) + TARGET_LINK_LIBRARIES(assimp +- PUBLIC + polyclipping::polyclipping + irrXML::irrXML +- openddlparser::openddl_parser +- poly2tri::poly2tri + minizip::minizip +- ZLIB::zlib +- RapidJSON::rapidjson +- utf8::utf8 +- zip::zip ++ ZLIB::ZLIB ++ kubazip::kubazip ++ poly2tri::poly2tri + ) +-ELSE(HUNTER_ENABLED) +- TARGET_LINK_LIBRARIES(assimp ${ZLIB_LIBRARIES} ${OPENDDL_PARSER_LIBRARIES} ${IRRXML_LIBRARY} ) +-ENDIF(HUNTER_ENABLED) + + if(ASSIMP_ANDROID_JNIIOSYSTEM) + set(ASSIMP_ANDROID_JNIIOSYSTEM_PATH port/AndroidJNI) +@@ -1208,21 +1121,12 @@ ENDIF(APPLE) + + # Build against external unzip, or add ../contrib/unzip so + # assimp can #include "unzip.h" +-IF(NOT HUNTER_ENABLED) +- if (UNZIP_FOUND) +- INCLUDE_DIRECTORIES(${UNZIP_INCLUDE_DIRS}) +- TARGET_LINK_LIBRARIES(assimp ${UNZIP_LIBRARIES}) +- else (UNZIP_FOUND) +- INCLUDE_DIRECTORIES("../") +- endif (UNZIP_FOUND) +-ENDIF(NOT HUNTER_ENABLED) + + # Add RT-extension library for glTF importer with Open3DGC-compression. + IF (RT_FOUND AND ASSIMP_IMPORTER_GLTF_USE_OPEN3DGC) + TARGET_LINK_LIBRARIES(assimp ${RT_LIBRARY}) + ENDIF (RT_FOUND AND ASSIMP_IMPORTER_GLTF_USE_OPEN3DGC) + +-IF(HUNTER_ENABLED) + INSTALL( TARGETS assimp + EXPORT "${TARGETS_EXPORT_NAME}" + LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR} +@@ -1231,14 +1135,6 @@ IF(HUNTER_ENABLED) + FRAMEWORK DESTINATION ${ASSIMP_LIB_INSTALL_DIR} + COMPONENT ${LIBASSIMP_COMPONENT} + INCLUDES DESTINATION "include") +-ELSE(HUNTER_ENABLED) +-INSTALL( TARGETS assimp +- LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR} +- ARCHIVE DESTINATION ${ASSIMP_LIB_INSTALL_DIR} +- RUNTIME DESTINATION ${ASSIMP_BIN_INSTALL_DIR} +- FRAMEWORK DESTINATION ${ASSIMP_LIB_INSTALL_DIR} +- COMPONENT ${LIBASSIMP_COMPONENT}) +-ENDIF(HUNTER_ENABLED) + INSTALL( FILES ${PUBLIC_HEADERS} DESTINATION ${ASSIMP_INCLUDE_INSTALL_DIR}/assimp COMPONENT assimp-dev) + INSTALL( FILES ${COMPILER_HEADERS} DESTINATION ${ASSIMP_INCLUDE_INSTALL_DIR}/assimp/Compiler COMPONENT assimp-dev) + +diff --git a/code/Common/BaseImporter.cpp b/code/Common/BaseImporter.cpp +index b77bbfe..51cba43 100644 +--- a/code/Common/BaseImporter.cpp ++++ b/code/Common/BaseImporter.cpp +@@ -344,7 +344,7 @@ std::string BaseImporter::GetExtension( const std::string& file ) { + #ifdef ASSIMP_USE_HUNTER + # include + #else +-# include "../contrib/utf8cpp/source/utf8.h" ++# include + #endif + + // ------------------------------------------------------------------------------------------------ +@@ -364,8 +364,8 @@ void BaseImporter::ConvertToUTF8(std::vector& data) + data.resize(data.size()-3); + return; + } +- +- ++ ++ + // UTF 32 BE with BOM + if(*((uint32_t*)&data.front()) == 0xFFFE0000) { + +@@ -507,7 +507,7 @@ struct Assimp::BatchData { + , next_id(0xffff) + , validate( validate ) { + ai_assert( nullptr != pIO ); +- ++ + pImporter = new Importer(); + pImporter->SetIOHandler( pIO ); + } +diff --git a/code/Importer/IFC/IFCGeometry.cpp b/code/Importer/IFC/IFCGeometry.cpp +index d1c7aee..8e11373 100644 +--- a/code/Importer/IFC/IFCGeometry.cpp ++++ b/code/Importer/IFC/IFCGeometry.cpp +@@ -51,9 +51,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + #ifdef ASSIMP_USE_HUNTER + # include +-# include ++# include "../contrib/clipper/clipper.hpp" + #else +-# include "../contrib/poly2tri/poly2tri/poly2tri.h" ++# include + # include "../contrib/clipper/clipper.hpp" + #endif + +diff --git a/code/Importer/IFC/IFCOpenings.cpp b/code/Importer/IFC/IFCOpenings.cpp +index d6c40b3..387c625 100644 +--- a/code/Importer/IFC/IFCOpenings.cpp ++++ b/code/Importer/IFC/IFCOpenings.cpp +@@ -51,9 +51,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + #ifdef ASSIMP_USE_HUNTER + # include +-# include ++# include "../contrib/clipper/clipper.hpp" + #else +-# include "../contrib/poly2tri/poly2tri/poly2tri.h" ++# include + # include "../contrib/clipper/clipper.hpp" + #endif + +@@ -911,14 +911,14 @@ size_t CloseWindows(ContourVector& contours, + // compare base poly normal and contour normal to detect if we need to reverse the face winding + if(curmesh.mVertcnt.size() > 0) { + IfcVector3 basePolyNormal = TempMesh::ComputePolygonNormal(curmesh.mVerts.data(), curmesh.mVertcnt.front()); +- ++ + std::vector worldSpaceContourVtx(it->contour.size()); +- ++ + for(size_t a = 0; a < it->contour.size(); ++a) + worldSpaceContourVtx[a] = minv * IfcVector3(it->contour[a].x, it->contour[a].y, 0.0); +- ++ + IfcVector3 contourNormal = TempMesh::ComputePolygonNormal(worldSpaceContourVtx.data(), worldSpaceContourVtx.size()); +- ++ + reverseCountourFaces = (contourNormal * basePolyNormal) > 0.0; + } + +diff --git a/code/Importer/STEPParser/STEPFileEncoding.cpp b/code/Importer/STEPParser/STEPFileEncoding.cpp +index 101dcdf..3f12403 100644 +--- a/code/Importer/STEPParser/STEPFileEncoding.cpp ++++ b/code/Importer/STEPParser/STEPFileEncoding.cpp +@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #ifdef ASSIMP_USE_HUNTER + # include + #else +-# include ++# include + #endif + + #include +diff --git a/code/MMD/MMDPmxParser.cpp b/code/MMD/MMDPmxParser.cpp +index 80f0986..47725e2 100644 +--- a/code/MMD/MMDPmxParser.cpp ++++ b/code/MMD/MMDPmxParser.cpp +@@ -45,7 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #ifdef ASSIMP_USE_HUNTER + # include + #else +-# include "../contrib/utf8cpp/source/utf8.h" ++# include + #endif + #include + +@@ -102,7 +102,7 @@ namespace pmx + const unsigned int targetSize = size * 3; // enough to encode + char *targetStart = new char[targetSize]; + std::memset(targetStart, 0, targetSize * sizeof(char)); +- ++ + utf8::utf16to8( sourceStart, sourceStart + size/2, targetStart ); + + std::string result(targetStart); +diff --git a/code/SIB/SIBImporter.cpp b/code/SIB/SIBImporter.cpp +index 20cdc80..46e9a32 100644 +--- a/code/SIB/SIBImporter.cpp ++++ b/code/SIB/SIBImporter.cpp +@@ -63,7 +63,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # include + #else + //# include "../contrib/ConvertUTF/ConvertUTF.h" +-# include "../contrib/utf8cpp/source/utf8.h" ++# include + #endif + #include + #include +@@ -90,10 +90,10 @@ struct SIBChunk { + uint32_t Size; + } PACK_STRUCT; + +-enum { +- POS, +- NRM, +- UV, ++enum { ++ POS, ++ NRM, ++ UV, + N + }; + +diff --git a/code/X3D/FIReader.cpp b/code/X3D/FIReader.cpp +index 9bb2c69..525a084 100644 +--- a/code/X3D/FIReader.cpp ++++ b/code/X3D/FIReader.cpp +@@ -63,7 +63,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #ifdef ASSIMP_USE_HUNTER + # include + #else +-# include "../contrib/utf8cpp/source/utf8.h" ++# include + #endif + #include + #include +diff --git a/contrib/clipper/clipper.hpp b/contrib/clipper/clipper.hpp +index 7cdac6c..2728425 100644 +--- a/contrib/clipper/clipper.hpp ++++ b/contrib/clipper/clipper.hpp +@@ -302,5 +302,3 @@ class clipperException : public std::exception + } //ClipperLib namespace + + #endif //clipper_hpp +- +- +diff --git a/contrib/zip/src/miniz.h b/contrib/zip/src/miniz.h +index 2c27a94..8390dfd 100644 +--- a/contrib/zip/src/miniz.h ++++ b/contrib/zip/src/miniz.h +@@ -5944,7 +5944,7 @@ mz_bool mz_zip_writer_add_file(mz_zip_archive *pZip, const char *pArchive_name, + const char *pSrc_filename, const void *pComment, + mz_uint16 comment_size, mz_uint level_and_flags, + mz_uint32 ext_attributes) { +- mz_uint uncomp_crc32 = MZ_CRC32_INIT, level, num_alignment_padding_bytes; ++ mz_uint uncomp_crc32 = MZ_CRC32_INIT, level=0, num_alignment_padding_bytes; + mz_uint16 method = 0, dos_time = 0, dos_date = 0; + time_t file_modified_time; + mz_uint64 local_dir_header_ofs, cur_archive_file_ofs, uncomp_size = 0, +diff --git a/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp b/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp +index 8d25aaa..e4bc306 100644 +--- a/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp ++++ b/samples/SimpleTexturedOpenGL/SimpleTexturedOpenGL/src/model_loading.cpp +@@ -19,7 +19,7 @@ + #include + + #define STB_IMAGE_IMPLEMENTATION +-#include "contrib/stb_image/stb_image.h" ++#include + + #include + diff --git a/vcpkg/ports/assimp/irrlicht.patch b/vcpkg/ports/assimp/irrlicht.patch new file mode 100644 index 0000000..02d521d --- /dev/null +++ b/vcpkg/ports/assimp/irrlicht.patch @@ -0,0 +1,82 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2ec072d..3c8b5ab 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -132,7 +132,6 @@ OPTION ( IGNORE_GIT_HASH + + find_package(Stb REQUIRED) + include_directories(${Stb_INCLUDE_DIR}) +-find_package(irrXML CONFIG REQUIRED) + find_path(UTF8_INCLUDE_DIRS "utf8.h") + include_directories(${UTF8_INCLUDE_DIRS}) + find_package(RapidJSON CONFIG REQUIRED) +@@ -389,7 +388,7 @@ ENDIF( BUILD_DOCS ) + + # Look for system installed irrXML + IF ( SYSTEM_IRRXML ) +- FIND_PACKAGE( irrXML REQUIRED ) ++ FIND_PACKAGE( irrlicht CONFIG REQUIRED ) + ENDIF( SYSTEM_IRRXML ) + + # Search for external dependencies, and build them from source if not found +diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt +index 17fcea7..f08f59f 100644 +--- a/code/CMakeLists.txt ++++ b/code/CMakeLists.txt +@@ -862,7 +862,7 @@ SET( Extra_SRCS + SOURCE_GROUP( Extra FILES ${Extra_SRCS}) + + # irrXML +- find_package(irrXML CONFIG REQUIRED) ++ find_package(irrlicht CONFIG REQUIRED) + + # polyclipping + find_package(polyclipping CONFIG REQUIRED) +@@ -1033,7 +1033,7 @@ TARGET_INCLUDE_DIRECTORIES ( assimp PUBLIC + + TARGET_LINK_LIBRARIES(assimp + polyclipping::polyclipping +- irrXML::irrXML ++ Irrlicht + minizip::minizip + ZLIB::ZLIB + kubazip::kubazip +diff --git a/code/X3D/FIReader.cpp b/code/X3D/FIReader.cpp +index 31d9aba..2c96052 100644 +--- a/code/X3D/FIReader.cpp ++++ b/code/X3D/FIReader.cpp +@@ -654,8 +654,8 @@ public: + return currentNodeType; + } + +- virtual int getAttributeCount() const /*override*/ { +- return static_cast(attributes.size()); ++ virtual unsigned int getAttributeCount() const /*override*/ { ++ return static_cast(attributes.size()); + } + + virtual const char* getAttributeName(int idx) const /*override*/ { +@@ -1733,7 +1733,7 @@ public: + return reader->getNodeType(); + } + +- virtual int getAttributeCount() const /*override*/ { ++ virtual unsigned int getAttributeCount() const /*override*/ { + return reader->getAttributeCount(); + } + +diff --git a/include/assimp/irrXMLWrapper.h b/include/assimp/irrXMLWrapper.h +index 77cfd5e..ba584a0 100644 +--- a/include/assimp/irrXMLWrapper.h ++++ b/include/assimp/irrXMLWrapper.h +@@ -133,8 +133,8 @@ public: + + // ---------------------------------------------------------------------------------- + //! Returns size of file in bytes +- virtual int getSize() { +- return (int)data.size(); ++ virtual long getSize() const override { ++ return (long)data.size(); + } + + private: diff --git a/vcpkg/ports/assimp/portfile.cmake b/vcpkg/ports/assimp/portfile.cmake new file mode 100644 index 0000000..7070921 --- /dev/null +++ b/vcpkg/ports/assimp/portfile.cmake @@ -0,0 +1,63 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO assimp/assimp + REF 8f0c6b04b2257a520aaab38421b2e090204b69df # v5.0.1 + SHA512 59b213428e2f7494cb5da423e6b2d51556318f948b00cea420090d74d4f5f0f8970d38dba70cd47b2ef35a1f57f9e15df8597411b6cd8732b233395080147c0f + HEAD_REF master + PATCHES + build_fixes.patch + irrlicht.patch +) + +file(REMOVE ${SOURCE_PATH}/cmake-modules/FindZLIB.cmake) +file(REMOVE ${SOURCE_PATH}/cmake-modules/FindIrrXML.cmake) +#file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/clipper) # https://github.com/assimp/assimp/issues/788 +file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/poly2tri) +file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/zlib) +file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/gtest) +file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/irrXML) +file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/rapidjson) +file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/stb_image) +file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/zip) +file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/unzip) +file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/utf8cpp) +#file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/Open3DGC) #TODO +#file(REMOVE_RECURSE ${SOURCE_PATH}/contrib/openddlparser) #TODO + +set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS") +set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS") + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ASSIMP_BUILD_SHARED_LIBS) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DASSIMP_BUILD_TESTS=OFF + -DASSIMP_BUILD_ASSIMP_VIEW=OFF + -DASSIMP_BUILD_ZLIB=OFF + -DASSIMP_BUILD_SHARED_LIBS=${ASSIMP_BUILD_SHARED_LIBS} + -DASSIMP_BUILD_ASSIMP_TOOLS=OFF + -DASSIMP_INSTALL_PDB=OFF + -DSYSTEM_IRRXML=ON + -DIGNORE_GIT_HASH=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() +vcpkg_copy_pdbs() + +file(READ ${CURRENT_PACKAGES_DIR}/share/assimp/AssimpConfig.cmake ASSIMP_CONFIG) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/assimp/AssimpConfig.cmake " +include(CMakeFindDependencyMacro) +find_dependency(ZLIB) +find_dependency(irrlicht CONFIG) +find_dependency(polyclipping CONFIG) +find_dependency(minizip CONFIG) +find_dependency(kubazip CONFIG) +find_dependency(poly2tri CONFIG) +${ASSIMP_CONFIG}") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/asynch/CONTROL b/vcpkg/ports/asynch/CONTROL new file mode 100644 index 0000000..2187be4 --- /dev/null +++ b/vcpkg/ports/asynch/CONTROL @@ -0,0 +1,4 @@ +Source: asynch +Version: 2019-09-21-1 +Homepage: https://github.com/naasking/async.h +Description: Async.h - asynchronous, stackless subroutines. \ No newline at end of file diff --git a/vcpkg/ports/asynch/portfile.cmake b/vcpkg/ports/asynch/portfile.cmake new file mode 100644 index 0000000..7625b95 --- /dev/null +++ b/vcpkg/ports/asynch/portfile.cmake @@ -0,0 +1,15 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO naasking/async.h + REF 080cbb257ab60ad06008c574d7feb94f8478efdd #Commits on Sep 21, 2019 + SHA512 4fe0229ffd8b3c6438294a419ccb213b4d28a0a04d834406b67120e9bc90d339ec91f3b3eb52d4e27c1f12add41e9347bffbea47868b0d7a1da40f784d113c71 + HEAD_REF master +) + +# Copy the single reusable library header +file(COPY ${SOURCE_PATH}/async/async.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/asyncplusplus/CONTROL b/vcpkg/ports/asyncplusplus/CONTROL new file mode 100644 index 0000000..eb82afe --- /dev/null +++ b/vcpkg/ports/asyncplusplus/CONTROL @@ -0,0 +1,3 @@ +Source: asyncplusplus +Version: 1.0-1 +Description: Async++ is a lightweight concurrency framework for C++11 diff --git a/vcpkg/ports/asyncplusplus/portfile.cmake b/vcpkg/ports/asyncplusplus/portfile.cmake new file mode 100644 index 0000000..d348dc8 --- /dev/null +++ b/vcpkg/ports/asyncplusplus/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Amanieu/asyncplusplus + REF v1.0 + SHA512 bb1fc032d2d8de49b4505e0629d48e5cfa99edfcafbf17848f160ceb320bcd993f1549095248d1a0ef8fc1ec07ecbaad6b634a770ddc1974092d373a508a5fe3 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(RENAME ${CURRENT_PACKAGES_DIR}/cmake/Async++.cmake ${CURRENT_PACKAGES_DIR}/cmake/Async++Targets.cmake) + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/async++) + +file(RENAME ${CURRENT_PACKAGES_DIR}/share/async++/Async++Targets.cmake ${CURRENT_PACKAGES_DIR}/share/async++/Async++.cmake) + +file(READ ${CURRENT_PACKAGES_DIR}/share/async++/Async++Config.cmake _contents) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/async++/Async++Config.cmake "include(CMakeFindDependencyMacro)\n${_contents}") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/asyncplusplus) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/asyncplusplus/LICENSE ${CURRENT_PACKAGES_DIR}/share/asyncplusplus/copyright) + +vcpkg_test_cmake(PACKAGE_NAME Async++) diff --git a/vcpkg/ports/atk/CMakeLists.txt b/vcpkg/ports/atk/CMakeLists.txt new file mode 100644 index 0000000..e26d864 --- /dev/null +++ b/vcpkg/ports/atk/CMakeLists.txt @@ -0,0 +1,144 @@ +cmake_minimum_required(VERSION 3.0) +project(atk C) + +set(ATK_LIB_SUFFIX 1.0) +set(ATK_DLL_SUFFIX 1) +set(GLIB_LIB_VERSION 2.0) + +if(BUILD_SHARED_LIBS) + set(ATK_EXPORT_MACRO DLL_EXPORT) +endif() + +# generate atkmarshal.c and atkmarshal.h source files +# glib-genmarshal should be installed along with glib +find_program(GLIB_GENMARSHAL glib-genmarshal PATH_SUFFIXES glib) +file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/atk) + +message("Generating atkmarshal.h: ${GLIB_GENMARSHAL} --prefix=atk_marshal ${CMAKE_CURRENT_SOURCE_DIR}/atk/atkmarshal.list --header") +execute_process( + COMMAND ${GLIB_GENMARSHAL} --prefix=atk_marshal ${CMAKE_CURRENT_SOURCE_DIR}/atk/atkmarshal.list --header + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/atk + OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/atk/atkmarshal.h +) + +message("Generating atkmarshal.c: ${GLIB_GENMARSHAL} --prefix=atk_marshal ${CMAKE_CURRENT_SOURCE_DIR}/atk/atkmarshal.list --body") +execute_process( + COMMAND ${GLIB_GENMARSHAL} --prefix=atk_marshal ${CMAKE_CURRENT_SOURCE_DIR}/atk/atkmarshal.list --body + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/atk + OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/atk/atkmarshal.c +) + +if (WIN32) + configure_file(config.h.win32 ${CMAKE_CURRENT_BINARY_DIR}/config.h COPYONLY) +else() + configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h @ONLY) +endif() +add_definitions(-DHAVE_CONFIG_H) +include_directories(. ./atk ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/atk) + +find_path(GLIB_INCLUDE_DIR glib.h) +find_library(GLIB_GLIB_LIBRARY glib-${GLIB_LIB_VERSION}) +find_library(GLIB_GOBJECT_LIBRARY gobject-${GLIB_LIB_VERSION}) +find_library(GLIB_GMODULE_LIBRARY gmodule-${GLIB_LIB_VERSION}) +set(GLIB_LIBRARIES ${GLIB_GLIB_LIBRARY} ${GLIB_GOBJECT_LIBRARY} ${GLIB_GMODULE_LIBRARY}) + +if (WIN32 OR APPLE) + find_path(LIBINTL_INCLUDE_DIR libintl.h) + find_library(LIBINTL_LIBRARY NAMES libintl intl) +else() + find_package(Intl REQUIRED) + set(LIBINTL_INCLUDE_DIR ${Intl_INCLUDE_DIRS}) + set(LIBINTL_LIBRARY ${Intl_LIBRARIES}) +endif() + +set(ATK_SOURCES + atk/atkaction.c + atk/atkcomponent.c + atk/atkdocument.c + atk/atkeditabletext.c + atk/atkgobjectaccessible.c + atk/atkhyperlink.c + atk/atkhyperlinkimpl.c + atk/atkhypertext.c + atk/atkimage.c + atk/atknoopobject.c + atk/atknoopobjectfactory.c + atk/atkobject.c + atk/atkobjectfactory.c + atk/atkplug.c + atk/atkprivate.c + atk/atkrange.c + atk/atkregistry.c + atk/atkrelation.c + atk/atkrelationset.c + atk/atkselection.c + atk/atksocket.c + atk/atkstate.c + atk/atkstateset.c + atk/atkstreamablecontent.c + atk/atktable.c + atk/atktablecell.c + atk/atktext.c + atk/atkutil.c + atk/atkmisc.c + atk/atkvalue.c + atk/atkversion.c + atk/atkwindow.c + atk/atk-enum-types.c) + +add_library(atk ${ATK_SOURCES}) +target_compile_definitions(atk PRIVATE ATK_COMPILATION ${ATK_EXPORT_MACRO} G_DISABLE_SINGLE_INCLUDES ATK_LOCALEDIR="/dummy/share/locale") +target_link_libraries(atk ${LIBINTL_LIBRARY} ${GLIB_LIBRARIES}) +target_include_directories(atk PRIVATE ${GLIB_INCLUDE_DIR} ${LIBINTL_INCLUDE_DIR}) + +set_target_properties(atk PROPERTIES + OUTPUT_NAME atk-${ATK_DLL_SUFFIX} + ARCHIVE_OUTPUT_NAME atk-${ATK_LIB_SUFFIX}) + +install(TARGETS atk RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) + +if(NOT ATK_SKIP_HEADERS) + install(FILES + atk/atk.h + atk/atkaction.h + atk/atkcomponent.h + atk/atkdocument.h + atk/atkeditabletext.h + atk/atkgobjectaccessible.h + atk/atkhyperlink.h + atk/atkhyperlinkimpl.h + atk/atkhypertext.h + atk/atknoopobject.h + atk/atknoopobjectfactory.h + atk/atkobject.h + atk/atkobjectfactory.h + atk/atkplug.h + atk/atkimage.h + atk/atkrange.h + atk/atkregistry.h + atk/atkrelation.h + atk/atkrelationtype.h + atk/atkrelationset.h + atk/atkselection.h + atk/atksocket.h + atk/atkstate.h + atk/atkstateset.h + atk/atkstreamablecontent.h + atk/atktable.h + atk/atktablecell.h + atk/atktext.h + atk/atkutil.h + atk/atkmisc.h + atk/atkvalue.h + atk/atkwindow.h + atk/atkversion.h + atk/atk-enum-types.h + atk/atkversion.h + DESTINATION include/atk) +endif() + +message(STATUS "Link-time dependencies:") +message(STATUS " " ${LIBINTL_LIBRARY}) +foreach(GL ${GLIB_LIBRARIES}) + message(STATUS " " ${GL}) +endforeach() diff --git a/vcpkg/ports/atk/CONTROL b/vcpkg/ports/atk/CONTROL new file mode 100644 index 0000000..0fa67bf --- /dev/null +++ b/vcpkg/ports/atk/CONTROL @@ -0,0 +1,5 @@ +Source: atk +Version: 2.24.0-5 +Homepage: https://developer.gnome.org/atk/ +Description: GNOME Accessibility Toolkit +Build-Depends: glib, gettext diff --git a/vcpkg/ports/atk/fix-linux-config.patch b/vcpkg/ports/atk/fix-linux-config.patch new file mode 100644 index 0000000..ec6a37a --- /dev/null +++ b/vcpkg/ports/atk/fix-linux-config.patch @@ -0,0 +1,22 @@ +diff --git a/config.h.in b/config.h.in +index b94d23f..a26dac8 100644 +--- a/config.h.in ++++ b/config.h.in +@@ -5,7 +5,7 @@ + #undef ENABLE_NLS + + /* Define the gettext package to be used */ +-#undef GETTEXT_PACKAGE ++#cmakedefine GETTEXT_PACKAGE "@GETTEXT_PACKAGE@" + + /* Define to 1 if you have the `bind_textdomain_codeset' function. */ + #undef HAVE_BIND_TEXTDOMAIN_CODESET +@@ -86,7 +86,7 @@ + #undef STDC_HEADERS + + /* Version number of package */ +-#undef VERSION ++#cmakedefine VERSION @VERSION@ + + /* defines how to decorate public symbols while building */ + #undef _ATK_EXTERN diff --git a/vcpkg/ports/atk/portfile.cmake b/vcpkg/ports/atk/portfile.cmake new file mode 100644 index 0000000..34f6391 --- /dev/null +++ b/vcpkg/ports/atk/portfile.cmake @@ -0,0 +1,35 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) + +set(ATK_VERSION 2.24.0) + +vcpkg_download_distfile(ARCHIVE + URLS "http://ftp.gnome.org/pub/GNOME/sources/atk/2.24/atk-${ATK_VERSION}.tar.xz" + FILENAME "atk-${ATK_VERSION}.tar.xz" + SHA512 3ae0a4d5f28d5619d465135c685161f690732053bcb70a47669c951fbf389b5d2ccc5c7c73d4ee8c5a3b2df14e2f5b082e812a215f10a79b27b412d077f5e962 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + fix-linux-config.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_PROGRAM_PATH=${CURRENT_INSTALLED_DIR}/tools/glib + -DGETTEXT_PACKAGE=atk10 + -DVERSION=10 + OPTIONS_DEBUG + -DATK_SKIP_HEADERS=ON) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/atkmm/CONTROL b/vcpkg/ports/atkmm/CONTROL new file mode 100644 index 0000000..8192383 --- /dev/null +++ b/vcpkg/ports/atkmm/CONTROL @@ -0,0 +1,7 @@ +Source: atkmm +Version: 2.24.2 +Port-Version: 3 +Homepage: https://www.gtkmm.org +Description: atkmm is the official C++ interface for the ATK accessibility toolkit library. It may be used, for instance, by user interfaces implemented with gtkmm. +Build-Depends: glib, gettext, atk, glibmm +Supports: !(linux | osx) diff --git a/vcpkg/ports/atkmm/COPYING b/vcpkg/ports/atkmm/COPYING new file mode 100644 index 0000000..2d2d780 --- /dev/null +++ b/vcpkg/ports/atkmm/COPYING @@ -0,0 +1,510 @@ + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations +below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes a de-facto standard. To achieve this, non-free programs must +be allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control +compilation and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at least + three years, to give the same user the materials specified in + Subsection 6a, above, for a charge no more than the cost of + performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply, and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License +may add an explicit geographical distribution limitation excluding those +countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms +of the ordinary General Public License). + + To apply these terms, attach the following notices to the library. +It is safest to attach them to the start of each source file to most +effectively convey the exclusion of warranty; and each file should +have at least the "copyright" line and a pointer to where the full +notice is found. + + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or +your school, if any, to sign a "copyright disclaimer" for the library, +if necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James + Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/vcpkg/ports/atkmm/fix_charset.patch b/vcpkg/ports/atkmm/fix_charset.patch new file mode 100644 index 0000000..60cd8fb --- /dev/null +++ b/vcpkg/ports/atkmm/fix_charset.patch @@ -0,0 +1,98 @@ +diff --git a/MSVC_Net2013/atkmm.vcxproj b/MSVC_Net2013/atkmm.vcxproj +index 40f21cb..e9f5c5e 100644 +--- a/MSVC_Net2013/atkmm.vcxproj ++++ b/MSVC_Net2013/atkmm.vcxproj +@@ -22,21 +22,22 @@ + atkmm + {9FE0D5A6-458C-45C7-B954-2C3C1E6196C2} + Win32Proj ++ 8.1 + + + + DynamicLibrary +- MultiByte ++ Unicode + v120 + + + DynamicLibrary +- MultiByte ++ Unicode + v120 + + + DynamicLibrary +- MultiByte ++ Unicode + v120 + + +diff --git a/MSVC_Net2013/gendef.vcxproj b/MSVC_Net2013/gendef.vcxproj +index d6f2798..aab7023 100644 +--- a/MSVC_Net2013/gendef.vcxproj ++++ b/MSVC_Net2013/gendef.vcxproj +@@ -21,21 +21,22 @@ + + {07324745-C9BE-4D65-B08A-9C88188C0C28} + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +diff --git a/MSVC_Net2013/install.vcxproj b/MSVC_Net2013/install.vcxproj +index 6225a66..7f61dc5 100644 +--- a/MSVC_Net2013/install.vcxproj ++++ b/MSVC_Net2013/install.vcxproj +@@ -22,28 +22,29 @@ + {2093D218-190E-4194-9421-3BA7CBF33B10} + install + Win32Proj ++ 8.1 + + + + Utility +- MultiByte ++ Unicode + true + v120 + + + Utility +- MultiByte ++ Unicode + v120 + + + Utility +- MultiByte ++ Unicode + true + v120 + + + Utility +- MultiByte ++ Unicode + v120 + + diff --git a/vcpkg/ports/atkmm/fix_properties.patch b/vcpkg/ports/atkmm/fix_properties.patch new file mode 100644 index 0000000..a039243 --- /dev/null +++ b/vcpkg/ports/atkmm/fix_properties.patch @@ -0,0 +1,306 @@ +diff --git a/MSVC_Net2013/atkmm-build-defines.props b/MSVC_Net2013/atkmm-build-defines.props +index 421f5c3..0275e6e 100644 +--- a/MSVC_Net2013/atkmm-build-defines.props ++++ b/MSVC_Net2013/atkmm-build-defines.props +@@ -5,8 +5,6 @@ + + + ATKMM_BUILD +- glibmm-vc$(VSVer)0-2_4.lib;sigc-vc$(VSVer)0-2_0.lib +- glibmm-vc$(VSVer)0-d-2_4.lib;sigc-vc$(VSVer)0-d-2_0.lib + + + <_PropertySheetDisplayName>panogmmbuilddefinesprops +@@ -15,25 +13,19 @@ + + + +- .\atkmm;..\atk;$(GlibEtcInstallRoot)\include\glibmm-2.4;$(GlibEtcInstallRoot)\lib\glibmm-2.4\include;$(GlibEtcInstallRoot)\include\sigc++-2.0;$(GlibEtcInstallRoot)\lib\sigc++-2.0\include;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories) ++ .\atkmm;..\atk;.;%(AdditionalIncludeDirectories) + msvc_recommended_pragmas.h;%(ForcedIncludeFiles) + true + /d2Zi+ %(AdditionalOptions) + + +- atk-1.0.lib;gobject-2.0.lib;glib-2.0.lib;%(AdditionalDependencies) +- $(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories) ++ %(AdditionalDependencies) ++ %(AdditionalLibraryDirectories) + + + + + $(AtkMMBuildDefs) + +- +- $(CPPDepLibsRelease) +- +- +- $(CPPDepLibsDebug) +- + + +\ No newline at end of file +diff --git a/MSVC_Net2013/atkmm-version-paths.props b/MSVC_Net2013/atkmm-version-paths.props +index affd50f..675aa3e 100644 +--- a/MSVC_Net2013/atkmm-version-paths.props ++++ b/MSVC_Net2013/atkmm-version-paths.props +@@ -2,13 +2,9 @@ + + + 12 +- $(SolutionDir)\..\..\vs$(VSVer)\$(Platform) +- $(GlibEtcInstallRoot) + $(SolutionDir)$(Configuration)\$(Platform)\obj\$(ProjectName)\ + 1 + 6 +- -vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion) +- -vc$(VSVer)0-d-$(ApiMajorVersion)_$(ApiMinorVersion) + + + <_PropertySheetDisplayName>atkmmversionpathsprops +@@ -17,12 +13,6 @@ + + $(VSVer) + +- +- $(GlibEtcInstallRoot) +- +- +- $(CopyDir) +- + + $(DefDir) + +@@ -32,11 +22,5 @@ + + $(ApiMinorVersion) + +- +- $(ReleaseDllSuffix) +- +- +- $(DebugDllSuffix) +- + + +\ No newline at end of file +diff --git a/MSVC_Net2013/atkmm.vcxproj b/MSVC_Net2013/atkmm.vcxproj +index c3db50a..40f21cb 100644 +--- a/MSVC_Net2013/atkmm.vcxproj ++++ b/MSVC_Net2013/atkmm.vcxproj +@@ -41,7 +41,7 @@ + + + DynamicLibrary +- MultiByte ++ Unicode + v120 + + +diff --git a/MSVC_Net2013/atkmm.vcxproj.filters b/MSVC_Net2013/atkmm.vcxproj.filters +index f0fca22..6598996 100644 +--- a/MSVC_Net2013/atkmm.vcxproj.filters ++++ b/MSVC_Net2013/atkmm.vcxproj.filters +@@ -15,55 +15,143 @@ + + + +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ + + +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ + + +- ++ + Resource Files + + +diff --git a/MSVC_Net2013/gendef.vcxproj b/MSVC_Net2013/gendef.vcxproj +index 554054c..d6f2798 100644 +--- a/MSVC_Net2013/gendef.vcxproj ++++ b/MSVC_Net2013/gendef.vcxproj +@@ -40,7 +40,7 @@ + + + Application +- MultiByte ++ Unicode + v120 + + diff --git a/vcpkg/ports/atkmm/msvc_recommended_pragmas.h b/vcpkg/ports/atkmm/msvc_recommended_pragmas.h new file mode 100644 index 0000000..c0eb1d5 --- /dev/null +++ b/vcpkg/ports/atkmm/msvc_recommended_pragmas.h @@ -0,0 +1,34 @@ +#ifndef _MSC_VER +#pragma error "This header is for Microsoft VC only." +#endif /* _MSC_VER */ + +/* Make MSVC more pedantic, this is a recommended pragma list + * from _Win32_Programming_ by Rector and Newcomer. + */ +#pragma warning(error:4002) /* too many actual parameters for macro */ +#pragma warning(error:4003) /* not enough actual parameters for macro */ +#pragma warning(1:4010) /* single-line comment contains line-continuation character */ +#pragma warning(error:4013) /* 'function' undefined; assuming extern returning int */ +#pragma warning(1:4016) /* no function return type; using int as default */ +#pragma warning(error:4020) /* too many actual parameters */ +#pragma warning(error:4021) /* too few actual parameters */ +#pragma warning(error:4027) /* function declared without formal parameter list */ +#pragma warning(error:4029) /* declared formal parameter list different from definition */ +#pragma warning(error:4033) /* 'function' must return a value */ +#pragma warning(error:4035) /* 'function' : no return value */ +#pragma warning(error:4045) /* array bounds overflow */ +#pragma warning(error:4047) /* different levels of indirection */ +#pragma warning(error:4049) /* terminating line number emission */ +#pragma warning(error:4053) /* An expression of type void was used as an operand */ +#pragma warning(error:4071) /* no function prototype given */ +#pragma warning(disable:4101) /* unreferenced local variable */ +#pragma warning(error:4150) + +#pragma warning(disable:4244) /* No possible loss of data warnings */ +#pragma warning(disable:4305) /* No truncation from int to char warnings */ + +#pragma warning(error:4819) /* The file contains a character that cannot be represented in the current code page */ + +/* work around Microsoft's premature attempt to deprecate the C-Library */ +#define _CRT_SECURE_NO_WARNINGS +#define _CRT_NONSTDC_NO_WARNINGS diff --git a/vcpkg/ports/atkmm/portfile.cmake b/vcpkg/ports/atkmm/portfile.cmake new file mode 100644 index 0000000..9795881 --- /dev/null +++ b/vcpkg/ports/atkmm/portfile.cmake @@ -0,0 +1,51 @@ +vcpkg_fail_port_install(ON_TARGET "OSX" "Linux") + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "http://ftp.gnome.org/pub/GNOME/sources/atkmm/2.24/atkmm-2.24.2.tar.xz" + FILENAME "atkmm-2.24.2.tar.xz" + SHA512 427714cdf3b10e3f9bc36df09c4b05608d295f5895fb1e079b9bd84afdf7bf1cfdec6794ced7f1e35bd430b76f87792df4ee63c515071a2ea6e3e51e672cdbe2 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + fix_properties.patch + fix_charset.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h DESTINATION ${SOURCE_PATH}/MSVC_Net2013) + +set(VS_PLATFORM ${VCPKG_TARGET_ARCHITECTURE}) +if(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) + set(VS_PLATFORM "Win32") +endif(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/atkmm.sln + TARGET atkmm + PLATFORM ${VS_PLATFORM} + USE_VCPKG_INTEGRATION +) + +# Handle headers +file(COPY ${SOURCE_PATH}/MSVC_Net2013/atkmm/atkmmconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/atk/atkmm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/atk/atkmm + DESTINATION ${CURRENT_PACKAGES_DIR}/include + FILES_MATCHING PATTERN *.h) + +# Handle libraries +file(COPY ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/atkmm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +file(COPY ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/atkmm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/atkmm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +file(COPY ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/atkmm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/atlmfc/CONTROL b/vcpkg/ports/atlmfc/CONTROL new file mode 100644 index 0000000..aff5c97 --- /dev/null +++ b/vcpkg/ports/atlmfc/CONTROL @@ -0,0 +1,3 @@ +Source: atlmfc +Version: 0 +Description: a stub package that ensures VS has ATL/MFC installed. diff --git a/vcpkg/ports/atlmfc/portfile.cmake b/vcpkg/ports/atlmfc/portfile.cmake new file mode 100644 index 0000000..d11235d --- /dev/null +++ b/vcpkg/ports/atlmfc/portfile.cmake @@ -0,0 +1,10 @@ +find_path(AFXRES_H + NAMES afxres.h + PATHS $ENV{INCLUDE} +) + +if(NOT AFXRES_H) + message(FATAL_ERROR "Unable to locate 'afxres.h'. Ensure you have installed the ATL/MFC component of Visual Studio.") +endif() + +SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/vcpkg/ports/aubio/CMakeLists.txt b/vcpkg/ports/aubio/CMakeLists.txt new file mode 100644 index 0000000..9238490 --- /dev/null +++ b/vcpkg/ports/aubio/CMakeLists.txt @@ -0,0 +1,79 @@ +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 + + -D_CRT_SECURE_NO_WARNINGS=1 +) + +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_package(FFmpeg COMPONENTS avcodec avutil avdevice avfilter avformat swresample REQUIRED) +find_package(BZip2 REQUIRED) +find_package(LibLZMA REQUIRED) +find_package(SndFile REQUIRED) + +include_directories(src ${LIBLZMA_INCLUDE_DIRS}) + +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 + SndFile::sndfile + ${FFMPEG_LIBRARIES} + BZip2::BZip2 + ${LIBLZMA_LIBRARIES} +) + +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() + # Create and add fake config.h to avoid build errors (file is generated for + # cross-platform requirements in waf build-system) + file(WRITE "${CMAKE_BINARY_DIR}/config.h" "") + include_directories(${CMAKE_BINARY_DIR}) + + 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/vcpkg/ports/aubio/CONTROL b/vcpkg/ports/aubio/CONTROL new file mode 100644 index 0000000..de5eafe --- /dev/null +++ b/vcpkg/ports/aubio/CONTROL @@ -0,0 +1,6 @@ +Source: aubio +Version: 0.4.9 +Port-Version: 3 +Homepage: https://github.com/aubio/aubio +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, libogg, libflac, libvorbis, bzip2, liblzma diff --git a/vcpkg/ports/aubio/portfile.cmake b/vcpkg/ports/aubio/portfile.cmake new file mode 100644 index 0000000..11840cc --- /dev/null +++ b/vcpkg/ports/aubio/portfile.cmake @@ -0,0 +1,38 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO aubio/aubio + REF 0.4.9 + SHA512 a22c7c581ce1f428270021591649273396e6dc222b3c7b3d46f5c4abf94a98be1ab89320cdbf1b6b60d4330eef23976439e3fc9e0f8d3cdd867dac4542fa48c9 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_RELEASE + -DTOOLS_INSTALLDIR=tools/aubio + -DBUILD_TOOLS=ON + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=1 + -DBUILD_TOOLS=OFF +) +vcpkg_install_cmake() + +# 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) + +vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/aubio) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/aubio/COPYING ${CURRENT_PACKAGES_DIR}/share/aubio/copyright) diff --git a/vcpkg/ports/audiofile/portfile.cmake b/vcpkg/ports/audiofile/portfile.cmake new file mode 100644 index 0000000..49f9a67 --- /dev/null +++ b/vcpkg/ports/audiofile/portfile.cmake @@ -0,0 +1,13 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO adamstark/AudioFile + REF ccb64bd86881099e65a329f104733679ae03f63e # 1.0.7 + SHA512 f172f9df95a028c9c3da29cd530dd4b55acad76ee7503000f96ba10c5d014abd219fcd145cea4b7ca7a902c38d968518b39de285d25f7e3ccc56d1ba3769d7b8 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/AudioFile.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/audiofile/vcpkg.json b/vcpkg/ports/audiofile/vcpkg.json new file mode 100644 index 0000000..d779642 --- /dev/null +++ b/vcpkg/ports/audiofile/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "audiofile", + "version-string": "1.0.7", + "description": "A simple header-only C++ library for reading and writing audio files.", + "homepage": "https://github.com/adamstark/AudioFile", + "license": "GPL-3.0" +} diff --git a/vcpkg/ports/aurora/CONTROL b/vcpkg/ports/aurora/CONTROL new file mode 100644 index 0000000..b99aed7 --- /dev/null +++ b/vcpkg/ports/aurora/CONTROL @@ -0,0 +1,4 @@ +Source: aurora +Version: 2017-06-21-c75699d2a8caa726260c29b6d7a0fd35f8f28933 +Homepage: https://github.com/Bromeon/Aurora +Description: Aurora is an open-source C++ library providing various rather uncommon C++ utilities diff --git a/vcpkg/ports/aurora/portfile.cmake b/vcpkg/ports/aurora/portfile.cmake new file mode 100644 index 0000000..32e3d80 --- /dev/null +++ b/vcpkg/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() diff --git a/vcpkg/ports/autobahn/CONTROL b/vcpkg/ports/autobahn/CONTROL new file mode 100644 index 0000000..94152bb --- /dev/null +++ b/vcpkg/ports/autobahn/CONTROL @@ -0,0 +1,5 @@ +Source: autobahn +Version: 18.4.1 +Build-Depends: websocketpp, msgpack, boost-asio, boost-thread +Description: WAMP for C++ in Boost/Asio +Homepage: https://crossbar.io/autobahn diff --git a/vcpkg/ports/autobahn/portfile.cmake b/vcpkg/ports/autobahn/portfile.cmake new file mode 100644 index 0000000..ea70941 --- /dev/null +++ b/vcpkg/ports/autobahn/portfile.cmake @@ -0,0 +1,30 @@ +#header-only library +include(vcpkg_common_functions) + +set(USE_UPSTREAM OFF) +if("upstream" IN_LIST FEATURES) + set(USE_UPSTREAM ON) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO crossbario/autobahn-cpp + REF v18.4.1 + SHA512 a3325e06731698a2c5d8c233581f275a9b653e98b74e7382f83fc62111dec9d66bbd5803cc71e8b5125ecee6d380d3cf1c6e83926e06912888201c2aa4ab7a15 + HEAD_REF master +) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/autobahn) + +# Copy the header files +file(COPY "${SOURCE_PATH}/autobahn" DESTINATION "${CURRENT_PACKAGES_DIR}/include" FILES_MATCHING PATTERN "*.hpp") +file(COPY "${SOURCE_PATH}/autobahn" DESTINATION "${CURRENT_PACKAGES_DIR}/include" FILES_MATCHING PATTERN "*.ipp") + +set(PACKAGE_INSTALL_INCLUDE_DIR "\${CMAKE_CURRENT_LIST_DIR}/../../include") +set(PACKAGE_INIT " +macro(set_and_check) + set(\${ARGV}) +endmacro() +") + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/autobahn/copyright COPYONLY) diff --git a/vcpkg/ports/avisynthplus/portfile.cmake b/vcpkg/ports/avisynthplus/portfile.cmake new file mode 100644 index 0000000..467e8dd --- /dev/null +++ b/vcpkg/ports/avisynthplus/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_LIBRARY_LINKAGE "static" ON_TARGET "UWP" "OSX" "Linux") + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO AviSynth/AviSynthPlus + REF v3.6.0 + SHA512 040e9f2c99973eb96b0f1ba373627c3c43ff17ed8339ea850aebc2306228384175cb37c418a139f865c396c70c2d254cd8a40838f577f184a4c161b258328dd5 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DENABLE_PLUGINS=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL ${SOURCE_PATH}/distrib/gpl.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/avisynthplus/vcpkg.json b/vcpkg/ports/avisynthplus/vcpkg.json new file mode 100644 index 0000000..b6796ad --- /dev/null +++ b/vcpkg/ports/avisynthplus/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "avisynthplus", + "version-string": "3.6.0", + "port-version": 1, + "description": "An improved version of the AviSynth frameserver, with improved features and developer friendliness", + "homepage": "http://avs-plus.net/", + "supports": "windows & !arm & !uwp & !static" +} diff --git a/vcpkg/ports/avro-c/CONTROL b/vcpkg/ports/avro-c/CONTROL new file mode 100644 index 0000000..e7554a3 --- /dev/null +++ b/vcpkg/ports/avro-c/CONTROL @@ -0,0 +1,6 @@ +Source: avro-c +Version: 1.9.2-1 +Supports: !(uwp|osx) +Homepage: https://github.com/apache/avro +Description: Apache Avro is a data serialization system +Build-Depends: jansson, liblzma, zlib, snappy diff --git a/vcpkg/ports/avro-c/avro.patch b/vcpkg/ports/avro-c/avro.patch new file mode 100644 index 0000000..4f8ae13 --- /dev/null +++ b/vcpkg/ports/avro-c/avro.patch @@ -0,0 +1,410 @@ +diff --git a/lang/c/CMakeLists.txt b/lang/c/CMakeLists.txt +index 11cbf01..620490d 100644 +--- a/lang/c/CMakeLists.txt ++++ b/lang/c/CMakeLists.txt +@@ -149,7 +149,10 @@ else (ZLIB_FOUND) + message("Disabled deflate codec. zlib not found.") + endif (ZLIB_FOUND) + +-find_package(Snappy) ++find_library(SNAPPY_LIBRARY_RELEASE NAMES snappy PATH_SUFFIXES lib) ++find_library(SNAPPY_LIBRARY_DEBUG NAMES snappyd PATH_SUFFIXES debug/lib) ++find_path(SNAPPY_INCLUDE_DIR snappy-c.h) ++select_library_configurations(SNAPPY) + if (SNAPPY_FOUND AND ZLIB_FOUND) # Snappy borrows crc32 from zlib + set(SNAPPY_PKG libsnappy) + add_definitions(-DSNAPPY_CODEC) +@@ -161,32 +164,36 @@ else (SNAPPY_FOUND AND ZLIB_FOUND) + message("Disabled snappy codec. libsnappy not found or zlib not found.") + endif (SNAPPY_FOUND AND ZLIB_FOUND) + +-find_package(PkgConfig) +-pkg_check_modules(LZMA liblzma) +-if (LZMA_FOUND) ++find_package(LibLZMA) ++if (LibLZMA_FOUND) ++ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") ++ set(SNAPPY_LIBRARIES ${SNAPPY_LIBRARIES} -lstdc++) ++ endif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + set(LZMA_PKG liblzma) + add_definitions(-DLZMA_CODEC) +- include_directories(${LZMA_INCLUDE_DIRS}) +- link_directories(${LZMA_LIBRARY_DIRS}) ++ include_directories(${LibLZMA_INCLUDE_DIRS}) ++ link_directories(${LibLZMA_LIBRARY_DIRS}) + message("Enabled lzma codec") +-else (LZMA_FOUND) ++else (LibLZMA_FOUND) + set(LZMA_PKG "") +- set(LZMA_LIBRARIES "") ++ set(LibLZMA_LIBRARIES "") + message("Disabled lzma codec. liblzma not found.") +-endif (LZMA_FOUND) ++endif (LIBLZMA_FOUND) + +-set(CODEC_LIBRARIES ${ZLIB_LIBRARIES} ${LZMA_LIBRARIES} ${SNAPPY_LIBRARIES}) ++set(CODEC_LIBRARIES ${ZLIB_LIBRARIES} ${LibLZMA_LIBRARIES} ${SNAPPY_LIBRARIES}) + set(CODEC_PKG "@ZLIB_PKG@ @LZMA_PKG@ @SNAPPY_PKG@") + + # Jansson JSON library +-pkg_check_modules(JANSSON jansson>=2.3) +-if (JANSSON_FOUND) ++find_path(JANSSON_INCLUDE_DIR NAMES jansson.h) ++find_library(JANSSON_LIBRARY NAMES jansson) ++if (JANSSON_LIBRARY) + set(JANSSON_PKG libjansson) ++ set(JANSSON_LIBRARIES ${JANSSON_LIBRARY}) + include_directories(${JANSSON_INCLUDE_DIRS}) + link_directories(${JANSSON_LIBRARY_DIRS}) +-else (JANSSON_FOUND) ++else (JANSSON_LIBRARY) + message(FATAL_ERROR "libjansson >=2.3 not found") +-endif (JANSSON_FOUND) ++endif (JANSSON_LIBRARY) + + + add_subdirectory(src) +diff --git a/lang/c/examples/quickstop.c b/lang/c/examples/quickstop.c +index f18225b..78e2b1b 100644 +--- a/lang/c/examples/quickstop.c ++++ b/lang/c/examples/quickstop.c +@@ -16,6 +16,7 @@ + */ + + #include ++#include + #include + #include + +@@ -102,7 +103,7 @@ int print_person(avro_file_reader_t db, avro_schema_t reader_schema) + + if (avro_record_get(person, "ID", &id_datum) == 0) { + avro_int64_get(id_datum, &i64); +- fprintf(stdout, "%"PRId64" | ", i64); ++ fprintf(stdout, "%" PRId64 " | ", i64); + } + if (avro_record_get(person, "First", &first_datum) == 0) { + avro_string_get(first_datum, &p); +diff --git a/lang/c/src/avro/msinttypes.h b/lang/c/src/avro/msinttypes.h +index 29be14b..7efc702 100644 +--- a/lang/c/src/avro/msinttypes.h ++++ b/lang/c/src/avro/msinttypes.h +@@ -54,6 +54,10 @@ + + // 7.8 Format conversion of integer types + ++#if (_MSC_VER >= 1900) ++# include ++#else ++ + typedef struct { + intmax_t quot; + intmax_t rem; +@@ -311,5 +315,6 @@ imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom) + #define wcstoimax _wcstoi64 + #define wcstoumax _wcstoui64 + ++#endif // (_MSC_VER >= 1900) + + #endif // _MSC_INTTYPES_H_ ] +diff --git a/lang/c/src/avro/msstdint.h b/lang/c/src/avro/msstdint.h +index d02608a..54e8972 100644 +--- a/lang/c/src/avro/msstdint.h ++++ b/lang/c/src/avro/msstdint.h +@@ -42,6 +42,10 @@ + + #include + ++#if (_MSC_VER >= 1900) ++# include ++#else ++ + // For Visual Studio 6 in C++ mode and for many Visual Studio versions when + // compiling for ARM we should wrap include with 'extern "C++" {}' + // or compiler give many errors like this: +@@ -243,5 +247,6 @@ typedef uint64_t uintmax_t; + + #endif // __STDC_CONSTANT_MACROS ] + ++#endif // (_MSC_VER >= 1900) + + #endif // _MSC_STDINT_H_ ] +diff --git a/lang/c/src/avro/platform.h b/lang/c/src/avro/platform.h +index 9293055..edfe1e0 100644 +--- a/lang/c/src/avro/platform.h ++++ b/lang/c/src/avro/platform.h +@@ -35,8 +35,10 @@ extern "C" { + // Defines for printing size_t. + #if defined(_WIN64) + #define PRIsz PRIu64 ++ typedef __int64 ssize_t; + #elif defined(_WIN32) + #define PRIsz PRIu32 ++ typedef long ssize_t; + #else // GCC + #define PRIsz "zu" + #endif +diff --git a/lang/c/src/avro_private.h b/lang/c/src/avro_private.h +index f97ef6b..6b29104 100644 +--- a/lang/c/src/avro_private.h ++++ b/lang/c/src/avro_private.h +@@ -34,7 +34,7 @@ extern "C" { + #endif + + #ifdef _WIN32 +-#define snprintf _snprintf ++ // #define snprintf _snprintf + #endif + + /* Note that AVRO_PLATFORM_IS_BIG_ENDIAN is *always* defined. It is +diff --git a/lang/c/src/avroappend.c b/lang/c/src/avroappend.c +index 7243c60..39656ff 100644 +--- a/lang/c/src/avroappend.c ++++ b/lang/c/src/avroappend.c +@@ -20,7 +20,7 @@ + #include + #include + #ifdef _WIN32 +-#include ++#include + #endif + + #include "avro.h" +diff --git a/lang/c/src/codec.c b/lang/c/src/codec.c +index 5b55b35..49789f2 100644 +--- a/lang/c/src/codec.c ++++ b/lang/c/src/codec.c +@@ -269,7 +269,7 @@ static int encode_deflate(avro_codec_t c, void * data, int64_t len) + s->next_in = (Bytef*)data; + s->avail_in = (uInt)len; + +- s->next_out = c->block_data; ++ s->next_out = (Bytef*)c->block_data; + s->avail_out = (uInt)c->block_size; + + s->total_out = 0; +@@ -313,10 +313,10 @@ static int decode_deflate(avro_codec_t c, void * data, int64_t len) + + c->used_size = 0; + +- s->next_in = data; ++ s->next_in = (Bytef*)data; + s->avail_in = len; + +- s->next_out = c->block_data; ++ s->next_out = (Bytef*)c->block_data; + s->avail_out = c->block_size; + + s->total_out = 0; +@@ -337,7 +337,7 @@ static int decode_deflate(avro_codec_t c, void * data, int64_t len) + if (err == Z_BUF_ERROR) + { + c->block_data = avro_realloc(c->block_data, c->block_size, c->block_size * 2); +- s->next_out = c->block_data + s->total_out; ++ s->next_out = (Bytef*)c->block_data + s->total_out; + s->avail_out += c->block_size; + c->block_size = c->block_size * 2; + } +@@ -440,7 +440,7 @@ static int encode_lzma(avro_codec_t codec, void * data, int64_t len) + return 1; + } + +- ret = lzma_raw_buffer_encode(filters, NULL, data, len, codec->block_data, &written, codec->block_size); ++ ret = lzma_raw_buffer_encode(filters, NULL, (const uint8_t*)data, len, (uint8_t*)codec->block_data, &written, codec->block_size); + + codec->used_size = written; + +@@ -471,8 +471,8 @@ static int decode_lzma(avro_codec_t codec, void * data, int64_t len) + + do + { +- ret = lzma_raw_buffer_decode(filters, NULL, data, +- &read_pos, len, codec->block_data, &write_pos, ++ ret = lzma_raw_buffer_decode(filters, NULL, (const uint8_t*)data, ++ &read_pos, len, (uint8_t*)codec->block_data, &write_pos, + codec->block_size); + + codec->used_size = write_pos; +diff --git a/lang/c/src/schema.c b/lang/c/src/schema.c +index 7b38900..50fa0db 100644 +--- a/lang/c/src/schema.c ++++ b/lang/c/src/schema.c +@@ -74,7 +74,7 @@ static int is_avro_id(const char *name) + * namespace (as a newly allocated buffer using Avro's allocator). */ + static char *split_namespace_name(const char *fullname, const char **name_out) + { +- char *last_dot = strrchr(fullname, '.'); ++ const char *last_dot = strrchr(fullname, '.'); + if (last_dot == NULL) { + *name_out = fullname; + return NULL; +@@ -770,12 +770,12 @@ avro_schema_t avro_schema_link_target(avro_schema_t schema) + } + + static const char * +-qualify_name(const char *name, const char *namespace) ++qualify_name(const char *name, const char *namespaceX) + { + char *full_name; +- if (namespace != NULL && strchr(name, '.') == NULL) { +- full_name = avro_str_alloc(strlen(name) + strlen(namespace) + 2); +- sprintf(full_name, "%s.%s", namespace, name); ++ if (namespaceX != NULL && strchr(name, '.') == NULL) { ++ full_name = avro_str_alloc(strlen(name) + strlen(namespaceX) + 2); ++ sprintf(full_name, "%s.%s", namespaceX, name); + } else { + full_name = avro_strdup(name); + } +@@ -786,20 +786,20 @@ static int + save_named_schemas(const avro_schema_t schema, st_table *st) + { + const char *name = avro_schema_name(schema); +- const char *namespace = avro_schema_namespace(schema); +- const char *full_name = qualify_name(name, namespace); ++ const char *namespaceX = avro_schema_namespace(schema); ++ const char *full_name = qualify_name(name, namespaceX); + int rval = st_insert(st, (st_data_t) full_name, (st_data_t) schema); + return rval; + } + + static avro_schema_t +-find_named_schemas(const char *name, const char *namespace, st_table *st) ++find_named_schemas(const char *name, const char *namespaceX, st_table *st) + { + union { + avro_schema_t schema; + st_data_t data; + } val; +- const char *full_name = qualify_name(name, namespace); ++ const char *full_name = qualify_name(name, namespaceX); + int rval = st_lookup(st, (st_data_t) full_name, &(val.data)); + avro_str_free((char *)full_name); + if (rval) { +@@ -812,7 +812,7 @@ find_named_schemas(const char *name, const char *namespace, st_table *st) + static int + avro_type_from_json_t(json_t *json, avro_type_t *type, + st_table *named_schemas, avro_schema_t *named_type, +- const char *namespace) ++ const char *namespaceX) + { + json_t *json_type; + const char *type_str; +@@ -863,7 +863,7 @@ avro_type_from_json_t(json_t *json, avro_type_t *type, + *type = AVRO_MAP; + } else if (strcmp(type_str, "fixed") == 0) { + *type = AVRO_FIXED; +- } else if ((*named_type = find_named_schemas(type_str, namespace, named_schemas))) { ++ } else if ((*named_type = find_named_schemas(type_str, namespaceX, named_schemas))) { + *type = AVRO_LINK; + } else { + avro_set_error("Unknown Avro \"type\": %s", type_str); +@@ -954,15 +954,15 @@ avro_schema_from_json_t(json_t *json, avro_schema_t *schema, + } + + if (strchr(fullname, '.')) { +- char *namespace = split_namespace_name(fullname, &name); +- *schema = avro_schema_record(name, namespace); +- avro_str_free(namespace); ++ char *namespaceX = split_namespace_name(fullname, &name); ++ *schema = avro_schema_record(name, namespaceX); ++ avro_str_free(namespaceX); + } else if (json_is_string(json_namespace)) { +- const char *namespace = json_string_value(json_namespace); +- if (strlen(namespace) == 0) { +- namespace = NULL; ++ const char *namespaceX = json_string_value(json_namespace); ++ if (strlen(namespaceX) == 0) { ++ namespaceX = NULL; + } +- *schema = avro_schema_record(fullname, namespace); ++ *schema = avro_schema_record(fullname, namespaceX); + } else { + *schema = avro_schema_record(fullname, parent_namespace); + } +@@ -1053,16 +1053,16 @@ avro_schema_from_json_t(json_t *json, avro_schema_t *schema, + } + + if (strchr(fullname, '.')) { +- char *namespace; +- namespace = split_namespace_name(fullname, &name); +- *schema = avro_schema_enum_ns(name, namespace); +- avro_str_free(namespace); ++ char *namespaceX; ++ namespaceX = split_namespace_name(fullname, &name); ++ *schema = avro_schema_enum_ns(name, namespaceX); ++ avro_str_free(namespaceX); + } else if (json_is_string(json_namespace)) { +- const char *namespace = json_string_value(json_namespace); +- if (strlen(namespace) == 0) { +- namespace = NULL; ++ const char *namespaceX = json_string_value(json_namespace); ++ if (strlen(namespaceX) == 0) { ++ namespaceX = NULL; + } +- *schema = avro_schema_enum_ns(fullname, namespace); ++ *schema = avro_schema_enum_ns(fullname, namespaceX); + } else { + *schema = avro_schema_enum_ns(fullname, parent_namespace); + } +@@ -1190,16 +1190,16 @@ avro_schema_from_json_t(json_t *json, avro_schema_t *schema, + fullname = json_string_value(json_name); + + if (strchr(fullname, '.')) { +- char *namespace; +- namespace = split_namespace_name(fullname, &name); +- *schema = avro_schema_fixed_ns(name, namespace, (int64_t) size); +- avro_str_free(namespace); ++ char *namespaceX; ++ namespaceX = split_namespace_name(fullname, &name); ++ *schema = avro_schema_fixed_ns(name, namespaceX, (int64_t) size); ++ avro_str_free(namespaceX); + } else if (json_is_string(json_namespace)) { +- const char *namespace = json_string_value(json_namespace); +- if (strlen(namespace) == 0) { +- namespace = NULL; ++ const char *namespaceX = json_string_value(json_namespace); ++ if (strlen(namespaceX) == 0) { ++ namespaceX = NULL; + } +- *schema = avro_schema_fixed_ns(fullname, namespace, (int64_t) size); ++ *schema = avro_schema_fixed_ns(fullname, namespaceX, (int64_t) size); + } else { + *schema = avro_schema_fixed_ns(fullname, parent_namespace, (int64_t) size); + } +@@ -1821,9 +1821,9 @@ static int write_link(avro_writer_t out, const struct avro_link_schema_t *link, + { + int rval; + check(rval, avro_write_str(out, "\"")); +- const char *namespace = avro_schema_namespace(link->to); +- if (namespace && nullstrcmp(namespace, parent_namespace)) { +- check(rval, avro_write_str(out, namespace)); ++ const char *namespaceX = avro_schema_namespace(link->to); ++ if (namespaceX && nullstrcmp(namespaceX, parent_namespace)) { ++ check(rval, avro_write_str(out, namespaceX)); + check(rval, avro_write_str(out, ".")); + } + check(rval, avro_write_str(out, avro_schema_name(link->to))); +diff --git a/lang/c/tests/test_avro_data.c b/lang/c/tests/test_avro_data.c +index 1da09e6..714d5d8 100644 +--- a/lang/c/tests/test_avro_data.c ++++ b/lang/c/tests/test_avro_data.c +@@ -28,6 +28,10 @@ avro_writer_t writer; + + typedef int (*avro_test) (void); + ++#ifdef _WIN32 ++# define strcasecmp stricmp ++#endif ++ + /* + * Use a custom allocator that verifies that the size that we use to + * free an object matches the size that we use to allocate it. +@@ -112,7 +116,7 @@ write_read_check(avro_schema_t writers_schema, avro_datum_t datum, + if (size != avro_writer_tell(writer)) { + fprintf(stderr, + "Unable to calculate size %s validate=%d " +- "(%"PRId64" != %"PRId64")\n %s\n", ++ "(%" PRId64 " != %" PRId64 ")\n %s\n", + type, validate, size, avro_writer_tell(writer), + avro_strerror()); + exit(EXIT_FAILURE); diff --git a/vcpkg/ports/avro-c/portfile.cmake b/vcpkg/ports/avro-c/portfile.cmake new file mode 100644 index 0000000..195d855 --- /dev/null +++ b/vcpkg/ports/avro-c/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_buildpath_length_warning(37) +vcpkg_fail_port_install(ON_TARGET "uwp" "osx") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO apache/avro + REF release-1.9.2 + SHA512 6a6980901eea964c050eb3d61fadf28712e2f02c36985bf8e5176b668bba48985f6a666554a1964435448de29b18d790ab86b787d0288a22fd9cba00746a7846 + HEAD_REF master + PATCHES + avro.patch # Private vcpkg build fixes + snappy-pr-793.patch # Snappy build fixes for Windows (PR-793) +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/lang/c + PREFER_NINJA + OPTIONS +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/lang/c/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/avro-c/snappy-pr-793.patch b/vcpkg/ports/avro-c/snappy-pr-793.patch new file mode 100644 index 0000000..2890931 --- /dev/null +++ b/vcpkg/ports/avro-c/snappy-pr-793.patch @@ -0,0 +1,56 @@ +diff -ru b/c/src/codec.c a/lang/c/src/codec.c +--- b/lang/c/src/codec.c 2020-01-23 16:18:15.119970300 +0200 ++++ a/lang/c/src/codec.c 2020-01-23 19:31:41.679834300 +0200 +@@ -24,6 +24,9 @@ + # elif defined(__FreeBSD__) + # include + # define __bswap_32 bswap32 ++# elif defined(_WIN32) ++# include ++# define __bswap_32 _byteswap_ulong + # else + # include + # endif +@@ -115,14 +118,14 @@ + return 1; + } + +- if (snappy_compress(data, len, c->block_data, &outlen) != SNAPPY_OK) ++ if (snappy_compress((const char *)data, len, (char*)c->block_data, &outlen) != SNAPPY_OK) + { + avro_set_error("Error compressing block with Snappy"); + return 1; + } + +- crc = __bswap_32(crc32(0, data, len)); +- memcpy(c->block_data+outlen, &crc, 4); ++ crc = __bswap_32(crc32(0, (const Bytef *)data, len)); ++ memcpy((char*)c->block_data+outlen, &crc, 4); + c->used_size = outlen+4; + + return 0; +@@ -133,7 +136,7 @@ + uint32_t crc; + size_t outlen; + +- if (snappy_uncompressed_length(data, len-4, &outlen) != SNAPPY_OK) { ++ if (snappy_uncompressed_length((const char*)data, len-4, &outlen) != SNAPPY_OK) { + avro_set_error("Uncompressed length error in snappy"); + return 1; + } +@@ -152,13 +155,13 @@ + return 1; + } + +- if (snappy_uncompress(data, len-4, c->block_data, &outlen) != SNAPPY_OK) ++ if (snappy_uncompress((const char*)data, len-4, (char*)c->block_data, &outlen) != SNAPPY_OK) + { + avro_set_error("Error uncompressing block with Snappy"); + return 1; + } + +- crc = __bswap_32(crc32(0, c->block_data, outlen)); ++ crc = __bswap_32(crc32(0, (const Bytef *)c->block_data, outlen)); + if (memcmp(&crc, (char*)data+len-4, 4)) + { + avro_set_error("CRC32 check failure uncompressing block with Snappy"); diff --git a/vcpkg/ports/avro-cpp/CONTROL b/vcpkg/ports/avro-cpp/CONTROL new file mode 100644 index 0000000..0f75d7e --- /dev/null +++ b/vcpkg/ports/avro-cpp/CONTROL @@ -0,0 +1,9 @@ +Source: avro-cpp +Version: 1.9.2 +Homepage: https://github.com/apache/avro +Description: Apache Avro is a data serialization system +Build-Depends: boost-format, boost-thread, boost-filesystem, boost-iostreams, boost-program-options, boost-random, boost-crc, boost-test, libzip, bzip2, liblzma, zlib, zstd + +Feature: snappy +Build-Depends: snappy +Description: Support Snappy for compression diff --git a/vcpkg/ports/avro-cpp/install.patch b/vcpkg/ports/avro-cpp/install.patch new file mode 100644 index 0000000..12ead28 --- /dev/null +++ b/vcpkg/ports/avro-cpp/install.patch @@ -0,0 +1,100 @@ +diff --git a/lang/c++/CMakeLists.txt b/lang/c++/CMakeLists.txt +index 30a5d66..f7f2b94 100644 +--- a/lang/c++/CMakeLists.txt ++++ b/lang/c++/CMakeLists.txt +@@ -40,6 +40,8 @@ set (AVRO_VERSION_MINOR "0") + project (Avro-cpp) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}) + ++find_package(ZLIB REQUIRED) ++ + if (WIN32 AND NOT CYGWIN AND NOT MSYS) + add_definitions (/EHa) + add_definitions ( +@@ -118,11 +120,11 @@ set_target_properties (avrocpp PROPERTIES + set_target_properties (avrocpp_s PROPERTIES + VERSION ${AVRO_VERSION_MAJOR}.${AVRO_VERSION_MINOR}) + +-target_link_libraries (avrocpp ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES}) ++target_link_libraries (avrocpp ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES} ZLIB::ZLIB) + + add_executable (precompile test/precompile.cc) + +-target_link_libraries (precompile avrocpp_s ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES}) ++target_link_libraries (precompile avrocpp_s ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES} ZLIB::ZLIB) + + macro (gen file ns) + add_custom_command (OUTPUT ${file}.hh +@@ -151,34 +153,40 @@ gen (crossref cr) + gen (primitivetypes pt) + + add_executable (avrogencpp impl/avrogencpp.cc) +-target_link_libraries (avrogencpp avrocpp_s ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES}) ++target_link_libraries (avrogencpp avrocpp_s ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES} ZLIB::ZLIB) ++ + +-enable_testing() ++if(BUILD_TESTING) ++ enable_testing() ++endif() + + macro (unittest name) + add_executable (${name} test/${name}.cc) +- target_link_libraries (${name} avrocpp ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES}) ++ target_link_libraries (${name} avrocpp ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES} ZLIB::ZLIB) + add_test (NAME ${name} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${name}) + endmacro (unittest) + +-unittest (buffertest) +-unittest (unittest) +-unittest (SchemaTests) +-unittest (LargeSchemaTests) +-unittest (CodecTests) +-unittest (StreamTests) +-unittest (SpecificTests) +-unittest (DataFileTests) +-unittest (JsonTests) +-unittest (AvrogencppTests) +-unittest (CompilerTests) +- +-add_dependencies (AvrogencppTests bigrecord_hh bigrecord_r_hh bigrecord2_hh +- tweet_hh +- union_array_union_hh union_map_union_hh union_conflict_hh +- recursive_hh reuse_hh circulardep_hh tree1_hh tree2_hh crossref_hh +- primitivetypes_hh empty_record_hh) ++if(BUILD_TESTING) ++ unittest (buffertest) ++ unittest (unittest) ++ unittest (SchemaTests) ++ unittest (LargeSchemaTests) ++ unittest (CodecTests) ++ unittest (StreamTests) ++ unittest (SpecificTests) ++ unittest (DataFileTests) ++ unittest (JsonTests) ++ unittest (AvrogencppTests) ++ unittest (CompilerTests) ++ ++ add_dependencies (AvrogencppTests bigrecord_hh bigrecord_r_hh bigrecord2_hh ++ tweet_hh ++ union_array_union_hh union_map_union_hh union_conflict_hh ++ recursive_hh reuse_hh circulardep_hh tree1_hh tree2_hh crossref_hh ++ primitivetypes_hh empty_record_hh) ++ ++endif() + + include (InstallRequiredSystemLibraries) + +@@ -189,9 +197,9 @@ include (CPack) + install (TARGETS avrocpp avrocpp_s + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +- RUNTIME DESTINATION lib) ++ RUNTIME DESTINATION bin) + +-install (TARGETS avrogencpp RUNTIME DESTINATION bin) ++install (TARGETS avrogencpp RUNTIME DESTINATION tools/bin) + + install (DIRECTORY api/ DESTINATION include/avro + FILES_MATCHING PATTERN *.hh) diff --git a/vcpkg/ports/avro-cpp/portfile.cmake b/vcpkg/ports/avro-cpp/portfile.cmake new file mode 100644 index 0000000..49f0af2 --- /dev/null +++ b/vcpkg/ports/avro-cpp/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO apache/avro + REF release-1.9.2 + SHA512 6a6980901eea964c050eb3d61fadf28712e2f02c36985bf8e5176b668bba48985f6a666554a1964435448de29b18d790ab86b787d0288a22fd9cba00746a7846 + HEAD_REF master + PATCHES + install.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES + snappy CMAKE_DISABLE_FIND_PACKAGE_Snappy +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/lang/c++ + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DBUILD_TESTING=OFF + ${FEATURE_OPTIONS} + OPTIONS_DEBUG + -DAVRO_ADD_PROTECTOR_FLAGS=1 +) + +vcpkg_install_cmake(ADD_BIN_TO_PATH) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/lang/c++/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/aws-c-common/CONTROL b/vcpkg/ports/aws-c-common/CONTROL new file mode 100644 index 0000000..cc91c44 --- /dev/null +++ b/vcpkg/ports/aws-c-common/CONTROL @@ -0,0 +1,4 @@ +Source: aws-c-common +Version: 0.4.56 +Homepage: https://github.com/awslabs/aws-c-common +Description: AWS common library for C diff --git a/vcpkg/ports/aws-c-common/disable-error-4068.patch b/vcpkg/ports/aws-c-common/disable-error-4068.patch new file mode 100644 index 0000000..d031581 --- /dev/null +++ b/vcpkg/ports/aws-c-common/disable-error-4068.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f8a7328..9b01f56 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -163,6 +163,10 @@ if (UNIX AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} MATCHES FreeBSD) + target_compile_definitions(${PROJECT_NAME} PRIVATE -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=500) + endif() + ++if (WIN32) ++ add_compile_options(/wd4068) ++endif() ++ + aws_add_sanitizers(${PROJECT_NAME} BLACKLIST "sanitizer-blacklist.txt") + target_link_libraries(${PROJECT_NAME} PUBLIC ${PLATFORM_LIBS}) + target_compile_definitions(${PROJECT_NAME} PRIVATE ${PLATFORM_DEFINES}) diff --git a/vcpkg/ports/aws-c-common/disable-internal-crt-option.patch b/vcpkg/ports/aws-c-common/disable-internal-crt-option.patch new file mode 100644 index 0000000..573d837 --- /dev/null +++ b/vcpkg/ports/aws-c-common/disable-internal-crt-option.patch @@ -0,0 +1,20 @@ +diff --git a/cmake/AwsCFlags.cmake b/cmake/AwsCFlags.cmake +index 249b7d5..41a31e2 100644 +--- a/cmake/AwsCFlags.cmake ++++ b/cmake/AwsCFlags.cmake +@@ -38,15 +38,6 @@ function(aws_set_common_properties target) + list(APPEND AWS_C_FLAGS /DAWS_SUPPORT_WIN7=1) + endif() + +- string(TOUPPER "${CMAKE_BUILD_TYPE}" _CMAKE_BUILD_TYPE) +- if(STATIC_CRT) +- string(REPLACE "/MD" "/MT" _FLAGS "${CMAKE_C_FLAGS_${_CMAKE_BUILD_TYPE}}") +- else() +- string(REPLACE "/MT" "/MD" _FLAGS "${CMAKE_C_FLAGS_${_CMAKE_BUILD_TYPE}}") +- endif() +- string(REPLACE " " ";" _FLAGS "${_FLAGS}") +- list(APPEND AWS_C_FLAGS "${_FLAGS}") +- + else() + list(APPEND AWS_C_FLAGS -Wall -Werror -Wstrict-prototypes) + diff --git a/vcpkg/ports/aws-c-common/fix-cmake-target-path.patch b/vcpkg/ports/aws-c-common/fix-cmake-target-path.patch new file mode 100644 index 0000000..9ab97f6 --- /dev/null +++ b/vcpkg/ports/aws-c-common/fix-cmake-target-path.patch @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9b01f56..3cc541d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -239,7 +239,7 @@ else() + endif() + + install(EXPORT "${PROJECT_NAME}-targets" +- DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/${TARGET_DIR}" ++ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake" + NAMESPACE AWS:: + COMPONENT Development) + +diff --git a/cmake/aws-c-common-config.cmake b/cmake/aws-c-common-config.cmake +index e495210..b7676c2 100644 +--- a/cmake/aws-c-common-config.cmake ++++ b/cmake/aws-c-common-config.cmake +@@ -4,9 +4,5 @@ if(WIN32 OR UNIX OR APPLE) + find_package(Threads REQUIRED) + endif() + +-if (BUILD_SHARED_LIBS) +- include(${CMAKE_CURRENT_LIST_DIR}/shared/@PROJECT_NAME@-targets.cmake) +-else() +- include(${CMAKE_CURRENT_LIST_DIR}/static/@PROJECT_NAME@-targets.cmake) +-endif() ++include(${CMAKE_CURRENT_LIST_DIR}/@CMAKE_PROJECT_NAME@-targets.cmake) + diff --git a/vcpkg/ports/aws-c-common/portfile.cmake b/vcpkg/ports/aws-c-common/portfile.cmake new file mode 100644 index 0000000..f3704ef --- /dev/null +++ b/vcpkg/ports/aws-c-common/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO awslabs/aws-c-common + REF 4a21a1c0757083a16497fea27886f5f20ccdf334 # v0.4.56 + SHA512 68898a8ac15d5490f45676eabfbe0df9e45370a74c543a28909fd0d85fed48dfcf4bcd6ea2d01d1a036dd352e2e4e0b08c48c63ab2a2b477fe150b46a827136e + HEAD_REF master + PATCHES + disable-error-4068.patch # This patch fixes dependency port compilation failure + disable-internal-crt-option.patch # Disable internal crt option because vcpkg contains crt processing flow + fix-cmake-target-path.patch # Shared libraries and static libraries are not built at the same time +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/aws-c-common/cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/lib/aws-c-common + ${CURRENT_PACKAGES_DIR}/lib/aws-c-common + ) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/aws-c-event-stream/CONTROL b/vcpkg/ports/aws-c-event-stream/CONTROL new file mode 100644 index 0000000..f19d28c --- /dev/null +++ b/vcpkg/ports/aws-c-event-stream/CONTROL @@ -0,0 +1,4 @@ +Source: aws-c-event-stream +Version: 0.1.6 +Description: C99 implementation of the vnd.amazon.event-stream content-type. +Build-Depends: aws-c-common, aws-checksums \ No newline at end of file diff --git a/vcpkg/ports/aws-c-event-stream/fix-cmake-target-path.patch b/vcpkg/ports/aws-c-event-stream/fix-cmake-target-path.patch new file mode 100644 index 0000000..7b310ad --- /dev/null +++ b/vcpkg/ports/aws-c-event-stream/fix-cmake-target-path.patch @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dddcc5d..55ff45f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -92,7 +92,7 @@ else() + endif() + + install(EXPORT "${PROJECT_NAME}-targets" +- DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/${TARGET_DIR}/" ++ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/" + NAMESPACE AWS:: + COMPONENT Development) + +diff --git a/cmake/aws-c-event-stream-config.cmake b/cmake/aws-c-event-stream-config.cmake +index e881cb8..cb817e4 100644 +--- a/cmake/aws-c-event-stream-config.cmake ++++ b/cmake/aws-c-event-stream-config.cmake +@@ -2,9 +2,5 @@ include(CMakeFindDependencyMacro) + find_dependency(aws-c-common) + find_dependency(aws-checksums) + +-if (BUILD_SHARED_LIBS) +- include(${CMAKE_CURRENT_LIST_DIR}/shared/@PROJECT_NAME@-targets.cmake) +-else() +- include(${CMAKE_CURRENT_LIST_DIR}/static/@PROJECT_NAME@-targets.cmake) +-endif() ++include(${CMAKE_CURRENT_LIST_DIR}/@CMAKE_PROJECT_NAME@-targets.cmake) + diff --git a/vcpkg/ports/aws-c-event-stream/portfile.cmake b/vcpkg/ports/aws-c-event-stream/portfile.cmake new file mode 100644 index 0000000..186253a --- /dev/null +++ b/vcpkg/ports/aws-c-event-stream/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO awslabs/aws-c-event-stream + REF 873f1c035a5b6b4698280ee3798d1db5cc9ce86c # v0.1.6 + SHA512 1d043b6915046498f5b94f9c23e0256ab780b11a75ad9ba3c608e26129567482a58787f4e69c4df3c21a29a6d13ed7dddc46869f695bb268e6867298b73edf30 + HEAD_REF master + PATCHES fix-cmake-target-path.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + "-DCMAKE_MODULE_PATH=${CURRENT_INSTALLED_DIR}/share/aws-c-common" +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/aws-c-event-stream/cmake) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/lib/aws-c-event-stream + ${CURRENT_PACKAGES_DIR}/lib/aws-c-event-stream + ) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/aws-checksums/CONTROL b/vcpkg/ports/aws-checksums/CONTROL new file mode 100644 index 0000000..79a420c --- /dev/null +++ b/vcpkg/ports/aws-checksums/CONTROL @@ -0,0 +1,4 @@ +Source: aws-checksums +Version: 0.1.9 +Description: Cross-Platform HW accelerated CRC32c and CRC32 with fallback to efficient SW implementations. +Build-Depends: aws-c-common \ No newline at end of file diff --git a/vcpkg/ports/aws-checksums/fix-cmake-target-path.patch b/vcpkg/ports/aws-checksums/fix-cmake-target-path.patch new file mode 100644 index 0000000..101a537 --- /dev/null +++ b/vcpkg/ports/aws-checksums/fix-cmake-target-path.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 888742b..efdd817 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -140,7 +140,7 @@ else() + endif() + + install(EXPORT "${PROJECT_NAME}-targets" +- DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/${TARGET_DIR}" ++ DESTINATION "${LIBRARY_DIRECTORY}/${PROJECT_NAME}/cmake/" + NAMESPACE AWS:: + COMPONENT Development) + +diff --git a/cmake/aws-checksums-config.cmake b/cmake/aws-checksums-config.cmake +index 6de2e44..84d55d1 100644 +--- a/cmake/aws-checksums-config.cmake ++++ b/cmake/aws-checksums-config.cmake +@@ -1,6 +1,2 @@ +-if (BUILD_SHARED_LIBS) +- include(${CMAKE_CURRENT_LIST_DIR}/shared/@PROJECT_NAME@-targets.cmake) +-else() +- include(${CMAKE_CURRENT_LIST_DIR}/static/@PROJECT_NAME@-targets.cmake) +-endif() ++include(${CMAKE_CURRENT_LIST_DIR}/@CMAKE_PROJECT_NAME@-targets.cmake) + diff --git a/vcpkg/ports/aws-checksums/portfile.cmake b/vcpkg/ports/aws-checksums/portfile.cmake new file mode 100644 index 0000000..86ed6f2 --- /dev/null +++ b/vcpkg/ports/aws-checksums/portfile.cmake @@ -0,0 +1,39 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO awslabs/aws-checksums + REF fb96b3e964fe9bde2625c3ac9547e54d6c802211 # v0.1.9 + SHA512 2cf63a462c900fae8ad101ecac8be6fd6ce3f796e3cecc1b3d19ffba364030d7468a7c7beab91594d2521cab5e99765c7b67fa2fef6f772457e04f75f59962cc + HEAD_REF master + PATCHES fix-cmake-target-path.patch +) + +if (VCPKG_CRT_LINKAGE STREQUAL static) + set(STATIC_CRT_LNK ON) +else() + set(STATIC_CRT_LNK OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSTATIC_CRT=${STATIC_CRT_LNK} + -DCMAKE_MODULE_PATH=${CURRENT_INSTALLED_DIR}/share/aws-c-common # use extra cmake files +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/aws-checksums/cmake) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/lib/aws-checksums + ${CURRENT_PACKAGES_DIR}/lib/aws-checksums +) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/aws-lambda-cpp/CONTROL b/vcpkg/ports/aws-lambda-cpp/CONTROL new file mode 100644 index 0000000..ca3f5aa --- /dev/null +++ b/vcpkg/ports/aws-lambda-cpp/CONTROL @@ -0,0 +1,4 @@ +Source: aws-lambda-cpp +Version: 0.2.6 +Build-Depends: curl +Description: C++ Runtime for AWS Lambda. diff --git a/vcpkg/ports/aws-lambda-cpp/portfile.cmake b/vcpkg/ports/aws-lambda-cpp/portfile.cmake new file mode 100644 index 0000000..7c2cc06 --- /dev/null +++ b/vcpkg/ports/aws-lambda-cpp/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_fail_port_install(ON_TARGET "Windows" "OSX") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO awslabs/aws-lambda-cpp + REF 55276cef2efe18fe13457ebf85df53a81d68be59 # v0.2.6 + SHA512 a865b8c5715e884c0aeb0972d88919084a37b4837ade55d7f4373422c1ffa06a550f6bfe62b6f69b9eb3a352b9a1d4114c72d754bce2d6d3727bebd029fe6631 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + diff --git a/vcpkg/ports/aws-sdk-cpp/CONTROL b/vcpkg/ports/aws-sdk-cpp/CONTROL new file mode 100644 index 0000000..987b730 --- /dev/null +++ b/vcpkg/ports/aws-sdk-cpp/CONTROL @@ -0,0 +1,538 @@ +Source: aws-sdk-cpp +Version: 1.8.4 +Homepage: https://github.com/aws/aws-sdk-cpp +Description: AWS SDK for C++ +Build-Depends: openssl (!uwp&!windows), curl (!uwp&!windows), aws-c-event-stream +Default-Features: dynamodb, s3, kinesis +# Automatically generated by generateFeatures.ps1 + +Feature: access-management +Description: C++ SDK for the AWS access-management service + +Feature: acm +Description: C++ SDK for the AWS acm service + +Feature: acm-pca +Description: C++ SDK for the AWS acm-pca service + +Feature: alexaforbusiness +Description: C++ SDK for the AWS alexaforbusiness service + +Feature: amplify +Description: C++ SDK for the AWS amplify service + +Feature: apigateway +Description: C++ SDK for the AWS apigateway service + +Feature: apigatewaymanagementapi +Description: C++ SDK for the AWS apigatewaymanagementapi service + +Feature: apigatewayv2 +Description: C++ SDK for the AWS apigatewayv2 service + +Feature: application-autoscaling +Description: C++ SDK for the AWS application-autoscaling service + +Feature: appmesh +Description: C++ SDK for the AWS appmesh service + +Feature: appstream +Description: C++ SDK for the AWS appstream service + +Feature: appsync +Description: C++ SDK for the AWS appsync service + +Feature: athena +Description: C++ SDK for the AWS athena service + +Feature: autoscaling +Description: C++ SDK for the AWS autoscaling service + +Feature: autoscaling-plans +Description: C++ SDK for the AWS autoscaling-plans service + +Feature: awsmigrationhub +Description: C++ SDK for the AWS AWSMigrationHub service + +Feature: awstransfer +Description: C++ SDK for the AWS awstransfer service + +Feature: backup +Description: C++ SDK for the AWS backup service + +Feature: batch +Description: C++ SDK for the AWS batch service + +Feature: budgets +Description: C++ SDK for the AWS budgets service + +Feature: ce +Description: C++ SDK for the AWS ce service + +Feature: chime +Description: C++ SDK for the AWS chime service + +Feature: cloud9 +Description: C++ SDK for the AWS cloud9 service + +Feature: clouddirectory +Description: C++ SDK for the AWS clouddirectory service + +Feature: cloudformation +Description: C++ SDK for the AWS cloudformation service + +Feature: cloudfront +Description: C++ SDK for the AWS cloudfront service + +Feature: cloudhsm +Description: C++ SDK for the AWS cloudhsm service + +Feature: cloudhsmv2 +Description: C++ SDK for the AWS cloudhsmv2 service + +Feature: cloudsearch +Description: C++ SDK for the AWS cloudsearch service + +Feature: cloudsearchdomain +Description: C++ SDK for the AWS cloudsearchdomain service + +Feature: cloudtrail +Description: C++ SDK for the AWS cloudtrail service + +Feature: codebuild +Description: C++ SDK for the AWS codebuild service + +Feature: codecommit +Description: C++ SDK for the AWS codecommit service + +Feature: codedeploy +Description: C++ SDK for the AWS codedeploy service + +Feature: codepipeline +Description: C++ SDK for the AWS codepipeline service + +Feature: codestar +Description: C++ SDK for the AWS codestar service + +Feature: cognito-identity +Description: C++ SDK for the AWS cognito-identity service + +Feature: cognito-idp +Description: C++ SDK for the AWS cognito-idp service + +Feature: cognito-sync +Description: C++ SDK for the AWS cognito-sync service + +Feature: comprehend +Description: C++ SDK for the AWS comprehend service + +Feature: comprehendmedical +Description: C++ SDK for the AWS comprehendmedical service + +Feature: config +Description: C++ SDK for the AWS config service + +Feature: connect +Description: C++ SDK for the AWS connect service + +Feature: cur +Description: C++ SDK for the AWS cur service + +Feature: datapipeline +Description: C++ SDK for the AWS datapipeline service + +Feature: datasync +Description: C++ SDK for the AWS datasync service + +Feature: dax +Description: C++ SDK for the AWS dax service + +Feature: devicefarm +Description: C++ SDK for the AWS devicefarm service + +Feature: directconnect +Description: C++ SDK for the AWS directconnect service + +Feature: discovery +Description: C++ SDK for the AWS discovery service + +Feature: dlm +Description: C++ SDK for the AWS dlm service + +Feature: dms +Description: C++ SDK for the AWS dms service + +Feature: docdb +Description: C++ SDK for the AWS docdb service + +Feature: ds +Description: C++ SDK for the AWS ds service + +Feature: dynamodb +Description: C++ SDK for the AWS dynamodb service + +Feature: dynamodbstreams +Description: C++ SDK for the AWS dynamodbstreams service + +Feature: ec2 +Description: C++ SDK for the AWS ec2 service + +Feature: ecr +Description: C++ SDK for the AWS ecr service + +Feature: ecs +Description: C++ SDK for the AWS ecs service + +Feature: eks +Description: C++ SDK for the AWS eks service + +Feature: elasticache +Description: C++ SDK for the AWS elasticache service + +Feature: elasticbeanstalk +Description: C++ SDK for the AWS elasticbeanstalk service + +Feature: elasticfilesystem +Description: C++ SDK for the AWS elasticfilesystem service + +Feature: elasticloadbalancing +Description: C++ SDK for the AWS elasticloadbalancing service + +Feature: elasticloadbalancingv2 +Description: C++ SDK for the AWS elasticloadbalancingv2 service + +Feature: elasticmapreduce +Description: C++ SDK for the AWS elasticmapreduce service + +Feature: elastictranscoder +Description: C++ SDK for the AWS elastictranscoder service + +Feature: email +Description: C++ SDK for the AWS email service + +Feature: es +Description: C++ SDK for the AWS es service + +Feature: events +Description: C++ SDK for the AWS events service + +Feature: firehose +Description: C++ SDK for the AWS firehose service + +Feature: fms +Description: C++ SDK for the AWS fms service + +Feature: fsx +Description: C++ SDK for the AWS fsx service + +Feature: gamelift +Description: C++ SDK for the AWS gamelift service + +Feature: glacier +Description: C++ SDK for the AWS glacier service + +Feature: globalaccelerator +Description: C++ SDK for the AWS globalaccelerator service + +Feature: glue +Description: C++ SDK for the AWS glue service + +Feature: greengrass +Description: C++ SDK for the AWS greengrass service + +Feature: guardduty +Description: C++ SDK for the AWS guardduty service + +Feature: health +Description: C++ SDK for the AWS health service + +Feature: iam +Description: C++ SDK for the AWS iam service + +Feature: identity-management +Description: C++ SDK for the AWS identity-management service + +Feature: importexport +Description: C++ SDK for the AWS importexport service + +Feature: inspector +Description: C++ SDK for the AWS inspector service + +Feature: iot +Description: C++ SDK for the AWS iot service + +Feature: iot-data +Description: C++ SDK for the AWS iot-data service + +Feature: iot-jobs-data +Description: C++ SDK for the AWS iot-jobs-data service + +Feature: iot1click-devices +Description: C++ SDK for the AWS iot1click-devices service + +Feature: iot1click-projects +Description: C++ SDK for the AWS iot1click-projects service + +Feature: iotanalytics +Description: C++ SDK for the AWS iotanalytics service + +Feature: kafka +Description: C++ SDK for the AWS kafka service + +Feature: kinesis +Description: C++ SDK for the AWS kinesis service + +Feature: kinesis-video-archived-media +Description: C++ SDK for the AWS kinesis-video-archived-media service + +Feature: kinesis-video-media +Description: C++ SDK for the AWS kinesis-video-media service + +Feature: kinesisanalytics +Description: C++ SDK for the AWS kinesisanalytics service + +Feature: kinesisanalyticsv2 +Description: C++ SDK for the AWS kinesisanalyticsv2 service + +Feature: kinesisvideo +Description: C++ SDK for the AWS kinesisvideo service + +Feature: kms +Description: C++ SDK for the AWS kms service + +Feature: lambda +Description: C++ SDK for the AWS lambda service + +Feature: lex +Description: C++ SDK for the AWS lex service + +Feature: lex-models +Description: C++ SDK for the AWS lex-models service + +Feature: license-manager +Description: C++ SDK for the AWS license-manager service + +Feature: lightsail +Description: C++ SDK for the AWS lightsail service + +Feature: logs +Description: C++ SDK for the AWS logs service + +Feature: machinelearning +Description: C++ SDK for the AWS machinelearning service + +Feature: macie +Description: C++ SDK for the AWS macie service + +Feature: marketplace-entitlement +Description: C++ SDK for the AWS marketplace-entitlement service + +Feature: marketplacecommerceanalytics +Description: C++ SDK for the AWS marketplacecommerceanalytics service + +Feature: mediaconnect +Description: C++ SDK for the AWS mediaconnect service + +Feature: mediaconvert +Description: C++ SDK for the AWS mediaconvert service + +Feature: medialive +Description: C++ SDK for the AWS medialive service + +Feature: mediapackage +Description: C++ SDK for the AWS mediapackage service + +Feature: mediastore +Description: C++ SDK for the AWS mediastore service + +Feature: mediastore-data +Description: C++ SDK for the AWS mediastore-data service + +Feature: mediatailor +Description: C++ SDK for the AWS mediatailor service + +Feature: meteringmarketplace +Description: C++ SDK for the AWS meteringmarketplace service + +Feature: mobile +Description: C++ SDK for the AWS mobile service + +Feature: mobileanalytics +Description: C++ SDK for the AWS mobileanalytics service + +Feature: monitoring +Description: C++ SDK for the AWS monitoring service + +Feature: mq +Description: C++ SDK for the AWS mq service + +Feature: mturk-requester +Description: C++ SDK for the AWS mturk-requester service + +Feature: neptune +Description: C++ SDK for the AWS neptune service + +Feature: opsworks +Description: C++ SDK for the AWS opsworks service + +Feature: opsworkscm +Description: C++ SDK for the AWS opsworkscm service + +Feature: organizations +Description: C++ SDK for the AWS organizations service + +Feature: pi +Description: C++ SDK for the AWS pi service + +Feature: pinpoint +Description: C++ SDK for the AWS pinpoint service + +Feature: pinpoint-email +Description: C++ SDK for the AWS pinpoint-email service + +Feature: polly +Description: C++ SDK for the AWS polly service + +Feature: pricing +Description: C++ SDK for the AWS pricing service + +Feature: queues +Description: C++ SDK for the AWS queues service + +Feature: quicksight +Description: C++ SDK for the AWS quicksight service + +Feature: ram +Description: C++ SDK for the AWS ram service + +Feature: rds +Description: C++ SDK for the AWS rds service + +Feature: rds-data +Description: C++ SDK for the AWS rds-data service + +Feature: redshift +Description: C++ SDK for the AWS redshift service + +Feature: rekognition +Description: C++ SDK for the AWS rekognition service + +Feature: resource-groups +Description: C++ SDK for the AWS resource-groups service + +Feature: resourcegroupstaggingapi +Description: C++ SDK for the AWS resourcegroupstaggingapi service + +Feature: robomaker +Description: C++ SDK for the AWS robomaker service + +Feature: route53 +Description: C++ SDK for the AWS route53 service + +Feature: route53domains +Description: C++ SDK for the AWS route53domains service + +Feature: route53resolver +Description: C++ SDK for the AWS route53resolver service + +Feature: s3 +Description: C++ SDK for the AWS s3 service + +Feature: s3-encryption +Description: C++ SDK for the AWS s3-encryption service + +Feature: s3control +Description: C++ SDK for the AWS s3control service + +Feature: sagemaker +Description: C++ SDK for the AWS sagemaker service + +Feature: sagemaker-runtime +Description: C++ SDK for the AWS sagemaker-runtime service + +Feature: sdb +Description: C++ SDK for the AWS sdb service + +Feature: secretsmanager +Description: C++ SDK for the AWS secretsmanager service + +Feature: securityhub +Description: C++ SDK for the AWS securityhub service + +Feature: serverlessrepo +Description: C++ SDK for the AWS serverlessrepo service + +Feature: servicecatalog +Description: C++ SDK for the AWS servicecatalog service + +Feature: servicediscovery +Description: C++ SDK for the AWS servicediscovery service + +Feature: shield +Description: C++ SDK for the AWS shield service + +Feature: signer +Description: C++ SDK for the AWS signer service + +Feature: sms +Description: C++ SDK for the AWS sms service + +Feature: sms-voice +Description: C++ SDK for the AWS sms-voice service + +Feature: snowball +Description: C++ SDK for the AWS snowball service + +Feature: sns +Description: C++ SDK for the AWS sns service + +Feature: sqs +Description: C++ SDK for the AWS sqs service + +Feature: ssm +Description: C++ SDK for the AWS ssm service + +Feature: states +Description: C++ SDK for the AWS states service + +Feature: storagegateway +Description: C++ SDK for the AWS storagegateway service + +Feature: sts +Description: C++ SDK for the AWS sts service + +Feature: support +Description: C++ SDK for the AWS support service + +Feature: swf +Description: C++ SDK for the AWS swf service + +Feature: text-to-speech +Description: C++ SDK for the AWS text-to-speech service + +Feature: transcribe +Description: C++ SDK for the AWS transcribe service + +Feature: transfer +Description: C++ SDK for the AWS transfer service + +Feature: translate +Description: C++ SDK for the AWS translate service + +Feature: waf +Description: C++ SDK for the AWS waf service + +Feature: waf-regional +Description: C++ SDK for the AWS waf-regional service + +Feature: workdocs +Description: C++ SDK for the AWS workdocs service + +Feature: workmail +Description: C++ SDK for the AWS workmail service + +Feature: workspaces +Description: C++ SDK for the AWS workspaces service + +Feature: xray +Description: C++ SDK for the AWS xray service diff --git a/vcpkg/ports/aws-sdk-cpp/CONTROL.in b/vcpkg/ports/aws-sdk-cpp/CONTROL.in new file mode 100644 index 0000000..63cce2b --- /dev/null +++ b/vcpkg/ports/aws-sdk-cpp/CONTROL.in @@ -0,0 +1,5 @@ +Source: aws-sdk-cpp +Version: 1.8.4 +Description: AWS SDK for C++ +Build-Depends: openssl (!uwp&!windows), curl (!uwp&!windows), aws-c-event-stream +Default-Features: dynamodb, s3, kinesis diff --git a/vcpkg/ports/aws-sdk-cpp/compute_build_only.cmake b/vcpkg/ports/aws-sdk-cpp/compute_build_only.cmake new file mode 100644 index 0000000..ba9bcb2 --- /dev/null +++ b/vcpkg/ports/aws-sdk-cpp/compute_build_only.cmake @@ -0,0 +1,532 @@ +# Automatically generated by generateFeatures.ps1 +if("access-management" IN_LIST FEATURES) + list(APPEND BUILD_ONLY access-management) +endif() +if("acm" IN_LIST FEATURES) + list(APPEND BUILD_ONLY acm) +endif() +if("acm-pca" IN_LIST FEATURES) + list(APPEND BUILD_ONLY acm-pca) +endif() +if("alexaforbusiness" IN_LIST FEATURES) + list(APPEND BUILD_ONLY alexaforbusiness) +endif() +if("amplify" IN_LIST FEATURES) + list(APPEND BUILD_ONLY amplify) +endif() +if("apigateway" IN_LIST FEATURES) + list(APPEND BUILD_ONLY apigateway) +endif() +if("apigatewaymanagementapi" IN_LIST FEATURES) + list(APPEND BUILD_ONLY apigatewaymanagementapi) +endif() +if("apigatewayv2" IN_LIST FEATURES) + list(APPEND BUILD_ONLY apigatewayv2) +endif() +if("application-autoscaling" IN_LIST FEATURES) + list(APPEND BUILD_ONLY application-autoscaling) +endif() +if("appmesh" IN_LIST FEATURES) + list(APPEND BUILD_ONLY appmesh) +endif() +if("appstream" IN_LIST FEATURES) + list(APPEND BUILD_ONLY appstream) +endif() +if("appsync" IN_LIST FEATURES) + list(APPEND BUILD_ONLY appsync) +endif() +if("athena" IN_LIST FEATURES) + list(APPEND BUILD_ONLY athena) +endif() +if("autoscaling" IN_LIST FEATURES) + list(APPEND BUILD_ONLY autoscaling) +endif() +if("autoscaling-plans" IN_LIST FEATURES) + list(APPEND BUILD_ONLY autoscaling-plans) +endif() +if("awsmigrationhub" IN_LIST FEATURES) + list(APPEND BUILD_ONLY AWSMigrationHub) +endif() +if("awstransfer" IN_LIST FEATURES) + list(APPEND BUILD_ONLY awstransfer) +endif() +if("backup" IN_LIST FEATURES) + list(APPEND BUILD_ONLY backup) +endif() +if("batch" IN_LIST FEATURES) + list(APPEND BUILD_ONLY batch) +endif() +if("budgets" IN_LIST FEATURES) + list(APPEND BUILD_ONLY budgets) +endif() +if("ce" IN_LIST FEATURES) + list(APPEND BUILD_ONLY ce) +endif() +if("chime" IN_LIST FEATURES) + list(APPEND BUILD_ONLY chime) +endif() +if("cloud9" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cloud9) +endif() +if("clouddirectory" IN_LIST FEATURES) + list(APPEND BUILD_ONLY clouddirectory) +endif() +if("cloudformation" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cloudformation) +endif() +if("cloudfront" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cloudfront) +endif() +if("cloudhsm" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cloudhsm) +endif() +if("cloudhsmv2" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cloudhsmv2) +endif() +if("cloudsearch" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cloudsearch) +endif() +if("cloudsearchdomain" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cloudsearchdomain) +endif() +if("cloudtrail" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cloudtrail) +endif() +if("codebuild" IN_LIST FEATURES) + list(APPEND BUILD_ONLY codebuild) +endif() +if("codecommit" IN_LIST FEATURES) + list(APPEND BUILD_ONLY codecommit) +endif() +if("codedeploy" IN_LIST FEATURES) + list(APPEND BUILD_ONLY codedeploy) +endif() +if("codepipeline" IN_LIST FEATURES) + list(APPEND BUILD_ONLY codepipeline) +endif() +if("codestar" IN_LIST FEATURES) + list(APPEND BUILD_ONLY codestar) +endif() +if("cognito-identity" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cognito-identity) +endif() +if("cognito-idp" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cognito-idp) +endif() +if("cognito-sync" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cognito-sync) +endif() +if("comprehend" IN_LIST FEATURES) + list(APPEND BUILD_ONLY comprehend) +endif() +if("comprehendmedical" IN_LIST FEATURES) + list(APPEND BUILD_ONLY comprehendmedical) +endif() +if("config" IN_LIST FEATURES) + list(APPEND BUILD_ONLY config) +endif() +if("connect" IN_LIST FEATURES) + list(APPEND BUILD_ONLY connect) +endif() +if("cur" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cur) +endif() +if("datapipeline" IN_LIST FEATURES) + list(APPEND BUILD_ONLY datapipeline) +endif() +if("datasync" IN_LIST FEATURES) + list(APPEND BUILD_ONLY datasync) +endif() +if("dax" IN_LIST FEATURES) + list(APPEND BUILD_ONLY dax) +endif() +if("devicefarm" IN_LIST FEATURES) + list(APPEND BUILD_ONLY devicefarm) +endif() +if("directconnect" IN_LIST FEATURES) + list(APPEND BUILD_ONLY directconnect) +endif() +if("discovery" IN_LIST FEATURES) + list(APPEND BUILD_ONLY discovery) +endif() +if("dlm" IN_LIST FEATURES) + list(APPEND BUILD_ONLY dlm) +endif() +if("dms" IN_LIST FEATURES) + list(APPEND BUILD_ONLY dms) +endif() +if("docdb" IN_LIST FEATURES) + list(APPEND BUILD_ONLY docdb) +endif() +if("ds" IN_LIST FEATURES) + list(APPEND BUILD_ONLY ds) +endif() +if("dynamodb" IN_LIST FEATURES) + list(APPEND BUILD_ONLY dynamodb) +endif() +if("dynamodbstreams" IN_LIST FEATURES) + list(APPEND BUILD_ONLY dynamodbstreams) +endif() +if("ec2" IN_LIST FEATURES) + list(APPEND BUILD_ONLY ec2) +endif() +if("ecr" IN_LIST FEATURES) + list(APPEND BUILD_ONLY ecr) +endif() +if("ecs" IN_LIST FEATURES) + list(APPEND BUILD_ONLY ecs) +endif() +if("eks" IN_LIST FEATURES) + list(APPEND BUILD_ONLY eks) +endif() +if("elasticache" IN_LIST FEATURES) + list(APPEND BUILD_ONLY elasticache) +endif() +if("elasticbeanstalk" IN_LIST FEATURES) + list(APPEND BUILD_ONLY elasticbeanstalk) +endif() +if("elasticfilesystem" IN_LIST FEATURES) + list(APPEND BUILD_ONLY elasticfilesystem) +endif() +if("elasticloadbalancing" IN_LIST FEATURES) + list(APPEND BUILD_ONLY elasticloadbalancing) +endif() +if("elasticloadbalancingv2" IN_LIST FEATURES) + list(APPEND BUILD_ONLY elasticloadbalancingv2) +endif() +if("elasticmapreduce" IN_LIST FEATURES) + list(APPEND BUILD_ONLY elasticmapreduce) +endif() +if("elastictranscoder" IN_LIST FEATURES) + list(APPEND BUILD_ONLY elastictranscoder) +endif() +if("email" IN_LIST FEATURES) + list(APPEND BUILD_ONLY email) +endif() +if("es" IN_LIST FEATURES) + list(APPEND BUILD_ONLY es) +endif() +if("events" IN_LIST FEATURES) + list(APPEND BUILD_ONLY events) +endif() +if("firehose" IN_LIST FEATURES) + list(APPEND BUILD_ONLY firehose) +endif() +if("fms" IN_LIST FEATURES) + list(APPEND BUILD_ONLY fms) +endif() +if("fsx" IN_LIST FEATURES) + list(APPEND BUILD_ONLY fsx) +endif() +if("gamelift" IN_LIST FEATURES) + list(APPEND BUILD_ONLY gamelift) +endif() +if("glacier" IN_LIST FEATURES) + list(APPEND BUILD_ONLY glacier) +endif() +if("globalaccelerator" IN_LIST FEATURES) + list(APPEND BUILD_ONLY globalaccelerator) +endif() +if("glue" IN_LIST FEATURES) + list(APPEND BUILD_ONLY glue) +endif() +if("greengrass" IN_LIST FEATURES) + list(APPEND BUILD_ONLY greengrass) +endif() +if("guardduty" IN_LIST FEATURES) + list(APPEND BUILD_ONLY guardduty) +endif() +if("health" IN_LIST FEATURES) + list(APPEND BUILD_ONLY health) +endif() +if("iam" IN_LIST FEATURES) + list(APPEND BUILD_ONLY iam) +endif() +if("identity-management" IN_LIST FEATURES) + list(APPEND BUILD_ONLY identity-management) +endif() +if("importexport" IN_LIST FEATURES) + list(APPEND BUILD_ONLY importexport) +endif() +if("inspector" IN_LIST FEATURES) + list(APPEND BUILD_ONLY inspector) +endif() +if("iot" IN_LIST FEATURES) + list(APPEND BUILD_ONLY iot) +endif() +if("iot-data" IN_LIST FEATURES) + list(APPEND BUILD_ONLY iot-data) +endif() +if("iot-jobs-data" IN_LIST FEATURES) + list(APPEND BUILD_ONLY iot-jobs-data) +endif() +if("iot1click-devices" IN_LIST FEATURES) + list(APPEND BUILD_ONLY iot1click-devices) +endif() +if("iot1click-projects" IN_LIST FEATURES) + list(APPEND BUILD_ONLY iot1click-projects) +endif() +if("iotanalytics" IN_LIST FEATURES) + list(APPEND BUILD_ONLY iotanalytics) +endif() +if("kafka" IN_LIST FEATURES) + list(APPEND BUILD_ONLY kafka) +endif() +if("kinesis" IN_LIST FEATURES) + list(APPEND BUILD_ONLY kinesis) +endif() +if("kinesis-video-archived-media" IN_LIST FEATURES) + list(APPEND BUILD_ONLY kinesis-video-archived-media) +endif() +if("kinesis-video-media" IN_LIST FEATURES) + list(APPEND BUILD_ONLY kinesis-video-media) +endif() +if("kinesisanalytics" IN_LIST FEATURES) + list(APPEND BUILD_ONLY kinesisanalytics) +endif() +if("kinesisanalyticsv2" IN_LIST FEATURES) + list(APPEND BUILD_ONLY kinesisanalyticsv2) +endif() +if("kinesisvideo" IN_LIST FEATURES) + list(APPEND BUILD_ONLY kinesisvideo) +endif() +if("kms" IN_LIST FEATURES) + list(APPEND BUILD_ONLY kms) +endif() +if("lambda" IN_LIST FEATURES) + list(APPEND BUILD_ONLY lambda) +endif() +if("lex" IN_LIST FEATURES) + list(APPEND BUILD_ONLY lex) +endif() +if("lex-models" IN_LIST FEATURES) + list(APPEND BUILD_ONLY lex-models) +endif() +if("license-manager" IN_LIST FEATURES) + list(APPEND BUILD_ONLY license-manager) +endif() +if("lightsail" IN_LIST FEATURES) + list(APPEND BUILD_ONLY lightsail) +endif() +if("logs" IN_LIST FEATURES) + list(APPEND BUILD_ONLY logs) +endif() +if("machinelearning" IN_LIST FEATURES) + list(APPEND BUILD_ONLY machinelearning) +endif() +if("macie" IN_LIST FEATURES) + list(APPEND BUILD_ONLY macie) +endif() +if("marketplace-entitlement" IN_LIST FEATURES) + list(APPEND BUILD_ONLY marketplace-entitlement) +endif() +if("marketplacecommerceanalytics" IN_LIST FEATURES) + list(APPEND BUILD_ONLY marketplacecommerceanalytics) +endif() +if("mediaconnect" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mediaconnect) +endif() +if("mediaconvert" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mediaconvert) +endif() +if("medialive" IN_LIST FEATURES) + list(APPEND BUILD_ONLY medialive) +endif() +if("mediapackage" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mediapackage) +endif() +if("mediastore" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mediastore) +endif() +if("mediastore-data" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mediastore-data) +endif() +if("mediatailor" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mediatailor) +endif() +if("meteringmarketplace" IN_LIST FEATURES) + list(APPEND BUILD_ONLY meteringmarketplace) +endif() +if("mobile" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mobile) +endif() +if("mobileanalytics" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mobileanalytics) +endif() +if("monitoring" IN_LIST FEATURES) + list(APPEND BUILD_ONLY monitoring) +endif() +if("mq" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mq) +endif() +if("mturk-requester" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mturk-requester) +endif() +if("neptune" IN_LIST FEATURES) + list(APPEND BUILD_ONLY neptune) +endif() +if("opsworks" IN_LIST FEATURES) + list(APPEND BUILD_ONLY opsworks) +endif() +if("opsworkscm" IN_LIST FEATURES) + list(APPEND BUILD_ONLY opsworkscm) +endif() +if("organizations" IN_LIST FEATURES) + list(APPEND BUILD_ONLY organizations) +endif() +if("pi" IN_LIST FEATURES) + list(APPEND BUILD_ONLY pi) +endif() +if("pinpoint" IN_LIST FEATURES) + list(APPEND BUILD_ONLY pinpoint) +endif() +if("pinpoint-email" IN_LIST FEATURES) + list(APPEND BUILD_ONLY pinpoint-email) +endif() +if("polly" IN_LIST FEATURES) + list(APPEND BUILD_ONLY polly) +endif() +if("pricing" IN_LIST FEATURES) + list(APPEND BUILD_ONLY pricing) +endif() +if("queues" IN_LIST FEATURES) + list(APPEND BUILD_ONLY queues) +endif() +if("quicksight" IN_LIST FEATURES) + list(APPEND BUILD_ONLY quicksight) +endif() +if("ram" IN_LIST FEATURES) + list(APPEND BUILD_ONLY ram) +endif() +if("rds" IN_LIST FEATURES) + list(APPEND BUILD_ONLY rds) +endif() +if("rds-data" IN_LIST FEATURES) + list(APPEND BUILD_ONLY rds-data) +endif() +if("redshift" IN_LIST FEATURES) + list(APPEND BUILD_ONLY redshift) +endif() +if("rekognition" IN_LIST FEATURES) + list(APPEND BUILD_ONLY rekognition) +endif() +if("resource-groups" IN_LIST FEATURES) + list(APPEND BUILD_ONLY resource-groups) +endif() +if("resourcegroupstaggingapi" IN_LIST FEATURES) + list(APPEND BUILD_ONLY resourcegroupstaggingapi) +endif() +if("robomaker" IN_LIST FEATURES) + list(APPEND BUILD_ONLY robomaker) +endif() +if("route53" IN_LIST FEATURES) + list(APPEND BUILD_ONLY route53) +endif() +if("route53domains" IN_LIST FEATURES) + list(APPEND BUILD_ONLY route53domains) +endif() +if("route53resolver" IN_LIST FEATURES) + list(APPEND BUILD_ONLY route53resolver) +endif() +if("s3" IN_LIST FEATURES) + list(APPEND BUILD_ONLY s3) +endif() +if("s3-encryption" IN_LIST FEATURES) + list(APPEND BUILD_ONLY s3-encryption) +endif() +if("s3control" IN_LIST FEATURES) + list(APPEND BUILD_ONLY s3control) +endif() +if("sagemaker" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sagemaker) +endif() +if("sagemaker-runtime" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sagemaker-runtime) +endif() +if("sdb" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sdb) +endif() +if("secretsmanager" IN_LIST FEATURES) + list(APPEND BUILD_ONLY secretsmanager) +endif() +if("securityhub" IN_LIST FEATURES) + list(APPEND BUILD_ONLY securityhub) +endif() +if("serverlessrepo" IN_LIST FEATURES) + list(APPEND BUILD_ONLY serverlessrepo) +endif() +if("servicecatalog" IN_LIST FEATURES) + list(APPEND BUILD_ONLY servicecatalog) +endif() +if("servicediscovery" IN_LIST FEATURES) + list(APPEND BUILD_ONLY servicediscovery) +endif() +if("shield" IN_LIST FEATURES) + list(APPEND BUILD_ONLY shield) +endif() +if("signer" IN_LIST FEATURES) + list(APPEND BUILD_ONLY signer) +endif() +if("sms" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sms) +endif() +if("sms-voice" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sms-voice) +endif() +if("snowball" IN_LIST FEATURES) + list(APPEND BUILD_ONLY snowball) +endif() +if("sns" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sns) +endif() +if("sqs" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sqs) +endif() +if("ssm" IN_LIST FEATURES) + list(APPEND BUILD_ONLY ssm) +endif() +if("states" IN_LIST FEATURES) + list(APPEND BUILD_ONLY states) +endif() +if("storagegateway" IN_LIST FEATURES) + list(APPEND BUILD_ONLY storagegateway) +endif() +if("sts" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sts) +endif() +if("support" IN_LIST FEATURES) + list(APPEND BUILD_ONLY support) +endif() +if("swf" IN_LIST FEATURES) + list(APPEND BUILD_ONLY swf) +endif() +if("text-to-speech" IN_LIST FEATURES) + list(APPEND BUILD_ONLY text-to-speech) +endif() +if("transcribe" IN_LIST FEATURES) + list(APPEND BUILD_ONLY transcribe) +endif() +if("transfer" IN_LIST FEATURES) + list(APPEND BUILD_ONLY transfer) +endif() +if("translate" IN_LIST FEATURES) + list(APPEND BUILD_ONLY translate) +endif() +if("waf" IN_LIST FEATURES) + list(APPEND BUILD_ONLY waf) +endif() +if("waf-regional" IN_LIST FEATURES) + list(APPEND BUILD_ONLY waf-regional) +endif() +if("workdocs" IN_LIST FEATURES) + list(APPEND BUILD_ONLY workdocs) +endif() +if("workmail" IN_LIST FEATURES) + list(APPEND BUILD_ONLY workmail) +endif() +if("workspaces" IN_LIST FEATURES) + list(APPEND BUILD_ONLY workspaces) +endif() +if("xray" IN_LIST FEATURES) + list(APPEND BUILD_ONLY xray) +endif() diff --git a/vcpkg/ports/aws-sdk-cpp/generateFeatures.ps1 b/vcpkg/ports/aws-sdk-cpp/generateFeatures.ps1 new file mode 100644 index 0000000..8c8b1a3 --- /dev/null +++ b/vcpkg/ports/aws-sdk-cpp/generateFeatures.ps1 @@ -0,0 +1,51 @@ +[CmdletBinding()] +param( + [Parameter(Mandatory=$true)][string]$ExtractedSources, + [Parameter(Mandatory=$true)][string]$ControlFileIn, + [Parameter(Mandatory=$true)][string]$ControlFile, + [Parameter(Mandatory=$true)][string]$CMakeFragmentFile +) + +$subfolders = Get-Item $ExtractedSources\aws-cpp-sdk-* + +$controltext = gc $ControlFileIn +$controltext += @("# Automatically generated by generateFeatures.ps1") + +$cmakefragmenttext = @("# Automatically generated by generateFeatures.ps1") + +function GetDescription($dir, $modulename) +{ + if (Test-Path "$dir\CMakeLists.txt") + { + $descs = @(Select-String -Path "$dir\CMakeLists.txt" -Pattern "`"C\+\+ SDK for the AWS [^`"]*`"") + if ($descs.count -eq 1) { + $desc = $descs[0].Matches.Value -replace "`"","" + "Description: $desc" + } + else { "Description: C++ SDK for the AWS $modulename service" } + } + else { "Description: C++ SDK for the AWS $modulename service" } +} + +$subfolders | % { + $modulename = $_.name -replace "^aws-cpp-sdk-","" + if ($modulename -match "-tests`$") { return } + if ($modulename -match "-sample`$") { return } + if ($modulename -eq "core") { return } + + $controltext += @("") + $controltext += @("Feature: $modulename") + $controltext += @(GetDescription $_ $modulename) + + $cmakefragmenttext += @( + "if(`"$modulename`" IN_LIST FEATURES)", + " list(APPEND BUILD_ONLY $modulename)", + "endif()" + ) +} + +Write-Verbose ($controltext -join "`n") +[IO.File]::WriteAllText($ControlFile, ($controltext -join "`n")+"`n") + +Write-Verbose ($cmakefragmenttext -join "`n") +[IO.File]::WriteAllText($CMakeFragmentFile, ($cmakefragmenttext -join "`n") +"`n") diff --git a/vcpkg/ports/aws-sdk-cpp/portfile.cmake b/vcpkg/ports/aws-sdk-cpp/portfile.cmake new file mode 100644 index 0000000..be9f619 --- /dev/null +++ b/vcpkg/ports/aws-sdk-cpp/portfile.cmake @@ -0,0 +1,81 @@ +vcpkg_buildpath_length_warning(37) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO aws/aws-sdk-cpp + REF 819b17b3915b1e6a9b704998efcaa51711dd1357 # 1.8.4 + SHA512 73647ca3426226236c476533d31038ebc8763d3f604b36089b10e645296c5012041cbc2c5bb8cec5d9ae593fe266edbef7bf278c924746f25186d3e6fc183158 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" FORCE_SHARED_CRT) + +set(BUILD_ONLY core) + +include(${CMAKE_CURRENT_LIST_DIR}/compute_build_only.cmake) + +string(REPLACE ";" "\\\\\\\\\\\;" BUILD_ONLY "${BUILD_ONLY}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE + PREFER_NINJA + OPTIONS + -DENABLE_UNITY_BUILD=ON + -DENABLE_TESTING=OFF + -DFORCE_SHARED_CRT=${FORCE_SHARED_CRT} + -DCMAKE_DISABLE_FIND_PACKAGE_Git=TRUE + "-DBUILD_ONLY=${BUILD_ONLY}" + -DBUILD_DEPS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share) + +vcpkg_copy_pdbs() + +file(GLOB_RECURSE AWS_TARGETS "${CURRENT_PACKAGES_DIR}/share/*/*-targets-*.cmake") +foreach(AWS_TARGET IN LISTS AWS_TARGETS) + file(READ ${AWS_TARGET} _contents) + string(REGEX REPLACE + "bin\\/([A-Za-z0-9_.-]+\\.lib)" + "lib/\\1" + _contents "${_contents}") + file(WRITE ${AWS_TARGET} "${_contents}") +endforeach() + +file(GLOB AWS_CONFIGS "${CURRENT_PACKAGES_DIR}/share/*/aws-cpp-sdk-*-config.cmake") +list(FILTER AWS_CONFIGS EXCLUDE REGEX "aws-cpp-sdk-core-config\\.cmake\$") +foreach(AWS_CONFIG IN LISTS AWS_CONFIGS) + file(READ "${AWS_CONFIG}" _contents) + file(WRITE "${AWS_CONFIG}" "include(CMakeFindDependencyMacro)\nfind_dependency(aws-cpp-sdk-core)\n${_contents}") +endforeach() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/share/AWSSDK + ${CURRENT_PACKAGES_DIR}/lib/pkgconfig + ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig + ${CURRENT_PACKAGES_DIR}/nuget + ${CURRENT_PACKAGES_DIR}/debug/nuget +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(GLOB LIB_FILES ${CURRENT_PACKAGES_DIR}/bin/*.lib) + if(LIB_FILES) + file(COPY ${LIB_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(REMOVE ${LIB_FILES}) + endif() + file(GLOB DEBUG_LIB_FILES ${CURRENT_PACKAGES_DIR}/debug/bin/*.lib) + if(DEBUG_LIB_FILES) + file(COPY ${DEBUG_LIB_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(REMOVE ${DEBUG_LIB_FILES}) + endif() + + file(APPEND ${CURRENT_PACKAGES_DIR}/include/aws/core/SDKConfig.h "#ifndef USE_IMPORT_EXPORT\n#define USE_IMPORT_EXPORT\n#endif") +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/azmq/CONTROL b/vcpkg/ports/azmq/CONTROL new file mode 100644 index 0000000..8d29c6d --- /dev/null +++ b/vcpkg/ports/azmq/CONTROL @@ -0,0 +1,7 @@ +Source: azmq +Version: 2020-03-03 +Build-Depends: boost-asio, boost-assert, boost-config, boost-container, boost-format, boost-intrusive, boost-iterator, boost-lexical-cast, boost-logic, boost-optional, boost-random, boost-range, boost-regex, boost-system, boost-thread, boost-utility, zeromq +Homepage: https://github.com/zeromq/azmq +Description: Boost Asio style bindings for ZeroMQ + This library is built on top of ZeroMQ's standard C interface and is intended to work well with C++ applications which use the Boost libraries in general, and Asio in particular. + The main abstraction exposed by the library is azmq::socket which provides an Asio style socket interface to the underlying zeromq socket and interfaces with Asio's io_service(). The socket implementation participates in the io_service's reactor for asynchronous IO and may be freely mixed with other Asio socket types (raw TCP/UDP/Serial/etc.). diff --git a/vcpkg/ports/azmq/portfile.cmake b/vcpkg/ports/azmq/portfile.cmake new file mode 100644 index 0000000..c2d333f --- /dev/null +++ b/vcpkg/ports/azmq/portfile.cmake @@ -0,0 +1,13 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zeromq/azmq + REF 6bb101eecb357ad9735ebc36e276b7526652d42d # commit on 2019-05-01 + SHA512 18812fd73c3c57aca8b17c2df0af01afb7864253d6ac6ce042e01ef04e81dd454438c9d01f5bb0fd7a4a445082a2eb3dd334ca1e05dafbe4ba602cad95ce7134 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/azmq DESTINATION ${CURRENT_PACKAGES_DIR}/include/) + +file(INSTALL + ${SOURCE_PATH}/LICENSE-BOOST_1_0 + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/azure-c-shared-utility/CONTROL b/vcpkg/ports/azure-c-shared-utility/CONTROL new file mode 100644 index 0000000..6546575 --- /dev/null +++ b/vcpkg/ports/azure-c-shared-utility/CONTROL @@ -0,0 +1,10 @@ +Source: azure-c-shared-utility +Version: 2020-07-19 +Description: Azure C SDKs common code +Homepage: https://github.com/Azure/azure-c-shared-utility +Build-Depends: curl (linux), openssl (linux), azure-macro-utils-c, umock-c +Supports: !uwp + +Feature: public-preview +Description: Azure C SDKs common code (public preview) +Build-Depends: curl (linux), openssl (linux), azure-macro-utils-c[public-preview], umock-c[public-preview] diff --git a/vcpkg/ports/azure-c-shared-utility/fix-utilityFunctions-conditions-preview.patch b/vcpkg/ports/azure-c-shared-utility/fix-utilityFunctions-conditions-preview.patch new file mode 100644 index 0000000..c89d92f --- /dev/null +++ b/vcpkg/ports/azure-c-shared-utility/fix-utilityFunctions-conditions-preview.patch @@ -0,0 +1,248 @@ +diff --git a/configs/azure_c_shared_utilityFunctions.cmake b/configs/azure_c_shared_utilityFunctions.cmake +index e85defa..7f450ab 100644 +--- a/configs/azure_c_shared_utilityFunctions.cmake ++++ b/configs/azure_c_shared_utilityFunctions.cmake +@@ -2,11 +2,11 @@ + #Licensed under the MIT license. See LICENSE file in the project root for full license information. + + function(target_link_libraries_with_arg_prefix arg_prefix whatIsBuilding lib) +- if(${arg_prefix} STREQUAL "debug") ++ if(arg_prefix STREQUAL "debug") + target_link_libraries(${whatIsBuilding} debug ${lib}) +- elseif(${arg_prefix} STREQUAL "optimized") ++ elseif(arg_prefix STREQUAL "optimized") + target_link_libraries(${whatIsBuilding} optimized ${lib}) +- elseif(${arg_prefix} STREQUAL "general") ++ elseif(arg_prefix STREQUAL "general") + target_link_libraries(${whatIsBuilding} general ${lib}) + else() + target_link_libraries(${whatIsBuilding} ${lib}) +@@ -43,13 +43,13 @@ function(windows_unittests_add_dll whatIsBuilding) + set(ARG_PREFIX "none") + foreach(f ${ARGN}) + set(skip_to_next FALSE) +- if(${f} STREQUAL "ADDITIONAL_LIBS") ++ if(f STREQUAL "ADDITIONAL_LIBS") + SET(PARSING_ADDITIONAL_LIBS ON) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) + set(ARG_PREFIX "none") + #also unset all the other states + set(skip_to_next TRUE) +- elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") ++ elseif(f STREQUAL "VALGRIND_SUPPRESSIONS_FILE") + SET(PARSING_ADDITIONAL_LIBS OFF) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) + set(skip_to_next TRUE) +@@ -57,7 +57,7 @@ function(windows_unittests_add_dll whatIsBuilding) + + if(NOT skip_to_next) + if(PARSING_ADDITIONAL_LIBS) +- if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) ++ if((f STREQUAL "debug") OR (f STREQUAL "optimized") OR (f STREQUAL "general")) + SET(ARG_PREFIX ${f}) + else() + target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_dll ${f}) +@@ -90,13 +90,13 @@ function(windows_unittests_add_exe whatIsBuilding) + set(ARG_PREFIX "none") + foreach(f ${ARGN}) + set(skip_to_next FALSE) +- if(${f} STREQUAL "ADDITIONAL_LIBS") ++ if(f STREQUAL "ADDITIONAL_LIBS") + SET(PARSING_ADDITIONAL_LIBS ON) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) + set(ARG_PREFIX "none") + #also unset all the other states + set(skip_to_next TRUE) +- elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") ++ elseif(f STREQUAL "VALGRIND_SUPPRESSIONS_FILE") + SET(PARSING_ADDITIONAL_LIBS OFF) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) + set(skip_to_next TRUE) +@@ -104,7 +104,7 @@ function(windows_unittests_add_exe whatIsBuilding) + + if(NOT skip_to_next) + if(PARSING_ADDITIONAL_LIBS) +- if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) ++ if((f STREQUAL "debug") OR (f STREQUAL "optimized") OR (f STREQUAL "general")) + SET(ARG_PREFIX ${f}) + else() + target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_exe ${f}) +@@ -150,14 +150,14 @@ function(linux_unittests_add_exe whatIsBuilding) + set(ARG_PREFIX "none") + foreach(f ${ARGN}) + set(skip_to_next FALSE) +- if(${f} STREQUAL "ADDITIONAL_LIBS") ++ if(f STREQUAL "ADDITIONAL_LIBS") + SET(PARSING_ADDITIONAL_LIBS ON) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) + set(ARG_PREFIX "none") + set(skip_to_next TRUE) + #also unset all the other states + +- elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") ++ elseif(f STREQUAL "VALGRIND_SUPPRESSIONS_FILE") + SET(PARSING_ADDITIONAL_LIBS OFF) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) + set(skip_to_next TRUE) +@@ -165,7 +165,7 @@ function(linux_unittests_add_exe whatIsBuilding) + + if(NOT skip_to_next) + if(PARSING_ADDITIONAL_LIBS) +- if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) ++ if((f STREQUAL "debug") OR (f STREQUAL "optimized") OR (f STREQUAL "general")) + SET(ARG_PREFIX ${f}) + else() + target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_exe ${f}) +@@ -184,7 +184,7 @@ function(linux_unittests_add_exe whatIsBuilding) + + if(${run_valgrind}) + find_program(VALGRIND_FOUND NAMES valgrind) +- if(${VALGRIND_FOUND} STREQUAL VALGRIND_FOUND-NOTFOUND) ++ if(VALGRIND_FOUND STREQUAL VALGRIND_FOUND-NOTFOUND) + message(WARNING "run_valgrind was TRUE, but valgrind was not found - there will be no tests run under valgrind") + else() + add_test(NAME ${whatIsBuilding}_valgrind COMMAND valgrind --num-callers=100 --error-exitcode=1 --leak-check=full --track-origins=yes ${VALGRIND_SUPPRESSIONS_FILE_EXTRA_PARAMETER} $) +@@ -307,13 +307,13 @@ function(c_windows_unittests_add_dll whatIsBuilding folder) + set(ARG_PREFIX "none") + foreach(f ${ARGN}) + set(skip_to_next FALSE) +- if(${f} STREQUAL "ADDITIONAL_LIBS") ++ if(f STREQUAL "ADDITIONAL_LIBS") + SET(PARSING_ADDITIONAL_LIBS ON) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) + set(ARG_PREFIX "none") + #also unset all the other states + set(skip_to_next TRUE) +- elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") ++ elseif(f STREQUAL "VALGRIND_SUPPRESSIONS_FILE") + SET(PARSING_ADDITIONAL_LIBS OFF) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) + set(skip_to_next TRUE) +@@ -321,7 +321,7 @@ function(c_windows_unittests_add_dll whatIsBuilding folder) + + if(NOT skip_to_next) + if(PARSING_ADDITIONAL_LIBS) +- if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) ++ if((f STREQUAL "debug") OR (f STREQUAL "optimized") OR (f STREQUAL "general")) + SET(ARG_PREFIX ${f}) + else() + target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_dll ${f}) +@@ -369,13 +369,13 @@ function(c_windows_unittests_add_exe whatIsBuilding folder) + set(ARG_PREFIX "none") + foreach(f ${ARGN}) + set(skip_to_next FALSE) +- if(${f} STREQUAL "ADDITIONAL_LIBS") ++ if(f STREQUAL "ADDITIONAL_LIBS") + SET(PARSING_ADDITIONAL_LIBS ON) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) + set(ARG_PREFIX "none") + #also unset all the other states + set(skip_to_next TRUE) +- elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") ++ elseif(f STREQUAL "VALGRIND_SUPPRESSIONS_FILE") + SET(PARSING_ADDITIONAL_LIBS OFF) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) + set(skip_to_next TRUE) +@@ -383,7 +383,7 @@ function(c_windows_unittests_add_exe whatIsBuilding folder) + + if(NOT skip_to_next) + if(PARSING_ADDITIONAL_LIBS) +- if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) ++ if((f STREQUAL "debug") OR (f STREQUAL "optimized") OR (f STREQUAL "general")) + SET(ARG_PREFIX ${f}) + else() + target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_exe ${f}) +@@ -429,13 +429,13 @@ function(c_linux_unittests_add_exe whatIsBuilding folder) + set(ARG_PREFIX "none") + foreach(f ${ARGN}) + set(skip_to_next FALSE) +- if(${f} STREQUAL "ADDITIONAL_LIBS") ++ if(f STREQUAL "ADDITIONAL_LIBS") + SET(PARSING_ADDITIONAL_LIBS ON) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) + set(ARG_PREFIX "none") + #also unset all the other states + set(skip_to_next TRUE) +- elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") ++ elseif(f STREQUAL "VALGRIND_SUPPRESSIONS_FILE") + SET(PARSING_ADDITIONAL_LIBS OFF) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) + set(skip_to_next TRUE) +@@ -443,7 +443,7 @@ function(c_linux_unittests_add_exe whatIsBuilding folder) + + if(NOT skip_to_next) + if(PARSING_ADDITIONAL_LIBS) +- if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) ++ if((f STREQUAL "debug") OR (f STREQUAL "optimized") OR (f STREQUAL "general")) + SET(ARG_PREFIX ${f}) + else() + target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_exe ${f}) +@@ -462,7 +462,7 @@ function(c_linux_unittests_add_exe whatIsBuilding folder) + + if(${run_valgrind}) + find_program(VALGRIND_FOUND NAMES valgrind) +- if(${VALGRIND_FOUND} STREQUAL VALGRIND_FOUND-NOTFOUND) ++ if(VALGRIND_FOUND STREQUAL VALGRIND_FOUND-NOTFOUND) + message(WARNING "run_valgrind was TRUE, but valgrind was not found - there will be no tests run under valgrind") + else() + add_test(NAME ${whatIsBuilding}_valgrind COMMAND valgrind --gen-suppressions=all --num-callers=100 --error-exitcode=1 --leak-check=full --track-origins=yes ${VALGRIND_SUPPRESSIONS_FILE_EXTRA_PARAMETER} $) +@@ -546,29 +546,29 @@ function(compile_c_test_artifacts_as whatIsBuilding compileAsWhat) + (("${whatIsBuilding}" MATCHES ".*int.*") AND ${run_int_tests}) + ) + if (${use_cppunittest}) +- if(${compileAsWhat} STREQUAL "C99") ++ if(compileAsWhat STREQUAL "C99") + compileTargetAsC99(${whatIsBuilding}_dll) + compileTargetAsC99(${whatIsBuilding}_testsonly_lib) + endif() +- if(${compileAsWhat} STREQUAL "C11") ++ if(compileAsWhat STREQUAL "C11") + compileTargetAsC11(${whatIsBuilding}_dll) + compileTargetAsC11(${whatIsBuilding}_testsonly_lib) + endif() + endif() +- if(${compileAsWhat} STREQUAL "C99") ++ if(compileAsWhat STREQUAL "C99") + compileTargetAsC99(${whatIsBuilding}_exe) + endif() +- if(${compileAsWhat} STREQUAL "C11") ++ if(compileAsWhat STREQUAL "C11") + compileTargetAsC11(${whatIsBuilding}_exe) + endif() + else() + if( + (("${whatIsBuilding}" MATCHES ".*e2e.*") AND ${nuget_e2e_tests}) + ) +- if(${compileAsWhat} STREQUAL "C99") ++ if(compileAsWhat STREQUAL "C99") + compileTargetAsC99(${whatIsBuilding}_exe) + endif() +- if(${compileAsWhat} STREQUAL "C11") ++ if(compileAsWhat STREQUAL "C11") + compileTargetAsC11(${whatIsBuilding}_exe) + endif() + else() +@@ -581,10 +581,10 @@ function(compile_c_test_artifacts_as whatIsBuilding compileAsWhat) + (("${whatIsBuilding}" MATCHES ".*e2e.*") AND ${run_e2e_tests}) OR + (("${whatIsBuilding}" MATCHES ".*int.*") AND ${run_int_tests}) + ) +- if(${compileAsWhat} STREQUAL "C99") ++ if(compileAsWhat STREQUAL "C99") + compileTargetAsC99(${whatIsBuilding}_exe) + endif() +- if(${compileAsWhat} STREQUAL "C11") ++ if(compileAsWhat STREQUAL "C11") + compileTargetAsC11(${whatIsBuilding}_exe) + endif() + endif() +@@ -641,8 +641,8 @@ function(set_platform_files c_shared_dir) + set(CONDITION_C_FILE ${c_shared_dir}/adapters/condition_win32.c PARENT_SCOPE) + endif() + if(use_etw) +- if(${use_etw} OR (${use_etw} STREQUAL "ON_WITH_CONSOLE")) +- if (${use_etw} STREQUAL "ON_WITH_CONSOLE") ++ if(use_etw OR (use_etw STREQUAL "ON_WITH_CONSOLE")) ++ if (use_etw STREQUAL "ON_WITH_CONSOLE") + set(XLOGGING_C_FILE ${c_shared_dir}/src/etwxlogging.c PARENT_SCOPE) + set(LOGGING_C_FILE ${c_shared_dir}/src/etwlogger_driver.c ${c_shared_dir}/src/consolelogger.c PARENT_SCOPE) + set(LOGGING_RC_FILE ${c_shared_dir}/res/etwlogger.rc CACHE INTERNAL "") diff --git a/vcpkg/ports/azure-c-shared-utility/fix-utilityFunctions-conditions.patch b/vcpkg/ports/azure-c-shared-utility/fix-utilityFunctions-conditions.patch new file mode 100644 index 0000000..7b60af9 --- /dev/null +++ b/vcpkg/ports/azure-c-shared-utility/fix-utilityFunctions-conditions.patch @@ -0,0 +1,256 @@ +diff --git a/configs/azure_c_shared_utilityFunctions.cmake b/configs/azure_c_shared_utilityFunctions.cmake +index 6c2f415..e6133af 100644 +--- a/configs/azure_c_shared_utilityFunctions.cmake ++++ b/configs/azure_c_shared_utilityFunctions.cmake +@@ -2,11 +2,11 @@ + #Licensed under the MIT license. See LICENSE file in the project root for full license information. + + function(target_link_libraries_with_arg_prefix arg_prefix whatIsBuilding lib) +- if(${arg_prefix} STREQUAL "debug") ++ if(arg_prefix STREQUAL "debug") + target_link_libraries(${whatIsBuilding} debug ${lib}) +- elseif(${arg_prefix} STREQUAL "optimized") ++ elseif(arg_prefix STREQUAL "optimized") + target_link_libraries(${whatIsBuilding} optimized ${lib}) +- elseif(${arg_prefix} STREQUAL "general") ++ elseif(arg_prefix STREQUAL "general") + target_link_libraries(${whatIsBuilding} general ${lib}) + else() + target_link_libraries(${whatIsBuilding} ${lib}) +@@ -43,13 +43,13 @@ function(windows_unittests_add_dll whatIsBuilding) + set(ARG_PREFIX "none") + foreach(f ${ARGN}) + set(skip_to_next FALSE) +- if(${f} STREQUAL "ADDITIONAL_LIBS") ++ if(f STREQUAL "ADDITIONAL_LIBS") + SET(PARSING_ADDITIONAL_LIBS ON) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) + set(ARG_PREFIX "none") + #also unset all the other states + set(skip_to_next TRUE) +- elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") ++ elseif(f STREQUAL "VALGRIND_SUPPRESSIONS_FILE") + SET(PARSING_ADDITIONAL_LIBS OFF) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) + set(skip_to_next TRUE) +@@ -57,7 +57,7 @@ function(windows_unittests_add_dll whatIsBuilding) + + if(NOT skip_to_next) + if(PARSING_ADDITIONAL_LIBS) +- if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) ++ if((f STREQUAL "debug") OR (f STREQUAL "optimized") OR (f STREQUAL "general")) + SET(ARG_PREFIX ${f}) + else() + target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_dll ${f}) +@@ -90,13 +90,13 @@ function(windows_unittests_add_exe whatIsBuilding) + set(ARG_PREFIX "none") + foreach(f ${ARGN}) + set(skip_to_next FALSE) +- if(${f} STREQUAL "ADDITIONAL_LIBS") ++ if(f STREQUAL "ADDITIONAL_LIBS") + SET(PARSING_ADDITIONAL_LIBS ON) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) + set(ARG_PREFIX "none") + #also unset all the other states + set(skip_to_next TRUE) +- elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") ++ elseif(f STREQUAL "VALGRIND_SUPPRESSIONS_FILE") + SET(PARSING_ADDITIONAL_LIBS OFF) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) + set(skip_to_next TRUE) +@@ -104,7 +104,7 @@ function(windows_unittests_add_exe whatIsBuilding) + + if(NOT skip_to_next) + if(PARSING_ADDITIONAL_LIBS) +- if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) ++ if((f STREQUAL "debug") OR (f STREQUAL "optimized") OR (f STREQUAL "general")) + SET(ARG_PREFIX ${f}) + else() + target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_exe ${f}) +@@ -150,14 +150,14 @@ function(linux_unittests_add_exe whatIsBuilding) + set(ARG_PREFIX "none") + foreach(f ${ARGN}) + set(skip_to_next FALSE) +- if(${f} STREQUAL "ADDITIONAL_LIBS") ++ if(f STREQUAL "ADDITIONAL_LIBS") + SET(PARSING_ADDITIONAL_LIBS ON) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) + set(ARG_PREFIX "none") + set(skip_to_next TRUE) + #also unset all the other states + +- elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") ++ elseif(f STREQUAL "VALGRIND_SUPPRESSIONS_FILE") + SET(PARSING_ADDITIONAL_LIBS OFF) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) + set(skip_to_next TRUE) +@@ -165,7 +165,7 @@ function(linux_unittests_add_exe whatIsBuilding) + + if(NOT skip_to_next) + if(PARSING_ADDITIONAL_LIBS) +- if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) ++ if((f STREQUAL "debug") OR (f STREQUAL "optimized") OR (f STREQUAL "general")) + SET(ARG_PREFIX ${f}) + else() + target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_exe ${f}) +@@ -184,7 +184,7 @@ function(linux_unittests_add_exe whatIsBuilding) + + if(${run_valgrind}) + find_program(VALGRIND_FOUND NAMES valgrind) +- if(${VALGRIND_FOUND} STREQUAL VALGRIND_FOUND-NOTFOUND) ++ if(VALGRIND_FOUND STREQUAL VALGRIND_FOUND-NOTFOUND) + message(WARNING "run_valgrind was TRUE, but valgrind was not found - there will be no tests run under valgrind") + else() + add_test(NAME ${whatIsBuilding}_valgrind COMMAND valgrind --num-callers=100 --error-exitcode=1 --leak-check=full --track-origins=yes ${VALGRIND_SUPPRESSIONS_FILE_EXTRA_PARAMETER} $) +@@ -307,13 +307,13 @@ function(c_windows_unittests_add_dll whatIsBuilding folder) + set(ARG_PREFIX "none") + foreach(f ${ARGN}) + set(skip_to_next FALSE) +- if(${f} STREQUAL "ADDITIONAL_LIBS") ++ if(f STREQUAL "ADDITIONAL_LIBS") + SET(PARSING_ADDITIONAL_LIBS ON) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) + set(ARG_PREFIX "none") + #also unset all the other states + set(skip_to_next TRUE) +- elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") ++ elseif(f STREQUAL "VALGRIND_SUPPRESSIONS_FILE") + SET(PARSING_ADDITIONAL_LIBS OFF) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) + set(skip_to_next TRUE) +@@ -321,7 +321,7 @@ function(c_windows_unittests_add_dll whatIsBuilding folder) + + if(NOT skip_to_next) + if(PARSING_ADDITIONAL_LIBS) +- if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) ++ if((f STREQUAL "debug") OR (f STREQUAL "optimized") OR (f STREQUAL "general")) + SET(ARG_PREFIX ${f}) + else() + target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_dll ${f}) +@@ -369,13 +369,13 @@ function(c_windows_unittests_add_exe whatIsBuilding folder) + set(ARG_PREFIX "none") + foreach(f ${ARGN}) + set(skip_to_next FALSE) +- if(${f} STREQUAL "ADDITIONAL_LIBS") ++ if(f STREQUAL "ADDITIONAL_LIBS") + SET(PARSING_ADDITIONAL_LIBS ON) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) + set(ARG_PREFIX "none") + #also unset all the other states + set(skip_to_next TRUE) +- elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") ++ elseif(f STREQUAL "VALGRIND_SUPPRESSIONS_FILE") + SET(PARSING_ADDITIONAL_LIBS OFF) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) + set(skip_to_next TRUE) +@@ -383,7 +383,7 @@ function(c_windows_unittests_add_exe whatIsBuilding folder) + + if(NOT skip_to_next) + if(PARSING_ADDITIONAL_LIBS) +- if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) ++ if((f STREQUAL "debug") OR (f STREQUAL "optimized") OR (f STREQUAL "general")) + SET(ARG_PREFIX ${f}) + else() + target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_exe ${f}) +@@ -429,13 +429,13 @@ function(c_linux_unittests_add_exe whatIsBuilding folder) + set(ARG_PREFIX "none") + foreach(f ${ARGN}) + set(skip_to_next FALSE) +- if(${f} STREQUAL "ADDITIONAL_LIBS") ++ if(f STREQUAL "ADDITIONAL_LIBS") + SET(PARSING_ADDITIONAL_LIBS ON) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) + set(ARG_PREFIX "none") + #also unset all the other states + set(skip_to_next TRUE) +- elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") ++ elseif(f STREQUAL "VALGRIND_SUPPRESSIONS_FILE") + SET(PARSING_ADDITIONAL_LIBS OFF) + SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) + set(skip_to_next TRUE) +@@ -443,7 +443,7 @@ function(c_linux_unittests_add_exe whatIsBuilding folder) + + if(NOT skip_to_next) + if(PARSING_ADDITIONAL_LIBS) +- if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) ++ if((f STREQUAL "debug") OR (f STREQUAL "optimized") OR (f STREQUAL "general")) + SET(ARG_PREFIX ${f}) + else() + target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_exe ${f}) +@@ -462,7 +462,7 @@ function(c_linux_unittests_add_exe whatIsBuilding folder) + + if(${run_valgrind}) + find_program(VALGRIND_FOUND NAMES valgrind) +- if(${VALGRIND_FOUND} STREQUAL VALGRIND_FOUND-NOTFOUND) ++ if(VALGRIND_FOUND STREQUAL VALGRIND_FOUND-NOTFOUND) + message(WARNING "run_valgrind was TRUE, but valgrind was not found - there will be no tests run under valgrind") + else() + add_test(NAME ${whatIsBuilding}_valgrind COMMAND valgrind --gen-suppressions=all --num-callers=100 --error-exitcode=1 --leak-check=full --track-origins=yes ${VALGRIND_SUPPRESSIONS_FILE_EXTRA_PARAMETER} $) +@@ -546,29 +546,29 @@ function(compile_c_test_artifacts_as whatIsBuilding compileAsWhat) + (("${whatIsBuilding}" MATCHES ".*int.*") AND ${run_int_tests}) + ) + if (${use_cppunittest}) +- if(${compileAsWhat} STREQUAL "C99") ++ if(compileAsWhat STREQUAL "C99") + compileTargetAsC99(${whatIsBuilding}_dll) + compileTargetAsC99(${whatIsBuilding}_testsonly_lib) + endif() +- if(${compileAsWhat} STREQUAL "C11") ++ if(compileAsWhat STREQUAL "C11") + compileTargetAsC11(${whatIsBuilding}_dll) + compileTargetAsC11(${whatIsBuilding}_testsonly_lib) + endif() + endif() +- if(${compileAsWhat} STREQUAL "C99") ++ if(compileAsWhat STREQUAL "C99") + compileTargetAsC99(${whatIsBuilding}_exe) + endif() +- if(${compileAsWhat} STREQUAL "C11") ++ if(compileAsWhat STREQUAL "C11") + compileTargetAsC11(${whatIsBuilding}_exe) + endif() + else() + if( + (("${whatIsBuilding}" MATCHES ".*e2e.*") AND ${nuget_e2e_tests}) + ) +- if(${compileAsWhat} STREQUAL "C99") ++ if(compileAsWhat STREQUAL "C99") + compileTargetAsC99(${whatIsBuilding}_exe) + endif() +- if(${compileAsWhat} STREQUAL "C11") ++ if(compileAsWhat STREQUAL "C11") + compileTargetAsC11(${whatIsBuilding}_exe) + endif() + else() +@@ -581,10 +581,10 @@ function(compile_c_test_artifacts_as whatIsBuilding compileAsWhat) + (("${whatIsBuilding}" MATCHES ".*e2e.*") AND ${run_e2e_tests}) OR + (("${whatIsBuilding}" MATCHES ".*int.*") AND ${run_int_tests}) + ) +- if(${compileAsWhat} STREQUAL "C99") ++ if(compileAsWhat STREQUAL "C99") + compileTargetAsC99(${whatIsBuilding}_exe) + endif() +- if(${compileAsWhat} STREQUAL "C11") ++ if(compileAsWhat STREQUAL "C11") + compileTargetAsC11(${whatIsBuilding}_exe) + endif() + endif() +@@ -641,15 +641,15 @@ function(set_platform_files c_shared_dir) + set(CONDITION_C_FILE ${c_shared_dir}/adapters/condition_win32.c PARENT_SCOPE) + endif() + +- if(${use_etw} STREQUAL "OFF") ++ if(use_etw STREQUAL "OFF") + set(XLOGGING_C_FILE ${c_shared_dir}/src/xlogging.c PARENT_SCOPE) + set(LOGGING_C_FILE ${c_shared_dir}/src/consolelogger.c PARENT_SCOPE) + set(LOGGING_H_FILE ${c_shared_dir}/inc/azure_c_shared_utility/consolelogger.h PARENT_SCOPE) +- elseif(${use_etw} STREQUAL "TRACELOGGING") ++ elseif(use_etw STREQUAL "TRACELOGGING") + set(XLOGGING_C_FILE ${c_shared_dir}/src/etwxlogging.c PARENT_SCOPE) + set(LOGGING_C_FILE ${c_shared_dir}/src/etwlogger_driver.c PARENT_SCOPE) + set(LOGGING_H_FILE ${c_shared_dir}/inc/azure_c_shared_utility/etwlogger_driver.h PARENT_SCOPE) +- elseif(${use_etw} STREQUAL "TRACELOGGING_WITH_CONSOLE") ++ elseif(use_etw STREQUAL "TRACELOGGING_WITH_CONSOLE") + set(XLOGGING_C_FILE ${c_shared_dir}/src/etwxlogging.c PARENT_SCOPE) + set(LOGGING_C_FILE ${c_shared_dir}/src/etwlogger_driver.c ${c_shared_dir}/src/consolelogger.c PARENT_SCOPE) + set(LOGGING_H_FILE ${c_shared_dir}/inc/azure_c_shared_utility/etwlogger_driver.h ${c_shared_dir}/inc/azure_c_shared_utility/consolelogger.h PARENT_SCOPE) diff --git a/vcpkg/ports/azure-c-shared-utility/portfile.cmake b/vcpkg/ports/azure-c-shared-utility/portfile.cmake new file mode 100644 index 0000000..ccc9b68 --- /dev/null +++ b/vcpkg/ports/azure-c-shared-utility/portfile.cmake @@ -0,0 +1,47 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +if("public-preview" IN_LIST FEATURES) + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-c-shared-utility + REF 42574842914591aadc77701aac72f18cc72319ad + SHA512 dfe6ccede4bebdb3a39fbfea1dc55ddca57cced0d2656ee4bed1a5e5c9c434e1f2d892eb4e29bbb424cb9a02f2374a95fb9a020442bea580d39c242efad1b789 + HEAD_REF master + PATCHES + fix-utilityFunctions-conditions-preview.patch + ) +else() + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-c-shared-utility + REF 65c27eb4ab9a8bbe36b4d7c5a0e9ad305becb8b4 + SHA512 48c65111b12e895f9c2087964d7291e6d1629242194fed9b33ead8ca438f16c803786cd55761eabdd12d47c9920542cff0e510bf16f16cac1d60049ba205df0e + HEAD_REF master + PATCHES + fix-utilityFunctions-conditions.patch + ) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -Dskip_samples=ON + -Duse_installed_dependencies=ON + -Duse_default_uuid=ON + -Dbuild_as_dynamic=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/azure_c_shared_utility) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(COPY ${SOURCE_PATH}/configs/azure_iot_build_rules.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/azure-iot-sdk-c/CONTROL b/vcpkg/ports/azure-iot-sdk-c/CONTROL new file mode 100644 index 0000000..6344bde --- /dev/null +++ b/vcpkg/ports/azure-iot-sdk-c/CONTROL @@ -0,0 +1,13 @@ +Source: azure-iot-sdk-c +Version: 2020-07-19 +Port-Version: 1 +Build-Depends: azure-uamqp-c, azure-umqtt-c, azure-c-shared-utility, parson, azure-uhttp-c, azure-macro-utils-c, umock-c +Description: A C99 SDK for connecting devices to Microsoft Azure IoT services +Homepage: https://github.com/Azure/azure-iot-sdk-c + +Feature: public-preview +Description: A version of the azure-iot-sdk-c containing public-preview features. +Build-Depends: azure-uamqp-c[public-preview], azure-umqtt-c[public-preview], azure-c-shared-utility[public-preview], azure-uhttp-c[public-preview], azure-macro-utils-c[public-preview], umock-c[public-preview] + +Feature: use-prov-client +Description: Enables device provisioning client for DPS diff --git a/vcpkg/ports/azure-iot-sdk-c/fix-cmake.patch b/vcpkg/ports/azure-iot-sdk-c/fix-cmake.patch new file mode 100644 index 0000000..b75b4ca --- /dev/null +++ b/vcpkg/ports/azure-iot-sdk-c/fix-cmake.patch @@ -0,0 +1,40 @@ +diff --git a/provisioning_client/CMakeLists.txt b/provisioning_client/CMakeLists.txt +index c39188dca..d4ef43cb3 100644 +--- a/provisioning_client/CMakeLists.txt ++++ b/provisioning_client/CMakeLists.txt +@@ -359,7 +359,7 @@ if(${use_installed_dependencies}) + set(CMAKE_INSTALL_LIBDIR "lib") + endif() + +- install(TARGETS ${provisioning_libs} EXPORT azure_prov_sdksTargets ++ install(TARGETS ${provisioning_libs} EXPORT azure_iot_sdksTargets + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/../bin +@@ -374,26 +374,6 @@ if(${use_installed_dependencies}) + VERSION ${PROV_SDK_VERSION} + COMPATIBILITY SameMajorVersion + ) +- +- configure_file("../configs/${PROJECT_NAME}Config.cmake" +- "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake" +- COPYONLY +- ) +- +- install(EXPORT azure_prov_sdksTargets +- FILE +- "${PROJECT_NAME}Targets.cmake" +- DESTINATION +- ${package_location} +- ) +- +- install( +- FILES +- "../configs/${PROJECT_NAME}Config.cmake" +- "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake" +- DESTINATION +- ${package_location} +- ) + else() + # Install Provisioning libs + if(NOT DEFINED CMAKE_INSTALL_LIBDIR) diff --git a/vcpkg/ports/azure-iot-sdk-c/improve-external-deps.patch b/vcpkg/ports/azure-iot-sdk-c/improve-external-deps.patch new file mode 100644 index 0000000..171964b --- /dev/null +++ b/vcpkg/ports/azure-iot-sdk-c/improve-external-deps.patch @@ -0,0 +1,117 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a8011fb..9fc05c7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -155,17 +155,6 @@ endif() + # Use solution folders. + set_property(GLOBAL PROPERTY USE_FOLDERS ON) + +-# build the parson library for json parsing +-add_library(parson +- ./deps/parson/parson.c +- ./deps/parson/parson.h +-) +-if (MSVC) +- set_source_files_properties(../deps/parson/parson.c PROPERTIES COMPILE_FLAGS "/wd4244 /wd4232") +-endif() +-set(parson_h_install_files ./deps/parson/parson.h) +-set(parson_install_libs parson) +- + if (IN_OPENWRT) + ADD_DEFINITIONS("$ENV{TARGET_LDFLAGS}" "$ENV{TARGET_CPPFLAGS}" "$ENV{TARGET_CFLAGS}") + INCLUDE_DIRECTORIES("$ENV{TOOLCHAIN_DIR}/usr/include" "$ENV{TARGET_LDFLAGS}" "$ENV{TARGET_CPPFLAGS}" "$ENV{TARGET_CFLAGS}") +diff --git a/configs/azure_iot_sdksConfig.cmake b/configs/azure_iot_sdksConfig.cmake +index b9c62e8..edf5847 100644 +--- a/configs/azure_iot_sdksConfig.cmake ++++ b/configs/azure_iot_sdksConfig.cmake +@@ -1,5 +1,10 @@ + #Copyright (c) Microsoft. All rights reserved. + #Licensed under the MIT license. See LICENSE file in the project root for full license information. ++include(CMakeFindDependencyMacro) ++find_dependency(unofficial-parson) ++find_dependency(uamqp) ++find_dependency(umqtt) ++find_dependency(azure_c_shared_utility) + + include("${CMAKE_CURRENT_LIST_DIR}/azure_iot_sdksTargets.cmake") + +diff --git a/dependencies.cmake b/dependencies.cmake +index fd06df6..c0e06fa 100644 +--- a/dependencies.cmake ++++ b/dependencies.cmake +@@ -18,6 +18,9 @@ if(${use_installed_dependencies}) + endif () + endif () + ++ find_package(unofficial-parson REQUIRED) ++ link_libraries(unofficial::parson::parson) ++ + else () + add_subdirectory(c-utility) + +diff --git a/iothub_client/tests/iothubclient_amqp_dt_e2e/CMakeLists.txt b/iothub_client/tests/iothubclient_amqp_dt_e2e/CMakeLists.txt +index 161872a..d53e111 100644 +--- a/iothub_client/tests/iothubclient_amqp_dt_e2e/CMakeLists.txt ++++ b/iothub_client/tests/iothubclient_amqp_dt_e2e/CMakeLists.txt +@@ -31,12 +31,10 @@ set(${theseTestsName}_nuget_c_files + + set(${theseTestsName}_c_files + ../../../certs/certs.c +- ../../../deps/parson/parson.c + ) + + set(${theseTestsName}_h_files + ../../../certs/certs.h +- ../../../deps/parson/parson.h + ../common_dt_e2e/iothubclient_common_dt_e2e.h + ) + +diff --git a/iothub_client/tests/iothubclient_mqtt_dt_e2e/CMakeLists.txt b/iothub_client/tests/iothubclient_mqtt_dt_e2e/CMakeLists.txt +index d472161..b0291e8 100644 +--- a/iothub_client/tests/iothubclient_mqtt_dt_e2e/CMakeLists.txt ++++ b/iothub_client/tests/iothubclient_mqtt_dt_e2e/CMakeLists.txt +@@ -31,12 +31,10 @@ set(${theseTestsName}_nuget_c_files + + set(${theseTestsName}_c_files + ../../../certs/certs.c +- ../../../deps/parson/parson.c + ) + + set(${theseTestsName}_h_files + ../../../certs/certs.h +- ../../../deps/parson/parson.h + ../common_dt_e2e/iothubclient_common_dt_e2e.h + ) + +diff --git a/iothub_client/tests/iothubclient_mqtt_dt_e2e_sfc/CMakeLists.txt b/iothub_client/tests/iothubclient_mqtt_dt_e2e_sfc/CMakeLists.txt +index d05d654..5872c8d 100644 +--- a/iothub_client/tests/iothubclient_mqtt_dt_e2e_sfc/CMakeLists.txt ++++ b/iothub_client/tests/iothubclient_mqtt_dt_e2e_sfc/CMakeLists.txt +@@ -31,12 +31,10 @@ set(${theseTestsName}_nuget_c_files + + set(${theseTestsName}_c_files + ../../../certs/certs.c +- ../../../deps/parson/parson.c + ) + + set(${theseTestsName}_h_files + ../../../certs/certs.h +- ../../../deps/parson/parson.h + ../common_dt_e2e/iothubclient_common_dt_e2e.h + ) + +diff --git a/iothub_service_client/CMakeLists.txt b/iothub_service_client/CMakeLists.txt +index e47473e..b073513 100644 +--- a/iothub_service_client/CMakeLists.txt ++++ b/iothub_service_client/CMakeLists.txt +@@ -81,9 +81,7 @@ endif() + setSdkTargetBuildProperties(iothub_service_client) + + if(NOT ${nuget_e2e_tests}) +- target_link_libraries(iothub_service_client uamqp parson) +-else() +- target_link_libraries(iothub_service_client parson) ++ target_link_libraries(iothub_service_client uamqp) + endif() + + if (NOT ${ARCHITECTURE} STREQUAL "ARM") diff --git a/vcpkg/ports/azure-iot-sdk-c/portfile.cmake b/vcpkg/ports/azure-iot-sdk-c/portfile.cmake new file mode 100644 index 0000000..db460aa --- /dev/null +++ b/vcpkg/ports/azure-iot-sdk-c/portfile.cmake @@ -0,0 +1,54 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +if("public-preview" IN_LIST FEATURES) + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-iot-sdk-c + REF cb2e8d390df56ffa31d08ca0a79ab58ff96160cc + SHA512 6798b17d6768b3ccbd0eb66719b50f364cd951736eb71110e2dc9deca054a1566ff88b9e8c5e9b52536e4308cad6cd3cbebff3282c123083e3afaee5535e724b + HEAD_REF public-preview + PATCHES + improve-external-deps.patch + fix-cmake.patch + ) +else() + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-iot-sdk-c + REF f464326f10cbba497b71c4aa263b6a22e1b375fe + SHA512 32dfb2ac697755af3646b07259298fc2f27007ab1a0a27da0be4f597c82dd2f8bbad6f07b4ed01dfbb62d86649d4be913c59e1e76b33efec112beaaba550d375 + HEAD_REF master + PATCHES + improve-external-deps.patch + fix-cmake.patch + ) +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + use-prov-client hsm_type_symm_key + use-prov-client use_prov_client +) + +file(COPY ${CURRENT_INSTALLED_DIR}/share/azure-c-shared-utility/azure_iot_build_rules.cmake DESTINATION ${SOURCE_PATH}/deps/azure-c-shared-utility/configs/) +file(COPY ${SOURCE_PATH}/configs/azure_iot_sdksFunctions.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/cmake/azure_iot_sdks/) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -Dskip_samples=ON + -Duse_installed_dependencies=ON + -Duse_default_uuid=ON + -Dbuild_as_dynamic=OFF + -Duse_edge_modules=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/azure_iot_sdks) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +vcpkg_copy_pdbs() \ No newline at end of file diff --git a/vcpkg/ports/azure-kinect-sensor-sdk/CONTROL b/vcpkg/ports/azure-kinect-sensor-sdk/CONTROL new file mode 100644 index 0000000..f0e78a1 --- /dev/null +++ b/vcpkg/ports/azure-kinect-sensor-sdk/CONTROL @@ -0,0 +1,12 @@ +Source: azure-kinect-sensor-sdk +Version: 1.4.0-alpha.0-5 +Homepage: https://github.com/microsoft/Azure-Kinect-Sensor-SDK +Description: Azure Kinect SDK is a cross platform (Linux and Windows) user mode SDK to read data from your Azure Kinect device. +Build-Depends: azure-c-shared-utility, glfw3, gtest, imgui, libusb, spdlog, cjson, ebml, libjpeg-turbo, matroska, libsoundio, libyuv + +Feature: docs +Description: Build K4A doxygen documentation. + +Feature: tool +Description: Build tools. +Build-Depends: gl3w, glew, imgui[bindings] \ No newline at end of file diff --git a/vcpkg/ports/azure-kinect-sensor-sdk/disable-c4275.patch b/vcpkg/ports/azure-kinect-sensor-sdk/disable-c4275.patch new file mode 100644 index 0000000..354d1cc --- /dev/null +++ b/vcpkg/ports/azure-kinect-sensor-sdk/disable-c4275.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e36009e..58a092e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -117,7 +117,7 @@ endif() + # add jpeg-turbo library to jpeg libraries. + set(JPEG_LIBRARIES ${JPEG_LIBRARIES} ${JPEG_TURBO}) + # Fix embl error +-add_compile_options(/wd4828 /wd4251) ++add_compile_options(/wd4828 /wd4251 /wd4275) + + # Find all dependencies + add_subdirectory(extern) diff --git a/vcpkg/ports/azure-kinect-sensor-sdk/fix-builds.patch b/vcpkg/ports/azure-kinect-sensor-sdk/fix-builds.patch new file mode 100644 index 0000000..52240c6 --- /dev/null +++ b/vcpkg/ports/azure-kinect-sensor-sdk/fix-builds.patch @@ -0,0 +1,662 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4967b94..e36009e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -27,8 +27,6 @@ option(K4A_BUILD_DOCS "Build K4A doxygen documentation" OFF) + option(K4A_MTE_VERSION "Skip FW version check" OFF) + option(K4A_SOURCE_LINK "Enable source linking on MSVC" OFF) + +-include(GitCommands) +- + # Set the project version + include(K4AProjectVersion) + +@@ -100,6 +98,27 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" STREQUAL + set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) + endif() + ++find_package(azure_c_shared_utility CONFIG REQUIRED) ++find_package(glfw3 CONFIG REQUIRED) ++find_package(cJSON CONFIG REQUIRED) ++find_package(gtest CONFIG REQUIRED) ++find_package(imgui CONFIG REQUIRED) ++find_package(EBML CONFIG REQUIRED) ++find_package(JPEG REQUIRED) ++find_library(JPEG_TURBO turbojpeg REQUIRED) ++find_package(Matroska CONFIG REQUIRED) ++find_package(libsoundio CONFIG REQUIRED) ++find_library(LibUSB libusb-1.0 REQUIRED) ++find_package(libyuv CONFIG REQUIRED) ++find_package(spdlog CONFIG REQUIRED) ++if (BUILD_TOOLS) ++ find_package(gl3w CONFIG REQUIRED) ++endif() ++# add jpeg-turbo library to jpeg libraries. ++set(JPEG_LIBRARIES ${JPEG_LIBRARIES} ${JPEG_TURBO}) ++# Fix embl error ++add_compile_options(/wd4828 /wd4251) ++ + # Find all dependencies + add_subdirectory(extern) + +@@ -160,10 +179,16 @@ if ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC") + endif() + endif() + +-add_subdirectory(examples) +-add_subdirectory(src) +-add_subdirectory(tests) +-add_subdirectory(tools) ++if (BUILD_EXAMPLES) ++ add_subdirectory(examples) ++endif() ++ add_subdirectory(src) ++if (WITH_TEST) ++ add_subdirectory(tests) ++endif() ++if (BUILD_TOOLS) ++ add_subdirectory(tools) ++endif() + + if (K4A_BUILD_DOCS) + find_package(Doxygen 1.8.14 EXACT) +diff --git a/examples/green_screen/CMakeLists.txt b/examples/green_screen/CMakeLists.txt +index 423ca68..0c7cc0a 100644 +--- a/examples/green_screen/CMakeLists.txt ++++ b/examples/green_screen/CMakeLists.txt +@@ -7,9 +7,9 @@ target_include_directories( green_screen PRIVATE ${OpenCV_INCLUDE_DIRS} ) + # OpenCV_LIBS, by default, is picking up the debug version of opencv on Windows even in release mode, which was causing a dependency on non-redistributable Visual Studio dlls. + if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") +- target_link_libraries(green_screen PRIVATE k4a::k4a ${OpenCV_DIR}/Opencv_world320d.lib) ++ target_link_libraries(green_screen PRIVATE k4a::k4a ${OpenCV_LIBS}) + else() +- target_link_libraries(green_screen PRIVATE k4a::k4a ${OpenCV_DIR}/Opencv_world320.lib) ++ target_link_libraries(green_screen PRIVATE k4a::k4a ${OpenCV_LIBS}) + endif() + else() + target_link_libraries(green_screen PRIVATE k4a::k4a ${OpenCV_LIBS}) +diff --git a/examples/opencv_compatibility/CMakeLists.txt b/examples/opencv_compatibility/CMakeLists.txt +index ef72e99..f1faeb7 100644 +--- a/examples/opencv_compatibility/CMakeLists.txt ++++ b/examples/opencv_compatibility/CMakeLists.txt +@@ -7,9 +7,9 @@ target_include_directories( opencv_example PRIVATE ${OpenCV_INCLUDE_DIRS} ) + # OpenCV_LIBS, by default, is picking up the debug version of opencv on Windows even in release mode, which was causing a dependency on non-redistributable Visual Studio dlls. + if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") +- target_link_libraries(opencv_example PRIVATE k4a::k4a ${OpenCV_DIR}/Opencv_world320d.lib) ++ target_link_libraries(opencv_example PRIVATE k4a::k4a ${OpenCV_LIBS}) + else() +- target_link_libraries(opencv_example PRIVATE k4a::k4a ${OpenCV_DIR}/Opencv_world320.lib) ++ target_link_libraries(opencv_example PRIVATE k4a::k4a ${OpenCV_LIBS}) + endif() + else() + target_link_libraries(opencv_example PRIVATE k4a::k4a ${OpenCV_LIBS}) +diff --git a/examples/transformation/CMakeLists.txt b/examples/transformation/CMakeLists.txt +index e5b41e6..8f7f7f3 100644 +--- a/examples/transformation/CMakeLists.txt ++++ b/examples/transformation/CMakeLists.txt +@@ -9,5 +9,5 @@ add_executable(transformation_example + target_link_libraries(transformation_example PRIVATE + k4a::k4a + k4a::k4arecord +- libjpeg-turbo::libjpeg-turbo ++ ${JPEG_LIBRARIES} + ) +diff --git a/examples/viewer/opengl/CMakeLists.txt b/examples/viewer/opengl/CMakeLists.txt +index 166fe2a..a3db07f 100644 +--- a/examples/viewer/opengl/CMakeLists.txt ++++ b/examples/viewer/opengl/CMakeLists.txt +@@ -14,6 +14,6 @@ add_executable(viewer_opengl + + target_link_libraries(viewer_opengl PRIVATE + k4a::k4a +- glfw::glfw ++ glfw + imgui::imgui + ${OPENGL_LIBRARIES}) +\ No newline at end of file +diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt +index cb4f7b4..c102766 100644 +--- a/extern/CMakeLists.txt ++++ b/extern/CMakeLists.txt +@@ -1,7 +1,6 @@ + # External dependencies are pulled in via submodules. Lets make sure the user + # has updated all the submodules +-if ((NOT K4A_TURNED_ON_GIT_SUBMODULES_RECURSE) OR +- (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/azure_c_shared/src/CMakeLists.txt")) ++if (0) + find_package(Git REQUIRED QUIET) + if (Git_FOUND) + get_git_dir(${K4A_SOURCE_DIR} GIT_DIR) +@@ -57,18 +56,4 @@ endif() + # lower than CMake 3.3 + set(CMAKE_POLICY_DEFAULT_CMP0063 NEW) + +-add_subdirectory(azure_c_shared) +-add_subdirectory(cjson) +-add_subdirectory(glfw) +-add_subdirectory(googletest) +-add_subdirectory(imgui) +-add_subdirectory(libebml) +-add_subdirectory(libjpeg-turbo) +-add_subdirectory(libmatroska) +-add_subdirectory(libsoundio) +-add_subdirectory(libyuv) + add_subdirectory(libuvc) +-add_subdirectory(spdlog) +-if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "WindowsStore") +- add_subdirectory(libusb) +-endif() +diff --git a/src/allocator/CMakeLists.txt b/src/allocator/CMakeLists.txt +index 7140274..3bb6747 100644 +--- a/src/allocator/CMakeLists.txt ++++ b/src/allocator/CMakeLists.txt +@@ -11,7 +11,7 @@ target_include_directories(k4a_allocator PUBLIC + + # Dependencies of this library + target_link_libraries(k4a_allocator PUBLIC +- azure::aziotsharedutil ++ aziotsharedutil + k4ainternal::image + k4ainternal::logging) + +diff --git a/src/calibration/CMakeLists.txt b/src/calibration/CMakeLists.txt +index e96b7d0..ed69f41 100644 +--- a/src/calibration/CMakeLists.txt ++++ b/src/calibration/CMakeLists.txt +@@ -11,7 +11,7 @@ target_include_directories(k4a_calibration PUBLIC + + # Dependencies of this library + target_link_libraries(k4a_calibration PUBLIC +- cJSON::cJSON ++ cjson + k4ainternal::logging) + + # Define alias for other targets to link against +diff --git a/src/calibration/calibration.c b/src/calibration/calibration.c +index f046ef2..3d23ada 100644 +--- a/src/calibration/calibration.c ++++ b/src/calibration/calibration.c +@@ -6,7 +6,7 @@ + + // Dependent libraries + #include +-#include ++#include + + // System dependencies + #include +diff --git a/src/capturesync/CMakeLists.txt b/src/capturesync/CMakeLists.txt +index a434593..bcb19ba 100644 +--- a/src/capturesync/CMakeLists.txt ++++ b/src/capturesync/CMakeLists.txt +@@ -11,7 +11,7 @@ target_include_directories(k4a_capturesync PUBLIC + + # Dependencies of this library + target_link_libraries(k4a_capturesync PUBLIC +- azure::aziotsharedutil ++ aziotsharedutil + k4ainternal::logging) + + # Define alias for other targets to link against +diff --git a/src/dewrapper/CMakeLists.txt b/src/dewrapper/CMakeLists.txt +index 2756e43..f736fd1 100644 +--- a/src/dewrapper/CMakeLists.txt ++++ b/src/dewrapper/CMakeLists.txt +@@ -10,7 +10,7 @@ target_include_directories(k4a_dewrapper PUBLIC + ${K4A_PRIV_INCLUDE_DIR}) + + target_link_libraries(k4a_dewrapper PUBLIC +- azure::aziotsharedutil ++ aziotsharedutil + k4ainternal::allocator + k4ainternal::calibration + k4ainternal::logging +diff --git a/src/image/CMakeLists.txt b/src/image/CMakeLists.txt +index c40999b..82406e2 100644 +--- a/src/image/CMakeLists.txt ++++ b/src/image/CMakeLists.txt +@@ -11,7 +11,7 @@ target_include_directories(k4a_image PUBLIC + + # Dependencies of this library + target_link_libraries(k4a_image PUBLIC +- azure::aziotsharedutil ++ aziotsharedutil + k4ainternal::allocator + k4ainternal::logging) + +diff --git a/src/logging/CMakeLists.txt b/src/logging/CMakeLists.txt +index cbf0e4d..ca81c41 100644 +--- a/src/logging/CMakeLists.txt ++++ b/src/logging/CMakeLists.txt +@@ -11,7 +11,7 @@ target_include_directories(k4a_logging PUBLIC + + # Dependencies of this library + target_link_libraries(k4a_logging PUBLIC +- azure::aziotsharedutil ++ aziotsharedutil + spdlog::spdlog + k4ainternal::rwlock + k4ainternal::global +diff --git a/src/logging/logging.cpp b/src/logging/logging.cpp +index 05264c5..41185de 100644 +--- a/src/logging/logging.cpp ++++ b/src/logging/logging.cpp +@@ -24,6 +24,9 @@ + #pragma warning(disable : 4702) + #endif + #include ++#include ++#include ++#include + #ifdef _MSC_VER + #pragma warning(default : 4702) + #endif +diff --git a/src/queue/CMakeLists.txt b/src/queue/CMakeLists.txt +index 03d15f4..a42a135 100644 +--- a/src/queue/CMakeLists.txt ++++ b/src/queue/CMakeLists.txt +@@ -10,7 +10,7 @@ target_include_directories(k4a_queue PUBLIC + ${K4A_PRIV_INCLUDE_DIR}) + + target_link_libraries(k4a_queue PUBLIC +- azure::aziotsharedutil ++ aziotsharedutil + k4ainternal::allocator + k4ainternal::logging + ) +diff --git a/src/record/internal/CMakeLists.txt b/src/record/internal/CMakeLists.txt +index 97c6cf3..e9f5b1a 100644 +--- a/src/record/internal/CMakeLists.txt ++++ b/src/record/internal/CMakeLists.txt +@@ -22,17 +22,17 @@ target_include_directories(k4a_playback PUBLIC + target_link_libraries(k4a_record PUBLIC + k4a::k4a + k4ainternal::logging +- ebml::ebml +- matroska::matroska ++ EBML::ebml ++ Matroska::matroska + ) + + target_link_libraries(k4a_playback PUBLIC + k4a::k4a + k4ainternal::logging +- ebml::ebml +- matroska::matroska +- libyuv::libyuv +- libjpeg-turbo::libjpeg-turbo ++ EBML::ebml ++ Matroska::matroska ++ yuv ++ ${JPEG_LIBRARIES} + ) + + # Define alias for other targets to link against +diff --git a/src/record/sdk/CMakeLists.txt b/src/record/sdk/CMakeLists.txt +index 571a297..4be0697 100644 +--- a/src/record/sdk/CMakeLists.txt ++++ b/src/record/sdk/CMakeLists.txt +@@ -41,8 +41,8 @@ target_link_libraries(k4arecord PRIVATE + k4ainternal::playback + k4a::k4a + k4ainternal::logging +- ebml::ebml +- matroska::matroska ++ EBML::ebml ++ Matroska::matroska + ) + + # Define alias for k4arecord +diff --git a/src/tewrapper/CMakeLists.txt b/src/tewrapper/CMakeLists.txt +index e4a696e..6ee6696 100644 +--- a/src/tewrapper/CMakeLists.txt ++++ b/src/tewrapper/CMakeLists.txt +@@ -10,7 +10,7 @@ target_include_directories(k4a_tewrapper PUBLIC + ${K4A_PRIV_INCLUDE_DIR}) + + target_link_libraries(k4a_tewrapper PUBLIC +- azure::aziotsharedutil ++ aziotsharedutil + k4ainternal::logging + k4ainternal::deloader) + +diff --git a/src/usbcommand/CMakeLists.txt b/src/usbcommand/CMakeLists.txt +index f75bd55..5403216 100644 +--- a/src/usbcommand/CMakeLists.txt ++++ b/src/usbcommand/CMakeLists.txt +@@ -12,8 +12,8 @@ target_include_directories(k4a_usb_cmd PUBLIC + + # Dependencies of this library + target_link_libraries(k4a_usb_cmd PUBLIC +- azure::aziotsharedutil +- LibUSB::LibUSB ++ aziotsharedutil ++ ${LibUSB} + k4ainternal::allocator + k4ainternal::image + k4ainternal::logging) +diff --git a/src/usbcommand/usb_cmd_priv.h b/src/usbcommand/usb_cmd_priv.h +index 0aa502c..0405b58 100644 +--- a/src/usbcommand/usb_cmd_priv.h ++++ b/src/usbcommand/usb_cmd_priv.h +@@ -20,7 +20,7 @@ + #include + + // Exteranl dependencis +-#include ++#include + + // Ensure we have LIBUSB_API_VERSION defined if not defined by libusb.h + #ifndef LIBUSB_API_VERSION +diff --git a/tests/Calibration/CMakeLists.txt b/tests/Calibration/CMakeLists.txt +index ea6a9dd..c107269 100644 +--- a/tests/Calibration/CMakeLists.txt ++++ b/tests/Calibration/CMakeLists.txt +@@ -4,8 +4,8 @@ + add_executable(calibration_ut calibration.cpp) + + target_link_libraries(calibration_ut PRIVATE +- azure::aziotsharedutil +- gtest::gtest ++ aziotsharedutil ++ GTest::gtest + k4ainternal::calibration + k4ainternal::utcommon) + +diff --git a/tests/CaptureSync/CMakeLists.txt b/tests/CaptureSync/CMakeLists.txt +index 0a9a8e2..f7bff42 100644 +--- a/tests/CaptureSync/CMakeLists.txt ++++ b/tests/CaptureSync/CMakeLists.txt +@@ -4,8 +4,8 @@ + add_executable(capturesync_ut capturesync.cpp) + + target_link_libraries(capturesync_ut PRIVATE +- azure::aziotsharedutil +- gtest::gtest ++ aziotsharedutil ++ GTest::gtest + k4ainternal::allocator + k4ainternal::capturesync + k4ainternal::image +diff --git a/tests/ColorTests/FunctionalTest/CMakeLists.txt b/tests/ColorTests/FunctionalTest/CMakeLists.txt +index 1e65ad7..709dfb0 100644 +--- a/tests/ColorTests/FunctionalTest/CMakeLists.txt ++++ b/tests/ColorTests/FunctionalTest/CMakeLists.txt +@@ -6,7 +6,7 @@ add_executable(color_ft color_ft.cpp) + target_link_libraries(color_ft PRIVATE + k4a::k4a + k4ainternal::utcommon +- gtest::gtest +- azure::aziotsharedutil) ++ GTest::gtest ++ aziotsharedutil) + + k4a_add_tests(TARGET color_ft HARDWARE_REQUIRED TEST_TYPE FUNCTIONAL) +diff --git a/tests/ColorTests/UnitTest/CMakeLists.txt b/tests/ColorTests/UnitTest/CMakeLists.txt +index f8f49c1..541548f 100644 +--- a/tests/ColorTests/UnitTest/CMakeLists.txt ++++ b/tests/ColorTests/UnitTest/CMakeLists.txt +@@ -42,7 +42,7 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + target_link_libraries(color_ut PRIVATE + libuvc::libuvc +- libjpeg-turbo::libjpeg-turbo) ++ ${JPEG_LIBRARIES}) + endif() + + k4a_add_tests(TARGET color_ut TEST_TYPE UNIT) +diff --git a/tests/DepthTests/FunctionalTest/CMakeLists.txt b/tests/DepthTests/FunctionalTest/CMakeLists.txt +index 469c125..00f15f8 100644 +--- a/tests/DepthTests/FunctionalTest/CMakeLists.txt ++++ b/tests/DepthTests/FunctionalTest/CMakeLists.txt +@@ -6,7 +6,7 @@ add_executable(depth_ft depth_ft.cpp) + target_link_libraries(depth_ft PRIVATE + k4a::k4a + k4ainternal::utcommon +- gtest::gtest +- azure::aziotsharedutil) ++ GTest::gtest ++ aziotsharedutil) + + k4a_add_tests(TARGET depth_ft HARDWARE_REQUIRED TEST_TYPE FUNCTIONAL) +diff --git a/tests/ExternLibraries/azure_c_shared/CMakeLists.txt b/tests/ExternLibraries/azure_c_shared/CMakeLists.txt +index a487cde..44170f4 100644 +--- a/tests/ExternLibraries/azure_c_shared/CMakeLists.txt ++++ b/tests/ExternLibraries/azure_c_shared/CMakeLists.txt +@@ -6,7 +6,7 @@ add_executable(azure_c_shared_test + threading.cpp) + + target_link_libraries(azure_c_shared_test PRIVATE +- azure::aziotsharedutil +- gtest::gtest) ++ aziotsharedutil ++ GTest::gtest) + + k4a_add_tests(TARGET azure_c_shared_test TEST_TYPE UNIT) +diff --git a/tests/IMUTests/FunctionalTest/CMakeLists.txt b/tests/IMUTests/FunctionalTest/CMakeLists.txt +index cc6b3c2..d8762f6 100644 +--- a/tests/IMUTests/FunctionalTest/CMakeLists.txt ++++ b/tests/IMUTests/FunctionalTest/CMakeLists.txt +@@ -6,7 +6,7 @@ add_executable(imu_ft imu_ft.cpp) + target_link_libraries(imu_ft PRIVATE + k4a::k4a + k4ainternal::utcommon +- gtest::gtest +- azure::aziotsharedutil) ++ GTest::gtest ++ aziotsharedutil) + + k4a_add_tests(TARGET imu_ft HARDWARE_REQUIRED TEST_TYPE FUNCTIONAL) +diff --git a/tests/Transformation/CMakeLists.txt b/tests/Transformation/CMakeLists.txt +index 7f11a2f..c4ddaf8 100644 +--- a/tests/Transformation/CMakeLists.txt ++++ b/tests/Transformation/CMakeLists.txt +@@ -4,8 +4,8 @@ + add_executable(transformation_ut transformation.cpp) + + target_link_libraries(transformation_ut PRIVATE +- azure::aziotsharedutil +- gtest::gtest ++ aziotsharedutil ++ GTest::gtest + k4ainternal::image + k4ainternal::transformation + k4ainternal::utcommon +diff --git a/tests/UnitTests/allocator_ut/CMakeLists.txt b/tests/UnitTests/allocator_ut/CMakeLists.txt +index 913a7d8..0b7baeb 100644 +--- a/tests/UnitTests/allocator_ut/CMakeLists.txt ++++ b/tests/UnitTests/allocator_ut/CMakeLists.txt +@@ -4,8 +4,8 @@ + add_executable(allocator_ut allocator.cpp) + + target_link_libraries(allocator_ut PRIVATE +- azure::aziotsharedutil +- gtest::gtest ++ aziotsharedutil ++ GTest::gtest + k4ainternal::allocator + k4ainternal::image + k4ainternal::utcommon) +diff --git a/tests/UnitTests/dynlib_ut/CMakeLists.txt b/tests/UnitTests/dynlib_ut/CMakeLists.txt +index fbecc17..af73be2 100644 +--- a/tests/UnitTests/dynlib_ut/CMakeLists.txt ++++ b/tests/UnitTests/dynlib_ut/CMakeLists.txt +@@ -34,7 +34,7 @@ elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + endif() + + target_link_libraries(dynlib_ut PRIVATE +- gtest::gtest ++ GTest::gtest + k4ainternal::dynlib + k4ainternal::utcommon) + +diff --git a/tests/UnitTests/queue_ut/CMakeLists.txt b/tests/UnitTests/queue_ut/CMakeLists.txt +index cf9b040..ec4a024 100644 +--- a/tests/UnitTests/queue_ut/CMakeLists.txt ++++ b/tests/UnitTests/queue_ut/CMakeLists.txt +@@ -4,8 +4,8 @@ + add_executable(queue_ut queue.cpp) + + target_link_libraries(queue_ut PRIVATE +- azure::aziotsharedutil +- gtest::gtest ++ aziotsharedutil ++ GTest::gtest + k4ainternal::allocator + k4ainternal::image + k4ainternal::queue +diff --git a/tests/UnitTests/utcommon/CMakeLists.txt b/tests/UnitTests/utcommon/CMakeLists.txt +index cca52c6..dfdd13d 100644 +--- a/tests/UnitTests/utcommon/CMakeLists.txt ++++ b/tests/UnitTests/utcommon/CMakeLists.txt +@@ -4,8 +4,8 @@ + add_library(utcommon STATIC utcommon.cpp) + + target_link_libraries(utcommon PUBLIC +- gtest::gtest +- gtest::gmock ++ GTest::gtest ++ GTest::gmock + k4ainternal::logging + ) + +diff --git a/tests/example/CMakeLists.txt b/tests/example/CMakeLists.txt +index 3305a1a..be0b667 100644 +--- a/tests/example/CMakeLists.txt ++++ b/tests/example/CMakeLists.txt +@@ -3,6 +3,6 @@ + + add_executable(k4a_example_test test.cpp) + target_link_libraries(k4a_example_test PRIVATE k4a::k4a) +-target_link_libraries(k4a_example_test PRIVATE gtest::gtest) ++target_link_libraries(k4a_example_test PRIVATE GTest::gtest) + + k4a_add_tests(TARGET k4a_example_test HARDWARE_REQUIRED TEST_TYPE FUNCTIONAL) +diff --git a/tests/executables/CMakeLists.txt b/tests/executables/CMakeLists.txt +index 7b03d15..6c070ee 100644 +--- a/tests/executables/CMakeLists.txt ++++ b/tests/executables/CMakeLists.txt +@@ -17,12 +17,12 @@ target_compile_definitions(executables_ft_custom PRIVATE -DUSE_CUSTOM_TEST_CONFI + target_link_libraries(executables_ft PRIVATE + k4a::k4a + k4ainternal::utcommon +- gtest::gtest) ++ GTest::gtest) + + target_link_libraries(executables_ft_custom PRIVATE + k4a::k4a + k4ainternal::utcommon +- gtest::gtest) ++ GTest::gtest) + + k4a_add_tests(TARGET executables_ft HARDWARE_REQUIRED TEST_TYPE FUNCTIONAL) + k4a_add_tests(TARGET executables_ft_custom HARDWARE_REQUIRED TEST_TYPE FUNCTIONAL_CUSTOM) +diff --git a/tests/global/CMakeLists.txt b/tests/global/CMakeLists.txt +index ea0a0e5..d85728d 100644 +--- a/tests/global/CMakeLists.txt ++++ b/tests/global/CMakeLists.txt +@@ -4,8 +4,8 @@ + add_executable(global_ft global.cpp) + + target_link_libraries(global_ft PRIVATE +- azure::aziotsharedutil +- gtest::gtest ++ aziotsharedutil ++ GTest::gtest + k4ainternal::global + k4ainternal::utcommon) + +diff --git a/tests/multidevice/CMakeLists.txt b/tests/multidevice/CMakeLists.txt +index 3fe044b..85f3058 100644 +--- a/tests/multidevice/CMakeLists.txt ++++ b/tests/multidevice/CMakeLists.txt +@@ -4,8 +4,8 @@ + add_executable(multidevice_ft multidevice.cpp) + + target_link_libraries(multidevice_ft PRIVATE +- azure::aziotsharedutil +- gtest::gtest ++ aziotsharedutil ++ GTest::gtest + k4a::k4a + k4ainternal::utcommon) + +diff --git a/tests/projections/cpp/CMakeLists.txt b/tests/projections/cpp/CMakeLists.txt +index 2fdfa2c..09b5303 100644 +--- a/tests/projections/cpp/CMakeLists.txt ++++ b/tests/projections/cpp/CMakeLists.txt +@@ -6,6 +6,6 @@ add_executable(cpp_projection_ft cpp_projection_ft.cpp) + target_link_libraries(cpp_projection_ft PRIVATE + k4a::k4a + k4ainternal::utcommon +- gtest::gtest) ++ GTest::gtest) + + k4a_add_tests(TARGET cpp_projection_ft HARDWARE_REQUIRED TEST_TYPE FUNCTIONAL) +diff --git a/tests/rwlock/CMakeLists.txt b/tests/rwlock/CMakeLists.txt +index 5889435..c6c1f73 100644 +--- a/tests/rwlock/CMakeLists.txt ++++ b/tests/rwlock/CMakeLists.txt +@@ -4,8 +4,8 @@ + add_executable(rwlock_ft rwlock.cpp) + + target_link_libraries(rwlock_ft PRIVATE +- azure::aziotsharedutil +- gtest::gtest ++ aziotsharedutil ++ GTest::gtest + k4ainternal::rwlock + k4ainternal::utcommon) + +diff --git a/tests/throughput/CMakeLists.txt b/tests/throughput/CMakeLists.txt +index c544e1e..9489bf8 100644 +--- a/tests/throughput/CMakeLists.txt ++++ b/tests/throughput/CMakeLists.txt +@@ -6,8 +6,8 @@ add_executable(throughput_perf throughput_perf.cpp) + target_compile_definitions(throughput_perf PRIVATE _CRT_SECURE_NO_WARNINGS) + + target_link_libraries(throughput_perf PRIVATE +- azure::aziotsharedutil +- gtest::gtest ++ aziotsharedutil ++ GTest::gtest + k4a::k4a + k4ainternal::logging + k4ainternal::utcommon) +diff --git a/tools/k4aviewer/CMakeLists.txt b/tools/k4aviewer/CMakeLists.txt +index 98578c0..6ab38d9 100644 +--- a/tools/k4aviewer/CMakeLists.txt ++++ b/tools/k4aviewer/CMakeLists.txt +@@ -58,12 +58,13 @@ set(EXTERNAL_LIBRARIES + k4a::k4a + k4a::k4arecord + imgui::imgui +- libjpeg-turbo::libjpeg-turbo ++ ${JPEG_LIBRARIES} + libsoundio::libsoundio +- LibUSB::LibUSB +- libyuv::libyuv +- glfw::glfw ++ ${LibUSB} ++ yuv ++ glfw + ${OPENGL_LIBRARIES} ++ unofficial::gl3w::gl3w + ) + + # On Windows, we need to call into setupapi to get USB container ID information +diff --git a/tools/k4aviewer/k4aaudiomanager.cpp b/tools/k4aviewer/k4aaudiomanager.cpp +index 243c800..ef85d45 100644 +--- a/tools/k4aviewer/k4aaudiomanager.cpp ++++ b/tools/k4aviewer/k4aaudiomanager.cpp +@@ -11,7 +11,7 @@ + + // Library headers + // +-#include ++#include + + // Project headers + // diff --git a/vcpkg/ports/azure-kinect-sensor-sdk/fix-dependency-imgui.patch b/vcpkg/ports/azure-kinect-sensor-sdk/fix-dependency-imgui.patch new file mode 100644 index 0000000..f997e71 --- /dev/null +++ b/vcpkg/ports/azure-kinect-sensor-sdk/fix-dependency-imgui.patch @@ -0,0 +1,45 @@ +diff --git a/tools/k4aviewer/CMakeLists.txt b/tools/k4aviewer/CMakeLists.txt +index 6ab38d9..e0c5bad 100644 +--- a/tools/k4aviewer/CMakeLists.txt ++++ b/tools/k4aviewer/CMakeLists.txt +@@ -35,6 +35,8 @@ set(SOURCE_FILES + k4awindowset.cpp + perfcounter.cpp + ${CMAKE_CURRENT_BINARY_DIR}/version.rc ++ ${IMGUI_EXTERNAL_PATH}/imgui_impl_glfw.cpp ++ ${IMGUI_EXTERNAL_PATH}/imgui_impl_opengl3.cpp + ) + + # Include ${CMAKE_CURRENT_BINARY_DIR}/version.rc in the target's sources +@@ -54,6 +56,8 @@ include_directories( + ${CMAKE_CURRENT_LIST_DIR} + ) + ++find_package(GLEW REQUIRED) ++ + set(EXTERNAL_LIBRARIES + k4a::k4a + k4a::k4arecord +@@ -65,6 +69,7 @@ set(EXTERNAL_LIBRARIES + glfw + ${OPENGL_LIBRARIES} + unofficial::gl3w::gl3w ++ GLEW::GLEW + ) + + # On Windows, we need to call into setupapi to get USB container ID information +diff --git a/tools/k4aviewer/k4aimgui_all.h b/tools/k4aviewer/k4aimgui_all.h +index e40ccfb..756fb09 100644 +--- a/tools/k4aviewer/k4aimgui_all.h ++++ b/tools/k4aviewer/k4aimgui_all.h +@@ -34,8 +34,8 @@ + #include + #include + #include +-#include +-#include ++#include ++#include + + // For disabling buttons, which has not yet been promoted to the public API + // diff --git a/vcpkg/ports/azure-kinect-sensor-sdk/k4adeploy.ps1 b/vcpkg/ports/azure-kinect-sensor-sdk/k4adeploy.ps1 new file mode 100644 index 0000000..d6feb3b --- /dev/null +++ b/vcpkg/ports/azure-kinect-sensor-sdk/k4adeploy.ps1 @@ -0,0 +1,10 @@ +# Note: This function signature and behavior is depended upon by applocal.ps1 + +function deployAzureKinectSensorSDK([string]$targetBinaryDir, [string]$installedDir, [string]$targetBinaryName) { + if ($targetBinaryName -like "k4a.dll") { + if(Test-Path "$installedDir\tools\azure-kinect-sensor-sdk\depthengine_2_0.dll") { + Write-Verbose " Deploying Azure Kinect Sensor SDK Initialization" + deployBinary "$targetBinaryDir" "$installedDir\tools\azure-kinect-sensor-sdk\" "depthengine_2_0.dll" + } + } +} diff --git a/vcpkg/ports/azure-kinect-sensor-sdk/portfile.cmake b/vcpkg/ports/azure-kinect-sensor-sdk/portfile.cmake new file mode 100644 index 0000000..a7604a7 --- /dev/null +++ b/vcpkg/ports/azure-kinect-sensor-sdk/portfile.cmake @@ -0,0 +1,90 @@ +set(VERSION 1.4.0-alpha.0) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO microsoft/Azure-Kinect-Sensor-SDK + REF v${VERSION} + SHA512 bf09ff92dc1b8621a941d838aef9c804bb5635f7984b7f86f01a38441d44935db764b69483d598e1f2c0aafb5c7ec196ef9c722967d92e6d075cb67ce781fea9 + HEAD_REF master + PATCHES + fix-builds.patch + disable-c4275.patch + fix-dependency-imgui.patch +) + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) +vcpkg_add_to_path("${PYTHON3_DIR}") + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + docs K4A_BUILD_DOCS + tool BUILD_TOOLS +) + +# .rc file needs windows.h, so do not use PREFER_NINJA here +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE + OPTIONS ${FEATURE_OPTIONS} + -DK4A_SOURCE_LINK=OFF + -DK4A_MTE_VERSION=ON + -DBUILD_EXAMPLES=OFF + -DWITH_TEST=OFF + -DIMGUI_EXTERNAL_PATH=${CURRENT_INSTALLED_DIR}/include/bindings +) + +vcpkg_install_cmake() + +# Avoid deleting debug/lib/cmake when fixing the first cmake +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cmake ${CURRENT_PACKAGES_DIR}/debug/share) +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/k4a TARGET_PATH share/k4a) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/k4arecord TARGET_PATH share/k4arecord) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if ("tool" IN_LIST FEATURES) + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release) + file(GLOB AZURE_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + file(COPY ${AZURE_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + file(REMOVE ${AZURE_TOOLS}) + endif() + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug) + file(GLOB AZURE_TOOLS ${CURRENT_PACKAGES_DIR}/debug/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + file(REMOVE ${AZURE_TOOLS}) + endif() +endif() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Install Depth Engine +vcpkg_download_distfile(ARCHIVE + URLS "https://www.nuget.org/api/v2/package/Microsoft.Azure.Kinect.Sensor/${VERSION}" + FILENAME "azure-kinect-sensor-sdk.zip" + SHA512 6c15975e7c834672de723b0c474fa4cd58f41c5bee6511dcbdbc22f1a58daa906c4f01a7e941af0e7d09f763ff886015c1f6b1e29b6bdfb333f10857edfec2ca +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH PACKAGE_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL +) + +if (VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + set(ARCHITECTURE "x86") +elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + set(ARCHITECTURE "amd64") +else () + message(FATAL_ERROR "this architecture is not supported.") +endif () + +file(COPY ${PACKAGE_PATH}/lib/native/${ARCHITECTURE}/release/depthengine_2_0.dll DESTINATION ${CURRENT_PACKAGES_DIR}/tools/azure-kinect-sensor-sdk) +file(COPY ${PACKAGE_PATH}/lib/native/${ARCHITECTURE}/release/depthengine_2_0.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/azure-kinect-sensor-sdk) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/k4adeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/tools/azure-kinect-sensor-sdk) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/k4adeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/azure-kinect-sensor-sdk) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/azure-macro-utils-c/CONTROL b/vcpkg/ports/azure-macro-utils-c/CONTROL new file mode 100644 index 0000000..702b9b9 --- /dev/null +++ b/vcpkg/ports/azure-macro-utils-c/CONTROL @@ -0,0 +1,6 @@ +Source: azure-macro-utils-c +Version: 2020-06-17-1 +Description: A library of macros for the Azure IoT SDK Suite + +Feature: public-preview +Description: A library of macros for the Azure IoT SDK Suite (public-preview) diff --git a/vcpkg/ports/azure-macro-utils-c/portfile.cmake b/vcpkg/ports/azure-macro-utils-c/portfile.cmake new file mode 100644 index 0000000..2f9e582 --- /dev/null +++ b/vcpkg/ports/azure-macro-utils-c/portfile.cmake @@ -0,0 +1,42 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +if("public-preview" IN_LIST FEATURES) + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-macro-utils-c + REF 7523af934fc4d9423111e358f49b19314ec9c3e3 + SHA512 b53765096654fff9c5670004e4e107bffa81dd07e63eeac687c9e2b7e5ea2e1f26b6ae025c05c45f5c28152a457922f08c7f8d3303fa4d3b9194c34ba59533d5 + HEAD_REF master + ) +else() + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-macro-utils-c + REF 5926caf4e42e98e730e6d03395788205649a3ada + SHA512 97621f276657af976c4022c9600540ecae2287b3b386b9e097d661828a62c120348d354b3f86f3ef4d49f3c54830887662d3910ed5cec4a634949fa389b4ad55 + HEAD_REF master + ) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -Drun_int_tests=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/azure_macro_utils_c) + +file(COPY ${SOURCE_PATH}/inc/azure_macro_utils/macro_utils.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/azure_macro_utils_c/include/azure_macro_utils) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/azure-macro-utils-c/copyright COPYONLY) + +vcpkg_copy_pdbs() + + diff --git a/vcpkg/ports/azure-storage-cpp/CONTROL b/vcpkg/ports/azure-storage-cpp/CONTROL new file mode 100644 index 0000000..08c09f0 --- /dev/null +++ b/vcpkg/ports/azure-storage-cpp/CONTROL @@ -0,0 +1,7 @@ +Source: azure-storage-cpp +Version: 7.5.0 +Build-Depends: cpprestsdk[core], atlmfc (windows), boost-log (!windows&!uwp), boost-locale (!windows&!uwp), libxml2 (!windows&!uwp), libuuid (!windows&!uwp&!osx), gettext (osx) +Description: Microsoft Azure Storage Client SDK for C++ + A client library for working with Microsoft Azure storage services including blobs, files, tables, and queues. This client library enables working with the Microsoft Azure storage services which include the blob service for storing binary and text data, the file service for storing binary and text data, the table service for storing structured non-relational data, and the queue service for storing messages that may be accessed by a client. +Homepage: https://blogs.msdn.com/b/windowsazurestorage/ +Supports: !uwp diff --git a/vcpkg/ports/azure-storage-cpp/portfile.cmake b/vcpkg/ports/azure-storage-cpp/portfile.cmake new file mode 100644 index 0000000..2b23123 --- /dev/null +++ b/vcpkg/ports/azure-storage-cpp/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-storage-cpp + REF v7.5.0 + SHA512 83eabcaf2114c8af1cabbc96b6ef2b57c934a06f68e7a870adf336feaa19edd57aedaf8507d5c40500e46d4e77f5059f9286e319fe7cadeb9ffc8fa018fb030c + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/Microsoft.WindowsAzure.Storage + PREFER_NINJA + OPTIONS + -DCMAKE_FIND_FRAMEWORK=LAST + -DBUILD_TESTS=OFF + -DBUILD_SAMPLES=OFF + OPTIONS_RELEASE + -DGETTEXT_LIB_DIR=${CURRENT_INSTALLED_DIR}/lib + OPTIONS_DEBUG + -DGETTEXT_LIB_DIR=${CURRENT_INSTALLED_DIR}/debug/lib +) + +vcpkg_install_cmake() + +file(INSTALL + ${SOURCE_PATH}/LICENSE.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + diff --git a/vcpkg/ports/azure-uamqp-c/CONTROL b/vcpkg/ports/azure-uamqp-c/CONTROL new file mode 100644 index 0000000..ddd6fe2 --- /dev/null +++ b/vcpkg/ports/azure-uamqp-c/CONTROL @@ -0,0 +1,9 @@ +Source: azure-uamqp-c +Version: 2020-07-19 +Build-Depends: azure-c-shared-utility, azure-macro-utils-c, umock-c +Description: AMQP library for C +Homepage: https://github.com/Azure/azure-uamqp-c + +Feature: public-preview +Description: AMQP library for C (public preview) +Build-Depends: azure-c-shared-utility[public-preview], azure-macro-utils-c[public-preview], umock-c[public-preview] diff --git a/vcpkg/ports/azure-uamqp-c/portfile.cmake b/vcpkg/ports/azure-uamqp-c/portfile.cmake new file mode 100644 index 0000000..e154414 --- /dev/null +++ b/vcpkg/ports/azure-uamqp-c/portfile.cmake @@ -0,0 +1,41 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +if("public-preview" IN_LIST FEATURES) + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-uamqp-c + REF 065ffdeeb47313ddbbc2a8e84ad52ab033e2e8d2 + SHA512 bade6fae2d5479b7690632dbcc58bda5dd871eb0aa63d6a56cb35e81630121b5148309cd3414e6339c1218ec59fc12ac318b4964d295b579f7a0cacf5593b7ba + HEAD_REF master + ) +else() + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-uamqp-c + REF 9e851bd6db08d6d2d08d1ef469d1e6fc4795382d + SHA512 efe0b9ed8a949af67e958b1516f499f57a0838a847e92d6c932058e931d2536038e7d49d63597e21de0a6f2af22bc179a6d99c8b8077451f906118b0b65e1417 + HEAD_REF master + ) +endif() + +file(COPY ${CURRENT_INSTALLED_DIR}/share/azure-c-shared-utility/azure_iot_build_rules.cmake DESTINATION ${SOURCE_PATH}/deps/azure-c-shared-utility/configs/) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -Dskip_samples=ON + -Duse_installed_dependencies=ON + -Dbuild_as_dynamic=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/uamqp) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +vcpkg_copy_pdbs() + diff --git a/vcpkg/ports/azure-uhttp-c/CONTROL b/vcpkg/ports/azure-uhttp-c/CONTROL new file mode 100644 index 0000000..b645730 --- /dev/null +++ b/vcpkg/ports/azure-uhttp-c/CONTROL @@ -0,0 +1,9 @@ +Source: azure-uhttp-c +Version: 2020-07-19 +Build-Depends: azure-c-shared-utility, azure-macro-utils-c, umock-c +Description: Azure HTTP Library written in C +Homepage: https://github.com/Azure/azure-uhttp-c + +Feature: public-preview +Description: Azure HTTP Library written in C (public preview) +Build-Depends: azure-c-shared-utility[public-preview], azure-macro-utils-c[public-preview], umock-c[public-preview] diff --git a/vcpkg/ports/azure-uhttp-c/portfile.cmake b/vcpkg/ports/azure-uhttp-c/portfile.cmake new file mode 100644 index 0000000..1e05b1c --- /dev/null +++ b/vcpkg/ports/azure-uhttp-c/portfile.cmake @@ -0,0 +1,42 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +if("public-preview" IN_LIST FEATURES) + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-uhttp-c + REF d84a20609a2b5a555920389451fb3c9a2ed3656c + SHA512 4eadd7e120082cc3bcf696d6cd16bc7ee8e1082380dd7583fba7fad1bb95109f3456890495e25ae7675e656ef721fa12eff22eeb96d8a4cf359be5c96889cbd6 + HEAD_REF master + ) +else() + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-uhttp-c + REF ef8ba1591b0f825315b78380331ff9290197db02 + SHA512 3e0434272de684a43189d491c16ab7e20ffcfd08f8addb01f64caa446211faa67e45aa51c403520df6a105cc9ac50b85de1b9e0954510fd4232c0f19d01fea9c + HEAD_REF master + ) +endif() + +file(COPY ${CURRENT_INSTALLED_DIR}/share/azure-c-shared-utility/azure_iot_build_rules.cmake DESTINATION ${SOURCE_PATH}/deps/c-utility/configs/) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -Dskip_samples=ON + -Duse_installed_dependencies=ON + -Dbuild_as_dynamic=OFF + -DCMAKE_INSTALL_INCLUDEDIR=include +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/uhttp) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +vcpkg_copy_pdbs() + diff --git a/vcpkg/ports/azure-umqtt-c/CONTROL b/vcpkg/ports/azure-umqtt-c/CONTROL new file mode 100644 index 0000000..755b016 --- /dev/null +++ b/vcpkg/ports/azure-umqtt-c/CONTROL @@ -0,0 +1,9 @@ +Source: azure-umqtt-c +Version: 2020-07-19 +Build-Depends: azure-c-shared-utility, azure-macro-utils-c, umock-c +Description: General purpose library for communication over the mqtt protocol +Homepage: https://github.com/Azure/azure-umqtt-c + +Feature: public-preview +Description: General purpose library for communication over the mqtt protocol (public preview) +Build-Depends: azure-c-shared-utility[public-preview], azure-macro-utils-c[public-preview], umock-c[public-preview] diff --git a/vcpkg/ports/azure-umqtt-c/portfile.cmake b/vcpkg/ports/azure-umqtt-c/portfile.cmake new file mode 100644 index 0000000..84fba09 --- /dev/null +++ b/vcpkg/ports/azure-umqtt-c/portfile.cmake @@ -0,0 +1,41 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +if("public-preview" IN_LIST FEATURES) + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-umqtt-c + REF 7557db6de094b67818d3c410dc95a3cf07cd86a6 + SHA512 f2577379f711e2576fdd6dfecbc4d8a0b26c7670a77bc468238e8dd5fa43f208db85eddd06dd570fde4219ba19304338c712f671c059c6cc10abb4892d58ae40 + HEAD_REF master + ) +else() + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/azure-umqtt-c + REF 165f6f52f8b2aec54a28ea5ede41736589726cd0 + SHA512 af56db89ddbae1a8067d3b1c7f85ecf085fb6bf529d01f74dd301e6994b20e6f1a821fd7d5116b53d1a8911ccc463149a53a5611e650c3aeb63893012206ffb8 + HEAD_REF master + ) +endif() + +file(COPY ${CURRENT_INSTALLED_DIR}/share/azure-c-shared-utility/azure_iot_build_rules.cmake DESTINATION ${SOURCE_PATH}/deps/c-utility/configs/) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -Dskip_samples=ON + -Duse_installed_dependencies=ON + -Dbuild_as_dynamic=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/umqtt) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +vcpkg_copy_pdbs() + diff --git a/vcpkg/ports/basisu/CONTROL b/vcpkg/ports/basisu/CONTROL new file mode 100644 index 0000000..a690f6d --- /dev/null +++ b/vcpkg/ports/basisu/CONTROL @@ -0,0 +1,6 @@ +Source: basisu +Version: 1.11-4 +Homepage: https://github.com/BinomialLLC/basis_universal +Description: Basis Universal is a supercompressed GPU texture and video compression format that outputs a highly compressed intermediate file format (.basis) that can be quickly transcoded to a wide variety of GPU texture compression formats. +Build-Depends: lodepng + diff --git a/vcpkg/ports/basisu/fix-addostream.patch b/vcpkg/ports/basisu/fix-addostream.patch new file mode 100644 index 0000000..cd9308b --- /dev/null +++ b/vcpkg/ports/basisu/fix-addostream.patch @@ -0,0 +1,12 @@ +diff --git a/src/encoder/basisu_enc.h b/src/encoder/basisu_enc.h +index 05656da..468f43b 100644 +--- a/src/encoder/basisu_enc.h ++++ b/src/encoder/basisu_enc.h +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + #ifndef _WIN32 + #include diff --git a/vcpkg/ports/basisu/portfile.cmake b/vcpkg/ports/basisu/portfile.cmake new file mode 100644 index 0000000..8873c52 --- /dev/null +++ b/vcpkg/ports/basisu/portfile.cmake @@ -0,0 +1,40 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jherico/basis_universal + REF 497875f756ed0e3eb62e0ff08d55c62242f4be74 + SHA512 2293b78620a7ed510dbecf48bcae5f4b8524fe9020f864c8e79cf94ea9d95d51dddf83a5b4ea29cc95db19f87137bfef1cb68b7fbc6387e08bb42898d81c9303 + HEAD_REF master + PATCHES fix-addostream.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +#vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/basisu) +if (WIN32) + set(TOOL_NAME basisu_tool.exe) +else() + set(TOOL_NAME basisu_tool) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(COPY ${CURRENT_PACKAGES_DIR}/bin/${TOOL_NAME} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/basisu) + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/basisu) + +# Remove unnecessary files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/${TOOL_NAME}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/${TOOL_NAME}) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/bde/CONTROL b/vcpkg/ports/bde/CONTROL new file mode 100644 index 0000000..10accad --- /dev/null +++ b/vcpkg/ports/bde/CONTROL @@ -0,0 +1,4 @@ +Source: bde +Version: 3.2.0.0 +Port-Version: 2 +Description: Basic Development Environment - a set of foundational C++ libraries used at Bloomberg. diff --git a/vcpkg/ports/bde/portfile.cmake b/vcpkg/ports/bde/portfile.cmake new file mode 100644 index 0000000..3acdd38 --- /dev/null +++ b/vcpkg/ports/bde/portfile.cmake @@ -0,0 +1,136 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +set(CONFIGURE_COMMON_ARGS ${CONFIGURE_COMMON_ARGS} --library-type=static) + +set(BDE_VERSION 3.2.0.0) +set(BDE_TOOLS_VERSION 1.x) + +# Paths used in build +set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/bde-${BDE_VERSION}) +set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bde-${BDE_VERSION}) + +# Acquire Python 2 and add it to PATH +vcpkg_find_acquire_program(PYTHON2) +get_filename_component(PYTHON2_EXE_PATH ${PYTHON2} DIRECTORY) + +# Acquire BDE Tools and add them to PATH +vcpkg_from_github( + OUT_SOURCE_PATH TOOLS_PATH + REPO "bloomberg/bde-tools" + REF d4b1a7670829228f4ec81ecdccc598ce03ae8e80 + SHA512 80af734c080adb225d5369157301ae0af18e02b1912351e34d23f5f2ba4e19f9ae2b5a367923f036330c9f9afd11a90cdf12680eb3e59b4297a312a1b713f17f + HEAD_REF master +) +message(STATUS "Configure bde-tools-v${BDE_TOOLS_VERSION}") +if(VCPKG_CMAKE_SYSTEM_NAME) + set(ENV{PATH} "$ENV{PATH}:${PYTHON2_EXE_PATH}") + set(ENV{PATH} "$ENV{PATH}:${TOOLS_PATH}/bin") +else() + set(ENV{PATH} "$ENV{PATH};${PYTHON2_EXE_PATH}") + set(ENV{PATH} "$ENV{PATH};${TOOLS_PATH}/bin") +endif() + +# Acquire BDE sources +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO "bloomberg/bde" + REF 3720d132d0879f19b9084cca62ebc75f1f24e1a3 + SHA512 234ebb71997f5b7d3951584235ead10f977689cef323ae1c198629a6b1995b1481d8a1515d827c46df10209bdc66e1f3cc7780dafee9ca0ff4172be47c460d78 + HEAD_REF master +) + +# Clean up previous builds +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + +# Identify waf executable and calculate configure args +if(VCPKG_CMAKE_SYSTEM_NAME) + set(WAF_COMMAND waf) +else() + set(WAF_COMMAND waf.bat) +endif() +set(CONFIGURE_COMMON_ARGS ${CONFIGURE_COMMON_ARGS} --use-flat-include-dir) +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(CONFIGURE_COMMON_ARGS ${CONFIGURE_COMMON_ARGS} --abi-bits=32) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(CONFIGURE_COMMON_ARGS ${CONFIGURE_COMMON_ARGS} --abi-bits=64) +else() + message(FATAL_ERROR "Unsupported target architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() +if(VCPKG_TARGET_IS_WINDOWS) + set(CONFIGURE_COMMON_ARGS ${CONFIGURE_COMMON_ARGS} --msvc-runtime-type=static) +else() + set(ENV{CFLAGS} "$ENV{CFLAGS} -Wno-error=implicit-function-declaration") +endif() + +# Configure debug +message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") +vcpkg_execute_required_process( + COMMAND ${WAF_COMMAND} configure ${CONFIGURE_COMMON_ARGS} + --prefix=${CURRENT_PACKAGES_DIR}/debug --out=${SOURCE_PATH_DEBUG} + --build-type=debug + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME configure-${TARGET_TRIPLET}--dbg +) +message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") + +# Build debug +message(STATUS "Building ${TARGET_TRIPLET}-dbg") +vcpkg_execute_required_process( + COMMAND ${WAF_COMMAND} build + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}--dbg +) +message(STATUS "Building ${TARGET_TRIPLET}-dbg done") + +# Install debug +message(STATUS "Installing ${TARGET_TRIPLET}-dbg") +vcpkg_execute_required_process( + COMMAND ${WAF_COMMAND} install + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME install-${TARGET_TRIPLET}--dbg +) +# Include files should not be duplicated +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +# pkg-config files should point to correct include directory +file(GLOB PC_FILES "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/*.pc") +foreach(PC_FILE_NAME ${PC_FILES}) + file(READ "${PC_FILE_NAME}" _contents) + string(REPLACE "includedir=\${prefix}/include" "includedir=\${prefix}/../include" _contents "${_contents}") + file(WRITE "${PC_FILE_NAME}" "${_contents}") +endforeach() +message(STATUS "Installing ${TARGET_TRIPLET}-dbg done") + +# Configure release +message(STATUS "Configuring ${TARGET_TRIPLET}-rel") +vcpkg_execute_required_process( + COMMAND ${WAF_COMMAND} configure ${CONFIGURE_COMMON_ARGS} + --prefix=${CURRENT_PACKAGES_DIR} --out=${SOURCE_PATH_RELEASE} + --build-type=release + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME configure-${TARGET_TRIPLET}--rel +) +message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") + +# Build release +message(STATUS "Building ${TARGET_TRIPLET}-rel") +vcpkg_execute_required_process( + COMMAND ${WAF_COMMAND} build + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}--rel +) +message(STATUS "Building ${TARGET_TRIPLET}-rel done") + +# Install release +message(STATUS "Installing ${TARGET_TRIPLET}-rel") +vcpkg_execute_required_process( + COMMAND ${WAF_COMMAND} install + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME install-${TARGET_TRIPLET}--rel +) +message(STATUS "Installing ${TARGET_TRIPLET}-rel done") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/bde + RENAME copyright +) diff --git a/vcpkg/ports/bdwgc/001-install-libraries.patch b/vcpkg/ports/bdwgc/001-install-libraries.patch new file mode 100644 index 0000000..2cc87f5 --- /dev/null +++ b/vcpkg/ports/bdwgc/001-install-libraries.patch @@ -0,0 +1,257 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8d386ca5..b94d6358 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -27,6 +27,10 @@ include(CTest) + + cmake_minimum_required(VERSION 3.1) + ++# Customize CMake options by passing "-D=ON|OFF" in your command line ++option(build_cord "Install cord" ON) ++option(build_tests "Install library tests" ON) ++option(install_headers "Install header files" ON) + option(enable_threads "TODO" OFF) #TODO Support it + option(enable_parallel_mark "Parallelize marking and free list construction" ON) + option(enable_thread_local_alloc "Turn on thread-local allocation optimization" ON) +@@ -52,22 +56,13 @@ add_definitions("-DALL_INTERIOR_POINTERS -DNO_EXECUTE_PERMISSION") + + if (APPLE) + if ("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "") +- set(CMAKE_OSX_ARCHITECTURES "ppc;i386;x86_64" ++ set(CMAKE_OSX_ARCHITECTURES "x86_64;i386" + CACHE STRING "Build architectures for Mac OS X" FORCE) + endif() +-elseif (WIN32) ++elseif (MSVC) + add_definitions("-D_CRT_SECURE_NO_DEPRECATE") + endif() + +-#LIBATOMIC #TODO +-#ADD_LIBRARY(atomic_ops STATIC ) +-#SET_TARGET_PROPERTIES(atomic_ops PROPERTIES COMPILE_FLAGS -DNO_DEBUGGING) +- +- +-#LIBGC +- +-include_directories(include) +-include_directories(libatomic_ops/src) + + set(SRC alloc.c reclaim.c allchblk.c misc.c mach_dep.c os_dep.c + mark_rts.c headers.c mark.c obj_map.c blacklst.c finalize.c +@@ -82,12 +77,6 @@ if (enable_threads) + set(LIBS ${LIBS} ${Threads_LIBRARIES}) + endif() + +-#IF(Threads_FOUND) +-# ADD_DEFINITIONS("") +-#ELSE +-# MESSAGE("Parallel mark requires enable_threads ON" ) +-#ENDIF(Threads_FOUND) +- + if (enable_cplusplus) + set(SRC ${SRC} gc_cpp.cc) + endif() +@@ -141,7 +130,7 @@ if (CMAKE_USE_PTHREADS_INIT) + if (enable_parallel_mark) + add_definitions("-DHANDLE_FORK") + endif() +- endif(enable_handle_fork) ++ endif() + set(SRC ${SRC} darwin_stop_world.c) + #TODO darwin_threads=true + endif() +@@ -158,10 +147,10 @@ if (CMAKE_USE_WIN32_THREADS_INIT) + add_definitions("-DTHREAD_LOCAL_ALLOC") + set(SRC ${SRC} thread_local_alloc.c) + endif() +- endif(enable_parallel_mark) ++ endif() + add_definitions("-DEMPTY_GETENV_RESULTS") + set(SRC ${SRC} win32_threads.c) +-endif(CMAKE_USE_WIN32_THREADS_INIT) ++endif() + + if (enable_gcj_support) + add_definitions("-DGC_GCJ_SUPPORT") +@@ -169,7 +158,7 @@ if (enable_gcj_support) + add_definitions("-DGC_ENABLE_SUSPEND_THREAD") + endif() + set(SRC ${SRC} gcj_mlc.c) +-endif(enable_gcj_support) ++endif() + + if (enable_disclaim) + add_definitions("-DENABLE_DISCLAIM") +@@ -195,7 +184,7 @@ if (enable_gc_debug) + add_definitions("-DMAKE_BACK_GRAPH") + set(SRC ${SRC} backgraph.c) + endif() +-endif(enable_gc_debug) ++endif() + + if (enable_redirect_malloc) + if (enable_gc_debug) +@@ -206,7 +195,7 @@ if (enable_redirect_malloc) + add_definitions("-DREDIRECT_MALLOC=GC_malloc") + endif() + add_definitions("-DGC_USE_DLOPEN_WRAP") +-endif(enable_redirect_malloc) ++endif() + + if (enable_munmap) + add_definitions("-DUSE_MMAP -DUSE_MUNMAP") +@@ -240,19 +229,44 @@ if (enable_checksums) + endif() + add_definitions("-DCHECKSUMS") + set(SRC ${SRC} checksums.c) +-endif(enable_checksums) +- +-add_library(gc-lib STATIC ${SRC}) +-set_target_properties(gc-lib PROPERTIES +- COMPILE_DEFINITIONS GC_NOT_DLL) +-#TODO TARGET_LINK_LIBRARIES(... ... ${LIBS}) ++endif() + +-add_library(gcmt-lib STATIC ${SRC}) +-set_target_properties(gcmt-lib PROPERTIES +- COMPILE_DEFINITIONS GC_NOT_DLL) ++# Create target ++add_library(gc ${SRC}) ++target_include_directories(gc ++ PUBLIC ++ $ ++ $ ++) ++if (NOT BUILD_SHARED_LIBS) ++ target_compile_definitions(gc PRIVATE GC_NOT_DLL) ++else() ++ target_compile_definitions(gc PRIVATE GC_DLL) ++endif() + +-add_library(gcmt-dll SHARED ${SRC}) ++# Install library ++install( ++ TARGETS gc ++ EXPORT gcExports ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ RUNTIME DESTINATION bin ++ INCLUDES DESTINATION include ++) ++ ++# Install headers ++if (install_headers) ++ file(GLOB BDWGC_HEADERS "include/*.h") ++ install(FILES ${BDWGC_HEADERS} DESTINATION include/gc) ++ ++ file(GLOB BDWGC_EXTRA_HEADERS "include/extra/*.h") ++ install(FILES ${BDWGC_EXTRA_HEADERS} DESTINATION include) ++endif() + +-add_subdirectory(cord) ++if (build_cord) ++ add_subdirectory(cord) ++endif() + +-add_subdirectory(tests) ++if (build_tests) ++ add_subdirectory(tests) ++endif() +diff --git a/cord/CMakeLists.txt b/cord/CMakeLists.txt +index 17077370..21818d4e 100644 +--- a/cord/CMakeLists.txt ++++ b/cord/CMakeLists.txt +@@ -11,11 +11,11 @@ + # modified is included with the above copyright notice. + ## + ++add_executable(cord cordbscs.c cordxtra.c tests/de.c tests/de_win.c) ++set_target_properties(cord PROPERTIES COMPILE_DEFINITIONS GC_NOT_DLL) ++target_link_libraries(cord PRIVATE gc) ++ + if (WIN32) +- add_executable(cord cordbscs.c cordxtra.c +- tests/de.c tests/de_win.c) + set_target_properties(cord PROPERTIES WIN32_EXECUTABLE TRUE) +- set_target_properties(cord PROPERTIES COMPILE_DEFINITIONS GC_NOT_DLL) +- target_link_libraries(cord gc-lib) +- target_link_libraries(cord gdi32) ++ target_link_libraries(cord PRIVATE gdi32) + endif() +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index c6bcc7d7..32a021e7 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -14,8 +14,6 @@ + # modified is included with the above copyright notice. + ## + +-add_definitions("-DGC_NOT_DLL") +- + # Compile some tests as C++ to test extern "C" in header files. + if (enable_cplusplus) + set_source_files_properties(leak_test.c test.c +@@ -23,51 +21,51 @@ if (enable_cplusplus) + endif() + + add_executable(gctest WIN32 test.c) +-target_link_libraries(gctest gc-lib) ++target_link_libraries(gctest PRIVATE gc) + add_test(NAME gctest COMMAND gctest) + + add_executable(hugetest huge_test.c) +-target_link_libraries(hugetest gc-lib) ++target_link_libraries(hugetest PRIVATE gc) + add_test(NAME hugetest COMMAND hugetest) + + add_executable(leaktest leak_test.c) +-target_link_libraries(leaktest gc-lib) ++target_link_libraries(leaktest PRIVATE gc) + add_test(NAME leaktest COMMAND leaktest) + + add_executable(middletest middle.c) +-target_link_libraries(middletest gc-lib) ++target_link_libraries(middletest PRIVATE gc) + add_test(NAME middletest COMMAND middletest) + + add_executable(realloc_test realloc_test.c) +-target_link_libraries(realloc_test gc-lib) ++target_link_libraries(realloc_test PRIVATE gc) + add_test(NAME realloc_test COMMAND realloc_test) + + add_executable(smashtest smash_test.c) +-target_link_libraries(smashtest gc-lib) ++target_link_libraries(smashtest PRIVATE gc) + add_test(NAME smashtest COMMAND smashtest) + + if (enable_gc_debug) + add_executable(tracetest trace_test.c) +- target_link_libraries(tracetest gc-lib) ++ target_link_libraries(tracetest PRIVATE gc) + add_test(NAME tracetest COMMAND tracetest) + endif() + + if (enable_cplusplus) + # TODO add_executable(test_cpp test_cpp.cc) +- # target_link_libraries(test_cpp gc-lib) ++ # target_link_libraries(test_cpp PRIVATE gc) + # add_test(NAME test_cpp COMMAND test_cpp) + endif() + + if (enable_disclaim) + add_executable(disclaim_bench disclaim_bench.c) +- target_link_libraries(disclaim_bench gc-lib) ++ target_link_libraries(disclaim_bench PRIVATE gc) + add_test(NAME disclaim_bench COMMAND disclaim_bench) + + add_executable(disclaim_test disclaim_test.c) +- target_link_libraries(disclaim_test gc-lib) ++ target_link_libraries(disclaim_test PRIVATE gc) + add_test(NAME disclaim_test COMMAND disclaim_test) + + add_executable(disclaim_weakmap_test disclaim_weakmap_test.c) +- target_link_libraries(disclaim_weakmap_test gc-lib) ++ target_link_libraries(disclaim_weakmap_test PRIVATE gc) + add_test(NAME disclaim_weakmap_test COMMAND disclaim_weakmap_test) + endif() + \ No newline at end of file diff --git a/vcpkg/ports/bdwgc/CONTROL b/vcpkg/ports/bdwgc/CONTROL new file mode 100644 index 0000000..9730760 --- /dev/null +++ b/vcpkg/ports/bdwgc/CONTROL @@ -0,0 +1,3 @@ +Source: bdwgc +Version: 8.0.4-1 +Description: The Boehm-Demers-Weiser conservative C/C++ Garbage Collector (libgc, bdwgc, boehm-gc) diff --git a/vcpkg/ports/bdwgc/portfile.cmake b/vcpkg/ports/bdwgc/portfile.cmake new file mode 100644 index 0000000..8fdbbf7 --- /dev/null +++ b/vcpkg/ports/bdwgc/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ivmai/bdwgc + # REF v8.0.4 + # SHA512 f3c178c9cab9d9df9ecdad5ac5661c916518d29b0eaca24efe569cb757c386c118ad4389851107597d99ff1bbe99b46383cce73dfd01be983196aa57c9626a4a + REF 0c8905e84d16bd5e14ed91e21904fd7ab9d197e2 + SHA512 b38fe86d0dfaacd502971e39ea7df83a3dbf5542711f6b0462b7a6d48dbcf43da07a41a60ee96bca6403a2d2adaac0815a64667f3c80549ca57c5ebbe0e9672d + HEAD_REF master + PATCHES + 001-install-libraries.patch +) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -Dbuild_tests=OFF + -Dbuild_cord=OFF + OPTIONS_DEBUG + -Dinstall_headers=OFF +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/README.QUICK DESTINATION ${CURRENT_PACKAGES_DIR}/share/bdwgc RENAME copyright) diff --git a/vcpkg/ports/beast/CONTROL b/vcpkg/ports/beast/CONTROL new file mode 100644 index 0000000..d2f2fd8 --- /dev/null +++ b/vcpkg/ports/beast/CONTROL @@ -0,0 +1,5 @@ +Source: beast +Version: 0 +Homepage: https://www.boost.org/doc/libs/release/libs/beast/ +Build-Depends: boost-beast +Description: HTTP/1 and WebSocket, header-only using Boost.Asio and C++11 diff --git a/vcpkg/ports/beast/portfile.cmake b/vcpkg/ports/beast/portfile.cmake new file mode 100644 index 0000000..065116c --- /dev/null +++ b/vcpkg/ports/beast/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/vcpkg/ports/behaviortree-cpp/001_port_fixes.patch b/vcpkg/ports/behaviortree-cpp/001_port_fixes.patch new file mode 100644 index 0000000..3cb4ac2 --- /dev/null +++ b/vcpkg/ports/behaviortree-cpp/001_port_fixes.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 75dea11..4eea781 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -229,7 +229,7 @@ if( ZMQ_FOUND ) + endif() + + if(MSVC) +- target_compile_options(${BEHAVIOR_TREE_LIBRARY} PRIVATE /W4 /WX) ++ target_compile_options(${BEHAVIOR_TREE_LIBRARY} PRIVATE /W4 /wd4702) + else() + target_compile_options(${BEHAVIOR_TREE_LIBRARY} PRIVATE + -Wall -Wextra -Werror=return-type) diff --git a/vcpkg/ports/behaviortree-cpp/002_fix_dependencies.patch b/vcpkg/ports/behaviortree-cpp/002_fix_dependencies.patch new file mode 100644 index 0000000..76d7857 --- /dev/null +++ b/vcpkg/ports/behaviortree-cpp/002_fix_dependencies.patch @@ -0,0 +1,35 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 75dea11..23053ca 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -14,7 +14,7 @@ if(MSVC) + endif() + + #---- Include boost to add coroutines ---- +-find_package(Boost COMPONENTS coroutine QUIET) ++find_package(Boost REQUIRED) # coroutine2 is header-only + if(Boost_FOUND) + include_directories(${Boost_INCLUDE_DIRS}) + string(REPLACE "." "0" Boost_VERSION_NODOT ${Boost_VERSION}) +@@ -45,18 +45,18 @@ option(BUILD_SHARED_LIBS "Build shared libraries" ON) + + #---- Find other packages ---- + find_package(Threads) +-find_package(ZMQ) ++find_package(cppzmq) + + list(APPEND BEHAVIOR_TREE_EXTERNAL_LIBRARIES + ${CMAKE_THREAD_LIBS_INIT} + ${CMAKE_DL_LIBS} + ${Boost_LIBRARIES} ) + +-if( ZMQ_FOUND ) ++if( ZMQ_FOUND OR ON ) + message(STATUS "ZeroMQ found.") + add_definitions( -DZMQ_FOUND ) + list(APPEND BT_SOURCE src/loggers/bt_zmq_publisher.cpp) +- list(APPEND BEHAVIOR_TREE_EXTERNAL_LIBRARIES ${ZMQ_LIBRARIES}) ++ list(APPEND BEHAVIOR_TREE_EXTERNAL_LIBRARIES cppzmq) + else() + message(WARNING "ZeroMQ NOT found. Skipping the build of [PublisherZMQ] and [bt_recorder].") + endif() diff --git a/vcpkg/ports/behaviortree-cpp/portfile.cmake b/vcpkg/ports/behaviortree-cpp/portfile.cmake new file mode 100644 index 0000000..f671537 --- /dev/null +++ b/vcpkg/ports/behaviortree-cpp/portfile.cmake @@ -0,0 +1,42 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/BehaviorTree/BehaviorTree.CPP/archive/3.5.1.tar.gz" + FILENAME "BehaviorTree.CPP.3.5.1.tar.gz" + SHA512 66db43225e692fa0f9073e63bdff765c037440372478792a9b442103a8bed945f5c3ae1d66266b86cb41d0006404a8297708a799ec0c7286c2beec6f964a4ac6 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + 001_port_fixes.patch + 002_fix_dependencies.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_DISABLE_FIND_PACKAGE_ament_cmake=1 + -DCMAKE_DISABLE_FIND_PACKAGE_Curses=1 + -DBUILD_EXAMPLES=OFF + -DBUILD_UNIT_TESTS=OFF + -DBUILD_TOOLS=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/BehaviorTreeV3/cmake TARGET_PATH share/behaviortreev3) +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/lib/BehaviorTreeV3" + "${CURRENT_PACKAGES_DIR}/debug/lib/BehaviorTreeV3" +) + +vcpkg_test_cmake(PACKAGE_NAME BehaviorTreeV3) diff --git a/vcpkg/ports/behaviortree-cpp/vcpkg.json b/vcpkg/ports/behaviortree-cpp/vcpkg.json new file mode 100644 index 0000000..783187f --- /dev/null +++ b/vcpkg/ports/behaviortree-cpp/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "behaviortree-cpp", + "version-string": "3.5.1", + "port-version": 2, + "description": "Behavior Trees Library in C++.", + "homepage": "https://www.behaviortree.dev", + "supports": "!uwp & !osx", + "dependencies": [ + "boost-coroutine2", + "cppzmq" + ] +} diff --git a/vcpkg/ports/benchmark/CONTROL b/vcpkg/ports/benchmark/CONTROL new file mode 100644 index 0000000..82e4b57 --- /dev/null +++ b/vcpkg/ports/benchmark/CONTROL @@ -0,0 +1,5 @@ +Source: benchmark +Version: 1.5.1 +Homepage: https://github.com/google/benchmark +Description: A library to support the benchmarking of functions, similar to unit-tests. +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/benchmark/portfile.cmake b/vcpkg/ports/benchmark/portfile.cmake new file mode 100644 index 0000000..9173eff --- /dev/null +++ b/vcpkg/ports/benchmark/portfile.cmake @@ -0,0 +1,33 @@ +#https://github.com/google/benchmark/issues/661 +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/benchmark + REF 8039b4030795b1c9b8cedb78e3a2a6fb89574b6e #v1.5.1 + SHA512 845eaf24ceea35fae0be89fea72ec27326506b1f3677e74a83c8f82dcb55ad6adc9a3d03f849b7b02f90991cd714152c63f9623a480b4f02464a63b5657471d4 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBENCHMARK_ENABLE_TESTING=OFF +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/benchmark) + +vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES pthread) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/bento4/CONTROL b/vcpkg/ports/bento4/CONTROL new file mode 100644 index 0000000..eff84ed --- /dev/null +++ b/vcpkg/ports/bento4/CONTROL @@ -0,0 +1,5 @@ +Source: bento4 +Version: 1.5.1-628 +Homepage: https://github.com/axiomatic-systems/Bento4 +Description: Bento4 is a C++ class library and tools designed to read and write ISO-MP4 files. This format is defined in international specifications ISO/IEC 14496-12, 14496-14 and 14496-15. + diff --git a/vcpkg/ports/bento4/LICENSE b/vcpkg/ports/bento4/LICENSE new file mode 100644 index 0000000..c1d00b2 --- /dev/null +++ b/vcpkg/ports/bento4/LICENSE @@ -0,0 +1,6 @@ +Bento4 is developed by Axiomatic Systems LLC in San Francisco, California. + +This software is available under two different licenses +For applications that are entirely distributable under the terms of the GPL(https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html), the Bento4 GPL license applies. +For applications that cannot be entirely distributable under the terms of the GPL (either the application, or code modules linked with the application are not compatible with the terms of the GPL licence), a non-GPL commercial license is available from Axiomatic Systems LLC. +Contact Gilles Boccon-Gibod (licensing@axiosys.com or bok@bok.net) for more information. \ No newline at end of file diff --git a/vcpkg/ports/bento4/fix-install-and-c4996-error.patch b/vcpkg/ports/bento4/fix-install-and-c4996-error.patch new file mode 100644 index 0000000..c99fdc4 --- /dev/null +++ b/vcpkg/ports/bento4/fix-install-and-c4996-error.patch @@ -0,0 +1,43 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2f08b2f..fccf2a8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -35,6 +35,8 @@ endif() + + add_library(ap4 STATIC ${AP4_SOURCES}) + ++add_definitions(-D_CRT_SECURE_NO_WARNINGS) ++ + # Includes + include_directories( + ${SOURCE_CORE} +@@ -43,6 +45,14 @@ include_directories( + ${SOURCE_METADATA} + ) + ++# AP4 includes ++file(GLOB AP4_INCLUDES ++ ${SOURCE_CODECS}/*.h ++ ${SOURCE_CORE}/*.h ++ ${SOURCE_CRYPTO}/*.h ++ ${SOURCE_METADATA}/*.h ++) ++ + # Apps + file(GLOB BENTO4_APPS RELATIVE ${SOURCE_ROOT}/Apps ${SOURCE_ROOT}/Apps/*) + foreach(app ${BENTO4_APPS}) +@@ -50,3 +60,13 @@ foreach(app ${BENTO4_APPS}) + add_executable(${binary_name} ${SOURCE_ROOT}/Apps/${app}/${app}.cpp) + target_link_libraries(${binary_name} ap4) + endforeach() ++ ++# Install targets ++install(TARGETS ap4 ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) ++ ++# Install headers ++install(FILES ${AP4_INCLUDES} DESTINATION include) +\ No newline at end of file diff --git a/vcpkg/ports/bento4/portfile.cmake b/vcpkg/ports/bento4/portfile.cmake new file mode 100644 index 0000000..b485fbb --- /dev/null +++ b/vcpkg/ports/bento4/portfile.cmake @@ -0,0 +1,25 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO axiomatic-systems/Bento4 + REF v1.5.1-628 + SHA512 2bf44f55307178cc9128e323904acbfaa2f88e06beff26cf27fc0a7707875942de89778a0ee1a8315ef2c3b19754edad77d32fdb74f3d651f03c2623e7a9122d + HEAD_REF master + PATCHES fix-install-and-c4996-error.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/berkeleydb/CMakeLists.txt b/vcpkg/ports/berkeleydb/CMakeLists.txt new file mode 100644 index 0000000..9297aac --- /dev/null +++ b/vcpkg/ports/berkeleydb/CMakeLists.txt @@ -0,0 +1,278 @@ +cmake_minimum_required(VERSION 3.8) +project(berkeleydb C CXX) + +option(INSTALL_HEADERS "Install header files" ON) + +add_definitions( + -DWIN32 + -D_WINDOWS + -D_CRT_SECURE_NO_DEPRECATE + -D_CRT_NONSTDC_NO_DEPRECATE + -D_LIB + -DUNICODE + -D_UNICODE +) + +if (BUILD_SHARED_LIBS) + add_definitions( + -DDB_CREATE_DLL + -D_USRDLL + ) +else() + add_definitions( + -D_LIB + ) +endif() + +add_library(libdb48 + btree/bt_compact.c + btree/bt_compare.c + btree/bt_compress.c + btree/bt_conv.c + btree/bt_curadj.c + btree/bt_cursor.c + btree/bt_delete.c + btree/bt_method.c + btree/bt_open.c + btree/bt_put.c + btree/bt_rec.c + btree/bt_reclaim.c + btree/bt_recno.c + btree/bt_rsearch.c + btree/bt_search.c + btree/bt_split.c + btree/bt_stat.c + btree/bt_upgrade.c + btree/bt_verify.c + btree/btree_auto.c + db/crdel_auto.c + db/crdel_rec.c + common/crypto_stub.c + cxx/cxx_db.cpp + cxx/cxx_dbc.cpp + cxx/cxx_dbt.cpp + cxx/cxx_env.cpp + cxx/cxx_except.cpp + cxx/cxx_lock.cpp + cxx/cxx_logc.cpp + cxx/cxx_mpool.cpp + cxx/cxx_multi.cpp + cxx/cxx_seq.cpp + cxx/cxx_txn.cpp + db/db.c + db/db_am.c + db/db_auto.c + common/db_byteorder.c + db/db_cam.c + db/db_cds.c + db/db_conv.c + db/db_dispatch.c + db/db_dup.c + common/db_err.c + common/db_getlong.c + common/db_idspace.c + common/db_compint.c + db/db_iface.c + db/db_join.c + common/db_log2.c + db/db_meta.c + db/db_method.c + db/db_open.c + db/db_overflow.c + db/db_ovfl_vrfy.c + db/db_pr.c + db/db_rec.c + db/db_reclaim.c + db/db_remove.c + db/db_rename.c + db/db_ret.c + db/db_setid.c + db/db_setlsn.c + common/db_shash.c + db/db_sort_multiple.c + db/db_stati.c + db/db_truncate.c + db/db_upg.c + db/db_upg_opd.c + db/db_vrfy.c + db/db_vrfyutil.c + db/partition.c + dbm/dbm.c + dbreg/dbreg.c + dbreg/dbreg_auto.c + dbreg/dbreg_rec.c + dbreg/dbreg_stat.c + dbreg/dbreg_util.c + common/dbt.c + env/env_alloc.c + env/env_config.c + env/env_failchk.c + env/env_file.c + env/env_globals.c + env/env_method.c + env/env_name.c + env/env_open.c + env/env_recover.c + env/env_region.c + env/env_register.c + env/env_sig.c + env/env_stat.c + fileops/fileops_auto.c + fileops/fop_basic.c + fileops/fop_rec.c + fileops/fop_util.c + hash/hash.c + hash/hash_auto.c + hash/hash_conv.c + hash/hash_dup.c + hash/hash_func.c + hash/hash_meta.c + hash/hash_method.c + hash/hash_open.c + hash/hash_page.c + hash/hash_rec.c + hash/hash_reclaim.c + hash/hash_stat.c + hash/hash_upgrade.c + hash/hash_verify.c + hmac/hmac.c + hsearch/hsearch.c + build_windows/libdb.def + lock/lock.c + lock/lock_deadlock.c + lock/lock_failchk.c + lock/lock_id.c + lock/lock_list.c + lock/lock_method.c + lock/lock_region.c + lock/lock_stat.c + lock/lock_timer.c + lock/lock_util.c + log/log.c + log/log_archive.c + log/log_compare.c + log/log_debug.c + log/log_get.c + log/log_method.c + log/log_put.c + log/log_stat.c + common/mkpath.c + mp/mp_alloc.c + mp/mp_bh.c + mp/mp_fget.c + mp/mp_fmethod.c + mp/mp_fopen.c + mp/mp_fput.c + mp/mp_fset.c + mp/mp_method.c + mp/mp_mvcc.c + mp/mp_region.c + mp/mp_register.c + mp/mp_resize.c + mp/mp_stat.c + mp/mp_sync.c + mp/mp_trickle.c + mutex/mut_alloc.c + mutex/mut_failchk.c + mutex/mut_method.c + mutex/mut_region.c + mutex/mut_stat.c + mutex/mut_win32.c + common/openflags.c + os/os_abort.c + os/os_addrinfo.c + os_windows/os_abs.c + os/os_alloc.c + os_windows/os_clock.c + os_windows/os_config.c + os_windows/os_cpu.c + os/os_ctime.c + os_windows/os_dir.c + os_windows/os_errno.c + os_windows/os_fid.c + os_windows/os_flock.c + os_windows/os_fsync.c + os_windows/os_getenv.c + os_windows/os_handle.c + os_windows/os_map.c + os_windows/os_mkdir.c + os_windows/os_open.c + os/os_pid.c + os_windows/os_rename.c + os/os_root.c + os/os_rpath.c + os_windows/os_rw.c + os_windows/os_seek.c + os/os_stack.c + os_windows/os_stat.c + os/os_tmpdir.c + os_windows/os_truncate.c + os/os_uid.c + os_windows/os_unlink.c + os_windows/os_yield.c + qam/qam.c + qam/qam_auto.c + qam/qam_conv.c + qam/qam_files.c + qam/qam_method.c + qam/qam_open.c + qam/qam_rec.c + qam/qam_stat.c + qam/qam_upgrade.c + qam/qam_verify.c + rep/rep_auto.c + rep/rep_backup.c + rep/rep_elect.c + rep/rep_lease.c + rep/rep_log.c + rep/rep_method.c + rep/rep_record.c + rep/rep_region.c + rep/rep_stat.c + rep/rep_util.c + rep/rep_verify.c + repmgr/repmgr_auto.c + repmgr/repmgr_elect.c + repmgr/repmgr_method.c + repmgr/repmgr_msg.c + repmgr/repmgr_net.c + repmgr/repmgr_queue.c + repmgr/repmgr_sel.c + repmgr/repmgr_stat.c + repmgr/repmgr_util.c + repmgr/repmgr_windows.c + sequence/seq_stat.c + sequence/sequence.c + hmac/sha1.c + clib/strsep.c + txn/txn.c + txn/txn_auto.c + txn/txn_chkpt.c + txn/txn_failchk.c + txn/txn_method.c + txn/txn_rec.c + txn/txn_recover.c + txn/txn_region.c + txn/txn_stat.c + txn/txn_util.c + common/os_method.c + common/util_cache.c + common/util_log.c + common/util_sig.c + common/zerofill.c +) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR} build_windows dbinc) + +target_link_libraries(libdb48 PUBLIC ws2_32.lib) + +install(TARGETS libdb48 + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +if(INSTALL_HEADERS) + file(GLOB HEADERS build_windows/*.h) + install(FILES ${HEADERS} DESTINATION include) +endif() \ No newline at end of file diff --git a/vcpkg/ports/berkeleydb/CONTROL b/vcpkg/ports/berkeleydb/CONTROL new file mode 100644 index 0000000..91677a1 --- /dev/null +++ b/vcpkg/ports/berkeleydb/CONTROL @@ -0,0 +1,6 @@ +Source: berkeleydb +Version: 4.8.30 +Port-Version: 5 +Homepage: https://download.oracle.com/ +Description: BDB - A high-performance embedded database for key/value data. +Supports: !(uwp|linux|osx) diff --git a/vcpkg/ports/berkeleydb/fix-conflict-macro.patch b/vcpkg/ports/berkeleydb/fix-conflict-macro.patch new file mode 100644 index 0000000..c15d7ed --- /dev/null +++ b/vcpkg/ports/berkeleydb/fix-conflict-macro.patch @@ -0,0 +1,123 @@ +diff --git a/dbinc/atomic.h b/dbinc/atomic.h +index 0034dcc..2dd5e03 100644 +--- a/dbinc/atomic.h ++++ b/dbinc/atomic.h +@@ -70,7 +70,7 @@ typedef struct { + * These have no memory barriers; the caller must include them when necessary. + */ + #define atomic_read(p) ((p)->value) +-#define atomic_init(p, val) ((p)->value = (val)) ++#define bdb_atomic_init(p, val) ((p)->value = (val)) + + #ifdef HAVE_ATOMIC_SUPPORT + +@@ -206,7 +206,7 @@ static inline int __atomic_compare_exchange( + #define atomic_dec(env, p) (--(p)->value) + #define atomic_compare_exchange(env, p, oldval, newval) \ + (DB_ASSERT(env, atomic_read(p) == (oldval)), \ +- atomic_init(p, (newval)), 1) ++ bdb_atomic_init(p, (newval)), 1) + #else + #define atomic_inc(env, p) __atomic_inc(env, p) + #define atomic_dec(env, p) __atomic_dec(env, p) +diff --git a/mp/mp_fget.c b/mp/mp_fget.c +index 5fdee5a..452ef17 100644 +--- a/mp/mp_fget.c ++++ b/mp/mp_fget.c +@@ -617,7 +617,7 @@ alloc: /* Allocate a new buffer header and data space. */ + + /* Initialize enough so we can call __memp_bhfree. */ + alloc_bhp->flags = 0; +- atomic_init(&alloc_bhp->ref, 1); ++ bdb_atomic_init(&alloc_bhp->ref, 1); + #ifdef DIAGNOSTIC + if ((uintptr_t)alloc_bhp->buf & (sizeof(size_t) - 1)) { + __db_errx(env, +@@ -911,7 +911,7 @@ alloc: /* Allocate a new buffer header and data space. */ + MVCC_MPROTECT(bhp->buf, mfp->stat.st_pagesize, + PROT_READ); + +- atomic_init(&alloc_bhp->ref, 1); ++ bdb_atomic_init(&alloc_bhp->ref, 1); + MUTEX_LOCK(env, alloc_bhp->mtx_buf); + alloc_bhp->priority = bhp->priority; + alloc_bhp->pgno = bhp->pgno; +diff --git a/mp/mp_mvcc.c b/mp/mp_mvcc.c +index 34467d2..b604388 100644 +--- a/mp/mp_mvcc.c ++++ b/mp/mp_mvcc.c +@@ -276,7 +276,7 @@ __memp_bh_freeze(dbmp, infop, hp, bhp, need_frozenp) + #else + memcpy(frozen_bhp, bhp, SSZA(BH, buf)); + #endif +- atomic_init(&frozen_bhp->ref, 0); ++ bdb_atomic_init(&frozen_bhp->ref, 0); + if (mutex != MUTEX_INVALID) + frozen_bhp->mtx_buf = mutex; + else if ((ret = __mutex_alloc(env, MTX_MPOOL_BH, +@@ -428,7 +428,7 @@ __memp_bh_thaw(dbmp, infop, hp, frozen_bhp, alloc_bhp) + #endif + alloc_bhp->mtx_buf = mutex; + MUTEX_LOCK(env, alloc_bhp->mtx_buf); +- atomic_init(&alloc_bhp->ref, 1); ++ bdb_atomic_init(&alloc_bhp->ref, 1); + F_CLR(alloc_bhp, BH_FROZEN); + } + +diff --git a/mp/mp_region.c b/mp/mp_region.c +index e6cece9..e3e3382 100644 +--- a/mp/mp_region.c ++++ b/mp/mp_region.c +@@ -224,7 +224,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg) + MTX_MPOOL_FILE_BUCKET, 0, &htab[i].mtx_hash)) != 0) + return (ret); + SH_TAILQ_INIT(&htab[i].hash_bucket); +- atomic_init(&htab[i].hash_page_dirty, 0); ++ bdb_atomic_init(&htab[i].hash_page_dirty, 0); + } + + /* +@@ -269,7 +269,7 @@ __memp_init(env, dbmp, reginfo_off, htab_buckets, max_nreg) + hp->mtx_hash = (mtx_base == MUTEX_INVALID) ? MUTEX_INVALID : + mtx_base + i; + SH_TAILQ_INIT(&hp->hash_bucket); +- atomic_init(&hp->hash_page_dirty, 0); ++ bdb_atomic_init(&hp->hash_page_dirty, 0); + #ifdef HAVE_STATISTICS + hp->hash_io_wait = 0; + hp->hash_frozen = hp->hash_thawed = hp->hash_frozen_freed = 0; +diff --git a/mutex/mut_method.c b/mutex/mut_method.c +index 2588763..56b6723 100644 +--- a/mutex/mut_method.c ++++ b/mutex/mut_method.c +@@ -426,7 +426,7 @@ atomic_compare_exchange(env, v, oldval, newval) + MUTEX_LOCK(env, mtx); + ret = atomic_read(v) == oldval; + if (ret) +- atomic_init(v, newval); ++ bdb_atomic_init(v, newval); + MUTEX_UNLOCK(env, mtx); + + return (ret); +diff --git a/mutex/mut_tas.c b/mutex/mut_tas.c +index f3922e0..934a654 100644 +--- a/mutex/mut_tas.c ++++ b/mutex/mut_tas.c +@@ -46,7 +46,7 @@ __db_tas_mutex_init(env, mutex, flags) + + #ifdef HAVE_SHARED_LATCHES + if (F_ISSET(mutexp, DB_MUTEX_SHARED)) +- atomic_init(&mutexp->sharecount, 0); ++ bdb_atomic_init(&mutexp->sharecount, 0); + else + #endif + if (MUTEX_INIT(&mutexp->tas)) { +@@ -486,7 +486,7 @@ __db_tas_mutex_unlock(env, mutex) + F_CLR(mutexp, DB_MUTEX_LOCKED); + /* Flush flag update before zeroing count */ + MEMBAR_EXIT(); +- atomic_init(&mutexp->sharecount, 0); ++ bdb_atomic_init(&mutexp->sharecount, 0); + } else { + DB_ASSERT(env, sharecount > 0); + MEMBAR_EXIT(); diff --git a/vcpkg/ports/berkeleydb/portfile.cmake b/vcpkg/ports/berkeleydb/portfile.cmake new file mode 100644 index 0000000..93d89fb --- /dev/null +++ b/vcpkg/ports/berkeleydb/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_fail_port_install( ON_TARGET "uwp" "linux" "osx") + +vcpkg_download_distfile(ARCHIVE + URLS "http://download.oracle.com/berkeley-db/db-4.8.30.NC.zip" + FILENAME "db-4.8.30.NC.zip" + SHA512 59c1d2d5a3551f988ab1dc063900572b67ad087537e0d71760de34601f9ebd4d5c070a49b809bec4a599a62417e9a162683ce0f6442deb1a0dadb80764bf6eab +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES fix-conflict-macro.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/bfgroup-lyra/CONTROL b/vcpkg/ports/bfgroup-lyra/CONTROL new file mode 100644 index 0000000..ed2976f --- /dev/null +++ b/vcpkg/ports/bfgroup-lyra/CONTROL @@ -0,0 +1,4 @@ +Source: bfgroup-lyra +Version: 1.5 +Homepage: https://bfgroup.github.io/Lyra/ +Description: A simple to use, composable, command line parser for C++ 11 and beyond diff --git a/vcpkg/ports/bfgroup-lyra/portfile.cmake b/vcpkg/ports/bfgroup-lyra/portfile.cmake new file mode 100644 index 0000000..cdb4662 --- /dev/null +++ b/vcpkg/ports/bfgroup-lyra/portfile.cmake @@ -0,0 +1,11 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO bfgroup/Lyra + REF 1.5 + SHA512 1f8e505a487a9421a59afed0ee0c68894fb479117ac20c0bbb8d77ccf50ab938a68c93068f26871b9ddff0a21732d8bb1c6cc997b295a2a39c9363d32e320b3b + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/include/lyra DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/bigint/CMakeLists.txt b/vcpkg/ports/bigint/CMakeLists.txt new file mode 100644 index 0000000..fffc941 --- /dev/null +++ b/vcpkg/ports/bigint/CMakeLists.txt @@ -0,0 +1,42 @@ +cmake_minimum_required(VERSION 3.14.0) +project(bigint CXX) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +set(BIGINT_SRCS + BigUnsigned.cc + BigInteger.cc + BigIntegerAlgorithms.cc + BigUnsignedInABase.cc + BigIntegerUtils.cc +) + +set(BIGINT_HH + NumberlikeArray.hh + BigUnsigned.hh + BigInteger.hh + BigIntegerAlgorithms.hh + BigUnsignedInABase.hh + BigIntegerLibrary.hh + BigIntegerUtils.hh +) + +add_library(bigint ${BIGINT_SRCS}) +target_include_directories(bigint PUBLIC $ $) + +install( + TARGETS bigint + EXPORT bigint-config +) + +install( + EXPORT bigint-config + NAMESPACE bigint:: + DESTINATION share/bigint +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES ${BIGINT_HH} DESTINATION include/bigint) +endif() diff --git a/vcpkg/ports/bigint/CONTROL b/vcpkg/ports/bigint/CONTROL new file mode 100644 index 0000000..1f0d8f6 --- /dev/null +++ b/vcpkg/ports/bigint/CONTROL @@ -0,0 +1,5 @@ +Source: bigint +Version: 2010.04.30 +Port-Version: 6 +Homepage: https://mattmccutchen.net/bigint +Description: C++ Big Integer Library diff --git a/vcpkg/ports/bigint/fix-osx-usage.patch b/vcpkg/ports/bigint/fix-osx-usage.patch new file mode 100644 index 0000000..f387d7b --- /dev/null +++ b/vcpkg/ports/bigint/fix-osx-usage.patch @@ -0,0 +1,39 @@ +diff --git a/BigUnsigned.hh b/BigUnsigned.hh +index adf1c00..9228753 100644 +--- a/BigUnsigned.hh ++++ b/BigUnsigned.hh +@@ -20,7 +20,7 @@ public: + typedef unsigned long Blk; + + typedef NumberlikeArray::Index Index; +- NumberlikeArray::N; ++ using NumberlikeArray::N; + + protected: + // Creates a BigUnsigned with a capacity; for internal use. +@@ -84,8 +84,8 @@ public: + // BIT/BLOCK ACCESSORS + + // Expose these from NumberlikeArray directly. +- NumberlikeArray::getCapacity; +- NumberlikeArray::getLength; ++ using NumberlikeArray::getCapacity; ++ using NumberlikeArray::getLength; + + /* Returns the requested block, or 0 if it is beyond the length (as if + * the number had 0s infinitely to the left). */ +diff --git a/BigUnsignedInABase.hh b/BigUnsignedInABase.hh +index 8f9bdce..0ea89c6 100644 +--- a/BigUnsignedInABase.hh ++++ b/BigUnsignedInABase.hh +@@ -100,8 +100,8 @@ public: + Base getBase() const { return base; } + + // Expose these from NumberlikeArray directly. +- NumberlikeArray::getCapacity; +- NumberlikeArray::getLength; ++ using NumberlikeArray::getCapacity; ++ using NumberlikeArray::getLength; + + /* Returns the requested digit, or 0 if it is beyond the length (as if + * the number had 0s infinitely to the left). */ diff --git a/vcpkg/ports/bigint/portfile.cmake b/vcpkg/ports/bigint/portfile.cmake new file mode 100644 index 0000000..7231697 --- /dev/null +++ b/vcpkg/ports/bigint/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "https://mattmccutchen.net/bigint/bigint-2010.04.30.tar.bz2" + FILENAME "bigint-2010.04.30.tar.bz2" + SHA512 bb64380e51991f97a2489c04801ab4372f795b5e23870ad12d71087f1a2afba9b32f74dcdbdcb5228ebf0dd74a37185285bac7653dd3c62d6118d63c298689af +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES fix-osx-usage.patch +) + +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() +vcpkg_fixup_cmake_targets() + +file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/binn/0001_fix_uwp.patch b/vcpkg/ports/binn/0001_fix_uwp.patch new file mode 100644 index 0000000..f43cdd2 --- /dev/null +++ b/vcpkg/ports/binn/0001_fix_uwp.patch @@ -0,0 +1,54 @@ +diff --git a/src/binn.c b/src/binn.c +index ef32f35..d12d473 100644 +--- a/src/binn.c ++++ b/src/binn.c +@@ -142,8 +142,14 @@ BINN_PRIVATE void copy_be64(u64 *pdest, u64 *psource) { + /***************************************************************************/ + + #ifndef WIN32 + #define stricmp strcasecmp + #define strnicmp strncasecmp ++#define sprintf_s(b, n, ...) sprintf(b, __VA_ARGS__) ++#define strcpy_s(b, n, s) strcpy(b, s) ++#else ++#define stricmp _stricmp ++#define strnicmp _strnicmp ++#define strdup _strdup + #endif + + BINN_PRIVATE BOOL IsValidBinnHeader(void *pbuf, int *ptype, int *pcount, int *psize, int *pheadersize); +@@ -1582,6 +1588,7 @@ BINN_PRIVATE BOOL binn_read_pair(int expected_type, void *ptr, int pos, int *pid + base = p; + plimit = p + size - 1; + p += header_size; ++ key = 0; + + for (i = 0; i < count; i++) { + switch (type) { +@@ -3333,7 +3340,7 @@ char * APIENTRY binn_get_str(binn *value) { + + if (type_family(value->type) == BINN_FAMILY_INT) { + if (copy_int_value(value->ptr, &vint, value->type, BINN_INT64) == FALSE) return NULL; +- sprintf(buf, "%" INT64_FORMAT, vint); ++ sprintf_s(buf, sizeof buf, "%" INT64_FORMAT, vint); + goto loc_convert_value; + } + +@@ -3341,14 +3348,14 @@ char * APIENTRY binn_get_str(binn *value) { + case BINN_FLOAT: + value->vdouble = value->vfloat; + case BINN_DOUBLE: +- sprintf(buf, "%g", value->vdouble); ++ sprintf_s(buf, sizeof buf, "%g", value->vdouble); + goto loc_convert_value; + case BINN_STRING: + return (char*) value->ptr; + case BINN_BOOL: + if (value->vbool) +- strcpy(buf, "true"); ++ strcpy_s(buf, sizeof buf, "true"); + else +- strcpy(buf, "false"); ++ strcpy_s(buf, sizeof buf, "false"); + goto loc_convert_value; + } diff --git a/vcpkg/ports/binn/CMakeLists.txt b/vcpkg/ports/binn/CMakeLists.txt new file mode 100644 index 0000000..f92b00c --- /dev/null +++ b/vcpkg/ports/binn/CMakeLists.txt @@ -0,0 +1,21 @@ +cmake_minimum_required(VERSION 3.8) + +project(binn + VERSION 1.0 + DESCRIPTION "Binn is a binary data serialization format designed to be compact, fast and easy to use." + HOMEPAGE_URL "https://github.com/liteserver/binn" +) + +add_library (binn src/binn.h src/binn.c) + +target_include_directories(binn + PUBLIC + ${PROJECT_SOURCE_DIR}/src +) + +install( + TARGETS binn + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) diff --git a/vcpkg/ports/binn/CONTROL b/vcpkg/ports/binn/CONTROL new file mode 100644 index 0000000..0e0cc1a --- /dev/null +++ b/vcpkg/ports/binn/CONTROL @@ -0,0 +1,4 @@ +Source: binn +Version: 2.0 +Port-Version: 1 +Description: Binn is a binary data serialization format designed to be compact, fast and easy to use. diff --git a/vcpkg/ports/binn/portfile.cmake b/vcpkg/ports/binn/portfile.cmake new file mode 100644 index 0000000..1717d60 --- /dev/null +++ b/vcpkg/ports/binn/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO liteserver/binn + REF 9d7a26800cc5285818502778a6b3905d65664a1d # 2.0 + SHA512 2507303dfa8b1815507e2ff96482ef94792927a5004195a55c5dadf1fcc29bfa474f8f2a8fb4c285132e782fb54b836d5113e431d25dc23aadbb148d588f26c4 + HEAD_REF master + PATCHES + 0001_fix_uwp.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +file(INSTALL ${SOURCE_PATH}/src/binn.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/binn) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/binn) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/binn/LICENSE ${CURRENT_PACKAGES_DIR}/share/binn/copyright) diff --git a/vcpkg/ports/bitmagic/CONTROL b/vcpkg/ports/bitmagic/CONTROL new file mode 100644 index 0000000..0269eb1 --- /dev/null +++ b/vcpkg/ports/bitmagic/CONTROL @@ -0,0 +1,4 @@ +Source: bitmagic +Version: 6.4.0 +Homepage: http://bitmagic.io +Description: Algorithms and tools for Algebra of Sets for information retrieval, indexing of databases, scientific algorithms, ranking, clustering, unsupervised machine learning and signal processing. diff --git a/vcpkg/ports/bitmagic/portfile.cmake b/vcpkg/ports/bitmagic/portfile.cmake new file mode 100644 index 0000000..f1cc0ed --- /dev/null +++ b/vcpkg/ports/bitmagic/portfile.cmake @@ -0,0 +1,13 @@ +# Header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tlk00/BitMagic + REF v6.4.0 + SHA512 a7968aaed950e9174192635fe7ab560234bb2757519ea5a2db911e73457e5859f0e16499756865d1eeab286a93da0e87bd454cfa750c20093db3219c05204f96 + HEAD_REF master + +) + +file(GLOB HEADER_LIST "${SOURCE_PATH}/src/*.h") +file(INSTALL ${HEADER_LIST} DESTINATION ${CURRENT_PACKAGES_DIR}/include) +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/bitserializer-cpprestjson/CONTROL b/vcpkg/ports/bitserializer-cpprestjson/CONTROL new file mode 100644 index 0000000..24c03ce --- /dev/null +++ b/vcpkg/ports/bitserializer-cpprestjson/CONTROL @@ -0,0 +1,4 @@ +Source: bitserializer-cpprestjson +Version: alias +Build-Depends: bitserializer[cpprestjson-archive] +Description: Deprecated alias for bitserializer-cpprestjson diff --git a/vcpkg/ports/bitserializer-cpprestjson/portfile.cmake b/vcpkg/ports/bitserializer-cpprestjson/portfile.cmake new file mode 100644 index 0000000..0015715 --- /dev/null +++ b/vcpkg/ports/bitserializer-cpprestjson/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) \ No newline at end of file diff --git a/vcpkg/ports/bitserializer-pugixml/CONTROL b/vcpkg/ports/bitserializer-pugixml/CONTROL new file mode 100644 index 0000000..23ab329 --- /dev/null +++ b/vcpkg/ports/bitserializer-pugixml/CONTROL @@ -0,0 +1,4 @@ +Source: bitserializer-pugixml +Version: alias +Build-Depends: bitserializer[pugixml-archive] +Description: Deprecated alias for bitserializer-pugixml diff --git a/vcpkg/ports/bitserializer-pugixml/portfile.cmake b/vcpkg/ports/bitserializer-pugixml/portfile.cmake new file mode 100644 index 0000000..0015715 --- /dev/null +++ b/vcpkg/ports/bitserializer-pugixml/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) \ No newline at end of file diff --git a/vcpkg/ports/bitserializer-rapidjson/CONTROL b/vcpkg/ports/bitserializer-rapidjson/CONTROL new file mode 100644 index 0000000..3cb5508 --- /dev/null +++ b/vcpkg/ports/bitserializer-rapidjson/CONTROL @@ -0,0 +1,4 @@ +Source: bitserializer-rapidjson +Version: alias +Build-Depends: bitserializer[rapidjson-archive] +Description: Deprecated alias for bitserializer-rapidjson diff --git a/vcpkg/ports/bitserializer-rapidjson/portfile.cmake b/vcpkg/ports/bitserializer-rapidjson/portfile.cmake new file mode 100644 index 0000000..0015715 --- /dev/null +++ b/vcpkg/ports/bitserializer-rapidjson/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) \ No newline at end of file diff --git a/vcpkg/ports/bitserializer-rapidyaml/CONTROL b/vcpkg/ports/bitserializer-rapidyaml/CONTROL new file mode 100644 index 0000000..3d622fd --- /dev/null +++ b/vcpkg/ports/bitserializer-rapidyaml/CONTROL @@ -0,0 +1,5 @@ +Source: bitserializer-rapidyaml +Version: alias +Build-Depends: bitserializer[rapidyaml-archive] +Description: Deprecated alias for bitserializer-rapidyaml +Supports: !(arm|arm64|osx) diff --git a/vcpkg/ports/bitserializer-rapidyaml/portfile.cmake b/vcpkg/ports/bitserializer-rapidyaml/portfile.cmake new file mode 100644 index 0000000..0015715 --- /dev/null +++ b/vcpkg/ports/bitserializer-rapidyaml/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) \ No newline at end of file diff --git a/vcpkg/ports/bitserializer/CONTROL b/vcpkg/ports/bitserializer/CONTROL new file mode 100644 index 0000000..63444a8 --- /dev/null +++ b/vcpkg/ports/bitserializer/CONTROL @@ -0,0 +1,21 @@ +Source: bitserializer +Version: 0.10 +Description: Core part of C++ 17 library for serialization to JSON, XML, YAML +Homepage: https://bitbucket.org/Pavel_Kisliak/bitserializer +Default-Features: cpprestjson-archive, rapidjson-archive, pugixml-archive + +Feature: cpprestjson-archive +Build-Depends: cpprestsdk +Description: Module for support JSON (implementation based on the CppRestSDK library) + +Feature: rapidjson-archive +Build-Depends: rapidjson +Description: Module for support JSON (implementation based on the RapidJson library) + +Feature: pugixml-archive +Build-Depends: pugixml +Description: Module for support XML (implementation based on the PugiXml library) + +Feature: rapidyaml-archive +Build-Depends: ryml (!arm&!arm64&!osx) +Description: Module for support YAML (implementation based on the RapidYaml library) diff --git a/vcpkg/ports/bitserializer/portfile.cmake b/vcpkg/ports/bitserializer/portfile.cmake new file mode 100644 index 0000000..d4ae869 --- /dev/null +++ b/vcpkg/ports/bitserializer/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_from_bitbucket( + OUT_SOURCE_PATH SOURCE_PATH + REPO Pavel_Kisliak/BitSerializer + REF 0.10 + SHA512 a8a5acf4f9cc83d3090a3b06efbca682f4e022b5206bc7859ba6738e4d49a7678aa55f431f1721d50b28d8bde126b672396baae27cbaa79f62e3dc237ae678e1 + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + "cpprestjson-archive" BUILD_CPPRESTJSON_ARCHIVE + "rapidjson-archive" BUILD_RAPIDJSON_ARCHIVE + "pugixml-archive" BUILD_PUGIXML_ARCHIVE + "rapidyaml-archive" BUILD_RAPIDYAML_ARCHIVE +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} +) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/bitserializer) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/bitsery/CONTROL b/vcpkg/ports/bitsery/CONTROL new file mode 100644 index 0000000..f219deb --- /dev/null +++ b/vcpkg/ports/bitsery/CONTROL @@ -0,0 +1,4 @@ +Source: bitsery +Version: 5.1.0 +Description: Header only C++ binary serialization library +Homepage: https://github.com/fraillt/bitsery diff --git a/vcpkg/ports/bitsery/portfile.cmake b/vcpkg/ports/bitsery/portfile.cmake new file mode 100644 index 0000000..1069ed6 --- /dev/null +++ b/vcpkg/ports/bitsery/portfile.cmake @@ -0,0 +1,21 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fraillt/bitsery + REF d7876808195834f05fd84619b8f6b266e5c1d5bd + SHA512 ac2c6e3907f8ee8cf51070b3c00aab9071586510d8cfe30f9660ed5aa9918cd996c806b1db2b46d464f1d933fc41472e5406e63ba4814bdc37d2b0f1ad6e1083 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets( CONFIG_PATH lib/cmake/${PORT} ) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/blaze/CONTROL b/vcpkg/ports/blaze/CONTROL new file mode 100644 index 0000000..94d1483 --- /dev/null +++ b/vcpkg/ports/blaze/CONTROL @@ -0,0 +1,6 @@ +Source: blaze +Version: 3.8 +Port-Version: 1 +Build-Depends: lapack, boost-exception +Homepage: https://bitbucket.org/blaze-lib/blaze +Description: Blaze is an open-source, high-performance C++ math library for dense and sparse arithmetic. diff --git a/vcpkg/ports/blaze/fix-vm-build.patch b/vcpkg/ports/blaze/fix-vm-build.patch new file mode 100644 index 0000000..3936299 --- /dev/null +++ b/vcpkg/ports/blaze/fix-vm-build.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e5ab1f460..a23c6dbf5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -145,12 +145,13 @@ if (${BLAZE_CACHE_SIZE_AUTO}) + endif (flag EQUAL 0) + endif (APPLE) + +- if (flag) ++ string(REGEX MATCH "([0-9][0-9]+)" tmp ${tmp}) # Get a number containing at least 2 digits in the string tmp ++ ++ if (flag OR NOT tmp) + message("Cache size not found automatically. Using default value as cache size.") + set(tmp ${BLAZE_CACHE_SIZE_DEFAULT}) + endif (flag) + +- string(REGEX MATCH "([0-9][0-9]+)" tmp ${tmp}) # Get a number containing at least 2 digits in the string tmp + math(EXPR BLAZE_CACHE_SIZE ${tmp}*1024) # Convert to bytes (assuming that the value is given in kibibytes) + + endif (${BLAZE_CACHE_SIZE_AUTO}) diff --git a/vcpkg/ports/blaze/portfile.cmake b/vcpkg/ports/blaze/portfile.cmake new file mode 100644 index 0000000..8ef5792 --- /dev/null +++ b/vcpkg/ports/blaze/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_from_bitbucket( + OUT_SOURCE_PATH SOURCE_PATH + REPO blaze-lib/blaze + REF 0380370f0626de2ad0ec7ea815803e22bbf6b42e + SHA512 47df2a291febf0565787ed9c4222ee1958d03c5b76c54923e4d8e44f75321c266e81d69ba4512a4ab07d7e431c065d025e01269cf9c1d5f0927f133885def4c7 + HEAD_REF master + PATCHES + fix-vm-build.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBLAZE_SMP_THREADS=OpenMP +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/blaze/cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/blend2d/portfile.cmake b/vcpkg/ports/blend2d/portfile.cmake new file mode 100644 index 0000000..99edda6 --- /dev/null +++ b/vcpkg/ports/blend2d/portfile.cmake @@ -0,0 +1,61 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_ARCH "wasm32" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO blend2d/blend2d + REF 960fe2fa6c93b1026a10e3db15e06db77d6817a3 + SHA512 232546d17de7f7f2f6a67ba2d88d1fca30ac6d9199216f98294e1bd0ec4e9dd33cc78a262f89da3ba1f433e9efbecded5866ddbc20f150c6a804c02687650270 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BLEND2D_STATIC) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES + jit BLEND2D_NO_JIT + logging BLEND2D_NO_JIT_LOGGING + tls BLEND2D_NO_TLS +) + +if(NOT BLEND2D_BUILD_NO_JIT) + vcpkg_from_github( + OUT_SOURCE_PATH ASMJIT_SOURCE_PATH + REPO asmjit/asmjit + REF 8f25116f2bea8f5e0604dae867be817e3f12bac1 + SHA512 708ddb7bcd73e76e6485330f8935d64bbe27d526807fb877234303032247dc900751963c935d2a391fddb133eea6ae4300ade061d9202ed7f767e388e379abc8 + HEAD_REF master + ) + + file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/asmjit) + + get_filename_component(ASMJIT_SOURCE_DIR_NAME ${ASMJIT_SOURCE_PATH} NAME) + file(COPY ${ASMJIT_SOURCE_PATH} DESTINATION ${SOURCE_PATH}/3rdparty) + file(RENAME ${SOURCE_PATH}/3rdparty/${ASMJIT_SOURCE_DIR_NAME} ${SOURCE_PATH}/3rdparty/asmjit) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBLEND2D_STATIC=${BLEND2D_STATIC} + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + + +if(BLEND2D_STATIC) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +if(BLEND2D_STATIC) + # Install usage + configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY) +endif() diff --git a/vcpkg/ports/blend2d/usage b/vcpkg/ports/blend2d/usage new file mode 100644 index 0000000..b6d8a65 --- /dev/null +++ b/vcpkg/ports/blend2d/usage @@ -0,0 +1 @@ +Define BL_STATIC before any @PORT@ includes. diff --git a/vcpkg/ports/blend2d/vcpkg.json b/vcpkg/ports/blend2d/vcpkg.json new file mode 100644 index 0000000..4e763f5 --- /dev/null +++ b/vcpkg/ports/blend2d/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "blend2d", + "version-string": "beta_2020-08-24", + "description": "Beta 2D Vector Graphics Powered by a JIT Compiler", + "homepage": "https://github.com/blend2d/blend2d", + "documentation": "https://blend2d.com/doc/index.html", + "supports": "!(arm | uwp)", + "default-features": [ + "jit", + "logging", + "tls" + ], + "features": { + "jit": { + "description": "Default feature. Enables jit pipeline compilation. Not supported for ARM and UWP." + }, + "logging": { + "description": "Default feature. Enables logging." + }, + "tls": { + "description": "Default feature. Enables use of thread_local feature. Disable for platforms where thread local storage is expensive or not supported." + } + } +} diff --git a/vcpkg/ports/blitz/CONTROL b/vcpkg/ports/blitz/CONTROL new file mode 100644 index 0000000..2df45ec --- /dev/null +++ b/vcpkg/ports/blitz/CONTROL @@ -0,0 +1,5 @@ +Source: blitz +Version: 2020-03-25 +Homepage: https://github.com/blitzpp/blitz +Description: Blitz++ is a C++ template class library that provides high-performance multidimensional array containers for scientific computing. +Supports: !(arm|arm64|uwp) \ No newline at end of file diff --git a/vcpkg/ports/blitz/portfile.cmake b/vcpkg/ports/blitz/portfile.cmake new file mode 100644 index 0000000..7e90f2a --- /dev/null +++ b/vcpkg/ports/blitz/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO blitzpp/blitz + REF 839fc5e0f35b1c38a01cfd7a94e83de81e8a6b55 + SHA512 efb6b19691e23c95cf6abd59607bce299b0c02a12ce6be105a35ad8509ab564b8dac8d6363f048e547d199e117d2bdd0e4ef3046d3c411f669c0a453a0b75627 + HEAD_REF master +) + +vcpkg_find_acquire_program(PYTHON2) +get_filename_component(PYTHON2_DIR "${PYTHON2}" DIRECTORY) +vcpkg_add_to_path(${PYTHON2_DIR}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + -DBUILD_DOC=OFF + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/blosc/0001-find-deps.patch b/vcpkg/ports/blosc/0001-find-deps.patch new file mode 100644 index 0000000..af0f921 --- /dev/null +++ b/vcpkg/ports/blosc/0001-find-deps.patch @@ -0,0 +1,107 @@ +diff --git a/blosc/CMakeLists.txt b/blosc/CMakeLists.txt +index 1d1bebe..3a7a51c 100644 +--- a/blosc/CMakeLists.txt ++++ b/blosc/CMakeLists.txt +@@ -109,7 +109,7 @@ endif(NOT DEACTIVATE_ZLIB) + + if (NOT DEACTIVATE_ZSTD) + if (ZSTD_FOUND) +- set(LIBS ${LIBS} ${ZSTD_LIBRARY}) ++ set(LIBS ${LIBS} ${ZSTD_LIBRARIES}) + else (ZSTD_FOUND) + file(GLOB ZSTD_FILES + ${ZSTD_LOCAL_DIR}/common/*.c +diff --git a/cmake/FindLZ4.cmake b/cmake/FindLZ4.cmake +index e581a80..8ce17c5 100644 +--- a/cmake/FindLZ4.cmake ++++ b/cmake/FindLZ4.cmake +@@ -1,10 +1,13 @@ +-find_path(LZ4_INCLUDE_DIR lz4.h) ++find_path(LZ4_INCLUDE_DIRS NAMES lz4.h) + +-find_library(LZ4_LIBRARY NAMES lz4) ++find_library(LZ4_LIBRARY_DEBUG NAMES lz4d) ++find_library(LZ4_LIBRARY_RELEASE NAMES lz4) + +-if (LZ4_INCLUDE_DIR AND LZ4_LIBRARY) +- set(LZ4_FOUND TRUE) +- message(STATUS "Found LZ4 library: ${LZ4_LIBRARY}") +-else () +- message(STATUS "No LZ4 library found. Using internal sources.") +-endif () ++include(SelectLibraryConfigurations) ++select_library_configurations(LZ4) ++ ++include(FindPackageHandleStandardArgs) ++find_package_handle_standard_args( ++ LZ4 ++ REQUIRED_VARS LZ4_LIBRARIES LZ4_INCLUDE_DIRS ++) +diff --git a/cmake/FindSnappy.cmake b/cmake/FindSnappy.cmake +index 688d4d5..c8b9a05 100644 +--- a/cmake/FindSnappy.cmake ++++ b/cmake/FindSnappy.cmake +@@ -1,10 +1,13 @@ +-find_path(SNAPPY_INCLUDE_DIR snappy-c.h) ++find_path(SNAPPY_INCLUDE_DIR snappy.h) + +-find_library(SNAPPY_LIBRARY NAMES snappy) ++find_library(SNAPPY_LIBRARY_DEBUG NAMES snappyd) ++find_library(SNAPPY_LIBRARY_RELEASE NAMES snappy) + +-if (SNAPPY_INCLUDE_DIR AND SNAPPY_LIBRARY) +- set(SNAPPY_FOUND TRUE) +- message(STATUS "Found SNAPPY library: ${SNAPPY_LIBRARY}") +-else () +- message(STATUS "No snappy found. Using internal sources.") +-endif () ++include(SelectLibraryConfigurations) ++select_library_configurations(SNAPPY) ++ ++include(FindPackageHandleStandardArgs) ++FIND_PACKAGE_HANDLE_STANDARD_ARGS( ++ SNAPPY DEFAULT_MSG ++ SNAPPY_LIBRARY SNAPPY_INCLUDE_DIR ++) +diff --git a/cmake/FindZstd.cmake b/cmake/FindZstd.cmake +index 7db4bb9..ba20ba6 100644 +--- a/cmake/FindZstd.cmake ++++ b/cmake/FindZstd.cmake +@@ -1,10 +1,30 @@ ++include(FindPackageHandleStandardArgs) ++ + find_path(ZSTD_INCLUDE_DIR zstd.h) + +-find_library(ZSTD_LIBRARY NAMES zstd) ++get_filename_component(_prefix_path ${ZSTD_INCLUDE_DIR} PATH) ++ ++find_library( ++ ZSTD_LIBRARY_DEBUG ++ NAMES zstdd ++ PATHS ${_prefix_path}/debug/lib ++ NO_DEFAULT_PATH ++) ++ ++find_library( ++ ZSTD_LIBRARY_RELEASE ++ NAMES zstd ++ PATHS ${_prefix_path}/lib ++ NO_DEFAULT_PATH ++) ++ ++unset(_prefix_path) ++ ++include(SelectLibraryConfigurations) ++select_library_configurations(ZSTD) + +-if (ZSTD_INCLUDE_DIR AND ZSTD_LIBRARY) +- set(ZSTD_FOUND TRUE) +- message(STATUS "Found Zstd library: ${ZSTD_LIBRARY}") +-else () +- message(STATUS "No Zstd library found. Using internal sources.") +-endif () ++include(FindPackageHandleStandardArgs) ++find_package_handle_standard_args( ++ ZSTD ++ REQUIRED_VARS ZSTD_LIBRARIES ZSTD_INCLUDE_DIR ++) diff --git a/vcpkg/ports/blosc/0002-export-blosc-config.patch b/vcpkg/ports/blosc/0002-export-blosc-config.patch new file mode 100644 index 0000000..31297f7 --- /dev/null +++ b/vcpkg/ports/blosc/0002-export-blosc-config.patch @@ -0,0 +1,66 @@ +diff --git a/blosc/CMakeLists.txt b/blosc/CMakeLists.txt +index f4e5c29..24641ad 100644 +--- a/blosc/CMakeLists.txt ++++ b/blosc/CMakeLists.txt +@@ -122,14 +122,14 @@ endif (NOT DEACTIVATE_ZSTD) + + # targets + if (BUILD_SHARED) +- add_library(blosc_shared SHARED ${SOURCES}) +- set_target_properties(blosc_shared PROPERTIES OUTPUT_NAME blosc) +- set_target_properties(blosc_shared PROPERTIES ++ add_library(blosc SHARED ${SOURCES}) ++ #set_target_properties(blosc_shared PROPERTIES OUTPUT_NAME blosc) ++ set_target_properties(blosc PROPERTIES + VERSION ${version_string} + SOVERSION 1 # Change this when an ABI change happens + ) + set_property( +- TARGET blosc_shared ++ TARGET blosc + APPEND PROPERTY COMPILE_DEFINITIONS BLOSC_SHARED_LIBRARY) + endif() + +@@ -192,8 +192,8 @@ if (BUILD_TESTS) + endif() + + if (BUILD_SHARED) +- target_link_libraries(blosc_shared ${LIBS}) +- target_include_directories(blosc_shared PUBLIC ${BLOSC_INCLUDE_DIRS}) ++ target_link_libraries(blosc ${LIBS}) ++ target_include_directories(blosc PUBLIC $ $) + endif() + + if (BUILD_TESTS) +@@ -202,22 +202,24 @@ if (BUILD_TESTS) + endif() + + if(BUILD_STATIC) +- add_library(blosc_static STATIC ${SOURCES}) +- set_target_properties(blosc_static PROPERTIES OUTPUT_NAME blosc) ++ add_library(blosc STATIC ${SOURCES}) ++ #set_target_properties(blosc_static PROPERTIES OUTPUT_NAME blosc) + if (MSVC) +- set_target_properties(blosc_static PROPERTIES PREFIX lib) ++ #set_target_properties(blosc_static PROPERTIES PREFIX lib) + endif() +- target_link_libraries(blosc_static ${LIBS}) +- target_include_directories(blosc_static PUBLIC ${BLOSC_INCLUDE_DIRS}) ++ target_link_libraries(blosc ${LIBS}) ++ target_include_directories(blosc PUBLIC $ $) + endif(BUILD_STATIC) + + # install + if(BLOSC_INSTALL) + install(FILES blosc.h blosc-export.h DESTINATION include COMPONENT DEV) + if(BUILD_SHARED) +- install(TARGETS blosc_shared LIBRARY DESTINATION ${lib_dir} ARCHIVE DESTINATION ${lib_dir} RUNTIME DESTINATION bin COMPONENT LIB) ++ install(TARGETS blosc EXPORT blosc-config RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) + endif(BUILD_SHARED) + if(BUILD_STATIC) +- install(TARGETS blosc_static LIBRARY DESTINATION ${lib_dir} ARCHIVE DESTINATION ${lib_dir} RUNTIME DESTINATION bin COMPONENT DEV) ++ install(TARGETS blosc EXPORT blosc-config RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) + endif(BUILD_STATIC) + endif(BLOSC_INSTALL) ++ ++install(EXPORT blosc-config DESTINATION share/cmake/blosc) diff --git a/vcpkg/ports/blosc/CONTROL b/vcpkg/ports/blosc/CONTROL new file mode 100644 index 0000000..abda40d --- /dev/null +++ b/vcpkg/ports/blosc/CONTROL @@ -0,0 +1,5 @@ +Source: blosc +Version: 1.18.1-1 +Build-Depends: lz4, snappy, zlib, zstd +Homepage: https://github.com/Blosc/c-blosc +Description: A blocking, shuffling and loss-less compression library that can be faster than `memcpy()` diff --git a/vcpkg/ports/blosc/portfile.cmake b/vcpkg/ports/blosc/portfile.cmake new file mode 100644 index 0000000..041548b --- /dev/null +++ b/vcpkg/ports/blosc/portfile.cmake @@ -0,0 +1,43 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Blosc/c-blosc + REF 9fae1c9acb659159321aca69aefcdbce663e2374 # v1.18.1 + SHA512 6cc77832100041aca8f320e44aa803adc0d3344b52742b995a3155b953e5d149534de65c8244d964448150b73715a81f54285d7d01f1b45d7b10fe07f5bdb141 + HEAD_REF master + PATCHES + 0001-find-deps.patch + 0002-export-blosc-config.patch +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BLOSC_STATIC ON) + set(BLOSC_SHARED OFF) +else() + set(BLOSC_STATIC OFF) + set(BLOSC_SHARED ON) +endif() + +file(REMOVE_RECURSE ${SOURCE_PATH}/internal-complibs) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DPREFER_EXTERNAL_LZ4=ON + -DPREFER_EXTERNAL_SNAPPY=ON + -DPREFER_EXTERNAL_ZLIB=ON + -DPREFER_EXTERNAL_ZSTD=ON + -DBUILD_TESTS=OFF + -DBUILD_BENCHMARKS=OFF + -DBUILD_STATIC=${BLOSC_STATIC} + -DBUILD_SHARED=${BLOSC_SHARED} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/blosc) + +# cleanup +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSES/BLOSC.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/blosc RENAME copyright) diff --git a/vcpkg/ports/bond/CONTROL b/vcpkg/ports/bond/CONTROL new file mode 100644 index 0000000..94d5cd3 --- /dev/null +++ b/vcpkg/ports/bond/CONTROL @@ -0,0 +1,9 @@ +Source: bond +Version: 9.0.2 +Description: Bond is a cross-platform framework for working with schematized data. It supports cross-language de/serialization and powerful generic mechanisms for efficiently manipulating data. Bond is broadly used at Microsoft in high scale services. +Homepage: https://github.com/Microsoft/bond +Build-Depends: rapidjson, boost-config, boost-utility, boost-assign + +Feature: bond-over-grpc +Description: Bond-over-gRPC provides code generation from Bond IDL service definitions to send Bond objects via gRPC. +Build-Depends: grpc diff --git a/vcpkg/ports/bond/fix-install-path.patch b/vcpkg/ports/bond/fix-install-path.patch new file mode 100644 index 0000000..643e0cf --- /dev/null +++ b/vcpkg/ports/bond/fix-install-path.patch @@ -0,0 +1,56 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f2f8eaa..1b0c01c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -23,7 +23,7 @@ set (BOND_FIND_RAPIDJSON + # settings so that we don't apply our settings to third-party code. + add_subdirectory (thirdparty) + +-enable_testing() ++#enable_testing() + + set (BOND_IDL ${CMAKE_CURRENT_SOURCE_DIR}/idl) + set (BOND_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/cpp/inc) +@@ -85,6 +85,6 @@ if (BOND_GBC_PATH) + + install ( + FILES ${BOND_GBC_PATH} +- DESTINATION bin ++ DESTINATION tools + RENAME ${INSTALLED_GBC_NAME}) + endif() +diff --git a/compiler/CMakeLists.txt b/compiler/CMakeLists.txt +index 1dff9d0..9a11575 100644 +--- a/compiler/CMakeLists.txt ++++ b/compiler/CMakeLists.txt +@@ -108,7 +108,7 @@ set (test_sources + tests/TestMain.hs + ${tests}) + +-set (completion_dir etc/bash_completion.d) ++set (completion_dir tools/bond) + set (completion ${CMAKE_CURRENT_BINARY_DIR}/gbc.comp) + set (output ${CMAKE_CURRENT_BINARY_DIR}/build/gbc/gbc${CMAKE_EXECUTABLE_SUFFIX}) + set (GBC_EXECUTABLE ${output} PARENT_SCOPE) +@@ -130,7 +130,7 @@ endif() + + install (FILES ${output} + PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE +- DESTINATION bin) ++ DESTINATION ${completion_dir}) + + install (FILES ${completion} + RENAME gbc +diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt +index b45078e..1eebe9c 100644 +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -110,7 +110,7 @@ target_include_directories (bond_apply BEFORE PRIVATE + + install (TARGETS bond bond_apply + EXPORT bond +- ARCHIVE DESTINATION lib/bond ++ ARCHIVE DESTINATION lib + INCLUDES DESTINATION include) + + install (DIRECTORY ${BOND_IDL}/bond/core DESTINATION include/bond) diff --git a/vcpkg/ports/bond/portfile.cmake b/vcpkg/ports/bond/portfile.cmake new file mode 100644 index 0000000..9a1485b --- /dev/null +++ b/vcpkg/ports/bond/portfile.cmake @@ -0,0 +1,68 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +set(BOND_VER 9.0.2) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO microsoft/bond + REF ${BOND_VER} + SHA512 ece636bc06e7bac4208d373610e689f19b394cae4eaa869f32b098924a6e7034e4d804d4831d7f6fd2540a619daf77f4ab43c49aa442a9cd26161b0a8a2db000 + HEAD_REF master + PATCHES fix-install-path.patch skip-grpc-compilation.patch +) + +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_download_distfile(GBC_ARCHIVE + URLS "https://github.com/microsoft/bond/releases/download/${BOND_VER}/gbc-${BOND_VER}-amd64.zip" + FILENAME "gbc-${BOND_VER}-amd64.zip" + SHA512 661d63a82284d3ecbc7b50d5f4972dadeb607f96612108a4a0887c6684a418e8b265516354504ca3440a182d1e31f2eb5861531133b455d8b6c01aec45ade5d3 + ) + + # Clear the generator to prevent it from updating + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/tools/) + # Extract the precompiled gbc + vcpkg_extract_source_archive(${GBC_ARCHIVE} ${CURRENT_BUILDTREES_DIR}/tools/) + set(FETCHED_GBC_PATH ${CURRENT_BUILDTREES_DIR}/tools/gbc-${BOND_VER}-amd64.exe) + + if (NOT EXISTS "${FETCHED_GBC_PATH}") + message(FATAL_ERROR "Fetching GBC failed. Expected '${FETCHED_GBC_PATH}' to exists, but it doesn't.") + endif() + +else() + # According to the readme on https://github.com/microsoft/bond/ + # The build needs a version of the Haskel Tool stack that is newer than some distros ship with. + # For this reason the message is not guarded by checking to see if the tool is installed. + message("\nA recent version of Haskell Tool Stack is required to build.\n For information on how to install see https://docs.haskellstack.org/en/stable/README/\n") + +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + bond-over-grpc BOND_ENABLE_GRPC +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBOND_LIBRARIES_ONLY=TRUE + -DBOND_GBC_PATH=${FETCHED_GBC_PATH} + -DBOND_SKIP_GBC_TESTS=TRUE + -DBOND_ENABLE_COMM=FALSE + -DBOND_FIND_RAPIDJSON=TRUE + -DBOND_STACK_OPTIONS=--allow-different-user + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/bond TARGET_PATH share/bond) + +vcpkg_copy_pdbs() + +# There's no way to supress installation of the headers in the debug build, +# so we just delete them. +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Put the license file where vcpkg expects it +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/bond/skip-grpc-compilation.patch b/vcpkg/ports/bond/skip-grpc-compilation.patch new file mode 100644 index 0000000..10906b1 --- /dev/null +++ b/vcpkg/ports/bond/skip-grpc-compilation.patch @@ -0,0 +1,11 @@ +diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt +index f8c7bf3..e69de29 100644 +--- a/thirdparty/CMakeLists.txt ++++ b/thirdparty/CMakeLists.txt +@@ -1,6 +0,0 @@ +-include (Compiler) +- +-if (BOND_ENABLE_GRPC) +- cxx_add_compile_options (Clang -Wno-unused-value) +- add_subdirectory(grpc) +-endif() diff --git a/vcpkg/ports/boolinq/CONTROL b/vcpkg/ports/boolinq/CONTROL new file mode 100644 index 0000000..aa246d2 --- /dev/null +++ b/vcpkg/ports/boolinq/CONTROL @@ -0,0 +1,4 @@ +Source: boolinq +Version: 2019-07-22 +Description: Super tiny C++11 single-file header-only LINQ library +Homepage: https://github.com/k06a/boolinq diff --git a/vcpkg/ports/boolinq/portfile.cmake b/vcpkg/ports/boolinq/portfile.cmake new file mode 100644 index 0000000..35ad499 --- /dev/null +++ b/vcpkg/ports/boolinq/portfile.cmake @@ -0,0 +1,16 @@ +# Single-file header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO k06a/boolinq + REF 1d09dc8b3df79801062e5c0e758572552fa4ce98 + SHA512 0714a97d09bb8299d39062803a8cd5de28834c372f7826afc36e17ea6aa90d2ec368d5bbb907914ad1ca5a65be41a5caeaa1583f66358577d7ea88d3c0906238 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/include/boolinq/boolinq.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/boolinq) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/boost-accumulators/CONTROL b/vcpkg/ports/boost-accumulators/CONTROL new file mode 100644 index 0000000..7b101e5 --- /dev/null +++ b/vcpkg/ports/boost-accumulators/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-accumulators +Version: 1.73.0 +Build-Depends: boost-array, boost-assert, boost-circular-buffer, boost-concept-check, boost-config, boost-core, boost-detail, boost-fusion, boost-interval, boost-iterator, boost-mpl, boost-numeric-conversion, boost-odeint, boost-parameter, boost-preprocessor, boost-range, boost-serialization, boost-static-assert, boost-throw-exception, boost-tuple, boost-typeof, boost-type-traits, boost-ublas, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/accumulators +Description: Boost accumulators module diff --git a/vcpkg/ports/boost-accumulators/portfile.cmake b/vcpkg/ports/boost-accumulators/portfile.cmake new file mode 100644 index 0000000..2094b72 --- /dev/null +++ b/vcpkg/ports/boost-accumulators/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/accumulators + REF boost-1.73.0 + SHA512 f13e85e464509987a58f955bdf4a167460fe1dbd87bf189c121a0bd7176cf37889a28b812a837770b0aff5f1e80ed0be45c7c8fd3a86672427cbb52e236e7071 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-algorithm/CONTROL b/vcpkg/ports/boost-algorithm/CONTROL new file mode 100644 index 0000000..09a1906 --- /dev/null +++ b/vcpkg/ports/boost-algorithm/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-algorithm +Version: 1.73.0 +Build-Depends: boost-array, boost-assert, boost-bind, boost-concept-check, boost-config, boost-core, boost-detail, boost-exception, boost-function, boost-iterator, boost-mpl, boost-range, boost-regex, boost-static-assert, boost-throw-exception, boost-tuple, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/algorithm +Description: Boost algorithm module diff --git a/vcpkg/ports/boost-algorithm/portfile.cmake b/vcpkg/ports/boost-algorithm/portfile.cmake new file mode 100644 index 0000000..dd3fc82 --- /dev/null +++ b/vcpkg/ports/boost-algorithm/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/algorithm + REF boost-1.73.0 + SHA512 b8437e9a800ada66babc81fadce67ccffa9dd426e0ffe7c4b54fed73dd0bf19d00ae2c2911837b8b79225f0ed4e43c9810f3ba5a33b9afb2fbbb7dcb70a96efe + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-align/CONTROL b/vcpkg/ports/boost-align/CONTROL new file mode 100644 index 0000000..0e772f9 --- /dev/null +++ b/vcpkg/ports/boost-align/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-align +Version: 1.73.0 +Build-Depends: boost-assert, boost-config, boost-core, boost-static-assert, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/align +Description: Boost align module diff --git a/vcpkg/ports/boost-align/portfile.cmake b/vcpkg/ports/boost-align/portfile.cmake new file mode 100644 index 0000000..2ffdd8d --- /dev/null +++ b/vcpkg/ports/boost-align/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/align + REF boost-1.73.0 + SHA512 16c3ca5cadbe3466903b6b1a93cdf5bc6b3fa4f92e3a933caadabf3fbb3f06ca114d811b177a771315ca1f5883d5bde57059f43fffd04e66ffef50487efe7b87 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-any/CONTROL b/vcpkg/ports/boost-any/CONTROL new file mode 100644 index 0000000..a26552f --- /dev/null +++ b/vcpkg/ports/boost-any/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-any +Version: 1.73.0 +Build-Depends: boost-config, boost-core, boost-static-assert, boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/any +Description: Boost any module diff --git a/vcpkg/ports/boost-any/portfile.cmake b/vcpkg/ports/boost-any/portfile.cmake new file mode 100644 index 0000000..a519cf3 --- /dev/null +++ b/vcpkg/ports/boost-any/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/any + REF boost-1.73.0 + SHA512 71a6f4b5862b2e2d989ad9c46c8ea24a689e5fc4e7de857e40dfb8b1e484a28631012d7e3df545a3bdb36f6bb9b4c0184e3506906c5e92b35d9aaad8f9830f21 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-array/CONTROL b/vcpkg/ports/boost-array/CONTROL new file mode 100644 index 0000000..0a0192a --- /dev/null +++ b/vcpkg/ports/boost-array/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-array +Version: 1.73.0 +Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-static-assert, boost-throw-exception, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/array +Description: Boost array module diff --git a/vcpkg/ports/boost-array/portfile.cmake b/vcpkg/ports/boost-array/portfile.cmake new file mode 100644 index 0000000..69b1304 --- /dev/null +++ b/vcpkg/ports/boost-array/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/array + REF boost-1.73.0 + SHA512 020eabd6bd57988a773656f5c41c17457e4f03d90bc3aa34b1f875e8af91d77f2911db5baeaf295c57cdc9e4df2687b659c6cee2a175504ca6cdabc73c028694 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-asio/CONTROL b/vcpkg/ports/boost-asio/CONTROL new file mode 100644 index 0000000..63823d2 --- /dev/null +++ b/vcpkg/ports/boost-asio/CONTROL @@ -0,0 +1,7 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-asio +Version: 1.73.0 +Port-Version: 1 +Build-Depends: boost-array, boost-assert, boost-bind, boost-chrono, boost-compatibility, boost-config, boost-coroutine (!arm&!uwp), boost-date-time, boost-detail, boost-function, boost-integer, boost-regex, boost-smart-ptr, boost-system, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, openssl +Homepage: https://github.com/boostorg/asio +Description: Boost asio module diff --git a/vcpkg/ports/boost-asio/portfile.cmake b/vcpkg/ports/boost-asio/portfile.cmake new file mode 100644 index 0000000..89c2093 --- /dev/null +++ b/vcpkg/ports/boost-asio/portfile.cmake @@ -0,0 +1,13 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/asio + REF boost-1.73.0 + SHA512 662e7ea329110492062cc4d5275df5984ff59e9cf3824c1199c46fc3e76b366235865bde9d36504277bd209ae2c1fccd3b9e0d51195a88129473a26d14c26baa + HEAD_REF master + PATCHES windows_alloca_header.patch +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-asio/windows_alloca_header.patch b/vcpkg/ports/boost-asio/windows_alloca_header.patch new file mode 100644 index 0000000..609e1eb --- /dev/null +++ b/vcpkg/ports/boost-asio/windows_alloca_header.patch @@ -0,0 +1,15 @@ +diff --git a/include/boost/asio/detail/impl/socket_ops.ipp b/include/boost/asio/detail/impl/socket_ops.ipp +index 7d7c31f..d2cd468 100644 +--- a/include/boost/asio/detail/impl/socket_ops.ipp ++++ b/include/boost/asio/detail/impl/socket_ops.ipp +@@ -27,6 +27,10 @@ + #include + #include + ++#if defined(BOOST_ASIO_WINDOWS) ++#include ++#endif ++ + #if defined(BOOST_ASIO_WINDOWS_RUNTIME) + # include + # include diff --git a/vcpkg/ports/boost-assert/CONTROL b/vcpkg/ports/boost-assert/CONTROL new file mode 100644 index 0000000..33a4bfd --- /dev/null +++ b/vcpkg/ports/boost-assert/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-assert +Version: 1.73.0 +Build-Depends: boost-config, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/assert +Description: Boost assert module diff --git a/vcpkg/ports/boost-assert/portfile.cmake b/vcpkg/ports/boost-assert/portfile.cmake new file mode 100644 index 0000000..ab172fb --- /dev/null +++ b/vcpkg/ports/boost-assert/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/assert + REF boost-1.73.0 + SHA512 8fb474210da9ebbc57fbb4c1df5e8eea25d9e4c4345fa86a4d28ce13e3cfaa6f49323d3fd5695bcc290c715f5a2c8f8890794550330a6312a3f77db5eacb9031 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-assign/CONTROL b/vcpkg/ports/boost-assign/CONTROL new file mode 100644 index 0000000..25f868b --- /dev/null +++ b/vcpkg/ports/boost-assign/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-assign +Version: 1.73.0 +Build-Depends: boost-array, boost-config, boost-detail, boost-move, boost-mpl, boost-preprocessor, boost-ptr-container, boost-range, boost-static-assert, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/assign +Description: Boost assign module diff --git a/vcpkg/ports/boost-assign/portfile.cmake b/vcpkg/ports/boost-assign/portfile.cmake new file mode 100644 index 0000000..74c8213 --- /dev/null +++ b/vcpkg/ports/boost-assign/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/assign + REF boost-1.73.0 + SHA512 69e75e42176a40bea8a208f2bebb4701678f1410aacd647a19f4d55aa12c851f53ee359e895af93dbb67ba3ec25a47eac871c54a8d645017a615fc810bd60ba7 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-atomic/CONTROL b/vcpkg/ports/boost-atomic/CONTROL new file mode 100644 index 0000000..f0f138a --- /dev/null +++ b/vcpkg/ports/boost-atomic/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-atomic +Version: 1.73.0 +Build-Depends: boost-assert, boost-build, boost-config, boost-integer, boost-modular-build-helper, boost-static-assert, boost-type-traits, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/atomic +Description: Boost atomic module diff --git a/vcpkg/ports/boost-atomic/portfile.cmake b/vcpkg/ports/boost-atomic/portfile.cmake new file mode 100644 index 0000000..40037c7 --- /dev/null +++ b/vcpkg/ports/boost-atomic/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/atomic + REF boost-1.73.0 + SHA512 2dc22e06364e8962a745b64f66f60235236ebba301ebfa4c0cac37b6581cb1df0fb85913e30a15437b587d858292e0a793588d8d898eeba641be753c4dc4899a + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-beast/0002-beast-coroutines.patch b/vcpkg/ports/boost-beast/0002-beast-coroutines.patch new file mode 100644 index 0000000..1646a07 --- /dev/null +++ b/vcpkg/ports/boost-beast/0002-beast-coroutines.patch @@ -0,0 +1,1466 @@ +diff -aruN a/include/boost/beast/core/detail/impl/read.hpp b/include/boost/beast/core/detail/impl/read.hpp +--- a/include/boost/beast/core/detail/impl/read.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/include/boost/beast/core/detail/impl/read.hpp 2020-05-02 13:50:11.141761700 -0400 +@@ -214,7 +214,7 @@ + class AsyncReadStream, + class DynamicBuffer, + class CompletionCondition, +- class ReadHandler, ++ BOOST_BEAST_ASYNC_TPARAM2 ReadHandler, + class> + BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + async_read( +diff -aruN a/include/boost/beast/core/detail/is_invocable.hpp b/include/boost/beast/core/detail/is_invocable.hpp +--- a/include/boost/beast/core/detail/is_invocable.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/include/boost/beast/core/detail/is_invocable.hpp 2020-05-02 13:50:11.141761700 -0400 +@@ -10,6 +10,8 @@ + #ifndef BOOST_BEAST_DETAIL_IS_INVOCABLE_HPP + #define BOOST_BEAST_DETAIL_IS_INVOCABLE_HPP + ++#include ++#include + #include + #include + +@@ -51,6 +53,26 @@ + }; + /** @} */ + ++template ++struct is_completion_token_for : std::false_type ++{ ++}; ++ ++struct any_initiation ++{ ++ template ++ void operator()(AnyArgs&&...); ++}; ++ ++template ++struct is_completion_token_for< ++ CompletionToken, R(Args...), boost::void_t( ++ any_initiation(), std::declval()) ++ )>> : std::true_type ++{ ++}; ++ + } // detail + } // beast + } // boost +diff -aruN a/include/boost/beast/core/detail/read.hpp b/include/boost/beast/core/detail/read.hpp +--- a/include/boost/beast/core/detail/read.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/include/boost/beast/core/detail/read.hpp 2020-05-02 13:50:11.142761711 -0400 +@@ -219,7 +219,7 @@ + class AsyncReadStream, + class DynamicBuffer, + class CompletionCondition, +- class ReadHandler ++ BOOST_BEAST_ASYNC_TPARAM2 ReadHandler + #if ! BOOST_BEAST_DOXYGEN + , class = typename std::enable_if< + is_async_read_stream::value && +diff -aruN a/include/boost/beast/core/detect_ssl.hpp b/include/boost/beast/core/detect_ssl.hpp +--- a/include/boost/beast/core/detect_ssl.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/include/boost/beast/core/detect_ssl.hpp 2020-05-02 13:50:11.143761722 -0400 +@@ -374,13 +374,13 @@ + void operator()( + DetectHandler&& h, + AsyncReadStream* s, // references are passed as pointers +- DynamicBuffer& b) ++ DynamicBuffer* b) + { + detect_ssl_op< + typename std::decay::type, + AsyncReadStream, + DynamicBuffer>( +- std::forward(h), *s, b); ++ std::forward(h), *s, *b); + } + }; + +@@ -439,7 +439,7 @@ + detail::run_detect_ssl_op{}, + token, + &stream, // pass the reference by pointer +- buffer); ++ &buffer); + } + + //] +diff -aruN a/include/boost/beast/core/impl/basic_stream.hpp b/include/boost/beast/core/impl/basic_stream.hpp +--- a/include/boost/beast/core/impl/basic_stream.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/include/boost/beast/core/impl/basic_stream.hpp 2020-05-02 13:50:11.144761733 -0400 +@@ -776,7 +776,7 @@ + //------------------------------------------------------------------------------ + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT1(ConnectHandler) + basic_stream:: + async_connect( +@@ -795,7 +795,7 @@ + template + template< + class EndpointSequence, +- class RangeConnectHandler, ++ BOOST_ASIO_COMPLETION_TOKEN_FOR(void(error_code, typename Protocol::endpoint)) RangeConnectHandler, + class> + BOOST_ASIO_INITFN_RESULT_TYPE(RangeConnectHandler,void(error_code, typename Protocol::endpoint)) + basic_stream:: +@@ -817,7 +817,7 @@ + template< + class EndpointSequence, + class ConnectCondition, +- class RangeConnectHandler, ++ BOOST_ASIO_COMPLETION_TOKEN_FOR(void(error_code, typename Protocol::endpoint)) RangeConnectHandler, + class> + BOOST_ASIO_INITFN_RESULT_TYPE(RangeConnectHandler,void (error_code, typename Protocol::endpoint)) + basic_stream:: +@@ -839,7 +839,7 @@ + template + template< + class Iterator, +- class IteratorConnectHandler> ++ BOOST_ASIO_COMPLETION_TOKEN_FOR(void(error_code, Iterator)) IteratorConnectHandler> + BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,void (error_code, Iterator)) + basic_stream:: + async_connect( +@@ -860,7 +860,7 @@ + template< + class Iterator, + class ConnectCondition, +- class IteratorConnectHandler> ++ BOOST_ASIO_COMPLETION_TOKEN_FOR(void(error_code, Iterator)) IteratorConnectHandler> + BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,void (error_code, Iterator)) + basic_stream:: + async_connect( +@@ -881,7 +881,7 @@ + //------------------------------------------------------------------------------ + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + basic_stream:: + async_read_some( +@@ -901,7 +901,7 @@ + } + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + basic_stream:: + async_write_some( +diff -aruN a/include/boost/beast/core/impl/buffered_read_stream.hpp b/include/boost/beast/core/impl/buffered_read_stream.hpp +--- a/include/boost/beast/core/impl/buffered_read_stream.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/include/boost/beast/core/impl/buffered_read_stream.hpp 2020-05-02 13:50:11.144761733 -0400 +@@ -110,7 +110,7 @@ + operator()( + ReadHandler&& h, + buffered_read_stream* s, +- Buffers const& b) ++ Buffers const* b) + { + // If you get an error on the following line it means + // that your handler does not meet the documented type +@@ -124,7 +124,7 @@ + read_op< + Buffers, + typename std::decay::type>( +- std::forward(h), *s, b); ++ std::forward(h), *s, *b); + } + }; + +@@ -141,7 +141,7 @@ + } + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + buffered_read_stream:: + async_write_some( +@@ -153,7 +153,7 @@ + static_assert(net::is_const_buffer_sequence< + ConstBufferSequence>::value, + "ConstBufferSequence type requirements not met"); +- static_assert(detail::is_invocable::value, + "WriteHandler type requirements not met"); + return next_layer_.async_write_some(buffers, +@@ -212,7 +212,7 @@ + } + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + buffered_read_stream:: + async_read_some( +@@ -233,7 +233,7 @@ + typename ops::run_read_op{}, + handler, + this, +- buffers); ++ &buffers); + } + + } // beast +diff -aruN a/include/boost/beast/core/impl/flat_stream.hpp b/include/boost/beast/core/impl/flat_stream.hpp +--- a/include/boost/beast/core/impl/flat_stream.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/include/boost/beast/core/impl/flat_stream.hpp 2020-05-02 13:50:11.145761743 -0400 +@@ -144,7 +144,7 @@ + template + template< + class MutableBufferSequence, +- class ReadHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 ReadHandler> + BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + flat_stream:: + async_read_some( +@@ -225,7 +225,7 @@ + template + template< + class ConstBufferSequence, +- class WriteHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler> + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + flat_stream:: + async_write_some( +diff -aruN a/include/boost/beast/_experimental/http/impl/icy_stream.hpp b/include/boost/beast/_experimental/http/impl/icy_stream.hpp +--- a/include/boost/beast/_experimental/http/impl/icy_stream.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/include/boost/beast/_experimental/http/impl/icy_stream.hpp 2020-05-02 13:50:11.146761754 -0400 +@@ -259,7 +259,7 @@ + template + template< + class MutableBufferSequence, +- class ReadHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 ReadHandler> + BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + icy_stream:: + async_read_some( +@@ -311,7 +311,7 @@ + template + template< + class MutableBufferSequence, +- class WriteHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler> + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + icy_stream:: + async_write_some( +diff -aruN a/include/boost/beast/_experimental/test/impl/stream.hpp b/include/boost/beast/_experimental/test/impl/stream.hpp +--- a/include/boost/beast/_experimental/test/impl/stream.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/include/boost/beast/_experimental/test/impl/stream.hpp 2020-05-02 13:50:11.147761765 -0400 +@@ -306,7 +306,7 @@ + return 0; + } + +-template ++template + BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + stream:: + async_read_some( +@@ -386,7 +386,7 @@ + return n; + } + +-template ++template + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + stream:: + async_write_some( +diff -aruN a/include/boost/beast/http/field.hpp b/include/boost/beast/http/field.hpp +--- a/include/boost/beast/http/field.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/include/boost/beast/http/field.hpp 2020-05-02 13:50:11.149761786 -0400 +@@ -396,12 +396,9 @@ + string_to_field(string_view s); + + /// Write the text for a field name to an output stream. +-inline ++BOOST_BEAST_DECL + std::ostream& +-operator<<(std::ostream& os, field f) +-{ +- return os << to_string(f); +-} ++operator<<(std::ostream& os, field f); + + } // http + } // beast +diff -aruN a/include/boost/beast/http/impl/field.ipp b/include/boost/beast/http/impl/field.ipp +--- a/include/boost/beast/http/impl/field.ipp 2020-04-22 09:34:50.000000000 -0400 ++++ b/include/boost/beast/http/impl/field.ipp 2020-05-02 13:50:11.150761798 -0400 +@@ -11,10 +11,12 @@ + #define BOOST_BEAST_HTTP_IMPL_FIELD_IPP + + #include ++#include + #include + #include + #include +-#include ++#include ++ + + namespace boost { + namespace beast { +@@ -565,6 +567,12 @@ + return detail::get_field_table().string_to_field(s); + } + ++std::ostream& ++operator<<(std::ostream& os, field f) ++{ ++ return os << to_string(f); ++} ++ + } // http + } // beast + } // boost +diff -aruN a/include/boost/beast/http/impl/file_body_win32.hpp b/include/boost/beast/http/impl/file_body_win32.hpp +--- a/include/boost/beast/http/impl/file_body_win32.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/include/boost/beast/http/impl/file_body_win32.hpp 2020-05-02 13:50:11.150761798 -0400 +@@ -597,7 +597,7 @@ + template< + class Protocol, class Executor, + bool isRequest, class Fields, +- class WriteHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler> + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + async_write_some( + net::basic_stream_socket< +diff -aruN a/include/boost/beast/http/impl/read.hpp b/include/boost/beast/http/impl/read.hpp +--- a/include/boost/beast/http/impl/read.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/include/boost/beast/http/impl/read.hpp 2020-05-02 13:50:11.150761798 -0400 +@@ -304,7 +304,7 @@ + class AsyncReadStream, + class DynamicBuffer, + bool isRequest, +- class ReadHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 ReadHandler> + BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + async_read_some( + AsyncReadStream& stream, +@@ -373,7 +373,7 @@ + class AsyncReadStream, + class DynamicBuffer, + bool isRequest, +- class ReadHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 ReadHandler> + BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + async_read_header( + AsyncReadStream& stream, +@@ -443,7 +443,7 @@ + class AsyncReadStream, + class DynamicBuffer, + bool isRequest, +- class ReadHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 ReadHandler> + BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + async_read( + AsyncReadStream& stream, +@@ -531,7 +531,7 @@ + class AsyncReadStream, + class DynamicBuffer, + bool isRequest, class Body, class Allocator, +- class ReadHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 ReadHandler> + BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + async_read( + AsyncReadStream& stream, +diff -aruN a/include/boost/beast/http/impl/write.hpp b/include/boost/beast/http/impl/write.hpp +--- a/include/boost/beast/http/impl/write.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/include/boost/beast/http/impl/write.hpp 2020-05-02 13:50:11.150761798 -0400 +@@ -463,7 +463,7 @@ + template< + class AsyncWriteStream, + bool isRequest, class Body, class Fields, +- class WriteHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler> + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + async_write_some_impl( + AsyncWriteStream& stream, +@@ -526,7 +526,7 @@ + template< + class AsyncWriteStream, + bool isRequest, class Body, class Fields, +- class WriteHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler> + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + async_write_some( + AsyncWriteStream& stream, +@@ -608,7 +608,7 @@ + template< + class AsyncWriteStream, + bool isRequest, class Body, class Fields, +- class WriteHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler> + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + async_write_header( + AsyncWriteStream& stream, +@@ -681,7 +681,7 @@ + template< + class AsyncWriteStream, + bool isRequest, class Body, class Fields, +- class WriteHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler> + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + async_write( + AsyncWriteStream& stream, +@@ -801,7 +801,7 @@ + template< + class AsyncWriteStream, + bool isRequest, class Body, class Fields, +- class WriteHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler> + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + async_write( + AsyncWriteStream& stream, +@@ -830,7 +830,7 @@ + template< + class AsyncWriteStream, + bool isRequest, class Body, class Fields, +- class WriteHandler> ++ BOOST_BEAST_ASYNC_TPARAM2 WriteHandler> + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + async_write( + AsyncWriteStream& stream, +diff -aruN a/include/boost/beast/http/span_body.hpp b/include/boost/beast/http/span_body.hpp +--- a/include/boost/beast/http/span_body.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/include/boost/beast/http/span_body.hpp 2020-05-02 13:50:11.151761808 -0400 +@@ -36,8 +36,10 @@ + struct span_body + { + private: +- static_assert(std::is_pod::value, +- "POD requirements not met"); ++ static_assert( ++ std::is_trivial::value && ++ std::is_standard_layout::value, ++ "POD requirements not met"); + + public: + /** The type of container used for the body +diff -aruN a/include/boost/beast/ssl/ssl_stream.hpp b/include/boost/beast/ssl/ssl_stream.hpp +--- a/include/boost/beast/ssl/ssl_stream.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/include/boost/beast/ssl/ssl_stream.hpp 2020-05-02 13:50:11.151761808 -0400 +@@ -555,7 +555,7 @@ + need to ensure that all data is written before the asynchronous operation + completes. + */ +- template ++ template + BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler, void(boost::system::error_code, std::size_t)) + async_write_some(ConstBufferSequence const& buffers, + BOOST_ASIO_MOVE_ARG(WriteHandler) handler) +@@ -636,7 +636,7 @@ + if you need to ensure that the requested amount of data is read before + the asynchronous operation completes. + */ +- template ++ template + BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler, void(boost::system::error_code, std::size_t)) + async_read_some(MutableBufferSequence const& buffers, + BOOST_ASIO_MOVE_ARG(ReadHandler) handler) +diff -aruN a/include/boost/beast/version.hpp b/include/boost/beast/version.hpp +--- a/include/boost/beast/version.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/include/boost/beast/version.hpp 2020-05-02 13:50:11.151761808 -0400 +@@ -20,7 +20,7 @@ + This is a simple integer that is incremented by one every + time a set of code changes is merged to the develop branch. + */ +-#define BOOST_BEAST_VERSION 290 ++#define BOOST_BEAST_VERSION 292 + + #define BOOST_BEAST_VERSION_STRING "Boost.Beast/" BOOST_STRINGIZE(BOOST_BEAST_VERSION) + +diff -aruN a/include/boost/beast/websocket/impl/accept.hpp b/include/boost/beast/websocket/impl/accept.hpp +--- a/include/boost/beast/websocket/impl/accept.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/include/boost/beast/websocket/impl/accept.hpp 2020-05-02 13:50:11.153761830 -0400 +@@ -542,7 +542,7 @@ + + template + template< +- class AcceptHandler> ++ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler> + BOOST_BEAST_ASYNC_RESULT1(AcceptHandler) + stream:: + async_accept( +@@ -564,7 +564,7 @@ + template + template< + class ResponseDecorator, +- class AcceptHandler> ++ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler> + BOOST_BEAST_ASYNC_RESULT1(AcceptHandler) + stream:: + async_accept_ex( +@@ -590,7 +590,7 @@ + template + template< + class ConstBufferSequence, +- class AcceptHandler> ++ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler> + BOOST_BEAST_ASYNC_RESULT1(AcceptHandler) + stream:: + async_accept( +@@ -621,7 +621,7 @@ + template< + class ConstBufferSequence, + class ResponseDecorator, +- class AcceptHandler> ++ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler> + BOOST_BEAST_ASYNC_RESULT1(AcceptHandler) + stream:: + async_accept_ex( +@@ -654,7 +654,7 @@ + template + template< + class Body, class Allocator, +- class AcceptHandler> ++ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler> + BOOST_BEAST_ASYNC_RESULT1(AcceptHandler) + stream:: + async_accept( +@@ -678,7 +678,7 @@ + template< + class Body, class Allocator, + class ResponseDecorator, +- class AcceptHandler> ++ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler> + BOOST_BEAST_ASYNC_RESULT1(AcceptHandler) + stream:: + async_accept_ex( +diff -aruN a/include/boost/beast/websocket/impl/close.hpp b/include/boost/beast/websocket/impl/close.hpp +--- a/include/boost/beast/websocket/impl/close.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/include/boost/beast/websocket/impl/close.hpp 2020-05-02 13:50:11.153761830 -0400 +@@ -382,7 +382,7 @@ + } + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT1(CloseHandler) + stream:: + async_close(close_reason const& cr, CloseHandler&& handler) +diff -aruN a/include/boost/beast/websocket/impl/handshake.hpp b/include/boost/beast/websocket/impl/handshake.hpp +--- a/include/boost/beast/websocket/impl/handshake.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/include/boost/beast/websocket/impl/handshake.hpp 2020-05-02 13:50:11.153761830 -0400 +@@ -268,7 +268,7 @@ + //------------------------------------------------------------------------------ + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT1(HandshakeHandler) + stream:: + async_handshake( +@@ -293,7 +293,7 @@ + } + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT1(HandshakeHandler) + stream:: + async_handshake( +diff -aruN a/include/boost/beast/websocket/impl/ping.hpp b/include/boost/beast/websocket/impl/ping.hpp +--- a/include/boost/beast/websocket/impl/ping.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/include/boost/beast/websocket/impl/ping.hpp 2020-05-02 13:50:11.153761830 -0400 +@@ -288,7 +288,7 @@ + } + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT1(WriteHandler) + stream:: + async_ping(ping_data const& payload, WriteHandler&& handler) +@@ -306,7 +306,7 @@ + } + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT1(WriteHandler) + stream:: + async_pong(ping_data const& payload, WriteHandler&& handler) +diff -aruN a/include/boost/beast/websocket/impl/read.hpp b/include/boost/beast/websocket/impl/read.hpp +--- a/include/boost/beast/websocket/impl/read.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/include/boost/beast/websocket/impl/read.hpp 2020-05-02 13:50:11.153761830 -0400 +@@ -804,7 +804,7 @@ + } + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + stream:: + async_read(DynamicBuffer& buffer, ReadHandler&& handler) +@@ -878,7 +878,7 @@ + } + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + stream:: + async_read_some( +@@ -1263,7 +1263,7 @@ + } + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT2(ReadHandler) + stream:: + async_read_some( +diff -aruN a/include/boost/beast/websocket/impl/write.hpp b/include/boost/beast/websocket/impl/write.hpp +--- a/include/boost/beast/websocket/impl/write.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/include/boost/beast/websocket/impl/write.hpp 2020-05-02 13:50:11.153761830 -0400 +@@ -700,7 +700,7 @@ + } + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + stream:: + async_write_some(bool fin, +@@ -756,7 +756,7 @@ + } + + template +-template ++template + BOOST_BEAST_ASYNC_RESULT2(WriteHandler) + stream:: + async_write( +diff -aruN a/include/boost/beast/websocket/stream.hpp b/include/boost/beast/websocket/stream.hpp +--- a/include/boost/beast/websocket/stream.hpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/include/boost/beast/websocket/stream.hpp 2020-05-02 13:50:11.154761841 -0400 +@@ -2634,7 +2634,7 @@ + + template< + class ResponseDecorator, +- class AcceptHandler> ++ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler> + BOOST_BEAST_ASYNC_RESULT1(AcceptHandler) + async_accept_ex( + ResponseDecorator const& decorator, +@@ -2643,7 +2643,7 @@ + template< + class ConstBufferSequence, + class ResponseDecorator, +- class AcceptHandler> ++ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler> + BOOST_BEAST_ASYNC_RESULT1(AcceptHandler) + async_accept_ex( + ConstBufferSequence const& buffers, +@@ -2656,7 +2656,7 @@ + template< + class Body, class Allocator, + class ResponseDecorator, +- class AcceptHandler> ++ BOOST_BEAST_ASYNC_TPARAM1 AcceptHandler> + BOOST_BEAST_ASYNC_RESULT1(AcceptHandler) + async_accept_ex( + http::request ++ template + typename net::async_result::return_type + async_read(AsyncReadStream& stream, net::mutable_buffer buffer, ReadHandler&& handler) + { +diff -aruN a/test/beast/core/basic_stream.cpp b/test/beast/core/basic_stream.cpp +--- a/test/beast/core/basic_stream.cpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/test/beast/core/basic_stream.cpp 2020-05-02 13:51:02.470315892 -0400 +@@ -30,6 +30,13 @@ + #include + #include + ++#if BOOST_ASIO_HAS_CO_AWAIT ++#include ++#include ++#include ++#endif ++ ++ + namespace boost { + namespace beast { + +@@ -258,7 +265,7 @@ + { + string_view s_; + net::ip::tcp::socket socket_; +- ++ + public: + session( + string_view s, +@@ -1297,6 +1304,52 @@ + + //-------------------------------------------------------------------------- + ++#if BOOST_ASIO_HAS_CO_AWAIT ++ void testAwaitableCompilation( ++ basic_stream& stream, ++ net::mutable_buffer outbuf, ++ net::const_buffer inbuf, ++ net::ip::tcp::resolver::results_type resolve_results) ++ { ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ stream.async_read_some(outbuf, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ stream.async_write_some(inbuf, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ stream.async_connect( ++ resolve_results.begin(), ++ resolve_results.end(), ++ net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ stream.async_connect( ++ resolve_results, ++ net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ stream.async_connect( ++ resolve_results.begin()->endpoint(), ++ net::use_awaitable))>); ++ ++ auto comparison_function = [](error_code&, net::ip::tcp::endpoint) { return true; }; ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ stream.async_connect( ++ resolve_results.begin(), ++ resolve_results.end(), ++ comparison_function, ++ net::use_awaitable))>); ++ } ++#endif ++ + void + run() + { +@@ -1307,6 +1360,11 @@ + testMembers(); + testJavadocs(); + testIssue1589(); ++ ++#if BOOST_ASIO_HAS_CO_AWAIT ++ // test for compilation success only ++ boost::ignore_unused(&basic_stream_test::testAwaitableCompilation); ++#endif + } + }; + +diff -aruN a/test/beast/core/buffered_read_stream.cpp b/test/beast/core/buffered_read_stream.cpp +--- a/test/beast/core/buffered_read_stream.cpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/test/beast/core/buffered_read_stream.cpp 2020-05-02 13:51:02.470315892 -0400 +@@ -21,6 +21,9 @@ + #include + #include + #include ++#if BOOST_ASIO_HAS_CO_AWAIT ++#include ++#endif + + namespace boost { + namespace beast { +@@ -211,6 +214,22 @@ + } + }; + ++#if BOOST_ASIO_HAS_CO_AWAIT ++ void testAwaitableCompiles( ++ buffered_read_stream& stream, ++ net::mutable_buffer rxbuf, ++ net::const_buffer txbuf) ++ { ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ stream.async_read_some(rxbuf, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ stream.async_write_some(txbuf, net::use_awaitable))>); ++ } ++#endif ++ + void run() override + { + testSpecialMembers(); +@@ -221,6 +240,10 @@ + }); + + testAsyncLoop(); ++ ++#if BOOST_ASIO_HAS_CO_AWAIT ++ boost::ignore_unused(&buffered_read_stream_test::testAwaitableCompiles); ++#endif + } + }; + +diff -aruN a/test/beast/core/detect_ssl.cpp b/test/beast/core/detect_ssl.cpp +--- a/test/beast/core/detect_ssl.cpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/test/beast/core/detect_ssl.cpp 2020-05-02 13:51:02.470315892 -0400 +@@ -16,6 +16,11 @@ + #include + #include + #include ++#if BOOST_ASIO_HAS_CO_AWAIT ++#include ++#include ++#include ++#endif + namespace boost { + namespace beast { + +@@ -166,12 +171,25 @@ + } + } + ++#if BOOST_ASIO_HAS_CO_AWAIT ++ void testAwaitableCompiles(test::stream& stream, flat_buffer& b) ++ { ++ static_assert( ++ std::is_same_v< ++ net::awaitable, decltype( ++ async_detect_ssl(stream, b, net::use_awaitable))>); ++ } ++#endif ++ + void + run() override + { + testDetect(); + testRead(); + testAsyncRead(); ++#if BOOST_ASIO_HAS_CO_AWAIT ++ boost::ignore_unused(&detect_ssl_test::testAwaitableCompiles); ++#endif + } + }; + +diff -aruN a/test/beast/core/flat_stream.cpp b/test/beast/core/flat_stream.cpp +--- a/test/beast/core/flat_stream.cpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/test/beast/core/flat_stream.cpp 2020-05-02 13:51:02.471315902 -0400 +@@ -17,6 +17,9 @@ + #include + #include + #include ++#if BOOST_ASIO_HAS_CO_AWAIT ++#include ++#endif + + namespace boost { + namespace beast { +@@ -208,11 +211,30 @@ + check({1,2,3,4}, 3, 3, true); + } + ++#if BOOST_ASIO_HAS_CO_AWAIT ++ void testAwaitableCompiles( ++ flat_stream& stream, ++ net::mutable_buffer rxbuf, ++ net::const_buffer txbuf) ++ { ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ stream.async_read_some(rxbuf, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ stream.async_write_some(txbuf, net::use_awaitable))>); ++ } ++#endif ++ + void + run() override + { + testMembers(); + testSplit(); ++#if BOOST_ASIO_HAS_CO_AWAIT ++ boost::ignore_unused(&flat_stream_test::testAwaitableCompiles); ++#endif + } + }; + +diff -aruN a/test/beast/core/stream_traits.cpp b/test/beast/core/stream_traits.cpp +--- a/test/beast/core/stream_traits.cpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/test/beast/core/stream_traits.cpp 2020-05-02 13:51:02.471315902 -0400 +@@ -214,14 +214,14 @@ + struct async_read_stream + { + net::io_context::executor_type get_executor() noexcept; +- template ++ template + void async_read_some(MutableBufferSequence const&, ReadHandler&&); + }; + + struct async_write_stream + { + net::io_context::executor_type get_executor() noexcept; +- template ++ template + void async_write_some(ConstBufferSequence const&, WriteHandler&&); + }; + +@@ -232,9 +232,9 @@ + struct async_stream : async_read_stream, async_write_stream + { + net::io_context::executor_type get_executor() noexcept; +- template ++ template + void async_read_some(MutableBufferSequence const&, ReadHandler&&); +- template ++ template + void async_write_some(ConstBufferSequence const&, WriteHandler&&); + }; + +diff -aruN a/test/beast/http/CMakeLists.txt b/test/beast/http/CMakeLists.txt +--- a/test/beast/http/CMakeLists.txt 2020-04-22 09:34:50.000000000 -0400 ++++ b/test/beast/http/CMakeLists.txt 2020-05-02 13:51:02.472315914 -0400 +@@ -26,6 +26,7 @@ + empty_body.cpp + error.cpp + field.cpp ++ field_compiles.cpp + fields.cpp + file_body.cpp + message.cpp +diff -aruN a/test/beast/http/field_compiles.cpp b/test/beast/http/field_compiles.cpp +--- a/test/beast/http/field_compiles.cpp 1969-12-31 19:00:00.000000000 -0500 ++++ b/test/beast/http/field_compiles.cpp 2020-05-02 13:51:02.473315924 -0400 +@@ -0,0 +1,11 @@ ++// ++// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com) ++// ++// Distributed under the Boost Software License, Version 1.0. (See accompanying ++// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ++// ++// Official repository: https://github.com/boostorg/beast ++// ++ ++// Test that header file is self-contained. ++#include +diff -aruN a/test/beast/http/Jamfile b/test/beast/http/Jamfile +--- a/test/beast/http/Jamfile 2020-04-22 09:34:50.000000000 -0400 ++++ b/test/beast/http/Jamfile 2020-05-02 13:51:02.472315914 -0400 +@@ -16,6 +16,7 @@ + dynamic_body.cpp + error.cpp + field.cpp ++ field_compiles.cpp + fields.cpp + file_body.cpp + message.cpp +diff -aruN a/test/beast/http/read.cpp b/test/beast/http/read.cpp +--- a/test/beast/http/read.cpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/test/beast/http/read.cpp 2020-05-02 13:51:02.472315914 -0400 +@@ -25,6 +25,9 @@ + #include + #include + #include ++#if BOOST_ASIO_HAS_CO_AWAIT ++#include ++#endif + + namespace boost { + namespace beast { +@@ -529,6 +532,49 @@ + } + } + ++#if BOOST_ASIO_HAS_CO_AWAIT ++ void testAwaitableCompiles( ++ test::stream& stream, ++ flat_buffer& dynbuf, ++ parser& request_parser, ++ request& request, ++ parser& response_parser, ++ response& response) ++ { ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_read(stream, dynbuf, request, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_read(stream, dynbuf, request_parser, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_read(stream, dynbuf, response, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_read(stream, dynbuf, response_parser, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_read_some(stream, dynbuf, request_parser, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_read_some(stream, dynbuf, response_parser, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_read_header(stream, dynbuf, request_parser, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_read_header(stream, dynbuf, response_parser, net::use_awaitable))>); ++ } ++#endif ++ + void + run() override + { +@@ -552,6 +598,9 @@ + testRegression430(); + testReadGrind(); + testAsioHandlerInvoke(); ++#if BOOST_ASIO_HAS_CO_AWAIT ++ boost::ignore_unused(&read_test::testAwaitableCompiles); ++#endif + } + }; + +diff -aruN a/test/beast/http/write.cpp b/test/beast/http/write.cpp +--- a/test/beast/http/write.cpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/test/beast/http/write.cpp 2020-05-02 13:51:02.473315924 -0400 +@@ -26,6 +26,9 @@ + #include + #include + #include ++#if BOOST_ASIO_HAS_CO_AWAIT ++#include ++#endif + + namespace boost { + namespace beast { +@@ -994,6 +997,59 @@ + } + } + ++#if BOOST_ASIO_HAS_CO_AWAIT ++ void testAwaitableCompiles( ++ test::stream& stream, ++ serializer& request_serializer, ++ request& req, ++ request const& creq, ++ serializer& response_serializer, ++ response& resp, ++ response const& cresp) ++ { ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_write(stream, request_serializer, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_write(stream, response_serializer, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_write(stream, req, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_write(stream, creq, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_write(stream, resp, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_write(stream, cresp, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_write_some(stream, request_serializer, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_write_some(stream, response_serializer, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_write_header(stream, request_serializer, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ http::async_write_header(stream, response_serializer, net::use_awaitable))>); ++ } ++#endif ++ ++ + void + run() override + { +@@ -1017,6 +1073,9 @@ + }); + testAsioHandlerInvoke(); + testBodyWriters(); ++#if BOOST_ASIO_HAS_CO_AWAIT ++ boost::ignore_unused(&write_test::testAwaitableCompiles); ++#endif + } + }; + +diff -aruN a/test/beast/websocket/accept.cpp b/test/beast/websocket/accept.cpp +--- a/test/beast/websocket/accept.cpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/test/beast/websocket/accept.cpp 2020-05-02 13:51:02.473315924 -0400 +@@ -14,7 +14,9 @@ + #include + #include + #include "test.hpp" +- ++#if BOOST_ASIO_HAS_CO_AWAIT ++#include ++#endif + namespace boost { + namespace beast { + namespace websocket { +@@ -810,6 +812,27 @@ + } + } + ++#if BOOST_ASIO_HAS_CO_AWAIT ++ void testAwaitableCompiles( ++ stream& s, ++ http::request& req, ++ net::mutable_buffer buf ++ ) ++ { ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ s.async_accept(net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ s.async_accept(req, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ s.async_accept(buf, net::use_awaitable))>); ++ } ++#endif ++ + void + run() override + { +@@ -820,6 +843,9 @@ + testInvalidInputs(); + testEndOfStream(); + testAsync(); ++#if BOOST_ASIO_HAS_CO_AWAIT ++ boost::ignore_unused(&accept_test::testAwaitableCompiles); ++#endif + } + }; + +diff -aruN a/test/beast/websocket/close.cpp b/test/beast/websocket/close.cpp +--- a/test/beast/websocket/close.cpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/test/beast/websocket/close.cpp 2020-05-02 13:51:02.473315924 -0400 +@@ -16,6 +16,9 @@ + + #include + #include ++#if BOOST_ASIO_HAS_CO_AWAIT ++#include ++#endif + + namespace boost { + namespace beast { +@@ -735,6 +738,15 @@ + } + }; + ++#if BOOST_ASIO_HAS_CO_AWAIT ++ void testAwaitableCompiles(stream& s, close_reason cr ) ++ { ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ s.async_close(cr, net::use_awaitable))>); ++ } ++#endif ++ + void + run() override + { +@@ -742,6 +754,9 @@ + testTimeout(); + testSuspend(); + testMoveOnly(); ++#if BOOST_ASIO_HAS_CO_AWAIT ++ boost::ignore_unused(&close_test::testAwaitableCompiles); ++#endif + } + }; + +diff -aruN a/test/beast/websocket/handshake.cpp b/test/beast/websocket/handshake.cpp +--- a/test/beast/websocket/handshake.cpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/test/beast/websocket/handshake.cpp 2020-05-02 13:51:02.473315924 -0400 +@@ -18,6 +18,9 @@ + #include + #include + #include ++#if BOOST_ASIO_HAS_CO_AWAIT ++#include ++#endif + + namespace boost { + namespace beast { +@@ -704,6 +707,23 @@ + } + } + ++#if BOOST_ASIO_HAS_CO_AWAIT ++ void testAwaitableCompiles( ++ stream& s, ++ std::string host, ++ std::string port, ++ response_type& resp) ++ { ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ s.async_handshake(host, port, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ s.async_handshake(resp, host, port, net::use_awaitable))>); ++ } ++#endif ++ + void + run() override + { +@@ -714,6 +734,9 @@ + testMoveOnly(); + testAsync(); + testIssue1460(); ++#if BOOST_ASIO_HAS_CO_AWAIT ++ boost::ignore_unused(&handshake_test::testAwaitableCompiles); ++#endif + } + }; + +diff -aruN a/test/beast/websocket/ping.cpp b/test/beast/websocket/ping.cpp +--- a/test/beast/websocket/ping.cpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/test/beast/websocket/ping.cpp 2020-05-02 13:51:02.474315935 -0400 +@@ -18,6 +18,10 @@ + #include + #include + ++#if BOOST_ASIO_HAS_CO_AWAIT ++#include ++#endif ++ + namespace boost { + namespace beast { + namespace websocket { +@@ -483,12 +487,30 @@ + } + }; + ++#if BOOST_ASIO_HAS_CO_AWAIT ++ void testAwaitableCompiles( ++ stream& s, ++ ping_data& pdat) ++ { ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ s.async_ping(pdat, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ s.async_pong(pdat, net::use_awaitable))>); ++ } ++#endif ++ + void + run() override + { + testPing(); + testSuspend(); + testMoveOnly(); ++#if BOOST_ASIO_HAS_CO_AWAIT ++ boost::ignore_unused(&ping_test::testAwaitableCompiles); ++#endif + } + }; + +diff -aruN a/test/beast/websocket/read2.cpp b/test/beast/websocket/read2.cpp +--- a/test/beast/websocket/read2.cpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/test/beast/websocket/read2.cpp 2020-05-02 13:51:02.474315935 -0400 +@@ -14,6 +14,10 @@ + + #include + ++#if BOOST_ASIO_HAS_CO_AWAIT ++#include ++#endif ++ + #include + #if BOOST_WORKAROUND(BOOST_GCC, < 80200) + #define BOOST_BEAST_SYMBOL_HIDDEN __attribute__ ((visibility("hidden"))) +@@ -673,10 +677,34 @@ + } + } + ++#if BOOST_ASIO_HAS_CO_AWAIT ++ void testAwaitableCompiles( ++ stream& s, ++ flat_buffer& dynbuf, ++ net::mutable_buffer buf, ++ std::size_t limit) ++ { ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ s.async_read(dynbuf, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ s.async_read_some(buf, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ s.async_read_some(dynbuf, limit, net::use_awaitable))>); ++ } ++#endif ++ + void + run() override + { + testRead(); ++#if BOOST_ASIO_HAS_CO_AWAIT ++ boost::ignore_unused(&read2_test::testAwaitableCompiles); ++#endif + } + }; + +diff -aruN a/test/beast/websocket/write.cpp b/test/beast/websocket/write.cpp +--- a/test/beast/websocket/write.cpp 2020-04-22 09:34:50.000000000 -0400 ++++ b/test/beast/websocket/write.cpp 2020-05-02 13:51:02.474315935 -0400 +@@ -13,6 +13,10 @@ + #include + #include + ++#if BOOST_ASIO_HAS_CO_AWAIT ++#include ++#endif ++ + #include "test.hpp" + + namespace boost { +@@ -716,6 +720,22 @@ + BEAST_EXPECT(n1 < n0 + s.size()); + } + ++#if BOOST_ASIO_HAS_CO_AWAIT ++ void testAwaitableCompiles( ++ stream& s, ++ net::mutable_buffer buf, ++ bool fin) ++ { ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ s.async_write(buf, net::use_awaitable))>); ++ ++ static_assert(std::is_same_v< ++ net::awaitable, decltype( ++ s.async_write_some(fin, buf, net::use_awaitable))>); ++ } ++#endif ++ + void + run() override + { +@@ -726,6 +746,9 @@ + testMoveOnly(); + testIssue300(); + testIssue1666(); ++#if BOOST_ASIO_HAS_CO_AWAIT ++ boost::ignore_unused(&write_test::testAwaitableCompiles); ++#endif + } + }; + diff --git a/vcpkg/ports/boost-beast/CONTROL b/vcpkg/ports/boost-beast/CONTROL new file mode 100644 index 0000000..800a13c --- /dev/null +++ b/vcpkg/ports/boost-beast/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-beast +Version: 1.73.0 +Build-Depends: boost-asio, boost-assert, boost-bind, boost-config, boost-container, boost-core, boost-endian, boost-intrusive, boost-logic, boost-mp11, boost-optional, boost-smart-ptr, boost-static-assert, boost-system, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi +Homepage: https://github.com/boostorg/beast +Description: Boost beast module diff --git a/vcpkg/ports/boost-beast/portfile.cmake b/vcpkg/ports/boost-beast/portfile.cmake new file mode 100644 index 0000000..231d96d --- /dev/null +++ b/vcpkg/ports/boost-beast/portfile.cmake @@ -0,0 +1,13 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/beast + REF boost-1.73.0 + SHA512 b1f0d2b1a8576d8bea953ce92aa9970590f91451f19d059818eb1c7a2b21c39fe384526c65b324c6c6142f4eac9bb649bdc6b2b9eff946c7f348f11332b9753c + HEAD_REF master + PATCHES 0002-beast-coroutines.patch +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-bimap/CONTROL b/vcpkg/ports/boost-bimap/CONTROL new file mode 100644 index 0000000..412dc84 --- /dev/null +++ b/vcpkg/ports/boost-bimap/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-bimap +Version: 1.73.0 +Build-Depends: boost-concept-check, boost-config, boost-container-hash, boost-functional, boost-iterator, boost-lambda, boost-mpl, boost-multi-index, boost-preprocessor, boost-property-map, boost-serialization, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/bimap +Description: Boost bimap module diff --git a/vcpkg/ports/boost-bimap/portfile.cmake b/vcpkg/ports/boost-bimap/portfile.cmake new file mode 100644 index 0000000..8c7c52d --- /dev/null +++ b/vcpkg/ports/boost-bimap/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/bimap + REF boost-1.73.0 + SHA512 63b3fb5926ee7e1d86872f766213a6d31d146f0db349c676754cc0c4d5050f8690773ec694cc2e820b96f278907e63d0e32c3e588b74ea415359955f4ec3d9b8 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-bind/CONTROL b/vcpkg/ports/boost-bind/CONTROL new file mode 100644 index 0000000..8db3ebf --- /dev/null +++ b/vcpkg/ports/boost-bind/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-bind +Version: 1.73.0 +Build-Depends: boost-config, boost-core, boost-detail, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/bind +Description: Boost bind module diff --git a/vcpkg/ports/boost-bind/portfile.cmake b/vcpkg/ports/boost-bind/portfile.cmake new file mode 100644 index 0000000..6c9f472 --- /dev/null +++ b/vcpkg/ports/boost-bind/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/bind + REF boost-1.73.0 + SHA512 5ec2535ac4452edbc10faf2d16e61ee09b12d6dc9d013015798c67bfdd5308e219e534aeae56549a5890aff70956573f5e4633a8261472e242de3314f027d563 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-build/CONTROL b/vcpkg/ports/boost-build/CONTROL new file mode 100644 index 0000000..0366313 --- /dev/null +++ b/vcpkg/ports/boost-build/CONTROL @@ -0,0 +1,6 @@ +Source: boost-build +Version: 1.73.0 +Port-Version: 4 +Homepage: https://github.com/boostorg/build +Description: Boost.Build +Build-Depends: boost-uninstall \ No newline at end of file diff --git a/vcpkg/ports/boost-build/portfile.cmake b/vcpkg/ports/boost-build/portfile.cmake new file mode 100644 index 0000000..bad139a --- /dev/null +++ b/vcpkg/ports/boost-build/portfile.cmake @@ -0,0 +1,69 @@ +include(vcpkg_common_functions) + +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +if(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "MinGW") + return() +endif() + +set(BOOST_VERSION 1.73.0) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/build + REF boost-${BOOST_VERSION} + SHA512 68e132c480c3063f99ddae48177ff5a35369e49e7f497d51d758a9bf760c5b20c1c040cb212fad94b1f27fb140054b0ef14ac0b32c6d7d246e921787ff58a037 + HEAD_REF master +) + +vcpkg_download_distfile(ARCHIVE + URLS "https://raw.githubusercontent.com/boostorg/boost/boost-${BOOST_VERSION}/LICENSE_1_0.txt" + FILENAME "boost_LICENSE_1_0.txt" + SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 +) + +vcpkg_download_distfile(BOOSTCPP_ARCHIVE + URLS "https://raw.githubusercontent.com/boostorg/boost/boost-${BOOST_VERSION}/boostcpp.jam" + FILENAME "boost-${BOOST_VERSION}-boostcpp.jam" + SHA512 8cf929fa4a602342c859a6bbd5f9dda783ac29431d951bcf6cae4cb14377c1b3aed90bacd902b0f7d1807591cf5e1a244cf8fc3c6cc6e0a4056db145b58f51df +) + +file(INSTALL ${ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-build RENAME copyright) +file(INSTALL ${BOOSTCPP_ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/boost-build RENAME boostcpp.jam) + +# This fixes the lib path to use desktop libs instead of uwp -- TODO: improve this with better "host" compilation +string(REPLACE "\\store\\;" "\\;" LIB "$ENV{LIB}") +set(ENV{LIB} "${LIB}") + +file(COPY + ${SOURCE_PATH}/ + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/boost-build +) + +file(READ "${CURRENT_PACKAGES_DIR}/tools/boost-build/src/tools/msvc.jam" _contents) +string(REPLACE " /ZW /EHsc " "" _contents "${_contents}") +string(REPLACE "-nologo" "" _contents "${_contents}") +string(REPLACE "/nologo" "" _contents "${_contents}") +string(REPLACE "/Zm800" "" _contents "${_contents}") +string(REPLACE "_WIN32_WINNT=0x0602" "" _contents "${_contents}") +file(WRITE "${CURRENT_PACKAGES_DIR}/tools/boost-build/src/tools/msvc.jam" "${_contents}") + +message(STATUS "Bootstrapping...") +if(CMAKE_HOST_WIN32) + if(VCPKG_TARGET_IS_MINGW) + set(TOOLSET mingw) + else() + set(TOOLSET msvc) + endif() + vcpkg_execute_required_process( + COMMAND "${CURRENT_PACKAGES_DIR}/tools/boost-build/bootstrap.bat" ${TOOLSET} + WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/boost-build + LOGNAME bootstrap-${TARGET_TRIPLET} + ) +else() + vcpkg_execute_required_process( + COMMAND "${CURRENT_PACKAGES_DIR}/tools/boost-build/bootstrap.sh" + WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/boost-build + LOGNAME bootstrap-${TARGET_TRIPLET} + ) +endif() diff --git a/vcpkg/ports/boost-callable-traits/CONTROL b/vcpkg/ports/boost-callable-traits/CONTROL new file mode 100644 index 0000000..705a2eb --- /dev/null +++ b/vcpkg/ports/boost-callable-traits/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-callable-traits +Version: 1.73.0 +Build-Depends: boost-vcpkg-helpers +Homepage: https://github.com/boostorg/callable_traits +Description: Boost callable_traits module diff --git a/vcpkg/ports/boost-callable-traits/portfile.cmake b/vcpkg/ports/boost-callable-traits/portfile.cmake new file mode 100644 index 0000000..c364f57 --- /dev/null +++ b/vcpkg/ports/boost-callable-traits/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/callable_traits + REF boost-1.73.0 + SHA512 4d9d59b353fc4d7c6661ee71c53e9b279fc727d9e6d0767ef9e9c53e307deb8c4975347d84329c67b0ee93be8140946270a1617c4f49e2b20aabd4c37829eba1 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-chrono/CONTROL b/vcpkg/ports/boost-chrono/CONTROL new file mode 100644 index 0000000..c481845 --- /dev/null +++ b/vcpkg/ports/boost-chrono/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-chrono +Version: 1.73.0 +Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-integer, boost-modular-build-helper, boost-move, boost-mpl, boost-predef, boost-ratio, boost-static-assert, boost-system, boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi +Homepage: https://github.com/boostorg/chrono +Description: Boost chrono module diff --git a/vcpkg/ports/boost-chrono/portfile.cmake b/vcpkg/ports/boost-chrono/portfile.cmake new file mode 100644 index 0000000..ea75c46 --- /dev/null +++ b/vcpkg/ports/boost-chrono/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/chrono + REF boost-1.73.0 + SHA512 81c40845939172b8d33f05e7e16c6be9bd0e83eedb5ac8712090043a0309f5ddb377a8b9686ef79363c917fb74ac626268078ff5068998981ce043d006d1461a + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-circular-buffer/CONTROL b/vcpkg/ports/boost-circular-buffer/CONTROL new file mode 100644 index 0000000..6a7c387 --- /dev/null +++ b/vcpkg/ports/boost-circular-buffer/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-circular-buffer +Version: 1.73.0 +Build-Depends: boost-assert, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-move, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/circular_buffer +Description: Boost circular_buffer module diff --git a/vcpkg/ports/boost-circular-buffer/portfile.cmake b/vcpkg/ports/boost-circular-buffer/portfile.cmake new file mode 100644 index 0000000..b60bfe3 --- /dev/null +++ b/vcpkg/ports/boost-circular-buffer/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/circular_buffer + REF boost-1.73.0 + SHA512 602ab96a2b5189cc37a3cac85fc663fec497674f19ead202170ebe1fc416587b50d8deff5ad274579c75e2ef30f0c832366b3f9bf54733ea659247923cf7d8ad + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-compatibility/CONTROL b/vcpkg/ports/boost-compatibility/CONTROL new file mode 100644 index 0000000..fc08a18 --- /dev/null +++ b/vcpkg/ports/boost-compatibility/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-compatibility +Version: 1.73.0 +Build-Depends: boost-vcpkg-helpers +Homepage: https://github.com/boostorg/compatibility +Description: Boost compatibility module diff --git a/vcpkg/ports/boost-compatibility/portfile.cmake b/vcpkg/ports/boost-compatibility/portfile.cmake new file mode 100644 index 0000000..d842c49 --- /dev/null +++ b/vcpkg/ports/boost-compatibility/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/compatibility + REF boost-1.73.0 + SHA512 ce2b5f908c878cc34694b024c1f4609098bf1e8801df90e067bcf535e267632142639653230588e92819c8b579c59d0703bb8d9ec06ec8a4fc3d103634673724 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-compute/CONTROL b/vcpkg/ports/boost-compute/CONTROL new file mode 100644 index 0000000..8468ee6 --- /dev/null +++ b/vcpkg/ports/boost-compute/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-compute +Version: 1.73.0 +Build-Depends: boost-algorithm, boost-array, boost-assert, boost-chrono, boost-config, boost-core, boost-filesystem (!uwp), boost-function, boost-function-types, boost-fusion, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-preprocessor, boost-property-tree, boost-proto, boost-range, boost-smart-ptr, boost-static-assert, boost-thread, boost-throw-exception, boost-tuple, boost-typeof, boost-type-traits, boost-utility, boost-uuid, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/compute +Description: Boost compute module diff --git a/vcpkg/ports/boost-compute/portfile.cmake b/vcpkg/ports/boost-compute/portfile.cmake new file mode 100644 index 0000000..d8c6e15 --- /dev/null +++ b/vcpkg/ports/boost-compute/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/compute + REF boost-1.73.0 + SHA512 c6877630ce15dfa56f71d784e10264e24f0029ed28345ed6d1421b13e5c020511251129990f4a368dcaad9765936cab6d4364556e826335ac64788c3d87951dd + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-concept-check/CONTROL b/vcpkg/ports/boost-concept-check/CONTROL new file mode 100644 index 0000000..df7e3be --- /dev/null +++ b/vcpkg/ports/boost-concept-check/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-concept-check +Version: 1.73.0 +Build-Depends: boost-config, boost-preprocessor, boost-static-assert, boost-type-traits, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/concept_check +Description: Boost concept_check module diff --git a/vcpkg/ports/boost-concept-check/portfile.cmake b/vcpkg/ports/boost-concept-check/portfile.cmake new file mode 100644 index 0000000..196d691 --- /dev/null +++ b/vcpkg/ports/boost-concept-check/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/concept_check + REF boost-1.73.0 + SHA512 78612011a3f0f4ee0c055661e4a72745a9a6ef4734cd49600d37e5f3b04e13c96195150e4cf7f5a48c2b8f2af2c89e40de7d21ee3a4a7a12110a554f494f39ed + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-config/CONTROL b/vcpkg/ports/boost-config/CONTROL new file mode 100644 index 0000000..efad3a6 --- /dev/null +++ b/vcpkg/ports/boost-config/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-config +Version: 1.73.0 +Build-Depends: boost-compatibility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/config +Description: Boost config module diff --git a/vcpkg/ports/boost-config/portfile.cmake b/vcpkg/ports/boost-config/portfile.cmake new file mode 100644 index 0000000..35c350f --- /dev/null +++ b/vcpkg/ports/boost-config/portfile.cmake @@ -0,0 +1,19 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/config + REF boost-1.73.0 + SHA512 39448c9371be8c7bc613c4f507d6cb65a684be2e4ea3cd218f6a8635d60e748db6008d2cd874dbadee183ea5d22b1296e0f66da5dc384a7dfc12ac2128f7bb64 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) +file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp "\n#ifndef BOOST_ALL_NO_LIB\n#define BOOST_ALL_NO_LIB\n#endif\n") +file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp "\n#undef BOOST_ALL_DYN_LINK\n") + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp "\n#define BOOST_ALL_DYN_LINK\n") +endif() +file(COPY ${SOURCE_PATH}/checks DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-config) diff --git a/vcpkg/ports/boost-container-hash/CONTROL b/vcpkg/ports/boost-container-hash/CONTROL new file mode 100644 index 0000000..c81d3ef --- /dev/null +++ b/vcpkg/ports/boost-container-hash/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-container-hash +Version: 1.73.0 +Build-Depends: boost-assert, boost-compatibility, boost-config, boost-core, boost-detail, boost-integer, boost-static-assert, boost-type-traits, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/container_hash +Description: Boost container_hash module diff --git a/vcpkg/ports/boost-container-hash/portfile.cmake b/vcpkg/ports/boost-container-hash/portfile.cmake new file mode 100644 index 0000000..c0eff90 --- /dev/null +++ b/vcpkg/ports/boost-container-hash/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/container_hash + REF boost-1.73.0 + SHA512 c5cd2d85eb79c7524c22e7be51241654f9dba16786cb83366164f4bbef2b8a24258401d88b79a9eb647c73eea2a379389c5075be743a27ca25eeb89e4bed01dc + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-container/CONTROL b/vcpkg/ports/boost-container/CONTROL new file mode 100644 index 0000000..ead3c29 --- /dev/null +++ b/vcpkg/ports/boost-container/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-container +Version: 1.73.0 +Build-Depends: boost-assert, boost-build, boost-config, boost-container-hash, boost-core, boost-integer, boost-intrusive, boost-modular-build-helper, boost-move, boost-static-assert, boost-type-traits, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/container +Description: Boost container module diff --git a/vcpkg/ports/boost-container/portfile.cmake b/vcpkg/ports/boost-container/portfile.cmake new file mode 100644 index 0000000..ce65a75 --- /dev/null +++ b/vcpkg/ports/boost-container/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/container + REF boost-1.73.0 + SHA512 419a141138047baa649a3e1d0edcd55dfe5cf189b6ac9b9b0bc8da4d8e50971ff4619b5b811a3b1e17658c2573f32d926166d0ad260e036b736d8a615e4a1682 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-context/CONTROL b/vcpkg/ports/boost-context/CONTROL new file mode 100644 index 0000000..3effa3c --- /dev/null +++ b/vcpkg/ports/boost-context/CONTROL @@ -0,0 +1,8 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-context +Version: 1.73.0 +Port-Version: 2 +Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-integer, boost-modular-build-helper, boost-pool, boost-predef, boost-smart-ptr, boost-thread, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/context +Description: Boost context module +Supports: !uwp diff --git a/vcpkg/ports/boost-context/fix_exports_for_32bit_GNU_asm_for_windows.patch b/vcpkg/ports/boost-context/fix_exports_for_32bit_GNU_asm_for_windows.patch new file mode 100644 index 0000000..30d38af --- /dev/null +++ b/vcpkg/ports/boost-context/fix_exports_for_32bit_GNU_asm_for_windows.patch @@ -0,0 +1,45 @@ +From d52ce8ca89674e31e689a7af3b0fc9304018be5a Mon Sep 17 00:00:00 2001 +From: Julien Schueller +Date: Thu, 20 Aug 2020 12:51:30 +0200 +Subject: [PATCH] Revert "Fix exports for 32-bit GNU assembler files targeting + Windows." + +This reverts 85783e8, as the wrong linker was used + +Closes #136 +--- + src/asm/jump_i386_ms_pe_gas.asm | 2 +- + src/asm/make_i386_ms_pe_gas.asm | 2 +- + src/asm/ontop_i386_ms_pe_gas.asm | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/asm/jump_i386_ms_pe_gas.asm b/src/asm/jump_i386_ms_pe_gas.asm +index bf5c75a4..6eb45326 100644 +--- a/src/asm/jump_i386_ms_pe_gas.asm ++++ b/src/asm/jump_i386_ms_pe_gas.asm +@@ -120,4 +120,4 @@ _jump_fcontext: + jmp *%ecx + + .section .drectve +-.ascii " -export:\"_jump_fcontext\"" ++.ascii " -export:\"jump_fcontext\"" +diff --git a/src/asm/make_i386_ms_pe_gas.asm b/src/asm/make_i386_ms_pe_gas.asm +index 10277bb5..608ddf3a 100644 +--- a/src/asm/make_i386_ms_pe_gas.asm ++++ b/src/asm/make_i386_ms_pe_gas.asm +@@ -150,4 +150,4 @@ finish: + .def __exit; .scl 2; .type 32; .endef /* standard C library function */ + + .section .drectve +-.ascii " -export:\"_make_fcontext\"" ++.ascii " -export:\"make_fcontext\"" +diff --git a/src/asm/ontop_i386_ms_pe_gas.asm b/src/asm/ontop_i386_ms_pe_gas.asm +index c23e18a2..abe9002a 100644 +--- a/src/asm/ontop_i386_ms_pe_gas.asm ++++ b/src/asm/ontop_i386_ms_pe_gas.asm +@@ -128,4 +128,4 @@ _ontop_fcontext: + jmp *%ecx + + .section .drectve +-.ascii " -export:\"_ontop_fcontext\"" ++.ascii " -export:\"ontop_fcontext\"" diff --git a/vcpkg/ports/boost-context/portfile.cmake b/vcpkg/ports/boost-context/portfile.cmake new file mode 100644 index 0000000..263b0c8 --- /dev/null +++ b/vcpkg/ports/boost-context/portfile.cmake @@ -0,0 +1,27 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/context + REF boost-1.73.0 + SHA512 cb460e9d7f5b2782164e49820b097402f6a443718d689b2f793f5ab7030012a80418dfc51154f299c9f987d6864d87f7536476ffa97da1089bf6b70f2990ebea + HEAD_REF master + PATCHES + fix_exports_for_32bit_GNU_asm_for_windows.patch +) + +file(READ "${SOURCE_PATH}/build/Jamfile.v2" _contents) +string(REPLACE "import ../../config/checks/config" "import config/checks/config" _contents "${_contents}") +file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) + +# boost-context removed all.hpp, which is used by FindBoost to determine that context is installed +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include/boost/context/all.hpp) + file(WRITE ${CURRENT_PACKAGES_DIR}/include/boost/context/all.hpp + "#error \"#include is no longer supported by boost_context.\"") +endif() diff --git a/vcpkg/ports/boost-contract/CONTROL b/vcpkg/ports/boost-contract/CONTROL new file mode 100644 index 0000000..c384a47 --- /dev/null +++ b/vcpkg/ports/boost-contract/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-contract +Version: 1.73.0 +Build-Depends: boost-any, boost-assert, boost-build, boost-config, boost-core, boost-detail, boost-exception, boost-function, boost-function-types, boost-modular-build-helper, boost-mpl, boost-optional, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-thread, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/contract +Description: Boost contract module diff --git a/vcpkg/ports/boost-contract/portfile.cmake b/vcpkg/ports/boost-contract/portfile.cmake new file mode 100644 index 0000000..c27c4d8 --- /dev/null +++ b/vcpkg/ports/boost-contract/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/contract + REF boost-1.73.0 + SHA512 670e7d9e64d838bda32ec8748213961b8b7ee96d2918f2e6b71005b488de22b5f69c113de01908c88ab9dcdba6f69a0a2f64b10a4b5d5d319a7e76de17be2d72 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-conversion/CONTROL b/vcpkg/ports/boost-conversion/CONTROL new file mode 100644 index 0000000..e12a897 --- /dev/null +++ b/vcpkg/ports/boost-conversion/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-conversion +Version: 1.73.0 +Build-Depends: boost-assert, boost-config, boost-core, boost-smart-ptr, boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/conversion +Description: Boost conversion module diff --git a/vcpkg/ports/boost-conversion/portfile.cmake b/vcpkg/ports/boost-conversion/portfile.cmake new file mode 100644 index 0000000..e60f002 --- /dev/null +++ b/vcpkg/ports/boost-conversion/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/conversion + REF boost-1.73.0 + SHA512 b452b75c97d183ce75e1923711de5338926a118ff947352753a9e2426a74bfb26b922b195d5fad52ff56ab1e1fd0e6a79bff3e672c67ab5f0bad7909369d3b38 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-convert/CONTROL b/vcpkg/ports/boost-convert/CONTROL new file mode 100644 index 0000000..7882746 --- /dev/null +++ b/vcpkg/ports/boost-convert/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-convert +Version: 1.73.0 +Build-Depends: boost-config, boost-core, boost-function-types, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-parameter, boost-range, boost-spirit, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/convert +Description: Boost convert module diff --git a/vcpkg/ports/boost-convert/portfile.cmake b/vcpkg/ports/boost-convert/portfile.cmake new file mode 100644 index 0000000..056df71 --- /dev/null +++ b/vcpkg/ports/boost-convert/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/convert + REF boost-1.73.0 + SHA512 e2237c6113fe1d81fda851ec82d16b1645f41cac32cfd09c1169517517dfa29b63e0dd85c1bd781718414ef80002c194db3fe6c71c8eda27d8161bbf8966badf + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-core/CONTROL b/vcpkg/ports/boost-core/CONTROL new file mode 100644 index 0000000..c6673ec --- /dev/null +++ b/vcpkg/ports/boost-core/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-core +Version: 1.73.0 +Build-Depends: boost-config, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/core +Description: Boost core module diff --git a/vcpkg/ports/boost-core/portfile.cmake b/vcpkg/ports/boost-core/portfile.cmake new file mode 100644 index 0000000..86aa9ee --- /dev/null +++ b/vcpkg/ports/boost-core/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/core + REF boost-1.73.0 + SHA512 a050d08d97c41c8685458eb8171ed45e36b756dfe090af66afca62a48718bde1ad7f08b579cfc3a891c499acc19897c45c2e9c7ce907af70f7894867fd8be0e7 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-coroutine/CONTROL b/vcpkg/ports/boost-coroutine/CONTROL new file mode 100644 index 0000000..95851da --- /dev/null +++ b/vcpkg/ports/boost-coroutine/CONTROL @@ -0,0 +1,8 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-coroutine +Version: 1.73.0 +Port-Version: 1 +Build-Depends: boost-assert, boost-build, boost-config, boost-context (!uwp), boost-detail, boost-exception, boost-integer, boost-modular-build-helper, boost-move, boost-range, boost-system, boost-thread, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/coroutine +Description: Boost coroutine module +Supports: !arm&!uwp diff --git a/vcpkg/ports/boost-coroutine/portfile.cmake b/vcpkg/ports/boost-coroutine/portfile.cmake new file mode 100644 index 0000000..fc1e040 --- /dev/null +++ b/vcpkg/ports/boost-coroutine/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/coroutine + REF boost-1.73.0 + SHA512 0fd70f2225b45cf85a00f51ef039fc01a10144637699b2d55dd840216d70a62979b553b0225efee50b7155cfda5dc698ad5712cbcca3a07f00aa0601d9a53eae + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-coroutine2/CONTROL b/vcpkg/ports/boost-coroutine2/CONTROL new file mode 100644 index 0000000..f5d2147 --- /dev/null +++ b/vcpkg/ports/boost-coroutine2/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-coroutine2 +Version: 1.73.0 +Build-Depends: boost-assert, boost-config, boost-context (!uwp), boost-detail, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/coroutine2 +Description: Boost coroutine2 module diff --git a/vcpkg/ports/boost-coroutine2/portfile.cmake b/vcpkg/ports/boost-coroutine2/portfile.cmake new file mode 100644 index 0000000..18bd9be --- /dev/null +++ b/vcpkg/ports/boost-coroutine2/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/coroutine2 + REF boost-1.73.0 + SHA512 dcb81cfda941b65b8b376abe74dc559f02e47bdd5f744b073b2d769e95c1ecf6ef4998cd4d5a67f45069e3b137d2384d7f45a41c453584a3b237da1ff42a8efc + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-crc/CONTROL b/vcpkg/ports/boost-crc/CONTROL new file mode 100644 index 0000000..05904cf --- /dev/null +++ b/vcpkg/ports/boost-crc/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-crc +Version: 1.73.0 +Build-Depends: boost-array, boost-compatibility, boost-config, boost-integer, boost-type-traits, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/crc +Description: Boost crc module diff --git a/vcpkg/ports/boost-crc/portfile.cmake b/vcpkg/ports/boost-crc/portfile.cmake new file mode 100644 index 0000000..7a58e1c --- /dev/null +++ b/vcpkg/ports/boost-crc/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/crc + REF boost-1.73.0 + SHA512 7928d1541d2a7e19bde89e0351d7b0bb952faa40de0a744856bfe867e8830799b5e835d3278b064356dcf3930f749880110935348aafd0a5248926991ceb4307 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-date-time/CONTROL b/vcpkg/ports/boost-date-time/CONTROL new file mode 100644 index 0000000..d7165ce --- /dev/null +++ b/vcpkg/ports/boost-date-time/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-date-time +Version: 1.73.0 +Build-Depends: boost-algorithm, boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-integer, boost-io, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-numeric-conversion, boost-range, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tokenizer, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi +Homepage: https://github.com/boostorg/date_time +Description: Boost date_time module diff --git a/vcpkg/ports/boost-date-time/portfile.cmake b/vcpkg/ports/boost-date-time/portfile.cmake new file mode 100644 index 0000000..42e6616 --- /dev/null +++ b/vcpkg/ports/boost-date-time/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/date_time + REF boost-1.73.0 + SHA512 bfc4ffe76e451249f7b4c5c80e41f6cd3900091b491c42b1c01719eb1db29e3f324fafedb5ae15bba6b171aabcddfca6fafa6c7940b672be57342b0fdf0aa995 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-detail/CONTROL b/vcpkg/ports/boost-detail/CONTROL new file mode 100644 index 0000000..9d32473 --- /dev/null +++ b/vcpkg/ports/boost-detail/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-detail +Version: 1.73.0 +Build-Depends: boost-compatibility, boost-config, boost-preprocessor, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/detail +Description: Boost detail module diff --git a/vcpkg/ports/boost-detail/portfile.cmake b/vcpkg/ports/boost-detail/portfile.cmake new file mode 100644 index 0000000..8d3953f --- /dev/null +++ b/vcpkg/ports/boost-detail/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/detail + REF boost-1.73.0 + SHA512 d6955323769c5ec647648dc13baa18880b34c2b24cd80b10b638b410fa552819902eabf72093d464ba9582f507b7a19268d15422e4401cc0e3ce3aa93129f15d + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-di/CONTROL b/vcpkg/ports/boost-di/CONTROL new file mode 100644 index 0000000..da0873a --- /dev/null +++ b/vcpkg/ports/boost-di/CONTROL @@ -0,0 +1,4 @@ +Source: boost-di +Version: 1.1.0-1 +Homepage: https://github.com/boost-experimental/di +Description: C++14 Dependency Injection Library. diff --git a/vcpkg/ports/boost-di/portfile.cmake b/vcpkg/ports/boost-di/portfile.cmake new file mode 100644 index 0000000..2027ba0 --- /dev/null +++ b/vcpkg/ports/boost-di/portfile.cmake @@ -0,0 +1,19 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boost-experimental/di + REF v1.1.0 + SHA512 69f7b0567cffea9bf983aedd7eabd1a07ae20249cd56a13de98eaa0cc835cbe3b76e790da68489536dd07edeb99271a69111f4d0c6b0aa3721ce9f5ead848fe0 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/include/boost + DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +vcpkg_download_distfile(LICENSE + URLS http://www.boost.org/LICENSE_1_0.txt + FILENAME "boost-di-copyright" + SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 +) +file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-di/copyright) diff --git a/vcpkg/ports/boost-dll/CONTROL b/vcpkg/ports/boost-dll/CONTROL new file mode 100644 index 0000000..c49ca7d --- /dev/null +++ b/vcpkg/ports/boost-dll/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-dll +Version: 1.73.0 +Build-Depends: boost-assert, boost-config, boost-core, boost-filesystem (!uwp), boost-function, boost-integer, boost-move, boost-predef, boost-smart-ptr, boost-spirit, boost-static-assert, boost-system, boost-throw-exception, boost-type-index, boost-type-traits, boost-vcpkg-helpers, boost-winapi +Homepage: https://github.com/boostorg/dll +Description: Boost dll module diff --git a/vcpkg/ports/boost-dll/portfile.cmake b/vcpkg/ports/boost-dll/portfile.cmake new file mode 100644 index 0000000..65bb701 --- /dev/null +++ b/vcpkg/ports/boost-dll/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/dll + REF boost-1.73.0 + SHA512 0775a5d9405efabafe23370df6bdca996bbfb27e492f4589e05608b603c029edf2c09bcee404a72174eca122a8229819b17fff184696f4961dc88fb0c5cfd435 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-dynamic-bitset/CONTROL b/vcpkg/ports/boost-dynamic-bitset/CONTROL new file mode 100644 index 0000000..97e0f2f --- /dev/null +++ b/vcpkg/ports/boost-dynamic-bitset/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-dynamic-bitset +Version: 1.73.0 +Build-Depends: boost-core, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/dynamic_bitset +Description: Boost dynamic_bitset module diff --git a/vcpkg/ports/boost-dynamic-bitset/portfile.cmake b/vcpkg/ports/boost-dynamic-bitset/portfile.cmake new file mode 100644 index 0000000..52c8b3e --- /dev/null +++ b/vcpkg/ports/boost-dynamic-bitset/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/dynamic_bitset + REF boost-1.73.0 + SHA512 50c7d7899f9bd9ab885477a8ad809ef0a615f74589dffe58c757fa615594393281783b9647882ea445f915493dbfd19f64b7e57c05176c903309487d0828b080 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-endian/CONTROL b/vcpkg/ports/boost-endian/CONTROL new file mode 100644 index 0000000..cfe3591 --- /dev/null +++ b/vcpkg/ports/boost-endian/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-endian +Version: 1.73.0 +Build-Depends: boost-config, boost-core, boost-integer, boost-static-assert, boost-type-traits, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/endian +Description: Boost endian module diff --git a/vcpkg/ports/boost-endian/portfile.cmake b/vcpkg/ports/boost-endian/portfile.cmake new file mode 100644 index 0000000..fb6a82e --- /dev/null +++ b/vcpkg/ports/boost-endian/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/endian + REF boost-1.73.0 + SHA512 19b1b0076e6ac6dc6123a6e19103ac2117a25f90b93beac1101eb17c51bd209c4d1eac7d00eba982550216d24a6bc32f44228948795f7d11c8650cbddbc99268 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-exception/CONTROL b/vcpkg/ports/boost-exception/CONTROL new file mode 100644 index 0000000..e4467fa --- /dev/null +++ b/vcpkg/ports/boost-exception/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-exception +Version: 1.73.0 +Build-Depends: boost-assert, boost-build, boost-config, boost-core, boost-modular-build-helper, boost-smart-ptr, boost-tuple, boost-type-traits, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/exception +Description: Boost exception module diff --git a/vcpkg/ports/boost-exception/portfile.cmake b/vcpkg/ports/boost-exception/portfile.cmake new file mode 100644 index 0000000..758e22f --- /dev/null +++ b/vcpkg/ports/boost-exception/portfile.cmake @@ -0,0 +1,17 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/exception + REF boost-1.73.0 + SHA512 6a04d8c7343775147becb40399f4ed9e717bf3c6e4f80e678f8df4c7fbfa78e53e60aa3eec32fe667816fc1d63bf3fa3ad79416ab953ebd7dc296f359691b115 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) + +set(VCPKG_LIBRARY_LINKAGE static) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) diff --git a/vcpkg/ports/boost-fiber/CONTROL b/vcpkg/ports/boost-fiber/CONTROL new file mode 100644 index 0000000..4db73b4 --- /dev/null +++ b/vcpkg/ports/boost-fiber/CONTROL @@ -0,0 +1,8 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-fiber +Version: 1.73.0 +Port-Version: 1 +Build-Depends: boost-algorithm, boost-assert, boost-build, boost-config, boost-context (!uwp), boost-core, boost-detail, boost-filesystem (!uwp), boost-format, boost-intrusive, boost-modular-build-helper, boost-predef, boost-smart-ptr, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/fiber +Description: Boost fiber module +Supports: !osx&!uwp&!arm diff --git a/vcpkg/ports/boost-fiber/portfile.cmake b/vcpkg/ports/boost-fiber/portfile.cmake new file mode 100644 index 0000000..2da9696 --- /dev/null +++ b/vcpkg/ports/boost-fiber/portfile.cmake @@ -0,0 +1,19 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/fiber + REF boost-1.73.0 + SHA512 25d129e4228f3517abc641f6858572b3196c2d79945013aa45d61a544c094e83e0103c9aba04e54fc07e53d2e29379d60a0db9a1c995dcccaef2ba2b5cda94d9 + HEAD_REF master +) + +file(READ "${SOURCE_PATH}/build/Jamfile.v2" _contents) +string(REPLACE "import ../../config/checks/config" "import config/checks/config" _contents "${_contents}") +file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-filesystem/CONTROL b/vcpkg/ports/boost-filesystem/CONTROL new file mode 100644 index 0000000..3a2b323 --- /dev/null +++ b/vcpkg/ports/boost-filesystem/CONTROL @@ -0,0 +1,8 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-filesystem +Version: 1.73.0 +Port-Version: 1 +Build-Depends: boost-assert, boost-build, boost-config, boost-core, boost-detail, boost-functional, boost-integer, boost-io, boost-iterator, boost-modular-build-helper, boost-predef, boost-smart-ptr, boost-system, boost-type-traits, boost-vcpkg-helpers, boost-winapi +Homepage: https://github.com/boostorg/filesystem +Description: Boost filesystem module +Supports: !uwp diff --git a/vcpkg/ports/boost-filesystem/portfile.cmake b/vcpkg/ports/boost-filesystem/portfile.cmake new file mode 100644 index 0000000..9ab662a --- /dev/null +++ b/vcpkg/ports/boost-filesystem/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/filesystem + REF boost-1.73.0 + SHA512 29f31b06495a240f449138e4cfc8e5f5e3af7bafdeeb1d7178625313f3c42ce7de04a7e77d6699dee0dcf1827e3bb581c9ad907fa4575d2d6dd1ef318a2e8fe4 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-flyweight/CONTROL b/vcpkg/ports/boost-flyweight/CONTROL new file mode 100644 index 0000000..c3b701d --- /dev/null +++ b/vcpkg/ports/boost-flyweight/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-flyweight +Version: 1.73.0 +Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-functional, boost-interprocess, boost-mpl, boost-multi-index, boost-parameter, boost-preprocessor, boost-serialization, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/flyweight +Description: Boost flyweight module diff --git a/vcpkg/ports/boost-flyweight/portfile.cmake b/vcpkg/ports/boost-flyweight/portfile.cmake new file mode 100644 index 0000000..c0851a0 --- /dev/null +++ b/vcpkg/ports/boost-flyweight/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/flyweight + REF boost-1.73.0 + SHA512 dc58f76e413cedda8291727abddc0fada46890b0e2399f11c875ea605a5dfd567ba5df19c4c8c54cdf220da7bdaeb4a63d3df47da2f062a3cb4a0aee87869bd0 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-foreach/CONTROL b/vcpkg/ports/boost-foreach/CONTROL new file mode 100644 index 0000000..8020ca2 --- /dev/null +++ b/vcpkg/ports/boost-foreach/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-foreach +Version: 1.73.0 +Build-Depends: boost-config, boost-core, boost-detail, boost-iterator, boost-mpl, boost-range, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/foreach +Description: Boost foreach module diff --git a/vcpkg/ports/boost-foreach/portfile.cmake b/vcpkg/ports/boost-foreach/portfile.cmake new file mode 100644 index 0000000..fe11835 --- /dev/null +++ b/vcpkg/ports/boost-foreach/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/foreach + REF boost-1.73.0 + SHA512 9a04aa1e180a17ab5d2c685f282e79fce2464c9267aea2d43595f82b98b19e6f269ec9744192b386097155ca9b0ea75511d9f718b406178b5f0c2af46b1422d4 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-format/CONTROL b/vcpkg/ports/boost-format/CONTROL new file mode 100644 index 0000000..e41e308 --- /dev/null +++ b/vcpkg/ports/boost-format/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-format +Version: 1.73.0 +Build-Depends: boost-assert, boost-compatibility, boost-config, boost-core, boost-detail, boost-optional, boost-smart-ptr, boost-throw-exception, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/format +Description: Boost format module diff --git a/vcpkg/ports/boost-format/portfile.cmake b/vcpkg/ports/boost-format/portfile.cmake new file mode 100644 index 0000000..6ec97f8 --- /dev/null +++ b/vcpkg/ports/boost-format/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/format + REF boost-1.73.0 + SHA512 fa6ba7ae064d7a9d8116554729ba75cc9c52bb51e6edf76df350e47854afc2d815f0e7a12b9f9240c5b2b51e055caa2510a917b637448d8f0801b32ed0aa7b42 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-function-types/CONTROL b/vcpkg/ports/boost-function-types/CONTROL new file mode 100644 index 0000000..f0e1a8c --- /dev/null +++ b/vcpkg/ports/boost-function-types/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-function-types +Version: 1.73.0 +Build-Depends: boost-config, boost-core, boost-detail, boost-mpl, boost-preprocessor, boost-type-traits, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/function_types +Description: Boost function_types module diff --git a/vcpkg/ports/boost-function-types/portfile.cmake b/vcpkg/ports/boost-function-types/portfile.cmake new file mode 100644 index 0000000..964993a --- /dev/null +++ b/vcpkg/ports/boost-function-types/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/function_types + REF boost-1.73.0 + SHA512 b4cd2febca5286e293fc4c8c9c234190b675a173b29eb200a745f358120b9fd26681f9f74a84a5b910a66f82834c078f718e242aa4b08753a701b2d622e47078 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-function/CONTROL b/vcpkg/ports/boost-function/CONTROL new file mode 100644 index 0000000..b55155b --- /dev/null +++ b/vcpkg/ports/boost-function/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-function +Version: 1.73.0 +Build-Depends: boost-assert, boost-bind, boost-config, boost-core, boost-integer, boost-preprocessor, boost-throw-exception, boost-type-index, boost-typeof, boost-type-traits, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/function +Description: Boost function module diff --git a/vcpkg/ports/boost-function/portfile.cmake b/vcpkg/ports/boost-function/portfile.cmake new file mode 100644 index 0000000..e70deff --- /dev/null +++ b/vcpkg/ports/boost-function/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/function + REF boost-1.73.0 + SHA512 5445ee22193ba369394f9a66dd47c13d89c080c7286ce12fea15f1e09b77dc036f7e037fba971dcce46a24f48824031a93d9d91ab6c4ddf841c4105c168652ac + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-functional/CONTROL b/vcpkg/ports/boost-functional/CONTROL new file mode 100644 index 0000000..0e1c102 --- /dev/null +++ b/vcpkg/ports/boost-functional/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-functional +Version: 1.73.0 +Build-Depends: boost-config, boost-core, boost-mpl, boost-preprocessor, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/functional +Description: Boost functional module diff --git a/vcpkg/ports/boost-functional/portfile.cmake b/vcpkg/ports/boost-functional/portfile.cmake new file mode 100644 index 0000000..e2ddaf9 --- /dev/null +++ b/vcpkg/ports/boost-functional/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/functional + REF boost-1.73.0 + SHA512 0f5655074e0a8fb93c52c9fa76d3ae4eb2071c9124112538bd94cce1af64059575c322f60cc92fa117b1ae17816578e7d0300d45e2000adc5ac090c44e8c2a28 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-fusion/CONTROL b/vcpkg/ports/boost-fusion/CONTROL new file mode 100644 index 0000000..1ad59f8 --- /dev/null +++ b/vcpkg/ports/boost-fusion/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-fusion +Version: 1.73.0 +Build-Depends: boost-config, boost-container-hash, boost-core, boost-detail, boost-function-types, boost-mpl, boost-preprocessor, boost-static-assert, boost-tuple, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/fusion +Description: Boost fusion module diff --git a/vcpkg/ports/boost-fusion/portfile.cmake b/vcpkg/ports/boost-fusion/portfile.cmake new file mode 100644 index 0000000..9bc665d --- /dev/null +++ b/vcpkg/ports/boost-fusion/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/fusion + REF boost-1.73.0 + SHA512 92df3bf4169b9aa7c1fead168285db44e5b5cfb61cfcdcaab51a1c3bc78c36697a68665ef56d17d60f31f93faa4327e384b43d28e9d5f5337ad7d65b2c42410c + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-geometry/CONTROL b/vcpkg/ports/boost-geometry/CONTROL new file mode 100644 index 0000000..e67e7d2 --- /dev/null +++ b/vcpkg/ports/boost-geometry/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-geometry +Version: 1.73.0 +Build-Depends: boost-algorithm, boost-array, boost-assert, boost-concept-check, boost-config, boost-container, boost-core, boost-detail, boost-function-types, boost-fusion, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-move, boost-mpl, boost-multiprecision, boost-numeric-conversion, boost-polygon, boost-qvm, boost-range, boost-rational, boost-serialization, boost-smart-ptr, boost-static-assert, boost-thread, boost-throw-exception, boost-tokenizer, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/geometry +Description: Boost geometry module diff --git a/vcpkg/ports/boost-geometry/portfile.cmake b/vcpkg/ports/boost-geometry/portfile.cmake new file mode 100644 index 0000000..81c5b95 --- /dev/null +++ b/vcpkg/ports/boost-geometry/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/geometry + REF boost-1.73.0 + SHA512 0063650b1a262b6d4812aa995f7670d8ea16cce862cd9d332e5b92dce8131e629732f6a78a82eaac03d8e53c55b5a8540687a3f054557059ff8434467f77022a + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-gil/CONTROL b/vcpkg/ports/boost-gil/CONTROL new file mode 100644 index 0000000..0f9972c --- /dev/null +++ b/vcpkg/ports/boost-gil/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-gil +Version: 1.73.0 +Build-Depends: boost-assert, boost-concept-check, boost-config, boost-core, boost-filesystem (!uwp), boost-integer, boost-iterator, boost-mp11, boost-numeric-conversion, boost-preprocessor, boost-utility, boost-variant, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/gil +Description: Boost gil module diff --git a/vcpkg/ports/boost-gil/portfile.cmake b/vcpkg/ports/boost-gil/portfile.cmake new file mode 100644 index 0000000..a88ba09 --- /dev/null +++ b/vcpkg/ports/boost-gil/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/gil + REF boost-1.73.0 + SHA512 d7466e3d7b3dfad9545fbb659a4a8e4d95b42f06dcdfa2cc12f3839de04b003ae7ce27abc4089ec90870a8e2b2d7d350ea4c02da3d18eda111fc4abb32165ff3 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-graph-parallel/CONTROL b/vcpkg/ports/boost-graph-parallel/CONTROL new file mode 100644 index 0000000..cd05cb7 --- /dev/null +++ b/vcpkg/ports/boost-graph-parallel/CONTROL @@ -0,0 +1,7 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-graph-parallel +Version: 1.73.0 +Port-Version: 1 +Build-Depends: boost-assert, boost-compatibility, boost-concept-check, boost-config, boost-container-hash, boost-detail, boost-dynamic-bitset, boost-filesystem (!uwp), boost-foreach, boost-function, boost-graph, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-optional, boost-property-map, boost-random, boost-serialization, boost-smart-ptr, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/graph_parallel +Description: Boost graph_parallel module diff --git a/vcpkg/ports/boost-graph-parallel/portfile.cmake b/vcpkg/ports/boost-graph-parallel/portfile.cmake new file mode 100644 index 0000000..6da99a5 --- /dev/null +++ b/vcpkg/ports/boost-graph-parallel/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/graph_parallel + REF boost-1.73.0 + SHA512 95c7bee7ad2317a0b673d1c6179c7245fcd7f3176ab781dabe53cb16c021ef44b438763b4e97fb5139329102f7f65fc9c4a08b4f4d6d5b795a7821ea96473597 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-graph/CONTROL b/vcpkg/ports/boost-graph/CONTROL new file mode 100644 index 0000000..9431f99 --- /dev/null +++ b/vcpkg/ports/boost-graph/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-graph +Version: 1.73.0 +Build-Depends: boost-algorithm, boost-any, boost-array, boost-assert, boost-bimap, boost-bind, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-container-hash, boost-conversion, boost-core, boost-detail, boost-foreach, boost-function, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-move, boost-mpl, boost-multi-index, boost-optional, boost-parameter, boost-preprocessor, boost-property-map, boost-property-tree, boost-random, boost-range, boost-regex, boost-serialization, boost-smart-ptr, boost-spirit, boost-static-assert, boost-test (!uwp), boost-throw-exception, boost-tti, boost-tuple, boost-typeof, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers, boost-xpressive +Homepage: https://github.com/boostorg/graph +Description: Boost graph module diff --git a/vcpkg/ports/boost-graph/portfile.cmake b/vcpkg/ports/boost-graph/portfile.cmake new file mode 100644 index 0000000..17d56c7 --- /dev/null +++ b/vcpkg/ports/boost-graph/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/graph + REF boost-1.73.0 + SHA512 689b9243cf9d36946f48ba0f880d7a09c6ef6a1e3a84a5fb2ea40f06c48adcd6f76aaab2c65372f24a961ca67041750ca8a16416c55b5e2a9a3a56d6537a482f + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-hana/CONTROL b/vcpkg/ports/boost-hana/CONTROL new file mode 100644 index 0000000..757901d --- /dev/null +++ b/vcpkg/ports/boost-hana/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-hana +Version: 1.73.0 +Build-Depends: boost-config, boost-core, boost-fusion, boost-mpl, boost-tuple, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/hana +Description: Boost hana module diff --git a/vcpkg/ports/boost-hana/portfile.cmake b/vcpkg/ports/boost-hana/portfile.cmake new file mode 100644 index 0000000..ddae231 --- /dev/null +++ b/vcpkg/ports/boost-hana/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/hana + REF boost-1.73.0 + SHA512 24b34acaae623d23898041cc5350f47ae801601138c2380f8e36ca7f7527a83ffa7f62e5082ee1c60e461fd804d3cb7af5465a354d7aba393ad0be74cec4abf0 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-heap/CONTROL b/vcpkg/ports/boost-heap/CONTROL new file mode 100644 index 0000000..743b928 --- /dev/null +++ b/vcpkg/ports/boost-heap/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-heap +Version: 1.73.0 +Build-Depends: boost-array, boost-assert, boost-bind, boost-concept-check, boost-integer, boost-intrusive, boost-iterator, boost-parameter, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/heap +Description: Boost heap module diff --git a/vcpkg/ports/boost-heap/portfile.cmake b/vcpkg/ports/boost-heap/portfile.cmake new file mode 100644 index 0000000..d9c6256 --- /dev/null +++ b/vcpkg/ports/boost-heap/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/heap + REF boost-1.73.0 + SHA512 5607f3b9601f08e52fd03d04fe7b78604af96641d48d48ddd9b78443065f700f3317efcb0c0ff600e13a08ea6292938993f71964c2c6ec87589c1f27bac5c0d7 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-histogram/CONTROL b/vcpkg/ports/boost-histogram/CONTROL new file mode 100644 index 0000000..047b90e --- /dev/null +++ b/vcpkg/ports/boost-histogram/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-histogram +Version: 1.73.0 +Build-Depends: boost-assert, boost-config, boost-core, boost-mp11, boost-serialization, boost-throw-exception, boost-variant2, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/histogram +Description: Boost histogram module diff --git a/vcpkg/ports/boost-histogram/portfile.cmake b/vcpkg/ports/boost-histogram/portfile.cmake new file mode 100644 index 0000000..07961a1 --- /dev/null +++ b/vcpkg/ports/boost-histogram/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/histogram + REF boost-1.73.0 + SHA512 b070f0fcbf5e285fda47861db903bc11f60122415dfb212c81b8eaafcf346364dfaf201ab2c759fb5547a5c34825ec528c8b19b88a7840fe51cc28b10f8f1d92 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-hof/CONTROL b/vcpkg/ports/boost-hof/CONTROL new file mode 100644 index 0000000..dd09c38 --- /dev/null +++ b/vcpkg/ports/boost-hof/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-hof +Version: 1.73.0 +Build-Depends: boost-vcpkg-helpers +Homepage: https://github.com/boostorg/hof +Description: Boost hof module diff --git a/vcpkg/ports/boost-hof/portfile.cmake b/vcpkg/ports/boost-hof/portfile.cmake new file mode 100644 index 0000000..0734676 --- /dev/null +++ b/vcpkg/ports/boost-hof/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/hof + REF boost-1.73.0 + SHA512 20284cf8f887a28842244955bf2d8cc4fa4b519f27ef7bed93308c5bddd8a3f19a58627cdc0d4f6e6c7798be64491604f961bef05329dedd79a689316a2e93e2 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-icl/CONTROL b/vcpkg/ports/boost-icl/CONTROL new file mode 100644 index 0000000..29947c3 --- /dev/null +++ b/vcpkg/ports/boost-icl/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-icl +Version: 1.73.0 +Build-Depends: boost-assert, boost-concept-check, boost-config, boost-container, boost-date-time, boost-detail, boost-iterator, boost-move, boost-mpl, boost-range, boost-rational, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/icl +Description: Boost icl module diff --git a/vcpkg/ports/boost-icl/portfile.cmake b/vcpkg/ports/boost-icl/portfile.cmake new file mode 100644 index 0000000..58ba340 --- /dev/null +++ b/vcpkg/ports/boost-icl/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/icl + REF boost-1.73.0 + SHA512 806caed377cf0bb70fd65fe1d9524f5cac834094cbfbec8f874ec1f742887837033c53ddd4036bd733d5758e67ffc0a9f5d389dfc0fa3dc06fda6ab82f21e750 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-integer/CONTROL b/vcpkg/ports/boost-integer/CONTROL new file mode 100644 index 0000000..bb7400c --- /dev/null +++ b/vcpkg/ports/boost-integer/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-integer +Version: 1.73.0 +Build-Depends: boost-assert, boost-compatibility, boost-config, boost-core, boost-detail, boost-static-assert, boost-throw-exception, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/integer +Description: Boost integer module diff --git a/vcpkg/ports/boost-integer/portfile.cmake b/vcpkg/ports/boost-integer/portfile.cmake new file mode 100644 index 0000000..276c6c0 --- /dev/null +++ b/vcpkg/ports/boost-integer/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/integer + REF boost-1.73.0 + SHA512 053d900e23ab58496cbfa3d05dd41f46f3ba3ab0e50719166c2cb239cbdfc0ad6966f67c0e8b688cffaec29b674451d1f99f211107a8cab92cb10d8ac99c478f + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-interprocess/CONTROL b/vcpkg/ports/boost-interprocess/CONTROL new file mode 100644 index 0000000..313b7dc --- /dev/null +++ b/vcpkg/ports/boost-interprocess/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-interprocess +Version: 1.73.0 +Build-Depends: boost-assert, boost-compatibility, boost-config, boost-container, boost-core, boost-date-time, boost-detail, boost-integer, boost-intrusive, boost-move, boost-static-assert, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/interprocess +Description: Boost interprocess module diff --git a/vcpkg/ports/boost-interprocess/portfile.cmake b/vcpkg/ports/boost-interprocess/portfile.cmake new file mode 100644 index 0000000..554fe25 --- /dev/null +++ b/vcpkg/ports/boost-interprocess/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/interprocess + REF boost-1.73.0 + SHA512 7f95cea60be57e9019028a994aae785313b9cc480ab89eda68d7312ec7bef18c06597fa1f24bb007a40cc3d9f091f5cf17a0c9144b37f3a9d7d15bb78e36c15f + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-interval/CONTROL b/vcpkg/ports/boost-interval/CONTROL new file mode 100644 index 0000000..6379c23 --- /dev/null +++ b/vcpkg/ports/boost-interval/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-interval +Version: 1.73.0 +Build-Depends: boost-compatibility, boost-config, boost-logic, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/interval +Description: Boost interval module diff --git a/vcpkg/ports/boost-interval/portfile.cmake b/vcpkg/ports/boost-interval/portfile.cmake new file mode 100644 index 0000000..5f873f5 --- /dev/null +++ b/vcpkg/ports/boost-interval/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/interval + REF boost-1.73.0 + SHA512 f9bf091cbd81c6a3d30873207c2596b960487df6cdd9048535d37b9bbbaf60799298fc49feaf8553f04b7c8d19dd9cdb537df2f2300accb85862451d60e492da + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-intrusive/CONTROL b/vcpkg/ports/boost-intrusive/CONTROL new file mode 100644 index 0000000..6148aa6 --- /dev/null +++ b/vcpkg/ports/boost-intrusive/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-intrusive +Version: 1.73.0 +Build-Depends: boost-assert, boost-config, boost-container-hash, boost-core, boost-integer, boost-move, boost-static-assert, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/intrusive +Description: Boost intrusive module diff --git a/vcpkg/ports/boost-intrusive/portfile.cmake b/vcpkg/ports/boost-intrusive/portfile.cmake new file mode 100644 index 0000000..aa53f02 --- /dev/null +++ b/vcpkg/ports/boost-intrusive/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/intrusive + REF boost-1.73.0 + SHA512 cbcb7238aee3609b2838d427fe2436915bc39f363320099592908765a1e143469e02383e0fb51c1f05f7f935fadd3738130c362bb6ba1da74a74f74daaee4d02 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-io/CONTROL b/vcpkg/ports/boost-io/CONTROL new file mode 100644 index 0000000..246a29d --- /dev/null +++ b/vcpkg/ports/boost-io/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-io +Version: 1.73.0 +Build-Depends: boost-config, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/io +Description: Boost io module diff --git a/vcpkg/ports/boost-io/portfile.cmake b/vcpkg/ports/boost-io/portfile.cmake new file mode 100644 index 0000000..f293e66 --- /dev/null +++ b/vcpkg/ports/boost-io/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/io + REF boost-1.73.0 + SHA512 4217a043ef961e31c329b85ccf6c8fd48dfa44692d8f4c4b76e380580cc977d65b4f94a3efaaf880078c98d77056d76a8cd63f35fd95e6d9eb75865694c50740 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-iostreams/CMakeLists.txt b/vcpkg/ports/boost-iostreams/CMakeLists.txt new file mode 100644 index 0000000..582377d --- /dev/null +++ b/vcpkg/ports/boost-iostreams/CMakeLists.txt @@ -0,0 +1,40 @@ +cmake_minimum_required(VERSION 3.5) +project(boost-iostreams) + +if(BUILD_SHARED_LIBS) + add_definitions(-DBOOST_IOSTREAMS_DYN_LINK=1) +endif() +add_definitions( + -DBOOST_ALL_NO_LIB=1 + -DBOOST_IOSTREAMS_USE_DEPRECATED +) +include_directories(include) +file(GLOB SOURCES src/*.cpp) +add_library(boost_iostreams ${SOURCES}) + +if(MSVC) + set_property(TARGET boost_iostreams PROPERTY OUTPUT_NAME_RELEASE boost_iostreams-vc140-mt) + set_property(TARGET boost_iostreams PROPERTY OUTPUT_NAME_DEBUG boost_iostreams-vc140-mt-gd) + + set_property(TARGET boost_iostreams PROPERTY RUNTIME_OUTPUT_NAME_RELEASE boost_iostreams) + set_property(TARGET boost_iostreams PROPERTY RUNTIME_OUTPUT_NAME_DEBUG boost_iostreamsd) +endif() + +find_package(ZLIB REQUIRED) +target_link_libraries(boost_iostreams PRIVATE ZLIB::ZLIB) + +find_package(BZip2 REQUIRED) +target_link_libraries(boost_iostreams PRIVATE BZip2::BZip2) + +find_package(LibLZMA REQUIRED) +target_include_directories(boost_iostreams PRIVATE ${LIBLZMA_INCLUDE_DIRS}) +target_link_libraries(boost_iostreams PRIVATE ${LIBLZMA_LIBRARIES}) + +find_library(ZSTD_LIBRARY NAMES zstdd zstd_staticd zstd zstd_static NAMES_PER_DIR) +target_link_libraries(boost_iostreams PRIVATE ${ZSTD_LIBRARY}) + +install(TARGETS boost_iostreams + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) diff --git a/vcpkg/ports/boost-iostreams/CONTROL b/vcpkg/ports/boost-iostreams/CONTROL new file mode 100644 index 0000000..7f521ec --- /dev/null +++ b/vcpkg/ports/boost-iostreams/CONTROL @@ -0,0 +1,8 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-iostreams +Version: 1.73.0 +Port-Version: 1 +Build-Depends: boost-assert, boost-bind, boost-build, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-iterator, boost-modular-build-helper, boost-mpl, boost-numeric-conversion, boost-preprocessor, boost-range, boost-regex, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, bzip2, liblzma, zlib, zstd +Homepage: https://github.com/boostorg/iostreams +Description: Boost iostreams module +Supports: !uwp diff --git a/vcpkg/ports/boost-iostreams/Removeseekpos.patch b/vcpkg/ports/boost-iostreams/Removeseekpos.patch new file mode 100644 index 0000000..c2a5d47 --- /dev/null +++ b/vcpkg/ports/boost-iostreams/Removeseekpos.patch @@ -0,0 +1,13 @@ +diff --git a/include/boost/iostreams/positioning.hpp b/include/boost/iostreams/positioning.hpp +index 12f2afc..709da7d 100644 +--- a/include/boost/iostreams/positioning.hpp ++++ b/include/boost/iostreams/positioning.hpp +@@ -93,7 +93,7 @@ inline stream_offset fpos_t_to_offset(std::fpos_t pos) + inline std::fpos_t streampos_to_fpos_t(std::streampos pos) + { + # if defined (_CPPLIB_VER) || defined(__IBMCPP__) +- return pos.seekpos(); ++ return pos; + # else + return pos.get_fpos_t(); + # endif diff --git a/vcpkg/ports/boost-iostreams/portfile.cmake b/vcpkg/ports/boost-iostreams/portfile.cmake new file mode 100644 index 0000000..b82b5fc --- /dev/null +++ b/vcpkg/ports/boost-iostreams/portfile.cmake @@ -0,0 +1,15 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/iostreams + REF boost-1.73.0 + SHA512 0bfafdf0bd202a958b353c2b575957061427cd0e6c66ab7e826c2a7958ed57d89dc8a49b0e01e63689703404f335f964f390241fdc1982f374f10c4583fd89a2 + HEAD_REF master + PATCHES Removeseekpos.patch +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-iterator/CONTROL b/vcpkg/ports/boost-iterator/CONTROL new file mode 100644 index 0000000..2bfefd0 --- /dev/null +++ b/vcpkg/ports/boost-iterator/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-iterator +Version: 1.73.0 +Build-Depends: boost-assert, boost-compatibility, boost-concept-check, boost-config, boost-conversion, boost-core, boost-detail, boost-function-types, boost-fusion, boost-mpl, boost-optional, boost-smart-ptr, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/iterator +Description: Boost iterator module diff --git a/vcpkg/ports/boost-iterator/portfile.cmake b/vcpkg/ports/boost-iterator/portfile.cmake new file mode 100644 index 0000000..32cef07 --- /dev/null +++ b/vcpkg/ports/boost-iterator/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/iterator + REF boost-1.73.0 + SHA512 1f778d7bf3938756f2e31b062dd1dc4053714de2efc341f076c387ce60c2d03f76a19af38bc035fb41cdea93bc9355e3a4dc052b87004214bc3ac4d777125da1 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-lambda/CONTROL b/vcpkg/ports/boost-lambda/CONTROL new file mode 100644 index 0000000..7401048 --- /dev/null +++ b/vcpkg/ports/boost-lambda/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-lambda +Version: 1.73.0 +Build-Depends: boost-bind, boost-config, boost-detail, boost-mpl, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/lambda +Description: Boost lambda module diff --git a/vcpkg/ports/boost-lambda/portfile.cmake b/vcpkg/ports/boost-lambda/portfile.cmake new file mode 100644 index 0000000..7a5329c --- /dev/null +++ b/vcpkg/ports/boost-lambda/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/lambda + REF boost-1.73.0 + SHA512 db3ccbdcd8763110c52be6c83ed80dd13dfe2fe6b24c615e334e0f9b2b282b6cb507794911922b275802530042e7a5ff1b536ae98c4454051c362682e3a8e229 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-lexical-cast/CONTROL b/vcpkg/ports/boost-lexical-cast/CONTROL new file mode 100644 index 0000000..7dba808 --- /dev/null +++ b/vcpkg/ports/boost-lexical-cast/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-lexical-cast +Version: 1.73.0 +Build-Depends: boost-array, boost-assert, boost-compatibility, boost-config, boost-container, boost-core, boost-detail, boost-integer, boost-numeric-conversion, boost-range, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/lexical_cast +Description: Boost lexical_cast module diff --git a/vcpkg/ports/boost-lexical-cast/portfile.cmake b/vcpkg/ports/boost-lexical-cast/portfile.cmake new file mode 100644 index 0000000..9aa4e99 --- /dev/null +++ b/vcpkg/ports/boost-lexical-cast/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/lexical_cast + REF boost-1.73.0 + SHA512 ea6e8f58f38b8e45171f85b7983257ae920bdc2d77a9e9f5c12fcc1e899ecefcaf98278183233262540704cdb4f036b1d4f1cff73c40c38e16a8498117e97b31 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-local-function/CONTROL b/vcpkg/ports/boost-local-function/CONTROL new file mode 100644 index 0000000..419c59d --- /dev/null +++ b/vcpkg/ports/boost-local-function/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-local-function +Version: 1.73.0 +Build-Depends: boost-config, boost-mpl, boost-preprocessor, boost-scope-exit, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/local_function +Description: Boost local_function module diff --git a/vcpkg/ports/boost-local-function/portfile.cmake b/vcpkg/ports/boost-local-function/portfile.cmake new file mode 100644 index 0000000..42ed612 --- /dev/null +++ b/vcpkg/ports/boost-local-function/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/local_function + REF boost-1.73.0 + SHA512 1d86cd356f91b295b011e15fc88118b452556ee27f33f16deb8b636c535ef1b4024533f5430ac43dab44ca6322a29accfe1d875ac4443af26832bab297dc0024 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-locale/0001-Fix-boost-ICU-support.patch b/vcpkg/ports/boost-locale/0001-Fix-boost-ICU-support.patch new file mode 100644 index 0000000..cd02f74 --- /dev/null +++ b/vcpkg/ports/boost-locale/0001-Fix-boost-ICU-support.patch @@ -0,0 +1,100 @@ +--- + libs/locale/build/Jamfile.v2 | 63 ++++++-------------------------------- + libs/locale/build/has_icu_test.cpp | 4 --- + libs/regex/build/Jamfile.v2 | 47 +++++++--------------------- + 3 files changed, 20 insertions(+), 94 deletions(-) + +diff --git a/libs/locale/build/Jamfile.v2 b/libs/locale/build/Jamfile.v2 +index 578e722..5f25917 100644 +--- a/build/Jamfile.v2 ++++ b/build/Jamfile.v2 +@@ -70,62 +70,17 @@ if $(ICU_LINK) + } + else + { +- searched-lib icuuc : : icuuc +- $(ICU_PATH)/lib +- shared +- shared ; +- +- searched-lib icuuc : : msvc +- debug +- icuucd +- $(ICU_PATH)/lib +- shared +- shared ; +- +- searched-lib icuuc : : this_is_an_invalid_library_name ; +- +- searched-lib icudt : : $(ICU_PATH)/lib +- icudata +- shared +- shared ; +- +- searched-lib icudt : : $(ICU_PATH)/lib +- icudt +- msvc +- shared +- shared ; +- +- searched-lib icudt : : this_is_an_invalid_library_name ; +- +- searched-lib icuin : : $(ICU_PATH)/lib +- icui18n +- shared +- shared ; +- +- searched-lib icuin : : msvc +- debug +- icuind +- $(ICU_PATH)/lib +- shared +- shared ; +- +- searched-lib icuin : : msvc +- release +- icuin +- $(ICU_PATH)/lib +- shared +- shared ; +- +- searched-lib icuin : : this_is_an_invalid_library_name ; +- +- explicit icuuc icudt icuin ; ++ alias icuuc : /user-config//icuuc ; ++ alias icuin : /user-config//icuin ; ++ alias icudt : /user-config//icudt ; ++ ++ explicit icuuc icuin icudt ; + + ICU_OPTS = $(ICU_PATH)/include +- icuuc/shared/shared +- icudt/shared/shared +- icuin/shared/shared +- $(ICU_PATH)/bin +- shared ; ++ icuuc ++ icuin ++ icudt ++ $(ICU_PATH)/bin ; + + + +diff --git a/libs/locale/build/has_icu_test.cpp b/libs/locale/build/has_icu_test.cpp +index 9419b30..ed9be05 100644 +--- a/build/has_icu_test.cpp ++++ b/build/has_icu_test.cpp +@@ -15,10 +15,6 @@ + #include + #include + +-#if defined(_MSC_VER) && !defined(_DLL) +-#error "Mixing ICU with a static runtime doesn't work" +-#endif +- + int main() + { + icu::Locale loc; +-- +2.12.2.windows.2 + diff --git a/vcpkg/ports/boost-locale/CONTROL b/vcpkg/ports/boost-locale/CONTROL new file mode 100644 index 0000000..5260cea --- /dev/null +++ b/vcpkg/ports/boost-locale/CONTROL @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-locale +Version: 1.73.0 +Port-Version: 1 +Build-Depends: boost-assert, boost-build, boost-config, boost-function, boost-integer, boost-iterator, boost-modular-build-helper, boost-smart-ptr, boost-static-assert, boost-system, boost-thread, boost-type-traits, boost-unordered, boost-vcpkg-helpers, libiconv (!uwp&!windows) +Homepage: https://github.com/boostorg/locale +Description: Boost locale module +Supports: !uwp + +Feature: icu +Build-Depends: icu +Description: ICU backend for Boost.Locale diff --git a/vcpkg/ports/boost-locale/b2-options.cmake b/vcpkg/ports/boost-locale/b2-options.cmake new file mode 100644 index 0000000..0a7dedd --- /dev/null +++ b/vcpkg/ports/boost-locale/b2-options.cmake @@ -0,0 +1,25 @@ +if(VCPKG_TARGET_IS_WINDOWS) + if("icu" IN_LIST FEATURES) + set(BOOST_LOCALE_ICU on) + else() + set(BOOST_LOCALE_ICU off) + endif() + + list(APPEND B2_OPTIONS + boost.locale.iconv=off + boost.locale.posix=off + /boost/locale//boost_locale + boost.locale.icu=${BOOST_LOCALE_ICU} + ) +else() + find_library(LIBICONV_LIBRARY iconv) + get_filename_component(LIBICONV_DIR "${LIBICONV_LIBRARY}" DIRECTORY) + + list(APPEND B2_OPTIONS + boost.locale.iconv=on + boost.locale.posix=on + /boost/locale//boost_locale + boost.locale.icu=off + -sICONV_PATH=${LIBICONV_DIR} + ) +endif() \ No newline at end of file diff --git a/vcpkg/ports/boost-locale/portfile.cmake b/vcpkg/ports/boost-locale/portfile.cmake new file mode 100644 index 0000000..65df1f7 --- /dev/null +++ b/vcpkg/ports/boost-locale/portfile.cmake @@ -0,0 +1,18 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/locale + REF boost-1.73.0 + SHA512 0af88d8db7b18395a2b3668bcb51a5f32cd0de9acb9633572c2fb7edcdf06f354802392606394cf75ec4fd4d9cfe5c96351db766e55f8ef30f746b0a7017ad1f + HEAD_REF master + PATCHES 0001-Fix-boost-ICU-support.patch +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build( + SOURCE_PATH ${SOURCE_PATH} + BOOST_CMAKE_FRAGMENT "${CMAKE_CURRENT_LIST_DIR}/b2-options.cmake" +) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-lockfree/CONTROL b/vcpkg/ports/boost-lockfree/CONTROL new file mode 100644 index 0000000..1902d7f --- /dev/null +++ b/vcpkg/ports/boost-lockfree/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-lockfree +Version: 1.73.0 +Build-Depends: boost-align, boost-array, boost-assert, boost-atomic, boost-config, boost-core, boost-integer, boost-mpl, boost-parameter, boost-predef, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/lockfree +Description: Boost lockfree module diff --git a/vcpkg/ports/boost-lockfree/portfile.cmake b/vcpkg/ports/boost-lockfree/portfile.cmake new file mode 100644 index 0000000..d772790 --- /dev/null +++ b/vcpkg/ports/boost-lockfree/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/lockfree + REF boost-1.73.0 + SHA512 3e32b3b56d505a1afa88abcca0cd17b7be5d63e9eb8953dbd26e503d20c6b4930bfb22392a6523add733a6ebabc3932b24344d700444c58bc625e5ee614759f8 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-log/CONTROL b/vcpkg/ports/boost-log/CONTROL new file mode 100644 index 0000000..33fc046 --- /dev/null +++ b/vcpkg/ports/boost-log/CONTROL @@ -0,0 +1,8 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-log +Version: 1.73.0 +Port-Version: 1 +Build-Depends: boost-align, boost-array, boost-asio, boost-assert, boost-atomic, boost-bind, boost-build, boost-compatibility, boost-config, boost-container, boost-core, boost-date-time, boost-detail, boost-exception, boost-filesystem (!uwp), boost-function-types, boost-fusion, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iterator, boost-lexical-cast, boost-locale (!uwp), boost-math, boost-modular-build-helper, boost-move, boost-mpl, boost-optional, boost-parameter, boost-phoenix, boost-predef, boost-preprocessor, boost-property-tree, boost-proto, boost-random, boost-range, boost-regex, boost-smart-ptr, boost-spirit, boost-static-assert, boost-system, boost-thread, boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi, boost-xpressive +Homepage: https://github.com/boostorg/log +Description: Boost log module +Supports: !uwp diff --git a/vcpkg/ports/boost-log/portfile.cmake b/vcpkg/ports/boost-log/portfile.cmake new file mode 100644 index 0000000..e4eb85f --- /dev/null +++ b/vcpkg/ports/boost-log/portfile.cmake @@ -0,0 +1,27 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/log + REF boost-1.73.0 + SHA512 150013753d5060618c431ed9a819e3ec666bdba42cf3d463335ca49d66b8d6e800d5419332011f5ce05f19bc9c67a1cebc547279bf2931258ff7753a67796f2f + HEAD_REF master +) + +file(READ "${SOURCE_PATH}/build/Jamfile.v2" _contents) +string(REPLACE "import ../../config/checks/config" "import config/checks/config" _contents "${_contents}") +string(REPLACE " @select-arch-specific-sources" "#@select-arch-specific-sources" _contents "${_contents}") +file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") + +file(READ ${SOURCE_PATH}/build/log-architecture.jam _contents) +string(REPLACE + "\nproject.load [ path.join [ path.make $(here:D) ] ../../config/checks/architecture ] ;" + "\nproject.load [ path.join [ path.make $(here:D) ] config/checks/architecture ] ;" + _contents "${_contents}") +file(WRITE ${SOURCE_PATH}/build/log-architecture.jam "${_contents}") + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-logic/CONTROL b/vcpkg/ports/boost-logic/CONTROL new file mode 100644 index 0000000..78b62f1 --- /dev/null +++ b/vcpkg/ports/boost-logic/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-logic +Version: 1.73.0 +Build-Depends: boost-config, boost-core, boost-detail, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/logic +Description: Boost logic module diff --git a/vcpkg/ports/boost-logic/portfile.cmake b/vcpkg/ports/boost-logic/portfile.cmake new file mode 100644 index 0000000..cff0379 --- /dev/null +++ b/vcpkg/ports/boost-logic/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/logic + REF boost-1.73.0 + SHA512 2ef43bbd47f105d1eb6542838777fd66925d82a98475da2b10c967779cc621cbe75f1432cab55fd713e99b7c01ce3dfe483b97f1b91b016e4d491a3f094ff6ae + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-math/CONTROL b/vcpkg/ports/boost-math/CONTROL new file mode 100644 index 0000000..b36f020 --- /dev/null +++ b/vcpkg/ports/boost-math/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-math +Version: 1.73.0 +Build-Depends: boost-array, boost-assert, boost-atomic, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-core, boost-detail, boost-fusion, boost-integer, boost-lambda, boost-lexical-cast, boost-modular-build-helper, boost-mp11, boost-mpl, boost-predef, boost-range, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/math +Description: Boost math module diff --git a/vcpkg/ports/boost-math/portfile.cmake b/vcpkg/ports/boost-math/portfile.cmake new file mode 100644 index 0000000..5d76c00 --- /dev/null +++ b/vcpkg/ports/boost-math/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/math + REF boost-1.73.0 + SHA512 9f264988efaa55865fed57e36243212fc0dbda42d00b42d712fc2eaa9581f9fee5af2f3c3ae645ff03fffcb626dbf96ea53c9dbffead755e758b90eb292420b3 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-metaparse/CONTROL b/vcpkg/ports/boost-metaparse/CONTROL new file mode 100644 index 0000000..f926b8e --- /dev/null +++ b/vcpkg/ports/boost-metaparse/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-metaparse +Version: 1.73.0 +Build-Depends: boost-config, boost-mpl, boost-predef, boost-preprocessor, boost-static-assert, boost-type-traits, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/metaparse +Description: Boost metaparse module diff --git a/vcpkg/ports/boost-metaparse/portfile.cmake b/vcpkg/ports/boost-metaparse/portfile.cmake new file mode 100644 index 0000000..4005234 --- /dev/null +++ b/vcpkg/ports/boost-metaparse/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/metaparse + REF boost-1.73.0 + SHA512 1f6ffc3bee835fa3b52309647d1253cb8a75cc6bbbe1a832928b0571d88dede0f28bd9364e84415d0a9146698a07cac41c51b69f449d56e15a2e6732a0411258 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-modular-build-helper/CMakeLists.txt b/vcpkg/ports/boost-modular-build-helper/CMakeLists.txt new file mode 100644 index 0000000..852430d --- /dev/null +++ b/vcpkg/ports/boost-modular-build-helper/CMakeLists.txt @@ -0,0 +1,183 @@ +cmake_minimum_required(VERSION 3.9) +project(boost CXX) + +find_path(ZLIB_INCLUDE zlib.h) +find_path(BZIP2_INCLUDE bzlib.h) +find_path(ICU_PATH include/unicode/utf.h) + +set(VCPKG_PLATFORM_TOOLSET external) + +set(B2_OPTIONS) + +if(DEFINED BOOST_CMAKE_FRAGMENT) + message(STATUS "Including ${BOOST_CMAKE_FRAGMENT}") + include(${BOOST_CMAKE_FRAGMENT}) +endif() + +# Add build type specific options +if(BUILD_SHARED_LIBS) + list(APPEND B2_OPTIONS runtime-link=shared) + set(LIB_RUNTIME_LINK "shared") +else() + list(APPEND B2_OPTIONS runtime-link=static) + set(LIB_RUNTIME_LINK "static") +endif() + +if(BUILD_SHARED_LIBS) + list(APPEND B2_OPTIONS link=shared) +else() + list(APPEND B2_OPTIONS link=static) +endif() + +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + list(APPEND B2_OPTIONS address-model=64) +else() + list(APPEND B2_OPTIONS address-model=32) +endif() + +if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "s390x") + list(APPEND B2_OPTIONS architecture=s390x) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + list(APPEND B2_OPTIONS architecture=arm) +else() + list(APPEND B2_OPTIONS architecture=x86) +endif() + +if(APPLE) + list(APPEND B2_OPTIONS target-os=darwin toolset=clang) +elseif(WIN32) + list(APPEND B2_OPTIONS target-os=windows toolset=gcc) +else() + list(APPEND B2_OPTIONS target-os=linux toolset=gcc) +endif() + +if(WIN32) + list(APPEND B2_OPTIONS threadapi=win32) +else() + list(APPEND B2_OPTIONS threadapi=pthread) +endif() + +# Properly handle compiler and linker flags passed by VCPKG +if(CMAKE_BUILD_TYPE STREQUAL "Release") + set(CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}") + set(CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}") + if(BUILD_SHARED_LIBS) + set(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") + else() + set(LDFLAGS "${CMAKE_STATIC_LINKER_FLAGS} ${CMAKE_STATIC_LINKER_FLAGS_RELEASE}") + endif() +elseif(CMAKE_BUILD_TYPE STREQUAL "Debug") + set(CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}") + set(CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_DEBUG}") + if(BUILD_SHARED_LIBS) + set(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS_DEBUG}") + else() + set(LDFLAGS "${CMAKE_STATIC_LINKER_FLAGS} ${CMAKE_STATIC_LINKER_FLAGS_DEBUG}") + endif() +endif() + +string(STRIP "${CXXFLAGS}" CXXFLAGS) +string(STRIP "${CFLAGS}" CFLAGS) +string(STRIP "${LDFLAGS}" LDFLAGS) + +if(NOT CXXFLAGS STREQUAL "") + string(REPLACE " " " " CXXFLAGS "${CXXFLAGS}") +endif() +if(NOT CFLAGS STREQUAL "") + string(REPLACE " " " " CFLAGS "${CFLAGS}") +endif() +if(NOT LDLAGS STREQUAL "") + string(REPLACE " " " " LDFLAGS "${LDFLAGS}") +endif() + +#set(CXXFLAGS "${CXXFLAGS} -Wno-error=unused-command-line-argument") +if(CMAKE_CXX_COMPILER_TARGET AND CMAKE_CXX_COMPILE_OPTIONS_TARGET) + if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + set(CXXFLAGS "${CXXFLAGS} ${CMAKE_CXX_COMPILE_OPTIONS_TARGET}${CMAKE_CXX_COMPILER_TARGET}") + else() + set(CXXFLAGS "${CXXFLAGS} ${CMAKE_CXX_COMPILE_OPTIONS_TARGET} ${CMAKE_CXX_COMPILER_TARGET}") + endif() +endif() +if(CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN) + if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + set(CXXFLAGS "${CXXFLAGS} ${CMAKE_CXX_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN}${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}") + else() + set(CXXFLAGS "${CXXFLAGS} ${CMAKE_CXX_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN} ${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}") + endif() +endif() +if(CMAKE_SYSROOT AND CMAKE_CXX_COMPILE_OPTIONS_SYSROOT) + set(CXXFLAGS "${CXXFLAGS} ${CMAKE_CXX_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT}") +endif() +foreach(INCDIR ${CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES}) + set(CXXFLAGS "${CXXFLAGS} ${CMAKE_INCLUDE_FLAG_C}${CMAKE_INCLUDE_FLAG_C_SEP}${INCDIR}") +endforeach() + +if(APPLE) + set(CXXFLAGS "${CXXFLAGS} -D_DARWIN_C_SOURCE") +endif() + +find_library(ZLIB_LIBPATH z) +list(APPEND B2_OPTIONS + -sZLIB_BINARY=z + -sZLIB_LIBPATH="${ZLIB_LIBPATH}" +) +if(CMAKE_BUILD_TYPE STREQUAL "Release") + find_library(BZIP2_LIBPATH bz2) + list(APPEND B2_OPTIONS + -sBZIP2_BINARY=bz2 + -sBZIP2_LIBPATH="${BZIP2_LIBPATH}" + variant=release + ) +elseif(CMAKE_BUILD_TYPE STREQUAL "Debug") + find_library(BZIP2_LIBPATH bz2d) + list(APPEND B2_OPTIONS + -sBZIP2_BINARY=bz2d + -sBZIP2_LIBPATH="${BZIP2_LIBPATH}" + variant=debug + ) +endif() + +configure_file(${CMAKE_CURRENT_LIST_DIR}/user-config.jam ${CMAKE_CURRENT_BINARY_DIR}/user-config.jam @ONLY) + +include(ProcessorCount) +ProcessorCount(NUMBER_OF_PROCESSORS) +if(NOT NUMBER_OF_PROCESSORS) + set(NUMBER_OF_PROCESSORS 1) +endif() + +add_custom_target(boost ALL + COMMAND "${B2_EXE}" + --user-config=${CMAKE_CURRENT_BINARY_DIR}/user-config.jam + --stagedir=${CMAKE_CURRENT_BINARY_DIR}/stage + --build-dir=${CMAKE_CURRENT_BINARY_DIR} + ${B2_OPTIONS} + --layout=system + --with-atomic + --with-random + --with-date_time + --with-filesystem + --with-system + --with-thread + --with-chrono + -sZLIB_INCLUDE="${ZLIB_INCLUDE}" + -sBZIP2_INCLUDE="${BZIP2_INCLUDE}" + -sICU_PATH="${ICU_PATH}" + -j${NUMBER_OF_PROCESSORS} + -sBOOST_ROOT=${BOOST_BUILD_PATH} + -sBOOST_BUILD_PATH=${BOOST_BUILD_PATH} + --debug-configuration + --ignore-site-config + --hash + -q + + threading=multi + debug-symbols=on + + stage + WORKING_DIRECTORY ${SOURCE_PATH}/build +) + +set(SUBDIR ${CMAKE_CURRENT_BINARY_DIR}/stage/lib) +install( + CODE "file(GLOB LIBS ${SUBDIR}/*.so.* ${SUBDIR}/*.so ${SUBDIR}/*.a ${SUBDIR}/*.dylib ${SUBDIR}/*.dylib.*)\nif(LIBS)\nfile(INSTALL \${LIBS} DESTINATION \"\${CMAKE_INSTALL_PREFIX}/lib\")\nendif()" +) diff --git a/vcpkg/ports/boost-modular-build-helper/CONTROL b/vcpkg/ports/boost-modular-build-helper/CONTROL new file mode 100644 index 0000000..ff746b2 --- /dev/null +++ b/vcpkg/ports/boost-modular-build-helper/CONTROL @@ -0,0 +1,4 @@ +Source: boost-modular-build-helper +Version: 1.73.0 +Port-Version: 6 +Build-Depends: boost-uninstall \ No newline at end of file diff --git a/vcpkg/ports/boost-modular-build-helper/Jamroot.jam b/vcpkg/ports/boost-modular-build-helper/Jamroot.jam new file mode 100644 index 0000000..8d7d1e3 --- /dev/null +++ b/vcpkg/ports/boost-modular-build-helper/Jamroot.jam @@ -0,0 +1,142 @@ +constant BOOST_VERSION : 1.73.0 ; +constant BOOST_VERSION_ABI_TAG : 1_73 ; +constant BOOST_JAMROOT_MODULE : $(__name__) ; + +import boostcpp ; +import feature ; + +boostcpp.set-version $(BOOST_VERSION) ; + +project boost : requirements + include&&"@CURRENT_INSTALLED_DIR@/include" + BOOST_ALL_NO_LIB=1 + @$(__name__).tag + @B2_REQUIREMENTS@ + ; + +rule boost-install ( libraries * ) +{ + stagedir = [ option.get stagedir ] ; + install stage + : $(libraries) + : $(stagedir)/lib ; +} + +rule tag ( name : type ? : property-set ) +{ + return [ boostcpp.tag $(name) : $(type) : $(property-set) ] ; +} + +rule python-tag ( name : type ? : property-set ) +{ + return [ tag $(name) : $(type) : $(property-set) ] ; +} + +if "@PORT@" != "boost-system" +{ + use-project /boost/system : . ; + + lib boost_system : : "@CURRENT_INSTALLED_DIR@/@BUILD_LIB_PATH@@BOOST_LIB_PREFIX@boost_system@BOOST_LIB_SUFFIX@" @VARIANT@ ; + explicit boost_system ; + + use-project /boost : . ; + alias system : boost_system ; +} + +if "@PORT@" != "boost-chrono" +{ + use-project /boost/chrono : . ; + + lib boost_chrono : : "@CURRENT_INSTALLED_DIR@/@BUILD_LIB_PATH@@BOOST_LIB_PREFIX@boost_chrono@BOOST_LIB_SUFFIX@" @VARIANT@ ; + explicit boost_chrono ; +} + +if "@PORT@" != "boost-regex" +{ + use-project /boost/regex : . ; + + lib boost_regex : : "@CURRENT_INSTALLED_DIR@/@BUILD_LIB_PATH@@BOOST_LIB_PREFIX@boost_regex@BOOST_LIB_SUFFIX@" @VARIANT@ ; + explicit boost_regex ; +} + +if "@PORT@" != "boost-date-time" +{ + use-project /boost/date_time : . ; + + lib boost_date_time : : "@CURRENT_INSTALLED_DIR@/@BUILD_LIB_PATH@@BOOST_LIB_PREFIX@boost_date_time@BOOST_LIB_SUFFIX@" @VARIANT@ -/boost/date_time//boost_date_time ; + explicit boost_date_time ; +} + +if "@PORT@" != "boost-thread" +{ + use-project /boost/thread : . ; + + lib boost_thread : : "@CURRENT_INSTALLED_DIR@/@BUILD_LIB_PATH@@BOOST_LIB_PREFIX@boost_thread@BOOST_LIB_SUFFIX@" @VARIANT@ : : /boost/date_time//boost_date_time ; + explicit boost_thread ; +} + +if "@PORT@" != "boost-timer" +{ + use-project /boost/timer : . ; + + lib boost_timer : : "@CURRENT_INSTALLED_DIR@/@BUILD_LIB_PATH@@BOOST_LIB_PREFIX@boost_timer@BOOST_LIB_SUFFIX@" @VARIANT@ ; + explicit boost_timer ; +} + +if "@PORT@" != "boost-filesystem" +{ + use-project /boost/filesystem : . ; + + lib boost_filesystem : : "@CURRENT_INSTALLED_DIR@/@BUILD_LIB_PATH@@BOOST_LIB_PREFIX@boost_filesystem@BOOST_LIB_SUFFIX@" @VARIANT@ : : /boost/system//boost_system ; + explicit boost_filesystem ; +} + +if "@PORT@" != "boost-atomic" +{ + use-project /boost/atomic : . ; + + lib boost_atomic : : "@CURRENT_INSTALLED_DIR@/@BUILD_LIB_PATH@@BOOST_LIB_PREFIX@boost_atomic@BOOST_LIB_SUFFIX@" @VARIANT@ ; + explicit boost_atomic ; +} + +if "@PORT@" != "boost-context" +{ + feature.feature segmented-stacks : on : optional propagated composite ; + feature.compose on : BOOST_USE_SEGMENTED_STACKS ; + + use-project /boost/context : . ; + + lib boost_context : : "@CURRENT_INSTALLED_DIR@/@BUILD_LIB_PATH@@BOOST_LIB_PREFIX@boost_context@BOOST_LIB_SUFFIX@" @VARIANT@ ; + explicit boost_context ; +} + +if "@PORT@" != "boost-test" +{ + use-project /boost/test : . ; + + lib boost_unit_test_framework : : "@CURRENT_INSTALLED_DIR@/@BUILD_LIB_PATH@@BOOST_LIB_PREFIX@boost_unit_test_framework@BOOST_LIB_SUFFIX@" @VARIANT@ ; + explicit boost_unit_test_framework ; +} + +if "@PORT@" != "boost-serialization" +{ + use-project /boost/serialization : . ; + + lib boost_serialization : : "@CURRENT_INSTALLED_DIR@/@BUILD_LIB_PATH@@BOOST_LIB_PREFIX@boost_serialization@BOOST_LIB_SUFFIX@" @VARIANT@ ; + explicit boost_serialization ; +} + +rule requires ( foo * ) +{ +} + +rule boost-lib ( name : sources * : requirements * : default-build * : usage-requirements * ) +{ + name = boost_$(name) ; + lib $(name) : $(sources) : $(requirements) : $(default-build) : $(usage-requirements) ; + boost-install $(name) ; +} + +use-project /boost/@PORT@ : build ; + +build-project build ; diff --git a/vcpkg/ports/boost-modular-build-helper/boost-modular-build.cmake b/vcpkg/ports/boost-modular-build-helper/boost-modular-build.cmake new file mode 100644 index 0000000..69332fc --- /dev/null +++ b/vcpkg/ports/boost-modular-build-helper/boost-modular-build.cmake @@ -0,0 +1,447 @@ +function(boost_modular_build) + cmake_parse_arguments(_bm "" "SOURCE_PATH;BOOST_CMAKE_FRAGMENT" "" ${ARGN}) + + if(NOT DEFINED _bm_SOURCE_PATH) + message(FATAL_ERROR "SOURCE_PATH is a required argument to boost_modular_build.") + endif() + + # Next CMake variables may be overridden in the file specified in ${_bm_BOOST_CMAKE_FRAGMENT} + set(B2_OPTIONS) + set(B2_OPTIONS_DBG) + set(B2_OPTIONS_REL) + set(B2_REQUIREMENTS) # this variable is used in the Jamroot.jam + + if(DEFINED _bm_BOOST_CMAKE_FRAGMENT) + message(STATUS "Including ${_bm_BOOST_CMAKE_FRAGMENT}") + include(${_bm_BOOST_CMAKE_FRAGMENT}) + endif() + + # Todo: this serves too similar a purpose as vcpkg_find_acquire_program() + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "aarch64") + set(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/../arm64-linux/tools/boost-build") + else() + set(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/../x64-linux/tools/boost-build") + endif() + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "armv7l") + set(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/../arm-linux/tools/boost-build") + elseif(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "MinGW") + get_filename_component(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/../x86-windows/tools/boost-build" ABSOLUTE) + elseif(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" AND NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "s390x") + get_filename_component(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/../x86-windows/tools/boost-build" ABSOLUTE) + else() + set(BOOST_BUILD_PATH "${CURRENT_INSTALLED_DIR}/tools/boost-build") + endif() + + if(NOT EXISTS "${BOOST_BUILD_PATH}") + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "aarch64") + message(FATAL_ERROR "The arm64 boost-build tools must be installed to build arm64 for Linux. Please run `vcpkg install boost-build:arm64-linux`.") + else() + message(FATAL_ERROR "The x64 boost-build tools must be installed to build arm64 for Linux. Please run `vcpkg install boost-build:x64-linux`.") + endif() + else() + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "armv7l") + message(FATAL_ERROR "The arm boost-build tools must be installed to build arm64 for Linux. Please run `vcpkg install boost-build:arm-linux`.") + else() + message(FATAL_ERROR "The x86 boost-build tools must be installed to build for non-x86/x64 platforms. Please run `vcpkg install boost-build:x86-windows`.") + endif() + endif() + endif() + + if(EXISTS "${BOOST_BUILD_PATH}/b2.exe") + set(B2_EXE "${BOOST_BUILD_PATH}/b2.exe") + elseif(EXISTS "${BOOST_BUILD_PATH}/b2") + set(B2_EXE "${BOOST_BUILD_PATH}/b2") + else() + message(FATAL_ERROR "Could not find b2 in ${BOOST_BUILD_PATH}") + endif() + + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + list(APPEND B2_OPTIONS windows-api=store) + endif() + + set(_bm_DIR ${CURRENT_INSTALLED_DIR}/share/boost-build) + + if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(BOOST_LIB_PREFIX) + if(VCPKG_PLATFORM_TOOLSET MATCHES "v14.") + set(BOOST_LIB_RELEASE_SUFFIX -vc140-mt.lib) + set(BOOST_LIB_DEBUG_SUFFIX -vc140-mt-gd.lib) + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v120") + set(BOOST_LIB_RELEASE_SUFFIX -vc120-mt.lib) + set(BOOST_LIB_DEBUG_SUFFIX -vc120-mt-gd.lib) + endif() + else() + set(BOOST_LIB_PREFIX lib) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(BOOST_LIB_RELEASE_SUFFIX .a) + set(BOOST_LIB_DEBUG_SUFFIX .a) + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(BOOST_LIB_RELEASE_SUFFIX .dylib) + set(BOOST_LIB_DEBUG_SUFFIX .dylib) + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "MinGW") + set(BOOST_LIB_RELEASE_SUFFIX .dll.a) + set(BOOST_LIB_DEBUG_SUFFIX .dll.a) + else() + set(BOOST_LIB_RELEASE_SUFFIX .so) + set(BOOST_LIB_DEBUG_SUFFIX .so) + endif() + endif() + + if(EXISTS "${_bm_SOURCE_PATH}/build/Jamfile.v2") + file(READ ${_bm_SOURCE_PATH}/build/Jamfile.v2 _contents) + #string(REPLACE "import ../../predef/check/predef" "import predef/check/predef" _contents "${_contents}") + #string(REPLACE "import ../../config/checks/config" "import config/checks/config" _contents "${_contents}") + string(REGEX REPLACE + "\.\./\.\./([^/ ]+)/build//(boost_[^/ ]+)" + "/boost/\\1//\\2" + _contents + "${_contents}" + ) + string(REGEX REPLACE " /boost//([^/ ]+)" " /boost/\\1//boost_\\1" _contents "${_contents}") + file(WRITE ${_bm_SOURCE_PATH}/build/Jamfile.v2 "${_contents}") + endif() + + # if(EXISTS "${CURRENT_INSTALLED_DIR}/share/boost-config/checks") + # file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${_bm_SOURCE_PATH}/build/config") + # endif() + # if(EXISTS "${CURRENT_INSTALLED_DIR}/share/boost-predef/check") + # file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-predef/check" DESTINATION "${_bm_SOURCE_PATH}/build/predef") + # endif() + + function(unix_build BOOST_LIB_SUFFIX BUILD_TYPE BUILD_LIB_PATH) + message(STATUS "Building ${BUILD_TYPE}...") + set(BOOST_LIB_SUFFIX ${BOOST_LIB_SUFFIX}) + set(VARIANT ${BUILD_TYPE}) + set(BUILD_LIB_PATH ${BUILD_LIB_PATH}) + configure_file(${_bm_DIR}/Jamroot.jam ${_bm_SOURCE_PATH}/Jamroot.jam @ONLY) + + set(configure_option) + if(DEFINED _bm_BOOST_CMAKE_FRAGMENT) + list(APPEND configure_option "-DBOOST_CMAKE_FRAGMENT=${_bm_BOOST_CMAKE_FRAGMENT}") + endif() + vcpkg_configure_cmake( + SOURCE_PATH ${CURRENT_INSTALLED_DIR}/share/boost-build + PREFER_NINJA + OPTIONS + "-DPORT=${PORT}" + "-DFEATURES=${FEATURES}" + "-DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR}" + "-DB2_EXE=${B2_EXE}" + "-DSOURCE_PATH=${_bm_SOURCE_PATH}" + "-DBOOST_BUILD_PATH=${BOOST_BUILD_PATH}" + ${configure_option} + ) + vcpkg_install_cmake() + endfunction() + + if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + unix_build(${BOOST_LIB_RELEASE_SUFFIX} "release" "lib/") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + unix_build(${BOOST_LIB_DEBUG_SUFFIX} "debug" "debug/lib/") + endif() + + if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/lib) + message(FATAL_ERROR "No libraries were produced. This indicates a failure while building the boost library.") + endif() + return() + endif() + + ##################### + # Cleanup previous builds + ###################### + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + # It is possible for a file in this folder to be locked due to antivirus or vctip + execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1) + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + message(FATAL_ERROR "Unable to remove directory: ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel\n Files are likely in use.") + endif() + endif() + + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + # It is possible for a file in this folder to be locked due to antivirus or vctip + execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1) + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + message(FATAL_ERROR "Unable to remove directory: ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg\n Files are likely in use.") + endif() + endif() + + if(EXISTS ${CURRENT_PACKAGES_DIR}/debug) + message(FATAL_ERROR "Error: directory exists: ${CURRENT_PACKAGES_DIR}/debug\n The previous package was not fully cleared. This is an internal error.") + endif() + file(MAKE_DIRECTORY + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + ) + + include(ProcessorCount) + ProcessorCount(NUMBER_OF_PROCESSORS) + if(NOT NUMBER_OF_PROCESSORS) + set(NUMBER_OF_PROCESSORS 1) + endif() + + ###################### + # Generate configuration + ###################### + list(APPEND B2_OPTIONS + -j${NUMBER_OF_PROCESSORS} + --debug-configuration + --debug-building + --debug-generators + --disable-icu + --ignore-site-config + --hash + -q + "-sZLIB_INCLUDE=${CURRENT_INSTALLED_DIR}/include" + "-sBZIP2_INCLUDE=${CURRENT_INSTALLED_DIR}/include" + "-sLZMA_INCLUDE=${CURRENT_INSTALLED_DIR}/include" + "-sZSTD_INCLUDE=${CURRENT_INSTALLED_DIR}/include" + threading=multi + ) + if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + list(APPEND B2_OPTIONS threadapi=win32) + else() + list(APPEND B2_OPTIONS threadapi=pthread) + endif() + set(B2_OPTIONS_DBG + -sZLIB_BINARY=zlibd + "-sZLIB_LIBPATH=${CURRENT_INSTALLED_DIR}/debug/lib" + -sBZIP2_BINARY=bz2d + "-sBZIP2_LIBPATH=${CURRENT_INSTALLED_DIR}/debug/lib" + -sLZMA_BINARY=lzmad + "-sLZMA_LIBPATH=${CURRENT_INSTALLED_DIR}/debug/lib" + -sZSTD_BINARY=zstdd + "-sZSTD_LIBPATH=${CURRENT_INSTALLED_DIR}/debug/lib" + ) + + set(B2_OPTIONS_REL + -sZLIB_BINARY=zlib + "-sZLIB_LIBPATH=${CURRENT_INSTALLED_DIR}/lib" + -sBZIP2_BINARY=bz2 + "-sBZIP2_LIBPATH=${CURRENT_INSTALLED_DIR}/lib" + -sLZMA_BINARY=lzma + "-sLZMA_LIBPATH=${CURRENT_INSTALLED_DIR}/lib" + -sZSTD_BINARY=zstd + "-sZSTD_LIBPATH=${CURRENT_INSTALLED_DIR}/lib" + ) + + # Properly handle compiler and linker flags passed by VCPKG + if(VCPKG_CXX_FLAGS) + list(APPEND B2_OPTIONS "cxxflags=${VCPKG_CXX_FLAGS}") + endif() + + if(VCPKG_CXX_FLAGS_RELEASE) + list(APPEND B2_OPTIONS_REL "cxxflags=${VCPKG_CXX_FLAGS_RELEASE}") + endif() + + if(VCPKG_CXX_FLAGS_DEBUG) + list(APPEND B2_OPTIONS_DBG "cxxflags=${VCPKG_CXX_FLAGS_DEBUG}") + endif() + + if(VCPKG_C_FLAGS) + list(APPEND B2_OPTIONS "cflags=${VCPKG_C_FLAGS}") + endif() + + if(VCPKG_C_FLAGS_RELEASE) + list(APPEND B2_OPTIONS_REL "cflags=${VCPKG_C_FLAGS_RELEASE}") + endif() + + if(VCPKG_C_FLAGS_DEBUG) + list(APPEND B2_OPTIONS_DBG "cflags=${VCPKG_C_FLAGS_DEBUG}") + endif() + + if(VCPKG_LINKER_FLAGS) + list(APPEND B2_OPTIONS "linkflags=${VCPKG_LINKER_FLAGS}") + endif() + + if(VCPKG_LINKER_FLAGS_RELEASE) + list(APPEND B2_OPTIONS_REL "linkflags=${VCPKG_LINKER_FLAGS_RELEASE}") + endif() + + if(VCPKG_LINKER_FLAGS_DEBUG) + list(APPEND B2_OPTIONS_DBG "linkflags=${VCPKG_LINKER_FLAGS_DEBUG}") + endif() + + # Add build type specific options + if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + list(APPEND B2_OPTIONS runtime-link=shared) + else() + list(APPEND B2_OPTIONS runtime-link=static) + endif() + + if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + list(APPEND B2_OPTIONS link=shared) + else() + list(APPEND B2_OPTIONS link=static) + endif() + + if(VCPKG_TARGET_ARCHITECTURE MATCHES "x64") + list(APPEND B2_OPTIONS address-model=64 architecture=x86) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + list(APPEND B2_OPTIONS address-model=32 architecture=arm) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + list(APPEND B2_OPTIONS address-model=64 architecture=arm) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "s390x") + list(APPEND B2_OPTIONS address-model=64 architecture=s390x) + else() + list(APPEND B2_OPTIONS address-model=32 architecture=x86) + endif() + + file(TO_CMAKE_PATH "${_bm_DIR}/nothing.bat" NOTHING_BAT) + set(TOOLSET_OPTIONS "/EHsc -Zm800 -nologo") + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + if(NOT VCPKG_PLATFORM_TOOLSET MATCHES "v140") + find_path(PATH_TO_CL cl.exe) + find_path(PLATFORM_WINMD_DIR platform.winmd PATHS "${PATH_TO_CL}/../../../lib/x86/store/references" NO_DEFAULT_PATH) + if(PLATFORM_WINMD_DIR MATCHES "NOTFOUND") + message(FATAL_ERROR "Could not find `platform.winmd` in VS. Do you have the Universal Windows Platform development workload installed?") + endif() + else() + find_path(PLATFORM_WINMD_DIR platform.winmd PATHS "$ENV{VS140COMNTOOLS}/../../VC/LIB/store/references") + if(PLATFORM_WINMD_DIR MATCHES "NOTFOUND") + message(FATAL_ERROR "Could not find `platform.winmd` in VS2015.") + endif() + endif() + file(TO_NATIVE_PATH "${PLATFORM_WINMD_DIR}" PLATFORM_WINMD_DIR) + string(REPLACE "\\" "/" PLATFORM_WINMD_DIR ${PLATFORM_WINMD_DIR}) # escape backslashes + + set(TOOLSET_OPTIONS "${TOOLSET_OPTIONS} -Zl /AI\"${PLATFORM_WINMD_DIR}\" WindowsApp.lib /ZW -DVirtualAlloc=VirtualAllocFromApp -D_WIN32_WINNT=0x0A00") + endif() + + configure_file(${_bm_DIR}/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam @ONLY) + configure_file(${_bm_DIR}/user-config.jam ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam @ONLY) + + if(VCPKG_PLATFORM_TOOLSET MATCHES "v14.") + list(APPEND _bm_OPTIONS toolset=msvc) + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v120") + list(APPEND _bm_OPTIONS toolset=msvc) + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "external") + list(APPEND B2_OPTIONS toolset=gcc) + else() + message(FATAL_ERROR "Unsupported value for VCPKG_PLATFORM_TOOLSET: '${VCPKG_PLATFORM_TOOLSET}'") + endif() + + ###################### + # Perform build + Package + ###################### + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Building ${TARGET_TRIPLET}-rel") + set(BOOST_LIB_SUFFIX ${BOOST_LIB_RELEASE_SUFFIX}) + set(VARIANT "release") + set(BUILD_LIB_PATH "lib/") + configure_file(${_bm_DIR}/Jamroot.jam ${_bm_SOURCE_PATH}/Jamroot.jam @ONLY) + set(ENV{BOOST_BUILD_PATH} "${BOOST_BUILD_PATH}") + vcpkg_execute_required_process( + COMMAND "${B2_EXE}" + --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/stage + --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + --user-config=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/user-config.jam + ${B2_OPTIONS} + ${B2_OPTIONS_REL} + variant=release + debug-symbols=on + WORKING_DIRECTORY ${_bm_SOURCE_PATH}/build + LOGNAME build-${TARGET_TRIPLET}-rel + ) + message(STATUS "Building ${TARGET_TRIPLET}-rel done") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Building ${TARGET_TRIPLET}-dbg") + set(BOOST_LIB_SUFFIX ${BOOST_LIB_DEBUG_SUFFIX}) + set(VARIANT debug) + set(BUILD_LIB_PATH "debug/lib/") + configure_file(${_bm_DIR}/Jamroot.jam ${_bm_SOURCE_PATH}/Jamroot.jam @ONLY) + set(ENV{BOOST_BUILD_PATH} "${BOOST_BUILD_PATH}") + vcpkg_execute_required_process( + COMMAND "${B2_EXE}" + --stagedir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/stage + --build-dir=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + --user-config=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/user-config.jam + ${B2_OPTIONS} + ${B2_OPTIONS_DBG} + variant=debug + WORKING_DIRECTORY ${_bm_SOURCE_PATH}/build + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Building ${TARGET_TRIPLET}-dbg done") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Packaging ${TARGET_TRIPLET}-rel") + file(GLOB REL_LIBS + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/boost/build/*/*.lib + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/boost/build/*/*.a + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/boost/build/*/*.so + ) + file(COPY ${REL_LIBS} + DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(GLOB REL_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/boost/build/*/*.dll) + file(COPY ${REL_DLLS} + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + FILES_MATCHING PATTERN "*.dll") + endif() + message(STATUS "Packaging ${TARGET_TRIPLET}-rel done") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Packaging ${TARGET_TRIPLET}-dbg") + file(GLOB DBG_LIBS + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/boost/build/*/*.lib + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/boost/build/*/*.a + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/boost/build/*/*.so + ) + file(COPY ${DBG_LIBS} + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(GLOB DBG_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/boost/build/*/*.dll) + file(COPY ${DBG_DLLS} + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + FILES_MATCHING PATTERN "*.dll") + endif() + message(STATUS "Packaging ${TARGET_TRIPLET}-dbg done") + endif() + + file(GLOB INSTALLED_LIBS ${CURRENT_PACKAGES_DIR}/debug/lib/*.lib ${CURRENT_PACKAGES_DIR}/lib/*.lib) + foreach(LIB ${INSTALLED_LIBS}) + get_filename_component(OLD_FILENAME ${LIB} NAME) + get_filename_component(DIRECTORY_OF_LIB_FILE ${LIB} DIRECTORY) + string(REPLACE "libboost_" "boost_" NEW_FILENAME ${OLD_FILENAME}) + string(REPLACE "-s-" "-" NEW_FILENAME ${NEW_FILENAME}) # For Release libs + string(REPLACE "-vc141-" "-vc140-" NEW_FILENAME ${NEW_FILENAME}) # To merge VS2017 and VS2015 binaries + string(REPLACE "-vc142-" "-vc140-" NEW_FILENAME ${NEW_FILENAME}) # To merge VS2019 and VS2015 binaries + string(REPLACE "-sgd-" "-gd-" NEW_FILENAME ${NEW_FILENAME}) # For Debug libs + string(REPLACE "-sgyd-" "-gyd-" NEW_FILENAME ${NEW_FILENAME}) # For Debug libs + string(REPLACE "-x32-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries + string(REPLACE "-x64-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries + string(REPLACE "-a32-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries + string(REPLACE "-a64-" "-" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake 3.10 and earlier to locate the binaries + string(REPLACE "-1_73" "" NEW_FILENAME ${NEW_FILENAME}) # To enable CMake > 3.10 to locate the binaries + if("${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}" STREQUAL "${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}") + # nothing to do + elseif(EXISTS ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}) + file(REMOVE ${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME}) + else() + file(RENAME ${DIRECTORY_OF_LIB_FILE}/${OLD_FILENAME} ${DIRECTORY_OF_LIB_FILE}/${NEW_FILENAME}) + endif() + endforeach() + + # boost-regex[icu] and boost-locale[icu] generate has_icu.lib + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/has_icu.lib") + file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/has_icu.lib") + endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/has_icu.lib") + file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/has_icu.lib") + endif() + + vcpkg_copy_pdbs() +endfunction() diff --git a/vcpkg/ports/boost-modular-build-helper/nothing.bat b/vcpkg/ports/boost-modular-build-helper/nothing.bat new file mode 100644 index 0000000..e69de29 diff --git a/vcpkg/ports/boost-modular-build-helper/portfile.cmake b/vcpkg/ports/boost-modular-build-helper/portfile.cmake new file mode 100644 index 0000000..5f63ce5 --- /dev/null +++ b/vcpkg/ports/boost-modular-build-helper/portfile.cmake @@ -0,0 +1,12 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +file( + COPY + ${CMAKE_CURRENT_LIST_DIR}/boost-modular-build.cmake + ${CMAKE_CURRENT_LIST_DIR}/Jamroot.jam + ${CMAKE_CURRENT_LIST_DIR}/nothing.bat + ${CMAKE_CURRENT_LIST_DIR}/user-config.jam + ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt + DESTINATION + ${CURRENT_PACKAGES_DIR}/share/boost-build +) \ No newline at end of file diff --git a/vcpkg/ports/boost-modular-build-helper/user-config.jam b/vcpkg/ports/boost-modular-build-helper/user-config.jam new file mode 100644 index 0000000..685c26c --- /dev/null +++ b/vcpkg/ports/boost-modular-build-helper/user-config.jam @@ -0,0 +1,69 @@ +import toolset ; + +if "@VCPKG_PLATFORM_TOOLSET@" != "external" +{ + using msvc : : cl.exe + : + "@NOTHING_BAT@" + @TOOLSET_OPTIONS@ + ; +} +else +{ + using gcc : 5.4.1 : @CMAKE_CXX_COMPILER@ + : + @CMAKE_RANLIB@ + @CMAKE_AR@ + @CXXFLAGS@ + @CFLAGS@ + @LDFLAGS@ + # MINGW here causes b2 to not run cygpath + mingw + ; +} + +if "@PORT@" = "boost-python" +{ + using python : @VCPKG_PYTHON3_VERSION@ : : "@VCPKG_PYTHON3_INCLUDE@" : "@VCPKG_PYTHON3_LIBS_RELEASE@" ; + using python : @VCPKG_PYTHON3_VERSION@ : : "@VCPKG_PYTHON3_INCLUDE@" : "@VCPKG_PYTHON3_LIBS_DEBUG@" : on ; + using python : @VCPKG_PYTHON2_VERSION@ : : "@VCPKG_PYTHON2_INCLUDE@" : "@VCPKG_PYTHON2_LIBS_RELEASE@" ; + using python : @VCPKG_PYTHON2_VERSION@ : : "@VCPKG_PYTHON2_INCLUDE@" : "@VCPKG_PYTHON2_LIBS_DEBUG@" : on ; +} + +if "@PORT@" = "boost-mpi" +{ + using mpi : : + "@CURRENT_INSTALLED_DIR@/lib" + "@CURRENT_INSTALLED_DIR@/include" + msmpi ; +} + +project user-config : ; + +if "@VCPKG_PLATFORM_TOOLSET@" != "external" +{ + lib advapi32 ; + + lib icuuc : : "@CURRENT_INSTALLED_DIR@/lib/icuuc.lib" release : : advapi32 ; + lib icuuc : : "@CURRENT_INSTALLED_DIR@/debug/lib/icuucd.lib" debug : : advapi32 ; + + lib icuin : : "@CURRENT_INSTALLED_DIR@/lib/icuin.lib" release : : ; + lib icuin : : "@CURRENT_INSTALLED_DIR@/debug/lib/icuind.lib" debug : : ; + + lib icudt : : "@CURRENT_INSTALLED_DIR@/lib/icudt.lib" release : : ; + lib icudt : : "@CURRENT_INSTALLED_DIR@/debug/lib/icudtd.lib" debug : : ; +} +else +{ + lib icuuc : : "@CURRENT_INSTALLED_DIR@/lib/libicuuc.a" release : : ; + lib icuuc : : "@CURRENT_INSTALLED_DIR@/debug/lib/libicuuc.a" debug : : ; + + lib icuin : : "@CURRENT_INSTALLED_DIR@/lib/libicui18n.a" release : : ; + lib icuin : : "@CURRENT_INSTALLED_DIR@/debug/lib/libicui18n.a" debug : : ; + + lib icudt : : "@CURRENT_INSTALLED_DIR@/lib/libicudata.a" release : : ; + lib icudt : : "@CURRENT_INSTALLED_DIR@/debug/lib/libicudata.a" debug : : ; +} + +lib iconv : : "@LIBICONV_LIBRARY@" shared shared release : : ; +lib iconv : : "@LIBICONV_LIBRARY@" shared shared debug : : ; diff --git a/vcpkg/ports/boost-move/CONTROL b/vcpkg/ports/boost-move/CONTROL new file mode 100644 index 0000000..062cb28 --- /dev/null +++ b/vcpkg/ports/boost-move/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-move +Version: 1.73.0 +Build-Depends: boost-assert, boost-config, boost-core, boost-integer, boost-static-assert, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/move +Description: Boost move module diff --git a/vcpkg/ports/boost-move/portfile.cmake b/vcpkg/ports/boost-move/portfile.cmake new file mode 100644 index 0000000..1ac77aa --- /dev/null +++ b/vcpkg/ports/boost-move/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/move + REF boost-1.73.0 + SHA512 e8f096ab8fcde8905db80727f3f7405d64d3e03f6f865e0860943cb425bf3754baa9885854e40ff08b299dbff8bc1b7b605649bfd4073ec3d51b4cc4dddbe848 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-mp11/CONTROL b/vcpkg/ports/boost-mp11/CONTROL new file mode 100644 index 0000000..61c9562 --- /dev/null +++ b/vcpkg/ports/boost-mp11/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-mp11 +Version: 1.73.0 +Build-Depends: boost-vcpkg-helpers +Homepage: https://github.com/boostorg/mp11 +Description: Boost mp11 module diff --git a/vcpkg/ports/boost-mp11/portfile.cmake b/vcpkg/ports/boost-mp11/portfile.cmake new file mode 100644 index 0000000..855da9c --- /dev/null +++ b/vcpkg/ports/boost-mp11/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/mp11 + REF boost-1.73.0 + SHA512 04b2e3efbb75c29be19716fa985b90f47ecad9055a4ae24b18e49018317ec9d850322cc402f13f29a6187fc98943f41409dd39be3286dc61e2ee7a4e2f357547 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-mpi/CONTROL b/vcpkg/ports/boost-mpi/CONTROL new file mode 100644 index 0000000..afd55f5 --- /dev/null +++ b/vcpkg/ports/boost-mpi/CONTROL @@ -0,0 +1,7 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-mpi +Version: 1.73.0 +Port-Version: 1 +Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-foreach, boost-function, boost-graph, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-mpl, boost-optional, boost-python (!uwp&!(arm&windows)), boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers, mpi +Homepage: https://github.com/boostorg/mpi +Description: Boost mpi module diff --git a/vcpkg/ports/boost-mpi/portfile.cmake b/vcpkg/ports/boost-mpi/portfile.cmake new file mode 100644 index 0000000..cd368ca --- /dev/null +++ b/vcpkg/ports/boost-mpi/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/mpi + REF boost-1.73.0 + SHA512 e731e0d6b4f047bf899cf8e88a9bd8da660cee54330a23c882d01f51e02e9e103f681fc6d067e4d125e17789b20821d09710a93598fd6c0792427ab709144b6f + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-mpl/CONTROL b/vcpkg/ports/boost-mpl/CONTROL new file mode 100644 index 0000000..a8ace29 --- /dev/null +++ b/vcpkg/ports/boost-mpl/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-mpl +Version: 1.73.0 +Build-Depends: boost-config, boost-core, boost-detail, boost-predef, boost-preprocessor, boost-static-assert, boost-type-traits, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/mpl +Description: Boost mpl module diff --git a/vcpkg/ports/boost-mpl/portfile.cmake b/vcpkg/ports/boost-mpl/portfile.cmake new file mode 100644 index 0000000..1387c90 --- /dev/null +++ b/vcpkg/ports/boost-mpl/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/mpl + REF boost-1.73.0 + SHA512 1d3a131d589e8c2bea4637c5bb3d42beee60289201ee946435a797b4953cae6338b739b8c0abb0d8b1fb1ffacbdc6c609139424090e433a4f5aa98f6158a5c8d + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-msm/CONTROL b/vcpkg/ports/boost-msm/CONTROL new file mode 100644 index 0000000..93ca01a --- /dev/null +++ b/vcpkg/ports/boost-msm/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-msm +Version: 1.73.0 +Build-Depends: boost-any, boost-assert, boost-bind, boost-circular-buffer, boost-config, boost-core, boost-detail, boost-function, boost-fusion, boost-mpl, boost-parameter, boost-phoenix, boost-preprocessor, boost-proto, boost-serialization, boost-tuple, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/msm +Description: Boost msm module diff --git a/vcpkg/ports/boost-msm/portfile.cmake b/vcpkg/ports/boost-msm/portfile.cmake new file mode 100644 index 0000000..a019b49 --- /dev/null +++ b/vcpkg/ports/boost-msm/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/msm + REF boost-1.73.0 + SHA512 b91810bf79cc22c1a3fb8a4554192b416099ea091bd5b55bc303d4baea86cceddd8e2a65515897920cf5b6975030ddf057a1f3540e6291e7a14729996c6060c2 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-multi-array/CONTROL b/vcpkg/ports/boost-multi-array/CONTROL new file mode 100644 index 0000000..87a0f59 --- /dev/null +++ b/vcpkg/ports/boost-multi-array/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-multi-array +Version: 1.73.0 +Build-Depends: boost-compatibility, boost-config, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/multi_array +Description: Boost multi_array module diff --git a/vcpkg/ports/boost-multi-array/portfile.cmake b/vcpkg/ports/boost-multi-array/portfile.cmake new file mode 100644 index 0000000..63fcd9a --- /dev/null +++ b/vcpkg/ports/boost-multi-array/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/multi_array + REF boost-1.73.0 + SHA512 72e200ed03eaa25e354461f8f4bcddb0a216902e3198d5d653ce4f1dfe6aa637f4f81608e98e2e736ecfd42466dd62ffd10907b908daa4735dadef23bb5950b4 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-multi-index/CONTROL b/vcpkg/ports/boost-multi-index/CONTROL new file mode 100644 index 0000000..e1e212f --- /dev/null +++ b/vcpkg/ports/boost-multi-index/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-multi-index +Version: 1.73.0 +Build-Depends: boost-assert, boost-bind, boost-compatibility, boost-config, boost-container-hash, boost-core, boost-detail, boost-foreach, boost-functional, boost-integer, boost-iterator, boost-move, boost-mpl, boost-preprocessor, boost-serialization, boost-static-assert, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/multi_index +Description: Boost multi_index module diff --git a/vcpkg/ports/boost-multi-index/portfile.cmake b/vcpkg/ports/boost-multi-index/portfile.cmake new file mode 100644 index 0000000..d9f72ee --- /dev/null +++ b/vcpkg/ports/boost-multi-index/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/multi_index + REF boost-1.73.0 + SHA512 c0e7fa0a0970eaa285836218c4c283cfbb250dfaf5b88c487aa4913921bc9703982a73594c5b6c7b6f66790276219fa65c6522503286790522319c0b78656418 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-multiprecision/CONTROL b/vcpkg/ports/boost-multiprecision/CONTROL new file mode 100644 index 0000000..f79abdf --- /dev/null +++ b/vcpkg/ports/boost-multiprecision/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-multiprecision +Version: 1.73.0 +Build-Depends: boost-array, boost-assert, boost-atomic, boost-config, boost-container-hash, boost-core, boost-functional, boost-integer, boost-lexical-cast, boost-mpl, boost-predef, boost-rational, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/multiprecision +Description: Boost multiprecision module diff --git a/vcpkg/ports/boost-multiprecision/portfile.cmake b/vcpkg/ports/boost-multiprecision/portfile.cmake new file mode 100644 index 0000000..73afe33 --- /dev/null +++ b/vcpkg/ports/boost-multiprecision/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/multiprecision + REF boost-1.73.0 + SHA512 d6fffa67b9d00bdda81d52aee897274cb05fff45cd4238e4a58ab6de0342962415e022eed1c3c7164806cade2a218cdedde7a5062808d385b055ea24f3cc7658 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-nowide/CONTROL b/vcpkg/ports/boost-nowide/CONTROL new file mode 100644 index 0000000..6408fa8 --- /dev/null +++ b/vcpkg/ports/boost-nowide/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-nowide +Version: 1.73.0 +Build-Depends: boost-build, boost-config, boost-filesystem (!uwp), boost-integer, boost-modular-build-helper, boost-smart-ptr, boost-static-assert, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/nowide +Description: Boost nowide module diff --git a/vcpkg/ports/boost-nowide/portfile.cmake b/vcpkg/ports/boost-nowide/portfile.cmake new file mode 100644 index 0000000..e3a10d8 --- /dev/null +++ b/vcpkg/ports/boost-nowide/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/nowide + REF boost-1.73.0 + SHA512 2ef89ee386dbce7c88d78dba15b8301601cd83660acf1f5841e2297df92fd6b3d83999c7ae6d1d19cc06bc6ad721df1d206f7473b70c3ba6dc26aa1507ca5b5a + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-numeric-conversion/CONTROL b/vcpkg/ports/boost-numeric-conversion/CONTROL new file mode 100644 index 0000000..2854c63 --- /dev/null +++ b/vcpkg/ports/boost-numeric-conversion/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-numeric-conversion +Version: 1.73.0 +Build-Depends: boost-compatibility, boost-config, boost-conversion, boost-core, boost-detail, boost-integer, boost-preprocessor, boost-throw-exception, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/numeric_conversion +Description: Boost numeric_conversion module diff --git a/vcpkg/ports/boost-numeric-conversion/portfile.cmake b/vcpkg/ports/boost-numeric-conversion/portfile.cmake new file mode 100644 index 0000000..e00c810 --- /dev/null +++ b/vcpkg/ports/boost-numeric-conversion/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/numeric_conversion + REF boost-1.73.0 + SHA512 1486a47eeef33e9db44215e0d6bde6ce409bffdaa7d5384b223bb30c2d6f8902bbe08a1b0f4a619527846875637c6fb0c80a57c2988cb8df63c54d5a3adf4a3c + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-odeint/CONTROL b/vcpkg/ports/boost-odeint/CONTROL new file mode 100644 index 0000000..a985588 --- /dev/null +++ b/vcpkg/ports/boost-odeint/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-odeint +Version: 1.73.0 +Build-Depends: boost-array, boost-assert, boost-bind, boost-compute, boost-config, boost-core, boost-function, boost-fusion, boost-iterator, boost-math, boost-mpl, boost-multi-array, boost-preprocessor, boost-range, boost-static-assert, boost-throw-exception, boost-type-traits, boost-units, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/odeint +Description: Boost odeint module diff --git a/vcpkg/ports/boost-odeint/portfile.cmake b/vcpkg/ports/boost-odeint/portfile.cmake new file mode 100644 index 0000000..e3e797f --- /dev/null +++ b/vcpkg/ports/boost-odeint/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/odeint + REF boost-1.73.0 + SHA512 b433d5693da30677ecae28ce529a2a4d53076a6ad46a7b0f6e523f17b2e3e713c7a1fe5dad426950a25465893a78c33cbced4463eb64b86499d2521950a7b436 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-optional/CONTROL b/vcpkg/ports/boost-optional/CONTROL new file mode 100644 index 0000000..f81cfdc --- /dev/null +++ b/vcpkg/ports/boost-optional/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-optional +Version: 1.73.0 +Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-move, boost-predef, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/optional +Description: Boost optional module diff --git a/vcpkg/ports/boost-optional/portfile.cmake b/vcpkg/ports/boost-optional/portfile.cmake new file mode 100644 index 0000000..8ea05d2 --- /dev/null +++ b/vcpkg/ports/boost-optional/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/optional + REF boost-1.73.0 + SHA512 07b4df2e20a5d4d9048786458b97bf59de414b46efc7dec89119064ca215cc4b755b950e0dc1212eacce79e78f95342caeb2a8e9fd067157f5f3d0be9f82f019 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-outcome/0001-outcome-assert.patch b/vcpkg/ports/boost-outcome/0001-outcome-assert.patch new file mode 100644 index 0000000..68ea5a5 --- /dev/null +++ b/vcpkg/ports/boost-outcome/0001-outcome-assert.patch @@ -0,0 +1,11 @@ +--- a/include/boost/outcome/experimental/status-code/status_code_ptr.hpp 2020-04-28 09:23:14.792565200 +0100 ++++ b/include/boost/outcome/experimental/status-code/status_code_ptr.hpp 2020-04-28 09:24:34.311741000 +0100 +@@ -103,7 +103,7 @@ + #endif + virtual void _do_erased_copy(status_code &dst, const status_code &src, size_t /*unused*/) const override // NOLINT + { +- assert(dst.domain() == *this); ++ // Note that dst will not have its domain set + assert(src.domain() == *this); + auto &d = static_cast<_mycode &>(dst); // NOLINT + const auto &_s = static_cast(src); // NOLINT diff --git a/vcpkg/ports/boost-outcome/CONTROL b/vcpkg/ports/boost-outcome/CONTROL new file mode 100644 index 0000000..e0e798a --- /dev/null +++ b/vcpkg/ports/boost-outcome/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-outcome +Version: 1.73.0 +Build-Depends: boost-config, boost-throw-exception, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/outcome +Description: Boost outcome module diff --git a/vcpkg/ports/boost-outcome/portfile.cmake b/vcpkg/ports/boost-outcome/portfile.cmake new file mode 100644 index 0000000..8a6a94a --- /dev/null +++ b/vcpkg/ports/boost-outcome/portfile.cmake @@ -0,0 +1,13 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/outcome + REF boost-1.73.0 + SHA512 992518afaea71cdf0531675f2c3bc5329c2ebd79b65998c1f774bd913d5135ccf48f2f831c3d9481e33375f7df3c637da45a3bd75298e1d6637d517793c8cb86 + HEAD_REF master + PATCHES 0001-outcome-assert.patch +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-parameter-python/CONTROL b/vcpkg/ports/boost-parameter-python/CONTROL new file mode 100644 index 0000000..cba56b9 --- /dev/null +++ b/vcpkg/ports/boost-parameter-python/CONTROL @@ -0,0 +1,7 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-parameter-python +Version: 1.73.0 +Port-Version: 1 +Build-Depends: boost-mpl, boost-parameter, boost-preprocessor, boost-python (!uwp&!(arm&windows)), boost-vcpkg-helpers +Homepage: https://github.com/boostorg/parameter_python +Description: Boost parameter_python module diff --git a/vcpkg/ports/boost-parameter-python/portfile.cmake b/vcpkg/ports/boost-parameter-python/portfile.cmake new file mode 100644 index 0000000..f570f63 --- /dev/null +++ b/vcpkg/ports/boost-parameter-python/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/parameter_python + REF boost-1.73.0 + SHA512 a2c05d5840465ed042dc2144d18b917cd68d1f89d0f616203663abbdf0d28c075b5bd2615384202e2584a4fbb663aa7fdee05d534a04c5c08f9a98fd901affbf + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-parameter/CONTROL b/vcpkg/ports/boost-parameter/CONTROL new file mode 100644 index 0000000..14300e5 --- /dev/null +++ b/vcpkg/ports/boost-parameter/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-parameter +Version: 1.73.0 +Build-Depends: boost-config, boost-core, boost-function, boost-fusion, boost-mp11, boost-mpl, boost-optional, boost-preprocessor, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/parameter +Description: Boost parameter module diff --git a/vcpkg/ports/boost-parameter/portfile.cmake b/vcpkg/ports/boost-parameter/portfile.cmake new file mode 100644 index 0000000..fd833d0 --- /dev/null +++ b/vcpkg/ports/boost-parameter/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/parameter + REF boost-1.73.0 + SHA512 63da1ec9dae999dac3542344a67b58e40928c453f87d7cd71fda858eeb2df48ff0056fe3eee550dff9912602d0595e0c90939dc2fad7851c90285abb72f57087 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-phoenix/CONTROL b/vcpkg/ports/boost-phoenix/CONTROL new file mode 100644 index 0000000..f1c3495 --- /dev/null +++ b/vcpkg/ports/boost-phoenix/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-phoenix +Version: 1.73.0 +Build-Depends: boost-assert, boost-bind, boost-config, boost-core, boost-detail, boost-function, boost-fusion, boost-mpl, boost-predef, boost-preprocessor, boost-proto, boost-range, boost-smart-ptr, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/phoenix +Description: Boost phoenix module diff --git a/vcpkg/ports/boost-phoenix/portfile.cmake b/vcpkg/ports/boost-phoenix/portfile.cmake new file mode 100644 index 0000000..45209d5 --- /dev/null +++ b/vcpkg/ports/boost-phoenix/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/phoenix + REF boost-1.73.0 + SHA512 6919ea20e6bafac0a10024f3823badd23147cf4923ff0e2678bea6951cafc66ce08d12569bb273d6cd1cc15d104fabff6115e64033f446dc5ccb29d095ac6627 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-poly-collection/CONTROL b/vcpkg/ports/boost-poly-collection/CONTROL new file mode 100644 index 0000000..30d96ba --- /dev/null +++ b/vcpkg/ports/boost-poly-collection/CONTROL @@ -0,0 +1,7 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-poly-collection +Version: 1.73.0 +Port-Version: 1 +Build-Depends: boost-assert, boost-config, boost-core, boost-detail, boost-iterator, boost-mp11, boost-mpl, boost-type-erasure, boost-type-traits, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/poly_collection +Description: Boost poly_collection module diff --git a/vcpkg/ports/boost-poly-collection/portfile.cmake b/vcpkg/ports/boost-poly-collection/portfile.cmake new file mode 100644 index 0000000..246f1fd --- /dev/null +++ b/vcpkg/ports/boost-poly-collection/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/poly_collection + REF boost-1.73.0 + SHA512 6d04153c03634748ebe35509359c882a766dc8ed5a880cd927bfc3488d3364229140e87da6ada157fd7d4ade86a9d1f5d503a098eb2aa3773949722dea6f3ad6 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-polygon/CONTROL b/vcpkg/ports/boost-polygon/CONTROL new file mode 100644 index 0000000..8bcf26d --- /dev/null +++ b/vcpkg/ports/boost-polygon/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-polygon +Version: 1.73.0 +Build-Depends: boost-config, boost-integer, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/polygon +Description: Boost polygon module diff --git a/vcpkg/ports/boost-polygon/portfile.cmake b/vcpkg/ports/boost-polygon/portfile.cmake new file mode 100644 index 0000000..fd57403 --- /dev/null +++ b/vcpkg/ports/boost-polygon/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/polygon + REF boost-1.73.0 + SHA512 22e61f411a011ff5f77fc358b415dee57c2eb0297f9810de8fb8fd4c07a5a89ce03d51b827e3efe52a226d231a4ec85bdd6fc50fc0286c28116653926b525130 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-pool/CONTROL b/vcpkg/ports/boost-pool/CONTROL new file mode 100644 index 0000000..bf069b9 --- /dev/null +++ b/vcpkg/ports/boost-pool/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-pool +Version: 1.73.0 +Build-Depends: boost-assert, boost-compatibility, boost-config, boost-detail, boost-integer, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers, boost-winapi +Homepage: https://github.com/boostorg/pool +Description: Boost pool module diff --git a/vcpkg/ports/boost-pool/portfile.cmake b/vcpkg/ports/boost-pool/portfile.cmake new file mode 100644 index 0000000..0549c72 --- /dev/null +++ b/vcpkg/ports/boost-pool/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/pool + REF boost-1.73.0 + SHA512 922c1caddc06cccd82b7137cc50e1ea2e5b02b227c3d568f06096c4237138a1345101e96d0450b5d2ff3ba55f89ae9a45200433e8e811efb3b3ae9c579f8466b + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-predef/CONTROL b/vcpkg/ports/boost-predef/CONTROL new file mode 100644 index 0000000..3a7c470 --- /dev/null +++ b/vcpkg/ports/boost-predef/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-predef +Version: 1.73.0 +Build-Depends: boost-vcpkg-helpers +Homepage: https://github.com/boostorg/predef +Description: Boost predef module diff --git a/vcpkg/ports/boost-predef/portfile.cmake b/vcpkg/ports/boost-predef/portfile.cmake new file mode 100644 index 0000000..981b458 --- /dev/null +++ b/vcpkg/ports/boost-predef/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/predef + REF boost-1.73.0 + SHA512 f08b712296bfa7045208e094bbef80880368a334fef0ea6aa05c75a2312bc1543c0e95f045fa087e3d9e35fb006e0b07070ce5a21d274cbdc2e2bba55eec0a21 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) + +file(COPY ${SOURCE_PATH}/tools/check DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-predef) diff --git a/vcpkg/ports/boost-preprocessor/CONTROL b/vcpkg/ports/boost-preprocessor/CONTROL new file mode 100644 index 0000000..418bf29 --- /dev/null +++ b/vcpkg/ports/boost-preprocessor/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-preprocessor +Version: 1.73.0 +Build-Depends: boost-vcpkg-helpers +Homepage: https://github.com/boostorg/preprocessor +Description: Boost preprocessor module diff --git a/vcpkg/ports/boost-preprocessor/portfile.cmake b/vcpkg/ports/boost-preprocessor/portfile.cmake new file mode 100644 index 0000000..ececbba --- /dev/null +++ b/vcpkg/ports/boost-preprocessor/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/preprocessor + REF boost-1.73.0 + SHA512 80341ca2dd62b0fda2f89609f062d9a93b6865c25d86f8f30c8f49848d8ce563b92c2d424e5181994b32603111a06869367a801fca29dea3f5bc6c6ed2fedf2b + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-process/CONTROL b/vcpkg/ports/boost-process/CONTROL new file mode 100644 index 0000000..e67c76f --- /dev/null +++ b/vcpkg/ports/boost-process/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-process +Version: 1.73.0 +Build-Depends: boost-algorithm, boost-asio, boost-config, boost-core, boost-filesystem (!uwp), boost-fusion, boost-iterator, boost-move, boost-optional, boost-system, boost-tokenizer, boost-type-index, boost-vcpkg-helpers, boost-winapi +Homepage: https://github.com/boostorg/process +Description: Boost process module diff --git a/vcpkg/ports/boost-process/portfile.cmake b/vcpkg/ports/boost-process/portfile.cmake new file mode 100644 index 0000000..ae80396 --- /dev/null +++ b/vcpkg/ports/boost-process/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/process + REF boost-1.73.0 + SHA512 6f03f492ebe7b4ceb6ee15f50767c43200f0d0a9237df53d9f893964eed9d28d5784b591b348425d4972d47742fcc78049753ac28a79afd0ca13e2824b2f4690 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-program-options/CONTROL b/vcpkg/ports/boost-program-options/CONTROL new file mode 100644 index 0000000..aed8ed8 --- /dev/null +++ b/vcpkg/ports/boost-program-options/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-program-options +Version: 1.73.0 +Build-Depends: boost-any, boost-bind, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-function, boost-iterator, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-tokenizer, boost-type-traits, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/program_options +Description: Boost program_options module diff --git a/vcpkg/ports/boost-program-options/portfile.cmake b/vcpkg/ports/boost-program-options/portfile.cmake new file mode 100644 index 0000000..8a173ea --- /dev/null +++ b/vcpkg/ports/boost-program-options/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/program_options + REF boost-1.73.0 + SHA512 d89963d46dd2bb65de1b15b2a1d707b5824724faad34afb649393fb4a80dbc227ee80918c1b8747f8e1ede5e80bcf908a39baea2590d879b9e776354755293b8 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-property-map/CONTROL b/vcpkg/ports/boost-property-map/CONTROL new file mode 100644 index 0000000..58c5914 --- /dev/null +++ b/vcpkg/ports/boost-property-map/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-property-map +Version: 1.73.0 +Build-Depends: boost-any, boost-assert, boost-bind, boost-concept-check, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-multi-index, boost-optional, boost-serialization, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/property_map +Description: Boost property_map module diff --git a/vcpkg/ports/boost-property-map/portfile.cmake b/vcpkg/ports/boost-property-map/portfile.cmake new file mode 100644 index 0000000..17800f1 --- /dev/null +++ b/vcpkg/ports/boost-property-map/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/property_map + REF boost-1.73.0 + SHA512 e79ec94f850ebfcbb85c29536d552299c8d81e328b22a2690dbef1665ac2b4c2e2c33cf2577fd0800a04fc94fbf4b9b8aeafb3646736abf7739373d0760d4e91 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-property-tree/CONTROL b/vcpkg/ports/boost-property-tree/CONTROL new file mode 100644 index 0000000..ed7e3a4 --- /dev/null +++ b/vcpkg/ports/boost-property-tree/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-property-tree +Version: 1.73.0 +Build-Depends: boost-any, boost-assert, boost-bind, boost-compatibility, boost-config, boost-core, boost-format, boost-iterator, boost-mpl, boost-multi-index, boost-optional, boost-range, boost-serialization, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/property_tree +Description: Boost property_tree module diff --git a/vcpkg/ports/boost-property-tree/portfile.cmake b/vcpkg/ports/boost-property-tree/portfile.cmake new file mode 100644 index 0000000..21a6169 --- /dev/null +++ b/vcpkg/ports/boost-property-tree/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/property_tree + REF boost-1.73.0 + SHA512 67cdc239ea2535b4f2d364342b7cc4bac212ec2e97d4fcb624518b32cd9d014cf3f8c5d0f21d15f97c118b55c5c2a157e794f6a4c5698ac7e52ee2fc1fdaa4ac + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-proto/CONTROL b/vcpkg/ports/boost-proto/CONTROL new file mode 100644 index 0000000..f1ab493 --- /dev/null +++ b/vcpkg/ports/boost-proto/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-proto +Version: 1.73.0 +Build-Depends: boost-config, boost-core, boost-detail, boost-fusion, boost-mpl, boost-preprocessor, boost-range, boost-static-assert, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/proto +Description: Boost proto module diff --git a/vcpkg/ports/boost-proto/portfile.cmake b/vcpkg/ports/boost-proto/portfile.cmake new file mode 100644 index 0000000..3187f0c --- /dev/null +++ b/vcpkg/ports/boost-proto/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/proto + REF boost-1.73.0 + SHA512 e5faf783ed1f8830f641e42265ed50f5eb634ff6f0f3783268add5278889145e9c1554838b653d45770b5dfdfaa577f37567f40ab6c0f615d3d811229e18794a + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-ptr-container/CONTROL b/vcpkg/ports/boost-ptr-container/CONTROL new file mode 100644 index 0000000..248a331 --- /dev/null +++ b/vcpkg/ports/boost-ptr-container/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-ptr-container +Version: 1.73.0 +Build-Depends: boost-array, boost-assert, boost-circular-buffer, boost-config, boost-core, boost-iterator, boost-mpl, boost-range, boost-serialization, boost-smart-ptr, boost-static-assert, boost-type-traits, boost-unordered, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/ptr_container +Description: Boost ptr_container module diff --git a/vcpkg/ports/boost-ptr-container/portfile.cmake b/vcpkg/ports/boost-ptr-container/portfile.cmake new file mode 100644 index 0000000..dc0861d --- /dev/null +++ b/vcpkg/ports/boost-ptr-container/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/ptr_container + REF boost-1.73.0 + SHA512 342c9067dbeddc0a2b20b8493cd21ea9f65836260643a0e36fc6bff5ff3cb9c452382a2e4101fe8f472518dd49fffc915423bad7bc3edb5ebc915a917edb5d61 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-python/CONTROL b/vcpkg/ports/boost-python/CONTROL new file mode 100644 index 0000000..a8698de --- /dev/null +++ b/vcpkg/ports/boost-python/CONTROL @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-python +Version: 1.73.0 +Port-Version: 1 +Build-Depends: boost-bind, boost-compatibility, boost-config, boost-conversion, boost-core, boost-detail, boost-foreach, boost-function, boost-graph, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-numeric-conversion, boost-preprocessor, boost-property-map, boost-smart-ptr, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers, python3 +Homepage: https://github.com/boostorg/python +Description: Boost python module +Supports: !uwp&!(arm&windows) + +Feature: python2 +Build-Depends: python2 (windows) +Description: Build with Python2 support diff --git a/vcpkg/ports/boost-python/b2-options.cmake b/vcpkg/ports/boost-python/b2-options.cmake new file mode 100644 index 0000000..5cc0a8d --- /dev/null +++ b/vcpkg/ports/boost-python/b2-options.cmake @@ -0,0 +1,23 @@ +set(BUILD_PYTHON_VERSIONS) + +if("python2" IN_LIST FEATURES) + # Find Python2 libraries. Can't use find_package here, but we already know where everything is + file(GLOB VCPKG_PYTHON2_INCLUDE "${CURRENT_INSTALLED_DIR}/include/python2.*") + set(VCPKG_PYTHON2_LIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib") + set(VCPKG_PYTHON2_LIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib") + string(REGEX REPLACE ".*python([0-9\.]+).*" "\\1" VCPKG_PYTHON2_VERSION "${VCPKG_PYTHON2_INCLUDE}") + list(APPEND BUILD_PYTHON_VERSIONS "${VCPKG_PYTHON2_VERSION}") +endif() + +# Find Python3 libraries. Can't use find_package here, but we already know where everything is +file(GLOB VCPKG_PYTHON3_INCLUDE "${CURRENT_INSTALLED_DIR}/include/python3.*") +set(VCPKG_PYTHON3_LIBS_RELEASE "${CURRENT_INSTALLED_DIR}/lib") +set(VCPKG_PYTHON3_LIBS_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib") +string(REGEX REPLACE ".*python([0-9\.]+).*" "\\1" VCPKG_PYTHON3_VERSION "${VCPKG_PYTHON3_INCLUDE}") +list(APPEND BUILD_PYTHON_VERSIONS "${VCPKG_PYTHON3_VERSION}") + +string(REPLACE ";" "," BUILD_PYTHON_VERSIONS "${BUILD_PYTHON_VERSIONS}") + +list(APPEND B2_OPTIONS + python=${BUILD_PYTHON_VERSIONS} +) diff --git a/vcpkg/ports/boost-python/portfile.cmake b/vcpkg/ports/boost-python/portfile.cmake new file mode 100644 index 0000000..ee7885d --- /dev/null +++ b/vcpkg/ports/boost-python/portfile.cmake @@ -0,0 +1,17 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/python + REF boost-1.73.0 + SHA512 de3523e39814ab6d1bfd69e77983e31f43be16e57c2ad2fe0ff5b67bfcc03ed35ee90a0365acd62c05640e25de223e2885401d03fce62cde47ba3329ada6f495 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build( + SOURCE_PATH ${SOURCE_PATH} + BOOST_CMAKE_FRAGMENT "${CMAKE_CURRENT_LIST_DIR}/b2-options.cmake" +) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-qvm/CONTROL b/vcpkg/ports/boost-qvm/CONTROL new file mode 100644 index 0000000..e9ab139 --- /dev/null +++ b/vcpkg/ports/boost-qvm/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-qvm +Version: 1.73.0 +Build-Depends: boost-assert, boost-exception, boost-static-assert, boost-throw-exception, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/qvm +Description: Boost qvm module diff --git a/vcpkg/ports/boost-qvm/portfile.cmake b/vcpkg/ports/boost-qvm/portfile.cmake new file mode 100644 index 0000000..575c8f8 --- /dev/null +++ b/vcpkg/ports/boost-qvm/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/qvm + REF boost-1.73.0 + SHA512 c604bbabaae2edbc3a7a4fd86b7ae3698d3a69252d3e50c6c9f883e07e3639b0679a3c1ec6af07aaa34ae8e1d7ec2da3cac02a01ec9ba9b36b11e1738a149f45 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-random/CONTROL b/vcpkg/ports/boost-random/CONTROL new file mode 100644 index 0000000..f0d942e --- /dev/null +++ b/vcpkg/ports/boost-random/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-random +Version: 1.73.0 +Build-Depends: boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-dynamic-bitset, boost-integer, boost-io, boost-math, boost-modular-build-helper, boost-mpl, boost-multiprecision, boost-range, boost-static-assert, boost-system, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/random +Description: Boost random module diff --git a/vcpkg/ports/boost-random/portfile.cmake b/vcpkg/ports/boost-random/portfile.cmake new file mode 100644 index 0000000..eb7faf1 --- /dev/null +++ b/vcpkg/ports/boost-random/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/random + REF boost-1.73.0 + SHA512 ec6a1ea0bbc989f646f59b41286f578554b9c8c02489b3eca8af8affb3882ce4649a64403cef876f7b74b1b7cc3c64e57692634e0c75eb3c2a2a2811986d2bf8 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-range/CONTROL b/vcpkg/ports/boost-range/CONTROL new file mode 100644 index 0000000..e422cf7 --- /dev/null +++ b/vcpkg/ports/boost-range/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-range +Version: 1.73.0 +Build-Depends: boost-array, boost-assert, boost-concept-check, boost-config, boost-container-hash, boost-conversion, boost-core, boost-detail, boost-integer, boost-iterator, boost-mpl, boost-numeric-conversion, boost-optional, boost-preprocessor, boost-regex, boost-static-assert, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/range +Description: Boost range module diff --git a/vcpkg/ports/boost-range/portfile.cmake b/vcpkg/ports/boost-range/portfile.cmake new file mode 100644 index 0000000..b75b619 --- /dev/null +++ b/vcpkg/ports/boost-range/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/range + REF boost-1.73.0 + SHA512 39f5358b50f65df6e8fe69e940bf22e149e1ad1810d9b982918f812f73568e4dd001f3ce04ce248f2c472801efe5cf667f6342b01e01f64c726107ee1a143c7e + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-ratio/CONTROL b/vcpkg/ports/boost-ratio/CONTROL new file mode 100644 index 0000000..944b8ad --- /dev/null +++ b/vcpkg/ports/boost-ratio/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-ratio +Version: 1.73.0 +Build-Depends: boost-config, boost-core, boost-integer, boost-mpl, boost-rational, boost-static-assert, boost-type-traits, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/ratio +Description: Boost ratio module diff --git a/vcpkg/ports/boost-ratio/portfile.cmake b/vcpkg/ports/boost-ratio/portfile.cmake new file mode 100644 index 0000000..4486110 --- /dev/null +++ b/vcpkg/ports/boost-ratio/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/ratio + REF boost-1.73.0 + SHA512 8e3b203d120447c346b25272da821e8579e39427f5f6d66442ed10d0741c3fa80c4fc9b97a96cf15a22261d43a66ccc9700c390e34bda2ed3ae880c2ea7d04e3 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-rational/CONTROL b/vcpkg/ports/boost-rational/CONTROL new file mode 100644 index 0000000..ea951f5 --- /dev/null +++ b/vcpkg/ports/boost-rational/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-rational +Version: 1.73.0 +Build-Depends: boost-assert, boost-config, boost-integer, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/rational +Description: Boost rational module diff --git a/vcpkg/ports/boost-rational/portfile.cmake b/vcpkg/ports/boost-rational/portfile.cmake new file mode 100644 index 0000000..5b8b093 --- /dev/null +++ b/vcpkg/ports/boost-rational/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/rational + REF boost-1.73.0 + SHA512 4682947e78f2812346a299c561e36582540c8920801b120656883cc9f2d31654efdebe8698ce38c00637a38db761e85015806c0d6e6b1dad51419b047de5157b + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-regex/CONTROL b/vcpkg/ports/boost-regex/CONTROL new file mode 100644 index 0000000..16d9fea --- /dev/null +++ b/vcpkg/ports/boost-regex/CONTROL @@ -0,0 +1,10 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-regex +Version: 1.73.0 +Build-Depends: boost-assert, boost-build, boost-compatibility, boost-concept-check, boost-config, boost-container-hash, boost-core, boost-detail, boost-integer, boost-iterator, boost-modular-build-helper, boost-mpl, boost-predef, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/regex +Description: Boost regex module + +Feature: icu +Build-Depends: icu +Description: ICU backend for Boost.Regex diff --git a/vcpkg/ports/boost-regex/b2-options.cmake b/vcpkg/ports/boost-regex/b2-options.cmake new file mode 100644 index 0000000..2ab54b7 --- /dev/null +++ b/vcpkg/ports/boost-regex/b2-options.cmake @@ -0,0 +1,3 @@ +if("icu" IN_LIST FEATURES) + set(B2_REQUIREMENTS "/user-config//icuuc /user-config//icudt /user-config//icuin BOOST_HAS_ICU=1") +endif() diff --git a/vcpkg/ports/boost-regex/portfile.cmake b/vcpkg/ports/boost-regex/portfile.cmake new file mode 100644 index 0000000..7ef90f0 --- /dev/null +++ b/vcpkg/ports/boost-regex/portfile.cmake @@ -0,0 +1,17 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/regex + REF boost-1.73.0 + SHA512 4ff9559b925a4901bc98762ed0fa21fe19f27bdf3c49932285bac830d52ddcb0d3e3d3197581b655bc0ed720916d9d2242ace4567cc4d457d0eafdd822114418 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build( + SOURCE_PATH ${SOURCE_PATH} + BOOST_CMAKE_FRAGMENT "${CMAKE_CURRENT_LIST_DIR}/b2-options.cmake" +) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-safe-numerics/CONTROL b/vcpkg/ports/boost-safe-numerics/CONTROL new file mode 100644 index 0000000..1cbd56e --- /dev/null +++ b/vcpkg/ports/boost-safe-numerics/CONTROL @@ -0,0 +1,7 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-safe-numerics +Version: 1.73.0 +Port-Version: 1 +Build-Depends: boost-concept-check, boost-config, boost-core, boost-integer, boost-logic, boost-mp11, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/safe_numerics +Description: Boost safe_numerics module diff --git a/vcpkg/ports/boost-safe-numerics/portfile.cmake b/vcpkg/ports/boost-safe-numerics/portfile.cmake new file mode 100644 index 0000000..7913856 --- /dev/null +++ b/vcpkg/ports/boost-safe-numerics/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/safe_numerics + REF boost-1.73.0 + SHA512 1046d8f8a69137d260dc57dc183c1761dbfcf89479ef4e7112d91de82ff858e57f919db35729a648f972d946bfeaa3d8a9f80f85a9544d1a4b144f8c888a2ef8 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-scope-exit/CONTROL b/vcpkg/ports/boost-scope-exit/CONTROL new file mode 100644 index 0000000..3ce5556 --- /dev/null +++ b/vcpkg/ports/boost-scope-exit/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-scope-exit +Version: 1.73.0 +Build-Depends: boost-config, boost-detail, boost-function, boost-preprocessor, boost-typeof, boost-type-traits, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/scope_exit +Description: Boost scope_exit module diff --git a/vcpkg/ports/boost-scope-exit/portfile.cmake b/vcpkg/ports/boost-scope-exit/portfile.cmake new file mode 100644 index 0000000..6939227 --- /dev/null +++ b/vcpkg/ports/boost-scope-exit/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/scope_exit + REF boost-1.73.0 + SHA512 ede97c68a1132fb20d410fa1700c8e7bf32b1a3821d24cc6829886fa2523ec5cc32ea4287902d9a3dda5aae34acf87030341a228677d558837dd864dd0f4dcc3 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-serialization/CONTROL b/vcpkg/ports/boost-serialization/CONTROL new file mode 100644 index 0000000..98643d8 --- /dev/null +++ b/vcpkg/ports/boost-serialization/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-serialization +Version: 1.73.0 +Build-Depends: boost-array, boost-assert, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-function, boost-integer, boost-io, boost-iterator, boost-modular-build-helper, boost-move, boost-mpl, boost-optional, boost-predef, boost-preprocessor, boost-smart-ptr, boost-spirit, boost-static-assert, boost-type-traits, boost-unordered, boost-utility, boost-variant, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/serialization +Description: Boost serialization module diff --git a/vcpkg/ports/boost-serialization/portfile.cmake b/vcpkg/ports/boost-serialization/portfile.cmake new file mode 100644 index 0000000..c25fc4f --- /dev/null +++ b/vcpkg/ports/boost-serialization/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/serialization + REF boost-1.73.0 + SHA512 eb190ec91cfaa0de8a1060bf45f6dc6480e8a3844d59123722f1e8900cfda3080c919a542d3c4322ed4a6147acd5240d789e6d38f653507af61fedd77000c10f + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-signals/CONTROL b/vcpkg/ports/boost-signals/CONTROL new file mode 100644 index 0000000..3c69f3c --- /dev/null +++ b/vcpkg/ports/boost-signals/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-signals +Version: 1.68.0-1 +Build-Depends: boost-any, boost-build, boost-config, boost-core, boost-function, boost-iterator, boost-modular-build-helper, boost-optional, boost-smart-ptr, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/signals +Description: Boost signals module diff --git a/vcpkg/ports/boost-signals/portfile.cmake b/vcpkg/ports/boost-signals/portfile.cmake new file mode 100644 index 0000000..038d42d --- /dev/null +++ b/vcpkg/ports/boost-signals/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/signals + REF boost-1.68.0 + SHA512 3d5a26de28050e03779a26f6af5f96bdab0023d6be3047be9652a660c607e7839b46b3abb257ec5b1791e2e4dc5cbcbefe433244ddc6140ee64ae531b2c0b01d + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-signals2/CONTROL b/vcpkg/ports/boost-signals2/CONTROL new file mode 100644 index 0000000..0b14606 --- /dev/null +++ b/vcpkg/ports/boost-signals2/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-signals2 +Version: 1.73.0 +Build-Depends: boost-assert, boost-bind, boost-config, boost-core, boost-detail, boost-function, boost-iterator, boost-mpl, boost-optional, boost-parameter, boost-predef, boost-preprocessor, boost-smart-ptr, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-variant, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/signals2 +Description: Boost signals2 module diff --git a/vcpkg/ports/boost-signals2/portfile.cmake b/vcpkg/ports/boost-signals2/portfile.cmake new file mode 100644 index 0000000..cc6d34b --- /dev/null +++ b/vcpkg/ports/boost-signals2/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/signals2 + REF boost-1.73.0 + SHA512 a725caf89733b9180360d3d04747f8ef7fd68e5862814545a49f2bf1f2b262df77c4fa64b2434a876cb333be13916c8d2ec4e3a01bf877f0220240801fd87543 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-smart-ptr/CONTROL b/vcpkg/ports/boost-smart-ptr/CONTROL new file mode 100644 index 0000000..9432dbd --- /dev/null +++ b/vcpkg/ports/boost-smart-ptr/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-smart-ptr +Version: 1.73.0 +Build-Depends: boost-assert, boost-config, boost-core, boost-integer, boost-move, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/smart_ptr +Description: Boost smart_ptr module diff --git a/vcpkg/ports/boost-smart-ptr/portfile.cmake b/vcpkg/ports/boost-smart-ptr/portfile.cmake new file mode 100644 index 0000000..4403d24 --- /dev/null +++ b/vcpkg/ports/boost-smart-ptr/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/smart_ptr + REF boost-1.73.0 + SHA512 af5c90fc24e92055afd47b35d5ea30712f76347843eeafd934801fc06a0563feddefc3989b086d86d9935e02c33f2ad00af84d726b2c91f70d5f170642c589cf + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-sort/CONTROL b/vcpkg/ports/boost-sort/CONTROL new file mode 100644 index 0000000..e03f5a2 --- /dev/null +++ b/vcpkg/ports/boost-sort/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-sort +Version: 1.73.0 +Build-Depends: boost-integer, boost-range, boost-serialization, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/sort +Description: Boost sort module diff --git a/vcpkg/ports/boost-sort/portfile.cmake b/vcpkg/ports/boost-sort/portfile.cmake new file mode 100644 index 0000000..7deff36 --- /dev/null +++ b/vcpkg/ports/boost-sort/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/sort + REF boost-1.73.0 + SHA512 7a771fc0f49815b7df4213a92ed2a0ca6897523ebe28a5d00608949c94839ce167e9c8220f227b3dbbd04f300d915cc53a1501fcfb0f7ca9c7dc7fd2f3b26b1e + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-spirit/CONTROL b/vcpkg/ports/boost-spirit/CONTROL new file mode 100644 index 0000000..b7fef0c --- /dev/null +++ b/vcpkg/ports/boost-spirit/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-spirit +Version: 1.73.0 +Build-Depends: boost-array, boost-assert, boost-compatibility, boost-config, boost-core, boost-detail, boost-endian, boost-filesystem (!uwp), boost-foreach, boost-function, boost-function-types, boost-fusion, boost-integer, boost-io, boost-iostreams (!uwp), boost-iterator, boost-locale (!uwp), boost-math, boost-move, boost-mpl, boost-optional, boost-phoenix, boost-pool, boost-preprocessor, boost-proto, boost-range, boost-regex, boost-smart-ptr, boost-static-assert, boost-thread, boost-throw-exception, boost-typeof, boost-type-traits, boost-unordered, boost-utility, boost-variant, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/spirit +Description: Boost spirit module diff --git a/vcpkg/ports/boost-spirit/portfile.cmake b/vcpkg/ports/boost-spirit/portfile.cmake new file mode 100644 index 0000000..587cef8 --- /dev/null +++ b/vcpkg/ports/boost-spirit/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/spirit + REF boost-1.73.0 + SHA512 8080ebc70e590b98ffda162dcb36c45e2d0b654455f389ccb92643e9410915ec1a36c1c24fbd903d28832f965f3df22a08c56566d4a4023bb9feca1c9d548227 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-stacktrace/CONTROL b/vcpkg/ports/boost-stacktrace/CONTROL new file mode 100644 index 0000000..17cd4eb --- /dev/null +++ b/vcpkg/ports/boost-stacktrace/CONTROL @@ -0,0 +1,8 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-stacktrace +Version: 1.73.0 +Port-Version: 1 +Build-Depends: boost-array, boost-build, boost-config, boost-container-hash, boost-core, boost-modular-build-helper, boost-predef, boost-static-assert, boost-type-traits, boost-vcpkg-helpers, boost-winapi +Homepage: https://github.com/boostorg/stacktrace +Description: Boost stacktrace module +Supports: !uwp diff --git a/vcpkg/ports/boost-stacktrace/portfile.cmake b/vcpkg/ports/boost-stacktrace/portfile.cmake new file mode 100644 index 0000000..6d55d29 --- /dev/null +++ b/vcpkg/ports/boost-stacktrace/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/stacktrace + REF boost-1.73.0 + SHA512 9d42d9aa57ed12b8f2004d576a77f63ebf8b8f620c2ca319a77d75a55376a4fbbc360413ae25bbfeb63071abcaeabb3fc58031ca1103acce212de4cc35d1652d + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-statechart/CONTROL b/vcpkg/ports/boost-statechart/CONTROL new file mode 100644 index 0000000..7a67090 --- /dev/null +++ b/vcpkg/ports/boost-statechart/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-statechart +Version: 1.73.0 +Build-Depends: boost-assert, boost-bind, boost-config, boost-conversion, boost-core, boost-detail, boost-function, boost-mpl, boost-smart-ptr, boost-static-assert, boost-thread, boost-type-traits, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/statechart +Description: Boost statechart module diff --git a/vcpkg/ports/boost-statechart/portfile.cmake b/vcpkg/ports/boost-statechart/portfile.cmake new file mode 100644 index 0000000..ed0753f --- /dev/null +++ b/vcpkg/ports/boost-statechart/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/statechart + REF boost-1.73.0 + SHA512 911a4fc91281506b8d002bc965e547a2a7a2e2ecbcb9241cad2eee7aa59b35738061c68d82e0dc7f9ee0a44941f2c3ac264582769068a7804a3b9b00745b9255 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-static-assert/CONTROL b/vcpkg/ports/boost-static-assert/CONTROL new file mode 100644 index 0000000..94b4db7 --- /dev/null +++ b/vcpkg/ports/boost-static-assert/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-static-assert +Version: 1.73.0 +Build-Depends: boost-config, boost-detail, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/static_assert +Description: Boost static_assert module diff --git a/vcpkg/ports/boost-static-assert/portfile.cmake b/vcpkg/ports/boost-static-assert/portfile.cmake new file mode 100644 index 0000000..8df72cb --- /dev/null +++ b/vcpkg/ports/boost-static-assert/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/static_assert + REF boost-1.73.0 + SHA512 5087a93e277c4b40c61182add7daa9891adab992a3b06f3e587772565f4a59b9b0a0163d11278d10f8e58e7b73340386644e91fd86522e0d7dc14ee295801978 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-static-string/CONTROL b/vcpkg/ports/boost-static-string/CONTROL new file mode 100644 index 0000000..189847e --- /dev/null +++ b/vcpkg/ports/boost-static-string/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-static-string +Version: 1.73.0 +Build-Depends: boost-assert, boost-container-hash, boost-static-assert, boost-throw-exception, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/static_string +Description: Boost static_string module diff --git a/vcpkg/ports/boost-static-string/portfile.cmake b/vcpkg/ports/boost-static-string/portfile.cmake new file mode 100644 index 0000000..9582647 --- /dev/null +++ b/vcpkg/ports/boost-static-string/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/static_string + REF boost-1.73.0 + SHA512 b929dcbacebe9e754acb12a823078f79c5969636e208d7f050f8f80783f6fa86e57ae5591c0d424cd72438d26453d1f9337fbb3d5805185f244f17235ef36016 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-system/CONTROL b/vcpkg/ports/boost-system/CONTROL new file mode 100644 index 0000000..65ab14b --- /dev/null +++ b/vcpkg/ports/boost-system/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-system +Version: 1.73.0 +Build-Depends: boost-build, boost-config, boost-integer, boost-modular-build-helper, boost-vcpkg-helpers, boost-winapi +Homepage: https://github.com/boostorg/system +Description: Boost system module diff --git a/vcpkg/ports/boost-system/portfile.cmake b/vcpkg/ports/boost-system/portfile.cmake new file mode 100644 index 0000000..de154b8 --- /dev/null +++ b/vcpkg/ports/boost-system/portfile.cmake @@ -0,0 +1,16 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_buildpath_length_warning(37) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/system + REF boost-1.73.0 + SHA512 dd295f0388991b4957187e899d28bfa49a867b0887a3941784bf22fa01cb2028fbf453e341f1641260f6d360500f324ff8b43b92a0e15d876f45c28b415fdd86 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-test/CONTROL b/vcpkg/ports/boost-test/CONTROL new file mode 100644 index 0000000..8ef2c2b --- /dev/null +++ b/vcpkg/ports/boost-test/CONTROL @@ -0,0 +1,8 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-test +Version: 1.73.0 +Port-Version: 1 +Build-Depends: boost-algorithm, boost-assert, boost-bind, boost-build, boost-compatibility, boost-config, boost-core, boost-detail, boost-exception, boost-function, boost-integer, boost-io, boost-iterator, boost-modular-build-helper, boost-mpl, boost-numeric-conversion, boost-optional, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/test +Description: Boost test module +Supports: !uwp diff --git a/vcpkg/ports/boost-test/portfile.cmake b/vcpkg/ports/boost-test/portfile.cmake new file mode 100644 index 0000000..2a15e57 --- /dev/null +++ b/vcpkg/ports/boost-test/portfile.cmake @@ -0,0 +1,33 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/test + REF boost-1.73.0 + SHA512 153c58b1f94e85efd2c0c0561f9701ff69006936659eb8f2f416399c57ab6b7eca6ea70ba74c7837789eef13dccdfeb6dab641d65f1af94effd6ff831b31c53c + HEAD_REF master +) + +file(READ "${SOURCE_PATH}/build/Jamfile.v2" _contents) +string(REPLACE "import ../../predef/check/predef" "import predef/check/predef" _contents "${_contents}") +file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-predef/check" DESTINATION "${SOURCE_PATH}/build/predef") + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(GLOB MONITOR_LIBS ${CURRENT_PACKAGES_DIR}/lib/*_exec_monitor*) + file(COPY ${MONITOR_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(REMOVE ${MONITOR_LIBS}) +endif() + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(GLOB DEBUG_MONITOR_LIBS ${CURRENT_PACKAGES_DIR}/debug/lib/*_exec_monitor*) + file(COPY ${DEBUG_MONITOR_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(REMOVE ${DEBUG_MONITOR_LIBS}) +endif() + diff --git a/vcpkg/ports/boost-thread/CONTROL b/vcpkg/ports/boost-thread/CONTROL new file mode 100644 index 0000000..634ab04 --- /dev/null +++ b/vcpkg/ports/boost-thread/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-thread +Version: 1.73.0 +Build-Depends: boost-algorithm, boost-assert, boost-atomic, boost-bind, boost-build, boost-chrono, boost-concept-check, boost-config, boost-container, boost-container-hash, boost-core, boost-date-time, boost-detail, boost-exception, boost-function, boost-integer, boost-intrusive, boost-io, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-move, boost-optional, boost-predef, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-system, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-winapi +Homepage: https://github.com/boostorg/thread +Description: Boost thread module diff --git a/vcpkg/ports/boost-thread/b2-options.cmake b/vcpkg/ports/boost-thread/b2-options.cmake new file mode 100644 index 0000000..198b230 --- /dev/null +++ b/vcpkg/ports/boost-thread/b2-options.cmake @@ -0,0 +1,2 @@ +set(B2_REQUIREMENTS "/boost/date_time//boost_date_time") +list(APPEND B2_OPTIONS /boost/thread//boost_thread) diff --git a/vcpkg/ports/boost-thread/portfile.cmake b/vcpkg/ports/boost-thread/portfile.cmake new file mode 100644 index 0000000..de74f48 --- /dev/null +++ b/vcpkg/ports/boost-thread/portfile.cmake @@ -0,0 +1,17 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/thread + REF boost-1.73.0 + SHA512 732bf64b0c5ea8db327a429ba470e620ec0a8771e3fdaba9baf7080d0f4eb93f718813b7062881d3971bdf2b9254b460f82175d3f9fbd453a29153f87caa6c58 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build( + SOURCE_PATH ${SOURCE_PATH} + BOOST_CMAKE_FRAGMENT "${CMAKE_CURRENT_LIST_DIR}/b2-options.cmake" +) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-throw-exception/CONTROL b/vcpkg/ports/boost-throw-exception/CONTROL new file mode 100644 index 0000000..3f4d632 --- /dev/null +++ b/vcpkg/ports/boost-throw-exception/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-throw-exception +Version: 1.73.0 +Build-Depends: boost-assert, boost-config, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/throw_exception +Description: Boost throw_exception module diff --git a/vcpkg/ports/boost-throw-exception/portfile.cmake b/vcpkg/ports/boost-throw-exception/portfile.cmake new file mode 100644 index 0000000..51f8197 --- /dev/null +++ b/vcpkg/ports/boost-throw-exception/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/throw_exception + REF boost-1.73.0 + SHA512 3188f7ce95a14aa791ce75914d5c03efb09f2138b694de93ce42eb54492c9f4b2fb8f98d8fe9944a60902f67949de5da741f7b3979617ad7e26d5f505d96274d + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-timer/CONTROL b/vcpkg/ports/boost-timer/CONTROL new file mode 100644 index 0000000..063f50f --- /dev/null +++ b/vcpkg/ports/boost-timer/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-timer +Version: 1.73.0 +Build-Depends: boost-build, boost-chrono, boost-compatibility, boost-config, boost-core, boost-integer, boost-io, boost-modular-build-helper, boost-predef, boost-system, boost-throw-exception, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/timer +Description: Boost timer module diff --git a/vcpkg/ports/boost-timer/portfile.cmake b/vcpkg/ports/boost-timer/portfile.cmake new file mode 100644 index 0000000..ee109b9 --- /dev/null +++ b/vcpkg/ports/boost-timer/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/timer + REF boost-1.73.0 + SHA512 4449b93cb45e861348e071b90fec68e08ec9abe2628709db494904a52ac33f5bdc02306cc501f5ac8b7c561de3a656979002ba5c0c4b862e393f1fc77ebc5f28 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-tokenizer/CONTROL b/vcpkg/ports/boost-tokenizer/CONTROL new file mode 100644 index 0000000..e487b3d --- /dev/null +++ b/vcpkg/ports/boost-tokenizer/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-tokenizer +Version: 1.73.0 +Build-Depends: boost-assert, boost-config, boost-detail, boost-iterator, boost-mpl, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/tokenizer +Description: Boost tokenizer module diff --git a/vcpkg/ports/boost-tokenizer/portfile.cmake b/vcpkg/ports/boost-tokenizer/portfile.cmake new file mode 100644 index 0000000..505c613 --- /dev/null +++ b/vcpkg/ports/boost-tokenizer/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/tokenizer + REF boost-1.73.0 + SHA512 cef77b4fb338dfefac3dc0f7eeef99acc07dc7ae66795697f10b8ad595bec93ad5f3f0fe0c802651415ae2620856f6e3bbf1b0ed28dac9baa7685c2a98d581e4 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-tti/CONTROL b/vcpkg/ports/boost-tti/CONTROL new file mode 100644 index 0000000..9bdc467 --- /dev/null +++ b/vcpkg/ports/boost-tti/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-tti +Version: 1.73.0 +Build-Depends: boost-config, boost-detail, boost-function-types, boost-mpl, boost-preprocessor, boost-type-traits, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/tti +Description: Boost tti module diff --git a/vcpkg/ports/boost-tti/portfile.cmake b/vcpkg/ports/boost-tti/portfile.cmake new file mode 100644 index 0000000..4e0a8c1 --- /dev/null +++ b/vcpkg/ports/boost-tti/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/tti + REF boost-1.73.0 + SHA512 3f478dfa89102fcaa316fca0ad1d514a0dcc9408c48e4182d788949b13f318b237de53d41f1ba843c892522023d5d8efda8ae446672389d84f27d5d150a98ef7 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-tuple/CONTROL b/vcpkg/ports/boost-tuple/CONTROL new file mode 100644 index 0000000..840cbe2 --- /dev/null +++ b/vcpkg/ports/boost-tuple/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-tuple +Version: 1.73.0 +Build-Depends: boost-config, boost-core, boost-static-assert, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/tuple +Description: Boost tuple module diff --git a/vcpkg/ports/boost-tuple/portfile.cmake b/vcpkg/ports/boost-tuple/portfile.cmake new file mode 100644 index 0000000..965b172 --- /dev/null +++ b/vcpkg/ports/boost-tuple/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/tuple + REF boost-1.73.0 + SHA512 2c49dacacc6b59a3cf4d35987700901f33f705e0bff323ae86a1b629a7d2d9cb366adfc08cc3c7eafd28b819938bc14cc4887e7b60c1448c369ecfe795ed1600 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-type-erasure/CONTROL b/vcpkg/ports/boost-type-erasure/CONTROL new file mode 100644 index 0000000..40a10f2 --- /dev/null +++ b/vcpkg/ports/boost-type-erasure/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-type-erasure +Version: 1.73.0 +Build-Depends: boost-assert, boost-build, boost-config, boost-detail, boost-fusion, boost-iterator, boost-modular-build-helper, boost-mp11, boost-mpl, boost-preprocessor, boost-smart-ptr, boost-thread, boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers, boost-vmd +Homepage: https://github.com/boostorg/type_erasure +Description: Boost type_erasure module diff --git a/vcpkg/ports/boost-type-erasure/portfile.cmake b/vcpkg/ports/boost-type-erasure/portfile.cmake new file mode 100644 index 0000000..3e427b1 --- /dev/null +++ b/vcpkg/ports/boost-type-erasure/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/type_erasure + REF boost-1.73.0 + SHA512 69026dc42bbbf64378a3ca51e5493978dfc596fda21c7e246424ca9b914c3cb61cd49bbe85bbb04b32cd4bc8826052b212c267f2882195ecf22bb2dc1ea77be7 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-type-index/CONTROL b/vcpkg/ports/boost-type-index/CONTROL new file mode 100644 index 0000000..4b819a5 --- /dev/null +++ b/vcpkg/ports/boost-type-index/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-type-index +Version: 1.73.0 +Build-Depends: boost-config, boost-container-hash, boost-core, boost-preprocessor, boost-smart-ptr, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/type_index +Description: Boost type_index module diff --git a/vcpkg/ports/boost-type-index/portfile.cmake b/vcpkg/ports/boost-type-index/portfile.cmake new file mode 100644 index 0000000..0d5f780 --- /dev/null +++ b/vcpkg/ports/boost-type-index/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/type_index + REF boost-1.73.0 + SHA512 154336bc6c6c3161e5aeda10eb5bdf33dd543ba80c890cbad58ba9957c36766d7721c9c9f56b705806e2212687ed95ec8fdfe7b9585239d08916f80ab895b696 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-type-traits/CONTROL b/vcpkg/ports/boost-type-traits/CONTROL new file mode 100644 index 0000000..fcfe066 --- /dev/null +++ b/vcpkg/ports/boost-type-traits/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-type-traits +Version: 1.73.0 +Build-Depends: boost-config, boost-detail, boost-static-assert, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/type_traits +Description: Boost type_traits module diff --git a/vcpkg/ports/boost-type-traits/portfile.cmake b/vcpkg/ports/boost-type-traits/portfile.cmake new file mode 100644 index 0000000..1989066 --- /dev/null +++ b/vcpkg/ports/boost-type-traits/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/type_traits + REF boost-1.73.0 + SHA512 30a2c147c24f2fb94fafde5b359f0b71636a3b33067791f303bd51acb844c81787899ee177e68dffab23af89b578ba0b8dc778faff257075aafc72ca7e2b07c1 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-typeof/CONTROL b/vcpkg/ports/boost-typeof/CONTROL new file mode 100644 index 0000000..e199940 --- /dev/null +++ b/vcpkg/ports/boost-typeof/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-typeof +Version: 1.73.0 +Build-Depends: boost-config, boost-preprocessor, boost-type-traits, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/typeof +Description: Boost typeof module diff --git a/vcpkg/ports/boost-typeof/portfile.cmake b/vcpkg/ports/boost-typeof/portfile.cmake new file mode 100644 index 0000000..ddb292a --- /dev/null +++ b/vcpkg/ports/boost-typeof/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/typeof + REF boost-1.73.0 + SHA512 c5f113eeadf779f496870bb99d379d6659b3b0a89d184dc4711063686909391ce85bd96b87c5c05f7e60d05a73853318204851d37f5ea05d339a0ab9a7a6910f + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-ublas/CONTROL b/vcpkg/ports/boost-ublas/CONTROL new file mode 100644 index 0000000..8d8d071 --- /dev/null +++ b/vcpkg/ports/boost-ublas/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-ublas +Version: 1.73.0 +Build-Depends: boost-compute, boost-concept-check, boost-config, boost-core, boost-iterator, boost-mpl, boost-range, boost-serialization, boost-smart-ptr, boost-static-assert, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/ublas +Description: Boost ublas module diff --git a/vcpkg/ports/boost-ublas/portfile.cmake b/vcpkg/ports/boost-ublas/portfile.cmake new file mode 100644 index 0000000..81afb95 --- /dev/null +++ b/vcpkg/ports/boost-ublas/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/ublas + REF boost-1.73.0 + SHA512 5d007facbdf6188e9e712bf016955792fff7d528fc68e9708574d1d4c9818e250aecbc1bd42eced85c2a580f29d9d87bd35cbed4d9cfe50d18cd1377b723db29 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-uninstall/CONTROL b/vcpkg/ports/boost-uninstall/CONTROL new file mode 100644 index 0000000..8556583 --- /dev/null +++ b/vcpkg/ports/boost-uninstall/CONTROL @@ -0,0 +1,4 @@ +Source: boost-uninstall +Version: 1.73.0 +Homepage: https://boost.org +Description: boost uninstall port \ No newline at end of file diff --git a/vcpkg/ports/boost-uninstall/portfile.cmake b/vcpkg/ports/boost-uninstall/portfile.cmake new file mode 100644 index 0000000..a06925e --- /dev/null +++ b/vcpkg/ports/boost-uninstall/portfile.cmake @@ -0,0 +1,4 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +message(STATUS "\nPlease use the following command when you need to remove all boost ports/components:\n\ + \"./vcpkg remove boost-uninstall:${TARGET_TRIPLET} --recurse\"\n") diff --git a/vcpkg/ports/boost-units/CONTROL b/vcpkg/ports/boost-units/CONTROL new file mode 100644 index 0000000..6ef9d96 --- /dev/null +++ b/vcpkg/ports/boost-units/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-units +Version: 1.73.0 +Build-Depends: boost-assert, boost-config, boost-core, boost-integer, boost-io, boost-lambda, boost-math, boost-mpl, boost-preprocessor, boost-serialization, boost-static-assert, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/units +Description: Boost units module diff --git a/vcpkg/ports/boost-units/portfile.cmake b/vcpkg/ports/boost-units/portfile.cmake new file mode 100644 index 0000000..ee16b7f --- /dev/null +++ b/vcpkg/ports/boost-units/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/units + REF boost-1.73.0 + SHA512 8137a82f4fdc3b204cc2879b2fc929b5c6937235bc3cdcda6419e84cc0b69ac523e6d18024c00bbff643a1f8561db4a46c00d3247314ad229c2b30f16676bc82 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-unordered/CONTROL b/vcpkg/ports/boost-unordered/CONTROL new file mode 100644 index 0000000..18a671b --- /dev/null +++ b/vcpkg/ports/boost-unordered/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-unordered +Version: 1.73.0 +Build-Depends: boost-assert, boost-compatibility, boost-config, boost-container, boost-container-hash, boost-core, boost-detail, boost-functional, boost-move, boost-predef, boost-preprocessor, boost-smart-ptr, boost-throw-exception, boost-tuple, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/unordered +Description: Boost unordered module diff --git a/vcpkg/ports/boost-unordered/portfile.cmake b/vcpkg/ports/boost-unordered/portfile.cmake new file mode 100644 index 0000000..f1feb46 --- /dev/null +++ b/vcpkg/ports/boost-unordered/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/unordered + REF boost-1.73.0 + SHA512 81bc6f4bfcdf6d75ac59e3bb726789281c022a3d306d59e086cbeb84eec2b0f264df7127a5c65dd19ca872bae635ba2219f9914b2d7056373779f1c00a8313df + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-utility/CONTROL b/vcpkg/ports/boost-utility/CONTROL new file mode 100644 index 0000000..ea7aed6 --- /dev/null +++ b/vcpkg/ports/boost-utility/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-utility +Version: 1.73.0 +Build-Depends: boost-config, boost-container-hash, boost-core, boost-detail, boost-integer, boost-io, boost-preprocessor, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/utility +Description: Boost utility module diff --git a/vcpkg/ports/boost-utility/portfile.cmake b/vcpkg/ports/boost-utility/portfile.cmake new file mode 100644 index 0000000..33ee50f --- /dev/null +++ b/vcpkg/ports/boost-utility/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/utility + REF boost-1.73.0 + SHA512 0f125259b1a23473b14dc45ad459d9bce1188b97747cbb0dec05bbea55babbf46fa7767a99f9e4eafce777edc11af5d8d5be408832c79dbcfa6568eab2596ce7 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-uuid/CONTROL b/vcpkg/ports/boost-uuid/CONTROL new file mode 100644 index 0000000..439db78 --- /dev/null +++ b/vcpkg/ports/boost-uuid/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-uuid +Version: 1.73.0 +Build-Depends: boost-assert, boost-compatibility, boost-config, boost-container-hash, boost-conversion, boost-core, boost-integer, boost-io, boost-move, boost-numeric-conversion, boost-predef, boost-random, boost-serialization, boost-static-assert, boost-throw-exception, boost-tti, boost-type-traits, boost-vcpkg-helpers, boost-winapi +Homepage: https://github.com/boostorg/uuid +Description: Boost uuid module diff --git a/vcpkg/ports/boost-uuid/portfile.cmake b/vcpkg/ports/boost-uuid/portfile.cmake new file mode 100644 index 0000000..384c3d6 --- /dev/null +++ b/vcpkg/ports/boost-uuid/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/uuid + REF boost-1.73.0 + SHA512 68e4cb97d3e4080a6f1e72c91b823f423c9f4119bd2570086dcd14b723ea8500a8a2872d6ba4adf7a8a1119c6ac1f15dabd35795c00ba736cfb13933df75bd0a + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-variant/CONTROL b/vcpkg/ports/boost-variant/CONTROL new file mode 100644 index 0000000..a86a288 --- /dev/null +++ b/vcpkg/ports/boost-variant/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-variant +Version: 1.73.0 +Build-Depends: boost-assert, boost-bind, boost-config, boost-core, boost-detail, boost-functional, boost-integer, boost-move, boost-mpl, boost-preprocessor, boost-static-assert, boost-throw-exception, boost-type-index, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/variant +Description: Boost variant module diff --git a/vcpkg/ports/boost-variant/portfile.cmake b/vcpkg/ports/boost-variant/portfile.cmake new file mode 100644 index 0000000..8f7164d --- /dev/null +++ b/vcpkg/ports/boost-variant/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/variant + REF boost-1.73.0 + SHA512 008e8bbefd30a4dfe33d43b549cbd8897e434080816ceb7e74aee801b05e2ba2e3931c5533a06b56033ebc6b21b47f2c1f77379b82c0f1a5211f07301c0ab73b + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-variant2/CONTROL b/vcpkg/ports/boost-variant2/CONTROL new file mode 100644 index 0000000..4dd1a19 --- /dev/null +++ b/vcpkg/ports/boost-variant2/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-variant2 +Version: 1.73.0 +Build-Depends: boost-config, boost-detail, boost-integer, boost-mp11, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/variant2 +Description: Boost variant2 module diff --git a/vcpkg/ports/boost-variant2/portfile.cmake b/vcpkg/ports/boost-variant2/portfile.cmake new file mode 100644 index 0000000..7fa405d --- /dev/null +++ b/vcpkg/ports/boost-variant2/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/variant2 + REF boost-1.73.0 + SHA512 5f5195ebcfc8f9a266541e9556332bb61a1a99c5636e59c9e4fd42525c9f06856cd64bd0aa975cc77321e181c3490b2cef7dc55c5eb43666ca3ca0c606a27ec5 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-vcpkg-helpers/CONTROL b/vcpkg/ports/boost-vcpkg-helpers/CONTROL new file mode 100644 index 0000000..1b1642e --- /dev/null +++ b/vcpkg/ports/boost-vcpkg-helpers/CONTROL @@ -0,0 +1,5 @@ +Source: boost-vcpkg-helpers +Version: 7 +Port-Version: 1 +Description: a set of vcpkg-internal scripts used to modularize boost +Build-Depends: boost-uninstall \ No newline at end of file diff --git a/vcpkg/ports/boost-vcpkg-helpers/boost-modular-headers.cmake b/vcpkg/ports/boost-vcpkg-helpers/boost-modular-headers.cmake new file mode 100644 index 0000000..bb29615 --- /dev/null +++ b/vcpkg/ports/boost-vcpkg-helpers/boost-modular-headers.cmake @@ -0,0 +1,24 @@ +function(boost_modular_headers) + cmake_parse_arguments(_bm "" "SOURCE_PATH" "" ${ARGN}) + + if(NOT DEFINED _bm_SOURCE_PATH) + message(FATAL_ERROR "SOURCE_PATH is a required argument to boost_modular_headers.") + endif() + + message(STATUS "Packaging headers") + + file( + COPY ${_bm_SOURCE_PATH}/include/boost + DESTINATION ${CURRENT_PACKAGES_DIR}/include + ) + + message(STATUS "Packaging headers done") + + vcpkg_download_distfile(ARCHIVE + URLS "https://raw.githubusercontent.com/boostorg/boost/boost-1.73.0/LICENSE_1_0.txt" + FILENAME "boost_LICENSE_1_0.txt" + SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 + ) + + file(INSTALL ${ARCHIVE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +endfunction() diff --git a/vcpkg/ports/boost-vcpkg-helpers/portfile.cmake b/vcpkg/ports/boost-vcpkg-helpers/portfile.cmake new file mode 100644 index 0000000..32f501f --- /dev/null +++ b/vcpkg/ports/boost-vcpkg-helpers/portfile.cmake @@ -0,0 +1,7 @@ + +file( + COPY ${CMAKE_CURRENT_LIST_DIR}/boost-modular-headers.cmake + DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-vcpkg-helpers +) + +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/vcpkg/ports/boost-vmd/CONTROL b/vcpkg/ports/boost-vmd/CONTROL new file mode 100644 index 0000000..6dc0ae4 --- /dev/null +++ b/vcpkg/ports/boost-vmd/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-vmd +Version: 1.73.0 +Build-Depends: boost-preprocessor, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/vmd +Description: Boost vmd module diff --git a/vcpkg/ports/boost-vmd/portfile.cmake b/vcpkg/ports/boost-vmd/portfile.cmake new file mode 100644 index 0000000..e36dca1 --- /dev/null +++ b/vcpkg/ports/boost-vmd/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/vmd + REF boost-1.73.0 + SHA512 84c693988230f1f0e77d098157ed3d47b7c196a26515f4d0a7f8884affa206a5f9baee46a8e1c611dc34d1b6b2675cadd5aa25f97c11421404d1ea6e4473ba09 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-wave/CONTROL b/vcpkg/ports/boost-wave/CONTROL new file mode 100644 index 0000000..7ed072e --- /dev/null +++ b/vcpkg/ports/boost-wave/CONTROL @@ -0,0 +1,8 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-wave +Version: 1.73.0 +Port-Version: 1 +Build-Depends: boost-assert, boost-build, boost-concept-check, boost-config, boost-core, boost-detail, boost-filesystem (!uwp), boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-modular-build-helper, boost-mpl, boost-multi-index, boost-pool, boost-preprocessor, boost-serialization, boost-smart-ptr, boost-spirit, boost-static-assert, boost-throw-exception, boost-type-traits, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/wave +Description: Boost wave module +Supports: !uwp diff --git a/vcpkg/ports/boost-wave/portfile.cmake b/vcpkg/ports/boost-wave/portfile.cmake new file mode 100644 index 0000000..0f78bcd --- /dev/null +++ b/vcpkg/ports/boost-wave/portfile.cmake @@ -0,0 +1,14 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/wave + REF boost-1.73.0 + SHA512 e3afd44ae4a15456592660f87c0f2cbe8b23a3084efeacbb33efa039766eaa7e197f4f8ac64477d9667b6be81a4cf97ac85e8eaac7ba369900dce3ad3436b6e4 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake) +boost_modular_build(SOURCE_PATH ${SOURCE_PATH}) +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-winapi/CONTROL b/vcpkg/ports/boost-winapi/CONTROL new file mode 100644 index 0000000..808385e --- /dev/null +++ b/vcpkg/ports/boost-winapi/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-winapi +Version: 1.73.0 +Build-Depends: boost-config, boost-predef, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/winapi +Description: Boost winapi module diff --git a/vcpkg/ports/boost-winapi/portfile.cmake b/vcpkg/ports/boost-winapi/portfile.cmake new file mode 100644 index 0000000..ec133df --- /dev/null +++ b/vcpkg/ports/boost-winapi/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/winapi + REF boost-1.73.0 + SHA512 468c6f3403f1535dad26c122b8c405597eb0c1d58cbc39b646367110b07cc925a6e992ed92976874c2df0f8c1b848d82c3f4252124ed122e9513f9502ec5dfef + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-xpressive/CONTROL b/vcpkg/ports/boost-xpressive/CONTROL new file mode 100644 index 0000000..9c660df --- /dev/null +++ b/vcpkg/ports/boost-xpressive/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-xpressive +Version: 1.73.0 +Build-Depends: boost-assert, boost-compatibility, boost-config, boost-conversion, boost-core, boost-detail, boost-exception, boost-fusion, boost-integer, boost-iterator, boost-lexical-cast, boost-math, boost-mpl, boost-numeric-conversion, boost-optional, boost-preprocessor, boost-proto, boost-range, boost-smart-ptr, boost-spirit, boost-static-assert, boost-throw-exception, boost-typeof, boost-type-traits, boost-utility, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/xpressive +Description: Boost xpressive module diff --git a/vcpkg/ports/boost-xpressive/portfile.cmake b/vcpkg/ports/boost-xpressive/portfile.cmake new file mode 100644 index 0000000..7e9e3e9 --- /dev/null +++ b/vcpkg/ports/boost-xpressive/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/xpressive + REF boost-1.73.0 + SHA512 1d2cab3db72502d7d926861bc468a1266eb9031a64816a88b61f669bfe370237a4836962af6afe565d51435e924809ca41f46fecfc99464e88053699eec9a4b6 + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost-yap/CONTROL b/vcpkg/ports/boost-yap/CONTROL new file mode 100644 index 0000000..e103642 --- /dev/null +++ b/vcpkg/ports/boost-yap/CONTROL @@ -0,0 +1,6 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost-yap +Version: 1.73.0 +Build-Depends: boost-hana, boost-preprocessor, boost-type-index, boost-vcpkg-helpers +Homepage: https://github.com/boostorg/yap +Description: Boost yap module diff --git a/vcpkg/ports/boost-yap/portfile.cmake b/vcpkg/ports/boost-yap/portfile.cmake new file mode 100644 index 0000000..f2fbaec --- /dev/null +++ b/vcpkg/ports/boost-yap/portfile.cmake @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO boostorg/yap + REF boost-1.73.0 + SHA512 f228ba3255f91cdd503a8fdf9f881dc608f1730bda685aca0e1638cd96add9194a250da154b4ce1ae3438ba92c88572f666eda2893ac9d53e6a4b1827d55a06b + HEAD_REF master +) + +include(${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake) +boost_modular_headers(SOURCE_PATH ${SOURCE_PATH}) diff --git a/vcpkg/ports/boost/0001-Fix-boost-ICU-support.patch b/vcpkg/ports/boost/0001-Fix-boost-ICU-support.patch new file mode 100644 index 0000000..1952f5a --- /dev/null +++ b/vcpkg/ports/boost/0001-Fix-boost-ICU-support.patch @@ -0,0 +1,166 @@ +--- + libs/locale/build/Jamfile.v2 | 63 ++++++-------------------------------- + libs/locale/build/has_icu_test.cpp | 4 --- + libs/regex/build/Jamfile.v2 | 47 +++++++--------------------- + 3 files changed, 20 insertions(+), 94 deletions(-) + +diff --git a/libs/locale/build/Jamfile.v2 b/libs/locale/build/Jamfile.v2 +index 578e722..5f25917 100644 +--- a/libs/locale/build/Jamfile.v2 ++++ b/libs/locale/build/Jamfile.v2 +@@ -70,62 +70,17 @@ if $(ICU_LINK) + } + else + { +- searched-lib icuuc : : icuuc +- $(ICU_PATH)/lib +- shared +- shared ; +- +- searched-lib icuuc : : msvc +- debug +- icuucd +- $(ICU_PATH)/lib +- shared +- shared ; +- +- searched-lib icuuc : : this_is_an_invalid_library_name ; +- +- searched-lib icudt : : $(ICU_PATH)/lib +- icudata +- shared +- shared ; +- +- searched-lib icudt : : $(ICU_PATH)/lib +- icudt +- msvc +- shared +- shared ; +- +- searched-lib icudt : : this_is_an_invalid_library_name ; +- +- searched-lib icuin : : $(ICU_PATH)/lib +- icui18n +- shared +- shared ; +- +- searched-lib icuin : : msvc +- debug +- icuind +- $(ICU_PATH)/lib +- shared +- shared ; +- +- searched-lib icuin : : msvc +- release +- icuin +- $(ICU_PATH)/lib +- shared +- shared ; +- +- searched-lib icuin : : this_is_an_invalid_library_name ; +- +- explicit icuuc icudt icuin ; ++ alias icuuc : /user-config//icuuc ; ++ alias icuin : /user-config//icuin ; ++ alias icudt : /user-config//icudt ; ++ ++ explicit icuuc icuin icudt ; + + ICU_OPTS = $(ICU_PATH)/include +- icuuc/shared/shared +- icudt/shared/shared +- icuin/shared/shared +- $(ICU_PATH)/bin +- shared ; ++ icuuc ++ icuin ++ icudt ++ $(ICU_PATH)/bin ; + + + +diff --git a/libs/locale/build/has_icu_test.cpp b/libs/locale/build/has_icu_test.cpp +index 9419b30..ed9be05 100644 +--- a/libs/locale/build/has_icu_test.cpp ++++ b/libs/locale/build/has_icu_test.cpp +@@ -15,10 +15,6 @@ + #include + #include + +-#if defined(_MSC_VER) && !defined(_DLL) +-#error "Mixing ICU with a static runtime doesn't work" +-#endif +- + int main() + { + icu::Locale loc; +diff --git a/libs/regex/build/Jamfile.v2 b/libs/regex/build/Jamfile.v2 +index 58fd1fb..76ee9f4 100644 +--- a/libs/regex/build/Jamfile.v2 ++++ b/libs/regex/build/Jamfile.v2 +@@ -48,50 +48,25 @@ if ! $(disable-icu) + } + else + { +- lib icuuc : : shared @path_options ; +- lib icuuc : : msvc debug icuucd shared @path_options ; +- lib icuuc : : intel windows debug icuucd shared @path_options ; +- lib icuuc : : sicuuc static @path_options ; +- lib icuuc : : msvc debug sicuucd static @path_options ; +- lib icuuc : : intel windows debug sicuucd static @path_options ; +- lib icuuc : : this_is_an_invalid_library_name ; +- +- lib icudt : : icudata shared @path_options ; +- lib icudt : : icudt msvc shared @path_options ; +- lib icudt : : icudt intel windows shared @path_options ; +- lib icudt : : sicudata static @path_options ; +- lib icudt : : sicudt msvc static @path_options ; +- lib icudt : : sicudt intel windows static @path_options ; +- lib icudt : : this_is_an_invalid_library_name ; +- +- lib icuin : : icui18n shared @path_options ; +- lib icuin : : msvc debug icuind shared @path_options ; +- lib icuin : : msvc icuin shared @path_options ; +- lib icuin : : intel windows debug icuind shared @path_options ; +- lib icuin : : intel windows icuin shared @path_options ; +- lib icuin : : sicui18n static @path_options ; +- lib icuin : : msvc debug sicuind static @path_options ; +- lib icuin : : msvc sicuin static @path_options ; +- lib icuin : : intel windows debug sicuind static @path_options ; +- lib icuin : : intel windows sicuin static @path_options ; +- lib icuin : : this_is_an_invalid_library_name ; ++ ++ alias icuuc : /user-config//icuuc ; ++ alias icuin : /user-config//icuin ; ++ alias icudt : /user-config//icudt ; ++ ++ explicit icuuc icuin icudt ; + + ICU_OPTS = + $(ICU_PATH)/include +- shared:icuuc/shared +- shared:icudt/shared +- shared:icuin/shared +- static:icuuc +- static:icudt +- static:icuin +- BOOST_HAS_ICU=1 +- static:U_STATIC_IMPLEMENTATION=1 ++ icuuc ++ icudt ++ icuin ++ BOOST_HAS_ICU=1 + ; + } + + } + +-unit-test has_icu : has_icu_test.cpp : $(ICU_OPTS) ; ++exe has_icu : has_icu_test.cpp : $(ICU_OPTS) ; + explicit has_icu ; + + alias icu_options : : : : [ check-target-builds has_icu : $(ICU_OPTS) : ] ; +-- +2.12.2.windows.2 + diff --git a/vcpkg/ports/boost/CONTROL b/vcpkg/ports/boost/CONTROL new file mode 100644 index 0000000..8a77879 --- /dev/null +++ b/vcpkg/ports/boost/CONTROL @@ -0,0 +1,12 @@ +# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1 +Source: boost +Version: 1.73.0 +Port-Version: 3 +Homepage: https://boost.org +Description: Peer-reviewed portable C++ source libraries +Build-Depends: boost-accumulators, boost-algorithm, boost-align, boost-any, boost-array, boost-asio, boost-assert, boost-assign, boost-atomic, boost-beast, boost-bimap, boost-bind, boost-callable-traits, boost-chrono, boost-circular-buffer, boost-compatibility, boost-compute, boost-concept-check, boost-config, boost-container, boost-container-hash, boost-context (!uwp), boost-contract, boost-conversion, boost-convert, boost-core, boost-coroutine (!arm&!uwp), boost-coroutine2, boost-crc, boost-date-time, boost-detail, boost-dll, boost-dynamic-bitset, boost-endian, boost-exception, boost-fiber (!osx&!uwp&!arm), boost-filesystem (!uwp), boost-flyweight, boost-foreach, boost-format, boost-function, boost-functional, boost-function-types, boost-fusion, boost-geometry, boost-gil, boost-graph, boost-graph-parallel, boost-hana, boost-heap, boost-histogram, boost-hof, boost-icl, boost-integer, boost-interprocess, boost-intrusive, boost-io, boost-iostreams (!uwp), boost-iterator, boost-lambda, boost-lexical-cast, boost-locale (!uwp), boost-local-function, boost-lockfree, boost-log (!uwp), boost-logic, boost-math, boost-metaparse, boost-move, boost-mp11, boost-mpl, boost-msm, boost-multiprecision, boost-multi-array, boost-multi-index, boost-nowide, boost-numeric-conversion, boost-interval, boost-odeint, boost-ublas, boost-safe-numerics, boost-optional, boost-outcome, boost-parameter, boost-parameter-python, boost-phoenix, boost-polygon, boost-poly-collection, boost-pool, boost-predef, boost-preprocessor, boost-process, boost-program-options, boost-property-map, boost-property-tree, boost-proto, boost-ptr-container, boost-python (!uwp&!(arm&windows)), boost-qvm, boost-random, boost-range, boost-ratio, boost-rational, boost-regex, boost-numeric-conversion, boost-interval, boost-odeint, boost-ublas, boost-safe-numerics, boost-scope-exit, boost-serialization, boost-signals2, boost-smart-ptr, boost-sort, boost-spirit, boost-stacktrace (!uwp), boost-statechart, boost-static-assert, boost-static-string, boost-system, boost-test (!uwp), boost-thread, boost-throw-exception, boost-timer, boost-tokenizer, boost-tti, boost-tuple, boost-typeof, boost-type-erasure, boost-type-index, boost-type-traits, boost-units, boost-unordered, boost-utility, boost-uuid, boost-variant, boost-variant2, boost-vmd, boost-wave (!uwp), boost-winapi, boost-xpressive, boost-yap + + +Feature: mpi +Description: Build with MPI support +Build-Depends: boost-mpi diff --git a/vcpkg/ports/boost/desktop/user-config.jam b/vcpkg/ports/boost/desktop/user-config.jam new file mode 100644 index 0000000..311cc89 --- /dev/null +++ b/vcpkg/ports/boost/desktop/user-config.jam @@ -0,0 +1,38 @@ +using msvc : 14.0 : cl.exe : +echo +; + +using msvc : 14.1 : cl.exe : +echo +; + +using python : @PYTHON_VERSION@ : : "@PYTHON_INCLUDE_PATH@" : "@PYTHONLIBS_RELEASE@" ; +using python : @PYTHON_VERSION@ : : "@PYTHON_INCLUDE_PATH@" : "@PYTHONLIBS_DEBUG@" : on ; + +project user-config ; +lib advapi32 ; +lib icuuc : : "@CURRENT_INSTALLED_DIR@/lib" : : + "@LIB_RUNTIME_LINK@" + advapi32 ; + +lib icuuc : : "@CURRENT_INSTALLED_DIR@/debug/lib" + debug + icuucd : : + "@LIB_RUNTIME_LINK@" + advapi32 ; + +lib icuin : : "@CURRENT_INSTALLED_DIR@/lib" : : + "@LIB_RUNTIME_LINK@" ; + +lib icuin : : "@CURRENT_INSTALLED_DIR@/debug/lib" + debug + icuind : : + "@LIB_RUNTIME_LINK@" ; + +lib icudt : : "@CURRENT_INSTALLED_DIR@/lib" : : + "@LIB_RUNTIME_LINK@" ; + +lib icudt : : "@CURRENT_INSTALLED_DIR@/debug/lib" + debug + icudtd : : + "@LIB_RUNTIME_LINK@" ; \ No newline at end of file diff --git a/vcpkg/ports/boost/portfile.cmake b/vcpkg/ports/boost/portfile.cmake new file mode 100644 index 0000000..0283a20 --- /dev/null +++ b/vcpkg/ports/boost/portfile.cmake @@ -0,0 +1,2 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + diff --git a/vcpkg/ports/boost/usage b/vcpkg/ports/boost/usage new file mode 100644 index 0000000..28d4290 --- /dev/null +++ b/vcpkg/ports/boost/usage @@ -0,0 +1,5 @@ +The package boost is compatible with built-in CMake targets: + + find_package(Boost REQUIRED [COMPONENTS ...]) + target_link_libraries(main PRIVATE ${Boost_LIBRARIES}) + target_include_directories(main PRIVATE ${Boost_INCLUDE_DIRS}) diff --git a/vcpkg/ports/boost/uwp/user-config.jam b/vcpkg/ports/boost/uwp/user-config.jam new file mode 100644 index 0000000..975b1d4 --- /dev/null +++ b/vcpkg/ports/boost/uwp/user-config.jam @@ -0,0 +1,23 @@ +using msvc : 14.0 : cl.exe : +echo +"\"/AI@PLATFORM_WINMD_DIR@\"" +kernel32.lib +RuntimeObject.lib +ole32.lib +; + +using msvc : 14.1 : cl.exe : +echo +"\"/AI@PLATFORM_WINMD_DIR@\"" +kernel32.lib +RuntimeObject.lib +ole32.lib +; + +project user-config ; + +lib icuuc : : dummy_lib_that_doesnt_exist ; + +lib icuin : : dummy_lib_that_doesnt_exist ; + +lib icudt : : dummy_lib_that_doesnt_exist ; \ No newline at end of file diff --git a/vcpkg/ports/boringssl/0001-vcpkg.patch b/vcpkg/ports/boringssl/0001-vcpkg.patch new file mode 100644 index 0000000..88547d8 --- /dev/null +++ b/vcpkg/ports/boringssl/0001-vcpkg.patch @@ -0,0 +1,32 @@ +diff --git i/CMakeLists.txt w/CMakeLists.txt +index 75bf9981b..15589a760 100644 +--- i/CMakeLists.txt ++++ w/CMakeLists.txt +@@ -564,7 +564,7 @@ endif() + + # Add minimal googletest targets. The provided one has many side-effects, and + # googletest has a very straightforward build. +-add_library(boringssl_gtest third_party/googletest/src/gtest-all.cc) ++add_library(boringssl_gtest STATIC third_party/googletest/src/gtest-all.cc) + target_include_directories(boringssl_gtest PRIVATE third_party/googletest) + + include_directories(third_party/googletest/include) +@@ -621,3 +621,18 @@ add_custom_target( + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + DEPENDS all_tests bssl_shim handshaker + ${MAYBE_USES_TERMINAL}) ++ ++install(TARGETS crypto ssl ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) ++ ++option(INSTALL_HEADERS "Install headers" ON) ++if(INSTALL_HEADERS) ++ install(DIRECTORY include/ DESTINATION include) ++endif() ++ ++option(INSTALL_TOOLS "Install bssl executable" OFF) ++if(INSTALL_TOOLS) ++ install(TARGETS bssl DESTINATION tools/boringssl) ++endif() diff --git a/vcpkg/ports/boringssl/0002-disable-waring-4065.patch b/vcpkg/ports/boringssl/0002-disable-waring-4065.patch new file mode 100644 index 0000000..88ffffa --- /dev/null +++ b/vcpkg/ports/boringssl/0002-disable-waring-4065.patch @@ -0,0 +1,15 @@ +diff --git a/decrepit/CMakeLists.txt b/decrepit/CMakeLists.txt +index ef95a6b..0b52c05 100644 +--- a/decrepit/CMakeLists.txt ++++ b/decrepit/CMakeLists.txt +@@ -40,6 +40,10 @@ add_executable( + + add_dependencies(decrepit_test global_target) + ++if(MSVC) ++ target_compile_options(decrepit PRIVATE /wd4065) ++endif() ++ + target_link_libraries(decrepit_test test_support_lib boringssl_gtest decrepit + crypto) + if(WIN32) diff --git a/vcpkg/ports/boringssl/CONTROL b/vcpkg/ports/boringssl/CONTROL new file mode 100644 index 0000000..1c8c4dc --- /dev/null +++ b/vcpkg/ports/boringssl/CONTROL @@ -0,0 +1,9 @@ +Source: boringssl +Version: 2020-04-07 +Port-Version: 2 +Homepage: https://boringssl.googlesource.com/boringssl +Description: BoringSSl is a fork of OpenSSL developed by Google +Supports: !uwp + +Feature: tools +Description: Build bssl executable diff --git a/vcpkg/ports/boringssl/portfile.cmake b/vcpkg/ports/boringssl/portfile.cmake new file mode 100644 index 0000000..80068da --- /dev/null +++ b/vcpkg/ports/boringssl/portfile.cmake @@ -0,0 +1,50 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h") + message(FATAL_ERROR "Can't build BoringSSL if OpenSSL is installed. Please remove OpenSSL, and try to install BoringSSL again if you need it. Build will continue since BoringSSL is a drop-in replacement for OpenSSL") +endif() + +vcpkg_find_acquire_program(PERL) +get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) +vcpkg_add_to_path(${PERL_EXE_PATH}) + +vcpkg_find_acquire_program(NASM) +get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) +vcpkg_add_to_path(${NASM_EXE_PATH}) + +vcpkg_find_acquire_program(GO) +get_filename_component(GO_EXE_PATH ${GO} DIRECTORY) +vcpkg_add_to_path(${GO_EXE_PATH}) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tools INSTALL_TOOLS +) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/boringssl + REF 5902657734e2a796a514731e0fd0e80081ae43dc + SHA512 89458748ccf7e00e2e12a1026e7c41099298dfb6d0daaf885f52b98c84e833a4407e997dd3a5b92d56ede495ef431325a4b228c2d81598bde082141339b16684 + HEAD_REF master + PATCHES + 0001-vcpkg.patch + 0002-disable-waring-4065.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + OPTIONS_DEBUG + -DINSTALL_HEADERS=OFF + -DINSTALL_TOOLS=OFF +) + +vcpkg_install_cmake() + +if(IS_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/boringssl) + vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/boringssl") +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/botan/CONTROL b/vcpkg/ports/botan/CONTROL new file mode 100644 index 0000000..871381e --- /dev/null +++ b/vcpkg/ports/botan/CONTROL @@ -0,0 +1,4 @@ +Source: botan +Version: 2.15.0 +Homepage: https://botan.randombit.net +Description: A cryptography library written in C++11 diff --git a/vcpkg/ports/botan/fix-generate-build-path.patch b/vcpkg/ports/botan/fix-generate-build-path.patch new file mode 100644 index 0000000..11c3dc0 --- /dev/null +++ b/vcpkg/ports/botan/fix-generate-build-path.patch @@ -0,0 +1,13 @@ +diff --git a/configure.py b/configure.py +index 00baa0c..cfec5bb 100644 +--- a/configure.py ++++ b/configure.py +@@ -2035,7 +2035,7 @@ def create_template_vars(source_paths, build_paths, options, modules, cc, arch, + 'maintainer_mode': options.maintainer_mode, + + 'out_dir': build_dir, +- 'build_dir': build_paths.build_dir, ++ 'build_dir': os.path.abspath(build_paths.build_dir), + + 'doc_stamp_file': os.path.join(build_paths.build_dir, 'doc.stamp'), + 'makefile_path': os.path.join(build_paths.build_dir, '..', 'Makefile'), diff --git a/vcpkg/ports/botan/portfile.cmake b/vcpkg/ports/botan/portfile.cmake new file mode 100644 index 0000000..a00253e --- /dev/null +++ b/vcpkg/ports/botan/portfile.cmake @@ -0,0 +1,139 @@ +set(BOTAN_VERSION 2.15.0) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO randombit/botan + REF 3ed6eaa3c1236aed844f5475e2df8b89b3286ac4 # 2.15.0 + SHA512 a5c76e22f1ad8455ed5dab7c1dff2dd21e8a6e720e024144fe117982fd3b8815e8200844f6fd3abf8326fa4b18d2598c724f7ad5752c517d4b8fab83fb1b5907 + HEAD_REF master + PATCHES + fix-generate-build-path.patch +) + +if(CMAKE_HOST_WIN32) + vcpkg_find_acquire_program(JOM) + set(build_tool "${JOM}") + set(parallel_build "/J${VCPKG_CONCURRENCY}") +else() + find_program(MAKE make) + set(build_tool "${MAKE}") + set(parallel_build "-j${VCPKG_CONCURRENCY}") +endif() + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) +set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(BOTAN_FLAG_SHARED --enable-shared-library) + set(BOTAN_FLAG_STATIC --disable-static-library) +else() + set(BOTAN_FLAG_SHARED --disable-shared-library) + set(BOTAN_FLAG_STATIC --enable-static-library) +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(BOTAN_MSVC_RUNTIME "--msvc-runtime=MD") +else() + set(BOTAN_MSVC_RUNTIME "--msvc-runtime=MT") +endif() + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(BOTAN_FLAG_CPU x86) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(BOTAN_FLAG_CPU x86_64) +else() + message(FATAL_ERROR "Unsupported architecture") +endif() + +function(BOTAN_BUILD BOTAN_BUILD_TYPE) + + if(BOTAN_BUILD_TYPE STREQUAL "dbg") + set(BOTAN_FLAG_PREFIX ${CURRENT_PACKAGES_DIR}/debug) + set(BOTAN_FLAG_DEBUGMODE --debug-mode) + set(BOTAN_DEBUG_SUFFIX "") + set(BOTAN_MSVC_RUNTIME_SUFFIX "d") + else() + set(BOTAN_FLAG_DEBUGMODE) + set(BOTAN_FLAG_PREFIX ${CURRENT_PACKAGES_DIR}) + set(BOTAN_MSVC_RUNTIME_SUFFIX "") + endif() + + message(STATUS "Configure ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}") + + if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}) + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}) + endif() + make_directory(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}) + + set(configure_arguments --cpu=${BOTAN_FLAG_CPU} + ${BOTAN_FLAG_SHARED} + ${BOTAN_FLAG_STATIC} + ${BOTAN_FLAG_DEBUGMODE} + "--distribution-info=vcpkg ${TARGET_TRIPLET}" + --prefix=${BOTAN_FLAG_PREFIX} + --link-method=copy) + if(CMAKE_HOST_WIN32) + list(APPEND configure_arguments ${BOTAN_MSVC_RUNTIME}${BOTAN_MSVC_RUNTIME_SUFFIX}) + endif() + + vcpkg_execute_required_process( + COMMAND "${PYTHON3}" "${SOURCE_PATH}/configure.py" ${configure_arguments} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}" + LOGNAME configure-${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}) + message(STATUS "Configure ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE} done") + + message(STATUS "Build ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}") + vcpkg_execute_build_process( + COMMAND "${build_tool}" ${parallel_build} + NO_PARALLEL_COMMAND "${build_tool}" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}" + LOGNAME build-${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}) + message(STATUS "Build ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE} done") + + message(STATUS "Package ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}") + vcpkg_execute_required_process( + COMMAND "${PYTHON3}" "${SOURCE_PATH}/src/scripts/install.py" + --prefix=${BOTAN_FLAG_PREFIX} + --bindir=${BOTAN_FLAG_PREFIX}/bin + --libdir=${BOTAN_FLAG_PREFIX}/lib + --pkgconfigdir=${BOTAN_FLAG_PREFIX}/lib + --includedir=${BOTAN_FLAG_PREFIX}/include + --docdir=${BOTAN_FLAG_PREFIX}/share + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}" + LOGNAME install-${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE}) + + message(STATUS "Package ${TARGET_TRIPLET}-${BOTAN_BUILD_TYPE} done") +endfunction() + +BOTAN_BUILD(rel) +BOTAN_BUILD(dbg) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/botan) + +set(cli_exe_name "botan") +if(CMAKE_HOST_WIN32) + set(cli_exe_name "botan-cli.exe") +endif() +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/${cli_exe_name} ${CURRENT_PACKAGES_DIR}/tools/botan/${cli_exe_name}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/${cli_exe_name}) + +file(RENAME ${CURRENT_PACKAGES_DIR}/include/botan-2/botan ${CURRENT_PACKAGES_DIR}/include/botan) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/include/botan-2 + ${CURRENT_PACKAGES_DIR}/share/botan-${BOTAN_VERSION}/manual) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/botan) + +file(RENAME ${CURRENT_PACKAGES_DIR}/share/botan-${BOTAN_VERSION}/ ${CURRENT_PACKAGES_DIR}/share/botan/) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/botan/license.txt ${CURRENT_PACKAGES_DIR}/share/botan/copyright) diff --git a/vcpkg/ports/box2d/CONTROL b/vcpkg/ports/box2d/CONTROL new file mode 100644 index 0000000..909dc4c --- /dev/null +++ b/vcpkg/ports/box2d/CONTROL @@ -0,0 +1,5 @@ +Source: box2d +Version: 2.4.0 +Description: An open source C++ engine for simulating rigid bodies in 2D. +Homepage: https://box2d.org +Supports: !uwp diff --git a/vcpkg/ports/box2d/export-targets.patch b/vcpkg/ports/box2d/export-targets.patch new file mode 100644 index 0000000..636f108 --- /dev/null +++ b/vcpkg/ports/box2d/export-targets.patch @@ -0,0 +1,36 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 6ef515f..6975f91 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -95,8 +95,8 @@ set(BOX2D_HEADER_FILES + ../include/box2d/b2_world_callbacks.h + ../include/box2d/box2d.h) + +-add_library(box2d STATIC ${BOX2D_SOURCE_FILES} ${BOX2D_HEADER_FILES}) +-target_include_directories(box2d PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../include) ++add_library(box2d STATIC ${BOX2D_SOURCE_FILES}) ++target_include_directories(box2d PUBLIC $ $) + target_include_directories(box2d PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) + set_target_properties(box2d PROPERTIES + CXX_STANDARD 11 +@@ -104,5 +104,18 @@ set_target_properties(box2d PROPERTIES + CXX_EXTENSIONS NO + ) + +-source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "src" FILES ${BOX2D_SOURCE_FILES}) +-source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}/../include" PREFIX "include" FILES ${BOX2D_HEADER_FILES}) ++install(FILES ${BOX2D_HEADER_FILES} DESTINATION include/box2d) ++ ++install(TARGETS box2d ++ EXPORT unofficial-box2d-targets ++ RUNTIME DESTINATION bin ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib ++) ++ ++install( ++ EXPORT unofficial-box2d-targets ++ FILE unofficial-box2d-config.cmake ++ NAMESPACE unofficial::box2d:: ++ DESTINATION share/unofficial-box2d ++) diff --git a/vcpkg/ports/box2d/portfile.cmake b/vcpkg/ports/box2d/portfile.cmake new file mode 100644 index 0000000..3b931cb --- /dev/null +++ b/vcpkg/ports/box2d/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO erincatto/Box2D + REF 4d7757feedc9dd36f64393ae08acfd3b9600ac17 #v2.4.0 + SHA512 197f701016c91fda944328e7d867f0a5baa152cce53fa35826986923456af593595bad884008944e041d9ac2e1d769a54eaad4142e19b42a3bb2a2010d814cc9 + HEAD_REF master + PATCHES + export-targets.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTS=OFF + -DBUILD_SAMPLES=OFF +) +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-box2d TARGET_PATH share/unofficial-box2d) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/breakpad/CMakeLists.txt b/vcpkg/ports/breakpad/CMakeLists.txt new file mode 100644 index 0000000..1130029 --- /dev/null +++ b/vcpkg/ports/breakpad/CMakeLists.txt @@ -0,0 +1,98 @@ +cmake_minimum_required(VERSION 3.8) +project(breakpad CXX) + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +add_definitions( + -DNOMINMAX + -DUNICODE + -DWIN32_LEAN_AND_MEAN + -D_CRT_SECURE_NO_WARNINGS + -D_CRT_SECURE_NO_DEPRECATE + -D_CRT_NONSTDC_NO_DEPRECATE + -D_LIBCPP_VERSION +) + +set(CMAKE_DEBUG_POSTFIX d) + +string(COMPARE EQUAL "${CMAKE_BUILD_TYPE}" "Release" DEFAULT_INSTALL_HEADERS) +option(INSTALL_HEADERS "Install header files" ${DEFAULT_INSTALL_HEADERS}) + +# libbreakpad target +file(GLOB_RECURSE LIBBREAKPAD_SOURCES src/processor/*.cc) +list(FILTER LIBBREAKPAD_SOURCES EXCLUDE REGEX + "_unittest|synth_minidump|/tests|/testdata|/linux|/mac|/android|/solaris|microdump_stackwalk|minidump_dump|minidump_stackwalk") + +find_library(LIBDISASM_LIB NAMES libdisasmd libdisasm) + +add_library(libbreakpad ${LIBBREAKPAD_SOURCES}) +target_link_libraries(libbreakpad PRIVATE ${LIBDISASM_LIB}) + +target_include_directories(libbreakpad + PUBLIC + $ + $ +) + +set(TARGETS libbreakpad) +if(WIN32) + # libbreakpad_client target does not currently work on non-windows + if(WIN32) + file(GLOB_RECURSE LIBBREAKPAD_CLIENT_SOURCES src/client/windows/*.cc src/common/windows/*.cc) + include_directories("$ENV{VSINSTALLDIR}/DIA SDK/include") + elseif(APPLE) + add_definitions(-DHAVE_MACH_O_NLIST_H) + file(GLOB_RECURSE LIBBREAKPAD_CLIENT_SOURCES src/client/mac/*.cc src/common/mac/*.cc) + else() + add_definitions(-DHAVE_A_OUT_H) + file(GLOB_RECURSE LIBBREAKPAD_CLIENT_SOURCES src/client/linux/*.cc src/common/linux/*.cc) + endif() + file(GLOB LIBBREAKPAD_COMMON_SOURCES src/common/*.cc src/common/*.c src/client/*.cc) + list(APPEND LIBBREAKPAD_CLIENT_SOURCES ${LIBBREAKPAD_COMMON_SOURCES}) + list(FILTER LIBBREAKPAD_CLIENT_SOURCES EXCLUDE REGEX "/tests|/unittests|_unittest") + if(WIN32) + list(FILTER LIBBREAKPAD_CLIENT_SOURCES EXCLUDE REGEX "language.cc|path_helper.cc|stabs_to_module.cc|stabs_reader.cc|minidump_file_writer.cc") + endif() + + add_library(libbreakpad_client ${LIBBREAKPAD_CLIENT_SOURCES}) + target_link_libraries(libbreakpad_client PRIVATE wininet.lib) + + target_include_directories(libbreakpad_client + PUBLIC + $ + $ + ) + list(APPEND TARGETS libbreakpad_client) +endif() + +# installation +install(TARGETS ${TARGETS} EXPORT unofficial-breakpad-targets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(INSTALL_HEADERS) + if(WIN32) + set(HEADER_EXCLUDE_REGEX "/apple|/ios|/linux|/mac|/solaris|/android|/dwarf|/tests|/testdata|/unittests") + elseif(APPLE) + set(HEADER_EXCLUDE_REGEX "/apple|/ios|/linux|/windows|/solaris|/android|/dwarf|/tests|/testdata|/unittests|/*proj|/gcov") + else() + set(HEADER_EXCLUDE_REGEX "/apple|/ios|/client/linux/data|/client/linux/sender|/windows|/mac|/solaris|/android|/dwarf|/tests|/testdata|/unittests") + endif() + install( + DIRECTORY src/client src/common src/google_breakpad + DESTINATION include/ + FILES_MATCHING + PATTERN "*.h" + REGEX ${HEADER_EXCLUDE_REGEX} EXCLUDE + ) +endif() + +install( + EXPORT unofficial-breakpad-targets + FILE unofficial-breakpad-config.cmake + NAMESPACE unofficial::breakpad:: + DESTINATION share/unofficial-breakpad +) diff --git a/vcpkg/ports/breakpad/CONTROL b/vcpkg/ports/breakpad/CONTROL new file mode 100644 index 0000000..a50eab6 --- /dev/null +++ b/vcpkg/ports/breakpad/CONTROL @@ -0,0 +1,5 @@ +Source: breakpad +Version: 2019-07-11-2 +Build-Depends: libdisasm +Homepage: https://github.com/google/breakpad +Description: a set of client and server components which implement a crash-reporting system. diff --git a/vcpkg/ports/breakpad/fix-unique_ptr.patch b/vcpkg/ports/breakpad/fix-unique_ptr.patch new file mode 100644 index 0000000..4f81de3 --- /dev/null +++ b/vcpkg/ports/breakpad/fix-unique_ptr.patch @@ -0,0 +1,13 @@ +diff --git a/src/common/windows/pe_util.cc b/src/common/windows/pe_util.cc +index 9f9e8fa..d912635 100644 +--- a/src/common/windows/pe_util.cc ++++ b/src/common/windows/pe_util.cc +@@ -28,7 +28,7 @@ + // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + #include "pe_util.h" +- ++#include + #include + #include + #include diff --git a/vcpkg/ports/breakpad/portfile.cmake b/vcpkg/ports/breakpad/portfile.cmake new file mode 100644 index 0000000..29f027e --- /dev/null +++ b/vcpkg/ports/breakpad/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/breakpad + REF c46151db0ffd1a8dae914e45f1212ef427f61ed3 + SHA512 bd9f247851a3caa6f36574c8a243c2a01cb1cf23c2266b6f6786b85c7418dba5937363c00184e26cda24225f96bb7aaeb08efd13d6a269a3b78c357c2eda7e14 + HEAD_REF master + PATCHES + fix-unique_ptr.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-breakpad TARGET_PATH share/unofficial-breakpad) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/brigand/CONTROL b/vcpkg/ports/brigand/CONTROL new file mode 100644 index 0000000..2fba63f --- /dev/null +++ b/vcpkg/ports/brigand/CONTROL @@ -0,0 +1,6 @@ +Source: brigand +Version: 1.3.0 +Homepage: https://github.com/edouarda/brigand +Description: Brigand is a light-weight, fully functional, instant-compile time C++ 11 meta-programming library. +Build-Depends: boost + diff --git a/vcpkg/ports/brigand/fix-install-targets.patch b/vcpkg/ports/brigand/fix-install-targets.patch new file mode 100644 index 0000000..248948a --- /dev/null +++ b/vcpkg/ports/brigand/fix-install-targets.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 13ea689..9d20700 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -292,3 +292,9 @@ install(DIRECTORY ${PROJECT_SOURCE_DIR}/brigand + install(FILES ${CMAKE_BINARY_DIR}/libbrigand.pc + DESTINATION lib/pkgconfig + ) ++ ++install(TARGETS brigand ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) diff --git a/vcpkg/ports/brigand/portfile.cmake b/vcpkg/ports/brigand/portfile.cmake new file mode 100644 index 0000000..c7c1790 --- /dev/null +++ b/vcpkg/ports/brigand/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO edouarda/brigand + REF 1.3.0 + SHA512 538d288d84265cc9a4563f1e84d55a174db461ffd1e4f510bfdaef04af9fbf8e7ca79817f9118378bf7d58d578699aae3072bbffa3fd727b2d93ee783337aea6 + HEAD_REF master + PATCHES fix-install-targets.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/pkgconfig) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) + diff --git a/vcpkg/ports/brotli/CONTROL b/vcpkg/ports/brotli/CONTROL new file mode 100644 index 0000000..ce085e3 --- /dev/null +++ b/vcpkg/ports/brotli/CONTROL @@ -0,0 +1,4 @@ +Source: brotli +Version: 1.0.9 +Homepage: https://github.com/google/brotli +Description: a generic-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling. diff --git a/vcpkg/ports/brotli/fix-arm-uwp.patch b/vcpkg/ports/brotli/fix-arm-uwp.patch new file mode 100644 index 0000000..7ed3fcd --- /dev/null +++ b/vcpkg/ports/brotli/fix-arm-uwp.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e6c6054..2c4b757 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -124,6 +124,8 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + add_definitions(-DOS_FREEBSD) + elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + add_definitions(-DOS_MACOSX) ++elseif(MSVC) ++ add_definitions(-D_CRT_SECURE_NO_WARNINGS) + endif() + + function(transform_sources_list INPUT_FILE OUTPUT_FILE) diff --git a/vcpkg/ports/brotli/install.patch b/vcpkg/ports/brotli/install.patch new file mode 100644 index 0000000..af3d3f3 --- /dev/null +++ b/vcpkg/ports/brotli/install.patch @@ -0,0 +1,58 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4ff3401..46492d0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -185,14 +185,13 @@ endforeach() + + foreach(lib IN LISTS BROTLI_SHARED_LIBS BROTLI_STATIC_LIBS) + target_link_libraries(${lib} ${LIBM_LIBRARY}) +- set_property(TARGET ${lib} APPEND PROPERTY INCLUDE_DIRECTORIES ${BROTLI_INCLUDE_DIRS}) + set_target_properties(${lib} PROPERTIES + VERSION "${BROTLI_ABI_COMPATIBILITY}.${BROTLI_ABI_AGE}.${BROTLI_ABI_REVISION}" + SOVERSION "${BROTLI_ABI_COMPATIBILITY}") + if(NOT BROTLI_EMSCRIPTEN) + set_target_properties(${lib} PROPERTIES POSITION_INDEPENDENT_CODE TRUE) + endif() +- set_property(TARGET ${lib} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${BROTLI_INCLUDE_DIRS}") ++ set_property(TARGET ${lib} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "$" $) + endforeach() + + if(NOT BROTLI_EMSCRIPTEN) +@@ -223,27 +222,35 @@ if(NOT BROTLI_EMSCRIPTEN) + if(NOT BROTLI_BUNDLED_MODE) + install( + TARGETS brotli +- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ RUNTIME DESTINATION tools/brotli ++ CONFIGURATIONS Release + ) + ++ if(BUILD_SHARED_LIBS) + install( + TARGETS ${BROTLI_LIBRARIES_CORE} ++ EXPORT brotli + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + ) +- ++ else() + install( + TARGETS ${BROTLI_LIBRARIES_CORE_STATIC} ++ EXPORT brotli + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + ) ++ endif() + + install( + DIRECTORY ${BROTLI_INCLUDE_DIRS}/brotli + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ++ CONFIGURATIONS Release + ) ++ ++ install(EXPORT brotli FILE unofficial-brotli-config.cmake NAMESPACE unofficial::brotli:: DESTINATION share/unofficial-brotli) + endif() # BROTLI_BUNDLED_MODE + endif() # BROTLI_EMSCRIPTEN + diff --git a/vcpkg/ports/brotli/pkgconfig.patch b/vcpkg/ports/brotli/pkgconfig.patch new file mode 100644 index 0000000..c11e0d4 --- /dev/null +++ b/vcpkg/ports/brotli/pkgconfig.patch @@ -0,0 +1,74 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b1c654b..fcd9024 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -390,7 +390,7 @@ function(generate_pkg_config_path outvar path) + set("${outvar}" "${${outvar}}" PARENT_SCOPE) + endfunction(generate_pkg_config_path) + +-function(transform_pc_file INPUT_FILE OUTPUT_FILE VERSION) ++function(transform_pc_file INPUT_FILE OUTPUT_FILE VERSION SHARED_TARGET STATIC_TARGET) + file(READ ${INPUT_FILE} TEXT) + + set(PREFIX "${CMAKE_INSTALL_PREFIX}") +@@ -404,15 +404,22 @@ function(transform_pc_file INPUT_FILE OUTPUT_FILE VERSION) + string(REGEX REPLACE "@includedir@" "${INCLUDEDIR}" TEXT ${TEXT}) + + string(REGEX REPLACE "@PACKAGE_VERSION@" "${VERSION}" TEXT ${TEXT}) ++ ++ if(BUILD_SHARED_LIBS) ++ set(LIB_NAME "${SHARED_TARGET}") ++ else() ++ set(LIB_NAME "${STATIC_TARGET}") ++ endif() ++ string(REGEX REPLACE "@lib_name@" "${LIB_NAME}" TEXT ${TEXT}) + + file(WRITE ${OUTPUT_FILE} ${TEXT}) + endfunction() + +-transform_pc_file("scripts/libbrotlicommon.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libbrotlicommon.pc" "${BROTLI_VERSION}") ++transform_pc_file("scripts/libbrotlicommon.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libbrotlicommon.pc" "${BROTLI_VERSION}" brotlicommon brotlicommon-static) + +-transform_pc_file("scripts/libbrotlidec.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libbrotlidec.pc" "${BROTLI_VERSION}") ++transform_pc_file("scripts/libbrotlidec.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libbrotlidec.pc" "${BROTLI_VERSION}" brotlidec brotlidec-static) + +-transform_pc_file("scripts/libbrotlienc.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libbrotlienc.pc" "${BROTLI_VERSION}") ++transform_pc_file("scripts/libbrotlienc.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/libbrotlienc.pc" "${BROTLI_VERSION}" brotlienc brotlienc-static) + + if(NOT BROTLI_EMSCRIPTEN) + if(NOT BROTLI_BUNDLED_MODE) +diff --git a/scripts/libbrotlicommon.pc.in b/scripts/libbrotlicommon.pc.in +index 10ca969..7736344 100644 +--- a/scripts/libbrotlicommon.pc.in ++++ b/scripts/libbrotlicommon.pc.in +@@ -7,5 +7,5 @@ Name: libbrotlicommon + URL: https://github.com/google/brotli + Description: Brotli common dictionary library + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -R${libdir} -lbrotlicommon ++Libs: -L${libdir} -l@lib_name@ + Cflags: -I${includedir} +diff --git a/scripts/libbrotlidec.pc.in b/scripts/libbrotlidec.pc.in +index e7c3124..a7dc8ce 100644 +--- a/scripts/libbrotlidec.pc.in ++++ b/scripts/libbrotlidec.pc.in +@@ -7,6 +7,6 @@ Name: libbrotlidec + URL: https://github.com/google/brotli + Description: Brotli decoder library + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -R${libdir} -lbrotlidec ++Libs: -L${libdir} -l@lib_name@ + Requires.private: libbrotlicommon >= 1.0.2 + Cflags: -I${includedir} +diff --git a/scripts/libbrotlienc.pc.in b/scripts/libbrotlienc.pc.in +index 4dd0811..eb2712e 100644 +--- a/scripts/libbrotlienc.pc.in ++++ b/scripts/libbrotlienc.pc.in +@@ -7,6 +7,6 @@ Name: libbrotlienc + URL: https://github.com/google/brotli + Description: Brotli encoder library + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -R${libdir} -lbrotlienc ++Libs: -L${libdir} -l@lib_name@ + Requires.private: libbrotlicommon >= 1.0.2 + Cflags: -I${includedir} diff --git a/vcpkg/ports/brotli/portfile.cmake b/vcpkg/ports/brotli/portfile.cmake new file mode 100644 index 0000000..6d28f26 --- /dev/null +++ b/vcpkg/ports/brotli/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/brotli + REF e61745a6b7add50d380cfd7d3883dd6c62fc2c71 # v1.0.9 + SHA512 303444695600b70ce59708e06bf21647d9b8dd33d772c53bbe49320f2f8f95ca8a7d6df2d29b7f36ff99001967e2d28380e0e305d778031940a3a5c6585f9a4f + HEAD_REF master + PATCHES + install.patch + fix-arm-uwp.patch + pkgconfig.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBROTLI_DISABLE_TESTS=ON +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/brotli) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-brotli TARGET_PATH share/unofficial-brotli) +vcpkg_fixup_pkgconfig() + + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/unofficial-brotli) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/brotli/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/brotli/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..882106b --- /dev/null +++ b/vcpkg/ports/brotli/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,11 @@ +_find_package(${ARGS}) +foreach(T brotlicommon brotlidec brotlienc) + if(TARGET unofficial::brotli::${T} AND NOT TARGET unofficial::brotli::${T}-static) + _add_library(unofficial::brotli::${T}-static INTERFACE IMPORTED) + set_target_properties(unofficial::brotli::${T}-static PROPERTIES INTERFACE_LINK_LIBRARIES "unofficial::brotli::${T}") + endif() + if(NOT TARGET unofficial::brotli::${T} AND TARGET unofficial::brotli::${T}-static) + _add_library(unofficial::brotli::${T} INTERFACE IMPORTED) + set_target_properties(unofficial::brotli::${T} PROPERTIES INTERFACE_LINK_LIBRARIES "unofficial::brotli::${T}-static") + endif() +endforeach() diff --git a/vcpkg/ports/brpc/CONTROL b/vcpkg/ports/brpc/CONTROL new file mode 100644 index 0000000..3986069 --- /dev/null +++ b/vcpkg/ports/brpc/CONTROL @@ -0,0 +1,6 @@ +Source: brpc +Version: 0.9.7 +Homepage: https://github.com/apache/incubator-brpc +Description: Industrial-grade RPC framework used throughout Baidu, with 1,000,000+ instances and thousands kinds of services, called "baidu-rpc" inside Baidu. +Build-Depends: leveldb, gflags, glog, protobuf[zlib], openssl, thrift +Supports: !windows diff --git a/vcpkg/ports/brpc/fix_boost_ptr.patch b/vcpkg/ports/brpc/fix_boost_ptr.patch new file mode 100644 index 0000000..4ced794 --- /dev/null +++ b/vcpkg/ports/brpc/fix_boost_ptr.patch @@ -0,0 +1,14 @@ +diff --git a/src/brpc/policy/thrift_protocol.cpp b/src/brpc/policy/thrift_protocol.cpp +index eae081a0..39c92338 100755 +--- a/src/brpc/policy/thrift_protocol.cpp ++++ b/src/brpc/policy/thrift_protocol.cpp +@@ -45,8 +45,7 @@ + #if defined(_THRIFT_STDCXX_H_) + # define THRIFT_STDCXX apache::thrift::stdcxx + #else +- # define THRIFT_STDCXX boost +- # include ++ # define THRIFT_STDCXX std + #endif + #endif + diff --git a/vcpkg/ports/brpc/fix_thrift.patch b/vcpkg/ports/brpc/fix_thrift.patch new file mode 100644 index 0000000..699f42f --- /dev/null +++ b/vcpkg/ports/brpc/fix_thrift.patch @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3deb7342..737f6a70 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -62,8 +62,10 @@ if(WITH_DEBUG_SYMBOLS) + endif() + + if(WITH_THRIFT) ++ find_package(Thrift CONFIG REQUIRED) ++ # target_link_libraries(main PRIVATE thrift::thrift thriftz::thriftz thriftnb::thriftnb) + set(THRIFT_CPP_FLAG "-DENABLE_THRIFT_FRAMED_PROTOCOL") +- set(THRIFT_LIB "thrift") ++ set(THRIFT_LIB "thrift::thrift") + endif() + + include(GNUInstallDirs) +@@ -196,9 +198,10 @@ set(DYNAMIC_LIB + ${LEVELDB_LIB} + ${PROTOC_LIB} + ${CMAKE_THREAD_LIBS_INIT} ++ ${OPENSSL_CRYPTO_LIBRARY} ++ ${OPENSSL_SSL_LIBRARY} + ${THRIFT_LIB} + ${THRIFTNB_LIB} +- ${OPENSSL_CRYPTO_LIBRARY} + dl + z) + diff --git a/vcpkg/ports/brpc/portfile.cmake b/vcpkg/ports/brpc/portfile.cmake new file mode 100644 index 0000000..3a1c1dc --- /dev/null +++ b/vcpkg/ports/brpc/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_fail_port_install(ON_TARGET "windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO apache/incubator-brpc + REF 1d6510aa50075cade5ed539ee09a11a1b8d7f990 # 0.9.7 + SHA512 9c9dbe2a202e58586010c56634bd371f6a9e3ff0d8c5341abbabd1f1dd204a3aec5e89061fa326b4fc8ae7202f9fc33f93a5acd845d18dab3915a3e2b81cbaf3 + HEAD_REF master + PATCHES + fix_boost_ptr.patch + fix_thrift.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DWITH_THRIFT=ON + -DWITH_MESALINK=OFF + -DWITH_GLOG=ON +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/butil/third_party/superfasthash") + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/brunocodutra-metal/CONTROL b/vcpkg/ports/brunocodutra-metal/CONTROL new file mode 100644 index 0000000..f0af908 --- /dev/null +++ b/vcpkg/ports/brunocodutra-metal/CONTROL @@ -0,0 +1,3 @@ +Source: brunocodutra-metal +Version: 2.1.1 +Description: A single header C++11 library designed to make you love template metaprogramming diff --git a/vcpkg/ports/brunocodutra-metal/portfile.cmake b/vcpkg/ports/brunocodutra-metal/portfile.cmake new file mode 100644 index 0000000..381fa10 --- /dev/null +++ b/vcpkg/ports/brunocodutra-metal/portfile.cmake @@ -0,0 +1,31 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO brunocodutra/metal + REF 43256d2c7f5715d9dc029037bcd8512624ec7865 # v2.1.1 + SHA512 fc69e60b9c21d0215ca2c9ec27ab65d59115397e1d27c90fcdc35ccf8675546b1fbc3be0e6b8f69cd8eb848bac348ca0fe116f50a36ce8d1cbff0d646c4f05cb + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets( + CONFIG_PATH lib/cmake/Metal + TARGET_PATH share/metal +) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/vcpkg/ports/brynet/CONTROL b/vcpkg/ports/brynet/CONTROL new file mode 100644 index 0000000..36e4a5f --- /dev/null +++ b/vcpkg/ports/brynet/CONTROL @@ -0,0 +1,4 @@ +Source: brynet +Version: 1.0.5 +Homepage: https://github.com/IronsDu/brynet +Description: A C++ header only cross platform high performance tcp network library, and support SSL/HTTP/Websocket. diff --git a/vcpkg/ports/brynet/portfile.cmake b/vcpkg/ports/brynet/portfile.cmake new file mode 100644 index 0000000..623b466 --- /dev/null +++ b/vcpkg/ports/brynet/portfile.cmake @@ -0,0 +1,13 @@ +#header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO IronsDu/brynet + REF v1.0.5 + SHA512 2c625a6dc6f7b1b578d74f97b0ccec90856caaedb0725db4c5892cfaa33e77cd502b01ee26b1789017c459f4b0a03eaf16ae859dc51ad4e6f362aca7c5833995 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/include/brynet DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/bullet3/CONTROL b/vcpkg/ports/bullet3/CONTROL new file mode 100644 index 0000000..4c91594 --- /dev/null +++ b/vcpkg/ports/bullet3/CONTROL @@ -0,0 +1,7 @@ +Source: bullet3 +Version: 2.89-1 +Homepage: https://github.com/bulletphysics/bullet3 +Description: Bullet Physics is a professional collision detection, rigid body, and soft body dynamics library + +Feature: multithreading +Description: Multithreading functionality for bullet3 diff --git a/vcpkg/ports/bullet3/cmake-fix.patch b/vcpkg/ports/bullet3/cmake-fix.patch new file mode 100644 index 0000000..c8339e5 --- /dev/null +++ b/vcpkg/ports/bullet3/cmake-fix.patch @@ -0,0 +1,277 @@ +diff --git a/BulletConfig.cmake.in b/BulletConfig.cmake.in +index f5dc7bdbb..f5412dac3 100644 +--- a/BulletConfig.cmake.in ++++ b/BulletConfig.cmake.in +@@ -3,6 +3,8 @@ + # BulletConfig.cmake(.in) + # + ++@PACKAGE_INIT@ ++ + # Use the following variables to compile and link against Bullet: + # BULLET_FOUND - True if Bullet was found on your system + # BULLET_USE_FILE - The file making Bullet usable +@@ -15,11 +17,20 @@ + # BULLET_VERSION_STRING - A human-readable string containing the version + + set ( BULLET_FOUND 1 ) +-set ( BULLET_USE_FILE "@BULLET_USE_FILE@" ) ++set_and_check ( BULLET_USE_FILE "@PACKAGE_BULLET_CONFIG_CMAKE_PATH@/UseBullet.cmake" ) + set ( BULLET_DEFINITIONS "@BULLET_DEFINITIONS@" ) +-set ( BULLET_INCLUDE_DIR "@INCLUDE_INSTALL_DIR@" ) +-set ( BULLET_INCLUDE_DIRS "@INCLUDE_INSTALL_DIR@" ) ++set_and_check ( BULLET_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@" ) ++set_and_check ( BULLET_INCLUDE_DIRS "@PACKAGE_INCLUDE_INSTALL_DIR@" ) + set ( BULLET_LIBRARIES "@BULLET_LIBRARIES@" ) +-set ( BULLET_LIBRARY_DIRS "@LIB_DESTINATION@" ) +-set ( BULLET_ROOT_DIR "@CMAKE_INSTALL_PREFIX@" ) +-set ( BULLET_VERSION_STRING "@BULLET_VERSION@" ) +\ No newline at end of file ++set_and_check ( BULLET_LIBRARY_DIRS "@PACKAGE_LIB_DESTINATION@" ) ++set_and_check ( BULLET_ROOT_DIR "@PACKAGE_CMAKE_INSTALL_PREFIX@" ) ++set ( BULLET_VERSION_STRING "@BULLET_VERSION@" ) ++ ++# Load targets ++if(NOT TARGET Bullet3Common) ++ file(GLOB CONFIG_FILES "@PACKAGE_BULLET_CONFIG_CMAKE_PATH@/*Targets.cmake") ++ foreach(f ${CONFIG_FILES}) ++ include(${f}) ++ endforeach() ++ set(_DIR) ++endif() +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 68e0a93bc..872e14361 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 2.4.3) ++cmake_minimum_required(VERSION 3.0) + set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true) + cmake_policy(SET CMP0017 NEW) + #this line has to appear before 'PROJECT' in order to be able to disable incremental linking +@@ -465,23 +465,34 @@ IF (BUILD_UNIT_TESTS) + SUBDIRS(test) + ENDIF() + +-set (BULLET_CONFIG_CMAKE_PATH lib${LIB_SUFFIX}/cmake/bullet ) ++include(CMakePackageConfigHelpers) ++write_basic_package_version_file( ++ "${CMAKE_CURRENT_BINARY_DIR}/BulletConfigVersion.cmake" ++ VERSION ${BULLET_VERSION} ++ COMPATIBILITY AnyNewerVersion ++) ++ ++set (BULLET_CONFIG_CMAKE_PATH share/bullet3 ) + list (APPEND BULLET_LIBRARIES LinearMath) + list (APPEND BULLET_LIBRARIES Bullet3Common) + list (APPEND BULLET_LIBRARIES BulletInverseDynamics) + list (APPEND BULLET_LIBRARIES BulletCollision) + list (APPEND BULLET_LIBRARIES BulletDynamics) + list (APPEND BULLET_LIBRARIES BulletSoftBody) +-set (BULLET_USE_FILE ${BULLET_CONFIG_CMAKE_PATH}/UseBullet.cmake) +-configure_file ( ${CMAKE_CURRENT_SOURCE_DIR}/BulletConfig.cmake.in +- ${CMAKE_CURRENT_BINARY_DIR}/BulletConfig.cmake +- @ONLY ESCAPE_QUOTES +- ) ++ ++configure_package_config_file( ++ ${CMAKE_CURRENT_SOURCE_DIR}/BulletConfig.cmake.in ++ ${CMAKE_CURRENT_BINARY_DIR}/BulletConfig.cmake ++ PATH_VARS INCLUDE_INSTALL_DIR LIB_DESTINATION CMAKE_INSTALL_PREFIX BULLET_CONFIG_CMAKE_PATH ++ INSTALL_DESTINATION ${BULLET_CONFIG_CMAKE_PATH} ++) ++ + OPTION(INSTALL_CMAKE_FILES "Install generated CMake files" ON) + + IF (INSTALL_CMAKE_FILES) + install ( FILES ${CMAKE_CURRENT_SOURCE_DIR}/UseBullet.cmake + ${CMAKE_CURRENT_BINARY_DIR}/BulletConfig.cmake ++ ${CMAKE_CURRENT_BINARY_DIR}/BulletConfigVersion.cmake + DESTINATION ${BULLET_CONFIG_CMAKE_PATH} + ) + ENDIF (INSTALL_CMAKE_FILES) +diff --git a/src/Bullet3Common/CMakeLists.txt b/src/Bullet3Common/CMakeLists.txt +index e899e67d9..0ca702eb8 100644 +--- a/src/Bullet3Common/CMakeLists.txt ++++ b/src/Bullet3Common/CMakeLists.txt +@@ -43,9 +43,12 @@ IF (INSTALL_LIBS) + #FILES_MATCHING requires CMake 2.6 + IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +- INSTALL(TARGETS Bullet3Common DESTINATION .) ++ INSTALL(TARGETS Bullet3Common ++ EXPORT Bullet3CommonTargets ++ DESTINATION .) + ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + INSTALL(TARGETS Bullet3Common ++ EXPORT Bullet3CommonTargets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX}) +@@ -59,5 +62,8 @@ DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN + SET_TARGET_PROPERTIES(Bullet3Common PROPERTIES FRAMEWORK true) + SET_TARGET_PROPERTIES(Bullet3Common PROPERTIES PUBLIC_HEADER "${Bullet3Common_HDRS}") + ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) ++ ++ INSTALL(EXPORT Bullet3CommonTargets ++ DESTINATION ${BULLET_CONFIG_CMAKE_PATH}) + ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) + ENDIF (INSTALL_LIBS) +diff --git a/src/BulletCollision/CMakeLists.txt b/src/BulletCollision/CMakeLists.txt +index f5d725562..e98de8ba2 100644 +--- a/src/BulletCollision/CMakeLists.txt ++++ b/src/BulletCollision/CMakeLists.txt +@@ -266,11 +266,15 @@ IF (INSTALL_LIBS) + #INSTALL of other files requires CMake 2.6 + IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +- INSTALL(TARGETS BulletCollision DESTINATION .) ++ INSTALL(TARGETS BulletCollision ++ EXPORT BulletCollisionTargets ++ DESTINATION .) + ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +- INSTALL(TARGETS BulletCollision RUNTIME DESTINATION bin +- LIBRARY DESTINATION lib${LIB_SUFFIX} +- ARCHIVE DESTINATION lib${LIB_SUFFIX}) ++ INSTALL(TARGETS BulletCollision ++ EXPORT BulletCollisionTargets ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib${LIB_SUFFIX} ++ ARCHIVE DESTINATION lib${LIB_SUFFIX}) + INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE PATTERN "CMakeFiles" EXCLUDE) + INSTALL(FILES ../btBulletCollisionCommon.h +@@ -290,5 +294,8 @@ DESTINATION ${INCLUDE_INSTALL_DIR}/BulletCollision) + SET_PROPERTY(SOURCE ${NarrowPhaseCollision_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/NarrowPhaseCollision) + + ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) ++ ++ INSTALL(EXPORT BulletCollisionTargets ++ DESTINATION ${BULLET_CONFIG_CMAKE_PATH}) + ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) + ENDIF (INSTALL_LIBS) +diff --git a/src/BulletDynamics/CMakeLists.txt b/src/BulletDynamics/CMakeLists.txt +index 3332440f2..3bbce4389 100644 +--- a/src/BulletDynamics/CMakeLists.txt ++++ b/src/BulletDynamics/CMakeLists.txt +@@ -147,11 +147,15 @@ IF (INSTALL_LIBS) + IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) + IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +- INSTALL(TARGETS BulletDynamics DESTINATION .) ++ INSTALL(TARGETS BulletDynamics ++ EXPORT BulletDynamicsTargets ++ DESTINATION .) + ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +- INSTALL(TARGETS BulletDynamics RUNTIME DESTINATION bin +- LIBRARY DESTINATION lib${LIB_SUFFIX} +- ARCHIVE DESTINATION lib${LIB_SUFFIX}) ++ INSTALL(TARGETS BulletDynamics ++ EXPORT BulletDynamicsTargets ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib${LIB_SUFFIX} ++ ARCHIVE DESTINATION lib${LIB_SUFFIX}) + INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN + ".svn" EXCLUDE PATTERN "CMakeFiles" EXCLUDE) +@@ -172,4 +176,7 @@ DESTINATION ${INCLUDE_INSTALL_DIR}/BulletDynamics) + SET_PROPERTY(SOURCE ${MLCPSolvers_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/MLCPSolvers) + ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) ++ ++ INSTALL(EXPORT BulletDynamicsTargets ++ DESTINATION ${BULLET_CONFIG_CMAKE_PATH}) + ENDIF (INSTALL_LIBS) +diff --git a/src/BulletInverseDynamics/CMakeLists.txt b/src/BulletInverseDynamics/CMakeLists.txt +index 3331c27ea..86b4e54be 100644 +--- a/src/BulletInverseDynamics/CMakeLists.txt ++++ b/src/BulletInverseDynamics/CMakeLists.txt +@@ -42,11 +42,15 @@ IF (INSTALL_LIBS) + #INSTALL of other files requires CMake 2.6 + IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +- INSTALL(TARGETS BulletInverseDynamics DESTINATION .) ++ INSTALL(TARGETS BulletInverseDynamics ++ EXPORT BulletInverseDynamicsTargets ++ DESTINATION .) + ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +- INSTALL(TARGETS BulletInverseDynamics RUNTIME DESTINATION bin +- LIBRARY DESTINATION lib${LIB_SUFFIX} +- ARCHIVE DESTINATION lib${LIB_SUFFIX}) ++ INSTALL(TARGETS BulletInverseDynamics ++ EXPORT BulletInverseDynamicsTargets ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib${LIB_SUFFIX} ++ ARCHIVE DESTINATION lib${LIB_SUFFIX}) + INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE PATTERN "CMakeFiles" EXCLUDE) + INSTALL(FILES ../btBulletCollisionCommon.h +@@ -62,5 +66,8 @@ DESTINATION ${INCLUDE_INSTALL_DIR}/BulletInverseDynamics) + SET_PROPERTY(SOURCE ${BulletInverseDynamicsDetails_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/details) + + ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) ++ ++ INSTALL(EXPORT BulletInverseDynamicsTargets ++ DESTINATION ${BULLET_CONFIG_CMAKE_PATH}) + ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) + ENDIF (INSTALL_LIBS) +diff --git a/src/BulletSoftBody/CMakeLists.txt b/src/BulletSoftBody/CMakeLists.txt +index d43df1c67..6ba508ec5 100644 +--- a/src/BulletSoftBody/CMakeLists.txt ++++ b/src/BulletSoftBody/CMakeLists.txt +@@ -50,11 +50,15 @@ IF (INSTALL_LIBS) + IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) + IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +- INSTALL(TARGETS BulletSoftBody DESTINATION .) ++ INSTALL(TARGETS BulletSoftBody ++ EXPORT BulletSoftBodyTargets ++ DESTINATION .) + ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +- INSTALL(TARGETS BulletSoftBody RUNTIME DESTINATION bin +- LIBRARY DESTINATION lib${LIB_SUFFIX} +- ARCHIVE DESTINATION lib${LIB_SUFFIX}) ++ INSTALL(TARGETS BulletSoftBody ++ EXPORT BulletSoftBodyTargets ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib${LIB_SUFFIX} ++ ARCHIVE DESTINATION lib${LIB_SUFFIX}) + INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN + ".svn" EXCLUDE PATTERN "CMakeFiles" EXCLUDE) +@@ -65,5 +69,8 @@ DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN + SET_TARGET_PROPERTIES(BulletSoftBody PROPERTIES FRAMEWORK true) + SET_TARGET_PROPERTIES(BulletSoftBody PROPERTIES PUBLIC_HEADER "${BulletSoftBody_HDRS}") + ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) ++ ++ INSTALL(EXPORT BulletSoftBodyTargets ++ DESTINATION ${BULLET_CONFIG_CMAKE_PATH}) + ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) + ENDIF (INSTALL_LIBS) +diff --git a/src/LinearMath/CMakeLists.txt b/src/LinearMath/CMakeLists.txt +index 0c8c0133a..56d4b5bcc 100644 +--- a/src/LinearMath/CMakeLists.txt ++++ b/src/LinearMath/CMakeLists.txt +@@ -59,9 +59,12 @@ IF (INSTALL_LIBS) + #FILES_MATCHING requires CMake 2.6 + IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) + IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) +- INSTALL(TARGETS LinearMath DESTINATION .) ++ INSTALL(TARGETS LinearMath ++ EXPORT LinearMathTargets ++ DESTINATION .) + ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) + INSTALL(TARGETS LinearMath ++ EXPORT LinearMathTargets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX}) +@@ -75,5 +78,8 @@ DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN + SET_TARGET_PROPERTIES(LinearMath PROPERTIES FRAMEWORK true) + SET_TARGET_PROPERTIES(LinearMath PROPERTIES PUBLIC_HEADER "${LinearMath_HDRS}") + ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) ++ ++ INSTALL(EXPORT LinearMathTargets ++ DESTINATION ${BULLET_CONFIG_CMAKE_PATH}) + ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) + ENDIF (INSTALL_LIBS) diff --git a/vcpkg/ports/bullet3/portfile.cmake b/vcpkg/ports/bullet3/portfile.cmake new file mode 100644 index 0000000..82bb8c7 --- /dev/null +++ b/vcpkg/ports/bullet3/portfile.cmake @@ -0,0 +1,45 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO bulletphysics/bullet3 + REF 2.89 + SHA512 3c4ba6a3b3623ef44dd4a23e0bc2e90dec1f2b7af463edcb886e110feac1dfb4a91945f0ed640052cac228318539e275976d37238102fb10a0f78aef065a730b + HEAD_REF master + PATCHES cmake-fix.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + multithreading BULLET2_MULTITHREADING +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DUSE_MSVC_RUNTIME_LIBRARY_DLL=ON + -DBUILD_DEMOS=OFF + -DBUILD_CPU_DEMOS=OFF + -DBUILD_BULLET2_DEMOS=OFF + -DBUILD_BULLET3=OFF + -DBUILD_EXTRAS=OFF + -DBUILD_UNIT_TESTS=OFF + -DINSTALL_LIBS=ON + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "share/bullet3") + +# Clean up unneeded files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/bullet/BulletInverseDynamics/details) + +vcpkg_copy_pdbs() + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/bullet3/usage b/vcpkg/ports/bullet3/usage new file mode 100644 index 0000000..43b6d66 --- /dev/null +++ b/vcpkg/ports/bullet3/usage @@ -0,0 +1,4 @@ +The package bullet3 provides CMake targets: + +find_package(Bullet CONFIG REQUIRED) +target_link_libraries(main PRIVATE LinearMath Bullet3Common BulletDynamics BulletSoftBody) diff --git a/vcpkg/ports/bustache/CONTROL b/vcpkg/ports/bustache/CONTROL new file mode 100644 index 0000000..82aeb3a --- /dev/null +++ b/vcpkg/ports/bustache/CONTROL @@ -0,0 +1,5 @@ +Source: bustache +Version: 1.1.0 +Build-Depends: boost-unordered, boost-utility +Description: C++11 implementation of {{ mustache }} +Homepage: https://github.com/jamboree/bustache diff --git a/vcpkg/ports/bustache/LICENSE b/vcpkg/ports/bustache/LICENSE new file mode 100644 index 0000000..6d2e4af --- /dev/null +++ b/vcpkg/ports/bustache/LICENSE @@ -0,0 +1,4 @@ +Copyright (c) 2014-2018 Jamboree + +Distributed under the Boost Software License, Version 1.0. (See accompanying +file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/vcpkg/ports/bustache/portfile.cmake b/vcpkg/ports/bustache/portfile.cmake new file mode 100644 index 0000000..24c8857 --- /dev/null +++ b/vcpkg/ports/bustache/portfile.cmake @@ -0,0 +1,21 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jamboree/bustache + REF abb25ca189425783c6b7ec5c17c5284dccb59faf + SHA512 be00451f6a85edccacbdd5d8478d7af4f3162f9a9a31af876004237ca7f303c1262b2ea623e6ec595d73440dc14fcf22d185bc521fd3aca6e28ec43890d611c5 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH "share/bustache/cmake") + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" +) + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/vcpkg/ports/butteraugli/CMakeLists.txt b/vcpkg/ports/butteraugli/CMakeLists.txt new file mode 100644 index 0000000..52963fb --- /dev/null +++ b/vcpkg/ports/butteraugli/CMakeLists.txt @@ -0,0 +1,38 @@ +cmake_minimum_required(VERSION 3.8.0) +project(butteraugli CXX) + +add_compile_options(-D_CRT_SECURE_NO_WARNINGS -DNOMINMAX) +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018) +else() + add_compile_options(-std=c++11) +endif() + +find_package(JPEG REQUIRED) +find_package(PNG REQUIRED) + +include_directories("." ${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIRS}) + +add_library(butteraugli_lib butteraugli/butteraugli.cc) + +install( + TARGETS butteraugli_lib + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_TOOLS) + add_executable(butteraugli butteraugli/butteraugli_main.cc) + find_library(TURBO turbojpeg) + target_link_libraries(butteraugli butteraugli_lib ${JPEG_LIBRARIES} ${TURBO} ${PNG_LIBRARIES}) + + install ( + TARGETS butteraugli + RUNTIME DESTINATION tools/butteraugli + ) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES butteraugli/butteraugli.h DESTINATION include/butteraugli) +endif() diff --git a/vcpkg/ports/butteraugli/CONTROL b/vcpkg/ports/butteraugli/CONTROL new file mode 100644 index 0000000..aab6417 --- /dev/null +++ b/vcpkg/ports/butteraugli/CONTROL @@ -0,0 +1,5 @@ +Source: butteraugli +Version: 2019-05-08-1 +Homepage: https://github.com/google/butteraugli +Description: butteraugli estimates the psychovisual difference between two images +Build-Depends: libpng, libjpeg-turbo diff --git a/vcpkg/ports/butteraugli/missing_header.patch b/vcpkg/ports/butteraugli/missing_header.patch new file mode 100644 index 0000000..11d314f --- /dev/null +++ b/vcpkg/ports/butteraugli/missing_header.patch @@ -0,0 +1,12 @@ +diff --git "a/butteraugli/butteraugli_main.cc" "b/butteraugli/butteraugli_main.cc" +index f38af1d..ebf3197 100644 +--- "a/butteraugli/butteraugli_main.cc" ++++ "b/butteraugli/butteraugli_main.cc" +@@ -2,6 +2,7 @@ + #include + #include + #include ++#include + #include "butteraugli/butteraugli.h" + + extern "C" { diff --git a/vcpkg/ports/butteraugli/portfile.cmake b/vcpkg/ports/butteraugli/portfile.cmake new file mode 100644 index 0000000..6d3024f --- /dev/null +++ b/vcpkg/ports/butteraugli/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/butteraugli + REF 71b18b636b9c7d1ae0c1d3730b85b3c127eb4511 + SHA512 2e73f8ad8953307eea956ed8bd828e110419d6d9f8a42685d225953d3a8017a79d0701bde0282459dc51198e75a99dcd99dd3c4e7ef065736c512a7b11ea0fdf + HEAD_REF master + PATCHES + missing_header.patch +) + +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 -DDISABLE_INSTALL_TOOLS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/byte-lite/CONTROL b/vcpkg/ports/byte-lite/CONTROL new file mode 100644 index 0000000..e16ff8e --- /dev/null +++ b/vcpkg/ports/byte-lite/CONTROL @@ -0,0 +1,3 @@ +Source: byte-lite +Version: 0.2.0 +Description: A C++17-like byte type for C++98, C++11 and later in a single-file header-only library diff --git a/vcpkg/ports/byte-lite/portfile.cmake b/vcpkg/ports/byte-lite/portfile.cmake new file mode 100644 index 0000000..7fd9f56 --- /dev/null +++ b/vcpkg/ports/byte-lite/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO martinmoene/byte-lite + REF v0.2.0 + SHA512 eefc730a39453dfc367a4478a84d4825cd85721d3c332a57321d0a5c3040a4d45921603ff24220f968dd21df61acea856ae30db8bae6c1e835a1755fb03c84b7 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBYTE_LITE_OPT_BUILD_TESTS=OFF + -DBYTE_LITE_OPT_BUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets( + CONFIG_PATH lib/cmake/${PORT} +) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/lib +) + +file(INSTALL + ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright +) diff --git a/vcpkg/ports/bzip2/CMakeLists.txt b/vcpkg/ports/bzip2/CMakeLists.txt new file mode 100644 index 0000000..e2da221 --- /dev/null +++ b/vcpkg/ports/bzip2/CMakeLists.txt @@ -0,0 +1,45 @@ +cmake_minimum_required(VERSION 3.0) +project(bzip2 C) + +if(CMAKE_BUILD_TYPE STREQUAL Debug) + add_definitions(-DBZ_DEBUG) # enable extra assertions +endif() + +set(BZ2_SOURCES + blocksort.c + huffman.c + crctable.c + randtable.c + compress.c + decompress.c + bzlib.c) + +add_library(bz2 ${BZ2_SOURCES}) +set_target_properties(bz2 PROPERTIES + DEBUG_POSTFIX d + VERSION 1.0.6 + SOVERSION 1.0) +if(BUILD_SHARED_LIBS) + target_compile_definitions(bz2 PRIVATE -DBZ_BUILD_DLL) +endif() + +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) +endif() + +install(TARGETS bz2 + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +if(NOT BZIP2_SKIP_TOOLS) + add_executable(bzip2 bzip2.c ${BZ2_SOURCES}) + add_executable(bzip2recover bzip2recover.c ${BZ2_SOURCES}) + install(TARGETS bzip2 bzip2recover DESTINATION tools/bzip2) +endif() + +if(NOT BZIP2_SKIP_HEADERS) + install(FILES bzlib.h DESTINATION include) +endif() diff --git a/vcpkg/ports/bzip2/bzip2.pc.in b/vcpkg/ports/bzip2/bzip2.pc.in new file mode 100644 index 0000000..91153c1 --- /dev/null +++ b/vcpkg/ports/bzip2/bzip2.pc.in @@ -0,0 +1,11 @@ +prefix=@BZIP2_PREFIX@ +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: bzip2 +Description: bzip2 +Version: 1.0.6 +Requires: +Libs: -L${libdir} -l@bzname@ +Cflags: -I${includedir} \ No newline at end of file diff --git a/vcpkg/ports/bzip2/fix-import-export-macros.patch b/vcpkg/ports/bzip2/fix-import-export-macros.patch new file mode 100644 index 0000000..fc67887 --- /dev/null +++ b/vcpkg/ports/bzip2/fix-import-export-macros.patch @@ -0,0 +1,40 @@ +diff --git a/bzlib.h b/bzlib.h +index 8277123..84fbd0a 100644 +--- a/bzlib.h ++++ b/bzlib.h +@@ -65,29 +65,23 @@ typedef + } + bz_stream; + +- +-#ifndef BZ_IMPORT +-#define BZ_EXPORT +-#endif +- + #ifndef BZ_NO_STDIO + /* Need a definitition for FILE */ + #include + #endif + + #ifdef _WIN32 +-# include + # ifdef small + /* windows.h define small to char */ + # undef small + # endif +-# ifdef BZ_EXPORT +-# define BZ_API(func) WINAPI func +-# define BZ_EXTERN extern ++# define BZ_API(func) func ++# if defined(BZ_BUILD_DLL) ++# define BZ_EXTERN __declspec(dllexport) ++# elif defined(BZ_IMPORT) ++# define BZ_EXTERN __declspec(dllimport) + # else +- /* import windows dll dynamically */ +-# define BZ_API(func) (WINAPI * func) +-# define BZ_EXTERN ++# define BZ_EXTERN + # endif + #else + # define BZ_API(func) func diff --git a/vcpkg/ports/bzip2/portfile.cmake b/vcpkg/ports/bzip2/portfile.cmake new file mode 100644 index 0000000..19314eb --- /dev/null +++ b/vcpkg/ports/bzip2/portfile.cmake @@ -0,0 +1,46 @@ +vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH + URL https://sourceware.org/git/bzip2.git + REF 75a94bea3918e612b879d6a11ca64b8689526147 # REFERENCE BZIP2 VERSION 1.0.8 + SHA512 4611105f9090477b5f6f6dbd303a282099df71644e04d8a998ef81de487f6c8cac4c0ec1283ad737f6767c51f1e3b4e24e2ee021c6dd085925617d9ed145b2ba + PATCHES + fix-import-export-macros.patch +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DBZIP2_SKIP_HEADERS=ON + -DBZIP2_SKIP_TOOLS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(READ "${CURRENT_PACKAGES_DIR}/include/bzlib.h" BZLIB_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined(BZ_IMPORT)" "0" BZLIB_H "${BZLIB_H}") +else() + string(REPLACE "defined(BZ_IMPORT)" "1" BZLIB_H "${BZLIB_H}") +endif() +file(WRITE "${CURRENT_PACKAGES_DIR}/include/bzlib.h" "${BZLIB_H}") + +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + set(BZIP2_PREFIX "${CURRENT_INSTALLED_DIR}") + set(bzname bz2) + configure_file("${CMAKE_CURRENT_LIST_DIR}/bzip2.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/bzip2.pc" @ONLY) +endif() + +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + set(BZIP2_PREFIX "${CURRENT_INSTALLED_DIR}/debug") + set(bzname bz2d) + configure_file("${CMAKE_CURRENT_LIST_DIR}/bzip2.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/bzip2.pc" @ONLY) +endif() + +vcpkg_fixup_pkgconfig() + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/vcpkg/ports/bzip2/usage b/vcpkg/ports/bzip2/usage new file mode 100644 index 0000000..084bf39 --- /dev/null +++ b/vcpkg/ports/bzip2/usage @@ -0,0 +1,4 @@ +The package bzip2 is compatible with built-in CMake targets: + + find_package(BZip2 REQUIRED) + target_link_libraries(main PRIVATE BZip2::BZip2) diff --git a/vcpkg/ports/bzip2/vcpkg.json b/vcpkg/ports/bzip2/vcpkg.json new file mode 100644 index 0000000..8c7520d --- /dev/null +++ b/vcpkg/ports/bzip2/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "bzip2", + "version-string": "1.0.8", + "port-version": 1, + "description": "bzip2 is a freely available, patent free, high-quality data compressor. It typically compresses files to within 10% to 15% of the best available techniques (the PPM family of statistical compressors), whilst being around twice as fast at compression and six times faster at decompression.", + "homepage": "https://sourceware.org/bzip2/", + "documentation": "https://sourceware.org/bzip2/docs.html" +} diff --git a/vcpkg/ports/c-ares/CONTROL b/vcpkg/ports/c-ares/CONTROL new file mode 100644 index 0000000..4898ec5 --- /dev/null +++ b/vcpkg/ports/c-ares/CONTROL @@ -0,0 +1,5 @@ +Source: c-ares +Version: 2019-5-2-1 +Homepage: https://github.com/c-ares/c-ares +Description: A C library for asynchronous DNS requests +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/c-ares/portfile.cmake b/vcpkg/ports/c-ares/portfile.cmake new file mode 100644 index 0000000..6d3769b --- /dev/null +++ b/vcpkg/ports/c-ares/portfile.cmake @@ -0,0 +1,54 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "c-ares does not currently support UWP.") +endif() + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO c-ares/c-ares + REF 9f1fdbf5dd633f81352fac0d6bc0d0c4d45be459 + SHA512 2bb3696e839e37c6f2be4b979ae6d0eab2914d6f0ca043f688e3bb3071d2348cb64424049f019c16bc05d472dd61d5071e865edd229dce023a50f556a1961766 + HEAD_REF master +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(CARES_STATIC 1) + set(CARES_SHARED 0) +else() + set(CARES_STATIC 0) + set(CARES_SHARED 1) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCARES_STATIC=${CARES_STATIC} + -DCARES_SHARED=${CARES_SHARED} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/c-ares) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +else() + file(GLOB EXE_FILES + "${CURRENT_PACKAGES_DIR}/bin/*.exe" + "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe" + ) + if (EXE_FILES) + file(REMOVE ${EXE_FILES}) + endif() +endif() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/c-ares) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/c-ares/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/c-ares/copyright) diff --git a/vcpkg/ports/c4core/CONTROL b/vcpkg/ports/c4core/CONTROL new file mode 100644 index 0000000..62eed51 --- /dev/null +++ b/vcpkg/ports/c4core/CONTROL @@ -0,0 +1,5 @@ +Source: c4core +Version: 2020-04-12 +Homepage: https://github.com/biojppm/c4core +Description: Library of low-level C++ utilities +Supports: !(arm|arm64|osx) \ No newline at end of file diff --git a/vcpkg/ports/c4core/portfile.cmake b/vcpkg/ports/c4core/portfile.cmake new file mode 100644 index 0000000..2b764af --- /dev/null +++ b/vcpkg/ports/c4core/portfile.cmake @@ -0,0 +1,79 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_fail_port_install( + ON_ARCH "arm" "arm64" + ON_TARGET "OSX" +) + +# Get c4core src +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO biojppm/c4core + REF bc4de0291bb96ae509ee99a54f139563cf14638e + SHA512 2c0c4511cb43f34492b6d0d8dfef90623dfacb6ae43f6a6173fbf9efa63f7a018235ec9dcd9a211a3cd393c2114adb39a4276df94e2d23f9c354d644a36e51a0 + HEAD_REF master +) + +set(COMMIT_HASH a0f0c17bfc9a9a91cc72891539b513c129c6d122) + +# Get cmake scripts for c4core +vcpkg_download_distfile(CMAKE_ARCHIVE + URLS "https://github.com/biojppm/cmake/archive/${COMMIT_HASH}.zip" + FILENAME "cmake-${COMMIT_HASH}.zip" + SHA512 4fbc711f3120501fa40733c3b66e34cd6a7e1b598b1378fbb59d1a87c88290a03d021f5176634089da41682fd918d7e27c6c146052dec54d7e956be15f12744f +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH_CMAKE + ARCHIVE ${CMAKE_ARCHIVE} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src/deps" +) + +file(REMOVE_RECURSE "${SOURCE_PATH}/cmake") +file(RENAME ${SOURCE_PATH_CMAKE} "${SOURCE_PATH}/cmake") + +set(COMMIT_HASH 78e525c6e74df6d62d782864a52c0d279dcee24f) + +vcpkg_download_distfile(DEBUGBREAK_ARCHIVE + URLS "https://github.com/biojppm/debugbreak/archive/${COMMIT_HASH}.zip" + FILENAME "debugbreak-${COMMIT_HASH}.zip" + SHA512 25f3d45b09ce362f736fac0f6d6a6c7f2053fec4975b32b0565288893e4658fd0648a7988c3a5fe0e373e92705d7a3970eaa7cfc053f375ffb75e80772d0df64 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH_DEBUGBREAK + ARCHIVE ${DEBUGBREAK_ARCHIVE} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src/deps" +) + +file(REMOVE_RECURSE "${SOURCE_PATH}/ext/debugbreak") +file(RENAME ${SOURCE_PATH_DEBUGBREAK} "${SOURCE_PATH}/ext/debugbreak") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +elseif(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/c4core) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/c4core) +endif() + +# Fix paths in config file +file(READ "${CURRENT_PACKAGES_DIR}/share/c4core/c4coreConfig.cmake" _contents) +string(REGEX REPLACE [[[ \t\r\n]*"\${PACKAGE_PREFIX_DIR}[\./\\]*"]] [["${PACKAGE_PREFIX_DIR}/../.."]] _contents "${_contents}") +file(WRITE "${CURRENT_PACKAGES_DIR}/share/c4core/c4coreConfig.cmake" "${_contents}") + +# Fix path to header +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/c4/error.hpp" "" "\"extern/debugbreak/debugbreak.h\"") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL + "${SOURCE_PATH}/LICENSE.txt" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/c4core" RENAME copyright) diff --git a/vcpkg/ports/caf/CONTROL b/vcpkg/ports/caf/CONTROL new file mode 100644 index 0000000..1e0ca36 --- /dev/null +++ b/vcpkg/ports/caf/CONTROL @@ -0,0 +1,5 @@ +Source: caf +Version: 0.17.6 +Homepage: https://github.com/actor-framework/actor-framework +Build-Depends: openssl +Description: an open source C++11 actor model implementation featuring lightweight & fast actor implementations, pattern matching for messages, network transparent messaging, and more. diff --git a/vcpkg/ports/caf/openssl-version-override.patch b/vcpkg/ports/caf/openssl-version-override.patch new file mode 100644 index 0000000..5a03371 --- /dev/null +++ b/vcpkg/ports/caf/openssl-version-override.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2d908e8..d270297 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -495,6 +495,9 @@ if(NOT CAF_NO_OPENSSL) + message(STATUS + "Disable OpenSSL. Required >= 1.0.1 due to TLSv1.2 support.") + set(CAF_NO_OPENSSL yes) ++ elseif(CAF_OPENSSL_VERSION_OVERRIDE) ++ include_directories(BEFORE ${OPENSSL_INCLUDE_DIR}) ++ add_optional_caf_lib(openssl) + else() + if(NOT CMAKE_CROSSCOMPILING) + # Check if openssl headers and library versions match diff --git a/vcpkg/ports/caf/portfile.cmake b/vcpkg/ports/caf/portfile.cmake new file mode 100644 index 0000000..2cd5150 --- /dev/null +++ b/vcpkg/ports/caf/portfile.cmake @@ -0,0 +1,56 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +set(CAF_TOOL_PATH ) +if (VCPKG_TARGET_IS_WINDOWS AND (TRIPLET_SYSTEM_ARCH STREQUAL arm OR TRIPLET_SYSTEM_ARCH STREQUAL arm64)) + if (EXISTS ${CURRENT_INSTALLED_DIR}/../x86-windows/tools/caf-generate-enum-strings.exe) + set(CAF_TOOL_PATH ${CURRENT_INSTALLED_DIR}/../x86-windows/tools/) + elseif (EXISTS ${CURRENT_INSTALLED_DIR}/../x86-windows-static/tools/caf-generate-enum-strings.exe) + set(CAF_TOOL_PATH ${CURRENT_INSTALLED_DIR}/../x86-windows-static/tools/) + elseif (EXISTS ${CURRENT_INSTALLED_DIR}/../x64-windows/tools/caf-generate-enum-strings.exe AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") + set(CAF_TOOL_PATH ${CURRENT_INSTALLED_DIR}/../x64-windows/tools/) + elseif (EXISTS ${CURRENT_INSTALLED_DIR}/../x64-windows-static/tools/caf-generate-enum-strings.exe AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") + set(CAF_TOOL_PATH ${CURRENT_INSTALLED_DIR}/../x64-windows-static/tools/) + else() + message(FATAL_ERROR "Since caf needs to run the built-in executable, please install caf:x86-windows or caf:x64-windows first.") + endif() +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO actor-framework/actor-framework + REF f7d4fc7ac679e18ba385f64434f8015c3cea9cb5 # 0.17.6 + SHA512 8b4719c26dfad68eed6f2528263702e42f9865bb7a9f2d40909dc6c3fc20bb7259fe44a5f89390ba714c7f9359db2d171ff44685641962c24a70f4e2aa3f3f65 + HEAD_REF master + PATCHES + openssl-version-override.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON + -DCAF_BUILD_STATIC=ON + -DCAF_BUILD_STATIC_ONLY=ON + -DCAF_NO_TOOLS=ON + -DCAF_NO_EXAMPLES=ON + -DCAF_NO_BENCHMARKS=ON + -DCAF_NO_UNIT_TESTS=ON + -DCAF_NO_PROTOBUF_EXAMPLES=ON + -DCAF_NO_QT_EXAMPLES=ON + -DCAF_NO_OPENCL=ON + -DCAF_NO_OPENSSL=OFF + -DCAF_NO_CURL_EXAMPLES=ON + -DCAF_OPENSSL_VERSION_OVERRIDE=ON + -DCAF_TOOL_PATH=${CAF_TOOL_PATH} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/caf RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/caffe2/CONTROL b/vcpkg/ports/caffe2/CONTROL new file mode 100644 index 0000000..e9bb4db --- /dev/null +++ b/vcpkg/ports/caffe2/CONTROL @@ -0,0 +1,6 @@ +Source: caffe2 +Version: 0.8.1-3 +Build-Depends: lmdb, gflags, glog, eigen3, protobuf +Homepage: https://github.com/caffe2/caffe2 +Description: Caffe2 is a lightweight, modular, and scalable deep learning framework. +Supports: !x86 \ No newline at end of file diff --git a/vcpkg/ports/caffe2/fix-space.patch b/vcpkg/ports/caffe2/fix-space.patch new file mode 100644 index 0000000..910f52f --- /dev/null +++ b/vcpkg/ports/caffe2/fix-space.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/Utils.cmake b/cmake/Utils.cmake +index e082298..25186e4 100644 +--- a/cmake/Utils.cmake ++++ b/cmake/Utils.cmake +@@ -386,7 +386,7 @@ function(caffe_add_whole_archive_flag lib output_var) + set(${output_var} -Wl,-force_load,$ PARENT_SCOPE) + elseif(MSVC) + # In MSVC, we will add whole archive in default. +- set(${output_var} -WHOLEARCHIVE:$ PARENT_SCOPE) ++ set(${output_var} -WHOLEARCHIVE:"$" PARENT_SCOPE) + else() + # Assume everything else is like gcc + set(${output_var} -Wl,--whole-archive ${lib} -Wl,--no-whole-archive PARENT_SCOPE) diff --git a/vcpkg/ports/caffe2/msvc-fixes.patch b/vcpkg/ports/caffe2/msvc-fixes.patch new file mode 100644 index 0000000..446dbd4 --- /dev/null +++ b/vcpkg/ports/caffe2/msvc-fixes.patch @@ -0,0 +1,396 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8054d98..35934f5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -56,6 +56,14 @@ option(USE_ROCKSDB "Use RocksDB" ON) + option(USE_SNPE "Use Qualcomm's SNPE library" OFF) + option(USE_THREADS "Use Threads" ON) + option(USE_ZMQ "Use ZMQ" OFF) ++if(MSVC) ++ if(BUILD_BUILD_SHARED_LIBS) ++ set(USE_STATIC_RUNTIME_DEFAULT OFF) ++ else() ++ set(USE_STATIC_RUNTIME_DEFAULT ON) ++ endif() ++ option(USE_STATIC_RUNTIME "Link to the static runtime (/MT) instead of dynamic (/MD)" ${USE_STATIC_RUNTIME_DEFAULT}) ++endif() + + # External projects + include(ExternalProject) +@@ -99,7 +107,7 @@ else() + foreach(flag_var + CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE + CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) +- if (NOT ${BUILD_SHARED_LIBS}) ++ if (USE_STATIC_RUNTIME) + if(${flag_var} MATCHES "/MD") + string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") + endif(${flag_var} MATCHES "/MD") +diff --git a/caffe2/core/logging.cc b/caffe2/core/logging.cc +index 1b4468e..1379f3a 100644 +--- a/caffe2/core/logging.cc ++++ b/caffe2/core/logging.cc +@@ -117,7 +117,7 @@ using fLB::FLAGS_logtostderr; + + #endif // CAFFE2_USE_GFLAGS + +-CAFFE2_DEFINE_int(caffe2_log_level, google::ERROR, ++CAFFE2_DEFINE_int(caffe2_log_level, google::GLOG_ERROR, + "The minimum log level that caffe2 will output."); + + // Google glog's api does not have an external function that allows one to check +@@ -134,15 +134,23 @@ bool IsGoogleLoggingInitialized(); + namespace caffe2 { + bool InitCaffeLogging(int* argc, char** argv) { + if (*argc == 0) return true; +- if (!::google::glog_internal_namespace_::IsGoogleLoggingInitialized()) { ++#if !(defined(_MSC_VER) && defined(GLOG_IS_A_DLL)) ++ // IsGoogleLoggingInitialized is not exported from the glog DLL ++ // so we can't call it. If our program calls InitGoogleLogging twice glog will ++ // abort it. ++ if (!::google::glog_internal_namespace_::IsGoogleLoggingInitialized()) ++#endif ++ { + ::google::InitGoogleLogging(argv[0]); ++#if !defined(_MSC_VER) + ::google::InstallFailureSignalHandler(); ++#endif + } + // If caffe2_log_level is set and is lower than the min log level by glog, + // we will transfer the caffe2_log_level setting to glog to override that. + FLAGS_minloglevel = std::min(FLAGS_caffe2_log_level, FLAGS_minloglevel); + // If caffe2_log_level is explicitly set, let's also turn on logtostderr. +- if (FLAGS_caffe2_log_level < google::ERROR) { ++ if (FLAGS_caffe2_log_level < google::GLOG_ERROR) { + FLAGS_logtostderr = 1; + } + // Also, transfer the caffe2_log_level verbose setting to glog. +@@ -154,7 +162,7 @@ bool InitCaffeLogging(int* argc, char** argv) { + + void ShowLogInfoToStderr() { + FLAGS_logtostderr = 1; +- FLAGS_minloglevel = std::min(FLAGS_minloglevel, google::INFO); ++ FLAGS_minloglevel = std::min(FLAGS_minloglevel, google::GLOG_INFO); + } + } // namespace caffe2 + +diff --git a/caffe2/core/logging_is_google_glog.h b/caffe2/core/logging_is_google_glog.h +index 7dd2b4f..2df4435 100644 +--- a/caffe2/core/logging_is_google_glog.h ++++ b/caffe2/core/logging_is_google_glog.h +@@ -8,7 +8,7 @@ + // it. Some mobile platforms do not like stl_logging, so we add an + // overload in that case as well. + +-#if !defined(__CUDACC__) && !defined(CAFFE2_USE_MINIMAL_GOOGLE_GLOG) ++#if !defined(__CUDARCH__) && !defined(CAFFE2_USE_MINIMAL_GOOGLE_GLOG) + #include + #else // !defined(__CUDACC__) && !!defined(CAFFE2_USE_MINIMAL_GOOGLE_GLOG) + +diff --git a/caffe2/image/image_input_op.h b/caffe2/image/image_input_op.h +index 9604e98..7d90014 100644 +--- a/caffe2/image/image_input_op.h ++++ b/caffe2/image/image_input_op.h +@@ -214,13 +214,13 @@ ImageInputOp::ImageInputOp( + + // hard-coded PCA eigenvectors and eigenvalues, based on RBG channel order + color_lighting_eigvecs_.push_back( +- std::vector{-144.7125, 183.396, 102.2295}); ++ std::vector{-144.7125f, 183.396f, 102.2295f}); + color_lighting_eigvecs_.push_back( +- std::vector{-148.104, -1.1475, -207.57}); ++ std::vector{-148.104f, -1.1475f, -207.57f}); + color_lighting_eigvecs_.push_back( +- std::vector{-148.818, -177.174, 107.1765}); ++ std::vector{-148.818f, -177.174f, 107.1765f}); + +- color_lighting_eigvals_ = std::vector{0.2175, 0.0188, 0.0045}; ++ color_lighting_eigvals_ = std::vector{0.2175f, 0.0188f, 0.0045f}; + + CAFFE_ENFORCE_GT(batch_size_, 0, "Batch size should be nonnegative."); + if (use_caffe_datum_) { +diff --git a/caffe2/operators/batch_matmul_op.cc b/caffe2/operators/batch_matmul_op.cc +index c2e578d..28cf030 100644 +--- a/caffe2/operators/batch_matmul_op.cc ++++ b/caffe2/operators/batch_matmul_op.cc +@@ -34,7 +34,7 @@ size (C x K x N) where C is the batch size and i ranges from 0 to C-1. + b_dim1 = in[1].dims(2); + } + return vector { +- CreateTensorShape(vector { ++ CreateTensorShape(vector { + in[0].dims(0), a_dim0, b_dim1}, + in[0].data_type()) + }; +diff --git a/caffe2/operators/layer_norm_op.cu b/caffe2/operators/layer_norm_op.cu +index df13fc3..68bbc97 100644 +--- a/caffe2/operators/layer_norm_op.cu ++++ b/caffe2/operators/layer_norm_op.cu +@@ -252,8 +252,8 @@ bool LayerNormGradientOp::DoRunWithType() { + auto* ginput = Output(0); + + const auto canonical_axis = norm_inputs.canonical_axis_index(axis_); +- const int left = norm_inputs.size_to_dim(canonical_axis); +- const int right = norm_inputs.size_from_dim(canonical_axis); ++ const TIndex left = norm_inputs.size_to_dim(canonical_axis); ++ const TIndex right = norm_inputs.size_from_dim(canonical_axis); + + ginput->ResizeLike(norm_inputs); + std::vector stats_dims( +@@ -261,7 +261,7 @@ bool LayerNormGradientOp::DoRunWithType() { + stats_dims.push_back(1); + dmean_.Resize(stats_dims); + dstdev_.Resize(stats_dims); +- gscratch_.Resize(std::vector{left, right}); ++ gscratch_.Resize(std::vector{left, right}); + + std::vector segs(left + 1); + std::iota(segs.begin(), segs.end(), 0); +@@ -291,7 +291,7 @@ bool LayerNormGradientOp::DoRunWithType() { + dout.data(), + gscratch_.mutable_data()); + +- dstdev_.Resize(vector{left, 1}); ++ dstdev_.Resize(vector{left, 1}); + // dstdev = reduce(temp1) + allocScratchAndReduce( + gscratch_.data(), +diff --git a/caffe2/operators/lengths_top_k_op.cc b/caffe2/operators/lengths_top_k_op.cc +index c871d53..bad741a 100644 +--- a/caffe2/operators/lengths_top_k_op.cc ++++ b/caffe2/operators/lengths_top_k_op.cc +@@ -14,7 +14,7 @@ bool LengthsTopKOp::RunOnDevice() { + + output_topk_values->Resize(N * k_); + output_topk_indices->Resize(N * k_); +- std::vector output_dims = std::vector({N, k_}); ++ std::vector output_dims = std::vector({N, k_}); + output_topk_values->Reshape(output_dims); + output_topk_indices->Reshape(output_dims); + T* output_topk_values_data = output_topk_values->template mutable_data(); +diff --git a/caffe2/operators/pool_op_cudnn.cu b/caffe2/operators/pool_op_cudnn.cu +index a380d8d..b0cd326 100644 +--- a/caffe2/operators/pool_op_cudnn.cu ++++ b/caffe2/operators/pool_op_cudnn.cu +@@ -467,6 +467,15 @@ class CuDNNPoolGradientOp : public ConvPoolOpBase { + cudnnPoolingDescriptor_t pooling_desc_; + cudnnPoolingMode_t mode_; + ++// MSVC defines IN and OUT in minwindef.h ++#ifdef IN ++#undef IN ++#endif ++ ++#ifdef OUT ++#undef OUT ++#endif ++ + // Input: X, Y, dY + // Output: dX + INPUT_TAGS(IN, OUT, OUT_GRAD); +diff --git a/caffe2/operators/recurrent_op_cudnn.cc b/caffe2/operators/recurrent_op_cudnn.cc +index 7777813..58bc8c3 100644 +--- a/caffe2/operators/recurrent_op_cudnn.cc ++++ b/caffe2/operators/recurrent_op_cudnn.cc +@@ -115,10 +115,11 @@ void RecurrentBaseOp::initialize( + + // RNN setup + { +- CUDNN_ENFORCE(cudnnSetRNNDescriptor( ++// Do not use #if condition inside CUDNN_ENFORCE ++// to avoid macro expansion errors. + #if CUDNN_MAJOR >= 7 ++CUDNN_ENFORCE(cudnnSetRNNDescriptor( + cudnn_wrapper_.inline_cudnn_handle(), +-#endif + rnnDesc_, + hiddenSize, + numLayers, +@@ -126,10 +127,19 @@ void RecurrentBaseOp::initialize( + rnnInput, + rnnDirection, + rnnMode, +-#if CUDNN_MAJOR >= 7 + CUDNN_RNN_ALGO_STANDARD, // TODO: verify correctness / efficiency. +-#endif + cudnnTypeWrapper::type)); ++#else ++ CUDNN_ENFORCE(cudnnSetRNNDescriptor( ++ rnnDesc_, ++ hiddenSize, ++ numLayers, ++ dropoutDesc_, ++ rnnInput, ++ rnnDirection, ++ rnnMode, ++ cudnnTypeWrapper::type)); ++#endif // CUDNN_MAJOR >= 7 + } + // X setup + { +diff --git a/caffe2/utils/CMakeLists.txt b/caffe2/utils/CMakeLists.txt +index f90af5a..919a638 100644 +--- a/caffe2/utils/CMakeLists.txt ++++ b/caffe2/utils/CMakeLists.txt +@@ -27,6 +27,10 @@ exclude(Caffe2_CPU_SRCS "${Caffe2_CPU_SRCS}" ${Caffe2_GPU_SRCS}) + # will directly link nnpack pthreadpool. + file(GLOB_RECURSE tmp pthreadpool*) + exclude(Caffe2_CPU_SRCS "${Caffe2_CPU_SRCS}" ${tmp}) ++if(MSVC) ++ file(GLOB_RECURSE tmp *ThreadPool.cc) ++ exclude(Caffe2_CPU_SRCS "${Caffe2_CPU_SRCS}" ${tmp}) ++endif() + + # ---[ GPU test files + file(GLOB_RECURSE tmp *_gpu_test.cc) +diff --git a/caffe2/utils/GpuBitonicSort.cuh b/caffe2/utils/GpuBitonicSort.cuh +index f52bb50..a199bcb 100644 +--- a/caffe2/utils/GpuBitonicSort.cuh ++++ b/caffe2/utils/GpuBitonicSort.cuh +@@ -39,9 +39,11 @@ __device__ inline void bitonicSort(K* keys, + // Assume the sort is taking place in shared memory + // static_assert(Power2SortSize * (sizeof(K) + sizeof(V)) < 32768, + // "sort data too large (>32768 bytes)"); +- static_assert(math::integerIsPowerOf2(Power2SortSize), ++ static_assert(math::integerIsPowerOf2( ++ std::integral_constant::value), + "sort size must be power of 2"); +- static_assert(math::integerIsPowerOf2(ThreadsPerBlock), ++ static_assert(math::integerIsPowerOf2( ++ std::integral_constant::value), + "threads in block must be power of 2"); + + // If what we are sorting is too small, then not all threads +@@ -107,7 +109,8 @@ __device__ inline void warpBitonicSort(K* keys, + // Smaller sorts should use a warp shuffle sort + static_assert(Power2SortSize > kWarpSize, + "sort not large enough"); +- static_assert(math::integerIsPowerOf2(Power2SortSize), ++ static_assert(math::integerIsPowerOf2( ++ std::integral_constant::value), + "sort size must be power of 2"); + static_assert(Power2SortSize <= kMaxBitonicSortSize, + "sort size <= 4096 only supported"); +diff --git a/caffe2/utils/math.h b/caffe2/utils/math.h +index 6c352dc..a1eda9d 100644 +--- a/caffe2/utils/math.h ++++ b/caffe2/utils/math.h +@@ -426,18 +426,10 @@ constexpr T roundUp(T a, T b) { + return divUp(a, b) * b; + } + +-// Returns true if the given integer type is a power-of-2 (positive only) +-// Note(jiayq): windows reported an error per +-// https://github.com/caffe2/caffe2/issues/997 +-// and as a result will make it a macro. +-#ifdef _MSC_VER +-#define integerIsPowerOf2(v) ((v) && !((v) & ((v) - 1))) +-#else // _MSC_VER + template + constexpr bool integerIsPowerOf2(T v) { + return (v && !(v & (v - 1))); + } +-#endif // _MSC_VER + + // Returns log2(n) for a positive integer type + template +diff --git a/cmake/Cuda.cmake b/cmake/Cuda.cmake +index df70e2f..ca1b123 100644 +--- a/cmake/Cuda.cmake ++++ b/cmake/Cuda.cmake +@@ -37,6 +37,10 @@ function(caffe2_detect_installed_gpus out_variable) + ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) + + if(__nvcc_res EQUAL 0) ++ # nvcc outputs text containing line breaks when building with MSVC. ++ # The line below prevents CMake from inserting a variable with line ++ # breaks in the cache ++ string(REGEX MATCH "([1-9].[0-9])" __nvcc_out "${__nvcc_out}") + string(REPLACE "2.1" "2.1(2.0)" __nvcc_out "${__nvcc_out}") + set(CUDA_gpu_detect_output ${__nvcc_out} CACHE INTERNAL "Returned GPU architetures from caffe_detect_gpus tool" FORCE) + endif() +@@ -249,7 +253,7 @@ endif() + # Debug and Release symbol support + if (MSVC) + if (${CMAKE_BUILD_TYPE} MATCHES "Release") +- if (${BUILD_SHARED_LIBS}) ++ if (NOT USE_STATIC_RUNTIME) + list(APPEND CUDA_NVCC_FLAGS "-Xcompiler -MD") + else() + list(APPEND CUDA_NVCC_FLAGS "-Xcompiler -MT") +@@ -259,7 +263,7 @@ if (MSVC) + "Caffe2 currently does not support the combination of MSVC, Cuda " + "and Debug mode. Either set USE_CUDA=OFF or set the build type " + "to Release") +- if (${BUILD_SHARED_LIBS}) ++ if (NOT USE_STATIC_RUNTIME) + list(APPEND CUDA_NVCC_FLAGS "-Xcompiler -MDd") + else() + list(APPEND CUDA_NVCC_FLAGS "-Xcompiler -MTd") +diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake +index afb6b68..bdad8b6 100644 +--- a/cmake/Dependencies.cmake ++++ b/cmake/Dependencies.cmake +@@ -182,6 +182,15 @@ if(USE_OPENCV) + message(WARNING "Not compiling with OpenCV. Suppress this warning with -DUSE_OPENCV=OFF") + set(USE_OPENCV OFF) + endif() ++ if(USE_OPENCV AND VCPKG_TARGET_TRIPLET MATCHES static) ++ find_package(LibLZMA QUIET) ++ if(LIBLZMA_FOUND) ++ list(APPEND Caffe2_DEPENDENCY_LIBS ${LIBLZMA_LIBRARIES}) ++ else() ++ message(WARNING "Not compiling with OpenCV. Could not find liblzma. Suppress this warning with -DUSE_OPENCV=OFF") ++ set(USE_OPENCV OFF) ++ endif() ++ endif() + endif() + + # ---[ FFMPEG +diff --git a/cmake/Modules/FindGlog.cmake b/cmake/Modules/FindGlog.cmake +index 1167532..9780ba5 100644 +--- a/cmake/Modules/FindGlog.cmake ++++ b/cmake/Modules/FindGlog.cmake +@@ -27,6 +27,10 @@ if(MSVC) + endif() + if(TARGET ${GLOG_LIBRARY}) + get_target_property(GLOG_INCLUDE_DIR ${GLOG_LIBRARY} INTERFACE_INCLUDE_DIRECTORIES) ++ get_target_property(GLOG_TYPE ${GLOG_LIBRARY} TYPE) ++ if("${GLOG_TYPE}" STREQUAL "SHARED_LIBRARY") ++ add_definitions(-DGLOG_IS_A_DLL=1) ++ endif() + endif() + else() + find_library(GLOG_LIBRARY glog +diff --git a/cmake/ProtoBuf.cmake b/cmake/ProtoBuf.cmake +index 89975c8..e37d6da 100644 +--- a/cmake/ProtoBuf.cmake ++++ b/cmake/ProtoBuf.cmake +@@ -13,6 +13,9 @@ function(custom_protobuf_find) + # so we turn it off here. + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations" PARENT_SCOPE) + endif() ++ if(MSVC) ++ set(protobuf_MSVC_STATIC_RUNTIME ${USE_STATIC_RUNTIME}) ++ endif() + add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/protobuf/cmake) + caffe2_include_directories(${PROJECT_SOURCE_DIR}/third_party/protobuf/src) + list(APPEND Caffe2_DEPENDENCY_LIBS libprotobuf) +diff --git a/cmake/Summary.cmake b/cmake/Summary.cmake +index b7423a6..2996484 100644 +--- a/cmake/Summary.cmake ++++ b/cmake/Summary.cmake +@@ -19,6 +19,13 @@ function (Caffe2_print_configuration_summary) + message(STATUS " System : ${CMAKE_SYSTEM_NAME}") + message(STATUS " C++ compiler : ${CMAKE_CXX_COMPILER}") + message(STATUS " C++ compiler version : ${CMAKE_CXX_COMPILER_VERSION}") ++ if(MSVC) ++ if(USE_STATIC_RUNTIME) ++ message(STATUS " Runtime : static (/MT)") ++ else() ++ message(STATUS " Runtime : dynamic (/MD)") ++ endif() ++ endif() + message(STATUS " Protobuf compiler : ${PROTOBUF_PROTOC_EXECUTABLE}") + message(STATUS " CXX flags : ${CMAKE_CXX_FLAGS}") + message(STATUS " Build type : ${CMAKE_BUILD_TYPE}") diff --git a/vcpkg/ports/caffe2/portfile.cmake b/vcpkg/ports/caffe2/portfile.cmake new file mode 100644 index 0000000..930b04d --- /dev/null +++ b/vcpkg/ports/caffe2/portfile.cmake @@ -0,0 +1,107 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +if (VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + message(FATAL_ERROR "Caffe2 cannot be built for the x86 architecture") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO caffe2/caffe2 + REF eab13a2d5c807bf5d49efd4584787b639a981b79 + SHA512 505a8540b0c28329c4e2ce443ac8e198c1ee613eb6b932927ee9d04c8afdc95081f3c4581408b7097d567840427b31f6d7626ea80f27e56532f2f2e6acd87023 + HEAD_REF master + PATCHES + msvc-fixes.patch + fix-space.patch +) + +if(VCPKG_CRT_LINKAGE STREQUAL static) + set(USE_STATIC_RUNTIME ON) +else() + set(USE_STATIC_RUNTIME OFF) +endif() + +if(CMAKE_HOST_WIN32) + set(EXECUTABLE_SUFFIX ".exe") +else() + set(EXECUTABLE_SUFFIX "") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + # Set to ON to use python + -DBUILD_PYTHON=OFF + -DUSE_STATIC_RUNTIME=${USE_STATIC_RUNTIME} + -DUSE_GFLAGS=ON + -DUSE_GLOG=ON + # Cannot use OpenCV without USE_CUDA=ON right now + -DUSE_OPENCV=OFF + -DUSE_THREADS=ON + # Uncomment to use MKL + # -DBLAS=MKL + -DUSE_CUDA=OFF + -DUSE_FFMPEG=OFF + -DUSE_GLOO=OFF + -DUSE_LEVELDB=OFF + -DUSE_LITE_PROTO=OFF + -DUSE_METAL=OFF + -DUSE_MOBILE_OPENGL=OFF + -DUSE_MPI=OFF + -DUSE_NCCL=OFF + -DUSE_NERVANA_GPU=OFF + -DUSE_NNPACK=OFF + -DUSE_OBSERVERS=OFF + -DUSE_OPENMP=ON + -DUSE_REDIS=OFF + -DUSE_ROCKSDB=OFF + -DUSE_SNPE=OFF + -DUSE_ZMQ=OFF + -DBUILD_TEST=OFF + -DPROTOBUF_PROTOC_EXECUTABLE:FILEPATH=${CURRENT_INSTALLED_DIR}/tools/protobuf/protoc${EXECUTABLE_SUFFIX} +) + +vcpkg_install_cmake() + +# Remove folders from install +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/caffe) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/caffe2) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/caffe) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/caffe2) + +# Remove empty directories from include (should probably fix or +# patch caffe2 install script) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/caffe2/test) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/caffe2/python) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/caffe2/experiments/python) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/caffe2/contrib/opengl) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/caffe2/contrib/nnpack) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/caffe2/contrib/libopencl-stub) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/caffe2/contrib/docker-ubuntu-14.04) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/caffe2/binaries) + +# Move bin to tools +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) +file(GLOB BINARIES ${CURRENT_PACKAGES_DIR}/bin/*${EXECUTABLE_SUFFIX}) +foreach(binary ${BINARIES}) + get_filename_component(binary_name ${binary} NAME) + file(RENAME ${binary} ${CURRENT_PACKAGES_DIR}/tools/${binary_name}) +endforeach() + +# Remove bin directory +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Remove headers and tools from debug build +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# install license +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/caffe2) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/caffe2 RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/cairo/0001_fix_osx_defined.patch b/vcpkg/ports/cairo/0001_fix_osx_defined.patch new file mode 100644 index 0000000..7365dcc --- /dev/null +++ b/vcpkg/ports/cairo/0001_fix_osx_defined.patch @@ -0,0 +1,13 @@ +diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c +index 3b308757..36700ff0 100644 +--- a/src/cairo-ft-font.c ++++ b/src/cairo-ft-font.c +@@ -67,7 +67,7 @@ + #include FT_LCD_FILTER_H + #endif + +-#if HAVE_UNISTD_H ++#if defined(HAVE_UNISTD_H) + #include + #else + #define access(p, m) 0 diff --git a/vcpkg/ports/cairo/CMakeLists.txt b/vcpkg/ports/cairo/CMakeLists.txt new file mode 100644 index 0000000..e333f30 --- /dev/null +++ b/vcpkg/ports/cairo/CMakeLists.txt @@ -0,0 +1,308 @@ +cmake_minimum_required(VERSION 3.11) +project(cairo C) + +# Add include directories +include_directories(".") +if(WIN32) + include_directories("./win32") +endif() + +set(CAIRO_HEADERS + cairo.h + cairo-deprecated.h + cairo-features.h + cairo-pdf.h + cairo-ps.h + cairo-script.h + cairo-svg.h + ../cairo-version.h + cairo-win32.h + ../util/cairo-gobject/cairo-gobject.h + cairo-ft.h +) + +set(CAIRO_X11_HEADERS + cairo-xlib.h +) + +file(GLOB SOURCES +"cairo-analysis-surface.c" +"cairo-arc.c" +"cairo-array.c" +"cairo-atomic.c" +"cairo-base64-stream.c" +"cairo-base85-stream.c" +"cairo-bentley-ottmann.c" +"cairo-bentley-ottmann-rectangular.c" +"cairo-bentley-ottmann-rectilinear.c" +"cairo-botor-scan-converter.c" +"cairo-boxes.c" +"cairo-boxes-intersect.c" +"cairo.c" +"cairo-cache.c" +"cairo-clip.c" +"cairo-clip-boxes.c" +"cairo-clip-polygon.c" +"cairo-clip-region.c" +"cairo-clip-surface.c" +"cairo-color.c" +"cairo-composite-rectangles.c" +"cairo-compositor.c" +"cairo-contour.c" +"cairo-damage.c" +"cairo-debug.c" +"cairo-default-context.c" +"cairo-device.c" +"cairo-error.c" +"cairo-fallback-compositor.c" +"cairo-fixed.c" +"cairo-font-face.c" +"cairo-font-face-twin.c" +"cairo-font-face-twin-data.c" +"cairo-font-options.c" +"cairo-freelist.c" +"cairo-freed-pool.c" +"cairo-gstate.c" +"cairo-hash.c" +"cairo-hull.c" +"cairo-image-compositor.c" +"cairo-image-info.c" +"cairo-image-source.c" +"cairo-image-surface.c" +"cairo-line.c" +"cairo-lzw.c" +"cairo-matrix.c" +"cairo-mask-compositor.c" +"cairo-mesh-pattern-rasterizer.c" +"cairo-mempool.c" +"cairo-misc.c" +"cairo-mono-scan-converter.c" +"cairo-mutex.c" +"cairo-no-compositor.c" +"cairo-observer.c" +"cairo-output-stream.c" +"cairo-paginated-surface.c" +"cairo-path-bounds.c" +"cairo-path.c" +"cairo-path-fill.c" +"cairo-path-fixed.c" +"cairo-path-in-fill.c" +"cairo-path-stroke.c" +"cairo-path-stroke-boxes.c" +"cairo-path-stroke-polygon.c" +"cairo-path-stroke-traps.c" +"cairo-path-stroke-tristrip.c" +"cairo-pattern.c" +"cairo-pen.c" +"cairo-polygon.c" +"cairo-polygon-intersect.c" +"cairo-polygon-reduce.c" +"cairo-raster-source-pattern.c" +"cairo-recording-surface.c" +"cairo-rectangle.c" +"cairo-rectangular-scan-converter.c" +"cairo-region.c" +"cairo-rtree.c" +"cairo-scaled-font.c" +"cairo-shape-mask-compositor.c" +"cairo-slope.c" +"cairo-spans.c" +"cairo-spans-compositor.c" +"cairo-spline.c" +"cairo-stroke-dash.c" +"cairo-stroke-style.c" +"cairo-surface.c" +"cairo-surface-clipper.c" +"cairo-surface-fallback.c" +"cairo-surface-observer.c" +"cairo-surface-offset.c" +"cairo-surface-snapshot.c" +"cairo-surface-subsurface.c" +"cairo-surface-wrapper.c" +"cairo-time.c" +"cairo-tor-scan-converter.c" +"cairo-tor22-scan-converter.c" +"cairo-clip-tor-scan-converter.c" +"cairo-tag-attributes.c" +"cairo-tag-stack.c" +"cairo-toy-font-face.c" +"cairo-traps.c" +"cairo-tristrip.c" +"cairo-traps-compositor.c" +"cairo-unicode.c" +"cairo-user-font.c" +"cairo-version.c" +"cairo-wideint.c" +# generic font support +"cairo-cff-subset.c" +"cairo-scaled-font-subsets.c" +"cairo-truetype-subset.c" +"cairo-type1-fallback.c" +"cairo-type1-glyph-names.c" +"cairo-type1-subset.c" +"cairo-type3-glyph-surface.c" +# pdf +"cairo-pdf-interchange.c" +"cairo-pdf-operators.c" +"cairo-pdf-shading.c" +"cairo-pdf-surface.c" +# png +"cairo-png.c" +# ps surface +"cairo-ps-surface.c" +# deflate source +"cairo-deflate-stream.c" +# svg surface +"cairo-svg-surface.c" +# script surface +"cairo-script-surface.c" +# fontconfig + freetype +"cairo-ft-font.c" +) + +# win32 +file(GLOB PLATFORM_SOURCES_WIN32 +"win32/cairo-win32-debug.c" +"win32/cairo-win32-device.c" +"win32/cairo-win32-gdi-compositor.c" +"win32/cairo-win32-system.c" +"win32/cairo-win32-surface.c" +"win32/cairo-win32-display-surface.c" +"win32/cairo-win32-printing-surface.c" +"win32/cairo-win32-font.c" +) + +if(WIN32) + list(APPEND SOURCES ${PLATFORM_SOURCES_WIN32}) +endif() + +set(CMAKE_DEBUG_POSTFIX "d") + +find_package(Threads REQUIRED) +find_package(ZLIB REQUIRED) +find_package(PNG REQUIRED) +find_package(Freetype REQUIRED) +find_package(unofficial-fontconfig CONFIG REQUIRED) +find_package(unofficial-pixman CONFIG REQUIRED) + +# Cairo needs to be told which features of FreeType are availible +add_definitions( + -DHAVE_FT_GLYPHSLOT_EMBOLDEN=1 + -DHAVE_FT_LIBRARY_SETLCDFILTER=1 + -DHAVE_FT_GLYPHSLOT_OBLIQUE=1 + -DHAVE_FT_LOAD_SFNT_TABLE=1 + -DHAVE_FT_GET_X11_FONT_FORMAT=1) + +# additional features for macOS +if(UNIX OR APPLE) + add_definitions( + -DHAVE_INTTYPES_H=1 + -DHAVE_STDINT_H=1 + -DHAVE_SYS_TYPES_H=1 + -DHAVE_UINT64_T=1 + -DHAVE_UNISTD_H=1 + -DCAIRO_HAS_PTHREAD=1 + -DCAIRO_HAS_REAL_PTHREAD=1) +endif() + +add_library(cairo ${SOURCES}) + +if (WITH_X11) + target_compile_definitions(cairo PUBLIC -DCAIRO_HAS_XLIB_SURFACE=1) +endif() +target_include_directories(cairo PUBLIC ${FREETYPE_INCLUDE_DIRS}) +target_link_libraries(cairo PRIVATE ZLIB::ZLIB PNG::PNG Freetype::Freetype unofficial::pixman::pixman-1 unofficial::fontconfig::fontconfig) + +if(WIN32) + target_link_libraries(cairo PRIVATE gdi32 msimg32 user32) +endif() + +# GObject support module + +set(CAIRO_GOBJECT_SOURCES + "../util/cairo-gobject/cairo-gobject-enums.c" + "../util/cairo-gobject/cairo-gobject-structs.c") + +# GObject support sources do not include header with export macro +if(WITH_GOBJECT) + if(BUILD_SHARED_LIBS) + if(MSVC) + set_source_files_properties( + "../util/cairo-gobject/cairo-gobject-enums.c" + "../util/cairo-gobject/cairo-gobject-structs.c" + PROPERTIES COMPILE_DEFINITIONS "cairo_public=__declspec(dllexport)") + else() + set_source_files_properties( + "../util/cairo-gobject/cairo-gobject-enums.c" + "../util/cairo-gobject/cairo-gobject-structs.c" + PROPERTIES COMPILE_DEFINITIONS "cairo_public=__attribute__((visibility(\"default\")))") + endif() + endif() + + find_package(unofficial-glib CONFIG REQUIRED) + add_library(cairo-gobject ${CAIRO_GOBJECT_SOURCES}) + target_link_libraries(cairo-gobject PRIVATE cairo unofficial::glib::gobject unofficial::glib::glib) +endif() + +if(MSVC) + # cairo produces a lot of warnings which are disabled here because they otherwise fill up the log files + # NOTE: options only available to MSVC, clang in macOS doesn't understand these flags + target_compile_options(cairo PRIVATE + "/wd4244" "/wd4146" "/wd4312" "/wd4267" "/wd4996" "/wd4311" "/wd4334" "/wd4101" + ) + if(WITH_GOBJECT) + target_compile_options(cairo-gobject PRIVATE + "/wd4244" "/wd4146" "/wd4312" "/wd4267" "/wd4996" "/wd4311" "/wd4334" "/wd4101" + ) + endif() +endif() + +if (CAIRO_HAS_XLIB_SURFACE) + file(INSTALL cairo-xlib.h DESTINATION include) +endif() + +install(FILES ${CAIRO_HEADERS} DESTINATION include) +install(FILES ${CAIRO_HEADERS} DESTINATION include/cairo) + +if (WITH_X11) + install(FILES ${CAIRO_X11_HEADERS} DESTINATION include) + install(FILES ${CAIRO_X11_HEADERS} DESTINATION include/cairo) +endif() + +install(TARGETS cairo + EXPORT cairo-targets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(WITH_GOBJECT) + install(TARGETS cairo-gobject + EXPORT cairo-targets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) +endif() + +install( + EXPORT cairo-targets + NAMESPACE unofficial::cairo:: + FILE unofficial-cairo-targets.cmake + DESTINATION share/unofficial-cairo +) + +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/unofficial-cairo-config.cmake " +include(CMakeFindDependencyMacro) +find_dependency(ZLIB) +find_dependency(PNG) +find_dependency(Freetype) +find_dependency(unofficial-fontconfig CONFIG) +find_dependency(unofficial-pixman CONFIG) +if(WITH_GOBJECT) + find_dependency(unofficial-glib CONFIG) +endif() + +include(\${CMAKE_CURRENT_LIST_DIR}/unofficial-cairo-targets.cmake) +") +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-cairo-config.cmake DESTINATION share/unofficial-cairo) diff --git a/vcpkg/ports/cairo/CONTROL b/vcpkg/ports/cairo/CONTROL new file mode 100644 index 0000000..6c26c77 --- /dev/null +++ b/vcpkg/ports/cairo/CONTROL @@ -0,0 +1,13 @@ +Source: cairo +Version: 1.16.0 +Port-Version: 7 +Homepage: https://cairographics.org +Description: Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB. +Build-Depends: zlib, libpng, pixman, freetype, fontconfig + +Feature: x11 +Description: build with x11 support + +Feature: gobject +Description: build gobject module +Build-Depends: glib \ No newline at end of file diff --git a/vcpkg/ports/cairo/cairo-features.h b/vcpkg/ports/cairo/cairo-features.h new file mode 100644 index 0000000..e3eb31c --- /dev/null +++ b/vcpkg/ports/cairo/cairo-features.h @@ -0,0 +1,38 @@ +#ifndef CAIRO_FEATURES_H +#define CAIRO_FEATURES_H +/* Chosen from the various possible defines in "../build/Makefile.win32.features.h"" + guided by "../build/Makefile.win32.features". Modify at your own risk. +*/ + +/* Always for Win32 */ +#ifdef _WIN32 +#define CAIRO_HAS_WIN32_SURFACE 1 +#define CAIRO_HAS_WIN32_FONT 1 +#endif + +/* Require libpng */ +#define CAIRO_HAS_PNG_FUNCTIONS 1 +#define CAIRO_HAS_PS_SURFACE 1 +#define CAIRO_HAS_PDF_SURFACE 1 + +// Likely available +#define CAIRO_HAS_SCRIPT_SURFACE 1 +#define CAIRO_HAS_SVG_SURFACE 1 + +/* Always available */ +#define CAIRO_HAS_IMAGE_SURFACE 1 +#define CAIRO_HAS_MIME_SURFACE 1 +#define CAIRO_HAS_RECORDING_SURFACE 1 +#define CAIRO_HAS_OBSERVER_SURFACE 1 +#define CAIRO_HAS_USER_FONT 1 + +/* Require GObject */ +#define CAIRO_HAS_GOBJECT_FUNCTIONS 1 + +/* Require FreeType */ +#define CAIRO_HAS_FT_FONT 1 + +/* Require FontConfig */ +#define CAIRO_HAS_FC_FONT 1 + +#endif diff --git a/vcpkg/ports/cairo/export-only-in-shared-build.patch b/vcpkg/ports/cairo/export-only-in-shared-build.patch new file mode 100644 index 0000000..d8b46c1 --- /dev/null +++ b/vcpkg/ports/cairo/export-only-in-shared-build.patch @@ -0,0 +1,15 @@ +diff --git a/src/cairoint.h b/src/cairoint.h +index 4fedf86..dfa149e 100644 +--- a/src/cairoint.h ++++ b/src/cairoint.h +@@ -50,7 +50,9 @@ + #include "config.h" + #endif + +-#ifdef _MSC_VER ++#if defined _MSC_VER && defined cairo_EXPORTS + #define cairo_public __declspec(dllexport) ++#else ++#define cairo_public + #endif + diff --git a/vcpkg/ports/cairo/portfile.cmake b/vcpkg/ports/cairo/portfile.cmake new file mode 100644 index 0000000..2dab7e4 --- /dev/null +++ b/vcpkg/ports/cairo/portfile.cmake @@ -0,0 +1,65 @@ +set(CAIRO_VERSION 1.16.0) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.cairographics.org/releases/cairo-${CAIRO_VERSION}.tar.xz" + FILENAME "cairo-${CAIRO_VERSION}.tar.xz" + SHA512 9eb27c4cf01c0b8b56f2e15e651f6d4e52c99d0005875546405b64f1132aed12fbf84727273f493d84056a13105e065009d89e94a8bfaf2be2649e232b82377f +) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${CAIRO_VERSION} + PATCHES + export-only-in-shared-build.patch + 0001_fix_osx_defined.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/src) +file(COPY ${CURRENT_PORT_DIR}/cairo-features.h DESTINATION ${SOURCE_PATH}/src) + +if ("x11" IN_LIST FEATURES) + if (VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "Feature x11 only support UNIX.") + endif() + message(WARNING "You will need to install Xorg dependencies to use feature x11:\napt install libx11-dev libxft-dev\n") +endif() + +if("gobject" IN_LIST FEATURES) + if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message(FATAL_ERROR "Feature gobject currently only supports dynamic build.") + endif() +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + x11 WITH_X11 + gobject WITH_GOBJECT +) + +vcpkg_configure_cmake( + PREFER_NINJA + SOURCE_PATH ${SOURCE_PATH}/src + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-cairo TARGET_PATH share/unofficial-cairo) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +foreach(FILE "${CURRENT_PACKAGES_DIR}/include/cairo.h" "${CURRENT_PACKAGES_DIR}/include/cairo/cairo.h") + file(READ ${FILE} CAIRO_H) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined (CAIRO_WIN32_STATIC_BUILD)" "1" CAIRO_H "${CAIRO_H}") + else() + string(REPLACE "defined (CAIRO_WIN32_STATIC_BUILD)" "0" CAIRO_H "${CAIRO_H}") + endif() + file(WRITE ${FILE} "${CAIRO_H}") +endforeach() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() + +#vcpkg_test_cmake(PACKAGE_NAME unofficial-cairo) \ No newline at end of file diff --git a/vcpkg/ports/cairomm/0001-fix-build.patch b/vcpkg/ports/cairomm/0001-fix-build.patch new file mode 100644 index 0000000..59e281d --- /dev/null +++ b/vcpkg/ports/cairomm/0001-fix-build.patch @@ -0,0 +1,25 @@ +From b769f250a39df110db2615c0e0d85b52f2ab6e77 Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka +Date: Sun, 12 Mar 2017 17:57:03 +0300 +Subject: [PATCH] Fix build + +--- + cairomm/win32_surface.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/cairomm/win32_surface.h b/cairomm/win32_surface.h +index 2e35b9a..c4454c4 100644 +--- a/cairomm/win32_surface.h ++++ b/cairomm/win32_surface.h +@@ -84,6 +84,8 @@ public: + */ + static RefPtr create(HDC hdc); + ++ static RefPtr create(Format format, int width, int height); ++ + /** Creates a device-independent-bitmap surface not associated with any + * particular existing surface or device context. The created bitmap will be + * unititialized. +-- +2.11.0.windows.1 + diff --git a/vcpkg/ports/cairomm/CMakeLists.txt b/vcpkg/ports/cairomm/CMakeLists.txt new file mode 100644 index 0000000..1cc0297 --- /dev/null +++ b/vcpkg/ports/cairomm/CMakeLists.txt @@ -0,0 +1,110 @@ +project(cairomm) +cmake_minimum_required(VERSION 3.4) + +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/build/cmake") + +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +#get cairomm version +file (STRINGS "configure.ac" CONFIGURE_AC_INIT REGEX "AC_INIT\\(\\[cairomm\\], \\[.*\\].*" ) +string(REGEX REPLACE "AC_INIT\\(\\[.*\\], \\[([0-9]+\\.[0-9]+\\.[0-9]+)\\].*" "\\1" VERSION ${CONFIGURE_AC_INIT}) +string(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" CAIROMM_MAJOR_VERSION ${VERSION}) +string(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" CAIROMM_MINOR_VERSION ${VERSION}) +string(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" CAIROMM_MICRO_VERSION ${VERSION}) +message(STATUS "Ciaromm version: ${CAIROMM_MAJOR_VERSION}.${CAIROMM_MINOR_VERSION}.${CAIROMM_MICRO_VERSION}") + +find_package(Cairo REQUIRED) +find_package(Freetype REQUIRED) +find_package(SigC++ REQUIRED) + +#configure +option(BUILD_SHARED_LIBS "Build the shared library" ON) + +option(CAIROMM_ENABLE_API_EXCEPTIONS "enable API exceptions" ON) +if(CAIROMM_ENABLE_API_EXCEPTIONS) + set(CAIROMM_EXCEPTIONS_ENABLED ON) +else() + set(CAIROMM_EXCEPTIONS_ENABLED OFF) +endif() + +configure_file("build/cmake/cairommconfig.h.cmake" "cairommconfig.h") +configure_file("build/cmake/cairomm.rc.cmake" "cairomm.rc" @ONLY) + +#build +set(cairomm_cc + cairomm/context.cc + cairomm/context_surface_quartz.cc + cairomm/context_surface_win32.cc + cairomm/context_surface_xlib.cc + cairomm/device.cc + cairomm/exception.cc + cairomm/fontface.cc + cairomm/fontoptions.cc + cairomm/matrix.cc + cairomm/path.cc + cairomm/pattern.cc + cairomm/private.cc + cairomm/quartz_font.cc + cairomm/quartz_surface.cc + cairomm/region.cc + cairomm/scaledfont.cc + cairomm/script.cc + cairomm/script_surface.cc + cairomm/surface.cc + cairomm/win32_font.cc + cairomm/win32_surface.cc + cairomm/xlib_surface.cc) + +set(cairomm_public_h + cairomm/cairomm.h + cairomm/context.h + cairomm/device.h + cairomm/enums.h + cairomm/exception.h + cairomm/fontface.h + cairomm/fontoptions.h + cairomm/matrix.h + cairomm/path.h + cairomm/pattern.h + cairomm/quartz_font.h + cairomm/quartz_surface.h + cairomm/refptr.h + cairomm/region.h + cairomm/scaledfont.h + cairomm/script.h + cairomm/script_surface.h + cairomm/surface.h + cairomm/types.h + cairomm/win32_font.h + cairomm/win32_surface.h + cairomm/xlib_surface.h) + +set(cairomm_private_h + cairomm/context_private.h + cairomm/private.h) + +set(cairomm_rc + ${CMAKE_BINARY_DIR}/cairomm.rc) + +add_library(cairomm-1.0 ${cairomm_cc} ${cairomm_rc}) +target_link_libraries(cairomm-1.0 ${CAIRO_LIBRARY} ${SIGC++_LIBRARY} Freetype::Freetype) +target_include_directories(cairomm-1.0 PRIVATE + ${CAIRO_INCLUDE_DIR} + ${SIGC++_INCLUDE_DIR} + ${CMAKE_BINARY_DIR} + ${CMAKE_SOURCE_DIR}) + +install( + TARGETS cairomm-1.0 + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +install( + FILES ${cairomm_public_h} + DESTINATION include/cairomm) + +install( + FILES ${CMAKE_BINARY_DIR}/cairommconfig.h + DESTINATION include) diff --git a/vcpkg/ports/cairomm/CONTROL b/vcpkg/ports/cairomm/CONTROL new file mode 100644 index 0000000..7a89c9e --- /dev/null +++ b/vcpkg/ports/cairomm/CONTROL @@ -0,0 +1,6 @@ +Source: cairomm +Version: 1.15.3 +Port-Version: 5 +Homepage: https://www.cairographics.org +Description: A C++ wrapper for the cairo graphics library +Build-Depends: cairo, libsigcpp diff --git a/vcpkg/ports/cairomm/cmake/FindCairo.cmake b/vcpkg/ports/cairomm/cmake/FindCairo.cmake new file mode 100644 index 0000000..0a87fad --- /dev/null +++ b/vcpkg/ports/cairomm/cmake/FindCairo.cmake @@ -0,0 +1,131 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. +# +# revision: 2 +# See https://github.com/CMakePorts/CMakeFindPackages for updates +# +#.rst: +# FindCairo +# --------- +# +# Locate Cairo library +# +# This module defines +# +# :: +# CAIRO_FOUND - system has the CAIRO library +# CAIRO_INCLUDE_DIR - the CAIRO include directory +# CAIRO_LIBRARIES - The libraries needed to use CAIRO +# CAIRO_VERSION - This is set to $major.$minor.$revision (eg. 0.9.8) +# CAIRO_VERSION_STRING - This is set to $major.$minor.$revision (eg. 0.9.8) +# +# Authors: +# Copyright (c) Eric Wing +# Copyright (c) Alexander Neundorf +# Copyright (c) 2008 Joshua L. Blocher +# Copyright (c) 2012 Dmitry Baryshnikov +# Copyright (c) 2013-2017 Mikhail Paulyshka +# + + +if (NOT WIN32) + find_package(PkgConfig) + if (PKG_CONFIG_FOUND) + pkg_check_modules(_CAIRO cairo) + + SET(CAIRO_VERSION ${_CAIRO_VERSION}) + STRING (REGEX REPLACE "([0-9]+).([0-9]+).([0-9]+)" "\\1" num "${CAIRO_VERSION}") + MATH (EXPR CAIRO_VERSION_MAJOR "${num}") + STRING (REGEX REPLACE "([0-9]+).([0-9]+).([0-9]+)" "\\2" num "${CAIRO_VERSION}") + MATH (EXPR CAIRO_VERSION_MINOR "${num}") + STRING (REGEX REPLACE "([0-9]+).([0-9]+).([0-9]+)" "\\3" num "${CAIRO_VERSION}") + MATH (EXPR CAIRO_VERSION_MICRO "${num}") + endif (PKG_CONFIG_FOUND) +endif (NOT WIN32) + +set(_CAIRO_ROOT_HINTS_AND_PATHS + HINTS + $ENV{CAIRO} + $ENV{CAIRO_DIR} + ${CMAKE_FIND_ROOT_PATH} + ${CAIRO_ROOT_DIR} + PATHS + ${CMAKE_FIND_ROOT_PATH} + $ENV{CAIRO}/src + /usr + /usr/local +) + +find_path(CAIRO_INCLUDE_DIR + NAMES + cairo.h + HINTS + ${_CAIRO_INCLUDEDIR} + ${_CAIRO_ROOT_HINTS_AND_PATHS} + PATH_SUFFIXES + include + "include/cairo" +) + +if(NOT CAIRO_LIBRARY) + FIND_LIBRARY(CAIRO_LIBRARY_RELEASE + NAMES + cairo + cairo-static + HINTS + ${_CAIRO_LIBDIR} + ${_CAIRO_ROOT_HINTS_AND_PATHS} + PATH_SUFFIXES + "lib" + "local/lib" + ) + + FIND_LIBRARY(CAIRO_LIBRARY_DEBUG + NAMES + cairod + cairo-staticd + HINTS + ${_CAIRO_LIBDIR} + ${_CAIRO_ROOT_HINTS_AND_PATHS} + PATH_SUFFIXES + "lib" + "local/lib" + ) + + include(SelectLibraryConfigurations) + select_library_configurations(CAIRO) +endif() +set(CAIRO_LIBRARIES ${CAIRO_LIBRARY}) + +if (NOT CAIRO_VERSION) + if (EXISTS "${CAIRO_INCLUDE_DIR}/cairo-version.h") + file(READ "${CAIRO_INCLUDE_DIR}/cairo-version.h" CAIRO_VERSION_CONTENT) + + string(REGEX MATCH "#define +CAIRO_VERSION_MAJOR +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}") + set(CAIRO_VERSION_MAJOR "${CMAKE_MATCH_1}") + + string(REGEX MATCH "#define +CAIRO_VERSION_MINOR +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}") + set(CAIRO_VERSION_MINOR "${CMAKE_MATCH_1}") + + string(REGEX MATCH "#define +CAIRO_VERSION_MICRO +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}") + set(CAIRO_VERSION_MICRO "${CMAKE_MATCH_1}") + + set(CAIRO_VERSION "${CAIRO_VERSION_MAJOR}.${CAIRO_VERSION_MINOR}.${CAIRO_VERSION_MICRO}") + set(CAIRO_VERSION_STRING CAIRO_VERSION) + endif () +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + CAIRO + REQUIRED_VARS + CAIRO_LIBRARIES + CAIRO_INCLUDE_DIR + VERSION_VAR + CAIRO_VERSION_STRING +) + +MARK_AS_ADVANCED( + CAIRO_INCLUDE_DIR + CAIRO_LIBRARY + CAIRO_LIBRARIES) diff --git a/vcpkg/ports/cairomm/cmake/FindSigC++.cmake b/vcpkg/ports/cairomm/cmake/FindSigC++.cmake new file mode 100644 index 0000000..8d65f70 --- /dev/null +++ b/vcpkg/ports/cairomm/cmake/FindSigC++.cmake @@ -0,0 +1,111 @@ +# - Try to find SIGC++ +# Once done this will define +# +# SIGC++_ROOT_DIR - Set this variable to the root installation of SIGC++ +# SIGC++_FOUND - system has SIGC++ +# SIGC++_INCLUDE_DIRS - the SIGC++ include directory +# SIGC++_LIBRARIES - Link these to use SIGC++ +# +# Copyright (c) 2008 Joshua L. Blocher +# Copyright (c) 2012 Dmitry Baryshnikov +# Copyright (c) 2013-2017 Mikhail Paulyshka +# +# Distributed under the OSI-approved BSD License +# + +if (NOT WIN32) + find_package(PkgConfig) + if (PKG_CONFIG_FOUND) + pkg_check_modules(_SIGC++ sigc++-2.0) + SET(SIGC++_VERSION ${_SIGC++_VERSION}) + endif (PKG_CONFIG_FOUND) +endif (NOT WIN32) + +SET(_SIGC++_ROOT_HINTS + $ENV{SIGC++} + ${CMAKE_FIND_ROOT_PATH} + ${SIGC++_ROOT_DIR} +) + +SET(_SIGC++_ROOT_PATHS + $ENV{SIGC++}/src + /usr + /usr/local +) + +SET(_SIGC++_ROOT_HINTS_AND_PATHS + HINTS ${_SIGC++_ROOT_HINTS} + PATHS ${_SIGC++_ROOT_PATHS} +) + +FIND_PATH(SIGC++_INCLUDE_DIR + NAMES + "sigc++/sigc++.h" + HINTS + ${_SIGC++_INCLUDEDIR} + ${_SIGC++_ROOT_HINTS_AND_PATHS} + PATH_SUFFIXES + include + "include/sigc++-2.0" +) + +find_path(SIGC++_CONFIG_INCLUDE_DIR + NAMES + sigc++config.h + HINTS + ${_SIGC++_LIBDIR} + ${_SIGC++_INCLUDEDIR} + ${_SIGC++_ROOT_HINTS_AND_PATHS} + PATH_SUFFIXES + include + lib + "sigc++-2.0/include" + "lib/sigc++-2.0" + "lib/sigc++-2.0/include" +) + +FIND_LIBRARY(SIGC++_LIBRARY + NAMES + sigc-2.0 + HINTS + ${_SIGC++_LIBDIR} + ${_SIGC++_ROOT_HINTS_AND_PATHS} + PATH_SUFFIXES + "lib" + "local/lib" +) + +SET(SIGC++_LIBRARIES + ${SIGC++_LIBRARY} +) + +SET(SIGC++_INCLUDE_DIRS + ${SIGC++_INCLUDE_DIR} + ${SIGC++_CONFIG_INCLUDE_DIR} +) + +if (NOT SIGC++_VERSION) + if (EXISTS "${SIGC++_CONFIG_INCLUDE_DIR}/sigc++config.h") + file(READ "${SIGC++_CONFIG_INCLUDE_DIR}/sigc++config.h" SIGC++_VERSION_CONTENT) + + string(REGEX MATCH "#define +SIGCXX_MAJOR_VERSION +([0-9]+)" _dummy "${SIGC++_VERSION_CONTENT}") + set(SIGC++_VERSION_MAJOR "${CMAKE_MATCH_1}") + + string(REGEX MATCH "#define +SIGCXX_MINOR_VERSION +([0-9]+)" _dummy "${SIGC++_VERSION_CONTENT}") + set(SIGC++_VERSION_MINOR "${CMAKE_MATCH_1}") + + string(REGEX MATCH "#define +SIGCXX_MICRO_VERSION +([0-9]+)" _dummy "${SIGC++_VERSION_CONTENT}") + set(SIGC++_VERSION_MICRO "${CMAKE_MATCH_1}") + + set(SIGC++_VERSION "${SIGC++_VERSION_MAJOR}.${SIGC++_VERSION_MINOR}.${SIGC++_VERSION_MICRO}") + endif (EXISTS "${SIGC++_CONFIG_INCLUDE_DIR}/sigc++config.h") +endif(NOT SIGC++_VERSION) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(SIGC++ + REQUIRED_VARS SIGC++_LIBRARIES SIGC++_INCLUDE_DIRS + VERSION_VAR SIGC++_VERSION + FAIL_MESSAGE "Could NOT find SIGC++, try to set the path to SIGC++ root folder in the system variable SIGC++" +) + +MARK_AS_ADVANCED(SIGC++_CONFIG_INCLUDE_DIR SIGC++_INCLUDE_DIR SIGC++_INCLUDE_DIRS SIGC++_LIBRARY SIGC++_LIBRARIES) diff --git a/vcpkg/ports/cairomm/cmake/cairomm.rc.cmake b/vcpkg/ports/cairomm/cmake/cairomm.rc.cmake new file mode 100644 index 0000000..4aa7a0a --- /dev/null +++ b/vcpkg/ports/cairomm/cmake/cairomm.rc.cmake @@ -0,0 +1,71 @@ + +#define APSTUDIO_READONLY_SYMBOLS + +#include + +#undef APSTUDIO_READONLY_SYMBOLS + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +VS_VERSION_INFO VERSIONINFO + FILEVERSION @CAIROMM_MAJOR_VERSION@,@CAIROMM_MINOR_VERSION@,@CAIROMM_MICRO_VERSION@,1 + PRODUCTVERSION @CAIROMM_MAJOR_VERSION@,@CAIROMM_MINOR_VERSION@,@CAIROMM_MICRO_VERSION@,1 + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "The cairomm development team (see AUTHORS)" + VALUE "FileDescription", "The official C++ wrapper for cairo" + VALUE "FileVersion", "@VERSION@" + VALUE "LegalCopyright", "Distribution is under the LGPL (see COPYING)" + VALUE "OriginalFilename", "cairomm-1.0" + VALUE "ProductName", "cairomm" + VALUE "ProductVersion", "@VERSION@" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + +#endif // English (U.S.) resources + +#ifndef APSTUDIO_INVOKED + +#endif // not APSTUDIO_INVOKED diff --git a/vcpkg/ports/cairomm/cmake/cairommconfig.h.cmake b/vcpkg/ports/cairomm/cmake/cairommconfig.h.cmake new file mode 100644 index 0000000..526a70c --- /dev/null +++ b/vcpkg/ports/cairomm/cmake/cairommconfig.h.cmake @@ -0,0 +1,13 @@ +/* This file is part of cairomm. */ + +/* Defined when the --enable-api-exceptions configure argument was given */ +#cmakedefine CAIROMM_EXCEPTIONS_ENABLED 1 + +/* Major version number of cairomm. */ +#cmakedefine CAIROMM_MAJOR_VERSION @CAIROMM_MAJOR_VERSION@ + +/* Minor version number of cairomm. */ +#cmakedefine CAIROMM_MINOR_VERSION @CAIROMM_MINOR_VERSION@ + +/* Micro version number of cairomm. */ +#cmakedefine CAIROMM_MICRO_VERSION @CAIROMM_MICRO_VERSION@ diff --git a/vcpkg/ports/cairomm/portfile.cmake b/vcpkg/ports/cairomm/portfile.cmake new file mode 100644 index 0000000..e14f601 --- /dev/null +++ b/vcpkg/ports/cairomm/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +set(CAIROMM_VERSION 1.15.3) +set(CAIROMM_HASH a2c28786dbd167179561d8f580eeb11d10634a36dfdb1adeefc0279acf83ee906f01f264cb924845fc4ab98da1afac71e1ead742f283c1a32368ca9af28e464a) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.cairographics.org/releases/cairomm-${CAIROMM_VERSION}.tar.gz" + FILENAME "cairomm-${CAIROMM_VERSION}.tar.gz" + SHA512 ${CAIROMM_HASH} +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + 0001-fix-build.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake DESTINATION ${SOURCE_PATH}/build) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/capnproto/CONTROL b/vcpkg/ports/capnproto/CONTROL new file mode 100644 index 0000000..73ac1b2 --- /dev/null +++ b/vcpkg/ports/capnproto/CONTROL @@ -0,0 +1,6 @@ +Source: capnproto +Version: 0.8.0 +Description: Data interchange format and capability-based RPC system +Homepage: https://capnproto.org/ +Build-Depends: zlib +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/capnproto/portfile.cmake b/vcpkg/ports/capnproto/portfile.cmake new file mode 100644 index 0000000..f352a5f --- /dev/null +++ b/vcpkg/ports/capnproto/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO capnproto/capnproto + REF 57a4ca5af5a7f55b768a9d9d6655250bffb1257f # v0.8.0 + SHA512 6550356a40a13d41fbeef3887027de1134c4bc37e4d79435e67da1f65665f3856f7cd663be392135cf4a08fffcfd4e171614026c20bfc5727adfd624b2d33e35 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/CapnProto) + +vcpkg_copy_tools(TOOL_NAMES capnp capnpc-c++ capnpc-capnp AUTO_CLEAN) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# Disabled for now, see #5630 and #5635 +# vcpkg_test_cmake(PACKAGE_NAME CapnProto) diff --git a/vcpkg/ports/capstone/CONTROL b/vcpkg/ports/capstone/CONTROL new file mode 100644 index 0000000..60e2a2a --- /dev/null +++ b/vcpkg/ports/capstone/CONTROL @@ -0,0 +1,51 @@ +Source: capstone +Version: 4.0.2 +Port-Version: 1 +Homepage: https://github.com/aquynh/capstone +Description: Multi-architecture disassembly framework + +Feature: arm +Description: Capstone disassembly support for ARM + +Feature: arm64 +Description: Capstone disassembly support for ARM64 + +Feature: evm +Description: Capstone disassembly support for EVM + +Feature: m680x +Description: Capstone disassembly support for M680X + +Feature: m68k +Description: Capstone disassembly support for M68k + +Feature: mips +Description: Capstone disassembly support for MIPS + +Feature: ppc +Description: Capstone disassembly support for PowerPC + +Feature: sparc +Description: Capstone disassembly support for SPARC + +Feature: sysz +Description: Capstone disassembly support for SysZ + +Feature: tms320c64x +Description: Capstone disassembly support for TMS320C64X + +Feature: x86 +Description: Capstone disassembly support for x86 + +Feature: x86-reduce +Description: Capstone disassembly support for x86 without support for less used instructions +Build-Depends: capstone[x86] + +Feature: xcore +Description: Capstone disassembly support for XCore + +Feature: diet +Description: Build Capstone in diet mode (reduced features for smaller size) + +Feature: osxkernel +Description: Support for emedding Capstone into OSX Kernel extensions diff --git a/vcpkg/ports/capstone/portfile.cmake b/vcpkg/ports/capstone/portfile.cmake new file mode 100644 index 0000000..3e01523 --- /dev/null +++ b/vcpkg/ports/capstone/portfile.cmake @@ -0,0 +1,55 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REF 4.0.2 + REPO "aquynh/capstone" + SHA512 7f93534517307b737422a8825b66b2a1f3e1cca2049465d60ab12595940154aaf843ba40ed348fce58de58b990c19a0caef289060eb72898cb008a88c470970e + HEAD_REF v4 +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CS_BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" CS_BUILD_SHARED) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + "arm" CAPSTONE_ARM_SUPPORT + "arm64" CAPSTONE_ARM64_SUPPORT + "evm" CAPSTONE_EVM_SUPPORT + "m680x" CAPSTONE_M680X_SUPPORT + "m68k" CAPSTONE_M68K_SUPPORT + "mips" CAPSTONE_MIPS_SUPPORT + "osxkernel" CAPSTONE_OSXKERNEL_SUPPORT + "ppc" CAPSTONE_PPC_SUPPORT + "sparc" CAPSTONE_SPARC_SUPPORT + "sysz" CAPSTONE_SYSZ_SUPPORT + "tms320c64x" CAPSTONE_TMS320C64X_SUPPORT + "x86" CAPSTONE_X86_SUPPORT + "x86-reduce" CAPSTONE_X86_REDUCE + "xcore" CAPSTONE_XCORE_SUPPORT + "diet" CAPSTONE_BUILD_DIET +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCAPSTONE_BUILD_STATIC=${CS_BUILD_STATIC} + -DCAPSTONE_BUILD_SHARED=${CS_BUILD_SHARED} + -DCAPSTONE_BUILD_TESTS=OFF + -DCAPSTONE_BUILD_CSTOOL=OFF + -DCAPSTONE_BUILD_STATIC_RUNTIME=OFF + -DCAPSTONE_X86_ONLY=OFF + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +if(EXES) + file(REMOVE ${EXES}) +endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/cartographer/CONTROL b/vcpkg/ports/cartographer/CONTROL new file mode 100644 index 0000000..10037db --- /dev/null +++ b/vcpkg/ports/cartographer/CONTROL @@ -0,0 +1,5 @@ +Source: cartographer +Version: 1.0.0-2 +Build-Depends: ceres[suitesparse], gflags, glog, lua, cairo, boost-iostreams, gtest, protobuf +Homepage: https://github.com/googlecartographer/cartographer +Description: Google 2D & 3D SLAM package diff --git a/vcpkg/ports/cartographer/fix-build-error.patch b/vcpkg/ports/cartographer/fix-build-error.patch new file mode 100644 index 0000000..9474c78 --- /dev/null +++ b/vcpkg/ports/cartographer/fix-build-error.patch @@ -0,0 +1,25 @@ +diff --git a/cartographer/common/internal/testing/thread_pool_for_testing.cc b/cartographer/common/internal/testing/thread_pool_for_testing.cc +index f804e13..c987f68 100644 +--- a/cartographer/common/internal/testing/thread_pool_for_testing.cc ++++ b/cartographer/common/internal/testing/thread_pool_for_testing.cc +@@ -16,7 +16,7 @@ + + #include "cartographer/common/internal/testing/thread_pool_for_testing.h" + +-#include ++//#include + #include + #include + #include +diff --git a/cartographer/mapping/pose_graph_interface.h b/cartographer/mapping/pose_graph_interface.h +index 6483ef4..6456720 100644 +--- a/cartographer/mapping/pose_graph_interface.h ++++ b/cartographer/mapping/pose_graph_interface.h +@@ -18,6 +18,7 @@ + #define CARTOGRAPHER_MAPPING_POSE_GRAPH_INTERFACE_H_ + + #include ++#include + + #include "cartographer/common/optional.h" + #include "cartographer/mapping/id.h" diff --git a/vcpkg/ports/cartographer/fix-find-packages.patch b/vcpkg/ports/cartographer/fix-find-packages.patch new file mode 100644 index 0000000..3ab53bf --- /dev/null +++ b/vcpkg/ports/cartographer/fix-find-packages.patch @@ -0,0 +1,181 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2e3a686..f36f15a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -25,27 +25,33 @@ option(BUILD_GRPC "build Cartographer gRPC support" false) + option(BUILD_PROMETHEUS "build Prometheus monitoring support" false) + + include("${PROJECT_SOURCE_DIR}/cmake/functions.cmake") +-google_initialize_cartographer_project() +-google_enable_testing() ++#google_initialize_cartographer_project() ++#google_enable_testing() + + find_package(Boost REQUIRED COMPONENTS iostreams) + find_package(Ceres REQUIRED COMPONENTS SuiteSparse) + find_package(Eigen3 REQUIRED) +-find_package(LuaGoogle REQUIRED) ++find_package(Lua REQUIRED) + find_package(Protobuf 3.0.0 REQUIRED) ++find_package(glog REQUIRED) ++find_package(gflags REQUIRED) + + if (${BUILD_GRPC}) + find_package(async_grpc REQUIRED) + endif() + +-include(FindPkgConfig) +-PKG_SEARCH_MODULE(CAIRO REQUIRED cairo>=1.12.16) ++#include(FindPkgConfig) ++#PKG_SEARCH_MODULE(CAIRO REQUIRED cairo>=1.12.16) ++if(CMAKE_BUILD_TYPE STREQUAL Debug) ++ set(CAIRO_LIB_SUFFIX d) ++endif() ++find_library(CAIRO_LIBRARY cairo${CAIRO_LIB_SUFFIX}) + + # Only build the documentation if we can find Sphinx. +-find_package(Sphinx) +-if(SPHINX_FOUND) +- add_subdirectory("docs") +-endif() ++#find_package(Sphinx) ++#if(SPHINX_FOUND) ++# add_subdirectory("docs") ++#endif() + + # Install catkin package.xml + install(FILES package.xml DESTINATION share/cartographer) +@@ -169,20 +175,20 @@ configure_file( + ${PROJECT_SOURCE_DIR}/cartographer/common/config.h.cmake + ${PROJECT_BINARY_DIR}/cartographer/common/config.h) + +-google_binary(cartographer_autogenerate_ground_truth +- SRCS +- cartographer/ground_truth/autogenerate_ground_truth_main.cc +-) +- +-google_binary(cartographer_compute_relations_metrics +- SRCS +- cartographer/ground_truth/compute_relations_metrics_main.cc +-) +- +-google_binary(cartographer_migrate_serialization_format +- SRCS +- cartographer/io/migrate_serialization_format_main.cc +-) ++#google_binary(cartographer_autogenerate_ground_truth ++# SRCS ++# cartographer/ground_truth/autogenerate_ground_truth_main.cc ++#) ++# ++#google_binary(cartographer_compute_relations_metrics ++# SRCS ++# cartographer/ground_truth/compute_relations_metrics_main.cc ++#) ++# ++#google_binary(cartographer_migrate_serialization_format ++# SRCS ++# cartographer/io/migrate_serialization_format_main.cc ++#) + + if(${BUILD_GRPC}) + google_binary(cartographer_grpc_server +@@ -213,8 +219,9 @@ target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC + target_link_libraries(${PROJECT_NAME} PUBLIC ${Boost_LIBRARIES}) + + # We expect find_package(Ceres) to have located these for us. +-target_link_libraries(${PROJECT_NAME} PUBLIC glog) +-target_link_libraries(${PROJECT_NAME} PUBLIC gflags) ++#target_link_libraries(${PROJECT_NAME} PUBLIC glog) ++#target_link_libraries(${PROJECT_NAME} PUBLIC gflags) ++target_link_libraries(${PROJECT_NAME} PUBLIC ${CAIRO_LIBRARY}) + + target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC + "${CAIRO_INCLUDE_DIRS}") +@@ -224,7 +231,8 @@ target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC + ${PROTOBUF_INCLUDE_DIR}) + # TODO(hrapp): This should not explicitly list pthread and use + # PROTOBUF_LIBRARIES, but that failed on first try. +-target_link_libraries(${PROJECT_NAME} PUBLIC ${PROTOBUF_LIBRARY} pthread) ++#target_link_libraries(${PROJECT_NAME} PUBLIC ${PROTOBUF_LIBRARY} pthread) ++target_link_libraries(${PROJECT_NAME} PUBLIC ${PROTOBUF_LIBRARY}) + if(${BUILD_GRPC}) + target_link_libraries(${PROJECT_NAME} PUBLIC grpc++) + target_link_libraries(${PROJECT_NAME} PUBLIC async_grpc) +@@ -234,7 +242,7 @@ if(${BUILD_PROMETHEUS}) + target_compile_definitions(${PROJECT_NAME} PUBLIC USE_PROMETHEUS=1) + endif() + +-set(TARGET_COMPILE_FLAGS "${TARGET_COMPILE_FLAGS} ${GOOG_CXX_FLAGS}") ++set(TARGET_COMPILE_FLAGS "-D_DISABLE_EXTENDED_ALIGNED_STORAGE ${TARGET_COMPILE_FLAGS} ${GOOG_CXX_FLAGS}") + set_target_properties(${PROJECT_NAME} PROPERTIES + COMPILE_FLAGS ${TARGET_COMPILE_FLAGS}) + +@@ -255,7 +263,7 @@ foreach(ABS_FIL ${ALL_TESTS}) + get_filename_component(FIL_WE ${REL_FIL} NAME_WE) + # Replace slashes as required for CMP0037. + string(REPLACE "/" "." TEST_TARGET_NAME "${DIR}/${FIL_WE}") +- google_test("${TEST_TARGET_NAME}" ${ABS_FIL}) ++ #google_test("${TEST_TARGET_NAME}" ${ABS_FIL}) + if(${BUILD_GRPC}) + target_link_libraries("${TEST_TARGET_NAME}" PUBLIC grpc++) + target_link_libraries("${TEST_TARGET_NAME}" PUBLIC async_grpc) +@@ -263,7 +271,7 @@ foreach(ABS_FIL ${ALL_TESTS}) + if(${BUILD_PROMETHEUS}) + target_link_libraries("${TEST_TARGET_NAME}" PUBLIC prometheus-cpp) + endif() +- target_link_libraries("${TEST_TARGET_NAME}" PUBLIC ${TEST_LIB}) ++ #target_link_libraries("${TEST_TARGET_NAME}" PUBLIC ${TEST_LIB}) + endforeach() + + # Add the binary directory first, so that port.h is included after it has +diff --git a/cartographer/common/math.h b/cartographer/common/math.h +index c4a77ef..0248f66 100644 +--- a/cartographer/common/math.h ++++ b/cartographer/common/math.h +@@ -17,6 +17,10 @@ + #ifndef CARTOGRAPHER_COMMON_MATH_H_ + #define CARTOGRAPHER_COMMON_MATH_H_ + ++#ifndef M_PI ++#define M_PI 3.14159265358979323846 ++#endif ++ + #include + #include + +diff --git a/cartographer/common/thread_pool.cc b/cartographer/common/thread_pool.cc +index bc3c743..db424d1 100644 +--- a/cartographer/common/thread_pool.cc ++++ b/cartographer/common/thread_pool.cc +@@ -16,7 +16,7 @@ + + #include "cartographer/common/thread_pool.h" + +-#include ++//#include + #include + #include + #include +diff --git a/cmake/functions.cmake b/cmake/functions.cmake +index 3bfd343..3d961b0 100644 +--- a/cmake/functions.cmake ++++ b/cmake/functions.cmake +@@ -118,12 +118,12 @@ macro(google_initialize_cartographer_project) + set(LIST_FILES_CMD "find ${PROJECT_SOURCE_DIR}/ -not -iwholename '*.git*' | sort | sed 's/^/#/'") + set(FILES_LIST_PATH "${PROJECT_BINARY_DIR}/AllFiles.cmake") + set(DETECT_CHANGES_CMD "bash" "-c" "${LIST_FILES_CMD} | diff -N -q ${FILES_LIST_PATH} - || ${LIST_FILES_CMD} > ${FILES_LIST_PATH}") +- add_custom_target(${PROJECT_NAME}_detect_changes ALL +- COMMAND ${DETECT_CHANGES_CMD} +- VERBATIM +- ) ++ #add_custom_target(${PROJECT_NAME}_detect_changes ALL ++ # COMMAND ${DETECT_CHANGES_CMD} ++ # VERBATIM ++ #) + if(NOT EXISTS ${FILES_LIST_PATH}) +- execute_process(COMMAND ${DETECT_CHANGES_CMD}) ++ #execute_process(COMMAND ${DETECT_CHANGES_CMD}) + endif() + include(${FILES_LIST_PATH}) + endmacro() diff --git a/vcpkg/ports/cartographer/portfile.cmake b/vcpkg/ports/cartographer/portfile.cmake new file mode 100644 index 0000000..b761c39 --- /dev/null +++ b/vcpkg/ports/cartographer/portfile.cmake @@ -0,0 +1,38 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO googlecartographer/cartographer + REF 1.0.0 + SHA512 4e3b38ee40d9758cbd51f087578b82efb7d1199b4b7696d31f45938ac06250caaea2b4d85ccb0a848c958ba187a0101ee95c87323ca236c613995b23b215041c + HEAD_REF master + PATCHES + fix-find-packages.patch + fix-build-error.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DGFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION=OFF + -DGLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION=OFF + -Dgtest_disable_pthreads=ON + -DCMAKE_USE_PTHREADS_INIT=OFF + OPTIONS_DEBUG + -DFORCE_DEBUG_BUILD=True +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() +vcpkg_copy_pdbs() + +# Clean +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright of cartographer +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cartographer) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/cartographer/LICENSE ${CURRENT_PACKAGES_DIR}/share/cartographer/copyright) diff --git a/vcpkg/ports/casclib/CMakeLists.txt b/vcpkg/ports/casclib/CMakeLists.txt new file mode 100644 index 0000000..ad05df4 --- /dev/null +++ b/vcpkg/ports/casclib/CMakeLists.txt @@ -0,0 +1,83 @@ +cmake_minimum_required(VERSION 3.9) + +project(casclib) +set(PROJECT_VERSION_MAJOR 1) +set(PROJECT_VERSION_MINOR 50) + +option(INSTALL_HEADERS "Install header files" ON) + +set(SRC_FILES + src/CascLib.def + src/CascCommon.cpp + src/CascDecompress.cpp + src/CascDecrypt.cpp + src/CascDumpData.cpp + src/CascFiles.cpp + src/CascFindFile.cpp + src/CascIndexFiles.cpp + src/CascOpenFile.cpp + src/CascOpenStorage.cpp + src/CascReadFile.cpp + src/CascRootFile_Diablo3.cpp + src/CascRootFile_Install.cpp + src/CascRootFile_MNDX.cpp + src/CascRootFile_OW.cpp + src/CascRootFile_Text.cpp + src/CascRootFile_TVFS.cpp + src/CascRootFile_WoW.cpp + src/common/Common.cpp + src/common/Csv.cpp + src/common/Directory.cpp + src/common/FileStream.cpp + src/common/FileTree.cpp + src/common/ListFile.cpp + src/common/RootHandler.cpp + src/jenkins/lookup3.c +) + +set(MD5_FILES + src/md5/md5.cpp +) + +set(ZLIB_FILES + src/zlib/adler32.c + src/zlib/crc32.c + src/zlib/inffast.c + src/zlib/inflate.c + src/zlib/inftrees.c + src/zlib/zutil.c +) + +add_library(casclib ${SRC_FILES} ${ZLIB_FILES} ${MD5_FILES}) +target_include_directories(casclib + PUBLIC + $ + $) +if(WIN32) + target_compile_definitions(casclib PRIVATE UNICODE _UNICODE) +endif() + +install(TARGETS casclib + EXPORT casclibTargets + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +include(CMakePackageConfigHelpers) + +set(VERSION_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/temp/casclibConfigVersion.cmake") +set(PROJECT_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/temp/casclibConfig.cmake") +set(INSTALL_DIR "share/casclib") + +write_basic_package_version_file("${VERSION_CONFIG}" VERSION 1.50 COMPATIBILITY SameMajorVersion) +configure_package_config_file("Config.cmake.in" + "${PROJECT_CONFIG}" + INSTALL_DESTINATION "${INSTALL_DIR}") + +install(FILES "${PROJECT_CONFIG}" "${VERSION_CONFIG}" DESTINATION "${INSTALL_DIR}") +install(EXPORT casclibTargets DESTINATION "${INSTALL_DIR}") + +if(INSTALL_HEADERS) + install(FILES "src/CascLib.h" "src/CascPort.h" DESTINATION include/casclib) +endif() diff --git a/vcpkg/ports/casclib/CONTROL b/vcpkg/ports/casclib/CONTROL new file mode 100644 index 0000000..9c0a083 --- /dev/null +++ b/vcpkg/ports/casclib/CONTROL @@ -0,0 +1,4 @@ +Source: casclib +Version: 1.50b-1 +Build-Depends: zlib +Description: An open-source implementation of library for reading CASC storage from Blizzard games since 2014 diff --git a/vcpkg/ports/casclib/Config.cmake.in b/vcpkg/ports/casclib/Config.cmake.in new file mode 100644 index 0000000..96f5154 --- /dev/null +++ b/vcpkg/ports/casclib/Config.cmake.in @@ -0,0 +1,7 @@ +@PACKAGE_INIT@ + +include(CMakeFindDependencyMacro) +find_dependency(ZLIB REQUIRED) + +include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") +check_required_components("@PROJECT_NAME@") diff --git a/vcpkg/ports/casclib/ctype_for_mac.patch b/vcpkg/ports/casclib/ctype_for_mac.patch new file mode 100644 index 0000000..dc1a67d --- /dev/null +++ b/vcpkg/ports/casclib/ctype_for_mac.patch @@ -0,0 +1,22 @@ +diff --git a/src/CascPort.h b/src/CascPort.h +index 3bd08d4..201f7dd 100644 +--- a/src/CascPort.h ++++ b/src/CascPort.h +@@ -85,10 +85,17 @@ + #include + #include + #include ++ #include + #include ++ #include ++ #include ++ #include ++ #include + #include + #include ++ #include + #include ++ #include + + // Support for PowerPC on Max OS X + #if (__ppc__ == 1) || (__POWERPC__ == 1) || (_ARCH_PPC == 1) diff --git a/vcpkg/ports/casclib/portfile.cmake b/vcpkg/ports/casclib/portfile.cmake new file mode 100644 index 0000000..fb2fd77 --- /dev/null +++ b/vcpkg/ports/casclib/portfile.cmake @@ -0,0 +1,33 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ladislav-zezula/CascLib + REF 1.50b + SHA512 f32cc592f454db4815c0dfd18a9c0076d85b1582e6974d241d1d4094269c42a978fa42186504988ced2c8f4a0b598f41e3ec8a95ddc3c0551af997e37708b1f5 + HEAD_REF master + PATCHES + ctype_for_mac.patch +) + +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in + DESTINATION + ${SOURCE_PATH} +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets() + +file(INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/casclib + RENAME copyright) diff --git a/vcpkg/ports/catch-classic/CONTROL b/vcpkg/ports/catch-classic/CONTROL new file mode 100644 index 0000000..bce6fc1 --- /dev/null +++ b/vcpkg/ports/catch-classic/CONTROL @@ -0,0 +1,6 @@ +Source: catch-classic +Version: 1.12.2 +Homepage: https://github.com/catchorg/Catch2 +Description: A modern, header-only test framework for unit tests + This is specifically the legacy 1.x branch provided for compatibility + with older compilers. diff --git a/vcpkg/ports/catch-classic/portfile.cmake b/vcpkg/ports/catch-classic/portfile.cmake new file mode 100644 index 0000000..47f8ef1 --- /dev/null +++ b/vcpkg/ports/catch-classic/portfile.cmake @@ -0,0 +1,18 @@ +include(vcpkg_common_functions) + +set(CATCH_VERSION v1.12.2) + +vcpkg_download_distfile(HEADER + URLS "https://github.com/catchorg/Catch2/releases/download/${CATCH_VERSION}/catch.hpp" + FILENAME "catch-classic-${CATCH_VERSION}.hpp" + SHA512 d2cf8b2fe95aae061a7771a0e1b7135583595d1f36dfc8d5e4d10e101ab58f6fac9d260f77c5760906c24aa402d7433aa82b5d6a0ca6b3ad91092dc5cc2d9c22 +) + +vcpkg_download_distfile(LICENSE + URLS "https://raw.githubusercontent.com/catchorg/Catch2/${CATCH_VERSION}/LICENSE.txt" + FILENAME "catch-classic-LICENSE-${CATCH_VERSION}.txt" + SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 +) + +file(INSTALL ${HEADER} DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME catch.hpp) +file(INSTALL ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/catch-classic RENAME copyright) diff --git a/vcpkg/ports/catch/CONTROL b/vcpkg/ports/catch/CONTROL new file mode 100644 index 0000000..f486f31 --- /dev/null +++ b/vcpkg/ports/catch/CONTROL @@ -0,0 +1,4 @@ +Source: catch +Version: alias +Build-Depends: catch2 +Description: Deprecated alias for Catch2 unit testing framework diff --git a/vcpkg/ports/catch/portfile.cmake b/vcpkg/ports/catch/portfile.cmake new file mode 100644 index 0000000..065116c --- /dev/null +++ b/vcpkg/ports/catch/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/vcpkg/ports/catch2/CONTROL b/vcpkg/ports/catch2/CONTROL new file mode 100644 index 0000000..3c33a7e --- /dev/null +++ b/vcpkg/ports/catch2/CONTROL @@ -0,0 +1,4 @@ +Source: catch2 +Version: 2.12.1 +Description: A modern, header-only test framework for unit testing. +Homepage: https://github.com/catchorg/Catch2 diff --git a/vcpkg/ports/catch2/portfile.cmake b/vcpkg/ports/catch2/portfile.cmake new file mode 100644 index 0000000..4728b6d --- /dev/null +++ b/vcpkg/ports/catch2/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO catchorg/Catch2 + REF 2e61d38c7c3078e600c331257b5bebfb81aaa685 # v2.12.1 + SHA512 533867c538bb4e50eb143254a347c6619b64d738aadfe93ff92f698f0971c85a070006df8eae2610999b3326890eb65441b1d66a8b2a237d13635059e8183200 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF + -DCATCH_BUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Catch2) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include/catch2/catch.hpp) + message(FATAL_ERROR "Main includes have moved. Please update the forwarder.") +endif() + +file(WRITE ${CURRENT_PACKAGES_DIR}/include/catch.hpp "#include ") +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/cccapstone/CONTROL b/vcpkg/ports/cccapstone/CONTROL new file mode 100644 index 0000000..8681f23 --- /dev/null +++ b/vcpkg/ports/cccapstone/CONTROL @@ -0,0 +1,5 @@ +Source: cccapstone +Version: 9b4128ee1153e78288a1b5433e2c06a0d47a4c4e-1 +Homepage: https://github.com/zer0mem/cccapstone +Description: c++ bindings for capstone disasembly framework +Build-Depends: capstone diff --git a/vcpkg/ports/cccapstone/fix-include-path.patch b/vcpkg/ports/cccapstone/fix-include-path.patch new file mode 100644 index 0000000..2663081 --- /dev/null +++ b/vcpkg/ports/cccapstone/fix-include-path.patch @@ -0,0 +1,24 @@ +diff --git a/cppbindings/CsCapstoneHelper.hh b/cppbindings/CsCapstoneHelper.hh +index daf7a73..8ed5194 100644 +--- a/cppbindings/CsCapstoneHelper.hh ++++ b/cppbindings/CsCapstoneHelper.hh +@@ -1,6 +1,6 @@ + #pragma once + +-#include ++#include + #include + + struct CS_HANDLE : +diff --git a/cppbindings/CsIns.hpp b/cppbindings/CsIns.hpp +index 6e8ba71..c723be9 100644 +--- a/cppbindings/CsIns.hpp ++++ b/cppbindings/CsIns.hpp +@@ -1,6 +1,6 @@ + #pragma once + +-#include ++#include + #include "CsCapstoneHelper.hh" + + //x86_insn_group, x86_reg, x86_op_type, x86_insn diff --git a/vcpkg/ports/cccapstone/portfile.cmake b/vcpkg/ports/cccapstone/portfile.cmake new file mode 100644 index 0000000..d653783 --- /dev/null +++ b/vcpkg/ports/cccapstone/portfile.cmake @@ -0,0 +1,12 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REF 9b4128ee1153e78288a1b5433e2c06a0d47a4c4e + REPO zer0mem/cccapstone + SHA512 d0023586281f921314dbba501fa2c06d822b1adba0a0c32f30b78628ee935e5822caebe3881a5d1cc4cc696b82a7e348044d887a7f652303359d2853d2ee45fb + HEAD_REF master + PATCHES fix-include-path.patch +) + +file(INSTALL ${SOURCE_PATH}/cppbindings/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/cccapstone/cppbindings) +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/cccapstone RENAME copyright) diff --git a/vcpkg/ports/ccd/CONTROL b/vcpkg/ports/ccd/CONTROL new file mode 100644 index 0000000..5a5f59e --- /dev/null +++ b/vcpkg/ports/ccd/CONTROL @@ -0,0 +1,4 @@ +Source: ccd +Version: 2.1-4 +Homepage: https://github.com/danfis/libccd +Description: Library for collision detection between two convex shapes diff --git a/vcpkg/ports/ccd/portfile.cmake b/vcpkg/ports/ccd/portfile.cmake new file mode 100644 index 0000000..29f0f9e --- /dev/null +++ b/vcpkg/ports/ccd/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO danfis/libccd + REF v2.1 + SHA512 ff037d9c4df50f09600cf9b3514b259b2850ff43f74817853f5665d22812891168f70bd3cc3969b2c9e3c706f6254991a65421476349607fbd04d894b217456d + HEAD_REF master + # Backport https://github.com/danfis/libccd/pull/70 to support Emscripten + PATCHES "support-emscripten.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/ccd) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) + +file(INSTALL ${SOURCE_PATH}/BSD-LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/ccd/support-emscripten.patch b/vcpkg/ports/ccd/support-emscripten.patch new file mode 100644 index 0000000..2fe689a --- /dev/null +++ b/vcpkg/ports/ccd/support-emscripten.patch @@ -0,0 +1,25 @@ +From c3616f28d33019047e8e71df8abeb0493159539e Mon Sep 17 00:00:00 2001 +From: Silvio Traversaro +Date: Sun, 17 May 2020 11:42:24 +0200 +Subject: [PATCH] Fix configuration with Emscripten + +In Emscripten there is no separate libm library, so there is no need to explicitly link it, +and in particular the find_library call would fail as there is not libm to find. +See https://stackoverflow.com/questions/24663915/how-can-i-link-libm-to-my-emscripten-port +--- + src/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 1407080..357ed76 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -48,7 +48,7 @@ target_include_directories(ccd PUBLIC + $ + $) + +-if(NOT WIN32) ++if(NOT WIN32 AND NOT (CMAKE_SYSTEM_NAME STREQUAL "Emscripten")) + find_library(LIBM_LIBRARY NAMES m) + if(NOT LIBM_LIBRARY) + message(FATAL_ERROR "Could NOT find required library LibM") diff --git a/vcpkg/ports/ccfits/CONTROL b/vcpkg/ports/ccfits/CONTROL new file mode 100644 index 0000000..02234c9 --- /dev/null +++ b/vcpkg/ports/ccfits/CONTROL @@ -0,0 +1,5 @@ +Source: ccfits +Version: 2.5-5 +Homepage: https://heasarc.gsfc.nasa.gov/fitsio/ccfits +Description: CCfits is an object oriented interface to the cfitsio library. It is designed to make the capabilities of cfitsio available to programmers working in C++. +Build-Depends: cfitsio diff --git a/vcpkg/ports/ccfits/dll_exports.patch b/vcpkg/ports/ccfits/dll_exports.patch new file mode 100644 index 0000000..6321cbb --- /dev/null +++ b/vcpkg/ports/ccfits/dll_exports.patch @@ -0,0 +1,488 @@ +diff --git a/FITS.h b/FITS.h +index e21f3db..3e97c83 100644 +--- a/FITS.h ++++ b/FITS.h +@@ -21,6 +21,8 @@ + #include "HDUCreator.h" + // FitsError + #include "FitsError.h" ++//DLL Exporting ++#include "ccfits_export.h" + + namespace CCfits { + class FITSBase; +@@ -665,7 +667,7 @@ do this either). + + + +- class FITS ++ class CCFITS_EXPORT FITS + { + + public: +diff --git a/HDU.h b/HDU.h +index 07f68e7..047e731 100644 +--- a/HDU.h ++++ b/HDU.h +@@ -568,7 +568,7 @@ and return its value. + + + +- class HDU ++ class CCFITS_EXPORT HDU + { + + public: +diff --git a/Table.h b/Table.h +index a0c1afe..9a8a5db 100644 +--- a/Table.h ++++ b/Table.h +@@ -268,7 +268,7 @@ namespace CCfits { + + + +- class Table : public ExtHDU //## Inherits: %3804A126EB10 ++ class CCFITS_EXPORT Table : public ExtHDU //## Inherits: %3804A126EB10 + { + + public: +diff --git a/Column.h b/Column.h +index e4496a7..b798947 100644 +--- a/Column.h ++++ b/Column.h +@@ -838,14 +838,14 @@ namespace CCfits { + + + +- class Column ++ class CCFITS_EXPORT Column + { + + public: + + + +- class RangeError : public FitsException //## Inherits: %3946526D031A ++ class CCFITS_EXPORT RangeError : public FitsException //## Inherits: %3946526D031A + { + public: + RangeError (const String& msg, bool silent = true); +@@ -857,7 +857,7 @@ namespace CCfits { + + + +- class InvalidDataType : public FitsException //## Inherits: %3947CF30033E ++ class CCFITS_EXPORT InvalidDataType : public FitsException //## Inherits: %3947CF30033E + { + public: + InvalidDataType (const String& str = string(), bool silent = true); +@@ -869,7 +869,7 @@ namespace CCfits { + + + +- class InvalidRowParameter : public FitsException //## Inherits: %39B5310F01A0 ++ class CCFITS_EXPORT InvalidRowParameter : public FitsException //## Inherits: %39B5310F01A0 + { + public: + InvalidRowParameter (const String& diag, bool silent = true); +@@ -881,7 +881,7 @@ namespace CCfits { + + + +- class WrongColumnType : public FitsException //## Inherits: %39B545780082 ++ class CCFITS_EXPORT WrongColumnType : public FitsException //## Inherits: %39B545780082 + { + public: + WrongColumnType (const String& diag, bool silent = true); +@@ -893,7 +893,7 @@ namespace CCfits { + + + +- class UnspecifiedLengths : public FitsException //## Inherits: %3A018C9D007D ++ class CCFITS_EXPORT UnspecifiedLengths : public FitsException //## Inherits: %3A018C9D007D + { + public: + UnspecifiedLengths (const String& diag, bool silent = true); +@@ -905,7 +905,7 @@ namespace CCfits { + + + +- class InvalidRowNumber : public FitsException //## Inherits: %3B0A850F0307 ++ class CCFITS_EXPORT InvalidRowNumber : public FitsException //## Inherits: %3B0A850F0307 + { + public: + InvalidRowNumber (const String& diag, bool silent = true); +@@ -917,7 +917,7 @@ namespace CCfits { + + + +- class InsufficientElements : public FitsException //## Inherits: %3B0BE611010A ++ class CCFITS_EXPORT InsufficientElements : public FitsException //## Inherits: %3B0BE611010A + { + public: + InsufficientElements (const String& msg, bool silent = true); +@@ -929,7 +929,7 @@ namespace CCfits { + + + +- class NoNullValue : public FitsException //## Inherits: %3B0D589A0092 ++ class CCFITS_EXPORT NoNullValue : public FitsException //## Inherits: %3B0D589A0092 + { + public: + NoNullValue (const String& diag, bool silent = true); +@@ -941,7 +941,7 @@ namespace CCfits { + + + +- class InvalidNumberOfRows : public FitsException //## Inherits: %3B20EB8B0205 ++ class CCFITS_EXPORT InvalidNumberOfRows : public FitsException //## Inherits: %3B20EB8B0205 + { + public: + InvalidNumberOfRows (int number, bool silent = true); +diff --git a/AsciiTable.h b/AsciiTable.h +index 620cf41..d03aa44 100644 +--- a/AsciiTable.h ++++ b/AsciiTable.h +@@ -133,7 +133,7 @@ namespace CCfits { + + + +- class AsciiTable : public Table //## Inherits: %3804A75CE420 ++ class CCFITS_EXPORT AsciiTable : public Table //## Inherits: %3804A75CE420 + { + + public: +diff --git a/CCfits.h b/CCfits.h +index d09438a..a62b8a6 100644 +--- a/CCfits.h ++++ b/CCfits.h +@@ -23,7 +23,7 @@ namespace CCfits { + #include + #include "longnam.h" + #include "float.h" +- ++#include "ccfits_export.h" + + namespace CCfits { + /*! \namespace CCfits +@@ -32,8 +32,8 @@ namespace CCfits { + static const int BITPIX = -32; + static const int NAXIS = 2; + static const int MAXDIM = 99; +- extern const unsigned long USBASE; +- extern const unsigned long ULBASE; ++ extern const CCFITS_EXPORT unsigned long USBASE; ++ extern const CCFITS_EXPORT unsigned long ULBASE; + + extern char BSCALE[7]; + extern char BZERO[6]; +diff --git a/FITSBase.h b/FITSBase.h +index 996fdae..0c985f9 100644 +--- a/FITSBase.h ++++ b/FITSBase.h +@@ -30,7 +30,7 @@ namespace CCfits { + + + +- class FITSBase ++ class CCFITS_EXPORT FITSBase + { + + public: +diff --git a/Keyword.h b/Keyword.h +index 816c119..b6df1f1 100644 +--- a/Keyword.h ++++ b/Keyword.h +@@ -195,7 +195,7 @@ namespace CCfits { + + + +- class Keyword ++ class CCFITS_EXPORT Keyword + { + + public: +diff --git a/ExtHDU.h b/ExtHDU.h +index d075fa1..e2d7dc6 100644 +--- a/ExtHDU.h ++++ b/ExtHDU.h +@@ -435,7 +435,7 @@ namespace CCfits { + + + +- class ExtHDU : public HDU //## Inherits: %38048213E7A8 ++ class CCFITS_EXPORT ExtHDU : public HDU //## Inherits: %38048213E7A8 + { + + public: +diff --git a/PHDU.h b/PHDU.h +index fe5f799..d9669b4 100644 +--- a/PHDU.h ++++ b/PHDU.h +@@ -264,7 +264,7 @@ namespace CCfits { + + + +- class PHDU : public HDU //## Inherits: %394E6F9800C3 ++ class CCFITS_EXPORT PHDU : public HDU //## Inherits: %394E6F9800C3 + { + + public: +diff --git a/BinTable.h b/BinTable.h +index 68851e3..906005a 100644 +--- a/BinTable.h ++++ b/BinTable.h +@@ -127,7 +127,7 @@ namespace CCfits { + + + +- class BinTable : public Table //## Inherits: %3804A7E75F10 ++ class CCFITS_EXPORT BinTable : public Table //## Inherits: %3804A7E75F10 + { + + public: +diff --git a/ColumnCreator.h b/ColumnCreator.h +index 104bd4f..15cd0ea 100644 +--- a/ColumnCreator.h ++++ b/ColumnCreator.h +@@ -28,7 +28,7 @@ namespace CCfits { + + + +- class ColumnCreator ++ class CCFITS_EXPORT ColumnCreator + { + + public: +diff --git a/FitsError.h b/FitsError.h +index 593723c..52941f6 100644 +--- a/FitsError.h ++++ b/FitsError.h +@@ -13,6 +13,7 @@ + //#include + //#include + //#include ++#include "ccfits_export.h" + #include + using std::string; + +@@ -90,7 +91,7 @@ namespace CCfits { + + + +- class FitsException ++ class CCFITS_EXPORT FitsException + { + public: + FitsException (const string& msg, bool& silent); +@@ -109,7 +110,7 @@ namespace CCfits { + + + +- class FitsError : public FitsException //## Inherits: %399170BD017D ++ class CCFITS_EXPORT FitsError : public FitsException //## Inherits: %399170BD017D + { + public: + FitsError (int errornum, bool silent = true); +@@ -123,7 +124,7 @@ namespace CCfits { + + + +- class FitsFatal ++ class CCFITS_EXPORT FitsFatal + { + public: + FitsFatal (const string& diag); +diff --git a/HDUCreator.h b/HDUCreator.h +index 65b82b7..2b5f717 100644 +--- a/HDUCreator.h ++++ b/HDUCreator.h +@@ -35,7 +35,7 @@ namespace CCfits { + + + +- class HDUCreator ++ class CCFITS_EXPORT HDUCreator + { + + public: +diff --git a/ccfits_export.h b/ccfits_export.h +new file mode 100644 +index 0000000..a2540a6 100644 +--- /dev/null ++++ b/ccfits_export.h +@@ -0,0 +1,41 @@ ++#ifndef CCFITS_EXPORT_H ++#define CCFITS_EXPORT_H ++ ++#ifdef CCFITS_STATIC_DEFINE ++# define CCFITS_EXPORT ++# define CCFITS_NO_EXPORT ++#else ++# ifndef CCFITS_EXPORT ++# ifdef CCfits_EXPORTS ++ /* We are building this library */ ++# define CCFITS_EXPORT __declspec(dllexport) ++# else ++ /* We are using this library */ ++# define CCFITS_EXPORT __declspec(dllimport) ++# endif ++# endif ++ ++# ifndef CCFITS_NO_EXPORT ++# define CCFITS_NO_EXPORT ++# endif ++#endif ++ ++#ifndef CCFITS_DEPRECATED ++# define CCFITS_DEPRECATED __declspec(deprecated) ++#endif ++ ++#ifndef CCFITS_DEPRECATED_EXPORT ++# define CCFITS_DEPRECATED_EXPORT CCFITS_EXPORT CCFITS_DEPRECATED ++#endif ++ ++#ifndef CCFITS_DEPRECATED_NO_EXPORT ++# define CCFITS_DEPRECATED_NO_EXPORT CCFITS_NO_EXPORT CCFITS_DEPRECATED ++#endif ++ ++#if 0 /* DEFINE_NO_DEPRECATED */ ++# ifndef CCFITS_NO_DEPRECATED ++# define CCFITS_NO_DEPRECATED ++# endif ++#endif ++ ++#endif +\ No newline at end of file +diff --git a/FITSUtil.h b/FITSUtil.h +index 762d430..e2eee33 100644 +--- a/FITSUtil.h ++++ b/FITSUtil.h +@@ -22,6 +22,7 @@ + #include + // FitsError + #include "FitsError.h" ++#include "ccfits_export.h" + #include + + +@@ -287,21 +288,21 @@ object. + template + void swap(std::vector& left, std::vector& right); + +- string lowerCase(const string& inputString); ++ string CCFITS_EXPORT lowerCase(const string& inputString); + +- string upperCase(const string& inputString); ++ string CCFITS_EXPORT upperCase(const string& inputString); + + // Check if a file name includes an image compression specifier, + // and return its location if it exists. +- string::size_type checkForCompressString(const string& fileName); ++ string::size_type CCFITS_EXPORT checkForCompressString(const string& fileName); + +- struct InvalidConversion : public FitsException ++ struct CCFITS_EXPORT InvalidConversion : public FitsException + { + InvalidConversion(const string& diag, bool silent=false); + + }; + +- struct MatchStem : public std::binary_function ++ struct CCFITS_EXPORT MatchStem : public std::binary_function + { + bool operator()(const string& left, const string& right) const; + }; +@@ -323,7 +324,7 @@ object. + + char** CharArray(const std::vector& inArray); + +- string FITSType2String( int typeInt ); ++ string CCFITS_EXPORT FITSType2String( int typeInt ); + + + template +@@ -633,7 +634,7 @@ object. + + + +- class UnrecognizedType : public FitsException //## Inherits: %3CE143AB00C6 ++ class CCFITS_EXPORT UnrecognizedType : public FitsException //## Inherits: %3CE143AB00C6 + { + public: + UnrecognizedType (string diag, bool silent = true); +diff --git a/KeywordCreator.h b/KeywordCreator.h +index d878a26..b2c0c70 100644 +--- a/KeywordCreator.h ++++ b/KeywordCreator.h +@@ -24,7 +24,7 @@ namespace CCfits { + + + +- class KeywordCreator ++ class CCFITS_EXPORT KeywordCreator + { + + public: +diff --git a/CCfits b/CCfits +index e9848c9..f30c9ad 100644 +--- a/CCfits ++++ b/CCfits +@@ -2,20 +2,20 @@ + #ifndef CCFITS + #define CCFITS 20031208 + +-#include ++#include + +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + + #endif +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b958fc7..0b1fb4e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -30,6 +30,11 @@ IF (BUILD_SHARED_LIBS) + SET (LIB_TYPE SHARED) + ENDIF (BUILD_SHARED_LIBS) + ++ ++IF (NOT BUILD_SHARED_LIBS) ++ ADD_DEFINITIONS(-DCCFITS_STATIC_DEFINE) ++ENDIF() ++ + FILE(GLOB H_FILES "*.h") + SET(H_FILES ${H_FILES} CCfits) + +@@ -55,6 +60,7 @@ SET(SRC_FILES + ) + + ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${H_FILES} ${SRC_FILES}) ++ + TARGET_LINK_LIBRARIES(${LIB_NAME} ${CFITSIO_LIBRARY} + ) + diff --git a/vcpkg/ports/ccfits/portfile.cmake b/vcpkg/ports/ccfits/portfile.cmake new file mode 100644 index 0000000..6c33b38 --- /dev/null +++ b/vcpkg/ports/ccfits/portfile.cmake @@ -0,0 +1,41 @@ +vcpkg_download_distfile(ARCHIVE + URLS "https://heasarc.gsfc.nasa.gov/fitsio/ccfits/CCfits-2.5.tar.gz" + FILENAME "CCfits-2.5.tar.gz" + SHA512 63ab4d153063960510cf60651d5c832824cf85f937f84adc5390c7c2fb46eb8e9f5d8cda2554d79d24c7a4f1b6cf0b7a6e20958fb69920b65d7c362c0a5f26b5 +) + +vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH + PATCHES dll_exports.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCFITSIO_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/cfitsio +) + +vcpkg_install_cmake() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/CCfits.dll ${CURRENT_PACKAGES_DIR}/bin/CCfits.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/CCfits.dll ${CURRENT_PACKAGES_DIR}/debug/bin/CCfits.dll) +endif() + +# Remove duplicate include files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Patch installed headers to look in the correct subdirectory +file(GLOB HEADERS ${CURRENT_PACKAGES_DIR}/include/CCfits/*) +foreach(HEADER IN LISTS HEADERS) + file(READ "${HEADER}" _contents) + string(REPLACE "\"fitsio.h\"" "\"cfitsio/fitsio.h\"" _contents "${_contents}") + file(WRITE "${HEADER}" "${_contents}") +endforeach() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/cctz/CMakeLists.txt b/vcpkg/ports/cctz/CMakeLists.txt new file mode 100644 index 0000000..e21b1ca --- /dev/null +++ b/vcpkg/ports/cctz/CMakeLists.txt @@ -0,0 +1,40 @@ +cmake_minimum_required(VERSION 3.8) +project(cctz CXX) + +set(CMAKE_CXX_STANDARD 14) + +set(CMAKE_DEBUG_POSTFIX d) + +if(CMAKE_BUILD_TYPE STREQUAL "Release") + option(INSTALL_HEADERS "Install header files" ON) +else() + option(INSTALL_HEADERS "Install header files" OFF) +endif() + +find_package(benchmark CONFIG REQUIRED) + +file(GLOB SOURCES src/*.cc) +list(FILTER SOURCES EXCLUDE REGEX "_test.cc$|benchmarks|_tool.cc$") + +file(GLOB HEADERS include/cctz/*.h) + +add_library(cctz ${SOURCES}) +target_include_directories(cctz PUBLIC $ $) +target_link_libraries(cctz PRIVATE benchmark::benchmark benchmark::benchmark_main) + +if(INSTALL_HEADERS) + install(FILES ${HEADERS} DESTINATION "include/cctz") +endif() + +install(TARGETS cctz EXPORT unofficial-cctz-targets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install( + EXPORT unofficial-cctz-targets + FILE unofficial-cctz-config.cmake + NAMESPACE unofficial:: + DESTINATION share/unofficial-cctz +) diff --git a/vcpkg/ports/cctz/CONTROL b/vcpkg/ports/cctz/CONTROL new file mode 100644 index 0000000..a223586 --- /dev/null +++ b/vcpkg/ports/cctz/CONTROL @@ -0,0 +1,5 @@ +Source: cctz +Version: 2.3-2 +Homepage: https://github.com/google/cctz +Build-Depends: benchmark +Description: two libraries that cooperate with to give C++ programmers all the necessary tools for computing with dates, times, and time zones in a simple and correct manner. diff --git a/vcpkg/ports/cctz/portfile.cmake b/vcpkg/ports/cctz/portfile.cmake new file mode 100644 index 0000000..d429e7f --- /dev/null +++ b/vcpkg/ports/cctz/portfile.cmake @@ -0,0 +1,30 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/cctz + REF v2.3 + SHA512 e688ddac1bff108e8315bf94cb61483b72b0d16f601e4e1eeb0fd5c064aefe5a573eee66e8903401aa4c2be71ea9f10dd6c9a9cdf8379f5bb6073248a21a83ff + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-cctz TARGET_PATH share/unofficial-cctz) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cctz RENAME copyright) diff --git a/vcpkg/ports/celero/CONTROL b/vcpkg/ports/celero/CONTROL new file mode 100644 index 0000000..8da4c66 --- /dev/null +++ b/vcpkg/ports/celero/CONTROL @@ -0,0 +1,4 @@ +Source: celero +Version: 2.6.0-1 +Homepage: https://github.com/DigitalInBlue/Celero +Description: Celero is a modern cross-platform (Windows, Linux, MacOS) Microbenchmarking library for C++. diff --git a/vcpkg/ports/celero/fix-win32-define.patch b/vcpkg/ports/celero/fix-win32-define.patch new file mode 100644 index 0000000..0a90dbe --- /dev/null +++ b/vcpkg/ports/celero/fix-win32-define.patch @@ -0,0 +1,490 @@ +diff --git a/README.md b/README.md +index 5b83f2d..151f5d1 100644 +--- a/README.md ++++ b/README.md +@@ -166,7 +166,7 @@ Here is an example of a simple Celero Benchmark. (Note: This is a complete, runn + + #include + +-#ifndef WIN32 ++#ifndef _WIN32 + #include + #include + #endif +diff --git a/experiments/DemoSimple/DemoSimple.cpp b/experiments/DemoSimple/DemoSimple.cpp +index 2a0a0c3..f0c300f 100644 +--- a/experiments/DemoSimple/DemoSimple.cpp ++++ b/experiments/DemoSimple/DemoSimple.cpp +@@ -2,7 +2,7 @@ + + #include + +-#ifndef WIN32 ++#ifndef _WIN32 + #include + #include + #endif +diff --git a/experiments/DemoSimpleJUnit/DemoSimpleJUnit.cpp b/experiments/DemoSimpleJUnit/DemoSimpleJUnit.cpp +index 86c47c1..0be4ac2 100644 +--- a/experiments/DemoSimpleJUnit/DemoSimpleJUnit.cpp ++++ b/experiments/DemoSimpleJUnit/DemoSimpleJUnit.cpp +@@ -1,6 +1,6 @@ + #include + +-#ifndef WIN32 ++#ifndef _WIN32 + #include + #include + #endif +diff --git a/experiments/DemoTransform/DemoTransform.cpp b/experiments/DemoTransform/DemoTransform.cpp +index 25b37a2..55e7e60 100644 +--- a/experiments/DemoTransform/DemoTransform.cpp ++++ b/experiments/DemoTransform/DemoTransform.cpp +@@ -4,7 +4,7 @@ + #include + #include + +-#ifndef WIN32 ++#ifndef _WIN32 + #include + #include + #endif +diff --git a/experiments/ExperimentSortingRandomInts/ExperimentSortingRandomInts.cpp b/experiments/ExperimentSortingRandomInts/ExperimentSortingRandomInts.cpp +index 0f3b8ed..e8f85c5 100644 +--- a/experiments/ExperimentSortingRandomInts/ExperimentSortingRandomInts.cpp ++++ b/experiments/ExperimentSortingRandomInts/ExperimentSortingRandomInts.cpp +@@ -1,7 +1,7 @@ + #include + #include + +-#ifndef WIN32 ++#ifndef _WIN32 + #include + #include + #endif +diff --git a/experiments/ExperimentSortingRandomIntsUDM/ExperimentSortingRandomIntsUDM.cpp b/experiments/ExperimentSortingRandomIntsUDM/ExperimentSortingRandomIntsUDM.cpp +index e724fa2..8df7296 100644 +--- a/experiments/ExperimentSortingRandomIntsUDM/ExperimentSortingRandomIntsUDM.cpp ++++ b/experiments/ExperimentSortingRandomIntsUDM/ExperimentSortingRandomIntsUDM.cpp +@@ -3,7 +3,7 @@ + #include + #include + +-#ifndef WIN32 ++#ifndef _WIN32 + #include + #include + #endif +diff --git a/include/celero/Celero.h b/include/celero/Celero.h +index aaf38ef..a7c91d4 100644 +--- a/include/celero/Celero.h ++++ b/include/celero/Celero.h +@@ -31,7 +31,7 @@ + /// It is highly encouraged to only run this code compiled in a "Release" mode to use all available optimizations. + /// + +-#ifdef WIN32 ++#ifdef _WIN32 + #include + #endif + +diff --git a/include/celero/CommandLine.h b/include/celero/CommandLine.h +index 230417a..82204f9 100644 +--- a/include/celero/CommandLine.h ++++ b/include/celero/CommandLine.h +@@ -38,7 +38,7 @@ + #include + #include + +-#ifndef WIN32 ++#ifndef _WIN32 + #include + #endif + +@@ -115,7 +115,7 @@ namespace cmdline + return lexical_cast_t::value>::cast(arg); + } + +-#ifdef WIN32 ++#ifdef _WIN32 + static inline std::string demangle(const std::string &) + { + return std::string(); +diff --git a/include/celero/Export.h b/include/celero/Export.h +index b672b15..a074e37 100644 +--- a/include/celero/Export.h ++++ b/include/celero/Export.h +@@ -23,7 +23,7 @@ + #define CELERO_EXPORT + #define CELERO_EXPORT_C + #else +-#ifdef WIN32 ++#ifdef _WIN32 + #if defined CELERO_EXPORTS + #define CELERO_EXPORT _declspec(dllexport) + #define CELERO_EXPORT_C extern "C" _declspec(dllexport) +diff --git a/include/celero/Utilities.h b/include/celero/Utilities.h +index 4f409e5..93e3c53 100644 +--- a/include/celero/Utilities.h ++++ b/include/celero/Utilities.h +@@ -19,7 +19,7 @@ + /// limitations under the License. + /// + +-#ifndef WIN32 ++#ifndef _WIN32 + #include + #endif + +diff --git a/src/Console.cpp b/src/Console.cpp +index 91e2059..b4c62ec 100644 +--- a/src/Console.cpp ++++ b/src/Console.cpp +@@ -20,14 +20,14 @@ + + using namespace celero; + +-#ifdef WIN32 ++#ifdef _WIN32 + #include + #include + #else + #include + #endif + +-#ifdef WIN32 ++#ifdef _WIN32 + auto WinColor() -> decltype(GetStdHandle(STD_OUTPUT_HANDLE)) + { + auto h = GetStdHandle(STD_OUTPUT_HANDLE); +@@ -39,7 +39,7 @@ auto WinColor() -> decltype(GetStdHandle(STD_OUTPUT_HANDLE)) + + void Red() + { +-#ifdef WIN32 ++#ifdef _WIN32 + auto h = WinColor(); + SetConsoleTextAttribute(h, FOREGROUND_RED); + #else +@@ -49,7 +49,7 @@ void Red() + + void RedBold() + { +-#ifdef WIN32 ++#ifdef _WIN32 + auto h = WinColor(); + SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_INTENSITY); + #else +@@ -59,7 +59,7 @@ void RedBold() + + void Green() + { +-#ifdef WIN32 ++#ifdef _WIN32 + auto h = WinColor(); + SetConsoleTextAttribute(h, FOREGROUND_GREEN); + #else +@@ -69,7 +69,7 @@ void Green() + + void GreenBold() + { +-#ifdef WIN32 ++#ifdef _WIN32 + auto h = WinColor(); + SetConsoleTextAttribute(h, FOREGROUND_GREEN | FOREGROUND_INTENSITY); + #else +@@ -79,7 +79,7 @@ void GreenBold() + + void Blue() + { +-#ifdef WIN32 ++#ifdef _WIN32 + auto h = WinColor(); + SetConsoleTextAttribute(h, FOREGROUND_BLUE); + #else +@@ -89,7 +89,7 @@ void Blue() + + void BlueBold() + { +-#ifdef WIN32 ++#ifdef _WIN32 + auto h = WinColor(); + SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_INTENSITY); + #else +@@ -99,7 +99,7 @@ void BlueBold() + + void Cyan() + { +-#ifdef WIN32 ++#ifdef _WIN32 + auto h = WinColor(); + SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN); + #else +@@ -109,7 +109,7 @@ void Cyan() + + void CyanBold() + { +-#ifdef WIN32 ++#ifdef _WIN32 + auto h = WinColor(); + SetConsoleTextAttribute(h, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_INTENSITY); + #else +@@ -119,7 +119,7 @@ void CyanBold() + + void Yellow() + { +-#ifdef WIN32 ++#ifdef _WIN32 + auto h = WinColor(); + SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN); + #else +@@ -129,7 +129,7 @@ void Yellow() + + void YellowBold() + { +-#ifdef WIN32 ++#ifdef _WIN32 + auto h = WinColor(); + SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY); + #else +@@ -139,7 +139,7 @@ void YellowBold() + + void White() + { +-#ifdef WIN32 ++#ifdef _WIN32 + auto h = WinColor(); + SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE); + #else +@@ -149,7 +149,7 @@ void White() + + void WhiteBold() + { +-#ifdef WIN32 ++#ifdef _WIN32 + auto h = WinColor(); + SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY); + #else +@@ -159,7 +159,7 @@ void WhiteBold() + + void WhiteOnRed() + { +-#ifdef WIN32 ++#ifdef _WIN32 + auto h = WinColor(); + SetConsoleTextAttribute(h, BACKGROUND_RED | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE); + #else +@@ -169,7 +169,7 @@ void WhiteOnRed() + + void WhiteOnRedBold() + { +-#ifdef WIN32 ++#ifdef _WIN32 + auto h = WinColor(); + SetConsoleTextAttribute(h, BACKGROUND_RED | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY); + #else +@@ -179,7 +179,7 @@ void WhiteOnRedBold() + + void PurpleBold() + { +-#ifdef WIN32 ++#ifdef _WIN32 + auto h = WinColor(); + SetConsoleTextAttribute(h, FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY); + #else +@@ -189,7 +189,7 @@ void PurpleBold() + + void Default() + { +-#ifdef WIN32 ++#ifdef _WIN32 + White(); + #else + std::cout << "\033[0m"; +diff --git a/src/Exceptions.cpp b/src/Exceptions.cpp +index 9cb1918..7780774 100644 +--- a/src/Exceptions.cpp ++++ b/src/Exceptions.cpp +@@ -21,7 +21,7 @@ + #include + #include + +-#ifdef WIN32 ++#ifdef _WIN32 + #include + #endif // WIN32 + +diff --git a/src/Memory.cpp b/src/Memory.cpp +index f1662d4..fde7f19 100644 +--- a/src/Memory.cpp ++++ b/src/Memory.cpp +@@ -19,7 +19,7 @@ + #include + #include + +-#ifdef WIN32 ++#ifdef _WIN32 + #include + + #include +@@ -53,7 +53,7 @@ + + using namespace celero; + +-#ifdef WIN32 ++#ifdef _WIN32 + #else + constexpr int64_t Kilobytes2Bytes{1024}; + +@@ -120,7 +120,7 @@ celero::RAMReport celero::RAMReport::operator-(const RAMReport& x) + + int64_t celero::GetRAMSystemTotal() + { +-#ifdef WIN32 ++#ifdef _WIN32 + MEMORYSTATUSEX memInfo; + memInfo.dwLength = sizeof(MEMORYSTATUSEX); + GlobalMemoryStatusEx(&memInfo); +@@ -155,7 +155,7 @@ int64_t celero::GetRAMSystemTotal() + + int64_t celero::GetRAMSystemAvailable() + { +-#ifdef WIN32 ++#ifdef _WIN32 + MEMORYSTATUSEX memInfo; + memInfo.dwLength = sizeof(MEMORYSTATUSEX); + GlobalMemoryStatusEx(&memInfo); +@@ -167,7 +167,7 @@ int64_t celero::GetRAMSystemAvailable() + + int64_t celero::GetRAMSystemUsed() + { +-#ifdef WIN32 ++#ifdef _WIN32 + return celero::GetRAMSystemTotal() - celero::GetRAMSystemAvailable(); + #elif defined(__APPLE__) + int mib[2]; +@@ -198,7 +198,7 @@ int64_t celero::GetRAMSystemUsed() + + int64_t celero::GetRAMSystemUsedByCurrentProcess() + { +-#ifdef WIN32 ++#ifdef _WIN32 + PROCESS_MEMORY_COUNTERS_EX pmc; + GetProcessMemoryInfo(GetCurrentProcess(), reinterpret_cast(&pmc), sizeof(pmc)); + return static_cast(pmc.WorkingSetSize); +@@ -209,7 +209,7 @@ int64_t celero::GetRAMSystemUsedByCurrentProcess() + + int64_t celero::GetRAMPhysicalTotal() + { +-#ifdef WIN32 ++#ifdef _WIN32 + MEMORYSTATUSEX memInfo; + memInfo.dwLength = sizeof(MEMORYSTATUSEX); + GlobalMemoryStatusEx(&memInfo); +@@ -225,7 +225,7 @@ int64_t celero::GetRAMPhysicalTotal() + + int64_t celero::GetRAMPhysicalAvailable() + { +-#ifdef WIN32 ++#ifdef _WIN32 + MEMORYSTATUSEX memInfo; + memInfo.dwLength = sizeof(MEMORYSTATUSEX); + GlobalMemoryStatusEx(&memInfo); +@@ -237,7 +237,7 @@ int64_t celero::GetRAMPhysicalAvailable() + + int64_t celero::GetRAMPhysicalUsed() + { +-#ifdef WIN32 ++#ifdef _WIN32 + return celero::GetRAMPhysicalTotal() - celero::GetRAMPhysicalAvailable(); + #elif defined(__APPLE__) + struct rusage rusage; +@@ -252,7 +252,7 @@ int64_t celero::GetRAMPhysicalUsed() + + int64_t celero::GetRAMPhysicalUsedByCurrentProcess() + { +-#ifdef WIN32 ++#ifdef _WIN32 + PROCESS_MEMORY_COUNTERS_EX pmc; + GetProcessMemoryInfo(GetCurrentProcess(), reinterpret_cast(&pmc), sizeof(pmc)); + return static_cast(pmc.WorkingSetSize); +@@ -306,7 +306,7 @@ int64_t celero::GetRAMPhysicalUsedByCurrentProcessPeak() + + int64_t celero::GetRAMVirtualTotal() + { +-#ifdef WIN32 ++#ifdef _WIN32 + MEMORYSTATUSEX memInfo; + memInfo.dwLength = sizeof(MEMORYSTATUSEX); + GlobalMemoryStatusEx(&memInfo); +@@ -322,7 +322,7 @@ int64_t celero::GetRAMVirtualTotal() + + int64_t celero::GetRAMVirtualAvailable() + { +-#ifdef WIN32 ++#ifdef _WIN32 + MEMORYSTATUSEX memInfo; + memInfo.dwLength = sizeof(MEMORYSTATUSEX); + GlobalMemoryStatusEx(&memInfo); +@@ -334,7 +334,7 @@ int64_t celero::GetRAMVirtualAvailable() + + int64_t celero::GetRAMVirtualUsed() + { +-#ifdef WIN32 ++#ifdef _WIN32 + return celero::GetRAMVirtualTotal() - celero::GetRAMVirtualAvailable(); + #elif defined(__APPLE__) + return -1; +@@ -348,7 +348,7 @@ int64_t celero::GetRAMVirtualUsed() + + int64_t celero::GetRAMVirtualUsedByCurrentProcess() + { +-#ifdef WIN32 ++#ifdef _WIN32 + PROCESS_MEMORY_COUNTERS_EX pmc; + GetProcessMemoryInfo(GetCurrentProcess(), reinterpret_cast(&pmc), sizeof(pmc)); + return pmc.PrivateUsage; +diff --git a/src/Timer.cpp b/src/Timer.cpp +index 7792722..fa24e74 100644 +--- a/src/Timer.cpp ++++ b/src/Timer.cpp +@@ -20,7 +20,7 @@ + #include + #include + +-#ifdef WIN32 ++#ifdef _WIN32 + #include + LARGE_INTEGER QPCFrequency; + #else +@@ -29,7 +29,7 @@ LARGE_INTEGER QPCFrequency; + + uint64_t celero::timer::GetSystemTime() + { +-#ifdef WIN32 ++#ifdef _WIN32 + LARGE_INTEGER timeStorage; + QueryPerformanceCounter(&timeStorage); + if(QPCFrequency.QuadPart != 0) +@@ -46,7 +46,7 @@ uint64_t celero::timer::GetSystemTime() + + double celero::timer::CachePerformanceFrequency(bool quiet) + { +-#ifdef WIN32 ++#ifdef _WIN32 + QueryPerformanceFrequency(&QPCFrequency); + if(QPCFrequency.QuadPart == 0) + { +diff --git a/src/Utilities.cpp b/src/Utilities.cpp +index 6d9a266..0e4f1c4 100644 +--- a/src/Utilities.cpp ++++ b/src/Utilities.cpp +@@ -19,7 +19,7 @@ + #include + #include + +-#ifdef WIN32 ++#ifdef _WIN32 + #include + + #include diff --git a/vcpkg/ports/celero/portfile.cmake b/vcpkg/ports/celero/portfile.cmake new file mode 100644 index 0000000..364ec44 --- /dev/null +++ b/vcpkg/ports/celero/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO DigitalInBlue/Celero + REF 83b592b134cb41e2e5611714bce0bf61413eb12b #2.6.0 + SHA512 3315b56467c17330f603c6710996c1a76f67068960b1356ca92db1ab23fca9f27a2dda9be521a19b88efc2e961095ee5523924b135d380681a4328c09d963e8c + HEAD_REF master + PATCHES fix-win32-define.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" CELERO_COMPILE_DYNAMIC_LIBRARIES) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DCELERO_ENABLE_EXPERIMENTS=OFF + -DCELERO_ENABLE_TESTS=OFF + -DCELERO_RUN_EXAMPLE_ON_BUILD=OFF + -DCELERO_COMPILE_DYNAMIC_LIBRARIES=${CELERO_COMPILE_DYNAMIC_LIBRARIES} + -DCELERO_TREAT_WARNINGS_AS_ERRORS=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/celero/Export.h "ifdef CELERO_STATIC" "if 1") +endif() + +file(RENAME ${CURRENT_PACKAGES_DIR}/share/celero/celero-target.cmake ${CURRENT_PACKAGES_DIR}/share/celero/celero-config.cmake) + +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/cello/CMakeLists.txt b/vcpkg/ports/cello/CMakeLists.txt new file mode 100644 index 0000000..b54507f --- /dev/null +++ b/vcpkg/ports/cello/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.14) + +project(cello LANGUAGES C) + +include(GNUInstallDirs) + +file(GLOB cello_sources src/*.c) +add_library(cello ${cello_sources}) + +target_include_directories( + cello + PUBLIC + $ + $ +) + +set_target_properties(cello PROPERTIES PUBLIC_HEADER include/Cello.h) + +install(TARGETS cello EXPORT unofficial-cello-config) + +install( + EXPORT unofficial-cello-config + NAMESPACE unofficial::cello:: + DESTINATION share/unofficial-cello + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) diff --git a/vcpkg/ports/cello/CONTROL b/vcpkg/ports/cello/CONTROL new file mode 100644 index 0000000..6ea9d2b --- /dev/null +++ b/vcpkg/ports/cello/CONTROL @@ -0,0 +1,4 @@ +Source: cello +Version: 2019-07-23 +Description: Higher level programming in C +Homepage: http://libcello.org/ diff --git a/vcpkg/ports/cello/portfile.cmake b/vcpkg/ports/cello/portfile.cmake new file mode 100644 index 0000000..e71e533 --- /dev/null +++ b/vcpkg/ports/cello/portfile.cmake @@ -0,0 +1,32 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO orangeduck/Cello + REF da28eefbc95d8bd5628e5f1c4cc12bc1b13fef4f + SHA512 64825cf37223dd679b379d78475218a543690c3b78333acb906d42982261df4b9ada3a87bea183fad5e2cf220311904e657b0bf5051b141c389d5ee1d2974e5b + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME unofficial-${PORT}) diff --git a/vcpkg/ports/cereal/CONTROL b/vcpkg/ports/cereal/CONTROL new file mode 100644 index 0000000..5111134 --- /dev/null +++ b/vcpkg/ports/cereal/CONTROL @@ -0,0 +1,4 @@ +Source: cereal +Version: 1.3.0 +Homepage: https://github.com/USCiLab/cereal +Description: a header-only C++11 serialization library (built in support for binary, XML and JSon) diff --git a/vcpkg/ports/cereal/portfile.cmake b/vcpkg/ports/cereal/portfile.cmake new file mode 100644 index 0000000..d956d86 --- /dev/null +++ b/vcpkg/ports/cereal/portfile.cmake @@ -0,0 +1,28 @@ +#header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO USCiLab/cereal + REF v1.3.0 + SHA512 2bb640a222d4efe7c624c6ec3e755fecae00ef59e91c4db462e233546c5afe73c065ba1d16d9600f7cd3cc185593109148008b0b2b870208e2f1d6984fd40c72 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DJUST_INSTALL_CEREAL=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/cereal) + +# Clean +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cereal) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/cereal/LICENSE ${CURRENT_PACKAGES_DIR}/share/cereal/copyright) diff --git a/vcpkg/ports/ceres/0001_cmakelists_fixes.patch b/vcpkg/ports/ceres/0001_cmakelists_fixes.patch new file mode 100644 index 0000000..87a3785 --- /dev/null +++ b/vcpkg/ports/ceres/0001_cmakelists_fixes.patch @@ -0,0 +1,42 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 02c72b5..62d8c59 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -374,27 +374,7 @@ if (MINIGLOG) + GLOG_LIBRARY) + else (MINIGLOG) + unset(MINIGLOG_MAX_LOG_LEVEL CACHE) +- # Don't search with REQUIRED so that configuration continues if not found and +- # we can output an error messages explaining MINIGLOG option. +- find_package(Glog) +- if (NOT GLOG_FOUND) +- message(FATAL_ERROR "Can't find Google Log (glog). Please set either: " +- "glog_DIR (newer CMake built versions of glog) or GLOG_INCLUDE_DIR & " +- "GLOG_LIBRARY or enable MINIGLOG option to use minimal glog " +- "implementation.") +- endif(NOT GLOG_FOUND) +- # By default, assume gflags was found, updating the message if it was not. +- set(GLOG_GFLAGS_DEPENDENCY_MESSAGE +- " Assuming glog was built with gflags support as gflags was found. " +- "This will make gflags a public dependency of Ceres.") +- if (NOT GFLAGS_FOUND) +- set(GLOG_GFLAGS_DEPENDENCY_MESSAGE +- " Assuming glog was NOT built with gflags support as gflags was " +- "not found. If glog was built with gflags, please set the " +- "gflags search locations such that it can be found by Ceres. " +- "Otherwise, Ceres may fail to link due to missing gflags symbols.") +- endif(NOT GFLAGS_FOUND) +- message("-- Found Google Log (glog)." ${GLOG_GFLAGS_DEPENDENCY_MESSAGE}) ++ find_package(Glog REQUIRED) + endif (MINIGLOG) + + if (NOT SCHUR_SPECIALIZATIONS) +@@ -917,8 +897,5 @@ install(FILES "${Ceres_BINARY_DIR}/CeresConfig-install.cmake" + DESTINATION ${RELATIVE_CMAKECONFIG_INSTALL_DIR}) + install(FILES "${Ceres_BINARY_DIR}/CeresConfigVersion.cmake" +- "${Ceres_SOURCE_DIR}/cmake/FindEigen.cmake" +- "${Ceres_SOURCE_DIR}/cmake/FindGlog.cmake" +- "${Ceres_SOURCE_DIR}/cmake/FindGflags.cmake" + DESTINATION ${RELATIVE_CMAKECONFIG_INSTALL_DIR}) + + # Create an uninstall target to remove all installed files. diff --git a/vcpkg/ports/ceres/0002_use_glog_target.patch b/vcpkg/ports/ceres/0002_use_glog_target.patch new file mode 100644 index 0000000..6ca328a --- /dev/null +++ b/vcpkg/ports/ceres/0002_use_glog_target.patch @@ -0,0 +1,25 @@ +diff --git a/internal/ceres/CMakeLists.txt b/internal/ceres/CMakeLists.txt +index cc43fec..18b415b 100644 +--- a/internal/ceres/CMakeLists.txt ++++ b/internal/ceres/CMakeLists.txt +@@ -152,17 +152,9 @@ else (SCHUR_SPECIALIZATIONS) + endif (SCHUR_SPECIALIZATIONS) + + # Build the list of dependencies for Ceres based on the current configuration. +-if (NOT MINIGLOG AND GLOG_FOUND) +- list(APPEND CERES_LIBRARY_PUBLIC_DEPENDENCIES ${GLOG_LIBRARIES}) +- if (GFLAGS_FOUND) +- # If glog & gflags are both found, we assume that glog was built with +- # gflags, as it is awkward to perform a try_compile() to verify this +- # when gflags is an imported target (as it is in newer versions). +- # As glog #includes gflags/gflags.h in glog/logging.h if compiled with +- # gflags, it is thus a public dependency for Ceres in this case. +- list(APPEND CERES_LIBRARY_PUBLIC_DEPENDENCIES ${GFLAGS_LIBRARIES}) +- endif() +-endif (NOT MINIGLOG AND GLOG_FOUND) ++if (NOT MINIGLOG) ++ list(APPEND CERES_LIBRARY_PUBLIC_DEPENDENCIES glog::glog) ++endif (NOT MINIGLOG) + + if (SUITESPARSE AND SUITESPARSE_FOUND) + # Define version information for use in Solver::FullReport. diff --git a/vcpkg/ports/ceres/0003_fix_exported_ceres_config.patch b/vcpkg/ports/ceres/0003_fix_exported_ceres_config.patch new file mode 100644 index 0000000..9b02e99 --- /dev/null +++ b/vcpkg/ports/ceres/0003_fix_exported_ceres_config.patch @@ -0,0 +1,96 @@ +diff --git a/cmake/CeresConfig.cmake.in b/cmake/CeresConfig.cmake.in +index d0380de..55760a8 100644 +--- a/cmake/CeresConfig.cmake.in ++++ b/cmake/CeresConfig.cmake.in +@@ -237,85 +237,13 @@ endif (EIGEN_FOUND) + list(APPEND CERES_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}) + + # Glog. +-# Flag set during configuration and build of Ceres. +-set(CERES_USES_MINIGLOG @MINIGLOG@) +-set(CERES_USES_GFLAGS @GFLAGS@) +-if (CERES_USES_MINIGLOG) +- set(MINIGLOG_INCLUDE_DIR ${CERES_INCLUDE_DIR}/ceres/internal/miniglog) +- if (NOT CERES_WAS_INSTALLED) +- # When Ceres was exported from the build tree, the miniglog headers +- # will be in Ceres internal source directory, not in the public headers +- # directory (they are copied with the public headers when installed). +- set(MINIGLOG_INCLUDE_DIR +- ${CERES_EXPORTED_SOURCE_DIR}/internal/ceres/miniglog) +- endif() +- if (NOT EXISTS ${MINIGLOG_INCLUDE_DIR}) +- ceres_report_not_found( +- "Failed to find miniglog headers in expected include directory: " +- "${MINIGLOG_INCLUDE_DIR}, but Ceres was compiled with MINIGLOG enabled " +- "(in place of glog).") +- endif (NOT EXISTS ${MINIGLOG_INCLUDE_DIR}) +- list(APPEND CERES_INCLUDE_DIRS ${MINIGLOG_INCLUDE_DIR}) +- # Output message at standard log level (not the lower STATUS) so that +- # the message is output in GUI during configuration to warn user. +- message("-- Found Ceres compiled with miniglog substitute " +- "for glog, beware this will likely cause problems if glog is later linked.") +-else (CERES_USES_MINIGLOG) +- # Append the locations of glog when Ceres was built to the search path hints. +- set(GLOG_WAS_BUILT_WITH_CMAKE @FOUND_INSTALLED_GLOG_CMAKE_CONFIGURATION@) +- if (GLOG_WAS_BUILT_WITH_CMAKE) +- set(glog_DIR @glog_DIR@) +- set(GLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION TRUE) +- else() +- list(APPEND GLOG_INCLUDE_DIR_HINTS @GLOG_INCLUDE_DIR@) +- get_filename_component(CERES_BUILD_GLOG_LIBRARY_DIR @GLOG_LIBRARY@ PATH) +- list(APPEND GLOG_LIBRARY_DIR_HINTS ${CERES_BUILD_GLOG_LIBRARY_DIR}) +- endif() ++include (CMakeFindDependencyMacro) ++find_dependency (glog NO_MODULE) + +- # Search quietly s/t we control the timing of the error message if not found. +- find_package(Glog QUIET) +- if (GLOG_FOUND) +- message(STATUS "Found required Ceres dependency: glog") +- else (GLOG_FOUND) +- ceres_report_not_found("Missing required Ceres " +- "dependency: glog. Searched using GLOG_INCLUDE_DIR_HINTS: " +- "${GLOG_INCLUDE_DIR_HINTS} and glog_DIR: ${glog_DIR}.") +- endif (GLOG_FOUND) +- list(APPEND CERES_INCLUDE_DIRS ${GLOG_INCLUDE_DIRS}) +- +- # gflags is only a public dependency of Ceres via glog, thus is not required +- # if Ceres was built with MINIGLOG. +- if (CERES_USES_GFLAGS) +- # If gflags was found as an imported CMake target, we need to call +- # find_packge(Gflags) again here, as imported CMake targets are not +- # re-exported. Without this, the 'gflags-shared' target name which is +- # present in CERES_LIBRARIES in this case would not be defined, and so +- # CMake will assume it is a library name (which it is not) and fail to link. +- # +- # Append the locations of gflags when Ceres was built to the search path +- # hints. +- set(GFLAGS_WAS_BUILT_WITH_CMAKE @FOUND_INSTALLED_GFLAGS_CMAKE_CONFIGURATION@) +- if (GFLAGS_WAS_BUILT_WITH_CMAKE) +- set(gflags_DIR @gflags_DIR@) +- set(GFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION TRUE) +- else() +- list(APPEND GFLAGS_INCLUDE_DIR_HINTS @GFLAGS_INCLUDE_DIR@) +- get_filename_component(CERES_BUILD_GFLAGS_LIBRARY_DIR @GFLAGS_LIBRARY@ PATH) +- list(APPEND GFLAGS_LIBRARY_DIR_HINTS ${CERES_BUILD_GFLAGS_LIBRARY_DIR}) +- endif() +- +- # Search quietly s/t we control the timing of the error message if not found. +- find_package(Gflags QUIET) +- if (GFLAGS_FOUND) +- message(STATUS "Found required Ceres dependency: gflags") +- else() +- ceres_report_not_found("Missing required Ceres " +- "dependency: gflags. Searched using GFLAGS_INCLUDE_DIR_HINTS: " +- "${GFLAGS_INCLUDE_DIR_HINTS} and gflags_DIR: ${gflags_DIR}.") +- endif() +- list(APPEND CERES_INCLUDE_DIRS ${GFLAGS_INCLUDE_DIR_HINTS}) +- endif() +-endif (CERES_USES_MINIGLOG) ++#SuiteSparse ++if (@SUITESPARSE@) ++ find_dependency(suitesparse CONFIG) ++endif() + + # Import exported Ceres targets, if they have not already been imported. + if (NOT TARGET ceres AND NOT Ceres_BINARY_DIR) diff --git a/vcpkg/ports/ceres/0004_fix_find_eigen.patch b/vcpkg/ports/ceres/0004_fix_find_eigen.patch new file mode 100644 index 0000000..ad92228 --- /dev/null +++ b/vcpkg/ports/ceres/0004_fix_find_eigen.patch @@ -0,0 +1,122 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7033de0..5235baa 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -209,40 +209,40 @@ endif (IOS) + unset(CERES_COMPILE_OPTIONS) + + # Eigen. +-find_package(Eigen REQUIRED) +-if (EIGEN_FOUND) +- message("-- Found Eigen version ${EIGEN_VERSION}: ${EIGEN_INCLUDE_DIRS}") +- if (EIGEN_VERSION VERSION_LESS 3.1.0) ++find_package(Eigen3 REQUIRED) ++if (EIGEN3_FOUND) ++ message(STATUS "Found Eigen version ${EIGEN3_VERSION_STRING}: ${EIGEN3_INCLUDE_DIRS}") ++ if (EIGEN3_VERSION_STRING VERSION_LESS 3.1.0) + message(FATAL_ERROR "-- Ceres requires Eigen version >= 3.1.0 in order " + "that Eigen/SparseCore be available, detected version of Eigen is: " +- "${EIGEN_VERSION}") +- endif (EIGEN_VERSION VERSION_LESS 3.1.0) ++ "${EIGEN3_VERSION_STRING}") ++ endif (EIGEN3_VERSION_STRING VERSION_LESS 3.1.0) + + if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)" AND +- EIGEN_VERSION VERSION_LESS 3.3.4) ++ EIGEN3_VERSION_STRING VERSION_LESS 3.3.4) + # As per issue #289: https://github.com/ceres-solver/ceres-solver/issues/289 + # the bundle_adjustment_test will fail for Eigen < 3.3.4 on aarch64. + message(FATAL_ERROR "-- Ceres requires Eigen version >= 3.3.4 on aarch64. " +- "Detected version of Eigen is: ${EIGEN_VERSION}.") ++ "Detected version of Eigen is: ${EIGEN3_VERSION_STRING}.") + endif() + + if (EIGENSPARSE) +- message("-- Enabling use of Eigen as a sparse linear algebra library.") ++ message(STATUS "Enabling use of Eigen as a sparse linear algebra library.") + list(APPEND CERES_COMPILE_OPTIONS CERES_USE_EIGEN_SPARSE) +- if (EIGEN_VERSION VERSION_LESS 3.2.2) ++ if (EIGEN3_VERSION_STRING VERSION_LESS 3.2.2) + message(" WARNING:") + message("") +- message(" Your version of Eigen (${EIGEN_VERSION}) is older than ") ++ message(" Your version of Eigen (${EIGEN3_VERSION_STRING}) is older than ") + message(" version 3.2.2. The performance of SPARSE_NORMAL_CHOLESKY ") + message(" and SPARSE_SCHUR linear solvers will suffer.") +- endif (EIGEN_VERSION VERSION_LESS 3.2.2) ++ endif (EIGEN3_VERSION_STRING VERSION_LESS 3.2.2) + else (EIGENSPARSE) + message("-- Disabling use of Eigen as a sparse linear algebra library.") + message(" This does not affect the covariance estimation algorithm ") + message(" which can still use the EIGEN_SPARSE_QR algorithm.") + add_definitions(-DEIGEN_MPL2_ONLY) + endif (EIGENSPARSE) +-endif (EIGEN_FOUND) ++endif (EIGEN3_FOUND) + + if (LAPACK) + find_package(LAPACK QUIET) +@@ -562,7 +562,7 @@ include_directories( + # Note that this is *not* propagated to clients, ie CERES_INCLUDE_DIRS + # used by clients after find_package(Ceres) does not identify Eigen as + # as system headers. +-include_directories(SYSTEM ${EIGEN_INCLUDE_DIRS}) ++include_directories(${EIGEN3_INCLUDE_DIRS}) + + if (SUITESPARSE) + include_directories(${SUITESPARSE_INCLUDE_DIRS}) +diff --git a/cmake/CeresConfig.cmake.in b/cmake/CeresConfig.cmake.in +index c4ed71f..b3d6a17 100644 +--- a/cmake/CeresConfig.cmake.in ++++ b/cmake/CeresConfig.cmake.in +@@ -202,39 +202,39 @@ set(CERES_VERSION @CERES_VERSION@ ) + + # Eigen. + # Flag set during configuration and build of Ceres. +-set(CERES_EIGEN_VERSION @EIGEN_VERSION@) ++set(CERES_EIGEN_VERSION @EIGEN3_VERSION_STRING@) + set(EIGEN_WAS_BUILT_WITH_CMAKE @FOUND_INSTALLED_EIGEN_CMAKE_CONFIGURATION@) + # Append the locations of Eigen when Ceres was built to the search path hints. + if (EIGEN_WAS_BUILT_WITH_CMAKE) + set(Eigen3_DIR @Eigen3_DIR@) + set(EIGEN_PREFER_EXPORTED_EIGEN_CMAKE_CONFIGURATION TRUE) + else() +- list(APPEND EIGEN_INCLUDE_DIR_HINTS @EIGEN_INCLUDE_DIR@) ++ list(APPEND EIGEN_INCLUDE_DIR_HINTS @EIGEN3_INCLUDE_DIR@) + endif() + # Search quietly to control the timing of the error message if not found. The + # search should be for an exact match, but for usability reasons do a soft + # match and reject with an explanation below. +-find_package(Eigen ${CERES_EIGEN_VERSION} QUIET) +-if (EIGEN_FOUND) +- if (NOT EIGEN_VERSION VERSION_EQUAL CERES_EIGEN_VERSION) ++find_package(Eigen3 ${CERES_EIGEN_VERSION} QUIET) ++if (EIGEN3_FOUND) ++ if (NOT EIGEN3_VERSION_STRING VERSION_EQUAL CERES_EIGEN_VERSION) + # CMake's VERSION check in FIND_PACKAGE() will accept any version >= the + # specified version. However, only version = is supported. Improve + # usability by explaining why we don't accept non-exact version matching. + ceres_report_not_found("Found Eigen dependency, but the version of Eigen " +- "found (${EIGEN_VERSION}) does not exactly match the version of Eigen " ++ "found (${EIGEN3_VERSION_STRING}) does not exactly match the version of Eigen " + "Ceres was compiled with (${CERES_EIGEN_VERSION}). This can cause subtle " + "bugs by triggering violations of the One Definition Rule. See the " + "Wikipedia article http://en.wikipedia.org/wiki/One_Definition_Rule " + "for more details") + endif () + message(STATUS "Found required Ceres dependency: " +- "Eigen version ${CERES_EIGEN_VERSION} in ${EIGEN_INCLUDE_DIRS}") +-else (EIGEN_FOUND) ++ "Eigen version ${CERES_EIGEN_VERSION} in ${EIGEN3_INCLUDE_DIRS}") ++else (EIGEN3_FOUND) + ceres_report_not_found("Missing required Ceres " + "dependency: Eigen version ${CERES_EIGEN_VERSION}, please set " +- "EIGEN_INCLUDE_DIR.") +-endif (EIGEN_FOUND) +-list(APPEND CERES_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS}) ++ "EIGEN3_INCLUDE_DIR.") ++endif (EIGEN3_FOUND) ++list(APPEND CERES_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIRS}) + + # Glog. + include (CMakeFindDependencyMacro) diff --git a/vcpkg/ports/ceres/CONTROL b/vcpkg/ports/ceres/CONTROL new file mode 100644 index 0000000..5fb8186 --- /dev/null +++ b/vcpkg/ports/ceres/CONTROL @@ -0,0 +1,25 @@ +Source: ceres +Version: 1.14.0 +Port-Version: 10 +Build-Depends: glog, eigen3 +Homepage: https://github.com/ceres-solver/ceres-solver +Description: non-linear optimization package + +Feature: lapack +Build-Depends: lapack +Description: Use Lapack in Ceres + +Feature: suitesparse +Build-Depends: ceres[lapack], suitesparse[core] +Description: SuiteSparse support for Ceres + +Feature: cxsparse +Build-Depends: suitesparse[core] +Description: CXSparse support for Ceres + +Feature: eigensparse +Description: Use of Eigen as a sparse linear algebra library in Ceres + +Feature: tools +Build-Depends: gflags +Description: Ceres tools diff --git a/vcpkg/ports/ceres/portfile.cmake b/vcpkg/ports/ceres/portfile.cmake new file mode 100644 index 0000000..e7c455c --- /dev/null +++ b/vcpkg/ports/ceres/portfile.cmake @@ -0,0 +1,75 @@ +set(MSVC_USE_STATIC_CRT_VALUE OFF) +if(VCPKG_CRT_LINKAGE STREQUAL "static") + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message(FATAL_ERROR "Ceres does not currently support mixing static CRT and dynamic library linkage") + endif() + set(MSVC_USE_STATIC_CRT_VALUE ON) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ceres-solver/ceres-solver + REF 1.14.0 + SHA512 6dddddf5bd5834332a69add468578ad527e4d94fe85c9751ddf5fe9ad11a34918bdd9c994c49dd6ffc398333d0ac9752ac89aaef1293e2fe0a55524e303d415d + HEAD_REF master + PATCHES + 0001_cmakelists_fixes.patch + 0002_use_glog_target.patch + 0003_fix_exported_ceres_config.patch + 0004_fix_find_eigen.patch +) + +file(REMOVE ${SOURCE_PATH}/cmake/FindCXSparse.cmake) +file(REMOVE ${SOURCE_PATH}/cmake/FindGflags.cmake) +file(REMOVE ${SOURCE_PATH}/cmake/FindGlog.cmake) +file(REMOVE ${SOURCE_PATH}/cmake/FindEigen.cmake) +file(REMOVE ${SOURCE_PATH}/cmake/FindSuiteSparse.cmake) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + "suitesparse" SUITESPARSE + "cxsparse" CXSPARSE + "lapack" LAPACK + "eigensparse" EIGENSPARSE + "tools" GFLAGS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DEXPORT_BUILD_DIR=ON + -DBUILD_EXAMPLES=OFF + -DBUILD_TESTING=OFF + -DMSVC_USE_STATIC_CRT=${MSVC_USE_STATIC_CRT_VALUE} + -DLIB_SUFFIX=${LIB_SUFFIX} +) + +vcpkg_install_cmake() + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib${LIB_SUFFIX}/cmake/Ceres) +endif() + +vcpkg_copy_pdbs() + +# Changes target search path +if(VCPKG_TARGET_IS_WINDOWS) + file(READ ${CURRENT_PACKAGES_DIR}/share/ceres/CeresConfig.cmake CERES_TARGETS) + string(REPLACE "get_filename_component(CURRENT_ROOT_INSTALL_DIR\n \${CERES_CURRENT_CONFIG_DIR}/../" + "get_filename_component(CURRENT_ROOT_INSTALL_DIR\n \${CERES_CURRENT_CONFIG_DIR}/../../" CERES_TARGETS "${CERES_TARGETS}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/ceres/CeresConfig.cmake "${CERES_TARGETS}") +else() + file(READ ${CURRENT_PACKAGES_DIR}/share/ceres/CeresConfig.cmake CERES_TARGETS) + string(REPLACE "get_filename_component(CURRENT_ROOT_INSTALL_DIR\n \${CERES_CURRENT_CONFIG_DIR}/../../../" + "get_filename_component(CURRENT_ROOT_INSTALL_DIR\n \${CERES_CURRENT_CONFIG_DIR}/../../" CERES_TARGETS "${CERES_TARGETS}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/ceres/CeresConfig.cmake "${CERES_TARGETS}") +endif() + +# Clean +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/cfitsio/0001-correct-headers-for-getcwd.patch b/vcpkg/ports/cfitsio/0001-correct-headers-for-getcwd.patch new file mode 100644 index 0000000..afd63b6 --- /dev/null +++ b/vcpkg/ports/cfitsio/0001-correct-headers-for-getcwd.patch @@ -0,0 +1,40 @@ +From 67400fcbd3ab2f7e68a8e7a60139b1b615debae2 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Wed, 23 Sep 2020 10:27:43 -0700 +Subject: [PATCH] correct headers for getcwd + +--- + fitsio.h | 3 +++ + group.c | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/fitsio.h b/fitsio.h +index ec26d9d..792bb95 100644 +--- a/fitsio.h ++++ b/fitsio.h +@@ -39,6 +39,9 @@ SERVICES PROVIDED HEREUNDER." + #define CFITSIO_MAJOR 3 + #define CFITSIO_SONAME 5 + ++/* Required for getcwd() */ ++#define _POSIX_C_SOURCE 200112L ++ + /* the SONAME is incremented in a new release if the binary shared */ + /* library (on linux and Mac systems) is not backward compatible */ + /* with the previous release of CFITSIO */ +diff --git a/group.c b/group.c +index 9326c57..cec0f6a 100644 +--- a/group.c ++++ b/group.c +@@ -24,7 +24,7 @@ + #include /* defines the getcwd function on Windows PCs */ + #endif + +-#if defined(unix) || defined(__unix__) || defined(__unix) || defined(HAVE_UNISTD_H) ++#if defined(unix) || defined(__unix__) || defined(__unix) || defined(__APPLE__) || defined(HAVE_UNISTD_H) + #include /* needed for getcwd prototype on unix machines */ + #endif + +-- +2.24.3 (Apple Git-128) + diff --git a/vcpkg/ports/cfitsio/CONTROL b/vcpkg/ports/cfitsio/CONTROL new file mode 100644 index 0000000..e7a6383 --- /dev/null +++ b/vcpkg/ports/cfitsio/CONTROL @@ -0,0 +1,5 @@ +Source: cfitsio +Version: 3.410 +Port-Version: 4 +Homepage: https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c +Description: Library of C and Fortran subroutines for reading and writing data files in FITS (Flexible Image Transport System) data format diff --git a/vcpkg/ports/cfitsio/portfile.cmake b/vcpkg/ports/cfitsio/portfile.cmake new file mode 100644 index 0000000..12e3e2d --- /dev/null +++ b/vcpkg/ports/cfitsio/portfile.cmake @@ -0,0 +1,38 @@ +vcpkg_download_distfile(ARCHIVE + URLS "http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio3410.tar.gz" + FILENAME "cfitsio3410.tar.gz" + SHA512 b2ac31ab17e19eeeb4f1601f42f348402c0a4ab03725dbf74fe75eaabbee2f44f64f0c0ee7f0b2688bd93a9cc0dccf29f07e73b9148fff97fc78bebdbb5f6f0f +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + 0001-correct-headers-for-getcwd.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +# Remove duplicate include files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include/unistd.h) + +# cfitsio uses very common names for its headers, so they must be moved to a subdirectory +file(RENAME ${CURRENT_PACKAGES_DIR}/include ${CURRENT_PACKAGES_DIR}/cfitsio) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) +file(RENAME ${CURRENT_PACKAGES_DIR}/cfitsio ${CURRENT_PACKAGES_DIR}/include/cfitsio) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + # move DLLs to bin directories for dynamic builds + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cfitsio.dll ${CURRENT_PACKAGES_DIR}/bin/cfitsio.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cfitsio.dll ${CURRENT_PACKAGES_DIR}/debug/bin/cfitsio.dll) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cfitsio RENAME copyright) diff --git a/vcpkg/ports/cgal/CONTROL b/vcpkg/ports/cgal/CONTROL new file mode 100644 index 0000000..1cb5e38 --- /dev/null +++ b/vcpkg/ports/cgal/CONTROL @@ -0,0 +1,9 @@ +Source: cgal +Version: 5.0.3 +Build-Depends: mpfr, mpir, zlib, boost-format, boost-container, boost-ptr-container, boost-iterator, boost-variant, boost-any, boost-unordered, boost-random, boost-foreach, boost-graph, boost-heap, boost-logic, boost-multiprecision, boost-interval +Homepage: https://github.com/CGAL/cgal +Description: The Computational Geometry Algorithms Library (CGAL) is a C++ library that aims to provide easy access to efficient and reliable algorithms in computational geometry. + +Feature: qt +Build-Depends: qt5-base[core], qt5-3d, qt5-svg, qt5-xmlpatterns, qt5-script, eigen3 +Description: Qt GUI support for CGAL diff --git a/vcpkg/ports/cgal/portfile.cmake b/vcpkg/ports/cgal/portfile.cmake new file mode 100644 index 0000000..a710650 --- /dev/null +++ b/vcpkg/ports/cgal/portfile.cmake @@ -0,0 +1,60 @@ +vcpkg_buildpath_length_warning(37) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO CGAL/cgal + REF releases/CGAL-5.0.3 + SHA512 e163276264d8aeb3a546392f87d898bcbc59a4e2f10c23327f0c8e3d41f0d3d8200f872230da3f077d3a564acfa4b3fa4c6a101db0b3cd8d4a4028fffa8110df + HEAD_REF master +) + +set(WITH_CGAL_Qt5 OFF) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + qt WITH_CGAL_Qt5 + ) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCGAL_HEADER_ONLY=ON + -DCGAL_INSTALL_CMAKE_DIR=share/cgal + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets() + +vcpkg_copy_pdbs() + +# Clean +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +else() + foreach(ROOT ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE + ${ROOT}/cgal_create_CMakeLists + ${ROOT}/cgal_create_cmake_script + ${ROOT}/cgal_make_macosx_app + ) + endforeach() +endif() + +file(WRITE ${CURRENT_PACKAGES_DIR}/lib/cgal/CGALConfig.cmake "include (\$\{CMAKE_CURRENT_LIST_DIR\}/../../share/cgal/CGALConfig.cmake)") + + +file(INSTALL ${SOURCE_PATH}/Installation/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +file( + COPY + ${SOURCE_PATH}/Installation/LICENSE.BSL + ${SOURCE_PATH}/Installation/LICENSE.FREE_USE + ${SOURCE_PATH}/Installation/LICENSE.GPL + ${SOURCE_PATH}/Installation/LICENSE.LGPL + DESTINATION ${CURRENT_PACKAGES_DIR}/share/cgal +) + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/cgal) diff --git a/vcpkg/ports/cgal/usage b/vcpkg/ports/cgal/usage new file mode 100644 index 0000000..9ea12d7 --- /dev/null +++ b/vcpkg/ports/cgal/usage @@ -0,0 +1,5 @@ +The package cgal provides CMake targets: + + find_package(CGAL CONFIG REQUIRED) + target_link_libraries(main PRIVATE CGAL::CGAL) + diff --git a/vcpkg/ports/cgicc/CMakeLists.txt b/vcpkg/ports/cgicc/CMakeLists.txt new file mode 100644 index 0000000..8a74f6b --- /dev/null +++ b/vcpkg/ports/cgicc/CMakeLists.txt @@ -0,0 +1,121 @@ + +cmake_minimum_required (VERSION 3.8) +project (cgicc) +include (CheckIncludeFiles) +include(CheckSymbolExists) +include (CheckCXXSourceCompiles) + +set (VERSION "3.2.19") +execute_process (COMMAND hostname OUTPUT_VARIABLE HOST OUTPUT_STRIP_TRAILING_WHITESPACE) +check_include_files (dlfcn.h HAVE_DLFCN_H) +check_symbol_exists(gettimeofday sys/time.h HAVE_GETTIMEOFDAY) +check_include_files (inttypes.h HAVE_INTTYPES_H) +check_include_files (memory.h HAVE_MEMORY_H) + +check_cxx_source_compiles (" + namespace test { } + int main(int, char**) { + using namespace ::test; +}" HAVE_NAMESPACES) +check_include_files (stdint.h HAVE_STDINT_H) +check_include_files (stdlib.h HAVE_STDLIB_H) +set (CMAKE_REQUIRED_FLAGS "-DHAVE_NAMESPACES") +check_cxx_source_compiles (" + #include + #include + #ifdef HAVE_NAMESPACES + using namespace std; +#endif +int +main () +{ +list x; x.push_back(5); +list::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0; + ; + return 0; +}" HAVE_STL) +check_include_files (strings.h HAVE_STRINGS_H) +check_include_files (string.h HAVE_STRING_H) +check_include_files (sys/stat.h HAVE_SYS_STAT_H) +check_include_files (sys/time.h HAVE_SYS_TIME_H) +check_include_files (sys/types.h HAVE_SYS_TYPES_H) +check_include_files (sys/utsname.h HAVE_SYS_UTSNAME_H) +check_symbol_exists (uname sys/utsname.h HAVE_UNAME) +check_include_files (unistd.h HAVE_UNISTD_H) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cgicc/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h @ONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cgicc/CgiDefs.h.in ${CMAKE_CURRENT_BINARY_DIR}/CgiDefs.h @ONLY) +add_definitions (-DHAVE_CONFIG_H) +set (cgicc_SOURCES + cgicc/CgiEnvironment.cpp + cgicc/CgiInput.cpp + cgicc/CgiUtils.cpp + cgicc/Cgicc.cpp + cgicc/FormEntry.cpp + cgicc/FormFile.cpp + cgicc/HTMLAttribute.cpp + cgicc/HTMLAttributeList.cpp + cgicc/HTMLDoctype.cpp + cgicc/HTMLElement.cpp + cgicc/HTMLElementList.cpp + cgicc/HTTPContentHeader.cpp + cgicc/HTTPCookie.cpp + cgicc/HTTPHTMLHeader.cpp + cgicc/HTTPHeader.cpp + cgicc/HTTPPlainHeader.cpp + cgicc/HTTPRedirectHeader.cpp + cgicc/HTTPResponseHeader.cpp + cgicc/HTTPStatusHeader.cpp + cgicc/HTTPXHTMLHeader.cpp + cgicc/MStreamable.cpp + cgicc/XHTMLDoctype.cpp +cgicc/XMLPI.cpp) +set (cgicc_HEADERS + cgicc/Cgicc.h + cgicc/CgiEnvironment.h + cgicc/CgiInput.h + cgicc/CgiUtils.h + cgicc/FormEntry.h + cgicc/FormFile.h + cgicc/HTMLAtomicElement.h + cgicc/HTMLAttribute.h + cgicc/HTMLAttributeList.h + cgicc/HTMLBooleanElement.h + cgicc/HTMLClasses.h + cgicc/HTMLDoctype.h + cgicc/HTMLElement.h + cgicc/HTMLElementList.h + cgicc/HTTPContentHeader.h + cgicc/HTTPCookie.h + cgicc/HTTPHeader.h + cgicc/HTTPHTMLHeader.h + cgicc/HTTPPlainHeader.h + cgicc/HTTPRedirectHeader.h + cgicc/HTTPResponseHeader.h + cgicc/HTTPStatusHeader.h + cgicc/HTTPXHTMLHeader.h + cgicc/MStreamable.h + cgicc/XHTMLDoctype.h + cgicc/XMLDeclaration.h + cgicc/XMLPI.h + ${CMAKE_CURRENT_BINARY_DIR}/CgiDefs.h + ${CMAKE_CURRENT_BINARY_DIR}/config.h +) + +include_directories (. ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}) +add_library (cgicc ${cgicc_SOURCES} ${cgicc_HEADERS}) + +if (BUILD_SHARED_LIBS) + add_definitions(-DCGICC_EXPORTS) +else() + add_definitions(-DCGICC_STATIC) +endif() + +install(TARGETS cgicc + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES ${cgicc_HEADERS} DESTINATION include/cgicc) +endif() diff --git a/vcpkg/ports/cgicc/CONTROL b/vcpkg/ports/cgicc/CONTROL new file mode 100644 index 0000000..ad59850 --- /dev/null +++ b/vcpkg/ports/cgicc/CONTROL @@ -0,0 +1,4 @@ +Source: cgicc +Version: 3.2.19-4 +Homepage: https://www.gnu.org/software/cgicc/ +Description: GNU Cgicc is an ANSI C++ compliant class library that greatly simplifies the creation of CGI applications for the World Wide Web diff --git a/vcpkg/ports/cgicc/fix-define.patch b/vcpkg/ports/cgicc/fix-define.patch new file mode 100644 index 0000000..2c3f9bc --- /dev/null +++ b/vcpkg/ports/cgicc/fix-define.patch @@ -0,0 +1,22 @@ +diff --git a/cgicc/config.h.in b/cgicc/config.h.in +index 6870cc2..ee7b5b4 100644 +--- a/cgicc/config.h.in ++++ b/cgicc/config.h.in +@@ -76,7 +76,7 @@ + #undef HAVE__BOOL + + /* The host system cgicc was configured for */ +-#undef HOST ++#cmakedefine HOST "@HOST@" + + /* Define to the sub-directory where libtool stores uninstalled libraries. */ + #undef LT_OBJDIR +@@ -106,7 +106,7 @@ + #undef STDC_HEADERS + + /* Version number of package */ +-#undef VERSION ++#cmakedefine VERSION "@VERSION@" + + /* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ diff --git a/vcpkg/ports/cgicc/fix-static-build.patch b/vcpkg/ports/cgicc/fix-static-build.patch new file mode 100644 index 0000000..4bd2179 --- /dev/null +++ b/vcpkg/ports/cgicc/fix-static-build.patch @@ -0,0 +1,15 @@ +diff --git a/cgicc/CgiDefs.h.in b/cgicc/CgiDefs.h.in +index 71b70ad..3793cd8 100644 +--- a/cgicc/CgiDefs.h.in ++++ b/cgicc/CgiDefs.h.in +@@ -47,7 +47,9 @@ + #ifdef WIN32 + + // export library symbols +-# ifdef CGICC_EXPORTS ++# ifdef CGICC_STATIC ++# define CGICC_API ++# elif defined(CGICC_EXPORTS) + # define CGICC_API __declspec(dllexport) + # else + # define CGICC_API __declspec(dllimport) diff --git a/vcpkg/ports/cgicc/portfile.cmake b/vcpkg/ports/cgicc/portfile.cmake new file mode 100644 index 0000000..0be8d18 --- /dev/null +++ b/vcpkg/ports/cgicc/portfile.cmake @@ -0,0 +1,41 @@ +set(CGICC_VERSION 3.2.19) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "https://ftp.gnu.org/gnu/cgicc/cgicc-${CGICC_VERSION}.tar.gz" "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/cgicc/cgicc-${CGICC_VERSION}.tar.gz" + FILENAME "cgicc-${CGICC_VERSION}.tar.gz" + SHA512 c361923cf3ac876bc3fc94dffd040d2be7cd44751d8534f4cfa3545e9f58a8ec35ebcd902a8ce6a19da0efe52db67506d8b02e5cc868188d187ce3092519abdf +) + +vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH + PATCHES + fix-define.patch + fix-static-build.patch +) + +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 + -DDISABLE_INSTALL_TOOLS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(READ ${CURRENT_PACKAGES_DIR}/include/cgicc/CgiDefs.h CGI_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + string(REPLACE "# ifdef CGICC_STATIC" "# if 0" CGI_H "${CGI_H}") +else() + string(REPLACE "# ifdef CGICC_STATIC" "# if 1" CGI_H "${CGI_H}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/cgicc/CgiDefs.h "${CGI_H}") + + +file(INSTALL ${SOURCE_PATH}/COPYING.DOC DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/cgl/CMakeLists.txt b/vcpkg/ports/cgl/CMakeLists.txt new file mode 100644 index 0000000..ce859f1 --- /dev/null +++ b/vcpkg/ports/cgl/CMakeLists.txt @@ -0,0 +1,125 @@ +cmake_minimum_required(VERSION 3.11) + +project(Cgl LANGUAGES C CXX) + +set(PROJECT_VERSION 0.60.2) +set(PROJECT_VERSION_MAJOR 0) +set(PROJECT_VERSION_MINOR 60) +set(PROJECT_VERSION_PATCH 2) + +set(CMAKE_CXX_STANDARD 14) + +set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed") +set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed") +set(INSTALL_INCLUDE_DIR "include/Coin" CACHE PATH "Path where headers will be installed") +set(INSTALL_CMAKE_DIR "share/cgl" CACHE PATH "Path where cmake configs will be installed") + +# Make relative paths absolute (needed later on) +set(RELATIVE_INSTALL_INCLUDE_DIR ${INSTALL_INCLUDE_DIR}) +foreach(p LIB BIN INCLUDE CMAKE) + set(var INSTALL_${p}_DIR) + if(NOT IS_ABSOLUTE "${${var}}") + set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}") + endif() +endforeach() + +find_package(CoinUtils REQUIRED) +find_package(Osi REQUIRED) +find_package(Clp REQUIRED) + +file(GLOB CGL_SOURCES + Cgl/src/CglConfig.h + Cgl/src/*.hpp + Cgl/src/*.cpp + Cgl/src/CglAllDifferent/*.cpp + Cgl/src/CglAllDifferent/*.hpp + Cgl/src/CglBKClique/*.cpp + Cgl/src/CglBKClique/*.hpp + Cgl/src/CglClique/*.cpp + Cgl/src/CglClique/*.hpp + Cgl/src/CglCliqueMerging/*.cpp + Cgl/src/CglCliqueMerging/*.hpp + Cgl/src/CglDuplicateRow/*.cpp + Cgl/src/CglDuplicateRow/*.hpp + Cgl/src/CglFlowCover/*.cpp + Cgl/src/CglFlowCover/*.hpp + Cgl/src/CglGMI/*.cpp + Cgl/src/CglGMI/*.hpp + Cgl/src/CglGomory/*.cpp + Cgl/src/CglGomory/*.hpp + Cgl/src/CglKnapsackCover/*.cpp + Cgl/src/CglKnapsackCover/*.hpp + Cgl/src/CglLandP/*.cpp + Cgl/src/CglLandP/*.hpp + Cgl/src/CglLiftAndProject/*.cpp + Cgl/src/CglLiftAndProject/*.hpp + Cgl/src/CglMixedIntegerRounding/*.cpp + Cgl/src/CglMixedIntegerRounding/*.hpp + Cgl/src/CglMixedIntegerRounding2/*.cpp + Cgl/src/CglMixedIntegerRounding2/*.hpp + Cgl/src/CglOddHole/*.cpp + Cgl/src/CglOddHole/*.hpp + Cgl/src/CglOddHoleWC/*.cpp + Cgl/src/CglOddHoleWC/*.hpp + Cgl/src/CglPreProcess/*.cpp + Cgl/src/CglPreProcess/*.hpp + Cgl/src/CglProbing/*.cpp + Cgl/src/CglProbing/*.hpp + Cgl/src/CglRedSplit/*.cpp + Cgl/src/CglRedSplit/*.hpp + Cgl/src/CglRedSplit2/*.cpp + Cgl/src/CglRedSplit2/*.hpp + Cgl/src/CglResidualCapacity/*.cpp + Cgl/src/CglResidualCapacity/*.hpp + Cgl/src/CglSimpleRounding/*.cpp + Cgl/src/CglSimpleRounding/*.hpp + Cgl/src/CglTwomir/*.cpp + Cgl/src/CglTwomir/*.hpp + Cgl/src/CglZeroHalf/*.cpp + Cgl/src/CglZeroHalf/*.hpp) + +add_library(${PROJECT_NAME} ${CGL_SOURCES}) + +target_include_directories(${PROJECT_NAME} + PUBLIC + $ + $) + +target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_CMATH) +target_compile_definitions(${PROJECT_NAME} PUBLIC COIN_HAS_CLP) + +target_link_libraries(${PROJECT_NAME} PRIVATE Coin::CoinUtils Coin::Osi Coin::Clp) + +install(DIRECTORY Cgl/src/ + DESTINATION ${INSTALL_INCLUDE_DIR} + FILES_MATCHING + PATTERN "*.h" + PATTERN "*.hpp" + PATTERN "config_default.h" EXCLUDE) + +install(TARGETS ${PROJECT_NAME} + EXPORT "${PROJECT_NAME}Targets" + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin) + +include(CMakePackageConfigHelpers) + +set(version_config "${CMAKE_CURRENT_BINARY_DIR}/temp/${PROJECT_NAME}ConfigVersion.cmake") +set(project_config "${CMAKE_CURRENT_BINARY_DIR}/temp/${PROJECT_NAME}Config.cmake") +set(namespace "Coin::") + +write_basic_package_version_file("${version_config}" + COMPATIBILITY SameMajorVersion) + +configure_package_config_file("Config.cmake.in" + "${project_config}" + INSTALL_DESTINATION + "${INSTALL_CMAKE_DIR}") + +install(FILES "${project_config}" "${version_config}" + DESTINATION "${INSTALL_CMAKE_DIR}") + +install(EXPORT "${PROJECT_NAME}Targets" + NAMESPACE "${namespace}" + DESTINATION "${INSTALL_CMAKE_DIR}") \ No newline at end of file diff --git a/vcpkg/ports/cgl/CONTROL b/vcpkg/ports/cgl/CONTROL new file mode 100644 index 0000000..9c715c8 --- /dev/null +++ b/vcpkg/ports/cgl/CONTROL @@ -0,0 +1,5 @@ +Source: cgl +Version: 0.60.2-2 +Homepage: https://github.com/coin-or/Cgl +Description: The COIN-OR Cut Generation Library (Cgl) is a collection of cut generators that can be used with other COIN-OR packages that make use of cuts, such as, among others, the linear solver Clp or the mixed integer linear programming solvers Cbc or BCP. +Build-Depends: coinutils, osi, clp \ No newline at end of file diff --git a/vcpkg/ports/cgl/Config.cmake.in b/vcpkg/ports/cgl/Config.cmake.in new file mode 100644 index 0000000..a9af956 --- /dev/null +++ b/vcpkg/ports/cgl/Config.cmake.in @@ -0,0 +1,5 @@ + +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") +check_required_components("@PROJECT_NAME@") \ No newline at end of file diff --git a/vcpkg/ports/cgl/fix-c1083-error.patch b/vcpkg/ports/cgl/fix-c1083-error.patch new file mode 100644 index 0000000..bc5b62a --- /dev/null +++ b/vcpkg/ports/cgl/fix-c1083-error.patch @@ -0,0 +1,30 @@ +diff --git a/Cgl/src/CglLandP/CglLandP.cpp b/Cgl/src/CglLandP/CglLandP.cpp +index 2676790..af90a6e 100644 +--- a/Cgl/src/CglLandP/CglLandP.cpp ++++ b/Cgl/src/CglLandP/CglLandP.cpp +@@ -22,7 +22,7 @@ + #define CLONE_SI //Solver is cloned between two cuts + + #include "CoinTime.hpp" +-#include "CglGomory.hpp" ++#include "CglGomory/CglGomory.hpp" + #include "CoinFactorization.hpp" + #include + namespace LAP +diff --git a/Cgl/src/CglPreProcess/CglPreProcess.cpp b/Cgl/src/CglPreProcess/CglPreProcess.cpp +index 17cf372..8cb738f 100644 +--- a/Cgl/src/CglPreProcess/CglPreProcess.cpp ++++ b/Cgl/src/CglPreProcess/CglPreProcess.cpp +@@ -24,9 +24,9 @@ + #include "CoinHelperFunctions.hpp" + #include "CoinWarmStartBasis.hpp" + +-#include "CglProbing.hpp" +-#include "CglDuplicateRow.hpp" +-#include "CglClique.hpp" ++#include "CglProbing/CglProbing.hpp" ++#include "CglDuplicateRow/CglDuplicateRow.hpp" ++#include "CglClique/CglClique.hpp" + //#define PRINT_DEBUG 1 + //#define COIN_DEVELOP 1 + #ifdef COIN_DEVELOP diff --git a/vcpkg/ports/cgl/portfile.cmake b/vcpkg/ports/cgl/portfile.cmake new file mode 100644 index 0000000..8969d81 --- /dev/null +++ b/vcpkg/ports/cgl/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO coin-or/Cgl + REF 6377b88754fafacf24baac28bb27c0623cc14457 + SHA512 7579a89f945fd3b88cc1f0dd95906c385b5c730b58bd620ea8b820926096256f9083f50dd4e70f71d69432e4d0ffc60b4ec8fa517893a549621d8373f944a1bb + PATCHES fix-c1083-error.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/cgltf/CONTROL b/vcpkg/ports/cgltf/CONTROL new file mode 100644 index 0000000..83b1c42 --- /dev/null +++ b/vcpkg/ports/cgltf/CONTROL @@ -0,0 +1,4 @@ +Source: cgltf +Version: 1.5 +Homepage: https://github.com/jkuhlmann/cgltf +Description: Single-file glTF 2.0 loader and writer written in C99 diff --git a/vcpkg/ports/cgltf/portfile.cmake b/vcpkg/ports/cgltf/portfile.cmake new file mode 100644 index 0000000..7c5a37f --- /dev/null +++ b/vcpkg/ports/cgltf/portfile.cmake @@ -0,0 +1,17 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jkuhlmann/cgltf + REF v1.5 + SHA512 b27b4f221a09aba1b4fa316ae5c4117f28592c717d606668d9c7e5986f8a9787014467b7c8e545194c69a4df6c7be7a797a16b26081df202da9ffd3a7ccc202f + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/cgltf.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/cgltf_write.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/cgns/CONTROL b/vcpkg/ports/cgns/CONTROL new file mode 100644 index 0000000..3398bad --- /dev/null +++ b/vcpkg/ports/cgns/CONTROL @@ -0,0 +1,32 @@ +Source: cgns +Version: 3.4.0-1 +Homepage: http://cgns.org/ +Description: The CFD General Notation System (CGNS) provides a standard for recording and recovering computer data associated with the numerical solution of fluid dynamics equations. +Default-Features: hdf5, lfsselector + +Feature: mpi +Description: Compile with support for the message passage interface (MPI) +Build-Depends: hdf5[core,parallel] + +Feature: fortran +Description: Enable fortran support (not yet implemented) + +Feature: tests +Description: Build tests + +Feature: tools +Description: Build tools + +Feature: hdf5 +Description: Enable hdf5 support +Build-Depends: hdf5[core,tools] + +Feature: lfsselector +Description: Selector for LFS +Build-Depends: cgns[core,lfs] (!osx) + +Feature: lfs +Description: Enable LFS support + +Feature: legacy +Description: Enable legacy support diff --git a/vcpkg/ports/cgns/cgnsconfig.h b/vcpkg/ports/cgns/cgnsconfig.h new file mode 100644 index 0000000..7ebe18a --- /dev/null +++ b/vcpkg/ports/cgns/cgnsconfig.h @@ -0,0 +1,6 @@ +#ifndef CGNSCONFIG_H +#define CGNSCONFIG_H + +#include "cgnstypes.h" + +#endif \ No newline at end of file diff --git a/vcpkg/ports/cgns/defines.patch b/vcpkg/ports/cgns/defines.patch new file mode 100644 index 0000000..e17d488 --- /dev/null +++ b/vcpkg/ports/cgns/defines.patch @@ -0,0 +1,16 @@ +diff --git a/src/cgnstypes.h.in b/src/cgnstypes.h.in +index 98c4e7fdc..8c6bcea62 100644 +--- a/src/cgnstypes.h.in ++++ b/src/cgnstypes.h.in +@@ -29,6 +29,11 @@ + #ifndef CGNSTYPES_H + #define CGNSTYPES_H + ++#define CG_BUILD_HDF5 @BUILDHDF5@ ++#define CG_BUILD_FORTRAN @BUILDFORTRAN@ ++#define CG_BUILD_PARALLEL @BUILDPARALLEL@ ++#define CG_BUILD_BASESCOPE @BUILDBASESCOPE@ ++ + #define CG_BUILD_LEGACY @BUILDLEGACY@ + #define CG_BUILD_64BIT @BUILD64BIT@ + #define CG_BUILD_SCOPE @BUILDSCOPE@ diff --git a/vcpkg/ports/cgns/hdf5.patch b/vcpkg/ports/cgns/hdf5.patch new file mode 100644 index 0000000..4de9ee3 --- /dev/null +++ b/vcpkg/ports/cgns/hdf5.patch @@ -0,0 +1,108 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 58f078fe7..46446da8a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -194,71 +194,17 @@ endif (CGNS_ENABLE_FORTRAN AND HAS_FORTRAN) + option(CGNS_ENABLE_HDF5 "Enable or disable HDF5 interface" "OFF") + if (CGNS_ENABLE_HDF5) + +- if (CGNS_BUILD_SHARED) +- set (FIND_HDF_COMPONENTS C shared) +- else (CGNS_BUILD_SHARED) +- set (FIND_HDF_COMPONENTS C static) +- endif (CGNS_BUILD_SHARED) +- message (STATUS "HDF5 find comps: ${FIND_HDF_COMPONENTS}") +- +- #set (SEARCH_PACKAGE_NAME ${HDF5_PACKAGE_NAME}) +- set (SEARCH_PACKAGE_NAME "hdf5") +- +- find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) +- message (STATUS "HDF5 C libs:${HDF5_FOUND} static:${HDF5_static_C_FOUND} and shared:${HDF5_shared_C_FOUND}") +- if (HDF5_FOUND) +- add_executable (h5dump IMPORTED) +- if (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) +- set (FIND_HDF_COMPONENTS C) +- +- find_package (HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS ${FIND_HDF_COMPONENTS}) +- message (STATUS "HDF5 libs:${HDF5_FOUND} C:${HDF5_C_FOUND}") +- set (LINK_LIBS ${LINK_LIBS} ${HDF5_LIBRARIES}) +- if (HDF5_BUILD_SHARED_LIBS) +- add_definitions (-DH5_BUILT_AS_DYNAMIC_LIB) +- else (HDF5_BUILD_SHARED_LIBS) +- add_definitions (-DH5_BUILT_AS_STATIC_LIB) +- endif (HDF5_BUILD_SHARED_LIBS) +- if (BUILD_SHARED_LIBS AND WIN32) +- set_property (TARGET h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dumpdll") +- else (BUILD_SHARED_LIBS AND WIN32) +- set_property (TARGET h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") +- endif (BUILD_SHARED_LIBS AND WIN32) +- else (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) +- if (BUILD_SHARED_LIBS AND HDF5_shared_C_FOUND) +- set (LINK_LIBS ${LINK_LIBS} ${HDF5_C_SHARED_LIBRARY}) +- else (HDF5_static_C_FOUND) +- set (LINK_LIBS ${LINK_LIBS} ${HDF5_C_STATIC_LIBRARY}) +- endif (BUILD_SHARED_LIBS AND HDF5_shared_C_FOUND) +- set_property (TARGET h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") +- endif (NOT HDF5_static_C_FOUND AND NOT HDF5_shared_C_FOUND) ++ find_package(HDF5 CONFIG REQUIRED) ++ if(TARGET hdf5::hdf5-shared) ++ set (LINK_LIBS ${LINK_LIBS} hdf5::hdf5-shared) ++ #add_executable(h5dump ALIAS hdf5::h5dump-shared) ++ set (HDF5_DUMP_EXECUTABLE $) ++ else() ++ set (LINK_LIBS ${LINK_LIBS} hdf5::hdf5-static) ++ #add_executable(h5dump ALIAS hdf5::h5dump) + set (HDF5_DUMP_EXECUTABLE $) +- +- set (HDF5_HAVE_H5PUBCONF_H 1) +- set (HDF5_HAVE_HDF5 1) +- set (HDF5_HDF5_HEADER "h5pubconf.h") +- set (HDF5_INCLUDE_DIR_GEN ${HDF5_INCLUDE_DIR}) +- message (STATUS "HDF5-${HDF5_VERSION_STRING} found: INC=${HDF5_INCLUDE_DIR} TOOLS=${HDF5_TOOLS_DIR}") +- else (HDF5_FOUND) +- find_package (HDF5) # Legacy find +-#Legacy find_package does not set HDF5_TOOLS_DIR, so we set it here +- set(HDF5_TOOLS_DIR ${HDF5_LIBRARY_DIRS}/../bin) +-#Legacy find_package does not set HDF5_BUILD_SHARED_LIBS, so we set it here +- if (CGNS_BUILD_SHARED AND EXISTS "${HDF5_LIBRARY_DIRS}/libhdf5${CMAKE_SHARED_LIBRARY_SUFFIX}") +- set (HDF5_BUILD_SHARED_LIBS 1) +- add_definitions (-DH5_BUILT_AS_DYNAMIC_LIB) +- else () +- set (HDF5_BUILD_SHARED_LIBS 0) +- add_definitions (-DH5_BUILT_AS_STATIC_LIB) +- endif () +- set (LINK_LIBS ${LINK_LIBS} ${HDF5_LIBRARIES}) +- +- add_executable (h5dump IMPORTED) +- set_property (TARGET h5dump PROPERTY IMPORTED_LOCATION "${HDF5_TOOLS_DIR}/h5dump") +- set (HDF5_DUMP_EXECUTABLE $) +- endif (HDF5_FOUND) +- set (HDF5_PACKAGE_NAME ${SEARCH_PACKAGE_NAME}) +- ++ endif() ++ + if (HDF5_FOUND) + set (HDF5_HAVE_H5PUBCONF_H 1) + set (HDF5_HAVE_HDF5 1) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 66b547ed1..4051f07d4 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -12,13 +12,14 @@ include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}) + if (CGNS_ENABLE_HDF5) + add_definitions(-DBUILD_HDF5) + if (WIN32) +- if (HDF5_LIBRARY) ++ add_definitions(-DWIN32) ++ if (HDF5_BUILD_SHARED_LIBS) + # file(STRINGS ${HDF5_LIBRARY} HDF5isDLL REGEX "__imp__H5close") + # if (HDF5isDLL) + # this is only needed when using hdf5 dll libs +- add_definitions(-DWIN32 -D_HDF5USEDLL_) ++ add_definitions(-DH5_BUILT_AS_DYNAMIC_LIB) + # endif (HDF5isDLL) +- endif (HDF5_LIBRARY) ++ endif (HDF5_BUILD_SHARED_LIBS) + endif (WIN32) + if(HDF5_NEED_MPI AND MPI_INC) + include_directories(${MPI_INC}) diff --git a/vcpkg/ports/cgns/linux_lfs.patch b/vcpkg/ports/cgns/linux_lfs.patch new file mode 100644 index 0000000..3ccda64 --- /dev/null +++ b/vcpkg/ports/cgns/linux_lfs.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 46446da8a..a3d8cd98f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -82,6 +82,7 @@ if (CGNS_ENABLE_LFS) + else (WIN32) + check_symbol_exists(open64 "sys/types.h;sys/stat.h;unistd.h" HAVE_OPEN64) + check_symbol_exists(lseek64 "sys/types.h;unistd.h" HAVE_LSEEK64) ++ add_definitions(-D_FILE_OFFSET_BITS=64 -D__LARGEFILE64_SOURCE -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE) + endif (WIN32) + if (HAVE_OPEN64) + add_definitions(-DHAVE_OPEN64) diff --git a/vcpkg/ports/cgns/portfile.cmake b/vcpkg/ports/cgns/portfile.cmake new file mode 100644 index 0000000..39b65d5 --- /dev/null +++ b/vcpkg/ports/cgns/portfile.cmake @@ -0,0 +1,88 @@ + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO CGNS/CGNS + REF 3420e23febf0eb38c1b05af3c157d614d8476557 # v3.4.0 + SHA512 3fec1c32f1514cd9bc327f12f3f9db6a229df05f514193bd9e913d06b8ae6465664410a3c77a30b0c29f3e999e5efcb1ebed3a8b80e14be92035940c10b1d6d7 + HEAD_REF develop + PATCHES + hdf5.patch + linux_lfs.patch + zlib_szip_mpi.patch + defines.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + mpi HDF5_NEEDS_MPI + fortran CGNS_ENABLE_FORTRAN + tests CGNS_ENABLE_TESTS + hdf5 CGNS_ENABLE_HDF5 + lfs CGNS_ENABLE_LFS + legacy CGNS_ENABLE_LEGACY +) + +if(VCPKG_TARGET_ARCHITECTURE MATCHES "64") + list(APPEND CGNS_BUILD_OPTS "-DCGNS_ENABLE_64BIT=ON") +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + list(APPEND CGNS_BUILD_OPTS "-DCGNS_BUILD_SHARED=ON;-DCGNS_USE_SHARED=ON") +else() + list(APPEND CGNS_BUILD_OPTS "-DCGNS_BUILD_SHARED=OFF;-DCGNS_USE_SHARED=OFF") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + ${FEATURE_OPTIONS} + ${CGNS_BUILD_OPTS} +) + +vcpkg_install_cmake() + +file(INSTALL ${CURRENT_PACKAGES_DIR}/include/cgnsBuild.defs DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/cgnsBuild.defs ${CURRENT_PACKAGES_DIR}/include/cgnsconfig.h) + +file(INSTALL ${CURRENT_PORT_DIR}/cgnsconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) # we patched the config and the include is all that is needed + +set(TOOLS cgnscheck cgnscompress cgnsconvert cgnsdiff cgnslist cgnsnames) + +foreach(tool ${TOOLS}) + set(suffix ${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${suffix}") + file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${suffix}") + endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/${tool}${suffix}") + file(INSTALL "${CURRENT_PACKAGES_DIR}/bin/${tool}${suffix}" + DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/${tool}${suffix}") + endif() +endforeach() + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +IF(EXISTS ${CURRENT_PACKAGES_DIR}/debug) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/include/cgnsBuild.defs ${CURRENT_PACKAGES_DIR}/debug/include/cgnsconfig.h) +endif() + +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/cgnsBuild.defs ${CURRENT_PACKAGES_DIR}/include/cgnsconfig.h) +file(GLOB_RECURSE BATCH_FILES ${CURRENT_PACKAGES_DIR}/bin/*.bat) + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# # Moves all .cmake files from /debug/share/cgns/ to /share/cgns/ +# # See /docs/maintainers/vcpkg_fixup_cmake_targets.md for more details +# vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/cgns) + +# # Handle copyright +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# # Post-build test for cmake libraries +# vcpkg_test_cmake(PACKAGE_NAME cgns) diff --git a/vcpkg/ports/cgns/zlib_szip_mpi.patch b/vcpkg/ports/cgns/zlib_szip_mpi.patch new file mode 100644 index 0000000..4f6608c --- /dev/null +++ b/vcpkg/ports/cgns/zlib_szip_mpi.patch @@ -0,0 +1,35 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 46446da8a..cd05cf51a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -219,20 +221,10 @@ if (CGNS_ENABLE_HDF5) + endif (HDF5_FOUND) + + set(HDF5_NEED_ZLIB "OFF" CACHE BOOL "Does the HDF5 library require linking to zlib?") +- if(HDF5_NEED_ZLIB) +- find_library(ZLIB_LIBRARY z) +- mark_as_advanced(CLEAR ZLIB_LIBRARY) +- else (HDF5_NEED_ZLIB) +- mark_as_advanced(FORCE ZLIB_LIBRARY) +- endif(HDF5_NEED_ZLIB) ++ set(HDF5_NEED_ZLIB ${HDF5_ENABLE_Z_LIB_SUPPORT} CACHE INTERNAL "" FORCE) + + set(HDF5_NEED_SZIP "OFF" CACHE BOOL "Does the HDF5 library require linking to zlib?") +- if (HDF5_NEED_SZIP) +- find_library(SZIP_LIBRARY szip) +- mark_as_advanced(CLEAR SZIP_LIBRARY) +- else (HDF5_NEED_SZIP) +- mark_as_advanced(FORCE SZIP_LIBRARY) +- endif (HDF5_NEED_SZIP) ++ set(HDF5_NEED_SZIP ${HDF5_ENABLE_SZIP_SUPPORT} CACHE INTERNAL "" FORCE) + + # Check if HDF5 version is 1.8 or greater + if (HDF5_VERSION VERSION_LESS "1.8.0") +@@ -240,6 +231,7 @@ if (CGNS_ENABLE_HDF5) + endif (HDF5_VERSION VERSION_LESS "1.8.0") + + set(HDF5_NEED_MPI "OFF" CACHE BOOL "Does the HDF5 library require linking to mpi? (Only true if using parallel HDF5)") ++ set(HDF5_NEED_MPI ${HDF5_ENABLE_PARALLEL} CACHE INTERNAL "" FORCE) + set(MPI_INC) + set(MPI_LIBS) + if (HDF5_NEED_MPI) diff --git a/vcpkg/ports/chaiscript/CONTROL b/vcpkg/ports/chaiscript/CONTROL new file mode 100644 index 0000000..8ae6a84 --- /dev/null +++ b/vcpkg/ports/chaiscript/CONTROL @@ -0,0 +1,4 @@ +Source: chaiscript +Version: 6.1.0-1 +Homepage: https://github.com/ChaiScript/ChaiScript +Description: Embedded Scripting Language Designed for C++ diff --git a/vcpkg/ports/chaiscript/portfile.cmake b/vcpkg/ports/chaiscript/portfile.cmake new file mode 100644 index 0000000..0c825a7 --- /dev/null +++ b/vcpkg/ports/chaiscript/portfile.cmake @@ -0,0 +1,13 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ChaiScript/ChaiScript + REF v6.1.0 + SHA512 7728abd8d3e1e8007f4d95c8065ba5a9154583bcd1d493bfd96d608ff91f4c9bb23e538378b77c1cfd6c637d6b4885af94ac0a2a9a34b6bae19581d9f1a831cc + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/chakracore/CONTROL b/vcpkg/ports/chakracore/CONTROL new file mode 100644 index 0000000..660013a --- /dev/null +++ b/vcpkg/ports/chakracore/CONTROL @@ -0,0 +1,4 @@ +Source: chakracore +Version: 1.11.15 +Homepage: https://github.com/Microsoft/ChakraCore +Description: Core part of the Chakra Javascript engine diff --git a/vcpkg/ports/chakracore/no-warning-as-error.props b/vcpkg/ports/chakracore/no-warning-as-error.props new file mode 100644 index 0000000..6020ed1 --- /dev/null +++ b/vcpkg/ports/chakracore/no-warning-as-error.props @@ -0,0 +1,8 @@ + + + + + false + + + diff --git a/vcpkg/ports/chakracore/portfile.cmake b/vcpkg/ports/chakracore/portfile.cmake new file mode 100644 index 0000000..ad2a24d --- /dev/null +++ b/vcpkg/ports/chakracore/portfile.cmake @@ -0,0 +1,76 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "UWP is not currently supported.") +endif() + +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/ChakraCore + REF febc6a89413df93c304064ef630cf50c5da980c9 # v1.11.15 + SHA512 36961c0b6f8e11ec23c7489dabca5fc84750bcee770dffa6c396deae36791feab5d56cc0df59fbdf42682633462f8a026e38abb3055641045a8e9091265a51e7 + HEAD_REF master +) + +find_path(COR_H_PATH cor.h) +if(COR_H_PATH MATCHES "NOTFOUND") + message(FATAL_ERROR "Could not find . Ensure the NETFXSDK is installed.") +endif() +get_filename_component(NETFXSDK_PATH "${COR_H_PATH}/../.." ABSOLUTE) + +set(BUILDTREE_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) +file(REMOVE_RECURSE ${BUILDTREE_PATH}) +file(COPY ${SOURCE_PATH}/ DESTINATION ${BUILDTREE_PATH}) + +set(CHAKRA_RUNTIME_LIB "static_library") # ChakraCore only supports static CRT linkage + +vcpkg_build_msbuild( + PROJECT_PATH ${BUILDTREE_PATH}/Build/Chakra.Core.sln + OPTIONS + "/p:DotNetSdkRoot=${NETFXSDK_PATH}/" + "/p:CustomBeforeMicrosoftCommonTargets=${CMAKE_CURRENT_LIST_DIR}/no-warning-as-error.props" + "/p:RuntimeLib=${CHAKRA_RUNTIME_LIB}" +) + +file(INSTALL + ${BUILDTREE_PATH}/lib/jsrt/ChakraCore.h + ${BUILDTREE_PATH}/lib/jsrt/ChakraCommon.h + ${BUILDTREE_PATH}/lib/jsrt/ChakraCommonWindows.h + ${BUILDTREE_PATH}/lib/jsrt/ChakraDebug.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(INSTALL + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/ChakraCore.dll + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/ChakraCore.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) + file(INSTALL + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_debug/Chakracore.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(INSTALL + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ChakraCore.dll + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ChakraCore.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) + file(INSTALL + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/Chakracore.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) + file(INSTALL + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/ch.exe + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/GCStress.exe + ${BUILDTREE_PATH}/Build/VcBuild/bin/${TRIPLET_SYSTEM_ARCH}_release/rl.exe + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/chakracore) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/chakracore) +endif() + +vcpkg_copy_pdbs() +file(INSTALL + ${SOURCE_PATH}/LICENSE.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/ChakraCore RENAME copyright) diff --git a/vcpkg/ports/charls/CONTROL b/vcpkg/ports/charls/CONTROL new file mode 100644 index 0000000..f266fe9 --- /dev/null +++ b/vcpkg/ports/charls/CONTROL @@ -0,0 +1,4 @@ +Source: charls +Version: 2.1.0-1 +Homepage: https://github.com/team-charls/charls +Description: CharLS, a C++ JPEG-LS library implementation. \ No newline at end of file diff --git a/vcpkg/ports/charls/portfile.cmake b/vcpkg/ports/charls/portfile.cmake new file mode 100644 index 0000000..805d7b0 --- /dev/null +++ b/vcpkg/ports/charls/portfile.cmake @@ -0,0 +1,25 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO team-charls/charls + REF 2.1.0 + SHA512 456539243d984ebe6afe1bbb7c9422e642cf0346d25d220126ad8a6d04e945c6c340ab3c2b73a7db4ec390ed6a52236e5c6e9ad6d14e8b78b701937810fb327d + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCHARLS_BUILD_TESTS=OFF + -DCHARLS_BUILD_SAMPLES=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/chartdir/CONTROL b/vcpkg/ports/chartdir/CONTROL new file mode 100644 index 0000000..75ed7d6 --- /dev/null +++ b/vcpkg/ports/chartdir/CONTROL @@ -0,0 +1,4 @@ +Source: chartdir +Version: 6.3.1-1 +Homepage: https://www.advsofteng.com/ +Description: ChartDirector is a powerful chart component for creating professional looking charts for web and windows applications. diff --git a/vcpkg/ports/chartdir/Config.cmake.in b/vcpkg/ports/chartdir/Config.cmake.in new file mode 100644 index 0000000..d943c4a --- /dev/null +++ b/vcpkg/ports/chartdir/Config.cmake.in @@ -0,0 +1,21 @@ + +get_filename_component(_chartdir_root "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_chartdir_root "${_chartdir_root}" PATH) +get_filename_component(_chartdir_root "${_chartdir_root}" PATH) + +set(_chartdir_lib "${_chartdir_root}/lib/@CHARTDIR_LIB@") +if (EXISTS "${_chartdir_lib}") + + add_library(chartdir UNKNOWN IMPORTED) + set_target_properties(chartdir PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${_chartdir_root}/include") + set_target_properties(chartdir PROPERTIES IMPORTED_LOCATION "${_chartdir_lib}") + set_property(TARGET chartdir APPEND PROPERTY IMPORTED_CONFIGURATIONS) + +else() + + set(chartdir_FOUND FALSE) + +endif() +unset(_chartdir_lib) + +unset(_chartdir_root) diff --git a/vcpkg/ports/chartdir/chartdir.h b/vcpkg/ports/chartdir/chartdir.h new file mode 100644 index 0000000..2fa308a --- /dev/null +++ b/vcpkg/ports/chartdir/chartdir.h @@ -0,0 +1,6 @@ +#ifndef __CHARTDIR_H__ +#define __CHARTDIR_H__ + +#include + +#endif // __CHARTDIR_H__ diff --git a/vcpkg/ports/chartdir/portfile.cmake b/vcpkg/ports/chartdir/portfile.cmake new file mode 100644 index 0000000..3b57b19 --- /dev/null +++ b/vcpkg/ports/chartdir/portfile.cmake @@ -0,0 +1,96 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +if(TRIPLET_SYSTEM_ARCH MATCHES "arm" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR VCPKG_LIBRARY_LINKAGE STREQUAL static) + + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +elseif(VCPKG_TARGET_IS_WINDOWS) + + vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://www.advsofteng.net/chartdir_cpp_win.zip" + FILENAME "chartdir_cpp_win-6.3.1.zip" + SHA512 e9841d4416c833f57439a36cb981a9c320884c655f8278a22690f05a215c87f0bba83406b45e03ea384c015a4619852c7a9b36dcc9dbd7d531dee1c07b5cffe9 + ) + + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE_FILE} + REF 6.3.1 + ) + + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(LIBDIR "${SOURCE_PATH}/lib64") + else() + set(LIBDIR "${SOURCE_PATH}/lib32") + endif() + + file(COPY "${LIBDIR}/chartdir60.dll" DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(COPY "${LIBDIR}/chartdir60.lib" DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(COPY "${LIBDIR}/chartdir60.dll" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(COPY "${LIBDIR}/chartdir60.lib" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + + set(CHARTDIR_LIB "chartdir60.lib") + +elseif(VCPKG_TARGET_IS_OSX) + + vcpkg_download_distfile(ARCHIVE_FILE + URLS "https://www.advsofteng.net/chartdir_cpp_mac.tar.gz" + FILENAME "chartdir_cpp_mac-6.3.1.tar.gz" + SHA512 d7364b42ed7c5dd2f89ed8692ed0df1ec952216ba24f8afa8e039641f3296f23c9ff6391e3e0dcd3bfdb9e6898c21a8281aa2803fbee33c7197c1df271a0edf7 + ) + + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE_FILE} + REF 6.3.1 + ) + + file(COPY "${SOURCE_PATH}/lib/libchartdir.6.dylib" DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(COPY "${SOURCE_PATH}/lib/libchartdir.6.dylib" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + + set(CHARTDIR_LIB "libchartdir.6.dylib") + +elseif(VCPKG_TARGET_IS_LINUX) + + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + + vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://www.advsofteng.net/chartdir_cpp_linux_64.tar.gz" + FILENAME "chartdir_cpp_linux_64-6.3.1.tar.gz" + SHA512 e6a3acee3cc5f38304ffa0d3704b1365fcc7a60c8bb688f121caa31efa568b74598b4e10379e84200888d9d8dc3cd7a6a24a944c2d63ca5a146162854c6222a9 + ) + + else() + + vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://www.advsofteng.net/chartdir_cpp_linux.tar.gz" + FILENAME "chartdir_cpp_linux-6.3.1.tar.gz" + SHA512 0a2f2d7c8d53c2f06c302a837f286826b4f48cc5f5bdb55c4de23337bc4188d1652625aee2c8061561d9b5bdef5e0e2a4cdd176d44ca60c1f730e4f38299c5a0 + ) + + endif() + + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE_FILE} + REF 6.3.1 + ) + + file(COPY "${SOURCE_PATH}/lib/libchartdir.so.6.0.3" DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(COPY "${SOURCE_PATH}/lib/libchartdir.so.6.0.3" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + + set(CHARTDIR_LIB "libchartdir.so.6.0.3") + + file(COPY ${SOURCE_PATH}/lib/fonts DESTINATION ${CURRENT_PACKAGES_DIR}/share/chartdir) + +endif() + +file(GLOB HEADERS "${SOURCE_PATH}/include/*.h") +file(COPY ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/chartdir) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/chartdir.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +configure_file(${SOURCE_PATH}/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/chartdir/copyright COPYONLY) +configure_file(${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in ${CURRENT_PACKAGES_DIR}/share/chartdir/chartdir-config.cmake @ONLY) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/chartdir) diff --git a/vcpkg/ports/chartdir/usage b/vcpkg/ports/chartdir/usage new file mode 100644 index 0000000..a270b78 --- /dev/null +++ b/vcpkg/ports/chartdir/usage @@ -0,0 +1,4 @@ +The package chartdir provides CMake targets: + + find_package(chartdir CONFIG REQUIRED) + target_link_libraries(main PRIVATE chartdir) diff --git a/vcpkg/ports/check/CONTROL b/vcpkg/ports/check/CONTROL new file mode 100644 index 0000000..7f1583a --- /dev/null +++ b/vcpkg/ports/check/CONTROL @@ -0,0 +1,4 @@ +Source: check +Version: 0.15.2 +Homepage: https://github.com/libcheck/check +Description: A unit testing framework for C diff --git a/vcpkg/ports/check/fix-lib-path.patch b/vcpkg/ports/check/fix-lib-path.patch new file mode 100644 index 0000000..1951c2b --- /dev/null +++ b/vcpkg/ports/check/fix-lib-path.patch @@ -0,0 +1,45 @@ +diff --git a/doc/example/src/CMakeLists.txt b/doc/example/src/CMakeLists.txt +index b5e211e..2a92a1a 100644 +--- a/doc/example/src/CMakeLists.txt ++++ b/doc/example/src/CMakeLists.txt +@@ -18,7 +18,7 @@ target_link_libraries(main money) + + install(TARGETS money + RUNTIME DESTINATION bin +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib) ++ LIBRARY DESTINATION lib/manual-link ++ ARCHIVE DESTINATION lib/manual-link) + + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/money.h DESTINATION include) +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index 38cbc53..d8a4272 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -75,5 +75,11 @@ set(HEADERS libcompat.h) + + add_library(compat STATIC ${SOURCES} ${HEADERS}) + ++install(TARGETS compat ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib/manual-link ++ ARCHIVE DESTINATION lib/manual-link ++) ++ + # vim: shiftwidth=2:softtabstop=2:tabstop=2:expandtab:autoindent + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 4a02dbe..ade4cfd 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -191,8 +191,8 @@ if(NOT THIS_IS_SUBPROJECT) + install(TARGETS check checkShared + EXPORT check-targets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/manual-link ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}/manual-link + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + ) + endif() diff --git a/vcpkg/ports/check/portfile.cmake b/vcpkg/ports/check/portfile.cmake new file mode 100644 index 0000000..b01006c --- /dev/null +++ b/vcpkg/ports/check/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libcheck/check + REF 11970a7e112dfe243a2e68773f014687df2900e8 # 0.15.2 + SHA512 210c9617fa1c1ce16bef983b0e6cb587b1774c3f7ce27a53ca7799642dc7a14be8de567d69dc0e57845684c6f7991d772c73654f63c8755afda3b37a35c7156e + HEAD_REF master + PATCHES fix-lib-path.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/check) + +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# cleanup +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/chipmunk/CONTROL b/vcpkg/ports/chipmunk/CONTROL new file mode 100644 index 0000000..7437c78 --- /dev/null +++ b/vcpkg/ports/chipmunk/CONTROL @@ -0,0 +1,4 @@ +Source: chipmunk +Version: 7.0.3 +Homepage: https://github.com/slembcke/Chipmunk2D +Description: A fast and lightweight 2D game physics library. \ No newline at end of file diff --git a/vcpkg/ports/chipmunk/portfile.cmake b/vcpkg/ports/chipmunk/portfile.cmake new file mode 100644 index 0000000..7ae9dfc --- /dev/null +++ b/vcpkg/ports/chipmunk/portfile.cmake @@ -0,0 +1,75 @@ +include(vcpkg_common_functions) + +#architecture detection +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(CHIPMUNK_ARCH Win32) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(CHIPMUNK_ARCH x64) +else() + message(FATAL_ERROR "unsupported architecture") +endif() + +#linking +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(CHIPMUNK_CONFIGURATION_SUFFIX " DLL") +else() + if (VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(CHIPMUNK_CONFIGURATION_SUFFIX "") + else() + set(CHIPMUNK_CONFIGURATION_SUFFIX " SCRT") + endif() +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO slembcke/Chipmunk2D + REF 87340c216bf97554dc552371bbdecf283f7c540e + SHA512 9094017755e9c140aa5bf8a1b5502077ae4fb2b0a3e12f1114e86d8591a6188f89822ecc578a2b5e95f61c555018f1b3273fe50e833fe2daf30e94b180a3d07c + HEAD_REF master +) + +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/msvc/VS2015/chipmunk/chipmunk.vcxproj + RELEASE_CONFIGURATION "Release${CHIPMUNK_CONFIGURATION_SUFFIX}" + DEBUG_CONFIGURATION "Debug${CHIPMUNK_CONFIGURATION_SUFFIX}" +) + +message(STATUS "Installing") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(INSTALL + "${SOURCE_PATH}/msvc/VS2015/chipmunk/${CHIPMUNK_ARCH}/Debug${CHIPMUNK_CONFIGURATION_SUFFIX}/chipmunk.dll" + "${SOURCE_PATH}/msvc/VS2015/chipmunk/${CHIPMUNK_ARCH}/Debug${CHIPMUNK_CONFIGURATION_SUFFIX}/chipmunk.pdb" + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) + file(INSTALL + "${SOURCE_PATH}/msvc/VS2015/chipmunk/${CHIPMUNK_ARCH}/Release${CHIPMUNK_CONFIGURATION_SUFFIX}/chipmunk.dll" + "${SOURCE_PATH}/msvc/VS2015/chipmunk/${CHIPMUNK_ARCH}/Release${CHIPMUNK_CONFIGURATION_SUFFIX}/chipmunk.pdb" + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) +else() + file(INSTALL + "${SOURCE_PATH}/msvc/VS2015/chipmunk/${CHIPMUNK_ARCH}/Release${CHIPMUNK_CONFIGURATION_SUFFIX}/chipmunk.pdb" + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + file(INSTALL + "${SOURCE_PATH}/msvc/VS2015/chipmunk/${CHIPMUNK_ARCH}/Release${CHIPMUNK_CONFIGURATION_SUFFIX}/chipmunk.pdb" + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) +endif() + +file(INSTALL + "${SOURCE_PATH}/msvc/VS2015/chipmunk/${CHIPMUNK_ARCH}/Debug${CHIPMUNK_CONFIGURATION_SUFFIX}/chipmunk.lib" + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) +file(INSTALL + "${SOURCE_PATH}/msvc/VS2015/chipmunk/${CHIPMUNK_ARCH}/Release${CHIPMUNK_CONFIGURATION_SUFFIX}/chipmunk.lib" + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) +file(INSTALL + ${SOURCE_PATH}/include/chipmunk + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/chipmunk RENAME copyright) + +message(STATUS "Installing done") diff --git a/vcpkg/ports/chmlib/CMakeLists.txt b/vcpkg/ports/chmlib/CMakeLists.txt new file mode 100644 index 0000000..49ce1f1 --- /dev/null +++ b/vcpkg/ports/chmlib/CMakeLists.txt @@ -0,0 +1,23 @@ +cmake_minimum_required(VERSION 3.5) +project(chm C) + +add_library(chm src/lzx.c src/chm_lib.c) + +if(BUILD_TOOLS) + link_libraries(chm) + add_executable(enum_chmLib src/enum_chmLib.c) + add_executable(enumdir_chmLib src/enumdir_chmLib.c) + add_executable(extract_chmLib src/extract_chmLib.c) + + install(TARGETS enum_chmLib extract_chmLib enumdir_chmLib + RUNTIME DESTINATION tools/chmlib + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + ) +endif() + +install(TARGETS chm + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) diff --git a/vcpkg/ports/chmlib/CONTROL b/vcpkg/ports/chmlib/CONTROL new file mode 100644 index 0000000..6042ceb --- /dev/null +++ b/vcpkg/ports/chmlib/CONTROL @@ -0,0 +1,4 @@ +Source: chmlib +Version: 0.40-4 +Homepage: https://www.jedrea.com/chmlib/ +Description: CHMLIB is a library for dealing with Microsoft ITSS/CHM format files. Right now, it is a very simple library, but sufficient for dealing with all of the .chm files I've come across. Due to the fairly well-designed indexing built into this particular file format, even a small library is able to gain reasonably good performance indexing into ITSS archives. diff --git a/vcpkg/ports/chmlib/portfile.cmake b/vcpkg/ports/chmlib/portfile.cmake new file mode 100644 index 0000000..1ecd475 --- /dev/null +++ b/vcpkg/ports/chmlib/portfile.cmake @@ -0,0 +1,35 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +set(CHMLIB_VERSION chmlib-0.40) +set(CHMLIB_FILENAME ${CHMLIB_VERSION}.zip) +set(CHMLIB_URL http://www.jedrea.com/chmlib/${CHMLIB_FILENAME}) + +vcpkg_download_distfile( + ARCHIVE + URLS ${CHMLIB_URL} + FILENAME ${CHMLIB_FILENAME} + SHA512 ad3b0d49fcf99e724c0c38b9c842bae9508d0e4ad47122b0f489c113160f5344223d311abb79f25cbb0b662bb00e2925d338d60dd20a0c309bda2822cda4cd24 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_RELEASE -DBUILD_TOOLS=ON + OPTIONS_DEBUG -DBUILD_TOOLS=OFF +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/src/chm_lib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/chmlib) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/chmlib/COPYING ${CURRENT_PACKAGES_DIR}/share/chmlib/copyright) diff --git a/vcpkg/ports/chromium-base/CONTROL b/vcpkg/ports/chromium-base/CONTROL new file mode 100644 index 0000000..589f60a --- /dev/null +++ b/vcpkg/ports/chromium-base/CONTROL @@ -0,0 +1,6 @@ +Source: chromium-base +Version: 86.0.4199.1 +Port-Version: 1 +Homepage: https://chromium.googlesource.com/chromium/src +Description: Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web. +Supports: x64 & (osx|windows|linux) & !uwp diff --git a/vcpkg/ports/chromium-base/chromium-baseConfig.cmake.in b/vcpkg/ports/chromium-base/chromium-baseConfig.cmake.in new file mode 100644 index 0000000..95ce316 --- /dev/null +++ b/vcpkg/ports/chromium-base/chromium-baseConfig.cmake.in @@ -0,0 +1,81 @@ +if(TARGET chromium-base) + return() +endif() + +set(DEFINITIONS_DBG @DEFINITIONS_DBG@) +set(DEFINITIONS_REL @DEFINITIONS_DBG@) + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +add_library(chromium-base INTERFACE IMPORTED GLOBAL) +add_library(chromium-base::chromium-base ALIAS chromium-base) + +set(LIBRARIES_ chromium_base chromium_base_static dynamic_annotations double_conversion) + +if(WIN32) + list(APPEND LIBRARIES_ + cfgmgr32 + powrprof + propsys + setupapi + userenv + wbemuuid + winmm + advapi32 + comdlg32 + dbghelp + dnsapi + gdi32 + msimg32 + odbc32 + odbccp32 + oleaut32 + shell32 + shlwapi + user32 + usp10 + uuid + version + wininet + winspool + ws2_32 + delayimp + kernel32 + ole32) +elseif(APPLE) + list(APPEND LIBRARIES_ + ApplicationServices + AppKit + CoreFoundation + IOKit + OpenDirectory + Security + bsm + pmenergy + pmsample) +endif() + +foreach(LIB_NAME ${LIBRARIES_}) + find_library(_LIB NAMES ${LIB_NAME} ${LIB_NAME}.dll) + target_link_libraries(chromium-base INTERFACE ${_LIB}) + unset(_LIB CACHE) +endforeach() + +if(UNIX AND NOT APPLE) + target_link_libraries(chromium-base INTERFACE -ldl -latomic -lpthread) +endif() + +target_include_directories(chromium-base + INTERFACE ${_IMPORT_PREFIX}/include/chromium-base) + +target_compile_definitions(chromium-base INTERFACE + $<$:${DEFINITIONS_DBG}> + $<$:${DEFINITIONS_REL}>) + +target_compile_features(chromium-base INTERFACE cxx_std_14) diff --git a/vcpkg/ports/chromium-base/portfile.cmake b/vcpkg/ports/chromium-base/portfile.cmake new file mode 100644 index 0000000..6f6d972 --- /dev/null +++ b/vcpkg/ports/chromium-base/portfile.cmake @@ -0,0 +1,156 @@ +vcpkg_fail_port_install( + ON_ARCH "x86" "arm" "arm64" + ON_TARGET "UWP") + +# Patches may be provided at the end +function(checkout_in_path PATH URL REF) + if(EXISTS "${PATH}") + file(GLOB FILES "${PATH}") + list(LENGTH FILES COUNT) + if(COUNT GREATER 0) + return() + endif() + file(REMOVE_RECURSE "${PATH}") + endif() + + vcpkg_from_git( + OUT_SOURCE_PATH DEP_SOURCE_PATH + URL "${URL}" + REF "${REF}" + PATCHES "${ARGN}" + ) + file(RENAME "${DEP_SOURCE_PATH}" "${PATH}") + file(REMOVE_RECURSE "${DEP_SOURCE_PATH}") +endfunction() + +# Commits are based on https://chromium.googlesource.com/chromium/src/+/refs/tags/86.0.4199.1 +set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/25ce732") +file(MAKE_DIRECTORY "${SOURCE_PATH}/third_party") + +set(CHROMIUM_GIT "https://chromium.googlesource.com/chromium/src") +checkout_in_path( + "${SOURCE_PATH}/base" + "${CHROMIUM_GIT}/base" + "25ce73258703a5ac018da0e203fb3d4a98c2136e" + res/0001-base.patch) +checkout_in_path( + "${SOURCE_PATH}/build" + "${CHROMIUM_GIT}/build" + "312532ee66abdacbe58afb5df7ddf05e3a6399f9" + res/0002-build.patch) +checkout_in_path( + "${SOURCE_PATH}/third_party/apple_apsl" + "${CHROMIUM_GIT}/third_party/apple_apsl" + "4cc25bbf65194f6726f7f10da0a885818e35d53e") +checkout_in_path( + "${SOURCE_PATH}/third_party/ced" + "${CHROMIUM_GIT}/third_party/ced" + "4cd87a44674edd9fe1f01c4cb5f1b73907ce4236") +checkout_in_path( + "${SOURCE_PATH}/third_party/modp_b64" + "${CHROMIUM_GIT}/third_party/modp_b64" + "509f005fa65e652dc4a6f636da6fa1002b6dce16") + +set(RES "${CMAKE_CURRENT_LIST_DIR}/res") +file(COPY "${RES}/.gn" DESTINATION "${SOURCE_PATH}") +file(COPY "${RES}/BUILD.gn" DESTINATION "${SOURCE_PATH}") +file(COPY "${RES}/build_overrides" DESTINATION "${SOURCE_PATH}") +file(COPY "${RES}/testing" DESTINATION "${SOURCE_PATH}") +file(COPY "${RES}/tools" DESTINATION "${SOURCE_PATH}") +file(COPY "${RES}/gclient_args.gni" DESTINATION "${SOURCE_PATH}/build/config") +file(COPY "${RES}/LASTCHANGE.committime" DESTINATION "${SOURCE_PATH}/build/util") +file(COPY "${RES}/icu" DESTINATION "${SOURCE_PATH}/third_party") +file(COPY "${RES}/libxml" DESTINATION "${SOURCE_PATH}/third_party") +file(COPY "${RES}/protobuf" DESTINATION "${SOURCE_PATH}/third_party") +file(COPY "${RES}/fontconfig" DESTINATION "${SOURCE_PATH}/third_party") +file(COPY "${RES}/test_fonts" DESTINATION "${SOURCE_PATH}/third_party") + +set(OPTIONS "\ + use_custom_libcxx=false \ + clang_use_chrome_plugins=false \ + forbid_non_component_debug_builds=false \ + treat_warnings_as_errors=false") +set(DEFINITIONS "") + +if(WIN32) + # Windows 10 SDK >= (10.0.19041.0) is required + # https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk + SET(VCPKG_POLICY_SKIP_ARCHITECTURE_CHECK enabled) + set(ENV{DEPOT_TOOLS_WIN_TOOLCHAIN} 0) + set(OPTIONS "${OPTIONS} use_lld=false") +endif() + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Linux) + set(OPTIONS "${OPTIONS} use_allocator=\"none\" use_sysroot=false use_glib=false") +endif() + +# Find the directory that contains "bin/clang" +# Note: Only clang-cl is supported on Windows, see https://crbug.com/988071 +vcpkg_find_acquire_program(CLANG) +if(CLANG MATCHES "-NOTFOUND") + message(FATAL_ERROR "Clang is required.") +endif() +get_filename_component(CLANG "${CLANG}" DIRECTORY) +get_filename_component(CLANG "${CLANG}" DIRECTORY) +if((WIN32 AND NOT EXISTS "${CLANG}/bin/clang-cl.exe") OR + (APPLE AND NOT EXISTS "${CLANG}/bin/clang")) + message(FATAL_ERROR "Clang needs to be inside a bin directory.") +endif() +set(OPTIONS "${OPTIONS} clang_base_path=\"${CLANG}\"") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OPTIONS "${OPTIONS} is_component_build=true") + list(APPEND DEFINITIONS COMPONENT_BUILD) +else() + set(OPTIONS "${OPTIONS} is_component_build=false") +endif() + +if(APPLE) + set(OPTIONS "${OPTIONS} enable_dsyms=true") +endif() + +set(OPTIONS_DBG "${OPTIONS} is_debug=true symbol_level=2") +set(OPTIONS_REL "${OPTIONS} is_debug=false symbol_level=0") +set(DEFINITIONS_DBG ${DEFINITIONS}) +set(DEFINITIONS_REL ${DEFINITIONS}) + +vcpkg_configure_gn( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS_DEBUG "${OPTIONS_DBG}" + OPTIONS_RELEASE "${OPTIONS_REL}" +) + +# Prevent a ninja re-config loop +set(NINJA_REBUILD "build build.ninja: gn\n generator = 1\n depfile = build.ninja.d") +vcpkg_replace_string("${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/build.ninja" "${NINJA_REBUILD}" "") +vcpkg_replace_string("${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/build.ninja" "${NINJA_REBUILD}" "") + +set(TARGETS + base base:base_static + base/third_party/dynamic_annotations + base/third_party/double_conversion) + +if(WIN32) + list(APPEND TARGETS base/win:pe_image) +endif() + +vcpkg_install_gn( + SOURCE_PATH "${SOURCE_PATH}" + TARGETS ${TARGETS} +) + +# Install includes +set(PACKAGES_INCLUDE_DIR "${CURRENT_PACKAGES_DIR}/include/${PORT}") +file(GLOB_RECURSE INCLUDE_FILES LIST_DIRECTORIES false RELATIVE "${SOURCE_PATH}" "${SOURCE_PATH}/*.h") +foreach(file_ ${INCLUDE_FILES}) + configure_file("${SOURCE_PATH}/${file_}" "${PACKAGES_INCLUDE_DIR}/${file_}" COPYONLY) +endforeach() + +configure_file("${CMAKE_CURRENT_LIST_DIR}/chromium-baseConfig.cmake.in" + "${CURRENT_PACKAGES_DIR}/share/${PORT}/chromium-baseConfig.cmake" @ONLY) + +vcpkg_copy_pdbs() + +file(INSTALL "${SOURCE_PATH}/third_party/ced/LICENSE" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright) diff --git a/vcpkg/ports/chromium-base/res/.gn b/vcpkg/ports/chromium-base/res/.gn new file mode 100644 index 0000000..4fcb7c4 --- /dev/null +++ b/vcpkg/ports/chromium-base/res/.gn @@ -0,0 +1 @@ +buildconfig = "//build/config/BUILDCONFIG.gn" \ No newline at end of file diff --git a/vcpkg/ports/chromium-base/res/0001-base.patch b/vcpkg/ports/chromium-base/res/0001-base.patch new file mode 100644 index 0000000..ca8c059 --- /dev/null +++ b/vcpkg/ports/chromium-base/res/0001-base.patch @@ -0,0 +1,101 @@ +diff --git a/BUILD.gn b/BUILD.gn +index 7b7cd51..2961688 100644 +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -155,6 +155,7 @@ if (is_android) { + # test code (test support and anything in the test directory) which should use + # source_set as is recommended for GN targets). + jumbo_component("base") { ++ output_name = "chromium_base" + if (is_nacl || is_ios) { + # Link errors related to malloc functions if libbase for nacl is + # compiled with jumbo: https://crbug.com/775959. +@@ -162,6 +163,11 @@ jumbo_component("base") { + never_build_jumbo = true + } + ++ if (!is_component_build) { ++ complete_static_lib = true ++ configs -= [ "//build/config/compiler:thin_archive" ] ++ } ++ + sources = [ + "allocator/allocator_check.cc", + "allocator/allocator_check.h", +@@ -1638,7 +1644,7 @@ jumbo_component("base") { + "hash/md5_constexpr_internal.h", + "hash/sha1.h", + ] +- if (is_nacl) { ++ if (true) { + sources += [ + "hash/md5_nacl.cc", + "hash/md5_nacl.h", +@@ -2298,6 +2304,7 @@ buildflag_header("tracing_buildflags") { + # library. Note that this library cannot depend on base because base depends on + # base_static. + static_library("base_static") { ++ output_name = "chromium_base_static" + sources = [ + "base_switches.cc", + "base_switches.h", +@@ -2325,7 +2332,7 @@ static_library("base_static") { + } + + component("i18n") { +- output_name = "base_i18n" ++ output_name = "chromium_base_i18n" + sources = [ + "i18n/base_i18n_export.h", + "i18n/base_i18n_switches.cc", +diff --git a/gtest_prod_util.h b/gtest_prod_util.h +index 2ca267e..0a0b6df 100644 +--- a/gtest_prod_util.h ++++ b/gtest_prod_util.h +@@ -5,7 +5,8 @@ + #ifndef BASE_GTEST_PROD_UTIL_H_ + #define BASE_GTEST_PROD_UTIL_H_ + +-#include "testing/gtest/include/gtest/gtest_prod.h" // nogncheck ++#define FRIEND_TEST(test_case_name, test_name)\ ++friend class test_case_name##_##test_name##_Test + + // This is a wrapper for gtest's FRIEND_TEST macro that friends + // test with all possible prefixes. This is very helpful when changing the test +diff --git a/hash/md5.h b/hash/md5.h +index 8a49f08..24acdab 100644 +--- a/hash/md5.h ++++ b/hash/md5.h +@@ -11,7 +11,7 @@ + #include "base/strings/string_piece.h" + #include "build/build_config.h" + +-#if defined(OS_NACL) ++#if true + #include "base/hash/md5_nacl.h" + #else + #include "base/hash/md5_boringssl.h" +diff --git a/hash/md5_nacl.cc b/hash/md5_nacl.cc +index 827bbbd..4b22c59 100644 +--- a/hash/md5_nacl.cc ++++ b/hash/md5_nacl.cc +@@ -22,6 +22,7 @@ + */ + + #include ++#include + + #include "base/hash/md5.h" + +diff --git a/profiler/stack_copier_signal.cc b/profiler/stack_copier_signal.cc +index 5a7d8b9..f959f2f 100644 +--- a/profiler/stack_copier_signal.cc ++++ b/profiler/stack_copier_signal.cc +@@ -6,6 +6,7 @@ + + #include + #include ++#include + #include + #include + diff --git a/vcpkg/ports/chromium-base/res/0002-build.patch b/vcpkg/ports/chromium-base/res/0002-build.patch new file mode 100644 index 0000000..94568d1 --- /dev/null +++ b/vcpkg/ports/chromium-base/res/0002-build.patch @@ -0,0 +1,144 @@ +diff --git a/config/BUILDCONFIG.gn b/config/BUILDCONFIG.gn +index 4cc6bfc..9ea83a9 100644 +--- a/config/BUILDCONFIG.gn ++++ b/config/BUILDCONFIG.gn +@@ -657,6 +657,7 @@ template("component") { + # See http://crbug.com/594610 + forward_variables_from(invoker, [ "visibility" ]) + forward_variables_from(invoker, "*", [ "visibility" ]) ++ not_needed("*") + } + } + +diff --git a/config/clang/BUILD.gn b/config/clang/BUILD.gn +index 960726e..87886dc 100644 +--- a/config/clang/BUILD.gn ++++ b/config/clang/BUILD.gn +@@ -38,5 +38,7 @@ config("extra_warnings") { + "-Wstring-conversion", + + "-Wtautological-overlap-compare", ++ "-Wno-unknown-warning-option", ++ "-Wno-unknown-pragmas" + ] + } +diff --git a/config/mac/sdk_info.py b/config/mac/sdk_info.py +index 1ad11d3..99b21f9 100644 +--- a/config/mac/sdk_info.py ++++ b/config/mac/sdk_info.py +@@ -61,10 +61,15 @@ def FillXcodeVersion(settings, developer_dir): + settings['xcode_build'] = version_plist['ProductBuildVersion'] + return + +- lines = subprocess.check_output(['xcodebuild', '-version']).splitlines() +- settings['xcode_version'] = FormatVersion(lines[0].split()[-1]) +- settings['xcode_version_int'] = int(settings['xcode_version'], 10) +- settings['xcode_build'] = lines[-1].split()[-1] ++ try: ++ lines = subprocess.check_output(['xcodebuild', '-version']).splitlines() ++ settings['xcode_version'] = FormatVersion(lines[0].split()[-1]) ++ settings['xcode_version_int'] = int(settings['xcode_version'], 10) ++ settings['xcode_build'] = lines[-1].split()[-1] ++ except: ++ settings['xcode_version'] = "" ++ settings['xcode_version_int'] = 0 ++ settings['xcode_build'] = "" + + + def FillMachineOSBuild(settings): +diff --git a/mac/find_sdk.py b/mac/find_sdk.py +index 58362bf..a6069b6 100755 +--- a/mac/find_sdk.py ++++ b/mac/find_sdk.py +@@ -68,6 +68,8 @@ def main(): + dev_dir = out.rstrip() + sdk_dir = os.path.join( + dev_dir, 'Platforms/MacOSX.platform/Developer/SDKs') ++ if not os.path.isdir(sdk_dir): ++ sdk_dir = os.path.join(dev_dir, 'SDKs') + + if not os.path.isdir(sdk_dir): + raise SdkError('Install Xcode, launch it, accept the license ' + +@@ -87,7 +89,10 @@ def main(): + + if options.print_bin_path: + bin_path = 'Toolchains/XcodeDefault.xctoolchain/usr/bin/' +- print(os.path.join(dev_dir, bin_path)) ++ if os.path.isdir(os.path.join(dev_dir, bin_path)): ++ print(os.path.join(dev_dir, bin_path)) ++ else: ++ print(os.path.join(dev_dir, 'usr/bin/')) + + return best_sdk + +diff --git a/toolchain/mac/BUILD.gn b/toolchain/mac/BUILD.gn +index 8fdada0..8d5e6b7 100644 +--- a/toolchain/mac/BUILD.gn ++++ b/toolchain/mac/BUILD.gn +@@ -184,9 +184,9 @@ template("mac_toolchain") { + # If dSYMs are enabled, this flag will be added to the link tools. + if (_enable_dsyms) { + dsym_switch = " -Wcrl,dsym,{{root_out_dir}} " +- dsym_switch += "-Wcrl,dsymutilpath," + +- rebase_path("//tools/clang/dsymutil/bin/dsymutil", +- root_build_dir) + " " ++ # dsym_switch += "-Wcrl,dsymutilpath," + ++ # rebase_path("//tools/clang/dsymutil/bin/dsymutil", ++ # root_build_dir) + " " + + dsym_output_dir = + "{{root_out_dir}}/{{target_output_name}}{{output_extension}}.dSYM" +diff --git a/toolchain/win/BUILD.gn b/toolchain/win/BUILD.gn +index be08930..04fb374 100644 +--- a/toolchain/win/BUILD.gn ++++ b/toolchain/win/BUILD.gn +@@ -98,7 +98,7 @@ template("msvc_toolchain") { + } else { + lld_link = "lld-link" + } +- prefix = rebase_path("$clang_base_path/bin", root_build_dir) ++ prefix = "$clang_base_path/bin" + + # lld-link includes a replacement for lib.exe that can produce thin + # archives and understands bitcode (for lto builds). +@@ -190,7 +190,7 @@ template("msvc_toolchain") { + # amount of data to parse and store in .ninja_deps. We do this on non-Windows too, + # and already make sure rebuilds after win sdk / libc++ / clang header updates happen via + # changing commandline flags. +- show_includes = "/showIncludes:user" ++ show_includes = "" + } else { + show_includes = "/showIncludes" + } +@@ -235,7 +235,7 @@ template("msvc_toolchain") { + + if (toolchain_args.current_cpu == "arm64") { + if (is_clang) { +- prefix = rebase_path("$clang_base_path/bin", root_build_dir) ++ prefix = "$clang_base_path/bin" + ml = "${clang_prefix}${prefix}/${clang_cl} --target=arm64-windows" + if (host_os == "win") { + # Flip the slashes so that copy/paste of the command works. +@@ -444,11 +444,9 @@ template("win_toolchains") { + + msvc_toolchain("win_clang_" + target_name) { + environment = "environment." + toolchain_arch +- prefix = rebase_path("$clang_base_path/bin", root_build_dir) ++ prefix = "$clang_base_path/bin" + cl = "${clang_prefix}$prefix/${clang_cl}" +- _clang_lib_dir = +- rebase_path("$clang_base_path/lib/clang/$clang_version/lib/windows", +- root_build_dir) ++ _clang_lib_dir = "$clang_base_path/lib/clang/$clang_version/lib/windows" + if (host_os == "win") { + # Flip the slashes so that copy/paste of the command works. + cl = string_replace(cl, "/", "\\") +@@ -459,7 +457,7 @@ template("win_toolchains") { + + sys_include_flags = "${win_toolchain_data.include_flags_imsvc}" + sys_lib_flags = +- "-libpath:$_clang_lib_dir ${win_toolchain_data.libpath_flags}" ++ "-libpath:\"$_clang_lib_dir\" ${win_toolchain_data.libpath_flags}" + + toolchain_args = { + if (defined(invoker.toolchain_args)) { diff --git a/vcpkg/ports/chromium-base/res/BUILD.gn b/vcpkg/ports/chromium-base/res/BUILD.gn new file mode 100644 index 0000000..01d935b --- /dev/null +++ b/vcpkg/ports/chromium-base/res/BUILD.gn @@ -0,0 +1,5 @@ +static_library("chromium-base") { + deps = [ + "//base", + ] +} diff --git a/vcpkg/ports/chromium-base/res/LASTCHANGE.committime b/vcpkg/ports/chromium-base/res/LASTCHANGE.committime new file mode 100644 index 0000000..6acbbf6 --- /dev/null +++ b/vcpkg/ports/chromium-base/res/LASTCHANGE.committime @@ -0,0 +1 @@ +1594430814 \ No newline at end of file diff --git a/vcpkg/ports/chromium-base/res/build_overrides/build.gni b/vcpkg/ports/chromium-base/res/build_overrides/build.gni new file mode 100644 index 0000000..47ac036 --- /dev/null +++ b/vcpkg/ports/chromium-base/res/build_overrides/build.gni @@ -0,0 +1,16 @@ +import("//build/config/gclient_args.gni") + +# Some non-Chromium builds don't support building java targets. +enable_java_templates = true + +# Don't use Chromium's third_party/binutils. +linux_use_bundled_binutils_override = false + +# Tracing requires //third_party/perfetto. +enable_base_tracing = false + +# Skip assertions about 4GiB file size limit. See https://crbug.com/648948. +ignore_elf32_limitations = false + +# Use the system install of Xcode for tools like ibtool, libtool, etc. +use_system_xcode = true diff --git a/vcpkg/ports/chromium-base/res/fontconfig/BUILD.gn b/vcpkg/ports/chromium-base/res/fontconfig/BUILD.gn new file mode 100644 index 0000000..5c26eaf --- /dev/null +++ b/vcpkg/ports/chromium-base/res/fontconfig/BUILD.gn @@ -0,0 +1 @@ +component("fontconfig") {} \ No newline at end of file diff --git a/vcpkg/ports/chromium-base/res/gclient_args.gni b/vcpkg/ports/chromium-base/res/gclient_args.gni new file mode 100644 index 0000000..bd1145a --- /dev/null +++ b/vcpkg/ports/chromium-base/res/gclient_args.gni @@ -0,0 +1,7 @@ +build_with_chromium = true +checkout_android = false +checkout_android_native_support = false +checkout_ios_webkit = false +checkout_nacl = false +checkout_oculus_sdk = false +checkout_openxr = false \ No newline at end of file diff --git a/vcpkg/ports/chromium-base/res/icu/BUILD.gn b/vcpkg/ports/chromium-base/res/icu/BUILD.gn new file mode 100644 index 0000000..2235698 --- /dev/null +++ b/vcpkg/ports/chromium-base/res/icu/BUILD.gn @@ -0,0 +1,2 @@ +component("icuuc") {} +component("icu") {} \ No newline at end of file diff --git a/vcpkg/ports/chromium-base/res/icu/config.gni b/vcpkg/ports/chromium-base/res/icu/config.gni new file mode 100644 index 0000000..4e9ad6a --- /dev/null +++ b/vcpkg/ports/chromium-base/res/icu/config.gni @@ -0,0 +1,3 @@ +declare_args() { + icu_use_data_file = false +} \ No newline at end of file diff --git a/vcpkg/ports/chromium-base/res/libxml/BUILD.gn b/vcpkg/ports/chromium-base/res/libxml/BUILD.gn new file mode 100644 index 0000000..b48056a --- /dev/null +++ b/vcpkg/ports/chromium-base/res/libxml/BUILD.gn @@ -0,0 +1,2 @@ +component("libxml_utils") {} +component("xml_reader") {} \ No newline at end of file diff --git a/vcpkg/ports/chromium-base/res/protobuf/proto_library.gni b/vcpkg/ports/chromium-base/res/protobuf/proto_library.gni new file mode 100644 index 0000000..e69de29 diff --git a/vcpkg/ports/chromium-base/res/test_fonts/BUILD.gn b/vcpkg/ports/chromium-base/res/test_fonts/BUILD.gn new file mode 100644 index 0000000..b95c104 --- /dev/null +++ b/vcpkg/ports/chromium-base/res/test_fonts/BUILD.gn @@ -0,0 +1 @@ +component("test_fonts") {} \ No newline at end of file diff --git a/vcpkg/ports/chromium-base/res/testing/gmock/BUILD.gn b/vcpkg/ports/chromium-base/res/testing/gmock/BUILD.gn new file mode 100644 index 0000000..acd0ec3 --- /dev/null +++ b/vcpkg/ports/chromium-base/res/testing/gmock/BUILD.gn @@ -0,0 +1 @@ +component("gmock") {} \ No newline at end of file diff --git a/vcpkg/ports/chromium-base/res/testing/gtest/BUILD.gn b/vcpkg/ports/chromium-base/res/testing/gtest/BUILD.gn new file mode 100644 index 0000000..2463cc7 --- /dev/null +++ b/vcpkg/ports/chromium-base/res/testing/gtest/BUILD.gn @@ -0,0 +1 @@ +component("gtest") {} \ No newline at end of file diff --git a/vcpkg/ports/chromium-base/res/testing/libfuzzer/fuzzer_test.gni b/vcpkg/ports/chromium-base/res/testing/libfuzzer/fuzzer_test.gni new file mode 100644 index 0000000..6e2a4c2 --- /dev/null +++ b/vcpkg/ports/chromium-base/res/testing/libfuzzer/fuzzer_test.gni @@ -0,0 +1 @@ +import("//testing/test.gni") \ No newline at end of file diff --git a/vcpkg/ports/chromium-base/res/testing/test.gni b/vcpkg/ports/chromium-base/res/testing/test.gni new file mode 100644 index 0000000..2d6f8c1 --- /dev/null +++ b/vcpkg/ports/chromium-base/res/testing/test.gni @@ -0,0 +1,20 @@ +template("test") { + not_needed(invoker, "*") + not_needed("*") +} + +set_defaults("test") { + configs = [ + "//build/config/compiler:chromium_code" + ] +} + +template("fuzzer_test") { + not_needed(invoker, "*") + not_needed("*") +} + +template("protoc_convert") { + not_needed(invoker, "*") + not_needed("*") +} \ No newline at end of file diff --git a/vcpkg/ports/chromium-base/res/tools/win/DebugVisualizers/BUILD.gn b/vcpkg/ports/chromium-base/res/tools/win/DebugVisualizers/BUILD.gn new file mode 100644 index 0000000..5c2c1f6 --- /dev/null +++ b/vcpkg/ports/chromium-base/res/tools/win/DebugVisualizers/BUILD.gn @@ -0,0 +1 @@ +config("chrome") {} \ No newline at end of file diff --git a/vcpkg/ports/chromium-base/res/tools/win/DebugVisualizers/chrome.natvis b/vcpkg/ports/chromium-base/res/tools/win/DebugVisualizers/chrome.natvis new file mode 100644 index 0000000..e69de29 diff --git a/vcpkg/ports/cimg/CMakeLists.txt b/vcpkg/ports/cimg/CMakeLists.txt new file mode 100644 index 0000000..75ae59c --- /dev/null +++ b/vcpkg/ports/cimg/CMakeLists.txt @@ -0,0 +1,21 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 3.9) +project(CImg) + +add_library(${PROJECT_NAME} INTERFACE) + +target_include_directories(${PROJECT_NAME} INTERFACE + $ + $ +) + +install(TARGETS ${PROJECT_NAME} + EXPORT CImgExport + INCLUDES DESTINATION include +) + +install(EXPORT CImgExport FILE ${PROJECT_NAME}Config.cmake NAMESPACE ${PROJECT_NAME}:: DESTINATION share/cimg) + +install( + FILES ${CMAKE_CURRENT_SOURCE_DIR}/CImg.h + DESTINATION include +) diff --git a/vcpkg/ports/cimg/CONTROL b/vcpkg/ports/cimg/CONTROL new file mode 100644 index 0000000..93a2e4e --- /dev/null +++ b/vcpkg/ports/cimg/CONTROL @@ -0,0 +1,4 @@ +Source: cimg +Version: 2.6.2 +Homepage: https://github.com/dtschump/CImg +Description: The CImg Library is a small, open-source, and modern C++ toolkit for image processing diff --git a/vcpkg/ports/cimg/portfile.cmake b/vcpkg/ports/cimg/portfile.cmake new file mode 100644 index 0000000..0d168fa --- /dev/null +++ b/vcpkg/ports/cimg/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) + +vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH + REPO "dtschump/CImg" + REF v.2.6.2 + HEAD_REF master + SHA512 6571c646c2d1c007212b3c8cd6794ff1722a0ffc4fcbbe26499cf1e74d3490e893cac5868c5b513602b336b5609316cd7f67c2e1f89b04fe79df5f93b9c6be7a) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +# Move cmake files, ensuring they will be 3 directories up the import prefix +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/cimg) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +file(INSTALL ${SOURCE_PATH}/Licence_CeCILL-C_V1-en.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cimg RENAME copyright) +file(INSTALL ${SOURCE_PATH}/Licence_CeCILL_V2-en.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cimg RENAME copyright2) diff --git a/vcpkg/ports/cityhash/CMakeLists.txt b/vcpkg/ports/cityhash/CMakeLists.txt new file mode 100644 index 0000000..f2e0833 --- /dev/null +++ b/vcpkg/ports/cityhash/CMakeLists.txt @@ -0,0 +1,18 @@ +cmake_minimum_required(VERSION 3.13) +project(cityhash CXX) + +add_library(cityhash STATIC src/city.cc) + +target_include_directories(cityhash PUBLIC + $ + $ +) + +install(TARGETS cityhash EXPORT cityhash-config + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +install(EXPORT cityhash-config DESTINATION share/cmake/cityhash) +install(FILES src/city.h DESTINATION include) diff --git a/vcpkg/ports/cityhash/CONTROL b/vcpkg/ports/cityhash/CONTROL new file mode 100644 index 0000000..2b45a58 --- /dev/null +++ b/vcpkg/ports/cityhash/CONTROL @@ -0,0 +1,4 @@ +Source: cityhash +Version: 2013-01-08 +Homepage: https://github.com/google/cityhash +Description: CityHash, a family of hash functions for strings. diff --git a/vcpkg/ports/cityhash/config.h b/vcpkg/ports/cityhash/config.h new file mode 100644 index 0000000..190c1da --- /dev/null +++ b/vcpkg/ports/cityhash/config.h @@ -0,0 +1,118 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define to 1 if the compiler supports __builtin_expect. */ +#if WIN32 || WIN64 +# define HAVE_BUILTIN_EXPECT 0 +#else +# define HAVE_BUILTIN_EXPECT 1 +#endif + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "cityhash-discuss@googlegroups.com" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "CityHash" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "CityHash 1.1.1" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "cityhash" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.1.1" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Define for Solaris 2.5.1 so the uint32_t typedef from , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +/* #undef _UINT32_T */ + +/* Define for Solaris 2.5.1 so the uint64_t typedef from , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +/* #undef _UINT64_T */ + +/* Define for Solaris 2.5.1 so the uint8_t typedef from , + , or is not used. If the typedef were allowed, the + #define below would cause a syntax error. */ +/* #undef _UINT8_T */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define to `int' if does not define. */ +/* #undef ssize_t */ + +/* Define to the type of an unsigned integer type of width exactly 32 bits if + such a type exists and the standard includes do not define it. */ +/* #undef uint32_t */ + +/* Define to the type of an unsigned integer type of width exactly 64 bits if + such a type exists and the standard includes do not define it. */ +/* #undef uint64_t */ + +/* Define to the type of an unsigned integer type of width exactly 8 bits if + such a type exists and the standard includes do not define it. */ +/* #undef uint8_t */ diff --git a/vcpkg/ports/cityhash/portfile.cmake b/vcpkg/ports/cityhash/portfile.cmake new file mode 100644 index 0000000..7e759e7 --- /dev/null +++ b/vcpkg/ports/cityhash/portfile.cmake @@ -0,0 +1,39 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/cityhash + REF 8af9b8c2b889d80c22d6bc26ba0df1afb79a30db + SHA512 5878a6a4f8ee99593412d446d96c05be1f89fa7771eca49ff4a52ce181de8199ba558170930996d36f6df80a65889d93c81ab2611868b015d8db913e2ecd2eb9 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +if(VCPKG_TARGET_IS_WINDOWS) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}/src) +else() + file(MAKE_DIRECTORY ${SOURCE_PATH}/out) + vcpkg_execute_required_process( + COMMAND ${SOURCE_PATH}/configure + WORKING_DIRECTORY ${SOURCE_PATH}/out + LOGNAME configure-${TARGET_TRIPLET} + ) + file(COPY ${SOURCE_PATH}/out/config.h DESTINATION ${SOURCE_PATH}/src) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/cityhash) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/cityhash/copyright COPYONLY) diff --git a/vcpkg/ports/civetweb/CONTROL b/vcpkg/ports/civetweb/CONTROL new file mode 100644 index 0000000..4026126 --- /dev/null +++ b/vcpkg/ports/civetweb/CONTROL @@ -0,0 +1,9 @@ +Source: civetweb +Version: 1.13 +Homepage: https://github.com/civetweb/civetweb +Description: Easy to use, powerful, C/C++ embeddable web server. +Supports: !uwp + +Feature: ssl +Build-Depends: openssl +Description: Enable SSL support \ No newline at end of file diff --git a/vcpkg/ports/civetweb/portfile.cmake b/vcpkg/ports/civetweb/portfile.cmake new file mode 100644 index 0000000..5e26a31 --- /dev/null +++ b/vcpkg/ports/civetweb/portfile.cmake @@ -0,0 +1,40 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_fail_port_install(MESSAGE "${PORT} does not currently support UWP" ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO civetweb/civetweb + REF 8e243456965c9be5212cb96519da69cd54550e3d # v1.13 + SHA512 6f9daf404975697c6b7a56cc71006aaf14442acf545e483d8a7b845f255d5e5d6e08194fe3350a667e0b737b6924c9d39b025b587af27e7f12cd7b64f314eb70 + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + ssl CIVETWEB_ENABLE_SSL +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCIVETWEB_BUILD_TESTING=OFF + -DCIVETWEB_ENABLE_ASAN=OFF + -DCIVETWEB_ENABLE_CXX=ON + -DCIVETWEB_ENABLE_IPV6=ON + -DCIVETWEB_ENABLE_SERVER_EXECUTABLE=OFF + -DCIVETWEB_ENABLE_SSL_DYNAMIC_LOADING=OFF + -DCIVETWEB_ENABLE_WEBSOCKETS=ON + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/civetweb) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/cjson/CONTROL b/vcpkg/ports/cjson/CONTROL new file mode 100644 index 0000000..2747431 --- /dev/null +++ b/vcpkg/ports/cjson/CONTROL @@ -0,0 +1,7 @@ +Source: cjson +Version: 2019-11-30-1 +Description: Ultralightweight JSON parser in ANSI C +Homepage: https://github.com/DaveGamble/cJSON + +Feature: utils +Description: Enable building the cJSON_Utils library diff --git a/vcpkg/ports/cjson/portfile.cmake b/vcpkg/ports/cjson/portfile.cmake new file mode 100644 index 0000000..8332562 --- /dev/null +++ b/vcpkg/ports/cjson/portfile.cmake @@ -0,0 +1,63 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO DaveGamble/cJSON + REF 95368da1a13c1ced5507bb5b0a457729af34837c + SHA512 e50fb7857573fac39bc9659004bd71483156677b4b1c7dd801470469162d1af2b1e3803fb4f1291b2b5defefb005ddd78b0efb01965626eecc00bc78b5f98c72 + HEAD_REF master +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + utils ENABLE_CJSON_UTILS +) + +if(CMAKE_HOST_WIN32) + string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_PUBLIC_SYMBOLS) + string(COMPARE NOTEQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" DENABLE_HIDDEN_SYMBOLS) +else() + set(ENABLE_PUBLIC_SYMBOLS OFF) + set(DENABLE_HIDDEN_SYMBOLS OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_SHARED_AND_STATIC_LIBS=OFF + -DCJSON_OVERRIDE_BUILD_SHARED_LIBS=OFF + -DENABLE_PUBLIC_SYMBOLS=${ENABLE_PUBLIC_SYMBOLS} + -DENABLE_HIDDEN_SYMBOLS=${DENABLE_HIDDEN_SYMBOLS} + -DENABLE_TARGET_EXPORT=ON # Export CMake config files + -DENABLE_CJSON_TEST=OFF + -DENABLE_FUZZING=OFF + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/cJSON) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +file(READ ${CURRENT_PACKAGES_DIR}/include/cjson/cJSON.h _contents) +if(ENABLE_PUBLIC_SYMBOLS) + string(REPLACE "defined(CJSON_HIDE_SYMBOLS)" "0 /* defined(CJSON_HIDE_SYMBOLS) */" _contents "${_contents}") + string(REPLACE "defined(CJSON_EXPORT_SYMBOLS)" "0 /* defined(CJSON_EXPORT_SYMBOLS) */" _contents "${_contents}") + string(REPLACE "defined(CJSON_IMPORT_SYMBOLS)" "1 /* defined(CJSON_IMPORT_SYMBOLS) */" _contents "${_contents}") +else() + string(REPLACE "defined(CJSON_HIDE_SYMBOLS)" "1 /* defined(CJSON_HIDE_SYMBOLS) */" _contents "${_contents}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/cjson/cJSON.h "${_contents}") + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/vcpkg/ports/clapack/CONTROL b/vcpkg/ports/clapack/CONTROL new file mode 100644 index 0000000..0dac115 --- /dev/null +++ b/vcpkg/ports/clapack/CONTROL @@ -0,0 +1,6 @@ +Source: clapack +Version: 3.2.1 +Port-Version: 15 +Homepage: https://www.netlib.org/clapack +Description: CLAPACK (f2c'ed version of LAPACK) +Build-Depends: openblas (!osx) diff --git a/vcpkg/ports/clapack/FindLAPACK.cmake b/vcpkg/ports/clapack/FindLAPACK.cmake new file mode 100644 index 0000000..eff9bae --- /dev/null +++ b/vcpkg/ports/clapack/FindLAPACK.cmake @@ -0,0 +1,233 @@ +#.rst: +# clapack config for vcpkg +# ------------ +# +# Find the clapack includes and library. +# +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# This script defines the following variables: +# +# ``CLAPACK_FOUND`` +# True if clapack library found +# +# ``CLAPACK_VERSION`` +# Containing the clapack version tag (manually defined) +# +# ``CLAPACK_INCLUDE_DIR`` +# Location of clapack headers +# +# ``CLAPACK_LIBRARY`` +# List of libraries to link with when using clapack +# +# Result Targets +# ^^^^^^^^^^^^^^ +# +# This script defines the following targets: +# +# ``clapack::clapack`` +# Target to use clapack +# +# Compatibility Variables +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# This script defines the following variables for compatibility reasons: +# +# ``F2C_FOUND`` +# True if f2c (fortran-to-c wrap layer) library found +# +# ``F2C_INCLUDE_DIR`` +# Location of clapack headers +# +# ``F2C_LIBRARY`` +# Library containing the fortran-to-c wrap layer, necessary for clapack and automatically included when used +# +# ``LAPACK_FOUND`` +# True if clapack library found +# +# ``LAPACK_VERSION`` +# Containing the clapack version tag (manually defined) +# +# ``LAPACK_INCLUDE_DIR`` +# Location of clapack headers +# +# ``LAPACK_LIBRARY`` +# List of libraries to link with when using clapack +# +# Compatibility Targets +# ^^^^^^^^^^^^^^ +# +# This script defines the following targets for compatibility reasons: +# +# ``lapack`` +# Target to use lapack + +include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) +include(${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake) +include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) +include(${CMAKE_ROOT}/Modules/CMakeFindDependencyMacro.cmake) + +set(CLAPACK_VERSION "3.2.1") + +set(CMAKE_THREAD_PREFER_PTHREAD TRUE) +find_dependency(Threads) + +if(UNIX) + find_library(ADDITIONAL_LAPACK_LIBRARY m) + set(PTHREAD_LINK_NAME "-pthread") +endif() + +if(NOT F2C_LIBRARY) + find_library(F2C_LIBRARY_RELEASE NAMES f2c libf2c) + find_library(F2C_LIBRARY_DEBUG NAMES f2cd libf2cd) + select_library_configurations(F2C) + + #keep a list of "pure" f2c libs, without dependencies + set(oF2C_LIBRARY_RELEASE ${F2C_LIBRARY_RELEASE}) + set(oF2C_LIBRARY_DEBUG ${F2C_LIBRARY_DEBUG}) + set(oF2C_LIBRARY ${F2C_LIBRARY}) + + list(APPEND F2C_LIBRARY ${ADDITIONAL_LAPACK_LIBRARY}) +endif() + +if(NOT LAPACK_LIBRARY) + find_library(LAPACK_LIBRARY_RELEASE NAMES lapack) + find_library(LAPACK_LIBRARY_DEBUG NAMES lapackd) + + #keep a list of "pure" lapack libs, without dependencies + set(oLAPACK_LIBRARY_RELEASE ${LAPACK_LIBRARY_RELEASE}) + set(oLAPACK_LIBRARY_DEBUG ${LAPACK_LIBRARY_DEBUG}) + select_library_configurations(oLAPACK) + + list(APPEND LAPACK_LIBRARY_RELEASE ${F2C_LIBRARY_RELEASE}) + list(APPEND LAPACK_LIBRARY_DEBUG ${F2C_LIBRARY_DEBUG}) + + find_dependency(OpenBLAS) + get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY IMPORTED_IMPLIB_RELEASE) + if(NOT _loc) + get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY LOCATION_RELEASE) + endif() + set(LAPACK_BLAS_LIBRARY_RELEASE ${_loc}) + get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY IMPORTED_IMPLIB_DEBUG) + if(NOT _loc) + get_property(_loc TARGET OpenBLAS::OpenBLAS PROPERTY LOCATION_DEBUG) + endif() + set(LAPACK_BLAS_LIBRARY_DEBUG ${_loc}) + select_library_configurations(LAPACK_BLAS) + list(APPEND LAPACK_LIBRARY_RELEASE ${LAPACK_BLAS_LIBRARY_RELEASE}) + list(APPEND LAPACK_LIBRARY_DEBUG ${LAPACK_BLAS_LIBRARY_DEBUG}) + + select_library_configurations(LAPACK) + if(UNIX) + list(APPEND LAPACK_LIBRARY ${PTHREAD_LINK_NAME}) + endif() +endif() + +if(NOT F2C_INCLUDE_DIR) + find_path(F2C_INCLUDE_DIR NAMES f2c.h) +endif() + +if(NOT LAPACK_INCLUDE_DIR) + find_path(LAPACK_INCLUDE_DIR NAMES clapack.h) +endif() + +list(APPEND LAPACK_INCLUDE_DIR ${F2C_INCLUDE_DIR}) +set(LAPACK_INCLUDE_DIR "${LAPACK_INCLUDE_DIR}" CACHE PATH "" FORCE) +set(LAPACK_INCLUDE_DIRS "${LAPACK_INCLUDE_DIR}" CACHE PATH "" FORCE) +set(CLAPACK_INCLUDE_DIR "${LAPACK_INCLUDE_DIR}" CACHE PATH "" FORCE) +set(CLAPACK_INCLUDE_DIRS "${LAPACK_INCLUDE_DIR}" CACHE PATH "" FORCE) +set(F2C_INCLUDE_DIRS "${F2C_INCLUDE_DIR}" CACHE PATH "" FORCE) + +set(LAPACK_DLL_DIR ${LAPACK_INCLUDE_DIR}) +list(TRANSFORM LAPACK_DLL_DIR APPEND "/../bin") +message(STATUS "LAPACK_DLL_DIR: ${LAPACK_DLL_DIR}") + +if(WIN32) + find_file(LAPACK_LIBRARY_RELEASE_DLL NAMES lapack.dll PATHS ${LAPACK_DLL_DIR}) + find_file(LAPACK_LIBRARY_DEBUG_FOLDER NAMES lapackd.dll PATHS ${LAPACK_DLL_DIR}) + find_file(F2C_LIBRARY_RELEASE_DLL NAMES f2c.dll libf2c.dll PATHS ${LAPACK_DLL_DIR}) + find_file(F2C_LIBRARY_DEBUG_DLL NAMES f2cd.dll libf2cd.dll PATHS ${LAPACK_DLL_DIR}) +endif() + +set(LAPACK_BLAS_LIBRARY "${LAPACK_BLAS_LIBRARY}" CACHE STRING "" FORCE) +set(F2C_LIBRARIES "${F2C_LIBRARY}" CACHE STRING "" FORCE) +set(LAPACK_VERSION "${CLAPACK_VERSION}" CACHE STRING "" FORCE) +set(LAPACK_LIBRARIES "${LAPACK_LIBRARY}" CACHE STRING "" FORCE) +set(CLAPACK_LIBRARY "${LAPACK_LIBRARY}" CACHE STRING "" FORCE) +set(CLAPACK_LIBRARIES "${LAPACK_LIBRARY}" CACHE STRING "" FORCE) + +set(LAPACK_LIBRARY "${LAPACK_LIBRARY}" CACHE STRING "" FORCE) +set(F2C_LIBRARY "${F2C_LIBRARY}" CACHE STRING "" FORCE) +set(LAPACK_LIBRARY_RELEASE "${LAPACK_LIBRARY_RELEASE}" CACHE STRING "" FORCE) +set(LAPACK_LIBRARY_DEBUG "${LAPACK_LIBRARY_DEBUG}" CACHE STRING "" FORCE) +set(F2C_LIBRARY_RELEASE "${F2C_LIBRARY_RELEASE}" CACHE STRING "" FORCE) +set(F2C_LIBRARY_DEBUG "${F2C_LIBRARY_DEBUG}" CACHE STRING "" FORCE) + +find_package_handle_standard_args(LAPACK DEFAULT_MSG LAPACK_LIBRARY LAPACK_INCLUDE_DIR) +mark_as_advanced(LAPACK_INCLUDE_DIR LAPACK_LIBRARY) + +#TARGETS +if(CLAPACK_FOUND AND NOT TARGET clapack::clapack) + if(EXISTS "${LAPACK_LIBRARY_RELEASE_DLL}") + add_library(clapack::clapack SHARED IMPORTED) + set_target_properties(clapack::clapack PROPERTIES + IMPORTED_LOCATION_RELEASE "${LAPACK_LIBRARY_RELEASE_DLL}" + IMPORTED_IMPLIB_RELEASE "${oLAPACK_LIBRARY_RELEASE}" + INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}" + INTERFACE_LINK_LIBRARIES "$<$>:${oF2C_LIBRARY_RELEASE}>;$<$:${oF2C_LIBRARY_DEBUG}>;$<$>:${LAPACK_BLAS_LIBRARY_RELEASE}>;$<$:${LAPACK_BLAS_LIBRARY_DEBUG}>;$;$" + IMPORTED_CONFIGURATIONS Release + IMPORTED_LINK_INTERFACE_LANGUAGES "C") + if(EXISTS "${LAPACK_LIBRARY_DEBUG_DLL}") + set_property(TARGET clapack::clapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug) + set_target_properties(clapack::clapack PROPERTIES + IMPORTED_LOCATION_DEBUG "${LAPACK_LIBRARY_DEBUG_DLL}" + IMPORTED_IMPLIB_DEBUG "${oLAPACK_LIBRARY_DEBUG}") + endif() + else() + add_library(clapack::clapack UNKNOWN IMPORTED) + set_target_properties(clapack::clapack PROPERTIES + IMPORTED_LOCATION_RELEASE "${oLAPACK_LIBRARY_RELEASE}" + INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}" + INTERFACE_LINK_LIBRARIES "$<$>:${oF2C_LIBRARY_RELEASE}>;$<$:${oF2C_LIBRARY_DEBUG}>;$<$>:${LAPACK_BLAS_LIBRARY_RELEASE}>;$<$:${LAPACK_BLAS_LIBRARY_DEBUG}>;$;$" + IMPORTED_CONFIGURATIONS Release + IMPORTED_LINK_INTERFACE_LANGUAGES "C") + if(EXISTS "${LAPACK_LIBRARY_DEBUG}") + set_property(TARGET clapack::clapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug) + set_target_properties(clapack::clapack PROPERTIES + IMPORTED_LOCATION_DEBUG "${oLAPACK_LIBRARY_DEBUG}") + endif() + endif() +endif() + +if(CLAPACK_FOUND AND NOT TARGET lapack) + if(EXISTS "${LAPACK_LIBRARY_RELEASE_DLL}") + add_library(lapack SHARED IMPORTED) + set_target_properties(lapack PROPERTIES + IMPORTED_LOCATION_RELEASE "${LAPACK_LIBRARY_RELEASE_DLL}" + IMPORTED_IMPLIB_RELEASE "${oLAPACK_LIBRARY_RELEASE}" + INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}" + INTERFACE_LINK_LIBRARIES "$<$>:${oF2C_LIBRARY_RELEASE}>;$<$:${oF2C_LIBRARY_DEBUG}>;$<$>:${LAPACK_BLAS_LIBRARY_RELEASE}>;$<$:${LAPACK_BLAS_LIBRARY_DEBUG}>;$;$" + IMPORTED_CONFIGURATIONS Release + IMPORTED_LINK_INTERFACE_LANGUAGES "C") + if(EXISTS "${LAPACK_LIBRARY_DEBUG_DLL}") + set_property(TARGET lapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug) + set_target_properties(lapack PROPERTIES + IMPORTED_LOCATION_DEBUG "${LAPACK_LIBRARY_DEBUG_DLL}" + IMPORTED_IMPLIB_DEBUG "${oLAPACK_LIBRARY_DEBUG}") + endif() + else() + add_library(lapack UNKNOWN IMPORTED) + set_target_properties(lapack PROPERTIES + IMPORTED_LOCATION_RELEASE "${oLAPACK_LIBRARY_RELEASE}" + INTERFACE_INCLUDE_DIRECTORIES "${LAPACK_INCLUDE_DIR}" + IMPORTED_CONFIGURATIONS Release + INTERFACE_LINK_LIBRARIES "$<$>:${oF2C_LIBRARY_RELEASE}>;$<$:${oF2C_LIBRARY_DEBUG}>;$<$>:${LAPACK_BLAS_LIBRARY_RELEASE}>;$<$:${LAPACK_BLAS_LIBRARY_DEBUG}>;$;$" + IMPORTED_LINK_INTERFACE_LANGUAGES "C") + if(EXISTS "${LAPACK_LIBRARY_DEBUG}") + set_property(TARGET lapack APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug) + set_target_properties(lapack PROPERTIES + IMPORTED_LOCATION_DEBUG "${oLAPACK_LIBRARY_DEBUG}") + endif() + endif() +endif() diff --git a/vcpkg/ports/clapack/fix-ConfigFile.patch b/vcpkg/ports/clapack/fix-ConfigFile.patch new file mode 100644 index 0000000..295c2bc --- /dev/null +++ b/vcpkg/ports/clapack/fix-ConfigFile.patch @@ -0,0 +1,7 @@ +diff --git a/clapack-config.cmake.in b/clapack-config.cmake.in +index cd19f1d..49af4f0 100644 +--- a/clapack-config.cmake.in ++++ b/clapack-config.cmake.in +@@ -1 +1 @@ +-include("@CLAPACK_BINARY_DIR@/clapack-targets.cmake") ++include("${CMAKE_CURRENT_LIST_DIR}/clapack-targets.cmake") diff --git a/vcpkg/ports/clapack/fix-install.patch b/vcpkg/ports/clapack/fix-install.patch new file mode 100644 index 0000000..b475c6b --- /dev/null +++ b/vcpkg/ports/clapack/fix-install.patch @@ -0,0 +1,45 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 414ac8e..db58b4e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -19,7 +19,7 @@ include_directories(${CLAPACK_SOURCE_DIR}/INCLUDE) + add_subdirectory(F2CLIBS) + add_subdirectory(SRC) + set(CLAPACK_VERSION 3.2.1) +-export(TARGETS f2c lapack FILE ${CMAKE_INSTALL_PREFIX}/share/clapack/clapack-targets.cmake) ++install(EXPORT clapack-targets FILE clapack-targets.cmake DESTINATION share/clapack) + configure_file(${CLAPACK_SOURCE_DIR}/clapack-config-version.cmake.in + ${CMAKE_INSTALL_PREFIX}/share/clapack/clapack-config-version.cmake @ONLY) + configure_file(${CLAPACK_SOURCE_DIR}/clapack-config.cmake.in +diff --git a/F2CLIBS/libf2c/CMakeLists.txt b/F2CLIBS/libf2c/CMakeLists.txt +index 6fa3598..c855e38 100644 +--- a/F2CLIBS/libf2c/CMakeLists.txt ++++ b/F2CLIBS/libf2c/CMakeLists.txt +@@ -63,8 +63,9 @@ set_property(TARGET f2c PROPERTY PREFIX lib) + if(UNIX) + target_link_libraries(f2c m) + endif() +-install(TARGETS f2c ++install(TARGETS f2c EXPORT clapack-targets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib) ++ ARCHIVE DESTINATION lib ++ INCLUDES DESTINATION include) + +diff --git a/SRC/CMakeLists.txt b/SRC/CMakeLists.txt +index 07dc8c7..2355225 100644 +--- a/SRC/CMakeLists.txt ++++ b/SRC/CMakeLists.txt +@@ -377,8 +377,9 @@ if(BUILD_COMPLEX16) + endif() + add_library(lapack ${ALLOBJ} ${ALLXOBJ}) + target_link_libraries(lapack ${BLAS_LIBRARIES} f2c) +-install(TARGETS lapack ++install(TARGETS lapack EXPORT clapack-targets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib) ++ ARCHIVE DESTINATION lib ++ INCLUDES DESTINATION include) + diff --git a/vcpkg/ports/clapack/portfile.cmake b/vcpkg/ports/clapack/portfile.cmake new file mode 100644 index 0000000..3563874 --- /dev/null +++ b/vcpkg/ports/clapack/portfile.cmake @@ -0,0 +1,50 @@ +if(EXISTS "${CURRENT_INSTALLED_DIR}/share/lapack-reference/copyright") + message(FATAL_ERROR "Can't build ${PORT} if lapack-reference is installed. Please remove lapack-reference:${TARGET_TRIPLET}, and try to install ${PORT}:${TARGET_TRIPLET} again.") +endif() + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "http://www.netlib.org/clapack/clapack-3.2.1-CMAKE.tgz" + FILENAME "clapack-3.2.1.tgz" + SHA512 cf19c710291ddff3f6ead7d86bdfdeaebca21291d9df094bf0a8ef599546b007757fb2dbb19b56511bb53ef7456eac0c73973b9627bf4d02982c856124428b49 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + remove_internal_blas.patch + fix-ConfigFile.patch + fix-install.patch + support-uwp.patch +) + +if (VCPKG_TARGET_IS_UWP) + if (NOT EXISTS ${CURRENT_INSTALLED_DIR}/../x86-windows/tools/arithchk.exe) + message(FATAL_ERROR "Please install ${PORT}:x86-windows first.") + endif() + set(ARITHCHK_PATH ${CURRENT_INSTALLED_DIR}/../x86-windows/tools/arithchk.exe) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_DEBUG_POSTFIX=d + -DARITHCHK_PATH=${ARITHCHK_PATH} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +#TODO: fix the official exported targets, since they are broken (luckily it seems that no-one uses them for now) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/clapack) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Install clapack wrappers. +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/lapack) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/FindLAPACK.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/lapack) +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/clapack/remove_internal_blas.patch b/vcpkg/ports/clapack/remove_internal_blas.patch new file mode 100644 index 0000000..3b8c59b --- /dev/null +++ b/vcpkg/ports/clapack/remove_internal_blas.patch @@ -0,0 +1,77 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 320ccc6..414ac8e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,7 +1,6 @@ + cmake_minimum_required(VERSION 2.6) + project(CLAPACK C) +-enable_testing() +-include(CTest) ++find_package(BLAS REQUIRED) + + if(WIN32 AND NOT CYGWIN) + set(SECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/winsecond.c) +@@ -11,7 +10,6 @@ else() + set(SECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/second.c) + set(DSECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/dsecnd.c) + endif() +-enable_testing() + option(USE_BLAS_WRAP "pre-pend f2c_ to each function in blas" OFF) + if(NOT USE_BLAS_WRAP) + # _zrotg_ seems to be missing in the wrap header +@@ -19,16 +17,15 @@ if(NOT USE_BLAS_WRAP) + endif() + include_directories(${CLAPACK_SOURCE_DIR}/INCLUDE) + add_subdirectory(F2CLIBS) +-add_subdirectory(BLAS) + add_subdirectory(SRC) +-add_subdirectory(TESTING) + set(CLAPACK_VERSION 3.2.1) +-set(CPACK_PACKAGE_VERSION_MAJOR 3) +-set(CPACK_PACKAGE_VERSION_MINOR 2) +-set(CPACK_PACKAGE_VERSION_PATCH 1) +-include(CPack) +-export(TARGETS f2c blas lapack FILE clapack-targets.cmake) ++export(TARGETS f2c lapack FILE ${CMAKE_INSTALL_PREFIX}/share/clapack/clapack-targets.cmake) + configure_file(${CLAPACK_SOURCE_DIR}/clapack-config-version.cmake.in +- ${CLAPACK_BINARY_DIR}/clapack-config-version.cmake @ONLY) ++ ${CMAKE_INSTALL_PREFIX}/share/clapack/clapack-config-version.cmake @ONLY) + configure_file(${CLAPACK_SOURCE_DIR}/clapack-config.cmake.in +- ${CLAPACK_BINARY_DIR}/clapack-config.cmake @ONLY) ++ ${CMAKE_INSTALL_PREFIX}/share/clapack/clapack-config.cmake @ONLY) ++install(FILES ++ ${CMAKE_CURRENT_LIST_DIR}/INCLUDE/clapack.h ++ ${CMAKE_CURRENT_LIST_DIR}/INCLUDE/f2c.h ++ DESTINATION include) ++ +diff --git a/F2CLIBS/libf2c/CMakeLists.txt b/F2CLIBS/libf2c/CMakeLists.txt +index 43d7b3f..6fa3598 100644 +--- a/F2CLIBS/libf2c/CMakeLists.txt ++++ b/F2CLIBS/libf2c/CMakeLists.txt +@@ -60,3 +60,11 @@ include_directories(${CLAPACK_SOURCE_DIR}/F2CLIBS/libf2c) + include_directories(${CLAPACK_BINARY_DIR}/F2CLIBS/libf2c) + add_library(f2c ${OFILES} ${CMAKE_CURRENT_BINARY_DIR}/arith.h) + set_property(TARGET f2c PROPERTY PREFIX lib) ++if(UNIX) ++ target_link_libraries(f2c m) ++endif() ++install(TARGETS f2c ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) ++ +diff --git a/SRC/CMakeLists.txt b/SRC/CMakeLists.txt +index ac4cce3..07dc8c7 100644 +--- a/SRC/CMakeLists.txt ++++ b/SRC/CMakeLists.txt +@@ -376,5 +376,9 @@ if(BUILD_COMPLEX16) + set(ALLOBJ ${ZLASRC} ${ALLAUX} ${DZLAUX}) + endif() + add_library(lapack ${ALLOBJ} ${ALLXOBJ}) +-target_link_libraries(lapack blas) ++target_link_libraries(lapack ${BLAS_LIBRARIES} f2c) ++install(TARGETS lapack ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) + diff --git a/vcpkg/ports/clapack/support-uwp.patch b/vcpkg/ports/clapack/support-uwp.patch new file mode 100644 index 0000000..3cbb750 --- /dev/null +++ b/vcpkg/ports/clapack/support-uwp.patch @@ -0,0 +1,95 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index db58b4e..0fb61a0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -15,6 +15,9 @@ if(NOT USE_BLAS_WRAP) + # _zrotg_ seems to be missing in the wrap header + add_definitions(-DNO_BLAS_WRAP) + endif() ++if (ARITHCHK_PATH) ++ add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE) ++endif() + include_directories(${CLAPACK_SOURCE_DIR}/INCLUDE) + add_subdirectory(F2CLIBS) + add_subdirectory(SRC) +diff --git a/F2CLIBS/libf2c/CMakeLists.txt b/F2CLIBS/libf2c/CMakeLists.txt +index 094614a..e5b40ab 100644 +--- a/F2CLIBS/libf2c/CMakeLists.txt ++++ b/F2CLIBS/libf2c/CMakeLists.txt +@@ -44,12 +44,19 @@ if(UNIX) + endif() + set_target_properties(arithchk PROPERTIES COMPILE_DEFINITIONS + "NO_FPINIT;NO_LONG_LONG") ++ ++if (ARITHCHK_PATH) ++ADD_CUSTOM_COMMAND( ++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/arith.h ++ COMMAND ${ARITHCHK_PATH} > ${CMAKE_CURRENT_BINARY_DIR}/arith.h ++ ) ++else() + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/arith.h + COMMAND arithchk > ${CMAKE_CURRENT_BINARY_DIR}/arith.h + DEPENDS arithchk + ) +- ++endif() + + set(OFILES ${MISC} ${POW} ${CX} ${DCX} ${REAL} ${DBL} ${INT} + ${HALF} ${CMP} ${EFL} ${CHAR} ${I77} ${TIME}) +@@ -69,3 +76,6 @@ install(TARGETS f2c EXPORT clapack-targets + ARCHIVE DESTINATION lib + INCLUDES DESTINATION include) + ++install(TARGETS arithchk ++ RUNTIME DESTINATION tools ++) +\ No newline at end of file +diff --git a/F2CLIBS/libf2c/inquire.c b/F2CLIBS/libf2c/inquire.c +index 5936a67..4846d41 100644 +--- a/F2CLIBS/libf2c/inquire.c ++++ b/F2CLIBS/libf2c/inquire.c +@@ -32,7 +32,7 @@ integer f_inqu(inlist *a) + { byfile=1; + g_char(a->infile,a->infilen,buf); + #ifdef NON_UNIX_STDIO +- x = access(buf,0) ? -1 : 0; ++ x = _access(buf,0) ? -1 : 0; + for(i=0,p=NULL;inext) + if (nl == y->nl) + return y; +@@ -308,7 +308,7 @@ x_rsne(cilist *a) + char buf[64]; + hashtab *ht; + Vardesc *v; +- dimen *dn, *dn0, *dn1; ++ dimen *dn = NULL, *dn0 = NULL, *dn1; + ftnlen *dims, *dims1; + ftnlen b, b0, b1, ex, no, nomax, size, span; + ftnint no1, no2, type; diff --git a/vcpkg/ports/clapack/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/clapack/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..cb2e08f --- /dev/null +++ b/vcpkg/ports/clapack/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,11 @@ +message(STATUS "Using VCPKG FindLAPACK from package 'clapack'") +set(LAPACK_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +list(REMOVE_ITEM ARGS "NO_MODULE") +list(REMOVE_ITEM ARGS "CONFIG") +list(REMOVE_ITEM ARGS "MODULE") + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${LAPACK_PREV_MODULE_PATH}) diff --git a/vcpkg/ports/clara/CONTROL b/vcpkg/ports/clara/CONTROL new file mode 100644 index 0000000..bb0af5d --- /dev/null +++ b/vcpkg/ports/clara/CONTROL @@ -0,0 +1,4 @@ +Source: clara +Version: 1.1.5 +Homepage: https://github.com/philsquared/Clara +Description: A simple to use command line parser for C++ \ No newline at end of file diff --git a/vcpkg/ports/clara/portfile.cmake b/vcpkg/ports/clara/portfile.cmake new file mode 100644 index 0000000..e0f82af --- /dev/null +++ b/vcpkg/ports/clara/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO philsquared/Clara + REF v1.1.5 + SHA512 10aed7452eaf95c785899086118181615d29496d9f6e5b7054005b565afb642fcdf18b87ebb2dae4e9e365c434be9463c1a5d1a4c4ab17b95a87b89a7f7e3b08 + HEAD_REF master +) +file(INSTALL ${SOURCE_PATH}/single_include/clara.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/single_include/clara.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/share/clara RENAME copyright) +vcpkg_copy_pdbs() \ No newline at end of file diff --git a/vcpkg/ports/clblas/CONTROL b/vcpkg/ports/clblas/CONTROL new file mode 100644 index 0000000..bd4d8a5 --- /dev/null +++ b/vcpkg/ports/clblas/CONTROL @@ -0,0 +1,4 @@ +Source: clblas +Version: 2.12-4 +Build-Depends: opencl +Description: clBLAS is an OpenCL 1.2 accelerated BLAS (Basic Linear Algebra Subsystem) library. diff --git a/vcpkg/ports/clblas/Fix-BuildDLL.patch b/vcpkg/ports/clblas/Fix-BuildDLL.patch new file mode 100644 index 0000000..f717c28 --- /dev/null +++ b/vcpkg/ports/clblas/Fix-BuildDLL.patch @@ -0,0 +1,16 @@ +diff --git a/src/library/CMakeLists.txt b/src/library/CMakeLists.txt +index f2d5a88..8f84133 100644 +--- a/src/library/CMakeLists.txt ++++ b/src/library/CMakeLists.txt +@@ -910,11 +910,6 @@ endif( ) + + include( InstallRequiredSystemLibraries ) + +-# Install necessary runtime files for debug builds +-install( PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} +- CONFIGURATIONS Debug +- DESTINATION ${CLBLAS_RUNTIME_DESTINATION} ) +- + # Install all *.pdb files for debug builds + install( DIRECTORY ${PROJECT_BINARY_DIR}/staging/ + DESTINATION ${CLBLAS_RUNTIME_DESTINATION} diff --git a/vcpkg/ports/clblas/cmake.patch b/vcpkg/ports/clblas/cmake.patch new file mode 100644 index 0000000..ebe2c0e --- /dev/null +++ b/vcpkg/ports/clblas/cmake.patch @@ -0,0 +1,36 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 6a88c41..05b8029 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -276,6 +276,9 @@ endif() + + # This will define OPENCL_FOUND + find_package( OpenCL ${OPENCL_VERSION} ) ++set( OPENCL_FOUND ${OpenCL_FOUND}) ++set( OPENCL_LIBRARIES ${OpenCL_LIBRARIES} ) ++set( OPENCL_INCLUDE_DIRS ${OpenCL_INCLUDE_DIRS} ) + + # Find Boost on the system, and configure the type of boost build we want + set( Boost_USE_MULTITHREADED ON ) +diff --git a/src/clBLASConfig.cmake.in b/src/clBLASConfig.cmake.in +index f52d1d6..464feca 100644 +--- a/src/clBLASConfig.cmake.in ++++ b/src/clBLASConfig.cmake.in +@@ -1,3 +1,3 @@ + include(${CMAKE_CURRENT_LIST_DIR}/clBLASTargets.cmake) +-get_filename_component(CLBLAS_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR}/@reldir@/include ABSOLUTE) ++get_filename_component(CLBLAS_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR}/@reldir@/../include ABSOLUTE) + set(CLBLAS_LIBRARIES clBLAS) +diff --git a/src/library/CMakeLists.txt b/src/library/CMakeLists.txt +index 5164898..f2d5a88 100644 +--- a/src/library/CMakeLists.txt ++++ b/src/library/CMakeLists.txt +@@ -894,7 +894,7 @@ install( TARGETS clBLAS + EXPORT Library + RUNTIME DESTINATION bin${SUFFIX_BIN} + LIBRARY DESTINATION lib${SUFFIX_LIB} +- ARCHIVE DESTINATION lib${SUFFIX_LIB}/import ++ ARCHIVE DESTINATION lib${SUFFIX_LIB} + ) + + # For debug builds, include the debug runtimes into the package for testing on non-developer machines diff --git a/vcpkg/ports/clblas/portfile.cmake b/vcpkg/ports/clblas/portfile.cmake new file mode 100644 index 0000000..eeeb71c --- /dev/null +++ b/vcpkg/ports/clblas/portfile.cmake @@ -0,0 +1,50 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO clMathLibraries/clBLAS + REF v2.12 + SHA512 5d9b0c58adde69e83d95e9c713e0cdc5f64785fe7e05553a14c57fa483c4ef39e9dc780c26880a7f15924967d5ce4ea29035c29d63eac7ee5a2ae5ddacac2b72 + HEAD_REF master + PATCHES + cmake.patch + Fix-BuildDLL.patch +) + +# v2.12 has a very old FindOpenCL.cmake using OPENCL_ vs. OpenCL_ var names +# conflicting with the built-in, more modern FindOpenCL.cmake +file(REMOVE ${SOURCE_PATH}/src/FindOpenCL.cmake) + +vcpkg_find_acquire_program(PYTHON3) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/src + PREFER_NINJA + OPTIONS + -DBUILD_TEST=OFF + -DBUILD_KTEST=OFF + -DSUFFIX_LIB= + -DPYTHON_EXECUTABLE=${PYTHON3} +) + +vcpkg_install_cmake() +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_TARGET_IS_WINDOWS) + file(REMOVE + ${CURRENT_PACKAGES_DIR}/debug/bin/clBLAS-tune.pdb + ${CURRENT_PACKAGES_DIR}/debug/bin/clBLAS-tune.exe + ${CURRENT_PACKAGES_DIR}/bin/clBLAS-tune.exe + ) +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/clBLAS) +endif() + +vcpkg_copy_pdbs() + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION ${CURRENT_PACKAGES_DIR}/share/clblas RENAME copyright) diff --git a/vcpkg/ports/clblast/CONTROL b/vcpkg/ports/clblast/CONTROL new file mode 100644 index 0000000..6e92020 --- /dev/null +++ b/vcpkg/ports/clblast/CONTROL @@ -0,0 +1,4 @@ +Source: clblast +Version: 1.5.0-1 +Build-Depends: opencl +Description: A modern, lightweight, performant and tunable OpenCL BLAS library written in C++11. \ No newline at end of file diff --git a/vcpkg/ports/clblast/portfile.cmake b/vcpkg/ports/clblast/portfile.cmake new file mode 100644 index 0000000..667769d --- /dev/null +++ b/vcpkg/ports/clblast/portfile.cmake @@ -0,0 +1,46 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO CNugteren/CLBlast + REF 1.5.0 + SHA512 4d2ba302b3d1c449a5aaeeae97e3d0c03d8baec55276e66f80398fe87f11047f68cec6196eba1228cbfd2911bff9cf5cf5550df925d3b0f3e6ad91302817655c + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + +if(VCPKG_TARGET_IS_WINDOWS) + if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/clblast.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/clblast.dll ${CURRENT_PACKAGES_DIR}/bin/clblast.dll) + endif() + if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/clblast.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/clblast.dll ${CURRENT_PACKAGES_DIR}/debug/bin/clblast.dll) + endif() + file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe) + file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + if(EXE OR DEBUG_EXE) + file(REMOVE ${EXE} ${DEBUG_EXE}) + endif() +endif() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/clblast) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/clfft/CONTROL b/vcpkg/ports/clfft/CONTROL new file mode 100644 index 0000000..522a641 --- /dev/null +++ b/vcpkg/ports/clfft/CONTROL @@ -0,0 +1,5 @@ +Source: clfft +Version: 2.12.2-2 +Build-Depends: opencl +Homepage: https://github.com/clMathLibraries/clFFT +Description: clFFT is an OpenCL 1.2 accelerated Fast Fourier Transform library. diff --git a/vcpkg/ports/clfft/portfile.cmake b/vcpkg/ports/clfft/portfile.cmake new file mode 100644 index 0000000..c64baf1 --- /dev/null +++ b/vcpkg/ports/clfft/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO clMathLibraries/clFFT + REF v2.12.2 + SHA512 19e9a4e06f76ae7c7808d1188677d5553c43598886a75328b7801ab2ca68e35206839a58fe2f958a44a6f7c83284dc9461cd0e21c37d1042bf82e24aad066be8 + HEAD_REF master + PATCHES + tweak-install.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/src + PREFER_NINJA + OPTIONS + -DBUILD_LOADLIBRARIES=OFF + -DBUILD_EXAMPLES=OFF + -DSUFFIX_LIB= +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/clFFT) +endif() + +vcpkg_copy_pdbs() + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION ${CURRENT_PACKAGES_DIR}/share/clfft/copyright) diff --git a/vcpkg/ports/clfft/tweak-install.patch b/vcpkg/ports/clfft/tweak-install.patch new file mode 100644 index 0000000..4595203 --- /dev/null +++ b/vcpkg/ports/clfft/tweak-install.patch @@ -0,0 +1,28 @@ +diff --git a/src/clFFTConfig.cmake.in b/src/clFFTConfig.cmake.in +index 5b58c35..ee749a2 100644 +--- a/src/clFFTConfig.cmake.in ++++ b/src/clFFTConfig.cmake.in +@@ -1,3 +1,3 @@ + include(${CMAKE_CURRENT_LIST_DIR}/clFFTTargets.cmake) +-get_filename_component(CLFFT_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR}/@reldir@/include ABSOLUTE) ++get_filename_component(CLFFT_INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR}/@reldir@/../include ABSOLUTE) + set(CLFFT_LIBRARIES clFFT) +diff --git a/src/library/CMakeLists.txt b/src/library/CMakeLists.txt +index 132ef86..12ba905 100644 +--- a/src/library/CMakeLists.txt ++++ b/src/library/CMakeLists.txt +@@ -90,6 +90,7 @@ target_link_libraries( clFFT ${OPENCL_LIBRARIES} ${CMAKE_DL_LIBS} ) + set_target_properties( clFFT PROPERTIES VERSION ${CLFFT_VERSION} ) + set_target_properties( clFFT PROPERTIES SOVERSION ${CLFFT_SOVERSION} ) + set_target_properties( clFFT PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/staging" ) ++set_target_properties( clFFT PROPERTIES INTERFACE_INCLUDE_DIRECTORIES $ ) + + if( CMAKE_COMPILER_IS_GNUCC ) + configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/clFFT.pc.in +@@ -104,5 +105,5 @@ install( TARGETS clFFT + EXPORT Library + RUNTIME DESTINATION bin${SUFFIX_BIN} + LIBRARY DESTINATION lib${SUFFIX_LIB} +- ARCHIVE DESTINATION lib${SUFFIX_LIB}/import ++ ARCHIVE DESTINATION lib${SUFFIX_LIB} + ) diff --git a/vcpkg/ports/cli/CONTROL b/vcpkg/ports/cli/CONTROL new file mode 100644 index 0000000..8cda275 --- /dev/null +++ b/vcpkg/ports/cli/CONTROL @@ -0,0 +1,5 @@ +Source: cli +Version: 1.2.1 +Homepage: https://github.com/daniele77/cli +Description: A library for interactive command line interfaces in modern C++ +Build-Depends: boost-asio diff --git a/vcpkg/ports/cli/portfile.cmake b/vcpkg/ports/cli/portfile.cmake new file mode 100644 index 0000000..134c718 --- /dev/null +++ b/vcpkg/ports/cli/portfile.cmake @@ -0,0 +1,18 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO daniele77/cli + REF v1.2.1 + SHA512 fc834608ac2ca6c3f330711c80897cc581eb1ed8da7a0d56a07efe6650d871f5317c777a6a029fdc0177684f08479bd129cc0ce748354bac3dbe6af79a390d14 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/cli) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/cli11/CONTROL b/vcpkg/ports/cli11/CONTROL new file mode 100644 index 0000000..e9e64ab --- /dev/null +++ b/vcpkg/ports/cli11/CONTROL @@ -0,0 +1,4 @@ +Source: cli11 +Version: 1.9.1 +Description: CLI11 is a command line parser for C++11 and beyond that provides a rich feature set with a simple and intuitive interface. +Homepage: https://github.com/CLIUtils/CLI11 diff --git a/vcpkg/ports/cli11/portfile.cmake b/vcpkg/ports/cli11/portfile.cmake new file mode 100644 index 0000000..69f0a26 --- /dev/null +++ b/vcpkg/ports/cli11/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO CLIUtils/CLI11 + REF 2b059cbdbe844450e1675a5dda3cb8acb1147631 #version 1.9.1 + SHA512 8b7999ae3692ccb7b324bef033ad4cedccbf720b904aa3aa8d07d1cbc8f09f4ecbd9701d2a50a6266f81fe877e30a63a3b6e07d746fa738291b07476405e866d + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCLI11_BUILD_EXAMPLES=OFF + -DCLI11_BUILD_DOCS=OFF + -DCLI11_BUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/CLI11) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/clickhouse-cpp/00001-fix-build.patch b/vcpkg/ports/clickhouse-cpp/00001-fix-build.patch new file mode 100644 index 0000000..8fb57d5 --- /dev/null +++ b/vcpkg/ports/clickhouse-cpp/00001-fix-build.patch @@ -0,0 +1,42 @@ +diff --git a/clickhouse/base/compressed.cpp b/clickhouse/base/compressed.cpp +index 6b7af08..c3a6449 100644 +--- a/clickhouse/base/compressed.cpp ++++ b/clickhouse/base/compressed.cpp +@@ -1,8 +1,8 @@ + #include "compressed.h" + #include "wire_format.h" + +-#include +-#include ++#include ++#include + + #include + +diff --git a/clickhouse/client.cpp b/clickhouse/client.cpp +index 1053006..59950ab 100644 +--- a/clickhouse/client.cpp ++++ b/clickhouse/client.cpp +@@ -8,8 +8,8 @@ + + #include "columns/factory.h" + +-#include +-#include ++#include ++#include + + #include + #include +diff --git a/clickhouse/types/types.h b/clickhouse/types/types.h +index 8d453cd..69aa6a4 100644 +--- a/clickhouse/types/types.h ++++ b/clickhouse/types/types.h +@@ -4,6 +4,7 @@ + #include + #include + #include ++#include + + namespace clickhouse { + diff --git a/vcpkg/ports/clickhouse-cpp/CMakeLists.txt b/vcpkg/ports/clickhouse-cpp/CMakeLists.txt new file mode 100644 index 0000000..08a597b --- /dev/null +++ b/vcpkg/ports/clickhouse-cpp/CMakeLists.txt @@ -0,0 +1,40 @@ +cmake_minimum_required(VERSION 3.13) +project(clickhouse-cpp CXX) + +find_package(lz4 CONFIG REQUIRED) +find_package(cityhash CONFIG REQUIRED) + +file(GLOB_RECURSE SOURCES "clickhouse/*.cpp") +file(GLOB_RECURSE HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "clickhouse/*.h") + +add_library(clickhouse-cpp STATIC ${SOURCES}) + +target_compile_definitions(clickhouse-cpp PRIVATE LZ4_DISABLE_DEPRECATE_WARNINGS) + +set_target_properties(clickhouse-cpp PROPERTIES + CXX_STANDARD 11 + CXX_STANDARD_REQUIRED ON +) + +target_include_directories(clickhouse-cpp PUBLIC + $ + $ +) + +target_link_libraries(clickhouse-cpp + PRIVATE lz4::lz4 + PRIVATE cityhash +) + +install(TARGETS clickhouse-cpp EXPORT clickhouse-cpp-config + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +install(EXPORT clickhouse-cpp-config DESTINATION share/cmake/clickhouse-cpp) + +foreach (HEADER ${HEADERS} ) + get_filename_component(HEADER_DIR ${HEADER} DIRECTORY) + install(FILES ${HEADER} DESTINATION include/${HEADER_DIR}) +endforeach() diff --git a/vcpkg/ports/clickhouse-cpp/CONTROL b/vcpkg/ports/clickhouse-cpp/CONTROL new file mode 100644 index 0000000..fc8cf6a --- /dev/null +++ b/vcpkg/ports/clickhouse-cpp/CONTROL @@ -0,0 +1,5 @@ +Source: clickhouse-cpp +Version: 2019-05-22 +Build-Depends: lz4, cityhash +Homepage: https://github.com/artpaul/clickhouse-cpp +Description: C++ client for Yandex ClickHouse. diff --git a/vcpkg/ports/clickhouse-cpp/portfile.cmake b/vcpkg/ports/clickhouse-cpp/portfile.cmake new file mode 100644 index 0000000..eefea2a --- /dev/null +++ b/vcpkg/ports/clickhouse-cpp/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO artpaul/clickhouse-cpp + REF 1634d8b9e2f3183de1574344563d90557be3b305 + SHA512 bef74f624c2a777f8ec6b7e87ac3cc564e914bcecc639b3889695da56be4c90531309a8fd87054c2777580c36bc3b2d6e9c5690a6345018bf65a5294eeeb3390 + HEAD_REF master + PATCHES 00001-fix-build.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/clickhouse-cpp) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/clickhouse-cpp/copyright COPYONLY) diff --git a/vcpkg/ports/clipp/CONTROL b/vcpkg/ports/clipp/CONTROL new file mode 100644 index 0000000..ed80849 --- /dev/null +++ b/vcpkg/ports/clipp/CONTROL @@ -0,0 +1,3 @@ +Source: clipp +Version: 2019-04-30 +Description: command line interfaces for modern C++ \ No newline at end of file diff --git a/vcpkg/ports/clipp/portfile.cmake b/vcpkg/ports/clipp/portfile.cmake new file mode 100644 index 0000000..ff86dbb --- /dev/null +++ b/vcpkg/ports/clipp/portfile.cmake @@ -0,0 +1,19 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO "muellan/clipp" + REF 2c32b2f1f7cc530b1ec1f62c92f698643bb368db + SHA512 4645fafe85a8099ea97b85e939747a12e9b3b92213b5b8207a9c277537377b77b5daebd88a4c090ea89cfff2937a9fc155da6e8b5558574d7129227c28826e1c + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/clipp RENAME copyright) diff --git a/vcpkg/ports/clockutils/CONTROL b/vcpkg/ports/clockutils/CONTROL new file mode 100644 index 0000000..c555fd4 --- /dev/null +++ b/vcpkg/ports/clockutils/CONTROL @@ -0,0 +1,4 @@ +Source: clockutils +Version: 1.1.1-3651f232c27074c4ceead169e223edf5f00247c5-3 +Homepage: https://github.com/ClockworkOrigins/clockUtils +Description: A lightweight c++ library for commonly needed tasks. Optimized for simplicity and speed. diff --git a/vcpkg/ports/clockutils/fix-warningC4643.patch b/vcpkg/ports/clockutils/fix-warningC4643.patch new file mode 100644 index 0000000..49bc323 --- /dev/null +++ b/vcpkg/ports/clockutils/fix-warningC4643.patch @@ -0,0 +1,29 @@ +diff --git a/include/clockUtils/sockets/TcpSocket.h b/include/clockUtils/sockets/TcpSocket.h +index 6e0d9c8..3bb97a9 100644 +--- a/include/clockUtils/sockets/TcpSocket.h ++++ b/include/clockUtils/sockets/TcpSocket.h +@@ -57,9 +57,6 @@ + #define INVALID_SOCKET -1 + #endif + +-namespace std { +- class thread; +-} /* namespace std */ + namespace clockUtils { + enum class ClockError; + namespace sockets { +diff --git a/include/clockUtils/sockets/UdpSocket.h b/include/clockUtils/sockets/UdpSocket.h +index 31eeeb5..c5da451 100644 +--- a/include/clockUtils/sockets/UdpSocket.h ++++ b/include/clockUtils/sockets/UdpSocket.h +@@ -60,10 +60,6 @@ + #define INVALID_SOCKET -1 + #endif + +-namespace std { +- class thread; +-} /* namespace std */ +- + namespace clockUtils { + enum class ClockError; + namespace sockets { diff --git a/vcpkg/ports/clockutils/portfile.cmake b/vcpkg/ports/clockutils/portfile.cmake new file mode 100644 index 0000000..7511158 --- /dev/null +++ b/vcpkg/ports/clockutils/portfile.cmake @@ -0,0 +1,40 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ClockworkOrigins/clockUtils + REF 3651f232c27074c4ceead169e223edf5f00247c5 + SHA512 ddb70cae9ced25de77a2df1854dac15e58a77347042ba3ee9c691f85f49edbc6539c84929a7477d429fb9161ba24c57d24d767793b8b1180216d5ddfc5d3ed6a + HEAD_REF dev-1.2 + PATCHES + "${CURRENT_PORT_DIR}/fix-warningC4643.patch" +) + +if (VCPKG_CRT_LINKAGE STREQUAL dynamic) + SET(SHARED_FLAG ON) +else() + SET(SHARED_FLAG OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DWITH_LIBRARY_ARGPARSER=ON + -DWITH_LIBRARY_COMPRESSION=ON + -DWITH_LIBRARY_CONTAINER=ON + -DWITH_LIBRARY_INIPARSER=ON + -DWITH_LIBRARY_SOCKETS=ON + -DWITH_TESTING=OFF + -DCLOCKUTILS_BUILD_SHARED=${SHARED_FLAG} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/clockUtils) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/clockUtils/LICENSE ${CURRENT_PACKAGES_DIR}/share/clockUtils/copyright) +file(REMOVE ${CURRENT_PACKAGES_DIR}/LICENSE) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/LICENSE) + +vcpkg_copy_pdbs() \ No newline at end of file diff --git a/vcpkg/ports/clp/CMakeLists.txt b/vcpkg/ports/clp/CMakeLists.txt new file mode 100644 index 0000000..cced65c --- /dev/null +++ b/vcpkg/ports/clp/CMakeLists.txt @@ -0,0 +1,121 @@ +cmake_minimum_required(VERSION 3.11) + +project(Clp LANGUAGES C CXX) + +set(PROJECT_VERSION 1.16.11) +set(PROJECT_VERSION_MAJOR 1) +set(PROJECT_VERSION_MINOR 16) +set(PROJECT_VERSION_PATCH 11) + +set(CMAKE_CXX_STANDARD 14) + +set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed") +set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed") +set(INSTALL_INCLUDE_DIR "include/Coin" CACHE PATH "Path where headers will be installed") +set(INSTALL_CMAKE_DIR "share/clp" CACHE PATH "Path where cmake configs will be installed") + +# Make relative paths absolute (needed later on) +set(RELATIVE_INSTALL_INCLUDE_DIR ${INSTALL_INCLUDE_DIR}) +foreach(p LIB BIN INCLUDE CMAKE) + set(var INSTALL_${p}_DIR) + if(NOT IS_ABSOLUTE "${${var}}") + set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}") + endif() +endforeach() + +if(MSVC) + set( + CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} /bigobj /MP /wd4996 /wd4819 /wd4251 /wd4267 /wd4244 /wd4275" + ) +endif() + +if(APPLE) + set( + CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -Wno-inconsistent-missing-override -Wno-unused-command-line-argument -Wno-unused-result -Wno-exceptions" + ) + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" + CACHE STRING "Minimum OS X deployment version") +endif() + +find_package(CoinUtils REQUIRED) +find_package(Osi REQUIRED) + +file(GLOB CLP_SOURCES + Clp/src/*.hpp + Clp/src/*.cpp + Clp/src/OsiClp/*.hpp + Clp/src/OsiClp/*.cpp) +file(GLOB CLP_REMOVE + Clp/src/ClpCholeskyMumps.cpp + Clp/src/ClpCholeskyUfl.cpp + Clp/src/ClpCholeskyWssmp.cpp + Clp/src/ClpCholeskyWssmpKKT.cpp + Clp/src/ClpMain.cpp + Clp/src/*Abc*.cpp + Clp/src/ClpCholeskyMumps.hpp + Clp/src/ClpCholeskyUfl.hpp + Clp/src/ClpCholeskyWssmp.hpp + Clp/src/ClpCholeskyWssmpKKT.hpp + Clp/src/ClpMain.hpp + Clp/src/*Abc*.hpp + Clp/src/*Abc*.h) +list(REMOVE_ITEM CLP_SOURCES ${CLP_REMOVE}) + +add_library(${PROJECT_NAME} ${CLP_SOURCES}) + +target_include_directories(${PROJECT_NAME} + PUBLIC + $ + $ + $) + +if(MSVC) + target_compile_definitions(${PROJECT_NAME} PRIVATE _CRT_SECURE_NO_WARNINGS) +endif() +target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_CMATH) +target_compile_definitions(${PROJECT_NAME} PUBLIC COIN_HAS_CLP) + +target_link_libraries(${PROJECT_NAME} PRIVATE Coin::CoinUtils Coin::Osi) + +install(DIRECTORY Clp/src/ + DESTINATION ${INSTALL_INCLUDE_DIR} + FILES_MATCHING + PATTERN "*.h" + PATTERN "*.hpp" + PATTERN "config_default.h" EXCLUDE) + +install(DIRECTORY Clp/src/OsiClp/ + DESTINATION ${INSTALL_INCLUDE_DIR} + FILES_MATCHING + PATTERN "*.h" + PATTERN "*.hpp" + PATTERN "config_default.h" EXCLUDE) + +install(TARGETS ${PROJECT_NAME} + EXPORT "${PROJECT_NAME}Targets" + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin) + +include(CMakePackageConfigHelpers) + +set(version_config "${CMAKE_CURRENT_BINARY_DIR}/temp/${PROJECT_NAME}ConfigVersion.cmake") +set(project_config "${CMAKE_CURRENT_BINARY_DIR}/temp/${PROJECT_NAME}Config.cmake") +set(namespace "Coin::") + +write_basic_package_version_file("${version_config}" + COMPATIBILITY SameMajorVersion) + +configure_package_config_file("Config.cmake.in" + "${project_config}" + INSTALL_DESTINATION + "${INSTALL_CMAKE_DIR}") + +install(FILES "${project_config}" "${version_config}" + DESTINATION "${INSTALL_CMAKE_DIR}") + +install(EXPORT "${PROJECT_NAME}Targets" + NAMESPACE "${namespace}" + DESTINATION "${INSTALL_CMAKE_DIR}") diff --git a/vcpkg/ports/clp/CONTROL b/vcpkg/ports/clp/CONTROL new file mode 100644 index 0000000..89ab6ce --- /dev/null +++ b/vcpkg/ports/clp/CONTROL @@ -0,0 +1,4 @@ +Source: clp +Version: 1.17.5 +Description: Clp (Coin-or linear programming) is an open-source linear programming solver written in C++. It is primarily meant to be used as a callable library, but a basic, stand-alone executable version is also available. +Build-Depends: coinutils, osi diff --git a/vcpkg/ports/clp/Config.cmake.in b/vcpkg/ports/clp/Config.cmake.in new file mode 100644 index 0000000..2c12f83 --- /dev/null +++ b/vcpkg/ports/clp/Config.cmake.in @@ -0,0 +1,5 @@ + +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") +check_required_components("@PROJECT_NAME@") diff --git a/vcpkg/ports/clp/portfile.cmake b/vcpkg/ports/clp/portfile.cmake new file mode 100644 index 0000000..d3c3b3c --- /dev/null +++ b/vcpkg/ports/clp/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO coin-or/Clp + REF 29a3d29d94f102e9029eb4be72cde2bfd378d752 # releases/1.17.5 + SHA512 29e08b631d39e77ab5b09e563011d8d707e9832179a177799387630cafd1bf08a94e5a89277b05844c7d80182be82701c284a485545bcbd63ed74466333a037a +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/clp RENAME copyright) diff --git a/vcpkg/ports/clue/CMakeLists.txt b/vcpkg/ports/clue/CMakeLists.txt new file mode 100644 index 0000000..451d414 --- /dev/null +++ b/vcpkg/ports/clue/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.5) + +project(clue VERSION 1.0.0 LANGUAGES CXX) + +option(CLUE_BUILD_TEST "Build tests for clue" OFF) +option(CLUE_BUILD_EXAMPLE "Build examples" OFF) + +include(GNUInstallDirs) +include_directories("${CMAKE_CURRENT_SOURCE_DIR}/clue.hpp") + +if(CLUE_BUILD_TEST) + file(GLOB TEST_SOURCES "tests/*.cpp") + add_executable(test_clue ${TEST_SOURCES}) + target_include_directories(test_clue PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/tests) + install(TARGETS test_clue + RUNTIME DESTINATION tools) +endif() + +if(CLUE_BUILD_EXAMPLE) + file(GLOB EXAMPLES "examples/*.cpp") + install(FILES ${EXAMPLES} DESTINATION examples) +endif() + +install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/clue.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +# end of file \ No newline at end of file diff --git a/vcpkg/ports/clue/CONTROL b/vcpkg/ports/clue/CONTROL new file mode 100644 index 0000000..dcd8080 --- /dev/null +++ b/vcpkg/ports/clue/CONTROL @@ -0,0 +1,7 @@ +Source: clue +Version: 1.0.0-alpha.7 +Homepage: https://github.com/martinmoene/clue +Description: clue is a C++03 header-only library to log messages with a severity and optional module identifier. + +Feature: test +Description: Build test \ No newline at end of file diff --git a/vcpkg/ports/clue/portfile.cmake b/vcpkg/ports/clue/portfile.cmake new file mode 100644 index 0000000..35fd822 --- /dev/null +++ b/vcpkg/ports/clue/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO martinmoene/clue + REF v1.0.0-alpha.7 + SHA512 4f0d1115dcf16412239e1ac158be210403f93596b76c91100ae81be3d4f4cb04dda525101850356a7195b219c826305a82cab7a96b1bc1e2cefaa7860a853e73 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + test CLUE_BUILD_TEST +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE_1_0.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) \ No newline at end of file diff --git a/vcpkg/ports/cmark/CONTROL b/vcpkg/ports/cmark/CONTROL new file mode 100644 index 0000000..8528ca5 --- /dev/null +++ b/vcpkg/ports/cmark/CONTROL @@ -0,0 +1,3 @@ +Source: cmark +Version: 0.29.0 +Description: CommonMark parsing and rendering library diff --git a/vcpkg/ports/cmark/portfile.cmake b/vcpkg/ports/cmark/portfile.cmake new file mode 100644 index 0000000..da7ac32 --- /dev/null +++ b/vcpkg/ports/cmark/portfile.cmake @@ -0,0 +1,44 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO commonmark/cmark + REF 0.29.0 + SHA512 06eb110cfd90c9e980c022b7588e28864d15a4da5d07d61ad4b27c6de47367492b9e58e9434e62b07517aa6dc484f17af13916808be3188f38c37d20cbf33112 + HEAD_REF master + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/rename-shared-lib.patch" +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CMARK_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" CMARK_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMARK_TESTS=OFF + -DCMARK_SHARED=${CMARK_SHARED} + -DCMARK_STATIC=${CMARK_STATIC} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/cmark RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/cmark.exe) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/cmark.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/cmark/) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/cmark) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" AND NOT EXISTS ${CURRENT_PACKAGES_DIR}/bin/cmark) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +else() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/cmark.exe ${CURRENT_PACKAGES_DIR}/debug/bin/cmark.exe) +endif() diff --git a/vcpkg/ports/cmark/rename-shared-lib.patch b/vcpkg/ports/cmark/rename-shared-lib.patch new file mode 100644 index 0000000..79439aa --- /dev/null +++ b/vcpkg/ports/cmark/rename-shared-lib.patch @@ -0,0 +1,12 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index d5a1936..acff569 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -83,7 +83,6 @@ if (CMARK_SHARED) + add_library(${LIBRARY} SHARED ${LIBRARY_SOURCES}) + # Include minor version and patch level in soname for now. + set_target_properties(${LIBRARY} PROPERTIES +- OUTPUT_NAME "cmark" + SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH} + VERSION ${PROJECT_VERSION}) + diff --git a/vcpkg/ports/cmcstl2/CONTROL b/vcpkg/ports/cmcstl2/CONTROL new file mode 100644 index 0000000..42b652c --- /dev/null +++ b/vcpkg/ports/cmcstl2/CONTROL @@ -0,0 +1,4 @@ +Source: cmcstl2 +Version: 2019-07-20 +Description: An implementation of C++ Extensions for Ranges +Homepage: https://github.com/CaseyCarter/cmcstl2 diff --git a/vcpkg/ports/cmcstl2/portfile.cmake b/vcpkg/ports/cmcstl2/portfile.cmake new file mode 100644 index 0000000..e2a0b9a --- /dev/null +++ b/vcpkg/ports/cmcstl2/portfile.cmake @@ -0,0 +1,31 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO CaseyCarter/cmcstl2 + REF cca84b9fd362ea37334ccbe09a66be4121768ac9 + SHA512 a528dda26964a8c29f2bf7ddb24a861f337246e9ab2bda19f62d4ca107951aa77e37070623db3b5574973404ccf2f201bc2020654b3d53de36d8a22de521e5b9 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSTL2_BUILD_EXAMPLES=OFF + -DSTL2_BUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/vcpkg/ports/cmocka/portfile.cmake b/vcpkg/ports/cmocka/portfile.cmake new file mode 100644 index 0000000..220868e --- /dev/null +++ b/vcpkg/ports/cmocka/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.com + OUT_SOURCE_PATH SOURCE_PATH + REPO cmocka/cmocka + REF 672c5cee79eb412025c3dd8b034e611c1f119055 + SHA512 e02ffe780698ce3930aceb1b927f7d48c932c6bb251a32b1f4ab44ecb4ff6bfe5c2a6b9e2dfede49cd4cc1d68a8bb903ef1d26c28536abf3581a9d803287aa0a + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DWITH_CMOCKERY_SUPPORT=ON + -DUNIT_TESTING=OFF + -DWITH_EXAMPLES=OFF + -DPICKY_DEVELOPER=OFF +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/cmocka/vcpkg.json b/vcpkg/ports/cmocka/vcpkg.json new file mode 100644 index 0000000..d7bcbcf --- /dev/null +++ b/vcpkg/ports/cmocka/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "cmocka", + "version-string": "2020-08-01", + "description": "An elegant unit testing framework for C with support for mock objects", + "homepage": "https://cmocka.org/", + "license": "Apache-2.0" +} diff --git a/vcpkg/ports/cnl/CONTROL b/vcpkg/ports/cnl/CONTROL new file mode 100644 index 0000000..8daea5a --- /dev/null +++ b/vcpkg/ports/cnl/CONTROL @@ -0,0 +1,3 @@ +Source: cnl +Version: 2019-06-23 +Description: A Compositional Numeric Library for C++ diff --git a/vcpkg/ports/cnl/portfile.cmake b/vcpkg/ports/cnl/portfile.cmake new file mode 100644 index 0000000..885cad1 --- /dev/null +++ b/vcpkg/ports/cnl/portfile.cmake @@ -0,0 +1,28 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO johnmcfarlane/cnl + REF 48428242e72b8239cb14c963e40f724929d54df7 + SHA512 c7e012d99409977137a44915dd7a4df5014b6e8540ceee3e82492052541ce77a254d79e624d766b510e7d3a6b17a9d9b02391c6993ae55d3904334116e747983 + HEAD_REF develop +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE_1_0.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/vcpkg/ports/coin/CONTROL b/vcpkg/ports/coin/CONTROL new file mode 100644 index 0000000..9f6ae24 --- /dev/null +++ b/vcpkg/ports/coin/CONTROL @@ -0,0 +1,31 @@ +Source: coin +Version: 4.0.0 +Description: A high-level 3D visualization library with Open Inventor 2.1 API +Build-Depends: boost-assert, boost-config, boost-lexical-cast, boost-math, boost-smart-ptr, boost-static-assert +Homepage: https://github.com/coin3d/coin +Default-Features: simage, zlib +Supports: !(arm|arm64|uwp) + +Feature: bzip2 +Build-Depends: bzip2, freetype[bzip2] +Description: Support bzip2 compressed fonts + +Feature: fontconfig +Build-Depends: fontconfig +Description: Use fontconfig for font support + +Feature: freetype +Build-Depends: freetype +Description: Use freetype for font support + +Feature: openal +Build-Depends: openal-soft +Description: Use OpenAL for sound support in VRML97 + +Feature: simage +Build-Depends: simage +Description: Use simage for loading images (textures), audio, and animations + +Feature: zlib +Build-Depends: zlib +Description: Use zlib for reading/writing compressed files diff --git a/vcpkg/ports/coin/disable-cpackd.patch b/vcpkg/ports/coin/disable-cpackd.patch new file mode 100644 index 0000000..81afeb6 --- /dev/null +++ b/vcpkg/ports/coin/disable-cpackd.patch @@ -0,0 +1,10 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f32f6ffe3..639fc4109 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -815,4 +815,4 @@ endif() + + # ############################################################################ + # New CPACK section, please see the README file inside cpack.d directory. +-add_subdirectory(cpack.d) ++#add_subdirectory(cpack.d) diff --git a/vcpkg/ports/coin/portfile.cmake b/vcpkg/ports/coin/portfile.cmake new file mode 100644 index 0000000..8039845 --- /dev/null +++ b/vcpkg/ports/coin/portfile.cmake @@ -0,0 +1,43 @@ +vcpkg_fail_port_install(ON_TARGET "UWP" ON_ARCH "arm" "arm64") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Coin3D/coin + REF Coin-4.0.0 + SHA512 8a0289cab3e02a7417022fe659ec30a2dd705b9bacb254e0269ada9155c76c6aea0285c475cd6e663f5d7f2b49e60244b16baac7188d57e3d7f8ab08d228f21f + HEAD_REF master + PATCHES + disable-cpackd.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(COIN_BUILD_MSVC_STATIC_RUNTIME ON) + set(COIN_BUILD_SHARED_LIBS OFF) +else() + set(COIN_BUILD_MSVC_STATIC_RUNTIME OFF) + set(COIN_BUILD_SHARED_LIBS ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCOIN_BUILD_DOCUMENTATION=OFF + -DCOIN_BUILD_MSVC_STATIC_RUNTIME=${COIN_BUILD_MSVC_STATIC_RUNTIME} + -DCOIN_BUILD_SHARED_LIBS=${COIN_BUILD_SHARED_LIBS} + -DCOIN_BUILD_TESTS=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Coin-4.0.0) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/Coin/profiler) diff --git a/vcpkg/ports/coinutils/CMakeLists.txt b/vcpkg/ports/coinutils/CMakeLists.txt new file mode 100644 index 0000000..643bbec --- /dev/null +++ b/vcpkg/ports/coinutils/CMakeLists.txt @@ -0,0 +1,95 @@ +cmake_minimum_required(VERSION 3.11) + +project(CoinUtils LANGUAGES C CXX) + +set(PROJECT_VERSION 2.10.14) +set(PROJECT_VERSION_MAJOR 2) +set(PROJECT_VERSION_MINOR 10) +set(PROJECT_VERSION_PATCH 14) + +set(CMAKE_CXX_STANDARD 14) + +set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed") +set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed") +set(INSTALL_INCLUDE_DIR "include/Coin" CACHE PATH "Path where headers will be installed") +set(INSTALL_CMAKE_DIR "share/coinutils" CACHE PATH "Path where cmake configs will be installed") + +# Make relative paths absolute (needed later on) +set(RELATIVE_INSTALL_INCLUDE_DIR ${INSTALL_INCLUDE_DIR}) +foreach(p LIB BIN INCLUDE CMAKE) + set(var INSTALL_${p}_DIR) + if(NOT IS_ABSOLUTE "${${var}}") + set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}") + endif() +endforeach() + +if(MSVC) + set( + CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} /bigobj /MP /wd4996 /wd4819 /wd4251 /wd4267 /wd4244 /wd4275" + ) +endif() + +if(APPLE) + set( + CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -Wno-inconsistent-missing-override -Wno-unused-command-line-argument -Wno-unused-result -Wno-exceptions" + ) + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" + CACHE STRING "Minimum OS X deployment version") +endif() + +include(CheckIncludeFileCXX) +include(CheckIncludeFile) +check_include_file_cxx("cmath" HAVE_CMATH) +check_include_file_cxx("cfloat" HAVE_CFLOAT) +if(NOT HAVE_CMATH OR NOT HAVE_CFLOAT) + message(FATAL_ERROR "Missing necessary include files, like cmath or cfloat") +endif() + +file(GLOB UTILS_SOURCES + CoinUtils/src/*.hpp + CoinUtils/src/*.cpp + CoinUtils/src/*.h) + +add_library(${PROJECT_NAME} ${UTILS_SOURCES}) + +target_include_directories(${PROJECT_NAME} PUBLIC $ $) + +if(MSVC) + target_compile_definitions(${PROJECT_NAME} PRIVATE _CRT_SECURE_NO_WARNINGS) +endif() +target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_CMATH HAVE_CFLOAT) + +install(DIRECTORY CoinUtils/src/ + DESTINATION ${INSTALL_INCLUDE_DIR} + FILES_MATCHING + PATTERN "*.h" + PATTERN "*.hpp") + +install(TARGETS ${PROJECT_NAME} + EXPORT "${PROJECT_NAME}Targets" + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin) + +include(CMakePackageConfigHelpers) + +set(version_config "${CMAKE_CURRENT_BINARY_DIR}/temp/${PROJECT_NAME}ConfigVersion.cmake") +set(project_config "${CMAKE_CURRENT_BINARY_DIR}/temp/${PROJECT_NAME}Config.cmake") +set(namespace "Coin::") + +write_basic_package_version_file("${version_config}" + COMPATIBILITY SameMajorVersion) + +configure_package_config_file("Config.cmake.in" + "${project_config}" + INSTALL_DESTINATION + "${INSTALL_CMAKE_DIR}") + +install(FILES "${project_config}" "${version_config}" + DESTINATION "${INSTALL_CMAKE_DIR}") + +install(EXPORT "${PROJECT_NAME}Targets" + NAMESPACE "${namespace}" + DESTINATION "${INSTALL_CMAKE_DIR}") diff --git a/vcpkg/ports/coinutils/CONTROL b/vcpkg/ports/coinutils/CONTROL new file mode 100644 index 0000000..a242265 --- /dev/null +++ b/vcpkg/ports/coinutils/CONTROL @@ -0,0 +1,3 @@ +Source: coinutils +Version: 2.11.4 +Description: CoinUtils (Coin-or Utilities) is an open-source collection of classes and functions that are generally useful to more than one COIN-OR project diff --git a/vcpkg/ports/coinutils/Config.cmake.in b/vcpkg/ports/coinutils/Config.cmake.in new file mode 100644 index 0000000..2c12f83 --- /dev/null +++ b/vcpkg/ports/coinutils/Config.cmake.in @@ -0,0 +1,5 @@ + +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") +check_required_components("@PROJECT_NAME@") diff --git a/vcpkg/ports/coinutils/portfile.cmake b/vcpkg/ports/coinutils/portfile.cmake new file mode 100644 index 0000000..2ca06eb --- /dev/null +++ b/vcpkg/ports/coinutils/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO coin-or/CoinUtils + REF f709081c9b57cc2dd32579d804b30689ca789982 # releases/2.11.4 + SHA512 1c2e7f796524d67d87253bc7938c1a6db3c8266acec6b6399aeb83c0fb253b77507e6b5e84f16b0b8e40098aef94676499f396d1c7f653b1e04cbadca7620185 +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/coinutils RENAME copyright) diff --git a/vcpkg/ports/collada-dom/CONTROL b/vcpkg/ports/collada-dom/CONTROL new file mode 100644 index 0000000..cd5bcce --- /dev/null +++ b/vcpkg/ports/collada-dom/CONTROL @@ -0,0 +1,4 @@ +Source: collada-dom +Version: 2.5.0-3 +Description: The COLLADA Document Object Model (DOM) is an application programming interface (API) that provides a C++ object representation of a COLLADA XML instance document. +Build-Depends: zlib, libxml2, minizip, pcre, uriparser, boost-filesystem, boost-system diff --git a/vcpkg/ports/collada-dom/portfile.cmake b/vcpkg/ports/collada-dom/portfile.cmake new file mode 100644 index 0000000..fd29562 --- /dev/null +++ b/vcpkg/ports/collada-dom/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rdiankov/collada-dom + REF d37ae7532e350b87c88712e9f6ab4b1f440d20cd + SHA512 cb923d296219765096f5246cc7a2b69712931f58171ae885dbdbd215fca86d911c34d12748d3304d6a5a350dc737ff0caead2495acac488af5431b437cbacc7d + HEAD_REF v2.5.0 + PATCHES + vs-version-detection.patch + use-uriparser.patch + use-vcpkg-minizip.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/collada_dom-2.5) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/licenses/license_e.txt DESTINATION + ${CURRENT_PACKAGES_DIR}/share/collada-dom + RENAME copyright) diff --git a/vcpkg/ports/collada-dom/use-uriparser.patch b/vcpkg/ports/collada-dom/use-uriparser.patch new file mode 100644 index 0000000..6de0662 --- /dev/null +++ b/vcpkg/ports/collada-dom/use-uriparser.patch @@ -0,0 +1,127 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3ec1527..3f044d3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -237,23 +237,29 @@ else() + set(MINIZIP_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/dom/external-libs/minizip-1.1 ${ZLIB_INCLUDE_DIR}) + endif() + +-pkg_check_modules(liburiparser liburiparser) +- +-if(liburiparser_FOUND) +- set(liburiparser_CFLAGS_OTHERS "-DUSE_URIPARSER") ++find_package(UriParser) ++if(URIPARSER_FOUND) ++ set(URIPARSER_CFLAGS_OTHERS "-DUSE_URIPARSER") ++ set(URIPARSER_LIBRARIES ${URIPARSER_LIBRARY}) ++ message(STATUS "liburiparser found") + else() +- # try using pcrecpp +- pkg_check_modules(libpcrecpp libpcrecpp) +- if( libpcrecpp_FOUND ) ++ pkg_check_modules(liburiparser liburiparser) ++ if(liburiparser_FOUND) ++ set(URIPARSER_CFLAGS_OTHERS "-DUSE_URIPARSER") ++ message(STATUS "liburiparser found") ++ else() ++ # try using pcrecpp ++ pkg_check_modules(libpcrecpp libpcrecpp) ++ if( libpcrecpp_FOUND ) + set(CMAKE_REQUIRED_INCLUDES ${libpcrecpp_INCLUDE_DIRS}) + check_include_file_cxx(pcrecpp.h HAVE_PCRECPP_H) + set(CMAKE_REQUIRED_INCLUDES) + if( NOT HAVE_PCRECPP_H ) +- set(libpcrecpp_FOUND 0) ++ set(libpcrecpp_FOUND 0) ++ endif() + endif() +- endif() + +- if( NOT libpcrecpp_FOUND ) ++ if( NOT libpcrecpp_FOUND ) + message(STATUS "System pcre not found, using local from sources") + # include the local pcre + add_subdirectory(dom/external-libs/pcre-8.02) +@@ -262,6 +268,7 @@ else() + set(libpcrecpp_LIBRARIES pcrecpp_local) + set(libpcrecpp_CFLAGS_OTHERS "-DPCRE_STATIC") + set(libpcrecpp_LDFLAGS_OTHERS) ++ endif() + endif() + endif() + +diff --git a/cmake-modules/FindUriParser.cmake b/cmake-modules/FindUriParser.cmake +new file mode 100644 +index 0000000..91f466b +--- /dev/null ++++ b/cmake-modules/FindUriParser.cmake +@@ -0,0 +1,35 @@ ++# Find the UriParser library ++# Defines: ++ ++# URIPARSER_INCLUDE_DIR - uriparser include directory ++# URIPARSER_LIBRARY - uriparser library file ++# URIPARSER_FOUND - TRUE if uriparser is found ++ ++if (URIPARSER_INCLUDE_DIR) ++ #check cache ++ set(URIPARSER_FIND_QUIETLY TRUE) ++endif () ++ ++if (NOT URIPARSER_INCLUDE_DIR) ++ find_path(URIPARSER_INCLUDE_DIR NAMES Uri.h PATH_SUFFIXES uriparser) ++ set(URIPARSER_INCLUDE_DIR ${URIPARSER_INCLUDE_DIR}/uriparser CACHE PATH "uriparser includes") ++endif () ++ ++find_library(URIPARSER_LIBRARY NAMES uriparser) ++ ++if (URIPARSER_INCLUDE_DIR AND URIPARSER_LIBRARY) ++ set(URIPARSER_FOUND TRUE) ++ set(UriParser_FOUND TRUE) ++endif () ++ ++if (URIPARSER_FOUND) ++ if (NOT URIPARSER_FIND_QUIETLY) ++ message(STATUS "Found UriParser library: ${URIPARSER_LIBRARY}") ++ endif () ++else () ++ if (NOT URIPARSER_FIND_QUIETLY) ++ message(FATAL_ERROR "Could NOT find UriParser library") ++ else () ++ message(STATUS "Could NOT find UriParser library") ++ endif () ++endif () +diff --git a/dom/CMakeLists.txt b/dom/CMakeLists.txt +index f7ffb27..62e1b8a 100644 +--- a/dom/CMakeLists.txt ++++ b/dom/CMakeLists.txt +@@ -1,6 +1,6 @@ + set(COLLADA_INTERNAL_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/include) + include_directories(${COLLADA_INTERNAL_INCLUDE}) +-set(COLLADA_LIBS minizip ${liburiparser_LIBRARIES} ${libpcrecpp_LIBRARIES} ${ZLIB_LIBRARIES} ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY}) ++set(COLLADA_LIBS minizip ${URIPARSER_LIBRARIES} ${libpcrecpp_LIBRARIES} ${ZLIB_LIBRARIES} ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY}) + + file(GLOB dae_files ${CMAKE_CURRENT_SOURCE_DIR}/src/dae/*.cpp) + if( LIBXML2_FOUND ) +@@ -13,7 +13,7 @@ file(GLOB stddatabase_files ${CMAKE_CURRENT_SOURCE_DIR}/src/modules/STLDatabase/ + file(GLOB stderrplugin_files ${CMAKE_CURRENT_SOURCE_DIR}/src/modules/stdErrPlugin/*.cpp) + + set(COLLADA_BASE_SOURCES ${dae_files} ${libxmlplugin_files} ${stddatabase_files} ${stderrplugin_files}) +-set(COLLADA_COMPILE_FLAGS "${liburiparser_CFLAGS_OTHERS} ${libpcrecpp_CFLAGS_OTHERS} ${EXTRA_COMPILE_FLAGS} ${Boost_CFLAGS}") ++set(COLLADA_COMPILE_FLAGS "${URIPARSER_CFLAGS_OTHERS} ${libpcrecpp_CFLAGS_OTHERS} ${EXTRA_COMPILE_FLAGS} ${Boost_CFLAGS}") + # create dynamic libraries + set(COLLADA_COMPILE_FLAGS "${COLLADA_COMPILE_FLAGS} -DDOM_DYNAMIC -DDOM_EXPORT") + +diff --git a/dom/src/dae/daeURI.cpp b/dom/src/dae/daeURI.cpp +index 3a8f815..1623753 100644 +--- a/dom/src/dae/daeURI.cpp ++++ b/dom/src/dae/daeURI.cpp +@@ -790,7 +790,7 @@ bool cdom::parseUriRef(const string& uriRef, + scheme = fromRange(uri.scheme); + authority = fromRange(uri.hostText); + path = fromList(uri.pathHead, "/"); +- if (uri.absolutePath != URI_TRUE and uri.hostText.first == NULL) ++ if (uri.absolutePath != URI_TRUE && uri.hostText.first == NULL) + path = path.erase(0, 1); + query = fromRange(uri.query); + fragment = fromRange(uri.fragment); diff --git a/vcpkg/ports/collada-dom/use-vcpkg-minizip.patch b/vcpkg/ports/collada-dom/use-vcpkg-minizip.patch new file mode 100644 index 0000000..daaaf0f --- /dev/null +++ b/vcpkg/ports/collada-dom/use-vcpkg-minizip.patch @@ -0,0 +1,13 @@ +diff --git a/dom/src/modules/LIBXMLPlugin/daeLIBXMLPlugin.cpp b/dom/src/modules/LIBXMLPlugin/daeLIBXMLPlugin.cpp +index 4536275..77651f9 100644 +--- a/dom/src/modules/LIBXMLPlugin/daeLIBXMLPlugin.cpp ++++ b/dom/src/modules/LIBXMLPlugin/daeLIBXMLPlugin.cpp +@@ -32,7 +32,7 @@ + #include + using namespace std; + +-#include // for saving compressed files ++#include // for saving compressed files + #ifdef _WIN32 + #include + #else diff --git a/vcpkg/ports/collada-dom/vs-version-detection.patch b/vcpkg/ports/collada-dom/vs-version-detection.patch new file mode 100644 index 0000000..7379f33 --- /dev/null +++ b/vcpkg/ports/collada-dom/vs-version-detection.patch @@ -0,0 +1,39 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2596a23..3ec1527 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required (VERSION 2.6.0) ++cmake_minimum_required (VERSION 3.7.0) + project (collada-dom) + set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE ) + +@@ -89,14 +89,22 @@ string(TOUPPER ${COMPONENT_PREFIX} COMPONENT_PREFIX_UPPER) + set(CPACK_COMPONENTS_ALL ${COMPONENT_PREFIX}-base ${COMPONENT_PREFIX}-dev) + + if( MSVC ) +- if( MSVC70 OR MSVC71 ) +- set(MSVC_PREFIX "vc70") +- elseif( MSVC80 ) +- set(MSVC_PREFIX "vc80") +- elseif( MSVC90 ) ++ if( MSVC_VERSION GREATER_EQUAL 1910 ) ++ set(MSVC_PREFIX "vc140") ++ elseif( MSVC_VERSION GREATER_EQUAL 1900 ) ++ set(MSVC_PREFIX "vc130") ++ elseif( MSVC_VERSION GREATER_EQUAL 1800 ) ++ set(MSVC_PREFIX "vc120") ++ elseif( MSVC_VERSION GREATER_EQUAL 1700 ) ++ set(MSVC_PREFIX "vc110") ++ elseif( MSVC_VERSION GREATER_EQUAL 1600 ) ++ set(MSVC_PREFIX "vc100") ++ elseif( MSVC_VERSION GREATER_EQUAL 1500 ) + set(MSVC_PREFIX "vc90") ++ elseif( MSVC_VERSION GREATER_EQUAL 1400 ) ++ set(MSVC_PREFIX "vc80") + else() +- set(MSVC_PREFIX "vc100") ++ set(MSVC_PREFIX "vc70") + endif() + set(COLLADA_DOM_LIBRARY_SUFFIX "${COLLADA_DOM_SOVERSION}-${COLLADA_PRECISION}-${MSVC_PREFIX}-mt") + else() diff --git a/vcpkg/ports/colmap/portfile.cmake b/vcpkg/ports/colmap/portfile.cmake new file mode 100644 index 0000000..6b9bf32 --- /dev/null +++ b/vcpkg/ports/colmap/portfile.cmake @@ -0,0 +1,89 @@ +set(COLMAP_REF "3.6") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO colmap/colmap + REF ${COLMAP_REF} + SHA512 9a4b4f2a49891ce8ac32ab1f2e9b859336326bada889e6de49c017a069884bb6c8ab8a2ae430d955e58fc22377c63e8fba9ce80ff959713e2878e29814d44632 + HEAD_REF dev +) + +if (NOT TRIPLET_SYSTEM_ARCH STREQUAL "x64" AND ("cuda" IN_LIST FEATURES OR "cuda-redist" IN_LIST FEATURES)) + message(FATAL_ERROR "Feature cuda and cuda-redist require x64 triplet.") +endif() + +# set GIT_COMMIT_ID and GIT_COMMIT_DATE +if(DEFINED VCPKG_HEAD_VERSION) + set(GIT_COMMIT_ID "${VCPKG_HEAD_VERSION}") +else() + set(GIT_COMMIT_ID "${COLMAP_REF}") +endif() + +string(TIMESTAMP COLMAP_GIT_COMMIT_DATE "%Y-%m-%d") + +set(CUDA_ENABLED OFF) +set(TESTS_ENABLED OFF) + +if("cuda" IN_LIST FEATURES) + set(CUDA_ENABLED ON) +endif() + +if("cuda-redist" IN_LIST FEATURES) + set(CUDA_ENABLED ON) + set(CUDA_ARCHS "Common") +endif() + +if("tests" IN_LIST FEATURES) + set(TESTS_ENABLED ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCUDA_ENABLED=${CUDA_ENABLED} + -DCUDA_ARCHS=${CUDA_ARCHS} + -DTESTS_ENABLED=${TESTS_ENABLED} + -DGIT_COMMIT_ID=${GIT_COMMIT_ID} + -DGIT_COMMIT_DATE=${COLMAP_GIT_COMMIT_DATE} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets() + +file(GLOB TOOL_FILENAMES "${CURRENT_PACKAGES_DIR}/bin/*") +foreach(TOOL_FILENAME ${TOOL_FILENAMES}) + get_filename_component(TEST_TOOL_NAME ${TOOL_FILENAME} NAME_WLE) + list(APPEND COLMAP_TOOL_NAMES "${TEST_TOOL_NAME}") +endforeach() + +vcpkg_copy_tools(TOOL_NAMES ${COLMAP_TOOL_NAMES} AUTO_CLEAN) + +# remove empty folders and unused files +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/debug/include/colmap/exe + ${CURRENT_PACKAGES_DIR}/debug/include/colmap/lib/Graclus/multilevelLib + ${CURRENT_PACKAGES_DIR}/debug/include/colmap/tools + ${CURRENT_PACKAGES_DIR}/debug/include/colmap/ui/media + ${CURRENT_PACKAGES_DIR}/debug/include/colmap/ui/shaders + ${CURRENT_PACKAGES_DIR}/include/colmap/exe + ${CURRENT_PACKAGES_DIR}/include/colmap/lib/Graclus/multilevelLib + ${CURRENT_PACKAGES_DIR}/include/colmap/tools + ${CURRENT_PACKAGES_DIR}/include/colmap/ui/media + ${CURRENT_PACKAGES_DIR}/include/colmap/ui/shaders + ${CURRENT_PACKAGES_DIR}/COLMAP.bat + ${CURRENT_PACKAGES_DIR}/RUN_TESTS.bat + ${CURRENT_PACKAGES_DIR}/debug/COLMAP.bat + ${CURRENT_PACKAGES_DIR}/debug/RUN_TESTS.bat + ${CURRENT_PACKAGES_DIR}/debug/bin +) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) diff --git a/vcpkg/ports/colmap/usage b/vcpkg/ports/colmap/usage new file mode 100644 index 0000000..b71316b --- /dev/null +++ b/vcpkg/ports/colmap/usage @@ -0,0 +1,10 @@ +For example, under Windows, execute COLMAP as: + + \packages\colmap_\tools\colmap\colmap.exe gui + \packages\colmap_\tools\colmap\colmap.exe mapper + \packages\colmap_\tools\colmap\colmap.exe ... + +The package colmap provides CMake integration: + + find_package(COLMAP REQUIRED) + target_link_libraries(main ${COLMAP_LIBRARIES}) diff --git a/vcpkg/ports/colmap/vcpkg.json b/vcpkg/ports/colmap/vcpkg.json new file mode 100644 index 0000000..6feee3e --- /dev/null +++ b/vcpkg/ports/colmap/vcpkg.json @@ -0,0 +1,52 @@ +{ + "name": "colmap", + "version-string": "3.6", + "description": "COLMAP is a general-purpose Structure-from-Motion (SfM) and Multi-View Stereo (MVS) pipeline with a graphical and command-line interface. It offers a wide range of features for reconstruction of ordered and unordered image collections. The software is licensed under the new BSD license.", + "homepage": "https://colmap.github.io/", + "license": "BSD-3-Clause", + "dependencies": [ + "boost-filesystem", + "boost-graph", + "boost-program-options", + "boost-regex", + "boost-system", + "boost-test", + { + "name": "ceres", + "features": [ + "lapack", + "suitesparse" + ] + }, + { + "name": "cgal", + "features": [ + "qt" + ] + }, + "eigen3", + "freeimage", + "gflags", + "glew", + "glog", + "qt5-base", + "suitesparse" + ], + "features": { + "cuda": { + "description": "CUDA support for current compute architecture of this machine.", + "dependencies": [ + "cuda" + ] + }, + "cuda-redist": { + "description": "Redistributable CUDA support for common supported compute architectures.", + "dependencies": [ + "cuda" + ] + }, + "tests": { + "description": "Enable TESTS." + } + } +} diff --git a/vcpkg/ports/concurrentqueue/CMakeLists.txt b/vcpkg/ports/concurrentqueue/CMakeLists.txt new file mode 100644 index 0000000..99de841 --- /dev/null +++ b/vcpkg/ports/concurrentqueue/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.5) +project(concurrentqueue C) + +add_library(concurrentqueue INTERFACE) + +target_include_directories(concurrentqueue INTERFACE $ $) + +install(TARGETS concurrentqueue + EXPORT concurrentqueue +) +install(EXPORT concurrentqueue FILE unofficial-concurrentqueue-targets.cmake NAMESPACE unofficial::concurrentqueue:: DESTINATION share/unofficial-concurrentqueue) diff --git a/vcpkg/ports/concurrentqueue/CONTROL b/vcpkg/ports/concurrentqueue/CONTROL new file mode 100644 index 0000000..c39dd43 --- /dev/null +++ b/vcpkg/ports/concurrentqueue/CONTROL @@ -0,0 +1,4 @@ +Source: concurrentqueue +Version: 1.0.2 +Homepage: https://github.com/cameron314/concurrentqueue +Description: A fast multi-producer, multi-consumer lock-free concurrent queue for C++11 diff --git a/vcpkg/ports/concurrentqueue/portfile.cmake b/vcpkg/ports/concurrentqueue/portfile.cmake new file mode 100644 index 0000000..9ca4ee2 --- /dev/null +++ b/vcpkg/ports/concurrentqueue/portfile.cmake @@ -0,0 +1,31 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cameron314/concurrentqueue + REF v1.0.2 + SHA512 9f5e42c0956d142741be3772cbf49a22179e78571df0e5c680a48ff46b9228981c7d5ca56ee77ae6e1bf2396c4a81f12cb72cfdd689219a6346fa29f6f9ea866 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-concurrentqueue TARGET_PATH share/unofficial-concurrentqueue) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/unofficial-concurrentqueue-config.in.cmake + ${CURRENT_PACKAGES_DIR}/share/unofficial-concurrentqueue/unofficial-concurrentqueue-config.cmake + @ONLY +) + +file(GLOB HEADER_FILES ${SOURCE_PATH}/*.h) +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/concurrentqueue/unofficial-concurrentqueue-config.in.cmake b/vcpkg/ports/concurrentqueue/unofficial-concurrentqueue-config.in.cmake new file mode 100644 index 0000000..c363963 --- /dev/null +++ b/vcpkg/ports/concurrentqueue/unofficial-concurrentqueue-config.in.cmake @@ -0,0 +1,6 @@ +if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static" AND NOT WIN32) + include(CMakeFindDependencyMacro) + find_dependency(Threads) +endif() + +include(${CMAKE_CURRENT_LIST_DIR}/unofficial-concurrentqueue-targets.cmake) \ No newline at end of file diff --git a/vcpkg/ports/console-bridge/CONTROL b/vcpkg/ports/console-bridge/CONTROL new file mode 100644 index 0000000..5ff52be --- /dev/null +++ b/vcpkg/ports/console-bridge/CONTROL @@ -0,0 +1,4 @@ +Source: console-bridge +Version: 0.4.4 +Homepage: https://github.com/ros/console_bridge +Description: a ROS-independent package for logging that seamlessly pipes into rosconsole/rosout for ROS-dependent packages. diff --git a/vcpkg/ports/console-bridge/portfile.cmake b/vcpkg/ports/console-bridge/portfile.cmake new file mode 100644 index 0000000..a8625ef --- /dev/null +++ b/vcpkg/ports/console-bridge/portfile.cmake @@ -0,0 +1,40 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ros/console_bridge + REF 3b5b110c224502acdfae621e790caca565173e91 # 0.4.4 + SHA512 fd6439d3cd428d76b6ec34c9a5301fd06b5dcb9c5cafcd86c927e990ba75ebcde7aceca5d3ad1d0334e4fc48b825b6dc4a15116e4934a783dc16776540b4a90c + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake TARGET_PATH share/console_bridge) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/console_bridge/cmake TARGET_PATH share/console_bridge) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/console_bridge) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/console_bridge) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(READ ${SOURCE_PATH}/src/console.cpp _contents) +string(SUBSTRING "${_contents}" 0 2000 license) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/console-bridge) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/console-bridge/copyright "${license}") + +file(READ ${CURRENT_PACKAGES_DIR}/include/console_bridge_export.h _contents) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "ifdef CONSOLE_BRIDGE_STATIC_DEFINE" "if 1" _contents "${_contents}") +else() + string(REPLACE "ifdef CONSOLE_BRIDGE_STATIC_DEFINE" "if 0" _contents "${_contents}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/console_bridge_export.h "${_contents}") diff --git a/vcpkg/ports/constexpr-contracts/CONTROL b/vcpkg/ports/constexpr-contracts/CONTROL new file mode 100644 index 0000000..515b9b2 --- /dev/null +++ b/vcpkg/ports/constexpr-contracts/CONTROL @@ -0,0 +1,4 @@ +Source: constexpr-contracts +Version: 2020-08-09 +Homepage: https://github.com/cjdb/constexpr-contracts +Description: A constexpr-friendly, optimisation-friendly contracts library. diff --git a/vcpkg/ports/constexpr-contracts/portfile.cmake b/vcpkg/ports/constexpr-contracts/portfile.cmake new file mode 100644 index 0000000..d189ba4 --- /dev/null +++ b/vcpkg/ports/constexpr-contracts/portfile.cmake @@ -0,0 +1,20 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cjdb/constexpr-contracts + REF 58154e9010cb80aad4e95ef6f1835ebd7db3780a # commit 2020-05-25 + SHA512 b634267a4044cd712c8e52f65cd305f437864cab591f2b22104581f70b305ba52889dd46724e6047386463a010ee78fdd951411ea3691b5725d52d13f7adda76 + HEAD_REF main +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/constexpr-contracts) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/constexpr/CONTROL b/vcpkg/ports/constexpr/CONTROL new file mode 100644 index 0000000..78dc70a --- /dev/null +++ b/vcpkg/ports/constexpr/CONTROL @@ -0,0 +1,4 @@ +Source: constexpr +Version: 1.0-1 +Homepage: https://github.com/elbeno/constexpr +Description: Small MIT License Library of general stdlib functions written as C++11 constexpr functions. diff --git a/vcpkg/ports/constexpr/portfile.cmake b/vcpkg/ports/constexpr/portfile.cmake new file mode 100644 index 0000000..e56b57e --- /dev/null +++ b/vcpkg/ports/constexpr/portfile.cmake @@ -0,0 +1,18 @@ +#header-only library +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO elbeno/constexpr + REF a98b1db39c909e0130d21d3910d4faf97035a625 + SHA512 8802ee43b510ea1f0c00949eecd84eb2bf3ac721802e6bc6755db9e6e2742d8b97fef427eca7d4d9a282c60a18ca10401386022eac995bd22624f45e3fc2c370 + HEAD_REF master +) + +# Put the licence file where vcpkg expects it +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/constexpr/LICENSE) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/constexpr/LICENSE ${CURRENT_PACKAGES_DIR}/share/constexpr/copyright) + +# Copy the constexpr header files +file(GLOB HEADER_FILES ${SOURCE_PATH}/src/include/*.h) +file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/vcpkg/ports/coolprop/CONTROL b/vcpkg/ports/coolprop/CONTROL new file mode 100644 index 0000000..ed0612b --- /dev/null +++ b/vcpkg/ports/coolprop/CONTROL @@ -0,0 +1,5 @@ +Source: coolprop +Version: 6.4.1 +Homepage: https://github.com/CoolProp/CoolProp +Description: Thermophysical properties for the masses +Build-Depends: catch, eigen3, pybind11, if97, fmt, rapidjson, msgpack, refprop-headers diff --git a/vcpkg/ports/coolprop/fix-builderror.patch b/vcpkg/ports/coolprop/fix-builderror.patch new file mode 100644 index 0000000..0c2f9c4 --- /dev/null +++ b/vcpkg/ports/coolprop/fix-builderror.patch @@ -0,0 +1,13 @@ +diff --git a/src/ODEIntegrators.cpp b/src/ODEIntegrators.cpp +index 4152f01..e5986ca 100644 +--- a/src/ODEIntegrators.cpp ++++ b/src/ODEIntegrators.cpp +@@ -4,6 +4,8 @@ + #include "CPstrings.h" + #include "Exceptions.h" + #include ++#undef max ++#undef min + + bool ODEIntegrators::AdaptiveRK54(AbstractODEIntegrator &ode, double tstart, double tend, double hmin, double hmax, double eps_allowed, double step_relax) + { diff --git a/vcpkg/ports/coolprop/fix-dependency.patch b/vcpkg/ports/coolprop/fix-dependency.patch new file mode 100644 index 0000000..69d3f18 --- /dev/null +++ b/vcpkg/ports/coolprop/fix-dependency.patch @@ -0,0 +1,19 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2d61aff..80ac50a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -237,10 +237,10 @@ list(REMOVE_ITEM APP_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/Tests/CoolProp-Te + list(REMOVE_ITEM APP_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/CoolPropLib.cpp") + + set (APP_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}") +-list (APPEND APP_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/externals/Eigen") +-list (APPEND APP_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/externals/msgpack-c/include") +-list (APPEND APP_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/externals/fmtlib/include") +-list (APPEND APP_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/externals/fmtlib") # should be deprecated ++find_package(Eigen3 CONFIG REQUIRED) ++find_package(msgpack CONFIG REQUIRED) ++find_package(fmt CONFIG REQUIRED) ++link_libraries(Eigen3::Eigen msgpackc msgpackc-cxx fmt::fmt) + list (APPEND APP_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/include") + list (APPEND APP_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src") + diff --git a/vcpkg/ports/coolprop/fmt-fix.patch b/vcpkg/ports/coolprop/fmt-fix.patch new file mode 100644 index 0000000..9baeb2c --- /dev/null +++ b/vcpkg/ports/coolprop/fmt-fix.patch @@ -0,0 +1,39 @@ +diff --git a/include/CPstrings.h b/include/CPstrings.h +index b99820a..fe6a2aa 100644 +--- a/include/CPstrings.h ++++ b/include/CPstrings.h +@@ -6,6 +6,8 @@ + #include + #include + #include ++ #include ++ #include + + #if !defined(NO_FMTLIB) + #ifndef FMT_HEADER_ONLY +@@ -14,9 +16,6 @@ + #include "fmt/format.h" // For addition of the string formatting functions and macros from fmtlib + #include "fmt/printf.h" // For sprintf + #undef FMT_HEADER_ONLY +-#else +- #include +- #include + #endif + + #include "Exceptions.h" +@@ -58,11 +57,11 @@ + // Missing string formatting function, this old guy is needed for ancient gcc compilers on PowerPC for VxWorks + inline std::string format(const char* fmt, ...); + #else +- // Missing std::string formatting function - provided by the fmtlib library +- inline std::string format(const char *format, fmt::ArgList args) { +- return fmt::sprintf(format, args); ++ template ++ std::string format(const Args & ... args) ++ { ++ return fmt::sprintf(args...); + } +- FMT_VARIADIC(std::string, format, const char *) + // For latest FMTLIB + /*template + inline std::string format(const char *format_str, const Args & ... args) { diff --git a/vcpkg/ports/coolprop/portfile.cmake b/vcpkg/ports/coolprop/portfile.cmake new file mode 100644 index 0000000..2ba5a7e --- /dev/null +++ b/vcpkg/ports/coolprop/portfile.cmake @@ -0,0 +1,120 @@ +set(PORT_VERSION 6.1.0) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO CoolProp/CoolProp + REF f5ebb4e655add4c23bb327ab5209f3dbf919bc6d # v6.4.1 + SHA512 916d00777fe56035171ed0a6cbe09b8d4487317772802e4fe9b43f5965f3212dcb3754e18fe1db9c748a4d17facbbe6cb2244451cf5cf66334465760fc1701b7 + HEAD_REF master + PATCHES + fmt-fix.patch + fix-builderror.patch + fix-dependency.patch +) + +vcpkg_find_acquire_program(PYTHON2) +get_filename_component(PYTHON2_DIR ${PYTHON2} DIRECTORY) +vcpkg_add_to_path(${PYTHON2_DIR}) + +file(REMOVE_RECURSE ${SOURCE_PATH}/externals) + +# Patch up the file locations +file(COPY + ${CURRENT_INSTALLED_DIR}/include/catch.hpp + DESTINATION ${SOURCE_PATH}/externals/Catch/single_include +) + +file(COPY + ${CURRENT_INSTALLED_DIR}/include/eigen3/Eigen + DESTINATION ${SOURCE_PATH}/externals/Eigen +) +file(COPY + ${CURRENT_INSTALLED_DIR}/include/eigen3/unsupported/Eigen + DESTINATION ${SOURCE_PATH}/externals/Eigen/unsupported +) + +file(COPY + ${CURRENT_INSTALLED_DIR}/include/rapidjson + DESTINATION ${SOURCE_PATH}/externals/rapidjson/include +) + +file(COPY + ${CURRENT_INSTALLED_DIR}/include/IF97.h + DESTINATION ${SOURCE_PATH}/externals/IF97 +) + +file(COPY + ${CURRENT_INSTALLED_DIR}/include/msgpack.h + ${CURRENT_INSTALLED_DIR}/include/msgpack.hpp + ${CURRENT_INSTALLED_DIR}/include/msgpack + DESTINATION ${SOURCE_PATH}/externals/msgpack-c/include +) + +file(COPY + ${CURRENT_INSTALLED_DIR}/include/fmt + DESTINATION ${SOURCE_PATH}/externals/cppformat +) + +file(COPY + ${CURRENT_INSTALLED_DIR}/include/REFPROP_lib.h + DESTINATION ${SOURCE_PATH}/externals/REFPROP-headers/ +) + +# Use a nasty hack to include the correct header +file(APPEND + ${SOURCE_PATH}/externals/msgpack-c/include/fmt/format.h + "#include \"fmt/printf.h\"" +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" COOLPROP_SHARED_LIBRARY) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" COOLPROP_STATIC_LIBRARY) + +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" COOLPROP_MSVC_DYNAMIC) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" COOLPROP_MSVC_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCOOLPROP_SHARED_LIBRARY=${COOLPROP_SHARED_LIBRARY} + -DCOOLPROP_STATIC_LIBRARY=${COOLPROP_STATIC_LIBRARY} + -DCOOLPROP_MSVC_DYNAMIC=${COOLPROP_MSVC_DYNAMIC} + -DCOOLPROP_MSVC_STATIC=${COOLPROP_MSVC_STATIC} + OPTIONS_RELEASE + -DCOOLPROP_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR} + OPTIONS_DEBUG + -DCOOLPROP_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(TARGET_FOLDER "shared_library") +else() + set(TARGET_FOLDER "static_library") +endif() + +file(GLOB_RECURSE COOLPROP_HEADERS "${CURRENT_PACKAGES_DIR}/${TARGET_FOLDER}/*.h") +file(INSTALL ${COOLPROP_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(GLOB_RECURSE COOLPROP_LIBS "${CURRENT_PACKAGES_DIR}/${TARGET_FOLDER}/*.lib") +file(GLOB_RECURSE COOLPROP_DLLS "${CURRENT_PACKAGES_DIR}/${TARGET_FOLDER}/*.dll") + +file(INSTALL ${COOLPROP_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +if(COOLPROP_DLLS) + file(INSTALL ${COOLPROP_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +endif() + +file(GLOB_RECURSE COOLPROP_DEBUG_LIBS "${CURRENT_PACKAGES_DIR}/debug/${TARGET_FOLDER}/*.lib") +file(GLOB_RECURSE COOLPROP_DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/${TARGET_FOLDER}/*.dll") + +file(INSTALL ${COOLPROP_DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +if(COOLPROP_DEBUG_DLLS) + file(INSTALL ${COOLPROP_DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/${TARGET_FOLDER} ${CURRENT_PACKAGES_DIR}/${TARGET_FOLDER}) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/coroutine/fix-errorC7651.patch b/vcpkg/ports/coroutine/fix-errorC7651.patch new file mode 100644 index 0000000..42c4291 --- /dev/null +++ b/vcpkg/ports/coroutine/fix-errorC7651.patch @@ -0,0 +1,68 @@ +diff --git a/modules/portable/frame.cpp b/modules/portable/frame.cpp +index 2cedf81..f413f28 100644 +--- a/modules/portable/frame.cpp ++++ b/modules/portable/frame.cpp +@@ -77,13 +77,31 @@ size_t _coro_done(void*); + // + // intrinsic: Clang/GCC + // +-extern "C" { +-bool __builtin_coro_done(void*); +-void __builtin_coro_resume(void*); +-void __builtin_coro_destroy(void*); +-// void* __builtin_coro_promise(void* ptr, int align, bool p); ++//extern "C" { ++template ++void resume_wrapper(void *p) ++{ ++ if constexpr (B) ++ __builtin_coro_resume(p); ++} ++ ++template ++void destroy_wrapper(void *p) ++{ ++ if constexpr(B) ++ __builtin_coro_destroy(p); + } + ++template ++bool done_wrapper(void *p) ++{ ++ if constexpr(B) ++ return __builtin_coro_done(p); ++ return false; ++} ++// void* __builtin_coro_promise(void* ptr, int align, bool p); ++//} ++ + bool _coro_finished(portable_coro_prefix* _Handle); + + #if defined(__clang__) +@@ -124,7 +142,7 @@ bool portable_coro_done(portable_coro_prefix* _Handle) { + if constexpr (is_msvc) { + return _coro_finished(_Handle); + } else if constexpr (is_clang) { +- return __builtin_coro_done(_Handle); ++ return done_wrapper(_Handle); + } + return false; // follow `noop_coroutine` + } +@@ -133,7 +151,7 @@ void portable_coro_resume(portable_coro_prefix* _Handle) { + if constexpr (is_msvc) { + _coro_resume(_Handle); + } else if constexpr (is_clang) { +- __builtin_coro_resume(_Handle); ++ resume_wrapper(_Handle); + } + } + +@@ -141,7 +159,7 @@ void portable_coro_destroy(portable_coro_prefix* _Handle) { + if constexpr (is_msvc) { + _coro_destroy(_Handle); + } else if constexpr (is_clang) { +- __builtin_coro_destroy(_Handle); ++ destroy_wrapper(_Handle); + } + } + diff --git a/vcpkg/ports/coroutine/portfile.cmake b/vcpkg/ports/coroutine/portfile.cmake new file mode 100644 index 0000000..3c5f27b --- /dev/null +++ b/vcpkg/ports/coroutine/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +if(VCPKG_TARGET_IS_LINUX) + message("Warning: `coroutine` requires libc++ and Clang or GCC 10+ on Linux") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO luncliff/coroutine + REF 1.5.0 + SHA512 61b91fdc641b6905b884e99c5bf193ec2cf6962144ab3baafdb9432115757d96f3797f116b30356f0d21417b23082bc908f75042721caeab3329c4910b654594 + HEAD_REF master + PATCHES fix-errorC7651.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DGSL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include + -DBUILD_TESTING=False +) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/vcpkg/ports/coroutine/vcpkg.json b/vcpkg/ports/coroutine/vcpkg.json new file mode 100644 index 0000000..4e71341 --- /dev/null +++ b/vcpkg/ports/coroutine/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "coroutine", + "version-string": "1.5.0", + "port-version": 1, + "description": "C++ 20 Coroutines helper/example library", + "homepage": "https://github.com/luncliff/coroutine", + "supports": "!uwp", + "dependencies": [ + "ms-gsl" + ] +} diff --git a/vcpkg/ports/corrade/CONTROL b/vcpkg/ports/corrade/CONTROL new file mode 100644 index 0000000..d59fa6f --- /dev/null +++ b/vcpkg/ports/corrade/CONTROL @@ -0,0 +1,20 @@ +Source: corrade +Version: 2020.06 +Description: C++11/C++14 multiplatform utility library +Homepage: https://magnum.graphics/corrade/ +Default-Features: interconnect, pluginmanager, testsuite, utility + +Feature: interconnect +Description: Interconnect library +Build-Depends: corrade[utility] + +Feature: pluginmanager +Description: PluginManager library +Build-Depends: corrade[utility] + +Feature: testsuite +Description: TestSuite library +Build-Depends: corrade[utility] + +Feature: utility +Description: Utility library diff --git a/vcpkg/ports/corrade/portfile.cmake b/vcpkg/ports/corrade/portfile.cmake new file mode 100644 index 0000000..78c7a2a --- /dev/null +++ b/vcpkg/ports/corrade/portfile.cmake @@ -0,0 +1,72 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mosra/corrade + REF v2020.06 + SHA512 94cc8959b0ee43ecd8d13a25307e7829d53dc6601628d97c32288d1704e2c0835b755bffc06b2105e6aa5a612f119a60e83cb475860b51e6a35999215c100227 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) + +# Handle features +set(_COMPONENT_FLAGS "") +foreach(_feature IN LISTS ALL_FEATURES) + # Uppercase the feature name and replace "-" with "_" + string(TOUPPER "${_feature}" _FEATURE) + string(REPLACE "-" "_" _FEATURE "${_FEATURE}") + + # Turn "-DWITH_*=" ON or OFF depending on whether the feature + # is in the list. + if(_feature IN_LIST FEATURES) + list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=ON") + else() + list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=OFF") + endif() +endforeach() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DUTILITY_USE_ANSI_COLORS=ON + -DBUILD_STATIC=${BUILD_STATIC} + ${_COMPONENT_FLAGS} +) + +vcpkg_install_cmake() + +# Debug includes and share are the same as release +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Install tools +if("utility" IN_LIST FEATURES) + # Drop a copy of tools + vcpkg_copy_tools(TOOL_NAMES "corrade-rc" AUTO_CLEAN) +endif() + +# Ensure no empty folders are left behind +if(NOT FEATURES) + # No features, no binaries (only Corrade.h). + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/debug) + # debug is completely empty, as include and share + # have already been removed. + +elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + # No dlls + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright) + + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/cpp-base64/CONTROL b/vcpkg/ports/cpp-base64/CONTROL new file mode 100644 index 0000000..bc24ced --- /dev/null +++ b/vcpkg/ports/cpp-base64/CONTROL @@ -0,0 +1,4 @@ +Source: cpp-base64 +Version: 2019-06-19 +Homepage: https://github.com/ReneNyffenegger/cpp-base64 +Description: Base64 encoding and decoding with c++. \ No newline at end of file diff --git a/vcpkg/ports/cpp-base64/portfile.cmake b/vcpkg/ports/cpp-base64/portfile.cmake new file mode 100644 index 0000000..9016ca2 --- /dev/null +++ b/vcpkg/ports/cpp-base64/portfile.cmake @@ -0,0 +1,15 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ReneNyffenegger/cpp-base64 + REF a8aae956a2f07df9aac25b064cf4cd92d56aac45 #Commits on Jun 19, 2019 + SHA512 cb8d8991b87bd70f6287fb2abe20cb2156a511fdccd42bb3fc441d81cccd55755a44579227d326585b8c7a514d9cfebda98a72801ea2a3019a935d52cb14fc90 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/base64.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +file(COPY ${SOURCE_PATH}/base64.cpp DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/cpp-httplib/CONTROL b/vcpkg/ports/cpp-httplib/CONTROL new file mode 100644 index 0000000..4f794d1 --- /dev/null +++ b/vcpkg/ports/cpp-httplib/CONTROL @@ -0,0 +1,4 @@ +Source: cpp-httplib +Version: 0.7.0 +Homepage: https://github.com/yhirose/cpp-httplib +Description: A single file C++11 header-only HTTP/HTTPS server and client library diff --git a/vcpkg/ports/cpp-httplib/portfile.cmake b/vcpkg/ports/cpp-httplib/portfile.cmake new file mode 100644 index 0000000..c23cd61 --- /dev/null +++ b/vcpkg/ports/cpp-httplib/portfile.cmake @@ -0,0 +1,16 @@ +# Header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO yhirose/cpp-httplib + REF v0.7.0 + SHA512 4ffbeb6672dec5f3704d6c3da09acf0e1984b5c7c68455f7fb030a7457bc64983665498015f2372d8a85da02be1750bab03dae956653297ac8efef67ff682854 + HEAD_REF master +) + +file( + COPY ${SOURCE_PATH}/httplib.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/cpp-netlib/CONTROL b/vcpkg/ports/cpp-netlib/CONTROL new file mode 100644 index 0000000..f31cc10 --- /dev/null +++ b/vcpkg/ports/cpp-netlib/CONTROL @@ -0,0 +1,7 @@ +Source: cpp-netlib +Version: 0.13.0 +Port-Version: 4 +Homepage: https://cpp-netlib.org/ +Build-Depends: boost-spirit, boost-smart-ptr, boost-asio, boost-program-options, boost-assign, boost-logic, boost-scope-exit +Description: A collection of network-related routines/implementations geared towards providing a robust cross-platform networking library +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/cpp-netlib/portfile.cmake b/vcpkg/ports/cpp-netlib/portfile.cmake new file mode 100644 index 0000000..adfe9ad --- /dev/null +++ b/vcpkg/ports/cpp-netlib/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cpp-netlib/cpp-netlib + REF 31d304cdf52b485f465ada433d8905171b61cbff + SHA512 6d157e6d950dd76a6d16b9c13d4d29f188d9f540eb0b44ab169016e1d7a360995e51d9923b532503a17dd2c8e0e2a38b2f9b531db03b33239e7fb9ca4d047b0c + HEAD_REF master + # Updator's note: cpp-netlib has many templates that are not fully instantiated when not building examples. + # This patch specifically fixes one of those issues + # To test updates, enable building examples below (may also require patching out uses of cxxopts) + PATCHES stream-handler-executor.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCPP-NETLIB_BUILD_TESTS=OFF + -DCPP-NETLIB_BUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/cppnetlib) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/cppnetlib TARGET_PATH share/cppnetlib) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/cpp-netlib/stream-handler-executor.patch b/vcpkg/ports/cpp-netlib/stream-handler-executor.patch new file mode 100644 index 0000000..7152f23 --- /dev/null +++ b/vcpkg/ports/cpp-netlib/stream-handler-executor.patch @@ -0,0 +1,27 @@ +diff --git a/boost/network/protocol/stream_handler.hpp b/boost/network/protocol/stream_handler.hpp +index ffb09b8..f3b3e99 100644 +--- a/boost/network/protocol/stream_handler.hpp ++++ b/boost/network/protocol/stream_handler.hpp +@@ -41,6 +40,7 @@ typedef boost::asio::ssl::context ssl_context; + + struct stream_handler { + public: ++ typedef tcp_socket::executor_type executor_type; + stream_handler(std::shared_ptr socket) + : tcp_sock_(std::move(socket)), ssl_enabled(false) {} + +@@ -52,12 +52,12 @@ struct stream_handler { + stream_handler(boost::asio::io_service& io, + std::shared_ptr ctx = + std::shared_ptr()) { +- tcp_sock_ = std::make_shared(boost::ref(io)); ++ tcp_sock_ = std::make_shared(io.get_executor()); + ssl_enabled = false; + if (ctx) { + /// SSL is enabled + ssl_sock_ = +- std::make_shared(boost::ref(io), boost::ref(*ctx)); ++ std::make_shared(io.get_executor(), boost::ref(*ctx)); + ssl_enabled = true; + } + } diff --git a/vcpkg/ports/cpp-peglib/CONTROL b/vcpkg/ports/cpp-peglib/CONTROL new file mode 100644 index 0000000..6a6ed9a --- /dev/null +++ b/vcpkg/ports/cpp-peglib/CONTROL @@ -0,0 +1,3 @@ +Source: cpp-peglib +Version: 0.1.0 +Description: C++11 header-only PEG (Parsing Expression Grammars) library. diff --git a/vcpkg/ports/cpp-peglib/portfile.cmake b/vcpkg/ports/cpp-peglib/portfile.cmake new file mode 100644 index 0000000..25c74c0 --- /dev/null +++ b/vcpkg/ports/cpp-peglib/portfile.cmake @@ -0,0 +1,17 @@ +#header-only library +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO yhirose/cpp-peglib + REF v0.1.0 + SHA512 7efe9da8fe75d766a50d6508c81369b71981aa1e36c0d9981d57b75822fde81074b8803753bfa599ab4ce2a7047be731c22476d0938728ebb9a9dbf63aaeb9e6 + HEAD_REF master + ) + + file(COPY ${SOURCE_PATH}/peglib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + + # Handle copyright + file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cpp-peglib) + file(RENAME ${CURRENT_PACKAGES_DIR}/share/cpp-peglib/LICENSE ${CURRENT_PACKAGES_DIR}/share/cpp-peglib/copyright) diff --git a/vcpkg/ports/cpp-redis/CONTROL b/vcpkg/ports/cpp-redis/CONTROL new file mode 100644 index 0000000..702c107 --- /dev/null +++ b/vcpkg/ports/cpp-redis/CONTROL @@ -0,0 +1,5 @@ +Source: cpp-redis +Version: 4.3.1-2 +Build-Depends: tacopie +Homepage: https://github.com/cpp-redis/cpp_redis +Description: cpp-redis is a C++11 Asynchronous Multi-Platform Lightweight Redis Client, with support for synchronous operations and pipelining. diff --git a/vcpkg/ports/cpp-redis/portfile.cmake b/vcpkg/ports/cpp-redis/portfile.cmake new file mode 100644 index 0000000..f6bf753 --- /dev/null +++ b/vcpkg/ports/cpp-redis/portfile.cmake @@ -0,0 +1,62 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cpp-redis/cpp_redis + REF 4.3.1 + SHA512 abf372542c53f37f504b3211b840b100d07a8f4b2e7f5584cc7550ab16ed617838e2df79064374c7a409458d8567f4834686318ea3a40249c767e36c744c7a47 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/tacopie/CMakeLists.txt DESTINATION ${SOURCE_PATH}/tacopie) + +if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + set(MSVC_RUNTIME_LIBRARY_CONFIG "/MD") +else() + set(MSVC_RUNTIME_LIBRARY_CONFIG "/MT") +endif() + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) + # cpp-redis forcibly removes "/RTC1" in its cmake file. Because this is an ABI-sensitive flag, we need to re-add it in a form that won't be detected. + set(VCPKG_CXX_FLAGS_DEBUG "${VCPKG_CXX_FLAGS_DEBUG} -RTC1") + set(VCPKG_C_FLAGS_DEBUG "${VCPKG_C_FLAGS_DEBUG} -RTC1") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DMSVC_RUNTIME_LIBRARY_CONFIG=${MSVC_RUNTIME_LIBRARY_CONFIG} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(GLOB_RECURSE FILES "${CURRENT_PACKAGES_DIR}/include/*") +foreach(file ${FILES}) + file(READ ${file} _contents) + string(REPLACE "ifndef __CPP_REDIS_USE_CUSTOM_TCP_CLIENT" "if 1" _contents "${_contents}") + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + string(REPLACE + "extern std::unique_ptr active_logger;" + "extern __declspec(dllimport) std::unique_ptr active_logger;" + _contents "${_contents}") + endif() + file(WRITE ${file} "${_contents}") +endforeach() + +file(GLOB FILES_TO_REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/cpp_redis.ilk" "${CURRENT_PACKAGES_DIR}/bin/cpp_redis.dll.manifest") +if(FILES_TO_REMOVE) + file(REMOVE_RECURSE ${FILES_TO_REMOVE}) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/cpp-redis/tacopie/CMakeLists.txt b/vcpkg/ports/cpp-redis/tacopie/CMakeLists.txt new file mode 100644 index 0000000..74959e2 --- /dev/null +++ b/vcpkg/ports/cpp-redis/tacopie/CMakeLists.txt @@ -0,0 +1,8 @@ +find_library(TACOPIE tacopie) +find_path(TACOPIE_H tacopie/tacopie) + +message(STATUS "TACOPIE_H: ${TACOPIE_H}") + +add_library(tacopie INTERFACE) +target_link_libraries(tacopie INTERFACE "${TACOPIE}") +target_include_directories(tacopie INTERFACE "${TACOPIE_H}") \ No newline at end of file diff --git a/vcpkg/ports/cpp-taskflow/CONTROL b/vcpkg/ports/cpp-taskflow/CONTROL new file mode 100644 index 0000000..49885ff --- /dev/null +++ b/vcpkg/ports/cpp-taskflow/CONTROL @@ -0,0 +1,5 @@ +Source: cpp-taskflow +Version: 2.6.0 +Description: Fast Parallel Tasking Programming Library using Modern C++. +Homepage: https://github.com/taskflow/taskflow +Build-Depends: taskflow diff --git a/vcpkg/ports/cpp-taskflow/portfile.cmake b/vcpkg/ports/cpp-taskflow/portfile.cmake new file mode 100644 index 0000000..0988d57 --- /dev/null +++ b/vcpkg/ports/cpp-taskflow/portfile.cmake @@ -0,0 +1,2 @@ +message(WARNING "The port 'cpp-taskflow' has been replaced with 'taskflow'.") +SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/vcpkg/ports/cppad/CONTROL b/vcpkg/ports/cppad/CONTROL new file mode 100644 index 0000000..f38cfd1 --- /dev/null +++ b/vcpkg/ports/cppad/CONTROL @@ -0,0 +1,5 @@ +Source: cppad +Version: 20200000.3 +Homepage: https://github.com/coin-or/CppAD +Description: CppAD: A Package for Differentiation of C++ Algorithms +Supports: !(arm|uwp) diff --git a/vcpkg/ports/cppad/pkgconfig-fix.patch b/vcpkg/ports/cppad/pkgconfig-fix.patch new file mode 100644 index 0000000..6688fc9 --- /dev/null +++ b/vcpkg/ports/cppad/pkgconfig-fix.patch @@ -0,0 +1,63 @@ +diff --git a/pkgconfig/CMakeLists.txt b/pkgconfig/CMakeLists.txt +index db8b65902..b1224a01d 100644 +--- a/pkgconfig/CMakeLists.txt ++++ b/pkgconfig/CMakeLists.txt +@@ -42,8 +42,9 @@ ENDIF( cppad_has_ipopt ) + # cppad_pkgconfig_cflags + # cppad_pkgconfig_cflags_uninstalled + # +-SET(cppad_pkgconfig_cflags "-I${cppad_abs_includedir}" ) +-SET(cppad_pkgconfig_cflags_uninstalled "-I${cppad_SOURCE_DIR}" ) ++SET(cppad_pkgconfig_includedir "${cmake_install_includedirs}" ) ++SET(cppad_pkgconfig_cflags_uninstalled "-I${cppad_SOURCE_DIR}" ) ++SET(cppad_pkgconfig_libdir "${cmake_install_libdirs}" ) + # ---------------------------------------------------------------------------- + # cppad_pkgconfig_libs + # cppad_pkgconfig_libs_uninstalled +@@ -74,7 +75,7 @@ IF( "${libs}" STREQUAL "" ) + SET(cppad_pkgconfig_libs "") + SET(cppad_pkgconfig_libs_uninstalled "") + ELSE( "${libs}" STREQUAL "" ) +- SET(cppad_pkgconfig_libs "-L${cppad_abs_libdir} ${libs}") ++ SET(cppad_pkgconfig_libs "-L\${libdir} ${libs}") + SET(cppad_pkgconfig_libs_uninstalled "${uninstalled} ${libs}") + ENDIF( "${libs}" STREQUAL "" ) + # +@@ -84,10 +85,12 @@ ENDIF( "${libs}" STREQUAL "" ) + CONFIGURE_FILE( + ${CMAKE_CURRENT_SOURCE_DIR}/cppad.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/cppad.pc ++ @ONLY + ) + CONFIGURE_FILE( + ${CMAKE_CURRENT_SOURCE_DIR}/cppad-uninstalled.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/cppad-uninstalled.pc ++ @ONLY + ) + # During install copy cppad.pc to datadir and libdir + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/cppad.pc +diff --git a/pkgconfig/cppad.pc.in b/pkgconfig/cppad.pc.in +index a202e3fb3..1c34c1e08 100644 +--- a/pkgconfig/cppad.pc.in ++++ b/pkgconfig/cppad.pc.in +@@ -12,12 +12,19 @@ + # This file is used with pkg-config to include CppAD after it is installed + # + # Entries set by top source directory CMakeLists.txt file ++ ++prefix=${pcfiledir}/../.. ++exec_prefix=${prefix} ++libdir=${exec_prefix}/@cppad_pkgconfig_libdir@ ++includedir=${prefix}/@cppad_pkgconfig_includedir@ ++ + Name: cppad + Description: @cppad_description@ + Version: @cppad_version@ + URL: @cppad_url@ ++ + # + # Entries set by pkgconfig/CMakeLists.txt file +-Cflags: @cppad_pkgconfig_cflags@ ++Cflags: -I${includedir} + Libs: @cppad_pkgconfig_libs@ + Requires: @cppad_pkgconfig_requires@ diff --git a/vcpkg/ports/cppad/portfile.cmake b/vcpkg/ports/cppad/portfile.cmake new file mode 100644 index 0000000..1c9fc8d --- /dev/null +++ b/vcpkg/ports/cppad/portfile.cmake @@ -0,0 +1,42 @@ +# the compilation fails on arm and uwp. Please check the related issue: +# https://github.com/microsoft/vcpkg/pull/12560#issuecomment-668412073 +vcpkg_fail_port_install(ON_TARGET "uwp" and "arm") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO coin-or/CppAD + REF 20200000.3 + SHA512 4e980665a21c76cf355d1c5597c65fbfba7ac3e15c43a88ccfe3ba0267b85b4e9aa7c6e8a0ed7a728f8cf2c6e1424625d5cbcdd295a6c0a08b47b4b121572d13 + HEAD_REF master + PATCHES + windows-fix.patch + pkgconfig-fix.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -Dcppad_prefix=${CURRENT_PACKAGES_DIR} + OPTIONS_RELEASE + -Dcmake_install_libdirs=lib + -Dcppad_debug_which:STRING=debug_none + OPTIONS_DEBUG + -Dcmake_install_libdirs=debug/lib +) + +vcpkg_install_cmake() + +# Install the pkgconfig file +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/pkgconfig/cppad.pc DESTINATION ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/pkgconfig/cppad.pc DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) +endif() + +vcpkg_fixup_pkgconfig() + +# Add the copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/cppad/windows-fix.patch b/vcpkg/ports/cppad/windows-fix.patch new file mode 100644 index 0000000..50c38ca --- /dev/null +++ b/vcpkg/ports/cppad/windows-fix.patch @@ -0,0 +1,105 @@ +diff --git a/cppad_lib/cppad_colpack.cpp b/cppad_lib/cppad_colpack.cpp +index dc3327053..739363292 100644 +--- a/cppad_lib/cppad_colpack.cpp ++++ b/cppad_lib/cppad_colpack.cpp +@@ -17,7 +17,7 @@ in the Eclipse Public License, Version 2.0 are satisfied: + + # if CPPAD_HAS_COLPACK == 0 + namespace CppAD { namespace local { +- CPPAD_LIB_EXPORT void this_routine_should_never_get_called(void) ++ void this_routine_should_never_get_called(void) + { CPPAD_ASSERT_UNKNOWN(false); } + } } + # else // CPPAD_HAS_COLPACK +@@ -52,7 +52,7 @@ the entry with index (i, adolc_pattern[i][k]) is a non-zero + in the sparsity pattern for the matrix. + */ + // ---------------------------------------------------------------------- +-CPPAD_LIB_EXPORT void cppad_colpack_general( ++void cppad_colpack_general( + CppAD::vector& color , + size_t m , + size_t n , +@@ -164,7 +164,7 @@ For i = 0 , ... , m-1, and for k = 1, ... ,adolc_pattern[i][0], + the entry with index (i, adolc_pattern[i][k]) is + in the sparsity pattern for the symmetric matrix. + */ +-CPPAD_LIB_EXPORT void cppad_colpack_symmetric( ++void cppad_colpack_symmetric( + CppAD::vector& color , + size_t m , + const CppAD::vector& adolc_pattern ) +diff --git a/cppad_lib/json_parser.cpp b/cppad_lib/json_parser.cpp +index fac417d9f..ac0910cee 100644 +--- a/cppad_lib/json_parser.cpp ++++ b/cppad_lib/json_parser.cpp +@@ -20,7 +20,7 @@ in the Eclipse Public License, Version 2.0 are satisfied: + // documentation for this routine is in the file below + # include + +-CPPAD_LIB_EXPORT void CppAD::local::graph::json_parser( ++void CppAD::local::graph::json_parser( + const std::string& json , + cpp_graph& graph_obj ) + { using std::string; +diff --git a/cppad_lib/json_writer.cpp b/cppad_lib/json_writer.cpp +index 250345c6e..add4b20a9 100644 +--- a/cppad_lib/json_writer.cpp ++++ b/cppad_lib/json_writer.cpp +@@ -17,7 +17,7 @@ in the Eclipse Public License, Version 2.0 are satisfied: + // documentation for this routine is in the file below + # include + +-CPPAD_LIB_EXPORT void CppAD::local::graph::json_writer( ++void CppAD::local::graph::json_writer( + std::string& json , + const cpp_graph& graph_obj ) + { using std::string; +diff --git a/include/cppad/local/cppad_colpack.hpp b/include/cppad/local/cppad_colpack.hpp +index ee96ab5fe..6dd022180 100644 +--- a/include/cppad/local/cppad_colpack.hpp ++++ b/include/cppad/local/cppad_colpack.hpp +@@ -59,7 +59,7 @@ it is not the case that both + This routine tries to minimize, with respect to the choice of colors, + the number of colors. + */ +-extern void cppad_colpack_general( ++CPPAD_LIB_EXPORT void cppad_colpack_general( + CppAD::vector& color , + size_t m , + size_t n , +@@ -91,7 +91,7 @@ The properties of this coloring have not yet been determined; see + Efficient Computation of Sparse Hessians Using Coloring + and Automatic Differentiation (pdf/ad/gebemedhin14.pdf) + */ +-extern void cppad_colpack_symmetric( ++CPPAD_LIB_EXPORT void cppad_colpack_symmetric( + CppAD::vector& color , + size_t n , + const CppAD::vector& adolc_pattern +diff --git a/include/cppad/local/graph/json_parser.hpp b/include/cppad/local/graph/json_parser.hpp +index 17bcc7c7e..a28d2c045 100644 +--- a/include/cppad/local/graph/json_parser.hpp ++++ b/include/cppad/local/graph/json_parser.hpp +@@ -42,7 +42,7 @@ Upon return it is a $cref cpp_ad_graph$$ representation of this function. + $head Prototype$$ + $srccode%hpp% */ + namespace CppAD { namespace local { namespace graph { +- void json_parser( ++ CPPAD_LIB_EXPORT void json_parser( + const std::string& json , + cpp_graph& graph_obj + ); +diff --git a/include/cppad/local/graph/json_writer.hpp b/include/cppad/local/graph/json_writer.hpp +index 36a4cb39f..299c56cc0 100644 +--- a/include/cppad/local/graph/json_writer.hpp ++++ b/include/cppad/local/graph/json_writer.hpp +@@ -41,7 +41,7 @@ This is a $code cpp_graph$$ object. + $head Prototype$$ + $srccode%hpp% */ + namespace CppAD { namespace local { namespace graph { +- void json_writer( ++ CPPAD_LIB_EXPORT void json_writer( + std::string& json , + const cpp_graph& graph_obj + ); diff --git a/vcpkg/ports/cppcms/CONTROL b/vcpkg/ports/cppcms/CONTROL new file mode 100644 index 0000000..2acc51f --- /dev/null +++ b/vcpkg/ports/cppcms/CONTROL @@ -0,0 +1,6 @@ +Source: cppcms +Version: 1.2.1-1 +Homepage: https://github.com/artyom-beilis/cppcms +Description: CppCMS is a Free High Performance Web Development Framework (not a CMS) aimed at Rapid Web Application Development +Build-Depends: icu, pcre, openssl, zlib +Supports: !(linux|osx) diff --git a/vcpkg/ports/cppcms/portfile.cmake b/vcpkg/ports/cppcms/portfile.cmake new file mode 100644 index 0000000..383022f --- /dev/null +++ b/vcpkg/ports/cppcms/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_fail_port_install( ON_TARGET "linux" "osx") + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO artyom-beilis/cppcms + REF b72b19915794d1af63c9a9e9bea58e20a4ad93d4 + SHA512 e99d34d14fbde22be725ac2c0bec069fb584e45c66767af75efaf454ca61a7a5e57434bf86109f910884c72202b8cf98fe16505e7d3d30d9218abd4d8b27d5df +) + +vcpkg_find_acquire_program(PYTHON2) +get_filename_component(PYTHON2_DIR ${PYTHON2} DIRECTORY) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DCMAKE_PROGRAM_PATH=${PYTHON2_DIR} -DUSE_WINDOWS6_API=ON +) + +vcpkg_install_cmake() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(GLOB EXE_DEBUG_FILES ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +file(REMOVE ${EXE_DEBUG_FILES}) +file(GLOB EXE_FILES ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(REMOVE ${EXE_FILES}) + +file(INSTALL ${SOURCE_PATH}/MIT.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/cppcodec/CONTROL b/vcpkg/ports/cppcodec/CONTROL new file mode 100644 index 0000000..32f72bf --- /dev/null +++ b/vcpkg/ports/cppcodec/CONTROL @@ -0,0 +1,3 @@ +Source: cppcodec +Version: 0.2 +Description: Header-only C++11 library to encode/decode base64, base64url, base32, base32hex and hex (a.k.a. base16) as specified in RFC 4648, plus Crockford's base32. \ No newline at end of file diff --git a/vcpkg/ports/cppcodec/portfile.cmake b/vcpkg/ports/cppcodec/portfile.cmake new file mode 100644 index 0000000..b445f4d --- /dev/null +++ b/vcpkg/ports/cppcodec/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tplgy/cppcodec + REF v0.2 + SHA512 50c9c81cdb12560c87e513e1fd22c1ad24ea37b7d20a0e3044d43fb887f4c6494c69468e4d0811cd2fc1ae8fdb01b01cfb9f3cfdd8611d4bb0221cbd38cbead3 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF + +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + diff --git a/vcpkg/ports/cppcoro/CMakeLists.txt b/vcpkg/ports/cppcoro/CMakeLists.txt new file mode 100644 index 0000000..975dae4 --- /dev/null +++ b/vcpkg/ports/cppcoro/CMakeLists.txt @@ -0,0 +1,202 @@ +cmake_minimum_required(VERSION 3.8) +project(cppcoro VERSION 2020.2 LANGUAGES CXX) + +set(CMAKE_CXX_STANDARD 17) + +add_library(cppcoro + lib/async_mutex.cpp + lib/lightweight_manual_reset_event.cpp + lib/async_auto_reset_event.cpp + lib/async_manual_reset_event.cpp + lib/auto_reset_event.cpp + lib/auto_reset_event.hpp + lib/cancellation_registration.cpp + lib/cancellation_source.cpp + lib/cancellation_state.cpp + lib/cancellation_state.hpp + lib/cancellation_token.cpp + lib/spin_mutex.cpp + lib/spin_mutex.hpp + lib/spin_wait.cpp + lib/spin_wait.hpp + lib/static_thread_pool.cpp + lib/ip_address.cpp + lib/ip_endpoint.cpp + lib/ipv4_address.cpp + lib/ipv4_endpoint.cpp + lib/ipv6_address.cpp + lib/ipv6_endpoint.cpp +) + +if(APPLE) + message(STATUS "using sysroot: ${CMAKE_OSX_SYSROOT}") +elseif(WIN32) + message(STATUS "using platform: ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}") + # for now, build in single target + target_sources(cppcoro + PRIVATE + lib/win32.cpp + lib/file.cpp + lib/file_read_operation.cpp + lib/file_write_operation.cpp + lib/read_only_file.cpp + lib/read_write_file.cpp + lib/readable_file.cpp + lib/writable_file.cpp + lib/write_only_file.cpp + lib/socket.cpp + lib/socket_accept_operation.cpp + lib/socket_connect_operation.cpp + lib/socket_send_operation.cpp + lib/socket_send_to_operation.cpp + lib/socket_disconnect_operation.cpp + lib/socket_helpers.cpp + lib/socket_helpers.hpp + lib/socket_recv_from_operation.cpp + lib/socket_recv_operation.cpp + lib/io_service.cpp + ) +elseif(CMAKE_SYSTEM_NAME MATCHES "Linux") + message(STATUS "using system: ${CMAKE_HOST_SYSTEM_VERSION}") +endif() + +target_include_directories(cppcoro +PUBLIC + $ + $ +) + +if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") + if(WIN32) + message(FATAL_ERROR " doesn't support clang-cl compiler") + else() + target_compile_options(cppcoro + PUBLIC + -std=c++1z -fcoroutines-ts + -stdlib=libc++ + ) + target_link_libraries(cppcoro + PUBLIC + c++ pthread + ) + endif() + +elseif(MSVC) + target_compile_options(cppcoro + PUBLIC + /await + PRIVATE + "/analyze:max_paths 512" + -D_SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING=1 + ) + if(CMAKE_GENERATOR_PLATFORM STREQUAL x64) + target_compile_options(cppcoro + PUBLIC + /await:heapelide + ) + endif() + +endif() + +if(WIN32) + target_link_libraries(cppcoro + PUBLIC + kernel32 synchronization ws2_32 mswsock + # msvcrt[d] msvcprt[d] vcruntime ucrt + ) +elseif(APPLE) + +elseif(CMAKE_SYSTEM_NAME MATCHES Linux) + target_link_libraries(cppcoro + PUBLIC + c++ # stdc++ # expect libc++ instead of libstdc++ + ) +endif() + +install(DIRECTORY include/cppcoro + DESTINATION include +) + +install(TARGETS cppcoro + EXPORT ${PROJECT_NAME}-config + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install(EXPORT ${PROJECT_NAME}-config + DESTINATION share/${PROJECT_NAME} +) + +include(CMakePackageConfigHelpers) +set(VERSION_FILE_PATH ${CMAKE_BINARY_DIR}/cmake/${PROJECT_NAME}-config-version.cmake) +write_basic_package_version_file(${VERSION_FILE_PATH} + VERSION ${PROJECT_VERSION} + COMPATIBILITY SameMajorVersion +) + +install(FILES ${VERSION_FILE_PATH} + DESTINATION share/${PROJECT_NAME} +) + +if(NOT BUILD_TESTING) + return() +endif() +enable_testing() +find_package(Threads REQUIRED) + +add_executable(cppcoro_test + test/main.cpp test/counted.cpp + test/generator_tests.cpp + # test/recursive_generator_tests.cpp # clang crash + test/async_generator_tests.cpp + test/async_auto_reset_event_tests.cpp + test/async_manual_reset_event_tests.cpp + test/async_mutex_tests.cpp + test/async_latch_tests.cpp + test/cancellation_token_tests.cpp + test/task_tests.cpp + test/sequence_barrier_tests.cpp + test/shared_task_tests.cpp + test/sync_wait_tests.cpp + test/single_consumer_async_auto_reset_event_tests.cpp + test/single_producer_sequencer_tests.cpp + test/multi_producer_sequencer_tests.cpp + test/when_all_tests.cpp + test/when_all_ready_tests.cpp + test/ip_address_tests.cpp + test/ip_endpoint_tests.cpp + test/ipv4_address_tests.cpp + test/ipv4_endpoint_tests.cpp + test/ipv6_address_tests.cpp + test/ipv6_endpoint_tests.cpp + test/static_thread_pool_tests.cpp +) + +target_link_libraries(cppcoro_test +PRIVATE + cppcoro + Threads::Threads +) + +find_package(doctest CONFIG REQUIRED) +get_target_property(DOCTEST_INCLUDE_DIR doctest::doctest + INTERFACE_INCLUDE_DIRECTORIES +) +message(STATUS "using doctest: ${DOCTEST_INCLUDE_DIR}") +target_link_libraries(cppcoro_test +PRIVATE + doctest::doctest +) + +if(WIN32) + target_sources(cppcoro_test + PRIVATE + test/scheduling_operator_tests.cpp + test/io_service_tests.cpp + test/file_tests.cpp + test/socket_tests.cpp + ) +endif() + +add_test(NAME test_all COMMAND cppcoro_test --duration=true ) \ No newline at end of file diff --git a/vcpkg/ports/cppcoro/CONTROL b/vcpkg/ports/cppcoro/CONTROL new file mode 100644 index 0000000..ea3a391 --- /dev/null +++ b/vcpkg/ports/cppcoro/CONTROL @@ -0,0 +1,5 @@ +Source: cppcoro +Homepage: https://github.com/lewissbaker/cppcoro +Version: 2020-2-28-1 +Description: A library of C++ coroutine abstractions for the Coroutines TS +Supports: !uwp diff --git a/vcpkg/ports/cppcoro/portfile.cmake b/vcpkg/ports/cppcoro/portfile.cmake new file mode 100644 index 0000000..7938a65 --- /dev/null +++ b/vcpkg/ports/cppcoro/portfile.cmake @@ -0,0 +1,37 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +if(VCPKG_TARGET_IS_LINUX) + message("Warning: cppcoro requires libc++ and Clang on Linux. See https://github.com/microsoft/vcpkg/pull/10693#issuecomment-610394650.") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lewissbaker/cppcoro + REF 92892f31d0c41b8e34e6292d7c9d99228da5c501 + SHA512 d1997b7449f1c5c0790575d0755ffbb5f9eef13a7610f3ec666a585bdbb93bb1553f79214c1023a1ef23aaeef64078ca6ee3784107645d7a75c7bba943c10b84 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt + DESTINATION ${SOURCE_PATH} +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=False +) +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/vcpkg/ports/cppfs/CONTROL b/vcpkg/ports/cppfs/CONTROL new file mode 100644 index 0000000..d32f5a7 --- /dev/null +++ b/vcpkg/ports/cppfs/CONTROL @@ -0,0 +1,8 @@ +Source: cppfs +Version: 1.3.0 +Description: Cross-platform C++ file system library supporting multiple backends +Supports: !uwp + +Feature: ssh +Description: SSH backend for cppfs +Build-Depends: libssh2,openssl,zlib diff --git a/vcpkg/ports/cppfs/LibCrypto-fix.patch b/vcpkg/ports/cppfs/LibCrypto-fix.patch new file mode 100644 index 0000000..144d2aa --- /dev/null +++ b/vcpkg/ports/cppfs/LibCrypto-fix.patch @@ -0,0 +1,53 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ea9fd15..af63d1e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -7,7 +7,7 @@ + cmake_minimum_required(VERSION 3.0 FATAL_ERROR) + + # Include cmake modules +-list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") ++# list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + + include(GenerateExportHeader) + +diff --git a/source/cppfs/CMakeLists.txt b/source/cppfs/CMakeLists.txt +index aa37eda..d29176a 100644 +--- a/source/cppfs/CMakeLists.txt ++++ b/source/cppfs/CMakeLists.txt +@@ -4,18 +4,18 @@ + # + + find_package(LibSSH2) +-find_package(LibCrypto) ++# find_package(LibCrypto) + find_package(ZLIB) + find_package(OpenSSL) + +-if (LibSSH2_FOUND AND LibCrypto_FOUND AND ZLIB_FOUND AND OpenSSL_FOUND) ++if (LibSSH2_FOUND AND ZLIB_FOUND AND OpenSSL_FOUND) + set(SSH_DEPS_MET TRUE) + else() + set(SSH_DEPS_MET FALSE) + endif() + + if (OPTION_BUILD_SSH_BACKEND AND NOT SSH_DEPS_MET) +- message(FATAL_ERROR "Requested to build ssh module but not all dependencies are found! LibSSH2: ${LibSSH2_FOUND}, LibCrypto: ${LibCrypto_FOUND}, ZLIB: ${ZLIB_FOUND}, OpenSSL: ${OpenSSL_FOUND}") ++ message(FATAL_ERROR "Requested to build ssh module but not all dependencies are found! LibSSH2: ${LibSSH2_FOUND}, ZLIB: ${ZLIB_FOUND}, OpenSSL: ${OpenSSL_FOUND}") + endif() + + +@@ -207,10 +207,9 @@ target_link_libraries(${target} + if (OPTION_BUILD_SSH_BACKEND) + target_link_libraries(${target} + PRIVATE +- ${OPENSSL_LIBRARIES} +- ${LIBSSH2_LIBRARY} +- ${LIBCRYPTO_LIBRARY} +- ${ZLIB_LIBRARY} ++ Libssh2::libssh2 ++ OpenSSL::SSL OpenSSL::Crypto ++ ZLIB::ZLIB + ) + + if("${CMAKE_SYSTEM_NAME}" MATCHES "Windows") diff --git a/vcpkg/ports/cppfs/cmake-export-fix.patch b/vcpkg/ports/cppfs/cmake-export-fix.patch new file mode 100644 index 0000000..3447000 --- /dev/null +++ b/vcpkg/ports/cppfs/cmake-export-fix.patch @@ -0,0 +1,46 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ea9fd15..c62c6fd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -124,7 +124,7 @@ endif() + if((UNIX AND SYSTEM_DIR_INSTALL) OR OPTION_FORCE_SYSTEM_DIR_INSTALL) + # Install into the system (/usr/bin or /usr/local/bin) + set(INSTALL_ROOT "share/${project}") # /usr/[local]/share/ +- set(INSTALL_CMAKE "share/${project}/cmake") # /usr/[local]/share//cmake ++ set(INSTALL_CMAKE "share/${project}") # /usr/[local]/share/ + set(INSTALL_EXAMPLES "share/${project}") # /usr/[local]/share/ + set(INSTALL_DATA "share/${project}") # /usr/[local]/share/ + set(INSTALL_BIN "bin") # /usr/[local]/bin +@@ -183,7 +183,7 @@ add_subdirectory(deploy) + install(FILES "${PROJECT_BINARY_DIR}/VERSION" DESTINATION ${INSTALL_ROOT} COMPONENT runtime) + + # Install cmake find script for the project +-install(FILES ${META_PROJECT_NAME}-config.cmake DESTINATION ${INSTALL_ROOT} COMPONENT dev) ++# install(FILES ${META_PROJECT_NAME}-config.cmake DESTINATION ${INSTALL_ROOT} COMPONENT dev) + + # Install the project meta files + install(FILES AUTHORS DESTINATION ${INSTALL_ROOT} COMPONENT runtime) +diff --git a/source/cppfs/CMakeLists.txt b/source/cppfs/CMakeLists.txt +index aa37eda..e8a59e0 100644 +--- a/source/cppfs/CMakeLists.txt ++++ b/source/cppfs/CMakeLists.txt +@@ -283,7 +283,7 @@ perform_health_checks( + + # Library + install(TARGETS ${target} +- EXPORT "${target}-export" COMPONENT dev ++ EXPORT "${target}-config" COMPONENT dev + RUNTIME DESTINATION ${INSTALL_BIN} COMPONENT runtime + LIBRARY DESTINATION ${INSTALL_SHARED} COMPONENT runtime + ARCHIVE DESTINATION ${INSTALL_LIB} COMPONENT dev +@@ -302,8 +302,8 @@ install(DIRECTORY + ) + + # CMake config +-install(EXPORT ${target}-export ++install(EXPORT ${target}-config + NAMESPACE ${META_PROJECT_NAME}:: +- DESTINATION ${INSTALL_CMAKE}/${target} ++ DESTINATION ${INSTALL_CMAKE} + COMPONENT dev + ) diff --git a/vcpkg/ports/cppfs/portfile.cmake b/vcpkg/ports/cppfs/portfile.cmake new file mode 100644 index 0000000..7f612e8 --- /dev/null +++ b/vcpkg/ports/cppfs/portfile.cmake @@ -0,0 +1,44 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cginternals/cppfs + REF 156d72e2cf0a9b12bdce369fc5b5d98fb5dffe2d # v1.3.0 + SHA512 da1e09f79d9e65e7676784f47196645aabe1e1284f0ea5e48e845a244f5d49f5ea4b032f9e2e38c8e6a29657ebe636c9b1c9a4601c4bbc7637e7f592c52a8961 + HEAD_REF master + PATCHES + LibCrypto-fix.patch + cmake-export-fix.patch +) + +if(${TARGET_TRIPLET} MATCHES "uwp") + message(FATAL_ERROR "cppfs does not support uwp") +endif() + +set(SSH_BACKEND OFF) +if("ssh" IN_LIST FEATURES) + set(SSH_BACKEND ON) + if("${VCPKG_TARGET_ARCHITECTURE}" STREQUAL "arm64") + message(FATAL_ERROR "SSH backend of cppfs does not support arm64.") + endif() +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DOPTION_BUILD_SSH_BACKEND=${SSH_BACKEND} + -DOPTION_BUILD_TESTS=Off + -DOPTION_FORCE_SYSTEM_DIR_INSTALL=On +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppfs RENAME copyright) + +vcpkg_test_cmake(PACKAGE_NAME cppfs) diff --git a/vcpkg/ports/cppgraphqlgen/CONTROL b/vcpkg/ports/cppgraphqlgen/CONTROL new file mode 100644 index 0000000..e723be2 --- /dev/null +++ b/vcpkg/ports/cppgraphqlgen/CONTROL @@ -0,0 +1,5 @@ +Source: cppgraphqlgen +Version: 3.2.3 +Build-Depends: boost-filesystem (!uwp&!windows), boost-program-options, pegtl, rapidjson +Description: C++ GraphQL schema service generator +Homepage: https://github.com/microsoft/cppgraphqlgen diff --git a/vcpkg/ports/cppgraphqlgen/portfile.cmake b/vcpkg/ports/cppgraphqlgen/portfile.cmake new file mode 100644 index 0000000..e298cf3 --- /dev/null +++ b/vcpkg/ports/cppgraphqlgen/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO microsoft/cppgraphqlgen + REF f43fbf4abe82cb598d34824210ec86b50e8c070c # v3.2.3 + SHA512 e9d2df8aba1942847ef8d3eef75fe72d0b32ae9a47cd183391935d1d89ce30951fc4619f16512c0e0e56b873c9030db09424af6369f5145faaa2549084b983d8 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DGRAPHQL_BUILD_TESTS=OFF -DGRAPHQL_UPDATE_SAMPLES=OFF + OPTIONS_RELEASE -DGRAPHQL_INSTALL_CMAKE_DIR=${CURRENT_PACKAGES_DIR}/share -DGRAPHQL_INSTALL_TOOLS_DIR=${CURRENT_PACKAGES_DIR}/tools + OPTIONS_DEBUG -DGRAPHQL_INSTALL_CMAKE_DIR=${CURRENT_PACKAGES_DIR}/debug/share -DGRAPHQL_INSTALL_TOOLS_DIR=${CURRENT_PACKAGES_DIR}/debug/tools +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets() + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/cppgraphqlgen) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/cppitertools/CONTROL b/vcpkg/ports/cppitertools/CONTROL new file mode 100644 index 0000000..f741883 --- /dev/null +++ b/vcpkg/ports/cppitertools/CONTROL @@ -0,0 +1,5 @@ +Source: cppitertools +Version: 2.0 +Homepage: https://github.com/ryanhaining/cppitertools +Description: Range-based for loop add-ons inspired by the Python builtins and itertools library +Build-Depends: boost-optional diff --git a/vcpkg/ports/cppitertools/fix-cmake-install-dir.patch b/vcpkg/ports/cppitertools/fix-cmake-install-dir.patch new file mode 100644 index 0000000..e3591f9 --- /dev/null +++ b/vcpkg/ports/cppitertools/fix-cmake-install-dir.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3caa411..775ce02 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -14,7 +14,7 @@ add_library(cppitertools::cppitertools ALIAS cppitertools) + + target_include_directories(cppitertools INTERFACE + $ +- $ ++ $ + ) + + +@@ -37,5 +37,5 @@ install(EXPORT cppitertools-targets + DESTINATION ${cppitertools_INSTALL_CMAKE_DIR}/cppitertools + ) + +-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cppitertools-config-version.cmake DESTINATION ${cppitertools_INSTALL_CMAKE_DIR}) ++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cppitertools-config-version.cmake DESTINATION ${cppitertools_INSTALL_CMAKE_DIR}/cppitertools) + install(DIRECTORY . DESTINATION ${cppitertools_INSTALL_INCLUDE_DIR}/cppitertools) diff --git a/vcpkg/ports/cppitertools/portfile.cmake b/vcpkg/ports/cppitertools/portfile.cmake new file mode 100644 index 0000000..81ba947 --- /dev/null +++ b/vcpkg/ports/cppitertools/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ryanhaining/cppitertools + REF d716cf6c8281ab6383d1fbecb456e0b9d808694c + SHA512 47bc490d798b445e965169a754dc977d5add217f133130671301dee6294744fa4b3f7a3b146cbd002c31325e5bc7c2206d57560a6db58693ca13ca972ca09d39 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -Dcppitertools_INSTALL_CMAKE_DIR=share +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/share/cppitertools-config-version.cmake) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.md + DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppitertools + RENAME copyright) diff --git a/vcpkg/ports/cppkafka/CONTROL b/vcpkg/ports/cppkafka/CONTROL new file mode 100644 index 0000000..5dec433 --- /dev/null +++ b/vcpkg/ports/cppkafka/CONTROL @@ -0,0 +1,5 @@ +Source: cppkafka +Version: 0.3.1-2 +Homepage: https://github.com/mfontanini/cppkafka +Description: cppkafka allows C++ applications to consume and produce messages using the Apache Kafka protocol. The library is built on top of librdkafka, and provides a high level API that uses modern C++ features to make it easier to write code while keeping the wrapper's performance overhead to a minimum. +Build-Depends: boost-program-options, librdkafka diff --git a/vcpkg/ports/cppkafka/fix-dynamic.patch b/vcpkg/ports/cppkafka/fix-dynamic.patch new file mode 100644 index 0000000..f18a0fb --- /dev/null +++ b/vcpkg/ports/cppkafka/fix-dynamic.patch @@ -0,0 +1,12 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 5d31078..b1d3634 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -43,6 +43,7 @@ target_include_directories(cppkafka PUBLIC ${PROJECT_SOURCE_DIR}/include) + + install( + TARGETS cppkafka ++ RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + COMPONENT dev diff --git a/vcpkg/ports/cppkafka/portfile.cmake b/vcpkg/ports/cppkafka/portfile.cmake new file mode 100644 index 0000000..fbb6e3b --- /dev/null +++ b/vcpkg/ports/cppkafka/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mfontanini/cppkafka + REF v0.3.1 + SHA512 60d01ce1dd9bd9119676be939ed5ab03539abb1f945c1b31e432edfe0f06542778f7fef37696f5ff19c53024f44d5cbd8aeddbbb231c38b098e05285d3ff0cab + HEAD_REF master + PATCHES fix-dynamic.patch +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(CPPKAFKA_BUILD_SHARED OFF) +else() + set(CPPKAFKA_BUILD_SHARED ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCPPKAFKA_BUILD_SHARED=${CPPKAFKA_BUILD_SHARED} + -DCPPKAFKA_DISABLE_TESTS=ON + -DCPPKAFKA_DISABLE_EXAMPLES=ON +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/cppmicroservices/CONTROL b/vcpkg/ports/cppmicroservices/CONTROL new file mode 100644 index 0000000..9174819 --- /dev/null +++ b/vcpkg/ports/cppmicroservices/CONTROL @@ -0,0 +1,5 @@ +Source: cppmicroservices +Version: 3.4.0-1 +Homepage: https://github.com/CppMicroServices/CppMicroServices +Description: An OSGi-like C++ dynamic module system and service registry +Build-Depends: gtest \ No newline at end of file diff --git a/vcpkg/ports/cppmicroservices/fix-dependency-gtest.patch b/vcpkg/ports/cppmicroservices/fix-dependency-gtest.patch new file mode 100644 index 0000000..9eb9459 --- /dev/null +++ b/vcpkg/ports/cppmicroservices/fix-dependency-gtest.patch @@ -0,0 +1,24 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 136edff..9d29522 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -288,6 +288,10 @@ if(US_COMPILER_APPLE_CLANG OR US_COMPILER_CLANG) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") + endif() + ++# Dependency ++find_package(GTest CONFIG REQUIRED) ++link_libraries(GTest::gtest GTest::gmock) ++ + #----------------------------------------------------------------------------- + # Testing configuration + #----------------------------------------------------------------------------- +@@ -338,7 +342,7 @@ if(US_BUILD_TESTING) + endif() + + if(US_USE_SYSTEM_GTEST) +- find_package(GTest REQUIRED) ++ find_package(GTest CONFIG REQUIRED) + else() + # This keeps GTest CMake variables hidden from users unless they explicitly want to view/modify them. + us_cache_var(BUILD_GMOCK ON BOOL "Build GMock" ADVANCED FORCE) diff --git a/vcpkg/ports/cppmicroservices/portfile.cmake b/vcpkg/ports/cppmicroservices/portfile.cmake new file mode 100644 index 0000000..47df1e1 --- /dev/null +++ b/vcpkg/ports/cppmicroservices/portfile.cmake @@ -0,0 +1,36 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO "CppMicroServices/CppMicroservices" + REF b4d3d404df01d67dfd7fc36111bc5de50e1b89d6 # v3.4.0 + SHA512 b4a55f7c86cae25e936a237108b82824458b123fa1c14d4e0218c72c444a6d7f0db8900409af321225ec818f5691894b01fd311c606463386e7ce8e81e3656c8 + HEAD_REF development + PATCHES + werror.patch + fix-dependency-gtest.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DTOOLS_INSTALL_DIR:STRING=tools/cppmicroservices + -DAUXILIARY_INSTALL_DIR:STRING=share/cppmicroservices + -DUS_USE_SYSTEM_GTEST=TRUE +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + + +vcpkg_fixup_cmake_targets() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# CppMicroServices uses a custom resource compiler to compile resources +# the zipped resources are then appended to the target which cause the linker to crash +# when compiling a static library +if(NOT BUILD_SHARED_LIBS) + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +endif() \ No newline at end of file diff --git a/vcpkg/ports/cppmicroservices/werror.patch b/vcpkg/ports/cppmicroservices/werror.patch new file mode 100644 index 0000000..b06f43a --- /dev/null +++ b/vcpkg/ports/cppmicroservices/werror.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 24fd87e..974064c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -382,7 +382,7 @@ else() + usFunctionCheckCompilerFlags(-fstack-protector-all US_CXX_FLAGS) + endif() + +- foreach(_cxxflag -Werror -Wall -Wextra -Wpointer-arith -Winvalid-pch -Wcast-align ++ foreach(_cxxflag -Wall -Wextra -Wpointer-arith -Winvalid-pch -Wcast-align + -Wwrite-strings -Woverloaded-virtual -Wnon-virtual-dtor -Wold-style-cast + -Wstrict-null-sentinel -Wsign-promo -fdiagnostics-show-option ) + usFunctionCheckCompilerFlags(${_cxxflag} US_CXX_FLAGS) diff --git a/vcpkg/ports/cpprestsdk/CONTROL b/vcpkg/ports/cpprestsdk/CONTROL new file mode 100644 index 0000000..30f24ed --- /dev/null +++ b/vcpkg/ports/cpprestsdk/CONTROL @@ -0,0 +1,26 @@ +Source: cpprestsdk +Version: 2.10.16-3 +Build-Depends: openssl (!uwp&!windows), boost-system (!uwp&!windows), + boost-date-time (!uwp&!windows), boost-regex (!uwp&!windows), boost-thread (!uwp&!windows), + boost-filesystem (!uwp&!windows), boost-random (!uwp&!windows), boost-chrono (!uwp&!windows), + boost-asio (!uwp&!windows) +Homepage: https://github.com/Microsoft/cpprestsdk +Description: C++11 JSON, REST, and OAuth library + The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services. +Default-Features: default-features + +Feature: default-features +Build-Depends: cpprestsdk[brotli] (windows), cpprestsdk[core,compression] +Description: Features installed by default + +Feature: compression +Build-Depends: zlib +Description: HTTP Compression support + +Feature: websockets +Build-Depends: cpprestsdk[core,compression], websocketpp (!uwp), openssl (!uwp), boost-system (!uwp), boost-date-time (!uwp), boost-regex (!uwp) +Description: Websockets support + +Feature: brotli +Build-Depends: cpprestsdk[core,compression], brotli +Description: Brotli compression support diff --git a/vcpkg/ports/cpprestsdk/fix-find-openssl.patch b/vcpkg/ports/cpprestsdk/fix-find-openssl.patch new file mode 100644 index 0000000..ec420e6 --- /dev/null +++ b/vcpkg/ports/cpprestsdk/fix-find-openssl.patch @@ -0,0 +1,18 @@ +diff --git a/Release/cmake/cpprest_find_openssl.cmake b/Release/cmake/cpprest_find_openssl.cmake +index 9333663..c1df089 100644 +--- a/Release/cmake/cpprest_find_openssl.cmake ++++ b/Release/cmake/cpprest_find_openssl.cmake +@@ -36,8 +36,11 @@ function(cpprest_find_openssl) + # Prefer a homebrew version of OpenSSL over the one in /usr/lib + file(GLOB OPENSSL_ROOT_DIR /usr/local/Cellar/openssl*/*) + # Prefer the latest (make the latest one first) +- list(REVERSE OPENSSL_ROOT_DIR) +- list(GET OPENSSL_ROOT_DIR 0 OPENSSL_ROOT_DIR) ++ if(OPENSSL_ROOT_DIR) ++ # Prefer the latest (make the latest one first) ++ list(REVERSE OPENSSL_ROOT_DIR) ++ list(GET OPENSSL_ROOT_DIR 0 OPENSSL_ROOT_DIR) ++ endif() + endif() + # This should prevent linking against the system provided 0.9.8y + message(STATUS "OPENSSL_ROOT_DIR = ${OPENSSL_ROOT_DIR}") diff --git a/vcpkg/ports/cpprestsdk/portfile.cmake b/vcpkg/ports/cpprestsdk/portfile.cmake new file mode 100644 index 0000000..a9f1ce3 --- /dev/null +++ b/vcpkg/ports/cpprestsdk/portfile.cmake @@ -0,0 +1,53 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/cpprestsdk + REF v2.10.16 + SHA512 d850b26051439dd10edcecd006075c64c61c565193cd76870af175bd343a72ecc59485deb0f907807071a57dd256b67139ad5d016f19cb38f7142357f430be1c + HEAD_REF master + PATCHES fix-find-openssl.patch +) + +set(OPTIONS) +if(NOT VCPKG_TARGET_IS_UWP) + SET(WEBSOCKETPP_PATH "${CURRENT_INSTALLED_DIR}/share/websocketpp") + list(APPEND OPTIONS + -DWEBSOCKETPP_CONFIG=${WEBSOCKETPP_PATH} + -DWEBSOCKETPP_CONFIG_VERSION=${WEBSOCKETPP_PATH}) +endif() + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES + brotli CPPREST_EXCLUDE_BROTLI + compression CPPREST_EXCLUDE_COMPRESSION + websockets CPPREST_EXCLUDE_WEBSOCKETS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/Release + PREFER_NINJA + OPTIONS + ${OPTIONS} + ${FEATURE_OPTIONS} + -DBUILD_TESTS=OFF + -DBUILD_SAMPLES=OFF + -DCPPREST_EXPORT_DIR=share/cpprestsdk + -DWERROR=OFF + -DPKG_CONFIG_EXECUTABLE=FALSE + OPTIONS_DEBUG + -DCPPREST_INSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/share/${PORT}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/share ${CURRENT_PACKAGES_DIR}/lib/share) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/cpprest/details/cpprest_compat.h + "#ifdef _NO_ASYNCRTIMP" "#if 1") +endif() + +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/cpptoml/CONTROL b/vcpkg/ports/cpptoml/CONTROL new file mode 100644 index 0000000..2409ddb --- /dev/null +++ b/vcpkg/ports/cpptoml/CONTROL @@ -0,0 +1,3 @@ +Source: cpptoml +Version: v0.1.1 +Description: A header-only library for parsing TOML configuration files. diff --git a/vcpkg/ports/cpptoml/portfile.cmake b/vcpkg/ports/cpptoml/portfile.cmake new file mode 100644 index 0000000..093feb9 --- /dev/null +++ b/vcpkg/ports/cpptoml/portfile.cmake @@ -0,0 +1,16 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO skystrife/cpptoml + + REF fededad7169e538ca47e11a9ee9251bc361a9a65 + SHA512 2ec50f4585bca33bb343170470048a7d7e7902f1ffa5709cf84ddf9f53a899ff1cc9ffa49e059f6dad93d13823c4d2661bc8109e4356078cdbdfef1a2be6a622 + + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.h") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cpptoml RENAME copyright) diff --git a/vcpkg/ports/cppunit/0001-static-crt-linkage.patch b/vcpkg/ports/cppunit/0001-static-crt-linkage.patch new file mode 100644 index 0000000..f058c32 --- /dev/null +++ b/vcpkg/ports/cppunit/0001-static-crt-linkage.patch @@ -0,0 +1,40 @@ +diff --git a/src/cppunit/cppunit.vcxproj b/src/cppunit/cppunit.vcxproj +index 0367d20..f799518 100644 +--- a/src/cppunit/cppunit.vcxproj ++++ b/src/cppunit/cppunit.vcxproj +@@ -84,7 +84,7 @@ + + + +- MultiThreadedDLL ++ MultiThreaded + OnlyExplicitInline + true + true +@@ -119,7 +119,7 @@ + + + +- MultiThreadedDLL ++ MultiThreaded + OnlyExplicitInline + true + true +@@ -154,7 +154,7 @@ + + + +- MultiThreadedDebugDLL ++ MultiThreadedDebug + Default + false + Disabled +@@ -189,7 +189,7 @@ + + + +- MultiThreadedDebugDLL ++ MultiThreadedDebug + Default + false + Disabled diff --git a/vcpkg/ports/cppunit/CONTROL b/vcpkg/ports/cppunit/CONTROL new file mode 100644 index 0000000..9c3dee7 --- /dev/null +++ b/vcpkg/ports/cppunit/CONTROL @@ -0,0 +1,3 @@ +Source: cppunit +Version: 1.14.0-1 +Description: CppUnit is the C++ port of the famous JUnit framework for unit testing. Test output is in XML for automatic testing and GUI based for supervised tests. \ No newline at end of file diff --git a/vcpkg/ports/cppunit/portfile.cmake b/vcpkg/ports/cppunit/portfile.cmake new file mode 100644 index 0000000..b2b836f --- /dev/null +++ b/vcpkg/ports/cppunit/portfile.cmake @@ -0,0 +1,58 @@ +include(vcpkg_common_functions) + +if(NOT VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "\n${PORT} does not support your system, only Windows for now. Please open a ticket issue on github.com/microsoft/vcpkg if necessary\n") +endif() + +set(VERSION 1.14.0) +if (VCPKG_CRT_LINKAGE STREQUAL static) + set(STATIC_PATCH "0001-static-crt-linkage.patch") +endif() + +vcpkg_download_distfile(ARCHIVE + URLS "http://dev-www.libreoffice.org/src/cppunit-${VERSION}.tar.gz" + FILENAME "cppunit-${VERSION}.tar.gz" + SHA512 4ea1da423c6f7ab37e4144689f593396829ce74d43872d6b10709c1ad5fbda4ee945842f7e9803592520ef81ac713e95a3fe130295bf048cd32a605d1959882e +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + ${STATIC_PATCH} +) + +if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") + set(BUILD_ARCH "Win32") + set(OUTPUT_DIR "Win32") +elseif (VCPKG_TARGET_ARCHITECTURE MATCHES "x64") + set(BUILD_ARCH "x64") +else() + message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/src/cppunit/cppunit_dll.vcxproj + PLATFORM ${BUILD_ARCH}) +elseif (VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/src/cppunit/cppunit.vcxproj + PLATFORM ${BUILD_ARCH}) +endif() + +file(COPY ${SOURCE_PATH}/include/cppunit DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.h) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(COPY ${SOURCE_PATH}/lib/cppunitd_dll.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(COPY ${SOURCE_PATH}/lib/cppunitd_dll.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(COPY ${SOURCE_PATH}/lib/cppunit_dll.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(COPY ${SOURCE_PATH}/lib/cppunit_dll.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +elseif (VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(COPY ${SOURCE_PATH}/lib/cppunitd.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(COPY ${SOURCE_PATH}/lib/cppunit.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +endif() + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppunit RENAME copyright) diff --git a/vcpkg/ports/cpputest/CONTROL b/vcpkg/ports/cpputest/CONTROL new file mode 100644 index 0000000..7d08408 --- /dev/null +++ b/vcpkg/ports/cpputest/CONTROL @@ -0,0 +1,4 @@ +Source: cpputest +Version: 2019-9-16-1 +Homepage: https://github.com/cpputest/cpputest +Description: CppUTest unit testing and mocking framework for C/C++. \ No newline at end of file diff --git a/vcpkg/ports/cpputest/fix-arm-build-error.patch b/vcpkg/ports/cpputest/fix-arm-build-error.patch new file mode 100644 index 0000000..5b017cb --- /dev/null +++ b/vcpkg/ports/cpputest/fix-arm-build-error.patch @@ -0,0 +1,20 @@ +diff --git a/tests/CppUTest/CMakeLists.txt b/tests/CppUTest/CMakeLists.txt +index 7df07c1..d7317aa 100644 +--- a/tests/CppUTest/CMakeLists.txt ++++ b/tests/CppUTest/CMakeLists.txt +@@ -56,4 +56,4 @@ add_executable(CppUTestTests ${CppUTestTests_src}) + cpputest_normalize_test_output_location(CppUTestTests) + target_link_libraries(CppUTestTests CppUTest ${THREAD_LIB}) + +-cpputest_buildtime_discover_tests(CppUTestTests) ++#cpputest_buildtime_discover_tests(CppUTestTests) +diff --git a/tests/CppUTestExt/CMakeLists.txt b/tests/CppUTestExt/CMakeLists.txt +index b83ceb2..2abf274 100644 +--- a/tests/CppUTestExt/CMakeLists.txt ++++ b/tests/CppUTestExt/CMakeLists.txt +@@ -37,4 +37,4 @@ endif (MINGW) + add_executable(CppUTestExtTests ${CppUTestExtTests_src}) + cpputest_normalize_test_output_location(CppUTestExtTests) + target_link_libraries(CppUTestExtTests CppUTest CppUTestExt ${THREAD_LIB} ${CPPUNIT_EXTERNAL_LIBRARIES}) +-cpputest_buildtime_discover_tests(CppUTestExtTests) ++#cpputest_buildtime_discover_tests(CppUTestExtTests) diff --git a/vcpkg/ports/cpputest/portfile.cmake b/vcpkg/ports/cpputest/portfile.cmake new file mode 100644 index 0000000..4745ea4 --- /dev/null +++ b/vcpkg/ports/cpputest/portfile.cmake @@ -0,0 +1,60 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cpputest/cpputest + REF 4699da9942a1bdcc33e2a8c8a48e863b0f18188e + SHA512 6f588691f1b4092b3be8167ab09f3a4a64c34715ac9397210724121d161024a43b12a88198b02b0cc8da7d72406670daaf375bb64cc4cf92c8bd2479e7a881bc + HEAD_REF master + PATCHES + fix-arm-build-error.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/CppUTest/cmake TARGET_PATH share/CppUTest) +if (EXISTS ${CURRENT_PACKAGES_DIR}/lib/CppUTest) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/CppUTest) +endif() + +if (EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/CppUTest) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/CppUTest) +endif() + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(GLOB CPPUTEST_LIBS ${CURRENT_PACKAGES_DIR}/lib/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}) + file(COPY ${CPPUTEST_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(REMOVE ${CPPUTEST_LIBS}) + + file(READ ${CURRENT_PACKAGES_DIR}/share/CppUTest/CppUTestTargets-release.cmake RELEASE_CONFIG) + # Replace CppUTestExt first + string(REPLACE "\${_IMPORT_PREFIX}/lib/" + "\${_IMPORT_PREFIX}/lib/manual-link/" RELEASE_CONFIG "${RELEASE_CONFIG}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/CppUTest/CppUTestTargets-release.cmake "${RELEASE_CONFIG}") +endif() + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(GLOB CPPUTEST_LIBS ${CURRENT_PACKAGES_DIR}/debug/lib/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}) + file(COPY ${CPPUTEST_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(REMOVE ${CPPUTEST_LIBS}) + + file(READ ${CURRENT_PACKAGES_DIR}/share/CppUTest/CppUTestTargets-debug.cmake DEBUG_CONFIG) + # Replace CppUTestExt first + string(REPLACE "\${_IMPORT_PREFIX}/debug/lib/" + "\${_IMPORT_PREFIX}/debug/lib/manual-link/" DEBUG_CONFIG "${DEBUG_CONFIG}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/CppUTest/CppUTestTargets-debug.cmake "${DEBUG_CONFIG}") +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/cppwinrt/CONTROL b/vcpkg/ports/cppwinrt/CONTROL new file mode 100644 index 0000000..df7cff0 --- /dev/null +++ b/vcpkg/ports/cppwinrt/CONTROL @@ -0,0 +1,4 @@ +Source: cppwinrt +Version: fall_2017_creators_update_for_vs_15.3-2 +Homepage: https://github.com/Microsoft/cppwinrt +Description: C++/WinRT is a standard C++ language projection for the Windows Runtime. diff --git a/vcpkg/ports/cppwinrt/portfile.cmake b/vcpkg/ports/cppwinrt/portfile.cmake new file mode 100644 index 0000000..ec1cb06 --- /dev/null +++ b/vcpkg/ports/cppwinrt/portfile.cmake @@ -0,0 +1,21 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/cppwinrt + REF fall_2017_creators_update_for_vs_15.3 + SHA512 e3f987ed3f3dce019b8bf9f5451e53b42357473a003b8c14f9009e1848ee0463286bd46fdc3c739c8f7c2d232707e8018f5c087ffae784c745d51a8143f9a294 + HEAD_REF master +) + +# Put the licence file where vcpkg expects it +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppwinrt) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/cppwinrt/LICENSE ${CURRENT_PACKAGES_DIR}/share/cppwinrt/copyright) + +# Copy the cppwinrt header files +file(GLOB HEADER_FILES ${SOURCE_PATH}/10.0.16299.0/winrt/*) +file( + COPY ${HEADER_FILES} + DESTINATION ${CURRENT_PACKAGES_DIR}/include/winrt + REGEX "\.(gitattributes|gitignore)$" EXCLUDE +) diff --git a/vcpkg/ports/cppzmq/CONTROL b/vcpkg/ports/cppzmq/CONTROL new file mode 100644 index 0000000..71621f1 --- /dev/null +++ b/vcpkg/ports/cppzmq/CONTROL @@ -0,0 +1,5 @@ +Source: cppzmq +Version: 4.6.0 +Build-Depends: zeromq +Homepage: https://github.com/zeromq/cppzmq +Description: lightweight messaging kernel, C++ bindings diff --git a/vcpkg/ports/cppzmq/portfile.cmake b/vcpkg/ports/cppzmq/portfile.cmake new file mode 100644 index 0000000..32e2bce --- /dev/null +++ b/vcpkg/ports/cppzmq/portfile.cmake @@ -0,0 +1,25 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zeromq/cppzmq + REF 8d5c9a88988dcbebb72939ca0939d432230ffde1 # v4.6.0 + SHA512 45f94a8473cafa6a764a7b4d037284ce2fabbc542a763865f7af6885ebe44498f06215092e4bf4f5d7d26b2fb5585316ed022e300e9c2a8b9647284a444345b2 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DCPPZMQ_BUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/cppzmq) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/share/cppzmq/libzmq-pkg-config) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppzmq) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/cppzmq/LICENSE ${CURRENT_PACKAGES_DIR}/share/cppzmq/copyright) diff --git a/vcpkg/ports/cpr/001-cpr-config.patch b/vcpkg/ports/cpr/001-cpr-config.patch new file mode 100644 index 0000000..9b9b113 --- /dev/null +++ b/vcpkg/ports/cpr/001-cpr-config.patch @@ -0,0 +1,94 @@ +diff --git a/cpr/CMakeLists.txt b/cpr/CMakeLists.txt +index a6db5bd..90bec48 100644 +--- a/cpr/CMakeLists.txt ++++ b/cpr/CMakeLists.txt +@@ -1,47 +1,46 @@ +-message(STATUS "Using CURL_INCLUDE_DIRS: ${CURL_INCLUDE_DIRS}.") +-include_directories( +- ${CPR_INCLUDE_DIRS} +- ${CURL_INCLUDE_DIRS}) +- + add_library(${CPR_LIBRARIES} ++ auth.cpp ++ cookies.cpp ++ cprtypes.cpp ++ digest.cpp ++ error.cpp ++ multipart.cpp ++ parameters.cpp ++ payload.cpp ++ proxies.cpp ++ session.cpp ++ timeout.cpp ++ util.cpp ++ ssl_options.cpp ++) ++ ++target_link_libraries( ${CPR_LIBRARIES} ++ PUBLIC ${CURL_LIBRARIES} ++) ++ ++target_include_directories(${CPR_LIBRARIES} ++ PUBLIC ++ $ ++ $ ++ PRIVATE ++ $ ++) ++ + +- # Source files +- auth.cpp +- cookies.cpp +- cprtypes.cpp +- digest.cpp +- error.cpp +- multipart.cpp +- parameters.cpp +- payload.cpp +- proxies.cpp +- session.cpp +- timeout.cpp +- util.cpp +- ssl_options.cpp ++set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets") ++install( ++ TARGETS ${CPR_LIBRARIES} ++ EXPORT ${TARGETS_EXPORT_NAME} ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) + +- # Header files (useful in IDEs) +- "${CPR_INCLUDE_DIRS}/cpr/api.h" +- "${CPR_INCLUDE_DIRS}/cpr/auth.h" +- "${CPR_INCLUDE_DIRS}/cpr/body.h" +- "${CPR_INCLUDE_DIRS}/cpr/cookies.h" +- "${CPR_INCLUDE_DIRS}/cpr/cpr.h" +- "${CPR_INCLUDE_DIRS}/cpr/cprtypes.h" +- "${CPR_INCLUDE_DIRS}/cpr/curlholder.h" +- "${CPR_INCLUDE_DIRS}/cpr/defines.h" +- "${CPR_INCLUDE_DIRS}/cpr/digest.h" +- "${CPR_INCLUDE_DIRS}/cpr/error.h" +- "${CPR_INCLUDE_DIRS}/cpr/max_redirects.h" +- "${CPR_INCLUDE_DIRS}/cpr/multipart.h" +- "${CPR_INCLUDE_DIRS}/cpr/parameters.h" +- "${CPR_INCLUDE_DIRS}/cpr/payload.h" +- "${CPR_INCLUDE_DIRS}/cpr/proxies.h" +- "${CPR_INCLUDE_DIRS}/cpr/response.h" +- "${CPR_INCLUDE_DIRS}/cpr/session.h" +- "${CPR_INCLUDE_DIRS}/cpr/timeout.h" +- "${CPR_INCLUDE_DIRS}/cpr/util.h" +- "${CPR_INCLUDE_DIRS}/cpr/ssl_options.h") ++install( ++ EXPORT ${TARGETS_EXPORT_NAME} ++ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" ++) + +-message(STATUS "Using CURL_LIBRARIES: ${CURL_LIBRARIES}.") +-target_link_libraries(${CPR_LIBRARIES} +- ${CURL_LIBRARIES}) ++if (NOT DISABLE_INSTALL_HEADERS) ++ install(DIRECTORY ${CPR_INCLUDE_DIRS}/cpr DESTINATION include) ++endif() diff --git a/vcpkg/ports/cpr/002_cpr_fixcase.patch b/vcpkg/ports/cpr/002_cpr_fixcase.patch new file mode 100644 index 0000000..4dbc971 --- /dev/null +++ b/vcpkg/ports/cpr/002_cpr_fixcase.patch @@ -0,0 +1,13 @@ +diff --git a/cpr/error.cpp b/cpr/error.cpp +index 713cb10..4143f93 100644 +--- a/cpr/error.cpp ++++ b/cpr/error.cpp +@@ -38,8 +38,6 @@ ErrorCode Error::getErrorCodeForCurlError(std::int32_t curl_code) { + return ErrorCode::SSL_LOCAL_CERTIFICATE_ERROR; + case CURLE_SSL_CIPHER: + return ErrorCode::GENERIC_SSL_ERROR; +- case CURLE_SSL_CACERT: +- return ErrorCode::SSL_CACERT_ERROR; + case CURLE_USE_SSL_FAILED: + return ErrorCode::GENERIC_SSL_ERROR; + case CURLE_SSL_ENGINE_INITFAILED: diff --git a/vcpkg/ports/cpr/CONTROL b/vcpkg/ports/cpr/CONTROL new file mode 100644 index 0000000..6912c8b --- /dev/null +++ b/vcpkg/ports/cpr/CONTROL @@ -0,0 +1,5 @@ +Source: cpr +Version: 1.3.0-8 +Homepage: https://github.com/whoshuu/cpr +Description: C++ Requests is a simple wrapper around libcurl inspired by the excellent Python Requests project. +Build-Depends: curl[core] diff --git a/vcpkg/ports/cpr/cprConfig.cmake b/vcpkg/ports/cpr/cprConfig.cmake new file mode 100644 index 0000000..85e433c --- /dev/null +++ b/vcpkg/ports/cpr/cprConfig.cmake @@ -0,0 +1,31 @@ +####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() ####### +####### Any changes to this file will be overwritten by the next CMake run #### +####### The input file was Config.cmake.in ######## + +get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE) + +macro(set_and_check _var _file) + set(${_var} "${_file}") + if(NOT EXISTS "${_file}") + message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !") + endif() +endmacro() + +macro(check_required_components _NAME) + foreach(comp ${${_NAME}_FIND_COMPONENTS}) + if(NOT ${_NAME}_${comp}_FOUND) + if(${_NAME}_FIND_REQUIRED_${comp}) + set(${_NAME}_FOUND FALSE) + endif() + endif() + endforeach() +endmacro() + +#################################################################################### + +include("${CMAKE_CURRENT_LIST_DIR}/cprTargets.cmake") +check_required_components("cpr") + +include(CMakeFindDependencyMacro) +find_dependency(ZLIB REQUIRED) +find_dependency(CURL REQUIRED) diff --git a/vcpkg/ports/cpr/enable-install.patch b/vcpkg/ports/cpr/enable-install.patch new file mode 100644 index 0000000..250199e --- /dev/null +++ b/vcpkg/ports/cpr/enable-install.patch @@ -0,0 +1,17 @@ +diff --git a/cpr/CMakeLists.txt b/cpr/CMakeLists.txt +index a6db5bd..b4982d1 100644 +--- a/cpr/CMakeLists.txt ++++ b/cpr/CMakeLists.txt +@@ -45,3 +45,12 @@ add_library(${CPR_LIBRARIES} + message(STATUS "Using CURL_LIBRARIES: ${CURL_LIBRARIES}.") + target_link_libraries(${CPR_LIBRARIES} + ${CURL_LIBRARIES}) ++ ++install(TARGETS ${CPR_LIBRARIES} ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) ++if(NOT DISABLE_INSTALL_HEADERS) ++ install(DIRECTORY ${CPR_INCLUDE_DIRS}/cpr DESTINATION include) ++endif() diff --git a/vcpkg/ports/cpr/portfile.cmake b/vcpkg/ports/cpr/portfile.cmake new file mode 100644 index 0000000..9e2c40a --- /dev/null +++ b/vcpkg/ports/cpr/portfile.cmake @@ -0,0 +1,37 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO whoshuu/cpr + REF 1.3.0 + SHA512 fd08f8a592a5e1fb8dc93158a4850b81575983c08527fb415f65bd9284f93c804c8680d16c548744583cd26b9353a7d4838269cfc59ccb6003da8941f620c273 + HEAD_REF master + PATCHES + 001-cpr-config.patch + 002_cpr_fixcase.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_CPR_TESTS=OFF + -DUSE_SYSTEM_CURL=ON + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/cprConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/lib/cmake/cpr) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/cpr) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cpr) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/cpr/LICENSE ${CURRENT_PACKAGES_DIR}/share/cpr/copyright) diff --git a/vcpkg/ports/cpu-features/portfile.cmake b/vcpkg/ports/cpu-features/portfile.cmake new file mode 100644 index 0000000..e50d5ef --- /dev/null +++ b/vcpkg/ports/cpu-features/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/cpu_features + REF b9593c8b395318bb2bc42683a94f962564cc4664 # 0.4.1 + SHA512 8c12b50741e2979a32b69c788934bee0d00811b7662006c8b493e98d5efeada67ed59460be40c234b2d3bafd85671cb1a1d7c1a6ee535a7fc1cc6ac56a754576 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/CpuFeatures TARGET_PATH share/CpuFeatures) + +if("tools" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES list_cpu_features) +endif() +vcpkg_clean_executables_in_bin(FILE_NAMES list_cpu_features) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/cpu-features/vcpkg.json b/vcpkg/ports/cpu-features/vcpkg.json new file mode 100644 index 0000000..20974bc --- /dev/null +++ b/vcpkg/ports/cpu-features/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "cpu-features", + "version-string": "0.4.1", + "description": "A cross-platform C library to retrieve CPU features (such as available instructions) at runtime", + "homepage": "https://github.com/google/cpu_features", + "license": "Apache-2.0", + "supports": "!(arm | uwp)", + "features": { + "tools": { + "description": "list_cpu_features command line tool" + } + } +} diff --git a/vcpkg/ports/cpuid/CONTROL b/vcpkg/ports/cpuid/CONTROL new file mode 100644 index 0000000..8445533 --- /dev/null +++ b/vcpkg/ports/cpuid/CONTROL @@ -0,0 +1,5 @@ +Source: cpuid +Version: 0.4.1-1 +Homepage: https://github.com/anrieff/libcpuid +Description: Provides CPU identification for the x86 (and x86_64) +Supports: x86 | x64 diff --git a/vcpkg/ports/cpuid/fix-install-headers.patch b/vcpkg/ports/cpuid/fix-install-headers.patch new file mode 100644 index 0000000..d5c9c86 --- /dev/null +++ b/vcpkg/ports/cpuid/fix-install-headers.patch @@ -0,0 +1,13 @@ +diff --git a/libcpuid/CMakeLists.txt b/libcpuid/CMakeLists.txt +index 96533ac..d71953f 100644 +--- a/libcpuid/CMakeLists.txt ++++ b/libcpuid/CMakeLists.txt +@@ -75,7 +75,7 @@ install(TARGETS cpuid + LIBRARY DESTINATION "lib" + ARCHIVE DESTINATION "lib" + RUNTIME DESTINATION "bin" +- INCLUDES DESTINATION "include") ++ PUBLIC_HEADER DESTINATION "include") + + install(FILES "${project_config}" "${version_config}" + DESTINATION "${config_install_dir}" diff --git a/vcpkg/ports/cpuid/portfile.cmake b/vcpkg/ports/cpuid/portfile.cmake new file mode 100644 index 0000000..48849dc --- /dev/null +++ b/vcpkg/ports/cpuid/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_fail_port_install(ON_TARGET "UWP" ON_ARCH "arm" "arm64") +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO anrieff/libcpuid + REF f2ab8b7ef2c286f619d96c3ce8902cb76b801bf0 + SHA512 fcd2d35994554eed80c04315f1cf3bc91f272a5051dde040fe2266d71af902b60ecfd74b6f9dc8284a22f222208c6789bfb94cc12d61de17d605265d3cd2c43d + HEAD_REF master + PATCHES fix-install-headers.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DENABLE_DOCS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/cpuid) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/cpuinfo/CONTROL b/vcpkg/ports/cpuinfo/CONTROL new file mode 100644 index 0000000..0c34907 --- /dev/null +++ b/vcpkg/ports/cpuinfo/CONTROL @@ -0,0 +1,7 @@ +Source: cpuinfo +Version: 2019-07-28-1 +Description: CPU INFOrmation library (x86/x86-64/ARM/ARM64, Linux/Windows/Android/macOS/iOS) +Homepage: https://github.com/pytorch/cpuinfo + +Feature: tools +Description: Build cpuinfo command-line tools diff --git a/vcpkg/ports/cpuinfo/portfile.cmake b/vcpkg/ports/cpuinfo/portfile.cmake new file mode 100644 index 0000000..9b3db8e --- /dev/null +++ b/vcpkg/ports/cpuinfo/portfile.cmake @@ -0,0 +1,60 @@ +include(vcpkg_common_functions) + +# On Windows, we can get a cpuinfo.dll, but it exports no symbols. +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_download_distfile( + pull_22_patch_file + URLS "https://github.com/pytorch/cpuinfo/compare/d5e37adf1406cf899d7d9ec1d317c47506ccb970...868bd113ed496a01cd030ab4d5b8853561f919a3.diff" + FILENAME "cpuinfo-pull-22-868bd11.patch" + SHA512 6971707e71613ca07fe0d18cb9c36cd5161177fc9ad3eb9e66f17a694559f3a95ccdad8f50e9342507a7978bd454f66e47c8a94db9077267ca302535b7cc3b59 +) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pytorch/cpuinfo + REF d5e37adf1406cf899d7d9ec1d317c47506ccb970 + SHA512 ecd2115340fa82a67db7889ce286c3070d5ab9c30b02372b08aac893e90ccebc65c6b3e66aa02a9ae9c57892d2d8c3b77cb836e5fc3b88df2c75d33e574d90d2 + HEAD_REF master + PATCHES + ${pull_22_patch_file} +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tools CPUINFO_BUILD_TOOLS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DCPUINFO_BUILD_TOOLS=OFF + OPTIONS_RELEASE + ${FEATURE_OPTIONS} + OPTIONS + -DCPUINFO_BUILD_UNIT_TESTS=OFF + -DCPUINFO_BUILD_MOCK_TESTS=OFF + -DCPUINFO_BUILD_BENCHMARKS=OFF +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(tools IN_LIST FEATURES) + vcpkg_copy_tools( + TOOL_NAMES cache-info cpuid-dump cpu-info isa-info + AUTO_CLEAN + ) +endif() + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/vcpkg/ports/cr/CONTROL b/vcpkg/ports/cr/CONTROL new file mode 100644 index 0000000..864d23f --- /dev/null +++ b/vcpkg/ports/cr/CONTROL @@ -0,0 +1,4 @@ +Source: cr +Version: 2020-04-26 +Homepage: https://fungos.github.io/cr-simple-c-hot-reload/ +Description: cr.h: A Simple C Hot Reload Header-only Library diff --git a/vcpkg/ports/cr/portfile.cmake b/vcpkg/ports/cr/portfile.cmake new file mode 100644 index 0000000..d6d5367 --- /dev/null +++ b/vcpkg/ports/cr/portfile.cmake @@ -0,0 +1,15 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fungos/cr + REF 66b76e24611c3b87566e5365e8c422387bc85916 + SHA512 002162461ecf131d717f7567cf13ee1345b7b359bb17c0801f4246c472c1b180f4f8937e9a3f4c186d95c41c20ffcc5ba5e953f197f344fb1000f51d8c4ee473 + HEAD_REF master +) + +file( + COPY ${SOURCE_PATH}/cr.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/crashpad/CONTROL b/vcpkg/ports/crashpad/CONTROL new file mode 100644 index 0000000..dab2671 --- /dev/null +++ b/vcpkg/ports/crashpad/CONTROL @@ -0,0 +1,7 @@ +Source: crashpad +Version: 2020-03-18 +Homepage: https://chromium.googlesource.com/crashpad/crashpad/+/master/README.md +Description: Crashpad is a crash-reporting system. + Crashpad is a library for capturing, storing and transmitting postmortem crash reports from a client to an upstream collection server. Crashpad aims to make it possible for clients to capture process state at the time of crash with the best possible fidelity and coverage, with the minimum of fuss. +Build-Depends: zlib +Supports: x64 & (osx|windows) diff --git a/vcpkg/ports/crashpad/crashpadConfig.cmake.in b/vcpkg/ports/crashpad/crashpadConfig.cmake.in new file mode 100644 index 0000000..1c95bf1 --- /dev/null +++ b/vcpkg/ports/crashpad/crashpadConfig.cmake.in @@ -0,0 +1,31 @@ +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +add_library(crashpad INTERFACE) +add_library(crashpad::crashpad ALIAS crashpad) + +set(CRASHPAD_LIBRARIES client util base) + +if(WIN32) + target_compile_definitions(crashpad INTERFACE NOMINMAX) +elseif(APPLE) + list(APPEND CRASHPAD_LIBRARIES ApplicationServices + CoreFoundation Foundation IOKit Security bsm) +endif() + +foreach(LIB_NAME ${CRASHPAD_LIBRARIES}) + find_library(_LIB ${LIB_NAME}) + target_link_libraries(crashpad INTERFACE ${_LIB}) + unset(_LIB CACHE) +endforeach() + +find_package(ZLIB REQUIRED) +target_link_libraries(crashpad INTERFACE ZLIB::ZLIB) + +target_include_directories(crashpad + INTERFACE ${_IMPORT_PREFIX}/include/crashpad) diff --git a/vcpkg/ports/crashpad/portfile.cmake b/vcpkg/ports/crashpad/portfile.cmake new file mode 100644 index 0000000..30026d5 --- /dev/null +++ b/vcpkg/ports/crashpad/portfile.cmake @@ -0,0 +1,129 @@ +vcpkg_fail_port_install( + ON_ARCH "x86" "arm" "arm64" + ON_TARGET "UWP" "LINUX") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH + URL https://chromium.googlesource.com/crashpad/crashpad + REF 9a31d3f8e9815774026a753a1ff6155347cd549f +) + +function(checkout_in_path PATH URL REF) + if(EXISTS "${PATH}") + return() + endif() + + vcpkg_from_git( + OUT_SOURCE_PATH DEP_SOURCE_PATH + URL "${URL}" + REF "${REF}" + ) + file(RENAME "${DEP_SOURCE_PATH}" "${PATH}") + file(REMOVE_RECURSE "${DEP_SOURCE_PATH}") +endfunction() + +# mini_chromium contains the toolchains and build configuration +checkout_in_path( + "${SOURCE_PATH}/third_party/mini_chromium/mini_chromium" + "https://chromium.googlesource.com/chromium/mini_chromium" + "c426ff98e1d9e9d59777fe8b883a5c0ceeca9ca3" +) + +function(replace_gn_dependency INPUT_FILE OUTPUT_FILE LIBRARY_NAMES) + unset(_LIBRARY_DEB CACHE) + find_library(_LIBRARY_DEB NAMES ${LIBRARY_NAMES} + PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" + NO_DEFAULT_PATH) + + if(_LIBRARY_DEB MATCHES "-NOTFOUND") + message(FATAL_ERROR "Could not find debug library with names: ${LIBRARY_NAMES}") + endif() + + unset(_LIBRARY_REL CACHE) + find_library(_LIBRARY_REL NAMES ${LIBRARY_NAMES} + PATHS "${CURRENT_INSTALLED_DIR}/lib" + NO_DEFAULT_PATH) + + if(_LIBRARY_REL MATCHES "-NOTFOUND") + message(FATAL_ERROR "Could not find library with names: ${LIBRARY_NAMES}") + endif() + + set(_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include") + + file(REMOVE "${OUTPUT_FILE}") + configure_file("${INPUT_FILE}" "${OUTPUT_FILE}" @ONLY) +endfunction() + +replace_gn_dependency( + "${CMAKE_CURRENT_LIST_DIR}/zlib.gn" + "${SOURCE_PATH}/third_party/zlib/BUILD.gn" + "z;zlib;zlibd" +) + +set(OPTIONS_DBG "is_debug=true") +set(OPTIONS_REL "") + +if(CMAKE_HOST_WIN32) + # Load toolchains + if(NOT VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/windows.cmake") + endif() + include("${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") + + foreach(_VAR CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS + CMAKE_C_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELEASE) + string(STRIP "${${_VAR}}" ${_VAR}) + endforeach() + + set(OPTIONS_DBG "${OPTIONS_DBG} \ + extra_cflags_c=\"${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_DEBUG}\" \ + extra_cflags_cc=\"${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}\"") + + set(OPTIONS_REL "${OPTIONS_REL} \ + extra_cflags_c=\"${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}\" \ + extra_cflags_cc=\"${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}\"") + + set(DISABLE_WHOLE_PROGRAM_OPTIMIZATION "\ + extra_cflags=\"/GL-\" \ + extra_ldflags=\"/LTCG:OFF\" \ + extra_arflags=\"/LTCG:OFF\"") + + set(OPTIONS_DBG "${OPTIONS_DBG} ${DISABLE_WHOLE_PROGRAM_OPTIMIZATION}") + set(OPTIONS_REL "${OPTIONS_REL} ${DISABLE_WHOLE_PROGRAM_OPTIMIZATION}") +endif() + +vcpkg_configure_gn( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS_DEBUG "${OPTIONS_DBG}" + OPTIONS_RELEASE "${OPTIONS_REL}" +) + +vcpkg_install_gn( + SOURCE_PATH "${SOURCE_PATH}" + TARGETS client util third_party/mini_chromium/mini_chromium/base handler:crashpad_handler +) + +message(STATUS "Installing headers...") +set(PACKAGES_INCLUDE_DIR "${CURRENT_PACKAGES_DIR}/include/${PORT}") +function(install_headers DIR) + file(COPY "${DIR}" DESTINATION "${PACKAGES_INCLUDE_DIR}" FILES_MATCHING PATTERN "*.h") +endfunction() +install_headers("${SOURCE_PATH}/client") +install_headers("${SOURCE_PATH}/util") +install_headers("${SOURCE_PATH}/third_party/mini_chromium/mini_chromium/base") +install_headers("${SOURCE_PATH}/third_party/mini_chromium/mini_chromium/build") + +# remove empty directories +file(REMOVE_RECURSE + "${PACKAGES_INCLUDE_DIR}/util/net/testdata" + "${PACKAGES_INCLUDE_DIR}/build/ios") + +configure_file("${CMAKE_CURRENT_LIST_DIR}/crashpadConfig.cmake.in" + "${CURRENT_PACKAGES_DIR}/share/${PORT}/crashpadConfig.cmake" @ONLY) + +vcpkg_copy_pdbs() +file(INSTALL "${SOURCE_PATH}/LICENSE" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright) diff --git a/vcpkg/ports/crashpad/zlib.gn b/vcpkg/ports/crashpad/zlib.gn new file mode 100644 index 0000000..5b551a3 --- /dev/null +++ b/vcpkg/ports/crashpad/zlib.gn @@ -0,0 +1,15 @@ +import("../../build/crashpad_buildconfig.gni") + +config("zlib_config") { + defines = [ "CRASHPAD_ZLIB_SOURCE_EXTERNAL" ] + include_dirs = [ "@_INCLUDE_DIR@" ] +} + +source_set("zlib") { + public_configs = [ ":zlib_config" ] + if(is_debug) { + libs = [ "@_LIBRARY_DEB@" ] + } else { + libs = [ "@_LIBRARY_REL@" ] + } +} \ No newline at end of file diff --git a/vcpkg/ports/crashrpt/001-add-install-target-and-find-deps.patch b/vcpkg/ports/crashrpt/001-add-install-target-and-find-deps.patch new file mode 100644 index 0000000..2d98380 --- /dev/null +++ b/vcpkg/ports/crashrpt/001-add-install-target-and-find-deps.patch @@ -0,0 +1,809 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 44d7df0..ed9e3d3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -17,6 +17,9 @@ set (CRASHRPT_VER 1403) + # Build options + option(CRASHRPT_BUILD_SHARED_LIBS "If set (default), CrashRpt modules are built as dynamic-link libraries, otherwise as static libs." ON) + option(CRASHRPT_LINK_CRT_AS_DLL "If set (default), CrashRpt modules link C run-time (CRT) as multi-threaded dynamic libraries, otherwise as multi-threaded static libs." ON) ++option(CRASHRPT_BUILD_PROBE "If set (default), CrashRpt builds the CrashRptProbe project." ON) ++option(CRASHRPT_BUILD_DEMOS "If set (default), CrashRpt builds the demo projects." ON) ++option(CRASHRPT_BUILD_TESTS "If set (default), CrashRpt builds the test projects." ON) + + # Set output directory for executable files + if(CMAKE_CL_64) +@@ -94,19 +97,65 @@ macro(fix_default_compiler_settings_) + + endmacro() + ++find_package(ZLIB REQUIRED) ++find_package(PNG REQUIRED) ++find_package(Ogg REQUIRED) ++find_package(JPEG REQUIRED) ++ ++find_library(THEORA_LIBRARY theora) ++if(NOT THEORA_LIBRARY) ++ message(FATAL_ERROR "theora library not found") ++endif() ++ ++find_path(THEORA_INCLUDE_DIR theora/theora.h) ++if(NOT THEORA_INCLUDE_DIR) ++ message(FATAL_ERROR "theora include dir not found") ++endif() ++ ++find_library(TINYXML_LIBRARY NAMES tinyxml) ++if(NOT TINYXML_LIBRARY) ++ message(FATAL_ERROR "tinyxml library not found") ++endif() ++ ++find_path(TINYXML_INCLUDE_DIR tinyxml.h) ++if(NOT TINYXML_INCLUDE_DIR) ++ message(FATAL_ERROR "tinyxml include dir not found") ++endif() ++ ++find_path(WTL_INCLUDE_DIR wtl/atlapp.h) ++if(NOT WTL_INCLUDE_DIR) ++ message(FATAL_ERROR "WTL include dir not found") ++endif() ++ ++find_library(DBGHELP_LIBRARY dbghelp) ++if(NOT DBGHELP_LIBRARY) ++ message(FATAL_ERROR "dbghelp library not found") ++endif() ++ ++find_path(DBGHELP_INCLUDE_DIR dbghelp.h) ++if(NOT DBGHELP_INCLUDE_DIR) ++ message(FATAL_ERROR "dbghelp include dir not found") ++endif() ++ + # Other CMakeLists are located in project subdirectories + ++if(CRASHRPT_BUILD_DEMOS) + add_subdirectory("demos/ConsoleDemo") + add_subdirectory("demos/WTLDemo") + add_subdirectory("demos/MFCDemo") ++endif() + + add_subdirectory("reporting/crashrpt") + add_subdirectory("reporting/crashsender") + ++if(CRASHRPT_BUILD_PROBE) + add_subdirectory("processing/crashrptprobe") + add_subdirectory("processing/crprober") ++endif() + ++if(CRASHRPT_BUILD_TESTS) + add_subdirectory("tests") ++endif() + + # Set output directory for LIB files + if(CMAKE_CL_64) +@@ -117,13 +166,13 @@ else(CMAKE_CL_64) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/thirdparty/lib) + endif(CMAKE_CL_64) + +-add_subdirectory("thirdparty/tinyxml") +-add_subdirectory("thirdparty/jpeg") +-add_subdirectory("thirdparty/libpng") ++#add_subdirectory("thirdparty/tinyxml") ++#add_subdirectory("thirdparty/jpeg") ++#add_subdirectory("thirdparty/libpng") + add_subdirectory("thirdparty/minizip") +-add_subdirectory("thirdparty/zlib") +-add_subdirectory("thirdparty/libogg") +-add_subdirectory("thirdparty/libtheora") ++#add_subdirectory("thirdparty/zlib") ++#add_subdirectory("thirdparty/libogg") ++#add_subdirectory("thirdparty/libtheora") + + + +diff --git a/demos/ConsoleDemo/CMakeLists.txt b/demos/ConsoleDemo/CMakeLists.txt +index e47ef4c..4df7b12 100644 +--- a/demos/ConsoleDemo/CMakeLists.txt ++++ b/demos/ConsoleDemo/CMakeLists.txt +@@ -12,12 +12,12 @@ fix_default_compiler_settings_() + # Add include dir + include_directories(${CMAKE_SOURCE_DIR}/include + ${CMAKE_SOURCE_DIR}/reporting/CrashRpt +- ${CMAKE_SOURCE_DIR}/thirdparty/wtl +- ${CMAKE_SOURCE_DIR}/thirdparty/zlib ++ ${WTL_INCLUDE_DIR} ++ ${ZLIB_INCLUDE_DIRS} + ${CMAKE_SOURCE_DIR}/thirdparty/minizip +- ${CMAKE_SOURCE_DIR}/thirdparty/jpeg +- ${CMAKE_SOURCE_DIR}/thirdparty/libpng +- ${CMAKE_SOURCE_DIR}/thirdparty/tinyxml ) ++ ${JPEG_INCLUDE_DIR} ++ ${PNG_INCLUDE_DIRS} ++ ${TINYXML_INCLUDE_DIR} ) + + # Add executable build target + add_executable(ConsoleDemo ${source_files} ${header_files}) +@@ -26,3 +26,7 @@ add_executable(ConsoleDemo ${source_files} ${header_files}) + target_link_libraries(ConsoleDemo CrashRpt) + + set_target_properties(ConsoleDemo PROPERTIES DEBUG_POSTFIX d ) ++ ++install(TARGETS ConsoleDemo ++ RUNTIME DESTINATION tools/crashrpt ++) +diff --git a/demos/MFCDemo/CMakeLists.txt b/demos/MFCDemo/CMakeLists.txt +index a250ecc..ade93cb 100644 +--- a/demos/MFCDemo/CMakeLists.txt ++++ b/demos/MFCDemo/CMakeLists.txt +@@ -44,7 +44,7 @@ if(CMAKE_CL_64) + ADD_CUSTOM_COMMAND( + TARGET WTLDemo + POST_BUILD +- COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/bin\\dbghelp.dll\" \"${CMAKE_BINARY_DIR}/bin\\x64\"" ++ #COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/bin\\dbghelp.dll\" \"${CMAKE_BINARY_DIR}/bin\\x64\"" + COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/demos/WTLDemo\\dummy.ini\" \"${CMAKE_BINARY_DIR}/bin\\x64\"" + COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/demos/WTLDemo\\dummy.log\" \"${CMAKE_BINARY_DIR}/bin\\x64\"" + COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/lang_files\\crashrpt_lang_EN.ini\" \"${CMAKE_BINARY_DIR}/bin\\x64\\crashrpt_lang.ini\"" +@@ -53,9 +53,13 @@ else(CMAKE_CL_64) + ADD_CUSTOM_COMMAND( + TARGET WTLDemo + POST_BUILD +- COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/bin\\dbghelp.dll\" \"${CMAKE_BINARY_DIR}/bin\"" ++ #COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/bin\\dbghelp.dll\" \"${CMAKE_BINARY_DIR}/bin\"" + COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/demos/WTLDemo\\dummy.ini\" \"${CMAKE_BINARY_DIR}/bin\"" + COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/demos/WTLDemo\\dummy.log\" \"${CMAKE_BINARY_DIR}/bin\"" + COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/lang_files\\crashrpt_lang_EN.ini\" \"${CMAKE_BINARY_DIR}/bin\\crashrpt_lang.ini\"" + ) +-endif(CMAKE_CL_64) +\ No newline at end of file ++endif(CMAKE_CL_64) ++ ++install(TARGETS MFCDemo ++ RUNTIME DESTINATION tools/crashrpt ++) +diff --git a/demos/WTLDemo/AboutDlg.h b/demos/WTLDemo/AboutDlg.h +index 83eaac0..e96d1c2 100644 +--- a/demos/WTLDemo/AboutDlg.h ++++ b/demos/WTLDemo/AboutDlg.h +@@ -33,7 +33,7 @@ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #pragma once + #include "stdafx.h" + #include +-#include ++#include + #include "CrashRpt.h" + + class CAboutDlg : public CDialogImpl +diff --git a/demos/WTLDemo/CMakeLists.txt b/demos/WTLDemo/CMakeLists.txt +index 40aaefb..42c0f5a 100644 +--- a/demos/WTLDemo/CMakeLists.txt ++++ b/demos/WTLDemo/CMakeLists.txt +@@ -19,7 +19,7 @@ fix_default_compiler_settings_() + + # Add include dir + include_directories(${CMAKE_SOURCE_DIR}/include +- ${CMAKE_SOURCE_DIR}/thirdparty/wtl) ++ ${WTL_INCLUDE_DIR}) + + # Add executable build target + add_executable(WTLDemo WIN32 ${source_files} ${header_files}) +@@ -36,7 +36,7 @@ if(CMAKE_CL_64) + ADD_CUSTOM_COMMAND( + TARGET WTLDemo + POST_BUILD +- COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/bin\\dbghelp.dll\" \"${CMAKE_BINARY_DIR}/bin\\x64\"" ++ #COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/bin\\dbghelp.dll\" \"${CMAKE_BINARY_DIR}/bin\\x64\"" + COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/demos/WTLDemo\\dummy.ini\" \"${CMAKE_BINARY_DIR}/bin\\x64\"" + COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/demos/WTLDemo\\dummy.log\" \"${CMAKE_BINARY_DIR}/bin\\x64\"" + COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/lang_files\\crashrpt_lang_EN.ini\" \"${CMAKE_BINARY_DIR}/bin\\x64\\crashrpt_lang.ini\"" +@@ -45,9 +45,13 @@ else(CMAKE_CL_64) + ADD_CUSTOM_COMMAND( + TARGET WTLDemo + POST_BUILD +- COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/bin\\dbghelp.dll\" \"${CMAKE_BINARY_DIR}/bin\"" ++ #COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/bin\\dbghelp.dll\" \"${CMAKE_BINARY_DIR}/bin\"" + COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/demos/WTLDemo\\dummy.ini\" \"${CMAKE_BINARY_DIR}/bin\"" + COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/demos/WTLDemo\\dummy.log\" \"${CMAKE_BINARY_DIR}/bin\"" + COMMAND copy ARGS "\"${CMAKE_SOURCE_DIR}/lang_files\\crashrpt_lang_EN.ini\" \"${CMAKE_BINARY_DIR}/bin\\crashrpt_lang.ini\"" + ) +-endif(CMAKE_CL_64) +\ No newline at end of file ++endif(CMAKE_CL_64) ++ ++install(TARGETS WTLDemo ++ RUNTIME DESTINATION tools/crashrpt ++) +diff --git a/demos/WTLDemo/DocumentDlg.h b/demos/WTLDemo/DocumentDlg.h +index afce8fe..9b47728 100644 +--- a/demos/WTLDemo/DocumentDlg.h ++++ b/demos/WTLDemo/DocumentDlg.h +@@ -33,7 +33,7 @@ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #pragma once + #include "stdafx.h" + #include +-#include ++#include + #include "CrashRpt.h" + + class CDocumentDlg : public CDialogImpl +diff --git a/demos/WTLDemo/WTLDemo.rc b/demos/WTLDemo/WTLDemo.rc +index c651841..71f4b39 100644 +--- a/demos/WTLDemo/WTLDemo.rc ++++ b/demos/WTLDemo/WTLDemo.rc +@@ -7,7 +7,7 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "atlres.h" ++#include "wtl/atlres.h" + + ///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS +@@ -32,7 +32,7 @@ END + + 2 TEXTINCLUDE + BEGIN +- "#include ""atlres.h""\r\n" ++ "#include ""wtl/atlres.h""\r\n" + "\0" + END + +diff --git a/demos/WTLDemo/stdafx.h b/demos/WTLDemo/stdafx.h +index a601446..658d9e5 100644 +--- a/demos/WTLDemo/stdafx.h ++++ b/demos/WTLDemo/stdafx.h +@@ -16,10 +16,10 @@ be found in the Authors.txt file in the root of the source tree. + #pragma once + + // Change these values to use different versions +-#define WINVER 0x0500 ++#define WINVER 0x0501 + #define _WIN32_WINNT 0x0501 +-#define _WIN32_IE 0x0501 +-#define _RICHEDIT_VER 0x0200 ++#define _WIN32_IE 0x0600 ++#define _RICHEDIT_VER 0x0300 + + #include + #if ( _ATL_VER < 0x0800 ) +@@ -52,18 +52,18 @@ namespace ATL + }; + #endif // _WTL_SUPPORT_SDK_ATL3 + +-#include ++#include + + extern CAppModule _Module; + + #include + +-#include +-#include +-#include ++#include ++#include ++#include + + #define _WTL_USE_CSTRING +-#include ++#include + + #if _MSC_VER>=1400 + #if defined _M_IX86 +diff --git a/processing/crashrptprobe/CMakeLists.txt b/processing/crashrptprobe/CMakeLists.txt +index a6c692a..c513c6d 100644 +--- a/processing/crashrptprobe/CMakeLists.txt ++++ b/processing/crashrptprobe/CMakeLists.txt +@@ -21,11 +21,11 @@ fix_default_compiler_settings_() + include_directories( ${CMAKE_SOURCE_DIR}/include + ${CMAKE_SOURCE_DIR}/reporting/crashrpt + ${CMAKE_SOURCE_DIR}/reporting/crashsender +- ${CMAKE_SOURCE_DIR}/thirdparty/wtl +- ${CMAKE_SOURCE_DIR}/thirdparty/zlib ++ ${WTL_INCLUDE_DIR} ++ ${ZLIB_INCLUDE_DIRS} + ${CMAKE_SOURCE_DIR}/thirdparty/minizip +- ${CMAKE_SOURCE_DIR}/thirdparty/tinyxml +- ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/include) ++ ${TINYXML_INCLUDE_DIR} ++ ${DBGHELP_INCLUDE_DIR}) + + # Add library build target + if(CRASHRPT_BUILD_SHARED_LIBS) +@@ -34,15 +34,15 @@ else(CRASHRPT_BUILD_SHARED_LIBS) + add_library(CrashRptProbe STATIC ${source_files} ${header_files}) + endif(CRASHRPT_BUILD_SHARED_LIBS) + +-if(CMAKE_CL_64) +- link_directories( ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib/amd64 ) +- target_link_libraries(CrashRptProbe ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib/amd64/dbghelp.lib) +-else(CMAKE_CL_64) +- link_directories( ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib ) +- target_link_libraries(CrashRptProbe ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib/dbghelp.lib) +-endif(CMAKE_CL_64) ++#if(CMAKE_CL_64) ++# link_directories( ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib/amd64 ) ++# target_link_libraries(CrashRptProbe ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib/amd64/dbghelp.lib) ++#else(CMAKE_CL_64) ++# link_directories( ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib ) ++# target_link_libraries(CrashRptProbe ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib/dbghelp.lib) ++#endif(CMAKE_CL_64) + +-target_link_libraries(CrashRptProbe zlib minizip tinyxml Rpcrt4.lib shell32.lib gdi32.lib version.lib psapi.lib) ++target_link_libraries(CrashRptProbe ZLIB::ZLIB minizip ${TINYXML_LIBRARY} ${DBGHELP_LIBRARY} Rpcrt4.lib shell32.lib gdi32.lib version.lib psapi.lib) + + if(CRASHRPT_BUILD_SHARED_LIBS) + +@@ -58,4 +58,11 @@ else(CRASHRPT_BUILD_SHARED_LIBS) + + endif(CRASHRPT_BUILD_SHARED_LIBS) + ++set_target_properties(CrashRptProbe PROPERTIES PUBLIC_HEADER ${CMAKE_SOURCE_DIR}/include/CrashRptProbe.h) + ++INSTALL(TARGETS CrashRptProbe ++ PUBLIC_HEADER DESTINATION include/crashrpt ++ LIBRARY ++ ARCHIVE ++ RUNTIME ++) +diff --git a/processing/crashrptprobe/CrashRptProbe.rc b/processing/crashrptprobe/CrashRptProbe.rc +index a08f63e..e12b8e9 100644 +--- a/processing/crashrptprobe/CrashRptProbe.rc ++++ b/processing/crashrptprobe/CrashRptProbe.rc +@@ -7,7 +7,7 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "atlres.h" ++#include "wtl/atlres.h" + + ///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS +@@ -32,7 +32,7 @@ END + + 2 TEXTINCLUDE + BEGIN +- "#include ""atlres.h""\r\n" ++ "#include ""wtl/atlres.h""\r\n" + "\0" + END + +diff --git a/processing/crashrptprobe/stdafx.h b/processing/crashrptprobe/stdafx.h +index 2b027b2..0b60659 100644 +--- a/processing/crashrptprobe/stdafx.h ++++ b/processing/crashrptprobe/stdafx.h +@@ -70,13 +70,13 @@ namespace ATL + }; + #endif // _WTL_SUPPORT_SDK_ATL3 + +-#include ++#include + extern CAppModule _Module; + #include + + // CString-related includes + #define _WTL_USE_CSTRING +-#include ++#include + + #if _MSC_VER<1400 + #define WCSNCPY_S(strDest, sizeInBytes, strSource, count) wcsncpy(strDest, strSource, count) +diff --git a/processing/crprober/CMakeLists.txt b/processing/crprober/CMakeLists.txt +index 046ba57..255e200 100644 +--- a/processing/crprober/CMakeLists.txt ++++ b/processing/crprober/CMakeLists.txt +@@ -18,4 +18,8 @@ add_executable(crprober ${source_files} ${header_files}) + # Add input link libraries + target_link_libraries(crprober CrashRptProbe) + +-set_target_properties(crprober PROPERTIES DEBUG_POSTFIX d ) +\ No newline at end of file ++set_target_properties(crprober PROPERTIES DEBUG_POSTFIX d ) ++ ++install(TARGETS crprober ++ RUNTIME DESTINATION tools/crashrpt ++) +diff --git a/reporting/crashrpt/CMakeLists.txt b/reporting/crashrpt/CMakeLists.txt +index 42d40e2..c7e4fd6 100644 +--- a/reporting/crashrpt/CMakeLists.txt ++++ b/reporting/crashrpt/CMakeLists.txt +@@ -18,7 +18,7 @@ add_definitions(-D_UNICODE -D_CRT_SECURE_NO_DEPRECATE) + fix_default_compiler_settings_() + + # Add include dir +-include_directories( ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/thirdparty/wtl) ++include_directories( ${CMAKE_SOURCE_DIR}/include ${WTL_INCLUDE_DIR}) + + # Add library build target + if(CRASHRPT_BUILD_SHARED_LIBS) +@@ -55,3 +55,11 @@ else(CRASHRPT_BUILD_SHARED_LIBS) + RELEASE_POSTFIX LIB ) + endif(CRASHRPT_BUILD_SHARED_LIBS) + ++set_target_properties(CrashRpt PROPERTIES PUBLIC_HEADER ${CMAKE_SOURCE_DIR}/include/CrashRpt.h) ++ ++INSTALL(TARGETS CrashRpt ++ PUBLIC_HEADER DESTINATION include/crashrpt ++ LIBRARY ++ ARCHIVE ++ RUNTIME ++) +diff --git a/reporting/crashrpt/CrashRpt.rc b/reporting/crashrpt/CrashRpt.rc +index 95e7502..a8c821b 100644 +--- a/reporting/crashrpt/CrashRpt.rc ++++ b/reporting/crashrpt/CrashRpt.rc +@@ -7,7 +7,7 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "atlres.h" ++#include "wtl/atlres.h" + + ///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS +@@ -32,7 +32,7 @@ END + + 2 TEXTINCLUDE + BEGIN +- "#include ""atlres.h""\r\n" ++ "#include ""wtl/atlres.h""\r\n" + "\0" + END + +diff --git a/reporting/crashrpt/StdAfx.h b/reporting/crashrpt/StdAfx.h +index 77d8c36..13bbe50 100644 +--- a/reporting/crashrpt/StdAfx.h ++++ b/reporting/crashrpt/StdAfx.h +@@ -19,7 +19,7 @@ be found in the Authors.txt file in the root of the source tree. + #define WINVER 0x0501 + #define _WIN32_WINNT 0x0501 + #define _WIN32_IE 0x0600 +-#define _RICHEDIT_VER 0x0200 ++#define _RICHEDIT_VER 0x0300 + + #include + #include +@@ -54,12 +54,12 @@ namespace ATL + }; + #endif // _WTL_SUPPORT_SDK_ATL3 + +-#include ++#include + extern CAppModule _Module; + #include + // CString-related includes + #define _WTL_USE_CSTRING +-#include ++#include + #include + #include + #include +diff --git a/reporting/crashsender/CMakeLists.txt b/reporting/crashsender/CMakeLists.txt +index 9b444c5..aa4ab8a 100644 +--- a/reporting/crashsender/CMakeLists.txt ++++ b/reporting/crashsender/CMakeLists.txt +@@ -22,27 +22,27 @@ fix_default_compiler_settings_() + # Add include dir + include_directories( ${CMAKE_SOURCE_DIR}/include + ${CMAKE_SOURCE_DIR}/reporting/CrashRpt +- ${CMAKE_SOURCE_DIR}/thirdparty/wtl +- ${CMAKE_SOURCE_DIR}/thirdparty/zlib ++ ${WTL_INCLUDE_DIR} + ${CMAKE_SOURCE_DIR}/thirdparty/minizip +- ${CMAKE_SOURCE_DIR}/thirdparty/jpeg +- ${CMAKE_SOURCE_DIR}/thirdparty/libpng +- ${CMAKE_SOURCE_DIR}/thirdparty/tinyxml +- ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/include +- ${CMAKE_SOURCE_DIR}/thirdparty/libogg/include +- ${CMAKE_SOURCE_DIR}/thirdparty/libtheora/include) +- +-if(NOT CMAKE_CL_64) +- link_directories( ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib ) +-else(NOT CMAKE_CL_64) +- link_directories( ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib/amd64 ) +-endif(NOT CMAKE_CL_64) ++ ${ZLIB_INCLUDE_DIRS} ++ ${JPEG_INCLUDE_DIR} ++ ${PNG_INCLUDE_DIRS} ++ ${TINYXML_INCLUDE_DIR} ++ ${DBGHELP_INCLUDE_DIR} ++ ${OGG_INCLUDE_DIRS} ++ ${THEORA_INCLUDE_DIR}) ++ ++#if(NOT CMAKE_CL_64) ++# link_directories( ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib ) ++#else(NOT CMAKE_CL_64) ++# link_directories( ${CMAKE_SOURCE_DIR}/thirdparty/dbghelp/lib/amd64 ) ++#endif(NOT CMAKE_CL_64) + + # Add executable build target + add_executable(CrashSender WIN32 ${source_files} ${header_files}) + + # Add input link libraries +-target_link_libraries(CrashSender zlib minizip libjpeg libpng tinyxml libogg libtheora WS2_32.lib Dnsapi.lib wininet.lib Rpcrt4.lib Gdi32.lib shell32.lib Comdlg32.lib version.lib psapi.lib) ++target_link_libraries(CrashSender ZLIB::ZLIB minizip ${JPEG_LIBRARIES} PNG::PNG ${TINYXML_LIBRARY} Ogg::ogg ${THEORA_LIBRARY} WS2_32.lib Dnsapi.lib wininet.lib Rpcrt4.lib Gdi32.lib shell32.lib Comdlg32.lib version.lib psapi.lib) + + # Add compiler flags (/MP for multi-processor compilation, /Os to favor small code) + set_target_properties(CrashRpt PROPERTIES COMPILE_FLAGS "/Os") +@@ -52,4 +52,12 @@ set_target_properties(CrashRpt PROPERTIES COMPILE_FLAGS "/Os") + + set_target_properties(CrashSender PROPERTIES + DEBUG_POSTFIX ${CRASHRPT_VER}d +- RELEASE_POSTFIX ${CRASHRPT_VER} ) +\ No newline at end of file ++ RELEASE_POSTFIX ${CRASHRPT_VER} ) ++ ++install(TARGETS CrashSender ++ RUNTIME DESTINATION tools/crashrpt ++) ++ ++file(GLOB LANG_FILES "${CMAKE_SOURCE_DIR}/lang_files/crashrpt_lang_*.ini") ++install(FILES ${LANG_FILES} DESTINATION tools/crashrpt) ++install(FILES "${CMAKE_SOURCE_DIR}/lang_files/crashrpt_lang_EN.ini" DESTINATION tools/crashrpt RENAME crashrpt_lang.ini) +diff --git a/reporting/crashsender/CrashSender.rc b/reporting/crashsender/CrashSender.rc +index 0502962..e10e269 100644 +--- a/reporting/crashsender/CrashSender.rc ++++ b/reporting/crashsender/CrashSender.rc +@@ -7,7 +7,7 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "atlres.h" ++#include "wtl/atlres.h" + + ///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS +@@ -243,7 +243,7 @@ END + + 2 TEXTINCLUDE + BEGIN +- "#include ""atlres.h""\r\n" ++ "#include ""wtl/atlres.h""\r\n" + "\0" + END + +diff --git a/reporting/crashsender/ErrorReportSender.cpp b/reporting/crashsender/ErrorReportSender.cpp +index ac9603c..64cf2b5 100644 +--- a/reporting/crashsender/ErrorReportSender.cpp ++++ b/reporting/crashsender/ErrorReportSender.cpp +@@ -722,9 +722,9 @@ BOOL CErrorReportSender::CreateMiniDump() + CompiledApiVer.Reserved = 0; + LPAPI_VERSION pActualApiVer = lpImagehlpApiVersionEx(&CompiledApiVer); + pActualApiVer; +- ATLASSERT(CompiledApiVer.MajorVersion==pActualApiVer->MajorVersion); +- ATLASSERT(CompiledApiVer.MinorVersion==pActualApiVer->MinorVersion); +- ATLASSERT(CompiledApiVer.Revision==pActualApiVer->Revision); ++ //ATLASSERT(CompiledApiVer.MajorVersion==pActualApiVer->MajorVersion); ++ //ATLASSERT(CompiledApiVer.MinorVersion==pActualApiVer->MinorVersion); ++ //ATLASSERT(CompiledApiVer.Revision==pActualApiVer->Revision); + } + + // Write minidump to the file +@@ -1086,7 +1086,7 @@ BOOL CErrorReportSender::CreateCrashDescriptionXML(CErrorReportInfo& eri) + goto cleanup; + } + +- doc.useMicrosoftBOM = true; ++ //doc.useMicrosoftBOM = true; + bool bSave = doc.SaveFile(f); + if(!bSave) + { +diff --git a/reporting/crashsender/FilePreviewCtrl.cpp b/reporting/crashsender/FilePreviewCtrl.cpp +index e71aafc..5650291 100644 +--- a/reporting/crashsender/FilePreviewCtrl.cpp ++++ b/reporting/crashsender/FilePreviewCtrl.cpp +@@ -365,7 +365,7 @@ BOOL CImage::LoadBitmapFromPNGFile(LPTSTR szFileName) + if (!png_ptr) + goto cleanup; + +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + goto cleanup; + + info_ptr = png_create_info_struct(png_ptr); +@@ -389,7 +389,7 @@ BOOL CImage::LoadBitmapFromPNGFile(LPTSTR szFileName) + width = png_get_image_width(png_ptr, info_ptr); + height = png_get_image_height(png_ptr, info_ptr); + +- if(info_ptr->channels==3) ++ if (png_get_channels(png_ptr, info_ptr) == 3) + { + png_set_strip_16(png_ptr); + png_set_packing(png_ptr); +@@ -408,14 +408,14 @@ BOOL CImage::LoadBitmapFromPNGFile(LPTSTR szFileName) + pBMI = (BITMAPINFO*)new BYTE[sizeof(BITMAPINFO)+256*4]; + memset(pBMI, 0, sizeof(BITMAPINFO)+256*4); + pBMI->bmiHeader.biSize = sizeof(BITMAPINFO); +- pBMI->bmiHeader.biBitCount = 8*info_ptr->channels; ++ pBMI->bmiHeader.biBitCount = 8 * png_get_channels(png_ptr, info_ptr); + pBMI->bmiHeader.biWidth = width; + pBMI->bmiHeader.biHeight = height; + pBMI->bmiHeader.biPlanes = 1; + pBMI->bmiHeader.biCompression = BI_RGB; + pBMI->bmiHeader.biSizeImage = rowbytes*height; + +- if( info_ptr->channels == 1 ) ++ if (png_get_channels(png_ptr, info_ptr) == 1) + { + RGBQUAD* palette = pBMI->bmiColors; + +@@ -431,7 +431,7 @@ BOOL CImage::LoadBitmapFromPNGFile(LPTSTR szFileName) + + for(y=height-1; y>=0; y--) + { +- png_read_rows(png_ptr, &row, png_bytepp_NULL, 1); ++ png_read_rows(png_ptr, &row, NULL, 1); + + { + CAutoLock lock(&m_csLock); +diff --git a/reporting/crashsender/ScreenCap.cpp b/reporting/crashsender/ScreenCap.cpp +index c183c19..8f5643d 100644 +--- a/reporting/crashsender/ScreenCap.cpp ++++ b/reporting/crashsender/ScreenCap.cpp +@@ -11,6 +11,7 @@ be found in the Authors.txt file in the root of the source tree. + #include "stdafx.h" + #include "ScreenCap.h" + #include "Utility.h" ++#include "zlib.h" + + // Disable warning C4611: interaction between '_setjmp' and C++ object destruction is non-portable + #pragma warning(disable:4611) +diff --git a/reporting/crashsender/stdafx.h b/reporting/crashsender/stdafx.h +index f087ff4..4494d3a 100644 +--- a/reporting/crashsender/stdafx.h ++++ b/reporting/crashsender/stdafx.h +@@ -19,7 +19,7 @@ be found in the Authors.txt file in the root of the source tree. + #define WINVER 0x0501 + #define _WIN32_WINNT 0x0501 + #define _WIN32_IE 0x0600 +-#define _RICHEDIT_VER 0x0200 ++#define _RICHEDIT_VER 0x0300 + + typedef __int64 off_t, _off_t; + #define _OFF_T_DEFINED +@@ -61,19 +61,19 @@ namespace ATL + }; + #endif // _WTL_SUPPORT_SDK_ATL3 + +-#include ++#include + + extern CAppModule _Module; + + #include + +-#include +-#include +-#include +-#include ++#include ++#include ++#include ++#include + + #define _WTL_USE_CSTRING +-#include ++#include + + #include + #include +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index f7bfede..9358bef 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -32,7 +32,7 @@ set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG") + # Add include dir + include_directories( ${CMAKE_SOURCE_DIR}/include + ${CMAKE_SOURCE_DIR}/reporting/CrashRpt +- ${CMAKE_SOURCE_DIR}/thirdparty/wtl ) ++ ${WTL_INCLUDE_DIR} ) + + # Add executable build target + add_executable(Tests ${source_files} ${header_files}) +@@ -42,3 +42,10 @@ target_link_libraries(Tests CrashRpt CrashRptProbe) + + set_target_properties(Tests PROPERTIES DEBUG_POSTFIX d ) + #set_target_properties(Tests PROPERTIES COMPILE_FLAGS "/Zi" LINK_FLAGS "/DEBUG") ++ ++install(TARGETS Tests ++ RUNTIME DESTINATION tools/crashrpt ++) ++ ++install(FILES "${CMAKE_SOURCE_DIR}/demos/WTLDemo/dummy.ini" DESTINATION tools/crashrpt) ++install(FILES "${CMAKE_SOURCE_DIR}/demos/WTLDemo/dummy.log" DESTINATION tools/crashrpt) +diff --git a/tests/stdafx.h b/tests/stdafx.h +index f12675b..0ec2117 100644 +--- a/tests/stdafx.h ++++ b/tests/stdafx.h +@@ -19,7 +19,7 @@ be found in the Authors.txt file in the root of the source tree. + #define WINVER 0x0501 + #define _WIN32_WINNT 0x0501 + #define _WIN32_IE 0x0600 +-#define _RICHEDIT_VER 0x0200 ++#define _RICHEDIT_VER 0x0300 + + #include + #include +@@ -58,15 +58,15 @@ namespace ATL + }; + #endif // _WTL_SUPPORT_SDK_ATL3 + +-#include ++#include + + extern CAppModule _Module; + + #include + +-#include +-#include +-#include ++#include ++#include ++#include + #include + #include + #include +@@ -75,7 +75,7 @@ extern CAppModule _Module; + #include + + #define _WTL_USE_CSTRING +-#include ++#include + + #if _MSC_VER<1400 + #define _TCSCPY_S(strDestination, numberOfElements, strSource) _tcscpy(strDestination, strSource) +diff --git a/thirdparty/libpng/CMakeLists.txt b/thirdparty/libpng/CMakeLists.txt +index b358c4e..e0f7a33 100644 +--- a/thirdparty/libpng/CMakeLists.txt ++++ b/thirdparty/libpng/CMakeLists.txt +@@ -7,7 +7,7 @@ aux_source_directory( . source_files ) + add_definitions(-D_UNICODE -D_CRT_SECURE_NO_DEPRECATE /wd4244 /wd4267) + + # Add include dir +-include_directories( ${CMAKE_SOURCE_DIR}/thirdparty/zlib ) ++include_directories( ${ZLIB_INCLUDE_DIRS} ) + + fix_default_compiler_settings_() + +@@ -15,6 +15,6 @@ fix_default_compiler_settings_() + add_library(libpng STATIC ${source_files}) + + # Add linker input libraries +-target_link_libraries(libpng zlib) ++target_link_libraries(libpng ZLIB::ZLIB) + + set_target_properties(libpng PROPERTIES DEBUG_POSTFIX d ) +\ No newline at end of file +diff --git a/thirdparty/libtheora/CMakeLists.txt b/thirdparty/libtheora/CMakeLists.txt +index 896fb47..f3cf5eb 100644 +--- a/thirdparty/libtheora/CMakeLists.txt ++++ b/thirdparty/libtheora/CMakeLists.txt +@@ -8,7 +8,7 @@ aux_source_directory( ./lib/x86_vc x86_source_files ) + add_definitions(-D_UNICODE -D_CRT_SECURE_NO_DEPRECATE /wd4244 /wd4700 /wd4214 /wd4554 /wd4018 /wd4100 /wd4132 /wd4389 /wd4127 /wd4701 /wd4245 /wd4267 /wd4334) + + # Add include dir +-include_directories( ${CMAKE_SOURCE_DIR}/thirdparty/libogg/include ++include_directories( ${OGG_INCLUDE_DIRS} + ${CMAKE_SOURCE_DIR}/thirdparty/libtheora/include) + + fix_default_compiler_settings_() +diff --git a/thirdparty/minizip/CMakeLists.txt b/thirdparty/minizip/CMakeLists.txt +index 5f4d0af..2b015c9 100644 +--- a/thirdparty/minizip/CMakeLists.txt ++++ b/thirdparty/minizip/CMakeLists.txt +@@ -7,7 +7,7 @@ aux_source_directory( . source_files ) + add_definitions(-D_UNICODE -D_CRT_SECURE_NO_DEPRECATE /wd4127 /wd4131 /wd4100 /wd4189 /wd4244) + + # Add include dir +-include_directories( ${CMAKE_SOURCE_DIR}/thirdparty/zlib ) ++include_directories( ${ZLIB_INCLUDE_DIRS} ) + + fix_default_compiler_settings_() + +@@ -15,6 +15,6 @@ fix_default_compiler_settings_() + add_library(minizip STATIC ${source_files}) + + # Add linker input libraries +-target_link_libraries(minizip zlib) ++target_link_libraries(minizip ZLIB::ZLIB) + + set_target_properties(minizip PROPERTIES DEBUG_POSTFIX d ) +\ No newline at end of file diff --git a/vcpkg/ports/crashrpt/CONTROL b/vcpkg/ports/crashrpt/CONTROL new file mode 100644 index 0000000..4b15e9d --- /dev/null +++ b/vcpkg/ports/crashrpt/CONTROL @@ -0,0 +1,16 @@ +Source: crashrpt +Version: 1.4.3 +Description: A crash reporting system for Windows applications +Homepage: http://crashrpt.sourceforge.net/ +Build-Depends: dbghelp, libjpeg-turbo, libogg, libpng, libtheora, tinyxml, wtl, zlib +Default-Features: + +Feature: probe +Description: The CrashRptProbe library + +Feature: tests +Description: Test application for crashrpt +Build-Depends: crashrpt[core,probe] + +Feature: demos +Description: Demo applications for CrashRptProbe diff --git a/vcpkg/ports/crashrpt/portfile.cmake b/vcpkg/ports/crashrpt/portfile.cmake new file mode 100644 index 0000000..f52f8e1 --- /dev/null +++ b/vcpkg/ports/crashrpt/portfile.cmake @@ -0,0 +1,53 @@ +vcpkg_fail_port_install(ON_TARGET "OSX" "Linux" "UWP") + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + set(ARCH_DIR "") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + set(ARCH_DIR "x64/") +else() + vcpkg_fail_port_install(MESSAGE "${PORT} only supports x86 and x64 architectures" ALWAYS) +endif() + +vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH + URL https://git.code.sf.net/p/crashrpt/code + REF 4616504670be5a425a525376648d912a72ce18f2 + PATCHES + 001-add-install-target-and-find-deps.patch +) + +# Remove vendored dependencies to ensure they are not picked up by the build +# Vendored minizip is still used since it contains modifications needed for CrashRpt +foreach(DEPENDENCY dbghelp jpeg libogg libpng libtheora tinyxml wtl zlib) + if(EXISTS ${SOURCE_PATH}/thirdparty/${DEPENDENCY}) + file(REMOVE_RECURSE ${SOURCE_PATH}/thirdparty/${DEPENDENCY}) + endif() +endforeach() + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" CRASHRPT_BUILD_SHARED_LIBS) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" CRASHRPT_LINK_CRT_AS_DLL) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + probe CRASHRPT_BUILD_PROBE + tests CRASHRPT_BUILD_TESTS + demos CRASHRPT_BUILD_DEMOS +) + +# PREFER_NINJA is not used below since CrashSender fails to build with errors like this one: +# C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.23.28105\ATLMFC\include\atlconv.h(788): error C2440: 'return': cannot convert from 'LPCTSTR' to 'LPCOLESTR' +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + # PREFER_NINJA + OPTIONS + -DCRASHRPT_BUILD_SHARED_LIBS=${CRASHRPT_BUILD_SHARED_LIBS} + -DCRASHRPT_LINK_CRT_AS_DLL=${CRASHRPT_LINK_CRT_AS_DLL} + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/crc32c/0001_export_symbols.patch b/vcpkg/ports/crc32c/0001_export_symbols.patch new file mode 100644 index 0000000..691e860 --- /dev/null +++ b/vcpkg/ports/crc32c/0001_export_symbols.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 80b7d17..6ab78e2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -15,6 +15,10 @@ set(CMAKE_CXX_STANDARD 11) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) + ++# When compiling a Windows DLL export all symbols, just like Unix shared ++# objects do. ++set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) ++ + # https://github.com/izenecloud/cmake/blob/master/SetCompilerWarningAll.cmake + if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + # Use the highest warning level for Visual Studio. diff --git a/vcpkg/ports/crc32c/CONTROL b/vcpkg/ports/crc32c/CONTROL new file mode 100644 index 0000000..b13c39f --- /dev/null +++ b/vcpkg/ports/crc32c/CONTROL @@ -0,0 +1,4 @@ +Source: crc32c +Version: 1.1.0 +Homepage: https://github.com/google/crc32c +Description: CRC32C implementation with support for CPU-specific acceleration instructions. diff --git a/vcpkg/ports/crc32c/portfile.cmake b/vcpkg/ports/crc32c/portfile.cmake new file mode 100644 index 0000000..bce61bc --- /dev/null +++ b/vcpkg/ports/crc32c/portfile.cmake @@ -0,0 +1,33 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/crc32c + REF 83c31e797274a5b26e9e4a5355ba394cd0cabc10 + SHA512 829f8618c2769d274b400cf6de1dd2ab874d50d36e8cb086238aadae804154360b113faecd3c60e029a8d5ebc620d4b7cc7e1492775a4235d53989116227cd52 + HEAD_REF master + PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001_export_symbols.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCRC32C_BUILD_TESTS=OFF + -DCRC32C_BUILD_BENCHMARKS=OFF + -DCRC32C_USE_GLOG=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Crc32c) + +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 ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/crc32c RENAME copyright) diff --git a/vcpkg/ports/crfsuite/CMakeLists.txt b/vcpkg/ports/crfsuite/CMakeLists.txt new file mode 100644 index 0000000..81ede0b --- /dev/null +++ b/vcpkg/ports/crfsuite/CMakeLists.txt @@ -0,0 +1,65 @@ +cmake_minimum_required(VERSION 3.12 FATAL_ERROR) +PROJECT(crfsuite) + +file(GLOB SOURCE_FILE_CQDB + "lib/cqdb/src/*.c" +) +file(GLOB HEADERS_FILE_CQDB + "lib/cqdb/include/*.h" +) + +file(GLOB SOURCE_FILE_CRF + "lib/crf/src/*.c" +) +file(GLOB HEADERS_FILE_CRF + "lib/crf/src/*.h" +) +file(GLOB SOURCE_FILE_FRONTEND + "frontend/*.c" +) +file(GLOB HEADERS_FILE_FRONTEND + "frontend/*.h" +) +file(GLOB SOURCE_FILE + "swig/*.cpp" + "frontend/*.c" +) +file(GLOB HEADERS_FILE + "include/*.h" + "include/*.hpp" + "frontend/*.h" +) + +find_library(LBFGS_LIBRARY lbfgs) + +include_directories(lib/cqdb/include/) +include_directories(include/) +include_directories(win32/liblbfgs/) + + +add_library (cqdb STATIC ${SOURCE_FILE_CQDB} ${HEADERS_FILE_CQDB}) +add_library (crf STATIC ${SOURCE_FILE_CRF} ${HEADERS_FILE_CRF}) +add_library (crfsuite STATIC ${SOURCE_FILE} ${HEADERS_FILE}) + +target_link_libraries(crf PUBLIC cqdb ${LBFGS_LIBRARY}) +target_link_libraries(crfsuite PUBLIC crf) + + +install(TARGETS cqdb crf crfsuite + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +if (WIN32) +add_executable(frontend ${SOURCE_FILE_FRONTEND} ${HEADERS_FILE_FRONTEND}) +target_link_libraries(frontend PUBLIC crf) +install(TARGETS frontend + RUNTIME DESTINATION tools + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) +endif() + + +install(FILES ${HEADERS_FILE} ${HEADERS_FILE_CQDB} ${HEADERS_FILE_CRF} ${HEADERS_FILE_FRONTEND} DESTINATION include) \ No newline at end of file diff --git a/vcpkg/ports/crfsuite/CONTROL b/vcpkg/ports/crfsuite/CONTROL new file mode 100644 index 0000000..30a2615 --- /dev/null +++ b/vcpkg/ports/crfsuite/CONTROL @@ -0,0 +1,5 @@ +Source: crfsuite +Version: 2019-07-21 +Homepage: http://www.chokkan.org/software/crfsuite/ +Build-Depends: liblbfgs +Description: CRFSuite is an implementation of Conditional Random Fields (CRFs) for labeling sequential data. \ No newline at end of file diff --git a/vcpkg/ports/crfsuite/portfile.cmake b/vcpkg/ports/crfsuite/portfile.cmake new file mode 100644 index 0000000..8002707 --- /dev/null +++ b/vcpkg/ports/crfsuite/portfile.cmake @@ -0,0 +1,33 @@ +if (VCPKG_TARGET_TRIPLET STREQUAL "x64-uwp" OR VCPKG_TARGET_TRIPLET STREQUAL "arm-uwp") + message(FATAL_ERROR "crfsuite does not support on this platform") +endif() + + +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO chokkan/crfsuite + REF 5d1bd3b803bb26582ed5cc274d6b5af6cc7f9cae + SHA512 e7f329f96fb0dc0e347b3e7a3e26b23ceb45e6fae7b59ace05633a24d58a31665826ebc5280e5a864f50598772791e4b5b3e7da7f46994655cbe03806f823f73 + HEAD_REF master +) + + +list(REMOVE_ITEM SOURCE_FILE ${SOURCE_PATH}/win32/liblbfgs/lbfgs.lib) +list(REMOVE_ITEM SOURCE_FILE ${SOURCE_PATH}/win32/liblbfgs/lbfgs_debug.lib) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFIX_NINJA +) +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/crfsuite RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/croncpp/0001-fix-cmake.patch b/vcpkg/ports/croncpp/0001-fix-cmake.patch new file mode 100644 index 0000000..735c9df --- /dev/null +++ b/vcpkg/ports/croncpp/0001-fix-cmake.patch @@ -0,0 +1,82 @@ +From 30db118abd484c59efada27d9d6956b5f68bcee6 Mon Sep 17 00:00:00 2001 +From: Robert Kesterson +Date: Fri, 4 Sep 2020 16:31:55 +0000 +Subject: [PATCH] vcpkg + +--- + CMakeLists.txt | 47 +++++++++++++++++++++++++++++++++++++++++++-- + croncppConfig.cmake | 1 + + 2 files changed, 46 insertions(+), 2 deletions(-) + create mode 100644 croncppConfig.cmake + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9114b39..8d46e6b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,5 +1,5 @@ + cmake_minimum_required(VERSION 3.7.0) +-project(croncpp) ++project(croncpp VERSION 1.0.0) + + if(WIN32) + message(status "Setting MSVC flags") +@@ -24,4 +24,47 @@ if(BUILD_TESTS) + endif() + + add_subdirectory(benchmark) +-add_subdirectory(test) +\ No newline at end of file ++add_subdirectory(test) ++ ++add_library( croncpp INTERFACE ) ++add_library( croncpp::croncpp ALIAS croncpp ) ++ ++include(GNUInstallDirs) ++target_include_directories( croncpp INTERFACE ++ $ ++ $ ) ++ ++if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.15) ++ # public headers will get installed: ++ set_target_properties( croncpp PROPERTIES PUBLIC_HEADER include/croncpp.h ) ++endif () ++ ++ ++set( version_config "${CMAKE_CURRENT_BINARY_DIR}/croncppConfigVersion.cmake" ) ++ ++include( CMakePackageConfigHelpers ) ++write_basic_package_version_file( "${version_config}" ++ VERSION ${PROJECT_VERSION} ++ COMPATIBILITY SameMajorVersion ) ++ ++message(STATUS "CMAKE_INSTALL_INCLUDEDIR = ${CMAKE_INSTALL_INCLUDEDIR}") ++ ++install( TARGETS croncpp ++ EXPORT croncppConfig ++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/croncpp ) ++export( TARGETS croncpp NAMESPACE croncpp:: FILE croncppTargets.cmake ) ++if (CMAKE_VERSION VERSION_LESS 3.15) ++ install( ++ FILES include/croncpp.h ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/croncpp ) ++endif () ++ ++set( CONFIG_LOC "share/croncpp" ) ++ ++install( EXPORT croncppConfig ++ FILE croncppTargets.cmake ++ NAMESPACE croncpp:: ++ DESTINATION ${CONFIG_LOC} ) ++install ( ++ FILES croncppConfig.cmake "${version_config}" ++ DESTINATION ${CONFIG_LOC}) +diff --git a/croncppConfig.cmake b/croncppConfig.cmake +new file mode 100644 +index 0000000..3c4702c +--- /dev/null ++++ b/croncppConfig.cmake +@@ -0,0 +1 @@ ++include( "${CMAKE_CURRENT_LIST_DIR}/croncppTargets.cmake" ) +-- +2.20.1 + diff --git a/vcpkg/ports/croncpp/CONTROL b/vcpkg/ports/croncpp/CONTROL new file mode 100644 index 0000000..32ef3b9 --- /dev/null +++ b/vcpkg/ports/croncpp/CONTROL @@ -0,0 +1,5 @@ +Source: croncpp +Version: 2020-09-04 +Port-Version: 1 +Homepage: https://github.com/mariusbancila/croncpp +Description: croncpp is a C++17 header-only cross-platform library for handling CRON expressions. diff --git a/vcpkg/ports/croncpp/portfile.cmake b/vcpkg/ports/croncpp/portfile.cmake new file mode 100644 index 0000000..dee2100 --- /dev/null +++ b/vcpkg/ports/croncpp/portfile.cmake @@ -0,0 +1,26 @@ + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mariusbancila/croncpp + REF 11cce4666a06c40346c7ba380ddd90c53806809d #master on 9/4/2020 + SHA512 8f4d892ce90d8eca3711b21728bb599bf64857b20c0b143c5277687d0b6e5d5b8bf3e6dc7f9e8d028ba4e5ee711a5a9e750bcc2f771177d2f659c0c19e12207a + HEAD_REF master + PATCHES 0001-fix-cmake.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") + +# # Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/croncpp RENAME copyright) + +# # Post-build test for cmake libraries +vcpkg_test_cmake(PACKAGE_NAME croncpp) diff --git a/vcpkg/ports/crossguid/CONTROL b/vcpkg/ports/crossguid/CONTROL new file mode 100644 index 0000000..574d444 --- /dev/null +++ b/vcpkg/ports/crossguid/CONTROL @@ -0,0 +1,4 @@ +Source: crossguid +Version: 0.2.2-2018-06-16-1 +Build-Depends: libuuid (!windows&!uwp&!osx&!android) +Description: CrossGuid is a minimal, cross platform, C++ GUID library. diff --git a/vcpkg/ports/crossguid/portfile.cmake b/vcpkg/ports/crossguid/portfile.cmake new file mode 100644 index 0000000..5ee715e --- /dev/null +++ b/vcpkg/ports/crossguid/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO graeme-hill/crossguid + REF c4f8e9b21f779abe287c022e73eeac365d430337 + SHA512 38876f410d0014ad930b720312cecc99be1361b9810a21d5ffc1deba6221ea0e2aebd0da332adb18fd314d0477fd33410403120629b8df405bb64a9884e3d0b0 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCROSSGUID_TESTS:BOOL=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/crossguid/cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(RENAME ${CURRENT_PACKAGES_DIR}/share/crossguid/LICENSE ${CURRENT_PACKAGES_DIR}/share/crossguid/copyright) diff --git a/vcpkg/ports/crow/CONTROL b/vcpkg/ports/crow/CONTROL new file mode 100644 index 0000000..96efb27 --- /dev/null +++ b/vcpkg/ports/crow/CONTROL @@ -0,0 +1,4 @@ +Source: crow +Version: 0.1-1 +Homepage: https://github.com/ipkn/crow +Description: Very fast and easy to use C++ micro web framework diff --git a/vcpkg/ports/crow/portfile.cmake b/vcpkg/ports/crow/portfile.cmake new file mode 100644 index 0000000..ff6f84d --- /dev/null +++ b/vcpkg/ports/crow/portfile.cmake @@ -0,0 +1,12 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ipkn/crow + REF v0.1 + SHA512 5a97c5b8cda3ffe79001aa382d4391eddde30027401bbb1d9c85c70ea715f556d3659f5eac0b9d9192c19d13718f19ad6bdf49d67bef03b21e75300d60e7d02a + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/crow RENAME copyright) diff --git a/vcpkg/ports/cryptopp/CONTROL b/vcpkg/ports/cryptopp/CONTROL new file mode 100644 index 0000000..c70415d --- /dev/null +++ b/vcpkg/ports/cryptopp/CONTROL @@ -0,0 +1,7 @@ +Source: cryptopp +Version: 8.2.0-2 +Homepage: https://github.com/weidai11/cryptopp +Description: Crypto++ is a free C++ class library of cryptographic schemes. + +Feature: pem-pack +Description: Crypto++ with PEM pack diff --git a/vcpkg/ports/cryptopp/cmake.patch b/vcpkg/ports/cryptopp/cmake.patch new file mode 100644 index 0000000..699ebd5 --- /dev/null +++ b/vcpkg/ports/cryptopp/cmake.patch @@ -0,0 +1,19 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8cf9fa2..86a756b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -336,9 +336,13 @@ if (MSVC) + if (CMAKE_SYSTEM_VERSION MATCHES "10\\.0.*") + list(APPEND CRYPTOPP_COMPILE_DEFINITIONS "_WIN32_WINNT=0x0A00") + endif () +- list(APPEND CRYPTOPP_COMPILE_OPTIONS "/FI\"winapifamily.h\"") ++ list(APPEND CRYPTOPP_COMPILE_OPTIONS "/FIwinapifamily.h") + endif () + ++if(WINDOWS_STORE) ++ add_definitions(-DCRYPTOPP_DISABLE_NACL=1) ++endif() ++ + # Enable PIC for all target machines except 32-bit i386 due to register pressures. + if (NOT CRYPTOPP_I386) + SET(CMAKE_POSITION_INDEPENDENT_CODE 1) diff --git a/vcpkg/ports/cryptopp/patch.patch b/vcpkg/ports/cryptopp/patch.patch new file mode 100644 index 0000000..937738d --- /dev/null +++ b/vcpkg/ports/cryptopp/patch.patch @@ -0,0 +1,12 @@ +diff --git a/config.h b/config.h +index f06992a2..be6eda31 100644 +--- a/config.h ++++ b/config.h +@@ -814,6 +814,7 @@ NAMESPACE_END + #endif + + #ifdef CRYPTOPP_WIN32_AVAILABLE ++#include + # if !defined(WINAPI_FAMILY) + # define THREAD_TIMER_AVAILABLE + # elif defined(WINAPI_FAMILY) diff --git a/vcpkg/ports/cryptopp/portfile.cmake b/vcpkg/ports/cryptopp/portfile.cmake new file mode 100644 index 0000000..b88f2e3 --- /dev/null +++ b/vcpkg/ports/cryptopp/portfile.cmake @@ -0,0 +1,78 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH CMAKE_SOURCE_PATH + REPO noloader/cryptopp-cmake + REF 6d0666c457fbbf6f81819fd2b80f0cb5b6646593 + SHA512 0341f14ce734afaee8bcc1db1716684f241499c692a5478c83a3df3fd2e5331cd04b2f4f51d43cce231ca1d9fbe76220639573c05ef06be0cf33081a1ef7ab30 + HEAD_REF master + PATCHES + cmake.patch +) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO weidai11/cryptopp + REF CRYPTOPP_8_2_0 + SHA512 d2dcc107091d00800de243abdce8286ccd7fcc5707eebf88b97675456a021e62002e942b862db0465f72142951f631c0c1f0b2ba56028b96461780a17f2dfdf9 + HEAD_REF master + PATCHES patch.patch +) + +file(COPY ${CMAKE_SOURCE_PATH}/cryptopp-config.cmake DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_SOURCE_PATH}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +if("pem-pack" IN_LIST FEATURES) + vcpkg_from_github( + OUT_SOURCE_PATH PEM_PACK_SOURCE_PATH + REPO noloader/cryptopp-pem + REF 095f08ff2ef9bca7b81036a59f2395e4f08ce2e8 + SHA512 49912758a635faca1f49665ac9552b20576b46e0283aaabc19bb012bdc80586106452018e5088b9b46967717982ca6022ca968edc4cac96a7506d2b1a3e4bf13 + HEAD_REF master + ) + + file(GLOB PEM_PACK_FILES + ${PEM_PACK_SOURCE_PATH}/*.h + ${PEM_PACK_SOURCE_PATH}/*.cpp + ) + file(COPY ${PEM_PACK_FILES} DESTINATION ${SOURCE_PATH}) +endif() + +# disable assembly on OSX and ARM Windows to fix broken build +if (VCPKG_TARGET_IS_OSX) + set(CRYPTOPP_DISABLE_ASM "ON") +elseif (VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE MATCHES "^arm") + set(CRYPTOPP_DISABLE_ASM "ON") +else() + set(CRYPTOPP_DISABLE_ASM "OFF") +endif() + + +# Dynamic linking should be avoided for Crypto++ to reduce the attack surface, +# so generate a static lib for both dynamic and static vcpkg targets. +# See also: +# https://www.cryptopp.com/wiki/Visual_Studio#Dynamic_Runtime_Linking +# https://www.cryptopp.com/wiki/Visual_Studio#The_DLL + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_SHARED=OFF + -DBUILD_STATIC=ON + -DBUILD_TESTING=OFF + -DBUILD_DOCUMENTATION=OFF + -DDISABLE_ASM=${CRYPTOPP_DISABLE_ASM} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/cryptopp) + +# There is no way to suppress installation of the headers and resource files in debug build. +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cryptopp) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/cryptopp/License.txt ${CURRENT_PACKAGES_DIR}/share/cryptopp/copyright) diff --git a/vcpkg/ports/cspice/CMakeLists.txt b/vcpkg/ports/cspice/CMakeLists.txt new file mode 100644 index 0000000..0ccfcfa --- /dev/null +++ b/vcpkg/ports/cspice/CMakeLists.txt @@ -0,0 +1,46 @@ +cmake_minimum_required(VERSION 3.1) +project(cspice LANGUAGES C) + +set(SOVERSION 66) + +# Include all *.c files from the library +file(GLOB CSPICE_SOURCE ${PROJECT_SOURCE_DIR}/cspice/src/cspice/*.c) +set(INCLUDE_PATH "${PROJECT_SOURCE_DIR}/cspice/include") + +if (_STATIC_BUILD) + add_library(cspice STATIC ${CSPICE_SOURCE}) +else() + add_library(cspice SHARED ${CSPICE_SOURCE}) +endif() +target_include_directories(cspice PUBLIC "${INCLUDE_PATH}") + +if (WIN32) + target_compile_definitions(cspice PUBLIC "_COMPLEX_DEFINED;MSDOS;OMIT_BLANK_CC;NON_ANSI_STDIO") + set_target_properties(cspice PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE) +elseif (UNIX) + target_compile_definitions(cspice PUBLIC "NON_UNIX_STDIO") + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + target_compile_options(cspice PUBLIC -m64 -ansi -fPIC) + elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) + target_compile_options(cspice PUBLIC -m32 -ansi -fPIC) + endif() + target_compile_options(cspice PRIVATE -Wno-error=implicit-function-declaration) +endif () + +if (NOT _SKIP_HEADERS) + file(GLOB SPICE_HEADERS ${INCLUDE_PATH}/*.h) + install(FILES ${SPICE_HEADERS} DESTINATION include/cspice) +endif() + +set_target_properties( + cspice + PROPERTIES SOVERSION ${SOVERSION} +) + +install( + TARGETS cspice + EXPORT cspice + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) diff --git a/vcpkg/ports/cspice/CONTROL b/vcpkg/ports/cspice/CONTROL new file mode 100644 index 0000000..310fbe4 --- /dev/null +++ b/vcpkg/ports/cspice/CONTROL @@ -0,0 +1,6 @@ +Source: cspice +Version: 66 +Port-Version: 3 +Homepage: https://naif.jpl.nasa.gov/naif/toolkit_C.html +Description: NASA C SPICE toolkit +Supports: !uwp diff --git a/vcpkg/ports/cspice/License.txt b/vcpkg/ports/cspice/License.txt new file mode 100644 index 0000000..dcec937 --- /dev/null +++ b/vcpkg/ports/cspice/License.txt @@ -0,0 +1,16 @@ +This software and any related materials were created by the California +Institute of Technology (Caltech) under U.S. government contract with the +National Aeronautics and Space Administration (NASA). The software is +Technology and Software Publicly Available under U.S. export laws and is +provided "as-is" to the recipient without warranty of any kind, including any +warranties of performance or merchantability or fitness for particular use or +purpose (as set forth in United States UCC§2312-§2313) or for any purpose +whatsoever, for the software and related materials, however used. In no event +shall Caltech, its Jet Propulsion Laboratory, or NASA be liable for any damages +and/or costs, including, but not limited to, incidental or consequential +damages of any kind, including economic damage or injury to property and lost +profits, regardless of whether Caltech, JPL, or NASA be advised, have reason to +know, or, in fact, shall know of the possibility. Recipient bears all risk +relating to quality and performance of the software and any related materials, +and agrees to indemnify Caltech and NASA for all third-party claims resulting +from the actions of recipient in the use of the software. diff --git a/vcpkg/ports/cspice/isatty.patch b/vcpkg/ports/cspice/isatty.patch new file mode 100644 index 0000000..a6d201d --- /dev/null +++ b/vcpkg/ports/cspice/isatty.patch @@ -0,0 +1,19 @@ +--- a/cspice/src/cspice/fio.h 2019-11-01 20:51:53.198400000 +0300 ++++ b/cspice/src/cspice/fio.h 2019-11-01 21:19:58.123200000 +0300 +@@ -1,3 +1,6 @@ ++#ifdef _WIN32 ++#include /* for isatty() */ ++#endif + #include "stdio.h" + #include "errno.h" + #ifndef NULL +@@ -75,7 +76,9 @@ + extern int (*f__donewrec)(void), t_putc(int), x_wSL(void); + extern void b_char(char*,char*,ftnlen), g_char(char*,ftnlen,char*); + extern int c_sfe(cilist*), z_rnew(void); ++#ifndef _WIN32 + extern int isatty(int); ++#endif + extern int err__fl(int,int,char*); + extern int xrd_SL(void); + extern int f__putbuf(int); diff --git a/vcpkg/ports/cspice/mktemp.patch b/vcpkg/ports/cspice/mktemp.patch new file mode 100644 index 0000000..5a7cc0e --- /dev/null +++ b/vcpkg/ports/cspice/mktemp.patch @@ -0,0 +1,11 @@ +--- a/cspice/src/cspice/open.c 2019-11-02 10:57:10.073886963 +0300 ++++ b/cspice/src/cspice/open.c 2019-11-02 10:57:49.230398941 +0300 +@@ -324,7 +324,7 @@ + #ifdef NON_ANSI_STDIO + + (void) strcpy(buf,"tmp.FXXXXXX"); +- (void) mktemp(buf); ++ fclose(mktemp(buf)); + goto replace; + + #else diff --git a/vcpkg/ports/cspice/portfile.cmake b/vcpkg/ports/cspice/portfile.cmake new file mode 100644 index 0000000..865325a --- /dev/null +++ b/vcpkg/ports/cspice/portfile.cmake @@ -0,0 +1,78 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_download_distfile(ARCHIVE + URLS "https://naif.jpl.nasa.gov/pub/naif/toolkit/C/PC_Windows_VisualC_32bit/packages/cspice.zip" + FILENAME "cspice_32bit.zip" + SHA512 4f6129b26543729f4eb4f8240b43ca87530db9c6d9a5c0e3f43faf30561eaad95dcf507e3fecfd1c3d4388ccaa4e22a76df7bf7945b6ce9a68eb3b4893885992 + ) + elseif (VCPKG_TARGET_IS_OSX) + vcpkg_download_distfile(ARCHIVE + URLS "https://naif.jpl.nasa.gov/pub/naif/toolkit//C/MacIntel_OSX_AppleC_32bit/packages/cspice.tar.Z" + FILENAME "cspice_32bit.tar.Z" + SHA512 bd5cc20206e48b3712c5077a2beb05c98cd58a25ce374ed363699a04998eb8ba93e42b5f7c2104c5296db95b3bccdc7cc9b6a2ba45875454d0c3914834aa4c42 + ) + else () + vcpkg_download_distfile(ARCHIVE + URLS "https://naif.jpl.nasa.gov/pub/naif/toolkit/C/PC_Linux_GCC_32bit/packages/cspice.tar.Z" + FILENAME "cspice_32bit.tar.Z" + SHA512 b387bc2cfca4deccc451d198af49564ea0b19cf665ba143d39196ed532639cbc11aad7e1d63f71f1bb88d72c0e6ac30757b6e1babca9e0ee3b92f9c205c1b908 + ) + endif() +else() + if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_download_distfile(ARCHIVE + URLS "https://naif.jpl.nasa.gov/pub/naif/toolkit/C/PC_Windows_VisualC_64bit/packages/cspice.zip" + FILENAME "cspice_64bit.zip" + SHA512 7b5353c638fdba67ed2e9fd21c4f78ac56c0afba408caa70f910f23bb025f6dc822fbaa7d6d7fa277d1038f835e6a962563f4b11a6adf63150d48354959e3c62 + ) + elseif (VCPKG_TARGET_IS_OSX) + vcpkg_download_distfile(ARCHIVE + URLS "https://naif.jpl.nasa.gov/pub/naif/toolkit//C/MacIntel_OSX_AppleC_64bit/packages/cspice.tar.Z" + FILENAME "cspice_64bit.tar.Z" + SHA512 0d4ef95dfa65d127c1d6f9cf1f637d41ca6680660ee3003f357652f12ed9d04a21888ef796f347ba90354a445b5aea9ffca7dedc6c1617f253b0002683d54a0f + ) + else () + vcpkg_download_distfile(ARCHIVE + URLS "https://naif.jpl.nasa.gov/pub/naif/toolkit/C/PC_Linux_GCC_64bit/packages/cspice.tar.Z" + FILENAME "cspice_64bit.tar.Z" + SHA512 7d090e9196596436740b53180a7c6ca885c12e301771a83fc62d625a63691129c69012cb0385a6c8f246cc5edf1c1af57ffac8a9d766061e1bde8584c57c6ca4 + ) + endif() +endif() + +set(PATCHES isatty.patch) +if (NOT VCPKG_TARGET_IS_WINDOWS) + set(PATCHES ${PATCHES} mktemp.patch) +endif() + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL + PATCHES ${PATCHES} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(_STATIC_BUILD ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -D_STATIC_BUILD=${_STATIC_BUILD} + OPTIONS_DEBUG -D_SKIP_HEADERS=ON +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file( + INSTALL ${CMAKE_CURRENT_LIST_DIR}/License.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) \ No newline at end of file diff --git a/vcpkg/ports/ctbignum/CONTROL b/vcpkg/ports/ctbignum/CONTROL new file mode 100644 index 0000000..977abc2 --- /dev/null +++ b/vcpkg/ports/ctbignum/CONTROL @@ -0,0 +1,6 @@ +Source: ctbignum +Version: 2019-08-02 +Homepage: https://github.com/niekbouman/ctbignum +Description: This is a header-only template library for fixed-width "small big-integer" computations, for use during run-time as well as compile-time. +Build-Depends: boost + diff --git a/vcpkg/ports/ctbignum/portfile.cmake b/vcpkg/ports/ctbignum/portfile.cmake new file mode 100644 index 0000000..6d29711 --- /dev/null +++ b/vcpkg/ports/ctbignum/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO niekbouman/ctbignum + REF cf3233d8b7dcff59f29a7389204959ee2228a4af + SHA512 8cd5e187836f48165a088a171c87ce438393e66f7362af1b67a253ae6ef0b17c41468e21e0dfe337094796f2b2a2fa5062cc9a9231afc377f187baf1ead1257e + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCTBIGNUM_BuildTests=OFF + -DCTBIGNUM_BuildBenchmarks=OFF +) + +vcpkg_install_cmake() + +# Move CMake files to the right place +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +# Remove empty files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) + diff --git a/vcpkg/ports/ctemplate/CMakeLists.txt b/vcpkg/ports/ctemplate/CMakeLists.txt new file mode 100644 index 0000000..63e6fc6 --- /dev/null +++ b/vcpkg/ports/ctemplate/CMakeLists.txt @@ -0,0 +1,96 @@ +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) + 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}") + +include_directories(${COMMON_INCLUDES}) + +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() + +install( + TARGETS libctemplate + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY "${COMMON_INCLUDES}/ctemplate" DESTINATION include FILES_MATCHING PATTERN "*.h") +endif() diff --git a/vcpkg/ports/ctemplate/CONTROL b/vcpkg/ports/ctemplate/CONTROL new file mode 100644 index 0000000..00abc1f --- /dev/null +++ b/vcpkg/ports/ctemplate/CONTROL @@ -0,0 +1,4 @@ +Source: ctemplate +Version: 2017-06-23-44b7c5-4 +Homepage: https://github.com/OlafvdSpek/ctemplate +Description: C++ CTemplate system diff --git a/vcpkg/ports/ctemplate/fix-msvc.patch b/vcpkg/ports/ctemplate/fix-msvc.patch new file mode 100644 index 0000000..acfbce4 --- /dev/null +++ b/vcpkg/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/vcpkg/ports/ctemplate/portfile.cmake b/vcpkg/ports/ctemplate/portfile.cmake new file mode 100644 index 0000000..d5d8b39 --- /dev/null +++ b/vcpkg/ports/ctemplate/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OlafvdSpek/ctemplate + REF 4b7e6c52dc7cbb4d51c9abcebcbac91ec256a62b + SHA512 9317fb26f22892b0bc2ca17cbccb5b084091050aa88766b4ed673a690bc4cdb9cd882134fbcd7ed3ee156f6a6937218717765143796d7e98b532355867ed042b + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_find_acquire_program(PYTHON3) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DPYTHON_EXECUTABLE=${PYTHON3} + 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() diff --git a/vcpkg/ports/ctp/CONTROL b/vcpkg/ports/ctp/CONTROL new file mode 100644 index 0000000..86eeff0 --- /dev/null +++ b/vcpkg/ports/ctp/CONTROL @@ -0,0 +1,7 @@ +Source: ctp +Version: 6.3.15_20190220_se +Homepage: http://www.sfit.com.cn/index.htm +Description: The Comprehensive Transaction Platform (CTP) is a future brokerage management system developed specially for futures companies. CTP API client library allows users to connect to CTP gateway for algorithmic trading. + +Feature: datacollect +Description: Data collect support of CTP diff --git a/vcpkg/ports/ctp/portfile.cmake b/vcpkg/ports/ctp/portfile.cmake new file mode 100644 index 0000000..f8efa19 --- /dev/null +++ b/vcpkg/ports/ctp/portfile.cmake @@ -0,0 +1,70 @@ +message(STATUS "Note: the downloading server may only be avilable from 8:00AM-5:00PM (UTC+8), Mon-Fri (except public holidays in China)") + +vcpkg_fail_port_install(ON_TARGET "OSX" "UWP" ON_ARCH "arm") +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "http://www.sfit.com.cn/DocumentDown/api_3/5_2_2/6.3.15_20190220.zip" + FILENAME "6.3.15_20190220.zip" + SHA512 e17bb9d7fdda85f944b241d7ecd6a3b6f7e145f1a9d39ad48b36aa015e7e8a1b599e0289c8c38ce0a84cc8426a374fd620b07815dc9b6083c562389867138577 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH UNPACK_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL +) + +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(ARCH_ARCHIVE "6.3.15_20190220_tradeapi_se_windows.zip") + set(ARCH_ARCHIVE_DATACOLLECT "6.3.15_20190220_clientdll_windows.zip") +elseif(VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(ARCH_ARCHIVE "6.3.15_20190220_tradeapi64_se_windows.zip") + set(ARCH_ARCHIVE_DATACOLLECT "6.3.15_20190220_clientdll64_windows.zip") +elseif(VCPKG_TARGET_IS_LINUX AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(ARCH_ARCHIVE "v6.3.15_20190220_api_clientdatacollectdll_linux64.tar") + set(ARCH_ARCHIVE_DATACOLLECT "6.3.15_20190220_clientdll_windows.zip") +else() + message(FATAL_ERROR "${TARGET_TRIPLET} is not a supported platform" ) +endif() + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${UNPACK_PATH}/${ARCH_ARCHIVE}" +) + +file(INSTALL ${SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.h") + +if(VCPKG_TARGET_IS_WINDOWS) + file(INSTALL ${SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib FILES_MATCHING PATTERN "*.lib") + file(INSTALL ${SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/bin FILES_MATCHING PATTERN "*.dll") + file(INSTALL ${SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/Debug/lib FILES_MATCHING PATTERN "*.lib") + file(INSTALL ${SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/Debug/bin FILES_MATCHING PATTERN "*.dll") +elseif(VCPKG_TARGET_IS_LINUX) + file(INSTALL ${SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib FILES_MATCHING PATTERN "*.so") + file(INSTALL ${SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/Debug/lib FILES_MATCHING PATTERN "*.so") +endif() + +file(INSTALL ${SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/share FILES_MATCHING PATTERN "*.xml") +file(INSTALL ${SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/share FILES_MATCHING PATTERN "*.dtd") + +if("datacollect" IN_LIST FEATURES) + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH_DATACOLLECT + ARCHIVE "${UNPACK_PATH}/${ARCH_ARCHIVE_DATACOLLECT}" + ) + file(INSTALL ${SOURCE_PATH_DATACOLLECT}/ DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.h") + + if(VCPKG_TARGET_IS_WINDOWS) + file(INSTALL ${SOURCE_PATH_DATACOLLECT}/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib FILES_MATCHING PATTERN "*.lib") + file(INSTALL ${SOURCE_PATH_DATACOLLECT}/ DESTINATION ${CURRENT_PACKAGES_DIR}/bin FILES_MATCHING PATTERN "*.dll") + file(INSTALL ${SOURCE_PATH_DATACOLLECT}/ DESTINATION ${CURRENT_PACKAGES_DIR}/Debug/lib FILES_MATCHING PATTERN "*.lib") + file(INSTALL ${SOURCE_PATH_DATACOLLECT}/ DESTINATION ${CURRENT_PACKAGES_DIR}/Debug/bin FILES_MATCHING PATTERN "*.dll") + elseif(VCPKG_TARGET_IS_LINUX) + file(INSTALL ${SOURCE_PATH_DATACOLLECT}/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib FILES_MATCHING PATTERN "*.so") + file(INSTALL ${SOURCE_PATH_DATACOLLECT}/ DESTINATION ${CURRENT_PACKAGES_DIR}/Debug/lib FILES_MATCHING PATTERN "*.so") + endif() + +endif() + +file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "Copyright By Shanghai Futures Information Technology Co.,Ltd") diff --git a/vcpkg/ports/ctre/CONTROL b/vcpkg/ports/ctre/CONTROL new file mode 100644 index 0000000..8be5533 --- /dev/null +++ b/vcpkg/ports/ctre/CONTROL @@ -0,0 +1,3 @@ +Source: ctre +Version: 2.7 +Description: A Compile time PCRE (almost) compatible regular expression matcher diff --git a/vcpkg/ports/ctre/portfile.cmake b/vcpkg/ports/ctre/portfile.cmake new file mode 100644 index 0000000..4be1325 --- /dev/null +++ b/vcpkg/ports/ctre/portfile.cmake @@ -0,0 +1,15 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO hanickadot/compile-time-regular-expressions + REF 96de8f7a519b61abd4ef53ec37cd89565880aa50 # v2.7 + SHA512 6b65faaccf751ca5c4b695513205c1aa60966f438e912dbacbcb60eeb517aab091a6787a1e9df562ef100ffc2b341640bab05ae76be7c4e60c7d92fd2b5fddd6 + HEAD_REF master +) + +# Install header files +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/ctre RENAME copyright) diff --git a/vcpkg/ports/cub/CONTROL b/vcpkg/ports/cub/CONTROL new file mode 100644 index 0000000..eb708a8 --- /dev/null +++ b/vcpkg/ports/cub/CONTROL @@ -0,0 +1,4 @@ +Source: cub +Version: 1.8.0-1 +Description: CUB is a flexible library of cooperative threadblock primitives and other utilities for CUDA kernel programming +Build-Depends: cuda diff --git a/vcpkg/ports/cub/portfile.cmake b/vcpkg/ports/cub/portfile.cmake new file mode 100644 index 0000000..302bfb7 --- /dev/null +++ b/vcpkg/ports/cub/portfile.cmake @@ -0,0 +1,12 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO NVlabs/cub + REF v1.8.0 + SHA512 c4ba51ca4e369c8ef87bc411aa011470478fcc2526b667f088e9ac8c62e6532dc2368e869f5147b56f22b3e8718c7276434c3294d9d67cb3a92c700d163e8fa7 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/cub/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/cub) + +configure_file(${SOURCE_PATH}/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/cub/copyright COPYONLY) diff --git a/vcpkg/ports/cuda/CONTROL b/vcpkg/ports/cuda/CONTROL new file mode 100644 index 0000000..348fc9a --- /dev/null +++ b/vcpkg/ports/cuda/CONTROL @@ -0,0 +1,5 @@ +Source: cuda +Version: 10.1 +Port-Version: 3 +Description: A parallel computing platform and programming model +Homepage: https://developer.nvidia.com/cuda-toolkit diff --git a/vcpkg/ports/cuda/portfile.cmake b/vcpkg/ports/cuda/portfile.cmake new file mode 100644 index 0000000..6e5a497 --- /dev/null +++ b/vcpkg/ports/cuda/portfile.cmake @@ -0,0 +1,13 @@ +# This package doesn't install CUDA. It instead verifies that CUDA is installed. +# Other packages can depend on this package to declare a dependency on CUDA. +# If this package is installed, we assume that CUDA is properly installed. + +#note: this port must be kept in sync with CUDNN port: every time one is upgraded, the other must be too + +include(${CMAKE_CURRENT_LIST_DIR}/vcpkg_find_cuda.cmake) + +vcpkg_find_cuda(OUT_CUDA_TOOLKIT_ROOT CUDA_TOOLKIT_ROOT) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg_find_cuda.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/vcpkg_find_cuda) + +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/vcpkg/ports/cuda/vcpkg_find_cuda.cmake b/vcpkg/ports/cuda/vcpkg_find_cuda.cmake new file mode 100644 index 0000000..14719b0 --- /dev/null +++ b/vcpkg/ports/cuda/vcpkg_find_cuda.cmake @@ -0,0 +1,91 @@ +function(vcpkg_find_cuda) + cmake_parse_arguments(PARSE_ARGV 0 vfc "" "OUT_CUDA_TOOLKIT_ROOT" "") + + if(NOT vfc_OUT_CUDA_TOOLKIT_ROOT) + message(FATAL_ERROR "vcpkg_find_cuda() requres an OUT_CUDA_TOOLKIT_ROOT argument") + endif() + + set(CUDA_REQUIRED_VERSION "10.1.0") + + set(CUDA_PATHS + ENV CUDA_PATH + ENV CUDA_BIN_PATH + ENV CUDA_PATH_V11_0 + ENV CUDA_PATH_V10_2 + ENV CUDA_PATH_V10_1) + + if (VCPKG_TARGET_IS_WINDOWS) + find_program(NVCC + NAMES nvcc.exe + PATHS + ${CUDA_PATHS} + PATH_SUFFIXES bin bin64 + DOC "Toolkit location." + NO_DEFAULT_PATH + ) + else() + if (VCPKG_TARGET_IS_LINUX) + set(platform_base "/usr/local/cuda-") + else() + set(platform_base "/Developer/NVIDIA/CUDA-") + endif() + + file(GLOB possible_paths "${platform_base}*") + set(FOUND_PATH ) + foreach (p ${possible_paths}) + # Extract version number from end of string + string(REGEX MATCH "[0-9][0-9]?\\.[0-9]$" p_version ${p}) + if (IS_DIRECTORY ${p} AND p_version) + if (p_version VERSION_GREATER_EQUAL CUDA_REQUIRED_VERSION) + set(FOUND_PATH ${p}) + break() + endif() + endif() + endforeach() + + find_program(NVCC + NAMES nvcc + PATHS + ${CUDA_PATHS} + PATHS ${FOUND_PATH} + PATH_SUFFIXES bin bin64 + DOC "Toolkit location." + NO_DEFAULT_PATH + ) + endif() + + set(error_code 1) + if (NVCC) + execute_process( + COMMAND ${NVCC} --version + OUTPUT_VARIABLE NVCC_OUTPUT + RESULT_VARIABLE error_code) + endif() + + + if (error_code) + message(STATUS "Executing ${NVCC} --version resulted in error: ${error_code}") + message(FATAL_ERROR "Could not find CUDA. Before continuing, please download and install CUDA (v${CUDA_REQUIRED_VERSION} or higher) from:" + "\n https://developer.nvidia.com/cuda-downloads\n") + endif() + + # Sample output: + # NVIDIA (R) Cuda compiler driver + # Copyright (c) 2005-2016 NVIDIA Corporation + # Built on Sat_Sep__3_19:05:48_CDT_2016 + # Cuda compilation tools, release 8.0, V8.0.44 + string(REGEX MATCH "V([0-9]+)\\.([0-9]+)\\.([0-9]+)" CUDA_VERSION ${NVCC_OUTPUT}) + message(STATUS "Found CUDA ${CUDA_VERSION}") + set(CUDA_VERSION_MAJOR ${CMAKE_MATCH_1}) + set(CUDA_VERSION_MINOR ${CMAKE_MATCH_2}) + set(CUDA_VERSION_PATCH ${CMAKE_MATCH_3}) + + if (CUDA_VERSION_MAJOR LESS 10 AND CUDA_VERSION_MINOR LESS 1) + message(FATAL_ERROR "CUDA ${CUDA_VERSION} found, but v${CUDA_REQUIRED_VERSION} is required. Please download and install a more recent version of CUDA from:" + "\n https://developer.nvidia.com/cuda-downloads\n") + endif() + + get_filename_component(CUDA_TOOLKIT_ROOT "${NVCC}" DIRECTORY) + get_filename_component(CUDA_TOOLKIT_ROOT "${CUDA_TOOLKIT_ROOT}" DIRECTORY) + set(${vfc_OUT_CUDA_TOOLKIT_ROOT} "${CUDA_TOOLKIT_ROOT}" PARENT_SCOPE) +endfunction() diff --git a/vcpkg/ports/cudnn/CONTROL b/vcpkg/ports/cudnn/CONTROL new file mode 100644 index 0000000..24714f9 --- /dev/null +++ b/vcpkg/ports/cudnn/CONTROL @@ -0,0 +1,6 @@ +Source: cudnn +Version: 7.6 +Port-Version: 2 +Description: NVIDIA's cuDNN deep neural network acceleration library +Build-Depends: cuda +Supports: (windows|linux)&x64 diff --git a/vcpkg/ports/cudnn/FindCUDNN.cmake b/vcpkg/ports/cudnn/FindCUDNN.cmake new file mode 100644 index 0000000..5dc2e33 --- /dev/null +++ b/vcpkg/ports/cudnn/FindCUDNN.cmake @@ -0,0 +1,95 @@ +# Distributed under the OSI-approved BSD 3-Clause License. + +#.rst: +# FindCUDNN +# -------- +# +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# This module will set the following variables in your project:: +# +# ``CUDNN_FOUND`` +# True if CUDNN found on the local system +# +# ``CUDNN_INCLUDE_DIRS`` +# Location of CUDNN header files. +# +# ``CUDNN_LIBRARIES`` +# The CUDNN libraries. +# +# ``CuDNN::CuDNN`` +# The CUDNN target +# + +include(FindPackageHandleStandardArgs) + +if(NOT CUDNN_INCLUDE_DIR) + find_path(CUDNN_INCLUDE_DIR cudnn.h + HINTS ${CUDA_HOME} ${CUDA_TOOLKIT_ROOT_DIR} $ENV{cudnn} $ENV{CUDNN} + PATH_SUFFIXES cuda/include include) +endif() + +if(NOT CUDNN_LIBRARY) + find_library(CUDNN_LIBRARY cudnn + HINTS ${CUDA_HOME} ${CUDA_TOOLKIT_ROOT_DIR} $ENV{cudnn} $ENV{CUDNN} + PATH_SUFFIXES lib lib64 cuda/lib cuda/lib64 lib/x64) +endif() + +if(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn.h") + file(READ ${CUDNN_INCLUDE_DIR}/cudnn.h CUDNN_HEADER_CONTENTS) + if(EXISTS "${CUDNN_INCLUDE_DIR}/cudnn_version.h") + file(READ "${CUDNN_INCLUDE_DIR}/cudnn_version.h" CUDNN_VERSION_H_CONTENTS) + string(APPEND CUDNN_HEADER_CONTENTS "${CUDNN_VERSION_H_CONTENTS}") + unset(CUDNN_VERSION_H_CONTENTS) + endif() + string(REGEX MATCH "define CUDNN_MAJOR * +([0-9]+)" + CUDNN_VERSION_MAJOR "${CUDNN_HEADER_CONTENTS}") + string(REGEX REPLACE "define CUDNN_MAJOR * +([0-9]+)" "\\1" + CUDNN_VERSION_MAJOR "${CUDNN_VERSION_MAJOR}") + string(REGEX MATCH "define CUDNN_MINOR * +([0-9]+)" + CUDNN_VERSION_MINOR "${CUDNN_HEADER_CONTENTS}") + string(REGEX REPLACE "define CUDNN_MINOR * +([0-9]+)" "\\1" + CUDNN_VERSION_MINOR "${CUDNN_VERSION_MINOR}") + string(REGEX MATCH "define CUDNN_PATCHLEVEL * +([0-9]+)" + CUDNN_VERSION_PATCH "${CUDNN_HEADER_CONTENTS}") + string(REGEX REPLACE "define CUDNN_PATCHLEVEL * +([0-9]+)" "\\1" + CUDNN_VERSION_PATCH "${CUDNN_VERSION_PATCH}") + if(NOT CUDNN_VERSION_MAJOR) + set(CUDNN_VERSION "?") + else() + set(CUDNN_VERSION "${CUDNN_VERSION_MAJOR}.${CUDNN_VERSION_MINOR}.${CUDNN_VERSION_PATCH}") + endif() +endif() + +set(CUDNN_INCLUDE_DIRS ${CUDNN_INCLUDE_DIR}) +set(CUDNN_LIBRARIES ${CUDNN_LIBRARY}) +mark_as_advanced(CUDNN_LIBRARY CUDNN_INCLUDE_DIR) + +find_package_handle_standard_args(CUDNN + REQUIRED_VARS CUDNN_INCLUDE_DIR CUDNN_LIBRARY + VERSION_VAR CUDNN_VERSION +) + +if(WIN32) + set(CUDNN_DLL_DIR ${CUDNN_INCLUDE_DIR}) + list(TRANSFORM CUDNN_DLL_DIR APPEND "/../bin") + find_file(CUDNN_LIBRARY_DLL NAMES cudnn64_${CUDNN_VERSION_MAJOR}.dll PATHS ${CUDNN_DLL_DIR}) +endif() + +if( CUDNN_FOUND AND NOT TARGET CuDNN::CuDNN ) + if( EXISTS "${CUDNN_LIBRARY_DLL}" ) + add_library( CuDNN::CuDNN SHARED IMPORTED ) + set_target_properties( CuDNN::CuDNN PROPERTIES + IMPORTED_LOCATION "${CUDNN_LIBRARY_DLL}" + IMPORTED_IMPLIB "${CUDNN_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${CUDNN_INCLUDE_DIR}" + IMPORTED_LINK_INTERFACE_LANGUAGES "C" ) + else() + add_library( CuDNN::CuDNN UNKNOWN IMPORTED ) + set_target_properties( CuDNN::CuDNN PROPERTIES + IMPORTED_LOCATION "${CUDNN_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${CUDNN_INCLUDE_DIR}" + IMPORTED_LINK_INTERFACE_LANGUAGES "C" ) + endif() +endif() diff --git a/vcpkg/ports/cudnn/portfile.cmake b/vcpkg/ports/cudnn/portfile.cmake new file mode 100644 index 0000000..7715439 --- /dev/null +++ b/vcpkg/ports/cudnn/portfile.cmake @@ -0,0 +1,62 @@ +include(vcpkg_common_functions) + +if(VCPKG_TARGET_IS_UWP OR VCPKG_TARGET_IS_OSX) + message(FATAL_ERROR "This port is only for Windows Desktop or Linux") +endif() + +if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + message(FATAL_ERROR "This port is only for x64 architectures") +endif() + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) + +#note: this port must be kept in sync with CUDA port: every time one is upgraded, the other must be too +set(CUDNN_VERSION "7.6.0") +set(CUDNN_FULL_VERSION "${CUDNN_VERSION}-cuda10.1_0") + +if(VCPKG_TARGET_IS_WINDOWS) + set(CUDNN_DOWNLOAD_LINK "https://anaconda.org/anaconda/cudnn/${CUDNN_VERSION}/download/win-64/cudnn-${CUDNN_FULL_VERSION}.tar.bz2") + set(SHA512_CUDNN "c0218407e7bc2b3c1497f1709dedee345bc619603ec0efa094e392888c0d513d645a1241501f9b406f688defa811578f36b49f456eb533535ecd526702156eea") + set(CUDNN_OS "windows") +elseif(VCPKG_TARGET_IS_LINUX) + set(CUDNN_DOWNLOAD_LINK "https://anaconda.org/anaconda/cudnn/${CUDNN_VERSION}/download/linux-64/cudnn-${CUDNN_FULL_VERSION}.tar.bz2") + set(SHA512_CUDNN "128ccdc0ec24a1133947d7a8eff6cd8edc224134fa5065a11a1a01a99dbaee7d799db1454e0a59e411cf6db244f8c2420c160488a5dd4830addc3578b2011e3d") + set(CUDNN_OS "linux") +endif() + +vcpkg_download_distfile(ARCHIVE + URLS ${CUDNN_DOWNLOAD_LINK} + FILENAME "cudnn-${CUDNN_FULL_VERSION}-${CUDNN_OS}.tar.bz2" + SHA512 ${SHA512_CUDNN} +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL +) + +string(REPLACE "." ";" VERSION_LIST ${CUDNN_VERSION}) +list(GET VERSION_LIST 0 CUDNN_VERSION_MAJOR) +list(GET VERSION_LIST 1 CUDNN_VERSION_MINOR) +list(GET VERSION_LIST 2 CUDNN_VERSION_PATCH) + +if(VCPKG_TARGET_IS_WINDOWS) + file(INSTALL "${SOURCE_PATH}/Library/include/cudnn.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include) + file(INSTALL "${SOURCE_PATH}/Library/lib/x64/cudnn.lib" DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(INSTALL "${SOURCE_PATH}/Library/bin/cudnn64_${CUDNN_VERSION_MAJOR}.dll" DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL "${SOURCE_PATH}/Library/lib/x64/cudnn.lib" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(INSTALL "${SOURCE_PATH}/Library/bin/cudnn64_${CUDNN_VERSION_MAJOR}.dll" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +elseif(VCPKG_TARGET_IS_LINUX) + file(INSTALL "${SOURCE_PATH}/include/cudnn.h" DESTINATION ${CURRENT_PACKAGES_DIR}/include) + file(INSTALL "${SOURCE_PATH}/lib/libcudnn.so.${CUDNN_VERSION}" DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(INSTALL "${SOURCE_PATH}/lib/libcudnn.so.${CUDNN_VERSION_MAJOR}" DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(INSTALL "${SOURCE_PATH}/lib/libcudnn.so" DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(INSTALL "${SOURCE_PATH}/lib/libcudnn.so.${CUDNN_VERSION}" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(INSTALL "${SOURCE_PATH}/lib/libcudnn.so.${CUDNN_VERSION_MAJOR}" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(INSTALL "${SOURCE_PATH}/lib/libcudnn.so" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +endif() + +file(INSTALL "${SOURCE_PATH}/info/LICENSE.txt" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/FindCUDNN.cmake" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/cudnn/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/cudnn/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..5a69ede --- /dev/null +++ b/vcpkg/ports/cudnn/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,6 @@ +set(CUDNN_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${CUDNN_PREV_MODULE_PATH}) diff --git a/vcpkg/ports/cunit/CMakeLists.txt b/vcpkg/ports/cunit/CMakeLists.txt new file mode 100644 index 0000000..b796355 --- /dev/null +++ b/vcpkg/ports/cunit/CMakeLists.txt @@ -0,0 +1,61 @@ +cmake_minimum_required (VERSION 3.8.0) +project (libcunit C) + +set(HEADERS_DIR "${PROJECT_SOURCE_DIR}/CUnit/Headers") +set(SOURCES_DIR "${PROJECT_SOURCE_DIR}/CUnit/Sources") +set(EXAMPLES_DIR "${PROJECT_SOURCE_DIR}/Examples") + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 -D_CRT_SECURE_NO_WARNINGS) +endif() + +configure_file( + "${HEADERS_DIR}/CUnit.h.in" + "${PROJECT_BINARY_DIR}/CUnit.h" +) + +file(READ "${PROJECT_BINARY_DIR}/CUnit.h" CUNIT_H) +if (BUILD_SHARED_LIBS) + string(REPLACE "ifdef CU_DLL" "if 1" CUNIT_H "${CUNIT_H}") +else() + string(REPLACE "ifdef CU_DLL" "if 0" CUNIT_H "${CUNIT_H}") +endif() +file(WRITE "${PROJECT_BINARY_DIR}/CUnit.h" "${CUNIT_H}") + +include_directories("${PROJECT_BINARY_DIR}") +include_directories(${HEADERS_DIR}) + +add_library(libcunit + "${SOURCES_DIR}/Automated/Automated.c" + "${SOURCES_DIR}/Basic/Basic.c" + "${SOURCES_DIR}/Console/Console.c" + "${SOURCES_DIR}/Framework/CUError.c" + "${SOURCES_DIR}/Framework/MyMem.c" + "${SOURCES_DIR}/Framework/TestDB.c" + "${SOURCES_DIR}/Framework/TestRun.c" + "${SOURCES_DIR}/Framework/Util.c" +) +target_compile_definitions(libcunit PRIVATE -DCU_BUILD_DLL) + +if(BUILD_EXAMPLES) + include_directories(${EXAMPLES_DIR}) + add_executable(AutomatedTest ${EXAMPLES_DIR}/AutomatedTest/AutomatedTest.c "${EXAMPLES_DIR}/ExampleTests.c") + add_executable(BasicTest ${EXAMPLES_DIR}/BasicTest/BasicTest.c "${EXAMPLES_DIR}/ExampleTests.c") + add_executable(ConsoleTest ${EXAMPLES_DIR}/ConsoleTest/ConsoleTest.c "${EXAMPLES_DIR}/ExampleTests.c") + + target_link_libraries(AutomatedTest libcunit) + target_link_libraries(BasicTest libcunit) + target_link_libraries(ConsoleTest libcunit) +endif() + +install( + TARGETS libcunit + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY "${HEADERS_DIR}/" DESTINATION include/cunit FILES_MATCHING PATTERN "*.h") + install(FILES "${PROJECT_BINARY_DIR}/CUnit.h" DESTINATION include/cunit) +endif() diff --git a/vcpkg/ports/cunit/CONTROL b/vcpkg/ports/cunit/CONTROL new file mode 100644 index 0000000..c572587 --- /dev/null +++ b/vcpkg/ports/cunit/CONTROL @@ -0,0 +1,4 @@ +Source: cunit +Version: 2.1.3-6 +Homepage: https://sourceforge.net/projects/cunit/ +Description: CUnit is a lightweight system for writing, administering, and running unit tests in C. It provides C programmers a basic testing functionality with a flexible variety of user interfaces diff --git a/vcpkg/ports/cunit/portfile.cmake b/vcpkg/ports/cunit/portfile.cmake new file mode 100644 index 0000000..88b9be6 --- /dev/null +++ b/vcpkg/ports/cunit/portfile.cmake @@ -0,0 +1,21 @@ +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO cunit/CUnit + REF 2.1-3 + FILENAME "CUnit-2.1-3.tar.bz2" + SHA512 547b417109332446dfab8fda17bf4ccd2da841dc93f824dc90a20635bcf1fb80fb2176500d8a0906940f3f3d3e2f77b2d70a71090c9ab84ad9af43f3582bc487 +) + +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() + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/curl/0002_fix_uwp.patch b/vcpkg/ports/curl/0002_fix_uwp.patch new file mode 100644 index 0000000..5aa451b --- /dev/null +++ b/vcpkg/ports/curl/0002_fix_uwp.patch @@ -0,0 +1,28 @@ +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index 62b7b33..8a4bd71 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -107,6 +107,10 @@ endif() + + target_link_libraries(${LIB_NAME} ${CURL_LIBS}) + ++if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") ++ add_definitions(-D_WINSOCK_DEPRECATED_NO_WARNINGS) ++endif() ++ + if(WIN32) + add_definitions(-D_USRDLL) + endif() +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9e47967..7694f04 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -505,7 +505,7 @@ if(USE_QUICHE) + cmake_pop_check_state() + endif() + +-if(WIN32) ++if(WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(USE_WIN32_CRYPTO ON) + endif() + diff --git a/vcpkg/ports/curl/0004_nghttp2_staticlib.patch b/vcpkg/ports/curl/0004_nghttp2_staticlib.patch new file mode 100644 index 0000000..4bd6e4a --- /dev/null +++ b/vcpkg/ports/curl/0004_nghttp2_staticlib.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5a13333..2dd274c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -431,6 +431,9 @@ if(USE_NGHTTP2) + find_package(NGHTTP2 REQUIRED) + include_directories(${NGHTTP2_INCLUDE_DIRS}) + list(APPEND CURL_LIBS ${NGHTTP2_LIBRARIES}) ++ if(NOT BUILD_SHARED_LIBS) ++ add_definitions(-DNGHTTP2_STATICLIB) ++ endif() + endif() + + function(CheckQuicSupportInOpenSSL) diff --git a/vcpkg/ports/curl/0005_remove_imp_suffix.patch b/vcpkg/ports/curl/0005_remove_imp_suffix.patch new file mode 100644 index 0000000..c83a196 --- /dev/null +++ b/vcpkg/ports/curl/0005_remove_imp_suffix.patch @@ -0,0 +1,13 @@ +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index 1d71e14..62b7b33 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -128,7 +128,7 @@ if(CURL_HAS_LTO) + INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO TRUE) + endif() + +-if(WIN32) ++if(WIN32 AND 0) + if(BUILD_SHARED_LIBS) + # Add "_imp" as a suffix before the extension to avoid conflicting with the statically linked "libcurl.lib" + set_target_properties(${LIB_NAME} PROPERTIES IMPORT_SUFFIX "_imp.lib") diff --git a/vcpkg/ports/curl/0006_fix_tool_depends.patch b/vcpkg/ports/curl/0006_fix_tool_depends.patch new file mode 100644 index 0000000..a918b08 --- /dev/null +++ b/vcpkg/ports/curl/0006_fix_tool_depends.patch @@ -0,0 +1,22 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 26e3cfe..74d00dd 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -61,6 +61,8 @@ if(MSVC) + list(APPEND CURL_FILES curl.rc) + endif() + ++find_package(ZLIB REQUIRED) ++ + # CURL_FILES comes from Makefile.inc + add_executable( + ${EXE_NAME} +@@ -91,7 +93,7 @@ include_directories( + ) + + #Build curl executable +-target_link_libraries(${EXE_NAME} libcurl ${CURL_LIBS}) ++target_link_libraries(${EXE_NAME} libcurl ${CURL_LIBS} ZLIB::ZLIB) + + ################################################################################ + diff --git a/vcpkg/ports/curl/0007_disable_tool_export_curl_target.patch b/vcpkg/ports/curl/0007_disable_tool_export_curl_target.patch new file mode 100644 index 0000000..689104a --- /dev/null +++ b/vcpkg/ports/curl/0007_disable_tool_export_curl_target.patch @@ -0,0 +1,18 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 74d00dd..5838805 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -103,8 +103,8 @@ target_link_libraries(${EXE_NAME} libcurl ${CURL_LIBS} ZLIB::ZLIB) + + #INCLUDE(ModuleInstall OPTIONAL) + +-install(TARGETS ${EXE_NAME} EXPORT ${TARGETS_EXPORT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR}) +-export(TARGETS ${EXE_NAME} +- APPEND FILE ${PROJECT_BINARY_DIR}/curl-target.cmake +- NAMESPACE ${PROJECT_NAME}:: +-) ++install(TARGETS ${EXE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR}) ++#export(TARGETS ${EXE_NAME} ++# APPEND FILE ${PROJECT_BINARY_DIR}/curl-target.cmake ++# NAMESPACE ${PROJECT_NAME}:: ++#) diff --git a/vcpkg/ports/curl/0009_fix_openssl_config.patch b/vcpkg/ports/curl/0009_fix_openssl_config.patch new file mode 100644 index 0000000..d7fc216 --- /dev/null +++ b/vcpkg/ports/curl/0009_fix_openssl_config.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5a13333..5a7ece0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -361,6 +361,7 @@ if(CMAKE_USE_SECTRANSP) + list(APPEND CURL_LIBS "${COREFOUNDATION_FRAMEWORK}" "${SECURITY_FRAMEWORK}") + endif() + ++set(USE_OPENSSL OFF) + if(CMAKE_USE_OPENSSL) + find_package(OpenSSL REQUIRED) + set(SSL_ENABLED ON) diff --git a/vcpkg/ports/curl/0010_fix_othertests_cmake.patch b/vcpkg/ports/curl/0010_fix_othertests_cmake.patch new file mode 100644 index 0000000..e54d333 --- /dev/null +++ b/vcpkg/ports/curl/0010_fix_othertests_cmake.patch @@ -0,0 +1,12 @@ +diff --git a/CMake/OtherTests.cmake b/CMake/OtherTests.cmake +index 7cec6da..c836fc9 100644 +--- a/CMake/OtherTests.cmake ++++ b/CMake/OtherTests.cmake +@@ -212,6 +212,7 @@ if(HAVE_SIGNAL_H) + set(CMAKE_REQUIRED_FLAGS "-DHAVE_SIGNAL_H") + set(CMAKE_EXTRA_INCLUDE_FILES "signal.h") + endif() ++unset(CMAKE_TRY_COMPILE_TARGET_TYPE) + check_type_size("sig_atomic_t" SIZEOF_SIG_ATOMIC_T) + if(HAVE_SIZEOF_SIG_ATOMIC_T) + check_c_source_compiles(" diff --git a/vcpkg/ports/curl/0011_fix_static_build.patch b/vcpkg/ports/curl/0011_fix_static_build.patch new file mode 100644 index 0000000..a50fa28 --- /dev/null +++ b/vcpkg/ports/curl/0011_fix_static_build.patch @@ -0,0 +1,13 @@ +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index 8a4bd71..1927fb0 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -111,7 +111,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + add_definitions(-D_WINSOCK_DEPRECATED_NO_WARNINGS) + endif() + +-if(WIN32) ++if(WIN32 AND BUILD_SHARED_LIBS) + add_definitions(-D_USRDLL) + endif() + diff --git a/vcpkg/ports/curl/CONTROL b/vcpkg/ports/curl/CONTROL new file mode 100644 index 0000000..1207ea9 --- /dev/null +++ b/vcpkg/ports/curl/CONTROL @@ -0,0 +1,53 @@ +Source: curl +Version: 7.72.0 +Build-Depends: zlib +Homepage: https://github.com/curl/curl +Description: A library for transferring data with URLs +Default-Features: ssl, non-http + +Feature: tool +Description: Builds curl executable + +Feature: non-http +Description: Enables protocols beyond HTTP/HTTPS/HTTP2 + +Feature: http2 +Build-Depends: nghttp2, curl[core,ssl] +Description: HTTP2 support + +Feature: ssl +Build-Depends: curl[core,openssl] ((uwp|!windows)&!osx), curl[core,winssl] (windows&!uwp), curl[core,sectransp] (osx) +Description: Default SSL backend + +Feature: ssh +Build-Depends: curl[core,openssl], libssh2, curl[core,non-http] +Description: SSH support via libssh2 + +Feature: openssl +Build-Depends: openssl +Description: SSL support (OpenSSL) + +Feature: schannel +Description: SSL support (Secure Channel) +Build-Depends: curl[core,sspi] + +Feature: winssl +Description: Legacy name for schannel +Build-Depends: curl[schannel] + +Feature: mbedtls +Build-Depends: mbedtls +Description: SSL support (mbedTLS) + +Feature: sectransp +Description: SSL support (sectransp) + +Feature: c-ares +Build-Depends: c-ares +Description: c-ares support + +Feature: sspi +Description: SSPI support + +Feature: brotli +Description: brotli support (brotli) \ No newline at end of file diff --git a/vcpkg/ports/curl/portfile.cmake b/vcpkg/ports/curl/portfile.cmake new file mode 100644 index 0000000..2375d5a --- /dev/null +++ b/vcpkg/ports/curl/portfile.cmake @@ -0,0 +1,113 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO curl/curl + REF 9d954e49bce3706a9a2efb119ecd05767f0f2a9e #curl-7_72_0 + SHA512 c6af3d772571d4c12ac797c0f5a29db4081ebb964693f2c1d93527f103afb29744f4ed2dde6832f63b28afc402166be2f1336dc868a46eb9a6a296c95d61ab71 + HEAD_REF master + PATCHES + 0002_fix_uwp.patch + 0004_nghttp2_staticlib.patch + 0005_remove_imp_suffix.patch + 0006_fix_tool_depends.patch + 0007_disable_tool_export_curl_target.patch + 0009_fix_openssl_config.patch + 0010_fix_othertests_cmake.patch + 0011_fix_static_build.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CURL_STATICLIB) + +# schannel will enable sspi, but sspi do not support uwp +if(("schannel" IN_LIST FEATURES OR "sspi" IN_LIST FEATURES OR "tool" IN_LIST FEATURES) AND (NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP)) + message(FATAL_ERROR "schannel,sspi,tool are not supported on non-Windows and uwp platforms") +endif() + +if("sectransp" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_OSX) + message(FATAL_ERROR "sectransp is not supported on non-Apple platforms") +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + # Support HTTP2 TLS Download https://curl.haxx.se/ca/cacert.pem rename to curl-ca-bundle.crt, copy it to libcurl.dll location. + http2 USE_NGHTTP2 + openssl CMAKE_USE_OPENSSL + mbedtls CMAKE_USE_MBEDTLS + ssh CMAKE_USE_LIBSSH2 + tool BUILD_CURL_EXE + c-ares ENABLE_ARES + sspi CURL_WINDOWS_SSPI + brotli CURL_BROTLI + schannel CMAKE_USE_SCHANNEL + sectransp CMAKE_USE_SECTRANSP + + INVERTED_FEATURES + non-http HTTP_ONLY +) + +set(SECTRANSP_OPTIONS) +if("sectransp" IN_LIST FEATURES) + set(SECTRANSP_OPTIONS -DCURL_CA_PATH=none) +endif() + +# UWP targets +set(UWP_OPTIONS) +if(VCPKG_TARGET_IS_UWP) + set(UWP_OPTIONS + -DUSE_WIN32_LDAP=OFF + -DCURL_DISABLE_TELNET=ON + -DENABLE_IPV6=OFF + -DENABLE_UNIX_SOCKETS=OFF + ) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + ${UWP_OPTIONS} + ${SECTRANSP_OPTIONS} + -DBUILD_TESTING=OFF + -DENABLE_MANUAL=OFF + -DCURL_STATICLIB=${CURL_STATICLIB} + -DCMAKE_DISABLE_FIND_PACKAGE_Perl=ON + -DENABLE_DEBUG=ON + -DCURL_CA_FALLBACK=ON +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +if ("tool" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES curl AUTO_CLEAN) +endif() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/CURL) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +else() + file(INSTALL ${CURRENT_PACKAGES_DIR}/bin/curl-config DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/curl-config ${CURRENT_PACKAGES_DIR}/debug/bin/curl-config) + #Fix install path + file(READ ${CURRENT_PACKAGES_DIR}/share/${PORT}/curl-config CURL_CONFIG) + string(REPLACE "${CURRENT_PACKAGES_DIR}" "${CURRENT_INSTALLED_DIR}" CURL_CONFIG "${CURL_CONFIG}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/curl-config "${CURL_CONFIG}") +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/curl/curl.h + "#ifdef CURL_STATICLIB" + "#if 1" + ) +else() + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/curl/curl.h + "#ifdef CURL_STATICLIB" + "#if 0" + ) +endif() + +file(INSTALL ${CURRENT_PORT_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/curl/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/curl/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..c7fbdba --- /dev/null +++ b/vcpkg/ports/curl/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,42 @@ +list(REMOVE_ITEM ARGS "NO_MODULE") +list(REMOVE_ITEM ARGS "CONFIG") +list(REMOVE_ITEM ARGS "MODULE") + +_find_package(${ARGS} CONFIG) + +if(TARGET CURL::libcurl) + set(CURL_FOUND TRUE) + + get_target_property(_curl_include_dirs CURL::libcurl INTERFACE_INCLUDE_DIRECTORIES) + get_target_property(_curl_link_libraries CURL::libcurl INTERFACE_LINK_LIBRARIES) + + if (CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + get_target_property(_curl_location_debug CURL::libcurl IMPORTED_IMPLIB_DEBUG) + get_target_property(_curl_location_release CURL::libcurl IMPORTED_IMPLIB_RELEASE) + endif() + + if(NOT _curl_location_debug AND NOT _curl_location_release) + get_target_property(_curl_location_debug CURL::libcurl IMPORTED_LOCATION_DEBUG) + get_target_property(_curl_location_release CURL::libcurl IMPORTED_LOCATION_RELEASE) + endif() + + if(NOT _curl_link_libraries) + set(_curl_link_libraries) + endif() + + set(CURL_INCLUDE_DIRS "${_curl_include_dirs}") + set(CURL_LIBRARY_DEBUG "${_curl_location_debug}") + set(CURL_LIBRARY_RELEASE "${_curl_location_release}") + + #For builds which rely on CURL_LIBRAR(Y/IES) + include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) + select_library_configurations(CURL) + + set(CURL_LIBRARIES ${CURL_LIBRARY} ${_curl_link_libraries}) + set(CURL_VERSION_STRING "${CURL_VERSION}") + + set(_curl_include_dirs) + set(_curl_link_libraries) + set(_curl_location_debug) + set(_curl_location_release) +endif() diff --git a/vcpkg/ports/curlpp/CONTROL b/vcpkg/ports/curlpp/CONTROL new file mode 100644 index 0000000..cac6a60 --- /dev/null +++ b/vcpkg/ports/curlpp/CONTROL @@ -0,0 +1,4 @@ +Source: curlpp +Version: 2018-06-15-3 +Description: C++ wrapper around libcURL +Build-Depends: curl diff --git a/vcpkg/ports/curlpp/fix-cmake.patch b/vcpkg/ports/curlpp/fix-cmake.patch new file mode 100644 index 0000000..a7cd794 --- /dev/null +++ b/vcpkg/ports/curlpp/fix-cmake.patch @@ -0,0 +1,52 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8b183a0..a801ae8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -85,11 +85,12 @@ endif() + + file(GLOB_RECURSE HeaderFileList "${CMAKE_CURRENT_SOURCE_DIR}/include/*") + file(GLOB_RECURSE SourceFileList "${CMAKE_CURRENT_SOURCE_DIR}/src/*") ++if(BUILD_SHARED_LIBS) + add_library(${PROJECT_NAME} SHARED ${HeaderFileList} ${SourceFileList}) + target_link_libraries(${PROJECT_NAME} ${CURL_LIBRARIES} ${CONAN_LIBS}) + set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION 1 VERSION 1.0.0) +- +-add_library(${PROJECT_NAME}_static STATIC ${HeaderFileList} ${SourceFileList}) ++else() ++add_library(${PROJECT_NAME} STATIC ${HeaderFileList} ${SourceFileList}) + + # Make sure that on unix-platforms shared and static libraries have + # the same root name, but different suffixes. +@@ -97,19 +98,28 @@ add_library(${PROJECT_NAME}_static STATIC ${HeaderFileList} ${SourceFileList}) + # (solution taken from https://cmake.org/Wiki/CMake_FAQ#How_do_I_make_my_shared_and_static_libraries_have_the_same_root_name.2C_but_different_suffixes.3F) + # + # Making shared and static libraries have the same root name, but different suffixes +-SET_TARGET_PROPERTIES(${PROJECT_NAME}_static PROPERTIES OUTPUT_NAME ${PROJECT_NAME}) ++SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES OUTPUT_NAME ${PROJECT_NAME}) + # Now the library target "curlpp_static" will be named "curlpp.lib" with MS tools. + # This conflicts with the "curlpp.lib" import library corresponding to "curlpp.dll", + # so we add a "lib" prefix (which is default on other platforms anyway): +-SET_TARGET_PROPERTIES(${PROJECT_NAME}_static PROPERTIES PREFIX "lib") +-target_link_libraries(${PROJECT_NAME}_static ${CURL_LIBRARIES} ${CONAN_LIBS}) ++SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES PREFIX "lib") ++target_link_libraries(${PROJECT_NAME} CURL::libcurl) ++endif() ++ ++target_include_directories(${PROJECT_NAME} PUBLIC $) + + # install headers + install(DIRECTORY include/utilspp/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/utilspp") + install(DIRECTORY include/curlpp/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/curlpp") + +-install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_static ++install(TARGETS ${PROJECT_NAME} ++ EXPORT ${PROJECT_NAME}-config + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ++install(EXPORT ${PROJECT_NAME}-config ++ FILE unofficial-${PROJECT_NAME}-config.cmake ++ NAMESPACE unofficial::${PROJECT_NAME}:: ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ++) diff --git a/vcpkg/ports/curlpp/fix-findzliberror.patch b/vcpkg/ports/curlpp/fix-findzliberror.patch new file mode 100644 index 0000000..4876d0f --- /dev/null +++ b/vcpkg/ports/curlpp/fix-findzliberror.patch @@ -0,0 +1,9 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c42943c..12d402c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,3 +1,4 @@ ++cmake_minimum_required(VERSION 2.8) + project(curlpp) + + diff --git a/vcpkg/ports/curlpp/portfile.cmake b/vcpkg/ports/curlpp/portfile.cmake new file mode 100644 index 0000000..c80c3c1 --- /dev/null +++ b/vcpkg/ports/curlpp/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jpbarrette/curlpp + REF 8810334c830faa3b38bcd94f5b1ab695a4f05eb9 + SHA512 47eb0738d7cd2d4262c455f9472a21535343bcf08bda6de19771dab9204e068272b41782c87057d50e3781683a29e79d6387577be68d175a7fa890367f15d0d2 + HEAD_REF master + PATCHES + fix-cmake.patch + fix-findzliberror.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT} TARGET_PATH share/unofficial-${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/bin + ) +endif() + +vcpkg_copy_pdbs() +vcpkg_test_cmake(PACKAGE_NAME unofficial-${PORT}) + +file(INSTALL ${SOURCE_PATH}/doc/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/unofficial-${PORT}) + diff --git a/vcpkg/ports/curlpp/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/curlpp/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..a7f88cd --- /dev/null +++ b/vcpkg/ports/curlpp/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,5 @@ +set(FIND_CURLPP_ARGS ${ARGS}) +include(CMakeFindDependencyMacro) +find_dependency(CURL) + +_find_package(${FIND_CURLPP_ARGS}) diff --git a/vcpkg/ports/cute-headers/CONTROL b/vcpkg/ports/cute-headers/CONTROL new file mode 100644 index 0000000..f3b98ff --- /dev/null +++ b/vcpkg/ports/cute-headers/CONTROL @@ -0,0 +1,4 @@ +Source: cute-headers +Version: 2019-09-20 +Description: Collection of cross-platform one-file C/C++ libraries with no dependencies +Homepage: https://github.com/RandyGaul/cute_headers diff --git a/vcpkg/ports/cute-headers/portfile.cmake b/vcpkg/ports/cute-headers/portfile.cmake new file mode 100644 index 0000000..703496d --- /dev/null +++ b/vcpkg/ports/cute-headers/portfile.cmake @@ -0,0 +1,32 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO RandyGaul/cute_headers + REF 4f765abf4a59660e72f9f49c444371ba373e834b + SHA512 e898520dc668ce9d1f51c748da1c674f9fa0540bac7a0d10a45fde5ebb0ca6573dc5178ce41199a138e3153343b1ff0c589bc7908a8edcd4a7753d5a1440030b + HEAD_REF master +) + +file(GLOB CUTE_HEADERS_FILES ${SOURCE_PATH}/*.h) +file(COPY ${CUTE_HEADERS_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +file(STRINGS "${SOURCE_PATH}/cute_math2d.h" SOURCE_LINES) +list(REVERSE SOURCE_LINES) + +set(line_no 0) +foreach(line ${SOURCE_LINES}) + math(EXPR line_no "${line_no} + 1") + if(line STREQUAL "/*") + break() + endif() +endforeach() + +list(SUBLIST SOURCE_LINES 0 ${line_no} SOURCE_LINES) +list(REVERSE SOURCE_LINES) +list(JOIN SOURCE_LINES "\n" _contents) + +file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "${_contents}") diff --git a/vcpkg/ports/cutelyst2/CONTROL b/vcpkg/ports/cutelyst2/CONTROL new file mode 100644 index 0000000..16f848e --- /dev/null +++ b/vcpkg/ports/cutelyst2/CONTROL @@ -0,0 +1,4 @@ +Source: cutelyst2 +Version: 2.9.0-1 +Description: A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework +Build-Depends: qt5-base[core] diff --git a/vcpkg/ports/cutelyst2/fix-static-build.patch b/vcpkg/ports/cutelyst2/fix-static-build.patch new file mode 100644 index 0000000..e40cd1d --- /dev/null +++ b/vcpkg/ports/cutelyst2/fix-static-build.patch @@ -0,0 +1,38 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9a695fd..0667668 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -129,6 +129,33 @@ add_definitions( + -DQT_DISABLE_DEPRECATED_BEFORE=0x050c00 + ) + ++if (BUILD_WIN_STATIC) ++ add_definitions( ++ -DCutelyst2Qt5_EXPORTS ++ -DActionRenderView_EXPORTS ++ -DActionREST_EXPORTS ++ -DActionRoleACL_EXPORTS ++ -DCutelyst2Qt5Authentication_EXPORTS ++ -DCutelyst2Qt5Session_EXPORTS ++ -DCutelyst2Qt5StaticSimple_EXPORTS ++ -DCutelyst2Qt5StaticCompressed_EXPORTS ++ -DCutelyst2Qt5UtilsPagination_EXPORTS ++ -DCutelyst2Qt5StatusMessage_EXPORTS ++ -DCutelyst2Qt5Memcached_EXPORTS ++ -DCutelyst2Qt5MemcachedSessionStore_EXPORTS ++ -DCutelyst2Qt5CSRFProtection_EXPORTS ++ -DCutelyst2Qt5UtilsSql_EXPORTS ++ -DCutelyst2Qt5UtilsValidator_EXPORTS ++ -DCutelyst2Qt5UtilsLangSelect_EXPORTS ++ -DCutelyst2Qt5ViewClearSilver_EXPORTS ++ -DCutelyst2Qt5ViewEmail_EXPORTS ++ -DCutelyst2Qt5ViewGrantlee_EXPORTS ++ -DCutelyst2Qt5ViewJson_EXPORTS ++ -DCutelyst2Qt5Wsgi_EXPORTS ++ -DCutelyst2Qt5UserAgent_EXPORTS ++ ) ++endif() ++ + set(CMAKE_CXX_STANDARD 11) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) diff --git a/vcpkg/ports/cutelyst2/portfile.cmake b/vcpkg/ports/cutelyst2/portfile.cmake new file mode 100644 index 0000000..39cfa3b --- /dev/null +++ b/vcpkg/ports/cutelyst2/portfile.cmake @@ -0,0 +1,51 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cutelyst/cutelyst + REF e25026edf836621a1d82745ce625509d307f5dc1 # v2.9.0 + SHA512 39afa6bb73217341e741a7dcf40b0d73ccabd018ba68df248e7092d80077c23be8bf31c244590a7fe8a37209c09395423eb945d21a1a11109ee7da60644802b3 + HEAD_REF master + PATCHES fix-static-build.patch +) + +set(BUILD_WIN_STATIC OFF) +if (VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILD_WIN_STATIC ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTS:BOOL=OFF + -DBUILD_WIN_STATIC=${BUILD_WIN_STATIC} +) + +vcpkg_install_cmake() + +# Move CMake config files to the right place +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Cutelyst2Qt5 TARGET_PATH share/cutelyst2qt5) + +file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/cutelyst2 ${CURRENT_PACKAGES_DIR}/bin/cutelyst2-wsgi ${CURRENT_PACKAGES_DIR}/bin/cutelyst2.exe ${CURRENT_PACKAGES_DIR}/bin/cutelyst-wsgi2.exe) +file(GLOB DEBUG_EXES ${CURRENT_PACKAGES_DIR}/debug/bin/cutelyst2 ${CURRENT_PACKAGES_DIR}/debug/bin/cutelyst2-wsgi ${CURRENT_PACKAGES_DIR}/debug/bin/cutelyst2.exe ${CURRENT_PACKAGES_DIR}/debug/bin/cutelyst-wsgi2.exe) +if(EXES OR DEBUG_EXES) + file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/cutelyst2) + file(REMOVE ${EXES} ${DEBUG_EXES}) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/cutelyst2) +endif() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cutelyst2-plugins/ActionREST.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cutelyst2-plugins ${CURRENT_PACKAGES_DIR}/bin/cutelyst2-plugins) +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/cutelyst2-plugins/ActionREST.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cutelyst2-plugins ${CURRENT_PACKAGES_DIR}/debug/bin/cutelyst2-plugins) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/cutelyst2/copyright COPYONLY) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/cxxopts/CONTROL b/vcpkg/ports/cxxopts/CONTROL new file mode 100644 index 0000000..53da6cd --- /dev/null +++ b/vcpkg/ports/cxxopts/CONTROL @@ -0,0 +1,4 @@ +Source: cxxopts +Version: 2.2.0 +Homepage: https://github.com/jarro2783/cxxopts +Description: This is a lightweight C++ option parser library, supporting the standard GNU style syntax for options diff --git a/vcpkg/ports/cxxopts/fix-uwp-error.patch b/vcpkg/ports/cxxopts/fix-uwp-error.patch new file mode 100644 index 0000000..da1d455 --- /dev/null +++ b/vcpkg/ports/cxxopts/fix-uwp-error.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 440490b..0ceb003 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -54,6 +54,8 @@ endif() + + add_library(cxxopts INTERFACE) + ++add_definitions(-D_CRT_SECURE_NO_WARNINGS) ++ + # optionally, enable unicode support using the ICU library + set(CXXOPTS_USE_UNICODE_HELP FALSE CACHE BOOL "Use ICU Unicode library") + if(CXXOPTS_USE_UNICODE_HELP) diff --git a/vcpkg/ports/cxxopts/portfile.cmake b/vcpkg/ports/cxxopts/portfile.cmake new file mode 100644 index 0000000..782b2f2 --- /dev/null +++ b/vcpkg/ports/cxxopts/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jarro2783/cxxopts + REF v2.2.0 + SHA512 9f5182b3a86b3d47d1ce5e1e222ab596fce59d3b2dcc0ab2c3802338d5e0f3e6556f2a5ff2accb32cae7e2db41ac5a361c93bf0256f9e44c316eaa4b47c19efa + HEAD_REF master + PATCHES + fix-uwp-error.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCXXOPTS_BUILD_EXAMPLES=OFF + -DCXXOPTS_BUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/cxxopts) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/cxxopts RENAME copyright) diff --git a/vcpkg/ports/czmq/CONTROL b/vcpkg/ports/czmq/CONTROL new file mode 100644 index 0000000..2d190c3 --- /dev/null +++ b/vcpkg/ports/czmq/CONTROL @@ -0,0 +1,27 @@ +Source: czmq +Version: 2019-06-10-4 +Build-Depends: zeromq +Description: High-level C binding for ZeroMQ +Homepage: https://github.com/zeromq/czmq + +Feature: tool +Description: Build and install czmq tools (zmakecert) + +Feature: draft +Description: Build and install draft APIs + +Feature: curl +Description: Build with libcurl +Build-Depends: curl + +Feature: lz4 +Description: Build with lz4 +Build-Depends: lz4 + +Feature: httpd +Description: Build with HTTP server support (libmicrohttpd) +Build-Depends: libmicrohttpd + +Feature: uuid +Description: Build with libuuid +Build-Depends: libuuid (!windows&!uwp&!osx) diff --git a/vcpkg/ports/czmq/Findlibcurl.cmake b/vcpkg/ports/czmq/Findlibcurl.cmake new file mode 100644 index 0000000..6c943e2 --- /dev/null +++ b/vcpkg/ports/czmq/Findlibcurl.cmake @@ -0,0 +1,51 @@ +find_path( + LIBCURL_INCLUDE_DIRS + NAMES curl/curl.h +) + +find_library( + LIBCURL_LIBRARY_DEBUG + NAMES libcurl-d_imp libcurl-d curl-d curl +) + +find_library( + LIBCURL_LIBRARY_RELEASE + NAMES libcurl_imp libcurl curl +) + +include(SelectLibraryConfigurations) +select_library_configurations(LIBCURL) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + LIBCURL + REQUIRED_VARS LIBCURL_LIBRARIES LIBCURL_INCLUDE_DIRS +) + +# CURL dependencies +# https://github.com/Microsoft/vcpkg/issues/4312 +# https://github.com/microsoft/vcpkg/commit/ee325d14276e7bd7961e94e58293b02d6e9e92da +# https://github.com/microsoft/vcpkg/pull/6698 +if (LIBCURL_FOUND) + find_package(OpenSSL QUIET) + find_package(ZLIB QUIET) + + if (OPENSSL_FOUND) + list(APPEND LIBCURL_LIBRARIES + OpenSSL::SSL + OpenSSL::Crypto + ) + endif () + + if (ZLIB_FOUND) + list(APPEND LIBCURL_LIBRARIES + ZLIB::ZLIB + ) + endif () + + if (WIN32) + list(APPEND LIBCURL_LIBRARIES + Crypt32 + ) + endif () +endif () diff --git a/vcpkg/ports/czmq/Findlibmicrohttpd.cmake b/vcpkg/ports/czmq/Findlibmicrohttpd.cmake new file mode 100644 index 0000000..476cb2a --- /dev/null +++ b/vcpkg/ports/czmq/Findlibmicrohttpd.cmake @@ -0,0 +1,28 @@ +find_path(LIBMICROHTTPD_INCLUDE_DIRS NAMES microhttpd.h) + +get_filename_component(_prefix_path ${LIBMICROHTTPD_INCLUDE_DIRS} PATH) + +find_library( + LIBMICROHTTPD_LIBRARY_DEBUG + NAMES libmicrohttpd microhttpd + PATHS ${_prefix_path}/debug/lib + NO_DEFAULT_PATH +) + +find_library( + LIBMICROHTTPD_LIBRARY_RELEASE + NAMES libmicrohttpd microhttpd + PATHS ${_prefix_path}/lib + NO_DEFAULT_PATH +) + +unset(_prefix_path) + +include(SelectLibraryConfigurations) +select_library_configurations(LIBMICROHTTPD) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + LIBMICROHTTPD + REQUIRED_VARS LIBMICROHTTPD_LIBRARIES LIBMICROHTTPD_INCLUDE_DIRS +) diff --git a/vcpkg/ports/czmq/Findlibzmq.cmake b/vcpkg/ports/czmq/Findlibzmq.cmake new file mode 100644 index 0000000..706f063 --- /dev/null +++ b/vcpkg/ports/czmq/Findlibzmq.cmake @@ -0,0 +1,10 @@ +find_package(ZeroMQ CONFIG REQUIRED) + +set(LIBZMQ_INCLUDE_DIRS ${ZeroMQ_INCLUDE_DIR}) +set(LIBZMQ_LIBRARIES libzmq libzmq-static) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + LIBZMQ + REQUIRED_VARS LIBZMQ_LIBRARIES LIBZMQ_INCLUDE_DIRS +) diff --git a/vcpkg/ports/czmq/Findlz4.cmake b/vcpkg/ports/czmq/Findlz4.cmake new file mode 100644 index 0000000..8ce17c5 --- /dev/null +++ b/vcpkg/ports/czmq/Findlz4.cmake @@ -0,0 +1,13 @@ +find_path(LZ4_INCLUDE_DIRS NAMES lz4.h) + +find_library(LZ4_LIBRARY_DEBUG NAMES lz4d) +find_library(LZ4_LIBRARY_RELEASE NAMES lz4) + +include(SelectLibraryConfigurations) +select_library_configurations(LZ4) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + LZ4 + REQUIRED_VARS LZ4_LIBRARIES LZ4_INCLUDE_DIRS +) diff --git a/vcpkg/ports/czmq/Finduuid.cmake b/vcpkg/ports/czmq/Finduuid.cmake new file mode 100644 index 0000000..ba89aab --- /dev/null +++ b/vcpkg/ports/czmq/Finduuid.cmake @@ -0,0 +1,31 @@ +find_path( + UUID_INCLUDE_DIRS + NAMES uuid/uuid.h +) + +get_filename_component(_prefix_path ${UUID_INCLUDE_DIRS} PATH) + +find_library( + UUID_LIBRARY_DEBUG + NAMES uuid + PATHS ${_prefix_path}/debug/lib + NO_DEFAULT_PATH +) + +find_library( + UUID_LIBRARY_RELEASE + NAMES uuid + PATHS ${_prefix_path}/lib + NO_DEFAULT_PATH +) + +unset(_prefix_path) + +include(SelectLibraryConfigurations) +select_library_configurations(UUID) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + UUID + REQUIRED_VARS UUID_LIBRARIES UUID_INCLUDE_DIRS +) diff --git a/vcpkg/ports/czmq/fix-dependencies.patch b/vcpkg/ports/czmq/fix-dependencies.patch new file mode 100644 index 0000000..bb57247 --- /dev/null +++ b/vcpkg/ports/czmq/fix-dependencies.patch @@ -0,0 +1,19 @@ +diff --git a/builds/cmake/Config.cmake.in b/builds/cmake/Config.cmake.in +index 9c15f36a..e1475cd6 100644 +--- a/builds/cmake/Config.cmake.in ++++ b/builds/cmake/Config.cmake.in +@@ -1,4 +1,14 @@ + @PACKAGE_INIT@ + ++include(CMakeFindDependencyMacro) ++ ++find_dependency(ZeroMQ) ++ ++if ("@CZMQ_WITH_LIBCURL@" AND "@LIBCURL_FOUND@") ++ find_dependency(OpenSSL) ++ find_dependency(ZLIB) ++endif () ++ ++ + include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") + check_required_components("@PROJECT_NAME@") diff --git a/vcpkg/ports/czmq/portfile.cmake b/vcpkg/ports/czmq/portfile.cmake new file mode 100644 index 0000000..a304493 --- /dev/null +++ b/vcpkg/ports/czmq/portfile.cmake @@ -0,0 +1,84 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zeromq/czmq + REF 7e29cf95305551daad197e32423d9cff5f9b6893 + SHA512 7d79494c904f5276c9d1e4a193a63882dc622a6db8998b9719de4aec8b223b3a8b3c92ea02be81f39afc12c1a883b310fd3662ea27ed736b0b9c7092b4843a18 + HEAD_REF master + PATCHES + fix-dependencies.patch +) + +foreach(_cmake_module + Findlibcurl.cmake + Findlibmicrohttpd.cmake + Findlibzmq.cmake + Findlz4.cmake + Finduuid.cmake +) + configure_file( + ${CMAKE_CURRENT_LIST_DIR}/${_cmake_module} + ${SOURCE_PATH}/${_cmake_module} + COPYONLY + ) +endforeach() + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + draft ENABLE_DRAFTS + curl CZMQ_WITH_LIBCURL + httpd CZMQ_WITH_LIBMICROHTTPD + lz4 CZMQ_WITH_LZ4 + uuid CZMQ_WITH_UUID +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DCZMQ_BUILD_SHARED=${BUILD_SHARED} + -DCZMQ_BUILD_STATIC=${BUILD_STATIC} + -DBUILD_TESTING=OFF + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/share/cmake/${PORT}) + vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/${PORT}) +endif() + +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} +) + +if ("tool" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES zmakecert) +endif() + +vcpkg_clean_executables_in_bin(FILE_NAMES zmakecert) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/czmq_library.h + "if defined CZMQ_STATIC" + "if 1 //if defined CZMQ_STATIC" + ) +endif() + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/vcpkg/ports/czmq/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/czmq/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..4535e88 --- /dev/null +++ b/vcpkg/ports/czmq/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,9 @@ +_find_package(${ARGS}) + +if(TARGET czmq AND NOT TARGET czmq-static) + add_library(czmq-static INTERFACE IMPORTED) + set_target_properties(czmq-static PROPERTIES INTERFACE_LINK_LIBRARIES czmq) +elseif(TARGET czmq-static AND NOT TARGET czmq) + add_library(czmq INTERFACE IMPORTED) + set_target_properties(czmq PROPERTIES INTERFACE_LINK_LIBRARIES czmq-static) +endif() diff --git a/vcpkg/ports/d3dx12/portfile.cmake b/vcpkg/ports/d3dx12/portfile.cmake new file mode 100644 index 0000000..3f25d6d --- /dev/null +++ b/vcpkg/ports/d3dx12/portfile.cmake @@ -0,0 +1,15 @@ +set(VERSION may2020) + +vcpkg_download_distfile(D3DX12_H + URLS "https://raw.githubusercontent.com/walbourn/directx-vs-templates/${VERSION}/d3d12game_win32_dr/d3dx12.h" + FILENAME "directx-vs-templates-${VERSION}-d3dx12.h" + SHA512 "829b72ddf861652bd96518b7d54f7a103c95b4434ec022e1551fb085e4dfc8f804e01ccdb4677e3f64367553c56d35291b305e10c2ea6186ddadaaa071c6d7a2" +) +vcpkg_download_distfile(LICENSE + URLS "https://raw.githubusercontent.com/walbourn/directx-vs-templates/${VERSION}/LICENSE" + FILENAME "directx-vs-templates-${VERSION}-LICENSE" + SHA512 "f1c9c9b83627d00ec98c9e54c4b708716731e4b0b27f38e95d21b01f8fe4e1f27eeade5d802f93caa83ede17610411ca082ea1ce79150c372f3abdceaaa9a4a3" +) + +file(INSTALL "${D3DX12_H}" DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME d3dx12.h) +file(INSTALL "${LICENSE}" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/d3dx12/vcpkg.json b/vcpkg/ports/d3dx12/vcpkg.json new file mode 100644 index 0000000..c4565a5 --- /dev/null +++ b/vcpkg/ports/d3dx12/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "d3dx12", + "version-string": "may2020", + "description": "The D3D12 Helper Library", + "homepage": "https://github.com/microsoft/DirectX-Graphics-Samples/tree/master/Libraries/D3DX12" +} diff --git a/vcpkg/ports/darknet/0001-rename-_castu32_f32-to-gemm_castu32_f32.patch b/vcpkg/ports/darknet/0001-rename-_castu32_f32-to-gemm_castu32_f32.patch new file mode 100644 index 0000000..3e459c2 --- /dev/null +++ b/vcpkg/ports/darknet/0001-rename-_castu32_f32-to-gemm_castu32_f32.patch @@ -0,0 +1,26 @@ +From ed14dcf873775dcfc56883f55c10619779d8f87e Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Thu, 24 Sep 2020 09:48:16 -0700 +Subject: [PATCH] rename _castu32_f32 to gemm_castu32_f32 + +since _castu32_f32 is reserved, an implementation is allowed to name a function that, +and it turns out Xcode 12 did. +--- + src/gemm.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/gemm.c b/src/gemm.c +index 0b06d98..bc2aef3 100644 +--- a/src/gemm.c ++++ b/src/gemm.c +@@ -546,6 +546,7 @@ static inline float _mm256_extract_float32(__m256 a, const int index) { + #include + #include + ++#define _castu32_f32 gemm_castu32_f32 + static inline float _castu32_f32(uint32_t a) { + return *((float *)&a); + } +-- +2.24.3 (Apple Git-128) + diff --git a/vcpkg/ports/darknet/CONTROL b/vcpkg/ports/darknet/CONTROL new file mode 100644 index 0000000..25617ab --- /dev/null +++ b/vcpkg/ports/darknet/CONTROL @@ -0,0 +1,47 @@ +Source: darknet +Version: 2020-08-30 +Port-Version: 1 +Description: Darknet is an open source neural network framework written in C and CUDA. You only look once (YOLO) is a state-of-the-art, real-time object detection system, best example of darknet functionalities. +Build-Depends: pthreads, stb + +Feature: cuda +Build-Depends: cuda +Description: Build darknet with support for CUDA + +Feature: cudnn +Build-Depends: darknet[cuda], cudnn +Description: Build darknet with support for CUDNN + +Feature: opencv-base +Build-Depends: opencv[ffmpeg] +Description: Build darknet with support for OpenCV + +Feature: opencv-cuda +Build-Depends: opencv[ffmpeg], opencv[cuda] +Description: Build darknet with support for a CUDA-enabled OpenCV + +Feature: opencv2-base +Build-Depends: opencv2[ffmpeg] +Description: Build darknet with support for OpenCV3 + +Feature: opencv2-cuda +Build-Depends: opencv2[ffmpeg], opencv2[cuda] +Description: Build darknet with support for a CUDA-enabled OpenCV3 + +Feature: opencv3-base +Build-Depends: opencv3[ffmpeg] +Description: Build darknet with support for OpenCV3 + +Feature: opencv3-cuda +Build-Depends: opencv3[ffmpeg], opencv3[cuda] +Description: Build darknet with support for a CUDA-enabled OpenCV3 + +Feature: weights +Description: Download pre-built weights for test + +Feature: weights-train +Description: Download pre-built weights for training + +Feature: full +Build-Depends: darknet[opencv-cuda], darknet[cudnn], darknet[weights], darknet[weights-train] +Description: Build darknet fully-featured diff --git a/vcpkg/ports/darknet/portfile.cmake b/vcpkg/ports/darknet/portfile.cmake new file mode 100644 index 0000000..54f204f --- /dev/null +++ b/vcpkg/ports/darknet/portfile.cmake @@ -0,0 +1,183 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO AlexeyAB/darknet + REF ecad770071eb776208a46977347e6d2410d4f50e + SHA512 1de0dc3f4842c68f5c12addf100996f7176ffb50dcd89a0b57446ba996d9199e31531f64c32eedbc2ea6a449459573811444dd35f1a50ece3880f58717c795ab + HEAD_REF master + PATCHES + 0001-rename-_castu32_f32-to-gemm_castu32_f32.patch +) + +# enable CUDA inside DARKNET +set(ENABLE_CUDA OFF) +if("cuda" IN_LIST FEATURES) + set(ENABLE_CUDA ON) +endif() + +set(ENABLE_OPENCV OFF) +# enable OPENCV (basic version) inside DARKNET +if("opencv-base" IN_LIST FEATURES) + set(ENABLE_OPENCV ON) +endif() +if("opencv2-base" IN_LIST FEATURES) + set(ENABLE_OPENCV ON) +endif() +if("opencv3-base" IN_LIST FEATURES) + set(ENABLE_OPENCV ON) +endif() + +# enable OPENCV (with its own CUDA feature enabled) inside DARKNET +# (note: this does not mean that DARKNET itself will have CUDA support since by design it is independent, to have it you must require both opencv-cuda and cuda features!) +# DARKNET will be automatically able to distinguish an OpenCV that is built with or without CUDA support. +if("opencv-cuda" IN_LIST FEATURES) + set(ENABLE_OPENCV ON) +endif() +if("opencv2-cuda" IN_LIST FEATURES) + set(ENABLE_OPENCV ON) +endif() +if("opencv3-cuda" IN_LIST FEATURES) + set(ENABLE_OPENCV ON) +endif() + +# enable CUDNN inside DARKNET (which depends on the "cuda" feature by design) +set(ENABLE_CUDNN OFF) +if("cudnn" IN_LIST FEATURES) + set(ENABLE_CUDNN ON) +endif() + +if ("cuda" IN_LIST FEATURES) + if (NOT VCPKG_CMAKE_SYSTEM_NAME AND NOT ENV{CUDACXX}) + #CMake looks for nvcc only in PATH and CUDACXX env vars for the Ninja generator. Since we filter path on vcpkg and CUDACXX env var is not set by CUDA installer on Windows, CMake cannot find CUDA when using Ninja generator, so we need to manually enlight it if necessary (https://gitlab.kitware.com/cmake/cmake/issues/19173). Otherwise we could just disable Ninja and use MSBuild, but unfortunately CUDA installer does not integrate with some distributions of MSBuild (like the ones inside Build Tools), making CUDA unavailable otherwise in those cases, which we want to avoid + set(ENV{CUDACXX} "$ENV{CUDA_PATH}/bin/nvcc.exe") + endif() +endif() + +if("weights" IN_LIST FEATURES) + vcpkg_download_distfile(YOLOV4-TINY_WEIGHTS + URLS "https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.weights" + FILENAME "darknet-cache/yolov4-tiny.weights" + SHA512 804ca2ab8e3699d31c95bf773d22f901f186703487c7945f30dc2dbb808094793362cb6f5da5cd0b4b83f820c8565a3cba22fafa069ee6ca2a925677137d95f4 + ) + vcpkg_download_distfile(YOLOV4_WEIGHTS + URLS "https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v3_optimal/yolov4.weights" + FILENAME "darknet-cache/yolov4.weights" + SHA512 77f779c58df67975b187cfead99c1e62d72c57e76c3715e35b97a1c7aba1c7b092be97ffb17907099543ac3957085a0fe9688df4a653ea62dfe8322afca53e40 + ) + vcpkg_download_distfile(YOLOV3-TINY-PRN_WEIGHTS + URLS "https://drive.google.com/u/0/uc?id=18yYZWyKbo4XSDVyztmsEcF9B_6bxrhUY&export=download" + FILENAME "darknet-cache/yolov3-tiny-prn.weights" + SHA512 0be26786103866868751bb8c5cc0b5147b3e8528d0cf5b387f5aefc72807fd7f1bf8049d5b0a47e9b4445d34e773ea8e3abc95330edb2a3ecd6103e158df2677 + ) + vcpkg_download_distfile(YOLOV3_WEIGHTS + URLS "https://pjreddie.com/media/files/yolov3.weights" + FILENAME "darknet-cache/yolov3.weights" + SHA512 293c70e404ff0250d7c04ca1e5e053fc21a78547e69b5b329d34f25981613e59b982d93fff2c352915ef7531d6c3b02a9b0b38346d05c51d6636878d8883f2c1 + ) + vcpkg_download_distfile(YOLOV3-OPENIMAGES_WEIGHTS + URLS "https://pjreddie.com/media/files/yolov3-openimages.weights" + FILENAME "darknet-cache/yolov3-openimages.weights" + SHA512 616e90057946c9588d045cff6ec36b63254660af4377201dc02642e798d62f392e8f3cdb5b10a1c4bcbe5c056e690275dca35b68db7fd802783a0c6bbd959ba8 + ) + vcpkg_download_distfile(YOLOV2_WEIGHTS + URLS "https://pjreddie.com/media/files/yolov2.weights" + FILENAME "darknet-cache/yolov2.weights" + SHA512 5271da2dd2da915172ddd034c8e894877e7066051f105ae82e25e185a2b4e4157d2b9514653c23780e87346f2b20df6363018b7e688aba422e2dacf1d2fbf6ab + ) + vcpkg_download_distfile(YOLOV3-TINY_WEIGHTS + URLS "https://pjreddie.com/media/files/yolov3-tiny.weights" + FILENAME "darknet-cache/yolov3-tiny.weights" + SHA512 981a56459515f727bb7b3d3341b95f4117499b6726eab2798e1c3e524de1ee8ed0d954c11b27bbbb926da2cc955526a194eddf69c55d65923994ab2e8af07042 + ) + vcpkg_download_distfile(YOLOV2-TINY_WEIGHTS + URLS "https://pjreddie.com/media/files/yolov2-tiny.weights" + FILENAME "darknet-cache/yolov2-tiny.weights" + SHA512 f0857a7a02cf4322354d288c9afa0b87321b23082b719bc84ea64e2f3556cc1fafeb836ee5bf9fb6dcf448839061b93623a067dfde7afa1338636865ea88989a + ) +endif() + +if("weights-train" IN_LIST FEATURES) + vcpkg_download_distfile(YOLOV4-TINY-CONV-29 + URLS "https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.conv.29" + FILENAME "darknet-cache/yolov4-tiny.conv.29" + SHA512 318e47f4bdf43b7f4eff8f3669bc9ba66cd7bd8ffb31df5bc1978682c85fec8e63a8349958022fd933cc676cbf5241953f2181bf4d1789f7cf9d371e012e3e49 + ) + vcpkg_download_distfile(YOLOV4-CONV-137 + URLS "https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v3_optimal/yolov4.conv.137" + FILENAME "darknet-cache/yolov4.conv.137" + SHA512 d146a61762bf6ef91deb6c627ede475f63b3975fbeeb1ff5e0949470b29be8fc28ee81280041937e7ded49679276fbabacdb92d02fa246cc622853633fd3d992 + ) + vcpkg_download_distfile(DARKNET53-CONV-74 + URLS "https://pjreddie.com/media/files/darknet53.conv.74" + FILENAME "darknet-cache/darknet53.conv.74" + SHA512 8983e1c129e2d6e8e3da0cc0781ecb7a07813830ef5a87c24b53100df6a5f23db6c6e6a402aec78025a93fe060b75d1958f1b8f7439a04b54a3f19c81e2ae99b + ) + vcpkg_download_distfile(DARKNET19-448-CONV-23 + URLS "https://pjreddie.com/media/files/darknet19_448.conv.23" + FILENAME "darknet-cache/darknet19_448.conv.23" + SHA512 8016f5b7ddc15c5d7dad231592f5351eea65f608ebdb204f545034dde904e11962f693080dfeb5a4510e7b71bdda151a9121ba0f8a243018d680f01b1efdbd31 + ) +endif() + +#make sure we don't use any integrated pre-built library nor any unnecessary CMake module +file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty) +file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindPThreads_windows.cmake) +file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindCUDNN.cmake) +file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindStb.cmake) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE + PREFER_NINJA + OPTIONS + -DINSTALL_BIN_DIR:STRING=bin + -DINSTALL_LIB_DIR:STRING=lib + -DENABLE_CUDA=${ENABLE_CUDA} + -DENABLE_CUDNN=${ENABLE_CUDNN} + -DENABLE_OPENCV=${ENABLE_OPENCV} +) + +vcpkg_install_cmake() + +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/darknet${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/uselib${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/bin/uselib_track${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/uselib_track${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +endif() +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/darknet${VCPKG_TARGET_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/${PORT}/darknet${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/uselib${VCPKG_TARGET_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/${PORT}/uselib${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/uselib_track${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/uselib_track${VCPKG_TARGET_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/${PORT}/uselib_track${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +endif() +file(COPY ${SOURCE_PATH}/cfg DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) +file(COPY ${SOURCE_PATH}/data DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +if("weights" IN_LIST FEATURES) + file(COPY ${VCPKG_ROOT_DIR}/downloads/darknet-cache/yolov4-tiny.weights DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(COPY ${VCPKG_ROOT_DIR}/downloads/darknet-cache/yolov4.weights DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(COPY ${VCPKG_ROOT_DIR}/downloads/darknet-cache/yolov3-tiny-prn.weights DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(COPY ${VCPKG_ROOT_DIR}/downloads/darknet-cache/yolov3-openimages.weights DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(COPY ${VCPKG_ROOT_DIR}/downloads/darknet-cache/yolov3.weights DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(COPY ${VCPKG_ROOT_DIR}/downloads/darknet-cache/yolov2.weights DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(COPY ${VCPKG_ROOT_DIR}/downloads/darknet-cache/yolov3-tiny.weights DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(COPY ${VCPKG_ROOT_DIR}/downloads/darknet-cache/yolov2-tiny.weights DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) +endif() + +if("weights-train" IN_LIST FEATURES) + file(COPY ${VCPKG_ROOT_DIR}/downloads/darknet-cache/yolov4-tiny.conv.29 DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(COPY ${VCPKG_ROOT_DIR}/downloads/darknet-cache/yolov4.conv.137 DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(COPY ${VCPKG_ROOT_DIR}/downloads/darknet-cache/darknet53.conv.74 DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(COPY ${VCPKG_ROOT_DIR}/downloads/darknet-cache/darknet19_448.conv.23 DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) +endif() diff --git a/vcpkg/ports/darts-clone/CMakeLists.txt b/vcpkg/ports/darts-clone/CMakeLists.txt new file mode 100644 index 0000000..024cd2f --- /dev/null +++ b/vcpkg/ports/darts-clone/CMakeLists.txt @@ -0,0 +1,29 @@ +cmake_minimum_required(VERSION 3.8) +project(darts) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +add_library(darts src/darts.cc) + +target_include_directories(darts + PUBLIC + $ + $ + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/src +) + +install( + TARGETS darts + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install( + DIRECTORY include/ DESTINATION include/ + ) +endif() diff --git a/vcpkg/ports/darts-clone/CONTROL b/vcpkg/ports/darts-clone/CONTROL new file mode 100644 index 0000000..a0bfad4 --- /dev/null +++ b/vcpkg/ports/darts-clone/CONTROL @@ -0,0 +1,3 @@ +Source: darts-clone +Version: 1767ab87cffe-1 +Description: A static double-array trie structure diff --git a/vcpkg/ports/darts-clone/portfile.cmake b/vcpkg/ports/darts-clone/portfile.cmake new file mode 100644 index 0000000..d7eb794 --- /dev/null +++ b/vcpkg/ports/darts-clone/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) +vcpkg_check_linkage( + ONLY_STATIC_LIBRARY +) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO s-yata/darts-clone + REF 1767ab87cffe7302856d1bb41e1c21b1df93f19e + SHA512 63112a4d8d6302d2602a8f161bf5fe5ec1b5b3b3097de9b28331f5261d76c06efb48601c08df26f242ddc881b917928baf54f24ccebac65da29e94380b6db0f5 + 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() +vcpkg_copy_pdbs() + +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/Makefile.am) + +file(INSTALL ${SOURCE_PATH}/COPYING.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/darts-clone RENAME copyright) diff --git a/vcpkg/ports/dartsim/1478.patch b/vcpkg/ports/dartsim/1478.patch new file mode 100644 index 0000000..ce6dbd1 --- /dev/null +++ b/vcpkg/ports/dartsim/1478.patch @@ -0,0 +1,25 @@ +From 6d03ee61c38e2b07b2dbb85f0ba61d2a76956e3b Mon Sep 17 00:00:00 2001 +From: Steve Peters +Date: Fri, 24 Jul 2020 17:24:42 -0700 +Subject: [PATCH] Don't force CMAKE_INSTALL_PREFIX on windows + +Fixes #1477. + +Signed-off-by: Steve Peters +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6552bedc162..47df721559b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -51,7 +51,7 @@ initialize_component_helpers(${PROJECT_NAME}) + + # System install paths on Windows + if(WIN32) +- set(CMAKE_INSTALL_PREFIX "C:/Golems" CACHE PATH "Install prefix" FORCE) ++ set(CMAKE_INSTALL_PREFIX "C:/Golems" CACHE PATH "Install prefix") + endif() + + #=============================================================================== diff --git a/vcpkg/ports/dartsim/1497.patch b/vcpkg/ports/dartsim/1497.patch new file mode 100644 index 0000000..3f2b6b5 --- /dev/null +++ b/vcpkg/ports/dartsim/1497.patch @@ -0,0 +1,50 @@ +From 9fde9124927789ca2399f99c1be9b101ed1e8550 Mon Sep 17 00:00:00 2001 +From: Silvio Traversaro +Date: Thu, 3 Sep 2020 17:28:01 +0200 +Subject: [PATCH] CMake: Add DART_SKIP_ advanced option + +Add DART_SKIP_ option to permit to specify that +a dependecy should not used even if it is found in the system. +--- + cmake/DARTMacros.cmake | 21 ++++++++++++++------- + 1 file changed, 14 insertions(+), 7 deletions(-) + +diff --git a/cmake/DARTMacros.cmake b/cmake/DARTMacros.cmake +index 8b1a89292ee..409b02bd742 100644 +--- a/cmake/DARTMacros.cmake ++++ b/cmake/DARTMacros.cmake +@@ -127,7 +127,9 @@ endfunction() + + #=============================================================================== + macro(dart_check_optional_package variable component dependency) +- if(${${variable}_FOUND}) ++ option(DART_SKIP_${variable} "If ON, do not use ${variable} even if it is found." OFF) ++ mark_as_advanced(DART_SKIP_${variable}) ++ if(${${variable}_FOUND} AND NOT ${DART_SKIP_${variable}}) + set(HAVE_${variable} TRUE CACHE BOOL "Check if ${variable} found." FORCE) + if(DART_VERBOSE) + message(STATUS "Looking for ${dependency} - version ${${variable}_VERSION}" +@@ -135,12 +137,17 @@ macro(dart_check_optional_package variable component dependency) + endif() + else() + set(HAVE_${variable} FALSE CACHE BOOL "Check if ${variable} found." FORCE) +- if(ARGV3) # version +- message(STATUS "Looking for ${dependency} - NOT found, to use" +- " ${component}, please install ${dependency} (>= ${ARGV3})") +- else() +- message(STATUS "Looking for ${dependency} - NOT found, to use" +- " ${component}, please install ${dependency}") ++ if(NOT ${${variable}_FOUND}) ++ if(ARGV3) # version ++ message(STATUS "Looking for ${dependency} - NOT found, to use" ++ " ${component}, please install ${dependency} (>= ${ARGV3})") ++ else() ++ message(STATUS "Looking for ${dependency} - NOT found, to use" ++ " ${component}, please install ${dependency}") ++ endif() ++ elseif(${DART_SKIP_${variable}} AND DART_VERBOSE) ++ message(STATUS "Not using ${dependency} - version ${${variable}_VERSION}" ++ " even if found because DART_SKIP_${variable} is ON.") + endif() + return() + endif() diff --git a/vcpkg/ports/dartsim/portfile.cmake b/vcpkg/ports/dartsim/portfile.cmake new file mode 100644 index 0000000..0af5f8e --- /dev/null +++ b/vcpkg/ports/dartsim/portfile.cmake @@ -0,0 +1,40 @@ +# Shared library support is broken upstream (https://github.com/dartsim/dart/issues/1005#issuecomment-375406260) +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dartsim/dart + REF v6.9.4 + SHA512 a9e8712a294286772ee1e3c3899aac7d202f1d3c2b9242ebeaddb2a142787b192d5421a6e3f889dd9ff9ca9e9106b1f893a0c8ab2e1656b04fac6d0be13494ba + HEAD_REF release-6.9 + PATCHES 1478.patch + 1497.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DDART_VERBOSE=ON + -DDART_MSVC_DEFAULT_OPTIONS=ON + -DDART_SKIP_DOXYGEN=ON + -DDART_SKIP_FLANN=ON + -DDART_SKIP_IPOPT=ON + -DDART_SKIP_NLOPT=ON + -DDART_SKIP_OPENGL=ON + -DDART_SKIP_pagmo=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/dart/cmake TARGET_PATH share/dart) + +# Remove pkg-config file as they are broken upstream (https://github.com/dartsim/dart/issues/1496) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/dartsim RENAME copyright) + diff --git a/vcpkg/ports/dartsim/vcpkg.json b/vcpkg/ports/dartsim/vcpkg.json new file mode 100644 index 0000000..0029e6c --- /dev/null +++ b/vcpkg/ports/dartsim/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "dartsim", + "version-string": "6.9.4", + "description": "Dynamic Animation and Robotics Toolkit", + "homepage": "https://dartsim.github.io/", + "dependencies": [ + "assimp", + "boost-algorithm", + "boost-filesystem", + "boost-functional", + "boost-lexical-cast", + "boost-math", + "boost-optional", + "boost-regex", + "boost-system", + "bullet3", + "ccd", + "eigen3", + "fcl", + "octomap", + "ode", + "tinyxml2", + "urdfdom" + ] +} diff --git a/vcpkg/ports/date/0001-fix-uwp.patch b/vcpkg/ports/date/0001-fix-uwp.patch new file mode 100644 index 0000000..b414722 --- /dev/null +++ b/vcpkg/ports/date/0001-fix-uwp.patch @@ -0,0 +1,13 @@ +diff --git i/include/date/date.h w/include/date/date.h +index fce6200..6a77ad4 100644 +--- i/include/date/date.h ++++ w/include/date/date.h +@@ -82,7 +82,7 @@ + #ifdef _MSC_VER + # pragma warning(push) + // warning C4127: conditional expression is constant +-# pragma warning(disable : 4127) ++# pragma warning(disable : 4127 4996) + #endif + + namespace date diff --git a/vcpkg/ports/date/0002-fix-cmake-3.14.patch b/vcpkg/ports/date/0002-fix-cmake-3.14.patch new file mode 100644 index 0000000..9d11723 --- /dev/null +++ b/vcpkg/ports/date/0002-fix-cmake-3.14.patch @@ -0,0 +1,32 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ad74900..42d55af 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -72,7 +72,7 @@ target_sources( date INTERFACE + $ + $ + ) +-if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.15) ++if (0) + # public headers will get installed: + set_target_properties( date PROPERTIES PUBLIC_HEADER include/date/date.h ) + endif () +@@ -115,7 +115,6 @@ if( BUILD_TZ_LIB ) + endif( ) + set_target_properties( date-tz PROPERTIES + POSITION_INDEPENDENT_CODE ON +- PUBLIC_HEADER "${TZ_HEADERS}" + VERSION "${PROJECT_VERSION}" + SOVERSION "${PROJECT_VERSION}" ) + if( NOT MSVC ) +@@ -140,8 +139,8 @@ write_basic_package_version_file( "${version_config}" + COMPATIBILITY SameMajorVersion ) + + install( TARGETS date +- EXPORT dateConfig +- PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/date ) ++ EXPORT dateConfig ) ++install( FILES include/date/date.h ${TZ_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/date ) + export( TARGETS date NAMESPACE date:: FILE dateTargets.cmake ) + if (CMAKE_VERSION VERSION_LESS 3.15) + install( diff --git a/vcpkg/ports/date/0003-find-dependency-pthread.patch b/vcpkg/ports/date/0003-find-dependency-pthread.patch new file mode 100644 index 0000000..72c6c76 --- /dev/null +++ b/vcpkg/ports/date/0003-find-dependency-pthread.patch @@ -0,0 +1,15 @@ +diff --git a/cmake/dateConfig.cmake b/cmake/dateConfig.cmake +index 20f86e8..2198ad1 100644 +--- a/cmake/dateConfig.cmake ++++ b/cmake/dateConfig.cmake +@@ -1,8 +1,8 @@ + include( CMakeFindDependencyMacro ) + include( "${CMAKE_CURRENT_LIST_DIR}/dateTargets.cmake" ) +-if( NOT MSVC AND TARGET date::tz ) ++if( NOT MSVC AND TARGET date::date-tz ) + find_dependency( Threads REQUIRED) +- get_target_property( _tzill date::tz INTERFACE_LINK_LIBRARIES ) ++ get_target_property( _tzill date::date-tz INTERFACE_LINK_LIBRARIES ) + if( _tzill AND "${_tzill}" MATCHES "libcurl" ) + find_dependency( CURL ) + endif( ) diff --git a/vcpkg/ports/date/CONTROL b/vcpkg/ports/date/CONTROL new file mode 100644 index 0000000..b44b024 --- /dev/null +++ b/vcpkg/ports/date/CONTROL @@ -0,0 +1,9 @@ +Source: date +Version: 3.0.0 +Port-Version: 1 +Homepage: https://github.com/HowardHinnant/date +Description: A date and time library based on the C++17 header + +Feature: remote-api +Description: support automatic download of tz data +Build-Depends: curl diff --git a/vcpkg/ports/date/portfile.cmake b/vcpkg/ports/date/portfile.cmake new file mode 100644 index 0000000..4dd5a40 --- /dev/null +++ b/vcpkg/ports/date/portfile.cmake @@ -0,0 +1,44 @@ +if(VCPKG_TARGET_IS_WINDOWS) + message(WARNING + "You will need to also install https://raw.githubusercontent.com/unicode-org/cldr/master/common/supplemental/windowsZones.xml into your install location.\n" + "See https://howardhinnant.github.io/date/tz.html" + ) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO HowardHinnant/date + REF cac99da8dc88be719a728dc1b597b0ac307c1800 #3.0.0 + SHA512 07bac40c9d92ed92f05ab71b07c203fc341cd35999f1eab16d584bf77ff69e2cdc106931b2faf0dcfc5a311ee55e8445a81fd97c62f4672957b6aac1b24a08fd + HEAD_REF master + PATCHES + 0001-fix-uwp.patch + 0002-fix-cmake-3.14.patch + 0003-find-dependency-pthread.patch +) +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES + remote-api USE_SYSTEM_TZ_DB +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DBUILD_TZ_LIB=ON +) + +vcpkg_install_cmake() + +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake TARGET_PATH share/date) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/date TARGET_PATH share/date) +endif() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/date RENAME copyright) diff --git a/vcpkg/ports/dbg-macro/CONTROL b/vcpkg/ports/dbg-macro/CONTROL new file mode 100644 index 0000000..80a2e31 --- /dev/null +++ b/vcpkg/ports/dbg-macro/CONTROL @@ -0,0 +1,4 @@ +Source: dbg-macro +Version: 2019-07-11 +Description: A dbg(...) macro for C++ +Homepage: https://github.com/sharkdp/dbg-macro diff --git a/vcpkg/ports/dbg-macro/portfile.cmake b/vcpkg/ports/dbg-macro/portfile.cmake new file mode 100644 index 0000000..3aee726 --- /dev/null +++ b/vcpkg/ports/dbg-macro/portfile.cmake @@ -0,0 +1,16 @@ +# single header file library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sharkdp/dbg-macro + REF 4409d8428baf700873bcfee42e63bbca6700b97e + SHA512 f9f936707631bee112566a24c92cbf171e54362099df689253ab38d0489400f65c284df81749376f18cb3ebcefea3cc18844554016798c2542ec73dc2afcc931 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/dbg.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/dbghelp/CONTROL b/vcpkg/ports/dbghelp/CONTROL new file mode 100644 index 0000000..e92599d --- /dev/null +++ b/vcpkg/ports/dbghelp/CONTROL @@ -0,0 +1,4 @@ +Source: dbghelp +Version: 0.0 +Description: Windows Debug Help Library +Supports: windows \ No newline at end of file diff --git a/vcpkg/ports/dbghelp/portfile.cmake b/vcpkg/ports/dbghelp/portfile.cmake new file mode 100644 index 0000000..832bec6 --- /dev/null +++ b/vcpkg/ports/dbghelp/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_fail_port_install(ON_TARGET "OSX" "Linux") +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_get_windows_sdk(WINDOWS_SDK) + +if (WINDOWS_SDK VERSION_GREATER "10") + set(LIBFILEPATH "$ENV{WindowsSdkDir}Debuggers\\lib\\${TRIPLET_SYSTEM_ARCH}\\dbghelp.lib") + message("LIBFILEPATH: ${LIBFILEPATH}") + set(DLLFILEPATH "$ENV{WindowsSdkDir}Debuggers\\${TRIPLET_SYSTEM_ARCH}\\dbghelp.dll") + message("DLLFILEPATH: ${DLLFILEPATH}") + set(HEADERPATH "$ENV{WindowsSdkDir}Debuggers\\inc\\dbghelp.h") + message("HEADERPATH: ${HEADERPATH}") +else() + message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}") +endif() + +if (NOT EXISTS "${LIBFILEPATH}" OR NOT EXISTS "${DLLFILEPATH}" OR NOT EXISTS "${HEADERPATH}") + message(FATAL_ERROR "Cannot find debugging tools in Windows SDK ${WINDOWS_SDK}. Please reinstall the Windows SDK and select \"Debugging Tools\".") +endif() + +file(INSTALL ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(INSTALL ${DLLFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +file(INSTALL ${DLLFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +file(INSTALL ${HEADERPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "See https://developer.microsoft.com/windows/downloads/windows-10-sdk for the Windows 10 SDK license") diff --git a/vcpkg/ports/dbow2/CONTROL b/vcpkg/ports/dbow2/CONTROL new file mode 100644 index 0000000..4b5c4c1 --- /dev/null +++ b/vcpkg/ports/dbow2/CONTROL @@ -0,0 +1,5 @@ +Source: dbow2 +Version: 2019-08-05 +Homepage: https://github.com/dorian3d/DBoW2 +Description: DBoW2 is an improved version of the DBow library, an open source C++ library for indexing and converting images into a bag-of-word representation. +Build-Depends: opencv diff --git a/vcpkg/ports/dbow2/portfile.cmake b/vcpkg/ports/dbow2/portfile.cmake new file mode 100644 index 0000000..c569e89 --- /dev/null +++ b/vcpkg/ports/dbow2/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dorian3d/DBoW2 + REF 4d08e9fc751fac9063874d85a43c1ccdcda8b401 + SHA512 0a4ad8506c731395cb23d96d0e8afe4131576af88468723b9496cdbc95a031089ecdeb61dbb7205cb3a7599acb60a39887fa9852e7d7a690b8152a1bd26d9bd0 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBUILD_Demo=OFF +) + +vcpkg_install_cmake() + +# Move CMake files to the right place +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/DBoW2) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/DBoW2/DBoW2Config.cmake) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) + diff --git a/vcpkg/ports/dbow3/CONTROL b/vcpkg/ports/dbow3/CONTROL new file mode 100644 index 0000000..831ea9f --- /dev/null +++ b/vcpkg/ports/dbow3/CONTROL @@ -0,0 +1,4 @@ +Source: dbow3 +Version: 1.0.0 +Description: DBoW3 is an improved version of the DBow2 library, an open source C++ library for indexing and converting images into a bag-of-word representation. +Build-Depends: opencv3[contrib] \ No newline at end of file diff --git a/vcpkg/ports/dbow3/fix_cmake.patch b/vcpkg/ports/dbow3/fix_cmake.patch new file mode 100644 index 0000000..0b80242 --- /dev/null +++ b/vcpkg/ports/dbow3/fix_cmake.patch @@ -0,0 +1,2496 @@ +From d72cb42f5147f7648c462ee1b211070c1691a887 Mon Sep 17 00:00:00 2001 +From: Ramadan +Date: Thu, 15 Aug 2019 12:27:19 +0200 +Subject: [PATCH 1/2] Fix CMakeLists.txt and installation + +--- + .gitignore | 249 ++++++++++ + CMakeLists.txt | 275 +---------- + Lib/CMakeLists.txt | 99 ++++ + Lib/DBow3Config.cmake | 4 + + {src => Lib/include/DBow3}/BowVector.h | 1 + + {src => Lib/include/DBow3}/DBoW3.h | 0 + {src => Lib/include/DBow3}/Database.h | 0 + {src => Lib/include/DBow3}/DescManip.h | 0 + {src => Lib/include/DBow3}/FeatureVector.h | 0 + {src => Lib/include/DBow3}/QueryResults.h | 0 + {src => Lib/include/DBow3}/ScoringObject.h | 0 + {src => Lib/include/DBow3}/Vocabulary.h | 0 + {src => Lib/include/DBow3}/exports.h | 16 +- + {src => Lib/include/DBow3}/quicklz.h | 0 + {src => Lib/include/DBow3}/timers.h | 0 + {src => Lib/src}/BowVector.cpp | 2 +- + {src => Lib/src}/Database.cpp | 2 +- + {src => Lib/src}/DescManip.cpp | 546 ++++++++++----------- + {src => Lib/src}/FeatureVector.cpp | 2 +- + {src => Lib/src}/QueryResults.cpp | 2 +- + {src => Lib/src}/ScoringObject.cpp | 4 +- + {src => Lib/src}/Vocabulary.cpp | 8 +- + {src => Lib/src}/quicklz.c | 2 +- + cmake/instructionSet.cmake | 13 + + cmake_uninstall.cmake.in | 28 -- + config.cmake.in | 36 -- + {utils => examples}/CMakeLists.txt | 0 + {utils => examples}/create_voc_step0.cpp | 252 +++++----- + {utils => examples}/create_voc_step1.cpp | 142 +++--- + {utils => examples}/demo_general.cpp | 404 +++++++-------- + {utils => examples}/images/image0.png | Bin + {utils => examples}/images/image1.png | Bin + {utils => examples}/images/image2.png | Bin + {utils => examples}/images/image3.png | Bin + src/CMakeLists.txt | 35 -- + orbvoc.dbow3 => voc/orbvoc.dbow3 | Bin + 36 files changed, 1072 insertions(+), 1050 deletions(-) + create mode 100644 .gitignore + create mode 100644 Lib/CMakeLists.txt + create mode 100644 Lib/DBow3Config.cmake + rename {src => Lib/include/DBow3}/BowVector.h (99%) + rename {src => Lib/include/DBow3}/DBoW3.h (100%) + rename {src => Lib/include/DBow3}/Database.h (100%) + rename {src => Lib/include/DBow3}/DescManip.h (100%) + rename {src => Lib/include/DBow3}/FeatureVector.h (100%) + rename {src => Lib/include/DBow3}/QueryResults.h (100%) + rename {src => Lib/include/DBow3}/ScoringObject.h (100%) + rename {src => Lib/include/DBow3}/Vocabulary.h (100%) + rename {src => Lib/include/DBow3}/exports.h (78%) + rename {src => Lib/include/DBow3}/quicklz.h (100%) + rename {src => Lib/include/DBow3}/timers.h (100%) + rename {src => Lib/src}/BowVector.cpp (99%) + rename {src => Lib/src}/Database.cpp (99%) + rename {src => Lib/src}/DescManip.cpp (96%) + rename {src => Lib/src}/FeatureVector.cpp (98%) + rename {src => Lib/src}/QueryResults.cpp (97%) + rename {src => Lib/src}/ScoringObject.cpp (99%) + rename {src => Lib/src}/Vocabulary.cpp (99%) + rename {src => Lib/src}/quicklz.c (99%) + create mode 100644 cmake/instructionSet.cmake + delete mode 100644 cmake_uninstall.cmake.in + delete mode 100644 config.cmake.in + rename {utils => examples}/CMakeLists.txt (100%) + rename {utils => examples}/create_voc_step0.cpp (97%) + rename {utils => examples}/create_voc_step1.cpp (97%) + rename {utils => examples}/demo_general.cpp (96%) + rename {utils => examples}/images/image0.png (100%) + rename {utils => examples}/images/image1.png (100%) + rename {utils => examples}/images/image2.png (100%) + rename {utils => examples}/images/image3.png (100%) + delete mode 100644 src/CMakeLists.txt + rename orbvoc.dbow3 => voc/orbvoc.dbow3 (100%) + +diff --git a/.gitignore b/.gitignore +new file mode 100644 +index 0000000..8c4285e +--- /dev/null ++++ b/.gitignore +@@ -0,0 +1,249 @@ ++## Ignore Visual Studio temporary files, build results, and ++## files generated by popular Visual Studio add-ons. ++ ++# User-specific files ++*.suo ++*.user ++*.userosscache ++*.sln.docstates ++ ++# User-specific files (MonoDevelop/Xamarin Studio) ++*.userprefs ++ ++# Build results ++[Dd]ebug/ ++[Dd]ebugPublic/ ++[Rr]elease/ ++[Rr]eleases/ ++[Xx]64/ ++[Xx]86/ ++[Bb]uild/ ++bld/ ++[Bb]in/ ++[Oo]bj/ ++ ++# Visual Studio 2015 cache/options directory ++.vs/ ++out/ ++# Uncomment if you have tasks that create the project's static files in wwwroot ++#wwwroot/ ++ ++# MSTest test Results ++[Tt]est[Rr]esult*/ ++[Bb]uild[Ll]og.* ++ ++# NUNIT ++*.VisualState.xml ++TestResult.xml ++ ++# Build Results of an ATL Project ++[Dd]ebugPS/ ++[Rr]eleasePS/ ++dlldata.c ++ ++# DNX ++project.lock.json ++artifacts/ ++ ++*_i.c ++*_p.c ++*_i.h ++*.ilk ++*.meta ++*.obj ++*.pch ++*.pdb ++*.pgc ++*.pgd ++*.rsp ++*.sbr ++*.tlb ++*.tli ++*.tlh ++*.tmp ++*.tmp_proj ++*.log ++*.vspscc ++*.vssscc ++.builds ++*.pidb ++*.svclog ++*.scc ++*.tlog ++*.idb ++# Chutzpah Test files ++_Chutzpah* ++ ++# Visual C++ cache files ++ipch/ ++*.aps ++*.ncb ++*.opendb ++*.opensdf ++*.sdf ++*.cachefile ++*.VC.db ++ ++# Visual Studio profiler ++*.psess ++*.vsp ++*.vspx ++*.sap ++ ++# TFS 2012 Local Workspace ++$tf/ ++ ++# Guidance Automation Toolkit ++*.gpState ++ ++# ReSharper is a .NET coding add-in ++_ReSharper*/ ++*.[Rr]e[Ss]harper ++*.DotSettings.user ++ ++# JustCode is a .NET coding add-in ++.JustCode ++ ++# TeamCity is a build add-in ++_TeamCity* ++ ++# DotCover is a Code Coverage Tool ++*.dotCover ++ ++# NCrunch ++_NCrunch_* ++.*crunch*.local.xml ++nCrunchTemp_* ++ ++# MightyMoose ++*.mm.* ++AutoTest.Net/ ++ ++# Web workbench (sass) ++.sass-cache/ ++ ++# Installshield output folder ++[Ee]xpress/ ++ ++# DocProject is a documentation generator add-in ++DocProject/buildhelp/ ++DocProject/Help/*.HxT ++DocProject/Help/*.HxC ++DocProject/Help/*.hhc ++DocProject/Help/*.hhk ++DocProject/Help/*.hhp ++DocProject/Help/Html2 ++DocProject/Help/html ++ ++# Click-Once directory ++publish/ ++ ++# Publish Web Output ++*.[Pp]ublish.xml ++*.azurePubxml ++ ++# TODO: Un-comment the next line if you do not want to checkin ++# your web deploy settings because they may include unencrypted ++# passwords ++#*.pubxml ++*.publishproj ++ ++# NuGet Packages ++*.nupkg ++# The packages folder can be ignored because of Package Restore ++**/packages/* ++# except build/, which is used as an MSBuild target. ++!**/packages/build/ ++# Uncomment if necessary however generally it will be regenerated when needed ++#!**/packages/repositories.config ++# NuGet v3's project.json files produces more ignoreable files ++*.nuget.props ++*.nuget.targets ++ ++# Microsoft Azure Build Output ++csx/ ++*.build.csdef ++ ++# Microsoft Azure Emulator ++ecf/ ++rcf/ ++ ++# Microsoft Azure ApplicationInsights config file ++ApplicationInsights.config ++ ++# Windows Store app package directory ++AppPackages/ ++BundleArtifacts/ ++ ++# Visual Studio cache files ++# files ending in .cache can be ignored ++*.[Cc]ache ++# but keep track of directories ending in .cache ++!*.[Cc]ache/ ++ ++# Others ++ClientBin/ ++[Ss]tyle[Cc]op.* ++~$* ++*~ ++*.dbmdl ++*.dbproj.schemaview ++*.pfx ++*.publishsettings ++node_modules/ ++orleans.codegen.cs ++ ++# RIA/Silverlight projects ++Generated_Code/ ++ ++# Backup & report files from converting an old project file ++# to a newer Visual Studio version. Backup files are not needed, ++# because we have git ;-) ++_UpgradeReport_Files/ ++Backup*/ ++UpgradeLog*.XML ++UpgradeLog*.htm ++ ++# SQL Server files ++*.mdf ++*.ldf ++ ++# Business Intelligence projects ++*.rdl.data ++*.bim.layout ++*.bim_*.settings ++ ++# Microsoft Fakes ++FakesAssemblies/ ++ ++# GhostDoc plugin setting file ++*.GhostDoc.xml ++ ++# Node.js Tools for Visual Studio ++.ntvs_analysis.dat ++ ++# Visual Studio 6 build log ++*.plg ++ ++# Visual Studio 6 workspace options file ++*.opt ++ ++# Visual Studio LightSwitch build output ++**/*.HTMLClient/GeneratedArtifacts ++**/*.DesktopClient/GeneratedArtifacts ++**/*.DesktopClient/ModelManifest.xml ++**/*.Server/GeneratedArtifacts ++**/*.Server/ModelManifest.xml ++_Pvt_Extensions ++ ++# LightSwitch generated files ++GeneratedArtifacts/ ++ModelManifest.xml ++ ++# Paket dependency manager ++.paket/paket.exe ++ ++# FAKE - F# Make ++.fake/ ++html ++xml +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9541cd7..a2a563a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,268 +1,25 @@ +-# ---------------------------------------------------------------------------- +-# Basic Configuration +-# ---------------------------------------------------------------------------- +-CMAKE_MINIMUM_REQUIRED(VERSION 2.8) ++cmake_minimum_required(VERSION 3.10) + +-set(CMAKE_CXX_STANDARD 11) ++project(DBow3 VERSION 1.0.0) + +-PROJECT(DBoW3) +-set(PROJECT_VERSION "0.0.1") +-string(REGEX MATCHALL "[0-9]" PROJECT_VERSION_PARTS "${PROJECT_VERSION}") +-list(GET PROJECT_VERSION_PARTS 0 PROJECT_VERSION_MAJOR) +-list(GET PROJECT_VERSION_PARTS 1 PROJECT_VERSION_MINOR) +-list(GET PROJECT_VERSION_PARTS 2 PROJECT_VERSION_PATCH) +-set(PROJECT_SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}") ++option(BUILD_EXAMPLES "Set to ON to build examples" OFF) ++option(BUILD_TESTS "Set to ON to build tests" OFF) ++option(BUILD_SHARED_LIBS "Set to OFF to build static libraries" ON) + +-message("LIB_INSTALL_DIR: ${LIB_INSTALL_DIR}") ++# OpenCV ++option(USE_OPENCV_CONTRIB "Set on to use opencv-contrib" ON) + +-#------------------------------------------------------ +-# Build type +-#------------------------------------------------------ ++# Optimization ++option(USE_SIMD "Set on to enabel avx optimization" ON) + +-IF(NOT CMAKE_BUILD_TYPE ) +- SET( CMAKE_BUILD_TYPE "Release" ) +-ENDIF() + +-#------------------------------------------------------ +-# Lib Names and Dirs +-#------------------------------------------------------ ++add_subdirectory(Lib) + +-if(WIN32) +- # Postfix of DLLs: +- SET(PROJECT_DLLVERSION "${PROJECT_VERSION_MAJOR}${PROJECT_VERSION_MINOR}${PROJECT_VERSION_PATCH}") +- SET(RUNTIME_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin CACHE PATH "Directory for dlls and binaries") +- SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin CACHE PATH "Directory for binaries") +- SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin CACHE PATH "Directory for dlls") +-else() +- # Postfix of so's: +- set(PROJECT_DLLVERSION) +- set(LIB_INSTALL_DIR lib CACHE STRING "Install location of libraries (e.g. lib32 or lib64 for multilib installations)") +- SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/cmake/ /usr/${LIB_INSTALL_DIR}/cmake ) +-endif() ++if(BUILD_EXAMPLES) ++ add_subdirectory(examples) ++endif(BUILD_EXAMPLES) + ++if(BUILD_TESTS) ++ add_subdirectory(tests) ++endif(BUILD_TESTS) + +- +-# +-OPTION(BUILD_UTILS "Set to OFF to not build utils" ON) +-OPTION(USE_CONTRIB "Set to ON if contrib are installed" OFF) +-OPTION(BUILD_SHARED_LIBS "Set to OFF to build static libraries" ON) +- +-# ---------------------------------------------------------------------------- +-# Find Dependencies +-# ---------------------------------------------------------------------------- +-find_package(OpenCV REQUIRED) +-IF(USE_CONTRIB) +-add_definitions(-DUSE_CONTRIB) +-ENDIF() +-if(NOT OpenCV_VERSION VERSION_LESS "3.0") +- ADD_DEFINITIONS(-DOPENCV_VERSION_3) +- SET(OPENCV_VERSION_3 ON) +-ELSE() +- SET(OPENCV_VERSION_3 OFF) +-ENDIF() +- +-include_directories(${OpenCV_INCLUDE_DIRS}) +- +-SET(REQUIRED_LIBRARIES ${REQUIRED_LIBRARIES} ${OpenCV_LIBS}) +- +-# ---------------------------------------------------------------------------- +-# PROJECT CONFIGURATION +-# force some variables that could be defined in the command line to be written to cache +-# ---------------------------------------------------------------------------- +-OPTION(INSTALL_DOC "Set to ON to build/install Documentation" OFF) +-IF (INSTALL_DOC) +- FIND_PACKAGE(Doxygen REQUIRED) +- MESSAGE( STATUS "INSTALL_DOC: ${INSTALL_DOC} ") +- INCLUDE("${PROJECT_SOURCE_DIR}/generateDoc.cmake") +- GENERATE_DOCUMENTATION(${PROJECT_SOURCE_DIR}/dox.in) +-ENDIF() +- +-# ---------------------------------------------------------------------------- +-# Uninstall target, for "make uninstall" +-# ---------------------------------------------------------------------------- +-CONFIGURE_FILE( "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY) +-ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") +- +-# ---------------------------------------------------------------------------- +-# create configuration file from .in file (If you use windows take care with paths) +-# ---------------------------------------------------------------------------- +- +-CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/config.cmake.in" "${PROJECT_BINARY_DIR}/Find${PROJECT_NAME}.cmake") +-CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/config.cmake.in" "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake") +-INSTALL(FILES "${PROJECT_BINARY_DIR}/Find${PROJECT_NAME}.cmake" DESTINATION ${LIB_INSTALL_DIR}/cmake/ ) +-INSTALL(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" DESTINATION ${LIB_INSTALL_DIR}/cmake/${PROJECT_NAME} ) +- +- +- +- +-# ---------------------------------------------------------------------------- +-# Program Optimization and debug (Extracted from OpenCV) +-# ---------------------------------------------------------------------------- +-set(WARNINGS_ARE_ERRORS OFF CACHE BOOL "Treat warnings as errors") +-set(WHOLE_PROGRAM_OPTIMIZATION OFF CACHE BOOL "Flags for whole program optimization.") +- +-set(EXTRA_C_FLAGS "") +-set(EXTRA_C_FLAGS_RELEASE "") +-set(EXTRA_C_FLAGS_DEBUG "") +-set(EXTRA_EXE_LINKER_FLAGS "") +-set(EXTRA_EXE_LINKER_FLAGS_RELEASE "") +-set(EXTRA_EXE_LINKER_FLAGS_DEBUG "") +- +-IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW) +- set(ENABLE_PROFILING OFF CACHE BOOL "Enable profiling in the GCC compiler (Add flags: -g -pg)") +- set(USE_OMIT_FRAME_POINTER ON CACHE BOOL "Enable -fomit-frame-pointer for GCC") +- if(${CMAKE_SYSTEM_PROCESSOR} MATCHES arm*) # We can use only -O2 because the -O3 causes gcc crash +- set(USE_O2 ON CACHE BOOL "Enable -O2 for GCC") +- set(USE_FAST_MATH OFF CACHE BOOL "Enable -ffast-math for GCC") +- endif() +- if(${CMAKE_SYSTEM_PROCESSOR} MATCHES powerpc*) +- set(USE_O3 ON CACHE BOOL "Enable -O3 for GCC") +- set(USE_POWERPC ON CACHE BOOL "Enable PowerPC for GCC") +- endif () +- if(${CMAKE_SYSTEM_PROCESSOR} MATCHES amd64* OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES x86_64*) +- set(USE_O3 ON CACHE BOOL "Enable -O3 for GCC") +- set(USE_FAST_MATH OFF CACHE BOOL "Enable -ffast-math for GCC") +- set(USE_MMX ON CACHE BOOL "Enable MMX for GCC") +- set(USE_SSE ON CACHE BOOL "Enable SSE for GCC") +- set(USE_SSE2 ON CACHE BOOL "Enable SSE2 for GCC") +- set(USE_SSE3 ON CACHE BOOL "Enable SSE3 for GCC") +- endif() +- if(${CMAKE_SYSTEM_PROCESSOR} MATCHES i686* OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES x86) +- set(USE_O3 ON CACHE BOOL "Enable -O3 for GCC") +- set(USE_FAST_MATH OFF CACHE BOOL "Enable -ffast-math for GCC") +- set(USE_MMX ON CACHE BOOL "Enable MMX for GCC") +- set(USE_SSE OFF CACHE BOOL "Enable SSE for GCC") +- set(USE_SSE2 OFF CACHE BOOL "Enable SSE2 for GCC") +- set(USE_SSE3 OFF CACHE BOOL "Enable SSE3 for GCC") +- endif () +- +- set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Wall") +- +- if(WARNINGS_ARE_ERRORS) +- set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Werror") +- endif() +- +- # The -Wno-long-long is required in 64bit systems when including sytem headers. +- if(${CMAKE_SYSTEM_PROCESSOR} MATCHES x86_64* OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES amd64*) +- set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Wno-long-long") +- endif() +- +- # Whole program optimization +- if(WHOLE_PROGRAM_OPTIMIZATION) +- set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -fwhole-program --combine") +- endif() +- +- # Other optimizations +- if(USE_OMIT_FRAME_POINTER) +- set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -fomit-frame-pointer") +- endif() +- if(USE_O2) +- set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -O2") +- endif() +- if(USE_O3) +- set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -O3") +- endif() +- if(USE_FAST_MATH) +- set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -ffast-math") +- endif() +- if(USE_POWERPC) +- set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -mcpu=G3 -mtune=G5") +- endif() +- if(USE_MMX) +- set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -mmmx") +- endif() +- if(USE_SSE) +- set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -msse") +- endif() +- if(USE_SSE2) +- set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -msse2") +- endif() +- if(USE_SSE3 AND NOT MINGW) # SSE3 should be disabled under MingW because it generates compiler errors +- set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -msse3") +- endif() +- +- if(ENABLE_PROFILING) +- set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -pg -g") +- else() +- if(NOT APPLE) +- set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -ffunction-sections") +- endif() +- endif() +- +- +- set(EXTRA_C_FLAGS_RELEASE "${EXTRA_C_FLAGS_RELEASE} -DNDEBUG ") +- set(EXTRA_C_FLAGS_DEBUG "-g3 -O0 -DDEBUG -D_DEBUG -W -Wextra -Wno-return-type ") +- +- MESSAGE( STATUS "-------------------------------------------------------------------------------" ) +- message( STATUS "GNU COMPILER") +- MESSAGE( STATUS "-------------------------------------------------------------------------------" ) +- +- +- +- +-ELSE() # MSVC +- +- +-ENDIF()#END OF COMPILER SPECIFIC OPTIONS +-SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS} ${EXTRA_C_FLAGS_RELEASE}") +-SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} ${EXTRA_C_FLAGS_DEBUG}") +-SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -std=c++11") +-SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -std=c++11") +-set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} ${CMAKE_C_FLAGS_DEBUG}") +-set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_DEBUG}") +-SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${EXTRA_EXE_LINKER_FLAGS}") +-SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} ${EXTRA_EXE_LINKER_FLAGS_RELEASE}") +-SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${EXTRA_EXE_LINKER_FLAGS_DEBUG}") +- +- +- +-#------------------------------------------------ +-# DIRS +-#------------------------------------------------ +-ADD_SUBDIRECTORY(src) +-IF (BUILD_UTILS) +-ADD_SUBDIRECTORY(utils) +-ENDIF() +- +-IF (BUILD_TESTS) +-ADD_SUBDIRECTORY(tests) +-ENDIF() +- +- +-# ---------------------------------------------------------------------------- +-# display status message for important variables +-# ---------------------------------------------------------------------------- +-message( STATUS ) +-MESSAGE( STATUS "-------------------------------------------------------------------------------" ) +-message( STATUS "General configuration for ${PROJECT_NAME} ${PROJECT_VERSION}") +-MESSAGE( STATUS "-------------------------------------------------------------------------------" ) +-message(" Built as dynamic libs?:" ${BUILD_SHARED_LIBS}) +-message(" Compiler:" "${CMAKE_COMPILER}" "${CMAKE_CXX_COMPILER}") +- +-message( STATUS "Build Type: ${CMAKE_BUILD_TYPE}") +-message( STATUS "C++ flags (Release): ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}") +-message( STATUS "C++ flags (Debug): ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}") +-message( STATUS "C++ flags (Relase+Debug): ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") +- +-message( STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}") +-message( STATUS "CMAKE_BINARY_DIR: ${CMAKE_BINARY_DIR}") +- +-MESSAGE( STATUS ) +-MESSAGE( STATUS "CMAKE_SYSTEM_PROCESSOR = ${CMAKE_SYSTEM_PROCESSOR}" ) +-MESSAGE( STATUS "CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}" ) +-MESSAGE( STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}" ) +-MESSAGE( STATUS "CMAKE_MODULE_PATH = ${CMAKE_MODULE_PATH}" ) +-MESSAGE( STATUS "BUILD_UTILS= ${BUILD_UTILS}" ) +-MESSAGE( STATUS "BUILD_TESTS= ${BUILD_TESTS}" ) +-MESSAGE( STATUS "OPENCV_DIR= ${OpenCV_DIR} VERSION=${OpenCV_VERSION}" ) +- +-MESSAGE( STATUS "USE_CONTRIB= ${USE_CONTRIB}" ) +- +-MESSAGE( STATUS ) +-MESSAGE( STATUS "OpenCV_LIB_DIR=${OpenCV_LIB_DIR}") +-MESSAGE( STATUS "CMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}") +- +-MESSAGE( STATUS ) +-MESSAGE( STATUS ) +-MESSAGE( STATUS "Change a value with: cmake -D=" ) +-MESSAGE( STATUS ) +diff --git a/Lib/CMakeLists.txt b/Lib/CMakeLists.txt +new file mode 100644 +index 0000000..e56077b +--- /dev/null ++++ b/Lib/CMakeLists.txt +@@ -0,0 +1,99 @@ ++cmake_minimum_required(VERSION 3.10) ++ ++find_package(OpenCV REQUIRED) ++ ++find_package(OpenMP REQUIRED) ++ ++include(${CMAKE_SOURCE_DIR}/cmake/instructionSet.cmake) ++ ++if(BUILD_SHARED_LIBS) ++ add_library(DBow3 SHARED) ++ ++ target_compile_definitions(DBow3 ++ PUBLIC ++ DBOW_API ++ ) ++ ++else() ++ add_library(DBow3 STATIC) ++endif() ++ ++add_library(DBow3::DBow3 ALIAS DBow3) ++ ++target_sources(DBow3 ++ PRIVATE ++ src/BowVector.cpp ++ src/Database.cpp ++ src/DescManip.cpp ++ src/FeatureVector.cpp ++ src/QueryResults.cpp ++ src/ScoringObject.cpp ++ src/Vocabulary.cpp ++ src/quicklz.c ++) ++ ++target_include_directories(DBow3 ++ PUBLIC ++ $ ++ $ ++) ++ ++target_link_libraries(DBow3 ++ PUBLIC ++ OpenMP::OpenMP_CXX ++) ++ ++if(USE_OPENCV_CONTRIB) ++target_link_libraries(DBow3 ++ PUBLIC ++ ${OpenCV_LIBS} ++) ++ ++target_include_directories(DBow3 ++ PUBLIC ++ ${OpenCV_INCLUDE_DIR} ++) ++endif() ++ ++if(USE_SIMD) ++ target_link_libraries(DBow3 ++ PRIVATE ++ SIMD::SSE4.1 ++ ) ++endif() ++ ++target_compile_definitions(DBow3 ++ PUBLIC ++ NOMINMAX ++ _USE_MATH_DEFINES ++) ++ ++target_compile_features(DBow3 ++ PRIVATE ++ cxx_std_14 ++) ++ ++ ++install(TARGETS DBow3 EXPORT DBow3Targets ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ RUNTIME DESTINATION bin ++ INCLUDES DESTINATION include ++) ++ ++install (DIRECTORY include/ DESTINATION include) ++ ++install(EXPORT DBow3Targets ++ FILE DBow3Targets.cmake ++ NAMESPACE DBow3:: ++ DESTINATION cmake/DBow3 ++) ++ ++include(CMakePackageConfigHelpers) ++ ++write_basic_package_version_file(DBow3ConfigVersion.cmake ++ COMPATIBILITY SameMajorVersion ++) ++ ++install(FILES DBow3Config.cmake ${CMAKE_CURRENT_BINARY_DIR}/DBow3ConfigVersion.cmake ++ DESTINATION cmake/DBow3) +\ No newline at end of file +diff --git a/Lib/DBow3Config.cmake b/Lib/DBow3Config.cmake +new file mode 100644 +index 0000000..9720a14 +--- /dev/null ++++ b/Lib/DBow3Config.cmake +@@ -0,0 +1,4 @@ ++include(CMakeFindDependencyMacro) ++find_dependency(OpenCV) ++find_dependency(OpenMP) ++include("${CMAKE_CURRENT_LIST_DIR}/FbowTargets.cmake") +\ No newline at end of file +diff --git a/src/BowVector.h b/Lib/include/DBow3/BowVector.h +similarity index 99% +rename from src/BowVector.h +rename to Lib/include/DBow3/BowVector.h +index d8c17e0..cdbf517 100644 +--- a/src/BowVector.h ++++ b/Lib/include/DBow3/BowVector.h +@@ -12,6 +12,7 @@ + + #include + #include ++#include + #include "exports.h" + #if _WIN32 + #include +diff --git a/src/DBoW3.h b/Lib/include/DBow3/DBoW3.h +similarity index 100% +rename from src/DBoW3.h +rename to Lib/include/DBow3/DBoW3.h +diff --git a/src/Database.h b/Lib/include/DBow3/Database.h +similarity index 100% +rename from src/Database.h +rename to Lib/include/DBow3/Database.h +diff --git a/src/DescManip.h b/Lib/include/DBow3/DescManip.h +similarity index 100% +rename from src/DescManip.h +rename to Lib/include/DBow3/DescManip.h +diff --git a/src/FeatureVector.h b/Lib/include/DBow3/FeatureVector.h +similarity index 100% +rename from src/FeatureVector.h +rename to Lib/include/DBow3/FeatureVector.h +diff --git a/src/QueryResults.h b/Lib/include/DBow3/QueryResults.h +similarity index 100% +rename from src/QueryResults.h +rename to Lib/include/DBow3/QueryResults.h +diff --git a/src/ScoringObject.h b/Lib/include/DBow3/ScoringObject.h +similarity index 100% +rename from src/ScoringObject.h +rename to Lib/include/DBow3/ScoringObject.h +diff --git a/src/Vocabulary.h b/Lib/include/DBow3/Vocabulary.h +similarity index 100% +rename from src/Vocabulary.h +rename to Lib/include/DBow3/Vocabulary.h +diff --git a/src/exports.h b/Lib/include/DBow3/exports.h +similarity index 78% +rename from src/exports.h +rename to Lib/include/DBow3/exports.h +index c324953..a31b317 100644 +--- a/src/exports.h ++++ b/Lib/include/DBow3/exports.h +@@ -35,17 +35,15 @@ or implied, of Rafael Muñoz Salinas. + #define _CRT_SECURE_NO_DEPRECATE /* to avoid multiple Visual Studio 2005 warnings */ + #endif + +-#if (defined WIN32 || defined _WIN32 || defined WINCE) && defined DBOW_DSO_EXPORTS +- #define DBOW_API __declspec(dllexport) +- #pragma warning ( disable : 4251 ) //disable warning to templates with dll linkage. +- #pragma warning ( disable : 4290 ) //disable warning due to exception specifications. +- #pragma warning ( disable : 4996 ) //disable warning regarding unsafe vsprintf. +- #pragma warning ( disable : 4244 ) //disable warning convesions with lost of data. +- ++#ifdef _WIN32 ++# ifdef DBOW_API ++# define DBOW_API __declspec(dllexport) ++# else ++# define DBOW_API __declspec(dllimport) ++# endif + #else +- #define DBOW_API ++# define DBOW_API + #endif + +- + #define DBOW_VERSION "3.0.0" + #endif +diff --git a/src/quicklz.h b/Lib/include/DBow3/quicklz.h +similarity index 100% +rename from src/quicklz.h +rename to Lib/include/DBow3/quicklz.h +diff --git a/src/timers.h b/Lib/include/DBow3/timers.h +similarity index 100% +rename from src/timers.h +rename to Lib/include/DBow3/timers.h +diff --git a/src/BowVector.cpp b/Lib/src/BowVector.cpp +similarity index 99% +rename from src/BowVector.cpp +rename to Lib/src/BowVector.cpp +index d132213..f61d421 100644 +--- a/src/BowVector.cpp ++++ b/Lib/src/BowVector.cpp +@@ -13,7 +13,7 @@ + #include + #include + +-#include "BowVector.h" ++#include "DBow3/BowVector.h" + + namespace DBoW3 { + +diff --git a/src/Database.cpp b/Lib/src/Database.cpp +similarity index 99% +rename from src/Database.cpp +rename to Lib/src/Database.cpp +index d8a1b81..25610a0 100644 +--- a/src/Database.cpp ++++ b/Lib/src/Database.cpp +@@ -1,4 +1,4 @@ +-#include "Database.h" ++#include "DBow3/Database.h" + + namespace DBoW3{ + +diff --git a/src/DescManip.cpp b/Lib/src/DescManip.cpp +similarity index 96% +rename from src/DescManip.cpp +rename to Lib/src/DescManip.cpp +index d6331af..430ce2b 100644 +--- a/src/DescManip.cpp ++++ b/Lib/src/DescManip.cpp +@@ -1,273 +1,273 @@ +-/** +- * File: DescManip.cpp +- * Date: June 2012 +- * Author: Dorian Galvez-Lopez +- * Description: functions for ORB descriptors +- * License: see the LICENSE.txt file +- * +- */ +- +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include "DescManip.h" +- +-using namespace std; +- +-namespace DBoW3 { +- +-// -------------------------------------------------------------------------- +- +-void DescManip::meanValue(const std::vector &descriptors, +- cv::Mat &mean) +-{ +- +- if(descriptors.empty()) return; +- +- if(descriptors.size() == 1) +- { +- mean = descriptors[0].clone(); +- return; +- } +- //binary descriptor +- if (descriptors[0].type()==CV_8U ){ +- //determine number of bytes of the binary descriptor +- int L= getDescSizeBytes( descriptors[0]); +- vector sum( L * 8, 0); +- +- for(size_t i = 0; i < descriptors.size(); ++i) +- { +- const cv::Mat &d = descriptors[i]; +- const unsigned char *p = d.ptr(); +- +- for(int j = 0; j < d.cols; ++j, ++p) +- { +- if(*p & (1 << 7)) ++sum[ j*8 ]; +- if(*p & (1 << 6)) ++sum[ j*8 + 1 ]; +- if(*p & (1 << 5)) ++sum[ j*8 + 2 ]; +- if(*p & (1 << 4)) ++sum[ j*8 + 3 ]; +- if(*p & (1 << 3)) ++sum[ j*8 + 4 ]; +- if(*p & (1 << 2)) ++sum[ j*8 + 5 ]; +- if(*p & (1 << 1)) ++sum[ j*8 + 6 ]; +- if(*p & (1)) ++sum[ j*8 + 7 ]; +- } +- } +- +- mean = cv::Mat::zeros(1, L, CV_8U); +- unsigned char *p = mean.ptr(); +- +- const int N2 = (int)descriptors.size() / 2 + descriptors.size() % 2; +- for(size_t i = 0; i < sum.size(); ++i) +- { +- if(sum[i] >= N2) +- { +- // set bit +- *p |= 1 << (7 - (i % 8)); +- } +- +- if(i % 8 == 7) ++p; +- } +- } +- //non binary descriptor +- else{ +- assert(descriptors[0].type()==CV_32F );//ensure it is float +- +- mean.create(1, descriptors[0].cols,descriptors[0].type()); +- mean.setTo(cv::Scalar::all(0)); +- float inv_s =1./double( descriptors.size()); +- for(size_t i=0;i(); // a & b are actually CV_8U +- pb = b.ptr(); +- +- uint64_t v, ret = 0; +- for(size_t i = 0; i < a.cols / sizeof(uint64_t); ++i, ++pa, ++pb) +- { +- v = *pa ^ *pb; +- v = v - ((v >> 1) & (uint64_t)~(uint64_t)0/3); +- v = (v & (uint64_t)~(uint64_t)0/15*3) + ((v >> 2) & +- (uint64_t)~(uint64_t)0/15*3); +- v = (v + (v >> 4)) & (uint64_t)~(uint64_t)0/255*15; +- ret += (uint64_t)(v * ((uint64_t)~(uint64_t)0/255)) >> +- (sizeof(uint64_t) - 1) * CHAR_BIT; +- } +- +- return ret; +- } +- else{ +- double sqd = 0.; +- assert(a.type()==CV_32F); +- assert(a.rows==1); +- const float *a_ptr=a.ptr(0); +- const float *b_ptr=b.ptr(0); +- for(int i = 0; i < a.cols; i ++) +- sqd += (a_ptr[i ] - b_ptr[i ])*(a_ptr[i ] - b_ptr[i ]); +- return sqd; +- } +-} +- +- +- +- +-// -------------------------------------------------------------------------- +- +-std::string DescManip::toString(const cv::Mat &a) +-{ +- stringstream ss; +- //introduce a magic value to distinguish from DBOw2 +- ss<<"dbw3 "; +- //save size and type +- +- +- ss <(); +- for(int i = 0; i < a.cols; ++i, ++p) +- ss << (int)*p << " "; +- }else{ +- +- const float *p = a.ptr(); +- for(int i = 0; i < a.cols; ++i, ++p) +- ss << *p << " "; +- +- } +- +- return ss.str(); +-} +- +-// -------------------------------------------------------------------------- +- +-void DescManip::fromString(cv::Mat &a, const std::string &s) +-{ +- +- //check if the dbow3 is present +- string ss_aux;ss_aux.reserve(10); +- for(size_t i=0;i<10 && i data;data.reserve(100); +- while( ss>>val) data.push_back(val); +- //copy to a +- a.create(1,data.size(),CV_8UC1); +- memcpy(a.ptr(0),&data[0],data.size()); +- } +- else { +- char szSign[10]; +- int type,cols; +- stringstream ss(s); +- ss >> szSign >> type >> cols; +- a.create(1, cols, type); +- if(type==CV_8UC1){ +- unsigned char *p = a.ptr(); +- int n; +- for(int i = 0; i < a.cols; ++i, ++p) +- if ( ss >> n) *p = (unsigned char)n; +- } +- else{ +- float *p = a.ptr(); +- for(int i = 0; i < a.cols; ++i, ++p) +- if ( !(ss >> *p))cerr<<"Error reading. Unexpected EOF. DescManip::fromString"< &descriptors, +- cv::Mat &mat) +-{ +- if(descriptors.empty()) +- { +- mat.release(); +- return; +- } +- +- if(descriptors[0].type()==CV_8UC1){ +- +- const size_t N = descriptors.size(); +- int L=getDescSizeBytes(descriptors[0]); +- mat.create(N, L*8, CV_32F); +- float *p = mat.ptr(); +- +- for(size_t i = 0; i < N; ++i) +- { +- const int C = descriptors[i].cols; +- const unsigned char *desc = descriptors[i].ptr(); +- +- for(int j = 0; j < C; ++j, p += 8) +- { +- p[0] = (desc[j] & (1 << 7) ? 1 : 0); +- p[1] = (desc[j] & (1 << 6) ? 1 : 0); +- p[2] = (desc[j] & (1 << 5) ? 1 : 0); +- p[3] = (desc[j] & (1 << 4) ? 1 : 0); +- p[4] = (desc[j] & (1 << 3) ? 1 : 0); +- p[5] = (desc[j] & (1 << 2) ? 1 : 0); +- p[6] = (desc[j] & (1 << 1) ? 1 : 0); +- p[7] = desc[j] & (1); +- } +- } +- } +- else{ +- assert(descriptors[0].type()==CV_32F); +- const int N = descriptors.size(); +- int L=descriptors[0].cols; +- mat.create(N, L, CV_32F); +- for(int i = 0; i < N; ++i) +- memcpy(mat.ptr(i),descriptors[i].ptr(0),sizeof(float)*L); +- } +-} +- +-void DescManip::toStream(const cv::Mat &m,std::ostream &str){ +- assert(m.rows==1 || m.isContinuous()); +- int type=m.type(); +- int cols=m.cols; +- int rows=m.rows; +- str.write((char*)&cols,sizeof(cols)); +- str.write((char*)&rows,sizeof(rows)); +- str.write((char*)&type,sizeof(type)); +- str.write((char*)m.ptr(0),m.elemSize()*m.cols); +-} +- +-void DescManip::fromStream(cv::Mat &m,std::istream &str){ +- int type,cols,rows; +- str.read((char*)&cols,sizeof(cols)); +- str.read((char*)&rows,sizeof(rows)); +- str.read((char*)&type,sizeof(type)); +- m.create(rows,cols,type); +- str.read((char*)m.ptr(0),m.elemSize()*m.cols); +-} +- +- +-// -------------------------------------------------------------------------- +- +-} // namespace DBoW3 +- ++/** ++ * File: DescManip.cpp ++ * Date: June 2012 ++ * Author: Dorian Galvez-Lopez ++ * Description: functions for ORB descriptors ++ * License: see the LICENSE.txt file ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "DBow3/DescManip.h" ++ ++using namespace std; ++ ++namespace DBoW3 { ++ ++// -------------------------------------------------------------------------- ++ ++void DescManip::meanValue(const std::vector &descriptors, ++ cv::Mat &mean) ++{ ++ ++ if(descriptors.empty()) return; ++ ++ if(descriptors.size() == 1) ++ { ++ mean = descriptors[0].clone(); ++ return; ++ } ++ //binary descriptor ++ if (descriptors[0].type()==CV_8U ){ ++ //determine number of bytes of the binary descriptor ++ int L= getDescSizeBytes( descriptors[0]); ++ vector sum( L * 8, 0); ++ ++ for(size_t i = 0; i < descriptors.size(); ++i) ++ { ++ const cv::Mat &d = descriptors[i]; ++ const unsigned char *p = d.ptr(); ++ ++ for(int j = 0; j < d.cols; ++j, ++p) ++ { ++ if(*p & (1 << 7)) ++sum[ j*8 ]; ++ if(*p & (1 << 6)) ++sum[ j*8 + 1 ]; ++ if(*p & (1 << 5)) ++sum[ j*8 + 2 ]; ++ if(*p & (1 << 4)) ++sum[ j*8 + 3 ]; ++ if(*p & (1 << 3)) ++sum[ j*8 + 4 ]; ++ if(*p & (1 << 2)) ++sum[ j*8 + 5 ]; ++ if(*p & (1 << 1)) ++sum[ j*8 + 6 ]; ++ if(*p & (1)) ++sum[ j*8 + 7 ]; ++ } ++ } ++ ++ mean = cv::Mat::zeros(1, L, CV_8U); ++ unsigned char *p = mean.ptr(); ++ ++ const int N2 = (int)descriptors.size() / 2 + descriptors.size() % 2; ++ for(size_t i = 0; i < sum.size(); ++i) ++ { ++ if(sum[i] >= N2) ++ { ++ // set bit ++ *p |= 1 << (7 - (i % 8)); ++ } ++ ++ if(i % 8 == 7) ++p; ++ } ++ } ++ //non binary descriptor ++ else{ ++ assert(descriptors[0].type()==CV_32F );//ensure it is float ++ ++ mean.create(1, descriptors[0].cols,descriptors[0].type()); ++ mean.setTo(cv::Scalar::all(0)); ++ float inv_s =1./double( descriptors.size()); ++ for(size_t i=0;i(); // a & b are actually CV_8U ++ pb = b.ptr(); ++ ++ uint64_t v, ret = 0; ++ for(size_t i = 0; i < a.cols / sizeof(uint64_t); ++i, ++pa, ++pb) ++ { ++ v = *pa ^ *pb; ++ v = v - ((v >> 1) & (uint64_t)~(uint64_t)0/3); ++ v = (v & (uint64_t)~(uint64_t)0/15*3) + ((v >> 2) & ++ (uint64_t)~(uint64_t)0/15*3); ++ v = (v + (v >> 4)) & (uint64_t)~(uint64_t)0/255*15; ++ ret += (uint64_t)(v * ((uint64_t)~(uint64_t)0/255)) >> ++ (sizeof(uint64_t) - 1) * CHAR_BIT; ++ } ++ ++ return ret; ++ } ++ else{ ++ double sqd = 0.; ++ assert(a.type()==CV_32F); ++ assert(a.rows==1); ++ const float *a_ptr=a.ptr(0); ++ const float *b_ptr=b.ptr(0); ++ for(int i = 0; i < a.cols; i ++) ++ sqd += (a_ptr[i ] - b_ptr[i ])*(a_ptr[i ] - b_ptr[i ]); ++ return sqd; ++ } ++} ++ ++ ++ ++ ++// -------------------------------------------------------------------------- ++ ++std::string DescManip::toString(const cv::Mat &a) ++{ ++ stringstream ss; ++ //introduce a magic value to distinguish from DBOw2 ++ ss<<"dbw3 "; ++ //save size and type ++ ++ ++ ss <(); ++ for(int i = 0; i < a.cols; ++i, ++p) ++ ss << (int)*p << " "; ++ }else{ ++ ++ const float *p = a.ptr(); ++ for(int i = 0; i < a.cols; ++i, ++p) ++ ss << *p << " "; ++ ++ } ++ ++ return ss.str(); ++} ++ ++// -------------------------------------------------------------------------- ++ ++void DescManip::fromString(cv::Mat &a, const std::string &s) ++{ ++ ++ //check if the dbow3 is present ++ string ss_aux;ss_aux.reserve(10); ++ for(size_t i=0;i<10 && i data;data.reserve(100); ++ while( ss>>val) data.push_back(val); ++ //copy to a ++ a.create(1,data.size(),CV_8UC1); ++ memcpy(a.ptr(0),&data[0],data.size()); ++ } ++ else { ++ char szSign[10]; ++ int type,cols; ++ stringstream ss(s); ++ ss >> szSign >> type >> cols; ++ a.create(1, cols, type); ++ if(type==CV_8UC1){ ++ unsigned char *p = a.ptr(); ++ int n; ++ for(int i = 0; i < a.cols; ++i, ++p) ++ if ( ss >> n) *p = (unsigned char)n; ++ } ++ else{ ++ float *p = a.ptr(); ++ for(int i = 0; i < a.cols; ++i, ++p) ++ if ( !(ss >> *p))cerr<<"Error reading. Unexpected EOF. DescManip::fromString"< &descriptors, ++ cv::Mat &mat) ++{ ++ if(descriptors.empty()) ++ { ++ mat.release(); ++ return; ++ } ++ ++ if(descriptors[0].type()==CV_8UC1){ ++ ++ const size_t N = descriptors.size(); ++ int L=getDescSizeBytes(descriptors[0]); ++ mat.create(N, L*8, CV_32F); ++ float *p = mat.ptr(); ++ ++ for(size_t i = 0; i < N; ++i) ++ { ++ const int C = descriptors[i].cols; ++ const unsigned char *desc = descriptors[i].ptr(); ++ ++ for(int j = 0; j < C; ++j, p += 8) ++ { ++ p[0] = (desc[j] & (1 << 7) ? 1 : 0); ++ p[1] = (desc[j] & (1 << 6) ? 1 : 0); ++ p[2] = (desc[j] & (1 << 5) ? 1 : 0); ++ p[3] = (desc[j] & (1 << 4) ? 1 : 0); ++ p[4] = (desc[j] & (1 << 3) ? 1 : 0); ++ p[5] = (desc[j] & (1 << 2) ? 1 : 0); ++ p[6] = (desc[j] & (1 << 1) ? 1 : 0); ++ p[7] = desc[j] & (1); ++ } ++ } ++ } ++ else{ ++ assert(descriptors[0].type()==CV_32F); ++ const int N = descriptors.size(); ++ int L=descriptors[0].cols; ++ mat.create(N, L, CV_32F); ++ for(int i = 0; i < N; ++i) ++ memcpy(mat.ptr(i),descriptors[i].ptr(0),sizeof(float)*L); ++ } ++} ++ ++void DescManip::toStream(const cv::Mat &m,std::ostream &str){ ++ assert(m.rows==1 || m.isContinuous()); ++ int type=m.type(); ++ int cols=m.cols; ++ int rows=m.rows; ++ str.write((char*)&cols,sizeof(cols)); ++ str.write((char*)&rows,sizeof(rows)); ++ str.write((char*)&type,sizeof(type)); ++ str.write((char*)m.ptr(0),m.elemSize()*m.cols); ++} ++ ++void DescManip::fromStream(cv::Mat &m,std::istream &str){ ++ int type,cols,rows; ++ str.read((char*)&cols,sizeof(cols)); ++ str.read((char*)&rows,sizeof(rows)); ++ str.read((char*)&type,sizeof(type)); ++ m.create(rows,cols,type); ++ str.read((char*)m.ptr(0),m.elemSize()*m.cols); ++} ++ ++ ++// -------------------------------------------------------------------------- ++ ++} // namespace DBoW3 ++ +diff --git a/src/FeatureVector.cpp b/Lib/src/FeatureVector.cpp +similarity index 98% +rename from src/FeatureVector.cpp +rename to Lib/src/FeatureVector.cpp +index 880eab1..a9cd792 100644 +--- a/src/FeatureVector.cpp ++++ b/Lib/src/FeatureVector.cpp +@@ -7,7 +7,7 @@ + * + */ + +-#include "FeatureVector.h" ++#include "DBow3/FeatureVector.h" + #include + #include + #include +diff --git a/src/QueryResults.cpp b/Lib/src/QueryResults.cpp +similarity index 97% +rename from src/QueryResults.cpp +rename to Lib/src/QueryResults.cpp +index 7062400..b852979 100644 +--- a/src/QueryResults.cpp ++++ b/Lib/src/QueryResults.cpp +@@ -9,7 +9,7 @@ + + #include + #include +-#include "QueryResults.h" ++#include "DBow3/QueryResults.h" + + using namespace std; + +diff --git a/src/ScoringObject.cpp b/Lib/src/ScoringObject.cpp +similarity index 99% +rename from src/ScoringObject.cpp +rename to Lib/src/ScoringObject.cpp +index 7cf0812..adde8e9 100644 +--- a/src/ScoringObject.cpp ++++ b/Lib/src/ScoringObject.cpp +@@ -8,8 +8,8 @@ + */ + + #include +-#include "Vocabulary.h" +-#include "BowVector.h" ++#include "DBow3/Vocabulary.h" ++#include "DBow3/BowVector.h" + + using namespace DBoW3; + +diff --git a/src/Vocabulary.cpp b/Lib/src/Vocabulary.cpp +similarity index 99% +rename from src/Vocabulary.cpp +rename to Lib/src/Vocabulary.cpp +index 9f0eff3..6ccbbea 100644 +--- a/src/Vocabulary.cpp ++++ b/Lib/src/Vocabulary.cpp +@@ -1,8 +1,8 @@ +-#include "Vocabulary.h" +-#include "DescManip.h" +-#include "quicklz.h" ++#include "DBow3/Vocabulary.h" ++#include "DBow3/DescManip.h" ++#include "DBow3/quicklz.h" + #include +-#include "timers.h" ++#include "DBow3/timers.h" + namespace DBoW3{ + // -------------------------------------------------------------------------- + +diff --git a/src/quicklz.c b/Lib/src/quicklz.c +similarity index 99% +rename from src/quicklz.c +rename to Lib/src/quicklz.c +index 3742129..bd3cb11 100644 +--- a/src/quicklz.c ++++ b/Lib/src/quicklz.c +@@ -9,7 +9,7 @@ + + // 1.5.0 final + +-#include "quicklz.h" ++#include "DBow3/quicklz.h" + + #if QLZ_VERSION_MAJOR != 1 || QLZ_VERSION_MINOR != 5 || QLZ_VERSION_REVISION != 0 + #error quicklz.c and quicklz.h have different versions +diff --git a/cmake/instructionSet.cmake b/cmake/instructionSet.cmake +new file mode 100644 +index 0000000..d0febeb +--- /dev/null ++++ b/cmake/instructionSet.cmake +@@ -0,0 +1,13 @@ ++add_library( ++ SSE4.1 ++ INTERFACE ++) ++ ++add_library(SIMD::SSE4.1 ALIAS SSE4.1) ++ ++target_compile_options( ++ SSE4.1 ++ INTERFACE ++ $<$:-msse4.1;-march=native> ++ $<$:/arch:AVX2> ++) +diff --git a/cmake_uninstall.cmake.in b/cmake_uninstall.cmake.in +deleted file mode 100644 +index 81482da..0000000 +--- a/cmake_uninstall.cmake.in ++++ /dev/null +@@ -1,28 +0,0 @@ +-# ----------------------------------------------- +-# File that provides "make uninstall" target +-# We use the file 'install_manifest.txt' +-# ----------------------------------------------- +-IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") +- MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") +-ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") +- +-FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) +-STRING(REGEX REPLACE "\n" ";" files "${files}") +-FOREACH(file ${files}) +- MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") +-# IF(EXISTS "$ENV{DESTDIR}${file}") +-# EXEC_PROGRAM( +-# "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" +-# OUTPUT_VARIABLE rm_out +-# RETURN_VALUE rm_retval +-# ) +- EXECUTE_PROCESS(COMMAND rm $ENV{DESTDIR}${file}) +-# IF(NOT "${rm_retval}" STREQUAL 0) +-# MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") +-# ENDIF(NOT "${rm_retval}" STREQUAL 0) +-# ELSE(EXISTS "$ENV{DESTDIR}${file}") +-# MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") +-# ENDIF(EXISTS "$ENV{DESTDIR}${file}") +-ENDFOREACH(file) +- +- +diff --git a/config.cmake.in b/config.cmake.in +deleted file mode 100644 +index 9d15feb..0000000 +--- a/config.cmake.in ++++ /dev/null +@@ -1,36 +0,0 @@ +-# =================================================================================== +-# @PROJECT_NAME@ CMake configuration file +-# +-# ** File generated automatically, do not modify ** +-# +-# Usage from an external project: +-# In your CMakeLists.txt, add these lines: +-# +-# FIND_PACKAGE(@PROJECT_NAME@ REQUIRED ) +-# TARGET_LINK_LIBRARIES(MY_TARGET_NAME ${@PROJECT_NAME@_LIBS}) +-# +-# This file will define the following variables: +-# - @PROJECT_NAME@_LIBS : The list of libraries to links against. +-# - @PROJECT_NAME@_LIB_DIR : The directory where lib files are. Calling LINK_DIRECTORIES +-# with this path is NOT needed. +-# - @PROJECT_NAME@_VERSION : The version of this PROJECT_NAME build. Example: "1.2.0" +-# - @PROJECT_NAME@_VERSION_MAJOR : Major version part of VERSION. Example: "1" +-# - @PROJECT_NAME@_VERSION_MINOR : Minor version part of VERSION. Example: "2" +-# - @PROJECT_NAME@_VERSION_PATCH : Patch version part of VERSION. Example: "0" +-# +-# =================================================================================== +-INCLUDE_DIRECTORIES("@CMAKE_INSTALL_PREFIX@/include") +-SET(@PROJECT_NAME@_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include") +- +-LINK_DIRECTORIES("@CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@") +-SET(@PROJECT_NAME@_LIB_DIR "@CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@") +- +-SET(@PROJECT_NAME@_LIBS @REQUIRED_LIBRARIES@ @PROJECT_NAME@@PROJECT_DLLVERSION@) +-SET(@PROJECT_NAME@_LIBRARIES @REQUIRED_LIBRARIES@ @PROJECT_NAME@@PROJECT_DLLVERSION@) +- +-SET(@PROJECT_NAME@_FOUND YES) +-SET(@PROJECT_NAME@_FOUND "YES") +-SET(@PROJECT_NAME@_VERSION @PROJECT_VERSION@) +-SET(@PROJECT_NAME@_VERSION_MAJOR @PROJECT_VERSION_MAJOR@) +-SET(@PROJECT_NAME@_VERSION_MINOR @PROJECT_VERSION_MINOR@) +-SET(@PROJECT_NAME@_VERSION_PATCH @PROJECT_VERSION_PATCH@) +diff --git a/utils/CMakeLists.txt b/examples/CMakeLists.txt +similarity index 100% +rename from utils/CMakeLists.txt +rename to examples/CMakeLists.txt +diff --git a/utils/create_voc_step0.cpp b/examples/create_voc_step0.cpp +similarity index 97% +rename from utils/create_voc_step0.cpp +rename to examples/create_voc_step0.cpp +index 4fd78f6..c48a3c4 100644 +--- a/utils/create_voc_step0.cpp ++++ b/examples/create_voc_step0.cpp +@@ -1,126 +1,126 @@ +- +-//First step of creating a vocabulary is extracting features from a set of images. We save them to a file for next step +-#include +-#include +- +-// DBoW3 +-#include "DBoW3.h" +- +-// OpenCV +-#include +-#include +-#include +-#ifdef USE_CONTRIB +-#include +-#include +-#endif +-#include "DescManip.h" +- +-using namespace DBoW3; +-using namespace std; +- +- +-//command line parser +-class CmdLineParser{int argc; char **argv; public: CmdLineParser(int _argc,char **_argv):argc(_argc),argv(_argv){} bool operator[] ( string param ) {int idx=-1; for ( int i=0; i readImagePaths(int argc,char **argv,int start){ +- vector paths; +- for(int i=start;i loadFeatures( std::vector path_to_images,string descriptor="") throw (std::exception){ +- //select detector +- cv::Ptr fdetector; +- if (descriptor=="orb") fdetector=cv::ORB::create(); +- else if (descriptor=="brisk") fdetector=cv::BRISK::create(); +-#ifdef OPENCV_VERSION_3 +- else if (descriptor=="akaze") fdetector=cv::AKAZE::create(); +-#endif +-#ifdef USE_CONTRIB +- else if(descriptor=="surf" ) fdetector=cv::xfeatures2d::SURF::create(400, 4, 2, EXTENDED_SURF); +-#endif +- +- else throw std::runtime_error("Invalid descriptor"); +- assert(!descriptor.empty()); +- vector features; +- +- +- cout << "Extracting features..." << endl; +- for(size_t i = 0; i < path_to_images.size(); ++i) +- { +- vector keypoints; +- cv::Mat descriptors; +- cout<<"reading image: "<detectAndCompute(image, cv::Mat(), keypoints, descriptors); +- features.push_back(descriptors); +- cout<<"done detecting features"< &features){ +- +- //test it is not created +- std::ifstream ifile(filename); +- if (ifile.is_open()){cerr<<"ERROR::: Output File "<(0),f.total()*f.elemSize()); +- } +-} +- +-// ---------------------------------------------------------------------------- +- +-int main(int argc,char **argv) +-{ +- +- try{ +- CmdLineParser cml(argc,argv); +- if (cml["-h"] || argc==1){ +- cerr<<"Usage: descriptor_name output image0 image1 ... \n\t descriptors:brisk,surf,orb(default),akaze(only if using opencv 3)"< features= loadFeatures(images,descriptor); +- +- //save features to file +- saveToFile(argv[2],features); +- +- }catch(std::exception &ex){ +- cerr< ++#include ++ ++// DBoW3 ++#include "DBoW3.h" ++ ++// OpenCV ++#include ++#include ++#include ++#ifdef USE_CONTRIB ++#include ++#include ++#endif ++#include "DescManip.h" ++ ++using namespace DBoW3; ++using namespace std; ++ ++ ++//command line parser ++class CmdLineParser{int argc; char **argv; public: CmdLineParser(int _argc,char **_argv):argc(_argc),argv(_argv){} bool operator[] ( string param ) {int idx=-1; for ( int i=0; i readImagePaths(int argc,char **argv,int start){ ++ vector paths; ++ for(int i=start;i loadFeatures( std::vector path_to_images,string descriptor="") throw (std::exception){ ++ //select detector ++ cv::Ptr fdetector; ++ if (descriptor=="orb") fdetector=cv::ORB::create(); ++ else if (descriptor=="brisk") fdetector=cv::BRISK::create(); ++#ifdef OPENCV_VERSION_3 ++ else if (descriptor=="akaze") fdetector=cv::AKAZE::create(); ++#endif ++#ifdef USE_CONTRIB ++ else if(descriptor=="surf" ) fdetector=cv::xfeatures2d::SURF::create(400, 4, 2, EXTENDED_SURF); ++#endif ++ ++ else throw std::runtime_error("Invalid descriptor"); ++ assert(!descriptor.empty()); ++ vector features; ++ ++ ++ cout << "Extracting features..." << endl; ++ for(size_t i = 0; i < path_to_images.size(); ++i) ++ { ++ vector keypoints; ++ cv::Mat descriptors; ++ cout<<"reading image: "<detectAndCompute(image, cv::Mat(), keypoints, descriptors); ++ features.push_back(descriptors); ++ cout<<"done detecting features"< &features){ ++ ++ //test it is not created ++ std::ifstream ifile(filename); ++ if (ifile.is_open()){cerr<<"ERROR::: Output File "<(0),f.total()*f.elemSize()); ++ } ++} ++ ++// ---------------------------------------------------------------------------- ++ ++int main(int argc,char **argv) ++{ ++ ++ try{ ++ CmdLineParser cml(argc,argv); ++ if (cml["-h"] || argc==1){ ++ cerr<<"Usage: descriptor_name output image0 image1 ... \n\t descriptors:brisk,surf,orb(default),akaze(only if using opencv 3)"< features= loadFeatures(images,descriptor); ++ ++ //save features to file ++ saveToFile(argv[2],features); ++ ++ }catch(std::exception &ex){ ++ cerr< +-#include +- +-// DBoW3 +-#include "DBoW3.h" +- +-// OpenCV +-#include +-using namespace DBoW3; +-using namespace std; +- +-//command line parser +-class CmdLineParser{int argc; char **argv; public: CmdLineParser(int _argc,char **_argv):argc(_argc),argv(_argv){} bool operator[] ( string param ) {int idx=-1; for ( int i=0; i readFeaturesFromFile(string filename){ +-vector features; +- //test it is not created +- std::ifstream ifile(filename); +- if (!ifile.is_open()){cerr<<"could not open input file"<(0),features[i].total()*features[i].elemSize()); +- } +- return features; +-} +- +-// ---------------------------------------------------------------------------- +- +-int main(int argc,char **argv) +-{ +- +- try{ +- CmdLineParser cml(argc,argv); +- if (cml["-h"] || argc!=3){ +- cerr<<"Usage: features output_voc.yml[.gz]"< ++#include ++ ++// DBoW3 ++#include "DBoW3.h" ++ ++// OpenCV ++#include ++using namespace DBoW3; ++using namespace std; ++ ++//command line parser ++class CmdLineParser{int argc; char **argv; public: CmdLineParser(int _argc,char **_argv):argc(_argc),argv(_argv){} bool operator[] ( string param ) {int idx=-1; for ( int i=0; i readFeaturesFromFile(string filename){ ++vector features; ++ //test it is not created ++ std::ifstream ifile(filename); ++ if (!ifile.is_open()){cerr<<"could not open input file"<(0),features[i].total()*features[i].elemSize()); ++ } ++ return features; ++} ++ ++// ---------------------------------------------------------------------------- ++ ++int main(int argc,char **argv) ++{ ++ ++ try{ ++ CmdLineParser cml(argc,argv); ++ if (cml["-h"] || argc!=3){ ++ cerr<<"Usage: features output_voc.yml[.gz]"< +-#include +- +-// DBoW3 +-#include "DBoW3.h" +- +-// OpenCV +-#include +-#include +-#include +-#ifdef USE_CONTRIB +-#include +-#include +-#endif +-#include "DescManip.h" +- +-using namespace DBoW3; +-using namespace std; +- +- +-//command line parser +-class CmdLineParser{int argc; char **argv; public: CmdLineParser(int _argc,char **_argv):argc(_argc),argv(_argv){} bool operator[] ( string param ) {int idx=-1; for ( int i=0; i readImagePaths(int argc,char **argv,int start){ +- vector paths; +- for(int i=start;i loadFeatures( std::vector path_to_images,string descriptor="") throw (std::exception){ +- //select detector +- cv::Ptr fdetector; +- if (descriptor=="orb") fdetector=cv::ORB::create(); +- else if (descriptor=="brisk") fdetector=cv::BRISK::create(); +-#ifdef OPENCV_VERSION_3 +- else if (descriptor=="akaze") fdetector=cv::AKAZE::create(); +-#endif +-#ifdef USE_CONTRIB +- else if(descriptor=="surf" ) fdetector=cv::xfeatures2d::SURF::create(400, 4, 2, EXTENDED_SURF); +-#endif +- +- else throw std::runtime_error("Invalid descriptor"); +- assert(!descriptor.empty()); +- vector features; +- +- +- cout << "Extracting features..." << endl; +- for(size_t i = 0; i < path_to_images.size(); ++i) +- { +- vector keypoints; +- cv::Mat descriptors; +- cout<<"reading image: "<detectAndCompute(image, cv::Mat(), keypoints, descriptors); +- features.push_back(descriptors); +- cout<<"done detecting features"< &features) +-{ +- // branching factor and depth levels +- const int k = 9; +- const int L = 3; +- const WeightingType weight = TF_IDF; +- const ScoringType score = L1_NORM; +- +- DBoW3::Vocabulary voc(k, L, weight, score); +- +- cout << "Creating a small " << k << "^" << L << " vocabulary..." << endl; +- voc.create(features); +- cout << "... done!" << endl; +- +- cout << "Vocabulary information: " << endl +- << voc << endl << endl; +- +- // lets do something with this vocabulary +- cout << "Matching images against themselves (0 low, 1 high): " << endl; +- BowVector v1, v2; +- for(size_t i = 0; i < features.size(); i++) +- { +- voc.transform(features[i], v1); +- for(size_t j = 0; j < features.size(); j++) +- { +- voc.transform(features[j], v2); +- +- double score = voc.score(v1, v2); +- cout << "Image " << i << " vs Image " << j << ": " << score << endl; +- } +- } +- +- // save the vocabulary to disk +- cout << endl << "Saving vocabulary..." << endl; +- voc.save("small_voc.yml.gz"); +- cout << "Done" << endl; +-} +- +-////// ---------------------------------------------------------------------------- +- +-void testDatabase(const vector &features) +-{ +- cout << "Creating a small database..." << endl; +- +- // load the vocabulary from disk +- Vocabulary voc("small_voc.yml.gz"); +- +- Database db(voc, false, 0); // false = do not use direct index +- // (so ignore the last param) +- // The direct index is useful if we want to retrieve the features that +- // belong to some vocabulary node. +- // db creates a copy of the vocabulary, we may get rid of "voc" now +- +- // add images to the database +- for(size_t i = 0; i < features.size(); i++) +- db.add(features[i]); +- +- cout << "... done!" << endl; +- +- cout << "Database information: " << endl << db << endl; +- +- // and query the database +- cout << "Querying the database: " << endl; +- +- QueryResults ret; +- for(size_t i = 0; i < features.size(); i++) +- { +- db.query(features[i], ret, 4); +- +- // ret[0] is always the same image in this case, because we added it to the +- // database. ret[1] is the second best match. +- +- cout << "Searching for Image " << i << ". " << ret << endl; +- } +- +- cout << endl; +- +- // we can save the database. The created file includes the vocabulary +- // and the entries added +- cout << "Saving database..." << endl; +- db.save("small_db.yml.gz"); +- cout << "... done!" << endl; +- +- // once saved, we can load it again +- cout << "Retrieving database once again..." << endl; +- Database db2("small_db.yml.gz"); +- cout << "... done! This is: " << endl << db2 << endl; +-} +- +- +-// ---------------------------------------------------------------------------- +- +-int main(int argc,char **argv) +-{ +- +- try{ +- CmdLineParser cml(argc,argv); +- if (cml["-h"] || argc<=2){ +- cerr<<"Usage: descriptor_name image0 image1 ... \n\t descriptors:brisk,surf,orb ,akaze(only if using opencv 3)"< features= loadFeatures(images,descriptor); +- testVocCreation(features); +- +- +- testDatabase(features); +- +- }catch(std::exception &ex){ +- cerr< ++#include ++ ++// DBoW3 ++#include "DBoW3.h" ++ ++// OpenCV ++#include ++#include ++#include ++#ifdef USE_CONTRIB ++#include ++#include ++#endif ++#include "DescManip.h" ++ ++using namespace DBoW3; ++using namespace std; ++ ++ ++//command line parser ++class CmdLineParser{int argc; char **argv; public: CmdLineParser(int _argc,char **_argv):argc(_argc),argv(_argv){} bool operator[] ( string param ) {int idx=-1; for ( int i=0; i readImagePaths(int argc,char **argv,int start){ ++ vector paths; ++ for(int i=start;i loadFeatures( std::vector path_to_images,string descriptor="") throw (std::exception){ ++ //select detector ++ cv::Ptr fdetector; ++ if (descriptor=="orb") fdetector=cv::ORB::create(); ++ else if (descriptor=="brisk") fdetector=cv::BRISK::create(); ++#ifdef OPENCV_VERSION_3 ++ else if (descriptor=="akaze") fdetector=cv::AKAZE::create(); ++#endif ++#ifdef USE_CONTRIB ++ else if(descriptor=="surf" ) fdetector=cv::xfeatures2d::SURF::create(400, 4, 2, EXTENDED_SURF); ++#endif ++ ++ else throw std::runtime_error("Invalid descriptor"); ++ assert(!descriptor.empty()); ++ vector features; ++ ++ ++ cout << "Extracting features..." << endl; ++ for(size_t i = 0; i < path_to_images.size(); ++i) ++ { ++ vector keypoints; ++ cv::Mat descriptors; ++ cout<<"reading image: "<detectAndCompute(image, cv::Mat(), keypoints, descriptors); ++ features.push_back(descriptors); ++ cout<<"done detecting features"< &features) ++{ ++ // branching factor and depth levels ++ const int k = 9; ++ const int L = 3; ++ const WeightingType weight = TF_IDF; ++ const ScoringType score = L1_NORM; ++ ++ DBoW3::Vocabulary voc(k, L, weight, score); ++ ++ cout << "Creating a small " << k << "^" << L << " vocabulary..." << endl; ++ voc.create(features); ++ cout << "... done!" << endl; ++ ++ cout << "Vocabulary information: " << endl ++ << voc << endl << endl; ++ ++ // lets do something with this vocabulary ++ cout << "Matching images against themselves (0 low, 1 high): " << endl; ++ BowVector v1, v2; ++ for(size_t i = 0; i < features.size(); i++) ++ { ++ voc.transform(features[i], v1); ++ for(size_t j = 0; j < features.size(); j++) ++ { ++ voc.transform(features[j], v2); ++ ++ double score = voc.score(v1, v2); ++ cout << "Image " << i << " vs Image " << j << ": " << score << endl; ++ } ++ } ++ ++ // save the vocabulary to disk ++ cout << endl << "Saving vocabulary..." << endl; ++ voc.save("small_voc.yml.gz"); ++ cout << "Done" << endl; ++} ++ ++////// ---------------------------------------------------------------------------- ++ ++void testDatabase(const vector &features) ++{ ++ cout << "Creating a small database..." << endl; ++ ++ // load the vocabulary from disk ++ Vocabulary voc("small_voc.yml.gz"); ++ ++ Database db(voc, false, 0); // false = do not use direct index ++ // (so ignore the last param) ++ // The direct index is useful if we want to retrieve the features that ++ // belong to some vocabulary node. ++ // db creates a copy of the vocabulary, we may get rid of "voc" now ++ ++ // add images to the database ++ for(size_t i = 0; i < features.size(); i++) ++ db.add(features[i]); ++ ++ cout << "... done!" << endl; ++ ++ cout << "Database information: " << endl << db << endl; ++ ++ // and query the database ++ cout << "Querying the database: " << endl; ++ ++ QueryResults ret; ++ for(size_t i = 0; i < features.size(); i++) ++ { ++ db.query(features[i], ret, 4); ++ ++ // ret[0] is always the same image in this case, because we added it to the ++ // database. ret[1] is the second best match. ++ ++ cout << "Searching for Image " << i << ". " << ret << endl; ++ } ++ ++ cout << endl; ++ ++ // we can save the database. The created file includes the vocabulary ++ // and the entries added ++ cout << "Saving database..." << endl; ++ db.save("small_db.yml.gz"); ++ cout << "... done!" << endl; ++ ++ // once saved, we can load it again ++ cout << "Retrieving database once again..." << endl; ++ Database db2("small_db.yml.gz"); ++ cout << "... done! This is: " << endl << db2 << endl; ++} ++ ++ ++// ---------------------------------------------------------------------------- ++ ++int main(int argc,char **argv) ++{ ++ ++ try{ ++ CmdLineParser cml(argc,argv); ++ if (cml["-h"] || argc<=2){ ++ cerr<<"Usage: descriptor_name image0 image1 ... \n\t descriptors:brisk,surf,orb ,akaze(only if using opencv 3)"< features= loadFeatures(images,descriptor); ++ testVocCreation(features); ++ ++ ++ testDatabase(features); ++ ++ }catch(std::exception &ex){ ++ cerr< +Date: Thu, 15 Aug 2019 14:00:28 +0200 +Subject: [PATCH 2/2] Fix DBow3Config.cmake + +--- + Lib/DBow3Config.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Lib/DBow3Config.cmake b/Lib/DBow3Config.cmake +index 9720a14..da63d5e 100644 +--- a/Lib/DBow3Config.cmake ++++ b/Lib/DBow3Config.cmake +@@ -1,4 +1,4 @@ + include(CMakeFindDependencyMacro) + find_dependency(OpenCV) + find_dependency(OpenMP) +-include("${CMAKE_CURRENT_LIST_DIR}/FbowTargets.cmake") +\ No newline at end of file ++include("${CMAKE_CURRENT_LIST_DIR}/DBow3Targets.cmake") +\ No newline at end of file diff --git a/vcpkg/ports/dbow3/portfile.cmake b/vcpkg/ports/dbow3/portfile.cmake new file mode 100644 index 0000000..d867dd5 --- /dev/null +++ b/vcpkg/ports/dbow3/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +#the port produces some empty dlls when building shared libraries, since some components do not export anything, breaking the internal build itself +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rmsalinas/DBow3 + REF master + SHA512 16e6789b77e8b42428d156ae5efa667861fa8ef2e85b54e3dd1d28e6f8dc7d119e973234c77cac82e775080fb9c859640d04159659a7d63941325e13e40b2814 + PATCHES + fix_cmake.patch +) + + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DUSE_SIMD=ON + -DUSE_OPENCV_CONTRIB=ON + -DBUILD_EXAMPLES=OFF + -DBUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake/DBow3) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL + ${SOURCE_PATH}/LICENSE.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/DBow3 RENAME copyright) +vcpkg_copy_pdbs() \ No newline at end of file diff --git a/vcpkg/ports/dcmtk/CONTROL b/vcpkg/ports/dcmtk/CONTROL new file mode 100644 index 0000000..4d8698b --- /dev/null +++ b/vcpkg/ports/dcmtk/CONTROL @@ -0,0 +1,3 @@ +Source: dcmtk +Version: 3.6.5+_20191213 +Description: This DICOM ToolKit (DCMTK) package consists of source code, documentation and installation instructions for a set of software libraries and applications implementing part of the DICOM/MEDICOM Standard. diff --git a/vcpkg/ports/dcmtk/dcmtk.patch b/vcpkg/ports/dcmtk/dcmtk.patch new file mode 100644 index 0000000..cca14e2 --- /dev/null +++ b/vcpkg/ports/dcmtk/dcmtk.patch @@ -0,0 +1,16 @@ +diff --git a/CMake/dcmtkPrepare.cmake b/CMake/dcmtkPrepare.cmake +index e9f77b5..4f7ebe3 100644 +--- a/CMake/dcmtkPrepare.cmake ++++ b/CMake/dcmtkPrepare.cmake +@@ -192,9 +192,9 @@ include(GNUInstallDirs) + # CMake's files (DCMTKTarget.cmake, DCMTKConfigVersion.cmake and DCMTKConfig.cmake) are installed + # to different installation paths under Unix- and Windows-based systems + if(UNIX) +- set(DCMTK_INSTALL_CMKDIR "${CMAKE_INSTALL_LIBDIR}/cmake/dcmtk") ++ SET(DCMTK_INSTALL_CMKDIR "share/dcmtk") + elseif(WIN32) +- set(DCMTK_INSTALL_CMKDIR "cmake") ++ SET(DCMTK_INSTALL_CMKDIR "share/dcmtk") + endif() + + #----------------------------------------------------------------------------- diff --git a/vcpkg/ports/dcmtk/portfile.cmake b/vcpkg/ports/dcmtk/portfile.cmake new file mode 100644 index 0000000..975b33b --- /dev/null +++ b/vcpkg/ports/dcmtk/portfile.cmake @@ -0,0 +1,48 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO DCMTK/dcmtk + REF 8eda253d9b7526498c2f6badb3acc695da808b49 # DCMTK-3.6.5+_20191213 + SHA512 d0b716bb40a10872d3e4bc0e42c8ff8800038b2f11b169fd15e23a621f70433e9e70ec98879ebfcbfc01c6daf7a033f4b6b80ed7ada0357559594dce66742481 + HEAD_REF master + PATCHES ${CMAKE_CURRENT_LIST_DIR}/dcmtk.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DDCMTK_WITH_DOXYGEN=OFF + -DDCMTK_WITH_ZLIB=OFF + -DDCMTK_WITH_OPENSSL=OFF + -DDCMTK_WITH_PNG=OFF + -DDCMTK_WITH_TIFF=OFF + -DDCMTK_WITH_XML=OFF + -DDCMTK_WITH_ICONV=OFF + -DDCMTK_FORCE_FPIC_ON_UNIX=ON + -DDCMTK_OVERWRITE_WIN32_COMPILER_FLAGS=OFF + -DDCMTK_ENABLE_BUILTIN_DICTIONARY=ON + -DDCMTK_ENABLE_PRIVATE_TAGS=ON + -DBUILD_APPS=OFF + -DDCMTK_ENABLE_CXX11=ON + -DDCMTK_WIDE_CHAR_FILE_IO_FUNCTIONS=ON + -DDCMTK_WIDE_CHAR_MAIN_FUNCTION=ON + -DCMAKE_DEBUG_POSTFIX=d + OPTIONS_DEBUG + -DINSTALL_HEADERS=OFF + -DINSTALL_OTHER=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/dcmtk RENAME copyright) diff --git a/vcpkg/ports/decimal-for-cpp/CONTROL b/vcpkg/ports/decimal-for-cpp/CONTROL new file mode 100644 index 0000000..9cf6554 --- /dev/null +++ b/vcpkg/ports/decimal-for-cpp/CONTROL @@ -0,0 +1,5 @@ +Source: decimal-for-cpp +Version: 1.16 +Port-Version: 1 +Description: Decimal data type support, for COBOL-like fixed-point operations on currency values. + diff --git a/vcpkg/ports/decimal-for-cpp/portfile.cmake b/vcpkg/ports/decimal-for-cpp/portfile.cmake new file mode 100644 index 0000000..cbb464a --- /dev/null +++ b/vcpkg/ports/decimal-for-cpp/portfile.cmake @@ -0,0 +1,11 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO vpiotr/decimal_for_cpp + REF 375633343aa0af812a3ebf4bd06adaeff112ead4 + SHA512 7692fbb1643ed77b0b44fee1cf9a603fa257a5cf64ea66193c571fca61d138c6465a359db21955a4e2a234677f1806d47e05811daf2954004b108e09d3c8d4fa + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/include/decimal.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/decimal-for-cpp) +file(COPY ${SOURCE_PATH}/doc/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/decimal-for-cpp) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/decimal-for-cpp/license.txt ${CURRENT_PACKAGES_DIR}/share/decimal-for-cpp/copyright) diff --git a/vcpkg/ports/detours/CONTROL b/vcpkg/ports/detours/CONTROL new file mode 100644 index 0000000..fdf9fa6 --- /dev/null +++ b/vcpkg/ports/detours/CONTROL @@ -0,0 +1,3 @@ +Source: detours +Version: 4.0.1-1 +Description: Detours is a software package for monitoring and instrumenting API calls on Windows. \ No newline at end of file diff --git a/vcpkg/ports/detours/find-jmp-bounds-arm64.patch b/vcpkg/ports/detours/find-jmp-bounds-arm64.patch new file mode 100644 index 0000000..21390ce --- /dev/null +++ b/vcpkg/ports/detours/find-jmp-bounds-arm64.patch @@ -0,0 +1,24 @@ +diff --git a/src/detours.cpp b/src/detours.cpp +index 8345c4d..3cd0e9d 100644 +--- a/src/detours.cpp ++++ b/src/detours.cpp +@@ -974,6 +974,19 @@ inline PBYTE detour_skip_jmp(PBYTE pbCode, PVOID *ppGlobals) + return pbCode; + } + ++inline void detour_find_jmp_bounds(PBYTE pbCode, ++ PDETOUR_TRAMPOLINE *ppLower, ++ PDETOUR_TRAMPOLINE *ppUpper) ++{ ++ // We have to place trampolines within +/- 2GB of code. ++ ULONG_PTR lo = detour_2gb_below((ULONG_PTR)pbCode); ++ ULONG_PTR hi = detour_2gb_above((ULONG_PTR)pbCode); ++ DETOUR_TRACE(("[%p..%p..%p]\n", lo, pbCode, hi)); ++ ++ *ppLower = (PDETOUR_TRAMPOLINE)lo; ++ *ppUpper = (PDETOUR_TRAMPOLINE)hi; ++} ++ + inline BOOL detour_does_code_end_function(PBYTE pbCode) + { + ULONG Opcode = fetch_opcode(pbCode); diff --git a/vcpkg/ports/detours/portfile.cmake b/vcpkg/ports/detours/portfile.cmake new file mode 100644 index 0000000..5e685a4 --- /dev/null +++ b/vcpkg/ports/detours/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO microsoft/Detours + REF v4.0.1 + SHA512 0a9c21b8222329add2de190d2e94d99195dfa55de5a914b75d380ffe0fb787b12e016d0723ca821001af0168fd1643ffd2455298bf3de5fdc155b3393a3ccc87 + HEAD_REF master + PATCHES + find-jmp-bounds-arm64.patch +) + +vcpkg_build_nmake( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH "src" + PROJECT_NAME "Makefile" + OPTIONS "PROCESSOR_ARCHITECTURE=${VCPKG_TARGET_ARCHITECTURE}" + NO_DEBUG +) + +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/lib.${VCPKG_TARGET_ARCHITECTURE}/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/lib.${VCPKG_TARGET_ARCHITECTURE}/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/include DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME detours) + +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/devicenameresolver/CMakeLists.txt b/vcpkg/ports/devicenameresolver/CMakeLists.txt new file mode 100644 index 0000000..64adad4 --- /dev/null +++ b/vcpkg/ports/devicenameresolver/CMakeLists.txt @@ -0,0 +1,23 @@ +cmake_minimum_required(VERSION 3.8.0) +project(DeviceNameResolver CXX) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 /DUNICODE /D_UNICODE -D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS -D_CRT_SECURE_NO_WARNINGS -DNOMINMAX) +endif() + +include_directories(.) + +file(GLOB DeviceNameResolver_srcs "*.cpp") + +add_library(DeviceNameResolver ${DeviceNameResolver_srcs}) + +install( + TARGETS DeviceNameResolver + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES DeviceNameResolver.h DESTINATION include) +endif() diff --git a/vcpkg/ports/devicenameresolver/CONTROL b/vcpkg/ports/devicenameresolver/CONTROL new file mode 100644 index 0000000..1accbf8 --- /dev/null +++ b/vcpkg/ports/devicenameresolver/CONTROL @@ -0,0 +1,3 @@ +Source: devicenameresolver +Version: 2016-06-26-0850d88fa6-1 +Description: a little library that resolves a path from a (virtual) device name. diff --git a/vcpkg/ports/devicenameresolver/add-string-headfile.patch b/vcpkg/ports/devicenameresolver/add-string-headfile.patch new file mode 100644 index 0000000..da78f22 --- /dev/null +++ b/vcpkg/ports/devicenameresolver/add-string-headfile.patch @@ -0,0 +1,12 @@ +diff --git a/NativeWinApi.h b/NativeWinApi.h +index 63fced1..582306b 100644 +--- a/NativeWinApi.h ++++ b/NativeWinApi.h +@@ -1,6 +1,7 @@ + #pragma once + + #include ++#include + + #define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS)0xC0000004L) + #define STATUS_SUCCESS ((NTSTATUS)0x00000000L) diff --git a/vcpkg/ports/devicenameresolver/portfile.cmake b/vcpkg/ports/devicenameresolver/portfile.cmake new file mode 100644 index 0000000..743da3e --- /dev/null +++ b/vcpkg/ports/devicenameresolver/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_bitbucket( + OUT_SOURCE_PATH SOURCE_PATH + REPO mrexodia/devicenameresolver + REF 0850d88fa6a759d79b3c859933870d9aa602aa79 + SHA512 9161411d3c8c17f49f5ff9482a007a6608872c948ef856aa7076a45c246e8d777e4cd6b54169d9c1b9e99e7b383436e1a084e168fafff1ca5f2b28260bac1452 + HEAD_REF master + PATCHES add-string-headfile.patch +) + +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() +vcpkg_copy_pdbs() + +file(READ ${CURRENT_PACKAGES_DIR}/include/DeviceNameResolver.h _contents) +string(REPLACE "__declspec(dllexport)" "" _contents "${_contents}") +file(WRITE ${CURRENT_PACKAGES_DIR}/include/DeviceNameResolver.h "${_contents}") + +file(INSTALL ${SOURCE_PATH}/readme.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/devicenameresolver RENAME copyright) diff --git a/vcpkg/ports/devil/0001_fix-encoding.patch b/vcpkg/ports/devil/0001_fix-encoding.patch new file mode 100644 index 0000000..59d826d --- /dev/null +++ b/vcpkg/ports/devil/0001_fix-encoding.patch @@ -0,0 +1,173 @@ +diff --git a/DevIL/src-ILU/include/ilu_error/ilu_err-french.h b/DevIL/src-ILU/include/ilu_error/ilu_err-french.h +index d3b280d..445440e 100644 +--- a/DevIL/src-ILU/include/ilu_error/ilu_err-french.h ++++ b/DevIL/src-ILU/include/ilu_error/ilu_err-french.h +@@ -17,19 +17,19 @@ + #include "ilu_internal.h" + + ILconst_string iluErrorStringsFrench[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = { +- IL_TEXT("énumération invalide"), +- IL_TEXT("dépassement de mémoire"), +- IL_TEXT("format non supporté"), ++ IL_TEXT("énumération invalide"), ++ IL_TEXT("dépassement de mémoire"), ++ IL_TEXT("format non supporté"), + IL_TEXT("erreur interne"), +- IL_TEXT("valeur illégale"), +- IL_TEXT("opération illégale"), +- IL_TEXT("valeur de fichier illégale"), +- IL_TEXT("en-tête de fichier invalide"), +- IL_TEXT("paramètre invalide"), ++ IL_TEXT("valeur illégale"), ++ IL_TEXT("opération illégale"), ++ IL_TEXT("valeur de fichier illégale"), ++ IL_TEXT("en-tête de fichier invalide"), ++ IL_TEXT("paramètre invalide"), + IL_TEXT("ne peut pas ouvrir le fichier"), + IL_TEXT("extension invalide"), +- IL_TEXT("fichier déjà existant"), +- IL_TEXT("équivalent hors-format"), ++ IL_TEXT("fichier déjà existant"), ++ IL_TEXT("équivalent hors-format"), + IL_TEXT("stack overflow"), //often used like this in French, so no need to translate + IL_TEXT("stack underflow"), + IL_TEXT("conversion invalide"), +@@ -38,7 +38,7 @@ ILconst_string iluErrorStringsFrench[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = + }; + + ILconst_string iluLibErrorStringsFrench[IL_LIB_EXR_ERROR - IL_LIB_GIF_ERROR + 1] = { +- IL_TEXT("gif : erreur dans la librairie"), //or: gif : erreur dans la bibliothèque (but less used) ++ IL_TEXT("gif : erreur dans la librairie"), //or: gif : erreur dans la bibliothèque (but less used) + IL_TEXT("jpeg : erreur dans la librairie"), + IL_TEXT("png : erreur dans la librairie"), + IL_TEXT("tiff : erreur dans la librairie"), +diff --git a/DevIL/src-ILU/include/ilu_error/ilu_err-german.h b/DevIL/src-ILU/include/ilu_error/ilu_err-german.h +index bf3f05c..acdbe8a 100644 +--- a/DevIL/src-ILU/include/ilu_error/ilu_err-german.h ++++ b/DevIL/src-ILU/include/ilu_error/ilu_err-german.h +@@ -6,7 +6,7 @@ + // + // Filename: src-ILU/include/ilu_error/ilu_err_German.h + // +-// Description: Error functions in German, translated by Andreas Stöckel. ++// Description: Error functions in German, translated by Andreas Stöckel. + // + //----------------------------------------------------------------------------- + +@@ -17,23 +17,23 @@ + #include "ilu_internal.h" + + ILconst_string iluErrorStringsGerman[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = { +- IL_TEXT("Ungültiger Enumerator"), +- IL_TEXT("Kein Speicher verfügbar"), +- IL_TEXT("Das Format wird noch nicht unterstützt"), ++ IL_TEXT("Ungültiger Enumerator"), ++ IL_TEXT("Kein Speicher verfügbar"), ++ IL_TEXT("Das Format wird noch nicht unterstützt"), + IL_TEXT("Interner Fehler"), +- IL_TEXT("Ungültiger Wert"), +- IL_TEXT("Unzulässige Operation"), +- IL_TEXT("Unzulässiger Datei-Wert"), +- IL_TEXT("Unzulässiger Datei-Header"), +- IL_TEXT("Unzulässiger Parameter"), +- IL_TEXT("Datei konnte nicht geöffnet werden"), +- IL_TEXT("Ungültiger Erweiterung"), ++ IL_TEXT("Ungültiger Wert"), ++ IL_TEXT("Unzulässige Operation"), ++ IL_TEXT("Unzulässiger Datei-Wert"), ++ IL_TEXT("Unzulässiger Datei-Header"), ++ IL_TEXT("Unzulässiger Parameter"), ++ IL_TEXT("Datei konnte nicht geöffnet werden"), ++ IL_TEXT("Ungültiger Erweiterung"), + IL_TEXT("Die Datei existiert bereits"), + IL_TEXT("out format equivalent"), +- IL_TEXT("Stack Überlauf"), ++ IL_TEXT("Stack Ãœberlauf"), + IL_TEXT("Stack Unterlauf"), +- IL_TEXT("Ungültige Konvertierung"), +- IL_TEXT("Unzulässige Abmessungen"), ++ IL_TEXT("Ungültige Konvertierung"), ++ IL_TEXT("Unzulässige Abmessungen"), + IL_TEXT("Fehler beim Lesen der Datei") + }; + +diff --git a/DevIL/src-ILU/include/ilu_error/ilu_err-italian.h b/DevIL/src-ILU/include/ilu_error/ilu_err-italian.h +index 09d7bd1..d34b23f 100644 +--- a/DevIL/src-ILU/include/ilu_error/ilu_err-italian.h ++++ b/DevIL/src-ILU/include/ilu_error/ilu_err-italian.h +@@ -22,13 +22,13 @@ ILconst_string iluErrorStringsItalian[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] + IL_TEXT("configuri non sostenne"), + IL_TEXT("erreur interne"), + IL_TEXT("errore interno"), +- IL_TEXT("opération illégale"), ++ IL_TEXT("opération illégale"), + IL_TEXT("operazione illegale"), + IL_TEXT("inebri archivio nullo"), + IL_TEXT("parametro nullo"), +- IL_TEXT("non può aprire l'archivio"), ++ IL_TEXT("non può aprire l'archivio"), + IL_TEXT("dilazione nulla"), +- IL_TEXT("archivi già esistendo"), ++ IL_TEXT("archivi già esistendo"), + IL_TEXT("equivalente fuori-configuri"), + IL_TEXT("inondi di batteria"), + IL_TEXT("insufficienza di batteria"), +diff --git a/DevIL/src-ILU/include/ilu_error/ilu_err-spanish.h b/DevIL/src-ILU/include/ilu_error/ilu_err-spanish.h +index 77b5a24..0945fdf 100644 +--- a/DevIL/src-ILU/include/ilu_error/ilu_err-spanish.h ++++ b/DevIL/src-ILU/include/ilu_error/ilu_err-spanish.h +@@ -6,7 +6,7 @@ + // + // Filename: src-ILU/include/ilu_error/ilu_err-spanish.h + // +-// Description: Error functions in Spanish, translated by Carlos Aragonés ++// Description: Error functions in Spanish, translated by Carlos Aragonés + // + //----------------------------------------------------------------------------- + +@@ -19,32 +19,32 @@ + ILconst_string iluErrorStringsSpanish[IL_FILE_READ_ERROR - IL_INVALID_ENUM + 1] = { + IL_TEXT("enumerador incorrecto"), + IL_TEXT("no queda memoria disponible"), +- IL_TEXT("formato no soportado todavía"), ++ IL_TEXT("formato no soportado todavía"), + IL_TEXT("error interno"), + IL_TEXT("valor incorrecto"), +- IL_TEXT("operación ilegaIL_TEXT("), ++ IL_TEXT("operación ilegaIL_TEXT("), + IL_TEXT("valor de fichero ilegaIL_TEXT("), + IL_TEXT("cabecera incorrecta"), +- IL_TEXT("parámetro incorrecto"), ++ IL_TEXT("parámetro incorrecto"), + IL_TEXT("no se puede abrir el fichero"), +- IL_TEXT("extensión desconocida"), ++ IL_TEXT("extensión desconocida"), + IL_TEXT("el fichero ya existe"), + IL_TEXT("formato de salida equivalente"), + IL_TEXT("desbordamiento superior de pila"), + IL_TEXT("desbordamiento inferior de pila"), +- IL_TEXT("conversión incorrecta"), +- IL_TEXT("número de dimensiones incorrecto"), ++ IL_TEXT("conversión incorrecta"), ++ IL_TEXT("número de dimensiones incorrecto"), + IL_TEXT("error de lectura en el fichero") + }; + + ILconst_string iluLibErrorStringsSpanish[IL_LIB_EXR_ERROR - IL_LIB_GIF_ERROR + 1] = { +- IL_TEXT("error en la librería gif"), // the correct translation will be 'error en la biblioteca gif', but nobody in spain uses the word 'biblioteca' for the translation the word 'library'. Almost all Spanish programmers translate 'library' incorrectly to 'librería'. +- IL_TEXT("error en la librería jpeg"), +- IL_TEXT("error en la librería png"), +- IL_TEXT("error en la librería tiff"), +- IL_TEXT("error en la librería mng"), +- IL_TEXT("error en la librería jp2"), +- IL_TEXT("error en la librería exr"), ++ IL_TEXT("error en la librería gif"), // the correct translation will be 'error en la biblioteca gif', but nobody in spain uses the word 'biblioteca' for the translation the word 'library'. Almost all Spanish programmers translate 'library' incorrectly to 'librería'. ++ IL_TEXT("error en la librería jpeg"), ++ IL_TEXT("error en la librería png"), ++ IL_TEXT("error en la librería tiff"), ++ IL_TEXT("error en la librería mng"), ++ IL_TEXT("error en la librería jp2"), ++ IL_TEXT("error en la librería exr"), + }; + + ILconst_string iluMiscErrorStringsSpanish[2] = { diff --git a/vcpkg/ports/devil/0002_fix-missing-mfc-includes.patch b/vcpkg/ports/devil/0002_fix-missing-mfc-includes.patch new file mode 100644 index 0000000..3b18981 --- /dev/null +++ b/vcpkg/ports/devil/0002_fix-missing-mfc-includes.patch @@ -0,0 +1,102 @@ +diff --git a/DevIL/src-IL/msvc/IL Unicode.rc b/DevIL/src-IL/msvc/IL Unicode.rc +index 346758f..298a207 100644 +--- a/DevIL/src-IL/msvc/IL Unicode.rc ++++ b/DevIL/src-IL/msvc/IL Unicode.rc +@@ -7,7 +7,11 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "afxres.h" ++#define APSTUDIO_HIDDEN_SYMBOLS ++#include "windows.h" ++#undef APSTUDIO_HIDDEN_SYMBOLS ++#include "resource.h" ++ + ///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS + +diff --git a/DevIL/src-IL/msvc/IL.rc b/DevIL/src-IL/msvc/IL.rc +index 8bfadf9..0b8289f 100644 +--- a/DevIL/src-IL/msvc/IL.rc ++++ b/DevIL/src-IL/msvc/IL.rc +@@ -7,10 +7,13 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "afxres.h" ++#define APSTUDIO_HIDDEN_SYMBOLS ++#include "windows.h" ++#undef APSTUDIO_HIDDEN_SYMBOLS ++#include "resource.h" + +-///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS ++///////////////////////////////////////////////////////////////////////////// + + ///////////////////////////////////////////////////////////////////////////// + // English (United States) resources +diff --git a/DevIL/src-IL/msvc8/IL Unicode.rc b/DevIL/src-IL/msvc8/IL Unicode.rc +index 026ee49..66ca4bf 100644 +--- a/DevIL/src-IL/msvc8/IL Unicode.rc ++++ b/DevIL/src-IL/msvc8/IL Unicode.rc +@@ -7,7 +7,10 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "afxres.h" ++#define APSTUDIO_HIDDEN_SYMBOLS ++#include "windows.h" ++#undef APSTUDIO_HIDDEN_SYMBOLS ++#include "resource.h" + + ///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS +diff --git a/DevIL/src-IL/msvc8/IL.rc b/DevIL/src-IL/msvc8/IL.rc +index 9301d41..3ad52c0 100644 +--- a/DevIL/src-IL/msvc8/IL.rc ++++ b/DevIL/src-IL/msvc8/IL.rc +@@ -7,7 +7,10 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "afxres.h" ++#define APSTUDIO_HIDDEN_SYMBOLS ++#include "windows.h" ++#undef APSTUDIO_HIDDEN_SYMBOLS ++#include "resource.h" + + ///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS +diff --git a/DevIL/src-IL/msvc9/IL Unicode.rc b/DevIL/src-IL/msvc9/IL Unicode.rc +index d0dff4f..c9cf51f 100644 +--- a/DevIL/src-IL/msvc9/IL Unicode.rc ++++ b/DevIL/src-IL/msvc9/IL Unicode.rc +@@ -7,7 +7,10 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "afxres.h" ++#define APSTUDIO_HIDDEN_SYMBOLS ++#include "windows.h" ++#undef APSTUDIO_HIDDEN_SYMBOLS ++#include "resource.h" + + ///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS +diff --git a/DevIL/src-IL/msvc9/IL.rc b/DevIL/src-IL/msvc9/IL.rc +index 9f5c795..6b8c891 100644 +--- a/DevIL/src-IL/msvc9/IL.rc ++++ b/DevIL/src-IL/msvc9/IL.rc +@@ -7,7 +7,10 @@ + // + // Generated from the TEXTINCLUDE 2 resource. + // +-#include "afxres.h" ++#define APSTUDIO_HIDDEN_SYMBOLS ++#include "windows.h" ++#undef APSTUDIO_HIDDEN_SYMBOLS ++#include "resource.h" + + ///////////////////////////////////////////////////////////////////////////// + #undef APSTUDIO_READONLY_SYMBOLS + \ No newline at end of file diff --git a/vcpkg/ports/devil/0003_fix-openexr.patch b/vcpkg/ports/devil/0003_fix-openexr.patch new file mode 100644 index 0000000..2465bb9 --- /dev/null +++ b/vcpkg/ports/devil/0003_fix-openexr.patch @@ -0,0 +1,55 @@ +diff --git a/DevIL/src-IL/CMakeLists.txt b/DevIL/src-IL/CMakeLists.txt +index 02e4f03..4accaa1 100644 +--- a/DevIL/src-IL/CMakeLists.txt ++++ b/DevIL/src-IL/CMakeLists.txt +@@ -235,8 +235,12 @@ target_link_libraries(IL ${libs}) + + # generate config.h + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/config.h.cmake.in ${CMAKE_CURRENT_SOURCE_DIR}/include/config.h) +- +- ++add_definitions(-DHAVE_CONFIG_H) ++if(WIN32) ++ if(BUILD_SHARED_LIBS) ++ add_definitions(-DOPENEXR_DLL) ++ endif() ++endif() + + # generate pkg-config file + # TODO: add Requires.private or Libs.private +diff --git a/DevIL/src-IL/src/il_exr.cpp b/DevIL/src-IL/src/il_exr.cpp +index bbb3978..3916c6f 100644 +--- a/DevIL/src-IL/src/il_exr.cpp ++++ b/DevIL/src-IL/src/il_exr.cpp +@@ -14,15 +14,10 @@ + #include "il_internal.h" + #ifndef IL_NO_EXR + +-#ifndef HAVE_CONFIG_H // We are probably on a Windows box . +-//#define OPENEXR_DLL +-#define HALF_EXPORTS +-#endif //HAVE_CONFIG_H +- + #include "il_exr.h" +-#include +-#include +-#include ++#include ++#include ++#include + //#include + //#include + //#include +diff --git a/DevIL/src-IL/include/il_exr.h b/DevIL/src-IL/include/il_exr.h +index 3d880c4..04d721a 100644 +--- a/DevIL/src-IL/include/il_exr.h ++++ b/DevIL/src-IL/include/il_exr.h +@@ -15,7 +15,7 @@ + #define EXR_H + + #include "il_internal.h" +-#include ++#include + + + //using namespace Imf; // Using this leads to errors with Microsoft's IStream. diff --git a/vcpkg/ports/devil/CONTROL b/vcpkg/ports/devil/CONTROL new file mode 100644 index 0000000..460f7b4 --- /dev/null +++ b/vcpkg/ports/devil/CONTROL @@ -0,0 +1,30 @@ +Source: devil +Version: 1.8.0-5 +Build-Depends: +Homepage: https://github.com/DentonW/DevIL +Description: A full featured cross-platform image library +Default-Features: libpng, tiff, libjpeg, openexr, jasper, lcms + +Feature: libpng +Build-Depends: libpng +Description: Use Libpng for .png (and some .ico) + +Feature: tiff +Build-Depends: tiff +Description: Use Libtiff for .tif support + +Feature: libjpeg +Build-Depends: libjpeg-turbo +Description: Use Libjpeg for .jpg (and some .blp) support + +Feature: openexr +Build-Depends: openexr +Description: Use openexr + +Feature: jasper +Build-Depends: jasper +Description: Use JasPer for .jp2 (and some .icns) support + +Feature: lcms +Build-Depends: lcms +Description: Use Little CMS for color profiles diff --git a/vcpkg/ports/devil/enable-static.patch b/vcpkg/ports/devil/enable-static.patch new file mode 100644 index 0000000..8d77c0d --- /dev/null +++ b/vcpkg/ports/devil/enable-static.patch @@ -0,0 +1,26 @@ +diff --git a/DevIL/src-ILU/CMakeLists.txt b/DevIL/src-ILU/CMakeLists.txt +index 17a3afe..a46ab41 100644 +--- a/DevIL/src-ILU/CMakeLists.txt ++++ b/DevIL/src-ILU/CMakeLists.txt +@@ -43,7 +43,7 @@ source_group("Header Files" FILES ${ILU_INC} ) + source_group("Resource Files" FILES ${ILU_RSRC} ) + + # Remove SHARED to create a static library +-add_library(ILU SHARED ${ILU_SRCS} ${ILU_INC} ${ILU_RSRC}) ++add_library(ILU ${ILU_SRCS} ${ILU_INC} ${ILU_RSRC}) + + + ## ILU requires IL +diff --git a/DevIL/src-ILUT/CMakeLists.txt b/DevIL/src-ILUT/CMakeLists.txt +index 21470cb..398d3c1 100644 +--- a/DevIL/src-ILUT/CMakeLists.txt ++++ b/DevIL/src-ILUT/CMakeLists.txt +@@ -43,7 +43,7 @@ source_group("Header Files" FILES ${ILUT_INC} ) + source_group("Resource Files" FILES ${ILUT_RSRC} ) + + # Remove SHARED to create a static library +-add_library(ILUT SHARED ${ILUT_SRCS} ${ILUT_INC} ${ILUT_RSRC}) ++add_library(ILUT ${ILUT_SRCS} ${ILUT_INC} ${ILUT_RSRC}) + + ## add link sub library info + target_link_libraries(ILUT diff --git a/vcpkg/ports/devil/portfile.cmake b/vcpkg/ports/devil/portfile.cmake new file mode 100644 index 0000000..eeeaffd --- /dev/null +++ b/vcpkg/ports/devil/portfile.cmake @@ -0,0 +1,83 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO DentonW/DevIL + REF v1.8.0 + SHA512 4aed5e50a730ece8b1eb6b2f6204374c6fb6f5334cf7c880d84c0f79645ea7c6b5118f57a7868a487510fc59c452f51472b272215d4c852f265f58b5857e17c7 + HEAD_REF master + PATCHES + 0001_fix-encoding.patch + 0002_fix-missing-mfc-includes.patch + 0003_fix-openexr.patch + enable-static.patch +) +file(REMOVE ${SOURCE_PATH}/DevIL/src-IL/cmake/FindOpenEXR.cmake) +set(IL_NO_PNG 1) +if("libpng" IN_LIST FEATURES) + set(IL_NO_PNG 0) +endif() + +set(IL_NO_TIF 1) +if("tiff" IN_LIST FEATURES) + set(IL_NO_TIF 0) +endif() + +set(IL_NO_JPG 1) +if("libjpeg" IN_LIST FEATURES) + set(IL_NO_JPG 0) +endif() + +set(IL_NO_EXR 1) +if("openexr" IN_LIST FEATURES) + set(IL_NO_EXR 0) +endif() + +set(IL_NO_JP2 1) +if("jasper" IN_LIST FEATURES) + set(IL_NO_JP2 0) +endif() + +set(IL_NO_MNG 1) +#if("libmng" IN_LIST FEATURES) +# set(IL_NO_MNG 0) +#endif() + +set(IL_NO_LCMS 1) +if("lcms" IN_LIST FEATURES) + set(IL_NO_LCMS 0) +endif() + +set(IL_USE_DXTC_NVIDIA 0) +#if("nvtt" IN_LIST FEATURES) +# set(IL_USE_DXTC_NVIDIA 1) +#endif() + +set(IL_USE_DXTC_SQUISH 0) +#if("libsquish" IN_LIST FEATURES) +# set(IL_USE_DXTC_SQUISH 1) +#endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/DevIL + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DIL_NO_PNG=${IL_NO_PNG} + -DIL_NO_TIF=${IL_NO_TIF} + -DIL_NO_JPG=${IL_NO_JPG} + -DIL_NO_EXR=${IL_NO_EXR} + -DIL_NO_JP2=${IL_NO_JP2} + -DIL_NO_MNG=${IL_NO_MNG} + -DIL_NO_LCMS=${IL_NO_LCMS} + -DIL_USE_DXTC_NVIDIA=${IL_USE_DXTC_NVIDIA} + -DIL_USE_DXTC_SQUISH=${IL_USE_DXTC_SQUISH} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/devil RENAME copyright) diff --git a/vcpkg/ports/dimcli/CONTROL b/vcpkg/ports/dimcli/CONTROL new file mode 100644 index 0000000..40f2109 --- /dev/null +++ b/vcpkg/ports/dimcli/CONTROL @@ -0,0 +1,4 @@ +Source: dimcli +Version: 5.0.2 +Homepage: https://github.com/gknowles/dimcli +Description: C++ command line parser toolkit diff --git a/vcpkg/ports/dimcli/fix-NameBoolean.patch b/vcpkg/ports/dimcli/fix-NameBoolean.patch new file mode 100644 index 0000000..a0d9afb --- /dev/null +++ b/vcpkg/ports/dimcli/fix-NameBoolean.patch @@ -0,0 +1,63 @@ +diff --git a/libs/dimcli/cli.cpp b/libs/dimcli/cli.cpp +index 45dac3b..6129884 100644 +--- a/libs/dimcli/cli.cpp ++++ b/libs/dimcli/cli.cpp +@@ -392,8 +392,8 @@ GroupConfig const & Cli::Config::findGrpOrDie(Cli const & cli) { + ***/ + + //=========================================================================== +-Cli::OptBase::OptBase(string const & names, bool boolean) +- : m_bool{boolean} ++Cli::OptBase::OptBase(string const & names, bool in_boolean) ++ : m_bool{in_boolean} + , m_names{names} + { + // set m_fromName and assert if names is malformed +@@ -526,12 +526,12 @@ static bool includeName( + OptName const & name, + NameListType type, + Cli::OptBase const & opt, +- bool boolean, ++ bool in_boolean, + bool inverted + ) { + if (name.opt != &opt) + return false; +- if (boolean) { ++ if (in_boolean) { + if (type == kNameEnable) + return !name.invert; + if (type == kNameDisable) +diff --git a/libs/dimcli/cli.h b/libs/dimcli/cli.h +index d4941dc..fa8d526 100644 +--- a/libs/dimcli/cli.h ++++ b/libs/dimcli/cli.h +@@ -777,7 +777,7 @@ public: + }; + + public: +- OptBase(std::string const & keys, bool boolean); ++ OptBase(std::string const & keys, bool in_boolean); + virtual ~OptBase() {} + + //----------------------------------------------------------------------- +@@ -1062,7 +1062,7 @@ std::string Cli::OptBase::toValueDesc() const { + template + class Cli::OptShim : public OptBase { + public: +- OptShim(std::string const & keys, bool boolean); ++ OptShim(std::string const & keys, bool in_boolean); + OptShim(OptShim const &) = delete; + OptShim & operator=(OptShim const &) = delete; + +@@ -1249,8 +1249,8 @@ protected: + + //=========================================================================== + template +-Cli::OptShim::OptShim(std::string const & keys, bool boolean) +- : OptBase(keys, boolean) ++Cli::OptShim::OptShim(std::string const & keys, bool in_boolean) ++ : OptBase(keys, in_boolean) + { + if (std::is_arithmetic::value) + this->imbue(std::locale("")); diff --git a/vcpkg/ports/dimcli/portfile.cmake b/vcpkg/ports/dimcli/portfile.cmake new file mode 100644 index 0000000..ceb07c0 --- /dev/null +++ b/vcpkg/ports/dimcli/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO gknowles/dimcli + REF a4dbb4b1c8a3825fc304bbbad3438dbe1840feae # v5.0.2 + SHA512 25cc9002fd46856854545934f385d8578f207b1ce01802a172e49e008cdf1db0db11db7cefeef18258b99c13570af9193e83f5826613d8b0a118d7bae3f0d03f + HEAD_REF master +) + +set(staticCrt OFF) +if(VCPKG_CRT_LINKAGE STREQUAL "static") + set(staticCrt ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DLINK_STATIC_RUNTIME:BOOL=${staticCrt} + -DINSTALL_LIBS:BOOL=ON + -DBUILD_PROJECT_NAME=dimcli +) + +vcpkg_install_cmake() + +# Remove includes from ${CMAKE_INSTALL_PREFIX}/debug +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/dimcli" RENAME copyright) diff --git a/vcpkg/ports/directxmesh/CONTROL b/vcpkg/ports/directxmesh/CONTROL new file mode 100644 index 0000000..f4470fe --- /dev/null +++ b/vcpkg/ports/directxmesh/CONTROL @@ -0,0 +1,4 @@ +Source: directxmesh +Version: aug2020 +Homepage: https://walbourn.github.io/directxmesh +Description: DirectXMesh geometry processing library \ No newline at end of file diff --git a/vcpkg/ports/directxmesh/portfile.cmake b/vcpkg/ports/directxmesh/portfile.cmake new file mode 100644 index 0000000..56f6ab6 --- /dev/null +++ b/vcpkg/ports/directxmesh/portfile.cmake @@ -0,0 +1,75 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/DirectXMesh + REF aug2020 + SHA512 4a116b6266070a075aca523d9439eeab878b5406ffe5f94f7c008d659842750eab17b11c027c7f1da1ed12a0b8a43ab53dc5aaea8477a0bb029654cd477b5424 + HEAD_REF master +) + +IF (TRIPLET_SYSTEM_ARCH MATCHES "x86") + SET(BUILD_ARCH "Win32") +ELSE() + SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH}) +ENDIF() + +if (VCPKG_PLATFORM_TOOLSET STREQUAL "v140") + set(VS_VERSION "2015") +elseif (VCPKG_PLATFORM_TOOLSET STREQUAL "v141") + set(VS_VERSION "2017") +elseif (VCPKG_PLATFORM_TOOLSET STREQUAL "v142") + set(VS_VERSION "2019") +else() + message(FATAL_ERROR "Unsupported platform toolset.") +endif() + +if(VCPKG_TARGET_IS_UWP) + set(SLN_NAME "Windows10_${VS_VERSION}") +else() + if(TRIPLET_SYSTEM_ARCH STREQUAL "arm64") + set(SLN_NAME "Desktop_${VS_VERSION}_Win10") + else() + set(SLN_NAME "Desktop_${VS_VERSION}") + + # fix solution file to include DirectX 12 in build + file(READ ${SOURCE_PATH}/DirectXMesh/DirectXMesh_${SLN_NAME}.vcxproj _contents) + string(REPLACE "_WIN32_WINNT=0x0601" "_WIN32_WINNT=0x0A00" _contents "${_contents}") + file(WRITE ${SOURCE_PATH}/DirectXMesh/DirectXMesh_${SLN_NAME}.vcxproj "${_contents}") + + # fix solution file to include DirectX 12 in build + file(READ ${SOURCE_PATH}/Meshconvert/Meshconvert_${SLN_NAME}.vcxproj _contents) + string(REPLACE "_WIN32_WINNT=0x0601" "_WIN32_WINNT=0x0A00" _contents "${_contents}") + file(WRITE ${SOURCE_PATH}/Meshconvert/Meshconvert_${SLN_NAME}.vcxproj "${_contents}") + endif() +endif() + +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/DirectXMesh_${SLN_NAME}.sln + PLATFORM ${TRIPLET_SYSTEM_ARCH} +) + +file(INSTALL + ${SOURCE_PATH}/DirectXMesh/DirectXMesh.h + ${SOURCE_PATH}/DirectXMesh/DirectXMesh.inl + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) + +file(INSTALL + ${SOURCE_PATH}/DirectXMesh/Bin/${SLN_NAME}/${BUILD_ARCH}/Debug/DirectXMesh.lib + ${SOURCE_PATH}/DirectXMesh/Bin/${SLN_NAME}/${BUILD_ARCH}/Debug/DirectXMesh.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(INSTALL + ${SOURCE_PATH}/DirectXMesh/Bin/${SLN_NAME}/${BUILD_ARCH}/Release/DirectXMesh.lib + ${SOURCE_PATH}/DirectXMesh/Bin/${SLN_NAME}/${BUILD_ARCH}/Release/DirectXMesh.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + +if(NOT VCPKG_TARGET_IS_UWP AND NOT TRIPLET_SYSTEM_ARCH STREQUAL "arm64") + set(TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/directxmesh) + file(MAKE_DIRECTORY ${TOOL_PATH}) + file(INSTALL + ${SOURCE_PATH}/Meshconvert/Bin/${SLN_NAME}/${BUILD_ARCH}/Release/Meshconvert.exe + DESTINATION ${TOOL_PATH}) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/directxsdk/portfile.cmake b/vcpkg/ports/directxsdk/portfile.cmake new file mode 100644 index 0000000..86fa8a1 --- /dev/null +++ b/vcpkg/ports/directxsdk/portfile.cmake @@ -0,0 +1,60 @@ +vcpkg_fail_port_install(ON_TARGET "LINUX" "OSX" "UWP" "ANDROID" ON_ARCH "arm") + +vcpkg_download_distfile(ARCHIVE + URLS "https://download.microsoft.com/download/a/e/7/ae743f1f-632b-4809-87a9-aa1bb3458e31/DXSDK_Jun10.exe" + FILENAME "DXSDK_Jun10.exe" + SHA512 4869ac947a35cd0d6949fbda17547256ea806fef36f48474dda63651f751583e9902641087250b6e8ccabaab85e51effccd9235dc6cdf64e21ec2b298227fe19 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + + +set(LIB_DIR "${SOURCE_PATH}/Lib/${VCPKG_TARGET_ARCHITECTURE}") +set(DEBUG_LIBS + ${LIB_DIR}/D3DCSXd.lib + ${LIB_DIR}/d3dx10d.lib + ${LIB_DIR}/d3dx11d.lib + ${LIB_DIR}/d3dx9d.lib + ${LIB_DIR}/xapobased.lib +) +set(RELEASE_LIBS + ${LIB_DIR}/D3DCSX.lib + ${LIB_DIR}/d3dx10.lib + ${LIB_DIR}/d3dx11.lib + ${LIB_DIR}/d3dx9.lib + ${LIB_DIR}/xapobase.lib +) +# Libs without a debug part +set(OTHER_LIBS + ${LIB_DIR}/d2d1.lib + ${LIB_DIR}/d3d10.lib + ${LIB_DIR}/d3d10_1.lib + ${LIB_DIR}/d3d11.lib + ${LIB_DIR}/d3d9.lib + ${LIB_DIR}//d3dcompiler.lib + ${LIB_DIR}/d3dxof.lib + ${LIB_DIR}/dinput8.lib + ${LIB_DIR}/dsound.lib + ${LIB_DIR}/dwrite.lib + ${LIB_DIR}/DxErr.lib + ${LIB_DIR}/dxgi.lib + ${LIB_DIR}/dxguid.lib + ${LIB_DIR}/X3DAudio.lib + ${LIB_DIR}/XAPOFX.lib + ${LIB_DIR}/XInput.lib +) +if(${VCPKG_TARGET_ARCHITECTURE} STREQUAL "x86") + list(APPEND OTHER_LIBS ${LIB_DIR}/dsetup.lib) +endif() + +#install(DIRECTORY "${SOURCE_PATH}/Include" DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY "${SOURCE_PATH}/Include/" DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +file(COPY ${RELEASE_LIBS} ${OTHER_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${DEBUG_LIBS} ${OTHER_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + + +# # Handle copyright +file(INSTALL "${SOURCE_PATH}/Documentation/License Agreements/DirectX SDK EULA.txt" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/directxsdk/vcpkg.json b/vcpkg/ports/directxsdk/vcpkg.json new file mode 100644 index 0000000..fa1f7a3 --- /dev/null +++ b/vcpkg/ports/directxsdk/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "directxsdk", + "version-string": "jun10", + "description": "DirectX SDK", + "homepage": "https://www.microsoft.com/en-us/download/details.aspx?id=6812", + "supports": "windows & !arm & !uwp" +} diff --git a/vcpkg/ports/directxtex/CONTROL b/vcpkg/ports/directxtex/CONTROL new file mode 100644 index 0000000..4896425 --- /dev/null +++ b/vcpkg/ports/directxtex/CONTROL @@ -0,0 +1,4 @@ +Source: directxtex +Version: sept2020 +Homepage: https://walbourn.github.io/directxtex +Description: DirectXTex texture processing library \ No newline at end of file diff --git a/vcpkg/ports/directxtex/portfile.cmake b/vcpkg/ports/directxtex/portfile.cmake new file mode 100644 index 0000000..6967b22 --- /dev/null +++ b/vcpkg/ports/directxtex/portfile.cmake @@ -0,0 +1,70 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/DirectXTex + REF sept2020 + SHA512 f6b5b07817c05c64a5281b0006b182f2ebd110d79f10332801b51a185486fd7426e18c454e66995e9f88c92d7b8cf0c03ae590aa040d92314bdd3d4989784156 + HEAD_REF master +) + +IF (TRIPLET_SYSTEM_ARCH MATCHES "x86") + SET(BUILD_ARCH "Win32") +ELSE() + SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH}) +ENDIF() + +if (VCPKG_PLATFORM_TOOLSET STREQUAL "v140") + set(VS_VERSION "2015") +elseif (VCPKG_PLATFORM_TOOLSET STREQUAL "v141") + set(VS_VERSION "2017") +elseif (VCPKG_PLATFORM_TOOLSET STREQUAL "v142") + set(VS_VERSION "2019") +else() + message(FATAL_ERROR "Unsupported platform toolset.") +endif() + +if(VCPKG_TARGET_IS_UWP) + set(SLN_NAME "Windows10_${VS_VERSION}") +else() + if(TRIPLET_SYSTEM_ARCH STREQUAL "arm64") + set(SLN_NAME "Desktop_${VS_VERSION}_Win10") + else() + set(SLN_NAME "Desktop_${VS_VERSION}") + endif() +endif() + +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/DirectXTex_${SLN_NAME}.sln + PLATFORM ${TRIPLET_SYSTEM_ARCH} +) + +file(INSTALL + ${SOURCE_PATH}/DirectXTex/DirectXTex.h + ${SOURCE_PATH}/DirectXTex/DirectXTex.inl + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) +file(INSTALL + ${SOURCE_PATH}/DirectXTex/Bin/${SLN_NAME}/${BUILD_ARCH}/Debug/DirectXTex.lib + ${SOURCE_PATH}/DirectXTex/Bin/${SLN_NAME}/${BUILD_ARCH}/Debug/DirectXTex.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(INSTALL + ${SOURCE_PATH}/DirectXTex/Bin/${SLN_NAME}/${BUILD_ARCH}/Release/DirectXTex.lib + ${SOURCE_PATH}/DirectXTex/Bin/${SLN_NAME}/${BUILD_ARCH}/Release/DirectXTex.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + +if(NOT VCPKG_TARGET_IS_UWP AND NOT TRIPLET_SYSTEM_ARCH STREQUAL "arm64") + set(TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/directxtex) + file(MAKE_DIRECTORY ${TOOL_PATH}) + file(INSTALL + ${SOURCE_PATH}/Texdiag/Bin/${SLN_NAME}/${BUILD_ARCH}/Release/texdiag.exe + DESTINATION ${TOOL_PATH}) + file(INSTALL + ${SOURCE_PATH}/Texconv/Bin/${SLN_NAME}/${BUILD_ARCH}/Release/Texconv.exe + DESTINATION ${TOOL_PATH}) + file(INSTALL + ${SOURCE_PATH}/Texassemble/Bin/${SLN_NAME}/${BUILD_ARCH}/Release/Texassemble.exe + DESTINATION ${TOOL_PATH}) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/directxtk/CONTROL b/vcpkg/ports/directxtk/CONTROL new file mode 100644 index 0000000..56b6084 --- /dev/null +++ b/vcpkg/ports/directxtk/CONTROL @@ -0,0 +1,4 @@ +Source: directxtk +Version: sept2020 +Homepage: https://walbourn.github.io/directxtk +Description: A collection of helper classes for writing DirectX 11.x code in C++. diff --git a/vcpkg/ports/directxtk/portfile.cmake b/vcpkg/ports/directxtk/portfile.cmake new file mode 100644 index 0000000..0815d68 --- /dev/null +++ b/vcpkg/ports/directxtk/portfile.cmake @@ -0,0 +1,68 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/DirectXTK + REF sept2020 + SHA512 fcb98ffee960494f4ba9a3edd802dce7eacf8e0d9a17f712ea971cdf6c13d9ee4e403deecbcd2c8a4555301316334e6f987d6b051b7cb87e2ae76e41f213e91e + HEAD_REF master +) + +IF (TRIPLET_SYSTEM_ARCH MATCHES "x86") + SET(BUILD_ARCH "Win32") +ELSE() + SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH}) +ENDIF() + +if (VCPKG_PLATFORM_TOOLSET STREQUAL "v140") + set(VS_VERSION "2015") +elseif (VCPKG_PLATFORM_TOOLSET STREQUAL "v141") + set(VS_VERSION "2017") +elseif (VCPKG_PLATFORM_TOOLSET STREQUAL "v142") + set(VS_VERSION "2019") +else() + message(FATAL_ERROR "Unsupported platform toolset.") +endif() + +if(VCPKG_TARGET_IS_UWP) + set(SLN_NAME "Windows10_${VS_VERSION}") +else() + if(TRIPLET_SYSTEM_ARCH STREQUAL "arm64") + set(SLN_NAME "Desktop_${VS_VERSION}_Win10") + else() + set(SLN_NAME "Desktop_${VS_VERSION}") + endif() +endif() + +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/DirectXTK_${SLN_NAME}.sln + PLATFORM ${TRIPLET_SYSTEM_ARCH} +) + +file(INSTALL + ${SOURCE_PATH}/Inc/ + DESTINATION ${CURRENT_PACKAGES_DIR}/include/DirectXTK +) + +file(INSTALL + ${SOURCE_PATH}/Bin/${SLN_NAME}/${BUILD_ARCH}/Release/DirectXTK.lib + ${SOURCE_PATH}/Bin/${SLN_NAME}/${BUILD_ARCH}/Release/DirectXTK.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + +file(INSTALL + ${SOURCE_PATH}/Bin/${SLN_NAME}/${BUILD_ARCH}/Debug/DirectXTK.lib + ${SOURCE_PATH}/Bin/${SLN_NAME}/${BUILD_ARCH}/Debug/DirectXTK.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + +if(NOT VCPKG_TARGET_IS_UWP) + set(DXTK_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/directxtk) + file(MAKE_DIRECTORY ${DXTK_TOOL_PATH}) + file(INSTALL + ${SOURCE_PATH}/MakeSpriteFont/bin/Release/MakeSpriteFont.exe + DESTINATION ${DXTK_TOOL_PATH}) + file(INSTALL + ${SOURCE_PATH}/XWBTool/Bin/Desktop_${VS_VERSION}/${BUILD_ARCH}/Release/XWBTool.exe + DESTINATION ${DXTK_TOOL_PATH}) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/directxtk12/CONTROL b/vcpkg/ports/directxtk12/CONTROL new file mode 100644 index 0000000..7951116 --- /dev/null +++ b/vcpkg/ports/directxtk12/CONTROL @@ -0,0 +1,4 @@ +Source: directxtk12 +Version: sept2020 +Homepage: https://walbourn.github.io/directx-tool-kit-for-directx-12 +Description: A collection of helper classes for writing DirectX 12 code in C++. diff --git a/vcpkg/ports/directxtk12/portfile.cmake b/vcpkg/ports/directxtk12/portfile.cmake new file mode 100644 index 0000000..7310ee0 --- /dev/null +++ b/vcpkg/ports/directxtk12/portfile.cmake @@ -0,0 +1,53 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/DirectXTK12 + REF sept2020 + SHA512 25963234068700944d29f93e376d3e9dcb27689ae953f790b53f931d5776d33ae047dc340464894805ce13be469efacc3c73e731691e66cdb2c7624b14dc25ff + HEAD_REF master +) + +IF (TRIPLET_SYSTEM_ARCH MATCHES "x86") + SET(BUILD_ARCH "Win32") +ELSE() + SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH}) +ENDIF() + +if (VCPKG_PLATFORM_TOOLSET STREQUAL "v140") + set(VS_VERSION "2015") +elseif (VCPKG_PLATFORM_TOOLSET STREQUAL "v141") + set(VS_VERSION "2017") +elseif (VCPKG_PLATFORM_TOOLSET STREQUAL "v142") + set(VS_VERSION "2019") +else() + message(FATAL_ERROR "Unsupported platform toolset.") +endif() + +if(VCPKG_TARGET_IS_UWP) + set(SLN_NAME "Windows10_${VS_VERSION}") +else() + set(SLN_NAME "Desktop_${VS_VERSION}_Win10") +endif() + +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/DirectXTK_${SLN_NAME}.sln + PLATFORM ${TRIPLET_SYSTEM_ARCH} +) + +file(INSTALL + ${SOURCE_PATH}/Inc/ + DESTINATION ${CURRENT_PACKAGES_DIR}/include/DirectXTK12 +) + +file(INSTALL + ${SOURCE_PATH}/Bin/${SLN_NAME}/${BUILD_ARCH}/Release/DirectXTK12.lib + ${SOURCE_PATH}/Bin/${SLN_NAME}/${BUILD_ARCH}/Release/DirectXTK12.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + +file(INSTALL + ${SOURCE_PATH}/Bin/${SLN_NAME}/${BUILD_ARCH}/Debug/DirectXTK12.lib + ${SOURCE_PATH}/Bin/${SLN_NAME}/${BUILD_ARCH}/Debug/DirectXTK12.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/dirent/CONTROL b/vcpkg/ports/dirent/CONTROL new file mode 100644 index 0000000..b8444bc --- /dev/null +++ b/vcpkg/ports/dirent/CONTROL @@ -0,0 +1,4 @@ +Source: dirent +Version: 1.23.2 +Homepage: https://github.com/tronkko/dirent +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/vcpkg/ports/dirent/portfile.cmake b/vcpkg/ports/dirent/portfile.cmake new file mode 100644 index 0000000..945f601 --- /dev/null +++ b/vcpkg/ports/dirent/portfile.cmake @@ -0,0 +1,17 @@ +if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + return() +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tronkko/dirent + REF 1.23.2 + SHA512 e7a991445ee9ca8f1118753df559d28beb283b3c0d25edcfb23dd5322f2bdfeadffe802d0c908bb6d4dfc17bf5ec38bdecfa717319fb4e26682bee0ba0d14c5c + 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() + +set(VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS enabled) diff --git a/vcpkg/ports/discord-game-sdk/CMakeLists.txt b/vcpkg/ports/discord-game-sdk/CMakeLists.txt new file mode 100644 index 0000000..f5a1d51 --- /dev/null +++ b/vcpkg/ports/discord-game-sdk/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.5) + +project(discord_game_sdk_cpp) + +find_library(SDK_LIB + "discord_game_sdk" + PATHS "${SDK_LIB_FOLDER}" + NO_DEFAULT_PATH +) + +file(GLOB SRC_FILES "${PROJECT_SOURCE_DIR}/cpp/*.cpp") +file(GLOB_RECURSE HDR_FILES "${PROJECT_SOURCE_DIR}/*.h") + +add_library(discord_game_sdk_cpp STATIC ${SRC_FILES}) +target_link_libraries(discord_game_sdk_cpp PUBLIC ${SDK_LIB}) +set_property(TARGET discord_game_sdk_cpp PROPERTY CXX_STANDARD 11) + +install(TARGETS discord_game_sdk_cpp ARCHIVE) +install(FILES ${HDR_FILES} DESTINATION "include/discord-game-sdk") \ No newline at end of file diff --git a/vcpkg/ports/discord-game-sdk/CONTROL b/vcpkg/ports/discord-game-sdk/CONTROL new file mode 100644 index 0000000..a164d53 --- /dev/null +++ b/vcpkg/ports/discord-game-sdk/CONTROL @@ -0,0 +1,5 @@ +Source: discord-game-sdk +Version: 2.5.6-1 +Homepage: https://discordapp.com/developers/docs/game-sdk/sdk-starter-guide +Description: The Discord GameSDK is an easy drop-in SDK to help you manage all the hard things that come with making a game. +Supports: ((x64 && (windows || osx || linux)) || (x86 && windows)) && !uwp && !static \ No newline at end of file diff --git a/vcpkg/ports/discord-game-sdk/copyright b/vcpkg/ports/discord-game-sdk/copyright new file mode 100644 index 0000000..6e0e2e9 --- /dev/null +++ b/vcpkg/ports/discord-game-sdk/copyright @@ -0,0 +1 @@ +Your use of the GameSDK is bound by the Discord Developer Terms of Service, whose text is available online at https://discordapp.com/developers/docs/legal. diff --git a/vcpkg/ports/discord-game-sdk/include-cstdint.patch b/vcpkg/ports/discord-game-sdk/include-cstdint.patch new file mode 100644 index 0000000..6e61c4c --- /dev/null +++ b/vcpkg/ports/discord-game-sdk/include-cstdint.patch @@ -0,0 +1,25 @@ +From 91fab7c4b8f7da3182f07f5392ebe9388f979157 Mon Sep 17 00:00:00 2001 +From: Maki +Date: Wed, 3 Jun 2020 01:40:58 +0100 +Subject: [PATCH] Include cstdint + +--- + cpp/types.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/cpp/types.h b/cpp/types.h +index 8c7cc2b..122dc71 100644 +--- a/cpp/types.h ++++ b/cpp/types.h +@@ -3,6 +3,8 @@ + #include "ffi.h" + #include "event.h" + ++#include ++ + namespace discord { + + enum class Result { +-- +2.26.2 + diff --git a/vcpkg/ports/discord-game-sdk/portfile.cmake b/vcpkg/ports/discord-game-sdk/portfile.cmake new file mode 100644 index 0000000..ab85a7d --- /dev/null +++ b/vcpkg/ports/discord-game-sdk/portfile.cmake @@ -0,0 +1,53 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "android" "uwp") +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" AND NOT VCPKG_TARGET_IS_WINDOWS) + vcpkg_fail_port_install(MESSAGE "The GameSDK only supports x86 on Windows." ALWAYS) +endif() + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS https://dl-game-sdk.discordapp.net/2.5.6/discord_game_sdk.zip + FILENAME discord_game_sdk.zip + SHA512 4c8f72c7bdf92bc969fb86b96ea0d835e01b9bab1a2cc27ae00bdac1b9733a1303ceadfe138c24a7609b76d61d49999a335dd596cf3f335d894702e2aa23406f +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL + PATCHES + include-cstdint.patch # allows compiling on newer versions of GCC +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION ${SOURCE_PATH}) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(ARCH_FOLDER "x86") +else(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(ARCH_FOLDER "x86_64") +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + file(INSTALL "${SOURCE_PATH}/lib/${ARCH_FOLDER}/discord_game_sdk.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/bin") + file(INSTALL "${SOURCE_PATH}/lib/${ARCH_FOLDER}/discord_game_sdk.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin") + file(INSTALL "${SOURCE_PATH}/lib/${ARCH_FOLDER}/discord_game_sdk.dll.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib" RENAME "discord_game_sdk.lib") + file(INSTALL "${SOURCE_PATH}/lib/${ARCH_FOLDER}/discord_game_sdk.dll.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib" RENAME "discord_game_sdk.lib") +elseif(VCPKG_TARGET_IS_OSX) + file(INSTALL "${SOURCE_PATH}/lib/${ARCH_FOLDER}/discord_game_sdk.dylib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib" RENAME "libdiscord_game_sdk.dylib") + file(INSTALL "${SOURCE_PATH}/lib/${ARCH_FOLDER}/discord_game_sdk.dylib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib" RENAME "libdiscord_game_sdk.dylib") +elseif(VCPKG_TARGET_IS_LINUX) + file(INSTALL "${SOURCE_PATH}/lib/${ARCH_FOLDER}/discord_game_sdk.so" DESTINATION "${CURRENT_PACKAGES_DIR}/lib" RENAME "libdiscord_game_sdk.so") + file(INSTALL "${SOURCE_PATH}/lib/${ARCH_FOLDER}/discord_game_sdk.so" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib" RENAME "libdiscord_game_sdk.so") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + "-DSDK_LIB_FOLDER=${CURRENT_PACKAGES_DIR}/lib" +) +vcpkg_install_cmake() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/vcpkg/ports/discord-game-sdk/usage b/vcpkg/ports/discord-game-sdk/usage new file mode 100644 index 0000000..11faa0c --- /dev/null +++ b/vcpkg/ports/discord-game-sdk/usage @@ -0,0 +1,12 @@ +The package discord-game-sdk does not provides CMake integration: + + find_library(GAME_SDK discord_game_sdk) + target_link_libraries( PRIVATE ${GAME_SDK}) + + find_path(GAME_SDK_INCLUDE discord-game-sdk/discord.h) + target_include_directories( PRIVATE ${GAME_SDK_INCLUDE}) + +The C++ SDK source code is compiled in a static library: + + find_library(CPP_GAME_SDK discord_game_sdk_cpp) + target_link_libraries( PRIVATE ${CPP_GAME_SDK}) diff --git a/vcpkg/ports/discord-rpc/CONTROL b/vcpkg/ports/discord-rpc/CONTROL new file mode 100644 index 0000000..094c4ea --- /dev/null +++ b/vcpkg/ports/discord-rpc/CONTROL @@ -0,0 +1,5 @@ +Source: discord-rpc +Version: 3.4.0 +Homepage: https://github.com/discordapp/discord-rpc +Description: Rich Presence allows you to leverage the totally overhauled "Now Playing" section in a Discord user's profile to help people play your game together. +Build-Depends: rapidjson diff --git a/vcpkg/ports/discord-rpc/disable-downloading.patch b/vcpkg/ports/discord-rpc/disable-downloading.patch new file mode 100644 index 0000000..bb85049 --- /dev/null +++ b/vcpkg/ports/discord-rpc/disable-downloading.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5dad9e9..961f02d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,6 +12,7 @@ file(GLOB_RECURSE ALL_SOURCE_FILES + src/*.cpp src/*.h src/*.c + ) + ++if(0) + # Set CLANG_FORMAT_SUFFIX if you are using custom clang-format, e.g. clang-format-5.0 + find_program(CLANG_FORMAT_CMD clang-format${CLANG_FORMAT_SUFFIX}) + +@@ -43,7 +44,7 @@ if (NOT RAPIDJSONTEST) + ) + file(REMOVE ${RJ_TAR_FILE}) + endif(NOT RAPIDJSONTEST) +- ++endif() + find_file(RAPIDJSON NAMES rapidjson rapidjson-1.1.0 PATHS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty CMAKE_FIND_ROOT_PATH_BOTH) + + add_library(rapidjson STATIC IMPORTED ${RAPIDJSON}) diff --git a/vcpkg/ports/discord-rpc/portfile.cmake b/vcpkg/ports/discord-rpc/portfile.cmake new file mode 100644 index 0000000..b4d191b --- /dev/null +++ b/vcpkg/ports/discord-rpc/portfile.cmake @@ -0,0 +1,36 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO discordapp/discord-rpc + REF v3.4.0 + SHA512 ca981b833aff5f21fd629a704deadd8e3fb5423d959ddb75e381313f6462d984c567671b10c8f031905c08d85792ddbe2dddc402ba2613c42de9e80fc68d0d51 + HEAD_REF master + PATCHES disable-downloading.patch +) + +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_CRT) +file(REMOVE_RECURSE ${SOURCE_PATH}/thirdparty) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DUSE_STATIC_CRT=${STATIC_CRT} + -DBUILD_EXAMPLES=OFF + -DRAPIDJSONTEST=TRUE + -DRAPIDJSON=${CURRENT_INSTALLED_DIR} +) + +if(EXISTS ${SOURCE_PATH}/thirdparty) + message(FATAL_ERROR "The source directory should not be modified during the build.") +endif() + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Copy copright information +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/discord-rpc" RENAME "copyright") + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/discount/CONTROL b/vcpkg/ports/discount/CONTROL new file mode 100644 index 0000000..51c8b5e --- /dev/null +++ b/vcpkg/ports/discount/CONTROL @@ -0,0 +1,4 @@ +Source: discount +Version: 2.2.6 +Homepage: https://github.com/Orc/discount +Description: DISCOUNT is a implementation of John Gruber & Aaron Swartz's Markdown markup language. diff --git a/vcpkg/ports/discount/blocktags b/vcpkg/ports/discount/blocktags new file mode 100644 index 0000000..dfd3957 --- /dev/null +++ b/vcpkg/ports/discount/blocktags @@ -0,0 +1,34 @@ +static struct kw blocktags[] = { + { "P", 1, 0 }, + { "DL", 2, 0 }, + { "H1", 2, 0 }, + { "H2", 2, 0 }, + { "H3", 2, 0 }, + { "H4", 2, 0 }, + { "H5", 2, 0 }, + { "H6", 2, 0 }, + { "HR", 2, 1 }, + { "OL", 2, 0 }, + { "UL", 2, 0 }, + { "BDO", 3, 0 }, + { "DFN", 3, 0 }, + { "DIV", 3, 0 }, + { "MAP", 3, 0 }, + { "PRE", 3, 0 }, + { "WBR", 3, 0 }, + { "XMP", 3, 0 }, + { "FORM", 4, 0 }, + { "NOBR", 4, 0 }, + { "STYLE", 5, 0 }, + { "TABLE", 5, 0 }, + { "CENTER", 6, 0 }, + { "IFRAME", 6, 0 }, + { "OBJECT", 6, 0 }, + { "SCRIPT", 6, 0 }, + { "ADDRESS", 7, 0 }, + { "LISTING", 7, 0 }, + { "PLAINTEXT", 9, 0 }, + { "BLOCKQUOTE", 10, 0 }, +}; + +#define NR_blocktags 30 diff --git a/vcpkg/ports/discount/cmake.patch b/vcpkg/ports/discount/cmake.patch new file mode 100644 index 0000000..8a2278c --- /dev/null +++ b/vcpkg/ports/discount/cmake.patch @@ -0,0 +1,27 @@ +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +index 3895fdb..a183836 100644 +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt +@@ -182,7 +182,10 @@ if(${PROJECT_NAME}_MAKE_INSTALL) + target_include_directories(libmarkdown INTERFACE + $ + ) +- set(_TARGETS libmarkdown markdown) ++ set(_TARGETS libmarkdown) ++ if(NOT ${PROJECT_NAME}_ONLY_LIBRARY) ++ set(_TARGETS ${_TARGETS} markdown) ++ endif() + if(${PROJECT_NAME}_INSTALL_SAMPLES) + list(APPEND _TARGETS mkd2html makepage) + endif() +diff --git a/cmake/config.h.in b/cmake/config.h.in +index e08220d..e630934 100644 +--- a/cmake/config.h.in ++++ b/cmake/config.h.in +@@ -74,4 +74,6 @@ + + #define TABSTOP @TABSTOP@ + ++#define DESTRUCTOR ++ + #endif /* _CONFIG_D */ diff --git a/vcpkg/ports/discount/disable-deprecated-warnings.patch b/vcpkg/ports/discount/disable-deprecated-warnings.patch new file mode 100644 index 0000000..e8f4f0f --- /dev/null +++ b/vcpkg/ports/discount/disable-deprecated-warnings.patch @@ -0,0 +1,16 @@ +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +index 11fa675..34cc9ed 100644 +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt +@@ -20,6 +20,11 @@ set(${PROJECT_NAME}_INSTALL_SAMPLES OFF CACHE BOOL + set(${PROJECT_NAME}_ONLY_LIBRARY OFF CACHE BOOL + "Set to ON to only build markdown library (default is OFF)") + ++# MSVC deprecated warnings (C4996,strdup, ...) ++if(MSVC) ++ add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS) ++endif() ++ + # Check headers + include(CheckIncludeFile) + check_include_file(libgen.h HAVE_LIBGEN_H) diff --git a/vcpkg/ports/discount/generate-blocktags-command.patch b/vcpkg/ports/discount/generate-blocktags-command.patch new file mode 100644 index 0000000..13d63a2 --- /dev/null +++ b/vcpkg/ports/discount/generate-blocktags-command.patch @@ -0,0 +1,29 @@ +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +index a183836..e9deef5 100644 +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt +@@ -113,12 +115,19 @@ configure_file("${_ROOT}/mkdio.h.in" + + include_directories("${_ROOT}") + +-add_executable(mktags +- "${_ROOT}/mktags.c") + +-add_custom_command(OUTPUT "${_ROOT}/blocktags" +- COMMAND mktags > blocktags +- WORKING_DIRECTORY "${_ROOT}") ++if(NOT GENERATE_BLOCKTAGS) ++ message(STATUS "Not generating blocktags") ++else() ++ message(STATUS "Using mktags to generate blocktags") ++ ++ add_executable(mktags ++ "${_ROOT}/mktags.c") ++ ++ add_custom_command(OUTPUT "${_ROOT}/blocktags" ++ COMMAND mktags > blocktags ++ WORKING_DIRECTORY "${_ROOT}") ++endif() + + add_library(libmarkdown + "${_ROOT}/mkdio.c" diff --git a/vcpkg/ports/discount/portfile.cmake b/vcpkg/ports/discount/portfile.cmake new file mode 100644 index 0000000..6a40d51 --- /dev/null +++ b/vcpkg/ports/discount/portfile.cmake @@ -0,0 +1,45 @@ +include(vcpkg_common_functions) + +# No dynamic link for MSVC +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Orc/discount + REF v2.2.6 + SHA512 4c5956dea78aacd3a105ddac13f1671d811a5b2b04990cdf8485c36190c8872c4b1b9432a7236f669c34b07564ecd0096632dced54d67de9eaf4f23641417ecc + HEAD_REF master + PATCHES + cmake.patch + generate-blocktags-command.patch + disable-deprecated-warnings.patch +) + +set(GENERATE_BLOCKTAGS ON) +if(VCPKG_TARGET_ARCHITECTURE MATCHES "arm" OR VCPKG_TARGET_ARCHITECTURE MATCHES "arm64" OR VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore") + set(GENERATE_BLOCKTAGS OFF) +endif() + +if(NOT GENERATE_BLOCKTAGS) + configure_file("${CURRENT_PORT_DIR}/blocktags" "${SOURCE_PATH}/blocktags" COPYONLY) + message(STATUS "Copied blocktags") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}/cmake" + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DDISCOUNT_ONLY_LIBRARY=ON + -DGENERATE_BLOCKTAGS=${GENERATE_BLOCKTAGS} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/discount) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/COPYRIGHT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/discount" RENAME copyright) + diff --git a/vcpkg/ports/distorm/CMakeLists.txt b/vcpkg/ports/distorm/CMakeLists.txt new file mode 100644 index 0000000..6f6e204 --- /dev/null +++ b/vcpkg/ports/distorm/CMakeLists.txt @@ -0,0 +1,37 @@ +cmake_minimum_required(VERSION 3.8.0) +project(distorm C) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS -DNOMINMAX) +endif() + +include_directories(include src) + +add_library(distorm + src/decoder.c + src/distorm.c + src/instructions.c + src/insts.c + src/mnemonics.c + src/operands.c + src/prefix.c + src/textdefs.c + src/wstring.c +) + +if(BUILD_SHARED_LIBS) + target_compile_definitions(distorm PRIVATE -DDISTORM_DYNAMIC=1 -DSUPPORT_64BIT_OFFSET=1) +else() + target_compile_definitions(distorm PRIVATE -DDISTORM_STATIC=1 -DSUPPORT_64BIT_OFFSET=1) +endif() + +install( + TARGETS distorm + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES include/distorm.h include/mnemonics.h DESTINATION include) +endif() diff --git a/vcpkg/ports/distorm/CONTROL b/vcpkg/ports/distorm/CONTROL new file mode 100644 index 0000000..620dfa9 --- /dev/null +++ b/vcpkg/ports/distorm/CONTROL @@ -0,0 +1,3 @@ +Source: distorm +Version: 3.4.1 +Description: Powerful Disassembler Library For x86/AMD64 \ No newline at end of file diff --git a/vcpkg/ports/distorm/portfile.cmake b/vcpkg/ports/distorm/portfile.cmake new file mode 100644 index 0000000..b1066cc --- /dev/null +++ b/vcpkg/ports/distorm/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO gdabah/distorm + REF v3.4.1 + SHA512 0e9f8b62bc190ef7d516f1902b6003adef9c7d5d4a5f985fb0bdfc5d4838b2805e2b8836b02d5eccdb3401e814417de615dec675aed9e606c93122ca8a0d2083 + 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() +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/distorm RENAME copyright) diff --git a/vcpkg/ports/dlfcn-win32/CONTROL b/vcpkg/ports/dlfcn-win32/CONTROL new file mode 100644 index 0000000..69968ae --- /dev/null +++ b/vcpkg/ports/dlfcn-win32/CONTROL @@ -0,0 +1,4 @@ +Source: dlfcn-win32 +Version: 1.1.1-4 +Homepage: https://github.com/dlfcn-win32/dlfcn-win32 +Description: dlfcn-win32 is an implementation of dlfcn for Windows. diff --git a/vcpkg/ports/dlfcn-win32/portfile.cmake b/vcpkg/ports/dlfcn-win32/portfile.cmake new file mode 100644 index 0000000..1e1fdcc --- /dev/null +++ b/vcpkg/ports/dlfcn-win32/portfile.cmake @@ -0,0 +1,30 @@ +set(SOURCE_VERSION 1.1.1) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dlfcn-win32/dlfcn-win32 + REF v${SOURCE_VERSION} + SHA512 557729511546f574487f8c7de437c53bcf5ae11640349c338ead9965a4ac0f937de647839b63c821003be54dca5bcbf28f2899d2348acf7dfef31e487da1cba1 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(READ ${CURRENT_PACKAGES_DIR}/debug/share/dlfcn-win32/dlfcn-win32-targets-debug.cmake dlfcn-win32_DEBUG_MODULE) +string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" dlfcn-win32_DEBUG_MODULE "${dlfcn-win32_DEBUG_MODULE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/dlfcn-win32/dlfcn-win32-targets-debug.cmake "${dlfcn-win32_DEBUG_MODULE}") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) + +set(VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS enabled) diff --git a/vcpkg/ports/dlib/CONTROL b/vcpkg/ports/dlib/CONTROL new file mode 100644 index 0000000..f651f9d --- /dev/null +++ b/vcpkg/ports/dlib/CONTROL @@ -0,0 +1,19 @@ +Source: dlib +Version: 19.21 +Port-Version: 4 +Build-Depends: libjpeg-turbo, libpng, openblas, lapack +Homepage: https://github.com/davisking/dlib +Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ +Default-Features: fftw3, sqlite3 + +Feature: cuda +Build-Depends: cuda +Description: CUDA support for dlib + +Feature: fftw3 +Build-Depends: fftw3 +Description: fftw3 support for dlib + +Feature: sqlite3 +Build-Depends: sqlite3 +Description: sqlite3 support for dlib diff --git a/vcpkg/ports/dlib/find_blas.patch b/vcpkg/ports/dlib/find_blas.patch new file mode 100644 index 0000000..3ea8d30 --- /dev/null +++ b/vcpkg/ports/dlib/find_blas.patch @@ -0,0 +1,11 @@ +--- a/dlib/cmake_utils/find_blas.cmake ++++ b/dlib/cmake_utils/find_blas.cmake +@@ -414,7 +414,7 @@ + if (lapack_found) + include(CheckFunctionExists) + include(CheckFortranFunctionExists) +- set(CMAKE_REQUIRED_LIBRARIES ${lapack_libraries}) ++ set(CMAKE_REQUIRED_LIBRARIES ${lapack_libraries} ${blas_libraries}) + + check_function_exists("sgesv" LAPACK_FOUND_C_UNMANGLED) + check_function_exists("sgesv_" LAPACK_FOUND_C_MANGLED) diff --git a/vcpkg/ports/dlib/fix-sqlite3-fftw-linkage.patch b/vcpkg/ports/dlib/fix-sqlite3-fftw-linkage.patch new file mode 100644 index 0000000..41ba700 --- /dev/null +++ b/vcpkg/ports/dlib/fix-sqlite3-fftw-linkage.patch @@ -0,0 +1,57 @@ +diff --git a/dlib/CMakeLists.txt b/dlib/CMakeLists.txt +--- a/dlib/CMakeLists.txt ++++ b/dlib/CMakeLists.txt +@@ -747,32 +750,15 @@ + + + if (DLIB_LINK_WITH_SQLITE3) +- find_library(sqlite sqlite3) +- # make sure sqlite3.h is in the include path +- find_path(sqlite_path sqlite3.h) +- if (sqlite AND sqlite_path) +- set(dlib_needed_includes ${dlib_needed_includes} ${sqlite_path}) +- set(dlib_needed_libraries ${dlib_needed_libraries} ${sqlite} ) +- else() +- set(DLIB_LINK_WITH_SQLITE3 OFF CACHE STRING ${DLIB_LINK_WITH_SQLITE3_STR} FORCE ) +- endif() +- mark_as_advanced(sqlite sqlite_path) ++ find_package(unofficial-sqlite3 CONFIG) ++ set(dlib_needed_libraries ${dlib_needed_libraries} unofficial::sqlite3::sqlite3) + endif() + + + + if (DLIB_USE_FFTW) +- find_library(fftw fftw3) +- # make sure fftw3.h is in the include path +- find_path(fftw_path fftw3.h) +- if (fftw AND fftw_path) +- set(dlib_needed_includes ${dlib_needed_includes} ${fftw_path}) +- set(dlib_needed_libraries ${dlib_needed_libraries} ${fftw} ) +- else() +- set(DLIB_USE_FFTW OFF CACHE STRING ${DLIB_USE_FFTW_STR} FORCE ) +- toggle_preprocessor_switch(DLIB_USE_FFTW) +- endif() +- mark_as_advanced(fftw fftw_path) ++ find_package(FFTW3 CONFIG) ++ set(dlib_needed_libraries ${dlib_needed_libraries} FFTW3::fftw3) + endif() + + +--- a/dlib/cmake_utils/dlibConfig.cmake.in ++++ b/dlib/cmake_utils/dlibConfig.cmake.in +@@ -28,6 +28,14 @@ + include("${dlib_CMAKE_DIR}/dlib.cmake") + endif() + ++include(CMakeFindDependencyMacro) ++if("@DLIB_USE_FFTW@") ++ find_dependency(FFTW3 CONFIG) ++endif() ++if("@DLIB_LINK_WITH_SQLITE3@") ++ find_dependency(unofficial-sqlite3 CONFIG) ++endif() ++ + set(dlib_LIBRARIES dlib::dlib) + set(dlib_LIBS dlib::dlib) + set(dlib_INCLUDE_DIRS "@CMAKE_INSTALL_FULL_INCLUDEDIR@" "@dlib_needed_includes@") diff --git a/vcpkg/ports/dlib/force_finding_packages.patch b/vcpkg/ports/dlib/force_finding_packages.patch new file mode 100644 index 0000000..558b75f --- /dev/null +++ b/vcpkg/ports/dlib/force_finding_packages.patch @@ -0,0 +1,44 @@ +diff --git a/dlib/cmake_utils/find_libjpeg.cmake b/dlib/cmake_utils/find_libjpeg.cmake +index 3b9e656..d741f31 100644 +--- a/dlib/cmake_utils/find_libjpeg.cmake ++++ b/dlib/cmake_utils/find_libjpeg.cmake +@@ -14,7 +14,7 @@ if (DEFINED JPEG_FOUND) + return() + endif() + +-find_package(JPEG QUIET) ++find_package(JPEG REQUIRED) + + if(JPEG_FOUND) + set(JPEG_TEST_CMAKE_FLAGS +@@ -31,7 +31,7 @@ if(JPEG_FOUND) + message (STATUS "Found system copy of libjpeg: ${JPEG_LIBRARY}") + if(NOT test_for_libjpeg_worked) + set(JPEG_FOUND 0) +- message (STATUS "System copy of libjpeg is broken or too old. Will build our own libjpeg and use that instead.") ++ message (FATAL_ERROR "System copy of libjpeg is broken or too old. Will build our own libjpeg and use that instead.") + endif() + endif() + +diff --git a/dlib/cmake_utils/find_libpng.cmake b/dlib/cmake_utils/find_libpng.cmake +index 1b35604..489a4c8 100644 +--- a/dlib/cmake_utils/find_libpng.cmake ++++ b/dlib/cmake_utils/find_libpng.cmake +@@ -14,7 +14,7 @@ if (DEFINED PNG_FOUND) + return() + endif() + +-find_package(PNG QUIET) ++find_package(PNG REQUIRED) + + if(PNG_FOUND) + set(PNG_TEST_CMAKE_FLAGS +@@ -31,7 +31,7 @@ if(PNG_FOUND) + message (STATUS "Found system copy of libpng: ${PNG_LIBRARIES}") + if(NOT test_for_libpng_worked) + set(PNG_FOUND 0) +- message (STATUS "System copy of libpng is broken. Will build our own libpng and use that instead.") ++ message (FATAL_ERROR "System copy of libpng is broken. Will build our own libpng and use that instead.") + endif() + endif() + diff --git a/vcpkg/ports/dlib/portfile.cmake b/vcpkg/ports/dlib/portfile.cmake new file mode 100644 index 0000000..00f45d2 --- /dev/null +++ b/vcpkg/ports/dlib/portfile.cmake @@ -0,0 +1,78 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO davisking/dlib + REF v19.21 + SHA512 57133cdcbc5017d324a368ff36a628de55001f1ec0b3ac078b4ad49a63c8c9fb48674617c6a5838ca4e381a6b001fe4aa5a7b3353eb288c58062d2a8fc7b171e + HEAD_REF master + PATCHES + fix-sqlite3-fftw-linkage.patch + force_finding_packages.patch + find_blas.patch +) + +file(REMOVE_RECURSE ${SOURCE_PATH}/dlib/external/libjpeg) +file(REMOVE_RECURSE ${SOURCE_PATH}/dlib/external/libpng) +file(REMOVE_RECURSE ${SOURCE_PATH}/dlib/external/zlib) + +# This fixes static builds; dlib doesn't pull in the needed transitive dependencies +file(READ "${SOURCE_PATH}/dlib/CMakeLists.txt" DLIB_CMAKE) +string(REPLACE "PNG_LIBRARY" "PNG_LIBRARIES" DLIB_CMAKE "${DLIB_CMAKE}") +file(WRITE "${SOURCE_PATH}/dlib/CMakeLists.txt" "${DLIB_CMAKE}") + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + "sqlite3" DLIB_LINK_WITH_SQLITE3 + "fftw3" DLIB_USE_FFTW + "cuda" DLIB_USE_CUDA +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DDLIB_PNG_SUPPORT=ON + -DDLIB_JPEG_SUPPORT=ON + -DDLIB_USE_BLAS=ON + -DDLIB_USE_LAPACK=ON + -DDLIB_GIF_SUPPORT=OFF + -DDLIB_USE_MKL_FFT=OFF + -DCMAKE_DEBUG_POSTFIX=d + OPTIONS_DEBUG + -DDLIB_ENABLE_ASSERTS=ON + #-DDLIB_ENABLE_STACK_TRACE=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/dlib) + +# There is no way to suppress installation of the headers and resource files in debug build. +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Remove other files not required in package +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/all) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/appveyor) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/test) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/travis) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_neon) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_cudnn) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_cuda) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_cpp11) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_avx) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_sse4) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_libjpeg) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_libpng) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/external/libpng/arm) + +# Dlib encodes debug/release in its config.h. Patch it to respond to the NDEBUG macro instead. +file(READ ${CURRENT_PACKAGES_DIR}/include/dlib/config.h _contents) +string(REPLACE "/* #undef ENABLE_ASSERTS */" "#if defined(_DEBUG)\n#define ENABLE_ASSERTS\n#endif" _contents ${_contents}) +string(REPLACE "#define DLIB_DISABLE_ASSERTS" "#if !defined(_DEBUG)\n#define DLIB_DISABLE_ASSERTS\n#endif" _contents ${_contents}) +file(WRITE ${CURRENT_PACKAGES_DIR}/include/dlib/config.h "${_contents}") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/dlib/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) diff --git a/vcpkg/ports/dmlc/CONTROL b/vcpkg/ports/dmlc/CONTROL new file mode 100644 index 0000000..8bf079c --- /dev/null +++ b/vcpkg/ports/dmlc/CONTROL @@ -0,0 +1,9 @@ +Source: dmlc +Version: 2019-08-12-4 +Homepage: https://github.com/dmlc/dmlc-core +Description: DMLC-Core is the backbone library to support all DMLC projects, offers the bricks to build efficient and scalable distributed machine learning libraries. +Default-Features: openmp +Supports: !uwp + +Feature: openmp +Description: Build with openmp \ No newline at end of file diff --git a/vcpkg/ports/dmlc/portfile.cmake b/vcpkg/ports/dmlc/portfile.cmake new file mode 100644 index 0000000..fd33962 --- /dev/null +++ b/vcpkg/ports/dmlc/portfile.cmake @@ -0,0 +1,39 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dmlc/dmlc-core + REF d3fd7c5e9b9c280d3081ada3fb62705547c00bf1 + SHA512 6887d52ddd00949866c27bea3c860abb8a7ecf61feeac79d67d260635e9c3e490b6f0538cbc0ccc1f03e90ab4094bfc0fcb938adb3fb5afe9fea813d47cc7430 + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + openmp ENABLE_OPENMP +) + +if(VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(DMLC_FORCE_SHARED_CRT ON) +else() + set(DMLC_FORCE_SHARED_CRT OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DDMLC_FORCE_SHARED_CRT=${DMLC_FORCE_SHARED_CRT} + -DUSE_OPENMP=${ENABLE_OPENMP} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/dmlc) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/docopt/001-fix-unresolved-symbol.patch b/vcpkg/ports/docopt/001-fix-unresolved-symbol.patch new file mode 100644 index 0000000..3078fa4 --- /dev/null +++ b/vcpkg/ports/docopt/001-fix-unresolved-symbol.patch @@ -0,0 +1,28 @@ +diff --git a/docopt.h b/docopt.h +index 4c40741..06a04f8 100644 +--- a/docopt.h ++++ b/docopt.h +@@ -85,6 +85,9 @@ namespace docopt { + bool help = true, + std::string const& version = {}, + bool options_first = false) noexcept; ++ ++ /// Write out the contents to the ostream ++ std::ostream DOCOPT_API & operator<<(std::ostream&, value const&); + } + + #ifdef DOCOPT_HEADER_ONLY +diff --git a/docopt_value.h b/docopt_value.h +index a923219..7f0d6d6 100644 +--- a/docopt_value.h ++++ b/docopt_value.h +@@ -102,9 +102,6 @@ namespace docopt { + Kind kind = Kind::Empty; + Variant variant {}; + }; +- +- /// Write out the contents to the ostream +- std::ostream& operator<<(std::ostream&, value const&); + } + + namespace std { diff --git a/vcpkg/ports/docopt/002-fix-install-path.patch b/vcpkg/ports/docopt/002-fix-install-path.patch new file mode 100644 index 0000000..332e6e4 --- /dev/null +++ b/vcpkg/ports/docopt/002-fix-install-path.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1aba5ae..5407e4a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -113,7 +113,10 @@ endif() + set(export_name "docopt-targets") + + # Runtime package +-install(TARGETS docopt EXPORT ${export_name} DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++install(TARGETS docopt EXPORT ${export_name} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + + # Development package + install(TARGETS docopt_s EXPORT ${export_name} DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/vcpkg/ports/docopt/CONTROL b/vcpkg/ports/docopt/CONTROL new file mode 100644 index 0000000..b659943 --- /dev/null +++ b/vcpkg/ports/docopt/CONTROL @@ -0,0 +1,3 @@ +Source: docopt +Version: 2018-11-01 +Description: Command line arguments parser that will make you smile (C++11 port). diff --git a/vcpkg/ports/docopt/install-one-flavor.patch b/vcpkg/ports/docopt/install-one-flavor.patch new file mode 100644 index 0000000..f6cda82 --- /dev/null +++ b/vcpkg/ports/docopt/install-one-flavor.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bff867c..cc7d706 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -113,13 +113,15 @@ endif() + set(export_name "docopt-targets") + + # Runtime package ++if(BUILD_SHARED_LIBS) + install(TARGETS docopt EXPORT ${export_name} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +- ++else() + # Development package + install(TARGETS docopt_s EXPORT ${export_name} DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++endif() + install(FILES ${docopt_HEADERS} DESTINATION include/docopt) + + # CMake Package diff --git a/vcpkg/ports/docopt/portfile.cmake b/vcpkg/ports/docopt/portfile.cmake new file mode 100644 index 0000000..ec3a764 --- /dev/null +++ b/vcpkg/ports/docopt/portfile.cmake @@ -0,0 +1,46 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO docopt/docopt.cpp + REF 7476f8e56b4650aaeafb4e1cda2e5d8f01fddd97 + SHA512 6765e8a3a834ad75bd87effee5ac7e174482039d26015346b95d7d64e4e0097cc3f1f2e6fd9e3e5970bf4c5719095c0a3e5edfac18217913dc88fbe569d37ae8 + HEAD_REF master + PATCHES + 001-fix-unresolved-symbol.patch + 002-fix-install-path.patch + install-one-flavor.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DWITH_EXAMPLE=OFF + -DWITH_TESTS=OFF + -DUSE_BOOST_REGEX=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/docopt) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(READ ${CURRENT_PACKAGES_DIR}/include/docopt/docopt.h _contents) + string(REPLACE "#ifdef DOCOPT_DLL" "#if 1" _contents "${_contents}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/docopt/docopt.h "${_contents}") +endif() + +# Header-only style when DOCOPT_HEADER_ONLY is defined +file(COPY + ${SOURCE_PATH}/docopt.cpp + DESTINATION ${CURRENT_PACKAGES_DIR}/include/docopt) + +# Handle copyright +file(INSTALL + ${SOURCE_PATH}/LICENSE-MIT + DESTINATION ${CURRENT_PACKAGES_DIR}/share/docopt RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/doctest/CONTROL b/vcpkg/ports/doctest/CONTROL new file mode 100644 index 0000000..e7c29c1 --- /dev/null +++ b/vcpkg/ports/doctest/CONTROL @@ -0,0 +1,4 @@ +Source: doctest +Version: 2.4.0 +Homepage: https://github.com/onqtam/doctest +Description: The fastest feature-rich C++ single-header testing framework for unit tests and TDD diff --git a/vcpkg/ports/doctest/portfile.cmake b/vcpkg/ports/doctest/portfile.cmake new file mode 100644 index 0000000..fdd9cc7 --- /dev/null +++ b/vcpkg/ports/doctest/portfile.cmake @@ -0,0 +1,21 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO onqtam/doctest + REF 1c8da00c978c19e00a434b2b1f854fcffc9fba35 #version 2.4.0 + SHA512 aa0d10a0fbd6d3b9f89c3d909bce332804610390a310c3f6ac89c44c76a07f00a8770d30d6481627572bdbd9dabccfe6c6f9f7b5fb6b323bf5120ec623dd358f + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DDOCTEST_WITH_TESTS=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/doctest) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) \ No newline at end of file diff --git a/vcpkg/ports/double-conversion/CONTROL b/vcpkg/ports/double-conversion/CONTROL new file mode 100644 index 0000000..215bb77 --- /dev/null +++ b/vcpkg/ports/double-conversion/CONTROL @@ -0,0 +1,4 @@ +Source: double-conversion +Version: 3.1.5 +Homepage: https://github.com/google/double-conversion +Description: Efficient binary-decimal and decimal-binary conversion routines for IEEE doubles. diff --git a/vcpkg/ports/double-conversion/portfile.cmake b/vcpkg/ports/double-conversion/portfile.cmake new file mode 100644 index 0000000..f5ebb40 --- /dev/null +++ b/vcpkg/ports/double-conversion/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/double-conversion + REF v3.1.5 + SHA512 0aeabdbfa06c3c4802905ac4bf8c2180840577677b47d45e1c91034fe07746428c9db79260ce6bdbdf8b584746066cea9247ba43a9c38155caf1ef44e214180a + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +# Rename exported target files into something vcpkg_fixup_cmake_targets expects +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/double-conversion) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/double-conversion) +endif() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/double-conversion/copyright COPYONLY) diff --git a/vcpkg/ports/dpdk/CMakeLists.txt b/vcpkg/ports/dpdk/CMakeLists.txt new file mode 100644 index 0000000..1952227 --- /dev/null +++ b/vcpkg/ports/dpdk/CMakeLists.txt @@ -0,0 +1,63 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 3.9) +PROJECT(dpdk C) + +LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}") +LIST(APPEND CMAKE_PREFIX_PATH "${CMAKE_SOURCE_DIR}") + +INCLUDE(ProcessorCount) +PROCESSORCOUNT(PROCS) + +#ARCH can be: i686, x86_64, ppc_64, arm64 +#MACHINE can be: native, power8, armv8a +#EXECENV can be: linuxapp, bsdapp +#TOOLCHAIN can be: gcc, icc + +SET(ARCH x86_64) +SET(MACHINE native) +SET(EXECENV linuxapp) +SET(TOOLCHAIN gcc) + +IF (CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$") + SET(ARCH "i686") +ELSEIF (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm") + SET(MACHINE arm8a) +ELSEIF (CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64") + SET(MACHINE power8) + SET(ARCH ppc_64) +ENDIF () + +IF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + SET(EXECENV bsdapp) +ENDIF () + +FIND_PACKAGE(Numa REQUIRED) +FIND_PROGRAM(MAKE make) + +SET(DPDK_CFLAGS "-fPIC") +IF (CMAKE_BUILD_TYPE STREQUAL Debug) + STRING(APPEND ${DPDK_CFLAGS} "-O0 -g") +ENDIF () + +SET(DPDK_TARGET ${ARCH}-${MACHINE}-${EXECENV}-${TOOLCHAIN}) +#SET(DPDK_CONFIG O=${CMAKE_BUILD_TYPE}/build T=${DPDK_TARGET}) +SET(DPDK_CONFIG "T=${DPDK_TARGET}") + +IF (SOURCE_PATH) + SET(CMAKE_SOURCE_DIR ${SOURCE_PATH}) +ENDIF () + +ADD_CUSTOM_TARGET(dpdk-configure + COMMAND ${MAKE} config ${DPDK_CONFIG} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/ + VERBATIM + ) + +ADD_CUSTOM_TARGET(dpdk ALL + COMMAND ${MAKE} EXTRA_CFLAGS=\"${DPDK_CFLAGS}\" MAKEFLAGS=\"${DPDK_CONFIG} -j ${PROCS}\" + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/ + ) + +ADD_DEPENDENCIES(dpdk dpdk-configure) + +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/build/lib + DESTINATION ${CMAKE_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/) diff --git a/vcpkg/ports/dpdk/CONTROL b/vcpkg/ports/dpdk/CONTROL new file mode 100644 index 0000000..53d79f7 --- /dev/null +++ b/vcpkg/ports/dpdk/CONTROL @@ -0,0 +1,4 @@ +Source: dpdk +Version: 19.02 +Description: A set of libraries and drivers for fast packet processing +Supports: linux diff --git a/vcpkg/ports/dpdk/FindNuma.cmake b/vcpkg/ports/dpdk/FindNuma.cmake new file mode 100644 index 0000000..d5bb614 --- /dev/null +++ b/vcpkg/ports/dpdk/FindNuma.cmake @@ -0,0 +1,26 @@ +INCLUDE(FindPackageHandleStandardArgs) + +FIND_PATH(NUMA_ROOT_DIR + NAMES include/numa.h + PATHS ENV NUMA_ROOT + DOC "NUMA library root directory") + +FIND_PATH(NUMA_INCLUDE_DIR + NAMES numa.h + HINTS ${NUMA_ROOT_DIR} + PATH_SUFFIXES include + DOC "NUMA include directory") + +FIND_LIBRARY(NUMA_LIBRARY + NAMES numa + HINTS ${NUMA_ROOT_DIR} + DOC "NUMA library file") + +IF (NUMA_LIBRARY) + GET_FILENAME_COMPONENT(NUMA_LIBRARY_DIR ${NUMA_LIBRARY} PATH) + MARK_AS_ADVANCED(NUMA_INCLUDE_DIR NUMA_LIBRARY_DIR NUMA_LIBRARY) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(NUMA REQUIRED_VARS NUMA_ROOT_DIR NUMA_INCLUDE_DIR NUMA_LIBRARY) +ELSE () + SET(NUMA_FOUND FALSE) + MESSAGE(FATAL_ERROR "Numa library not found.\nTry: 'sudo yum install numactl numactl-devel' (or sudo apt-get install libnuma1 libnuma-dev)") +ENDIF () diff --git a/vcpkg/ports/dpdk/dpdkConfig.cmake b/vcpkg/ports/dpdk/dpdkConfig.cmake new file mode 100644 index 0000000..d60265a --- /dev/null +++ b/vcpkg/ports/dpdk/dpdkConfig.cmake @@ -0,0 +1,31 @@ + +FUNCTION(SET_LIBRARY_TARGET NAMESPACE LIB_NAME DEBUG_LIB_FILE_NAME RELEASE_LIB_FILE_NAME INCLUDE_DIR) + ADD_LIBRARY(${NAMESPACE}::${LIB_NAME} STATIC IMPORTED) + SET_TARGET_PROPERTIES(${NAMESPACE}::${LIB_NAME} PROPERTIES + IMPORTED_CONFIGURATIONS "RELEASE;DEBUG" + IMPORTED_LOCATION_RELEASE "${RELEASE_LIB_FILE_NAME}" + IMPORTED_LOCATION_DEBUG "${DEBUG_LIB_FILE_NAME}" + INTERFACE_INCLUDE_DIRECTORIES "${INCLUDE_DIR}" + ) + SET(${NAMESPACE}_${LIB_NAME}_FOUND 1) +ENDFUNCTION() + +GET_FILENAME_COMPONENT(DPDK_ROOT "${CMAKE_CURRENT_LIST_FILE}" PATH) +GET_FILENAME_COMPONENT(DPDK_ROOT "${DPDK_ROOT}" PATH) +GET_FILENAME_COMPONENT(DPDK_ROOT "${DPDK_ROOT}" PATH) + +SET_LIBRARY_TARGET("DPDK" "dpdk" "${DPDK_ROOT}/debug/lib/libdpdk.a" "${DPDK_ROOT}/lib/libdpdk.a" "${DPDK_ROOT}/include/dpdk") + +IF (CMAKE_BUILD_TYPE STREQUAL Debug) + LINK_DIRECTORIES(${DPDK_ROOT}/debug/lib/) +ELSE () + LINK_DIRECTORIES(${DPDK_ROOT}/lib/) +ENDIF () + +FILE(GLOB DPDK_LIBS ${DPDK_ROOT}/lib/librte*.*) +FOREACH (LIB_FILE_NAME ${DPDK_LIBS}) + GET_FILENAME_COMPONENT(LIB_NAME ${LIB_FILE_NAME} NAME_WE) + GET_FILENAME_COMPONENT(FULL_LIB_NAME ${LIB_FILE_NAME} NAME) + STRING(REPLACE "lib" "" LIB_NAME "${LIB_NAME}") + SET_LIBRARY_TARGET("DPDK" "${LIB_NAME}" "${DPDK_ROOT}/debug/lib/${FULL_LIB_NAME}" "${DPDK_ROOT}/lib/${FULL_LIB_NAME}" "${DPDK_ROOT}/include/dpdk") +ENDFOREACH () diff --git a/vcpkg/ports/dpdk/portfile.cmake b/vcpkg/ports/dpdk/portfile.cmake new file mode 100644 index 0000000..603ecd3 --- /dev/null +++ b/vcpkg/ports/dpdk/portfile.cmake @@ -0,0 +1,47 @@ +INCLUDE(vcpkg_common_functions) + +IF (NOT VCPKG_CMAKE_SYSTEM_NAME OR NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + MESSAGE(FATAL_ERROR "Intel dpdk currently only supports Linux/BSD platforms") +ENDIF () + +VCPKG_FROM_GITHUB( + OUT_SOURCE_PATH SOURCE_PATH + REPO DPDK/dpdk + REF v19.02 + SHA512 e0cc7081b163b4e264b65c1abb7e0f8aa29211539cecc5cf52986699b800eb4d4f2026377c3048c5c3bd2791e41f21645bb655797a3300740aa83633fb87626e + HEAD_REF master +) + +FIND_PATH(NUMA_INCLUDE_DIR NAME numa.h + PATHS ENV NUMA_ROOT + HINTS $ENV{HOME}/local/include /opt/local/include /usr/local/include /usr/include + ) +IF (NOT NUMA_INCLUDE_DIR) + MESSAGE(FATAL_ERROR "Numa library not found.\nTry: 'sudo yum install numactl numactl-devel' (or sudo apt-get install libnuma1 libnuma-dev)") +ENDIF () + +VCPKG_CONFIGURE_CMAKE( + SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR} + PREFER_NINJA + OPTIONS + -DSOURCE_PATH=${SOURCE_PATH} +) + +VCPKG_INSTALL_CMAKE() + +# Headers are symbolic links here, gather all, resolve and copy real files +FILE(GLOB_RECURSE HEADERS FOLLOW_SYMLINKS "${SOURCE_PATH}/build/include/*") +SET(REAL_FILES "") +FOREACH (HEADER ${HEADERS}) + GET_FILENAME_COMPONENT(REAL_FILE "${HEADER}" REALPATH) + LIST(APPEND REAL_FILES "${REAL_FILE}") +ENDFOREACH () + +FILE(INSTALL ${SOURCE_PATH}/Release/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +FILE(INSTALL ${SOURCE_PATH}/Debug/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +FILE(INSTALL ${REAL_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/dpdkConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +FILE(INSTALL ${SOURCE_PATH}/license/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +VCPKG_TEST_CMAKE(PACKAGE_NAME ${PORT}) diff --git a/vcpkg/ports/dpdk/usage b/vcpkg/ports/dpdk/usage new file mode 100644 index 0000000..6ecb606 --- /dev/null +++ b/vcpkg/ports/dpdk/usage @@ -0,0 +1,4 @@ +The package dpdk is compatible with built-in CMake targets: + + FIND_PACKAGE(dpdk CONFIGURE REQUIRED) + TARGET_LINK_LIBRARIES(main PRIVATE DPDK::dpdk) diff --git a/vcpkg/ports/draco/CONTROL b/vcpkg/ports/draco/CONTROL new file mode 100644 index 0000000..4bfe82e --- /dev/null +++ b/vcpkg/ports/draco/CONTROL @@ -0,0 +1,4 @@ +Source: draco +Version: 1.3.6 +Homepage: https://github.com/google/draco +Description: A library for compressing and decompressing 3D geometric meshes and point clouds. It is intended to improve the storage and transmission of 3D graphics. diff --git a/vcpkg/ports/draco/fix-compile-error-uwp.patch b/vcpkg/ports/draco/fix-compile-error-uwp.patch new file mode 100644 index 0000000..b098fd7 --- /dev/null +++ b/vcpkg/ports/draco/fix-compile-error-uwp.patch @@ -0,0 +1,30 @@ +diff --git a/src/draco/io/parser_utils.cc b/src/draco/io/parser_utils.cc +index 6e42a58..3c302b9 100644 +--- a/src/draco/io/parser_utils.cc ++++ b/src/draco/io/parser_utils.cc +@@ -160,7 +160,9 @@ bool ParseSignedInt(DecoderBuffer *buffer, int32_t *value) { + if (!ParseUnsignedInt(buffer, &v)) { + return false; + } +- *value = (sign < 0) ? -v : v; ++ if (sign < 0) ++ v *= -1; ++ *value = v; + return true; + } + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7e79da7..c4d9880 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -153,6 +153,10 @@ if(ENABLE_EXTRA_SPEED) + endif() + endif() + ++if (MSVC) ++ add_compile_options(/wd4996) ++endif() ++ + # Generate a version file containing repository info. + include(FindGit) + find_package(Git) diff --git a/vcpkg/ports/draco/fix-uwperror.patch b/vcpkg/ports/draco/fix-uwperror.patch new file mode 100644 index 0000000..54e2cc9 --- /dev/null +++ b/vcpkg/ports/draco/fix-uwperror.patch @@ -0,0 +1,13 @@ +diff --git a/src/draco/core/bit_utils.h b/src/draco/core/bit_utils.h +index a102095..b6ba69b 100644 +--- a/src/draco/core/bit_utils.h ++++ b/src/draco/core/bit_utils.h +@@ -27,6 +27,8 @@ + #include + #endif // defined(_MSC_VER) + ++#pragma warning(disable:4146) ++ + namespace draco { + + // Returns the number of '1' bits within the input 32 bit integer. diff --git a/vcpkg/ports/draco/portfile.cmake b/vcpkg/ports/draco/portfile.cmake new file mode 100644 index 0000000..ae72d00 --- /dev/null +++ b/vcpkg/ports/draco/portfile.cmake @@ -0,0 +1,41 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/draco + REF 83b0922745981a35be16e2907bdbb749ebf2bf43 # 1.3.6 + SHA512 29b270d749c5c0efcf791aaae7e33e2ae4404103ad8849d73aaca71492a3780d2fcaec01ec225da886bce2ab20ec14b8cf2d9e0976810cdaee557f97b3b0d9b8 + HEAD_REF master + PATCHES + fix-compile-error-uwp.patch + fix-uwperror.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/draco/cmake) + +# Install tools and plugins +file(GLOB TOOLS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.exe") +if(TOOLS) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/draco) + file(COPY ${TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/draco) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/draco) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/draco) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/drlibs/CONTROL b/vcpkg/ports/drlibs/CONTROL new file mode 100644 index 0000000..284f99c --- /dev/null +++ b/vcpkg/ports/drlibs/CONTROL @@ -0,0 +1,4 @@ +Source: drlibs +Version: 2019-08-12 +Homepage: https://github.com/mackron/dr_libs +Description: A collection of public domain single-file libraries for C/C++. diff --git a/vcpkg/ports/drlibs/portfile.cmake b/vcpkg/ports/drlibs/portfile.cmake new file mode 100644 index 0000000..3c50aff --- /dev/null +++ b/vcpkg/ports/drlibs/portfile.cmake @@ -0,0 +1,17 @@ +#header-only library +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mackron/dr_libs + REF b777360d73c10a367d268a8bb51bc0d1f36020b5 + SHA512 65d2c01ea72868e1212dc5af6b8bad7603a40e030a6c6ee59ae4e723de9c974ed31385475e2bcf0f22d424666fc70c7851c3998d0c51afc845785e71ed267a8f + HEAD_REF master +) + +# Put the licence file where vcpkg expects it +file(COPY ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/drlibs) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/drlibs/README.md ${CURRENT_PACKAGES_DIR}/share/drlibs/copyright) + +# Copy the header files +file(GLOB HEADER_FILES ${SOURCE_PATH}/*.h) +file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/vcpkg/ports/drogon/CONTROL b/vcpkg/ports/drogon/CONTROL new file mode 100644 index 0000000..33c5eda --- /dev/null +++ b/vcpkg/ports/drogon/CONTROL @@ -0,0 +1,5 @@ +Source: drogon +Version: 1.0.0 +Homepage: https://github.com/an-tao/drogon +Description:Drogon: A C++14/17 based HTTP web application framework running on Linux/macOS/Unix/Windows +Build-Depends: trantor, zlib, jsoncpp, libmariadb, libpq, sqlite3, brotli, libuuid (!windows) diff --git a/vcpkg/ports/drogon/pg.patch b/vcpkg/ports/drogon/pg.patch new file mode 100644 index 0000000..6e718c5 --- /dev/null +++ b/vcpkg/ports/drogon/pg.patch @@ -0,0 +1,27 @@ +diff --git a/cmake_modules/Findpg.cmake b/cmake_modules/Findpg.cmake +index 53037f2..d13f384 100644 +--- a/cmake_modules/Findpg.cmake ++++ b/cmake_modules/Findpg.cmake +@@ -4,20 +4,14 @@ + # + # This module defines PG_INCLUDE_DIRS, where to find header, etc. PG_LIBRARIES, + # the libraries needed to use PostgreSQL. pg_FOUND, If false, do not try to use +-# PostgreSQL. +-# pg_lib - The imported target library. ++# PostgreSQL. pg_lib - The imported target library. + + find_package(PostgreSQL) + if(PostgreSQL_FOUND) + set(PG_LIBRARIES ${PostgreSQL_LIBRARIES}) + set(PG_INCLUDE_DIRS ${PostgreSQL_INCLUDE_DIRS}) +- message(STATUS "pg inc: " ${PostgreSQL_INCLUDE_DIRS}) + add_library(pg_lib INTERFACE IMPORTED) +- set_target_properties(pg_lib +- PROPERTIES INTERFACE_INCLUDE_DIRECTORIES +- "${PostgreSQL_INCLUDE_DIRS}" +- INTERFACE_LINK_LIBRARIES +- "${PostgreSQL_LIBRARIES}") ++ target_link_libraries(pg_lib INTERFACE PostgreSQL::PostgreSQL) + mark_as_advanced(PG_INCLUDE_DIRS PG_LIBRARIES) + endif(PostgreSQL_FOUND) + include(FindPackageHandleStandardArgs) diff --git a/vcpkg/ports/drogon/portfile.cmake b/vcpkg/ports/drogon/portfile.cmake new file mode 100644 index 0000000..813ba21 --- /dev/null +++ b/vcpkg/ports/drogon/portfile.cmake @@ -0,0 +1,37 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO an-tao/drogon + REF v1.0.0 + SHA512 3ea447bee4be1956018af597d5c97d54ff04a6403cc3a0bda36ed905d459c15db8a5134cad0b68d5f628725c5488f8cb6aabbcd281faf5d62775d739b02d4c45 + HEAD_REF master + PATCHES + vcpkg.patch + pg.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +# Fix CMake files +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Drogon) +# Copy drogon_ctl +vcpkg_copy_tools(TOOL_NAMES drogon_ctl + AUTO_CLEAN) +# # Remove includes in debug +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" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# Copy pdb files +vcpkg_copy_pdbs() + diff --git a/vcpkg/ports/drogon/vcpkg.patch b/vcpkg/ports/drogon/vcpkg.patch new file mode 100644 index 0000000..92b9aea --- /dev/null +++ b/vcpkg/ports/drogon/vcpkg.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index aab915d..4daeb87 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -64,9 +64,9 @@ if(WIN32) + PRIVATE $) + endif(WIN32) + +-add_subdirectory(trantor) ++find_package(Trantor CONFIG REQUIRED) + +-target_link_libraries(${PROJECT_NAME} PUBLIC trantor) ++target_link_libraries(${PROJECT_NAME} PUBLIC Trantor::Trantor) + + if(NOT WIN32) + target_link_libraries(${PROJECT_NAME} PRIVATE dl) diff --git a/vcpkg/ports/dtl/CONTROL b/vcpkg/ports/dtl/CONTROL new file mode 100644 index 0000000..cd4109d --- /dev/null +++ b/vcpkg/ports/dtl/CONTROL @@ -0,0 +1,3 @@ +Source: dtl +Version: 1.19 +Description: Diff template library diff --git a/vcpkg/ports/dtl/portfile.cmake b/vcpkg/ports/dtl/portfile.cmake new file mode 100644 index 0000000..d663609 --- /dev/null +++ b/vcpkg/ports/dtl/portfile.cmake @@ -0,0 +1,16 @@ +#header-only library +include(vcpkg_common_functions) +include(CMakePackageConfigHelpers) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cubicdaiya/dtl + REF v1.19 + SHA512 77c767451b1b78ce49085da6ff5bb8a23c96dec56a37d96ef357a6b69a1b2cd45e2c6c4e8f91ee34ca080ce03a26518c478ff207309326a4bc7e729eaa2824b2 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/dtl + DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION + ${CURRENT_PACKAGES_DIR}/share/dtl RENAME copyright) diff --git a/vcpkg/ports/duckx/CONTROL b/vcpkg/ports/duckx/CONTROL new file mode 100644 index 0000000..ec0e6c3 --- /dev/null +++ b/vcpkg/ports/duckx/CONTROL @@ -0,0 +1,4 @@ +Source: duckx +Version: 1.0.0 +Homepage: https://github.com/amiremohamadi/DuckX +Description: DuckX is a library for creation of Office docx files. diff --git a/vcpkg/ports/duckx/portfile.cmake b/vcpkg/ports/duckx/portfile.cmake new file mode 100644 index 0000000..ae1b78b --- /dev/null +++ b/vcpkg/ports/duckx/portfile.cmake @@ -0,0 +1,20 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO amiremohamadi/DuckX + REF v1.0.0 + SHA512 21db28f5c62a5695363cb844ce0ca45057433dd622dad44278459dd0582c92a8ca98d8bf597955426636ad31776abdcfdbe51a7fbfe256cfa8adcb8a2fd9410d +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +file(COPY ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/duckx) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/duckx RENAME copyright) diff --git a/vcpkg/ports/duilib/CONTROL b/vcpkg/ports/duilib/CONTROL new file mode 100644 index 0000000..cb4c7ed --- /dev/null +++ b/vcpkg/ports/duilib/CONTROL @@ -0,0 +1,3 @@ +Source: duilib +Version: 2019-4-28-2 +Description: Duilib is a free open source DirectUI interface library under Windows. It is widely accepted by major Internet companies due to its simple and easy to expand design and stable and efficient implementation. It is widely used in IM, video client, stock market software, navigation software, and mobile phone assistive software. Duilib is still evolving, and will continue to improve in many aspects such as documentation, examples, animations, and rendering engines. diff --git a/vcpkg/ports/duilib/enable-static.patch b/vcpkg/ports/duilib/enable-static.patch new file mode 100644 index 0000000..6f069d4 --- /dev/null +++ b/vcpkg/ports/duilib/enable-static.patch @@ -0,0 +1,20 @@ +diff --git a/DuiLib/CMakeLists.txt b/DuiLib/CMakeLists.txt +index 96b8fe4..99dc314 100644 +--- a/DuiLib/CMakeLists.txt ++++ b/DuiLib/CMakeLists.txt +@@ -19,8 +19,14 @@ if (MSVC) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /source-charset:.936") + endif() + ++if (BUILD_SHARED_LIBS STREQUAL ON) ++ SET(LINKAGE SHARED) ++else() ++ SET(LINKAGE STATIC) ++endif() ++ + set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) +-add_library(duilib SHARED ${Control_src} ${Core_src} ${Layout_src} ${Utils_src} ${Root_src}) ++add_library(duilib ${LINKAGE} ${Control_src} ${Core_src} ${Layout_src} ${Utils_src} ${Root_src}) + + add_definitions(-DUILIB_EXPORTS) + target_link_libraries(duilib comctl32 gdi32 user32) diff --git a/vcpkg/ports/duilib/fix-arm-build.patch b/vcpkg/ports/duilib/fix-arm-build.patch new file mode 100644 index 0000000..c4dbd90 --- /dev/null +++ b/vcpkg/ports/duilib/fix-arm-build.patch @@ -0,0 +1,11 @@ +diff --git a/DuiLib/CMakeLists.txt b/DuiLib/CMakeLists.txt +index 6a4da5a..4961174 100644 +--- a/DuiLib/CMakeLists.txt ++++ b/DuiLib/CMakeLists.txt +@@ -18,5 +18,5 @@ set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) + add_library(duilib SHARED ${Control_src} ${Core_src} ${Layout_src} ${Utils_src} ${Root_src}) + + add_definitions(-DUILIB_EXPORTS) +-target_link_libraries(duilib comctl32) ++target_link_libraries(duilib comctl32 gdi32 user32) + set_target_properties(duilib PROPERTIES OUTPUT_NAME "duilib") diff --git a/vcpkg/ports/duilib/fix-encoding.patch b/vcpkg/ports/duilib/fix-encoding.patch new file mode 100644 index 0000000..cf0947e --- /dev/null +++ b/vcpkg/ports/duilib/fix-encoding.patch @@ -0,0 +1,28 @@ +diff --git a/DuiLib/CMakeLists.txt b/DuiLib/CMakeLists.txt +index 4961174..96b8fe4 100644 +--- a/DuiLib/CMakeLists.txt ++++ b/DuiLib/CMakeLists.txt +@@ -14,6 +14,11 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Core) + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Layout) + include_directories(${CMAKE_CURRENT_SOURCE_DIR}/Utils) + ++if (MSVC) ++ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /source-charset:.936") ++ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /source-charset:.936") ++endif() ++ + set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) + add_library(duilib SHARED ${Control_src} ${Core_src} ${Layout_src} ${Utils_src} ${Root_src}) + +diff --git a/DuiLib/Control/UIGifAnim.cpp b/DuiLib/Control/UIGifAnim.cpp +index 870c9da..61aa32f 100644 +--- a/DuiLib/Control/UIGifAnim.cpp ++++ b/DuiLib/Control/UIGifAnim.cpp +@@ -319,7 +319,6 @@ namespace DuiLib + + while (!pData) + { +- //读ä¸åˆ°å›¾ç‰‡, 则直接去读å–bitmap.m_lpstr指å‘的路径 + HANDLE hFile = ::CreateFile(pstrGifPath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, \ + FILE_ATTRIBUTE_NORMAL, NULL); + if( hFile == INVALID_HANDLE_VALUE ) break; diff --git a/vcpkg/ports/duilib/fix-post-build-errors.patch b/vcpkg/ports/duilib/fix-post-build-errors.patch new file mode 100644 index 0000000..35fa5cc --- /dev/null +++ b/vcpkg/ports/duilib/fix-post-build-errors.patch @@ -0,0 +1,11 @@ +diff --git a/DuiLib/CMakeLists.txt b/DuiLib/CMakeLists.txt +index 835d430..6a4da5a 100644 +--- a/DuiLib/CMakeLists.txt ++++ b/DuiLib/CMakeLists.txt +@@ -20,6 +20,3 @@ add_library(duilib SHARED ${Control_src} ${Core_src} ${Layout_src} ${Utils_src} + add_definitions(-DUILIB_EXPORTS) + target_link_libraries(duilib comctl32) + set_target_properties(duilib PROPERTIES OUTPUT_NAME "duilib") +-add_custom_command(TARGET duilib POST_BUILD +- COMMAND ${CMAKE_COMMAND} -E copy_if_different +- ${PROJECT_BINARY_DIR}/lib/duilib.dll ${PROJECT_SOURCE_DIR}/bin/duilib.dll) diff --git a/vcpkg/ports/duilib/portfile.cmake b/vcpkg/ports/duilib/portfile.cmake new file mode 100644 index 0000000..5556d22 --- /dev/null +++ b/vcpkg/ports/duilib/portfile.cmake @@ -0,0 +1,38 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO duilib/duilib + REF d7f3a331a0fc6ba48429cd9e5c427570cc73bc35 + SHA512 6381cac467d42e4811859411a5fa620e52075622e8fbec38a6ab320c33bc7d6fdddc809c150d6a10cc40c55a651345bda9387432898d24957b6ab0f5c4b5391c + HEAD_REF master + PATCHES + "fix-post-build-errors.patch" + "fix-arm-build.patch" + "fix-encoding.patch" + "enable-static.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/DuiLib + PREFER_NINJA + NO_CHARSET_FLAG +) + +vcpkg_build_cmake() + +file(INSTALL ${SOURCE_PATH}/DuiLib DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.h) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/duilib.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/duilib.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +else() + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/duilib.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/duilib.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/duilib.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/duilib.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/duilib.pdb DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/duilib.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/duilib RENAME copyright) diff --git a/vcpkg/ports/duktape/CMakeLists.txt b/vcpkg/ports/duktape/CMakeLists.txt new file mode 100644 index 0000000..56303d3 --- /dev/null +++ b/vcpkg/ports/duktape/CMakeLists.txt @@ -0,0 +1,53 @@ +cmake_minimum_required(VERSION 3.13) + + +set(duktape_MAJOR_VERSION 2) +set(duktape_MINOR_VERSION 4) +set(duktape_PATCH_VERSION 0) +set(duktape_VERSION ${duktape_MAJOR_VERSION}.${duktape_MINOR_VERSION}.${duktape_PATCH_VERSION}) + +option(CMAKE_VERBOSE_MAKEFILE "Create verbose makefile" OFF) +option(BUILD_SHARED_LIBS "Create duktape as a shared library" ON) + +project(duktape VERSION ${duktape_VERSION}) + +file(GLOB_RECURSE DUKTAPE_SOURCES "${CMAKE_CURRENT_LIST_DIR}/src/*.c") +file(GLOB_RECURSE DUKTAPE_HEADERS "${CMAKE_CURRENT_LIST_DIR}/src/*.h") + +add_library(duktape ${DUKTAPE_SOURCES} ${DUKTAPE_HEADERS}) +target_include_directories(duktape PRIVATE "${CMAKE_CURRENT_LIST_DIR}/src") +set_target_properties(duktape PROPERTIES PUBLIC_HEADER "${DUKTAPE_HEADERS}") + +if (BUILD_SHARED_LIBS) + target_compile_definitions(duktape PRIVATE -DDUK_F_DLL_BUILD) +endif () + +install(TARGETS duktape + EXPORT duktapeTargets + ARCHIVE DESTINATION "lib" + LIBRARY DESTINATION "lib" + RUNTIME DESTINATION "bin" + PUBLIC_HEADER DESTINATION "include" + COMPONENT dev +) + +install(EXPORT duktapeTargets + FILE duktapeTargets.cmake + NAMESPACE duktape:: + DESTINATION "share/duktape" +) + +export(PACKAGE duktape) + +include(CMakePackageConfigHelpers) +write_basic_package_version_file("${PROJECT_BINARY_DIR}/duktapeConfigVersion.cmake" + COMPATIBILITY SameMajorVersion +) + +configure_file(duktapeConfig.cmake.in "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/duktapeConfig.cmake" @ONLY) + +install(FILES + "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/duktapeConfig.cmake" + "${PROJECT_BINARY_DIR}/duktapeConfigVersion.cmake" + DESTINATION "share/duktape" +) diff --git a/vcpkg/ports/duktape/CONTROL b/vcpkg/ports/duktape/CONTROL new file mode 100644 index 0000000..907618c --- /dev/null +++ b/vcpkg/ports/duktape/CONTROL @@ -0,0 +1,4 @@ +Source: duktape +Version: 2.5.0 +Homepage: https://github.com/svaarala/duktape +Description: Embeddable Javascript engine with a focus on portability and compact footprint. diff --git a/vcpkg/ports/duktape/duktapeConfig.cmake.in b/vcpkg/ports/duktape/duktapeConfig.cmake.in new file mode 100644 index 0000000..56d7798 --- /dev/null +++ b/vcpkg/ports/duktape/duktapeConfig.cmake.in @@ -0,0 +1,33 @@ +# - Try to find duktape +# Once done this will define +# +# DUKTAPE_FOUND - system has Duktape +# DUKTAPE_INCLUDE_DIRS - the Duktape include directory +# DUKTAPE_LIBRARIES - Link these to use DUKTAPE +# DUKTAPE_DEFINITIONS - Compiler switches required for using Duktape +# + +find_package(PkgConfig QUIET) +pkg_check_modules(PC_DUK QUIET duktape libduktape) + +find_path(DUKTAPE_INCLUDE_DIR duktape.h + HINTS ${PC_DUK_INCLUDEDIR} ${PC_DUK_INCLUDE_DIRS} + PATH_SUFFIXES duktape) + +find_library(DUKTAPE_LIBRARY + NAMES duktape libduktape + HINTS ${PC_DUK_LIBDIR} ${PC_DUK_LIBRARY_DIRS}) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Duktape + REQUIRED_VARS DUKTAPE_LIBRARY DUKTAPE_INCLUDE_DIR) + +if (DUKTAPE_FOUND) + set (DUKTAPE_LIBRARIES ${DUKTAPE_LIBRARY}) + set (DUKTAPE_INCLUDE_DIRS ${DUKTAPE_INCLUDE_DIR} ) +endif () + +MARK_AS_ADVANCED( + DUKTAPE_INCLUDE_DIR + DUKTAPE_LIBRARY +) \ No newline at end of file diff --git a/vcpkg/ports/duktape/portfile.cmake b/vcpkg/ports/duktape/portfile.cmake new file mode 100644 index 0000000..abdc8aa --- /dev/null +++ b/vcpkg/ports/duktape/portfile.cmake @@ -0,0 +1,76 @@ +if(VCPKG_TARGET_IS_LINUX) + message("${PORT} currently requires the following tools from the system package manager:\n python-yaml\n\nThis can be installed on Ubuntu systems via apt-get install python-yaml PYTHON2-yaml (depending on your current python default interpreter)") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO svaarala/duktape + REF 6001888049cb42656f8649db020e804bcdeca6a7 # v2.5.0 + SHA512 ffbc7f1b16b7469ddfc0af0054a7891ffda128cc099e693773c6b4597ee6a96f8a08d354f7a7cf3a1f16369bef7b7a94c2670a617ec0355cc3614f56e1668dc4 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/duktapeConfig.cmake.in DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +if (VCPKG_TARGET_IS_WINDOWS) + set(EXECUTABLE_SUFFIX ".exe") + set(PYTHON_OPTION "") +else() + set(EXECUTABLE_SUFFIX "") + set(PYTHON_OPTION "--user") +endif() + +vcpkg_find_acquire_program(PYTHON2) +get_filename_component(PYTHON2_DIR "${PYTHON2}" DIRECTORY) +vcpkg_add_to_path("${PYTHON2_DIR}") + +if(NOT EXISTS ${PYTHON2_DIR}/easy_install${EXECUTABLE_SUFFIX}) + if(NOT EXISTS ${PYTHON2_DIR}/Scripts/pip${EXECUTABLE_SUFFIX}) + vcpkg_from_github( + OUT_SOURCE_PATH PYFILE_PATH + REPO pypa/get-pip + REF 309a56c5fd94bd1134053a541cb4657a4e47e09d #2019-08-25 + SHA512 bb4b0745998a3205cd0f0963c04fb45f4614ba3b6fcbe97efe8f8614192f244b7ae62705483a5305943d6c8fedeca53b2e9905aed918d2c6106f8a9680184c7a + HEAD_REF master + ) + execute_process(COMMAND ${PYTHON2_DIR}/python${EXECUTABLE_SUFFIX} ${PYFILE_PATH}/get-pip.py ${PYTHON_OPTION}) + endif() + execute_process(COMMAND ${PYTHON2_DIR}/Scripts/pip${EXECUTABLE_SUFFIX} install pyyaml ${PYTHON_OPTION}) +else() + execute_process(COMMAND ${PYTHON2_DIR}/easy_install${EXECUTABLE_SUFFIX} pyyaml) +endif() + +vcpkg_execute_required_process( + COMMAND ${PYTHON2} tools/configure.py --source-directory src-input --output-directory src --config-metadata config -DDUK_USE_FASTINT + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME pre-configure +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(DUK_CONFIG_H_PATH "${SOURCE_PATH}/src/duk_config.h") + file(READ ${DUK_CONFIG_H_PATH} CONTENT) + string(REPLACE "#undef DUK_F_DLL_BUILD" "#define DUK_F_DLL_BUILD" CONTENT "${CONTENT}") + file(WRITE ${DUK_CONFIG_H_PATH} "${CONTENT}") +else() + set(DUK_CONFIG_H_PATH "${SOURCE_PATH}/src/duk_config.h") + file(READ ${DUK_CONFIG_H_PATH} CONTENT) + string(REPLACE "#define DUK_F_DLL_BUILD" "#undef DUK_F_DLL_BUILD" CONTENT "${CONTENT}") + file(WRITE ${DUK_CONFIG_H_PATH} "${CONTENT}") +endif() + +vcpkg_configure_cmake( + PREFER_NINJA + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets() +vcpkg_copy_pdbs() + +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/duktape/usage b/vcpkg/ports/duktape/usage new file mode 100644 index 0000000..5870cb2 --- /dev/null +++ b/vcpkg/ports/duktape/usage @@ -0,0 +1,5 @@ +find_package(duktape CONFIG REQUIRED) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${DUKTAPE_INCLUDE_DIRS}) + +target_link_libraries(main ${DUKTAPE_LIBRARY}) \ No newline at end of file diff --git a/vcpkg/ports/dx/CONTROL b/vcpkg/ports/dx/CONTROL new file mode 100644 index 0000000..d5ad978 --- /dev/null +++ b/vcpkg/ports/dx/CONTROL @@ -0,0 +1,4 @@ +Source: dx +Version: 1.0.1-1 +Homepage: https://github.com/sdcb/dx +Description: A modern C++ library for DirectX programming \ No newline at end of file diff --git a/vcpkg/ports/dx/portfile.cmake b/vcpkg/ports/dx/portfile.cmake new file mode 100644 index 0000000..ee8eadc --- /dev/null +++ b/vcpkg/ports/dx/portfile.cmake @@ -0,0 +1,21 @@ +#header-only library +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sdcb/dx + REF v1.0.1 + SHA512 b40eb4daf774bfdb394b207bb29652fbf44361f5d8f9b60509c7a3215cd403dbf0c10454979c0c2e97d839496ef20940070a42837375993cd67d58afacc990e0 + HEAD_REF master +) + +file(INSTALL + ${SOURCE_PATH}/dx.h + ${SOURCE_PATH}/debug.h + ${SOURCE_PATH}/handle.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include/dx +) + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/dx RENAME copyright) diff --git a/vcpkg/ports/dxut/CONTROL b/vcpkg/ports/dxut/CONTROL new file mode 100644 index 0000000..6004628 --- /dev/null +++ b/vcpkg/ports/dxut/CONTROL @@ -0,0 +1,4 @@ +Source: dxut +Version: 11.14-3 +Homepage: https://github.com/Microsoft/DXUT +Description: A "GLUT"-like framework for Direct3D 11.x Win32 desktop applications \ No newline at end of file diff --git a/vcpkg/ports/dxut/portfile.cmake b/vcpkg/ports/dxut/portfile.cmake new file mode 100644 index 0000000..a14d29d --- /dev/null +++ b/vcpkg/ports/dxut/portfile.cmake @@ -0,0 +1,54 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +if(NOT VCPKG_CRT_LINKAGE STREQUAL "dynamic") + message(FATAL_ERROR "DXUT only supports dynamic CRT linkage") +endif() + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/Microsoft/DXUT/archive/sept2016.tar.gz" + FILENAME "DXUT-sept2016.tar.gz" + SHA512 190006c194284a1f5d614477896b0469a59ece05dff37477dadbe98808a5c33e274c0c1bb1390f22d1b5e06c9f534f4b50d6002157b2a391e01c2192b8e08869 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +IF (TRIPLET_SYSTEM_ARCH MATCHES "x86") + SET(BUILD_ARCH "Win32") +ELSE() + SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH}) +ENDIF() + +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/DXUT_2015.sln + PLATFORM ${BUILD_ARCH} +) + +file(INSTALL + ${SOURCE_PATH}/Core/ + ${SOURCE_PATH}/Optional/ + DESTINATION ${CURRENT_PACKAGES_DIR}/include + FILES_MATCHING PATTERN "*.h" +) +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/include/Bin) + +file(INSTALL + ${SOURCE_PATH}/Core/Bin/Desktop_2015/${BUILD_ARCH}/Release/DXUT.lib + ${SOURCE_PATH}/Optional/Bin/Desktop_2015/${BUILD_ARCH}/Release/DXUTOpt.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + +file(INSTALL + ${SOURCE_PATH}/Core/Bin/Desktop_2015/${BUILD_ARCH}/Debug/DXUT.lib + ${SOURCE_PATH}/Optional/Bin/Desktop_2015/${BUILD_ARCH}/Debug/DXUTOpt.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/MIT.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/dxut RENAME copyright) + +message(STATUS "Installing done") diff --git a/vcpkg/ports/eabase/CONTROL b/vcpkg/ports/eabase/CONTROL new file mode 100644 index 0000000..2855f5f --- /dev/null +++ b/vcpkg/ports/eabase/CONTROL @@ -0,0 +1,4 @@ +Source: eabase +Version: 2.09.12-1 +Homepage: https://github.com/electronicarts/EABase +Description: Electronic Arts Base. EABase is a small set of header files that define platform-independent data types and macros. diff --git a/vcpkg/ports/eabase/EABaseConfig.cmake.in b/vcpkg/ports/eabase/EABaseConfig.cmake.in new file mode 100644 index 0000000..afc9b10 --- /dev/null +++ b/vcpkg/ports/eabase/EABaseConfig.cmake.in @@ -0,0 +1,6 @@ +@PACKAGE_INIT@ + +# Provide path for scripts +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") + +include(${CMAKE_CURRENT_LIST_DIR}/EABaseTargets.cmake) \ No newline at end of file diff --git a/vcpkg/ports/eabase/fix_cmake_install.patch b/vcpkg/ports/eabase/fix_cmake_install.patch new file mode 100644 index 0000000..1a81fd6 --- /dev/null +++ b/vcpkg/ports/eabase/fix_cmake_install.patch @@ -0,0 +1,75 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 89c6703..ab8e553 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4,6 +4,9 @@ + cmake_minimum_required(VERSION 3.1) + project(EABase CXX) + ++include(GNUInstallDirs) ++include(CMakePackageConfigHelpers) ++ + #------------------------------------------------------------------------------------------- + # Options + #------------------------------------------------------------------------------------------- +@@ -22,13 +25,51 @@ endif() + add_definitions(-D_CHAR16T) + + if (NOT EABASE_BUILD_TESTS) +- #------------------------------------------------------------------------------------------- +- # Header only library +- #------------------------------------------------------------------------------------------- +- add_library(EABase INTERFACE) +- +- #------------------------------------------------------------------------------------------- +- # Include dirs +- #------------------------------------------------------------------------------------------- +- target_include_directories(EABase INTERFACE include/Common) ++ #------------------------------------------------------------------------------------------- ++ # Header only library ++ #------------------------------------------------------------------------------------------- ++ add_library(EABase INTERFACE) ++ add_library(EABase::EABase ALIAS EABase) ++ ++ #------------------------------------------------------------------------------------------- ++ # Include dirs ++ #------------------------------------------------------------------------------------------- ++ target_include_directories(EABase INTERFACE ++ $ ++ $ ++ ) ++ ++ # create and install an export set for eabase target as EABase::EABase ++ set(EABase_CMAKE_CONFIG_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/EABase") ++ ++ configure_package_config_file( ++ EABaseConfig.cmake.in ++ ${CMAKE_CURRENT_BINARY_DIR}/EABaseConfig.cmake ++ INSTALL_DESTINATION ${EABase_CMAKE_CONFIG_DESTINATION} ++ ) ++ ++ # create and install an export set for Terra target as Terra ++ install( ++ TARGETS EABase EXPORT EABaseTargets ++ DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ) ++ ++ ++ install(EXPORT EABaseTargets DESTINATION ${EABase_CMAKE_CONFIG_DESTINATION}) ++ ++ write_basic_package_version_file( ++ "${CMAKE_CURRENT_BINARY_DIR}/EABaseConfigVersion.cmake" ++ VERSION 2.09.12 ++ COMPATIBILITY SameMajorVersion ++ ) ++ ++ install(TARGETS EABase LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") ++ install(DIRECTORY "include/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") ++ ++ install( ++ FILES ++ "${CMAKE_CURRENT_BINARY_DIR}/EABaseConfig.cmake" ++ "${CMAKE_CURRENT_BINARY_DIR}/EABaseConfigVersion.cmake" ++ DESTINATION ${EABase_CMAKE_CONFIG_DESTINATION} ++ ) + endif() diff --git a/vcpkg/ports/eabase/portfile.cmake b/vcpkg/ports/eabase/portfile.cmake new file mode 100644 index 0000000..8ebb2ab --- /dev/null +++ b/vcpkg/ports/eabase/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO electronicarts/EABase + REF d1be0a1d0fc01a9bf8f3f2cea75018df0d2410ee + SHA512 84a11bea06aecbf9a659d92b1ac904b99b2b82023650f4f376b5e68a744f631c5dbdd53d25f746ffb01b428415ac86e4fb8ba758db844acf80560fabe4d77733 + HEAD_REF master + PATCHES + fix_cmake_install.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/EABaseConfig.cmake.in DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DEABASE_BUILD_TESTS:BOOL=OFF +) +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/EABase) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/eastl/CONTROL b/vcpkg/ports/eastl/CONTROL new file mode 100644 index 0000000..156aac7 --- /dev/null +++ b/vcpkg/ports/eastl/CONTROL @@ -0,0 +1,5 @@ +Source: eastl +Version: 3.16.05 +Homepage: https://github.com/electronicarts/EASTL +Description: Electronic Arts Standard Template Library. It is a C++ template library of containers, algorithms, and iterators useful for runtime and tool development across multiple platforms. It is a fairly extensive and robust implementation of such a library and has an emphasis on high performance above all other considerations. +Build-Depends: eabase diff --git a/vcpkg/ports/eastl/EASTLConfig.cmake.in b/vcpkg/ports/eastl/EASTLConfig.cmake.in new file mode 100644 index 0000000..6e1a8ea --- /dev/null +++ b/vcpkg/ports/eastl/EASTLConfig.cmake.in @@ -0,0 +1,6 @@ +@PACKAGE_INIT@ + +# Provide path for scripts +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") + +include(${CMAKE_CURRENT_LIST_DIR}/EASTLTargets.cmake) \ No newline at end of file diff --git a/vcpkg/ports/eastl/fix_cmake_install.patch b/vcpkg/ports/eastl/fix_cmake_install.patch new file mode 100644 index 0000000..bc8433c --- /dev/null +++ b/vcpkg/ports/eastl/fix_cmake_install.patch @@ -0,0 +1,71 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b8171cd..44120cc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4,12 +4,17 @@ + cmake_minimum_required(VERSION 3.1) + project(EASTL CXX) + ++include(GNUInstallDirs) ++include(CMakePackageConfigHelpers) ++ + #------------------------------------------------------------------------------------------- + # Options + #------------------------------------------------------------------------------------------- + option(EASTL_BUILD_BENCHMARK "Enable generation of build files for benchmark" OFF) + option(EASTL_BUILD_TESTS "Enable generation of build files for tests" OFF) + ++find_package(EABase CONFIG REQUIRED) ++ + #------------------------------------------------------------------------------------------- + # Compiler Flags + #------------------------------------------------------------------------------------------- +@@ -41,10 +46,46 @@ add_definitions(-DEASTL_OPENSOURCE=1) + #------------------------------------------------------------------------------------------- + # Include dirs + #------------------------------------------------------------------------------------------- +-target_include_directories(EASTL PUBLIC include) ++target_include_directories(EASTL PUBLIC ++ $ ++ $ ++ ) + + #------------------------------------------------------------------------------------------- + # Dependencies + #------------------------------------------------------------------------------------------- +-target_link_libraries(EASTL EABase) ++target_link_libraries(EASTL PUBLIC EABase) ++ ++# create and install an export set for eabase target as EABase::EABase ++set(EASTL_CMAKE_CONFIG_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/EASTL") ++ ++configure_package_config_file( ++ EASTLConfig.cmake.in ++ ${CMAKE_CURRENT_BINARY_DIR}/EASTLConfig.cmake ++ INSTALL_DESTINATION ${EASTL_CMAKE_CONFIG_DESTINATION} ++) ++ ++# create and install an export set for Terra target as Terra ++install( ++ TARGETS EASTL EXPORT EASTLTargets ++ DESTINATION ${CMAKE_INSTALL_LIBDIR} ++) ++ ++ ++install(EXPORT EASTLTargets DESTINATION ${EASTL_CMAKE_CONFIG_DESTINATION}) ++ ++write_basic_package_version_file( ++ "${CMAKE_CURRENT_BINARY_DIR}/EASTLConfigVersion.cmake" ++ VERSION 3.16.05 ++ COMPATIBILITY SameMajorVersion ++) ++ ++install(TARGETS EASTL LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") ++install(DIRECTORY "include/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + ++install( ++ FILES ++ "${CMAKE_CURRENT_BINARY_DIR}/EASTLConfig.cmake" ++ "${CMAKE_CURRENT_BINARY_DIR}/EASTLConfigVersion.cmake" ++ DESTINATION ${EASTL_CMAKE_CONFIG_DESTINATION} ++) diff --git a/vcpkg/ports/eastl/portfile.cmake b/vcpkg/ports/eastl/portfile.cmake new file mode 100644 index 0000000..3a56d4f --- /dev/null +++ b/vcpkg/ports/eastl/portfile.cmake @@ -0,0 +1,36 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO electronicarts/EASTL + REF 3.16.05 + SHA512 6e5ab46e6238135996961860789b811bfd8e5a84431bc01572842d9326037be0aaec315bef0fa3c84fca0f70822e7c03ae481bc99400d11112321702c18b9918 + HEAD_REF master + PATCHES + fix_cmake_install.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/EASTLConfig.cmake.in DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DEASTL_BUILD_TESTS=OFF + -DEASTL_BUILD_BENCHMARK=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/EASTL) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/3RDPARTYLICENSES.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +# CommonCppFlags used by EAThread +file(INSTALL ${SOURCE_PATH}/scripts/CMake/CommonCppFlags.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/easycl/CONTROL b/vcpkg/ports/easycl/CONTROL new file mode 100644 index 0000000..ad61f22 --- /dev/null +++ b/vcpkg/ports/easycl/CONTROL @@ -0,0 +1,5 @@ +Source: easycl +Version: 0.3 +Homepage: https://github.com/architector1324/EasyCL +Build-Depends: opencl +Description: OpenCL based lightweight c++ computing library diff --git a/vcpkg/ports/easycl/portfile.cmake b/vcpkg/ports/easycl/portfile.cmake new file mode 100644 index 0000000..694a853 --- /dev/null +++ b/vcpkg/ports/easycl/portfile.cmake @@ -0,0 +1,15 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO architector1324/EasyCL + REF 0.3 + SHA512 c0e9aa03c9039e9ffe4794ccc4e85654f8267924e577cf96fd8d5e141fab9e8f6dc4668ee4475d6df3ba77572e52a181493acd3dfdb0abf7bd83b7e3d4d08a29 + HEAD_REF master +) + +# Handle headers +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.hpp") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/easycl RENAME copyright) diff --git a/vcpkg/ports/easyhook/CONTROL b/vcpkg/ports/easyhook/CONTROL new file mode 100644 index 0000000..077a5fb --- /dev/null +++ b/vcpkg/ports/easyhook/CONTROL @@ -0,0 +1,5 @@ +Source: easyhook +Version: 2.7.6789.0 +Homepage: https://github.com/EasyHook/EasyHook +Description: This project supports extending (hooking) unmanaged code (APIs) with pure managed ones, from within a fully managed environment on 32- or 64-bit Windows Vista x64, Windows Server 2008 x64, Windows 7, Windows 8.1, and Windows 10. +Supports: windows \ No newline at end of file diff --git a/vcpkg/ports/easyhook/fix-build.patch b/vcpkg/ports/easyhook/fix-build.patch new file mode 100644 index 0000000..230faf6 --- /dev/null +++ b/vcpkg/ports/easyhook/fix-build.patch @@ -0,0 +1,128 @@ +diff --git a/EasyHookDll/EasyHookDll.vcxproj b/EasyHookDll/EasyHookDll.vcxproj +index ec66f91..5773555 100644 +--- a/EasyHookDll/EasyHookDll.vcxproj ++++ b/EasyHookDll/EasyHookDll.vcxproj +@@ -188,7 +188,7 @@ + true + true + EnableFastChecks +- true ++ false + MultiThreadedDebug + + +@@ -207,10 +207,6 @@ + MachineX86 + false + +- +- copy "$(TargetPath)" "$(TargetDir)..\x64\EasyHook32.dll" +-copy "$(TargetDir)EasyHook32.lib" "$(TargetDir)..\x64\EasyHook32.lib" +- + + false + +@@ -223,7 +219,7 @@ copy "$(TargetDir)EasyHook32.lib" "$(TargetDir)..\x64\EasyHook32.lib" + true + true + EnableFastChecks +- true ++ false + MultiThreadedDebug + + +@@ -242,10 +238,6 @@ copy "$(TargetDir)EasyHook32.lib" "$(TargetDir)..\x64\EasyHook32.lib" + MachineX86 + false + +- +- copy "$(TargetPath)" "$(TargetDir)..\x64\EasyHook32.dll" +-copy "$(TargetDir)EasyHook32.lib" "$(TargetDir)..\x64\EasyHook32.lib" +- + + false + +@@ -261,7 +253,7 @@ copy "$(TargetDir)EasyHook32.lib" "$(TargetDir)..\x64\EasyHook32.lib" + true + true + EnableFastChecks +- true ++ false + MultiThreadedDebug + + +@@ -278,10 +270,6 @@ copy "$(TargetDir)EasyHook32.lib" "$(TargetDir)..\x64\EasyHook32.lib" + Windows + MachineX64 + +- +- copy "$(TargetPath)" "$(TargetDir)..\x86\EasyHook64.dll" +-copy "$(TargetDir)EasyHook64.lib" "$(TargetDir)..\x86\EasyHook64.lib" +- + + false + +@@ -297,7 +285,7 @@ copy "$(TargetDir)EasyHook64.lib" "$(TargetDir)..\x86\EasyHook64.lib" + true + true + EnableFastChecks +- true ++ false + MultiThreadedDebug + + +@@ -314,10 +302,6 @@ copy "$(TargetDir)EasyHook64.lib" "$(TargetDir)..\x86\EasyHook64.lib" + Windows + MachineX64 + +- +- copy "$(TargetPath)" "$(TargetDir)..\x86\EasyHook64.dll" +-copy "$(TargetDir)EasyHook64.lib" "$(TargetDir)..\x86\EasyHook64.lib" +- + + false + +@@ -355,10 +339,6 @@ copy "$(TargetDir)EasyHook64.lib" "$(TargetDir)..\x86\EasyHook64.lib" + MachineX86 + false + +- +- copy "$(TargetPath)" "$(TargetDir)..\x64\EasyHook32.dll" +-copy "$(TargetDir)EasyHook32.lib" "$(TargetDir)..\x64\EasyHook32.lib" +- + + false + false +@@ -397,10 +377,6 @@ copy "$(TargetDir)EasyHook32.lib" "$(TargetDir)..\x64\EasyHook32.lib" + MachineX86 + false + +- +- copy "$(TargetPath)" "$(TargetDir)..\x64\EasyHook32.dll" +-copy "$(TargetDir)EasyHook32.lib" "$(TargetDir)..\x64\EasyHook32.lib" +- + + false + false +@@ -439,10 +415,6 @@ copy "$(TargetDir)EasyHook32.lib" "$(TargetDir)..\x64\EasyHook32.lib" + true + MachineX64 + +- +- copy "$(TargetPath)" "$(TargetDir)..\x86\EasyHook64.dll" +-copy "$(TargetDir)EasyHook64.lib" "$(TargetDir)..\x86\EasyHook64.lib" +- + + false + false +@@ -481,10 +453,6 @@ copy "$(TargetDir)EasyHook64.lib" "$(TargetDir)..\x86\EasyHook64.lib" + true + MachineX64 + +- +- copy "$(TargetPath)" "$(TargetDir)..\x86\EasyHook64.dll" +-copy "$(TargetDir)EasyHook64.lib" "$(TargetDir)..\x86\EasyHook64.lib" +- + + false + false diff --git a/vcpkg/ports/easyhook/portfile.cmake b/vcpkg/ports/easyhook/portfile.cmake new file mode 100644 index 0000000..d744578 --- /dev/null +++ b/vcpkg/ports/easyhook/portfile.cmake @@ -0,0 +1,38 @@ +include(vcpkg_common_functions) + +if (NOT VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "easyhook only support windows.") +endif() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "easyhook can only be built as dynamic library.") +endif() + +message(".Net framework 4.0 is required, please install it before install easyhook.") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO EasyHook/EasyHook + REF v2.7.6789.0 + SHA512 a48b4fe6dd2e55a2d515bc917c0f3ff5b73f08d1778e671df802347c3b8e1d4638005582a494acdf891ffe3fa6eae3eab0096083a8af2352e3f0883eb83421d6 + HEAD_REF master + PATCHES fix-build.patch +) + +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH EasyHook.sln + TARGET EasyHookDll + RELEASE_CONFIGURATION "netfx4-Release" + DEBUG_CONFIGURATION "netfx4-Debug" +) + +# These libraries are useless, so remove. +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/EasyHook.dll ${CURRENT_PACKAGES_DIR}/bin/EasyHook.pdb) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/EasyHook.dll ${CURRENT_PACKAGES_DIR}/debug/bin/EasyHook.pdb) + +# Install includes +file(INSTALL ${SOURCE_PATH}/Public/easyhook.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/easyhook) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/easyhook RENAME copyright) diff --git a/vcpkg/ports/easyloggingpp/CONTROL b/vcpkg/ports/easyloggingpp/CONTROL new file mode 100644 index 0000000..a10dbb2 --- /dev/null +++ b/vcpkg/ports/easyloggingpp/CONTROL @@ -0,0 +1,3 @@ +Source: easyloggingpp +Version: 9.96.7-1 +Description: Easylogging++ is a single header efficient logging library for C++ applications. \ No newline at end of file diff --git a/vcpkg/ports/easyloggingpp/portfile.cmake b/vcpkg/ports/easyloggingpp/portfile.cmake new file mode 100644 index 0000000..56ba406 --- /dev/null +++ b/vcpkg/ports/easyloggingpp/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO muflihun/easyloggingpp + REF v9.96.7 + SHA512 53ee637cd7462fac542170a81a9a206f3418dd8bc9e1f25d1d13dadef630e0fdf2880d71079808ebc49d36a7dbca7b5cdb76ad37b722c66b4b3d3efc8b5d2f35 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -Dbuild_static_lib=ON +) +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/easyloggingpp RENAME copyright) diff --git a/vcpkg/ports/eathread/CONTROL b/vcpkg/ports/eathread/CONTROL new file mode 100644 index 0000000..a011176 --- /dev/null +++ b/vcpkg/ports/eathread/CONTROL @@ -0,0 +1,5 @@ +Source: eathread +Version: 1.32.09-1 +Homepage: https://github.com/electronicarts/EAThread +Description: Electronic Arts Thread Library. EAThread implements a unified cross-platform interface for multithreaded programming on various platforms. +Build-Depends: eabase, eastl diff --git a/vcpkg/ports/eathread/EAThreadConfig.cmake.in b/vcpkg/ports/eathread/EAThreadConfig.cmake.in new file mode 100644 index 0000000..9ab444e --- /dev/null +++ b/vcpkg/ports/eathread/EAThreadConfig.cmake.in @@ -0,0 +1,6 @@ +@PACKAGE_INIT@ + +# Provide path for scripts +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") + +include(${CMAKE_CURRENT_LIST_DIR}/EAThreadTargets.cmake) \ No newline at end of file diff --git a/vcpkg/ports/eathread/fix_cmake_install.patch b/vcpkg/ports/eathread/fix_cmake_install.patch new file mode 100644 index 0000000..bc33279 --- /dev/null +++ b/vcpkg/ports/eathread/fix_cmake_install.patch @@ -0,0 +1,75 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 34fc37a..60d201a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4,15 +4,21 @@ + cmake_minimum_required(VERSION 3.1) + project(EAThread CXX) + ++include(GNUInstallDirs) ++include(CMakePackageConfigHelpers) ++ + #------------------------------------------------------------------------------------------- + # Options + #------------------------------------------------------------------------------------------- + option(EATHREAD_BUILD_TESTS "Enable generation of build files for tests" OFF) + ++find_package(EABase CONFIG REQUIRED) ++find_package(EASTL CONFIG REQUIRED) ++ + #------------------------------------------------------------------------------------------- + # Compiler Flags + #------------------------------------------------------------------------------------------- +-set (CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}/test/packages/EASTL/scripts/CMake") ++set (CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${_VCPKG_ROOT_DIR}/installed/${VCPKG_TARGET_TRIPLET}/share/eastl") + include(CommonCppFlags) + + #------------------------------------------------------------------------------------------- +@@ -34,10 +40,45 @@ add_definitions(-D_CRT_SECURE_NO_WARNINGS) + #------------------------------------------------------------------------------------------- + # Export Include Directories + #------------------------------------------------------------------------------------------- +-target_include_directories(EAThread PUBLIC include) ++target_include_directories(EAThread PUBLIC ++ $ ++ $ ++ ) + + #------------------------------------------------------------------------------------------- + # Package Dependencies + #------------------------------------------------------------------------------------------- +-target_link_libraries(EAThread EABase) ++target_link_libraries(EAThread PUBLIC EABase) ++ ++# create and install an export set for eabase target as EABase::EABase ++set(EAThread_CMAKE_CONFIG_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/EAThread") ++ ++configure_package_config_file( ++ EAThreadConfig.cmake.in ++ ${CMAKE_CURRENT_BINARY_DIR}/EAThreadConfig.cmake ++ INSTALL_DESTINATION ${EAThread_CMAKE_CONFIG_DESTINATION} ++) ++ ++# create and install an export set for Terra target as Terra ++install( ++ TARGETS EAThread EXPORT EAThreadTargets ++ DESTINATION ${CMAKE_INSTALL_LIBDIR} ++) ++ ++install(EXPORT EAThreadTargets DESTINATION ${EAThread_CMAKE_CONFIG_DESTINATION}) ++ ++write_basic_package_version_file( ++ "${CMAKE_CURRENT_BINARY_DIR}/EAThreadConfigVersion.cmake" ++ VERSION 3.16.01 ++ COMPATIBILITY SameMajorVersion ++) ++ ++install(TARGETS EAThread LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") ++install(DIRECTORY "include/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + ++install( ++ FILES ++ "${CMAKE_CURRENT_BINARY_DIR}/EAThreadConfig.cmake" ++ "${CMAKE_CURRENT_BINARY_DIR}/EAThreadConfigVersion.cmake" ++ DESTINATION ${EAThread_CMAKE_CONFIG_DESTINATION} ++) diff --git a/vcpkg/ports/eathread/portfile.cmake b/vcpkg/ports/eathread/portfile.cmake new file mode 100644 index 0000000..5d4d966 --- /dev/null +++ b/vcpkg/ports/eathread/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +vcpkg_fail_port_install(ON_TARGET "UWP" ON_ARCH "arm" "arm64") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO electronicarts/EAThread + REF e4367a36f2e55d10b2b994bfbae8edf21f15bafd + SHA512 cd5a2aa6cdfe6fa538067919aa49e5ecd901898e12929dc852068ce66efe386032eb1fe667ea7d9b7a3d73a7bef1d90a683c0b90b6fb0d6d9a27950b05c4ab6a + HEAD_REF master + PATCHES + fix_cmake_install.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/EAThreadConfig.cmake.in DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DEATHREAD_BUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/EAThread) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/3RDPARTYLICENSES.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/eathread) diff --git a/vcpkg/ports/ebml/CONTROL b/vcpkg/ports/ebml/CONTROL new file mode 100644 index 0000000..d5e88c2 --- /dev/null +++ b/vcpkg/ports/ebml/CONTROL @@ -0,0 +1,5 @@ +Source: ebml +Version: 1.3.10 +Homepage: https://github.com/Matroska-Org/libebml +Description: a C++ libary to parse EBML files +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/ebml/portfile.cmake b/vcpkg/ports/ebml/portfile.cmake new file mode 100644 index 0000000..5c87884 --- /dev/null +++ b/vcpkg/ports/ebml/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Matroska-Org/libebml + REF 1e23ac6e09da110b51dba42299b4a5e09098a98a # release-1.3.10 + SHA512 ba75b48430b2bc159da41d0ac702239a37728f3d047f77ccc946ac08454002484b765a7503431c9d35f468d742f67f1f6d53d12b2dae802c3ac3d070a03f983d + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DDISABLE_PKGCONFIG=1 +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/EBML) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/ecm/CONTROL b/vcpkg/ports/ecm/CONTROL new file mode 100644 index 0000000..ee261ad --- /dev/null +++ b/vcpkg/ports/ecm/CONTROL @@ -0,0 +1,4 @@ +Source: ecm +Version: 5.66.0 +Homepage: https://github.com/KDE/extra-cmake-modules +Description: Extra CMake Modules (ECM), extra modules and scripts for CMake diff --git a/vcpkg/ports/ecm/portfile.cmake b/vcpkg/ports/ecm/portfile.cmake new file mode 100644 index 0000000..bdd5758 --- /dev/null +++ b/vcpkg/ports/ecm/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/extra-cmake-modules + REF c427b4e94ebb5f6557823315cf518d77c634a08e # v5.66.0 + SHA512 b7eb19d28fe242ed6e5bf507525806796ea312d80f31c97028ef08b2593a285767ed2269ff990b6ddc5e22424bdccd963ab8be880f84c6c7395e7f29ad289110 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_HTML_DOCS=OFF + -DBUILD_MAN_DOCS=OFF + -DBUILD_QTHELP_DOCS=OFF + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +# Remove debug files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +file(COPY ${CURRENT_PORT_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/ecm) +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING-CMAKE-SCRIPTS DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# Allow empty include directory +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/vcpkg/ports/ecm/usage b/vcpkg/ports/ecm/usage new file mode 100644 index 0000000..b0c8e7b --- /dev/null +++ b/vcpkg/ports/ecm/usage @@ -0,0 +1,9 @@ +The package ecm provides CMake targets: + + find_package(ECM CONFIG REQUIRED NO_MODULE) + set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) + include(KDEInstallDirs) + include(KDECompilerSettings) + include(KDECMakeSettings) + +For more infomation, see https://api.kde.org/ecm/ diff --git a/vcpkg/ports/ecos/CMakeLists.txt b/vcpkg/ports/ecos/CMakeLists.txt new file mode 100644 index 0000000..231b31f --- /dev/null +++ b/vcpkg/ports/ecos/CMakeLists.txt @@ -0,0 +1,49 @@ +cmake_minimum_required(VERSION 3.14) +project(ecos C) + +#include(GNUInstallDirs) + +set(EXTERNAL_SRC ${CMAKE_CURRENT_SOURCE_DIR}/external) + +set(SUITESPARSE ${EXTERNAL_SRC}/SuiteSparse_config) +add_library(ecos-suitesparse INTERFACE) +target_sources(ecos-suitesparse INTERFACE $ $) +target_include_directories(ecos-suitesparse INTERFACE $ $) +target_compile_definitions(ecos-suitesparse INTERFACE DLONG LDL_LONG) + +set(AMD_SRC ${EXTERNAL_SRC}/amd/src) +set(AMD_INCLUDE ${EXTERNAL_SRC}/amd/include) +add_library(ecos-amd STATIC + ${AMD_SRC}/amd_1.c ${AMD_SRC}/amd_2.c ${AMD_SRC}/amd_aat.c ${AMD_SRC}/amd_control.c ${AMD_SRC}/amd_defaults.c ${AMD_SRC}/amd_dump.c ${AMD_SRC}/amd_global.c ${AMD_SRC}/amd_info.c ${AMD_SRC}/amd_order.c ${AMD_SRC}/amd_post_tree.c ${AMD_SRC}/amd_postorder.c ${AMD_SRC}/amd_preprocess.c ${AMD_SRC}/amd_valid.c +) +file(GLOB AMD_HEADERS ${EXTERNAL_SRC}/amd/include/*.h) +target_include_directories(ecos-amd PUBLIC $ $) +target_link_libraries(ecos-amd ecos-suitesparse) + + +add_library(ecos-ldl STATIC + ${EXTERNAL_SRC}/ldl/src/ldl.c +) +file(GLOB LDL_HEADERS ${EXTERNAL_SRC}/ldl/include/*.h) +target_include_directories(ecos-ldl PUBLIC $ $) +target_link_libraries(ecos-ldl ecos-suitesparse) + + +add_library(ecos STATIC + src/cone.c src/ecos.c src/expcone.c src/preproc.c src/splamm.c src/wright_omega.c src/ctrlc.c src/equil.c src/kkt.c src/spla.c src/timer.c +) +file(GLOB ECOS_HEADERS include/*.h) +target_include_directories(ecos PUBLIC $ $) +target_link_libraries(ecos ecos-amd ecos-ldl) + +install(FILES ${SUITESPARSE}/SuiteSparse_config.h DESTINATION "include/ecos/") +install(FILES ${ECOS_HEADERS} DESTINATION "include/ecos/") +install(FILES ${LDL_HEADERS} DESTINATION "include/ecos/") +install(FILES ${AMD_HEADERS} DESTINATION "include/ecos/") + +install(TARGETS ecos ecos-amd ecos-ldl ecos-suitesparse EXPORT ecos-targets) +install( + EXPORT ecos-targets + FILE ecos-config.cmake + DESTINATION share/ecos/ +) \ No newline at end of file diff --git a/vcpkg/ports/ecos/CONTROL b/vcpkg/ports/ecos/CONTROL new file mode 100644 index 0000000..fb89b4e --- /dev/null +++ b/vcpkg/ports/ecos/CONTROL @@ -0,0 +1,3 @@ +Source: ecos +Version: 2.0.7 +Description: A lightweight conic solver for second-order cone programming. \ No newline at end of file diff --git a/vcpkg/ports/ecos/portfile.cmake b/vcpkg/ports/ecos/portfile.cmake new file mode 100644 index 0000000..8c633db --- /dev/null +++ b/vcpkg/ports/ecos/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO embotech/ecos + REF 2.0.7 + SHA512 2781435164b68e5b113a12547cd3a5a787b806009d07d45209117758178cb6e85e26dfb5689172d60b5e40671eb6d303ece131eb5f1b8bab4cbb250af74597b2 + HEAD_REF develop +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ecos RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_fixup_cmake_targets(CONFIG_PATH "share/ecos") \ No newline at end of file diff --git a/vcpkg/ports/ecsutil/CONTROL b/vcpkg/ports/ecsutil/CONTROL new file mode 100644 index 0000000..29c0875 --- /dev/null +++ b/vcpkg/ports/ecsutil/CONTROL @@ -0,0 +1,6 @@ +Source: ecsutil +Version: 1.0.7.9 +Homepage: https://github.com/EMCECS/ecs-object-client-windows-cpp +Description: Native Windows SDK for accessing ECS via the S3 HTTP protocol. +Build-Depends: atlmfc (windows) +Supports: windows&(x64|x86) diff --git a/vcpkg/ports/ecsutil/portfile.cmake b/vcpkg/ports/ecsutil/portfile.cmake new file mode 100644 index 0000000..2c2aea8 --- /dev/null +++ b/vcpkg/ports/ecsutil/portfile.cmake @@ -0,0 +1,47 @@ + +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "UWP" "Linux" "OSX") +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(PLATFORM x86) +endif() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(ECSUtil_CONFIGURATION_RELEASE Release) + set(ECSUtil_CONFIGURATION_DEBUG Debug) +else() + if (VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(ECSUtil_CONFIGURATION_RELEASE "Release Lib") + set(ECSUtil_CONFIGURATION_DEBUG "Debug Lib") + else() + set(ECSUtil_CONFIGURATION_RELEASE "Release Lib Static") + set(ECSUtil_CONFIGURATION_DEBUG "Debug Lib Static") + endif() +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO EMCECS/ecs-object-client-windows-cpp + REF v1.0.7.9 + SHA512 4e5b52911b5a4193afd74c2503980c44679fb7b77bb783f15f87551afc521b342fa6a9bd0ad8293bc1c99baf8cb68c884926fb7fe3c7a15c7aa7e9ad1139d16c + HEAD_REF master +) + +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH ECSUtil.sln + PLATFORM ${PLATFORM} + LICENSE_SUBPATH license.txt + TARGET ECSUtil + RELEASE_CONFIGURATION ${ECSUtil_CONFIGURATION_RELEASE} + DEBUG_CONFIGURATION ${ECSUtil_CONFIGURATION_DEBUG} +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(COPY ${SOURCE_PATH}/ECSUtil DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.h) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/ECSUtil/res ${CURRENT_PACKAGES_DIR}/tools) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/NatvisAddIn.dll ${CURRENT_PACKAGES_DIR}/debug/bin/NatvisAddIn.dll) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() diff --git a/vcpkg/ports/edlib/CONTROL b/vcpkg/ports/edlib/CONTROL new file mode 100644 index 0000000..3a3e4b5 --- /dev/null +++ b/vcpkg/ports/edlib/CONTROL @@ -0,0 +1,4 @@ +Source: edlib +Version: 1.2.6 +Homepage: https://github.com/Martinsos/edlib +Description: Lightweight, super fast C/C++ (& Python) library for sequence alignment using edit (Levenshtein) distance. \ No newline at end of file diff --git a/vcpkg/ports/edlib/fix-cmake-install.patch b/vcpkg/ports/edlib/fix-cmake-install.patch new file mode 100644 index 0000000..8081bba --- /dev/null +++ b/vcpkg/ports/edlib/fix-cmake-install.patch @@ -0,0 +1,64 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 767d808..21f0cfc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -74,14 +74,42 @@ if (NOT WIN32) # If on windows, do not build binaries that do not support window + target_link_libraries(edlib-aligner edlib) + endif() + +- +-# Create target 'install' for installing libraries. +-install(TARGETS edlib DESTINATION ${CMAKE_INSTALL_LIBDIR}) +-install(FILES edlib/include/edlib.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +- + # configure and install pkg-config file + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/edlib.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/edlib-1.pc + @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/edlib-1.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) ++ ++### Additional config for VCPKG ++include(CMakePackageConfigHelpers) ++set(EDLIB_CMAKE_DIR "lib/cmake/edlib" CACHE STRING ++ "Installation directory for cmake files, relative to ${CMAKE_INSTALL_PREFIX}.") ++set(version_config "${PROJECT_BINARY_DIR}/edlib-config-version.cmake") ++set(project_config "${PROJECT_BINARY_DIR}/edlib-config.cmake") ++set(targets_export_name edlib-targets) ++ ++# Generate the version, config and target files into the build directory. ++write_basic_package_version_file( ++ ${version_config} ++ VERSION ${VERSION} ++ COMPATIBILITY AnyNewerVersion) ++configure_package_config_file( ++ ${PROJECT_SOURCE_DIR}/edlib-config.cmake.in ++ ${project_config} ++ INSTALL_DESTINATION ${EDLIB_CMAKE_DIR}) ++export(TARGETS edlib NAMESPACE edlib:: ++ FILE ${PROJECT_BINARY_DIR}/${targets_export_name}.cmake) ++ ++# Install version, config and target files. ++install( ++ FILES ${project_config} ${version_config} ++ DESTINATION ${EDLIB_CMAKE_DIR}) ++install(EXPORT ${targets_export_name} DESTINATION ${EDLIB_CMAKE_DIR} ++ NAMESPACE edlib::) ++ ++### // ++ ++# Create target 'install' for installing libraries. ++install(TARGETS edlib EXPORT ${targets_export_name} DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++install(FILES edlib/include/edlib.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +\ No newline at end of file +diff --git a/edlib-config.cmake.in b/edlib-config.cmake.in +new file mode 100644 +index 0000000..f2cc030 +--- /dev/null ++++ b/edlib-config.cmake.in +@@ -0,0 +1,4 @@ ++@PACKAGE_INIT@ ++ ++include(${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake) ++check_required_components(edlib) +\ No newline at end of file diff --git a/vcpkg/ports/edlib/portfile.cmake b/vcpkg/ports/edlib/portfile.cmake new file mode 100644 index 0000000..7883200 --- /dev/null +++ b/vcpkg/ports/edlib/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Martinsos/edlib + REF v1.2.6 + SHA512 75b470c1403113e5f0895b3c1bb4163e65c6e04ccf41a75297a5b4cc915a567567ebcc79f3b9ea74b5e7188adfab2eceda5ac75e2d861aef8b3fefc6d4f39200 + HEAD_REF master + PATCHES + fix-cmake-install.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/edlib) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/effolkronium-random/CONTROL b/vcpkg/ports/effolkronium-random/CONTROL new file mode 100644 index 0000000..b3501e2 --- /dev/null +++ b/vcpkg/ports/effolkronium-random/CONTROL @@ -0,0 +1,3 @@ +Source: effolkronium-random +Version: 1.3.1 +Description: Random with a modern C++ API diff --git a/vcpkg/ports/effolkronium-random/portfile.cmake b/vcpkg/ports/effolkronium-random/portfile.cmake new file mode 100644 index 0000000..28a9708 --- /dev/null +++ b/vcpkg/ports/effolkronium-random/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO effolkronium/random + REF ead633a312d1a41baae72c22f0b2fd28b1853558 # v1.3.1 + SHA512 598e6edfc124f4619ea37292ea01c67ce87181476957137175cf9e9ca3c9cf44dfde3c2cebc0e57b4c8497058a320f8ce535f66bad5f8db5ceacc0cedd40936e + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DRandom_BuildTests=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake/ TARGET_PATH /share/effolkronium_random) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL ${SOURCE_PATH}/LICENSE.MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/effolkronium-random RENAME copyright) diff --git a/vcpkg/ports/efsw/CONTROL b/vcpkg/ports/efsw/CONTROL new file mode 100644 index 0000000..37a6919 --- /dev/null +++ b/vcpkg/ports/efsw/CONTROL @@ -0,0 +1,5 @@ +Source: efsw +Version: 2020-06-08 +Homepage: https://github.com/SpartanJ/efsw +Description: efsw is a C++ cross-platform file system watcher and notifier. +Supports: !uwp diff --git a/vcpkg/ports/efsw/portfile.cmake b/vcpkg/ports/efsw/portfile.cmake new file mode 100644 index 0000000..542e795 --- /dev/null +++ b/vcpkg/ports/efsw/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO SpartanJ/efsw + REF b62d04829bb0a6f3cacc7859e0b046a3c053bc50 + SHA512 fc16ef6ad330941dc0a1112ce645b57bd126d353556d50f45fadf150f25edd42c1d4946bc54d629d94c208d67d4ce17dbf5d1079cbeed51f0f6b1ccbe2199132 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DVERBOSE=OFF + -DBUILD_TEST_APP=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/egl-registry/CONTROL b/vcpkg/ports/egl-registry/CONTROL new file mode 100644 index 0000000..74cdf16 --- /dev/null +++ b/vcpkg/ports/egl-registry/CONTROL @@ -0,0 +1,4 @@ +Source: egl-registry +Version: 2020-02-20 +Homepage: https://github.com/KhronosGroup/EGL-Registry +Description: the EGL API and Extension Registry diff --git a/vcpkg/ports/egl-registry/portfile.cmake b/vcpkg/ports/egl-registry/portfile.cmake new file mode 100644 index 0000000..bfdca5b --- /dev/null +++ b/vcpkg/ports/egl-registry/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KhronosGroup/EGL-Registry + REF 11478904448bbdf5757b798c856a525aa2b351b1 + SHA512 f1e54810cb2948e9d8798d65507069bba4ee6534d719e792db11e36d600ef37e59a34262809d8b1e41160ae1e45a283fa322cd9d9a647985c48a6d7d6d1706ee + HEAD_REF master +) + +file( + COPY + ${SOURCE_PATH}/api/KHR + ${SOURCE_PATH}/api/EGL + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) + +file( + COPY + ${SOURCE_PATH}/api/egl.xml + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} +) + +file( + INSTALL ${SOURCE_PATH}/sdk/docs/man/copyright.xml + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) diff --git a/vcpkg/ports/eigen3/CONTROL b/vcpkg/ports/eigen3/CONTROL new file mode 100644 index 0000000..90d0726 --- /dev/null +++ b/vcpkg/ports/eigen3/CONTROL @@ -0,0 +1,5 @@ +Source: eigen3 +Version: 3.3.7 +Port-Version: 7 +Homepage: http://eigen.tuxfamily.org +Description: C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms. diff --git a/vcpkg/ports/eigen3/fix-cuda-error.patch b/vcpkg/ports/eigen3/fix-cuda-error.patch new file mode 100644 index 0000000..9123806 --- /dev/null +++ b/vcpkg/ports/eigen3/fix-cuda-error.patch @@ -0,0 +1,30 @@ +diff --git a/Eigen/src/Core/arch/CUDA/Half.h b/Eigen/src/Core/arch/CUDA/Half.h +index 755e620..85e445b 100644 +--- a/Eigen/src/Core/arch/CUDA/Half.h ++++ b/Eigen/src/Core/arch/CUDA/Half.h +@@ -209,7 +209,11 @@ namespace half_impl { + // conversion steps back and forth. + + EIGEN_STRONG_INLINE __device__ half operator + (const half& a, const half& b) { ++#if defined(EIGEN_CUDACC_VER) && EIGEN_CUDACC_VER >= 90000 ++ return __hadd(::__half(a), ::__half(b)); ++#else + return __hadd(a, b); ++#endif + } + EIGEN_STRONG_INLINE __device__ half operator * (const half& a, const half& b) { + return __hmul(a, b); +@@ -218,9 +222,13 @@ EIGEN_STRONG_INLINE __device__ half operator - (const half& a, const half& b) { + return __hsub(a, b); + } + EIGEN_STRONG_INLINE __device__ half operator / (const half& a, const half& b) { ++#if defined(EIGEN_CUDACC_VER) && EIGEN_CUDACC_VER >= 90000 ++ return __hdiv(a, b); ++#else + float num = __half2float(a); + float denom = __half2float(b); + return __float2half(num / denom); ++#endif + } + EIGEN_STRONG_INLINE __device__ half operator - (const half& a) { + return __hneg(a); diff --git a/vcpkg/ports/eigen3/portfile.cmake b/vcpkg/ports/eigen3/portfile.cmake new file mode 100644 index 0000000..6d72fdc --- /dev/null +++ b/vcpkg/ports/eigen3/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_buildpath_length_warning(37) + +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.com + OUT_SOURCE_PATH SOURCE_PATH + REPO libeigen/eigen + REF 3.3.7 + SHA512 4cc3717b9cbe78335e05f724919497214edd482d4812aeb1a9fd6da5b3f6d1b194bb93ed0dab9e734b4334a5b88e8f8c339c43c1b2044332286ef5e758f9ecf4 + HEAD_REF master + PATCHES fix-cuda-error.patch # issue https://gitlab.com/libeigen/eigen/-/issues/1526 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF + -DEIGEN_BUILD_PKGCONFIG=ON + OPTIONS_RELEASE + -DCMAKEPACKAGE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/share/eigen3 + -DPKGCONFIG_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/lib/pkgconfig + OPTIONS_DEBUG + -DCMAKEPACKAGE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/share/eigen3 + -DPKGCONFIG_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/COPYING.README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/embree2/CONTROL b/vcpkg/ports/embree2/CONTROL new file mode 100644 index 0000000..0fe3df4 --- /dev/null +++ b/vcpkg/ports/embree2/CONTROL @@ -0,0 +1,5 @@ +Source: embree2 +Version: 2.17.7 +Homepage: https://github.com/embree/embree +Description: High Performance Ray Tracing Kernels. +Build-Depends: tbb diff --git a/vcpkg/ports/embree2/portfile.cmake b/vcpkg/ports/embree2/portfile.cmake new file mode 100644 index 0000000..446f379 --- /dev/null +++ b/vcpkg/ports/embree2/portfile.cmake @@ -0,0 +1,52 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO embree/embree + REF v2.17.7 + SHA512 3ea548e5ed85f68dc1f9dfe864711f9b731e0df8a2258257f77db08bbdbe3a9014a626313e3ff41174f3b26f09dc8ff523900119ff4c8465bfff53f621052873 + HEAD_REF devel2 +) + +file(REMOVE ${SOURCE_PATH}/common/cmake/FindTBB.cmake) + +if(VCPKG_CRT_LINKAGE STREQUAL static) + set(EMBREE_STATIC_RUNTIME ON) +else() + set(EMBREE_STATIC_RUNTIME OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DEMBREE_ISPC_SUPPORT=OFF + -DEMBREE_TUTORIALS=OFF + -DEMBREE_STATIC_RUNTIME=${EMBREE_STATIC_RUNTIME} + "-DTBB_LIBRARIES=TBB::tbb" + "-DTBB_INCLUDE_DIRS=${CURRENT_INSTALLED_DIR}/include" +) + +# just wait, the release build of embree is insanely slow in MSVC +# a single file will took about 2-10 min +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# these cmake files do not seem to contain helpful configuration for find libs, just remove them +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/embree-config.cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/embree-config-version.cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/embree-config.cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/embree-config-version.cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/models) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/models) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/embree2) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/doc ${CURRENT_PACKAGES_DIR}/share/embree2/doc) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/embree2) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/embree2/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/embree2/copyright) diff --git a/vcpkg/ports/embree3/CONTROL b/vcpkg/ports/embree3/CONTROL new file mode 100644 index 0000000..1b11e69 --- /dev/null +++ b/vcpkg/ports/embree3/CONTROL @@ -0,0 +1,6 @@ +Source: embree3 +Version: 3.11.0 +Port-Version: 1 +Homepage: https://github.com/embree/embree +Description: High Performance Ray Tracing Kernels. +Build-Depends: tbb diff --git a/vcpkg/ports/embree3/fix-path.patch b/vcpkg/ports/embree3/fix-path.patch new file mode 100644 index 0000000..ff25a43 --- /dev/null +++ b/vcpkg/ports/embree3/fix-path.patch @@ -0,0 +1,117 @@ +diff --git a/common/algorithms/CMakeLists.txt b/common/algorithms/CMakeLists.txt +index 5667d2bd3..cb26776a4 100644 +--- a/common/algorithms/CMakeLists.txt ++++ b/common/algorithms/CMakeLists.txt +@@ -17,11 +17,4 @@ ADD_LIBRARY(algorithms OBJECT + SET_PROPERTY(TARGET algorithms PROPERTY FOLDER common) + SET_PROPERTY(TARGET algorithms APPEND PROPERTY COMPILE_FLAGS " ${FLAGS_LOWEST}") + +-# ideally we would use target_link_libraries to provide the algorithms target +-# with the TBB include directory information. Howeve, this is only possible in +-# very recent versions of TBB and therefore we use the target property instead +-GET_TARGET_PROPERTY(tasking_include_dirs tasking INCLUDE_DIRECTORIES) +-if (tasking_include_dirs) +- TARGET_INCLUDE_DIRECTORIES(algorithms PUBLIC "${tasking_include_dirs}") +- GET_TARGET_PROPERTY(algorithms_include_dirs algorithms INCLUDE_DIRECTORIES) +-endif() ++TARGET_LINK_LIBRARIES(algorithms PUBLIC tasking) +diff --git a/common/cmake/embree-config.cmake b/common/cmake/embree-config.cmake +index 9b7370ccd..14ce929d6 100644 +--- a/common/cmake/embree-config.cmake ++++ b/common/cmake/embree-config.cmake +@@ -5,8 +5,6 @@ SET(EMBREE_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}/@EMBREE_RELATIV_ROOT_DIR@) + GET_FILENAME_COMPONENT(EMBREE_ROOT_DIR "${EMBREE_ROOT_DIR}" ABSOLUTE) + + SET(EMBREE_INCLUDE_DIRS ${EMBREE_ROOT_DIR}/@CMAKE_INSTALL_INCLUDEDIR@) +-SET(EMBREE_LIBRARY ${EMBREE_ROOT_DIR}/@CMAKE_INSTALL_LIBDIR@/@EMBREE_LIBRARY_FULLNAME@) +-SET(EMBREE_LIBRARIES ${EMBREE_LIBRARY}) + + SET(EMBREE_VERSION @EMBREE_VERSION@) + SET(EMBREE_VERSION_MAJOR @EMBREE_VERSION_MAJOR@) +@@ -22,7 +20,6 @@ SET(EMBREE_ISA_AVX2 @EMBREE_ISA_AVX2@) + SET(EMBREE_ISA_AVX512KNL @EMBREE_ISA_AVX512KNL@) + SET(EMBREE_ISA_AVX512SKX @EMBREE_ISA_AVX512SKX@) + +-SET(EMBREE_BUILD_TYPE @CMAKE_BUILD_TYPE@) + SET(EMBREE_ISPC_SUPPORT @EMBREE_ISPC_SUPPORT@) + SET(EMBREE_STATIC_LIB @EMBREE_STATIC_LIB@) + SET(EMBREE_TUTORIALS @EMBREE_TUTORIALS@) +@@ -53,10 +50,6 @@ IF (EMBREE_STATIC_LIB) + INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/simd-targets.cmake") + INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/lexers-targets.cmake") + INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/tasking-targets.cmake") +- +- add_library(TBB::tbb SHARED IMPORTED) +- set_target_properties(TBB::tbb PROPERTIES IMPORTED_LOCATION "${EMBREE_ROOT_DIR}/@EMBREE_INSTALLED_TBB@") +- + ENDIF() + + INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree-targets.cmake") +diff --git a/common/cmake/package.cmake b/common/cmake/package.cmake +index a4da0001a..b6f82e981 100644 +--- a/common/cmake/package.cmake ++++ b/common/cmake/package.cmake +@@ -20,16 +20,6 @@ ELSE() + ENDIF() + ENDIF() + +-############################################################## +-# Install MSVC runtime +-############################################################## +- +-IF (WIN32) +- SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE) +- INCLUDE(InstallRequiredSystemLibraries) +- LIST(FILTER CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS INCLUDE REGEX ".*msvcp[0-9]+\.dll|.*vcruntime[0-9]+\.dll|.*vcruntime[0-9]+_[0-9]+\.dll") +- INSTALL(FILES ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT lib) +-ENDIF() + + ############################################################## + # Install Headers +@@ -106,18 +96,9 @@ ELSE() + ENDIF() + ENDIF() + +-IF (WIN32 OR EMBREE_ZIP_MODE) +- # for local "installs" and on Windows we want the cmake config files placed +- # in the install root, such that users can point the CMake variable +- # embree_DIR just to the install folder +- SET(EMBREE_CMAKECONFIG_DIR ".") +- SET(EMBREE_CMAKEEXPORT_DIR "cmake") +- SET(EMBREE_RELATIV_ROOT_DIR ".") +-ELSE() +- SET(EMBREE_CMAKECONFIG_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/embree-${EMBREE_VERSION}") +- SET(EMBREE_CMAKEEXPORT_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/embree-${EMBREE_VERSION}") +- FILE(RELATIVE_PATH EMBREE_RELATIV_ROOT_DIR "/${EMBREE_CMAKECONFIG_DIR}" "/") +-ENDIF() ++SET(EMBREE_CMAKECONFIG_DIR "share/embree") ++SET(EMBREE_CMAKEEXPORT_DIR "share/embree3") ++SET(EMBREE_RELATIV_ROOT_DIR "../..") + + CONFIGURE_FILE(common/cmake/embree-config.cmake embree-config-install.cmake @ONLY) + CONFIGURE_FILE(common/cmake/embree-config-version.cmake embree-config-version.cmake @ONLY) +diff --git a/common/tasking/CMakeLists.txt b/common/tasking/CMakeLists.txt +index 71ef29612..c846004e3 100644 +--- a/common/tasking/CMakeLists.txt ++++ b/common/tasking/CMakeLists.txt +@@ -10,7 +10,7 @@ ELSEIF (TASKING_TBB) + if (NOT ${EMBREE_TBB_ROOT} STREQUAL "") + set(TBB_ROOT ${EMBREE_TBB_ROOT}) + endif() +- FIND_PACKAGE(TBB REQUIRED tbb) ++ FIND_PACKAGE(TBB CONFIG REQUIRED tbb) + + ############################################################## + # Create tasking target and link against TBB. Also set include directory +@@ -18,10 +18,7 @@ ELSEIF (TASKING_TBB) + # with the TBB header files + ############################################################## + ADD_LIBRARY(tasking STATIC taskschedulertbb.cpp) +- TARGET_LINK_LIBRARIES(tasking PUBLIC TBB) +- TARGET_INCLUDE_DIRECTORIES(tasking PUBLIC "${TBB_INCLUDE_DIRS}") +- +- include(installTBB) ++ TARGET_LINK_LIBRARIES(tasking PUBLIC TBB::tbb) + + ELSEIF (TASKING_PPL) + ADD_LIBRARY(tasking STATIC taskschedulerppl.cpp) diff --git a/vcpkg/ports/embree3/fix-static-usage.patch b/vcpkg/ports/embree3/fix-static-usage.patch new file mode 100644 index 0000000..7af99df --- /dev/null +++ b/vcpkg/ports/embree3/fix-static-usage.patch @@ -0,0 +1,21 @@ +diff --git a/common/cmake/embree-config.cmake b/common/cmake/embree-config.cmake +index 14ce929..7e2e8f5 100644 +--- a/common/cmake/embree-config.cmake ++++ b/common/cmake/embree-config.cmake +@@ -50,6 +50,16 @@ IF (EMBREE_STATIC_LIB) + INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/simd-targets.cmake") + INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/lexers-targets.cmake") + INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/tasking-targets.cmake") ++ ++ IF(EMBREE_ISA_SSE42) ++ INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree_sse42-targets.cmake") ++ ENDIF() ++ IF(EMBREE_ISA_AVX) ++ INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree_avx-targets.cmake") ++ ENDIF() ++ IF(EMBREE_ISA_AVX2) ++ INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree_avx2-targets.cmake") ++ ENDIF() + ENDIF() + + INCLUDE("${EMBREE_ROOT_DIR}/@EMBREE_CMAKEEXPORT_DIR@/embree-targets.cmake") diff --git a/vcpkg/ports/embree3/portfile.cmake b/vcpkg/ports/embree3/portfile.cmake new file mode 100644 index 0000000..9453061 --- /dev/null +++ b/vcpkg/ports/embree3/portfile.cmake @@ -0,0 +1,41 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO embree/embree + REF v3.11.0 + SHA512 a20acb07103d322eebc85d41152210466f8d9b97e7a332589c692f649ee02079465f89561748ddc8448fb40bc63f2595d728cc31a927f7b95bea13446c5c775d + HEAD_REF master + PATCHES + fix-path.patch + fix-static-usage.patch +) + +string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} static EMBREE_STATIC_LIB) +string(COMPARE EQUAL ${VCPKG_CRT_LINKAGE} static EMBREE_STATIC_RUNTIME) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE + PREFER_NINJA + OPTIONS + -DEMBREE_ISPC_SUPPORT=OFF + -DEMBREE_TUTORIALS=OFF + -DEMBREE_STATIC_RUNTIME=${EMBREE_STATIC_RUNTIME} + -DEMBREE_STATIC_LIB=${EMBREE_STATIC_LIB} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() +if(APPLE) + file(REMOVE ${CURRENT_PACKAGES_DIR}/uninstall.command ${CURRENT_PACKAGES_DIR}/debug/uninstall.command) +endif() +file(RENAME ${CURRENT_PACKAGES_DIR}/share/doc ${CURRENT_PACKAGES_DIR}/share/${PORT}/doc) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/embree3/usage b/vcpkg/ports/embree3/usage new file mode 100644 index 0000000..8622f12 --- /dev/null +++ b/vcpkg/ports/embree3/usage @@ -0,0 +1,4 @@ +The package embree3 provides CMake targets: + + find_package(embree 3 CONFIG REQUIRED) + target_link_libraries(main PRIVATE embree) diff --git a/vcpkg/ports/enet/CMakeLists.txt b/vcpkg/ports/enet/CMakeLists.txt new file mode 100644 index 0000000..012e21d --- /dev/null +++ b/vcpkg/ports/enet/CMakeLists.txt @@ -0,0 +1,81 @@ +cmake_minimum_required(VERSION 2.6) + +project(enet) + +# The "configure" step. +include(CheckFunctionExists) +include(CheckStructHasMember) +include(CheckTypeSize) +check_function_exists("fcntl" HAS_FCNTL) +check_function_exists("poll" HAS_POLL) +check_function_exists("getaddrinfo" HAS_GETADDRINFO) +check_function_exists("getnameinfo" HAS_GETNAMEINFO) +check_function_exists("gethostbyname_r" HAS_GETHOSTBYNAME_R) +check_function_exists("gethostbyaddr_r" HAS_GETHOSTBYADDR_R) +check_function_exists("inet_pton" HAS_INET_PTON) +check_function_exists("inet_ntop" HAS_INET_NTOP) +check_struct_has_member("struct msghdr" "msg_flags" "sys/types.h;sys/socket.h" HAS_MSGHDR_FLAGS) +set(CMAKE_EXTRA_INCLUDE_FILES "sys/types.h" "sys/socket.h") +check_type_size("socklen_t" HAS_SOCKLEN_T BUILTIN_TYPES_ONLY) +unset(CMAKE_EXTRA_INCLUDE_FILES) +if(MSVC) + add_definitions(-W3) +else() + add_definitions(-Wno-error) +endif() + +if(HAS_FCNTL) + add_definitions(-DHAS_FCNTL=1) +endif() +if(HAS_POLL) + add_definitions(-DHAS_POLL=1) +endif() +if(HAS_GETNAMEINFO) + add_definitions(-DHAS_GETNAMEINFO=1) +endif() +if(HAS_GETADDRINFO) + add_definitions(-DHAS_GETADDRINFO=1) +endif() +if(HAS_GETHOSTBYNAME_R) + add_definitions(-DHAS_GETHOSTBYNAME_R=1) +endif() +if(HAS_GETHOSTBYADDR_R) + add_definitions(-DHAS_GETHOSTBYADDR_R=1) +endif() +if(HAS_INET_PTON) + add_definitions(-DHAS_INET_PTON=1) +endif() +if(HAS_INET_NTOP) + add_definitions(-DHAS_INET_NTOP=1) +endif() +if(HAS_MSGHDR_FLAGS) + add_definitions(-DHAS_MSGHDR_FLAGS=1) +endif() +if(HAS_SOCKLEN_T) + add_definitions(-DHAS_SOCKLEN_T=1) +endif() + +include_directories(${PROJECT_SOURCE_DIR}/include) + +add_library(enet STATIC + callbacks.c + compress.c + host.c + list.c + packet.c + peer.c + protocol.c + unix.c + win32.c + ) + +if (WIN32) + target_link_libraries(enet winmm ws2_32) +endif() + +install(TARGETS enet ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin) + +install(DIRECTORY include/ + DESTINATION include) \ No newline at end of file diff --git a/vcpkg/ports/enet/CONTROL b/vcpkg/ports/enet/CONTROL new file mode 100644 index 0000000..3b9dbb3 --- /dev/null +++ b/vcpkg/ports/enet/CONTROL @@ -0,0 +1,4 @@ +Source: enet +Version: 1.3.15 +Homepage: https://github.com/lsalzman/enet +Description: Reliable UDP networking library diff --git a/vcpkg/ports/enet/portfile.cmake b/vcpkg/ports/enet/portfile.cmake new file mode 100644 index 0000000..2f661af --- /dev/null +++ b/vcpkg/ports/enet/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH + REPO "lsalzman/enet" + REF 224f31101fc60939c02f6bbe8e8fc810a7db306b + HEAD_REF master + SHA512 6f820b5ce9df1cc94793dfced87d5039bdbe4e3fee44951d293158d37c79f2bd16d788a89f67f54ba4ee8570b46db28831f2becc4fe56659ea47f118e4f3f30c +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +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) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/ensmallen/CONTROL b/vcpkg/ports/ensmallen/CONTROL new file mode 100644 index 0000000..9c904f3 --- /dev/null +++ b/vcpkg/ports/ensmallen/CONTROL @@ -0,0 +1,5 @@ +Source: ensmallen +Version: 2.14.2 +Homepage: https://github.com/mlpack/ensmallen +Description: A header-only C++ library for mathematical optimization. +Build-Depends: openblas, lapack, armadillo diff --git a/vcpkg/ports/ensmallen/portfile.cmake b/vcpkg/ports/ensmallen/portfile.cmake new file mode 100644 index 0000000..76be857 --- /dev/null +++ b/vcpkg/ports/ensmallen/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mlpack/ensmallen + REF 8d9c03715346f2048e61e3e370a6a6c7a5e55d3b # 2.14.2 + SHA512 2aebdd485265f8f6adcf9eb00c78e5f79f5d19e62566bdfcd024c44443d5658a7b92ea4ca62c29041f1b512cf67f8148fdc8b6894c9aa4c69ef305580916e24a + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTS=OFF +) +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/ensmallen TARGET_PATH share/ensmallen) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + +file(INSTALL ${SOURCE_PATH}/COPYRIGHT.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/entityx/CONTROL b/vcpkg/ports/entityx/CONTROL new file mode 100644 index 0000000..281a420 --- /dev/null +++ b/vcpkg/ports/entityx/CONTROL @@ -0,0 +1,4 @@ +Source: entityx +Version: 1.3.0-2 +Description: EntityX - A fast, type-safe C++ Entity-Component system. +Homepage: https://github.com/alecthomas/entityx diff --git a/vcpkg/ports/entityx/portfile.cmake b/vcpkg/ports/entityx/portfile.cmake new file mode 100644 index 0000000..326a21b --- /dev/null +++ b/vcpkg/ports/entityx/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO alecthomas/entityx + REF 1.3.0 + SHA512 724a3f421f802e60a1106ff8a69435c9a9da14e35c3e88565bbc17bff3a17f2d9771818aac83320cc4f14de0ec770a66f1eb7cbf4318f43abd516c63e077c07d + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE + PREFER_NINJA + OPTIONS + -DENTITYX_BUILD_TESTING=false + -DENTITYX_BUILD_SHARED=0 +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/entityx) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/entityx/COPYING ${CURRENT_PACKAGES_DIR}/share/entityx/copyright) diff --git a/vcpkg/ports/entt/CONTROL b/vcpkg/ports/entt/CONTROL new file mode 100644 index 0000000..a713aaf --- /dev/null +++ b/vcpkg/ports/entt/CONTROL @@ -0,0 +1,4 @@ +Source: entt +Version: 3.5.1 +Description: Gaming meets modern C++ - a fast and reliable entity-component system and much more. +Homepage: https://github.com/skypjack/entt diff --git a/vcpkg/ports/entt/portfile.cmake b/vcpkg/ports/entt/portfile.cmake new file mode 100644 index 0000000..68e2636 --- /dev/null +++ b/vcpkg/ports/entt/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO skypjack/entt + REF v3.5.1 + SHA512 41d4c56f04e6d98218ce5994636407cef7a73c75a4f3b982b0756b0496002b841c22a652a28575e5d683c45459d66dba47dec3d51a92963b372cb72e95df8a0f + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/EnTT/cmake) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/epsilon/0001-VS2015-provides-snprintf.patch b/vcpkg/ports/epsilon/0001-VS2015-provides-snprintf.patch new file mode 100644 index 0000000..0fc664f --- /dev/null +++ b/vcpkg/ports/epsilon/0001-VS2015-provides-snprintf.patch @@ -0,0 +1,51 @@ +From 8b5b2ea5ba695252abaad4234c951675d5f733ec Mon Sep 17 00:00:00 2001 +From: Hiroshi Miura +Date: Wed, 7 Feb 2018 12:28:54 +0900 +Subject: [PATCH 1/2] VS2015 provides snprintf + +Signed-off-by: Hiroshi Miura +--- + lib/common.h | 27 +++++++++++++++++++++++---- + 1 file changed, 23 insertions(+), 4 deletions(-) + +diff --git a/lib/common.h b/lib/common.h +index c5db1ed..73c4118 100644 +--- a/lib/common.h ++++ b/lib/common.h +@@ -39,10 +39,29 @@ extern "C" { + /** \addtogroup misc Miscellanea */ + /*@{*/ + +-/* Use _snprintf instead of snprintf under MSVC compiler */ +-#if defined(_WIN32) && !defined(__MINGW32__) +-#define snprintf _snprintf +-#endif ++#ifdef _MSC_VER ++#if _MSC_VER < 1900 // VS2015/17 provides snprintf ++#include ++#include ++/* Want safe, 'n += snprintf(b + n ...)' like function. If cp_max_len is 1 ++* then assume cp is pointing to a null char and do nothing. Returns number ++* number of chars placed in cp excluding the trailing null char. So for ++* cp_max_len > 0 the return value is always < cp_max_len; for cp_max_len ++* <= 0 the return value is 0 (and no chars are written to cp). */ ++static int snprintf(char * cp, int cp_max_len, const char * fmt, ...) ++{ ++ va_list args; ++ int n; ++ ++ if (cp_max_len < 2) ++ return 0; ++ va_start(args, fmt); ++ n = vsnprintf(cp, cp_max_len, fmt, args); ++ va_end(args); ++ return (n < cp_max_len) ? n : (cp_max_len - 1); ++} ++#endif // _MSC_VER < 1900 ++#endif // _MSC_VER + + #ifdef HAVE_CONFIG_H + # include +-- +2.16.1 + diff --git a/vcpkg/ports/epsilon/0002-Add-CFLAGS-for-CRT-selection-and-warning-supression.patch b/vcpkg/ports/epsilon/0002-Add-CFLAGS-for-CRT-selection-and-warning-supression.patch new file mode 100644 index 0000000..f76aed1 --- /dev/null +++ b/vcpkg/ports/epsilon/0002-Add-CFLAGS-for-CRT-selection-and-warning-supression.patch @@ -0,0 +1,81 @@ +From 4969dd6e7b656e92bf1bc921f0cd1af00707e17f Mon Sep 17 00:00:00 2001 +From: Hiroshi Miura +Date: Wed, 7 Feb 2018 10:47:53 +0900 +Subject: [PATCH 2/2] Add CFLAGS for CRT selection and warning supression + +Signed-off-by: Hiroshi Miura +--- + makefile.vc | 2 +- + nmake.opt | 42 +++++++++++++++++++++++++++++++++++++++--- + 2 files changed, 40 insertions(+), 4 deletions(-) + +diff --git a/makefile.vc b/makefile.vc +index 33f1f34..64fb9f3 100644 +--- a/makefile.vc ++++ b/makefile.vc +@@ -20,7 +20,7 @@ EPSILON_EXE = epsilon.exe + +-CFLAGS = /nologo -IC:\OSGeo4W\include -I.\lib -I.\lib\msvc \ ++CFLAGS = /nologo -I$(INSTALLED_ROOT)\include -I.\lib -I.\lib\msvc \ + -I.\src -I..\popt\include \ +- $(OPTFLAGS) ++ $(OPTFLAGS) $(WARNFLAGS) + + default: all + +diff --git a/nmake.opt b/nmake.opt +index d5a51e2..d8088df 100644 +--- a/nmake.opt ++++ b/nmake.opt +@@ -1,9 +1,45 @@ + # Directory tree where EPSILON will be installed. ++!IFNDEF INSTDIR + INSTDIR=C:\OSGeo4W ++!ENDIF ++ ++# Flags to choose CRT variant to link against (e.g. static: /MT, /MTd, dynamic: /MD, /MDd) ++!IFNDEF CRT_FLAGS ++!IFNDEF DEBUG ++CRT_FLAGS=/MD ++!ELSE ++CRT_FLAGS=/MDd ++!ENDIF ++!ENDIF ++ ++# Flags for enforcing PDB use ++!IFNDEF PDB_FLAGS ++PDB_FLAGS=/Fdepsilon.pdb ++!ENDIF ++ ++# Set flags controlling warnings level, and suppression of some warnings. ++!IFNDEF WARNFLAGS ++# 4127: conditional expression is constant ++# 4251: 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2' ++# 4275: non – DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier' ++# 4786: ?????????? ++# 4100: 'identifier' : unreferenced formal parameter ++# 4245: 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch ++# 4206: nonstandard extension used : translation unit is empty (only applies to C source code) ++# 4351: new behavior: elements of array 'array' will be default initialized (needed for https://trac.osgeo.org/gdal/changeset/35593) ++# 4611: interaction between '_setjmp' and C++ object destruction is non-portable ++# ++WARNFLAGS = /W3 /wd4127 /wd4251 /wd4275 /wd4786 /wd4100 /wd4245 /wd4206 /wd4351 /wd4611 ++!ENDIF ++ ++!IFNDEF OPTFLAGS ++!IFNDEF DEBUG ++OPTFLAGS= $(PDB_FLAGS) /nologo $(CRT_FLAGS) /D_CRT_SECURE_NO_WARNINGS /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG ++!ELSE ++OPTFLAGS= $(PDB_FLAGS) /nologo $(CRT_FLAGS) /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG ++!ENDIF ++!ENDIF + +-# Uncomment the first for an optimized build, or the second for debug. +-OPTFLAGS= /nologo /Ox /fp:precise /W3 /MD /D_CRT_SECURE_NO_WARNINGS +-#OPTFLAGS= /nologo /Zi /MD /Fdepsilon.pdb + + # Set the version number for the DLL. Normally we leave this blank since + # we want software that is dynamically loading the DLL to have no problem +-- +2.16.1 + diff --git a/vcpkg/ports/epsilon/0003-Fix-build-error.patch b/vcpkg/ports/epsilon/0003-Fix-build-error.patch new file mode 100644 index 0000000..73309b7 --- /dev/null +++ b/vcpkg/ports/epsilon/0003-Fix-build-error.patch @@ -0,0 +1,52 @@ +diff --git a/makefile.vc b/makefile.vc +index cd0fc5a..7ce6861 100644 +--- a/makefile.vc ++++ b/makefile.vc +@@ -32,6 +32,12 @@ epsilon.lib: $(LIBOBJ) + + $(EPSILON_DLL): epsilon_i.lib + ++!IFNDEF DEBUG ++POPTLIB=$(LIBPATH)popt.lib ++!ELSE ++POPTLIB=$(LIBPATH)poptd.lib ++!ENDIF ++ + epsilon_i.lib: $(LIBOBJ) + link /debug /dll /def:libepsilon.def /out:$(EPSILON_DLL) \ + /implib:epsilon_i.lib $(LIBOBJ) +@@ -48,8 +54,8 @@ $(EPSILON_EXE): $(EPSILON_DLL) src\epsilon.obj \ + src\cmd_truncate_file.obj src\cmd_decode_file.obj \ + src\cmd_encode_file.obj src\misc.obj \ + src\psi.obj src\pbm.obj \ +- ..\popt\lib\libpopt.lib +- /Fe$(EPSILON_EXE) ++ $(POPTLIB) \ ++ /Fe"$(EPSILON_EXE)" + if exist $(EPSILON_EXE).manifest mt -manifest \ + $(EPSILON_EXE).manifest -outputresource:$(EPSILON_EXE);1 + +@@ -71,8 +77,9 @@ install: all + -mkdir $(INSTDIR)\bin + -mkdir $(INSTDIR)\lib + -mkdir $(INSTDIR)\include ++ -mkdir $(INSTDIR)\tools + copy *.dll $(INSTDIR)\bin + copy *.lib $(INSTDIR)\lib +- copy *.exe $(INSTDIR)\bin ++ copy *.exe $(INSTDIR)\tools + copy lib\epsilon.h $(INSTDIR)\include + +diff --git a/src/misc.h b/src/misc.h +index 9023dce..d8ce602 100644 +--- a/src/misc.h ++++ b/src/misc.h +@@ -30,7 +30,7 @@ extern "C" { + #endif + + /* Use _snprintf instead of snprintf under MSVC compiler */ +-#if defined(_WIN32) && !defined(__MINGW32__) ++#if 0 + #define snprintf _snprintf + #endif + diff --git a/vcpkg/ports/epsilon/CONTROL b/vcpkg/ports/epsilon/CONTROL new file mode 100644 index 0000000..1547a99 --- /dev/null +++ b/vcpkg/ports/epsilon/CONTROL @@ -0,0 +1,5 @@ +Source: epsilon +Version: 0.9.2-4 +Homepage: https://sourceforge.net/projects/epsilon-project/ +Description: EPSILON is an Open Source wavelet image compressor, that is aimed on parallel and robust image processing. +Build-Depends: libpopt \ No newline at end of file diff --git a/vcpkg/ports/epsilon/portfile.cmake b/vcpkg/ports/epsilon/portfile.cmake new file mode 100644 index 0000000..525974a --- /dev/null +++ b/vcpkg/ports/epsilon/portfile.cmake @@ -0,0 +1,48 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO epsilon-project/epsilon + REF 0.9.2 + FILENAME "epsilon-0.9.2.tar.gz" + SHA512 95f427c68a4a4eb784f7d484d87fc573133983510f6b030663f88955e2446490a07b1343ae4668251b466f67cf9a79bd834b933c57c5ed12327f32174f20ac0f + PATCHES + 0001-VS2015-provides-snprintf.patch + 0002-Add-CFLAGS-for-CRT-selection-and-warning-supression.patch + 0003-Fix-build-error.patch +) + +if (VCPKG_CRT_LINKAGE STREQUAL static) + set(CL_FLAGS_REL "/MT /Ox /fp:precise") + set(CL_FLAGS_DBG "/MTd /Zi") + set(TARGET_LIB epsilon.lib) +else() + set(CL_FLAGS_REL "/MD /Ox /fp:precise") + set(CL_FLAGS_DBG "/MDd /Zi") + set(TARGET_LIB epsilon_i.lib) +endif() + +vcpkg_install_nmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" + OPTIONS_DEBUG + INSTDIR="${CURRENT_PACKAGES_DIR}/debug" + MSVC_VER=1900 + CRT_FLAGS=${CL_FLAGS_DBG} + DEBUG=1 + ${TARGET_LIB} + LIBPATH="${CURRENT_INSTALLED_DIR}/debug/lib/" + OPTIONS_RELEASE + INSTDIR="${CURRENT_PACKAGES_DIR}" + MSVC_VER=1900 + CRT_FLAGS=${CL_FLAGS_REL} + ${TARGET_LIB} + LIBPATH="${CURRENT_INSTALLED_DIR}/lib/" +) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/esaxx/CONTROL b/vcpkg/ports/esaxx/CONTROL new file mode 100644 index 0000000..48b7eeb --- /dev/null +++ b/vcpkg/ports/esaxx/CONTROL @@ -0,0 +1,3 @@ +Source: esaxx +Version: ca7cb332011ec37 +Description: This library provides the implementation of enhanced suffix array. diff --git a/vcpkg/ports/esaxx/portfile.cmake b/vcpkg/ports/esaxx/portfile.cmake new file mode 100644 index 0000000..93e24ff --- /dev/null +++ b/vcpkg/ports/esaxx/portfile.cmake @@ -0,0 +1,17 @@ +#header-only library +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO hillbig/esaxx + REF ca7cb332011ec37a8436487f210f396b84bd8273 + SHA512 8346fc93498f7979fd422db527d0e2db73080b2c372263a72a887ddc8328a29391bce6def5845f4500a180f5c2e641105d0ce108092e6eac9020c6bd67fb46df +) + +file(INSTALL + ${SOURCE_PATH}/esa.hxx + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) + +# Handle copyright/readme/package files +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/esaxx RENAME copyright) diff --git a/vcpkg/ports/evpp/CONTROL b/vcpkg/ports/evpp/CONTROL new file mode 100644 index 0000000..047c77a --- /dev/null +++ b/vcpkg/ports/evpp/CONTROL @@ -0,0 +1,6 @@ +Source: evpp +Version: 0.7.0 +Port-Version: 4 +Homepage: https://github.com/Qihoo360/evpp +Description: A modern C++ network library based on libevent for developing high performance network services in TCP/UDP/HTTP protocols. +Build-Depends: glog, libevent (windows), libevent[openssl] (!windows), rapidjson, concurrentqueue (!windows), boost-lockfree (!windows) \ No newline at end of file diff --git a/vcpkg/ports/evpp/fix-linux-build.patch b/vcpkg/ports/evpp/fix-linux-build.patch new file mode 100644 index 0000000..b5673b2 --- /dev/null +++ b/vcpkg/ports/evpp/fix-linux-build.patch @@ -0,0 +1,112 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7872fc8..2a06614 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -47,7 +47,11 @@ string (REPLACE ";" " " CMAKE_CXX_FLAGS "${CXX_FLAGS}") + if (UNIX) + SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -ggdb -D_DEBUG -DGOOGLE_STRIP_LOG=0") + SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -g -ggdb -DNDEBUG -DGOOGLE_STRIP_LOG=1") +- SET(DEPENDENT_LIBRARIES event glog pthread) ++ find_package(glog CONFIG REQUIRED) ++ find_path(GLOG_INCLUDE_DIRS logging.h PATH_SUFFIXES glog) ++ find_package(Libevent CONFIG REQUIRED) ++ list(APPEND DEPENDENT_INCLUDE_DIRS "${GLOG_INCLUDE_DIRS}/../") ++ SET(DEPENDENT_LIBRARIES libevent::core libevent::extra libevent::openssl glog::glog pthread) + else (UNIX) + SET(DEPENDENT_LIBRARIES event glog) + endif (UNIX) +diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt +index 469ed1c..8219424 100644 +--- a/apps/CMakeLists.txt ++++ b/apps/CMakeLists.txt +@@ -2,7 +2,7 @@ + include_directories(${PROJECT_SOURCE_DIR}/apps ${PROJECT_SOURCE_DIR}/3rdparty) + + if (UNIX) +-set(LIBRARIES evpp_concurrentqueue event glog pthread) ++set(LIBRARIES evpp_concurrentqueue libevent::core libevent::extra libevent::openssl glog::glog pthread) + link_directories("/home/s/safe/lib" ${PROJECT_BUILD_DIR}/lib) + else(UNIX) + set(LIBRARIES evpp_static event glog) +diff --git a/benchmark/http/libevent/CMakeLists.txt b/benchmark/http/libevent/CMakeLists.txt +index 1148616..0356b71 100644 +--- a/benchmark/http/libevent/CMakeLists.txt ++++ b/benchmark/http/libevent/CMakeLists.txt +@@ -1,3 +1,3 @@ + + add_executable(benchmark_http_libevent libevent_http_bench.c) +-target_link_libraries(benchmark_http_libevent event) ++target_link_libraries(benchmark_http_libevent libevent::core libevent::extra libevent::openssl) +diff --git a/benchmark/ioevent/libevent/CMakeLists.txt b/benchmark/ioevent/libevent/CMakeLists.txt +index dfa51a3..de4849d 100644 +--- a/benchmark/ioevent/libevent/CMakeLists.txt ++++ b/benchmark/ioevent/libevent/CMakeLists.txt +@@ -1,3 +1,3 @@ + + add_executable(benchmark_ioevent_libevent libevent_ioevent_bench.c) +-target_link_libraries(benchmark_ioevent_libevent event) ++target_link_libraries(benchmark_ioevent_libevent libevent::core libevent::extra libevent::openssl) +diff --git a/benchmark/throughput/libevent/CMakeLists.txt b/benchmark/throughput/libevent/CMakeLists.txt +index 21dab84..aefe698 100644 +--- a/benchmark/throughput/libevent/CMakeLists.txt ++++ b/benchmark/throughput/libevent/CMakeLists.txt +@@ -1,5 +1,5 @@ + add_executable(benchmark_tcp_libevent_client client.c) +-target_link_libraries(benchmark_tcp_libevent_client event) ++target_link_libraries(benchmark_tcp_libevent_client libevent::core libevent::extra libevent::openssl) + + add_executable(benchmark_tcp_libevent_server server.c) +-target_link_libraries(benchmark_tcp_libevent_server event) ++target_link_libraries(benchmark_tcp_libevent_server libevent::core libevent::extra libevent::openssl) +diff --git a/examples/recipes/self_control_timer/basic_01/CMakeLists.txt b/examples/recipes/self_control_timer/basic_01/CMakeLists.txt +index 7834db4..82294c5 100644 +--- a/examples/recipes/self_control_timer/basic_01/CMakeLists.txt ++++ b/examples/recipes/self_control_timer/basic_01/CMakeLists.txt +@@ -1,7 +1,7 @@ + file(GLOB SRCS *.cc *.h) + + add_executable(example_recipes_self_control_timer_basic_01 ${SRCS}) +-target_link_libraries(example_recipes_self_control_timer_basic_01 event) ++target_link_libraries(example_recipes_self_control_timer_basic_01 libevent::core libevent::extra libevent::openssl) + + + +diff --git a/examples/recipes/self_control_timer/basic_02/CMakeLists.txt b/examples/recipes/self_control_timer/basic_02/CMakeLists.txt +index a8be419..0329ccc 100644 +--- a/examples/recipes/self_control_timer/basic_02/CMakeLists.txt ++++ b/examples/recipes/self_control_timer/basic_02/CMakeLists.txt +@@ -1,7 +1,7 @@ + file(GLOB SRCS *.cc *.h) + + add_executable(example_recipes_self_control_timer_basic_02 ${SRCS}) +-target_link_libraries(example_recipes_self_control_timer_basic_02 event) ++target_link_libraries(example_recipes_self_control_timer_basic_02 libevent::core libevent::extra libevent::openssl) + + + +diff --git a/examples/recipes/self_control_timer/cancel_03/CMakeLists.txt b/examples/recipes/self_control_timer/cancel_03/CMakeLists.txt +index 1cae9bb..218b771 100644 +--- a/examples/recipes/self_control_timer/cancel_03/CMakeLists.txt ++++ b/examples/recipes/self_control_timer/cancel_03/CMakeLists.txt +@@ -1,7 +1,7 @@ + file(GLOB SRCS *.cc *.h) + + add_executable(example_recipes_self_control_timer_cancel_03 ${SRCS}) +-target_link_libraries(example_recipes_self_control_timer_cancel_03 event) ++target_link_libraries(example_recipes_self_control_timer_cancel_03 libevent::core libevent::extra libevent::openssl) + + + +diff --git a/examples/recipes/self_control_timer/periodic_04/CMakeLists.txt b/examples/recipes/self_control_timer/periodic_04/CMakeLists.txt +index 749c584..e7c658e 100644 +--- a/examples/recipes/self_control_timer/periodic_04/CMakeLists.txt ++++ b/examples/recipes/self_control_timer/periodic_04/CMakeLists.txt +@@ -1,7 +1,7 @@ + file(GLOB SRCS *.cc *.h) + + add_executable(example_recipes_self_control_timer_periodic_04 ${SRCS}) +-target_link_libraries(example_recipes_self_control_timer_periodic_04 event) ++target_link_libraries(example_recipes_self_control_timer_periodic_04 libevent::core libevent::extra libevent::openssl) + + + diff --git a/vcpkg/ports/evpp/fix-osx-build.patch b/vcpkg/ports/evpp/fix-osx-build.patch new file mode 100644 index 0000000..47c758f --- /dev/null +++ b/vcpkg/ports/evpp/fix-osx-build.patch @@ -0,0 +1,45 @@ +diff --git a/evpp/server_status.h b/evpp/server_status.h +index 3a83725..f28f833 100644 +--- a/evpp/server_status.h ++++ b/evpp/server_status.h +@@ -25,7 +25,7 @@ public: + }; + + std::string StatusToString() const { +- H_CASE_STRING_BIGIN(status_); ++ H_CASE_STRING_BIGIN(+status_); + H_CASE_STRING(kNull); + H_CASE_STRING(kInitialized); + H_CASE_STRING(kRunning); +diff --git a/evpp/sockets.cc b/evpp/sockets.cc +index 333c05c..c547d88 100644 +--- a/evpp/sockets.cc ++++ b/evpp/sockets.cc +@@ -22,6 +22,14 @@ std::string strerror(int e) { + } + + return empty_string; ++#elif defined(__APPLE__) ++ char buf[2048] = {}; ++ strerror_r(e, buf, sizeof(buf) - 1); ++ const char* s = buf; ++ if (s) { ++ return std::string(s); ++ } ++ return std::string(); + #else + char buf[2048] = {}; + const char* s = strerror_r(e, buf, sizeof(buf) - 1); +diff --git a/evpp/tcp_conn.cc b/evpp/tcp_conn.cc +index b7678d0..527b2b9 100644 +--- a/evpp/tcp_conn.cc ++++ b/evpp/tcp_conn.cc +@@ -309,7 +309,7 @@ void TCPConn::SetTCPNoDelay(bool on) { + } + + std::string TCPConn::StatusToString() const { +- H_CASE_STRING_BIGIN(status_); ++ H_CASE_STRING_BIGIN(+status_); + H_CASE_STRING(kDisconnected); + H_CASE_STRING(kConnecting); + H_CASE_STRING(kConnected); diff --git a/vcpkg/ports/evpp/fix-rapidjson-1-1.patch b/vcpkg/ports/evpp/fix-rapidjson-1-1.patch new file mode 100644 index 0000000..1dda0b8 --- /dev/null +++ b/vcpkg/ports/evpp/fix-rapidjson-1-1.patch @@ -0,0 +1,159 @@ +diff --git a/3rdparty/libhashkit/crc32.c b/3rdparty/libhashkit/crc32.c +index 6db0478..ff34194 100644 +--- a/3rdparty/libhashkit/crc32.c ++++ b/3rdparty/libhashkit/crc32.c +@@ -73,7 +73,7 @@ static const uint32_t crc32tab[256] = { + 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d, + }; + +-uint32_t hashkit_crc32(const char *key, size_t key_length, void *context __attribute__((unused))) ++uint32_t hashkit_crc32(const char *key, size_t key_length, void * context) + { + uint64_t x; + uint32_t crc= UINT32_MAX; +diff --git a/3rdparty/libhashkit/fnv.c b/3rdparty/libhashkit/fnv.c +index ee3754d..d79fe39 100644 +--- a/3rdparty/libhashkit/fnv.c ++++ b/3rdparty/libhashkit/fnv.c +@@ -14,7 +14,7 @@ static uint64_t FNV_64_PRIME= UINT64_C(0x100000001b3); + static uint32_t FNV_32_INIT= 2166136261UL; + static uint32_t FNV_32_PRIME= 16777619; + +-uint32_t hashkit_fnv1_64(const char *key, size_t key_length, void *context __attribute__((unused))) ++uint32_t hashkit_fnv1_64(const char *key, size_t key_length, void * context) + { + /* Thanks to pierre@demartines.com for the pointer */ + uint64_t hash= FNV_64_INIT; +@@ -28,7 +28,7 @@ uint32_t hashkit_fnv1_64(const char *key, size_t key_length, void *context __att + return (uint32_t)hash; + } + +-uint32_t hashkit_fnv1a_64(const char *key, size_t key_length, void *context __attribute__((unused))) ++uint32_t hashkit_fnv1a_64(const char *key, size_t key_length, void * context) + { + uint32_t hash= (uint32_t) FNV_64_INIT; + +@@ -42,7 +42,7 @@ uint32_t hashkit_fnv1a_64(const char *key, size_t key_length, void *context __at + return hash; + } + +-uint32_t hashkit_fnv1_32(const char *key, size_t key_length, void *context __attribute__((unused))) ++uint32_t hashkit_fnv1_32(const char *key, size_t key_length, void * context) + { + uint32_t hash= FNV_32_INIT; + +@@ -56,7 +56,7 @@ uint32_t hashkit_fnv1_32(const char *key, size_t key_length, void *context __att + return hash; + } + +-uint32_t hashkit_fnv1a_32(const char *key, size_t key_length, void *context __attribute__((unused))) ++uint32_t hashkit_fnv1a_32(const char *key, size_t key_length, void * context) + { + uint32_t hash= FNV_32_INIT; + +diff --git a/3rdparty/libhashkit/hsieh.c b/3rdparty/libhashkit/hsieh.c +index ba46ed2..c3e9a38 100644 +--- a/3rdparty/libhashkit/hsieh.c ++++ b/3rdparty/libhashkit/hsieh.c +@@ -17,7 +17,7 @@ + +(uint32_t)(((const uint8_t *)(d))[0]) ) + #endif + +-uint32_t hashkit_hsieh(const char *key, size_t key_length, void *context __attribute__((unused))) ++uint32_t hashkit_hsieh(const char *key, size_t key_length, void * context) + { + uint32_t hash = 0, tmp; + int rem; +diff --git a/3rdparty/libhashkit/jenkins.c b/3rdparty/libhashkit/jenkins.c +index b684d7a..2b59714 100644 +--- a/3rdparty/libhashkit/jenkins.c ++++ b/3rdparty/libhashkit/jenkins.c +@@ -56,7 +56,7 @@ use a bitmask. For example, if you need only 10 bits, do + In which case, the hash table should have hashsize(10) elements. + */ + +-uint32_t hashkit_jenkins(const char *key, size_t length, void *context __attribute__((unused))) ++uint32_t hashkit_jenkins(const char *key, size_t length, void * context) + { + uint32_t a,b,c; /* internal state */ + union { const void *ptr; size_t i; } u; /* needed for Mac Powerbook G4 */ +diff --git a/3rdparty/libhashkit/md5.c b/3rdparty/libhashkit/md5.c +index 7371c6d..0e3181b 100644 +--- a/3rdparty/libhashkit/md5.c ++++ b/3rdparty/libhashkit/md5.c +@@ -352,7 +352,7 @@ unsigned int len) + (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24); + } + +-uint32_t hashkit_md5(const char *key, size_t key_length, void *context __attribute__((unused))) ++uint32_t hashkit_md5(const char *key, size_t key_length, void * context) + { + unsigned char results[16]; + +diff --git a/3rdparty/libhashkit/murmur.c b/3rdparty/libhashkit/murmur.c +index a18ac40..9e55eec 100644 +--- a/3rdparty/libhashkit/murmur.c ++++ b/3rdparty/libhashkit/murmur.c +@@ -17,7 +17,7 @@ + + #include "common.h" + +-uint32_t hashkit_murmur(const char *key, size_t length, void *context __attribute__((unused))) ++uint32_t hashkit_murmur(const char *key, size_t length, void * context) + { + /* + 'm' and 'r' are mixing constants generated offline. They're not +diff --git a/3rdparty/libhashkit/one_at_a_time.c b/3rdparty/libhashkit/one_at_a_time.c +index 579d044..539861c 100644 +--- a/3rdparty/libhashkit/one_at_a_time.c ++++ b/3rdparty/libhashkit/one_at_a_time.c +@@ -13,7 +13,7 @@ http://en.wikipedia.org/wiki/Jenkins_hash_function + + #include "common.h" + +-uint32_t hashkit_one_at_a_time(const char *key, size_t key_length, void *context __attribute__((unused))) ++uint32_t hashkit_one_at_a_time(const char *key, size_t key_length, void * context) + { + const char *ptr= key; + uint32_t value= 0; +diff --git a/3rdparty/libhashkit/strerror.c b/3rdparty/libhashkit/strerror.c +index 270fa21..7446782 100644 +--- a/3rdparty/libhashkit/strerror.c ++++ b/3rdparty/libhashkit/strerror.c +@@ -8,7 +8,7 @@ + + #include "common.h" + +-const char *hashkit_strerror(hashkit_st *ptr __attribute__((unused)), hashkit_return_t rc) ++const char *hashkit_strerror(hashkit_st *ptr, hashkit_return_t rc) + { + switch (rc) + { +diff --git a/apps/evnsq/option.cc b/apps/evnsq/option.cc +index e2128f5..0248ace 100644 +--- a/apps/evnsq/option.cc ++++ b/apps/evnsq/option.cc +@@ -21,14 +21,14 @@ std::string Option::ToJSON() const { + doc.AddMember("write_timeout", rapidjson::Value(int64_t(write_timeout.Milliseconds())), doc.GetAllocator()); + doc.AddMember("msg_timeout", rapidjson::Value(int64_t(msg_timeout.Milliseconds())), doc.GetAllocator()); + +- doc.AddMember("client_id", rapidjson::Value(client_id, doc.GetAllocator()), doc.GetAllocator()); +- doc.AddMember("hostname", rapidjson::Value(hostname, doc.GetAllocator()), doc.GetAllocator()); +- doc.AddMember("user_agent", rapidjson::Value(user_agent, doc.GetAllocator()), doc.GetAllocator()); ++ doc.AddMember("client_id", rapidjson::Value(client_id.data(), client_id.size(), doc.GetAllocator()), doc.GetAllocator()); ++ doc.AddMember("hostname", rapidjson::Value(hostname.data(), hostname.size(), doc.GetAllocator()), doc.GetAllocator()); ++ doc.AddMember("user_agent", rapidjson::Value(user_agent.data(), user_agent.size(), doc.GetAllocator()), doc.GetAllocator()); + + doc.AddMember("heartbeat_interval", rapidjson::Value(int64_t(heartbeat_interval.Milliseconds())), doc.GetAllocator()); + + doc.AddMember("deflate", rapidjson::Value(false), doc.GetAllocator()); +- doc.AddMember("long_id", rapidjson::Value(hostname, doc.GetAllocator()), doc.GetAllocator()); ++ doc.AddMember("long_id", rapidjson::Value(hostname.data(), hostname.size(), doc.GetAllocator()), doc.GetAllocator()); + doc.AddMember("output_buffer_size", rapidjson::Value(int64_t(16384)), doc.GetAllocator()); + doc.AddMember("output_buffer_timeout", rapidjson::Value(int64_t(250)), doc.GetAllocator()); + doc.AddMember("feature_negotiation", rapidjson::Value(feature_negotiation), doc.GetAllocator()); +@@ -40,3 +40,4 @@ std::string Option::ToJSON() const { + return std::string(buffer.GetString(), buffer.GetSize()); + } + } ++ diff --git a/vcpkg/ports/evpp/portfile.cmake b/vcpkg/ports/evpp/portfile.cmake new file mode 100644 index 0000000..b3edaf3 --- /dev/null +++ b/vcpkg/ports/evpp/portfile.cmake @@ -0,0 +1,29 @@ +set(EVPP_VERSION 0.7.0) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Qihoo360/evpp + REF v${EVPP_VERSION} + SHA512 ddcef8d2af6b3c46473d755c0f0994d63d56240ea85d6b44ceb6b77724c3c56bbf1156f7188e270fb5f9f36f25bfc2f96669d7249a34c921922671e3fe267e88 + HEAD_REF master + PATCHES + fix-rapidjson-1-1.patch + fix-linux-build.patch + fix-osx-build.patch +) + +file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/rapidjson ${SOURCE_PATH}/3rdparty/concurrentqueue) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DEVPP_VCPKG_BUILD=ON +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/exiv2/CONTROL b/vcpkg/ports/exiv2/CONTROL new file mode 100644 index 0000000..14be794 --- /dev/null +++ b/vcpkg/ports/exiv2/CONTROL @@ -0,0 +1,17 @@ +Source: exiv2 +Version: 0.27.3 +Port-Version: 2 +Build-Depends: zlib, libiconv, gettext +Description: Image metadata library and tools +Homepage: https://www.exiv2.org +Supports: !uwp + +Feature: unicode +Description: Compile with unicode support on windows + +Feature: xmp +Description: Build with XMP metadata support +Build-Depends: expat + +Feature: video +Description: Build video support into library diff --git a/vcpkg/ports/exiv2/portfile.cmake b/vcpkg/ports/exiv2/portfile.cmake new file mode 100644 index 0000000..262be9d --- /dev/null +++ b/vcpkg/ports/exiv2/portfile.cmake @@ -0,0 +1,52 @@ +#https://github.com/Exiv2/exiv2/issues/1063 +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Exiv2/exiv2 + REF 194bb65ac568a5435874c9d9d73b1c8a68e4edec #v0.27.3 + SHA512 35a5a41e0a6cfe04d1ed005c8116ad4430516402b925db3d4f719e2385e2cfb09359eb7ab51853bc560138f221900778cd2e2d39f108c513b3e7d22dbb9bf503 + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + unicode EXIV2_ENABLE_WIN_UNICODE + xmp EXIV2_ENABLE_XMP + video EXIV2_ENABLE_VIDEO +) + +if("unicode" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "Feature unicode only supports Windows platform.") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DEXIV2_BUILD_EXIV2_COMMAND:BOOL=FALSE + -DEXIV2_BUILD_UNIT_TESTS:BOOL=FALSE + -DEXIV2_BUILD_SAMPLES:BOOL=FALSE +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/exiv2) + +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake + ${CURRENT_PACKAGES_DIR}/share/${PORT} + @ONLY +) + +vcpkg_copy_pdbs() + +# Clean +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/exiv2 ${CURRENT_PACKAGES_DIR}/lib/exiv2) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/exiv2/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/exiv2/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..76e941f --- /dev/null +++ b/vcpkg/ports/exiv2/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,11 @@ +_find_package(${ARGS}) + +if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static") + find_package(unofficial-iconv CONFIG REQUIRED) + find_package(unofficial-gettext CONFIG REQUIRED) + if(TARGET exiv2lib) + set_property(TARGET exiv2lib APPEND PROPERTY INTERFACE_LINK_LIBRARIES + unofficial::iconv::libiconv + unofficial::gettext::libintl) + endif() +endif() diff --git a/vcpkg/ports/expat/CONTROL b/vcpkg/ports/expat/CONTROL new file mode 100644 index 0000000..2bfc11a --- /dev/null +++ b/vcpkg/ports/expat/CONTROL @@ -0,0 +1,4 @@ +Source: expat +Version: 2020-08-18 +Homepage: https://github.com/libexpat/libexpat +Description: XML parser library written in C diff --git a/vcpkg/ports/expat/pkgconfig.patch b/vcpkg/ports/expat/pkgconfig.patch new file mode 100644 index 0000000..401daf7 --- /dev/null +++ b/vcpkg/ports/expat/pkgconfig.patch @@ -0,0 +1,15 @@ +diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt +index a67f081b1..cc220f2a1 100644 +--- a/expat/CMakeLists.txt ++++ b/expat/CMakeLists.txt +@@ -294,7 +294,9 @@ expat_install(FILES lib/expat.h lib/expat_external.h DESTINATION ${CMAKE_INSTALL + # + # pkg-config file + # ++string(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE_UPPER) ++set(_EXPAT_OUTPUT_NAME ${_EXPAT_OUTPUT_NAME}${CMAKE_${BUILD_TYPE_UPPER}_POSTFIX}) +-if(NOT MSVC) ++if(1) + set(prefix ${CMAKE_INSTALL_PREFIX}) + set(exec_prefix "\${prefix}") + set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}") diff --git a/vcpkg/ports/expat/portfile.cmake b/vcpkg/ports/expat/portfile.cmake new file mode 100644 index 0000000..252d0f8 --- /dev/null +++ b/vcpkg/ports/expat/portfile.cmake @@ -0,0 +1,47 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libexpat/libexpat + REF c092d40c300c6d219cb3b111932a824022265370 #Head from commit 2020-08-18 + SHA512 5a5d41b500f5602a32aea8f4e15593e639206bb3f97553497e80b2975360cac88ac90386f5efc11728614f24bbb620fb908a3c8ca71c9e7b312f6157b2477afe + HEAD_REF master + PATCHES + pkgconfig.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(EXPAT_LINKAGE ON) +else() + set(EXPAT_LINKAGE OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/expat + PREFER_NINJA + OPTIONS + -DEXPAT_BUILD_EXAMPLES=OFF + -DEXPAT_BUILD_TESTS=OFF + -DEXPAT_BUILD_TOOLS=OFF + -DEXPAT_SHARED_LIBS=${EXPAT_LINKAGE} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/expat-2.2.9) +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/expat_external.h + "! defined(XML_STATIC)" + "/* vcpkg static build ! defined(XML_STATIC) */ 0" + ) +endif() + +vcpkg_copy_pdbs() + +#Handle copyright +file(INSTALL ${SOURCE_PATH}/expat/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/expat/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/expat/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..4d3e9e0 --- /dev/null +++ b/vcpkg/ports/expat/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,27 @@ +include(SelectLibraryConfigurations) + +set(EXPATNAMES expat expatw libexpat libexpatw) +set(DEBUGNAMES) +foreach(_CRT "" MT MD) + foreach(name IN LISTS EXPATNAMES) + list(APPEND EXPATNAMES ${name}${_CRT}) + list(APPEND DEBUGNAMES ${name}d${_CRT}) + endforeach() +endforeach() + +find_library(EXPAT_LIBRARY_DEBUG NAMES ${DEBUGNAMES} ${EXPATNAMES} NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH) +find_library(EXPAT_LIBRARY_RELEASE NAMES ${EXPATNAMES} NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH) +select_library_configurations(EXPAT) +set(EXPAT_LIBRARY "${EXPAT_LIBRARIES}" CACHE STRING "" FORCE) +_find_package(${ARGS}) +if(EXPAT_FOUND AND TARGET EXPAT::EXPAT) + if(EXPAT_LIBRARY_DEBUG) + set_target_properties(EXPAT::EXPAT PROPERTIES IMPORTED_LOCATION_DEBUG "${EXPAT_LIBRARY_DEBUG}") + endif() + if(EXPAT_LIBRARY_RELEASE) + set_target_properties(EXPAT::EXPAT PROPERTIES IMPORTED_LOCATION_RELEASE "${EXPAT_LIBRARY_RELEASE}") + endif() +endif() + +unset(EXPATNAMES) +unset(DEBUGNAMES) \ No newline at end of file diff --git a/vcpkg/ports/expected-lite/CONTROL b/vcpkg/ports/expected-lite/CONTROL new file mode 100644 index 0000000..315f1d0 --- /dev/null +++ b/vcpkg/ports/expected-lite/CONTROL @@ -0,0 +1,3 @@ +Source: expected-lite +Version: 0.3.0 +Description: Expected objects in C++11 and later in a single-file header-only library diff --git a/vcpkg/ports/expected-lite/portfile.cmake b/vcpkg/ports/expected-lite/portfile.cmake new file mode 100644 index 0000000..b8f1ac4 --- /dev/null +++ b/vcpkg/ports/expected-lite/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO martinmoene/expected-lite + REF v0.3.0 + SHA512 b24b58ff7bd6d5f355935854b6b5e67c7e9b2f1b6383ecdd2a1655833f414fd1189a07000b40c45a6df8a8641602c5eca19eb5e8639ac6cfe59e3d94bc102ab3 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DEXPECTED_LITE_OPT_BUILD_TESTS=OFF + -DEXPECTED_LITE_OPT_BUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets( + CONFIG_PATH lib/cmake/${PORT} +) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/lib +) + +file(INSTALL + ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright +) diff --git a/vcpkg/ports/exprtk/CONTROL b/vcpkg/ports/exprtk/CONTROL new file mode 100644 index 0000000..2dc2b3a --- /dev/null +++ b/vcpkg/ports/exprtk/CONTROL @@ -0,0 +1,4 @@ +Source: exprtk +Version: 2020-01-01 +Homepage: http://www.partow.net/programming/exprtk/index.html +Description: Simple to use, easy to integrate and extremely efficient run-time C++ mathematical expression parser and evaluation engine. diff --git a/vcpkg/ports/exprtk/copyright b/vcpkg/ports/exprtk/copyright new file mode 100644 index 0000000..56598bb --- /dev/null +++ b/vcpkg/ports/exprtk/copyright @@ -0,0 +1,8 @@ +Copyright 1999-2020 Arash Partow +http://www.partow.net/programming/exprtk/index.html + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vcpkg/ports/exprtk/portfile.cmake b/vcpkg/ports/exprtk/portfile.cmake new file mode 100644 index 0000000..4ed9e3f --- /dev/null +++ b/vcpkg/ports/exprtk/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ArashPartow/exprtk + REF 15b77a667b06d5bd82db01e0f4c773dd7cce9a97 + SHA512 14fdc2420ab8cb0c1552d91251822f873fe7485a2fbf49376261638c6b0a4d2b24ceeeff0692d2cc8e8b78efb13ab886d65f0bebe1efc2348a95c6dc19c98f73 +) + +file(COPY ${SOURCE_PATH}/exprtk.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/exprtk) diff --git a/vcpkg/ports/faad2/0001-Fix-non-x86-msvc.patch b/vcpkg/ports/faad2/0001-Fix-non-x86-msvc.patch new file mode 100644 index 0000000..821dfb0 --- /dev/null +++ b/vcpkg/ports/faad2/0001-Fix-non-x86-msvc.patch @@ -0,0 +1,13 @@ +diff --git a/libfaad/common.h b/libfaad/common.h +index 897a0f0..8b78807 100644 +--- a/libfaad/common.h ++++ b/libfaad/common.h +@@ -313,7 +313,7 @@ char *strchr(), *strrchr(); + } + + +- #if defined(_WIN32) && !defined(_WIN64) && !defined(__MINGW32__) ++ #if defined(_WIN32) && defined(_M_IX86) && !defined(__MINGW32__) + #ifndef HAVE_LRINTF + #define HAS_LRINTF + static INLINE int lrintf(float f) diff --git a/vcpkg/ports/faad2/0002-Fix-unary-minus.patch b/vcpkg/ports/faad2/0002-Fix-unary-minus.patch new file mode 100644 index 0000000..28e1160 --- /dev/null +++ b/vcpkg/ports/faad2/0002-Fix-unary-minus.patch @@ -0,0 +1,24 @@ +diff --git a/libfaad/decoder.c b/libfaad/decoder.c +index 4f4b011..9bed248 100644 +--- a/libfaad/decoder.c ++++ b/libfaad/decoder.c +@@ -239,7 +239,7 @@ static int latmCheck(latm_header *latm, bitfile *ld) + while (ld->bytes_left) + { + bits = faad_latm_frame(latm, ld); +- if(bits==-1U) ++ if(bits==0xFFFFFFFF) + bad++; + else + { +diff --git a/libfaad/syntax.c b/libfaad/syntax.c +index c992543..be8c541 100644 +--- a/libfaad/syntax.c ++++ b/libfaad/syntax.c +@@ -2644,5 +2644,5 @@ uint32_t faad_latm_frame(latm_header *latm, bitfile *ld) + return (len*8)-(endpos-initpos); + //faad_getbits(ld, initpos-endpos); //go back to initpos, but is valid a getbits(-N) ? + } +- return -1U; ++ return 0xFFFFFFFF; + } diff --git a/vcpkg/ports/faad2/0003-Initialize-pointers.patch b/vcpkg/ports/faad2/0003-Initialize-pointers.patch new file mode 100644 index 0000000..29c5725 --- /dev/null +++ b/vcpkg/ports/faad2/0003-Initialize-pointers.patch @@ -0,0 +1,28 @@ +diff --git a/frontend/main.c b/frontend/main.c +index e1d3c7d..25881c7 100644 +--- a/frontend/main.c ++++ b/frontend/main.c +@@ -462,9 +462,9 @@ static int decodeAACfile(char *aacfile, char *sndfile, char *adts_fn, int to_std + unsigned char channels; + void *sample_buffer; + +- audio_file *aufile; ++ audio_file *aufile = NULL; + +- FILE *adtsFile; ++ FILE *adtsFile = NULL; + unsigned char *adtsData; + int adtsDataSize; + +@@ -796,9 +796,9 @@ static int decodeMP4file(char *mp4file, char *sndfile, char *adts_fn, int to_std + + long sampleId, startSampleId; + +- audio_file *aufile; ++ audio_file *aufile = NULL; + +- FILE *adtsFile; ++ FILE *adtsFile = NULL; + unsigned char *adtsData; + int adtsDataSize; + diff --git a/vcpkg/ports/faad2/CMakeLists.txt b/vcpkg/ports/faad2/CMakeLists.txt new file mode 100644 index 0000000..70f9c58 --- /dev/null +++ b/vcpkg/ports/faad2/CMakeLists.txt @@ -0,0 +1,38 @@ +cmake_minimum_required(VERSION 3.1) +project (faad VERSION 2.9.1) + +option(FAAD_BUILD_BINARIES "Build faad2 binaries" OFF) + +file(GLOB_RECURSE FAAD_SOURCES "${CMAKE_CURRENT_LIST_DIR}/libfaad/*.c") +file(GLOB_RECURSE FAAD_HEADERS "${CMAKE_CURRENT_LIST_DIR}/libfaad/*.h") + +if (BUILD_SHARED_LIBS) + list(APPEND FAAD_SOURCES "${CMAKE_CURRENT_LIST_DIR}/project/msvc/libfaad2.def") +endif () + +add_definitions(-DSTDC_HEADERS -DPACKAGE_VERSION=\"${PROJECT_VERSION}\" -D_CRT_SECURE_NO_WARNINGS -DHAVE_LRINTF) +include_directories( + "${CMAKE_CURRENT_LIST_DIR}/include" + "${CMAKE_CURRENT_LIST_DIR}/libfaad" +) +add_library(faad ${FAAD_SOURCES} ${FAAD_HEADERS}) + +if (FAAD_BUILD_BINARIES) + include_directories( + "${CMAKE_CURRENT_LIST_DIR}/frontend" + ) + add_executable(faad_decoder + "${CMAKE_SOURCE_DIR}/frontend/audio.c" + "${CMAKE_SOURCE_DIR}/frontend/main.c" + "${CMAKE_SOURCE_DIR}/frontend/mp4read.c" + "${CMAKE_SOURCE_DIR}/frontend/unicode_support.c" + ) + target_link_libraries(faad_decoder PRIVATE faad shell32) +endif () + +install( + TARGETS faad + ARCHIVE DESTINATION "lib" + LIBRARY DESTINATION "lib" + RUNTIME DESTINATION "bin" + ) diff --git a/vcpkg/ports/faad2/CONTROL b/vcpkg/ports/faad2/CONTROL new file mode 100644 index 0000000..65b02f1 --- /dev/null +++ b/vcpkg/ports/faad2/CONTROL @@ -0,0 +1,8 @@ +Source: faad2 +Version: 2.9.1 +Port-Version: 2 +Homepage: https://sourceforge.net/projects/faac/ +Description: Freeware Advanced Audio (AAC) Decoder + +Feature: build-decoder +Description: Build the embedded decoder executable diff --git a/vcpkg/ports/faad2/portfile.cmake b/vcpkg/ports/faad2/portfile.cmake new file mode 100644 index 0000000..9daa8d4 --- /dev/null +++ b/vcpkg/ports/faad2/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports Windows platform." ON_TARGET "Linux" "OSX") +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO knik0/faad2 + REF 043d37b60cdded2abed7c4054f954e # 2_9_1 + SHA512 8658256bbcb3ce641eef67c4f5d22d54b348805a06b2954718a44910861a9882371c887feb085060c524f955993ae26c211c6bb4fb8d95f9e9d1d0b5dca0ebe4 + HEAD_REF master + PATCHES + 0001-Fix-non-x86-msvc.patch # https://github.com/knik0/faad2/pull/42 + 0002-Fix-unary-minus.patch # https://github.com/knik0/faad2/pull/43 + 0003-Initialize-pointers.patch # https://github.com/knik0/faad2/pull/44 +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + build-decoder FAAD_BUILD_BINARIES +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/fadbad/CONTROL b/vcpkg/ports/fadbad/CONTROL new file mode 100644 index 0000000..103890c --- /dev/null +++ b/vcpkg/ports/fadbad/CONTROL @@ -0,0 +1,4 @@ +Source: fadbad +Version: 2.1.0 +Homepage: https://www.fadbad.com/ +Description: FADBAD++ Templates for Automatic Differentiation diff --git a/vcpkg/ports/fadbad/portfile.cmake b/vcpkg/ports/fadbad/portfile.cmake new file mode 100644 index 0000000..db947be --- /dev/null +++ b/vcpkg/ports/fadbad/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "http://www.fadbad.com/download/FADBAD++-2.1.tar.gz" + FILENAME "FADBAD++-2.1.tar.gz" + SHA512 7a82c51c03acb0806d673853f391379ea974e304c831ee15ef05a90c30661736ff572481b5b8254b2646c63968043ee90a06cba88261b87fc34d01f92403360a +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(INSTALL + ${SOURCE_PATH}/tadiff.h + ${SOURCE_PATH}/fadbad.h + ${SOURCE_PATH}/fadiff.h + ${SOURCE_PATH}/badiff.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) + +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/fadbad RENAME copyright) diff --git a/vcpkg/ports/fann/CONTROL b/vcpkg/ports/fann/CONTROL new file mode 100644 index 0000000..20fc0dd --- /dev/null +++ b/vcpkg/ports/fann/CONTROL @@ -0,0 +1,3 @@ +Source: fann +Version: 2.2.0-1 +Description: Fast Artificial Neural Network (FANN) Library is a free open source neural network library, which implements multilayer artificial neural networks in C with support for both fully connected and sparsely connected networks. diff --git a/vcpkg/ports/fann/portfile.cmake b/vcpkg/ports/fann/portfile.cmake new file mode 100644 index 0000000..de4af35 --- /dev/null +++ b/vcpkg/ports/fann/portfile.cmake @@ -0,0 +1,50 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libfann/fann + REF 2.2.0 + SHA512 b307539a39d93078a489710ac77aa8c6e324f3cf5ef80299ce257d10c043913764abef83aceac5278a5bd243b1ee245b4e8331a9e13c774aa63c9cb604f86bdd + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) +vcpkg_install_cmake() + +if(NOT VCPKG_CMAKE_SYSTEM_NAME) + # Finish Directories + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/fann.dll ${CURRENT_PACKAGES_DIR}/bin/fann.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/doublefann.dll ${CURRENT_PACKAGES_DIR}/bin/doublefann.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/fixedfann.dll ${CURRENT_PACKAGES_DIR}/bin/fixedfann.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/floatfann.dll ${CURRENT_PACKAGES_DIR}/bin/floatfann.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/fann.lib ${CURRENT_PACKAGES_DIR}/lib/fann.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/doublefann.lib ${CURRENT_PACKAGES_DIR}/lib/doublefann.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/fixedfann.lib ${CURRENT_PACKAGES_DIR}/lib/fixedfann.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/floatfann.lib ${CURRENT_PACKAGES_DIR}/lib/floatfann.lib) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/fann.dll ${CURRENT_PACKAGES_DIR}/debug/bin/fann.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/doublefann.dll ${CURRENT_PACKAGES_DIR}/debug/bin/doublefann.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/fixedfann.dll ${CURRENT_PACKAGES_DIR}/debug/bin/fixedfann.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/floatfann.dll ${CURRENT_PACKAGES_DIR}/debug/bin/floatfann.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/fann.lib ${CURRENT_PACKAGES_DIR}/debug/lib/fann.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/doublefann.lib ${CURRENT_PACKAGES_DIR}/debug/lib/doublefann.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/fixedfann.lib ${CURRENT_PACKAGES_DIR}/debug/lib/fixedfann.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/floatfann.lib ${CURRENT_PACKAGES_DIR}/debug/lib/floatfann.lib) + + # Remove useless config file and include path + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +endif() + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/farmhash/CONTROL b/vcpkg/ports/farmhash/CONTROL new file mode 100644 index 0000000..7d7f4d3 --- /dev/null +++ b/vcpkg/ports/farmhash/CONTROL @@ -0,0 +1,6 @@ +Source: farmhash +Version: 1.1 +Port-Version: 2 +Homepage: https://github.com/google/farmhash +Description: FarmHash, a family of hash functions. +Supports: !arm diff --git a/vcpkg/ports/farmhash/farmhashConfig.cmake b/vcpkg/ports/farmhash/farmhashConfig.cmake new file mode 100644 index 0000000..b7b4cd1 --- /dev/null +++ b/vcpkg/ports/farmhash/farmhashConfig.cmake @@ -0,0 +1,16 @@ +function(set_library_target NAMESPACE LIB_NAME DEBUG_LIB_FILE_NAME RELEASE_LIB_FILE_NAME INCLUDE_DIR) + add_library(${NAMESPACE}::${LIB_NAME} STATIC IMPORTED) + set_target_properties(${NAMESPACE}::${LIB_NAME} PROPERTIES + IMPORTED_CONFIGURATIONS "RELEASE;DEBUG" + IMPORTED_LOCATION_RELEASE "${RELEASE_LIB_FILE_NAME}" + IMPORTED_LOCATION_DEBUG "${DEBUG_LIB_FILE_NAME}" + INTERFACE_INCLUDE_DIRECTORIES "${INCLUDE_DIR}" + ) + set(${NAMESPACE}_${LIB_NAME}_FOUND 1) +endfunction() + +get_filename_component(ROOT "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(ROOT "${ROOT}" PATH) +get_filename_component(ROOT "${ROOT}" PATH) + +set_library_target("GOOGLE" "farmhash" "${ROOT}/debug/lib/libfarmhash.a" "${ROOT}/lib/libfarmhash.a" "${ROOT}/include/") diff --git a/vcpkg/ports/farmhash/portfile.cmake b/vcpkg/ports/farmhash/portfile.cmake new file mode 100644 index 0000000..801e057 --- /dev/null +++ b/vcpkg/ports/farmhash/portfile.cmake @@ -0,0 +1,27 @@ +#Requires a compiler which understands '__builtin_unreachable': +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/farmhash + REF 0d859a811870d10f53a594927d0d0b97573ad06d + SHA512 7bc14931e488464c1cedbc17551fb90a8cec494d0e0860db9df8efff09000fd8d91e01060dd5c5149b1104ac4ac8bf7eb57e5b156b05ef42636938edad1518f1 + HEAD_REF master +) + +if((VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) AND NOT ENV{CXX_FLAGS}) # This should be a compiler check + set(ENV{CXXFLAGS} "-maes -msse4.2") +endif() +file(REMOVE_RECURSE "${SOURCE_PATH}/configure") +vcpkg_configure_make( + AUTOCONFIG + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_make() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/farmhashConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) \ No newline at end of file diff --git a/vcpkg/ports/farmhash/usage b/vcpkg/ports/farmhash/usage new file mode 100644 index 0000000..6ec1706 --- /dev/null +++ b/vcpkg/ports/farmhash/usage @@ -0,0 +1,4 @@ +The package farmhash is compatible with built-in CMake targets: + + FIND_PACKAGE(farmhash REQUIRED) + TARGET_LINK_LIBRARIES(main PRIVATE GOOGLE::farmhash) for linkage \ No newline at end of file diff --git a/vcpkg/ports/fast-cpp-csv-parser/CONTROL b/vcpkg/ports/fast-cpp-csv-parser/CONTROL new file mode 100644 index 0000000..a9766a6 --- /dev/null +++ b/vcpkg/ports/fast-cpp-csv-parser/CONTROL @@ -0,0 +1,4 @@ +Source: fast-cpp-csv-parser +Version: 2019-08-14 +Description: A small, easy-to-use and fast header-only library for reading comma separated value (CSV) files +Homepage: https://github.com/ben-strasser/fast-cpp-csv-parser diff --git a/vcpkg/ports/fast-cpp-csv-parser/portfile.cmake b/vcpkg/ports/fast-cpp-csv-parser/portfile.cmake new file mode 100644 index 0000000..be3ef7e --- /dev/null +++ b/vcpkg/ports/fast-cpp-csv-parser/portfile.cmake @@ -0,0 +1,16 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ben-strasser/fast-cpp-csv-parser + REF 78f413248fdeea27368481c4a1d48c059ac36680 + SHA512 f8eb477e0b5e82f5b5d7bdf045094dcc59433e7b6305a1e16e45c2c24f4bbb7f6e9540e17a8ffafce29ea2ebe3a2647174824abe80da5f2054f7df3d7da8c28d + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/csv.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/fastcdr/CONTROL b/vcpkg/ports/fastcdr/CONTROL new file mode 100644 index 0000000..87775a4 --- /dev/null +++ b/vcpkg/ports/fastcdr/CONTROL @@ -0,0 +1,5 @@ +Source: fastcdr +Version: 1.0.15 +Homepage: https://github.com/eProsima/Fast-CDR +Description: eProsima FastCDR is a C++ library that provides two serialization mechanisms. One is the standard CDR serialization mechanism, while the other is a faster implementation that modifies the standard. +Supports: !linux diff --git a/vcpkg/ports/fastcdr/install-cmake.patch b/vcpkg/ports/fastcdr/install-cmake.patch new file mode 100644 index 0000000..0429689 --- /dev/null +++ b/vcpkg/ports/fastcdr/install-cmake.patch @@ -0,0 +1,13 @@ +diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt +index 14747c9..65c3ddb 100644 +--- a/src/cpp/CMakeLists.txt ++++ b/src/cpp/CMakeLists.txt +@@ -155,7 +155,7 @@ elseif(NOT EPROSIMA_INSTALLER) + COMPONENT cmake + ) + +- if(MSVC OR MSVC_IDE) ++ if(MSVC OR MSVC_IDE AND 0) + if(TARGET_TYPE STREQUAL "SHARED_LIBRARY") + # Install pdb files + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Debug/ diff --git a/vcpkg/ports/fastcdr/portfile.cmake b/vcpkg/ports/fastcdr/portfile.cmake new file mode 100644 index 0000000..cfb2672 --- /dev/null +++ b/vcpkg/ports/fastcdr/portfile.cmake @@ -0,0 +1,38 @@ +vcpkg_fail_port_install(ON_TARGET "linux") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO eProsima/Fast-CDR + REF 065d49248bd4afbae670836ee1f1c718b9760dde # v1.0.15 + SHA512 1e011f1848abace94299368a5150f9f7513a676ccdc2b2247cebcb098f7b397e9bd20f5663bc35ea9921b1c91654af39e19b867b73c38bdc5612e0e2b926743a + HEAD_REF master + PATCHES install-cmake.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_DISABLE_FIND_PACKAGE_GTest=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/fastcdr) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/lib/fastcdr ${CURRENT_PACKAGES_DIR}/debug/lib/fastcdr) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(READ ${CURRENT_PACKAGES_DIR}/include/fastcdr/eProsima_auto_link.h EPROSIMA_AUTO_LINK_H) + string(REPLACE "#define EPROSIMA_LIB_PREFIX \"lib\"" "#define EPROSIMA_LIB_PREFIX" EPROSIMA_AUTO_LINK_H "${EPROSIMA_AUTO_LINK_H}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/fastcdr/eProsima_auto_link.h "${EPROSIMA_AUTO_LINK_H}") +else() + file(READ ${CURRENT_PACKAGES_DIR}/include/fastcdr/config.h FASTCDR_H) + string(REPLACE "#define _FASTCDR_CONFIG_H_" "#define _FASTCDR_CONFIG_H_\r\n#define FASTCDR_DYN_LINK" FASTCDR_H "${FASTCDR_H}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/fastcdr/config.h "${FASTCDR_H}") +endif() + +file(INSTALL ${SOURCE_PATH}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/fastfeat/CMakeLists.txt b/vcpkg/ports/fastfeat/CMakeLists.txt new file mode 100644 index 0000000..89f1dc2 --- /dev/null +++ b/vcpkg/ports/fastfeat/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.8) +project(fastfeat) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +include_directories(.) +file( GLOB SRCS *.c *.def) +add_library(fastfeat ${SRCS}) + + +install( + TARGETS fastfeat + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install( + FILES fast.h DESTINATION include + ) +endif() diff --git a/vcpkg/ports/fastfeat/CONTROL b/vcpkg/ports/fastfeat/CONTROL new file mode 100644 index 0000000..9349930 --- /dev/null +++ b/vcpkg/ports/fastfeat/CONTROL @@ -0,0 +1,3 @@ +Source: fastfeat +Version: 391d5e9-1 +Description: FAST feature detectors in C diff --git a/vcpkg/ports/fastfeat/fastfeat.def b/vcpkg/ports/fastfeat/fastfeat.def new file mode 100644 index 0000000..21e0483 --- /dev/null +++ b/vcpkg/ports/fastfeat/fastfeat.def @@ -0,0 +1,19 @@ +LIBRARY fastfeat +EXPORTS + fast9_detect_nonmax @1 + fast10_detect_nonmax @2 + fast9_corner_score @3 + fast10_corner_score @4 + fast11_corner_score @5 + fast12_corner_score @6 + fast9_detect @7 + fast10_detect @8 + fast11_detect @9 + fast12_detect @10 + fast9_score @11 + fast10_score @12 + fast11_score @13 + fast12_score @14 + fast11_detect_nonmax @15 + fast12_detect_nonmax @16 + nonmax_suppression @17 diff --git a/vcpkg/ports/fastfeat/portfile.cmake b/vcpkg/ports/fastfeat/portfile.cmake new file mode 100644 index 0000000..7fd35b9 --- /dev/null +++ b/vcpkg/ports/fastfeat/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO edrosten/fast-C-src + REF 391d5e939eb1545d24c10533d7de424db8d9c191 + SHA512 d6f401e2f80193c4f1f99e1ef59af7107d674c515574cf513c5977c4c95c49c0520d2a6e6787f617b42d9e3bd93c78b8fa7f1d8dc8901351820590078e62130e + HEAD_REF master +) + + +file(COPY +${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_LIST_DIR}/fastfeat.def +DESTINATION ${SOURCE_PATH} +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/fastfeat RENAME copyright) diff --git a/vcpkg/ports/fastlz/CMakeLists.txt b/vcpkg/ports/fastlz/CMakeLists.txt new file mode 100644 index 0000000..79a7a2a --- /dev/null +++ b/vcpkg/ports/fastlz/CMakeLists.txt @@ -0,0 +1,16 @@ +CMAKE_MINIMUM_REQUIRED ( VERSION 2.6) + +add_library (fastlz fastlz.c) + +install (TARGETS fastlz DESTINATION + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib +) +IF (NOT DEFINED SKIP_INSTALL_HEADERS) + INSTALL( + FILES + fastlz.h + DESTINATION include + ) +ENDIF () \ No newline at end of file diff --git a/vcpkg/ports/fastlz/CONTROL b/vcpkg/ports/fastlz/CONTROL new file mode 100644 index 0000000..98b5355 --- /dev/null +++ b/vcpkg/ports/fastlz/CONTROL @@ -0,0 +1,4 @@ +Source: fastlz +Version: 1.0-3 +Homepage: https://github.com/ariya/FastLZ +Description: A lightning-fast lossless compression library diff --git a/vcpkg/ports/fastlz/portfile.cmake b/vcpkg/ports/fastlz/portfile.cmake new file mode 100644 index 0000000..38c71aa --- /dev/null +++ b/vcpkg/ports/fastlz/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ariya/FastLZ + REF f1217348a868bdb9ee0730244475aee05ab329c5 + SHA512 444465aa5d830f54b86112cbd0431099d8e1a11d46bd02e1dc5dc0b3d772736624287e6bc328159195197d0d08cb659d39c59c5336ffa432032f3798e04f4440 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/fastlz) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/fastlz/LICENSE ${CURRENT_PACKAGES_DIR}/share/fastlz/copyright) +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/fastrtps/CONTROL b/vcpkg/ports/fastrtps/CONTROL new file mode 100644 index 0000000..8d52ba9 --- /dev/null +++ b/vcpkg/ports/fastrtps/CONTROL @@ -0,0 +1,5 @@ +Source: fastrtps +Version: 2.0.1 +Homepage: https://www.eprosima.com/ +Description: Eprosima Fast RTPS is a C++ implementation of the RTPS (Real Time Publish Subscribe) protocol, which provides publisher-subscriber communications over unreliable transports such as UDP, as defined and maintained by the Object Management Group (OMG) consortium. +Build-Depends: openssl, asio, tinyxml2, fastcdr, foonathan-memory \ No newline at end of file diff --git a/vcpkg/ports/fastrtps/portfile.cmake b/vcpkg/ports/fastrtps/portfile.cmake new file mode 100644 index 0000000..9f72b5d --- /dev/null +++ b/vcpkg/ports/fastrtps/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO eProsima/Fast-DDS + REF 40568fa4784e846f95c461608d43a2b57eaef55b # v2.0.1 + SHA512 a0cb48713a41ba3562c98dfc176508779e70e35b573428ac0a74c74254aa34c583bd545169f3a3961172bfc9e7bb14d08b5d56569e176fe8248d714bec5813a4 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/fastrtps/cmake TARGET_PATH share/fastrtps) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/fbthrift/CONTROL b/vcpkg/ports/fbthrift/CONTROL new file mode 100644 index 0000000..75b69dc --- /dev/null +++ b/vcpkg/ports/fbthrift/CONTROL @@ -0,0 +1,6 @@ +Source: fbthrift +Version: 2019.11.11.00 +Homepage: https://github.com/facebook/fbthrift +Description: Facebook's branch of Apache Thrift, including a new C++ server. +Build-Depends: openssl, zlib, fmt, gflags, glog, rsocket, fizz, folly, wangle, zstd, boost-context, boost-filesystem, boost-program-options, boost-regex, boost-system, boost-thread +Supports: x64 diff --git a/vcpkg/ports/fbthrift/portfile.cmake b/vcpkg/ports/fbthrift/portfile.cmake new file mode 100644 index 0000000..ecd0382 --- /dev/null +++ b/vcpkg/ports/fbthrift/portfile.cmake @@ -0,0 +1,51 @@ +vcpkg_fail_port_install(ON_ARCH "x86" "arm") + +vcpkg_find_acquire_program(FLEX) +vcpkg_find_acquire_program(BISON) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO facebook/fbthrift + REF 3b56786f0822f78a408addffaf3a54b1b8c86dcd # v2019.11.11.00 + SHA512 d892c6825345d2dc68abbe7a0eacb5ee0444fdea328d8d6bbcd512752058a2de715c03567120090a355115bb9d5d41f3f9c8dc2f82b8054d0b5a2fd1621bf473 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBISON_EXECUTABLE=${BISON} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/fbthrift) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# There should be no empty directories in vcpkg/packages/fbthrift_x64-linux +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp/transport/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp/util/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/http2/server/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/http2/common/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/http2/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/core/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/transport/inmemory/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/protocol/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/security/extensions/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/security/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/frozen/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/reflection/docs + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/cpp2/util/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/py3/test + ${CURRENT_PACKAGES_DIR}/include/thrift/lib/py3/test +) + +vcpkg_copy_tools(TOOL_NAMES thrift1 AUTO_CLEAN) +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/fcl/CONTROL b/vcpkg/ports/fcl/CONTROL new file mode 100644 index 0000000..8ab0cde --- /dev/null +++ b/vcpkg/ports/fcl/CONTROL @@ -0,0 +1,5 @@ +Source: fcl +Version: 0.6.1 +Homepage: https://github.com/flexible-collision-library/fcl +Description: a library for performing three types of proximity queries on a pair of geometric models composed of triangles +Build-Depends: ccd, octomap, eigen3 diff --git a/vcpkg/ports/fcl/portfile.cmake b/vcpkg/ports/fcl/portfile.cmake new file mode 100644 index 0000000..0bd7466 --- /dev/null +++ b/vcpkg/ports/fcl/portfile.cmake @@ -0,0 +1,43 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO flexible-collision-library/fcl + REF 97455a46de121fb7c0f749e21a58b1b54cd2c6be # 0.6.1 + SHA512 1ed1f43866a2da045fcb82ec54a7812c3fc46306386bc04ccf33b5e169773743b2985997373a63bf480098a321600321fdf5061b1448b48e993cf92cad032891 + HEAD_REF master +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(FCL_STATIC_LIBRARY ON) +else() + set(FCL_STATIC_LIBRARY OFF) +endif() + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(FCL_USE_X64_SSE ON) +else() + set(FCL_USE_X64_SSE OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFCL_STATIC_LIBRARY=${FCL_STATIC_LIBRARY} + -DFCL_BUILD_TESTS=OFF + -DFCL_USE_X64_SSE=${FCL_USE_X64_SSE} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/fcl) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/fdk-aac/CMakeLists.txt b/vcpkg/ports/fdk-aac/CMakeLists.txt new file mode 100644 index 0000000..67db1b3 --- /dev/null +++ b/vcpkg/ports/fdk-aac/CMakeLists.txt @@ -0,0 +1,203 @@ +cmake_minimum_required(VERSION 3.8.0) + +project(fdk-aac) + +set(AACDEC_SRC + libAACdec/src/aacdec_drc.cpp + libAACdec/src/aacdec_hcr.cpp + libAACdec/src/aacdecoder.cpp + libAACdec/src/aacdec_pns.cpp + libAACdec/src/aac_ram.cpp + libAACdec/src/block.cpp + libAACdec/src/channelinfo.cpp + libAACdec/src/ldfiltbank.cpp + libAACdec/src/rvlcbit.cpp + libAACdec/src/rvlc.cpp + libAACdec/src/aacdec_hcr_bit.cpp + libAACdec/src/aacdec_hcrs.cpp + libAACdec/src/aacdecoder_lib.cpp + libAACdec/src/aacdec_tns.cpp + libAACdec/src/aac_rom.cpp + libAACdec/src/channel.cpp + libAACdec/src/conceal.cpp + libAACdec/src/pulsedata.cpp + libAACdec/src/rvlcconceal.cpp + libAACdec/src/stereo.cpp +) + +set(AACENC_SRC + libAACenc/src/aacenc.cpp + libAACenc/src/aacEnc_ram.cpp + libAACenc/src/band_nrg.cpp + libAACenc/src/block_switch.cpp + libAACenc/src/grp_data.cpp + libAACenc/src/metadata_main.cpp + libAACenc/src/pre_echo_control.cpp + libAACenc/src/quantize.cpp + libAACenc/src/tonality.cpp + libAACenc/src/aacEnc_rom.cpp + libAACenc/src/bandwidth.cpp + libAACenc/src/channel_map.cpp + libAACenc/src/intensity.cpp + libAACenc/src/ms_stereo.cpp + libAACenc/src/psy_configuration.cpp + libAACenc/src/sf_estim.cpp + libAACenc/src/transform.cpp + libAACenc/src/aacenc_lib.cpp + libAACenc/src/aacenc_tns.cpp + libAACenc/src/bit_cnt.cpp + libAACenc/src/chaosmeasure.cpp + libAACenc/src/line_pe.cpp + libAACenc/src/noisedet.cpp + libAACenc/src/psy_main.cpp + libAACenc/src/spreading.cpp + libAACenc/src/aacenc_pns.cpp + libAACenc/src/adj_thr.cpp + libAACenc/src/bitenc.cpp + libAACenc/src/dyn_bits.cpp + libAACenc/src/metadata_compressor.cpp + libAACenc/src/pnsparam.cpp + libAACenc/src/qc_main.cpp +) + +set(FDK_SRC + libFDK/src/autocorr2nd.cpp + libFDK/src/dct.cpp + libFDK/src/FDK_bitbuffer.cpp + libFDK/src/FDK_core.cpp + libFDK/src/FDK_crc.cpp + libFDK/src/FDK_hybrid.cpp + libFDK/src/FDK_tools_rom.cpp + libFDK/src/FDK_trigFcts.cpp + libFDK/src/fft.cpp + libFDK/src/fft_rad2.cpp + libFDK/src/fixpoint_math.cpp + libFDK/src/mdct.cpp + libFDK/src/qmf.cpp + libFDK/src/scale.cpp +) + +set(MPEGTPDEC_SRC + libMpegTPDec/src/tpdec_adif.cpp + libMpegTPDec/src/tpdec_adts.cpp + libMpegTPDec/src/tpdec_asc.cpp + libMpegTPDec/src/tpdec_drm.cpp + libMpegTPDec/src/tpdec_latm.cpp + libMpegTPDec/src/tpdec_lib.cpp +) + +set( MPEGTPENC_SRC + libMpegTPEnc/src/tpenc_adif.cpp + libMpegTPEnc/src/tpenc_adts.cpp + libMpegTPEnc/src/tpenc_asc.cpp + libMpegTPEnc/src/tpenc_latm.cpp + libMpegTPEnc/src/tpenc_lib.cpp +) + +set( PCMUTILS_SRC + libPCMutils/src/limiter.cpp + libPCMutils/src/pcmutils_lib.cpp +) + +set(SBRDEC_SRC + libSBRdec/src/env_calc.cpp + libSBRdec/src/env_dec.cpp + libSBRdec/src/env_extr.cpp + libSBRdec/src/huff_dec.cpp + libSBRdec/src/lpp_tran.cpp + libSBRdec/src/psbitdec.cpp + libSBRdec/src/psdec.cpp + libSBRdec/src/psdec_hybrid.cpp + libSBRdec/src/sbr_crc.cpp + libSBRdec/src/sbr_deb.cpp + libSBRdec/src/sbr_dec.cpp + libSBRdec/src/sbrdec_drc.cpp + libSBRdec/src/sbrdec_freq_sca.cpp + libSBRdec/src/sbrdecoder.cpp + libSBRdec/src/sbr_ram.cpp + libSBRdec/src/sbr_rom.cpp +) + +set(SBRENC_SRC + libSBRenc/src/bit_sbr.cpp + libSBRenc/src/env_bit.cpp + libSBRenc/src/fram_gen.cpp + libSBRenc/src/mh_det.cpp + libSBRenc/src/ps_bitenc.cpp + libSBRenc/src/ps_encode.cpp + libSBRenc/src/resampler.cpp + libSBRenc/src/sbr_encoder.cpp + libSBRenc/src/sbr_ram.cpp + libSBRenc/src/ton_corr.cpp + libSBRenc/src/code_env.cpp + libSBRenc/src/env_est.cpp + libSBRenc/src/invf_est.cpp + libSBRenc/src/nf_est.cpp + libSBRenc/src/ps_main.cpp + libSBRenc/src/sbrenc_freq_sca.cpp + libSBRenc/src/sbr_misc.cpp + libSBRenc/src/sbr_rom.cpp + libSBRenc/src/tran_det.cpp +) + +set(SYS_SRC + libSYS/src/cmdl_parser.cpp + libSYS/src/conv_string.cpp + libSYS/src/genericStds.cpp + libSYS/src/wav_file.cpp +) + +set( + libfdk_aac_SOURCES + ${AACDEC_SRC} ${AACENC_SRC} + ${MPEGTPDEC_SRC} ${MPEGTPENC_SRC} + ${SBRDEC_SRC} ${SBRENC_SRC} + ${PCMUTILS_SRC} ${FDK_SRC} ${SYS_SRC} + fdk-aac.def +) + +include_directories( + . + win32 + libAACdec/include + libAACenc/include + libSBRdec/include + libSBRenc/include + libMpegTPDec/include + libMpegTPEnc/include + libSYS/include + libFDK/include + libPCMutils/include +) + +add_library(fdk-aac ${libfdk_aac_SOURCES}) + +add_executable(aac-enc aac-enc.c wavreader.c) + +target_link_libraries(aac-enc fdk-aac) + +install( + TARGETS fdk-aac + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_TOOLS) + install ( + TARGETS aac-enc + RUNTIME DESTINATION tools/fdk-aac + ) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install( + FILES + libAACdec/include/aacdecoder_lib.h + libAACenc/include/aacenc_lib.h + libSYS/include/FDK_audio.h + libSYS/include/genericStds.h + libSYS/include/machine_type.h + DESTINATION include/fdk-aac + ) +endif() diff --git a/vcpkg/ports/fdk-aac/CONTROL b/vcpkg/ports/fdk-aac/CONTROL new file mode 100644 index 0000000..fe523b9 --- /dev/null +++ b/vcpkg/ports/fdk-aac/CONTROL @@ -0,0 +1,4 @@ +Source: fdk-aac +Version: 2018-07-08-2 +Homepage: https://github.com/mstorsjo/fdk-aac +Description: A standalone library of the Fraunhofer FDK AAC code diff --git a/vcpkg/ports/fdk-aac/fdk-aac.def b/vcpkg/ports/fdk-aac/fdk-aac.def new file mode 100644 index 0000000..8690b69 --- /dev/null +++ b/vcpkg/ports/fdk-aac/fdk-aac.def @@ -0,0 +1,19 @@ +EXPORTS +aacDecoder_AncDataGet +aacDecoder_AncDataInit +aacDecoder_Close +aacDecoder_ConfigRaw +aacDecoder_DecodeFrame +aacDecoder_Fill +aacDecoder_GetFreeBytes +aacDecoder_GetLibInfo +aacDecoder_GetStreamInfo +aacDecoder_Open +aacDecoder_SetParam +aacEncClose +aacEncEncode +aacEncGetLibInfo +aacEncInfo +aacEncOpen +aacEncoder_GetParam +aacEncoder_SetParam diff --git a/vcpkg/ports/fdk-aac/portfile.cmake b/vcpkg/ports/fdk-aac/portfile.cmake new file mode 100644 index 0000000..000c00b --- /dev/null +++ b/vcpkg/ports/fdk-aac/portfile.cmake @@ -0,0 +1,25 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mstorsjo/fdk-aac + REF e45ae429b9ca8f234eb861338a75b2d89cde206a + SHA512 e4d0ec632a67642312bd0c812849601452d4ba45b31bc2f2a9392bba5fe2320b2099c5c7077c9571ea270804979039182060dc1acacdc397ca2a9b8ca43301a3 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/fdk-aac.def DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON -DDISABLE_INSTALL_TOOLS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/fdk-aac) +file(INSTALL ${SOURCE_PATH}/NOTICE DESTINATION ${CURRENT_PACKAGES_DIR}/share/fdk-aac RENAME copyright) diff --git a/vcpkg/ports/fdlibm/CMakeLists.txt b/vcpkg/ports/fdlibm/CMakeLists.txt new file mode 100644 index 0000000..c31f04a --- /dev/null +++ b/vcpkg/ports/fdlibm/CMakeLists.txt @@ -0,0 +1,28 @@ +cmake_minimum_required(VERSION 3.8) +project(fdlibm C) + +file(GLOB fdlibm_SOURCES "*.c") + +include_directories(".") + +if(WIN32) +set(fdlibm_SOURCES ${fdlibm_SOURCES} libm5.def) +endif() + + +add_library(fdlibm ${fdlibm_SOURCES}) + +install( + TARGETS fdlibm + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib/manual-link + ARCHIVE DESTINATION lib/manual-link +) + +if(NOT DISABLE_INSTALL_HEADERS) + install( + FILES + fdlibm.h + DESTINATION include + ) +endif() diff --git a/vcpkg/ports/fdlibm/CONTROL b/vcpkg/ports/fdlibm/CONTROL new file mode 100644 index 0000000..14bc9ad --- /dev/null +++ b/vcpkg/ports/fdlibm/CONTROL @@ -0,0 +1,3 @@ +Source: fdlibm +Version: 5.3-4 +Description: FDLIBM (Freely Distributable LIBM) is a C math library for machines that support IEEE 754 floating-point arithmetic diff --git a/vcpkg/ports/fdlibm/libm5.def b/vcpkg/ports/fdlibm/libm5.def new file mode 100644 index 0000000..2de0ad4 --- /dev/null +++ b/vcpkg/ports/fdlibm/libm5.def @@ -0,0 +1,88 @@ +EXPORTS + __ieee754_acos @ 1 ; + __ieee754_acosh @ 2 ; + __ieee754_asin @ 3 ; + __ieee754_atan2 @ 4 ; + __ieee754_atanh @ 5 ; + __ieee754_cosh @ 6 ; + __ieee754_exp @ 7 ; + __ieee754_fmod @ 8 ; + __ieee754_gamma @ 9 ; + __ieee754_gamma_r @ 10 ; + __ieee754_hypot @ 11 ; + __ieee754_j0 @ 12 ; + __ieee754_j1 @ 13 ; + __ieee754_jn @ 14 ; + __ieee754_lgamma @ 15 ; + __ieee754_lgamma_r @ 16 ; + __ieee754_log @ 17 ; + __ieee754_log10 @ 18 ; + __ieee754_pow @ 19 ; + __ieee754_rem_pio2 @ 20 ; + __ieee754_remainder @ 21 ; + __ieee754_scalb @ 22 ; + __ieee754_sinh @ 23 ; + __ieee754_sqrt @ 24 ; + __ieee754_y0 @ 25 ; + __ieee754_y1 @ 26 ; + __ieee754_yn @ 27 ; + __kernel_cos @ 28 ; + __kernel_rem_pio2 @ 29 ; + __kernel_sin @ 30 ; + __kernel_standard @ 31 ; + __kernel_tan @ 32 ; + _fdlib_version @ 33 DATA ; + acos @ 34 ; + acosh @ 35 ; + asin @ 36 ; + asinh @ 37 ; + atan @ 38 ; + atan2 @ 39 ; + atanh @ 40 ; + cbrt @ 41 ; + ceil @ 42 ; + copysign @ 43 ; + cos @ 44 ; + cosh @ 45 ; + erf @ 46 ; + erfc @ 47 ; + exp @ 48 ; + expm1 @ 49 ; + fabs @ 50 ; + ieee_finite @ 51 ; + floor @ 52 ; + fmod @ 53 ; + frexp @ 54 ; + ieee_gamma @ 55 ; + ieee_gamma_r @ 56 ; + hypot @ 57 ; + ilogb @ 58 ; + ieee_isnan @ 59 ; + j0 @ 60 ; + j1 @ 61 ; + jn @ 62 ; + ldexp @ 63 ; + ieee_lgamma @ 64 ; + ieee_lgamma_r @ 65 ; + log @ 66 ; + log10 @ 67 ; + log1p @ 68 ; + logb @ 69 ; + ieee_matherr @ 70 ; + modf @ 71 ; + nextafter @ 72 ; + pow @ 73 ; + remainder @ 74 ; + rint @ 75 ; + ieee_scalb @ 76 ; + scalbn @ 77 ; + signgam @ 78 DATA ; + ieee_significand @ 79 ; + sin @ 80 ; + sinh @ 81 ; + sqrt @ 82 ; + tan @ 83 ; + tanh @ 84 ; + y0 @ 85 ; + y1 @ 86 ; + yn @ 87 ; diff --git a/vcpkg/ports/fdlibm/portfile.cmake b/vcpkg/ports/fdlibm/portfile.cmake new file mode 100644 index 0000000..7bbd21f --- /dev/null +++ b/vcpkg/ports/fdlibm/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH + URL https://android.googlesource.com/platform/external/fdlibm + REF 59f7335e4dd8275a7dc2f8aeb4fd00758fde37ac +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/libm5.def DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Handle copyright +configure_file(${SOURCE_PATH}/NOTICE ${CURRENT_PACKAGES_DIR}/share/fdlibm/copyright COPYONLY) + diff --git a/vcpkg/ports/ffmpeg/0001-create-lib-libraries.patch b/vcpkg/ports/ffmpeg/0001-create-lib-libraries.patch new file mode 100644 index 0000000..493e24c --- /dev/null +++ b/vcpkg/ports/ffmpeg/0001-create-lib-libraries.patch @@ -0,0 +1,25 @@ +diff --git a/configure b/configure +index 34c2adb..1c8008a 100755 +--- a/configure ++++ b/configure +@@ -5352,15 +5352,17 @@ case $target_os in + ;; + win32|win64) + disable symver +- if enabled shared; then ++# if enabled shared; then + # Link to the import library instead of the normal static library + # for shared libs. + LD_LIB='%.lib' + # Cannot build both shared and static libs with MSVC or icl. +- disable static +- fi ++# disable static ++# fi + enabled x86_32 && check_ldflags -LARGEADDRESSAWARE + shlibdir_default="$bindir_default" ++ LIBPREF="" ++ LIBSUF=".lib" + SLIBPREF="" + SLIBSUF=".dll" + SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)' diff --git a/vcpkg/ports/ffmpeg/0003-fix-windowsinclude.patch b/vcpkg/ports/ffmpeg/0003-fix-windowsinclude.patch new file mode 100644 index 0000000..8fe6a54 --- /dev/null +++ b/vcpkg/ports/ffmpeg/0003-fix-windowsinclude.patch @@ -0,0 +1,28 @@ +diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c +index 9cfbc45..e3447e6 100644 +--- a/fftools/cmdutils.c ++++ b/fftools/cmdutils.c +@@ -63,6 +63,8 @@ + #include + #endif + #ifdef _WIN32 ++#define _WIN32_WINNT 0x0502 ++#define WIN32_LEAN_AND_MEAN + #include + #endif + +diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c +index 01f0410..dbb0736 100644 +--- a/fftools/ffmpeg.c ++++ b/fftools/ffmpeg.c +@@ -23,6 +23,10 @@ + * multimedia converter based on the FFmpeg libraries + */ + ++#define _WIN32_WINNT 0x0502 // Must be less than 0x0600, because otherwise WinSock2.h defines "pollfd" which then gets redefined in "os_support.h". ++#define WIN32_LEAN_AND_MEAN ++ ++ + #include "config.h" + #include + #include diff --git a/vcpkg/ports/ffmpeg/0004-fix-debug-build.patch b/vcpkg/ports/ffmpeg/0004-fix-debug-build.patch new file mode 100644 index 0000000..f1ea01e --- /dev/null +++ b/vcpkg/ports/ffmpeg/0004-fix-debug-build.patch @@ -0,0 +1,43 @@ +diff --git a/configure b/configure +index bd2de34..fba948a 100755 +--- a/configure ++++ b/configure +@@ -3993,6 +3993,9 @@ for opt do + --libfuzzer=*) + libfuzzer_path="$optval" + ;; ++ --debug) ++ enable debug_configure ++ ;; + *) + optname="${opt%%=*}" + optname="${optname#--}" +@@ -6152,8 +6153,13 @@ + + enabled zlib && { check_pkg_config zlib zlib "zlib.h" zlibVersion || + check_lib zlib zlib.h zlibVersion -lz; } +-enabled bzlib && check_lib bzlib bzlib.h BZ2_bzlibVersion -lbz2 +-enabled lzma && check_lib lzma lzma.h lzma_version_number -llzma ++if enabled debug_configure; then ++ enabled bzlib && check_lib bzlib bzlib.h BZ2_bzlibVersion -lbz2d ++ enabled lzma && check_lib lzma lzma.h lzma_version_number -llzmad ++else ++ enabled bzlib && check_lib bzlib bzlib.h BZ2_bzlibVersion -lbz2 ++ enabled lzma && check_lib lzma lzma.h lzma_version_number -llzma ++fi + + # On some systems dynamic loading requires no extra linker flags + check_lib libdl dlfcn.h "dlopen dlsym" || check_lib libdl dlfcn.h "dlopen dlsym" -ldl +@@ -6350,7 +6350,11 @@ enabled librubberband && require_pkg_config librubberband "rubberband >= 1.8 + enabled libshine && require_pkg_config libshine shine shine/layer3.h shine_encode_buffer + enabled libsmbclient && { check_pkg_config libsmbclient smbclient libsmbclient.h smbc_init || + require libsmbclient libsmbclient.h smbc_init -lsmbclient; } +-enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++ ++if enabled debug_configure; then ++ enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappyd -lstdc++ ++else ++ enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++ ++fi + enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr + enabled libssh && require_pkg_config libssh libssh libssh/sftp.h sftp_init + enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init diff --git a/vcpkg/ports/ffmpeg/0005-fix-libvpx-linking.patch b/vcpkg/ports/ffmpeg/0005-fix-libvpx-linking.patch new file mode 100644 index 0000000..dac5e59 --- /dev/null +++ b/vcpkg/ports/ffmpeg/0005-fix-libvpx-linking.patch @@ -0,0 +1,53 @@ +diff --git a/configure b/configure +index fba948a..50eea9b 100755 +--- a/configure ++++ b/configure +@@ -5207,6 +5207,8 @@ case "$arch" in + ;; + esac + ++libvpx_name=vpx ++ + # OS specific + case $target_os in + aix) +@@ -5379,6 +5381,15 @@ case $target_os in + enabled x86_64 && objformat="win64" || objformat="win32" + ranlib=: + enable dos_paths ++ if [ -z "${extra_cflags##*-MDd*}" ]; then ++ libvpx_name=vpxmdd ++ elif [ -z "${extra_cflags##*-MD*}" ]; then ++ libvpx_name=vpxmd ++ elif [ -z "${extra_cflags##*-MTd*}" ]; then ++ libvpx_name=vpxmtd ++ elif [ -z "${extra_cflags##*-MT*}" ]; then ++ libvpx_name=vpxmt ++ fi + ;; + cygwin*) + target_os=cygwin +@@ -6290,19 +6301,19 @@ enabled libvorbis && require_pkg_config libvorbis vorbis vorbis/codec.h + enabled libvpx && { + enabled libvpx_vp8_decoder && { + check_pkg_config libvpx_vp8_decoder "vpx >= 1.4.0" "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp8_dx || +- check_lib libvpx_vp8_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp8_dx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs" ++ check_lib libvpx_vp8_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp8_dx VPX_IMG_FMT_HIGHBITDEPTH" "-l$libvpx_name $libm_extralibs $pthreads_extralibs" + } + enabled libvpx_vp8_encoder && { + check_pkg_config libvpx_vp8_encoder "vpx >= 1.4.0" "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp8_cx || +- check_lib libvpx_vp8_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp8_cx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs" ++ check_lib libvpx_vp8_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp8_cx VPX_IMG_FMT_HIGHBITDEPTH" "-l$libvpx_name $libm_extralibs $pthreads_extralibs" + } + enabled libvpx_vp9_decoder && { + check_pkg_config libvpx_vp9_decoder "vpx >= 1.4.0" "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp9_dx || +- check_lib libvpx_vp9_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs" ++ check_lib libvpx_vp9_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx VPX_IMG_FMT_HIGHBITDEPTH" "-l$libvpx_name $libm_extralibs $pthreads_extralibs" + } + enabled libvpx_vp9_encoder && { + check_pkg_config libvpx_vp9_encoder "vpx >= 1.4.0" "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp9_cx || +- check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs" ++ check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" "-l$libvpx_name $libm_extralibs $pthreads_extralibs" + } + if disabled_all libvpx_vp8_decoder libvpx_vp9_decoder libvpx_vp8_encoder libvpx_vp9_encoder; then + die "libvpx enabled but no supported decoders found" diff --git a/vcpkg/ports/ffmpeg/0006-fix-StaticFeatures.patch b/vcpkg/ports/ffmpeg/0006-fix-StaticFeatures.patch new file mode 100644 index 0000000..ce5c2f9 --- /dev/null +++ b/vcpkg/ports/ffmpeg/0006-fix-StaticFeatures.patch @@ -0,0 +1,49 @@ +diff --git a/configure b/configure +index 3bdcfc6..00b2f13 100644 +--- a/configure ++++ b/configure +@@ -6351,7 +6351,8 @@ if enabled libmfx; then + fi + + enabled libmodplug && require_pkg_config libmodplug libmodplug libmodplug/modplug.h ModPlug_Load +-enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame $libm_extralibs ++enabled libmp3lame && { check_lib libmp3lame lame/lame.h lame_set_VBR_quality -lmp3lame $libm_extralibs || ++ require libmp3lame lame/lame.h lame_set_VBR_quality -llibmp3lame-static -llibmpghip-static $libm_extralibs; } + enabled libmysofa && { check_pkg_config libmysofa libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine || + require libmysofa mysofa.h mysofa_neighborhood_init_withstepdefine -lmysofa $zlib_extralibs; } + enabled libnpp && { check_lib libnpp npp.h nppGetLibVersion -lnppig -lnppicc -lnppc -lnppidei || +@@ -6392,7 +6393,7 @@ if enabled debug_configure; then + else + enabled libsnappy && require libsnappy snappy-c.h snappy_compress -lsnappy -lstdc++ + fi +-enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr ++enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr -lm + enabled libssh && require_pkg_config libssh libssh libssh/sftp.h sftp_init + enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init + enabled libsrt && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket +@@ -6460,6 +6461,8 @@ enabled openal && { { for al_extralibs in "${OPENAL_LIBS}" "-lopenal" + enabled opencl && { check_pkg_config opencl OpenCL CL/cl.h clEnqueueNDRangeKernel || + check_lib opencl OpenCL/cl.h clEnqueueNDRangeKernel -Wl,-framework,OpenCL || + check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL || ++ check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL -lAdvapi32 -lOle32 -lCfgmgr32|| ++ check_lib opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL -pthread -ldl || + die "ERROR: opencl not found"; } && + { test_cpp_condition "OpenCL/cl.h" "defined(CL_VERSION_1_2)" || + test_cpp_condition "CL/cl.h" "defined(CL_VERSION_1_2)" || +@@ -6479,6 +6482,7 @@ enabled openssl && { check_pkg_config openssl openssl openssl/ssl.h OP + check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto || + check_lib openssl openssl/ssl.h SSL_library_init -lssl32 -leay32 || + check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 || ++ check_lib openssl openssl/ssl.h OPENSSL_init_ssl -llibssl -llibcrypto -lws2_32 -lgdi32 -lcrypt32 -lAdvapi32 -lUser32|| + die "ERROR: openssl not found"; } + enabled pocketsphinx && require_pkg_config pocketsphinx pocketsphinx pocketsphinx/pocketsphinx.h ps_init + enabled rkmpp && { require_pkg_config rkmpp rockchip_mpp rockchip/rk_mpi.h mpp_create && +@@ -6707,7 +6711,7 @@ enabled amf && + if enabled libc_iconv; then + check_func_headers iconv.h iconv + elif enabled iconv; then +- check_func_headers iconv.h iconv || check_lib iconv iconv.h iconv -liconv ++ check_func_headers iconv.h iconv || check_lib iconv iconv.h iconv -liconv || check_lib iconv iconv.h iconv -liconv -llibcharset + fi + + enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel" diff --git a/vcpkg/ports/ffmpeg/0007-fix-lib-naming.patch b/vcpkg/ports/ffmpeg/0007-fix-lib-naming.patch new file mode 100644 index 0000000..c9fb9db --- /dev/null +++ b/vcpkg/ports/ffmpeg/0007-fix-lib-naming.patch @@ -0,0 +1,15 @@ +diff --git a/configure b/configure +index d6c4388..75b96c3 100644 +--- a/configure ++++ b/configure +@@ -4378,6 +4378,10 @@ msvc_common_flags(){ + -march=*) ;; + -lz) echo zlib.lib ;; + -lx264) echo libx264.lib ;; ++ -lx265) echo libx265.lib ;; ++ -lmp3lame) echo libmp3lame.lib ;; ++ -liconv) echo libiconv.lib ;; ++ -lm) ;; + -lstdc++) ;; + -l*) echo ${flag#-l}.lib ;; + -LARGEADDRESSAWARE) echo $flag ;; diff --git a/vcpkg/ports/ffmpeg/0008-Fix-wavpack-detection.patch b/vcpkg/ports/ffmpeg/0008-Fix-wavpack-detection.patch new file mode 100644 index 0000000..959ee8a --- /dev/null +++ b/vcpkg/ports/ffmpeg/0008-Fix-wavpack-detection.patch @@ -0,0 +1,27 @@ +diff --git a/configure b/configure +index e7162dbc56..0f04af2a81 100755 +--- a/configure ++++ b/configure +@@ -6391,7 +6391,7 @@ enabled libvpx && { + fi + } + +-enabled libwavpack && require libwavpack wavpack/wavpack.h WavpackOpenFileOutput -lwavpack ++enabled libwavpack && { check_pkg_config libwavpack wavpack wavpack.h WavpackOpenFileOutput || check_lib libwavpack wavpack.h WavpackOpenFileOutput -lwavpack || check_lib libwavpack wavpack.h WavpackOpenFileOutput -llibwavpack || require libwavpack wavpack.h WavpackOpenFileOutput -lwavpackdll; } + enabled libwebp && { + enabled libwebp_encoder && require_pkg_config libwebp "libwebp >= 0.2.0" webp/encode.h WebPGetEncoderVersion + enabled libwebp_anim_encoder && check_pkg_config libwebp_anim_encoder "libwebpmux >= 0.4.0" webp/mux.h WebPAnimEncoderOptionsInit; } +diff --git a/libavcodec/libwavpackenc.c b/libavcodec/libwavpackenc.c +index e84b074893..9adf39861b 100644 +--- a/libavcodec/libwavpackenc.c ++++ b/libavcodec/libwavpackenc.c +@@ -16,7 +16,7 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +-#include ++#include + #include + + #include "libavutil/attributes.h" + diff --git a/vcpkg/ports/ffmpeg/0009-Fix-fdk-detection.patch b/vcpkg/ports/ffmpeg/0009-Fix-fdk-detection.patch new file mode 100644 index 0000000..3d280fd --- /dev/null +++ b/vcpkg/ports/ffmpeg/0009-Fix-fdk-detection.patch @@ -0,0 +1,14 @@ +diff --git a/configure b/configure +index b137669dd3..34c92230f4 100755 +--- a/configure ++++ b/configure +@@ -6331,7 +6331,7 @@ enabled libdavs2 && require_pkg_config libdavs2 "davs2 >= 1.6.0" davs2. + enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 dc1394/dc1394.h dc1394_new + enabled libdrm && require_pkg_config libdrm libdrm xf86drm.h drmGetVersion + enabled libfdk_aac && { check_pkg_config libfdk_aac fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen || +- { require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac && ++ { require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac -lm -lstdc++ && + warn "using libfdk without pkg-config"; } } + flite_extralibs="-lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal -lflite_cmu_us_kal16 -lflite_cmu_us_rms -lflite_cmu_us_slt -lflite_usenglish -lflite_cmulex -lflite" + enabled libflite && require libflite "flite/flite.h" flite_init $flite_extralibs + diff --git a/vcpkg/ports/ffmpeg/0010-Fix-x264-detection.patch b/vcpkg/ports/ffmpeg/0010-Fix-x264-detection.patch new file mode 100644 index 0000000..2cbf85e --- /dev/null +++ b/vcpkg/ports/ffmpeg/0010-Fix-x264-detection.patch @@ -0,0 +1,14 @@ +diff --git a/configure b/configure +index b137669dd3..34a2e644c4 100755 +--- a/configure ++++ b/configure +@@ -6443,7 +6443,7 @@ enabled libwebp && { + enabled libwebp_encoder && require_pkg_config libwebp "libwebp >= 0.2.0" webp/encode.h WebPGetEncoderVersion + enabled libwebp_anim_encoder && check_pkg_config libwebp_anim_encoder "libwebpmux >= 0.4.0" webp/mux.h WebPAnimEncoderOptionsInit; } + enabled libx264 && { check_pkg_config libx264 x264 "stdint.h x264.h" x264_encoder_encode || +- { require libx264 "stdint.h x264.h" x264_encoder_encode "-lx264 $pthreads_extralibs $libm_extralibs" && ++ { require libx264 "stdint.h x264.h" x264_encoder_encode "-lx264 $pthreads_extralibs $libm_extralibs -ldl" && + warn "using libx264 without pkg-config"; } } && + require_cpp_condition libx264 x264.h "X264_BUILD >= 118" && + check_cpp_condition libx262 x264.h "X264_MPEG2" + diff --git a/vcpkg/ports/ffmpeg/0011-Fix-x265-detection.patch b/vcpkg/ports/ffmpeg/0011-Fix-x265-detection.patch new file mode 100644 index 0000000..af1b675 --- /dev/null +++ b/vcpkg/ports/ffmpeg/0011-Fix-x265-detection.patch @@ -0,0 +1,16 @@ +diff --git a/configure b/configure +index 34a2e644c4..0ea64bd306 100755 +--- a/configure ++++ b/configure +@@ -6447,7 +6447,9 @@ enabled libx264 && { check_pkg_config libx264 x264 "stdint.h x264.h" x + warn "using libx264 without pkg-config"; } } && + require_cpp_condition libx264 x264.h "X264_BUILD >= 118" && + check_cpp_condition libx262 x264.h "X264_MPEG2" +-enabled libx265 && require_pkg_config libx265 x265 x265.h x265_api_get && ++enabled libx265 && { check_pkg_config libx265 x265 x265.h x265_api_get || ++ { require libx265 x265.h x265_api_get "-lx265 $pthreads_extralibs $libm_extralibs -ldl -lstdc++ -lgcc_s -lgcc -lrt -lnuma" && ++ warn "using libx265 without pkg-config"; } } && + require_cpp_condition libx265 x265.h "X265_BUILD >= 70" + enabled libxavs && require libxavs "stdint.h xavs.h" xavs_encoder_encode "-lxavs $pthreads_extralibs $libm_extralibs" + enabled libxavs2 && require_pkg_config libxavs2 "xavs2 >= 1.3.0" "stdint.h xavs2.h" xavs2_api_get + diff --git a/vcpkg/ports/ffmpeg/0012-Fix-ssl-110-detection.patch b/vcpkg/ports/ffmpeg/0012-Fix-ssl-110-detection.patch new file mode 100644 index 0000000..e9dd215 --- /dev/null +++ b/vcpkg/ports/ffmpeg/0012-Fix-ssl-110-detection.patch @@ -0,0 +1,13 @@ +diff --git a/configure b/configure +index 2be953f7e7..e075949ffc 100755 +--- a/configure ++++ b/configure +@@ -6497,6 +6497,7 @@ enabled omx_rpi && { test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoR + enabled omx && require_headers OMX_Core.h + enabled openssl && { check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl || + check_pkg_config openssl openssl openssl/ssl.h SSL_library_init || ++ check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto $pthreads_extralibs -ldl || + check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto || + check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto || + check_lib openssl openssl/ssl.h SSL_library_init -lssl32 -leay32 || + diff --git a/vcpkg/ports/ffmpeg/CONTROL b/vcpkg/ports/ffmpeg/CONTROL new file mode 100644 index 0000000..60a2346 --- /dev/null +++ b/vcpkg/ports/ffmpeg/CONTROL @@ -0,0 +1,138 @@ +Source: ffmpeg +Version: 4.3.1 +Homepage: https://ffmpeg.org +Description: a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. + FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations. +Default-Features: avresample, avcodec, avformat, avdevice, avfilter, postproc, swresample, swscale + +Feature: ffmpeg +Build-Depends: ffmpeg[core,avcodec,avfilter,avformat] +Description: build the ffmpeg.exe application + +Feature: ffplay +Build-Depends: ffmpeg[core,avcodec,avfilter,avformat,swscale,swresample,sdl2] +Description: ffplay application support in ffmpeg + +Feature: ffprobe +Build-Depends: ffmpeg[core,avcodec,avformat] +Description: ffprobe application support in ffmpeg + +Feature: avcodec +Description: Codec support in ffmpeg + +Feature: avformat +Build-Depends: ffmpeg[core,avcodec] +Description: Format support in ffmpeg + +Feature: avdevice +Build-Depends: ffmpeg[core,avcodec,avformat] +Description: Device support in ffmpeg + +Feature: avfilter +Description: Filter support in ffmpeg + +Feature: postproc +Build-Depends: ffmpeg[core,gpl] +Description: Postproc support in ffmpeg + +Feature: swresample +Description: Swresample support in ffmpeg + +Feature: swscale +Description: Swscale support in ffmpeg + +Feature: avresample +Description: Libav audio resampling library support in ffmpeg + +Feature: nonfree +Description: allow nonfree and unredistributable libraries + +Feature: gpl +Description: allow GPL licensed libraries + +Feature: version3 +Description: upgrade (L)GPL to version 3 + +Feature: avisynthplus +Build-Depends: avisynthplus, ffmpeg[core,gpl] +Description: avisynthplus support in ffmpeg + +Feature: bzip2 +Build-Depends: bzip2 +Description: bzip2 support in ffmpeg + +Feature: iconv +Build-Depends: libiconv +Description: iconv support in ffmpeg + +Feature: fdk-aac +Build-Depends: fdk-aac, ffmpeg[core,nonfree] +Description: AAC de/encoding via libfdk-aac support in ffmpeg + +Feature: lzma +Build-Depends: liblzma +Description: lzma support in ffmpeg + +Feature: mp3lame +Build-Depends: mp3lame +Description: MP3 encoding via libmp3lame support in ffmpeg + +Feature: nvcodec +Build-Depends: ffnvcodec +Description: Hardware accelerated codecs + +Feature: opencl +Build-Depends: opencl +Description: OpenCL processing support in ffmpeg + +Feature: openssl +Build-Depends: openssl, ffmpeg[core,nonfree] +Description: openssl support in ffmpeg + +Feature: opus +Build-Depends: opus +Description: Opus de/encoding via libopus support in ffmpeg + +Feature: sdl2 +Build-Depends: sdl2 +Description: sdl2 support in ffmpeg + +Feature: snappy +Build-Depends: snappy +Description: Snappy compression, needed for hap encoding support in ffmpeg + +Feature: soxr +Build-Depends: soxr +Description: libsoxr resampling support in ffmpeg + +Feature: speex +Build-Depends: speex +Description: Speex de/encoding via libspeex support in ffmpeg + +Feature: theora +Build-Depends: libtheora +Description: Theora encoding via libtheora support in ffmpeg + +Feature: vorbis +Build-Depends: libvorbis +Description: Vorbis en/decoding via libvorbis support in ffmpeg + +Feature: vpx +Build-Depends: libvpx +Description: VP8 and VP9 de/encoding via libvpx support in ffmpeg + +Feature: wavpack +Build-Depends: wavpack +Description: wavpack encoding via libwavpack support in ffmpeg + +Feature: x264 +Build-Depends: x264, ffmpeg[core,gpl] +Description: H.264 encoding via x264 support in ffmpeg + +Feature: x265 +Build-Depends: x265, ffmpeg[core,gpl] +Description: HEVC encoding via x265 support in ffmpeg + +Feature: zlib +Build-Depends: zlib +Description: zlib support in ffmpeg diff --git a/vcpkg/ports/ffmpeg/FindFFMPEG.cmake.in b/vcpkg/ports/ffmpeg/FindFFMPEG.cmake.in new file mode 100644 index 0000000..db970a3 --- /dev/null +++ b/vcpkg/ports/ffmpeg/FindFFMPEG.cmake.in @@ -0,0 +1,322 @@ +# Distributed under the OSI-approved BSD 3-Clause License. +# +#.rst: +# FindFFMPEG +# -------- +# +# Find the FFPMEG libraries +# +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# The following variables will be defined: +# +# ``FFMPEG_FOUND`` +# True if FFMPEG found on the local system +# +# ``FFMPEG_INCLUDE_DIRS`` +# Location of FFMPEG header files +# +# ``FFMPEG_LIBRARY_DIRS`` +# Location of FFMPEG libraries +# +# ``FFMPEG_LIBRARIES`` +# List of the FFMPEG libraries found +# +# + +include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) +include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) +include(${CMAKE_ROOT}/Modules/CMakeFindDependencyMacro.cmake) + +set(FFMPEG_VERSION "4.2") + +find_dependency(Threads) +if(UNIX) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS -pthread) +endif() +if(UNIX AND NOT APPLE) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS -lX11) +endif() + +if(@ENABLE_BZIP2@) + find_dependency(BZip2) + get_target_property(BZip2_LIBRARY_RELEASE BZip2::BZip2 IMPORTED_LOCATION_RELEASE) + get_target_property(BZip2_LIBRARY_DEBUG BZip2::BZip2 IMPORTED_LOCATION_DEBUG) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS "$<$:${BZip2_LIBRARY_DEBUG}>$<$>:${BZip2_LIBRARY_RELEASE}>") +endif() + +if(@ENABLE_ICONV@) + find_dependency(Iconv) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS ${Iconv_LIBRARIES}) +endif() + +if(@ENABLE_FDKAAC@) + find_library(FDK_LIBRARY_RELEASE NAMES fdk-aac libfdk-aac PATHS ${_IMPORT_PREFIX}/lib/ NO_DEFAULT_PATH) + find_library(FDK_LIBRARY_DEBUG NAMES fdk-aac libfdk-aac PATHS ${_IMPORT_PREFIX}/debug/lib/ NO_DEFAULT_PATH) + select_library_configurations(FDK) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS "$<$:${FDK_LIBRARY_DEBUG}>$<$>:${FDK_LIBRARY_RELEASE}>") +endif() + +if(@ENABLE_LZMA@) + find_dependency(LibLZMA) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS "$<$:${LibLZMA_LIBRARY_DEBUG}>$<$>:${LibLZMA_LIBRARY_RELEASE}>") +endif() + +if(@ENABLE_LAME@) + find_dependency(mp3lame) + get_target_property(LAME_LIBRARY_RELEASE mp3lame::mp3lame IMPORTED_LOCATION_RELEASE) + get_target_property(LAME_LIBRARY_DEBUG mp3lame::mp3lame IMPORTED_LOCATION_DEBUG) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS "$<$:${LAME_LIBRARY_DEBUG}>$<$>:${LAME_LIBRARY_RELEASE}>") + get_target_property(LAMEMPG_LIBRARY_RELEASE mp3lame::mpghip IMPORTED_LOCATION_RELEASE) + get_target_property(LAMEMPG_LIBRARY_DEBUG mp3lame::mpghip IMPORTED_LOCATION_DEBUG) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS "$<$:${LAMEMPG_LIBRARY_DEBUG}>$<$>:${LAMEMPG_LIBRARY_RELEASE}>") +endif() + +if(@ENABLE_OPENCL@) + find_dependency(OpenCL) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS ${OpenCL_LIBRARIES}) +endif() + +if(@ENABLE_OPENSSL@) + find_dependency(OpenSSL) + get_target_property(LIBSSL_LIBRARY_RELEASE OpenSSL::SSL IMPORTED_LOCATION_RELEASE) + get_target_property(LIBSSL_LIBRARY_DEBUG OpenSSL::SSL IMPORTED_LOCATION_DEBUG) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS "$<$:${LIBSSL_LIBRARY_DEBUG}>$<$>:${LIBSSL_LIBRARY_RELEASE}>") + get_target_property(LIBCRYPTO_LIBRARY_RELEASE OpenSSL::Crypto IMPORTED_LOCATION_RELEASE) + get_target_property(LIBCRYPTO_LIBRARY_DEBUG OpenSSL::Crypto IMPORTED_LOCATION_DEBUG) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS "$<$:${LIBCRYPTO_LIBRARY_DEBUG}>$<$>:${LIBCRYPTO_LIBRARY_RELEASE}>") +endif() + +if(@ENABLE_OPUS@) + find_dependency(Opus) + get_target_property(OPUS_LIBRARY_RELEASE Opus::opus IMPORTED_LOCATION_RELEASE) + get_target_property(OPUS_LIBRARY_DEBUG Opus::opus IMPORTED_LOCATION_DEBUG) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS "$<$:${OPUS_LIBRARY_DEBUG}>$<$>:${OPUS_LIBRARY_RELEASE}>") +endif() + +if(@ENABLE_SDL2@) + find_dependency(SDL2) + if(TARGET SDL2::SDL2-static) + get_target_property(SDL2_LIBRARY_RELEASE SDL2::SDL2-static IMPORTED_LOCATION_RELEASE) + get_target_property(SDL2_LIBRARY_DEBUG SDL2::SDL2-static IMPORTED_LOCATION_DEBUG) + else() + get_target_property(SDL2_LIBRARY_RELEASE SDL2::SDL2 IMPORTED_LOCATION_RELEASE) + get_target_property(SDL2_LIBRARY_DEBUG SDL2::SDL2 IMPORTED_LOCATION_DEBUG) + endif() + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS "$<$:${SDL2_LIBRARY_DEBUG}>$<$>:${SDL2_LIBRARY_RELEASE}>") +endif() + +if(@ENABLE_SNAPPY@) + find_dependency(Snappy) + get_target_property(SNAPPY_LIBRARY_RELEASE Snappy::snappy IMPORTED_LOCATION_RELEASE) + get_target_property(SNAPPY_LIBRARY_DEBUG Snappy::snappy IMPORTED_LOCATION_DEBUG) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS "$<$:${SNAPPY_LIBRARY_DEBUG}>$<$>:${SNAPPY_LIBRARY_RELEASE}>") +endif() + +if(@ENABLE_SOXR@) + find_library(SOXR_LIBRARY_RELEASE NAMES soxr PATHS ${_IMPORT_PREFIX}/lib/ NO_DEFAULT_PATH) + find_library(SOXR_LIBRARY_DEBUG NAMES soxr PATHS ${_IMPORT_PREFIX}/debug/lib/ NO_DEFAULT_PATH) + select_library_configurations(SOXR) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS "$<$:${SOXR_LIBRARY_DEBUG}>$<$>:${SOXR_LIBRARY_RELEASE}>") +endif() + +if(@ENABLE_SPEEX@) + find_library(SPEEX_LIBRARY_RELEASE NAMES speex libspeex PATHS ${_IMPORT_PREFIX}/lib/ NO_DEFAULT_PATH) + find_library(SPEEX_LIBRARY_DEBUG NAMES speex libspeex PATHS ${_IMPORT_PREFIX}/debug/lib/ NO_DEFAULT_PATH) + select_library_configurations(SPEEX) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS "$<$:${SPEEX_LIBRARY_DEBUG}>$<$>:${SPEEX_LIBRARY_RELEASE}>") +endif() + +if(@ENABLE_THEORA@) + find_library(THEORA_LIBRARY_RELEASE NAMES theora PATHS ${_IMPORT_PREFIX}/lib/ NO_DEFAULT_PATH) + find_library(THEORA_LIBRARY_DEBUG NAMES theora PATHS ${_IMPORT_PREFIX}/debug/lib/ NO_DEFAULT_PATH) + select_library_configurations(THEORA) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS "$<$:${THEORA_LIBRARY_DEBUG}>$<$>:${THEORA_LIBRARY_RELEASE}>") +endif() + +if(@ENABLE_VORBIS@) + find_dependency(Vorbis) + get_target_property(VORBIS_LIBRARY_RELEASE Vorbis::vorbis IMPORTED_LOCATION_RELEASE) + get_target_property(VORBIS_LIBRARY_DEBUG Vorbis::vorbis IMPORTED_LOCATION_DEBUG) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS "$<$:${VORBIS_LIBRARY_DEBUG}>$<$>:${VORBIS_LIBRARY_RELEASE}>") + get_target_property(VORBISENC_LIBRARY_RELEASE Vorbis::vorbisenc IMPORTED_LOCATION_RELEASE) + get_target_property(VORBISENC_LIBRARY_DEBUG Vorbis::vorbisenc IMPORTED_LOCATION_DEBUG) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS "$<$:${VORBISENC_LIBRARY_DEBUG}>$<$>:${VORBISENC_LIBRARY_RELEASE}>") + get_target_property(VORBIS_DEP_LIBRARIES Vorbis::vorbis INTERFACE_LINK_LIBRARIES) + foreach(deps ${VORBIS_DEP_LIBRARIES}) + if(TARGET ${deps}) + get_target_property(VORBIS_DEP_LIBRARY_RELEASE ${deps} IMPORTED_LOCATION_RELEASE) + get_target_property(VORBIS_DEP_LIBRARY_DEBUG ${deps} INTERFACE_LINK_LIBRARIES) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS "$<$:${VORBIS_DEP_LIBRARY_DEBUG}>$<$>:${VORBIS_DEP_LIBRARY_RELEASE}>") + endif() + endforeach() +endif() + +if(@ENABLE_VPX@) + find_dependency(unofficial-libvpx) + get_target_property(VPX_LIBRARY_RELEASE unofficial::libvpx::libvpx IMPORTED_LOCATION_RELEASE) + get_target_property(VPX_LIBRARY_DEBUG unofficial::libvpx::libvpx IMPORTED_LOCATION_DEBUG) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS "$<$:${VPX_LIBRARY_DEBUG}>$<$>:${VPX_LIBRARY_RELEASE}>") +endif() + +if(@ENABLE_WAVPACK@) + find_dependency(wavpack) + get_target_property(WAVPACK_LIBRARY_RELEASE WavPack::wavpack IMPORTED_LOCATION_RELEASE) + get_target_property(WAVPACK_LIBRARY_DEBUG WavPack::wavpack IMPORTED_LOCATION_DEBUG) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS "$<$:${WAVPACK_LIBRARY_DEBUG}>$<$>:${WAVPACK_LIBRARY_RELEASE}>") +endif() + +if(@ENABLE_X264@) + find_library(X264_LIBRARY_RELEASE NAMES x264 libx264 PATHS ${_IMPORT_PREFIX}/lib/ NO_DEFAULT_PATH) + find_library(X264_LIBRARY_DEBUG NAMES x264 libx264 PATHS ${_IMPORT_PREFIX}/debug/lib/ NO_DEFAULT_PATH) + select_library_configurations(X264) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS "$<$:${X264_LIBRARY_DEBUG}>$<$>:${X264_LIBRARY_RELEASE}>") +endif() + +if(@ENABLE_X265@) + find_library(X265_LIBRARY_RELEASE NAMES x265 x265-static PATHS ${_IMPORT_PREFIX}/lib/ NO_DEFAULT_PATH) + find_library(X265_LIBRARY_DEBUG NAMES x265 x265-static PATHS ${_IMPORT_PREFIX}/debug/lib/ NO_DEFAULT_PATH) + select_library_configurations(X265) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS "$<$:${X265_LIBRARY_DEBUG}>$<$>:${X265_LIBRARY_RELEASE}>") +endif() + +if(@ENABLE_ZLIB@) + find_dependency(ZLIB) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS ${ZLIB_LIBRARIES}) +endif() + +# Platform dependent libraries required by FFMPEG +if(WIN32) + if(NOT CYGWIN) + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS wsock32 ws2_32 secur32 bcrypt strmiids Vfw32 Shlwapi mfplat mfuuid) + endif() +else() + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS m) +endif() + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +set(_IMPORT_PREFIX) + +macro(FFMPEG_FIND varname shortname headername) + if(NOT FFMPEG_${varname}_INCLUDE_DIRS) + find_path(FFMPEG_${varname}_INCLUDE_DIRS NAMES lib${shortname}/${headername} ${headername} PATHS ${_IMPORT_PREFIX}/include NO_DEFAULT_PATH) + endif() + if(NOT FFMPEG_${varname}_LIBRARY) + find_library(FFMPEG_${varname}_LIBRARY_RELEASE NAMES ${shortname} PATHS ${_IMPORT_PREFIX}/lib/ NO_DEFAULT_PATH) + find_library(FFMPEG_${varname}_LIBRARY_DEBUG NAMES ${shortname}d ${shortname} PATHS ${_IMPORT_PREFIX}/debug/lib/ NO_DEFAULT_PATH) + get_filename_component(FFMPEG_${varname}_LIBRARY_RELEASE_DIR ${FFMPEG_${varname}_LIBRARY_RELEASE} DIRECTORY) + get_filename_component(FFMPEG_${varname}_LIBRARY_DEBUG_DIR ${FFMPEG_${varname}_LIBRARY_DEBUG} DIRECTORY) + #select_library_configurations(FFMPEG_${varname}) + set(FFMPEG_${varname}_LIBRARY "$<$:${FFMPEG_${varname}_LIBRARY_DEBUG}>$<$>:${FFMPEG_${varname}_LIBRARY_RELEASE}>" CACHE STRING "") + set(FFMPEG_${varname}_LIBRARIES ${FFMPEG_${varname}_LIBRARY} CACHE STRING "") + endif() + if (FFMPEG_${varname}_LIBRARY AND FFMPEG_${varname}_INCLUDE_DIRS) + set(FFMPEG_${varname}_FOUND TRUE BOOL) + list(APPEND FFMPEG_INCLUDE_DIRS ${FFMPEG_${varname}_INCLUDE_DIRS}) + list(APPEND FFMPEG_LIBRARIES ${FFMPEG_${varname}_LIBRARY}) + list(APPEND FFMPEG_LIBRARY_DIRS ${FFMPEG_${varname}_LIBRARY_RELEASE_DIR} ${FFMPEG_${varname}_LIBRARY_DEBUG_DIR}) + endif() +endmacro(FFMPEG_FIND) + +if(APPLE) + find_library(VT_UNIT VideoToolbox) + if (NOT VT_UNIT) + message(FATAL_ERROR "VideoToolbox not found") + endif() + find_library(AT_UNIT AudioToolbox) + if (NOT AT_UNIT) + message(FATAL_ERROR "AudioToolbox not found") + endif() + find_library(SEC_UNIT Security) + if (NOT SEC_UNIT) + message(FATAL_ERROR "Security not found") + endif() + find_library(CF_UNIT CoreFoundation) + if (NOT CF_UNIT) + message(FATAL_ERROR "CoreFoundation not found") + endif() + find_library(CM_UNIT CoreMedia) + if (NOT CM_UNIT) + message(FATAL_ERROR "CoreMedia not found") + endif() + find_library(CV_UNIT CoreVideo) + if (NOT CV_UNIT) + message(FATAL_ERROR "CoreVideo not found") + endif() + list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS ${VT_UNIT} ${AT_UNIT} ${SEC_UNIT} ${CF_UNIT} ${CM_UNIT} ${CV_UNIT}) +endif() + +if(@ENABLE_AVCODEC@) + FFMPEG_FIND(libavcodec avcodec avcodec.h) +endif() +if(@ENABLE_AVDEVICE@) + FFMPEG_FIND(libavdevice avdevice avdevice.h) +endif() +if(@ENABLE_AVFILTER@) + FFMPEG_FIND(libavfilter avfilter avfilter.h) +endif() +if(@ENABLE_AVFORMAT@) + FFMPEG_FIND(libavformat avformat avformat.h) +endif() +if(@ENABLE_AVRESAMPLE@) + FFMPEG_FIND(libavresample avresample avresample.h) +endif() +FFMPEG_FIND(libavutil avutil avutil.h) +if(@ENABLE_POSTPROC@) + FFMPEG_FIND(libpostproc postproc postprocess.h) +endif() +if(@ENABLE_SWRESAMPLE@) + FFMPEG_FIND(libswresample swresample swresample.h) +endif() +if(@ENABLE_SWSCALE@) + FFMPEG_FIND(libswscale swscale swscale.h) +endif() + +if (FFMPEG_libavutil_FOUND) + list(REMOVE_DUPLICATES FFMPEG_INCLUDE_DIRS) + list(REMOVE_DUPLICATES FFMPEG_LIBRARY_DIRS) + set(FFMPEG_libavutil_VERSION "${FFMPEG_VERSION}" CACHE STRING "") + + if(FFMPEG_libavcodec_FOUND) + set(FFMPEG_libavcodec_VERSION "${FFMPEG_VERSION}" CACHE STRING "") + endif() + if(FFMPEG_libavdevice_FOUND) + set(FFMPEG_libavdevice_VERSION "${FFMPEG_VERSION}" CACHE STRING "") + endif() + if(FFMPEG_libavfilter_FOUND) + set(FFMPEG_libavfilter_VERSION "${FFMPEG_VERSION}" CACHE STRING "") + endif() + if(FFMPEG_libavformat_FOUND) + set(FFMPEG_libavformat_VERSION "${FFMPEG_VERSION}" CACHE STRING "") + endif() + if(FFMPEG_libavresample_FOUND) + set(FFMPEG_libavresample_VERSION "${FFMPEG_VERSION}" CACHE STRING "") + endif() + if(FFMPEG_libswresample_FOUND) + set(FFMPEG_libswresample_VERSION "${FFMPEG_VERSION}" CACHE STRING "") + endif() + if(FFMPEG_libswscale_FOUND) + set(FFMPEG_libswscale_VERSION "${FFMPEG_VERSION}" CACHE STRING "") + endif() + + list(APPEND FFMPEG_LIBRARIES + ${FFMPEG_PLATFORM_DEPENDENT_LIBS} + ) + + set(FFMPEG_LIBRARY ${FFMPEG_LIBRARIES}) + + set(FFMPEG_FOUND TRUE CACHE BOOL "") + set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} CACHE STRING "") + set(FFMPEG_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIRS} CACHE STRING "") + set(FFMPEG_LIBRARY_DIRS ${FFMPEG_LIBRARY_DIRS} CACHE STRING "") +endif() + +find_package_handle_standard_args(FFMPEG REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_LIBRARY_DIRS FFMPEG_INCLUDE_DIRS) diff --git a/vcpkg/ports/ffmpeg/build.sh.in b/vcpkg/ports/ffmpeg/build.sh.in new file mode 100644 index 0000000..5804088 --- /dev/null +++ b/vcpkg/ports/ffmpeg/build.sh.in @@ -0,0 +1,45 @@ +#!/bin/sh + +set -e + +export PATH="/usr/bin:$PATH" + +command -v cygpath >/dev/null && have_cygpath=1 + +cygpath() { + if [ -n "$have_cygpath" ]; then + command cygpath "$@" + else + eval _p='$'$# + printf '%s\n' "$_p" + fi +} + +export PKG_CONFIG_PATH="$(cygpath -p "${PKG_CONFIG_PATH}")" + +# Export HTTP(S)_PROXY as http(s)_proxy: +[ -n "$HTTP_PROXY" ] && export http_proxy="$HTTP_PROXY" +[ -n "$HTTPS_PROXY" ] && export https_proxy="$HTTPS_PROXY" + +PATH_TO_BUILD_DIR=$( cygpath "@BUILD_DIR@") +PATH_TO_SRC_DIR=$( cygpath "@SOURCE_PATH@") +PATH_TO_PACKAGE_DIR=$(cygpath "@INST_PREFIX@") + +JOBS=@VCPKG_CONCURRENCY@ + +# Default to hardware concurrency if unset. +: ${JOBS:=$(nproc)} + +cd "$PATH_TO_BUILD_DIR" + +echo "=== CONFIGURING ===" + +sh "$PATH_TO_SRC_DIR/configure" "--prefix=$PATH_TO_PACKAGE_DIR" @CONFIGURE_OPTIONS@ + +echo "=== BUILDING ===" + +make -j${JOBS} + +echo "=== INSTALLING ===" + +make install diff --git a/vcpkg/ports/ffmpeg/portfile.cmake b/vcpkg/ports/ffmpeg/portfile.cmake new file mode 100644 index 0000000..5d50f70 --- /dev/null +++ b/vcpkg/ports/ffmpeg/portfile.cmake @@ -0,0 +1,517 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ffmpeg/ffmpeg + REF n4.3.1 + SHA512 9d533f6db97e8eccb77d78d0b55112ce039580b570d2a98c4204199abe5a4b0f448c44b30048329f6c912579f8ff48385d5100f9e484709b9fd8f4b3935b5031 + HEAD_REF master + PATCHES + 0001-create-lib-libraries.patch + 0003-fix-windowsinclude.patch + 0004-fix-debug-build.patch + 0005-fix-libvpx-linking.patch + 0006-fix-StaticFeatures.patch + 0007-fix-lib-naming.patch + 0008-Fix-wavpack-detection.patch + 0009-Fix-fdk-detection.patch + 0010-Fix-x264-detection.patch + 0011-Fix-x265-detection.patch + 0012-Fix-ssl-110-detection.patch +) + +if (SOURCE_PATH MATCHES " ") + message(FATAL_ERROR "Error: ffmpeg will not build with spaces in the path. Please use a directory with no spaces") +endif() + +vcpkg_find_acquire_program(YASM) +get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY) + +if(VCPKG_TARGET_IS_WINDOWS) + #We're assuming that if we're building for Windows we're using MSVC + set(INCLUDE_VAR "INCLUDE") + set(LIB_PATH_VAR "LIB") +else() + set(INCLUDE_VAR "CPATH") + set(LIB_PATH_VAR "LIBRARY_PATH") +endif() + +set(ENV{PATH} "$ENV{PATH}${VCPKG_HOST_PATH_SEPARATOR}${YASM_EXE_PATH}") +set(OPTIONS "--enable-asm --enable-yasm --disable-doc --enable-debug --enable-runtime-cpudetect") + +if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + vcpkg_acquire_msys(MSYS_ROOT + DIRECT_PACKAGES + # Required for "cpp.exe" preprocessor + "https://repo.msys2.org/msys/x86_64/gcc-9.3.0-1-x86_64.pkg.tar.xz" + 76af0192a092278e6b26814b2d92815a2c519902a3fec056b057faec19623b1770ac928a59a39402db23cfc23b0d7601b7f88b367b27269361748c69d08654b2 + "https://repo.msys2.org/msys/x86_64/isl-0.22.1-1-x86_64.pkg.tar.xz" + f4db50d00bad0fa0abc6b9ad965b0262d936d437a9faa35308fa79a7ee500a474178120e487b2db2259caf51524320f619e18d92acf4f0b970b5cbe5cc0f63a2 + "https://repo.msys2.org/msys/x86_64/zlib-1.2.11-1-x86_64.pkg.tar.xz" + b607da40d3388b440f2a09e154f21966cd55ad77e02d47805f78a9dee5de40226225bf0b8335fdfd4b83f25ead3098e9cb974d4f202f28827f8468e30e3b790d + "https://repo.msys2.org/msys/x86_64/mpc-1.1.0-1-x86_64.pkg.tar.xz" + 7d0715c41c27fdbf91e6dcc73d6b8c02ee62c252e027f0a17fa4bfb974be8a74d8e3a327ef31c2460721902299ef69a7ef3c7fce52c8f02ce1cb47f0b6e073e9 + "https://repo.msys2.org/msys/x86_64/mpfr-4.1.0-1-x86_64.pkg.tar.zst" + d64fa60e188124591d41fc097d7eb51d7ea4940bac05cdcf5eafde951ed1eaa174468f5ede03e61106e1633e3428964b34c96de76321ed8853b398fbe8c4d072 + "https://repo.msys2.org/msys/x86_64/gmp-6.2.0-1-x86_64.pkg.tar.xz" + 1389a443e775bb255d905665dd577bef7ed71d51a8c24d118097f8119c08c4dfe67505e88ddd1e9a3764dd1d50ed8b84fa34abefa797d257e90586f0cbf54de8 + ) + else() + vcpkg_acquire_msys(MSYS_ROOT) + endif() + + set(SHELL ${MSYS_ROOT}/usr/bin/bash.exe) + set(OPTIONS "--toolchain=msvc ${OPTIONS}") +else() + set(SHELL /bin/sh) +endif() + +set(ENV{${INCLUDE_VAR}} "${CURRENT_INSTALLED_DIR}/include${VCPKG_HOST_PATH_SEPARATOR}$ENV{${INCLUDE_VAR}}") + +set(_csc_PROJECT_PATH ffmpeg) + +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + +if("nonfree" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-nonfree") +endif() + +if("gpl" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-gpl") +endif() + +if("version3" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-version3") +endif() + +if("ffmpeg" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-ffmpeg") +else() + set(OPTIONS "${OPTIONS} --disable-ffmpeg") +endif() + +if("ffplay" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-ffplay") +else() + set(OPTIONS "${OPTIONS} --disable-ffplay") +endif() + +if("ffprobe" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-ffprobe") +else() + set(OPTIONS "${OPTIONS} --disable-ffprobe") +endif() + +if("avcodec" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-avcodec") + set(ENABLE_AVCODEC ON) +else() + set(OPTIONS "${OPTIONS} --disable-avcodec") + set(ENABLE_AVCODEC OFF) +endif() + +if("avdevice" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-avdevice") + set(ENABLE_AVDEVICE ON) +else() + set(OPTIONS "${OPTIONS} --disable-avdevice") + set(ENABLE_AVDEVICE OFF) +endif() + +if("avformat" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-avformat") + set(ENABLE_AVFORMAT ON) +else() + set(OPTIONS "${OPTIONS} --disable-avformat") + set(ENABLE_AVFORMAT OFF) +endif() + +if("avfilter" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-avfilter") + set(ENABLE_AVFILTER ON) +else() + set(OPTIONS "${OPTIONS} --disable-avfilter") + set(ENABLE_AVFILTER OFF) +endif() + +if("postproc" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-postproc") + set(ENABLE_POSTPROC ON) +else() + set(OPTIONS "${OPTIONS} --disable-postproc") + set(ENABLE_POSTPROC OFF) +endif() + +if("swresample" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-swresample") + set(ENABLE_SWRESAMPLE ON) +else() + set(OPTIONS "${OPTIONS} --disable-swresample") + set(ENABLE_SWRESAMPLE OFF) +endif() + +if("swscale" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-swscale") + set(ENABLE_SWSCALE ON) +else() + set(OPTIONS "${OPTIONS} --disable-swscale") + set(ENABLE_SWSCALE OFF) +endif() + +set(ENABLE_AVRESAMPLE OFF) +if("avresample" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-avresample") + set(ENABLE_AVRESAMPLE ON) +endif() + +if("avisynthplus" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-avisynth") +else() + set(OPTIONS "${OPTIONS} --disable-avisynth") +endif() + +set(STATIC_LINKAGE OFF) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") +set(STATIC_LINKAGE ON) +endif() + +set(ENABLE_BZIP2 OFF) +if("bzip2" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-bzlib") + set(ENABLE_BZIP2 ${STATIC_LINKAGE}) +else() + set(OPTIONS "${OPTIONS} --disable-bzlib") +endif() + +set(ENABLE_ICONV OFF) +if("iconv" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-iconv") + set(ENABLE_ICONV ${STATIC_LINKAGE}) +else() + set(OPTIONS "${OPTIONS} --disable-iconv") +endif() + +set(ENABLE_FDKAAC OFF) +if("fdk-aac" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libfdk-aac") + set(ENABLE_FDKAAC ${STATIC_LINKAGE}) +else() + set(OPTIONS "${OPTIONS} --disable-libfdk-aac") +endif() + +set(ENABLE_LZMA OFF) +if("lzma" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-lzma") + set(ENABLE_LZMA ${STATIC_LINKAGE}) +else() + set(OPTIONS "${OPTIONS} --disable-lzma") +endif() + +set(ENABLE_LAME OFF) +if("mp3lame" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libmp3lame") + set(ENABLE_LAME ${STATIC_LINKAGE}) +else() + set(OPTIONS "${OPTIONS} --disable-libmp3lame") +endif() + +if("nvcodec" IN_LIST FEATURES) + #Note: the --enable-cuda option does not actually require the cuda sdk or toolset port dependency as ffmpeg uses runtime detection and dynamic loading + set(OPTIONS "${OPTIONS} --enable-cuda --enable-nvenc --enable-nvdec --enable-cuvid") +else() + set(OPTIONS "${OPTIONS} --disable-cuda --disable-nvenc --disable-nvdec --disable-cuvid") +endif() + +set(ENABLE_OPENCL OFF) +if("opencl" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-opencl") + set(ENABLE_OPENCL ${STATIC_LINKAGE}) +else() + set(OPTIONS "${OPTIONS} --disable-opencl") +endif() + +set(ENABLE_OPENSSL OFF) +if("openssl" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-openssl") + set(ENABLE_OPENSSL ${STATIC_LINKAGE}) +else() + set(OPTIONS "${OPTIONS} --disable-openssl") +endif() + +set(ENABLE_OPUS OFF) +if("opus" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libopus") + set(ENABLE_OPUS ${STATIC_LINKAGE}) +else() + set(OPTIONS "${OPTIONS} --disable-libopus") +endif() + +set(ENABLE_SDL2 OFF) +if("sdl2" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-sdl2") + set(ENABLE_SDL2 ${STATIC_LINKAGE}) +else() + set(OPTIONS "${OPTIONS} --disable-sdl2") +endif() + +set(ENABLE_SNAPPY OFF) +if("snappy" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libsnappy") + set(ENABLE_SNAPPY ${STATIC_LINKAGE}) +else() + set(OPTIONS "${OPTIONS} --disable-libsnappy") +endif() + +set(ENABLE_SOXR OFF) +if("soxr" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libsoxr") + set(ENABLE_SOXR ${STATIC_LINKAGE}) +else() + set(OPTIONS "${OPTIONS} --disable-libsoxr") +endif() + +set(ENABLE_SPEEX OFF) +if("speex" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libspeex") + set(ENABLE_SPEEX ${STATIC_LINKAGE}) +else() + set(OPTIONS "${OPTIONS} --disable-libspeex") +endif() + +set(ENABLE_THEORA OFF) +if("theora" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libtheora") + set(ENABLE_THEORA ${STATIC_LINKAGE}) +else() + set(OPTIONS "${OPTIONS} --disable-libtheora") +endif() + +set(ENABLE_VORBIS OFF) +if("vorbis" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libvorbis") + set(ENABLE_VORBIS ${STATIC_LINKAGE}) +else() + set(OPTIONS "${OPTIONS} --disable-libvorbis") +endif() + +set(ENABLE_VPX OFF) +if("vpx" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libvpx") + set(ENABLE_VPX ${STATIC_LINKAGE}) +else() + set(OPTIONS "${OPTIONS} --disable-libvpx") +endif() + +set(ENABLE_WAVPACK OFF) +if("wavpack" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libwavpack") + set(ENABLE_WAVPACK ${STATIC_LINKAGE}) +else() + set(OPTIONS "${OPTIONS} --disable-libwavpack") +endif() + +set(ENABLE_X264 OFF) +if("x264" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libx264") + set(ENABLE_X264 ${STATIC_LINKAGE}) +else() + set(OPTIONS "${OPTIONS} --disable-libx264") +endif() + +set(ENABLE_X265 OFF) +if("x265" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-libx265") + set(ENABLE_X265 ${STATIC_LINKAGE}) +else() + set(OPTIONS "${OPTIONS} --disable-libx265") +endif() + +set(ENABLE_ZLIB OFF) +if("zlib" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} --enable-zlib") + set(ENABLE_ZLIB ${STATIC_LINKAGE}) +else() + set(OPTIONS "${OPTIONS} --disable-zlib") +endif() + +if (VCPKG_TARGET_IS_OSX) + set(OPTIONS "${OPTIONS} --disable-vdpau") # disable vdpau in OSX +endif() + +set(OPTIONS_CROSS "") + +if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + if(VCPKG_TARGET_IS_WINDOWS) + set(OPTIONS_CROSS " --enable-cross-compile --target-os=win32 --arch=${VCPKG_TARGET_ARCHITECTURE}") + vcpkg_find_acquire_program(GASPREPROCESSOR) + foreach(GAS_PATH ${GASPREPROCESSOR}) + get_filename_component(GAS_ITEM_PATH ${GAS_PATH} DIRECTORY) + set(ENV{PATH} "$ENV{PATH}${VCPKG_HOST_PATH_SEPARATOR}${GAS_ITEM_PATH}") + endforeach(GAS_PATH) + endif() +elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") +elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") +else() + message(FATAL_ERROR "Unsupported architecture") +endif() + +if(VCPKG_TARGET_IS_UWP) + set(ENV{LIBPATH} "$ENV{LIBPATH};$ENV{_WKITS10}references\\windows.foundation.foundationcontract\\2.0.0.0\\;$ENV{_WKITS10}references\\windows.foundation.universalapicontract\\3.0.0.0\\") + set(OPTIONS "${OPTIONS} --disable-programs") + set(OPTIONS "${OPTIONS} --extra-cflags=-DWINAPI_FAMILY=WINAPI_FAMILY_APP --extra-cflags=-D_WIN32_WINNT=0x0A00") + set(OPTIONS_CROSS " --enable-cross-compile --target-os=win32 --arch=${VCPKG_TARGET_ARCHITECTURE}") +endif() + +set(OPTIONS_DEBUG "--debug") # Note: --disable-optimizations can't be used due to http://ffmpeg.org/pipermail/libav-user/2013-March/003945.html +set(OPTIONS_RELEASE "") + +set(OPTIONS "${OPTIONS} ${OPTIONS_CROSS}") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(OPTIONS "${OPTIONS} --disable-static --enable-shared") + if (VCPKG_TARGET_IS_UWP) + set(OPTIONS "${OPTIONS} --extra-ldflags=-APPCONTAINER --extra-ldflags=WindowsApp.lib") + endif() +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + set(OPTIONS "${OPTIONS} --extra-cflags=-DHAVE_UNISTD_H=0") + if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-cflags=-MDd --extra-cxxflags=-MDd") + set(OPTIONS_RELEASE "${OPTIONS_RELEASE} --extra-cflags=-MD --extra-cxxflags=-MD") + else() + set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-cflags=-MTd --extra-cxxflags=-MTd") + set(OPTIONS_RELEASE "${OPTIONS_RELEASE} --extra-cflags=-MT --extra-cxxflags=-MT") + endif() +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(OPTIONS "${OPTIONS} --pkg-config-flags=--static") +endif() + +set(ENV_LIB_PATH "$ENV{${LIB_PATH_VAR}}") + +message(STATUS "Building Options: ${OPTIONS}") + +# Release build +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release) + message(STATUS "Building Release Options: ${OPTIONS_RELEASE}") + set(ENV{${LIB_PATH_VAR}} "${CURRENT_INSTALLED_DIR}/lib${VCPKG_HOST_PATH_SEPARATOR}${ENV_LIB_PATH}") + set(ENV{CFLAGS} "${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_RELEASE}") + set(ENV{LDFLAGS} "${VCPKG_LINKER_FLAGS}") + set(ENV{PKG_CONFIG_PATH} "${CURRENT_INSTALLED_DIR}/lib/pkgconfig") + message(STATUS "Building ${_csc_PROJECT_PATH} for Release") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + + set(BUILD_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + set(CONFIGURE_OPTIONS "${OPTIONS} ${OPTIONS_RELEASE}") + set(INST_PREFIX "${CURRENT_PACKAGES_DIR}") + + configure_file("${CMAKE_CURRENT_LIST_DIR}/build.sh.in" "${BUILD_DIR}/build.sh" @ONLY) + + vcpkg_execute_required_process( + COMMAND ${SHELL} ./build.sh + WORKING_DIRECTORY ${BUILD_DIR} + LOGNAME build-${TARGET_TRIPLET}-rel + ) +endif() + +# Debug build +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug) + message(STATUS "Building Debug Options: ${OPTIONS_DEBUG}") + set(ENV{${LIB_PATH_VAR}} "${CURRENT_INSTALLED_DIR}/debug/lib${VCPKG_HOST_PATH_SEPARATOR}${ENV_LIB_PATH}") + set(ENV{CFLAGS} "${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_DEBUG}") + set(ENV{LDFLAGS} "${VCPKG_LINKER_FLAGS}") + set(ENV{PKG_CONFIG_PATH} "${CURRENT_INSTALLED_DIR}/debug/lib/pkgconfig") + message(STATUS "Building ${_csc_PROJECT_PATH} for Debug") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + + set(BUILD_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + set(CONFIGURE_OPTIONS "${OPTIONS} ${OPTIONS_DEBUG}") + set(INST_PREFIX "${CURRENT_PACKAGES_DIR}/debug") + + configure_file("${CMAKE_CURRENT_LIST_DIR}/build.sh.in" "${BUILD_DIR}/build.sh" @ONLY) + + vcpkg_execute_required_process( + COMMAND ${SHELL} ./build.sh + WORKING_DIRECTORY ${BUILD_DIR} + LOGNAME build-${TARGET_TRIPLET}-dbg + ) +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + file(GLOB DEF_FILES ${CURRENT_PACKAGES_DIR}/lib/*.def ${CURRENT_PACKAGES_DIR}/debug/lib/*.def) + + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(LIB_MACHINE_ARG /machine:ARM) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(LIB_MACHINE_ARG /machine:ARM64) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(LIB_MACHINE_ARG /machine:x86) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(LIB_MACHINE_ARG /machine:x64) + else() + message(FATAL_ERROR "Unsupported target architecture") + endif() + + foreach(DEF_FILE ${DEF_FILES}) + get_filename_component(DEF_FILE_DIR "${DEF_FILE}" DIRECTORY) + get_filename_component(DEF_FILE_NAME "${DEF_FILE}" NAME) + string(REGEX REPLACE "-[0-9]*\\.def" "${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" OUT_FILE_NAME "${DEF_FILE_NAME}") + file(TO_NATIVE_PATH "${DEF_FILE}" DEF_FILE_NATIVE) + file(TO_NATIVE_PATH "${DEF_FILE_DIR}/${OUT_FILE_NAME}" OUT_FILE_NATIVE) + message(STATUS "Generating ${OUT_FILE_NATIVE}") + vcpkg_execute_required_process( + COMMAND lib.exe /def:${DEF_FILE_NATIVE} /out:${OUT_FILE_NATIVE} ${LIB_MACHINE_ARG} + WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR} + LOGNAME libconvert-${TARGET_TRIPLET} + ) + endforeach() + + # Handle tools + file(GLOB EXP_FILES ${CURRENT_PACKAGES_DIR}/lib/*.exp ${CURRENT_PACKAGES_DIR}/debug/lib/*.exp) + file(GLOB LIB_FILES ${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${CURRENT_PACKAGES_DIR}/debug/bin/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}) + file(GLOB EXE_FILES_REL ${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + file(GLOB EXE_FILES_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + set(FILES_TO_REMOVE ${EXP_FILES} ${LIB_FILES} ${DEF_FILES} ${EXE_FILES_REL} ${EXE_FILES_DBG}) + + if(FILES_TO_REMOVE) + if (EXE_FILES_REL) + file(INSTALL ${EXE_FILES_REL} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + endif() + if (EXE_FILES_DBG) + file(INSTALL ${EXE_FILES_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}) + endif() + file(REMOVE ${FILES_TO_REMOVE}) + endif() +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_copy_pdbs() + +# Handle copyright +file(STRINGS ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-out.log LICENSE_STRING REGEX "License: .*" LIMIT_COUNT 1) +if(LICENSE_STRING STREQUAL "License: LGPL version 2.1 or later") + set(LICENSE_FILE "COPYING.LGPLv2.1") +elseif(LICENSE_STRING STREQUAL "License: LGPL version 3 or later") + set(LICENSE_FILE "COPYING.LGPLv3") +elseif(LICENSE_STRING STREQUAL "License: GPL version 2 or later") + set(LICENSE_FILE "COPYING.GPLv2") +elseif(LICENSE_STRING STREQUAL "License: GPL version 3 or later") + set(LICENSE_FILE "COPYING.GPLv3") +elseif(LICENSE_STRING STREQUAL "License: nonfree and unredistributable") + set(LICENSE_FILE "COPYING.NONFREE") + file(WRITE ${SOURCE_PATH}/${LICENSE_FILE} ${LICENSE_STRING}) +else() + message(FATAL_ERROR "Failed to identify license (${LICENSE_STRING})") +endif() + +configure_file(${CMAKE_CURRENT_LIST_DIR}/FindFFMPEG.cmake.in ${CURRENT_PACKAGES_DIR}/share/${PORT}/FindFFMPEG.cmake @ONLY) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/${LICENSE_FILE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/ffmpeg/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/ffmpeg/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..8e2dd44 --- /dev/null +++ b/vcpkg/ports/ffmpeg/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,6 @@ +set(FFMPEG_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${FFMPEG_PREV_MODULE_PATH}) diff --git a/vcpkg/ports/ffnvcodec/CONTROL b/vcpkg/ports/ffnvcodec/CONTROL new file mode 100644 index 0000000..5b09398 --- /dev/null +++ b/vcpkg/ports/ffnvcodec/CONTROL @@ -0,0 +1,5 @@ +Source: ffnvcodec +Version: 10.0.26.0 +Homepage: https://github.com/FFmpeg/nv-codec-headers +Description: FFmpeg version of Nvidia Codec SDK headers. +Supports: windows|linux diff --git a/vcpkg/ports/ffnvcodec/LICENSE.txt b/vcpkg/ports/ffnvcodec/LICENSE.txt new file mode 100644 index 0000000..a912156 --- /dev/null +++ b/vcpkg/ports/ffnvcodec/LICENSE.txt @@ -0,0 +1,169 @@ +GNU LESSER GENERAL PUBLIC LICENSE +Version 2.1, February 1999 + +Copyright (C) 1991, 1999 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] +Preamble +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. + +This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. + +When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. + +To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. + +For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. + +We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. + +To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. + +Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. + +Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. + +When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. + +We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. + +For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. + +In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. + +Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. + +The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION +0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". + +A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. + +The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) + +"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. + +1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + +a) The modified work must itself be a software library. +b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. +c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. +d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. +(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. + +Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. + +This option is useful when you wish to copy part of the code of the Library into a program that is not a library. + +4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. + +If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. + +5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. + +However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. + +When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. + +If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) + +Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. + +6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. + +You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: + +a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) +b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. +c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. +d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. +e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. +For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. + +7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: + +a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. +b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. +8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. + +10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. + +11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. + +14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS +How to Apply These Terms to Your New Libraries +If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). + +To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. + +one line to give the library's name and an idea of what it does. +Copyright (C) year name of author + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: + +Yoyodyne, Inc., hereby disclaims all copyright interest in +the library `Frob' (a library for tweaking knobs) written +by James Random Hacker. + +signature of Ty Coon, 1 April 1990 +Ty Coon, President of Vice +That's all there is to it! \ No newline at end of file diff --git a/vcpkg/ports/ffnvcodec/build.sh b/vcpkg/ports/ffnvcodec/build.sh new file mode 100644 index 0000000..416c6bd --- /dev/null +++ b/vcpkg/ports/ffnvcodec/build.sh @@ -0,0 +1,18 @@ +#!/usr/bin/bash + +# Deploys the ffnvcodec.pc file to the MSYS rootfs so that pkgconfig can find it. + +set -e +export PATH=/usr/bin:$PATH + +SOURCE_PATH="$1" +CURRENT_PACKAGES_DIR="$2" + +pushd ${SOURCE_PATH} + +# Create ffnvcodec.pc +make PREFIX=${CURRENT_PACKAGES_DIR} +make install PREFIX=${CURRENT_PACKAGES_DIR} + + +popd diff --git a/vcpkg/ports/ffnvcodec/copyright b/vcpkg/ports/ffnvcodec/copyright new file mode 100644 index 0000000..07c1bc4 --- /dev/null +++ b/vcpkg/ports/ffnvcodec/copyright @@ -0,0 +1,26 @@ +/* + * This copyright notice applies to this header file only: + * + * Copyright (c) 2010-2019 NVIDIA Corporation + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the software, and to permit persons to whom the + * software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ diff --git a/vcpkg/ports/ffnvcodec/portfile.cmake b/vcpkg/ports/ffnvcodec/portfile.cmake new file mode 100644 index 0000000..31c6c91 --- /dev/null +++ b/vcpkg/ports/ffnvcodec/portfile.cmake @@ -0,0 +1,58 @@ +# Get nvcodec +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO FFmpeg/nv-codec-headers + REF 5ee2ae591f74f53bd6028344f8690f1558a1f17a # 10.0.26.0 + SHA512 f9d40a44f85016f0f76c7f630c3defb2e94858b43ae714adae546842c2801f51358b7c2b3326952e7aeb25f5b1611af4eee3024f495eaaaecbfd31851cc7edca + HEAD_REF master +) + +# ==================================================== +# Install the pkgconfig info for the `nvcodec` package +# ==================================================== + +# Windows +if(VCPKG_TARGET_IS_WINDOWS) + set(BUILD_SCRIPT ${CMAKE_CURRENT_LIST_DIR}\\build.sh) + vcpkg_acquire_msys(MSYS_ROOT PACKAGES make pkg-config) + set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) + + message(STATUS "Building ${_csc_PROJECT_PATH} for Release") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) + + # Make and deploy the ffnvcodec.pc file using MSYS + # (so that FFmpeg can find it in the MSYS rootfs) + vcpkg_execute_required_process( + COMMAND ${BASH} --noprofile --norc "${BUILD_SCRIPT}" + "${SOURCE_PATH}" + "${CURRENT_PACKAGES_DIR}" + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET} + LOGNAME build-${TARGET_TRIPLET} + ) + + file(INSTALL ${SOURCE_PATH}/ffnvcodec.pc DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) + +# Linux, etc. +else() + FIND_PROGRAM(MAKE make) + IF (NOT MAKE) + MESSAGE(FATAL_ERROR "MAKE not found") + ENDIF () + + vcpkg_execute_required_process( + COMMAND make PREFIX=$${CURRENT_PACKAGES_DIR} + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME make-${TARGET_TRIPLET} + ) + + # FFmpeg uses pkgconfig to find ffnvcodec.pc, so install it where + # FFMpeg's call to pkgconfig expects to find it. + file(INSTALL ${SOURCE_PATH}/ffnvcodec.pc DESTINATION ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) + file(INSTALL ${SOURCE_PATH}/ffnvcodec.pc DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) +endif() + +# Install the files to their default vcpkg locations +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${CURRENT_PORT_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +vcpkg_fixup_pkgconfig() diff --git a/vcpkg/ports/fftw3/CONTROL b/vcpkg/ports/fftw3/CONTROL new file mode 100644 index 0000000..95c6936 --- /dev/null +++ b/vcpkg/ports/fftw3/CONTROL @@ -0,0 +1,22 @@ +Source: fftw3 +Version: 3.3.8-7 +Homepage: https://www.fftw.org/ +Description: FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST). + +Feature: openmp +Description: Builds openmp enabled lib + +Feature: sse +Description: Builds part of the library with sse + +Feature: sse2 +Description: Builds part of the library with sse2, sse + +Feature: avx +Description: Builds part of the library with avx, sse2, sse + +Feature: avx2 +Description: Builds part of the library with avx2, fma, avx, sse2, sse + +Feature: threads +Description: Enable threads in fftw3 diff --git a/vcpkg/ports/fftw3/aligned_malloc.patch b/vcpkg/ports/fftw3/aligned_malloc.patch new file mode 100644 index 0000000..447ded6 --- /dev/null +++ b/vcpkg/ports/fftw3/aligned_malloc.patch @@ -0,0 +1,38 @@ +diff --git a/cmake.config.h.in b/cmake.config.h.in +index 1f4c505..fd763cc 100644 +--- a/cmake.config.h.in ++++ b/cmake.config.h.in +@@ -112,6 +112,10 @@ + you don't. */ + #cmakedefine01 HAVE_DECL_POSIX_MEMALIGN + ++/* Define to 1 if you have the declaration of `_aligned_malloc', and to 0 if you ++ don't. */ ++#cmakedefine01 HAVE_DECL_ALIGNED_MALLOC ++ + /* Define to 1 if you have the declaration of `sinl', and to 0 if you don't. + */ + #cmakedefine01 HAVE_DECL_SINL +@@ -184,6 +188,9 @@ + /* Define to 1 if you have the `memalign' function. */ + #cmakedefine HAVE_MEMALIGN 1 + ++/* Define to 1 if you have the `_aligned_malloc' function. */ ++#cmakedefine HAVE_ALIGNED_MALLOC 1 ++ + /* Define to 1 if you have the `memmove' function. */ + #cmakedefine HAVE_MEMMOVE 1 + +diff --git a/kernel/kalloc.c b/kernel/kalloc.c +index e42f6f3..ffc2257 100644 +--- a/kernel/kalloc.c ++++ b/kernel/kalloc.c +@@ -103,7 +103,7 @@ void *X(kernel_malloc)(size_t n) + # undef real_free + # define real_free _mm_free + +-# elif defined(_MSC_VER) ++# elif defined(_MSC_VER) || defined (HAVE_ALIGNED_MALLOC) + /* MS Visual C++ 6.0 with a "Processor Pack" supports SIMD + and _aligned_malloc/free (uses malloc.h) */ + p = (void *) _aligned_malloc(n, MIN_ALIGNMENT); diff --git a/vcpkg/ports/fftw3/fftw3_arch_fix.patch b/vcpkg/ports/fftw3/fftw3_arch_fix.patch new file mode 100644 index 0000000..0f1a7e5 --- /dev/null +++ b/vcpkg/ports/fftw3/fftw3_arch_fix.patch @@ -0,0 +1,40 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 95bd537a..245acc8f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -66,6 +66,8 @@ + check_prototype_definition (sinl "long double sinl( long double arg )" "0" math.h HAVE_DECL_SINL) + check_prototype_definition (memalign "void *memalign(size_t alignment, size_t size)" "0" malloc.h HAVE_DECL_MEMALIGN) + check_prototype_definition (posix_memalign "int posix_memalign(void **memptr, size_t alignment, size_t size)" "0" stdlib.h HAVE_DECL_POSIX_MEMALIGN) ++check_prototype_definition (_aligned_malloc "void* __cdecl _aligned_malloc(size_t _Size, size_t _Alignment)" "0" malloc.h HAVE_DECL_ALIGNED_MALLOC) ++ + + include (CheckSymbolExists) + check_symbol_exists (clock_gettime time.h HAVE_CLOCK_GETTIME) +@@ -75,6 +77,7 @@ + check_symbol_exists (srand48 stdlib.h HAVE_SRAND48) + check_symbol_exists (memalign malloc.h HAVE_MEMALIGN) + check_symbol_exists (posix_memalign stdlib.h HAVE_POSIX_MEMALIGN) ++check_symbol_exists (_aligned_malloc malloc.h HAVE_ALIGNED_MALLOC) + check_symbol_exists (mach_absolute_time mach/mach_time.h HAVE_MACH_ABSOLUTE_TIME) + check_symbol_exists (alloca alloca.h HAVE_ALLOCA) + if (NOT HAVE_ALLOCA) +@@ -131,6 +131,7 @@ endif () + + include (CheckCCompilerFlag) + ++#All those checks fail due to linkage errors so we directly set HAVE_ in the PORTFILE! We assume the user knows what (s)he is doing! + if (ENABLE_SSE) + foreach (FLAG "-msse" "/arch:SSE") + unset (HAVE_SSE CACHE) +@@ -176,8 +177,9 @@ if (ENABLE_AVX2) + endif () + + # AVX2 codelets require FMA support as well ++# AVX2 implicitly includes FMA using Visual Studio (also definition __FMA__ is not set) + if (ENABLE_AVX2) +- foreach (FLAG "-mfma" "/arch:FMA") ++ foreach (FLAG "-mfma" "/arch:AVX2") + unset (HAVE_FMA CACHE) + check_c_compiler_flag (${FLAG} HAVE_FMA) + if (HAVE_FMA) diff --git a/vcpkg/ports/fftw3/omp_test.patch b/vcpkg/ports/fftw3/omp_test.patch new file mode 100644 index 0000000..6123798 --- /dev/null +++ b/vcpkg/ports/fftw3/omp_test.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f3cfc20..9826bff 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -385,6 +385,12 @@ if (BUILD_TESTS) + target_link_libraries (bench ${fftw3_lib}) + endif () + ++ if (ENABLE_OPENMP) ++ target_link_libraries (bench ${fftw3_lib}_omp) ++ else () ++ target_link_libraries (bench ${fftw3_lib}) ++ endif () ++ + + enable_testing () + diff --git a/vcpkg/ports/fftw3/patch_targets.patch b/vcpkg/ports/fftw3/patch_targets.patch new file mode 100644 index 0000000..a0df5cf --- /dev/null +++ b/vcpkg/ports/fftw3/patch_targets.patch @@ -0,0 +1,41 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 335808a..90772b4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -358,7 +358,7 @@ foreach(subtarget ${subtargets}) + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endforeach () + install(TARGETS ${fftw3_lib} +- EXPORT FFTW3LibraryDepends ++ EXPORT FFTW3${PREC_SUFFIX}LibraryDepends + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +@@ -419,11 +419,11 @@ configure_file (FFTW3ConfigVersion.cmake.in FFTW3${PREC_SUFFIX}ConfigVersion.cma + install (FILES + ${CMAKE_CURRENT_BINARY_DIR}/FFTW3${PREC_SUFFIX}Config.cmake + ${CMAKE_CURRENT_BINARY_DIR}/FFTW3${PREC_SUFFIX}ConfigVersion.cmake +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/fftw3${PREC_SUFFIX} ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake + COMPONENT Development) + +-export (TARGETS ${fftw3_lib} NAMESPACE FFTW3:: FILE ${PROJECT_BINARY_DIR}/FFTW3LibraryDepends.cmake) +-install(EXPORT FFTW3LibraryDepends ++export (TARGETS ${fftw3_lib} NAMESPACE FFTW3:: FILE ${PROJECT_BINARY_DIR}/FFTW3${PREC_SUFFIX}LibraryDepends.cmake) ++install(EXPORT FFTW3${PREC_SUFFIX}LibraryDepends + NAMESPACE FFTW3:: +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/fftw3${PREC_SUFFIX} ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake + COMPONENT Development) +--- a/FFTW3Config.cmake.in ++++ b/FFTW3Config.cmake.in +@@ -10,7 +10,7 @@ set (FFTW3@PREC_SUFFIX@_LIBRARIES fftw3@PREC_SUFFIX@) + set (FFTW3@PREC_SUFFIX@_LIBRARY_DIRS @CMAKE_INSTALL_FULL_LIBDIR@) + set (FFTW3@PREC_SUFFIX@_INCLUDE_DIRS @CMAKE_INSTALL_FULL_INCLUDEDIR@) + +-include ("${CMAKE_CURRENT_LIST_DIR}/FFTW3LibraryDepends.cmake") ++include ("${CMAKE_CURRENT_LIST_DIR}/FFTW3@PREC_SUFFIX@LibraryDepends.cmake") + + if (CMAKE_VERSION VERSION_LESS 2.8.3) + set (CMAKE_CURRENT_LIST_DIR) + \ No newline at end of file diff --git a/vcpkg/ports/fftw3/portfile.cmake b/vcpkg/ports/fftw3/portfile.cmake new file mode 100644 index 0000000..161cff7 --- /dev/null +++ b/vcpkg/ports/fftw3/portfile.cmake @@ -0,0 +1,76 @@ +vcpkg_download_distfile(ARCHIVE + URLS "http://www.fftw.org/fftw-3.3.8.tar.gz" + FILENAME "fftw-3.3.8.tar.gz" + SHA512 ab918b742a7c7dcb56390a0a0014f517a6dff9a2e4b4591060deeb2c652bf3c6868aa74559a422a276b853289b4b701bdcbd3d4d8c08943acf29167a7be81a38 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + omp_test.patch + patch_targets.patch + fftw3_arch_fix.patch + aligned_malloc.patch +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + openmp ENABLE_OPENMP + threads ENABLE_THREADS + threads WITH_COMBINED_THREADS + avx2 ENABLE_AVX2 + avx ENABLE_AVX + sse2 ENABLE_SSE2 + sse ENABLE_SSE +) + +set(ENABLE_FLOAT_CMAKE fftw3f) +set(ENABLE_LONG_DOUBLE_CMAKE fftw3l) +set(ENABLE_DEFAULT_PRECISION_CMAKE fftw3) + +foreach(PRECISION ENABLE_FLOAT ENABLE_LONG_DOUBLE ENABLE_DEFAULT_PRECISION) + if(PRECISION STREQUAL "ENABLE_LONG_DOUBLE") + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -D${PRECISION}=ON + -DENABLE_OPENMP=${ENABLE_OPENMP} + -DENABLE_THREADS=${HAVE_THREADS} + -DWITH_COMBINED_THREADS=${HAVE_THREADS} + -DBUILD_TESTS=OFF + ) + else() + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -D${PRECISION}=ON + ${FEATURE_OPTIONS} + -DBUILD_TESTS=OFF + ) + endif() + + vcpkg_install_cmake() + + vcpkg_copy_pdbs() + + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share/${${PRECISION}_CMAKE}) +endforeach() + +file(READ ${SOURCE_PATH}/api/fftw3.h _contents) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined(FFTW_DLL)" "0" _contents "${_contents}") +else() + string(REPLACE "defined(FFTW_DLL)" "1" _contents "${_contents}") +endif() +file(WRITE ${SOURCE_PATH}/include/fftw3.h "${_contents}") + +# Cleanup +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/fftw3) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/fftw3/COPYING ${CURRENT_PACKAGES_DIR}/share/fftw3/copyright) diff --git a/vcpkg/ports/fftwpp/CONTROL b/vcpkg/ports/fftwpp/CONTROL new file mode 100644 index 0000000..ba65d71 --- /dev/null +++ b/vcpkg/ports/fftwpp/CONTROL @@ -0,0 +1,5 @@ +Source: fftwpp +Version: 2019-12-19 +Homepage: https://www.fftw.org/ +Description: FFTW++ is a C++ header/MPI transpose for Version 3 of the highly optimized FFTW (http://www.fftw.org) Fourier Transform library. +Build-Depends: fftw3 diff --git a/vcpkg/ports/fftwpp/portfile.cmake b/vcpkg/ports/fftwpp/portfile.cmake new file mode 100644 index 0000000..b24c565 --- /dev/null +++ b/vcpkg/ports/fftwpp/portfile.cmake @@ -0,0 +1,34 @@ + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dealias/fftwpp + REF d05a2812995a52a3834140fd3ddd2e80bf8fcd42 + SHA512 851c79245eb61ebebfde97e7a8f3b9c061e84c9df571b5a7cafc3e959941e7b0792923e0ddefde4739582932d135c578c703195017da4bd34872adce7ab8c5ee + HEAD_REF master +) + +# fftwpp is a header-only library +set (FFWTPP_SOURCE_FILES + ${SOURCE_PATH}/Array.h + ${SOURCE_PATH}/Array.cc + ${SOURCE_PATH}/Complex.h + ${SOURCE_PATH}/Complex.cc + ${SOURCE_PATH}/align.h + ${SOURCE_PATH}/cmult-sse2.h + ${SOURCE_PATH}/convolution.h + ${SOURCE_PATH}/convolution.cc + ${SOURCE_PATH}/fftw++.h + ${SOURCE_PATH}/fftw++.cc + ${SOURCE_PATH}/seconds.h + ${SOURCE_PATH}/statistics.h + ${SOURCE_PATH}/transposeoptions.h +) + +set(FFWTPP_DOXY_CFG ${SOURCE_PATH}/fftw++.doxycfg) + +file(INSTALL ${FFWTPP_SOURCE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +file(INSTALL ${FFWTPP_DOXY_CFG} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/field3d/0001_fix_build_errors.patch b/vcpkg/ports/field3d/0001_fix_build_errors.patch new file mode 100644 index 0000000..95149e3 --- /dev/null +++ b/vcpkg/ports/field3d/0001_fix_build_errors.patch @@ -0,0 +1,148 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1610c2e..b012008 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -31,25 +31,17 @@ + + # Author : Nicholas Yue yue.nicholas@gmail.com + +-CMAKE_MINIMUM_REQUIRED( VERSION 2.8 ) ++CMAKE_MINIMUM_REQUIRED( VERSION 3.17 ) + + PROJECT ( field3d ) + + set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake ) + + FIND_PACKAGE (Doxygen) +-FIND_PACKAGE (HDF5 COMPONENTS C) +-IF ( CMAKE_HOST_WIN32 ) +-# f3dinfo relies on program_options but don't include it, since +-# for some reason, unlike all the other boost components, a link is +-# forced via a pragma. +-FIND_PACKAGE (Boost COMPONENTS regex thread) +-ELSE () +-FIND_PACKAGE (Boost COMPONENTS regex thread program_options system) +-FIND_PACKAGE (MPI) +-ENDIF () ++FIND_PACKAGE (HDF5 COMPONENTS C REQUIRED) ++FIND_PACKAGE (Boost COMPONENTS regex thread program_options system REQUIRED) + +-FIND_PACKAGE (ILMBase) ++FIND_PACKAGE (OpenEXR REQUIRED) + + # Allow the developer to select if Dynamic or Static libraries are built + OPTION (BUILD_SHARED_LIBS "Build Shared Libraries" ON) +@@ -79,26 +71,14 @@ IF ( CMAKE_HOST_UNIX ) + ENDIF ( ) + IF ( CMAKE_HOST_WIN32 ) + ADD_DEFINITIONS ( +- -D_HAS_ITERATOR_DEBUGGING=0 + -D_CRT_SECURE_NO_WARNINGS=1 + ) + ENDIF ( ) + + SET ( LIB_TYPE SHARED ) + IF ( NOT BUILD_SHARED_LIBS ) +- IF ( CMAKE_HOST_WIN32 ) +- # User wants to build static libraries, so change the LIB_TYPE variable to CMake keyword 'STATIC' + SET ( LIB_TYPE STATIC ) + ADD_DEFINITIONS( -DFIELD3D_STATIC ) +- ENDIF() +-ELSE () +- IF ( CMAKE_HOST_WIN32 ) +- ADD_DEFINITIONS ( +- -DOPENEXR_DLL +- -D_HDF5USEDLL_ +- -DHDF5CPP_USEDLL +- ) +- ENDIF() + ENDIF ( NOT BUILD_SHARED_LIBS ) + + ADD_LIBRARY ( Field3D ${LIB_TYPE} +@@ -147,24 +128,22 @@ IF ( CMAKE_HOST_UNIX ) + ${MPI_LIBRARIES} ) + ENDIF ( MPI_FOUND ) + LIST ( APPEND Field3D_Libraries_Shared +- Iex Half IlmThread Imath + pthread dl z ) + SET ( Field3D_DSO_Libraries ${Field3D_Libraries_Shared} ) + SET ( Field3D_BIN_Libraries Field3D ${Field3D_Libraries_Shared} + ${Boost_LIBRARIES} ) + ENDIF ( ) + IF ( CMAKE_HOST_WIN32 ) +- # Add OpenEXR and zlib release/debug +- FOREACH ( lib Iex Half IlmThread Imath zdll ) ++ FOREACH ( lib zlib ) + LIST ( APPEND Field3D_Libraries_Shared + optimized ${lib} +- debug ${lib}_d ) ++ debug ${lib}d ) + ENDFOREACH() + SET ( Field3D_DSO_Libraries ${Field3D_Libraries_Shared} Shlwapi.lib) + SET ( Field3D_BIN_Libraries Field3D ${Boost_LIBRARIES} ) + ENDIF () + +-TARGET_LINK_LIBRARIES ( Field3D ${Field3D_DSO_Libraries} ${Boost_LIBRARIES}) ++TARGET_LINK_LIBRARIES ( Field3D ${Field3D_DSO_Libraries} ${Boost_LIBRARIES} OpenEXR::IlmImf) + + # Parase version and soversion from export/ns.h + +@@ -214,33 +193,7 @@ ADD_EXECUTABLE ( f3dinfo + + TARGET_LINK_LIBRARIES ( f3dinfo ${Field3D_BIN_Libraries} ) + +-# field3d - sparse_field_io +-ADD_EXECUTABLE ( sparse_field_io +- apps/sample_code/sparse_field_io/main.cpp +- ) +- +-TARGET_LINK_LIBRARIES ( sparse_field_io ${Field3D_BIN_Libraries} ) +- +-# field3d - read +-ADD_EXECUTABLE ( read +- apps/sample_code/read/main.cpp +- ) + +-TARGET_LINK_LIBRARIES ( read ${Field3D_BIN_Libraries} ) +- +-# field3d - mixed_types +-ADD_EXECUTABLE ( mixed_types +- apps/sample_code/mixed_types/main.cpp +- ) +- +-TARGET_LINK_LIBRARIES ( mixed_types ${Field3D_BIN_Libraries} ) +- +-# field3d - create_and_write +-ADD_EXECUTABLE ( create_and_write +- apps/sample_code/create_and_write/main.cpp +- ) +- +-TARGET_LINK_LIBRARIES ( create_and_write ${Field3D_BIN_Libraries} ) + + IF (DOXYGEN_FOUND) + ADD_CUSTOM_TARGET ( doc +@@ -249,7 +202,7 @@ IF (DOXYGEN_FOUND) + WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY} + ) + IF (INSTALL_DOCS) +- INSTALL (DIRECTORY ++ INSTALL (DIRECTORY + ${CMAKE_HOME_DIRECTORY}/docs + DESTINATION ${CMAKE_INSTALL_PREFIX} + ) +@@ -263,12 +216,11 @@ INSTALL ( TARGETS + + FILE(GLOB Field3d_Includes "${CMAKE_CURRENT_SOURCE_DIR}/export/*.h") + +-INSTALL ( FILES +- ${Field3d_Includes} ++INSTALL ( FILES ++ ${Field3d_Includes} + DESTINATION include/Field3D + ) + +-INSTALL ( TARGETS f3dinfo ++INSTALL ( TARGETS f3dinfo + RUNTIME DESTINATION bin + ) +- diff --git a/vcpkg/ports/field3d/0002_improve_win_compatibility.patch b/vcpkg/ports/field3d/0002_improve_win_compatibility.patch new file mode 100644 index 0000000..08167be --- /dev/null +++ b/vcpkg/ports/field3d/0002_improve_win_compatibility.patch @@ -0,0 +1,43 @@ +diff --git a/include/UtilFoundation.h b/include/UtilFoundation.h +index 2eb6290..a449b5b 100644 +--- a/include/UtilFoundation.h ++++ b/include/UtilFoundation.h +@@ -90,6 +90,9 @@ + #ifndef WIN32_LEAN_AND_MEAN + #define WIN32_LEAN_AND_MEAN + #endif ++#ifndef NOMINMAX ++#define NOMINMAX ++#endif + + // needed for mutex stuff + #include +diff --git a/src/FieldMapping.cpp b/src/FieldMapping.cpp +index b1f1a1f..90612b1 100644 +--- a/src/FieldMapping.cpp ++++ b/src/FieldMapping.cpp +@@ -49,9 +49,6 @@ + #include "FieldMapping.h" + #include "Types.h" + +-#ifdef WIN32 +-#define isnan(__x__) _isnan(__x__) +-#endif + + //----------------------------------------------------------------------------// + +diff --git a/src/Log.cpp b/src/Log.cpp +index f78229c..d095a50 100644 +--- a/src/Log.cpp ++++ b/src/Log.cpp +@@ -40,8 +40,9 @@ + */ + + //----------------------------------------------------------------------------// +- ++#ifndef _WIN32 + #include ++#endif + #include + #include + diff --git a/vcpkg/ports/field3d/0003_hdf5_api.patch b/vcpkg/ports/field3d/0003_hdf5_api.patch new file mode 100644 index 0000000..183a49c --- /dev/null +++ b/vcpkg/ports/field3d/0003_hdf5_api.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b57057f..e809880 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -35,6 +35,7 @@ CMAKE_MINIMUM_REQUIRED( VERSION 3.17 ) + + PROJECT ( field3d ) + ++add_definitions(-DH5_USE_110_API) + set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake ) + + FIND_PACKAGE (Doxygen) diff --git a/vcpkg/ports/field3d/CONTROL b/vcpkg/ports/field3d/CONTROL new file mode 100644 index 0000000..d16bd4c --- /dev/null +++ b/vcpkg/ports/field3d/CONTROL @@ -0,0 +1,7 @@ +Source: field3d +Version: 1.7.3 +Port-Version: 1 +Homepage: https://github.com/imageworks/Field3D +Description: An open source library for storing voxel data. It provides C++ classes that handle in-memory storage and a file format based on HDF5 that allows the C++ objects to be written to and read from disk. +Build-Depends: hdf5, boost-regex, boost-thread, boost-program-options, boost-system, openexr, boost-foreach, boost-test, boost-timer, boost-format +Supports: !(uwp) diff --git a/vcpkg/ports/field3d/portfile.cmake b/vcpkg/ports/field3d/portfile.cmake new file mode 100644 index 0000000..a23e042 --- /dev/null +++ b/vcpkg/ports/field3d/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO imageworks/Field3D + REF 0cf75ad982917e0919f59e5cb3d483517d06d7da + SHA512 e6f137013dd7b64b51b2ec3cc3ed8f4dbfadb85858946f08393653d78136cf8f93ae124716db11358e325c5e64ba04802afd4b89ca36ad65a14dd3db17f3072c + HEAD_REF master + PATCHES + 0001_fix_build_errors.patch + 0002_improve_win_compatibility.patch + 0003_hdf5_api.patch # Switches the HDF5 default API for this port to 1.10 +) + +file(REMOVE ${SOURCE_PATH}/cmake/FindILMBase.cmake) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + "-DINSTALL_DOCS:BOOL=OFF" +) + +vcpkg_install_cmake() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/fizz/CONTROL b/vcpkg/ports/fizz/CONTROL new file mode 100644 index 0000000..152f53a --- /dev/null +++ b/vcpkg/ports/fizz/CONTROL @@ -0,0 +1,5 @@ +Source: fizz +Version: 2020.02.03.00 +Port-Version: 1 +Build-Depends: folly, openssl, libsodium, zlib, fmt +Description: a TLS 1.3 implementation by Facebook \ No newline at end of file diff --git a/vcpkg/ports/fizz/find-zlib.patch b/vcpkg/ports/fizz/find-zlib.patch new file mode 100644 index 0000000..34e9316 --- /dev/null +++ b/vcpkg/ports/fizz/find-zlib.patch @@ -0,0 +1,14 @@ +diff --git a/fizz/CMakeLists.txt b/fizz/CMakeLists.txt +index 0c95883..52585aa 100644 +--- a/fizz/CMakeLists.txt ++++ b/fizz/CMakeLists.txt +@@ -86,6 +86,9 @@ else() + list(APPEND FIZZ_INCLUDE_DIRECTORIES ${LIBEVENT_INCLUDE_DIR}) + endif() + ++find_package(ZLIB REQUIRED) ++list(APPEND FIZZ_SHINY_DEPENDENCIES ZLIB::ZLIB) ++ + set(FIZZ_HEADER_DIRS + base + client diff --git a/vcpkg/ports/fizz/portfile.cmake b/vcpkg/ports/fizz/portfile.cmake new file mode 100644 index 0000000..869dfcd --- /dev/null +++ b/vcpkg/ports/fizz/portfile.cmake @@ -0,0 +1,45 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO facebookincubator/fizz + REF c0bafd67140e8c6f4f585c1077f2fd89102e4582 # v2020.02.03.00 + SHA512 7db706ffdd79f6d753c5530eb67646747d1e7b8b380387f34bd1fc7a06b289a68a6bb4c13faa74e108d4dede72bb2d993d7ad8f60fabcfb3b48abbf4326291c2 + HEAD_REF master + PATCHES + find-zlib.patch +) + +# Prefer installed config files +file(REMOVE + ${SOURCE_PATH}/fizz/cmake/FindGflags.cmake + ${SOURCE_PATH}/fizz/cmake/FindGlog.cmake +) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}/fizz" + PREFER_NINJA + OPTIONS + -DBUILD_TESTS=OFF + -DBUILD_EXAMPLES=OFF + -DINCLUDE_INSTALL_DIR:STRING=include +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/fizz) +vcpkg_copy_pdbs() + +file(READ ${CURRENT_PACKAGES_DIR}/share/fizz/fizz-config.cmake _contents) +string(REPLACE "lib/cmake/fizz" "share/fizz" _contents "${_contents}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/fizz/fizz-config.cmake +"include(CMakeFindDependencyMacro) +find_dependency(folly CONFIG) +find_dependency(ZLIB) +${_contents}") + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include +) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/flann/CONTROL b/vcpkg/ports/flann/CONTROL new file mode 100644 index 0000000..b1aa872 --- /dev/null +++ b/vcpkg/ports/flann/CONTROL @@ -0,0 +1,5 @@ +Source: flann +Version: 2019-04-07-1 +Homepage: https://github.com/mariusmuja/flann +Build-Depends: lz4 +Description: Fast Library for Approximate Nearest Neighbors diff --git a/vcpkg/ports/flann/fix-build-error.patch b/vcpkg/ports/flann/fix-build-error.patch new file mode 100644 index 0000000..f4867cb --- /dev/null +++ b/vcpkg/ports/flann/fix-build-error.patch @@ -0,0 +1,208 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f4b94d2..7ff331a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -146,8 +146,7 @@ if (BUILD_CUDA_LIB) + endif(CUDA_FOUND) + endif(BUILD_CUDA_LIB) + +-find_package(PkgConfig REQUIRED) +-pkg_check_modules(LZ4 REQUIRED liblz4) ++find_package(lz4 REQUIRED) + + #set the C/C++ include path to the "include" directory + include_directories(BEFORE ${PROJECT_SOURCE_DIR}/src/cpp) +diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in +index 6b95a71..778aec4 100644 +--- a/cmake/Config.cmake.in ++++ b/cmake/Config.cmake.in +@@ -3,3 +3,5 @@ + include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake") + check_required_components("flann") + ++include(CMakeFindDependencyMacro) ++find_dependency(lz4) +\ No newline at end of file +diff --git a/cmake/flann_utils.cmake b/cmake/flann_utils.cmake +index afe4742..8aef8e0 100644 +--- a/cmake/flann_utils.cmake ++++ b/cmake/flann_utils.cmake +@@ -1,8 +1,7 @@ + macro(GET_OS_INFO) + string(REGEX MATCH "Linux" OS_IS_LINUX ${CMAKE_SYSTEM_NAME}) +- set(FLANN_LIB_INSTALL_DIR "lib${LIB_SUFFIX}") +- set(FLANN_INCLUDE_INSTALL_DIR +- "include/${PROJECT_NAME_LOWER}-${FLANN_MAJOR_VERSION}.${FLANN_MINOR_VERSION}") ++ set(FLANN_LIB_INSTALL_DIR "lib") ++ set(FLANN_INCLUDE_INSTALL_DIR "include") + endmacro(GET_OS_INFO) + + +diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt +index 3f4655a..bc1d758 100644 +--- a/examples/CMakeLists.txt ++++ b/examples/CMakeLists.txt +@@ -1,9 +1,10 @@ + add_custom_target(examples ALL) + ++find_package(lz4 REQUIRED) + + if (BUILD_C_BINDINGS) + add_executable(flann_example_c flann_example.c) +- target_link_libraries(flann_example_c -Wl,--push-state,--no-as-needed ${LZ4_LIBRARIES} -Wl,--pop-state) ++ target_link_libraries(flann_example_c lz4::lz4) + target_link_libraries(flann_example_c flann) + set_target_properties(flann_example_c PROPERTIES COMPILE_FLAGS -std=c99) + +@@ -15,7 +16,7 @@ if (HDF5_FOUND) + include_directories(${HDF5_INCLUDE_DIR}) + + add_executable(flann_example_cpp flann_example.cpp) +- target_link_libraries(flann_example_cpp -Wl,--push-state,--no-as-needed ${LZ4_LIBRARIES} -Wl,--pop-state) ++ target_link_libraries(flann_example_cpp lz4::lz4) + target_link_libraries(flann_example_cpp ${HDF5_LIBRARIES} flann_cpp) + if (HDF5_IS_PARALLEL) + target_link_libraries(flann_example_cpp ${MPI_LIBRARIES}) +@@ -27,7 +28,7 @@ if (HDF5_FOUND) + + if (USE_MPI AND HDF5_IS_PARALLEL) + add_executable(flann_example_mpi flann_example_mpi.cpp) +- target_link_libraries(flann_example_mpi -Wl,--push-state,--no-as-needed ${LZ4_LIBRARIES} -Wl,--pop-state) ++ target_link_libraries(flann_example_mpi lz4::lz4) + target_link_libraries(flann_example_mpi flann_cpp ${HDF5_LIBRARIES} ${MPI_LIBRARIES} ${Boost_LIBRARIES}) + + add_dependencies(examples flann_example_mpi) +diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt +index b421abb..78f9a64 100644 +--- a/src/cpp/CMakeLists.txt ++++ b/src/cpp/CMakeLists.txt +@@ -1,6 +1,6 @@ + #include_directories(${CMAKE_SOURCE_DIR}/include algorithms ext util nn .) + +-add_definitions(-D_FLANN_VERSION=${FLANN_VERSION}) ++add_definitions(-D_FLANN_VERSION=${FLANN_VERSION} -std=c++11) + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/flann/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/flann/config.h) + +@@ -8,12 +8,11 @@ file(GLOB_RECURSE C_SOURCES flann.cpp) + file(GLOB_RECURSE CPP_SOURCES flann_cpp.cpp) + file(GLOB_RECURSE CU_SOURCES *.cu) + +-add_library(flann_cpp_s STATIC ${CPP_SOURCES}) +-target_link_libraries(flann_cpp_s ${LZ4_LIBRARIES}) +-if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) +- set_target_properties(flann_cpp_s PROPERTIES COMPILE_FLAGS -fPIC) +-endif() +-set_property(TARGET flann_cpp_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC FLANN_USE_CUDA) ++find_package(lz4 REQUIRED) ++set(CMAKE_POSITION_INDEPENDENT_CODE ON) ++add_library(flann_cpp STATIC ${CPP_SOURCES}) ++target_link_libraries(flann_cpp PRIVATE lz4::lz4) ++set_property(TARGET flann_cpp PROPERTY COMPILE_DEFINITIONS FLANN_STATIC) + + if (BUILD_CUDA_LIB) + SET(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-DFLANN_USE_CUDA") +@@ -25,45 +24,9 @@ if (BUILD_CUDA_LIB) + else() + set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};" ) + endif() +- cuda_add_library(flann_cuda_s STATIC ${CU_SOURCES}) +- set_property(TARGET flann_cuda_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC) +-endif() +- +-if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC) +- add_library(flann_cpp SHARED "") +- set_target_properties(flann_cpp PROPERTIES LINKER_LANGUAGE CXX) +- target_link_libraries(flann_cpp -Wl,-whole-archive flann_cpp_s -Wl,-no-whole-archive) +- +- if (BUILD_CUDA_LIB) +- cuda_add_library(flann_cuda SHARED "") +- set_target_properties(flann_cuda PROPERTIES LINKER_LANGUAGE CXX) +- target_link_libraries(flann_cuda -Wl,-whole-archive flann_cuda_s -Wl,-no-whole-archive) +- set_property(TARGET flann_cpp_s PROPERTY COMPILE_DEFINITIONS FLANN_USE_CUDA) +- # target_link_libraries(flann_cuda cudpp_x86_64) +- endif() +-else() +- add_library(flann_cpp SHARED ${CPP_SOURCES}) +- target_link_libraries(flann_cpp -Wl,--push-state,--no-as-needed ${LZ4_LIBRARIES} -Wl,--pop-state) +- # export lz4 headers, so that MSVC to creates flann_cpp.lib +- set_target_properties(flann_cpp PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS YES) +- if (BUILD_CUDA_LIB) +- cuda_add_library(flann_cuda SHARED ${CPP_SOURCES}) +- set_property(TARGET flann_cpp PROPERTY COMPILE_DEFINITIONS FLANN_USE_CUDA) +- endif() +-endif() +- +-set_target_properties(flann_cpp PROPERTIES +- VERSION ${FLANN_VERSION} +- SOVERSION ${FLANN_SOVERSION} +- DEFINE_SYMBOL FLANN_EXPORTS +-) +- +-if (BUILD_CUDA_LIB) +- set_target_properties(flann_cuda PROPERTIES +- VERSION ${FLANN_VERSION} +- SOVERSION ${FLANN_SOVERSION} +- DEFINE_SYMBOL FLANN_EXPORTS +- ) ++ cuda_add_library(flann_cuda STATIC ${CU_SOURCES}) ++ set_property(TARGET flann_cuda PROPERTY COMPILE_DEFINITIONS FLANN_STATIC) ++ set_property(TARGET flann_cpp PROPERTY COMPILE_DEFINITIONS FLANN_USE_CUDA) + endif() + + +@@ -80,6 +43,7 @@ endif() + + + if (BUILD_C_BINDINGS) ++ if (0) + add_library(flann_s STATIC ${C_SOURCES}) + target_link_libraries(flann_s -Wl,--push-state,--no-as-needed ${LZ4_LIBRARIES} -Wl,--pop-state) + if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) +@@ -105,6 +69,10 @@ if (BUILD_C_BINDINGS) + SOVERSION ${FLANN_SOVERSION} + DEFINE_SYMBOL FLANN_EXPORTS + ) ++ endif() ++ add_library(flann STATIC ${C_SOURCES}) ++ target_link_libraries(flann PRIVATE lz4::lz4) ++ set_property(TARGET flann PROPERTY COMPILE_DEFINITIONS FLANN_STATIC) + endif() + + if(WIN32) +@@ -118,9 +86,9 @@ endif(WIN32) + + + install ( +- TARGETS flann_cpp flann_cpp_s ++ TARGETS flann_cpp + EXPORT ${targets_export_name} +- INCLUDES DESTINATION include ++ INCLUDES DESTINATION ${FLANN_INCLUDE_INSTALL_DIR} + RUNTIME DESTINATION bin + LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR} + ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR} +@@ -128,9 +96,9 @@ install ( + + if (BUILD_CUDA_LIB) + install ( +- TARGETS flann_cuda flann_cuda_s ++ TARGETS flann_cuda + EXPORT ${targets_export_name} +- INCLUDES DESTINATION include ++ INCLUDES DESTINATION ${FLANN_INCLUDE_INSTALL_DIR} + RUNTIME DESTINATION bin + LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR} + ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR} +@@ -139,9 +107,9 @@ endif() + + if (BUILD_C_BINDINGS) + install ( +- TARGETS flann flann_s ++ TARGETS flann + EXPORT ${targets_export_name} +- INCLUDES DESTINATION include ++ INCLUDES DESTINATION ${FLANN_INCLUDE_INSTALL_DIR} + RUNTIME DESTINATION bin + LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR} + ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR} diff --git a/vcpkg/ports/flann/portfile.cmake b/vcpkg/ports/flann/portfile.cmake new file mode 100644 index 0000000..ec96372 --- /dev/null +++ b/vcpkg/ports/flann/portfile.cmake @@ -0,0 +1,37 @@ +include(vcpkg_common_functions) + +#the port uses inside the CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS, which is discouraged by vcpkg. +#Since it's its author choice, we should not disallow it, but unfortunately looks like it's broken, so we block it anyway... +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mariusmuja/flann + REF 1d04523268c388dabf1c0865d69e1b638c8c7d9d + SHA512 61e322222c2daa0b9677095e5ca231cba7c305ce754ad8e659eee350111c1e04351181c3af04e45ab6e5c9edea49c7b9ec6499bb0dbc080b87af36eb11c6ef7c + HEAD_REF master + PATCHES fix-build-error.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DBUILD_EXAMPLES=OFF + -DBUILD_TESTS=OFF + -DBUILD_DOC=OFF + -DBUILD_PYTHON_BINDINGS=OFF + -DBUILD_MATLAB_BINDINGS=OFF + -DCMAKE_DEBUG_POSTFIX=d + -DHDF5_NO_FIND_PACKAGE_CONFIG_FILE=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/flann) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/flann/COPYING ${CURRENT_PACKAGES_DIR}/share/flann/copyright) diff --git a/vcpkg/ports/flatbuffers/CONTROL b/vcpkg/ports/flatbuffers/CONTROL new file mode 100644 index 0000000..5433a05 --- /dev/null +++ b/vcpkg/ports/flatbuffers/CONTROL @@ -0,0 +1,5 @@ +Source: flatbuffers +Version: 1.12.0 +Description: Memory Efficient Serialization Library + FlatBuffers is an efficient cross platform serialization library for games and other memory constrained apps. It allows you to directly access serialized data without unpacking/parsing it first, while still having great forwards/backwards compatibility. +Homepage: https://google.github.io/flatbuffers/ diff --git a/vcpkg/ports/flatbuffers/fix-uwp-build.patch b/vcpkg/ports/flatbuffers/fix-uwp-build.patch new file mode 100644 index 0000000..5716f8a --- /dev/null +++ b/vcpkg/ports/flatbuffers/fix-uwp-build.patch @@ -0,0 +1,20 @@ +diff --git a/src/util.cpp b/src/util.cpp +index c1bb197..658e116 100644 +--- a/src/util.cpp ++++ b/src/util.cpp +@@ -245,9 +245,15 @@ bool ReadEnvironmentVariable(const char *var_name, std::string *_value) { + #ifdef _MSC_VER + __pragma(warning(disable : 4996)); // _CRT_SECURE_NO_WARNINGS + #endif ++#if _WIN32_WINNT < 0x0A00 + auto env_str = std::getenv(var_name); + if (!env_str) return false; + if (_value) *_value = std::string(env_str); ++#else ++ //There is no support for environment variables in UWP ++ var_name; // Do nothing ++ *_value = std::string(""); ++#endif + return true; + } + diff --git a/vcpkg/ports/flatbuffers/ignore_use_of_cmake_toolchain_file.patch b/vcpkg/ports/flatbuffers/ignore_use_of_cmake_toolchain_file.patch new file mode 100644 index 0000000..38e1f12 --- /dev/null +++ b/vcpkg/ports/flatbuffers/ignore_use_of_cmake_toolchain_file.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 119855a..945085a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -155,7 +155,7 @@ set(FlatBuffers_GRPCTest_SRCS + # source_group(Compiler FILES ${FlatBuffers_Compiler_SRCS}) + # source_group(Tests FILES ${FlatBuffers_Tests_SRCS}) + +-if(EXISTS "${CMAKE_TOOLCHAIN_FILE}") ++if(EXISTS "${CMAKE_TOOLCHAIN_FILE}" AND NOT DEFINED VCPKG_TOOLCHAIN) + # do not apply any global settings if the toolchain + # is being configured externally + message(STATUS "Using toolchain file: ${CMAKE_TOOLCHAIN_FILE}.") diff --git a/vcpkg/ports/flatbuffers/no-werror.patch b/vcpkg/ports/flatbuffers/no-werror.patch new file mode 100644 index 0000000..b354e22 --- /dev/null +++ b/vcpkg/ports/flatbuffers/no-werror.patch @@ -0,0 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 119855a..6269362 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -172,13 +172,17 @@ elseif(CMAKE_COMPILER_IS_GNUCXX) + "${CMAKE_CXX_FLAGS} -std=c++0x") + endif(CYGWIN) + set(CMAKE_CXX_FLAGS +- "${CMAKE_CXX_FLAGS} -Wall -pedantic -Werror -Wextra -Werror=shadow") ++ "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Werror=shadow") + set(FLATBUFFERS_PRIVATE_CXX_FLAGS "-Wold-style-cast") + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.4) + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0) + set(CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -faligned-new -Werror=implicit-fallthrough=2") + endif() ++ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0) ++ set(CMAKE_CXX_FLAGS ++ "${CMAKE_CXX_FLAGS} -Wextra") ++ endif() + set(CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -Wunused-result -Werror=unused-result -Wunused-parameter -Werror=unused-parameter") + endif() diff --git a/vcpkg/ports/flatbuffers/portfile.cmake b/vcpkg/ports/flatbuffers/portfile.cmake new file mode 100644 index 0000000..1c3cf66 --- /dev/null +++ b/vcpkg/ports/flatbuffers/portfile.cmake @@ -0,0 +1,48 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/flatbuffers + REF v1.12.0 + SHA512 8a0b88d739fa4694a69d3630140fe89fdd70d50bba4dadd1758d9aa2920cda16700bcafb8d89fe2a09ac907d3f378240c3cb4abc7106318136799836aba4b063 + HEAD_REF master + PATCHES + ignore_use_of_cmake_toolchain_file.patch + no-werror.patch + fix-uwp-build.patch +) + +set(OPTIONS) +if(VCPKG_TARGET_IS_UWP) + list(APPEND OPTIONS -DFLATBUFFERS_BUILD_FLATC=OFF -DFLATBUFFERS_BUILD_FLATHASH=OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFLATBUFFERS_BUILD_TESTS=OFF + -DFLATBUFFERS_BUILD_GRPCTEST=OFF + ${OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/flatbuffers) + +file(GLOB flatc_path ${CURRENT_PACKAGES_DIR}/bin/flatc*) +if(flatc_path) + make_directory(${CURRENT_PACKAGES_DIR}/tools/flatbuffers) + get_filename_component(flatc_executable ${flatc_path} NAME) + file( + RENAME + ${flatc_path} + ${CURRENT_PACKAGES_DIR}/tools/flatbuffers/${flatc_executable} + ) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/flatbuffers) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/flint/CONTROL b/vcpkg/ports/flint/CONTROL new file mode 100644 index 0000000..cac9d25 --- /dev/null +++ b/vcpkg/ports/flint/CONTROL @@ -0,0 +1,5 @@ +Source: flint +Version: 2.5.2-4 +Homepage: https://www.flintlib.org/ +Description: Fast Library for Number Theory +Build-Depends: mpir, mpfr, pthreads, gettimeofday diff --git a/vcpkg/ports/flint/dll_flint.patch b/vcpkg/ports/flint/dll_flint.patch new file mode 100644 index 0000000..c8cecb7 --- /dev/null +++ b/vcpkg/ports/flint/dll_flint.patch @@ -0,0 +1,76 @@ +diff --git a/build.vc14/dll_flint/dll_flint.vcxproj b/build.vc14/dll_flint/dll_flint.vcxproj +index 3c8edd3..5c861d2 100644 +--- a/build.vc14/dll_flint/dll_flint.vcxproj ++++ b/build.vc14/dll_flint/dll_flint.vcxproj +@@ -81,7 +81,7 @@ + + Full + true +- ..\;..\..\;..\..\..\mpir\dll\$(IntDir);..\..\..\mpfr\dll\$(IntDir);..\..\..\pthreads\dll\$(IntDir); ++ ..\;..\..\;@NATIVE_INSTALLED_DIR@\include + NDEBUG;WIN32;HAVE_CONFIG_H;MSC_BUILD_DLL;PTW32_BUILD;FLINT_REENTRANT=0;HAVE_TLS=1;%(PreprocessorDefinitions) + MultiThreadedDLL + $(TargetDir)$(TargetName).pdb +@@ -90,7 +90,7 @@ + + true + true +- ..\..\..\mpir\dll\$(IntDir)mpir.lib;..\..\..\mpfr\dll\$(IntDir)mpfr.lib;..\..\..\pthreads\dll\$(IntDir)pthreads.lib;%(AdditionalDependencies) ++ @NATIVE_INSTALLED_DIR@\lib\mpir.lib;@NATIVE_INSTALLED_DIR@\lib\mpfr.lib;@NATIVE_INSTALLED_DIR@\lib\pthreadVC3.lib;%(AdditionalDependencies) + + + postbuild $(IntDir) DLL +@@ -105,7 +105,7 @@ + + Disabled + true +- ..\;..\..\;..\..\..\mpir\dll\$(IntDir);..\..\..\mpfr\dll\$(IntDir);..\..\..\pthreads\dll\$(IntDir); ++ ..\;..\..\;@NATIVE_INSTALLED_DIR@\include + _DEBUG;WIN32;HAVE_CONFIG_H;MSC_BUILD_DLL;PTW32_BUILD;FLINT_REENTRANT=0;HAVE_TLS=1;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + $(TargetDir)$(TargetName).pdb +@@ -114,7 +114,7 @@ + + true + true +- ..\..\..\mpir\dll\$(IntDir)mpir.lib;..\..\..\mpfr\dll\$(IntDir)mpfr.lib;..\..\..\pthreads\dll\$(IntDir)pthreads.lib;%(AdditionalDependencies) ++ @NATIVE_INSTALLED_DIR@\lib\mpir.lib;@NATIVE_INSTALLED_DIR@\lib\mpfr.lib;@NATIVE_INSTALLED_DIR@\lib\pthreadVC3.lib;%(AdditionalDependencies) + + + postbuild $(IntDir) DLL +@@ -129,7 +129,7 @@ + + Full + true +- ..\;..\..\;..\..\..\mpir\dll\$(IntDir);..\..\..\mpfr\dll\$(IntDir);..\..\..\pthreads\dll\$(IntDir); ++ ..\;..\..\;@NATIVE_INSTALLED_DIR@\include + NDEBUG;WIN32;HAVE_CONFIG_H;MSC_BUILD_DLL;PTW32_BUILD;FLINT_REENTRANT=0;HAVE_TLS=1;_WIN64;%(PreprocessorDefinitions) + MultiThreadedDLL + $(TargetDir)$(TargetName).pdb +@@ -138,7 +138,7 @@ + + true + true +- ..\..\..\mpir\dll\$(IntDir)mpir.lib;..\..\..\mpfr\dll\$(IntDir)mpfr.lib;..\..\..\pthreads\dll\$(IntDir)pthreads.lib;%(AdditionalDependencies) ++ @NATIVE_INSTALLED_DIR@\lib\mpir.lib;@NATIVE_INSTALLED_DIR@\lib\mpfr.lib;@NATIVE_INSTALLED_DIR@\lib\pthreadVC3.lib;%(AdditionalDependencies) + + + postbuild $(IntDir) DLL +@@ -153,7 +153,7 @@ + + Disabled + true +- ..\;..\..\;..\..\..\mpir\dll\$(IntDir);..\..\..\mpfr\dll\$(IntDir);..\..\..\pthreads\dll\$(IntDir); ++ ..\;..\..\;@NATIVE_INSTALLED_DIR@\include + _DEBUG;WIN32;HAVE_CONFIG_H;MSC_BUILD_DLL;PTW32_BUILD;FLINT_REENTRANT=0;HAVE_TLS=1;_WIN64;%(PreprocessorDefinitions) + MultiThreadedDebugDLL + $(TargetDir)$(TargetName).pdb +@@ -162,7 +162,7 @@ + + true + true +- ..\..\..\mpir\dll\$(IntDir)mpir.lib;..\..\..\mpfr\dll\$(IntDir)mpfr.lib;..\..\..\pthreads\dll\$(IntDir)pthreads.lib;%(AdditionalDependencies) ++ @NATIVE_INSTALLED_DIR@\lib\mpir.lib;@NATIVE_INSTALLED_DIR@\lib\mpfr.lib;@NATIVE_INSTALLED_DIR@\lib\pthreadVC3.lib;%(AdditionalDependencies) + + + postbuild $(IntDir) DLL diff --git a/vcpkg/ports/flint/lib_flint.patch b/vcpkg/ports/flint/lib_flint.patch new file mode 100644 index 0000000..3d0a4ca --- /dev/null +++ b/vcpkg/ports/flint/lib_flint.patch @@ -0,0 +1,40 @@ +diff --git a/build.vc14/lib_flint/lib_flint.vcxproj b/build.vc14/lib_flint/lib_flint.vcxproj +index c6bd44c0..197d7723 100644 +--- a/build.vc14/lib_flint/lib_flint.vcxproj ++++ b/build.vc14/lib_flint/lib_flint.vcxproj +@@ -81,7 +81,7 @@ + + Full + true +- ..\;..\..\;..\..\..\mpir\lib\$(IntDir);..\..\..\mpfr\lib\$(IntDir);..\..\..\pthreads\lib\$(IntDir) ++ ..\;..\..\;@NATIVE_INSTALLED_DIR@\include + NDEBUG;WIN32;_LIB;HAVE_CONFIG_H;PTW32_STATIC_LIB;FLINT_REENTRANT=0;HAVE_TLS=1;%(PreprocessorDefinitions) + MultiThreaded + $(TargetDir)$(TargetName).pdb +@@ -100,7 +100,7 @@ + + Disabled + true +- ..\;..\..\;..\..\..\mpir\lib\$(IntDir);..\..\..\mpfr\lib\$(IntDir);..\..\..\pthreads\lib\$(IntDir) ++ ..\;..\..\;@NATIVE_INSTALLED_DIR@\include + _DEBUG;WIN32;_LIB;HAVE_CONFIG_H;PTW32_STATIC_LIB;FLINT_REENTRANT=0;HAVE_TLS=1;%(PreprocessorDefinitions) + MultiThreadedDebug + $(TargetDir)$(TargetName).pdb +@@ -119,7 +119,7 @@ + + Full + true +- ..\;..\..\;..\..\..\mpir\lib\$(IntDir);..\..\..\mpfr\lib\$(IntDir);..\..\..\pthreads\lib\$(IntDir) ++ ..\;..\..\;@NATIVE_INSTALLED_DIR@\include + NDEBUG;WIN32;_LIB;HAVE_CONFIG_H;PTW32_STATIC_LIB;FLINT_REENTRANT=0;HAVE_TLS=1;_WIN64;%(PreprocessorDefinitions) + MultiThreaded + $(TargetDir)$(TargetName).pdb +@@ -138,7 +138,7 @@ + + Disabled + true +- ..\;..\..\;..\..\..\mpir\lib\$(IntDir);..\..\..\mpfr\lib\$(IntDir);..\..\..\pthreads\lib\$(IntDir) ++ ..\;..\..\;@NATIVE_INSTALLED_DIR@\include + _DEBUG;WIN32;_LIB;HAVE_CONFIG_H;PTW32_STATIC_LIB;FLINT_REENTRANT=0;HAVE_TLS=1;_WIN64;%(PreprocessorDefinitions) + MultiThreadedDebug + $(TargetDir)$(TargetName).pdb diff --git a/vcpkg/ports/flint/portfile.cmake b/vcpkg/ports/flint/portfile.cmake new file mode 100644 index 0000000..a602276 --- /dev/null +++ b/vcpkg/ports/flint/portfile.cmake @@ -0,0 +1,111 @@ +include(vcpkg_common_functions) + +set(FLINT_VERSION 2.5.2) +set(FLINT_HASH "8606b369af505d5fcedd05d95fcd04afac2a916fc5291501c56785891cfdb2f9bc98700b2d05afd1d9482fb96df2a8c8bf1cd0e5696df46775df9fa743eb900b") + +vcpkg_download_distfile(ARCHIVE + URLS "http://www.flintlib.org/flint-${FLINT_VERSION}.zip" + FILENAME "flint-${FLINT_VERSION}.zip" + SHA512 ${FLINT_HASH} +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + lib_flint.patch + dll_flint.patch +) + +set(MSVC_VERSION 14) + +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) +file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) +file(COPY ${SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) +get_filename_component(SOURCE_DIR_NAME "${SOURCE_PATH}" NAME) + +# Use fresh copy of sources for building and modification +set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${SOURCE_DIR_NAME}") + +file(TO_NATIVE_PATH ${CURRENT_INSTALLED_DIR} NATIVE_INSTALLED_DIR) +configure_file( + "${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_flint/dll_flint.vcxproj" "${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_flint/dll_flint.vcxproj" @ONLY +) +configure_file( + "${SOURCE_PATH}/build.vc${MSVC_VERSION}/lib_flint/lib_flint.vcxproj" "${SOURCE_PATH}/build.vc${MSVC_VERSION}/lib_flint/lib_flint.vcxproj" @ONLY +) + +file(RENAME "${SOURCE_PATH}/fmpz-conversions-gc.in" "${SOURCE_PATH}/fmpz-conversions.h") + +IF (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") + file(RENAME "${SOURCE_PATH}/fft_tuning32.in" "${SOURCE_PATH}/fft_tuning.h") +ELSE() + file(RENAME "${SOURCE_PATH}/fft_tuning64.in" "${SOURCE_PATH}/fft_tuning.h") +ENDIF() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_flint/dll_flint.vcxproj + ) +else() + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/build.vc${MSVC_VERSION}/lib_flint/lib_flint.vcxproj + ) +endif() + +IF (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") + SET(BUILD_ARCH "Win32") +ELSE() + SET(BUILD_ARCH ${VCPKG_TARGET_ARCHITECTURE}) +ENDIF() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(GLOB FLINT_HEADERS "${SOURCE_PATH}/dll/${BUILD_ARCH}/Release/*.h") + file(INSTALL + ${FLINT_HEADERS} + DESTINATION ${CURRENT_PACKAGES_DIR}/include/flint + ) + file(INSTALL + ${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_flint/${BUILD_ARCH}/Release/dll_flint.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) + file(INSTALL + ${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_flint/${BUILD_ARCH}/Debug/dll_flint.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) + file(INSTALL + ${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_flint/${BUILD_ARCH}/Release/dll_flint.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + RENAME flint.lib + ) + file(INSTALL + ${SOURCE_PATH}/build.vc${MSVC_VERSION}/dll_flint/${BUILD_ARCH}/Debug/dll_flint.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + RENAME flint.lib + ) + vcpkg_copy_pdbs() +else() + file(GLOB FLINT_HEADERS "${SOURCE_PATH}/lib/${BUILD_ARCH}/Release/*.h") + file(INSTALL + ${FLINT_HEADERS} + DESTINATION ${CURRENT_PACKAGES_DIR}/include/flint + ) + file(INSTALL + ${SOURCE_PATH}/build.vc${MSVC_VERSION}/lib_flint/${BUILD_ARCH}/Release/lib_flint.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + RENAME flint.lib + ) + file(INSTALL + ${SOURCE_PATH}/build.vc${MSVC_VERSION}/lib_flint/${BUILD_ARCH}/Debug/lib_flint.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + RENAME flint.lib + ) +endif() + +file(INSTALL + ${SOURCE_PATH}/gpl-2.0.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/flint + RENAME copyright +) + +message(STATUS "Installing done") diff --git a/vcpkg/ports/fltk/CONTROL b/vcpkg/ports/fltk/CONTROL new file mode 100644 index 0000000..c6db1c1 --- /dev/null +++ b/vcpkg/ports/fltk/CONTROL @@ -0,0 +1,6 @@ +Source: fltk +Version: 1.3.5 +Port-Version: 3 +Homepage: https://www.fltk.org/ +Description: FLTK (pronounced fulltick) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. FLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL and its built-in GLUT emulation. +Build-Depends: zlib, libpng, libjpeg-turbo diff --git a/vcpkg/ports/fltk/add-link-libraries.patch b/vcpkg/ports/fltk/add-link-libraries.patch new file mode 100644 index 0000000..547c971 --- /dev/null +++ b/vcpkg/ports/fltk/add-link-libraries.patch @@ -0,0 +1,13 @@ +diff --git a/CMake/macros.cmake b/CMake/macros.cmake +index 4def62d..27b4901 100644 +--- a/CMake/macros.cmake ++++ b/CMake/macros.cmake +@@ -67,6 +67,8 @@ macro(FL_ADD_LIBRARY LIBNAME LIBTYPE LIBFILES) + COMPILE_DEFINITIONS "FL_DLL" + ) + endif (${LIBTYPE} STREQUAL "SHARED") ++ ++ target_link_libraries(${LIBRARY_NAME} gdi32 gdiplus user32 advapi32 ole32 shell32 comdlg32) + endif (MSVC) + + install(TARGETS ${LIBRARY_NAME} diff --git a/vcpkg/ports/fltk/config-path.patch b/vcpkg/ports/fltk/config-path.patch new file mode 100644 index 0000000..b308f75 --- /dev/null +++ b/vcpkg/ports/fltk/config-path.patch @@ -0,0 +1,13 @@ +diff --git a/CMake/setup.cmake b/CMake/setup.cmake +index 4d960a5..194887d 100644 +--- a/CMake/setup.cmake ++++ b/CMake/setup.cmake +@@ -88,6 +88,8 @@ else() + set(FLTK_CONFIG_PATH ${FLTK_DATADIR}/fltk) + endif(WIN32 AND NOT CYGWIN) + ++set(FLTK_CONFIG_PATH share/fltk) ++ + include(TestBigEndian) + TEST_BIG_ENDIAN(WORDS_BIGENDIAN) + diff --git a/vcpkg/ports/fltk/findlibsfix.patch b/vcpkg/ports/fltk/findlibsfix.patch new file mode 100644 index 0000000..6c2a715 --- /dev/null +++ b/vcpkg/ports/fltk/findlibsfix.patch @@ -0,0 +1,51 @@ +diff --git a/CMake/resources.cmake b/CMake/resources.cmake +index 37c0c08..b1f52d1 100644 +--- a/CMake/resources.cmake ++++ b/CMake/resources.cmake +@@ -26,10 +26,10 @@ find_file(HAVE_DLFCN_H dlfcn.h) + find_file(HAVE_FREETYPE_H freetype.h PATH_SUFFIXES freetype2 freetype2/freetype) + find_file(HAVE_GL_GL_H GL/gl.h) + find_file(HAVE_GL_GLU_H GL/glu.h) +-find_file(HAVE_LIBPNG_PNG_H libpng/png.h) ++#find_file(HAVE_LIBPNG_PNG_H libpng/png.h) + find_file(HAVE_LOCALE_H locale.h) + find_file(HAVE_OPENGL_GLU_H OpenGL/glu.h) +-find_file(HAVE_PNG_H png.h) ++#find_file(HAVE_PNG_H png.h) + find_file(HAVE_PTHREAD_H pthread.h) + find_file(HAVE_STDIO_H stdio.h) + find_file(HAVE_STRINGS_H strings.h) +@@ -38,6 +38,17 @@ find_file(HAVE_SYS_STDTYPES_H sys/stdtypes.h) + find_file(HAVE_X11_XREGION_H X11/Xregion.h) + find_path(HAVE_XDBE_H Xdbe.h PATH_SUFFIXES X11/extensions extensions) + ++find_package(PNG REQUIRED) ++if(PNG_FOUND) ++ set(LIB_png ${PNG_LIBRARIES}) ++ set(HAVE_PNG_H ${PNG_FOUND}) ++ ++endif() ++find_package(ZLIB REQUIRED) ++if(ZLIB_FOUND) ++ set(LIB_zlib ${ZLIB_LIBRARIES}) ++endif() ++ + if (MSVC) + message(STATUS "Note: The following three headers should all be found!") + message(STATUS "HAVE_GL_GL_H = '${HAVE_GL_GL_H}'") +@@ -92,12 +103,12 @@ find_library(LIB_freetype freetype) + find_library(LIB_GL GL) + find_library(LIB_MesaGL MesaGL) + find_library(LIB_jpeg jpeg) +-find_library(LIB_png png) +-find_library(LIB_zlib z) ++#find_library(LIB_png png) ++#find_library(LIB_zlib z) + + mark_as_advanced(LIB_CAIRO LIB_dl LIB_fontconfig LIB_freetype) + mark_as_advanced(LIB_GL LIB_MesaGL) +-mark_as_advanced(LIB_jpeg LIB_png LIB_zlib) ++mark_as_advanced(LIB_jpeg) + + ####################################################################### + # functions diff --git a/vcpkg/ports/fltk/include.patch b/vcpkg/ports/fltk/include.patch new file mode 100644 index 0000000..27207fd --- /dev/null +++ b/vcpkg/ports/fltk/include.patch @@ -0,0 +1,13 @@ +diff --git a/CMake/macros.cmake b/CMake/macros.cmake +index ca03371..bde2c7e 100644 +--- a/CMake/macros.cmake ++++ b/CMake/macros.cmake +@@ -36,6 +36,8 @@ macro(FL_ADD_LIBRARY LIBNAME LIBTYPE LIBFILES) + + add_library(${LIBRARY_NAME} ${LIBTYPE} ${LIBFILES}) + ++ target_include_directories(${LIBRARY_NAME} PUBLIC $) ++ + set_target_properties(${LIBRARY_NAME} + PROPERTIES + OUTPUT_NAME ${LIBRARY_NAME} diff --git a/vcpkg/ports/fltk/portfile.cmake b/vcpkg/ports/fltk/portfile.cmake new file mode 100644 index 0000000..1721c90 --- /dev/null +++ b/vcpkg/ports/fltk/portfile.cmake @@ -0,0 +1,77 @@ +vcpkg_download_distfile(ARCHIVE + URLS "https://fltk.org/pub/fltk/1.3.5/fltk-1.3.5-source.tar.gz" + FILENAME "fltk-1.3.5.tar.gz" + SHA512 db7ea7c5f3489195a48216037b9371a50f1119ae7692d66f71b6711e5ccf78814670581bae015e408dee15c4bba921728309372c1cffc90113cdc092e8540821 +) + +# FLTK has many improperly shared global variables that get duplicated into every DLL +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + findlibsfix.patch + add-link-libraries.patch + config-path.patch + include.patch +) + +if (VCPKG_TARGET_ARCHITECTURE MATCHES "arm" OR VCPKG_TARGET_ARCHITECTURE MATCHES "arm64") + set(OPTION_USE_GL "-DOPTION_USE_GL=OFF") +else() + set(OPTION_USE_GL "-DOPTION_USE_GL=ON") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DOPTION_BUILD_EXAMPLES=OFF + -DOPTION_LARGE_FILE=ON + -DOPTION_USE_THREADS=ON + -DOPTION_USE_SYSTEM_ZLIB=ON + -DOPTION_USE_SYSTEM_LIBPNG=ON + -DOPTION_USE_SYSTEM_LIBJPEG=ON + -DOPTION_BUILD_SHARED_LIBS=OFF + -DFLTK_CONFIG_PATH=share/fltk + ${OPTION_USE_GL} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/fltk) + +if(VCPKG_TARGET_IS_OSX) + vcpkg_copy_tools(TOOL_NAMES fluid.app fltk-config AUTO_CLEAN) +elseif(VCPKG_TARGET_IS_WINDOWS) + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/fltk-config ${CURRENT_PACKAGES_DIR}/debug/bin/fltk-config) + vcpkg_copy_tools(TOOL_NAMES fluid AUTO_CLEAN) +else() + vcpkg_copy_tools(TOOL_NAMES fluid fltk-config AUTO_CLEAN) +endif() + +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/bin + ${CURRENT_PACKAGES_DIR}/bin + ) +endif() +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +foreach(FILE Fl_Export.H fl_utf8.h) + file(READ ${CURRENT_PACKAGES_DIR}/include/FL/${FILE} FLTK_HEADER) + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + string(REPLACE "defined(FL_DLL)" "0" FLTK_HEADER "${FLTK_HEADER}") + else() + string(REPLACE "defined(FL_DLL)" "1" FLTK_HEADER "${FLTK_HEADER}") + endif() + file(WRITE ${CURRENT_PACKAGES_DIR}/include/FL/${FILE} "${FLTK_HEADER}") +endforeach() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/fluidlite/CONTROL b/vcpkg/ports/fluidlite/CONTROL new file mode 100644 index 0000000..b591dcf --- /dev/null +++ b/vcpkg/ports/fluidlite/CONTROL @@ -0,0 +1,4 @@ +Source: fluidlite +Version: 2020-08-27 +Homepage: https://github.com/divideconcept/FluidLite +Description: FluidLite is a very light version of FluidSynth designed to be hardware, platform and external dependency independant. diff --git a/vcpkg/ports/fluidlite/portfile.cmake b/vcpkg/ports/fluidlite/portfile.cmake new file mode 100644 index 0000000..707fcd7 --- /dev/null +++ b/vcpkg/ports/fluidlite/portfile.cmake @@ -0,0 +1,31 @@ +if(EXISTS "${CURRENT_INSTALLED_DIR}/include/fluidsynth/settings.h") + message(FATAL_ERROR "Can't build fluidlite if fluidsynth is installed. Please remove fluidsynth, and try to install fluidlite again if you need it.") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO divideconcept/FluidLite + REF fdd05bad03cdb24d1f78b5fe3453842890c1b0e8 + SHA512 8118bec2cb5ee48b8064ed2111610f1917ee8e6f1dc213121b2311d056da21d7f618ef50735e7653d2cccf1e96652f3ccf026101fccb9863448008918add53e0 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" FLUIDLITE_BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" FLUIDLITE_BUILD_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFLUIDLITE_BUILD_STATIC=${FLUIDLITE_BUILD_STATIC} + -DFLUIDLITE_BUILD_SHARED=${FLUIDLITE_BUILD_SHARED} + -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON +) + +vcpkg_install_cmake() + +# Remove unnecessary files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/fluidsynth/CONTROL b/vcpkg/ports/fluidsynth/CONTROL new file mode 100644 index 0000000..470dc2c --- /dev/null +++ b/vcpkg/ports/fluidsynth/CONTROL @@ -0,0 +1,5 @@ +Source: fluidsynth +Version: 2.1.4 +Homepage: https://github.com/FluidSynth/fluidsynth +Description: FluidSynth reads and handles MIDI events from the MIDI input device. It is the software analogue of a MIDI synthesizer. FluidSynth can also play midifiles using a Soundfont. +Build-Depends: glib \ No newline at end of file diff --git a/vcpkg/ports/fluidsynth/force-x86-gentables.patch b/vcpkg/ports/fluidsynth/force-x86-gentables.patch new file mode 100644 index 0000000..7f909ec --- /dev/null +++ b/vcpkg/ports/fluidsynth/force-x86-gentables.patch @@ -0,0 +1,38 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 356bb73..b4c43d7 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -410,14 +410,23 @@ set (GENTAB_BDIR ${CMAKE_CURRENT_BINARY_DIR}/gentables) + # To fix cross-compiling fluidsynth from Win32 to ARM (using vcpkg), we need to pass the current generator + # on to the external project, otherwise (for some unknown reason) the target compiler will be used rather + # than the host compiler. +-ExternalProject_Add(gentables +- DOWNLOAD_COMMAND "" +- SOURCE_DIR ${GENTAB_SDIR} +- BINARY_DIR ${GENTAB_BDIR} +- CONFIGURE_COMMAND +- "${CMAKE_COMMAND}" -DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE_MAKEFILE} -G "${CMAKE_GENERATOR}" -B "${GENTAB_BDIR}" "${GENTAB_SDIR}" +- BUILD_COMMAND +- "${CMAKE_COMMAND}" --build "${GENTAB_BDIR}" +- INSTALL_COMMAND ${GENTAB_BDIR}/make_tables.exe "${CMAKE_BINARY_DIR}/" +-) ++if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm OR VCPKG_TARGET_ARCHITECTURE STREQUAL arm64) ++ ExternalProject_Add(gentables ++ DOWNLOAD_COMMAND "" ++ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/gentables ++ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/gentables ++ CONFIGURE_COMMAND ++ "${CMAKE_COMMAND}" "${CMAKE_CURRENT_SOURCE_DIR}/gentables" -G "${CMAKE_GENERATOR}" -A Win32 -B "${CMAKE_CURRENT_BINARY_DIR}/gentables" ++ BUILD_COMMAND ++ "${CMAKE_COMMAND}" --build "${CMAKE_CURRENT_BINARY_DIR}/gentables" ++ INSTALL_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/gentables/make_tables.exe "${CMAKE_BINARY_DIR}/" ++ ) ++else() ++ ExternalProject_Add(gentables ++ DOWNLOAD_COMMAND "" ++ SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/gentables ++ BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/gentables ++ INSTALL_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/gentables/make_tables.exe "${CMAKE_BINARY_DIR}/" ++ ) ++endif() + add_dependencies(libfluidsynth-OBJ gentables) diff --git a/vcpkg/ports/fluidsynth/portfile.cmake b/vcpkg/ports/fluidsynth/portfile.cmake new file mode 100644 index 0000000..fed30db --- /dev/null +++ b/vcpkg/ports/fluidsynth/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO FluidSynth/fluidsynth + REF 2393aef3bd0b4e78084cfe16735d402bc1497edd #v2.1.4 + SHA512 181914f883982d931dfa4d8c0d0391fb91fbf3448e1eb1ea1541c938d874d7611066e7e289859d83b610a85ba089463e0a93f77db5a6253349f6b328a7373dc6 + HEAD_REF master + PATCHES + force-x86-gentables.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -Denable-pkgconfig=0 +) + +vcpkg_install_cmake() + +# Copy fluidsynth.exe to tools dir +vcpkg_copy_tools(TOOL_NAMES fluidsynth AUTO_CLEAN) + +# Remove unnecessary files +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 ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/fmem/CONTROL b/vcpkg/ports/fmem/CONTROL new file mode 100644 index 0000000..25f2465 --- /dev/null +++ b/vcpkg/ports/fmem/CONTROL @@ -0,0 +1,3 @@ +Source: fmem +Version: c-libs-2ccee3d2fb +Description: A cross-platform library for opening memory-backed libc streams. diff --git a/vcpkg/ports/fmem/portfile.cmake b/vcpkg/ports/fmem/portfile.cmake new file mode 100644 index 0000000..b3b5faa --- /dev/null +++ b/vcpkg/ports/fmem/portfile.cmake @@ -0,0 +1,25 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO c-libs/fmem + REF 2ccee3d2fb2fc72370a9bb2131bfc9167e0d9022 + SHA512 4a63332eb5df7f30bdad9e4233171b5c21dd2b092e525e9dcc4f602295ffff50c555c80fd74d964bc3daeffd8001a9b852f1769ef3161259dd8a3cae3ca3a4df + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/fmem RENAME copyright) diff --git a/vcpkg/ports/fmi4cpp/CONTROL b/vcpkg/ports/fmi4cpp/CONTROL new file mode 100644 index 0000000..20f8f64 --- /dev/null +++ b/vcpkg/ports/fmi4cpp/CONTROL @@ -0,0 +1,15 @@ +Source: fmi4cpp +Version: 0.7.0-2 +Homepage: https://github.com/NTNU-IHB/FMI4cpp +Description: FMI 2.0 implementation written in modern C++ +Build-Depends: boost-property-tree, libzip[openssl] + +Feature: curl +Build-Depends: curl +Description: Allows loading FMUs from URL + +Feature: odeint +Build-Depends: boost-ublas, boost-odeint +Description: Adds support for wrapping Model Exchange models as Co-simulation models using odeint solvers + + diff --git a/vcpkg/ports/fmi4cpp/fix-build_error.patch b/vcpkg/ports/fmi4cpp/fix-build_error.patch new file mode 100644 index 0000000..ef0950e --- /dev/null +++ b/vcpkg/ports/fmi4cpp/fix-build_error.patch @@ -0,0 +1,25 @@ +diff --git a/include/fmi4cpp/fmu_resource.hpp b/include/fmi4cpp/fmu_resource.hpp +index 98f2067..8e88dcf 100644 +--- a/include/fmi4cpp/fmu_resource.hpp ++++ b/include/fmi4cpp/fmu_resource.hpp +@@ -24,6 +24,7 @@ + + #ifndef FMI4CPP_FMURESOURCE_HPP + #define FMI4CPP_FMURESOURCE_HPP ++#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING + + #include + #include +diff --git a/src/fmi2/fmu.cpp b/src/fmi2/fmu.cpp +index a0d5f75..bd01487 100644 +--- a/src/fmi2/fmu.cpp ++++ b/src/fmi2/fmu.cpp +@@ -26,6 +26,8 @@ + #include + #endif + ++#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING ++ + #include + #include + diff --git a/vcpkg/ports/fmi4cpp/portfile.cmake b/vcpkg/ports/fmi4cpp/portfile.cmake new file mode 100644 index 0000000..6babc78 --- /dev/null +++ b/vcpkg/ports/fmi4cpp/portfile.cmake @@ -0,0 +1,44 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO NTNU-IHB/FMI4cpp + REF v0.7.0 + SHA512 5846f5b28badb5b4836ffd9d284f602dd243df20d3c82cab5e2b62b8be37e0ab05b7422bca066f37ca67ee0d5b35abd2febe87f623fc3b9854d245e86e1e21fe + HEAD_REF master + PATCHES + fix-build_error.patch +) + +set(WITH_CURL OFF) +if("curl" IN_LIST FEATURES) + set(WITH_CURL ON) +endif() + +set(WITH_ODEINT OFF) +if("odeint" IN_LIST FEATURES) + set(WITH_ODEINT ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFMI4CPP_BUILD_TOOL=OFF + -DFMI4CPP_BUILD_TESTS=OFF + -DFMI4CPP_BUILD_EXAMPLES=OFF + -DFMI4CPP_WITH_CURL=${WITH_CURL} + -DFMI4CPP_WITH_ODEINT=${WITH_ODEINT} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + + diff --git a/vcpkg/ports/fmilib/0001-remove-install-prefix.patch b/vcpkg/ports/fmilib/0001-remove-install-prefix.patch new file mode 100644 index 0000000..42ba757 --- /dev/null +++ b/vcpkg/ports/fmilib/0001-remove-install-prefix.patch @@ -0,0 +1,48 @@ +From 04bb359c724308e30268840c64932ea1d05b9077 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Wed, 23 Sep 2020 10:00:23 -0700 +Subject: [PATCH 1/2] remove install prefix + +--- + CMakeLists.txt | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f7372bf..f3c11f1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -26,7 +26,6 @@ set(FMILIBRARYHOME ${FMILibrary_SOURCE_DIR}) + set(FMILIBRARYBUILD ${FMILibrary_BINARY_DIR}) + + # User configuration options and parameters +-SET(FMILIB_INSTALL_PREFIX ${FMILibrary_BINARY_DIR}/../install CACHE PATH "Prefix prepended to install directories") + set(FMILIB_THIRDPARTYLIBS ${FMILibrary_SOURCE_DIR}/ThirdParty CACHE PATH "Path to the ThirdParty library dir" ) + set(FMILIB_FMI_STANDARD_HEADERS ${FMILIB_THIRDPARTYLIBS}/FMI/default CACHE PATH "Path to the FMI standard headers dir" ) + +@@ -84,7 +83,6 @@ IF(NOT CMAKE_BUILD_TYPE) + SET(CMAKE_BUILD_TYPE ${FMILIB_DEFAULT_BUILD_TYPE}) + ENDIF(NOT CMAKE_BUILD_TYPE) + +-SET(CMAKE_INSTALL_PREFIX ${FMILIB_INSTALL_PREFIX} CACHE INTERNAL "Prefix prepended to install directories" FORCE) + + # debug_message is used to trace the build script + function(debug_message) +@@ -350,7 +348,6 @@ endfunction() + + if(FMILIB_GENERATE_DOXYGEN_DOC) + +- file(MAKE_DIRECTORY "${FMILIB_INSTALL_PREFIX}/doc") + + set(DOXYFILE_IN ${FMILIBRARYHOME}/Config.cmake/fmilib_doxydoc.conf CACHE INTERNAL "Doxygen config file") + set(DOXYFILE_IMAGE_DIR "${FMILIBRARYHOME}/images" CACHE INTERNAL "Doxygen images" FORCE) +@@ -372,7 +369,6 @@ if(FMILIB_GENERATE_DOXYGEN_DOC) + set(DOXYFILE_SOURCE_DIR "${FMILIBRARYBUILD}/doc" CACHE INTERNAL "Doxygen default source dir" FORCE) + set(DOXYFILE_EXTRA_SOURCES "${DOXYFILE_EXTRA_SOURCES} \"${FMILIBRARYHOME}/Test\"") + +- set(DOXYFILE_OUTPUT_DIR "${FMILIB_INSTALL_PREFIX}/doc") + + set(DOXYFILE_STRIP_FROM_PATH "${FMILIBRARYHOME}") + +-- +2.24.3 (Apple Git-128) + diff --git a/vcpkg/ports/fmilib/0002-include-sys-stat.h-for-mkdir.patch b/vcpkg/ports/fmilib/0002-include-sys-stat.h-for-mkdir.patch new file mode 100644 index 0000000..a39617e --- /dev/null +++ b/vcpkg/ports/fmilib/0002-include-sys-stat.h-for-mkdir.patch @@ -0,0 +1,20 @@ +From 080876bf3735efeedaab0b211d2be7b3c3524d97 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Wed, 23 Sep 2020 10:03:30 -0700 +Subject: [PATCH 2/2] include sys/stat.h for mkdir + +--- + ThirdParty/Minizip/minizip/miniunz.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/ThirdParty/Minizip/minizip/miniunz.c b/ThirdParty/Minizip/minizip/miniunz.c +index 2264705..e0167d5 100644 +--- a/ThirdParty/Minizip/minizip/miniunz.c ++++ b/ThirdParty/Minizip/minizip/miniunz.c +@@ -53,5 +53,6 @@ + #else + # include + # include ++# include + #endif + diff --git a/vcpkg/ports/fmilib/CONTROL b/vcpkg/ports/fmilib/CONTROL new file mode 100644 index 0000000..b5a0517 --- /dev/null +++ b/vcpkg/ports/fmilib/CONTROL @@ -0,0 +1,5 @@ +Source: fmilib +Version: 2.0.3 +Port-Version: 3 +Description: FMI library is intended as a foundation for applications interfacing FMUs (Functional Mockup Units) that follow FMI Standard. This version of the library supports FMI 1.0 and FMI2.0. +Homepage: https://www.fmi-standard.org/ diff --git a/vcpkg/ports/fmilib/portfile.cmake b/vcpkg/ports/fmilib/portfile.cmake new file mode 100644 index 0000000..0f3a4f2 --- /dev/null +++ b/vcpkg/ports/fmilib/portfile.cmake @@ -0,0 +1,69 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "https://jmodelica.org/fmil/FMILibrary-2.0.3-src.zip" + FILENAME "FMILibrary-2.0.3-src.zip" + SHA512 86e4b5019d8f2a76b01141411845d977fb3949617604de0b34351f23647e3e8b378477de184e1c4f2f59297bc4c7de3155e0edba9099b8924594a36b37b04cc8 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + 0001-remove-install-prefix.patch + 0002-include-sys-stat.h-for-mkdir.patch +) + +# Note that if you have configured and built both static and shared library on Windows +# but want to link with the static library compile time define "FMILIB_BUILDING_LIBRARY" must be set. +if ((NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") AND VCPKG_LIBRARY_LINKAGE STREQUAL static) + SET(FMILIB_BUILDING_LIBRARY ON) +else() + SET(FMILIB_BUILDING_LIBRARY OFF) +endif() + +# Use static run-time libraries (/MT or /MTd code generation flags) +# This is only used when generating Microsoft Visual Studio solutions. If the options is on then the library will +# be built against static runtime, otherwise - dynamic runtime (/MD or /MDd). Make sure the client code is using +# matching runtime +if ((NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") AND VCPKG_CRT_LINKAGE STREQUAL static) + SET(FMILIB_BUILD_WITH_STATIC_RTLIB ON) +else() + SET(FMILIB_BUILD_WITH_STATIC_RTLIB OFF) +endif() + +# On LINUX position independent code (-fPIC) must be used on all files to be linked into a shared library (.so file). +# On other systems this is not needed (either is default or relocation is done). Set this option to OFF if you +# are building an application on Linux and use static library only +if ((VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") AND VCPKG_LIBRARY_LINKAGE STREQUAL static) + SET(FMILIB_BUILD_FOR_SHARED_LIBS OFF) +else() + SET(FMILIB_BUILD_FOR_SHARED_LIBS ON) +endif() + +# Only build the requested library +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + SET(FMILIB_BUILD_STATIC_LIB ON) + SET(FMILIB_BUILD_SHARED_LIB OFF) +else() + SET(FMILIB_BUILD_STATIC_LIB OFF) + SET(FMILIB_BUILD_SHARED_LIB ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFMILIB_BUILD_TESTS=OFF + -DFMILIB_BUILD_STATIC_LIB=${FMILIB_BUILD_STATIC_LIB} + -DFMILIB_BUILD_SHARED_LIB=${FMILIB_BUILD_SHARED_LIB} + -DFMILIB_BUILDING_LIBRARY=${FMILIB_BUILDING_LIBRARY} + -DFMILIB_BUILD_WITH_STATIC_RTLIB=${FMILIB_BUILD_WITH_STATIC_RTLIB} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/fmt/CONTROL b/vcpkg/ports/fmt/CONTROL new file mode 100644 index 0000000..f89366e --- /dev/null +++ b/vcpkg/ports/fmt/CONTROL @@ -0,0 +1,5 @@ +Source: fmt +Version: 7.0.3 +Port-Version: 3 +Homepage: https://github.com/fmtlib/fmt +Description: Formatting library for C++. It can be used as a safe alternative to printf or as a fast alternative to IOStreams. diff --git a/vcpkg/ports/fmt/fix-warning4189.patch b/vcpkg/ports/fmt/fix-warning4189.patch new file mode 100644 index 0000000..0efab0f --- /dev/null +++ b/vcpkg/ports/fmt/fix-warning4189.patch @@ -0,0 +1,12 @@ +diff --git a/include/fmt/format.h b/include/fmt/format.h +index 4e96539..0f1d179 100644 +--- a/include/fmt/format.h ++++ b/include/fmt/format.h +@@ -33,6 +33,7 @@ + #ifndef FMT_FORMAT_H_ + #define FMT_FORMAT_H_ + ++#pragma warning(disable:4189) + #include + #include + #include diff --git a/vcpkg/ports/fmt/portfile.cmake b/vcpkg/ports/fmt/portfile.cmake new file mode 100644 index 0000000..5de78ec --- /dev/null +++ b/vcpkg/ports/fmt/portfile.cmake @@ -0,0 +1,64 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fmtlib/fmt + REF cd4af11efc9c622896a3e4cb599fa28668ca3d05#version 7.0.3 + SHA512 24b42288be97849533dc82282fc08833d74642ad2afeb511e65c6389d88c709cf25345dec5b550c18af3705f4c0847fa0d4066308b51cd41ccfdda1a2c3babd0 + HEAD_REF master + PATCHES fix-warning4189.patch +) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFMT_CMAKE_DIR=share/fmt + -DFMT_TEST=OFF + -DFMT_DOC=OFF +) + +vcpkg_install_cmake() +file(INSTALL ${SOURCE_PATH}/LICENSE.rst DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + if(VCPKG_TARGET_IS_WINDOWS) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/fmtd.dll") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/fmtd.dll ${CURRENT_PACKAGES_DIR}/debug/bin/fmtd.dll) + endif() + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/fmt.dll") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/fmt.dll ${CURRENT_PACKAGES_DIR}/bin/fmt.dll) + endif() + endif() + endif() + + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/fmt/core.h + "defined(FMT_SHARED)" + "1" + ) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets() +vcpkg_fixup_pkgconfig() + +if(VCPKG_TARGET_IS_WINDOWS) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-debug.cmake + "lib/fmtd.dll" + "bin/fmtd.dll" + ) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/fmt/fmt-targets-release.cmake + "lib/fmt.dll" + "bin/fmt.dll" + ) + endif() +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle post-build CMake instructions +vcpkg_copy_pdbs() +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/fmt/usage b/vcpkg/ports/fmt/usage new file mode 100644 index 0000000..c9988aa --- /dev/null +++ b/vcpkg/ports/fmt/usage @@ -0,0 +1,7 @@ +The package fmt provides CMake targets: + + find_package(fmt CONFIG REQUIRED) + target_link_libraries(main PRIVATE fmt::fmt) + + # Or use the header-only version + target_link_libraries(main PRIVATE fmt::fmt-header-only) diff --git a/vcpkg/ports/folly/CONTROL b/vcpkg/ports/folly/CONTROL new file mode 100644 index 0000000..302e7a9 --- /dev/null +++ b/vcpkg/ports/folly/CONTROL @@ -0,0 +1,32 @@ +Source: folly +Version: 2019.10.21.00 +Port-Version: 4 +Homepage: https://github.com/facebook/folly +Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows +Build-Depends: openssl, libevent, double-conversion, glog, gflags, boost-chrono, boost-context, boost-conversion, boost-crc, boost-date-time, boost-filesystem, boost-multi-index, boost-program-options, boost-regex, boost-system, boost-thread, boost-smart-ptr +Default-Features: zlib +Supports: x64 + +Feature: zlib +Build-Depends: zlib +Description: Support zlib for compression + +Feature: bzip2 +Build-Depends: bzip2 +Description: Support bzip2 for compression + +Feature: lzma +Build-Depends: liblzma +Description: Support LZMA for compression + +Feature: zstd +Build-Depends: zstd +Description: Support zstd for compression + +Feature: snappy +Build-Depends: snappy +Description: Support Snappy for compression + +Feature: lz4 +Build-Depends: lz4 +Description: Support lz4 for compression diff --git a/vcpkg/ports/folly/FindLZ4.cmake b/vcpkg/ports/folly/FindLZ4.cmake new file mode 100644 index 0000000..f80962c --- /dev/null +++ b/vcpkg/ports/folly/FindLZ4.cmake @@ -0,0 +1,13 @@ +find_path(LZ4_INCLUDE_DIR lz4.h) + +find_library(LZ4_LIBRARY_DEBUG NAMES lz4d) +find_library(LZ4_LIBRARY_RELEASE NAMES lz4) + +include(SelectLibraryConfigurations) +select_library_configurations(LZ4) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS( + LZ4 DEFAULT_MSG + LZ4_LIBRARY LZ4_INCLUDE_DIR +) diff --git a/vcpkg/ports/folly/FindSnappy.cmake b/vcpkg/ports/folly/FindSnappy.cmake new file mode 100644 index 0000000..253d0d8 --- /dev/null +++ b/vcpkg/ports/folly/FindSnappy.cmake @@ -0,0 +1,13 @@ +find_path(SNAPPY_INCLUDE_DIR snappy.h) + +find_library(SNAPPY_LIBRARY_DEBUG NAMES snappyd) +find_library(SNAPPY_LIBRARY_RELEASE NAMES snappy) + +include(SelectLibraryConfigurations) +select_library_configurations(SNAPPY) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS( + SNAPPY DEFAULT_MSG + SNAPPY_LIBRARY SNAPPY_INCLUDE_DIR +) diff --git a/vcpkg/ports/folly/boost-1.70.patch b/vcpkg/ports/folly/boost-1.70.patch new file mode 100644 index 0000000..98986b9 --- /dev/null +++ b/vcpkg/ports/folly/boost-1.70.patch @@ -0,0 +1,23 @@ +diff --git a/folly/portability/PThread.cpp b/folly/portability/PThread.cpp +index 5cc3731..86a4a0b 100644 +--- a/folly/portability/PThread.cpp ++++ b/folly/portability/PThread.cpp +@@ -18,6 +18,9 @@ + + #if !FOLLY_HAVE_PTHREAD && defined(_WIN32) + #include // @manual ++#include ++#include ++#include + + #include + +@@ -684,7 +687,7 @@ int pthread_setspecific(pthread_key_t key, const void* value) { + // function, which we don't want to do. + boost::detail::set_tss_data( + realKey, +- boost::shared_ptr(), ++ 0,0, + const_cast(value), + false); + return 0; diff --git a/vcpkg/ports/folly/disable-non-underscore-posix-names.patch b/vcpkg/ports/folly/disable-non-underscore-posix-names.patch new file mode 100644 index 0000000..bbe7948 --- /dev/null +++ b/vcpkg/ports/folly/disable-non-underscore-posix-names.patch @@ -0,0 +1,27 @@ +diff --git a/folly/portability/Windows.h b/folly/portability/Windows.h +index f7990ca..b22fac5 100644 +--- a/folly/portability/Windows.h ++++ b/folly/portability/Windows.h +@@ -26,16 +26,12 @@ + // These have to be this way because we define our own versions + // of close(), because the normal Windows versions don't handle + // sockets at all. +-#ifndef __STDC__ +-/* nolint */ +-#define __STDC__ 1 +-#include // @manual nolint +-#include // @manual nolint +-#undef __STDC__ +-#else +-#include // @manual nolint +-#include // @manual nolint +-#endif ++#include ++#pragma push_macro("_CRT_INTERNAL_NONSTDC_NAMES") ++#define _CRT_INTERNAL_NONSTDC_NAMES 0 ++#include ++#include ++#pragma pop_macro("_CRT_INTERNAL_NONSTDC_NAMES") + + #if defined(min) || defined(max) + #error Windows.h needs to be included by this header, or else NOMINMAX needs \ diff --git a/vcpkg/ports/folly/find-double-conversion.patch b/vcpkg/ports/folly/find-double-conversion.patch new file mode 100644 index 0000000..53f49e8 --- /dev/null +++ b/vcpkg/ports/folly/find-double-conversion.patch @@ -0,0 +1,25 @@ +diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake +index 1522db2..5ed2ea9 100644 +--- a/CMake/folly-deps.cmake ++++ b/CMake/folly-deps.cmake +@@ -17,9 +17,17 @@ find_package(Boost 1.51.0 MODULE + list(APPEND FOLLY_LINK_LIBRARIES ${Boost_LIBRARIES}) + list(APPEND FOLLY_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS}) + +-find_package(DoubleConversion MODULE REQUIRED) +-list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY}) +-list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR}) ++find_package(double-conversion CONFIG REQUIRED) ++if (double-conversion_FOUND) ++ message(STATUS "Found double-conversion from package config") ++ set(FOLLY_HAVE_DOUBLE_CONVERSION ON) ++ # How to obtain link libraries from target? double-conversion doesn't set property INTERFACE_LINK_LIBRARIES ++ list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR}) ++else() ++ find_package(DoubleConversion MODULE) ++ list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY}) ++ list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR}) ++endif() + + set(FOLLY_HAVE_LIBGFLAGS OFF) + find_package(gflags CONFIG REQUIRED) diff --git a/vcpkg/ports/folly/fix-addbit.patch b/vcpkg/ports/folly/fix-addbit.patch new file mode 100644 index 0000000..6ac47aa --- /dev/null +++ b/vcpkg/ports/folly/fix-addbit.patch @@ -0,0 +1,15 @@ +diff --git a/folly/lang/Bits.h b/folly/lang/Bits.h +index f0beb5b..f86a1a3 100644 +--- a/folly/lang/Bits.h ++++ b/folly/lang/Bits.h +@@ -64,6 +64,10 @@ + #include + #include + ++#if __has_include() ++#include ++#endif ++ + namespace folly { + + #if __cpp_lib_bit_cast diff --git a/vcpkg/ports/folly/folly_c3861.patch b/vcpkg/ports/folly/folly_c3861.patch new file mode 100644 index 0000000..52aefcb --- /dev/null +++ b/vcpkg/ports/folly/folly_c3861.patch @@ -0,0 +1,50 @@ +diff --git a/folly/portability/Builtins.h b/folly/portability/Builtins.h +index 971cb88..7894333 100644 +--- a/folly/portability/Builtins.h ++++ b/folly/portability/Builtins.h +@@ -41,7 +41,7 @@ FOLLY_ALWAYS_INLINE void __builtin___clear_cache(char* begin, char* end) { + } + } + +-#if !defined(_MSC_VER) || (_MSC_VER < 1923) ++// #if !defined(_MSC_VER) || (_MSC_VER < 1923) + FOLLY_ALWAYS_INLINE int __builtin_clz(unsigned int x) { + unsigned long index; + return int(_BitScanReverse(&index, (unsigned long)x) ? 31 - index : 32); +@@ -93,7 +93,7 @@ FOLLY_ALWAYS_INLINE int __builtin_ctzll(unsigned long long x) { + return int(_BitScanForward64(&index, x) ? index : 64); + } + #endif +-#endif // !defined(_MSC_VER) || (_MSC_VER < 1923) ++// #endif // !defined(_MSC_VER) || (_MSC_VER < 1923) + + FOLLY_ALWAYS_INLINE int __builtin_ffs(int x) { + unsigned long index; +@@ -119,15 +119,15 @@ FOLLY_ALWAYS_INLINE int __builtin_popcount(unsigned int x) { + return int(__popcnt(x)); + } + +-#if !defined(_MSC_VER) || (_MSC_VER < 1923) ++// #if !defined(_MSC_VER) || (_MSC_VER < 1923) + FOLLY_ALWAYS_INLINE int __builtin_popcountl(unsigned long x) { + static_assert(sizeof(x) == 4, ""); + return int(__popcnt(x)); + } +-#endif // !defined(_MSC_VER) || (_MSC_VER < 1923) ++// #endif // !defined(_MSC_VER) || (_MSC_VER < 1923) + #endif + +-#if !defined(_MSC_VER) || (_MSC_VER < 1923) ++// #if !defined(_MSC_VER) || (_MSC_VER < 1923) + #if defined(_M_IX86) + FOLLY_ALWAYS_INLINE int __builtin_popcountll(unsigned long long x) { + return int(__popcnt((unsigned int)(x >> 32))) + +@@ -138,7 +138,7 @@ FOLLY_ALWAYS_INLINE int __builtin_popcountll(unsigned long long x) { + return int(__popcnt64(x)); + } + #endif +-#endif // !defined(_MSC_VER) || (_MSC_VER < 1923) ++// #endif // !defined(_MSC_VER) || (_MSC_VER < 1923) + + FOLLY_ALWAYS_INLINE void* __builtin_return_address(unsigned int frame) { + // I really hope frame is zero... diff --git a/vcpkg/ports/folly/missing-include-atomic.patch b/vcpkg/ports/folly/missing-include-atomic.patch new file mode 100644 index 0000000..54c1a48 --- /dev/null +++ b/vcpkg/ports/folly/missing-include-atomic.patch @@ -0,0 +1,12 @@ +diff --git a/folly/portability/PThread.cpp b/folly/portability/PThread.cpp +index 2891c4c..7c98975 100644 +--- a/folly/portability/PThread.cpp ++++ b/folly/portability/PThread.cpp +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + #include + #include diff --git a/vcpkg/ports/folly/portfile.cmake b/vcpkg/ports/folly/portfile.cmake new file mode 100644 index 0000000..3853569 --- /dev/null +++ b/vcpkg/ports/folly/portfile.cmake @@ -0,0 +1,99 @@ +if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + message(FATAL_ERROR "Folly only supports the x64 architecture.") +endif() + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +# Required to run build/generate_escape_tables.py et al. +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) +vcpkg_add_to_path("${PYTHON3_DIR}") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO facebook/folly + REF 8874256376d2f8a32867f17c9472a446d6707604 #2019.10.21.00 + SHA512 96dfdde34697b72e8eb88431d742fffa337fc9146677d63cf0331dc5e4cd341fb00b88edf3781488e3194fa41525e70a6729e1bb6657f224cd1969deea9b468c + HEAD_REF master + PATCHES + missing-include-atomic.patch + reorder-glog-gflags.patch + disable-non-underscore-posix-names.patch + boost-1.70.patch + fix-addbit.patch + folly_c3861.patch +) + +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/FindLZ4.cmake + ${CMAKE_CURRENT_LIST_DIR}/FindSnappy.cmake + DESTINATION ${SOURCE_PATH}/CMake/ +) +file(REMOVE ${SOURCE_PATH}/CMake/FindGFlags.cmake) + +if(VCPKG_CRT_LINKAGE STREQUAL static) + set(MSVC_USE_STATIC_RUNTIME ON) +else() + set(MSVC_USE_STATIC_RUNTIME OFF) +endif() + +set(FEATURE_OPTIONS) + +macro(feature FEATURENAME PACKAGENAME) + if("${FEATURENAME}" IN_LIST FEATURES) + list(APPEND FEATURE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_${PACKAGENAME}=OFF) + else() + list(APPEND FEATURE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_${PACKAGENAME}=ON) + endif() +endmacro() + +feature(zlib ZLIB) +feature(bzip2 BZip2) +feature(lzma LibLZMA) +feature(lz4 LZ4) +feature(zstd Zstd) +feature(snappy Snappy) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DMSVC_USE_STATIC_RUNTIME=${MSVC_USE_STATIC_RUNTIME} + -DCMAKE_DISABLE_FIND_PACKAGE_LibDwarf=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Libiberty=ON + -DCMAKE_DISABLE_FIND_PACKAGE_LibAIO=ON + -DLIBAIO_FOUND=OFF + -DLIBURCU_FOUND=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_LibURCU=ON + -DCMAKE_INSTALL_DIR=share/folly + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake(ADD_BIN_TO_PATH) + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets() + +# Release folly-targets.cmake does not link to the right libraries in debug mode. +# We substitute with generator expressions so that the right libraries are linked for debug and release. +set(FOLLY_TARGETS_CMAKE "${CURRENT_PACKAGES_DIR}/share/folly/folly-targets.cmake") +FILE(READ ${FOLLY_TARGETS_CMAKE} _contents) +string(REPLACE "\${_IMPORT_PREFIX}/lib/zlib.lib" "ZLIB::ZLIB" _contents "${_contents}") +STRING(REPLACE "\${_IMPORT_PREFIX}/lib/" "\${_IMPORT_PREFIX}/\$<\$:debug/>lib/" _contents "${_contents}") +STRING(REPLACE "\${_IMPORT_PREFIX}/debug/lib/" "\${_IMPORT_PREFIX}/\$<\$:debug/>lib/" _contents "${_contents}") +string(REPLACE "-vc140-mt.lib" "-vc140-mt\$<\$:-gd>.lib" _contents "${_contents}") +FILE(WRITE ${FOLLY_TARGETS_CMAKE} "${_contents}") +FILE(READ ${CURRENT_PACKAGES_DIR}/share/folly/folly-config.cmake _contents) +FILE(WRITE ${CURRENT_PACKAGES_DIR}/share/folly/folly-config.cmake +"include(CMakeFindDependencyMacro) +find_dependency(Threads) +find_dependency(glog CONFIG) +find_dependency(gflags CONFIG REQUIRED) +find_dependency(ZLIB) +${_contents}") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/folly/reorder-glog-gflags.patch b/vcpkg/ports/folly/reorder-glog-gflags.patch new file mode 100644 index 0000000..85fd1d9 --- /dev/null +++ b/vcpkg/ports/folly/reorder-glog-gflags.patch @@ -0,0 +1,28 @@ +diff --git a/CMake/folly-deps.cmake b/CMake/folly-deps.cmake +index e0bbcbb..fb45331 100644 +--- a/CMake/folly-deps.cmake ++++ b/CMake/folly-deps.cmake +@@ -24,6 +24,11 @@ find_package(DoubleConversion MODULE REQUIRED) + list(APPEND FOLLY_LINK_LIBRARIES ${DOUBLE_CONVERSION_LIBRARY}) + list(APPEND FOLLY_INCLUDE_DIRECTORIES ${DOUBLE_CONVERSION_INCLUDE_DIR}) + ++find_package(Glog MODULE) ++set(FOLLY_HAVE_LIBGLOG ${GLOG_FOUND}) ++list(APPEND FOLLY_LINK_LIBRARIES ${GLOG_LIBRARY}) ++list(APPEND FOLLY_INCLUDE_DIRECTORIES ${GLOG_INCLUDE_DIR}) ++ + find_package(Gflags MODULE) + set(FOLLY_HAVE_LIBGFLAGS ${LIBGFLAGS_FOUND}) + list(APPEND FOLLY_LINK_LIBRARIES ${LIBGFLAGS_LIBRARY}) +@@ -31,11 +36,6 @@ list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBGFLAGS_INCLUDE_DIR}) + list(APPEND CMAKE_REQUIRED_LIBRARIES ${LIBGFLAGS_LIBRARY}) + list(APPEND CMAKE_REQUIRED_INCLUDES ${LIBGFLAGS_INCLUDE_DIR}) + +-find_package(Glog MODULE) +-set(FOLLY_HAVE_LIBGLOG ${GLOG_FOUND}) +-list(APPEND FOLLY_LINK_LIBRARIES ${GLOG_LIBRARY}) +-list(APPEND FOLLY_INCLUDE_DIRECTORIES ${GLOG_INCLUDE_DIR}) +- + find_package(LibEvent MODULE REQUIRED) + list(APPEND FOLLY_LINK_LIBRARIES ${LIBEVENT_LIB}) + list(APPEND FOLLY_INCLUDE_DIRECTORIES ${LIBEVENT_INCLUDE_DIR}) diff --git a/vcpkg/ports/font-chef/CONTROL b/vcpkg/ports/font-chef/CONTROL new file mode 100644 index 0000000..4b097ac --- /dev/null +++ b/vcpkg/ports/font-chef/CONTROL @@ -0,0 +1,4 @@ +Source: font-chef +Version: 1.0.1 +Description: A font cooking library +Homepage: https://github.com/mobius3/font-chef diff --git a/vcpkg/ports/font-chef/portfile.cmake b/vcpkg/ports/font-chef/portfile.cmake new file mode 100644 index 0000000..2ae280b --- /dev/null +++ b/vcpkg/ports/font-chef/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mobius3/font-chef + REF v1.0.1 + SHA512 0d73d095a2f6346cde5fc58a07be7cbe2c180ab5c83a4af21f765a6be1e9dcc5a403fa1d4c64f71dad5609eb72c8b05df8606b4035fceadca74fe6a87bb8efef + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/${PORT}") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/fontconfig/CMakeLists.txt b/vcpkg/ports/fontconfig/CMakeLists.txt new file mode 100644 index 0000000..61197ed --- /dev/null +++ b/vcpkg/ports/fontconfig/CMakeLists.txt @@ -0,0 +1,96 @@ +cmake_minimum_required(VERSION 3.11) +project(fontconfig C) + +add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -DHAVE_CONFIG_H) + +# find dependencies +find_package(unofficial-iconv CONFIG REQUIRED) +find_package(Freetype REQUIRED) +find_package(expat CONFIG REQUIRED) + +add_library(fontconfig + src/fcatomic.c + src/fcblanks.c + src/fccache.c + src/fccfg.c + src/fccharset.c + src/fccompat.c + src/fcdbg.c + src/fcdefault.c + src/fcdir.c + src/fcformat.c + src/fcfreetype.c + src/fcfs.c + src/fcinit.c + src/fclang.c + src/fclist.c + src/fcmatch.c + src/fcmatrix.c + src/fcname.c + src/fcobjs.c + src/fcpat.c + src/fcrange.c + src/fcserialize.c + src/fcstat.c + src/fcstr.c + src/fcweight.c + src/fcxml.c + src/ftglue.c) + +if(WIN32) + set_target_properties(fontconfig PROPERTIES DEFINE_SYMBOL "FcPublic=__declspec(dllexport)") +else() + set_target_properties(fontconfig PROPERTIES DEFINE_SYMBOL "FcPublic=__attribute__((visibility(\"default\")))") +endif() + +target_include_directories(fontconfig PRIVATE . + ${FC_INCLUDE_DIR}/alias + ${EXPAT_INCLUDE_DIR}) +if(WIN32) + target_include_directories(fontconfig PRIVATE ${FC_INCLUDE_DIR}/win32) +else() + target_include_directories(fontconfig PRIVATE ${FC_INCLUDE_DIR}/unix) +endif() + +target_link_libraries(fontconfig PRIVATE unofficial::iconv::libiconv Freetype::Freetype expat::expat) + +install(TARGETS fontconfig + EXPORT fontconfig-targets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +if(NOT FC_SKIP_HEADERS) + install(FILES + fontconfig/fontconfig.h + fontconfig/fcfreetype.h + fontconfig/fcprivate.h + DESTINATION include/fontconfig) +endif() + +if(NOT FC_SKIP_TOOLS) + set(FC_DEFAULT_FONTS WINDOWSFONTDIR) + set(FC_FONTPATH) + set(FC_CACHEDIR WINDOWSTEMPDIR_FONTCONFIG_CACHE) + set(CONFIGDIR ./fonts/conf.d) + configure_file(fonts.conf.in ${CMAKE_SOURCE_DIR}/fonts.conf @ONLY) + install(FILES fonts.conf DESTINATION tools/fontconfig) + install(DIRECTORY conf.d DESTINATION tools/fontconfig FILES_MATCHING PATTERN "*.conf") +endif() + +install( + EXPORT fontconfig-targets + NAMESPACE unofficial::fontconfig:: + FILE unofficial-fontconfig-targets.cmake + DESTINATION share/unofficial-fontconfig +) + +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/unofficial-fontconfig-config.cmake " +include(CMakeFindDependencyMacro) +find_dependency(unofficial-iconv CONFIG) +find_dependency(Freetype) +find_dependency(expat CONFIG) + +include(\${CMAKE_CURRENT_LIST_DIR}/unofficial-fontconfig-targets.cmake) +") +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-fontconfig-config.cmake DESTINATION share/unofficial-fontconfig) diff --git a/vcpkg/ports/fontconfig/CONTROL b/vcpkg/ports/fontconfig/CONTROL new file mode 100644 index 0000000..e541f56 --- /dev/null +++ b/vcpkg/ports/fontconfig/CONTROL @@ -0,0 +1,7 @@ +Source: fontconfig +Version: 2.12.4 +Port-Version: 13 +Homepage: https://www.freedesktop.org/software/fontconfig/front.html +Description: Library for configuring and customizing font access. +Build-Depends: freetype, expat, libiconv, dirent +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/fontconfig/fcobjtypehash.patch b/vcpkg/ports/fontconfig/fcobjtypehash.patch new file mode 100644 index 0000000..e0db689 --- /dev/null +++ b/vcpkg/ports/fontconfig/fcobjtypehash.patch @@ -0,0 +1,18 @@ +diff --git a/src/fcobjs.c b/src/fcobjs.c +index 33bba8d..e6b0808 100644 +--- a/src/fcobjs.c ++++ b/src/fcobjs.c +@@ -24,11 +24,13 @@ + + #include "fcint.h" + ++#if 0 + static unsigned int + FcObjectTypeHash (register const char *str, register FC_GPERF_SIZE_T len); + + static const struct FcObjectTypeInfo * + FcObjectTypeLookup (register const char *str, register FC_GPERF_SIZE_T len); ++#endif + + #include "fcobjshash.h" + diff --git a/vcpkg/ports/fontconfig/include/alias/fcalias.h b/vcpkg/ports/fontconfig/include/alias/fcalias.h new file mode 100644 index 0000000..e69de29 diff --git a/vcpkg/ports/fontconfig/include/alias/fcaliastail.h b/vcpkg/ports/fontconfig/include/alias/fcaliastail.h new file mode 100644 index 0000000..a9eae81 --- /dev/null +++ b/vcpkg/ports/fontconfig/include/alias/fcaliastail.h @@ -0,0 +1 @@ +/* intentionally empty */ diff --git a/vcpkg/ports/fontconfig/include/alias/fcftalias.h b/vcpkg/ports/fontconfig/include/alias/fcftalias.h new file mode 100644 index 0000000..e69de29 diff --git a/vcpkg/ports/fontconfig/include/alias/fcftaliastail.h b/vcpkg/ports/fontconfig/include/alias/fcftaliastail.h new file mode 100644 index 0000000..a9eae81 --- /dev/null +++ b/vcpkg/ports/fontconfig/include/alias/fcftaliastail.h @@ -0,0 +1 @@ +/* intentionally empty */ diff --git a/vcpkg/ports/fontconfig/include/unix/config.h b/vcpkg/ports/fontconfig/include/unix/config.h new file mode 100644 index 0000000..5b5da37 --- /dev/null +++ b/vcpkg/ports/fontconfig/include/unix/config.h @@ -0,0 +1,376 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +#define FC_CACHEDIR "./" + +/* The normal alignment of `double', in bytes. */ +#define ALIGNOF_DOUBLE 8 + +/* The normal alignment of `void *', in bytes. */ +#if defined(_WIN64) +#define ALIGNOF_VOID_P 8 +#else +#define ALIGNOF_VOID_P 4 +#endif + +/* Use libxml2 instead of Expat */ +/* #undef ENABLE_LIBXML2 */ + +/* Additional font directories */ +#define FC_ADD_FONTS "yes" + +/* Architecture prefix to use for cache file names */ +/* #undef FC_ARCHITECTURE */ + +/* System font directory */ +#define FC_DEFAULT_FONTS "" + +/* The type of len parameter of the gperf hash/lookup function */ +#define FC_GPERF_SIZE_T size_t + +/* Define to nothing if C supports flexible array members, and to 1 if it does + not. That way, with a declaration like `struct s { int n; double + d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99 + compilers. When computing the size of such an object, don't use 'sizeof + (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)' + instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with + MSVC and with C++ compilers. */ +#define FLEXIBLE_ARRAY_MEMBER /**/ + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +/* #undef HAVE_DOPRNT */ + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `fstatfs' function. */ +/* #undef HAVE_FSTATFS */ + +/* Define to 1 if you have the `fstatvfs' function. */ +/* #undef HAVE_FSTATVFS */ + +/* FT_Bitmap_Size structure includes y_ppem field */ +#define HAVE_FT_BITMAP_SIZE_Y_PPEM 1 + +/* Define to 1 if you have the `FT_Get_BDF_Property' function. */ +#define HAVE_FT_GET_BDF_PROPERTY 1 + +/* Define to 1 if you have the `FT_Get_Next_Char' function. */ +#define HAVE_FT_GET_NEXT_CHAR 1 + +/* Define to 1 if you have the `FT_Get_PS_Font_Info' function. */ +#define HAVE_FT_GET_PS_FONT_INFO 1 + +/* Define to 1 if you have the `FT_Get_X11_Font_Format' function. */ +#define HAVE_FT_GET_X11_FONT_FORMAT 1 + +/* Define to 1 if you have the `FT_Has_PS_Glyph_Names' function. */ +#define HAVE_FT_HAS_PS_GLYPH_NAMES 1 + +/* Define to 1 if you have the `FT_Select_Size' function. */ +#define HAVE_FT_SELECT_SIZE 1 + +/* Define to 1 if you have the `getexecname' function. */ +/* #undef HAVE_GETEXECNAME */ + +/* Define to 1 if you have the `getopt' function. */ +#define HAVE_GETOPT 1 + +/* Define to 1 if you have the `getopt_long' function. */ +#define HAVE_GETOPT_LONG 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the `getprogname' function. */ +/* #undef HAVE_GETPROGNAME */ + +/* Have Intel __sync_* atomic primitives */ +#define HAVE_INTEL_ATOMIC_PRIMITIVES 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `link' function. */ +/* #undef HAVE_LINK */ + +/* Define to 1 if you have the `lrand48' function. */ +/* #undef HAVE_LRAND48 */ + +/* Define to 1 if you have the `lstat' function. */ +/* #undef HAVE_LSTAT */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mkdtemp' function. */ +/* #undef HAVE_MKDTEMP */ + +/* Define to 1 if you have the `mkostemp' function. */ +/* #undef HAVE_MKOSTEMP */ + +/* Define to 1 if you have the `mkstemp' function. */ +#define HAVE_MKSTEMP 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the 'posix_fadvise' function. */ +/* #undef HAVE_POSIX_FADVISE */ + +/* Have POSIX threads */ +#define HAVE_PTHREAD 1 + +/* Have PTHREAD_PRIO_INHERIT. */ +/* #undef HAVE_PTHREAD_PRIO_INHERIT */ + +/* Define to 1 if you have the `rand' function. */ +#define HAVE_RAND 1 + +/* Define to 1 if you have the `random' function. */ +/* #undef HAVE_RANDOM */ + +/* Define to 1 if you have the `random_r' function. */ +/* #undef HAVE_RANDOM_R */ + +/* Define to 1 if you have the `rand_r' function. */ +/* #undef HAVE_RAND_R */ + +/* Define to 1 if you have the `readlink' function. */ +/* #undef HAVE_READLINK */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SCHED_H */ + +/* Have sched_yield */ +/* #undef HAVE_SCHED_YIELD */ + +/* Have Solaris __machine_*_barrier and atomic_* operations */ +/* #undef HAVE_SOLARIS_ATOMIC_OPS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if `d_type' is a member of `struct dirent'. */ +/* #undef HAVE_STRUCT_DIRENT_D_TYPE */ + +/* Define to 1 if `f_flags' is a member of `struct statfs'. */ +/* #undef HAVE_STRUCT_STATFS_F_FLAGS */ + +/* Define to 1 if `f_fstypename' is a member of `struct statfs'. */ +/* #undef HAVE_STRUCT_STATFS_F_FSTYPENAME */ + +/* Define to 1 if `f_basetype' is a member of `struct statvfs'. */ +/* #undef HAVE_STRUCT_STATVFS_F_BASETYPE */ + +/* Define to 1 if `f_fstypename' is a member of `struct statvfs'. */ +/* #undef HAVE_STRUCT_STATVFS_F_FSTYPENAME */ + +/* Define to 1 if `st_mtim' is a member of `struct stat'. */ +/* #undef HAVE_STRUCT_STAT_ST_MTIM */ + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_MOUNT_H */ + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_PARAM_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_STATFS_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_STATVFS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_VFS_H */ + +/* Define to 1 if `usLowerOpticalPointSize' is a member of `TT_OS2'. */ +#define HAVE_TT_OS2_USLOWEROPTICALPOINTSIZE 1 + +/* Define to 1 if `usUpperOpticalPointSize' is a member of `TT_OS2'. */ +#define HAVE_TT_OS2_USUPPEROPTICALPOINTSIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `vprintf' function. */ +#define HAVE_VPRINTF 1 + +/* Can use #warning in C files */ +#define HAVE_WARNING_CPP_DIRECTIVE 1 + +/* Use xmlparse.h instead of expat.h */ +/* #undef HAVE_XMLPARSE_H */ + +/* Define to 1 if you have the `XML_SetDoctypeDeclHandler' function. */ +#define HAVE_XML_SETDOCTYPEDECLHANDLER 1 + +/* Define to 1 if you have the `_mktemp_s' function. */ +/* #undef HAVE__MKTEMP_S */ + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "fontconfig" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "fontconfig" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "fontconfig 2.12.3" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "fontconfig" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.12.3" + +/* Define to necessary symbol if this constant uses a non-standard name on + your system. */ +/* #undef PTHREAD_CREATE_JOINABLE */ + +/* The size of `char', as computed by sizeof. */ +/* #undef SIZEOF_CHAR */ + +/* The size of `int', as computed by sizeof. */ +/* #undef SIZEOF_INT */ + +/* The size of `long', as computed by sizeof. */ +/* #undef SIZEOF_LONG */ + +/* The size of `short', as computed by sizeof. */ +/* #undef SIZEOF_SHORT */ + +/* The size of `void*', as computed by sizeof. */ +/* #undef SIZEOF_VOIDP */ + +/* The size of `void *', as computed by sizeof. */ +#if defined(_WIN64) +#define SIZEOF_VOIDP 8 +#define SIZEOF_VOID_P 8 +#else +#define SIZEOF_VOIDP 4 +#define SIZEOF_VOID_P 4 +#endif + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Use iconv. */ +#define USE_ICONV 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "2.12.3" + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +#define _FILE_OFFSET_BITS 64 + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to `int' if does not define. */ +/* #undef pid_t */ + +#define FONTCONFIG_PATH "/etc/fonts" + +#include "config-fixups.h" diff --git a/vcpkg/ports/fontconfig/include/win32/config.h b/vcpkg/ports/fontconfig/include/win32/config.h new file mode 100644 index 0000000..0fbdead --- /dev/null +++ b/vcpkg/ports/fontconfig/include/win32/config.h @@ -0,0 +1,374 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +#define FC_CACHEDIR "./" + +/* The normal alignment of `double', in bytes. */ +#define ALIGNOF_DOUBLE 8 + +/* The normal alignment of `void *', in bytes. */ +#if defined(_WIN64) +#define ALIGNOF_VOID_P 8 +#else +#define ALIGNOF_VOID_P 4 +#endif + +/* Use libxml2 instead of Expat */ +/* #undef ENABLE_LIBXML2 */ + +/* Additional font directories */ +#define FC_ADD_FONTS "yes" + +/* Architecture prefix to use for cache file names */ +/* #undef FC_ARCHITECTURE */ + +/* System font directory */ +#define FC_DEFAULT_FONTS "WINDOWSFONTDIR" + +/* The type of len parameter of the gperf hash/lookup function */ +#define FC_GPERF_SIZE_T size_t + +/* Define to nothing if C supports flexible array members, and to 1 if it does + not. That way, with a declaration like `struct s { int n; double + d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99 + compilers. When computing the size of such an object, don't use 'sizeof + (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)' + instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with + MSVC and with C++ compilers. */ +#define FLEXIBLE_ARRAY_MEMBER /**/ + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DLFCN_H */ + +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +/* #undef HAVE_DOPRNT */ + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `fstatfs' function. */ +/* #undef HAVE_FSTATFS */ + +/* Define to 1 if you have the `fstatvfs' function. */ +/* #undef HAVE_FSTATVFS */ + +/* FT_Bitmap_Size structure includes y_ppem field */ +#define HAVE_FT_BITMAP_SIZE_Y_PPEM 1 + +/* Define to 1 if you have the `FT_Get_BDF_Property' function. */ +#define HAVE_FT_GET_BDF_PROPERTY 1 + +/* Define to 1 if you have the `FT_Get_Next_Char' function. */ +#define HAVE_FT_GET_NEXT_CHAR 1 + +/* Define to 1 if you have the `FT_Get_PS_Font_Info' function. */ +#define HAVE_FT_GET_PS_FONT_INFO 1 + +/* Define to 1 if you have the `FT_Get_X11_Font_Format' function. */ +#define HAVE_FT_GET_X11_FONT_FORMAT 1 + +/* Define to 1 if you have the `FT_Has_PS_Glyph_Names' function. */ +#define HAVE_FT_HAS_PS_GLYPH_NAMES 1 + +/* Define to 1 if you have the `FT_Select_Size' function. */ +#define HAVE_FT_SELECT_SIZE 1 + +/* Define to 1 if you have the `getexecname' function. */ +/* #undef HAVE_GETEXECNAME */ + +/* Define to 1 if you have the `getopt' function. */ +#define HAVE_GETOPT 1 + +/* Define to 1 if you have the `getopt_long' function. */ +#define HAVE_GETOPT_LONG 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the `getprogname' function. */ +/* #undef HAVE_GETPROGNAME */ + +/* Have Intel __sync_* atomic primitives */ +#define HAVE_INTEL_ATOMIC_PRIMITIVES 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `link' function. */ +/* #undef HAVE_LINK */ + +/* Define to 1 if you have the `lrand48' function. */ +/* #undef HAVE_LRAND48 */ + +/* Define to 1 if you have the `lstat' function. */ +/* #undef HAVE_LSTAT */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mkdtemp' function. */ +/* #undef HAVE_MKDTEMP */ + +/* Define to 1 if you have the `mkostemp' function. */ +/* #undef HAVE_MKOSTEMP */ + +/* Define to 1 if you have the `mkstemp' function. */ +/* #undef HAVE_MKSTEMP */ + +/* Define to 1 if you have a working `mmap' system call. */ +/* #undef HAVE_MMAP */ + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the 'posix_fadvise' function. */ +/* #undef HAVE_POSIX_FADVISE */ + +/* Have POSIX threads */ +/* #undef HAVE_PTHREAD */ + +/* Have PTHREAD_PRIO_INHERIT. */ +/* #undef HAVE_PTHREAD_PRIO_INHERIT */ + +/* Define to 1 if you have the `rand' function. */ +#define HAVE_RAND 1 + +/* Define to 1 if you have the `random' function. */ +/* #undef HAVE_RANDOM */ + +/* Define to 1 if you have the `random_r' function. */ +/* #undef HAVE_RANDOM_R */ + +/* Define to 1 if you have the `rand_r' function. */ +/* #undef HAVE_RAND_R */ + +/* Define to 1 if you have the `readlink' function. */ +/* #undef HAVE_READLINK */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SCHED_H */ + +/* Have sched_yield */ +/* #undef HAVE_SCHED_YIELD */ + +/* Have Solaris __machine_*_barrier and atomic_* operations */ +/* #undef HAVE_SOLARIS_ATOMIC_OPS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if `d_type' is a member of `struct dirent'. */ +/* #undef HAVE_STRUCT_DIRENT_D_TYPE */ + +/* Define to 1 if `f_flags' is a member of `struct statfs'. */ +/* #undef HAVE_STRUCT_STATFS_F_FLAGS */ + +/* Define to 1 if `f_fstypename' is a member of `struct statfs'. */ +/* #undef HAVE_STRUCT_STATFS_F_FSTYPENAME */ + +/* Define to 1 if `f_basetype' is a member of `struct statvfs'. */ +/* #undef HAVE_STRUCT_STATVFS_F_BASETYPE */ + +/* Define to 1 if `f_fstypename' is a member of `struct statvfs'. */ +/* #undef HAVE_STRUCT_STATVFS_F_FSTYPENAME */ + +/* Define to 1 if `st_mtim' is a member of `struct stat'. */ +/* #undef HAVE_STRUCT_STAT_ST_MTIM */ + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_MOUNT_H */ + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_PARAM_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_STATFS_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_STATVFS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_VFS_H */ + +/* Define to 1 if `usLowerOpticalPointSize' is a member of `TT_OS2'. */ +#define HAVE_TT_OS2_USLOWEROPTICALPOINTSIZE 1 + +/* Define to 1 if `usUpperOpticalPointSize' is a member of `TT_OS2'. */ +#define HAVE_TT_OS2_USUPPEROPTICALPOINTSIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `vprintf' function. */ +#define HAVE_VPRINTF 1 + +/* Can use #warning in C files */ +#define HAVE_WARNING_CPP_DIRECTIVE 1 + +/* Use xmlparse.h instead of expat.h */ +/* #undef HAVE_XMLPARSE_H */ + +/* Define to 1 if you have the `XML_SetDoctypeDeclHandler' function. */ +#define HAVE_XML_SETDOCTYPEDECLHANDLER 1 + +/* Define to 1 if you have the `_mktemp_s' function. */ +#define HAVE__MKTEMP_S 1 + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "fontconfig" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "https://bugs.freedesktop.org/enter_bug.cgi?product=fontconfig" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "fontconfig" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "fontconfig 2.12.3" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "fontconfig" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.12.3" + +/* Define to necessary symbol if this constant uses a non-standard name on + your system. */ +/* #undef PTHREAD_CREATE_JOINABLE */ + +/* The size of `char', as computed by sizeof. */ +/* #undef SIZEOF_CHAR */ + +/* The size of `int', as computed by sizeof. */ +/* #undef SIZEOF_INT */ + +/* The size of `long', as computed by sizeof. */ +/* #undef SIZEOF_LONG */ + +/* The size of `short', as computed by sizeof. */ +/* #undef SIZEOF_SHORT */ + +/* The size of `void*', as computed by sizeof. */ +/* #undef SIZEOF_VOIDP */ + +/* The size of `void *', as computed by sizeof. */ +#if defined(_WIN64) +#define SIZEOF_VOIDP 8 +#define SIZEOF_VOID_P 8 +#else +#define SIZEOF_VOIDP 4 +#define SIZEOF_VOID_P 4 +#endif + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Use iconv. */ +#define USE_ICONV 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "2.12.3" + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +#define _FILE_OFFSET_BITS 64 + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to `int' if does not define. */ +/* #undef pid_t */ + +#include "config-fixups.h" diff --git a/vcpkg/ports/fontconfig/include/win32/unistd.h b/vcpkg/ports/fontconfig/include/win32/unistd.h new file mode 100644 index 0000000..7d04abe --- /dev/null +++ b/vcpkg/ports/fontconfig/include/win32/unistd.h @@ -0,0 +1,21 @@ +/* Minimal unistd.h, just to get fontconfig to compile */ +#ifndef UNISTD_H +#define UNISTD_H + +#include + +#ifndef R_OK +#define R_OK 4 +#endif + +#ifndef W_OK +#define W_OK 2 +#endif + +#ifndef F_OK +#define F_OK 0 +#endif + +typedef int mode_t; + +#endif \ No newline at end of file diff --git a/vcpkg/ports/fontconfig/portfile.cmake b/vcpkg/ports/fontconfig/portfile.cmake new file mode 100644 index 0000000..5d9492f --- /dev/null +++ b/vcpkg/ports/fontconfig/portfile.cmake @@ -0,0 +1,52 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +set(FONTCONFIG_VERSION 2.12.4) +vcpkg_download_distfile(ARCHIVE + URLS "https://www.freedesktop.org/software/fontconfig/release/fontconfig-${FONTCONFIG_VERSION}.tar.gz" + FILENAME "fontconfig-${FONTCONFIG_VERSION}.tar.gz" + SHA512 2be3ee0e8e0e3b62571135a3cae06e456c289dd1ad40ef2a7c780406418ee5efce863a833eca5a8ef55bc737a0ea04ef562bba6fd27e174ae43e42131b52810d +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${FONTCONFIG_VERSION} + PATCHES fcobjtypehash.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFC_INCLUDE_DIR=${CMAKE_CURRENT_LIST_DIR}/include + OPTIONS_DEBUG + -DFC_SKIP_TOOLS=ON + -DFC_SKIP_HEADERS=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-fontconfig TARGET_PATH share/unofficial-fontconfig) + +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + foreach(HEADER fcfreetype.h fontconfig.h) + if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/fontconfig/${HEADER} + "#define FcPublic" + "#define FcPublic __declspec(dllimport)" + ) + else() + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/fontconfig/${HEADER} + "#define FcPublic" + "#define FcPublic __attribute__((visibility(\"default\")))" + ) + endif() + endforeach() +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + diff --git a/vcpkg/ports/foonathan-memory/CONTROL b/vcpkg/ports/foonathan-memory/CONTROL new file mode 100644 index 0000000..8c105a1 --- /dev/null +++ b/vcpkg/ports/foonathan-memory/CONTROL @@ -0,0 +1,8 @@ +Source: foonathan-memory +Version: 2019-07-21-1 +Description: STL compatible C++ memory allocator library +Homepage: https://foonathan.net/doc/memory/ +Default-Features: tool + +Feature: tool +Description: Build foonathan memory tool diff --git a/vcpkg/ports/foonathan-memory/portfile.cmake b/vcpkg/ports/foonathan-memory/portfile.cmake new file mode 100644 index 0000000..f8fdeea --- /dev/null +++ b/vcpkg/ports/foonathan-memory/portfile.cmake @@ -0,0 +1,130 @@ +include(vcpkg_common_functions) + +# WINDOWS_EXPORT_ALL_SYMBOLS doesn't work. +# unresolved external symbol "public: static unsigned int const foonathan::memory::detail::memory_block_stack::implementation_offset +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO foonathan/memory + REF 885a9d97bebe9a2f131d21d3c0928c42ab377c8b + SHA512 7ce78a6e67d590a41b7f8a3d4ae0f6c1fa157c561b718a63973dffc000df74a9f0a0d7955a099e84fbeb3cf4085092eb866a6b8cec8bafd50bdcee94d069f65d + HEAD_REF master +) + +vcpkg_from_github( + OUT_SOURCE_PATH COMP_SOURCE_PATH + REPO foonathan/compatibility + REF cd142129e30f5b3e6c6d96310daf94242c0b03bf + SHA512 1d144f82ec46dcc546ee292846330d39536a3145e5a5d8065bda545f55699aeb9a4ef7dea5e5f684ce2327fad210488fe6bb4ba7f84ceac867ac1c72b90c6d69 + HEAD_REF master +) + +file(COPY ${COMP_SOURCE_PATH}/comp_base.cmake DESTINATION ${SOURCE_PATH}/cmake/comp) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tool FOONATHAN_MEMORY_BUILD_TOOLS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DFOONATHAN_MEMORY_BUILD_EXAMPLES=OFF + -DFOONATHAN_MEMORY_BUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/foonathan_memory) +elseif(EXISTS ${CURRENT_PACKAGES_DIR}/share/foonathan_memory/cmake) + vcpkg_fixup_cmake_targets(CONFIG_PATH share/foonathan_memory/cmake TARGET_PATH share/foonathan_memory) +endif() + +vcpkg_copy_pdbs() + +# Place header files into the right folders +# The original layout is not a problem for CMake-based project. +file(COPY + ${CURRENT_PACKAGES_DIR}/include/foonathan_memory/foonathan + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) +file(GLOB + COMP_INCLUDE_FILES + ${CURRENT_PACKAGES_DIR}/include/foonathan_memory/comp/foonathan/*.hpp +) +file(COPY + ${COMP_INCLUDE_FILES} + DESTINATION ${CURRENT_PACKAGES_DIR}/include/foonathan +) +file(COPY + ${CURRENT_PACKAGES_DIR}/include/foonathan_memory/config_impl.hpp + DESTINATION ${CURRENT_PACKAGES_DIR}/include/foonathan/memory +) +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/include/foonathan_memory +) +vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/share/foonathan_memory/foonathan_memory-config.cmake + "\${_IMPORT_PREFIX}/include/foonathan_memory/comp;\${_IMPORT_PREFIX}/include/foonathan_memory" + "\${_IMPORT_PREFIX}/include" +) +# Place header files into the right folders - Done! + +# The Debug version of this lib is built with: +# #define FOONATHAN_MEMORY_DEBUG_FILL 1 +# and Release version is built with: +# #define FOONATHAN_MEMORY_DEBUG_FILL 0 +# We only have the Release version header files installed, however. +vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/include/foonathan/memory/detail/debug_helpers.hpp + "#if FOONATHAN_MEMORY_DEBUG_FILL" + "#ifndef NDEBUG //#if FOONATHAN_MEMORY_DEBUG_FILL" +) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +file(REMOVE + ${CURRENT_PACKAGES_DIR}/debug/LICENSE + ${CURRENT_PACKAGES_DIR}/debug/README.md + ${CURRENT_PACKAGES_DIR}/LICENSE + ${CURRENT_PACKAGES_DIR}/README.md +) + +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR + VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(EXECUTABLE_SUFFIX ".exe") +else() + set(EXECUTABLE_SUFFIX "") +endif() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/nodesize_dbg${EXECUTABLE_SUFFIX}) + file(COPY + ${CURRENT_PACKAGES_DIR}/bin/nodesize_dbg${EXECUTABLE_SUFFIX} + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT} + ) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/bin + ) + else() + file(REMOVE + ${CURRENT_PACKAGES_DIR}/bin/nodesize_dbg${EXECUTABLE_SUFFIX} + ${CURRENT_PACKAGES_DIR}/debug/bin/nodesize_dbg${EXECUTABLE_SUFFIX} + ) + endif() +endif() + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/vcpkg/ports/forest/CONTROL b/vcpkg/ports/forest/CONTROL new file mode 100644 index 0000000..9e26598 --- /dev/null +++ b/vcpkg/ports/forest/CONTROL @@ -0,0 +1,4 @@ +Source: forest +Version: 12.0.4 +Homepage: https://github.com/xorz57/forest +Description: Template Library of Tree Data Structures in C++17 diff --git a/vcpkg/ports/forest/portfile.cmake b/vcpkg/ports/forest/portfile.cmake new file mode 100644 index 0000000..a1211b0 --- /dev/null +++ b/vcpkg/ports/forest/portfile.cmake @@ -0,0 +1,15 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xorz57/forest + REF 12.0.4 + SHA512 d9251c8de5998f320bc45e100845c00482c5db9037c880731169da722d7a53c1d241483df46ecaa54750637b8eb49dcf1bb9d11992af37f5d3ca12eb01478fdf + HEAD_REF master +) + +# Handle headers +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.hpp") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/forest RENAME copyright) diff --git a/vcpkg/ports/forge/CONTROL b/vcpkg/ports/forge/CONTROL new file mode 100644 index 0000000..3aa7608 --- /dev/null +++ b/vcpkg/ports/forge/CONTROL @@ -0,0 +1,5 @@ +Source: forge +Version: 1.0.4-2 +Description: Helps with high performance visualizations involving OpenGL-CUDA/OpenCL interop. +Build-Depends: glfw3, glm, glbinding, freetype, boost-functional, freeimage, fontconfig (!windows) +Supports: x64 \ No newline at end of file diff --git a/vcpkg/ports/forge/fix-static_build.patch b/vcpkg/ports/forge/fix-static_build.patch new file mode 100644 index 0000000..67f498c --- /dev/null +++ b/vcpkg/ports/forge/fix-static_build.patch @@ -0,0 +1,28 @@ +diff --git a/extern/glad/CMakeLists.txt b/extern/glad/CMakeLists.txt +index c8c8d86..27adf86 100644 +--- a/extern/glad/CMakeLists.txt ++++ b/extern/glad/CMakeLists.txt +@@ -2,15 +2,19 @@ add_library(forge_glad_interface INTERFACE) + + target_include_directories(forge_glad_interface + INTERFACE +- ${CMAKE_CURRENT_SOURCE_DIR}/include ++ $ + ) + + target_sources(forge_glad_interface + INTERFACE +- ${CMAKE_CURRENT_SOURCE_DIR}/src/glad.c ++ $ + ) + + target_link_libraries(forge_glad_interface + INTERFACE +- ${CMAKE_DL_LIBS} ++ $ + ) ++ ++if (NOT BUILD_SHARED_LIBS) ++ install(TARGETS forge_glad_interface EXPORT ForgeTargets) ++endif () +\ No newline at end of file diff --git a/vcpkg/ports/forge/portfile.cmake b/vcpkg/ports/forge/portfile.cmake new file mode 100644 index 0000000..05c099c --- /dev/null +++ b/vcpkg/ports/forge/portfile.cmake @@ -0,0 +1,42 @@ +if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + message(FATAL_ERROR "This port currently only supports x64 architecture") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO arrayfire/forge + REF 650bf611de102a2cc0c32dba7646f8128f0300c8 + SHA512 2093464db0f3a7f0178f65bed37986a4df1117f1d7ad65157d525584490cdf234475f01ed1a2003a9e54bdc3b9e2e450808044a264c2284d67b8c2a353400027 + HEAD_REF master + PATCHES fix-static_build.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFG_BUILD_DOCS=OFF + -DFG_BUILD_EXAMPLES=OFF + -DFG_INSTALL_BIN_DIR=bin + -DFG_WITH_FREEIMAGE=OFF +) + +vcpkg_install_cmake() + +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH share/Forge/cmake) +endif() + +file(GLOB DLLS ${CURRENT_PACKAGES_DIR}/bin/* ${CURRENT_PACKAGES_DIR}/debug/bin/*) +list(FILTER DLLS EXCLUDE REGEX "forge\\.dll\$") +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/debug/examples + ${CURRENT_PACKAGES_DIR}/examples + ${DLLS} +) + +file(INSTALL ${SOURCE_PATH}/.github/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/fplus/CONTROL b/vcpkg/ports/fplus/CONTROL new file mode 100644 index 0000000..10c95ac --- /dev/null +++ b/vcpkg/ports/fplus/CONTROL @@ -0,0 +1,4 @@ +Source: fplus +Version: 0.2.3-p0 +Description: Functional Programming Library for C++. Write concise and readable C++ code. +Homepage: https://github.com/Dobiasd/FunctionalPlus \ No newline at end of file diff --git a/vcpkg/ports/fplus/portfile.cmake b/vcpkg/ports/fplus/portfile.cmake new file mode 100644 index 0000000..fc7da4c --- /dev/null +++ b/vcpkg/ports/fplus/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Dobiasd/FunctionalPlus + REF v0.2.3-p0 + SHA512 99fe07e68cd5630b9b243670778772f396cabb89845fb3ae5105884fab1cdbb7fae4080f57d0aea4d9282f84036572c0dd1e4b9602997dec4171a90b98416759 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + -DFPLUS_BUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) \ No newline at end of file diff --git a/vcpkg/ports/freeglut/CONTROL b/vcpkg/ports/freeglut/CONTROL new file mode 100644 index 0000000..4526157 --- /dev/null +++ b/vcpkg/ports/freeglut/CONTROL @@ -0,0 +1,4 @@ +Source: freeglut +Version: 3.2.1-4 +Homepage: https://sourceforge.net/projects/freeglut/ +Description: Open source implementation of GLUT with source and binary backwards compatibility. diff --git a/vcpkg/ports/freeglut/fix-debug-macro.patch b/vcpkg/ports/freeglut/fix-debug-macro.patch new file mode 100644 index 0000000..69f9e82 --- /dev/null +++ b/vcpkg/ports/freeglut/fix-debug-macro.patch @@ -0,0 +1,35 @@ +diff --git a/include/GL/freeglut_std.h b/include/GL/freeglut_std.h +index a658c7c..a5efb3b 100644 +--- a/include/GL/freeglut_std.h ++++ b/include/GL/freeglut_std.h +@@ -70,7 +70,7 @@ + + /* Link with Win32 static freeglut lib */ + # if FREEGLUT_LIB_PRAGMAS +-# ifdef NDEBUG ++# if defined(NDEBUG) || !defined(_DEBUG) + # pragma comment (lib, "freeglut_static.lib") + # else + # pragma comment (lib, "freeglut_staticd.lib") +@@ -88,7 +88,7 @@ + + /* Link with Win32 shared freeglut lib */ + # if FREEGLUT_LIB_PRAGMAS +-# ifdef NDEBUG ++# if defined(NDEBUG) || !defined(_DEBUG) + # pragma comment (lib, "freeglut.lib") + # else + # pragma comment (lib, "freeglutd.lib") +diff --git a/src/blackberry/fg_main_blackberry.c b/src/blackberry/fg_main_blackberry.c +index a1b9cbb..a20c53d 100644 +--- a/src/blackberry/fg_main_blackberry.c ++++ b/src/blackberry/fg_main_blackberry.c +@@ -31,7 +31,7 @@ + #include "fg_internal.h" + #include "egl/fg_window_egl.h" + +-#ifdef NDEBUG ++#if defined(NDEBUG) || !defined(_DEBUG) + #define LOGI(...) + #endif + diff --git a/vcpkg/ports/freeglut/gcc10.patch b/vcpkg/ports/freeglut/gcc10.patch new file mode 100644 index 0000000..dc5193b --- /dev/null +++ b/vcpkg/ports/freeglut/gcc10.patch @@ -0,0 +1,31 @@ +diff --git a/src/fg_gl2.h b/src/fg_gl2.h +index ab8ba5c..a1a52da 100644 +--- a/src/fg_gl2.h ++++ b/src/fg_gl2.h +@@ -67,13 +67,19 @@ typedef void (APIENTRY *FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); + typedef void (APIENTRY *FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint); + typedef void (APIENTRY *FGH_PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); + +-FGH_PFNGLGENBUFFERSPROC fghGenBuffers; +-FGH_PFNGLDELETEBUFFERSPROC fghDeleteBuffers; +-FGH_PFNGLBINDBUFFERPROC fghBindBuffer; +-FGH_PFNGLBUFFERDATAPROC fghBufferData; +-FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC fghEnableVertexAttribArray; +-FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC fghDisableVertexAttribArray; +-FGH_PFNGLVERTEXATTRIBPOINTERPROC fghVertexAttribPointer; ++#if __GNUC__ > 9 ++#define FG_ATTRIBUTE_COMMON __attribute__((__common__)) ++#else ++#define FG_ATTRIBUTE_COMMON ++#endif ++ ++FGH_PFNGLGENBUFFERSPROC FG_ATTRIBUTE_COMMON fghGenBuffers; ++FGH_PFNGLDELETEBUFFERSPROC FG_ATTRIBUTE_COMMON fghDeleteBuffers; ++FGH_PFNGLBINDBUFFERPROC FG_ATTRIBUTE_COMMON fghBindBuffer; ++FGH_PFNGLBUFFERDATAPROC FG_ATTRIBUTE_COMMON fghBufferData; ++FGH_PFNGLENABLEVERTEXATTRIBARRAYPROC FG_ATTRIBUTE_COMMON fghEnableVertexAttribArray; ++FGH_PFNGLDISABLEVERTEXATTRIBARRAYPROC FG_ATTRIBUTE_COMMON fghDisableVertexAttribArray; ++FGH_PFNGLVERTEXATTRIBPOINTERPROC FG_ATTRIBUTE_COMMON fghVertexAttribPointer; + + # endif + diff --git a/vcpkg/ports/freeglut/macOS_Xquartz.patch b/vcpkg/ports/freeglut/macOS_Xquartz.patch new file mode 100644 index 0000000..c154dce --- /dev/null +++ b/vcpkg/ports/freeglut/macOS_Xquartz.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6f403af..ce6f9f2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -258,6 +258,16 @@ ENDIF() + IF(FREEGLUT_GLES) + LIST(APPEND PUBLIC_DEFINITIONS -DFREEGLUT_GLES) + LIST(APPEND LIBS GLESv2 GLESv1_CM EGL) ++ELSEIF(APPLE) ++ # on OSX FindOpenGL uses framework version of OpenGL, but we need X11 version ++ FIND_PATH(GLX_INCLUDE_DIR GL/glx.h ++ PATHS /opt/X11/include /usr/X11/include /usr/X11R6/include) ++ FIND_LIBRARY(OPENGL_gl_LIBRARY GL ++ PATHS /opt/X11/lib /usr/X11/lib /usr/X11R6/lib) ++ FIND_LIBRARY(OPENGL_glu_LIBRARY GLU ++ PATHS /opt/X11/lib /usr/X11/lib /usr/X11R6/lib) ++ LIST(APPEND LIBS ${OPENGL_gl_LIBRARY}) ++ INCLUDE_DIRECTORIES(${GLX_INCLUDE_DIR}) + ELSE() + FIND_PACKAGE(OpenGL REQUIRED) + LIST(APPEND LIBS ${OPENGL_gl_LIBRARY}) diff --git a/vcpkg/ports/freeglut/portfile.cmake b/vcpkg/ports/freeglut/portfile.cmake new file mode 100644 index 0000000..4ec2382 --- /dev/null +++ b/vcpkg/ports/freeglut/portfile.cmake @@ -0,0 +1,76 @@ +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO freeglut/freeglut + REF 3.2.1 + FILENAME "freeglut-3.2.1.tar.gz" + SHA512 aced4bbcd36269ce6f4ee1982e0f9e3fffbf18c94f785d3215ac9f4809b992e166c7ada496ed6174e13d77c0f7ef3ca4c57d8a282e96cbbe6ff086339ade3b08 + PATCHES + use_targets_to_export_x11_dependency.patch + macOS_Xquartz.patch + gcc10.patch + fix-debug-macro.patch +) + +if(NOT VCPKG_TARGET_IS_WINDOWS) + message("Freeglut currently requires the following libraries from the system package manager:\n opengl\n glu\n libx11\n xrandr\n xi\n xxf86vm\n\nThese can be installed on Ubuntu systems via apt-get install libxi-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev libxrandr-dev libxxf86vm-dev\nOn macOS Xquartz is required.") +endif() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(FREEGLUT_STATIC OFF) + set(FREEGLUT_DYNAMIC ON) +else() + set(FREEGLUT_STATIC ON) + set(FREEGLUT_DYNAMIC OFF) +endif() + +# Patch header +file(READ ${SOURCE_PATH}/include/GL/freeglut_std.h FREEGLUT_STDH) +string(REGEX REPLACE "\"freeglut_static.lib\"" + "\"freeglut.lib\"" FREEGLUT_STDH "${FREEGLUT_STDH}") +string(REGEX REPLACE "\"freeglut_staticd.lib\"" + "\"freeglutd.lib\"" FREEGLUT_STDH "${FREEGLUT_STDH}") +file(WRITE ${SOURCE_PATH}/include/GL/freeglut_std.h "${FREEGLUT_STDH}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFREEGLUT_BUILD_STATIC_LIBS=${FREEGLUT_STATIC} + -DFREEGLUT_BUILD_SHARED_LIBS=${FREEGLUT_DYNAMIC} + -DFREEGLUT_BUILD_DEMOS=OFF + -DINSTALL_PDB=OFF # Installing pdbs failed on debug static. So, disable it and let vcpkg_copy_pdbs() do it +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/FreeGLUT) + +# Rename static lib (otherwise it's incompatible with FindGLUT.cmake) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/freeglut_static.lib ${CURRENT_PACKAGES_DIR}/lib/freeglut.lib) + endif() + if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/freeglut_staticd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/freeglutd.lib) + endif() + endif() + + vcpkg_replace_string( + "${CURRENT_PACKAGES_DIR}/include/GL/freeglut_std.h" + "ifdef FREEGLUT_STATIC" + "if 1 //ifdef FREEGLUT_STATIC" + ) +endif() + +# Clean +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/glut) +endif() diff --git a/vcpkg/ports/freeglut/usage b/vcpkg/ports/freeglut/usage new file mode 100644 index 0000000..40e214f --- /dev/null +++ b/vcpkg/ports/freeglut/usage @@ -0,0 +1,4 @@ +The package freeglut is compatible with built-in CMake targets: + + find_package(GLUT REQUIRED) + target_link_libraries(main PRIVATE GLUT::GLUT) diff --git a/vcpkg/ports/freeglut/use_targets_to_export_x11_dependency.patch b/vcpkg/ports/freeglut/use_targets_to_export_x11_dependency.patch new file mode 100644 index 0000000..2f9e6b1 --- /dev/null +++ b/vcpkg/ports/freeglut/use_targets_to_export_x11_dependency.patch @@ -0,0 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6f403af..4ced28a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -72,7 +72,7 @@ SET(FREEGLUT_HEADERS + include/GL/freeglut_ext.h + include/GL/freeglut_std.h + ) +-IF(FREEGLUT_REPLACE_GLUT) ++IF(TRUE) + LIST(APPEND FREEGLUT_HEADERS + include/GL/glut.h + ) +@@ -312,8 +312,7 @@ ENDIF(CMAKE_COMPILER_IS_GNUCC) + INCLUDE(CheckIncludeFiles) + IF(UNIX AND NOT(ANDROID OR BLACKBERRY OR FREEGLUT_WAYLAND)) + FIND_PACKAGE(X11 REQUIRED) +- INCLUDE_DIRECTORIES(${X11_X11_INCLUDE_PATH}) +- LIST(APPEND LIBS ${X11_X11_LIB}) ++ LIST(APPEND LIBS X11::X11) + IF(X11_Xrandr_FOUND) + SET(HAVE_X11_EXTENSIONS_XRANDR_H TRUE) + LIST(APPEND LIBS ${X11_Xrandr_LIB}) diff --git a/vcpkg/ports/freeglut/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/freeglut/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..5d57ad4 --- /dev/null +++ b/vcpkg/ports/freeglut/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,10 @@ +_find_package(${ARGS}) +if(GLUT_FOUND) + find_library(XRANDR_LIBRARY NAMES xrandr Xrandr) + if(XRANDR_LIBRARY) + list(APPEND GLUT_LIBRARIES ${XRANDR_LIBRARY}) + if(TARGET GLUT::GLUT) + set_property(TARGET GLUT::GLUT APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${XRANDR_LIBRARY}) + endif() + endif() +endif() diff --git a/vcpkg/ports/freeimage/CMakeLists.txt b/vcpkg/ports/freeimage/CMakeLists.txt new file mode 100644 index 0000000..345c5d4 --- /dev/null +++ b/vcpkg/ports/freeimage/CMakeLists.txt @@ -0,0 +1,163 @@ +cmake_minimum_required(VERSION 3.4) + +include(GNUInstallDirs) + +project(FreeImage C CXX) + +if(MSVC) + add_definitions("-D_CRT_SECURE_NO_WARNINGS") + set(CMAKE_CXX_FLAGS "/wd4828 ${CMAKE_CXX_FLAGS}") +endif() + +find_package(ZLIB REQUIRED) +find_package(PNG REQUIRED) +find_package(JPEG REQUIRED) +find_package(TIFF REQUIRED) +find_package(OpenJPEG REQUIRED) +find_package(WebP REQUIRED) +find_package(JXR REQUIRED) +find_package(LibRaw REQUIRED) +find_package(OpenEXR REQUIRED) + +option(BUILD_SHARED_LIBS "Build shared libraries" ON) +option(INSTALL_HEADERS "Install the development headers" ON) + +set(REAL_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Source) + +# Add a debug postfix +set(CMAKE_DEBUG_POSTFIX "d") + +# List the public header files +set(PUBLIC_HEADERS ${REAL_SOURCE_DIR}/FreeImage.h) + +# List the private header files +set(ROOT_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/CacheFile.h + ${REAL_SOURCE_DIR}/FreeImageIO.h + ${REAL_SOURCE_DIR}/MapIntrospector.h + ${REAL_SOURCE_DIR}/Plugin.h + ${REAL_SOURCE_DIR}/Quantizers.h + ${REAL_SOURCE_DIR}/ToneMapping.h + ${REAL_SOURCE_DIR}/Utilities.h) + +file(GLOB FREEIMAGE_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/FreeImage/*.h) +file(GLOB FREEIMAGE_TOOLKIT_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/FreeImageToolkit/*.h) +file(GLOB METADATA_PRIVATE_HEADERS ${REAL_SOURCE_DIR}/Metadata/*.h) + +set(PRIVATE_HEADERS ${ROOT_PRIVATE_HEADERS} + ${FREEIMAGE_PRIVATE_HEADERS} + ${FREEIMAGE_TOOLKIT_PRIVATE_HEADERS} + ${METADATA_PRIVATE_HEADERS}) + +# List the source files +file(GLOB DEPRECATION_SRCS ${REAL_SOURCE_DIR}/DeprecationManager/*.cpp) +file(GLOB FREEIMAGE_TOOLKIT_SRCS ${REAL_SOURCE_DIR}/FreeImageToolkit/*.cpp) +file(GLOB FREEIMAGE_SRCS ${REAL_SOURCE_DIR}/FreeImage/*.cpp) +file(GLOB METADATA_SRCS ${REAL_SOURCE_DIR}/Metadata/*.cpp) + +# The G3 plugin is disabled because it require the private copy of tiff +list(REMOVE_ITEM FREEIMAGE_SRCS ${REAL_SOURCE_DIR}/FreeImage/PluginG3.cpp) + +# The JPEGTransform plugin is disable because it requires a private copy of jpeg +list(REMOVE_ITEM FREEIMAGE_TOOLKIT_SRCS ${REAL_SOURCE_DIR}/FreeImageToolkit/JPEGTransform.cpp) + + +set(SRCS ${DEPRECATION_SRCS} + ${FREEIMAGE_SRCS} + ${FREEIMAGE_TOOLKIT_SRCS} + ${METADATA_SRCS} +) + +# If FreeImage is used as a static library, FREEIMAGE_LIB +# needs to be defined (at the C preprocessor level) to correctly +# define (to nothing instead of _declspec(dllimport) ) the DLL_API macro. +# For this purpouse we include (depending on the BUILD_SHARED_LIBS ) +# the appropriate FreeImageConfig.h . +if(BUILD_SHARED_LIBS) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FreeImageConfig-dynamic.h ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h) +else() + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/FreeImageConfig-static.h ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h) +endif() +list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/FreeImageConfig.h) + +add_library(FreeImage ${SRCS} ${PRIVATE_HEADERS} ${PUBLIC_HEADERS}) + +if(BUILD_SHARED_LIBS) + target_compile_definitions(FreeImage PRIVATE -DFREEIMAGE_EXPORTS) +else() + target_compile_definitions(FreeImage PRIVATE -DFREEIMAGE_LIB) +endif() + +target_include_directories(FreeImage PRIVATE ${REAL_SOURCE_DIR} + ${ZLIB_INCLUDE_DIRS} + ${JPEG_INCLUDE_DIRS} + ${TIFF_INCLUDE_DIRS} + ${PNG_INCLUDE_DIRS} + ${OPENJPEG_INCLUDE_DIRS} + ${WEBP_INCLUDE_DIRS} + ${JXR_INCLUDE_DIRS} + ${LibRaw_INCLUDE_DIRS} + ${CMAKE_CURRENT_BINARY_DIR} + PUBLIC $) + + +target_link_libraries(FreeImage ${ZLIB_LIBRARIES} + ${JPEG_LIBRARIES} + ${TIFF_LIBRARIES} + ${PNG_LIBRARIES} + ${OPENJPEG_LIBRARIES} + ${WEBP_LIBRARIES} + ${JXR_LIBRARIES} + ${LibRaw_LIBRARIES} + OpenEXR::IlmImf) + +target_compile_definitions(FreeImage PRIVATE ${PNG_DEFINITIONS}) + +# FreeImagePlus +file(GLOB FREEIMAGEPLUS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/src/*.cpp) +add_library(FreeImagePlus + ${FREEIMAGEPLUS_SOURCES} + ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/FreeImagePlus.h + ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/FreeImagePlus.rc) + +if(BUILD_SHARED_LIBS) + target_compile_definitions(FreeImagePlus PRIVATE -DFIP_EXPORTS) +else() + target_compile_definitions(FreeImagePlus PRIVATE -DFREEIMAGE_LIB) +endif() + +target_include_directories(FreeImagePlus PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus + ${CMAKE_CURRENT_BINARY_DIR} + ${REAL_SOURCE_DIR} + PUBLIC $) + +target_link_libraries(FreeImagePlus PUBLIC FreeImage) + +list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper/FreeImagePlus/FreeImagePlus.h) + +install(TARGETS FreeImage FreeImagePlus + EXPORT freeimage-targets + COMPONENT runtime + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") + +install(EXPORT freeimage-targets NAMESPACE freeimage:: DESTINATION share/freeimage) + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/freeimage-config.cmake" +"include(CMakeFindDependencyMacro) +find_dependency(ZLIB) +find_dependency(PNG) +find_dependency(JPEG) +find_dependency(TIFF) +find_dependency(OpenJPEG) +find_dependency(WebP) +find_dependency(JXR) +find_dependency(LibRaw) +find_dependency(OpenEXR) +include(\"\${CMAKE_CURRENT_LIST_DIR}/freeimage-targets.cmake\") +") + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/freeimage-config.cmake DESTINATION share/freeimage) +if(INSTALL_HEADERS) + install(FILES ${PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +endif() diff --git a/vcpkg/ports/freeimage/CONTROL b/vcpkg/ports/freeimage/CONTROL new file mode 100644 index 0000000..8743599 --- /dev/null +++ b/vcpkg/ports/freeimage/CONTROL @@ -0,0 +1,6 @@ +Source: freeimage +Version: 3.18.0 +Port-Version: 17 +Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openjpeg, libwebp (!uwp), libraw, jxrlib, openexr +Homepage: https://sourceforge.net/projects/freeimage/ +Description: Support library for graphics image formats diff --git a/vcpkg/ports/freeimage/FreeImageConfig-dynamic.h b/vcpkg/ports/freeimage/FreeImageConfig-dynamic.h new file mode 100644 index 0000000..41dcf57 --- /dev/null +++ b/vcpkg/ports/freeimage/FreeImageConfig-dynamic.h @@ -0,0 +1,6 @@ +#ifndef FREEIMAGE_CONFIG_H +#define FREEIMAGE_CONFIG_H + +#undef FREEIMAGE_LIB + +#endif diff --git a/vcpkg/ports/freeimage/FreeImageConfig-static.h b/vcpkg/ports/freeimage/FreeImageConfig-static.h new file mode 100644 index 0000000..ed72349 --- /dev/null +++ b/vcpkg/ports/freeimage/FreeImageConfig-static.h @@ -0,0 +1,6 @@ +#ifndef FREEIMAGE_CONFIG_H +#define FREEIMAGE_CONFIG_H + +#define FREEIMAGE_LIB + +#endif diff --git a/vcpkg/ports/freeimage/disable-plugins-depending-on-internal-third-party-libraries.patch b/vcpkg/ports/freeimage/disable-plugins-depending-on-internal-third-party-libraries.patch new file mode 100644 index 0000000..28d0e3a --- /dev/null +++ b/vcpkg/ports/freeimage/disable-plugins-depending-on-internal-third-party-libraries.patch @@ -0,0 +1,71 @@ +diff --git a/Source/FreeImage.h b/Source/FreeImage.h +index e2d1c5a..cc66b7d 100644 +--- a/Source/FreeImage.h ++++ b/Source/FreeImage.h +@@ -410,7 +410,11 @@ FI_ENUM(FREE_IMAGE_FORMAT) { + FIF_DDS = 24, + FIF_GIF = 25, + FIF_HDR = 26, +- FIF_FAXG3 = 27, ++/* vcpkg: The G3 fax format plugin is deliberately disabled in our build of ++ FreeImage, since it requires usage of the vendored copy of libtiff. */ ++#if 0 ++ FIF_FAXG3 = 27, ++#endif + FIF_SGI = 28, + FIF_EXR = 29, + FIF_J2K = 30, +@@ -476,6 +480,9 @@ FI_ENUM(FREE_IMAGE_DITHER) { + /** Lossless JPEG transformations + Constants used in FreeImage_JPEGTransform + */ ++/* vcpkg: The JPEGTransform functions are deliberately disabled in our build ++ of FreeImage, since they require usage of the vendored copy of libjpeg. */ ++#if 0 + FI_ENUM(FREE_IMAGE_JPEG_OPERATION) { + FIJPEG_OP_NONE = 0, //! no transformation + FIJPEG_OP_FLIP_H = 1, //! horizontal flip +@@ -486,6 +493,7 @@ FI_ENUM(FREE_IMAGE_JPEG_OPERATION) { + FIJPEG_OP_ROTATE_180 = 6, //! 180-degree rotation + FIJPEG_OP_ROTATE_270 = 7 //! 270-degree clockwise (or 90 ccw) + }; ++#endif + + /** Tone mapping operators. + Constants used in FreeImage_ToneMapping. +@@ -1077,6 +1085,9 @@ DLL_API const char* DLL_CALLCONV FreeImage_TagToString(FREE_IMAGE_MDMODEL model, + // JPEG lossless transformation routines + // -------------------------------------------------------------------------- + ++/* vcpkg: The JPEGTransform functions are deliberately disabled in our build ++ of FreeImage, since they require usage of the vendored copy of libjpeg. */ ++#if 0 + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransform(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE)); + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, BOOL perfect FI_DEFAULT(TRUE)); + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGCrop(const char *src_file, const char *dst_file, int left, int top, int right, int bottom); +@@ -1085,7 +1096,7 @@ DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformFromHandle(FreeImageIO* src_io, + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombined(const char *src_file, const char *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedU(const wchar_t *src_file, const wchar_t *dst_file, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); + DLL_API BOOL DLL_CALLCONV FreeImage_JPEGTransformCombinedFromMemory(FIMEMORY* src_stream, FIMEMORY* dst_stream, FREE_IMAGE_JPEG_OPERATION operation, int* left, int* top, int* right, int* bottom, BOOL perfect FI_DEFAULT(TRUE)); +- ++#endif + + // -------------------------------------------------------------------------- + // Image manipulation toolkit +diff --git a/Source/FreeImage/Plugin.cpp b/Source/FreeImage/Plugin.cpp +index 57ebffd..a93440f 100644 +--- a/Source/FreeImage/Plugin.cpp ++++ b/Source/FreeImage/Plugin.cpp +@@ -263,7 +263,11 @@ FreeImage_Initialise(BOOL load_local_plugins_only) { + s_plugins->AddNode(InitDDS); + s_plugins->AddNode(InitGIF); + s_plugins->AddNode(InitHDR); +- s_plugins->AddNode(InitG3); ++/* vcpkg: The G3 fax format plugin is deliberately disabled in our build of FreeImage +++ since it requires usage of the vendored copy of libtiff. */ ++#if 0 ++ s_plugins->AddNode(InitG3); ++#endif + s_plugins->AddNode(InitSGI); + s_plugins->AddNode(InitEXR); + s_plugins->AddNode(InitJ2K); diff --git a/vcpkg/ports/freeimage/fix-function-overload.patch b/vcpkg/ports/freeimage/fix-function-overload.patch new file mode 100644 index 0000000..adb1164 --- /dev/null +++ b/vcpkg/ports/freeimage/fix-function-overload.patch @@ -0,0 +1,40 @@ +diff --git a/Source/FreeImage/PluginJPEG.cpp b/Source/FreeImage/PluginJPEG.cpp +index 8db177d..efa2c4e 100644 +--- a/Source/FreeImage/PluginJPEG.cpp ++++ b/Source/FreeImage/PluginJPEG.cpp +@@ -503,7 +503,7 @@ marker_is_icc(jpeg_saved_marker_ptr marker) { + return FALSE. You might want to issue an error message instead. + */ + static BOOL +-jpeg_read_icc_profile(j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned *icc_data_len) { ++jpeg_read_icc_profile_(j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned *icc_data_len) { + jpeg_saved_marker_ptr marker; + int num_markers = 0; + int seq_no; +@@ -745,7 +745,7 @@ read_markers(j_decompress_ptr cinfo, FIBITMAP *dib) { + BYTE *icc_profile = NULL; + unsigned icc_length = 0; + +- if( jpeg_read_icc_profile(cinfo, &icc_profile, &icc_length) ) { ++ if( jpeg_read_icc_profile_(cinfo, &icc_profile, &icc_length) ) { + // copy ICC profile data + FreeImage_CreateICCProfile(dib, icc_profile, icc_length); + // clean up +@@ -785,7 +785,7 @@ jpeg_write_comment(j_compress_ptr cinfo, FIBITMAP *dib) { + Write JPEG_APP2 marker (ICC profile) + */ + static BOOL +-jpeg_write_icc_profile(j_compress_ptr cinfo, FIBITMAP *dib) { ++jpeg_write_icc_profile_(j_compress_ptr cinfo, FIBITMAP *dib) { + // marker identifying string "ICC_PROFILE" (null-terminated) + BYTE icc_signature[12] = { 0x49, 0x43, 0x43, 0x5F, 0x50, 0x52, 0x4F, 0x46, 0x49, 0x4C, 0x45, 0x00 }; + +@@ -1038,7 +1038,7 @@ write_markers(j_compress_ptr cinfo, FIBITMAP *dib) { + jpeg_write_comment(cinfo, dib); + + // write ICC profile +- jpeg_write_icc_profile(cinfo, dib); ++ jpeg_write_icc_profile_(cinfo, dib); + + // write IPTC profile + jpeg_write_iptc_profile(cinfo, dib); diff --git a/vcpkg/ports/freeimage/portfile.cmake b/vcpkg/ports/freeimage/portfile.cmake new file mode 100644 index 0000000..ce1b868 --- /dev/null +++ b/vcpkg/ports/freeimage/portfile.cmake @@ -0,0 +1,51 @@ +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO freeimage/Source%20Distribution + REF 3.18.0 + FILENAME "FreeImage3180.zip" + SHA512 9d9cc7e2d57552c3115e277aeb036e0455204d389026b17a3f513da5be1fd595421655488bb1ec2f76faebed66049119ca55e26e2a6d37024b3fb7ef36ad4818 + PATCHES + disable-plugins-depending-on-internal-third-party-libraries.patch + use-external-jpeg.patch + use-external-jxrlib.patch + use-external-libtiff.patch + use-external-openjpeg.patch + use-external-png-zlib.patch + use-external-rawlib.patch + use-external-webp.patch + use-external-openexr.patch + use-freeimage-config-include.patch + fix-function-overload.patch + use-typedef-as-already-declared.patch + use-functions-to-override-libtiff-warning-error-handlers.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/FreeImageConfig-static.h DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/FreeImageConfig-dynamic.h DESTINATION ${SOURCE_PATH}) + +# This is not strictly necessary, but to make sure +# that no "internal" libraries are used we remove them +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibJPEG) +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibPNG) +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibTIFF4) +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/ZLib) +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibOpenJPEG) +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibJXR) +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibWebP) +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/LibRawLite) +file(REMOVE_RECURSE ${SOURCE_PATH}/Source/OpenEXR) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/license-fi.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/freeimage/use-external-jpeg.patch b/vcpkg/ports/freeimage/use-external-jpeg.patch new file mode 100644 index 0000000..2df2c9d --- /dev/null +++ b/vcpkg/ports/freeimage/use-external-jpeg.patch @@ -0,0 +1,17 @@ +diff --git a/Source/FreeImage/PluginJPEG.cpp b/Source/FreeImage/PluginJPEG.cpp +index 573989c..aaeefa4 100644 +--- a/Source/FreeImage/PluginJPEG.cpp ++++ b/Source/FreeImage/PluginJPEG.cpp +@@ -35,9 +35,9 @@ extern "C" { + #undef FAR + #include + +-#include "../LibJPEG/jinclude.h" +-#include "../LibJPEG/jpeglib.h" +-#include "../LibJPEG/jerror.h" ++#include ++#include ++#include + } + + #include "FreeImage.h" diff --git a/vcpkg/ports/freeimage/use-external-jxrlib.patch b/vcpkg/ports/freeimage/use-external-jxrlib.patch new file mode 100644 index 0000000..d86a18e --- /dev/null +++ b/vcpkg/ports/freeimage/use-external-jxrlib.patch @@ -0,0 +1,14 @@ +diff --git a/Source/FreeImage/PluginJXR.cpp b/Source/FreeImage/PluginJXR.cpp +index 0e14e09..8eb9d5d 100644 +--- a/Source/FreeImage/PluginJXR.cpp ++++ b/Source/FreeImage/PluginJXR.cpp +@@ -23,7 +23,8 @@ + #include "Utilities.h" + #include "../Metadata/FreeImageTag.h" + +-#include "../LibJXR/jxrgluelib/JXRGlue.h" ++#define INITGUID ++#include + + // ========================================================== + // Plugin Interface diff --git a/vcpkg/ports/freeimage/use-external-libtiff.patch b/vcpkg/ports/freeimage/use-external-libtiff.patch new file mode 100644 index 0000000..23d5dfd --- /dev/null +++ b/vcpkg/ports/freeimage/use-external-libtiff.patch @@ -0,0 +1,204 @@ +diff --git a/Source/FreeImage/PluginTIFF.cpp b/Source/FreeImage/PluginTIFF.cpp +index 5068d94..8947b03 100644 +--- a/Source/FreeImage/PluginTIFF.cpp ++++ b/Source/FreeImage/PluginTIFF.cpp +@@ -37,9 +37,9 @@ + + #include "FreeImage.h" + #include "Utilities.h" +-#include "../LibTIFF4/tiffiop.h" ++#include + #include "../Metadata/FreeImageTag.h" + #include "../OpenEXR/Half/half.h" + + #include "FreeImageIO.h" + #include "PSDParser.h" +@@ -199,15 +199,18 @@ Open a TIFF file for reading or writing + @param name + @param mode + */ ++/* + TIFF* + TIFFOpen(const char* name, const char* mode) { + return 0; + } ++*/ + + // ---------------------------------------------------------- + // TIFF library FreeImage-specific routines. + // ---------------------------------------------------------- + ++/* + void* + _TIFFmalloc(tmsize_t s) { + return malloc(s); +@@ -245,6 +248,7 @@ int + _TIFFmemcmp(const void* p1, const void* p2, tmsize_t c) { + return (memcmp(p1, p2, (size_t) c)); + } ++*/ + + // ---------------------------------------------------------- + // in FreeImage warnings and errors are disabled + +diff --git a/Source/Metadata/XTIFF.cpp b/Source/Metadata/XTIFF.cpp +index d5be902..8dbcd5d 100644 +--- a/Source/Metadata/XTIFF.cpp ++++ b/Source/Metadata/XTIFF.cpp +@@ -29,7 +29,7 @@ + #pragma warning (disable : 4786) // identifier was truncated to 'number' characters + #endif + +-#include "../LibTIFF4/tiffiop.h" ++#include + + #include "FreeImage.h" + #include "Utilities.h" +@@ -40,6 +40,43 @@ + // Extended TIFF Directory GEO Tag Support + // ---------------------------------------------------------- + ++// vcpkg: function imported from libtiff/tif_dirinfo.c, in which it is not exported ++/* ++ * Return size of TIFFDataType in bytes. ++ * ++ * XXX: We need a separate function to determine the space needed ++ * to store the value. For TIFF_RATIONAL values TIFFDataWidth() returns 8, ++ * but we use 4-byte float to represent rationals. ++ */ ++int ++FreeImage_TIFFDataSize(TIFFDataType type) ++{ ++ switch (type) ++ { ++ case TIFF_BYTE: ++ case TIFF_SBYTE: ++ case TIFF_ASCII: ++ case TIFF_UNDEFINED: ++ return 1; ++ case TIFF_SHORT: ++ case TIFF_SSHORT: ++ return 2; ++ case TIFF_LONG: ++ case TIFF_SLONG: ++ case TIFF_FLOAT: ++ case TIFF_IFD: ++ case TIFF_RATIONAL: ++ case TIFF_SRATIONAL: ++ return 4; ++ case TIFF_DOUBLE: ++ case TIFF_LONG8: ++ case TIFF_SLONG8: ++ case TIFF_IFD8: ++ return 8; ++ default: ++ return 0; ++ } ++} + /** + Tiff info structure. + Entry format: +@@ -224,6 +261,33 @@ tiff_write_geotiff_profile(TIFF *tif, FIBITMAP *dib) { + // TIFF EXIF tag reading & writing + // ---------------------------------------------------------- + ++static uint32 exif_tag_ids[] = { ++ EXIFTAG_EXPOSURETIME, EXIFTAG_FNUMBER, EXIFTAG_EXPOSUREPROGRAM, ++ EXIFTAG_SPECTRALSENSITIVITY, EXIFTAG_ISOSPEEDRATINGS, EXIFTAG_OECF, ++ EXIFTAG_EXIFVERSION, EXIFTAG_DATETIMEORIGINAL, EXIFTAG_DATETIMEDIGITIZED, ++ EXIFTAG_COMPONENTSCONFIGURATION, EXIFTAG_COMPRESSEDBITSPERPIXEL, ++ EXIFTAG_SHUTTERSPEEDVALUE, EXIFTAG_APERTUREVALUE, ++ EXIFTAG_BRIGHTNESSVALUE, EXIFTAG_EXPOSUREBIASVALUE, ++ EXIFTAG_MAXAPERTUREVALUE, EXIFTAG_SUBJECTDISTANCE, EXIFTAG_METERINGMODE, ++ EXIFTAG_LIGHTSOURCE, EXIFTAG_FLASH, EXIFTAG_FOCALLENGTH, ++ EXIFTAG_SUBJECTAREA, EXIFTAG_MAKERNOTE, EXIFTAG_USERCOMMENT, ++ EXIFTAG_SUBSECTIME, EXIFTAG_SUBSECTIMEORIGINAL, ++ EXIFTAG_SUBSECTIMEDIGITIZED, EXIFTAG_FLASHPIXVERSION, EXIFTAG_COLORSPACE, ++ EXIFTAG_PIXELXDIMENSION, EXIFTAG_PIXELYDIMENSION, ++ EXIFTAG_RELATEDSOUNDFILE, EXIFTAG_FLASHENERGY, ++ EXIFTAG_SPATIALFREQUENCYRESPONSE, EXIFTAG_FOCALPLANEXRESOLUTION, ++ EXIFTAG_FOCALPLANEYRESOLUTION, EXIFTAG_FOCALPLANERESOLUTIONUNIT, ++ EXIFTAG_SUBJECTLOCATION, EXIFTAG_EXPOSUREINDEX, EXIFTAG_SENSINGMETHOD, ++ EXIFTAG_FILESOURCE, EXIFTAG_SCENETYPE, EXIFTAG_CFAPATTERN, ++ EXIFTAG_CUSTOMRENDERED, EXIFTAG_EXPOSUREMODE, EXIFTAG_WHITEBALANCE, ++ EXIFTAG_DIGITALZOOMRATIO, EXIFTAG_FOCALLENGTHIN35MMFILM, ++ EXIFTAG_SCENECAPTURETYPE, EXIFTAG_GAINCONTROL, EXIFTAG_CONTRAST, ++ EXIFTAG_SATURATION, EXIFTAG_SHARPNESS, EXIFTAG_DEVICESETTINGDESCRIPTION, ++ EXIFTAG_SUBJECTDISTANCERANGE, EXIFTAG_GAINCONTROL, EXIFTAG_GAINCONTROL, ++ EXIFTAG_IMAGEUNIQUEID ++}; ++static int nExifTags = sizeof(exif_tag_ids) / sizeof(exif_tag_ids[0]); ++ + /** + Read a single Exif tag + +@@ -575,43 +639,10 @@ tiff_read_exif_tags(TIFF *tif, TagLib::MDMODEL md_model, FIBITMAP *dib) { + + // loop over all Core Directory Tags + // ### uses private data, but there is no other way ++ // -> vcpkg: Best we can do without private headers is to hard-code a list of known EXIF tags and read those + if(md_model == TagLib::EXIF_MAIN) { +- const TIFFDirectory *td = &tif->tif_dir; +- +- uint32 lastTag = 0; //<- used to prevent reading some tags twice (as stored in tif_fieldinfo) +- +- for (int fi = 0, nfi = (int)tif->tif_nfields; nfi > 0; nfi--, fi++) { +- const TIFFField *fld = tif->tif_fields[fi]; +- +- const uint32 tag_id = TIFFFieldTag(fld); +- +- if(tag_id == lastTag) { +- continue; +- } +- +- // test if tag value is set +- // (lifted directly from LibTiff _TIFFWriteDirectory) +- +- if( fld->field_bit == FIELD_CUSTOM ) { +- int is_set = FALSE; +- +- for(int ci = 0; ci < td->td_customValueCount; ci++ ) { +- is_set |= (td->td_customValues[ci].info == fld); +- } +- +- if( !is_set ) { +- continue; +- } +- +- } else if(!TIFFFieldSet(tif, fld->field_bit)) { +- continue; +- } +- +- // process *all* other tags (some will be ignored) +- +- tiff_read_exif_tag(tif, tag_id, dib, md_model); +- +- lastTag = tag_id; ++ for (int i = 0; i < nExifTags; ++i) { ++ tiff_read_exif_tag(tif, exif_tag_ids[i], dib, md_model); + } + + } +@@ -723,10 +754,9 @@ tiff_write_exif_tags(TIFF *tif, TagLib::MDMODEL md_model, FIBITMAP *dib) { + + TagLib& tag_lib = TagLib::instance(); + +- for (int fi = 0, nfi = (int)tif->tif_nfields; nfi > 0; nfi--, fi++) { +- const TIFFField *fld = tif->tif_fields[fi]; +- +- const uint32 tag_id = TIFFFieldTag(fld); ++ for (int fi = 0, nfi = nExifTags; nfi > 0; nfi--, fi++) { ++ const uint32 tag_id = exif_tag_ids[fi]; ++ const TIFFField *fld = TIFFFieldWithTag(tif, tag_id); + + if(skip_write_field(tif, tag_id)) { + // skip tags that are already handled by the LibTIFF writing process +@@ -749,7 +779,7 @@ tiff_write_exif_tags(TIFF *tif, TagLib::MDMODEL md_model, FIBITMAP *dib) { + continue; + } + // type of storage may differ (e.g. rationnal array vs float array type) +- if((unsigned)_TIFFDataSize(tif_tag_type) != FreeImage_TagDataWidth(tag_type)) { ++ if((unsigned)FreeImage_TIFFDataSize(tif_tag_type) != FreeImage_TagDataWidth(tag_type)) { + // skip tag or _TIFFmemcpy will fail + continue; + } diff --git a/vcpkg/ports/freeimage/use-external-openexr.patch b/vcpkg/ports/freeimage/use-external-openexr.patch new file mode 100644 index 0000000..08915da --- /dev/null +++ b/vcpkg/ports/freeimage/use-external-openexr.patch @@ -0,0 +1,44 @@ +diff --git a/Source/FreeImage/PluginEXR.cpp b/Source/FreeImage/PluginEXR.cpp +index b286430..82b3b72 100644 +--- a/Source/FreeImage/PluginEXR.cpp ++++ b/Source/FreeImage/PluginEXR.cpp +@@ -28,16 +28,16 @@ + #pragma warning (disable : 4800) // ImfVersion.h - 'const int' : forcing value to bool 'true' or 'false' (performance warning) + #endif + +-#include "../OpenEXR/IlmImf/ImfIO.h" +-#include "../OpenEXR/Iex/Iex.h" +-#include "../OpenEXR/IlmImf/ImfOutputFile.h" +-#include "../OpenEXR/IlmImf/ImfInputFile.h" +-#include "../OpenEXR/IlmImf/ImfRgbaFile.h" +-#include "../OpenEXR/IlmImf/ImfChannelList.h" +-#include "../OpenEXR/IlmImf/ImfRgba.h" +-#include "../OpenEXR/IlmImf/ImfArray.h" +-#include "../OpenEXR/IlmImf/ImfPreviewImage.h" +-#include "../OpenEXR/Half/half.h" ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + + + // ========================================================== +diff --git a/Source/FreeImage/PluginTIFF.cpp b/Source/FreeImage/PluginTIFF.cpp +index 562fdd7..ce12649 100644 +--- a/Source/FreeImage/PluginTIFF.cpp ++++ b/Source/FreeImage/PluginTIFF.cpp +@@ -39,7 +39,7 @@ + #include "Utilities.h" + #include + #include "../Metadata/FreeImageTag.h" +-#include "../OpenEXR/Half/half.h" ++#include + + #include "FreeImageIO.h" + #include "PSDParser.h" diff --git a/vcpkg/ports/freeimage/use-external-openjpeg.patch b/vcpkg/ports/freeimage/use-external-openjpeg.patch new file mode 100644 index 0000000..fa4f8e7 --- /dev/null +++ b/vcpkg/ports/freeimage/use-external-openjpeg.patch @@ -0,0 +1,39 @@ +diff --git a/Source/FreeImage/J2KHelper.cpp b/Source/FreeImage/J2KHelper.cpp +index 1776c3b..538f1c5 100644 +--- a/Source/FreeImage/J2KHelper.cpp ++++ b/Source/FreeImage/J2KHelper.cpp +@@ -21,7 +21,7 @@ + + #include "FreeImage.h" + #include "Utilities.h" +-#include "../LibOpenJPEG/openjpeg.h" ++#include + #include "J2KHelper.h" + + // -------------------------------------------------------------------------- +diff --git a/Source/FreeImage/PluginJ2K.cpp b/Source/FreeImage/PluginJ2K.cpp +index b8bcfc8..621a903 100644 +--- a/Source/FreeImage/PluginJ2K.cpp ++++ b/Source/FreeImage/PluginJ2K.cpp +@@ -21,7 +21,7 @@ + + #include "FreeImage.h" + #include "Utilities.h" +-#include "../LibOpenJPEG/openjpeg.h" ++#include + #include "J2KHelper.h" + + // ========================================================== +diff --git a/Source/FreeImage/PluginJP2.cpp b/Source/FreeImage/PluginJP2.cpp +index 742fe2c..c57f626 100644 +--- a/Source/FreeImage/PluginJP2.cpp ++++ b/Source/FreeImage/PluginJP2.cpp +@@ -21,7 +21,7 @@ + + #include "FreeImage.h" + #include "Utilities.h" +-#include "../LibOpenJPEG/openjpeg.h" ++#include + #include "J2KHelper.h" + + // ========================================================== diff --git a/vcpkg/ports/freeimage/use-external-png-zlib.patch b/vcpkg/ports/freeimage/use-external-png-zlib.patch new file mode 100644 index 0000000..da489b6 --- /dev/null +++ b/vcpkg/ports/freeimage/use-external-png-zlib.patch @@ -0,0 +1,40 @@ +diff --git a/Source/FreeImage/PluginPNG.cpp b/Source/FreeImage/PluginPNG.cpp +index ba2ef17..c3c5cd6 100644 +--- a/Source/FreeImage/PluginPNG.cpp ++++ b/Source/FreeImage/PluginPNG.cpp +@@ -40,8 +40,8 @@ + + // ---------------------------------------------------------- + +-#include "../ZLib/zlib.h" +-#include "../LibPNG/png.h" ++#include ++#include + + // ---------------------------------------------------------- + +diff --git a/Source/FreeImage/ZLibInterface.cpp b/Source/FreeImage/ZLibInterface.cpp +index 3ab6d32..725618b 100644 +--- a/Source/FreeImage/ZLibInterface.cpp ++++ b/Source/FreeImage/ZLibInterface.cpp +@@ -19,10 +19,9 @@ + // Use at your own risk! + // ========================================================== + +-#include "../ZLib/zlib.h" ++#include + #include "FreeImage.h" + #include "Utilities.h" +-#include "../ZLib/zutil.h" /* must be the last header because of error C3163 in VS2008 (_vsnprintf defined in stdio.h) */ + + /** + Compresses a source buffer into a target buffer, using the ZLib library. +@@ -115,7 +114,7 @@ FreeImage_ZLibGZip(BYTE *target, DWORD target_size, BYTE *source, DWORD source_s + return 0; + case Z_OK: { + // patch header, setup crc and length (stolen from mod_trace_output) +- BYTE *p = target + 8; *p++ = 2; *p = OS_CODE; // xflags, os_code ++ BYTE *p = target + 8; *p++ = 2; *p = 0x03; // xflags, os_code + crc = crc32(crc, source, source_size); + memcpy(target + 4 + dest_len, &crc, 4); + memcpy(target + 8 + dest_len, &source_size, 4); diff --git a/vcpkg/ports/freeimage/use-external-rawlib.patch b/vcpkg/ports/freeimage/use-external-rawlib.patch new file mode 100644 index 0000000..6afa0bf --- /dev/null +++ b/vcpkg/ports/freeimage/use-external-rawlib.patch @@ -0,0 +1,13 @@ +diff --git a/Source/FreeImage/PluginRAW.cpp b/Source/FreeImage/PluginRAW.cpp +index e9bd5bf..c7f8758 100644 +--- a/Source/FreeImage/PluginRAW.cpp ++++ b/Source/FreeImage/PluginRAW.cpp +@@ -19,7 +19,7 @@ + // Use at your own risk! + // ========================================================== + +-#include "../LibRawLite/libraw/libraw.h" ++#include + + #include "FreeImage.h" + #include "Utilities.h" diff --git a/vcpkg/ports/freeimage/use-external-webp.patch b/vcpkg/ports/freeimage/use-external-webp.patch new file mode 100644 index 0000000..4d1757c --- /dev/null +++ b/vcpkg/ports/freeimage/use-external-webp.patch @@ -0,0 +1,17 @@ +diff --git a/Source/FreeImage/PluginWebP.cpp b/Source/FreeImage/PluginWebP.cpp +index 7c9f62f..c401447 100644 +--- a/Source/FreeImage/PluginWebP.cpp ++++ b/Source/FreeImage/PluginWebP.cpp +@@ -24,9 +24,9 @@ + + #include "../Metadata/FreeImageTag.h" + +-#include "../LibWebP/src/webp/decode.h" +-#include "../LibWebP/src/webp/encode.h" +-#include "../LibWebP/src/webp/mux.h" ++#include ++#include ++#include + + // ========================================================== + // Plugin Interface diff --git a/vcpkg/ports/freeimage/use-freeimage-config-include.patch b/vcpkg/ports/freeimage/use-freeimage-config-include.patch new file mode 100644 index 0000000..579f088 --- /dev/null +++ b/vcpkg/ports/freeimage/use-freeimage-config-include.patch @@ -0,0 +1,16 @@ +diff --git a/Source/FreeImage.h b/Source/FreeImage.h +index 12182cd..86a1e68 100644 +--- a/Source/FreeImage.h ++++ b/Source/FreeImage.h +@@ -32,6 +32,11 @@ + #define FREEIMAGE_MINOR_VERSION 18 + #define FREEIMAGE_RELEASE_SERIAL 0 + ++// vcpkg specific includes -------------------------------------------------- ++// Include FreeImageConfig.h to define FREEIMAGE_LIB in static builds, ++// or do not define it in dynamic builds ++#include "FreeImageConfig.h" ++ + // Compiler options --------------------------------------------------------- + + #include // needed for UNICODE functions diff --git a/vcpkg/ports/freeimage/use-functions-to-override-libtiff-warning-error-handlers.patch b/vcpkg/ports/freeimage/use-functions-to-override-libtiff-warning-error-handlers.patch new file mode 100644 index 0000000..270331e --- /dev/null +++ b/vcpkg/ports/freeimage/use-functions-to-override-libtiff-warning-error-handlers.patch @@ -0,0 +1,31 @@ +diff --git a/Source/FreeImage/PluginTIFF.cpp b/Source/FreeImage/PluginTIFF.cpp +index a9fcf0e..b1f7b32 100644 +--- a/Source/FreeImage/PluginTIFF.cpp ++++ b/Source/FreeImage/PluginTIFF.cpp +@@ -258,7 +258,7 @@ static void + msdosWarningHandler(const char* module, const char* fmt, va_list ap) { + } + +-TIFFErrorHandler _TIFFwarningHandler = msdosWarningHandler; ++//TIFFErrorHandler _TIFFwarningHandler = msdosWarningHandler; + + static void + msdosErrorHandler(const char* module, const char* fmt, va_list ap) { +@@ -273,7 +273,7 @@ msdosErrorHandler(const char* module, const char* fmt, va_list ap) { + */ + } + +-TIFFErrorHandler _TIFFerrorHandler = msdosErrorHandler; ++//TIFFErrorHandler _TIFFerrorHandler = msdosErrorHandler; + + // ---------------------------------------------------------- + +@@ -2659,6 +2659,8 @@ InitTIFF(Plugin *plugin, int format_id) { + // Set up the callback for extended TIFF directory tag support (see XTIFF.cpp) + // Must be called before using libtiff + XTIFFInitialize(); ++ TIFFSetWarningHandler(msdosWarningHandler); ++ TIFFSetErrorHandler(msdosErrorHandler); + + plugin->format_proc = Format; + plugin->description_proc = Description; diff --git a/vcpkg/ports/freeimage/use-typedef-as-already-declared.patch b/vcpkg/ports/freeimage/use-typedef-as-already-declared.patch new file mode 100644 index 0000000..80d367b --- /dev/null +++ b/vcpkg/ports/freeimage/use-typedef-as-already-declared.patch @@ -0,0 +1,15 @@ +diff --git a/Source/FreeImage.h b/Source/FreeImage.h +index 1fd9c2f..59de277 100644 +--- a/Source/FreeImage.h ++++ b/Source/FreeImage.h +@@ -160,8 +160,8 @@ typedef uint8_t BYTE; + typedef uint16_t WORD; + typedef uint32_t DWORD; + typedef int32_t LONG; +-typedef int64_t INT64; +-typedef uint64_t UINT64; ++typedef long long int INT64; ++typedef long long unsigned int UINT64; + #else + // MS is not C99 ISO compliant + typedef long BOOL; diff --git a/vcpkg/ports/freeopcua/CONTROL b/vcpkg/ports/freeopcua/CONTROL new file mode 100644 index 0000000..29a273f --- /dev/null +++ b/vcpkg/ports/freeopcua/CONTROL @@ -0,0 +1,4 @@ +Source: freeopcua +Version: 20190125-3 +Description: OPC-UA server and client library written in C++ and with a lot of code auto-generated from xml specification using python. +Build-Depends: boost-asio,boost-system,boost-program-options,boost-filesystem,boost-thread,boost-format,boost-foreach,boost-property-tree,boost-date-time diff --git a/vcpkg/ports/freeopcua/boost-1.70.patch b/vcpkg/ports/freeopcua/boost-1.70.patch new file mode 100644 index 0000000..d099af4 --- /dev/null +++ b/vcpkg/ports/freeopcua/boost-1.70.patch @@ -0,0 +1,29 @@ +diff --git a/src/server/opc_tcp_async.cpp b/src/server/opc_tcp_async.cpp +index 9c34d72..9e68d9b 100644 +--- a/src/server/opc_tcp_async.cpp ++++ b/src/server/opc_tcp_async.cpp +@@ -106,7 +106,11 @@ public: + */ + typedef std::promise Promise; + Promise promise; ++#if BOOST_VERSION >= 107000 ++ boost::asio::post(Socket.get_executor(), bind(&Promise::set_value, &promise)); ++#else + Socket.get_io_service().post(bind(&Promise::set_value, &promise)); ++#endif + promise.get_future().wait(); + } + +@@ -372,7 +376,11 @@ void OpcTcpServer::Shutdown() + */ + typedef std::promise Promise; + Promise promise; +- acceptor.get_io_service().post(bind(&Promise::set_value, &promise)); ++#if BOOST_VERSION >= 107000 ++ boost::asio::post(acceptor.get_executor(), bind(&Promise::set_value, &promise)); ++#else ++ acceptor.get_io_service().post(bind(&Promise::set_value, &promise)); ++#endif + promise.get_future().wait(); + } + diff --git a/vcpkg/ports/freeopcua/cmakelists_fixes.patch b/vcpkg/ports/freeopcua/cmakelists_fixes.patch new file mode 100644 index 0000000..f818eab --- /dev/null +++ b/vcpkg/ports/freeopcua/cmakelists_fixes.patch @@ -0,0 +1,238 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index de03564..df3fcf6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,11 +1,8 @@ + cmake_minimum_required(VERSION 2.8) + +-#It seems Cmake does not set default bild type so we force it +-if( NOT CMAKE_BUILD_TYPE ) +- set( CMAKE_BUILD_TYPE Debug CACHE STRING "Debug" FORCE ) +-endif() +- + project(freeopcua) ++set(CMAKE_CXX_STANDARD 11) ++set(CMAKE_POSITION_INDEPENDENT_CODE ON) + + option(BUILD_CLIENT "Build Client" ON) + option(BUILD_SERVER "Build Server" ON) +@@ -16,28 +13,6 @@ option(BUILD_PYTHON "Build Python bindings" ON) + option(BUILD_TESTING "Build and run tests" OFF) + OPTION(BUILD_SHARED_LIBS "Build shared libraries." ON) + +-IF (NOT DEFINED CMAKE_INSTALL_LIBDIR) +- SET(CMAKE_INSTALL_LIBDIR lib) +-ENDIF () +- +-SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY +- ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR} +- CACHE PATH +- "" +- ) +- +-SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY +- ${PROJECT_BINARY_DIR}/bin +- CACHE PATH +- "" +- ) +- +-SET (CMAKE_ARCHIVE_OUTPUT_DIRECTORY +- ${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR} +- CACHE PATH +- "" +- ) +- + # Helper function to generate a pkg-config file for a single library + # Takes the filename of the .pc file as a parameter and replaces all + # placeholders in the .pc.in file with the actual values +@@ -60,23 +35,9 @@ function(generate_pkgconfig BASENAME) + endif() + endfunction(generate_pkgconfig) + if(MSVC) +- SET(STATIC_LIBRARY_CXX_FLAGS /MDd CACHE STRING "") +- SET(EXECUTABLE_CXX_FLAGS /MDd CACHE STRING "") +- SET(DYNAMIC_LIBRARY_CXX_FLAGS /MDd CACHE STRING "") +- SET(D /D) +- +- add_definitions(/D_SCL_SECURE_NO_WARNINGS /D_CRT_SECURE_NO_WARNINGS /D_WIN32 /D_WINDOWS /FS /D_WIN32_WINNT=0x0600) +- add_compile_options(/Zi /Od /EHsc /W4) +-else(MSVC) +- set(CMAKE_CXX_FLAGS_DEBUG " -Wall -ggdb -o0 ${CMAKE_CXX_FLAGS_DEBUG}") +- +- SET(STATIC_LIBRARY_CXX_FLAGS) +- SET(EXECUTABLE_CXX_FLAGS) +- SET(DYNAMIC_LIBRARY_CXX_FLAGS) +- SET(D -D) +- set(CMAKE_CXX_FLAGS " -std=c++11 -Wall -fPIC ${CMAKE_CXX_FLAGS} ") +- SET (CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS_INIT} $ENV{LDFLAGS}) +- #set(CMAKE_SHARED_LINKER_FLAGS "--no-undefined" ) ++ add_definitions(-D_SCL_SECURE_NO_WARNINGS) ++ add_definitions(-D_CRT_SECURE_NO_WARNINGS) ++ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) + endif() + + if(WIN32) +@@ -105,7 +66,7 @@ else(WIN32) + + endif(WIN32) + +-find_package( Boost COMPONENTS system program_options filesystem thread REQUIRED ) ++find_package( Boost COMPONENTS system program_options filesystem thread date_time REQUIRED ) + include_directories( ${Boost_INCLUDE_DIRS} ) + link_directories( ${Boost_LIBRARY_DIRS} ) + message(STATUS "Boost INCLUDE DIR IS: " ${Boost_INCLUDE_DIRS}) +@@ -185,14 +146,12 @@ add_library(opcuaprotocol + src/protocol/subscriptions.cpp + ) + +-if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) +- target_compile_options(opcuaprotocol PUBLIC ${STATIC_LIBRARY_CXX_FLAGS}) +-endif () + target_link_libraries(opcuaprotocol ${ADDITIONAL_LINK_LIBRARIES}) + target_include_directories(opcuaprotocol PUBLIC $) + install(TARGETS opcuaprotocol EXPORT FreeOpcUa ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/static) ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + generate_pkgconfig("libopcuaprotocol.pc") + +@@ -227,10 +186,6 @@ if (BUILD_TESTING) + gtest_main + ) + +- if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) +- target_compile_options(test_opcuaprotocol PUBLIC ${EXECUTABLE_CXX_FLAGS}) +- endif () +- + add_test(NAME opcuaprotocol COMMAND test_opcuaprotocol) + endif() + +@@ -266,15 +221,12 @@ SET(opcuacore_SOURCES + + add_library(opcuacore ${opcuacore_SOURCES}) + +-if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) +- target_compile_options(opcuacore PUBLIC ${STATIC_LIBRARY_CXX_FLAGS}) +-endif () +- +-target_link_libraries(opcuacore ${ADDITIONAL_LINK_LIBRARIES} opcuaprotocol ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY}) ++target_link_libraries(opcuacore ${ADDITIONAL_LINK_LIBRARIES} opcuaprotocol ${Boost_LIBRARIES}) + target_include_directories(opcuacore PUBLIC $) + install(TARGETS opcuacore EXPORT FreeOpcUa ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/static) ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + generate_pkgconfig("libopcuacore.pc") + +@@ -306,7 +258,7 @@ if (BUILD_TESTING) + ) + + if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) +- target_compile_options(test_opcuacore PUBLIC ${D}DYNAMIC_ADDON_PATH="${DYNAMIC_ADDON_PATH}" ${D}TEST_CORE_CONFIG_PATH="${TEST_CORE_CONFIG_PATH}" ${EXECUTABLE_CXX_FLAGS}) ++ target_compile_options(test_opcuacore PUBLIC -DDYNAMIC_ADDON_PATH="${DYNAMIC_ADDON_PATH}" -DTEST_CORE_CONFIG_PATH="${TEST_CORE_CONFIG_PATH}" ) + endif () + + add_test(NAME opcuacore COMMAND test_opcuacore) +@@ -327,9 +279,6 @@ if (BUILD_CLIENT) + src/client/client.cpp + ) + +- if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) +- target_compile_options(opcuaclient PUBLIC ${STATIC_LIBRARY_CXX_FLAGS}) +- endif () + target_link_libraries(opcuaclient + opcuacore + ${ADDITIONAL_LINK_LIBRARIES} +@@ -338,8 +287,9 @@ if (BUILD_CLIENT) + + target_include_directories(opcuaclient PUBLIC $) + install(TARGETS opcuaclient EXPORT FreeOpcUa ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/static) ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + generate_pkgconfig("libopcuaclient.pc") + +@@ -371,9 +321,6 @@ if (BUILD_CLIENT) + opcuacore + ) + +- if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) +- target_compile_options(opcuaclient PUBLIC ${EXECUTABLE_CXX_FLAGS}) +- endif () + endif(BUILD_CLIENT) + + +@@ -423,14 +370,12 @@ if(BUILD_SERVER) + src/server/subscription_service_internal.cpp + ) + +- if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) +- target_compile_options(opcuaserver PUBLIC ${STATIC_LIBRARY_CXX_FLAGS}) +- endif () +- target_link_libraries(opcuaserver ${ADDITIONAL_LINK_LIBRARIES} opcuacore opcuaprotocol ${Boost_SYSTEM_LIBRARY}) ++ target_link_libraries(opcuaserver ${ADDITIONAL_LINK_LIBRARIES} opcuacore opcuaprotocol ${Boost_LIBRARIES}) + target_include_directories(opcuaserver PUBLIC $) + install(TARGETS opcuaserver EXPORT FreeOpcUa ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/static) ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + generate_pkgconfig("libopcuaserver.pc") + +@@ -481,7 +426,7 @@ if(BUILD_SERVER) + + target_include_directories(test_opcuaserver PUBLIC .) + if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) +- target_compile_options(test_opcuaserver PUBLIC ${D}TEST_CORE_CONFIG_PATH="${TEST_CORE_CONFIG_PATH}" ${STATIC_LIBRARY_CXX_FLAGS}) ++ target_compile_options(test_opcuaserver PUBLIC -DTEST_CORE_CONFIG_PATH="${TEST_CORE_CONFIG_PATH}") + endif () + + add_test(NAME opcuaserverapp COMMAND test_opcuaserver) +@@ -510,9 +455,6 @@ if(BUILD_SERVER) + opcuaserver + ${Boost_PROGRAM_OPTIONS_LIBRARY} + ) +- if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) +- target_compile_options(opcuaserverapp PUBLIC ${EXECUTABLE_CXX_FLAGS}) +- endif () + + endif(BUILD_SERVER) + +@@ -533,9 +475,6 @@ if (BUILD_CLIENT) + ${SSL_SUPPORT_LINK_LIBRARIES} + ) + +- if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) +- target_compile_options(example_client PUBLIC ${EXECUTABLE_CXX_FLAGS}) +- endif () + + endif (BUILD_CLIENT) + +@@ -555,9 +494,6 @@ if(BUILD_SERVER) + opcuaserver + ) + +- if (NOT CMAKE_VERSION VERSION_LESS 2.8.12) +- target_compile_options(example_server PUBLIC ${EXECUTABLE_CXX_FLAGS}) +- endif () + if(MSVC) + set_target_properties(example_server PROPERTIES LINK_FLAGS /STACK:3000000) + endif(MSVC) +@@ -572,8 +508,8 @@ if (BUILD_PYTHON) + add_subdirectory(python) + endif (BUILD_PYTHON) + +-install(EXPORT FreeOpcUa DESTINATION lib/cmake/FreeOpcUa FILE FreeOpcUaConfig.cmake) ++install(EXPORT FreeOpcUa DESTINATION share/freeopcua FILE freeopcuaConfig.cmake) + + SET(CPACK_GENERATOR "DEB") +-SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "FreeOpcUa") ++SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "freeopcua") + INCLUDE(CPack) diff --git a/vcpkg/ports/freeopcua/fix-std-headers.patch b/vcpkg/ports/freeopcua/fix-std-headers.patch new file mode 100644 index 0000000..d846a61 --- /dev/null +++ b/vcpkg/ports/freeopcua/fix-std-headers.patch @@ -0,0 +1,24 @@ +diff --git a/include/opc/ua/protocol/utils.h b/include/opc/ua/protocol/utils.h +index e23bffe..5c8c2ad 100644 +--- a/include/opc/ua/protocol/utils.h ++++ b/include/opc/ua/protocol/utils.h +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + namespace OpcUa + { +diff --git a/src/core/model_impl.h b/src/core/model_impl.h +index 0f548c5..c29626b 100644 +--- a/src/core/model_impl.h ++++ b/src/core/model_impl.h +@@ -20,6 +20,7 @@ + #pragma once + + #include ++#include + + namespace OpcUa + { diff --git a/vcpkg/ports/freeopcua/improve_compatibility_with_recent_boost.patch b/vcpkg/ports/freeopcua/improve_compatibility_with_recent_boost.patch new file mode 100644 index 0000000..14e78a6 --- /dev/null +++ b/vcpkg/ports/freeopcua/improve_compatibility_with_recent_boost.patch @@ -0,0 +1,54 @@ +diff --git a/include/opc/ua/services/services.h b/include/opc/ua/services/services.h +index f138831..4732a59 100644 +--- a/include/opc/ua/services/services.h ++++ b/include/opc/ua/services/services.h +@@ -26,20 +26,7 @@ + #include + + #include +- +- +-namespace boost +-{ +-namespace asio +-{ +-#if BOOST_VERSION < 106600 +- class io_service; +-#else +- class io_context; +- typedef io_context io_service; +-#endif +-} +-} ++#include + + namespace OpcUa + { +diff --git a/src/server/internal_subscription.cpp b/src/server/internal_subscription.cpp +index edf4715..69ef74a 100644 +--- a/src/server/internal_subscription.cpp ++++ b/src/server/internal_subscription.cpp +@@ -14,7 +14,7 @@ InternalSubscription::InternalSubscription(SubscriptionServiceInternal & service + , CurrentSession(SessionAuthenticationToken) + , Callback(callback) + , io(service.GetIOService()) +- , Timer(io, boost::posix_time::milliseconds(data.RevisedPublishingInterval)) ++ , Timer(io, boost::posix_time::milliseconds((int)data.RevisedPublishingInterval)) + , LifeTimeCount(data.RevisedLifetimeCount) + , Logger(logger) + { +@@ -105,7 +105,7 @@ void InternalSubscription::PublishResults(const boost::system::error_code & erro + } + + TimerStopped = false; +- Timer.expires_at(Timer.expires_at() + boost::posix_time::milliseconds(Data.RevisedPublishingInterval)); ++ Timer.expires_at(Timer.expires_at() + boost::posix_time::milliseconds((int)Data.RevisedPublishingInterval)); + std::shared_ptr self = shared_from_this(); + Timer.async_wait([self](const boost::system::error_code & error) { self->PublishResults(error); }); + } +@@ -615,5 +615,3 @@ std::vector InternalSubscription::GetEventFields(const EventFilter & fi + + } + } +- +- diff --git a/vcpkg/ports/freeopcua/include_asio_first.patch b/vcpkg/ports/freeopcua/include_asio_first.patch new file mode 100644 index 0000000..d540a38 --- /dev/null +++ b/vcpkg/ports/freeopcua/include_asio_first.patch @@ -0,0 +1,138 @@ +diff --git a/src/core/subscription.cpp b/src/core/subscription.cpp +index b690d3a..fdac2f3 100644 +--- a/src/core/subscription.cpp ++++ b/src/core/subscription.cpp +@@ -17,11 +17,10 @@ + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ******************************************************************************/ + +- +-#include ++#include + #include ++#include + +-#include + #include + + namespace OpcUa +diff --git a/src/server/asio_addon.cpp b/src/server/asio_addon.cpp +index 795a6b2..532ac3c 100644 +--- a/src/server/asio_addon.cpp ++++ b/src/server/asio_addon.cpp +@@ -17,9 +17,9 @@ + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ******************************************************************************/ + ++#include + #include + +-#include + #include + #include + +diff --git a/src/server/internal_subscription.h b/src/server/internal_subscription.h +index d42aa65..dd193a9 100644 +--- a/src/server/internal_subscription.h ++++ b/src/server/internal_subscription.h +@@ -1,6 +1,7 @@ + + #pragma once + ++#include + //#include "address_space_internal.h" + #include "subscription_service_internal.h" + +@@ -11,7 +12,6 @@ + #include + #include + +-#include + #include + #include + #include +@@ -115,5 +115,3 @@ private: + + } + } +- +- +diff --git a/src/server/opc_tcp_async.cpp b/src/server/opc_tcp_async.cpp +index dc700c2..f3a66b8 100644 +--- a/src/server/opc_tcp_async.cpp ++++ b/src/server/opc_tcp_async.cpp +@@ -17,6 +17,7 @@ + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ******************************************************************************/ + ++#include + #include "opc_tcp_processor.h" + + #include +@@ -29,7 +30,6 @@ + #include + + #include +-#include + #include + #include + #include +diff --git a/src/server/subscription_service_internal.h b/src/server/subscription_service_internal.h +index 6b16e1d..f7e5dfe 100644 +--- a/src/server/subscription_service_internal.h ++++ b/src/server/subscription_service_internal.h +@@ -9,6 +9,7 @@ + + #pragma once + ++#include + #include "address_space_addon.h" + #include "internal_subscription.h" + +@@ -20,7 +21,6 @@ + #include + #include + +-#include + #include + #include + #include +@@ -76,4 +76,3 @@ private: + } + + } +- +diff --git a/src/server/tcp_server.cpp b/src/server/tcp_server.cpp +index b4f2000..2430820 100644 +--- a/src/server/tcp_server.cpp ++++ b/src/server/tcp_server.cpp +@@ -8,9 +8,6 @@ + /// http://www.gnu.org/licenses/lgpl.html) + /// + +-#ifdef _WIN32 +-#include +-#endif + + #include "tcp_server.h" + +@@ -34,8 +31,18 @@ + #include + #include + +- + #ifdef _WIN32 ++#include ++#include ++#if !defined SHUT_RD && defined SD_RECEIVE ++#define SHUT_RD SD_RECEIVE ++#endif ++#if !defined SHUT_WR && defined SD_SEND ++#define SHUT_WR SD_SEND ++#endif ++#if !defined SHUT_RDWR && defined SD_BOTH ++#define SHUT_RDWR SD_BOTH ++#endif + #else + #include + #include diff --git a/vcpkg/ports/freeopcua/portfile.cmake b/vcpkg/ports/freeopcua/portfile.cmake new file mode 100644 index 0000000..76e9508 --- /dev/null +++ b/vcpkg/ports/freeopcua/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO FreeOpcUa/freeopcua + REF 2f2c886eb2da46b9dc8944c8f79ac31a9f116a81 + SHA512 f19c1489eb116224ac3192e646c08cf3967c9a07064a09c4cbdef89d93e98c7541bb3edd030be22f6daf3f831ff92a324bc3734a8fe34cdd9d5a5ff7cb7f2f19 + HEAD_REF master + PATCHES + cmakelists_fixes.patch + improve_compatibility_with_recent_boost.patch + use_another_implementation_of_has_begin_end.patch + uri_facade_win.patch + serverObj.patch + include_asio_first.patch + boost-1.70.patch + fix-std-headers.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_PYTHON=OFF + -DBUILD_TESTING=OFF + -DSSL_SUPPORT_MBEDTLS=OFF + -DCMAKE_DEBUG_POSTFIX=d +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +#Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/freeopcua RENAME copyright) diff --git a/vcpkg/ports/freeopcua/serverObj.patch b/vcpkg/ports/freeopcua/serverObj.patch new file mode 100644 index 0000000..6680e58 --- /dev/null +++ b/vcpkg/ports/freeopcua/serverObj.patch @@ -0,0 +1,14 @@ +diff --git a/src/server/server_object.cpp b/src/server/server_object.cpp +index f35b168..b6c816a 100644 +--- a/src/server/server_object.cpp ++++ b/src/server/server_object.cpp +@@ -25,9 +25,6 @@ + #include + #include + +-#ifdef WIN32 +-#undef GetObject +-#endif + + namespace + { diff --git a/vcpkg/ports/freeopcua/uri_facade_win.patch b/vcpkg/ports/freeopcua/uri_facade_win.patch new file mode 100644 index 0000000..e6cc601 --- /dev/null +++ b/vcpkg/ports/freeopcua/uri_facade_win.patch @@ -0,0 +1,28 @@ +diff --git a/src/core/common/uri_facade_win.cpp b/src/core/common/uri_facade_win.cpp +index 1a807fb..c579e2d 100644 +--- a/src/core/common/uri_facade_win.cpp ++++ b/src/core/common/uri_facade_win.cpp +@@ -19,7 +19,7 @@ + namespace Common + { + +-void Uri::Initialize(const char * uriString, std::size_t size) ++void Uri::Initialize(const std::string& uriString) + { + URL_COMPONENTS url = {0}; + url.dwStructSize = sizeof(url); +@@ -31,7 +31,7 @@ void Uri::Initialize(const char * uriString, std::size_t size) + + // TODO msdn says do not use this function in services and in server patforms. :( + // TODO http://msdn.microsoft.com/en-us/library/windows/desktop/aa384376(v=vs.85).aspx +- if (!InternetCrackUrl(uriString, size, options, &url)) ++ if (!InternetCrackUrl(uriString.c_str(), uriString.size(), options, &url)) + { + THROW_ERROR1(CannotParseUri, uriString); + } +@@ -50,5 +50,3 @@ void Uri::Initialize(const char * uriString, std::size_t size) + } + + } // namespace Common +- +- diff --git a/vcpkg/ports/freeopcua/use_another_implementation_of_has_begin_end.patch b/vcpkg/ports/freeopcua/use_another_implementation_of_has_begin_end.patch new file mode 100644 index 0000000..34fa77f --- /dev/null +++ b/vcpkg/ports/freeopcua/use_another_implementation_of_has_begin_end.patch @@ -0,0 +1,39 @@ +diff --git a/include/opc/ua/protocol/variant.h b/include/opc/ua/protocol/variant.h +index 9dc5b15..317cb17 100644 +--- a/include/opc/ua/protocol/variant.h ++++ b/include/opc/ua/protocol/variant.h +@@ -76,22 +76,25 @@ public: + template + struct has_begin_end + { +- template static char (&f(typename std::enable_if < +- std::is_same(&C::begin)), +- typename C::const_iterator(C::*)() const>::value, void >::type *))[1]; ++ struct Dummy { typedef void const_iterator; }; ++ typedef typename std::conditional::value, T, Dummy>::type TType; ++ typedef typename TType::const_iterator iter; + +- template static char (&f(...))[2]; ++ struct Fallback { iter begin() const; iter end() const; }; ++ struct Derived : TType, Fallback { }; + +- template static char (&g(typename std::enable_if < +- std::is_same(&C::end)), +- typename C::const_iterator(C::*)() const>::value, void >::type *))[1]; ++ template struct ChT; + ++ template static char (&f(ChT*))[1]; ++ template static char (&f(...))[2]; ++ template static char (&g(ChT*))[1]; + template static char (&g(...))[2]; + +- static bool const beg_value = sizeof(f(0)) == 1; +- static bool const end_value = sizeof(g(0)) == 1; ++ static bool const beg_value = sizeof(f(0)) == 2; ++ static bool const end_value = sizeof(g(0)) == 2; + }; + ++ + template + struct is_container_not_string : std::integral_constant < bool, has_const_iterator::value && has_begin_end::beg_value && has_begin_end::end_value > + { }; diff --git a/vcpkg/ports/freerdp/CONTROL b/vcpkg/ports/freerdp/CONTROL new file mode 100644 index 0000000..1c78dfb --- /dev/null +++ b/vcpkg/ports/freerdp/CONTROL @@ -0,0 +1,10 @@ +Source: freerdp +Version: 2.2.0 +Homepage: https://github.com/FreeRDP/FreeRDP +Description: A free implementation of the Remote Desktop Protocol (RDP) +Build-Depends: openssl, glib (!windows) +Supports: !(arm|uwp) + +Feature: urbdrc +Description: USB redirection channel support +Build-Depends: libusb diff --git a/vcpkg/ports/freerdp/DontInstallSystemRuntimeLibs.patch b/vcpkg/ports/freerdp/DontInstallSystemRuntimeLibs.patch new file mode 100644 index 0000000..7a1d542 --- /dev/null +++ b/vcpkg/ports/freerdp/DontInstallSystemRuntimeLibs.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake +index 6ccfc7d..75479bf 100644 +--- a/CMakeCPack.cmake ++++ b/CMakeCPack.cmake +@@ -67,9 +67,9 @@ if(MSVC) + set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE) + include(InstallRequiredSystemLibraries) + +- install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} +- DESTINATION ${CMAKE_INSTALL_BINDIR} +- COMPONENT libraries) ++ # install(PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ++ # DESTINATION ${CMAKE_INSTALL_BINDIR} ++ # COMPONENT libraries) + endif() + endif() + diff --git a/vcpkg/ports/freerdp/fix-include-path.patch b/vcpkg/ports/freerdp/fix-include-path.patch new file mode 100644 index 0000000..4a9f7d6 --- /dev/null +++ b/vcpkg/ports/freerdp/fix-include-path.patch @@ -0,0 +1,52 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 97ba2f9..64a2f33 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -107,7 +107,7 @@ else() + endif() + message("FREERDP_VERSION=${FREERDP_VERSION_FULL}") + +-set(FREERDP_INCLUDE_DIR "include/freerdp${FREERDP_VERSION_MAJOR}/") ++set(FREERDP_INCLUDE_DIR "include/freerdp/") + + # Compatibility options + if(DEFINED STATIC_CHANNELS) +diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt +index a020dc5..0bc1157 100644 +--- a/include/CMakeLists.txt ++++ b/include/CMakeLists.txt +@@ -19,7 +19,7 @@ + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/freerdp/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/freerdp/version.h) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/freerdp/build-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/freerdp/build-config.h) +-set(FREERDP_INSTALL_INCLUDE_DIR include/freerdp${FREERDP_VERSION_MAJOR}/freerdp) ++set(FREERDP_INSTALL_INCLUDE_DIR include/freerdp) + + file(GLOB FREERDP_HEADERS "freerdp/*.h") + install(FILES ${FREERDP_HEADERS} DESTINATION ${FREERDP_INSTALL_INCLUDE_DIR} COMPONENT headers) +diff --git a/winpr/CMakeLists.txt b/winpr/CMakeLists.txt +index a94090a..08b6b88 100644 +--- a/winpr/CMakeLists.txt ++++ b/winpr/CMakeLists.txt +@@ -215,7 +215,7 @@ if(${CMAKE_VERSION} VERSION_GREATER "2.8.10") + + SetFreeRDPCMakeInstallDir(WINPR_CMAKE_INSTALL_DIR "WinPR${WINPR_VERSION_MAJOR}") + +- set(WINPR_INCLUDE_DIR "include/winpr${WINPR_VERSION_MAJOR}") ++ set(WINPR_INCLUDE_DIR "include/winpr") + + configure_package_config_file(WinPRConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/WinPRConfig.cmake + INSTALL_DESTINATION ${WINPR_CMAKE_INSTALL_DIR} +diff --git a/winpr/include/CMakeLists.txt b/winpr/include/CMakeLists.txt +index 452383d..3faab0c 100644 +--- a/winpr/include/CMakeLists.txt ++++ b/winpr/include/CMakeLists.txt +@@ -17,7 +17,7 @@ + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/winpr/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/winpr/version.h) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/winpr/wtypes.h.in ${CMAKE_CURRENT_BINARY_DIR}/winpr/wtypes.h) +-set(WINPR_INSTALL_INCLUDE_DIR include/winpr${WINPR_VERSION_MAJOR}/winpr) ++set(WINPR_INSTALL_INCLUDE_DIR include/winpr) + + file(GLOB WINPR_HEADERS "winpr/*.h") + install(FILES ${WINPR_HEADERS} DESTINATION ${WINPR_INSTALL_INCLUDE_DIR} COMPONENT headers) diff --git a/vcpkg/ports/freerdp/fix-libusb.patch b/vcpkg/ports/freerdp/fix-libusb.patch new file mode 100644 index 0000000..c6da6eb --- /dev/null +++ b/vcpkg/ports/freerdp/fix-libusb.patch @@ -0,0 +1,44 @@ +diff --git a/channels/urbdrc/client/libusb/libusb_udevice.c b/channels/urbdrc/client/libusb/libusb_udevice.c +index 214cb7a..56c986c 100644 +--- a/channels/urbdrc/client/libusb/libusb_udevice.c ++++ b/channels/urbdrc/client/libusb/libusb_udevice.c +@@ -184,7 +184,7 @@ static void async_transfer_user_data_free(ASYNC_TRANSFER_USER_DATA* user_data) + } + } + +-static void func_iso_callback(struct libusb_transfer* transfer) ++static void LIBUSB_CALL func_iso_callback(struct libusb_transfer* transfer) + { + ASYNC_TRANSFER_USER_DATA* user_data = (ASYNC_TRANSFER_USER_DATA*)transfer->user_data; + #if defined(HAVE_STREAM_ID_API) +@@ -285,7 +285,7 @@ static const LIBUSB_ENDPOINT_DESCEIPTOR* func_get_ep_desc(LIBUSB_CONFIG_DESCRIPT + return NULL; + } + +-static void func_bulk_transfer_cb(struct libusb_transfer* transfer) ++static void LIBUSB_CALL func_bulk_transfer_cb(struct libusb_transfer* transfer) + { + ASYNC_TRANSFER_USER_DATA* user_data; + uint32_t streamID; +diff --git a/channels/urbdrc/client/libusb/libusb_udevman.c b/channels/urbdrc/client/libusb/libusb_udevman.c +index 2eebc1a..399ecbb 100644 +--- a/channels/urbdrc/client/libusb/libusb_udevman.c ++++ b/channels/urbdrc/client/libusb/libusb_udevman.c +@@ -550,7 +550,7 @@ static BOOL device_is_filtered(struct libusb_device* dev, + return filtered; + } + +-static int hotplug_callback(struct libusb_context* ctx, struct libusb_device* dev, ++static int LIBUSB_CALL hotplug_callback(struct libusb_context* ctx, struct libusb_device* dev, + libusb_hotplug_event event, void* user_data) + { + VID_PID_PAIR pair; +@@ -828,7 +828,7 @@ static BOOL poll_libusb_events(UDEVMAN* udevman) + return rc > 0; + } + +-static DWORD poll_thread(LPVOID lpThreadParameter) ++static DWORD __stdcall poll_thread(LPVOID lpThreadParameter) + { + libusb_hotplug_callback_handle handle; + UDEVMAN* udevman = (UDEVMAN*)lpThreadParameter; diff --git a/vcpkg/ports/freerdp/fix-linux-build.patch b/vcpkg/ports/freerdp/fix-linux-build.patch new file mode 100644 index 0000000..92f2cd4 --- /dev/null +++ b/vcpkg/ports/freerdp/fix-linux-build.patch @@ -0,0 +1,13 @@ +diff --git a/winpr/tools/makecert-cli/CMakeLists.txt b/winpr/tools/makecert-cli/CMakeLists.txt +index 48fda5b..4e15a22 100644 +--- a/winpr/tools/makecert-cli/CMakeLists.txt ++++ b/winpr/tools/makecert-cli/CMakeLists.txt +@@ -42,7 +42,7 @@ add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) + + set(${MODULE_PREFIX}_LIBS winpr-tools) + +-target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} winpr) ++target_link_libraries(${MODULE_NAME} ${OPENSSL_LIBRARIES} ${${MODULE_PREFIX}_LIBS} winpr) + + set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Tools") + diff --git a/vcpkg/ports/freerdp/openssl_threads.patch b/vcpkg/ports/freerdp/openssl_threads.patch new file mode 100644 index 0000000..ca312df --- /dev/null +++ b/vcpkg/ports/freerdp/openssl_threads.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 97ba2f9..fc36185 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -907,6 +907,7 @@ if(OPENSSL_FOUND) + add_definitions("-DWITH_OPENSSL") + message(STATUS "Using OpenSSL Version: ${OPENSSL_VERSION}") + include_directories(${OPENSSL_INCLUDE_DIR}) ++ list(APPEND OPENSSL_LIBRARIES Threads::Threads) + endif() + + if(MBEDTLS_FOUND) diff --git a/vcpkg/ports/freerdp/portfile.cmake b/vcpkg/ports/freerdp/portfile.cmake new file mode 100644 index 0000000..6907618 --- /dev/null +++ b/vcpkg/ports/freerdp/portfile.cmake @@ -0,0 +1,135 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO FreeRDP/FreeRDP + REF d2ba84a6885f57674098fe8e76c5f99d880e580d #2.2.0 + SHA512 3f166213039358dc0cab09b8895e6cff8a7a9c7e7711ea5652604fc6070b1524aba9fec3b860f4deb1f54ea1f17709ab25ffb108116e2914800e892efb9fb9ae + HEAD_REF master + PATCHES + DontInstallSystemRuntimeLibs.patch + fix-linux-build.patch + openssl_threads.patch + fix-include-path.patch + fix-libusb.patch +) + +if (NOT VCPKG_TARGET_IS_WINDOWS) + message(WARNING "${PORT} currently requires the following libraries from the system package manager:\n libxfixes-dev\n") +endif() +if (VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_LINUX) + set(FREERDP_WITH_CLIENT -DWITH_CLIENT=OFF) +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL "static") + set(FREERDP_CRT_LINKAGE -DMSVC_RUNTIME=static) +endif() + +get_filename_component(SOURCE_VERSION "${SOURCE_PATH}" NAME) +file(WRITE "${SOURCE_PATH}/.source_version" "${SOURCE_VERSION}-vcpkg") + +file(REMOVE ${SOURCE_PATH}/cmake/FindOpenSSL.cmake) # Remove outdated Module + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + urbdrc CHANNEL_URBDRC +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FREERDP_CRT_LINKAGE} + ${FREERDP_WITH_CLIENT} + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(GLOB_RECURSE TOOLS_RELEASE ${CURRENT_PACKAGES_DIR}/bin/*.exe) + +if(TOOLS_RELEASE) + file(COPY ${TOOLS_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + + file(GLOB_RECURSE TOOLS_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + file(REMOVE ${TOOLS_RELEASE} ${TOOLS_DEBUG}) +endif() + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(GLOB_RECURSE FREERDP_DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") + foreach(FREERDP_DLL ${FREERDP_DLLS}) + file(COPY ${FREERDP_DLL} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${FREERDP_DLL}) + endforeach() + + file(GLOB_RECURSE FREERDP_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") + foreach(FREERDP_DLL ${FREERDP_DLLS}) + file(COPY ${FREERDP_DLL} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${FREERDP_DLL}) + endforeach() +else() + file(GLOB_RECURSE FREERDP_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*") + foreach(FREERDP_TOOL ${FREERDP_TOOLS}) + file(COPY ${FREERDP_TOOL} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(REMOVE ${FREERDP_TOOL}) + endforeach() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +foreach(PACKAGE FreeRDP-Client2 FreeRDP2 WinPR2) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/cmake/${PACKAGE}_temp) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/${PACKAGE} ${CURRENT_PACKAGES_DIR}/lib/cmake/${PACKAGE}_temp/${PACKAGE}) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/${PACKAGE}_temp) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/${PACKAGE} ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/${PACKAGE}_temp/${PACKAGE}) +endforeach() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/FreeRDP-Client2_temp/FreeRDP-Client2 TARGET_PATH share/FreeRDP-Client) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/FreeRDP2_temp/FreeRDP2 TARGET_PATH share/FreeRDP) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/WinPR2_temp/WinPR2 TARGET_PATH share/WinPR) + +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/WinPR/WinPRTargets-debug.cmake + "debug/lib/winpr2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" + "debug/bin/winpr2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" +) +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/WinPR/WinPRTargets-debug.cmake + "debug/lib/winpr-tools2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" + "debug/bin/winpr-tools2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" +) +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/WinPR/WinPRTargets-release.cmake + "lib/winpr2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" + "bin/winpr2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" +) +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/WinPR/WinPRTargets-release.cmake + "lib/winpr-tools2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" + "bin/winpr-tools2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" +) +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/FreeRDP/FreeRDPTargets-debug.cmake + "debug/lib/freerdp2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" + "debug/bin/freerdp2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" +) +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/FreeRDP/FreeRDPTargets-release.cmake + "lib/freerdp2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" + "bin/freerdp2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" +) +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/FreeRDP-Client/FreeRDP-ClientTargets-debug.cmake + "debug/lib/freerdp-client2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" + "debug/bin/freerdp-client2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" +) +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/FreeRDP-Client/FreeRDP-ClientTargets-release.cmake + "lib/freerdp-client2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" + "bin/freerdp-client2${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" +) + +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(GLOB OBJS ${CURRENT_PACKAGES_DIR}/debug/*.lib) + file(REMOVE ${OBJS}) + file(GLOB OBJS ${CURRENT_PACKAGES_DIR}/*.lib) + file(REMOVE ${OBJS}) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/debug/lib/cmake + ${CURRENT_PACKAGES_DIR}/lib/cmake) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/freetds/CONTROL b/vcpkg/ports/freetds/CONTROL new file mode 100644 index 0000000..bfd1e44 --- /dev/null +++ b/vcpkg/ports/freetds/CONTROL @@ -0,0 +1,9 @@ +Source: freetds +Version: 1.1.17 +Homepage: https://www.freetds.org +Description: Implementation of the Tabular Data Stream protocol +Default-Features: openssl + +Feature: openssl +Build-Depends: openssl +Description: OpenSSL support diff --git a/vcpkg/ports/freetds/crypt32.patch b/vcpkg/ports/freetds/crypt32.patch new file mode 100644 index 0000000..a3af756 --- /dev/null +++ b/vcpkg/ports/freetds/crypt32.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 796625e17..fc9076f54 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -149,6 +149,9 @@ if(OPENSSL_FOUND) + config_write("#define HAVE_OPENSSL 1\n\n") + include_directories(${OPENSSL_INCLUDE_DIR}) + set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES}) ++ if(WIN32) ++ list(APPEND CMAKE_REQUIRED_LIBRARIES crypt32 ws2_32) ++ endif() + check_function_exists_define(BIO_get_data) + check_function_exists_define(RSA_get0_key) + check_function_exists_define(ASN1_STRING_get0_data) +@@ -441,7 +444,10 @@ else(WIN32) + endif(WIN32) + + if(OPENSSL_FOUND) + set(lib_NETWORK ${lib_NETWORK} ${OPENSSL_LIBRARIES}) ++ if(WIN32) ++ list(APPEND lib_NETWORK crypt32) ++ endif() + elseif(GNUTLS_FOUND) + set(lib_NETWORK ${lib_NETWORK} ${lib_GNUTLS}) + endif(OPENSSL_FOUND) diff --git a/vcpkg/ports/freetds/portfile.cmake b/vcpkg/ports/freetds/portfile.cmake new file mode 100644 index 0000000..eb833b3 --- /dev/null +++ b/vcpkg/ports/freetds/portfile.cmake @@ -0,0 +1,65 @@ +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.freetds.org/files/stable/freetds-1.1.17.tar.bz2" + FILENAME "freetds-1.1.17.tar.bz2" + SHA512 3746ea009403960950fd619ffaf6433cfc92c34a8261b15e61009f01a1446e5a5a59413cd48e5511bbf3a0224f54b40daa713187bd20ca43105c5f8c68f4b88e +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + crypt32.patch +) + +set(BUILD_freetds_openssl OFF) +if("openssl" IN_LIST FEATURES) + set(BUILD_freetds_openssl ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DWITH_OPENSSL=${BUILD_freetds_openssl} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/bsqldb.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/bsqlodbc.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/datacopy.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/defncopy.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/freebcp.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/tdspool.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/tsql.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/bsqldb) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/bsqlodbc) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/datacopy) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/defncopy) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/freebcp) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/tdspool) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/tsql) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/bsqldb.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/bsqlodbc.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/datacopy.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/defncopy.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/freebcp.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/tdspool.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/tsql.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/bsqldb) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/bsqlodbc) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/datacopy) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/defncopy) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/freebcp) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/tdspool) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/tsql) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/freetype-gl/CONTROL b/vcpkg/ports/freetype-gl/CONTROL new file mode 100644 index 0000000..a408171 --- /dev/null +++ b/vcpkg/ports/freetype-gl/CONTROL @@ -0,0 +1,6 @@ +Source: freetype-gl +Version: 2019-03-29 +Port-Version: 4 +Homepage: https://github.com/rougier/freetype-gl +Description: OpenGL text using one vertex buffer, one texture and FreeType +Build-Depends: glew, freetype diff --git a/vcpkg/ports/freetype-gl/glew.patch b/vcpkg/ports/freetype-gl/glew.patch new file mode 100644 index 0000000..01b7f61 --- /dev/null +++ b/vcpkg/ports/freetype-gl/glew.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1c2e89fba..9e2d112c4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -92,7 +92,7 @@ include_directories( + ${OPENGL_INCLUDE_DIRS} + ${FREETYPE_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR} +- ${GLEW_INCLUDE_PATH} ++ ${GLEW_INCLUDE_DIRS} + ) + + if(MSVC) diff --git a/vcpkg/ports/freetype-gl/portfile.cmake b/vcpkg/ports/freetype-gl/portfile.cmake new file mode 100644 index 0000000..9dfd387 --- /dev/null +++ b/vcpkg/ports/freetype-gl/portfile.cmake @@ -0,0 +1,57 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rougier/freetype-gl + REF a91a3dda326ceaf66b7279bf64ba07014d3f81b8 + SHA512 8e04573dfb400e14e2c1d3a2cd851a66f8218ccfdaa4f701ed9369d7f040d7028582e72af9b236af42d9d3c6c128014670e8ae0261c6f4770affd1aea1454b1e + HEAD_REF master + PATCHES glew.patch +) + +# make sure that no "internal" libraries are used by removing them +file(REMOVE_RECURSE ${SOURCE_PATH}/windows/freetype) +file(REMOVE_RECURSE ${SOURCE_PATH}/windows/AntTweakBar) +file(REMOVE_RECURSE ${SOURCE_PATH}/windows/glew) +file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindGLEW.cmake) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -Dfreetype-gl_BUILD_APIDOC=OFF + -Dfreetype-gl_BUILD_DEMOS=OFF + -Dfreetype-gl_BUILD_TESTS=OFF + -Dfreetype-gl_BUILD_MAKEFONT=OFF +) + +# We may soon install using a modified cmake process with install target + +# Although FreeType-GL uses CMake as its build system, the implementation +# (*.cmake,CMakeLists.txt) doesn't provide for any type of installation. +# Presumably, it has been used as-is, in-tree, without ever needing to install +# itself within a larger system. +vcpkg_build_cmake(LOGFILE_ROOT install) + +file(GLOB HEADER_FILES "${SOURCE_PATH}/*.h") +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/freetype-gl) + +# LIB +file(GLOB LIBS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" +) +file(GLOB DEBUG_LIBS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" +) + +file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/freetype-gl RENAME copyright) diff --git a/vcpkg/ports/freetype/0001-Fix-install-command.patch b/vcpkg/ports/freetype/0001-Fix-install-command.patch new file mode 100644 index 0000000..feee3ae --- /dev/null +++ b/vcpkg/ports/freetype/0001-Fix-install-command.patch @@ -0,0 +1,32 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ad8ded0..32324d6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -407,6 +407,7 @@ endif () + include(GNUInstallDirs) + + if (NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL) ++ if(UNIX) + install( + # Note the trailing slash in the argument to `DIRECTORY'! + DIRECTORY ${PROJECT_SOURCE_DIR}/include/ +@@ -420,6 +421,19 @@ if (NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL) + ${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2/freetype/config + COMPONENT headers) ++ else() ++ install( ++ # Note the trailing slash in the argument to `DIRECTORY'! ++ DIRECTORY ${PROJECT_SOURCE_DIR}/include/ ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2 ++ COMPONENT headers ++ PATTERN "internal" EXCLUDE ++ PATTERN "ftoption.h" EXCLUDE) ++ install( ++ FILES ${PROJECT_BINARY_DIR}/include/freetype/config/ftoption.h ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/freetype2/freetype/config ++ COMPONENT headers) ++ endif() + endif () + + if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) diff --git a/vcpkg/ports/freetype/0003-Fix-UWP.patch b/vcpkg/ports/freetype/0003-Fix-UWP.patch new file mode 100644 index 0000000..b3a0418 --- /dev/null +++ b/vcpkg/ports/freetype/0003-Fix-UWP.patch @@ -0,0 +1,65 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index db48e9f..5c35276 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -328,6 +328,10 @@ else () + list(APPEND BASE_SRCS src/base/ftdebug.c) + endif () + ++if(MSVC) ++ add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS) ++endif() ++ + if (BUILD_FRAMEWORK) + list(APPEND BASE_SRCS builds/mac/freetype-Info.plist) + endif () +diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h +index 4f2eaca..1e01fe4 100644 +--- a/include/freetype/freetype.h ++++ b/include/freetype/freetype.h +@@ -1038,6 +1038,11 @@ FT_BEGIN_HEADER + * Especially for TrueType fonts see also the documentation for + * @FT_Size_Metrics. + */ ++ ++#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP) ++#define generic GenericFromFreeTypeLibrary ++#endif ++ + typedef struct FT_FaceRec_ + { + FT_Long num_faces; +@@ -1910,6 +1915,9 @@ FT_BEGIN_HEADER + + } FT_GlyphSlotRec; + ++#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP) ++#undef generic ++#endif + + /*************************************************************************/ + /*************************************************************************/ +diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c +index 3f8619d..edf03b6 100644 +--- a/src/base/ftobjs.c ++++ b/src/base/ftobjs.c +@@ -528,6 +528,9 @@ + return error; + } + ++#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP) ++#define generic GenericFromFreeTypeLibrary ++#endif + + static void + ft_glyphslot_clear( FT_GlyphSlot slot ) +@@ -1195,6 +1198,9 @@ + FT_FREE( face ); + } + ++#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP) ++#undef generic ++#endif + + static void + Destroy_Driver( FT_Driver driver ) diff --git a/vcpkg/ports/freetype/CONTROL b/vcpkg/ports/freetype/CONTROL new file mode 100644 index 0000000..eb2b102 --- /dev/null +++ b/vcpkg/ports/freetype/CONTROL @@ -0,0 +1,15 @@ +Source: freetype +Version: 2.10.2 +Port-Version: 4 +Build-Depends: zlib, brotli +Homepage: https://www.freetype.org/ +Description: A library to render fonts. +Default-Features: bzip2, png + +Feature: bzip2 +Build-Depends: bzip2 +Description: Support bzip2 compressed fonts. + +Feature: png +Build-Depends: libpng +Description: Support PNG compressed OpenType embedded bitmaps. diff --git a/vcpkg/ports/freetype/brotli-static.patch b/vcpkg/ports/freetype/brotli-static.patch new file mode 100644 index 0000000..1635311 --- /dev/null +++ b/vcpkg/ports/freetype/brotli-static.patch @@ -0,0 +1,29 @@ +diff --git a/builds/cmake/FindBrotliDec.cmake b/builds/cmake/FindBrotliDec.cmake +index 7c484c7df..0bd49b825 100644 +--- a/builds/cmake/FindBrotliDec.cmake ++++ b/builds/cmake/FindBrotliDec.cmake +@@ -34,14 +34,22 @@ find_path(BROTLIDEC_INCLUDE_DIRS + PATH_SUFFIXES brotli) + + find_library(BROTLIDEC_LIBRARIES +- NAMES brotlidec ++ NAMES brotlidec brotlidec-static + HINTS ${PC_BROTLIDEC_LIBDIR} + ${PC_BROTLIDEC_LIBRARY_DIRS}) + ++find_library(BROTLICOMMON_LIBRARIES ++ NAMES brotlicommon-static ++ HINTS ${PC_BROTLIDEC_LIBDIR} ++ ${PC_BROTLIDEC_LIBRARY_DIRS}) ++ ++if(BROTLICOMMON_LIBRARIES) ++ set(BROTLIDEC_LIBRARIES ${BROTLIDEC_LIBRARIES} ${BROTLICOMMON_LIBRARIES}) ++endif() + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args( +- brotlidec ++ BrotliDec + REQUIRED_VARS BROTLIDEC_INCLUDE_DIRS BROTLIDEC_LIBRARIES + FOUND_VAR BROTLIDEC_FOUND + VERSION_VAR BROTLIDEC_VERSION) diff --git a/vcpkg/ports/freetype/pkgconfig.patch b/vcpkg/ports/freetype/pkgconfig.patch new file mode 100644 index 0000000..615434a --- /dev/null +++ b/vcpkg/ports/freetype/pkgconfig.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 65839ac58..54f2ce8ec 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -517,7 +517,6 @@ endif () + + if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) + # Generate the pkg-config file +- if (UNIX) + file(READ "${PROJECT_SOURCE_DIR}/builds/unix/freetype2.in" FREETYPE2_PC_IN) + + string(REPLACE ";" ", " PKG_CONFIG_REQUIRED_PRIVATE "${PKG_CONFIG_REQUIRED_PRIVATE}") +@@ -551,7 +550,6 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) + FILES ${PROJECT_BINARY_DIR}/freetype2.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig + COMPONENT pkgconfig) +- endif () + + install( + TARGETS freetype diff --git a/vcpkg/ports/freetype/portfile.cmake b/vcpkg/ports/freetype/portfile.cmake new file mode 100644 index 0000000..ed8cbcb --- /dev/null +++ b/vcpkg/ports/freetype/portfile.cmake @@ -0,0 +1,95 @@ +set(FT_VERSION 2.10.2) +vcpkg_download_distfile(ARCHIVE + URLS "https://download-mirror.savannah.gnu.org/releases/freetype/freetype-${FT_VERSION}.tar.xz" "https://downloads.sourceforge.net/project/freetype/freetype2/${FT_VERSION}/freetype-${FT_VERSION}.tar.xz" + FILENAME "freetype-${FT_VERSION}.tar.xz" + SHA512 cf45089bd8893d7de2cdcb59d91bbb300e13dd0f0a9ef80ed697464ba7aeaf46a5a81b82b59638e6b21691754d8f300f23e1f0d11683604541d77f0f581affaa +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${FT_VERSION} + PATCHES + 0001-Fix-install-command.patch + 0003-Fix-UWP.patch + pkgconfig.patch + brotli-static.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + bzip2 FT_WITH_BZIP2 + png FT_WITH_PNG + INVERTED_FEATURES + bzip2 CMAKE_DISABLE_FIND_PACKAGE_BZip2 + png CMAKE_DISABLE_FIND_PACKAGE_PNG +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFT_WITH_ZLIB=ON # Force system zlib. + -DFT_WITH_BROTLI=ON + -DCMAKE_DISABLE_FIND_PACKAGE_HarfBuzz=ON + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/freetype) + +# Rename for easy usage (VS integration; CMake and autotools will not care) +file(RENAME ${CURRENT_PACKAGES_DIR}/include/freetype2/freetype ${CURRENT_PACKAGES_DIR}/include/freetype) +file(RENAME ${CURRENT_PACKAGES_DIR}/include/freetype2/ft2build.h ${CURRENT_PACKAGES_DIR}/include/ft2build.h) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/freetype2) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Fix the include dir [freetype2 -> freetype] +file(READ ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config.cmake CONFIG_MODULE) +string(REPLACE "\${_IMPORT_PREFIX}/include/freetype2" "\${_IMPORT_PREFIX}/include" CONFIG_MODULE "${CONFIG_MODULE}") +string(REPLACE "\${_IMPORT_PREFIX}/lib/brotlicommon-static.lib" [[\$<\$>:${_IMPORT_PREFIX}/lib/brotlicommon-static.lib>;\$<\$:${_IMPORT_PREFIX}/debug/lib/brotlicommon-static.lib>]] CONFIG_MODULE "${CONFIG_MODULE}") +string(REPLACE "\${_IMPORT_PREFIX}/lib/brotlidec-static.lib" [[\$<\$>:${_IMPORT_PREFIX}/lib/brotlidec-static.lib>;\$<\$:${_IMPORT_PREFIX}/debug/lib/brotlidec-static.lib>]] CONFIG_MODULE "${CONFIG_MODULE}") +string(REPLACE "\${_IMPORT_PREFIX}/lib/brotlidec.lib" [[\$<\$>:${_IMPORT_PREFIX}/lib/brotlidec.lib>;\$<\$:${_IMPORT_PREFIX}/debug/lib/brotlidec.lib>]] CONFIG_MODULE "${CONFIG_MODULE}") +string(REPLACE "\${_IMPORT_PREFIX}/lib/brotlidec.lib" [[\$<\$>:${_IMPORT_PREFIX}/lib/brotlidec.lib>;\$<\$:${_IMPORT_PREFIX}/debug/lib/brotlidec.lib>]] CONFIG_MODULE "${CONFIG_MODULE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/freetype/freetype-config.cmake "${CONFIG_MODULE}") + +find_library(FREETYPE_DEBUG NAMES freetyped PATHS "${CURRENT_PACKAGES_DIR}/debug/lib/" NO_DEFAULT_PATH) +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/freetype2.pc") + file(READ "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/freetype2.pc" _contents) + if(FREETYPE_DEBUG) + string(REPLACE "-lfreetype" "-lfreetyped" _contents "${_contents}") + endif() + string(REPLACE "-I\${includedir}/freetype2" "-I\${includedir}" _contents "${_contents}") + file(WRITE "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/freetype2.pc" "${_contents}") +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/freetype2.pc") + file(READ "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/freetype2.pc" _contents) + string(REPLACE "-I\${includedir}/freetype2" "-I\${includedir}" _contents "${_contents}") + file(WRITE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/freetype2.pc" "${_contents}") +endif() +vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(COPY + ${SOURCE_PATH}/docs/FTL.TXT + ${SOURCE_PATH}/docs/GPLv2.TXT + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} +) +file(INSTALL ${SOURCE_PATH}/docs/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + if("bzip2" IN_LIST FEATURES) + set(USE_BZIP2 ON) + endif() + + if("png" IN_LIST FEATURES) + set(USE_PNG ON) + endif() + + configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake + ${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake @ONLY) +endif() diff --git a/vcpkg/ports/freetype/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/freetype/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..355ddbc --- /dev/null +++ b/vcpkg/ports/freetype/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,46 @@ +_find_package(${ARGS}) + +find_package(ZLIB) + +if(@USE_BZIP2@) + find_package(BZip2) +endif() + +if(@USE_PNG@) + find_package(PNG) +endif() + +find_library(BROTLIDEC_LIBRARY_RELEASE NAMES brotlidec brotlidec-static PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" PATH_SUFFIXES lib NO_DEFAULT_PATH) +find_library(BROTLIDEC_LIBRARY_DEBUG NAMES brotlidec brotlidec-static brotlidecd brotlidec-staticd PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" PATH_SUFFIXES lib NO_DEFAULT_PATH) +find_library(BROTLICOMMON_LIBRARY_RELEASE NAMES brotlicommon brotlicommon-static PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" PATH_SUFFIXES lib NO_DEFAULT_PATH) +find_library(BROTLICOMMON_LIBRARY_DEBUG NAMES brotlicommon brotlicommon-static brotlicommond brotlicommon-staticd PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" PATH_SUFFIXES lib NO_DEFAULT_PATH) +include(SelectLibraryConfigurations) +select_library_configurations(BROTLIDEC) +select_library_configurations(BROTLICOMMON) + +if(TARGET Freetype::Freetype) + set_property(TARGET Freetype::Freetype APPEND PROPERTY INTERFACE_LINK_LIBRARIES ZLIB::ZLIB) + + if(@USE_BZIP2@) + set_property(TARGET Freetype::Freetype APPEND PROPERTY INTERFACE_LINK_LIBRARIES BZip2::BZip2) + endif() + + if(@USE_PNG@) + set_property(TARGET Freetype::Freetype APPEND PROPERTY INTERFACE_LINK_LIBRARIES PNG::PNG) + endif() + target_link_libraries(Freetype::Freetype INTERFACE ${BROTLIDEC_LIBRARIES} ${BROTLICOMMON_LIBRARIES}) +endif() + +if(FREETYPE_LIBRARIES) + list(APPEND FREETYPE_LIBRARIES ${ZLIB_LIBRARIES}) + + if(@USE_BZIP2@) + list(APPEND FREETYPE_LIBRARIES ${BZIP2_LIBRARIES}) + endif() + + if(@USE_PNG@) + list(APPEND FREETYPE_LIBRARIES ${PNG_LIBRARIES}) + endif() + + list(APPEND FREETYPE_LIBRARIES ${BROTLIDEC_LIBRARIES} ${BROTLICOMMON_LIBRARIES}) +endif() diff --git a/vcpkg/ports/freexl/CONTROL b/vcpkg/ports/freexl/CONTROL new file mode 100644 index 0000000..1a887b1 --- /dev/null +++ b/vcpkg/ports/freexl/CONTROL @@ -0,0 +1,6 @@ +Source: freexl +Version: 1.0.4 +Port-Version: 10 +Homepage: https://www.gaia-gis.it/gaia-sins/freexl-sources +Description: FreeXL is an open source library to extract valid data from within an Excel (.xls) spreadsheet +Build-Depends: libiconv diff --git a/vcpkg/ports/freexl/fix-makefiles.patch b/vcpkg/ports/freexl/fix-makefiles.patch new file mode 100644 index 0000000..5cf2c47 --- /dev/null +++ b/vcpkg/ports/freexl/fix-makefiles.patch @@ -0,0 +1,43 @@ +diff --git a/makefile.vc b/makefile.vc +index 0aacbc7..d95d859 100644 +--- a/makefile.vc ++++ b/makefile.vc +@@ -7,7 +7,7 @@ + LIBOBJ = freexl.obj + FREEXL_DLL = freexl$(VERSION).dll + +-CFLAGS = /nologo -IC:\OSGeo4W\include -I. -Iheaders $(OPTFLAGS) ++CFLAGS = /nologo -I$(INSTALLED_ROOT)\include -I. -Iheaders $(OPTFLAGS) + + default: all + +@@ -23,9 +23,9 @@ freexl.lib: $(LIBOBJ) + $(FREEXL_DLL): freexl_i.lib + + freexl_i.lib: $(LIBOBJ) +- link /debug /dll /out:$(FREEXL_DLL) \ ++ link $(LINK_FLAGS) /dll /out:$(FREEXL_DLL) \ + /implib:freexl_i.lib $(LIBOBJ) \ +- C:\OSGeo4w\lib\iconv.lib ++ $(LIBS_ALL) + if exist $(FREEXL_DLL).manifest mt -manifest \ + $(FREEXL_DLL).manifest -outputresource:$(FREEXL_DLL);2 + +diff --git a/nmake.opt b/nmake.opt +index 35f9242..efb6f77 100644 +--- a/nmake.opt ++++ b/nmake.opt +@@ -1,10 +1,10 @@ + # Directory tree where FreeXL will be installed. +-INSTDIR=C:\OSGeo4W ++INSTDIR=$(INST_DIR) + + # Uncomment the first for an optimized build, or the second for debug. +-OPTFLAGS= /nologo /Ox /fp:precise /W3 /MD /D_CRT_SECURE_NO_WARNINGS \ ++OPTFLAGS= /nologo /fp:precise /W3 $(CL_FLAGS) /D_CRT_SECURE_NO_WARNINGS \ + /DDLL_EXPORT +-#OPTFLAGS= /nologo /Zi /MD /Fdfreexl.pdb /DDLL_EXPORT ++#OPTFLAGS= /nologo $(CL_FLAGS) /Fdfreexl.pdb /DDLL_EXPORT + + # Set the version number for the DLL. Normally we leave this blank since + # we want software that is dynamically loading the DLL to have no problem diff --git a/vcpkg/ports/freexl/fix-sources.patch b/vcpkg/ports/freexl/fix-sources.patch new file mode 100644 index 0000000..89a36f3 --- /dev/null +++ b/vcpkg/ports/freexl/fix-sources.patch @@ -0,0 +1,35 @@ +diff --git a/config-msvc.h b/config-msvc.h +index a39d4e7..37f1c0b 100644 +--- a/config-msvc.h ++++ b/config-msvc.h +@@ -66,7 +66,7 @@ + #define HAVE_SYS_TYPES_H 1 + + /* Define to 1 if you have the header file. */ +-#define HAVE_UNISTD_H 1 ++#undef HAVE_UNISTD_H + + /* Define to 1 if `lstat' dereferences a symlink specified with a trailing + slash. */ +diff --git a/src/freexl.c b/src/freexl.c +index a0b255a..92163a9 100644 +--- a/src/freexl.c ++++ b/src/freexl.c +@@ -92,7 +92,7 @@ freexl_version (void) + #if defined(_WIN32) && !defined(__MINGW32__) + /* MSVC compiler doesn't support lround() at all */ + static double +-round (double num) ++round_old (double num) + { + double integer = ceil (num); + if (num > 0) +@@ -101,7 +101,7 @@ round (double num) + } + + static long +-lround (double num) ++lround_old (double num) + { + long integer = (long) round (num); + return integer; diff --git a/vcpkg/ports/freexl/portfile.cmake b/vcpkg/ports/freexl/portfile.cmake new file mode 100644 index 0000000..6a79451 --- /dev/null +++ b/vcpkg/ports/freexl/portfile.cmake @@ -0,0 +1,91 @@ +set(FREEXL_VERSION_STR "1.0.4") + +vcpkg_download_distfile(ARCHIVE + URLS "http://www.gaia-gis.it/gaia-sins/freexl-sources/freexl-${FREEXL_VERSION_STR}.tar.gz" + FILENAME "freexl-${FREEXL_VERSION_STR}.tar.gz" + SHA512 d72561f7b82e0281cb211fbf249e5e45411a7cdd009cfb58da3696f0a0341ea7df210883bfde794be28738486aeb4ffc67ec2c98fd2acde5280e246e204ce788 +) + +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH + PATCHES + fix-makefiles.patch + fix-sources.patch + ) + + set(LIBS_ALL_DBG + "\"${CURRENT_INSTALLED_DIR}/debug/lib/libiconv.lib\" \ + \"${CURRENT_INSTALLED_DIR}/debug/lib/libcharset.lib\"" + ) + set(LIBS_ALL_REL + "\"${CURRENT_INSTALLED_DIR}/lib/libiconv.lib\" \ + \"${CURRENT_INSTALLED_DIR}/lib/libcharset.lib\"" + ) + + vcpkg_install_nmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG + INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}/debug" + INST_DIR="${CURRENT_PACKAGES_DIR}/debug" + "LINK_FLAGS=/debug" + "LIBS_ALL=${LIBS_ALL_DBG}" + OPTIONS_RELEASE + INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" + INST_DIR="${CURRENT_PACKAGES_DIR}" + "LINK_FLAGS=" + "LIBS_ALL=${LIBS_ALL_REL}" + ) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/freexl RENAME copyright) + + if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/freexl_i.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/freexl_i.lib) + else() + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/freexl.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/freexl.lib) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/freexl_i.lib ${CURRENT_PACKAGES_DIR}/lib/freexl.lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/freexl_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/freexl.lib) + endif() + endif() + +elseif (CMAKE_HOST_UNIX OR CMAKE_HOST_APPLE) # Build in UNIX + + vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH + ) + file(REMOVE_RECURSE "${SOURCE_PATH}/configure") + vcpkg_configure_make( + AUTOCONFIG + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG + INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" + "LINK_FLAGS=/debug" + "CL_FLAGS=${CL_FLAGS_DBG}" + "LIBS_ALL=${LIBS_ALL_DBG}" + OPTIONS_RELEASE + INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" + "LINK_FLAGS=" + "CL_FLAGS=${CL_FLAGS_REL}" + "LIBS_ALL=${LIBS_ALL_REL}" + ) + + vcpkg_install_make() + vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m) + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/freexl RENAME copyright) + +else()# Other build system + message(FATAL_ERROR "Unsupported build system.") +endif() + +message(STATUS "Packaging ${TARGET_TRIPLET} done") diff --git a/vcpkg/ports/fribidi/CONTROL b/vcpkg/ports/fribidi/CONTROL new file mode 100644 index 0000000..570fd13 --- /dev/null +++ b/vcpkg/ports/fribidi/CONTROL @@ -0,0 +1,4 @@ +Source: fribidi +Version: 1.0.10 +Description: GNU FriBidi is an implementation of the Unicode Bidirectional Algorithm (bidi) +Build-Depends: tool-meson diff --git a/vcpkg/ports/fribidi/fix-win-static-suffix.patch b/vcpkg/ports/fribidi/fix-win-static-suffix.patch new file mode 100644 index 0000000..953b1b9 --- /dev/null +++ b/vcpkg/ports/fribidi/fix-win-static-suffix.patch @@ -0,0 +1,25 @@ +diff --git a/lib/meson.build b/lib/meson.build +index aaf2aed..3fe8937 100644 +--- a/lib/meson.build ++++ b/lib/meson.build +@@ -71,6 +71,10 @@ fribidi_sources = [ + 'fribidi-shape.c', + ] + ++libsuffix = [] ++if host_machine.system() == 'windows' and get_option('default_library') == 'static' ++ libsuffix = 'lib' ++endif + libfribidi = library('fribidi', + fribidi_sources, fribidi_unicode_version_h, fribidi_config_h, + generated_tab_include_files, config_h, +@@ -78,7 +82,8 @@ libfribidi = library('fribidi', + c_args: ['-DHAVE_CONFIG_H', '-DFRIBIDI_BUILD'] + fribidi_static_cargs + visibility_args, + version: libversion, + soversion: soversion, +- install: true) ++ install: true, ++ name_suffix: libsuffix) + + libfribidi_dep = declare_dependency(link_with: libfribidi, + include_directories: incs, diff --git a/vcpkg/ports/fribidi/portfile.cmake b/vcpkg/ports/fribidi/portfile.cmake new file mode 100644 index 0000000..740502b --- /dev/null +++ b/vcpkg/ports/fribidi/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fribidi/fribidi + REF 5464c284034da9c058269377b7f5013bb089f553 # v1.0.10 + SHA512 82e42b022f23d6ecebac5071f997c9f46db6aa41c36f87a7f1a28a79b4ccaada10d68b233bbf687c552fc94d91f4b47161e0ef4909fd1de0b483089f1d1377f9 + HEAD_REF master + PATCHES fix-win-static-suffix.patch +) + +vcpkg_configure_meson( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -Ddocs=false + -Dbin=false + -Dtests=false + --backend=ninja +) + +vcpkg_install_meson() +vcpkg_copy_pdbs() + +# Define static macro +file(READ ${CURRENT_PACKAGES_DIR}/include/fribidi/fribidi-common.h FRIBIDI_COMMON_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "#ifndef FRIBIDI_LIB_STATIC" "#if 0" FRIBIDI_COMMON_H "${FRIBIDI_COMMON_H}") +else() + string(REPLACE "#ifndef FRIBIDI_LIB_STATIC" "#if 1" FRIBIDI_COMMON_H "${FRIBIDI_COMMON_H}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/fribidi/fribidi-common.h "${FRIBIDI_COMMON_H}") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/frozen/CONTROL b/vcpkg/ports/frozen/CONTROL new file mode 100644 index 0000000..36b2908 --- /dev/null +++ b/vcpkg/ports/frozen/CONTROL @@ -0,0 +1,4 @@ +Source: frozen +Version: 1.0.0 +Description: Header-only library that provides 0 cost initialization for immutable containers and various algorithms. Frozen provides:immutable (a.k.a. frozen), constexpr-compatible versions of std::set, std::unordered_set, std::map and std::unordered_map and 0-cost initialization version of std::search for frozen needles using Boyer-Moore or Knuth-Morris-Pratt algorithms. +Homepage: https://github.com/serge-sans-paille/frozen diff --git a/vcpkg/ports/frozen/portfile.cmake b/vcpkg/ports/frozen/portfile.cmake new file mode 100644 index 0000000..7225ae8 --- /dev/null +++ b/vcpkg/ports/frozen/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO serge-sans-paille/frozen + REF b5735474fdaa28753c1dae515df5a4fdb45d94dd + SHA512 b175a03b4a0263937e176675558e2df0bd4174799e2c5d7138842235fa24be57bccd8b96fddb5791e055b9de44211063f195142de73acf9d4f52a9a37f7055cc + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF + -Dfrozen.tests=OFF +) +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/frozen TARGET_PATH share/frozen) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/fruit/CONTROL b/vcpkg/ports/fruit/CONTROL new file mode 100644 index 0000000..8d3e9dc --- /dev/null +++ b/vcpkg/ports/fruit/CONTROL @@ -0,0 +1,4 @@ +Source: fruit +Version: 3.4.0-2 +Homepage: https://github.com/google/fruit +Description: Fruit, a dependency injection framework for C++ by Google diff --git a/vcpkg/ports/fruit/portfile.cmake b/vcpkg/ports/fruit/portfile.cmake new file mode 100644 index 0000000..f47d228 --- /dev/null +++ b/vcpkg/ports/fruit/portfile.cmake @@ -0,0 +1,23 @@ + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/fruit + REF v3.4.0 + SHA512 d78c76432c77acc4cc6ccf3fd9627a3fb2a0aa55d1baf7346422e9f1c1e048237d136588b44cfa943b542b43adbbb62fcd524e4a1cb870e9ffe8b7cf4dadb35d + HEAD_REF master +) + +# TODO: Make boost an optional dependency? +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFRUIT_USES_BOOST=False + -DFRUIT_TESTS_USE_PRECOMPILED_HEADERS=OFF +) + +vcpkg_install_cmake() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/ftgl/01_disable_doxygen.patch b/vcpkg/ports/ftgl/01_disable_doxygen.patch new file mode 100644 index 0000000..5443554 --- /dev/null +++ b/vcpkg/ports/ftgl/01_disable_doxygen.patch @@ -0,0 +1,30 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 303fcae..718ae88 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -35,15 +35,16 @@ ENDIF(BUILD_SHARED_LIBS) + + ADD_CUSTOM_TARGET(doc) + +-FIND_PACKAGE(Doxygen) +-IF(DOXYGEN_FOUND) +- ADD_CUSTOM_TARGET(doxygen +- ${DOXYGEN_EXECUTABLE} +- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} +- COMMENT "Doxygen ...") +- ADD_DEPENDENCIES(doc doxygen) +- +-ENDIF(DOXYGEN_FOUND) ++IF (WIN32) # doxygen only have windows package in vcpkg now. ++ FIND_PACKAGE(Doxygen) ++ IF(DOXYGEN_FOUND) ++ ADD_CUSTOM_TARGET(doxygen ++ ${DOXYGEN_EXECUTABLE} ++ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} ++ COMMENT "Doxygen ...") ++ ADD_DEPENDENCIES(doc doxygen) ++ ENDIF(DOXYGEN_FOUND) ++ENDIF() + + SUBDIRS(src) + diff --git a/vcpkg/ports/ftgl/02_enable-cpp11-std.patch b/vcpkg/ports/ftgl/02_enable-cpp11-std.patch new file mode 100644 index 0000000..37ae283 --- /dev/null +++ b/vcpkg/ports/ftgl/02_enable-cpp11-std.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 718ae88..e53e0da 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,6 +1,9 @@ + CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + + PROJECT(FTGL) ++set(CMAKE_CXX_STANDARD 11) ++set(CMAKE_CXX_STANDARD_REQUIRED ON) ++ + SET(CMAKE_MODULE_PATH ${FTGL_SOURCE_DIR}) + + SET(VERSION_SERIES 2) diff --git a/vcpkg/ports/ftgl/CONTROL b/vcpkg/ports/ftgl/CONTROL new file mode 100644 index 0000000..221bf10 --- /dev/null +++ b/vcpkg/ports/ftgl/CONTROL @@ -0,0 +1,7 @@ +Source: ftgl +Version: 2.4.0-2 +Homepage: https://github.com/frankheckenbach/ftgl +Description: FTGL is a free open source library to enable developers to use arbitrary fonts in their OpenGL (www.opengl.org) applications. + Unlike other OpenGL font libraries FTGL uses standard font file formats so doesn't need a preprocessing step to convert the high quality font data into a lesser quality, proprietary format. + FTGL uses the Freetype (www.freetype.org) font library to open and 'decode' the fonts. It then takes that output and stores it in a format most efficient for OpenGL rendering. +Build-Depends: freetype, opengl diff --git a/vcpkg/ports/ftgl/Fix-headersFilePath.patch b/vcpkg/ports/ftgl/Fix-headersFilePath.patch new file mode 100644 index 0000000..f345935 --- /dev/null +++ b/vcpkg/ports/ftgl/Fix-headersFilePath.patch @@ -0,0 +1,23 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 693e49f..c47ff3c 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1,9 +1,5 @@ +- +- +- + INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/cmake) + +- + ADD_DEFINITIONS(-DPACKAGE_VERSION="${VERSION_SERIES}.${VERSION_MAJOR}.${VERSION_MINOR}") + + IF(WIN32) +@@ -26,7 +22,7 @@ SET(libftgl_la_SOURCES + FTGlyphContainer.h + FTInternals.h + FTLibrary.cpp +- FTLibrary.h ++ FTGL/FTLibrary.h + FTList.h + FTPoint.cpp + FTSize.cpp diff --git a/vcpkg/ports/ftgl/portfile.cmake b/vcpkg/ports/ftgl/portfile.cmake new file mode 100644 index 0000000..9208cb0 --- /dev/null +++ b/vcpkg/ports/ftgl/portfile.cmake @@ -0,0 +1,32 @@ +if (VCPKG_TARGET_IS_WINDOWS) + # doxygen only have windows package in vcpkg now. + vcpkg_find_acquire_program(DOXYGEN) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO frankheckenbach/ftgl + REF 483639219095ad080538e07ceb5996de901d4e74 + SHA512 d5bf95db8db6a5c9f710bd274cb9bb82e3e67569e8f3ec55b36e068636a09252e6f191e36d8279e61b5d12408c065ce51829fc38d4d7afe5bda724752d2f084f + HEAD_REF master + PATCHES + Fix-headersFilePath.patch + 01_disable_doxygen.patch + 02_enable-cpp11-std.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +else () + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/function2/CONTROL b/vcpkg/ports/function2/CONTROL new file mode 100644 index 0000000..e230af3 --- /dev/null +++ b/vcpkg/ports/function2/CONTROL @@ -0,0 +1,4 @@ +Source: function2 +Version: 4.1.0 +Homepage: https://github.com/Naios/function2 +Description: Improved drop-in replacement to std::function diff --git a/vcpkg/ports/function2/disable-testing.patch b/vcpkg/ports/function2/disable-testing.patch new file mode 100644 index 0000000..c17403c --- /dev/null +++ b/vcpkg/ports/function2/disable-testing.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 684abe0..32a5cf6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -75,7 +75,9 @@ if (FU2_IS_TOP_LEVEL_PROJECT) + install(EXPORT "${PROJECT_NAME}Targets" + NAMESPACE ${PROJECT_NAME}:: + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") ++endif() + ++if(0) + # Setup CPack for bundling + set(CPACK_GENERATOR "ZIP") + set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) diff --git a/vcpkg/ports/function2/portfile.cmake b/vcpkg/ports/function2/portfile.cmake new file mode 100644 index 0000000..54d313a --- /dev/null +++ b/vcpkg/ports/function2/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Naios/function2 + REF 3a0746bf5f601dfed05330aefcb6854354fce07d # 4.1.0 + SHA512 48dd8fb1ce47df0835c03edf78ae427beebfeeaaabf6b993eb02843f72cce796ba5d1042f505990f29debd42bc834e531335484d45ca33e841657e9ff9e5034f + HEAD_REF master + PATCHES + disable-testing.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE ${CURRENT_PACKAGES_DIR}/Readme.md) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +# Put the installed licence file where vcpkg expects it +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/fuzzylite/CONTROL b/vcpkg/ports/fuzzylite/CONTROL new file mode 100644 index 0000000..f7376d2 --- /dev/null +++ b/vcpkg/ports/fuzzylite/CONTROL @@ -0,0 +1,5 @@ +Source: fuzzylite +Version: 6.0 +Port-Version: 3 +Homepage: https://github.com/fuzzylite/fuzzylite +Description: A fuzzy logic control library in C++ diff --git a/vcpkg/ports/fuzzylite/portfile.cmake b/vcpkg/ports/fuzzylite/portfile.cmake new file mode 100644 index 0000000..cd79ecc --- /dev/null +++ b/vcpkg/ports/fuzzylite/portfile.cmake @@ -0,0 +1,46 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fuzzylite/fuzzylite + REF v6.0 + SHA512 6f5d40d0359458e109ac2aebfbf571f61867a8b49920f4a5e1b5d86bdf578dba038b942c9e05eab0d4620f73e8cded770abe7b5e597a3b4c39dbcf6a1259f4af + HEAD_REF master +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(FL_BUILD_SHARED ON) + set(FL_BUILD_STATIC OFF) +else() + set(FL_BUILD_SHARED OFF) + set(FL_BUILD_STATIC ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/fuzzylite + PREFER_NINJA + OPTIONS + -DFL_BUILD_SHARED=${FL_BUILD_SHARED} + -DFL_BUILD_STATIC=${FL_BUILD_STATIC} + -DFL_BUILD_BINARY=OFF + -DFL_BUILD_TESTS=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/fuzzylite-static.lib ${CURRENT_PACKAGES_DIR}/lib/fuzzylite.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/fuzzylite-static-debug.lib ${CURRENT_PACKAGES_DIR}/debug/lib/fuzzylite-debug.lib) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/fl/fuzzylite.h + "#elif defined(FL_IMPORT_LIBRARY)" + "#elif 1" + ) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/g2o/CONTROL b/vcpkg/ports/g2o/CONTROL new file mode 100644 index 0000000..5234914 --- /dev/null +++ b/vcpkg/ports/g2o/CONTROL @@ -0,0 +1,6 @@ +Source: g2o +Version: 2020-02-07 +Port-Version: 1 +Build-Depends: suitesparse, eigen3, lapack, ceres +Description: g2o: A General Framework for Graph Optimization +Homepage: https://openslam.org/g2o.html diff --git a/vcpkg/ports/g2o/portfile.cmake b/vcpkg/ports/g2o/portfile.cmake new file mode 100644 index 0000000..010a10c --- /dev/null +++ b/vcpkg/ports/g2o/portfile.cmake @@ -0,0 +1,43 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO RainerKuemmerle/g2o + REF fcba4eaca6f20d9a5792404cc8ef303aeb8ba5d2 + SHA512 41e5a6d40db10d66182653d56f937f29264bf4f9412dfa651be949caeb055741c9d9ba75a122180892aafe7d45b334d50470284121148c0561e1d49f6ba5e20a + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_LGPL_SHARED_LIBS) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_LGPL_SHARED_LIBS=${BUILD_LGPL_SHARED_LIBS} + -DG2O_BUILD_EXAMPLES=OFF + -DG2O_BUILD_APPS=OFF +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/g2o) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(GLOB_RECURSE HEADERS "${CURRENT_PACKAGES_DIR}/include/*") + foreach(HEADER ${HEADERS}) + file(READ ${HEADER} HEADER_CONTENTS) + string(REPLACE "#ifdef G2O_SHARED_LIBS" "#if 1" HEADER_CONTENTS "${HEADER_CONTENTS}") + file(WRITE ${HEADER} "${HEADER_CONTENTS}") + endforeach() +endif() + +file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +if(EXE OR DEBUG_EXE) + file(REMOVE ${EXE} ${DEBUG_EXE}) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/doc/license-bsd.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/g3log/CONTROL b/vcpkg/ports/g3log/CONTROL new file mode 100644 index 0000000..aeeee68 --- /dev/null +++ b/vcpkg/ports/g3log/CONTROL @@ -0,0 +1,4 @@ +Source: g3log +Version: 2019-07-29 +Description: Asynchronous logger with Dynamic Sinks +Homepage: https://github.com/KjellKod/g3log diff --git a/vcpkg/ports/g3log/portfile.cmake b/vcpkg/ports/g3log/portfile.cmake new file mode 100644 index 0000000..f0ae8a2 --- /dev/null +++ b/vcpkg/ports/g3log/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KjellKod/g3log + REF f1491791785101d4ae948f8ecee7e9cc3e6b0be8 + SHA512 852ed7c9eb2345f02414be7fb7dfbd4be340dcbf8abc4e6ba6327d181cf10e33969279166151b4eeab78b290d3fecbf4a5094696c412f7b2ab815df415652bd8 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" G3_SHARED_LIB) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" G3_SHARED_RUNTIME) + +# https://github.com/KjellKod/g3log#prerequisites +set(VERSION "1.3.2-80") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DG3_SHARED_LIB=${G3_SHARED_LIB} # Options.cmake + -DG3_SHARED_RUNTIME=${G3_SHARED_RUNTIME} # Options.cmake + -DADD_FATAL_EXAMPLE=OFF + -DADD_G3LOG_BENCH_PERFORMANCE=OFF + -DADD_G3LOG_UNIT_TEST=OFF + -DVERSION=${VERSION} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/g3logger TARGET_PATH share/g3logger) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME g3logger) diff --git a/vcpkg/ports/gainput/CONTROL b/vcpkg/ports/gainput/CONTROL new file mode 100644 index 0000000..70ec021 --- /dev/null +++ b/vcpkg/ports/gainput/CONTROL @@ -0,0 +1,4 @@ +Source: gainput +Version: 1.0.0-3 +Homepage: https://github.com/jkuhlmann/gainput +Description: Gainput is a multiplatform C++ input library, supporting mouse, keyboard and controllers diff --git a/vcpkg/ports/gainput/install_as_cmake_package.patch b/vcpkg/ports/gainput/install_as_cmake_package.patch new file mode 100644 index 0000000..aaee43a --- /dev/null +++ b/vcpkg/ports/gainput/install_as_cmake_package.patch @@ -0,0 +1,69 @@ +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index 14d5e85..cb7232f 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -30,19 +30,27 @@ if (GAINPUT_BUILD_SHARED) + endif (GAINPUT_BUILD_SHARED) + + if (GAINPUT_BUILD_STATIC) +- message(STATUS "..Building shared libraries (-DGAINPUT_BUILD_STATIC=OFF to disable)") ++ message(STATUS "..Building static libraries (-DGAINPUT_BUILD_STATIC=OFF to disable)") + add_library(gainputstatic STATIC ${sources} ${mmsources}) + set_target_properties(gainputstatic PROPERTIES DEBUG_POSTFIX -d FOLDER gainput) + set(install_libs ${install_libs} gainputstatic) + endif (GAINPUT_BUILD_STATIC) + + if(WIN32) +- target_link_libraries(gainput ${XINPUT} ws2_32) +- target_link_libraries(gainputstatic ${XINPUT} ws2_32) ++ if (GAINPUT_BUILD_SHARED) ++ target_link_libraries(gainput ${XINPUT} ws2_32) ++ endif(GAINPUT_BUILD_SHARED) ++ if(GAINPUT_BUILD_STATIC) ++ target_link_libraries(gainputstatic ${XINPUT} ws2_32) ++ endif(GAINPUT_BUILD_STATIC) + add_definitions(-DGAINPUT_LIB_DYNAMIC=1) + elseif(ANDROID) +- target_link_libraries(gainputstatic native_app_glue log android) +- target_link_libraries(gainput native_app_glue log android) ++ if (GAINPUT_BUILD_SHARED) ++ target_link_libraries(gainput native_app_glue log android) ++ endif(GAINPUT_BUILD_SHARED) ++ if(GAINPUT_BUILD_STATIC) ++ target_link_libraries(gainputstatic native_app_glue log android) ++ endif(GAINPUT_BUILD_STATIC) + elseif(APPLE) + find_library(FOUNDATION Foundation) + find_library(IOKIT IOKit) +@@ -65,6 +73,14 @@ if(NOT DEFINED CMAKE_INSTALL_LIBDIR) + endif(NOT DEFINED CMAKE_INSTALL_LIBDIR) + set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) + ++foreach(t ${install_libs}) ++ target_include_directories( ++ ${t} ++ INTERFACE $ ++ $ ++ ) ++endforeach() ++ + install( + DIRECTORY "include/gainput" + DESTINATION "include" +@@ -73,7 +89,15 @@ install( + + install( + TARGETS ${install_libs} ++ EXPORT unofficial-${PROJECT_NAME}-Targets + LIBRARY DESTINATION "${libdir}" + ARCHIVE DESTINATION "${libdir}" + RUNTIME DESTINATION "bin" + ) ++ ++install( ++ EXPORT unofficial-${PROJECT_NAME}-Targets ++ FILE unofficial-${PROJECT_NAME}Config.cmake ++ NAMESPACE unofficial::${PROJECT_NAME}:: ++ DESTINATION share/unofficial-${PROJECT_NAME} ++) +\ No newline at end of file diff --git a/vcpkg/ports/gainput/portfile.cmake b/vcpkg/ports/gainput/portfile.cmake new file mode 100644 index 0000000..4c568f1 --- /dev/null +++ b/vcpkg/ports/gainput/portfile.cmake @@ -0,0 +1,39 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jkuhlmann/gainput + REF v1.0.0 + SHA512 56fdc4c0613d7260861885b270ebe9e624e940175f41e3ac82516e2eb0d6d229e405fbcc2e54608e7d6751c1d8658b5b5e186153193badc6487274cb284a8cd6 + HEAD_REF master + PATCHES + "install_as_cmake_package.patch" +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(GAINPUT_BUILD_SHARED OFF) + set(GAINPUT_BUILD_STATIC ON) +else() + set(GAINPUT_BUILD_SHARED ON) + set(GAINPUT_BUILD_STATIC OFF) +endif() +if(APPLE) + set(GAINPUT_BUILD_SHARED ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DGAINPUT_BUILD_SHARED=${GAINPUT_BUILD_SHARED} + -DGAINPUT_BUILD_STATIC=${GAINPUT_BUILD_STATIC} + -DGAINPUT_TESTS=OFF + -DGAINPUT_SAMPLES=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-gainput TARGET_PATH share/unofficial-gainput) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/gamedev-framework/CONTROL b/vcpkg/ports/gamedev-framework/CONTROL new file mode 100644 index 0000000..d152e84 --- /dev/null +++ b/vcpkg/ports/gamedev-framework/CONTROL @@ -0,0 +1,7 @@ +Source: gamedev-framework +Version: 0.17 +Port-Version: 1 +Homepage: https://github.com/GamedevFramework/gf +Description: gf is a framework to build 2D games in C++14. +Build-Depends: sdl2, freetype, zlib, boost-algorithm, boost-filesystem, boost-heap, boost-container, stb, pugixml +Supports: !arm diff --git a/vcpkg/ports/gamedev-framework/portfile.cmake b/vcpkg/ports/gamedev-framework/portfile.cmake new file mode 100644 index 0000000..511bf9c --- /dev/null +++ b/vcpkg/ports/gamedev-framework/portfile.cmake @@ -0,0 +1,48 @@ +vcpkg_fail_port_install( + ON_ARCH "arm" +) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO GamedevFramework/gf + HEAD_REF master + REF v0.17.4 + SHA512 b35e0fef3c9dc397ec43132dcd6ca87f78217c55d72fc1117b1f530d568ad3537a0f682e285840471faa4e06eb7f396b784da767e83686519d0694b198a86379 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DGF_VCPKG=ON + -DGF_USE_EMBEDDED_LIBS=OFF + -DGF_BUILD_GAMES=OFF + -DGF_BUILD_EXAMPLES=OFF + -DGF_BUILD_TESTS=OFF + -DGF_BUILD_DOCUMENTATION=OFF + -DGF_SINGLE_COMPILTATION_UNIT=ON + -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} + OPTIONS_RELEASE -DGF_DEBUG=OFF + OPTIONS_DEBUG -DGF_DEBUG=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/gf TARGET_PATH share/gf) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/share/doc" + "${CURRENT_PACKAGES_DIR}/debug/bin/gf_info.exe" + "${CURRENT_PACKAGES_DIR}/bin/gf_info.exe" +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/bin" + "${CURRENT_PACKAGES_DIR}/debug/bin" + ) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/gamma/CMakeLists.txt b/vcpkg/ports/gamma/CMakeLists.txt new file mode 100644 index 0000000..45f0ba7 --- /dev/null +++ b/vcpkg/ports/gamma/CMakeLists.txt @@ -0,0 +1,41 @@ +cmake_minimum_required (VERSION 3.0) + +project (gamma) + +# dependent on libsndfile and portaudio +find_package(SndFile CONFIG REQUIRED) +find_path(PORTAUDIO_H portaudio.h) +find_library(PORTAUDIO_LIB NAMES portaudio) + +set(SOURCEFILES + src/arr.cpp + src/AudioIO.cpp + src/Conversion.cpp + src/Domain.cpp + src/DFT.cpp + src/FFT_fftpack.cpp + src/fftpack++1.cpp + src/fftpack++2.cpp + src/SoundFile.cpp + src/Print.cpp + src/Recorder.cpp + src/scl.cpp + src/Scheduler.cpp + src/Timer.cpp + src/SoundFile.cpp) + +include_directories(. Gamma ${CMAKE_INSTALL_FULL_INCLUDEDIR} ${PORTAUDIO_H}) + +add_library (gamma ${SOURCEFILES}) +target_link_libraries(gamma PUBLIC SndFile::sndfile ${PORTAUDIO_LIB}) + +install( + TARGETS gamma + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY Gamma DESTINATION include FILES_MATCHING PATTERN "*.h") +endif() diff --git a/vcpkg/ports/gamma/CONTROL b/vcpkg/ports/gamma/CONTROL new file mode 100644 index 0000000..b0814d9 --- /dev/null +++ b/vcpkg/ports/gamma/CONTROL @@ -0,0 +1,6 @@ +Source: gamma +Version: gamma-2018-01-27 +Port-Version: 2 +Homepage: https://github.com/LancePutnam/Gamma +Build-Depends: libsndfile, portaudio +Description: Gamma is a cross-platform, C++ library for doing generic synthesis and filtering of signals. It is oriented towards real-time sound and graphics applications, but is equally useful for non-real-time tasks. Gamma is designed to be "light-footed" in terms of memory and processing making it highly suitable for plug-in development or embedding in other C++ projects. diff --git a/vcpkg/ports/gamma/portfile.cmake b/vcpkg/ports/gamma/portfile.cmake new file mode 100644 index 0000000..0437842 --- /dev/null +++ b/vcpkg/ports/gamma/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +set(GAMMA_RELEASE_TAG "cc442ad0c5da369966cd937a96925c7b9a04e9e5") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO "LancePutnam/Gamma" + REF ${GAMMA_RELEASE_TAG} + SHA512 431f17f053ca1c5ba0117b7ae7af8efae9df454593437de00dfea8ee04991b5701bee99d79deb074e60e397981a7fc1ce3476ec118d0f369e71e2cbaa696383d + 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() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/gasol/CONTROL b/vcpkg/ports/gasol/CONTROL new file mode 100644 index 0000000..2ae5ce2 --- /dev/null +++ b/vcpkg/ports/gasol/CONTROL @@ -0,0 +1,4 @@ +Source: gasol +Version: 2018-01-04 +Homepage: https://github.com/PytLab/GASol +Description: A general Genetic Algorithm Solver in C++ diff --git a/vcpkg/ports/gasol/fix-install.patch b/vcpkg/ports/gasol/fix-install.patch new file mode 100644 index 0000000..5d2be99 --- /dev/null +++ b/vcpkg/ports/gasol/fix-install.patch @@ -0,0 +1,19 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 0cba691..51e47a3 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1,3 +1,13 @@ + file(GLOB GASol_SRC *.cpp) + add_library(GASol STATIC ${GASol_SRC}) + ++file(GLOB GASol_INCLUDES *.h) ++ ++install(FILES ${GASol_INCLUDES} DESTINATION include) ++ ++install( ++ TARGETS GASol ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) +\ No newline at end of file diff --git a/vcpkg/ports/gasol/gasol.patch b/vcpkg/ports/gasol/gasol.patch new file mode 100644 index 0000000..92d484e --- /dev/null +++ b/vcpkg/ports/gasol/gasol.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4a21f65..a4cede0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -15,11 +15,15 @@ set(CMAKE_CXX_EXTENSIONS OFF) + # Find OpenMP. + find_package(OpenMP) + if (OPENMP_FOUND) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} -fPIC -Wall -Wextra -Werror -pedantic") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS} -fPIC -pedantic") + else() +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall -Wextra -Werror -pedantic") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -pedantic") + endif() + ++if(CMAKE_COMPILER_IS_GNUCXX) ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror") ++endif(CMAKE_COMPILER_IS_GNUCXX) ++ + if (COV) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage") + endif() +@@ -39,7 +43,7 @@ endif() + add_subdirectory(src) + + # GASol test dir. +-add_subdirectory(unittest) ++# add_subdirectory(unittest) + + # GASol run dir. + add_subdirectory(example) diff --git a/vcpkg/ports/gasol/portfile.cmake b/vcpkg/ports/gasol/portfile.cmake new file mode 100644 index 0000000..5d3ed6b --- /dev/null +++ b/vcpkg/ports/gasol/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_fail_port_install(ON_TARGET "UWP" ON_ARCH "arm" "arm64") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO PytLab/GASol + REF 05af009bca2903c1cc491c9a6eed01bc3c936637 + SHA512 a8546bf565a389b919dd1dd5b88b4985c1803cbb09fab0715d1b0abfda92a6bf3adea7e4b3329ad82a6f6892f1747a73a632687fd79fb77c937e7ba07c62268a + HEAD_REF master + PATCHES + gasol.patch + fix-install.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/gaussianlib/CONTROL b/vcpkg/ports/gaussianlib/CONTROL new file mode 100644 index 0000000..7f0be1d --- /dev/null +++ b/vcpkg/ports/gaussianlib/CONTROL @@ -0,0 +1,4 @@ +Source: gaussianlib +Version: 2019-08-04 +Description: Basic linear algebra C++ library for 2D and 3D applications +Homepage: https://github.com/LukasBanana/GaussianLib diff --git a/vcpkg/ports/gaussianlib/portfile.cmake b/vcpkg/ports/gaussianlib/portfile.cmake new file mode 100644 index 0000000..2191967 --- /dev/null +++ b/vcpkg/ports/gaussianlib/portfile.cmake @@ -0,0 +1,16 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO LukasBanana/GaussianLib + REF 8630d4ac14a37f01c71bdf0c1c653e3746aa08da + SHA512 70de394496f20fe7037782d16cfa4bcd85beefdb25094247b8b572e6bb55866be6e2c82722d705141919b91f24428dde7b32f3d8a39670e7ef324c81b1ebe7e2 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/include/Gauss DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/gcem/CONTROL b/vcpkg/ports/gcem/CONTROL new file mode 100644 index 0000000..7af19ce --- /dev/null +++ b/vcpkg/ports/gcem/CONTROL @@ -0,0 +1,3 @@ +Source: gcem +Version: 1.13.1 +Description: A C++ compile-time math library using generalized constant expressions diff --git a/vcpkg/ports/gcem/portfile.cmake b/vcpkg/ports/gcem/portfile.cmake new file mode 100644 index 0000000..1e0883a --- /dev/null +++ b/vcpkg/ports/gcem/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kthohr/gcem + REF v1.13.1 + SHA512 77acd210bf57b796ec3b9cf982c552bb9c0d2176f2f91aa68fd2181dabdb099c42b8ff3d4d20331e6af8a8c3cf87dc2d027e0ce29dc7400d225ee55746f82ba3 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/gcem) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/gdal/0001-Fix-debug-crt-flags.patch b/vcpkg/ports/gdal/0001-Fix-debug-crt-flags.patch new file mode 100644 index 0000000..266fc43 --- /dev/null +++ b/vcpkg/ports/gdal/0001-Fix-debug-crt-flags.patch @@ -0,0 +1,22 @@ +--- a/nmake.opt Fri Dec 14 22:34:20 2018 ++++ b/nmake.opt Wed Mar 27 11:00:00 2019 +@@ -133,7 +133,17 @@ + ++# Flags to choose CRT variant to link against (e.g. static: /MT, /MTd, dynamic: /MD, /MDd) ++# Ensure MRSID_CONFIG in mrsid/nmake.opt is set appropriately as well ++!IFNDEF CXX_CRT_FLAGS ++!IFNDEF DEBUG ++CXX_CRT_FLAGS=/MD ++!ELSE ++CXX_CRT_FLAGS=/MDd ++!ENDIF ++!ENDIF ++ + !IFNDEF OPTFLAGS + !IF "$(DEBUG)" == "0" +-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MD /EHsc /Ox /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG ++OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP $(CXX_CRT_FLAGS) /EHsc /Ox /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DNDEBUG + !ELSE +-OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP /MDd /EHsc /FC /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG ++OPTFLAGS= $(CXX_ANALYZE_FLAGS) $(CXX_PDB_FLAGS) /nologo /MP $(CXX_CRT_FLAGS) /EHsc /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DDEBUG + !ENDIF diff --git a/vcpkg/ports/gdal/0002-Fix-static-build.patch b/vcpkg/ports/gdal/0002-Fix-static-build.patch new file mode 100644 index 0000000..d440cef --- /dev/null +++ b/vcpkg/ports/gdal/0002-Fix-static-build.patch @@ -0,0 +1,27 @@ +--- a/makefile.vc Fri Dec 14 22:34:20 2018 ++++ b/makefile.vc Wed Mar 27 11:00:00 2019 +@@ -60,3 +60,3 @@ + +-default: $(TARGET_LIB) $(PLUGIN_TARGET) apps_dir ++default: $(TARGET_LIB) $(PLUGIN_TARGET) + +@@ -227,4 +227,2 @@ + $(MAKE) /f makefile.vc plugins-install +- cd ..\apps +- $(MAKE) /f makefile.vc install + cd .. +@@ -232,8 +230,2 @@ + $(INSTALL) LICENSE.TXT $(DATADIR) +-!IFDEF HTMLDIR +- -mkdir $(HTMLDIR) +- cd frmts +- $(MAKE) /f makefile.vc html-install +- cd .. +-!ENDIF + !IFDEF INCLUDE_OGR_FRMTS +@@ -241,5 +233,2 @@ + $(MAKE) /f makefile.vc plugins-install +-!IFDEF HTMLDIR +- $(MAKE) /f makefile.vc html-install +-!ENDIF + cd ..\.. diff --git a/vcpkg/ports/gdal/0003-Fix-std-fabs.patch b/vcpkg/ports/gdal/0003-Fix-std-fabs.patch new file mode 100644 index 0000000..4a6ba7c --- /dev/null +++ b/vcpkg/ports/gdal/0003-Fix-std-fabs.patch @@ -0,0 +1,10 @@ +--- a/ogrlinestring.cpp Fri Dec 14 22:34:20 2018 ++++ b/ogrlinestring.cpp Wed Mar 27 11:00:00 2019 +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + + CPL_CVSID("$Id: ogrlinestring.cpp 61153d33d7f055c3442ff728adbfa8e09582464b 2019-03-10 14:23:51 +0100 Even Rouault $") + diff --git a/vcpkg/ports/gdal/CONTROL b/vcpkg/ports/gdal/CONTROL new file mode 100644 index 0000000..36d3510 --- /dev/null +++ b/vcpkg/ports/gdal/CONTROL @@ -0,0 +1,15 @@ +Source: gdal +Version: 2.4.1 +Port-Version: 12 +Homepage: https://gdal.org/ +Description: The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data. +Build-Depends: proj4, libpng, geos, sqlite3, curl, expat, libpq, openjpeg, libwebp, libxml2, liblzma, netcdf-c, hdf5, zlib +Supports: !arm + +Feature: mysql-libmariadb +Build-Depends: libmariadb +Description: Add mysql support using libmariadb + +Feature: libspatialite +Build-Depends: libspatialite +Description: Create or update SpatiaLite databases using libspatialite diff --git a/vcpkg/ports/gdal/portfile.cmake b/vcpkg/ports/gdal/portfile.cmake new file mode 100644 index 0000000..aabd95f --- /dev/null +++ b/vcpkg/ports/gdal/portfile.cmake @@ -0,0 +1,433 @@ +# NOTE: update the version and checksum for new GDAL release +set(GDAL_VERSION_STR "2.4.1") +set(GDAL_VERSION_PKG "241") +set(GDAL_VERSION_LIB "204") +set(GDAL_PACKAGE_SUM "edb9679ee6788334cf18971c803615ac9b1c72bc0c96af8fd4852cb7e8f58e9c4f3d9cb66406bc8654419612e1a7e9d0e62f361712215f4a50120f646bb0a738") + +vcpkg_fail_port_install(ON_ARCH "arm") + +vcpkg_download_distfile(ARCHIVE + URLS "http://download.osgeo.org/gdal/${GDAL_VERSION_STR}/gdal${GDAL_VERSION_PKG}.zip" + FILENAME "gdal${GDAL_VERSION_PKG}.zip" + SHA512 ${GDAL_PACKAGE_SUM} +) + +# Extract source into architecture specific directory, because GDALs' nmake based build currently does not +# support out of source builds. +set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-debug/gdal-${GDAL_VERSION_STR}) +set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-release/gdal-${GDAL_VERSION_STR}) + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + list(APPEND BUILD_TYPES "release") +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + list(APPEND BUILD_TYPES "debug") +endif() + +foreach(BUILD_TYPE IN LISTS BUILD_TYPES) + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}) + vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}) + if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-${GDAL_VERSION_STR} + PATCHES + 0001-Fix-debug-crt-flags.patch + 0002-Fix-static-build.patch + ) + else() + vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-${GDAL_VERSION_STR} + PATCHES + 0001-Fix-debug-crt-flags.patch + ) + endif() + vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}-${BUILD_TYPE}/gdal-${GDAL_VERSION_STR}/ogr + PATCHES + 0003-Fix-std-fabs.patch + ) +endforeach() + +if (VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) + # Check build system first + find_program(NMAKE nmake REQUIRED) + + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR) + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/share/gdal" NATIVE_DATA_DIR) + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/share/gdal/html" NATIVE_HTML_DIR) + + # Setup proj4 libraries + include path + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" PROJ_INCLUDE_DIR) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/proj.lib" PROJ_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/proj_d.lib" PROJ_LIBRARY_DBG) + + # Setup libpng libraries + include path + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" PNG_INCLUDE_DIR) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libpng16.lib" PNG_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libpng16d.lib" PNG_LIBRARY_DBG) + + # Setup zlib libraries + include path + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" ZLIB_INCLUDE_DIR) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/zlib.lib" ZLIB_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib" ZLIB_LIBRARY_DBG) + + # Setup geos libraries + include path + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" GEOS_INCLUDE_DIR) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib ${CURRENT_INSTALLED_DIR}/lib/geos.lib" GEOS_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib ${CURRENT_INSTALLED_DIR}/debug/lib/geosd.lib" GEOS_LIBRARY_DBG) + else() + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib" GEOS_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib" GEOS_LIBRARY_DBG) + endif() + + # Setup expat libraries + include path + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" EXPAT_INCLUDE_DIR) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libexpatMD.lib" EXPAT_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libexpatdMD.lib" EXPAT_LIBRARY_DBG) + else() + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libexpat.lib" EXPAT_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libexpatd.lib" EXPAT_LIBRARY_DBG) + endif() + + # Setup curl libraries + include path + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" CURL_INCLUDE_DIR) + if(EXISTS "${CURRENT_INSTALLED_DIR}/lib/libcurl.lib") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libcurl.lib" CURL_LIBRARY_REL) + elseif(EXISTS "${CURRENT_INSTALLED_DIR}/lib/libcurl_imp.lib") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libcurl_imp.lib" CURL_LIBRARY_REL) + endif() + if(EXISTS "${CURRENT_INSTALLED_DIR}/debug/lib/libcurl-d.lib") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libcurl-d.lib" CURL_LIBRARY_DBG) + elseif(EXISTS "${CURRENT_INSTALLED_DIR}/debug/lib/libcurl-d_imp.lib") + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libcurl-d_imp.lib" CURL_LIBRARY_DBG) + endif() + + # Setup sqlite3 libraries + include path + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" SQLITE_INCLUDE_DIR) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/sqlite3.lib" SQLITE_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/sqlite3.lib" SQLITE_LIBRARY_DBG) + + # Setup PostgreSQL libraries + include path + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" PGSQL_INCLUDE_DIR) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libpq.lib" PGSQL_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libpq.lib" PGSQL_LIBRARY_DBG) + + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libpgcommon.lib" TMP_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libpgcommon.lib" TMP_DBG) + set(PGSQL_LIBRARY_REL "${PGSQL_LIBRARY_REL} ${TMP_REL}") + set(PGSQL_LIBRARY_DBG "${PGSQL_LIBRARY_DBG} ${TMP_DBG}") + + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libpgport.lib" TMP_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libpgport.lib" TMP_DBG) + set(PGSQL_LIBRARY_REL "${PGSQL_LIBRARY_REL} ${TMP_REL}") + set(PGSQL_LIBRARY_DBG "${PGSQL_LIBRARY_DBG} ${TMP_DBG}") + + # Setup OpenJPEG libraries + include path + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" OPENJPEG_INCLUDE_DIR) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/openjp2.lib" OPENJPEG_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/openjp2.lib" OPENJPEG_LIBRARY_DBG) + + # Setup WebP libraries + include path + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" WEBP_INCLUDE_DIR) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/webp.lib" WEBP_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/webpd.lib" WEBP_LIBRARY_DBG) + + # Setup libxml2 libraries + include path + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" XML2_INCLUDE_DIR) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib" XML2_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib" XML2_LIBRARY_DBG) + + # Setup liblzma libraries + include path + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include" LZMA_INCLUDE_DIR) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/lzma.lib" LZMA_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/lzmad.lib" LZMA_LIBRARY_DBG) + + # Setup openssl libraries path + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libcrypto.lib ${CURRENT_INSTALLED_DIR}/lib/libssl.lib" OPENSSL_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libcrypto.lib ${CURRENT_INSTALLED_DIR}/debug/lib/libssl.lib" OPENSSL_LIBRARY_DBG) + + # Setup libiconv libraries path + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libiconv.lib ${CURRENT_INSTALLED_DIR}/lib/libcharset.lib" ICONV_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libiconv.lib ${CURRENT_INSTALLED_DIR}/debug/lib/libcharset.lib" ICONV_LIBRARY_DBG) + + if("mysql-libmysql" IN_LIST FEATURES OR "mysql-libmariadb" IN_LIST FEATURES) + # Setup MySQL libraries + include path + if("mysql-libmysql" IN_LIST FEATURES) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include/mysql" MYSQL_INCLUDE_DIR) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libmysql.lib" MYSQL_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libmysql.lib" MYSQL_LIBRARY_DBG) + endif() + + if("mysql-libmariadb" IN_LIST FEATURES) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include/mysql" MYSQL_INCLUDE_DIR) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/libmariadb.lib" MYSQL_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/libmariadb.lib" MYSQL_LIBRARY_DBG) + endif() + + list(APPEND NMAKE_OPTIONS MYSQL_INC_DIR=${MYSQL_INCLUDE_DIR}) + list(APPEND NMAKE_OPTIONS_REL MYSQL_LIB=${MYSQL_LIBRARY_REL}) + list(APPEND NMAKE_OPTIONS_DBG MYSQL_LIB=${MYSQL_LIBRARY_DBG}) + endif() + + if ("libspatialite" IN_LIST FEATURES) + # Setup spatialite libraries + include path + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/include/spatialite" SPATIALITE_INCLUDE_DIR) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/lib/spatialite.lib" SPATIALITE_LIBRARY_REL) + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}/debug/lib/spatialite.lib" SPATIALITE_LIBRARY_DBG) + set(HAVE_SPATIALITE "-DHAVE_SPATIALITE") + endif() + + list(APPEND NMAKE_OPTIONS + GDAL_HOME=${NATIVE_PACKAGES_DIR} + DATADIR=${NATIVE_DATA_DIR} + HTMLDIR=${NATIVE_HTML_DIR} + GEOS_DIR=${GEOS_INCLUDE_DIR} + "GEOS_CFLAGS=-I${GEOS_INCLUDE_DIR} -DHAVE_GEOS" + PROJ_INCLUDE=-I${PROJ_INCLUDE_DIR} + EXPAT_DIR=${EXPAT_INCLUDE_DIR} + EXPAT_INCLUDE=-I${EXPAT_INCLUDE_DIR} + CURL_INC=-I${CURL_INCLUDE_DIR} + "SQLITE_INC=-I${SQLITE_INCLUDE_DIR} ${HAVE_SPATIALITE}" + PG_INC_DIR=${PGSQL_INCLUDE_DIR} + OPENJPEG_ENABLED=YES + OPENJPEG_CFLAGS=-I${OPENJPEG_INCLUDE_DIR} + OPENJPEG_VERSION=20100 + WEBP_ENABLED=YES + WEBP_CFLAGS=-I${WEBP_INCLUDE_DIR} + LIBXML2_INC=-I${XML2_INCLUDE_DIR} + PNG_EXTERNAL_LIB=1 + PNGDIR=${PNG_INCLUDE_DIR} + ZLIB_INC=-I${ZLIB_INCLUDE_DIR} + ZLIB_EXTERNAL_LIB=1 + ACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1 + MSVC_VER=1900 + ) + + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + list(APPEND NMAKE_OPTIONS WIN64=YES) + endif() + + if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + list(APPEND NMAKE_OPTIONS CURL_CFLAGS=-DCURL_STATICLIB) + list(APPEND NMAKE_OPTIONS DLLBUILD=0) + list(APPEND NMAKE_OPTIONS "PROJ_FLAGS=-DPROJ_STATIC -DPROJ_VERSION=5") + else() + # Enables PDBs for release and debug builds + list(APPEND NMAKE_OPTIONS WITH_PDB=1) + list(APPEND NMAKE_OPTIONS DLLBUILD=1) + endif() + + if (VCPKG_CRT_LINKAGE STREQUAL static) + set(LINKAGE_FLAGS "/MT") + else() + set(LINKAGE_FLAGS "/MD") + endif() + + list(APPEND NMAKE_OPTIONS_REL + ${NMAKE_OPTIONS} + CXX_CRT_FLAGS=${LINKAGE_FLAGS} + PROJ_LIBRARY=${PROJ_LIBRARY_REL} + PNG_LIB=${PNG_LIBRARY_REL} + "GEOS_LIB=${GEOS_LIBRARY_REL}" + EXPAT_LIB=${EXPAT_LIBRARY_REL} + "CURL_LIB=${CURL_LIBRARY_REL} wsock32.lib wldap32.lib winmm.lib" + "SQLITE_LIB=${SQLITE_LIBRARY_REL} ${SPATIALITE_LIBRARY_REL}" + OPENJPEG_LIB=${OPENJPEG_LIBRARY_REL} + WEBP_LIBS=${WEBP_LIBRARY_REL} + "LIBXML2_LIB=${XML2_LIBRARY_REL} ${ICONV_LIBRARY_REL} ${LZMA_LIBRARY_REL}" + ZLIB_LIB=${ZLIB_LIBRARY_REL} + "PG_LIB=${PGSQL_LIBRARY_REL} Secur32.lib Shell32.lib Advapi32.lib Crypt32.lib Gdi32.lib ${OPENSSL_LIBRARY_REL}" + ) + + list(APPEND NMAKE_OPTIONS_DBG + ${NMAKE_OPTIONS} + CXX_CRT_FLAGS="${LINKAGE_FLAGS}d" + PROJ_LIBRARY=${PROJ_LIBRARY_DBG} + PNG_LIB=${PNG_LIBRARY_DBG} + "GEOS_LIB=${GEOS_LIBRARY_DBG}" + EXPAT_LIB=${EXPAT_LIBRARY_DBG} + "CURL_LIB=${CURL_LIBRARY_DBG} wsock32.lib wldap32.lib winmm.lib" + "SQLITE_LIB=${SQLITE_LIBRARY_DBG} ${SPATIALITE_LIBRARY_DBG}" + OPENJPEG_LIB=${OPENJPEG_LIBRARY_DBG} + WEBP_LIBS=${WEBP_LIBRARY_DBG} + "LIBXML2_LIB=${XML2_LIBRARY_DBG} ${ICONV_LIBRARY_DBG} ${LZMA_LIBRARY_DBG}" + ZLIB_LIB=${ZLIB_LIBRARY_DBG} + "PG_LIB=${PGSQL_LIBRARY_DBG} Secur32.lib Shell32.lib Advapi32.lib Crypt32.lib Gdi32.lib ${OPENSSL_LIBRARY_DBG}" + DEBUG=1 + ) + + # Begin build process + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + ################ + # Release build + ################ + message(STATUS "Building ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND ${NMAKE} -f makefile.vc + "${NMAKE_OPTIONS_REL}" + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME nmake-build-${TARGET_TRIPLET}-release + ) + message(STATUS "Building ${TARGET_TRIPLET}-rel done") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + ################ + # Debug build + ################ + + message(STATUS "Building ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND ${NMAKE} /G -f makefile.vc + "${NMAKE_OPTIONS_DBG}" + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME nmake-build-${TARGET_TRIPLET}-debug + ) + message(STATUS "Building ${TARGET_TRIPLET}-dbg done") + endif() + + message(STATUS "Packaging ${TARGET_TRIPLET}") + + if(NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/gdal/html) + endif() + + vcpkg_execute_required_process( + COMMAND ${NMAKE} -f makefile.vc + "${NMAKE_OPTIONS_REL}" + "install" + "devinstall" + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME nmake-install-${TARGET_TRIPLET} + ) + + if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(COPY ${SOURCE_PATH_RELEASE}/gdal.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(COPY ${SOURCE_PATH_DEBUG}/gdal.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gdal.lib ${CURRENT_PACKAGES_DIR}/debug/lib/gdald.lib) + endif() + + else() + + set(GDAL_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/gdal) + file(MAKE_DIRECTORY ${GDAL_TOOL_PATH}) + + file(GLOB GDAL_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*.exe) + file(COPY ${GDAL_TOOLS} DESTINATION ${GDAL_TOOL_PATH}) + file(REMOVE_RECURSE ${GDAL_TOOLS}) + + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/gdal.lib) + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gdal_i.lib ${CURRENT_PACKAGES_DIR}/lib/gdal.lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(COPY ${SOURCE_PATH_DEBUG}/gdal${GDAL_VERSION_LIB}.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(COPY ${SOURCE_PATH_DEBUG}/gdal_i.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gdal_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/gdald.lib) + endif() + endif() + + # Copy over PDBs + vcpkg_copy_pdbs() + + if(NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/gdal204.pdb) + endif() + +elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") # Build in UNIX + # Check build system first + find_program(MAKE make) + if (NOT MAKE) + message(FATAL_ERROR "MAKE not found") + endif() + + set(ENV{CFLAGS} "$ENV{CFLAGS} -Wno-error=implicit-function-declaration") + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + ################ + # Release build + ################ + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + set(OUT_PATH_RELEASE ${SOURCE_PATH_RELEASE}/../../make-build-${TARGET_TRIPLET}-release) + file(MAKE_DIRECTORY ${OUT_PATH_RELEASE}) + vcpkg_execute_required_process( + COMMAND "${SOURCE_PATH_RELEASE}/configure" --prefix=${OUT_PATH_RELEASE} + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME config-${TARGET_TRIPLET}-rel + ) + + message(STATUS "Building ${TARGET_TRIPLET}-rel") + vcpkg_execute_build_process( + COMMAND make -j ${VCPKG_CONCURRENCY} + NO_PARALLEL_COMMAND make + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME make-build-${TARGET_TRIPLET}-release + ) + + message(STATUS "Installing ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND make install + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME make-install-${TARGET_TRIPLET}-release + ) + + file(REMOVE_RECURSE ${OUT_PATH_RELEASE}/lib/gdalplugins) + file(COPY ${OUT_PATH_RELEASE}/lib/pkgconfig DESTINATION ${OUT_PATH_RELEASE}/share/gdal) + file(REMOVE_RECURSE ${OUT_PATH_RELEASE}/lib/pkgconfig) + file(COPY ${OUT_PATH_RELEASE}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) + file(COPY ${OUT_PATH_RELEASE}/include DESTINATION ${CURRENT_PACKAGES_DIR}) + file(COPY ${OUT_PATH_RELEASE}/share DESTINATION ${CURRENT_PACKAGES_DIR}) + message(STATUS "Installing ${TARGET_TRIPLET}-rel done") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + ################ + # Debug build + ################ + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + set(OUT_PATH_DEBUG ${SOURCE_PATH_RELEASE}/../../make-build-${TARGET_TRIPLET}-debug) + file(MAKE_DIRECTORY ${OUT_PATH_DEBUG}) + vcpkg_execute_required_process( + COMMAND "${SOURCE_PATH_DEBUG}/configure" --prefix=${OUT_PATH_DEBUG} + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME config-${TARGET_TRIPLET}-debug + ) + + message(STATUS "Building ${TARGET_TRIPLET}-dbg") + vcpkg_execute_build_process( + COMMAND make -j ${VCPKG_CONCURRENCY} + NO_PARALLEL_COMMAND make + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME make-build-${TARGET_TRIPLET}-debug + ) + + message(STATUS "Installing ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND make -j install + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME make-install-${TARGET_TRIPLET}-debug + ) + + file(REMOVE_RECURSE ${OUT_PATH_DEBUG}/lib/gdalplugins) + file(REMOVE_RECURSE ${OUT_PATH_DEBUG}/lib/pkgconfig) + file(COPY ${OUT_PATH_DEBUG}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) + message(STATUS "Installing ${TARGET_TRIPLET}-dbg done") + endif() +else() # Other build system + message(FATAL_ERROR "Unsupport build system.") +endif() + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake @ONLY) + +# Handle copyright +configure_file(${SOURCE_PATH_RELEASE}/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/gdal/usage b/vcpkg/ports/gdal/usage new file mode 100644 index 0000000..2ee0072 --- /dev/null +++ b/vcpkg/ports/gdal/usage @@ -0,0 +1,5 @@ +The package GDAL provides CMake targets: + + find_package(GDAL REQUIRED) + target_include_directories(main PRIVATE ${GDAL_INCLUDE_DIR}) + target_link_libraries(main PRIVATE ${GDAL_LIBRARY}) \ No newline at end of file diff --git a/vcpkg/ports/gdal/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/gdal/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..ba3c692 --- /dev/null +++ b/vcpkg/ports/gdal/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,12 @@ +include(FindPackageHandleStandardArgs) +include(SelectLibraryConfigurations) + +find_path(GDAL_INCLUDE_DIR NAMES gdal.h HINTS ${CURRENT_INSTALLED_DIR}) + +find_library(GDAL_LIBRARY_DEBUG NAMES gdald libgdal NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) +find_library(GDAL_LIBRARY_RELEASE NAMES gdal libgdal NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED) + +select_library_configurations(GDAL) + +set(GDAL_INCLUDE_DIR ${GDAL_INCLUDE_DIR}) +set(GDAL_LIBRARY ${GDAL_LIBRARY}) \ No newline at end of file diff --git a/vcpkg/ports/gdcm/CONTROL b/vcpkg/ports/gdcm/CONTROL new file mode 100644 index 0000000..aafb13a --- /dev/null +++ b/vcpkg/ports/gdcm/CONTROL @@ -0,0 +1,7 @@ +Source: gdcm +Version: 3.0.5 +Port-Version: 2 +Homepage: https://github.com/malaterre/GDCM +Description: Grassroots DICOM library +Build-Depends: zlib, expat, openjpeg +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/gdcm/Fix-Cmake_DIR.patch b/vcpkg/ports/gdcm/Fix-Cmake_DIR.patch new file mode 100644 index 0000000..189b28e --- /dev/null +++ b/vcpkg/ports/gdcm/Fix-Cmake_DIR.patch @@ -0,0 +1,41 @@ +diff --git a/CMake/ExportConfiguration/GDCMConfig.cmake.in b/CMake/ExportConfiguration/GDCMConfig.cmake.in +index f8e9d0b..ab28546 100644 +--- a/CMake/ExportConfiguration/GDCMConfig.cmake.in ++++ b/CMake/ExportConfiguration/GDCMConfig.cmake.in +@@ -33,28 +33,28 @@ if(GDCM_USE_VTK) + set(GDCM_VTK_DIR "@GDCM_VTK_DIR_CONFIG@") + endif() + +-get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +-if(EXISTS ${SELF_DIR}/GDCMTargets.cmake) ++get_filename_component(GDCM_SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) ++if(EXISTS ${GDCM_SELF_DIR}/GDCMTargets.cmake) + # This is an install tree +- include(${SELF_DIR}/GDCMTargets.cmake) +- get_filename_component(GDCM_INCLUDE_ROOT "${SELF_DIR}/../../@GDCM_INSTALL_INCLUDE_DIR@" ABSOLUTE) ++ include(${GDCM_SELF_DIR}/GDCMTargets.cmake) ++ get_filename_component(GDCM_INCLUDE_ROOT "${GDCM_SELF_DIR}/../../@GDCM_INSTALL_INCLUDE_DIR@" ABSOLUTE) + set(GDCM_INCLUDE_DIRS ${GDCM_INCLUDE_ROOT}) +- get_filename_component(GDCM_LIB_ROOT "${SELF_DIR}/../../@GDCM_INSTALL_LIB_DIR@" ABSOLUTE) ++ get_filename_component(GDCM_LIB_ROOT "${GDCM_SELF_DIR}/../../@GDCM_INSTALL_LIB_DIR@" ABSOLUTE) + set(GDCM_LIBRARY_DIRS ${GDCM_LIB_ROOT}) + else() +- if(EXISTS ${SELF_DIR}/GDCMExports.cmake) ++ if(EXISTS ${GDCM_SELF_DIR}/GDCMExports.cmake) + # This is a build tree + set( GDCM_INCLUDE_DIRS "@GDCM_INCLUDE_PATH@") + set(GDCM_LIBRARY_DIRS "@GDCM_LIBRARY_DIR@") + +- include(${SELF_DIR}/GDCMExports.cmake) ++ include(${GDCM_SELF_DIR}/GDCMExports.cmake) + + else() + message(FATAL_ERROR "ooops") + endif() + endif() + +-set(GDCM_USE_FILE ${SELF_DIR}/UseGDCM.cmake) ++set(GDCM_USE_FILE ${GDCM_SELF_DIR}/UseGDCM.cmake) + + # Backward compatible part: + set(GDCM_FOUND TRUE) diff --git a/vcpkg/ports/gdcm/fix-share-path.patch b/vcpkg/ports/gdcm/fix-share-path.patch new file mode 100644 index 0000000..9310946 --- /dev/null +++ b/vcpkg/ports/gdcm/fix-share-path.patch @@ -0,0 +1,32 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6ac16ab..842d833 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -246,15 +246,15 @@ if(NOT GDCM_INSTALL_LIB_DIR) + endif() + + if(NOT GDCM_INSTALL_DATA_DIR) +- set(GDCM_INSTALL_DATA_DIR "share/${subdir}") ++ set(GDCM_INSTALL_DATA_DIR "share/${projectname}") + endif() + + if(NOT GDCM_INSTALL_INCLUDE_DIR) +- set(GDCM_INSTALL_INCLUDE_DIR "include/${subdir}") ++ set(GDCM_INSTALL_INCLUDE_DIR "include/${projectname}") + endif() + + if(NOT GDCM_INSTALL_DOC_DIR) +- set(GDCM_INSTALL_DOC_DIR "share/doc/${subdir}") ++ set(GDCM_INSTALL_DOC_DIR "share/doc/${projectname}") + endif() + + if(NOT GDCM_INSTALL_MAN_DIR) +@@ -262,7 +262,7 @@ if(NOT GDCM_INSTALL_MAN_DIR) + endif() + + if(NOT GDCM_INSTALL_PACKAGE_DIR) +- set(GDCM_INSTALL_PACKAGE_DIR ${GDCM_INSTALL_LIB_DIR}/${subdir} ++ set(GDCM_INSTALL_PACKAGE_DIR ${GDCM_INSTALL_LIB_DIR}/${projectname} + CACHE INTERNAL "") + endif() + diff --git a/vcpkg/ports/gdcm/portfile.cmake b/vcpkg/ports/gdcm/portfile.cmake new file mode 100644 index 0000000..3edb205 --- /dev/null +++ b/vcpkg/ports/gdcm/portfile.cmake @@ -0,0 +1,57 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO malaterre/GDCM + REF f46fc26fa1c85e803f77496255a4de308828ac7f # v3.0.5 + SHA512 b5a85f4e752056cd40e06d557e17f8b56fc49c30ae8aaa3c7f483ae4851cb60c18edb227e8bf8ec8133de2a442a38f7a82dac99bce9d9afb74397778564bae4f + HEAD_REF master + PATCHES + use-openjpeg-config.patch + fix-share-path.patch + Fix-Cmake_DIR.patch +) + +file(REMOVE ${SOURCE_PATH}/CMake/FindOpenJPEG.cmake) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(VCPKG_BUILD_SHARED_LIBS ON) +else() + set(VCPKG_BUILD_SHARED_LIBS OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DGDCM_BUILD_DOCBOOK_MANPAGES=OFF + -DGDCM_BUILD_SHARED_LIBS=${VCPKG_BUILD_SHARED_LIBS} + -DGDCM_INSTALL_INCLUDE_DIR=include + -DGDCM_USE_SYSTEM_EXPAT=ON + -DGDCM_USE_SYSTEM_ZLIB=ON + -DGDCM_USE_SYSTEM_OPENJPEG=ON + -DGDCM_BUILD_TESTING=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/gdcm) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/gdcm/GDCMTargets.cmake + "set(CMAKE_IMPORT_FILE_VERSION 1)" + "set(CMAKE_IMPORT_FILE_VERSION 1) + find_package(OpenJPEG QUIET)" +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(INSTALL ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/gdcm/use-openjpeg-config.patch b/vcpkg/ports/gdcm/use-openjpeg-config.patch new file mode 100644 index 0000000..ff64bb1 --- /dev/null +++ b/vcpkg/ports/gdcm/use-openjpeg-config.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f82bfd2..a062170 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -375,7 +375,10 @@ else() + endif() + + if(GDCM_USE_SYSTEM_OPENJPEG) +- find_package(OpenJPEG 2.0.0 REQUIRED) ++ find_package(OpenJPEG REQUIRED) ++ if(OPENJPEG_MAJOR_VERSION VERSION_LESS 2) ++ message( FATAL_ERROR "You need at least OpenJPEG 2") ++ endif() + set(GDCM_OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARIES}) + else() + set(GDCM_OPENJPEG_LIBRARIES gdcmopenjp2) diff --git a/vcpkg/ports/gdcm2/CONTROL b/vcpkg/ports/gdcm2/CONTROL new file mode 100644 index 0000000..e7f43b1 --- /dev/null +++ b/vcpkg/ports/gdcm2/CONTROL @@ -0,0 +1,5 @@ +Source: gdcm2 +Version: deprecated +Homepage: https://github.com/malaterre/GDCM +Description: This port was renamed to gdcm. The gdcm2 name is deprecated. +Build-Depends: gdcm \ No newline at end of file diff --git a/vcpkg/ports/gdcm2/portfile.cmake b/vcpkg/ports/gdcm2/portfile.cmake new file mode 100644 index 0000000..0015715 --- /dev/null +++ b/vcpkg/ports/gdcm2/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) \ No newline at end of file diff --git a/vcpkg/ports/gdk-pixbuf/CMakeLists.txt b/vcpkg/ports/gdk-pixbuf/CMakeLists.txt new file mode 100644 index 0000000..cdc5c3f --- /dev/null +++ b/vcpkg/ports/gdk-pixbuf/CMakeLists.txt @@ -0,0 +1,144 @@ +cmake_minimum_required(VERSION 3.0) +project(gdk-pixbuf C) + +set(GDK_PIXBUF_LIB_SUFFIX 2.0) +set(GDK_PIXBUF_DLL_SUFFIX 2) +set(GDK_PIXBUF_BINARY_VERSION 2.10.0) +set(GLIB_LIB_VERSION 2.0) + +find_package(ZLIB REQUIRED) +find_package(PNG REQUIRED) + +find_package(unofficial-glib CONFIG REQUIRED) +find_path(GLIB_INCLUDE_DIR glib.h) + +find_package(unofficial-gettext CONFIG REQUIRED) +find_path(LIBINTL_INCLUDE_DIR libintl.h) + +if(WIN32) + configure_file(${CMAKE_SOURCE_DIR}/config.h.win32 ${CMAKE_SOURCE_DIR}/config.h COPYONLY) +else() + configure_file(${CMAKE_SOURCE_DIR}/config.h.linux ${CMAKE_SOURCE_DIR}/config.h COPYONLY) +endif() +include_directories(. ./gdk-pixbuf) + +set(SOURCES + gdk-pixbuf/gdk-pixbuf.c + gdk-pixbuf/gdk-pixbuf-animation.c + gdk-pixbuf/gdk-pixbuf-data.c + gdk-pixbuf/gdk-pixbuf-io.c + gdk-pixbuf/gdk-pixbuf-loader.c + gdk-pixbuf/gdk-pixbuf-scale.c + gdk-pixbuf/gdk-pixbuf-simple-anim.c + gdk-pixbuf/gdk-pixbuf-scaled-anim.c + gdk-pixbuf/gdk-pixbuf-util.c + gdk-pixbuf/gdk-pixdata.c + gdk-pixbuf/gdk-pixbuf-enum-types.c + gdk-pixbuf/gdk-pixbuf-marshal.c + gdk-pixbuf/io-ani.c + gdk-pixbuf/io-ani-animation.c + gdk-pixbuf/io-icns.c + gdk-pixbuf/io-pnm.c + gdk-pixbuf/io-png.c + gdk-pixbuf/io-qtif.c + gdk-pixbuf/io-tga.c + gdk-pixbuf/gdk-pixbuf-buffer-queue.c + gdk-pixbuf/io-xpm.c + gdk-pixbuf/io-xbm.c + gdk-pixbuf/pixops/pixops.c +) +if(WIN32) + list(APPEND SOURCES + gdk-pixbuf/io-gdip-animation.c + gdk-pixbuf/io-gdip-bmp.c + gdk-pixbuf/io-gdip-emf.c + gdk-pixbuf/io-gdip-gif.c + gdk-pixbuf/io-gdip-ico.c + gdk-pixbuf/io-gdip-jpeg.c + gdk-pixbuf/io-gdip-tiff.c + gdk-pixbuf/io-gdip-utils.c + gdk-pixbuf/io-gdip-wmf.c +) +endif() +add_library(gdk-pixbuf ${SOURCES}) + +target_include_directories(gdk-pixbuf PRIVATE + ${GLIB_INCLUDE_DIR} + ${PNG_INCLUDE_DIRS} + ${ZLIB_INCLUDE_DIRS} + ${LIBINTL_INCLUDE_DIR}) + +set(LIBS + unofficial::glib::gio unofficial::glib::glib unofficial::glib::gmodule unofficial::glib::gobject unofficial::gettext::libintl + ${ZLIB_LIBRARIES} + ${PNG_LIBRARIES} +) +if(WIN32) + list(APPEND LIBS Gdiplus ole32) +else() + list(APPEND LIBS m) +endif() + +target_link_libraries(gdk-pixbuf ${LIBS}) + +set(DEFS + HAVE_CONFIG_H + GDK_PIXBUF_COMPILATION + GDK_PIXBUF_ENABLE_BACKEND + DLL_EXPORT + GDK_PIXBUF_RELOCATABLE + GDK_PIXBUF_PREFIX="/dummy" + GDK_PIXBUF_BINARY_VERSION="${GDK_PIXBUF_BINARY_VERSION}" + INCLUDE_ani + INCLUDE_tga + INCLUDE_xbm + INCLUDE_png + INCLUDE_qtif + INCLUDE_pnm + INCLUDE_icns + INCLUDE_xpm + G_DISABLE_SINGLE_INCLUDES + GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) +if(WIN32) + list(APPEND DEFS INCLUDE_gdiplus) +endif() +target_compile_definitions(gdk-pixbuf PRIVATE ${DEFS}) + +set_target_properties(gdk-pixbuf PROPERTIES + OUTPUT_NAME gdk_pixbuf-${GDK_PIXBUF_DLL_SUFFIX} + ARCHIVE_OUTPUT_NAME gdk_pixbuf-${GDK_PIXBUF_LIB_SUFFIX}) + +install(TARGETS gdk-pixbuf + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +macro(gdk_add_tool TOOL_NAME) + add_executable(${TOOL_NAME} ${ARGN}) + target_include_directories(${TOOL_NAME} PRIVATE ${GLIB_INCLUDE_DIR}) + target_link_libraries(${TOOL_NAME} gdk-pixbuf ${GLIB_LIBRARIES}) + install(TARGETS ${TOOL_NAME} RUNTIME DESTINATION tools/gdk-pixbuf) +endmacro() + +if(NOT GDK_SKIP_TOOLS) + gdk_add_tool(gdk-pixbuf-csource gdk-pixbuf/gdk-pixbuf-csource.c) + gdk_add_tool(gdk-pixbuf-pixdata gdk-pixbuf/gdk-pixbuf-pixdata.c) +endif() + +if(NOT GDK_SKIP_HEADERS) + INSTALL(FILES + gdk-pixbuf/gdk-pixbuf.h + gdk-pixbuf/gdk-pixbuf-autocleanups.h + gdk-pixbuf/gdk-pixbuf-core.h + gdk-pixbuf/gdk-pixbuf-transform.h + gdk-pixbuf/gdk-pixbuf-io.h + gdk-pixbuf/gdk-pixbuf-animation.h + gdk-pixbuf/gdk-pixbuf-simple-anim.h + gdk-pixbuf/gdk-pixbuf-loader.h + gdk-pixbuf/gdk-pixbuf-enum-types.h + gdk-pixbuf/gdk-pixbuf-marshal.h + gdk-pixbuf/gdk-pixbuf-features.h + gdk-pixbuf/gdk-pixdata.h + gdk-pixbuf/gdk-pixbuf-macros.h + DESTINATION include/gdk-pixbuf) +endif() diff --git a/vcpkg/ports/gdk-pixbuf/CONTROL b/vcpkg/ports/gdk-pixbuf/CONTROL new file mode 100644 index 0000000..229973b --- /dev/null +++ b/vcpkg/ports/gdk-pixbuf/CONTROL @@ -0,0 +1,5 @@ +Source: gdk-pixbuf +Version: 2.36.9-5 +Homepage: https://developer.gnome.org/gdk-pixbuf/ +Description: Image loading library. +Build-Depends: gettext, zlib, libpng, glib diff --git a/vcpkg/ports/gdk-pixbuf/config.h.linux b/vcpkg/ports/gdk-pixbuf/config.h.linux new file mode 100644 index 0000000..f673873 --- /dev/null +++ b/vcpkg/ports/gdk-pixbuf/config.h.linux @@ -0,0 +1,158 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#define ENABLE_NLS 1 + +/* Define to 1 to replace the build-time prefix in modules */ +/* #undef GDK_PIXBUF_RELOCATABLE */ + +/* Define if gio can sniff image data */ +#define GDK_PIXBUF_USE_GIO_MIME 1 + +/* The prefix for our gettext translation domains. */ +#define GETTEXT_PACKAGE "gdk-pixbuf" + +/* Define to 1 if you have the `bind_textdomain_codeset' function. */ +#define HAVE_BIND_TEXTDOMAIN_CODESET 1 + +/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +#define HAVE_DCGETTEXT 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define if the GNU gettext() function is already present or preinstalled. */ +#define HAVE_GETTEXT 1 + +/* Define if you have the iconv() function and it works. */ +/* #undef HAVE_ICONV */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if libm has lrint */ +#define HAVE_LRINT 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 is libjpeg supports progressive JPEG */ +#define HAVE_PROGRESSIVE_JPEG 1 + +/* Define to 1 if libm has round */ +#define HAVE_ROUND 1 + +/* Define to 1 if you have the `setrlimit' function. */ +#define HAVE_SETRLIMIT 1 + +/* Define to 1 if sigsetjmp is available */ +#define HAVE_SIGSETJMP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if sys/sysinfo.h is available */ +#define HAVE_SYS_SYSINFO_H 1 + +/* Define to 1 if sys/systeminfo.h is available */ +/* #undef HAVE_SYS_SYSTEMINFO_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +/* #undef NO_MINUS_C_MINUS_O */ + +/* Define to 1 if it's a darwin platform */ +/* #undef OS_DARWIN */ + +/* Define to 1 if it's a Linux platform */ +#define OS_LINUX 1 + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=gdk-pixbuf" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "gdk-pixbuf" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "gdk-pixbuf 2.36.9" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "gdk-pixbuf" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.36.9" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if gmodule works and should be used */ +#define USE_GMODULE 1 + +/* Whether to load modules via .la files rather than directly */ +/* #undef USE_LA_MODULES */ + +/* Define to 1 if medialib is available and should be used */ +/* #undef USE_MEDIALIB */ + +/* Define to 1 if medialib 2.5 is available */ +/* #undef USE_MEDIALIB25 */ + +/* Define to 1 if MMX is available and should be used */ +/* #undef USE_MMX */ + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* defines how to decorate public symbols while building */ +#define _GDK_PIXBUF_EXTERN __attribute__((visibility("default"))) extern + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ diff --git a/vcpkg/ports/gdk-pixbuf/portfile.cmake b/vcpkg/ports/gdk-pixbuf/portfile.cmake new file mode 100644 index 0000000..7a72623 --- /dev/null +++ b/vcpkg/ports/gdk-pixbuf/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +set(GDK_PIXBUF_VERSION 2.36) +set(GDK_PIXBUF_PATCH 9) + +vcpkg_download_distfile(ARCHIVE + URLS "http://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/${GDK_PIXBUF_VERSION}/gdk-pixbuf-${GDK_PIXBUF_VERSION}.${GDK_PIXBUF_PATCH}.tar.xz" + FILENAME "gdk-pixbuf-${GDK_PIXBUF_VERSION}.${GDK_PIXBUF_PATCH}.tar.xz" + SHA512 ab8f2cda4490012936b094a1321e64b85e1fa1f8d070fae135a514f87f695201b845f4192e4a02954e2767d44314c0a95d727118853528182952d15890130261 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +configure_file(${CMAKE_CURRENT_LIST_DIR}/config.h.linux ${SOURCE_PATH}/config.h.linux) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DGDK_SKIP_HEADERS=ON + -DGDK_SKIP_TOOLS=ON) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/gdk-pixbuf) + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gdk-pixbuf) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/gdk-pixbuf/COPYING ${CURRENT_PACKAGES_DIR}/share/gdk-pixbuf/copyright) diff --git a/vcpkg/ports/genann/CMakeLists.txt b/vcpkg/ports/genann/CMakeLists.txt new file mode 100644 index 0000000..80b7ab9 --- /dev/null +++ b/vcpkg/ports/genann/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.11) +project(genann) + +set(SRC_FILES +genann.c +) + +add_library(genann ${SRC_FILES}) + +target_include_directories(genann PUBLIC + $ + $ +) + +# Install targets +install(TARGETS genann + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +# Install headers +if (INSTALL_HEADERS) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/genann.h DESTINATION include/genann) +endif() \ No newline at end of file diff --git a/vcpkg/ports/genann/CONTROL b/vcpkg/ports/genann/CONTROL new file mode 100644 index 0000000..6397319 --- /dev/null +++ b/vcpkg/ports/genann/CONTROL @@ -0,0 +1,4 @@ +Source: genann +Version: 2019-07-10 +Homepage: https://github.com/codeplea/genann +Description: Genann is a minimal, well-tested library for training and using feedforward artificial neural networks (ANN) in C. diff --git a/vcpkg/ports/genann/portfile.cmake b/vcpkg/ports/genann/portfile.cmake new file mode 100644 index 0000000..4f1c21d --- /dev/null +++ b/vcpkg/ports/genann/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO codeplea/genann + REF 122243f9449b3e33a4e11450b70c10576d4559d7 + SHA512 d70cb8bc678d80ed3e790866f6060850cf9309eefe90d3ca4d77e28538639a927333d49c4d1af3e81123b8e88224f2f51b74ec41ca22639a276359568652ed15 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_RELEASE -DINSTALL_HEADERS=ON + OPTIONS_DEBUG -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/genann) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/genann/LICENSE ${CURRENT_PACKAGES_DIR}/share/genann/copyright) + diff --git a/vcpkg/ports/geogram/CONTROL b/vcpkg/ports/geogram/CONTROL new file mode 100644 index 0000000..4d589b4 --- /dev/null +++ b/vcpkg/ports/geogram/CONTROL @@ -0,0 +1,11 @@ +Source: geogram +Version: 1.7.5 +Port-Version: 2 +Homepage: https://gforge.inria.fr/projects/geogram/ +Description: Geogram is a programming library of geometric algorithms. +Build-Depends: openblas, lapack +Supports: !uwp + +Feature: graphics +Description: Build viewers and geogram_gfx library. +Build-Depends: glfw3 diff --git a/vcpkg/ports/geogram/Config.cmake.in b/vcpkg/ports/geogram/Config.cmake.in new file mode 100644 index 0000000..7280872 --- /dev/null +++ b/vcpkg/ports/geogram/Config.cmake.in @@ -0,0 +1,4 @@ +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake") +check_required_components("@PROJECT_NAME@") \ No newline at end of file diff --git a/vcpkg/ports/geogram/fix-cmake-config-and-install.patch b/vcpkg/ports/geogram/fix-cmake-config-and-install.patch new file mode 100644 index 0000000..8eb16c3 --- /dev/null +++ b/vcpkg/ports/geogram/fix-cmake-config-and-install.patch @@ -0,0 +1,210 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2e54997..169e33c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -51,7 +51,7 @@ set(VORPALINE_VERSION_MINOR 7) + set(VORPALINE_VERSION_PATCH 5) + set(VORPALINE_VERSION ${VORPALINE_VERSION_MAJOR}.${VORPALINE_VERSION_MINOR}.${VORPALINE_VERSION_PATCH}) + +-set(VORPALINE_INCLUDE_SUBPATH geogram${VORPALINE_VERSION_MAJOR}) ++set(VORPALINE_INCLUDE_SUBPATH ./) + + # Determine the current Build-OS (Build-platform without the compiler info) + string(REGEX REPLACE "-[^-]+$" "" VORPALINE_OS ${VORPALINE_PLATFORM}) +@@ -113,6 +113,11 @@ if(GEOGRAM_WITH_VORPALINE) + add_subdirectory(src/lib/vorpalib) + endif() + ++# find this library in the outside scope ++if(GEOGRAM_WITH_GRAPHICS) ++ find_package(GLFW3 REQUIRED) ++endif(GEOGRAM_WITH_GRAPHICS) ++ + add_subdirectory(src/lib/third_party) + + if(GEOGRAM_WITH_GRAPHICS) +@@ -145,8 +150,44 @@ file(REMOVE ${CMAKE_BINARY_DIR}/doc/LICENSE.txt) + + + # FindGeogram.cmake ++# This installation is not suitable for vcpkg ++# install(FILES cmake/FindGeogram.cmake DESTINATION lib/cmake/modules COMPONENT devkit) ++ ++set(config_install_dir "share/geogram") ++set(include_install_dir "include") ++set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated") ++ ++# Configuration ++set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake") ++set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake") ++set(targets_export_name "${PROJECT_NAME}Targets") ++set(namespace "${PROJECT_NAME}::") ++ ++# Include module with fuction 'write_basic_package_version_file' ++include(CMakePackageConfigHelpers) ++ ++write_basic_package_version_file( ++ "${version_config}" COMPATIBILITY SameMajorVersion VERSION ${VORPALINE_VERSION} ++) ++ ++configure_package_config_file( ++ "cmake/Config.cmake.in" ++ "${project_config}" ++ INSTALL_DESTINATION "${config_install_dir}" ++) + +-install(FILES cmake/FindGeogram.cmake DESTINATION lib/cmake/modules COMPONENT devkit) ++# Config ++install( ++ FILES "${project_config}" "${version_config}" ++ DESTINATION "${config_install_dir}" ++) ++ ++# Config ++install( ++ EXPORT "${targets_export_name}" ++ NAMESPACE "${namespace}" ++ DESTINATION "${config_install_dir}" ++) + + # Configure CPack + +diff --git a/src/lib/geogram/CMakeLists.txt b/src/lib/geogram/CMakeLists.txt +index 49cb2ba..82c2f39 100755 +--- a/src/lib/geogram/CMakeLists.txt ++++ b/src/lib/geogram/CMakeLists.txt +@@ -62,7 +62,14 @@ if(WIN32) + endif() + + # Install the library +-install_devkit_targets(geogram) ++install( ++ TARGETS geogram ++ EXPORT "${PROJECT_NAME}Targets" ++ LIBRARY DESTINATION "lib" ++ ARCHIVE DESTINATION "lib" ++ RUNTIME DESTINATION "bin" ++ INCLUDES DESTINATION "include" ++) + + # Install include files for the standard devkit + install( +diff --git a/src/lib/geogram_gfx/CMakeLists.txt b/src/lib/geogram_gfx/CMakeLists.txt +index b155975..ad66440 100755 +--- a/src/lib/geogram_gfx/CMakeLists.txt ++++ b/src/lib/geogram_gfx/CMakeLists.txt +@@ -47,14 +47,21 @@ if(VORPALINE_BUILD_DYNAMIC) + endif() + + # Install the library +-install_devkit_targets(geogram_gfx) ++install( ++ TARGETS geogram_gfx ++ EXPORT "${PROJECT_NAME}Targets" ++ LIBRARY DESTINATION "lib" ++ ARCHIVE DESTINATION "lib" ++ RUNTIME DESTINATION "bin" ++ INCLUDES DESTINATION "include" ++) + + # Install include files for the standard devkit + install( + DIRECTORY . + DESTINATION include/${VORPALINE_INCLUDE_SUBPATH}/geogram_gfx + COMPONENT devkit +- FILES_MATCHING PATTERN *.h ++ FILES_MATCHING PATTERN *.h PATTERN *.xpm # xpm is the colrbar file + ) + + # Install include files for the full devkit +@@ -62,7 +69,7 @@ install( + DIRECTORY . + DESTINATION include/${VORPALINE_INCLUDE_SUBPATH}/geogram_gfx + COMPONENT devkit-full +- FILES_MATCHING PATTERN *.h ++ FILES_MATCHING PATTERN *.h PATTERN *.xpm # xpm is the colrbar file + ) + + install( +diff --git a/src/lib/third_party/numerics/CMakeLists.txt b/src/lib/third_party/numerics/CMakeLists.txt +index c9c3a6e..f16d7ec 100644 +--- a/src/lib/third_party/numerics/CMakeLists.txt ++++ b/src/lib/third_party/numerics/CMakeLists.txt +@@ -10,16 +10,19 @@ endif() + + include_directories(${GEOGRAM_SOURCE_DIR}/src/lib/third_party/numerics/INCLUDE) + ++set(LAPACK_lapack_WORKS TRUE) ++find_package(BLAS REQUIRED) ++find_package(LAPACK REQUIRED) + aux_source_directories(SOURCES "Source Files" .) + aux_source_directories(SOURCES "Source Files\\LIBF2C" LIBF2C) +-aux_source_directories(SOURCES "Source Files\\CBLAS" CBLAS) +-aux_source_directories(SOURCES "Source Files\\CLAPACK" CLAPACK) ++# aux_source_directories(SOURCES "Source Files\\CBLAS" CBLAS) ++# aux_source_directories(SOURCES "Source Files\\CLAPACK" CLAPACK) + aux_source_directories(SOURCES "Source Files\\SUPERLU" SUPERLU) + aux_source_directories(SOURCES "Source Files\\ARPACK" ARPACK) + aux_source_directories(SOURCES "Source Files\\ARPACK_UTIL" ARPACK_UTIL) + + add_library(geogram_num_3rdparty ${SOURCES}) +- ++target_link_libraries(geogram_num_3rdparty ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES}) + if(UNIX) + target_link_libraries(geogram_num_3rdparty m) + endif() +diff --git a/src/lib/third_party/numerics/LIBF2C/getarg_.c b/src/lib/third_party/numerics/LIBF2C/getarg_.c +index 2b69a1e..1cde8b6 100755 +--- a/src/lib/third_party/numerics/LIBF2C/getarg_.c ++++ b/src/lib/third_party/numerics/LIBF2C/getarg_.c +@@ -17,20 +17,20 @@ VOID getarg_(n, s, ls) ftnint *n; char *s; ftnlen ls; + void getarg_(ftnint *n, char *s, ftnlen ls) + #endif + { +- extern int xargc; +- extern char **xargv; +- Const char *t; +- int i; +- +- if(*n>=0 && *n=0 && *n") +target_include_directories(MSPCoordinateConversionService INTERFACE $) + +if(WIN32) + if (BUILD_SHARED_LIBS) + add_definitions( + -DMSP_CCS_EXPORTS + -D_USRDLL + ) + endif() + add_definitions(-D_CRT_SECURE_NO_WARNINGS) +else() + find_package(Threads REQUIRED) + target_link_libraries(MSPdtcc PRIVATE Threads::Threads ${CMAKE_DL_LIBS}) +endif() + + +install( + TARGETS MSPdtcc + EXPORT geotrans + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install( + TARGETS MSPCoordinateConversionService + EXPORT geotrans + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install(DIRECTORY "${CMAKE_SOURCE_DIR}/CCS/src/" + DESTINATION "include" + CONFIGURATIONS Release + FILES_MATCHING + PATTERN "*.h" +) + +install(EXPORT geotrans NAMESPACE geotrans:: DESTINATION share/geotrans CONFIGURATIONS Release) diff --git a/vcpkg/ports/geotrans/CONTROL b/vcpkg/ports/geotrans/CONTROL new file mode 100644 index 0000000..72885e4 --- /dev/null +++ b/vcpkg/ports/geotrans/CONTROL @@ -0,0 +1,4 @@ +Source: geotrans +Version: 3.7 +Homepage: https://earth-info.nga.mil/GandG/update/index.php?action=home +Description: GEOTRANS is an application that allows you to convert geographic coordinates among a wide variety of coordinate systems, map projections, grids, and datums. GEOTRANS runs in Microsoft Windows and LINUX environments. diff --git a/vcpkg/ports/geotrans/geotrans-config.in.cmake b/vcpkg/ports/geotrans/geotrans-config.in.cmake new file mode 100644 index 0000000..f25224c --- /dev/null +++ b/vcpkg/ports/geotrans/geotrans-config.in.cmake @@ -0,0 +1,7 @@ + +if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static" AND NOT WIN32) + include(CMakeFindDependencyMacro) + find_dependency(Threads) +endif() + +include(${CMAKE_CURRENT_LIST_DIR}/geotrans.cmake) diff --git a/vcpkg/ports/geotrans/portfile.cmake b/vcpkg/ports/geotrans/portfile.cmake new file mode 100644 index 0000000..39844c3 --- /dev/null +++ b/vcpkg/ports/geotrans/portfile.cmake @@ -0,0 +1,39 @@ +set(VCPKG_LIBRARY_LINKAGE "dynamic") + +# We specify the Linux URL, but the only difference between the Windows/Linux packages are the included libraries +# which we re-build anyway. There is no source only package provided or it would be preferred (and smaller). +vcpkg_download_distfile(ARCHIVE + URLS "http://earth-info.nga.mil/GandG/geotrans/geotrans3.7/linux_dev.tgz" + FILENAME "geotrans-3.7.tgz" + SHA512 20bdc870026e95154f1d7f9560cbfa2c0b2dc39042aa544f093b502a0609121cb47df5729248e0d79ccf8f9908bf01bbcea8e777ae4f45e25472b7ce2bcb9742 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/geotrans-config.in.cmake + ${CURRENT_PACKAGES_DIR}/share/${PORT}/geotrans-config.cmake + @ONLY +) + +configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT} @ONLY) + + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/GEOTRANS3/docs/MSP_Geotrans_Terms_Of_Use.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# Install the geo model data +file(COPY ${SOURCE_PATH}/data DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) \ No newline at end of file diff --git a/vcpkg/ports/geotrans/usage b/vcpkg/ports/geotrans/usage new file mode 100644 index 0000000..83430e4 --- /dev/null +++ b/vcpkg/ports/geotrans/usage @@ -0,0 +1,11 @@ +The package geotrans provides CMake targets: + + find_package(geotrans CONFIG REQUIRED) + target_link_libraries(main PRIVATE geotrans::MSPdtcc geotrans::MSPCoordinateConversionService) + + +The geotrans library depends on being able to read it's model data so you'll need to +set an environment variable to let geotrans know where the models are installed: + +export MSPCCS_DATA=@CURRENT_INSTALLED_DIR@/share/@PORT@/data + diff --git a/vcpkg/ports/getdns/CONTROL b/vcpkg/ports/getdns/CONTROL new file mode 100644 index 0000000..69dc8e3 --- /dev/null +++ b/vcpkg/ports/getdns/CONTROL @@ -0,0 +1,14 @@ +Source: getdns +Version: 1.6.0 +Build-Depends: libidn2, openssl +Description: GetDNS is a modern asynchronous DNS API +Homepage: https://getdnsapi.net/ +Supports: !uwp&windows + +Feature: libevent +Description: libevent event loop integration +Build-Depends: libevent + +Feature: libuv +Description: libuv event loop integration +Build-Depends: libuv diff --git a/vcpkg/ports/getdns/ignore_copying.patch b/vcpkg/ports/getdns/ignore_copying.patch new file mode 100644 index 0000000..87dc5c6 --- /dev/null +++ b/vcpkg/ports/getdns/ignore_copying.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 10d10b99..fda6fa3c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1087,6 +1087,6 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/getdns DESTINATION include) + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/man3 DESTINATION share/man) + + set(docdir share/doc/getdns) +-install(FILES AUTHORS ChangeLog COPYING LICENSE NEWS README.md DESTINATION ${docdir}) ++install(FILES AUTHORS ChangeLog LICENSE NEWS README.md DESTINATION ${docdir}) + install(FILES spec/index.html DESTINATION ${docdir}/spec) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/getdns.pc DESTINATION lib/pkgconfig) diff --git a/vcpkg/ports/getdns/install_dlls.patch b/vcpkg/ports/getdns/install_dlls.patch new file mode 100644 index 0000000..8c3024b --- /dev/null +++ b/vcpkg/ports/getdns/install_dlls.patch @@ -0,0 +1,24 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 10d10b99..35761647 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1065,15 +1065,15 @@ if (ENABLE_STATIC) + endif () + endif () + if (ENABLE_SHARED) +- install(TARGETS getdns_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ++ install(TARGETS getdns_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin) + if (USE_LIBEV) +- install(TARGETS getdns_ex_ev_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ++ install(TARGETS getdns_ex_ev_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin) + endif () + if (USE_LIBEVENT2) +- install(TARGETS getdns_ex_event_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ++ install(TARGETS getdns_ex_event_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin) + endif () + if (USE_LIBUV) +- install(TARGETS getdns_ex_uv_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ++ install(TARGETS getdns_ex_uv_shared LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin) + endif () + endif () + if (BUILD_GETDNS_QUERY) diff --git a/vcpkg/ports/getdns/openssl_depend_libs.patch b/vcpkg/ports/getdns/openssl_depend_libs.patch new file mode 100644 index 0000000..6969b43 --- /dev/null +++ b/vcpkg/ports/getdns/openssl_depend_libs.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7d22d3ca..7784ab58 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -335,7 +335,7 @@ check_include_file(openssl/rand.h HAVE_OPENSSL_RAND_H) + check_include_file(openssl/conf.h HAVE_OPENSSL_CONF_H) + check_include_file(openssl/engine.h HAVE_OPENSSL_ENGINE_H) + +-set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES}) ++set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES} ${getdns_system_libs}) + check_function_exists(DSA_SIG_set0 HAVE_DSA_SIG_SET0) + check_function_exists(DSA_set0_pqg HAVE_DSA_SET0_PQG) + check_function_exists(DSA_set0_key HAVE_DSA_SET0_KEY) diff --git a/vcpkg/ports/getdns/portfile.cmake b/vcpkg/ports/getdns/portfile.cmake new file mode 100644 index 0000000..6c9a85e --- /dev/null +++ b/vcpkg/ports/getdns/portfile.cmake @@ -0,0 +1,45 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +set(GETDNS_VERSION 1.6.0) +set(GETDNS_HASH 4d3a67cd76e7ce53a31c9b92607d7768381a1f916e7950fe4e69368fa585d38dbfc04975630fbe8d8bd14f4bebf83a3516e063b5b54e0922548edc0952ee7b4e) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" GETDNS_ENABLE_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" GETDNS_ENABLE_SHARED) + +vcpkg_download_distfile(ARCHIVE + URLS "https://getdnsapi.net/dist/getdns-${GETDNS_VERSION}.tar.gz" + FILENAME "getdns-${GETDNS_VERSION}.tar.gz" + SHA512 ${GETDNS_HASH} +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${GETDNS_VERSION} + PATCHES + "openssl_depend_libs.patch" + "ignore_copying.patch" + "install_dlls.patch" +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + libevent BUILD_LIBEVENT2 + libuv BUILD_LIBUV +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_GETDNS_QUERY=OFF + -DBUILD_GETDNS_SERVER_MON=OFF + -DENABLE_STATIC=${GETDNS_ENABLE_STATIC} + -DENABLE_SHARED=${GETDNS_ENABLE_SHARED} + ${FEATURE_OPTIONS} +) +vcpkg_install_cmake() +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +vcpkg_copy_pdbs() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") diff --git a/vcpkg/ports/getopt-win32/CONTROL b/vcpkg/ports/getopt-win32/CONTROL new file mode 100644 index 0000000..5de151a --- /dev/null +++ b/vcpkg/ports/getopt-win32/CONTROL @@ -0,0 +1,5 @@ +Source: getopt-win32 +Version: 0.1 +Description: An implementation of getopt. +Homepage: https://github.com/libimobiledevice-win32 +Supports: windows \ No newline at end of file diff --git a/vcpkg/ports/getopt-win32/portfile.cmake b/vcpkg/ports/getopt-win32/portfile.cmake new file mode 100644 index 0000000..780cb1c --- /dev/null +++ b/vcpkg/ports/getopt-win32/portfile.cmake @@ -0,0 +1,24 @@ +if(VCPKG_CMAKE_SYSTEM_NAME) + message(FATAL_ERROR "getopt-win32 only supports building on Windows Desktop") +endif() + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libimobiledevice-win32/getopt + REF 0.1 + SHA512 40e2a901241a5d751cec741e5de423c8f19b105572c7cae18adb6e69be0b408efc6c9a2ecaeb62f117745eac0d093f30d6b91d88c1a27e1f7be91f0e84fdf199 + HEAD_REF master +) + +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH getopt.vcxproj + LICENSE_SUBPATH LICENSE +) + +# Copy header +file(COPY ${SOURCE_PATH}/getopt.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/) + +set(VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS enabled) diff --git a/vcpkg/ports/getopt/CONTROL b/vcpkg/ports/getopt/CONTROL new file mode 100644 index 0000000..d2b9c29 --- /dev/null +++ b/vcpkg/ports/getopt/CONTROL @@ -0,0 +1,5 @@ +Source: getopt +Version: 0 +Description: The getopt and getopt_long functions automate some of the chore involved in parsing typical unix command line options. +Build-Depends: getopt-win32 (windows) +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/getopt/portfile.cmake b/vcpkg/ports/getopt/portfile.cmake new file mode 100644 index 0000000..21d59eb --- /dev/null +++ b/vcpkg/ports/getopt/portfile.cmake @@ -0,0 +1,5 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "No implementation of getopt is currently available for UWP targets") +endif() + +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/vcpkg/ports/gettext/0001-Fix-macro-definitions.patch b/vcpkg/ports/gettext/0001-Fix-macro-definitions.patch new file mode 100644 index 0000000..eeed3a0 --- /dev/null +++ b/vcpkg/ports/gettext/0001-Fix-macro-definitions.patch @@ -0,0 +1,17 @@ +diff --git a/gettext-runtime/intl/xsize.h b/gettext-runtime/intl/xsize.h +index c256665..7400ea1 100644 +--- a/gettext-runtime/intl/xsize.h ++++ b/gettext-runtime/intl/xsize.h +@@ -27,6 +27,12 @@ + # include + #endif + ++#if defined _WIN32 ++# define _GL_INLINE_HEADER_BEGIN ++# define _GL_INLINE_HEADER_END ++# define _GL_INLINE static inline ++#endif ++ + #ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." + #endif diff --git a/vcpkg/ports/gettext/0002-Fix-uwp-build.patch b/vcpkg/ports/gettext/0002-Fix-uwp-build.patch new file mode 100644 index 0000000..1541315 --- /dev/null +++ b/vcpkg/ports/gettext/0002-Fix-uwp-build.patch @@ -0,0 +1,77 @@ +diff --git "a/gettext-runtime/intl/langprefs.c" "b/gettext-runtime/intl/langprefs.c" +index aeb1c4e9..2ac531be 100644 +--- "a/gettext-runtime/intl/langprefs.c" ++++ "b/gettext-runtime/intl/langprefs.c" +@@ -33,7 +33,13 @@ extern void _nl_locale_name_canonicalize (char *name); + #endif + + #if defined _WIN32 || defined __WIN32__ +-# define WIN32_NATIVE ++# if !defined(WINAPI_FAMILY) ++# define WIN32_NATIVE ++# else ++# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) ++# define WIN32_NATIVE ++# endif ++# endif + #endif + + #ifdef WIN32_NATIVE +diff --git "a/gettext-runtime/intl/localcharset.c" "b/gettext-runtime/intl/localcharset.c" +index 670b8e6c..035a96bd 100644 +--- "a/gettext-runtime/intl/localcharset.c" ++++ "b/gettext-runtime/intl/localcharset.c" +@@ -36,6 +36,16 @@ + # define WINDOWS_NATIVE + #endif + ++#if defined _WIN32 || defined __WIN32__ ++# if !defined(WINAPI_FAMILY) ++# define HAVE_ACP ++# else ++# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) ++# define HAVE_ACP ++# endif ++# endif ++#endif ++ + #if defined __EMX__ + /* Assume EMX program runs on OS/2, even if compiled under DOS. */ + # ifndef OS2 +@@ -361,7 +371,7 @@ STATIC + const char * + locale_charset (void) + { +- const char *codeset; ++ const char *codeset = NULL; + const char *aliases; + + #if !(defined WINDOWS_NATIVE || defined OS2) +@@ -457,7 +467,7 @@ locale_charset (void) + + # endif + +-#elif defined WINDOWS_NATIVE ++#elif defined WINDOWS_NATIVE && defined HAVE_ACP + + static char buf[2 + 10 + 1]; + +diff --git "a/gettext-runtime/intl/localename.c" "b/gettext-runtime/intl/localename.c" +index 108dd6f1..ace3aa88 100644 +--- "a/gettext-runtime/intl/localename.c" ++++ "b/gettext-runtime/intl/localename.c" +@@ -54,7 +54,13 @@ + #endif + + #if defined _WIN32 || defined __WIN32__ +-# define WINDOWS_NATIVE ++# if !defined(WINAPI_FAMILY) ++# define WINDOWS_NATIVE ++# else ++# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) ++# define WINDOWS_NATIVE ++# endif ++# endif + #endif + + #if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */ diff --git a/vcpkg/ports/gettext/0003-Fix-win-unicode-paths.patch b/vcpkg/ports/gettext/0003-Fix-win-unicode-paths.patch new file mode 100644 index 0000000..540ac3d --- /dev/null +++ b/vcpkg/ports/gettext/0003-Fix-win-unicode-paths.patch @@ -0,0 +1,60 @@ +diff --git "a/gettext-runtime/intl/loadmsgcat.c" "b/gettext-runtime/intl/loadmsgcat.c" +index 63351523..c078de3f 100644 +--- a/gettext-runtime/intl/loadmsgcat.c ++++ b/gettext-runtime/intl/loadmsgcat.c +@@ -477,6 +477,55 @@ char *alloca (); + # define munmap(addr, len) __munmap (addr, len) + #endif + ++#ifdef _WIN32 ++/* Provide wrapper of "open" for Windows that supports UTF-8 filenames. */ ++# ifndef WIN32_LEAN_AND_MEAN ++# define WIN32_LEAN_AND_MEAN ++# endif ++# ifndef WIN32_EXTRA_LEAN ++# define WIN32_EXTRA_LEAN ++# endif ++# undef NOMINMAX ++# define NOMINMAX ++# include // For: MultiByteToWideChar ++# include ++# include ++ ++int _open_utf8_windows_wrapper( ++ const char *filename, ++ int flags ++) ++{ ++ int wstr_len = -1; ++ wchar_t* pUtf16FileName = NULL; ++ int fh = -1; ++ ++ // on Windows, convert the filename from UTF-8 to UTF-16 ++ wstr_len = MultiByteToWideChar(CP_UTF8, 0, filename, -1, NULL, 0); ++ if (wstr_len <= 0) ++ { ++ // MultiByteToWideChar failed ++ errno = ENOENT; ++ return -1; ++ } ++ pUtf16FileName = malloc(wstr_len * sizeof(wchar_t)); ++ if (MultiByteToWideChar(CP_UTF8, 0, filename, -1, pUtf16FileName, wstr_len) == 0) ++ { ++ // MultiByteToWideChar failed ++ free(pUtf16FileName); ++ errno = ENOENT; ++ return -1; ++ } ++ ++ // and call _wopen ++ fh = _wopen(pUtf16FileName, flags); ++ ++ free(pUtf16FileName); ++ return fh; ++} ++# define open(name, flags) _open_utf8_windows_wrapper(name, flags) ++#endif // #ifdef _WIN32 ++ + /* For those losing systems which don't have `alloca' we have to add + some additional code emulating it. */ + #ifdef HAVE_ALLOCA diff --git a/vcpkg/ports/gettext/CMakeLists.txt b/vcpkg/ports/gettext/CMakeLists.txt new file mode 100644 index 0000000..57d5a14 --- /dev/null +++ b/vcpkg/ports/gettext/CMakeLists.txt @@ -0,0 +1,150 @@ +cmake_minimum_required(VERSION 3.5) +project(libintl C) + +find_package(unofficial-iconv REQUIRED) + +set(CMAKE_STATIC_LIBRARY_PREFIX) +set(CMAKE_SHARED_LIBRARY_PREFIX) + +if(WIN32) + set(HAVE_POSIX_PRINTF 0) + set(HAVE_SNPRINTF 0) + set(HAVE_ASPRINTF 0) + set(HAVE_WPRINTF 0) + set(HAVE_NEWLOCALE 0) + + configure_file(intl/libgnuintl.win32.h config/libgnuintl.h COPYONLY) + configure_file(config.win32.h config/config.h COPYONLY) +else() + set(HAVE_POSIX_PRINTF 1) + set(HAVE_SNPRINTF 1) + set(HAVE_ASPRINTF 1) + set(HAVE_WPRINTF 1) + set(HAVE_NEWLOCALE 1) + add_definitions(-DHAVE_NEWLOCALE=1) + add_definitions(-DHAVE_NEWLOCALE=1) + + set(CMAKE_THREAD_PREFER_PTHREAD TRUE) + set(THREADS_PREFER_PTHREAD_FLAG TRUE) + find_package(Threads REQUIRED) + if(NOT CMAKE_USE_PTHREADS_INIT) + message(FATAL_ERROR "Error: Only pthreads is currently supported.") + endif() + + include(CheckFunctionExists) + include(CheckIncludeFiles) + + if(APPLE) + set(HAVE_CFLOCALECOPYCURRENT 1) + set(HAVE_CFPREFERENCESCOPYAPPVALUE 1) + endif() + check_function_exists(dcgettext HAVE_DCGETTEXT) + check_include_files(features.h HAVE_FEATURES_H) + check_function_exists(gettext HAVE_GETTEXT) + check_include_files(mach-o/dyld.h HAVE_MACH_O_DYLD_H) + check_function_exists(mempcpy HAVE_MEMPCPY) + check_include_files(xlocale.h HAVE_XLOCALE_H) + + configure_file(intl/libgnuintl.in.h config/libgnuintl.h @ONLY) + configure_file(config.unix.h.in config/config.h @ONLY) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/config/libgnuintl.h" DESTINATION include RENAME libintl.h) +endif() + +file(READ "${CMAKE_CURRENT_BINARY_DIR}/config/config.h" _contents) +if(NOT WIN32) + string(REPLACE "/* #undef HAVE_STPCPY */" "#define HAVE_STPCPY 1" _contents "${_contents}") +endif() +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/config/config.h" "${_contents}") + +FILE(GLOB SOURCES + "intl/bindtextdom.c" + "intl/dcgettext.c" + "intl/dcigettext.c" + "intl/dcngettext.c" + "intl/dgettext.c" + "intl/dngettext.c" + "intl/explodename.c" + "intl/finddomain.c" + "intl/gettext.c" + "intl/hash-string.c" + "intl/intl-compat.c" + "intl/l10nflist.c" + "intl/langprefs.c" + "intl/loadmsgcat.c" + "intl/localealias.c" + "intl/localename.c" + "intl/lock.c" + "intl/log.c" + "intl/ngettext.c" + "intl/osdep.c" + "intl/plural-exp.c" + "intl/plural.c" + "intl/printf.c" + "intl/relocatable.c" + "intl/textdomain.c" + "intl/version.c" +) +if(NOT WIN32) + list(APPEND SOURCES "intl/setlocale.c") +endif() + +set(LOCALDIR "c:/gettext") + +add_definitions(-DLOCALEDIR=\"${LOCALDIR}\") +add_definitions(-DLOCALE_ALIAS_PATH=\"${LOCALDIR}\") +add_definitions(-DLIBDIR=\"${LOCALDIR}\") +add_definitions(-DINSTALLDIR=\"${LOCALDIR}\") +if(BUILD_SHARED_LIBS) + add_definitions(-DBUILDING_DLL) +endif() +add_definitions("-DBUILDING_LIBINTL -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY") + +add_definitions("-DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -DHAVE_ICONV -DHAVE_ICONV_H -DICONV_CONST=const -D_CRT_SECURE_NO_WARNINGS") + +add_library(libintl ${SOURCES}) +target_link_libraries(libintl PRIVATE unofficial::iconv::libcharset unofficial::iconv::libiconv) + +target_include_directories(libintl PUBLIC + $ + $ +) + +if(APPLE) + find_library(COREFOUNDATION_LIBRARY CoreFoundation REQUIRED) + target_link_libraries(libintl PRIVATE ${COREFOUNDATION_LIBRARY}) +endif() +if(NOT WIN32) + target_link_libraries(libintl PRIVATE Threads::Threads) +endif() +if (WIN32) + target_link_libraries(libintl PRIVATE kernel32.lib Advapi32.lib) +endif() + +install(TARGETS libintl + EXPORT unofficial-gettext-targets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install( + EXPORT unofficial-gettext-targets + FILE unofficial-gettext-targets.cmake + NAMESPACE unofficial::gettext:: + DESTINATION share/unofficial-gettext +) + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/unofficial-gettext-config.cmake" " +include(CMakeFindDependencyMacro) +find_dependency(unofficial-iconv) +find_dependency(Threads) +include(\${CMAKE_CURRENT_LIST_DIR}/unofficial-gettext-targets.cmake) +") + +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-gettext-config.cmake + DESTINATION share/unofficial-gettext +) diff --git a/vcpkg/ports/gettext/CONTROL b/vcpkg/ports/gettext/CONTROL new file mode 100644 index 0000000..0918e19 --- /dev/null +++ b/vcpkg/ports/gettext/CONTROL @@ -0,0 +1,5 @@ +Source: gettext +Version: 0.19-15 +Homepage: https://www.gnu.org/software/gettext/ +Description: The GNU gettext utilities are a set of tools that provides a framework to help other GNU packages produce multi-lingual messages. Provides libintl. +Build-Depends: libiconv diff --git a/vcpkg/ports/gettext/config.unix.h.in b/vcpkg/ports/gettext/config.unix.h.in new file mode 100644 index 0000000..9f00a6f --- /dev/null +++ b/vcpkg/ports/gettext/config.unix.h.in @@ -0,0 +1,1009 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to the number of bits in type 'ptrdiff_t'. */ +#define BITSIZEOF_PTRDIFF_T sizeof(ptrdiff_t) + +/* Define to the number of bits in type 'sig_atomic_t'. */ +#define BITSIZEOF_SIG_ATOMIC_T 32 + +/* Define to the number of bits in type 'size_t'. */ +#define BITSIZEOF_SIZE_T sizeof(size_t) + +/* Define to the number of bits in type 'wchar_t'. */ +#define BITSIZEOF_WCHAR_T 32 + +/* Define to the number of bits in type 'wint_t'. */ +#define BITSIZEOF_WINT_T 32 + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +/* #undef CRAY_STACKSEG_END */ + +/* Define if mono is the preferred C# implementation. */ +/* #undef CSHARP_CHOICE_MONO */ + +/* Define if pnet is the preferred C# implementation. */ +/* #undef CSHARP_CHOICE_PNET */ + +/* Define to 1 if using `alloca.c'. */ +/* #undef C_ALLOCA */ + +/* Define to 1 if // is a file system root distinct from /. */ +/* #undef DOUBLE_SLASH_IS_DISTINCT_ROOT */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#define ENABLE_NLS 1 + +/* Define to 1 if the package shall run at any location in the file system. */ +#define ENABLE_RELOCATABLE 1 + +/* Define to 1 if realpath() can malloc memory, always gives an absolute path, + and handles trailing slash correctly. */ +/* #undef FUNC_REALPATH_WORKS */ + +/* Define if gettimeofday clobbers the localtime buffer. */ +/* #undef GETTIMEOFDAY_CLOBBERS_LOCALTIME */ + +/* Define this to 'void' or 'struct timezone' to match the system's + declaration of the second argument to gettimeofday. */ +#define GETTIMEOFDAY_TIMEZONE void + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module canonicalize-lgpl shall be considered present. */ +#define GNULIB_CANONICALIZE_LGPL 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module fscanf shall be considered present. */ +#define GNULIB_FSCANF 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module fwriteerror shall be considered present. */ +#define GNULIB_FWRITEERROR 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module lock shall be considered present. */ +#define GNULIB_LOCK 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module scanf shall be considered present. */ +#define GNULIB_SCANF 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module sigpipe shall be considered present. */ +#define GNULIB_SIGPIPE 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module strerror shall be considered present. */ +#define GNULIB_STRERROR 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module unistr/u8-mbtoucr shall be considered present. */ +#define GNULIB_UNISTR_U8_MBTOUCR 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module unistr/u8-uctomb shall be considered present. */ +#define GNULIB_UNISTR_U8_UCTOMB 1 + +/* Define to 1 if you have `alloca', as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +#define HAVE_ALLOCA_H 1 + +/* Define to 1 if you have the `argz_count' function. */ +/* #undef HAVE_ARGZ_COUNT */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ARGZ_H */ + +/* Define to 1 if you have the `argz_next' function. */ +/* #undef HAVE_ARGZ_NEXT */ + +/* Define to 1 if you have the `argz_stringify' function. */ +/* #undef HAVE_ARGZ_STRINGIFY */ + +/* Define to 1 if you have the `asprintf' function. */ +#define HAVE_ASPRINTF 1 + +/* Define to 1 if you have the `atexit' function. */ +#define HAVE_ATEXIT 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BP_SYM_H */ + +/* Define to 1 if the compiler understands __builtin_expect. */ +#define HAVE_BUILTIN_EXPECT 1 + +/* Define to 1 if you have the `canonicalize_file_name' function. */ +/* #undef HAVE_CANONICALIZE_FILE_NAME */ + +/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +#cmakedefine HAVE_CFLOCALECOPYCURRENT 1 + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +#cmakedefine HAVE_CFPREFERENCESCOPYAPPVALUE 1 + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +#cmakedefine HAVE_DCGETTEXT 1 + +/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_CLEARERR_UNLOCKED 1 + +/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you + don't. */ +#define HAVE_DECL_FEOF_UNLOCKED 1 + +/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FERROR_UNLOCKED 1 + +/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FFLUSH_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FGETS_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FPUTC_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FPUTS_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FREAD_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FWRITE_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_GETCHAR_UNLOCKED 1 + +/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you + don't. */ +#define HAVE_DECL_GETC_UNLOCKED 1 + +/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. + */ +#define HAVE_DECL_GETENV 1 + +/* Define to 1 if you have the declaration of `iswblank', and to 0 if you + don't. */ +#define HAVE_DECL_ISWBLANK 1 + +/* Define to 1 if you have the declaration of `mbrtowc', and to 0 if you + don't. */ +/* #undef HAVE_DECL_MBRTOWC */ + +/* Define to 1 if you have the declaration of `mbsinit', and to 0 if you + don't. */ +/* #undef HAVE_DECL_MBSINIT */ + +/* Define to 1 if you have the declaration of `program_invocation_name', and + to 0 if you don't. */ +#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0 + +/* Define to 1 if you have the declaration of `program_invocation_short_name', + and to 0 if you don't. */ +#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0 + +/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_PUTCHAR_UNLOCKED 1 + +/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you + don't. */ +#define HAVE_DECL_PUTC_UNLOCKED 1 + +/* Define to 1 if you have the declaration of `setenv', and to 0 if you don't. + */ +#define HAVE_DECL_SETENV 1 + +/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you + don't. */ +#define HAVE_DECL_STRERROR_R 1 + +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 1 + +/* Define to 1 if you have the declaration of `towlower', and to 0 if you + don't. */ +/* #undef HAVE_DECL_TOWLOWER */ + +/* Define to 1 if you have the declaration of `wcwidth', and to 0 if you + don't. */ +#define HAVE_DECL_WCWIDTH 1 + +/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you + don't. */ +#define HAVE_DECL__SNPRINTF 0 + +/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you + don't. */ +#define HAVE_DECL__SNWPRINTF 0 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define if you have the declaration of environ. */ +/* #undef HAVE_ENVIRON_DECL */ + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_FEATURES_H 1 + +/* Define to 1 if you have the `fwprintf' function. */ +#define HAVE_FWPRINTF 1 + +/* Define to 1 if you have the `getcwd' function. */ +#define HAVE_GETCWD 1 + +/* Define to 1 if you have the `getegid' function. */ +#define HAVE_GETEGID 1 + +/* Define to 1 if you have the `geteuid' function. */ +#define HAVE_GETEUID 1 + +/* Define to 1 if you have the `getgid' function. */ +#define HAVE_GETGID 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_GETOPT_H 1 + +/* Define to 1 if you have the `getopt_long_only' function. */ +#define HAVE_GETOPT_LONG_ONLY 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define if the GNU gettext() function is already present or preinstalled. */ +#cmakedefine HAVE_GETTEXT 1 + +/* Define to 1 if you have the `gettimeofday' function. */ +#define HAVE_GETTIMEOFDAY 1 + +/* Define to 1 if you have the `getuid' function. */ +#define HAVE_GETUID 1 + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ICONV_H 1 + +/* Define to 1 if the compiler supports one of the keywords 'inline', + '__inline__', '__inline' and effectively inlines functions marked as such. + */ +#define HAVE_INLINE 1 + +/* Define if you have the 'intmax_t' type in or . */ +#define HAVE_INTMAX_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define if exists, doesn't clash with , and + declares uintmax_t. */ +#define HAVE_INTTYPES_H_WITH_UINTMAX 1 + +/* Define to 1 if you have the `iswblank' function. */ +#define HAVE_ISWBLANK 1 + +/* Define to 1 if you have the `iswcntrl' function. */ +#define HAVE_ISWCNTRL 1 + +/* Define if you have and nl_langinfo(CODESET). */ +#define HAVE_LANGINFO_CODESET 1 + +/* Define if your file defines LC_MESSAGES. */ +#define HAVE_LC_MESSAGES 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if the system has the type 'long long int'. */ +#define HAVE_LONG_LONG_INT 1 + +/* Define to 1 if you have the `lstat' function. */ +#define HAVE_LSTAT 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_MACH_O_DYLD_H 1 + +/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including + config.h and . */ +#define HAVE_MAP_ANONYMOUS 1 + +/* Define to 1 if you have the `mbrtowc' function. */ +#define HAVE_MBRTOWC 1 + +/* Define to 1 if you have the `mbsinit' function. */ +#define HAVE_MBSINIT 1 + +/* Define to 1 if you have the `mbslen' function. */ +/* #undef HAVE_MBSLEN */ + +/* Define to 1 if declares mbstate_t. */ +#define HAVE_MBSTATE_T 1 + +/* Define to 1 if you have the `memmove' function. */ +#define HAVE_MEMMOVE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mempcpy' function. */ +#cmakedefine HAVE_MEMPCPY 1 + +/* Define to 1 if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the `mprotect' function. */ +#define HAVE_MPROTECT 1 + +/* Define to 1 on MSVC platforms that have the "invalid parameter handler" + concept. */ +/* #undef HAVE_MSVC_INVALID_PARAMETER_HANDLER */ + +/* Define to 1 if you have the `munmap' function. */ +#define HAVE_MUNMAP 1 + +/* Define to 1 if you have the `newlocale' function. */ +#cmakedefine HAVE_NEWLOCALE 1 + +/* Define if your printf() function supports format strings with positions. */ +#define HAVE_POSIX_PRINTF 1 + +/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ +#define HAVE_PTHREAD_MUTEX_RECURSIVE 1 + +/* Define if the POSIX multithreading library has read/write locks. */ +#define HAVE_PTHREAD_RWLOCK 1 + +/* Define to 1 if you have the `putenv' function. */ +#define HAVE_PUTENV 1 + +/* Define to 1 if you have the `raise' function. */ +#define HAVE_RAISE 1 + +/* Define to 1 if you have the `readlink' function. */ +#define HAVE_READLINK 1 + +/* Define to 1 if you have the `readlinkat' function. */ +#define HAVE_READLINKAT 1 + +/* Define to 1 if you have the `realpath' function. */ +#define HAVE_REALPATH 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SEARCH_H 1 + +/* Define to 1 if you have the `setenv' function. */ +#define HAVE_SETENV 1 + +/* Define to 1 if you have the `setlocale' function. */ +#define HAVE_SETLOCALE 1 + +/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ +/* #undef HAVE_SIGNED_SIG_ATOMIC_T */ + +/* Define to 1 if 'wchar_t' is a signed integer type. */ +/* #undef HAVE_SIGNED_WCHAR_T */ + +/* Define to 1 if 'wint_t' is a signed integer type. */ +/* #undef HAVE_SIGNED_WINT_T */ + +/* Define to 1 if the system has the type `sigset_t'. */ +#define HAVE_SIGSET_T 1 + +/* Define to 1 if you have the `snprintf' function. */ +#define HAVE_SNPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDDEF_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define if exists, doesn't clash with , and declares + uintmax_t. */ +#define HAVE_STDINT_H_WITH_UINTMAX 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `stpcpy' function. */ +#define HAVE_STPCPY 1 + +/* Define to 1 if you have the `strcasecmp' function. */ +#define HAVE_STRCASECMP 1 + +/* Define to 1 if you have the `strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the `strerror_r' function. */ +#define HAVE_STRERROR_R 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + +/* Define to 1 if you have the `strtoul' function. */ +#define HAVE_STRTOUL 1 + +/* Define to 1 if you have the `symlink' function. */ +#define HAVE_SYMLINK 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_BITYPES_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_INTTYPES_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_TIMEB_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the `towlower' function. */ +#define HAVE_TOWLOWER 1 + +/* Define to 1 if you have the `tsearch' function. */ +#define HAVE_TSEARCH 1 + +/* Define if you have the 'uintmax_t' type in or . */ +#define HAVE_UINTMAX_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if the system has the type 'unsigned long long int'. */ +#define HAVE_UNSIGNED_LONG_LONG_INT 1 + +/* Define to 1 if you have the `uselocale' function. */ +#define HAVE_USELOCALE 1 + +/* Define to 1 or 0, depending whether the compiler supports simple visibility + declarations. */ +#define HAVE_VISIBILITY 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define if you have the 'wchar_t' type. */ +#define HAVE_WCHAR_T 1 + +/* Define to 1 if you have the `wcrtomb' function. */ +#define HAVE_WCRTOMB 1 + +/* Define to 1 if you have the `wcslen' function. */ +#define HAVE_WCSLEN 1 + +/* Define to 1 if you have the `wcsnlen' function. */ +#define HAVE_WCSNLEN 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + +/* Define to 1 if you have the `wcwidth' function. */ +#define HAVE_WCWIDTH 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINSOCK2_H */ + +/* Define if you have the 'wint_t' type. */ +#define HAVE_WINT_T 1 + +/* Define to 1 if O_NOATIME works. */ +#define HAVE_WORKING_O_NOATIME 0 + +/* Define to 1 if O_NOFOLLOW works. */ +#define HAVE_WORKING_O_NOFOLLOW 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_XLOCALE_H 1 + +/* Define to 1 if the system has the type `_Bool'. */ +#define HAVE__BOOL 1 + +/* Define to 1 if you have the `_ftime' function. */ +/* #undef HAVE__FTIME */ + +/* Define to 1 if you have the `_NSGetExecutablePath' function. */ +/* #undef HAVE__NSGETEXECUTABLEPATH */ + +/* Define to 1 if you have the `_set_invalid_parameter_handler' function. */ +/* #undef HAVE__SET_INVALID_PARAMETER_HANDLER */ + +/* Define to 1 if you have the `__fsetlocking' function. */ +/* #undef HAVE___FSETLOCKING */ + +/* Define as const if the declaration of iconv() needs const. */ +#define ICONV_CONST + +/* Define to a symbolic name denoting the flavor of iconv_open() + implementation. */ +/* #undef ICONV_FLAVOR */ + +/* Define to the value of ${prefix}, as a string. */ +/* #define INSTALLPREFIX "/usr/local" */ + +/* Define if integer division by zero raises signal SIGFPE. */ +#define INTDIV0_RAISES_SIGFPE 0 + +/* Define to 1 if 'lstat' dereferences a symlink specified with a trailing + slash. */ +/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */ + +/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ +#define MALLOC_0_IS_NONNULL 1 + +/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ +/* #undef MAP_ANONYMOUS */ + +/* Define if the mbrtowc function has the NULL pwc argument bug. */ +/* #undef MBRTOWC_NULL_ARG1_BUG */ + +/* Define if the mbrtowc function has the NULL string argument bug. */ +/* #undef MBRTOWC_NULL_ARG2_BUG */ + +/* Define if the mbrtowc function does not return 0 for a NUL character. */ +/* #undef MBRTOWC_NUL_RETVAL_BUG */ + +/* Define if the mbrtowc function returns a wrong return value. */ +/* #undef MBRTOWC_RETVAL_BUG */ + +/* Name of package */ +#define PACKAGE "gettext-runtime" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "gettext-runtime" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "gettext-runtime 0.19" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "gettext-runtime" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "0.19" + +/* Define if exists and defines unusable PRI* macros. */ +/* #undef PRI_MACROS_BROKEN */ + +/* Define if the pthread_in_use() detection is hard. */ +/* #undef PTHREAD_IN_USE_DETECTION_HARD */ + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'ptrdiff_t'. */ +#define PTRDIFF_T_SUFFIX + +/* Define to 1 if readlink fails to recognize a trailing slash. */ +/* #undef READLINK_TRAILING_SLASH_BUG */ + +/* Define to 1 if stat needs help when passed a directory name with a trailing + slash */ +/* #undef REPLACE_FUNC_STAT_DIR */ + +/* Define to 1 if stat needs help when passed a file name with a trailing + slash */ +/* #undef REPLACE_FUNC_STAT_FILE */ + +/* Define to 1 if strerror(0) does not return a message implying success. */ +/* #undef REPLACE_STRERROR_0 */ + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'sig_atomic_t'. */ +#define SIG_ATOMIC_T_SUFFIX + +/* Define as the maximum value of type 'size_t', if the system doesn't define + it. */ +#ifndef SIZE_MAX +/* # undef SIZE_MAX */ +#endif + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'size_t'. */ +#define SIZE_T_SUFFIX ul + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at runtime. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +/* #undef STACK_DIRECTION */ + +/* Define to 1 if the `S_IS*' macros in do not work properly. */ +/* #undef STAT_MACROS_BROKEN */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if strerror_r returns char *. */ +/* #undef STRERROR_R_CHAR_P */ + +/* Define to the prefix of C symbols at the assembler and linker level, either + an underscore or empty. */ +#define USER_LABEL_PREFIX + +/* Define if the POSIX multithreading library can be used. */ +#define USE_POSIX_THREADS 1 + +/* Define if references to the POSIX multithreading library should be made + weak. */ +/* #undef USE_POSIX_THREADS_WEAK */ + +/* Define if the GNU Pth multithreading library can be used. */ +/* #undef USE_PTH_THREADS */ + +/* Define if references to the GNU Pth multithreading library should be made + weak. */ +/* #undef USE_PTH_THREADS_WEAK */ + +/* Define if the old Solaris multithreading library can be used. */ +/* #undef USE_SOLARIS_THREADS */ + +/* Define if references to the old Solaris multithreading library should be + made weak. */ +/* #undef USE_SOLARIS_THREADS_WEAK */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable general extensions on OS X. */ +#ifndef _DARWIN_C_SOURCE +# define _DARWIN_C_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable X/Open extensions if necessary. HP-UX 11.11 defines + mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of + whether compiling with -Ae or -D_HPUX_SOURCE=1. */ +#ifndef _XOPEN_SOURCE +/* # undef _XOPEN_SOURCE */ +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Define to 1 if you want getc etc. to use unlocked I/O if available. + Unlocked I/O can improve performance in unithreaded apps, but it is not + safe for multithreaded apps. */ +#define USE_UNLOCKED_IO 1 + +/* Define if the native Windows multithreading API can be used. */ +/* #undef USE_WINDOWS_THREADS */ + +/* Version number of package */ +#define VERSION "0.19" + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'wchar_t'. */ +#define WCHAR_T_SUFFIX + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'wint_t'. */ +#define WINT_T_SUFFIX + +/* Define when --enable-shared is used on mingw or Cygwin. */ +/* #undef WOE32DLL */ + +/* Enable large inode numbers on Mac OS X 10.5. */ +#define _DARWIN_USE_64_BIT_INODE 1 + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define to 1 if Gnulib overrides 'struct stat' on Windows so that struct + stat.st_size becomes 64-bit. */ +/* #undef _GL_WINDOWS_64_BIT_ST_SIZE */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 on Solaris. */ +/* #undef _LCONV_C99 */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ +/* #undef _NETBSD_SOURCE */ + +/* The _Noreturn keyword of C11. */ +#if ! (defined _Noreturn \ + || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) +# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ + || 0x5110 <= __SUNPRO_C) +# define _Noreturn __attribute__ ((__noreturn__)) +# elif defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn +# endif +#endif + + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for 'stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Define to rpl_ if the getopt replacement functions and variables should be + used. */ +#define __GETOPT_PREFIX rpl_ + +/* Please see the Gnulib manual for how to use these macros. + + Suppress extern inline with HP-UX cc, as it appears to be broken; see + . + + Suppress extern inline with Sun C in standards-conformance mode, as it + mishandles inline functions that call each other. E.g., for 'inline void f + (void) { } inline void g (void) { f (); }', c99 incorrectly complains + 'reference to static identifier "f" in extern inline function'. + This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. + + Suppress the use of extern inline on problematic Apple configurations. + OS X 10.8 and earlier mishandle it; see, e.g., + . + OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and + for clang but remains for g++; see . + Perhaps Apple will fix this some day. */ +#if (defined __APPLE__ \ + && (defined __header_inline \ + ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ + && ! defined __clang__) \ + : ((! defined _DONT_USE_CTYPE_INLINE_ \ + && (defined __GNUC__ || defined __cplusplus)) \ + || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ + && defined __GNUC__ && ! defined __cplusplus)))) +# define _GL_EXTERN_INLINE_APPLE_BUG +#endif +#if ((__GNUC__ \ + ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ + : (199901L <= __STDC_VERSION__ \ + && !defined __HP_cc \ + && !(defined __SUNPRO_C && __STDC__))) \ + && !defined _GL_EXTERN_INLINE_APPLE_BUG) +# define _GL_INLINE inline +# define _GL_EXTERN_INLINE extern inline +# define _GL_EXTERN_INLINE_IN_USE +#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ + && !defined _GL_EXTERN_INLINE_APPLE_BUG) +# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ + /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ +# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) +# else +# define _GL_INLINE extern inline +# endif +# define _GL_EXTERN_INLINE extern +# define _GL_EXTERN_INLINE_IN_USE +#else +# define _GL_INLINE static _GL_UNUSED +# define _GL_EXTERN_INLINE static _GL_UNUSED +#endif + +#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) +# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ +# define _GL_INLINE_HEADER_CONST_PRAGMA +# else +# define _GL_INLINE_HEADER_CONST_PRAGMA \ + _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") +# endif + /* Suppress GCC's bogus "no previous prototype for 'FOO'" + and "no previous declaration for 'FOO'" diagnostics, + when FOO is an inline function in the header; see + . */ +# define _GL_INLINE_HEADER_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ + _GL_INLINE_HEADER_CONST_PRAGMA +# define _GL_INLINE_HEADER_END \ + _Pragma ("GCC diagnostic pop") +#else +# define _GL_INLINE_HEADER_BEGIN +# define _GL_INLINE_HEADER_END +#endif + +/* Define to `int' if doesn't define. */ +/* #undef gid_t */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports + the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of + earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. + __APPLE__ && __MACH__ test for Mac OS X. + __APPLE_CC__ tests for the Apple compiler and its version. + __STDC_VERSION__ tests for the C99 mode. */ +#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ +# define __GNUC_STDC_INLINE__ 1 +#endif + +/* Define to a type if does not define. */ +/* #undef mbstate_t */ + +/* Define to `int' if does not define. */ +/* #undef mode_t */ + +/* Define to the type of st_nlink in struct stat, or a supertype. */ +/* #undef nlink_t */ + +/* Define to `int' if does not define. */ +/* #undef pid_t */ + +/* Define as the type of the result of subtracting two pointers, if the system + doesn't define it. */ +/* #undef ptrdiff_t */ + +/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ +#define restrict __restrict +/* Work around a bug in Sun C++: it does not support _Restrict or + __restrict__, even though the corresponding Sun C compiler ends up with + "#define restrict _Restrict" or "#define restrict __restrict__" in the + previous line. Perhaps some future version of Sun C++ will work with + restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ +#if defined __SUNPRO_CC && !defined __RESTRICT +# define _Restrict +# define __restrict__ +#endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define as a signed type of the same size as size_t. */ +/* #undef ssize_t */ + +/* Define to `int' if doesn't define. */ +/* #undef uid_t */ + +/* Define to unsigned long or unsigned long long if and + don't define. */ +/* #undef uintmax_t */ + +/* Define as a marker that can be attached to declarations that might not + be used. This helps to reduce warnings, such as from + GCC -Wunused-parameter. */ +#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# define _GL_UNUSED __attribute__ ((__unused__)) +#else +# define _GL_UNUSED +#endif +/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name + is a misnomer outside of parameter lists. */ +#define _UNUSED_PARAMETER_ _GL_UNUSED + +/* The __pure__ attribute was added in gcc 2.96. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +#else +# define _GL_ATTRIBUTE_PURE /* empty */ +#endif + +/* The __const__ attribute was added in gcc 2.95. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) +# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) +#else +# define _GL_ATTRIBUTE_CONST /* empty */ +#endif + + + +#define __libc_lock_t gl_lock_t +#define __libc_lock_define gl_lock_define +#define __libc_lock_define_initialized gl_lock_define_initialized +#define __libc_lock_init gl_lock_init +#define __libc_lock_lock gl_lock_lock +#define __libc_lock_unlock gl_lock_unlock +#define __libc_lock_recursive_t gl_recursive_lock_t +#define __libc_lock_define_recursive gl_recursive_lock_define +#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized +#define __libc_lock_init_recursive gl_recursive_lock_init +#define __libc_lock_lock_recursive gl_recursive_lock_lock +#define __libc_lock_unlock_recursive gl_recursive_lock_unlock +#define glthread_in_use libintl_thread_in_use +#define glthread_lock_init_func libintl_lock_init_func +#define glthread_lock_lock_func libintl_lock_lock_func +#define glthread_lock_unlock_func libintl_lock_unlock_func +#define glthread_lock_destroy_func libintl_lock_destroy_func +#define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded +#define glthread_rwlock_init_func libintl_rwlock_init_func +#define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded +#define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func +#define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded +#define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func +#define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded +#define glthread_rwlock_unlock_func libintl_rwlock_unlock_func +#define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded +#define glthread_rwlock_destroy_func libintl_rwlock_destroy_func +#define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded +#define glthread_recursive_lock_init_func libintl_recursive_lock_init_func +#define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded +#define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func +#define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded +#define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func +#define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded +#define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func +#define glthread_once_func libintl_once_func +#define glthread_once_singlethreaded libintl_once_singlethreaded +#define glthread_once_multithreaded libintl_once_multithreaded + + + +/* On Windows, variables that may be in a DLL must be marked specially. */ +#if (defined _MSC_VER && defined _DLL) && !defined IN_RELOCWRAPPER +# define DLL_VARIABLE __declspec (dllimport) +#else +# define DLL_VARIABLE +#endif + +/* Extra OS/2 (emx+gcc) defines. */ +#ifdef __EMX__ +# include "intl/os2compat.h" +#endif + diff --git a/vcpkg/ports/gettext/config.win32.h b/vcpkg/ports/gettext/config.win32.h new file mode 100644 index 0000000..e850789 --- /dev/null +++ b/vcpkg/ports/gettext/config.win32.h @@ -0,0 +1,675 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +#ifndef WIN32 +# define _GL_INLINE_HEADER_BEGIN +# define _GL_INLINE_HEADER_END +# define _GL_INLINE static inline +#endif + +/* Disable function deprecated warnings */ +#define _CRT_NONSTDC_NO_WARNINGS + +/* Define to the number of bits in type 'ptrdiff_t'. */ +#define BITSIZEOF_PTRDIFF_T sizeof(ptrdiff_t) + +/* Define to the number of bits in type 'sig_atomic_t'. */ +#define BITSIZEOF_SIG_ATOMIC_T 32 + +/* Define to the number of bits in type 'size_t'. */ +#define BITSIZEOF_SIZE_T sizeof(size_t) + +/* Define to the number of bits in type 'wchar_t'. */ +#define BITSIZEOF_WCHAR_T 16 + +/* Define to the number of bits in type 'wint_t'. */ +#define BITSIZEOF_WINT_T 16 + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +/* #undef CRAY_STACKSEG_END */ + +/* Define if mono is the preferred C# implementation. */ +/* #undef CSHARP_CHOICE_MONO */ + +/* Define if pnet is the preferred C# implementation. */ +/* #undef CSHARP_CHOICE_PNET */ + +/* Define to 1 if using `alloca.c'. */ +/* #undef C_ALLOCA */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#define ENABLE_NLS 1 + +/* Define to 1 if the package shall run at any location in the filesystem. */ +#define ENABLE_RELOCATABLE 1 + +/* Define to 1 when using the gnulib module fwriteerror. */ +#define GNULIB_FWRITEERROR 1 + +/* Define to 1 if you have `alloca', as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +/* #undef HAVE_ALLOCA_H */ + +/* Define to 1 if you have the `argz_count' function. */ +/* #undef HAVE_ARGZ_COUNT */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ARGZ_H */ + +/* Define to 1 if you have the `argz_next' function. */ +/* #undef HAVE_ARGZ_NEXT */ + +/* Define to 1 if you have the `argz_stringify' function. */ +/* #undef HAVE_ARGZ_STRINGIFY */ + +/* Define to 1 if you have the `asprintf' function. */ +/* #undef HAVE_ASPRINTF */ + +/* Define to 1 if you have the `atexit' function. */ +#define HAVE_ATEXIT 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BP_SYM_H */ + +/* Define to 1 if the compiler understands __builtin_expect. */ +/* #undef HAVE_BUILTIN_EXPECT */ + +/* Define to 1 if you have the `canonicalize_file_name' function. */ +/* #undef HAVE_CANONICALIZE_FILE_NAME */ + +/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* Define to 1 if you have the declaration of `canonicalize_file_name', and to + 0 if you don't. */ +#define HAVE_DECL_CANONICALIZE_FILE_NAME 0 + +/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_CLEARERR_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you + don't. */ +#define HAVE_DECL_FEOF_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FERROR_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FFLUSH_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FGETS_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FPUTC_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FPUTS_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FREAD_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_FWRITE_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_GETCHAR_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you + don't. */ +#define HAVE_DECL_GETC_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. + */ +#define HAVE_DECL_GETENV 1 + +/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if + you don't. */ +#define HAVE_DECL_PUTCHAR_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you + don't. */ +#define HAVE_DECL_PUTC_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't. + */ +#define HAVE_DECL_STRDUP 1 + +/* Define to 1 if you have the declaration of `strerror', and to 0 if you + don't. */ +/* #undef HAVE_DECL_STRERROR */ + +/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you + don't. */ +#define HAVE_DECL_STRERROR_R 0 + +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#define HAVE_DECL_STRNLEN 0 + +/* Define to 1 if you have the declaration of `wcwidth', and to 0 if you + don't. */ +#define HAVE_DECL_WCWIDTH 0 + +/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you + don't. */ +#define HAVE_DECL__SNPRINTF 1 + +/* Define to 1 if you have the declaration of `_snwprintf', and to 0 if you + don't. */ +#define HAVE_DECL__SNWPRINTF 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DLFCN_H */ + +/* Define if you have the declaration of environ. */ +#define HAVE_ENVIRON_DECL 1 + +/* Define to 1 if you have the `fwprintf' function. */ +#define HAVE_FWPRINTF 1 + +/* Define to 1 if you have the `getcwd' function. */ +#define HAVE_GETCWD 1 + +/* Define to 1 if you have the `getegid' function. */ +/* #undef HAVE_GETEGID */ + +/* Define to 1 if you have the `geteuid' function. */ +/* #undef HAVE_GETEUID */ + +/* Define to 1 if you have the `getgid' function. */ +/* #undef HAVE_GETGID */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_GETOPT_H */ + +/* Define to 1 if you have the `getopt_long_only' function. */ +/* #undef HAVE_GETOPT_LONG_ONLY */ + +/* Define to 1 if you have the `getpagesize' function. */ +/* #undef HAVE_GETPAGESIZE */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* Define to 1 if you have the `getuid' function. */ +/* #undef HAVE_GETUID */ + +/* Define if you have the iconv() function and it works. */ +/* #undef HAVE_ICONV */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ICONV_H */ + +/* Define if your compiler supports the #include_next directive. */ +/* #undef HAVE_INCLUDE_NEXT */ + +/* Define if you have the 'intmax_t' type in or . */ +#define HAVE_INTMAX_T 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_INTTYPES_H */ + +/* Define if exists, doesn't clash with , and + declares uintmax_t. */ +/* #undef HAVE_INTTYPES_H_WITH_UINTMAX */ + +/* Define to 1 if you have the `iswcntrl' function. */ +#define HAVE_ISWCNTRL 1 + +/* Define if you have and nl_langinfo(CODESET). */ +/* #undef HAVE_LANGINFO_CODESET */ + +/* Define if your file defines LC_MESSAGES. */ +/* #undef HAVE_LC_MESSAGES */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if the system has the type `long long int'. */ +/* #undef HAVE_LONG_LONG_INT */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MACH_O_DYLD_H */ + +/* Define if the 'malloc' function is POSIX compliant. */ +/* #undef HAVE_MALLOC_POSIX */ + +/* Define to 1 if mbrtowc and mbstate_t are properly declared. */ +/* #undef HAVE_MBRTOWC */ + +/* Define to 1 if declares mbstate_t. */ +#define HAVE_MBSTATE_T 1 + +/* Define to 1 if you have the `memchr' function. */ +#define HAVE_MEMCHR 1 + +/* Define to 1 if you have the `memmove' function. */ +#define HAVE_MEMMOVE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mempcpy' function. */ +#ifdef __GNUC__ +#define HAVE_MEMPCPY 1 +#endif + +/* Define to 1 if you have a working `mmap' system call. */ +/* #undef HAVE_MMAP */ + +/* Define to 1 if you have the `munmap' function. */ +/* #undef HAVE_MUNMAP */ + +/* Define if you have and it defines the NL_LOCALE_NAME macro if + _GNU_SOURCE is defined. */ +/* #undef HAVE_NL_LOCALE_NAME */ + +/* Define if your printf() function supports format strings with positions. */ +/* #undef HAVE_POSIX_PRINTF */ + +/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ +/* #undef HAVE_PTHREAD_MUTEX_RECURSIVE */ + +/* Define if the POSIX multithreading library has read/write locks. */ +/* #undef HAVE_PTHREAD_RWLOCK */ + +/* Define to 1 if you have the `putenv' function. */ +#define HAVE_PUTENV 1 + +/* Define to 1 if you have the `readlink' function. */ +/* #undef HAVE_READLINK */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SEARCH_H 1 + +/* Define to 1 if you have the `setenv' function. */ +/* #undef HAVE_SETENV */ + +/* Define to 1 if you have the `setlocale' function. */ +#define HAVE_SETLOCALE 1 + +/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ +#define HAVE_SIGNED_SIG_ATOMIC_T 1 + +/* Define to 1 if 'wchar_t' is a signed integer type. */ +/* #undef HAVE_SIGNED_WCHAR_T */ + +/* Define to 1 if 'wint_t' is a signed integer type. */ +/* #undef HAVE_SIGNED_WINT_T */ + +/* Define to 1 if you have the `snprintf' function. */ +/* #undef HAVE_SNPRINTF */ + +/* Define to 1 if stdbool.h conforms to C99. */ +/* #undef HAVE_STDBOOL_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDDEF_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define if exists, doesn't clash with , and declares + uintmax_t. */ +#define HAVE_STDINT_H_WITH_UINTMAX 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `stpcpy' function. */ +/* #undef HAVE_STPCPY */ + +/* Define to 1 if you have the `strcasecmp' function. */ +/* #undef HAVE_STRCASECMP */ + +/* Define to 1 if you have the `strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the `strerror_r' function. */ +/* #undef HAVE_STRERROR_R */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STRINGS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strtol' function. */ +#define HAVE_STRTOL 1 + +/* Define to 1 if you have the `strtoul' function. */ +#define HAVE_STRTOUL 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_BITYPES_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_INTTYPES_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_PARAM_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the `tsearch' function. */ +/* #undef HAVE_TSEARCH */ + +/* Define if you have the 'uintmax_t' type in or . */ +#define HAVE_UINTMAX_T 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_UNISTD_H */ + +/* Define to 1 if the system has the type `unsigned long long int'. */ +/* #undef HAVE_UNSIGNED_LONG_LONG_INT */ + +/* Define to 1 or 0, depending whether the compiler supports simple visibility + declarations. */ +#define HAVE_VISIBILITY 0 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define if you have the 'wchar_t' type. */ +#define HAVE_WCHAR_T 1 + +/* Define to 1 if you have the `wcslen' function. */ +#define HAVE_WCSLEN 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + +/* Define to 1 if you have the `wcwidth' function. */ +/* #undef HAVE_WCWIDTH */ + +/* Define if you have the 'wint_t' type. */ +#define HAVE_WINT_T 1 + +/* Define to 1 if the system has the type `_Bool'. */ +/* #undef HAVE__BOOL */ + +/* Define to 1 if you have the `_NSGetExecutablePath' function. */ +/* #undef HAVE__NSGETEXECUTABLEPATH */ + +/* Define to 1 if you have the `__fsetlocking' function. */ +/* #undef HAVE___FSETLOCKING */ + +/* Define as const if the declaration of iconv() needs const. */ +/* #undef ICONV_CONST */ + +/* Define to a symbolic name denoting the flavor of iconv_open() + implementation. */ +/* #undef ICONV_FLAVOR */ + +/* Define to the value of ${prefix}, as a string. */ +/* #define INSTALLPREFIX "/usr/local" */ + +/* Define if integer division by zero raises signal SIGFPE. */ +#define INTDIV0_RAISES_SIGFPE 0 + +/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ +#define MALLOC_0_IS_NONNULL 1 + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +#define NO_MINUS_C_MINUS_O 1 + +/* Name of package */ +#define PACKAGE "gettext-runtime" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "" + +/* Define if exists and defines unusable PRI* macros. */ +/* #undef PRI_MACROS_BROKEN */ + +/* Define if the pthread_in_use() detection is hard. */ +/* #undef PTHREAD_IN_USE_DETECTION_HARD */ + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'ptrdiff_t'. */ +#define PTRDIFF_T_SUFFIX + +/* Define this to 1 if strerror is broken. */ +/* #undef REPLACE_STRERROR */ + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'sig_atomic_t'. */ +#define SIG_ATOMIC_T_SUFFIX + +/* Define as the maximum value of type 'size_t', if the system doesn't define + it. */ +#if defined(_WIN32) +#define SIZE_MAX (((1UL << 31) - 1) * 2 + 1) +#endif + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'size_t'. */ +#define SIZE_T_SUFFIX u + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at runtime. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +/* #undef STACK_DIRECTION */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if strerror_r returns char *. */ +/* #undef STRERROR_R_CHAR_P */ + +/* Define if the POSIX multithreading library can be used. */ +/* #undef USE_POSIX_THREADS */ + +/* Define if references to the POSIX multithreading library should be made + weak. */ +/* #undef USE_POSIX_THREADS_WEAK */ + +/* Define if the GNU Pth multithreading library can be used. */ +/* #undef USE_PTH_THREADS */ + +/* Define if references to the GNU Pth multithreading library should be made + weak. */ +/* #undef USE_PTH_THREADS_WEAK */ + +/* Define if the old Solaris multithreading library can be used. */ +/* #undef USE_SOLARIS_THREADS */ + +/* Define if references to the old Solaris multithreading library should be + made weak. */ +/* #undef USE_SOLARIS_THREADS_WEAK */ + +/* Define to 1 if you want getc etc. to use unlocked I/O if available. + Unlocked I/O can improve performance in unithreaded apps, but it is not + safe for multithreaded apps. */ +#define USE_UNLOCKED_IO 0 + +/* Define if the Win32 multithreading API can be used. */ +#define USE_WIN32_THREADS 1 + +/* Version number of package */ +#define VERSION "0.17" + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'wchar_t'. */ +#define WCHAR_T_SUFFIX + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'wint_t'. */ +#define WINT_T_SUFFIX + +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Define to rpl_ if the getopt replacement functions and variables should be + used. */ +#define __GETOPT_PREFIX rpl_ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#define inline __inline +#endif + +/* Define to a type if does not define. */ +/* #undef mbstate_t */ + +/* Define as the type of the result of subtracting two pointers, if the system + doesn't define it. */ +/* #undef ptrdiff_t */ + +/* Define to a replacement function name for realpath(). */ +#define realpath rpl_realpath + +/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ +#define restrict +/* Work around a bug in Sun C++: it does not support _Restrict, even + though the corresponding Sun C compiler does, which causes + "#define restrict _Restrict" in the previous line. Perhaps some future + version of Sun C++ will work with _Restrict; if so, it'll probably + define __RESTRICT, just as Sun C does. */ +#if defined __SUNPRO_CC && !defined __RESTRICT +# define _Restrict +#endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define as a signed type of the same size as size_t. */ +#ifdef _WIN64 +#define ssize_t __int64 +#elif _WIN32 +#define ssize_t __int32 +#endif + +/* Define to rpl_strnlen if the replacement function should be used. */ +#define strnlen rpl_strnlen + +/* Define to unsigned long or unsigned long long if and + don't define. */ +/* #undef uintmax_t */ + +#define __libc_lock_t gl_lock_t +#define __libc_lock_define gl_lock_define +#define __libc_lock_define_initialized gl_lock_define_initialized +#define __libc_lock_init gl_lock_init +#define __libc_lock_lock gl_lock_lock +#define __libc_lock_unlock gl_lock_unlock +#define __libc_lock_recursive_t gl_recursive_lock_t +#define __libc_lock_define_recursive gl_recursive_lock_define +#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized +#define __libc_lock_init_recursive gl_recursive_lock_init +#define __libc_lock_lock_recursive gl_recursive_lock_lock +#define __libc_lock_unlock_recursive gl_recursive_lock_unlock +#if 0 +#define glthread_in_use libintl_thread_in_use +#define glthread_lock_init libintl_lock_init +#define glthread_lock_lock libintl_lock_lock +#define glthread_lock_unlock libintl_lock_unlock +#define glthread_lock_destroy libintl_lock_destroy +#define glthread_rwlock_init libintl_rwlock_init +#define glthread_rwlock_rdlock libintl_rwlock_rdlock +#define glthread_rwlock_wrlock libintl_rwlock_wrlock +#define glthread_rwlock_unlock libintl_rwlock_unlock +#define glthread_rwlock_destroy libintl_rwlock_destroy +#define glthread_recursive_lock_init libintl_recursive_lock_init +#define glthread_recursive_lock_lock libintl_recursive_lock_lock +#define glthread_recursive_lock_unlock libintl_recursive_lock_unlock +#define glthread_recursive_lock_destroy libintl_recursive_lock_destroy +#define glthread_once libintl_once +#define glthread_once_call libintl_once_call +#define glthread_once_singlethreaded libintl_once_singlethreaded +#endif + + +/* On Windows, variables that may be in a DLL must be marked specially. */ +#if (defined _MSC_VER && defined _DLL) && !defined IN_RELOCWRAPPER +# define DLL_VARIABLE __declspec (dllimport) +#else +# define DLL_VARIABLE +#endif + +/* Extra OS/2 (emx+gcc) defines. */ +#ifdef __EMX__ +# include "intl/os2compat.h" +#endif + diff --git a/vcpkg/ports/gettext/libgnuintl.win32.h b/vcpkg/ports/gettext/libgnuintl.win32.h new file mode 100644 index 0000000..440da4d --- /dev/null +++ b/vcpkg/ports/gettext/libgnuintl.win32.h @@ -0,0 +1,423 @@ +/* Message catalogs for internationalization. +Copyright (C) 1995-1997, 2000-2007 Free Software Foundation, Inc. + +This program is free software; you can redistribute it and/or modify it +under the terms of the GNU Library General Public License as published +by the Free Software Foundation; either version 2, or (at your option) +any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +USA. */ + +#ifndef _LIBINTL_H +#define _LIBINTL_H 1 + +#if defined(_WIN32) && defined(libintl_EXPORTS) +#define LIBINTL_DLL_EXPORTED __declspec(dllexport) +#else +#define LIBINTL_DLL_EXPORTED +#endif + +#include + +/* The LC_MESSAGES locale category is the category used by the functions +gettext() and dgettext(). It is specified in POSIX, but not in ANSI C. +On systems that don't define it, use an arbitrary value instead. +On Solaris, defines __LOCALE_H (or _LOCALE_H in Solaris 2.5) +then includes (i.e. this file!) and then only defines +LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES +in this case. */ +#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun)) +# define LC_MESSAGES 1729 +#endif + +/* We define an additional symbol to signal that we use the GNU +implementation of gettext. */ +#define __USE_GNU_GETTEXT 1 + +/* Provide information about the supported file formats. Returns the +maximum minor revision number supported for a given major revision. */ +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \ + ((major) == 0 || (major) == 1 ? 1 : -1) + +/* Resolve a platform specific conflict on DJGPP. GNU gettext takes +precedence over _conio_gettext. */ +#ifdef __DJGPP__ +# undef gettext +#endif + +#ifdef __cplusplus +extern "C" { +#endif + + + /* Version number: (major<<16) + (minor<<8) + subminor */ +#define LIBINTL_VERSION 0x001100 + extern LIBINTL_DLL_EXPORTED int libintl_version; + + + /* We redirect the functions to those prefixed with "libintl_". This is + necessary, because some systems define gettext/textdomain/... in the C + library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer). + If we used the unprefixed names, there would be cases where the + definition in the C library would override the one in the libintl.so + shared library. Recall that on ELF systems, the symbols are looked + up in the following order: + 1. in the executable, + 2. in the shared libraries specified on the link command line, in order, + 3. in the dependencies of the shared libraries specified on the link + command line, + 4. in the dlopen()ed shared libraries, in the order in which they were + dlopen()ed. + The definition in the C library would override the one in libintl.so if + either + * -lc is given on the link command line and -lintl isn't, or + * -lc is given on the link command line before -lintl, or + * libintl.so is a dependency of a dlopen()ed shared library but not + linked to the executable at link time. + Since Solaris gettext() behaves differently than GNU gettext(), this + would be unacceptable. + + The redirection happens by default through macros in C, so that &gettext + is independent of the compilation unit, but through inline functions in + C++, in order not to interfere with the name mangling of class fields or + class methods called 'gettext'. */ + + /* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS. + If he doesn't, we choose the method. A third possible method is + _INTL_REDIRECT_ASM, supported only by GCC. */ +#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS) +# if __GNUC__ >= 2 && !(__APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus) +# define _INTL_REDIRECT_ASM +# else +# ifdef __cplusplus +# define _INTL_REDIRECT_INLINE +# else +# define _INTL_REDIRECT_MACROS +# endif +# endif +#endif + /* Auxiliary macros. */ +#ifdef _INTL_REDIRECT_ASM +# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname)) +# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring +# define _INTL_STRINGIFY(prefix) #prefix +#else +# define _INTL_ASM(cname) +#endif + + /* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return + its n-th argument literally. This enables GCC to warn for example about + printf (gettext ("foo %y")). */ +#if __GNUC__ >= 3 && !(__APPLE_CC__ > 1 && defined __cplusplus) +# define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n))) +#else +# define _INTL_MAY_RETURN_STRING_ARG(n) +#endif + + /* Look up MSGID in the current default message catalog for the current + LC_MESSAGES locale. If not found, returns MSGID itself (the default + text). */ +#ifdef _INTL_REDIRECT_INLINE + extern LIBINTL_DLL_EXPORTED char *libintl_gettext(const char *__msgid) + _INTL_MAY_RETURN_STRING_ARG(1); + static inline char *gettext(const char *__msgid) + { + return libintl_gettext(__msgid); + } +#else +#ifdef _INTL_REDIRECT_MACROS +# define gettext libintl_gettext +#endif + extern LIBINTL_DLL_EXPORTED char *gettext(const char *__msgid) + _INTL_ASM(libintl_gettext) + _INTL_MAY_RETURN_STRING_ARG(1); +#endif + + /* Look up MSGID in the DOMAINNAME message catalog for the current + LC_MESSAGES locale. */ +#ifdef _INTL_REDIRECT_INLINE + extern LIBINTL_DLL_EXPORTED char *libintl_dgettext(const char *__domainname, const char *__msgid) + _INTL_MAY_RETURN_STRING_ARG(2); + static inline char *dgettext(const char *__domainname, const char *__msgid) + { + return libintl_dgettext(__domainname, __msgid); + } +#else +#ifdef _INTL_REDIRECT_MACROS +# define dgettext libintl_dgettext +#endif + extern LIBINTL_DLL_EXPORTED char *dgettext(const char *__domainname, const char *__msgid) + _INTL_ASM(libintl_dgettext) + _INTL_MAY_RETURN_STRING_ARG(2); +#endif + + /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY + locale. */ +#ifdef _INTL_REDIRECT_INLINE + extern LIBINTL_DLL_EXPORTED char *libintl_dcgettext(const char *__domainname, const char *__msgid, + int __category) + _INTL_MAY_RETURN_STRING_ARG(2); + static inline char *dcgettext(const char *__domainname, const char *__msgid, + int __category) + { + return libintl_dcgettext(__domainname, __msgid, __category); + } +#else +#ifdef _INTL_REDIRECT_MACROS +# define dcgettext libintl_dcgettext +#endif + extern LIBINTL_DLL_EXPORTED char *dcgettext(const char *__domainname, const char *__msgid, + int __category) + _INTL_ASM(libintl_dcgettext) + _INTL_MAY_RETURN_STRING_ARG(2); +#endif + + + /* Similar to `gettext' but select the plural form corresponding to the + number N. */ +#ifdef _INTL_REDIRECT_INLINE + extern LIBINTL_DLL_EXPORTED char *libintl_ngettext(const char *__msgid1, const char *__msgid2, + unsigned long int __n) + _INTL_MAY_RETURN_STRING_ARG(1) _INTL_MAY_RETURN_STRING_ARG(2); + static inline char *ngettext(const char *__msgid1, const char *__msgid2, + unsigned long int __n) + { + return libintl_ngettext(__msgid1, __msgid2, __n); + } +#else +#ifdef _INTL_REDIRECT_MACROS +# define ngettext libintl_ngettext +#endif + extern LIBINTL_DLL_EXPORTED char *ngettext(const char *__msgid1, const char *__msgid2, + unsigned long int __n) + _INTL_ASM(libintl_ngettext) + _INTL_MAY_RETURN_STRING_ARG(1) _INTL_MAY_RETURN_STRING_ARG(2); +#endif + + /* Similar to `dgettext' but select the plural form corresponding to the + number N. */ +#ifdef _INTL_REDIRECT_INLINE + extern LIBINTL_DLL_EXPORTED char *libintl_dngettext(const char *__domainname, const char *__msgid1, + const char *__msgid2, unsigned long int __n) + _INTL_MAY_RETURN_STRING_ARG(2) _INTL_MAY_RETURN_STRING_ARG(3); + static inline char *dngettext(const char *__domainname, const char *__msgid1, + const char *__msgid2, unsigned long int __n) + { + return libintl_dngettext(__domainname, __msgid1, __msgid2, __n); + } +#else +#ifdef _INTL_REDIRECT_MACROS +# define dngettext libintl_dngettext +#endif + extern LIBINTL_DLL_EXPORTED char *dngettext(const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n) + _INTL_ASM(libintl_dngettext) + _INTL_MAY_RETURN_STRING_ARG(2) _INTL_MAY_RETURN_STRING_ARG(3); +#endif + + /* Similar to `dcgettext' but select the plural form corresponding to the + number N. */ +#ifdef _INTL_REDIRECT_INLINE + extern LIBINTL_DLL_EXPORTED char *libintl_dcngettext(const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category) + _INTL_MAY_RETURN_STRING_ARG(2) _INTL_MAY_RETURN_STRING_ARG(3); + static inline char *dcngettext(const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category) + { + return libintl_dcngettext(__domainname, __msgid1, __msgid2, __n, __category); + } +#else +#ifdef _INTL_REDIRECT_MACROS +# define dcngettext libintl_dcngettext +#endif + extern LIBINTL_DLL_EXPORTED char *dcngettext(const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category) + _INTL_ASM(libintl_dcngettext) + _INTL_MAY_RETURN_STRING_ARG(2) _INTL_MAY_RETURN_STRING_ARG(3); +#endif + + + + /* Set the current default message catalog to DOMAINNAME. + If DOMAINNAME is null, return the current default. + If DOMAINNAME is "", reset to the default of "messages". */ +#ifdef _INTL_REDIRECT_INLINE + extern LIBINTL_DLL_EXPORTED char *libintl_textdomain(const char *__domainname); + static inline char *textdomain(const char *__domainname) + { + return libintl_textdomain(__domainname); + } +#else +#ifdef _INTL_REDIRECT_MACROS +# define textdomain libintl_textdomain +#endif + extern LIBINTL_DLL_EXPORTED char *textdomain(const char *__domainname) + _INTL_ASM(libintl_textdomain); +#endif + + /* Specify that the DOMAINNAME message catalog will be found + in DIRNAME rather than in the system locale data base. */ +#ifdef _INTL_REDIRECT_INLINE + extern LIBINTL_DLL_EXPORTED char *libintl_bindtextdomain(const char *__domainname, + const char *__dirname); + static inline char *bindtextdomain(const char *__domainname, + const char *__dirname) + { + return libintl_bindtextdomain(__domainname, __dirname); + } +#else +#ifdef _INTL_REDIRECT_MACROS +# define bindtextdomain libintl_bindtextdomain +#endif + extern LIBINTL_DLL_EXPORTED char *bindtextdomain(const char *__domainname, const char *__dirname) + _INTL_ASM(libintl_bindtextdomain); +#endif + + /* Specify the character encoding in which the messages from the + DOMAINNAME message catalog will be returned. */ +#ifdef _INTL_REDIRECT_INLINE + extern LIBINTL_DLL_EXPORTED char *libintl_bind_textdomain_codeset(const char *__domainname, + const char *__codeset); + static inline char *bind_textdomain_codeset(const char *__domainname, + const char *__codeset) + { + return libintl_bind_textdomain_codeset(__domainname, __codeset); + } +#else +#ifdef _INTL_REDIRECT_MACROS +# define bind_textdomain_codeset libintl_bind_textdomain_codeset +#endif + extern LIBINTL_DLL_EXPORTED char *bind_textdomain_codeset(const char *__domainname, + const char *__codeset) + _INTL_ASM(libintl_bind_textdomain_codeset); +#endif + + + + /* Support for format strings with positions in *printf(), following the + POSIX/XSI specification. + Note: These replacements for the *printf() functions are visible only + in source files that #include or #include "gettext.h". + Packages that use *printf() in source files that don't refer to _() + or gettext() but for which the format string could be the return value + of _() or gettext() need to add this #include. Oh well. */ + +#if !0 + +#include +#include + + /* Get va_list. */ +#if __STDC__ || defined __cplusplus || defined _MSC_VER +# include +#else +# include +#endif + +#undef fprintf +#define fprintf libintl_fprintf + extern LIBINTL_DLL_EXPORTED int fprintf(FILE *, const char *, ...); +#undef vfprintf +#define vfprintf libintl_vfprintf + extern LIBINTL_DLL_EXPORTED int vfprintf(FILE *, const char *, va_list); + +#undef printf +#if defined __NetBSD__ || defined __BEOS__ || defined __CYGWIN__ || defined __MINGW32__ + /* Don't break __attribute__((format(printf,M,N))). + This redefinition is only possible because the libc in NetBSD, Cygwin, + mingw does not have a function __printf__. */ +# define libintl_printf __printf__ +#endif +#define printf libintl_printf + extern LIBINTL_DLL_EXPORTED int printf(const char *, ...); +#undef vprintf +#define vprintf libintl_vprintf + extern LIBINTL_DLL_EXPORTED int vprintf(const char *, va_list); + +#undef sprintf +#define sprintf libintl_sprintf + extern LIBINTL_DLL_EXPORTED int sprintf(char *, const char *, ...); +#undef vsprintf +#define vsprintf libintl_vsprintf + extern LIBINTL_DLL_EXPORTED int vsprintf(char *, const char *, va_list); + +#if 0 + +#undef snprintf +#define snprintf libintl_snprintf + extern LIBINTL_DLL_EXPORTED int snprintf(char *, size_t, const char *, ...); +#undef vsnprintf +#define vsnprintf libintl_vsnprintf + extern LIBINTL_DLL_EXPORTED int vsnprintf(char *, size_t, const char *, va_list); + +#endif + +#if 0 + +#undef asprintf +#define asprintf libintl_asprintf + extern LIBINTL_DLL_EXPORTED int asprintf(char **, const char *, ...); +#undef vasprintf +#define vasprintf libintl_vasprintf + extern LIBINTL_DLL_EXPORTED int vasprintf(char **, const char *, va_list); + +#endif + +#if 0 + +#undef fwprintf +#define fwprintf libintl_fwprintf + extern LIBINTL_DLL_EXPORTED int fwprintf(FILE *, const wchar_t *, ...); +#undef vfwprintf +#define vfwprintf libintl_vfwprintf + extern LIBINTL_DLL_EXPORTED int vfwprintf(FILE *, const wchar_t *, va_list); + +#undef wprintf +#define wprintf libintl_wprintf + extern LIBINTL_DLL_EXPORTED int wprintf(const wchar_t *, ...); +#undef vwprintf +#define vwprintf libintl_vwprintf + extern LIBINTL_DLL_EXPORTED int vwprintf(const wchar_t *, va_list); + +#undef swprintf +#define swprintf libintl_swprintf + extern LIBINTL_DLL_EXPORTED int swprintf(wchar_t *, size_t, const wchar_t *, ...); +#undef vswprintf +#define vswprintf libintl_vswprintf + extern LIBINTL_DLL_EXPORTED int vswprintf(wchar_t *, size_t, const wchar_t *, va_list); + +#endif + +#endif + + + /* Support for relocatable packages. */ + + /* Sets the original and the current installation prefix of the package. + Relocation simply replaces a pathname starting with the original prefix + by the corresponding pathname with the current prefix instead. Both + prefixes should be directory names without trailing slash (i.e. use "" + instead of "/"). */ +#define libintl_set_relocation_prefix libintl_set_relocation_prefix + extern LIBINTL_DLL_EXPORTED void + libintl_set_relocation_prefix(const char *orig_prefix, + const char *curr_prefix); + + +#ifdef __cplusplus +} +#endif + +#endif /* libintl.h */ \ No newline at end of file diff --git a/vcpkg/ports/gettext/portfile.cmake b/vcpkg/ports/gettext/portfile.cmake new file mode 100644 index 0000000..988c2f4 --- /dev/null +++ b/vcpkg/ports/gettext/portfile.cmake @@ -0,0 +1,55 @@ +if(VCPKG_TARGET_IS_LINUX) + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + if (NOT EXISTS "/usr/include/libintl.h") + message(FATAL_ERROR "Please use command \"sudo apt-get install gettext\" to install gettext on linux.") + endif() + file(COPY ${CMAKE_CURRENT_LIST_DIR}/unofficial-gettext-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/unofficial-gettext) + return() +else() + set(VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS enabled) +endif() + +#Based on https://github.com/winlibs/gettext + +set(GETTEXT_VERSION 0.19) + +vcpkg_download_distfile(ARCHIVE + URLS "https://ftp.gnu.org/pub/gnu/gettext/gettext-${GETTEXT_VERSION}.tar.gz" "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gettext/gettext-${GETTEXT_VERSION}.tar.gz" + FILENAME "gettext-${GETTEXT_VERSION}.tar.gz" + SHA512 a5db035c582ff49d45ee6eab9466b2bef918e413a882019c204a9d8903cb3770ddfecd32c971ea7c7b037c7b69476cf7c56dcabc8b498b94ab99f132516c9922 +) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${GETTEXT_VERSION} + PATCHES + 0001-Fix-macro-definitions.patch + 0002-Fix-uwp-build.patch + 0003-Fix-win-unicode-paths.patch +) + +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_LIST_DIR}/config.win32.h + ${CMAKE_CURRENT_LIST_DIR}/config.unix.h.in + DESTINATION ${SOURCE_PATH}/gettext-runtime +) +file(REMOVE ${SOURCE_PATH}/gettext-runtime/intl/libgnuintl.h ${SOURCE_PATH}/gettext-runtime/config.h) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/libgnuintl.win32.h DESTINATION ${SOURCE_PATH}/gettext-runtime/intl) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/gettext-runtime + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-gettext TARGET_PATH share/unofficial-gettext) + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gettext) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/gettext/COPYING ${CURRENT_PACKAGES_DIR}/share/gettext/copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/gettext/unofficial-gettext-config.cmake b/vcpkg/ports/gettext/unofficial-gettext-config.cmake new file mode 100644 index 0000000..3b87214 --- /dev/null +++ b/vcpkg/ports/gettext/unofficial-gettext-config.cmake @@ -0,0 +1 @@ +add_library(unofficial::gettext::libintl INTERFACE IMPORTED) diff --git a/vcpkg/ports/gettimeofday/CMakeLists.txt b/vcpkg/ports/gettimeofday/CMakeLists.txt new file mode 100644 index 0000000..1f8d891 --- /dev/null +++ b/vcpkg/ports/gettimeofday/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.8) +project(gettimeofday C) + +add_library(gettimeofday gettimeofday.c gettimeofday.def) + +install(TARGETS gettimeofday + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib/manual-link + LIBRARY DESTINATION lib/manual-link +) + +if(CMAKE_BUILD_TYPE STREQUAL "Release") + install(FILES gettimeofday.h DESTINATION include) +endif() diff --git a/vcpkg/ports/gettimeofday/CONTROL b/vcpkg/ports/gettimeofday/CONTROL new file mode 100644 index 0000000..d1b85e0 --- /dev/null +++ b/vcpkg/ports/gettimeofday/CONTROL @@ -0,0 +1,3 @@ +Source: gettimeofday +Version: 2017-10-14-3 +Description: An implementation of gettimeofday for WIN32 diff --git a/vcpkg/ports/gettimeofday/LICENSE b/vcpkg/ports/gettimeofday/LICENSE new file mode 100644 index 0000000..57c986d --- /dev/null +++ b/vcpkg/ports/gettimeofday/LICENSE @@ -0,0 +1,33 @@ +/* + * Copied from PostgreSQL source: + * http://doxygen.postgresql.org/gettimeofday_8c_source.html + * + */ + +/* + * gettimeofday.c + * Win32 gettimeofday() replacement + * + * src/port/gettimeofday.c + * + * Copyright (c) 2003 SRA, Inc. + * Copyright (c) 2003 SKC, Inc. + * + * Permission to use, copy, modify, and distribute this software and + * its documentation for any purpose, without fee, and without a + * written agreement is hereby granted, provided that the above + * copyright notice and this paragraph and the following two + * paragraphs appear in all copies. + * + * IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, + * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING + * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS + * DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + * THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS + * IS" BASIS, AND THE AUTHOR HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, + * SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + */ diff --git a/vcpkg/ports/gettimeofday/gettimeofday.c b/vcpkg/ports/gettimeofday/gettimeofday.c new file mode 100644 index 0000000..62abf34 --- /dev/null +++ b/vcpkg/ports/gettimeofday/gettimeofday.c @@ -0,0 +1,67 @@ +/* + * Copied from PostgreSQL source: + * http://doxygen.postgresql.org/gettimeofday_8c_source.html + * + */ + +/* + * gettimeofday.c + * Win32 gettimeofday() replacement + * + * src/port/gettimeofday.c + * + * Copyright (c) 2003 SRA, Inc. + * Copyright (c) 2003 SKC, Inc. + * + * Permission to use, copy, modify, and distribute this software and + * its documentation for any purpose, without fee, and without a + * written agreement is hereby granted, provided that the above + * copyright notice and this paragraph and the following two + * paragraphs appear in all copies. + * + * IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, + * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING + * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS + * DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + * THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS + * IS" BASIS, AND THE AUTHOR HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, + * SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + */ + +#ifdef _MSC_VER + +#include + + +/* FILETIME of Jan 1 1970 00:00:00. */ +static const unsigned __int64 epoch = 116444736000000000Ui64; + +/* + * timezone information is stored outside the kernel so tzp isn't used anymore. + * + * Note: this function is not for Win32 high precision timing purpose. See + * elapsed_time(). + */ +int +gettimeofday(struct timeval * tp, struct timezone * tzp) +{ + FILETIME file_time; + SYSTEMTIME system_time; + ULARGE_INTEGER ularge; + + GetSystemTime(&system_time); + SystemTimeToFileTime(&system_time, &file_time); + ularge.LowPart = file_time.dwLowDateTime; + ularge.HighPart = file_time.dwHighDateTime; + + tp->tv_sec = (long) ((ularge.QuadPart - epoch) / 10000000L); + tp->tv_usec = (long) (system_time.wMilliseconds * 1000); + + return 0; +} + +#endif /* _MSC_VER */ diff --git a/vcpkg/ports/gettimeofday/gettimeofday.def b/vcpkg/ports/gettimeofday/gettimeofday.def new file mode 100644 index 0000000..7a46b86 --- /dev/null +++ b/vcpkg/ports/gettimeofday/gettimeofday.def @@ -0,0 +1,2 @@ +EXPORTS + gettimeofday diff --git a/vcpkg/ports/gettimeofday/gettimeofday.h b/vcpkg/ports/gettimeofday/gettimeofday.h new file mode 100644 index 0000000..2273175 --- /dev/null +++ b/vcpkg/ports/gettimeofday/gettimeofday.h @@ -0,0 +1,13 @@ +#ifndef _MY_GETTIMEOFDAY_H_ +#define _MY_GETTIMEOFDAY_H_ + +#ifdef _MSC_VER + +#include +#include + +int gettimeofday(struct timeval * tp, struct timezone * tzp); + +#endif /* _MSC_VER */ + +#endif /* _MY_GETTIMEOFDAY_H_ */ diff --git a/vcpkg/ports/gettimeofday/portfile.cmake b/vcpkg/ports/gettimeofday/portfile.cmake new file mode 100644 index 0000000..0d08bac --- /dev/null +++ b/vcpkg/ports/gettimeofday/portfile.cmake @@ -0,0 +1,9 @@ +vcpkg_configure_cmake( + SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/gflags/0001-patch-dir.patch b/vcpkg/ports/gflags/0001-patch-dir.patch new file mode 100644 index 0000000..d3aaa00 --- /dev/null +++ b/vcpkg/ports/gflags/0001-patch-dir.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3709073..8e919cb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -503,7 +503,7 @@ endif () + # ---------------------------------------------------------------------------- + # installation rules + set (EXPORT_NAME ${PACKAGE_NAME}-targets) +-file (RELATIVE_PATH INSTALL_PREFIX_REL2CONFIG_DIR "${CMAKE_INSTALL_PREFIX}/${CONFIG_INSTALL_DIR}" "${CMAKE_INSTALL_PREFIX}") ++set (INSTALL_PREFIX_REL2CONFIG_DIR "../..") + configure_file (cmake/config.cmake.in "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-config-install.cmake" @ONLY) + configure_file (cmake/version.cmake.in "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-config-version.cmake" @ONLY) + diff --git a/vcpkg/ports/gflags/CONTROL b/vcpkg/ports/gflags/CONTROL new file mode 100644 index 0000000..f2b9307 --- /dev/null +++ b/vcpkg/ports/gflags/CONTROL @@ -0,0 +1,5 @@ +Source: gflags +Version: 2.2.2-1 +Homepage: https://github.com/gflags/gflags +Description: A C++ library that implements commandline flags processing +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/gflags/fix_cmake_config.patch b/vcpkg/ports/gflags/fix_cmake_config.patch new file mode 100644 index 0000000..bea561e --- /dev/null +++ b/vcpkg/ports/gflags/fix_cmake_config.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/config.cmake.in b/cmake/config.cmake.in +index a512c2a..e7f50d0 100644 +--- a/cmake/config.cmake.in ++++ b/cmake/config.cmake.in +@@ -78,7 +78,7 @@ if (NOT DEFINED @PACKAGE_PREFIX@_NOTHREADS) + else () + set (@PACKAGE_PREFIX@_NOTHREADS FALSE) + endif () +- elseif (TARGET ${@PACKAGE_PREFIX@_TARGET_PREFIX}PACKAGE_NAME@_static OR TARGET ${@PACKAGE_PREFIX@_TARGET_PREFIX}@PACKAGE_NAME@_shared) ++ elseif (TARGET ${@PACKAGE_PREFIX@_TARGET_PREFIX}@PACKAGE_NAME@_static OR TARGET ${@PACKAGE_PREFIX@_TARGET_PREFIX}@PACKAGE_NAME@_shared) + set (@PACKAGE_PREFIX@_NOTHREADS FALSE) + else () + set (@PACKAGE_PREFIX@_NOTHREADS TRUE) diff --git a/vcpkg/ports/gflags/portfile.cmake b/vcpkg/ports/gflags/portfile.cmake new file mode 100644 index 0000000..87053f8 --- /dev/null +++ b/vcpkg/ports/gflags/portfile.cmake @@ -0,0 +1,40 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO gflags/gflags + REF v2.2.2 + SHA512 98c4703aab24e81fe551f7831ab797fb73d0f7dfc516addb34b9ff6d0914e5fd398207889b1ae555bac039537b1d4677067dae403b64903577078d99c1bdb447 + HEAD_REF master + PATCHES + 0001-patch-dir.patch # gflags was estimating a wrong relative path between the gflags-config.cmake file and the include path; "../.." goes from share/gflags/ to the triplet root + fix_cmake_config.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DGFLAGS_REGISTER_BUILD_DIR:BOOL=OFF + -DGFLAGS_REGISTER_INSTALL_PREFIX:BOOL=OFF + -DBUILD_gflags_nothreads_LIB:BOOL=OFF + -DCMAKE_DEBUG_POSTFIX=d +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/gflags) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/gflags RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/gherkin-c/CONTROL b/vcpkg/ports/gherkin-c/CONTROL new file mode 100644 index 0000000..e153318 --- /dev/null +++ b/vcpkg/ports/gherkin-c/CONTROL @@ -0,0 +1,3 @@ +Source: gherkin-c +Version: 2019-10-07-1 +Description: Gherkin parser/compiler in C diff --git a/vcpkg/ports/gherkin-c/portfile.cmake b/vcpkg/ports/gherkin-c/portfile.cmake new file mode 100644 index 0000000..adb1307 --- /dev/null +++ b/vcpkg/ports/gherkin-c/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO c-libs/gherkin-c + REF dd180edc7d092311f2e90a0c4957061156d39dd3 + SHA512 c6b38ab0e7a0fd1061d86b0ff9d9140f8c3d6f15cfc1673e947254c6c03a66d3e6aae5b267b074aa10fa30ba2850190c9e9ea7c12e340e4f8c5575b9bf31bab3 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_GHERKIN_TESTS=OFF +) +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/gherkin-c RENAME copyright) diff --git a/vcpkg/ports/giflib/CMakeLists.txt b/vcpkg/ports/giflib/CMakeLists.txt new file mode 100644 index 0000000..a5b084f --- /dev/null +++ b/vcpkg/ports/giflib/CMakeLists.txt @@ -0,0 +1,31 @@ +cmake_minimum_required(VERSION 3.4) + +project(giflib C) + +set(GIFLIB_HEADERS + lib/gif_lib.h +) + +set(GIFLIB_SOURCES + lib/dgif_lib.c + lib/egif_lib.c + lib/gif_err.c + lib/gif_font.c + lib/gif_hash.c + lib/gifalloc.c + lib/openbsd-reallocarray.c + lib/quantize.c +) + +add_definitions(-D_CRT_SECURE_NO_WARNINGS) +add_library(gif ${GIFLIB_SOURCES}) + +if (NOT GIFLIB_SKIP_HEADERS) + install(FILES ${GIFLIB_HEADERS} DESTINATION include) +endif () + +install(TARGETS gif + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) diff --git a/vcpkg/ports/giflib/CONTROL b/vcpkg/ports/giflib/CONTROL new file mode 100644 index 0000000..5361fc1 --- /dev/null +++ b/vcpkg/ports/giflib/CONTROL @@ -0,0 +1,4 @@ +Source: giflib +Version: 5.1.4-6 +Homepage: https://sourceforge.net/projects/giflib/ +Description: A library for reading and writing gif images. diff --git a/vcpkg/ports/giflib/fix-compile-error.patch b/vcpkg/ports/giflib/fix-compile-error.patch new file mode 100644 index 0000000..93cf467 --- /dev/null +++ b/vcpkg/ports/giflib/fix-compile-error.patch @@ -0,0 +1,76 @@ +diff --git a/lib/dgif_lib.c b/lib/dgif_lib.c +index fddc0d2..7a6ab9c 100644 +--- a/lib/dgif_lib.c ++++ b/lib/dgif_lib.c +@@ -54,7 +54,7 @@ DGifOpenFileName(const char *FileName, int *Error) + int FileHandle; + GifFileType *GifFile; + +- if ((FileHandle = open(FileName, O_RDONLY)) == -1) { ++ if ((FileHandle = _open(FileName, O_RDONLY)) == -1) { + if (Error != NULL) + *Error = D_GIF_ERR_OPEN_FAILED; + return NULL; +@@ -81,7 +81,7 @@ DGifOpenFileHandle(int FileHandle, int *Error) + if (GifFile == NULL) { + if (Error != NULL) + *Error = D_GIF_ERR_NOT_ENOUGH_MEM; +- (void)close(FileHandle); ++ (void)_close(FileHandle); + return NULL; + } + +@@ -95,7 +95,7 @@ DGifOpenFileHandle(int FileHandle, int *Error) + if (Private == NULL) { + if (Error != NULL) + *Error = D_GIF_ERR_NOT_ENOUGH_MEM; +- (void)close(FileHandle); ++ (void)_close(FileHandle); + free((char *)GifFile); + return NULL; + } +@@ -106,7 +106,7 @@ DGifOpenFileHandle(int FileHandle, int *Error) + _setmode(FileHandle, O_BINARY); /* Make sure it is in binary mode. */ + #endif /* _WIN32 */ + +- f = fdopen(FileHandle, "rb"); /* Make it into a stream: */ ++ f = _fdopen(FileHandle, "rb"); /* Make it into a stream: */ + + /*@-mustfreeonly@*/ + GifFile->Private = (void *)Private; +diff --git a/lib/egif_lib.c b/lib/egif_lib.c +index f30b61b..18dc4a2 100644 +--- a/lib/egif_lib.c ++++ b/lib/egif_lib.c +@@ -60,10 +60,10 @@ EGifOpenFileName(const char *FileName, const bool TestExistence, int *Error) + GifFileType *GifFile; + + if (TestExistence) +- FileHandle = open(FileName, O_WRONLY | O_CREAT | O_EXCL, ++ FileHandle = _open(FileName, O_WRONLY | O_CREAT | O_EXCL, + S_IREAD | S_IWRITE); + else +- FileHandle = open(FileName, O_WRONLY | O_CREAT | O_TRUNC, ++ FileHandle = _open(FileName, O_WRONLY | O_CREAT | O_TRUNC, + S_IREAD | S_IWRITE); + + if (FileHandle == -1) { +@@ -73,7 +73,7 @@ EGifOpenFileName(const char *FileName, const bool TestExistence, int *Error) + } + GifFile = EGifOpenFileHandle(FileHandle, Error); + if (GifFile == (GifFileType *) NULL) +- (void)close(FileHandle); ++ (void)_close(FileHandle); + return GifFile; + } + +@@ -118,7 +118,7 @@ EGifOpenFileHandle(const int FileHandle, int *Error) + _setmode(FileHandle, O_BINARY); /* Make sure it is in binary mode. */ + #endif /* _WIN32 */ + +- f = fdopen(FileHandle, "wb"); /* Make it into a stream: */ ++ f = _fdopen(FileHandle, "wb"); /* Make it into a stream: */ + + GifFile->Private = (void *)Private; + Private->FileHandle = FileHandle; + diff --git a/vcpkg/ports/giflib/msvc-guard-unistd-h.patch b/vcpkg/ports/giflib/msvc-guard-unistd-h.patch new file mode 100644 index 0000000..5140e6e --- /dev/null +++ b/vcpkg/ports/giflib/msvc-guard-unistd-h.patch @@ -0,0 +1,52 @@ +diff -Naur a/lib/dgif_lib.c b/lib/dgif_lib.c +--- a/lib/dgif_lib.c 2016-04-02 21:34:00.000000000 +0600 ++++ b/lib/dgif_lib.c 2017-04-21 07:06:48.781271400 +0700 +@@ -12,7 +12,9 @@ + #include + #include + #include ++#ifndef _MSC_VER + #include ++#endif + #include + #include + +diff -Naur a/lib/egif_lib.c b/lib/egif_lib.c +--- a/lib/egif_lib.c 2016-01-22 16:36:36.000000000 +0600 ++++ b/lib/egif_lib.c 2017-04-21 07:07:08.728159900 +0700 +@@ -8,7 +8,9 @@ + + *****************************************************************************/ + ++#ifndef _MSC_VER + #include ++#endif + #include + #include + #include +diff -Naur a/lib/gif_hash.c b/lib/gif_hash.c +--- a/lib/gif_hash.c 2014-05-16 17:46:53.000000000 +0700 ++++ b/lib/gif_hash.c 2017-04-21 07:07:17.718719500 +0700 +@@ -11,7 +11,9 @@ + + *****************************************************************************/ + ++#ifndef _MSC_VER + #include ++#endif + #include + #include + #include +diff -Naur a/lib/gif_hash.h b/lib/gif_hash.h +--- a/lib/gif_hash.h 2014-05-16 17:46:53.000000000 +0700 ++++ b/lib/gif_hash.h 2017-04-21 07:07:32.316346800 +0700 +@@ -7,7 +7,9 @@ + #ifndef _GIF_HASH_H_ + #define _GIF_HASH_H_ + ++#ifndef _MSC_VER + #include ++#endif + #include + + #define HT_SIZE 8192 /* 12bits = 4096 or twice as big! */ diff --git a/vcpkg/ports/giflib/portfile.cmake b/vcpkg/ports/giflib/portfile.cmake new file mode 100644 index 0000000..dfca62d --- /dev/null +++ b/vcpkg/ports/giflib/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +set(GIFLIB_VERSION 5.1.4) + +if (VCPKG_TARGET_IS_WINDOWS) + set(ADDITIONAL_PATCH "fix-compile-error.patch") +endif() + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO "giflib" + FILENAME "giflib-${GIFLIB_VERSION}.tar.bz2" + SHA512 32b5e342056c210e6478e9cb3b6ceec9594dcfaf34feea1eb4dad633a081ed4465bceee578c19165907cb47cb83912ac359ceea666a8e07dbbb5420f9928f96d + PATCHES + msvc-guard-unistd-h.patch + ${ADDITIONAL_PATCH} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DGIFLIB_SKIP_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/giflib RENAME copyright) diff --git a/vcpkg/ports/gl2ps/CONTROL b/vcpkg/ports/gl2ps/CONTROL new file mode 100644 index 0000000..deb9483 --- /dev/null +++ b/vcpkg/ports/gl2ps/CONTROL @@ -0,0 +1,5 @@ +Source: gl2ps +Version: 1.4.0-3 +Homepage: https://gitlab.onelab.info/gl2ps/gl2ps +Description: OpenGL to PostScript Printing Library +Build-Depends: freeglut, zlib, libpng diff --git a/vcpkg/ports/gl2ps/portfile.cmake b/vcpkg/ports/gl2ps/portfile.cmake new file mode 100644 index 0000000..eaee562 --- /dev/null +++ b/vcpkg/ports/gl2ps/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) + +vcpkg_from_gitlab( + GITLAB_URL http://gitlab.onelab.info + OUT_SOURCE_PATH SOURCE_PATH + REPO gl2ps/gl2ps + REF gl2ps_1_4_0 + SHA512 ee10e3fd312eae896934c39b8d115f28017874f918e4dd3350ca8f7cbf47dfc44101a5c6eb8826707620fcc336ca51ddc4eb7bf653af4b27651277625bac3cce + HEAD_REF master + PATCHES separate-static-dynamic-build.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING.GL2PS DESTINATION ${CURRENT_PACKAGES_DIR}/share/gl2ps RENAME copyright) +file(INSTALL ${SOURCE_PATH}/COPYING.LGPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/gl2ps RENAME copyright.LGPL) diff --git a/vcpkg/ports/gl2ps/separate-static-dynamic-build.patch b/vcpkg/ports/gl2ps/separate-static-dynamic-build.patch new file mode 100644 index 0000000..fe2267e --- /dev/null +++ b/vcpkg/ports/gl2ps/separate-static-dynamic-build.patch @@ -0,0 +1,214 @@ +diff --git "a/CMakeLists.txt" "b/CMakeLists.txt" +index 40da57e..39acf6b 100644 +--- "a/CMakeLists.txt" ++++ "b/CMakeLists.txt" +@@ -1,34 +1,34 @@ + # GL2PS, an OpenGL to PostScript Printing Library + # Copyright (C) 1999-2017 C. Geuzaine +-# ++# + # This program is free software; you can redistribute it and/or + # modify it under the terms of either: +-# ++# + # a) the GNU Library General Public License as published by the Free + # Software Foundation, either version 2 of the License, or (at your + # option) any later version; or +-# ++# + # b) the GL2PS License as published by Christophe Geuzaine, either + # version 2 of the License, or (at your option) any later version. +-# ++# + # This program is distributed in the hope that it will be useful, but + # WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either + # the GNU Library General Public License or the GL2PS License for + # more details. +-# ++# + # You should have received a copy of the GNU Library General Public + # License along with this library in the file named "COPYING.LGPL"; + # if not, write to the Free Software Foundation, Inc., 675 Mass Ave, + # Cambridge, MA 02139, USA. +-# ++# + # You should have received a copy of the GL2PS License with this + # library in the file named "COPYING.GL2PS"; if not, I will be glad + # to provide one. +-# ++# + # For the latest info about gl2ps and a full list of contributors, + # see http://www.geuz.org/gl2ps/. +-# ++# + # Please report all bugs and problems to . + + cmake_minimum_required(VERSION 2.4 FATAL_ERROR) +@@ -55,8 +55,8 @@ set(GL2PS_EXTRA_VERSION "" CACHE STRING "GL2PS extra version string") + set(GL2PS_VERSION "${GL2PS_MAJOR_VERSION}.${GL2PS_MINOR_VERSION}") + set(GL2PS_VERSION "${GL2PS_VERSION}.${GL2PS_PATCH_VERSION}${GL2PS_EXTRA_VERSION}") + +-execute_process(COMMAND date "+%Y%m%d" OUTPUT_VARIABLE DATE +- OUTPUT_STRIP_TRAILING_WHITESPACE) ++execute_process(COMMAND date "+%Y%m%d" OUTPUT_VARIABLE DATE ++OUTPUT_STRIP_TRAILING_WHITESPACE) + if(NOT DATE) + set(DATE "unknown") + endif(NOT DATE) +@@ -113,84 +113,93 @@ endif(MATH_LIBRARY) + + include_directories(${EXTERNAL_INCLUDES}) + +-if(OPENGL_FOUND) +- add_library(lib STATIC gl2ps.c gl2ps.h) +- set_target_properties(lib PROPERTIES OUTPUT_NAME gl2ps) +- +- add_library(shared SHARED gl2ps.c gl2ps.h) +- target_link_libraries(shared ${EXTERNAL_LIBRARIES}) +- set_target_properties(shared PROPERTIES OUTPUT_NAME gl2ps) +- set_target_properties(shared PROPERTIES +- VERSION ${GL2PS_MAJOR_VERSION}.${GL2PS_MINOR_VERSION}.${GL2PS_PATCH_VERSION} +- SOVERSION ${GL2PS_MAJOR_VERSION}) +- if(MSVC) +- set_target_properties(shared PROPERTIES COMPILE_FLAGS "-DGL2PSDLL -DGL2PSDLL_EXPORTS") +- endif(MSVC) +- +- install(TARGETS lib shared DESTINATION lib${LIB_SUFFIX}) +-endif(OPENGL_FOUND) ++ ++add_library(gl2ps gl2ps.c gl2ps.h) ++target_link_libraries(gl2ps ${EXTERNAL_LIBRARIES}) ++set_target_properties(gl2ps PROPERTIES ++ VERSION ${GL2PS_MAJOR_VERSION}.${GL2PS_MINOR_VERSION}.${GL2PS_PATCH_VERSION} ++SOVERSION ${GL2PS_MAJOR_VERSION}) ++ ++if(BUILD_SHARED_LIBS) ++ target_compile_definitions(gl2ps PRIVATE -DGL2PSDLL -DGL2PSDLL_EXPORTS) ++endif() ++ ++install( ++ TARGETS gl2ps ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) ++ + + if(WIN32) +- set(GL2PS_DOC .) ++ set(GL2PS_DOC share/gl2ps/docs) + else(WIN32) + set(GL2PS_DOC share/doc/gl2ps) + endif(WIN32) + ++if(NOT DISABLE_INSTALL_HEADERS) + install(FILES gl2ps.h DESTINATION include) + install(FILES ${CMAKE_SOURCE_DIR}/README.txt DESTINATION ${GL2PS_DOC}) + install(FILES ${CMAKE_SOURCE_DIR}/COPYING.LGPL DESTINATION ${GL2PS_DOC}) + install(FILES ${CMAKE_SOURCE_DIR}/COPYING.GL2PS DESTINATION ${GL2PS_DOC}) + install(FILES ${CMAKE_SOURCE_DIR}/gl2psTest.c DESTINATION ${GL2PS_DOC}) + install(FILES ${CMAKE_SOURCE_DIR}/gl2psTestSimple.c DESTINATION ${GL2PS_DOC}) ++endif() ++ ++if(BUILD_TESTS) ++ ++ if(GLUT_FOUND) ++ add_executable(gl2psTest gl2psTest.c) ++ target_link_libraries(gl2psTest gl2ps ${EXTERNAL_LIBRARIES}) ++ add_executable(gl2psTestSimple gl2psTestSimple.c) ++ target_link_libraries(gl2psTestSimple gl2ps ${EXTERNAL_LIBRARIES}) ++ endif(GLUT_FOUND) ++ ++ find_package(LATEX) ++ if(PDFLATEX_COMPILER) ++ add_custom_command(OUTPUT gl2ps.pdf DEPENDS gl2ps.tex ++ COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex ++ COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex ++ COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex ++ COMMAND ${CMAKE_COMMAND} -E copy gl2ps.pdf ${CMAKE_SOURCE_DIR}) ++ add_custom_target(pdf ALL DEPENDS gl2ps.pdf) ++ install(FILES gl2ps.pdf DESTINATION ${GL2PS_DOC}) ++ find_program(TTH tth) ++ if(TTH) ++ add_custom_command(OUTPUT gl2ps.html DEPENDS gl2ps.tex gl2ps.pdf ++ COMMAND ${CMAKE_COMMAND} -E copy_if_different ++ ${CMAKE_SOURCE_DIR}/gl2ps.tex ${CMAKE_BINARY_DIR}/gl2ps.tex ++ COMMAND ${TTH} ARGS -w1 gl2ps.tex) ++ add_custom_target(html DEPENDS gl2ps.html) ++ endif(TTH) ++ endif(PDFLATEX_COMPILER) ++ ++endif() + +-if(GLUT_FOUND) +- add_executable(gl2psTest WIN32 gl2psTest.c) +- target_link_libraries(gl2psTest lib ${EXTERNAL_LIBRARIES}) +- add_executable(gl2psTestSimple WIN32 gl2psTestSimple.c) +- target_link_libraries(gl2psTestSimple lib ${EXTERNAL_LIBRARIES}) +-endif(GLUT_FOUND) +- +-find_package(LATEX) +-if(PDFLATEX_COMPILER) +- add_custom_command(OUTPUT gl2ps.pdf DEPENDS gl2ps.tex +- COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex +- COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex +- COMMAND ${PDFLATEX_COMPILER} ARGS ${CMAKE_SOURCE_DIR}/gl2ps.tex +- COMMAND ${CMAKE_COMMAND} -E copy gl2ps.pdf ${CMAKE_SOURCE_DIR}) +- add_custom_target(pdf ALL DEPENDS gl2ps.pdf) +- install(FILES gl2ps.pdf DESTINATION ${GL2PS_DOC}) +- find_program(TTH tth) +- if(TTH) +- add_custom_command(OUTPUT gl2ps.html DEPENDS gl2ps.tex gl2ps.pdf +- COMMAND ${CMAKE_COMMAND} -E copy_if_different +- ${CMAKE_SOURCE_DIR}/gl2ps.tex ${CMAKE_BINARY_DIR}/gl2ps.tex +- COMMAND ${TTH} ARGS -w1 gl2ps.tex) +- add_custom_target(html DEPENDS gl2ps.html) +- endif(TTH) +-endif(PDFLATEX_COMPILER) + + set(CPACK_PACKAGE_VENDOR "Christophe Geuzaine") + set(CPACK_PACKAGE_VERSION_MAJOR ${GL2PS_MAJOR_VERSION}) + set(CPACK_PACKAGE_VERSION_MINOR ${GL2PS_MINOR_VERSION}) + set(CPACK_PACKAGE_VERSION_PATCH ${GL2PS_PATCH_VERSION}) + set(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_SOURCE_DIR}/README.txt) +-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY +- "An OpenGL to PostScript (and PDF, and SVG...) printing library") +-set(CPACK_PACKAGE_FILE_NAME gl2ps-${GL2PS_VERSION}-${GL2PS_OS}) +-set(CPACK_PACKAGE_INSTALL_DIRECTORY "gl2ps") +-set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/COPYING.LGPL) +-set(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README.txt) +-set(CPACK_RESOURCE_FILE_WELCOME ${CMAKE_SOURCE_DIR}/README.txt) +-set(CPACK_PACKAGE_EXECUTABLE "gl2ps;gl2ps") +-set(CPACK_STRIP_FILES TRUE) +-set(CPACK_SOURCE_PACKAGE_FILE_NAME gl2ps-${GL2PS_VERSION}-source) +-set(CPACK_SOURCE_GENERATOR TGZ) +-set(CPACK_SOURCE_IGNORE_FILES "TODO.txt" "${CMAKE_BINARY_DIR}" "/CVS/" +- "/.svn" "~$" "DS_Store$" "/tmp/" "/bin/" "/lib/") +-if(WIN32) +- set(CPACK_GENERATOR ZIP) +-else(WIN32) +- set(CPACK_GENERATOR TGZ) +-endif(WIN32) +- +-include(CPack) ++set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ++ "An OpenGL to PostScript (and PDF, and SVG...) printing library") ++ set(CPACK_PACKAGE_FILE_NAME gl2ps-${GL2PS_VERSION}-${GL2PS_OS}) ++ set(CPACK_PACKAGE_INSTALL_DIRECTORY "gl2ps") ++ set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/COPYING.LGPL) ++ set(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README.txt) ++ set(CPACK_RESOURCE_FILE_WELCOME ${CMAKE_SOURCE_DIR}/README.txt) ++ set(CPACK_PACKAGE_EXECUTABLE "gl2ps;gl2ps") ++ set(CPACK_STRIP_FILES TRUE) ++ set(CPACK_SOURCE_PACKAGE_FILE_NAME gl2ps-${GL2PS_VERSION}-source) ++ set(CPACK_SOURCE_GENERATOR TGZ) ++ set(CPACK_SOURCE_IGNORE_FILES "TODO.txt" "${CMAKE_BINARY_DIR}" "/CVS/" ++ "/.svn" "~$" "DS_Store$" "/tmp/" "/bin/" "/lib/") ++ if(WIN32) ++ set(CPACK_GENERATOR ZIP) ++ else(WIN32) ++ set(CPACK_GENERATOR TGZ) ++ endif(WIN32) ++ ++ # include(CPack) diff --git a/vcpkg/ports/gl3w/0001-enable-shared-build.patch b/vcpkg/ports/gl3w/0001-enable-shared-build.patch new file mode 100644 index 0000000..f43437e --- /dev/null +++ b/vcpkg/ports/gl3w/0001-enable-shared-build.patch @@ -0,0 +1,60 @@ +From 5f482a64c642f830f1d25f8abae7cae6dd2c6c2b Mon Sep 17 00:00:00 2001 +From: Stanislav Ershov +Date: Mon, 8 Jan 2018 03:16:07 +0300 +Subject: [PATCH] enable shared build + +--- + gl3w_gen.py | 18 ++++++++++++------ + 1 file changed, 12 insertions(+), 6 deletions(-) + +diff --git a/gl3w_gen.py b/gl3w_gen.py +index 611331a..3515cf9 100755 +--- a/gl3w_gen.py ++++ b/gl3w_gen.py +@@ -130,6 +130,10 @@ with open(os.path.join(args.root, 'include/GL/gl3w.h'), 'wb') as f: + + #include + ++#ifndef GL3W_API ++ #define GL3W_API ++#endif ++ + #ifndef __gl_h_ + #define __gl_h_ + #endif +@@ -147,10 +151,10 @@ typedef void (*GL3WglProc)(void); + typedef GL3WglProc (*GL3WGetProcAddressProc)(const char *proc); + + /* gl3w api */ +-int gl3wInit(void); +-int gl3wInit2(GL3WGetProcAddressProc proc); +-int gl3wIsSupported(int major, int minor); +-GL3WglProc gl3wGetProcAddress(const char *proc); ++GL3W_API int gl3wInit(void); ++GL3W_API int gl3wInit2(GL3WGetProcAddressProc proc); ++GL3W_API int gl3wIsSupported(int major, int minor); ++GL3W_API GL3WglProc gl3wGetProcAddress(const char *proc); + + /* gl3w internal state */ + ''') +@@ -162,7 +168,7 @@ GL3WglProc gl3wGetProcAddress(const char *proc); + write(f, r''' } gl; + }; + +-extern union GL3WProcs gl3wProcs; ++GL3W_API extern union GL3WProcs gl3wProcs; + + /* OpenGL functions */ + ''') +@@ -329,7 +333,7 @@ static const char *proc_names[] = { + write(f, '\t"{0}",\n'.format(proc)) + write(f, r'''}; + +-union GL3WProcs gl3wProcs; ++GL3W_API union GL3WProcs gl3wProcs; + + static void load_procs(GL3WGetProcAddressProc proc) + { +-- +2.15.0.windows.1 + diff --git a/vcpkg/ports/gl3w/CMakeLists.txt b/vcpkg/ports/gl3w/CMakeLists.txt new file mode 100644 index 0000000..41f75b2 --- /dev/null +++ b/vcpkg/ports/gl3w/CMakeLists.txt @@ -0,0 +1,40 @@ +cmake_minimum_required(VERSION 3.9) +project(gl3w C) + +find_package(OpenGL REQUIRED) +find_path(GLCOREARB_H NAMES GL/glcorearb.h) + +add_library(gl3w src/gl3w.c) + +target_include_directories(gl3w + PUBLIC + $ + $ + PRIVATE + ${GLCOREARB_H} + ${OPENGL_INCLUDE_DIR} +) + +if(BUILD_SHARED_LIBS) + target_compile_definitions(gl3w PRIVATE "-DGL3W_API=__declspec(dllexport)") +endif() + +target_link_libraries(gl3w PRIVATE ${OPENGL_LIBRARIES}) + +install(TARGETS gl3w + EXPORT gl3wExport + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install( + EXPORT gl3wExport + FILE gl3wConfig.cmake + NAMESPACE unofficial::gl3w:: + DESTINATION share/gl3w +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES include/GL/gl3w.h DESTINATION include/GL) +endif() diff --git a/vcpkg/ports/gl3w/CONTROL b/vcpkg/ports/gl3w/CONTROL new file mode 100644 index 0000000..02550fd --- /dev/null +++ b/vcpkg/ports/gl3w/CONTROL @@ -0,0 +1,5 @@ +Source: gl3w +Version: 2018-05-31-2 +Homepage: https://github.com/skaslev/gl3w +Description: Simple OpenGL core profile loading +Build-Depends: opengl-registry diff --git a/vcpkg/ports/gl3w/portfile.cmake b/vcpkg/ports/gl3w/portfile.cmake new file mode 100644 index 0000000..d53fc61 --- /dev/null +++ b/vcpkg/ports/gl3w/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO skaslev/gl3w + REF 99ed321100d37032cb6bfa7dd8dea85f10c86132 + SHA512 217f65644c73c33383b09893fa5ede066cc4b1cddab051feac11d7e939dba14ed637b297ea42a0426bc0a1a3bc665998a91c27ca10d28704ce9e2d3d90e73595 + HEAD_REF master + PATCHES + 0001-enable-shared-build.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CURRENT_INSTALLED_DIR}/include/GL/glcorearb.h DESTINATION ${SOURCE_PATH}/include/GL) + +vcpkg_find_acquire_program(PYTHON3) + +vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${SOURCE_PATH}/gl3w_gen.py + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME gl3w-gen +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(HEADER ${CURRENT_PACKAGES_DIR}/include/GL/gl3w.h) + file(READ ${HEADER} _contents) + string(REPLACE "#define GL3W_API" "#define GL3W_API __declspec(dllimport)" _contents "${_contents}") + file(WRITE ${HEADER} "${_contents}") +endif() + +file(INSTALL ${SOURCE_PATH}/UNLICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/gl3w RENAME copyright) diff --git a/vcpkg/ports/glad/CONTROL b/vcpkg/ports/glad/CONTROL new file mode 100644 index 0000000..a0d234f --- /dev/null +++ b/vcpkg/ports/glad/CONTROL @@ -0,0 +1,5 @@ +Source: glad +Version: 0.1.33-1 +Description: Multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs. +Build-Depends: egl-registry, opengl-registry +Homepage: https://github.com/Dav1dde/glad diff --git a/vcpkg/ports/glad/encoding.patch b/vcpkg/ports/glad/encoding.patch new file mode 100644 index 0000000..0497cc7 --- /dev/null +++ b/vcpkg/ports/glad/encoding.patch @@ -0,0 +1,13 @@ +diff --git a/glad/__main__.py b/glad/__main__.py +index e7c0544a5..1e10dcc60 100644 +--- a/glad/__main__.py ++++ b/glad/__main__.py +@@ -32,7 +32,7 @@ def main(): + if reproducible: + logger.info('reproducible build, using packaged specification: \'%s.xml\'', value) + try: +- return spec_cls.from_file(glad.files.open_local(value + '.xml')) ++ return spec_cls.from_file(glad.files.open_local(value + '.xml', encoding='utf-8-sig')) + except IOError: + raise ValueError('unable to open reproducible copy of {}.xml, ' + 'try dropping --reproducible'.format(value)) diff --git a/vcpkg/ports/glad/portfile.cmake b/vcpkg/ports/glad/portfile.cmake new file mode 100644 index 0000000..f94037d --- /dev/null +++ b/vcpkg/ports/glad/portfile.cmake @@ -0,0 +1,43 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Dav1dde/glad + REF de6c39e3040c987323b8ed078c36442f4fb681b3 + SHA512 a24523186d59de5c0895791c639c62573eaacf1d3843d3bf81eba848b4a33a9a8d17f9b6f791202dac77692bf147e25b3650989731d5ddb7a22e7d023b66885e + HEAD_REF master + PATCHES encoding.patch +) + +vcpkg_find_acquire_program(PYTHON3) + +file(COPY + ${CURRENT_INSTALLED_DIR}/include/KHR/khrplatform.h + ${CURRENT_INSTALLED_DIR}/share/egl-registry/egl.xml + ${CURRENT_INSTALLED_DIR}/share/opengl-registry/gl.xml + ${CURRENT_INSTALLED_DIR}/share/opengl-registry/glx.xml + ${CURRENT_INSTALLED_DIR}/share/opengl-registry/wgl.xml + DESTINATION ${SOURCE_PATH}/glad/files +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DGLAD_NO_LOADER=OFF + -DGLAD_EXPORT=OFF + -DGLAD_INSTALL=ON + -DGLAD_REPRODUCIBLE=ON + -DGLAD_SPEC="gl" # {gl,egl,glx,wgl} + -DGLAD_PROFILE="compatibility" # {core,compatibility} + -DPYTHON_EXECUTABLE=${PYTHON3} + OPTIONS_DEBUG + -DGLAD_GENERATOR="c-debug" +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/glad) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include/KHR) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/glbinding/0001_force-system-install.patch b/vcpkg/ports/glbinding/0001_force-system-install.patch new file mode 100644 index 0000000..1674f14 --- /dev/null +++ b/vcpkg/ports/glbinding/0001_force-system-install.patch @@ -0,0 +1,36 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 011577a..e52d19d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -42,11 +42,13 @@ include(cmake/GenerateTemplateExportHeader.cmake) + # + + # Get git revision ++if(NOT DEFINED GIT_REV) + get_git_head_revision(GIT_REFSPEC GIT_SHA1) + string(SUBSTRING "${GIT_SHA1}" 0 12 GIT_REV) + if(NOT GIT_SHA1) + set(GIT_REV "0") + endif() ++endif() + + # Meta information about the project + set(META_PROJECT_NAME "glbinding") +@@ -135,7 +137,7 @@ if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" OR "${CMAKE_INSTALL_PREFIX}" STREQU + endif() + + # Installation paths +-if(UNIX AND SYSTEM_DIR_INSTALL) ++if(1) + # Install into the system (/usr/bin or /usr/local/bin) + set(INSTALL_ROOT "share/${project}") # /usr/[local]/share/ + set(INSTALL_CMAKE "share/${project}/cmake") # /usr/[local]/share//cmake +@@ -148,7 +150,7 @@ if(UNIX AND SYSTEM_DIR_INSTALL) + set(INSTALL_DOC "share/doc/${project}") # /usr/[local]/share/doc/ + set(INSTALL_SHORTCUTS "share/applications") # /usr/[local]/share/applications + set(INSTALL_ICONS "share/pixmaps") # /usr/[local]/share/pixmaps +- set(INSTALL_INIT "/etc/init") # /etc/init (upstart init scripts) ++ set(INSTALL_INIT "etc/init") # /etc/init (upstart init scripts) + else() + # Install into local directory + set(INSTALL_ROOT ".") # ./ diff --git a/vcpkg/ports/glbinding/0002_fix-uwpmacro.patch b/vcpkg/ports/glbinding/0002_fix-uwpmacro.patch new file mode 100644 index 0000000..61c1796 --- /dev/null +++ b/vcpkg/ports/glbinding/0002_fix-uwpmacro.patch @@ -0,0 +1,33 @@ +diff --git a/source/glbinding/CMakeLists.txt b/source/glbinding/CMakeLists.txt +index 97654c8..bca68d1 100644 +--- a/source/glbinding/CMakeLists.txt ++++ b/source/glbinding/CMakeLists.txt +@@ -261,6 +261,11 @@ target_link_libraries(${target} + # Compile definitions + # + ++ ++if (CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") ++ target_compile_definitions(${target} PRIVATE SYSTEM_WINDOWS WINDOWS_STORE) ++endif() ++ + target_compile_definitions(${target} + PRIVATE + # since we use stl and stl is intended to use exceptions, exceptions should not be disabled +diff --git a/source/glbinding/source/getProcAddress.cpp b/source/glbinding/source/getProcAddress.cpp +index c1cfc5c..7e5f8bc 100644 +--- a/source/glbinding/source/getProcAddress.cpp ++++ b/source/glbinding/source/getProcAddress.cpp +@@ -18,7 +18,11 @@ namespace glbinding { + + ProcAddress getProcAddress(const char * name) + { +- static auto module = LoadLibrary(_T("OPENGL32.DLL")); ++#ifdef WINDOWS_STORE ++ static auto module = ::LoadPackagedLibrary(_T("OPENGL32.DLL"), 0); ++#else ++ static auto module = ::LoadLibrary(_T("OPENGL32.DLL")); ++#endif + + // Prevent static linking of opengl32 + static auto wglGetProcAddress_ = reinterpret_cast(::GetProcAddress(module, "wglGetProcAddress")); diff --git a/vcpkg/ports/glbinding/0003_fix-cmake-configs-paths.patch b/vcpkg/ports/glbinding/0003_fix-cmake-configs-paths.patch new file mode 100644 index 0000000..3598377 --- /dev/null +++ b/vcpkg/ports/glbinding/0003_fix-cmake-configs-paths.patch @@ -0,0 +1,62 @@ +diff --git a/3rdparty/KHR/CMakeLists.txt b/3rdparty/KHR/CMakeLists.txt +index 25fac3a..429544f 100644 +--- a/3rdparty/KHR/CMakeLists.txt ++++ b/3rdparty/KHR/CMakeLists.txt +@@ -43,7 +43,7 @@ add_library(${target} INTERFACE) + add_library(externals::${target} ALIAS ${target}) + + # Export library for downstream projects +-export(TARGETS ${target} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/cmake/${target}/${target}-export.cmake) ++export(TARGETS ${target} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/${target}-export.cmake) + + + # +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 700b48b..8aaab8d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -141,15 +141,15 @@ endif() + if(1) + # Install into the system (/usr/bin or /usr/local/bin) + set(INSTALL_ROOT "share/${project}") # /usr/[local]/share/ +- set(INSTALL_CMAKE "share/${project}/cmake") # /usr/[local]/share//cmake ++ set(INSTALL_CMAKE "share/${project}") # /usr/[local]/share//cmake + set(INSTALL_EXAMPLES "share/${project}") # /usr/[local]/share/ + set(INSTALL_DATA "share/${project}") # /usr/[local]/share/ + set(INSTALL_BIN "bin") # /usr/[local]/bin + set(INSTALL_SHARED "lib") # /usr/[local]/lib + set(INSTALL_LIB "lib") # /usr/[local]/lib + set(INSTALL_INCLUDE "include") # /usr/[local]/include +- set(INSTALL_DOC "share/doc/${project}") # /usr/[local]/share/doc/ +- set(INSTALL_SHORTCUTS "share/applications") # /usr/[local]/share/applications ++ set(INSTALL_DOC "share/${project}/doc") # /usr/[local]/share/doc/ ++ set(INSTALL_SHORTCUTS "share/${project}/applications") # /usr/[local]/share/applications + set(INSTALL_ICONS "share/pixmaps") # /usr/[local]/share/pixmaps + set(INSTALL_INIT "etc/init") # /etc/init (upstart init scripts) + else() +diff --git a/source/glbinding-aux/CMakeLists.txt b/source/glbinding-aux/CMakeLists.txt +index 61cc166..cb0758a 100644 +--- a/source/glbinding-aux/CMakeLists.txt ++++ b/source/glbinding-aux/CMakeLists.txt +@@ -137,7 +137,7 @@ add_library(${target} + add_library(${META_PROJECT_NAME}::${target} ALIAS ${target}) + + # Export library for downstream projects +-export(TARGETS ${target} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/cmake/${target}/${target}-export.cmake) ++export(TARGETS ${target} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/${target}-export.cmake) + + # Create API export header + generate_export_header(${target} +diff --git a/source/glbinding/CMakeLists.txt b/source/glbinding/CMakeLists.txt +index bca68d1..f014494 100644 +--- a/source/glbinding/CMakeLists.txt ++++ b/source/glbinding/CMakeLists.txt +@@ -172,7 +172,7 @@ add_library(${target} + add_library(${META_PROJECT_NAME}::${target} ALIAS ${target}) + + # Export library for downstream projects +-export(TARGETS ${target} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/cmake/${target}/${target}-export.cmake) ++export(TARGETS ${target} NAMESPACE ${META_PROJECT_NAME}:: FILE ${PROJECT_BINARY_DIR}/${target}-export.cmake) + + # Create API export header + generate_export_header(${target} diff --git a/vcpkg/ports/glbinding/0004_fix-config-expected-paths.patch b/vcpkg/ports/glbinding/0004_fix-config-expected-paths.patch new file mode 100644 index 0000000..e6fb164 --- /dev/null +++ b/vcpkg/ports/glbinding/0004_fix-config-expected-paths.patch @@ -0,0 +1,35 @@ +diff --git a/glbinding-config.cmake b/glbinding-config.cmake +index 03fc505..01b6cc8 100644 +--- a/glbinding-config.cmake ++++ b/glbinding-config.cmake +@@ -1,7 +1,7 @@ + + # This config script tries to locate the project either in its source tree + # or from an install location. +-# ++# + # Please adjust the list of submodules to search for. + + +@@ -35,20 +35,11 @@ endmacro() + + # Try install location + set(MODULE_FOUND FALSE) +-find_modules("cmake") ++find_modules(".") + + if(MODULE_FOUND) + return() + endif() + +-# Try common build locations +-if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") +- find_modules("build-debug/cmake") +- find_modules("build/cmake") +-else() +- find_modules("build/cmake") +- find_modules("build-debug/cmake") +-endif() +- + # Signal success/failure to CMake + set(glbinding_FOUND ${MODULE_FOUND}) diff --git a/vcpkg/ports/glbinding/CONTROL b/vcpkg/ports/glbinding/CONTROL new file mode 100644 index 0000000..5bef721 --- /dev/null +++ b/vcpkg/ports/glbinding/CONTROL @@ -0,0 +1,5 @@ +Source: glbinding +Version: 3.1.0-2 +Description: glbinding is an MIT licensed, cross-platform C++ binding for the OpenGL API +Homepage: https://github.com/cginternals/glbinding +Build-Depends: egl-registry diff --git a/vcpkg/ports/glbinding/portfile.cmake b/vcpkg/ports/glbinding/portfile.cmake new file mode 100644 index 0000000..8634262 --- /dev/null +++ b/vcpkg/ports/glbinding/portfile.cmake @@ -0,0 +1,59 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cginternals/glbinding + REF v3.1.0 + SHA512 d7294c9a0dc47a7c107b134e5dfa78c5812fc6bf739b9fd778fa7ce946d5ea971839a65c3985e0915fd75311e4a85fb221d33a71856c460199eab0e7622f7151 + HEAD_REF master + PATCHES + 0001_force-system-install.patch + 0002_fix-uwpmacro.patch + 0003_fix-cmake-configs-paths.patch + 0004_fix-config-expected-paths.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DOPTION_BUILD_TESTS=OFF + -DOPTION_BUILD_GPU_TESTS=OFF + -DOPTION_BUILD_TOOLS=OFF + -DOPTION_BUILD_EXAMPLES=OFF + -DGIT_REV=0 + -DCMAKE_DISABLE_FIND_PACKAGE_cpplocate=ON + -DOPTION_BUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/glbinding) +vcpkg_copy_pdbs() + +## _IMPORT_PREFIX needs to go up one extra level in the directory tree. +file(GLOB_RECURSE TARGET_CMAKES "${CURRENT_PACKAGES_DIR}/*-export.cmake") +foreach(TARGET_CMAKE IN LISTS TARGET_CMAKES) + file(READ ${TARGET_CMAKE} _contents) + string(REPLACE +[[ +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +]] +[[ +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +]] + _contents "${_contents}") + file(WRITE ${TARGET_CMAKE} "${_contents}") +endforeach() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Remove files already published by egl-registry +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/KHR) + +# Handle copyright +file(RENAME ${CURRENT_PACKAGES_DIR}/share/glbinding/LICENSE ${CURRENT_PACKAGES_DIR}/share/glbinding/copyright) diff --git a/vcpkg/ports/glew/CONTROL b/vcpkg/ports/glew/CONTROL new file mode 100644 index 0000000..6409f87 --- /dev/null +++ b/vcpkg/ports/glew/CONTROL @@ -0,0 +1,4 @@ +Source: glew +Version: 2.1.0-8 +Description: The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library. +Homepage: https://github.com/nigels-com/glew diff --git a/vcpkg/ports/glew/fix-LNK2019.patch b/vcpkg/ports/glew/fix-LNK2019.patch new file mode 100644 index 0000000..d45e61a --- /dev/null +++ b/vcpkg/ports/glew/fix-LNK2019.patch @@ -0,0 +1,13 @@ +diff --git a/build/cmake/CMakeLists.txt b/build/cmake/CMakeLists.txt +index 5081e0f..f76725a 100644 +--- a/build/cmake/CMakeLists.txt ++++ b/build/cmake/CMakeLists.txt +@@ -108,7 +108,7 @@ if (MSVC) + target_compile_options (glew PRIVATE -GS-) + target_compile_options (glew_s PRIVATE -GS-) + # remove stdlib dependency +- target_link_libraries (glew LINK_PRIVATE -nodefaultlib -noentry) ++ # target_link_libraries (glew LINK_PRIVATE -nodefaultlib -noentry) + string(REGEX REPLACE "/RTC(su|[1su])" "" CMAKE_C_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG}) + elseif (WIN32 AND ((CMAKE_C_COMPILER_ID MATCHES "GNU") OR (CMAKE_C_COMPILER_ID MATCHES "Clang"))) + # remove stdlib dependency on windows with GCC and Clang (for similar reasons diff --git a/vcpkg/ports/glew/portfile.cmake b/vcpkg/ports/glew/portfile.cmake new file mode 100644 index 0000000..de43681 --- /dev/null +++ b/vcpkg/ports/glew/portfile.cmake @@ -0,0 +1,69 @@ +include(vcpkg_common_functions) + +# Don't change to vcpkg_from_github! The sources in the git repository (archives) are missing some files that are distributed inside releases. +# More info: https://github.com/nigels-com/glew/issues/31 and https://github.com/nigels-com/glew/issues/13 +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/nigels-com/glew/releases/download/glew-2.1.0/glew-2.1.0.tgz" + FILENAME "glew-2.1.0.tgz" + SHA512 9a9b4d81482ccaac4b476c34ed537585ae754a82ebb51c3efa16d953c25cc3931be46ed2e49e79c730cd8afc6a1b78c97d52cd714044a339c3bc29734cd4d2ab +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF glew + PATCHES fix-LNK2019.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/build/cmake + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DBUILD_UTILS=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/glew) + +if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) +set(_targets_cmake_files) +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + list(APPEND _targets_cmake_files "${CURRENT_PACKAGES_DIR}/share/glew/glew-targets-debug.cmake") +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + list(APPEND _targets_cmake_files "${CURRENT_PACKAGES_DIR}/share/glew/glew-targets-release.cmake") +endif() + +foreach(FILE ${_targets_cmake_files}) + file(READ ${FILE} _contents) + string(REPLACE "libglew32" "glew32" _contents "${_contents}") + file(WRITE ${FILE} "${_contents}") +endforeach() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/libglew32.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libglew32.lib ${CURRENT_PACKAGES_DIR}/lib/glew32.lib) +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/libglew32d.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libglew32d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/glew32d.lib) +endif() +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + foreach(FILE ${CURRENT_PACKAGES_DIR}/include/GL/glew.h ${CURRENT_PACKAGES_DIR}/include/GL/wglew.h ${CURRENT_PACKAGES_DIR}/include/GL/glxew.h) + file(READ ${FILE} _contents) + string(REPLACE "#ifdef GLEW_STATIC" "#if 1" _contents "${_contents}") + file(WRITE ${FILE} "${_contents}") + endforeach() +endif() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/glew ) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/glew RENAME copyright) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/glew/usage b/vcpkg/ports/glew/usage new file mode 100644 index 0000000..c0678a8 --- /dev/null +++ b/vcpkg/ports/glew/usage @@ -0,0 +1,4 @@ +The package glew is compatible with built-in CMake targets: + + find_package(GLEW REQUIRED) + target_link_libraries(main PRIVATE GLEW::GLEW) diff --git a/vcpkg/ports/glew/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/glew/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..6ad9ae4 --- /dev/null +++ b/vcpkg/ports/glew/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,25 @@ +include(SelectLibraryConfigurations) +_find_package(GLEW CONFIG) +if(GLEW_FOUND AND TARGET GLEW::GLEW AND NOT DEFINED GLEW_INCLUDE_DIRS) + get_target_property(GLEW_INCLUDE_DIRS GLEW::GLEW INTERFACE_INCLUDE_DIRECTORIES) + set(GLEW_INCLUDE_DIR ${GLEW_INCLUDE_DIRS}) + get_target_property(_GLEW_DEFS GLEW::GLEW INTERFACE_COMPILE_DEFINITIONS) + if("${_GLEW_DEFS}" MATCHES "GLEW_STATIC") + get_target_property(GLEW_LIBRARY_DEBUG GLEW::GLEW IMPORTED_LOCATION_DEBUG) + get_target_property(GLEW_LIBRARY_RELEASE GLEW::GLEW IMPORTED_LOCATION_RELEASE) + else() + get_target_property(GLEW_LIBRARY_DEBUG GLEW::GLEW IMPORTED_IMPLIB_DEBUG) + get_target_property(GLEW_LIBRARY_RELEASE GLEW::GLEW IMPORTED_IMPLIB_RELEASE) + endif() + get_target_property(_GLEW_LINK_INTERFACE GLEW::GLEW IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE) # same for debug and release + list(APPEND GLEW_LIBRARIES ${_GLEW_LINK_INTERFACE}) + list(APPEND GLEW_LIBRARY ${_GLEW_LINK_INTERFACE}) + select_library_configurations(GLEW) + if("${_GLEW_DEFS}" MATCHES "GLEW_STATIC") + set(GLEW_STATIC_LIBRARIES ${GLEW_LIBRARIES}) + else() + set(GLEW_SHARED_LIBRARIES ${GLEW_LIBRARIES}) + endif() + unset(_GLEW_DEFS) + unset(_GLEW_LINK_INTERFACE) +endif() \ No newline at end of file diff --git a/vcpkg/ports/glfw3/CONTROL b/vcpkg/ports/glfw3/CONTROL new file mode 100644 index 0000000..45b452b --- /dev/null +++ b/vcpkg/ports/glfw3/CONTROL @@ -0,0 +1,4 @@ +Source: glfw3 +Version: 3.3.2 +Homepage: https://github.com/glfw/glfw +Description: GLFW is a free, Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan application development. It provides a simple, platform-independent API for creating windows, contexts and surfaces, reading input, handling events, etc. diff --git a/vcpkg/ports/glfw3/portfile.cmake b/vcpkg/ports/glfw3/portfile.cmake new file mode 100644 index 0000000..393ecdd --- /dev/null +++ b/vcpkg/ports/glfw3/portfile.cmake @@ -0,0 +1,37 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO glfw/glfw + REF 3.3.2 + SHA512 f5af749d33b5b900ccf07988ad0bf51bd766a18e4cf2bc2a76020c88e98a2528ff1b965224184fe0d290cfe34b1af1e6f633600660d81194fe354078e2f35c56 + HEAD_REF master +) + +if(VCPKG_TARGET_IS_LINUX) + message( +"GLFW3 currently requires the following libraries from the system package manager: + xinerama + xcursor + xorg + libglu1-mesa + +These can be installed on Ubuntu systems via sudo apt install libxinerama-dev libxcursor-dev xorg-dev libglu1-mesa-dev") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DGLFW_BUILD_EXAMPLES=OFF + -DGLFW_BUILD_TESTS=OFF + -DGLFW_BUILD_DOCS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/glfw3) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/gli/CONTROL b/vcpkg/ports/gli/CONTROL new file mode 100644 index 0000000..ffd0ea8 --- /dev/null +++ b/vcpkg/ports/gli/CONTROL @@ -0,0 +1,5 @@ +Source: gli +Version: dd17acf-1 +Build-Depends: glm +Description: OpenGL Image (GLI) +Homepage: https://gli.g-truc.net \ No newline at end of file diff --git a/vcpkg/ports/gli/disable-test.patch b/vcpkg/ports/gli/disable-test.patch new file mode 100644 index 0000000..d6bf0d7 --- /dev/null +++ b/vcpkg/ports/gli/disable-test.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6eb1a68..610c0bc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -71,7 +71,7 @@ endmacro(addExternalPackageGTC) + # Add subdirectory + + add_subdirectory(gli) +-add_subdirectory(test) ++#add_subdirectory(test) + #add_subdirectory(doc) + + ################################ diff --git a/vcpkg/ports/gli/portfile.cmake b/vcpkg/ports/gli/portfile.cmake new file mode 100644 index 0000000..c958eb9 --- /dev/null +++ b/vcpkg/ports/gli/portfile.cmake @@ -0,0 +1,28 @@ +#header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO g-truc/gli + REF dd17acf9cc7fc6e6abe9f9ec69949eeeee1ccd82 + SHA512 9e3a4ab9ee73d5c271b8346cf81339cd3cd0c20d20991524b816313b6a99e8d3a01863316a38cf1a52ef9c5b31d689ecccf6248b12d1d270460c048bf904650b + HEAD_REF master + PATCHES + disable-test.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/gli TARGET_PATH share/gli) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/gli/CMakeLists.txt) + +# Put the license file where vcpkg expects it +# manual.md contains the "licenses" section for the project +file(INSTALL ${SOURCE_PATH}/manual.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/glib/CMakeLists.txt b/vcpkg/ports/glib/CMakeLists.txt new file mode 100644 index 0000000..2315420 --- /dev/null +++ b/vcpkg/ports/glib/CMakeLists.txt @@ -0,0 +1,394 @@ +cmake_minimum_required(VERSION 3.0) +project(glib C) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_C_STANDARD 11) + +if(MSVC) + add_compile_options(/utf-8) +endif() +set(GLIB_DLL_SUFFIX 2) +set(GLIB_LIB_SUFFIX 2.0) + +if(CMAKE_BUILD_TYPE STREQUAL Debug) + add_definitions(-DG_ENABLE_DEBUG) +endif() + +if(BUILD_SHARED_LIBS) + add_definitions(-DDLL_EXPORT) +endif() + +set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) + +# find dependencies + +# zlib +find_package(ZLIB REQUIRED) +# pcre +find_path(PCRE_INCLUDE_DIR pcre.h) +if(CMAKE_BUILD_TYPE STREQUAL Debug) + set(PCRE_SUFFIX d) +endif() +find_library(PCRE_LIBRARY NAMES pcre${PCRE_SUFFIX} pcre) +# libiconv +find_package(unofficial-iconv REQUIRED) +# libffi +find_path(FFI_INCLUDE_DIR ffi.h) +find_library(FFI_LIBRARY NAMES ffi libffi) +get_filename_component(LIB_DIR "${FFI_LIBRARY}" DIRECTORY) +if(APPLE) + find_library(COREFOUNDATION_LIBRARY CoreFoundation) + find_library(FOUNDATION_LIBRARY Foundation) + find_library(CORESERVICES_LIBRARY CoreServices) + link_libraries(${CORESERVICES_LIBRARY} ${COREFOUNDATION_LIBRARY} ${FOUNDATION_LIBRARY}) +endif() + +if(WIN32 OR APPLE) + # libintl(gettext) + find_path(LIBINTL_INCLUDE_DIR libintl.h) + find_library(LIBINTL_LIBRARY NAMES intl libintl) +else() + set(LIBINTL_INCLUDE_DIR) + set(LIBINTL_LIBRARY) +endif() + +if(WIN32) + set(LIBRESOLV_LIBRARY) +else() + find_library(LIBRESOLV_LIBRARY NAMES resolv libresolv) +endif() + +#prepare config files +if(WIN32) + configure_file(config.h.win32 ${CMAKE_BINARY_DIR}/config/config.h COPYONLY) + configure_file(glib/glibconfig.h.win32 ${CMAKE_BINARY_DIR}/config/glib/glibconfig.h COPYONLY) + configure_file(gmodule/gmoduleconf.h.win32 ${CMAKE_BINARY_DIR}/config/gmodule/gmoduleconf.h COPYONLY) + configure_file(gio/gnetworking.h.win32 ${CMAKE_BINARY_DIR}/config/gio/gnetworking.h COPYONLY) + add_definitions(-DHAVE_CONFIG_H) +else() + file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/config) + set(ENV{LIBFFI_LIBS} "${FFI_LIBRARY}") + set(ENV{PCRE_LIBS} "${PCRE_LIBRARY}") + set(ENV{LIBFFI_CFLAGS} "-I${FFI_INCLUDE_DIR}") + set(ENV{PCRE_CFLAGS} "-I${PCRE_INCLUDE_DIR}") + set(ENV{MSGFMT} "/bin/echo") + set(ENV{GMSGFMT} "/bin/echo") + string(TOUPPER "${CMAKE_BUILD_TYPE}" UPPER_CONFIG) + set(CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${UPPER_CONFIG}} -I${PCRE_INCLUDE_DIR}") + set(CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${UPPER_CONFIG}} -I${PCRE_INCLUDE_DIR}") + if(BUILD_SHARED_LIBS) + set(LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS_${UPPER_CONFIG}} -L${LIB_DIR}") + else() + set(LDFLAGS "${CMAKE_STATIC_LINKER_FLAGS} ${CMAKE_STATIC_LINKER_FLAGS_${UPPER_CONFIG}} -L${LIB_DIR}") + endif() + + string(STRIP "${CXXFLAGS}" CXXFLAGS) + string(STRIP "${CFLAGS}" CFLAGS) + string(STRIP "${LDFLAGS}" LDFLAGS) + execute_process( + COMMAND "${CMAKE_SOURCE_DIR}/configure" + --disable-libelf + --disable-libmount + "CPPFLAGS=${CXXFLAGS}" + "CFLAGS=${CFLAGS}" + "LDFLAGS=${LDFLAGS}" + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/config + RESULT_VARIABLE res + ) + if(NOT res EQUAL 0) + message(FATAL_ERROR "Configure failed.") + endif() + + if (NOT HAVE_SELINUX) + file(READ "${CMAKE_BINARY_DIR}/config/config.h" CONFIG_H) + string(REPLACE "#define HAVE_SELINUX 1" + "#undef HAVE_SELINUX" CONFIG_H "${CONFIG_H}") + file(WRITE "${CMAKE_BINARY_DIR}/config/config.h" "${CONFIG_H}") + endif() + + add_definitions("-DGIO_MODULE_DIR=\"gio/modules\"") +endif() +install(FILES ${CMAKE_BINARY_DIR}/config/config.h DESTINATION include/glib) +install(FILES ${CMAKE_SOURCE_DIR}/msvc_recommended_pragmas.h DESTINATION include) + +include_directories(${CMAKE_BINARY_DIR}/config ${CMAKE_BINARY_DIR}/config/glib ${CMAKE_BINARY_DIR}/config/gio ${CMAKE_BINARY_DIR}/config/gmodule) +include_directories(. glib) + +# This macro purposely doesn't find nodes with sources that have additional properties set +# Most of such files in glib are PCRE sources which we don't use anyway +macro(extract_vcproj_sources VC_PROJECT OUT_VAR) + file(READ ${VC_PROJECT} ${VC_PROJECT}-CONTENTS) + STRING(REPLACE "\n" ";" ${VC_PROJECT}-CONTENTS "${${VC_PROJECT}-CONTENTS}") # split by lines + foreach(LINE ${${VC_PROJECT}-CONTENTS}) + if(LINE MATCHES "") + string(REPLACE "" "" LINE ${LINE}) + string(STRIP ${LINE} LINE) + file(TO_CMAKE_PATH ${LINE} LINE) + list(APPEND ${OUT_VAR} ${LINE}) + endif() + endforeach() +endmacro() + +# main module +extract_vcproj_sources(win32/vs14/glib.vcxproj GLIB_SOURCES) +list(APPEND GLIB_SOURCES glib/libcharset/localcharset.c) # modified internal version with prefixed symbols +if(NOT WIN32) + list(FILTER GLIB_SOURCES EXCLUDE REGEX "win32.c\$|win32-helper.c\$") + list(APPEND GLIB_SOURCES "glib/gthread-posix.c" "glib/giounix.c" "glib/gspawn.c" "glib/glib-unix.c") +endif() +add_library(glib ${GLIB_SOURCES}) +target_compile_definitions(glib PRIVATE GLIB_COMPILATION G_LOG_DOMAIN="GLib" LIBDIR="") +target_link_libraries(glib PRIVATE ${PCRE_LIBRARY} unofficial::iconv::libiconv unofficial::iconv::libcharset ${LIBINTL_LIBRARY}) +if(WIN32) + target_compile_definitions(glib PRIVATE USE_SYSTEM_PCRE) + target_link_libraries(glib PRIVATE ws2_32 winmm advapi32 ole32 shell32) +else() + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) + target_link_libraries(glib PRIVATE Threads::Threads ${CMAKE_DL_LIBS}) +endif() +target_include_directories(glib PRIVATE ${PCRE_INCLUDE_DIR} ${ICONV_INCLUDE_DIR}) +target_include_directories(glib PUBLIC $ $) +list(APPEND GLIB_TARGETS glib) +if(NOT GLIB_SKIP_HEADERS) + install(FILES glib/glib.h glib/glib-object.h ${CMAKE_BINARY_DIR}/config/glib/glibconfig.h DESTINATION include) + + file(GLOB GLIB_HEADERS glib/*.h) + list(FILTER GLIB_HEADERS EXCLUDE REGEX "/glib.h\$|/glib-object.h\$|private.h\$") + install(FILES ${GLIB_HEADERS} DESTINATION include/glib) + + file(GLOB GLIB_DEP_HEADERS glib/deprecated/*.h) + install(FILES ${GLIB_DEP_HEADERS} DESTINATION include/glib/deprecated) +endif() + +# gthread +add_library(gthread gthread/gthread-impl.c) +target_compile_definitions(gthread PRIVATE G_LOG_DOMAIN="GThread") +target_link_libraries(gthread PRIVATE glib ${LIBINTL_LIBRARY}) +target_include_directories(gthread PRIVATE ${LIBINTL_INCLUDE_DIR}) +list(APPEND GLIB_TARGETS gthread) + +# gobject +extract_vcproj_sources(win32/vs14/gobject.vcxproj GOBJECT_SOURCES) +add_library(gobject ${GOBJECT_SOURCES}) +target_compile_definitions(gobject PRIVATE GOBJECT_COMPILATION G_LOG_DOMAIN="GLib-GObject") +target_link_libraries(gobject PRIVATE gthread glib ${FFI_LIBRARY}) +target_include_directories(gobject PRIVATE ${FFI_INCLUDE_DIR} PUBLIC $) +list(APPEND GLIB_TARGETS gobject) +if(NOT GLIB_SKIP_HEADERS) + file(GLOB GOBJECT_HEADERS gobject/*.h gobject/gobjectnotifyqueue.c) + list(FILTER GOBJECT_HEADERS EXCLUDE REGEX "private.h\$") + install(FILES ${GOBJECT_HEADERS} DESTINATION include/gobject) +endif() + +# gmodule +add_library(gmodule gmodule/gmodule.c) +target_compile_definitions(gmodule PRIVATE G_LOG_DOMAIN="GModule") +target_link_libraries(gmodule PRIVATE glib ${LIBINTL_LIBRARY}) +target_include_directories(gmodule PUBLIC $) +target_include_directories(gmodule PRIVATE ${LIBINTL_INCLUDE_DIR} PUBLIC $) +list(APPEND GLIB_TARGETS gmodule) +if(NOT GLIB_SKIP_HEADERS) + install(FILES gmodule/gmodule.h DESTINATION include) +endif() + +# gio subdirs +if(NOT WIN32) + file(GLOB XDGMIME_SOURCES gio/xdgmime/*.c) + add_library(xdgmime ${XDGMIME_SOURCES}) + target_compile_definitions(xdgmime PRIVATE -DXDG_PREFIX=_gio_xdg) + list(APPEND GLIB_TARGETS xdgmime) +endif() + +if(NOT WIN32 AND NOT APPLE) + file(GLOB INOTIFY_SOURCES gio/inotify/*.c) + add_library(inotify ${INOTIFY_SOURCES}) + target_link_libraries(inotify PRIVATE gmodule) + target_compile_definitions(inotify PRIVATE -DG_LOG_DOMAIN=\"GLib-GIO\" -DGIO_COMPILATION -DG_DISABLE_DEPRECATED) + list(APPEND GLIB_TARGETS inotify) +endif() + +if(APPLE) + file(GLOB KQUEUE_SOURCES gio/kqueue/*.c) + add_library(kqueue ${KQUEUE_SOURCES}) + target_link_libraries(kqueue PRIVATE gmodule) + target_compile_definitions(kqueue PRIVATE -DG_LOG_DOMAIN=\"GLib-GIO\" -DGIO_COMPILATION -DG_DISABLE_DEPRECATED) + list(APPEND GLIB_TARGETS kqueue) +endif() + +# gio +extract_vcproj_sources(win32/vs14/gio.vcxproj GIO_SOURCES) +if(NOT WIN32) + file(GLOB GIO_UNIX_SOURCES "gio/gunix*.c" "gio/g*notificationbackend.c" "gio/g*portal*.c") + list(APPEND GIO_SOURCES ${GIO_UNIX_SOURCES}) + list(APPEND GIO_SOURCES + "gio/gcontenttype.c" + "gio/gfiledescriptorbased.c" + "gio/gnetworkmonitornm.c" + "gio/xdp-dbus.c" + ) + list(FILTER GIO_SOURCES EXCLUDE REGEX "/gwin32[^/]+\$|win32/[^/]+\$|win32.c\$|gregistrysettingsbackend.c\$") + if(APPLE) + set_property(SOURCE + gio/gcocoanotificationbackend.c + gio/gosxappinfo.c + gio/gnextstepsettingsbackend.c + PROPERTY COMPILE_FLAGS "-x objective-c") + list(APPEND GIO_SOURCES + "gio/gnextstepsettingsbackend.c" + "gio/gosxappinfo.c" + ) + else() + list(APPEND GIO_SOURCES + "gio/gnetworkmonitornetlink.c" + "gio/gdesktopappinfo.c" + ) + list(FILTER GIO_SOURCES EXCLUDE REGEX "gcocoanotificationbackend.c\$") + endif() +endif() +if(NOT GLIB_SKIP_HEADERS) + file(GLOB GIO_HEADERS gio/*.h) + list(FILTER GIO_HEADERS EXCLUDE REGEX "private.h\$") + install(FILES ${GIO_HEADERS} ${CMAKE_BINARY_DIR}/config/gio/gnetworking.h DESTINATION include/gio) +endif() +add_library(gio ${GIO_SOURCES}) +target_compile_definitions(gio PRIVATE GIO_COMPILATION G_LOG_DOMAIN="GLib-GIO") +target_link_libraries(gio PRIVATE glib gmodule gobject ZLIB::ZLIB ${LIBRESOLV_LIBRARY} ${LIBINTL_LIBRARY}) +target_include_directories(gio PUBLIC $ $) +if(WIN32) + target_link_libraries(gio PRIVATE ws2_32 shlwapi dnsapi iphlpapi advapi32 shell32) +elseif(APPLE) + target_link_libraries(gio PRIVATE xdgmime kqueue) + if (HAVE_SELINUX) + target_link_libraries(gio PRIVATE selinux) + endif() +else() + target_link_libraries(gio PRIVATE xdgmime inotify) + if (HAVE_SELINUX) + target_link_libraries(gio PRIVATE selinux) + endif() +endif() +list(APPEND GLIB_TARGETS gio) + +foreach(GTARGET ${GLIB_TARGETS}) + set_target_properties(${GTARGET} PROPERTIES + OUTPUT_NAME ${GTARGET}-${GLIB_DLL_SUFFIX} + ARCHIVE_OUTPUT_NAME ${GTARGET}-${GLIB_LIB_SUFFIX}) +endforeach() + +macro(add_glib_tool TOOL_NAME) + add_executable(${TOOL_NAME} ${ARGN}) + if(WIN32) + target_link_libraries(${TOOL_NAME} glib ${LIBINTL_LIBRARY} shell32) + else() + target_link_libraries(${TOOL_NAME} glib ${LIBINTL_LIBRARY}) + endif() + target_compile_definitions(${TOOL_NAME} PRIVATE GLIB_COMPILATION) + list(APPEND GLIB_TOOLS ${TOOL_NAME}) +endmacro() + +macro(add_gio_tool TOOL_NAME) + add_executable(${TOOL_NAME} ${ARGN}) + target_link_libraries(${TOOL_NAME} PRIVATE glib gio gobject gmodule ${LIBINTL_LIBRARY}) + target_include_directories(${TOOL_NAME} PRIVATE gmodule gio) + target_compile_definitions(${TOOL_NAME} PRIVATE GIO_COMPILATION) + list(APPEND GLIB_TOOLS ${TOOL_NAME}) +endmacro() + +if(NOT GLIB_SKIP_TOOLS) + configure_file(gobject/glib-mkenums.in ${CMAKE_SOURCE_DIR}/gobject/glib-mkenums @ONLY) # uses GLIB_VERSION + install(FILES gobject/glib-mkenums DESTINATION tools/glib) + + configure_file(gio/gdbus-2.0/codegen/gdbus-codegen.in ${CMAKE_SOURCE_DIR}/gio/gdbus-2.0/codegen/gdbus-codegen COPYONLY) + install(FILES gio/gdbus-2.0/codegen/gdbus-codegen DESTINATION tools/glib) + file(GLOB CODEGEN_SOURCES gio/gdbus-2.0/codegen/*.py) + install(FILES ${CODEGEN_SOURCES} DESTINATION tools/glib/codegen) + + add_gio_tool(gdbus gio/gdbus-tool.c) + add_gio_tool(gio-querymodules gio/gio-querymodules.c) + file(GLOB GIO_TOOL_SOURCES gio/gio-tool*.c) + add_gio_tool(gio-tool ${GIO_TOOL_SOURCES}) + set_target_properties(gio-tool PROPERTIES OUTPUT_NAME gio) + add_gio_tool(glib-compile-resources gio/glib-compile-resources.c gio/gvdb/gvdb-builder.c) + add_gio_tool(glib-compile-schemas gio/glib-compile-schemas.c gio/gvdb/gvdb-builder.c) + add_gio_tool(gresource gio/gresource-tool.c) + add_gio_tool(gsettings gio/gsettings-tool.c) + + if(CMAKE_SIZEOF_VOID_P EQUAL 4) + set(WIN win32) + else() + set(WIN win64) + endif() + + add_glib_tool(glib-genmarshal gobject/glib-genmarshal.c) + if(WIN32) + add_glib_tool(gspawn-${WIN}-helper WIN32 glib/gspawn-win32-helper.c) + add_glib_tool(gspawn-${WIN}-helper-console glib/gspawn-win32-helper-console.c) + endif() + + install(TARGETS ${GLIB_TOOLS} RUNTIME DESTINATION tools/glib) +endif() + +install( + TARGETS ${GLIB_TARGETS} + EXPORT glib + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) +install( + EXPORT glib + NAMESPACE unofficial::glib:: + FILE unofficial-glib-targets.cmake + DESTINATION share/unofficial-glib +) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/cmake/unofficial-glib-config.in.cmake + ${CMAKE_CURRENT_BINARY_DIR}/cmake/unofficial-glib-config.cmake + @ONLY +) +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/cmake/unofficial-glib-config.cmake + DESTINATION share/unofficial-glib +) + +message(STATUS "Link-time dependencies:") +message(STATUS " " ${ZLIB_LIBRARIES}) +message(STATUS " " ${PCRE_LIBRARY}) +message(STATUS " " ${ICONV_LIBRARY}) +message(STATUS " " ${CHARSET_LIBRARY}) +message(STATUS " " ${FFI_LIBRARY}) +message(STATUS " " ${LIBINTL_LIBRARY}) + +set(prefix ${CMAKE_INSTALL_PREFIX}) +set(exec_prefix ${CMAKE_INSTALL_PREFIX}) +set(libdir ${CMAKE_INSTALL_PREFIX}/lib) +set(includedir ${CMAKE_INSTALL_PREFIX}/include) + +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/glib-2.0.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/glib-2.0.pc" @ONLY) +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/gobject-2.0.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/gobject-2.0.pc" @ONLY) +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/gmodule-2.0.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/gmodule-2.0.pc" @ONLY) +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/gmodule-export-2.0.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/gmodule-export-2.0.pc" @ONLY) +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/gmodule-no-export-2.0.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/gmodule-no-export-2.0.pc" @ONLY) +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/gthread-2.0.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/gthread-2.0.pc" @ONLY) +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/gio-2.0.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/gio-2.0.pc" @ONLY) + +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glib-2.0.pc" + "${CMAKE_CURRENT_BINARY_DIR}/gobject-2.0.pc" + "${CMAKE_CURRENT_BINARY_DIR}/gmodule-2.0.pc" + "${CMAKE_CURRENT_BINARY_DIR}/gmodule-export-2.0.pc" + "${CMAKE_CURRENT_BINARY_DIR}/gmodule-no-export-2.0.pc" + "${CMAKE_CURRENT_BINARY_DIR}/gthread-2.0.pc" + "${CMAKE_CURRENT_BINARY_DIR}/gio-2.0.pc" + DESTINATION lib/pkgconfig) + +if(WIN32) +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/gio-windows-2.0.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/gio-windows-2.0.pc" @ONLY) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gio-windows-2.0.pc" DESTINATION lib/pkgconfig) +endif() + +if(UNIX) +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/gio-unix-2.0.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/gio-unix-2.0.pc" @ONLY) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gio-unix-2.0.pc" DESTINATION lib/pkgconfig) +endif() diff --git a/vcpkg/ports/glib/CONTROL b/vcpkg/ports/glib/CONTROL new file mode 100644 index 0000000..14c896e --- /dev/null +++ b/vcpkg/ports/glib/CONTROL @@ -0,0 +1,9 @@ +Source: glib +Version: 2.52.3-14-7 +Homepage: https://developer.gnome.org/glib/ +Description: Portable, general-purpose utility library. +Build-Depends: zlib, pcre, libffi, gettext, libiconv +Supports: !uwp + +Feature: selinux +Description: Build with selinux support. \ No newline at end of file diff --git a/vcpkg/ports/glib/arm64-defines.patch b/vcpkg/ports/glib/arm64-defines.patch new file mode 100644 index 0000000..c1b5181 --- /dev/null +++ b/vcpkg/ports/glib/arm64-defines.patch @@ -0,0 +1,78 @@ +diff --git a/config.h.win32 b/config.h.win32 +index 999641d65..531843e0e 100644 +--- a/config.h.win32 ++++ b/config.h.win32 +@@ -728,7 +728,7 @@ + + /* The size of `void *', as computed by sizeof. */ + #ifdef _MSC_VER +-#if (defined(_M_X64) || defined(_M_AMD64)) ++#if (defined(_M_X64) || defined(_M_AMD64) || defined(_M_ARM64)) + #define SIZEOF_VOID_P 8 + #elif (defined(_M_IX86)) + #define SIZEOF_VOID_P 4 +diff --git a/config.h.win32.in b/config.h.win32.in +index eaf7e2818..049c5e9f4 100644 +--- a/config.h.win32.in ++++ b/config.h.win32.in +@@ -728,7 +728,7 @@ + + /* The size of `void *', as computed by sizeof. */ + #ifdef _MSC_VER +-#if (defined(_M_X64) || defined(_M_AMD64)) ++#if (defined(_M_X64) || defined(_M_AMD64) || defined(_M_ARM64)) + #define SIZEOF_VOID_P 8 + #elif (defined(_M_IX86)) + #define SIZEOF_VOID_P 4 +diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c +index 9b3619cb1..6400572a2 100644 +--- a/gio/gdbusaddress.c ++++ b/gio/gdbusaddress.c +@@ -1469,7 +1469,7 @@ get_session_address_dbus_launch (GError **error) + wcscat (args, rundll_path); + wcscat (args, L"\" "); + wcscat (args, gio_path_short); +-#if defined(_WIN64) || defined(_M_X64) || defined(_M_AMD64) ++#if defined(_WIN64) || defined(_M_X64) || defined(_M_AMD64) || defined(_M_ARM64) + wcscat (args, L",g_win32_run_session_bus"); + #elif defined (_MSC_VER) + wcscat (args, L",_g_win32_run_session_bus@16"); +diff --git a/glib/gatomic.c b/glib/gatomic.c +index e3e49fab4..e257e4377 100644 +--- a/glib/gatomic.c ++++ b/glib/gatomic.c +@@ -474,7 +474,7 @@ gsize + #elif defined (G_PLATFORM_WIN32) + + #include +-#if !defined(_M_AMD64) && !defined (_M_IA64) && !defined(_M_X64) && !(defined _MSC_VER && _MSC_VER <= 1200) ++#if !defined(_M_ARM64) && !defined(_M_AMD64) && !defined (_M_IA64) && !defined(_M_X64) && !(defined _MSC_VER && _MSC_VER <= 1200) + #define InterlockedAnd _InterlockedAnd + #define InterlockedOr _InterlockedOr + #define InterlockedXor _InterlockedXor +diff --git a/glib/glibconfig.h.win32 b/glib/glibconfig.h.win32 +index d9f893a15..b75a86f10 100644 +--- a/glib/glibconfig.h.win32 ++++ b/glib/glibconfig.h.win32 +@@ -68,7 +68,7 @@ typedef unsigned __int64 guint64; + #define G_GINT64_FORMAT "I64i" + #define G_GUINT64_FORMAT "I64u" + +-#if defined(_WIN64) || defined(_M_X64) || defined(_M_AMD64) ++#if defined(_WIN64) || defined(_M_X64) || defined(_M_AMD64) || defined(_M_ARM64) + + #define GLIB_SIZEOF_VOID_P 8 + #define GLIB_SIZEOF_LONG 4 +diff --git a/glib/glibconfig.h.win32.in b/glib/glibconfig.h.win32.in +index 9a91c5e96..f0b88c976 100644 +--- a/glib/glibconfig.h.win32.in ++++ b/glib/glibconfig.h.win32.in +@@ -68,7 +68,7 @@ typedef unsigned __int64 guint64; + #define G_GINT64_FORMAT "I64i" + #define G_GUINT64_FORMAT "I64u" + +-#if defined(_WIN64) || defined(_M_X64) || defined(_M_AMD64) ++#if defined(_WIN64) || defined(_M_X64) || defined(_M_AMD64) || defined(_M_ARM64) + + #define GLIB_SIZEOF_VOID_P 8 + #define GLIB_SIZEOF_LONG 4 diff --git a/vcpkg/ports/glib/cmake/install_headers.cmake b/vcpkg/ports/glib/cmake/install_headers.cmake new file mode 100644 index 0000000..7840f34 --- /dev/null +++ b/vcpkg/ports/glib/cmake/install_headers.cmake @@ -0,0 +1,255 @@ +# generated from glib-install.props +install(FILES glib/glib.h DESTINATION include) +install(FILES ${CMAKE_BINARY_DIR}/config/glib/glibconfig.h DESTINATION include) +install(FILES glib/glib-object.h DESTINATION include) +install(FILES glib/deprecated/gallocator.h DESTINATION include/glib/deprecated) +install(FILES glib/deprecated/gcache.h DESTINATION include/glib/deprecated) +install(FILES glib/deprecated/gcompletion.h DESTINATION include/glib/deprecated) +install(FILES glib/deprecated/gmain.h DESTINATION include/glib/deprecated) +install(FILES glib/deprecated/grel.h DESTINATION include/glib/deprecated) +install(FILES glib/deprecated/gthread.h DESTINATION include/glib/deprecated) +install(FILES glib/glib-autocleanups.h DESTINATION include/glib) +install(FILES glib/galloca.h DESTINATION include/glib) +install(FILES glib/garray.h DESTINATION include/glib) +install(FILES glib/gasyncqueue.h DESTINATION include/glib) +install(FILES glib/gatomic.h DESTINATION include/glib) +install(FILES glib/gbacktrace.h DESTINATION include/glib) +install(FILES glib/gbase64.h DESTINATION include/glib) +install(FILES glib/gbitlock.h DESTINATION include/glib) +install(FILES glib/gbookmarkfile.h DESTINATION include/glib) +install(FILES glib/gbytes.h DESTINATION include/glib) +install(FILES glib/gcharset.h DESTINATION include/glib) +install(FILES glib/gchecksum.h DESTINATION include/glib) +install(FILES glib/gconvert.h DESTINATION include/glib) +install(FILES glib/gdataset.h DESTINATION include/glib) +install(FILES glib/gdate.h DESTINATION include/glib) +install(FILES glib/gdatetime.h DESTINATION include/glib) +install(FILES glib/gdir.h DESTINATION include/glib) +install(FILES glib/genviron.h DESTINATION include/glib) +install(FILES glib/gerror.h DESTINATION include/glib) +install(FILES glib/gfileutils.h DESTINATION include/glib) +install(FILES glib/ggettext.h DESTINATION include/glib) +install(FILES glib/ghash.h DESTINATION include/glib) +install(FILES glib/ghmac.h DESTINATION include/glib) +install(FILES glib/ghook.h DESTINATION include/glib) +install(FILES glib/ghostutils.h DESTINATION include/glib) +install(FILES glib/gi18n.h DESTINATION include/glib) +install(FILES glib/gi18n-lib.h DESTINATION include/glib) +install(FILES glib/giochannel.h DESTINATION include/glib) +install(FILES glib/gkeyfile.h DESTINATION include/glib) +install(FILES glib/glist.h DESTINATION include/glib) +install(FILES glib/gmacros.h DESTINATION include/glib) +install(FILES glib/gmain.h DESTINATION include/glib) +install(FILES glib/gmappedfile.h DESTINATION include/glib) +install(FILES glib/gmarkup.h DESTINATION include/glib) +install(FILES glib/gmem.h DESTINATION include/glib) +install(FILES glib/gmessages.h DESTINATION include/glib) +install(FILES glib/gnode.h DESTINATION include/glib) +install(FILES glib/goption.h DESTINATION include/glib) +install(FILES glib/gpattern.h DESTINATION include/glib) +install(FILES glib/gpoll.h DESTINATION include/glib) +install(FILES glib/gprimes.h DESTINATION include/glib) +install(FILES glib/gqsort.h DESTINATION include/glib) +install(FILES glib/gquark.h DESTINATION include/glib) +install(FILES glib/gqueue.h DESTINATION include/glib) +install(FILES glib/grand.h DESTINATION include/glib) +install(FILES glib/gregex.h DESTINATION include/glib) +install(FILES glib/gscanner.h DESTINATION include/glib) +install(FILES glib/gsequence.h DESTINATION include/glib) +install(FILES glib/gshell.h DESTINATION include/glib) +install(FILES glib/gslice.h DESTINATION include/glib) +install(FILES glib/gslist.h DESTINATION include/glib) +install(FILES glib/gspawn.h DESTINATION include/glib) +install(FILES glib/gstdio.h DESTINATION include/glib) +install(FILES glib/gstrfuncs.h DESTINATION include/glib) +install(FILES glib/gtestutils.h DESTINATION include/glib) +install(FILES glib/gstring.h DESTINATION include/glib) +install(FILES glib/gstringchunk.h DESTINATION include/glib) +install(FILES glib/gthread.h DESTINATION include/glib) +install(FILES glib/gthreadpool.h DESTINATION include/glib) +install(FILES glib/gtimer.h DESTINATION include/glib) +install(FILES glib/gtimezone.h DESTINATION include/glib) +install(FILES glib/gtrashstack.h DESTINATION include/glib) +install(FILES glib/gtree.h DESTINATION include/glib) +install(FILES glib/gtypes.h DESTINATION include/glib) +install(FILES glib/gunicode.h DESTINATION include/glib) +install(FILES glib/gurifuncs.h DESTINATION include/glib) +install(FILES glib/gutils.h DESTINATION include/glib) +install(FILES glib/guuid.h DESTINATION include/glib) +install(FILES glib/gvarianttype.h DESTINATION include/glib) +install(FILES glib/gvariant.h DESTINATION include/glib) +install(FILES glib/gversion.h DESTINATION include/glib) +install(FILES glib/gversionmacros.h DESTINATION include/glib) +install(FILES glib/gwin32.h DESTINATION include/glib) +install(FILES glib/gprintf.h DESTINATION include/glib) +install(FILES gmodule/gmodule.h DESTINATION include) +install(FILES gobject/gobject-autocleanups.h DESTINATION include/gobject) +install(FILES gobject/glib-types.h DESTINATION include/gobject) +install(FILES gobject/gbinding.h DESTINATION include/gobject) +install(FILES gobject/gboxed.h DESTINATION include/gobject) +install(FILES gobject/gclosure.h DESTINATION include/gobject) +install(FILES gobject/genums.h DESTINATION include/gobject) +install(FILES gobject/gmarshal.h DESTINATION include/gobject) +install(FILES gobject/gobject.h DESTINATION include/gobject) +install(FILES gobject/gparam.h DESTINATION include/gobject) +install(FILES gobject/gparamspecs.h DESTINATION include/gobject) +install(FILES gobject/gsignal.h DESTINATION include/gobject) +install(FILES gobject/gsourceclosure.h DESTINATION include/gobject) +install(FILES gobject/gtype.h DESTINATION include/gobject) +install(FILES gobject/gtypemodule.h DESTINATION include/gobject) +install(FILES gobject/gtypeplugin.h DESTINATION include/gobject) +install(FILES gobject/gvalue.h DESTINATION include/gobject) +install(FILES gobject/gvaluearray.h DESTINATION include/gobject) +install(FILES gobject/gvaluecollector.h DESTINATION include/gobject) +install(FILES gobject/gvaluetypes.h DESTINATION include/gobject) +install(FILES gobject/gobjectnotifyqueue.c DESTINATION include/gobject) +install(FILES gio/gappinfo.h DESTINATION include/gio) +install(FILES gio/gasyncinitable.h DESTINATION include/gio) +install(FILES gio/gasyncresult.h DESTINATION include/gio) +install(FILES gio/gbufferedinputstream.h DESTINATION include/gio) +install(FILES gio/gbufferedoutputstream.h DESTINATION include/gio) +install(FILES gio/gbytesicon.h DESTINATION include/gio) +install(FILES gio/gcancellable.h DESTINATION include/gio) +install(FILES gio/gcontenttype.h DESTINATION include/gio) +install(FILES gio/gcharsetconverter.h DESTINATION include/gio) +install(FILES gio/gconverter.h DESTINATION include/gio) +install(FILES gio/gconverterinputstream.h DESTINATION include/gio) +install(FILES gio/gconverteroutputstream.h DESTINATION include/gio) +install(FILES gio/gdatagrambased.h DESTINATION include/gio) +install(FILES gio/gdatainputstream.h DESTINATION include/gio) +install(FILES gio/gdataoutputstream.h DESTINATION include/gio) +install(FILES gio/gdrive.h DESTINATION include/gio) +install(FILES gio/gemblem.h DESTINATION include/gio) +install(FILES gio/gemblemedicon.h DESTINATION include/gio) +install(FILES gio/gfile.h DESTINATION include/gio) +install(FILES gio/gfileattribute.h DESTINATION include/gio) +install(FILES gio/gfileenumerator.h DESTINATION include/gio) +install(FILES gio/gfileicon.h DESTINATION include/gio) +install(FILES gio/gfileinfo.h DESTINATION include/gio) +install(FILES gio/gfileinputstream.h DESTINATION include/gio) +install(FILES gio/gfilemonitor.h DESTINATION include/gio) +install(FILES gio/gfilenamecompleter.h DESTINATION include/gio) +install(FILES gio/gfileoutputstream.h DESTINATION include/gio) +install(FILES gio/gfileiostream.h DESTINATION include/gio) +install(FILES gio/gfilterinputstream.h DESTINATION include/gio) +install(FILES gio/gfilteroutputstream.h DESTINATION include/gio) +install(FILES gio/gicon.h DESTINATION include/gio) +install(FILES gio/ginetaddress.h DESTINATION include/gio) +install(FILES gio/ginetaddressmask.h DESTINATION include/gio) +install(FILES gio/ginetsocketaddress.h DESTINATION include/gio) +install(FILES gio/ginputstream.h DESTINATION include/gio) +install(FILES gio/ginitable.h DESTINATION include/gio) +install(FILES gio/gio.h DESTINATION include/gio) +install(FILES gio/gio-autocleanups.h DESTINATION include/gio) +install(FILES gio/giotypes.h DESTINATION include/gio) +install(FILES gio/gioenums.h DESTINATION include/gio) +install(FILES gio/gioerror.h DESTINATION include/gio) +install(FILES gio/giomodule.h DESTINATION include/gio) +install(FILES gio/gioscheduler.h DESTINATION include/gio) +install(FILES gio/giostream.h DESTINATION include/gio) +install(FILES gio/gloadableicon.h DESTINATION include/gio) +install(FILES gio/gmount.h DESTINATION include/gio) +install(FILES gio/gmemoryinputstream.h DESTINATION include/gio) +install(FILES gio/gmemoryoutputstream.h DESTINATION include/gio) +install(FILES gio/gmountoperation.h DESTINATION include/gio) +install(FILES gio/gnativevolumemonitor.h DESTINATION include/gio) +install(FILES gio/gnetworkaddress.h DESTINATION include/gio) +install(FILES gio/gnetworkmonitor.h DESTINATION include/gio) +install(FILES gio/gnetworkservice.h DESTINATION include/gio) +install(FILES gio/goutputstream.h DESTINATION include/gio) +install(FILES gio/gpermission.h DESTINATION include/gio) +install(FILES gio/gpollableinputstream.h DESTINATION include/gio) +install(FILES gio/gpollableoutputstream.h DESTINATION include/gio) +install(FILES gio/gpollableutils.h DESTINATION include/gio) +install(FILES gio/gproxyaddress.h DESTINATION include/gio) +install(FILES gio/gproxy.h DESTINATION include/gio) +install(FILES gio/gproxyaddressenumerator.h DESTINATION include/gio) +install(FILES gio/gproxyresolver.h DESTINATION include/gio) +install(FILES gio/gresolver.h DESTINATION include/gio) +install(FILES gio/gresource.h DESTINATION include/gio) +install(FILES gio/gseekable.h DESTINATION include/gio) +install(FILES gio/gsimpleasyncresult.h DESTINATION include/gio) +install(FILES gio/gsimpleiostream.h DESTINATION include/gio) +install(FILES gio/gsimplepermission.h DESTINATION include/gio) +install(FILES gio/gsocket.h DESTINATION include/gio) +install(FILES gio/gsocketaddress.h DESTINATION include/gio) +install(FILES gio/gsocketaddressenumerator.h DESTINATION include/gio) +install(FILES gio/gsocketclient.h DESTINATION include/gio) +install(FILES gio/gsocketconnectable.h DESTINATION include/gio) +install(FILES gio/gsocketconnection.h DESTINATION include/gio) +install(FILES gio/gsocketcontrolmessage.h DESTINATION include/gio) +install(FILES gio/gsocketlistener.h DESTINATION include/gio) +install(FILES gio/gsocketservice.h DESTINATION include/gio) +install(FILES gio/gsrvtarget.h DESTINATION include/gio) +install(FILES gio/gsimpleproxyresolver.h DESTINATION include/gio) +install(FILES gio/gtask.h DESTINATION include/gio) +install(FILES gio/gsubprocess.h DESTINATION include/gio) +install(FILES gio/gsubprocesslauncher.h DESTINATION include/gio) +install(FILES gio/gtcpconnection.h DESTINATION include/gio) +install(FILES gio/gtcpwrapperconnection.h DESTINATION include/gio) +install(FILES gio/gthreadedsocketservice.h DESTINATION include/gio) +install(FILES gio/gthemedicon.h DESTINATION include/gio) +install(FILES gio/gtlsbackend.h DESTINATION include/gio) +install(FILES gio/gtlscertificate.h DESTINATION include/gio) +install(FILES gio/gtlsclientconnection.h DESTINATION include/gio) +install(FILES gio/gtlsconnection.h DESTINATION include/gio) +install(FILES gio/gtlsdatabase.h DESTINATION include/gio) +install(FILES gio/gtlsfiledatabase.h DESTINATION include/gio) +install(FILES gio/gtlsinteraction.h DESTINATION include/gio) +install(FILES gio/gtlspassword.h DESTINATION include/gio) +install(FILES gio/gtlsserverconnection.h DESTINATION include/gio) +install(FILES gio/gdtlsconnection.h DESTINATION include/gio) +install(FILES gio/gdtlsclientconnection.h DESTINATION include/gio) +install(FILES gio/gdtlsserverconnection.h DESTINATION include/gio) +install(FILES gio/gvfs.h DESTINATION include/gio) +install(FILES gio/gvolume.h DESTINATION include/gio) +install(FILES gio/gvolumemonitor.h DESTINATION include/gio) +install(FILES gio/gzlibcompressor.h DESTINATION include/gio) +install(FILES gio/gzlibdecompressor.h DESTINATION include/gio) +install(FILES gio/glistmodel.h DESTINATION include/gio) +install(FILES gio/gliststore.h DESTINATION include/gio) +install(FILES gio/gapplication.h DESTINATION include/gio) +install(FILES gio/gapplicationcommandline.h DESTINATION include/gio) +install(FILES gio/gactiongroup.h DESTINATION include/gio) +install(FILES gio/gactionmap.h DESTINATION include/gio) +install(FILES gio/gsimpleactiongroup.h DESTINATION include/gio) +install(FILES gio/gremoteactiongroup.h DESTINATION include/gio) +install(FILES gio/gactiongroupexporter.h DESTINATION include/gio) +install(FILES gio/gdbusactiongroup.h DESTINATION include/gio) +install(FILES gio/gaction.h DESTINATION include/gio) +install(FILES gio/gpropertyaction.h DESTINATION include/gio) +install(FILES gio/gsimpleaction.h DESTINATION include/gio) +install(FILES gio/gmenumodel.h DESTINATION include/gio) +install(FILES gio/gmenu.h DESTINATION include/gio) +install(FILES gio/gmenuexporter.h DESTINATION include/gio) +install(FILES gio/gdbusmenumodel.h DESTINATION include/gio) +install(FILES gio/gnotification.h DESTINATION include/gio) +install(FILES gio/gsettingsbackend.h DESTINATION include/gio) +install(FILES gio/gsettingsschema.h DESTINATION include/gio) +install(FILES gio/gsettings.h DESTINATION include/gio) +install(FILES gio/gdbusauthobserver.h DESTINATION include/gio) +install(FILES gio/gcredentials.h DESTINATION include/gio) +install(FILES gio/gdbusutils.h DESTINATION include/gio) +install(FILES gio/gdbuserror.h DESTINATION include/gio) +install(FILES gio/gdbusaddress.h DESTINATION include/gio) +install(FILES gio/gdbusconnection.h DESTINATION include/gio) +install(FILES gio/gdbusmessage.h DESTINATION include/gio) +install(FILES gio/gdbusnameowning.h DESTINATION include/gio) +install(FILES gio/gdbusnamewatching.h DESTINATION include/gio) +install(FILES gio/gdbusproxy.h DESTINATION include/gio) +install(FILES gio/gdbusintrospection.h DESTINATION include/gio) +install(FILES gio/gdbusmethodinvocation.h DESTINATION include/gio) +install(FILES gio/gdbusserver.h DESTINATION include/gio) +install(FILES gio/gdbusinterface.h DESTINATION include/gio) +install(FILES gio/gdbusinterfaceskeleton.h DESTINATION include/gio) +install(FILES gio/gdbusobject.h DESTINATION include/gio) +install(FILES gio/gdbusobjectskeleton.h DESTINATION include/gio) +install(FILES gio/gdbusobjectproxy.h DESTINATION include/gio) +install(FILES gio/gdbusobjectmanager.h DESTINATION include/gio) +install(FILES gio/gdbusobjectmanagerclient.h DESTINATION include/gio) +install(FILES gio/gdbusobjectmanagerserver.h DESTINATION include/gio) +install(FILES gio/gtestdbus.h DESTINATION include/gio) +install(FILES gio/gioenumtypes.h DESTINATION include/gio) +install(FILES ${CMAKE_BINARY_DIR}/config/gio/gnetworking.h DESTINATION include/gio) +install(FILES gio/gwin32inputstream.h DESTINATION include/gio) +install(FILES gio/gwin32outputstream.h DESTINATION include/gio) diff --git a/vcpkg/ports/glib/cmake/unofficial-glib-config.in.cmake b/vcpkg/ports/glib/cmake/unofficial-glib-config.in.cmake new file mode 100644 index 0000000..ea87ea0 --- /dev/null +++ b/vcpkg/ports/glib/cmake/unofficial-glib-config.in.cmake @@ -0,0 +1,7 @@ +include(CMakeFindDependencyMacro) +find_dependency(unofficial-iconv) +if(NOT WIN32) + find_dependency(Threads) +endif() + +include("${CMAKE_CURRENT_LIST_DIR}/unofficial-glib-targets.cmake") diff --git a/vcpkg/ports/glib/fix-arm-builds.patch b/vcpkg/ports/glib/fix-arm-builds.patch new file mode 100644 index 0000000..257ee75 --- /dev/null +++ b/vcpkg/ports/glib/fix-arm-builds.patch @@ -0,0 +1,46 @@ +diff --git a/gio/tests/plugin_resources.c b/gio/tests/plugin_resources.c +index 4c1b0214b..bbfc7ae07 100644 +--- a/gio/tests/plugin_resources.c ++++ b/gio/tests/plugin_resources.c +@@ -80,13 +80,13 @@ GResource *_g_plugin_get_resource (void) + */ + + /* We need to account for differences between the mangling of symbols +- * for Win32 (x86) and x64 programs, as symbols on Win32 are prefixed +- * with an underscore but symbols on x64 are not. ++ * for x86 and x64/ARM/ARM64 programs, as symbols on x86 are prefixed ++ * with an underscore but symbols on x64/ARM/ARM64 are not. + */ +-#ifdef _WIN64 +-#define G_MSVC_SYMBOL_PREFIX "" +-#else ++#ifdef _M_IX86 + #define G_MSVC_SYMBOL_PREFIX "_" ++#else ++#define G_MSVC_SYMBOL_PREFIX "" + #endif + + #define G_DEFINE_CONSTRUCTOR(_func) G_MSVC_CTOR (_func, G_MSVC_SYMBOL_PREFIX) +diff --git a/glib/gconstructor.h b/glib/gconstructor.h +index dccb0314c..fa1139302 100644 +--- a/glib/gconstructor.h ++++ b/glib/gconstructor.h +@@ -40,13 +40,13 @@ + */ + + /* We need to account for differences between the mangling of symbols +- * for Win32 (x86) and x64 programs, as symbols on Win32 are prefixed +- * with an underscore but symbols on x64 are not. ++ * for x86 and x64/ARM/ARM64 programs, as symbols on x86 are prefixed ++ * with an underscore but symbols on x64/ARM/ARM64 are not. + */ +-#ifdef _WIN64 +-#define G_MSVC_SYMBOL_PREFIX "" +-#else ++#ifdef _M_IX86 + #define G_MSVC_SYMBOL_PREFIX "_" ++#else ++#define G_MSVC_SYMBOL_PREFIX "" + #endif + + #define G_DEFINE_CONSTRUCTOR(_func) G_MSVC_CTOR (_func, G_MSVC_SYMBOL_PREFIX) diff --git a/vcpkg/ports/glib/portfile.cmake b/vcpkg/ports/glib/portfile.cmake new file mode 100644 index 0000000..dac83ab --- /dev/null +++ b/vcpkg/ports/glib/portfile.cmake @@ -0,0 +1,59 @@ +# Glib uses winapi functions not available in WindowsStore +vcpkg_fail_port_install(ON_TARGET "UWP") + +# Glib relies on DllMain on Windows +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) +endif() + +set(GLIB_VERSION 2.52.3) +vcpkg_download_distfile(ARCHIVE + URLS "https://ftp.gnome.org/pub/gnome/sources/glib/2.52/glib-${GLIB_VERSION}.tar.xz" + FILENAME "glib-${GLIB_VERSION}.tar.xz" + SHA512 a068f2519cfb82de8d4b7f004e7c1f15e841cad4046430a83b02b359d011e0c4077cdff447a1687ed7c68f1a11b4cf66b9ed9fc23ab5f0c7c6be84eb0ddc3017) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${GLIB_VERSION} + PATCHES + use-libiconv-on-windows.patch + arm64-defines.patch + fix-arm-builds.patch +) + +configure_file(${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake DESTINATION ${SOURCE_PATH}) +file(REMOVE_RECURSE ${SOURCE_PATH}/glib/pcre) +file(WRITE ${SOURCE_PATH}/glib/pcre/Makefile.in) +file(REMOVE ${SOURCE_PATH}/glib/win_iconv.c) + +if (selinux IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS AND NOT EXISTS "/usr/include/selinux") + message("Selinux was not found in its typical system location. Your build may fail. You can install Selinux with \"apt-get install selinux\".") +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + selinux HAVE_SELINUX +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DGLIB_VERSION=${GLIB_VERSION} + OPTIONS_DEBUG + -DGLIB_SKIP_HEADERS=ON + -DGLIB_SKIP_TOOLS=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-glib TARGET_PATH share/unofficial-glib) + +vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_pkgconfig() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/glib/use-libiconv-on-windows.patch b/vcpkg/ports/glib/use-libiconv-on-windows.patch new file mode 100644 index 0000000..927de0b --- /dev/null +++ b/vcpkg/ports/glib/use-libiconv-on-windows.patch @@ -0,0 +1,14 @@ +diff --git a/glib/gconvert.c b/glib/gconvert.c +index 3deac78..134ded9 100644 +--- a/glib/gconvert.c ++++ b/glib/gconvert.c +@@ -30,7 +30,8 @@ + #include + + #ifdef G_OS_WIN32 +-#include "win_iconv.c" ++#define USE_LIBICONV_GNU ++#include + #endif + + #ifdef G_PLATFORM_WIN32 diff --git a/vcpkg/ports/glibmm/CMakeLists.txt b/vcpkg/ports/glibmm/CMakeLists.txt new file mode 100644 index 0000000..1083926 --- /dev/null +++ b/vcpkg/ports/glibmm/CMakeLists.txt @@ -0,0 +1,124 @@ +cmake_minimum_required(VERSION 3.9) +project(glibmm) + +set(CMAKE_CXX_STANDARD 17) + +find_path(GLIB_INCLUDE_DIR NAMES glib.h) +find_library(GLIB_LIBRARY NAMES glib-2.0) +find_library(GIO_LIBRARY NAMES gio-2.0) +find_library(GOBJECT_LIBRARY NAMES gobject-2.0) +find_library(GMODULE_LIBRARY NAMES gmodule-2.0) +find_library(GTHREAD_LIBRARY NAMES gthread-2.0) +find_program(GLIB_COMPILE_SCHEMAS NAMES glib-compile-schemas) +find_library(PCRE_LIBRARY NAMES pcre) +find_library(SIGC_LIBRARY NAMES sigc-2.0) +find_library(FFI_LIBRARY NAMES ffi libffi) + +include_directories(${GLIB_INCLUDE_DIR}) +link_libraries( + ${GIO_LIBRARY} + ${GOBJECT_LIBRARY} + ${GMODULE_LIBRARY} + ${GTHREAD_LIBRARY} + ${GLIB_LIBRARY} + ${PCRE_LIBRARY} + ${SIGC_LIBRARY} + ${FFI_LIBRARY} +) + +if(APPLE) + find_library(LIBINTL_LIBRARY NAMES intl) +endif() + +find_package(unofficial-iconv REQUIRED) +link_libraries(${LIBINTL_LIBRARY} unofficial::iconv::libiconv) + +if(APPLE) + find_library(COREFOUNDATION_LIBRARY CoreFoundation) + find_library(CORESERVICES_LIBRARY CoreServices) + find_library(FOUNDATION_LIBRARY Foundation) + link_libraries(${COREFOUNDATION_LIBRARY} ${CORESERVICES_LIBRARY} ${FOUNDATION_LIBRARY}) +endif() + +# Activate workaround for exporting all symbols from Windows DLLs to mimic the +# behavior on Linux, where dynamic libraries always export all symbols. +# The same approach was already used by the upstream MSVC build (see MSVC_NMake/gendef/gendef.cc) +if (WIN32) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) +endif() + +if(NOT BUILD_SHARED_LIBS) + add_definitions(-DGLIBMM_STATIC_LIB -DGIOMM_STATIC_LIB) +endif() + +if(WIN32) + add_compile_options(/FI${WARNINGS_HEADER} -DSIZEOF_WCHAR_T=2) +else() + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) + link_libraries(Threads::Threads ${CMAKE_DL_LIBS}) +endif() + +if(WIN32) + configure_file(MSVC_Net2013/giomm/giommconfig.h ${CMAKE_BINARY_DIR}/config/gio/giommconfig.h COPYONLY) + configure_file(MSVC_Net2013/glibmm/glibmmconfig.h ${CMAKE_BINARY_DIR}/config/glib/glibmmconfig.h COPYONLY) +else() + set(ENV{GLIB_COMPILE_SCHEMAS} "${GLIB_COMPILE_SCHEMAS}") + set(ENV{GLIBMM_CFLAGS} -I${GLIB_INCLUDE_DIR}) + set(ENV{GLIBMM_LIBS} "${GLIB_LIBRARY}") + set(ENV{GIOMM_CFLAGS} -I${GLIB_INCLUDE_DIR}) + set(ENV{GIOMM_LIBS} "${GIO_LIBRARY}") + set(ENV{PKG_CONFIG} "echo") + + file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/config) + execute_process( + COMMAND "${CMAKE_SOURCE_DIR}/configure" + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/config + RESULT_VARIABLE res + ) + if(NOT res EQUAL 0) + message(FATAL_ERROR "Configure failed.") + endif() +endif() + +file(GLOB GLIBMM_SOURCES glib/glibmm/*.cc) +add_library(glibmm ${GLIBMM_SOURCES}) +target_compile_definitions(glibmm PRIVATE -DGLIBMM_BUILD) +target_include_directories(glibmm PUBLIC glib ${CMAKE_BINARY_DIR}/config/glib) + +file(GLOB GIOMM_SOURCES gio/giomm/*.cc) +if(WIN32) + list(FILTER GIOMM_SOURCES EXCLUDE REGEX "desktopappinfo.cc\$|/unix[^/]+.cc\$") +endif() +add_library(giomm ${GIOMM_SOURCES}) +target_compile_definitions(giomm PRIVATE -DGIOMM_BUILD) +target_link_libraries(giomm PUBLIC glibmm) +target_include_directories(giomm PUBLIC gio ${CMAKE_BINARY_DIR}/config/gio) + +install( + TARGETS glibmm giomm + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install( + FILES + ${CMAKE_BINARY_DIR}/config/gio/giommconfig.h + gio/giomm.h + ${CMAKE_BINARY_DIR}/config/glib/glibmmconfig.h + glib/glibmm.h + DESTINATION include + ) + install( + DIRECTORY gio/giomm glib/glibmm + DESTINATION include + FILES_MATCHING PATTERN *.h + ) +endif() + +if(NOT DISABLE_EXAMPLES) + add_executable(options examples/options/main.cc) + target_link_libraries(options PRIVATE giomm) +endif() diff --git a/vcpkg/ports/glibmm/CONTROL b/vcpkg/ports/glibmm/CONTROL new file mode 100644 index 0000000..aefaf7b --- /dev/null +++ b/vcpkg/ports/glibmm/CONTROL @@ -0,0 +1,6 @@ +Source: glibmm +Version: 2.52.1-11 +Description: This is glibmm, a C++ API for parts of glib that are useful for C++. +Homepage: https://www.gtkmm.org. +Build-Depends: zlib, pcre, libffi, gettext, libiconv, glib, libsigcpp +Supports: !uwp diff --git a/vcpkg/ports/glibmm/fix-define-glibmmconfig.patch b/vcpkg/ports/glibmm/fix-define-glibmmconfig.patch new file mode 100644 index 0000000..90b97d9 --- /dev/null +++ b/vcpkg/ports/glibmm/fix-define-glibmmconfig.patch @@ -0,0 +1,43 @@ +diff --git a/MSVC_Net2013/glibmm/glibmmconfig.h b/MSVC_Net2013/glibmm/glibmmconfig.h +index 61bb83e..7dbe809 100644 +--- a/MSVC_Net2013/glibmm/glibmmconfig.h ++++ b/MSVC_Net2013/glibmm/glibmmconfig.h +@@ -7,12 +7,17 @@ + # if defined(_MSC_VER) + # define GLIBMM_MSC 1 + # define GLIBMM_WIN32 1 +-# define GLIBMM_DLL 1 ++# if !defined(GLIBMM_STATIC_LIB) ++# define GLIBMM_DLL 1 ++# endif + # elif defined(__CYGWIN__) + # define GLIBMM_CONFIGURE 1 + # elif defined(__MINGW32__) + # define GLIBMM_WIN32 1 + # define GLIBMM_CONFIGURE 1 ++# if !defined(GLIBMM_STATIC_LIB) ++# define GLIBMM_DLL 1 ++# endif + # else + /* AIX clR compiler complains about this even though it doesn't get this far */ + # error "Unknown architecture (send me gcc --dumpspecs or equiv)" +@@ -108,6 +113,7 @@ + # define GLIBMM_HAVE_WIDE_STREAM 1 + # define GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS 1 + # define GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32 1 ++# define GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS 1 + # define GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION 1 + # define GLIBMM_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS 1 + # define GLIBMM_CAN_USE_NAMESPACES_INSIDE_EXTERNC 1 +@@ -140,11 +146,6 @@ + * it to be defined. Remove after grace period. */ + #define GLIBMM_USING_STD(Symbol) + +-/* Enable DLL-specific stuff only when not building a static library */ +-#if !defined(__CYGWIN__) && defined(__MINGW32__) && !defined(GLIBMM_STATIC_LIB) +-# define GLIBMM_DLL 1 +-#endif +- + #ifdef GLIBMM_DLL + # if defined(GLIBMM_BUILD) && defined(_WINDLL) + /* Do not dllexport as it is handled by gendef on MSVC */ diff --git a/vcpkg/ports/glibmm/fix-thread.h.patch b/vcpkg/ports/glibmm/fix-thread.h.patch new file mode 100644 index 0000000..8e7c01b --- /dev/null +++ b/vcpkg/ports/glibmm/fix-thread.h.patch @@ -0,0 +1,13 @@ +diff --git a/glib/glibmm/threads.h b/glib/glibmm/threads.h +index 5350a99..cc48c01 100644 +--- a/glib/glibmm/threads.h ++++ b/glib/glibmm/threads.h +@@ -657,7 +657,7 @@ public: + */ + inline void replace(T* data); + +- GPrivate* gobj() { return gobject_; } ++ GPrivate* gobj() { return &gobject_; } + + private: + GPrivate gobject_; diff --git a/vcpkg/ports/glibmm/glibmm-api-variant.patch b/vcpkg/ports/glibmm/glibmm-api-variant.patch new file mode 100644 index 0000000..bb00ac3 --- /dev/null +++ b/vcpkg/ports/glibmm/glibmm-api-variant.patch @@ -0,0 +1,84 @@ +diff --git a/glib/glibmm/varianttype.h b/glib/glibmm/varianttype.h +index a232e70..64eb4a1 100644 +--- a/glib/glibmm/varianttype.h ++++ b/glib/glibmm/varianttype.h +@@ -500,54 +500,79 @@ public: + + }; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_BOOL; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_BYTE; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_INT16; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_UINT16; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_INT32; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_UINT32; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_INT64; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_UINT64; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_DOUBLE; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_STRING; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_OBJECT_PATH; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_SIGNATURE; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_VARIANT; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_HANDLE; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_UNIT; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_ANY; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_BASIC; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_MAYBE; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_ARRAY; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_TUPLE; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_DICT_ENTRY; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_DICTIONARY; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_STRING_ARRAY; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_BYTESTRING; + ++GLIBMM_API + extern const VariantType VARIANT_TYPE_BYTESTRING_ARRAY; + + diff --git a/vcpkg/ports/glibmm/msvc_recommended_pragmas.h b/vcpkg/ports/glibmm/msvc_recommended_pragmas.h new file mode 100644 index 0000000..c0eb1d5 --- /dev/null +++ b/vcpkg/ports/glibmm/msvc_recommended_pragmas.h @@ -0,0 +1,34 @@ +#ifndef _MSC_VER +#pragma error "This header is for Microsoft VC only." +#endif /* _MSC_VER */ + +/* Make MSVC more pedantic, this is a recommended pragma list + * from _Win32_Programming_ by Rector and Newcomer. + */ +#pragma warning(error:4002) /* too many actual parameters for macro */ +#pragma warning(error:4003) /* not enough actual parameters for macro */ +#pragma warning(1:4010) /* single-line comment contains line-continuation character */ +#pragma warning(error:4013) /* 'function' undefined; assuming extern returning int */ +#pragma warning(1:4016) /* no function return type; using int as default */ +#pragma warning(error:4020) /* too many actual parameters */ +#pragma warning(error:4021) /* too few actual parameters */ +#pragma warning(error:4027) /* function declared without formal parameter list */ +#pragma warning(error:4029) /* declared formal parameter list different from definition */ +#pragma warning(error:4033) /* 'function' must return a value */ +#pragma warning(error:4035) /* 'function' : no return value */ +#pragma warning(error:4045) /* array bounds overflow */ +#pragma warning(error:4047) /* different levels of indirection */ +#pragma warning(error:4049) /* terminating line number emission */ +#pragma warning(error:4053) /* An expression of type void was used as an operand */ +#pragma warning(error:4071) /* no function prototype given */ +#pragma warning(disable:4101) /* unreferenced local variable */ +#pragma warning(error:4150) + +#pragma warning(disable:4244) /* No possible loss of data warnings */ +#pragma warning(disable:4305) /* No truncation from int to char warnings */ + +#pragma warning(error:4819) /* The file contains a character that cannot be represented in the current code page */ + +/* work around Microsoft's premature attempt to deprecate the C-Library */ +#define _CRT_SECURE_NO_WARNINGS +#define _CRT_NONSTDC_NO_WARNINGS diff --git a/vcpkg/ports/glibmm/portfile.cmake b/vcpkg/ports/glibmm/portfile.cmake new file mode 100644 index 0000000..87551d2 --- /dev/null +++ b/vcpkg/ports/glibmm/portfile.cmake @@ -0,0 +1,36 @@ +# Glib uses winapi functions not available in WindowsStore +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_download_distfile(ARCHIVE + URLS "http://ftp.gnome.org/pub/GNOME/sources/glibmm/2.52/glibmm-2.52.1.tar.xz" + FILENAME "glibmm-2.52.1.tar.xz" + SHA512 702158762cb28972b315ab98dc00a62e532bda08b6e76dc2a2556e8cb381c2021290891887a4af2fbff5a62bab4d50581be73037dc8e0dc47d5febd6cbeb7bda +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + glibmm-api-variant.patch + fix-define-glibmmconfig.patch + fix-thread.h.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DWARNINGS_HEADER=${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +# Handle copyright and readme +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME readme.txt) \ No newline at end of file diff --git a/vcpkg/ports/glm/CMakeLists.txt b/vcpkg/ports/glm/CMakeLists.txt new file mode 100644 index 0000000..678604b --- /dev/null +++ b/vcpkg/ports/glm/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.12 FATAL_ERROR) + +project(glm LANGUAGES CXX) + +include(GNUInstallDirs) + +add_library(glm INTERFACE) +target_include_directories(glm INTERFACE $) + +install( + TARGETS glm EXPORT glm-config + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}/ + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/ + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/ +) + +install( + EXPORT glm-config DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/glm +) + +install( + DIRECTORY ${CMAKE_SOURCE_DIR}/glm + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + FILES_MATCHING PATTERN "*.hpp*" PATTERN "*.inl*" PATTERN "*.h*" +) diff --git a/vcpkg/ports/glm/CONTROL b/vcpkg/ports/glm/CONTROL new file mode 100644 index 0000000..3ba2f55 --- /dev/null +++ b/vcpkg/ports/glm/CONTROL @@ -0,0 +1,4 @@ +Source: glm +Version: 0.9.9.8 +Description: OpenGL Mathematics (GLM) +Homepage: https://glm.g-truc.net diff --git a/vcpkg/ports/glm/portfile.cmake b/vcpkg/ports/glm/portfile.cmake new file mode 100644 index 0000000..40d5115 --- /dev/null +++ b/vcpkg/ports/glm/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO g-truc/glm + REF bf71a834948186f4097caa076cd2663c69a10e1e #v0.9.9.8 + SHA512 226266c02af616a96fb19ee32cf3f98347daa43a4fde5d618d36b38709dce1280de126c542524d40725ecf70359edcc5b60660554c65ce246514501fb4c9c87c + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Put the license file where vcpkg expects it +file(INSTALL ${SOURCE_PATH}/copying.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/globjects/CONTROL b/vcpkg/ports/globjects/CONTROL new file mode 100644 index 0000000..64664a9 --- /dev/null +++ b/vcpkg/ports/globjects/CONTROL @@ -0,0 +1,5 @@ +Source: globjects +Version: 1.1.0-3 +Build-Depends: glbinding, glm +Description: C++ library strictly wrapping OpenGL objects. +Homepage: https://github.com/cginternals/globjects diff --git a/vcpkg/ports/globjects/portfile.cmake b/vcpkg/ports/globjects/portfile.cmake new file mode 100644 index 0000000..1575574 --- /dev/null +++ b/vcpkg/ports/globjects/portfile.cmake @@ -0,0 +1,37 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cginternals/globjects + REF dc68b09a53ec20683d3b3a12ed8d9cb12602bb9a + SHA512 5145df795a73a8d74e983e143fd57441865f3082860efb89a3aa8c4d64c2eb6f0256a8049ccd5479dd77e53ef6638d9c903b29a8ef2b41a076003d9595912500 + HEAD_REF master + PATCHES system-install.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DOPTION_BUILD_TESTS=OFF + -DOPTION_BUILD_GPU_TESTS=OFF + -DGIT_REV=0 +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/globjects/cmake/globjects) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(WRITE ${CURRENT_PACKAGES_DIR}/share/globjects/globjects-config.cmake "include(CMakeFindDependencyMacro) +find_dependency(glm) +find_dependency(glbinding) + +include(\${CMAKE_CURRENT_LIST_DIR}/globjects-export.cmake) +") + +# Handle copyright +file(RENAME ${CURRENT_PACKAGES_DIR}/share/globjects/LICENSE ${CURRENT_PACKAGES_DIR}/share/globjects/copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/globjects/system-install.patch b/vcpkg/ports/globjects/system-install.patch new file mode 100644 index 0000000..10e0c5b --- /dev/null +++ b/vcpkg/ports/globjects/system-install.patch @@ -0,0 +1,27 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6556346..48ba95d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -42,11 +42,13 @@ include(cmake/GenerateTemplateExportHeader.cmake) + # + + # Get git revision ++if(NOT DEFINED GIT_REV) + get_git_head_revision(GIT_REFSPEC GIT_SHA1) + string(SUBSTRING "${GIT_SHA1}" 0 12 GIT_REV) + if(NOT GIT_SHA1) + set(GIT_REV "0") + endif() ++endif() + + # Meta information about the project + set(META_PROJECT_NAME "globjects") +@@ -133,7 +135,7 @@ if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" OR "${CMAKE_INSTALL_PREFIX}" STREQU + endif() + + # Installation paths +-if(UNIX AND SYSTEM_DIR_INSTALL) ++if(1) + # Install into the system (/usr/bin or /usr/local/bin) + set(INSTALL_ROOT "share/${project}") # /usr/[local]/share/ + set(INSTALL_CMAKE "share/${project}/cmake") # /usr/[local]/share//cmake diff --git a/vcpkg/ports/glog/CONTROL b/vcpkg/ports/glog/CONTROL new file mode 100644 index 0000000..649381e --- /dev/null +++ b/vcpkg/ports/glog/CONTROL @@ -0,0 +1,5 @@ +Source: glog +Version: 0.4.0-3 +Homepage: https://github.com/google/glog +Description: C++ implementation of the Google logging module +Build-Depends: gflags diff --git a/vcpkg/ports/glog/glog_disable_debug_postfix.patch b/vcpkg/ports/glog/glog_disable_debug_postfix.patch new file mode 100644 index 0000000..7b882e1 --- /dev/null +++ b/vcpkg/ports/glog/glog_disable_debug_postfix.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 808330e..de0e477 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -44,7 +44,7 @@ include (CTest) + include (DetermineGflagsNamespace) + include (GNUInstallDirs) + +-set (CMAKE_DEBUG_POSTFIX d) ++#set (CMAKE_DEBUG_POSTFIX d) + set (CMAKE_THREAD_PREFER_PTHREAD 1) + + if (WITH_GFLAGS) diff --git a/vcpkg/ports/glog/portfile.cmake b/vcpkg/ports/glog/portfile.cmake new file mode 100644 index 0000000..8487cc1 --- /dev/null +++ b/vcpkg/ports/glog/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/glog + REF v0.4.0 + SHA512 b585f1819ade2075f6b61dc5aaca5c3f9d25601dba2bd08b6c49b96ac5f79db23c6b7f2042df003f7130497dd7241fcaa8b107d1f97385cb66ce52d3c554b176 + HEAD_REF master + PATCHES + glog_disable_debug_postfix.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/glog) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/glslang/CMakeLists-targets.patch b/vcpkg/ports/glslang/CMakeLists-targets.patch new file mode 100644 index 0000000..36e923d --- /dev/null +++ b/vcpkg/ports/glslang/CMakeLists-targets.patch @@ -0,0 +1,108 @@ +diff --git a/ChooseMSVCCRT.cmake b/ChooseMSVCCRT.cmake +index 2097881..f6320a9 100644 +--- a/ChooseMSVCCRT.cmake ++++ b/ChooseMSVCCRT.cmake +@@ -102,4 +102,3 @@ set(MSVC_CRT + MT + MTd) + +-choose_msvc_crt(MSVC_CRT) +diff --git a/OGLCompilersDLL/CMakeLists.txt b/OGLCompilersDLL/CMakeLists.txt +index 5bb3f0e..90ba3be 100644 +--- a/OGLCompilersDLL/CMakeLists.txt ++++ b/OGLCompilersDLL/CMakeLists.txt +@@ -9,6 +9,7 @@ if(WIN32) + endif(WIN32) + + if(ENABLE_GLSLANG_INSTALL) +- install(TARGETS OGLCompiler +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install(TARGETS OGLCompiler EXPORT glslangConfig ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif(ENABLE_GLSLANG_INSTALL) +diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt +index 1997e74..e2a0229 100644 +--- a/SPIRV/CMakeLists.txt ++++ b/SPIRV/CMakeLists.txt +@@ -46,7 +46,6 @@ endif(ENABLE_NV_EXTENSIONS) + add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS}) + set_property(TARGET SPIRV PROPERTY FOLDER glslang) + set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON) +-target_include_directories(SPIRV PUBLIC ..) + + if (ENABLE_SPVREMAPPER) + add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS}) +@@ -78,13 +77,13 @@ if(WIN32) + endif(WIN32) + + if(ENABLE_GLSLANG_INSTALL) +- if(BUILD_SHARED_LIBS) ++ if(BUILD_SHARED_LIBS OR TRUE) + if (ENABLE_SPVREMAPPER) + install(TARGETS SPVRemapper + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() +- install(TARGETS SPIRV ++ install(TARGETS SPIRV EXPORT glslangConfig + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + else() +diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt +index 5f51476..7f11498 100644 +--- a/glslang/CMakeLists.txt ++++ b/glslang/CMakeLists.txt +@@ -86,7 +86,6 @@ add_library(glslang ${LIB_TYPE} ${BISON_GLSLParser_OUTPUT_SOURCE} ${SOURCES} ${H + set_property(TARGET glslang PROPERTY FOLDER glslang) + set_property(TARGET glslang PROPERTY POSITION_INDEPENDENT_CODE ON) + target_link_libraries(glslang OGLCompiler OSDependent) +-target_include_directories(glslang PUBLIC ..) + + if(WIN32 AND BUILD_SHARED_LIBS) + set_target_properties(glslang PROPERTIES PREFIX "") +@@ -105,10 +104,15 @@ if(WIN32) + endif(WIN32) + + if(ENABLE_GLSLANG_INSTALL) +- if(BUILD_SHARED_LIBS) +- install(TARGETS glslang ++ if(BUILD_SHARED_LIBS OR TRUE) ++ install(TARGETS glslang EXPORT glslangConfig + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install( ++ EXPORT glslangConfig ++ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/glslang" ++ NAMESPACE glslang:: ++ ) + else() + install(TARGETS glslang + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +diff --git a/glslang/OSDependent/Unix/CMakeLists.txt b/glslang/OSDependent/Unix/CMakeLists.txt +index e652f45..a9673fe 100644 +--- a/glslang/OSDependent/Unix/CMakeLists.txt ++++ b/glslang/OSDependent/Unix/CMakeLists.txt +@@ -20,6 +20,6 @@ else() + endif() + + if(ENABLE_GLSLANG_INSTALL) +- install(TARGETS OSDependent ++ install(TARGETS OSDependent EXPORT glslangConfig + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif(ENABLE_GLSLANG_INSTALL) +diff --git a/hlsl/CMakeLists.txt b/hlsl/CMakeLists.txt +index f918d7a..329800f 100644 +--- a/hlsl/CMakeLists.txt ++++ b/hlsl/CMakeLists.txt +@@ -32,8 +32,8 @@ if(WIN32) + endif(WIN32) + + if(ENABLE_GLSLANG_INSTALL) +- if(BUILD_SHARED_LIBS) +- install(TARGETS HLSL ++ if(BUILD_SHARED_LIBS OR TRUE) ++ install(TARGETS HLSL EXPORT glslangConfig + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + else() diff --git a/vcpkg/ports/glslang/CMakeLists-windows.patch b/vcpkg/ports/glslang/CMakeLists-windows.patch new file mode 100644 index 0000000..76ccf60 --- /dev/null +++ b/vcpkg/ports/glslang/CMakeLists-windows.patch @@ -0,0 +1,12 @@ +diff --git a/glslang/OSDependent/Windows/CMakeLists.txt b/glslang/OSDependent/Windows/CMakeLists.txt +index f257418..82a3f3c 100644 +--- a/glslang/OSDependent/Windows/CMakeLists.txt ++++ b/glslang/OSDependent/Windows/CMakeLists.txt +@@ -15,6 +15,6 @@ if(WIN32) + endif(WIN32) + + if(ENABLE_GLSLANG_INSTALL) +- install(TARGETS OSDependent ++ install(TARGETS OSDependent EXPORT glslangConfig + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif(ENABLE_GLSLANG_INSTALL) diff --git a/vcpkg/ports/glslang/CONTROL b/vcpkg/ports/glslang/CONTROL new file mode 100644 index 0000000..06f8f81 --- /dev/null +++ b/vcpkg/ports/glslang/CONTROL @@ -0,0 +1,4 @@ +Source: glslang +Version: 2019-03-05-1 +Homepage: https://github.com/KhronosGroup/glslang +Description: Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator \ No newline at end of file diff --git a/vcpkg/ports/glslang/copyright b/vcpkg/ports/glslang/copyright new file mode 100644 index 0000000..dfffea6 --- /dev/null +++ b/vcpkg/ports/glslang/copyright @@ -0,0 +1,35 @@ +// +//Copyright (C) 2002-2005 3Dlabs Inc. Ltd. +//Copyright (C) 2012-2013 LunarG, Inc. +// +//All rights reserved. +// +//Redistribution and use in source and binary forms, with or without +//modification, are permitted provided that the following conditions +//are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// +// Neither the name of 3Dlabs Inc. Ltd. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +//POSSIBILITY OF SUCH DAMAGE. +// diff --git a/vcpkg/ports/glslang/portfile.cmake b/vcpkg/ports/glslang/portfile.cmake new file mode 100644 index 0000000..1bb8121 --- /dev/null +++ b/vcpkg/ports/glslang/portfile.cmake @@ -0,0 +1,37 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KhronosGroup/glslang + REF f88e5824d2cfca5edc58c7c2101ec9a4ec36afac + SHA512 92dc287e8930db6e00bde23b770f763dc3cf8a405a37b682bbd65e1dbde1f1f5161543fcc70b09eef07a5ce8bbe8f368ef84ac75003c122f42d1f6b9eaa8bd50 + HEAD_REF master + PATCHES + CMakeLists-targets.patch + CMakeLists-windows.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_DEBUG_POSTFIX=d + -DSKIP_GLSLANG_INSTALL=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/glslang) + +vcpkg_copy_pdbs() + +file(RENAME "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/tools") +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") + +# Handle copyright +file(COPY ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/glslang) + +vcpkg_test_cmake(PACKAGE_NAME glslang) diff --git a/vcpkg/ports/glui/CONTROL b/vcpkg/ports/glui/CONTROL new file mode 100644 index 0000000..c4451d6 --- /dev/null +++ b/vcpkg/ports/glui/CONTROL @@ -0,0 +1,5 @@ +Source: glui +Version: 2019-11-30 +Description: GLUI is a GLUT-based C++ user interface library +Homepage: https://github.com/libglui/glui +Build-Depends: freeglut diff --git a/vcpkg/ports/glui/install-one-flavor.patch b/vcpkg/ports/glui/install-one-flavor.patch new file mode 100644 index 0000000..fb66d92 --- /dev/null +++ b/vcpkg/ports/glui/install-one-flavor.patch @@ -0,0 +1,70 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c0f7d32..8446f3c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -59,6 +59,22 @@ target_include_directories(glui_obj + # create static *and* shared libraries without double compilation + set_target_properties( glui_obj PROPERTIES POSITION_INDEPENDENT_CODE 1) + ++if (MSVC) ++ target_compile_options(glui_obj ++ PRIVATE ++ /D_CRT_SECURE_NO_WARNINGS ++ /wd4244 ++ /wd4305 ++ ) ++endif() ++ ++if(BUILD_SHARED_LIBS) ++ if(WIN32) ++ target_compile_definitions(glui_obj ++ PRIVATE GLUI_BUILDING_LIB ++ PUBLIC GLUIDLL ++ ) ++ endif() + add_library(glui SHARED $) + target_include_directories(glui + PUBLIC +@@ -71,7 +87,7 @@ set_target_properties(glui PROPERTIES + DEBUG_POSTFIX "d" + VERSION ${PROJECT_VERSION} + SOVERSION ${PROJECT_VERSION}) +- ++else() + add_library(glui_static STATIC $) + target_include_directories(glui_static + PUBLIC +@@ -81,7 +97,9 @@ target_include_directories(glui_static + ${GLUT_INCLUDE_DIR}) + target_link_libraries(glui_static PUBLIC ${GLUT_LIBRARIES} ${OPENGL_LIBRARIES}) + set_target_properties(glui_static PROPERTIES DEBUG_POSTFIX "d") ++endif() + ++if(GLUI_BUILD_EXAMPLES) + add_executable(ppm2array tools/ppm.cpp tools/ppm2array.cpp) + target_link_libraries(ppm2array) + +@@ -97,7 +115,7 @@ add_executable(example5 example/example5.cpp) + target_link_libraries(example5 glui_static ${GLUT_LIBRARIES} ${OPENGL_LIBRARIES}) + add_executable(example6 example/example6.cpp) + target_link_libraries(example6 glui_static ${GLUT_LIBRARIES} ${OPENGL_LIBRARIES}) +- ++endif() + + + #### +@@ -130,8 +148,13 @@ configure_package_config_file( + ) + + # Targets: ++if(BUILD_SHARED_LIBS) ++ set(glui_target glui) ++else() ++ set(glui_target glui_static) ++endif() + install( +- TARGETS glui_static glui ++ TARGETS ${glui_target} + EXPORT "${targets_export_name}" + LIBRARY DESTINATION "lib" + ARCHIVE DESTINATION "lib" diff --git a/vcpkg/ports/glui/portfile.cmake b/vcpkg/ports/glui/portfile.cmake new file mode 100644 index 0000000..a3b37a5 --- /dev/null +++ b/vcpkg/ports/glui/portfile.cmake @@ -0,0 +1,37 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libglui/glui + REF 093edc777c02118282910bdee59f8db1bd46a84d + SHA512 650e169a6a55cd7d599176ac0767cd95b511fbc0a9b27aab2fa4f94a6395fa1a5762b6c23f5f1a9fc5ac9ce70c44fee4e4cbb6d6afd2307130cedfb80aae877a + HEAD_REF master + PATCHES + install-one-flavor.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} +) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/include/GL/glui.h + "ifdef GLUIDLL" + "if 1 //ifdef GLUIDLL" + ) +endif() + +file(INSTALL ${SOURCE_PATH}/license.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/glui/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/glui/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..6fefefc --- /dev/null +++ b/vcpkg/ports/glui/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,9 @@ +_find_package(${ARGS}) + +if(TARGET glui::glui AND NOT TARGET glui::glui_static) + add_library(glui::glui_static INTERFACE IMPORTED) + set_target_properties(glui::glui_static PROPERTIES INTERFACE_LINK_LIBRARIES glui::glui) +elseif(TARGET glui::glui_static AND NOT TARGET glui::glui) + add_library(glui::glui INTERFACE IMPORTED) + set_target_properties(glui::glui PROPERTIES INTERFACE_LINK_LIBRARIES glui::glui_static) +endif() diff --git a/vcpkg/ports/gmime/CMakeLists.txt b/vcpkg/ports/gmime/CMakeLists.txt new file mode 100644 index 0000000..51ea75c --- /dev/null +++ b/vcpkg/ports/gmime/CMakeLists.txt @@ -0,0 +1,57 @@ +cmake_minimum_required(VERSION 3.8) + +project(gmime C) + +set(GMIME_DLL_SUFFIX 3) +set(GMIME_LIB_SUFFIX 3.0) + +find_package(zlib REQUIRED) +find_package(unofficial-glib CONFIG REQUIRED) +find_package(unofficial-iconv REQUIRED) + +find_library(IDN_LIBRARY NAMES libidn2) + +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) +endif() + +add_definitions(-DHAVE_CONFIG_H) +add_definitions(-DG_DISABLE_DEPRECATED) +add_definitions(-DG_LOG_DOMAIN="GMime") + +# Source files +file(GLOB LIB_SRC gmime/gmime-*.c) +list(APPEND LIB_SRC gmime/gmime.c + gmime/internet-address.c + util/packed.c + util/url-scanner.c + util/gtrie.c) + +# Headers +file(GLOB LIB_HEADERS gmime/gmime-*.h) +list(APPEND LIB_HEADERS gmime/gmime.h) +list(APPEND LIB_HEADERS gmime/internet-address.h) + +if(MSVC AND BUILD_SHARED_LIBS) + set(MSVC_SRC gmime.def) +endif() + +add_library(${PROJECT_NAME} ${LIB_SRC} ${MSVC_SRC}) + +set_target_properties(${PROJECT_NAME} PROPERTIES + OUTPUT_NAME ${PROJECT_NAME}-${GMIME_DLL_SUFFIX} + ARCHIVE_OUTPUT_NAME ${PROJECT_NAME}-${GMIME_LIB_SUFFIX} +) + +target_include_directories(${PROJECT_NAME} PRIVATE . ./util) +target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::iconv::libiconv ZLIB::ZLIB ${IDN_LIBRARY}) +target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::glib::gobject unofficial::glib::gio unofficial::glib::glib) +target_link_libraries(${PROJECT_NAME} PRIVATE Ws2_32.lib) + +install(TARGETS ${PROJECT_NAME} + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +install(FILES ${LIB_HEADERS} DESTINATION include/gmime) diff --git a/vcpkg/ports/gmime/CONTROL b/vcpkg/ports/gmime/CONTROL new file mode 100644 index 0000000..7020073 --- /dev/null +++ b/vcpkg/ports/gmime/CONTROL @@ -0,0 +1,6 @@ +Source: gmime +Version: 3.2.6 +Build-Depends: zlib, glib, libiconv, libidn2 +Homepage: https://developer.gnome.org/gmime/ +Description: GMime is a C/C++ library which may be used for the creation and parsing of messages using the Multipurpose Internet Mail Extension (MIME). +Supports: windows \ No newline at end of file diff --git a/vcpkg/ports/gmime/portfile.cmake b/vcpkg/ports/gmime/portfile.cmake new file mode 100644 index 0000000..524bd78 --- /dev/null +++ b/vcpkg/ports/gmime/portfile.cmake @@ -0,0 +1,39 @@ +include(vcpkg_common_functions) + +set(LIB_NAME gmime) +set(LIB_VERSION 3.2.6) + +set(LIB_FILENAME ${LIB_NAME}-${LIB_VERSION}.tar.xz) + +vcpkg_download_distfile(ARCHIVE + URLS "https://download.gnome.org/sources/gmime/3.2/${LIB_FILENAME}" + FILENAME "${LIB_FILENAME}" + SHA512 a60d3f9f1aa8490865c22cd9539544e9c9f3ceb4037b9749cf9e5c279f97aa88fc4cd077bf2aff314ba0db2a1b7bbe76f9b1ca5a17fffcbd6315ecebc5414a3d +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${LIB_VERSION} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +# We can use file supplied with original sources +configure_file(${SOURCE_PATH}/build/vs2017/unistd.h ${SOURCE_PATH} COPYONLY) +configure_file(${SOURCE_PATH}/build/vs2017/config.h ${SOURCE_PATH} COPYONLY) +configure_file(${SOURCE_PATH}/build/vs2017/gmime.def ${SOURCE_PATH} COPYONLY) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# License and man +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${LIB_NAME} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/gmmlib/CONTROL b/vcpkg/ports/gmmlib/CONTROL new file mode 100644 index 0000000..6393639 --- /dev/null +++ b/vcpkg/ports/gmmlib/CONTROL @@ -0,0 +1,4 @@ +Source: gmmlib +Version: 19.4.1 +Description: intel's graphics memory management library +Supports: linux \ No newline at end of file diff --git a/vcpkg/ports/gmmlib/portfile.cmake b/vcpkg/ports/gmmlib/portfile.cmake new file mode 100644 index 0000000..17ef252 --- /dev/null +++ b/vcpkg/ports/gmmlib/portfile.cmake @@ -0,0 +1,32 @@ +include(vcpkg_common_functions) + +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "Intel gmmlib currently only supports Linux platforms") +endif() + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO intel/gmmlib + REF ebfcfd565031dbd7b45089d9054cd44a501f14a9 # intel-gmmlib-19.4.1 + SHA512 3528043065324aeef35e520a6b185970288f778951259cf6cc7350520705a0ca24d260e21ac9b5b87e9b21524314c3dd4989bce595c92d4c96d42e170385127f + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DARCH=64 +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/gmmlib/copyright COPYONLY) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/igdgmm/GmmLib/Scripts) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/igdgmm/GmmLib/Resource) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/igdgmm/GmmLib/GlobalInfo) diff --git a/vcpkg/ports/gmp/portfile.cmake b/vcpkg/ports/gmp/portfile.cmake new file mode 100644 index 0000000..b8a2896 --- /dev/null +++ b/vcpkg/ports/gmp/portfile.cmake @@ -0,0 +1,110 @@ +if(EXISTS "${CURRENT_INSTALLED_DIR}/include/gmp.h" OR "${CURRENT_INSTALLED_DIR}/include/gmpxx.h") + message(FATAL_ERROR "Can't build ${PORT} if mpir is installed. Please remove mpir, and try install ${PORT} again if you need it.") +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ShiftMediaProject/gmp + REF e140dfc8668e96d7e56cbd46467945adcc6b3cc4 #v6.2.0 + SHA512 3b646c142447946bb4556db01214ff130da917bc149946b8cf086f3b01e1cc3d664b941a30a42608799c14461b2f29e4b894b72915d723bd736513c8914729b7 + HEAD_REF master + PATCHES + vs.build.patch + runtime.patch + prefix.patch + ) + vcpkg_find_acquire_program(YASM) + get_filename_component(YASM_DIR "${YASM}" DIRECTORY) + vcpkg_add_to_path("${YASM_DIR}") + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(CONFIGURATION_RELEASE ReleaseDLL) + set(CONFIGURATION_DEBUG DebugDLL) + else() + set(CONFIGURATION_RELEASE Release) + set(CONFIGURATION_DEBUG Debug) + endif() + + if(VCPKG_TARGET_IS_UWP) + string(APPEND CONFIGURATION_RELEASE WinRT) + string(APPEND CONFIGURATION_DEBUG WinRT) + endif() + + #Setup YASM integration + set(_file "${SOURCE_PATH}/SMP/libgmp.vcxproj") + file(READ "${_file}" _contents) + string(REPLACE [[]] + "" + _contents "${_contents}") + string(REPLACE [[]] + "" + _contents "${_contents}") + string(REGEX REPLACE "${VCPKG_ROOT_DIR}/installed/[^/]+/share" "${CURRENT_INSTALLED_DIR}/share" _contents "${_contents}") # Above already replaced by another triplet + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + STRING(REPLACE ">MultiThreadedDebugDLL<" ">MultiThreadedDebug<" _contents "${_contents}") + STRING(REPLACE ">MultiThreadedDLL<" ">MultiThreaded<" _contents "${_contents}") + else() + STRING(REPLACE ">MultiThreadedDebug<" ">MultiThreadedDebugDLL<" _contents "${_contents}") + STRING(REPLACE ">MultiThreaded<" ">MultiThreadedDLL<" _contents "${_contents}") + endif() + file(WRITE "${_file}" "${_contents}") + + vcpkg_install_msbuild( + USE_VCPKG_INTEGRATION + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH SMP/libgmp.sln + PLATFORM ${TRIPLET_SYSTEM_ARCH} + LICENSE_SUBPATH COPYING.LESSERv3 + TARGET Rebuild + RELEASE_CONFIGURATION ${CONFIGURATION_RELEASE} + DEBUG_CONFIGURATION ${CONFIGURATION_DEBUG} + SKIP_CLEAN + OPTIONS /p:UseEnv=True + ) + get_filename_component(SOURCE_PATH_SUFFIX "${SOURCE_PATH}" NAME) + file(RENAME "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${SOURCE_PATH_SUFFIX}/msvc/include" "${CURRENT_PACKAGES_DIR}/include") + set(PACKAGE_VERSION 6.2.0) + set(PACKAGE_NAME gmp) + set(prefix "${CURRENT_INSTALLED_DIR}") + set(exec_prefix "\${prefix}") + set(libdir "\${prefix}/lib") + set(includedir "\${prefix}/include") + set(LIBS -lgmp) + configure_file("${SOURCE_PATH}/gmp.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/gmp.pc" @ONLY) + configure_file("${SOURCE_PATH}/gmpxx.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/gmpxx.pc" @ONLY) + set(prefix "${CURRENT_INSTALLED_DIR}/debug") + set(exec_prefix "\${prefix}") + set(libdir "\${prefix}/lib") + set(includedir "\${prefix}/../include") + set(LIBS -lgmpd) + configure_file("${SOURCE_PATH}/gmp.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gmp.pc" @ONLY) + configure_file("${SOURCE_PATH}/gmpxx.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/gmpxx.pc" @ONLY) + vcpkg_fixup_pkgconfig() +else() + vcpkg_download_distfile( + ARCHIVE + URLS https://gmplib.org/download/gmp/gmp-6.2.0.tar.xz + FILENAME gmp-6.2.0.tar.xz + SHA512 a066f0456f0314a1359f553c49fc2587e484ff8ac390ff88537266a146ea373f97a1c0ba24608bf6756f4eab11c9056f103c8deb99e5b57741b4f7f0ec44b90c) + + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF gmp-6.2.0 + ) + + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + OPTIONS ${OPTIONS} + ) + + vcpkg_install_make() + vcpkg_fixup_pkgconfig() + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share/") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + + # # Handle copyright + file(INSTALL "${SOURCE_PATH}/COPYINGv3" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +endif() \ No newline at end of file diff --git a/vcpkg/ports/gmp/prefix.patch b/vcpkg/ports/gmp/prefix.patch new file mode 100644 index 0000000..611c737 --- /dev/null +++ b/vcpkg/ports/gmp/prefix.patch @@ -0,0 +1,38 @@ +diff --git a/SMP/libgmp.vcxproj b/SMP/libgmp.vcxproj +index 2c5b8cdc6..157215394 100644 +--- a/SMP/libgmp.vcxproj ++++ b/SMP/libgmp.vcxproj +@@ -1574,14 +1574,14 @@ + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libgmpd ++ gmpd + $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libgmpd ++ gmpd + $(ProjectDir)..\msvc\ + Clean + MSB8012 +@@ -1630,14 +1630,14 @@ + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libgmp ++ gmp + $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libgmp ++ gmp + $(ProjectDir)..\msvc\ + Clean + MSB8012 diff --git a/vcpkg/ports/gmp/runtime.patch b/vcpkg/ports/gmp/runtime.patch new file mode 100644 index 0000000..b2f15d2 --- /dev/null +++ b/vcpkg/ports/gmp/runtime.patch @@ -0,0 +1,68 @@ +diff --git a/SMP/libgmp.vcxproj b/SMP/libgmp.vcxproj +index 3c774be11..e8919240b 100644 +--- a/SMP/libgmp.vcxproj ++++ b/SMP/libgmp.vcxproj +@@ -1846,6 +1846,7 @@ del /f /q $(OutDir)\licenses\gmp.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4101;4018;4307;4267;4334;4554;4267;4800;%(DisableSpecificWarnings) ++ MultiThreadedDebug + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -1929,6 +1930,7 @@ del /f /q $(OutDir)\licenses\gmp.txt + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4101;4018;4307;4267;4334;4554;4267;4800;%(DisableSpecificWarnings) + false ++ MultiThreadedDebug + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -2190,6 +2192,7 @@ del /f /q $(OutDir)\licenses\gmp.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4101;4018;4307;4267;4334;4554;4267;4800;%(DisableSpecificWarnings) ++ MultiThreadedDebugDLL + + + $(OutDir)\bin\x64\$(TargetName)$(TargetExt) +@@ -2278,6 +2281,7 @@ del /f /q $(OutDir)\licenses\gmp.txt + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4101;4018;4307;4267;4334;4554;4267;4800;%(DisableSpecificWarnings) + false ++ MultiThreadedDebugDLL + + + $(OutDir)\bin\x64\$(TargetName)$(TargetExt) +@@ -2549,6 +2553,7 @@ del /f /q $(OutDir)\licenses\gmp.txt + $(OutDir)\lib\x64\$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4101;4018;4307;4267;4334;4554;4267;4800;%(DisableSpecificWarnings) ++ MultiThreaded + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -2638,6 +2643,7 @@ del /f /q $(OutDir)\licenses\gmp.txt + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4101;4018;4307;4267;4334;4554;4267;4800;%(DisableSpecificWarnings) + false ++ MultiThreaded + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -2916,6 +2922,7 @@ del /f /q $(OutDir)\licenses\gmp.txt + $(IntDir)$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4101;4018;4307;4267;4334;4554;4267;4800;%(DisableSpecificWarnings) ++ MultiThreadedDLL + + + true +@@ -3011,6 +3018,7 @@ del /f /q $(OutDir)\licenses\gmp.txt + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4101;4018;4307;4267;4334;4554;4267;4800;%(DisableSpecificWarnings) + false ++ MultiThreadedDLL + + + true diff --git a/vcpkg/ports/gmp/vcpkg.json b/vcpkg/ports/gmp/vcpkg.json new file mode 100644 index 0000000..77b2371 --- /dev/null +++ b/vcpkg/ports/gmp/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "gmp", + "version-string": "6.2.0", + "port-version": 3, + "description": "The GNU Multiple Precision Arithmetic Library", + "homepage": "https://gmplib.org", + "dependencies": [ + { + "name": "vs-yasm", + "platform": "windows" + } + ] +} diff --git a/vcpkg/ports/gmp/vs.build.patch b/vcpkg/ports/gmp/vs.build.patch new file mode 100644 index 0000000..69aba99 --- /dev/null +++ b/vcpkg/ports/gmp/vs.build.patch @@ -0,0 +1,165 @@ +diff --git a/SMP/libgmp.vcxproj b/SMP/libgmp.vcxproj +index b4e06ae42..442d82c51 100644 +--- a/SMP/libgmp.vcxproj ++++ b/SMP/libgmp.vcxproj +@@ -1559,114 +1559,114 @@ + + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libgmpd ++ gmpd + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libgmpd_winrt ++ gmpd + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + libgmpd +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libgmpd_winrt +- $(ProjectDir)..\..\..\msvc\ ++ libgmpd ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + gmpd + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- gmpd_winrt ++ gmpd + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + gmpd +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- gmpd_winrt +- $(ProjectDir)..\..\..\msvc\ ++ gmpd ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libgmp ++ gmp + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libgmp_winrt ++ gmp + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + libgmp +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libgmp_winrt +- $(ProjectDir)..\..\..\msvc\ ++ libgmp ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + gmp + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- gmp_winrt ++ gmp + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + gmp +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- gmp_winrt +- $(ProjectDir)..\..\..\msvc\ ++ gmp ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + +diff --git a/gmp.pc.in b/gmp.pc.in +index bf1c799ad..d0c81be91 100644 +--- a/gmp.pc.in ++++ b/gmp.pc.in +@@ -8,4 +8,4 @@ Description: GNU Multiple Precision Arithmetic Library + URL: https://gmplib.org + Version: @PACKAGE_VERSION@ + Cflags: -I${includedir} +-Libs: -L${libdir} -lgmp ++Libs: -L${libdir} @LIBS@ +diff --git a/gmpxx.pc.in b/gmpxx.pc.in +index 181cc70c6..2b697ceab 100644 +--- a/gmpxx.pc.in ++++ b/gmpxx.pc.in +@@ -9,4 +9,4 @@ URL: https://gmplib.org + Version: @PACKAGE_VERSION@ + Requires: gmp + Cflags: -I${includedir} +-Libs: -L${libdir} -lgmpxx ++Libs: -L${libdir} @LIBS@ diff --git a/vcpkg/ports/google-cloud-cpp-common/CONTROL b/vcpkg/ports/google-cloud-cpp-common/CONTROL new file mode 100644 index 0000000..481343c --- /dev/null +++ b/vcpkg/ports/google-cloud-cpp-common/CONTROL @@ -0,0 +1,4 @@ +Source: google-cloud-cpp-common +Version: alias +Build-Depends: google-cloud-cpp +Description: Deprecated, use google-cloud-cpp instead diff --git a/vcpkg/ports/google-cloud-cpp-common/portfile.cmake b/vcpkg/ports/google-cloud-cpp-common/portfile.cmake new file mode 100644 index 0000000..065116c --- /dev/null +++ b/vcpkg/ports/google-cloud-cpp-common/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/vcpkg/ports/google-cloud-cpp-spanner/CONTROL b/vcpkg/ports/google-cloud-cpp-spanner/CONTROL new file mode 100644 index 0000000..69cc736 --- /dev/null +++ b/vcpkg/ports/google-cloud-cpp-spanner/CONTROL @@ -0,0 +1,4 @@ +Source: google-cloud-cpp-spanner +Version: alias +Build-Depends: google-cloud-cpp +Description: Deprecated, use google-cloud-cpp instead diff --git a/vcpkg/ports/google-cloud-cpp-spanner/portfile.cmake b/vcpkg/ports/google-cloud-cpp-spanner/portfile.cmake new file mode 100644 index 0000000..065116c --- /dev/null +++ b/vcpkg/ports/google-cloud-cpp-spanner/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/vcpkg/ports/google-cloud-cpp/CONTROL b/vcpkg/ports/google-cloud-cpp/CONTROL new file mode 100644 index 0000000..d24fd83 --- /dev/null +++ b/vcpkg/ports/google-cloud-cpp/CONTROL @@ -0,0 +1,6 @@ +Source: google-cloud-cpp +Version: 1.19.0 +Build-Depends: abseil, grpc, curl[ssl], crc32c, nlohmann-json +Description: C++ Client Libraries for Google Cloud Platform APIs. +Homepage: https://github.com/googleapis/google-cloud-cpp +Supports: !uwp diff --git a/vcpkg/ports/google-cloud-cpp/portfile.cmake b/vcpkg/ports/google-cloud-cpp/portfile.cmake new file mode 100644 index 0000000..3bcfc06 --- /dev/null +++ b/vcpkg/ports/google-cloud-cpp/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO googleapis/google-cloud-cpp + REF v1.19.0 + SHA512 41a4784bde3f9390494d3f9d48748db463f5239e14995d91e4396e85737a5970863b52afedf0b279c3aaf7958736c783bc258b4001eeb84152a9a1ec5d97b8de + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DGOOGLE_CLOUD_CPP_ENABLE_MACOS_OPENSSL_CHECK=OFF + -DGOOGLE_CLOUD_CPP_ENABLE_WERROR=OFF + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake(ADD_BIN_TO_PATH) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/googleapis/CONTROL b/vcpkg/ports/googleapis/CONTROL new file mode 100644 index 0000000..08a9ee1 --- /dev/null +++ b/vcpkg/ports/googleapis/CONTROL @@ -0,0 +1,4 @@ +Source: googleapis +Version: alias +Build-Depends: google-cloud-cpp +Description: Deprecated, use google-cloud-cpp instead. diff --git a/vcpkg/ports/googleapis/portfile.cmake b/vcpkg/ports/googleapis/portfile.cmake new file mode 100644 index 0000000..065116c --- /dev/null +++ b/vcpkg/ports/googleapis/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/vcpkg/ports/googleapis/usage b/vcpkg/ports/googleapis/usage new file mode 100644 index 0000000..00ca628 --- /dev/null +++ b/vcpkg/ports/googleapis/usage @@ -0,0 +1,6 @@ +The package googleapis is compatible with built-in CMake targets: + + find_package(googleapis CONFIG REQUIRED) + + # Then link against the proto libraries that you want to use, for example: + target_link_libraries(main PRIVATE googleapis-c++::bigtable_protos gRPC::grpc gRPC::grpc++) diff --git a/vcpkg/ports/gperf/CMakeLists.txt b/vcpkg/ports/gperf/CMakeLists.txt new file mode 100644 index 0000000..d9cad0d --- /dev/null +++ b/vcpkg/ports/gperf/CMakeLists.txt @@ -0,0 +1,53 @@ +cmake_minimum_required(VERSION 3.0) +project(gperf LANGUAGES C CXX) + +include(CheckCXXSourceCompiles) +include(GNUInstallDirs) + +CHECK_CXX_SOURCE_COMPILES("int main(int n) { int dynamic_array[n]; }" HAVE_DYNAMIC_ARRAY) + +set(LIBGP_SOURCES + lib/getline.cc + lib/getline.h + lib/getopt.c + lib/getopt.h + lib/getopt1.c + lib/hash.cc + lib/hash.h) +add_library(gp STATIC ${LIBGP_SOURCES}) +target_include_directories(gp PUBLIC "${CMAKE_SOURCE_DIR}/lib") + +set(GPERF_SOURCES + src/bool-array.cc + src/bool-array.h + src/bool-array.icc + src/hash-table.cc + src/hash-table.h + src/input.cc + src/input.h + src/keyword-list.cc + src/keyword-list.h + src/keyword-list.icc + src/keyword.cc + src/keyword.h + src/keyword.icc + src/main.cc + src/options.cc + src/options.h + src/options.icc + src/output.cc + src/output.h + src/positions.cc + src/positions.h + src/positions.icc + src/search.cc + src/search.h + src/version.cc + src/version.h) +add_executable(gperf ${GPERF_SOURCES}) +target_link_libraries(gperf gp) +target_include_directories(gperf PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") + +configure_file(config.h.in config.h @ONLY) + +install(TARGETS gperf RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/vcpkg/ports/gperf/CONTROL b/vcpkg/ports/gperf/CONTROL new file mode 100644 index 0000000..34d19df --- /dev/null +++ b/vcpkg/ports/gperf/CONTROL @@ -0,0 +1,4 @@ +Source: gperf +Version: 3.1-1 +Description: GNU perfect hash function generator +Homepage: https://www.gnu.org/software/gperf/ diff --git a/vcpkg/ports/gperf/config.h.in b/vcpkg/ports/gperf/config.h.in new file mode 100644 index 0000000..f1f643d --- /dev/null +++ b/vcpkg/ports/gperf/config.h.in @@ -0,0 +1 @@ +#cmakedefine HAVE_DYNAMIC_ARRAY @HAVE_DYNAMIC_ARRAY@ diff --git a/vcpkg/ports/gperf/portfile.cmake b/vcpkg/ports/gperf/portfile.cmake new file mode 100644 index 0000000..8531426 --- /dev/null +++ b/vcpkg/ports/gperf/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) + +vcpkg_download_distfile(ARCHIVE + URLS http://ftp.gnu.org/pub/gnu/gperf/gperf-3.1.tar.gz + FILENAME gperf-3.1.tar.gz + SHA512 855ebce5ff36753238a44f14c95be7afdc3990b085960345ca2caf1a2db884f7db74d406ce9eec2f4a52abb8a063d4ed000a36b317c9a353ef4e25e2cca9a3f4 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.in DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_RELEASE -DCMAKE_INSTALL_BINDIR=tools +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() diff --git a/vcpkg/ports/gperftools/CMakeLists.txt b/vcpkg/ports/gperftools/CMakeLists.txt new file mode 100644 index 0000000..a4bf860 --- /dev/null +++ b/vcpkg/ports/gperftools/CMakeLists.txt @@ -0,0 +1,211 @@ +cmake_minimum_required(VERSION 3.5) + +project(gperftools LANGUAGES C CXX) + +include(GNUInstallDirs) + +option(GPERFTOOLS_BUILD_TOOLS "Build tools" ON) + +if(WIN32) # TODO: MINGW, MSYS + option(GPERFTOOLS_WIN32_OVERRIDE "Override allocators" OFF) +endif() + +set(deprecated_public_headers + src/google/heap-checker.h + src/google/heap-profiler.h + src/google/malloc_extension.h + src/google/malloc_extension_c.h + src/google/malloc_hook.h + src/google/malloc_hook_c.h + src/google/profiler.h + src/google/stacktrace.h +) + +set(gperftools_public_headers + src/gperftools/heap-checker.h + src/gperftools/heap-profiler.h + src/gperftools/malloc_extension.h + src/gperftools/malloc_extension_c.h + src/gperftools/malloc_hook.h + src/gperftools/malloc_hook_c.h + src/gperftools/nallocx.h + src/gperftools/profiler.h + src/gperftools/stacktrace.h +) + +if(WIN32) # TODO: MINGW, MSYS + list(APPEND deprecated_public_headers + src/windows/google/tcmalloc.h + ) + + list(APPEND gperftools_public_headers + src/windows/gperftools/tcmalloc.h + ) + + set(libtcmalloc_minimal_headers + src/addressmap-inl.h + src/base/arm_instruction_set_select.h + src/base/atomicops-internals-arm-generic.h + src/base/atomicops-internals-arm-v6plus.h + src/base/atomicops-internals-gcc.h + src/base/atomicops-internals-linuxppc.h + src/base/atomicops-internals-macosx.h + src/base/atomicops-internals-mips.h + src/base/atomicops-internals-windows.h + src/base/atomicops-internals-x86.h + src/base/atomicops.h + src/base/basictypes.h + src/base/commandlineflags.h + src/base/googleinit.h + src/base/logging.h + src/base/low_level_alloc.h + src/base/spinlock.h + src/base/spinlock_internal.h + src/base/spinlock_linux-inl.h + src/base/spinlock_posix-inl.h + src/base/spinlock_win32-inl.h + src/base/stl_allocator.h + src/base/sysinfo.h + src/base/thread_annotations.h + src/central_freelist.h + src/common.h + src/gperftools/heap-checker.h + src/gperftools/heap-profiler.h + src/gperftools/malloc_extension.h + src/gperftools/malloc_hook.h + src/gperftools/profiler.h + src/gperftools/stacktrace.h + src/heap-profile-table.h + src/internal_logging.h + src/malloc_hook-inl.h + src/memory_region_map.h + src/packed-cache-inl.h + src/pagemap.h + src/page_heap.h + src/page_heap_allocator.h + src/raw_printer.h + src/sampler.h + src/span.h + src/stacktrace_win32-inl.h + src/stack_trace_table.h + src/static_vars.h + src/symbolize.h + src/system-alloc.h + src/tcmalloc.h + src/thread_cache.h + src/windows/config.h + src/windows/mini_disassembler.h + src/windows/mini_disassembler_types.h + src/windows/port.h + src/windows/preamble_patcher.h + ) + + set(libtcmalloc_minimal_sources + src/base/dynamic_annotations.c + src/base/logging.cc + src/base/low_level_alloc.cc + src/base/spinlock.cc + src/base/spinlock_internal.cc + src/base/sysinfo.cc + src/central_freelist.cc + src/common.cc + src/fake_stacktrace_scope.cc + src/heap-profile-table.cc + src/internal_logging.cc + src/malloc_extension.cc + src/malloc_hook.cc + src/memory_region_map.cc + src/page_heap.cc + src/raw_printer.cc + src/sampler.cc + src/span.cc + src/stacktrace.cc + src/stack_trace_table.cc + src/static_vars.cc + src/symbolize.cc + src/thread_cache.cc + src/windows/ia32_modrm_map.cc + src/windows/ia32_opcode_map.cc + src/windows/mini_disassembler.cc + src/windows/port.cc + src/windows/preamble_patcher.cc + src/windows/preamble_patcher_with_stub.cc + src/windows/system-alloc.cc + ) + + if(GPERFTOOLS_WIN32_OVERRIDE) + list(APPEND libtcmalloc_minimal_sources src/windows/override_functions.cc) + else() + list(APPEND libtcmalloc_minimal_sources src/windows/patch_functions.cc) + endif() + + set_property(GLOBAL PROPERTY USE_FOLDERS ON) + source_group("Header Files" FILES ${libtcmalloc_minimal_headers}) + source_group("Source Files" FILES ${libtcmalloc_minimal_sources}) + + if(GPERFTOOLS_WIN32_OVERRIDE) + add_library(libtcmalloc_minimal + STATIC + ${libtcmalloc_minimal_headers} + ${libtcmalloc_minimal_sources} + ) + else() + add_library(libtcmalloc_minimal + ${libtcmalloc_minimal_headers} + ${libtcmalloc_minimal_sources} + ) + endif() + + target_compile_definitions( + libtcmalloc_minimal + PRIVATE + $<$: + WIN32_OVERRIDE_ALLOCATORS + PERFTOOLS_DLL_DECL= + > + ) + + target_compile_options( + libtcmalloc_minimal + PRIVATE + $<$: + /wd4141 + /wd4251 + > + ) + + target_include_directories( + libtcmalloc_minimal + PUBLIC + $ + ) + + install(FILES ${deprecated_public_headers} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/google + ) + + install(FILES ${gperftools_public_headers} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/gperftools + ) + + install(TARGETS libtcmalloc_minimal + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + ) + + if(GPERFTOOLS_BUILD_TOOLS) + add_executable(addr2line-pdb src/windows/addr2line-pdb.c) + target_link_libraries(addr2line-pdb PRIVATE DbgHelp) + + add_executable(nm-pdb src/windows/nm-pdb.c) + target_link_libraries(nm-pdb PRIVATE DbgHelp) + + install(TARGETS addr2line-pdb nm-pdb DESTINATION ${CMAKE_INSTALL_BINDIR}) + endif() +else() +endif() diff --git a/vcpkg/ports/gperftools/CONTROL b/vcpkg/ports/gperftools/CONTROL new file mode 100644 index 0000000..0d7e536 --- /dev/null +++ b/vcpkg/ports/gperftools/CONTROL @@ -0,0 +1,11 @@ +Source: gperftools +Version: 2019-09-02 +Description: A set of tools for performance profiling and memory checking +Supports: !(arm|arm64|uwp) +Homepage: https://github.com/gperftools/gperftools + +Feature: override +Description: Override allocators + +Feature: tools +Description: Build gperftools CLI tools diff --git a/vcpkg/ports/gperftools/portfile.cmake b/vcpkg/ports/gperftools/portfile.cmake new file mode 100644 index 0000000..01ee219 --- /dev/null +++ b/vcpkg/ports/gperftools/portfile.cmake @@ -0,0 +1,83 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO gperftools/gperftools + REF fe62a0baab87ba3abca12f4a621532bf67c9a7d2 + SHA512 fc0fb2c56d38046ac7bc2d36863dabf073b7aede7ce18916228d7b9f64cf33ae754708bff028353ada52bf4b79a7cd3e3334c1558a9ba64b06326b1537faf690 + HEAD_REF master +) + +if(VCPKG_TARGET_IS_WINDOWS) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + + if(override IN_LIST FEATURES) + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message(STATUS "${PORT}[override] only supports static library linkage. Building static library.") + vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_STATIC_CRT) + endif() + endif() + + vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + override GPERFTOOLS_WIN32_OVERRIDE + tools GPERFTOOLS_BUILD_TOOLS + ) + + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + ${FEATURE_OPTIONS} + ) + + vcpkg_install_cmake() + + vcpkg_copy_pdbs() + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(GLOB gperf_public_headers ${CURRENT_PACKAGES_DIR}/include/gperftools/*.h) + + foreach(gperf_header ${gperf_public_headers}) + vcpkg_replace_string(${gperf_header} "__declspec(dllimport)" "") + endforeach() + endif() + + if(tools IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES addr2line-pdb nm-pdb AUTO_CLEAN) + endif() +else() + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(BUILD_OPTS --enable-shared --disable-static) + else() + set(BUILD_OPTS --enable-static --disable-shared) + endif() + + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + OPTIONS + ${BUILD_OPTS} + ) + + vcpkg_install_make() + + if(tools IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES pprof pprof-symbolize AUTO_CLEAN) + endif() + + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ) + + # https://github.com/microsoft/vcpkg/pull/8750#issuecomment-625590773 + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") + endif() +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/gppanel/00001-fix-build.patch b/vcpkg/ports/gppanel/00001-fix-build.patch new file mode 100644 index 0000000..bf394d6 --- /dev/null +++ b/vcpkg/ports/gppanel/00001-fix-build.patch @@ -0,0 +1,24 @@ +diff --git a/gpPanel/gpPanel.cpp b/gpPanel/gpPanel.cpp +index 7af20b5..908523c 100644 +--- a/gpPanel/gpPanel.cpp ++++ b/gpPanel/gpPanel.cpp +@@ -720,8 +720,8 @@ void gpPanel::OnMenuItemPrintPreview(wxCommandEvent& event) + gpLayer_s *gp = GetLayerByMenuId(event.GetId() ); + if(gp==NULL)return; + +- mpPrintout *plotPrint = new mpPrintout(gp->m_plot, gp->layer->GetName()); +- mpPrintout *plotPrintPreview = new mpPrintout(gp->m_plot, gp->layer->GetName()); ++ mpPrintout *plotPrint = new mpPrintout(gp->m_plot, gp->layer->GetName().c_str()); ++ mpPrintout *plotPrintPreview = new mpPrintout(gp->m_plot, gp->layer->GetName().c_str()); + + wxPrintPreview *preview = new wxPrintPreview(plotPrintPreview, plotPrint); + +@@ -765,7 +765,7 @@ void gpPanel::OnMenuItemSaveScreenshot(wxCommandEvent& event) + if(index!=-1) + { + wxString reso = aChoices.Item(index); +- if( reso.CompareTo(_("custom")) == 0 ){ ++ if( reso.CompareTo(_("custom").c_str()) == 0 ){ + reso = wxGetTextFromUser(_("Write image resolution (format: [width]x[height]"), _("Custom resolution for image"), _("640x480"), this); + } + if(reso.Find('x') != -1) diff --git a/vcpkg/ports/gppanel/CMakeLists.txt b/vcpkg/ports/gppanel/CMakeLists.txt new file mode 100644 index 0000000..ba3f22f --- /dev/null +++ b/vcpkg/ports/gppanel/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required(VERSION 3.13) +project(gpPanel CXX) + +set(wxWidgets_EXCLUDE_COMMON_LIBRARIES TRUE) +find_package(wxWidgets REQUIRED COMPONENTS core base) +include(${wxWidgets_USE_FILE}) + +file(GLOB_RECURSE SOURCES "gpPanel/*.cpp") +file(GLOB HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/include" "include/*.h") + +add_library(gpPanel STATIC ${SOURCES}) +target_compile_definitions(gpPanel PRIVATE _CRT_SECURE_NO_WARNINGS) + +target_include_directories(gpPanel PUBLIC + $ + $ +) + +target_link_libraries(gpPanel PRIVATE ${wxWidgets_LIBRARIES}) + +install(TARGETS gpPanel EXPORT gpPanel-config + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +install(EXPORT gpPanel-config DESTINATION share/cmake/gpPanel) + +foreach (HEADER ${HEADERS} ) + get_filename_component(HEADER_DIR ${HEADER} DIRECTORY) + install(FILES include/${HEADER} DESTINATION include/gpPanel/${HEADER_DIR}) +endforeach() diff --git a/vcpkg/ports/gppanel/CONTROL b/vcpkg/ports/gppanel/CONTROL new file mode 100644 index 0000000..f081193 --- /dev/null +++ b/vcpkg/ports/gppanel/CONTROL @@ -0,0 +1,5 @@ +Source: gppanel +Version: 2020-05-20 +Build-Depends: wxwidgets +Homepage: https://github.com/woollybah/gppanel +Description: gpPanel is chart libary for wxWidget. It inheritance from wxPanel and use modified wxMathPlot library at chart engine. diff --git a/vcpkg/ports/gppanel/portfile.cmake b/vcpkg/ports/gppanel/portfile.cmake new file mode 100644 index 0000000..d86ac09 --- /dev/null +++ b/vcpkg/ports/gppanel/portfile.cmake @@ -0,0 +1,40 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO woollybah/gppanel + REF f58a9028f7c9a8e9b4324ff2165951f558365f90 + SHA512 4ec5fbef4c487d351c60f48b0c0e41c5d077989ab96f827b9fd5ef01c167d50f39a313bd82db1b5df19d14025983e83db4d19cc4048c1c50fc8ef9128de15575 + HEAD_REF master + PATCHES 00001-fix-build.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_from_github( + OUT_SOURCE_PATH VCPKG_WX_FIND_SOURCE_PATH + REPO CaeruleusAqua/vcpkg-wx-find + REF 17993e942f677799b488a06ca659a8e46ff272c9 + SHA512 0fe07d3669f115c9b6a761abd7743f87e67f24d1eae3f3abee4715fa4d6b76af0d1ea3a4bd82dbdbed430ae50295e1722615ce0ee7d46182125f5048185ee153 + HEAD_REF master +) + +file(COPY ${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake DESTINATION ${VCPKG_WX_FIND_SOURCE_PATH}) +file(COPY ${CMAKE_ROOT}/Modules/FindPackageMessage.cmake DESTINATION ${VCPKG_WX_FIND_SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_MODULE_PATH=${VCPKG_WX_FIND_SOURCE_PATH} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/gpPanel) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/gpPanel/copyright COPYONLY) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/gpPanel) diff --git a/vcpkg/ports/gppanel/usage b/vcpkg/ports/gppanel/usage new file mode 100644 index 0000000..1ad1e6c --- /dev/null +++ b/vcpkg/ports/gppanel/usage @@ -0,0 +1,4 @@ +The package gppanel provides CMake targets: + + find_package(gpPanel CONFIG REQUIRED) + target_link_libraries(main PRIVATE gpPanel) diff --git a/vcpkg/ports/graphicsmagick/CMakeLists.txt b/vcpkg/ports/graphicsmagick/CMakeLists.txt new file mode 100644 index 0000000..4dcf2d6 --- /dev/null +++ b/vcpkg/ports/graphicsmagick/CMakeLists.txt @@ -0,0 +1,277 @@ +cmake_minimum_required (VERSION 3.6) +project (graphicsmagick) + +find_package(ZLIB REQUIRED) +find_package(BZip2 REQUIRED) +find_package(JPEG REQUIRED) +find_package(PNG REQUIRED) +find_package(TIFF REQUIRED) +find_package(Freetype REQUIRED) + +add_definitions(-D_MAGICKLIB_ -D_WANDLIB_ -DMAGICK_IMPLEMENTATION) + +if (BUILD_SHARED_LIBS) + add_definitions(-D_DLL -DDLL) +endif () + +if (MSVC) + add_definitions( -D_VISUALC_ -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE) +endif () + +if (WIN32) + add_definitions(-DWIN32 -D_WIN32) + add_definitions(-D_WIN32_WINNT=0x0501) +endif () + +include_directories(".") +include_directories("magick") +include_directories("Magick++") +include_directories("Magick++/lib") +include_directories("wand") +include_directories("jbig/libjbig") + +file(READ "magick/magick_config.h.in" CONFIG_H) +string(REPLACE "#undef HasBZLIB" "#define HasBZLIB" CONFIG_H "${CONFIG_H}") +string(REPLACE "#undef HasJPEG" "#define HasJPEG" CONFIG_H "${CONFIG_H}") +string(REPLACE "#undef HasPNG" "#define HasPNG" CONFIG_H "${CONFIG_H}") +string(REPLACE "#undef HasTIFF" "#define HasTIFF" CONFIG_H "${CONFIG_H}") +string(REPLACE "#undef HasTTF" "#define HasTTF" CONFIG_H "${CONFIG_H}") +string(REPLACE "#undef HasTTF" "#define HasTTF" CONFIG_H "${CONFIG_H}") +string(REPLACE "#undef HAVE_FT2BUILD_H" "#define HAVE_FT2BUILD_H" CONFIG_H "${CONFIG_H}") +string(REPLACE "#undef HasZLIB" "#define HasZLIB" CONFIG_H "${CONFIG_H}") +string(REPLACE "#undef HasJBIG" "#define HasJBIG" CONFIG_H "${CONFIG_H}") +string(REPLACE "#undef QuantumDepth" "#define QuantumDepth 16" CONFIG_H "${CONFIG_H}") +string(REPLACE "#undef restrict" "#define restrict" CONFIG_H "${CONFIG_H}") +string(REPLACE "#undef size_t" "/* #undef size_t */" CONFIG_H "${CONFIG_H}") +if (WIN32) +string(REPLACE "#undef HasWINGDI32" "#define HasWINGDI32" CONFIG_H "${CONFIG_H}") +else () +string(REPLACE "#undef HAVE_VSNPRINTF" "#define HAVE_VSNPRINTF" CONFIG_H "${CONFIG_H}") +string(REPLACE "#undef MagickLibSubdir" "#define MagickLibSubdir \"magick\"" CONFIG_H "${CONFIG_H}") +string(REPLACE "#undef MagickLibConfigSubDir" "#define MagickLibConfigSubDir \"magick/config\"" CONFIG_H "${CONFIG_H}") +string(REPLACE "#undef MagickShareConfigSubDir" "#define MagickShareConfigSubDir \"magick/config\"" CONFIG_H "${CONFIG_H}") +endif () +file(WRITE "magick/magick_config.h" "${CONFIG_H}") + +file(READ "magick/magick_config_api.h.in" CONFIG_API_H) +string(REPLACE "#undef QuantumDepth" "#define QuantumDepth 16" CONFIG_API_H "${CONFIG_API_H}") +string(REPLACE "#undef size_t" "/* #undef size_t */" CONFIG_API_H "${CONFIG_API_H}") +file(WRITE "magick/magick_config_api.h" "${CONFIG_API_H}") + +add_library(graphicsmagick coders/art.c coders/avs.c + coders/bmp.c coders/braille.c coders/cals.c coders/caption.c + coders/cineon.c coders/clipboard.c coders/cmyk.c + coders/cut.c coders/dcm.c coders/dcraw.c coders/dib.c + coders/dps.c coders/dpx.c coders/emf.c coders/ept.c + coders/fax.c coders/fits.c coders/fpx.c coders/gif.c + coders/gradient.c coders/gray.c coders/histogram.c + coders/hrz.c coders/html.c coders/icon.c coders/identity.c + coders/info.c coders/jbig.c coders/jnx.c coders/jp2.c + coders/jpeg.c coders/label.c coders/locale.c coders/logo.c + coders/mac.c coders/map.c coders/mat.c coders/matte.c + coders/meta.c coders/miff.c coders/mono.c coders/mpc.c + coders/mpeg.c coders/mpr.c coders/msl.c coders/mtv.c + coders/mvg.c coders/null.c coders/otb.c coders/palm.c + coders/pcd.c coders/pcl.c coders/pcx.c coders/pdb.c + coders/pdf.c coders/pict.c coders/pix.c coders/plasma.c + coders/png.c coders/pnm.c coders/preview.c coders/ps.c + coders/ps2.c coders/ps3.c coders/psd.c coders/pwp.c coders/rgb.c + coders/rla.c coders/rle.c coders/sct.c coders/sfw.c coders/sgi.c + coders/stegano.c coders/sun.c coders/svg.c coders/tga.c + coders/tiff.c coders/tile.c coders/tim.c coders/topol.c + coders/ttf.c coders/txt.c coders/uil.c coders/url.c + coders/uyvy.c coders/vicar.c coders/vid.c coders/viff.c + coders/wbmp.c coders/wmf.c coders/wpg.c + coders/x.c coders/xbm.c coders/xc.c coders/xcf.c + coders/xpm.c coders/xtrn.c coders/xwd.c coders/yuv.c + filters/analyze.c + magick/analyze.c magick/animate.c magick/annotate.c magick/attribute.c + magick/average.c magick/bit_stream.c magick/blob.c magick/cdl.c + magick/channel.c magick/color.c magick/colormap.c magick/colorspace.c + magick/color_lookup.c magick/command.c magick/compare.c magick/composite.c + magick/compress.c magick/confirm_access.c magick/constitute.c magick/decorate.c + magick/delegate.c magick/deprecate.c magick/describe.c magick/display.c magick/draw.c + magick/effect.c magick/enhance.c magick/enum_strings.c magick/error.c magick/export.c + magick/floats.c magick/fx.c magick/gem.c magick/gradient.c magick/hclut.c + magick/image.c magick/import.c magick/list.c magick/locale.c magick/log.c + magick/magic.c magick/magick.c magick/magick_endian.c magick/map.c + magick/memory.c magick/module.c magick/monitor.c magick/montage.c magick/nt_base.c + magick/nt_feature.c magick/omp_data_view.c magick/operator.c magick/paint.c + magick/pixel_cache.c magick/pixel_iterator.c magick/plasma.c magick/PreRvIcccm.c + magick/profile.c magick/quantize.c magick/random.c magick/registry.c magick/render.c + magick/resize.c magick/resource.c magick/segment.c magick/semaphore.c + magick/shear.c magick/signature.c magick/static.c magick/statistics.c + magick/tempfile.c magick/texture.c magick/timer.c magick/transform.c + magick/tsd.c magick/type.c magick/unix_port.c magick/utility.c + magick/version.c magick/widget.c magick/xwindow.c + Magick++/lib/Blob.cpp Magick++/lib/BlobRef.cpp Magick++/lib/CoderInfo.cpp + Magick++/lib/Color.cpp Magick++/lib/Drawable.cpp Magick++/lib/Exception.cpp + Magick++/lib/Functions.cpp Magick++/lib/Geometry.cpp Magick++/lib/Image.cpp + Magick++/lib/ImageRef.cpp Magick++/lib/Montage.cpp Magick++/lib/Options.cpp + Magick++/lib/Pixels.cpp Magick++/lib/STL.cpp Magick++/lib/Thread.cpp + Magick++/lib/TypeMetric.cpp + wand/drawing_wand.c wand/magick_compat.c wand/magick_wand.c wand/pixel_wand.c + jbig/libjbig/jbig.c jbig/libjbig/jbig_ar.c jbig/libjbig/jbig85.c) + +TARGET_LINK_LIBRARIES(graphicsmagick PRIVATE + ZLIB::ZLIB + BZip2::BZip2 + #${JPEG_LIBRARIES} + JPEG::JPEG + PNG::PNG + TIFF::TIFF + Freetype::Freetype +) +target_include_directories(graphicsmagick INTERFACE $) + +install(TARGETS graphicsmagick + EXPORT graphicsmagick-targets + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +install( + EXPORT graphicsmagick-targets + FILE unofficial-graphicsmagick-targets.cmake + NAMESPACE unofficial::graphicsmagick:: + DESTINATION share/unofficial-graphicsmagick +) +find_package(ZLIB REQUIRED) +find_package(BZip2 REQUIRED) +find_package(JPEG REQUIRED) +find_package(PNG REQUIRED) +find_package(TIFF REQUIRED) +find_package(Freetype REQUIRED) + +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/unofficial-graphicsmagick-config.cmake " +include(CMakeFindDependencyMacro) +find_dependency(ZLIB) +find_dependency(BZip2) +find_dependency(JPEG) +find_dependency(PNG) +find_dependency(TIFF) +find_dependency(Freetype) + +include(\${CMAKE_CURRENT_LIST_DIR}/unofficial-graphicsmagick-targets.cmake) +") +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-graphicsmagick-config.cmake DESTINATION share/unofficial-graphicsmagick) + +option(INSTALL_HEADERS "Install development header files" ON) + +if (INSTALL_HEADERS) + install(FILES magick/alpha_composite.h DESTINATION include/magick) + install(FILES magick/analyze.h DESTINATION include/magick) + install(FILES magick/api.h DESTINATION include/magick) + install(FILES magick/attribute.h DESTINATION include/magick) + install(FILES magick/average.h DESTINATION include/magick) + install(FILES magick/bit_stream.h DESTINATION include/magick) + install(FILES magick/blob.h DESTINATION include/magick) + install(FILES magick/cdl.h DESTINATION include/magick) + install(FILES magick/channel.h DESTINATION include/magick) + install(FILES magick/color.h DESTINATION include/magick) + install(FILES magick/colormap.h DESTINATION include/magick) + install(FILES magick/colorspace.h DESTINATION include/magick) + install(FILES magick/color_lookup.h DESTINATION include/magick) + install(FILES magick/command.h DESTINATION include/magick) + install(FILES magick/common.h DESTINATION include/magick) + install(FILES magick/compare.h DESTINATION include/magick) + install(FILES magick/composite.h DESTINATION include/magick) + install(FILES magick/compress.h DESTINATION include/magick) + install(FILES magick/confirm_access.h DESTINATION include/magick) + install(FILES magick/constitute.h DESTINATION include/magick) + install(FILES magick/decorate.h DESTINATION include/magick) + install(FILES magick/delegate.h DESTINATION include/magick) + install(FILES magick/deprecate.h DESTINATION include/magick) + install(FILES magick/describe.h DESTINATION include/magick) + install(FILES magick/draw.h DESTINATION include/magick) + install(FILES magick/effect.h DESTINATION include/magick) + install(FILES magick/enhance.h DESTINATION include/magick) + install(FILES magick/enum_strings.h DESTINATION include/magick) + install(FILES magick/error.h DESTINATION include/magick) + install(FILES magick/floats.h DESTINATION include/magick) + install(FILES magick/forward.h DESTINATION include/magick) + install(FILES magick/fx.h DESTINATION include/magick) + install(FILES magick/gem.h DESTINATION include/magick) + install(FILES magick/gradient.h DESTINATION include/magick) + install(FILES magick/hclut.h DESTINATION include/magick) + install(FILES magick/image.h DESTINATION include/magick) + install(FILES magick/list.h DESTINATION include/magick) + install(FILES magick/locale_c.h DESTINATION include/magick) + install(FILES magick/log.h DESTINATION include/magick) + install(FILES magick/magic.h DESTINATION include/magick) + install(FILES magick/magick.h DESTINATION include/magick) + install(FILES magick/magick_config.h DESTINATION include/magick) + install(FILES magick/magick_config_api.h DESTINATION include/magick) + install(FILES magick/magick_endian.h DESTINATION include/magick) + install(FILES magick/magick_types.h DESTINATION include/magick) + install(FILES magick/map.h DESTINATION include/magick) + install(FILES magick/memory.h DESTINATION include/magick) + install(FILES magick/module.h DESTINATION include/magick) + install(FILES magick/module_aliases.h DESTINATION include/magick) + install(FILES magick/monitor.h DESTINATION include/magick) + install(FILES magick/montage.h DESTINATION include/magick) + install(FILES magick/nt_base.h DESTINATION include/magick) + install(FILES magick/nt_feature.h DESTINATION include/magick) + install(FILES magick/omp_data_view.h DESTINATION include/magick) + install(FILES magick/operator.h DESTINATION include/magick) + install(FILES magick/paint.h DESTINATION include/magick) + install(FILES magick/pixel_cache.h DESTINATION include/magick) + install(FILES magick/pixel_iterator.h DESTINATION include/magick) + install(FILES magick/plasma.h DESTINATION include/magick) + install(FILES magick/prefetch.h DESTINATION include/magick) + install(FILES magick/PreRvIcccm.h DESTINATION include/magick) + install(FILES magick/profile.h DESTINATION include/magick) + install(FILES magick/quantize.h DESTINATION include/magick) + install(FILES magick/random-private.h DESTINATION include/magick) + install(FILES magick/random.h DESTINATION include/magick) + install(FILES magick/registry.h DESTINATION include/magick) + install(FILES magick/render.h DESTINATION include/magick) + install(FILES magick/resize.h DESTINATION include/magick) + install(FILES magick/resource.h DESTINATION include/magick) + install(FILES magick/semaphore.h DESTINATION include/magick) + install(FILES magick/shear.h DESTINATION include/magick) + install(FILES magick/signature.h DESTINATION include/magick) + install(FILES magick/spinlock.h DESTINATION include/magick) + install(FILES magick/static.h DESTINATION include/magick) + install(FILES magick/statistics.h DESTINATION include/magick) + install(FILES magick/studio.h DESTINATION include/magick) + install(FILES magick/symbols.h DESTINATION include/magick) + install(FILES magick/tempfile.h DESTINATION include/magick) + install(FILES magick/texture.h DESTINATION include/magick) + install(FILES magick/timer.h DESTINATION include/magick) + install(FILES magick/transform.h DESTINATION include/magick) + install(FILES magick/tsd.h DESTINATION include/magick) + install(FILES magick/type.h DESTINATION include/magick) + install(FILES magick/unix_port.h DESTINATION include/magick) + install(FILES magick/utility.h DESTINATION include/magick) + install(FILES magick/version.h DESTINATION include/magick) + install(FILES magick/widget.h DESTINATION include/magick) + install(FILES magick/xwindow.h DESTINATION include/magick) + + install(FILES Magick++/lib/Magick++.h DESTINATION include) + + install(FILES Magick++/lib/Magick++/Blob.h DESTINATION include/Magick++) + install(FILES Magick++/lib/Magick++/BlobRef.h DESTINATION include/Magick++) + install(FILES Magick++/lib/Magick++/CoderInfo.h DESTINATION include/Magick++) + install(FILES Magick++/lib/Magick++/Color.h DESTINATION include/Magick++) + install(FILES Magick++/lib/Magick++/Drawable.h DESTINATION include/Magick++) + install(FILES Magick++/lib/Magick++/Exception.h DESTINATION include/Magick++) + install(FILES Magick++/lib/Magick++/Functions.h DESTINATION include/Magick++) + install(FILES Magick++/lib/Magick++/Geometry.h DESTINATION include/Magick++) + install(FILES Magick++/lib/Magick++/Image.h DESTINATION include/Magick++/) + install(FILES Magick++/lib/Magick++/ImageRef.h DESTINATION include/Magick++) + install(FILES Magick++/lib/Magick++/Include.h DESTINATION include/Magick++) + install(FILES Magick++/lib/Magick++/Montage.h DESTINATION include/Magick++) + install(FILES Magick++/lib/Magick++/Options.h DESTINATION include/Magick++) + install(FILES Magick++/lib/Magick++/Pixels.h DESTINATION include/Magick++) + install(FILES Magick++/lib/Magick++/STL.h DESTINATION include/Magick++) + install(FILES Magick++/lib/Magick++/Thread.h DESTINATION include/Magick++) + install(FILES Magick++/lib/Magick++/TypeMetric.h DESTINATION include/Magick++) + + install(FILES wand/drawing_wand.h DESTINATION include/wand) + install(FILES wand/magick_wand.h DESTINATION include/wand) + install(FILES wand/pixel_wand.h DESTINATION include/wand) + install(FILES wand/wand_api.h DESTINATION include/wand) + install(FILES wand/wand_private.h DESTINATION include/wand) + install(FILES wand/wand_symbols.h DESTINATION include/wand) +endif () diff --git a/vcpkg/ports/graphicsmagick/CONTROL b/vcpkg/ports/graphicsmagick/CONTROL new file mode 100644 index 0000000..0104031 --- /dev/null +++ b/vcpkg/ports/graphicsmagick/CONTROL @@ -0,0 +1,5 @@ +Source: graphicsmagick +Version: 1.3.35-2 +Build-Depends: zlib, bzip2, freetype, libjpeg-turbo, libpng, tiff +Homepage: https://sourceforge.net/projects/graphicsmagick/ +Description: Image processing library diff --git a/vcpkg/ports/graphicsmagick/disable_graphicsmagick_modules.patch b/vcpkg/ports/graphicsmagick/disable_graphicsmagick_modules.patch new file mode 100644 index 0000000..3ef1741 --- /dev/null +++ b/vcpkg/ports/graphicsmagick/disable_graphicsmagick_modules.patch @@ -0,0 +1,16 @@ +--- a/magick/studio.h 2019-12-24 13:18:50.000000000 -0200 ++++ b/magick/studio.h 2020-01-08 20:43:08.325889700 -0200 +@@ -470,10 +470,10 @@ + */ + + #if defined(HasLTDL) +-# define SupportMagickModules ++//# define SupportMagickModules + #elif !defined(__MINGW32__) && !defined(__MINGW64__) + # if defined(MSWINDOWS) && defined(_DLL) +-# define SupportMagickModules ++//# define SupportMagickModules + # endif + #endif + + \ No newline at end of file diff --git a/vcpkg/ports/graphicsmagick/dynamic_bzip2.patch b/vcpkg/ports/graphicsmagick/dynamic_bzip2.patch new file mode 100644 index 0000000..e2bf953 --- /dev/null +++ b/vcpkg/ports/graphicsmagick/dynamic_bzip2.patch @@ -0,0 +1,20 @@ +From: Josue Andrade Gomes +Date: Tue, 18 Apr 2017 09:56:53 -0300 +Subject: [PATCH] dynamic bzip2 only if dynamic gm + +--- + +diff -ur a/magick/nt_base.h b/magick/nt_base.h +--- a/magick/nt_base.h Mon May 30 14:19:55 2016 ++++ b/magick/nt_base.h Mon Apr 17 15:10:01 2017 +@@ -275,7 +275,9 @@ + */ + #if defined(HasBZLIB) + # if defined(_WIN32) +-# define BZ_IMPORT 1 ++# if defined(_DLL) // For vcpkg. Building GM DLL requires BZIP2 DLL too, otherwise static ++# define BZ_IMPORT 1 ++# endif + # endif + #endif /* defined(HasBZLIB) */ + diff --git a/vcpkg/ports/graphicsmagick/magick_types.h b/vcpkg/ports/graphicsmagick/magick_types.h new file mode 100644 index 0000000..93404cb --- /dev/null +++ b/vcpkg/ports/graphicsmagick/magick_types.h @@ -0,0 +1,133 @@ +/* + Copyright (C) 2003 - 2012 GraphicsMagick Group + + This program is covered by multiple licenses, which are described in + Copyright.txt. You should have received a copy of Copyright.txt with this + package; otherwise see http://www.graphicsmagick.org/www/Copyright.html. + + GraphicsMagick types typedefs. + + GraphicsMagick is expected to compile with any C '89 ANSI C compiler + supporting at least 16-bit 'short', 32-bit 'int', and 32-bit 'long'. + It is also expected to take advantage of 64-bit LP64 and Windows + WIN64 LLP64. We use C '99 style types but declare our own types so + as to not depend on C '99 header files, and take care to depend only + on C '89 library functions, POSIX, or well-known extensions. Any C + '99 syntax used is removed if the compiler does not support it. +*/ + +#ifndef _MAGICK_TYPES_H +#define _MAGICK_TYPES_H + +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + +/* + Assign ANSI C stdint.h-like typedefs based on the sizes of native types + magick_int8_t -- -128 to 127 + magick_uint8_t -- 0 to 255 + magick_int16_t -- -32,768 to 32,767 + magick_uint16_t -- 0 to 65,535 + magick_int32_t -- -2,147,483,648 to 2,147,483,647 + magick_uint32_t -- 0 to 4,294,967,295 + magick_int64_t -- -9,223,372,036,854,775,807 to 9,223,372,036,854,775,807 + magick_uint64_t -- 0 to 18,446,744,073,709,551,615 + + magick_uintmax_t -- largest native unsigned integer type ("%ju") + 0 to UINTMAX_MAX + UINTMAX_C(value) declares constant value + magick_uintptr_t -- unsigned type for storing a pointer value ("%tu") + 0 to UINTPTR_MAX + + ANSI C '99 stddef.h-like types + size_t -- unsigned type representing sizes of objects ("%zu") + 0 to SIZE_MAX + magick_ptrdiff_t -- signed type for subtracting two pointers ("%td") + PTRDIFF_MIN to PTRDIFF_MAX + + EEE Std 1003.1, 2004 types + ssize_t -- signed type for a count of bytes or an error indication ("%zd") + ? to SSIZE_MAX +*/ + +#if (defined(WIN32) || defined(WIN64)) && \ + !defined(__MINGW32__) && !defined(__MINGW64__) + + /* The following typedefs are used for WIN32 & WIN64 (without + configure) */ + typedef signed char magick_int8_t; + typedef unsigned char magick_uint8_t; + + typedef signed short magick_int16_t; + typedef unsigned short magick_uint16_t; + + typedef signed int magick_int32_t; +# define MAGICK_INT32_F "" + typedef unsigned int magick_uint32_t; +# define MAGICK_UINT32_F "" + + typedef signed __int64 magick_int64_t; +# define MAGICK_INT64_F "I64" + typedef unsigned __int64 magick_uint64_t; +# define MAGICK_UINT64_F "I64" + + typedef magick_uint64_t magick_uintmax_t; + +# if defined(WIN32) + typedef unsigned long magick_uintptr_t; +# define MAGICK_SIZE_T_F "l" +# define MAGICK_SIZE_T unsigned long +# define MAGICK_SSIZE_T_F "l" +# define MAGICK_SSIZE_T long +# elif defined(WIN64) + /* WIN64 uses the LLP64 model */ + typedef unsigned long long magick_uintptr_t; +# define MAGICK_SIZE_T_F "I64" +# define MAGICK_SIZE_T unsigned __int64 +# define MAGICK_SSIZE_T_F "I64" +# define MAGICK_SSIZE_T signed __int64 +# endif + +#else + + /* The following typedefs are subtituted when using Unixish configure */ + typedef signed char magick_int8_t; + typedef unsigned char magick_uint8_t; + + typedef signed short magick_int16_t; + typedef unsigned short magick_uint16_t; + + typedef signed int magick_int32_t; +# define MAGICK_INT32_F "" + typedef unsigned int magick_uint32_t; +# define MAGICK_UINT32_F "" + + typedef signed long magick_int64_t; +# define MAGICK_INT64_F "l" + typedef unsigned long magick_uint64_t; +# define MAGICK_UINT64_F "l" + + typedef unsigned long magick_uintmax_t; +# define MAGICK_UINTMAX_F "l" + + typedef unsigned long magick_uintptr_t; +# define MAGICK_UINTPTR_F "l" + +# define MAGICK_SIZE_T_F "l" +# define MAGICK_SIZE_T unsigned long + +# define MAGICK_SSIZE_T_F "l" +# define MAGICK_SSIZE_T signed long + +#endif + + /* 64-bit file and blob offset type */ + typedef magick_int64_t magick_off_t; +#define MAGICK_OFF_F MAGICK_INT64_F + +#if defined(__cplusplus) || defined(c_plusplus) +} +#endif /* defined(__cplusplus) || defined(c_plusplus) */ + +#endif /* _MAGICK_TYPES_H */ diff --git a/vcpkg/ports/graphicsmagick/portfile.cmake b/vcpkg/ports/graphicsmagick/portfile.cmake new file mode 100644 index 0000000..c17215e --- /dev/null +++ b/vcpkg/ports/graphicsmagick/portfile.cmake @@ -0,0 +1,46 @@ +set(GM_VERSION 1.3.35) + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO graphicsmagick/graphicsmagick + REF ${GM_VERSION} + FILENAME "GraphicsMagick-${GM_VERSION}-windows-source.7z" + SHA512 bf3ade807de54f366e49df5b754d8321978d8e1ed4275364fb7e861ff04f0780a698fcb4e0a110a45213209ff846034f2add00a3443ed31db2c842530199bd1f + PATCHES + # GM always requires a dynamic BZIP2. This patch makes this dependent if _DLL is defined + dynamic_bzip2.patch + + # Bake GM's own modules into the .dll itself. This fixes a bug whereby + # 'vcpkg install graphicsmagick' did not lead to a copy of GM that could + # load either PNG or JPEG files (due to missing GM Modules, with names + # matching "IM_*.DLL"). + disable_graphicsmagick_modules.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/magick_types.h DESTINATION ${SOURCE_PATH}/magick) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-graphicsmagick TARGET_PATH share/unofficial-graphicsmagick) + +# copy license +file(INSTALL ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# copy config +file(COPY ${SOURCE_PATH}/config/colors.mgk DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/config) +file(COPY ${SOURCE_PATH}/config/log.mgk DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/config) +file(COPY ${SOURCE_PATH}/config/modules.mgk DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/config) + +file(READ ${SOURCE_PATH}/config/type-windows.mgk.in TYPE_MGK) +string(REPLACE "@windows_font_dir@" "$ENV{SYSTEMROOT}/Fonts/" TYPE_MGK "${TYPE_MGK}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/graphicsmagick/config/type.mgk "${TYPE_MGK}") + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/graphite2/CONTROL b/vcpkg/ports/graphite2/CONTROL new file mode 100644 index 0000000..0c4899f --- /dev/null +++ b/vcpkg/ports/graphite2/CONTROL @@ -0,0 +1,5 @@ +Source: graphite2 +Version: 1.3.14 +Homepage: https://github.com/silnrsi/graphite +Description: Graphite is a "smart font" system developed specifically to handle the complexities of lesser-known languages of the world. + Graphite2 is a rework of the original Graphite engine that is faster, smaller, and uses an API that is better suited to the layout architecture of most text-processing applications. diff --git a/vcpkg/ports/graphite2/disable-tests.patch b/vcpkg/ports/graphite2/disable-tests.patch new file mode 100644 index 0000000..d1c1fd9 --- /dev/null +++ b/vcpkg/ports/graphite2/disable-tests.patch @@ -0,0 +1,48 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 496712d..3df05c7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -82,10 +82,12 @@ if (BUILD_SHARED_LIBS) + endif() + + add_subdirectory(src) +-add_subdirectory(tests) +-add_subdirectory(doc) +-if (NOT GRAPHITE2_NFILEFACE) +- add_subdirectory(gr2fonttest) ++if(NOT DISABLE_TESTS) ++ add_subdirectory(tests) ++ add_subdirectory(doc) ++ if (NOT GRAPHITE2_NFILEFACE) ++ add_subdirectory(gr2fonttest) ++ endif() + endif() + + set(version 3.0.1) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index b6ac26b..851a97f 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -127,9 +127,9 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + endif () + endif() + include(Graphite) +- if (BUILD_SHARED_LIBS) ++ if (NOT DISABLE_TESTS) + nolib_test(stdc++ $) +- endif () ++ endif() + set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") + CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}") + endif() +@@ -144,7 +144,9 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + endif() + target_link_libraries(graphite2 c) + include(Graphite) +- nolib_test(stdc++ $) ++ if (NOT DISABLE_TESTS) ++ nolib_test(stdc++ $) ++ endif() + set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") + CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}") + endif() diff --git a/vcpkg/ports/graphite2/portfile.cmake b/vcpkg/ports/graphite2/portfile.cmake new file mode 100644 index 0000000..44fe08b --- /dev/null +++ b/vcpkg/ports/graphite2/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO silnrsi/graphite + REF 92f59dcc52f73ce747f1cdc831579ed2546884aa # 1.3.14 + SHA512 011855576124b2f9ae9d7d3a0dfc5489794cf82b81bebc02c11c9cca350feb9fbb411844558811dff1ebbacac58a24a7cf56a374fc2c27e97a5fb4795a01486e + HEAD_REF master + PATCHES disable-tests.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DDISABLE_TESTS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/graphqlparser/CONTROL b/vcpkg/ports/graphqlparser/CONTROL new file mode 100644 index 0000000..128c494 --- /dev/null +++ b/vcpkg/ports/graphqlparser/CONTROL @@ -0,0 +1,3 @@ +Source: graphqlparser +Version: 0.7.0-1 +Description: A GraphQL query parser in C++ with C and C++ APIs diff --git a/vcpkg/ports/graphqlparser/portfile.cmake b/vcpkg/ports/graphqlparser/portfile.cmake new file mode 100644 index 0000000..a90959f --- /dev/null +++ b/vcpkg/ports/graphqlparser/portfile.cmake @@ -0,0 +1,43 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO graphql/libgraphqlparser + REF v0.7.0 + SHA512 973292b164d0d2cfe453a2f01559dbdb1b9d22b6304f6a3aabf71e2c0a3e24ab69dfd72a086764ad5befecf0005620f8e86f552dacc324f9615a05f31de7cede + HEAD_REF master + PATCHES + win-cmake.patch + static-compile-fix.patch +) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + ) +elseif(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + vcpkg_find_acquire_program(PYTHON2) + vcpkg_find_acquire_program(FLEX) # + vcpkg_find_acquire_program(BISON) + + get_filename_component(VCPKG_DOWNLOADS_PYTHON2_DIR "${PYTHON2}" DIRECTORY) + get_filename_component(VCPKG_DOWNLOADS_FLEX_DIR "${FLEX}" DIRECTORY) + get_filename_component(VCPKG_DOWNLOADS_BISON_DIR "${BISON}" DIRECTORY) + + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DVCPKG_DOWNLOADS_PYTHON2_DIR=${VCPKG_DOWNLOADS_PYTHON2_DIR} + -DVCPKG_DOWNLOADS_FLEX_DIR=${VCPKG_DOWNLOADS_FLEX_DIR} + -DVCPKG_DOWNLOADS_BISON_DIR=${VCPKG_DOWNLOADS_BISON_DIR} + ) +endif() + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/graphqlparser/copyright COPYONLY) diff --git a/vcpkg/ports/graphqlparser/static-compile-fix.patch b/vcpkg/ports/graphqlparser/static-compile-fix.patch new file mode 100644 index 0000000..3f2756d --- /dev/null +++ b/vcpkg/ports/graphqlparser/static-compile-fix.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 56741c2..313308a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -142,8 +142,11 @@ if (UNIX) + elseif(WIN32) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/graphqlparser.lib + DESTINATION lib) ++ # do not install pdb when static compilation. ++ if (BUILD_SHARED_LIBS) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/graphqlparser.pdb + DESTINATION bin) ++ endif() + endif() + + IF (test) diff --git a/vcpkg/ports/graphqlparser/win-cmake.patch b/vcpkg/ports/graphqlparser/win-cmake.patch new file mode 100644 index 0000000..bd2f4c7 --- /dev/null +++ b/vcpkg/ports/graphqlparser/win-cmake.patch @@ -0,0 +1,100 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c4c8b3e..3373d82 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3,9 +3,26 @@ PROJECT(libgraphqlparser C CXX) + + SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}") + +-INCLUDE(version) ++IF(UNIX) ++ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") ++ SET(FLEX_COMPILE_FLAGS "--header-file=lexer.h") ++ELSEIF(WIN32) ++ # If we're building this with vcpkg on Windows, let portfile.cmake tell us where it ++ # stored these tools. Otherwise these variables should be empty and we'll fall back ++ # to the normal CMake FIND_PACKAGE logic for each of these programs. ++ SET(CMAKE_PROGRAM_PATH ++ "${VCPKG_DOWNLOADS_PYTHON2_DIR}" ++ "${VCPKG_DOWNLOADS_FLEX_DIR}" ++ "${VCPKG_DOWNLOADS_BISON_DIR}" ++ "${CMAKE_PROGRAM_PATH}") ++ ++ SET(FLEX_COMPILE_FLAGS "--header-file=lexer.h --wincompat") ++ ++ # Let CMake figure out the exports for the SHARED library (DLL) on Windows. ++ SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) ++ENDIF() + +-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") ++INCLUDE(version) + + FIND_PACKAGE(PythonInterp 2 REQUIRED) + IF (NOT PYTHON_VERSION_MAJOR EQUAL 2) +@@ -21,7 +38,7 @@ IF (BISON_FOUND) + ENDIF() + + IF(FLEX_FOUND) +- FLEX_TARGET(GraphQLScanner lexer.lpp ${CMAKE_CURRENT_SOURCE_DIR}/lexer.cpp COMPILE_FLAGS "--header-file=lexer.h") ++ FLEX_TARGET(GraphQLScanner lexer.lpp ${CMAKE_CURRENT_SOURCE_DIR}/lexer.cpp COMPILE_FLAGS ${FLEX_COMPILE_FLAGS}) + IF (BISON_FOUND) + ADD_FLEX_BISON_DEPENDENCY(GraphQLScanner graphqlparser) + ENDIF() +@@ -31,7 +48,7 @@ FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/c) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) + +-ADD_LIBRARY(graphqlparser SHARED ++ADD_LIBRARY(graphqlparser + JsonVisitor.cpp + ${CMAKE_CURRENT_BINARY_DIR}/Ast.h + ${CMAKE_CURRENT_BINARY_DIR}/Ast.cpp +@@ -87,7 +104,9 @@ ADD_SUBDIRECTORY(python) + + OPTION(test "Build tests." OFF) + +-INSTALL(DIRECTORY c ${CMAKE_CURRENT_BINARY_DIR}/c DESTINATION include/graphqlparser ++INSTALL(DIRECTORY c ${CMAKE_CURRENT_BINARY_DIR}/c ++ DESTINATION include/graphqlparser ++ CONFIGURATIONS Release + FILES_MATCHING PATTERN "*.h" + PATTERN "build" EXCLUDE) + +@@ -103,9 +122,13 @@ INSTALL(FILES + position.hh + stack.hh + syntaxdefs.h +- DESTINATION include/graphqlparser) ++ DESTINATION include/graphqlparser ++ CONFIGURATIONS Release) ++ + INSTALL(TARGETS graphqlparser +- LIBRARY DESTINATION lib) ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib ++ RUNTIME DESTINATION bin) + + if (UNIX) + # generate pkgconfig file +@@ -116,6 +139,11 @@ if (UNIX) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libgraphqlparser.pc" + DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig") + endif() ++elseif(WIN32) ++ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/graphqlparser.lib ++ DESTINATION lib) ++ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/graphqlparser.pdb ++ DESTINATION bin) + endif() + + IF (test) +@@ -126,6 +154,8 @@ IF (test) + ADD_CUSTOM_TARGET(memcheck + valgrind --leak-check=full --suppressions=./test/valgrind.supp --dsymutil=yes --error-exitcode=1 ./test/runTests >/dev/null + ) ++ else() ++ ADD_CUSTOM_TARGET(runTests ++ ./test/runTests >/dev/null) + endif() +- + ENDIF() diff --git a/vcpkg/ports/greatest/CONTROL b/vcpkg/ports/greatest/CONTROL new file mode 100644 index 0000000..05c679d --- /dev/null +++ b/vcpkg/ports/greatest/CONTROL @@ -0,0 +1,4 @@ +Source: greatest +Version: 1.4.2 +Description: Single-file testing system for C +Homepage: https://github.com/silentbicycle/greatest diff --git a/vcpkg/ports/greatest/portfile.cmake b/vcpkg/ports/greatest/portfile.cmake new file mode 100644 index 0000000..479287c --- /dev/null +++ b/vcpkg/ports/greatest/portfile.cmake @@ -0,0 +1,16 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO silentbicycle/greatest + REF v1.4.2 + SHA512 8f2767ac2be017d2ecee3a903ab79834e783df464e3fd0e1e8c4397fdf8dabcc4fb2367163dcb9e944c404d00cf8960ec56c0345f43836182a6e058d9eaf6b0a + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/greatest.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/grpc/00001-fix-uwp.patch b/vcpkg/ports/grpc/00001-fix-uwp.patch new file mode 100644 index 0000000..a66f03f --- /dev/null +++ b/vcpkg/ports/grpc/00001-fix-uwp.patch @@ -0,0 +1,86 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a067308142..086d4c5837 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -153,6 +153,9 @@ if(UNIX) + endif() + if(WIN32) + set(_gRPC_PLATFORM_WINDOWS ON) ++ if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") ++ set(_gRPC_PLATFORM_UWP ON) ++ endif() + endif() + + # Use C99 standard +@@ -191,6 +194,9 @@ if(MSVC) + set(_gRPC_C_CXX_FLAGS "${_gRPC_C_CXX_FLAGS} /wd4267") + # TODO(jtattermusch): needed to build boringssl with VS2017, revisit later + set(_gRPC_C_CXX_FLAGS "${_gRPC_C_CXX_FLAGS} /wd4987 /wd4774 /wd4819 /wd4996 /wd4619") ++ if(_gRPC_PLATFORM_UWP) ++ add_definitions(-DGRPC_ARES=0) ++ endif() + endif() + if (MINGW) + add_definitions(-D_WIN32_WINNT=0x600) +@@ -258,6 +264,10 @@ file(MAKE_DIRECTORY ${_gRPC_PROTO_GENS_DIR}) + # ``.proto`` files + # + function(protobuf_generate_grpc_cpp) ++ if(_gRPC_PLATFORM_UWP) ++ return() ++ endif() ++ + if(NOT ARGN) + message(SEND_ERROR "Error: PROTOBUF_GENERATE_GRPC_CPP() called without any proto files") + return() +@@ -330,6 +340,7 @@ if (gRPC_BUILD_GRPC_RUBY_PLUGIN) + list(APPEND _gRPC_PLUGIN_LIST grpc_ruby_plugin) + endif () + ++if(NOT _gRPC_PLATFORM_UWP) + add_custom_target(plugins + DEPENDS ${_gRPC_PLUGIN_LIST} + ) +@@ -348,6 +359,7 @@ add_custom_target(tools_cxx + + add_custom_target(tools + DEPENDS tools_c tools_cxx) ++endif() + + protobuf_generate_grpc_cpp( + src/proto/grpc/channelz/channelz.proto +diff --git a/src/core/lib/iomgr/resource_quota.cc b/src/core/lib/iomgr/resource_quota.cc +index dbe84e3466..cda40b6435 100644 +--- a/src/core/lib/iomgr/resource_quota.cc ++++ b/src/core/lib/iomgr/resource_quota.cc +@@ -945,7 +945,7 @@ bool grpc_resource_user_alloc(grpc_resource_user* resource_user, size_t size, + void grpc_resource_user_free(grpc_resource_user* resource_user, size_t size) { + gpr_mu_lock(&resource_user->mu); + grpc_resource_quota* resource_quota = resource_user->resource_quota; +- gpr_atm prior = gpr_atm_no_barrier_fetch_add(&resource_quota->used, -size); ++ gpr_atm prior = gpr_atm_no_barrier_fetch_add(&resource_quota->used, -static_cast(size)); + GPR_ASSERT(prior >= static_cast(size)); + bool was_zero_or_negative = resource_user->free_pool <= 0; + resource_user->free_pool += static_cast(size); +diff --git a/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc b/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc +index 59432cff36..fed574d5bc 100644 +--- a/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc ++++ b/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc +@@ -39,6 +39,7 @@ bool check_bios_data(const char*) { return false; } + bool check_windows_registry_product_name(HKEY root_key, + const char* reg_key_path, + const char* reg_key_name) { ++#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP + const size_t kProductNameBufferSize = 256; + char const expected_substr[] = "Google"; + +@@ -71,6 +72,9 @@ bool check_windows_registry_product_name(HKEY root_key, + } + + return strstr(buffer, expected_substr) != nullptr; ++#else ++ return false; ++#endif + } + + } // namespace internal diff --git a/vcpkg/ports/grpc/00002-static-linking-in-linux.patch b/vcpkg/ports/grpc/00002-static-linking-in-linux.patch new file mode 100644 index 0000000..80ec441 --- /dev/null +++ b/vcpkg/ports/grpc/00002-static-linking-in-linux.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 086d4c5837..e556a99b47 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -183,6 +183,11 @@ if (NOT DEFINED CMAKE_POSITION_INDEPENDENT_CODE) + endif() + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules") + ++if (gRPC_STATIC_LINKING AND NOT _gRPC_PLATFORM_WINDOWS) ++ # Force to static link ++ set(CMAKE_EXE_LINKER_FLAGS "-Bstatic") ++endif() ++ + if(MSVC) + include(cmake/msvc_static_runtime.cmake) + add_definitions(-D_WIN32_WINNT=0x600 -D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS) diff --git a/vcpkg/ports/grpc/00003-undef-base64-macro.patch b/vcpkg/ports/grpc/00003-undef-base64-macro.patch new file mode 100644 index 0000000..3f540a5 --- /dev/null +++ b/vcpkg/ports/grpc/00003-undef-base64-macro.patch @@ -0,0 +1,13 @@ +diff --git a/src/core/lib/transport/transport.cc b/src/core/lib/transport/transport.cc +index 99a32980aa..f55db67113 100644 +--- a/src/core/lib/transport/transport.cc ++++ b/src/core/lib/transport/transport.cc +@@ -97,6 +97,8 @@ void grpc_stream_ref_init(grpc_stream_refcount* refcount, int /*initial_refs*/, + refcount, &refcount->slice_refcount); + } + ++#undef move64 ++ + static void move64(uint64_t* from, uint64_t* to) { + *to += *from; + *from = 0; diff --git a/vcpkg/ports/grpc/00004-link-gdi32-on-windows.patch b/vcpkg/ports/grpc/00004-link-gdi32-on-windows.patch new file mode 100644 index 0000000..1e3e4cf --- /dev/null +++ b/vcpkg/ports/grpc/00004-link-gdi32-on-windows.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e556a99b47..a337149f1f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -250,7 +250,7 @@ elseif(UNIX) + endif() + + if(WIN32) +- set(_gRPC_BASELIB_LIBRARIES wsock32 ws2_32 crypt32) ++ set(_gRPC_BASELIB_LIBRARIES wsock32 ws2_32 crypt32 gdi32) + endif() + + # Create directory for generated .proto files diff --git a/vcpkg/ports/grpc/00005-fix-uwp-error.patch b/vcpkg/ports/grpc/00005-fix-uwp-error.patch new file mode 100644 index 0000000..ad890cf --- /dev/null +++ b/vcpkg/ports/grpc/00005-fix-uwp-error.patch @@ -0,0 +1,34 @@ +diff --git a/src/core/lib/slice/slice.cc b/src/core/lib/slice/slice.cc +index 0dacbfef3e..310bf1de1b 100644 +--- a/src/core/lib/slice/slice.cc ++++ b/src/core/lib/slice/slice.cc +@@ -234,6 +234,7 @@ grpc_slice grpc_slice_from_moved_buffer(grpc_core::UniquePtr p, + size_t len) { + uint8_t* ptr = reinterpret_cast(p.get()); + grpc_slice slice; ++ memset(&slice, 0, sizeof(grpc_slice)); + if (len <= sizeof(slice.data.inlined.bytes)) { + slice.refcount = nullptr; + slice.data.inlined.length = len; +@@ -253,7 +254,7 @@ grpc_slice grpc_slice_from_moved_string(grpc_core::UniquePtr p) { + } + + grpc_slice grpc_slice_from_cpp_string(std::string str) { +- grpc_slice slice; ++ grpc_slice slice = { 0 }; + if (str.size() <= sizeof(slice.data.inlined.bytes)) { + slice.refcount = nullptr; + slice.data.inlined.length = str.size(); +diff --git a/src/core/lib/surface/server.cc b/src/core/lib/surface/server.cc +index cab0cd56c4..2c88fd625b 100644 +--- a/src/core/lib/surface/server.cc ++++ b/src/core/lib/surface/server.cc +@@ -1301,7 +1301,7 @@ grpc_call_error queue_call_request(grpc_server* server, size_t cq_idx, + GRPC_ERROR_CREATE_FROM_STATIC_STRING("Server Shutdown")); + return GRPC_CALL_OK; + } +- RequestMatcherInterface* rm; ++ RequestMatcherInterface* rm = nullptr; + switch (rc->type) { + case RequestedCallType::BATCH_CALL: + rm = server->unregistered_request_matcher.get(); diff --git a/vcpkg/ports/grpc/00009-use-system-upb.patch b/vcpkg/ports/grpc/00009-use-system-upb.patch new file mode 100644 index 0000000..0c8c90c --- /dev/null +++ b/vcpkg/ports/grpc/00009-use-system-upb.patch @@ -0,0 +1,139 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a337149f1f..6baab5d37b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -84,6 +84,9 @@ set_property(CACHE gRPC_SSL_PROVIDER PROPERTY STRINGS "module" "package") + set(gRPC_PROTOBUF_PROVIDER "module" CACHE STRING "Provider of protobuf library") + set_property(CACHE gRPC_PROTOBUF_PROVIDER PROPERTY STRINGS "module" "package") + ++set(gRPC_UPB_PROVIDER "module" CACHE STRING "Provider of upb library") ++set_property(CACHE gRPC_UPB_PROVIDER PROPERTY STRINGS "module" "package") ++ + set(gRPC_PROTOBUF_PACKAGE_TYPE "" CACHE STRING "Algorithm for searching protobuf package") + set_property(CACHE gRPC_PROTOBUF_PACKAGE_TYPE PROPERTY STRINGS "CONFIG" "MODULE") + +@@ -1807,7 +1810,6 @@ target_link_libraries(grpc + ${_gRPC_ALLTARGETS_LIBRARIES} + gpr + address_sorting +- upb + absl::optional + absl::strings + absl::inlined_vector +@@ -1887,7 +1889,6 @@ target_link_libraries(grpc_csharp_ext + grpc + gpr + address_sorting +- upb + ) + + +@@ -2409,7 +2410,6 @@ target_link_libraries(grpc_unsecure + ${_gRPC_ALLTARGETS_LIBRARIES} + gpr + address_sorting +- upb + absl::optional + absl::strings + absl::inlined_vector +@@ -2606,7 +2606,6 @@ target_link_libraries(grpc++ + grpc + gpr + address_sorting +- upb + ) + + foreach(_hdr +@@ -2876,7 +2875,6 @@ target_link_libraries(grpc++_alts + grpc + gpr + address_sorting +- upb + ) + + foreach(_hdr +@@ -2945,7 +2943,6 @@ target_link_libraries(grpc++_error_details + grpc + gpr + address_sorting +- upb + ) + + foreach(_hdr +@@ -3019,7 +3016,6 @@ target_link_libraries(grpc++_reflection + grpc + gpr + address_sorting +- upb + ) + + foreach(_hdr +@@ -3300,7 +3296,6 @@ target_link_libraries(grpc++_unsecure + grpc_unsecure + gpr + address_sorting +- upb + ) + + foreach(_hdr +@@ -3642,7 +3637,6 @@ target_link_libraries(grpcpp_channelz + grpc + gpr + address_sorting +- upb + ) + + foreach(_hdr +@@ -3669,6 +3663,7 @@ endif() + + endif() + ++if (gRPC_UPB_PROVIDER STREQUAL "module") + add_library(upb + third_party/upb/upb/decode.c + third_party/upb/upb/encode.c +@@ -3719,7 +3714,7 @@ if(gRPC_INSTALL) + ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} + ) + endif() +- ++endif() + + + add_executable(check_epollexclusive +diff --git a/cmake/gRPCConfig.cmake.in b/cmake/gRPCConfig.cmake.in +index 3623f4aa5e..df6ced560e 100644 +--- a/cmake/gRPCConfig.cmake.in ++++ b/cmake/gRPCConfig.cmake.in +@@ -8,6 +8,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/modules) + @_gRPC_FIND_CARES@ + @_gRPC_FIND_ABSL@ + @_gRPC_FIND_RE2@ ++@_gRPC_FIND_UPB@ + + # Targets + include(${CMAKE_CURRENT_LIST_DIR}/gRPCTargets.cmake) +diff --git a/cmake/upb.cmake b/cmake/upb.cmake +index 2c0ab84e67..07dd613a78 100644 +--- a/cmake/upb.cmake ++++ b/cmake/upb.cmake +@@ -12,9 +12,18 @@ + # See the License for the specific language governing permissions and + # limitations under the License. + ++set(_gRPC_UPB_GRPC_GENERATED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-generated") ++if (gRPC_UPB_PROVIDER STREQUAL "module") + set(UPB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/upb) + + set(_gRPC_UPB_INCLUDE_DIR "${UPB_ROOT_DIR}") +-set(_gRPC_UPB_GRPC_GENERATED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-generated") + + set(_gRPC_UPB_LIBRARIES upb) ++ ++elseif(gRPC_UPB_PROVIDER STREQUAL "package") ++ find_package(upb CONFIG REQUIRED) ++ set(_gRPC_UPB_LIBRARIES upb::upb) ++ set(_gRPC_UPB_INCLUDE_DIR) ++ set(upb ${_gRPC_UPB_LIBRARIES}) ++ set(_gRPC_FIND_UPB "if(NOT upb_FOUND)\n find_package(upb CONFIG REQUIRED)\nendif()") ++endif() diff --git a/vcpkg/ports/grpc/00010-add-feature-absl-sync.patch b/vcpkg/ports/grpc/00010-add-feature-absl-sync.patch new file mode 100644 index 0000000..8940cd2 --- /dev/null +++ b/vcpkg/ports/grpc/00010-add-feature-absl-sync.patch @@ -0,0 +1,34 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6baab5d37b..48bc6cf0de 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1813,6 +1813,8 @@ target_link_libraries(grpc + absl::optional + absl::strings + absl::inlined_vector ++ absl::time ++ absl::synchronization + ) + if(_gRPC_PLATFORM_IOS OR _gRPC_PLATFORM_MAC) + target_link_libraries(grpc "-framework CoreFoundation") +@@ -2413,6 +2415,8 @@ target_link_libraries(grpc_unsecure + absl::optional + absl::strings + absl::inlined_vector ++ absl::time ++ absl::synchronization + ) + if(_gRPC_PLATFORM_IOS OR _gRPC_PLATFORM_MAC) + target_link_libraries(grpc_unsecure "-framework CoreFoundation") +diff --git a/cmake/abseil-cpp.cmake b/cmake/abseil-cpp.cmake +index 078d495417..b6f50bd14c 100644 +--- a/cmake/abseil-cpp.cmake ++++ b/cmake/abseil-cpp.cmake +@@ -37,4 +37,7 @@ elseif(gRPC_ABSL_PROVIDER STREQUAL "package") + # Use "CONFIG" as there is no built-in cmake module for absl. + find_package(absl REQUIRED CONFIG) + set(_gRPC_FIND_ABSL "if(NOT absl_FOUND)\n find_package(absl CONFIG)\nendif()") ++ if (gRPC_ABSL_SYNC_ENABLE) ++ add_definitions(-DGPR_ABSEIL_SYNC=1) ++ endif() + endif() diff --git a/vcpkg/ports/grpc/00011-fix-csharp_plugin.patch b/vcpkg/ports/grpc/00011-fix-csharp_plugin.patch new file mode 100644 index 0000000..6745042 --- /dev/null +++ b/vcpkg/ports/grpc/00011-fix-csharp_plugin.patch @@ -0,0 +1,33 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 48bc6cf0de..399aff7d1e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1854,10 +1854,14 @@ endif() + + if(gRPC_BUILD_CSHARP_EXT) + +-add_library(grpc_csharp_ext SHARED ++add_library(grpc_csharp_ext + src/csharp/ext/grpc_csharp_ext.c + ) + ++if (WIN32 AND BUILD_SHARED_LIBS) ++ target_compile_definitions(grpc_csharp_ext PUBLIC GPR_WINDOWS) ++endif() ++ + set_target_properties(grpc_csharp_ext PROPERTIES + VERSION ${gRPC_CORE_VERSION} + SOVERSION ${gRPC_CORE_SOVERSION} +@@ -1871,6 +1875,12 @@ if(WIN32 AND MSVC) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/grpc_csharp_ext.pdb + DESTINATION ${gRPC_INSTALL_LIBDIR} OPTIONAL + ) ++ ++ install(TARGETS grpc_csharp_ext ++ RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR} ++ ) + endif() + endif() + diff --git a/vcpkg/ports/grpc/CONTROL b/vcpkg/ports/grpc/CONTROL new file mode 100644 index 0000000..95f0517 --- /dev/null +++ b/vcpkg/ports/grpc/CONTROL @@ -0,0 +1,8 @@ +Source: grpc +Version: 1.31.1 +Build-Depends: zlib, openssl, protobuf, c-ares (!uwp), upb, abseil, re2 +Homepage: https://github.com/grpc/grpc +Description: An RPC library and framework + +Feature: absl-sync +Description: Use abseil synchronization module \ No newline at end of file diff --git a/vcpkg/ports/grpc/portfile.cmake b/vcpkg/ports/grpc/portfile.cmake new file mode 100644 index 0000000..79e344b --- /dev/null +++ b/vcpkg/ports/grpc/portfile.cmake @@ -0,0 +1,92 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO grpc/grpc + REF 7d7e4567625db7cfebf8969a225948097a3f9f89 #v1.31.1 + SHA512 a348b8779f533c53b99c052264e0a008121087267bcf836fb2310819ab384effdc0996df031f407ee4bf8bb0cb37a81e061e65ab24ab7011ce6400de3808f5a4 + HEAD_REF master + PATCHES + 00001-fix-uwp.patch + 00002-static-linking-in-linux.patch + 00003-undef-base64-macro.patch + 00004-link-gdi32-on-windows.patch + 00005-fix-uwp-error.patch + 00009-use-system-upb.patch + 00010-add-feature-absl-sync.patch + 00011-fix-csharp_plugin.patch + snprintf.patch +) + +if(VCPKG_TARGET_IS_UWP OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(gRPC_BUILD_CODEGEN OFF) +else() + set(gRPC_BUILD_CODEGEN ON) +endif() + +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" gRPC_MSVC_STATIC_RUNTIME) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" gRPC_STATIC_LINKING) + +if(VCPKG_TARGET_IS_UWP) + set(cares_CARES_PROVIDER OFF) +else() + set(cares_CARES_PROVIDER "package") +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + absl-sync gRPC_ABSL_SYNC_ENABLE +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DgRPC_INSTALL=ON + -DgRPC_BUILD_TESTS=OFF + -DgRPC_STATIC_LINKING=${gRPC_STATIC_LINKING} + -DgRPC_MSVC_STATIC_RUNTIME=${gRPC_MSVC_STATIC_RUNTIME} + -DgRPC_ZLIB_PROVIDER=package + -DgRPC_SSL_PROVIDER=package + -DgRPC_PROTOBUF_PROVIDER=package + -DgRPC_ABSL_PROVIDER=package + -DgRPC_UPB_PROVIDER=package + -DgRPC_RE2_PROVIDER=package + -DgRPC_PROTOBUF_PACKAGE_TYPE=CONFIG + -DgRPC_CARES_PROVIDER=${cares_CARES_PROVIDER} + -DgRPC_GFLAGS_PROVIDER=none + -DgRPC_BENCHMARK_PROVIDER=none + -DgRPC_INSTALL_CSHARP_EXT=OFF + -DgRPC_INSTALL_BINDIR:STRING=bin + -DgRPC_INSTALL_LIBDIR:STRING=lib + -DgRPC_INSTALL_INCLUDEDIR:STRING=include + -DgRPC_INSTALL_CMAKEDIR:STRING=share/gRPC + -DgRPC_BUILD_CODEGEN=${gRPC_BUILD_CODEGEN} +) + +vcpkg_install_cmake(ADD_BIN_TO_PATH) + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/gRPC TARGET_PATH share/gRPC) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +if (gRPC_BUILD_CODEGEN) + vcpkg_copy_tools( + AUTO_CLEAN + TOOL_NAMES + grpc_php_plugin + grpc_python_plugin + grpc_node_plugin + grpc_objective_c_plugin + grpc_csharp_plugin + grpc_cpp_plugin + grpc_ruby_plugin + ) +endif() + +# Ignore the C# extension DLL in bin/ +SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/grpc/snprintf.patch b/vcpkg/ports/grpc/snprintf.patch new file mode 100644 index 0000000..d1fd52e --- /dev/null +++ b/vcpkg/ports/grpc/snprintf.patch @@ -0,0 +1,12 @@ +diff --git a/src/core/tsi/alts/crypt/aes_gcm.cc b/src/core/tsi/alts/crypt/aes_gcm.cc +index 02b1ac4492..191f462277 100644 +--- a/src/core/tsi/alts/crypt/aes_gcm.cc ++++ b/src/core/tsi/alts/crypt/aes_gcm.cc +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + + #include + diff --git a/vcpkg/ports/grppi/CONTROL b/vcpkg/ports/grppi/CONTROL new file mode 100644 index 0000000..c638ad2 --- /dev/null +++ b/vcpkg/ports/grppi/CONTROL @@ -0,0 +1,4 @@ +Source: grppi +Version: 0.4.0 +Homepage: https://github.com/arcosuc3m/grppi +Description: GrPPI is an open source generic and reusable parallel pattern programming interface developed at University Carlos III of Madrid. \ No newline at end of file diff --git a/vcpkg/ports/grppi/fix-build-error.patch b/vcpkg/ports/grppi/fix-build-error.patch new file mode 100644 index 0000000..edbdc3a --- /dev/null +++ b/vcpkg/ports/grppi/fix-build-error.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 09f1f9b..9ef62e9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -13,7 +13,7 @@ message(STATUS "CMAKE_CXX_COMPILER_ID: " ${CMAKE_CXX_COMPILER_ID} ) + + set(CMAKE_CXX_STANDARD 14) + +-add_compile_options(-Wall -Werror -pedantic -pedantic-errors -Wextra -Weffc++) ++add_compile_options(-Wall -Werror -pedantic -pedantic-errors -Wextra) + + # Set specific options depending on compiler + if ( ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" ) diff --git a/vcpkg/ports/grppi/fix-support-other-compilers.patch b/vcpkg/ports/grppi/fix-support-other-compilers.patch new file mode 100644 index 0000000..d347b26 --- /dev/null +++ b/vcpkg/ports/grppi/fix-support-other-compilers.patch @@ -0,0 +1,44 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 09f1f9b..e7b562b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -20,22 +20,19 @@ if ( ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" ) + if(NOT(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 3.9.0)) + message(FATAL_ERROR "Clang version " ${CMAKE_CXX_COMPILER_VERSION} + " not supported. Upgrade to 3.9 or above.") +- else() +- message( STATUS "C++ Compiler is Clang" ) + endif() + elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") + if(NOT(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 6.0)) + message(FATAL_ERROR "g++ version " ${CMAKE_CXX_COMPILER_VERSION} + " not supported. Upgrade to 6.0 or above.") + else() +- message( STATUS "C++ Compiler is GNU") + if (${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 7.0) + #g++ 7 warns in non C++17 for over-aligned new otherwise + add_compile_options(-faligned-new) + endif() + endif() + elseif ( ${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel" ) +- message(FATAL_ERROR "Intel compiler is not currently supported") ++ message(WARNING "Intel compiler is not currently supported") + # if(NOT(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER 16.0)) + # message( FATAL_ERROR "Intel version " ${CMAKE_CXX_COMPILER_VERSION} + # " not supported. Upgrade to 16.0 or above.") +@@ -43,12 +40,11 @@ elseif ( ${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel" ) + # message( STATUS "C++ Compiler is Intel" ) + # message( WARNING "WARNING: GrPPI has not been fully tested with Intel compiler." ) + # endif() +-else() +- message( FATAL_ERROR "Unsupported compiler: " +- ${CMAKE_CXX_COMPILER_ID} +- ${CMAKE_CXX_COMPILER_VERSION}) + endif() + ++message(STATUS "C++ Compiler is " ${CMAKE_CXX_COMPILER_ID} ++ " version " ${CMAKE_CXX_COMPILER_VERSION}) ++ + # GrPPI library + include_directories("${CMAKE_SOURCE_DIR}/include") + diff --git a/vcpkg/ports/grppi/portfile.cmake b/vcpkg/ports/grppi/portfile.cmake new file mode 100644 index 0000000..6b1895d --- /dev/null +++ b/vcpkg/ports/grppi/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO arcosuc3m/grppi + REF v0.4.0 + SHA512 f8235af6832958de420a68d4465a6c63701ab4385f3430d32f77c1d5e8212001262aad1a8aae04261ba889d592798cd3963843b190d325bddc1fe7dcc4aebd7d + HEAD_REF master + PATCHES + fix-build-error.patch + fix-support-other-compilers.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DGRPPI_DOXY_ENABLE=OFF + -DGRPPI_EXAMPLE_APPLICATIONS_ENABLE=OFF + -DGRPPI_UNIT_TEST_ENABLE=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/gsl-lite/CONTROL b/vcpkg/ports/gsl-lite/CONTROL new file mode 100644 index 0000000..65c6fb3 --- /dev/null +++ b/vcpkg/ports/gsl-lite/CONTROL @@ -0,0 +1,4 @@ +Source: gsl-lite +Version: 0.37.0 +Description: A single-file header-only implementation of ISO C++ Guidelines Support Library (GSL) for C++98, C++11 and later. +Homepage: https://github.com/gsl-lite/gsl-lite/ diff --git a/vcpkg/ports/gsl-lite/portfile.cmake b/vcpkg/ports/gsl-lite/portfile.cmake new file mode 100644 index 0000000..5239c71 --- /dev/null +++ b/vcpkg/ports/gsl-lite/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO gsl-lite/gsl-lite + REF 4b796627ad0fa42640f5fdb96f23c4a0d9ee084f + SHA512 c0943824149b17c66947160bd83f3b14b821ba14bba02247546bd98d2b2809fae611e7841000fbe3be8f675cd076585f12ede05366fd1f9ba96a1067ac63ef43 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/gsl-lite") + +file(WRITE ${CURRENT_PACKAGES_DIR}/include/gsl-lite.hpp "#ifndef GSL_LITE_HPP_VCPKG_COMPAT_HEADER_INCLUDED +#define GSL_LITE_HPP_VCPKG_COMPAT_HEADER_INCLUDED +#pragma message(\"The header is deprecated and provided only for compatibility; please include instead.\") +#include +#endif // GSL_LITE_HPP_VCPKG_COMPAT_HEADER_INCLUDED") + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/lib" + "${CURRENT_PACKAGES_DIR}/debug" +) + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/vcpkg/ports/gsl/0001-configure.patch b/vcpkg/ports/gsl/0001-configure.patch new file mode 100644 index 0000000..7f80e2e --- /dev/null +++ b/vcpkg/ports/gsl/0001-configure.patch @@ -0,0 +1,165 @@ +--- + config.h.in => config.h | 50 ++++++++++++++++++++++++------------------------- + 1 file changed, 25 insertions(+), 25 deletions(-) + rename config.h.in => config.h (92%) + +diff --git a/config.h.in b/config.h +similarity index 92% +rename from config.h.in +rename to config.h +index d39c766..c650f5b 100644 +--- a/config.h.in ++++ b/config.h +@@ -8,19 +8,19 @@ + + /* Define to 1 if you have the declaration of `acosh', and to 0 if you don't. + */ +-#undef HAVE_DECL_ACOSH ++#define HAVE_DECL_ACOSH 1 + + /* Define to 1 if you have the declaration of `asinh', and to 0 if you don't. + */ +-#undef HAVE_DECL_ASINH ++#define HAVE_DECL_ASINH 1 + + /* Define to 1 if you have the declaration of `atanh', and to 0 if you don't. + */ +-#undef HAVE_DECL_ATANH ++#define HAVE_DECL_ATANH 1 + + /* Define to 1 if you have the declaration of `expm1', and to 0 if you don't. + */ +-#undef HAVE_DECL_EXPM1 ++#define HAVE_DECL_EXPM1 1 + + /* Define to 1 if you have the declaration of `feenableexcept', and to 0 if + you don't. */ +@@ -40,31 +40,31 @@ + + /* Define to 1 if you have the declaration of `frexp', and to 0 if you don't. + */ +-#undef HAVE_DECL_FREXP ++#define HAVE_DECL_FREXP 1 + + /* Define to 1 if you have the declaration of `hypot', and to 0 if you don't. + */ +-#undef HAVE_DECL_HYPOT ++#define HAVE_DECL_HYPOT 1 + + /* Define to 1 if you have the declaration of `isfinite', and to 0 if you + don't. */ +-#undef HAVE_DECL_ISFINITE ++#define HAVE_DECL_ISFINITE 1 + + /* Define to 1 if you have the declaration of `isinf', and to 0 if you don't. + */ +-#undef HAVE_DECL_ISINF ++#define HAVE_DECL_ISINF 1 + + /* Define to 1 if you have the declaration of `isnan', and to 0 if you don't. + */ +-#undef HAVE_DECL_ISNAN ++#define HAVE_DECL_ISNAN 1 + + /* Define to 1 if you have the declaration of `ldexp', and to 0 if you don't. + */ +-#undef HAVE_DECL_LDEXP ++#define HAVE_DECL_LDEXP 1 + + /* Define to 1 if you have the declaration of `log1p', and to 0 if you don't. + */ +-#undef HAVE_DECL_LOG1P ++#define HAVE_DECL_LOG1P 1 + + /* Define to 1 if you have the header file. */ + #undef HAVE_DLFCN_H +@@ -73,13 +73,13 @@ + #undef HAVE_DOPRNT + + /* Defined if you have ansi EXIT_SUCCESS and EXIT_FAILURE in stdlib.h */ +-#undef HAVE_EXIT_SUCCESS_AND_FAILURE ++#define HAVE_EXIT_SUCCESS_AND_FAILURE 1 + + /* Defined on architectures with excess floating-point precision */ + #undef HAVE_EXTENDED_PRECISION_REGISTERS + + /* Define if x86 processor has sse extensions. */ +-#undef HAVE_FPU_X86_SSE ++#define HAVE_FPU_X86_SSE 1 + + /* Define to 1 if you have the header file. */ + #undef HAVE_IEEEFP_H +@@ -94,43 +94,43 @@ + #undef HAVE_INLINE + + /* Define to 1 if you have the header file. */ +-#undef HAVE_INTTYPES_H ++#define HAVE_INTTYPES_H 1 + + /* Define to 1 if you have the `m' library (-lm). */ + #undef HAVE_LIBM + + /* Define to 1 if you have the `memcpy' function. */ +-#undef HAVE_MEMCPY ++#define HAVE_MEMCPY 1 + + /* Define to 1 if you have the `memmove' function. */ +-#undef HAVE_MEMMOVE ++#define HAVE_MEMMOVE 1 + + /* Define to 1 if you have the header file. */ +-#undef HAVE_MEMORY_H ++#define HAVE_MEMORY_H 1 + + /* Define this if printf can handle %Lf for long double */ + #undef HAVE_PRINTF_LONGDOUBLE + + /* Define to 1 if you have the header file. */ +-#undef HAVE_STDINT_H ++#define HAVE_STDINT_H 1 + + /* Define to 1 if you have the header file. */ +-#undef HAVE_STDLIB_H ++#define HAVE_STDLIB_H 1 + + /* Define to 1 if you have the `strdup' function. */ +-#undef HAVE_STRDUP ++#define HAVE_STRDUP 1 + + /* Define to 1 if you have the header file. */ + #undef HAVE_STRINGS_H + + /* Define to 1 if you have the header file. */ +-#undef HAVE_STRING_H ++#define HAVE_STRING_H 1 + + /* Define to 1 if you have the `strtol' function. */ +-#undef HAVE_STRTOL ++#define HAVE_STRTOL 1 + + /* Define to 1 if you have the `strtoul' function. */ +-#undef HAVE_STRTOUL ++#define HAVE_STRTOUL 1 + + /* Define to 1 if you have the header file. */ + #undef HAVE_SYS_STAT_H +@@ -142,7 +142,7 @@ + #undef HAVE_UNISTD_H + + /* Define to 1 if you have the `vprintf' function. */ +-#undef HAVE_VPRINTF ++#define HAVE_VPRINTF 1 + + /* Define if you need to hide the static definitions of inline functions */ + #undef HIDE_INLINE_STATIC +@@ -176,7 +176,7 @@ + #undef RELEASED + + /* Define to 1 if you have the ANSI C header files. */ +-#undef STDC_HEADERS ++#define STDC_HEADERS 1 + + /* Version number of package */ + #undef VERSION +-- + diff --git a/vcpkg/ports/gsl/0002-add-fp-control.patch b/vcpkg/ports/gsl/0002-add-fp-control.patch new file mode 100644 index 0000000..dceeb38 --- /dev/null +++ b/vcpkg/ports/gsl/0002-add-fp-control.patch @@ -0,0 +1,97 @@ +--- + ieee-utils/fp-win.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + ieee-utils/fp.c | 2 ++ + 2 files changed, 72 insertions(+) + create mode 100644 ieee-utils/fp-win.c + +diff --git a/ieee-utils/fp-win.c b/ieee-utils/fp-win.c +new file mode 100644 +index 0000000..e024eae +--- /dev/null ++++ b/ieee-utils/fp-win.c +@@ -0,0 +1,70 @@ ++/* fp-win.c ++ * ++ * Author: Brian Gladman ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or (at ++ * your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ++ */ ++ ++#include ++ ++#include ++#include ++#include ++ ++const char *fp_env_string = "round-to-nearest,double-precision,mask-all"; ++ ++int ++gsl_ieee_set_mode (int precision, int rounding, int exception_mask) ++{ ++ unsigned int old, mode = _DN_SAVE, mask = _MCW_DN | _MCW_RC | _MCW_EM; ++ ++ switch(precision) ++ { ++ case GSL_IEEE_SINGLE_PRECISION: mode |= _PC_24; break; ++ case GSL_IEEE_EXTENDED_PRECISION: mode |= _PC_64; break; ++ case GSL_IEEE_DOUBLE_PRECISION: ++ default: mode |= _PC_53; ++ } ++#ifndef _M_AMD64 ++ mask |= _MCW_PC; ++#endif ++ ++ switch(rounding) ++ { ++ case GSL_IEEE_ROUND_DOWN: mode |= _RC_DOWN; break; ++ case GSL_IEEE_ROUND_UP: mode |= _RC_UP; break; ++ case GSL_IEEE_ROUND_TO_ZERO: mode |= _RC_CHOP; break; ++ case GSL_IEEE_ROUND_TO_NEAREST: ++ default: mode |= _RC_NEAR; ++ } ++ ++ if(exception_mask & GSL_IEEE_MASK_INVALID) ++ mode |= _EM_INVALID; ++ if(exception_mask & GSL_IEEE_MASK_DENORMALIZED) ++ mode |= _EM_DENORMAL; ++ if(exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO) ++ mode |= _EM_ZERODIVIDE; ++ if(exception_mask & GSL_IEEE_MASK_OVERFLOW) ++ mode |= _EM_OVERFLOW; ++ if(exception_mask & GSL_IEEE_MASK_UNDERFLOW) ++ mode |= _EM_UNDERFLOW; ++ if(exception_mask & GSL_IEEE_TRAP_INEXACT) ++ mode &= ~_EM_INEXACT; ++ else ++ mode |= _EM_INEXACT; ++ ++ _controlfp_s( &old, mode, mask); ++ return GSL_SUCCESS; ++} +diff --git a/ieee-utils/fp.c b/ieee-utils/fp.c +index 445a14f..b6ae5af 100644 +--- a/ieee-utils/fp.c ++++ b/ieee-utils/fp.c +@@ -45,6 +45,8 @@ + #endif + #elif HAVE_DECL_FEENABLEEXCEPT || HAVE_DECL_FESETTRAPENABLE + #include "fp-gnuc99.c" ++#elif _MSC_VER ++#include "fp-win.c" + #else + #include "fp-unknown.c" + #endif +-- + diff --git a/vcpkg/ports/gsl/CMakeLists.txt b/vcpkg/ports/gsl/CMakeLists.txt new file mode 100644 index 0000000..2d37f37 --- /dev/null +++ b/vcpkg/ports/gsl/CMakeLists.txt @@ -0,0 +1,83 @@ +cmake_minimum_required(VERSION 3.8) +project(gsl C) + +option(INSTALL_HEADERS "Install public header files" ON) + +# Function to extract parameter from makefile. Space separated values are returned as lists +function(extract_from_makefile PATTERN RETURN FILEPATH) + file(READ ${FILEPATH} MAKEFILE_CONTENT) + string(REGEX MATCH "${PATTERN}" CONTENTS "${MAKEFILE_CONTENT}") + set(CONTENTS ${CMAKE_MATCH_1}) + # Split string into list + string(REGEX REPLACE "([\t ]+(\\\\\n)?)+" ";" CONTENTS "${CONTENTS}") + string(REGEX REPLACE "[\t ]*\\\\\n[\t ]*;" "" CONTENTS "${CONTENTS}") + if("${CONTENTS}" STREQUAL "") + message(AUTHOR_WARNING "No match for \"${PATTERN}\" found in file ${FILEPATH}") + endif() + # Return + set(${RETURN} ${CONTENTS} PARENT_SCOPE) +endfunction(extract_from_makefile) + +# Function to extract C sources from makefile +function(extract_sources SUBFOLDER ALLSOURCES) + extract_from_makefile("lib[a-zA-Z1-9_]*_la_SOURCES[ \t]*=[ \t]*(((\\\\\n)?[^\n])*)" SOURCEFILES "${SUBFOLDER}/Makefile.am") + # Add the folder in front of the file names + string(REGEX REPLACE "([^;]+)" "${SUBFOLDER}/\\1" SOURCEFILES "${SOURCEFILES}") + # Return + set(${ALLSOURCES} ${${ALLSOURCES}} ${SOURCEFILES} PARENT_SCOPE) +endfunction(extract_sources) + +set(SOURCES) +set(CBLAS_SOURCES) +extract_from_makefile("SUBDIRS = (((\\\\\n)?[^\n])*)" FOLDERS "./Makefile.am") +extract_sources("." SOURCES) +foreach(DIR IN LISTS FOLDERS) + if("${DIR}" STREQUAL "cblas") + extract_sources("${DIR}" CBLAS_SOURCES) + else() + extract_sources("${DIR}" SOURCES) + endif() +endforeach() + +file(READ gsl_types.h GSLTYPES_H) +string(REPLACE "#ifdef WIN32" "#if 1 /*WIN32*/" GSLTYPES_H "${GSLTYPES_H}") +if(BUILD_SHARED_LIBS) + string(REPLACE "# ifdef GSL_DLL" "# if 1 /*GSL_DLL*/" GSLTYPES_H "${GSLTYPES_H}") +endif() +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/gsl_types.h "${GSLTYPES_H}") + +file(GLOB_RECURSE PUBLIC_HEADERS gsl*.h) +list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/gsl_types.h) + +# The debug libraries have a "d" postfix so that CMake's FindGSL.cmake +# module can distinguish between Release and Debug libraries +set(CMAKE_DEBUG_POSTFIX "d") + +add_library(gslcblas ${CBLAS_SOURCES}) +set_target_properties(gslcblas PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) + +add_library(gsl ${SOURCES}) +set_target_properties(gsl PROPERTIES DEFINE_SYMBOL DLL_EXPORT WINDOWS_EXPORT_ALL_SYMBOLS ON) +target_link_libraries(gsl PUBLIC gslcblas) + + +if(INSTALL_HEADERS) + set_target_properties(gsl PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADERS}") +endif() +target_include_directories(gslcblas PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories(gsl PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) +# For the build, we need to copy all headers to the gsl directory +file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/gsl) +file(COPY ${PUBLIC_HEADERS} DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/gsl") + +set(TARGET_INSTALL_OPTIONS) +if(INSTALL_HEADERS) + set(TARGET_INSTALL_OPTIONS PUBLIC_HEADER DESTINATION include/gsl) +endif() + +install(TARGETS gsl gslcblas + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + ${TARGET_INSTALL_OPTIONS} +) diff --git a/vcpkg/ports/gsl/CONTROL b/vcpkg/ports/gsl/CONTROL new file mode 100644 index 0000000..62c5efb --- /dev/null +++ b/vcpkg/ports/gsl/CONTROL @@ -0,0 +1,4 @@ +Source: gsl +Version: 2.6 +Homepage: https://www.gnu.org/software/gsl/ +Description: The GNU Scientific Library is a numerical library for C and C++ programmers diff --git a/vcpkg/ports/gsl/portfile.cmake b/vcpkg/ports/gsl/portfile.cmake new file mode 100644 index 0000000..3069c44 --- /dev/null +++ b/vcpkg/ports/gsl/portfile.cmake @@ -0,0 +1,29 @@ +set(GSL_VERSION 2.6) + +vcpkg_download_distfile(ARCHIVE + URLS "https://ftp.gnu.org/gnu/gsl/gsl-${GSL_VERSION}.tar.gz" "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gsl/gsl-${GSL_VERSION}.tar.gz" + FILENAME "gsl-${GSL_VERSION}.tar.gz" + SHA512 0be8240715f0b86aba2c63d9f12da4dba4719d4e350e9308d279e0dd3b2f0519ea26fd2e38a17f3e8cf43aacbaa2455207a7ca0d6c305f3b8725e8ece2250a74 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + 0001-configure.patch + 0002-add-fp-control.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/gsl/usage b/vcpkg/ports/gsl/usage new file mode 100644 index 0000000..f1ae924 --- /dev/null +++ b/vcpkg/ports/gsl/usage @@ -0,0 +1,4 @@ +The package gsl is compatible with built-in CMake targets: + + find_package(GSL REQUIRED) + target_link_libraries(main PRIVATE GSL::gsl GSL::gslcblas) diff --git a/vcpkg/ports/gsoap/CONTROL b/vcpkg/ports/gsoap/CONTROL new file mode 100644 index 0000000..ff44348 --- /dev/null +++ b/vcpkg/ports/gsoap/CONTROL @@ -0,0 +1,6 @@ +Source: gsoap +Version: 2.8.105 +Build-Depends: curl +Homepage: https://sourceforge.net/projects/gsoap2/ +Description: The gSOAP toolkit is a C and C++ software development toolkit for SOAP and REST XML Web services and generic C/C++ XML data bindings. +Supports: !(linux|osx|arm|uwp) diff --git a/vcpkg/ports/gsoap/fix-build-in-windows.patch b/vcpkg/ports/gsoap/fix-build-in-windows.patch new file mode 100644 index 0000000..e661fb7 --- /dev/null +++ b/vcpkg/ports/gsoap/fix-build-in-windows.patch @@ -0,0 +1,307 @@ + gsoap/VisualStudio2005/soapcpp2/soapcpp2.sln | 8 +- + .../soapcpp2/soapcpp2/soapcpp2.vcxproj | 114 +++++++++++++++++ + gsoap/VisualStudio2005/wsdl2h/wsdl2h.sln | 8 +- + .../VisualStudio2005/wsdl2h/wsdl2h/wsdl2h.vcxproj | 139 +++++++++++++++++++++ + 4 files changed, 263 insertions(+), 6 deletions(-) + +diff --git a/gsoap/VisualStudio2005/soapcpp2/soapcpp2.sln b/gsoap/VisualStudio2005/soapcpp2/soapcpp2.sln +index 68bacf1..5d74e6b 100644 +--- a/gsoap/VisualStudio2005/soapcpp2/soapcpp2.sln ++++ b/gsoap/VisualStudio2005/soapcpp2/soapcpp2.sln +@@ -1,7 +1,9 @@ +  +-Microsoft Visual Studio Solution File, Format Version 9.00 +-# Visual C++ Express 2005 +-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soapcpp2", "soapcpp2\soapcpp2.vcproj", "{BDD1B293-CE39-4BEC-8E63-8B1621F3EB56}" ++Microsoft Visual Studio Solution File, Format Version 12.00 ++# Visual Studio 14 ++VisualStudioVersion = 14.0.25420.1 ++MinimumVisualStudioVersion = 10.0.40219.1 ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soapcpp2", "soapcpp2\soapcpp2.vcxproj", "{BDD1B293-CE39-4BEC-8E63-8B1621F3EB56}" + EndProject + Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution +diff --git a/gsoap/VisualStudio2005/soapcpp2/soapcpp2/soapcpp2.vcxproj b/gsoap/VisualStudio2005/soapcpp2/soapcpp2/soapcpp2.vcxproj +new file mode 100644 +index 0000000..17f1d75 +--- /dev/null ++++ b/gsoap/VisualStudio2005/soapcpp2/soapcpp2/soapcpp2.vcxproj +@@ -0,0 +1,114 @@ ++ ++ ++ ++ ++ Debug ++ Win32 ++ ++ ++ Release ++ Win32 ++ ++ ++ ++ {BDD1B293-CE39-4BEC-8E63-8B1621F3EB56} ++ soapcpp2 ++ Win32Proj ++ 8.1 ++ ++ ++ ++ Application ++ v140 ++ Unicode ++ true ++ ++ ++ Application ++ v140 ++ Unicode ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ <_ProjectFileVersion>14.0.25431.1 ++ ++ ++ $(SolutionDir)$(Configuration)\ ++ $(Configuration)\ ++ true ++ ++ ++ $(SolutionDir)$(Configuration)\ ++ $(Configuration)\ ++ false ++ ++ ++ ++ Disabled ++ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) ++ true ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ ++ Level3 ++ EditAndContinue ++ ++ ++ kernel32.lib ++ true ++ Console ++ MachineX86 ++ ++ ++ ++ ++ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) ++ MultiThreaded ++ ++ Level3 ++ ProgramDatabase ++ ++ ++ kernel32.lib ++ true ++ Console ++ true ++ true ++ MachineX86 ++ ++ ++ ++ ++ ++ ++ ++ $(IntDir)%(Filename)1.obj ++ $(IntDir)%(Filename)1.xdc ++ $(IntDir)%(Filename)1.obj ++ $(IntDir)%(Filename)1.xdc ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +\ No newline at end of file +diff --git a/gsoap/VisualStudio2005/wsdl2h/wsdl2h.sln b/gsoap/VisualStudio2005/wsdl2h/wsdl2h.sln +index ffa3fa4..3f23607 100644 +--- a/gsoap/VisualStudio2005/wsdl2h/wsdl2h.sln ++++ b/gsoap/VisualStudio2005/wsdl2h/wsdl2h.sln +@@ -1,7 +1,9 @@ +  +-Microsoft Visual Studio Solution File, Format Version 9.00 +-# Visual C++ Express 2005 +-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wsdl2h", "wsdl2h\wsdl2h.vcproj", "{6CBC554A-4FFB-461F-91D4-11B358802815}" ++Microsoft Visual Studio Solution File, Format Version 12.00 ++# Visual Studio 14 ++VisualStudioVersion = 14.0.25420.1 ++MinimumVisualStudioVersion = 10.0.40219.1 ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wsdl2h", "wsdl2h\wsdl2h.vcxproj", "{6CBC554A-4FFB-461F-91D4-11B358802815}" + EndProject + Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution +diff --git a/gsoap/VisualStudio2005/wsdl2h/wsdl2h/wsdl2h.vcxproj b/gsoap/VisualStudio2005/wsdl2h/wsdl2h/wsdl2h.vcxproj +new file mode 100644 +index 0000000..abf3ea6 +--- /dev/null ++++ b/gsoap/VisualStudio2005/wsdl2h/wsdl2h/wsdl2h.vcxproj +@@ -0,0 +1,139 @@ ++ ++ ++ ++ ++ Debug ++ Win32 ++ ++ ++ Release ++ Win32 ++ ++ ++ ++ {6CBC554A-4FFB-461F-91D4-11B358802815} ++ wsdl2h ++ Win32Proj ++ 8.1 ++ ++ ++ ++ Application ++ v140 ++ Unicode ++ true ++ ++ ++ Application ++ v140 ++ Unicode ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ <_ProjectFileVersion>14.0.25431.1 ++ ++ ++ $(SolutionDir)$(Configuration)\ ++ $(Configuration)\ ++ true ++ ++ ++ $(SolutionDir)$(Configuration)\ ++ $(Configuration)\ ++ false ++ ++ ++ ++ Disabled ++ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) ++ true ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ ++ Level3 ++ EditAndContinue ++ ++ ++ kernel32.lib ++ true ++ Console ++ MachineX86 ++ ++ ++ ++ ++ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) ++ MultiThreaded ++ ++ Level3 ++ ProgramDatabase ++ ++ ++ kernel32.lib ++ true ++ Console ++ true ++ true ++ MachineX86 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Parsing WSDL and Schema definitions ++ soapcpp2.exe -SC -pwsdl %(Filename)%(Extension) ++ ++ wsdlStub.h wsdlH.h wsdlC.cpp;%(Outputs) ++ Parsing WSDL and Schema definitions ++ soapcpp2.exe -SC -pwsdl %(Filename)%(Extension) ++ ++ wsdlStub.h wsdlH.h wsdlC.cpp;%(Outputs) ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +\ No newline at end of file diff --git a/vcpkg/ports/gsoap/portfile.cmake b/vcpkg/ports/gsoap/portfile.cmake new file mode 100644 index 0000000..1a4e75a --- /dev/null +++ b/vcpkg/ports/gsoap/portfile.cmake @@ -0,0 +1,60 @@ +vcpkg_fail_port_install(ON_TARGET "Linux" "OSX" "UWP" ON_ARCH "arm" "arm64") + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO gsoap2 + REF gsoap-2.8 + FILENAME "gsoap_2.8.105.zip" + SHA512 3b7b66ef738e9ba78f0c9d5ec141faab102dc2ed7c528e84358d530ec8cb913c559438bb86ae0f22e0736c4cd9be9e74f364a44257189ccaa1e6d001317f99de + PATCHES fix-build-in-windows.patch +) + +set(BUILD_ARCH "Win32") + +# Handle binary files and includes +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/gsoap ${CURRENT_PACKAGES_DIR}/debug/tools) + +if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + vcpkg_build_msbuild( + USE_VCPKG_INTEGRATION + PROJECT_PATH ${SOURCE_PATH}/gsoap/VisualStudio2005/soapcpp2/soapcpp2.sln + PLATFORM ${BUILD_ARCH} + TARGET Build + ) + vcpkg_build_msbuild( + USE_VCPKG_INTEGRATION + PROJECT_PATH ${SOURCE_PATH}/gsoap/VisualStudio2005/wsdl2h/wsdl2h.sln + PLATFORM ${BUILD_ARCH} + TARGET Build + ) + + file(COPY ${SOURCE_PATH}/gsoap/VisualStudio2005/soapcpp2/release/soapcpp2.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/gsoap/) + file(COPY ${SOURCE_PATH}/gsoap/VisualStudio2005/wsdl2h/release/wsdl2h.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/gsoap/) + file(COPY ${SOURCE_PATH}/gsoap/VisualStudio2005/soapcpp2/debug/soapcpp2.exe DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/gsoap/) + file(COPY ${SOURCE_PATH}/gsoap/VisualStudio2005/wsdl2h/debug/wsdl2h.exe DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/gsoap/) +else() + message(FATAL_ERROR "Sorry but gsoap only can be build in Windows temporary") +endif() + + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/gsoap/stdsoap2.h ${SOURCE_PATH}/gsoap/stdsoap2.c ${SOURCE_PATH}/gsoap/stdsoap2.cpp ${SOURCE_PATH}/gsoap/dom.c ${SOURCE_PATH}/gsoap/dom.cpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle import files +file(COPY ${SOURCE_PATH}/gsoap/import DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +# Handle custom files +file(COPY ${SOURCE_PATH}/gsoap/custom DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +# Handle plugin files +file(COPY ${SOURCE_PATH}/gsoap/plugin DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +# Cleanup surplus empty directory +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/gsoap/plugin/.deps") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/INSTALL.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME install) +file(INSTALL ${SOURCE_PATH}/README.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME readme) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/gtest/0002-Fix-z7-override.patch b/vcpkg/ports/gtest/0002-Fix-z7-override.patch new file mode 100644 index 0000000..cf87508 --- /dev/null +++ b/vcpkg/ports/gtest/0002-Fix-z7-override.patch @@ -0,0 +1,13 @@ +diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake +index 99725b7..3c25b0a 100644 +--- a/googletest/cmake/internal_utils.cmake ++++ b/googletest/cmake/internal_utils.cmake +@@ -66,7 +66,7 @@ macro(config_compiler_and_linker) + if (MSVC) + # Newlines inside flags variables break CMake's NMake generator. + # TODO(vladl@google.com): Add -RTCs and -RTCu to debug builds. +- set(cxx_base_flags "-GS -W4 -WX -wd4251 -wd4275 -nologo -J -Zi") ++ set(cxx_base_flags "-GS -W4 -WX -wd4251 -wd4275 -nologo -J") + set(cxx_base_flags "${cxx_base_flags} -D_UNICODE -DUNICODE -DWIN32 -D_WIN32") + set(cxx_base_flags "${cxx_base_flags} -DSTRICT -DWIN32_LEAN_AND_MEAN") + set(cxx_exception_flags "-EHsc -D_HAS_EXCEPTIONS=1") diff --git a/vcpkg/ports/gtest/CONTROL b/vcpkg/ports/gtest/CONTROL new file mode 100644 index 0000000..7245693 --- /dev/null +++ b/vcpkg/ports/gtest/CONTROL @@ -0,0 +1,5 @@ +Source: gtest +Version: 1.10.0 +Port-Version: 2 +Homepage: https://github.com/google/googletest +Description: GoogleTest and GoogleMock testing frameworks. diff --git a/vcpkg/ports/gtest/fix-main-lib-path.patch b/vcpkg/ports/gtest/fix-main-lib-path.patch new file mode 100644 index 0000000..e07806e --- /dev/null +++ b/vcpkg/ports/gtest/fix-main-lib-path.patch @@ -0,0 +1,68 @@ +diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt +index 3e72d75..9d135ff 100644 +--- a/googlemock/CMakeLists.txt ++++ b/googlemock/CMakeLists.txt +@@ -115,7 +115,8 @@ endif() + ######################################################################## + # + # Install rules +-install_project(gmock gmock_main) ++install_project(gmock) ++install_project(gmock_main) + + ######################################################################## + # +diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt +index e33718b..a049c2c 100644 +--- a/googletest/CMakeLists.txt ++++ b/googletest/CMakeLists.txt +@@ -136,7 +136,8 @@ target_link_libraries(gtest_main PUBLIC gtest) + ######################################################################## + # + # Install rules +-install_project(gtest gtest_main) ++install_project(gtest) ++install_project(gtest_main) + + ######################################################################## + # +diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake +index 69defc8..cf7295a 100644 +--- a/googletest/cmake/internal_utils.cmake ++++ b/googletest/cmake/internal_utils.cmake +@@ -317,11 +317,15 @@ function(install_project) + install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/" + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + # Install the project targets. ++ set (LIB_INSTALL_DST ${CMAKE_INSTALL_LIBDIR}) ++ if (${ARGN} MATCHES "_main") ++ set (LIB_INSTALL_DST ${CMAKE_INSTALL_LIBDIR}/manual-link) ++ endif() + install(TARGETS ${ARGN} + EXPORT ${targets_export_name} + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" +- ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" +- LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") ++ ARCHIVE DESTINATION "${LIB_INSTALL_DST}" ++ LIBRARY DESTINATION "${LIB_INSTALL_DST}") + if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + # Install PDBs + foreach(t ${ARGN}) +@@ -330,7 +334,7 @@ function(install_project) + get_target_property(t_pdb_output_directory ${t} PDB_OUTPUT_DIRECTORY) + install(FILES + "${t_pdb_output_directory}/\${CMAKE_INSTALL_CONFIG_NAME}/$<$:${t_pdb_name_debug}>$<$>:${t_pdb_name}>.pdb" +- DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ DESTINATION ${LIB_INSTALL_DST} + OPTIONAL) + endforeach() + endif() +@@ -340,7 +344,7 @@ function(install_project) + configure_file("${PROJECT_SOURCE_DIR}/cmake/${t}.pc.in" + "${configured_pc}" @ONLY) + install(FILES "${configured_pc}" +- DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") ++ DESTINATION "${LIB_INSTALL_DST}/pkgconfig") + endforeach() + endif() + endfunction() diff --git a/vcpkg/ports/gtest/portfile.cmake b/vcpkg/ports/gtest/portfile.cmake new file mode 100644 index 0000000..30e9dfb --- /dev/null +++ b/vcpkg/ports/gtest/portfile.cmake @@ -0,0 +1,78 @@ +if (EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git") + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/googletest + REF release-1.10.0 + SHA512 bd52abe938c3722adc2347afad52ea3a17ecc76730d8d16b065e165bc7477d762bce0997a427131866a89f1001e3f3315198204ffa5d643a9355f1f4d0d7b1a9 + HEAD_REF master + PATCHES + 0002-Fix-z7-override.patch + fix-main-lib-path.patch +) + +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" GTEST_FORCE_SHARED_CRT) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_GMOCK=ON + -DBUILD_GTEST=ON + -DCMAKE_DEBUG_POSTFIX=d + -Dgtest_force_shared_crt=${GTEST_FORCE_SHARED_CRT} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/GTest TARGET_PATH share/GTest) + +file( + INSTALL + "${SOURCE_PATH}/googletest/src/gtest.cc" + "${SOURCE_PATH}/googletest/src/gtest_main.cc" + "${SOURCE_PATH}/googletest/src/gtest-all.cc" + "${SOURCE_PATH}/googletest/src/gtest-death-test.cc" + "${SOURCE_PATH}/googletest/src/gtest-filepath.cc" + "${SOURCE_PATH}/googletest/src/gtest-internal-inl.h" + "${SOURCE_PATH}/googletest/src/gtest-matchers.cc" + "${SOURCE_PATH}/googletest/src/gtest-port.cc" + "${SOURCE_PATH}/googletest/src/gtest-printers.cc" + "${SOURCE_PATH}/googletest/src/gtest-test-part.cc" + "${SOURCE_PATH}/googletest/src/gtest-typed-test.cc" + DESTINATION + ${CURRENT_PACKAGES_DIR}/src +) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_maind.lib) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_maind.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gtest_maind.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_maind.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmock_maind.lib) + + file(READ ${CURRENT_PACKAGES_DIR}/share/gtest/GTestTargets-debug.cmake DEBUG_CONFIG) + string(REPLACE "\${_IMPORT_PREFIX}/debug/lib/gtest_maind.lib" + "\${_IMPORT_PREFIX}/debug/lib/manual-link/gtest_maind.lib" DEBUG_CONFIG "${DEBUG_CONFIG}") + string(REPLACE "\${_IMPORT_PREFIX}/debug/lib/gmock_maind.lib" + "\${_IMPORT_PREFIX}/debug/lib/manual-link/gmock_maind.lib" DEBUG_CONFIG "${DEBUG_CONFIG}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/gtest/GTestTargets-debug.cmake "${DEBUG_CONFIG}") +endif() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/gtest_main.lib) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gtest_main.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gtest_main.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock_main.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gmock_main.lib) + + file(READ ${CURRENT_PACKAGES_DIR}/share/gtest/GTestTargets-release.cmake RELEASE_CONFIG) + string(REPLACE "\${_IMPORT_PREFIX}/lib/gtest_main.lib" + "\${_IMPORT_PREFIX}/lib/manual-link/gtest_main.lib" RELEASE_CONFIG "${RELEASE_CONFIG}") + string(REPLACE "\${_IMPORT_PREFIX}/lib/gmock_main.lib" + "\${_IMPORT_PREFIX}/lib/manual-link/gmock_main.lib" RELEASE_CONFIG "${RELEASE_CONFIG}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/gtest/GTestTargets-release.cmake "${RELEASE_CONFIG}") +endif() + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/googletest/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/gtest/usage b/vcpkg/ports/gtest/usage new file mode 100644 index 0000000..3ed1944 --- /dev/null +++ b/vcpkg/ports/gtest/usage @@ -0,0 +1,8 @@ +The package gtest is compatible with built-in CMake targets: + + enable_testing() + + find_package(GTest CONFIG REQUIRED) + target_link_libraries(main PRIVATE GTest::gtest GTest::gtest_main GTest::gmock GTest::gmock_main) + + add_test(AllTestsInMain main) diff --git a/vcpkg/ports/gtk/CMakeLists.txt b/vcpkg/ports/gtk/CMakeLists.txt new file mode 100644 index 0000000..9c265c7 --- /dev/null +++ b/vcpkg/ports/gtk/CMakeLists.txt @@ -0,0 +1,177 @@ +cmake_minimum_required(VERSION 3.0) +project(gtk+ C) + +configure_file(config.h.win32 ${CMAKE_CURRENT_SOURCE_DIR}/config.h COPYONLY) +configure_file(gdk/gdkconfig.h.win32_broadway ${CMAKE_CURRENT_SOURCE_DIR}/gdk/gdkconfig.h COPYONLY) + +set(GLIB_LIB_SUFFIX 2.0) +set(PANGO_LIB_SUFFIX 1.0) +set(ATK_LIB_SUFFIX 1.0) +set(GDK_PIXBUF_LIB_SUFFIX 2.0) +if(CMAKE_BUILD_TYPE STREQUAL Debug) + set(CAIRO_LIB_SUFFIX d) +endif() + +if (WIN32) + # Set utf-8 charset to avoid compile error C2001 + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /utf-8") +endif() + +# find dependencies +# glib +find_path(GLIB_INCLUDE_DIR glib.h) +find_library(GLIB_GLIB_LIBRARY glib-${GLIB_LIB_SUFFIX}) +find_library(GLIB_GIO_LIBRARY gio-${GLIB_LIB_SUFFIX}) +find_library(GLIB_GMODULE_LIBRARY gmodule-${GLIB_LIB_SUFFIX}) +find_library(GLIB_GOBJECT_LIBRARY gobject-${GLIB_LIB_SUFFIX}) +set(GLIB_LIBRARIES ${GLIB_GLIB_LIBRARY} ${GLIB_GIO_LIBRARY} ${GLIB_GMODULE_LIBRARY} ${GLIB_GOBJECT_LIBRARY}) + +# pango +find_path(PANGO_INCLUDE_DIR pango/pango.h) +find_library(PANGO_LIBRARY pango-${PANGO_LIB_SUFFIX}) +find_library(PANGO_CAIRO_LIBRARY pangocairo-${PANGO_LIB_SUFFIX}) +find_library(PANGO_WIN32_LIBRARY pangowin32-${PANGO_LIB_SUFFIX}) +set(PANGO_LIBRARIES ${PANGO_LIBRARY} ${PANGO_CAIRO_LIBRARY} ${PANGO_WIN32_LIBRARY}) +# cairo +find_library(CAIRO_LIBRARY cairo${CAIRO_LIB_SUFFIX}) +find_library(CAIRO_GOBJECT_LIBRARY cairo-gobject${CAIRO_LIB_SUFFIX}) +set(CAIRO_LIBRARIES ${CAIRO_LIBRARY} ${CAIRO_GOBJECT_LIBRARY}) +find_path(CAIRO_INCLUDE_DIR cairo.h) + +# atk +find_path(ATK_INCLUDE_DIR atk/atk.h) +find_library(ATK_LIBRARY atk-${ATK_LIB_SUFFIX}) + +# gdk-pixbuf +find_path(GDK_PIXBUF_INCLUDE_DIR gdk-pixbuf/gdk-pixbuf.h) +find_library(GDK_PIXBUF_LIBRARY gdk_pixbuf-${GDK_PIXBUF_LIB_SUFFIX}) + +# epoxy +find_path(EPOXY_INCLUDE_DIR epoxy/common.h) +find_library(EPOXY_LIBRARY epoxy) + +# gettext +find_path(LIBINTL_INCLUDE_DIR libintl.h) +find_library(LIBINTL_LIBRARY NAMES intl libintl) + +set(GTK_REQUIRED_LIBRARIES + ${LIBINTL_LIBRARY} + ${EPOXY_LIBRARY} + ${GLIB_LIBRARIES} + ${CAIRO_LIBRARIES} + ${PANGO_LIBRARIES} + ${GDK_PIXBUF_LIBRARY} + ${ATK_LIBRARY}) + +set(GTK_REQUIRED_INCLUDE_DIR + ${LIBINTL_INCLUDE_DIR} + ${EPOXY_INCLUDE_DIR} + ${GLIB_INCLUDE_DIR} + ${GDK_PIXBUF_INCLUDE_DIR} + ${CAIRO_INCLUDE_DIR} + ${PANGO_INCLUDE_DIR} + ${ATK_INCLUDE_DIR}) + +# defines expected by all modules +add_definitions( + -DHAVE_CONFIG_H + -DG_DISABLE_SINGLE_INCLUDES + -DATK_DISABLE_SINGLE_INCLUDES + -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES + -DGTK_DISABLE_SINGLE_INCLUDES + -D_USE_MATH_DEFINES) + +add_definitions(-DG_ENABLE_DEBUG) +if(CMAKE_BUILD_TYPE STREQUAL Debug) + add_definitions(-DG_ENABLE_CONSISTENCY_CHECKS) +else() + add_definitions(-DG_DISABLE_CAST_CHECKS) +endif() + +macro(extract_vcproj_sources VC_PROJECT OUT_VAR) + file(READ ${VC_PROJECT} ${VC_PROJECT}-CONTENTS) + STRING(REPLACE "\n" ";" ${VC_PROJECT}-CONTENTS "${${VC_PROJECT}-CONTENTS}") # split by lines + foreach(LINE ${${VC_PROJECT}-CONTENTS}) + if(LINE MATCHES "") + string(REPLACE "" "" LINE ${LINE}) + string(STRIP ${LINE} LINE) + file(TO_CMAKE_PATH ${LINE} LINE) + list(APPEND ${OUT_VAR} ${LINE}) + endif() + endforeach() +endmacro() + +# build 'win32' gdk backend +extract_vcproj_sources(build/win32/vs14/gdk3-win32.vcxproj GDK_WIN32_SOURCES) +add_library(gdk-3-win32 STATIC ${GDK_WIN32_SOURCES}) +target_compile_definitions(gdk-3-win32 PRIVATE + GDK_COMPILATION G_LOG_DOMAIN="Gdk" INSIDE_GDK_WIN32) +target_include_directories(gdk-3-win32 PRIVATE . ./gdk ./gdk/win32 ${GTK_REQUIRED_INCLUDE_DIR}) + +# build 'broadway' gdk backend +extract_vcproj_sources(build/win32/vs14/gdk3-broadway.vcxproj GDK_BROADWAY_SOURCES) +add_library(gdk-3-broadway STATIC ${GDK_BROADWAY_SOURCES}) +target_compile_definitions(gdk-3-broadway PRIVATE + GDK_COMPILATION G_LOG_DOMAIN="Gdk") +target_include_directories(gdk-3-broadway PRIVATE . ./gdk ./gdk/broadway ${GTK_REQUIRED_INCLUDE_DIR}) + +macro(gtk_add_module MODULE_NAME) + add_library(${MODULE_NAME} ${ARGN}) + target_include_directories(${MODULE_NAME} PRIVATE . ./gdk ./gtk ${GTK_REQUIRED_INCLUDE_DIR}) + target_link_libraries(${MODULE_NAME} ${GTK_REQUIRED_LIBRARIES}) + set_target_properties(${MODULE_NAME} PROPERTIES + ARCHIVE_OUTPUT_NAME ${MODULE_NAME}.0) + install(TARGETS ${MODULE_NAME} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) +endmacro() + +extract_vcproj_sources(build/win32/vs14/gdk-3.vcxproj GDK_SOURCES) +gtk_add_module(gdk-3 ${GDK_SOURCES}) +target_compile_definitions(gdk-3 PRIVATE GDK_COMPILATION) +target_include_directories(gdk-3 PRIVATE ./gdk/win32 ./gdk/broadway) +target_link_libraries(gdk-3 gdk-3-win32 gdk-3-broadway winmm dwmapi setupapi imm32 ws2_32) + +extract_vcproj_sources(build/win32/vs14/gtk-3.vcxproj GTK_SOURCES) +set_source_files_properties(gtk/inspector/visual.c PROPERTIES COMPILE_FLAGS "/FImath.h") +gtk_add_module(gtk-3 ${GTK_SOURCES}) +target_compile_definitions(gtk-3 PRIVATE + GTK_COMPILATION + G_LOG_DOMAIN="Gtk" + GTK_HOST="i686-pc" + GTK_PRINT_BACKENDS="file" + GTK_PRINT_BACKEND_ENABLE_UNSUPPORTED + INCLUDE_IM_am_et + INCLUDE_IM_cedilla + INCLUDE_IM_cyrillic_translit + INCLUDE_IM_ime + INCLUDE_IM_inuktitut + INCLUDE_IM_ipa + INCLUDE_IM_multipress + INCLUDE_IM_thai + INCLUDE_IM_ti_er + INCLUDE_IM_ti_et + INCLUDE_IM_viqr + GTK_LIBDIR="/dummy/lib" + GTK_DATADIR="/dummy/share" + GTK_DATA_PREFIX="/dummy" + GTK_SYSCONFDIR="/dummy/etc" + MULTIPRESS_CONFDIR="/dummy/etc/gtk-3.0" + MULTIPRESS_LOCALEDIR="/dummy/share/locale" + GTK_VERSION="${GTK_VERSION}/etc" + GTK_BINARY_VERSION="3.0.0/etc" + GDK_DISABLE_DEPRECATED + ISOLATION_AWARE_ENABLED) +target_link_libraries(gtk-3 gdk-3 winspool comctl32 imm32) +target_compile_options(gtk-3 PRIVATE "/wd4828" PRIVATE "/wd4244" PRIVATE "/wd4305" PRIVATE "/wd4018") + +extract_vcproj_sources(build/win32/vs14/gailutil-3.vcxproj GAILUTIL_SOURCES) +gtk_add_module(gailutil-3 ${GAILUTIL_SOURCES}) +target_compile_definitions(gailutil-3 PRIVATE GTK_DISABLE_DEPRECATED GDK_DISABLE_DEPRECATED) +target_link_libraries(gailutil-3 gtk-3 gdk-3) +set_target_properties(gailutil-3 PROPERTIES + LINK_FLAGS \"/DEF:${CMAKE_CURRENT_SOURCE_DIR}/libgail-util/gailutil.def\") + +if(NOT GTK_SKIP_HEADERS) + set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) + include(install_headers) +endif() diff --git a/vcpkg/ports/gtk/CONTROL b/vcpkg/ports/gtk/CONTROL new file mode 100644 index 0000000..037d87e --- /dev/null +++ b/vcpkg/ports/gtk/CONTROL @@ -0,0 +1,5 @@ +Source: gtk +Version: 3.22.19-4 +Homepage: https://www.gtk.org/ +Description: Portable library for creating graphical user interfaces. +Build-Depends: glib, atk, gdk-pixbuf, pango, cairo, libepoxy, gettext diff --git a/vcpkg/ports/gtk/cmake/install_headers.cmake b/vcpkg/ports/gtk/cmake/install_headers.cmake new file mode 100644 index 0000000..ca2a273 --- /dev/null +++ b/vcpkg/ports/gtk/cmake/install_headers.cmake @@ -0,0 +1,376 @@ +install(FILES gdk/win32/gdkwin32.h DESTINATION include/gdk) +install(FILES gdk/gdk.h DESTINATION include/gdk) +install(FILES gdk/gdk-autocleanup.h DESTINATION include/gdk) +install(FILES gdk/gdkapplaunchcontext.h DESTINATION include/gdk) +install(FILES gdk/gdkcairo.h DESTINATION include/gdk) +install(FILES gdk/gdkcursor.h DESTINATION include/gdk) +install(FILES gdk/gdkdevice.h DESTINATION include/gdk) +install(FILES gdk/gdkdevicepad.h DESTINATION include/gdk) +install(FILES gdk/gdkdevicetool.h DESTINATION include/gdk) +install(FILES gdk/gdkdevicemanager.h DESTINATION include/gdk) +install(FILES gdk/gdkdisplay.h DESTINATION include/gdk) +install(FILES gdk/gdkdisplaymanager.h DESTINATION include/gdk) +install(FILES gdk/gdkdnd.h DESTINATION include/gdk) +install(FILES gdk/gdkdrawingcontext.h DESTINATION include/gdk) +install(FILES gdk/gdkevents.h DESTINATION include/gdk) +install(FILES gdk/gdkframetimings.h DESTINATION include/gdk) +install(FILES gdk/gdkglcontext.h DESTINATION include/gdk) +install(FILES gdk/gdkkeys.h DESTINATION include/gdk) +install(FILES gdk/gdkkeysyms.h DESTINATION include/gdk) +install(FILES gdk/gdkkeysyms-compat.h DESTINATION include/gdk) +install(FILES gdk/gdkmain.h DESTINATION include/gdk) +install(FILES gdk/gdkmonitor.h DESTINATION include/gdk) +install(FILES gdk/gdkpango.h DESTINATION include/gdk) +install(FILES gdk/gdkframeclock.h DESTINATION include/gdk) +install(FILES gdk/gdkpixbuf.h DESTINATION include/gdk) +install(FILES gdk/gdkprivate.h DESTINATION include/gdk) +install(FILES gdk/gdkproperty.h DESTINATION include/gdk) +install(FILES gdk/gdkrectangle.h DESTINATION include/gdk) +install(FILES gdk/gdkrgba.h DESTINATION include/gdk) +install(FILES gdk/gdkscreen.h DESTINATION include/gdk) +install(FILES gdk/gdkseat.h DESTINATION include/gdk) +install(FILES gdk/gdkselection.h DESTINATION include/gdk) +install(FILES gdk/gdktestutils.h DESTINATION include/gdk) +install(FILES gdk/gdkthreads.h DESTINATION include/gdk) +install(FILES gdk/gdktypes.h DESTINATION include/gdk) +install(FILES gdk/gdkvisual.h DESTINATION include/gdk) +install(FILES gdk/gdkwindow.h DESTINATION include/gdk) +install(FILES gdk/deprecated/gdkcolor.h DESTINATION include/gdk/deprecated) +install(FILES gdk/gdkconfig.h DESTINATION include/gdk) +install(FILES gdk/gdkenumtypes.h DESTINATION include/gdk) +install(FILES gdk/gdkversionmacros.h DESTINATION include/gdk) +install(FILES gdk/win32/gdkwin32cursor.h DESTINATION include/gdk/win32) +install(FILES gdk/win32/gdkwin32display.h DESTINATION include/gdk/win32) +install(FILES gdk/win32/gdkwin32displaymanager.h DESTINATION include/gdk/win32) +install(FILES gdk/win32/gdkwin32dnd.h DESTINATION include/gdk/win32) +install(FILES gdk/win32/gdkwin32glcontext.h DESTINATION include/gdk/win32) +install(FILES gdk/win32/gdkwin32keys.h DESTINATION include/gdk/win32) +install(FILES gdk/win32/gdkwin32misc.h DESTINATION include/gdk/win32) +install(FILES gdk/win32/gdkwin32monitor.h DESTINATION include/gdk/win32) +install(FILES gdk/win32/gdkwin32screen.h DESTINATION include/gdk/win32) +install(FILES gdk/win32/gdkwin32window.h DESTINATION include/gdk/win32) +install(FILES gtk/gtk.h DESTINATION include/gtk) +install(FILES gtk/gtk-autocleanups.h DESTINATION include/gtk) +install(FILES gtk/gtkx.h DESTINATION include/gtk) +install(FILES gtk/gtkx-autocleanups.h DESTINATION include/gtk) +install(FILES gtk/gtk-a11y.h DESTINATION include/gtk) +install(FILES gtk/gtkaboutdialog.h DESTINATION include/gtk) +install(FILES gtk/gtkaccelgroup.h DESTINATION include/gtk) +install(FILES gtk/gtkaccellabel.h DESTINATION include/gtk) +install(FILES gtk/gtkaccelmap.h DESTINATION include/gtk) +install(FILES gtk/gtkaccessible.h DESTINATION include/gtk) +install(FILES gtk/gtkactionable.h DESTINATION include/gtk) +install(FILES gtk/gtkactionbar.h DESTINATION include/gtk) +install(FILES gtk/gtkadjustment.h DESTINATION include/gtk) +install(FILES gtk/gtkappchooser.h DESTINATION include/gtk) +install(FILES gtk/gtkappchooserbutton.h DESTINATION include/gtk) +install(FILES gtk/gtkappchooserdialog.h DESTINATION include/gtk) +install(FILES gtk/gtkappchooserwidget.h DESTINATION include/gtk) +install(FILES gtk/gtkapplication.h DESTINATION include/gtk) +install(FILES gtk/gtkapplicationwindow.h DESTINATION include/gtk) +install(FILES gtk/gtkaspectframe.h DESTINATION include/gtk) +install(FILES gtk/gtkassistant.h DESTINATION include/gtk) +install(FILES gtk/gtkbbox.h DESTINATION include/gtk) +install(FILES gtk/gtkbin.h DESTINATION include/gtk) +install(FILES gtk/gtkbindings.h DESTINATION include/gtk) +install(FILES gtk/gtkborder.h DESTINATION include/gtk) +install(FILES gtk/gtkbox.h DESTINATION include/gtk) +install(FILES gtk/gtkbuilder.h DESTINATION include/gtk) +install(FILES gtk/gtkbuildable.h DESTINATION include/gtk) +install(FILES gtk/gtkbutton.h DESTINATION include/gtk) +install(FILES gtk/gtkcalendar.h DESTINATION include/gtk) +install(FILES gtk/gtkcellarea.h DESTINATION include/gtk) +install(FILES gtk/gtkcellareacontext.h DESTINATION include/gtk) +install(FILES gtk/gtkcellareabox.h DESTINATION include/gtk) +install(FILES gtk/gtkcelleditable.h DESTINATION include/gtk) +install(FILES gtk/gtkcelllayout.h DESTINATION include/gtk) +install(FILES gtk/gtkcellrenderer.h DESTINATION include/gtk) +install(FILES gtk/gtkcellrendereraccel.h DESTINATION include/gtk) +install(FILES gtk/gtkcellrenderercombo.h DESTINATION include/gtk) +install(FILES gtk/gtkcellrendererpixbuf.h DESTINATION include/gtk) +install(FILES gtk/gtkcellrendererprogress.h DESTINATION include/gtk) +install(FILES gtk/gtkcellrendererspin.h DESTINATION include/gtk) +install(FILES gtk/gtkcellrendererspinner.h DESTINATION include/gtk) +install(FILES gtk/gtkcellrenderertext.h DESTINATION include/gtk) +install(FILES gtk/gtkcellrenderertoggle.h DESTINATION include/gtk) +install(FILES gtk/gtkcellview.h DESTINATION include/gtk) +install(FILES gtk/gtkcheckbutton.h DESTINATION include/gtk) +install(FILES gtk/gtkcheckmenuitem.h DESTINATION include/gtk) +install(FILES gtk/gtkclipboard.h DESTINATION include/gtk) +install(FILES gtk/gtkcolorbutton.h DESTINATION include/gtk) +install(FILES gtk/gtkcolorchooser.h DESTINATION include/gtk) +install(FILES gtk/gtkcolorchooserwidget.h DESTINATION include/gtk) +install(FILES gtk/gtkcolorchooserdialog.h DESTINATION include/gtk) +install(FILES gtk/gtkcolorutils.h DESTINATION include/gtk) +install(FILES gtk/gtkcombobox.h DESTINATION include/gtk) +install(FILES gtk/gtkcomboboxtext.h DESTINATION include/gtk) +install(FILES gtk/gtkcontainer.h DESTINATION include/gtk) +install(FILES gtk/gtkcssprovider.h DESTINATION include/gtk) +install(FILES gtk/gtkcsssection.h DESTINATION include/gtk) +install(FILES gtk/gtkdebug.h DESTINATION include/gtk) +install(FILES gtk/gtkdialog.h DESTINATION include/gtk) +install(FILES gtk/gtkdnd.h DESTINATION include/gtk) +install(FILES gtk/gtkdragdest.h DESTINATION include/gtk) +install(FILES gtk/gtkdragsource.h DESTINATION include/gtk) +install(FILES gtk/gtkdrawingarea.h DESTINATION include/gtk) +install(FILES gtk/gtkeditable.h DESTINATION include/gtk) +install(FILES gtk/gtkentry.h DESTINATION include/gtk) +install(FILES gtk/gtkentrybuffer.h DESTINATION include/gtk) +install(FILES gtk/gtkentrycompletion.h DESTINATION include/gtk) +install(FILES gtk/gtkenums.h DESTINATION include/gtk) +install(FILES gtk/gtkeventbox.h DESTINATION include/gtk) +install(FILES gtk/gtkeventcontroller.h DESTINATION include/gtk) +install(FILES gtk/gtkexpander.h DESTINATION include/gtk) +install(FILES gtk/gtkfilechooser.h DESTINATION include/gtk) +install(FILES gtk/gtkfilechooserbutton.h DESTINATION include/gtk) +install(FILES gtk/gtkfilechooserdialog.h DESTINATION include/gtk) +install(FILES gtk/gtkfilechoosernative.h DESTINATION include/gtk) +install(FILES gtk/gtkfilechooserwidget.h DESTINATION include/gtk) +install(FILES gtk/gtkfilefilter.h DESTINATION include/gtk) +install(FILES gtk/gtkfixed.h DESTINATION include/gtk) +install(FILES gtk/gtkflowbox.h DESTINATION include/gtk) +install(FILES gtk/gtkfontbutton.h DESTINATION include/gtk) +install(FILES gtk/gtkfontchooser.h DESTINATION include/gtk) +install(FILES gtk/gtkfontchooserdialog.h DESTINATION include/gtk) +install(FILES gtk/gtkfontchooserwidget.h DESTINATION include/gtk) +install(FILES gtk/gtkframe.h DESTINATION include/gtk) +install(FILES gtk/gtkgesture.h DESTINATION include/gtk) +install(FILES gtk/gtkgesturedrag.h DESTINATION include/gtk) +install(FILES gtk/gtkgesturelongpress.h DESTINATION include/gtk) +install(FILES gtk/gtkgesturemultipress.h DESTINATION include/gtk) +install(FILES gtk/gtkgesturepan.h DESTINATION include/gtk) +install(FILES gtk/gtkgesturerotate.h DESTINATION include/gtk) +install(FILES gtk/gtkgesturesingle.h DESTINATION include/gtk) +install(FILES gtk/gtkgestureswipe.h DESTINATION include/gtk) +install(FILES gtk/gtkgesturezoom.h DESTINATION include/gtk) +install(FILES gtk/gtkglarea.h DESTINATION include/gtk) +install(FILES gtk/gtkgrid.h DESTINATION include/gtk) +install(FILES gtk/gtkheaderbar.h DESTINATION include/gtk) +install(FILES gtk/gtkicontheme.h DESTINATION include/gtk) +install(FILES gtk/gtkiconview.h DESTINATION include/gtk) +install(FILES gtk/gtkimage.h DESTINATION include/gtk) +install(FILES gtk/gtkimcontext.h DESTINATION include/gtk) +install(FILES gtk/gtkimcontextinfo.h DESTINATION include/gtk) +install(FILES gtk/gtkimcontextsimple.h DESTINATION include/gtk) +install(FILES gtk/gtkimmodule.h DESTINATION include/gtk) +install(FILES gtk/gtkimmulticontext.h DESTINATION include/gtk) +install(FILES gtk/gtkinfobar.h DESTINATION include/gtk) +install(FILES gtk/gtkinvisible.h DESTINATION include/gtk) +install(FILES gtk/gtklabel.h DESTINATION include/gtk) +install(FILES gtk/gtklayout.h DESTINATION include/gtk) +install(FILES gtk/gtklevelbar.h DESTINATION include/gtk) +install(FILES gtk/gtklinkbutton.h DESTINATION include/gtk) +install(FILES gtk/gtklistbox.h DESTINATION include/gtk) +install(FILES gtk/gtkliststore.h DESTINATION include/gtk) +install(FILES gtk/gtklockbutton.h DESTINATION include/gtk) +install(FILES gtk/gtkmain.h DESTINATION include/gtk) +install(FILES gtk/gtkmenu.h DESTINATION include/gtk) +install(FILES gtk/gtkmenubar.h DESTINATION include/gtk) +install(FILES gtk/gtkmenubutton.h DESTINATION include/gtk) +install(FILES gtk/gtkmenuitem.h DESTINATION include/gtk) +install(FILES gtk/gtkmenushell.h DESTINATION include/gtk) +install(FILES gtk/gtkmenutoolbutton.h DESTINATION include/gtk) +install(FILES gtk/gtkmessagedialog.h DESTINATION include/gtk) +install(FILES gtk/gtkmodelbutton.h DESTINATION include/gtk) +install(FILES gtk/gtkmodules.h DESTINATION include/gtk) +install(FILES gtk/gtkmountoperation.h DESTINATION include/gtk) +install(FILES gtk/gtknativedialog.h DESTINATION include/gtk) +install(FILES gtk/gtknotebook.h DESTINATION include/gtk) +install(FILES gtk/gtkoffscreenwindow.h DESTINATION include/gtk) +install(FILES gtk/gtkorientable.h DESTINATION include/gtk) +install(FILES gtk/gtkoverlay.h DESTINATION include/gtk) +install(FILES gtk/gtkpadcontroller.h DESTINATION include/gtk) +install(FILES gtk/gtkpagesetup.h DESTINATION include/gtk) +install(FILES gtk/gtkpaned.h DESTINATION include/gtk) +install(FILES gtk/gtkpapersize.h DESTINATION include/gtk) +install(FILES gtk/gtkplacessidebar.h DESTINATION include/gtk) +install(FILES gtk/gtkplug.h DESTINATION include/gtk) +install(FILES gtk/gtkpopover.h DESTINATION include/gtk) +install(FILES gtk/gtkpopovermenu.h DESTINATION include/gtk) +install(FILES gtk/gtkprintcontext.h DESTINATION include/gtk) +install(FILES gtk/gtkprintoperation.h DESTINATION include/gtk) +install(FILES gtk/gtkprintoperationpreview.h DESTINATION include/gtk) +install(FILES gtk/gtkprintsettings.h DESTINATION include/gtk) +install(FILES gtk/gtkprogressbar.h DESTINATION include/gtk) +install(FILES gtk/gtkradiobutton.h DESTINATION include/gtk) +install(FILES gtk/gtkradiomenuitem.h DESTINATION include/gtk) +install(FILES gtk/gtkradiotoolbutton.h DESTINATION include/gtk) +install(FILES gtk/gtkrange.h DESTINATION include/gtk) +install(FILES gtk/gtkrecentchooser.h DESTINATION include/gtk) +install(FILES gtk/gtkrecentchooserdialog.h DESTINATION include/gtk) +install(FILES gtk/gtkrecentchoosermenu.h DESTINATION include/gtk) +install(FILES gtk/gtkrecentchooserwidget.h DESTINATION include/gtk) +install(FILES gtk/gtkrecentfilter.h DESTINATION include/gtk) +install(FILES gtk/gtkrecentmanager.h DESTINATION include/gtk) +install(FILES gtk/gtkrender.h DESTINATION include/gtk) +install(FILES gtk/gtkrevealer.h DESTINATION include/gtk) +install(FILES gtk/gtkscale.h DESTINATION include/gtk) +install(FILES gtk/gtkscalebutton.h DESTINATION include/gtk) +install(FILES gtk/gtkscrollable.h DESTINATION include/gtk) +install(FILES gtk/gtkscrollbar.h DESTINATION include/gtk) +install(FILES gtk/gtkscrolledwindow.h DESTINATION include/gtk) +install(FILES gtk/gtksearchbar.h DESTINATION include/gtk) +install(FILES gtk/gtksearchentry.h DESTINATION include/gtk) +install(FILES gtk/gtkselection.h DESTINATION include/gtk) +install(FILES gtk/gtkseparator.h DESTINATION include/gtk) +install(FILES gtk/gtkseparatormenuitem.h DESTINATION include/gtk) +install(FILES gtk/gtkseparatortoolitem.h DESTINATION include/gtk) +install(FILES gtk/gtksettings.h DESTINATION include/gtk) +install(FILES gtk/gtkshortcutlabel.h DESTINATION include/gtk) +install(FILES gtk/gtkshortcutsgroup.h DESTINATION include/gtk) +install(FILES gtk/gtkshortcutssection.h DESTINATION include/gtk) +install(FILES gtk/gtkshortcutsshortcut.h DESTINATION include/gtk) +install(FILES gtk/gtkshortcutswindow.h DESTINATION include/gtk) +install(FILES gtk/gtkshow.h DESTINATION include/gtk) +install(FILES gtk/gtkstacksidebar.h DESTINATION include/gtk) +install(FILES gtk/gtksizegroup.h DESTINATION include/gtk) +install(FILES gtk/gtksizerequest.h DESTINATION include/gtk) +install(FILES gtk/gtksocket.h DESTINATION include/gtk) +install(FILES gtk/gtkspinbutton.h DESTINATION include/gtk) +install(FILES gtk/gtkspinner.h DESTINATION include/gtk) +install(FILES gtk/gtkstack.h DESTINATION include/gtk) +install(FILES gtk/gtkstackswitcher.h DESTINATION include/gtk) +install(FILES gtk/gtkstatusbar.h DESTINATION include/gtk) +install(FILES gtk/gtkstylecontext.h DESTINATION include/gtk) +install(FILES gtk/gtkstyleprovider.h DESTINATION include/gtk) +install(FILES gtk/gtkswitch.h DESTINATION include/gtk) +install(FILES gtk/gtktestutils.h DESTINATION include/gtk) +install(FILES gtk/gtktextattributes.h DESTINATION include/gtk) +install(FILES gtk/gtktextbuffer.h DESTINATION include/gtk) +install(FILES gtk/gtktextbufferrichtext.h DESTINATION include/gtk) +install(FILES gtk/gtktextchild.h DESTINATION include/gtk) +install(FILES gtk/gtktextdisplay.h DESTINATION include/gtk) +install(FILES gtk/gtktextiter.h DESTINATION include/gtk) +install(FILES gtk/gtktextmark.h DESTINATION include/gtk) +install(FILES gtk/gtktexttag.h DESTINATION include/gtk) +install(FILES gtk/gtktexttagtable.h DESTINATION include/gtk) +install(FILES gtk/gtktextview.h DESTINATION include/gtk) +install(FILES gtk/gtktogglebutton.h DESTINATION include/gtk) +install(FILES gtk/gtktoggletoolbutton.h DESTINATION include/gtk) +install(FILES gtk/gtktoolbar.h DESTINATION include/gtk) +install(FILES gtk/gtktoolbutton.h DESTINATION include/gtk) +install(FILES gtk/gtktoolitem.h DESTINATION include/gtk) +install(FILES gtk/gtktoolitemgroup.h DESTINATION include/gtk) +install(FILES gtk/gtktoolpalette.h DESTINATION include/gtk) +install(FILES gtk/gtktoolshell.h DESTINATION include/gtk) +install(FILES gtk/gtktooltip.h DESTINATION include/gtk) +install(FILES gtk/gtktreednd.h DESTINATION include/gtk) +install(FILES gtk/gtktreemodel.h DESTINATION include/gtk) +install(FILES gtk/gtktreemodelfilter.h DESTINATION include/gtk) +install(FILES gtk/gtktreemodelsort.h DESTINATION include/gtk) +install(FILES gtk/gtktreeselection.h DESTINATION include/gtk) +install(FILES gtk/gtktreesortable.h DESTINATION include/gtk) +install(FILES gtk/gtktreestore.h DESTINATION include/gtk) +install(FILES gtk/gtktreeview.h DESTINATION include/gtk) +install(FILES gtk/gtktreeviewcolumn.h DESTINATION include/gtk) +install(FILES gtk/gtktypes.h DESTINATION include/gtk) +install(FILES gtk/gtkviewport.h DESTINATION include/gtk) +install(FILES gtk/gtkvolumebutton.h DESTINATION include/gtk) +install(FILES gtk/gtkwidget.h DESTINATION include/gtk) +install(FILES gtk/gtkwidgetpath.h DESTINATION include/gtk) +install(FILES gtk/gtkwindow.h DESTINATION include/gtk) +install(FILES gtk/gtkwindowgroup.h DESTINATION include/gtk) +install(FILES gtk/gtktextlayout.h DESTINATION include/gtk) +install(FILES gtk/gtktypebuiltins.h DESTINATION include/gtk) +install(FILES gtk/gtkversion.h DESTINATION include/gtk) +install(FILES gtk/a11y/gtk-a11y-autocleanups.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkarrowaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkbooleancellaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkbuttonaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkcellaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkcellaccessibleparent.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkcheckmenuitemaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkcomboboxaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkcontaineraccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkcontainercellaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkentryaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkexpanderaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkflowboxaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkflowboxchildaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkframeaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkiconviewaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkimageaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkimagecellaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtklabelaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtklevelbaraccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtklinkbuttonaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtklistboxaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtklistboxrowaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtklockbuttonaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkmenuaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkmenubuttonaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkmenuitemaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkmenushellaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtknotebookaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtknotebookpageaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkpanedaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkpopoveraccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkprogressbaraccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkradiobuttonaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkradiomenuitemaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkrangeaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkrenderercellaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkscaleaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkscalebuttonaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkscrolledwindowaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkspinbuttonaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkspinneraccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkstatusbaraccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkstackaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkswitchaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtktextcellaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtktextviewaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtktogglebuttonaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtktoplevelaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtktreeviewaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkwidgetaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/a11y/gtkwindowaccessible.h DESTINATION include/gtk/a11y) +install(FILES gtk/deprecated/gtkactivatable.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkaction.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkactiongroup.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkalignment.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkarrow.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkcolorsel.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkcolorseldialog.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkfontsel.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkgradient.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkhandlebox.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkhbbox.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkhbox.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkhpaned.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkhscale.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkhscrollbar.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkhseparator.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkhsv.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkiconfactory.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkimagemenuitem.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkmisc.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtknumerableicon.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkradioaction.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkrc.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkrecentaction.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkstatusicon.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkstock.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkstyle.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkstyleproperties.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtksymboliccolor.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtktable.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtktearoffmenuitem.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkthemingengine.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtktoggleaction.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkuimanager.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkvbbox.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkvbox.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkvscale.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkvscrollbar.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkvseparator.h DESTINATION include/gtk/deprecated) +install(FILES gtk/deprecated/gtkvpaned.h DESTINATION include/gtk/deprecated) +install(FILES libgail-util/gailmisc.h DESTINATION include/libgail-util) +install(FILES libgail-util/gailtextutil.h DESTINATION include/libgail-util) +install(FILES libgail-util/gail-util.h DESTINATION include/libgail-util) +install(FILES gdk/broadway/gdkbroadway.h DESTINATION include/gdk) +install(FILES gdk/broadway/gdkbroadwaydisplay.h DESTINATION include/gdk/broadway) +install(FILES gdk/broadway/gdkbroadwaywindow.h DESTINATION include/gdk/broadway) +install(FILES gdk/broadway/gdkbroadwaycursor.h DESTINATION include/gdk/broadway) +install(FILES gdk/broadway/gdkbroadwaymonitor.h DESTINATION include/gdk/broadway) +install(FILES gdk/broadway/gdkbroadwayvisual.h DESTINATION include/gdk/broadway) diff --git a/vcpkg/ports/gtk/portfile.cmake b/vcpkg/ports/gtk/portfile.cmake new file mode 100644 index 0000000..d77bee0 --- /dev/null +++ b/vcpkg/ports/gtk/portfile.cmake @@ -0,0 +1,43 @@ + +include(vcpkg_common_functions) +set(GTK_VERSION 3.22.19) + +vcpkg_download_distfile(ARCHIVE + URLS "https://ftp.gnome.org/pub/gnome/sources/gtk+/3.22/gtk+-${GTK_VERSION}.tar.xz" + FILENAME "gtk+-${GTK_VERSION}.tar.xz" + SHA512 c83198794433ee6eb29f8740d59bd7056cd36808b4bff1a99563ab1a1742e6635dab4f2a8be33317f74d3b336f0d1adc28dd91410da056b50a08c215f184dce2 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake DESTINATION ${SOURCE_PATH}) + +# generate sources using python script installed with glib +if(NOT EXISTS ${SOURCE_PATH}/gtk/gtkdbusgenerated.h OR NOT EXISTS ${SOURCE_PATH}/gtk/gtkdbusgenerated.c) + vcpkg_find_acquire_program(PYTHON3) + set(GLIB_TOOL_DIR ${CURRENT_INSTALLED_DIR}/tools/glib) + + vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${GLIB_TOOL_DIR}/gdbus-codegen --interface-prefix org.Gtk. --c-namespace _Gtk --generate-c-code gtkdbusgenerated ./gtkdbusinterfaces.xml + WORKING_DIRECTORY ${SOURCE_PATH}/gtk + LOGNAME source-gen) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DGTK_VERSION=${GTK_VERSION} + OPTIONS_DEBUG + -DGTK_SKIP_HEADERS=ON) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gtk) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/gtk/COPYING ${CURRENT_PACKAGES_DIR}/share/gtk/copyright) diff --git a/vcpkg/ports/gtkmm/CONTROL b/vcpkg/ports/gtkmm/CONTROL new file mode 100644 index 0000000..71a648f --- /dev/null +++ b/vcpkg/ports/gtkmm/CONTROL @@ -0,0 +1,7 @@ +Source: gtkmm +Version: 3.22.2 +Port-Version: 4 +Homepage: https://www.gtkmm.org/ +Description: gtkmm is the official C++ interface for the popular GUI library GTK+. +Build-Depends: glib, atk, gtk, gdk-pixbuf, pango, cairo, libepoxy, gettext, glibmm, atkmm, cairomm, pangomm +Supports: !uwp diff --git a/vcpkg/ports/gtkmm/COPYING b/vcpkg/ports/gtkmm/COPYING new file mode 100644 index 0000000..4362b49 --- /dev/null +++ b/vcpkg/ports/gtkmm/COPYING @@ -0,0 +1,502 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/vcpkg/ports/gtkmm/fix_properties.patch b/vcpkg/ports/gtkmm/fix_properties.patch new file mode 100644 index 0000000..3db0a30 --- /dev/null +++ b/vcpkg/ports/gtkmm/fix_properties.patch @@ -0,0 +1,2423 @@ +diff --git a/MSVC_Net2013/gdkmm.vcxproj b/MSVC_Net2013/gdkmm.vcxproj +index dd495a0..94c6396 100644 +--- a/MSVC_Net2013/gdkmm.vcxproj ++++ b/MSVC_Net2013/gdkmm.vcxproj +@@ -93,7 +93,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj + + +- $(CPPDepLibsDebug);%(AdditionalDependencies) ++ %(AdditionalDependencies) + $(OutDir)$(ProjectName)$(DebugDllSuffix).dll + $(IntDir)\$(ProjectName).def + true +@@ -118,7 +118,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj + + +- $(CPPDepLibsRelease);%(AdditionalDependencies) ++ %(AdditionalDependencies) + $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll + $(IntDir)\$(ProjectName).def + true +@@ -150,7 +150,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj + + +- $(CPPDepLibsDebug);%(AdditionalDependencies) ++ %(AdditionalDependencies) + $(OutDir)$(ProjectName)$(DebugDllSuffix).dll + $(IntDir)\$(ProjectName).def + true +@@ -179,7 +179,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj + + +- $(CPPDepLibsRelease);%(AdditionalDependencies) ++ %(AdditionalDependencies) + $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll + $(IntDir)\$(ProjectName).def + false +@@ -263,4 +263,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/gdkmm.vcxproj.filters b/MSVC_Net2013/gdkmm.vcxproj.filters +index 826f785..da390e5 100644 +--- a/MSVC_Net2013/gdkmm.vcxproj.filters ++++ b/MSVC_Net2013/gdkmm.vcxproj.filters +@@ -15,71 +15,183 @@ + + + +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ + + +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ + + + + Resource Files + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/gtkmm-build-defines.props b/MSVC_Net2013/gtkmm-build-defines.props +index 880cbf7..2cb24a3 100644 +--- a/MSVC_Net2013/gtkmm-build-defines.props ++++ b/MSVC_Net2013/gtkmm-build-defines.props +@@ -4,10 +4,8 @@ + + + +- GDKMM_BUILD +- GTKMM_BUILD +- pangomm-vc$(VSVer)0-1_4.lib;giomm-vc$(VSVer)0-2_4.lib;glibmm-vc$(VSVer)0-2_4.lib;cairomm-vc$(VSVer)0-1_0.lib;sigc-vc$(VSVer)0-2_0.lib +- pangomm-vc$(VSVer)0-d-1_4.lib;giomm-vc$(VSVer)0-d-2_4.lib;glibmm-vc$(VSVer)0-d-2_4.lib;cairomm-vc$(VSVer)0-d-1_0.lib;sigc-vc$(VSVer)0-d-2_0.lib ++ GDKMM_BUILD;_WINDLL ++ GTKMM_BUILD;_WINDLL + + + <_PropertySheetDisplayName>glibmmbuilddefinesprops +@@ -16,15 +14,15 @@ + + + +- .\gdkmm;..;..\gdk;$(GlibEtcInstallRoot)\include\pangomm-1.4;$(GlibEtcInstallRoot)\lib\pangomm-1.4\include;$(GlibEtcInstallRoot)\include\giomm-2.4;$(GlibEtcInstallRoot)\lib\giomm-2.4\include;$(GlibEtcInstallRoot)\include\glibmm-2.4;$(GlibEtcInstallRoot)\lib\glibmm-2.4\include;$(GlibEtcInstallRoot)\include\cairomm-1.0;$(GlibEtcInstallRoot)\lib\cairomm-1.0\include;$(GlibEtcInstallRoot)\include\sigc++-2.0;$(GlibEtcInstallRoot)\lib\sigc++-2.0\include;$(GlibEtcInstallRoot)\include\gtk-3.0;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\gio-win32-2.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories) ++ .\gdkmm;..;..\gdk;.;%(AdditionalIncludeDirectories) + msvc_recommended_pragmas.h;%(ForcedIncludeFiles) + 4250;%(DisableSpecificWarnings) + true + /d2Zi+ %(AdditionalOptions) + + +- gtk-3.0.lib;gdk-3.0.lib;gdk_pixbuf-2.0.lib;gobject-2.0.lib;gio-2.0.lib;glib-2.0.lib;epoxy.lib;%(AdditionalDependencies) +- $(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories) ++ %(AdditionalDependencies) ++ %(AdditionalLibraryDirectories) + + + +@@ -34,11 +32,5 @@ + + $(GtkMMBuildDefs) + +- +- $(CPPDepLibsRelease) +- +- +- $(CPPDepLibsDebug) +- + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/gtkmm-version-paths.props b/MSVC_Net2013/gtkmm-version-paths.props +index f0c2834..968562a 100644 +--- a/MSVC_Net2013/gtkmm-version-paths.props ++++ b/MSVC_Net2013/gtkmm-version-paths.props +@@ -2,13 +2,9 @@ + + + 12 +- $(SolutionDir)\..\..\vs$(VSVer)\$(Platform) +- $(GlibEtcInstallRoot) + $(SolutionDir)$(Configuration)\$(Platform)\obj\$(ProjectName)\ + 3 + 0 +- -vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion) +- -vc$(VSVer)0-d-$(ApiMajorVersion)_$(ApiMinorVersion) + + + <_PropertySheetDisplayName>glibmmversionpathsprops +@@ -17,12 +13,6 @@ + + $(VSVer) + +- +- $(GlibEtcInstallRoot) +- +- +- $(CopyDir) +- + + $(DefDir) + +@@ -32,11 +22,5 @@ + + $(ApiMinorVersion) + +- +- $(ReleaseDllSuffix) +- +- +- $(DebugDllSuffix) +- + + +\ No newline at end of file +diff --git a/MSVC_Net2013/gtkmm.vcxproj b/MSVC_Net2013/gtkmm.vcxproj +index 8093886..ec56ed1 100644 +--- a/MSVC_Net2013/gtkmm.vcxproj ++++ b/MSVC_Net2013/gtkmm.vcxproj +@@ -80,7 +80,7 @@ + %(AdditionalOptions) + Disabled + .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) +- _DEBUG;$(GtkMMBuildDefs);%(PreprocessorDefinitions) ++ _DEBUG;_NO_CRT_STDIO_INLINE;$(GtkMMBuildDefs);_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL +@@ -95,7 +95,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj + + +- atkmm-vc$(VSVer)0-d-1_6.lib;$(CPPDepLibsDebug);%(AdditionalDependencies) ++ legacy_stdio_definitions.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName)$(DebugDllSuffix).dll + $(IntDir)\$(ProjectName).def + true +@@ -108,7 +108,7 @@ + + %(AdditionalOptions) + .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) +- $(GtkMMBuildDefs);%(PreprocessorDefinitions) ++ $(GtkMMBuildDefs);_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + +@@ -121,7 +121,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj + + +- atkmm-vc$(VSVer)0-1_6.lib;$(CPPDepLibsRelease);%(AdditionalDependencies) ++ legacy_stdio_definitions.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll + $(IntDir)\$(ProjectName).def + false +@@ -139,7 +139,7 @@ + %(AdditionalOptions) + Disabled + .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) +- _DEBUG;$(GtkMMBuildDefs);%(PreprocessorDefinitions) ++ _DEBUG;_NO_CRT_STDIO_INLINE;$(GtkMMBuildDefs);) + true + EnableFastChecks + MultiThreadedDebugDLL +@@ -154,7 +154,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj + + +- atkmm-vc$(VSVer)0-d-1_6.lib;$(CPPDepLibsDebug);%(AdditionalDependencies) ++ legacy_stdio_definitions.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName)$(DebugDllSuffix).dll + $(IntDir)\$(ProjectName).def + true +@@ -171,7 +171,7 @@ + + %(AdditionalOptions) + .\gtkmm;..\gtk;$(GlibEtcInstallRoot)\include\atkmm-1.6;$(GlibEtcInstallRoot)\lib\atkmm-1.6\include;%(AdditionalIncludeDirectories) +- $(GtkMMBuildDefs);%(PreprocessorDefinitions) ++ $(GtkMMBuildDefs);_NO_CRT_STDIO_INLINE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + +@@ -184,7 +184,7 @@ + $(OutDir)\gendef.exe $(DefDir)\$(ProjectName).def $(TargetFileName) $(IntDir)*.obj + + +- atkmm-vc$(VSVer)0-1_6.lib;$(CPPDepLibsRelease);%(AdditionalDependencies) ++ legacy_stdio_definitions.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName)$(ReleaseDllSuffix).dll + $(IntDir)\$(ProjectName).def + true +@@ -697,4 +697,4 @@ + + + +- ++ +\ No newline at end of file +diff --git a/MSVC_Net2013/gtkmm.vcxproj.filters b/MSVC_Net2013/gtkmm.vcxproj.filters +index 5237502..5e8bd36 100644 +--- a/MSVC_Net2013/gtkmm.vcxproj.filters ++++ b/MSVC_Net2013/gtkmm.vcxproj.filters +@@ -14,496 +14,1459 @@ + + + +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Header Files +- Header Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Header Files +- Header Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files +- Source Files ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ + + +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Source Files +- Source Files +- Source Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Source Files +- Source Files +- Source Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files +- Header Files ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Source Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ ++ ++ Header Files ++ + + + + Resource Files + + +- ++ +\ No newline at end of file diff --git a/vcpkg/ports/gtkmm/fix_treeviewcolumn.patch b/vcpkg/ports/gtkmm/fix_treeviewcolumn.patch new file mode 100644 index 0000000..8daf91a --- /dev/null +++ b/vcpkg/ports/gtkmm/fix_treeviewcolumn.patch @@ -0,0 +1,15 @@ +diff --git a/gtk/gtkmm/treeviewcolumn.h b/gtk/gtkmm/treeviewcolumn.h +index f2a77c1..c66302a 100644 +--- a/gtk/gtkmm/treeviewcolumn.h ++++ b/gtk/gtkmm/treeviewcolumn.h +@@ -1026,9 +1026,7 @@ void TreeViewColumn::pack_end(const TreeModelColumn& column, + template inline + TreeViewColumn::TreeViewColumn(const Glib::ustring& title, + const TreeModelColumn& column) +-: +- Glib::ObjectBase(nullptr), // not (yet) a custom class +- Gtk::Object(Glib::ConstructParams(class_init_(), "title", title.c_str(), nullptr)) ++: TreeViewColumn (title) + { + pack_start(column, true /* expand */); + } diff --git a/vcpkg/ports/gtkmm/msvc_recommended_pragmas.h b/vcpkg/ports/gtkmm/msvc_recommended_pragmas.h new file mode 100644 index 0000000..c0eb1d5 --- /dev/null +++ b/vcpkg/ports/gtkmm/msvc_recommended_pragmas.h @@ -0,0 +1,34 @@ +#ifndef _MSC_VER +#pragma error "This header is for Microsoft VC only." +#endif /* _MSC_VER */ + +/* Make MSVC more pedantic, this is a recommended pragma list + * from _Win32_Programming_ by Rector and Newcomer. + */ +#pragma warning(error:4002) /* too many actual parameters for macro */ +#pragma warning(error:4003) /* not enough actual parameters for macro */ +#pragma warning(1:4010) /* single-line comment contains line-continuation character */ +#pragma warning(error:4013) /* 'function' undefined; assuming extern returning int */ +#pragma warning(1:4016) /* no function return type; using int as default */ +#pragma warning(error:4020) /* too many actual parameters */ +#pragma warning(error:4021) /* too few actual parameters */ +#pragma warning(error:4027) /* function declared without formal parameter list */ +#pragma warning(error:4029) /* declared formal parameter list different from definition */ +#pragma warning(error:4033) /* 'function' must return a value */ +#pragma warning(error:4035) /* 'function' : no return value */ +#pragma warning(error:4045) /* array bounds overflow */ +#pragma warning(error:4047) /* different levels of indirection */ +#pragma warning(error:4049) /* terminating line number emission */ +#pragma warning(error:4053) /* An expression of type void was used as an operand */ +#pragma warning(error:4071) /* no function prototype given */ +#pragma warning(disable:4101) /* unreferenced local variable */ +#pragma warning(error:4150) + +#pragma warning(disable:4244) /* No possible loss of data warnings */ +#pragma warning(disable:4305) /* No truncation from int to char warnings */ + +#pragma warning(error:4819) /* The file contains a character that cannot be represented in the current code page */ + +/* work around Microsoft's premature attempt to deprecate the C-Library */ +#define _CRT_SECURE_NO_WARNINGS +#define _CRT_NONSTDC_NO_WARNINGS diff --git a/vcpkg/ports/gtkmm/portfile.cmake b/vcpkg/ports/gtkmm/portfile.cmake new file mode 100644 index 0000000..feedbf2 --- /dev/null +++ b/vcpkg/ports/gtkmm/portfile.cmake @@ -0,0 +1,99 @@ +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "Error: UWP builds are currently not supported.") +endif() + +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "http://ftp.gnome.org/pub/GNOME/sources/gtkmm/3.22/gtkmm-3.22.2.tar.xz" + FILENAME "gtkmm-3.22.2.tar.xz" + SHA512 6e96b543e459481145ee0f56f31a7ad2466bd8ccdd2abf3205998aecede73d235149ca6e5ba6e8d20a4fd5345e310870d81ac2a716d4f78d1460ed685badbdc2 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + fix_properties.patch + fix_treeviewcolumn.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h DESTINATION ${SOURCE_PATH}/MSVC_Net2013) + +set(VS_PLATFORM ${VCPKG_TARGET_ARCHITECTURE}) +if(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) + set(VS_PLATFORM "Win32") +endif(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) + +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/gtkmm.sln + TARGET gtkmm + PLATFORM ${VS_PLATFORM} + USE_VCPKG_INTEGRATION +) + +# Handle headers +file(COPY ${SOURCE_PATH}/MSVC_Net2013/gdkmm/gdkmmconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/gdk/gdkmm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file( + COPY + ${SOURCE_PATH}/gdk/gdkmm + DESTINATION ${CURRENT_PACKAGES_DIR}/include + FILES_MATCHING PATTERN *.h +) +file(COPY ${SOURCE_PATH}/MSVC_Net2013/gtkmm/gtkmmconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/gtk/gtkmm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file( + COPY + ${SOURCE_PATH}/gtk/gtkmm + DESTINATION ${CURRENT_PACKAGES_DIR}/include + FILES_MATCHING PATTERN *.h +) + +# Handle libraries +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/gdkmm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/gdkmm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/gtkmm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/gtkmm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/gdkmm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/gdkmm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/gtkmm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/gtkmm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gtkmm RENAME copyright) diff --git a/vcpkg/ports/gts/CONTROL b/vcpkg/ports/gts/CONTROL new file mode 100644 index 0000000..7d9db73 --- /dev/null +++ b/vcpkg/ports/gts/CONTROL @@ -0,0 +1,5 @@ +Source: gts +Version: 0.7.6-3 +Homepage: https://github.com/finetjul/gts +Description: A Library intended to provide a set of useful functions to deal with 3D surfaces meshed with interconnected triangles +Build-Depends: glib diff --git a/vcpkg/ports/gts/fix-M_PI-in-windows.patch b/vcpkg/ports/gts/fix-M_PI-in-windows.patch new file mode 100644 index 0000000..d573ef0 --- /dev/null +++ b/vcpkg/ports/gts/fix-M_PI-in-windows.patch @@ -0,0 +1,28 @@ +diff --git a/src/curvature.c b/src/curvature.c +index 70f6af2..a5c0187 100644 +--- a/src/curvature.c ++++ b/src/curvature.c +@@ -17,6 +17,9 @@ + * Boston, MA 02111-1307, USA. + */ + ++#ifdef _WIN32 ++#define _USE_MATH_DEFINES ++#endif + #include + #include "gts.h" + +diff --git a/src/triangle.c b/src/triangle.c +index 1d82869..47170c6 100644 +--- a/src/triangle.c ++++ b/src/triangle.c +@@ -17,6 +17,9 @@ + * Boston, MA 02111-1307, USA. + */ + ++#ifdef _WIN32 ++#define _USE_MATH_DEFINES ++#endif + #include + #include "gts.h" + diff --git a/vcpkg/ports/gts/fix-pkgconfig.patch b/vcpkg/ports/gts/fix-pkgconfig.patch new file mode 100644 index 0000000..59deeca --- /dev/null +++ b/vcpkg/ports/gts/fix-pkgconfig.patch @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f458c35..8035507 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -124,3 +124,11 @@ INSTALL(FILES + src/gtsconfig.h + DESTINATION include COMPONENT Development + ) ++ ++set(prefix ${CMAKE_INSTALL_PREFIX}) ++set(exec_prefix ${CMAKE_INSTALL_PREFIX}) ++set(libdir ${CMAKE_INSTALL_PREFIX}/lib) ++set(includedir ${CMAKE_INSTALL_PREFIX}/include) ++ ++configure_file("${CMAKE_CURRENT_SOURCE_DIR}/gts.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/gts.pc" @ONLY) ++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gts.pc" DESTINATION lib/pkgconfig) +\ No newline at end of file +diff --git a/gts.pc.in b/gts.pc.in +index 39626d7..bcd4014 100644 +--- a/gts.pc.in ++++ b/gts.pc.in +@@ -7,5 +7,5 @@ Name: GTS + Description: GNU Triangulated Surface Library + Version: @VERSION@ + Requires: glib-2.0,gthread-2.0,gmodule-2.0 +-Libs: -L${libdir} @LIBS@ -lgts -lm ++Libs: -L${libdir} @LIBS@ -lgts + Cflags: -I${includedir} diff --git a/vcpkg/ports/gts/portfile.cmake b/vcpkg/ports/gts/portfile.cmake new file mode 100644 index 0000000..da7ed61 --- /dev/null +++ b/vcpkg/ports/gts/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO finetjul/gts + REF c4da61ae075f355d9ecc9f2d4767acf777f54c2b #0.7.6 + SHA512 e53d11213c26cbda08ae62e6388aee0a14d2884de72268ad25d10a23e77baa53a2b1151c5cc7643b059ded82b8edf0da79144c3108949fdc515168cac13ffca9 + HEAD_REF master + PATCHES + fix-M_PI-in-windows.patch + support-unix.patch + fix-pkgconfig.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_pkgconfig() +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/gts/support-unix.patch b/vcpkg/ports/gts/support-unix.patch new file mode 100644 index 0000000..597b4f5 --- /dev/null +++ b/vcpkg/ports/gts/support-unix.patch @@ -0,0 +1,190 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c35100c..f458c35 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.1) + add_executable(predicates_init src/predicates_init.c) + + execute_process( +- COMMAND predicates_init.exe ++ COMMAND predicates_init + OUTPUT_FILE predicates_init.h + OUTPUT_VARIABLE OUTVAR) + +@@ -12,6 +12,31 @@ MESSAGE("${OUTVAR}") + set(kit gts) + project(${kit}) + ++if (NOT WIN32) ++ set(CPP_HAS_WARNING 1) ++ set(HAVE_DLFCN_H 1) ++ set(HAVE_FLOATINGPOINT_H 1) ++ set(HAVE_FPU_CONTROL_H 1) ++ set(HAVE_GETOPT_H 1) ++ set(HAVE_GETOPT_LONG 1) ++ set(HAVE_INTTYPES_H 1) ++ set(HAVE_MEMORY_H 1) ++ set(HAVE_STDINT_H 1) ++ set(HAVE_STDLIB_H 1) ++ set(HAVE_STRINGS_H 1) ++ set(HAVE_STRING_H 1) ++ set(HAVE_SYS_STAT_H 1) ++ set(HAVE_SYS_TYPES_H 1) ++ set(HAVE_UNISTD_H 1) ++ set(PACKAGE_BUGREPORT 0) ++ set(PACKAGE_NAME "gts") ++ set(PACKAGE_STRING "0.7.6") ++ set(PACKAGE_TARNAME "gts") ++ set(PACKAGE_URL "") ++ set(PACKAGE_VERSION "0.7.6") ++ set(STDC_HEADERS) ++endif() ++ + set(srcs + src/bbtree.c + src/boolean.c +@@ -49,7 +74,11 @@ set(srcs + src/vopt.c + ) + ++if (WIN32) + configure_file(src/config.h.win32 config.h) ++else() ++configure_file(config.h.in config.h @ONLY) ++endif() + + SET(CMAKE_INCLUDE_CURRENT_DIR ON) + include_directories( +@@ -74,7 +103,9 @@ find_path(glib_CONFIG_H NAMES glibconfig.h + get_filename_component(glibconfig_INCLUDE_DIR ${glib_CONFIG_H} DIRECTORY) + include_directories(${glib_INCLUDE_DIR} ${glib_CONFIG_H}) + ++if (NOT WIN32 AND BUILD_SHARED_LIBS) + add_definitions(/DGTS_COMPILATION) ++endif() + + add_library(${kit} SHARED ${srcs}) + target_link_libraries(${kit} ${glib_LIBRARY}) +diff --git a/config.h.in b/config.h.in +index ad95945..fe6c945 100644 +--- a/config.h.in ++++ b/config.h.in +@@ -1,89 +1,89 @@ + /* config.h.in. Generated from configure.ac by autoheader. */ + + /* Define if C preprocessor supports warning directive. */ +-#undef CPP_HAS_WARNING ++#cmakedefine CPP_HAS_WARNING @CPP_HAS_WARNING@ + + /* Binary age */ +-#undef GTS_BINARY_AGE ++#define GTS_BINARY_AGE 0 + + /* Interface age */ +-#undef GTS_INTERFACE_AGE ++#define GTS_INTERFACE_AGE 0 + + /* Major version */ +-#undef GTS_MAJOR_VERSION ++#define GTS_MAJOR_VERSION 0 + + /* Micro version */ +-#undef GTS_MICRO_VERSION ++#define GTS_MICRO_VERSION 0 + + /* Minor version */ +-#undef GTS_MINOR_VERSION ++#define GTS_MINOR_VERSION 6 + + /* Define to 1 if you have the header file. */ +-#undef HAVE_DLFCN_H ++#cmakedefine HAVE_DLFCN_H @HAVE_DLFCN_H@ + + /* Define to 1 if you have the header file. */ +-#undef HAVE_FLOATINGPOINT_H ++#cmakedefine HAVE_FLOATINGPOINT_H @HAVE_FLOATINGPOINT_H@ + + /* Define to 1 if you have the header file. */ +-#undef HAVE_FPU_CONTROL_H ++#cmakedefine HAVE_FPU_CONTROL_H @HAVE_FPU_CONTROL_H@ + + /* Define to 1 if you have the header file. */ +-#undef HAVE_GETOPT_H ++#cmakedefine HAVE_GETOPT_H @HAVE_GETOPT_H@ + + /* Define to 1 if you have the `getopt_long' function. */ +-#undef HAVE_GETOPT_LONG ++#cmakedefine HAVE_GETOPT_LONG @HAVE_GETOPT_LONG@ + + /* Define to 1 if you have the header file. */ +-#undef HAVE_INTTYPES_H ++#cmakedefine HAVE_INTTYPES_H @HAVE_INTTYPES_H@ + + /* Define to 1 if you have the header file. */ +-#undef HAVE_MEMORY_H ++#cmakedefine HAVE_MEMORY_H @HAVE_MEMORY_H@ + + /* Define to 1 if you have the header file. */ +-#undef HAVE_STDINT_H ++#cmakedefine HAVE_STDINT_H @HAVE_STDINT_H@ + + /* Define to 1 if you have the header file. */ +-#undef HAVE_STDLIB_H ++#cmakedefine HAVE_STDLIB_H @HAVE_STDLIB_H@ + + /* Define to 1 if you have the header file. */ +-#undef HAVE_STRINGS_H ++#cmakedefine HAVE_STRINGS_H @HAVE_STRINGS_H@ + + /* Define to 1 if you have the header file. */ +-#undef HAVE_STRING_H ++#cmakedefine HAVE_STRING_H @HAVE_STRING_H@ + + /* Define to 1 if you have the header file. */ +-#undef HAVE_SYS_STAT_H ++#cmakedefine HAVE_SYS_STAT_H @HAVE_SYS_STAT_H@ + + /* Define to 1 if you have the header file. */ +-#undef HAVE_SYS_TYPES_H ++#cmakedefine HAVE_SYS_TYPES_H @HAVE_SYS_TYPES_H@ + + /* Define to 1 if you have the header file. */ +-#undef HAVE_UNISTD_H ++#cmakedefine HAVE_UNISTD_H @HAVE_UNISTD_H@ + + /* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +-#undef LT_OBJDIR ++#cmakedefine LT_OBJDIR @LT_OBJDIR@ + + /* Define if netpbm include files are in netpbm/. */ +-#undef NETPBM_INCLUDE ++#cmakedefine NETPBM_INCLUDE @NETPBM_INCLUDE@ + + /* Define to the address where bug reports for this package should be sent. */ +-#undef PACKAGE_BUGREPORT ++#cmakedefine PACKAGE_BUGREPORT @PACKAGE_BUGREPORT@ + + /* Define to the full name of this package. */ +-#undef PACKAGE_NAME ++#cmakedefine PACKAGE_NAME @PACKAGE_NAME@ + + /* Define to the full name and version of this package. */ +-#undef PACKAGE_STRING ++#cmakedefine PACKAGE_STRING @PACKAGE_STRING@ + + /* Define to the one symbol short name of this package. */ +-#undef PACKAGE_TARNAME ++#cmakedefine PACKAGE_TARNAME @PACKAGE_TARNAME@ + + /* Define to the home page for this package. */ +-#undef PACKAGE_URL ++#cmakedefine PACKAGE_URL @PACKAGE_URL@ + + /* Define to the version of this package. */ +-#undef PACKAGE_VERSION ++#cmakedefine PACKAGE_VERSION @PACKAGE_VERSION@ + + /* Define to 1 if you have the ANSI C header files. */ +-#undef STDC_HEADERS ++#cmakedefine STDC_HEADERS @STDC_HEADERS@ diff --git a/vcpkg/ports/guetzli/CMakeLists.txt b/vcpkg/ports/guetzli/CMakeLists.txt new file mode 100644 index 0000000..d24b232 --- /dev/null +++ b/vcpkg/ports/guetzli/CMakeLists.txt @@ -0,0 +1,42 @@ +cmake_minimum_required(VERSION 3.8.0) +project(guetzli) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS -DNOMINMAX) +endif() + +find_path(butteraugli_include butteraugli/butteraugli.h) +find_library(butteraugli_library NAMES butteraugli_lib) +find_package(PNG REQUIRED) + +include_directories("." ${PNG_INCLUDE_DIRS} ${butteraugli_include}) + +file(GLOB guetzli_srcs "guetzli/*.cc") +file(GLOB guetzli_includes "guetzli/*.h") +list(REMOVE_ITEM guetzli_srcs "guetzli/guetzli.cc") + +add_library(guetzli_lib ${guetzli_srcs}) + +add_executable(guetzli guetzli/guetzli.cc) + +target_link_libraries(guetzli_lib ${butteraugli_library} ${PNG_LIBRARIES}) +target_link_libraries(guetzli guetzli_lib ${butteraugli_library} ${PNG_LIBRARIES}) + + +install( + TARGETS guetzli_lib + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_TOOLS) + install ( + TARGETS guetzli + RUNTIME DESTINATION tools/guetzli + ) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES ${guetzli_includes} DESTINATION include/guetzli) +endif() diff --git a/vcpkg/ports/guetzli/CONTROL b/vcpkg/ports/guetzli/CONTROL new file mode 100644 index 0000000..8fe11f5 --- /dev/null +++ b/vcpkg/ports/guetzli/CONTROL @@ -0,0 +1,5 @@ +Source: guetzli +Version: 2018-07-30-2 +Homepage: https://github.com/google/guetzli +Description: Perceptual JPEG encoder +Build-Depends: libpng, butteraugli diff --git a/vcpkg/ports/guetzli/butteraugli.patch b/vcpkg/ports/guetzli/butteraugli.patch new file mode 100644 index 0000000..ac124ca --- /dev/null +++ b/vcpkg/ports/guetzli/butteraugli.patch @@ -0,0 +1,13 @@ +diff --git a/guetzli/butteraugli_comparator.cc b/guetzli/butteraugli_comparator.cc +index 142c203..f4e710d 100644 +--- a/guetzli/butteraugli_comparator.cc ++++ b/guetzli/butteraugli_comparator.cc +@@ -56,7 +56,7 @@ ButteraugliComparator::ButteraugliComparator(const int width, const int height, + height_(height), + target_distance_(target_distance), + rgb_orig_(*rgb), +- comparator_(LinearRgb(width_, height_, *rgb)), ++ comparator_(LinearRgb(width_, height_, *rgb), 1.0f), + distance_(0.0), + stats_(stats) {} + diff --git a/vcpkg/ports/guetzli/portfile.cmake b/vcpkg/ports/guetzli/portfile.cmake new file mode 100644 index 0000000..5e10414 --- /dev/null +++ b/vcpkg/ports/guetzli/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/guetzli + REF 0b78c7cc8b1b6cbaaf3d08b1facb599bcec1d101 + SHA512 54c5198c4c066858dd1377a32e765f46a589f3444bea303b54326453d0e8e71f959d3aaf2c72f4714fd27891f4d93288e7fa96baf1fd10f127929c1fcfa5ae1c + HEAD_REF master + PATCHES butteraugli.patch +) + +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 -DDISABLE_INSTALL_TOOLS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/guetzli) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/guetzli RENAME copyright) diff --git a/vcpkg/ports/gumbo/CMakeLists.txt b/vcpkg/ports/gumbo/CMakeLists.txt new file mode 100644 index 0000000..1c90f42 --- /dev/null +++ b/vcpkg/ports/gumbo/CMakeLists.txt @@ -0,0 +1,34 @@ +cmake_minimum_required(VERSION 3.8.0) + +project(gumbo) + +set(gumbo_srcs + src/attribute.c + src/char_ref.c + src/error.c + src/parser.c + src/string_buffer.c + src/string_piece.c + src/tag.c + src/tokenizer.c + src/utf8.c + src/util.c + src/vector.c +) + +include_directories(src) +if (MSVC) + include_directories(visualc/include) +endif (MSVC) + +add_library(gumbo ${gumbo_srcs}) + +install( + TARGETS gumbo + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES src/gumbo.h src/tag_enum.h DESTINATION include) +endif() diff --git a/vcpkg/ports/gumbo/CONTROL b/vcpkg/ports/gumbo/CONTROL new file mode 100644 index 0000000..c6741b9 --- /dev/null +++ b/vcpkg/ports/gumbo/CONTROL @@ -0,0 +1,4 @@ +Source: gumbo +Version: 0.10.1-3 +Homepage: https://github.com/google/gumbo-parser +Description: An HTML5 parsing library in pure C99 diff --git a/vcpkg/ports/gumbo/portfile.cmake b/vcpkg/ports/gumbo/portfile.cmake new file mode 100644 index 0000000..715decc --- /dev/null +++ b/vcpkg/ports/gumbo/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/gumbo-parser + REF v0.10.1 + SHA512 bb1fb55cd07076ab6a9f38dc14db50397dbdca9a04ace4895dfba8b8cbc09038a96e26070c09c75fa929ada2e815affe233c1e2ecd8afe2aba6201647cf277d1 + 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}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/gumbo RENAME copyright) diff --git a/vcpkg/ports/gzip-hpp/CONTROL b/vcpkg/ports/gzip-hpp/CONTROL new file mode 100644 index 0000000..86eba13 --- /dev/null +++ b/vcpkg/ports/gzip-hpp/CONTROL @@ -0,0 +1,5 @@ +Source: gzip-hpp +Version: 0.1.0 +Homepage: https://github.com/mapbox/gzip-hpp/ +Description: Gzip header-only C++ library +Build-Depends: zlib \ No newline at end of file diff --git a/vcpkg/ports/gzip-hpp/portfile.cmake b/vcpkg/ports/gzip-hpp/portfile.cmake new file mode 100644 index 0000000..c490c72 --- /dev/null +++ b/vcpkg/ports/gzip-hpp/portfile.cmake @@ -0,0 +1,14 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mapbox/gzip-hpp + REF v0.1.0 + SHA512 4f332f08e842583b421932f14ee736a64d090ac22fd4e4654e5d84667c2fd6dcd73206b27b7c0c4f364104af7f4a5ad765c38125574bc239fa93b0b0ec4dad56 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/include/gzip DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/h3/CONTROL b/vcpkg/ports/h3/CONTROL new file mode 100644 index 0000000..8f37d9d --- /dev/null +++ b/vcpkg/ports/h3/CONTROL @@ -0,0 +1,4 @@ +Source: h3 +Version: 3.6.3 +Homepage: https://github.com/uber/h3 +Description: A Hexagonal Hierarchical Geospatial Indexing System diff --git a/vcpkg/ports/h3/portfile.cmake b/vcpkg/ports/h3/portfile.cmake new file mode 100644 index 0000000..07a5b47 --- /dev/null +++ b/vcpkg/ports/h3/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP") +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO uber/h3 + REF v3.6.3 + SHA512 925438663ef9fb6541e4655dc95febe6233f078f8277937d8a9b33a76cf9b257d8c14e3ac5109460ac9188c426e6997700c4ec17926cf401577b3faf74c6c320 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_BENCHMARKS=OFF + -DBUILD_FILTERS=OFF + -DBUILD_GENERATORS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/h5py-lzf/0001-disable-H5PLget_plugin-api.patch b/vcpkg/ports/h5py-lzf/0001-disable-H5PLget_plugin-api.patch new file mode 100644 index 0000000..12f8984 --- /dev/null +++ b/vcpkg/ports/h5py-lzf/0001-disable-H5PLget_plugin-api.patch @@ -0,0 +1,16 @@ +diff --git a/lzf/lzf_filter.c b/lzf/lzf_filter.c +index 951b1e4c..b2fbffc1 100644 +--- a/lzf/lzf_filter.c ++++ b/lzf/lzf_filter.c +@@ -93,9 +93,9 @@ static const H5Z_class_t filter_class = { + + #include "H5PLextern.h" + +-H5PL_type_t H5PLget_plugin_type(void){ return H5PL_TYPE_FILTER; } ++//H5PL_type_t H5PLget_plugin_type(void){ return H5PL_TYPE_FILTER; } + +-const void *H5PLget_plugin_info(void){ return &filter_class; } ++//const void *H5PLget_plugin_info(void){ return &filter_class; } + + #endif + #endif diff --git a/vcpkg/ports/h5py-lzf/CMakeLists.txt b/vcpkg/ports/h5py-lzf/CMakeLists.txt new file mode 100644 index 0000000..3ef3950 --- /dev/null +++ b/vcpkg/ports/h5py-lzf/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.13) +project(h5py-lzf) + +find_package(hdf5 CONFIG REQUIRED) + +add_library(h5py-lzf STATIC lzf_filter.c lzf/lzf_c.c lzf/lzf_d.c) +target_include_directories(h5py-lzf PUBLIC $) +target_link_libraries(h5py-lzf PRIVATE libzstd $) +install(TARGETS h5py-lzf EXPORT h5py-lzf-config ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) +install(EXPORT h5py-lzf-config DESTINATION share/cmake/h5py-lzf) +install(FILES lzf_filter.h lzf/lzf.h DESTINATION include) diff --git a/vcpkg/ports/h5py-lzf/CONTROL b/vcpkg/ports/h5py-lzf/CONTROL new file mode 100644 index 0000000..3ef62f8 --- /dev/null +++ b/vcpkg/ports/h5py-lzf/CONTROL @@ -0,0 +1,5 @@ +Source: h5py-lzf +Version: 2019-12-04 +Build-Depends: hdf5 +Homepage: https://github.com/h5py/h5py/tree/master/lzf +Description: The LZF filter is an alternative DEFLATE-style compressor for HDF5 datasets, using the free LZF library by Marc Alexander Lehmann. diff --git a/vcpkg/ports/h5py-lzf/portfile.cmake b/vcpkg/ports/h5py-lzf/portfile.cmake new file mode 100644 index 0000000..71b4709 --- /dev/null +++ b/vcpkg/ports/h5py-lzf/portfile.cmake @@ -0,0 +1,34 @@ +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(link_hdf5_SHARED 0) +else() + set(link_hdf5_SHARED 1) +endif() + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO h5py/h5py + REF 81ba118ee66b97a94678e8f5675c4114649dfda4 + SHA512 c789abdc563f8d2535f0a2ef5e233eb862281559a9cdc3ec560dd69b4d403b6f923f5390390da54851e1bfef1be8de7f80999c25a7f3ac4962ee0620179c6420 + HEAD_REF master + PATCHES + 0001-disable-H5PLget_plugin-api.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/lzf) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/lzf + PREFER_NINJA + OPTIONS + -Dlink_hdf5_SHARED=${link_hdf5_SHARED} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +configure_file(${SOURCE_PATH}/lzf/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/halide/CONTROL b/vcpkg/ports/halide/CONTROL new file mode 100644 index 0000000..fe1f944 --- /dev/null +++ b/vcpkg/ports/halide/CONTROL @@ -0,0 +1,49 @@ +Source: halide +Version: master_2020_03_07 +Homepage: https://github.com/halide/Halide +Description: Halide is a programming language designed to make it easier to write high-performance image processing code on modern machines. +Build-Depends: llvm[tools], openblas + +Feature: app +Description: app support + +Feature: tutorials +Description: tutorials support + +Feature: utils +Description: utils + +Feature: nativeclient +Description: nativeclient + +Feature: hexagon +Description: hexagon + +Feature: metal +Description: metal support + +Feature: mips +Description: mips support + +Feature: powerpc +Description: powerpc support + +Feature: ptx +Description: ptx support + +Feature: opencl +Build-Depends: opencl +Description: opencl support + +Feature: opengl +Build-Depends: opengl +Description: opengl support + +Feature: rtti +Description: rtti support + +Feature: docs +Description: docs + +Feature: test +Description: test \ No newline at end of file diff --git a/vcpkg/ports/halide/fix-install-path.patch b/vcpkg/ports/halide/fix-install-path.patch new file mode 100644 index 0000000..5fb24ea --- /dev/null +++ b/vcpkg/ports/halide/fix-install-path.patch @@ -0,0 +1,35 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 577b61ed2..7c6dd8ac4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -432,7 +432,7 @@ install(FILES + DESTINATION include) + + install(DIRECTORY tutorial +- DESTINATION . ++ DESTINATION share/halide + FILES_MATCHING + PATTERN "*.cpp" + PATTERN "*.h" +@@ -463,10 +463,10 @@ install(FILES + README.md + README_rungen.md + README_webassembly.md +- DESTINATION .) ++ DESTINATION share/halide) + + # ---- halide.cmake +-install(FILES halide.cmake DESTINATION .) ++install(FILES halide.cmake DESTINATION share/halide) + + # ---- halide_config + file(GLOB FILES "${Halide_SOURCE_DIR}/tools/halide_config.*.tpl") +@@ -475,7 +475,7 @@ foreach(F ${FILES}) + string(REGEX REPLACE "\\.tpl$" "" FNAME "${FNAME}") # Strip .tpl extension + configure_file("${F}" "${CMAKE_BINARY_DIR}/${FNAME}" @ONLY) + install(FILES "${CMAKE_BINARY_DIR}/${FNAME}" +- DESTINATION .) ++ DESTINATION share/halide) + endforeach() + + add_custom_target(distrib diff --git a/vcpkg/ports/halide/portfile.cmake b/vcpkg/ports/halide/portfile.cmake new file mode 100644 index 0000000..4a6a04f --- /dev/null +++ b/vcpkg/ports/halide/portfile.cmake @@ -0,0 +1,73 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO halide/Halide + REF f43293be3725bb959941e38c1b1fa9ae925f7389 + SHA512 f223185e208acf6c5b73353a6b5be815db5f2598f568596e800c35ea40b0babe4630da44229e14a5607e9d5e78298d07e7b36a9cbc7b71bf3e665bc12caff68e + HEAD_REF master + PATCHES + fix-install-path.patch +) + +set(TARGET_X86 OFF) +set(TARGET_ARM OFF) +set(TARGET_AARCH64 OFF) +if (VCPKG_TARGET_ARCHITECTURE STREQUAL x86 OR VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + # llvm x86 components are required for llvm x64 + set(TARGET_X86 ON) +elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL arm) + set(TARGET_X86 OFF) + if (TARGET_TRIPLET STREQUAL arm64) + set(TARGET_AARCH64 ON) + else() + set(TARGET_ARM ON) + endif() +endif() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(HALIDE_SHARED_LIBRARY ON) +else() + set(HALIDE_SHARED_LIBRARY OFF) +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + app WITH_APPS + test WITH_TESTS + tutorials WITH_TUTORIALS + docs WITH_DOCS + utils WITH_UTILS + nativeclient TARGET_NATIVE_CLIENT + hexagon TARGET_HEXAGON + metal TARGET_METAL + mips TARGET_MIPS + powerpc TARGET_POWERPC + ptx TARGET_PTX + opencl TARGET_OPENCL + opengl TARGET_OPENGL + opengl TARGET_OPENGLCOMPUTE + rtti HALIDE_ENABLE_RTTI +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DTRIPLET_SYSTEM_ARCH=${TRIPLET_SYSTEM_ARCH} + -DHALIDE_SHARED_LIBRARY=${HALIDE_SHARED_LIBRARY} + -DTARGET_X86=${TARGET_X86} + -DTARGET_ARM=${TARGET_ARM} + -DTARGET_AARCH64=${TARGET_AARCH64} + #-DTARGET_AMDGPU + -DWARNINGS_AS_ERRORS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/halide) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/halide_config.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/halide-config.cmake) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/halide_config.make ${CURRENT_PACKAGES_DIR}/share/${PORT}/halide-config.make) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/harfbuzz/0001-fix-cmake-export.patch b/vcpkg/ports/harfbuzz/0001-fix-cmake-export.patch new file mode 100644 index 0000000..31f4896 --- /dev/null +++ b/vcpkg/ports/harfbuzz/0001-fix-cmake-export.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 71830b6f5..a25cb09dd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -712,7 +712,7 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL) + ) + install(EXPORT harfbuzzConfig + NAMESPACE harfbuzz:: +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/harfbuzz ++ DESTINATION share/harfbuzz + ) + if (HB_HAVE_ICU) + install(TARGETS harfbuzz-icu diff --git a/vcpkg/ports/harfbuzz/0002-fix-uwp-build.patch b/vcpkg/ports/harfbuzz/0002-fix-uwp-build.patch new file mode 100644 index 0000000..beb5ce7 --- /dev/null +++ b/vcpkg/ports/harfbuzz/0002-fix-uwp-build.patch @@ -0,0 +1,15 @@ +diff --git a/src/hb-ft.cc b/src/hb-ft.cc +index 1900f30..add9917 100644 +--- a/src/hb-ft.cc ++++ b/src/hb-ft.cc +@@ -31,6 +31,10 @@ + + #include "hb-ft.h" + ++#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP) ++#define generic GenericFromFreeTypeLibrary ++#endif ++ + #include "hb-font.hh" + #include "hb-machinery.hh" + #include "hb-cache.hh" diff --git a/vcpkg/ports/harfbuzz/0003-remove-broken-test.patch b/vcpkg/ports/harfbuzz/0003-remove-broken-test.patch new file mode 100644 index 0000000..2a3b234 --- /dev/null +++ b/vcpkg/ports/harfbuzz/0003-remove-broken-test.patch @@ -0,0 +1,26 @@ +diff --git a/src/hb-coretext.cc b/src/hb-coretext.cc +index 85993d1..3e8e642 100644 +--- a/src/hb-coretext.cc ++++ b/src/hb-coretext.cc +@@ -1059,21 +1059,6 @@ resize_and_retry: + buffer->len += num_glyphs; + } + +- /* Mac OS 10.6 doesn't have kCTTypesetterOptionForcedEmbeddingLevel, +- * or if it does, it doesn't respect it. So we get runs with wrong +- * directions. As such, disable the assert... It wouldn't crash, but +- * cursoring will be off... +- * +- * https://crbug.com/419769 +- */ +- if (false) +- { +- /* Make sure all runs had the expected direction. */ +- HB_UNUSED bool backward = HB_DIRECTION_IS_BACKWARD (buffer->props.direction); +- assert (bool (status_and & kCTRunStatusRightToLeft) == backward); +- assert (bool (status_or & kCTRunStatusRightToLeft) == backward); +- } +- + buffer->clear_positions (); + + unsigned int count = buffer->len; diff --git a/vcpkg/ports/harfbuzz/CONTROL b/vcpkg/ports/harfbuzz/CONTROL new file mode 100644 index 0000000..31901b9 --- /dev/null +++ b/vcpkg/ports/harfbuzz/CONTROL @@ -0,0 +1,18 @@ +Source: harfbuzz +Version: 2.6.6 +Port-Version: 1 +Description: HarfBuzz OpenType text shaping engine +Homepage: https://github.com/behdad/harfbuzz +Build-Depends: freetype[core], ragel, gettext (osx) + +Feature: graphite2 +Build-Depends: graphite2 +Description: Graphite2 shaper support + +Feature: icu +Build-Depends: icu +Description: icu support for harfbuzz + +Feature: glib +Build-Depends: glib +Description: Glib Unicode callbacks support diff --git a/vcpkg/ports/harfbuzz/find-package-freetype-2.patch b/vcpkg/ports/harfbuzz/find-package-freetype-2.patch new file mode 100644 index 0000000..608e9c8 --- /dev/null +++ b/vcpkg/ports/harfbuzz/find-package-freetype-2.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index defd5d6..03f9d4e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -267,7 +267,7 @@ set (subset_project_headers + + ## Find and include needed header folders and libraries + if (HB_HAVE_FREETYPE) +- include (FindFreetype) ++ find_package(Freetype REQUIRED) + if (NOT FREETYPE_FOUND) + message(FATAL_ERROR "HB_HAVE_FREETYPE was set, but we failed to find it. Maybe add a CMAKE_PREFIX_PATH= to your Freetype2 install prefix") + endif () diff --git a/vcpkg/ports/harfbuzz/fix_include.patch b/vcpkg/ports/harfbuzz/fix_include.patch new file mode 100644 index 0000000..894f7b3 --- /dev/null +++ b/vcpkg/ports/harfbuzz/fix_include.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c4dc524..bfd15ec 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -431,6 +431,7 @@ endif () + + ## Define harfbuzz library + add_library(harfbuzz ${project_sources} ${project_extra_sources} ${project_headers}) ++target_include_directories(harfbuzz PUBLIC $) + target_link_libraries(harfbuzz ${THIRD_PARTY_LIBS}) + + diff --git a/vcpkg/ports/harfbuzz/glib-cmake.patch b/vcpkg/ports/harfbuzz/glib-cmake.patch new file mode 100644 index 0000000..519627a --- /dev/null +++ b/vcpkg/ports/harfbuzz/glib-cmake.patch @@ -0,0 +1,30 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9b21bef2c..ae741ef63 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -213,21 +213,13 @@ endif () + if (HB_HAVE_GLIB) + add_definitions(-DHAVE_GLIB) + +- # https://github.com/WebKit/webkit/blob/master/Source/cmake/FindGLIB.cmake +- find_package(PkgConfig) +- pkg_check_modules(PC_GLIB QUIET glib-2.0) +- +- find_library(GLIB_LIBRARIES NAMES glib-2.0 HINTS ${PC_GLIB_LIBDIR} ${PC_GLIB_LIBRARY_DIRS}) +- find_path(GLIBCONFIG_INCLUDE_DIR NAMES glibconfig.h HINTS ${PC_LIBDIR} ${PC_LIBRARY_DIRS} ${PC_GLIB_INCLUDEDIR} ${PC_GLIB_INCLUDE_DIRS} PATH_SUFFIXES glib-2.0/include) +- find_path(GLIB_INCLUDE_DIR NAMES glib.h HINTS ${PC_GLIB_INCLUDEDIR} ${PC_GLIB_INCLUDE_DIRS} PATH_SUFFIXES glib-2.0) +- +- include_directories(${GLIBCONFIG_INCLUDE_DIR} ${GLIB_INCLUDE_DIR}) ++ find_package(Threads REQUIRED) ++ find_package(unofficial-iconv REQUIRED) ++ find_package(unofficial-glib CONFIG REQUIRED) + + list(APPEND project_headers ${PROJECT_SOURCE_DIR}/src/hb-glib.h) + +- list(APPEND THIRD_PARTY_LIBS ${GLIB_LIBRARIES}) +- +- mark_as_advanced(GLIB_LIBRARIES GLIBCONFIG_INCLUDE_DIR GLIB_INCLUDE_DIR) ++ list(APPEND THIRD_PARTY_LIBS unofficial::glib::glib) + endif () + + if (HB_HAVE_ICU) diff --git a/vcpkg/ports/harfbuzz/portfile.cmake b/vcpkg/ports/harfbuzz/portfile.cmake new file mode 100644 index 0000000..d155044 --- /dev/null +++ b/vcpkg/ports/harfbuzz/portfile.cmake @@ -0,0 +1,61 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO harfbuzz/harfbuzz + REF 2.6.6 + SHA512 3ddf3e6eccf28ca1441544f0b67e243c6a85a32122bfc0f8092b3cc465b20a25aa3cb72404070d2627b9e204f86412c3bfb9aaca272c5492d8448facc1971a7d + HEAD_REF master + PATCHES + 0001-fix-cmake-export.patch + 0002-fix-uwp-build.patch + 0003-remove-broken-test.patch + # This patch is required for propagating the full list of static dependencies from freetype + find-package-freetype-2.patch + # This patch is required for propagating the full list of dependencies from glib + glib-cmake.patch + fix_include.patch +) + +file(READ ${SOURCE_PATH}/CMakeLists.txt _contents) + +if("${_contents}" MATCHES "include \\(FindFreetype\\)") + message(FATAL_ERROR "Harfbuzz's cmake must not directly include() FindFreetype.") +endif() + +if("${_contents}" MATCHES "find_library\\(GLIB_LIBRARIES") + message(FATAL_ERROR "Harfbuzz's cmake must not directly find_library() glib.") +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + icu HB_HAVE_ICU + graphite2 HB_HAVE_GRAPHITE2 + glib HB_HAVE_GLIB +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DHB_HAVE_FREETYPE=ON + -DHB_BUILD_TESTS=OFF + OPTIONS_DEBUG + -DSKIP_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +vcpkg_copy_pdbs() + +if ("glib" IN_LIST FEATURES) + # Propagate dependency on glib downstream + file(READ "${CURRENT_PACKAGES_DIR}/share/harfbuzz/harfbuzzConfig.cmake" _contents) + file(WRITE "${CURRENT_PACKAGES_DIR}/share/harfbuzz/harfbuzzConfig.cmake" " +include(CMakeFindDependencyMacro) +find_dependency(unofficial-glib CONFIG) + +${_contents} +") +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/hayai/CONTROL b/vcpkg/ports/hayai/CONTROL new file mode 100644 index 0000000..7943d30 --- /dev/null +++ b/vcpkg/ports/hayai/CONTROL @@ -0,0 +1,4 @@ +Source: hayai +Version: 2019-08-10 +Description: C++ benchmarking framework +Homepage: https://github.com/nickbruun/hayai diff --git a/vcpkg/ports/hayai/portfile.cmake b/vcpkg/ports/hayai/portfile.cmake new file mode 100644 index 0000000..c175d66 --- /dev/null +++ b/vcpkg/ports/hayai/portfile.cmake @@ -0,0 +1,70 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nickbruun/hayai + REF 0234860c7a851362ab33efc6c018203cded3eb48 + SHA512 e4c65d834eddaeb77e73a3bc24645a531b93d26e32ff1daffbe71c579b76b4b8b4865f6c7ea07b378cafbe2da3a698414d4135f28fc9821eef995ed78d0987f2 + HEAD_REF master +) + +if(VCPKG_TARGET_IS_UWP) + set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS") + set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DINSTALL_HAYAI=ON + -DBUILD_HAYAI_TESTS=OFF + -DBUILD_HAYAI_SAMPLES=OFF +) + +vcpkg_install_cmake() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +elseif(EXISTS ${CURRENT_PACKAGES_DIR}/lib/CMake/${PORT}) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/CMake/${PORT}) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle manual-link libraries +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/hayai_main.lib) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(RENAME + ${CURRENT_PACKAGES_DIR}/debug/lib/hayai_main.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/hayai_main.lib + ) + + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/share/${PORT}/hayai-targets-debug.cmake + "\${CMAKE_CURRENT_LIST_DIR}/../../debug/lib/hayai_main.lib" + "\${CMAKE_CURRENT_LIST_DIR}/../../debug/lib/manual-link/hayai_main.lib" + ) +endif() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/hayai_main.lib) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(RENAME + ${CURRENT_PACKAGES_DIR}/lib/hayai_main.lib + ${CURRENT_PACKAGES_DIR}/lib/manual-link/hayai_main.lib + ) + + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/share/${PORT}/hayai-targets-release.cmake + "\${CMAKE_CURRENT_LIST_DIR}/../../lib/hayai_main.lib" + "\${CMAKE_CURRENT_LIST_DIR}/../../lib/manual-link/hayai_main.lib" + ) +endif() + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/vcpkg/ports/hdf5/CONTROL b/vcpkg/ports/hdf5/CONTROL new file mode 100644 index 0000000..a9a4865 --- /dev/null +++ b/vcpkg/ports/hdf5/CONTROL @@ -0,0 +1,29 @@ +Source: hdf5 +Version: 1.12.0 +Homepage: https://www.hdfgroup.org/downloads/hdf5/ +Description: HDF5 is a data model, library, and file format for storing and managing data +Default-Features: szip, zlib +Supports: !uwp + +Feature: parallel +Description: parallel support for HDF5 +Build-Depends: mpi + +Feature: cpp +Description: Builds cpp lib + +Feature: tools +Description: Build hdf tools + +Feature: szip +Description: Build with szip +Build-Depends: szip + +Feature: zlib +Description: Build with zlib +Build-Depends: zlib + +Feature: fortran +Description: Build with fortran +Build-Depends: + diff --git a/vcpkg/ports/hdf5/hdf5_config.patch b/vcpkg/ports/hdf5/hdf5_config.patch new file mode 100644 index 0000000..553a023 --- /dev/null +++ b/vcpkg/ports/hdf5/hdf5_config.patch @@ -0,0 +1,31 @@ +diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in +index b5a12a650..a8cbacb1c 100644 +--- a/config/cmake/hdf5-config.cmake.in ++++ b/config/cmake/hdf5-config.cmake.in +@@ -54,7 +54,10 @@ set (${HDF5_PACKAGE_NAME}_PARALLEL_FILTERED_WRITES "@PARALLEL_FILTERED_WRITES@") + #----------------------------------------------------------------------------- + # Dependencies + #----------------------------------------------------------------------------- ++include(CMakeFindDependencyMacro) ++ + if (${HDF5_PACKAGE_NAME}_ENABLE_PARALLEL) ++ find_dependency(MPI) + set (${HDF5_PACKAGE_NAME}_MPI_C_INCLUDE_PATH "@MPI_C_INCLUDE_DIRS@") + set (${HDF5_PACKAGE_NAME}_MPI_C_LIBRARIES "@MPI_C_LIBRARIES@") + if (${HDF5_PACKAGE_NAME}_BUILD_FORTRAN) +@@ -110,11 +113,11 @@ set (${HDF5_PACKAGE_NAME}_VERSION_MINOR @HDF5_VERSION_MINOR@) + # project which has already built hdf5 as a subproject + #----------------------------------------------------------------------------- + if (NOT TARGET "@HDF5_PACKAGE@") +- if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS) +- include (@PACKAGE_SHARE_INSTALL_DIR@/@ZLIB_PACKAGE_NAME@/@ZLIB_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake) ++ if (${HDF5_PACKAGE_NAME}_ENABLE_Z_LIB_SUPPORT) ++ find_dependency(ZLIB) + endif () +- if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT AND ${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS) +- include (@PACKAGE_SHARE_INSTALL_DIR@/@SZIP_PACKAGE_NAME@/@SZIP_PACKAGE_NAME@@HDF_PACKAGE_EXT@-targets.cmake) ++ if (${HDF5_PACKAGE_NAME}_ENABLE_SZIP_SUPPORT) ++ find_dependency(szip) + endif () + include (@PACKAGE_SHARE_INSTALL_DIR@/@HDF5_PACKAGE@/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake) + endif () diff --git a/vcpkg/ports/hdf5/portfile.cmake b/vcpkg/ports/hdf5/portfile.cmake new file mode 100644 index 0000000..0c8ee3c --- /dev/null +++ b/vcpkg/ports/hdf5/portfile.cmake @@ -0,0 +1,103 @@ +# highfive should be updated together with hdf5 + +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO HDFGroup/hdf5 + REF hdf5-1_12_0 + SHA512 d84df1ea72dc6fa038440a370e1b1ff523364474e7f214b967edc26d3191b2ef4fe1d9273c4a086a5945f1ad1ab6aa8dbcda495898e7967b2b73fd93dd5071e0 + HEAD_REF develop + PATCHES + hdf5_config.patch + szip.patch +) + +if ("parallel" IN_LIST FEATURES AND "cpp" IN_LIST FEATURES) + message(FATAL_ERROR "Feature Parallel and C++ options are mutually exclusive.") +endif() + +if ("fortran" IN_LIST FEATURE) + message(WARNING "Fortran is not yet official supported within VCPKG. Build will most likly fail if ninja 1.10 and a Fortran compiler are not available.") +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES # <- Keyword FEATURES is required because INVERTED_FEATURES are being used + parallel HDF5_ENABLE_PARALLEL + tools HDF5_BUILD_TOOLS + cpp HDF5_BUILD_CPP_LIB + szip HDF5_ENABLE_SZIP_SUPPORT + szip HDF5_ENABLE_SZIP_ENCODING + zlib HDF5_ENABLE_Z_LIB_SUPPORT + fortran HDF5_BUILD_FORTRAN +) + +file(REMOVE ${SOURCE_PATH}/config/cmake_ext_mod/FindSZIP.cmake)#Outdated; does not find debug szip + +if(FEATURES MATCHES "tools" AND VCPKG_CRT_LINKAGE STREQUAL "static") + list(APPEND FEATURE_OPTIONS -DBUILD_STATIC_EXECS=ON) +endif() + +if(NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static") + list(APPEND FEATURE_OPTIONS + -DBUILD_STATIC_LIBS=OFF + -DONLY_SHARED_LIBS=ON) +endif() + +find_library(SZIP_RELEASE NAMES libsz libszip szip sz PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(SZIP_DEBUG NAMES libsz libszip szip sz libsz_D libszip_D szip_D sz_D szip_debug PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DBUILD_TESTING=OFF + -DHDF5_BUILD_EXAMPLES=OFF + -DHDF5_INSTALL_DATA_DIR=share/hdf5/data + -DHDF5_INSTALL_CMAKE_DIR=share + -DHDF_PACKAGE_NAMESPACE:STRING=hdf5:: +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(READ "${CURRENT_PACKAGES_DIR}/share/hdf5/hdf5-config.cmake" contents) +string(REPLACE [[${HDF5_PACKAGE_NAME}_TOOLS_DIR "${PACKAGE_PREFIX_DIR}/bin"]] [[${HDF5_PACKAGE_NAME}_TOOLS_DIR "${PACKAGE_PREFIX_DIR}/tools/hdf5"]] contents ${contents}) +file(WRITE "${CURRENT_PACKAGES_DIR}/share/hdf5/hdf5-config.cmake" ${contents}) + +if(FEATURES MATCHES "tools") + set(TOOLS h5cc h5hlcc h5c++ h5hlc++ h5copy h5diff h5dump h5ls h5stat gif2h5 h52gif h5clear h5debug h5format_convert h5jam h5unjam h5ls h5mkgrp h5repack h5repart h5watch ph5diff h5import) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(TOOL_SUFFIXES "-shared${VCPKG_TARGET_EXECUTABLE_SUFFIX};${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + else() + set(TOOL_SUFFIXES "-static${VCPKG_TARGET_EXECUTABLE_SUFFIX};${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + endif() + + foreach(tool IN LISTS TOOLS) + foreach(suffix IN LISTS TOOL_SUFFIXES) + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${suffix}") + file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${suffix}") + endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/${tool}${suffix}") + file(INSTALL "${CURRENT_PACKAGES_DIR}/bin/${tool}${suffix}" + DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/${tool}${suffix}") + endif() + endforeach() + endforeach() + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/data/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) +configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake @ONLY) diff --git a/vcpkg/ports/hdf5/szip.patch b/vcpkg/ports/hdf5/szip.patch new file mode 100644 index 0000000..df06180 --- /dev/null +++ b/vcpkg/ports/hdf5/szip.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake +index 5a8956456..997bb8e81 100644 +--- a/CMakeFilters.cmake ++++ b/CMakeFilters.cmake +@@ -100,7 +100,7 @@ option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF) + if (HDF5_ENABLE_SZIP_SUPPORT) + option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF) + if (NOT SZIP_USE_EXTERNAL) +- find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared) ++ find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT}) + if (NOT SZIP_FOUND) + find_package (SZIP) # Legacy find + if (SZIP_FOUND) diff --git a/vcpkg/ports/hdf5/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/hdf5/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..695befc --- /dev/null +++ b/vcpkg/ports/hdf5/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,17 @@ + +if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.3) + cmake_policy(PUSH) + cmake_policy(SET CMP0057 NEW) + if(NOT "CONFIG" IN_LIST ARGS AND NOT "NO_MODULE" IN_LIST ARGS AND "HDF5" IN_LIST ARGS) + # The caller hasn't said "CONFIG", so they want the built-in FindHDF5.cmake behavior. Set configurations macros to ensure the built-in script finds us. + if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static") + set(HDF5_USE_STATIC_LIBRARIES ON) + add_compile_definitions(H5_BUILT_AS_STATIC_LIB) + else() + set(HDF5_USE_STATIC_LIBRARIES OFF) + add_compile_definitions(H5_BUILT_AS_DYNAMIC_LIB) + endif() + endif() + cmake_policy(POP) +endif() +_find_package(${ARGS}) diff --git a/vcpkg/ports/healpix/CONTROL b/vcpkg/ports/healpix/CONTROL new file mode 100644 index 0000000..8b1e856 --- /dev/null +++ b/vcpkg/ports/healpix/CONTROL @@ -0,0 +1,7 @@ +Source: healpix +Version: 1.12.10 +Port-Version: 6 +Homepage: http://healpix.sourceforge.net/ +Description: HEALPix is an acronym for Hierarchical Equal Area isoLatitude Pixelation of a sphere. +Build-Depends: cfitsio +Supports: linux \ No newline at end of file diff --git a/vcpkg/ports/healpix/portfile.cmake b/vcpkg/ports/healpix/portfile.cmake new file mode 100644 index 0000000..c1fa90f --- /dev/null +++ b/vcpkg/ports/healpix/portfile.cmake @@ -0,0 +1,43 @@ +set(HEALPIX_VER 3.50) +set(HEALPIX_PACK_NAME ${HEALPIX_VER}_2018Dec10) + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO healpix + REF Healpix_${HEALPIX_VER} + FILENAME "Healpix_${HEALPIX_PACK_NAME}.tar.gz" + SHA512 29fe680d757bd94651bf029654257cb67286643aad510df4c2f0b06245174411376ec1beca64feebfac14a6fc0194525170635842916d79dcaddeddd9ac6f6c7 +) + +vcpkg_configure_make( + AUTOCONFIG + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH src/cxx + COPY_SOURCE + OPTIONS + --with-libcfitsio-include=${CURRENT_INSTALLED_DIR}/include/cfitsio + --with-libcfitsio-lib=${CURRENT_INSTALLED_DIR}/lib +) + +vcpkg_build_make(BUILD_TARGET compile_all) +#vcpkg_fixup_pkgconfig() + +# Install manually because healpix has no install target +set(OBJ_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/auto") +file(GLOB_RECURSE HEALPIX_LIBS ${OBJ_DIR}/lib/*) +file(INSTALL ${HEALPIX_LIBS} DESTINATION "${CURRENT_PACKAGES_DIR}/lib") + +file(GLOB_RECURSE HEALPIX_INCLUDES ${OBJ_DIR}/include/*) +file(INSTALL ${HEALPIX_INCLUDES} DESTINATION "${CURRENT_PACKAGES_DIR}/include") + +file(GLOB_RECURSE HEALPIX_TOOLS ${OBJ_DIR}/bin/*) +file(INSTALL ${HEALPIX_TOOLS} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + +if(EXISTS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/") + set(OBJ_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/auto") + file(GLOB_RECURSE HEALPIX_LIBS ${OBJ_DIR}/lib/*) + file(INSTALL ${HEALPIX_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/hedley/CONTROL b/vcpkg/ports/hedley/CONTROL new file mode 100644 index 0000000..08b5e02 --- /dev/null +++ b/vcpkg/ports/hedley/CONTROL @@ -0,0 +1,3 @@ +Source: hedley +Version: 2019-05-08-1 +Description: A C/C++ header to help move #ifdefs out of your code diff --git a/vcpkg/ports/hedley/portfile.cmake b/vcpkg/ports/hedley/portfile.cmake new file mode 100644 index 0000000..e06e963 --- /dev/null +++ b/vcpkg/ports/hedley/portfile.cmake @@ -0,0 +1,19 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nemequ/hedley + REF 1b74d9bc892137b3f006d04ff905098b900116d0 + SHA512 8f3e4fc081fb33cc3a3d637eb09863e80fa94b5e46ecf6507aabe6a5b0648881a96c8cf2ef01b4146ecd3a14908ef87f3204960514af6c91d00c93bea18eda41 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/hedley.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(STRINGS ${SOURCE_PATH}/hedley.h SOURCE_LINES) +# Capture more lines than required to handle future license file changes +list(SUBLIST SOURCE_LINES 0 30 SOURCE_LINES) +list(JOIN SOURCE_LINES "\n" _contents) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "${_contents}") diff --git a/vcpkg/ports/hffix/CMakeLists.txt b/vcpkg/ports/hffix/CMakeLists.txt new file mode 100644 index 0000000..1f3a528 --- /dev/null +++ b/vcpkg/ports/hffix/CMakeLists.txt @@ -0,0 +1,28 @@ +cmake_minimum_required(VERSION 3.10) + +set(PROJECT_NAME hffix) +project(${PROJECT_NAME}) + +include(GNUInstallDirs) + +add_library(hffix INTERFACE) +target_include_directories(hffix INTERFACE + $ + $ +) + +install( + FILES + ${CMAKE_SOURCE_DIR}/include/hffix.hpp + ${CMAKE_SOURCE_DIR}/include/hffix_fields.hpp + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +) + +install( + TARGETS hffix + EXPORT hffix-config + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +) +install(EXPORT hffix-config DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} NAMESPACE ${PROJECT_NAME}::) \ No newline at end of file diff --git a/vcpkg/ports/hffix/CONTROL b/vcpkg/ports/hffix/CONTROL new file mode 100644 index 0000000..f5453c0 --- /dev/null +++ b/vcpkg/ports/hffix/CONTROL @@ -0,0 +1,4 @@ +Source: hffix +Version: 1.0.0 +Homepage: https://jamesdbrock.github.io/hffix +Description: Financial Information Exchange Protocol C++ Library \ No newline at end of file diff --git a/vcpkg/ports/hffix/portfile.cmake b/vcpkg/ports/hffix/portfile.cmake new file mode 100644 index 0000000..6a421d7 --- /dev/null +++ b/vcpkg/ports/hffix/portfile.cmake @@ -0,0 +1,23 @@ +# header only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jamesdbrock/hffix + REF v1.0.0 + SHA512 0043b789e6ffdc32eaf2736a8621dd7fd54e1a16aae33bb1d5f642da1b04d150ed42d8f9ddd046013242164854d9091540452153f09459d05f9bf4a186c7b860 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/hfsm2/CONTROL b/vcpkg/ports/hfsm2/CONTROL new file mode 100644 index 0000000..4677f8b --- /dev/null +++ b/vcpkg/ports/hfsm2/CONTROL @@ -0,0 +1,5 @@ +Source: hfsm2 +Version: beta7 +Homepage: https://github.com/andrew-gresyk/HFSM2 +Description: Header-only heriarchical FSM framework in C++14, with fully statically-defined structure (no dynamic allocations), built with variadic templates. +Build-Depends: catch2 diff --git a/vcpkg/ports/hfsm2/portfile.cmake b/vcpkg/ports/hfsm2/portfile.cmake new file mode 100644 index 0000000..0970d01 --- /dev/null +++ b/vcpkg/ports/hfsm2/portfile.cmake @@ -0,0 +1,15 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO andrew-gresyk/HFSM2 + REF Beta7 + SHA512 f3365c0823fa63f7e6b82bd2dc84f8871eb58ffd9485753a60ea8f956856cbec7c5da3929ab8fe8b5902a7c840334a1d421417984124adf109f96756490ac437 + HEAD_REF master +) + +# Install include directory +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/vcpkg/ports/hidapi/CONTROL b/vcpkg/ports/hidapi/CONTROL new file mode 100644 index 0000000..80f18b4 --- /dev/null +++ b/vcpkg/ports/hidapi/CONTROL @@ -0,0 +1,4 @@ +Source: hidapi +Version: 2019-08-30 +Description: A Simple library for communicating with USB and Bluetooth HID devices on Linux, Mac and Windows. +Homepage: https://github.com/libusb/hidapi diff --git a/vcpkg/ports/hidapi/hidapi-config.cmake b/vcpkg/ports/hidapi/hidapi-config.cmake new file mode 100644 index 0000000..126685a --- /dev/null +++ b/vcpkg/ports/hidapi/hidapi-config.cmake @@ -0,0 +1,48 @@ +# - try to find HIDAPI library +# from http://www.signal11.us/oss/hidapi/ +# +# Cache Variables: (probably not for direct use in your scripts) +# HIDAPI_INCLUDE_DIR +# HIDAPI_LIBRARY +# +# Non-cache variables you might use in your CMakeLists.txt: +# HIDAPI_FOUND +# HIDAPI_INCLUDE_DIRS +# HIDAPI_LIBRARIES +# +# Requires these CMake modules: +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# Original Author: +# 2009-2010 Ryan Pavlik +# http://academic.cleardefinition.com +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright Iowa State University 2009-2010. +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +# hacking FindHIDAPI.cmake as hidapi-config.cmake + +find_library(HIDAPI_LIBRARY + NAMES hidapi hidapi-libusb) + +find_path(HIDAPI_INCLUDE_DIR + NAMES hidapi.h + PATH_SUFFIXES + hidapi) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(HIDAPI + DEFAULT_MSG + HIDAPI_LIBRARY + HIDAPI_INCLUDE_DIR) + +if(HIDAPI_FOUND) + set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARY}") + + set(HIDAPI_INCLUDE_DIRS "${HIDAPI_INCLUDE_DIR}") +endif() + +mark_as_advanced(HIDAPI_INCLUDE_DIR HIDAPI_LIBRARY) diff --git a/vcpkg/ports/hidapi/portfile.cmake b/vcpkg/ports/hidapi/portfile.cmake new file mode 100644 index 0000000..9396922 --- /dev/null +++ b/vcpkg/ports/hidapi/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libusb/hidapi + REF fc677b81951d8facc99bab6b4f0060b5d89e2e15 # use commit from master for windows/hidapi.vcxproj + SHA512 8a779c1d4fe83e264046f3193a5cefe2d9765dcde30628767838180b3dec2bdd25c9c1ec9a96b3a7edaf00df7662b4d658f2b57bda67cebc7d7cb4e737cb1f88 + HEAD_REF master +) + +if(VCPKG_TARGET_IS_WINDOWS) + if(TRIPLET_SYSTEM_ARCH MATCHES "arm") + message(FATAL_ERROR "ARM builds are currently not supported!") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "UWP builds are currently not supported!") + endif() + + vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH windows/hidapi.sln + INCLUDES_SUBPATH hidapi ALLOW_ROOT_INCLUDES + LICENSE_SUBPATH LICENSE-bsd.txt # use BSD license + ) + + file(COPY + ${CMAKE_CURRENT_LIST_DIR}/hidapi-config.cmake + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() +else() + message(FATAL_ERROR "Non-Windows builds are currently not supported!") +endif() diff --git a/vcpkg/ports/highfive/CONTROL b/vcpkg/ports/highfive/CONTROL new file mode 100644 index 0000000..22fd120 --- /dev/null +++ b/vcpkg/ports/highfive/CONTROL @@ -0,0 +1,13 @@ +Source: highfive +Version: 2.2.2 +Homepage: https://github.com/BlueBrain/HighFive +Description: HighFive is a modern C++/C++11 friendly interface for libhdf5 +Build-Depends: hdf5 + +Feature: boost +Description: Enables Boost support +Build-Depends: boost-ublas, boost-multi-array + +Feature: tests +Description: Build unit tests +Build-Depends: highfive[boost], boost-test diff --git a/vcpkg/ports/highfive/portfile.cmake b/vcpkg/ports/highfive/portfile.cmake new file mode 100644 index 0000000..2d79274 --- /dev/null +++ b/vcpkg/ports/highfive/portfile.cmake @@ -0,0 +1,49 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO BlueBrain/HighFive + REF v2.2.2 + SHA512 7e562951b18425f1bfc96c30d0e47b6d218830417a732856a27943cd7ee6feab54d833b94aa303c40ca5038ac1aaf0eadd8c61800ffe82b6da46a465b21b1fc4 + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tests HIGHFIVE_UNIT_TESTS + boost HIGHFIVE_USE_BOOST +) + +if(${VCPKG_LIBRARY_LINKAGE} MATCHES "static") + set(HDF5_USE_STATIC_LIBRARIES ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DHIGHFIVE_EXAMPLES=OFF + -DHIGH_FIVE_DOCUMENTATION=OFF + -DHDF5_USE_STATIC_LIBRARIES=${HDF5_USE_STATIC_LIBRARIES} +) + +vcpkg_install_cmake() +if("tests" IN_LIST FEATURES) + vcpkg_copy_tools( + TOOL_NAMES + tests_high_five_base + tests_high_five_easy + tests_high_five_multi_dims + SEARCH_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/tests/unit" # Tools are not installed so release version tools are manually copied + ) +endif() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/HighFive/CMake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +if(NOT (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/HighFive) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/highfive RENAME copyright) diff --git a/vcpkg/ports/hiredis/CONTROL b/vcpkg/ports/hiredis/CONTROL new file mode 100644 index 0000000..b16d54e --- /dev/null +++ b/vcpkg/ports/hiredis/CONTROL @@ -0,0 +1,13 @@ +Source: hiredis +Version: 2019-11-2 +Port-Version: 2 +Homepage: https://github.com/redis/hiredis +Description: Hiredis is a minimalistic C client library for the Redis database. + +Feature: ssl +Description: Build hiredis_ssl for SSL support +Build-Depends: openssl + +Feature: example +Description: Build example +Build-Depends: libevent, pthread, libuv \ No newline at end of file diff --git a/vcpkg/ports/hiredis/fix-feature-example.patch b/vcpkg/ports/hiredis/fix-feature-example.patch new file mode 100644 index 0000000..4f36087 --- /dev/null +++ b/vcpkg/ports/hiredis/fix-feature-example.patch @@ -0,0 +1,107 @@ +diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt +index dd3a313..8c69d3a 100644 +--- a/examples/CMakeLists.txt ++++ b/examples/CMakeLists.txt +@@ -19,16 +19,30 @@ if (LIBEV) + TARGET_LINK_LIBRARIES(example-libev hiredis ev) + ENDIF() + +-FIND_PATH(LIBEVENT event.h) +-if (LIBEVENT) ++FIND_PACKAGE(Libevent CONFIG REQUIRED) ++FIND_PATH(LIBEVENT_INCLUDES evutil.h) ++if (BUILD_SHARED_LIBS) ++ set(LIBEVENT_LIBS ${LIBEVENT_SHARED_LIBRARIES}) ++else() ++ set(LIBEVENT_LIBS ${LIBEVENT_STATIC_LIBRARIES}) ++endif() ++if (UNIX) + ADD_EXECUTABLE(example-libevent example-libevent) +- TARGET_LINK_LIBRARIES(example-libevent hiredis event) ++ TARGET_LINK_LIBRARIES(example-libevent hiredis ${LIBEVENT_LIBS}) ++ TARGET_INCLUDE_DIRECTORIES(example-libevent PRIVATE ${LIBEVENT_INCLUDES}) + ENDIF() + ++FIND_LIBRARY(UV_LIBRARY libuv) + FIND_PATH(LIBUV uv.h) + IF (LIBUV) + ADD_EXECUTABLE(example-libuv example-libuv.c) +- TARGET_LINK_LIBRARIES(example-libuv hiredis uv) ++ if(WIN32) ++ set(LIB_LISTS Iphlpapi.lib Psapi.lib Userenv.lib) ++ else() ++ set(LIB_LISTS) ++ endif() ++ TARGET_LINK_LIBRARIES(example-libuv hiredis ${UV_LIBRARY} ${LIB_LISTS}) ++ TARGET_INCLUDE_DIRECTORIES(example-libuv PRIVATE ${LIBUV}) + ENDIF() + + IF (APPLE) +@@ -38,9 +52,21 @@ IF (APPLE) + ENDIF() + + IF (ENABLE_SSL) ++ FIND_PACKAGE(OpenSSL REQUIRED) ++ IF (WIN32) ++ FIND_PACKAGE(pthreads REQUIRED) ++ SET(THREADS_LIBS PThreads4W::PThreads4W) ++ ELSE() ++ FIND_PACKAGE(Threads) ++ SET(THREADS_LIBS ${CMAKE_THREAD_LIBS_INIT}) ++ ENDIF() + ADD_EXECUTABLE(example-ssl example-ssl.c) +- TARGET_LINK_LIBRARIES(example-ssl hiredis hiredis_ssl) ++ if(WIN32) ++ TARGET_LINK_LIBRARIES(example-ssl hiredis hiredis_ssl OpenSSL::SSL OpenSSL::Crypto ${THREADS_LIBS} crypt32.lib) ++ else() ++ TARGET_LINK_LIBRARIES(example-ssl hiredis hiredis_ssl OpenSSL::SSL OpenSSL::Crypto ${THREADS_LIBS}) ++ endif() + ENDIF() + + ADD_EXECUTABLE(example example.c) +-TARGET_LINK_LIBRARIES(example hiredis) ++TARGET_LINK_LIBRARIES(example hiredis ${LIBEVENT_LIBS}) +diff --git a/examples/example-libuv.c b/examples/example-libuv.c +index a5462d4..9b7ca3e 100644 +--- a/examples/example-libuv.c ++++ b/examples/example-libuv.c +@@ -33,7 +33,9 @@ void disconnectCallback(const redisAsyncContext *c, int status) { + } + + int main (int argc, char **argv) { ++#ifndef _WIN32 + signal(SIGPIPE, SIG_IGN); ++#endif + uv_loop_t* loop = uv_default_loop(); + + redisAsyncContext *c = redisAsyncConnect("127.0.0.1", 6379); +diff --git a/examples/example-ssl.c b/examples/example-ssl.c +index 81f4648..9f42923 100644 +--- a/examples/example-ssl.c ++++ b/examples/example-ssl.c +@@ -1,6 +1,10 @@ + #include + #include + #include ++#ifdef _WIN32 ++#include ++#include ++#endif + + #include + #include +diff --git a/examples/example.c b/examples/example.c +index 0e93fc8..339e322 100644 +--- a/examples/example.c ++++ b/examples/example.c +@@ -1,6 +1,10 @@ + #include + #include + #include ++#ifdef _WIN32 ++#include ++#include ++#endif + + #include + diff --git a/vcpkg/ports/hiredis/fix-pthread.h-not-found-on-windows.patch b/vcpkg/ports/hiredis/fix-pthread.h-not-found-on-windows.patch new file mode 100644 index 0000000..e927bc4 --- /dev/null +++ b/vcpkg/ports/hiredis/fix-pthread.h-not-found-on-windows.patch @@ -0,0 +1,16 @@ +diff --git a/ssl.c b/ssl.c +index 78ab9e4..768f304 100644 +--- a/ssl.c ++++ b/ssl.c +@@ -34,7 +34,11 @@ + #include "async.h" + + #include ++#ifdef _WIN32 ++#include ++#else + #include ++#endif + #include + #include + diff --git a/vcpkg/ports/hiredis/fix-timeval.patch b/vcpkg/ports/hiredis/fix-timeval.patch new file mode 100644 index 0000000..f389de5 --- /dev/null +++ b/vcpkg/ports/hiredis/fix-timeval.patch @@ -0,0 +1,16 @@ +diff --git a/async_private.h b/async_private.h +index d0133ae..7760b60 100644 +--- a/async_private.h ++++ b/async_private.h +@@ -32,6 +32,11 @@ + #ifndef __HIREDIS_ASYNC_PRIVATE_H + #define __HIREDIS_ASYNC_PRIVATE_H + ++#ifdef _WIN32 ++#include ++#include ++#endif ++ + #define _EL_ADD_READ(ctx) \ + do { \ + refreshTimeout(ctx); \ diff --git a/vcpkg/ports/hiredis/portfile.cmake b/vcpkg/ports/hiredis/portfile.cmake new file mode 100644 index 0000000..4d3a97c --- /dev/null +++ b/vcpkg/ports/hiredis/portfile.cmake @@ -0,0 +1,36 @@ +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO redis/hiredis + REF e777b0295eeeda89ee2ecef6ec5cb54889033d94 + SHA512 9486ce3e40580ca6a1da8a31c3e139eb8b5e17ac1b94bd0987f2435aeb2465ad271784d5e8e83dc6cbaf362f95c9e175efa5fbe80a63c56070ceb212d3d68470 + HEAD_REF master + PATCHES + fix-feature-example.patch + support-static-in-win.patch + fix-timeval.patch + fix-pthread.h-not-found-on-windows.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + ssl ENABLE_SSL + example ENABLE_EXAMPLES +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/hiredis/support-static-in-win.patch b/vcpkg/ports/hiredis/support-static-in-win.patch new file mode 100644 index 0000000..94e6ebe --- /dev/null +++ b/vcpkg/ports/hiredis/support-static-in-win.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9e78894..87aba5b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -22,7 +22,7 @@ PROJECT(hiredis VERSION "${VERSION}") + + SET(ENABLE_EXAMPLES OFF CACHE BOOL "Enable building hiredis examples") + +-ADD_LIBRARY(hiredis SHARED ++ADD_LIBRARY(hiredis + async.c + dict.c + hiredis.c +@@ -60,7 +60,7 @@ IF(ENABLE_SSL) + ENDIF() + ENDIF() + FIND_PACKAGE(OpenSSL REQUIRED) +- ADD_LIBRARY(hiredis_ssl SHARED ++ ADD_LIBRARY(hiredis_ssl + ssl.c) + TARGET_INCLUDE_DIRECTORIES(hiredis_ssl PRIVATE "${OPENSSL_INCLUDE_DIR}") + TARGET_LINK_LIBRARIES(hiredis_ssl PRIVATE ${OPENSSL_LIBRARIES}) diff --git a/vcpkg/ports/hpx/CONTROL b/vcpkg/ports/hpx/CONTROL new file mode 100644 index 0000000..9c39aa2 --- /dev/null +++ b/vcpkg/ports/hpx/CONTROL @@ -0,0 +1,6 @@ +Source: hpx +Version: 1.5.1 +Build-Depends: hwloc, boost-accumulators, boost-algorithm, boost-asio, boost-bimap, boost-config, boost-context, boost-dynamic-bitset, boost-exception, boost-filesystem, boost-iostreams, boost-lockfree, boost-program-options, boost-range, boost-spirit, boost-system, boost-throw-exception, boost-variant, boost-winapi +Homepage: https://github.com/STEllAR-GROUP/hpx +Description: The C++ Standards Library for Concurrency and Parallelism + HPX is a C++ Standards Library for Concurrency and Parallelism. It implements all of the corresponding facilities as defined by the C++ Standard. Additionally, in HPX we implement functionalities proposed as part of the ongoing C++ standardization process. We also extend the C++ Standard APIs to the distributed case. diff --git a/vcpkg/ports/hpx/portfile.cmake b/vcpkg/ports/hpx/portfile.cmake new file mode 100644 index 0000000..9f671b2 --- /dev/null +++ b/vcpkg/ports/hpx/portfile.cmake @@ -0,0 +1,87 @@ + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO STEllAR-GROUP/hpx + REF 1.5.1 + SHA512 ab2603adca8780808b62b55f57a03bf8491b805665831c1c484eeba8e7b306bb3269884c8940ad2fc4c5b0d679c54b1e33bc077cdb7ea6d1cb9a715ff70b9842 + HEAD_REF stable +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + "-DBOOST_ROOT=${CURRENT_INSTALLED_DIR}/share/boost" + "-DHWLOC_ROOT=${CURRENT_INSTALLED_DIR}/share/hwloc" + -DHPX_WITH_VCPKG=ON + -DHPX_WITH_TESTS=OFF + -DHPX_WITH_EXAMPLES=OFF + -DHPX_WITH_TOOLS=OFF + -DHPX_WITH_RUNTIME=OFF +) + +vcpkg_install_cmake() + +# post build cleanup +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/HPX) + +file(GLOB_RECURSE CMAKE_FILES "${CURRENT_PACKAGES_DIR}/share/hpx/*.cmake") +foreach(CMAKE_FILE IN LISTS CMAKE_FILES) + file(READ ${CMAKE_FILE} _contents) + string(REGEX REPLACE + "lib/([A-Za-z0-9_.-]+\\.dll)" + "bin/\\1" + _contents "${_contents}") + string(REGEX REPLACE + "lib/hpx/([A-Za-z0-9_.-]+\\.dll)" + "bin/hpx/\\1" + _contents "${_contents}") + file(WRITE ${CMAKE_FILE} "${_contents}") +endforeach() + +vcpkg_replace_string( + "${CURRENT_PACKAGES_DIR}/share/${PORT}/HPXMacros.cmake" + "set(CMAKE_MODULE_PATH \${CMAKE_MODULE_PATH} \"\${CMAKE_CURRENT_LIST_DIR}\")" + "list(APPEND CMAKE_MODULE_PATH \"\${CMAKE_CURRENT_LIST_DIR}\")") + +file(INSTALL + ${SOURCE_PATH}/LICENSE_1_0.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +file(GLOB DLLS ${CURRENT_PACKAGES_DIR}/lib/*.dll) +if(DLLS) + file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${DLLS}) +endif() + +file(GLOB DLLS ${CURRENT_PACKAGES_DIR}/lib/hpx/*.dll) +if(DLLS) + file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin/hpx) + file(REMOVE ${DLLS}) +endif() + +file(GLOB DLLS ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) +if(DLLS) + file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${DLLS}) +endif() + +file(GLOB DLLS ${CURRENT_PACKAGES_DIR}/debug/lib/hpx/*.dll) +if(DLLS) + file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/hpx) + file(REMOVE ${DLLS}) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/bazel) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/bazel) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/http-parser/CMakeLists.txt b/vcpkg/ports/http-parser/CMakeLists.txt new file mode 100644 index 0000000..cf3961c --- /dev/null +++ b/vcpkg/ports/http-parser/CMakeLists.txt @@ -0,0 +1,27 @@ +cmake_minimum_required(VERSION 3.4) +project(http-parser C) + +if(CMAKE_BUILD_TYPE MATCHES "Release") + add_definitions(-DHTTP_PARSER_STRICT=0) +endif() + +add_library(http_parser http_parser.c http_parser.h) + +target_include_directories(http_parser PUBLIC $) + +install( + TARGETS http_parser + EXPORT NODEJS_HTTP_PARSER_ALL_TARGETS + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin +) + +install( + EXPORT NODEJS_HTTP_PARSER_ALL_TARGETS + NAMESPACE unofficial::http_parser:: + FILE unofficial-http-parser-config.cmake + DESTINATION share/unofficial-http-parser +) + +install(FILES http_parser.h DESTINATION include) diff --git a/vcpkg/ports/http-parser/CONTROL b/vcpkg/ports/http-parser/CONTROL new file mode 100644 index 0000000..444f745 --- /dev/null +++ b/vcpkg/ports/http-parser/CONTROL @@ -0,0 +1,4 @@ +Source: http-parser +Version: 2.9.3 +Homepage: https://github.com/nodejs/http-parser +Description: HTTP Parser. diff --git a/vcpkg/ports/http-parser/portfile.cmake b/vcpkg/ports/http-parser/portfile.cmake new file mode 100644 index 0000000..f8609e0 --- /dev/null +++ b/vcpkg/ports/http-parser/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nodejs/http-parser + REF a0c034c0c7698c08f8dc8c8d0257305f6280c27b # v2.9.3 + SHA512 c1927c41bdf9985fcc39c0b23715933746219ba79f06e9f7020542d7526cbfff81f005dbd46f7b3c011740094cbf6e7a6119320ddc1818babf9eb9619d1dbb2c + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-http-parser TARGET_PATH share/unofficial-http-parser) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE-MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/http-parser) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/http-parser/LICENSE-MIT ${CURRENT_PACKAGES_DIR}/share/http-parser/copyright) diff --git a/vcpkg/ports/hungarian/CMakeLists.txt b/vcpkg/ports/hungarian/CMakeLists.txt new file mode 100644 index 0000000..dc0098c --- /dev/null +++ b/vcpkg/ports/hungarian/CMakeLists.txt @@ -0,0 +1,29 @@ +cmake_minimum_required (VERSION 3.8) +project (hungarian C) + +add_library(hungarian + ${CMAKE_CURRENT_LIST_DIR}/libhungarian/hungarian.h + ${CMAKE_CURRENT_LIST_DIR}/libhungarian/hungarian.c +) + +target_include_directories(hungarian PUBLIC + $ + $ +) + +set_target_properties(hungarian PROPERTIES PUBLIC_HEADER ${CMAKE_CURRENT_LIST_DIR}/libhungarian/hungarian.h) + +install( + TARGETS hungarian + EXPORT hungarian + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + PUBLIC_HEADER DESTINATION include +) + +install(EXPORT hungarian + DESTINATION "share/hungarian" + FILE hungarianConfig.cmake + NAMESPACE hungarian:: +) diff --git a/vcpkg/ports/hungarian/CONTROL b/vcpkg/ports/hungarian/CONTROL new file mode 100644 index 0000000..96dd5f7 --- /dev/null +++ b/vcpkg/ports/hungarian/CONTROL @@ -0,0 +1,3 @@ +Source: hungarian +Version: v0.1.3 +Description: C-implementation of the Hungarian Method: finding the optimal assignment (assigning a set of jobs to a set of machines) in O(n^3), where n=max{#jobs, #machines}. The implementation is a sligntly enhanced version of the implementation provided by the Stanford GraphBase diff --git a/vcpkg/ports/hungarian/LICENSE.txt b/vcpkg/ports/hungarian/LICENSE.txt new file mode 100644 index 0000000..9255ea6 --- /dev/null +++ b/vcpkg/ports/hungarian/LICENSE.txt @@ -0,0 +1,24 @@ +/******************************************************************** + ******************************************************************** + ** + ** libhungarian by Cyrill Stachniss, 2004 + ** + ** + ** Solving the Minimum Assignment Problem using the + ** Hungarian Method. + ** + ** ** This file may be freely copied and distributed! ** + ** + ** Parts of the used code was originally provided by the + ** "Stanford GraphGase", but I made changes to this code. + ** As asked by the copyright node of the "Stanford GraphGase", + ** I hereby proclaim that this file are *NOT* part of the + ** "Stanford GraphGase" distrubition! + ** + ** This file is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied + ** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + ** PURPOSE. + ** + ******************************************************************** + ********************************************************************/ diff --git a/vcpkg/ports/hungarian/portfile.cmake b/vcpkg/ports/hungarian/portfile.cmake new file mode 100644 index 0000000..0d55075 --- /dev/null +++ b/vcpkg/ports/hungarian/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "http://www2.informatik.uni-freiburg.de/~stachnis/misc/libhungarian-v0.1.3.tgz" + FILENAME "libhungarian-v0.1.3.tgz" + SHA512 1fa105e351c307c07bb96892c9d4c44b167d92cbed80962a8653ac35b8afe00fcf5dcc2d920b95671d6c3cd86745362a64dd8dc173623a8179006e2c7b2cbc69 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/hungarian RENAME copyright) diff --git a/vcpkg/ports/hunspell/0001_fix_unistd.patch b/vcpkg/ports/hunspell/0001_fix_unistd.patch new file mode 100644 index 0000000..79a48d8 --- /dev/null +++ b/vcpkg/ports/hunspell/0001_fix_unistd.patch @@ -0,0 +1,78 @@ +From 9f33c841afe51be517eaea318d46985c596c94ff Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka +Date: Tue, 25 Jul 2017 01:58:39 +0300 +Subject: [PATCH] tools/hzip: fix build with MSVC + +--- + src/tools/hzip.cxx | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/tools/hzip.cxx b/src/tools/hzip.cxx +index ef1864f..d284c64 100644 +--- a/src/tools/hzip.cxx ++++ b/src/tools/hzip.cxx +@@ -41,7 +41,9 @@ + #include + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif /* HAVE_UNISTD_H */ + #include + #include + +-- +2.12.2.windows.2 + +From 840f920bcd370668b9e788b3c8272eca1f20ce3a Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka +Date: Tue, 25 Jul 2017 01:55:13 +0300 +Subject: [PATCH] tools/unmunch: fix build with MSVC + +--- + src/tools/unmunch.cxx | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/tools/unmunch.cxx b/src/tools/unmunch.cxx +index 44b4cb1..2144370 100644 +--- a/src/tools/unmunch.cxx ++++ b/src/tools/unmunch.cxx +@@ -42,7 +42,9 @@ + #include + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif /* HAVE_UNISTD_H */ + #include + #include + #include +-- +2.12.2.windows.2 + +From 1c231aa84624082a0fa52d59be8c449bfe1fadd1 Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka +Date: Tue, 25 Jul 2017 01:50:21 +0300 +Subject: [PATCH] tools/munch: fix build with MSVC + +Include only if exists +--- + src/tools/munch.cxx | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/tools/munch.cxx b/src/tools/munch.cxx +index 17fc6fd..8503abe 100644 +--- a/src/tools/munch.cxx ++++ b/src/tools/munch.cxx +@@ -40,7 +40,9 @@ + #include + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif /* HAVE_UNISTD_H */ + #include + #include + #include +-- +2.12.2.windows.2 diff --git a/vcpkg/ports/hunspell/CMakeLists.txt b/vcpkg/ports/hunspell/CMakeLists.txt new file mode 100644 index 0000000..810c894 --- /dev/null +++ b/vcpkg/ports/hunspell/CMakeLists.txt @@ -0,0 +1,155 @@ +cmake_minimum_required(VERSION 3.0) +project(hunspell) + +#get hunspell version +file(STRINGS "configure.ac" CONFIGURE_AC_INIT REGEX "AC_INIT\\(\\[hunspell\\],\\[.*\\].*" ) +string(REGEX REPLACE "AC_INIT\\(\\[.*\\],\\[([0-9]+\\.[0-9]+\\.[0-9]+)\\].*" "\\1" VERSION ${CONFIGURE_AC_INIT}) +message(STATUS "Hunspell version: ${VERSION}") + +option(BUILD_SHARED_LIBS "Build shared libs" OFF) +option(ENABLE_NLS "Define if translation of program messages to the user's native language is requested" OFF) +option(HUNSPELL_WARNING_ON "Define if you need warning messages" OFF) + +if(NOT BUILD_SHARED_LIBS) + add_definitions(-DHUNSPELL_STATIC) +endif() + +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) +endif() + +include_directories("src/hunspell") +include_directories("src/parsers") + +#libhunspell +set(LIBHUNSPELL_SRCS + src/hunspell/affentry.cxx + src/hunspell/affixmgr.cxx + src/hunspell/csutil.cxx + src/hunspell/hashmgr.cxx + src/hunspell/hunspell.cxx + src/hunspell/suggestmgr.cxx + src/hunspell/phonet.cxx + src/hunspell/filemgr.cxx + src/hunspell/hunzip.cxx + src/hunspell/replist.cxx + src/hunspell/affentry.hxx + src/hunspell/htypes.hxx + src/hunspell/affixmgr.hxx + src/hunspell/csutil.hxx + src/hunspell/atypes.hxx + src/hunspell/suggestmgr.hxx + src/hunspell/baseaffix.hxx + src/hunspell/hashmgr.hxx + src/hunspell/langnum.hxx + src/hunspell/phonet.hxx + src/hunspell/filemgr.hxx + src/hunspell/hunzip.hxx + src/hunspell/replist.hxx +) + +set(LIBHUNSPELL_HDRS + src/hunspell/hunspell.hxx + src/hunspell/hunspell.h + src/hunspell/hunvisapi.h + src/hunspell/w_char.hxx + src/hunspell/atypes.hxx + src/hunspell/csutil.hxx + src/hunspell/htypes.hxx +) + +#hunspell/libhunspell +add_library(libhunspell ${LIBHUNSPELL_HDRS} ${LIBHUNSPELL_SRCS}) +target_compile_definitions(libhunspell PRIVATE -DBUILDING_LIBHUNSPELL) +install(TARGETS libhunspell + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) + +#parsers/libparsers +set(LIBPARSERS_SRCS + src/parsers/firstparser.cxx + src/parsers/xmlparser.cxx + src/parsers/latexparser.cxx + src/parsers/manparser.cxx + src/parsers/textparser.cxx + src/parsers/htmlparser.cxx + src/parsers/odfparser.cxx +) +add_library(libparsers OBJECT ${LIBPARSERS_SRCS}) + +#parsers/testparser +set(TESTPARSER_SRCS + src/parsers/firstparser.cxx + src/parsers/firstparser.hxx + src/parsers/xmlparser.cxx + src/parsers/xmlparser.hxx + src/parsers/latexparser.cxx + src/parsers/latexparser.hxx + src/parsers/manparser.cxx + src/parsers/manparser.hxx + src/parsers/testparser.cxx + src/parsers/textparser.cxx + src/parsers/textparser.hxx + src/parsers/htmlparser.cxx + src/parsers/htmlparser.hxx + src/parsers/odfparser.hxx + src/parsers/odfparser.cxx +) + +if(NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND CMAKE_BUILD_TYPE STREQUAL "Release" AND BUILD_TOOLS) + add_executable(testparser ${TESTPARSER_SRCS}) + target_link_libraries(testparser libhunspell) + + #tools/analyze + add_executable(analyze "src/tools/analyze.cxx") + target_link_libraries(analyze libhunspell) + + #tools/chmorph + add_executable(chmorph "src/tools/chmorph.cxx" $) + target_link_libraries(chmorph libhunspell) + + #tools/hunspell + include(CheckIncludeFile) + check_include_file("curses.h" HAVE_CURSES_H) + check_include_file("langinfo.h" HAVE_LANGINFO_CODESET) + check_include_file("libintl.h" HAVE_LIBINTL_H) + check_include_file("locale.h" HAVE_LOCALE_H) + check_include_file("ncursesw/curses.h" HAVE_NCURSESW_H) + check_include_file("unistd.h" HAVE_UNISTD_H) + configure_file("config.h.in" "config.h") + + add_executable(hunspell "src/tools/hunspell.cxx" $) + target_include_directories(hunspell PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") + target_link_libraries(hunspell libhunspell) + + #tools/munch + add_executable(munch "src/tools/munch.cxx") + + #tools/unmunch + add_executable(unmunch "src/tools/unmunch.cxx") + + #tools/hzip + #add_executable(hzip "src/tools/hzip.cxx") + #target_link_libraries(hzip libhunspell) + + #tools/hunzip + add_executable(hunzip "src/tools/hunzip.cxx") + target_link_libraries(hunzip libhunspell) + + install( + TARGETS + hunspell + testparser + analyze + chmorph + munch + unmunch + # hzip + hunzip + DESTINATION tools/hunspell + ) +endif() + +install(FILES ${LIBHUNSPELL_HDRS} DESTINATION "include/hunspell/") diff --git a/vcpkg/ports/hunspell/CONTROL b/vcpkg/ports/hunspell/CONTROL new file mode 100644 index 0000000..967cc32 --- /dev/null +++ b/vcpkg/ports/hunspell/CONTROL @@ -0,0 +1,7 @@ +Source: hunspell +Version: 1.7.0-1 +Homepage: https://github.com/hunspell/hunspell +Description: The most popular spellchecking library. + +Feature: tools +Description: Build hunspell tools diff --git a/vcpkg/ports/hunspell/config.h.in b/vcpkg/ports/hunspell/config.h.in new file mode 100644 index 0000000..c659d1c --- /dev/null +++ b/vcpkg/ports/hunspell/config.h.in @@ -0,0 +1,35 @@ + +/* Define to 1 if translation of program messages to the user's native language is requested. */ +#cmakedefine ENABLE_NLS 1 + +/* "Define if you have the header" */ +#cmakedefine HAVE_CURSES_H 1 + +/* Define if you have the iconv() function. */ +#cmakedefine HAVE_ICONV 1 + +/* Define if you have and nl_langinfo(CODESET). */ +#cmakedefine HAVE_LANGINFO_CODESET 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_LIBINTL_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_LOCALE_H 1 + +/* "Define if you have the header" */ +#cmakedefine HAVE_NCURSESW_H 1 + +/* "Define if you have fancy command input editing with Readline" */ +#cmakedefine HAVE_READLINE 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_UNISTD_H 1 + +/* Define if you need warning messages */ +#cmakedefine HUNSPELL_WARNING_ON 1 + +/* Define as const if the declaration of iconv() needs const. */ +#cmakedefine ICONV_CONST const + +#cmakedefine VERSION "@VERSION@" \ No newline at end of file diff --git a/vcpkg/ports/hunspell/portfile.cmake b/vcpkg/ports/hunspell/portfile.cmake new file mode 100644 index 0000000..a1acdfb --- /dev/null +++ b/vcpkg/ports/hunspell/portfile.cmake @@ -0,0 +1,36 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO hunspell/hunspell + REF v1.7.0 + SHA512 8149b2e8b703a0610c9ca5160c2dfad3cf3b85b16b3f0f5cfcb7ebb802473b2d499e8e2d0a637a97a37a24d62424e82d3880809210d3f043fa17a4970d47c903 + HEAD_REF master + PATCHES 0001_fix_unistd.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.in DESTINATION ${SOURCE_PATH}) + +if ("tools" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "Feature tools is only supported on Windows platforms.") +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tools BUILD_TOOLS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +file(INSTALL ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright-lgpl) +file(INSTALL ${SOURCE_PATH}/COPYING.MPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright-mpl) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/hwloc/CMakeLists.txt b/vcpkg/ports/hwloc/CMakeLists.txt new file mode 100644 index 0000000..9407322 --- /dev/null +++ b/vcpkg/ports/hwloc/CMakeLists.txt @@ -0,0 +1,69 @@ +cmake_minimum_required(VERSION 3.0) +project(hwloc + LANGUAGES C + VERSION 2.2.0) + +configure_file(contrib/windows/hwloc_config.h include/hwloc/autogen/config.h COPYONLY) +configure_file(contrib/windows/static-components.h include/static-components.h COPYONLY) +configure_file(contrib/windows/private_config.h include/private/autogen/config.h COPYONLY) + +file(READ ${CMAKE_CURRENT_BINARY_DIR}/include/private/autogen/config.h PRIVATE_CONFIG_H) +string(REPLACE "#define HAVE_DECL_SNPRINTF 0" "#define HAVE_DECL_SNPRINTF 1" PRIVATE_CONFIG_H "${PRIVATE_CONFIG_H}") +string(REPLACE "#define HAVE_DECL_STRTOULL 0" "#define HAVE_DECL_STRTOULL 1" PRIVATE_CONFIG_H "${PRIVATE_CONFIG_H}") +if(CMAKE_SIZEOF_VOID_P EQUAL 4) + string(REPLACE "/* #undef HWLOC_X86_32_ARCH */" "#define HWLOC_X86_32_ARCH 1" PRIVATE_CONFIG_H "${PRIVATE_CONFIG_H}") + string(REPLACE "#define HWLOC_X86_64_ARCH 1" "/* #undef HWLOC_X86_64_ARCH */" PRIVATE_CONFIG_H "${PRIVATE_CONFIG_H}") + string(REPLACE "#define SIZEOF_VOID_P 8" "#define SIZEOF_VOID_P 4" PRIVATE_CONFIG_H "${PRIVATE_CONFIG_H}") +endif() +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/include/private/autogen/config.h "${PRIVATE_CONFIG_H}") + +add_library(libhwloc + hwloc/base64.c + hwloc/bind.c + hwloc/bitmap.c + hwloc/components.c + hwloc/distances.c + hwloc/diff.c + hwloc/misc.c + hwloc/pci-common.c + hwloc/shmem.c + hwloc/topology-noos.c + hwloc/topology-synthetic.c + hwloc/topology-windows.c + hwloc/topology-x86.c + hwloc/topology-xml-nolibxml.c + hwloc/topology-xml.c + hwloc/topology.c + hwloc/traversal.c + hwloc/dolib.c) + +set_target_properties(libhwloc PROPERTIES DEFINE_SYMBOL _USRDLL) + +add_executable(hwloc-info + utils/hwloc/hwloc-info.c) + +target_link_libraries(hwloc-info PRIVATE libhwloc) + +foreach(Target IN ITEMS libhwloc hwloc-info) + target_include_directories(${Target} PRIVATE ./include ./hwloc ${CMAKE_CURRENT_BINARY_DIR}/include) + target_compile_definitions(${Target} PRIVATE _CRT_SECURE_NO_WARNINGS) +endforeach(Target) + +install(TARGETS libhwloc + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +install(TARGETS hwloc-info + RUNTIME DESTINATION tools/hwloc) +if(BUILD_SHARED_LIBS) + install(TARGETS libhwloc + RUNTIME DESTINATION tools/hwloc) +endif(BUILD_SHARED_LIBS) + + +if(NOT HWLOC_SKIP_INCLUDES) + install(FILES include/hwloc.h DESTINATION include) + install(DIRECTORY include/hwloc DESTINATION include FILES_MATCHING PATTERN "*.h") + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/include/hwloc/autogen/config.h DESTINATION include/hwloc/autogen) +endif() diff --git a/vcpkg/ports/hwloc/CONTROL b/vcpkg/ports/hwloc/CONTROL new file mode 100644 index 0000000..f2a7afc --- /dev/null +++ b/vcpkg/ports/hwloc/CONTROL @@ -0,0 +1,6 @@ +Source: hwloc +Version: 2.2.0 +Homepage: https://github.com/open-mpi/hwloc +Description: Portable Hardware Locality (hwloc) + The Portable Hardware Locality (hwloc) software package provides a portable abstraction (across OS, versions, architectures, ...) of the hierarchical topology of modern architectures, including NUMA memory nodes, sockets, shared caches, cores and simultaneous multithreading. It also gathers various system attributes such as cache and memory information as well as the locality of I/O devices such as network interfaces, InfiniBand HCAs or GPUs. +Supports: !(uwp|arm|arm64) \ No newline at end of file diff --git a/vcpkg/ports/hwloc/portfile.cmake b/vcpkg/ports/hwloc/portfile.cmake new file mode 100644 index 0000000..47036a0 --- /dev/null +++ b/vcpkg/ports/hwloc/portfile.cmake @@ -0,0 +1,54 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO open-mpi/hwloc + REF 263908a2c1f21c0e221a8d1f6472daf3a1fc07b9 # hwloc-2.2.0 + SHA512 87f3d267781fd1f8907b0c080868b56943c7c2caecae5c0fbe9a55f8c5e9453bb6b7892834ba37696c1ebadd8d7bfdd5e513ea72a075211b808a1d5803ea4b8e +) + +if (VCPKG_TARGET_IS_WINDOWS) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + ) + + vcpkg_install_cmake() + + file(READ ${CURRENT_PACKAGES_DIR}/include/hwloc/autogen/config.h PUBLIC_CONFIG_H) + string(REPLACE "defined( DECLSPEC_EXPORTS )" "0" PUBLIC_CONFIG_H "${PUBLIC_CONFIG_H}") + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined( _USRDLL )" "0" PUBLIC_CONFIG_H "${PUBLIC_CONFIG_H}") + else() + string(REPLACE "defined( _USRDLL )" "1" PUBLIC_CONFIG_H "${PUBLIC_CONFIG_H}") + endif() + file(WRITE ${CURRENT_PACKAGES_DIR}/include/hwloc/autogen/config.h "${PUBLIC_CONFIG_H}") + + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/tools) +else() + message(WARNING "${PORT} currently requires the following tool from the system package manager:\n libtool") + + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + OPTIONS + --disable-libxml2 + --disable-opencl + ) + + vcpkg_install_make() + + file(GLOB HWLOC_EXEC ${CURRENT_PACKAGES_DIR}/bin) + message("HWLOC_EXEC: ${HWLOC_EXEC}") + if (HWLOC_EXEC) + file(COPY ${HWLOC_EXEC} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/hyperscan/0001-remove-Werror.patch b/vcpkg/ports/hyperscan/0001-remove-Werror.patch new file mode 100644 index 0000000..0b3f531 --- /dev/null +++ b/vcpkg/ports/hyperscan/0001-remove-Werror.patch @@ -0,0 +1,27 @@ +From e2c0779de8096623be874c5fa0d275113b9d1204 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 14:44:36 -0700 +Subject: [PATCH] remove Werror + +--- + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 83197af..d27eb76 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -235,8 +235,8 @@ else() + if (NOT RELEASE_BUILD) + # -Werror is most useful during development, don't potentially break + # release builds +- set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Werror") +- set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -Werror") ++ #set(EXTRA_C_FLAGS "${EXTRA_C_FLAGS} -Werror") ++ #set(EXTRA_CXX_FLAGS "${EXTRA_CXX_FLAGS} -Werror") + endif() + + if (DISABLE_ASSERTS) +-- +2.24.3 (Apple Git-128) + diff --git a/vcpkg/ports/hyperscan/CONTROL b/vcpkg/ports/hyperscan/CONTROL new file mode 100644 index 0000000..a47318f --- /dev/null +++ b/vcpkg/ports/hyperscan/CONTROL @@ -0,0 +1,5 @@ +Source: hyperscan +Version: 5.2.1-1 +Homepage: https://www.hyperscan.io +Description: A regular expression library with O(length of input) match times that takes advantage of Intel hardware to provide blazing speed. +Build-Depends: boost-array, boost-chrono, boost-config, boost-core, boost-crc, boost-detail, boost-functional, boost-regex, boost-system, boost-thread, boost-type-traits, boost-unordered, boost-utility, boost-dynamic-bitset, boost-random, boost-graph, boost-multi-array, boost-icl, boost-ptr-container, pcre, python3, ragel diff --git a/vcpkg/ports/hyperscan/portfile.cmake b/vcpkg/ports/hyperscan/portfile.cmake new file mode 100644 index 0000000..a0640d2 --- /dev/null +++ b/vcpkg/ports/hyperscan/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +set(HYPERSCAN_VERSION 5.2.1) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO intel/hyperscan + REF v${HYPERSCAN_VERSION} + SHA512 e6ac2aef1f3efa1535c00d73fa590ea62fff4686c4ad3ee023d2e72c51896ca4616ec1b85d7c6f88ac7b42d92c3557b9c4bb3b51cfb796e20a79d53b28e53b6c + HEAD_REF master + PATCHES + 0001-remove-Werror.patch +) + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_PATH ${PYTHON3} DIRECTORY) +vcpkg_add_to_path(${PYTHON3_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/hypre/CONTROL b/vcpkg/ports/hypre/CONTROL new file mode 100644 index 0000000..63f36cd --- /dev/null +++ b/vcpkg/ports/hypre/CONTROL @@ -0,0 +1,5 @@ +Source: hypre +Version: 2.19.0 +Homepage: https://computation.llnl.gov/projects/hypre-scalable-linear-solvers-multigrid-methods +Description: SCALABLE LINEAR SOLVERS AND MULTIGRID METHODS +Build-Depends: mpi, openblas, lapack diff --git a/vcpkg/ports/hypre/portfile.cmake b/vcpkg/ports/hypre/portfile.cmake new file mode 100644 index 0000000..5d854d9 --- /dev/null +++ b/vcpkg/ports/hypre/portfile.cmake @@ -0,0 +1,42 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO hypre-space/hypre + REF v2.19.0 + SHA512 999979bc2e7d32aef7c084fc8508fb818e6f904db0ee3ebf6b8e8132f290201c407aaba0aa89e7bf09e7264f4e99caf04f3147458847de816fc8ffc81dbee2df + HEAD_REF master +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OPTIONS -DHYPRE_SHARED=ON) +else() + set(OPTIONS -DHYPRE_SHARED=OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/src + PREFER_NINJA + OPTIONS + ${OPTIONS} + -DHYPRE_ENABLE_HYPRE_BLAS=OFF + -DHYPRE_ENABLE_HYPRE_LAPACK=OFF + OPTIONS_RELEASE + -DHYPRE_BUILD_TYPE=Release + -DHYPRE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR} + OPTIONS_DEBUG + -DHYPRE_BUILD_TYPE=Debug + -DHYPRE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/HYPRE) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/icu/CONTROL b/vcpkg/ports/icu/CONTROL new file mode 100644 index 0000000..5cbf728 --- /dev/null +++ b/vcpkg/ports/icu/CONTROL @@ -0,0 +1,5 @@ +Source: icu +Version: 67.1-3 +Homepage: http://icu-project.org/apiref/icu4c/ +Description: Mature and widely used Unicode and localization library. +Supports: !(arm|uwp) diff --git a/vcpkg/ports/icu/disable-escapestr-tool.patch b/vcpkg/ports/icu/disable-escapestr-tool.patch new file mode 100644 index 0000000..620fcde --- /dev/null +++ b/vcpkg/ports/icu/disable-escapestr-tool.patch @@ -0,0 +1,17 @@ +diff --git a/source/tools/Makefile.in b/source/tools/Makefile.in +index c3f81d6..dc41af3 100644 +--- a/source/tools/Makefile.in ++++ b/source/tools/Makefile.in +@@ -19,9 +19,9 @@ SUBDIRS = toolutil ctestfw makeconv genrb genbrk \ + gencnval gensprep icuinfo genccode gencmn icupkg pkgdata \ + gentest gennorm2 gencfu gendict + +-ifneq (@platform_make_fragment_name@,mh-cygwin-msvc) +-SUBDIRS += escapesrc +-endif ++#ifneq (@platform_make_fragment_name@,mh-cygwin-msvc) ++#SUBDIRS += escapesrc ++#endif + + ## List of phony targets + .PHONY : all all-local all-recursive install install-local \ diff --git a/vcpkg/ports/icu/fix-extra.patch b/vcpkg/ports/icu/fix-extra.patch new file mode 100644 index 0000000..935dfd7 --- /dev/null +++ b/vcpkg/ports/icu/fix-extra.patch @@ -0,0 +1,13 @@ +diff --urN a/source/extra/Makefile.in b/source/extra/Makefile.in +--- a/source/extra/Makefile.in ++++ b/source/extra/Makefile.in +@@ -23,7 +23,7 @@ + ## Files to remove for 'make clean' + CLEANFILES = *~ + +-SUBDIRS = scrptrun uconv ++SUBDIRS = uconv + + ## List of phony targets + .PHONY : all all-local all-recursive install install-local \ + diff --git a/vcpkg/ports/icu/fix_parallel_build_on_windows.patch b/vcpkg/ports/icu/fix_parallel_build_on_windows.patch new file mode 100644 index 0000000..b3b42b4 --- /dev/null +++ b/vcpkg/ports/icu/fix_parallel_build_on_windows.patch @@ -0,0 +1,25 @@ +diff --urN a/source/data/Makefile.in b/source/data/Makefile.in +--- a/source/data/Makefile.in ++++ b/source/data/Makefile.in +@@ -221,11 +221,12 @@ + ## Include the main build rules for data files + include $(top_builddir)/$(subdir)/rules.mk + ++PKGDATA_LIST = $(TMP_DIR)/icudata.lst + + ifeq ($(ENABLE_SO_VERSION_DATA),1) + ifeq ($(PKGDATA_MODE),dll) + SO_VERSION_DATA = $(OUTTMPDIR)/icudata.res +-$(SO_VERSION_DATA) : $(MISCSRCDIR)/icudata.rc ++$(SO_VERSION_DATA) : $(MISCSRCDIR)/icudata.rc $(PKGDATA_LIST) + ifeq ($(MSYS_RC_MODE),1) + rc.exe -i$(srcdir)/../common -i$(top_builddir)/common -fo$@ $(CPPFLAGS) $< + else +@@ -234,7 +235,6 @@ + endif + endif + +-PKGDATA_LIST = $(TMP_DIR)/icudata.lst + + + ##################################################### diff --git a/vcpkg/ports/icu/portfile.cmake b/vcpkg/ports/icu/portfile.cmake new file mode 100644 index 0000000..20ca4da --- /dev/null +++ b/vcpkg/ports/icu/portfile.cmake @@ -0,0 +1,239 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") + +set(ICU_VERSION_MAJOR 67) +set(ICU_VERSION_MINOR 1) +set(VERSION "${ICU_VERSION_MAJOR}.${ICU_VERSION_MINOR}") +set(VERSION2 "${ICU_VERSION_MAJOR}_${ICU_VERSION_MINOR}") +set(VERSION3 "${ICU_VERSION_MAJOR}-${ICU_VERSION_MINOR}") + +vcpkg_download_distfile( + ARCHIVE + URLS "https://github.com/unicode-org/icu/releases/download/release-${VERSION3}/icu4c-${VERSION2}-src.tgz" + FILENAME "icu4c-${VERSION2}-src.tgz" + SHA512 4779f1ce1ca7976f6fad6768853ea8c540da54d11509e3b6cfd864a04b5f2db1c3d4b546387f91ad02fb90804525bc37d2543173f0d705d6ca11dc6f2b7640a8 +) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/disable-escapestr-tool.patch + ${CMAKE_CURRENT_LIST_DIR}/remove-MD-from-configure.patch + ${CMAKE_CURRENT_LIST_DIR}/fix_parallel_build_on_windows.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-extra.patch +) + +vcpkg_find_acquire_program(PYTHON3) +set(ENV{PYTHON} "${PYTHON3}") + +set(CONFIGURE_OPTIONS "--disable-samples --disable-tests") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --disable-static --enable-shared") +else() + set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --enable-static --disable-shared") +endif() + +set(CONFIGURE_OPTIONS_RELEASE "--disable-debug --enable-release --prefix=${CURRENT_PACKAGES_DIR}") +set(CONFIGURE_OPTIONS_DEBUG "--enable-debug --disable-release --prefix=${CURRENT_PACKAGES_DIR}/debug") +set(RELEASE_TRIPLET ${TARGET_TRIPLET}-rel) +set(DEBUG_TRIPLET ${TARGET_TRIPLET}-dbg) + +if(NOT VCPKG_TARGET_IS_WINDOWS) + set(BASH bash) + set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -fPIC") + set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -fPIC") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + # Configure release + message(STATUS "Configuring ${RELEASE_TRIPLET}") + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET}) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET}) + set(ENV{CFLAGS} "-O2 ${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_RELEASE}") + set(ENV{CXXFLAGS} "-O2 ${VCPKG_CXX_FLAGS} ${VCPKG_CXX_FLAGS_RELEASE}") + vcpkg_execute_required_process( + COMMAND ${BASH} --noprofile --norc -c + "${SOURCE_PATH}/source/runConfigureICU Linux ${CONFIGURE_OPTIONS} ${CONFIGURE_OPTIONS_RELEASE}" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET}" + LOGNAME "configure-${RELEASE_TRIPLET}") + message(STATUS "Configuring ${RELEASE_TRIPLET} done") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + # Configure debug + message(STATUS "Configuring ${DEBUG_TRIPLET}") + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${DEBUG_TRIPLET}) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${DEBUG_TRIPLET}) + set(ENV{CFLAGS} "-O0 -g ${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_DEBUG}") + set(ENV{CXXFLAGS} "-O0 -g ${VCPKG_CXX_FLAGS} ${VCPKG_CXX_FLAGS_DEBUG}") + vcpkg_execute_required_process( + COMMAND ${BASH} --noprofile --norc -c + "${SOURCE_PATH}/source/runConfigureICU Linux ${CONFIGURE_OPTIONS} ${CONFIGURE_OPTIONS_DEBUG}" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${DEBUG_TRIPLET}" + LOGNAME "configure-${DEBUG_TRIPLET}") + message(STATUS "Configuring ${DEBUG_TRIPLET} done") + endif() + +else() + + set(CONFIGURE_OPTIONS "${CONFIGURE_OPTIONS} --host=i686-pc-mingw32") + + # Acquire tools + vcpkg_acquire_msys(MSYS_ROOT PACKAGES make automake1.15) + + # Insert msys into the path between the compiler toolset and windows system32. This prevents masking of "link.exe" but DOES mask "find.exe". + string(REPLACE ";$ENV{SystemRoot}\\system32;" ";${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\system32;" NEWPATH "$ENV{PATH}") + string(REPLACE ";$ENV{SystemRoot}\\System32;" ";${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\System32;" NEWPATH "${NEWPATH}") + set(ENV{PATH} "${NEWPATH}") + set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) + + set(AUTOMAKE_DIR ${MSYS_ROOT}/usr/share/automake-1.15) + file(COPY ${AUTOMAKE_DIR}/config.guess ${AUTOMAKE_DIR}/config.sub DESTINATION ${SOURCE_PATH}/source) + + if(VCPKG_CRT_LINKAGE STREQUAL static) + set(ICU_RUNTIME "-MT") + else() + set(ICU_RUNTIME "-MD") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + # Configure release + message(STATUS "Configuring ${RELEASE_TRIPLET}") + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET}) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET}) + set(ENV{CFLAGS} "${ICU_RUNTIME} -O2 -Oi -Zi -FS ${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_RELEASE}") + set(ENV{CXXFLAGS} "${ICU_RUNTIME} -O2 -Oi -Zi -FS ${VCPKG_CXX_FLAGS} ${VCPKG_CXX_FLAGS_RELEASE}") + set(ENV{LDFLAGS} "-DEBUG -INCREMENTAL:NO -OPT:REF -OPT:ICF") + vcpkg_execute_required_process( + COMMAND ${BASH} --noprofile --norc -c + "${SOURCE_PATH}/source/runConfigureICU MSYS/MSVC ${CONFIGURE_OPTIONS} ${CONFIGURE_OPTIONS_RELEASE}" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET}" + LOGNAME "configure-${RELEASE_TRIPLET}") + message(STATUS "Configuring ${RELEASE_TRIPLET} done") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + # Configure debug + message(STATUS "Configuring ${DEBUG_TRIPLET}") + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${DEBUG_TRIPLET}) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${DEBUG_TRIPLET}) + set(ENV{CFLAGS} "${ICU_RUNTIME}d -Od -Zi -FS -RTC1 ${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_DEBUG}") + set(ENV{CXXFLAGS} "${ICU_RUNTIME}d -Od -Zi -FS -RTC1 ${VCPKG_CXX_FLAGS} ${VCPKG_CXX_FLAGS_DEBUG}") + set(ENV{LDFLAGS} "-DEBUG") + vcpkg_execute_required_process( + COMMAND ${BASH} --noprofile --norc -c + "${SOURCE_PATH}/source/runConfigureICU MSYS/MSVC ${CONFIGURE_OPTIONS} ${CONFIGURE_OPTIONS_DEBUG}" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${DEBUG_TRIPLET}" + LOGNAME "configure-${DEBUG_TRIPLET}") + message(STATUS "Configuring ${DEBUG_TRIPLET} done") + endif() +endif() + +unset(ENV{CFLAGS}) +unset(ENV{CXXFLAGS}) +unset(ENV{LDFLAGS}) + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + # Build release + message(STATUS "Package ${RELEASE_TRIPLET}") + vcpkg_execute_build_process( + COMMAND ${BASH} --noprofile --norc -c "make -j ${VCPKG_CONCURRENCY}" + NO_PARALLEL_COMMAND ${BASH} --noprofile --norc -c "make" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET}" + LOGNAME "make-build-${RELEASE_TRIPLET}") + + vcpkg_execute_build_process( + COMMAND ${BASH} --noprofile --norc -c "make install" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET}" + LOGNAME "make-install-${RELEASE_TRIPLET}") + message(STATUS "Package ${RELEASE_TRIPLET} done") +endif() + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + # Build debug + message(STATUS "Package ${DEBUG_TRIPLET}") + vcpkg_execute_build_process( + COMMAND ${BASH} --noprofile --norc -c "make -j ${VCPKG_CONCURRENCY}" + NO_PARALLEL_COMMAND ${BASH} --noprofile --norc -c "make" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${DEBUG_TRIPLET}" + LOGNAME "make-build-${DEBUG_TRIPLET}") + + vcpkg_execute_build_process( + COMMAND ${BASH} --noprofile --norc -c "make install" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${DEBUG_TRIPLET}" + LOGNAME "make-install-${DEBUG_TRIPLET}") + message(STATUS "Package ${DEBUG_TRIPLET} done") +endif() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/bin + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/share + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/lib/icu + ${CURRENT_PACKAGES_DIR}/debug/lib/icud) + +file(GLOB TEST_LIBS + ${CURRENT_PACKAGES_DIR}/lib/*test* + ${CURRENT_PACKAGES_DIR}/debug/lib/*test*) +file(REMOVE ${TEST_LIBS}) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + # copy icu dlls from lib to bin + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(GLOB RELEASE_DLLS ${CURRENT_PACKAGES_DIR}/lib/icu*${ICU_VERSION_MAJOR}.dll) + file(COPY ${RELEASE_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(GLOB DEBUG_DLLS ${CURRENT_PACKAGES_DIR}/debug/lib/icu*d${ICU_VERSION_MAJOR}.dll) + file(COPY ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() +else() + if(VCPKG_TARGET_IS_WINDOWS) + # rename static libraries to match import libs + # see https://gitlab.kitware.com/cmake/cmake/issues/16617 + foreach(MODULE dt in io tu uc) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/sicu${MODULE}.lib ${CURRENT_PACKAGES_DIR}/lib/icu${MODULE}.lib) + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/sicu${MODULE}d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/icu${MODULE}d.lib) + endif() + endforeach() + + file(GLOB_RECURSE pkg_files LIST_DIRECTORIES false ${CURRENT_PACKAGES_DIR}/*.pc) + message(STATUS "${pkg_files}") + foreach(pkg_file IN LISTS pkg_files) + message(STATUS "${pkg_file}") + file(READ ${pkg_file} PKG_FILE) + string(REGEX REPLACE "-ls([^ \\t\\n]+)" "-l\\1" PKG_FILE "${PKG_FILE}" ) + file(WRITE ${pkg_file} "${PKG_FILE}") + endforeach() + endif() + + # force U_STATIC_IMPLEMENTATION macro + foreach(HEADER utypes.h utf_old.h platform.h) + file(READ ${CURRENT_PACKAGES_DIR}/include/unicode/${HEADER} HEADER_CONTENTS) + string(REPLACE "defined(U_STATIC_IMPLEMENTATION)" "1" HEADER_CONTENTS "${HEADER_CONTENTS}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/unicode/${HEADER} "${HEADER_CONTENTS}") + endforeach() +endif() + +# Install executables from ${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET}/bin to /tools/icu +file(GLOB ICU_TOOLS ${CURRENT_BUILDTREES_DIR}/${RELEASE_TRIPLET}/bin/*${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(INSTALL ${ICU_TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +# remove any remaining dlls in /lib +file(GLOB DUMMY_DLLS ${CURRENT_PACKAGES_DIR}/lib/*.dll ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) +if(DUMMY_DLLS) + file(REMOVE ${DUMMY_DLLS}) +endif() + +# Generates warnings about missing pdbs for icudt.dll +# This is expected because ICU database contains no executable code +vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES pthread m) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/icu/remove-MD-from-configure.patch b/vcpkg/ports/icu/remove-MD-from-configure.patch new file mode 100644 index 0000000..fe4782b --- /dev/null +++ b/vcpkg/ports/icu/remove-MD-from-configure.patch @@ -0,0 +1,18 @@ +diff -urN a/source/runConfigureICU b/source/runConfigureICU +--- a/source/runConfigureICU 2018-03-26 21:38:44.000000000 +0800 ++++ b/source/runConfigureICU 2018-08-26 09:04:53.197454400 +0800 +@@ -322,10 +322,10 @@ + THE_COMP="Microsoft Visual C++" + CC=cl; export CC + CXX=cl; export CXX +- RELEASE_CFLAGS='-Gy -MD' +- RELEASE_CXXFLAGS='-Gy -MD' +- DEBUG_CFLAGS='-FS -Zi -MDd' +- DEBUG_CXXFLAGS='-FS -Zi -MDd' ++ RELEASE_CFLAGS='-Gy' ++ RELEASE_CXXFLAGS='-Gy' ++ DEBUG_CFLAGS='-FS -Zi' ++ DEBUG_CXXFLAGS='-FS -Zi' + DEBUG_LDFLAGS='-DEBUG' + ;; + *BSD) diff --git a/vcpkg/ports/ideviceinstaller/CONTROL b/vcpkg/ports/ideviceinstaller/CONTROL new file mode 100644 index 0000000..3697611 --- /dev/null +++ b/vcpkg/ports/ideviceinstaller/CONTROL @@ -0,0 +1,4 @@ +Source: ideviceinstaller +Version: 1.1.2.23-1 +Description: Manage apps of iOS devices +Build-Depends: libimobiledevice, libzip \ No newline at end of file diff --git a/vcpkg/ports/ideviceinstaller/portfile.cmake b/vcpkg/ports/ideviceinstaller/portfile.cmake new file mode 100644 index 0000000..c5523e6 --- /dev/null +++ b/vcpkg/ports/ideviceinstaller/portfile.cmake @@ -0,0 +1,18 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libimobiledevice-win32/ideviceinstaller + REF 1.1.2.23 + SHA512 d0801b3a38eb02206a6f06e05cc19b794c69a87c06895165f64522c61e07030046499c5f0e436981682f9e17f91eae87913cca091e2e039a74ee35a5136100d4 + HEAD_REF msvc-master +) + +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH ideviceinstaller.vcxproj + LICENSE_SUBPATH COPYING + USE_VCPKG_INTEGRATION +) + +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/vcpkg/ports/idevicerestore/CONTROL b/vcpkg/ports/idevicerestore/CONTROL new file mode 100644 index 0000000..a8db4e2 --- /dev/null +++ b/vcpkg/ports/idevicerestore/CONTROL @@ -0,0 +1,5 @@ +Source: idevicerestore +Version: 1.0.12-4 +Description: Restore/upgrade firmware of iOS devices +Build-Depends: libimobiledevice, curl, libirecovery, libzip +Supports: windows diff --git a/vcpkg/ports/idevicerestore/fix-libgen.h-cannot-be-found.patch b/vcpkg/ports/idevicerestore/fix-libgen.h-cannot-be-found.patch new file mode 100644 index 0000000..db7450e --- /dev/null +++ b/vcpkg/ports/idevicerestore/fix-libgen.h-cannot-be-found.patch @@ -0,0 +1,32 @@ +diff --git a/src/common.c b/src/common.c +index afe1bc0..9219a8f 100644 +--- a/src/common.c ++++ b/src/common.c +@@ -29,7 +29,9 @@ + #include + #include + #include ++#ifndef _MSC_VER + #include ++#endif + #include + + #include "common.h" +diff --git a/src/idevicerestore.c b/src/idevicerestore.c +index efa13c3..c17a2ba 100644 +--- a/src/idevicerestore.c ++++ b/src/idevicerestore.c +@@ -38,12 +38,12 @@ + #include + #ifndef _MSC_VER + #include ++#include + #endif + #include + #include + #include + #include +-#include + + #include + diff --git a/vcpkg/ports/idevicerestore/libcurl_d.patch b/vcpkg/ports/idevicerestore/libcurl_d.patch new file mode 100644 index 0000000..1d9d3f3 --- /dev/null +++ b/vcpkg/ports/idevicerestore/libcurl_d.patch @@ -0,0 +1,23 @@ +diff --git a/idevicerestore.vcxproj b/idevicerestore.vcxproj +index fa209fae..cf89306b 100644 +--- a/idevicerestore.vcxproj ++++ b/idevicerestore.vcxproj +@@ -94,7 +94,7 @@ + _MBCS;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;WIN32;_WINSOCK_DEPRECATED_NO_WARNINGS + + +- kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Ws2_32.lib;libcurl.lib;%(AdditionalDependencies) ++ kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Ws2_32.lib;libcurl-d.lib;%(AdditionalDependencies) + + + +@@ -105,7 +105,7 @@ + _MBCS;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;WIN32;_WINSOCK_DEPRECATED_NO_WARNINGS + + +- kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Ws2_32.lib;libcurl.lib;%(AdditionalDependencies) ++ kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Ws2_32.lib;libcurl-d.lib;%(AdditionalDependencies) + + + + diff --git a/vcpkg/ports/idevicerestore/portfile.cmake b/vcpkg/ports/idevicerestore/portfile.cmake new file mode 100644 index 0000000..5cd1ace --- /dev/null +++ b/vcpkg/ports/idevicerestore/portfile.cmake @@ -0,0 +1,21 @@ +vcpkg_fail_port_install(ON_TARGET "linux" "osx") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libimobiledevice-win32/idevicerestore + REF 1.0.12 + SHA512 ba623be56c2f37853516d7d4c32e16f1ec72f33d512f18aa812ce6830af4b9e389f7af5321888dd0ddd168e282b652e379b60f90970680e213eabf489f406915 + HEAD_REF msvc-master + PATCHES + libcurl_d.patch + fix-libgen.h-cannot-be-found.patch +) + +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH idevicerestore.vcxproj + LICENSE_SUBPATH COPYING + USE_VCPKG_INTEGRATION +) + +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/vcpkg/ports/if97/CONTROL b/vcpkg/ports/if97/CONTROL new file mode 100644 index 0000000..787bc11 --- /dev/null +++ b/vcpkg/ports/if97/CONTROL @@ -0,0 +1,4 @@ +Source: if97 +Version: 2.1.2 +Homepage: https://github.com/CoolProp/IF97 +Description: This repository implements the IF97 formulation for the properties of pure water substance. diff --git a/vcpkg/ports/if97/portfile.cmake b/vcpkg/ports/if97/portfile.cmake new file mode 100644 index 0000000..c07d11e --- /dev/null +++ b/vcpkg/ports/if97/portfile.cmake @@ -0,0 +1,18 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO CoolProp/IF97 + REF v2.1.2 + SHA512 a7625fcc1ca0763df5b4cf5be741babbaefc09022940b4fc5ee1c05121751282c18ebd87ae58e1eee9bdb46dab5ae6fb4ed9a31fc2c53dc6de5cbd243fa4c8e9 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/IF97.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +file( + INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/if97 + RENAME copyright +) diff --git a/vcpkg/ports/igloo/CONTROL b/vcpkg/ports/igloo/CONTROL new file mode 100644 index 0000000..ffa1626 --- /dev/null +++ b/vcpkg/ports/igloo/CONTROL @@ -0,0 +1,3 @@ +Source: igloo +Version: 1.1.1 +Description: A framework for unit testing in C++ diff --git a/vcpkg/ports/igloo/portfile.cmake b/vcpkg/ports/igloo/portfile.cmake new file mode 100644 index 0000000..a1ab175 --- /dev/null +++ b/vcpkg/ports/igloo/portfile.cmake @@ -0,0 +1,16 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO joakimkarlsson/igloo + REF igloo.1.1.1 + SHA512 69d8edb840aa1e2c1df4529a39b94e2d33dbc9fb5869ae91a0f062d29b7fbb73d4e2180080e7696cb69fbf5126c7c53c98dddb003e0e5e796812330e1a4ba32e + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/igloo DESTINATION ${CURRENT_PACKAGES_DIR}/include/ FILES_MATCHING PATTERN *.h) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/igloo/external/snowhouse) +file(WRITE "${CURRENT_PACKAGES_DIR}/include/igloo/external/snowhouse/snowhouse/snowhouse.h" "#include ") + +file(COPY ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/igloo) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/igloo/LICENSE_1_0.txt ${CURRENT_PACKAGES_DIR}/share/igloo/copyright) \ No newline at end of file diff --git a/vcpkg/ports/ignition-cmake0/CONTROL b/vcpkg/ports/ignition-cmake0/CONTROL new file mode 100644 index 0000000..9366831 --- /dev/null +++ b/vcpkg/ports/ignition-cmake0/CONTROL @@ -0,0 +1,7 @@ +Source: ignition-cmake0 +Version: 0.6.2-2 +Homepage: https://ignitionrobotics.org/libs/cmake +Description: CMake helper functions for building robotic applications +Build-Depends: ignition-modularscripts + + diff --git a/vcpkg/ports/ignition-cmake0/do-not-compile-gtest.patch b/vcpkg/ports/ignition-cmake0/do-not-compile-gtest.patch new file mode 100644 index 0000000..7c20a0d --- /dev/null +++ b/vcpkg/ports/ignition-cmake0/do-not-compile-gtest.patch @@ -0,0 +1,14 @@ +diff --git a/cmake/IgnConfigureBuild.cmake b/cmake/IgnConfigureBuild.cmake +--- a/cmake/IgnConfigureBuild.cmake ++++ b/cmake/IgnConfigureBuild.cmake +@@ -109,7 +109,9 @@ + # Add all the source code directories + add_subdirectory(src) + add_subdirectory(include) +- add_subdirectory(test) ++ if(BUILD_TESTING) ++ add_subdirectory(test) ++ endif() + + + #-------------------------------------- diff --git a/vcpkg/ports/ignition-cmake0/fix-find-ign-curl.patch b/vcpkg/ports/ignition-cmake0/fix-find-ign-curl.patch new file mode 100644 index 0000000..9189712 --- /dev/null +++ b/vcpkg/ports/ignition-cmake0/fix-find-ign-curl.patch @@ -0,0 +1,16 @@ +diff -r 3276aecbcbb4 -r 33b5d95affd2 cmake/FindIgnCURL.cmake +--- a/cmake/FindIgnCURL.cmake ++++ b/cmake/FindIgnCURL.cmake +@@ -46,6 +46,12 @@ + + # Older versions of curl don't create imported targets, so we will create + # them here if they have not been provided. ++ if(TARGET CURL::libcurl AND NOT TARGET curl::curl) ++ add_library(curl::curl INTERFACE IMPORTED) ++ set_target_properties(curl::curl PROPERTIES ++ INTERFACE_LINK_LIBRARIES CURL::libcurl) ++ endif() ++ + include(IgnImportTarget) + + if(NOT TARGET curl::curl) diff --git a/vcpkg/ports/ignition-cmake0/portfile.cmake b/vcpkg/ports/ignition-cmake0/portfile.cmake new file mode 100644 index 0000000..795436f --- /dev/null +++ b/vcpkg/ports/ignition-cmake0/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake) + +set(PACKAGE_VERSION "0.6.1") + +ignition_modular_library(NAME cmake + VERSION ${PACKAGE_VERSION} + REF "ignition-cmake_${PACKAGE_VERSION}" + SHA512 bd57cd43dd944fef264353b67fbbbab989d4bb638b684f80868a8b61fe0b854e156e00852b967c7caa8598315bea60bd8b27ff000410e93c4f04185a13c90489 + # Ensure that gtest is not compiled (backport of https://bitbucket.org/ignitionrobotics/ign-cmake/pull-requests/163) + PATCHES do-not-compile-gtest.patch + # Support for ARM64 (backport of https://bitbucket.org/ignitionrobotics/ign-cmake/pull-requests/168) + support-arm64.patch + # Do not depend on pkg-config installed to find uuid + uuid-do-not-require-pkg-config.patch + # Fix FindIgnCURL.cmake (backport of https://bitbucket.org/ignitionrobotics/ign-cmake/pull-requests/175) + fix-find-ign-curl.patch + ) + +# Permit empty include folder +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) + +# Remove unneccessary directory, as ignition-cmake is a pure CMake package +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug) + +# Install custom usage +configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY) diff --git a/vcpkg/ports/ignition-cmake0/support-arm64.patch b/vcpkg/ports/ignition-cmake0/support-arm64.patch new file mode 100644 index 0000000..aba99ba --- /dev/null +++ b/vcpkg/ports/ignition-cmake0/support-arm64.patch @@ -0,0 +1,17 @@ +diff -r 8a976a308d77 -r 1bea7874cfec cmake/IgnSetCompilerFlags.cmake +--- a/cmake/IgnSetCompilerFlags.cmake ++++ b/cmake/IgnSetCompilerFlags.cmake +@@ -279,13 +279,6 @@ + # Don't pull in the Windows min/max macros + add_definitions(-DNOMINMAX) + +- if (MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 8) +- # Not needed if a proper cmake generator (-G "...Win64") is passed +- # to cmake. Enable as a second measure to work around bug +- # http://www.cmake.org/Bug/print_bug_page.php?bug_id=11240 +- set(CMAKE_SHARED_LINKER_FLAGS "/machine:x64") +- endif() +- + if(USE_IGN_RECOMMENDED_FLAGS) + + # Gy: Prevent errors caused by multiply-defined symbols diff --git a/vcpkg/ports/ignition-cmake0/usage b/vcpkg/ports/ignition-cmake0/usage new file mode 100644 index 0000000..66da981 --- /dev/null +++ b/vcpkg/ports/ignition-cmake0/usage @@ -0,0 +1,3 @@ +The package ignition-cmake0 provides CMake integration: + + find_package(ignition-cmake0 CONFIG REQUIRED) diff --git a/vcpkg/ports/ignition-cmake0/uuid-do-not-require-pkg-config.patch b/vcpkg/ports/ignition-cmake0/uuid-do-not-require-pkg-config.patch new file mode 100644 index 0000000..6953391 --- /dev/null +++ b/vcpkg/ports/ignition-cmake0/uuid-do-not-require-pkg-config.patch @@ -0,0 +1,30 @@ +diff --git a/cmake/FindUUID.cmake b/cmake/FindUUID.cmake +index bf055d4..15be822 100644 +--- a/cmake/FindUUID.cmake ++++ b/cmake/FindUUID.cmake +@@ -18,4 +18,25 @@ + if (UNIX) + include(IgnPkgConfig) + ign_pkg_check_modules(UUID uuid) ++ ++ # If pkg-config is not available in the system, ++ # it is neccessary to manually find uuid ++ if(NOT TARGET UUID::UUID) ++ find_path(UUID_INCLUDE_DIRS NAMES uuid.h PATH_SUFFIXES uuid) ++ mark_as_advanced(UUID_INCLUDE_DIRS) ++ ++ find_library(UUID_LIBRARIES NAMES uuid libuuid) ++ mark_as_advanced(UUID_LIBRARIES) ++ ++ if(NOT UUID_INCLUDE_DIRS OR NOT UUID_LIBRARIES) ++ set(UUID_FOUND false) ++ else() ++ set(UUID_FOUND true) ++ endif() ++ ++ if(UUID_FOUND) ++ include(IgnImportTarget) ++ ign_import_target(UUID) ++ endif() ++ endif() + endif() diff --git a/vcpkg/ports/ignition-cmake2/CONTROL b/vcpkg/ports/ignition-cmake2/CONTROL new file mode 100644 index 0000000..8a0ee54 --- /dev/null +++ b/vcpkg/ports/ignition-cmake2/CONTROL @@ -0,0 +1,5 @@ +Source: ignition-cmake2 +Version: 2.2.0-1 +Homepage: https://ignitionrobotics.org/libs/cmake +Description: CMake helper functions for building robotic applications +Build-Depends: ignition-modularscripts diff --git a/vcpkg/ports/ignition-cmake2/portfile.cmake b/vcpkg/ports/ignition-cmake2/portfile.cmake new file mode 100644 index 0000000..a9c895a --- /dev/null +++ b/vcpkg/ports/ignition-cmake2/portfile.cmake @@ -0,0 +1,10 @@ +include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake) + +set(PACKAGE_VERSION "2.2.0") + +ignition_modular_library(NAME cmake + VERSION ${PACKAGE_VERSION} + SHA512 079b6d0cc5e2de83cf01f5731dd4e2e55e18e46c7506b6267a19a230fbbaa7b89053be4b42ca21584cf7fdd64de1d6305c7bc16fa3e0c5751b098fd0e5b98149) + +# Install custom usage +configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY) diff --git a/vcpkg/ports/ignition-cmake2/usage b/vcpkg/ports/ignition-cmake2/usage new file mode 100644 index 0000000..b62ba0c --- /dev/null +++ b/vcpkg/ports/ignition-cmake2/usage @@ -0,0 +1,3 @@ +The package ignition-cmake2 provides CMake integration: + + find_package(ignition-cmake2 CONFIG REQUIRED) diff --git a/vcpkg/ports/ignition-common1/CONTROL b/vcpkg/ports/ignition-common1/CONTROL new file mode 100644 index 0000000..810904d --- /dev/null +++ b/vcpkg/ports/ignition-common1/CONTROL @@ -0,0 +1,4 @@ +Source: ignition-common1 +Version: 1.1.1-1 +Build-Depends: dlfcn-win32 (windows|uwp), ffmpeg (!windows&!uwp), freeimage (!windows&!uwp), gts (!windows&!uwp), ignition-cmake0, ignition-math4, tinyxml2 (!windows&!uwp) +Description: Common libraries for robotics applications diff --git a/vcpkg/ports/ignition-common1/portfile.cmake b/vcpkg/ports/ignition-common1/portfile.cmake new file mode 100644 index 0000000..28f40c4 --- /dev/null +++ b/vcpkg/ports/ignition-common1/portfile.cmake @@ -0,0 +1,8 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake) + +ignition_modular_library(NAME common + VERSION "1.1.1" + REF ignition-common_1.1.1 + SHA512 e96e82dc401281cd31843f4b0ae2c1d23589170869621ea62eb6d6b31b11bd622c14da7046b1993c8fc67a1d39bae9a96b9f8efc8923e305823f963d864975f7) diff --git a/vcpkg/ports/ignition-fuel-tools1/CONTROL b/vcpkg/ports/ignition-fuel-tools1/CONTROL new file mode 100644 index 0000000..acabd13 --- /dev/null +++ b/vcpkg/ports/ignition-fuel-tools1/CONTROL @@ -0,0 +1,4 @@ +Source: ignition-fuel-tools1 +Version: 1.2.0-2 +Build-Depends: curl, ignition-cmake0, ignition-common1, libyaml, libzip, jsoncpp +Description: Tools for using fuel API to download robot models diff --git a/vcpkg/ports/ignition-fuel-tools1/link-correct-yaml-target.patch b/vcpkg/ports/ignition-fuel-tools1/link-correct-yaml-target.patch new file mode 100644 index 0000000..0ceab34 --- /dev/null +++ b/vcpkg/ports/ignition-fuel-tools1/link-correct-yaml-target.patch @@ -0,0 +1,24 @@ +diff -r 29939b8a25be -r 8a0a85e63950 CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,7 +9,7 @@ + # Find ignition-cmake + #============================================================================ + # If you get an error at this line, you need to install ignition-cmake +-find_package(ignition-cmake0 REQUIRED) ++find_package(ignition-cmake0 0.4.1 REQUIRED) + + #============================================================================ + # Configure the project +diff -r 29939b8a25be -r 8a0a85e63950 src/CMakeLists.txt +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -52,7 +52,7 @@ + curl::curl + ignition-common${IGN_COMMON_MAJOR_VER}::ignition-common${IGN_COMMON_MAJOR_VER} + ${JSONCPP_TARGET} +- YAML::YAML ++ ${YAML_TARGET} + ZIP::ZIP + ) + diff --git a/vcpkg/ports/ignition-fuel-tools1/portfile.cmake b/vcpkg/ports/ignition-fuel-tools1/portfile.cmake new file mode 100644 index 0000000..c7c3102 --- /dev/null +++ b/vcpkg/ports/ignition-fuel-tools1/portfile.cmake @@ -0,0 +1,11 @@ +include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake) + +ignition_modular_library(NAME fuel-tools + VERSION "1.2.0" + CMAKE_PACKAGE_NAME ignition-fuel_tools1 + SHA512 a656fed74fb2138b3bcf7d35b25ad06da95cfb9a3ad7ded2c9c54db385f55ea310fd1a72dcf6400b0a6199e376c1ba2d11ee2a08c66e3c2cc8b2ee1b25406986 + # Ensure yaml is correctly linked (backport of https://bitbucket.org/ignitionrobotics/ign-fuel-tools/pull-requests/103/use-yaml_target-instead-of-yaml-yaml/diff) + PATCHES link-correct-yaml-target.patch + # This can be removed when the pc file of curl is fixed + DISABLE_PKGCONFIG_INSTALL + ) diff --git a/vcpkg/ports/ignition-math4/CONTROL b/vcpkg/ports/ignition-math4/CONTROL new file mode 100644 index 0000000..f9e87fe --- /dev/null +++ b/vcpkg/ports/ignition-math4/CONTROL @@ -0,0 +1,5 @@ +Source: ignition-math4 +Version: 4.0.0-1 +Homepage: https://ignitionrobotics.org/libs/math +Build-Depends: ignition-cmake0 +Description: Math API for robotic applications diff --git a/vcpkg/ports/ignition-math4/portfile.cmake b/vcpkg/ports/ignition-math4/portfile.cmake new file mode 100644 index 0000000..69a50ab --- /dev/null +++ b/vcpkg/ports/ignition-math4/portfile.cmake @@ -0,0 +1,7 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake) + +ignition_modular_library(NAME math + VERSION "4.0.0" + SHA512 5996af60666a1166fc19b2db9715f7214341becb8eb6071c09315e1f71e759c6de4da99b44312829fc7b2bdef7e0f3671e4d2a92e0d2dd5d5fd782a6c46b012a) diff --git a/vcpkg/ports/ignition-math6/CONTROL b/vcpkg/ports/ignition-math6/CONTROL new file mode 100644 index 0000000..69d53ee --- /dev/null +++ b/vcpkg/ports/ignition-math6/CONTROL @@ -0,0 +1,5 @@ +Source: ignition-math6 +Version: 6.4.0 +Homepage: https://ignitionrobotics.org/libs/math +Build-Depends: eigen3, ignition-cmake2, ignition-modularscripts +Description: Math API for robotic applications diff --git a/vcpkg/ports/ignition-math6/portfile.cmake b/vcpkg/ports/ignition-math6/portfile.cmake new file mode 100644 index 0000000..ffb0062 --- /dev/null +++ b/vcpkg/ports/ignition-math6/portfile.cmake @@ -0,0 +1,5 @@ +include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake) + +ignition_modular_library(NAME math + VERSION "6.4.0" + SHA512 8a6e672ef6de591d25200f288deaaa16cc43e3c90804ee5ead0f06345036afbfa40acb531eb5b6a1fa80bd34c0c5964662cc0659d8bed2c811ad7c776d6f77cb) diff --git a/vcpkg/ports/ignition-modularscripts/CONTROL b/vcpkg/ports/ignition-modularscripts/CONTROL new file mode 100644 index 0000000..e52ae90 --- /dev/null +++ b/vcpkg/ports/ignition-modularscripts/CONTROL @@ -0,0 +1,4 @@ +Source: ignition-modularscripts +Version: 2020-05-16 +Port-Version: 1 +Description: Vcpkg helpers to package ignition libraries diff --git a/vcpkg/ports/ignition-modularscripts/ignition_modular_library.cmake b/vcpkg/ports/ignition-modularscripts/ignition_modular_library.cmake new file mode 100644 index 0000000..b294c09 --- /dev/null +++ b/vcpkg/ports/ignition-modularscripts/ignition_modular_library.cmake @@ -0,0 +1,147 @@ + +function(ignition_modular_build_library NAME MAJOR_VERSION SOURCE_PATH CMAKE_PACKAGE_NAME DEFAULT_CMAKE_PACKAGE_NAME IML_DISABLE_PKGCONFIG_INSTALL) + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBUILD_TESTING=OFF + ) + + vcpkg_install_cmake() + + # If necessary, move the CMake config files + if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/cmake") + # Some ignition libraries install library subcomponents, that are effectively additional cmake packages + # with name ${CMAKE_PACKAGE_NAME}-${COMPONENT_NAME}, so it is needed to call vcpkg_fixup_cmake_targets for them as well + file(GLOB COMPONENTS_CMAKE_PACKAGE_NAMES + LIST_DIRECTORIES TRUE + RELATIVE "${CURRENT_PACKAGES_DIR}/lib/cmake/" + "${CURRENT_PACKAGES_DIR}/lib/cmake/*") + + foreach(COMPONENT_CMAKE_PACKAGE_NAME IN LISTS COMPONENTS_CMAKE_PACKAGE_NAMES) + vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/${COMPONENT_CMAKE_PACKAGE_NAME}" + TARGET_PATH "share/${COMPONENT_CMAKE_PACKAGE_NAME}" + DO_NOT_DELETE_PARENT_CONFIG_PATH) + endforeach() + + file(GLOB_RECURSE CMAKE_RELEASE_FILES + "${CURRENT_PACKAGES_DIR}/lib/cmake/${CMAKE_PACKAGE_NAME}/*") + + file(COPY ${CMAKE_RELEASE_FILES} DESTINATION + "${CURRENT_PACKAGES_DIR}/share/${CMAKE_PACKAGE_NAME}/") + endif() + + # Remove unused files files + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/lib/cmake + ${CURRENT_PACKAGES_DIR}/debug/share) + + # Make pkg-config files relocatable + if(NOT IML_DISABLE_PKGCONFIG_INSTALL) + if(VCPKG_TARGET_IS_LINUX) + set(SYSTEM_LIBRARIES SYSTEM_LIBRARIES pthread) + endif() + vcpkg_fixup_pkgconfig(${SYSTEM_LIBRARIES}) + else() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig + ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) + endif() + + # Find the relevant license file and install it + if(EXISTS "${SOURCE_PATH}/LICENSE") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE") + elseif(EXISTS "${SOURCE_PATH}/README.md") + set(LICENSE_PATH "${SOURCE_PATH}/README.md") + endif() + file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +endfunction() + +## # ignition_modular_library +## +## Download and build a library from the Ignition Robotics project ( https://ignitionrobotics.org/ ). +## +## ## Usage: +## ```cmake +## ignition_modular_library(NAME +## VERSION +## SHA512 +## [REF ] +## [HEAD_REF ] +## [PATCHES ] +## [CMAKE_PACKAGE_NAME ] +## [DISABLE_PKGCONFIG_INSTALL]) +## ``` +## +## ## Parameters: +## ### NAME +## The name of the specific ignition library, i.e. `cmake` for `ignition-cmake0`, `math` for `ignition-math4`. +## +## ### VERSION +## The complete version number. +## +## ### SHA512 +## The SHA512 hash that should match the downloaded archive. This is forwarded to the `vcpkg_from_github` command. +## +## ### REF +## Reference to the tag of the desired release. This is forwarded to the `vcpkg_from_github` command. +## If not specified, defaults to `ignition-${NAME}${MAJOR_VERSION}_${VERSION}`. +## +## ### HEAD_REF +## Reference (tag) to the desired release. This is forwarded to the `vcpkg_from_github` command. +## If not specified, defaults to `ign-${NAME}${MAJOR_VERSION}`. +## +## ### PATCHES +## A list of patches to be applied to the extracted sources. +## This is forwarded to the `vcpkg_from_github` command. +## +## ### CMAKE_PACKAGE_NAME +## The name of the CMake package for the port. +## If not specified, defaults to `ignition-${NAME}${MAJOR_VERSION}`. +## +## ### DISABLE_PKGCONFIG_INSTALL +## If present, disable installation of .pc pkg-config configuration files. +## +## +## ## Examples: +## +## * [ignition-cmake0](https://github.com/Microsoft/vcpkg/blob/master/ports/ignition-cmake0/portfile.cmake) +## * [ignition-math4](https://github.com/Microsoft/vcpkg/blob/master/ports/ignition-math4/portfile.cmake) +## * [ignition-fuel-tools1](https://github.com/Microsoft/vcpkg/blob/master/ports/ignition-fuel-tools1/portfile.cmake) +function(ignition_modular_library) + set(options DISABLE_PKGCONFIG_INSTALL) + set(oneValueArgs NAME VERSION SHA512 REF HEAD_REF CMAKE_PACKAGE_NAME) + set(multiValueArgs PATCHES) + cmake_parse_arguments(IML "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + string(REPLACE "." ";" IML_VERSION_LIST ${IML_VERSION}) + list(GET IML_VERSION_LIST 0 IML_MAJOR_VERSION) + + # If the REF option is omitted, use the canonical one + if(NOT DEFINED IML_REF) + set(IML_REF "ignition-${IML_NAME}${IML_MAJOR_VERSION}_${IML_VERSION}") + endif() + + # If the HEAD_REF option is omitted, use the canonical one + if(NOT DEFINED IML_HEAD_REF) + set(IML_HEAD_REF "ign-${IML_NAME}${IML_MAJOR_VERSION}") + endif() + + # If the CMAKE_PACKAGE_NAME option is omitted, use the canonical one + set(DEFAULT_CMAKE_PACKAGE_NAME "ignition-${IML_NAME}${IML_MAJOR_VERSION}") + if(NOT DEFINED IML_CMAKE_PACKAGE_NAME) + set(IML_CMAKE_PACKAGE_NAME ${DEFAULT_CMAKE_PACKAGE_NAME}) + endif() + + # Download library from github, to support also the --head option + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ignitionrobotics/ign-${IML_NAME} + REF ${IML_REF} + SHA512 ${IML_SHA512} + HEAD_REF ${IML_HEAD_REF} + PATCHES ${IML_PATCHES} + ) + + # Build library + ignition_modular_build_library(${IML_NAME} ${IML_MAJOR_VERSION} ${SOURCE_PATH} ${IML_CMAKE_PACKAGE_NAME} ${DEFAULT_CMAKE_PACKAGE_NAME} ${IML_DISABLE_PKGCONFIG_INSTALL}) +endfunction() diff --git a/vcpkg/ports/ignition-modularscripts/portfile.cmake b/vcpkg/ports/ignition-modularscripts/portfile.cmake new file mode 100644 index 0000000..509240d --- /dev/null +++ b/vcpkg/ports/ignition-modularscripts/portfile.cmake @@ -0,0 +1,8 @@ +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/ignition_modular_library.cmake + DESTINATION + ${CURRENT_PACKAGES_DIR}/share/ignitionmodularscripts +) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/ignitionmodularscripts/copyright "") + +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/vcpkg/ports/ignition-msgs1/CONTROL b/vcpkg/ports/ignition-msgs1/CONTROL new file mode 100644 index 0000000..47665b0 --- /dev/null +++ b/vcpkg/ports/ignition-msgs1/CONTROL @@ -0,0 +1,4 @@ +Source: ignition-msgs1 +Version: 1.0.0-1 +Build-Depends: ignition-cmake0, ignition-math4, protobuf +Description: Middleware protobuf messages for robotics diff --git a/vcpkg/ports/ignition-msgs1/fix-protobuf-static-link-order.patch b/vcpkg/ports/ignition-msgs1/fix-protobuf-static-link-order.patch new file mode 100644 index 0000000..9f3e674 --- /dev/null +++ b/vcpkg/ports/ignition-msgs1/fix-protobuf-static-link-order.patch @@ -0,0 +1,14 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -2,8 +2,8 @@ + # Build a custom protoc plugin + ign_add_executable(ign_msgs_gen Generator.cc generator_main.cc) + target_link_libraries(ign_msgs_gen +- protobuf::libprotobuf +- protobuf::libprotoc) ++ protobuf::libprotoc ++ protobuf::libprotobuf) + target_include_directories(ign_msgs_gen PRIVATE ${PROTOBUF_INCLUDE_DIR}) + target_compile_features(ign_msgs_gen PRIVATE ${IGN_CXX_11_FEATURES}) + diff --git a/vcpkg/ports/ignition-msgs1/portfile.cmake b/vcpkg/ports/ignition-msgs1/portfile.cmake new file mode 100644 index 0000000..d85be26 --- /dev/null +++ b/vcpkg/ports/ignition-msgs1/portfile.cmake @@ -0,0 +1,35 @@ +include(vcpkg_common_functions) + +include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake) + +# Explicitly disable cross-compilation until the upstream discussion +# https://bitbucket.org/ignitionrobotics/ign-msgs/issues/34/add-support-for-cross-compilation is solved +if(CMAKE_HOST_WIN32 AND NOT VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND NOT VCPKG_TARGET_ARCHITECTURE MATCHES "x86") + set(ignition_msgs_CROSSCOMPILING ON) +elseif(CMAKE_HOST_WIN32 AND VCPKG_CMAKE_SYSTEM_NAME) + set(ignition_msgs_CROSSCOMPILING ON) +else() + set(ignition_msgs_CROSSCOMPILING OFF) +endif() + +if(ignition_msgs_CROSSCOMPILING) + message(FATAL_ERROR "This port does not currently support triplets that require cross-compilation.") +endif() + +# This port needs to generate protobuf messages with a custom plugin generator, +# so it needs to have in Windows the relative protobuf dll available in the PATH +set(path_backup $ENV{PATH}) +vcpkg_add_to_path(${CURRENT_INSTALLED_DIR}/bin) +vcpkg_add_to_path(${CURRENT_INSTALLED_DIR}/debug/bin) + +ignition_modular_library(NAME msgs + VERSION "1.0.0" + # See https://bitbucket.org/ignitionrobotics/ign-msgs/issues/33/the-ignition-msgs1_100-tag-does-not-match + REF ignition-msgs_1.0.0 + SHA512 3a270f0ac988b947091d4626be48fe8cfed5ddfde5a37b9d0f08fddcbf278099ab231fca11e2dd2296ca54e0350ea14e3f685dc238f0827f18f10ab7b75039de + # Fix linking order of protobuf libraries (backport of https://bitbucket.org/ignitionrobotics/ign-msgs/pull-requests/151) + PATCHES fix-protobuf-static-link-order.patch) + + +# Restore old path +set(ENV{PATH} ${path_backup}) diff --git a/vcpkg/ports/ignition-msgs5/01-protobuf.patch b/vcpkg/ports/ignition-msgs5/01-protobuf.patch new file mode 100644 index 0000000..71ea936 --- /dev/null +++ b/vcpkg/ports/ignition-msgs5/01-protobuf.patch @@ -0,0 +1,13 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index f68bf3d..d4d1372 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -135,6 +135,8 @@ if(MSVC) + # warning is not important since those members do not need to be interfaced + # with. + set_source_files_properties(${gen_sources} COMPILE_FLAGS "/wd4251 /wd4146") ++ # Fix for protobuf 3.12 - allow big object files ++ add_definitions(/bigobj) + endif() + + set_source_files_properties(${gen_headers} ${gen_sources} ${gen_ruby_scripts} diff --git a/vcpkg/ports/ignition-msgs5/CONTROL b/vcpkg/ports/ignition-msgs5/CONTROL new file mode 100644 index 0000000..690ded1 --- /dev/null +++ b/vcpkg/ports/ignition-msgs5/CONTROL @@ -0,0 +1,6 @@ +Source: ignition-msgs5 +Version: 5.1.0 +Port-Version: 1 +Build-Depends: ignition-modularscripts, ignition-cmake2, ignition-math6, protobuf, tinyxml2 +Description: Middleware protobuf messages for robotics +Supports: !(arm|linux|uwp) \ No newline at end of file diff --git a/vcpkg/ports/ignition-msgs5/portfile.cmake b/vcpkg/ports/ignition-msgs5/portfile.cmake new file mode 100644 index 0000000..aec3a6c --- /dev/null +++ b/vcpkg/ports/ignition-msgs5/portfile.cmake @@ -0,0 +1,20 @@ +# Explicitly disable cross-compilation until the upstream discussion +# https://github.com/ignitionrobotics/ign-msgs/issues/34 is solved +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "linux" "uwp") + +include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake) + +# This port needs to generate protobuf messages with a custom plugin generator, +# so it needs to have in Windows the relative protobuf dll available in the PATH +set(path_backup $ENV{PATH}) +vcpkg_add_to_path(${CURRENT_INSTALLED_DIR}/bin) +vcpkg_add_to_path(${CURRENT_INSTALLED_DIR}/debug/bin) + +ignition_modular_library(NAME msgs + VERSION "5.1.0" + SHA512 db485f737c465b310602342a1a751c561473e330eb18d1b322b32d13de246536fe6a7efdf245faaaa9be1c9bfce662b2d39d1bb7cffc37e52690893cb47cc2ee + PATCHES + "01-protobuf.patch") + +# Restore old path +set(ENV{PATH} "${path_backup}") diff --git a/vcpkg/ports/ignition-plugin1/CONTROL b/vcpkg/ports/ignition-plugin1/CONTROL new file mode 100644 index 0000000..ba3aa4c --- /dev/null +++ b/vcpkg/ports/ignition-plugin1/CONTROL @@ -0,0 +1,5 @@ +Source: ignition-plugin1 +Version: 1.1.0 +Homepage: https://ignitionrobotics.org/libs/plugin +Build-Depends: dlfcn-win32 (windows|uwp), ignition-cmake2, ignition-modularscripts +Description: Library for registering plugin libraries and dynamically loading them at runtime diff --git a/vcpkg/ports/ignition-plugin1/portfile.cmake b/vcpkg/ports/ignition-plugin1/portfile.cmake new file mode 100644 index 0000000..daa6260 --- /dev/null +++ b/vcpkg/ports/ignition-plugin1/portfile.cmake @@ -0,0 +1,7 @@ +include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake) + +set(PACKAGE_VERSION "1.1.0") +ignition_modular_library(NAME plugin + VERSION ${PACKAGE_VERSION} + REF "ignition-plugin_${PACKAGE_VERSION}" + SHA512 0657c5816e67d02329a79364050b8a56957180e5b7481b01696c7369b063cbfedfc93793a8ad92d87d242d24e476283dc7847bd810a3de98d3ec5ae7d640568c) diff --git a/vcpkg/ports/ignition-transport4/CONTROL b/vcpkg/ports/ignition-transport4/CONTROL new file mode 100644 index 0000000..73f2eaf --- /dev/null +++ b/vcpkg/ports/ignition-transport4/CONTROL @@ -0,0 +1,4 @@ +Source: ignition-transport4 +Version: 4.0.0-2 +Build-Depends: cppzmq, ignition-cmake0, ignition-modularscripts, ignition-msgs1, libuuid (!windows&!uwp), protobuf, zeromq +Description: Transport middleware for robotics diff --git a/vcpkg/ports/ignition-transport4/portfile.cmake b/vcpkg/ports/ignition-transport4/portfile.cmake new file mode 100644 index 0000000..cdab5c0 --- /dev/null +++ b/vcpkg/ports/ignition-transport4/portfile.cmake @@ -0,0 +1,7 @@ +include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake) + +ignition_modular_library(NAME transport + VERSION "4.0.0" + SHA512 d4125044c21fdd6754f3b8b06f372df3f858080d5d33e97ed7a8ef8f6fb9857d562082aad41c89ea9146a33b1c3814305d33c5c8f8bcde66a16477b4a01655b4 + # This can be removed when the pc file of libuuid on Windows is fixed + DISABLE_PKGCONFIG_INSTALL) diff --git a/vcpkg/ports/ignition-transport8/CONTROL b/vcpkg/ports/ignition-transport8/CONTROL new file mode 100644 index 0000000..19c9cc5 --- /dev/null +++ b/vcpkg/ports/ignition-transport8/CONTROL @@ -0,0 +1,4 @@ +Source: ignition-transport8 +Version: 8.0.0 +Build-Depends: cppzmq, ignition-cmake2, ignition-msgs5, libuuid (!windows&!uwp), protobuf, sqlite3, zeromq +Description: Transport middleware for robotics diff --git a/vcpkg/ports/ignition-transport8/portfile.cmake b/vcpkg/ports/ignition-transport8/portfile.cmake new file mode 100644 index 0000000..a8bd8de --- /dev/null +++ b/vcpkg/ports/ignition-transport8/portfile.cmake @@ -0,0 +1,7 @@ +include(${CURRENT_INSTALLED_DIR}/share/ignitionmodularscripts/ignition_modular_library.cmake) + +ignition_modular_library(NAME transport + VERSION "8.0.0" + SHA512 ab1bae994a8676864ceb78b87f2258b8ed22036aed87e815fc22f830edd8b087d1ef0406dc0d053ea823d95b5fb765c4867d27ce5653f1d685001aab0cf0ec03 + # This can be removed when the pc file of libuuid on Windows is fixed + DISABLE_PKGCONFIG_INSTALL) diff --git a/vcpkg/ports/ilmbase/CONTROL b/vcpkg/ports/ilmbase/CONTROL new file mode 100644 index 0000000..51ea5df --- /dev/null +++ b/vcpkg/ports/ilmbase/CONTROL @@ -0,0 +1,4 @@ +Source: ilmbase +Version: 2.3.0 +Build-Depends: openexr +Description: empty package, linking to newer one diff --git a/vcpkg/ports/ilmbase/portfile.cmake b/vcpkg/ports/ilmbase/portfile.cmake new file mode 100644 index 0000000..9aefc82 --- /dev/null +++ b/vcpkg/ports/ilmbase/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/vcpkg/ports/imgui-sfml/0001-fix_find_package.patch b/vcpkg/ports/imgui-sfml/0001-fix_find_package.patch new file mode 100644 index 0000000..d5dc244 --- /dev/null +++ b/vcpkg/ports/imgui-sfml/0001-fix_find_package.patch @@ -0,0 +1,50 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 53500fd..cb98701 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -35,34 +35,14 @@ if (IMGUI_SFML_FIND_SFML) + if (NOT BUILD_SHARED_LIBS) + set(SFML_STATIC_LIBRARIES ON) + endif() +- find_package(SFML 2.5 COMPONENTS graphics system window) ++ find_package(SFML COMPONENTS graphics system window) + + if(NOT SFML_FOUND) + message(FATAL_ERROR "SFML 2 directory not found. Set SFML_DIR to directory where SFML was built (or one which ccontains SFMLConfig.cmake)") + endif() + endif() + +-# ImGui does not provide native support for CMakeLists, workaround for now to have +-# users specify IMGUI_DIR. Waiting for this PR to get merged... +-# https://github.com/ocornut/imgui/pull/1713 +-if(NOT IMGUI_DIR) +- set(IMGUI_DIR "" CACHE PATH "imgui top-level directory") +- message(FATAL_ERROR "ImGui directory not found. Set IMGUI_DIR to imgui's top-level path (containing 'imgui.h' and other files).\n") +-endif() +- +-# This uses FindImGui.cmake provided in ImGui-SFML repo for now +-find_package(ImGui 1.68 REQUIRED) +- +-# these headers will be installed alongside ImGui-SFML +-set(IMGUI_PUBLIC_HEADERS +- ${IMGUI_INCLUDE_DIR}/imconfig.h +- ${IMGUI_INCLUDE_DIR}/imgui.h +- ${IMGUI_INCLUDE_DIR}/imgui_internal.h # not actually public, but users might need it +- ${IMGUI_INCLUDE_DIR}/imstb_rectpack.h +- ${IMGUI_INCLUDE_DIR}/imstb_textedit.h +- ${IMGUI_INCLUDE_DIR}/imstb_truetype.h +- ${IMGUI_INCLUDE_DIR}/misc/cpp/imgui_stdlib.h +-) ++find_package(imgui CONFIG REQUIRED) + + # CMake 3.11 and later prefer to choose GLVND, but we choose legacy OpenGL just because it's safer + # (unless the OpenGL_GL_PREFERENCE was explicitly set) +@@ -82,7 +62,7 @@ add_library(ImGui-SFML + add_library(ImGui-SFML::ImGui-SFML ALIAS ImGui-SFML) + + target_link_libraries(ImGui-SFML +- PUBLIC ++ imgui::imgui + sfml-graphics + sfml-system + sfml-window diff --git a/vcpkg/ports/imgui-sfml/0002-fix_imgui_config.patch b/vcpkg/ports/imgui-sfml/0002-fix_imgui_config.patch new file mode 100644 index 0000000..6966b63 --- /dev/null +++ b/vcpkg/ports/imgui-sfml/0002-fix_imgui_config.patch @@ -0,0 +1,11 @@ +diff --git a/imconfig-SFML.h b/imconfig-SFML.h +index f66ba20..0f43ce6 100644 +--- a/imconfig-SFML.h ++++ b/imconfig-SFML.h +@@ -28,5 +28,3 @@ + static_cast(z * 255.f), \ + static_cast(w * 255.f)); \ + } +- +-#define ImTextureID unsigned int +\ No newline at end of file diff --git a/vcpkg/ports/imgui-sfml/0003-fix_osx.patch b/vcpkg/ports/imgui-sfml/0003-fix_osx.patch new file mode 100644 index 0000000..8181ee8 --- /dev/null +++ b/vcpkg/ports/imgui-sfml/0003-fix_osx.patch @@ -0,0 +1,13 @@ +diff --git a/imconfig-SFML.h b/imconfig-SFML.h +index 0f43ce6..1fce2c1 100644 +--- a/imconfig-SFML.h ++++ b/imconfig-SFML.h +@@ -19,7 +19,7 @@ + + #define IM_VEC4_CLASS_EXTRA \ + ImVec4(const sf::Color & c) \ +- : ImVec4(c.r / 255.f, c.g / 255.f, c.b / 255.f, c.a / 255.f) { \ ++ : x(c.r / 255.f), y(c.g / 255.f), z(c.b / 255.f), w(c.a / 255.f) { \ + } \ + operator sf::Color() const { \ + return sf::Color( \ diff --git a/vcpkg/ports/imgui-sfml/004-fix-find-sfml.patch b/vcpkg/ports/imgui-sfml/004-fix-find-sfml.patch new file mode 100644 index 0000000..51cc063 --- /dev/null +++ b/vcpkg/ports/imgui-sfml/004-fix-find-sfml.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4d7a3fa..614564f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -32,9 +32,6 @@ set(IMGUI_SFML_CONFIG_INSTALL_DIR "" CACHE PATH "Path where user's config header + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") + + if (IMGUI_SFML_FIND_SFML) +- if (NOT BUILD_SHARED_LIBS) +- set(SFML_STATIC_LIBRARIES ON) +- endif() + find_package(SFML COMPONENTS graphics system window) + + if(NOT SFML_FOUND) diff --git a/vcpkg/ports/imgui-sfml/CONTROL b/vcpkg/ports/imgui-sfml/CONTROL new file mode 100644 index 0000000..a792691 --- /dev/null +++ b/vcpkg/ports/imgui-sfml/CONTROL @@ -0,0 +1,5 @@ +Source: imgui-sfml +Version: 2.1-2 +Homepage: https://github.com/eliasdaler/imgui-sfml +Description: ImGui binding for use with SFML +Build-Depends: sfml, imgui, opengl diff --git a/vcpkg/ports/imgui-sfml/portfile.cmake b/vcpkg/ports/imgui-sfml/portfile.cmake new file mode 100644 index 0000000..aedb31c --- /dev/null +++ b/vcpkg/ports/imgui-sfml/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO eliasdaler/imgui-sfml + REF v2.1 + SHA512 134c49e9c57bc4d3882d99a52ec87f74c11d2f3134501c79b20bce4612f315f2e3f33a521597b387ca8f91942cf2b82ec9f4a8b1672a700e7233a9758897b6d0 + HEAD_REF master + PATCHES + 0001-fix_find_package.patch + 0002-fix_imgui_config.patch + 0003-fix_osx.patch + 004-fix-find-sfml.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/ImGui-SFML) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/imgui-sfml/usage b/vcpkg/ports/imgui-sfml/usage new file mode 100644 index 0000000..ea9a5f6 --- /dev/null +++ b/vcpkg/ports/imgui-sfml/usage @@ -0,0 +1,10 @@ +The package imgui-sfml provides CMake targets: + + find_package(imgui CONFIG REQUIRED) + find_package(SFML CONFIG REQUIRED COMPONENTS graphics system window) + find_package(ImGui-SFML CONFIG REQUIRED) + target_link_libraries(main PRIVATE + imgui::imgui + sfml-graphics sfml-system sfml-window + ImGui-SFML::ImGui-SFML + ) diff --git a/vcpkg/ports/imgui/CMakeLists.txt b/vcpkg/ports/imgui/CMakeLists.txt new file mode 100644 index 0000000..e8d57c2 --- /dev/null +++ b/vcpkg/ports/imgui/CMakeLists.txt @@ -0,0 +1,221 @@ +cmake_minimum_required(VERSION 3.8) +project(imgui CXX) + +set(CMAKE_DEBUG_POSTFIX d) + +add_library(${PROJECT_NAME} "") +add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) +target_include_directories( + ${PROJECT_NAME} + PUBLIC + $ + $ +) + +target_sources( + ${PROJECT_NAME} + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/imgui.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/imgui_demo.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/imgui_draw.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/imgui_widgets.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/misc/cpp/imgui_stdlib.cpp +) + + +if(IMGUI_USE_WCHAR32) + FILE(READ ${CMAKE_CURRENT_SOURCE_DIR}/imconfig.h IMCONFIG) + STRING(REGEX REPLACE "//#define IMGUI_USE_WCHAR32" "#define IMGUI_USE_WCHAR32" IMCONFIG "${IMCONFIG}") + FILE(WRITE ${CMAKE_CURRENT_SOURCE_DIR}/imconfig.h "${IMCONFIG}") +endif() + +if(IMGUI_BUILD_ALLEGRO5_BINDING) + find_path(ALLEGRO5_INCLUDE_DIRS allegro5/allegro.h) + target_include_directories(${PROJECT_NAME} PRIVATE ${ALLEGRO5_INCLUDE_DIRS}) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_allegro5.cpp) +endif() + +if(IMGUI_BUILD_DX9_BINDING) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_dx9.cpp) +endif() + +if(IMGUI_BUILD_DX10_BINDING) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_dx10.cpp) +endif() + +if(IMGUI_BUILD_DX11_BINDING) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_dx11.cpp) +endif() + +if(IMGUI_BUILD_DX12_BINDING) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_dx12.cpp) +endif() + +if(IMGUI_BUILD_GLFW_BINDING) + find_package(glfw3 REQUIRED) + get_target_property(GLFW3_INCLUDE_DIRS glfw INTERFACE_INCLUDE_DIRECTORIES) + target_include_directories(${PROJECT_NAME} PRIVATE ${GLFW3_INCLUDE_DIRS}) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_glfw.cpp) +endif() + +if(IMGUI_BUILD_GLUT_BINDING) + find_path(GLUT_INCLUDE_DIRS GL/freeglut.h) + target_include_directories(${PROJECT_NAME} PRIVATE ${GLUT_INCLUDE_DIRS}) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_glut.cpp) +endif() + +if(IMGUI_BUILD_METAL_BINDING) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_metal.mm) +endif() + +if(IMGUI_BUILD_OPENGL2_BINDING) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_opengl2.cpp) +endif() + +if(IMGUI_BUILD_OPENGL3_GLEW_BINDING) + find_package(glew REQUIRED) + target_include_directories(${PROJECT_NAME} PRIVATE ${GLEW_INCLUDE_DIRS}) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_opengl3.cpp) +endif() + +if(IMGUI_BUILD_OPENGL3_GLAD_BINDING) + find_package(glad REQUIRED) + get_target_property(GLAD_INCLUDE_DIRS glad::glad INTERFACE_INCLUDE_DIRECTORIES) + target_include_directories(${PROJECT_NAME} PRIVATE ${GLAD_INCLUDE_DIRS}) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_opengl3.cpp) +endif() + +if(IMGUI_BUILD_OPENGL3_GL3W_BINDING) + find_package(gl3w REQUIRED) + get_target_property(GL3W_INCLUDE_DIRS unofficial::gl3w::gl3w INTERFACE_INCLUDE_DIRECTORIES) + target_include_directories(${PROJECT_NAME} PRIVATE ${GL3W_INCLUDE_DIRS}) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_opengl3.cpp) +endif() + +if(IMGUI_BUILD_OPENGL3_GLBINDING_BINDING) + find_package(glbinding REQUIRED) + get_target_property(GLBINDING_INCLUDE_DIRS glbinding::glbinding INTERFACE_INCLUDE_DIRECTORIES) + target_include_directories(${PROJECT_NAME} PRIVATE ${GLBINDING_INCLUDE_DIRS}) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_opengl3.cpp) +endif() + +if(IMGUI_BUILD_OSX_BINDING) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_osx.mm) +endif() + +if(IMGUI_BUILD_SDL2_BINDING) + find_package(SDL2 CONFIG REQUIRED) + find_path(SDL2_INCLUDE_DIRS SDL2/SDL.h) + target_include_directories(${PROJECT_NAME} PRIVATE ${SDL2_INCLUDE_DIRS} ${SDL2_INCLUDE_DIRS}/SDL2) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_sdl.cpp) +endif() + +if(IMGUI_BUILD_VULKAN_BINDING) + find_package(Vulkan REQUIRED) + get_target_property(VULKAN_INCLUDE_DIRS Vulkan::Vulkan INTERFACE_INCLUDE_DIRECTORIES) + target_include_directories(${PROJECT_NAME} PRIVATE ${VULKAN_INCLUDE_DIRS}) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_vulkan.cpp) +endif() + +if(IMGUI_BUILD_WIN32_BINDING) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_win32.cpp) +endif() + +if(IMGUI_FREETYPE) + find_package(Freetype REQUIRED) + target_include_directories(${PROJECT_NAME} PRIVATE ${FREETYPE_INCLUDE_DIRS}) + target_sources(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/misc/freetype/imgui_freetype.cpp) +endif() + +install( + TARGETS ${PROJECT_NAME} + EXPORT ${PROJECT_NAME}_target + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) + +if(NOT IMGUI_SKIP_HEADERS) + install(FILES + ${CMAKE_CURRENT_SOURCE_DIR}/imgui.h + ${CMAKE_CURRENT_SOURCE_DIR}/imconfig.h + ${CMAKE_CURRENT_SOURCE_DIR}/imgui_internal.h + ${CMAKE_CURRENT_SOURCE_DIR}/imstb_textedit.h + ${CMAKE_CURRENT_SOURCE_DIR}/imstb_rectpack.h + ${CMAKE_CURRENT_SOURCE_DIR}/imstb_truetype.h + ${CMAKE_CURRENT_SOURCE_DIR}/misc/cpp/imgui_stdlib.h + DESTINATION include + ) + + if(IMGUI_BUILD_ALLEGRO5_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_allegro5.h DESTINATION include) + endif() + + if(IMGUI_BUILD_DX9_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_dx9.h DESTINATION include) + endif() + + if(IMGUI_BUILD_DX10_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_dx10.h DESTINATION include) + endif() + + if(IMGUI_BUILD_DX11_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_dx11.h DESTINATION include) + endif() + + if(IMGUI_BUILD_DX12_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_dx12.h DESTINATION include) + endif() + + if(IMGUI_BUILD_GLFW_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_glfw.h DESTINATION include) + endif() + + if(IMGUI_BUILD_GLUT_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_glut.h DESTINATION include) + endif() + + if(IMGUI_COPY_MARMALADE_BINDING) + file(GLOB MARMALADE_BINDING_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_marmalade.*) + install(FILES ${MARMALADE_BINDING_SRCS} DESTINATION include/bindings) + endif() + + if(IMGUI_BUILD_METAL_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_metal.h DESTINATION include) + endif() + + if(IMGUI_BUILD_OPENGL2_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_opengl2.h DESTINATION include) + endif() + + if(IMGUI_BUILD_OPENGL3_GLEW_BINDING OR IMGUI_BUILD_OPENGL3_GLAD_BINDING OR IMGUI_BUILD_OPENGL3_GL3W_BINDING OR IMGUI_BUILD_OPENGL3_GLBINDING_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_opengl3.h DESTINATION include) + endif() + + if(IMGUI_BUILD_OSX_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_osx.h DESTINATION include) + endif() + + if(IMGUI_BUILD_SDL2_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_sdl.h DESTINATION include) + endif() + + if(IMGUI_BUILD_VULKAN_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_vulkan.h DESTINATION include) + endif() + + if(IMGUI_BUILD_WIN32_BINDING) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/examples/imgui_impl_win32.h DESTINATION include) + endif() + + if(IMGUI_FREETYPE) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/misc/freetype/imgui_freetype.h DESTINATION include) + endif() +endif() + +install( + EXPORT ${PROJECT_NAME}_target + NAMESPACE ${PROJECT_NAME}:: + FILE ${PROJECT_NAME}-config.cmake + DESTINATION share/${PROJECT_NAME} +) diff --git a/vcpkg/ports/imgui/CONTROL b/vcpkg/ports/imgui/CONTROL new file mode 100644 index 0000000..df074e5 --- /dev/null +++ b/vcpkg/ports/imgui/CONTROL @@ -0,0 +1,78 @@ +Source: imgui +Version: 1.78 +Port-Version: 3 +Homepage: https://github.com/ocornut/imgui +Description: Bloat-free Immediate Mode Graphical User interface for C++ with minimal dependencies. + +Feature: allegro5-binding +Description: Make available Allegro5 binding +Build-Depends: allegro5 + +Feature: dx9-binding +Description: Make available DirectX9 binding + +Feature: dx10-binding +Description: Make available DirectX10 binding + +Feature: dx11-binding +Description: Make available DirectX11 binding + +Feature: dx12-binding +Description: Make available DirectX12 binding + +Feature: glfw-binding +Description: Make available GLFW binding +Build-Depends: glfw3 + +Feature: glut-binding +Description: Make available Glut binding +Build-Depends: freeglut + +Feature: marmalade-binding +Description: Make available Marmalade binding + +Feature: metal-binding +Description: Make available Metal binding + +Feature: opengl2-binding +Description: Make available OpenGL (legacy) binding + +Feature: opengl3-glew-binding +Description: Make available OpenGL3/ES/ES2 (modern) binding with GLEW +Build-Depends: glew + +Feature: opengl3-glad-binding +Description: Make available OpenGL3/ES/ES2 (modern) binding with glad +Build-Depends: glad + +Feature: opengl3-gl3w-binding +Description: Make available OpenGL3/ES/ES2 (modern) binding with gl3w +Build-Depends: gl3w + +Feature: opengl3-glbinding-binding +Description: Make available OpenGL3/ES/ES2 (modern) binding glbinding +Build-Depends: glbinding + +Feature: osx-binding +Description: Make available OSX binding + +Feature: sdl2-binding +Description: Make available SDL2 binding +Build-Depends: sdl2 + +Feature: vulkan-binding +Description: Make available Vulkan binding +Build-Depends: vulkan + +Feature: win32-binding +Description: Make available Win32 binding + +Feature: freetype +Description: Build font atlases using FreeType instead of stb_truetype +Build-Depends: freetype + +Feature: libigl-imgui +Description: Install the libigl-imgui headers + +Feature: wchar32 +Description: Use WCHAR32 instead of WCHAR16 diff --git a/vcpkg/ports/imgui/portfile.cmake b/vcpkg/ports/imgui/portfile.cmake new file mode 100644 index 0000000..bb8ee6e --- /dev/null +++ b/vcpkg/ports/imgui/portfile.cmake @@ -0,0 +1,67 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ocornut/imgui + REF v1.78 + SHA512 2410df5b39d5ca14ea7181ef4f3b501ad8879e10895ed540f079f213dcc528b50e57cc16fce6f50a67e8a7be00b03c5833cabfd5db4ba210cafce6d95da389c6 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +if(("metal-binding" IN_LIST FEATURES OR "osx-binding" IN_LIST FEATURES) AND (NOT VCPKG_TARGET_IS_OSX)) + message(FATAL_ERROR "Feature metal-binding and osx-binding are only supported on osx.") +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + allegro5-binding IMGUI_BUILD_ALLEGRO5_BINDING + dx9-binding IMGUI_BUILD_DX9_BINDING + dx10-binding IMGUI_BUILD_DX10_BINDING + dx11-binding IMGUI_BUILD_DX11_BINDING + dx12-binding IMGUI_BUILD_DX12_BINDING + glfw-binding IMGUI_BUILD_GLFW_BINDING + glut-binding IMGUI_BUILD_GLUT_BINDING + marmalade-binding IMGUI_COPY_MARMALADE_BINDING + metal-binding IMGUI_BUILD_METAL_BINDING + opengl2-binding IMGUI_BUILD_OPENGL2_BINDING + opengl3-glew-binding IMGUI_BUILD_OPENGL3_GLEW_BINDING + opengl3-glad-binding IMGUI_BUILD_OPENGL3_GLAD_BINDING + opengl3-gl3w-binding IMGUI_BUILD_OPENGL3_GL3W_BINDING + opengl3-glbinding-binding IMGUI_BUILD_OPENGL3_GLBINDING_BINDING + osx-binding IMGUI_BUILD_OSX_BINDING + sdl2-binding IMGUI_BUILD_SDL2_BINDING + vulkan-binding IMGUI_BUILD_VULKAN_BINDING + win32-binding IMGUI_BUILD_WIN32_BINDING + freetype IMGUI_FREETYPE + wchar32 IMGUI_USE_WCHAR32 +) + +if ("libigl-imgui" IN_LIST FEATURES) + vcpkg_download_distfile( + IMGUI_FONTS_DROID_SANS_H + URLS + https://raw.githubusercontent.com/libigl/libigl-imgui/c3efb9b62780f55f9bba34561f79a3087e057fc0/imgui_fonts_droid_sans.h + FILENAME "imgui_fonts_droid_sans.h" + SHA512 + abe9250c9a5989e0a3f2285bbcc83696ff8e38c1f5657c358e6fe616ff792d3c6e5ff2fa23c2eeae7d7b307392e0dc798a95d14f6d10f8e9bfbd7768d36d8b31 + ) + + file(INSTALL ${IMGUI_FONTS_DROID_SANS_H} DESTINATION ${CURRENT_PACKAGES_DIR}/include) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + OPTIONS_DEBUG + -DIMGUI_SKIP_HEADERS=ON +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/immer/CONTROL b/vcpkg/ports/immer/CONTROL new file mode 100644 index 0000000..f6f736b --- /dev/null +++ b/vcpkg/ports/immer/CONTROL @@ -0,0 +1,3 @@ +Source: immer +Version: 2019-06-07 +Description: Postmodern immutable and persistent data structures for C++ diff --git a/vcpkg/ports/immer/portfile.cmake b/vcpkg/ports/immer/portfile.cmake new file mode 100644 index 0000000..da2a40b --- /dev/null +++ b/vcpkg/ports/immer/portfile.cmake @@ -0,0 +1,29 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO arximboldi/immer + REF fe1d5151f8e62a97a953664f8de39b05ac0d2031 + SHA512 2f78c2d85a24b2bcb69bbbf8b038c8bacb5a841e0f0ce7e4e521d369423c7d44f803a1c766a77d0955246a1b22476de15fa708a3786f05c41a3b705a574bbb71 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DENABLE_PYTHON=OFF + -DENABLE_GUILE=OFF + -DENABLE_BOOST_COROUTINE=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Immer) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/implot/CMakeLists.txt b/vcpkg/ports/implot/CMakeLists.txt new file mode 100644 index 0000000..0033221 --- /dev/null +++ b/vcpkg/ports/implot/CMakeLists.txt @@ -0,0 +1,49 @@ +cmake_minimum_required(VERSION 3.8) +project(implot CXX) + +find_package(imgui CONFIG REQUIRED) +get_target_property(IMGUI_INCLUDE_DIRS imgui::imgui + INTERFACE_INCLUDE_DIRECTORIES +) + +set(CMAKE_DEBUG_POSTFIX d) + +add_library(${PROJECT_NAME} "") +add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) +target_include_directories( + ${PROJECT_NAME} + PUBLIC + $ + $ + PRIVATE + ${IMGUI_INCLUDE_DIRS} +) + +target_sources( + ${PROJECT_NAME} + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/implot.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/implot_demo.cpp +) + +install( + TARGETS ${PROJECT_NAME} + EXPORT ${PROJECT_NAME}_target + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) + +if(NOT IMPLOT_SKIP_HEADERS) + install(FILES + ${CMAKE_CURRENT_SOURCE_DIR}/implot.h + DESTINATION include + ) +endif() + +install( + EXPORT ${PROJECT_NAME}_target + NAMESPACE ${PROJECT_NAME}:: + FILE ${PROJECT_NAME}-config.cmake + DESTINATION share/${PROJECT_NAME} +) diff --git a/vcpkg/ports/implot/CONTROL b/vcpkg/ports/implot/CONTROL new file mode 100644 index 0000000..0f6633b --- /dev/null +++ b/vcpkg/ports/implot/CONTROL @@ -0,0 +1,5 @@ +Source: implot +Version: 0.4 +Homepage: https://github.com/epezent/implot +Description: Advanced 2D Plotting for Dear ImGui +Build-Depends: imgui diff --git a/vcpkg/ports/implot/portfile.cmake b/vcpkg/ports/implot/portfile.cmake new file mode 100644 index 0000000..b783f57 --- /dev/null +++ b/vcpkg/ports/implot/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO epezent/implot + REF v0.4 + SHA512 ab54a97fcfcdc21c47d56e7e9ba1fbd05ae0f9e8f9bf0bd742e9daa6231931ac0c3a7cb0a1637b254df531b2611b27a301cc9f51d6caa950e20d05ab5fc31247 + 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 + -DIMPLOT_SKIP_HEADERS=ON +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/indicators/CONTROL b/vcpkg/ports/indicators/CONTROL new file mode 100644 index 0000000..49fb9f5 --- /dev/null +++ b/vcpkg/ports/indicators/CONTROL @@ -0,0 +1,4 @@ +Source: indicators +Version: 1.7 +Description: Activity indicators for modern C++ +Homepage: https://github.com/p-ranav/indicators diff --git a/vcpkg/ports/indicators/portfile.cmake b/vcpkg/ports/indicators/portfile.cmake new file mode 100644 index 0000000..e406e93 --- /dev/null +++ b/vcpkg/ports/indicators/portfile.cmake @@ -0,0 +1,27 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO p-ranav/indicators + REF ec1973607d5b360b3d1f9b07af851ce236ebd0ae + SHA512 9b9678129525f03ece91217eb71098b8e14f76f178f9abfd24aa0679bcf7ae27dd600bdba185987e9908dfd8fb5e837dc903a8be011fb08d8707216a3084522a + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DINDICATORS_BUILD_TESTS=OFF + -DINDICATORS_SAMPLES=OFF + -DINDICATORS_DEMO=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/indicators TARGET_PATH share/indicators) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.termcolor DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/infoware/portfile.cmake b/vcpkg/ports/infoware/portfile.cmake new file mode 100644 index 0000000..92801eb --- /dev/null +++ b/vcpkg/ports/infoware/portfile.cmake @@ -0,0 +1,39 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ThePhD/infoware + REF v0.5.5 + SHA512 06aea2c3a51df30cfc220eafb603620c3cf5f00b0d5935486ac46c6c2333972910af2b53fc1e2187b5fce0aa9650323a0dff526d768ff54888bfc549a8173903 + HEAD_REF master +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + x11 INFOWARE_USE_X11 + d3d INFOWARE_USE_D3D + opencl INFOWARE_USE_OPENCL + opengl INFOWARE_USE_OPENGL +) + +# git must be injected, because vcpkg isolates the build +# from the environment entirely to have reproducible builds +vcpkg_find_acquire_program(GIT) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DINFOWARE_EXAMPLES=OFF + -DINFOWARE_TESTS=OFF + -DGIT_EXECUTABLE=${GIT} + -DGIT_FOUND=true +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") diff --git a/vcpkg/ports/infoware/vcpkg.json b/vcpkg/ports/infoware/vcpkg.json new file mode 100644 index 0000000..fc6fd7d --- /dev/null +++ b/vcpkg/ports/infoware/vcpkg.json @@ -0,0 +1,23 @@ +{ + "$reason": "Note that independent usage and testing may work, but it seems to fail in CI environments for potential cross-compilation, and is thusly noted here to note break how vcpkg builds things!", + "name": "infoware", + "version-string": "0.5.5", + "port-version": 1, + "description": "C++ Library for pulling system and hardware information, without hitting the command line.", + "homepage": "https://github.com/ThePhD/infoware", + "supports": "!(arm | uwp)", + "features": { + "d3d": { + "description": "Prefer usage of Direct3D to find graphical capabilities (typically only works on Windows systems)." + }, + "opencl": { + "description": "Prefer usage of OpenCL to find graphical capabilities of the system." + }, + "opengl": { + "description": "Prefer usage of OpenGL to find graphical capabilities (may require additional libraries to be available for linking depending on the system)." + }, + "x11": { + "description": "Prefer usage of X11 to find graphical capabilities." + } + } +} diff --git a/vcpkg/ports/inih/CMakeLists.txt b/vcpkg/ports/inih/CMakeLists.txt new file mode 100644 index 0000000..6601e54 --- /dev/null +++ b/vcpkg/ports/inih/CMakeLists.txt @@ -0,0 +1,15 @@ +project(inih) + +set(SOURCES ini.c cpp/INIReader.cpp) +set(HEADERS ini.h cpp/INIReader.h) + +add_library(inih ${SOURCES}) + +install( + TARGETS inih + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install(FILES ${HEADERS} DESTINATION include) diff --git a/vcpkg/ports/inih/CONTROL b/vcpkg/ports/inih/CONTROL new file mode 100644 index 0000000..deebfbb --- /dev/null +++ b/vcpkg/ports/inih/CONTROL @@ -0,0 +1,3 @@ +Source: inih +Version: 47 +Description: Simple .INI file parser diff --git a/vcpkg/ports/inih/portfile.cmake b/vcpkg/ports/inih/portfile.cmake new file mode 100644 index 0000000..b52c5d2 --- /dev/null +++ b/vcpkg/ports/inih/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO benhoyt/inih + REF 75fe6b1a03d99a9728b9924f9af30729e51357c2 # r47 + SHA512 91f423f47e6056b929ddf8bc00db5dcde05b7205c085ced4305a6355bf0aac6932951a5bd857613a220b35b37b9da55dfce84f4f827e661491e9891d72ff78c6 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/inih RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/vcpkg/ports/iniparser/CMakeLists.txt b/vcpkg/ports/iniparser/CMakeLists.txt new file mode 100644 index 0000000..9c4f6ed --- /dev/null +++ b/vcpkg/ports/iniparser/CMakeLists.txt @@ -0,0 +1,54 @@ +cmake_minimum_required(VERSION 3.14) + +project(iniparser LANGUAGES C) + +include(GNUInstallDirs) + +set(CMAKE_DISABLE_SOURCE_CHANGES ON) +set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) + +# iniparser.pc +set(prefix ${CMAKE_INSTALL_PREFIX}) +set(libdir ${prefix}/${CMAKE_INSTALL_LIBDIR}) +set(includedir ${prefix}/${CMAKE_INSTALL_INCLUDEDIR}) +set(datarootdir ${prefix}/${CMAKE_INSTALL_DATAROOTDIR}) +set(datadir ${prefix}/${CMAKE_INSTALL_DATADIR}) + +configure_file(iniparser.pc ${CMAKE_CURRENT_BINARY_DIR}/iniparser.pc) + +set(iniparser_sources + src/dictionary.c + src/iniparser.c +) + +add_library(iniparser ${iniparser_sources}) + +target_include_directories(iniparser + PUBLIC + $ + $ +) + +target_compile_definitions(iniparser + PRIVATE + $<$:_CRT_SECURE_NO_WARNINGS> +) + +install(TARGETS iniparser EXPORT unofficial-iniparser-config) + +install( + EXPORT unofficial-iniparser-config + NAMESPACE unofficial::iniparser:: + DESTINATION share/unofficial-iniparser + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) + +install( + FILES src/dictionary.h src/iniparser.h + DESTINATION include +) + +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/iniparser.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig +) diff --git a/vcpkg/ports/iniparser/CONTROL b/vcpkg/ports/iniparser/CONTROL new file mode 100644 index 0000000..ee5f47c --- /dev/null +++ b/vcpkg/ports/iniparser/CONTROL @@ -0,0 +1,4 @@ +Source: iniparser +Version: 2020-04-06 +Homepage: ndevilla.free.fr/iniparser +Description: C library for parsing INI-style files diff --git a/vcpkg/ports/iniparser/portfile.cmake b/vcpkg/ports/iniparser/portfile.cmake new file mode 100644 index 0000000..94eb596 --- /dev/null +++ b/vcpkg/ports/iniparser/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ndevilla/iniparser + REF f858275f7f307eecba84c2f5429483f9f28007f8 + SHA512 48c80b2163f86d8ca0f3253128d8528214e2f0680b4bceb686180c01b29cd2a0c3b9d6e7156a8e28649b14bc1d8a51b34c2d3d258013b35f69aaf6c3ded9ecdc + HEAD_REF master + PATCHES + win32_ssize_t.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/iniparser/win32_ssize_t.patch b/vcpkg/ports/iniparser/win32_ssize_t.patch new file mode 100644 index 0000000..3fefee6 --- /dev/null +++ b/vcpkg/ports/iniparser/win32_ssize_t.patch @@ -0,0 +1,29 @@ +diff --git a/src/dictionary.c b/src/dictionary.c +index cb7ccd4..7985ab3 100644 +--- a/src/dictionary.c ++++ b/src/dictionary.c +@@ -18,7 +18,6 @@ + #include + #include + #include +-#include + + /** Maximum value size for integers and doubles. */ + #define MAXVALSZ 1024 +diff --git a/src/dictionary.h b/src/dictionary.h +index d04b6ce..929ae17 100644 +--- a/src/dictionary.h ++++ b/src/dictionary.h +@@ -21,7 +21,12 @@ + #include + #include + #include ++#ifdef _MSC_VER ++#include ++typedef SSIZE_T ssize_t; ++#else + #include ++#endif + + #ifdef __cplusplus + extern "C" { diff --git a/vcpkg/ports/inja/CONTROL b/vcpkg/ports/inja/CONTROL new file mode 100644 index 0000000..3f6f84c --- /dev/null +++ b/vcpkg/ports/inja/CONTROL @@ -0,0 +1,5 @@ +Source: inja +Version: 3.0.0 +Homepage: https://github.com/pantor/inja +Description: Inja - A Template Engine for Modern C++ +Build-Depends: nlohmann-json diff --git a/vcpkg/ports/inja/portfile.cmake b/vcpkg/ports/inja/portfile.cmake new file mode 100644 index 0000000..a2051ab --- /dev/null +++ b/vcpkg/ports/inja/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pantor/inja + REF 02394683b151cdb520c8fb636f3bda77ed4f965d # v3.0.0 + SHA512 52c4fa84ada673f517036ec41b64afbd12a14a6da256d3eeacb26ba3c65c1e3c79217d523a5f628bf1ffdddef7d42de2983c2e00ddbd0af2000d671a2a9d72f0 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + -DINJA_USE_EMBEDDED_JSON=OFF + -DBUILD_TESTING=OFF + -DBUILD_BENCHMARK=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/inja) +vcpkg_copy_pdbs() + +# Inja is a header-only library +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") +# Don't need built-in nlohmann-json as this package depends on nlohmann-json +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/inja/json") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/intel-ipsec/CMakeLists.txt b/vcpkg/ports/intel-ipsec/CMakeLists.txt new file mode 100644 index 0000000..4d778eb --- /dev/null +++ b/vcpkg/ports/intel-ipsec/CMakeLists.txt @@ -0,0 +1,59 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 3.9) +PROJECT(ipsec C) + +IF (SOURCE_PATH) + SET(CMAKE_SOURCE_DIR ${SOURCE_PATH}) +ENDIF () + +INCLUDE(ProcessorCount) +PROCESSORCOUNT(PROCS) + +FIND_PROGRAM(NASM nasm) +IF (NOT NASM) + MESSAGE(FATAL_ERROR "NASM not found") +ENDIF () + +FIND_PROGRAM(MAKE make) +IF (NOT MAKE) + MESSAGE(FATAL_ERROR "MAKE not found") +ENDIF () + +IF (EXEC_ENV STREQUAL "Windows") + FIND_PROGRAM(MAKE nmake) + IF (NOT MAKE) + MESSAGE(FATAL_ERROR "nmake not found") + ENDIF () +ENDIF () + +SET(MAKE_FLAGS) + +IF (EXEC_ENV STREQUAL Windows) + LIST(APPEND MAKE_FLAGS /f win_x64.mak) +ENDIF () + +IF (CMAKE_BUILD_TYPE STREQUAL Debug) + LIST(APPEND MAKE_FLAGS DEBUG=y) +ENDIF () + +IF (LIBRARY_LINKAGE STREQUAL "static") + LIST(APPEND MAKE_FLAGS SHARED=n) +ENDIF () + +MESSAGE(STATUS "${MAKE_FLAGS}") +ADD_CUSTOM_TARGET(ipsec-mb ALL + COMMAND ${MAKE} -j ${MAKE_FLAGS} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/ +# VERBATIM + ) + +SET(LIB_PATH ${CMAKE_SOURCE_DIR}/) +IF (LIBRARY_LINKAGE STREQUAL "dynamic") + STRING(APPEND LIB_PATH libIPSec_MB.so) +ELSEIF (LIBRARY_LINKAGE STREQUAL "static") + STRING(APPEND LIB_PATH libIPSec_MB.a) +ELSE () + MESSAGE(FATAL_ERROR "Unknown linkage type ${LIBRARY_LINKAGE}") +ENDIF () +INSTALL(FILES ${LIB_PATH} + DESTINATION ${CMAKE_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/lib/) +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/include DESTINATION ${CMAKE_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/) diff --git a/vcpkg/ports/intel-ipsec/CONTROL b/vcpkg/ports/intel-ipsec/CONTROL new file mode 100644 index 0000000..c5b495a --- /dev/null +++ b/vcpkg/ports/intel-ipsec/CONTROL @@ -0,0 +1,3 @@ +Source: intel-ipsec +Version: 0.52-1 +Description: Intel(R) Multi-Buffer Crypto for IPsec Library diff --git a/vcpkg/ports/intel-ipsec/intel-ipsecConfig.cmake b/vcpkg/ports/intel-ipsec/intel-ipsecConfig.cmake new file mode 100644 index 0000000..3861032 --- /dev/null +++ b/vcpkg/ports/intel-ipsec/intel-ipsecConfig.cmake @@ -0,0 +1,17 @@ + +FUNCTION(SET_LIBRARY_TARGET NAMESPACE LIB_NAME DEBUG_LIB_FILE_NAME RELEASE_LIB_FILE_NAME INCLUDE_DIR) + ADD_LIBRARY(${NAMESPACE}::${LIB_NAME} STATIC IMPORTED) + SET_TARGET_PROPERTIES(${NAMESPACE}::${LIB_NAME} PROPERTIES + IMPORTED_CONFIGURATIONS "RELEASE;DEBUG" + IMPORTED_LOCATION_RELEASE "${RELEASE_LIB_FILE_NAME}" + IMPORTED_LOCATION_DEBUG "${DEBUG_LIB_FILE_NAME}" + INTERFACE_INCLUDE_DIRECTORIES "${INCLUDE_DIR}" + ) + SET(${NAMESPACE}_${LIB_NAME}_FOUND 1) +ENDFUNCTION() + +GET_FILENAME_COMPONENT(ROOT "${CMAKE_CURRENT_LIST_FILE}" PATH) +GET_FILENAME_COMPONENT(ROOT "${ROOT}" PATH) +GET_FILENAME_COMPONENT(ROOT "${ROOT}" PATH) + +SET_LIBRARY_TARGET("IPSEC" "ipsec" "${ROOT}/debug/lib/libIPSec_MB.a" "${ROOT}/lib/libIPSec_MB.a" "${ROOT}/include/intel-ipsec") diff --git a/vcpkg/ports/intel-ipsec/portfile.cmake b/vcpkg/ports/intel-ipsec/portfile.cmake new file mode 100644 index 0000000..501239b --- /dev/null +++ b/vcpkg/ports/intel-ipsec/portfile.cmake @@ -0,0 +1,60 @@ +IF (VCPKG_TARGET_IS_WINDOWS) + SET(EXEC_ENV "Windows") +ELSE () + SET(EXEC_ENV "${VCPKG_CMAKE_SYSTEM_NAME}") +ENDIF () + +IF (NOT EXEC_ENV STREQUAL "Linux") + MESSAGE(FATAL_ERROR "Intel(R) Multi-Buffer Crypto for IPsec Library currently only supports Linux/Windows platforms") + MESSAGE(STATUS "Well, it is not true, but I didnt manage to get it working on Windows") +ENDIF () + +IF (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + MESSAGE(FATAL_ERROR "Intel(R) Multi-Buffer Crypto for IPsec Library currently only supports x64 architecture") +ELSEIF (NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + MESSAGE(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") +ENDIF () + +VCPKG_FROM_GITHUB( + OUT_SOURCE_PATH SOURCE_PATH + REPO intel/intel-ipsec-mb + REF v0.52 + SHA512 3b115fb6df53801800a63a3b62198165824a9262d579a7696f1ec365a5680282b172ffac742fe6453ae53b97043c19136adf558a85a0e51d163b27be2abc9e63 + HEAD_REF master +) + +VCPKG_FIND_ACQUIRE_PROGRAM(NASM) + +EXEC_PROGRAM(${NASM} + ARGS -v + OUTPUT_VARIABLE NASM_OUTPUT + ) +STRING(REGEX REPLACE "NASM version ([0-9]+\\.[0-9]+\\.[0-9]+).*" "\\1" + NASM_VERSION + ${NASM_OUTPUT}) +IF (NASM_VERSION VERSION_LESS 2.13.03) + MESSAGE(FATAL_ERROR "NASM version 2.13.03 (or newer) is required to build this package") +ENDIF () + +GET_FILENAME_COMPONENT(NASM_PATH ${NASM} DIRECTORY) +SET(ENV{PATH} " $ENV{PATH};${NASM_PATH} ") + +VCPKG_CONFIGURE_CMAKE( + SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR} + PREFER_NINJA + OPTIONS + -DSOURCE_PATH=${SOURCE_PATH} + -DEXEC_ENV=${VCPKG_CMAKE_SYSTEM_NAME} + -DLIBRARY_LINKAGE=${VCPKG_LIBRARY_LINKAGE} +) + +VCPKG_INSTALL_CMAKE() + +FILE(INSTALL ${SOURCE_PATH}/Release/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +FILE(INSTALL ${SOURCE_PATH}/Debug/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +FILE(INSTALL ${SOURCE_PATH}/Release/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/intel-ipsecConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +FILE(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +#VCPKG_TEST_CMAKE(PACKAGE_NAME ${PORT}) diff --git a/vcpkg/ports/intel-ipsec/usage b/vcpkg/ports/intel-ipsec/usage new file mode 100644 index 0000000..083bbca --- /dev/null +++ b/vcpkg/ports/intel-ipsec/usage @@ -0,0 +1,4 @@ +The package intel-ipsec is compatible with built-in CMake targets: + + FIND_PACKAGE(intel-ipsec CONFIG REQUIRED) + TARGET_LINK_LIBRARIES(main PRIVATE IPSEC::ipsec) diff --git a/vcpkg/ports/intel-mkl/CONTROL b/vcpkg/ports/intel-mkl/CONTROL new file mode 100644 index 0000000..0286f25 --- /dev/null +++ b/vcpkg/ports/intel-mkl/CONTROL @@ -0,0 +1,3 @@ +Source: intel-mkl +Version: 2020.0.0 +Description: Intel® Math Kernel Library (Intel® MKL) accelerates math processing routines, increases application performance, and reduces development time on Intel® processors. \ No newline at end of file diff --git a/vcpkg/ports/intel-mkl/portfile.cmake b/vcpkg/ports/intel-mkl/portfile.cmake new file mode 100644 index 0000000..4e65694 --- /dev/null +++ b/vcpkg/ports/intel-mkl/portfile.cmake @@ -0,0 +1,32 @@ +# Due to the complexity involved, this package doesn't install MKL. It instead verifies that MKL is installed. +# Other packages can depend on this package to declare a dependency on MKL. +# If this package is installed, we assume that MKL is properly installed. + +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +set(MKL_REQUIRED_VERSION "20200000") + +set(ProgramFilesx86 "ProgramFiles(x86)") +set(INTEL_ROOT $ENV{${ProgramFilesx86}}/IntelSWTools/compilers_and_libraries/windows) + +find_path(MKL_ROOT include/mkl.h PATHS $ENV{MKLROOT} ${INTEL_ROOT}/mkl DOC "Folder contains MKL") + +if (MKL_ROOT STREQUAL "MKL_ROOT-NOTFOUND") + message(FATAL_ERROR "Could not find MKL. Before continuing, please download and install MKL (${MKL_REQUIRED_VERSION} or higher) from:" + "\n https://registrationcenter.intel.com/en/products/download/3178/\n" + "\nAlso ensure vcpkg has been rebuilt with the latest version (v0.0.104 or later)") +endif() + +# file(STRINGS ${MKL_ROOT}/include/mkl_version.h MKL_VERSION_DEFINITION REGEX "__INTEL_MKL((_MINOR)|(_UPDATE))?__") +# string(REGEX MATCHALL "([0-9]+)" MKL_VERSION ${MKL_VERSION_DEFINITION}) +# list(GET MKL_VERSION 0 MKL_VERSION_MAJOR) +# list(GET MKL_VERSION 1 MKL_VERSION_MINOR) +# list(GET MKL_VERSION 2 MKL_VERSION_UPDATE) + +file(STRINGS ${MKL_ROOT}/include/mkl_version.h MKL_VERSION_DEFINITION REGEX "INTEL_MKL_VERSION") +string(REGEX MATCH "([0-9]+)" MKL_VERSION ${MKL_VERSION_DEFINITION}) + +if (MKL_VERSION LESS MKL_REQUIRED_VERSION) + message(FATAL_ERROR "MKL ${MKL_VERSION} is found but ${MKL_REQUIRED_VERSION} is required. Please download and install a more recent version of MKL from:" + "\n https://registrationcenter.intel.com/en/products/download/3178/\n") +endif() diff --git a/vcpkg/ports/intelrdfpmathlib/CMakeLists.txt b/vcpkg/ports/intelrdfpmathlib/CMakeLists.txt new file mode 100644 index 0000000..809cd34 --- /dev/null +++ b/vcpkg/ports/intelrdfpmathlib/CMakeLists.txt @@ -0,0 +1,289 @@ +cmake_minimum_required(VERSION 3.8) +project(intelrdfpmathlib C) + +set( + intelrdfpmathlib_SOURCES + float128/dpml_exception.c + float128/dpml_four_over_pi.c + float128/dpml_ux_bessel.c + float128/dpml_ux_bid.c + float128/dpml_ux_cbrt.c + float128/dpml_ux_erf.c + float128/dpml_ux_exp.c + float128/dpml_ux_int.c + float128/dpml_ux_inv_hyper.c + float128/dpml_ux_inv_trig.c + float128/dpml_ux_lgamma.c + float128/dpml_ux_log.c + float128/dpml_ux_mod.c + float128/dpml_ux_ops.c + float128/dpml_ux_ops_64.c + float128/dpml_ux_pow.c + float128/dpml_ux_powi.c + float128/dpml_ux_sqrt.c + float128/dpml_ux_trig.c + float128/sqrt_tab_t.c + src/bid128.c + src/bid128_2_str_tables.c + src/bid128_acos.c + src/bid128_acosh.c + src/bid128_add.c + src/bid128_asin.c + src/bid128_asinh.c + src/bid128_atan.c + src/bid128_atan2.c + src/bid128_atanh.c + src/bid128_cbrt.c + src/bid128_compare.c + src/bid128_cos.c + src/bid128_cosh.c + src/bid128_div.c + src/bid128_erf.c + src/bid128_erfc.c + src/bid128_exp.c + src/bid128_exp10.c + src/bid128_exp2.c + src/bid128_expm1.c + src/bid128_fdimd.c + src/bid128_fma.c + src/bid128_fmod.c + src/bid128_frexp.c + src/bid128_hypot.c + src/bid128_ldexp.c + src/bid128_lgamma.c + src/bid128_llrintd.c + src/bid128_log.c + src/bid128_log10.c + src/bid128_log1p.c + src/bid128_log2.c + src/bid128_logb.c + src/bid128_logbd.c + src/bid128_lrintd.c + src/bid128_lround.c + src/bid128_minmax.c + src/bid128_modf.c + src/bid128_mul.c + src/bid128_nearbyintd.c + src/bid128_next.c + src/bid128_nexttowardd.c + src/bid128_noncomp.c + src/bid128_pow.c + src/bid128_quantexpd.c + src/bid128_quantize.c + src/bid128_rem.c + src/bid128_round_integral.c + src/bid128_scalb.c + src/bid128_scalbl.c + src/bid128_sin.c + src/bid128_sinh.c + src/bid128_sqrt.c + src/bid128_string.c + src/bid128_tan.c + src/bid128_tanh.c + src/bid128_tgamma.c + src/bid128_to_int16.c + src/bid128_to_int32.c + src/bid128_to_int64.c + src/bid128_to_int8.c + src/bid128_to_uint16.c + src/bid128_to_uint32.c + src/bid128_to_uint64.c + src/bid128_to_uint8.c + src/bid32_acos.c + src/bid32_acosh.c + src/bid32_add.c + src/bid32_asin.c + src/bid32_asinh.c + src/bid32_atan.c + src/bid32_atan2.c + src/bid32_atanh.c + src/bid32_cbrt.c + src/bid32_compare.c + src/bid32_cos.c + src/bid32_cosh.c + src/bid32_div.c + src/bid32_erf.c + src/bid32_erfc.c + src/bid32_exp.c + src/bid32_exp10.c + src/bid32_exp2.c + src/bid32_expm1.c + src/bid32_fdimd.c + src/bid32_fma.c + src/bid32_fmod.c + src/bid32_frexp.c + src/bid32_hypot.c + src/bid32_ldexp.c + src/bid32_lgamma.c + src/bid32_llrintd.c + src/bid32_log.c + src/bid32_log10.c + src/bid32_log1p.c + src/bid32_log2.c + src/bid32_logb.c + src/bid32_logbd.c + src/bid32_lrintd.c + src/bid32_lround.c + src/bid32_minmax.c + src/bid32_modf.c + src/bid32_mul.c + src/bid32_nearbyintd.c + src/bid32_next.c + src/bid32_nexttowardd.c + src/bid32_noncomp.c + src/bid32_pow.c + src/bid32_quantexpd.c + src/bid32_quantize.c + src/bid32_rem.c + src/bid32_round_integral.c + src/bid32_scalb.c + src/bid32_scalbl.c + src/bid32_sin.c + src/bid32_sinh.c + src/bid32_sqrt.c + src/bid32_string.c + src/bid32_sub.c + src/bid32_tan.c + src/bid32_tanh.c + src/bid32_tgamma.c + src/bid32_to_bid128.c + src/bid32_to_bid64.c + src/bid32_to_int16.c + src/bid32_to_int32.c + src/bid32_to_int64.c + src/bid32_to_int8.c + src/bid32_to_uint16.c + src/bid32_to_uint32.c + src/bid32_to_uint64.c + src/bid32_to_uint8.c + src/bid64_acos.c + src/bid64_acosh.c + src/bid64_add.c + src/bid64_asin.c + src/bid64_asinh.c + src/bid64_atan.c + src/bid64_atan2.c + src/bid64_atanh.c + src/bid64_cbrt.c + src/bid64_compare.c + src/bid64_cos.c + src/bid64_cosh.c + src/bid64_div.c + src/bid64_erf.c + src/bid64_erfc.c + src/bid64_exp.c + src/bid64_exp10.c + src/bid64_exp2.c + src/bid64_expm1.c + src/bid64_fdimd.c + src/bid64_fma.c + src/bid64_fmod.c + src/bid64_frexp.c + src/bid64_hypot.c + src/bid64_ldexp.c + src/bid64_lgamma.c + src/bid64_llrintd.c + src/bid64_log.c + src/bid64_log10.c + src/bid64_log1p.c + src/bid64_log2.c + src/bid64_logb.c + src/bid64_logbd.c + src/bid64_lrintd.c + src/bid64_lround.c + src/bid64_minmax.c + src/bid64_modf.c + src/bid64_mul.c + src/bid64_nearbyintd.c + src/bid64_next.c + src/bid64_nexttowardd.c + src/bid64_noncomp.c + src/bid64_pow.c + src/bid64_quantexpd.c + src/bid64_quantize.c + src/bid64_rem.c + src/bid64_round_integral.c + src/bid64_scalb.c + src/bid64_scalbl.c + src/bid64_sin.c + src/bid64_sinh.c + src/bid64_sqrt.c + src/bid64_string.c + src/bid64_tan.c + src/bid64_tanh.c + src/bid64_tgamma.c + src/bid64_to_bid128.c + src/bid64_to_int16.c + src/bid64_to_int32.c + src/bid64_to_int64.c + src/bid64_to_int8.c + src/bid64_to_uint16.c + src/bid64_to_uint32.c + src/bid64_to_uint64.c + src/bid64_to_uint8.c + src/bid_binarydecimal.c + src/bid_convert_data.c + src/bid_decimal_data.c + src/bid_decimal_globals.c + src/bid_dpd.c + src/bid_feclearexcept.c + src/bid_fegetexceptflag.c + src/bid_feraiseexcept.c + src/bid_fesetexceptflag.c + src/bid_fetestexcept.c + src/bid_flag_operations.c + src/bid_from_int.c + src/bid_round.c + src/strtod128.c + src/strtod32.c + src/strtod64.c + src/wcstod128.c + src/wcstod32.c + src/wcstod64.c +) + +if(MSVC) + add_compile_options(/W3 ) +else() + add_compile_options(-w) +endif() + +if(WIN32) + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + add_compile_options(-Defi2=1 -DEFI2=1) + else() + add_compile_options(-DIA32= -Dia32=1) + endif() +else() + add_compile_options(-Defi2=1 -DEFI2=1) +endif() + + +include_directories(. src float128) + +add_library(intel_decimal128 ${intelrdfpmathlib_SOURCES}) + +target_compile_definitions( + intel_decimal128 PRIVATE -DDECIMAL_CALL_BY_REFERENCE=0 -DDECIMAL_GLOBAL_ROUNDING=0 -DDECIMAL_GLOBAL_EXCEPTION_FLAGS=0 +) + +if(WIN32) + target_compile_definitions(intel_decimal128 PRIVATE -DWINDOWS=1 -DWNT=1 -Dwinnt=1) +elseif(APPLE) + target_compile_definitions(intel_decimal128 PRIVATE -DLINUX=1 -Dmach=1) +elseif(CMAKE_SYSTEM_NAME MATCHES "(FreeBSD|OpenBSD|NetBSD)") + target_compile_definitions(intel_decimal128 PRIVATE -DLINUX=1 -Dfreebsd=1) +else() + target_compile_definitions(intel_decimal128 PRIVATE -DLINUX=1 -Dlinux=1) +endif() + +install( + TARGETS intel_decimal128 + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES src/dfp754.h DESTINATION include) +endif() diff --git a/vcpkg/ports/intelrdfpmathlib/CONTROL b/vcpkg/ports/intelrdfpmathlib/CONTROL new file mode 100644 index 0000000..c5c1cd0 --- /dev/null +++ b/vcpkg/ports/intelrdfpmathlib/CONTROL @@ -0,0 +1,3 @@ +Source: intelrdfpmathlib +Version: 20U2-1 +Description: Intel(R) Decimal Floating-Point Math Library diff --git a/vcpkg/ports/intelrdfpmathlib/portfile.cmake b/vcpkg/ports/intelrdfpmathlib/portfile.cmake new file mode 100644 index 0000000..fc9b0ed --- /dev/null +++ b/vcpkg/ports/intelrdfpmathlib/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "http://www.netlib.org/misc/intel/IntelRDFPMathLib20U2.tar.gz" + FILENAME "IntelRDFPMathLib20U2.tar.gz" + SHA512 4d445855f41b066b784f0c6b4e52f854df4129fa9d43569b1e1518f002b860f69796459c78de46a8ea24fb6e7aefe7f8bc1f253e78971a5ef202dab2a7b1b75a +) + +vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH +) + +set(LIB_SOURCE_PATH "${SOURCE_PATH}/LIBRARY") + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION "${LIB_SOURCE_PATH}") + +vcpkg_configure_cmake( + SOURCE_PATH "${LIB_SOURCE_PATH}" + PREFER_NINJA + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/eula.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/IntelRDFPMathLib RENAME copyright) diff --git a/vcpkg/ports/io2d/CONTROL b/vcpkg/ports/io2d/CONTROL new file mode 100644 index 0000000..596cdcd --- /dev/null +++ b/vcpkg/ports/io2d/CONTROL @@ -0,0 +1,5 @@ +Source: io2d +Version: 2019-07-11 +Port-Version: 3 +Description: a lightweight, cross platform drawing library +Build-Depends: cairo (!osx), cairo[x11] (linux), graphicsmagick (!osx) diff --git a/vcpkg/ports/io2d/Fix-FindCairo.patch b/vcpkg/ports/io2d/Fix-FindCairo.patch new file mode 100644 index 0000000..e3caa2f --- /dev/null +++ b/vcpkg/ports/io2d/Fix-FindCairo.patch @@ -0,0 +1,15 @@ +diff --git a/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt b/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt +index d0e9176..2ac638c 100644 +--- a/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt ++++ b/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt +@@ -24,7 +24,9 @@ target_include_directories(io2d_cairo PUBLIC + + target_compile_features(io2d_cairo PUBLIC cxx_std_17) + +-target_link_libraries(io2d_cairo PUBLIC io2d_core Cairo::Cairo unofficial::graphicsmagick::graphicsmagick) ++find_package(unofficial-cairo CONFIG REQUIRED) ++ ++target_link_libraries(io2d_cairo PUBLIC io2d_core unofficial::cairo::cairo unofficial::graphicsmagick::graphicsmagick) + + install( + TARGETS io2d_cairo EXPORT io2d_targets diff --git a/vcpkg/ports/io2d/fix-expat.patch b/vcpkg/ports/io2d/fix-expat.patch new file mode 100644 index 0000000..25d38bb --- /dev/null +++ b/vcpkg/ports/io2d/fix-expat.patch @@ -0,0 +1,13 @@ +diff --git a/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt b/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt +index abb1501..412f3d4 100644 +--- a/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt ++++ b/P0267_RefImpl/P0267_RefImpl/cairo/win32/CMakeLists.txt +@@ -32,7 +32,7 @@ if(MSVC) + find_library(BZ_LIB bz2) + find_library(JPEG_LIB jpeg) + find_library(TIFF_LIB tiff) +- find_library(EXPAT_LIB expat) ++ find_library(EXPAT_LIB libexpat) + find_library(LZMA_LIB lzma) + find_library(ICONV_LIB libiconv) + find_library(CHARSET_LIB libcharset) diff --git a/vcpkg/ports/io2d/fix-linux-build.patch b/vcpkg/ports/io2d/fix-linux-build.patch new file mode 100644 index 0000000..be038fa --- /dev/null +++ b/vcpkg/ports/io2d/fix-linux-build.patch @@ -0,0 +1,22 @@ +diff --git a/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt b/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt +index 5ebeb6a..d0e9176 100644 +--- a/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt ++++ b/P0267_RefImpl/P0267_RefImpl/cairo/CMakeLists.txt +@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.8) + project(io2d CXX) + + find_package(Cairo REQUIRED) +-find_package(GraphicsMagick REQUIRED) ++find_package(unofficial-graphicsmagick REQUIRED) + + add_library(io2d_cairo + cairo_renderer-graphicsmagickinit.cpp +@@ -24,7 +24,7 @@ target_include_directories(io2d_cairo PUBLIC + + target_compile_features(io2d_cairo PUBLIC cxx_std_17) + +-target_link_libraries(io2d_cairo PUBLIC io2d_core Cairo::Cairo GraphicsMagick::GraphicsMagick) ++target_link_libraries(io2d_cairo PUBLIC io2d_core Cairo::Cairo unofficial::graphicsmagick::graphicsmagick) + + install( + TARGETS io2d_cairo EXPORT io2d_targets diff --git a/vcpkg/ports/io2d/portfile.cmake b/vcpkg/ports/io2d/portfile.cmake new file mode 100644 index 0000000..f6f9011 --- /dev/null +++ b/vcpkg/ports/io2d/portfile.cmake @@ -0,0 +1,46 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cpp-io2d/P0267_RefImpl + REF add3c9792dcd3f08c497ae3adafb2a3b5b5fc338 + SHA512 2727342fbb31523583374ab6df6ff7542e80b4f94319cf0f293e8c085711fa10ed312b4fc4b91391112b5e27eaaae519cb4141ea9d4108ffb5b7383a043b38b8 + HEAD_REF master + PATCHES + fix-linux-build.patch + Fix-FindCairo.patch + fix-expat.patch +) + +if (VCPKG_TARGET_IS_OSX) + set(IO2D_DEFAULT_OPTION "-DIO2D_DEFAULT=COREGRAPHICS_MAC") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DIO2D_WITHOUT_SAMPLES=1 + -DIO2D_WITHOUT_TESTS=1 + -DCMAKE_INSTALL_INCLUDEDIR:STRING=include + ${IO2D_DEFAULT_OPTION} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/io2d) + +if (NOT VCPKG_TARGET_IS_OSX) + file(RENAME ${CURRENT_PACKAGES_DIR}/share/io2d/io2dConfig.cmake ${CURRENT_PACKAGES_DIR}/share/io2d/io2dTargets.cmake) + file(WRITE ${CURRENT_PACKAGES_DIR}/share/io2d/io2dConfig.cmake " + include(CMakeFindDependencyMacro) + find_dependency(unofficial-cairo CONFIG) + find_dependency(unofficial-graphicsmagick CONFIG) + + include(\${CMAKE_CURRENT_LIST_DIR}/io2dTargets.cmake) + ") +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/irrlicht/CMakeLists.txt b/vcpkg/ports/irrlicht/CMakeLists.txt new file mode 100644 index 0000000..d7e0c8f --- /dev/null +++ b/vcpkg/ports/irrlicht/CMakeLists.txt @@ -0,0 +1,223 @@ +# +# Irrlicht 3D engine +# +cmake_minimum_required(VERSION 3.8) +project(Irrlicht) + +set_property(GLOBAL PROPERTY USE_FOLDERS ON) + +# Irrlicht directories +# ------------------------------------------------------------------------------------------------- +set(IRR_SRC_DIR "source/Irrlicht") +set(IRR_INC_DIR "include") +set(IRR_TOOL_DIR "tools") + +# Options +# ------------------------------------------------------------------------------------------------- +set(DXSDK "") +if(DEFINED ENV{DXSDK_DIR}) + set(DXSDK "$ENV{DXSDK_DIR}") +endif() + +set(IRR_UNICODE_PATH 0 CACHE BOOL "Whether to enable unicode path support on windows") +set(IRR_FAST_MATH 0 CACHE BOOL "Whether to enable fast maths (at the expense of precision)") +set(IRR_SHARED_LIB 1 CACHE BOOL "Whether to generate shared libraries instead of static libraries") +set(IRR_DIRECTX_SDK ${DXSDK} CACHE PATH "Path to the DirectX SDK (for DirectX 9, this folder should contain /Include, /Lib)") +set(IRR_BUILD_TOOLS 0 CACHE BOOL "Whether to generate the tools") + +# Some helper functions +# ------------------------------------------------------------------------------------------------- +function(glob_c_cpp_sources result folder) + file(GLOB res + "${folder}/*.c" + "${folder}/*.cpp" + "${folder}/*.h" + "${folder}/*.hpp" + "${folder}/*.rc") + set(${result} ${res} PARENT_SCOPE) +endfunction() + +# Source files +# ------------------------------------------------------------------------------------------------- +glob_c_cpp_sources(IRR_SRC_FILES ${IRR_SRC_DIR}) +glob_c_cpp_sources(IRR_SRC_FILES_INTERFACE ${IRR_INC_DIR}) +glob_c_cpp_sources(IRR_SRC_FILES_AESGLADMAN ${IRR_SRC_DIR}/aesGladman) +glob_c_cpp_sources(IRR_SRC_FILES_LZMA ${IRR_SRC_DIR}/lzma) + +glob_c_cpp_sources(IRR_TOOL_FILES_FILE_TO_HEADER ${IRR_TOOL_DIR}/FileToHeader/) +glob_c_cpp_sources(IRR_TOOL_FILES_GUI_EDITOR ${IRR_TOOL_DIR}/GUIEditor/) +glob_c_cpp_sources(IRR_TOOL_FILES_FONT_TOOL ${IRR_TOOL_DIR}/IrrFontTool/newFontTool/) +glob_c_cpp_sources(IRR_TOOL_FILES_MESH_CONVERTER ${IRR_TOOL_DIR}/MeshConverter/) + +# Group files +# ------------------------------------------------------------------------------------------------- +source_group(Irrlicht\\engine FILES ${IRR_SRC_FILES}) +source_group(Irrlicht\\interface FILES ${IRR_SRC_FILES_INTERFACE}) +source_group(Irrlicht\\libs\\aesGladman FILES ${IRR_SRC_FILES_AESGLADMAN}) +source_group(Irrlicht\\libs\\lzma FILES ${IRR_SRC_FILES_LZMA}) + +# Library files +# ------------------------------------------------------------------------------------------------- +find_package(ZLIB REQUIRED) +find_package(PNG REQUIRED) +find_package(JPEG REQUIRED) +find_package(BZip2 REQUIRED) +#find_package(LIBLZMA REQUIRED) # LIBLZMA does not export _LzmaDecode + +# Irrlicht target +# ------------------------------------------------------------------------------------------------- +set(IRR_ALL_SRC_FILES + ${IRR_SRC_FILES} + ${IRR_SRC_FILES_INTERFACE} + ${IRR_SRC_FILES_AESGLADMAN} + ${IRR_SRC_FILES_LZMA} + ) + +if(${IRR_SHARED_LIB}) + add_library(Irrlicht SHARED ${IRR_ALL_SRC_FILES}) +else() + add_library(Irrlicht STATIC ${IRR_ALL_SRC_FILES}) +endif() + +target_link_libraries(Irrlicht PRIVATE + ${PNG_LIBRARY} + ${JPEG_LIBRARY} + ${ZLIB_LIBRARY} + ${BZIP2_LIBRARY} + ) + +if(IRR_BUILD_TOOLS) + add_executable(FileToHeader ${IRR_TOOL_FILES_FILE_TO_HEADER}) + + add_executable(GUIEditor ${IRR_TOOL_FILES_GUI_EDITOR}) + target_link_libraries(GUIEditor Irrlicht) + + add_executable(FontTool ${IRR_TOOL_FILES_FONT_TOOL}) + target_link_libraries(FontTool Irrlicht) + + add_executable(MeshConverter ${IRR_TOOL_FILES_MESH_CONVERTER}) + target_link_libraries(MeshConverter Irrlicht) +endif() + +# Target properties (for compilation & export) +# ------------------------------------------------------------------------------------------------- +target_include_directories(Irrlicht + PRIVATE ${IRR_SRC_DIR} + PRIVATE ${IRR_SRC_DIR}/aesGladman + PRIVATE ${BZIP2_INCLUDE_DIR} + PRIVATE ${JPEG_INCLUDE_DIR} + PRIVATE ${LIBPNG_INCLUDE_DIR} + PRIVATE ${IRR_SRC_DIR}/lzma + PRIVATE ${ZLIB_INCLUDE_DIR} + ) + +# I dont realy understand why this is necesary or what it is doing, +# but it is necesarry to build and export a package. +# See: https://cmake.org/cmake/help/v3.8/command/target_include_directories.html +target_include_directories(Irrlicht PUBLIC + $ + $ # /include/irrlicht +) + +if(NOT ${IRR_DIRECTX_SDK} STREQUAL "") + target_include_directories(Irrlicht PRIVATE ${IRR_DIRECTX_SDK}/Include) + if(${CMAKE_SIZEOF_VOID_P} EQUAL 4) + set(DX_LIBS ${IRR_DIRECTX_SDK}/Lib/x86) + else() + set(DX_LIBS ${IRR_DIRECTX_SDK}/Lib/x64) + endif() + target_link_libraries(Irrlicht + PRIVATE ${DX_LIBS}/d3dx9.lib + PRIVATE ${DX_LIBS}/dinput8.lib + PRIVATE ${DX_LIBS}/dxguid.lib) +else() + target_compile_definitions(Irrlicht PRIVATE NO_IRR_COMPILE_WITH_DIRECT3D_9_) +endif() + +if(NOT ${IRR_SHARED_LIB}) + target_compile_definitions(Irrlicht PUBLIC _IRR_STATIC_LIB_) +endif() + +# Disable Irrlicht building already provided dependencies +target_compile_definitions(Irrlicht + PRIVATE NO_IRR_USE_NON_SYSTEM_ZLIB_ + PRIVATE NO_IRR_USE_NON_SYSTEM_LIB_PNG_ + PRIVATE NO_IRR_USE_NON_SYSTEM_BZLIB_ + PRIVATE NO_IRR_USE_NON_SYSTEM_JPEG_LIB_ + ) + +# Per platform config +# ------------------------------------------------------------------------------------------------- + +# Export symbols +target_compile_definitions(Irrlicht PRIVATE IRRLICHT_EXPORTS) + +if(WIN32) + # Import the symbols of bzip2 + target_compile_definitions(Irrlicht PRIVATE BZ_IMPORT) + + # Disable the ton of warnings from standard library + target_compile_definitions(Irrlicht PRIVATE _CRT_SECURE_NO_WARNINGS) + + # Multi processor compilation + target_compile_options(Irrlicht PRIVATE /MP) + + # Unicode + if(${IRR_UNICODE_PATH}) + target_compile_definitions(Irrlicht PRIVATE UNICODE _UNICODE) + target_compile_definitions(Irrlicht PUBLIC _IRR_WCHAR_FILESYSTEM) + endif() + + # Fast math options + if(${IRR_FAST_MATH}) + target_compile_options(Irrlicht PRIVATE /fp:fast) + message("Fast Math Enabled") + # SSE2 is automatically activated on x64 + if(${CMAKE_SIZEOF_VOID_P} EQUAL 4) + target_compile_options(Irrlicht PRIVATE /arch:SSE2) + endif() + endif() + +elseif(UNIX) + # Standard mode + target_compile_options(Irrlicht + PRIVATE -Wall + PRIVATE -pipe + PRIVATE -fno-exceptions + PRIVATE -fno-strict-aliasing) + + # Disable RTTI on C++ files only (no sense for C files) + set_source_files_properties(${IRR_SRC_FILES} ${IRR_SRC_FILES_AESGLADMAN} + PROPERTIES COMPILE_FLAGS -fno-rtti) + + # Debug macro + target_compile_options(Irrlicht PRIVATE $<$:-D_DEBUG>) + + # X11 and OpenGL + target_link_libraries(Irrlicht + PRIVATE X11 + PRIVATE GL + PRIVATE Xxf86vm) +endif() + +# Installation +# ------------------------------------------------------------------------------------------------- +install( + TARGETS Irrlicht + EXPORT Irrlicht + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install(FILES ${IRR_SRC_FILES_INTERFACE} DESTINATION "include/irrlicht" CONFIGURATIONS Release) + +if(IRR_BUILD_TOOLS) + install( + TARGETS FileToHeader GUIEditor FontTool MeshConverter + RUNTIME DESTINATION tools/irrlicht/ + CONFIGURATIONS Release + ) +endif() + +install(EXPORT Irrlicht FILE irrlicht-targets.cmake DESTINATION share/irrlicht) diff --git a/vcpkg/ports/irrlicht/CONTROL b/vcpkg/ports/irrlicht/CONTROL new file mode 100644 index 0000000..e8ff45b --- /dev/null +++ b/vcpkg/ports/irrlicht/CONTROL @@ -0,0 +1,15 @@ +Source: irrlicht +Version: 1.8.4-10 +Homepage: http://irrlicht.sourceforge.net +Description: Irrlicht lightning fast 3d engine +Build-Depends: zlib, libpng, bzip2, libjpeg-turbo +Supports: !(arm|uwp|osx) + +Feature: unicode +Description: Support unicode path on windows + +Feature: fast-fpu +Description: Enable fast maths (at the expense of precision) + +Feature: tools +Description: Build the Tools FileToHeader, FontTool, GUIEditor and MeshConverter diff --git a/vcpkg/ports/irrlicht/LICENSE.txt b/vcpkg/ports/irrlicht/LICENSE.txt new file mode 100644 index 0000000..17248fd --- /dev/null +++ b/vcpkg/ports/irrlicht/LICENSE.txt @@ -0,0 +1,20 @@ +The Irrlicht Engine License +=========================== + +Copyright (C) 2002-2015 Nikolaus Gebhardt + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgement in the product documentation would be + appreciated but is not required. +2. Altered source versions must be clearly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. \ No newline at end of file diff --git a/vcpkg/ports/irrlicht/fix-encoding.patch b/vcpkg/ports/irrlicht/fix-encoding.patch new file mode 100644 index 0000000..d01bfad --- /dev/null +++ b/vcpkg/ports/irrlicht/fix-encoding.patch @@ -0,0 +1,13 @@ +diff --git a/include/Keycodes.h b/include/Keycodes.h +index e56eca1..57ab312 100644 +--- a/include/Keycodes.h ++++ b/include/Keycodes.h +@@ -89,7 +89,7 @@ namespace irr + KEY_KEY_X = 0x58, // X key + KEY_KEY_Y = 0x59, // Y key + KEY_KEY_Z = 0x5A, // Z key +- KEY_LWIN = 0x5B, // Left Windows key (Microsoft® Natural® keyboard) ++ KEY_LWIN = 0x5B, // Left Windows key (Microsoft® Natural® keyboard) + KEY_RWIN = 0x5C, // Right Windows key (Natural keyboard) + KEY_APPS = 0x5D, // Applications key (Natural keyboard) + KEY_SLEEP = 0x5F, // Computer Sleep key diff --git a/vcpkg/ports/irrlicht/fix-sysctl.patch b/vcpkg/ports/irrlicht/fix-sysctl.patch new file mode 100644 index 0000000..98c7027 --- /dev/null +++ b/vcpkg/ports/irrlicht/fix-sysctl.patch @@ -0,0 +1,12 @@ +--- a/source/Irrlicht/COSOperator.cpp ++++ b/source/Irrlicht/COSOperator.cpp +@@ -11,8 +11,8 @@ + #else + #include + #include +-#ifndef _IRR_SOLARIS_PLATFORM_ + #include ++#ifdef _IRR_OSX_PLATFORM_ + #include + #endif + #endif diff --git a/vcpkg/ports/irrlicht/portfile.cmake b/vcpkg/ports/irrlicht/portfile.cmake new file mode 100644 index 0000000..754119f --- /dev/null +++ b/vcpkg/ports/irrlicht/portfile.cmake @@ -0,0 +1,48 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "osx" "uwp") + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO irrlicht/Irrlicht%20SDK + REF 1.8/1.8.4 + FILENAME "irrlicht-1.8.4.zip" + SHA512 de69ddd2c6bc80a1b27b9a620e3697b1baa552f24c7d624076d471f3aecd9b15f71dce3b640811e6ece20f49b57688d428e3503936a7926b3e3b0cc696af98d1 + PATCHES fix-encoding.patch fix-sysctl.patch +) + +configure_file(${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + unicode IRR_UNICODE_PATH + fast-fpu IRR_FAST_MATH + tools IRR_BUILD_TOOLS +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SHARED_LIB) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DIRR_SHARED_LIB=${SHARED_LIB} + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets() + +if("tools" IN_LIST FEATURES) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/irrlicht/) +endif() + +file(WRITE ${CURRENT_PACKAGES_DIR}/share/irrlicht/irrlicht-config.cmake "include(\${CMAKE_CURRENT_LIST_DIR}/irrlicht-targets.cmake)") + +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/irrlicht) +endif() + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/irrlicht/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/irrlicht/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..4cfdb8a --- /dev/null +++ b/vcpkg/ports/irrlicht/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,11 @@ +_find_package(${ARGS}) +find_package(ZLIB REQUIRED) +find_package(PNG REQUIRED) +find_package(JPEG REQUIRED) +find_package(BZip2 REQUIRED) +if(TARGET Irrlicht::Irrlicht) + set_property(TARGET Irrlicht::Irrlicht APPEND PROPERTY INTERFACE_LINK_LIBRARIES ZLIB::ZLIB PNG::PNG JPEG::JPEG BZip2::BZip2) +endif() +if(IRRLICHT_LIBRARIES) + list(APPEND IRRLICHT_LIBRARIES ${ZLIB_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${BZIP2_LIBRARIES}) +endif() diff --git a/vcpkg/ports/irrxml/portfile.cmake b/vcpkg/ports/irrxml/portfile.cmake new file mode 100644 index 0000000..065116c --- /dev/null +++ b/vcpkg/ports/irrxml/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/vcpkg/ports/irrxml/vcpkg.json b/vcpkg/ports/irrxml/vcpkg.json new file mode 100644 index 0000000..c84eba7 --- /dev/null +++ b/vcpkg/ports/irrxml/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "irrxml", + "version-string": "0", + "description": "Alias port for irrlicht", + "dependencies": [ + "irrlicht" + ] +} diff --git a/vcpkg/ports/isal/CMakeLists.txt b/vcpkg/ports/isal/CMakeLists.txt new file mode 100644 index 0000000..b479e15 --- /dev/null +++ b/vcpkg/ports/isal/CMakeLists.txt @@ -0,0 +1,51 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 3.9) +PROJECT(isal C) + +IF (SOURCE_PATH) + SET(CMAKE_SOURCE_DIR ${SOURCE_PATH}) +ENDIF () + +INCLUDE(ProcessorCount) +PROCESSORCOUNT(PROCS) + +FIND_PROGRAM(NASM nasm) +IF (NOT NASM) + MESSAGE(FATAL_ERROR "NASM not found") +ENDIF () + +IF (EXEC_ENV STREQUAL "Windows") + FIND_PROGRAM(MAKE nmake) + IF (NOT MAKE) + MESSAGE(FATAL_ERROR "nmake not found") + ENDIF () +ELSEIF(EXEC_ENV STREQUAL "Linux") + FIND_PROGRAM(MAKE make) + IF (NOT MAKE) + MESSAGE(FATAL_ERROR "MAKE not found") + ENDIF () +ENDIF() + +SET(MAKE_FLAGS "-f") + +IF (EXEC_ENV STREQUAL Windows) + STRING(APPEND MAKE_FLAGS " Makefile.nmake /E CC=cl AS=nasm") +ELSEIF (EXEC_ENV STREQUAL Linux) + STRING(APPEND MAKE_FLAGS "Makefile.unx") +ENDIF () + +ADD_CUSTOM_TARGET(isal ALL + COMMAND ${MAKE} ${MAKE_FLAGS} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/ + ) + +SET(LIB_PATH ${CMAKE_SOURCE_DIR}/bin/) +IF (LIBRARY_LINKAGE STREQUAL "dynamic") + STRING(APPEND LIB_PATH isal.so) +ELSEIF (LIBRARY_LINKAGE STREQUAL "static") + STRING(APPEND LIB_PATH isa-l.a) +ELSE () + MESSAGE(FATAL_ERROR "Unknown linkage type ${LIBRARY_LINKAGE}") +ENDIF () +INSTALL(FILES ${LIB_PATH} + DESTINATION ${CMAKE_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/lib/) +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/include DESTINATION ${CMAKE_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/) \ No newline at end of file diff --git a/vcpkg/ports/isal/CONTROL b/vcpkg/ports/isal/CONTROL new file mode 100644 index 0000000..e478ee5 --- /dev/null +++ b/vcpkg/ports/isal/CONTROL @@ -0,0 +1,4 @@ +Source: isal +Version: 2.25.0 +Description: Intel(R) Intelligent Storage Acceleration Library + diff --git a/vcpkg/ports/isal/isalConfig.cmake b/vcpkg/ports/isal/isalConfig.cmake new file mode 100644 index 0000000..3348ec4 --- /dev/null +++ b/vcpkg/ports/isal/isalConfig.cmake @@ -0,0 +1,17 @@ + +FUNCTION(SET_LIBRARY_TARGET NAMESPACE LIB_NAME DEBUG_LIB_FILE_NAME RELEASE_LIB_FILE_NAME INCLUDE_DIR) + ADD_LIBRARY(${NAMESPACE}::${LIB_NAME} STATIC IMPORTED) + SET_TARGET_PROPERTIES(${NAMESPACE}::${LIB_NAME} PROPERTIES + IMPORTED_CONFIGURATIONS "RELEASE;DEBUG" + IMPORTED_LOCATION_RELEASE "${RELEASE_LIB_FILE_NAME}" + IMPORTED_LOCATION_DEBUG "${DEBUG_LIB_FILE_NAME}" + INTERFACE_INCLUDE_DIRECTORIES "${INCLUDE_DIR}" + ) + SET(${NAMESPACE}_${LIB_NAME}_FOUND 1) +ENDFUNCTION() + +GET_FILENAME_COMPONENT(ROOT "${CMAKE_CURRENT_LIST_FILE}" PATH) +GET_FILENAME_COMPONENT(ROOT "${ROOT}" PATH) +GET_FILENAME_COMPONENT(ROOT "${ROOT}" PATH) + +SET_LIBRARY_TARGET("ISAL" "isal" "${ROOT}/debug/lib/isa-l.a" "${ROOT}/lib/isa-l.a" "${ROOT}/include/isal") diff --git a/vcpkg/ports/isal/portfile.cmake b/vcpkg/ports/isal/portfile.cmake new file mode 100644 index 0000000..0fbb6f6 --- /dev/null +++ b/vcpkg/ports/isal/portfile.cmake @@ -0,0 +1,50 @@ +INCLUDE(vcpkg_common_functions) + +IF (NOT VCPKG_CMAKE_SYSTEM_NAME) + SET(EXEC_ENV "Windows") +ELSE () + SET(EXEC_ENV "${VCPKG_CMAKE_SYSTEM_NAME}") +ENDIF () + +IF (NOT EXEC_ENV STREQUAL "Linux") + MESSAGE(FATAL_ERROR "Intel(R) Intelligent Storage Acceleration Library currently only supports Linux platforms") + MESSAGE(STATUS "Well, it is not true, but I didnt manage to get it working on Windows") +ENDIF () + +IF (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + MESSAGE(FATAL_ERROR "Intel(R) Intelligent Storage Acceleration Library currently only supports x64 architecture") +ELSEIF (NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + MESSAGE(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") +ENDIF () + +VCPKG_FROM_GITHUB( + OUT_SOURCE_PATH SOURCE_PATH + REPO 01org/isa-l + REF v2.25.0 + SHA512 aa556c8ba26b4637493b3de50a23636668bcfd71249029c52fe6983d0bcf120d1b91f39aaa259cb58e59448d401366f3bfaaee24609db7e6a1cd3fdf1a953efe + HEAD_REF master +) + +VCPKG_FIND_ACQUIRE_PROGRAM(NASM) +GET_FILENAME_COMPONENT(NASM_PATH ${NASM} DIRECTORY) +SET(ENV{PATH} "$ENV{PATH};${NASM_PATH}") + +VCPKG_CONFIGURE_CMAKE( + SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR} + PREFER_NINJA + OPTIONS + -DSOURCE_PATH=${SOURCE_PATH} + -DEXEC_ENV:STRING=${EXEC_ENV} + -DLIBRARY_LINKAGE:STRING=${VCPKG_LIBRARY_LINKAGE} +) + +VCPKG_INSTALL_CMAKE() + +FILE(INSTALL ${SOURCE_PATH}/Release/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +FILE(INSTALL ${SOURCE_PATH}/Debug/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +FILE(INSTALL ${SOURCE_PATH}/Release/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/isalConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +FILE(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +#VCPKG_TEST_CMAKE(PACKAGE_NAME ${PORT}) diff --git a/vcpkg/ports/isal/usage b/vcpkg/ports/isal/usage new file mode 100644 index 0000000..23870b2 --- /dev/null +++ b/vcpkg/ports/isal/usage @@ -0,0 +1,5 @@ +The package isal is compatible with built-in CMake targets: + + FIND_PACKAGE(isal REQUIRED) + TARGET_LINK_LIBRARIES(main PRIVATE ISAL::isa-l) for static linkage or + TARGET_LINK_LIBRARIES(main PRIVATE ISAL::isal) for dynamic linkage diff --git a/vcpkg/ports/ismrmrd/CONTROL b/vcpkg/ports/ismrmrd/CONTROL new file mode 100644 index 0000000..a86ed84 --- /dev/null +++ b/vcpkg/ports/ismrmrd/CONTROL @@ -0,0 +1,5 @@ +Source: ismrmrd +Version: 1.4.2 +Description: ISMRM Raw Data Format +Build-Depends: pugixml, hdf5, boost, fftw3 +Homepage: https://github.com/ismrmrd/ismrmrd \ No newline at end of file diff --git a/vcpkg/ports/ismrmrd/fix-depends-hdf5.patch b/vcpkg/ports/ismrmrd/fix-depends-hdf5.patch new file mode 100644 index 0000000..26b01de --- /dev/null +++ b/vcpkg/ports/ismrmrd/fix-depends-hdf5.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2144fd3..68f9ca9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -108,7 +108,11 @@ endif() + if (USE_HDF5_DATASET_SUPPORT) + if (VCPKG_TARGET_TRIPLET) #VCPKG HDF5 is packaged differently. + find_package(HDF5 CONFIG COMPONENTS C shared REQUIRED) +- set(HDF5_C_LIBRARIES hdf5::hdf5-shared) ++ if (BUILD_SHARED_LIBS) ++ set(HDF5_C_LIBRARIES hdf5::hdf5-shared) ++ else() ++ set(HDF5_C_LIBRARIES hdf5::hdf5-static) ++ endif() + else () + find_package(HDF5 COMPONENTS C REQUIRED) + endif () diff --git a/vcpkg/ports/ismrmrd/portfile.cmake b/vcpkg/ports/ismrmrd/portfile.cmake new file mode 100644 index 0000000..d702d4f --- /dev/null +++ b/vcpkg/ports/ismrmrd/portfile.cmake @@ -0,0 +1,78 @@ +if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") + set(WIN32_INCLUDE_STDDEF_PATCH "x86-windows-include-stddef.patch") +endif() + + + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ismrmrd/ismrmrd + REF v1.4.2.1 + SHA512 8d3f3efb9fc52464c626d8a4b4328f92f69ea6a709aa1b4d4312c9740a342094cadecd028ac169b6c89df92503037a3156172d7955abcd616630f0a309b9e0b5 + HEAD_REF master + PATCHES + ${STATIC_PATCH} + ${WIN32_INCLUDE_STDDEF_PATCH} + fix-depends-hdf5.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DUSE_SYSTEM_PUGIXML=ON + -DUSE_HDF5_DATASET_SUPPORT=ON + -DVCPKG_TARGET_TRIPLET=ON + -DBUILD_TESTS=OFF + -DBUILD_EXAMPLES=OFF + -DBUILD_UTILITIES=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/ismrmrd/cmake) + +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/ismrmrd.dll) + file(COPY ${CURRENT_PACKAGES_DIR}/lib/ismrmrd.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/ismrmrd.dll) +endif() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/ismrmrd.dll) + file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/ismrmrd.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/ismrmrd.dll) +endif() + + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/FindFFTW3.cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/FindFFTW3.cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/ismrmrd/FindFFTW3.cmake) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/ismrmrd/cmake) + +set(ISMRMRD_CMAKE_DIRS ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +foreach(ISMRMRD_CMAKE_DIR IN LISTS ISMRMRD_CMAKE_DIRS) +if (EXISTS ${ISMRMRD_CMAKE_DIR}) + file(GLOB ISMRMRD_CMAKE_FILES "${ISMRMRD_CMAKE_DIR}/ISMRMRD/ISMRMRD*.cmake") + foreach(ICF ${ISMRMRD_CMAKE_FILES}) + file(COPY ${ICF} DESTINATION ${CURRENT_PACKAGES_DIR}/share/ismrmrd/cmake/) + endforeach() +endif() +endforeach() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${ISMRMRD_CMAKE_DIRS}) + +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + set(EXECUTABLE_SUFFIX ".exe") +endif() + + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/ismrmrd) diff --git a/vcpkg/ports/ismrmrd/x86-windows-include-stddef.patch b/vcpkg/ports/ismrmrd/x86-windows-include-stddef.patch new file mode 100644 index 0000000..3855f86 --- /dev/null +++ b/vcpkg/ports/ismrmrd/x86-windows-include-stddef.patch @@ -0,0 +1,14 @@ +diff --git a/include/ismrmrd/ismrmrd.h b/include/ismrmrd/ismrmrd.h +index 40614eb..e5e3e25 100644 +--- a/include/ismrmrd/ismrmrd.h ++++ b/include/ismrmrd/ismrmrd.h +@@ -30,6 +30,9 @@ typedef unsigned __int32 uint32_t; + typedef __int64 int64_t; + typedef unsigned __int64 uint64_t; + #endif ++#if _WIN32 ++#include /* for size_t */ ++#endif + #else /* non MS C or C++ compiler */ + #include + #include /* for size_t */ diff --git a/vcpkg/ports/itk/CONTROL b/vcpkg/ports/itk/CONTROL new file mode 100644 index 0000000..9413537 --- /dev/null +++ b/vcpkg/ports/itk/CONTROL @@ -0,0 +1,38 @@ +Source: itk +Version: 5.1.0 +Port-Version: 2 +Description: Insight Segmentation and Registration Toolkit (ITK) is used for image processing and analysis. +Homepage: https://github.com/InsightSoftwareConsortium/ITK +Build-Depends: double-conversion, libjpeg-turbo, zlib, libpng, tiff, expat, eigen3, hdf5[core,cpp], openjpeg[core], fftw3[core], gtest, gdcm, icu, minc + +Feature: vtk +Description: Build ITKVtkGlue module. +Build-Depends: vtk[core] + +Feature: python +Description: Python functionality for ITK +Build-Depends: python3 + +Feature: opencl +Description: Use OpenCL +Build-Depends: opencl + +Feature: cufftw +Description: Use CUDA FFTW +Build-Depends: cuda + +Feature: cuda +Description: Build CUDA module +Build-Depends: cuda, itk[core, opencl] + +Feature: tbb +Description: Build TBB Module +Build-Depends: tbb + +Feature: rtk +Description: Build RTK Module + +Feature: tools +Description: Build RTK with tools +Build-Depends: itk[core, rtk] + diff --git a/vcpkg/ports/itk/cufftw.patch b/vcpkg/ports/itk/cufftw.patch new file mode 100644 index 0000000..17365fb --- /dev/null +++ b/vcpkg/ports/itk/cufftw.patch @@ -0,0 +1,58 @@ +From 0f47aae05217884193a39690c2beef566f4ed3b1 Mon Sep 17 00:00:00 2001 +From: Stephen Aylward +Date: Sat, 25 Apr 2020 20:15:21 -0400 +Subject: [PATCH] BUG: CUFFTW paths were not being set and unnecessary FFTW + files used + +FindFFTW sets the FFTW_INCLUDES variable. The FFTW_INCLUDE_PATH var is +specific to FFTW (not used by CUFFTW). + +FFTWGlobalConfiguration file is only needed if FFTW is being used, +not if CUFFT is being used. +--- + CMake/FindFFTW.cmake | 2 +- + Modules/Filtering/FFT/CMakeLists.txt | 2 +- + Modules/Filtering/FFT/src/CMakeLists.txt | 9 +++++---- + 3 files changed, 7 insertions(+), 6 deletions(-) + +diff --git a/CMake/FindFFTW.cmake b/CMake/FindFFTW.cmake +index 785edc2b628..e1935899cab 100644 +--- a/CMake/FindFFTW.cmake ++++ b/CMake/FindFFTW.cmake +@@ -62,7 +62,7 @@ if(ITK_USE_FFTWD OR ITK_USE_FFTWF) + find_path(FFTW_INCLUDE_PATH fftw3.h ${FFTW_INC_SEARCHPATH}) + endif() + +- if(FFTW_INCLUDE_PATH) ++ if(FFTW_INCLUDE_PATH OR CUFFTW_INCLUDE_PATH) + if(ITK_USE_CUFFTW) + file(TO_CMAKE_PATH "${CUFFTW_INCLUDE_PATH}" CUFFTW_INCLUDE_PATH) + set(FFTW_INCLUDE ${CUFFTW_INCLUDE_PATH}) +diff --git a/Modules/Filtering/FFT/CMakeLists.txt b/Modules/Filtering/FFT/CMakeLists.txt +index 7d9d1900b56..713530149cb 100644 +--- a/Modules/Filtering/FFT/CMakeLists.txt ++++ b/Modules/Filtering/FFT/CMakeLists.txt +@@ -5,5 +5,5 @@ if(ITK_USE_CUFFTW) + else() + set(ITKFFT_LIBRARIES ITKFFT) + endif() +-set(ITKFFT_INCLUDE_DIRS ${FFTW_INCLUDE_PATH}) ++set(ITKFFT_INCLUDE_DIRS ${FFTW_INCLUDE}) + itk_module_impl() +diff --git a/Modules/Filtering/FFT/src/CMakeLists.txt b/Modules/Filtering/FFT/src/CMakeLists.txt +index 3f3137b8cd4..bde3ee906f8 100644 +--- a/Modules/Filtering/FFT/src/CMakeLists.txt ++++ b/Modules/Filtering/FFT/src/CMakeLists.txt +@@ -1,7 +1,8 @@ +-set(ITKFFT_SRCS +- itkFFTWGlobalConfiguration.cxx +- itkComplexToComplexFFTImageFilter.cxx +- ) ++set(ITKFFT_SRCS itkComplexToComplexFFTImageFilter.cxx) ++ ++if( ITK_USE_FFTWF OR ITK_USE_FFTWD AND NOT ITK_USE_CUFFTW) ++ list(APPEND ITKFFT_SRCS itkFFTWGlobalConfiguration.cxx ) ++endif() + + itk_module_add_library(ITKFFT ${ITKFFT_SRCS}) + diff --git a/vcpkg/ports/itk/double-conversion.patch b/vcpkg/ports/itk/double-conversion.patch new file mode 100644 index 0000000..636dd8c --- /dev/null +++ b/vcpkg/ports/itk/double-conversion.patch @@ -0,0 +1,16 @@ +diff --git a/Modules/ThirdParty/DoubleConversion/CMakeLists.txt b/Modules/ThirdParty/DoubleConversion/CMakeLists.txt +index 16c611fd3..13978724c 100644 +--- a/Modules/ThirdParty/DoubleConversion/CMakeLists.txt ++++ b/Modules/ThirdParty/DoubleConversion/CMakeLists.txt +@@ -9,7 +9,10 @@ mark_as_advanced(ITK_USE_SYSTEM_DOUBLECONVERSION) + if(ITK_USE_SYSTEM_DOUBLECONVERSION) + find_package(double-conversion REQUIRED) + get_target_property(ITKDoubleConversion_INCLUDE_DIRS double-conversion::double-conversion INTERFACE_INCLUDE_DIRECTORIES) +- get_target_property(ITKDoubleConversion_LIBRARIES double-conversion::double-conversion LOCATION) ++ get_target_property(ITKDoubleConversion_LIBRARY_RELEASE double-conversion::double-conversion LOCATION_RELEASE) ++ get_target_property(ITKDoubleConversion_LIBRARY_DEBUG double-conversion::double-conversion LOCATION_DEBUG) ++ include(SelectLibraryConfigurations) ++ select_library_configurations(ITKDoubleConversion) + else() + set(ITKDoubleConversion_INCLUDE_DIRS + ${ITKDoubleConversion_SOURCE_DIR}/src diff --git a/vcpkg/ports/itk/hdf5.patch b/vcpkg/ports/itk/hdf5.patch new file mode 100644 index 0000000..091594c --- /dev/null +++ b/vcpkg/ports/itk/hdf5.patch @@ -0,0 +1,20 @@ +diff --git a/Modules/ThirdParty/HDF5/CMakeLists.txt b/Modules/ThirdParty/HDF5/CMakeLists.txt +index a700ecdfb..0a683a52b 100644 +--- a/Modules/ThirdParty/HDF5/CMakeLists.txt ++++ b/Modules/ThirdParty/HDF5/CMakeLists.txt +@@ -25,11 +25,11 @@ endif() + ") + endif() + +- set(ITKHDF5_LIBRARIES ) +- if(BUILD_SHARED_LIBS) +- list(APPEND ITKHDF5_LIBRARIES ${HDF5_C_SHARED_LIBRARY} ${HDF5_CXX_SHARED_LIBRARY}) ++ set(ITKHDF5_LIBRARIES) ++ if(HDF5_BUILD_SHARED_LIBS) ++ list(APPEND ITKHDF5_LIBRARIES hdf5::hdf5_cpp-shared hdf5::hdf5-shared) + else() +- list(APPEND ITKHDF5_LIBRARIES ${HDF5_C_STATIC_LIBRARY} ${HDF5_CXX_STATIC_LIBRARY}) ++ list(APPEND ITKHDF5_LIBRARIES hdf5::hdf5_cpp-static hdf5::hdf5-static) + endif() + + set(ITKHDF5_INCLUDE_DIRS diff --git a/vcpkg/ports/itk/opencl.patch b/vcpkg/ports/itk/opencl.patch new file mode 100644 index 0000000..f935d09 --- /dev/null +++ b/vcpkg/ports/itk/opencl.patch @@ -0,0 +1,176 @@ +diff --git a/Modules/Core/GPUCommon/CMakeLists.txt b/Modules/Core/GPUCommon/CMakeLists.txt +index da2d66b63..6fb476680 100644 +--- a/Modules/Core/GPUCommon/CMakeLists.txt ++++ b/Modules/Core/GPUCommon/CMakeLists.txt +@@ -24,9 +24,13 @@ if(ITK_USE_GPU AND APPLE AND NOT ITK_COMPILER_HAS_BLOCKS) + endif() + + if(ITK_USE_GPU) ++ message(STATUS "OPENCL_LIBRARIES:${OPENCL_LIBRARIES}") ++ if(TARGET OpenCL::OpenCL) ++ message(STATUS "OPENCL_LIBRARIES:${OpenCL_LIBRARIES}") ++ endif() + set(ITKGPUCommon_LIBRARIES ITKGPUCommon) +- set(ITKGPUCommon_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS}) +- set(ITKGPUCommon_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES}) ++ set(ITKGPUCommon_SYSTEM_INCLUDE_DIRS ${OpenCL_INCLUDE_DIRS}) ++ set(ITKGPUCommon_SYSTEM_LIBRARY_DIRS ${OpenCL_LIBRARIES}) + endif() + + if(NOT ITK_SOURCE_DIR) +diff --git a/Modules/Core/GPUCommon/src/CMakeLists.txt b/Modules/Core/GPUCommon/src/CMakeLists.txt +index 0b39f2a9a..160f7a752 100644 +--- a/Modules/Core/GPUCommon/src/CMakeLists.txt ++++ b/Modules/Core/GPUCommon/src/CMakeLists.txt +@@ -14,5 +14,5 @@ if (ITK_USE_GPU) + write_gpu_kernels("${ITKGPUCommon_Kernels}" ITKGPUCommon_SRCS) + + itk_module_add_library(ITKGPUCommon ${ITKGPUCommon_SRCS}) +- target_link_libraries(ITKGPUCommon LINK_PUBLIC ${OPENCL_LIBRARIES}) ++ target_link_libraries(ITKGPUCommon LINK_PUBLIC ${OpenCL_LIBRARIES}) + endif() +diff --git a/Modules/Core/GPUFiniteDifference/CMakeLists.txt b/Modules/Core/GPUFiniteDifference/CMakeLists.txt +index c1bfde450..a642d9230 100644 +--- a/Modules/Core/GPUFiniteDifference/CMakeLists.txt ++++ b/Modules/Core/GPUFiniteDifference/CMakeLists.txt +@@ -9,8 +9,8 @@ if(NOT ITK_SOURCE_DIR) + endif() + + if (ITK_USE_GPU) +- set(ITKGPUFiniteDifference_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS}) +- set(ITKGPUFiniteDifference_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES}) ++ set(ITKGPUFiniteDifference_SYSTEM_INCLUDE_DIRS ${OpenCL_INCLUDE_DIRS}) ++ set(ITKGPUFiniteDifference_SYSTEM_LIBRARY_DIRS ${OpenCL_LIBRARIES}) + set(ITKGPUFiniteDifference_LIBRARIES ITKGPUFiniteDifference) + endif() + +diff --git a/Modules/Core/GPUFiniteDifference/src/CMakeLists.txt b/Modules/Core/GPUFiniteDifference/src/CMakeLists.txt +index 8425cc025..8335c69a0 100644 +--- a/Modules/Core/GPUFiniteDifference/src/CMakeLists.txt ++++ b/Modules/Core/GPUFiniteDifference/src/CMakeLists.txt +@@ -9,5 +9,5 @@ if (ITK_USE_GPU) + write_gpu_kernels("${ITKGPUFiniteDifference_Kernels}" ITKGPUFiniteDifference_SRCS) + + itk_module_add_library(ITKGPUFiniteDifference ${ITKGPUFiniteDifference_SRCS}) +- target_link_libraries(ITKGPUFiniteDifference LINK_PUBLIC ${OPENCL_LIBRARIES}) ++ target_link_libraries(ITKGPUFiniteDifference LINK_PUBLIC ${OpenCL_LIBRARIES}) + endif() +diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/CMakeLists.txt b/Modules/Filtering/GPUAnisotropicSmoothing/CMakeLists.txt +index f36fd887d..310d983fa 100644 +--- a/Modules/Filtering/GPUAnisotropicSmoothing/CMakeLists.txt ++++ b/Modules/Filtering/GPUAnisotropicSmoothing/CMakeLists.txt +@@ -10,8 +10,8 @@ endif() + + if (ITK_USE_GPU) + set(ITKGPUAnisotropicSmoothing_LIBRARIES ITKGPUAnisotropicSmoothing) +- set(ITKGPUAnisotropicSmoothing_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS}) +- set(ITKGPUAnisotropicSmoothing_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES}) ++ set(ITKGPUAnisotropicSmoothing_SYSTEM_INCLUDE_DIRS ${OpenCL_INCLUDE_DIRS}) ++ set(ITKGPUAnisotropicSmoothing_SYSTEM_LIBRARY_DIRS ${OpenCL_LIBRARIES}) + endif() + + if(NOT ITK_SOURCE_DIR) +diff --git a/Modules/Filtering/GPUImageFilterBase/CMakeLists.txt b/Modules/Filtering/GPUImageFilterBase/CMakeLists.txt +index 078905521..67fd7b832 100644 +--- a/Modules/Filtering/GPUImageFilterBase/CMakeLists.txt ++++ b/Modules/Filtering/GPUImageFilterBase/CMakeLists.txt +@@ -10,8 +10,8 @@ endif() + + if (ITK_USE_GPU) + set(ITKGPUImageFilterBase_LIBRARIES ITKGPUImageFilterBase) +- set(ITKGPUImageFilterBase_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS}) +- set(ITKGPUImageFilterBase_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES}) ++ set(ITKGPUImageFilterBase_SYSTEM_INCLUDE_DIRS ${OpenCL_INCLUDE_DIRS}) ++ set(ITKGPUImageFilterBase_SYSTEM_LIBRARY_DIRS ${OpenCL_LIBRARIES}) + endif() + + if(NOT ITK_SOURCE_DIR) +diff --git a/Modules/Filtering/GPUImageFilterBase/src/CMakeLists.txt b/Modules/Filtering/GPUImageFilterBase/src/CMakeLists.txt +index 251493f5e..6d33fa964 100644 +--- a/Modules/Filtering/GPUImageFilterBase/src/CMakeLists.txt ++++ b/Modules/Filtering/GPUImageFilterBase/src/CMakeLists.txt +@@ -10,5 +10,5 @@ if (ITK_USE_GPU) + write_gpu_kernels("${ITKGPUImageFilterBase_Kernels}" ITKGPUImageFilterBase_SRCS) + + itk_module_add_library(ITKGPUImageFilterBase ${ITKGPUImageFilterBase_SRCS}) +- target_link_libraries(ITKGPUImageFilterBase LINK_PUBLIC ${OPENCL_LIBRARIES}) ++ target_link_libraries(ITKGPUImageFilterBase LINK_PUBLIC ${OpenCL_LIBRARIES}) + endif() +diff --git a/Modules/Filtering/GPUSmoothing/CMakeLists.txt b/Modules/Filtering/GPUSmoothing/CMakeLists.txt +index 9bac40921..2ed493d40 100644 +--- a/Modules/Filtering/GPUSmoothing/CMakeLists.txt ++++ b/Modules/Filtering/GPUSmoothing/CMakeLists.txt +@@ -10,8 +10,8 @@ endif() + + if (ITK_USE_GPU) + set(ITKGPUSmoothing_LIBRARIES ITKGPUSmoothing) +- set(ITKGPUSmoothing_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS}) +- set(ITKGPUSmoothing_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES}) ++ set(ITKGPUSmoothing_SYSTEM_INCLUDE_DIRS ${OpenCL_INCLUDE_DIRS}) ++ set(ITKGPUSmoothing_SYSTEM_LIBRARY_DIRS ${OpenCL_LIBRARIES}) + endif() + + if(NOT ITK_SOURCE_DIR) +diff --git a/Modules/Filtering/GPUSmoothing/src/CMakeLists.txt b/Modules/Filtering/GPUSmoothing/src/CMakeLists.txt +index d2120e842..2c6ca4a4a 100644 +--- a/Modules/Filtering/GPUSmoothing/src/CMakeLists.txt ++++ b/Modules/Filtering/GPUSmoothing/src/CMakeLists.txt +@@ -9,5 +9,5 @@ if (ITK_USE_GPU) + write_gpu_kernels("${ITKGPUSmoothing_Kernels}" ITKGPUSmoothing_SRCS) + + itk_module_add_library(ITKGPUSmoothing ${ITKGPUSmoothing_SRCS}) +- target_link_libraries(ITKGPUSmoothing LINK_PUBLIC ${OPENCL_LIBRARIES}) ++ target_link_libraries(ITKGPUSmoothing LINK_PUBLIC ${OpenCL_LIBRARIES}) + endif() +diff --git a/Modules/Filtering/GPUThresholding/CMakeLists.txt b/Modules/Filtering/GPUThresholding/CMakeLists.txt +index 4390785f5..61786b7a8 100644 +--- a/Modules/Filtering/GPUThresholding/CMakeLists.txt ++++ b/Modules/Filtering/GPUThresholding/CMakeLists.txt +@@ -2,8 +2,8 @@ project(ITKGPUThresholding) + + if (ITK_USE_GPU) + set(ITKGPUThresholding_LIBRARIES ITKGPUThresholding) +- set(ITKGPUThresholding_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS}) +- set(ITKGPUThresholding_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES}) ++ set(ITKGPUThresholding_SYSTEM_INCLUDE_DIRS ${OpenCL_INCLUDE_DIRS}) ++ set(ITKGPUThresholding_SYSTEM_LIBRARY_DIRS ${OpenCL_LIBRARIES}) + endif() + + itk_module_impl() +diff --git a/Modules/Filtering/GPUThresholding/src/CMakeLists.txt b/Modules/Filtering/GPUThresholding/src/CMakeLists.txt +index 326c86859..c07c80414 100644 +--- a/Modules/Filtering/GPUThresholding/src/CMakeLists.txt ++++ b/Modules/Filtering/GPUThresholding/src/CMakeLists.txt +@@ -9,5 +9,5 @@ if (ITK_USE_GPU) + write_gpu_kernels("${ITKGPUThresholding_Kernels}" ITKGPUThresholding_SRCS) + + itk_module_add_library(ITKGPUThresholding ${ITKGPUThresholding_SRCS}) +- target_link_libraries(ITKGPUThresholding LINK_PUBLIC ${OPENCL_LIBRARIES}) ++ target_link_libraries(ITKGPUThresholding LINK_PUBLIC ${OpenCL_LIBRARIES}) + endif() +diff --git a/Modules/Registration/GPUPDEDeformable/CMakeLists.txt b/Modules/Registration/GPUPDEDeformable/CMakeLists.txt +index c8d70a423..097c974c5 100644 +--- a/Modules/Registration/GPUPDEDeformable/CMakeLists.txt ++++ b/Modules/Registration/GPUPDEDeformable/CMakeLists.txt +@@ -2,8 +2,8 @@ project(ITKGPUPDEDeformableRegistration) + + if (ITK_USE_GPU) + set(ITKGPUPDEDeformableRegistration_LIBRARIES ITKGPUPDEDeformableRegistration) +- set(ITKGPUPDEDeformableRegistration_SYSTEM_INCLUDE_DIRS ${OPENCL_INCLUDE_DIRS}) +- set(ITKGPUPDEDeformableRegistration_SYSTEM_LIBRARY_DIRS ${OPENCL_LIBRARIES}) ++ set(ITKGPUPDEDeformableRegistration_SYSTEM_INCLUDE_DIRS ${OpenCL_INCLUDE_DIRS}) ++ set(ITKGPUPDEDeformableRegistration_SYSTEM_LIBRARY_DIRS ${OpenCL_LIBRARIES}) + endif() + + itk_module_impl() +diff --git a/Modules/Registration/GPUPDEDeformable/src/CMakeLists.txt b/Modules/Registration/GPUPDEDeformable/src/CMakeLists.txt +index 28b1d194c..1a049bdde 100644 +--- a/Modules/Registration/GPUPDEDeformable/src/CMakeLists.txt ++++ b/Modules/Registration/GPUPDEDeformable/src/CMakeLists.txt +@@ -10,5 +10,5 @@ if (ITK_USE_GPU) + write_gpu_kernels("${ITKGPUPDEDeformableRegistration_Kernels}" ITKGPUPDEDeformableRegistration_SRCS) + + itk_module_add_library(ITKGPUPDEDeformableRegistration ${ITKGPUPDEDeformableRegistration_SRCS}) +- target_link_libraries(ITKGPUPDEDeformableRegistration LINK_PUBLIC ${OPENCL_LIBRARIES}) ++ target_link_libraries(ITKGPUPDEDeformableRegistration LINK_PUBLIC ${OpenCL_LIBRARIES}) + endif() diff --git a/vcpkg/ports/itk/openjpeg.patch b/vcpkg/ports/itk/openjpeg.patch new file mode 100644 index 0000000..0fe1f34 --- /dev/null +++ b/vcpkg/ports/itk/openjpeg.patch @@ -0,0 +1,548 @@ +diff --git a/Modules/IO/JPEG2000/src/itkJPEG2000ImageIO.cxx b/Modules/IO/JPEG2000/src/itkJPEG2000ImageIO.cxx +index 1b1fe9526..0da4aa0c4 100644 +--- a/Modules/IO/JPEG2000/src/itkJPEG2000ImageIO.cxx ++++ b/Modules/IO/JPEG2000/src/itkJPEG2000ImageIO.cxx +@@ -26,9 +26,9 @@ + + extern "C" + { +-#include "openjpeg.h" +-#include "j2k.h" +-#include "jp2.h" ++#include ++//#include "j2k.h" ++//##include "jp2.h" + } + + +@@ -62,8 +62,7 @@ public: + OPJ_UINT32 m_TileStartX; + OPJ_UINT32 m_TileStartY; + +- OPJ_UINT32 m_NumberOfTilesInX; +- OPJ_UINT32 m_NumberOfTilesInY; ++ OPJ_UINT32 m_NumberOfTiles; + + opj_dparameters_t m_DecompressionParameters; /* decompression parameters */ + }; +@@ -86,8 +85,7 @@ JPEG2000ImageIO::JPEG2000ImageIO() + this->m_Internal->m_TileStartX = 0; + this->m_Internal->m_TileStartY = 0; + +- this->m_Internal->m_NumberOfTilesInX = 0; +- this->m_Internal->m_NumberOfTilesInY = 0; ++ this->m_Internal->m_NumberOfTiles = 0; + + const char * extensions[] = { ".j2k", ".jp2", ".jpt" }; + +@@ -139,22 +137,16 @@ JPEG2000ImageIO::ReadImageInformation() + { + itkDebugMacro(<< "ReadImageInformation()"); + +- FILE * l_file = fopen(this->m_FileName.c_str(), "rb"); +- +- /* decompression parameters */ ++ /* set decoding parameters to default values */ ++ opj_set_default_decoder_parameters(&(this->m_Internal->m_DecompressionParameters)); + +- if (!l_file) ++ opj_stream_t * cio = opj_stream_create_default_file_stream(this->m_FileName.c_str(), true); ++ if (!cio) + { + itkExceptionMacro("JPEG2000ImageIO failed to open file for reading: " << this->GetFileName() << std::endl + << "Reason: " + << itksys::SystemTools::GetLastSystemError()); + } +- +- /* set decoding parameters to default values */ +- opj_set_default_decoder_parameters(&(this->m_Internal->m_DecompressionParameters)); +- +- opj_stream_t * cio = opj_stream_create_default_file_stream(l_file, true); +- + this->m_Internal->m_Dinfo = nullptr; /* handle to a decompressor */ + + opj_image_t * l_image = nullptr; +@@ -187,14 +179,14 @@ JPEG2000ImageIO::ReadImageInformation() + /* JPEG-2000 codestream */ + + /* get a decoder handle */ +- this->m_Internal->m_Dinfo = opj_create_decompress(CODEC_J2K); ++ this->m_Internal->m_Dinfo = opj_create_decompress(OPJ_CODEC_J2K); + if (!this->m_Internal->m_Dinfo) + { + opj_stream_destroy(cio); +- fclose(l_file); ++ // fclose(l_file); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " + << this->GetFileName() << std::endl +- << "Reason: opj_create_decompress(CODEC_J2K) returns nullptr"); ++ << "Reason: opj_create_decompress(OPJ_CODEC_J2K) returns nullptr"); + } + break; + } +@@ -202,14 +194,14 @@ JPEG2000ImageIO::ReadImageInformation() + { + /* JPEG 2000 compressed image data */ + /* get a decoder handle */ +- this->m_Internal->m_Dinfo = opj_create_decompress(CODEC_JP2); ++ this->m_Internal->m_Dinfo = opj_create_decompress(OPJ_CODEC_JP2); + if (!this->m_Internal->m_Dinfo) + { + opj_stream_destroy(cio); +- fclose(l_file); ++ // fclose(l_file); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " + << this->GetFileName() << std::endl +- << "Reason: opj_create_decompress(CODEC_JP2) returns nullptr"); ++ << "Reason: opj_create_decompress(OPJ_CODEC_JP2) returns nullptr"); + } + break; + } +@@ -217,20 +209,19 @@ JPEG2000ImageIO::ReadImageInformation() + { + /* JPEG 2000, JPIP */ + /* get a decoder handle */ +- this->m_Internal->m_Dinfo = opj_create_decompress(CODEC_JPT); ++ this->m_Internal->m_Dinfo = opj_create_decompress(OPJ_CODEC_JPT); + if (!this->m_Internal->m_Dinfo) + { + opj_stream_destroy(cio); +- fclose(l_file); ++ // fclose(l_file); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " + << this->GetFileName() << std::endl +- << "Reason: opj_create_decompress(CODEC_JPT) returns nullptr"); ++ << "Reason: opj_create_decompress(OPJ_CODEC_JPT) returns nullptr"); + } + break; + } + default: + opj_stream_destroy(cio); +- fclose(l_file); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " + << this->GetFileName() << std::endl + << "Reason: " +@@ -247,27 +238,11 @@ JPEG2000ImageIO::ReadImageInformation() + << "Reason: opj_setup_decoder returns false"); + } + +- // Image parameters - first tile +- OPJ_INT32 l_tile_x0; +- OPJ_INT32 l_tile_y0; + +- // Image parameters - tile width, height and number of tiles +- OPJ_UINT32 l_tile_width; +- OPJ_UINT32 l_tile_height; +- OPJ_UINT32 l_nb_tiles_x; +- OPJ_UINT32 l_nb_tiles_y; + + itkDebugMacro(<< "Trying to read header now..."); + +- bResult = opj_read_header(this->m_Internal->m_Dinfo, +- &l_image, +- &l_tile_x0, +- &l_tile_y0, +- &l_tile_width, +- &l_tile_height, +- &l_nb_tiles_x, +- &l_nb_tiles_y, +- cio); ++ bResult = opj_read_header(cio, this->m_Internal->m_Dinfo, &l_image); + + if (!bResult) + { +@@ -283,14 +258,22 @@ JPEG2000ImageIO::ReadImageInformation() + << "Reason: Error whle reading image header"); + } + ++ // Image parameters - first tile ++ OPJ_INT32 l_tile_x0=l_image->x0; ++ OPJ_INT32 l_tile_y0=l_image->y0; ++ ++ // Image parameters - tile width, height and number of tiles ++ OPJ_UINT32 l_tile_width=l_image->x1; ++ OPJ_UINT32 l_tile_height=l_image->y1; ++ OPJ_UINT32 l_nb_tiles=l_image->numcomps; ++ + this->m_Internal->m_TileStartX = l_tile_x0; + this->m_Internal->m_TileStartY = l_tile_y0; + + this->m_Internal->m_TileWidth = l_tile_width; + this->m_Internal->m_TileHeight = l_tile_height; + +- this->m_Internal->m_NumberOfTilesInX = l_nb_tiles_x; +- this->m_Internal->m_NumberOfTilesInY = l_nb_tiles_y; ++ this->m_Internal->m_NumberOfTiles = l_nb_tiles; + + + itkDebugMacro(<< "Number of Components = " << l_image->numcomps); +@@ -319,7 +302,7 @@ JPEG2000ImageIO::ReadImageInformation() + this->SetPixelType(IOPixelEnum::SCALAR); + break; + case 3: +- if (l_image->color_space != CLRSPC_SRGB) ++ if (l_image->color_space != OPJ_CLRSPC_SRGB) + { + itkWarningMacro(<< "file does not specify color space, assuming sRGB"); + } +@@ -335,8 +318,7 @@ JPEG2000ImageIO::ReadImageInformation() + itkDebugMacro(<< "Tile Start Y = " << this->m_Internal->m_TileStartY); + itkDebugMacro(<< "Tile Width = " << this->m_Internal->m_TileWidth); + itkDebugMacro(<< "Tile Height = " << this->m_Internal->m_TileHeight); +- itkDebugMacro(<< "Number of Tiles X = " << this->m_Internal->m_NumberOfTilesInX); +- itkDebugMacro(<< "Number of Tiles Y = " << this->m_Internal->m_NumberOfTilesInY); ++ itkDebugMacro(<< "Number of Tiles = " << this->m_Internal->m_NumberOfTiles); + + itkDebugMacro(<< "image->x1 = " << l_image->x1); + itkDebugMacro(<< "image->y1 = " << l_image->y1); +@@ -349,7 +331,6 @@ JPEG2000ImageIO::ReadImageInformation() + + /* close the byte stream */ + opj_stream_destroy(cio); +- fclose(l_file); + + if (this->m_Internal->m_Dinfo) + { +@@ -368,16 +349,7 @@ JPEG2000ImageIO::Read(void * buffer) + { + itkDebugMacro(<< "JPEG2000ImageIO::Read() Begin"); + +- FILE * l_file = fopen(this->m_FileName.c_str(), "rb"); +- +- if (!l_file) +- { +- itkExceptionMacro("JPEG2000ImageIO failed to open file for reading: " << this->GetFileName() << std::endl +- << "Reason: " +- << itksys::SystemTools::GetLastSystemError()); +- } +- +- opj_stream_t * l_stream = opj_stream_create_default_file_stream(l_file, true); ++ opj_stream_t * l_stream = opj_stream_create_default_file_stream(this->m_FileName.c_str(), true); + if (!l_stream) + { + itkExceptionMacro("JPEG2000ImageIO failed to read file: " +@@ -397,12 +369,13 @@ JPEG2000ImageIO::Read(void * buffer) + { + /* JPEG-2000 codestream */ + /* get a decoder handle */ +- this->m_Internal->m_Dinfo = opj_create_decompress(CODEC_J2K); ++ this->m_Internal->m_Dinfo = opj_create_decompress(OPJ_CODEC_J2K); + if (!this->m_Internal->m_Dinfo) + { ++ opj_stream_destroy(l_stream); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " + << this->GetFileName() << std::endl +- << "Reason: opj_create_decompress(CODEC_J2K) returns nullptr"); ++ << "Reason: opj_create_decompress(OPJ_CODEC_J2K) returns nullptr"); + } + break; + } +@@ -410,12 +383,13 @@ JPEG2000ImageIO::Read(void * buffer) + { + /* JPEG 2000 compressed image data */ + /* get a decoder handle */ +- this->m_Internal->m_Dinfo = opj_create_decompress(CODEC_JP2); ++ this->m_Internal->m_Dinfo = opj_create_decompress(OPJ_CODEC_JP2); + if (!this->m_Internal->m_Dinfo) + { ++ opj_stream_destroy(l_stream); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " + << this->GetFileName() << std::endl +- << "Reason: opj_create_decompress(CODEC_JP2) returns nullptr"); ++ << "Reason: opj_create_decompress(OPJ_CODEC_JP2) returns nullptr"); + } + break; + } +@@ -423,17 +397,18 @@ JPEG2000ImageIO::Read(void * buffer) + { + /* JPEG 2000, JPIP */ + /* get a decoder handle */ +- this->m_Internal->m_Dinfo = opj_create_decompress(CODEC_JPT); ++ this->m_Internal->m_Dinfo = opj_create_decompress(OPJ_CODEC_JPT); + if (!this->m_Internal->m_Dinfo) + { ++ opj_stream_destroy(l_stream); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " + << this->GetFileName() << std::endl +- << "Reason: opj_create_decompress(CODEC_JPT) returns nullptr"); ++ << "Reason: opj_create_decompress(OPJ_CODEC_JPT) returns nullptr"); + } + break; + } + default: +- fclose(l_file); ++ opj_stream_destroy(l_stream); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " + << this->GetFileName() << std::endl + << "Reason: " +@@ -448,29 +423,13 @@ JPEG2000ImageIO::Read(void * buffer) + << "Reason: opj_setup_decoder returns false"); + } + +- OPJ_INT32 l_tile_x0, l_tile_y0; +- +- OPJ_UINT32 l_tile_width; +- OPJ_UINT32 l_tile_height; +- OPJ_UINT32 l_nb_tiles_x; +- OPJ_UINT32 l_nb_tiles_y; +- +- bool bResult = opj_read_header(this->m_Internal->m_Dinfo, +- &l_image, +- &l_tile_x0, +- &l_tile_y0, +- &l_tile_width, +- &l_tile_height, +- &l_nb_tiles_x, +- &l_nb_tiles_y, +- l_stream); ++ bool bResult = opj_read_header(l_stream, this->m_Internal->m_Dinfo,&l_image); + + if (!bResult) + { + opj_destroy_codec(this->m_Internal->m_Dinfo); + this->m_Internal->m_Dinfo = nullptr; + opj_stream_destroy(l_stream); +- fclose(l_file); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl + << "Reason: opj_read_header returns false"); + } +@@ -499,7 +458,7 @@ JPEG2000ImageIO::Read(void * buffer) + itkDebugMacro(<< "p_end_x = " << p_end_x); + itkDebugMacro(<< "p_end_y = " << p_end_y); + +- bResult = opj_set_decode_area(this->m_Internal->m_Dinfo, p_start_x, p_start_y, p_end_x, p_end_y); ++ bResult = opj_set_decode_area(this->m_Internal->m_Dinfo, l_image, p_start_x, p_start_y, p_end_x, p_end_y); + + itkDebugMacro(<< "opj_set_decode_area() after"); + +@@ -508,7 +467,6 @@ JPEG2000ImageIO::Read(void * buffer) + opj_destroy_codec(this->m_Internal->m_Dinfo); + this->m_Internal->m_Dinfo = nullptr; + opj_stream_destroy(l_stream); +- fclose(l_file); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl + << "Reason: opj_set_decode_area returns false"); + } +@@ -525,13 +483,13 @@ JPEG2000ImageIO::Read(void * buffer) + + OPJ_UINT32 l_max_data_size = 1000; + +- bool l_go_on = true; ++ int l_go_on = true; // should be OBJ_BOOL + + auto * l_data = (OPJ_BYTE *)malloc(1000); + + while (l_go_on) + { +- bool tileHeaderRead = opj_read_tile_header(this->m_Internal->m_Dinfo, ++ bool tileHeaderRead = opj_read_tile_header(this->m_Internal->m_Dinfo, l_stream, + &l_tile_index, + &l_data_size, + &l_current_tile_x0, +@@ -539,14 +497,12 @@ JPEG2000ImageIO::Read(void * buffer) + &l_current_tile_x1, + &l_current_tile_y1, + &l_nb_comps, +- &l_go_on, +- l_stream); ++ &l_go_on); + + if (!tileHeaderRead) + { + free(l_data); + opj_stream_destroy(l_stream); +- fclose(l_file); + opj_destroy_codec(this->m_Internal->m_Dinfo); + opj_image_destroy(l_image); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl +@@ -571,7 +527,6 @@ JPEG2000ImageIO::Read(void * buffer) + if (!l_data) + { + opj_stream_destroy(l_stream); +- fclose(l_file); + opj_destroy_codec(this->m_Internal->m_Dinfo); + opj_image_destroy(l_image); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl +@@ -590,7 +545,6 @@ JPEG2000ImageIO::Read(void * buffer) + { + free(l_data); + opj_stream_destroy(l_stream); +- fclose(l_file); + opj_destroy_codec(this->m_Internal->m_Dinfo); + opj_image_destroy(l_image); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl +@@ -654,7 +608,6 @@ JPEG2000ImageIO::Read(void * buffer) + { + free(l_data); + opj_stream_destroy(l_stream); +- fclose(l_file); + opj_destroy_codec(this->m_Internal->m_Dinfo); + opj_image_destroy(l_image); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl +@@ -666,14 +619,12 @@ JPEG2000ImageIO::Read(void * buffer) + opj_destroy_codec(this->m_Internal->m_Dinfo); + this->m_Internal->m_Dinfo = nullptr; + opj_stream_destroy(l_stream); +- fclose(l_file); + itkExceptionMacro("JPEG2000ImageIO failed to read file: " << this->GetFileName() << std::endl + << "Reason: error whle reading image"); + } + + /* close the byte stream */ + opj_stream_destroy(l_stream); +- fclose(l_file); + + if (this->m_Internal->m_Dinfo) + { +@@ -840,13 +791,13 @@ JPEG2000ImageIO ::Write(const void * buffer) + + parameters.numresolution = numberOfResolutions; + +- OPJ_COLOR_SPACE color_space = CLRSPC_GRAY; ++ OPJ_COLOR_SPACE color_space = OPJ_CLRSPC_GRAY; + opj_image_cmptparm_t cmptparms[3]; + + if (this->GetNumberOfComponents() == 3) + { + +- color_space = (this->GetPixelType() == IOPixelEnum::RGB) ? CLRSPC_SRGB : CLRSPC_UNSPECIFIED; ++ color_space = (this->GetPixelType() == IOPixelEnum::RGB) ? OPJ_CLRSPC_SRGB : OPJ_CLRSPC_UNSPECIFIED; + + /* initialize image components */ + memset(&cmptparms[0], 0, 3 * sizeof(opj_image_cmptparm_t)); +@@ -864,7 +815,7 @@ JPEG2000ImageIO ::Write(const void * buffer) + + if (this->GetNumberOfComponents() == 1) + { +- color_space = CLRSPC_GRAY; ++ color_space = OPJ_CLRSPC_GRAY; + + /* initialize image components */ + memset(&cmptparms[0], 0, sizeof(opj_image_cmptparm_t)); +@@ -940,32 +891,32 @@ JPEG2000ImageIO ::Write(const void * buffer) + opj_codec_t * cinfo = nullptr; + if (extension == ".j2k") + { +- cinfo = opj_create_compress(CODEC_J2K); ++ cinfo = opj_create_compress(OPJ_CODEC_J2K); + if (!cinfo) + { + itkExceptionMacro("JPEG2000ImageIO failed to write file: " + << this->GetFileName() << std::endl +- << "Reason: opj_create_compress(CODEC_J2K) returns nullptr"); ++ << "Reason: opj_create_compress(OPJ_CODEC_J2K) returns nullptr"); + } + } + else if (extension == ".jp2") + { +- cinfo = opj_create_compress(CODEC_JP2); ++ cinfo = opj_create_compress(OPJ_CODEC_JP2); + if (!cinfo) + { + itkExceptionMacro("JPEG2000ImageIO failed to write file: " + << this->GetFileName() << std::endl +- << "Reason: opj_create_compress(CODEC_JP2) returns nullptr"); ++ << "Reason: opj_create_compress(OPJ_CODEC_JP2) returns nullptr"); + } + } + else if (extension == ".jpt") + { +- cinfo = opj_create_compress(CODEC_JPT); ++ cinfo = opj_create_compress(OPJ_CODEC_JPT); + if (!cinfo) + { + itkExceptionMacro("JPEG2000ImageIO failed to write file: " + << this->GetFileName() << std::endl +- << "Reason: opj_create_compress(CODEC_JPT) returns nullptr"); ++ << "Reason: opj_create_compress(OPJ_CODEC_JPT) returns nullptr"); + } + } + else +@@ -989,17 +940,9 @@ JPEG2000ImageIO ::Write(const void * buffer) + << "Reason: opj_setup_encoder returns false"); + } + +- FILE * l_file = fopen(parameters.outfile, "wb"); +- if (!l_file) +- { +- itkExceptionMacro("JPEG2000ImageIO failed to open file for writing: " << this->GetFileName() << std::endl +- << "Reason: " +- << itksys::SystemTools::GetLastSystemError()); +- } +- + /* open a byte stream for writing */ + /* allocate memory for all tiles */ +- opj_stream_t * cio = opj_stream_create_default_file_stream(l_file, false); ++ opj_stream_t * cio = opj_stream_create_default_file_stream(parameters.outfile, false); + if (!cio) + { + itkExceptionMacro("JPEG2000ImageIO failed to write file: " +@@ -1017,8 +960,7 @@ JPEG2000ImageIO ::Write(const void * buffer) + if (!bSuccess) + { + opj_stream_destroy(cio); +- fclose(l_file); +- itkExceptionMacro("JPEG2000ImageIO failed to write file: " << this->GetFileName() << std::endl ++ itkExceptionMacro("JPEG2000ImageIO failed to write file: " << this->GetFileName() << std::endl + << "Reason: opj_start_compress returns false"); + } + +@@ -1026,7 +968,6 @@ JPEG2000ImageIO ::Write(const void * buffer) + if (!bSuccess) + { + opj_stream_destroy(cio); +- fclose(l_file); + itkExceptionMacro("JPEG2000ImageIO failed to write file: " << this->GetFileName() << std::endl + << "Reason: opj_encode returns false"); + } +@@ -1035,14 +976,12 @@ JPEG2000ImageIO ::Write(const void * buffer) + if (!bSuccess) + { + opj_stream_destroy(cio); +- fclose(l_file); + itkExceptionMacro("JPEG2000ImageIO failed to write file: " << this->GetFileName() << std::endl + << "Reason: opj_end_compress returns false"); + } + + /* close and free the byte stream */ + opj_stream_destroy(cio); +- fclose(l_file); + + /* free remaining compression structures */ + opj_destroy_codec(cinfo); +diff --git a/Modules/ThirdParty/OpenJPEG/CMakeLists.txt b/Modules/ThirdParty/OpenJPEG/CMakeLists.txt +index 103eaa9dd..eb8989135 100644 +--- a/Modules/ThirdParty/OpenJPEG/CMakeLists.txt ++++ b/Modules/ThirdParty/OpenJPEG/CMakeLists.txt +@@ -1,12 +1,25 @@ + project(ITKOpenJPEG) + set(ITKOpenJPEG_THIRD_PARTY 1) + +-set(ITKOpenJPEG_INCLUDE_DIRS +- ${ITKOpenJPEG_BINARY_DIR}/src/openjpeg +- ${ITKOpenJPEG_SOURCE_DIR}/src/openjpeg +- ) +-set(ITKOpenJPEG_LIBRARIES itkopenjpeg) +-set(ITK_LIBRARY_PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS FALSE) ++if(ITK_USE_SYSTEM_OpenJPEG) ++ find_package(OpenJPEG REQUIRED) ++ if(TARGET openjp2) ++ set(ITKOpenJPEG_LIBRARIES ${OPENJPEG_LIBRARIES}) ++ else() ++ message(FATAL_ERROR "OpenJPEG target openjp2 missing!") ++ endif() ++ set(ITKOpenJPEG_INCLUDE_DIRS ++ ${ITKOpenJPEG_BINARY_DIR}/src/openjpeg ++ ${ITKOpenJPEG_SOURCE_DIR}/src/openjpeg ++ ) ++else() ++ set(ITKOpenJPEG_INCLUDE_DIRS ++ ${ITKOpenJPEG_BINARY_DIR}/src/openjpeg ++ ${ITKOpenJPEG_SOURCE_DIR}/src/openjpeg ++ ) ++ set(ITKOpenJPEG_LIBRARIES itkopenjpeg) ++ set(ITK_LIBRARY_PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS FALSE) ++endif() + + itk_module_impl() + diff --git a/vcpkg/ports/itk/openjpeg2.patch b/vcpkg/ports/itk/openjpeg2.patch new file mode 100644 index 0000000..86631f5 --- /dev/null +++ b/vcpkg/ports/itk/openjpeg2.patch @@ -0,0 +1,58 @@ +diff --git a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/CMakeLists.txt b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/CMakeLists.txt +index 565cc338b..c061f0721 100644 +--- a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/CMakeLists.txt ++++ b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/CMakeLists.txt +@@ -194,7 +194,7 @@ mark_as_advanced(LIBRARY_OUTPUT_PATH EXECUTABLE_OUTPUT_PATH) + # configure name mangling to allow multiple libraries to coexist + # peacefully + if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/openjpeg_mangle.h.in) +-set(MANGLE_PREFIX ${OPENJPEG_LIBRARY_NAME}) ++set(MANGLE_PREFIX) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/openjpeg_mangle.h.in + ${CMAKE_CURRENT_BINARY_DIR}/openjpeg_mangle.h + @ONLY) +diff --git a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/src/lib/openjp2/CMakeLists.txt b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/src/lib/openjp2/CMakeLists.txt +index c4adb91a2..89b731d88 100644 +--- a/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/src/lib/openjp2/CMakeLists.txt ++++ b/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmopenjpeg/src/lib/openjp2/CMakeLists.txt +@@ -3,7 +3,7 @@ include_regular_expression("^.*$") + # configure name mangling to allow multiple libraries to coexist + # peacefully + if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/openjpeg_mangle.h.in) +-set(MANGLE_PREFIX ${OPENJPEG_LIBRARY_NAME}) ++set(MANGLE_PREFIX) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/openjpeg_mangle.h.in + ${CMAKE_CURRENT_BINARY_DIR}/openjpeg_mangle.h + @ONLY) +diff --git a/Modules/ThirdParty/OpenJPEG/CMakeLists.txt b/Modules/ThirdParty/OpenJPEG/CMakeLists.txt +index 3811e52f4..a41e9264e 100644 +--- a/Modules/ThirdParty/OpenJPEG/CMakeLists.txt ++++ b/Modules/ThirdParty/OpenJPEG/CMakeLists.txt +@@ -8,10 +8,10 @@ if(ITK_USE_SYSTEM_OpenJPEG) + else() + message(FATAL_ERROR "OpenJPEG target openjp2 missing!") + endif() +- set(ITKOpenJPEG_INCLUDE_DIRS +- ${ITKOpenJPEG_BINARY_DIR}/src/openjpeg +- ${ITKOpenJPEG_SOURCE_DIR}/src/openjpeg +- ) ++ # set(ITKOpenJPEG_INCLUDE_DIRS ++ # ${ITKOpenJPEG_BINARY_DIR}/src/openjpeg ++ # ${ITKOpenJPEG_SOURCE_DIR}/src/openjpeg ++ # ) + else() + set(ITKOpenJPEG_INCLUDE_DIRS + ${ITKOpenJPEG_BINARY_DIR}/src/openjpeg +diff --git a/Modules/ThirdParty/OpenJPEG/src/openjpeg/CMakeLists.txt b/Modules/ThirdParty/OpenJPEG/src/openjpeg/CMakeLists.txt +index e62e43eda..35dc89976 100644 +--- a/Modules/ThirdParty/OpenJPEG/src/openjpeg/CMakeLists.txt ++++ b/Modules/ThirdParty/OpenJPEG/src/openjpeg/CMakeLists.txt +@@ -68,7 +68,7 @@ CONFIGURE_FILE(${ITK3P_OpenJPEG_SOURCE_DIR}/opj_configure.h.in + # configure name mangling to allow multiple libraries to coexist + # peacefully + if(EXISTS ${ITK3P_OpenJPEG_SOURCE_DIR}/openjpeg_mangle.h.in) +-set(MANGLE_PREFIX itk) ++#set(MANGLE_PREFIX itk) + configure_file(${ITK3P_OpenJPEG_SOURCE_DIR}/openjpeg_mangle.h.in + ${ITK3P_OpenJPEG_BINARY_DIR}/openjpeg_mangle.h + @ONLY) diff --git a/vcpkg/ports/itk/portfile.cmake b/vcpkg/ports/itk/portfile.cmake new file mode 100644 index 0000000..b16ba19 --- /dev/null +++ b/vcpkg/ports/itk/portfile.cmake @@ -0,0 +1,213 @@ +vcpkg_buildpath_length_warning(37) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO InsightSoftwareConsortium/ITK + REF d3286c9cc04ba16cc8f73de9a98fbcd7c02f3c7b + SHA512 c358449870d580aeb10e32f8be0ca39e8a76d8dc06fda973788fafb5971333e546611c399190be49d40f5f3c18a1105d9699eef271a560aff25ce168a396926e + HEAD_REF master + PATCHES + hdf5.patch + double-conversion.patch + openjpeg.patch + openjpeg2.patch + var_libraries.patch + wrapping.patch + python_gpu_wrapping.patch + opencl.patch + cufftw.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + "vtk" Module_ITKVtkGlue + "cuda" Module_ITKCudaCommon # Requires RTK? + #"cuda" CUDA_HAVE_GPU # Automatically set by FindCUDA? + "cufftw" ITK_USE_CUFFTW + "opencl" ITK_USE_GPU + "tbb" Module_ITKTBB + "rtk" Module_RTK + "tools" RTK_BUILD_APPLICATIONS + # There are a lot of more (remote) modules and options in ITK + # feel free to add those as a feature +) + +if("cufftw" IN_LIST FEATURES) + # Alternativly set CUFFT_LIB and CUFFTW_LIB + if(WIN32) + file(TO_CMAKE_PATH "$ENV{CUDA_PATH}" CUDA_PATH) + set(CUDA_LIB_PATH "${CUDA_PATH}") + + if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + string(APPEND CUDA_LIB_PATH "/lib/x64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + string(APPEND CUDA_LIB_PATH "/lib/Win32") + message(FATAL_ERROR "CUFFTW is not supported on architecture ${VCPKG_TARGET_ARCHITECTURE}") + else() + message(FATAL_ERROR "Architecture ${VCPKG_TARGET_ARCHITECTURE} not supported !") + endif() + + list(APPEND ADDITIONAL_OPTIONS + "-DFFTW_LIB_SEARCHPATH=${CUDA_LIB_PATH}" + "-DFFTW_INCLUDE_PATH=${CUDA_PATH}/include" + "-DCUFFTW_INCLUDE_PATH=${CUDA_PATH}/include" + ) + endif() +endif() + +if("rtk" IN_LIST FEATURES) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + message(FATAL_ERROR "RTK is not supported on architecture ${VCPKG_TARGET_ARCHITECTURE}") + endif() + SET(BUILD_RTK ON) + list(APPEND ADDITIONAL_OPTIONS + "-DModule_RTK_GIT_TAG=8099212f715231d093f7d6a1114daecf45d871ed" # RTK latest versions (11.05.2020) + ) + if("cuda" IN_LIST FEATURES) + list(APPEND ADDITIONAL_OPTIONS "-DRTK_USE_CUDA=ON") + #RTK + CUDA + PYTHON + dynamic library linkage will fail and needs upstream fixes. + endif() +endif() +file(REMOVE_RECURSE "${SOURCE_PATH}/Modules/Remote/RTK") + +if("opencl" IN_LIST FEATURES) + list(APPEND ADDITIONAL_OPTIONS # Wrapping options required by OpenCL if build with Python Wrappers + -DITK_WRAP_unsigned_long_long=ON + -DITK_WRAP_signed_long_long=ON + ) +endif() +if("tools" IN_LIST FEATURES) + + if("rtk" IN_LIST FEATURES) + list(APPEND TOOL_NAMES rtkadmmtotalvariation rtkadmmwavelets rtkamsterdamshroud rtkbackprojections rtkbioscangeometry rtkcheckimagequality rtkconjugategradient + rtkdigisensgeometry rtkdrawgeometricphantom rtkdrawshepploganphantom rtkdualenergysimplexdecomposition rtkelektasynergygeometry rtkextractphasesignal + rtkextractshroudsignal rtkfdk rtkfdktwodweights rtkfieldofview rtkforwardprojections rtkfourdconjugategradient rtkfourdfdk rtkfourdrooster rtkfourdsart + rtkgaincorrection rtki0estimation rtkimagxgeometry rtkiterativefdk rtklagcorrection rtklastdimensionl0gradientdenoising rtklut rtkmaskcollimation rtkmcrooster + rtkmotioncompensatedfourdconjugategradient rtkorageometry rtkosem rtkoverlayphaseandshroud rtkparkershortscanweighting rtkprojectgeometricphantom + rtkprojectionmatrix rtkprojections rtkprojectshepploganphantom rtkramp rtkrayboxintersection rtkrayquadricintersection rtkregularizedconjugategradient + rtksart rtkscatterglarecorrection rtksimulatedgeometry rtkspectraldenoiseprojections rtkspectralforwardmodel rtkspectralonestep rtkspectralrooster rtkspectralsimplexdecomposition + rtksubselect rtktotalnuclearvariationdenoising rtktotalvariationdenoising rtktutorialapplication rtkvarianobigeometry rtkvarianprobeamgeometry rtkvectorconjugategradient + rtkwangdisplaceddetectorweighting rtkwarpedbackprojectsequence rtkwarpedforwardprojectsequence rtkwaveletsdenoising rtkxradgeometry) + endif() +endif() +if("vtk" IN_LIST FEATURES) + vcpkg_find_acquire_program(PYTHON3) + list(APPEND ADDITIONAL_OPTIONS + "-DPython3_EXECUTABLE:PATH=${PYTHON3}" # Required by mvtk if vtk[python] was build + ) +endif() +if("python" IN_LIST FEATURES) + message(STATUS "${PORT} builds a long time (>1h) with python wrappers enabled!") + vcpkg_find_acquire_program(PYTHON3) + vcpkg_find_acquire_program(SWIG) # Swig is only required for wrapping! + get_filename_component(SWIG_DIR "${SWIG}" DIRECTORY) + list(APPEND ADDITIONAL_OPTIONS + -DITK_WRAP_PYTHON=ON + -DPython3_FIND_REGISTRY=NEVER + "-DPython3_EXECUTABLE:PATH=${PYTHON3}" # Required by more than one feature + "-DSWIG_EXECUTABLE=${SWIG}" + "-DSWIG_DIR=${SWIG_DIR}" + ) + # Due to ITKs internal shenanigans with the variables ...... + if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND ADDITIONAL_OPTIONS "-DPython3_LIBRARY_RELEASE:PATH=${CURRENT_INSTALLED_DIR}/lib/python38.lib" + "-DPython3_LIBRARY_DEBUG:PATH=${CURRENT_INSTALLED_DIR}/debug/lib/python38_d.lib" + "-DPython3_INCLUDE_DIR:PATH=${CURRENT_INSTALLED_DIR}/include/python3.8") + list(APPEND OPTIONS_DEBUG "-DPython3_LIBRARY=${CURRENT_INSTALLED_DIR}/debug/lib/python38_d.lib") + list(APPEND OPTIONS_RELEASE "-DPython3_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/python38.lib") + elseif(VCPKG_TARGET_IS_LINUX) + list(APPEND ADDITIONAL_OPTIONS "-DPython3_LIBRARY_RELEASE:PATH=${CURRENT_INSTALLED_DIR}/lib/libpython38m.a" + "-DPython3_LIBRARY_DEBUG:PATH=${CURRENT_INSTALLED_DIR}/debug/lib/libpython38md.a" + "-DPython3_INCLUDE_DIR:PATH=${CURRENT_INSTALLED_DIR}/include/python3.8m") + list(APPEND OPTIONS_DEBUG "-DPython3_LIBRARY=${CURRENT_INSTALLED_DIR}/debug/lib/libpython38md.a") + list(APPEND OPTIONS_RELEASE "-DPython3_LIBRARY=${CURRENT_INSTALLED_DIR}/lib/libpython38m.a") + elseif(VCPKG_TARGET_IS_OSX) + #Need Python3 information on OSX within VCPKG + endif() + #ITK_PYTHON_SITE_PACKAGES_SUFFIX should be set to the install dir of the site-packages within vcpkg +endif() + +set(USE_64BITS_IDS OFF) +if (VCPKG_TARGET_ARCHITECTURE STREQUAL x64 OR VCPKG_TARGET_ARCHITECTURE STREQUAL arm64) + set(USE_64BITS_IDS ON) +endif() + +file(REMOVE_RECURSE "${SOURCE_PATH}/CMake/FindOpenCL.cmake") +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DBUILD_TESTING=OFF + -DBUILD_EXAMPLES=OFF + -DBUILD_PKGCONFIG_FILES=OFF + -DITK_DOXYGEN_HTML=OFF + -DDO_NOT_INSTALL_ITK_TEST_DRIVER=ON + -DITK_SKIP_PATH_LENGTH_CHECKS=ON + -DITK_INSTALL_DATA_DIR=share/itk/data + -DITK_INSTALL_DOC_DIR=share/itk/doc + -DITK_INSTALL_PACKAGE_DIR=share/itk + -DITK_USE_64BITS_IDS=${USE_64BITS_IDS} + -DITK_USE_CONCEPT_CHECKING=ON + #-DITK_USE_SYSTEM_LIBRARIES=ON # enables USE_SYSTEM for all third party libraries, some of which do not have vcpkg ports such as CastXML, SWIG, MINC etc + -DITK_USE_SYSTEM_DOUBLECONVERSION=ON + -DITK_USE_SYSTEM_EXPAT=ON + -DITK_USE_SYSTEM_JPEG=ON + -DITK_USE_SYSTEM_PNG=ON + -DITK_USE_SYSTEM_TIFF=ON + -DITK_USE_SYSTEM_ZLIB=ON + -DITK_USE_SYSTEM_EIGEN=ON + -DITK_USE_SYSTEM_FFTW=ON + -DITK_USE_SYSTEM_HDF5=ON # HDF5 was problematic in the past and still is. ITK still has not figured out how to do it correctly! + -DITK_USE_SYSTEM_GDCM=ON + -DITK_USE_SYSTEM_OpenJPEG=ON # Added by VCPKG + -DITK_USE_SYSTEM_DCMTK=ON + -DDCMTK_USE_ICU=ON + -DITK_USE_SYSTEM_ICU=ON + #-DITK_USE_SYSTEM_VXL=ON + #-DITK_USE_SYSTEM_CASTXML=ON # needs to be added to vcpkg_find_acquire_program https://data.kitware.com/api/v1/file/hashsum/sha512/b8b6f0aff11fe89ab2fcd1949cc75f2c2378a7bc408827a004396deb5ff5a9976bffe8a597f8db1b74c886ea39eb905e610dce8f5bd7586a4d6c196d7349da8d/download + -DITK_USE_SYSTEM_MINC=ON + -DITK_USE_SYSTEM_SWIG=ON + -DITK_FORBID_DOWNLOADS=OFF # This should be turned on some day, however for now ITK does download specific versions so it shouldn't spontaneously break. Remote Modules would probably break with this! + -DINSTALL_GTEST=OFF + -DITK_USE_SYSTEM_GOOGLETEST=ON + -DEXECUTABLE_OUTPUT_PATH=tools/${PORT} + + # TODO + #-DVXL_USE_GEOTIFF=ON + -DVXL_USE_LFS=ON + + -DITK_MINIMUM_COMPLIANCE_LEVEL:STRING=1 # To Display all remote modules within cmake-gui + #-DModule_IOSTL=ON # example how to turn on a non-default module + #-DModule_MorphologicalContourInterpolation=ON # example how to turn on a remote module + #-DModule_RLEImage=ON # example how to turn on a remote module + + # Some additional wraping options + #-DITK_WRAP_double=ON + #-DITK_WRAP_complex_double=ON + #-DITK_WRAP_covariant_vector_double=ON + #-DITK_WRAP_vector_double=ON + + ${FEATURE_OPTIONS} + ${ADDITIONAL_OPTIONS} + + OPTIONS_DEBUG ${OPTIONS_DEBUG} + OPTIONS_RELEASE ${OPTIONS_RELEASE} +) +if(BUILD_RTK) # Remote Modules are only downloaded on configure. + # TODO: In the future try to download via vcpkg_from_github and move the files. That way patching does not need this workaround + vcpkg_apply_patches(SOURCE_PATH "${SOURCE_PATH}/Modules/Remote/RTK" QUIET PATCHES rtk/already_defined.patch rtk/unresolved.patch) +endif() +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() + +if(TOOL_NAMES) + vcpkg_copy_tools(TOOL_NAMES ${TOOL_NAMES} AUTO_CLEAN) +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/cmake") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/cmake") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/itk/python_gpu_wrapping.patch b/vcpkg/ports/itk/python_gpu_wrapping.patch new file mode 100644 index 0000000..37367d9 --- /dev/null +++ b/vcpkg/ports/itk/python_gpu_wrapping.patch @@ -0,0 +1,178 @@ +diff --git a/CMake/itkOpenCL.cmake b/CMake/itkOpenCL.cmake +index 0ccbe144d..fa381524f 100644 +--- a/CMake/itkOpenCL.cmake ++++ b/CMake/itkOpenCL.cmake +@@ -48,7 +48,7 @@ if(ITK_USE_GPU) + ) + set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE} + PROPERTIES GENERATED ON) +- set(${SRC_VAR} ${${SRC_VAR}} ${OUTPUT_FILE}) ++ set(${SRC_VAR} ${${SRC_VAR}} ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_FILE}) + endmacro() + + macro(write_gpu_kernels GPUKernels GPU_SRC) +diff --git a/Modules/Core/Common/include/itkMacro.h b/Modules/Core/Common/include/itkMacro.h +index 1816f722a..3a6a8aee5 100644 +--- a/Modules/Core/Common/include/itkMacro.h ++++ b/Modules/Core/Common/include/itkMacro.h +@@ -1141,7 +1141,7 @@ compilers. + #define itkGetVectorMacro(name, type, count) \ + virtual type * Get##name() const { return this->m_##name; } + +-/**\def itkGPUKernelClassMacro ++/**\def class itkGPUKernelClassMacro + * Construct a non-templatized helper class that + * provides the GPU kernel source code as a const char* + */ +@@ -1150,7 +1150,7 @@ compilers. + * Workaround KWstyle bug \ \ + * \ingroup ITKCommon \ \ + */ \ +- class kernel \ ++ kernel \ + { \ + public: \ + static const char * \ +diff --git a/Modules/Core/GPUCommon/include/itkGPUImageOps.h b/Modules/Core/GPUCommon/include/itkGPUImageOps.h +index f4eb8f33b..fbdf3d757 100644 +--- a/Modules/Core/GPUCommon/include/itkGPUImageOps.h ++++ b/Modules/Core/GPUCommon/include/itkGPUImageOps.h +@@ -23,7 +23,7 @@ + namespace itk + { + /** Create a helper GPU Kernel class for GPUImageOps */ +-itkGPUKernelClassMacro(GPUImageOpsKernel); ++class itkGPUKernelClassMacro(GPUImageOpsKernel); + + /** \class GPUImageOps + * +diff --git a/Modules/Core/GPUCommon/include/itkGPUReduction.h b/Modules/Core/GPUCommon/include/itkGPUReduction.h +index 524a5cd01..1b3ce91e9 100644 +--- a/Modules/Core/GPUCommon/include/itkGPUReduction.h ++++ b/Modules/Core/GPUCommon/include/itkGPUReduction.h +@@ -26,7 +26,7 @@ + namespace itk + { + /** Create a helper GPU Kernel class for GPUReduction */ +-itkGPUKernelClassMacro(GPUReductionKernel); ++class itkGPUKernelClassMacro(GPUReductionKernel); + + /** + * \class GPUReduction +diff --git a/Modules/Core/GPUFiniteDifference/include/itkGPUDenseFiniteDifferenceImageFilter.h b/Modules/Core/GPUFiniteDifference/include/itkGPUDenseFiniteDifferenceImageFilter.h +index 853801cec..2fccf0bc5 100644 +--- a/Modules/Core/GPUFiniteDifference/include/itkGPUDenseFiniteDifferenceImageFilter.h ++++ b/Modules/Core/GPUFiniteDifference/include/itkGPUDenseFiniteDifferenceImageFilter.h +@@ -24,7 +24,7 @@ + namespace itk + { + /** Create a helper GPU Kernel class for GPUDenseFiniteDifferenceImageFilter */ +-itkGPUKernelClassMacro(GPUDenseFiniteDifferenceImageFilterKernel); ++class ITKGPUFiniteDifference_EXPORT itkGPUKernelClassMacro(GPUDenseFiniteDifferenceImageFilterKernel); + + /** + * \class GPUDenseFiniteDifferenceImageFilter +diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientNDAnisotropicDiffusionFunction.h b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientNDAnisotropicDiffusionFunction.h +index 4245ff914..1b21b709e 100644 +--- a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientNDAnisotropicDiffusionFunction.h ++++ b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUGradientNDAnisotropicDiffusionFunction.h +@@ -54,7 +54,7 @@ namespace itk + */ + + /** Create a helper GPU Kernel class for GPUGradientNDAnisotropicDiffusionFunction */ +-itkGPUKernelClassMacro(GPUGradientNDAnisotropicDiffusionFunctionKernel); ++class itkGPUKernelClassMacro(GPUGradientNDAnisotropicDiffusionFunctionKernel); + + template + class ITK_TEMPLATE_EXPORT GPUGradientNDAnisotropicDiffusionFunction +diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUScalarAnisotropicDiffusionFunction.h b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUScalarAnisotropicDiffusionFunction.h +index 305f6490e..d0d433080 100644 +--- a/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUScalarAnisotropicDiffusionFunction.h ++++ b/Modules/Filtering/GPUAnisotropicSmoothing/include/itkGPUScalarAnisotropicDiffusionFunction.h +@@ -32,7 +32,7 @@ namespace itk + * */ + + /** Create a helper GPU Kernel class for GPUScalarAnisotropicDiffusionFunction */ +-itkGPUKernelClassMacro(GPUScalarAnisotropicDiffusionFunctionKernel); ++class itkGPUKernelClassMacro(GPUScalarAnisotropicDiffusionFunctionKernel); + + template + class ITK_TEMPLATE_EXPORT GPUScalarAnisotropicDiffusionFunction : public GPUAnisotropicDiffusionFunction +diff --git a/Modules/Filtering/GPUImageFilterBase/include/itkGPUCastImageFilter.h b/Modules/Filtering/GPUImageFilterBase/include/itkGPUCastImageFilter.h +index 23530ac5c..e1b83f696 100644 +--- a/Modules/Filtering/GPUImageFilterBase/include/itkGPUCastImageFilter.h ++++ b/Modules/Filtering/GPUImageFilterBase/include/itkGPUCastImageFilter.h +@@ -29,7 +29,7 @@ namespace itk + { + + /** Create a helper GPU Kernel class for GPUCastImageFilter */ +-itkGPUKernelClassMacro(GPUCastImageFilterKernel); ++class itkGPUKernelClassMacro(GPUCastImageFilterKernel); + + /** \class GPUCastImageFilter + * \brief GPU version of CastImageFilter. +diff --git a/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.h b/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.h +index c4adc2967..69aeac6db 100644 +--- a/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.h ++++ b/Modules/Filtering/GPUImageFilterBase/include/itkGPUNeighborhoodOperatorImageFilter.h +@@ -41,7 +41,7 @@ namespace itk + */ + + /** Create a helper GPU Kernel class for GPUNeighborhoodOperatorImageFilter */ +-itkGPUKernelClassMacro(GPUNeighborhoodOperatorImageFilterKernel); ++class itkGPUKernelClassMacro(GPUNeighborhoodOperatorImageFilterKernel); + + template + class ITK_TEMPLATE_EXPORT GPUMeanImageFilter +diff --git a/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.h b/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.h +index 8d26dcfc5..613bc623f 100644 +--- a/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.h ++++ b/Modules/Filtering/GPUThresholding/include/itkGPUBinaryThresholdImageFilter.h +@@ -85,7 +85,7 @@ private: + } // end of namespace Functor + + /** Create a helper GPU Kernel class for GPUBinaryThresholdImageFilter */ +-itkGPUKernelClassMacro(GPUBinaryThresholdImageFilterKernel); ++class itkGPUKernelClassMacro(GPUBinaryThresholdImageFilterKernel); + + /** + * \class GPUBinaryThresholdImageFilter +diff --git a/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.h b/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.h +index 28b21d592..0b46e27b8 100644 +--- a/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.h ++++ b/Modules/Registration/GPUPDEDeformable/include/itkGPUDemonsRegistrationFunction.h +@@ -51,7 +51,7 @@ namespace itk + * \ingroup ITKGPUPDEDeformableRegistration + */ + /** Create a helper GPU Kernel class for GPUDemonsRegistrationFunction */ +-itkGPUKernelClassMacro(GPUDemonsRegistrationFunctionKernel); ++class itkGPUKernelClassMacro(GPUDemonsRegistrationFunctionKernel); + + template + class ITK_TEMPLATE_EXPORT GPUDemonsRegistrationFunction +diff --git a/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.h b/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.h +index 93ab975ec..0afd84871 100644 +--- a/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.h ++++ b/Modules/Registration/GPUPDEDeformable/include/itkGPUPDEDeformableRegistrationFilter.h +@@ -73,7 +73,7 @@ namespace itk + */ + + /** Create a helper GPU Kernel class for GPUPDEDeformableRegistrationFilter */ +-itkGPUKernelClassMacro(GPUPDEDeformableRegistrationFilterKernel); ++class itkGPUKernelClassMacro(GPUPDEDeformableRegistrationFilterKernel); + + template + ++#include "RTKExport.h" + #include "rtkMacro.h" + + namespace rtk +@@ -67,25 +68,18 @@ public: + * with the i-th matrix provides the physical coordinate on + * the i-th projection. + */ +- const std::vector & +- GetMatrices() const +- { +- return this->m_Matrices; +- } ++ itkGetConstReferenceMacro(Matrices,std::vector) + + /** Get the i-th projection matrix. */ + MatrixType +- GetMatrix(const unsigned int i) const +- { +- return this->m_Matrices[i]; +- } ++ GetMatrix(const unsigned int i) const; + + /** Empty the geometry object. */ + virtual void + Clear(); + + protected: +- ProjectionGeometry() = default; ++ ProjectionGeometry(); + ~ProjectionGeometry() override = default; + + void +@@ -93,11 +87,7 @@ protected: + + /** Add projection matrix */ + virtual void +- AddMatrix(const MatrixType & m) +- { +- this->m_Matrices.push_back(m); +- this->Modified(); +- } ++ AddMatrix(const MatrixType & m); + + private: + /** Projection matrices */ +@@ -105,6 +95,9 @@ private: + }; + } // namespace rtk + +-#include "rtkProjectionGeometry.hxx" ++#ifndef ITK_MANUAL_INSTANTIATION ++# include "rtkProjectionGeometry.hxx" ++#endif ++ + + #endif // rtkProjectionGeometry_h +diff --git a/include/rtkProjectionGeometry.hxx b/include/rtkProjectionGeometry.hxx +index 192265812..97dfe8c3a 100644 +--- a/include/rtkProjectionGeometry.hxx ++++ b/include/rtkProjectionGeometry.hxx +@@ -23,6 +23,8 @@ + + namespace rtk + { ++template ++ProjectionGeometry::ProjectionGeometry() = default; + + template + void +@@ -43,6 +45,21 @@ ProjectionGeometry::Clear() + this->Modified(); + } + ++template ++typename ProjectionGeometry::MatrixType ++ProjectionGeometry::GetMatrix(const unsigned int i) const ++{ ++ return this->m_Matrices[i]; ++} ++ ++template ++void ++ProjectionGeometry::AddMatrix(const typename ProjectionGeometry::MatrixType & m) ++{ ++ this->m_Matrices.push_back(m); ++ this->Modified(); ++} ++ + } // namespace rtk + + #endif // rtkProjectionGeometry_hxx diff --git a/vcpkg/ports/itk/rtk/unresolved.patch b/vcpkg/ports/itk/rtk/unresolved.patch new file mode 100644 index 0000000..e2209ec --- /dev/null +++ b/vcpkg/ports/itk/rtk/unresolved.patch @@ -0,0 +1,213 @@ +diff --git a/include/rtkDCMImagXImageIO.h b/include/rtkDCMImagXImageIO.h +index 2a70ae046..69abb409e 100644 +--- a/include/rtkDCMImagXImageIO.h ++++ b/include/rtkDCMImagXImageIO.h +@@ -18,7 +18,7 @@ + + #ifndef rtkDCMImagXImageIO_h + #define rtkDCMImagXImageIO_h +- ++#include "RTKExport.h" + #include + + #include "rtkMacro.h" +@@ -32,7 +32,7 @@ namespace rtk + * + * \ingroup RTK + */ +-class DCMImagXImageIO : public itk::GDCMImageIO ++class RTK_EXPORT DCMImagXImageIO : public itk::GDCMImageIO + { + public: + ITK_DISALLOW_COPY_AND_ASSIGN(DCMImagXImageIO); +diff --git a/include/rtkEdfImageIO.h b/include/rtkEdfImageIO.h +index 66499c56b..7b16fbc5a 100644 +--- a/include/rtkEdfImageIO.h ++++ b/include/rtkEdfImageIO.h +@@ -18,7 +18,7 @@ + + #ifndef rtkEdfImageIO_h + #define rtkEdfImageIO_h +- ++#include "RTKExport.h" + #include + #include + #include +@@ -36,7 +36,7 @@ namespace rtk + * + * \ingroup RTK IOFilters + */ +-class EdfImageIO : public itk::ImageIOBase ++class RTK_EXPORT EdfImageIO : public itk::ImageIOBase + { + public: + ITK_DISALLOW_COPY_AND_ASSIGN(EdfImageIO); +diff --git a/include/rtkHisImageIO.h b/include/rtkHisImageIO.h +index 2ef2005dd..95449b8a6 100644 +--- a/include/rtkHisImageIO.h ++++ b/include/rtkHisImageIO.h +@@ -19,6 +19,8 @@ + #ifndef rtkHisImageIO_h + #define rtkHisImageIO_h + ++#include "RTKExport.h" ++ + // itk include + #include + #include "rtkMacro.h" +@@ -35,7 +37,7 @@ namespace rtk + * + * \ingroup RTK IOFilters + */ +-class HisImageIO : public itk::ImageIOBase ++class RTK_EXPORT HisImageIO : public itk::ImageIOBase + { + public: + /** Standard class type alias. */ +diff --git a/include/rtkHncImageIO.h b/include/rtkHncImageIO.h +index 7b9539bde..dc9dca759 100644 +--- a/include/rtkHncImageIO.h ++++ b/include/rtkHncImageIO.h +@@ -19,9 +19,11 @@ + #ifndef rtkHncImageIO_h + #define rtkHncImageIO_h + ++#include "RTKExport.h" ++ + // itk include + #include +-#include "itksys/SystemTools.hxx" ++//#include "itksys/SystemTools.hxx" + + #if defined(_MSC_VER) && (_MSC_VER < 1600) + // SR: taken from +@@ -43,7 +45,7 @@ namespace rtk + * + * \ingroup RTK IOFilters + */ +-class HncImageIO : public itk::ImageIOBase ++class RTK_EXPORT HncImageIO : public itk::ImageIOBase + { + public: + /** Standard class type alias. */ +diff --git a/include/rtkHncImageIOFactory.h b/include/rtkHncImageIOFactory.h +index 2bca8f77e..1d5a97938 100644 +--- a/include/rtkHncImageIOFactory.h ++++ b/include/rtkHncImageIOFactory.h +@@ -38,7 +38,7 @@ namespace rtk + * + * \ingroup RTK IOFilters + */ +-class HncImageIOFactory : public itk::ObjectFactoryBase ++class RTK_EXPORT HncImageIOFactory : public itk::ObjectFactoryBase + { + public: + /** Standard class type alias. */ +diff --git a/include/rtkHndImageIO.h b/include/rtkHndImageIO.h +index 5a07897cc..5f843362a 100644 +--- a/include/rtkHndImageIO.h ++++ b/include/rtkHndImageIO.h +@@ -19,6 +19,8 @@ + #ifndef rtkHndImageIO_h + #define rtkHndImageIO_h + ++#include "RTKExport.h" ++ + // itk include + #include + +@@ -43,7 +45,7 @@ namespace rtk + * + * \ingroup RTK IOFilters + */ +-class HndImageIO : public itk::ImageIOBase ++class RTK_EXPORT HndImageIO : public itk::ImageIOBase + { + public: + /** Standard class type alias. */ +diff --git a/include/rtkImagXImageIO.h b/include/rtkImagXImageIO.h +index d69e9a790..d6cc8388e 100644 +--- a/include/rtkImagXImageIO.h ++++ b/include/rtkImagXImageIO.h +@@ -18,7 +18,7 @@ + + #ifndef rtkImagXImageIO_h + #define rtkImagXImageIO_h +- ++#include "RTKExport.h" + #include + #include + #include +@@ -34,7 +34,7 @@ namespace rtk + * + * \ingroup RTK + */ +-class ImagXImageIO : public itk::ImageIOBase ++class RTK_EXPORT ImagXImageIO : public itk::ImageIOBase + { + public: + /** Standard class type alias. */ +diff --git a/include/rtkOraImageIO.h b/include/rtkOraImageIO.h +index ece525a42..2d5332872 100644 +--- a/include/rtkOraImageIO.h ++++ b/include/rtkOraImageIO.h +@@ -19,6 +19,8 @@ + #ifndef rtkOraImageIO_h + #define rtkOraImageIO_h + ++#include "RTKExport.h" ++ + // This is done to avoid any interference with zlib + #ifdef OF + # undef OF +@@ -41,7 +43,7 @@ namespace rtk + * + * \ingroup RTK IOFilters + */ +-class OraImageIO : public itk::MetaImageIO ++class RTK_EXPORT OraImageIO : public itk::MetaImageIO + { + public: + /** Standard class type alias. */ +diff --git a/include/rtkXRadImageIO.h b/include/rtkXRadImageIO.h +index a72c934e4..0a92afa22 100644 +--- a/include/rtkXRadImageIO.h ++++ b/include/rtkXRadImageIO.h +@@ -19,6 +19,7 @@ + #ifndef rtkXRadImageIO_h + #define rtkXRadImageIO_h + ++#include "RTKExport.h" + #include + #include + #include +@@ -37,7 +38,7 @@ namespace rtk + * + * \ingroup RTK IOFilters + */ +-class XRadImageIO : public itk::ImageIOBase ++class RTK_EXPORT XRadImageIO : public itk::ImageIOBase + { + public: + /** Standard class type alias. */ +diff --git a/include/rtkXimImageIO.h b/include/rtkXimImageIO.h +index ae789dbf9..741f05183 100644 +--- a/include/rtkXimImageIO.h ++++ b/include/rtkXimImageIO.h +@@ -19,6 +19,7 @@ + #ifndef rtkXimImageIO_h + #define rtkXimImageIO_h + ++#include "RTKExport.h" + #include "rtkMacro.h" + + // itk include +@@ -43,7 +44,7 @@ namespace rtk + * + * \ingroup RTK IOFilters + */ +-class XimImageIO : public itk::ImageIOBase ++class RTK_EXPORT XimImageIO : public itk::ImageIOBase + { + public: + /** Standard class type alias. */ diff --git a/vcpkg/ports/itk/var_libraries.patch b/vcpkg/ports/itk/var_libraries.patch new file mode 100644 index 0000000..738fa98 --- /dev/null +++ b/vcpkg/ports/itk/var_libraries.patch @@ -0,0 +1,27 @@ +diff --git a/CMake/ITKModuleMacros.cmake b/CMake/ITKModuleMacros.cmake +index da9f3a902..60420bb0a 100644 +--- a/CMake/ITKModuleMacros.cmake ++++ b/CMake/ITKModuleMacros.cmake +@@ -162,9 +162,6 @@ macro(itk_module_impl) + foreach(dep IN LISTS ITK_MODULE_${itk-module}_DEPENDS) + list(APPEND ${itk-module}_LIBRARIES "${${dep}_LIBRARIES}") + endforeach() +- if(${itk-module}_LIBRARIES) +- list(REMOVE_DUPLICATES ${itk-module}_LIBRARIES) +- endif() + endif() + + if(EXISTS ${${itk-module}_SOURCE_DIR}/include) +diff --git a/CMake/ITKModuleAPI.cmake b/CMake/ITKModuleAPI.cmake +index af64d96dc..809335e6d 100644 +--- a/CMake/ITKModuleAPI.cmake ++++ b/CMake/ITKModuleAPI.cmake +@@ -133,7 +133,7 @@ macro(itk_module_config ns) + endforeach() + unset(_${ns}_USED_MODULES) + +- foreach(v ${ns}_LIBRARIES ${ns}_INCLUDE_DIRS ${ns}_LIBRARY_DIRS ++ foreach(v ${ns}_INCLUDE_DIRS ${ns}_LIBRARY_DIRS + ${ns}_RUNTIME_LIBRARY_DIRS ${ns}_FACTORY_NAMES ${ns}_FACTORY_LIST) + if(${v}) + list(REMOVE_DUPLICATES ${v}) diff --git a/vcpkg/ports/itk/wrapping.patch b/vcpkg/ports/itk/wrapping.patch new file mode 100644 index 0000000..1e2e531 --- /dev/null +++ b/vcpkg/ports/itk/wrapping.patch @@ -0,0 +1,19 @@ +diff --git a/Wrapping/TypedefMacros.cmake b/Wrapping/TypedefMacros.cmake +index e6f8d0bf3..6c000dba8 100644 +--- a/Wrapping/TypedefMacros.cmake ++++ b/Wrapping/TypedefMacros.cmake +@@ -57,13 +57,12 @@ macro(itk_wrap_module library_name) + + # WRAPPER_LIBRARY_DEPENDS. List of names of other wrapper libraries that + # define symbols used by this wrapper library. + INTERSECTION(WRAPPER_LIBRARY_DEPENDS "${ITK_MODULE_${library_name}_DEPENDS}" "${WRAP_ITK_MODULES}") + # set(WRAPPER_LIBRARY_DEPENDS ${ITK_MODULE_${library_name}_DEPENDS}) + + # WRAPPER_LIBRARY_LINK_LIBRARIES. List of other libraries that should + # be linked to the wrapper library. +- set(WRAPPER_LIBRARY_LINK_LIBRARIES ${ITK_LIBRARIES} ${${itk-module}_LIBRARIES}) +- ++ set(WRAPPER_LIBRARY_LINK_LIBRARIES ${ITK_LIBRARIES} ${${library_name}_LIBRARIES}) + # WRAPPER_SUBMODULE_ORDER. List of *.wrap submodules in the source dir + # that should be included/wrapped before the rest in the given order. + # Just the submodule group name is needed, not the full path or file name. diff --git a/vcpkg/ports/itpp/CONTROL b/vcpkg/ports/itpp/CONTROL new file mode 100644 index 0000000..2d4fa89 --- /dev/null +++ b/vcpkg/ports/itpp/CONTROL @@ -0,0 +1,4 @@ +Source: itpp +Version: 4.3.1-5 +Homepage: http://itpp.sourceforge.net +Description: IT++ is a C++ library of mathematical, signal processing and communication classes and functions. Its main use is in simulation of communication systems and for performing research in the area of communications. \ No newline at end of file diff --git a/vcpkg/ports/itpp/fix-linux.patch b/vcpkg/ports/itpp/fix-linux.patch new file mode 100644 index 0000000..18b66af --- /dev/null +++ b/vcpkg/ports/itpp/fix-linux.patch @@ -0,0 +1,17 @@ +diff --git a/itpp/base/random_dsfmt.h b/itpp/base/random_dsfmt.h +index ccbf182..de819fb 100644 +--- a/itpp/base/random_dsfmt.h ++++ b/itpp/base/random_dsfmt.h +@@ -299,7 +299,12 @@ private: + */ + static void do_recursion(typename Context::w128_t *r, typename Context::w128_t *a, typename Context::w128_t *b, typename Context::w128_t *lung) { + #if defined(__SSE2__) ++ ++#ifdef __linux__ ++#define SSE2_SHUFF 0x1bU ++#else + const unsigned int SSE2_SHUFF = 0x1bU; ++#endif + + __m128i x = a->si; + __m128i z = _mm_slli_epi64(x, SL1); diff --git a/vcpkg/ports/itpp/fix-uwp.patch b/vcpkg/ports/itpp/fix-uwp.patch new file mode 100644 index 0000000..6980592 --- /dev/null +++ b/vcpkg/ports/itpp/fix-uwp.patch @@ -0,0 +1,15 @@ +diff --git a/itpp/base/timing.cpp b/itpp/base/timing.cpp +index 58178e4..6b173d0 100644 +--- a/itpp/base/timing.cpp ++++ b/itpp/base/timing.cpp +@@ -52,6 +52,10 @@ + #if defined(_WIN32) && !defined(__CYGWIN__) + #include + ++#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) ++#include ++#endif ++ + int gettimeofday(struct timeval* p, void*) + { + union { diff --git a/vcpkg/ports/itpp/msvc2013.patch b/vcpkg/ports/itpp/msvc2013.patch new file mode 100644 index 0000000..9cd35e8 --- /dev/null +++ b/vcpkg/ports/itpp/msvc2013.patch @@ -0,0 +1,284 @@ + CMakeLists.txt | 2 ++ + itpp/base/algebra/eigen.cpp | 1 + + itpp/base/algebra/ls_solve.cpp | 2 +- + itpp/base/algebra/qr.cpp | 1 + + itpp/base/algebra/svd.cpp | 2 +- + itpp/base/bessel/gamma.cpp | 5 +++++ + itpp/base/itcompat.cpp | 11 ++++++++++- + itpp/base/itcompat.h | 14 ++++++++++++-- + itpp/base/matfunc.h | 1 + + itpp/base/svec.h | 1 + + itpp/comm/siso_dem.cpp | 6 ++++++ + itpp/comm/siso_eq.cpp | 6 ++++++ + itpp/comm/siso_mud.cpp | 7 +++++++ + itpp/comm/siso_nsc.cpp | 6 ++++++ + itpp/comm/siso_rsc.cpp | 7 +++++++ + 15 files changed, 67 insertions(+), 5 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9f6a9a6..2360f86 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -122,7 +122,9 @@ CHECK_CXX_SYMBOL_EXISTS ( isnan "cmath" HAVE_DECL_ISNAN ) + CHECK_CXX_SYMBOL_EXISTS ( signgam "cmath" HAVE_DECL_SIGNGAM ) + + #check for functions ++if( NOT MSVC ) + set(CMAKE_REQUIRED_LIBRARIES m) ++endif() + include (CheckFunctionExists) + CHECK_FUNCTION_EXISTS ( acosh HAVE_ACOSH ) + CHECK_FUNCTION_EXISTS ( asinh HAVE_ASINH ) +diff --git a/itpp/base/algebra/eigen.cpp b/itpp/base/algebra/eigen.cpp +index 8c0c36b..54ae3e1 100644 +--- a/itpp/base/algebra/eigen.cpp ++++ b/itpp/base/algebra/eigen.cpp +@@ -39,6 +39,7 @@ + #include + #include + ++#include + + namespace itpp + { +diff --git a/itpp/base/algebra/ls_solve.cpp b/itpp/base/algebra/ls_solve.cpp +index dae38fc..95abf0a 100644 +--- a/itpp/base/algebra/ls_solve.cpp ++++ b/itpp/base/algebra/ls_solve.cpp +@@ -37,7 +37,7 @@ + #endif + + #include +- ++#include + + namespace itpp + { +diff --git a/itpp/base/algebra/qr.cpp b/itpp/base/algebra/qr.cpp +index 91dfb2b..0b47294 100644 +--- a/itpp/base/algebra/qr.cpp ++++ b/itpp/base/algebra/qr.cpp +@@ -39,6 +39,7 @@ + #include + #include + ++#include + + namespace itpp + { +diff --git a/itpp/base/algebra/svd.cpp b/itpp/base/algebra/svd.cpp +index aa21e36..b2e499c 100644 +--- a/itpp/base/algebra/svd.cpp ++++ b/itpp/base/algebra/svd.cpp +@@ -37,7 +37,7 @@ + #endif + + #include +- ++#include + + namespace itpp + { +diff --git a/itpp/base/bessel/gamma.cpp b/itpp/base/bessel/gamma.cpp +index 162c4ae..9405507 100644 +--- a/itpp/base/bessel/gamma.cpp ++++ b/itpp/base/bessel/gamma.cpp +@@ -34,6 +34,11 @@ + #include + #include + ++#if _MSC_VER ++//suppress warnings regarding the use infinity in fp arithmetic ++#pragma warning(disable: 4056) ++#pragma warning(disable: 4756) ++#endif + + /* + * Gamma function +diff --git a/itpp/base/itcompat.cpp b/itpp/base/itcompat.cpp +index f99ec81..aa34b28 100644 +--- a/itpp/base/itcompat.cpp ++++ b/itpp/base/itcompat.cpp +@@ -47,12 +47,21 @@ double tgamma(double x) + } + #endif + +-#if !defined(HAVE_LGAMMA) || (HAVE_DECL_SIGNGAM != 1) ++#if !defined(HAVE_LGAMMA) && (HAVE_DECL_SIGNGAM != 1) + // The sign of the Gamma function is returned in the external integer + // signgam declared in . It is 1 when the Gamma function is positive + // or zero, -1 when it is negative. However, MinGW definition of lgamma() + // function does not use the global signgam variable. ++//May 3rd 2015 (Andy Panov): ++//Nonetheless, I guess it would be smarter not to break the ODR rule and not to provide our own definition of lgamma ++//function when HAVE_LGAMMA is defined. If we still provide the definition, two definitions ++//of the same function will exist in the program (this is undefined behaviour, as C++ standard says), ++//so we can not ensure linker will choose our definition and user's code will work as expected. ++//I guess, error message from linker regarding the unresolved symbol is much better option, ++//since it clearly points to the math library limitations. Otherwise user can get a malfunctioning program ++//with really subtle error. + int signgam; ++ + // Logarithm of an absolute value of gamma function + double lgamma(double x) + { +diff --git a/itpp/base/itcompat.h b/itpp/base/itcompat.h +index e6be223..dcf2ed7 100644 +--- a/itpp/base/itcompat.h ++++ b/itpp/base/itcompat.h +@@ -41,8 +41,12 @@ + #if defined(_MSC_VER) + # include + # define finite(x) _finite(x) ++#ifndef HAVE_STD_ISFINITE + # define isfinite(x) _finite(x) ++#endif ++#ifndef HAVE_STD_ISNAN + # define isnan(x) _isnan(x) ++#endif + # define fpclass(x) _fpclass(x) + # define FP_NINF _FPCLASS_NINF + # define FP_PINF _FPCLASS_PINF +@@ -119,13 +123,19 @@ inline bool isfinite(double x) + double tgamma(double x); + #endif + +-#if !defined(HAVE_LGAMMA) || (HAVE_DECL_SIGNGAM != 1) ++#if !defined(HAVE_LGAMMA) && (HAVE_DECL_SIGNGAM != 1) ++//Provide own definitions if both conditions are met: ++//-lgammma is not defined ++//-signgam was not found ++//See ODR desicussion in itcompat.cpp ++ + //! Lograrithm of an absolute gamma function + double lgamma(double x); + //! Global variable needed by \c lgamma function + extern int signgam; + #endif + ++ + #ifndef HAVE_CBRT + //! Cubic root + double cbrt(double x); +@@ -141,7 +151,7 @@ inline double log1p(double x) { return std::log(1.0 + x); } + //! Base-2 logarithm + inline double log2(double x) + { +- static const double one_over_log2 = 1.0 / std::log(2.0); ++ const double one_over_log2 = 1.0 / std::log(2.0); + return std::log(x) * one_over_log2; + } + #endif +diff --git a/itpp/base/matfunc.h b/itpp/base/matfunc.h +index 8ae683e..60cf95f 100644 +--- a/itpp/base/matfunc.h ++++ b/itpp/base/matfunc.h +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + + namespace itpp + { +diff --git a/itpp/base/svec.h b/itpp/base/svec.h +index d105b2f..3a2c15b 100644 +--- a/itpp/base/svec.h ++++ b/itpp/base/svec.h +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + + namespace itpp + { +diff --git a/itpp/comm/siso_dem.cpp b/itpp/comm/siso_dem.cpp +index 666f38c..4fa03fd 100644 +--- a/itpp/comm/siso_dem.cpp ++++ b/itpp/comm/siso_dem.cpp +@@ -32,6 +32,12 @@ + #define INFINITY std::numeric_limits::infinity() + #endif + ++#if _MSC_VER ++//suppress warnings regarding the use infinity in fp arithmetic ++#pragma warning(disable: 4056) ++#endif ++ ++ + namespace itpp + { + void SISO::find_half_const(int &select_half, itpp::vec &re_part, itpp::bmat &re_bin_part, itpp::vec &im_part, itpp::bmat &im_bin_part) +diff --git a/itpp/comm/siso_eq.cpp b/itpp/comm/siso_eq.cpp +index 856c01a..6553b33 100644 +--- a/itpp/comm/siso_eq.cpp ++++ b/itpp/comm/siso_eq.cpp +@@ -32,6 +32,12 @@ + #define INFINITY std::numeric_limits::infinity() + #endif + ++#if _MSC_VER ++//suppress warnings regarding the use infinity in fp arithmetic ++#pragma warning(disable: 4056) ++#pragma warning(disable: 4756) ++#endif ++ + namespace itpp + { + void SISO::gen_chtrellis(void) +diff --git a/itpp/comm/siso_mud.cpp b/itpp/comm/siso_mud.cpp +index 60aa6d3..a7ff735 100644 +--- a/itpp/comm/siso_mud.cpp ++++ b/itpp/comm/siso_mud.cpp +@@ -32,6 +32,13 @@ + #define INFINITY std::numeric_limits::infinity() + #endif + ++#if _MSC_VER ++//suppress warnings regarding the use infinity in fp arithmetic ++#pragma warning(disable: 4056) ++#pragma warning(disable: 4756) ++#endif ++ ++ + namespace itpp + { + void SISO::descrambler(itpp::vec &extrinsic_coded, itpp::vec &extrinsic_data, const itpp::vec &intrinsic_coded, const itpp::vec &apriori_data) +diff --git a/itpp/comm/siso_nsc.cpp b/itpp/comm/siso_nsc.cpp +index ca7d19a..12ca62a 100644 +--- a/itpp/comm/siso_nsc.cpp ++++ b/itpp/comm/siso_nsc.cpp +@@ -33,6 +33,12 @@ + #define INFINITY std::numeric_limits::infinity() + #endif + ++#if _MSC_VER ++//suppress warnings regarding the use infinity in fp arithmetic ++#pragma warning(disable: 4056) ++#pragma warning(disable: 4756) ++#endif ++ + namespace itpp + { + void SISO::gen_nsctrellis(void) +diff --git a/itpp/comm/siso_rsc.cpp b/itpp/comm/siso_rsc.cpp +index e5003c7..9e3eea1 100644 +--- a/itpp/comm/siso_rsc.cpp ++++ b/itpp/comm/siso_rsc.cpp +@@ -29,6 +29,13 @@ + #include + #include + #include ++ ++#if _MSC_VER ++//suppress warnings regarding the use infinity in fp arithmetic ++#pragma warning(disable: 4056) ++#pragma warning(disable: 4756) ++#endif ++ + #ifndef INFINITY + #define INFINITY std::numeric_limits::infinity() + #endif + + #Remove this patch if the source has fixed these issues. diff --git a/vcpkg/ports/itpp/portfile.cmake b/vcpkg/ports/itpp/portfile.cmake new file mode 100644 index 0000000..730607b --- /dev/null +++ b/vcpkg/ports/itpp/portfile.cmake @@ -0,0 +1,30 @@ +set(ITPP_VERSION 4.3.1) + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO itpp/itpp + REF ${ITPP_VERSION} + FILENAME "itpp-${ITPP_VERSION}.tar.bz2" + SHA512 b46d048fa7f33e80d2291a5e38e205c159791ea200f92c70d69e8ad8447ac2f0c847fece566a99af739853a1643cb16e226b4200c8bf115417f324e6d38c66bd + PATCHES + msvc2013.patch + fix-uwp.patch + fix-linux.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/ixwebsocket/CONTROL b/vcpkg/ports/ixwebsocket/CONTROL new file mode 100644 index 0000000..dac666e --- /dev/null +++ b/vcpkg/ports/ixwebsocket/CONTROL @@ -0,0 +1,22 @@ +Source: ixwebsocket +Version: 9.6.2 +Build-Depends: zlib +Homepage: https://github.com/machinezone/IXWebSocket +Description: Lightweight WebSocket Client and Server + HTTP Client and Server +Default-Features: ssl + +Feature: ssl +Build-Depends: ixwebsocket[openssl] (!uwp&!windows&!osx), ixwebsocket[mbedtls] (windows), ixwebsocket[mbedtls] (uwp), ixwebsocket[sectransp] (osx) +Description: Default SSL backend + +# SSL backends +Feature: openssl +Build-Depends: openssl +Description: SSL support (OpenSSL) + +Feature: mbedtls +Build-Depends: mbedtls +Description: SSL support (mbedTLS) + +Feature: sectransp +Description: SSL support (sectransp) diff --git a/vcpkg/ports/ixwebsocket/portfile.cmake b/vcpkg/ports/ixwebsocket/portfile.cmake new file mode 100644 index 0000000..23aa61c --- /dev/null +++ b/vcpkg/ports/ixwebsocket/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO machinezone/IXWebSocket + REF v9.6.2 + SHA512 22a97f0c74d5789fd265627bbadfce02116a41fca888d684b756cbb1c070d626517855e265c484870d02db7084b6c1107d500acc1c13e327ede0c23228a54f7b +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + openssl USE_OPEN_SSL + mbedtls USE_MBED_TLS + sectransp USE_SECURE_TRANSPORT +) + +if("sectransp" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_OSX) + message(FATAL_ERROR "sectransp is not supported on non-Apple platforms") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DUSE_TLS=1 +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/jack2/CMakeLists.txt b/vcpkg/ports/jack2/CMakeLists.txt new file mode 100644 index 0000000..2fb25ed --- /dev/null +++ b/vcpkg/ports/jack2/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.8) +project(jack2 C) + +include_directories(common) + +add_library(jack2 STATIC common/JackWeakAPI.c) + +install(TARGETS jack2 + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install(DIRECTORY common/jack DESTINATION include) diff --git a/vcpkg/ports/jack2/CONTROL b/vcpkg/ports/jack2/CONTROL new file mode 100644 index 0000000..3337ea2 --- /dev/null +++ b/vcpkg/ports/jack2/CONTROL @@ -0,0 +1,6 @@ +Source: jack2 +Version: 1.9.14 +Homepage: https://github.com/jackaudio/jack2 +Description: Cross-platform API that enables device sharing and inter-application audio routing +Supports: !uwp + diff --git a/vcpkg/ports/jack2/portfile.cmake b/vcpkg/ports/jack2/portfile.cmake new file mode 100644 index 0000000..1c65a21 --- /dev/null +++ b/vcpkg/ports/jack2/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jackaudio/jack2 + REF b54a09bf7ef760d81fdb8544ad10e45575394624 # v1.9.14 + SHA512 a5f920ed1df71d9f5e3c4889ea2aa4d9ed9082d0b9070437a068e24a2caa5dffaa71b19352e9da056e9f23e930edab56816235ceb9293cc33d8870265f392c1d + HEAD_REF master +) + +# Install headers and a statically built JackWeakAPI.c +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/README.rst DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/jaeger-client-cpp/CONTROL b/vcpkg/ports/jaeger-client-cpp/CONTROL new file mode 100644 index 0000000..6d6d470 --- /dev/null +++ b/vcpkg/ports/jaeger-client-cpp/CONTROL @@ -0,0 +1,6 @@ +Source: jaeger-client-cpp +Version: 0.5.1-1 +Build-Depends: nlohmann-json,thrift,yaml-cpp,opentracing +Homepage: https://github.com/jaegertracing/jaeger-client-cpp +Description: C++ OpenTracing binding for Jaeger https://jaegertracing.io/ +Supports: !arm64 diff --git a/vcpkg/ports/jaeger-client-cpp/fix-CMakeLists.patch b/vcpkg/ports/jaeger-client-cpp/fix-CMakeLists.patch new file mode 100644 index 0000000..e0e1b6c --- /dev/null +++ b/vcpkg/ports/jaeger-client-cpp/fix-CMakeLists.patch @@ -0,0 +1,32 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5893f31..c8864fd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -59,7 +59,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND + endif() + + hunter_add_package(thrift) +-find_package(thrift ${hunter_config} REQUIRED) ++find_package(Thrift CONFIG REQUIRED) + if(HUNTER_ENABLED) + list(APPEND LIBS thrift::thrift_static) + else() +@@ -268,6 +268,9 @@ if(JAEGERTRACING_PLUGIN) + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/export.map + "{ global: OpenTracingMakeTracerFactory; local: *; };") + add_library(jaegertracing_plugin MODULE ${SRC}) ++ if (WIN32) ++ target_link_libraries(jaegertracing_plugin PUBLIC Iphlpapi Ws2_32) ++ endif() + add_lib_deps(jaegertracing_plugin) + target_link_libraries(jaegertracing_plugin PUBLIC + -static-libgcc +@@ -410,7 +413,7 @@ include(GNUInstallDirs) + # * /lib*/cmake/ + # * /lib*/ + # * /include/ +-set(config_install_dir "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") ++set(config_install_dir "${CMAKE_INSTALL_DATAROOTDIR}/jaeger-client-cpp") + + set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated") + diff --git a/vcpkg/ports/jaeger-client-cpp/portfile.cmake b/vcpkg/ports/jaeger-client-cpp/portfile.cmake new file mode 100644 index 0000000..d56f5ec --- /dev/null +++ b/vcpkg/ports/jaeger-client-cpp/portfile.cmake @@ -0,0 +1,68 @@ +vcpkg_fail_port_install(ON_ARCH "arm64") + +# Get jaeger-idl from github +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jaegertracing/jaeger-idl + REF 378b83a64a4a822a4e7d2936bac5d787780555ad + SHA512 eceea3dc806600bea8a05b597e26035e97950db227bbefc582d8f20ad549e0be42ebfad92ef3927ebc4892233bac9bcf85a96a25c17ec71fbca0b1b1755f556f + HEAD_REF master +) + +# Create target directory for proxy/stub generation +file(MAKE_DIRECTORY ${SOURCE_PATH}/data) +# List of input files +set(THRIFT_SOURCE_FILES agent.thrift jaeger.thrift sampling.thrift zipkincore.thrift crossdock/tracetest.thrift baggage.thrift dependency.thrift aggregation_validator.thrift) + +# Generate proxy/stubs for the input files +foreach(THRIFT_SOURCE_FILE IN LISTS THRIFT_SOURCE_FILES) +vcpkg_execute_required_process( + COMMAND ${CURRENT_INSTALLED_DIR}/tools/thrift/thrift --gen cpp:no_skeleton -o "${SOURCE_PATH}/data" ${THRIFT_SOURCE_FILE} + WORKING_DIRECTORY ${SOURCE_PATH}/thrift + LOGNAME jaeger-idl-${TARGET_TRIPLET} +) +endforeach() + +# Save generated proxy/stub target directory +set(IDL_SOURCE_DIR "${SOURCE_PATH}/data/gen-cpp") + +# Get jaeger-client-cpp from github +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jaegertracing/jaeger-client-cpp + REF 47fbf19aae2e48d59dd8335b6f2a1e1a99abba7f + SHA512 a07e4d3e585c0f3e99aff6a662229f6beed8aef80fc6f7188629da38421bc49ab9effea479398e0d94e0a127bd931054ab332b38b73c2191bf75d4adfe5f6928 + HEAD_REF master + PATCHES + "fix-CMakeLists.patch" +) + +# Do not use hunter, not testtools and build opentracing plugin +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DHUNTER_ENABLED=0 + -DBUILD_TESTING=0 + -DJAEGERTRACING_PLUGIN=0 + -DJAEGERTRACING_BUILD_EXAMPLES=0 +) + +# Copy generated files over to jaeger-client-cpp +file(GLOB IDL_SOURCE_FILES LIST_DIRECTORIES false ${IDL_SOURCE_DIR}/*) +file(COPY ${IDL_SOURCE_FILES} DESTINATION ${SOURCE_PATH}/src/jaegertracing/thrift-gen) + +# Generate Jaeger client +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets() + +# Cleanup unused Debug files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# Cleanup +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/jaegertracing/testutils) diff --git a/vcpkg/ports/jansson/CONTROL b/vcpkg/ports/jansson/CONTROL new file mode 100644 index 0000000..19b1224 --- /dev/null +++ b/vcpkg/ports/jansson/CONTROL @@ -0,0 +1,4 @@ +Source: jansson +Version: 2.12-1 +Homepage: https://github.com/akheron/jansson +Description: Jansson is a C library for encoding, decoding and manipulating JSON data diff --git a/vcpkg/ports/jansson/portfile.cmake b/vcpkg/ports/jansson/portfile.cmake new file mode 100644 index 0000000..62086e9 --- /dev/null +++ b/vcpkg/ports/jansson/portfile.cmake @@ -0,0 +1,50 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO akheron/jansson + REF 71c4e8ec215afa225ac20eed269a14963cd37b50 + SHA512 cdb955996768d6c7ed15b9f1bb7ddf4905f881c4e604d9e7a863f42c513eaaa9fb8799dacfa392424fbf725aac125d4716e10c44c3415449b5c5edd38a87b290 + HEAD_REF master +) + +if(VCPKG_CRT_LINKAGE STREQUAL static) + set(JANSSON_STATIC_CRT ON) +else() + set(JANSSON_STATIC_CRT OFF) +endif() + + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(JANSSON_BUILD_SHARED_LIBS ON) +else() + set(JANSSON_BUILD_SHARED_LIBS OFF) +endif() + +# Jansson tries to random-seed its hash table with system-provided entropy. +# This is not ported to UWP yet. +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(USE_WINDOWS_CRYPTOAPI OFF) +else() + set(USE_WINDOWS_CRYPTOAPI ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DJANSSON_STATIC_CRT=${JANSSON_STATIC_CRT} + -DJANSSON_EXAMPLES=OFF + -DJANSSON_WITHOUT_TESTS=ON + -DJANSSON_BUILD_SHARED_LIBS=${JANSSON_BUILD_SHARED_LIBS} + -DUSE_WINDOWS_CRYPTOAPI=${USE_WINDOWS_CRYPTOAPI} + -DJANSSON_INSTALL_CMAKE_DIR:STRING=share/jansson +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jansson RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/jasper/CONTROL b/vcpkg/ports/jasper/CONTROL new file mode 100644 index 0000000..df701a0 --- /dev/null +++ b/vcpkg/ports/jasper/CONTROL @@ -0,0 +1,5 @@ +Source: jasper +Version: 2.0.16-3 +Homepage: https://github.com/mdadams/jasper +Description: Open source implementation of the JPEG-2000 Part-1 standard +Build-Depends: libjpeg-turbo, opengl, freeglut (!osx) diff --git a/vcpkg/ports/jasper/portfile.cmake b/vcpkg/ports/jasper/portfile.cmake new file mode 100644 index 0000000..ae42d2a --- /dev/null +++ b/vcpkg/ports/jasper/portfile.cmake @@ -0,0 +1,39 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mdadams/jasper + REF version-2.0.16 + SHA512 b3bca227f833567c9061c4a29c0599784ed6a131b5cceddfd1696542d19add821eda445ce6d83782b454b266723b24d0f028cbc644a25c0e3a75304e615b34ee + HEAD_REF master +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(JAS_ENABLE_SHARED ON) +else() + set(JAS_ENABLE_SHARED OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DJAS_ENABLE_AUTOMATIC_DEPENDENCIES=OFF + -DJAS_ENABLE_LIBJPEG=ON + -DJAS_ENABLE_DOC=OFF + -DJAS_ENABLE_PROGRAMS=OFF + -DJAS_ENABLE_SHARED=${JAS_ENABLE_SHARED} + OPTIONS_DEBUG + -DCMAKE_DEBUG_POSTFIX=d # Due to CMakes FindJasper +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jasper RENAME copyright) diff --git a/vcpkg/ports/jbig2dec/CMakeLists.txt b/vcpkg/ports/jbig2dec/CMakeLists.txt new file mode 100644 index 0000000..14b1be6 --- /dev/null +++ b/vcpkg/ports/jbig2dec/CMakeLists.txt @@ -0,0 +1,23 @@ +cmake_minimum_required(VERSION 3.9) +project(jbig2dec C) + +set(CMAKE_DEBUG_POSTFIX d) + +file(GLOB SOURCES jbig2*.c) +list(REMOVE_ITEM SOURCES + "${CMAKE_CURRENT_SOURCE_DIR}/jbig2dec.c" + "${CMAKE_CURRENT_SOURCE_DIR}/jbig2_image_png.c" + "${CMAKE_CURRENT_SOURCE_DIR}/jbig2_image_pbm.c" +) + +add_library(jbig2dec ${SOURCES}) + +install(TARGETS jbig2dec + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES jbig2.h DESTINATION include) +endif() diff --git a/vcpkg/ports/jbig2dec/CONTROL b/vcpkg/ports/jbig2dec/CONTROL new file mode 100644 index 0000000..82a0afb --- /dev/null +++ b/vcpkg/ports/jbig2dec/CONTROL @@ -0,0 +1,4 @@ +Source: jbig2dec +Version: 0.17 +Homepage: https://github.com/ArtifexSoftware/jbig2dec +Description: a decoder library and example utility implementing the JBIG2 bi-level image compression spec. Also known as ITU T.88 and ISO IEC 14492, and included by reference in Adobe's PDF version 1.4 and later. diff --git a/vcpkg/ports/jbig2dec/portfile.cmake b/vcpkg/ports/jbig2dec/portfile.cmake new file mode 100644 index 0000000..f03c98b --- /dev/null +++ b/vcpkg/ports/jbig2dec/portfile.cmake @@ -0,0 +1,25 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ArtifexSoftware/jbig2dec + REF d5db179ea91b1da54df81adb8d5d6d2573117b6a # 0.17 + SHA512 1d12da6f666d2a87c6cd7dc4fc7cd7a21b4c15cd299027d134885cfe0aaab0e5908a3eb3249a70f2ccba763c7b0a3accb334efdb0bbe5adc2e644125c602fa1c + 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() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/jbig2dec RENAME copyright) diff --git a/vcpkg/ports/jbigkit/CMakeLists.txt b/vcpkg/ports/jbigkit/CMakeLists.txt new file mode 100644 index 0000000..2b82410 --- /dev/null +++ b/vcpkg/ports/jbigkit/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.4) +project(libjbig C) + +set(SOURCES + "libjbig/jbig.c" + "libjbig/jbig_ar.c" + "libjbig/jbig85.c") + +set(HEADERS + "libjbig/jbig.h" + "libjbig/jbig_ar.h" + "libjbig/jbig85.h" +) + +add_library(libjbig ${SOURCES}) + +install( + TARGETS libjbig + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install( + FILES ${HEADERS} + DESTINATION include) diff --git a/vcpkg/ports/jbigkit/CONTROL b/vcpkg/ports/jbigkit/CONTROL new file mode 100644 index 0000000..c1c76a8 --- /dev/null +++ b/vcpkg/ports/jbigkit/CONTROL @@ -0,0 +1,4 @@ +Source: jbigkit +Version: 2.1-4 +Homepage: https://www.cl.cam.ac.uk/~mgk25/jbigkit +Description: A software implementation of the JBIG1 data compression standard (ITU-T T.82) diff --git a/vcpkg/ports/jbigkit/portfile.cmake b/vcpkg/ports/jbigkit/portfile.cmake new file mode 100644 index 0000000..25c8793 --- /dev/null +++ b/vcpkg/ports/jbigkit/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +set(JBIGKIT_VERSION 2.1) +set(JBIGKIT_HASH c4127480470ef90db1ef3bd2caa444df10b50ed8df0bc9997db7612cb48b49278baf44965028f1807a21028eb965d677e015466306b44683c4ec75a23e1922cf) + +vcpkg_download_distfile(ARCHIVE + URLS "http://www.cl.cam.ac.uk/~mgk25/jbigkit/download/jbigkit-${JBIGKIT_VERSION}.tar.gz" + FILENAME "jbigkit-${JBIGKIT_VERSION}.tar.gz" + SHA512 ${JBIGKIT_HASH} +) + +vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/jbigkit) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/jbigkit/COPYING ${CURRENT_PACKAGES_DIR}/share/jbigkit/copyright) diff --git a/vcpkg/ports/jemalloc/CONTROL b/vcpkg/ports/jemalloc/CONTROL new file mode 100644 index 0000000..3f6be44 --- /dev/null +++ b/vcpkg/ports/jemalloc/CONTROL @@ -0,0 +1,5 @@ +Source: jemalloc +Version: 4.3.1-4 +Homepage: https://github.com/jemalloc/jemalloc-cmake +Description: jemalloc is a general purpose malloc(3) implementation that emphasizes fragmentation avoidance and scalable concurrency support +Build-Depends: diff --git a/vcpkg/ports/jemalloc/fix-cmakelists.patch b/vcpkg/ports/jemalloc/fix-cmakelists.patch new file mode 100644 index 0000000..3ba7054 --- /dev/null +++ b/vcpkg/ports/jemalloc/fix-cmakelists.patch @@ -0,0 +1,67 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 06e83ef..229e17a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -57,6 +57,7 @@ option(enable-lazy-lock "Enable lazy locking (only lock when multi-threaded" OFF + option(force_lazy_lock "Forcing lazy-lock to avoid allocator/threading bootstrap issues" OFF) + # install_prefix - installation directory prefix + # with-xslroot= XSL stylesheet root path ++option(build-tests "Build tests" OFF) + + set (PACKAGE_NAME "jemalloc") + project (${PACKAGE_NAME} C) +@@ -711,12 +712,8 @@ endif() + + # The original library, delivery product + set(LIBJEMALLOCLIB jemalloc${install_suffix}) +-add_library(${LIBJEMALLOCLIB} STATIC ${C_SRCS}) +- +-# Now add shared library. Needed for integration tests +-# and a benchmark +-set(LIBJEMALLOCSO jemallocso${install_suffix}) +-add_library(${LIBJEMALLOCSO} SHARED ${C_SRCS}) ++set(LIBJEMALLOCSO ${LIBJEMALLOCLIB}) ++add_library(${LIBJEMALLOCLIB} ${C_SRCS}) + + if(WIN32) + # May want to replace /d2Zi+ to /Zo +@@ -745,8 +745,6 @@ if(WIN32) + # either impport or export which is both wrong for a static library + set_target_properties(${LIBJEMALLOCLIB} + PROPERTIES +- COMPILE_DEFINITIONS +- "JEMALLOC_EXPORT=" + CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_DEBUG + ${PROJECT_BINARY_DIR}/Debug + CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY_RELEASE +@@ -754,6 +752,9 @@ if(WIN32) + COMPILE_PDB_NAME + ${LIBJEMALLOCLIB} + ) ++ if(NOT BUILD_SHARED_LIBS) ++ target_compile_definitions(${LIBJEMALLOCLIB} "JEMALLOC_EXPORT=") ++ endif() + + endif() + +@@ -825,6 +822,14 @@ if(C_UTIL_INTEGRATION_DEFS) + "${C_UTIL_INTEGRATION_DEFS}") + endif() + ++install(FILES include/jemalloc/jemalloc${install_suffix}.h ++ DESTINATION include/jemalloc) ++ ++install(TARGETS ${LIBJEMALLOCSO} ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) ++if (build-tests) + ################################################################## + # Common source for Unit, Integration and stress test libraries + set(C_TESTLIB_SRCS +@@ -1028,4 +1033,4 @@ foreach(sourcefile ${TESTS_INTEGRATION}) + add_test(NAME ${exename} COMMAND ${exename}) + add_dependencies(check ${exename}) + endforeach(sourcefile ${TESTS_UNIT}) +- ++endif() diff --git a/vcpkg/ports/jemalloc/fix-static-build.patch b/vcpkg/ports/jemalloc/fix-static-build.patch new file mode 100644 index 0000000..3ede809 --- /dev/null +++ b/vcpkg/ports/jemalloc/fix-static-build.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0b8959a..55e6a5f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -826,10 +826,16 @@ endif() + install(FILES include/jemalloc/jemalloc${install_suffix}.h + DESTINATION include/jemalloc) + +-install(TARGETS ${LIBJEMALLOCSO} +- RUNTIME DESTINATION bin +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib) ++if (without-export) ++ install(TARGETS ${C_JETLIB} ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) ++else() ++ install(TARGETS ${LIBJEMALLOCSO} ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) ++endif() + if (build-tests) + ################################################################## + # Common source for Unit, Integration and stress test libraries diff --git a/vcpkg/ports/jemalloc/fix-utilities.patch b/vcpkg/ports/jemalloc/fix-utilities.patch new file mode 100644 index 0000000..32c39e0 --- /dev/null +++ b/vcpkg/ports/jemalloc/fix-utilities.patch @@ -0,0 +1,30 @@ +diff --git a/Utilities.cmake b/Utilities.cmake +index 562e948..d2d3530 100644 +--- a/Utilities.cmake ++++ b/Utilities.cmake +@@ -633,9 +633,11 @@ file(TO_NATIVE_PATH "${file_path}" ntv_file_path) + # This converts #undefs into #cmakedefines so configure_file can handle it + set(PS_CMD + "Get-Content \"${ntv_file_path}\" | +-ForEach { ++ForEach { + if($_ -match '^#undef[ \t]*[^ \t]*') +- { $_ -replace '^#undef[ \t]*([^ \t]*)','#cmakedefine $1 @$1@' } else {$_}}" ++ { $_ -replace '^#undef[ \t]*([^ \t]*)','#cmakedefine $1 @$1@' } else {$_} ++} | ++Set-Content \"${ntv_file_path}.cmake\"" + ) + + if(EXISTS ${file_path}) +@@ -646,9 +648,8 @@ if(EXISTS ${file_path}) + # Convert autoconf .in into a cmake .in + execute_process(COMMAND powershell -Command "${PS_CMD}" + RESULT_VARIABLE error_level +- ERROR_VARIABLE error_output +- OUTPUT_FILE ${file_path}.cmake) +- ++ ERROR_VARIABLE error_output) ++ + if(NOT ${error_level} EQUAL 0) + message(FATAL_ERROR "Powershell completed with ${error_level} : ${error_output}") + endif() diff --git a/vcpkg/ports/jemalloc/portfile.cmake b/vcpkg/ports/jemalloc/portfile.cmake new file mode 100644 index 0000000..49e89b8 --- /dev/null +++ b/vcpkg/ports/jemalloc/portfile.cmake @@ -0,0 +1,37 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jemalloc/jemalloc-cmake + REF jemalloc-cmake.4.3.1 + SHA512 e94b62ec3a53acc0ab5acb247d7646bc172108e80f592bb41c2dd50d181cbbeb33d623adf28415ffc0a0e2de3818af2dfe4c04af75ac891ef5042bc5bb186886 + HEAD_REF master + PATCHES + fix-cmakelists.patch + fix-utilities.patch + fix-static-build.patch +) + +if (VCPKG_CRT_LINKAGE STREQUAL "dynamic") + set(BUILD_STATIC_LIBRARY OFF) +else() + set(BUILD_STATIC_LIBRARY ON) +endif() +vcpkg_configure_cmake( + DISABLE_PARALLEL_CONFIGURE + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DGIT_FOUND=OFF -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON -Dwithout-export=${BUILD_STATIC_LIBRARY} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/jemalloc) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/jemalloc/COPYING ${CURRENT_PACKAGES_DIR}/share/jemalloc/copyright) diff --git a/vcpkg/ports/jinja2cpplight/CONTROL b/vcpkg/ports/jinja2cpplight/CONTROL new file mode 100644 index 0000000..f918eb2 --- /dev/null +++ b/vcpkg/ports/jinja2cpplight/CONTROL @@ -0,0 +1,5 @@ +Source: jinja2cpplight +Version: 2018-05-08 +Homepage: https://github.com/hughperkins/Jinja2CppLight +Description: (very) lightweight version of Jinja2 for C++, Lightweight templating engine for C++, based on Jinja2. +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/jinja2cpplight/portfile.cmake b/vcpkg/ports/jinja2cpplight/portfile.cmake new file mode 100644 index 0000000..49eff20 --- /dev/null +++ b/vcpkg/ports/jinja2cpplight/portfile.cmake @@ -0,0 +1,39 @@ +include(vcpkg_common_functions) + +if(VCPKG_TARGET_IS_UWP) + message(FATAL_ERROR "jinja2cpplight doesn't support UWP.") +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +else() + vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) +endif() + + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO hughperkins/Jinja2CppLight + REF 04196b080adf6edb86184824a1cf948ace310d19 #Commits on May 8, 2018 + SHA512 30415da5ebc4fb805953cc9ff7e5fcd357d6fa1818c1ff2570b795252de6215562cd0f2f0418a1fa60e9d74b88339a3fea7166b898f54cface6ab1cfe3581bb5 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + + +file(GLOB_RECURSE JINJA2CPPLIGHT_EXES ${CURRENT_PACKAGES_DIR}/bin/jinja2cpplight_unittests*) +file(COPY ${JINJA2CPPLIGHT_EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) +file(REMOVE_RECURSE ${JINJA2CPPLIGHT_EXES}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/josuttis-jthread/CONTROL b/vcpkg/ports/josuttis-jthread/CONTROL new file mode 100644 index 0000000..8a0fc3c --- /dev/null +++ b/vcpkg/ports/josuttis-jthread/CONTROL @@ -0,0 +1,5 @@ +Source: josuttis-jthread +Version: 2020-07-21 +Port-Version: 1 +Homepage: https://github.com/josuttis/jthread +Description: C++ class for a joining and cooperative interruptible thread (std::jthread) with stop_token helper diff --git a/vcpkg/ports/josuttis-jthread/portfile.cmake b/vcpkg/ports/josuttis-jthread/portfile.cmake new file mode 100644 index 0000000..9563442 --- /dev/null +++ b/vcpkg/ports/josuttis-jthread/portfile.cmake @@ -0,0 +1,15 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO josuttis/jthread + REF 3e1908f3bbaba6d2195bb423840c23e107c9e8b2 + SHA512 b6e4df35b364848a433eb31023a8b5b5045b2445aaf9a81406a6b3ce7cfdda08bcdb486be9201f5b1e54df38884c1763fae336fdcb9ad79f11658a92c535055d + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/source/jthread.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/source/stop_token.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/source/condition_variable_any2.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/jsmn/CONTROL b/vcpkg/ports/jsmn/CONTROL new file mode 100644 index 0000000..b19e265 --- /dev/null +++ b/vcpkg/ports/jsmn/CONTROL @@ -0,0 +1,3 @@ +Source: jsmn +Version: 2019-04-27 +Description: A minimalistic JSON parser in C. diff --git a/vcpkg/ports/jsmn/portfile.cmake b/vcpkg/ports/jsmn/portfile.cmake new file mode 100644 index 0000000..0b7599c --- /dev/null +++ b/vcpkg/ports/jsmn/portfile.cmake @@ -0,0 +1,16 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zserge/jsmn + REF fdcef3ebf886fa210d14956d3c068a653e76a24e + SHA512 ec3a6b106b868238aa626e5b4477ace4414f385a35c695a583598975202b73a2a446143eb5f0ea73b0a84113c610ea36e64341fccecd1d1ddd9080e06f599575 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/jsmn.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/json-c/CONTROL b/vcpkg/ports/json-c/CONTROL new file mode 100644 index 0000000..27067f9 --- /dev/null +++ b/vcpkg/ports/json-c/CONTROL @@ -0,0 +1,4 @@ +Source: json-c +Version: 2019-09-10 +Description: A JSON implementation in C +Homepage: https://github.com/json-c/json-c diff --git a/vcpkg/ports/json-c/portfile.cmake b/vcpkg/ports/json-c/portfile.cmake new file mode 100644 index 0000000..9519023 --- /dev/null +++ b/vcpkg/ports/json-c/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO json-c/json-c + REF eae040a84a479ccad1d1c48314345c51ecf1a4a4 + SHA512 18d8a31b341830b04676cad13fbc0608fb75a323522161ac8fd0bb5058db82c1c261d504696a1e12f4b03eb0967632885580ff81d808adf2f1dff7e32d131ba0 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/vcpkg/ports/json-dto/CONTROL b/vcpkg/ports/json-dto/CONTROL new file mode 100644 index 0000000..b9f0181 --- /dev/null +++ b/vcpkg/ports/json-dto/CONTROL @@ -0,0 +1,4 @@ +Source: json-dto +Version: 0.2.10 +Description: A small header-only library for converting data between json representation and c++ structs. +Build-Depends: rapidjson diff --git a/vcpkg/ports/json-dto/portfile.cmake b/vcpkg/ports/json-dto/portfile.cmake new file mode 100644 index 0000000..75d43c5 --- /dev/null +++ b/vcpkg/ports/json-dto/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO stiffstream/json_dto + REF bc4e55984f033c677c8a298af86ba72ea5ef6072 # v.0.2.10 + SHA512 1128e6290ff42600a93aed7c7208ace7e977f259654e580f920db612dcef4fe714bf8e0ed237bbf9e689f66959ab56ab27c9b7477504d71d205f3500d3bce07a +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/dev + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DJSON_DTO_INSTALL=ON + -DJSON_DTO_TEST=OFF + -DJSON_DTO_SAMPLE=OFF + -DJSON_DTO_INSTALL_SAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/json-dto) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/json-schema-validator/CONTROL b/vcpkg/ports/json-schema-validator/CONTROL new file mode 100644 index 0000000..a602b1d --- /dev/null +++ b/vcpkg/ports/json-schema-validator/CONTROL @@ -0,0 +1,5 @@ +Source: json-schema-validator +Version: 2.1.0 +Homepage: https://github.com/pboettch/json-schema-validator +Description: This is a C++ library for validating JSON documents based on a JSON Schema. This validator is based on nlohmann json library. +Build-Depends: nlohmann-json[core] diff --git a/vcpkg/ports/json-schema-validator/cmake-find-package.patch b/vcpkg/ports/json-schema-validator/cmake-find-package.patch new file mode 100644 index 0000000..995ae06 --- /dev/null +++ b/vcpkg/ports/json-schema-validator/cmake-find-package.patch @@ -0,0 +1,36 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c4cc218..ff2b706 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -8,6 +8,8 @@ cmake_minimum_required(VERSION 3.2) + option(BUILD_TESTS "Build tests" ON) + option(BUILD_EXAMPLES "Build examples" ON) + ++find_package(nlohmann_json CONFIG REQUIRED) ++ + # the library + add_library(nlohmann_json_schema_validator + src/json-schema-draft7.json.cpp +@@ -34,6 +36,13 @@ set_target_properties(nlohmann_json_schema_validator + # because of the dependency to nlohmann_json. + set(JSON_VALIDATOR_INSTALL ON) + ++target_link_libraries( ++ nlohmann_json_schema_validator ++ PUBLIC ++ nlohmann_json ++ nlohmann_json::nlohmann_json) ++ ++if(0) + # here we decice how nlohmann::json is found and used to build this project + + # first, check whether a nlohmann_json::nlohmann_json target exists already +@@ -92,7 +101,7 @@ else() + set(nlohmann_json_DIR ${JSON_HPP}) + endif() + endif() +- ++endif() + if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR + "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + target_compile_options(nlohmann_json_schema_validator diff --git a/vcpkg/ports/json-schema-validator/fix-ambiguous-assignment.patch b/vcpkg/ports/json-schema-validator/fix-ambiguous-assignment.patch new file mode 100644 index 0000000..3e655b4 --- /dev/null +++ b/vcpkg/ports/json-schema-validator/fix-ambiguous-assignment.patch @@ -0,0 +1,13 @@ +diff --git a/src/json-validator.cpp b/src/json-validator.cpp +index f16f3ef..1f7b615 100644 +--- a/src/json-validator.cpp ++++ b/src/json-validator.cpp +@@ -663,7 +663,7 @@ public: + #ifndef NO_STD_REGEX + attr = sch.find("pattern"); + if (attr != sch.end()) { +- patternString_ = attr.value(); ++ patternString_ = attr.value().get(); + pattern_ = {true, REGEX_NAMESPACE::regex(attr.value().get(), + REGEX_NAMESPACE::regex::ECMAScript)}; + sch.erase(attr); diff --git a/vcpkg/ports/json-schema-validator/forward-find-package.patch b/vcpkg/ports/json-schema-validator/forward-find-package.patch new file mode 100644 index 0000000..e5ddde5 --- /dev/null +++ b/vcpkg/ports/json-schema-validator/forward-find-package.patch @@ -0,0 +1,14 @@ +diff --git a/nlohmann_json_schema_validatorConfig.cmake.in b/nlohmann_json_schema_validatorConfig.cmake.in +index 6ee0df2..e0315fa 100644 +--- a/nlohmann_json_schema_validatorConfig.cmake.in ++++ b/nlohmann_json_schema_validatorConfig.cmake.in +@@ -7,6 +7,9 @@ + get_filename_component(NLOHMANN_JSON_SCHEMA_VALIDATOR_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) + set(NLOHMANN_JSON_SCHEMA_VALIDATOR_INCLUDE_DIRS @CONF_INCLUDE_DIRS@) + ++include(CMakeFindDependencyMacro) ++find_dependency(nlohmann_json) ++ + # Our library dependencies (contains definitions for IMPORTED targets) + if(NOT TARGET json-schema-validator) + include("${NLOHMANN_JSON_SCHEMA_VALIDATOR_CMAKE_DIR}/nlohmann_json_schema_validatorTargets.cmake") diff --git a/vcpkg/ports/json-schema-validator/portfile.cmake b/vcpkg/ports/json-schema-validator/portfile.cmake new file mode 100644 index 0000000..941ec53 --- /dev/null +++ b/vcpkg/ports/json-schema-validator/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pboettch/json-schema-validator + REF 27fc1d094503623dfe39365ba82581507524545c + SHA512 4fd05087743f43871586a53d119acd1a19d0bdec8a5620f62b6eee7a926d285842e8439127eec52eeb11069c92b8d9af28558897d48e2422ecafca39d9f23cdb + HEAD_REF master + PATCHES + fix-ambiguous-assignment.patch + cmake-find-package.patch + forward-find-package.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTS=OFF + -DBUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +set(PKG_NAME "nlohmann_json_schema_validator") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PKG_NAME} TARGET_PATH share/${PKG_NAME}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + diff --git a/vcpkg/ports/json-schema-validator/usage b/vcpkg/ports/json-schema-validator/usage new file mode 100644 index 0000000..3493d38 --- /dev/null +++ b/vcpkg/ports/json-schema-validator/usage @@ -0,0 +1,4 @@ +The package json-schema-validator provides CMake integration: + + find_package(nlohmann_json_schema_validator REQUIRED) + target_link_libraries(main PRIVATE nlohmann_json_schema_validator) diff --git a/vcpkg/ports/json-spirit/CONTROL b/vcpkg/ports/json-spirit/CONTROL new file mode 100644 index 0000000..e2b1d80 --- /dev/null +++ b/vcpkg/ports/json-spirit/CONTROL @@ -0,0 +1,4 @@ +Source: json-spirit +Version: 4.1.0-1 +Description: json parser using boost library +Build-Depends: boost-config, boost-integer, boost-smart-ptr, boost-variant, boost-spirit diff --git a/vcpkg/ports/json-spirit/Fix-link-error-C1128.patch b/vcpkg/ports/json-spirit/Fix-link-error-C1128.patch new file mode 100644 index 0000000..e676931 --- /dev/null +++ b/vcpkg/ports/json-spirit/Fix-link-error-C1128.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 24b1caf..2aac0b0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -60,7 +60,9 @@ endif() + + message(${CMAKE_INSTALL_INCLUDEDIR}) + +- ++if(MSVC) ++add_definitions(/bigobj) ++endif() + set(CPACK_PACKAGE_VERSION_MAJOR 4) + set(CPACK_PACKAGE_VERSION_MINOR 0) + set(CPACK_PACKAGE_VERSION_PATCH 8) diff --git a/vcpkg/ports/json-spirit/dll-wins.patch b/vcpkg/ports/json-spirit/dll-wins.patch new file mode 100644 index 0000000..18c60e5 --- /dev/null +++ b/vcpkg/ports/json-spirit/dll-wins.patch @@ -0,0 +1,281 @@ +diff --git a/.travis.yml b/.travis.yml +index e5b56eb..87f2926 100644 +--- a/.travis.yml ++++ b/.travis.yml +@@ -14,4 +14,4 @@ script: + - cmake --build . --target all -- + + after_script: +- - ctest ++ - ctest +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fb24877..a10a49f 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -60,15 +60,17 @@ endif() + + message(${CMAKE_INSTALL_INCLUDEDIR}) + +- ++ + set(CPACK_PACKAGE_VERSION_MAJOR 4) + set(CPACK_PACKAGE_VERSION_MINOR 0) + set(CPACK_PACKAGE_VERSION_PATCH 8) + set(CPACK_PACKAGE_DESCRIPTION "A C++ JSON Parser/Generator Implemented with Boost Spirit") + include(CPack) +- ++ ++set(EXPORT_HEADERS ) + INSTALL( + FILES ++ json_spirit/json_spirit_global.h + json_spirit/json_spirit.h + json_spirit/json_spirit_error_position.h + json_spirit/json_spirit_reader.h +@@ -80,4 +82,4 @@ INSTALL( + json_spirit/json_spirit_writer_template.h + json_spirit/json_spirit_writer_options.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/json_spirit) +- ++ +diff --git a/json_spirit/CMakeLists.txt b/json_spirit/CMakeLists.txt +index 23da64c..10d4e2b 100755 +--- a/json_spirit/CMakeLists.txt ++++ b/json_spirit/CMakeLists.txt +@@ -15,13 +15,19 @@ SET(JSON_SPIRIT_SRCS + FIND_PACKAGE(Boost 1.34 REQUIRED) + INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR}) + +- ++ + OPTION(BUILD_STATIC_LIBS "Build static libraries" OFF) + + if(BUILD_STATIC_LIBS) + ADD_LIBRARY(json_spirit STATIC ${JSON_SPIRIT_SRCS}) +- install(TARGETS json_spirit ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install(TARGETS json_spirit ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + else(BUILD_STATIC_LIBS) + ADD_LIBRARY(json_spirit SHARED ${JSON_SPIRIT_SRCS}) +- install(TARGETS json_spirit LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ if(WIN32) ++ install(TARGETS json_spirit RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++ install(TARGETS json_spirit ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ else() ++ install(TARGETS json_spirit LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ endif() ++ + endif(BUILD_STATIC_LIBS) +diff --git a/json_spirit/json_spirit_global.h b/json_spirit/json_spirit_global.h +new file mode 100644 +index 0000000..07a7d2c +--- /dev/null ++++ b/json_spirit/json_spirit_global.h +@@ -0,0 +1,18 @@ ++#ifndef JSON_SPIRIT_GLOBAL_H ++#define JSON_SPIRIT_GLOBAL_H ++ ++#if (defined _WIN32) || (defined _WIN64) ++ #define DECL_EXPORT __declspec(dllexport) ++ #define DECL_IMPORT __declspec(dllimport) ++#else ++ #define DECL_EXPORT ++ #define DECL_IMPORT ++#endif ++ ++#if defined(json_spirit_EXPORTS) ++# define json_spirit_EXPORT DECL_EXPORT ++#else ++# define json_spirit_EXPORT DECL_IMPORT ++#endif ++ ++#endif +\ No newline at end of file +diff --git a/json_spirit/json_spirit_reader.h b/json_spirit/json_spirit_reader.h +index a6cfac7..50cc6f5 100755 +--- a/json_spirit/json_spirit_reader.h ++++ b/json_spirit/json_spirit_reader.h +@@ -11,6 +11,7 @@ + # pragma once + #endif + ++#include "json_spirit_global.h" + #include "json_spirit_value.h" + #include "json_spirit_error_position.h" + #include +@@ -20,43 +21,43 @@ namespace json_spirit + // functions to reads a JSON values + + #ifdef JSON_SPIRIT_VALUE_ENABLED +- bool read( const std::string& s, Value& value ); +- bool read( std::istream& is, Value& value ); +- bool read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value ); ++ json_spirit_EXPORT bool read( const std::string& s, Value& value ); ++ json_spirit_EXPORT bool read( std::istream& is, Value& value ); ++ json_spirit_EXPORT bool read( std::string::const_iterator& begin, std::string::const_iterator end, Value& value ); + +- void read_or_throw( const std::string& s, Value& value ); +- void read_or_throw( std::istream& is, Value& value ); +- void read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value ); ++ json_spirit_EXPORT void read_or_throw( const std::string& s, Value& value ); ++ json_spirit_EXPORT void read_or_throw( std::istream& is, Value& value ); ++ json_spirit_EXPORT void read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, Value& value ); + #endif + + #if defined( JSON_SPIRIT_WVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING ) +- bool read( const std::wstring& s, wValue& value ); +- bool read( std::wistream& is, wValue& value ); +- bool read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value ); ++ json_spirit_EXPORT bool read( const std::wstring& s, wValue& value ); ++ json_spirit_EXPORT bool read( std::wistream& is, wValue& value ); ++ json_spirit_EXPORT bool read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value ); + +- void read_or_throw( const std::wstring& s, wValue& value ); +- void read_or_throw( std::wistream& is, wValue& value ); +- void read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value ); ++ json_spirit_EXPORT void read_or_throw( const std::wstring& s, wValue& value ); ++ json_spirit_EXPORT void read_or_throw( std::wistream& is, wValue& value ); ++ json_spirit_EXPORT void read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wValue& value ); + #endif + + #ifdef JSON_SPIRIT_MVALUE_ENABLED +- bool read( const std::string& s, mValue& value ); +- bool read( std::istream& is, mValue& value ); +- bool read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value ); ++ json_spirit_EXPORT bool read( const std::string& s, mValue& value ); ++ json_spirit_EXPORT bool read( std::istream& is, mValue& value ); ++ json_spirit_EXPORT bool read( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value ); + +- void read_or_throw( const std::string& s, mValue& value ); +- void read_or_throw( std::istream& is, mValue& value ); +- void read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value ); ++ json_spirit_EXPORT void read_or_throw( const std::string& s, mValue& value ); ++ json_spirit_EXPORT void read_or_throw( std::istream& is, mValue& value ); ++ json_spirit_EXPORT void read_or_throw( std::string::const_iterator& begin, std::string::const_iterator end, mValue& value ); + #endif + + #if defined( JSON_SPIRIT_WMVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING ) +- bool read( const std::wstring& s, wmValue& value ); +- bool read( std::wistream& is, wmValue& value ); +- bool read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value ); ++ json_spirit_EXPORT bool read( const std::wstring& s, wmValue& value ); ++ json_spirit_EXPORT bool read( std::wistream& is, wmValue& value ); ++ json_spirit_EXPORT bool read( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value ); + +- void read_or_throw( const std::wstring& s, wmValue& value ); +- void read_or_throw( std::wistream& is, wmValue& value ); +- void read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value ); ++ json_spirit_EXPORT void read_or_throw( const std::wstring& s, wmValue& value ); ++ json_spirit_EXPORT void read_or_throw( std::wistream& is, wmValue& value ); ++ json_spirit_EXPORT void read_or_throw( std::wstring::const_iterator& begin, std::wstring::const_iterator end, wmValue& value ); + #endif + } + +diff --git a/json_spirit/json_spirit_writer.h b/json_spirit/json_spirit_writer.h +index 2722780..f60dc07 100755 +--- a/json_spirit/json_spirit_writer.h ++++ b/json_spirit/json_spirit_writer.h +@@ -11,6 +11,7 @@ + # pragma once + #endif + ++#include "json_spirit_global.h" + #include "json_spirit_value.h" + #include "json_spirit_writer_options.h" + #include +@@ -20,44 +21,44 @@ namespace json_spirit + // these functions to convert JSON Values to text + + #ifdef JSON_SPIRIT_VALUE_ENABLED +- void write( const Value& value, std::ostream& os, unsigned int options = 0 ); +- std::string write( const Value& value, unsigned int options = 0 ); ++ json_spirit_EXPORT void write( const Value& value, std::ostream& os, unsigned int options = 0 ); ++ json_spirit_EXPORT std::string write( const Value& value, unsigned int options = 0 ); + #endif + + #ifdef JSON_SPIRIT_MVALUE_ENABLED +- void write( const mValue& value, std::ostream& os, unsigned int options = 0 ); +- std::string write( const mValue& value, unsigned int options = 0 ); ++ json_spirit_EXPORT void write( const mValue& value, std::ostream& os, unsigned int options = 0 ); ++ json_spirit_EXPORT std::string write( const mValue& value, unsigned int options = 0 ); + #endif + + #if defined( JSON_SPIRIT_WVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING ) +- void write( const wValue& value, std::wostream& os, unsigned int options = 0 ); +- std::wstring write( const wValue& value, unsigned int options = 0 ); ++ json_spirit_EXPORT void write( const wValue& value, std::wostream& os, unsigned int options = 0 ); ++ json_spirit_EXPORT std::wstring write( const wValue& value, unsigned int options = 0 ); + #endif + + #if defined( JSON_SPIRIT_WMVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING ) +- void write( const wmValue& value, std::wostream& os, unsigned int options = 0 ); +- std::wstring write( const wmValue& value, unsigned int options = 0 ); ++ json_spirit_EXPORT void write( const wmValue& value, std::wostream& os, unsigned int options = 0 ); ++ json_spirit_EXPORT std::wstring write( const wmValue& value, unsigned int options = 0 ); + #endif + + // these "formatted" versions of the "write" functions are the equivalent of the above functions + // with option "pretty_print" + + #ifdef JSON_SPIRIT_VALUE_ENABLED +- void write_formatted( const Value& value, std::ostream& os ); +- std::string write_formatted( const Value& value ); ++ json_spirit_EXPORT void write_formatted( const Value& value, std::ostream& os ); ++ json_spirit_EXPORT std::string write_formatted( const Value& value ); + #endif + #ifdef JSON_SPIRIT_MVALUE_ENABLED +- void write_formatted( const mValue& value, std::ostream& os ); +- std::string write_formatted( const mValue& value ); ++ json_spirit_EXPORT void write_formatted( const mValue& value, std::ostream& os ); ++ json_spirit_EXPORT std::string write_formatted( const mValue& value ); + #endif + + #if defined( JSON_SPIRIT_WVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING ) +- void write_formatted( const wValue& value, std::wostream& os ); +- std::wstring write_formatted( const wValue& value ); ++ json_spirit_EXPORT void write_formatted( const wValue& value, std::wostream& os ); ++ json_spirit_EXPORT std::wstring write_formatted( const wValue& value ); + #endif + #if defined( JSON_SPIRIT_WMVALUE_ENABLED ) && !defined( BOOST_NO_STD_WSTRING ) +- void write_formatted( const wmValue& value, std::wostream& os ); +- std::wstring write_formatted( const wmValue& value ); ++ json_spirit_EXPORT void write_formatted( const wmValue& value, std::wostream& os ); ++ json_spirit_EXPORT std::wstring write_formatted( const wmValue& value ); + #endif + } + +diff --git a/json_test/json_spirit_value_test.cpp b/json_test/json_spirit_value_test.cpp +index e055dae..faab022 100755 +--- a/json_test/json_spirit_value_test.cpp ++++ b/json_test/json_spirit_value_test.cpp +@@ -381,9 +381,15 @@ namespace + Container_constructor_runner() + { + vector< double > vd = list_of( 1.2 )( 1.3 ); test_container_constructor( vd ); ++ #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1900) ++ vector< int > vi = { 1 }; test_container_constructor( vi ); ++ vi = { 1, 2 }; test_container_constructor( vi ); ++ vi = { 1, 2, 3 }; test_container_constructor( vi ); ++ #else + vector< int > vi = list_of( 1 ); test_container_constructor( vi ); + vi = list_of( 1 )( 2 ); test_container_constructor( vi ); + vi = list_of( 1 )( 2 )( 3 ); test_container_constructor( vi ); ++ #endif + list< double > ld = list_of( 1.2 )( 1.3 ); test_container_constructor( ld ); + list< int > li = list_of( 1 ); test_container_constructor( li ); + li = list_of( 1 )( 2 ); test_container_constructor( li ); +@@ -447,9 +453,15 @@ namespace + } + + vector< double > vd = list_of( 1.2 )( 1.3 ); test_variant_array_constructor< double > ( vd ); ++ #if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1900) ++ vector< int > vi = { 1 }; test_variant_array_constructor< int >( vi ); ++ vi = { 1, 2 }; test_variant_array_constructor< int >( vi ); ++ vi = { 1, 2, 3 }; test_variant_array_constructor< int >( vi ); ++ #else + vector< int > vi = list_of( 1 ); test_variant_array_constructor< int >( vi ); + vi = list_of( 1 )( 2 ); test_variant_array_constructor< int >( vi ); + vi = list_of( 1 )( 2 )( 3 ); test_variant_array_constructor< int >( vi ); ++ #endif + list< double > ld = list_of( 1.2 )( 1.3 ); test_variant_array_constructor< double >( ld ); + list< int > li = list_of( 1 ); test_variant_array_constructor< int >( li ); + li = list_of( 1 )( 2 ); test_variant_array_constructor< int >( li ); diff --git a/vcpkg/ports/json-spirit/portfile.cmake b/vcpkg/ports/json-spirit/portfile.cmake new file mode 100644 index 0000000..9d2f240 --- /dev/null +++ b/vcpkg/ports/json-spirit/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO png85/json_spirit + REF 5e16cca59b31d8beda0f07e3917ce11dcd43b3db + SHA512 6ac0f15726391c9003e516213535c8d30e98b6c33bca0b03e9bf38e7085824bfc6cfaab267b1dfccbfcc567638d26f722d7e331f4e3b60d3acd5c717cb1fafcc + HEAD_REF master + PATCHES + dll-wins.patch + Fix-link-error-C1128.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBUILD_STATIC_LIBS=off -DJSON_SPIRIT_DEMOS=off -DJSON_SPIRIT_TESTS=off) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/json-spirit RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/json11/CONTROL b/vcpkg/ports/json11/CONTROL new file mode 100644 index 0000000..34cee37 --- /dev/null +++ b/vcpkg/ports/json11/CONTROL @@ -0,0 +1,3 @@ +Source: json11 +Version: 2017-06-20-2 +Description: json11 is a tiny JSON library for C++11, providing JSON parsing and serialization. diff --git a/vcpkg/ports/json11/destination.patch b/vcpkg/ports/json11/destination.patch new file mode 100644 index 0000000..6d16303 --- /dev/null +++ b/vcpkg/ports/json11/destination.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 819c36f..847489e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -52,6 +52,6 @@ if (JSON11_BUILD_TESTS) + target_link_libraries(json11_test json11) + endif() + +-install(TARGETS json11 DESTINATION lib/${CMAKE_LIBRARY_ARCHITECTURE}) +-install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/json11.hpp" DESTINATION include/${CMAKE_LIBRARY_ARCHITECTURE}) +-install(FILES "${CMAKE_CURRENT_BINARY_DIR}/json11.pc" DESTINATION lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig) ++install(TARGETS json11 DESTINATION lib) ++install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/json11.hpp" DESTINATION include) ++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/json11.pc" DESTINATION lib/pkgconfig) diff --git a/vcpkg/ports/json11/json11-config.cmake b/vcpkg/ports/json11/json11-config.cmake new file mode 100644 index 0000000..0bc3bb2 --- /dev/null +++ b/vcpkg/ports/json11/json11-config.cmake @@ -0,0 +1,25 @@ +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) + +if(NOT JSON11_FIND_COMPONENTS) + set(JSON11_FIND_COMPONENTS json11 json11) + if(JSON11_FIND_REQUIRED) + set(JSON11_FIND_REQUIRED_json11 TRUE) + endif() + + set(JSON11_FOUND TRUE) +endif() + +set(JSON11_INCLUDE_DIRS ${_DIR}/../../include) +set(JSON11_LIBRARIES) +if (EXISTS ${_DIR}/../../lib/libjson11.a) + list(APPEND JSON11_LIBRARIES optimized ${_DIR}/../../lib/libjson11.a) +endif() +if (EXISTS ${_DIR}/../../debug/lib/libjson11.a) + list(APPEND JSON11_LIBRARIES debug ${_DIR}/../../debug/lib/libjson11.a) +endif() +if (EXISTS ${_DIR}/../../lib/json11.lib) + list(APPEND JSON11_LIBRARIES optimized ${_DIR}/../../lib/json11.lib) +endif() +if (EXISTS ${_DIR}/../../debug/lib/json11.lib) + list(APPEND JSON11_LIBRARIES debug ${_DIR}/../../debug/lib/json11.lib) +endif() diff --git a/vcpkg/ports/json11/portfile.cmake b/vcpkg/ports/json11/portfile.cmake new file mode 100644 index 0000000..a3c2b9c --- /dev/null +++ b/vcpkg/ports/json11/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dropbox/json11 + REF ec4e45219af1d7cde3d58b49ed762376fccf1ace + SHA512 2129e048d8dee027dc1ba789d9901e017b7d698465e15236802ef68639161e1cc7c8665d5f50079333801717fd41ffbe2cb90fa2165b9a85629e8ced8f2b3cd8 + HEAD_REF master + PATCHES destination.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DJSON11_BUILD_TESTS:BOOL=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(INSTALL ${CURRENT_PORT_DIR}/json11-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/json11) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/json11) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/json11/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/json11/copyright) diff --git a/vcpkg/ports/json5-parser/00001-fix-build.patch b/vcpkg/ports/json5-parser/00001-fix-build.patch new file mode 100644 index 0000000..b67f7c4 --- /dev/null +++ b/vcpkg/ports/json5-parser/00001-fix-build.patch @@ -0,0 +1,27 @@ +diff --git a/json5_parser/CMakeLists.txt b/json5_parser/CMakeLists.txt +index e83fb38..c09cae4 100644 +--- a/json5_parser/CMakeLists.txt ++++ b/json5_parser/CMakeLists.txt +@@ -15,3 +15,22 @@ INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR}) + + ADD_LIBRARY(json5_parser STATIC ${JSON_SPIRIT_SRCS}) + ++if(MSVC) ++ target_compile_options(json5_parser PRIVATE "/bigobj") ++endif() ++ ++target_include_directories(json5_parser PUBLIC $) ++ ++install(TARGETS json5_parser EXPORT json5-parser-config ++ RUNTIME DESTINATION bin ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib ++) ++install(EXPORT json5-parser-config DESTINATION share/cmake/json5-parser) ++ ++file(GLOB HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} json5_parser*.h) ++foreach (HEADER ${HEADERS} ) ++ get_filename_component(HEADER_DIR ${HEADER} DIRECTORY) ++ install(FILES ${HEADER} DESTINATION include/${HEADER_DIR}) ++endforeach() ++ diff --git a/vcpkg/ports/json5-parser/CONTROL b/vcpkg/ports/json5-parser/CONTROL new file mode 100644 index 0000000..9904160 --- /dev/null +++ b/vcpkg/ports/json5-parser/CONTROL @@ -0,0 +1,6 @@ +Source: json5-parser +Version: 1.0.0 +Port-Version: 2 +Homepage: https://github.com/Caltech-IPAC/json5_parser +Description: An enhancement of the JSON Spirit C++ library to understand json5. +Build-Depends: boost-spirit diff --git a/vcpkg/ports/json5-parser/portfile.cmake b/vcpkg/ports/json5-parser/portfile.cmake new file mode 100644 index 0000000..79e4d1a --- /dev/null +++ b/vcpkg/ports/json5-parser/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Caltech-IPAC/json5_parser + REF 580bfe30c5ee5e06a0f536d7bddb75c07a29eda6 # 1.0.0 + SHA512 25cdbc02ed2e3b05f0644c3398230ab82ede093ed6f7d8f140a9810509dd05feab1187d62fc38818725a92c47029fe3dc5ecfdbe14e1e0a2ef314e925b369d59 + HEAD_REF master + PATCHES 00001-fix-build.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/json5_parser + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/json5-parser) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/jsoncons/CONTROL b/vcpkg/ports/jsoncons/CONTROL new file mode 100644 index 0000000..1977a21 --- /dev/null +++ b/vcpkg/ports/jsoncons/CONTROL @@ -0,0 +1,4 @@ +Source: jsoncons +Version: 0.158.0 +Description: A C++, header-only library for constructing JSON and JSON-like text and binary data formats, with JSON Pointer, JSON Patch, JSONPath, JMESPath, CSV, MessagePack, CBOR, BSON, UBJSON +Homepage: https://github.com/danielaparker/jsoncons diff --git a/vcpkg/ports/jsoncons/portfile.cmake b/vcpkg/ports/jsoncons/portfile.cmake new file mode 100644 index 0000000..2ae3c74 --- /dev/null +++ b/vcpkg/ports/jsoncons/portfile.cmake @@ -0,0 +1,21 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO danielaparker/jsoncons + REF 1d81dc242a0ad29123c4fff4470d5d5e5d461b4a # v0.158.0 + SHA512 f5efaa89263579f77560c1707ec6bcf1ca6a30cce70da144cadfa97301869480326ad5dff241df8b751d190e0d0177fea5de929f8b950f53c87c264332dfe6f4 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTS=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/jsoncpp/CONTROL b/vcpkg/ports/jsoncpp/CONTROL new file mode 100644 index 0000000..012e45b --- /dev/null +++ b/vcpkg/ports/jsoncpp/CONTROL @@ -0,0 +1,4 @@ +Source: jsoncpp +Version: 1.9.4 +Homepage: https://github.com/open-source-parsers/jsoncpp +Description: jsoncpp is an implementation of a JSON reader and writer in C++. JSON (JavaScript Object Notation) is a lightweight data-interchange format that it is easy to parse and redeable for human. diff --git a/vcpkg/ports/jsoncpp/portfile.cmake b/vcpkg/ports/jsoncpp/portfile.cmake new file mode 100644 index 0000000..e722bde --- /dev/null +++ b/vcpkg/ports/jsoncpp/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO open-source-parsers/jsoncpp + REF 9059f5cad030ba11d37818847443a53918c327b1 # 1.9.4 + SHA512 8062c83cad9dc453f1eb4886e63e054570e0f29dcd6594330d3b3628ba994915e26e08690cd28118805a766be200ac99ad4fbc131db3af895122a8d1bd87ef31 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" JSONCPP_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DJSONCPP_WITH_CMAKE_PACKAGE=ON + -DBUILD_STATIC_LIBS=${JSONCPP_STATIC} + -DJSONCPP_WITH_PKGCONFIG_SUPPORT=OFF + -DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF + -DJSONCPP_WITH_TESTS=OFF + -DJSONCPP_WITH_EXAMPLE=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/jsoncpp) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/jsonnet/0003-use-upstream-nlohmann-json.patch b/vcpkg/ports/jsonnet/0003-use-upstream-nlohmann-json.patch new file mode 100644 index 0000000..a2e1105 --- /dev/null +++ b/vcpkg/ports/jsonnet/0003-use-upstream-nlohmann-json.patch @@ -0,0 +1,13 @@ +diff --git a/core/vm.cpp b/core/vm.cpp +index 0cf06fa..d65a6d7 100644 +--- a/core/vm.cpp ++++ b/core/vm.cpp +@@ -23,7 +23,7 @@ limitations under the License. + + #include "desugarer.h" + #include "json.h" +-#include "json.hpp" ++#include "nlohmann/json.hpp" + #include "md5.h" + #include "parser.h" + #include "state.h" diff --git a/vcpkg/ports/jsonnet/001-enable-msvc.patch b/vcpkg/ports/jsonnet/001-enable-msvc.patch new file mode 100644 index 0000000..499c671 --- /dev/null +++ b/vcpkg/ports/jsonnet/001-enable-msvc.patch @@ -0,0 +1,81 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 385ea82..ebd12b6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2,6 +2,8 @@ + cmake_minimum_required(VERSION 2.8.7) + project(jsonnet C CXX) + ++add_definitions(-D_CRT_SECURE_NO_WARNINGS) ++ + include(ExternalProject) + include(GNUInstallDirs) + +@@ -33,6 +35,7 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${GLOBAL_OUTPUT_PATH}) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${GLOBAL_OUTPUT_PATH}) + + # Compiler flags. ++if (0) + if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" OR + ${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") + set(OPT "-O3") +@@ -42,7 +45,7 @@ else() + # TODO: Windows support. + message(FATAL_ERROR "Compiler ${CMAKE_CXX_COMPILER_ID} not supported") + endif() +- ++endif() + set(CMAKE_CXX_STANDARD 11) + + +diff --git a/cmd/CMakeLists.txt b/cmd/CMakeLists.txt +index c032f02..d80d2a0 100644 +--- a/cmd/CMakeLists.txt ++++ b/cmd/CMakeLists.txt +@@ -13,5 +13,5 @@ if (BUILD_JSONNETFMT OR BUILD_TESTS) + add_dependencies(jsonnetfmt libjsonnet_for_binaries) + target_link_libraries(jsonnetfmt libjsonnet_for_binaries) + +- install(TARGETS jsonnetfmt DESTINATION "${CMAKE_INSTALL_BINDIR}") ++ install(TARGETS jsonnetfmt DESTINATION tools/jsonnet) + endif() +diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt +index d277872..bbf67f7 100644 +--- a/core/CMakeLists.txt ++++ b/core/CMakeLists.txt +@@ -28,7 +28,7 @@ set(LIBJSONNET_SOURCE + string_utils.cpp + vm.cpp) + +-add_library(libjsonnet SHARED ${LIBJSONNET_HEADERS} ${LIBJSONNET_SOURCE}) ++add_library(libjsonnet ${LIBJSONNET_HEADERS} ${LIBJSONNET_SOURCE}) + add_dependencies(libjsonnet md5 stdlib) + target_link_libraries(libjsonnet md5 nlohmann_json::nlohmann_json) + +@@ -46,7 +46,7 @@ set_target_properties(libjsonnet PROPERTIES OUTPUT_NAME jsonnet + PUBLIC_HEADER "${LIB_HEADER}") + install(TARGETS libjsonnet + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" +- ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" ++ ARCHIVE DESTINATION "${CMAKE_INSTALL_BINDIR}" + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + + if (BUILD_STATIC_LIBS) +diff --git a/stdlib/CMakeLists.txt b/stdlib/CMakeLists.txt +index a481d9f..2f58d2f 100644 +--- a/stdlib/CMakeLists.txt ++++ b/stdlib/CMakeLists.txt +@@ -2,6 +2,7 @@ + + add_executable(to_c_array to_c_array.cpp) + ++if(0) + # Custom command that will only build stdlib when it changes. + add_custom_command( + OUTPUT ${PROJECT_SOURCE_DIR}/core/std.jsonnet.h +@@ -13,3 +14,4 @@ add_custom_command( + # Standard library build target that libjsonnet can depend on. + add_custom_target(stdlib ALL + DEPENDS ${PROJECT_SOURCE_DIR}/core/std.jsonnet.h) ++endif() +\ No newline at end of file diff --git a/vcpkg/ports/jsonnet/002-fix-dependency-and-install.patch b/vcpkg/ports/jsonnet/002-fix-dependency-and-install.patch new file mode 100644 index 0000000..90640e5 --- /dev/null +++ b/vcpkg/ports/jsonnet/002-fix-dependency-and-install.patch @@ -0,0 +1,58 @@ +diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt +index bbf67f7..7238a59 100644 +--- a/core/CMakeLists.txt ++++ b/core/CMakeLists.txt +@@ -28,6 +28,7 @@ set(LIBJSONNET_SOURCE + string_utils.cpp + vm.cpp) + ++if (BUILD_SHARED_BINARIES) + add_library(libjsonnet ${LIBJSONNET_HEADERS} ${LIBJSONNET_SOURCE}) + add_dependencies(libjsonnet md5 stdlib) + target_link_libraries(libjsonnet md5 nlohmann_json::nlohmann_json) +@@ -48,6 +49,7 @@ install(TARGETS libjsonnet + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_BINDIR}" + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") ++endif() + + if (BUILD_STATIC_LIBS) + # Static library for jsonnet command-line tool. +@@ -102,3 +104,5 @@ if (BUILD_TESTS) + add_test(jsonnet_test_snippet + ${GLOBAL_OUTPUT_PATH}/jsonnet -e ${TEST_SNIPPET}) + endif() ++ ++install(FILES ${LIB_HEADER} DESTINATION include) +diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt +index 6b7b8c3..6dfa1fa 100644 +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -8,9 +8,9 @@ set(LIBJSONNETPP_SOURCE + libjsonnet++.cpp + ) + ++if (BUILD_SHARED_BINARIES) + add_library(libjsonnet++ SHARED ${LIBJSONNETPP_HEADERS} ${LIBJSONNETPP_SOURCE}) +-add_dependencies(libjsonnet++ jsonnet) +-# target_link_libraries(libjsonnet libjsonnet) ++target_link_libraries(libjsonnet libjsonnet) + + # CMake prepends CMAKE_SHARED_LIBRARY_PREFIX to shared libraries, so without + # this step the output would be |liblibjsonnet|. +@@ -22,6 +22,7 @@ install(TARGETS libjsonnet++ + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") ++endif() + + if (BUILD_STATIC_LIBS) + # Static library for jsonnet command-line tool. +@@ -38,6 +39,7 @@ else() + add_library(libjsonnet++_for_binaries ALIAS libjsonnet++_static) + endif() + ++install(FILES ${LIBJSONNETPP_HEADERS} DESTINATION include) + # Tests + function(add_test_executablepp test_name) + if (EXISTS ${CMAKE_CURRENT_LIST_DIR}/${test_name}.cpp) diff --git a/vcpkg/ports/jsonnet/CONTROL b/vcpkg/ports/jsonnet/CONTROL new file mode 100644 index 0000000..99d73af --- /dev/null +++ b/vcpkg/ports/jsonnet/CONTROL @@ -0,0 +1,5 @@ +Source: jsonnet +Version: 0.16.0 +Homepage: https://github.com/google/jsonnet +Description: Jsonnet - The data templating language +Build-Depends: nlohmann-json diff --git a/vcpkg/ports/jsonnet/portfile.cmake b/vcpkg/ports/jsonnet/portfile.cmake new file mode 100644 index 0000000..77e8b87 --- /dev/null +++ b/vcpkg/ports/jsonnet/portfile.cmake @@ -0,0 +1,57 @@ +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/jsonnet + REF 3f58aa551c917d6a7a2c6d042ee27f93d895ac0b # v0.16.0 + SHA512 448f4ff433a43ec21c3b67ea508d624e03dac420878e453e908a465cd517c79ae657f107c92e28a4ae2d2527baaf9a3ae1c6ea4c7e7e4f5062d3fad4e76e668c + HEAD_REF master + PATCHES + 001-enable-msvc.patch + 002-fix-dependency-and-install.patch + 0003-use-upstream-nlohmann-json.patch +) + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_execute_required_process( + COMMAND Powershell -Command "((Get-Content -AsByteStream \"${SOURCE_PATH}/stdlib/std.jsonnet\") -join ',') + ',0' | Out-File -Encoding Ascii \"${SOURCE_PATH}/core/std.jsonnet.h\"" + WORKING_DIRECTORY "${SOURCE_PATH}" + LOGNAME "std.jsonnet" + ) +else() + vcpkg_execute_required_process( + COMMAND bash -c "((od -v -Anone -t u1 \"${SOURCE_PATH}/stdlib/std.jsonnet\" | tr ' ' '\\n' | grep -v '^$' | tr '\\n' ',' ) && echo '0') > \"${SOURCE_PATH}/core/std.jsonnet.h\"" + WORKING_DIRECTORY "${SOURCE_PATH}" + LOGNAME "std.jsonnet" + ) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(BUILD_SHARED ON) + set(BUILD_STATIC OFF) +else() + set(BUILD_SHARED OFF) + set(BUILD_STATIC ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_SHARED_BINARIES=${BUILD_SHARED} + -DBUILD_STATIC_LIBS=${BUILD_STATIC} + -DBUILD_JSONNET=OFF + -DBUILD_JSONNETFMT=OFF + -DBUILD_TESTS=OFF + -DUSE_SYSTEM_JSON=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/jsonnet) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/jwt-cpp/CONTROL b/vcpkg/ports/jwt-cpp/CONTROL new file mode 100644 index 0000000..7cc3d44 --- /dev/null +++ b/vcpkg/ports/jwt-cpp/CONTROL @@ -0,0 +1,5 @@ +Source: jwt-cpp +Version: 0.4.0 +Homepage: https://github.com/Thalhammer/jwt-cpp +Description: A header only library for creating and validating json web tokens in c++ +Build-Depends: picojson \ No newline at end of file diff --git a/vcpkg/ports/jwt-cpp/fix-warning.patch b/vcpkg/ports/jwt-cpp/fix-warning.patch new file mode 100644 index 0000000..4c2e166 --- /dev/null +++ b/vcpkg/ports/jwt-cpp/fix-warning.patch @@ -0,0 +1,31 @@ +diff --git a/include/jwt-cpp/base.h b/include/jwt-cpp/base.h +index 375e0eb..4023709 100644 +--- a/include/jwt-cpp/base.h ++++ b/include/jwt-cpp/base.h +@@ -2,6 +2,10 @@ + #include + #include + ++#ifdef _MSC_VER ++#pragma warning(disable : 4267) ++#endif ++ + #ifdef __has_cpp_attribute + #if __has_cpp_attribute(fallthrough) + #define JWT_FALLTHROUGH [[fallthrough]] +diff --git a/include/jwt-cpp/jwt.h b/include/jwt-cpp/jwt.h +index 6e55729..4579310 100644 +--- a/include/jwt-cpp/jwt.h ++++ b/include/jwt-cpp/jwt.h +@@ -12,6 +12,11 @@ + #include + #include + ++#ifdef _MSC_VER ++#pragma warning(disable : 4267) ++#pragma warning(disable : 4067) ++#endif ++ + //If openssl version less than 1.1 + #if OPENSSL_VERSION_NUMBER < 0x10100000L + #define OPENSSL10 diff --git a/vcpkg/ports/jwt-cpp/portfile.cmake b/vcpkg/ports/jwt-cpp/portfile.cmake new file mode 100644 index 0000000..00c4496 --- /dev/null +++ b/vcpkg/ports/jwt-cpp/portfile.cmake @@ -0,0 +1,17 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Thalhammer/jwt-cpp + REF 34bb0644ea613cfcbc09c148db9de8aa6c5612b5 # v0.4.0 + SHA512 773007fc7a73a831e292451d7a38feb9434f7c11c653d43b9f3679c564f64805a1cbd1baab6b13107c42cc06549ad7cd08aebd6658d8ee0022f5b8d601fa94cc + HEAD_REF master + PATCHES + fix-warning.patch +) + +# Copy the header files +file(GLOB HEADER_FILES ${SOURCE_PATH}/include/jwt-cpp/*) +file(COPY ${HEADER_FILES} + DESTINATION ${CURRENT_PACKAGES_DIR}/include/jwt-cpp + REGEX "\.(gitattributes|gitignore|picojson.h)$" EXCLUDE) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/jxrlib/CMakeLists.txt b/vcpkg/ports/jxrlib/CMakeLists.txt new file mode 100644 index 0000000..7a73e3c --- /dev/null +++ b/vcpkg/ports/jxrlib/CMakeLists.txt @@ -0,0 +1,107 @@ +# Copyright Mathieu Malaterre +# BSD (Same as jxrlib) +# Based on https://jxrlib.codeplex.com/discussions/440294 +# and modified for vcpkg packaging +cmake_minimum_required(VERSION 2.8) +project(jxrlib C) + +# Need shared libs for ABI +option(BUILD_SHARED_LIBS "Build shared libraries" ON) + +# Add a debug postfix +set(CMAKE_DEBUG_POSTFIX "d") + +# helper macro to preserve original Makefile convention +macro(JXR_MAKE_OBJ SET_NAME) + foreach(src ${SRC_${SET_NAME}}) + list(APPEND OBJ_${SET_NAME} ${DIR_${SET_NAME}}/${src}) + endforeach() +endmacro() + +if(NOT MSVC) + add_definitions(-D__ANSI__) + add_compile_options(-Wno-error=implicit-function-declaration) +endif() + +include(TestBigEndian) +test_big_endian(ISBIGENDIAN) +if(ISBIGENDIAN) + set(DEF_ENDIAN _BIG__ENDIAN_) +endif() + +set(DIR_SYS image/sys) +set(DIR_DEC image/decode) +set(DIR_ENC image/encode) + +set(DIR_GLUE jxrgluelib) +set(DIR_TEST jxrtestlib) +set(DIR_EXEC jxrencoderdecoder) + +if(NOT JXRLIB_INSTALL_BIN_DIR) + set(JXRLIB_INSTALL_BIN_DIR "bin") +endif() + +if(NOT JXRLIB_INSTALL_LIB_DIR) + set(JXRLIB_INSTALL_LIB_DIR "lib") +endif() + +if(NOT JXRLIB_INSTALL_INCLUDE_DIR) + set(JXRLIB_INSTALL_INCLUDE_DIR "include/jxrlib") +endif() + +include_directories( + common/include + ${DIR_SYS} + ${DIR_GLUE} + ${DIR_TEST} +) + + +# JPEG-XR +set(SRC_SYS adapthuff.c image.c strcodec.c strPredQuant.c strTransform.c perfTimerANSI.c) +JXR_MAKE_OBJ(SYS) +set(SRC_DEC decode.c postprocess.c segdec.c strdec.c strInvTransform.c strPredQuantDec.c JXRTranscode.c) +JXR_MAKE_OBJ(DEC) +set(SRC_ENC encode.c segenc.c strenc.c strFwdTransform.c strPredQuantEnc.c) +JXR_MAKE_OBJ(ENC) + +add_library(jpegxr ${OBJ_ENC} ${OBJ_DEC} ${OBJ_SYS}) +set_property(TARGET jpegxr + PROPERTY COMPILE_DEFINITIONS DISABLE_PERF_MEASUREMENT ${DEF_ENDIAN} +) +set_property(TARGET jpegxr PROPERTY LINK_INTERFACE_LIBRARIES "") +install(TARGETS jpegxr + EXPORT JXRLibTargets + RUNTIME DESTINATION ${JXRLIB_INSTALL_BIN_DIR} + LIBRARY DESTINATION ${JXRLIB_INSTALL_LIB_DIR} + ARCHIVE DESTINATION ${JXRLIB_INSTALL_LIB_DIR} +) + +# JXR-GLUE +set(SRC_GLUE JXRGlue.c JXRMeta.c JXRGluePFC.c JXRGlueJxr.c) +JXR_MAKE_OBJ(GLUE) +set(SRC_TEST JXRTest.c JXRTestBmp.c JXRTestHdr.c JXRTestPnm.c JXRTestTif.c JXRTestYUV.c) +JXR_MAKE_OBJ(TEST) + +add_library(jxrglue ${OBJ_GLUE} ${OBJ_TEST}) +set_property(TARGET jxrglue + PROPERTY COMPILE_DEFINITIONS DISABLE_PERF_MEASUREMENT ${DEF_ENDIAN} +) +set_property(TARGET jxrglue PROPERTY LINK_INTERFACE_LIBRARIES "") +install(TARGETS jxrglue + EXPORT JXRLibTargets + RUNTIME DESTINATION ${JXRLIB_INSTALL_BIN_DIR} + LIBRARY DESTINATION ${JXRLIB_INSTALL_LIB_DIR} + ARCHIVE DESTINATION ${JXRLIB_INSTALL_LIB_DIR} +) + +target_link_libraries(jxrglue jpegxr) + +# install rules +install(FILES jxrgluelib/JXRGlue.h jxrgluelib/JXRMeta.h jxrtestlib/JXRTest.h + image/sys/windowsmediaphoto.h + DESTINATION ${JXRLIB_INSTALL_INCLUDE_DIR} COMPONENT Headers +) +install(DIRECTORY common/include/ DESTINATION ${JXRLIB_INSTALL_INCLUDE_DIR} + FILES_MATCHING PATTERN "*.h" +) diff --git a/vcpkg/ports/jxrlib/CONTROL b/vcpkg/ports/jxrlib/CONTROL new file mode 100644 index 0000000..1a8fa60 --- /dev/null +++ b/vcpkg/ports/jxrlib/CONTROL @@ -0,0 +1,5 @@ +Source: jxrlib +Version: 2019.10.9 +Port-Version: 2 +Homepage: https://github.com/4creators/jxrlib +Description: Open source implementation of the jpegxr image format standard. diff --git a/vcpkg/ports/jxrlib/FindJXR.cmake b/vcpkg/ports/jxrlib/FindJXR.cmake new file mode 100644 index 0000000..7e4a5d4 --- /dev/null +++ b/vcpkg/ports/jxrlib/FindJXR.cmake @@ -0,0 +1,28 @@ +# - Find JXR +# Find the JXR library +# This module defines +# JXR_INCLUDE_DIRS, where to find jxrlib/JXRGlue.h +# JXR_LIBRARIES, the libraries needed to use JXR +# + +find_path(JXR_INCLUDE_DIRS + NAMES JXRGlue.h + PATH_SUFFIXES jxrlib +) +mark_as_advanced(JXR_INCLUDE_DIRS) + +include(SelectLibraryConfigurations) + +find_library(JPEGXR_LIBRARY_RELEASE NAMES jpegxr PATH_SUFFIXES lib) +find_library(JPEGXR_LIBRARY_DEBUG NAMES jpegxrd PATH_SUFFIXES lib) +select_library_configurations(JPEGXR) + +find_library(JXRGLUE_LIBRARY_RELEASE NAMES jxrglue PATH_SUFFIXES lib) +find_library(JXRGLUE_LIBRARY_DEBUG NAMES jxrglued PATH_SUFFIXES lib) +select_library_configurations(JXRGLUE) + +set(JXR_LIBRARIES ${JPEGXR_LIBRARY} ${JXRGLUE_LIBRARY}) +mark_as_advanced(JXR_LIBRARIES) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(JXR DEFAULT_MSG JXR_INCLUDE_DIRS JXR_LIBRARIES) diff --git a/vcpkg/ports/jxrlib/portfile.cmake b/vcpkg/ports/jxrlib/portfile.cmake new file mode 100644 index 0000000..ed4e459 --- /dev/null +++ b/vcpkg/ports/jxrlib/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO 4creators/jxrlib + REF f7521879862b9085318e814c6157490dd9dbbdb4 + SHA512 f5617cbe73b6b905cc6bba181e6a3efedd59584f7a8c90e0f34db580cfdad4239a2ab753df4e221f26a5c0db51475b021052e3b9e3ab3673573573b1d57f3fdb + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +if(NOT VCPKG_CMAKE_SYSTEM_NAME MATCHES Darwin AND NOT VCPKG_CMAKE_SYSTEM_NAME MATCHES Linux) + # The file guiddef.h is part of the Windows SDK, + # we then remove the local copy shipped with jxrlib + file(REMOVE ${SOURCE_PATH}/common/include/guiddef.h) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +#install FindJXR.cmake file +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/FindJXR.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/jxr) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/jxr) diff --git a/vcpkg/ports/jxrlib/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/jxrlib/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..4bee917 --- /dev/null +++ b/vcpkg/ports/jxrlib/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,6 @@ +set(JXR_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${JXR_PREV_MODULE_PATH}) diff --git a/vcpkg/ports/kangaru/CONTROL b/vcpkg/ports/kangaru/CONTROL new file mode 100644 index 0000000..3ea64eb --- /dev/null +++ b/vcpkg/ports/kangaru/CONTROL @@ -0,0 +1,3 @@ +Source: kangaru +Version: 4.2.4 +Description: A dependency injection container for C++11, C++14 and later diff --git a/vcpkg/ports/kangaru/portfile.cmake b/vcpkg/ports/kangaru/portfile.cmake new file mode 100644 index 0000000..7043acf --- /dev/null +++ b/vcpkg/ports/kangaru/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO gracicot/kangaru + REF 8da8f0d5a434a6fb2f317022221ea0809914d4a6 # v4.2.4 + SHA512 e5cfdad793db3b3d5ff093e4120a5131000677504eed09c02817c9a49699c044a88183413ad7b09946abb0258df34fe444078c375a5bf70589345d2aa2c2283b + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DKANGARU_EXPORT=Off -DKANGARU_TEST=Off -DKANGARU_REVERSE_DESTRUCTION=On +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/kangaru) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/debug +) + + +# Put the license file where vcpkg expects it +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/kangaru/) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/kangaru/LICENSE ${CURRENT_PACKAGES_DIR}/share/kangaru/copyright) diff --git a/vcpkg/ports/kcp/CONTROL b/vcpkg/ports/kcp/CONTROL new file mode 100644 index 0000000..0573eb3 --- /dev/null +++ b/vcpkg/ports/kcp/CONTROL @@ -0,0 +1,4 @@ +Source: kcp +Version: 2019-09-20 +Description: A fast and reliable ARQ protocol +Homepage: https://github.com/skywind3000/kcp diff --git a/vcpkg/ports/kcp/portfile.cmake b/vcpkg/ports/kcp/portfile.cmake new file mode 100644 index 0000000..e857606 --- /dev/null +++ b/vcpkg/ports/kcp/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO skywind3000/kcp + REF 4c58607c917c2a82bf116489c3eb89e4e9aa696d + SHA512 6689d6c2393eb96bba276de90aec584dae9da0dad5c7bd15519bc61de16de9123e19a945a9e29c5b5cc88bf844ebfb9681b27eb425e3a59a354f13488516cdcc + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/vcpkg/ports/kd-soap/CONTROL b/vcpkg/ports/kd-soap/CONTROL new file mode 100644 index 0000000..edcba96 --- /dev/null +++ b/vcpkg/ports/kd-soap/CONTROL @@ -0,0 +1,5 @@ +Source: kd-soap +Version: 1.9.0 +Homepage: https://www.kdab.com/products/kd-soap +Description: A Qt-based client-side and server-side SOAP component +Build-Depends: qt5-base[core] diff --git a/vcpkg/ports/kd-soap/portfile.cmake b/vcpkg/ports/kd-soap/portfile.cmake new file mode 100644 index 0000000..03f99fa --- /dev/null +++ b/vcpkg/ports/kd-soap/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDAB/KDSoap + REF fb0e905e242c2044fd25683a406eb6d369db052f # kdsoap-1.9.0 + SHA512 30f78602702f2bb77f72bf0637b413d70976cf10789b18d1eb9c097f6b3821b86e75d0ae921454b2d39b7d023f479dc089cde1915533a37054f9b26893f611d3 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" KDSoap_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DKDSoap_STATIC=${KDSoap_STATIC} + -DKDSoap_EXAMPLES=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KDSoap TARGET_PATH share/KDSoap) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/kdwsdl2cpp${VCPKG_TARGET_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/kdwsdl2cpp${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/kdwsdl2cpp${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/kealib/CONTROL b/vcpkg/ports/kealib/CONTROL new file mode 100644 index 0000000..d31490c --- /dev/null +++ b/vcpkg/ports/kealib/CONTROL @@ -0,0 +1,9 @@ +Source: kealib +Version: 1.4.11-3 +Build-Depends: hdf5[cpp], zlib, szip +Homepage: https://bitbucket.org/chchrsc/kealib +Description: kealib is gdal model using HDF5 standard. + +Feature: parallel +Description: Use parallel support for HDF5 +Build-Depends: hdf5[parallel], mpi diff --git a/vcpkg/ports/kealib/hdf5_include.patch b/vcpkg/ports/kealib/hdf5_include.patch new file mode 100644 index 0000000..35935dc --- /dev/null +++ b/vcpkg/ports/kealib/hdf5_include.patch @@ -0,0 +1,62 @@ +index 1f4b1474..40a0f55d 100644 +--- a/include/libkea/KEAAttributeTable.h ++++ b/include/libkea/KEAAttributeTable.h +@@ -37,7 +37,7 @@ + #include + #include + +-#include "H5Cpp.h" ++#include + + #include "libkea/KEACommon.h" + #include "libkea/KEAException.h" + +--- a/include/libkea/KEAAttributeTableFile.h ++++ b/include/libkea/KEAAttributeTableFile.h +@@ -35,7 +35,7 @@ + #include + #include + +-#include "H5Cpp.h" ++#include + + #include "libkea/KEACommon.h" + #include "libkea/KEAException.h" + +--- a/include/libkea/KEACommon.h ++++ b/include/libkea/KEACommon.h +@@ -36,7 +36,7 @@ + #include + #include + +-#include "H5Cpp.h" ++#include + + // mark all exported classes/functions with DllExport to have + // them exported by Visual Studio + +--- a/include/libkea/KEAAttributeTableInMem.h ++++ b/include/libkea/KEAAttributeTableInMem.h +@@ -35,7 +35,7 @@ + #include + #include + +-#include "H5Cpp.h" ++#include + + #include "libkea/KEACommon.h" + #include "libkea/KEAException.h" + +--- a/include/libkea/KEAImageIO.h ++++ b/include/libkea/KEAImageIO.h +@@ -35,7 +35,7 @@ + #include + #include + +-#include "H5Cpp.h" ++#include + + #include "libkea/KEACommon.h" + #include "libkea/KEAException.h" + + diff --git a/vcpkg/ports/kealib/portfile.cmake b/vcpkg/ports/kealib/portfile.cmake new file mode 100644 index 0000000..24446d9 --- /dev/null +++ b/vcpkg/ports/kealib/portfile.cmake @@ -0,0 +1,39 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ubarsc/kealib + REF de6dabd414039dd36a1ff01243901cec3f45256e #1.4.11 + SHA512 34032dd27aee0714cbe6b76b2f731a05408fd5ff78080343bcfbc3aa7e6eeb06a341a423cee1e7f3624f4c1f661feaf4ea3a3d2e53172933e49982df0c438a6f + HEAD_REF master + PATCHES hdf5_include.patch +) + +if ("parallel" IN_LIST FEATURES) + set(ENABLE_PARALLEL ON) +else() + set(ENABLE_PARALLEL OFF) +endif() + +if(${VCPKG_LIBRARY_LINKAGE} MATCHES "static") + set(HDF5_USE_STATIC_LIBRARIES ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DHDF5_PREFER_PARALLEL=${ENABLE_PARALLEL} + -DLIBKEA_WITH_GDAL=OFF + -DDISABLE_TESTS=ON + -DHDF5_USE_STATIC_LIBRARIES=${HDF5_USE_STATIC_LIBRARIES} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/python/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/keystone/CONTROL b/vcpkg/ports/keystone/CONTROL new file mode 100644 index 0000000..70443a2 --- /dev/null +++ b/vcpkg/ports/keystone/CONTROL @@ -0,0 +1,3 @@ +Source: keystone +Version: 0.9.1 +Description: Lightweight multi-platform, multi-architecture assembler framework diff --git a/vcpkg/ports/keystone/portfile.cmake b/vcpkg/ports/keystone/portfile.cmake new file mode 100644 index 0000000..6f740ae --- /dev/null +++ b/vcpkg/ports/keystone/portfile.cmake @@ -0,0 +1,51 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO keystone-engine/keystone + REF 0.9.1 + SHA512 3bd9c3793d5862a0a8628b52da381625e62445f661dbd5ed715723e7d9db01ce3f9586e5ca0a5cc71e8ceb6c912050f5c28e3ccd540e72c8abcfd2f0d1bbae17 + HEAD_REF master +) + +vcpkg_find_acquire_program(PYTHON2) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" KEYSTONE_BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" KEYSTONE_BUILD_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DKEYSTONE_BUILD_STATIC=${KEYSTONE_BUILD_STATIC} + -DKEYSTONE_BUILD_SHARED=${KEYSTONE_BUILD_SHARED} + -DPYTHON_EXECUTABLE=${PYTHON2} + + # Add support for only a subset of architectures + #-DLLVM_TARGETS_TO_BUILD="AArch64;X86" +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +if(EXES) + file(REMOVE ${EXES}) +endif() +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +else() + # Move DLLs + file(GLOB DLLS ${CURRENT_PACKAGES_DIR}/lib/*.dll) + file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${DLLS}) + file(GLOB DLLS ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) + file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${DLLS}) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/keystone + RENAME copyright +) diff --git a/vcpkg/ports/kf5archive/CONTROL b/vcpkg/ports/kf5archive/CONTROL new file mode 100644 index 0000000..16592e3 --- /dev/null +++ b/vcpkg/ports/kf5archive/CONTROL @@ -0,0 +1,5 @@ +Source: kf5archive +Version: 5.64.0-1 +Homepage: https://api.kde.org/frameworks/karchive/html/index.html +Description: File compression +Build-Depends: ecm, qt5-base[core], zlib, bzip2 diff --git a/vcpkg/ports/kf5archive/portfile.cmake b/vcpkg/ports/kf5archive/portfile.cmake new file mode 100644 index 0000000..c7b99e8 --- /dev/null +++ b/vcpkg/ports/kf5archive/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/karchive + REF v5.64.0 + SHA512 006cd9117eec02e1471b3b0082ee5f21161dc9c52855b6e4be7f3f3614bde9e22a3392f4a90be23654b648a003761bfa70a5497974577da43807eaf56fa126ba + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_HTML_DOCS=OFF + -DBUILD_MAN_DOCS=OFF + -DBUILD_QTHELP_DOCS=OFF + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5Archive) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/kf5completion/CONTROL b/vcpkg/ports/kf5completion/CONTROL new file mode 100644 index 0000000..fb1f430 --- /dev/null +++ b/vcpkg/ports/kf5completion/CONTROL @@ -0,0 +1,5 @@ +Source: kf5completion +Version: 5.64.0 +Homepage: https://api.kde.org/frameworks/kcompletion/html/index.html +Description: Text completion helpers and widgets +Build-Depends: ecm, qt5-tools, kf5config, kf5widgetsaddons \ No newline at end of file diff --git a/vcpkg/ports/kf5completion/add-qdbus-to-required-libraries.patch b/vcpkg/ports/kf5completion/add-qdbus-to-required-libraries.patch new file mode 100644 index 0000000..b5c285a --- /dev/null +++ b/vcpkg/ports/kf5completion/add-qdbus-to-required-libraries.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a86a05e..688bae2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -32,7 +32,7 @@ ecm_setup_version(PROJECT VARIABLE_PREFIX KCOMPLETION + # Dependencies + set(REQUIRED_QT_VERSION 5.11.0) + +-find_package(Qt5 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Widgets) ++find_package(Qt5 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Widgets DBus) + + find_package(KF5Config ${KF5_DEP_VERSION} REQUIRED) + find_package(KF5WidgetsAddons ${KF5_DEP_VERSION} REQUIRED) diff --git a/vcpkg/ports/kf5completion/portfile.cmake b/vcpkg/ports/kf5completion/portfile.cmake new file mode 100644 index 0000000..d9e697d --- /dev/null +++ b/vcpkg/ports/kf5completion/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kcompletion + REF v5.64.0 + SHA512 1d597bc0e82d1570b1ff7b254425ab18d4d505a0b7f475a43b51d70566b91e763b86675837421c3f09073544efa77e673e9d2cfef586c12684fc9fe7b0c6a0cc + HEAD_REF master + # reported issue, just a manual workaround until the issue is fixed upstream + PATCHES + "add-qdbus-to-required-libraries.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_HTML_DOCS=OFF + -DBUILD_MAN_DOCS=OFF + -DBUILD_QTHELP_DOCS=OFF + -DBUILD_TESTING=OFF + -DBUILD_DESIGNERPLUGIN=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5Completion) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) +file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/kf5config/CONTROL b/vcpkg/ports/kf5config/CONTROL new file mode 100644 index 0000000..8c0c49e --- /dev/null +++ b/vcpkg/ports/kf5config/CONTROL @@ -0,0 +1,5 @@ +Source: kf5config +Version: 5.64.0 +Homepage: https://api.kde.org/frameworks/kconfig/html/index.html +Description: Configuration system +Build-Depends: ecm, qt5-base, qt5-tools diff --git a/vcpkg/ports/kf5config/portfile.cmake b/vcpkg/ports/kf5config/portfile.cmake new file mode 100644 index 0000000..444b1ae --- /dev/null +++ b/vcpkg/ports/kf5config/portfile.cmake @@ -0,0 +1,53 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kconfig + REF v5.64.0 + SHA512 b8919e552a35ed3f4882d2d15205c5576be985e9f6e4e834d26587c9288e85a2ab27504a1531d1af70e8db4dc7ed71a6b0caf91c7310dace81177b68aa6a97e5 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_HTML_DOCS=OFF + -DBUILD_MAN_DOCS=OFF + -DBUILD_QTHELP_DOCS=OFF + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/kconfig_compiler_kf5.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/kconfig_compiler_kf5.exe) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/kconf_update.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/kconf_update.exe) + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/kreadconfig5.exe) + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/kwriteconfig5.exe) + file (GLOB EXES ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + file(REMOVE ${EXES}) +else() + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/kreadconfig5) + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/kwriteconfig5) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/kreadconfig5) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/kwriteconfig5) +endif() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5Config) + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) +file(APPEND ${CURRENT_PACKAGES_DIR}/tools/${PORT}/qt.conf "Data = ../../data") +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) +file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/kf5coreaddons/CONTROL b/vcpkg/ports/kf5coreaddons/CONTROL new file mode 100644 index 0000000..03d14a3 --- /dev/null +++ b/vcpkg/ports/kf5coreaddons/CONTROL @@ -0,0 +1,5 @@ +Source: kf5coreaddons +Version: 5.64.0 +Homepage: https://api.kde.org/frameworks/kcoreaddons/html/index.html +Description: Addons to QtCore +Build-Depends: ecm, qt5-base, qt5-tools diff --git a/vcpkg/ports/kf5coreaddons/portfile.cmake b/vcpkg/ports/kf5coreaddons/portfile.cmake new file mode 100644 index 0000000..14862e0 --- /dev/null +++ b/vcpkg/ports/kf5coreaddons/portfile.cmake @@ -0,0 +1,42 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kcoreaddons + REF v5.64.0 + SHA512 b6849c072aa33cd2d93477e7a08ffc8ec7034f7d8530b6492faa9a53e4e15af0da778fc54e5d865e68b36c32aa6559f3d178a03046f5120d11dcb61d35ed7a60 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_HTML_DOCS=OFF + -DBUILD_MAN_DOCS=OFF + -DBUILD_QTHELP_DOCS=OFF + -DBUILD_TESTING=OFF + -DKDE_INSTALL_DATAROOTDIR=data +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5CoreAddons) +vcpkg_copy_pdbs() + +vcpkg_copy_tools( + TOOL_NAMES desktoptojson + AUTO_CLEAN +) + +file(APPEND ${CURRENT_PACKAGES_DIR}/tools/${PORT}/qt.conf "Data = ../../data") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/data) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/desktoptojson${EXECUTABLE_SUFFIX}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/kf5crash/CONTROL b/vcpkg/ports/kf5crash/CONTROL new file mode 100644 index 0000000..927eca4 --- /dev/null +++ b/vcpkg/ports/kf5crash/CONTROL @@ -0,0 +1,6 @@ +Source: kf5crash +Version: 5.64.0 +Homepage: https://api.kde.org/frameworks/kcrash/html/index.html +Description: KCrash provides support for intercepting and handling application crashes. +Supports: linux +Build-Depends: ecm, kf5coreaddons, kf5widgetsaddons diff --git a/vcpkg/ports/kf5crash/add_x11extras.patch b/vcpkg/ports/kf5crash/add_x11extras.patch new file mode 100644 index 0000000..a6ff6fc --- /dev/null +++ b/vcpkg/ports/kf5crash/add_x11extras.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8a9d1c6..0d5fb3f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,7 +12,7 @@ feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKA + set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) + + set(REQUIRED_QT_VERSION 5.11.0) +-find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core) ++find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core X11Extras) + include(KDEInstallDirs) + include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) + include(KDECMakeSettings) diff --git a/vcpkg/ports/kf5crash/portfile.cmake b/vcpkg/ports/kf5crash/portfile.cmake new file mode 100644 index 0000000..dc608d3 --- /dev/null +++ b/vcpkg/ports/kf5crash/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_fail_port_install(ON_TARGET "osx" "uwp" "windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kcrash + REF v5.64.0 + SHA512 28749b220002fef756dbd8436cf684b7e3eb1d72ae00ae8b1bfded5c4a446683dc925a3be9beb55ad0872e71d3c23411d32b4fab935909816efa339cedaeda3d + HEAD_REF master + PATCHES + add_x11extras.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5Crash) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) + +file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/kf5guiaddons/CONTROL b/vcpkg/ports/kf5guiaddons/CONTROL new file mode 100644 index 0000000..a364eec --- /dev/null +++ b/vcpkg/ports/kf5guiaddons/CONTROL @@ -0,0 +1,5 @@ +Source: kf5guiaddons +Version: 5.64.0 +Homepage: https://api.kde.org/frameworks/kguiaddons/html/index.html +Description: Addons to QtGui +Build-Depends: ecm, qt5-winextras (windows), qt5-x11extras (linux), qt5-tools diff --git a/vcpkg/ports/kf5guiaddons/portfile.cmake b/vcpkg/ports/kf5guiaddons/portfile.cmake new file mode 100644 index 0000000..8234e4c --- /dev/null +++ b/vcpkg/ports/kf5guiaddons/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kguiaddons + REF v5.64.0 + SHA512 98d07360f02b473997cdbf9e9b832ea8c4a459a73669eff1db5276dfbd63e9a9088e3c1ed99d70cc1433468e1efcbce43d22fefdf75a399f4812e0fc4a4f13b1 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_HTML_DOCS=OFF + -DBUILD_MAN_DOCS=OFF + -DBUILD_QTHELP_DOCS=OFF + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5GuiAddons) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) +file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/kf5holidays/CONTROL b/vcpkg/ports/kf5holidays/CONTROL new file mode 100644 index 0000000..c1545e9 --- /dev/null +++ b/vcpkg/ports/kf5holidays/CONTROL @@ -0,0 +1,4 @@ +Source: kf5holidays +Version: 5.64.0-1 +Description: Holiday calculation library +Build-Depends: ecm, qt5-base[core], qt5-tools diff --git a/vcpkg/ports/kf5holidays/portfile.cmake b/vcpkg/ports/kf5holidays/portfile.cmake new file mode 100644 index 0000000..900834d --- /dev/null +++ b/vcpkg/ports/kf5holidays/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kholidays + REF v5.64.0 + SHA512 a4d9a88bb12b89c636ac63d848505c7895c672ef0e540e7fa45de22fb085048fa5f76729be60fceafbe63ab4b325251fdc65f36b58ab6d9bae7f50678578d4c8 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBUILD_HTML_DOCS=OFF + -DBUILD_MAN_DOCS=OFF + -DBUILD_QTHELP_DOCS=OFF + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5Holidays) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) + +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/qml ${CURRENT_PACKAGES_DIR}/debug/qml ) +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/qml ${CURRENT_PACKAGES_DIR}/qml ) + +file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/kf5holidays RENAME copyright) diff --git a/vcpkg/ports/kf5i18n/CONTROL b/vcpkg/ports/kf5i18n/CONTROL new file mode 100644 index 0000000..d963ed0 --- /dev/null +++ b/vcpkg/ports/kf5i18n/CONTROL @@ -0,0 +1,6 @@ +Source: kf5i18n +Version: 5.64.0 +Port-Version: 1 +Homepage: https://api.kde.org/frameworks/ki18n/html/index.html +Description: Advanced internationalization framework +Build-Depends: ecm, qt5-declarative, qt5-tools, gettext diff --git a/vcpkg/ports/kf5i18n/portfile.cmake b/vcpkg/ports/kf5i18n/portfile.cmake new file mode 100644 index 0000000..779fd60 --- /dev/null +++ b/vcpkg/ports/kf5i18n/portfile.cmake @@ -0,0 +1,50 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/ki18n + REF v5.64.0 + SHA512 13b5d701003edea704ffc86a886d86b27ff2198d4cde4ee732b9241cf04dba0fba403f1f78b45facd7c2d3b543f8f0a098369035270a61b347331eb495fae1d3 +) + +if(CMAKE_HOST_WIN32) + vcpkg_acquire_msys(MSYS_ROOT NO_DEFAULT_PACKAGES DIRECT_PACKAGES + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-gettext-0.19.8.1-9-any.pkg.tar.zst" + c632877544183def8b19659421c5511b87f8339596e1606bd47608277a0bf427d370aba1732915c2832c91f6d525261623401f145b951ff3015f79ac54179c19 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-libiconv-1.16-1-any.pkg.tar.xz" + ba236e1efc990cb91d459f938be6ca6fc2211be95e888d73f8de301bce55d586f9d2b6be55dacb975ec1afa7952b510906284eff70210238919e341dffbdbeb8 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-gcc-libs-10.2.0-1-any.pkg.tar.zst" + 113d8b3b155ea537be8b99688d454f781d70c67c810c2643bc02b83b332d99bfbf3a7fcada6b927fda67ef02cf968d4fdf930466c5909c4338bda64f1f3f483e + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-8.0.0.5906.c9a21571-1-any.pkg.tar.zst" + 2c3d9e6b2eee6a4c16fd69ddfadb6e2dc7f31156627d85845c523ac85e5c585d4cfa978659b1fe2ec823d44ef57bc2b92a6127618ff1a8d7505458b794f3f01c + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-mpc-1.1.0-1-any.pkg.tar.xz" + d236b815ec3cf569d24d96a386eca9f69a2b1e8af18e96c3f1e5a4d68a3598d32768c7fb3c92207ecffe531259822c1a421350949f2ffabd8ee813654f1af864 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-mpfr-4.1.0-2-any.pkg.tar.zst" + caac5cb73395082b479597a73c7398bf83009dbc0051755ef15157dc34996e156d4ed7881ef703f9e92861cfcad000888c4c32e4bf38b2596c415a19aafcf893 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-gmp-6.2.0-1-any.pkg.tar.xz" + 37747f3f373ebff1a493f5dec099f8cd6d5abdc2254d9cd68a103ad7ba44a81a9a97ccaba76eaee427b4d67b2becb655ee2c379c2e563c8051b6708431e3c588 + ) + set(GETTEXT_PATH ${MSYS_ROOT}/mingw32/bin) + vcpkg_add_to_path(${GETTEXT_PATH}) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_HTML_DOCS=OFF + -DBUILD_MAN_DOCS=OFF + -DBUILD_QTHELP_DOCS=OFF + -DBUILD_TESTING=OFF + -DKDE_INSTALL_PLUGINDIR=plugins +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5I18n) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) +file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/kf5itemmodels/CONTROL b/vcpkg/ports/kf5itemmodels/CONTROL new file mode 100644 index 0000000..f94f20f --- /dev/null +++ b/vcpkg/ports/kf5itemmodels/CONTROL @@ -0,0 +1,5 @@ +Source: kf5itemmodels +Version: 5.64.0 +Homepage: https://api.kde.org/frameworks/kitemmodels/html/index.html +Description: Models for Qt Model/View system +Build-Depends: ecm, qt5-tools, qt5-base diff --git a/vcpkg/ports/kf5itemmodels/portfile.cmake b/vcpkg/ports/kf5itemmodels/portfile.cmake new file mode 100644 index 0000000..9facbb1 --- /dev/null +++ b/vcpkg/ports/kf5itemmodels/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kitemmodels + REF v5.64.0 + SHA512 c29911b5ff521a8d1dae9b72250be59267da7bf059aeb1efec6a7361204957c12a1ae95fd34a00067b277ce3a61d88930326501c361341a316d6c0afb109b7ed +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_HTML_DOCS=OFF + -DBUILD_MAN_DOCS=OFF + -DBUILD_QTHELP_DOCS=OFF + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5ItemModels) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/kf5itemviews/CONTROL b/vcpkg/ports/kf5itemviews/CONTROL new file mode 100644 index 0000000..8d83844 --- /dev/null +++ b/vcpkg/ports/kf5itemviews/CONTROL @@ -0,0 +1,5 @@ +Source: kf5itemviews +Version: 5.64.0 +Homepage: https://api.kde.org/frameworks/kitemviews/html/index.html +Description: Widget addons for Qt Model/View +Build-Depends: ecm, qt5-tools, qt5-base diff --git a/vcpkg/ports/kf5itemviews/portfile.cmake b/vcpkg/ports/kf5itemviews/portfile.cmake new file mode 100644 index 0000000..f134b47 --- /dev/null +++ b/vcpkg/ports/kf5itemviews/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kitemviews + REF v5.64.0 + SHA512 c40d1dee94badac2e58098138522d72be00082ac9ce70e8f5690b5bd5ae0705fa79a7edc3af391230a86d08a4a8b7dac1c28f148758f7ee8c09195a178e35bcb +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_HTML_DOCS=OFF + -DBUILD_MAN_DOCS=OFF + -DBUILD_QTHELP_DOCS=OFF + -DBUILD_TESTING=OFF + -DBUILD_DESIGNERPLUGIN=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5ItemViews) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/kf5plotting/CONTROL b/vcpkg/ports/kf5plotting/CONTROL new file mode 100644 index 0000000..2eb191a --- /dev/null +++ b/vcpkg/ports/kf5plotting/CONTROL @@ -0,0 +1,5 @@ +Source: kf5plotting +Version: 5.64.0-1 +Homepage: https://api.kde.org/frameworks/kplotting/html/index.html +Description: Lightweight plotting framework +Build-Depends: ecm, qt5-base[core], qt5-tools diff --git a/vcpkg/ports/kf5plotting/portfile.cmake b/vcpkg/ports/kf5plotting/portfile.cmake new file mode 100644 index 0000000..8ea9b3d --- /dev/null +++ b/vcpkg/ports/kf5plotting/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kplotting + REF v5.64.0 + SHA512 831b26a5e85a8baa1d49405e1358c7cda62b0a643e85b9677e2ceee413938fd03b96ff2c060dc2e0fa012da0a45452f32b734633ec4c99eecbf9d6228ff722b4 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBUILD_HTML_DOCS=OFF + -DBUILD_MAN_DOCS=OFF + -DBUILD_QTHELP_DOCS=OFF + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5Plotting) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/plugins ${CURRENT_PACKAGES_DIR}/debug/plugins) +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/plugins ${CURRENT_PACKAGES_DIR}/plugins) +file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/kf5plotting RENAME copyright) diff --git a/vcpkg/ports/kf5syntaxhighlighting/CONTROL b/vcpkg/ports/kf5syntaxhighlighting/CONTROL new file mode 100644 index 0000000..52cca4b --- /dev/null +++ b/vcpkg/ports/kf5syntaxhighlighting/CONTROL @@ -0,0 +1,5 @@ +Source: kf5syntaxhighlighting +Version: 5.64.0-1 +Homepage: https://github.com/KDE/syntax-highlighting +Description: Syntax highlighting engine for Kate syntax definitions +Build-Depends: ecm, qt5-base[core], qt5-tools, qt5-xmlpatterns diff --git a/vcpkg/ports/kf5syntaxhighlighting/portfile.cmake b/vcpkg/ports/kf5syntaxhighlighting/portfile.cmake new file mode 100644 index 0000000..b3dd829 --- /dev/null +++ b/vcpkg/ports/kf5syntaxhighlighting/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/syntax-highlighting + REF v5.64.0 + SHA512 b33a136fad0e55054660c34328a208a19834c1adc9cdb9e8f334e9224492f2894bbcb355e61c8f6da6301363a11f832fa7e38cff293be249876048dd34c39476 + HEAD_REF master +) + +vcpkg_find_acquire_program(PERL) +get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) +vcpkg_add_to_path("${PERL_EXE_PATH}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBUILD_HTML_DOCS=OFF + -DBUILD_MAN_DOCS=OFF + -DBUILD_QTHELP_DOCS=OFF + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake(ADD_BIN_TO_PATH) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5SyntaxHighlighting) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/kf5syntaxhighlighting RENAME copyright) + +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/kate-syntax-highlighter.exe) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/kf5syntaxhighlighting) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/kate-syntax-highlighter.exe + ${CURRENT_PACKAGES_DIR}/tools/kf5syntaxhighlighting/kate-syntax-highlighter.exe) + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/kf5syntaxhighlighting) diff --git a/vcpkg/ports/kf5widgetsaddons/CONTROL b/vcpkg/ports/kf5widgetsaddons/CONTROL new file mode 100644 index 0000000..2e5f2eb --- /dev/null +++ b/vcpkg/ports/kf5widgetsaddons/CONTROL @@ -0,0 +1,5 @@ +Source: kf5widgetsaddons +Version: 5.64.0 +Homepage: https://api.kde.org/frameworks/kwidgetsaddons/html/index.html +Description: Addons to QtWidgets +Build-Depends: ecm, qt5-base, qt5-tools diff --git a/vcpkg/ports/kf5widgetsaddons/portfile.cmake b/vcpkg/ports/kf5widgetsaddons/portfile.cmake new file mode 100644 index 0000000..fe7106e --- /dev/null +++ b/vcpkg/ports/kf5widgetsaddons/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kwidgetsaddons + REF v5.64.0 + SHA512 f49bade85b97468ad4c2faa34b71c6d04ff95c720c27e5b7adfb9a7b5acf8ff30b91d2beca7472dec6b8241f918b4fb15bddc1429be86a62bcefefe918311307 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_HTML_DOCS=OFF + -DBUILD_MAN_DOCS=OFF + -DBUILD_QTHELP_DOCS=OFF + -DBUILD_TESTING=OFF + -DBUILD_DESIGNERPLUGIN=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5WidgetsAddons) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) +file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/kf5windowsystem/CONTROL b/vcpkg/ports/kf5windowsystem/CONTROL new file mode 100644 index 0000000..d5cb904 --- /dev/null +++ b/vcpkg/ports/kf5windowsystem/CONTROL @@ -0,0 +1,5 @@ +Source: kf5windowsystem +Version: 5.64.0 +Homepage: https://api.kde.org/frameworks/kwindowsystem/html/ +Description: Access to the windowing system +Build-Depends: ecm, qt5-winextras (windows), qt5-tools diff --git a/vcpkg/ports/kf5windowsystem/portfile.cmake b/vcpkg/ports/kf5windowsystem/portfile.cmake new file mode 100644 index 0000000..0284c74 --- /dev/null +++ b/vcpkg/ports/kf5windowsystem/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/kwindowsystem + REF v5.64.0 + SHA512 7e1033ac383042b76254f35676c8aa011f02192e80ac2eb0554014a483749b13002062e7e928884f95dc7cb2a1c390bd2a93a7871d3f107b7042f7219dadecf5 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_HTML_DOCS=OFF + -DBUILD_MAN_DOCS=OFF + -DBUILD_QTHELP_DOCS=OFF + -DBUILD_TESTING=OFF + -DKDE_INSTALL_PLUGINDIR=plugins +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/KF5WindowSystem) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/data) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/etc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/kfr/CONTROL b/vcpkg/ports/kfr/CONTROL new file mode 100644 index 0000000..985ba86 --- /dev/null +++ b/vcpkg/ports/kfr/CONTROL @@ -0,0 +1,15 @@ +Source: kfr +Version: 2020-06-15 +Description: Fast, modern C++ DSP framework +Homepage: https://www.kfr.dev/ +Supports: !(arm|linux) + +Feature: capi +Description: Enable C API build +Build-Depends: kfr[dft] + +Feature: dft +Description: Enable DFT and related algorithms + +Feature: dft-np +Description: Enable Non-power of 2 DFT diff --git a/vcpkg/ports/kfr/portfile.cmake b/vcpkg/ports/kfr/portfile.cmake new file mode 100644 index 0000000..2cd702e --- /dev/null +++ b/vcpkg/ports/kfr/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "Linux") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kfrlib/kfr + REF 1f9706197abfcd4b4ec19ded3ce37b70ebd9a223 + SHA512 901c6984a46a7abcc28adf9397759156a9e8d173e028c236ab423568ed20b3a3efe207be9660c961539c73a2767afaedcd76133304f542d3299353942cf13f5e + HEAD_REF master +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + capi ENABLE_CAPI_BUILD + dft ENABLE_DFT + dft-np ENABLE_DFT_NP +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DENABLE_TESTS=OFF + -DENABLE_ASMTEST=OFF + -DREGENERATE_TESTS=OFF + -DKFR_EXTENDED_TESTS=OFF + -DSKIP_TESTS=ON + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/kinectsdk1/CONTROL b/vcpkg/ports/kinectsdk1/CONTROL new file mode 100644 index 0000000..d4cd1d2 --- /dev/null +++ b/vcpkg/ports/kinectsdk1/CONTROL @@ -0,0 +1,4 @@ +Source: kinectsdk1 +Version: 1.8-2 +Description: Kinect for Windows SDK for Kinect v1 sensor. +Supports: !arm \ No newline at end of file diff --git a/vcpkg/ports/kinectsdk1/portfile.cmake b/vcpkg/ports/kinectsdk1/portfile.cmake new file mode 100644 index 0000000..5aec501 --- /dev/null +++ b/vcpkg/ports/kinectsdk1/portfile.cmake @@ -0,0 +1,71 @@ +include(vcpkg_common_functions) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + message(FATAL_ERROR "This port does not currently support architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() + +set(KINECTSDK10_VERSION "v1.8") +vcpkg_download_distfile(KINECTSDK10_INSTALLER + URLS "https://download.microsoft.com/download/E/1/D/E1DEC243-0389-4A23-87BF-F47DE869FC1A/KinectSDK-${KINECTSDK10_VERSION}-Setup.exe" + FILENAME "KinectSDK-${KINECTSDK10_VERSION}-Setup.exe" + SHA512 ee8a0f70c86aad80fe214108e315e4550a90ed39f278ce00a7137532174ee5bf3bdeb1d0b499fc5ffdb5e176adecfd68963ee3731e1d2f00d69d32d1b8a3c555 +) + +vcpkg_find_acquire_program(DARK) + +set(KINECTSDK10_WIX_INSTALLER "${KINECTSDK10_INSTALLER}") +set(KINECTSDK10_WIX_EXTRACT_DIR "${CURRENT_BUILDTREES_DIR}/src/installer/wix") +vcpkg_execute_required_process( + COMMAND ${DARK} -x ${KINECTSDK10_WIX_EXTRACT_DIR} ${KINECTSDK10_WIX_INSTALLER} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} + LOGNAME extract_wix_installer +) + +file(TO_NATIVE_PATH "${KINECTSDK10_WIX_EXTRACT_DIR}/AttachedContainer/KinectSDK-${KINECTSDK10_VERSION}-${VCPKG_TARGET_ARCHITECTURE}.msi" KINECTSDK10_MSI_INSTALLER) +file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/src/installer/msi/${VCPKG_TARGET_ARCHITECTURE}" KINECTSDK10_MSI_EXTRACT_DIR) +file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/msiexec.log" MSIEXEC_LOG_PATH) +set(BATCH_FILE ${CURRENT_BUILDTREES_DIR}/msiextract-msmpi.bat) +file(WRITE ${BATCH_FILE} "msiexec.exe /a \"${KINECTSDK10_MSI_INSTALLER}\" /qn /log \"${MSIEXEC_LOG_PATH}\" TARGETDIR=\"${KINECTSDK10_MSI_EXTRACT_DIR}\"") +vcpkg_execute_required_process( + COMMAND ${BATCH_FILE} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} + LOGNAME extract_msi_installer_${VCPKG_TARGET_ARCHITECTURE} +) + +set(KINECTSDK10_DIR "${CURRENT_BUILDTREES_DIR}/src/installer/msi/${VCPKG_TARGET_ARCHITECTURE}/Microsoft SDKs/Kinect/${KINECTSDK10_VERSION}") + +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 +) + +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( + 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 diff --git a/vcpkg/ports/kinectsdk2/CONTROL b/vcpkg/ports/kinectsdk2/CONTROL new file mode 100644 index 0000000..d92784d --- /dev/null +++ b/vcpkg/ports/kinectsdk2/CONTROL @@ -0,0 +1,4 @@ +Source: kinectsdk2 +Version: 2.0-2 +Description: Kinect for Windows SDK for Kinect v2 sensor. +Supports: !arm \ No newline at end of file diff --git a/vcpkg/ports/kinectsdk2/portfile.cmake b/vcpkg/ports/kinectsdk2/portfile.cmake new file mode 100644 index 0000000..fc42bb9 --- /dev/null +++ b/vcpkg/ports/kinectsdk2/portfile.cmake @@ -0,0 +1,62 @@ +include(vcpkg_common_functions) + +vcpkg_buildpath_length_warning(37) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + message(FATAL_ERROR "This port does not currently support architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() + +set(KINECTSDK20_VERSION "v2.0_1409") +vcpkg_download_distfile(KINECTSDK20_INSTALLER + URLS "https://download.microsoft.com/download/F/2/D/F2D1012E-3BC6-49C5-B8B3-5ACFF58AF7B8/KinectSDK-${KINECTSDK20_VERSION}-Setup.exe" + FILENAME "KinectSDK-${KINECTSDK20_VERSION}-Setup.exe" + SHA512 ae3b00f45282ab2ed6ea36c09e42e1b274074f41546ecfbe00facf1fffa2e5a762ffeffb9ba2194f716e8122e0fbd9a8ef63c62be68d2b50a40e4f8c5a821f5f +) + +vcpkg_find_acquire_program(DARK) + +set(KINECTSDK20_WIX_INSTALLER "${KINECTSDK20_INSTALLER}") +set(KINECTSDK20_WIX_EXTRACT_DIR "${CURRENT_BUILDTREES_DIR}/src/installer/wix") +vcpkg_execute_required_process( + COMMAND ${DARK} -x ${KINECTSDK20_WIX_EXTRACT_DIR} ${KINECTSDK20_WIX_INSTALLER} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} + LOGNAME extract_wix_installer +) + +file(TO_NATIVE_PATH "${KINECTSDK20_WIX_EXTRACT_DIR}/AttachedContainer/KinectSDK-${KINECTSDK20_VERSION}-x64.msi" KINECTSDK20_MSI_INSTALLER) +file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/src/installer/msi" KINECTSDK20_MSI_EXTRACT_DIR) +file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/msiexec.log" MSIEXEC_LOG_PATH) +set(BATCH_FILE ${CURRENT_BUILDTREES_DIR}/msiextract-msmpi.bat) +file(WRITE ${BATCH_FILE} "msiexec.exe /a \"${KINECTSDK20_MSI_INSTALLER}\" /qn /log \"${MSIEXEC_LOG_PATH}\" TARGETDIR=\"${KINECTSDK20_MSI_EXTRACT_DIR}\"") +vcpkg_execute_required_process( + COMMAND ${BATCH_FILE} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} + LOGNAME extract_msi_installer +) + +set(KINECTSDK20_DIR "${CURRENT_BUILDTREES_DIR}/src/installer/msi/Microsoft SDKs/Kinect/${KINECTSDK20_VERSION}") + +file( + INSTALL + "${KINECTSDK20_DIR}/inc/" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include +) + +file( + INSTALL + "${KINECTSDK20_DIR}/Lib/${VCPKG_TARGET_ARCHITECTURE}/Kinect20.lib" + DESTINATION + ${CURRENT_PACKAGES_DIR}/lib +) + +file( + INSTALL + "${KINECTSDK20_DIR}/Lib/${VCPKG_TARGET_ARCHITECTURE}/Kinect20.lib" + DESTINATION + ${CURRENT_PACKAGES_DIR}/debug/lib +) + +# Handle copyright +file(COPY "${KINECTSDK20_DIR}/SDKEula.rtf" DESTINATION ${CURRENT_PACKAGES_DIR}/share/kinectsdk2) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/kinectsdk2/SDKEula.rtf ${CURRENT_PACKAGES_DIR}/share/kinectsdk2/copyright) diff --git a/vcpkg/ports/kissfft/CMakeLists.txt b/vcpkg/ports/kissfft/CMakeLists.txt new file mode 100644 index 0000000..8d522ec --- /dev/null +++ b/vcpkg/ports/kissfft/CMakeLists.txt @@ -0,0 +1,65 @@ +cmake_minimum_required(VERSION 3.14) + +project(kissfft LANGUAGES C) + +include(GNUInstallDirs) + +option(KF_USE_SIMD "Use SIMD" OFF) +option(KF_INSTALL_HEADERS "Install header files" ON) + +if (KF_USE_SIMD) + set(KF_SCALAR_TYPE "__m128" CACHE STRING "Definition of kiss_fft_scalar") +else () + set(KF_SCALAR_TYPE "float" CACHE STRING "Definition of kiss_fft_scalar") +endif () + +# TODO: FIXED_POINT +# TODO: -msse + +set(kissfft_sources kiss_fft.c) + +if (WIN32 AND BUILD_SHARED_LIBS) + list(APPEND kissfft_sources exports.def) +endif () + +add_library(kissfft ${kissfft_sources}) + +if (BUILD_SHARED_LIBS) + set_property( + TARGET kissfft + PROPERTY POSITION_INDEPENDENT_CODE ON + ) +endif () + +target_include_directories( + kissfft + PUBLIC + $ +) + +target_compile_definitions( + kissfft + PUBLIC + $<$:USE_SIMD> + kiss_fft_scalar=${KF_SCALAR_TYPE} +) + +if (KF_INSTALL_HEADERS) + install( + FILES + _kiss_fft_guts.h + kiss_fft.h + kissfft.hh + kissfft_i32.hh + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + ) +endif () + +install(TARGETS kissfft EXPORT unofficial-kissfft-config) + +install( + EXPORT unofficial-kissfft-config + NAMESPACE unofficial::kissfft:: + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/unofficial-kissfft + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) diff --git a/vcpkg/ports/kissfft/CONTROL b/vcpkg/ports/kissfft/CONTROL new file mode 100644 index 0000000..0c4f0f6 --- /dev/null +++ b/vcpkg/ports/kissfft/CONTROL @@ -0,0 +1,4 @@ +Source: kissfft +Version: 2020-03-30 +Homepage: https://github.com/mborgerding/kissfft +Description: A Fast Fourier Transform (FFT) library that tries to Keep it Simple, Stupid diff --git a/vcpkg/ports/kissfft/exports.def b/vcpkg/ports/kissfft/exports.def new file mode 100644 index 0000000..09897b9 --- /dev/null +++ b/vcpkg/ports/kissfft/exports.def @@ -0,0 +1,6 @@ +EXPORTS + kiss_fft_alloc + kiss_fft + kiss_fft_stride + kiss_fft_cleanup + kiss_fft_next_fast_size diff --git a/vcpkg/ports/kissfft/portfile.cmake b/vcpkg/ports/kissfft/portfile.cmake new file mode 100644 index 0000000..d5eea78 --- /dev/null +++ b/vcpkg/ports/kissfft/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mborgerding/kissfft + REF 3f3fc6ab55da8610aba7fe89dcda09cf3a31f4e6 + SHA512 5d3781a82d067cebd0a20c6b35a2d806598ba66f3bbf282c49a2ac9a6d09e1307dca1f8bc5fcc4c5955dc2f66aa94ca4dcfe00e6b31ea4694aa9d507f194554e + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/exports.def DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DKF_INSTALL_HEADERS=OFF + OPTIONS_RELEASE + -DKF_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets( + CONFIG_PATH lib/cmake/unofficial-${PORT} + TARGET_PATH share/unofficial-${PORT} +) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/knet/portfile.cmake b/vcpkg/ports/knet/portfile.cmake new file mode 100644 index 0000000..f974cec --- /dev/null +++ b/vcpkg/ports/knet/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kibaamor/knet + REF v1.0.1 + SHA512 c9d3d876bef89d2b2c10f4f91ff3dc70a036e2437bf96fd57df8de07275b7b99b214ad332db94d7f1da587b22e6bd00bfde1d7d4b23277639ea0cef1f0a6f59c + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DKNET_BUILD_EXAMPLE:BOOL=OFF + -DKNET_BUILD_TEST:BOOL=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/knet TARGET_PATH share/knet) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/knet/usage b/vcpkg/ports/knet/usage new file mode 100644 index 0000000..2a83afe --- /dev/null +++ b/vcpkg/ports/knet/usage @@ -0,0 +1,4 @@ +The package knet provides CMake integration: + + find_package(knet CONFIG REQUIRED) + target_link_libraries(main PRIVATE knet) diff --git a/vcpkg/ports/knet/vcpkg.json b/vcpkg/ports/knet/vcpkg.json new file mode 100644 index 0000000..5ac2b02 --- /dev/null +++ b/vcpkg/ports/knet/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "knet", + "version-string": "1.0.1", + "description": "A cross platform lock-free and timer-supported C++11 network library.", + "homepage": "https://github.com/kibaamor/knet", + "license": "MIT", + "supports": "!(arm | uwp)" +} diff --git a/vcpkg/ports/kubazip/CONTROL b/vcpkg/ports/kubazip/CONTROL new file mode 100644 index 0000000..d19677f --- /dev/null +++ b/vcpkg/ports/kubazip/CONTROL @@ -0,0 +1,4 @@ +Source: kubazip +Version: 0.1.19 +Homepage: https://github.com/kuba--/zip +Description: A portable, simple zip library written in C diff --git a/vcpkg/ports/kubazip/fix_targets.patch b/vcpkg/ports/kubazip/fix_targets.patch new file mode 100644 index 0000000..e5ffb86 --- /dev/null +++ b/vcpkg/ports/kubazip/fix_targets.patch @@ -0,0 +1,52 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 55dfc77..f0182f9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,6 +1,6 @@ + cmake_minimum_required(VERSION 3.4) + +-project(zip ++project(kubazip + LANGUAGES C + VERSION "0.1.19") + set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) +@@ -15,7 +15,7 @@ if (MSVC) + elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR + "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR + "${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang") +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall -Wextra -Werror -pedantic") ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -Wall -Wextra -pedantic") + endif (MSVC) + + # zip +@@ -37,7 +37,7 @@ endif() + + target_include_directories(${PROJECT_NAME} PUBLIC + $ +- $ ++ $ + ) + + # test +@@ -52,7 +52,7 @@ endif() + # Installation (https://github.com/forexample/package-example) { + + set(CONFIG_INSTALL_DIR "lib/cmake/${PROJECT_NAME}") +-set(INCLUDE_INSTALL_DIR "include") ++set(INCLUDE_INSTALL_DIR "include/${PROJECT_NAME}") + + set(GENERATED_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated") + +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 04c2123..002cf5a 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.4) + set(test_out test.out) + + add_executable(${test_out} test.c) +-target_link_libraries(${test_out} zip) ++target_link_libraries(${test_out} kubazip) + + add_test(NAME ${test_out} COMMAND ${test_out}) + diff --git a/vcpkg/ports/kubazip/portfile.cmake b/vcpkg/ports/kubazip/portfile.cmake new file mode 100644 index 0000000..ba2f488 --- /dev/null +++ b/vcpkg/ports/kubazip/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kuba--/zip + REF 96924c94dabe362bbb1588aa70209e638e6fb35c + SHA512 bc3e9ecf39d54321314d09209f356a2491893591a016b1619abcdea8c1fb1fa8ba1f9858f4e758641df083ed237a2ec9f0af13e0f1d802502257644168ae8907 + HEAD_REF master + PATCHES + fix_targets.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/kubazip) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/UNLICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/kvasir-mpl/CONTROL b/vcpkg/ports/kvasir-mpl/CONTROL new file mode 100644 index 0000000..63b93df --- /dev/null +++ b/vcpkg/ports/kvasir-mpl/CONTROL @@ -0,0 +1,8 @@ +Source: kvasir-mpl +Version: 2019-08-06 +Homepage: https://github.com/kvasir-io/mpl +Description: This library is part of the Kvasir project. Kvasir is a collection of zero cost statically checked libraries for resource constrained systems including microcontrollers. + +Feature: test +Description: Build with test + diff --git a/vcpkg/ports/kvasir-mpl/portfile.cmake b/vcpkg/ports/kvasir-mpl/portfile.cmake new file mode 100644 index 0000000..b5076e9 --- /dev/null +++ b/vcpkg/ports/kvasir-mpl/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kvasir-io/mpl + REF a9060b46c37c769e5517e0116b060fec923b6fdb + SHA512 bbe7267d288eda9ded81ce82e428d237cb5a9d686cd1b68a334b1ae53db4bf25e37fb86d991e7cf61542ee91ccae8db7498efde91a07332fd68594a229ff35ca + HEAD_REF development +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + test BUILD_WITH_TEST +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBUILD_TESTING=${BUILD_WITH_TEST} +) + +vcpkg_install_cmake() + +# Move CMake config files to the right place +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/kvasir_mpl) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) \ No newline at end of file diff --git a/vcpkg/ports/lapack-reference/CONTROL b/vcpkg/ports/lapack-reference/CONTROL new file mode 100644 index 0000000..3d8bb85 --- /dev/null +++ b/vcpkg/ports/lapack-reference/CONTROL @@ -0,0 +1,17 @@ +Source: lapack-reference +Version: 3.8.0 +Port-Version: 3 +Description: LAPACK — Linear Algebra PACKage http://www.netlib.org/lapack/ +Default-Features: blas-select +Build-Depends: vcpkg-gfortran (windows) + +Feature: cblas +Description: Builds CBLAS + +Feature: noblas +Build-Depends: openblas +Description: Use external optimized BLAS + +Feature: blas-select +Build-Depends: lapack-reference[core, noblas](!windows|!static) +Description: Use external optimized BLAS diff --git a/vcpkg/ports/lapack-reference/FindLAPACK.cmake b/vcpkg/ports/lapack-reference/FindLAPACK.cmake new file mode 100644 index 0000000..a411c7c --- /dev/null +++ b/vcpkg/ports/lapack-reference/FindLAPACK.cmake @@ -0,0 +1,551 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindLAPACK +---------- + +Find Linear Algebra PACKage (LAPACK) library + +This module finds an installed Fortran library that implements the +LAPACK linear-algebra interface (see http://www.netlib.org/lapack/). + +The approach follows that taken for the ``autoconf`` macro file, +``acx_lapack.m4`` (distributed at +http://ac-archive.sourceforge.net/ac-archive/acx_lapack.html). + +Input Variables +^^^^^^^^^^^^^^^ + +The following variables may be set to influence this module's behavior: + +``BLA_STATIC`` + if ``ON`` use static linkage + +``BLA_VENDOR`` + If set, checks only the specified vendor, if not set checks all the + possibilities. List of vendors valid in this module: + + * ``OpenBLAS`` + * ``FLAME`` + * ``Intel10_32`` (intel mkl v10 32 bit) + * ``Intel10_64lp`` (intel mkl v10+ 64 bit, threaded code, lp64 model) + * ``Intel10_64lp_seq`` (intel mkl v10+ 64 bit, sequential code, lp64 model) + * ``Intel10_64ilp`` (intel mkl v10+ 64 bit, threaded code, ilp64 model) + * ``Intel10_64ilp_seq`` (intel mkl v10+ 64 bit, sequential code, ilp64 model) + * ``Intel10_64_dyn`` (intel mkl v10+ 64 bit, single dynamic library) + * ``Intel`` (obsolete versions of mkl 32 and 64 bit) + * ``ACML`` + * ``Apple`` + * ``NAS`` + * ``Arm`` + * ``Arm_mp`` + * ``Arm_ilp64`` + * ``Arm_ilp64_mp`` + * ``Generic`` + +``BLA_F95`` + if ``ON`` tries to find the BLAS95/LAPACK95 interfaces + +Imported targets +^^^^^^^^^^^^^^^^ + +This module defines the following :prop_tgt:`IMPORTED` target: + +``LAPACK::LAPACK`` + The libraries to use for LAPACK, if found. + +Result Variables +^^^^^^^^^^^^^^^^ + +This module defines the following variables: + +``LAPACK_FOUND`` + library implementing the LAPACK interface is found +``LAPACK_LINKER_FLAGS`` + uncached list of required linker flags (excluding ``-l`` and ``-L``). +``LAPACK_LIBRARIES`` + uncached list of libraries (using full path name) to link against + to use LAPACK +``LAPACK95_LIBRARIES`` + uncached list of libraries (using full path name) to link against + to use LAPACK95 +``LAPACK95_FOUND`` + library implementing the LAPACK95 interface is found + +.. note:: + + C, CXX or Fortran must be enabled to detect a BLAS/LAPACK library. + C or CXX must be enabled to use Intel Math Kernel Library (MKL). + + For example, to use Intel MKL libraries and/or Intel compiler: + + .. code-block:: cmake + + set(BLA_VENDOR Intel10_64lp) + find_package(LAPACK) +#]=======================================================================] + +enable_language(C) +# Check the language being used +if(NOT (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED OR CMAKE_Fortran_COMPILER_LOADED)) + if(LAPACK_FIND_REQUIRED) + message(FATAL_ERROR "FindLAPACK requires Fortran, C, or C++ to be enabled.") + else() + message(STATUS "Looking for LAPACK... - NOT found (Unsupported languages)") + return() + endif() +endif() + +if(CMAKE_Fortran_COMPILER_LOADED) + include(${CMAKE_ROOT}/Modules/CheckFortranFunctionExists.cmake) +else() + include(${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake) +endif() +include(${CMAKE_ROOT}/Modules/CMakePushCheckState.cmake) + +cmake_push_check_state() +set(CMAKE_REQUIRED_QUIET ${LAPACK_FIND_QUIETLY}) + +set(LAPACK_FOUND FALSE) +set(LAPACK95_FOUND FALSE) + +# TODO: move this stuff to a separate module + +macro(CHECK_LAPACK_LIBRARIES LIBRARIES _prefix _name _flags _list _threadlibs _addlibdir _subdirs _blas) + # This macro checks for the existence of the combination of fortran libraries + # given by _list. If the combination is found, this macro checks (using the + # Check_Fortran_Function_Exists macro) whether can link against that library + # combination using the name of a routine given by _name using the linker + # flags given by _flags. If the combination of libraries is found and passes + # the link test, LIBRARIES is set to the list of complete library paths that + # have been found. Otherwise, LIBRARIES is set to FALSE. + + # N.B. _prefix is the prefix applied to the names of all cached variables that + # are generated internally and marked advanced by this macro. + # _addlibdir is a list of additional search paths. _subdirs is a list of path + # suffixes to be used by find_library(). + + set(_libraries_work TRUE) + set(${LIBRARIES}) + set(_combined_name) + + set(_extaddlibdir "${_addlibdir}") + if(WIN32) + list(APPEND _extaddlibdir ENV LIB) + elseif(APPLE) + list(APPEND _extaddlibdir ENV DYLD_LIBRARY_PATH) + else() + list(APPEND _extaddlibdir ENV LD_LIBRARY_PATH) + endif() + list(APPEND _extaddlibdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") + + foreach(_library ${_list}) + if(_library MATCHES "^-Wl,--(start|end)-group$") + # Respect linker flags like --start/end-group (required by MKL) + set(${LIBRARIES} ${${LIBRARIES}} "${_library}") + else() + set(_combined_name ${_combined_name}_${_library}) + if(_libraries_work) + find_library(${_prefix}_${_library}_LIBRARY + NAMES ${_library} + PATHS ${_extaddlibdir} + PATH_SUFFIXES ${_subdirs} + ) + #message("DEBUG: find_library(${_library}) got ${${_prefix}_${_library}_LIBRARY}") + mark_as_advanced(${_prefix}_${_library}_LIBRARY) + set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY}) + set(_libraries_work ${${_prefix}_${_library}_LIBRARY}) + endif() + endif() + endforeach() + + if(_libraries_work) + # Test this combination of libraries. + set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_blas} ${_threadlibs}) + #message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}") + if(CMAKE_Fortran_COMPILER_LOADED) + check_fortran_function_exists("${_name}" ${_prefix}${_combined_name}_WORKS) + else() + check_function_exists("${_name}_" ${_prefix}${_combined_name}_WORKS) + endif() + set(CMAKE_REQUIRED_LIBRARIES) + set(_libraries_work ${${_prefix}${_combined_name}_WORKS}) + endif() + + if(_libraries_work) + if("${_list}${_blas}" STREQUAL "") + set(${LIBRARIES} "${LIBRARIES}-PLACEHOLDER-FOR-EMPTY-LIBRARIES") + else() + set(${LIBRARIES} ${${LIBRARIES}} ${_blas} ${_threadlibs}) + endif() + else() + set(${LIBRARIES} FALSE) + endif() + #message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}") +endmacro() + +set(LAPACK_LINKER_FLAGS) +set(LAPACK_LIBRARIES) +set(LAPACK95_LIBRARIES) + +include(CMakeFindDependencyMacro) +find_dependency(BLAS) + +if(BLAS_FOUND) + set(LAPACK_LINKER_FLAGS ${BLAS_LINKER_FLAGS}) + if(NOT $ENV{BLA_VENDOR} STREQUAL "") + set(BLA_VENDOR $ENV{BLA_VENDOR}) + else() + if(NOT BLA_VENDOR) + set(BLA_VENDOR "All") + endif() + endif() + + # LAPACK in the Intel MKL 10+ library? + if(BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") + if(NOT LAPACK_LIBRARIES) + if(CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED) + # System-specific settings + if(NOT WIN32) + set(LAPACK_mkl_LM "-lm") + set(LAPACK_mkl_LDL "-ldl") + endif() + + if(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED) + find_package(Threads) + else() + find_package(Threads REQUIRED) + endif() + + if(BLA_VENDOR MATCHES "_64ilp") + set(LAPACK_mkl_ILP_MODE "ilp64") + else() + set(LAPACK_mkl_ILP_MODE "lp64") + endif() + + set(LAPACK_SEARCH_LIBS "") + + if(BLA_F95) + set(LAPACK_mkl_SEARCH_SYMBOL "cheev_f95") + set(_LIBRARIES LAPACK95_LIBRARIES) + set(_BLAS_LIBRARIES ${BLAS95_LIBRARIES}) + + # old + list(APPEND LAPACK_SEARCH_LIBS + "mkl_lapack95") + # new >= 10.3 + list(APPEND LAPACK_SEARCH_LIBS + "mkl_intel_c") + list(APPEND LAPACK_SEARCH_LIBS + "mkl_lapack95_${LAPACK_mkl_ILP_MODE}") + else() + set(LAPACK_mkl_SEARCH_SYMBOL "cheev") + set(_LIBRARIES LAPACK_LIBRARIES) + set(_BLAS_LIBRARIES ${BLAS_LIBRARIES}) + + # old and new >= 10.3 + list(APPEND LAPACK_SEARCH_LIBS + "mkl_lapack") + endif() + + # MKL uses a multitude of partially platform-specific subdirectories: + if(BLA_VENDOR STREQUAL "Intel10_32") + set(LAPACK_mkl_ARCH_NAME "ia32") + else() + set(LAPACK_mkl_ARCH_NAME "intel64") + endif() + if(WIN32) + set(LAPACK_mkl_OS_NAME "win") + elseif(APPLE) + set(LAPACK_mkl_OS_NAME "mac") + else() + set(LAPACK_mkl_OS_NAME "lin") + endif() + if(DEFINED ENV{MKLROOT}) + file(TO_CMAKE_PATH "$ENV{MKLROOT}" LAPACK_mkl_MKLROOT) + # If MKLROOT points to the subdirectory 'mkl', use the parent directory instead + # so we can better detect other relevant libraries in 'compiler' or 'tbb': + get_filename_component(LAPACK_mkl_MKLROOT_LAST_DIR "${LAPACK_mkl_MKLROOT}" NAME) + if(LAPACK_mkl_MKLROOT_LAST_DIR STREQUAL "mkl") + get_filename_component(LAPACK_mkl_MKLROOT "${LAPACK_mkl_MKLROOT}" DIRECTORY) + endif() + endif() + set(LAPACK_mkl_LIB_PATH_SUFFIXES + "compiler/lib" "compiler/lib/${LAPACK_mkl_ARCH_NAME}_${LAPACK_mkl_OS_NAME}" + "mkl/lib" "mkl/lib/${LAPACK_mkl_ARCH_NAME}_${LAPACK_mkl_OS_NAME}" + "lib/${LAPACK_mkl_ARCH_NAME}_${LAPACK_mkl_OS_NAME}") + + # First try empty lapack libs + if(NOT ${_LIBRARIES}) + check_lapack_libraries( + ${_LIBRARIES} + LAPACK + ${LAPACK_mkl_SEARCH_SYMBOL} + "" + "" + "${CMAKE_THREAD_LIBS_INIT};${LAPACK_mkl_LM};${LAPACK_mkl_LDL}" + "${LAPACK_mkl_MKLROOT}" + "${LAPACK_mkl_LIB_PATH_SUFFIXES}" + "${_BLAS_LIBRARIES}" + ) + endif() + + # Then try the search libs + foreach(IT ${LAPACK_SEARCH_LIBS}) + string(REPLACE " " ";" SEARCH_LIBS ${IT}) + if(NOT ${_LIBRARIES}) + check_lapack_libraries( + ${_LIBRARIES} + LAPACK + ${LAPACK_mkl_SEARCH_SYMBOL} + "" + "${SEARCH_LIBS}" + "${CMAKE_THREAD_LIBS_INIT};${LAPACK_mkl_LM};${LAPACK_mkl_LDL}" + "${LAPACK_mkl_MKLROOT}" + "${LAPACK_mkl_LIB_PATH_SUFFIXES}" + "${_BLAS_LIBRARIES}" + ) + endif() + endforeach() + + unset(LAPACK_mkl_ILP_MODE) + unset(LAPACK_mkl_SEARCH_SYMBOL) + unset(LAPACK_mkl_LM) + unset(LAPACK_mkl_LDL) + unset(LAPACK_mkl_MKLROOT) + unset(LAPACK_mkl_ARCH_NAME) + unset(LAPACK_mkl_OS_NAME) + unset(LAPACK_mkl_LIB_PATH_SUFFIXES) + endif() + endif() + endif() + + # gotoblas? (http://www.tacc.utexas.edu/tacc-projects/gotoblas2) + if(BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All") + if(NOT LAPACK_LIBRARIES) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "goto2" + "" + "" + "" + "${BLAS_LIBRARIES}" + ) + endif() + endif() + + # OpenBLAS? (http://www.openblas.net) + if(BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All") + if(NOT LAPACK_LIBRARIES) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "openblas" + "" + "" + "" + "${BLAS_LIBRARIES}" + ) + endif() + endif() + + # ArmPL? (https://developer.arm.com/tools-and-software/server-and-hpc/compile/arm-compiler-for-linux/arm-performance-libraries) + if(BLA_VENDOR MATCHES "Arm" OR BLA_VENDOR STREQUAL "All") + + # Check for 64bit Integer support + if(BLA_VENDOR MATCHES "_ilp64") + set(LAPACK_armpl_LIB "armpl_ilp64") + else() + set(LAPACK_armpl_LIB "armpl_lp64") + endif() + + # Check for OpenMP support, VIA BLA_VENDOR of Arm_mp or Arm_ipl64_mp + if(BLA_VENDOR MATCHES "_mp") + set(LAPACK_armpl_LIB "${LAPACK_armpl_LIB}_mp") + endif() + + if(NOT LAPACK_LIBRARIES) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "${LAPACK_armpl_LIB}" + "" + "" + "" + "${BLAS_LIBRARIES}" + ) + endif() + endif() + + # FLAME's blis library? (https://github.com/flame/blis) + if(BLA_VENDOR STREQUAL "FLAME" OR BLA_VENDOR STREQUAL "All") + if(NOT LAPACK_LIBRARIES) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "flame" + "" + "" + "" + "${BLAS_LIBRARIES}" + ) + endif() + endif() + + # BLAS in acml library? + if(BLA_VENDOR MATCHES "ACML" OR BLA_VENDOR STREQUAL "All") + if(BLAS_LIBRARIES MATCHES ".+acml.+") + set(LAPACK_LIBRARIES ${BLAS_LIBRARIES}) + endif() + endif() + + # Apple LAPACK library? + if(BLA_VENDOR STREQUAL "Apple" OR BLA_VENDOR STREQUAL "All") + if(NOT LAPACK_LIBRARIES) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "Accelerate" + "" + "" + "" + "${BLAS_LIBRARIES}" + ) + endif() + endif() + + # Apple NAS (vecLib) library? + if(BLA_VENDOR STREQUAL "NAS" OR BLA_VENDOR STREQUAL "All") + if(NOT LAPACK_LIBRARIES) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "vecLib" + "" + "" + "" + "${BLAS_LIBRARIES}" + ) + endif() + endif() + + # Generic LAPACK library? + if(BLA_VENDOR STREQUAL "Generic" OR + BLA_VENDOR STREQUAL "ATLAS" OR + BLA_VENDOR STREQUAL "All") + if(NOT LAPACK_LIBRARIES) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "lapack" + "" + "" + "" + "${BLAS_LIBRARIES}" + ) + endif() + if(NOT LAPACK_LIBRARIES AND NOT WIN32) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "lapack;m;gfortran" + "" + "" + "" + "${BLAS_LIBRARIES}" + ) + endif() + endif() +else() + message(STATUS "LAPACK requires BLAS") +endif() + +if(BLA_F95) + if(LAPACK95_LIBRARIES) + set(LAPACK95_FOUND TRUE) + else() + set(LAPACK95_FOUND FALSE) + endif() + if(NOT LAPACK_FIND_QUIETLY) + if(LAPACK95_FOUND) + message(STATUS "A library with LAPACK95 API found.") + else() + if(LAPACK_FIND_REQUIRED) + message(FATAL_ERROR + "A required library with LAPACK95 API not found. Please specify library location." + ) + else() + message(STATUS + "A library with LAPACK95 API not found. Please specify library location." + ) + endif() + endif() + endif() + set(LAPACK_FOUND "${LAPACK95_FOUND}") + set(LAPACK_LIBRARIES "${LAPACK95_LIBRARIES}") +else() + if(LAPACK_LIBRARIES) + set(LAPACK_FOUND TRUE) + else() + set(LAPACK_FOUND FALSE) + endif() + + if(NOT LAPACK_FIND_QUIETLY) + if(LAPACK_FOUND) + message(STATUS "A library with LAPACK API found.") + else() + if(LAPACK_FIND_REQUIRED) + message(FATAL_ERROR + "A required library with LAPACK API not found. Please specify library location." + ) + else() + message(STATUS + "A library with LAPACK API not found. Please specify library location." + ) + endif() + endif() + endif() +endif() + +# On compilers that implicitly link LAPACK (such as ftn, cc, and CC on Cray HPC machines) +# we used a placeholder for empty LAPACK_LIBRARIES to get through our logic above. +if(LAPACK_LIBRARIES STREQUAL "LAPACK_LIBRARIES-PLACEHOLDER-FOR-EMPTY-LIBRARIES") + set(LAPACK_LIBRARIES "") +endif() + +if(NOT TARGET LAPACK::LAPACK) + add_library(LAPACK::LAPACK INTERFACE IMPORTED) + set(_lapack_libs "${LAPACK_LIBRARIES}") + if(_lapack_libs AND TARGET BLAS::BLAS) + # remove the ${BLAS_LIBRARIES} from the interface and replace it + # with the BLAS::BLAS target + list(REMOVE_ITEM _lapack_libs "${BLAS_LIBRARIES}") + endif() + + if(_lapack_libs) + set_target_properties(LAPACK::LAPACK PROPERTIES + INTERFACE_LINK_LIBRARIES "${_lapack_libs}" + ) + endif() + unset(_lapack_libs) +endif() + +cmake_pop_check_state() diff --git a/vcpkg/ports/lapack-reference/portfile.cmake b/vcpkg/ports/lapack-reference/portfile.cmake new file mode 100644 index 0000000..1165585 --- /dev/null +++ b/vcpkg/ports/lapack-reference/portfile.cmake @@ -0,0 +1,143 @@ +#TODO: Features to add: +# USE_XBLAS??? extended precision blas. needs xblas +# LAPACKE should be its own PORT +# USE_OPTIMIZED_LAPACK (Probably not what we want. Does a find_package(LAPACK): probably for LAPACKE only builds _> own port?) +# LAPACKE Builds LAPACKE +# LAPACKE_WITH_TMG Build LAPACKE with tmglib routines +if(EXISTS "${CURRENT_INSTALLED_DIR}/share/clapack/copyright") + message(FATAL_ERROR "Can't build ${PORT} if clapack is installed. Please remove clapack:${TARGET_TRIPLET}, and try to install ${PORT}:${TARGET_TRIPLET} again.") +endif() + +include(vcpkg_find_fortran) +SET(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) + +set(lapack_ver 3.8.0) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO "Reference-LAPACK/lapack" + REF "v${lapack_ver}" + SHA512 17786cb7306fccdc9b4a242de7f64fc261ebe6a10b6ec55f519deb4cb673cb137e8742aa5698fd2dc52f1cd56d3bd116af3f593a01dcf6770c4dcc86c50b2a7f + HEAD_REF master +) + +if(NOT VCPKG_TARGET_IS_WINDOWS) + set(ENV{FFLAGS} "$ENV{FFLAGS} -fPIC") +endif() + +set(CBLAS OFF) +if("cblas" IN_LIST FEATURES) + set(CBLAS ON) + if("noblas" IN_LIST FEATURES) + message(FATAL_ERROR "Cannot built feature 'cblas' together with feature 'noblas'. cblas requires blas!") + endif() +endif() + +set(USE_OPTIMIZED_BLAS OFF) +if("noblas" IN_LIST FEATURES) + set(USE_OPTIMIZED_BLAS ON) + set(pcfile "${CURRENT_INSTALLED_DIR}/lib/pkgconfig/openblas.pc") + if(EXISTS "${pcfile}") + file(CREATE_LINK "${pcfile}" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/blas.pc" COPY_ON_ERROR) + endif() + set(pcfile "${CURRENT_INSTALLED_DIR}/debug/lib/pkgconfig/openblas.pc") + if(EXISTS "${pcfile}") + file(CREATE_LINK "${pcfile}" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/blas.pc" COPY_ON_ERROR) + endif() +endif() + +set(VCPKG_CRT_LINKAGE_BACKUP ${VCPKG_CRT_LINKAGE}) +vcpkg_find_fortran(FORTRAN_CMAKE) +if(VCPKG_USE_INTERNAL_Fortran) + if(VCPKG_CRT_LINKAGE_BACKUP STREQUAL static) + # If openblas has been built with static crt linkage we cannot use it with gfortran! + set(USE_OPTIMIZED_BLAS OFF) + #Cannot use openblas from vcpkg if we are building with gfortran here. + if("noblas" IN_LIST FEATURES) + message(FATAL_ERROR "Feature 'noblas' cannot be used without supplying an external fortran compiler") + endif() + endif() +else() + set(USE_OPTIMIZED_BLAS ON) +endif() +vcpkg_configure_cmake( + PREFER_NINJA + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + "-DUSE_OPTIMIZED_BLAS=${USE_OPTIMIZED_BLAS}" + "-DCBLAS=${CBLAS}" + ${FORTRAN_CMAKE} + ) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/lapack-${lapack_ver}) #Should the target path be lapack and not lapack-reference? + +set(pcfile "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/lapack.pc") +if(EXISTS "${pcfile}") + file(READ "${pcfile}" _contents) + set(_contents "prefix=${CURRENT_INSTALLED_DIR}\n${_contents}") + file(WRITE "${pcfile}" "${_contents}") +endif() +set(pcfile "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/lapack.pc") +if(EXISTS "${pcfile}") + file(READ "${pcfile}" _contents) + set(_contents "prefix=${CURRENT_INSTALLED_DIR}/debug\n${_contents}") + file(WRITE "${pcfile}" "${_contents}") +endif() +if(NOT USE_OPTIMIZED_BLAS) + set(pcfile "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/blas.pc") + if(EXISTS "${pcfile}") + file(READ "${pcfile}" _contents) + set(_contents "prefix=${CURRENT_INSTALLED_DIR}\n${_contents}") + file(WRITE "${pcfile}" "${_contents}") + endif() + set(pcfile "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/blas.pc") + if(EXISTS "${pcfile}") + file(READ "${pcfile}" _contents) + set(_contents "prefix=${CURRENT_INSTALLED_DIR}/debug\n${_contents}") + file(WRITE "${pcfile}" "${_contents}") + endif() +endif() +if("cblas" IN_LIST FEATURES) + set(pcfile "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/cblas.pc") + if(EXISTS "${pcfile}") + file(READ "${pcfile}" _contents) + set(_contents "prefix=${CURRENT_INSTALLED_DIR}\n${_contents}") + file(WRITE "${pcfile}" "${_contents}") + endif() + set(pcfile "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/cblas.pc") + if(EXISTS "${pcfile}") + file(READ "${pcfile}" _contents) + set(_contents "prefix=${CURRENT_INSTALLED_DIR}/debug\n${_contents}") + file(WRITE "${pcfile}" "${_contents}") + endif() +endif() +vcpkg_fixup_pkgconfig() + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + +# remove debug includes +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_TARGET_IS_WINDOWS) + if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/liblapack.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/liblapack.lib" "${CURRENT_PACKAGES_DIR}/lib/lapack.lib") + endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/liblapack.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/liblapack.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/lapack.lib") + endif() + if(NOT USE_OPTIMIZED_BLAS) + if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/libblas.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/libblas.lib" "${CURRENT_PACKAGES_DIR}/lib/blas.lib") + endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/libblas.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/libblas.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/blas.lib") + endif() + endif() +endif() + +if(NOT VCPKG_TARGET_IS_WINDOWS) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/lapack) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindLAPACK.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/lapack) +endif() diff --git a/vcpkg/ports/lapack-reference/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/lapack-reference/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..b3a7128 --- /dev/null +++ b/vcpkg/ports/lapack-reference/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,11 @@ +message(STATUS "Using VCPKG FindLAPACK from package 'lapack-reference'") +set(LAPACK_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +list(REMOVE_ITEM ARGS "NO_MODULE") +list(REMOVE_ITEM ARGS "CONFIG") +list(REMOVE_ITEM ARGS "MODULE") + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${LAPACK_PREV_MODULE_PATH}) diff --git a/vcpkg/ports/lapack/CMakeLists.txt b/vcpkg/ports/lapack/CMakeLists.txt new file mode 100644 index 0000000..07b2818 --- /dev/null +++ b/vcpkg/ports/lapack/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required(VERSION 3.17) + +project(Find_LAPACK_external) +find_package(LAPACK REQUIRED) +#TODO make sure that the found LAPACK is outside VCPKG \ No newline at end of file diff --git a/vcpkg/ports/lapack/CONTROL b/vcpkg/ports/lapack/CONTROL new file mode 100644 index 0000000..aad8e3c --- /dev/null +++ b/vcpkg/ports/lapack/CONTROL @@ -0,0 +1,4 @@ +Source: lapack +Version: 3 +Description: Metapackage for packages which provide LAPACK +Build-Depends: clapack(arm&windows), lapack-reference(!arm|!windows) diff --git a/vcpkg/ports/lapack/portfile.cmake b/vcpkg/ports/lapack/portfile.cmake new file mode 100644 index 0000000..2a59fa7 --- /dev/null +++ b/vcpkg/ports/lapack/portfile.cmake @@ -0,0 +1,5 @@ +SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +# Make sure LAPACK can be found +vcpkg_configure_cmake(SOURCE_PATH ${CURRENT_PORT_DIR} + OPTIONS -DCMAKE_PREFIX_PATH="${CURRENT_PACKAGES_DIR}") diff --git a/vcpkg/ports/lastools/CONTROL b/vcpkg/ports/lastools/CONTROL new file mode 100644 index 0000000..dbeb69f --- /dev/null +++ b/vcpkg/ports/lastools/CONTROL @@ -0,0 +1,5 @@ +Source: lastools +Version: 2020-05-09 +Homepage: https://github.com/LAStools/LAStools +Description: LAStools: award-winning software for efficient LiDAR processing (with LASzip) +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/lastools/fix_install_paths_lastools.patch b/vcpkg/ports/lastools/fix_install_paths_lastools.patch new file mode 100644 index 0000000..10bb340 --- /dev/null +++ b/vcpkg/ports/lastools/fix_install_paths_lastools.patch @@ -0,0 +1,27 @@ +diff --git a/LASlib/src/CMakeLists.txt b/LASlib/src/CMakeLists.txt +index 1b170bf..b5c40cb 100644 +--- a/LASlib/src/CMakeLists.txt ++++ b/LASlib/src/CMakeLists.txt +@@ -99,17 +99,8 @@ if(MSVC) + ) + endif() + ++install(TARGETS LASlib EXPORT LASlib-targets ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + install(FILES ${LAS_INCLUDES} DESTINATION include/LASlib) +- +-if (MSVC) +- foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} ) +- install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OUTPUTCONFIG} DESTINATION lib/LASlib) +- endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES ) +-else() +- install(TARGETS LASlib EXPORT laslib-targets +- ARCHIVE DESTINATION lib/LASlib +- LIBRARY DESTINATION lib/LASlib +- RUNTIME DESTINATION lib/LASlib) +- install(EXPORT laslib-targets DESTINATION lib/cmake/LASlib) +- install(FILES ${CMAKE_SOURCE_DIR}/LASlib/src/laslib-config.cmake DESTINATION lib/cmake/LASlib) +-endif(MSVC) ++install(EXPORT LASlib-targets DESTINATION share/lastools/LASlib) ++install(FILES ${CMAKE_SOURCE_DIR}/LASlib/src/laslib-config.cmake DESTINATION share/lastools/LASlib) +\ No newline at end of file diff --git a/vcpkg/ports/lastools/portfile.cmake b/vcpkg/ports/lastools/portfile.cmake new file mode 100644 index 0000000..c3b4eb2 --- /dev/null +++ b/vcpkg/ports/lastools/portfile.cmake @@ -0,0 +1,35 @@ +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} doesn't currently support UWP.") +endif() + +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO LAStools/LAStools + REF 7c444a4bbae16fe43c676824a26419bb740a6ab8 + SHA512 4503b033a5319caee5570f25a05009c0d05a8c61a43ed78317899faaeba82fbc1f9a8c8433772bb36547c74e850a2e68d20a16f6f22b12b3004da7e1aa2f334b + HEAD_REF master + PATCHES + "fix_install_paths_lastools.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) + diff --git a/vcpkg/ports/laszip/CONTROL b/vcpkg/ports/laszip/CONTROL new file mode 100644 index 0000000..91d94fd --- /dev/null +++ b/vcpkg/ports/laszip/CONTROL @@ -0,0 +1,3 @@ +Source: laszip +Version: 3.4.3 +Description: LASzip - free and lossless LiDAR compression diff --git a/vcpkg/ports/laszip/portfile.cmake b/vcpkg/ports/laszip/portfile.cmake new file mode 100644 index 0000000..7d9c07c --- /dev/null +++ b/vcpkg/ports/laszip/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO LASzip/LASzip + REF 1ab671e42ff1f086e29d5b7e300a5026e7b8d69b # 3.4.3 + SHA512 7ec20d6999b16e6a74a64d1dc3e9f1b1b4510acd306d30ccae34a543ca0dc52e1d1d989279fafdda321616ba1e0ceb59a093d8c61ba5a586b760efa0d00a0184 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LASZIP_BUILD_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DLASZIP_BUILD_STATIC=${LASZIP_BUILD_STATIC} +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/laszip RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +# Remove laszip_api3 dll since it doesn't export functions properly during build. +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/laszip_api3.dll) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/laszip_api3.dll) diff --git a/vcpkg/ports/lazy-importer/CONTROL b/vcpkg/ports/lazy-importer/CONTROL new file mode 100644 index 0000000..c46a768 --- /dev/null +++ b/vcpkg/ports/lazy-importer/CONTROL @@ -0,0 +1,4 @@ +Source: lazy-importer +Version: 2019-08-10 +Description: Library for importing functions from dlls in a hidden, reverse engineer unfriendly way +Homepage: https://github.com/JustasMasiulis/lazy_importer diff --git a/vcpkg/ports/lazy-importer/portfile.cmake b/vcpkg/ports/lazy-importer/portfile.cmake new file mode 100644 index 0000000..076bb7c --- /dev/null +++ b/vcpkg/ports/lazy-importer/portfile.cmake @@ -0,0 +1,16 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO JustasMasiulis/lazy_importer + REF 88186bfce98845eba9050f7597332754f621c0fc + SHA512 04789501ea9c9cf600326b3f8292c441f54d0915452eb29b063fe0a8d56a31157cf338a4ec44aa658e397d754b6593ece51af2736d5980e72d67359a1abc2625 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/include/lazy_importer.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/lcm/CONTROL b/vcpkg/ports/lcm/CONTROL new file mode 100644 index 0000000..1eb187e --- /dev/null +++ b/vcpkg/ports/lcm/CONTROL @@ -0,0 +1,6 @@ +Source: lcm +Version: 1.4.0 +Build-Depends: glib +Homepage: https://github.com/lcm-proj/lcm +Description: Lightweight Communications and Marshalling (LCM) + LCM is a set of libraries and tools for message passing and data marshalling, targeted at real-time systems where high-bandwidth and low latency are critical. It provides a publish/subscribe message passing model and automatic marshalling/unmarshalling code generation with bindings for applications in a variety of programming languages. diff --git a/vcpkg/ports/lcm/fix-build-error.patch b/vcpkg/ports/lcm/fix-build-error.patch new file mode 100644 index 0000000..ffca33d --- /dev/null +++ b/vcpkg/ports/lcm/fix-build-error.patch @@ -0,0 +1,32 @@ +diff --git a/lcm/windows/WinPorting.cpp b/lcm/windows/WinPorting.cpp +index e22acd6..b9c7e69 100644 +--- a/lcm/windows/WinPorting.cpp ++++ b/lcm/windows/WinPorting.cpp +@@ -1,8 +1,8 @@ + + #define _WIN32_WINNT 0x0501 +-#include + #include + #include ++#include + + #include "WinPorting.h" + +diff --git a/lcmgen/emit_go.c b/lcmgen/emit_go.c +index c520044..b5be56a 100644 +--- a/lcmgen/emit_go.c ++++ b/lcmgen/emit_go.c +@@ -6,8 +6,13 @@ + #include + #include + #include ++#ifdef WIN32 ++#include ++#else + #include ++#endif + #ifdef WIN32 ++#define F_OK 0 + #define __STDC_FORMAT_MACROS // Enable integer types + #endif + diff --git a/vcpkg/ports/lcm/only-install-one-flavor.patch b/vcpkg/ports/lcm/only-install-one-flavor.patch new file mode 100644 index 0000000..d22b83c --- /dev/null +++ b/vcpkg/ports/lcm/only-install-one-flavor.patch @@ -0,0 +1,19 @@ +diff --git a/lcm/CMakeLists.txt b/lcm/CMakeLists.txt +index a706a85..639ec12 100644 +--- a/lcm/CMakeLists.txt ++++ b/lcm/CMakeLists.txt +@@ -76,8 +76,12 @@ endif() + target_include_directories(lcm-coretypes INTERFACE + $ + ) +- +-install(TARGETS lcm-coretypes lcm-static lcm ++if(BUILD_SHARED_LIBS) ++ set(INSTALL_TARGETS lcm) ++else() ++ set(INSTALL_TARGETS lcm-static) ++endif() ++install(TARGETS lcm-coretypes ${INSTALL_TARGETS} + EXPORT lcmTargets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} diff --git a/vcpkg/ports/lcm/portfile.cmake b/vcpkg/ports/lcm/portfile.cmake new file mode 100644 index 0000000..ef1633d --- /dev/null +++ b/vcpkg/ports/lcm/portfile.cmake @@ -0,0 +1,52 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lcm-proj/lcm + REF v1.4.0 + SHA512 ca036aa2c31911e0bfaeab9665188c97726201267314693a1c333c4efe13ea598b39a55a19bc1d48e65462ac9d1716adfda5af86c645d59c3247192631247cc6 + HEAD_REF master + PATCHES only-install-one-flavor.patch + fix-build-error.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DLCM_ENABLE_JAVA=OFF + -DLCM_ENABLE_LUA=OFF + -DLCM_ENABLE_PYTHON=OFF + -DLCM_ENABLE_TESTS=OFF + -DLCM_INSTALL_M4MACROS=OFF + -DLCM_INSTALL_PKGCONFIG=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/aclocal) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/java) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man) + +file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe) +if(EXES) + file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/lcm) + file(REMOVE ${EXES}) +endif() +file(GLOB DEBUG_EXES ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +if(DEBUG_EXES) + file(REMOVE ${DEBUG_EXES}) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/lcm) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/lcm RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/lcms/CMakeLists.txt b/vcpkg/ports/lcms/CMakeLists.txt new file mode 100644 index 0000000..07e6299 --- /dev/null +++ b/vcpkg/ports/lcms/CMakeLists.txt @@ -0,0 +1,67 @@ +cmake_minimum_required(VERSION 3.5) + +option(CMAKE_VERBOSE_MAKEFILE "Create verbose makefile" OFF) +option(BUILD_SHARED_LIBS "Create lcms as a shared library" ON) + +project(little-cms) + +set(CMAKE_DEBUG_POSTFIX d) + +add_library(lcms + "${CMAKE_CURRENT_LIST_DIR}/src/cmstypes.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsvirt.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmswtpnt.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsxform.c" + "${CMAKE_CURRENT_LIST_DIR}/src/lcms2.def" + "${CMAKE_CURRENT_LIST_DIR}/src/lcms2_internal.h" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsalpha.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmscam02.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmscgats.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmscnvrt.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmserr.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsgamma.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsgmt.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmshalf.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsintrp.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsio0.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsio1.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmslut.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsmd5.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsmtrx.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsnamed.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsopt.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmspack.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmspcs.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsplugin.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmsps2.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmssamp.c" + "${CMAKE_CURRENT_LIST_DIR}/src/cmssm.c" +) + +if(BUILD_SHARED_LIBS) + target_compile_options(lcms PRIVATE -DCMS_DLL_BUILD) + target_compile_options(lcms PUBLIC -DCMS_DLL) +endif() +target_compile_options(lcms PRIVATE -DUNICODE -D_UNICODE) + +target_include_directories(lcms PRIVATE "${CMAKE_CURRENT_LIST_DIR}/include") +set_target_properties(lcms PROPERTIES PUBLIC_HEADER "${CMAKE_CURRENT_LIST_DIR}/include/lcms2.h;${CMAKE_CURRENT_LIST_DIR}/include/lcms2_plugin.h") + +install(TARGETS lcms + EXPORT lcmsConfig + RUNTIME DESTINATION "bin" + LIBRARY DESTINATION "lib" + ARCHIVE DESTINATION "lib" + PUBLIC_HEADER DESTINATION "include" + COMPONENT dev +) + +export(TARGETS lcms + NAMESPACE lcms:: + FILE "share/lcms/lcmsConfig.cmake" +) + +install(EXPORT lcmsConfig + DESTINATION "share/lcms" + NAMESPACE lcms:: +) diff --git a/vcpkg/ports/lcms/CONTROL b/vcpkg/ports/lcms/CONTROL new file mode 100644 index 0000000..135c7c4 --- /dev/null +++ b/vcpkg/ports/lcms/CONTROL @@ -0,0 +1,5 @@ +Source: lcms +Version: 2.9-1 +Build-Depends: +Homepage: https://github.com/mm2/Little-CMS +Description: Little CMS. diff --git a/vcpkg/ports/lcms/portfile.cmake b/vcpkg/ports/lcms/portfile.cmake new file mode 100644 index 0000000..faeafde --- /dev/null +++ b/vcpkg/ports/lcms/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(ADDITIONAL_PATCH "shared.patch") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mm2/Little-CMS + REF lcms2.9 + SHA512 b565ed3714c9beaf13e15b3798abbc6c295443357c8db3299cecd9794620bb1d7c50ad258cf887c7bbf66efacb8d8699a7ee579f8c73598740915caa3044ae70 + HEAD_REF master + PATCHES + remove_library_directive.patch + ${ADDITIONAL_PATCH} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/lcms RENAME copyright) diff --git a/vcpkg/ports/lcms/remove_library_directive.patch b/vcpkg/ports/lcms/remove_library_directive.patch new file mode 100644 index 0000000..29d035d --- /dev/null +++ b/vcpkg/ports/lcms/remove_library_directive.patch @@ -0,0 +1,8 @@ +--- a/src/lcms2.def 2016-07-20 09:46:01.000000000 +0200 ++++ b/src/lcms2.def 2018-06-02 02:11:04.135781600 +0200 +@@ -1,5 +1,3 @@ +-LIBRARY LCMS2.DLL +- + EXPORTS + + _cms15Fixed16toDouble = _cms15Fixed16toDouble diff --git a/vcpkg/ports/lcms/shared.patch b/vcpkg/ports/lcms/shared.patch new file mode 100644 index 0000000..ac54904 --- /dev/null +++ b/vcpkg/ports/lcms/shared.patch @@ -0,0 +1,10 @@ +--- a/include/lcms2.h Wed Jul 20 08:46:01 2016 ++++ b/include/lcms2.h Mon Jan 30 15:01:12 2017 +@@ -212,6 +212,7 @@ + + #endif // CMS_USE_BIG_ENDIAN + ++#define CMS_DLL + + // Calling convention -- this is hardly platform and compiler dependent + #ifdef CMS_IS_WINDOWS_ diff --git a/vcpkg/ports/leaf/CONTROL b/vcpkg/ports/leaf/CONTROL new file mode 100644 index 0000000..e7a7c94 --- /dev/null +++ b/vcpkg/ports/leaf/CONTROL @@ -0,0 +1,3 @@ +Source: leaf +Version: 0.2.2 +Description: Lightweight error augmentation framework \ No newline at end of file diff --git a/vcpkg/ports/leaf/portfile.cmake b/vcpkg/ports/leaf/portfile.cmake new file mode 100644 index 0000000..4d5c129 --- /dev/null +++ b/vcpkg/ports/leaf/portfile.cmake @@ -0,0 +1,21 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zajo/leaf + REF 0.2.2 + SHA512 200a78e33fa919fbf996cfa5715f166e194b87776de79dec4c23d7a60b1f1e1c9db699f3d94d17b52c655e802ea63e1e6539538b180ecaafbfcf106b280b5c1f + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/leaf RENAME copyright) diff --git a/vcpkg/ports/lemon/CONTROL b/vcpkg/ports/lemon/CONTROL new file mode 100644 index 0000000..08b7393 --- /dev/null +++ b/vcpkg/ports/lemon/CONTROL @@ -0,0 +1,4 @@ +Source: lemon +Version: 0 +Description: Deprecated port, use liblemon instead +Build-Depends: liblemon diff --git a/vcpkg/ports/lemon/portfile.cmake b/vcpkg/ports/lemon/portfile.cmake new file mode 100644 index 0000000..f599558 --- /dev/null +++ b/vcpkg/ports/lemon/portfile.cmake @@ -0,0 +1,3 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +message(WARNING "The lemon port is deprecated, use liblemon instead") diff --git a/vcpkg/ports/leptonica/CONTROL b/vcpkg/ports/leptonica/CONTROL new file mode 100644 index 0000000..cb700cb --- /dev/null +++ b/vcpkg/ports/leptonica/CONTROL @@ -0,0 +1,5 @@ +Source: leptonica +Version: 1.78.0-1 +Homepage: https://github.com/DanBloomberg/leptonica +Description: An open source library containing software that is broadly useful for image processing and image analysis applications +Build-Depends: libjpeg-turbo, zlib, libpng, tiff, giflib, libwebp diff --git a/vcpkg/ports/leptonica/find-dependency.patch b/vcpkg/ports/leptonica/find-dependency.patch new file mode 100644 index 0000000..2ed7fbb --- /dev/null +++ b/vcpkg/ports/leptonica/find-dependency.patch @@ -0,0 +1,19 @@ +diff --git a/cmake/templates/LeptonicaConfig.cmake.in b/cmake/templates/LeptonicaConfig.cmake.in +index 4f7527a..c6759d1 100644 +--- a/cmake/templates/LeptonicaConfig.cmake.in ++++ b/cmake/templates/LeptonicaConfig.cmake.in +@@ -20,6 +20,14 @@ + # + # =================================================================================== + ++include(CMakeFindDependencyMacro) ++find_dependency(TIFF) ++find_dependency(ZLIB) ++find_dependency(PNG) ++find_dependency(JPEG) ++find_dependency(GIF) ++find_dependency(WebP) ++ + include(${CMAKE_CURRENT_LIST_DIR}/LeptonicaTargets.cmake) + + # ====================================================== diff --git a/vcpkg/ports/leptonica/fix-cmakelists.patch b/vcpkg/ports/leptonica/fix-cmakelists.patch new file mode 100644 index 0000000..b08a971 --- /dev/null +++ b/vcpkg/ports/leptonica/fix-cmakelists.patch @@ -0,0 +1,12 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 945100a..6daad98 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -14,7 +14,6 @@ if (MSVC) + set_source_files_properties(${src} PROPERTIES LANGUAGE CXX) + endif() + +-string(REPLACE "-O3" "-O2" CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE}) + + add_library (leptonica ${LIBRARY_TYPE} ${src} ${hdr}) + set_target_properties (leptonica PROPERTIES VERSION ${VERSION_PLAIN}) diff --git a/vcpkg/ports/leptonica/fix-find-libwebp.patch b/vcpkg/ports/leptonica/fix-find-libwebp.patch new file mode 100644 index 0000000..636bf65 --- /dev/null +++ b/vcpkg/ports/leptonica/fix-find-libwebp.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index debc232..2aa2d3a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -60,8 +60,7 @@ if(NOT EXISTS ${PROJECT_SOURCE_DIR}/.cppan) + endif() + if(NOT WEBP) + message(STATUS "Looking for WEBP") +- find_path(WEBP_INCLUDE_DIR /webp/decode.h) +- find_library(WEBP_LIBRARY NAMES webp) ++ find_package(WebP CONFIG REQUIRED) + if (WEBP_INCLUDE_DIR AND WEBP_LIBRARY) + set(WEBP 1) + set(WEBP_FOUND TRUE) diff --git a/vcpkg/ports/leptonica/portfile.cmake b/vcpkg/ports/leptonica/portfile.cmake new file mode 100644 index 0000000..fb92146 --- /dev/null +++ b/vcpkg/ports/leptonica/portfile.cmake @@ -0,0 +1,36 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO DanBloomberg/leptonica + REF 87b8219360bca3c9929a5705c3d9c50c42c34bca #1.78.0 + SHA512 b7bfa9437be7e3d9276acacf8f62ccda1cd8f88741ada5106ef0232d4965617be2c5d0b8a6b4462896a1a0b6b44d9ecefd6e6b8d0e50d4fb881bdf5e821703a4 + HEAD_REF master + PATCHES + fix-cmakelists.patch + use-tiff-libraries.patch + find-dependency.patch + fix-find-libwebp.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSTATIC=${STATIC} + -DCMAKE_REQUIRED_INCLUDES=${CURRENT_INSTALLED_DIR}/include # for check_include_file() +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/leptonica-license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/leptonica-license.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/vcpkg/ports/leptonica/use-tiff-libraries.patch b/vcpkg/ports/leptonica/use-tiff-libraries.patch new file mode 100644 index 0000000..4db86ef --- /dev/null +++ b/vcpkg/ports/leptonica/use-tiff-libraries.patch @@ -0,0 +1,13 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 6daad98..5119895 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -48,7 +48,7 @@ if (PNG_LIBRARY) + endif() + if (TIFF_LIBRARY) + target_include_directories (leptonica PUBLIC ${TIFF_INCLUDE_DIR}) +- target_link_libraries (leptonica ${TIFF_LIBRARY}) ++ target_link_libraries (leptonica ${TIFF_LIBRARIES}) + endif() + if (WEBP_FOUND) + target_include_directories (leptonica PUBLIC ${WEBP_INCLUDE_DIRS}) diff --git a/vcpkg/ports/lerc/CONTROL b/vcpkg/ports/lerc/CONTROL new file mode 100644 index 0000000..6be5d0a --- /dev/null +++ b/vcpkg/ports/lerc/CONTROL @@ -0,0 +1,5 @@ +Source: lerc +Version: 2.2 +Port-Version: 1 +Homepage: https://github.com/Esri/lerc +Description: An open-source image or raster format which supports rapid encoding and decoding for any pixel type diff --git a/vcpkg/ports/lerc/create_package.patch b/vcpkg/ports/lerc/create_package.patch new file mode 100644 index 0000000..7b06c11 --- /dev/null +++ b/vcpkg/ports/lerc/create_package.patch @@ -0,0 +1,26 @@ + CMakeLists.txt | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e90fcdd..17c79e8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -17,7 +17,7 @@ add_library(LercLib ${SOURCES}) + target_link_libraries (LercLib) + + install( +- TARGETS LercLib ++ TARGETS LercLib EXPORT LercTargets + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +@@ -28,3 +28,9 @@ install( + FILES "include/Lerc_types.h" "include/Lerc_c_api.h" + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + ) ++ ++install(EXPORT LercTargets ++ FILE lercConfig.cmake ++ NAMESPACE Esri:: ++ DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/lerc" ++) diff --git a/vcpkg/ports/lerc/enable_static_build.patch b/vcpkg/ports/lerc/enable_static_build.patch new file mode 100644 index 0000000..92f0d78 --- /dev/null +++ b/vcpkg/ports/lerc/enable_static_build.patch @@ -0,0 +1,16 @@ + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d22ad11..e90fcdd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,7 +12,7 @@ file(GLOB SOURCES + ) + message(${SOURCES}) + +-add_library(LercLib SHARED ${SOURCES}) ++add_library(LercLib ${SOURCES}) + + target_link_libraries (LercLib) + diff --git a/vcpkg/ports/lerc/install_lib_to_archive_path.patch b/vcpkg/ports/lerc/install_lib_to_archive_path.patch new file mode 100644 index 0000000..3262a7c --- /dev/null +++ b/vcpkg/ports/lerc/install_lib_to_archive_path.patch @@ -0,0 +1,16 @@ + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ececeed..d22ad11 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -20,7 +20,7 @@ install( + TARGETS LercLib + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +- ARCHIVE DESTINATION ${CMAKE_INSTALL_BINDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + ) + diff --git a/vcpkg/ports/lerc/portfile.cmake b/vcpkg/ports/lerc/portfile.cmake new file mode 100644 index 0000000..5b3060f --- /dev/null +++ b/vcpkg/ports/lerc/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Esri/lerc + REF v2.2 + SHA512 5ddf1e8f0c123d3c1329e980021e25e6ff9b79c96588115e5b48ba7637f0b2bf3ebb2ab6ebf94cfbde45ea1521f14405f669e23f0b74d9ae8f9b2cf80a908215 + HEAD_REF master + PATCHES + "install_lib_to_archive_path.patch" + "enable_static_build.patch" + "create_package.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + diff --git a/vcpkg/ports/lest/CONTROL b/vcpkg/ports/lest/CONTROL new file mode 100644 index 0000000..38b0102 --- /dev/null +++ b/vcpkg/ports/lest/CONTROL @@ -0,0 +1,3 @@ +Source: lest +Version: 1.35.1 +Description: A modern, C++11-native, single-file header-only, tiny framework for unit-tests, TDD and BDD (includes C++98 variant) diff --git a/vcpkg/ports/lest/portfile.cmake b/vcpkg/ports/lest/portfile.cmake new file mode 100644 index 0000000..d5948d9 --- /dev/null +++ b/vcpkg/ports/lest/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO martinmoene/lest + REF v1.35.1 + SHA512 06b786cbca37cb4d20737d040176bf34398090d566310b88558b788804d8b832c682f1814f5c68ef11192243dbde5643e73b78be4fb1407b831bcde43adb002c +) + +file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/lest RENAME copyright) diff --git a/vcpkg/ports/leveldb/CONTROL b/vcpkg/ports/leveldb/CONTROL new file mode 100644 index 0000000..1b1302f --- /dev/null +++ b/vcpkg/ports/leveldb/CONTROL @@ -0,0 +1,5 @@ +Source: leveldb +Version: 1.22-1 +Homepage: https://github.com/bitcoin-core/leveldb +Description: LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values. +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/leveldb/fix_config.patch b/vcpkg/ports/leveldb/fix_config.patch new file mode 100644 index 0000000..c5a8329 --- /dev/null +++ b/vcpkg/ports/leveldb/fix_config.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1409c06..98b87dc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -437,6 +437,12 @@ if(LEVELDB_INSTALL) + "${PROJECT_BINARY_DIR}/leveldbConfigVersion.cmake" + COMPATIBILITY SameMajorVersion + ) ++ configure_package_config_file(${PROJECT_SOURCE_DIR}/cmake/leveldbConfig.cmake.in ++ leveldbConfig.cmake ++ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/leveldb ++ NO_CHECK_REQUIRED_COMPONENTS_MACRO ++ PATH_VARS CMAKE_INSTALL_INCLUDEDIR ++ ) + install( + EXPORT leveldbTargets + NAMESPACE leveldb:: +@@ -444,7 +450,7 @@ if(LEVELDB_INSTALL) + ) + install( + FILES +- "${PROJECT_SOURCE_DIR}/cmake/leveldbConfig.cmake" ++ "${PROJECT_BINARY_DIR}/leveldbConfig.cmake" + "${PROJECT_BINARY_DIR}/leveldbConfigVersion.cmake" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/leveldb" + ) diff --git a/vcpkg/ports/leveldb/leveldbConfig.cmake.in b/vcpkg/ports/leveldb/leveldbConfig.cmake.in new file mode 100644 index 0000000..560e743 --- /dev/null +++ b/vcpkg/ports/leveldb/leveldbConfig.cmake.in @@ -0,0 +1,6 @@ +@PACKAGE_INIT@ +include(CMakeFindDependencyMacro) + +set_and_check(leveldb_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@") + +include("${CMAKE_CURRENT_LIST_DIR}/leveldbTargets.cmake") diff --git a/vcpkg/ports/leveldb/portfile.cmake b/vcpkg/ports/leveldb/portfile.cmake new file mode 100644 index 0000000..a40ba6a --- /dev/null +++ b/vcpkg/ports/leveldb/portfile.cmake @@ -0,0 +1,35 @@ +include(vcpkg_common_functions) + +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "leveldb doesn't supports UWP") +endif() + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO "google/leveldb" + REF 1.22 + SHA512 f9bbf5f466e7f707b94e19261762319ea9f65d41911690e84f59098551e2e69beccf756a414d705ade74ee96fd979bdb8b94c171c6f2cc83873cbd4a9380dbab + HEAD_REF master + PATCHES + fix_config.patch +) + +file(COPY ${CURRENT_PORT_DIR}/leveldbConfig.cmake.in DESTINATION ${SOURCE_PATH}/cmake) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS_DEBUG -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/leveldb) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/leveldb RENAME copyright) diff --git a/vcpkg/ports/levmar/add-install.patch b/vcpkg/ports/levmar/add-install.patch new file mode 100644 index 0000000..d256c77 --- /dev/null +++ b/vcpkg/ports/levmar/add-install.patch @@ -0,0 +1,11 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cc6789f..d2757f9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -95,3 +95,6 @@ IF(BUILD_DEMO) + ENDIF(BUILD_DEMO) + + #SUBDIRS(matlab) ++ ++install(TARGETS levmar LIBRARY DESTINATION "lib/") ++install(FILES "${CMAKE_SOURCE_DIR}/levmar.h" DESTINATION "include/levmar/") diff --git a/vcpkg/ports/levmar/portfile.cmake b/vcpkg/ports/levmar/portfile.cmake new file mode 100644 index 0000000..020d425 --- /dev/null +++ b/vcpkg/ports/levmar/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_fail_port_install(MESSAGE "levmar currently only checked on Windows" + ON_TARGET "OSX" "Linux" "UWP" +) + +vcpkg_download_distfile(ARCHIVE + URLS "http://users.ics.forth.gr/~lourakis/levmar/levmar-2.6.tgz" + FILENAME "levmar-2.6.tgz" + SHA512 5b4c64b63be9b29d6ad2df435af86cd2c2e3216313378561a670ac6a392a51bbf1951e96c6b1afb77c570f23dd8e194017808e46929fec2d8d9a7fe6cf37022b +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES add-install.patch # patch just adding the install commands to original CMakeLists.txt +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DHAVE_LAPACK=OFF + -DHAVE_PLASMA=OFF + -DBUILD_DEMO=OFF +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# Handle duplicated debug includes +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/vcpkg/ports/levmar/vcpkg.json b/vcpkg/ports/levmar/vcpkg.json new file mode 100644 index 0000000..99c22de --- /dev/null +++ b/vcpkg/ports/levmar/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "levmar", + "version-string": "2.6", + "description": "Levenberg-Marquardt nonlinear least squares optimization algorithm", + "homepage": "http://users.ics.forth.gr/~lourakis/levmar/", + "supports": "!(uwp | osx | linux)" +} diff --git a/vcpkg/ports/libaaplus/CMakeLists.txt b/vcpkg/ports/libaaplus/CMakeLists.txt new file mode 100644 index 0000000..fa8f60f --- /dev/null +++ b/vcpkg/ports/libaaplus/CMakeLists.txt @@ -0,0 +1,69 @@ +PROJECT (AstronomicalAlgorithms) + +cmake_minimum_required(VERSION 3.11) +cmake_policy(VERSION 3.11) + +project(libaaplus LANGUAGES CXX) + +set(CMAKE_CXX_STANDARD 14) + +option(BUILD_TOOLS "Build libaaplus tools" OFF) + +file(GLOB LIBS_SRC RELATIVE ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_LIST_DIR}/*.cpp) + +list(REMOVE_ITEM ${LIBS_SRC} AATest.cpp) + +file(GLOB PUBLIC_HEADERS RELATIVE ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_CURRENT_LIST_DIR}/*.h) + +set(TEST_SRCS + AATest.cpp +) + +add_library(libaaplus + ${LIBS_SRC} +) + +if (MSVC AND BUILD_SHARED_LIBS) +target_compile_definitions(libaaplus + PRIVATE + -DAAPLUS_EXT_CLASS\=__declspec\(dllexport\) +) +endif (MSVC AND BUILD_SHARED_LIBS) + +install( + TARGETS libaaplus + EXPORT libaaplus + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) + +# Headers makes relative includes so directory structure must be kept +foreach(HEADER ${PUBLIC_HEADERS}) + get_filename_component(HEADER_DIR ${HEADER} DIRECTORY) + install( + FILES ${HEADER} + DESTINATION include/aaplus/${HEADER_DIR} + ) +endforeach() + + +if (BUILD_TOOLS) + add_executable(aatest AATest.cpp) + target_link_libraries(aatest PRIVATE libaaplus) + if (BUILD_SHARED_LIBS AND MSVC) + target_compile_definitions(aatest + PUBLIC + -DAAPLUS_EXT_CLASS\=__declspec\(dllimport\) + ) + endif (BUILD_SHARED_LIBS AND MSVC) + + install(TARGETS aatest RUNTIME DESTINATION tools/aaplus) +endif() + +install( + EXPORT libaaplus + DESTINATION share/libaaplus + FILE libaaplusConfig.cmake + NAMESPACE libaaplus:: +) diff --git a/vcpkg/ports/libaaplus/CONTROL b/vcpkg/ports/libaaplus/CONTROL new file mode 100644 index 0000000..2d14f7e --- /dev/null +++ b/vcpkg/ports/libaaplus/CONTROL @@ -0,0 +1,7 @@ +Source: libaaplus +Version: 2.12-1 +Description: libaaplus is an astronomical computations library by naughter software +Homepage: http://www.naughter.com/aa.html + +Feature: tools +Description: Build libaaplus tools \ No newline at end of file diff --git a/vcpkg/ports/libaaplus/portfile.cmake b/vcpkg/ports/libaaplus/portfile.cmake new file mode 100644 index 0000000..358fdab --- /dev/null +++ b/vcpkg/ports/libaaplus/portfile.cmake @@ -0,0 +1,36 @@ +set(VERSION 2.12) + +vcpkg_download_distfile( + ARCHIVE_FILE + URLS "http://www.naughter.com/download/aaplus_v${VERSION}.zip" + FILENAME "aaplus_v${VERSION}.zip" + SHA512 ec3a3d1346637fbed3ec5093ded821c6d80950a6432378d9826ed842571d8670cd5d2a1c9ff58a18f308e18669d786f72d24961e26bd8e070ee35674688a39e7 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE_FILE} + REF ${VERSION} + NO_REMOVE_ONE_LEVEL +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tools BUILD_TOOLS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/libaaplus) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/AA+.htm DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libaiff/CMakeLists.txt b/vcpkg/ports/libaiff/CMakeLists.txt new file mode 100644 index 0000000..db531b5 --- /dev/null +++ b/vcpkg/ports/libaiff/CMakeLists.txt @@ -0,0 +1,28 @@ +cmake_minimum_required (VERSION 3.9) +project (libaiff) +set(SRC + iff.c aifx.c lpcm.c g711.c + float32.c libaiff.c + extended.c pascal.c +) + +if(MSVC) + add_compile_options(/W4 -D_CRT_SECURE_NO_WARNINGS -DHAVE_INTTYPES_H -DHAVE_STDINT_H -DHAVE_STRING_H -DHAVE_STDLIB_H) +endif() + +include_directories(.) + +add_library(libaiff ${SRC}) + + +install( + TARGETS libaiff + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES libaiff/libaiff.h libaiff/config.h libaiff/endian.h DESTINATION include/libaiff) +endif() diff --git a/vcpkg/ports/libaiff/CONTROL b/vcpkg/ports/libaiff/CONTROL new file mode 100644 index 0000000..889511a --- /dev/null +++ b/vcpkg/ports/libaiff/CONTROL @@ -0,0 +1,4 @@ +Source: libaiff +Version: 5.0-6 +Homepage: https://sourceforge.net/projects/aifftools +Description: LibAiff is an open-source library, providing C applications transparent read & write operations for Audio Interchange File Format (AIFF) files, with the goal of supporting all of its features diff --git a/vcpkg/ports/libaiff/allow_utf_16_filename.patch b/vcpkg/ports/libaiff/allow_utf_16_filename.patch new file mode 100644 index 0000000..773b492 --- /dev/null +++ b/vcpkg/ports/libaiff/allow_utf_16_filename.patch @@ -0,0 +1,214 @@ +diff --git a/libaiff.c b/libaiff.c +index d0ad40d..e266802 100644 +--- a/libaiff.c ++++ b/libaiff.c +@@ -44,6 +44,8 @@ static struct decoder* decoders[] = { + + static AIFF_Ref AIFF_ReadOpen (const char *, int); + static AIFF_Ref AIFF_WriteOpen (const char *, int); ++static AIFF_Ref AIFF_ReadOpenW (const wchar_t*, int); ++static AIFF_Ref AIFF_WriteOpenW (const wchar_t*, int); + static void AIFF_ReadClose (AIFF_Ref); + static int AIFF_WriteClose (AIFF_Ref); + static void* InitBuffer (AIFF_Ref, size_t); +@@ -53,6 +55,21 @@ static int Prepare (AIFF_Ref); + static void Unprepare (AIFF_Ref); + static struct decoder* FindDecoder (IFFType); + ++#ifdef _WIN32 ++AIFF_Ref ++AIFF_OpenFileW(const wchar_t *file, int flags) ++{ ++ AIFF_Ref ref = NULL; ++ ++ if (flags & F_RDONLY) { ++ ref = AIFF_ReadOpenW(file, flags); ++ } else if (flags & F_WRONLY) { ++ ref = AIFF_WriteOpenW(file, flags); ++ } ++ ++ return ref; ++} ++#endif + AIFF_Ref + AIFF_OpenFile(const char *file, int flags) + { +@@ -86,6 +103,76 @@ AIFF_CloseFile(AIFF_Ref ref) + return r; + } + ++#ifdef _WIN32 ++static AIFF_Ref ++AIFF_ReadOpenW(const wchar_t *file, int flags) ++{ ++ AIFF_Ref r; ++ IFFHeader hdr; ++ ++ r = malloc(kAIFFRefSize); ++ if (!r) { ++ return NULL; ++ } ++ r->fd = _wfopen(file, L"rb"); ++ if (r->fd == NULL) { ++ free(r); ++ return NULL; ++ } ++ r->flags = F_RDONLY | flags; ++ if (fread(&hdr, 1, 4, r->fd) < 4) { ++ fclose(r->fd); ++ free(r); ++ return NULL; ++ } ++ switch (hdr.hid) { ++ case AIFF_TYPE_IFF: ++ /* Continue reading the IFF header */ ++ if (fread(&(hdr.len), 1, 8, r->fd) < 8) { ++ fclose(r->fd); ++ free(r); ++ return NULL; ++ } ++ if (hdr.len == 0) { ++ fclose(r->fd); ++ free(r); ++ return NULL; ++ } ++ /* ++ * Check the format type (AIFF or AIFC) ++ */ ++ r->format = hdr.fid; ++ switch (r->format) { ++ case AIFF_TYPE_AIFF: ++ case AIFF_TYPE_AIFC: ++ break; ++ default: ++ fclose(r->fd); ++ free(r); ++ return NULL; ++ } ++ ++ if (init_aifx(r) < 1) { ++ fclose(r->fd); ++ free(r); ++ return NULL; ++ } ++ break; ++ default: ++ fclose(r->fd); ++ free(r); ++ return NULL; ++ } ++ ++ r->stat = 0; ++ r->buffer = NULL; ++ r->buflen = 0; ++ ++ return r; ++} ++ ++#endif ++ + static AIFF_Ref + AIFF_ReadOpen(const char *file, int flags) + { +@@ -450,6 +537,89 @@ AIFF_ReadClose(AIFF_Ref r) + return; + } + ++#ifdef WIN32 ++static AIFF_Ref ++AIFF_WriteOpenW(const wchar_t *file, int flags) ++{ ++ AIFF_Ref w; ++ IFFHeader hdr; ++ ASSERT(sizeof(IFFHeader) == 12); ++ ++ w = malloc(kAIFFRefSize); ++ if (!w) { ++err0: ++ return NULL; ++ } ++ ++ /* ++ * Simultaneous open for reading & writing ++ */ ++ w->fd = _wfopen(file, L"w+b"); ++ if (w->fd == NULL) { ++err1: ++ free(w); ++ goto err0; ++ } ++ hdr.hid = ARRANGE_BE32(AIFF_FORM); ++ w->len = 4; ++ hdr.len = ARRANGE_BE32(4); ++ if (flags & F_AIFC) ++ hdr.fid = ARRANGE_BE32(AIFF_AIFC); ++ else ++ hdr.fid = ARRANGE_BE32(AIFF_AIFF); ++ ++ if (fwrite(&hdr, 1, 12, w->fd) < 12) { ++err2: ++ fclose(w->fd); ++ goto err1; ++ } ++ w->stat = 0; ++ w->segmentSize = 0; ++ w->buffer = NULL; ++ w->buflen = 0; ++ w->tics = 0; ++ ++ /* ++ * If writing AIFF-C, write the required FVER chunk ++ */ ++ if (flags & F_AIFC) { ++ IFFChunk chk; ++ uint32_t vers; ++ ASSERT(sizeof(IFFChunk) == 8); ++ ++ chk.id = ARRANGE_BE32(AIFF_FVER); ++ chk.len = ARRANGE_BE32(4); ++ vers = ARRANGE_BE32(AIFC_STD_DRAFT_082691); ++ ++ if (fwrite(&chk, 1, 8, w->fd) < 8 || ++ fwrite(&vers, 1, 4, w->fd) < 4) { ++ goto err2; ++ } ++ ++ w->len += 12; ++ ++ /* ++ * If no endianness specified for AIFF-C, ++ * default to big endian ++ */ ++ if (!(flags & (LPCM_LTE_ENDIAN | LPCM_BIG_ENDIAN))) { ++ flags |= LPCM_BIG_ENDIAN; ++ } ++ } else { ++ /* ++ * If writing regular AIFF, make sure we ++ * write big-endian data ++ */ ++ flags &= ~LPCM_LTE_ENDIAN; ++ flags |= LPCM_BIG_ENDIAN; ++ } ++ ++ w->flags = F_WRONLY | flags; ++ ++ return w; ++} ++#endif ++ + static AIFF_Ref + AIFF_WriteOpen(const char *file, int flags) + { +diff --git a/libaiff/libaiff.h b/libaiff/libaiff.h +index 56fc77f..e1940a5 100644 +--- a/libaiff/libaiff.h ++++ b/libaiff/libaiff.h +@@ -165,6 +165,7 @@ typedef struct s_Instrument Instrument ; + + /* == Function prototypes == */ + AIFF_Ref AIFF_OpenFile(const char *, int) ; ++AIFF_Ref AIFF_OpenFileW(const wchar_t *, int) ; + int AIFF_CloseFile(AIFF_Ref) ; + char* AIFF_GetAttribute(AIFF_Ref,IFFType) ; + int AIFF_GetInstrumentData(AIFF_Ref,Instrument*) ; diff --git a/vcpkg/ports/libaiff/buffer_uninitialized.patch b/vcpkg/ports/libaiff/buffer_uninitialized.patch new file mode 100644 index 0000000..d87ab41 --- /dev/null +++ b/vcpkg/ports/libaiff/buffer_uninitialized.patch @@ -0,0 +1,42 @@ +diff --git "a/libaiff.c" "b/libaiff.c" +index e266802..21179f9 100644 +--- "a/libaiff.c" ++++ "b/libaiff.c" +@@ -168,6 +168,9 @@ AIFF_ReadOpenW(const wchar_t *file, int flags) + r->buffer = NULL; + r->buflen = 0; + ++ r->buffer2 = NULL; ++ r->buflen2 = 0; ++ + return r; + } + +@@ -237,6 +240,9 @@ AIFF_ReadOpen(const char *file, int flags) + r->buffer = NULL; + r->buflen = 0; + ++ r->buffer2 = NULL; ++ r->buflen2 = 0; ++ + return r; + } + +@@ -577,6 +583,8 @@ err2: + w->segmentSize = 0; + w->buffer = NULL; + w->buflen = 0; ++ w->buffer2 = NULL; ++ w->buflen2 = 0; + w->tics = 0; + + /* +@@ -659,6 +667,8 @@ err2: + w->segmentSize = 0; + w->buffer = NULL; + w->buflen = 0; ++ w->buffer2 = NULL; ++ w->buflen2 = 0; + w->tics = 0; + + /* diff --git a/vcpkg/ports/libaiff/config.h b/vcpkg/ports/libaiff/config.h new file mode 100644 index 0000000..f7c04ee --- /dev/null +++ b/vcpkg/ports/libaiff/config.h @@ -0,0 +1,12 @@ +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "marcotrillo@gmail.com" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "LibAiff (MSVC)" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "LibAiff (MSVC) $Revision: 1.1 $" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "$Revision: 1.1 $" + diff --git a/vcpkg/ports/libaiff/portfile.cmake b/vcpkg/ports/libaiff/portfile.cmake new file mode 100644 index 0000000..97d8673 --- /dev/null +++ b/vcpkg/ports/libaiff/portfile.cmake @@ -0,0 +1,37 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO aifftools/libaiff + REF LibAiff%205.0 + FILENAME "libaiff-5.0-release.tar.gz" + SHA512 7800f9a3fbd0c5a17b8cc6c9b60181131d159ab5f5fb8e7de54e8f88c151717a988231de664a635e61940267c854a9ce83d58b12e322dcdda3aa8080c7b15f66 + PATCHES + allow_utf_16_filename.patch + buffer_uninitialized.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}/libaiff) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +file(GLOB HEADERS "${CURRENT_PACKAGES_DIR}/include/libaiff/*.h") +foreach(HEADER ${HEADERS}) + file(READ "${HEADER}" _contents) + string(REPLACE "#ifdef HAVE_STDINT_H" "#if 1" _contents "${_contents}") + string(REPLACE "#ifdef HAVE_STRING_H" "#if 1" _contents "${_contents}") + string(REPLACE "#ifdef HAVE_STDLIB_H" "#if 1" _contents "${_contents}") + string(REPLACE "#ifdef HAVE_INTTYPES_H" "#if 1" _contents "${_contents}") + file(WRITE "${HEADER}" "${_contents}") +endforeach() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libarchive/CONTROL b/vcpkg/ports/libarchive/CONTROL new file mode 100644 index 0000000..155b091 --- /dev/null +++ b/vcpkg/ports/libarchive/CONTROL @@ -0,0 +1,35 @@ +Source: libarchive +Version: 3.4.3 +Homepage: https://github.com/libarchive/libarchive +Description: Library for reading and writing streaming archives +Build-Depends: zlib +Default-Features: bzip2, libxml2, lz4, lzma, lzo, openssl, zstd +Supports: !uwp + +Feature: bzip2 +Build-Depends: bzip2 +Description: BZip2 support + +Feature: zstd +Build-Depends: zstd +Description: zstd support + +Feature: libxml2 +Build-Depends: libxml2 +Description: Libxml2 support + +Feature: lz4 +Build-Depends: lz4 +Description: LZ4 support + +Feature: lzma +Build-Depends: liblzma +Description: LZMA support + +Feature: lzo +Build-Depends: lzo +Description: LZO support + +Feature: openssl +Build-Depends: openssl +Description: OpenSSL support diff --git a/vcpkg/ports/libarchive/disable-warnings.patch b/vcpkg/ports/libarchive/disable-warnings.patch new file mode 100644 index 0000000..4559394 --- /dev/null +++ b/vcpkg/ports/libarchive/disable-warnings.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b2634da..d037071 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -155,9 +155,6 @@ IF (MSVC) + ################################################################# + # Set compile flags for debug build. + # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug" +- # Enable level 4 C4062: The enumerate has no associated handler in a switch +- # statement and there is no default that can catch it. +- SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /w14062") + # Enable level 4 C4254: A larger bit field was assigned to a smaller bit + # field. + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /w14254") diff --git a/vcpkg/ports/libarchive/fix-buildsystem.patch b/vcpkg/ports/libarchive/fix-buildsystem.patch new file mode 100644 index 0000000..9ed57f6 --- /dev/null +++ b/vcpkg/ports/libarchive/fix-buildsystem.patch @@ -0,0 +1,163 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b2634da..6a1dc1f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -148,10 +148,6 @@ IF (CMAKE_C_COMPILER_ID MATCHES "^XL$") + SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -qinfo=pro:use") + ENDIF(CMAKE_C_COMPILER_ID MATCHES "^XL$") + IF (MSVC) +- if (ENABLE_WERROR) +- # /WX option is the same as gcc's -Werror option. +- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX") +- endif () + ################################################################# + # Set compile flags for debug build. + # This is added into CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug" +@@ -382,8 +378,6 @@ IF(DEFINED __GNUWIN32PATH AND EXISTS "${__GNUWIN32PATH}") + # Maybe DLL path is "C:/Program Files/GnuWin32/bin". + # The zlib and the bzip2 Setup program have installed programs and DLLs into + # "C:/Program Files/GnuWin32" by default. +- # This is convenience setting for Windows. +- SET(CMAKE_PREFIX_PATH ${__GNUWIN32PATH} $(CMAKE_PREFIX_PATH)) + # + # If you didn't use Setup program or installed into nonstandard path, + # cmake cannot find out your zlib or bzip2 libraries and include files, +@@ -420,14 +414,7 @@ IF(ZLIB_FOUND) + INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) + LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) + IF(WIN32 AND NOT CYGWIN) +- # +- # Test if ZLIB_WINAPI macro is needed to use. +- # +- TRY_MACRO_FOR_LIBRARY( +- "${ZLIB_INCLUDE_DIR}" "${ZLIB_LIBRARIES}" +- RUNS +- "#include \nint main() {uLong f = zlibCompileFlags(); return (f&(1U<<10))?0:-1; }" +- ZLIB_WINAPI) ++ SET(ZLIB_WINAPI OFF) # skip following test, it crashes with weird message box + IF(ZLIB_WINAPI) + ADD_DEFINITIONS(-DZLIB_WINAPI) + ELSE(ZLIB_WINAPI) +@@ -487,8 +474,6 @@ IF(LIBLZMA_FOUND) + SET(HAVE_LIBLZMA 1) + SET(HAVE_LZMA_H 1) + CMAKE_PUSH_CHECK_STATE() +- SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIR}) +- SET(CMAKE_REQUIRED_LIBRARIES ${LIBLZMA_LIBRARIES}) + INCLUDE_DIRECTORIES(${LIBLZMA_INCLUDE_DIRS}) + LIST(APPEND ADDITIONAL_LIBS ${LIBLZMA_LIBRARIES}) + # Test if a macro is needed for the library. +@@ -1356,7 +1341,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(localtime_r HAVE_LOCALTIME_R) + CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT) + CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES) + CHECK_FUNCTION_EXISTS_GLIBC(mbrtowc HAVE_MBRTOWC) +-CHECK_FUNCTION_EXISTS_GLIBC(memmove HAVE_MEMMOVE) ++set(HAVE_MEMMOVE 1) + CHECK_FUNCTION_EXISTS_GLIBC(mkdir HAVE_MKDIR) + CHECK_FUNCTION_EXISTS_GLIBC(mkfifo HAVE_MKFIFO) + CHECK_FUNCTION_EXISTS_GLIBC(mknod HAVE_MKNOD) +@@ -1388,11 +1373,11 @@ CHECK_FUNCTION_EXISTS_GLIBC(utime HAVE_UTIME) + CHECK_FUNCTION_EXISTS_GLIBC(utimes HAVE_UTIMES) + CHECK_FUNCTION_EXISTS_GLIBC(utimensat HAVE_UTIMENSAT) + CHECK_FUNCTION_EXISTS_GLIBC(vfork HAVE_VFORK) +-CHECK_FUNCTION_EXISTS_GLIBC(wcrtomb HAVE_WCRTOMB) +-CHECK_FUNCTION_EXISTS_GLIBC(wcscmp HAVE_WCSCMP) +-CHECK_FUNCTION_EXISTS_GLIBC(wcscpy HAVE_WCSCPY) +-CHECK_FUNCTION_EXISTS_GLIBC(wcslen HAVE_WCSLEN) +-CHECK_FUNCTION_EXISTS_GLIBC(wctomb HAVE_WCTOMB) ++set(HAVE_WCRTOMB 1) ++set(HAVE_WCSCMP 1) ++set(HAVE_WCSCPY 1) ++set(HAVE_WCSLEN 1) ++set(HAVE_WCTOMB 1) + CHECK_FUNCTION_EXISTS_GLIBC(_ctime64_s HAVE__CTIME64_S) + CHECK_FUNCTION_EXISTS_GLIBC(_fseeki64 HAVE__FSEEKI64) + CHECK_FUNCTION_EXISTS_GLIBC(_get_timezone HAVE__GET_TIMEZONE) +@@ -1405,10 +1390,10 @@ CHECK_FUNCTION_EXISTS(cygwin_conv_path HAVE_CYGWIN_CONV_PATH) + CHECK_FUNCTION_EXISTS(fseeko HAVE_FSEEKO) + CHECK_FUNCTION_EXISTS(strerror_r HAVE_STRERROR_R) + CHECK_FUNCTION_EXISTS(strftime HAVE_STRFTIME) +-CHECK_FUNCTION_EXISTS(vprintf HAVE_VPRINTF) +-CHECK_FUNCTION_EXISTS(wmemcmp HAVE_WMEMCMP) +-CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY) +-CHECK_FUNCTION_EXISTS(wmemmove HAVE_WMEMMOVE) ++set(HAVE_VPRINTF 1) ++set(HAVE_WMEMCMP 1) ++set(HAVE_WMEMCPY 1) ++set(HAVE_WMEMMOVE 1) + + CMAKE_POP_CHECK_STATE() # Restore the state of the variables + +@@ -1449,6 +1434,9 @@ CHECK_C_SOURCE_COMPILES( + "#include \nint main() { return major(256); }" + MAJOR_IN_SYSMACROS) + ++CMAKE_PUSH_CHECK_STATE() ++SET(CMAKE_REQUIRED_INCLUDES ${LIBLZMA_INCLUDE_DIR}) ++SET(CMAKE_REQUIRED_LIBRARIES ${LIBLZMA_LIBRARIES}) + IF(ENABLE_LZMA) + CHECK_C_SOURCE_COMPILES( + "#include \n#if LZMA_VERSION < 50020000\n#error unsupported\n#endif\nint main(void){lzma_stream_encoder_mt(0, 0); return 0;}" +@@ -1456,6 +1444,7 @@ CHECK_C_SOURCE_COMPILES( + ELSE() + SET(HAVE_LZMA_STREAM_ENCODER_MT 0) + ENDIF(ENABLE_LZMA) ++CMAKE_POP_CHECK_STATE() + + IF(HAVE_STRERROR_R) + SET(HAVE_DECL_STRERROR_R 1) +@@ -2012,13 +2001,10 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/build/cmake/config.h.in + INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRENT_BINARY_DIR}) + ADD_DEFINITIONS(-DHAVE_CONFIG_H) + +-# Handle generation of the libarchive.pc file for pkg-config +-INCLUDE(CreatePkgConfigFile) +- + # + # Register installation of PDF documents. + # +-IF(WIN32 AND NOT CYGWIN) ++IF(0) + # + # On Windows platform, It's better that we install PDF documents + # on one's computer. +diff --git a/libarchive/CMakeLists.txt b/libarchive/CMakeLists.txt +index 9389bbc..0793d96 100644 +--- a/libarchive/CMakeLists.txt ++++ b/libarchive/CMakeLists.txt +@@ -236,28 +236,22 @@ ELSEIF(ARCHIVE_ACL_SUNOS) + ENDIF() + + # Libarchive is a shared library +-ADD_LIBRARY(archive SHARED ${libarchive_SOURCES} ${include_HEADERS}) ++ADD_LIBRARY(archive ${libarchive_SOURCES} ${include_HEADERS}) + TARGET_INCLUDE_DIRECTORIES(archive PUBLIC .) + TARGET_LINK_LIBRARIES(archive ${ADDITIONAL_LIBS}) +-SET_TARGET_PROPERTIES(archive PROPERTIES SOVERSION ${SOVERSION}) +- +-# archive_static is a static library +-ADD_LIBRARY(archive_static STATIC ${libarchive_SOURCES} ${include_HEADERS}) +-TARGET_LINK_LIBRARIES(archive_static ${ADDITIONAL_LIBS}) +-SET_TARGET_PROPERTIES(archive_static PROPERTIES COMPILE_DEFINITIONS ++IF(BUILD_SHARED_LIBS) ++ SET_TARGET_PROPERTIES(archive PROPERTIES SOVERSION ${SOVERSION}) ++ELSE() ++ SET_TARGET_PROPERTIES(archive PROPERTIES COMPILE_DEFINITIONS + LIBARCHIVE_STATIC) +-# On Posix systems, libarchive.so and libarchive.a can co-exist. +-IF(NOT WIN32 OR CYGWIN) +- SET_TARGET_PROPERTIES(archive_static PROPERTIES OUTPUT_NAME archive) +-ENDIF(NOT WIN32 OR CYGWIN) ++ENDIF() + + IF(ENABLE_INSTALL) + # How to install the libraries +- INSTALL(TARGETS archive archive_static ++ INSTALL(TARGETS archive + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) +- INSTALL_MAN(${libarchive_MANS}) + INSTALL(FILES ${include_HEADERS} DESTINATION include) + ENDIF() + diff --git a/vcpkg/ports/libarchive/fix-cpu-set.patch b/vcpkg/ports/libarchive/fix-cpu-set.patch new file mode 100644 index 0000000..8d1924d --- /dev/null +++ b/vcpkg/ports/libarchive/fix-cpu-set.patch @@ -0,0 +1,15 @@ +diff --git a/libarchive/archive_random.c b/libarchive/archive_random.c +index 65ea691..63217ec 100644 +--- a/libarchive/archive_random.c ++++ b/libarchive/archive_random.c +@@ -48,6 +48,10 @@ __FBSDID("$FreeBSD$"); + #include + #endif + #ifdef HAVE_PTHREAD_H ++#ifdef __GNUC__ ++#define _GNU_SOURCE ++#include ++#endif + #include + #endif + diff --git a/vcpkg/ports/libarchive/fix-dependencies.patch b/vcpkg/ports/libarchive/fix-dependencies.patch new file mode 100644 index 0000000..1e511b8 --- /dev/null +++ b/vcpkg/ports/libarchive/fix-dependencies.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b2634da..8608efc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -914,7 +914,7 @@ main(int argc, char **argv) + IF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND OPENSSL_FOUND) + INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR}) + LIST(APPEND ADDITIONAL_LIBS ${OPENSSL_LIBRARIES}) +- LIST(REMOVE_DUPLICATES ADDITIONAL_LIBS) ++ #LIST(REMOVE_DUPLICATES ADDITIONAL_LIBS) + ENDIF ("${IMPLEMENTATION}" MATCHES "^OPENSSL$" AND OPENSSL_FOUND) + ENDIF (ARCHIVE_CRYPTO_${ALGORITHM}_${IMPLEMENTATION}) + ENDIF(NOT ARCHIVE_CRYPTO_${ALGORITHM}) diff --git a/vcpkg/ports/libarchive/fix-lz4.patch b/vcpkg/ports/libarchive/fix-lz4.patch new file mode 100644 index 0000000..84b6b2d --- /dev/null +++ b/vcpkg/ports/libarchive/fix-lz4.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b2634da..3b6da5d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -574,7 +574,10 @@ IF(ENABLE_LZ4) + ENDIF (LZ4_INCLUDE_DIR) + + FIND_PATH(LZ4_INCLUDE_DIR lz4.h) +- FIND_LIBRARY(LZ4_LIBRARY NAMES lz4 liblz4) ++ FIND_LIBRARY(LZ4_LIBRARY_DEBUG NAMES lz4d liblz4d) ++ FIND_LIBRARY(LZ4_LIBRARY_RELEASE NAMES lz4 liblz4) ++ INCLUDE(SelectLibraryConfigurations) ++ SELECT_LIBRARY_CONFIGURATIONS(LZ4) + INCLUDE(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZ4 DEFAULT_MSG LZ4_LIBRARY LZ4_INCLUDE_DIR) + ELSE(ENABLE_LZ4) diff --git a/vcpkg/ports/libarchive/fix-zstd.patch b/vcpkg/ports/libarchive/fix-zstd.patch new file mode 100644 index 0000000..8f28979 --- /dev/null +++ b/vcpkg/ports/libarchive/fix-zstd.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b2634da..e43b041 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -605,7 +605,10 @@ IF(ENABLE_ZSTD) + ENDIF (ZSTD_INCLUDE_DIR) + + FIND_PATH(ZSTD_INCLUDE_DIR zstd.h) +- FIND_LIBRARY(ZSTD_LIBRARY NAMES zstd libzstd) ++ FIND_LIBRARY(ZSTD_LIBRARY_DEBUG NAMES zstdd libzstdd) ++ FIND_LIBRARY(ZSTD_LIBRARY_RELEASE NAMES zstd libzstd) ++ INCLUDE(SelectLibraryConfigurations) ++ SELECT_LIBRARY_CONFIGURATIONS(ZSTD) + INCLUDE(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZSTD DEFAULT_MSG ZSTD_LIBRARY ZSTD_INCLUDE_DIR) + ELSE(ENABLE_ZSTD) diff --git a/vcpkg/ports/libarchive/portfile.cmake b/vcpkg/ports/libarchive/portfile.cmake new file mode 100644 index 0000000..bf9fb71 --- /dev/null +++ b/vcpkg/ports/libarchive/portfile.cmake @@ -0,0 +1,88 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libarchive/libarchive + REF fc6563f5130d8a7ee1fc27c0e55baef35119f26c #v3.4.3 + SHA512 54ca4f3cc3b38dcf6588b2369ce43109c4a57a04061348ab8bf046c5c13ace0c4f42c9f3961288542cb5fe12c05359d572b39fe7cec32a10151dbac78e8a3707 + HEAD_REF master + PATCHES + fix-buildsystem.patch + fix-dependencies.patch + fix-lz4.patch + fix-zstd.patch + fix-cpu-set.patch + disable-warnings.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + bzip2 ENABLE_BZip2 + libxml2 ENABLE_LIBXML2 + lz4 ENABLE_LZ4 + lzma ENABLE_LZMA + lzo ENABLE_LZO + openssl ENABLE_OPENSSL + zstd ENABLE_ZSTD + # The below features should be added to CONTROL + #pcre ENABLE_PCREPOSIX + #nettle ENABLE_NETTLE + #expat ENABLE_EXPAT + #libgcc ENABLE_LibGCC + #cng ENABLE_CNG + #tar ENABLE_TAR # Tool build option? + #cpio ENABLE_CPIO # Tool build option? + #cat ENABLE_CAT # Tool build option? + #xattr ENABLE_XATTR # Tool support option? + #acl ENABLE_ACL # Tool support option? + #iconv ENABLE_ICONV # iconv support option? + #libb2 ENABLE_LIBB2 +) + +if(FEATURES MATCHES "pcre") +else() + list(APPEND FEATURE_OPTIONS -DPOSIX_REGEX_LIB=NONE) +endif() + +list(APPEND FEATURE_OPTIONS -DENABLE_ZLIB=ON) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DENABLE_PCREPOSIX=OFF + -DENABLE_NETTLE=OFF + -DENABLE_EXPAT=OFF + -DENABLE_LibGCC=OFF + -DENABLE_CNG=OFF + -DENABLE_TAR=OFF + -DENABLE_CPIO=OFF + -DENABLE_CAT=OFF + -DENABLE_XATTR=OFF + -DENABLE_ACL=OFF + -DENABLE_ICONV=OFF + -DENABLE_TEST=OFF + -DENABLE_WERROR=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +foreach(_feature IN LISTS FEATURE_OPTIONS) + string(REPLACE "-D" "" _feature "${_feature}") + string(REPLACE "=" ";" _feature "${_feature}") + string(REPLACE "ON" "1" _feature "${_feature}") + string(REPLACE "OFF" "0" _feature "${_feature}") + list(GET _feature 0 _feature_name) + list(GET _feature 1 _feature_status) + set(${_feature_name} ${_feature_status}) +endforeach() +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +foreach(HEADER ${CURRENT_PACKAGES_DIR}/include/archive.h ${CURRENT_PACKAGES_DIR}/include/archive_entry.h) + file(READ ${HEADER} CONTENTS) + string(REPLACE "(!defined LIBARCHIVE_STATIC)" "0" CONTENTS "${CONTENTS}") + file(WRITE ${HEADER} "${CONTENTS}") +endforeach() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libarchive/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/libarchive/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..5e78381 --- /dev/null +++ b/vcpkg/ports/libarchive/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,112 @@ +_find_package(${ARGS}) + +if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static") + if(@ENABLE_ZLIB@) + find_package(ZLIB REQUIRED) + list(APPEND LibArchive_LIBRARIES ZLIB::ZLIB) + endif() + if(@ENABLE_BZip2@) + find_package(BZip2 REQUIRED) + list(APPEND LibArchive_LIBRARIES BZip2::BZip2) + endif() + if(@ENABLE_LIBXML2@) + find_package(LibXml2 REQUIRED) + list(APPEND LibArchive_LIBRARIES LibXml2::LibXml2) + endif() + if(@ENABLE_LZ4@) + find_package(lz4 REQUIRED) + list(APPEND LibArchive_LIBRARIES lz4::lz4) + endif() + if(@ENABLE_LZMA@) + find_package(LibLZMA REQUIRED) + list(APPEND LibArchive_LIBRARIES LibLZMA::LibLZMA) + endif() + if(@ENABLE_LZO@) + find_library(LZO_LIBRARY_DEBUG NAMES lzo2d lzo2 NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH) + find_library(LZO_LIBRARY_RELEASE NAMES lzo2 NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH) + if(LZO_LIBRARY_RELEASE) + list(APPEND LibArchive_LIBRARIES optimized ${LZO_LIBRARY_RELEASE}) + endif() + if(LZO_LIBRARY_DEBUG) + list(APPEND LibArchive_LIBRARIES debug ${LZO_LIBRARY_DEBUG}) + endif() + endif() + if(@ENABLE_ZSTD@) + find_library(ZSTD_LIBRARY_DEBUG NAMES zstdd zstd NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH) + find_library(ZSTD_LIBRARY_RELEASE NAMES zstd NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH) + if(ZSTD_LIBRARY_RELEASE) + list(APPEND LibArchive_LIBRARIES optimized ${ZSTD_LIBRARY_RELEASE}) + endif() + if(ZSTD_LIBRARY_DEBUG) + list(APPEND LibArchive_LIBRARIES debug ${ZSTD_LIBRARY_DEBUG}) + endif() + endif() + if(@ENABLE_OPENSSL@) + find_package(OpenSSL REQUIRED) + list(APPEND LibArchive_LIBRARIES OpenSSL::Crypto) + endif() + + if(TARGET LibArchive::LibArchive) + if(@ENABLE_BZip2@) + target_link_libraries(LibArchive::LibArchive INTERFACE BZip2::BZip2) + endif() + if(@ENABLE_ZLIB@) + target_link_libraries(LibArchive::LibArchive INTERFACE ZLIB::ZLIB) + endif() + if(@ENABLE_LIBXML2@) + target_link_libraries(LibArchive::LibArchive INTERFACE LibXml2::LibXml2) + endif() + if(@ENABLE_LZ4@) + target_link_libraries(LibArchive::LibArchive INTERFACE lz4::lz4) + endif() + if(@ENABLE_LZMA@) + target_link_libraries(LibArchive::LibArchive INTERFACE LibLZMA::LibLZMA) + endif() + if(@ENABLE_LZO@) + if(LZO_LIBRARY_RELEASE) + list(APPEND interface_lib \$<\$>:${LZO_LIBRARY_RELEASE}>) + endif() + if(LZO_LIBRARY_DEBUG) + list(APPEND interface_lib \$<\$:${LZO_LIBRARY_DEBUG}>) + endif() + set_property(TARGET LibArchive::LibArchive APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${interface_lib}) + endif() + if(@ENABLE_ZSTD@) + if(ZSTD_LIBRARY_RELEASE) + list(APPEND interface_lib \$<\$>:${ZSTD_LIBRARY_RELEASE}>) + endif() + if(ZSTD_LIBRARY_DEBUG) + list(APPEND interface_lib \$<\$:${ZSTD_LIBRARY_DEBUG}>) + endif() + set_property(TARGET LibArchive::LibArchive APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${interface_lib}) + endif() + if(@ENABLE_OPENSSL@) + target_link_libraries(LibArchive::LibArchive INTERFACE OpenSSL::Crypto) + endif() + endif() +endif() + + +# TODO in some future +# if(@ENABLE_PCREPOSIX@) +# endif() +# if(@ENABLE_NETTLE@) +# endif() +# if(@ENABLE_EXPAT@) +# endif() +# if(@ENABLE_LibGCC@) +# endif() +# if(@ENABLE_CNG@) +# endif() +# if(@ENABLE_TAR@) +# endif() +# if(@ENABLE_CPIO@) +# endif() +# if(@ENABLE_CAT@) +# endif() +# if(@ENABLE_XATTR@) +# endif() +# if(@ENABLE_ACL@) +# endif() +# if(@ENABLE_ICONV@) +# endif() diff --git a/vcpkg/ports/libass/CMakeLists.txt b/vcpkg/ports/libass/CMakeLists.txt new file mode 100644 index 0000000..aacf89d --- /dev/null +++ b/vcpkg/ports/libass/CMakeLists.txt @@ -0,0 +1,81 @@ +cmake_minimum_required(VERSION 3.9) +project(libass C CXX) + +set(LIBASS_VERSION 0.14.0) + +configure_file (${CMAKE_CURRENT_SOURCE_DIR}/config.h.in config.h) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) + +if(WIN32) + add_compile_definitions(CONFIG_DIRECTWRITE) +elseif(APPLE) + add_compile_definitions(CONFIG_CORETEXT) +else() + add_compile_definitions(CONFIG_FONTCONFIG) +endif() + +add_compile_definitions(CONFIG_FREETYPE) +add_compile_definitions(CONFIG_FRIBIDI) +add_compile_definitions(CONFIG_HARFBUZZ) + +file (GLOB_RECURSE SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/libass/*.c) + +if(WIN32) + list(FILTER SOURCES EXCLUDE REGEX ".*ass_coretext.c$") + list(FILTER SOURCES EXCLUDE REGEX ".*ass_fontconfig.c$") +elseif(APPLE) + list(FILTER SOURCES EXCLUDE REGEX ".*ass_directwrite.c$") + list(FILTER SOURCES EXCLUDE REGEX ".*ass_fontconfig.c$") +else() + list(FILTER SOURCES EXCLUDE REGEX ".*ass_coretext.c$") + list(FILTER SOURCES EXCLUDE REGEX ".*ass_directwrite.c$") +endif() + +find_package(Freetype REQUIRED) + +find_path(FRIBIDI_INCLUDE_DIR + NAMES fribidi.h + PATH_SUFFIXES fribidi) + +find_path(HARFBUZZ_INCLUDE_DIR + NAMES hb.h + PATH_SUFFIXES harfbuzz) + +find_path(DIRENT_INCLUDE_DIR + NAMES dirent.h) + +find_library(FRIBIDI_LIBRARY NAMES libfribidi fribidi) +find_library(HARFBUZZ_LIBRARY NAMES harfbuzz) + +add_library(ass ${SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/libass.def) + +target_include_directories(ass PRIVATE + ${FRIBIDI_INCLUDE_DIR} + ${HARFBUZZ_INCLUDE_DIR}) +if(DIRENT_INCLUDE_DIR) + target_include_directories(ass PRIVATE + ${DIRENT_INCLUDE_DIR}) +endif() +target_link_libraries(ass PRIVATE + Freetype::Freetype + ${FRIBIDI_LIBRARY} + ${HARFBUZZ_LIBRARY}) + +install(TARGETS ass + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +# pkgconfig file +set(prefix ${CMAKE_INSTALL_PREFIX}) +set(exec_prefix ${CMAKE_INSTALL_PREFIX}) +set(libdir ${CMAKE_INSTALL_PREFIX}/lib) +set(includedir ${CMAKE_INSTALL_PREFIX}/include) +set(PACKAGE_VERSION ${LIBASS_VERSION}) +set(PKG_REQUIRES_PRIVATE "harfbuzz >= 0.9.5, fribidi >= 0.19.0, freetype2 >= 9.10.3") +set(PKG_LIBS_PRIVATE -lm) +configure_file(libass.pc.in libass.pc @ONLY) +install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/libass.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) diff --git a/vcpkg/ports/libass/ConstantValues.patch b/vcpkg/ports/libass/ConstantValues.patch new file mode 100644 index 0000000..d357032 --- /dev/null +++ b/vcpkg/ports/libass/ConstantValues.patch @@ -0,0 +1,43 @@ +--- + libass/ass_outline.c | 4 ++-- + libass/ass_render.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/libass/ass_outline.c b/libass/ass_outline.c +index 1b9afe9..527403e 100644 +--- a/libass/ass_outline.c ++++ b/libass/ass_outline.c +@@ -518,7 +518,7 @@ static bool draw_arc(StrokerState *str, ASS_Vector pt, + ASS_DVector normal0, ASS_DVector normal1, double c, int dir) + { + const int max_subdiv = 15; +- double mul[max_subdiv + 1]; ++ double mul[16]; + + ASS_DVector center; + bool small_angle = true; +@@ -554,7 +554,7 @@ static bool draw_arc(StrokerState *str, ASS_Vector pt, + static bool draw_circle(StrokerState *str, ASS_Vector pt, int dir) + { + const int max_subdiv = 15; +- double mul[max_subdiv + 1], c = 0; ++ double mul[16], c = 0; + + int pos = max_subdiv; + while (c < str->split_cos && pos) { +diff --git a/libass/ass_render.c b/libass/ass_render.c +index 69c4439..f6fa85c 100644 +--- a/libass/ass_render.c ++++ b/libass/ass_render.c +@@ -1235,7 +1235,7 @@ get_bitmap_glyph(ASS_Renderer *render_priv, GlyphInfo *info) + } + + const int n_outlines = 3; +- ASS_Outline outline[n_outlines]; ++ ASS_Outline outline[3]; + outline_copy(&outline[0], info->outline); + outline_copy(&outline[1], info->border[0]); + outline_copy(&outline[2], info->border[1]); +-- +2.18.0.windows.1 + diff --git a/vcpkg/ports/libass/config.h.in b/vcpkg/ports/libass/config.h.in new file mode 100644 index 0000000..e69de29 diff --git a/vcpkg/ports/libass/libass.def b/vcpkg/ports/libass/libass.def new file mode 100644 index 0000000..58bfad3 --- /dev/null +++ b/vcpkg/ports/libass/libass.def @@ -0,0 +1,46 @@ +EXPORTS +ass_library_init +ass_library_done +ass_library_version +ass_set_fonts_dir +ass_set_extract_fonts +ass_set_style_overrides +ass_renderer_init +ass_renderer_done +ass_set_frame_size +ass_set_storage_size +ass_set_margins +ass_set_use_margins +ass_set_aspect_ratio +ass_set_font_scale +ass_set_hinting +ass_set_line_spacing +ass_get_available_font_providers +ass_set_fonts +ass_render_frame +ass_new_track +ass_free_track +ass_alloc_style +ass_alloc_event +ass_free_style +ass_free_event +ass_process_data +ass_process_codec_private +ass_process_chunk +ass_read_file +ass_read_memory +ass_read_styles +ass_add_font +ass_clear_fonts +ass_step_sub +ass_process_force_style +ass_set_message_cb +ass_fonts_update +ass_set_cache_limits +ass_flush_events +ass_set_shaper +ass_set_line_position +ass_set_pixel_aspect +ass_set_selective_style_override_enabled +ass_set_selective_style_override +ass_set_check_readorder diff --git a/vcpkg/ports/libass/portfile.cmake b/vcpkg/ports/libass/portfile.cmake new file mode 100644 index 0000000..f5ab660 --- /dev/null +++ b/vcpkg/ports/libass/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libass/libass + REF 98727c3b78f44cb3bbc955fcf5d977ebd911d5ca + SHA512 d466108180cea598b817f89aa21a1021ed2a763580d9aad51b054aa120186af48ab4264907e49ddcb38479a28d87d5431751a28afee9cb83ad7623f002d99c57 + HEAD_REF master + PATCHES ConstantValues.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.in DESTINATION ${SOURCE_PATH}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/libass.def DESTINATION ${SOURCE_PATH}) + +# Since libass uses automake, make and configure, we use a custom CMake file +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +file(COPY ${SOURCE_PATH}/libass/ass.h ${SOURCE_PATH}/libass/ass_types.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/ass) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libass/vcpkg.json b/vcpkg/ports/libass/vcpkg.json new file mode 100644 index 0000000..151d87c --- /dev/null +++ b/vcpkg/ports/libass/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "libass", + "version-string": "0.14.0", + "port-version": 3, + "description": "libass is a portable subtitle renderer for the ASS/SSA (Advanced Substation Alpha/Substation Alpha) subtitle format", + "homepage": "https://github.com/libass/libass", + "dependencies": [ + { + "name": "dirent", + "platform": "windows" + }, + "freetype", + "fribidi", + "harfbuzz" + ] +} diff --git a/vcpkg/ports/libb2/portfile.cmake b/vcpkg/ports/libb2/portfile.cmake new file mode 100644 index 0000000..992c59f --- /dev/null +++ b/vcpkg/ports/libb2/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_fail_port_install(ON_TARGET "WINDOWS") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO BLAKE2/libb2 + REF 2c5142f12a2cd52f3ee0a43e50a3a76f75badf85 + SHA512 cf29cf9391ae37a978eb6618de6f856f3defa622b8f56c2d5a519ab34fd5e4d91f3bb868601a44e9c9164a2992e80dde188ccc4d1605dffbdf93687336226f8d + HEAD_REF master +) + +set(OPTIONS) +if(CMAKE_HOST_WIN32) + set(OPTIONS --disable-native) # requires cpuid +endif() + +vcpkg_configure_make( + AUTOCONFIG + SOURCE_PATH ${SOURCE_PATH} + OPTIONS ${OPTIONS} +) +vcpkg_install_make() +vcpkg_fixup_pkgconfig() + + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/libb2/vcpkg.json b/vcpkg/ports/libb2/vcpkg.json new file mode 100644 index 0000000..dbe8dc2 --- /dev/null +++ b/vcpkg/ports/libb2/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "libb2", + "version-string": "0.98.1", + "port-version": 4, + "description": "C library providing BLAKE2b, BLAKE2s, BLAKE2bp, BLAKE2sp", + "homepage": "https://github.com/BLAKE2/libb2", + "supports": "!windows" +} diff --git a/vcpkg/ports/libbf/CONTROL b/vcpkg/ports/libbf/CONTROL new file mode 100644 index 0000000..35ee0fb --- /dev/null +++ b/vcpkg/ports/libbf/CONTROL @@ -0,0 +1,3 @@ +Source: libbf +Version: 1.0.0-1 +Description: Bloom filters for C++11. \ No newline at end of file diff --git a/vcpkg/ports/libbf/portfile.cmake b/vcpkg/ports/libbf/portfile.cmake new file mode 100644 index 0000000..c7a9ef4 --- /dev/null +++ b/vcpkg/ports/libbf/portfile.cmake @@ -0,0 +1,27 @@ +if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Windows" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "libbf does not support MSVC") +endif() + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mavam/libbf + REF v1.0.0 + SHA512 04db7adbeb4bc6b20aed7f2676840499ed1afe499b4cab67f27d4a0ad234c1fb06eced24259f37870ec4760fe74d6d6307b5d11b3cd928b975661eb2966d4db8 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbf) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libbf/COPYING ${CURRENT_PACKAGES_DIR}/share/libbf/copyright) \ No newline at end of file diff --git a/vcpkg/ports/libbson/CONTROL b/vcpkg/ports/libbson/CONTROL new file mode 100644 index 0000000..6c929c8 --- /dev/null +++ b/vcpkg/ports/libbson/CONTROL @@ -0,0 +1,5 @@ +Source: libbson +Version: 1.16.1 +Port-Version: 1 +Description: libbson is a library providing useful routines related to building, parsing, and iterating BSON documents. +Homepage: https://github.com/mongodb/libbson diff --git a/vcpkg/ports/libbson/fix-static-cmake.patch b/vcpkg/ports/libbson/fix-static-cmake.patch new file mode 100644 index 0000000..11e11dc --- /dev/null +++ b/vcpkg/ports/libbson/fix-static-cmake.patch @@ -0,0 +1,13 @@ +diff --git a/src/libbson/build/cmake/libbson-static-1.0-config.cmake.in b/src/libbson/build/cmake/libbson-static-1.0-config.cmake.in +index 92933fe..d98ebd3 100644 +--- a/src/libbson/build/cmake/libbson-static-1.0-config.cmake.in ++++ b/src/libbson/build/cmake/libbson-static-1.0-config.cmake.in +@@ -36,3 +36,7 @@ foreach (LIB @LIBBSON_LIBRARIES@) + endforeach () + + set (BSON_STATIC_DEFINITIONS BSON_STATIC) ++ ++set (BSON_LIBRARIES ${BSON_STATIC_LIBRARIES}) ++set (BSON_INCLUDE_DIRS ${BSON_STATIC_INCLUDE_DIRS}) ++set (BSON_DEFINITIONS BSON_STATIC) +\ No newline at end of file diff --git a/vcpkg/ports/libbson/fix-uwp.patch b/vcpkg/ports/libbson/fix-uwp.patch new file mode 100644 index 0000000..9342e81 --- /dev/null +++ b/vcpkg/ports/libbson/fix-uwp.patch @@ -0,0 +1,187 @@ +diff --git a/src/libbson/CMakeLists.txt b/src/libbson/CMakeLists.txt +index 7c479d8..d383424 100644 +--- a/src/libbson/CMakeLists.txt ++++ b/src/libbson/CMakeLists.txt +@@ -226,6 +226,9 @@ set (HEADERS_FORWARDING + ${PROJECT_SOURCE_DIR}/src/bson/forwarding/bson.h + ) + ++add_definitions(-D_CRT_SECURE_NO_WARNINGS) ++ ++if (NOT ENABLE_STATIC MATCHES "ON|AUTO") + add_library (bson_shared SHARED ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) + set (CMAKE_CXX_VISIBILITY_PRESET hidden) + target_compile_definitions (bson_shared PRIVATE BSON_COMPILATION JSONSL_PARSE_NAN) +@@ -268,9 +271,13 @@ if (WIN32) + # must be handled specially since we can't resolve them + set (BSON_SYSTEM_LIBRARIES ${BSON_SYSTEM_LIBRARIES} ws2_32) + endif () ++endif () + + if (ENABLE_STATIC MATCHES "ON|AUTO") + add_library (bson_static STATIC ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) ++ set(CMAKE_CXX_VISIBILITY_PRESET hidden) ++ set(THREADS_PREFER_PTHREAD_FLAG 1) ++ find_package(Threads REQUIRED) + target_compile_definitions (bson_static + PUBLIC BSON_STATIC + PRIVATE BSON_COMPILATION JSONSL_PARSE_NAN +@@ -284,6 +291,7 @@ if (ENABLE_STATIC MATCHES "ON|AUTO") + if (RT_LIBRARY) + target_link_libraries (bson_static ${RT_LIBRARY}) + endif () ++ find_library(M_LIBRARY m) + if (M_LIBRARY) + target_link_libraries (bson_static ${M_LIBRARY}) + endif () +@@ -298,7 +306,7 @@ function (add_example bin src) + add_executable (${bin} ${BSON_EXAMPLE_SOURCES}) + + # Link against the shared lib like normal apps +- target_link_libraries (${bin} bson_shared) ++ target_link_libraries (${bin} bson_shared bson_static) + + set (EXAMPLES ${EXAMPLES} ${bin}) + endfunction () +@@ -322,7 +330,7 @@ set (BSON_HEADER_INSTALL_DIR + ) + + if (ENABLE_STATIC MATCHES "ON|AUTO") +- set (TARGETS_TO_INSTALL bson_shared bson_static) ++ set (TARGETS_TO_INSTALL bson_static) + else () + set (TARGETS_TO_INSTALL bson_shared) + endif () +@@ -337,6 +345,7 @@ install ( + ) + + if (MSVC) ++ if (NOT ENABLE_STATIC MATCHES "ON|AUTO") + add_custom_command ( + TARGET bson_shared + POST_BUILD +@@ -348,6 +357,7 @@ if (MSVC) + FILES $/lib$ + DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) ++ else() + if (TARGET bson_static) + add_custom_command ( + TARGET bson_static +@@ -361,6 +371,7 @@ if (MSVC) + DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) + endif () ++ endif() + endif () + + install ( +diff --git a/src/libmongoc/CMakeLists.txt b/src/libmongoc/CMakeLists.txt +index 0f9e50c..85eb429 100644 +--- a/src/libmongoc/CMakeLists.txt ++++ b/src/libmongoc/CMakeLists.txt +@@ -694,6 +694,7 @@ if (WIN32) + set (LIBRARIES ${LIBRARIES} ws2_32) + endif () + ++if (NOT MONGOC_ENABLE_STATIC) + add_library (mongoc_shared SHARED ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) + set_target_properties (mongoc_shared PROPERTIES CMAKE_CXX_VISIBILITY_PRESET hidden) + target_link_libraries (mongoc_shared PRIVATE ${LIBRARIES} PUBLIC ${BSON_LIBRARIES}) +@@ -704,6 +705,7 @@ target_compile_definitions (mongoc_shared PRIVATE MONGOC_COMPILATION) + + set_target_properties (mongoc_shared PROPERTIES VERSION 0.0.0 SOVERSION 0) + set_target_properties (mongoc_shared PROPERTIES OUTPUT_NAME "${MONGOC_OUTPUT_BASENAME}-${MONGOC_API_VERSION}") ++endif () + + if (MONGOC_ENABLE_STATIC) + add_library (mongoc_static STATIC ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) +@@ -731,7 +733,11 @@ if (ENABLE_APPLE_FRAMEWORK) + endif () + + add_executable (mongoc-stat ${PROJECT_SOURCE_DIR}/../../src/tools/mongoc-stat.c) ++if (MONGOC_ENABLE_STATIC) ++target_link_libraries (mongoc-stat mongoc_static) ++else () + target_link_libraries (mongoc-stat mongoc_shared ${LIBRARIES}) ++endif () + + # mongoc-stat works if shared memory performance counters are enabled. + if (ENABLE_SHM_COUNTERS STREQUAL "ON") +@@ -977,7 +983,7 @@ file (COPY ${PROJECT_SOURCE_DIR}/tests/x509gen DESTINATION ${PROJECT_BINARY_DIR} + file (COPY ${PROJECT_SOURCE_DIR}/tests/release_files DESTINATION ${PROJECT_BINARY_DIR}/tests) + + if (MONGOC_ENABLE_STATIC) +- set (TARGETS_TO_INSTALL mongoc_shared mongoc_static) ++ set (TARGETS_TO_INSTALL mongoc_static) + else () + set (TARGETS_TO_INSTALL mongoc_shared) + endif () +@@ -997,6 +1003,7 @@ install ( + ) + + if (MSVC) ++ if (NOT ENABLE_STATIC MATCHES "ON|AUTO") + add_custom_command ( + TARGET mongoc_shared + POST_BUILD +@@ -1008,6 +1015,7 @@ if (MSVC) + FILES $/lib$ + DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) ++ else() + if (TARGET mongoc_static) + add_custom_command ( + TARGET mongoc_static +@@ -1021,6 +1029,7 @@ if (MSVC) + DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) + endif () ++ endif() + endif () + + install ( +diff --git a/src/libmongoc/src/mongoc/mongoc-gridfs-file.c b/src/libmongoc/src/mongoc/mongoc-gridfs-file.c +index 0690b86..98721df 100644 +--- a/src/libmongoc/src/mongoc/mongoc-gridfs-file.c ++++ b/src/libmongoc/src/mongoc/mongoc-gridfs-file.c +@@ -765,7 +765,7 @@ _mongoc_gridfs_file_refresh_page (mongoc_gridfs_file_t *file) + bson_t query; + bson_t child; + bson_t opts; +- const bson_t *chunk; ++ const bson_t *chunk = NULL; + const char *key; + bson_iter_t iter; + int64_t existing_chunks; +diff --git a/src/libmongoc/src/mongoc/mongoc-handshake.c b/src/libmongoc/src/mongoc/mongoc-handshake.c +index 8374af2..5491595 100644 +--- a/src/libmongoc/src/mongoc/mongoc-handshake.c ++++ b/src/libmongoc/src/mongoc/mongoc-handshake.c +@@ -286,7 +286,8 @@ _get_os_version (void) + char *ret = bson_malloc (HANDSHAKE_OS_VERSION_MAX); + bool found = false; + +-#ifdef _WIN32 ++#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) ++#elif defined (_WIN32) + OSVERSIONINFO osvi; + ZeroMemory (&osvi, sizeof (OSVERSIONINFO)); + osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); +diff --git a/src/libmongoc/src/mongoc/mongoc-util.c b/src/libmongoc/src/mongoc/mongoc-util.c +index 99939ff..3c25e19 100644 +--- a/src/libmongoc/src/mongoc/mongoc-util.c ++++ b/src/libmongoc/src/mongoc/mongoc-util.c +@@ -84,7 +84,11 @@ _mongoc_hex_md5 (const char *input) + void + _mongoc_usleep (int64_t usec) + { +-#ifdef _WIN32 ++#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) ++ if (usec / 1000 > MAXDWORD || usec < 0) ++ __fastfail(-1); ++ Sleep((DWORD)(usec / 1000)); ++#elif defined(_WIN32) + LARGE_INTEGER ft; + HANDLE timer; + diff --git a/vcpkg/ports/libbson/portfile.cmake b/vcpkg/ports/libbson/portfile.cmake new file mode 100644 index 0000000..8430b3e --- /dev/null +++ b/vcpkg/ports/libbson/portfile.cmake @@ -0,0 +1,84 @@ +# This port needs to be updated at the same time as mongo-c-driver +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mongodb/mongo-c-driver + REF 99d422877c5b5ea52006c13ee3b48297251b2b2d # debian/1.16.1 + SHA512 e2f129439ff3697981774e0de35586a6afe98838acfc52d8a115bcb298350f2779b886dc6b27130e78b3b81f9b0a85b2bc6bcef246f9685c05f6789747c4739d + HEAD_REF master + PATCHES + fix-uwp.patch + fix-static-cmake.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(ENABLE_STATIC ON) +else() + set(ENABLE_STATIC OFF) +endif() + +file(READ ${CMAKE_CURRENT_LIST_DIR}/CONTROL _contents) +string(REGEX MATCH "\nVersion:[ ]*[^ \n]+" _contents "${_contents}") +string(REGEX REPLACE ".+Version:[ ]*([\\.0-9]+).*" "\\1" BUILD_VERSION "${_contents}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DENABLE_MONGOC=OFF + -DENABLE_BSON=ON + -DENABLE_TESTS=OFF + -DENABLE_EXAMPLES=OFF + -DENABLE_STATIC=${ENABLE_STATIC} + -DBUILD_VERSION=${BUILD_VERSION} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +set(PORT_POSTFIX "1.0") + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libbson-static-${PORT_POSTFIX} TARGET_PATH share/bson-${PORT_POSTFIX}) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libbson-${PORT_POSTFIX} TARGET_PATH share/bson-${PORT_POSTFIX}) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/mongo-c-driver) + +# This rename is needed because the official examples expect to use #include +# See Microsoft/vcpkg#904 +file(RENAME + ${CURRENT_PACKAGES_DIR}/include/libbson-${PORT_POSTFIX} + ${CURRENT_PACKAGES_DIR}/temp) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include) +file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + # drop the __declspec(dllimport) when building static + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/bson/bson-macros.h + "define BSON_API __declspec(dllimport)" "define BSON_API") + + file(RENAME ${CURRENT_PACKAGES_DIR}/share/bson-${PORT_POSTFIX}/libbson-static-${PORT_POSTFIX}-config.cmake + ${CURRENT_PACKAGES_DIR}/share/bson-${PORT_POSTFIX}/bson-${PORT_POSTFIX}-config.cmake) + file(RENAME ${CURRENT_PACKAGES_DIR}/share/bson-${PORT_POSTFIX}/libbson-static-${PORT_POSTFIX}-config-version.cmake + ${CURRENT_PACKAGES_DIR}/share/bson-${PORT_POSTFIX}/bson-${PORT_POSTFIX}-config-version.cmake) + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) +else() + file(RENAME ${CURRENT_PACKAGES_DIR}/share/bson-${PORT_POSTFIX}/libbson-${PORT_POSTFIX}-config.cmake + ${CURRENT_PACKAGES_DIR}/share/bson-${PORT_POSTFIX}/bson-${PORT_POSTFIX}-config.cmake) + file(RENAME ${CURRENT_PACKAGES_DIR}/share/bson-${PORT_POSTFIX}/libbson-${PORT_POSTFIX}-config-version.cmake + ${CURRENT_PACKAGES_DIR}/share/bson-${PORT_POSTFIX}/bson-${PORT_POSTFIX}-config-version.cmake) +endif() + +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/bson-1.0/bson-1.0-config.cmake + "include/libbson-1.0" "include/") + +file(COPY ${SOURCE_PATH}/THIRD_PARTY_NOTICES DESTINATION ${CURRENT_PACKAGES_DIR}/share/libbson) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${CURRENT_PORT_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/libbson/usage b/vcpkg/ports/libbson/usage new file mode 100644 index 0000000..873243c --- /dev/null +++ b/vcpkg/ports/libbson/usage @@ -0,0 +1,6 @@ +The package libbson is compatible with built-in CMake targets: + + find_package(libbson-1.0 CONFIG REQUIRED) + target_include_directories(main PRIVATE ${BSON_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${BSON_LIBRARIES}) + target_compile_definitions(main PRIVATE ${BSON_DEFINITIONS}) diff --git a/vcpkg/ports/libcds/001-cmake-install.patch b/vcpkg/ports/libcds/001-cmake-install.patch new file mode 100644 index 0000000..2a73752 --- /dev/null +++ b/vcpkg/ports/libcds/001-cmake-install.patch @@ -0,0 +1,32 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d97ee07..f8affbb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -34,6 +34,10 @@ if(APPLE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_DARWIN_C_SOURCE") + endif() + ++if(MSVC) ++ add_definitions(-DCDS_BUILD_LIB) ++endif() ++ + if(WITH_BOOST_ATOMIC) + if(TARGET boost::atomic) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCDS_USE_BOOST_ATOMIC") +@@ -186,9 +190,13 @@ target_compile_options(${CDS_STATIC_LIBRARY} PUBLIC "${LIBCDS_PUBLIC_CXX_FLAGS}" + target_compile_options(${CDS_SHARED_LIBRARY} PRIVATE "${LIBCDS_PRIVATE_CXX_FLAGS}") + target_compile_options(${CDS_STATIC_LIBRARY} PRIVATE "${LIBCDS_PRIVATE_CXX_FLAGS}") + +-install(TARGETS ${CDS_SHARED_LIBRARY} EXPORT LibCDSConfig LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${LIBRARIES_COMPONENT} NAMELINK_SKIP RUNTIME DESTINATION lib${LIB_SUFFIX}) +-install(TARGETS ${CDS_SHARED_LIBRARY} EXPORT LibCDSConfig LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${HEADERS_COMPONENT} NAMELINK_ONLY) +-install(TARGETS ${CDS_STATIC_LIBRARY} EXPORT LibCDSConfig DESTINATION lib${LIB_SUFFIX} COMPONENT ${LIBRARIES_COMPONENT}) ++if (NOT DISABLE_INSTALL_SHARED) ++ install(TARGETS ${CDS_SHARED_LIBRARY} EXPORT LibCDSConfig RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${LIBRARIES_COMPONENT} NAMELINK_SKIP) ++ install(TARGETS ${CDS_SHARED_LIBRARY} EXPORT LibCDSConfig RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${HEADERS_COMPONENT} NAMELINK_ONLY) ++endif() ++if (NOT DISABLE_INSTALL_STATIC) ++ install(TARGETS ${CDS_STATIC_LIBRARY} EXPORT LibCDSConfig DESTINATION lib${LIB_SUFFIX} COMPONENT ${LIBRARIES_COMPONENT}) ++endif() + install(EXPORT LibCDSConfig FILE LibCDSConfig.cmake NAMESPACE LibCDS:: DESTINATION lib/cmake/LibCDS) + install(DIRECTORY ${PROJECT_SOURCE_DIR}/cds DESTINATION include COMPONENT ${HEADERS_COMPONENT}) + diff --git a/vcpkg/ports/libcds/002-lib-suffix-option.patch b/vcpkg/ports/libcds/002-lib-suffix-option.patch new file mode 100644 index 0000000..9732f63 --- /dev/null +++ b/vcpkg/ports/libcds/002-lib-suffix-option.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index aa287ff8..20fe7b49 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -118,7 +118,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_C + + if(CMAKE_TARGET_ARCHITECTURE STREQUAL "x86_64") + list(APPEND LIBCDS_PUBLIC_CXX_FLAGS "-mcx16") +- set(LIB_SUFFIX "64") ++ set(LIB_SUFFIX "64" CACHE STRING "") + + # GCC-7: 128-bit atomics support is implemented via libatomic on amd64 + # see https://gcc.gnu.org/ml/gcc/2017-01/msg00167.html diff --git a/vcpkg/ports/libcds/CONTROL b/vcpkg/ports/libcds/CONTROL new file mode 100644 index 0000000..5c30623 --- /dev/null +++ b/vcpkg/ports/libcds/CONTROL @@ -0,0 +1,5 @@ +Source: libcds +Version: 2.3.3 +Build-Depends: boost-system, boost-thread +Homepage: https://github.com/khizmax/libcds +Description: a collection of concurrent containers that don't require external (manual) synchronization for shared access, and safe memory reclamation (SMR) algorithms like Hazard Pointer and user-space RCU that is used as an epoch-based SMR. diff --git a/vcpkg/ports/libcds/portfile.cmake b/vcpkg/ports/libcds/portfile.cmake new file mode 100644 index 0000000..ebb87b5 --- /dev/null +++ b/vcpkg/ports/libcds/portfile.cmake @@ -0,0 +1,38 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO khizmax/libcds + REF v2.3.3 + SHA512 95e67da4336d622d47bdf124d76827ca3e82e65ab5f725ccf58c2d7957960e7d17ee1ebb2126eed70f7a3ca1c97f840d9f59c1ae2eb80215d10abf70b215e510 + HEAD_REF master + PATCHES + 001-cmake-install.patch + 002-lib-suffix-option.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" DISABLE_INSTALL_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" DISABLE_INSTALL_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DENABLE_UNIT_TEST=OFF + -DENABLE_STRESS_TEST=OFF + -DDISABLE_INSTALL_STATIC=${DISABLE_INSTALL_STATIC} + -DDISABLE_INSTALL_SHARED=${DISABLE_INSTALL_SHARED} + "-DLIB_SUFFIX=" +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/LibCDS) + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/libcds RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/libcerf/001-fix-static-build.patch b/vcpkg/ports/libcerf/001-fix-static-build.patch new file mode 100644 index 0000000..ffaeaed --- /dev/null +++ b/vcpkg/ports/libcerf/001-fix-static-build.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f79581f..4fc9457 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -56,6 +56,8 @@ if(MSVC) + # set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/$) + if(BUILD_SHARED_LIBS) + set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) ++ else() ++ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd") + endif() + else() + add_compile_options(-O2 -Wno-sign-compare -fno-omit-frame-pointer) diff --git a/vcpkg/ports/libcerf/CONTROL b/vcpkg/ports/libcerf/CONTROL new file mode 100644 index 0000000..72b1324 --- /dev/null +++ b/vcpkg/ports/libcerf/CONTROL @@ -0,0 +1,4 @@ +Source: libcerf +Version: 1.13 +Description: A self-contained numeric library that provides an efficient and accurate implementation of complex error functions, along with Dawson, Faddeeva, and Voigt functions. +Homepage: https://jugit.fz-juelich.de/mlz/libcerf diff --git a/vcpkg/ports/libcerf/portfile.cmake b/vcpkg/ports/libcerf/portfile.cmake new file mode 100644 index 0000000..20e3c7c --- /dev/null +++ b/vcpkg/ports/libcerf/portfile.cmake @@ -0,0 +1,35 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(BUILD_SHARED_LIBS ON) +else() + set(BUILD_SHARED_LIBS OFF) +endif() + +vcpkg_download_distfile(ARCHIVE + URLS "https://jugit.fz-juelich.de/mlz/libcerf/uploads/924b8d245ad3461107ec630734dfc781/libcerf-1.13.tgz" + FILENAME "libcerf-1.13.tgz" + SHA512 4df711d3e9fd00de99959c3253a9565d1dc2c41f75a5800ced9c52f89cbd13185fbdca3ad75de788fd16c044082738ab345b7fb6a8820ac588edafe1812944aa +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES 001-fix-static-build.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCERF_CPP=ON + -DLIB_MAN=OFF + -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libcerf RENAME copyright) + +vcpkg_test_cmake(PACKAGE_NAME libcerf) diff --git a/vcpkg/ports/libconfig/CMakeLists.txt b/vcpkg/ports/libconfig/CMakeLists.txt new file mode 100644 index 0000000..fe70cb9 --- /dev/null +++ b/vcpkg/ports/libconfig/CMakeLists.txt @@ -0,0 +1,52 @@ +cmake_minimum_required(VERSION 3.5.1) +project(libconfig C CXX) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +set(C_SOURCES + lib/grammar.c + lib/libconfig.c + lib/scanctx.c + lib/scanner.c + lib/strbuf.c + lib/strvec.c + lib/util.c + lib/wincompat.c +) + +set(CPP_SOURCES + lib/libconfigcpp.cc +) + +find_path(STDINT_H stdint.h) + +include_directories(lib ${STDINT_H}) + +add_definitions(-DYY_NO_UNISTD_H -DYY_USE_CONST) + +add_library(libconfig ${C_SOURCES}) +add_library(libconfig++ ${CPP_SOURCES}) + +if(BUILD_SHARED_LIBS) + target_compile_definitions(libconfig PRIVATE -DLIBCONFIG_EXPORTS) + target_compile_definitions(libconfig++ PRIVATE -DLIBCONFIGXX_EXPORTS) +else() + target_compile_definitions(libconfig PUBLIC -DLIBCONFIG_STATIC) + target_compile_definitions(libconfig++ PUBLIC -DLIBCONFIGXX_STATIC) +endif() + +target_link_libraries(libconfig shlwapi) +target_link_libraries(libconfig++ PRIVATE libconfig) + +install( + TARGETS libconfig libconfig++ + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES lib/libconfig.h++ lib/libconfig.h DESTINATION include) +endif() diff --git a/vcpkg/ports/libconfig/CONTROL b/vcpkg/ports/libconfig/CONTROL new file mode 100644 index 0000000..b6b5eb7 --- /dev/null +++ b/vcpkg/ports/libconfig/CONTROL @@ -0,0 +1,4 @@ +Source: libconfig +Version: 1.7.2-2 +Homepage: https://github.com/hyperrealm/libconfig +Description: C/C++ library for processing configuration files diff --git a/vcpkg/ports/libconfig/portfile.cmake b/vcpkg/ports/libconfig/portfile.cmake new file mode 100644 index 0000000..dd5a448 --- /dev/null +++ b/vcpkg/ports/libconfig/portfile.cmake @@ -0,0 +1,37 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO hyperrealm/libconfig + REF v1.7.2 + SHA512 9df57355c2d08381b4a0a6366f0db3633fbe8f73c2bb8c370c040b0bae96ce89ee4ac6c17a5a247fed855d890fa383e5b70cb5573fc9cfc62194d5b94e161cee + 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() + +vcpkg_copy_pdbs() + +foreach(FILE ${CURRENT_PACKAGES_DIR}/include/libconfig.h++ ${CURRENT_PACKAGES_DIR}/include/libconfig.h) + file(READ ${FILE} _contents) + string(REPLACE "defined(LIBCONFIGXX_EXPORTS)" "0" _contents "${_contents}") + string(REPLACE "defined(LIBCONFIG_EXPORTS)" "0" _contents "${_contents}") + + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + string(REPLACE "defined(LIBCONFIGXX_STATIC)" "0" _contents "${_contents}") + string(REPLACE "defined(LIBCONFIG_STATIC)" "0" _contents "${_contents}") + else() + string(REPLACE "defined(LIBCONFIGXX_STATIC)" "1" _contents "${_contents}") + string(REPLACE "defined(LIBCONFIG_STATIC)" "1" _contents "${_contents}") + endif() + file(WRITE ${FILE} "${_contents}") +endforeach() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libconfuse/CMakeLists.txt b/vcpkg/ports/libconfuse/CMakeLists.txt new file mode 100644 index 0000000..651dab2 --- /dev/null +++ b/vcpkg/ports/libconfuse/CMakeLists.txt @@ -0,0 +1,139 @@ +cmake_minimum_required(VERSION 3.14) + +set(ac_init_line_re "AC_INIT\\(([^,]+), ([^,]+), ([^,]+), ([^)]+)\\)") +file(STRINGS + ${CMAKE_CURRENT_LIST_DIR}/configure.ac + ac_init_line + REGEX ${ac_init_line_re} +) + +string(REGEX REPLACE "${ac_init_line_re}" "\\1" PACKAGE_NAME ${ac_init_line}) +string(REGEX REPLACE "${ac_init_line_re}" "\\2" PACKAGE_VERSION ${ac_init_line}) +string(REGEX REPLACE "${ac_init_line_re}" "\\3" PACKAGE_BUGREPORT ${ac_init_line}) +string(REGEX REPLACE "${ac_init_line_re}" "\\4" PACKAGE ${ac_init_line}) + +set(PACKAGE_TARNAME ${PACKAGE}) +set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") + +string(REGEX REPLACE "([0-9]+.[0-9]+.[0-9]+).*" "\\1" SEMANTIC_VERSION ${PACKAGE_VERSION}) + +project(libconfuse VERSION ${SEMANTIC_VERSION} LANGUAGES C) + +include(CheckFunctionExists) +include(CheckIncludeFile) +include(GNUInstallDirs) + +find_package(FLEX REQUIRED) +find_package(Gettext QUIET) +find_package(Intl QUIET) + +set(CMAKE_DISABLE_SOURCE_CHANGES ON) +set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) + +if (GETTEXT_FOUND) + set(ENABLE_NLS 1) +endif () + +# libconfig.pc.in +set(prefix ${CMAKE_INSTALL_PREFIX}) +set(exec_prefix ${prefix}) +set(libdir ${prefix}/${CMAKE_INSTALL_LIBDIR}) +set(includedir ${prefix}/${CMAKE_INSTALL_INCLUDEDIR}) +set(VERSION ${PROJECT_VERSION}) + +if (Intl_FOUND AND Intl_LIBRARIES) + set(LTLIBINTL ${Intl_LIBRARIES}) +endif () + +configure_file(libconfuse.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libconfuse.pc @ONLY) + +check_function_exists(dcgettext HAVE_DCGETTEXT) +check_function_exists(fmemopen HAVE_FMEMOPEN) +check_function_exists(funopen HAVE_FUNOPEN) +check_function_exists(gettext HAVE_GETTEXT) +check_function_exists(iconv HAVE_ICONV) +check_function_exists(strcasecmp HAVE_STRCASECMP) +check_function_exists(strdup HAVE_STRDUP) +check_function_exists(_strdup HAVE__STRDUP) +check_function_exists(strndup HAVE_STRNDUP) +check_function_exists(setenv HAVE_SETENV) +check_function_exists(unsetenv HAVE_UNSETENV) +check_function_exists(_putenv HAVE__PUTENV) + +if (MSVC) + check_function_exists(_fileno HAVE__FILENO) + check_function_exists(_isatty HAVE__ISATTY) + check_function_exists(_stricmp HAVE_STRCASECMP) +endif () + +check_include_file(stdlib.h HAVE_STDLIB_H) +check_include_file(string.h HAVE_STRING_H) + +check_include_file(strings.h HAVE_STRINGS_H) +check_include_file(sys/stat.h HAVE_SYS_STAT_H) +check_include_file(sys/types.h HAVE_SYS_TYPES_H) +check_include_file(unistd.h HAVE_UNISTD_H) +check_include_file(windows.h HAVE_WINDOWS_H) + +configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) + +flex_target( + CONFUSE + src/lexer.l + ${CMAKE_CURRENT_BINARY_DIR}/lexer.c + COMPILE_FLAGS -Pcfg_yy +) + +set(libconfuse_sources + src/confuse.c + ${FLEX_CONFUSE_OUTPUTS} +) + +if (NOT HAVE_FMEMOPEN) + list(APPEND libconfuse_sources src/fmemopen.c) +endif () + +add_library(libconfuse ${libconfuse_sources}) + +if (BUILD_SHARED_LIBS) + if (WIN32) + target_compile_definitions(libconfuse PRIVATE BUILDING_DLL) + endif () +else () + target_compile_definitions(libconfuse PUBLIC BUILDING_STATIC) +endif () + +string(COMPARE EQUAL "${CMAKE_C_COMPILER_ID}" "GNU" USING_GNUC) + +target_compile_definitions(libconfuse + PUBLIC + $ + PRIVATE + $<$:_CRT_SECURE_NO_WARNINGS> + $<$:_CRT_NONSTDC_NO_DEPRECATE> + $<$:strcasecmp=_stricmp> + $<$:_GNU_SOURCE> +) + +target_include_directories(libconfuse + PUBLIC + $ + $ + $ +) + +set_target_properties(libconfuse PROPERTIES PUBLIC_HEADER src/confuse.h) + +install(TARGETS libconfuse EXPORT unofficial-libconfuse-config) + +install( + EXPORT unofficial-libconfuse-config + NAMESPACE unofficial::libconfuse:: + DESTINATION share/unofficial-libconfuse + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) + +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/libconfuse.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig +) diff --git a/vcpkg/ports/libconfuse/CONTROL b/vcpkg/ports/libconfuse/CONTROL new file mode 100644 index 0000000..15044cc --- /dev/null +++ b/vcpkg/ports/libconfuse/CONTROL @@ -0,0 +1,4 @@ +Source: libconfuse +Version: 2019-07-14 +Description: Small configuration file parser library for C +Homepage: https://github.com/martinh/libconfuse diff --git a/vcpkg/ports/libconfuse/config.h.in b/vcpkg/ports/libconfuse/config.h.in new file mode 100644 index 0000000..3a43264 --- /dev/null +++ b/vcpkg/ports/libconfuse/config.h.in @@ -0,0 +1,99 @@ +/* Define if translation of program messages to the user's native + language is requested. */ +#cmakedefine ENABLE_NLS + +/* Define if you have the header file. */ +#cmakedefine HAVE_STDLIB_H + +/* Define if you have the header file. */ +#cmakedefine HAVE_STRING_H + +/* Define if you have the header file. */ +#cmakedefine HAVE_STRINGS_H + +/* Define if you have the header file. */ +#cmakedefine HAVE_SYS_STAT_H + +/* Define if you have the header file. */ +#cmakedefine HAVE_SYS_TYPES_H + +/* Define if you have the header file. */ +#cmakedefine HAVE_UNISTD_H + +/* Define if you have the header file. */ +#cmakedefine HAVE_WINDOWS_H + +/* Define if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if you have the `_fileno' function. */ +#cmakedefine HAVE__FILENO + +/* Define if you have the `_isatty' function. */ +#cmakedefine HAVE__ISATTY + +/* Define if the GNU dcgettext() function is already present or preinstalled. */ +#cmakedefine HAVE_DCGETTEXT + +/* Define if you have the `fmemopen' function. */ +#cmakedefine HAVE_FMEMOPEN + +/* Define if you have the `funopen' function. */ +#cmakedefine HAVE_FUNOPEN + +/* Define if the GNU gettext() function is already present or preinstalled. */ +#cmakedefine HAVE_GETTEXT + +/* Define if you have the iconv() function. */ +#cmakedefine HAVE_ICONV + +/* Define if you have the `strcasecmp' function. */ +#cmakedefine HAVE_STRCASECMP + +/* Define if you have the `strdup' function. */ +#cmakedefine HAVE_STRDUP + +/* Define if you have the `_strdup' function. */ +#cmakedefine HAVE__STRDUP + +/* Define if you have the strndup function */ +#cmakedefine HAVE_STRNDUP + +/* Define if you have the `setenv' function. */ +#cmakedefine HAVE_SETENV + +/* Define if you have the `unsetenv' function. */ +#cmakedefine HAVE_UNSETENV + +/* Define if you have the `_putenv' function. */ +#cmakedefine HAVE__PUTENV + +/* Define if `lex' declares `yytext' as a `char *' by default, not a + `char[]'. */ +/*#undef YYTEXT_POINTER*/ + +/* Define to empty if `const' does not conform to ANSI C. */ +/*#undef const*/ + +/* Name of package */ +#define PACKAGE "@PACKAGE@" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "@PACKAGE_NAME@" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "@PACKAGE_STRING@" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "@PACKAGE_TARNAME@" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "@PACKAGE_VERSION@" + +/* Version number of package */ +#define VERSION "@PACKAGE_VERSION@" + +#define LOCALEDIR "@CMAKE_INSTALL_LOCALEDIR@" diff --git a/vcpkg/ports/libconfuse/portfile.cmake b/vcpkg/ports/libconfuse/portfile.cmake new file mode 100644 index 0000000..01c6290 --- /dev/null +++ b/vcpkg/ports/libconfuse/portfile.cmake @@ -0,0 +1,43 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO martinh/libconfuse + REF 67e1207c8de440525a3fdde1448a586791ebc052 + SHA512 15d4eb0640fe74cc90910820715a70b2f944d2ed9753cca3be90f0ac6840beeda6a370b0624588d81ed2def2f8463e404473721351a685af711cf1d59efb870a + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.in DESTINATION ${SOURCE_PATH}) + +vcpkg_find_acquire_program(FLEX) +get_filename_component(FLEX_DIR ${FLEX} DIRECTORY) +vcpkg_add_to_path(${FLEX_DIR}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/include/confuse.h + "ifdef BUILDING_STATIC" + "if 1 // ifdef BUILDING_STATIC" + ) +endif() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME unofficial-${PORT}) diff --git a/vcpkg/ports/libcopp/CONTROL b/vcpkg/ports/libcopp/CONTROL new file mode 100644 index 0000000..8c91625 --- /dev/null +++ b/vcpkg/ports/libcopp/CONTROL @@ -0,0 +1,6 @@ +Source: libcopp +Version: 1.3.1 +Port-Version: 1 +Description: A cross-platfrom coroutine library for C++ +Maintainer: owent +Homepage: https://libcopp.atframe.work/ diff --git a/vcpkg/ports/libcopp/portfile.cmake b/vcpkg/ports/libcopp/portfile.cmake new file mode 100644 index 0000000..5b6be64 --- /dev/null +++ b/vcpkg/ports/libcopp/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO owt5008137/libcopp + REF 1.3.1 + SHA512 0401f91a98b5e3961bcda45a6249fec72f03c88ae5155f4406ba8922f47ccf187f65d6f13dedb6dcd6934bb6cb742a34e84a2fd29ca9cc5b87ca19a517a64591 + HEAD_REF v2 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE +) + +vcpkg_install_cmake() + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/BOOST_LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") diff --git a/vcpkg/ports/libcrafter/CONTROL b/vcpkg/ports/libcrafter/CONTROL new file mode 100644 index 0000000..47538da --- /dev/null +++ b/vcpkg/ports/libcrafter/CONTROL @@ -0,0 +1,6 @@ +Source: libcrafter +Version: 0.3 +Port-Version: 2 +Homepage: https://github.com/pellegre/libcrafter +Description: Libcrafter is a high level library for C++ designed to create and decode network packets. +Build-Depends: libpcap diff --git a/vcpkg/ports/libcrafter/fix-build-error.patch b/vcpkg/ports/libcrafter/fix-build-error.patch new file mode 100644 index 0000000..cc97b4a --- /dev/null +++ b/vcpkg/ports/libcrafter/fix-build-error.patch @@ -0,0 +1,20 @@ +diff --git a/libcrafter/configure.ac b/libcrafter/configure.ac +index 860d98b..b04ccce 100644 +--- a/libcrafter/configure.ac ++++ b/libcrafter/configure.ac +@@ -35,14 +35,13 @@ AC_ARG_WITH(libpcap, + PCAPINC="-I$withval -I$withval/bpf" + PCAPLIB="-L$withval -lpcap" + elif test -f $withval/include/pcap.h -a \ +- -f $withval/include/net/bpf.h -a \ + -f $withval/lib/libpcap.a; then + owd=`pwd` + if cd $withval; then withval=`pwd`; cd $owd; fi + PCAPINC="-I$withval/include" + PCAPLIB="-L$withval/lib -lpcap" + else +- AC_ERROR(pcap.h, net/bpf.h, or libpcap.a not found in $withval) ++ AC_ERROR(pcap.h, or libpcap.a not found in $withval) + fi + ;; + esac ], diff --git a/vcpkg/ports/libcrafter/portfile.cmake b/vcpkg/ports/libcrafter/portfile.cmake new file mode 100644 index 0000000..565a0c3 --- /dev/null +++ b/vcpkg/ports/libcrafter/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pellegre/libcrafter + REF version-0.3 + SHA512 7c396ba942b304dddfaa569adb44697f75568d3ef2ed48dda758e281f3b7c172439309033bbf5498069a4a61a952f93e41af99b129ce874ce76b5ec08da58116 + HEAD_REF master + PATCHES fix-build-error.patch +) + +vcpkg_configure_make( + AUTOCONFIG + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH libcrafter + OPTIONS + "--with-libpcap=${CURRENT_INSTALLED_DIR}" +) + +vcpkg_install_make() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/libcrafter/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) \ No newline at end of file diff --git a/vcpkg/ports/libcroco/CMakeLists.txt b/vcpkg/ports/libcroco/CMakeLists.txt new file mode 100644 index 0000000..ff11792 --- /dev/null +++ b/vcpkg/ports/libcroco/CMakeLists.txt @@ -0,0 +1,139 @@ +cmake_minimum_required(VERSION 3.11) +project(libcroco C) + +find_package(unofficial-iconv REQUIRED) +find_package(unofficial-gettext CONFIG REQUIRED) +find_package(unofficial-glib CONFIG REQUIRED) +find_package(LibXml2 REQUIRED) +if(NOT WIN32) + find_package(Threads REQUIRED) +endif() +find_path(GLIB_INCLUDE_DIR glib.h) + +file(GLOB SOURCES + src/cr-utils.c + src/cr-utils.h + src/cr-input.c + src/cr-input.h + src/cr-enc-handler.c + src/cr-enc-handler.h + src/cr-num.c + src/cr-num.h + src/cr-rgb.c + src/cr-rgb.h + src/cr-token.c + src/cr-token.h + src/cr-tknzr.c + src/cr-tknzr.h + src/cr-term.c + src/cr-term.h + src/cr-attr-sel.c + src/cr-attr-sel.h + src/cr-pseudo.c + src/cr-pseudo.h + src/cr-additional-sel.c + src/cr-additional-sel.h + src/cr-simple-sel.c + src/cr-simple-sel.h + src/cr-selector.c + src/cr-selector.h + src/cr-doc-handler.c + src/cr-doc-handler.h + src/cr-parser.c + src/cr-parser.h + src/cr-declaration.c + src/cr-declaration.h + src/cr-statement.c + src/cr-statement.h + src/cr-stylesheet.c + src/cr-stylesheet.h + src/cr-cascade.c + src/cr-cascade.h + src/cr-om-parser.c + src/cr-om-parser.h + src/cr-style.c + src/cr-style.h + src/cr-sel-eng.c + src/cr-sel-eng.h + src/cr-fonts.c + src/cr-fonts.h + src/cr-prop-list.c + src/cr-prop-list.h + src/cr-parsing-location.c + src/cr-parsing-location.h + src/cr-string.c + src/cr-string.h + src/libcroco.def +) + +set(CMAKE_DEBUG_POSTFIX "d") + +add_library(croco-0.6 ${SOURCES}) + +target_include_directories(croco-0.6 PRIVATE ${GLIB_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR}) +target_link_libraries(croco-0.6 PRIVATE + unofficial::glib::gio + unofficial::glib::glib + unofficial::glib::gmodule + unofficial::glib::gobject + ${LIBXML2_LIBRARIES} +) + +install(TARGETS croco-0.6 + EXPORT libcroco-targets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install(FILES + src/libcroco.h + src/cr-additional-sel.h + src/cr-attr-sel.h + src/cr-cascade.h + src/cr-declaration.h + src/cr-doc-handler.h + src/cr-enc-handler.h + src/cr-input.h + src/cr-num.h + src/cr-om-parser.h + src/cr-parser.h + src/cr-pseudo.h + src/cr-rgb.h + src/cr-selector.h + src/cr-simple-sel.h + src/cr-statement.h + src/cr-stylesheet.h + src/cr-term.h + src/cr-tknzr.h + src/cr-token.h + src/cr-utils.h + src/cr-fonts.h + src/cr-sel-eng.h + src/cr-style.h + src/cr-prop-list.h + src/cr-parsing-location.h + src/cr-string.h + src/libcroco-config.h + DESTINATION include/libcroco +) + +install( + EXPORT libcroco-targets + NAMESPACE unofficial::libcroco:: + FILE unofficial-libcroco-targets.cmake + DESTINATION share/unofficial-libcroco +) + +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/unofficial-libcroco-config.cmake " +include(CMakeFindDependencyMacro) +find_dependency(unofficial-gettext) +find_dependency(unofficial-iconv CONFIG) +find_dependency(unofficial-glib CONFIG) +find_dependency(LibXml2) +if(NOT WIN32) + find_dependency(Threads) +endif() +include(\${CMAKE_CURRENT_LIST_DIR}/unofficial-libcroco-targets.cmake) +") +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-libcroco-config.cmake DESTINATION share/unofficial-libcroco) diff --git a/vcpkg/ports/libcroco/CONTROL b/vcpkg/ports/libcroco/CONTROL new file mode 100644 index 0000000..8badbec --- /dev/null +++ b/vcpkg/ports/libcroco/CONTROL @@ -0,0 +1,4 @@ +Source: libcroco +Version: 0.6.13-1 +Description: A standalone css2 parsing and manipulation library +Build-Depends: glib, libxml2 diff --git a/vcpkg/ports/libcroco/portfile.cmake b/vcpkg/ports/libcroco/portfile.cmake new file mode 100644 index 0000000..b5c3323 --- /dev/null +++ b/vcpkg/ports/libcroco/portfile.cmake @@ -0,0 +1,36 @@ +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "https://download.gnome.org/sources/libcroco/0.6/libcroco-0.6.13.tar.xz" + FILENAME "libcroco-0.6.13.tar.xz" + SHA512 038a3ac9d160a8cf86a8a88c34367e154ef26ede289c93349332b7bc449a5199b51ea3611cebf3a2416ae23b9e45ecf8f9c6b24ea6d16a5519b796d3c7e272d4 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +configure_file(${SOURCE_PATH}/config.h.win32 ${SOURCE_PATH}/src/config.h COPYONLY) +file(READ "${SOURCE_PATH}/src/libcroco.symbols" SYMBOLS) +string(REGEX REPLACE ";[^\n]*\n" "" DEF "EXPORTS\n${SYMBOLS}") +file(WRITE "${SOURCE_PATH}/src/libcroco.def" "${DEF}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-libcroco TARGET_PATH share/unofficial-libcroco) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libcroco RENAME copyright) + +vcpkg_copy_pdbs() + +# Post-build test for cmake libraries +vcpkg_test_cmake(PACKAGE_NAME libcroco) diff --git a/vcpkg/ports/libcuckoo/CONTROL b/vcpkg/ports/libcuckoo/CONTROL new file mode 100644 index 0000000..b9c1440 --- /dev/null +++ b/vcpkg/ports/libcuckoo/CONTROL @@ -0,0 +1,3 @@ +Source: libcuckoo +Version: 2018-12-24-1 +Description: A high-performance, concurrent hash table diff --git a/vcpkg/ports/libcuckoo/portfile.cmake b/vcpkg/ports/libcuckoo/portfile.cmake new file mode 100644 index 0000000..15d6df3 --- /dev/null +++ b/vcpkg/ports/libcuckoo/portfile.cmake @@ -0,0 +1,34 @@ +# Header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO efficient/libcuckoo + REF f3138045810b2c2e9b59dbede296b4a5194af4f9 + SHA512 b1682b7175b2a7fd22c34cbaf9770f2f1bfb3f0d1be046338a8a489c302f0434ca1cbf2ffe5845e09aba132b0be6a1d6472b66b4518bb172b82af93a9d27cd21 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_EXAMPLES=OFF + -DBUILD_TESTS=OFF + -DBUILD_STRESS_TESTS=OFF + -DBUILD_UNIT_TESTS=OFF + -DBUILD_UNIVERSAL_BENCHMARK=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +#vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/vcpkg/ports/libdatrie/CMakeLists.txt b/vcpkg/ports/libdatrie/CMakeLists.txt new file mode 100644 index 0000000..bdc1c21 --- /dev/null +++ b/vcpkg/ports/libdatrie/CMakeLists.txt @@ -0,0 +1,94 @@ +cmake_minimum_required(VERSION 3.0) +project(libdatrie LANGUAGES C) + +option(SKIP_HEADERS "Skip headers" OFF) +option(SKIP_TOOL "Skip tool" OFF) +option(BUILD_SHARED_LIBS "Build shared libs" OFF) + +set(LIB_SRCS + datrie/alpha-map.c + datrie/darray.c + datrie/dstring.c + datrie/fileutils.c + datrie/tail.c + datrie/trie.c + datrie/trie-string.c +) + +set(LIB_HDRS + datrie/alpha-map.h + datrie/trie.h + datrie/triedefs.h + datrie/typedefs.h +) + +if(WIN32) + list(APPEND LIB_SRCS datrie/libdatrie.def) +endif() + +include(CheckIncludeFile) +include(CheckFunctionExists) + +set(STDC_HEADERS 1) +check_include_file(dlfcn.h HAVE_DLFCN_H) +check_include_file(inttypes.h HAVE_INTTYPES_H) +check_include_file(limits.h HAVE_LIMITS_H) +check_include_file(memory.h HAVE_MEMORY_H) +check_include_file(stdint.h HAVE_STDINT_H) +check_include_file(stdio.h HAVE_STDIO_H) +check_include_file(stdlib.h HAVE_STDLIB_H) +check_include_file(strings.h HAVE_STRINGS_H) +check_include_file(string.h HAVE_STRING_H) +check_include_file(sys/stat.h HAVE_SYS_STAT_H) +check_include_file(sys/types.h HAVE_SYS_TYPES_H) +check_include_file(unistd.h HAVE_UNISTD_H) + +check_function_exists(nl_langinfo HAVE_LANGINFO_CODESET) +check_function_exists(locale_charset HAVE_LOCALE_CHARSET) +check_function_exists(malloc HAVE_MALLOC) + +configure_file(config.h.cmake config.h) + +add_library(libdatrie ${LIB_SRCS}) +target_include_directories(libdatrie PRIVATE ".") +target_include_directories(libdatrie PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) +set_target_properties(libdatrie PROPERTIES PREFIX "") +set_target_properties(libdatrie PROPERTIES DEBUG_POSTFIX "d") + +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) +endif() + + +if (NOT SKIP_TOOL) + add_executable(trietool "tools/trietool.c" ) + target_include_directories(trietool PRIVATE ".") + target_include_directories(trietool PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) + target_link_libraries(trietool libdatrie) + + find_path(ICONV_INCLUDE_DIR iconv.h) + find_library(ICONV_LIBRARY NAMES iconv libiconv) + find_library(CHARSET_LIBRARY NAMES charset libcharset) + target_include_directories(trietool PRIVATE ${ICONV_INCLUDE_DIR}) + target_link_libraries(trietool ${ICONV_LIBRARY} ${CHARSET_LIBRARY}) + + install( + TARGETS trietool + RUNTIME DESTINATION bin + ) +endif() + +install( + TARGETS libdatrie + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if (NOT SKIP_HEADERS) + install( + FILES ${LIB_HDRS} + DESTINATION "include/datrie" + ) +endif() diff --git a/vcpkg/ports/libdatrie/CONTROL b/vcpkg/ports/libdatrie/CONTROL new file mode 100644 index 0000000..ddcdf99 --- /dev/null +++ b/vcpkg/ports/libdatrie/CONTROL @@ -0,0 +1,5 @@ +Source: libdatrie +Version: 0.2.10-3 +Homepage: https://linux.thai.net/pub/ThaiLinux/software/libthai +Description: implementation of double-array structure for representing trie +Build-Depends: libiconv diff --git a/vcpkg/ports/libdatrie/config.h.cmake b/vcpkg/ports/libdatrie/config.h.cmake new file mode 100644 index 0000000..9d575d6 --- /dev/null +++ b/vcpkg/ports/libdatrie/config.h.cmake @@ -0,0 +1,87 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_INTTYPES_H + +/* Have nl_langinfo (CODESET) */ +#cmakedefine HAVE_LANGINFO_CODESET + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_LIMITS_H + +/* Have locale_charset() */ +#cmakedefine HAVE_LOCALE_CHARSET + +/* Define to 1 if your system has a GNU libc compatible `malloc' function, and + to 0 otherwise. */ +#cmakedefine HAVE_MALLOC + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_MEMORY_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STDIO_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_UNISTD_H + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#cmakedefine LT_OBJDIR + +/* Name of package */ +#define PACKAGE "libdatrie" + +/* Define to the address where bug reports for this package should be sent. */ +#cmakedefine PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libdatrie" + +/* Define to the full name and version of this package. */ +#cmakedefine PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#cmakedefine PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#define PACKAGE_URL "https://linux.thai.net/~thep/datrie/datrie.html" + +/* Define to the version of this package. */ +#cmakedefine PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#cmakedefine STDC_HEADERS 1 + +/* Version number of package */ +#cmakedefine VERSION "@VERSION@" + +/* Define to empty if `const' does not conform to ANSI C. */ +#cmakedefine const + +/* Define to rpl_malloc if the replacement function should be used. */ +#cmakedefine malloc + +/* Define to `unsigned int' if does not define. */ +#cmakedefine size_t diff --git a/vcpkg/ports/libdatrie/fix-exports.patch b/vcpkg/ports/libdatrie/fix-exports.patch new file mode 100644 index 0000000..3c407c2 --- /dev/null +++ b/vcpkg/ports/libdatrie/fix-exports.patch @@ -0,0 +1,8 @@ +diff -Naur ./a/libdatrie.def ./b/libdatrie.def +--- a/datrie/libdatrie.def 2013-10-17 06:27:57.000000000 +0300 ++++ b/datrie/libdatrie.def 2017-12-21 02:42:39.873879000 +0300 +@@ -1,3 +1,4 @@ ++EXPORTS + alpha_map_new + alpha_map_clone + alpha_map_free diff --git a/vcpkg/ports/libdatrie/fix-trietool.patch b/vcpkg/ports/libdatrie/fix-trietool.patch new file mode 100644 index 0000000..bcecee2 --- /dev/null +++ b/vcpkg/ports/libdatrie/fix-trietool.patch @@ -0,0 +1,31 @@ +From 086a76ad7c17060d504371ea724cf5d651d43eb3 Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka +Date: Thu, 28 Dec 2017 16:07:51 +0300 +Subject: [PATCH] fix trietool for MSVC runtime + +--- + tools/trietool.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tools/trietool.c b/tools/trietool.c +index 4cfde2a..7c90905 100644 +--- a/tools/trietool.c ++++ b/tools/trietool.c +@@ -589,12 +589,12 @@ string_trim (char *s) + char *p; + + /* skip leading white spaces */ +- while (*s && isspace (*s)) ++ while (*s && isspace ((unsigned char)*s)) + ++s; + + /* trim trailing white spaces */ + p = s + strlen (s) - 1; +- while (isspace (*p)) ++ while (isspace ((unsigned char)*p)) + --p; + *++p = '\0'; + +-- +2.14.1.windows.1 + diff --git a/vcpkg/ports/libdatrie/portfile.cmake b/vcpkg/ports/libdatrie/portfile.cmake new file mode 100644 index 0000000..74b8bbd --- /dev/null +++ b/vcpkg/ports/libdatrie/portfile.cmake @@ -0,0 +1,54 @@ +set(LIBDATRIE_VERSION 0.2.10) + +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "https://linux.thai.net/pub/ThaiLinux/software/libthai/libdatrie-${LIBDATRIE_VERSION}.tar.xz" + FILENAME "libdatrie-${LIBDATRIE_VERSION}.tar.xz" + SHA512 ee68ded9d6e06c562da462d42e7e56098a82478d7b8547506200c3018b72536c4037a4e518924f779dc77d3ab139d93216bdb29ab4116b9dc9efd1a5d1eb9e31 +) + +vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/fix-exports.patch" + "${CMAKE_CURRENT_LIST_DIR}/fix-trietool.patch" +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.cmake DESTINATION ${SOURCE_PATH}) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(SKIP_TOOL ON) +else() + set(SKIP_TOOL OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DVERSION=${LIBDATRIE_VERSION} + OPTIONS_RELEASE + -DSKIP_TOOL=${SKIP_TOOL} + -DSKIP_HEADERS=OFF + OPTIONS_DEBUG + -DSKIP_TOOL=ON + -DSKIP_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/trietool.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/trietool.exe) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libdatrie RENAME copyright) diff --git a/vcpkg/ports/libde265/CONTROL b/vcpkg/ports/libde265/CONTROL new file mode 100644 index 0000000..09ab2f2 --- /dev/null +++ b/vcpkg/ports/libde265/CONTROL @@ -0,0 +1,5 @@ +Source: libde265 +Version: 1.0.5 +Homepage: https://www.libde265.org/ +Description: Open h.265 video codec implementation. +Supports: !(arm|uwp) diff --git a/vcpkg/ports/libde265/portfile.cmake b/vcpkg/ports/libde265/portfile.cmake new file mode 100644 index 0000000..70cfe2e --- /dev/null +++ b/vcpkg/ports/libde265/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO strukturag/libde265 + REF v1.0.5 + SHA512 3ff7310fc4621cac0ef1cb9bbc4df61724f8943d57f5263a3663a77f4d90d84716b2a708ee9fec306e909dc8b5e7fe645a641b6a6db795a89a01799be910831e + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libde265/) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libdisasm/CMakeLists.txt b/vcpkg/ports/libdisasm/CMakeLists.txt new file mode 100644 index 0000000..c3a8dfa --- /dev/null +++ b/vcpkg/ports/libdisasm/CMakeLists.txt @@ -0,0 +1,48 @@ +cmake_minimum_required(VERSION 3.9) +project(libdisasm C) + +set(CMAKE_DEBUG_POSTFIX d) + +set(SRCS + libdisasm/ia32_implicit.c + libdisasm/ia32_implicit.h + libdisasm/ia32_insn.c + libdisasm/ia32_insn.h + libdisasm/ia32_invariant.c + libdisasm/ia32_invariant.h + libdisasm/ia32_modrm.c + libdisasm/ia32_modrm.h + libdisasm/ia32_opcode_tables.c + libdisasm/ia32_opcode_tables.h + libdisasm/ia32_operand.c + libdisasm/ia32_operand.h + libdisasm/ia32_reg.c + libdisasm/ia32_reg.h + libdisasm/ia32_settings.c + libdisasm/ia32_settings.h + libdisasm/libdis.h + libdisasm/qword.h + libdisasm/x86_disasm.c + libdisasm/x86_format.c + libdisasm/x86_imm.c + libdisasm/x86_imm.h + libdisasm/x86_insn.c + libdisasm/x86_misc.c + libdisasm/x86_operand_list.c + libdisasm/x86_operand_list.h +) + +include_directories(libdisasm) + +add_library(libdisasm ${SRCS}) + +install( + TARGETS libdisasm + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES libdisasm/libdis.h DESTINATION include) +endif() diff --git a/vcpkg/ports/libdisasm/CONTROL b/vcpkg/ports/libdisasm/CONTROL new file mode 100644 index 0000000..1a09c87 --- /dev/null +++ b/vcpkg/ports/libdisasm/CONTROL @@ -0,0 +1,4 @@ +Source: libdisasm +Version: 0.23-7 +Homepage: https://sourceforge.net/projects/bastard +Description: x86 Disassembler Library. diff --git a/vcpkg/ports/libdisasm/portfile.cmake b/vcpkg/ports/libdisasm/portfile.cmake new file mode 100644 index 0000000..46ea1df --- /dev/null +++ b/vcpkg/ports/libdisasm/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO bastard/libdisasm + REF 0.23 + FILENAME "libdisasm-0.23.tar.gz" + SHA512 29eecfbfd8168188242278a1a38f0c90770d0581a52d4600ae6343829dd0d6607b98329f12a3d7409d43dd56dca6a7d1eb25d58a001c2bfd3eb8474c0e7879e7 + PATCHES sizeofvoid.patch +) + +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() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libdisasm/sizeofvoid.patch b/vcpkg/ports/libdisasm/sizeofvoid.patch new file mode 100644 index 0000000..1e4e008 --- /dev/null +++ b/vcpkg/ports/libdisasm/sizeofvoid.patch @@ -0,0 +1,27 @@ +--- a/libdisasm/x86_disasm.c ++++ b/libdisasm/x86_disasm.c +@@ -35,7 +35,7 @@ unsigned int x86_disasm( unsigned char *buf, unsigned int buf_len, + + if ( offset >= buf_len ) { + /* another caller screwup ;) */ +- x86_report_error(report_disasm_bounds, (void*)(long)buf_rva+offset); ++ x86_report_error(report_disasm_bounds, (void*)(long)(buf_rva+offset)); + return 0; + } + +@@ -53,13 +53,13 @@ unsigned int x86_disasm( unsigned char *buf, unsigned int buf_len, + + /* check and see if we had an invalid instruction */ + if (! size ) { +- x86_report_error(report_invalid_insn, (void*)(long)buf_rva+offset ); ++ x86_report_error(report_invalid_insn, (void*)(long)(buf_rva+offset)); + return 0; + } + + /* check if we overran the end of the buffer */ + if ( size > len ) { +- x86_report_error( report_insn_bounds, (void*)(long)buf_rva + offset ); ++ x86_report_error( report_insn_bounds, (void*)(long)(buf_rva + offset)); + MAKE_INVALID( insn, bytes ); + return 0; + } diff --git a/vcpkg/ports/libdivide/CONTROL b/vcpkg/ports/libdivide/CONTROL new file mode 100644 index 0000000..95af9a7 --- /dev/null +++ b/vcpkg/ports/libdivide/CONTROL @@ -0,0 +1,7 @@ +Source: libdivide +Version: 3.0 +Homepage: https://github.com/ridiculousfish/libdivide +Description: libdivide.h is a header-only C/C++ library for optimizing integer division. + +Feature: test +Description: Build test \ No newline at end of file diff --git a/vcpkg/ports/libdivide/portfile.cmake b/vcpkg/ports/libdivide/portfile.cmake new file mode 100644 index 0000000..17f63e4 --- /dev/null +++ b/vcpkg/ports/libdivide/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ridiculousfish/libdivide + REF v3.0 + SHA512 fae17a4125c3b17aeb37283d7bba9fea2e4d3b208861d6ed81a6cdcf5dbf3286cf676cedba99c73a16115cf8bf9dcbd2cf6a48ca52fb85d4b0b24024e53d055e + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + test BUILD_TESTS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DLIBDIVIDE_SSE2=OFF + -DLIBDIVIDE_AVX2=OFF + -DLIBDIVIDE_AVX512=OFF + -DENABLE_VECTOR_EXTENSIONS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libdshowcapture/CONTROL b/vcpkg/ports/libdshowcapture/CONTROL new file mode 100644 index 0000000..3d88262 --- /dev/null +++ b/vcpkg/ports/libdshowcapture/CONTROL @@ -0,0 +1,3 @@ +Source: libdshowcapture +Version: 0.6.0-1 +Description: Free and Open Source C++11 Library for capturing DirectShow video/audio devices on windows. diff --git a/vcpkg/ports/libdshowcapture/portfile.cmake b/vcpkg/ports/libdshowcapture/portfile.cmake new file mode 100644 index 0000000..fa0e2d8 --- /dev/null +++ b/vcpkg/ports/libdshowcapture/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO obsproject/libdshowcapture + REF cba07c63810f51a58f6fb7f2e3b0fb162b5a6313 + SHA512 962f5886f637f06580db9b90d238cdb76976846c5b1d49112910fda0da689788abec1d1703aa4e91ee4be57f328eb8183c04f94119662e1243269ae66f023c84 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_build_cmake(TARGET libdshowcapture) + +# Copy files +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libdshowcapture RENAME copyright) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libdshowcapture.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libdshowcapture.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +endif() +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libdshowcapture.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libdshowcapture.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL ${SOURCE_PATH}/dshowcapture.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/libepoxy/CONTROL b/vcpkg/ports/libepoxy/CONTROL new file mode 100644 index 0000000..93d1aed --- /dev/null +++ b/vcpkg/ports/libepoxy/CONTROL @@ -0,0 +1,6 @@ +Source: libepoxy +Version: 1.5.4 +Port-Version: 1 +Homepage: https://github.com/anholt/libepoxy +Description: Epoxy is a library for handling OpenGL function pointer management for you +Build-Depends: tool-meson diff --git a/vcpkg/ports/libepoxy/libepoxy-1.5.4_Add_call_convention_to_mock_function.patch b/vcpkg/ports/libepoxy/libepoxy-1.5.4_Add_call_convention_to_mock_function.patch new file mode 100644 index 0000000..d6ddd92 --- /dev/null +++ b/vcpkg/ports/libepoxy/libepoxy-1.5.4_Add_call_convention_to_mock_function.patch @@ -0,0 +1,22 @@ +From 81d758d025089d6b3b5309205ff4cb75789e6205 Mon Sep 17 00:00:00 2001 +From: crziter +Date: Tue, 25 Feb 2020 11:33:56 +0700 +Subject: [PATCH] Add call convention to mock function + +--- + test/gl_version.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/gl_version.c b/test/gl_version.c +index 9ab0080..9fe1bba 100644 +--- a/test/gl_version.c ++++ b/test/gl_version.c +@@ -29,7 +29,7 @@ GLenum mock_enum; + const char *mock_gl_version; + const char *mock_glsl_version; + +-static const GLubyte *override_glGetString(GLenum name) ++static const GLubyte * EPOXY_CALLSPEC override_glGetString(GLenum name) + { + switch (name) { + case GL_VERSION: diff --git a/vcpkg/ports/libepoxy/portfile.cmake b/vcpkg/ports/libepoxy/portfile.cmake new file mode 100644 index 0000000..caaa02a --- /dev/null +++ b/vcpkg/ports/libepoxy/portfile.cmake @@ -0,0 +1,76 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO anholt/libepoxy + REF 1.5.4 + SHA512 c8b03f0a39df320fdd163a34c35f9ffbed51bc0174fd89a7dc4b3ab2439413087e1e1a2fe57418520074abd435051cbf03eb2a7bf8897da1712bbbc69cf27cc5 + HEAD_REF master + PATCHES + # https://github.com/anholt/libepoxy/pull/220 + libepoxy-1.5.4_Add_call_convention_to_mock_function.patch +) + +if (VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_OSX) + vcpkg_configure_meson(SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -Denable-glx=no + -Denable-egl=no) + vcpkg_install_meson() + vcpkg_copy_pdbs() +else() + find_program(autoreconf autoreconf) + if (NOT autoreconf OR NOT EXISTS "/usr/share/doc/libgles2/copyright") + message(FATAL_ERROR "autoreconf and libgles2-mesa-dev must be installed before libepoxy can build. Install them with \"apt-get install dh-autoreconf libgles2-mesa-dev\".") + endif() + + find_program(MAKE make) + if (NOT MAKE) + message(FATAL_ERROR "MAKE not found") + endif() + + file(REMOVE_RECURSE ${SOURCE_PATH}/m4) + file(MAKE_DIRECTORY ${SOURCE_PATH}/m4) + + set(LIBEPOXY_CONFIG_ARGS "--enable-x11=yes --enable-glx=yes --enable-egl=yes") + + vcpkg_execute_required_process( + COMMAND "autoreconf" -v --install + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME autoreconf-${TARGET_TRIPLET} + ) + + message(STATUS "Configuring ${TARGET_TRIPLET}") + set(OUT_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/make-build-${TARGET_TRIPLET}-release) + + file(REMOVE_RECURSE ${OUT_PATH_RELEASE}) + file(MAKE_DIRECTORY ${OUT_PATH_RELEASE}) + + vcpkg_execute_required_process( + COMMAND "./configure" --prefix=${OUT_PATH_RELEASE} "${LIBEPOXY_CONFIG_ARGS}" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME config-${TARGET_TRIPLET} + ) + + message(STATUS "Building ${TARGET_TRIPLET}") + vcpkg_execute_required_process( + COMMAND make + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-release + ) + + message(STATUS "Installing ${TARGET_TRIPLET}") + vcpkg_execute_required_process( + COMMAND make install + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME install-${TARGET_TRIPLET}-release + ) + file(COPY ${OUT_PATH_RELEASE}/include DESTINATION ${CURRENT_PACKAGES_DIR}) + file(COPY ${OUT_PATH_RELEASE}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share/pkgconfig) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libevent/CONTROL b/vcpkg/ports/libevent/CONTROL new file mode 100644 index 0000000..fd98e58 --- /dev/null +++ b/vcpkg/ports/libevent/CONTROL @@ -0,0 +1,13 @@ +Source: libevent +Version: 2.1.12 +Homepage: https://github.com/libevent/libevent +Description: An event notification library +Supports: !uwp +Default-Features: thread + +Feature: openssl +Description: Support for openssl +Build-Depends: openssl, libevent[thread] + +Feature: thread +Description: Support for thread diff --git a/vcpkg/ports/libevent/fix-LibeventConfig_cmake_in_path.patch b/vcpkg/ports/libevent/fix-LibeventConfig_cmake_in_path.patch new file mode 100644 index 0000000..9566f15 --- /dev/null +++ b/vcpkg/ports/libevent/fix-LibeventConfig_cmake_in_path.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/LibeventConfig.cmake.in b/cmake/LibeventConfig.cmake.in +index 7b808c3..fbf67be 100644 +--- a/cmake/LibeventConfig.cmake.in ++++ b/cmake/LibeventConfig.cmake.in +@@ -58,7 +58,7 @@ endif() + + # Get the path of the current file. + get_filename_component(LIBEVENT_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +-get_filename_component(_INSTALL_PREFIX "${LIBEVENT_CMAKE_DIR}/../../.." ABSOLUTE) ++get_filename_component(_INSTALL_PREFIX "${LIBEVENT_CMAKE_DIR}/../.." ABSOLUTE) + + macro(message_if_needed _flag _msg) + if (NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY) diff --git a/vcpkg/ports/libevent/fix-file_path.patch b/vcpkg/ports/libevent/fix-file_path.patch new file mode 100644 index 0000000..fb34080 --- /dev/null +++ b/vcpkg/ports/libevent/fix-file_path.patch @@ -0,0 +1,22 @@ +diff --git a/cmake/AddEventLibrary.cmake b/cmake/AddEventLibrary.cmake +index 04f5837..95d9808 100644 +--- a/cmake/AddEventLibrary.cmake ++++ b/cmake/AddEventLibrary.cmake +@@ -42,7 +42,7 @@ macro(export_install_target TYPE LIB_NAME OUTER_INCLUDES) + install(TARGETS "${LIB_NAME}_${TYPE}" + LIBRARY DESTINATION "lib" COMPONENT lib + ARCHIVE DESTINATION "lib" COMPONENT lib +- RUNTIME DESTINATION "lib" COMPONENT lib ++ RUNTIME DESTINATION "bin" COMPONENT bin + COMPONENT dev + ) + else() +@@ -69,7 +69,7 @@ macro(export_install_target TYPE LIB_NAME OUTER_INCLUDES) + EXPORT LibeventTargets-${TYPE} + LIBRARY DESTINATION "lib" COMPONENT lib + ARCHIVE DESTINATION "lib" COMPONENT lib +- RUNTIME DESTINATION "lib" COMPONENT lib ++ RUNTIME DESTINATION "bin" COMPONENT bin + COMPONENT dev + ) + endif() diff --git a/vcpkg/ports/libevent/portfile.cmake b/vcpkg/ports/libevent/portfile.cmake new file mode 100644 index 0000000..9865cec --- /dev/null +++ b/vcpkg/ports/libevent/portfile.cmake @@ -0,0 +1,70 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} does not currently support UWP" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libevent/libevent + REF release-2.1.12-stable + SHA512 5d6c6f0072f69a68b190772d4c973ce8f33961912032cdc104ad0854c0950f9d7e28bc274ca9df23897937f0cd8e45d1f214543d80ec271c5a6678814a7f195e + PATCHES + fix-file_path.patch + fix-LibeventConfig_cmake_in_path.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES + openssl EVENT__DISABLE_OPENSSL + thread EVENT__DISABLE_THREAD_SUPPORT +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(LIBEVENT_LIB_TYPE SHARED) +else() + set(LIBEVENT_LIB_TYPE STATIC) +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL "static") + set(LIBEVENT_STATIC_RUNTIME ON) +else() + set(LIBEVENT_STATIC_RUNTIME OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DEVENT__LIBRARY_TYPE=${LIBEVENT_LIB_TYPE} + -DEVENT__MSVC_STATIC_RUNTIME=${LIBEVENT_STATIC_RUNTIME} + -DEVENT__DISABLE_BENCHMARK=ON + -DEVENT__DISABLE_TESTS=ON + -DEVENT__DISABLE_REGRESS=ON + -DEVENT__DISABLE_SAMPLES=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/libevent/) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/event_rpcgen.py ${CURRENT_PACKAGES_DIR}/tools/libevent/event_rpcgen.py) + +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 ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +set(_target_suffix) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(_target_suffix static) +else() + set(_target_suffix shared) +endif() +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/libevent/LibeventTargets-${_target_suffix}.cmake + "${CURRENT_PACKAGES_DIR}" + "${CURRENT_INSTALLED_DIR}" +) + +vcpkg_copy_pdbs() + +#Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libevhtp/CONTROL b/vcpkg/ports/libevhtp/CONTROL new file mode 100644 index 0000000..1653bf2 --- /dev/null +++ b/vcpkg/ports/libevhtp/CONTROL @@ -0,0 +1,16 @@ +Source: libevhtp +Version: 1.2.18 +Homepage: https://github.com/criticalstack/libevhtp +Build-Depends: libevent +Description: Libevhtp was created as a replacement API for Libevent's current HTTP API. + +Feature: openssl +Description: Support SSL for libevhtp +Build-Depends: openssl + +Feature: thread +Description: Support thread for libevhtp + +Feature: regex +Description: Support oniguruma for libevhtp +Build-Depends: oniguruma \ No newline at end of file diff --git a/vcpkg/ports/libevhtp/portfile.cmake b/vcpkg/ports/libevhtp/portfile.cmake new file mode 100644 index 0000000..ddd97c1 --- /dev/null +++ b/vcpkg/ports/libevhtp/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports Linux and Mac platform" ON_TARGET "Windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO criticalstack/libevhtp + REF e200bfa85bf253e9cfe1c1a9e705fccb176b9171 + SHA512 d77d6d12dcc2762c8311a04cd3d33c7dfde7b406dbbb544d683e6a3b8e5912ba37a196470bc5aca92b58bd9659fbb396e5a11234b98435534f535046d6dab6eb + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES + openssl EVHTP_DISABLE_SSL + thread EVHTP_DISABLE_EVTHR + regex EVHTP_DISABLE_REGEX +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/libexif/CMakeLists.txt b/vcpkg/ports/libexif/CMakeLists.txt new file mode 100644 index 0000000..ac32e82 --- /dev/null +++ b/vcpkg/ports/libexif/CMakeLists.txt @@ -0,0 +1,142 @@ +cmake_minimum_required(VERSION 3.0) +project(libexif LANGUAGES C) + +set(PACKAGE "libexif") + +option(ENABLE_NLS "Enable NLS" OFF) + +set(HEADERS + libexif/_stdint.h + libexif/exif.h + libexif/exif-byte-order.h + libexif/exif-content.h + libexif/exif-data.h + libexif/exif-data-type.h + libexif/exif-entry.h + libexif/exif-format.h + libexif/exif-ifd.h + libexif/exif-loader.h + libexif/exif-log.h + libexif/exif-mem.h + libexif/exif-mnote-data.h + libexif/exif-mnote-data-priv.h + libexif/exif-system.h + libexif/exif-tag.h + libexif/exif-utils.h +) + +set(SOURCES + libexif/exif-byte-order.c + libexif/exif-content.c + libexif/exif-data.c + libexif/exif-entry.c + libexif/exif-format.c + libexif/exif-ifd.c + libexif/exif-loader.c + libexif/exif-log.c + libexif/exif-mem.c + libexif/exif-mnote-data.c + libexif/exif-tag.c + libexif/exif-utils.c +) + +set(HEADERS_CANON + libexif/canon/exif-mnote-data-canon.h + libexif/canon/mnote-canon-entry.h + libexif/canon/mnote-canon-tag.h +) + +set(SOURCES_CANON + libexif/canon/exif-mnote-data-canon.c + libexif/canon/mnote-canon-entry.c + libexif/canon/mnote-canon-tag.c +) + +set(HEADERS_FUJI + libexif/fuji/exif-mnote-data-fuji.h + libexif/fuji/mnote-fuji-entry.h + libexif/fuji/mnote-fuji-tag.h +) + +set(SOURCES_FUJI + libexif/fuji/exif-mnote-data-fuji.c + libexif/fuji/mnote-fuji-entry.c + libexif/fuji/mnote-fuji-tag.c +) + +set(HEADERS_OLYMPUS + libexif/olympus/exif-mnote-data-olympus.h + libexif/olympus/mnote-olympus-entry.h + libexif/olympus/mnote-olympus-tag.h +) + +set(SOURCES_OLYMPUS + libexif/olympus/exif-mnote-data-olympus.c + libexif/olympus/mnote-olympus-entry.c + libexif/olympus/mnote-olympus-tag.c +) + +set(HEADERS_PENTAX + libexif/pentax/exif-mnote-data-pentax.h + libexif/pentax/mnote-pentax-entry.h + libexif/pentax/mnote-pentax-tag.h +) + +set(SOURCES_PENTAX + libexif/pentax/exif-mnote-data-pentax.c + libexif/pentax/mnote-pentax-entry.c + libexif/pentax/mnote-pentax-tag.c +) + +if(MSVC) + set(SOURCES_MSVC "libexif.def") +endif() + +add_library(libexif + ${SOURCES} + ${SOURCES_CANON} + ${SOURCES_FUJI} + ${SOURCES_OLYMPUS} + ${SOURCES_PENTAX} + ${SOURCES_MSVC} +) + +target_include_directories(libexif PRIVATE .) +target_include_directories(libexif PRIVATE ${CMAKE_BINARY_DIR}) +target_compile_definitions(libexif PRIVATE -D_CRT_SECURE_NO_WARNINGS) +target_compile_definitions(libexif PRIVATE -DGETTEXT_PACKAGE="${PACKAGE}") + +include(CheckFunctionExists) +include(CheckIncludeFile) + +check_function_exists(dcgettext HAVE_DCGETTEXT) +check_function_exists(gettext HAVE_DCGETTEXT) +check_function_exists(iconv HAVE_DCGETTEXT) +check_function_exists(localtime_r HAVE_DCGETTEXT) + +check_include_file(dlfcn.h HAVE_DLFCN_H) +check_include_file(inttypes.h HAVE_INTTYPES_H) +check_include_file(memory.h HAVE_MEMORY_H) +check_include_file(stdint.h HAVE_STDINT_H) +check_include_file(stdlib.h HAVE_STDLIB_H) +check_include_file(strings.h HAVE_STRINGS_H) +check_include_file(string.h HAVE_STRING_H) +check_include_file(sys/stat.h HAVE_SYS_STAT_H) +check_include_file(sys/stat.h HAVE_SYS_STAT_H) +check_include_file(sys/types.h HAVE_SYS_TYPES_H) +check_include_file(unistd.h HAVE_UNISTD_H) + +configure_file(config.h.cmake config.h) + +install( + TARGETS libexif + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +install(FILES ${HEADERS} DESTINATION include/libexif) +install(FILES ${HEADERS_CANON} DESTINATION include/libexif/canon) +install(FILES ${HEADERS_FUJI} DESTINATION include/libexif/fuji) +install(FILES ${HEADERS_OLYMPUS} DESTINATION include/libexif/olympus) +install(FILES ${HEADERS_PENTAX} DESTINATION include/libexif/pentax) diff --git a/vcpkg/ports/libexif/CONTROL b/vcpkg/ports/libexif/CONTROL new file mode 100644 index 0000000..7bf6d64 --- /dev/null +++ b/vcpkg/ports/libexif/CONTROL @@ -0,0 +1,5 @@ +Source: libexif +Version: 0.6.22 +Homepage: https://libexif.github.io/ +Description: a library for parsing, editing, and saving EXIF data +Supports: !uwp diff --git a/vcpkg/ports/libexif/add-missing-_stdint-h.patch b/vcpkg/ports/libexif/add-missing-_stdint-h.patch new file mode 100644 index 0000000..1c4c95d --- /dev/null +++ b/vcpkg/ports/libexif/add-missing-_stdint-h.patch @@ -0,0 +1,7 @@ +diff --git a/libexif/_stdint.h b/libexif/_stdint.h +new file mode 100644 +index 0000000..9a6118b +--- /dev/null ++++ b/libexif/_stdint.h +@@ -0,0 +1 @@ ++#include diff --git a/vcpkg/ports/libexif/config.h.cmake b/vcpkg/ports/libexif/config.h.cmake new file mode 100644 index 0000000..4dfbdb1 --- /dev/null +++ b/vcpkg/ports/libexif/config.h.cmake @@ -0,0 +1,96 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#cmakedefine ENABLE_NLS + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +#cmakedefine HAVE_DCGETTEXT + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_DLFCN_H + +/* Define if the GNU gettext() function is already present or preinstalled. */ +#cmakedefine HAVE_GETTEXT + +/* Define if you have the iconv() function. */ +#cmakedefine HAVE_ICONV + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_INTTYPES_H + +/* Define to 1 if you have the `localtime_r' function. */ +#cmakedefine HAVE_LOCALTIME_R + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_MEMORY_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_UNISTD_H + +/* Define as const if the declaration of iconv() needs const. */ +#cmakedefine ICONV_CONST + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#cmakedefine LT_OBJDIR + +/* Name of package */ +#cmakedefine PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#cmakedefine PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#cmakedefine PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#cmakedefine PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#cmakedefine PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#cmakedefine PACKAGE_URL + +/* Define to the version of this package. */ +#cmakedefine PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#cmakedefine STDC_HEADERS + +/* Version number of package */ +#cmakedefine VERSION + +/* Define to empty if `const' does not conform to ANSI C. */ +#cmakedefine const + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#cmakedefine inline +#endif + +#ifdef _MSC_VER +#include +typedef SSIZE_T ssize_t; +#endif \ No newline at end of file diff --git a/vcpkg/ports/libexif/libexif.def b/vcpkg/ports/libexif/libexif.def new file mode 100644 index 0000000..6bd0ca4 --- /dev/null +++ b/vcpkg/ports/libexif/libexif.def @@ -0,0 +1,130 @@ +EXPORTS + exif_array_set_byte_order + exif_byte_order_get_name + exif_content_add_entry + exif_content_dump + exif_content_fix + exif_content_foreach_entry + exif_content_free + exif_content_get_entry + exif_content_get_ifd + exif_content_log + exif_content_new + exif_content_new_mem + exif_content_ref + exif_content_remove_entry + exif_content_unref + exif_data_dump + exif_data_fix + exif_data_foreach_content + exif_data_free + exif_data_get_byte_order + exif_data_get_data_type + exif_data_get_log + exif_data_get_mnote_data + exif_data_load_data + exif_data_log + exif_data_new + exif_data_new_from_data + exif_data_new_from_file + exif_data_new_mem + exif_data_option_get_description + exif_data_option_get_name + exif_data_ref + exif_data_save_data + exif_data_set_byte_order + exif_data_set_data_type + exif_data_set_option + exif_data_unref + exif_data_unset_option + exif_entry_dump + exif_entry_fix + exif_entry_free + exif_entry_get_value + exif_entry_initialize + exif_entry_new + exif_entry_new_mem + exif_entry_ref + exif_entry_unref + exif_format_get_name + exif_format_get_size + exif_get_long + exif_get_rational + exif_get_short + exif_get_slong + exif_get_srational + exif_get_sshort + exif_ifd_get_name + exif_loader_get_buf + exif_loader_get_data + exif_loader_log + exif_loader_new + exif_loader_new_mem + exif_loader_ref + exif_loader_reset + exif_loader_unref + exif_loader_write + exif_loader_write_file + exif_log + exif_log_code_get_message + exif_log_code_get_title + exif_log_free + exif_log_new + exif_log_new_mem + exif_log_ref + exif_log_set_func + exif_log_unref + exif_logv + exif_mem_alloc + exif_mem_free + exif_mem_new + exif_mem_new_default + exif_mem_realloc + exif_mem_ref + exif_mem_unref + exif_mnote_data_canon_new + exif_mnote_data_construct + exif_mnote_data_count + exif_mnote_data_get_description + exif_mnote_data_get_id + exif_mnote_data_get_name + exif_mnote_data_get_title + exif_mnote_data_get_value + exif_mnote_data_load + exif_mnote_data_log + exif_mnote_data_olympus_new + exif_mnote_data_pentax_new + exif_mnote_data_ref + exif_mnote_data_save + exif_mnote_data_set_byte_order + exif_mnote_data_set_offset + exif_mnote_data_unref + exif_set_long + exif_set_rational + exif_set_short + exif_set_slong + exif_set_srational + exif_set_sshort + exif_tag_from_name + exif_tag_get_description + exif_tag_get_description_in_ifd + exif_tag_get_name + exif_tag_get_name_in_ifd + exif_tag_get_support_level_in_ifd + exif_tag_get_title + exif_tag_get_title_in_ifd + exif_tag_table_count + exif_tag_table_get_name + exif_tag_table_get_tag + mnote_canon_entry_get_value + mnote_canon_tag_get_description + mnote_canon_tag_get_name + mnote_canon_tag_get_title + mnote_olympus_entry_get_value + mnote_olympus_tag_get_description + mnote_olympus_tag_get_name + mnote_olympus_tag_get_title + mnote_pentax_entry_get_value + mnote_pentax_tag_get_description + mnote_pentax_tag_get_name + mnote_pentax_tag_get_title \ No newline at end of file diff --git a/vcpkg/ports/libexif/portfile.cmake b/vcpkg/ports/libexif/portfile.cmake new file mode 100644 index 0000000..4869c40 --- /dev/null +++ b/vcpkg/ports/libexif/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_fail_port_install(ON_TARGET uwp) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libexif/libexif + REF libexif-0_6_22-release + SHA512 6c63abe2734c9e83fb04adb00bdd77f687165007c0efd0279df26c101363b990604050c430c7dd73dfa8735dd2fd196334d321bdb114d4869998f21e7bed5b43 + HEAD_REF master + PATCHES add-missing-_stdint-h.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.cmake DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/libexif.def DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libfabric/CONTROL b/vcpkg/ports/libfabric/CONTROL new file mode 100644 index 0000000..267fb71 --- /dev/null +++ b/vcpkg/ports/libfabric/CONTROL @@ -0,0 +1,6 @@ +Source: libfabric +Version: 1.8.1-1 +Description: The OpenFabrics Interfaces Working Group (OFIWG) and the Libfabric open-source community are pleased to announce the release of version v1.6.2 of libfabric. See NEWS.md for the list of features and enhancements that have been added since the last release. +Homepage: https://github.com/ofiwg/libfabric +Build-Depends: networkdirect-sdk (windows) +Supports: windows&x64&(!static) \ No newline at end of file diff --git a/vcpkg/ports/libfabric/add_additional_includes.patch b/vcpkg/ports/libfabric/add_additional_includes.patch new file mode 100644 index 0000000..da3d325 --- /dev/null +++ b/vcpkg/ports/libfabric/add_additional_includes.patch @@ -0,0 +1,58 @@ +diff --git a/libfabric.vcxproj b/libfabric.vcxproj +index 43a05e7..ceb596f 100644 +--- a/libfabric.vcxproj ++++ b/libfabric.vcxproj +@@ -125,7 +125,7 @@ + Disabled + WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;ENABLE_DEBUG;%(PreprocessorDefinitions) + true +- $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include;$(AdditionalIncludeDirectories); + CompileAsC + 4127;4200;4204;4221;4115;4201;4100 + true +@@ -148,7 +148,7 @@ + Disabled + WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;ENABLE_DEBUG;%(PreprocessorDefinitions) + true +- $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include; ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include;$(AdditionalIncludeDirectories); + CompileAsC + 4127;4200;4204;4221;4115;4201;4100 + true +@@ -171,7 +171,7 @@ + Disabled + WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;ENABLE_DEBUG;%(PreprocessorDefinitions) + true +- $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include;$(AdditionalIncludeDirectories); + CompileAsC + 4127;4200;94;4204;4221;869 + true +@@ -195,7 +195,7 @@ + true + WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;%(PreprocessorDefinitions) + true +- $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include;$(AdditionalIncludeDirectories); + 4127;4200;4204;4221;4115;4201;4100 + true + false +@@ -220,7 +220,7 @@ + true + WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;%(PreprocessorDefinitions) + true +- $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include; ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include;$(AdditionalIncludeDirectories); + 4127;4200;4204;4221;4115;4201;4100 + true + false +@@ -245,7 +245,7 @@ + true + WIN32;_WINSOCKAPI_=;_CRT_SECURE_NO_WARNINGS;_WINSOCK_DEPRECATED_NO_WARNINGS;_WINDOWS;_USRDLL;LIBFABRIC_EXPORTS;HAVE_CONFIG_H;%(PreprocessorDefinitions) + true +- $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include; ++ $(ProjectDir)include;$(ProjectDir)include\windows;$(ProjectDir)prov\netdir\NetDirect;$(ProjectDir)prov\hook\src;$(ProjectDir)prov\hook\include;$(ProjectDir)prov\hook\perf\include;$(AdditionalIncludeDirectories); + 4127;4200;94;4204;4221;869 + true + false diff --git a/vcpkg/ports/libfabric/portfile.cmake b/vcpkg/ports/libfabric/portfile.cmake new file mode 100644 index 0000000..a5bfffc --- /dev/null +++ b/vcpkg/ports/libfabric/portfile.cmake @@ -0,0 +1,39 @@ +vcpkg_fail_port_install(ON_TARGET "Linux" "OSX" "UWP" ON_ARCH "x86") + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ofiwg/libfabric + REF v1.8.1 + HEAD_REF master + SHA512 7c3879af3ad7dbda9e9bf9f43a2d213a8e41d50212008f29e912d3d0946efc381e6833c08206106e9f486c37eaef16103198247b328297209ef80dc66ca1b6e5 + PATCHES + add_additional_includes.patch +) + +set(LIBFABRIC_RELEASE_CONFIGURATION "Release-v141") +set(LIBFABRIC_DEBUG_CONFIGURATION "Debug-v141") + +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH libfabric.vcxproj + INCLUDES_SUBPATH include + LICENSE_SUBPATH COPYING + PLATFORM "x64" + RELEASE_CONFIGURATION ${LIBFABRIC_RELEASE_CONFIGURATION} + DEBUG_CONFIGURATION ${LIBFABRIC_RELEASE_CONFIGURATION} + USE_VCPKG_INTEGRATION + ALLOW_ROOT_INCLUDES + OPTIONS + /p:SolutionDir=${SOURCE_PATH} + /p:AdditionalIncludeDirectories="${CURRENT_INSTALLED_DIR}/include" +) + +#Move includes under subdirectory to avoid colisions with other libraries +file(RENAME ${CURRENT_PACKAGES_DIR}/include ${CURRENT_PACKAGES_DIR}/includetemp) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) +file(RENAME ${CURRENT_PACKAGES_DIR}/includetemp ${CURRENT_PACKAGES_DIR}/include/libfabric) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libffi/CMakeLists.txt b/vcpkg/ports/libffi/CMakeLists.txt new file mode 100644 index 0000000..693fcc9 --- /dev/null +++ b/vcpkg/ports/libffi/CMakeLists.txt @@ -0,0 +1,212 @@ +cmake_minimum_required(VERSION 3.9) +project(libffi C ASM) + +set(CMAKE_SHARED_LIBRARY_PREFIX) +set(CMAKE_STATIC_LIBRARY_PREFIX) + +if(NOT CMAKE_SYSTEM_PROCESSOR) + set(CMAKE_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}") +endif() + +# config variables for ffi.h.in +set(VERSION 3.3) + +set(KNOWN_PROCESSORS x86 x86_64 AMD64 ARM ARM64 i386 armv7l aarch64) + +if(NOT CMAKE_SYSTEM_PROCESSOR IN_LIST KNOWN_PROCESSORS) + message(FATAL_ERROR "Unknown processor: ${CMAKE_SYSTEM_PROCESSOR}") +endif() + +if(CMAKE_SYSTEM_PROCESSOR MATCHES "ARM") + set(TARGET ARM) +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "armv7l") + set(TARGET ARM) +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64") + set(TARGET ARM64) +elseif(CMAKE_SYSTEM_NAME MATCHES "BSD" AND CMAKE_SIZEOF_VOID_P EQUAL 4) + set(TARGET X86_FREEBSD) +elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(TARGET ARM_WIN32) +elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(TARGET ARM_WIN64) +elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(TARGET X86_WIN32) +elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(TARGET X86_WIN64) +elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin" AND CMAKE_SIZEOF_VOID_P EQUAL 4) + set(TARGET X86_DARWIN) +elseif(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(TARGET X86_64) +elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) + set(TARGET X86) +else() + message(FATAL_ERROR "Cannot determine target. Please consult ${CMAKE_CURRENT_SOURCE_DIR}/configure.ac and add your platform to this CMake file.") +endif() + +if("${TARGET}" STREQUAL "X86_64") + set(HAVE_LONG_DOUBLE 1) +else() + set(HAVE_LONG_DOUBLE 0) +endif() +set(FFI_EXEC_TRAMPOLINE_TABLE 0) + +# mimic layout of original buildsystem +configure_file(include/ffi.h.in ${CMAKE_BINARY_DIR}/include/ffi.h) +file(COPY ${FFI_CONFIG_FILE} DESTINATION ${CMAKE_BINARY_DIR}) + +if ("${TARGET}" STREQUAL "ARM_WIN64" OR "${TARGET}" STREQUAL "ARM64") + file(COPY src/aarch64/ffitarget.h DESTINATION ${CMAKE_BINARY_DIR}/include) +elseif ("${TARGET}" STREQUAL "ARM_WIN32" OR "${TARGET}" STREQUAL "ARM") + file(COPY src/arm/ffitarget.h DESTINATION ${CMAKE_BINARY_DIR}/include) +else() + file(COPY src/x86/ffitarget.h DESTINATION ${CMAKE_BINARY_DIR}/include) +endif() + +include_directories(${CMAKE_BINARY_DIR}/include) +include_directories(${CMAKE_BINARY_DIR}) +include_directories(include) + +add_definitions(-DFFI_BUILDING) +if(BUILD_SHARED_LIBS AND WIN32) + add_definitions(-DFFI_BUILDING_DLL) +endif() + +set(FFI_SOURCES + src/closures.c + src/prep_cif.c + src/types.c) + +if ("${TARGET}" STREQUAL "ARM_WIN64" OR "${TARGET}" STREQUAL "ARM64") + set(FFI_SOURCES + ${FFI_SOURCES} + src/aarch64/ffi.c) +elseif("${TARGET}" STREQUAL "ARM_WIN32" OR "${TARGET}" STREQUAL "ARM") + set(FFI_SOURCES + ${FFI_SOURCES} + src/arm/ffi.c) +else() + set(FFI_SOURCES + ${FFI_SOURCES} + src/java_raw_api.c + src/raw_api.c) + if("${TARGET}" STREQUAL "X86_WIN32" OR "${TARGET}" STREQUAL "X86_DARWIN" OR "${TARGET}" STREQUAL "X86") + set(FFI_SOURCES + ${FFI_SOURCES} + src/x86/ffi.c) + elseif("${TARGET}" STREQUAL "X86_WIN64") + set(FFI_SOURCES + ${FFI_SOURCES} + src/x86/ffiw64.c) + elseif("${TARGET}" STREQUAL "X86_64") + set(FFI_SOURCES + ${FFI_SOURCES} + src/x86/ffi64.c + src/x86/ffiw64.c) + endif() +endif() + +macro(add_assembly ASMFILE) + get_filename_component(ASMFILE_FULL "${ASMFILE}" ABSOLUTE) + if(MSVC) + if ("${TARGET}" STREQUAL "ARM_WIN64") + set(ARCH_ASSEMBLER armasm64) + elseif ("${TARGET}" STREQUAL "ARM_WIN32") + set(ARCH_ASSEMBLER armasm) + elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) + set(ARCH_ASSEMBLER ml /safeseh /c /Zi) + else() + set(ARCH_ASSEMBLER ml64 /c /Zi) + endif() + + get_filename_component(ARCH_ASM_NAME "${ASMFILE_FULL}" NAME_WE) + + execute_process( + COMMAND ${CMAKE_C_COMPILER} /nologo /EP /I. /Iinclude /I${CMAKE_CURRENT_SOURCE_DIR}/include "${ASMFILE_FULL}" + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + OUTPUT_FILE ${ARCH_ASM_NAME}.asm + RESULT_VARIABLE retcode + ) + + if(NOT ${retcode} STREQUAL "0") + message(FATAL_ERROR "Unable to assemble, exit code: '${retcode}'.") + endif() + + # Produced *.asm file could be just added to sources. + # It works in x64 mode, but for some strange reason MASM returns error code when in x86, + # (even though it didn't report any errors and correctly generated object file) + # which in turn causes MSBUILD to stop. + execute_process( + COMMAND ${ARCH_ASSEMBLER} ${ARCH_ASM_NAME}.asm + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + RESULT_VARIABLE retcode + ) + + if(NOT ${retcode} STREQUAL "0") + message(FATAL_ERROR "Unable to compile assembly, exit code: '${retcode}'.") + endif() + + list(APPEND FFI_SOURCES ${CMAKE_BINARY_DIR}/${ARCH_ASM_NAME}.obj) + else() + list(APPEND FFI_SOURCES ${ASMFILE}) + endif() +endmacro() + +if("${TARGET}" STREQUAL "X86") + set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -m32") +endif() + +if("${TARGET}" STREQUAL "X86" OR "${TARGET}" STREQUAL "X86_DARWIN") + add_assembly(src/x86/sysv.S) +elseif("${TARGET}" STREQUAL "X86_64") + add_assembly(src/x86/unix64.S) + add_assembly(src/x86/win64.S) +elseif("${TARGET}" STREQUAL "X86_WIN32") + add_assembly(src/x86/sysv_intel.S) +elseif("${TARGET}" STREQUAL "X86_WIN64") + add_assembly(src/x86/win64_intel.S) +elseif("${TARGET}" STREQUAL "ARM_WIN32") + add_assembly(src/arm/sysv_msvc_arm32.S) +elseif("${TARGET}" STREQUAL "ARM") + add_assembly(src/arm/sysv.S) +elseif("${TARGET}" STREQUAL "ARM_WIN64") + add_assembly(src/aarch64/win64_armasm.S) +elseif("${TARGET}" STREQUAL "ARM64") + add_assembly(src/aarch64/sysv.S) +else() + message(FATAL_ERROR "Target not implemented") +endif() + +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + list(APPEND FFI_SOURCES src/debug.c) + add_definitions(-DFFI_DEBUG) +endif() + +add_library(libffi ${FFI_SOURCES}) + +install(TARGETS libffi + EXPORT ${PROJECT_NAME}Targets + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +include(CMakePackageConfigHelpers) + +configure_package_config_file(${PROJECT_NAME}Config.cmake.in + "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" + INSTALL_DESTINATION share/${PROJECT_NAME}) +write_basic_package_version_file( + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake + VERSION ${VERSION} + COMPATIBILITY AnyNewerVersion) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" + DESTINATION share/${PROJECT_NAME}) +install(EXPORT ${PROJECT_NAME}Targets + DESTINATION share/${PROJECT_NAME}) + +if(NOT FFI_SKIP_HEADERS) + install(FILES + ${CMAKE_BINARY_DIR}/include/ffi.h + ${CMAKE_BINARY_DIR}/include/ffitarget.h + DESTINATION include) +endif() diff --git a/vcpkg/ports/libffi/CONTROL b/vcpkg/ports/libffi/CONTROL new file mode 100644 index 0000000..6f1154e --- /dev/null +++ b/vcpkg/ports/libffi/CONTROL @@ -0,0 +1,5 @@ +Source: libffi +Version: 3.3 +Port-Version: 5 +Homepage: https://github.com/libffi/libffi +Description: Portable, high level programming interface to various calling conventions diff --git a/vcpkg/ports/libffi/fficonfig.h b/vcpkg/ports/libffi/fficonfig.h new file mode 100644 index 0000000..2ed4e01 --- /dev/null +++ b/vcpkg/ports/libffi/fficonfig.h @@ -0,0 +1,65 @@ +#ifdef __linux__ +#define EH_FRAME_FLAGS "a" +#endif +#define HAVE_ALLOCA 1 +#ifndef _WIN64 +#define HAVE_AS_ASCII_PSEUDO_OP 1 +#endif +#ifndef _WIN64 +#define HAVE_AS_STRING_PSEUDO_OP 1 +#endif +#ifndef _WIN64 +#define HAVE_AS_X86_PCREL 1 +#endif +#ifdef __linux__ +#define HAVE_HIDDEN_VISIBILITY_ATTRIBUTE 1 +#endif +#define HAVE_INTTYPES_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TYPES_H 1 +#define LT_OBJDIR ".libs/" +#define PACKAGE "libffi" +#define PACKAGE_BUGREPORT "http://github.com/libffi/libffi/issues" +#define PACKAGE_NAME "libffi" +#define PACKAGE_STRING "libffi 3.3" +#define PACKAGE_TARNAME "libffi" +#define PACKAGE_URL "" +#define PACKAGE_VERSION "3.3" +#define SIZEOF_DOUBLE 8 +#define SIZEOF_LONG_DOUBLE 8 +#ifndef _WIN64 +#define SIZEOF_SIZE_T 4 +#else +#define SIZEOF_SIZE_T 8 +#endif +#define STDC_HEADERS 1 +#ifndef __linux__ +#ifndef _WIN64 +#define SYMBOL_UNDERSCORE 1 +#endif +#endif +#define VERSION "3.3" +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#endif + +#ifdef HAVE_HIDDEN_VISIBILITY_ATTRIBUTE +#ifdef LIBFFI_ASM +#define FFI_HIDDEN(name) .hidden name +#else +#define FFI_HIDDEN __attribute__ ((visibility ("hidden"))) +#endif +#else +#ifdef LIBFFI_ASM +#define FFI_HIDDEN(name) +#else +#define FFI_HIDDEN +#endif +#endif + diff --git a/vcpkg/ports/libffi/libffiConfig.cmake.in b/vcpkg/ports/libffi/libffiConfig.cmake.in new file mode 100644 index 0000000..ebdf148 --- /dev/null +++ b/vcpkg/ports/libffi/libffiConfig.cmake.in @@ -0,0 +1,7 @@ +@PACKAGE_INIT@ + +include(CMakeFindDependencyMacro) + +if(NOT TARGET libffi) + include("${CMAKE_CURRENT_LIST_DIR}/libffiTargets.cmake") +endif() diff --git a/vcpkg/ports/libffi/portfile.cmake b/vcpkg/ports/libffi/portfile.cmake new file mode 100644 index 0000000..7748d1c --- /dev/null +++ b/vcpkg/ports/libffi/portfile.cmake @@ -0,0 +1,62 @@ +set(VERSION 3.3) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libffi/libffi + REF v3.3 + SHA512 62798fb31ba65fa2a0e1f71dd3daca30edcf745dc562c6f8e7126e54db92572cc63f5aa36d927dd08375bb6f38a2380ebe6c5735f35990681878fc78fc9dbc83 + HEAD_REF master + PATCHES + win64-disable-stackframe-check.patch + win32-disable-stackframe-check.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/libffiConfig.cmake.in DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFFI_CONFIG_FILE=${CMAKE_CURRENT_LIST_DIR}/fficonfig.h + OPTIONS_DEBUG + -DFFI_SKIP_HEADERS=ON +) + +vcpkg_install_cmake() + +# Create pkgconfig file +set(PACKAGE_VERSION ${VERSION}) +set(prefix "${CURRENT_INSTALLED_DIR}") +set(exec_prefix "\${prefix}") +set(libdir "\${prefix}/lib") +set(toolexeclibdir "\${libdir}") +set(includedir "\${prefix}/include") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + configure_file("${SOURCE_PATH}/libffi.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libffi.pc" @ONLY) +endif() +# debug +set(prefix "${CURRENT_INSTALLED_DIR}/debug") +set(exec_prefix "\${prefix}") +set(libdir "\${prefix}/lib") +set(toolexeclibdir "\${libdir}") +set(includedir "\${prefix}/../include") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + configure_file("${SOURCE_PATH}/libffi.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libffi.pc" @ONLY) +endif() + +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() +vcpkg_fixup_pkgconfig() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/ffi.h + " *know* they are going to link with the static library. */" + " *know* they are going to link with the static library. */ + +#define FFI_BUILDING +" + ) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libffi/win32-disable-stackframe-check.patch b/vcpkg/ports/libffi/win32-disable-stackframe-check.patch new file mode 100644 index 0000000..8fdca8b --- /dev/null +++ b/vcpkg/ports/libffi/win32-disable-stackframe-check.patch @@ -0,0 +1,50 @@ +Rolf Gebhardt +22 Jul 2020 +[PATCH] x86/win32: disable runtime stack frame checks with msvc + around built assembly + +based on the patch for x86/win64: + +From 53291b332b1bc061a3409d3b60c38f313609b98e Mon Sep 17 00:00:00 2001 +From: Matthew Waters +Date: Fri, 16 Mar 2018 15:10:04 +1100 +Subject: [PATCH] x86/win64: disable runtime stack frame checks with msvc + around built assembly + +MSVC can add truntime code that checks if a stack frame is mismanaged +however our custom assembly delibrately accesses and modifies the parent +stack frame. Fortunately we can disable that specific check for the +function call so do that. +--- + src/x86/ffi.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/src/x86/ffi.c b/src/x86/ffi.c +index 9a59218..9f5d703 100644 +--- a/src/x86/ffi.c ++++ b/src/x86/ffi.c +@@ -255,6 +255,14 @@ static const struct abi_params abi_params[FFI_LAST_ABI] = { + + extern void FFI_DECLARE_FASTCALL ffi_call_i386(struct call_frame *, char *) FFI_HIDDEN; + ++/* we perform some black magic here to use some of the parent's ++ * stack frame in ff_call_win() that breaks with the msvc compiler ++ * with the /RTCs or /GZ flags. Disable the 'Stack frame run time ++ * error checking' for this function so we don't hit weird exceptions ++ * in debug builds */ ++#if defined(_MSC_VER) ++#pragma runtime_checks("s", off) ++#endif + static void + ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue, + void **avalue, void *closure) +@@ -390,6 +398,9 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue, + + ffi_call_i386 (frame, stack); + } ++#if defined(_MSC_VER) ++#pragma runtime_checks("s", restore) ++#endif + + void + ffi_call (ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) diff --git a/vcpkg/ports/libffi/win64-disable-stackframe-check.patch b/vcpkg/ports/libffi/win64-disable-stackframe-check.patch new file mode 100644 index 0000000..ce3d3ca --- /dev/null +++ b/vcpkg/ports/libffi/win64-disable-stackframe-check.patch @@ -0,0 +1,43 @@ +From 53291b332b1bc061a3409d3b60c38f313609b98e Mon Sep 17 00:00:00 2001 +From: Matthew Waters +Date: Fri, 16 Mar 2018 15:10:04 +1100 +Subject: [PATCH] x86/win64: disable runtime stack frame checks with msvc + around built assembly + +MSVC can add truntime code that checks if a stack frame is mismanaged +however our custom assembly delibrately accesses and modifies the parent +stack frame. Fortunately we can disable that specific check for the +function call so do that. +--- + src/x86/ffiw64.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/src/x86/ffiw64.c b/src/x86/ffiw64.c +index f7875252..88bb3a34 100644 +--- a/src/x86/ffiw64.c ++++ b/src/x86/ffiw64.c +@@ -106,6 +106,14 @@ EFI64(ffi_prep_cif_machdep)(ffi_cif *cif) + return FFI_OK; + } + ++/* we perform some black magic here to use some of the parent's ++ * stack frame in ff_call_win64() that breaks with the msvc compiler ++ * with the /RTCs or /GZ flags. Disable the 'Stack frame run time ++ * error checking' for this function so we don't hit weird exceptions ++ * in debug builds */ ++#if defined(_MSC_VER) ++#pragma runtime_checks("s", off) ++#endif + static void + ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue, + void **avalue, void *closure) +@@ -170,6 +178,9 @@ ffi_call_int (ffi_cif *cif, void (*fn)(void), void *rvalue, + + ffi_call_win64 (stack, frame, closure); + } ++#if defined(_MSC_VER) ++#pragma runtime_checks("s", restore) ++#endif + + void + EFI64(ffi_call)(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) diff --git a/vcpkg/ports/libflac/CONTROL b/vcpkg/ports/libflac/CONTROL new file mode 100644 index 0000000..696e9ff --- /dev/null +++ b/vcpkg/ports/libflac/CONTROL @@ -0,0 +1,6 @@ +Source: libflac +Version: 1.3.3 +Port-Version: 3 +Homepage: https://xiph.org/flac/ +Description: Library for manipulating FLAC files +Build-Depends: libogg diff --git a/vcpkg/ports/libflac/portfile.cmake b/vcpkg/ports/libflac/portfile.cmake new file mode 100644 index 0000000..36f7b99 --- /dev/null +++ b/vcpkg/ports/libflac/portfile.cmake @@ -0,0 +1,69 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiph/flac + REF ce6dd6b5732e319ef60716d9cc9af6a836a4011a + SHA512 d0d3b5451f8d74aa0a0832fbe95cca55597ce9654765a95adaac98ecd0da9e803b98551a40a3fb3fd5b86bc5f40cd1a791127c03da5322e7f01e7fa761171a21 + HEAD_REF master + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/uwp-library-console.patch" + "${CMAKE_CURRENT_LIST_DIR}/uwp-createfile2.patch" +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(BUILD_SHARED_LIBS ON) +else() + set(BUILD_SHARED_LIBS OFF) +endif() + +if(VCPKG_TARGET_IS_MINGW) + set(WITH_STACK_PROTECTOR OFF) + string(APPEND VCPKG_C_FLAGS "-D_FORTIFY_SOURCE=0") + string(APPEND VCPKG_CXX_FLAGS "-D_FORTIFY_SOURCE=0") +else() + set(WITH_STACK_PROTECTOR ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_PROGRAMS=OFF + -DBUILD_EXAMPLES=OFF + -DBUILD_DOCS=OFF + -DBUILD_TESTING=OFF + -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} + -DWITH_STACK_PROTECTOR=${WITH_STACK_PROTECTOR}) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets( + CONFIG_PATH share/FLAC/cmake + TARGET_PATH share/FLAC +) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/FLAC/export.h + "#if defined(FLAC__NO_DLL)" + "#if 0" + ) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/FLAC++/export.h + "#if defined(FLAC__NO_DLL)" + "#if 0" + ) +else() + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/FLAC/export.h + "#if defined(FLAC__NO_DLL)" + "#if 1" + ) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/FLAC++/export.h + "#if defined(FLAC__NO_DLL)" + "#if 1" + ) +endif() + +# This license (BSD) is relevant only for library - if someone would want to install +# FLAC cmd line tools as well additional license (GPL) should be included +file(INSTALL ${SOURCE_PATH}/COPYING.Xiph DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libflac/uwp-createfile2.patch b/vcpkg/ports/libflac/uwp-createfile2.patch new file mode 100644 index 0000000..0b86e9a --- /dev/null +++ b/vcpkg/ports/libflac/uwp-createfile2.patch @@ -0,0 +1,40 @@ +diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c +index 8b20bbb7..058295fa 100644 +--- a/src/share/win_utf8_io/win_utf8_io.c ++++ b/src/share/win_utf8_io/win_utf8_io.c +@@ -156,6 +156,27 @@ int get_utf8_argv(int *argc, char ***argv) + /* similar to CreateFileW but accepts UTF-8 encoded lpFileName */ + HANDLE WINAPI CreateFile_utf8(const char *lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile) + { ++#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) ++ HANDLE handle = INVALID_HANDLE_VALUE; ++ ++ if (!flac_internal_get_utf8_filenames()) ++ return handle; ++ ++ wchar_t *wname; ++ ++ if ((wname = wchar_from_utf8(lpFileName)) != NULL) ++ { ++ CREATEFILE2_EXTENDED_PARAMETERS cfParams = {0}; ++ cfParams.dwSize = sizeof(CREATEFILE2_EXTENDED_PARAMETERS); ++ cfParams.dwFileAttributes = dwFlagsAndAttributes & FILE_ATTRIBUTE_NORMAL; ++ cfParams.lpSecurityAttributes = lpSecurityAttributes; ++ cfParams.hTemplateFile = hTemplateFile; ++ handle = CreateFile2(wname, dwDesiredAccess, dwShareMode, dwCreationDisposition, &cfParams); ++ free(wname); ++ } ++ ++ return handle; ++#else + if (!flac_internal_get_utf8_filenames()) { + return CreateFileA(lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes, hTemplateFile); + } else { +@@ -169,6 +190,7 @@ HANDLE WINAPI CreateFile_utf8(const char *lpFileName, DWORD dwDesiredAccess, DWO + + return handle; + } ++#endif + } + + /* return number of characters in the UTF-8 string */ diff --git a/vcpkg/ports/libflac/uwp-library-console.patch b/vcpkg/ports/libflac/uwp-library-console.patch new file mode 100644 index 0000000..234758c --- /dev/null +++ b/vcpkg/ports/libflac/uwp-library-console.patch @@ -0,0 +1,53 @@ +diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c +index bbb6a74a..8b20bbb7 100644 +--- a/src/share/win_utf8_io/win_utf8_io.c ++++ b/src/share/win_utf8_io/win_utf8_io.c +@@ -110,7 +110,11 @@ int get_utf8_argv(int *argc, char ***argv) + char **utf8argv; + int ret, i; + ++#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) ++ if ((handle = LoadPackagedLibrary("msvcrt.dll", 0)) == NULL) return 1; ++#else + if ((handle = LoadLibraryW(L"msvcrt.dll")) == NULL) return 1; ++#endif + if ((wgetmainargs = (wgetmainargs_t)GetProcAddress(handle, "__wgetmainargs")) == NULL) { + FreeLibrary(handle); + return 1; +@@ -181,6 +185,9 @@ size_t strlen_utf8(const char *str) + /* get the console width in characters */ + int win_get_console_width(void) + { ++#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) ++ return 80; ++#else + int width = 80; + CONSOLE_SCREEN_BUFFER_INFO csbi; + HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE); +@@ -188,6 +195,7 @@ int win_get_console_width(void) + if (GetConsoleScreenBufferInfo(hOut, &csbi) != 0) + width = csbi.dwSize.X; + return width; ++#endif + } + + /* print functions */ +@@ -197,6 +205,10 @@ static int wprint_console(FILE *stream, const wchar_t *text, size_t len) + DWORD out; + int ret; + ++#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) ++ // disabled for UWP as there's no alternative: ++ // https://docs.microsoft.com/en-us/uwp/win32-and-com/alternatives-to-windows-apis-uwp ++#else + do { + if (stream == stdout) { + HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE); +@@ -215,6 +227,7 @@ static int wprint_console(FILE *stream, const wchar_t *text, size_t len) + return out; + } + } while(0); ++#endif + + ret = fputws(text, stream); + if (ret < 0) diff --git a/vcpkg/ports/libfort/portfile.cmake b/vcpkg/ports/libfort/portfile.cmake new file mode 100644 index 0000000..1ff0147 --- /dev/null +++ b/vcpkg/ports/libfort/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO seleznevae/libfort + REF ccb892f77dc30c2ebc42916a3f862a965e8c097f # v0.4.1 + SHA512 0397e52985b56b6740d22533c48039bf1d61fb90795e97a6153e9360702d1e89b5353ba74de92005bbc874822766d157de21d175387ffd00d0a5294e531d2d8b + HEAD_REF main +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFORT_ENABLE_TESTING=OFF + -DFORT_ENABLE_ASTYLE=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libfort/vcpkg.json b/vcpkg/ports/libfort/vcpkg.json new file mode 100644 index 0000000..613042c --- /dev/null +++ b/vcpkg/ports/libfort/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libfort", + "version-string": "0.4.1", + "description": "A simple crossplatform library to create formatted text tables", + "homepage": "https://github.com/seleznevae/libfort", + "license": "MIT" +} diff --git a/vcpkg/ports/libfreenect2/CONTROL b/vcpkg/ports/libfreenect2/CONTROL new file mode 100644 index 0000000..3618d2a --- /dev/null +++ b/vcpkg/ports/libfreenect2/CONTROL @@ -0,0 +1,15 @@ +Source: libfreenect2 +Version: 0.2.0 +Port-Version: 5 +Build-Depends: libusb, libjpeg-turbo +Homepage: https://github.com/OpenKinect/libfreenect2 +Description: Open source drivers for the Kinect for Windows v2 device +Default-Features: opengl + +Feature: opengl +Description: OpenGL support for libfreenect2 +Build-Depends: opengl, glfw3 + +Feature: opencl +Description: OpenCL support for libfreenect2 +Build-Depends: opencl diff --git a/vcpkg/ports/libfreenect2/fix-dependency-libusb.patch b/vcpkg/ports/libfreenect2/fix-dependency-libusb.patch new file mode 100644 index 0000000..a5de8f3 --- /dev/null +++ b/vcpkg/ports/libfreenect2/fix-dependency-libusb.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1e0d192..aedc576 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -90,7 +90,7 @@ SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib) + + # dependencies + FIND_PACKAGE(PkgConfig) # try find PKGConfig as it will be used if found +-FIND_PACKAGE(LibUSB REQUIRED) ++FIND_PACKAGE(libusb CONFIG REQUIRED) + + # Add includes + INCLUDE_DIRECTORIES( +@@ -98,7 +98,7 @@ INCLUDE_DIRECTORIES( + "${MY_DIR}/include/internal" + ${PROJECT_BINARY_DIR} # for generated headers + ${LIBFREENECT2_THREADING_INCLUDE_DIR} +- ${LibUSB_INCLUDE_DIRS} ++ ${LIBUSB_INCLUDE_DIRS} + ) + + SET(RESOURCES_INC_FILE "${PROJECT_BINARY_DIR}/resources.inc.h") +@@ -154,7 +154,7 @@ SET(SOURCES + ) + + SET(LIBRARIES +- ${LibUSB_LIBRARIES} ++ ${LIBUSB_LIBRARIES} + ${LIBFREENECT2_THREADING_LIBRARIES} + ) + diff --git a/vcpkg/ports/libfreenect2/portfile.cmake b/vcpkg/ports/libfreenect2/portfile.cmake new file mode 100644 index 0000000..3405097 --- /dev/null +++ b/vcpkg/ports/libfreenect2/portfile.cmake @@ -0,0 +1,42 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OpenKinect/libfreenect2 + REF v0.2.0 + SHA512 3525e3f21462cecd3b198f64545786ffddc2cafdfd8146e5a46f0300b83f29f1ad0739618a07ab195c276149d7e2e909f7662e2d379a2880593cac75942b0666 + HEAD_REF master + PATCHES fix-dependency-libusb.patch +) + +file(READ ${SOURCE_PATH}/cmake_modules/FindLibUSB.cmake FINDLIBUSB) +string(REPLACE "(WIN32)" + "(WIN32_DISABLE)" FINDLIBUSB "${FINDLIBUSB}") +file(WRITE ${SOURCE_PATH}/cmake_modules/FindLibUSB.cmake "${FINDLIBUSB}") + +file(READ ${SOURCE_PATH}/examples/CMakeLists.txt EXAMPLECMAKE) +string(REPLACE "(WIN32)" + "(WIN32_DISABLE)" EXAMPLECMAKE "${EXAMPLECMAKE}") +file(WRITE ${SOURCE_PATH}/examples/CMakeLists.txt "${EXAMPLECMAKE}") + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + opengl ENABLE_OPENGL + opencl ENABLE_OPENCL +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DENABLE_CUDA=OFF + # FEATURES + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/freenect2 TARGET_PATH share/freenect2) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/GPL2 DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libftdi/CONTROL b/vcpkg/ports/libftdi/CONTROL new file mode 100644 index 0000000..16ebe6f --- /dev/null +++ b/vcpkg/ports/libftdi/CONTROL @@ -0,0 +1,4 @@ +Source: libftdi +Version: 0.20-1 +Build-Depends: libusb-win32 +Description: FTDI USB driver with bitbang mode (v0.20) diff --git a/vcpkg/ports/libftdi/exports.def b/vcpkg/ports/libftdi/exports.def new file mode 100644 index 0000000..31ebd21 --- /dev/null +++ b/vcpkg/ports/libftdi/exports.def @@ -0,0 +1,56 @@ +EXPORTS + ftdi_deinit + ftdi_disable_bitbang + ftdi_eeprom_build + ftdi_eeprom_decode + ftdi_eeprom_free + ftdi_eeprom_initdefaults + ftdi_eeprom_setsize + ftdi_enable_bitbang + ftdi_erase_eeprom + ftdi_free + ftdi_get_error_string + ftdi_get_latency_timer + ftdi_init + ftdi_list_free + ftdi_list_free2 + ftdi_new + ftdi_poll_modem_status + ftdi_read_chipid + ftdi_read_data + ftdi_read_data_get_chunksize + ftdi_read_data_set_chunksize + ftdi_read_eeprom + ftdi_read_eeprom_getsize + ftdi_read_eeprom_location + ftdi_read_pins + ftdi_set_baudrate + ftdi_set_bitmode + ftdi_set_error_char + ftdi_set_event_char + ftdi_set_interface + ftdi_set_latency_timer + ftdi_set_line_property + ftdi_set_line_property2 + ftdi_set_usbdev + ftdi_setdtr + ftdi_setdtr_rts + ftdi_setflowctrl + ftdi_setrts + ftdi_usb_close + ftdi_usb_find_all + ftdi_usb_get_strings + ftdi_usb_open + ftdi_usb_open_desc + ftdi_usb_open_desc_index + ftdi_usb_open_dev + ftdi_usb_open_string + ftdi_usb_purge_buffers + ftdi_usb_purge_rx_buffer + ftdi_usb_purge_tx_buffer + ftdi_usb_reset + ftdi_write_data + ftdi_write_data_get_chunksize + ftdi_write_data_set_chunksize + ftdi_write_eeprom + ftdi_write_eeprom_location diff --git a/vcpkg/ports/libftdi/libusb-win32.patch b/vcpkg/ports/libftdi/libusb-win32.patch new file mode 100644 index 0000000..55bc1c3 --- /dev/null +++ b/vcpkg/ports/libftdi/libusb-win32.patch @@ -0,0 +1,43 @@ +diff --git a/FindUSB.cmake b/FindUSB.cmake +index 566cdd8..0710345 100644 +--- a/FindUSB.cmake ++++ b/FindUSB.cmake +@@ -24,10 +24,10 @@ else (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) + pkg_check_modules(PC_LIBUSB libusb) + ENDIF(NOT WIN32) + +- FIND_PATH(LIBUSB_INCLUDE_DIR usb.h ++ FIND_PATH(LIBUSB_INCLUDE_DIR lusb0_usb.h + PATHS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS}) + +- FIND_LIBRARY(LIBUSB_LIBRARIES NAMES usb ++ FIND_LIBRARY(LIBUSB_LIBRARIES NAMES usb0 libusb0 + PATHS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS}) + + include(FindPackageHandleStandardArgs) +diff --git a/src/ftdi.c b/src/ftdi.c +index 980622d..8f6ab67 100644 +--- a/src/ftdi.c ++++ b/src/ftdi.c +@@ -28,7 +28,7 @@ + /** \addtogroup libftdi */ + /* @{ */ + +-#include ++#include + #include + #include + #include +diff --git a/src/ftdi.h b/src/ftdi.h +index 6bb7a3e..d4472c2 100644 +--- a/src/ftdi.h ++++ b/src/ftdi.h +@@ -17,7 +17,7 @@ + #ifndef __libftdi_h__ + #define __libftdi_h__ + +-#include ++#include + + #define FTDI_DEFAULT_EEPROM_SIZE 128 + diff --git a/vcpkg/ports/libftdi/portfile.cmake b/vcpkg/ports/libftdi/portfile.cmake new file mode 100644 index 0000000..318e21a --- /dev/null +++ b/vcpkg/ports/libftdi/portfile.cmake @@ -0,0 +1,44 @@ +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.intra2net.com/en/developer/libftdi/download/libftdi-0.20.tar.gz" + FILENAME "libftdi-0.20.tar.gz" + SHA512 540e5eb201a65936c3dbabff70c251deba1615874b11ff27c5ca16c39d71c150cf61758a68b541135a444fe32ab403b0fba0daf55c587647aaf9b3f400f1dee7 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF 0.20 + PATCHES + libusb-win32.patch + shared-static.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/exports.def DESTINATION ${SOURCE_PATH}/src) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DDOCUMENTATION=OFF + -DEXAMPLES=OFF + -DPYTHON_BINDINGS=OFF + -DFTDIPP=OFF + + -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Boost=ON + + -DLIBUSB_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libftdi) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libftdi/LICENSE ${CURRENT_PACKAGES_DIR}/share/libftdi/copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/libftdi/shared-static.patch b/vcpkg/ports/libftdi/shared-static.patch new file mode 100644 index 0000000..3197fb8 --- /dev/null +++ b/vcpkg/ports/libftdi/shared-static.patch @@ -0,0 +1,66 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 071ae90..f91f6f7 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -4,7 +4,7 @@ include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR} + ) + + # Targets +-set(c_sources ftdi.c) ++set(c_sources ftdi.c exports.def) + set(c_headers ftdi.h) + + add_library(ftdi SHARED ${c_sources}) +@@ -14,7 +14,7 @@ set_target_properties(ftdi PROPERTIES VERSION ${VERSION_FIXUP}.${MINOR_VERSION}. + + # Static library + add_library(ftdi-static STATIC ${c_sources}) +-set_target_properties(ftdi-static PROPERTIES OUTPUT_NAME "ftdi") ++set_target_properties(ftdi-static PROPERTIES OUTPUT_NAME "ftdi-static") + + # Prevent clobbering each other during the build + set_target_properties(ftdi PROPERTIES CLEAN_DIRECT_OUTPUT 1) +@@ -24,7 +24,7 @@ set_target_properties(ftdi-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) + target_link_libraries(ftdi ${LIBUSB_LIBRARIES}) + + # Install +-if(${UNIX}) ++if(UNIX AND 0) + + install( TARGETS ftdi + LIBRARY DESTINATION lib${LIB_SUFFIX} +@@ -41,23 +41,29 @@ if(${UNIX}) + COMPONENT headers + ) + +-endif(${UNIX}) ++endif() + +-if(${WIN32}) ++if(WIN32 OR 1) + ++ if(BUILD_SHARED_LIBS) + install( TARGETS ftdi +- DESTINATION bin ++ EXPORT ftdi + COMPONENT sharedlibs + ) + ++ target_include_directories(ftdi PUBLIC $) ++ else() + install( TARGETS ftdi-static +- DESTINATION bin ++ EXPORT ftdi + COMPONENT staticlibs + ) ++ target_include_directories(ftdi-static PUBLIC $) ++ endif() ++ install(EXPORT ftdi FILE libftdi-config.cmake NAMESPACE libftdi:: DESTINATION share/libftdi) + + install( FILES ${c_headers} + DESTINATION include + COMPONENT headers + ) + +-endif(${WIN32}) ++endif() diff --git a/vcpkg/ports/libftdi1/CONTROL b/vcpkg/ports/libftdi1/CONTROL new file mode 100644 index 0000000..daab99f --- /dev/null +++ b/vcpkg/ports/libftdi1/CONTROL @@ -0,0 +1,4 @@ +Source: libftdi1 +Version: 1.4-1 +Build-Depends: libusb +Description: FTDI USB driver with bitbang mode (v1.4) diff --git a/vcpkg/ports/libftdi1/cmake-fix.patch b/vcpkg/ports/libftdi1/cmake-fix.patch new file mode 100644 index 0000000..ea541f7 --- /dev/null +++ b/vcpkg/ports/libftdi1/cmake-fix.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/FindUSB1.cmake b/cmake/FindUSB1.cmake +index b90e297..6cc97a0 100644 +--- a/cmake/FindUSB1.cmake ++++ b/cmake/FindUSB1.cmake +@@ -26,7 +26,7 @@ else (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) + PATH_SUFFIXES libusb-1.0 + PATHS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS}) + +- FIND_LIBRARY(LIBUSB_LIBRARIES NAMES usb-1.0 ++ FIND_LIBRARY(LIBUSB_LIBRARIES NAMES usb-1.0 libusb-1.0 + PATHS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS}) + + include(FindPackageHandleStandardArgs) diff --git a/vcpkg/ports/libftdi1/exports.def b/vcpkg/ports/libftdi1/exports.def new file mode 100644 index 0000000..f5179c5 --- /dev/null +++ b/vcpkg/ports/libftdi1/exports.def @@ -0,0 +1,67 @@ +EXPORTS + convert_baudrate_UT_export + ftdi_deinit + ftdi_disable_bitbang + ftdi_eeprom_build + ftdi_eeprom_decode + ftdi_eeprom_get_strings + ftdi_eeprom_initdefaults + ftdi_eeprom_set_strings + ftdi_erase_eeprom + ftdi_free + ftdi_get_eeprom_buf + ftdi_get_eeprom_value + ftdi_get_error_string + ftdi_get_latency_timer + ftdi_get_library_version + ftdi_init + ftdi_list_free + ftdi_list_free2 + ftdi_new + ftdi_poll_modem_status + ftdi_read_chipid + ftdi_read_data + ftdi_read_data_get_chunksize + ftdi_read_data_set_chunksize + ftdi_read_data_submit + ftdi_read_eeprom + ftdi_read_eeprom_location + ftdi_read_pins + ftdi_set_baudrate + ftdi_set_bitmode + ftdi_set_eeprom_buf + ftdi_set_eeprom_user_data + ftdi_set_eeprom_value + ftdi_set_error_char + ftdi_set_event_char + ftdi_set_interface + ftdi_set_latency_timer + ftdi_set_line_property + ftdi_set_line_property2 + ftdi_set_usbdev + ftdi_setdtr + ftdi_setdtr_rts + ftdi_setflowctrl + ftdi_setrts + ftdi_transfer_data_cancel + ftdi_transfer_data_done + ftdi_usb_close + ftdi_usb_find_all + ftdi_usb_get_strings + ftdi_usb_get_strings2 + ftdi_usb_open + ftdi_usb_open_bus_addr + ftdi_usb_open_desc + ftdi_usb_open_desc_index + ftdi_usb_open_dev + ftdi_usb_open_string + ftdi_usb_purge_buffers + ftdi_usb_purge_rx_buffer + ftdi_usb_purge_tx_buffer + ftdi_usb_reset + ftdi_write_data + ftdi_write_data_get_chunksize + ftdi_write_data_set_chunksize + ftdi_write_data_submit + ftdi_write_eeprom + ftdi_write_eeprom_location diff --git a/vcpkg/ports/libftdi1/portfile.cmake b/vcpkg/ports/libftdi1/portfile.cmake new file mode 100644 index 0000000..e05ccca --- /dev/null +++ b/vcpkg/ports/libftdi1/portfile.cmake @@ -0,0 +1,47 @@ +vcpkg_download_distfile(ARCHIVE + URLS "https://www.intra2net.com/en/developer/libftdi/download/libftdi1-1.4.tar.bz2" + FILENAME "libftdi1-1.4.tar.bz2" + SHA512 dbab74f7bc35ca835b9c6dd5b70a64816948d65da1f73a9ece37a0f0f630bd0df1a676543acc517b02a718bc34ba4f7a30cbc48b6eed1c154c917f8ef0a358fc +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF 1.4 + PATCHES + cmake-fix.patch + win32.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/exports.def DESTINATION ${SOURCE_PATH}/src) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTS=OFF + -DDOCUMENTATION=OFF + -DEXAMPLES=OFF + -DPYTHON_BINDINGS=OFF + -DLINK_PYTHON_LIBRARY=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Boost=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Confuse=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Libintl=ON + -DCMAKE_DISABLE_FIND_PACKAGE_PythonLibs=ON + -DCMAKE_DISABLE_FIND_PACKAGE_PythonInterp=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libftdi1 TARGET_PATH share/libftdi1) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libftdi1/win32.patch b/vcpkg/ports/libftdi1/win32.patch new file mode 100644 index 0000000..8cf35c9 --- /dev/null +++ b/vcpkg/ports/libftdi1/win32.patch @@ -0,0 +1,28 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 9fd86a6..e1e848c 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -18,9 +18,14 @@ message(STATUS "Detected git snapshot version: ${SNAPSHOT_VERSION}") + configure_file(ftdi_version_i.h.in "${CMAKE_CURRENT_BINARY_DIR}/ftdi_version_i.h" @ONLY) + + # Targets ++if(WIN32) ++set(c_sources ${CMAKE_CURRENT_SOURCE_DIR}/ftdi.c ${CMAKE_CURRENT_SOURCE_DIR}/exports.def CACHE INTERNAL "List of c sources" ) ++else() + set(c_sources ${CMAKE_CURRENT_SOURCE_DIR}/ftdi.c ${CMAKE_CURRENT_SOURCE_DIR}/ftdi_stream.c CACHE INTERNAL "List of c sources" ) ++endif() + set(c_headers ${CMAKE_CURRENT_SOURCE_DIR}/ftdi.h CACHE INTERNAL "List of c headers" ) + ++if(BUILD_SHARED_LIBS) + add_library(ftdi1 SHARED ${c_sources}) + + math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1") # Compatiblity with previous releases +@@ -38,7 +43,7 @@ install ( TARGETS ftdi1 + ARCHIVE DESTINATION lib${LIB_SUFFIX} + ) + +-if ( STATICLIBS ) ++else() + add_library(ftdi1-static STATIC ${c_sources}) + target_link_libraries(ftdi1-static ${LIBUSB_LIBRARIES}) + set_target_properties(ftdi1-static PROPERTIES OUTPUT_NAME "ftdi1") diff --git a/vcpkg/ports/libgd/0001-fix-cmake.patch b/vcpkg/ports/libgd/0001-fix-cmake.patch new file mode 100644 index 0000000..a1a3166 --- /dev/null +++ b/vcpkg/ports/libgd/0001-fix-cmake.patch @@ -0,0 +1,181 @@ +From 26fdb0f43b2d994de9a3d62f85fc650e8c495f18 Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka +Date: Sat, 1 Apr 2017 23:16:18 +0300 +Subject: [PATCH] fix cmake + +--- + CMakeLists.txt | 53 +++++++++++++++++++++++---------------------- + src/CMakeLists.txt | 63 +++++++++++++++++++++++++++++------------------------- + 2 files changed, 62 insertions(+), 54 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 42934d0..796fa47 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -223,8 +223,10 @@ else (USE_EXT_GD) + add_subdirectory(src) + endif (USE_EXT_GD) + +-add_subdirectory(tests) +-add_subdirectory(examples) ++if(BUILD_TEST) ++ add_subdirectory(tests) ++ add_subdirectory(examples) ++endif() + + add_custom_target(distclean ${GD_SOURCE_DIR}/cmake/distclean.sh) + +@@ -246,29 +248,30 @@ IF (ENABLE_LIQ AND LIQ_BUILD) + ADD_DEPENDENCIES(${GD_LIB_STATIC} libimagequant) + ENDIF(ENABLE_LIQ AND LIQ_BUILD) + +- +-INSTALL(FILES docs/INSTALL DESTINATION share/docs) +-INSTALL(FILES docs/README.JPN DESTINATION share/docs) +-INSTALL(FILES docs/README.CMAKE DESTINATION share/docs) +-INSTALL(FILES docs/README.TESTING DESTINATION share/docs) +-INSTALL(FILES docs/README.TXT DESTINATION share/docs) +- +- +-INSTALL(FILES examples/arc.c DESTINATION share/docs) +-INSTALL(FILES examples/copyrotated.c DESTINATION share/docs) +-INSTALL(FILES examples/crop.c DESTINATION share/docs) +-INSTALL(FILES examples/flip.c DESTINATION share/docs) +-INSTALL(FILES examples/gif.c DESTINATION share/docs) +-INSTALL(FILES examples/nnquant.c DESTINATION share/docs) +-INSTALL(FILES examples/noIcon.pic DESTINATION share/docs) +-INSTALL(FILES examples/noIcon.sgi DESTINATION share/docs) +-INSTALL(FILES examples/noIcon.tga DESTINATION share/docs) +-INSTALL(FILES examples/noIconAlpha.tga DESTINATION share/docs) +-INSTALL(FILES examples/test_crop_threshold.png DESTINATION share/docs) +-INSTALL(FILES examples/tgaread.c DESTINATION share/docs) +-INSTALL(FILES examples/tiffread.c DESTINATION share/docs) +-INSTALL(FILES examples/windows.c DESTINATION share/docs) +- ++if(BUILD_DOCS) ++ INSTALL(FILES docs/INSTALL DESTINATION share/docs) ++ INSTALL(FILES docs/README.JPN DESTINATION share/docs) ++ INSTALL(FILES docs/README.CMAKE DESTINATION share/docs) ++ INSTALL(FILES docs/README.TESTING DESTINATION share/docs) ++ INSTALL(FILES docs/README.TXT DESTINATION share/docs) ++endif() ++ ++if(BUILD_EXAMPLES) ++ INSTALL(FILES examples/arc.c DESTINATION share/docs) ++ INSTALL(FILES examples/copyrotated.c DESTINATION share/docs) ++ INSTALL(FILES examples/crop.c DESTINATION share/docs) ++ INSTALL(FILES examples/flip.c DESTINATION share/docs) ++ INSTALL(FILES examples/gif.c DESTINATION share/docs) ++ INSTALL(FILES examples/nnquant.c DESTINATION share/docs) ++ INSTALL(FILES examples/noIcon.pic DESTINATION share/docs) ++ INSTALL(FILES examples/noIcon.sgi DESTINATION share/docs) ++ INSTALL(FILES examples/noIcon.tga DESTINATION share/docs) ++ INSTALL(FILES examples/noIconAlpha.tga DESTINATION share/docs) ++ INSTALL(FILES examples/test_crop_threshold.png DESTINATION share/docs) ++ INSTALL(FILES examples/tgaread.c DESTINATION share/docs) ++ INSTALL(FILES examples/tiffread.c DESTINATION share/docs) ++ INSTALL(FILES examples/windows.c DESTINATION share/docs) ++endif() + + set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING") + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 08fd699..497dd93 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -90,17 +90,17 @@ if (BUILD_STATIC_LIBS) + if (UNIX) + set_target_properties(${GD_LIB_STATIC} PROPERTIES OUTPUT_NAME ${GD_LIB}) + endif() +-endif() + +-if (WIN32 AND NOT MINGW AND NOT MSYS) +- # SET_TARGET_PROPERTIES(${GD_LIB} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:msvcrt.lib") +- SET_PROPERTY(TARGET ${GD_LIB_STATIC} APPEND PROPERTY COMPILE_DEFINITIONS NONDLL=1) +-ENDIF(WIN32 AND NOT MINGW AND NOT MSYS) ++ if (WIN32 AND NOT MINGW AND NOT MSYS) ++ # SET_TARGET_PROPERTIES(${GD_LIB} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:msvcrt.lib") ++ SET_PROPERTY(TARGET ${GD_LIB_STATIC} APPEND PROPERTY COMPILE_DEFINITIONS NONDLL=1) ++ ENDIF(WIN32 AND NOT MINGW AND NOT MSYS) + +-if (MINGW OR MSYS) +- ADD_DEFINITIONS("-mms-bitfields") +- set_target_properties(${GD_LIB_STATIC} PROPERTIES OUTPUT_NAME ${GD_LIB}) +-endif (MINGW OR MSYS) ++ if (MINGW OR MSYS) ++ ADD_DEFINITIONS("-mms-bitfields") ++ set_target_properties(${GD_LIB_STATIC} PROPERTIES OUTPUT_NAME ${GD_LIB}) ++ endif (MINGW OR MSYS) ++endif() + + INCLUDE_DIRECTORIES(BEFORE "${PROJECT_BINARY_DIR}" "${CMAKE_BINARY_DIR}" "${GD_SOURCE_DIR}/src") + +@@ -123,32 +123,37 @@ if (BUILD_STATIC_LIBS) + target_link_libraries(${GD_LIB_STATIC} ${LIBGD_DEP_LIBS}) + endif() + +-set(GD_PROGRAMS gdcmpgif) + +-if (PNG_FOUND) +- set(GD_PROGRAMS ${GD_PROGRAMS} gdtopng pngtogd webpng) ++if(BUILD_PROGRAMS) ++ set(GD_PROGRAMS gdcmpgif) ++ ++ if (PNG_FOUND) ++ set(GD_PROGRAMS ${GD_PROGRAMS} gdtopng pngtogd webpng) ++ if (ZLIB_FOUND) ++ set(GD_PROGRAMS ${GD_PROGRAMS} gdparttopng gd2topng pngtogd2) ++ endif() ++ endif() ++ ++ if (FREETYPE_FOUND) ++ set(GD_PROGRAMS ${GD_PROGRAMS} annotate) ++ endif() ++ + if (ZLIB_FOUND) +- set(GD_PROGRAMS ${GD_PROGRAMS} gdparttopng gd2topng pngtogd2) ++ set(GD_PROGRAMS ${GD_PROGRAMS} gd2copypal gd2togif giftogd2) + endif() +-endif() + +-if (FREETYPE_FOUND) +- set(GD_PROGRAMS ${GD_PROGRAMS} annotate) +-endif() ++ foreach(program ${GD_PROGRAMS}) ++ add_executable(${program} ${program}.c) ++ if (BUILD_SHARED_LIBS) ++ target_link_libraries(${program} ${GD_LIB}) ++ else() ++ target_link_libraries(${program} ${GD_LIB_STATIC}) ++ endif() ++ endforeach(program) + +-if (ZLIB_FOUND) +- set(GD_PROGRAMS ${GD_PROGRAMS} gd2copypal gd2togif giftogd2) ++ install(PROGRAMS bdftogd DESTINATION bin) + endif() + +-foreach(program ${GD_PROGRAMS}) +- add_executable(${program} ${program}.c) +- if (BUILD_SHARED_LIBS) +- target_link_libraries(${program} ${GD_LIB}) +- else() +- target_link_libraries(${program} ${GD_LIB_STATIC}) +- endif() +-endforeach(program) +- + set(GD_INSTALL_TARGETS ${GD_PROGRAMS}) + if (BUILD_SHARED_LIBS) + set(GD_INSTALL_TARGETS ${GD_INSTALL_TARGETS} ${GD_LIB}) +@@ -161,7 +166,7 @@ install(TARGETS ${GD_INSTALL_TARGETS} + RUNTIME DESTINATION bin + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +-install(PROGRAMS bdftogd DESTINATION bin) ++ + install(FILES + entities.h + gd.h +-- +2.11.0.windows.1 + diff --git a/vcpkg/ports/libgd/CONTROL b/vcpkg/ports/libgd/CONTROL new file mode 100644 index 0000000..81384cb --- /dev/null +++ b/vcpkg/ports/libgd/CONTROL @@ -0,0 +1,29 @@ +Source: libgd +Version: 2.2.5-4 +Homepage: https://github.com/libgd/libgd +Description: Open source code library for the dynamic creation of images by programmers. +Default-Features: fontconfig, freetype, jpeg, png, tiff, webp + +Feature: fontconfig +Description: Support for fontconfig +Build-Depends: fontconfig + +Feature: freetype +Description: Support for freetype +Build-Depends: freetype + +Feature: jpeg +Description: Support for jpeg +Build-Depends: libjpeg-turbo + +Feature: png +Description: Support for png +Build-Depends: libpng + +Feature: tiff +Description: Support for tiff +Build-Depends: tiff + +Feature: webp +Description: Support for webp +Build-Depends: libwebp diff --git a/vcpkg/ports/libgd/intrin.patch b/vcpkg/ports/libgd/intrin.patch new file mode 100644 index 0000000..1f1db8e --- /dev/null +++ b/vcpkg/ports/libgd/intrin.patch @@ -0,0 +1,13 @@ +diff --git a/src/gd_interpolation.c b/src/gd_interpolation.c +index b9a206551..f75469329 100644 +--- a/src/gd_interpolation.c ++++ b/src/gd_interpolation.c +@@ -75,7 +75,7 @@ TODO: + + #ifdef _MSC_VER + # pragma optimize("t", on) +-# include ++# include + #endif + + static gdImagePtr gdImageScaleBilinear(gdImagePtr im, diff --git a/vcpkg/ports/libgd/no-write-source-dir.patch b/vcpkg/ports/libgd/no-write-source-dir.patch new file mode 100644 index 0000000..3017e7e --- /dev/null +++ b/vcpkg/ports/libgd/no-write-source-dir.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b16d4a4..5126085 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -191,7 +191,8 @@ else (USE_EXT_GD) + CHECK_INCLUDE_FILE("stdint.h" HAVE_STDINT_H) + CHECK_INCLUDE_FILE("inttypes.h" HAVE_INTTYPES_H) + +- CONFIGURE_FILE(${GD_SOURCE_DIR}/src/config.h.cmake ${GD_SOURCE_DIR}/src/config.h ESCAPE_QUOTES) ++ CONFIGURE_FILE(${GD_SOURCE_DIR}/src/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/config.h ESCAPE_QUOTES) ++ include_directories(${CMAKE_CURRENT_BINARY_DIR}/src) + + option(BUILD_SHARED_LIBS "Build shared libs" ON) + option(BUILD_STATIC_LIBS "Build static libs" OFF) diff --git a/vcpkg/ports/libgd/portfile.cmake b/vcpkg/ports/libgd/portfile.cmake new file mode 100644 index 0000000..1a25969 --- /dev/null +++ b/vcpkg/ports/libgd/portfile.cmake @@ -0,0 +1,78 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libgd/libgd + REF gd-2.2.5 + SHA512 e4ee4c0d1064c93640c29b5741f710872297f42bcc883026a63124807b6ff23bd79ae66bb9148a30811907756c4566ba8f1c0560673ccafc20fee38d82ca838f + HEAD_REF master + PATCHES + 0001-fix-cmake.patch + no-write-source-dir.patch + intrin.patch +) + +#delete CMake builtins modules +file(REMOVE_RECURSE ${SOURCE_PATH}/cmake/modules/CMakeParseArguments.cmake) +file(REMOVE_RECURSE ${SOURCE_PATH}/cmake/modules/FindFreetype.cmake) +file(REMOVE_RECURSE ${SOURCE_PATH}/cmake/modules/FindJPEG.cmake) +file(REMOVE_RECURSE ${SOURCE_PATH}/cmake/modules/FindPackageHandleStandardArgs.cmake) +file(REMOVE_RECURSE ${SOURCE_PATH}/cmake/modules/FindPNG.cmake) + +set(ENABLE_PNG OFF) +if("png" IN_LIST FEATURES) + set(ENABLE_PNG ON) +endif() + +set(ENABLE_JPEG OFF) +if("jpeg" IN_LIST FEATURES) + set(ENABLE_JPEG ON) +endif() + +set(ENABLE_TIFF OFF) +if("tiff" IN_LIST FEATURES) + set(ENABLE_TIFF ON) +endif() + +set(ENABLE_FREETYPE OFF) +if("freetype" IN_LIST FEATURES) + set(ENABLE_FREETYPE ON) +endif() + +set(ENABLE_WEBP OFF) +if("webp" IN_LIST FEATURES) + set(ENABLE_WEBP ON) +endif() + +set(ENABLE_FONTCONFIG OFF) +if("fontconfig" IN_LIST FEATURES) + set(ENABLE_FONTCONFIG ON) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(LIBGD_SHARED_LIBS ON) + set(LIBGD_STATIC_LIBS OFF) +else() + set(LIBGD_SHARED_LIBS OFF) + set(LIBGD_STATIC_LIBS ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DENABLE_PNG=${ENABLE_PNG} + -DENABLE_JPEG=${ENABLE_JPEG} + -DENABLE_TIFF=${ENABLE_TIFF} + -DENABLE_FREETYPE=${ENABLE_FREETYPE} + -DENABLE_WEBP=${ENABLE_WEBP} + -DENABLE_FONTCONFIG=${ENABLE_FONTCONFIG} + -DBUILD_STATIC_LIBS=${LIBGD_STATIC_LIBS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgd) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libgd/COPYING ${CURRENT_PACKAGES_DIR}/share/libgd/copyright) diff --git a/vcpkg/ports/libgeotiff/CONTROL b/vcpkg/ports/libgeotiff/CONTROL new file mode 100644 index 0000000..42a9738 --- /dev/null +++ b/vcpkg/ports/libgeotiff/CONTROL @@ -0,0 +1,5 @@ +Source: libgeotiff +Version: 1.4.2-10 +Homepage: https://download.osgeo.org/geotiff/libgeotiff +Description: Libgeotiff is an open source library normally hosted on top of libtiff for reading, and writing GeoTIFF information tags. +Build-Depends: tiff, proj4, zlib, libjpeg-turbo diff --git a/vcpkg/ports/libgeotiff/cmakelists.patch b/vcpkg/ports/libgeotiff/cmakelists.patch new file mode 100644 index 0000000..689c6df --- /dev/null +++ b/vcpkg/ports/libgeotiff/cmakelists.patch @@ -0,0 +1,124 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0c70973..617978c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -190,22 +190,6 @@ IF(WITH_TIFF) + endif () + + IF(TIFF_FOUND) +- # Confirm required API is available +- INCLUDE(CheckFunctionExists) +- SET(CMAKE_REQUIRED_LIBRARIES ${TIFF_LIBRARIES}) +- +- CHECK_FUNCTION_EXISTS(TIFFOpen HAVE_TIFFOPEN) +- IF(NOT HAVE_TIFFOPEN) +- SET(TIFF_FOUND) # ReSET to NOT found for TIFF library +- MESSAGE(FATAL_ERROR "Failed to link with libtiff - TIFFOpen function not found") +- ENDIF() +- +- CHECK_FUNCTION_EXISTS(TIFFMergeFieldInfo HAVE_TIFFMERGEFIELDINFO) +- IF(NOT HAVE_TIFFMERGEFIELDINFO) +- SET(TIFF_FOUND) # ReSET to NOT found for TIFF library +- MESSAGE(FATAL_ERROR "Failed to link with libtiff - TIFFMergeFieldInfo function not found. libtiff 3.6.0 Beta or later required. Please upgrade or use an older version of libgeotiff") +- ENDIF() +- + INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR}) + ADD_DEFINITIONS(-DHAVE_TIFF=1) + ENDIF(TIFF_FOUND) +@@ -354,11 +338,6 @@ INSTALL(FILES ${GEOTIFF_MAN_PAGES} DESTINATION share/man/man1) + # INSTALL(FILES ${GEOTIFF_LIB_HEADERS} DESTINATION ${GEOTIFF_INCLUDE_DIR}) + INSTALL(FILES ${GEOTIFF_LIB_HEADERS} DESTINATION include) + +-############################################################################### +-# Build libxtiff library +- +-ADD_SUBDIRECTORY(libxtiff) +- + ############################################################################### + # Build libgeotiff library + +@@ -427,13 +406,9 @@ if (MSVC OR CMAKE_CONFIGURATION_TYPES) + set (CMAKE_DEBUG_POSTFIX _d) + endif () + +-ADD_LIBRARY(${GEOTIFF_ARCHIVE_TARGET} STATIC +- ${GEOTIFF_LIB_SOURCES} ${GEOTIFF_LIB_CSV_SOURCES}) +-SET_TARGET_PROPERTIES(${GEOTIFF_ARCHIVE_TARGET} PROPERTIES +- OUTPUT_NAME ${GEOTIFF_LIB_NAME}) + + # Shared libgeotiff library +-ADD_LIBRARY(${GEOTIFF_LIBRARY_TARGET} SHARED ++ADD_LIBRARY(${GEOTIFF_LIBRARY_TARGET} + ${GEOTIFF_LIB_SOURCES} ${GEOTIFF_LIB_CSV_SOURCES} ${XTIFF_SOURCES}) + + # Windows: +@@ -478,7 +453,7 @@ TARGET_LINK_LIBRARIES(${GEOTIFF_LIBRARY_TARGET} + # LIBRARY DESTINATION ${GEOTIFF_LIB_DIR} + # ARCHIVE DESTINATION ${GEOTIFF_LIB_DIR}) + +-INSTALL( TARGETS ${GEOTIFF_ARCHIVE_TARGET} ${GEOTIFF_LIBRARY_TARGET} ++INSTALL( TARGETS ${GEOTIFF_LIBRARY_TARGET} + EXPORT depends + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib +diff --git a/bin/CMakeLists.txt b/bin/CMakeLists.txt +index 7b12341..b6b1d0c 100644 +--- a/bin/CMakeLists.txt ++++ b/bin/CMakeLists.txt +@@ -6,9 +6,6 @@ + # + ############################################################################### + +-INCLUDE_DIRECTORIES( +- . +- ${CMAKE_SOURCE_DIR}) + + IF(WIN32 AND MSVC) + SET(GETOPT_SOURCE getopt.c) +@@ -22,12 +19,11 @@ MESSAGE(STATUS "Adding GeoTIFF utilities to build") + + FOREACH(utility ${GEOTIFF_UTILITIES}) + ADD_EXECUTABLE(${utility} ${utility}.c ${GETOPT_SOURCE}) +- TARGET_LINK_LIBRARIES(${utility} xtiff ${GEOTIFF_LIBRARY_TARGET}) ++ TARGET_LINK_LIBRARIES(${utility} ${GEOTIFF_LIBRARY_TARGET}) + ENDFOREACH() + + ADD_EXECUTABLE(geotifcp geotifcp.c ${GETOPT_SOURCE}) + TARGET_LINK_LIBRARIES(geotifcp +- xtiff + ${GEOTIFF_LIBRARY_TARGET} + ${JPEG_LIBRARIES} + ${ZLIB_LIBRARIES}) +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +index 47a2b00..ffbd004 100644 +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt +@@ -6,13 +6,8 @@ + # ${INSTALL_CMAKE_DIR} and @PROJECT_ROOT_DIR@ is the relative + # path to the root from there. (Note that the whole install tree can + # be relocated.) +-if (NOT WIN32) +- set (INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}") +- set (PROJECT_ROOT_DIR "../../..") +-else () +- set (INSTALL_CMAKE_DIR "cmake") +- set (PROJECT_ROOT_DIR "..") +-endif () ++ set (INSTALL_CMAKE_DIR "share/${PROJECT_NAME}") ++ set (PROJECT_ROOT_DIR "../..") + + configure_file (project-config.cmake.in project-config.cmake @ONLY) + configure_file (project-config-version.cmake.in +diff --git a/cmake/project-config.cmake.in b/cmake/project-config.cmake.in +index 6b5499f..e4ddd11 100644 +--- a/cmake/project-config.cmake.in ++++ b/cmake/project-config.cmake.in +@@ -33,7 +33,7 @@ set (@PROJECT_NAME@_BINARY_DIRS "${_ROOT}/bin") + message (STATUS " include directory: \${@PROJECT_NAME@_INCLUDE_DIRS}") + + set (@PROJECT_NAME@_SHARED_LIBRARIES @GEOTIFF_LIBRARY_TARGET@) +-set (@PROJECT_NAME@_STATIC_LIBRARIES @GEOTIFF_ARCHIVE_TARGET@) ++set (@PROJECT_NAME@_STATIC_LIBRARIES @GEOTIFF_LIBRARY_TARGET@) + # Read in the exported definition of the library + include ("${_DIR}/@PROJECT_NAME_LOWER@-depends.cmake") + diff --git a/vcpkg/ports/libgeotiff/fix-proj4.patch b/vcpkg/ports/libgeotiff/fix-proj4.patch new file mode 100644 index 0000000..d6e8bce --- /dev/null +++ b/vcpkg/ports/libgeotiff/fix-proj4.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 617978c..baf45bc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -146,8 +146,11 @@ IF(WITH_PROJ4) + endif () + + IF(PROJ4_FOUND) +- ADD_DEFINITIONS(-DHAVE_LIBPROJ=1) ++ ADD_DEFINITIONS(-DHAVE_LIBPROJ=1 -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1) + INCLUDE_DIRECTORIES(${PROJ4_INCLUDE_DIR}) ++ IF(NOT WIN32) ++ LIST(APPEND PROJ4_LIBRARIES ${CMAKE_DL_LIBS}) ++ ENDIF() + ENDIF() + ENDIF() + diff --git a/vcpkg/ports/libgeotiff/geotiff-config.patch b/vcpkg/ports/libgeotiff/geotiff-config.patch new file mode 100644 index 0000000..284c641 --- /dev/null +++ b/vcpkg/ports/libgeotiff/geotiff-config.patch @@ -0,0 +1,17 @@ +diff --git a/cmake/project-config.cmake.in b/cmake/project-config.cmake.in +index 0dd376aca..0615081bd 100644 +--- a/cmake/project-config.cmake.in ++++ b/cmake/project-config.cmake.in +@@ -23,6 +23,12 @@ message (STATUS "Reading ${CMAKE_CURRENT_LIST_FILE}") + message (STATUS + "@PROJECT_NAME@ configuration, version ${@PROJECT_NAME@_VERSION}") + ++#Find dependencies ++if(@WITH_PROJ4@) ++ include(CMakeFindDependencyMacro) ++ find_dependency(PROJ4) ++endif() ++ + # Tell the user project where to find our headers and libraries + get_filename_component (_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) + get_filename_component (_ROOT "${_DIR}/@PROJECT_ROOT_DIR@" ABSOLUTE) diff --git a/vcpkg/ports/libgeotiff/portfile.cmake b/vcpkg/ports/libgeotiff/portfile.cmake new file mode 100644 index 0000000..174bed1 --- /dev/null +++ b/vcpkg/ports/libgeotiff/portfile.cmake @@ -0,0 +1,69 @@ +include(vcpkg_common_functions) + +set(LIBGEOTIFF_VERSION 1.4.2) + +vcpkg_download_distfile(ARCHIVE + URLS "http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-${LIBGEOTIFF_VERSION}.tar.gz" + FILENAME "libgeotiff-${LIBGEOTIFF_VERSION}.tar.gz" + SHA512 059c6e05eb0c47f17b102c7217a2e1636e76d622c4d1bdcf0bd89fb3505f3130bffa881e21c73cfd2ca0d6863b81322f85784658ba3539b53b63c3a8f38d1deb +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${LIBGEOTIFF_VERSION} + PATCHES + cmakelists.patch + geotiff-config.patch + fix-proj4.patch +) + +# Delete FindPROJ4.cmake +file(REMOVE ${SOURCE_PATH}/cmake/FindPROJ4.cmake) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DWITH_TIFF=1 + -DWITH_PROJ4=1 + -DWITH_ZLIB=1 + -DWITH_JPEG=1 + -DWITH_UTILITIES=1 +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc) + +if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + file(GLOB GEOTIFF_UTILS ${CURRENT_PACKAGES_DIR}/bin/*) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +else() + file(GLOB GEOTIFF_UTILS ${CURRENT_PACKAGES_DIR}/bin/*.exe) + file(GLOB GEOTIFF_UTILS_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + file(REMOVE ${GEOTIFF_UTILS_DEBUG}) +endif() + +file(COPY ${GEOTIFF_UTILS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/libgeotiff) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/libgeotiff) +file(REMOVE ${GEOTIFF_UTILS}) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) +endif() + +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/GeoTIFF) + +file(INSTALL ${CURRENT_PACKAGES_DIR}/share/libgeotiff/geotiff-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotiff) +file(INSTALL ${CURRENT_PACKAGES_DIR}/share/libgeotiff/geotiff-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotiff) +file(INSTALL ${CURRENT_PACKAGES_DIR}/share/libgeotiff/geotiff-depends-release.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotiff) +file(INSTALL ${CURRENT_PACKAGES_DIR}/share/libgeotiff/geotiff-depends-debug.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotiff) +file(INSTALL ${CURRENT_PACKAGES_DIR}/share/libgeotiff/geotiff-depends.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotiff) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgeotiff RENAME copyright) + +file(RENAME ${CURRENT_PACKAGES_DIR}/doc ${CURRENT_PACKAGES_DIR}/share/libgeotiff/doc) diff --git a/vcpkg/ports/libgit2/CONTROL b/vcpkg/ports/libgit2/CONTROL new file mode 100644 index 0000000..1c16caf --- /dev/null +++ b/vcpkg/ports/libgit2/CONTROL @@ -0,0 +1,14 @@ +Source: libgit2 +Version: 1.0.1 +Homepage: https://github.com/libgit2/libgit2 +Build-Depends: zlib, openssl (!windows&&!uwp) +Description: Git linkable library +Supports: !uwp + +Feature: pcre +Description: Build against external libpcre +Build-Depends: pcre + +Feature: pcre2 +Description: Build against external libpcre2 +Build-Depends: pcre2 diff --git a/vcpkg/ports/libgit2/portfile.cmake b/vcpkg/ports/libgit2/portfile.cmake new file mode 100644 index 0000000..c246525 --- /dev/null +++ b/vcpkg/ports/libgit2/portfile.cmake @@ -0,0 +1,35 @@ +# libgit2 uses winapi functions not available in WindowsStore +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libgit2/libgit2 + REF 0ced29612dacb67eefe0c562a5c1d3aab21cce96#version 1.0.1 + SHA512 477e7309682d470965ef85c84f57b647526e1d2cd9ece1fd4f5f4e03e586280651ee40aafadb5b66940cfbd80816f205aa54886f457ca8fd795313137e015102 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_CRT) + +if ("pcre" IN_LIST FEATURES) + set(REGEX_BACKEND pcre) +elseif ("pcre2" IN_LIST FEATURES) + set(REGEX_BACKEND pcre2) +else() + set(REGEX_BACKEND builtin) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_CLAR=OFF + -DREGEX_BACKEND=${REGEX_BACKEND} + -DSTATIC_CRT=${STATIC_CRT} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libgo/CONTROL b/vcpkg/ports/libgo/CONTROL new file mode 100644 index 0000000..92d6f9f --- /dev/null +++ b/vcpkg/ports/libgo/CONTROL @@ -0,0 +1,5 @@ +Source: libgo +Version: 3.1-1 +Homepage: https://github.com/yyzybb537/libgo +Description: The best stackful coroutine by c++11. +Supports: !(arm|uwp) diff --git a/vcpkg/ports/libgo/cmake.patch b/vcpkg/ports/libgo/cmake.patch new file mode 100644 index 0000000..54a7e73 --- /dev/null +++ b/vcpkg/ports/libgo/cmake.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dfa9b72..ff9827e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -152,6 +152,8 @@ if (UNIX) + + elseif (WIN32) + set_target_properties("${STATIC_T}" PROPERTIES COMPILE_FLAGS "/wd4819 /wd4267") ++ install(TARGETS ${STATIC_T} LIBRARY DESTINATION "lib" ARCHIVE DESTINATION "lib") ++ install(DIRECTORY ${PROJECT_SOURCE_DIR}/libgo/ DESTINATION "include/libgo" FILES_MATCHING PATTERN "*.h") + endif() + + if (WIN32) diff --git a/vcpkg/ports/libgo/libgo-config.cmake b/vcpkg/ports/libgo/libgo-config.cmake new file mode 100644 index 0000000..fd52f8d --- /dev/null +++ b/vcpkg/ports/libgo/libgo-config.cmake @@ -0,0 +1,25 @@ +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) + +if(NOT LIBGO_FIND_COMPONENTS) + set(LIBGO_FIND_COMPONENTS libgo libgo) + if(LIBGO_FIND_REQUIRED) + set(LIBGO_FIND_REQUIRED_libgo TRUE) + endif() + + set(LIBGO_FOUND TRUE) +endif() + +set(LIBGO_INCLUDE_DIRS ${_DIR}/../../include) +set(LIBGO_LIBRARIES) +if (EXISTS ${_DIR}/../../lib/liblibgo.a) + list(APPEND LIBGO_LIBRARIES optimized ${_DIR}/../../lib/liblibgo.a) +endif() +if (EXISTS ${_DIR}/../../debug/lib/liblibgo.a) + list(APPEND LIBGO_LIBRARIES debug ${_DIR}/../../debug/lib/liblibgo.a) +endif() +if (EXISTS ${_DIR}/../../lib/libgo.lib) + list(APPEND LIBGO_LIBRARIES optimized ${_DIR}/../../lib/libgo.lib) +endif() +if (EXISTS ${_DIR}/../../debug/lib/libgo.lib) + list(APPEND LIBGO_LIBRARIES debug ${_DIR}/../../debug/lib/libgo.lib) +endif() diff --git a/vcpkg/ports/libgo/portfile.cmake b/vcpkg/ports/libgo/portfile.cmake new file mode 100644 index 0000000..26339fc --- /dev/null +++ b/vcpkg/ports/libgo/portfile.cmake @@ -0,0 +1,46 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO yyzybb537/libgo + REF 5d4f36508e8eb2d5aa17cf37cd951dc91da23096 #v3.1 + SHA512 0f281f58116148ba1dd3904febbc391d47190f8e148b70bed7c4b7e6cb3efa5e41e2b7be4832ceeb805996e085f4c2d89fd0cf3b0651e037b32758d6a441411b + HEAD_REF master + PATCHES cmake.patch +) + +vcpkg_from_github( + OUT_SOURCE_PATH XHOOK_SOURCE_PATH + REPO XBased/xhook + REF e18c450541892212ca4f11dc91fa269fabf9646f + SHA512 1bcf320f50cff13d92013a9f0ab5c818c2b6b63e9c1ac18c5dd69189e448d7a848f1678389d8b2c08c65f907afb3909e743f6c593d9cfb21e2bb67d5c294a166 + HEAD_REF master +) + +file(REMOVE_RECURSE ${SOURCE_PATH}/third_party) +file(MAKE_DIRECTORY ${SOURCE_PATH}/third_party) +file(RENAME ${XHOOK_SOURCE_PATH} ${SOURCE_PATH}/third_party/xhook) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/libgo/netio/disable_hook) + +if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/libgo/netio/unix/static_hook) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/libgo/netio/windows) +else() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/libgo/netio/unix) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${CURRENT_PORT_DIR}/libgo-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/libgo/usage b/vcpkg/ports/libgo/usage new file mode 100644 index 0000000..a8f0729 --- /dev/null +++ b/vcpkg/ports/libgo/usage @@ -0,0 +1,5 @@ +The package libgo provides CMake integration: + + find_package(libgo REQUIRED) + target_include_directories(main PRIVATE ${LIBGO_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${LIBGO_LIBRARIES}) diff --git a/vcpkg/ports/libgpod/CMakeLists.txt b/vcpkg/ports/libgpod/CMakeLists.txt new file mode 100644 index 0000000..ea12949 --- /dev/null +++ b/vcpkg/ports/libgpod/CMakeLists.txt @@ -0,0 +1,78 @@ +cmake_minimum_required (VERSION 3.12) + +project (libgpod C) + +option(WITH_INTERNAL_GCHECKSUM OFF) + +find_package(unofficial-sqlite3 CONFIG REQUIRED) + +include(SelectLibraryConfigurations) +find_path(glib_PATH glib.h PATHS include) +find_library(glib_LIBRARY_RELEASE NAMES glib-2.0 PATHS lib) +find_library(glib_LIBRARY_DEBUG NAMES glib-2.0 PATHS debug/lib) +select_library_configurations(glib) +if (NOT glib_FOUND) + message(FATAL_ERROR "glib not found.") +endif() + +find_path(plist_PATH plist++.h PATH_SUFFIXES plist) +find_library(plist_LIBRARY_RELEASE NAMES plist PATHS lib) +find_library(plist_LIBRARY_DEBUG NAMES plist PATHS debug/lib) +select_library_configurations(plist) +if (NOT plist_FOUND) + message(FATAL_ERROR "plist not found.") +endif() +message("plist_PATH: ${plist_PATH}") + +list(APPEND libgpod_Sources + ${CMAKE_CURRENT_SOURCE_DIR}/src/db-artwork-debug.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/db-artwork-parser.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/db-artwork-writer.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/db-image-parser.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/db-parse-context.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/gchecksum.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_artwork.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_chapterdata.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_device.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_hash58.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_hash72.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_hashAB.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_iphone.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_itunesdb.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_photoalbum.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_playlist.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_plist.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_sqlite.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_sysinfo_extended_parser.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_thumb.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_track.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_tzinfo.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb_zlib.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/ithumb-writer.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/pixmaps.c + ${CMAKE_CURRENT_SOURCE_DIR}/src/rijndael.c +) + +if (NOT WITH_INTERNAL_GCHECKSUM) + list(REMOVE_ITEM libgpod_Sources ${CMAKE_CURRENT_SOURCE_DIR}/src/gchecksum.c) +endif() + +add_library(libgpod ${libgpod_Sources}) + +target_include_directories(libgpod PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ${glib_PATH} ${plist_PATH}) + +if (WITH_INTERNAL_GCHECKSUM) + target_compile_definitions(libgpod PRIVATE -DWITH_INTERNAL_GCHECKSUM) +endif() +target_compile_definitions(libgpod PRIVATE -DLIBGPOD_BLOB_DIR=\"${LIBGPOD_BLOB_DIR}\" -DGETTEXT_PACKAGE="libgpod") + +target_link_libraries(libgpod PRIVATE ${glib_LIBRARY} ${plist_LIBRARY} unofficial::sqlite3::sqlite3) + +install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/itdb.h DESTINATION include/libgpod/gpod) + +install( + TARGETS libgpod + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) \ No newline at end of file diff --git a/vcpkg/ports/libgpod/CONTROL b/vcpkg/ports/libgpod/CONTROL new file mode 100644 index 0000000..2d6fe29 --- /dev/null +++ b/vcpkg/ports/libgpod/CONTROL @@ -0,0 +1,6 @@ +Source: libgpod +Version: 2019-08-29 +Port-Version: 1 +Homepage: https://github.com/fadingred/libgpod +Description: libgpod is a library meant to abstract access to an iPod content. +Build-Depends: glib, libplist, sqlite3 \ No newline at end of file diff --git a/vcpkg/ports/libgpod/fix-glibconfigpath.patch b/vcpkg/ports/libgpod/fix-glibconfigpath.patch new file mode 100644 index 0000000..1a60eb1 --- /dev/null +++ b/vcpkg/ports/libgpod/fix-glibconfigpath.patch @@ -0,0 +1,117 @@ +diff --git a/src/db-artwork-writer.c b/src/db-artwork-writer.c +index c19f481..cca786f 100644 +--- a/src/db-artwork-writer.c ++++ b/src/db-artwork-writer.c +@@ -22,7 +22,7 @@ + * + */ + +-#include ++#include + #include "itdb.h" + #include "itdb_device.h" + #include "itdb_private.h" +diff --git a/src/itdb_artwork.c b/src/itdb_artwork.c +index 2328840..a7cdec4 100644 +--- a/src/itdb_artwork.c ++++ b/src/itdb_artwork.c +@@ -26,7 +26,7 @@ + | $Id$ + */ + +-#include ++#include + + #include "itdb_device.h" + #include "itdb_private.h" +diff --git a/src/itdb_chapterdata.c b/src/itdb_chapterdata.c +index 469e8b5..cb53077 100644 +--- a/src/itdb_chapterdata.c ++++ b/src/itdb_chapterdata.c +@@ -27,7 +27,7 @@ + | $Id: itdb_chapterdata.c 1612 2007-06-29 16:02:00Z jcsjcs $ + */ + +-#include ++#include + + #include "itdb_device.h" + #include +diff --git a/src/itdb_device.c b/src/itdb_device.c +index 34b89fe..d776a64 100644 +--- a/src/itdb_device.c ++++ b/src/itdb_device.c +@@ -29,7 +29,7 @@ + | + | $Id$ + */ +-#include ++#include + + #include "db-itunes-parser.h" + #include "itdb_device.h" +diff --git a/src/itdb_photoalbum.c b/src/itdb_photoalbum.c +index a2c8c29..562cbb7 100644 +--- a/src/itdb_photoalbum.c ++++ b/src/itdb_photoalbum.c +@@ -26,7 +26,7 @@ + | + | $Id$ + */ +-#include ++#include + + #include "itdb_private.h" + #include "itdb_device.h" +diff --git a/src/itdb_track.c b/src/itdb_track.c +index 52a9fd4..d8a2ff3 100644 +--- a/src/itdb_track.c ++++ b/src/itdb_track.c +@@ -26,7 +26,7 @@ + | $Id$ + */ + +-#include ++#include + + #include "itdb_private.h" + #include "itdb_device.h" +diff --git a/src/itdb_tzinfo.c b/src/itdb_tzinfo.c +index ded4dd2..594e312 100644 +--- a/src/itdb_tzinfo.c ++++ b/src/itdb_tzinfo.c +@@ -27,7 +27,7 @@ + | + | $Id$ + */ +-#include ++#include + + #include "itdb.h" + #include "itdb_device.h" +diff --git a/src/itdb_zlib.c b/src/itdb_zlib.c +index f6fa29b..43ec5e3 100644 +--- a/src/itdb_zlib.c ++++ b/src/itdb_zlib.c +@@ -25,7 +25,7 @@ + | + | $Id$ + */ +-#include ++#include + #include + #include + +diff --git a/src/ithumb-writer.c b/src/ithumb-writer.c +index 6b47aa6..e1c26e7 100644 +--- a/src/ithumb-writer.c ++++ b/src/ithumb-writer.c +@@ -25,7 +25,7 @@ + * $Id$ + */ + +-#include ++#include + #include "itdb.h" + #include "db-image-parser.h" + diff --git a/vcpkg/ports/libgpod/portfile.cmake b/vcpkg/ports/libgpod/portfile.cmake new file mode 100644 index 0000000..2bcf7fc --- /dev/null +++ b/vcpkg/ports/libgpod/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports Linux platform" ON_TARGET "Windows" "OSX") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fadingred/libgpod + REF 4a8a33ef4bc58eee1baca6793618365f75a5c3fa + SHA512 b7a120c1106c1205e8de2808de5ac4ff1cf189943017939a5ea4eded4e1ceef44557587e69a8591cc5249f8c8dbf0cbdcce1dd309d33a0e9207b0560abe3ae39 + HEAD_REF master + PATCHES fix-glibconfigpath.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DLIBGPOD_BLOB_DIR=${CURRENT_PACKAGES_DIR}/tools +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/libgta/CONTROL b/vcpkg/ports/libgta/CONTROL new file mode 100644 index 0000000..d338243 --- /dev/null +++ b/vcpkg/ports/libgta/CONTROL @@ -0,0 +1,5 @@ +Source: libgta +Version: 1.0.8-1 +Homepage: https://download.savannah.nongnu.org/releases/gta +Description: Libgta is a portable library that implements the Generic Tagged Array (GTA) file format. +Build-Depends: bzip2, zlib, liblzma diff --git a/vcpkg/ports/libgta/portfile.cmake b/vcpkg/ports/libgta/portfile.cmake new file mode 100644 index 0000000..1bbe632 --- /dev/null +++ b/vcpkg/ports/libgta/portfile.cmake @@ -0,0 +1,37 @@ +include(vcpkg_common_functions) + +set(LIBGTA_VERSION 1.0.8) +set(LIBGTA_HASH 99ec3d6317c9a12cf440a60bb989cc7a3fe35e0a1da3e65206e5cd52b69fb860850e61ea0f819511ef48ddc87c468c0ded710409990627096738886e1b358423) + +vcpkg_download_distfile(ARCHIVE + URLS "http://download.savannah.nongnu.org/releases/gta/libgta-1.0.8.tar.xz" + FILENAME "libgta-${LIBGTA_VERSION}.tar.xz" + SHA512 ${LIBGTA_HASH}) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${LIBGTA_VERSION} +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_SHARED_LIBS) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC_LIBS) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DGTA_BUILD_SHARED_LIB=${ENABLE_SHARED_LIBS} + -DGTA_BUILD_STATIC_LIB=${ENABLE_STATIC_LIBS} + -DGTA_BUILD_DOCUMENTATION=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) +endif() + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgta) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libgta/COPYING ${CURRENT_PACKAGES_DIR}/share/libgta/copyright) diff --git a/vcpkg/ports/libguarded/CONTROL b/vcpkg/ports/libguarded/CONTROL new file mode 100644 index 0000000..9d2c4c8 --- /dev/null +++ b/vcpkg/ports/libguarded/CONTROL @@ -0,0 +1,4 @@ +Source: libguarded +Version: 2019-08-27-1 +Homepage: https://github.com/copperspice/libguarded +Description: The libGuarded library is a standalone header-only library for multithreaded programming. \ No newline at end of file diff --git a/vcpkg/ports/libguarded/portfile.cmake b/vcpkg/ports/libguarded/portfile.cmake new file mode 100644 index 0000000..dd6b936 --- /dev/null +++ b/vcpkg/ports/libguarded/portfile.cmake @@ -0,0 +1,11 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO copperspice/cs_libguarded + REF 1f159aa866a50f5d2952de41d8a99821b8ec37df + SHA512 91380262e65ec7b8990c500c60b8d141960be24b69e01a4661c2e8fbfdb8e315c9a4509c2c65a74bc60a8fe690d6dbc8f2b39757d13da5068c95283a19d4c6c4 + HEAD_REF master +) + +File(COPY ${SOURCE_PATH}/src/libguarded DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libharu/CONTROL b/vcpkg/ports/libharu/CONTROL new file mode 100644 index 0000000..95e84e3 --- /dev/null +++ b/vcpkg/ports/libharu/CONTROL @@ -0,0 +1,10 @@ +Source: libharu +Version: 2017-08-15-9 +Homepage: https://github.com/libharu/libharu +Description: libharu - free PDF library +Build-Depends: zlib, libpng +Default-Features: notiffsymbols + +Feature: notiffsymbols +Description: disable symbols also defined by the tiff port +Build-Depends: tiff \ No newline at end of file diff --git a/vcpkg/ports/libharu/add-boolean-typedef.patch b/vcpkg/ports/libharu/add-boolean-typedef.patch new file mode 100644 index 0000000..7768ed3 --- /dev/null +++ b/vcpkg/ports/libharu/add-boolean-typedef.patch @@ -0,0 +1,12 @@ +diff --git a/include/hpdf.h b/include/hpdf.h +index 1cf0dd9..cce9b59 100644 +--- a/include/hpdf.h ++++ b/include/hpdf.h +@@ -54,6 +54,7 @@ + #include "hpdf_types.h" + + typedef void *HPDF_HANDLE; ++typedef HPDF_HANDLE HPDF_Boolean; + typedef HPDF_HANDLE HPDF_Doc; + typedef HPDF_HANDLE HPDF_Page; + typedef HPDF_HANDLE HPDF_Pages; diff --git a/vcpkg/ports/libharu/fix-build-fail.patch b/vcpkg/ports/libharu/fix-build-fail.patch new file mode 100644 index 0000000..2f70665 --- /dev/null +++ b/vcpkg/ports/libharu/fix-build-fail.patch @@ -0,0 +1,21 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 9d2a604..be8e964 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -79,11 +79,11 @@ if(LIBHPDF_STATIC) + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin + ) +- if(WIN32 AND NOT CYGWIN) +- foreach(addlib ${ADDITIONAL_LIBRARIES}) +- install(FILES ${addlib} DESTINATION lib) +- endforeach(addlib) +- endif(WIN32 AND NOT CYGWIN) ++ #if(WIN32 AND NOT CYGWIN) ++ #foreach(addlib ${ADDITIONAL_LIBRARIES}) ++ #install(FILES ${addlib} DESTINATION lib) ++ #endforeach(addlib) ++ #endif(WIN32 AND NOT CYGWIN) + endif(LIBHPDF_STATIC) + if(LIBHPDF_SHARED) + add_library(${LIBHPDF_NAME} SHARED ${LIBHPDF_SRCS}) diff --git a/vcpkg/ports/libharu/portfile.cmake b/vcpkg/ports/libharu/portfile.cmake new file mode 100644 index 0000000..7a9f689 --- /dev/null +++ b/vcpkg/ports/libharu/portfile.cmake @@ -0,0 +1,82 @@ +if("notiffsymbols" IN_LIST FEATURES) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(DISABLETIFF tiff.patch) + endif() +endif() +vcpkg_download_distfile(SHADING_PR + URLS "https://github.com/libharu/libharu/pull/157.diff" + FILENAME "libharu-shading-pr-157.patch" + SHA512 f2ddb22b54b4eccc79400b6a4b2d245a221898f75456a5a559523eab7a523a87dfc5dfd0ec5fb17a771697e03c7ea6ed4c6095eff73e0a4302cd6eb24584c957 +) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libharu/libharu + REF d84867ebf9f3de6afd661d2cdaff102457fbc371 + SHA512 789579dd52c1056ae90a4ce5360c26ba92cadae5341a3901c4159afe624129a1f628fa6412952a398e048b0e5040c93f7ed5b4e4bc620a22d897098298fe2a99 + HEAD_REF master + PATCHES + fix-build-fail.patch + add-boolean-typedef.patch + # This patch adds shading support which is required for VTK. If desired, this could be moved into an on-by-default feature. + ${SHADING_PR} + ${DISABLETIFF} +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(VCPKG_BUILD_SHARED_LIBS ON) + set(VCPKG_BUILD_STATIC_LIBS OFF) +else() + set(VCPKG_BUILD_SHARED_LIBS OFF) + set(VCPKG_BUILD_STATIC_LIBS ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DLIBHPDF_STATIC=${VCPKG_BUILD_STATIC_LIBS} + -DLIBHPDF_SHARED=${VCPKG_BUILD_SHARED_LIBS} +) + +vcpkg_install_cmake() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libhpdfs.lib ${CURRENT_PACKAGES_DIR}/lib/libhpdf.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfsd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfd.lib) + else() + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libhpdfs.a ${CURRENT_PACKAGES_DIR}/lib/libhpdf.a) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfs.a ${CURRENT_PACKAGES_DIR}/debug/lib/libhpdfd.a) + endif() +endif() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/README + ${CURRENT_PACKAGES_DIR}/debug/CHANGES + ${CURRENT_PACKAGES_DIR}/debug/INSTALL + ${CURRENT_PACKAGES_DIR}/README + ${CURRENT_PACKAGES_DIR}/CHANGES + ${CURRENT_PACKAGES_DIR}/INSTALL +) + +file(READ "${CURRENT_PACKAGES_DIR}/include/hpdf.h" _contents) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + string(REPLACE "#ifdef HPDF_DLL\n" "#if 1\n" _contents "${_contents}") +else() + string(REPLACE "#ifdef HPDF_DLL\n" "#if 0\n" _contents "${_contents}") +endif() +file(WRITE "${CURRENT_PACKAGES_DIR}/include/hpdf.h" "${_contents}") + +file(READ "${CURRENT_PACKAGES_DIR}/include/hpdf_types.h" _contents) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + string(REPLACE "#ifdef HPDF_DLL\n" "#if 1\n" _contents "${_contents}") +else() + string(REPLACE "#ifdef HPDF_DLL\n" "#if 0\n" _contents "${_contents}") +endif() +file(WRITE "${CURRENT_PACKAGES_DIR}/include/hpdf_types.h" "${_contents}") + +file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libharu RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/libharu/tiff.patch b/vcpkg/ports/libharu/tiff.patch new file mode 100644 index 0000000..2aabbe3 --- /dev/null +++ b/vcpkg/ports/libharu/tiff.patch @@ -0,0 +1,25 @@ +diff --git a/src/hpdf_image_ccitt.c b/src/hpdf_image_ccitt.c +index 2937fc90d..a1a35d0ed 100644 +--- a/src/hpdf_image_ccitt.c ++++ b/src/hpdf_image_ccitt.c +@@ -21,7 +21,6 @@ + #include + #include + +-#define G3CODES + #include "t4.h" + + typedef unsigned int uint32; +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 354ca7526..ee301d9af 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -99,6 +99,8 @@ if(PNG_FOUND) + set(ADDITIONAL_LIBRARIES ${ADDITIONAL_LIBRARIES} ${PNG_LIBRARIES}) + endif(PNG_FOUND) + ++find_package(TIFF REQUIRED) ++list(APPEND ADDITIONAL_LIBRARIES TIFF::TIFF) + + # ======================================================================= + # configure header files, add compiler flags diff --git a/vcpkg/ports/libhdfs3/CONTROL b/vcpkg/ports/libhdfs3/CONTROL new file mode 100644 index 0000000..d2b646e --- /dev/null +++ b/vcpkg/ports/libhdfs3/CONTROL @@ -0,0 +1,5 @@ +Source: libhdfs3 +Version: 2019-11-05 +Homepage: https://github.com/erikmuttersbach/libhdfs3 +Description: Native Hadoop RPC protocol and HDFS data transfer protocol implementation +Build-Depends: libxml2, protobuf, libuuid, boost diff --git a/vcpkg/ports/libhdfs3/libhdfs3Config.cmake b/vcpkg/ports/libhdfs3/libhdfs3Config.cmake new file mode 100644 index 0000000..ed67257 --- /dev/null +++ b/vcpkg/ports/libhdfs3/libhdfs3Config.cmake @@ -0,0 +1,17 @@ + +FUNCTION(SET_LIBRARY_TARGET NAMESPACE LIB_NAME DEBUG_LIB_FILE_NAME RELEASE_LIB_FILE_NAME INCLUDE_DIR) + ADD_LIBRARY(${NAMESPACE}::${LIB_NAME} STATIC IMPORTED) + SET_TARGET_PROPERTIES(${NAMESPACE}::${LIB_NAME} PROPERTIES + IMPORTED_CONFIGURATIONS "RELEASE;DEBUG" + IMPORTED_LOCATION_RELEASE "${RELEASE_LIB_FILE_NAME}" + IMPORTED_LOCATION_DEBUG "${DEBUG_LIB_FILE_NAME}" + INTERFACE_INCLUDE_DIRECTORIES "${INCLUDE_DIR}" + ) + SET(${NAMESPACE}_${LIB_NAME}_FOUND 1) +ENDFUNCTION() + +GET_FILENAME_COMPONENT(ROOT "${CMAKE_CURRENT_LIST_FILE}" PATH) +GET_FILENAME_COMPONENT(ROOT "${ROOT}" PATH) +GET_FILENAME_COMPONENT(ROOT "${ROOT}" PATH) + +SET_LIBRARY_TARGET("HDFS" "hdfs3" "${ROOT}/debug/lib/libhdfs3.a" "${ROOT}/lib/libhdfs3.a" "${ROOT}/include/hdfs") diff --git a/vcpkg/ports/libhdfs3/portfile.cmake b/vcpkg/ports/libhdfs3/portfile.cmake new file mode 100644 index 0000000..4bbc762 --- /dev/null +++ b/vcpkg/ports/libhdfs3/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_fail_port_install(ON_TARGET "UWP" "Windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO erikmuttersbach/libhdfs3 + REF 9a60d79812d6dee72455f61bff57a93c3c7d56f5 + SHA512 2b635ab979230c251243f01717105872245d7948f75832e58f50a09b0b06d1b366b3c5f3a3253fa538076e9f199003f28d10b9958293144dbc301276073a0633 + HEAD_REF apache-rpc-9 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/libhdfs3Config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/libhdfs3/usage b/vcpkg/ports/libhdfs3/usage new file mode 100644 index 0000000..780d82d --- /dev/null +++ b/vcpkg/ports/libhdfs3/usage @@ -0,0 +1,4 @@ +The package libhdfs3 is compatible with built-in CMake targets: + + FIND_PACKAGE(libhdfs3 REQUIRED) + TARGET_LINK_LIBRARIES(main PRIVATE HDFS::hdfs3) diff --git a/vcpkg/ports/libheif/CONTROL b/vcpkg/ports/libheif/CONTROL new file mode 100644 index 0000000..c6dc343 --- /dev/null +++ b/vcpkg/ports/libheif/CONTROL @@ -0,0 +1,6 @@ +Source: libheif +Version: 1.7.0 +Port-Version: 1 +Homepage: http://www.libheif.org/ +Description: Open h.265 video codec implementation. +Build-Depends: x265, libde265 diff --git a/vcpkg/ports/libheif/dont_build_examples_and_gdk_pixbuf.patch b/vcpkg/ports/libheif/dont_build_examples_and_gdk_pixbuf.patch new file mode 100644 index 0000000..78bab90 --- /dev/null +++ b/vcpkg/ports/libheif/dont_build_examples_and_gdk_pixbuf.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4463476..3a5cfbc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -80,6 +80,6 @@ configure_file(libheif.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libheif.pc @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libheif.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + +-add_subdirectory (examples) ++#add_subdirectory (examples) + add_subdirectory (libheif) +-add_subdirectory (gdk-pixbuf) ++#add_subdirectory (gdk-pixbuf) diff --git a/vcpkg/ports/libheif/install-extra-headers.patch b/vcpkg/ports/libheif/install-extra-headers.patch new file mode 100644 index 0000000..eb32ee8 --- /dev/null +++ b/vcpkg/ports/libheif/install-extra-headers.patch @@ -0,0 +1,12 @@ +diff --git a/libheif/CMakeLists.txt b/libheif/CMakeLists.txt +index 6d683ec..dc2c4eb 100644 +--- a/libheif/CMakeLists.txt ++++ b/libheif/CMakeLists.txt +@@ -17,6 +17,7 @@ set(libheif_headers + heif_plugin_registry.h + heif_limits.h + heif_plugin.h ++ heif_cxx.h + logging.h + ${CMAKE_CURRENT_BINARY_DIR}/heif_version.h + ) diff --git a/vcpkg/ports/libheif/portfile.cmake b/vcpkg/ports/libheif/portfile.cmake new file mode 100644 index 0000000..97068d4 --- /dev/null +++ b/vcpkg/ports/libheif/portfile.cmake @@ -0,0 +1,21 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO strukturag/libheif + REF v1.7.0 + SHA512 7da6ab9daf253c2493e0c3960c6f817e0234dfbd0463467cd1e5f11f7d6804735e401b73fb1038b8f81cfc6527fafb6ac7f4668c3de9400a0131c1292bdbe660 + HEAD_REF master + PATCHES + dont_build_examples_and_gdk_pixbuf.patch + remove_finding_pkgconfig.patch + install-extra-headers.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libheif/) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libheif/remove_finding_pkgconfig.patch b/vcpkg/ports/libheif/remove_finding_pkgconfig.patch new file mode 100644 index 0000000..ed8913a --- /dev/null +++ b/vcpkg/ports/libheif/remove_finding_pkgconfig.patch @@ -0,0 +1,18 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3a5cfbc..9a3046e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -52,10 +52,9 @@ if (has_potentially_evaluated_expression) + endif() + + if (UNIX) +- find_package(PkgConfig) +- pkg_check_modules(LIBDE265 libde265) +- pkg_check_modules(X265 x265) +- pkg_check_modules(AOM aom) ++ find_package(libde265) ++ find_package(x265) ++ find_package(aom) + endif() + + # Create libheif pkgconfig file diff --git a/vcpkg/ports/libhsplasma/CONTROL b/vcpkg/ports/libhsplasma/CONTROL new file mode 100644 index 0000000..eb5c047 --- /dev/null +++ b/vcpkg/ports/libhsplasma/CONTROL @@ -0,0 +1,10 @@ +Source: libhsplasma +Version: 2020.08.30 +Homepage: https://github.com/H-uru/libhsplasma +Description: Cross-platform Plasma data and network library +Build-Depends: libjpeg-turbo, libpng, string-theory, zlib +Supports: !(arm|uwp) + +Feature: net +Description: Network functionality +Build-Depends: openssl diff --git a/vcpkg/ports/libhsplasma/portfile.cmake b/vcpkg/ports/libhsplasma/portfile.cmake new file mode 100644 index 0000000..506f09d --- /dev/null +++ b/vcpkg/ports/libhsplasma/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO H-uru/libhsplasma + REF afd9c46fa72afbbaf5260800ecfde0704ba2a475 + SHA512 21774b465ede7fe5e44df4470ed6867977ac9249400ba6d0bed33fd0e856d467de1afe79afb8a4dc6145eef21c5a3f79590b5cfa3ea1337cc355ca8f3bf1a11c + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + net ENABLE_NET +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DENABLE_PHYSX=OFF + -DENABLE_PYTHON=OFF + -DENABLE_TOOLS=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets( + CONFIG_PATH share/cmake/HSPlasma + TARGET_PATH share/HSPlasma +) + +vcpkg_fixup_pkgconfig() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libhydrogen/CONTROL b/vcpkg/ports/libhydrogen/CONTROL new file mode 100644 index 0000000..d1af13e --- /dev/null +++ b/vcpkg/ports/libhydrogen/CONTROL @@ -0,0 +1,4 @@ +Source: libhydrogen +Version: 2019-08-11 +Description: A lightweight, secure, easy-to-use crypto library suitable for constrained environments +Homepage: https://github.com/jedisct1/libhydrogen diff --git a/vcpkg/ports/libhydrogen/portfile.cmake b/vcpkg/ports/libhydrogen/portfile.cmake new file mode 100644 index 0000000..7dbcd35 --- /dev/null +++ b/vcpkg/ports/libhydrogen/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jedisct1/libhydrogen + REF 46f083ed1370f4f1063f412b443f5a7704676f27 + SHA512 2408ba8ba365751cf4e4e52191f8a94fe00befcb1b6c741af73b3eeebe6e02aa191d9ad021b5eda555c2eeb9c9f39ab7d89a94fb7e0e2896bf4a015d2b8e2995 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/hydrogen TARGET_PATH share/hydrogen) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME hydrogen) diff --git a/vcpkg/ports/libiconv/0002-Config-for-MSVC.patch b/vcpkg/ports/libiconv/0002-Config-for-MSVC.patch new file mode 100644 index 0000000..0c90e50 --- /dev/null +++ b/vcpkg/ports/libiconv/0002-Config-for-MSVC.patch @@ -0,0 +1,14 @@ +diff --git "a/lib/loop_wchar.h" "b/lib/loop_wchar.h" +index 6dc011b..158ccdd 100644 +--- "a/lib/loop_wchar.h" ++++ "b/lib/loop_wchar.h" +@@ -37,7 +37,7 @@ + # include + # define BUF_SIZE 64 /* assume MB_LEN_MAX <= 64 */ + /* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ +- extern size_t mbrtowc (); ++// extern size_t mbrtowc (); + # ifdef mbstate_t + # define mbrtowc(pwc, s, n, ps) (mbrtowc)(pwc, s, n, 0) + # define mbsinit(ps) 1 + \ No newline at end of file diff --git a/vcpkg/ports/libiconv/0003-Add-export.patch b/vcpkg/ports/libiconv/0003-Add-export.patch new file mode 100644 index 0000000..c8d131d --- /dev/null +++ b/vcpkg/ports/libiconv/0003-Add-export.patch @@ -0,0 +1,12 @@ +diff -uNr libiconv-1.16/libcharset/include/libcharset.h.in libiconv-1.16-work/libcharset/include/libcharset.h.in +--- libiconv-1.16/libcharset/include/libcharset.h.in 2018-09-17 19:07:42.000000000 +0300 ++++ libiconv-1.16-work/libcharset/include/libcharset.h.in 2019-12-04 17:15:50.000000000 +0300 +@@ -33,7 +33,7 @@ + by the corresponding pathname with the current prefix instead. Both + prefixes should be directory names without trailing slash (i.e. use "" + instead of "/"). */ +-extern void libcharset_set_relocation_prefix (const char *orig_prefix, ++extern void LIBCHARSET_DLL_EXPORTED libcharset_set_relocation_prefix (const char *orig_prefix, + const char *curr_prefix); + + diff --git a/vcpkg/ports/libiconv/CMakeLists.txt b/vcpkg/ports/libiconv/CMakeLists.txt new file mode 100644 index 0000000..43d55c0 --- /dev/null +++ b/vcpkg/ports/libiconv/CMakeLists.txt @@ -0,0 +1,107 @@ +cmake_minimum_required(VERSION 3.0.0) +project(libiconv C) + +if(BUILD_SHARED_LIBS) + set(LIBICONV_DYNAMIC "1 /*LIBICONV_DYNAMIC*/") +else() + set(LIBICONV_DYNAMIC "0 /*LIBICONV_DYNAMIC*/") +endif() + +set(CMAKE_STATIC_LIBRARY_PREFIX) +set(CMAKE_SHARED_LIBRARY_PREFIX) + +if(WIN32) + set(HAVE_WCHAR_T "1 /*HAVE_WCHAR_T*/") + set(USE_MBSTATE_T "0 /*USE_MBSTATE_T*/") + set(BROKEN_WCHAR_H "0 /*BROKEN_WCHAR_H*/") + set(HAVE_VISIBILITY "0 /*HAVE_VISIBILITY*/") + set(ICONV_CONST "") + + configure_file(config.h.in config.h) + file(READ "${CMAKE_CURRENT_BINARY_DIR}/config.h" _contents) + string(REPLACE "#undef HAVE_WORKING_O_NOFOLLOW" "#define HAVE_WORKING_O_NOFOLLOW 0" _contents "${_contents}") + string(REPLACE "#undef HAVE_MBRTOWC" "#define HAVE_MBRTOWC 1" _contents "${_contents}") + string(REPLACE "#undef HAVE_MBSINIT" "#define HAVE_MBSINIT 1" _contents "${_contents}") + string(REPLACE "#undef HAVE_WCRTOMB" "#define HAVE_WCRTOMB 1" _contents "${_contents}") + string(REPLACE "#undef ICONV_CONST" "#define ICONV_CONST ${ICONV_CONST}" _contents "${_contents}") + string(REPLACE "#undef EILSEQ" "" _contents "${_contents}") + string(REPLACE "#undef WORDS_LITTLEENDIAN" "#define WORDS_LITTLEENDIAN 1" _contents "${_contents}") + string(REPLACE "#undef ENABLE_RELOCATABLE" "#define ENABLE_RELOCATABLE 1" _contents "${_contents}") + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/config.h" "${_contents}") + + configure_file(libcharset/include/localcharset.h.build.in localcharset.h) + configure_file(libcharset/include/libcharset.h.in libcharset.h) + configure_file(include/iconv.h.build.in iconv.h) + + if(MSVC) + add_compile_options(/wd4018) + endif() + + add_definitions( + -D_CRT_SECURE_NO_WARNINGS + -DLIBDIR=${LIBDIR} + -DINSTALLDIR=${INSTALLDIR} + -DNO_XMALLOC=1 + -DENABLE_RELOCATABLE=1 + -DIN_LIBRARY=1 + ) + if(BUILD_SHARED_LIBS) + add_definitions( + -DBUILDING_LIBCHARSET=1 + -DBUILDING_LIBICONV=1 + -DBUILDING_DLL=1) + endif() +else() + if(BUILD_SHARED_LIBS) + set(STATIC_SHARED --enable-shared --disable-static) + else() + set(STATIC_SHARED --disable-shared --enable-static) + endif() + + file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/autoconf) + + execute_process( + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/configure --enable-relocatable ${STATIC_SHARED} --without-libiconv-prefix --without-libintl-prefix + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/autoconf + ) + + configure_file(${CMAKE_CURRENT_BINARY_DIR}/autoconf/lib/config.h config.h @ONLY) + configure_file(${CMAKE_CURRENT_BINARY_DIR}/autoconf/include/iconv.h iconv.h @ONLY) + configure_file(${CMAKE_CURRENT_BINARY_DIR}/autoconf/libcharset/include/localcharset.h localcharset.h @ONLY) +endif() + +include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) + +add_library(libcharset libcharset/lib/localcharset.c libcharset/lib/relocatable-stub.c) +target_include_directories(libcharset PUBLIC $) + +add_library(libiconv lib/iconv.c lib/relocatable.c) +if(WIN32) + target_compile_definitions(libiconv PRIVATE + -Dset_relocation_prefix=libiconv_set_relocation_prefix + -Drelocate=libiconv_relocate -Drelocate2=libiconv_relocate2 + ) +endif() +target_link_libraries(libiconv PRIVATE libcharset) +target_include_directories(libiconv PUBLIC $) + +install(TARGETS libcharset libiconv EXPORT unofficial-iconv-targets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/iconv.h + ${CMAKE_CURRENT_BINARY_DIR}/localcharset.h + DESTINATION include + ) +endif() + +install( + EXPORT unofficial-iconv-targets + FILE unofficial-iconv-config.cmake + NAMESPACE unofficial::iconv:: + DESTINATION share/unofficial-iconv +) diff --git a/vcpkg/ports/libiconv/CONTROL b/vcpkg/ports/libiconv/CONTROL new file mode 100644 index 0000000..e954142 --- /dev/null +++ b/vcpkg/ports/libiconv/CONTROL @@ -0,0 +1,5 @@ +Source: libiconv +Version: 1.16 +Port-Version: 5 +Homepage: https://www.gnu.org/software/libiconv/ +Description: GNU Unicode text conversion diff --git a/vcpkg/ports/libiconv/portfile.cmake b/vcpkg/ports/libiconv/portfile.cmake new file mode 100644 index 0000000..b36c995 --- /dev/null +++ b/vcpkg/ports/libiconv/portfile.cmake @@ -0,0 +1,46 @@ +if(NOT VCPKG_TARGET_IS_WINDOWS) + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/unofficial-iconv) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/unofficial-iconv-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/unofficial-iconv) + return() +endif() + +set(LIBICONV_VERSION 1.16) + +vcpkg_download_distfile(ARCHIVE + URLS "https://ftp.gnu.org/gnu/libiconv/libiconv-${LIBICONV_VERSION}.tar.gz" "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/libiconv/libiconv-${LIBICONV_VERSION}.tar.gz" + FILENAME "libiconv-${LIBICONV_VERSION}.tar.gz" + SHA512 365dac0b34b4255a0066e8033a8b3db4bdb94b9b57a9dca17ebf2d779139fe935caf51a465d17fd8ae229ec4b926f3f7025264f37243432075e5583925bb77b7 +) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${LIBICONV_VERSION} + PATCHES + 0002-Config-for-MSVC.patch + 0003-Add-export.patch +) + +#Since libiconv uses automake, make and configure, we use a custom CMake file +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DINSTALLDIR=\"\" -DLIBDIR=\"\" + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-iconv TARGET_PATH share/unofficial-iconv) + +vcpkg_copy_pdbs() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/Iconv) + +file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_test_cmake(PACKAGE_NAME unofficial-iconv) + +set(VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS enabled) diff --git a/vcpkg/ports/libiconv/unofficial-iconv-config.cmake b/vcpkg/ports/libiconv/unofficial-iconv-config.cmake new file mode 100644 index 0000000..94d65d2 --- /dev/null +++ b/vcpkg/ports/libiconv/unofficial-iconv-config.cmake @@ -0,0 +1,8 @@ +if (NOT TARGET unofficial::iconv::libiconv) + add_library(unofficial::iconv::libcharset INTERFACE IMPORTED) + add_library(unofficial::iconv::libiconv INTERFACE IMPORTED) + if(APPLE) + set_property(TARGET unofficial::iconv::libcharset PROPERTY INTERFACE_LINK_LIBRARIES "charset;unofficial::iconv::libiconv") + set_property(TARGET unofficial::iconv::libiconv PROPERTY INTERFACE_LINK_LIBRARIES "iconv") + endif() +endif() diff --git a/vcpkg/ports/libiconv/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/libiconv/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..472dd80 --- /dev/null +++ b/vcpkg/ports/libiconv/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,10 @@ +include(SelectLibraryConfigurations) + +_find_package(${ARGS}) +if(Iconv_FOUND) + find_library(CHARSET_LIBRARY_DEBUG NAMES charsetd libcharsetd charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH) + find_library(CHARSET_LIBRARY_RELEASE NAMES charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH) + find_library(CHARSET_LIBRARY_RELEASE NAMES charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib) + select_library_configurations(CHARSET) + list(APPEND Iconv_LIBRARIES ${CHARSET_LIBRARIES}) +endif() diff --git a/vcpkg/ports/libics/CONTROL b/vcpkg/ports/libics/CONTROL new file mode 100644 index 0000000..9d14597 --- /dev/null +++ b/vcpkg/ports/libics/CONTROL @@ -0,0 +1,3 @@ +Source: libics +Version: 1.6.4 +Description: Reference library for ICS (Image Cytometry Standard), an open standard for writing images of any dimensionality and data type to file, together with associated information regarding the recording equipment or recorded subject. \ No newline at end of file diff --git a/vcpkg/ports/libics/portfile.cmake b/vcpkg/ports/libics/portfile.cmake new file mode 100644 index 0000000..b0a1ffa --- /dev/null +++ b/vcpkg/ports/libics/portfile.cmake @@ -0,0 +1,21 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO svi-opensource/libics + REF 807193979650ab3d474e9a4bf907cf046eb0f3f0 # 1.6.4 + SHA512 9fcbc14d4b62a8f5c6c114123a5cd3102c3398dd25f44caf07d033dbfc8304fc22dcde35e545ed984047a6009a0e7d7e30cbb6075fb10b9ceda0311cabc56ecb + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(COPY ${SOURCE_PATH}/GNU_LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libics) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libics/GNU_LICENSE ${CURRENT_PACKAGES_DIR}/share/libics/copyright) \ No newline at end of file diff --git a/vcpkg/ports/libideviceactivation/CMakeLists.txt b/vcpkg/ports/libideviceactivation/CMakeLists.txt new file mode 100644 index 0000000..3b4095e --- /dev/null +++ b/vcpkg/ports/libideviceactivation/CMakeLists.txt @@ -0,0 +1,39 @@ +cmake_minimum_required(VERSION 3.0) +project(libideviceactivation C) + +# find dependencies +find_library(libplist plist REQUIRED) +find_path(libimobiledevice_INCLUDES endianness.h) +find_library(libimobiledevice libimobiledevice REQUIRED) +find_package(LibXml2 REQUIRED) +find_package(CURL REQUIRED) + +# ready to create library +file(GLOB_RECURSE IDVCACTV_TOOLS_SRC common/*.c) + +file(GLOB_RECURSE IDVCACTV_PUBLIC_HDR include/*.h) +file(GLOB_RECURSE IDVCACTV_SRC src/*.c) + +add_library(libideviceactivation ${IDVCACTV_TOOLS_SRC} ${IDVCACTV_SRC} ${IDVCACTV_PUBLIC_HDR}) +target_include_directories(libideviceactivation PRIVATE ${libimobiledevice_INCLUDES} ${LIBXML2_INCLUDE_DIR} ${CURL_INCLUDE_DIRS} include) +target_compile_definitions(libideviceactivation PRIVATE -DHAVE_OPENSSL) +target_link_libraries(libideviceactivation PRIVATE ${libplist} ${libimobiledevice} ${CURL_LIBRARIES} ${LIBXML2_LIBRARIES}) + +# install +install( + TARGETS libideviceactivation + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/src/libideviceactivation-1.0.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/libideviceactivation-1.0.pc + @ONLY +) +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/libideviceactivation-1.0.pc + DESTINATION lib/pkgconfig +) + +install(FILES ${IDVCACTV_PUBLIC_HDR} DESTINATION include) \ No newline at end of file diff --git a/vcpkg/ports/libideviceactivation/CONTROL b/vcpkg/ports/libideviceactivation/CONTROL new file mode 100644 index 0000000..9fc1ed9 --- /dev/null +++ b/vcpkg/ports/libideviceactivation/CONTROL @@ -0,0 +1,4 @@ +Source: libideviceactivation +Version: 1.2.137 +Description: A library to handle the activation process of iOS devices +Build-Depends: libimobiledevice, libxml2, curl, libplist \ No newline at end of file diff --git a/vcpkg/ports/libideviceactivation/portfile.cmake b/vcpkg/ports/libideviceactivation/portfile.cmake new file mode 100644 index 0000000..87eecc7 --- /dev/null +++ b/vcpkg/ports/libideviceactivation/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libimobiledevice-win32/libideviceactivation + REF de6008a6bd66a96bb11468b8b137704f0fef2c54 # v1.2.137 + SHA512 cdf72702c465cb3e405db067fa96e2979b8c32e7798bcdb9e7286c4bc9392639cb0d31622c321453f635ef5212e645d300f3b420a847fb16fa05425c4882be95 + HEAD_REF msvc-master +) + +configure_file(${CURRENT_PORT_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libidn2/CMakeLists.txt b/vcpkg/ports/libidn2/CMakeLists.txt new file mode 100644 index 0000000..d7a5d77 --- /dev/null +++ b/vcpkg/ports/libidn2/CMakeLists.txt @@ -0,0 +1,101 @@ +cmake_minimum_required(VERSION 3.8) + +project(libidn2 C) + +find_package(unofficial-iconv REQUIRED) + +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) +endif() + +add_definitions(-DIDN2_BUILDING) + +if(NOT BUILD_SHARED_LIBS) + add_definitions(-DIDN2_STATIC) +endif() + +# List the source files +set(LIB_SRC lib/bidi.c + lib/context.c + lib/data.c + lib/decode.c + lib/error.c + lib/free.c + lib/idna.c + lib/lookup.c + lib/puny_decode.c + lib/puny_encode.c + lib/register.c + lib/tables.c + lib/tr46map.c + lib/tr46map_data.c + lib/version.c +) + +# List the libunistring source files +set(UNISTR_SRC unistring/c-ctype.c + unistring/c-strcasecmp.c + unistring/c-strncasecmp.c + unistring/malloca.c + unistring/striconveh.c + unistring/striconveha.c + unistring/uniconv/u8-conv-from-enc.c + unistring/uniconv/u8-strconv-from-enc.c + unistring/uniconv/u8-strconv-from-locale.c + unistring/uniconv/u8-strconv-to-enc.c + unistring/uniconv/u8-strconv-to-locale.c + unistring/unistr/u32-cpy.c + unistring/unistr/u32-cpy-alloc.c + unistring/unistr/u32-mbtouc-unsafe.c + unistring/unistr/u32-strlen.c + unistring/unistr/u32-to-u8.c + unistring/unistr/u32-uctomb.c + unistring/unistr/u8-check.c + unistring/unistr/u8-mblen.c + unistring/unistr/u8-mbtouc.c + unistring/unistr/u8-mbtouc-aux.c + unistring/unistr/u8-mbtouc-unsafe.c + unistring/unistr/u8-mbtouc-unsafe-aux.c + unistring/unistr/u8-mbtoucr.c + unistring/unistr/u8-prev.c + unistring/unistr/u8-strlen.c + unistring/unistr/u8-to-u32.c + unistring/unistr/u8-uctomb.c + unistring/unistr/u8-uctomb-aux.c + unistring/uninorm/canonical-decomposition.c + unistring/uninorm/composition.c + unistring/uninorm/decompose-internal.c + unistring/uninorm/decomposition-table.c + unistring/uninorm/nfc.c + unistring/uninorm/nfd.c + unistring/uninorm/u32-normalize.c + unistring/unictype/bidi_of.c + unistring/unictype/categ_M.c + unistring/unictype/categ_none.c + unistring/unictype/categ_of.c + unistring/unictype/categ_test.c + unistring/unictype/combiningclass.c + unistring/unictype/joiningtype_of.c + unistring/unictype/scripts.c +) + +# List the gnulib source files +set(GL_SRC gl/rawmemchr.c + gl/strchrnul.c + gl/strverscmp.c + gl/msvc-inval.c + gl/msvc-nothrow.c +) + +add_library(libidn2 ${LIB_SRC} ${UNISTR_SRC} ${GL_SRC}) + +target_include_directories(libidn2 PRIVATE . ./unistring ./gl) +target_link_libraries(libidn2 PRIVATE unofficial::iconv::libiconv unofficial::iconv::libcharset) + +install(TARGETS libidn2 + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +install(FILES lib/idn2.h DESTINATION include) diff --git a/vcpkg/ports/libidn2/CONTROL b/vcpkg/ports/libidn2/CONTROL new file mode 100644 index 0000000..00ec059 --- /dev/null +++ b/vcpkg/ports/libidn2/CONTROL @@ -0,0 +1,6 @@ +Source: libidn2 +Version: 2.2.0 +Port-Version: 2 +Build-Depends: libiconv +Homepage: https://www.gnu.org/software/libidn/ +Description: GNU Libidn is an implementation of the Stringprep, Punycode and IDNA 2003 specifications. Libidn's purpose is to encode and decode internationalized domain names. diff --git a/vcpkg/ports/libidn2/config.h b/vcpkg/ports/libidn2/config.h new file mode 100644 index 0000000..5d5e6ef --- /dev/null +++ b/vcpkg/ports/libidn2/config.h @@ -0,0 +1,995 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to the number of bits in type 'ptrdiff_t'. */ +/* #undef BITSIZEOF_PTRDIFF_T */ + +/* Define to the number of bits in type 'sig_atomic_t'. */ +/* #undef BITSIZEOF_SIG_ATOMIC_T */ + +/* Define to the number of bits in type 'size_t'. */ +/* #undef BITSIZEOF_SIZE_T */ + +/* Define to the number of bits in type 'wchar_t'. */ +/* #undef BITSIZEOF_WCHAR_T */ + +/* Define to the number of bits in type 'wint_t'. */ +/* #undef BITSIZEOF_WINT_T */ + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +/* #undef CRAY_STACKSEG_END */ + +/* Define to 1 if using `alloca.c'. */ +/* #undef C_ALLOCA */ + +/* Define to 1 if // is a file system root distinct from /. */ +/* #undef DOUBLE_SLASH_IS_DISTINCT_ROOT */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module fscanf shall be considered present. */ +#define GNULIB_FSCANF 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module msvc-nothrow shall be considered present. */ +#define GNULIB_MSVC_NOTHROW 1 + +/* Define to 1 if printf and friends should be labeled with attribute + "__gnu_printf__" instead of "__printf__" */ +#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module scanf shall be considered present. */ +#define GNULIB_SCANF 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module strerror shall be considered present. */ +#define GNULIB_STRERROR 1 + +/* Define to 1 when the gnulib module getdelim should be tested. */ +/* #undef GNULIB_TEST_GETDELIM */ + +/* Define to 1 when the gnulib module getline should be tested. */ +/* #undef GNULIB_TEST_GETLINE */ + +/* Define to 1 when the gnulib module malloc-posix should be tested. */ +/* #undef GNULIB_TEST_MALLOC_POSIX */ + +/* Define to 1 when the gnulib module rawmemchr should be tested. */ +/* #undef GNULIB_TEST_RAWMEMCHR */ + +/* Define to 1 when the gnulib module strchrnul should be tested. */ +/* #undef GNULIB_TEST_STRCHRNUL */ + +/* Define to 1 when the gnulib module strerror should be tested. */ +/* #undef GNULIB_TEST_STRERROR */ + +/* Define to 1 when the gnulib module strverscmp should be tested. */ +/* #undef GNULIB_TEST_STRVERSCMP */ + +/* Define to 1 when the gnulib module uninorm/u32-normalize should be tested. + */ +/* #undef GNULIB_TEST_UNINORM_U32_NORMALIZE */ + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module unistr/u32-mbtouc-unsafe shall be considered + present. */ +#define GNULIB_UNISTR_U32_MBTOUC_UNSAFE 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module unistr/u32-uctomb shall be considered present. */ +#define GNULIB_UNISTR_U32_UCTOMB 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module unistr/u8-mbtouc shall be considered present. */ +#define GNULIB_UNISTR_U8_MBTOUC 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module unistr/u8-mbtoucr shall be considered present. */ +#define GNULIB_UNISTR_U8_MBTOUCR 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module unistr/u8-mbtouc-unsafe shall be considered + present. */ +#define GNULIB_UNISTR_U8_MBTOUC_UNSAFE 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module unistr/u8-uctomb shall be considered present. */ +#define GNULIB_UNISTR_U8_UCTOMB 1 + +/* Define to 1 if you have 'alloca' after including , a header that + may be supplied by this distribution. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +/* #undef HAVE_ALLOCA_H */ + +/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +#define HAVE_DCGETTEXT 1 + +/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you + don't. */ +#define HAVE_DECL_GETC_UNLOCKED 0 + +/* Define to 1 if you have the declaration of `getdelim', and to 0 if you + don't. */ +#define HAVE_DECL_GETDELIM 0 + +/* Define to 1 if you have the declaration of `getline', and to 0 if you + don't. */ +#define HAVE_DECL_GETLINE 0 + +/* Define to 1 if you have the declaration of `program_invocation_name', and + to 0 if you don't. */ +#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0 + +/* Define to 1 if you have the declaration of `program_invocation_short_name', + and to 0 if you don't. */ +#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0 + +/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you + don't. */ +#define HAVE_DECL_STRERROR_R 0 + +/* Define to 1 if you have the declaration of `__argv', and to 0 if you don't. + */ +#define HAVE_DECL___ARGV 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DLFCN_H */ + +/* Define to 1 if you have the `flockfile' function. */ +/* #undef HAVE_FLOCKFILE */ + +/* Define to 1 if you have the `funlockfile' function. */ +/* #undef HAVE_FUNLOCKFILE */ + +/* Define to 1 if you have the 'getdelim' function. */ +/* #undef HAVE_GETDELIM */ + +/* Define to 1 if you have the 'getexecname' function. */ +/* #undef HAVE_GETEXECNAME */ + +/* Define to 1 if you have the 'getprogname' function. */ +/* #undef HAVE_GETPROGNAME */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +#define HAVE_GETTEXT 1 + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ICONV_H 1 + +/* Define to 1 if the compiler supports one of the keywords 'inline', + '__inline__', '__inline' and effectively inlines functions marked as such. + */ +#define HAVE_INLINE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define if you have and nl_langinfo(CODESET). */ +/* #undef HAVE_LANGINFO_CODESET */ + +/* Define if you have the libunistring library. */ +/* #undef HAVE_LIBUNISTRING */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if the system has the type 'long long int'. */ +#define HAVE_LONG_LONG_INT 1 + +/* Define if the 'malloc' function is POSIX compliant. */ +/* #undef HAVE_MALLOC_POSIX */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 on MSVC platforms that have the "invalid parameter handler" + concept. */ +#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1 + +/* Define to 1 if you have the `rawmemchr' function. */ +/* #undef HAVE_RAWMEMCHR */ + +/* Define to 1 if atoll is declared even after undefining macros. */ +#define HAVE_RAW_DECL_ATOLL 1 + +/* Define to 1 if canonicalize_file_name is declared even after undefining + macros. */ +/* #undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME */ + +/* Define to 1 if chdir is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_CHDIR */ + +/* Define to 1 if chown is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_CHOWN */ + +/* Define to 1 if dprintf is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_DPRINTF */ + +/* Define to 1 if dup is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_DUP */ + +/* Define to 1 if dup2 is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_DUP2 */ + +/* Define to 1 if dup3 is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_DUP3 */ + +/* Define to 1 if endusershell is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_ENDUSERSHELL */ + +/* Define to 1 if environ is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_ENVIRON */ + +/* Define to 1 if euidaccess is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_EUIDACCESS */ + +/* Define to 1 if faccessat is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_FACCESSAT */ + +/* Define to 1 if fchdir is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_FCHDIR */ + +/* Define to 1 if fchownat is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_FCHOWNAT */ + +/* Define to 1 if fdatasync is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_FDATASYNC */ + +/* Define to 1 if ffsl is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_FFSL */ + +/* Define to 1 if ffsll is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_FFSLL */ + +/* Define to 1 if fpurge is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_FPURGE */ + +/* Define to 1 if fseeko is declared even after undefining macros. */ +#define HAVE_RAW_DECL_FSEEKO 1 + +/* Define to 1 if fsync is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_FSYNC */ + +/* Define to 1 if ftello is declared even after undefining macros. */ +#define HAVE_RAW_DECL_FTELLO 1 + +/* Define to 1 if ftruncate is declared even after undefining macros. */ +#define HAVE_RAW_DECL_FTRUNCATE 1 + +/* Define to 1 if getcwd is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETCWD */ + +/* Define to 1 if getdelim is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETDELIM */ + +/* Define to 1 if getdomainname is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETDOMAINNAME */ + +/* Define to 1 if getdtablesize is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETDTABLESIZE */ + +/* Define to 1 if getgroups is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETGROUPS */ + +/* Define to 1 if gethostname is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETHOSTNAME */ + +/* Define to 1 if getline is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETLINE */ + +/* Define to 1 if getloadavg is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETLOADAVG */ + +/* Define to 1 if getlogin is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETLOGIN */ + +/* Define to 1 if getlogin_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETLOGIN_R */ + +/* Define to 1 if getpagesize is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETPAGESIZE */ + +/* Define to 1 if gets is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETS */ + +/* Define to 1 if getsubopt is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETSUBOPT */ + +/* Define to 1 if getusershell is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GETUSERSHELL */ + +/* Define to 1 if grantpt is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GRANTPT */ + +/* Define to 1 if group_member is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_GROUP_MEMBER */ + +/* Define to 1 if initstate is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_INITSTATE */ + +/* Define to 1 if initstate_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_INITSTATE_R */ + +/* Define to 1 if isatty is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_ISATTY */ + +/* Define to 1 if lchown is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_LCHOWN */ + +/* Define to 1 if link is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_LINK */ + +/* Define to 1 if linkat is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_LINKAT */ + +/* Define to 1 if lseek is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_LSEEK */ + +/* Define to 1 if memmem is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_MEMMEM */ + +/* Define to 1 if mempcpy is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_MEMPCPY */ + +/* Define to 1 if memrchr is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_MEMRCHR */ + +/* Define to 1 if mkdtemp is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_MKDTEMP */ + +/* Define to 1 if mkostemp is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_MKOSTEMP */ + +/* Define to 1 if mkostemps is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_MKOSTEMPS */ + +/* Define to 1 if mkstemp is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_MKSTEMP */ + +/* Define to 1 if mkstemps is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_MKSTEMPS */ + +/* Define to 1 if pclose is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_PCLOSE */ + +/* Define to 1 if pipe is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_PIPE */ + +/* Define to 1 if pipe2 is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_PIPE2 */ + +/* Define to 1 if popen is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_POPEN */ + +/* Define to 1 if posix_openpt is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_POSIX_OPENPT */ + +/* Define to 1 if pread is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_PREAD */ + +/* Define to 1 if ptsname is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_PTSNAME */ + +/* Define to 1 if ptsname_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_PTSNAME_R */ + +/* Define to 1 if pwrite is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_PWRITE */ + +/* Define to 1 if qsort_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_QSORT_R */ + +/* Define to 1 if random is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_RANDOM */ + +/* Define to 1 if random_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_RANDOM_R */ + +/* Define to 1 if rawmemchr is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_RAWMEMCHR */ + +/* Define to 1 if readlink is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_READLINK */ + +/* Define to 1 if readlinkat is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_READLINKAT */ + +/* Define to 1 if realpath is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_REALPATH */ + +/* Define to 1 if renameat is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_RENAMEAT */ + +/* Define to 1 if rmdir is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_RMDIR */ + +/* Define to 1 if rpmatch is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_RPMATCH */ + +/* Define to 1 if secure_getenv is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SECURE_GETENV */ + +/* Define to 1 if setenv is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SETENV */ + +/* Define to 1 if sethostname is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SETHOSTNAME */ + +/* Define to 1 if setstate is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SETSTATE */ + +/* Define to 1 if setstate_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SETSTATE_R */ + +/* Define to 1 if setusershell is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SETUSERSHELL */ + +/* Define to 1 if sleep is declared even after undefining macros. */ +#define HAVE_RAW_DECL_SLEEP 1 + +/* Define to 1 if snprintf is declared even after undefining macros. */ +#define HAVE_RAW_DECL_SNPRINTF 1 + +/* Define to 1 if srandom is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SRANDOM */ + +/* Define to 1 if srandom_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SRANDOM_R */ + +/* Define to 1 if stpcpy is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STPCPY */ + +/* Define to 1 if stpncpy is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STPNCPY */ + +/* Define to 1 if strcasestr is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRCASESTR */ + +/* Define to 1 if strchrnul is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRCHRNUL */ + +/* Define to 1 if strdup is declared even after undefining macros. */ +#define HAVE_RAW_DECL_STRDUP 1 + +/* Define to 1 if strerror_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRERROR_R */ + +/* Define to 1 if strncat is declared even after undefining macros. */ +#define HAVE_RAW_DECL_STRNCAT 1 + +/* Define to 1 if strndup is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRNDUP */ + +/* Define to 1 if strnlen is declared even after undefining macros. */ +#define HAVE_RAW_DECL_STRNLEN 1 + +/* Define to 1 if strpbrk is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRPBRK */ + +/* Define to 1 if strsep is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRSEP */ + +/* Define to 1 if strsignal is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRSIGNAL */ + +/* Define to 1 if strtod is declared even after undefining macros. */ +#define HAVE_RAW_DECL_STRTOD 1 + +/* Define to 1 if strtok_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRTOK_R */ + +/* Define to 1 if strtoll is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRTOLL */ + +/* Define to 1 if strtoull is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRTOULL */ + +/* Define to 1 if strverscmp is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_STRVERSCMP */ + +/* Define to 1 if symlink is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SYMLINK */ + +/* Define to 1 if symlinkat is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_SYMLINKAT */ + +/* Define to 1 if tmpfile is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_TMPFILE */ + +/* Define to 1 if truncate is declared even after undefining macros. */ +#define HAVE_RAW_DECL_TRUNCATE 1 + +/* Define to 1 if ttyname_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_TTYNAME_R */ + +/* Define to 1 if unlink is declared even after undefining macros. */ +#define HAVE_RAW_DECL_UNLINK 1 + +/* Define to 1 if unlinkat is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_UNLINKAT */ + +/* Define to 1 if unlockpt is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_UNLOCKPT */ + +/* Define to 1 if unsetenv is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_UNSETENV */ + +/* Define to 1 if usleep is declared even after undefining macros. */ +#define HAVE_RAW_DECL_USLEEP 1 + +/* Define to 1 if vdprintf is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_VDPRINTF */ + +/* Define to 1 if vsnprintf is declared even after undefining macros. */ +#define HAVE_RAW_DECL_VSNPRINTF 1 + +/* Define to 1 if _Exit is declared even after undefining macros. */ +#define HAVE_RAW_DECL__EXIT 1 + +/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ +/* #undef HAVE_SIGNED_SIG_ATOMIC_T */ + +/* Define to 1 if 'wchar_t' is a signed integer type. */ +/* #undef HAVE_SIGNED_WCHAR_T */ + +/* Define to 1 if 'wint_t' is a signed integer type. */ +/* #undef HAVE_SIGNED_WINT_T */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strchrnul' function. */ +/* #undef HAVE_STRCHRNUL */ + +/* Define to 1 if you have the `strerror_r' function. */ +/* #undef HAVE_STRERROR_R */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STRINGS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strverscmp' function. */ +/* #undef HAVE_STRVERSCMP */ + +/* Define to 1 if you have the 'symlink' function. */ +/* #undef HAVE_SYMLINK */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_BITYPES_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_INTTYPES_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SOCKET_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_UNISTD_H */ + +/* Define to 1 if the system has the type 'unsigned long long int'. */ +#define HAVE_UNSIGNED_LONG_LONG_INT 1 + +/* Define if you have a global __progname variable */ +/* #undef HAVE_VAR___PROGNAME */ + +/* Define to 1 or 0, depending whether the compiler supports simple visibility + declarations. */ +/* #undef HAVE_VISIBILITY */ + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define if you have the 'wchar_t' type. */ +#define HAVE_WCHAR_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WINSOCK2_H 1 + +/* Define if you have the 'wint_t' type. */ +#define HAVE_WINT_T 1 + +/* Define to 1 if O_NOATIME works. */ +#define HAVE_WORKING_O_NOATIME 0 + +/* Define to 1 if O_NOFOLLOW works. */ +#define HAVE_WORKING_O_NOFOLLOW 0 + +/* Define to 1 if the system has the type `_Bool'. */ +#define HAVE__BOOL 1 + +/* Define to 1 if you have the '_set_invalid_parameter_handler' function. */ +#define HAVE__SET_INVALID_PARAMETER_HANDLER 1 + +/* Define as const if the declaration of iconv() needs const. */ +#define ICONV_CONST + +/* Define to a symbolic name denoting the flavor of iconv_open() + implementation. */ +/* #undef ICONV_FLAVOR */ + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ +#define MALLOC_0_IS_NONNULL 1 + +/* Use GNU style printf and scanf. */ +#ifndef __USE_MINGW_ANSI_STDIO +# define __USE_MINGW_ANSI_STDIO 1 +#endif + + +/* Name of package */ +#define PACKAGE "libidn2" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "help-libidn@gnu.org" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libidn2" + +/* String identifying the packager of this software */ +/* #undef PACKAGE_PACKAGER */ + +/* Packager info for bug reports (URL/e-mail/...) */ +/* #undef PACKAGE_PACKAGER_BUG_REPORTS */ + +/* Packager-specific version information */ +/* #undef PACKAGE_PACKAGER_VERSION */ + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "libidn2 @IDN2_VERSION@" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libidn2" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "https://www.gnu.org/software/libidn/#libidn2" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "@IDN2_VERSION@" + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'ptrdiff_t'. */ +/* #undef PTRDIFF_T_SUFFIX */ + +/* Define to 1 if strerror(0) does not return a message implying success. */ +/* #undef REPLACE_STRERROR_0 */ + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'sig_atomic_t'. */ +/* #undef SIG_ATOMIC_T_SUFFIX */ + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'size_t'. */ +/* #undef SIZE_T_SUFFIX */ + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at runtime. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +/* #undef STACK_DIRECTION */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if strerror_r returns char *. */ +/* #undef STRERROR_R_CHAR_P */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# define _DARWIN_C_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# define __STDC_WANT_IEC_60559_BFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# define __STDC_WANT_IEC_60559_DFP_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1 +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# define __STDC_WANT_LIB_EXT2__ 1 +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# define __STDC_WANT_MATH_SPEC_FUNCS__ 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable X/Open extensions if necessary. HP-UX 11.11 defines + mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of + whether compiling with -Ae or -D_HPUX_SOURCE=1. */ +#ifndef _XOPEN_SOURCE +/* # undef _XOPEN_SOURCE */ +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Version number of package */ +#define VERSION "@IDN2_VERSION@" + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'wchar_t'. */ +/* #undef WCHAR_T_SUFFIX */ + +/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type + 'wint_t'. */ +/* #undef WINT_T_SUFFIX */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ +/* #undef _NETBSD_SOURCE */ + +/* The _Noreturn keyword of C11. */ +#if ! (defined _Noreturn \ + || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) +# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ + || 0x5110 <= __SUNPRO_C) +# define _Noreturn __attribute__ ((__noreturn__)) +# elif defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn +# endif +#endif + + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for 'stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* For standard stat data types on VMS. */ +#define _USE_STD_STAT 1 + +/* Define to 1 if the system predates C++11. */ +/* #undef __STDC_CONSTANT_MACROS */ + +/* Define to 1 if the system predates C++11. */ +/* #undef __STDC_LIMIT_MACROS */ + +/* Please see the Gnulib manual for how to use these macros. + + Suppress extern inline with HP-UX cc, as it appears to be broken; see + . + + Suppress extern inline with Sun C in standards-conformance mode, as it + mishandles inline functions that call each other. E.g., for 'inline void f + (void) { } inline void g (void) { f (); }', c99 incorrectly complains + 'reference to static identifier "f" in extern inline function'. + This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. + + Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) + on configurations that mistakenly use 'static inline' to implement + functions or macros in standard C headers like . For example, + if isdigit is mistakenly implemented via a static inline function, + a program containing an extern inline function that calls isdigit + may not work since the C standard prohibits extern inline functions + from calling static functions. This bug is known to occur on: + + OS X 10.8 and earlier; see: + http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html + + DragonFly; see + http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log + + FreeBSD; see: + http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html + + OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and + for clang but remains for g++; see . + Assume DragonFly and FreeBSD will be similar. */ +#if (((defined __APPLE__ && defined __MACH__) \ + || defined __DragonFly__ || defined __FreeBSD__) \ + && (defined __header_inline \ + ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ + && ! defined __clang__) \ + : ((! defined _DONT_USE_CTYPE_INLINE_ \ + && (defined __GNUC__ || defined __cplusplus)) \ + || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ + && defined __GNUC__ && ! defined __cplusplus)))) +# define _GL_EXTERN_INLINE_STDHEADER_BUG +#endif +#if ((__GNUC__ \ + ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ + : (199901L <= __STDC_VERSION__ \ + && !defined __HP_cc \ + && !defined __PGI \ + && !(defined __SUNPRO_C && __STDC__))) \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) +# define _GL_INLINE inline +# define _GL_EXTERN_INLINE extern inline +# define _GL_EXTERN_INLINE_IN_USE +#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) +# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ + /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ +# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) +# else +# define _GL_INLINE extern inline +# endif +# define _GL_EXTERN_INLINE extern +# define _GL_EXTERN_INLINE_IN_USE +#else +# define _GL_INLINE static _GL_UNUSED +# define _GL_EXTERN_INLINE static _GL_UNUSED +#endif + +/* In GCC 4.6 (inclusive) to 5.1 (exclusive), + suppress bogus "no previous prototype for 'FOO'" + and "no previous declaration for 'FOO'" diagnostics, + when FOO is an inline function in the header; see + and + . */ +#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ +# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ +# define _GL_INLINE_HEADER_CONST_PRAGMA +# else +# define _GL_INLINE_HEADER_CONST_PRAGMA \ + _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") +# endif +# define _GL_INLINE_HEADER_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ + _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \ + _GL_INLINE_HEADER_CONST_PRAGMA +# define _GL_INLINE_HEADER_END \ + _Pragma ("GCC diagnostic pop") +#else +# define _GL_INLINE_HEADER_BEGIN +# define _GL_INLINE_HEADER_END +#endif + +/* A replacement for va_copy, if needed. */ +#define gl_va_copy(a,b) ((a) = (b)) + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports + the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of + earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. + __APPLE__ && __MACH__ test for Mac OS X. + __APPLE_CC__ tests for the Apple compiler and its version. + __STDC_VERSION__ tests for the C99 mode. */ +#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ +# define __GNUC_STDC_INLINE__ 1 +#endif + +/* Define to `int' if does not define. */ +/* #undef mode_t */ + +/* Define to `int' if does not define. */ +/* #undef pid_t */ + +/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ +#define restrict __restrict +/* Work around a bug in Sun C++: it does not support _Restrict or + __restrict__, even though the corresponding Sun C compiler ends up with + "#define restrict _Restrict" or "#define restrict __restrict__" in the + previous line. Perhaps some future version of Sun C++ will work with + restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ +#if defined __SUNPRO_CC && !defined __RESTRICT +# define _Restrict +# define __restrict__ +#endif + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define as a signed type of the same size as size_t. */ +#define ssize_t intptr_t + +/* Define as a marker that can be attached to declarations that might not + be used. This helps to reduce warnings, such as from + GCC -Wunused-parameter. */ +#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) +# define _GL_UNUSED __attribute__ ((__unused__)) +#else +# define _GL_UNUSED +#endif +/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name + is a misnomer outside of parameter lists. */ +#define _UNUSED_PARAMETER_ _GL_UNUSED + +/* gcc supports the "unused" attribute on possibly unused labels, and + g++ has since version 4.5. Note to support C++ as well as C, + _GL_UNUSED_LABEL should be used with a trailing ; */ +#if !defined __cplusplus || __GNUC__ > 4 \ + || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) +# define _GL_UNUSED_LABEL _GL_UNUSED +#else +# define _GL_UNUSED_LABEL +#endif + +/* The __pure__ attribute was added in gcc 2.96. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) +#else +# define _GL_ATTRIBUTE_PURE /* empty */ +#endif + +/* The __const__ attribute was added in gcc 2.95. */ +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) +# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) +#else +# define _GL_ATTRIBUTE_CONST /* empty */ +#endif + + +/* Define as a macro for copying va_list variables. */ +/* #undef va_copy */ diff --git a/vcpkg/ports/libidn2/portfile.cmake b/vcpkg/ports/libidn2/portfile.cmake new file mode 100644 index 0000000..5d637c5 --- /dev/null +++ b/vcpkg/ports/libidn2/portfile.cmake @@ -0,0 +1,67 @@ +set(IDN2_VERSION 2.2.0) +set(IDN2_FILENAME libidn2-${IDN2_VERSION}.tar.gz) + +vcpkg_download_distfile(ARCHIVE + URLS "https://ftp.gnu.org/gnu/libidn/${IDN2_FILENAME}" "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/libidn/${IDN2_FILENAME}" + FILENAME "${IDN2_FILENAME}" + SHA512 ccf56056a378d49a28ff67a2a23cd3d32ce51f86a78f84839b98dad709a1d0d03ac8d7c1496f0e4d3536bca00e3d09d34d76a37317b2ce87e3aa66bdf4e877b8 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${IDN2_VERSION} +) + +if (VCPKG_TARGET_IS_WINDOWS) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/string.h DESTINATION ${SOURCE_PATH}/gl) + + configure_file(${CMAKE_CURRENT_LIST_DIR}/config.h ${SOURCE_PATH}) + + function(simple_copy_template_header FILE_PATH BASE_NAME) + if(NOT EXISTS ${FILE_PATH}/${BASE_NAME}.h) + if(EXISTS ${FILE_PATH}/${BASE_NAME}.in.h) + configure_file(${FILE_PATH}/${BASE_NAME}.in.h ${FILE_PATH}/${BASE_NAME}.h) + endif() + endif() + endfunction() + + # There seems to be no difference between source and destination files after 'configure' + # apart from auto-generated notification at the top. So why not just do a simple copy. + simple_copy_template_header(${SOURCE_PATH}/unistring uniconv) + simple_copy_template_header(${SOURCE_PATH}/unistring unictype) + simple_copy_template_header(${SOURCE_PATH}/unistring uninorm) + simple_copy_template_header(${SOURCE_PATH}/unistring unistr) + simple_copy_template_header(${SOURCE_PATH}/unistring unitypes) + simple_copy_template_header(${SOURCE_PATH}/unistring alloca) + + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + ) + + vcpkg_install_cmake() + + vcpkg_copy_pdbs() + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +else() + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + COPY_SOURCE + OPTIONS + --with-libiconv-prefix=${CURRENT_INSTALLED_DIR} + ) + + vcpkg_install_make() + + vcpkg_fixup_pkgconfig() + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +endif() + +# License and man +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libidn2 RENAME copyright) +file(INSTALL ${SOURCE_PATH}/doc/libidn2.pdf DESTINATION ${CURRENT_PACKAGES_DIR}/share/libidn2) diff --git a/vcpkg/ports/libidn2/string.h b/vcpkg/ports/libidn2/string.h new file mode 100644 index 0000000..7ed5f5f --- /dev/null +++ b/vcpkg/ports/libidn2/string.h @@ -0,0 +1,10 @@ +#ifndef _GL_STRING_H +#define _GL_STRING_H + +char * strchrnul (const char *s, int c_in); +int strverscmp (const char *s1, const char *s2); +void * rawmemchr (const void *s, int c_in); + +#include <../ucrt/string.h> + +#endif /* _GL_STRING_H */ diff --git a/vcpkg/ports/libigl/CONTROL b/vcpkg/ports/libigl/CONTROL new file mode 100644 index 0000000..a317fdb --- /dev/null +++ b/vcpkg/ports/libigl/CONTROL @@ -0,0 +1,27 @@ +Source: libigl +Version: 2.2.0 +Port-Version: 2 +Homepage: https://github.com/libigl/libigl +Description: libigl is a simple C++ geometry processing library. We have a wide functionality including construction of sparse discrete differential geometry operators and finite-elements matrices such as the cotangent Laplacian and diagonalized mass matrix, simple facet and edge-based topology data structures, mesh-viewing utilities for OpenGL and GLSL, and many core functions for matrix manipulation which make Eigen feel a lot more like MATLAB. +Build-Depends: eigen3 +Supports: !(arm|uwp) + +Feature: embree +Description: Build with embree +Build-Depends: embree3 + +Feature: opengl +Description: Build with opengl +Build-Depends: opengl, glad + +Feature: glfw +Description: Build with glfw +Build-Depends: libigl[opengl], glfw3 + +Feature: imgui +Description: Build with imgui +Build-Depends: libigl[glfw], imgui[glfw-binding, opengl3-glew-binding, libigl-imgui] + +Feature: xml +Description: Build with libxml +Build-Depends: tinyxml2 diff --git a/vcpkg/ports/libigl/fix-dependency.patch b/vcpkg/ports/libigl/fix-dependency.patch new file mode 100644 index 0000000..fad85af --- /dev/null +++ b/vcpkg/ports/libigl/fix-dependency.patch @@ -0,0 +1,204 @@ +diff --git a/cmake/LibiglWindows.cmake b/cmake/LibiglWindows.cmake +index b98aa55..46c68a7 100644 +--- a/cmake/LibiglWindows.cmake ++++ b/cmake/LibiglWindows.cmake +@@ -1,4 +1,4 @@ +-if(MSVC) ++if(0) + option(IGL_STATIC_RUNTIME "Use libigl with the static MSVC runtime." OFF) + if(IGL_STATIC_RUNTIME) + message(STATUS "MSVC -> forcing use of statically-linked runtime.") +diff --git a/cmake/libigl.cmake b/cmake/libigl.cmake +index d07bbb3..a33cefa 100644 +--- a/cmake/libigl.cmake ++++ b/cmake/libigl.cmake +@@ -107,7 +107,8 @@ if(HUNTER_ENABLED) + endif() + + # Eigen +-if(NOT TARGET Eigen3::Eigen) ++find_package(Eigen3 CONFIG REQUIRED) ++if(0) + igl_download_eigen() + add_library(igl_eigen INTERFACE) + target_include_directories(igl_eigen SYSTEM INTERFACE +@@ -296,9 +297,9 @@ endif() + ################################################################################ + ### Compile the embree part ### + if(LIBIGL_WITH_EMBREE) +- set(EMBREE_DIR "${LIBIGL_EXTERNAL}/embree") ++ find_package(embree 3 CONFIG REQUIRED) + +- if(NOT TARGET embree) ++ if(0) + igl_download_embree() + + set(EMBREE_TESTING_INTENSITY 0 CACHE STRING "") +@@ -315,8 +316,8 @@ if(LIBIGL_WITH_EMBREE) + endif() + + compile_igl_module("embree") +- target_link_libraries(igl_embree ${IGL_SCOPE} embree) +- target_include_directories(igl_embree ${IGL_SCOPE} ${EMBREE_DIR}/include) ++ target_link_libraries(igl_embree ${IGL_SCOPE} ${EMBREE_LIBRARIES}) ++ target_include_directories(igl_embree ${IGL_SCOPE} ${EMBREE_INCLUDE_DIRS}) + target_compile_definitions(igl_embree ${IGL_SCOPE} -DEMBREE_STATIC_LIB) + endif() + +@@ -358,11 +359,12 @@ if(LIBIGL_WITH_OPENGL) + endif() + + # glad module +- if(NOT TARGET glad) ++ find_package(glad CONFIG REQUIRED) ++ if(0) + igl_download_glad() + add_subdirectory(${LIBIGL_EXTERNAL}/glad glad) + endif() +- target_link_libraries(igl_opengl ${IGL_SCOPE} glad) ++ target_link_libraries(igl_opengl ${IGL_SCOPE} glad::glad) + endif() + + ################################################################################ +@@ -371,7 +373,8 @@ if(LIBIGL_WITH_OPENGL_GLFW) + if(TARGET igl::opengl) + # GLFW module + compile_igl_module("opengl/glfw") +- if(NOT TARGET glfw) ++ find_package(glfw3 CONFIG REQUIRED) ++ if(0) + igl_download_glfw() + option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" OFF) + option(GLFW_BUILD_TESTS "Build the GLFW test programs" OFF) +@@ -394,11 +397,12 @@ if(LIBIGL_WITH_OPENGL_GLFW_IMGUI) + if(TARGET igl::opengl_glfw) + # ImGui module + compile_igl_module("opengl/glfw/imgui") +- if(NOT TARGET imgui) ++ find_package(imgui CONFIG REQUIRED) ++ if(0) + igl_download_imgui() + add_subdirectory(${LIBIGL_EXTERNAL}/libigl-imgui imgui) + endif() +- target_link_libraries(igl_opengl_glfw_imgui ${IGL_SCOPE} igl_opengl_glfw imgui) ++ target_link_libraries(igl_opengl_glfw_imgui ${IGL_SCOPE} igl_opengl_glfw imgui::imgui) + endif() + endif() + +@@ -408,12 +412,22 @@ if(LIBIGL_WITH_PNG) + # png/ module is anomalous because it also depends on opengl it really should + # be moved into the opengl/ directory and namespace ... + if(TARGET igl_opengl) +- if(NOT TARGET stb_image) ++ find_path(stb_include_dir stb.h) ++ find_package(opengl REQUIRED) ++ find_package(libpng CONFIG REQUIRED) ++ find_package(glad CONFIG REQUIRED) ++ if (BUILD_SHARED_LIBS) ++ set(libpng_LIBRARIES png) ++ else() ++ set(libpng_LIBRARIES png_static) ++ endif() ++ if(0) + igl_download_stb() + add_subdirectory(${LIBIGL_EXTERNAL}/stb stb_image) + endif() + compile_igl_module("png" "") +- target_link_libraries(igl_png ${IGL_SCOPE} igl_stb_image igl_opengl) ++ target_include_directories(igl_png INTERFACE ${stb_include_dir}) ++ target_link_libraries(igl_png ${IGL_SCOPE} OpenGL::GL ${libpng_LIBRARIES} glad::glad) + endif() + endif() + +@@ -461,7 +475,8 @@ endif() + ### Compile the xml part ### + if(LIBIGL_WITH_XML) + set(TINYXML2_DIR "${LIBIGL_EXTERNAL}/tinyxml2") +- if(NOT TARGET tinyxml2) ++ find_package(tinyxml2 CONFIG REQUIRED) ++ if(0) + igl_download_tinyxml2() + add_library(tinyxml2 STATIC ${TINYXML2_DIR}/tinyxml2.cpp ${TINYXML2_DIR}/tinyxml2.h) + target_include_directories(tinyxml2 PUBLIC ${TINYXML2_DIR}) +@@ -471,7 +486,7 @@ if(LIBIGL_WITH_XML) + SOVERSION "3") + endif() + compile_igl_module("xml") +- target_link_libraries(igl_xml ${IGL_SCOPE} tinyxml2) ++ target_link_libraries(igl_xml ${IGL_SCOPE} tinyxml2::tinyxml2) + target_include_directories(igl_xml ${IGL_SCOPE} ${TINYXML2_DIR}) + endif() + +diff --git a/include/igl/opengl/glfw/imgui/ImGuiHelpers.h b/include/igl/opengl/glfw/imgui/ImGuiHelpers.h +index 1d3e3bc..682b6d7 100644 +--- a/include/igl/opengl/glfw/imgui/ImGuiHelpers.h ++++ b/include/igl/opengl/glfw/imgui/ImGuiHelpers.h +@@ -10,7 +10,7 @@ + + //////////////////////////////////////////////////////////////////////////////// + #include "ImGuiTraits.h" +-#include ++#include + #include + #include + #include +diff --git a/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp b/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp +index 47de487..6c607de 100644 +--- a/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp ++++ b/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp +@@ -9,9 +9,9 @@ + #include "ImGuiMenu.h" + #include "ImGuiHelpers.h" + #include +-#include ++#include + #include + #include + #include + #include + #include + //////////////////////////////////////////////////////////////////////////////// +diff --git a/include/igl/opengl/glfw/imgui/ImGuiTraits.h b/include/igl/opengl/glfw/imgui/ImGuiTraits.h +index 7dae22a..e6911c5 100644 +--- a/include/igl/opengl/glfw/imgui/ImGuiTraits.h ++++ b/include/igl/opengl/glfw/imgui/ImGuiTraits.h +@@ -8,7 +8,7 @@ + #ifndef IGL_OPENGL_GLFW_IMGUI_IMGUITRAITS_H + #define IGL_OPENGL_GLFW_IMGUI_IMGUITRAITS_H + +-#include ++#include + + // Extend ImGui by populating its namespace directly + namespace ImGui +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 273324d..cefbd52 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -15,12 +15,11 @@ igl_download_test_data() + set(IGL_TEST_DATA ${LIBIGL_EXTERNAL}/../tests/data) + + ### Download Catch2 unit test framework +-igl_download_catch2() ++find_package(Catch2 CONFIG REQUIRED) + list(APPEND CMAKE_MODULE_PATH ${LIBIGL_EXTERNAL}/catch2/contrib) + + + # Add catch2 +-add_subdirectory(${LIBIGL_EXTERNAL}/catch2 catch2) + + + # Create test executable +diff --git a/tutorial/106_ViewerMenu/main.cpp b/tutorial/106_ViewerMenu/main.cpp +index cc514e5..f1be538 100644 +--- a/tutorial/106_ViewerMenu/main.cpp ++++ b/tutorial/106_ViewerMenu/main.cpp +@@ -2,7 +2,7 @@ + #include + #include + #include +-#include ++#include + #include + #include "tutorial_shared_path.h" + diff --git a/vcpkg/ports/libigl/fix-imgui-set-cond.patch b/vcpkg/ports/libigl/fix-imgui-set-cond.patch new file mode 100644 index 0000000..964f6f3 --- /dev/null +++ b/vcpkg/ports/libigl/fix-imgui-set-cond.patch @@ -0,0 +1,26 @@ +diff --git a/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp b/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp +index 47de4870..7e6f13a8 100644 +--- a/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp ++++ b/include/igl/opengl/glfw/imgui/ImGuiMenu.cpp +@@ -167,8 +167,8 @@ IGL_INLINE void ImGuiMenu::draw_menu() + IGL_INLINE void ImGuiMenu::draw_viewer_window() + { + float menu_width = 180.f * menu_scaling(); +- ImGui::SetNextWindowPos(ImVec2(0.0f, 0.0f), ImGuiSetCond_FirstUseEver); +- ImGui::SetNextWindowSize(ImVec2(0.0f, 0.0f), ImGuiSetCond_FirstUseEver); ++ ImGui::SetNextWindowPos(ImVec2(0.0f, 0.0f), ImGuiCond_FirstUseEver); ++ ImGui::SetNextWindowSize(ImVec2(0.0f, 0.0f), ImGuiCond_FirstUseEver); + ImGui::SetNextWindowSizeConstraints(ImVec2(menu_width, -1.0f), ImVec2(menu_width, -1.0f)); + bool _viewer_menu_visible = true; + ImGui::Begin( +@@ -310,8 +310,8 @@ IGL_INLINE void ImGuiMenu::draw_viewer_menu() + IGL_INLINE void ImGuiMenu::draw_labels_window() + { + // Text labels +- ImGui::SetNextWindowPos(ImVec2(0,0), ImGuiSetCond_Always); +- ImGui::SetNextWindowSize(ImGui::GetIO().DisplaySize, ImGuiSetCond_Always); ++ ImGui::SetNextWindowPos(ImVec2(0,0), ImGuiCond_Always); ++ ImGui::SetNextWindowSize(ImGui::GetIO().DisplaySize, ImGuiCond_Always); + bool visible = true; + ImGui::PushStyleColor(ImGuiCol_WindowBg, ImVec4(0,0,0,0)); + ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0); diff --git a/vcpkg/ports/libigl/install-extra-headers.patch b/vcpkg/ports/libigl/install-extra-headers.patch new file mode 100644 index 0000000..736de15 --- /dev/null +++ b/vcpkg/ports/libigl/install-extra-headers.patch @@ -0,0 +1,60 @@ +diff --git a/cmake/libigl.cmake b/cmake/libigl.cmake +index a33cefa..0014375 100644 +--- a/cmake/libigl.cmake ++++ b/cmake/libigl.cmake +@@ -560,6 +560,55 @@ export( + # Install headers for core library + install_dir_files(core) + install_dir_files(copyleft) ++ ++if (LIBIGL_WITH_EMBREE) ++ install_dir_files(embree) ++endif() ++ ++if (LIBIGL_WITH_CGAL) ++ install_dir_files(copyleft/cgal) ++endif() ++ ++if (LIBIGL_WITH_COMISO) ++ install_dir_files(copyleft/comiso) ++endif() ++ ++if (LIBIGL_WITH_CORK) ++ install_dir_files(copyleft/cork) ++endif() ++ ++if (LIBIGL_WITH_TETGEN) ++ install_dir_files(copyleft/tetgen) ++endif() ++ ++if (LIBIGL_WITH_OPENGL OR LIBIGL_WITH_OPENGL_GLFW OR LIBIGL_WITH_OPENGL_GLFW_IMGUI) ++ install_dir_files(copyleft/opengl2) ++ install_dir_files(opengl) ++endif() ++ ++if (LIBIGL_WITH_OPENGL_GLFW OR LIBIGL_WITH_OPENGL_GLFW_IMGUI) ++ install_dir_files(opengl/glfw) ++endif() ++ ++if (LIBIGL_WITH_OPENGL_GLFW_IMGUI) ++ install_dir_files(opengl/glfw/imgui) ++endif() ++ ++if (LIBIGL_WITH_PNG) ++ install_dir_files(png) ++endif() ++ ++if (LIBIGL_WITH_PREDICATES) ++ install_dir_files(predicates) ++endif() ++ ++if (LIBIGL_WITH_TRIANGLE) ++ install_dir_files(triangle) ++endif() ++ ++if (LIBIGL_WITH_XML) ++ install_dir_files(xml) ++endif() + + # Write package configuration file + configure_package_config_file( diff --git a/vcpkg/ports/libigl/portfile.cmake b/vcpkg/ports/libigl/portfile.cmake new file mode 100644 index 0000000..aa6d07a --- /dev/null +++ b/vcpkg/ports/libigl/portfile.cmake @@ -0,0 +1,77 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "uwp") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libigl/libigl + REF 3cb4894eaf8ea4610467189ca292be349425d44b #2.2.0 + SHA512 339f96e36b6a99ae8301ec2e234e18cecba7b7c42289ed68a26c20b279dce3135405f9b49e292c321fba962d56c083ae61831057bec9a19ad1495e2afa379b8b + HEAD_REF master + PATCHES + fix-dependency.patch + fix-imgui-set-cond.patch + install-extra-headers.patch +) + +set(LIBIGL_BUILD_STATIC OFF) +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(LIBIGL_BUILD_STATIC ON) +endif() + +if ("imgui" IN_LIST FEATURES AND NOT VCPKG_LIBRARY_LINKAGE STREQUAL static) + # Remove this after add port libigl-imgui + message(FATAL_ERROR "Feature imgui does not support non-static build currently") +endif() + +if ("test" IN_LIST FEATURES AND NOT EXISTS ${SOURCE_PATH}/tests/data) + set(TEST_SOURCE_PATH ${SOURCE_PATH}/tests/data) + file(MAKE_DIRECTORY ${TEST_SOURCE_PATH}) + vcpkg_from_github( + OUT_SOURCE_PATH ${TEST_SOURCE_PATH} + REPO libigl/libigl-tests-data + REF 0689abc55bc12825e6c01ac77446f742839ff277 + SHA512 2b6aec21ed39a9fd534da86fff75eee0f94a3ea2db2fb9dd28974636cc34936341cc28dfcf3bb07cf79409124342717e001c529dc887da72c85fe314b0eb6ea6 + HEAD_REF master + ) +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + embree LIBIGL_WITH_EMBREE + opengl LIBIGL_WITH_OPENGL + glfw LIBIGL_WITH_OPENGL_GLFW + imgui LIBIGL_WITH_OPENGL_GLFW_IMGUI + #png LIBIGL_WITH_PNG # Disable this feature due to issue https://github.com/libigl/libigl/issues/1199 + xml LIBIGL_WITH_XML + #python LIBIGL_WITH_PYTHON # Python binding are in the process of being redone. +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DLIBIGL_BUILD_PYTHON=OFF + -DLIBIGL_EXPORT_TARGETS=ON + -DLIBIGL_USE_STATIC_LIBRARY=${LIBIGL_BUILD_STATIC} + -DLIBIGL_WITH_COMISO=OFF + -DLIBIGL_WITH_TETGEN=OFF + -DLIBIGL_WITH_TRIANGLE=OFF + -DLIBIGL_WITH_PREDICATES=OFF + -DLIBIGL_BUILD_TUTORIALS=OFF + -DLIBIGL_WITH_PNG=OFF + -DLIBIGL_BUILD_TESTS=OFF + -DPYTHON_EXECUTABLE=${PYTHON2} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/libigl/cmake) +vcpkg_copy_pdbs() + +if (NOT LIBIGL_BUILD_STATIC) + # For dynamic build, libigl is a header-only library. + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE.GPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libimobiledevice/CMakeLists.txt b/vcpkg/ports/libimobiledevice/CMakeLists.txt new file mode 100644 index 0000000..2e71ec0 --- /dev/null +++ b/vcpkg/ports/libimobiledevice/CMakeLists.txt @@ -0,0 +1,49 @@ +cmake_minimum_required(VERSION 3.0) +project(libimobiledevice C) + +# find dependencies +find_library(libplist plist REQUIRED) +find_library(libusbmuxd libusbmuxd REQUIRED) +find_package(OpenSSL REQUIRED) +find_path(dirent_INCLUDE_DIR dirent.h) +if (WIN32) + find_library(getopt getopt REQUIRED) +endif() + +# ready to create library +file(GLOB_RECURSE IMOBDEV_COMMON_HDR common/*.h) +file(GLOB_RECURSE IMOBDEV_COMMON_SRC common/*.c) + +file(GLOB IMOBDEV_PUBLIC_HDR include/*.h) +file(GLOB IMOBDEV_PUBLIC_SUB_HDR include/libimobiledevice/*.h) +file(GLOB_RECURSE IMOBDEV_PRIVATE_HDR src/*.h) +file(GLOB_RECURSE IMOBDEV_SRC src/*.c) + +add_library(libimobiledevice ${IMOBDEV_SRC} ${IMOBDEV_PUBLIC_HDR} ${IMOBDEV_PUBLIC_SUB_HDR} ${IMOBDEV_PRIVATE_HDR} ${IMOBDEV_COMMON_HDR} ${IMOBDEV_COMMON_SRC}) +target_include_directories(libimobiledevice PRIVATE ${dirent_INCLUDE_DIR} include .) +target_compile_definitions(libimobiledevice PRIVATE -DHAVE_OPENSSL) +target_link_libraries(libimobiledevice PRIVATE ${libplist} ${libusbmuxd} ${getopt} OpenSSL::SSL OpenSSL::Crypto) +if (WIN32) + target_link_libraries(libimobiledevice PRIVATE Ws2_32) +else() +endif() + +# install +install( + TARGETS libimobiledevice + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/src/libimobiledevice-1.0.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/libimobiledevice-1.0.pc + @ONLY +) +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/libimobiledevice-1.0.pc + DESTINATION lib/libimobiledevice +) + +install(FILES ${IMOBDEV_PUBLIC_HDR} DESTINATION include) +install(FILES ${IMOBDEV_PUBLIC_SUB_HDR} DESTINATION include/libimobiledevice) \ No newline at end of file diff --git a/vcpkg/ports/libimobiledevice/CONTROL b/vcpkg/ports/libimobiledevice/CONTROL new file mode 100644 index 0000000..8a517ec --- /dev/null +++ b/vcpkg/ports/libimobiledevice/CONTROL @@ -0,0 +1,5 @@ +Source: libimobiledevice +Version: 1.2.185 +Homepage: http://www.libimobiledevice.org +Description: A cross-platform protocol library to communicate with iOS devices +Build-Depends: libplist, libusbmuxd, openssl, dirent, getopt \ No newline at end of file diff --git a/vcpkg/ports/libimobiledevice/portfile.cmake b/vcpkg/ports/libimobiledevice/portfile.cmake new file mode 100644 index 0000000..3e6dca5 --- /dev/null +++ b/vcpkg/ports/libimobiledevice/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libimobiledevice-win32/libimobiledevice + REF 37cb65f04249705eb5844821fd925b9edee8866c # v1.2.185 + SHA512 00a44de9552d3cf3daf3d490ad700188e20c72b24b8a6e9ca32d1d9fa53572479a5cbe85d130cd24fb1a2528c5e2cb238ab4caab35c5d93033c53b5c4c189bc6 + HEAD_REF msvc-master +) + +configure_file(${CURRENT_PORT_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libirecovery/CONTROL b/vcpkg/ports/libirecovery/CONTROL new file mode 100644 index 0000000..c3f423b --- /dev/null +++ b/vcpkg/ports/libirecovery/CONTROL @@ -0,0 +1,4 @@ +Source: libirecovery +Version: 1.0.25-2 +Description: Library and utility to talk to iBoot/iBSS via USB on Mac OS X, Windows, and Linux +Build-Depends: libusbmuxd, readline, getopt \ No newline at end of file diff --git a/vcpkg/ports/libirecovery/portfile.cmake b/vcpkg/ports/libirecovery/portfile.cmake new file mode 100644 index 0000000..508150b --- /dev/null +++ b/vcpkg/ports/libirecovery/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libimobiledevice-win32/libirecovery + REF 1.0.25 + SHA512 0dd91d4fe3ded2bc1bbd91aea964e31e7f59bce18be01aa096e974f37dc1be281644d6c44e3f9b49470dd961e3df2e3ff8a09bcc6b803a959073e7d7d9a8d3e7 + HEAD_REF msvc-master +) + +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH libirecovery.sln + INCLUDES_SUBPATH include + LICENSE_SUBPATH COPYING + USE_VCPKG_INTEGRATION + ALLOW_ROOT_INCLUDES +) + +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/Makefile.am) diff --git a/vcpkg/ports/libjpeg-turbo/CONTROL b/vcpkg/ports/libjpeg-turbo/CONTROL new file mode 100644 index 0000000..3ee8609 --- /dev/null +++ b/vcpkg/ports/libjpeg-turbo/CONTROL @@ -0,0 +1,4 @@ +Source: libjpeg-turbo +Version: 2.0.5 +Homepage: https://github.com/libjpeg-turbo/libjpeg-turbo +Description: libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, NEON, AltiVec) to accelerate baseline JPEG compression and decompression on x86, x86-64, ARM, and PowerPC systems. diff --git a/vcpkg/ports/libjpeg-turbo/add-options-for-exes-docs-headers.patch b/vcpkg/ports/libjpeg-turbo/add-options-for-exes-docs-headers.patch new file mode 100644 index 0000000..49dc8fe --- /dev/null +++ b/vcpkg/ports/libjpeg-turbo/add-options-for-exes-docs-headers.patch @@ -0,0 +1,248 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d80af40..361ecae 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -143,6 +143,12 @@ option(ENABLE_SHARED "Build shared libraries" TRUE) + boolean_number(ENABLE_SHARED) + option(ENABLE_STATIC "Build static libraries" TRUE) + boolean_number(ENABLE_STATIC) ++option(ENABLE_EXECUTABLES "Build executables" TRUE) ++boolean_number(ENABLE_EXECUTABLES) ++option(INSTALL_DOCS "Install doc files" TRUE) ++boolean_number(INSTALL_DOCS) ++option(INSTALL_HEADERS "Install header files" TRUE) ++boolean_number(INSTALL_HEADERS) + option(REQUIRE_SIMD "Generate a fatal error if SIMD extensions are not available for this platform (default is to fall back to a non-SIMD build)" FALSE) + boolean_number(REQUIRE_SIMD) + option(WITH_12BIT "Encode/decode JPEG images with 12-bit samples (implies WITH_ARITH_DEC=0 WITH_ARITH_ENC=0 WITH_JAVA=0 WITH_SIMD=0 WITH_TURBOJPEG=0 )" FALSE) +@@ -593,18 +599,20 @@ if(WITH_TURBOJPEG) + LINK_FLAGS "${TJMAPFLAG}${TJMAPFILE}") + endif() + +- add_executable(tjunittest tjunittest.c tjutil.c md5/md5.c md5/md5hl.c) +- target_link_libraries(tjunittest turbojpeg) ++ if(ENABLE_EXECUTABLES) ++ add_executable(tjunittest tjunittest.c tjutil.c md5/md5.c md5/md5hl.c) ++ target_link_libraries(tjunittest turbojpeg) + +- add_executable(tjbench tjbench.c tjutil.c) +- target_link_libraries(tjbench turbojpeg) +- if(UNIX) +- target_link_libraries(tjbench m) +- endif() ++ add_executable(tjbench tjbench.c tjutil.c) ++ target_link_libraries(tjbench turbojpeg) ++ if(UNIX) ++ target_link_libraries(tjbench m) ++ endif() + +- add_executable(tjexample tjexample.c) +- target_link_libraries(tjexample turbojpeg) +- endif() ++ add_executable(tjexample tjexample.c) ++ target_link_libraries(tjexample turbojpeg) ++ endif() ++ endif() + + if(ENABLE_STATIC) + add_library(turbojpeg-static STATIC ${JPEG_SOURCES} $ +@@ -616,14 +624,16 @@ if(WITH_TURBOJPEG) + set_target_properties(turbojpeg-static PROPERTIES OUTPUT_NAME turbojpeg) + endif() + +- add_executable(tjunittest-static tjunittest.c tjutil.c md5/md5.c +- md5/md5hl.c) +- target_link_libraries(tjunittest-static turbojpeg-static) ++ if(ENABLE_EXECUTABLES) ++ add_executable(tjunittest-static tjunittest.c tjutil.c md5/md5.c ++ md5/md5hl.c) ++ target_link_libraries(tjunittest-static turbojpeg-static) + +- add_executable(tjbench-static tjbench.c tjutil.c) +- target_link_libraries(tjbench-static turbojpeg-static) +- if(UNIX) +- target_link_libraries(tjbench-static m) ++ add_executable(tjbench-static tjbench.c tjutil.c) ++ target_link_libraries(tjbench-static turbojpeg-static) ++ if(UNIX) ++ target_link_libraries(tjbench-static m) ++ endif() + endif() + endif() + endif() +@@ -639,7 +649,7 @@ else() + set(DJPEG_BMP_SOURCES wrbmp.c wrtarga.c) + endif() + +-if(ENABLE_STATIC) ++if(ENABLE_STATIC AND ENABLE_EXECUTABLES) + add_executable(cjpeg-static cjpeg.c cdjpeg.c rdgif.c rdppm.c rdswitch.c + ${CJPEG_BMP_SOURCES}) + set_property(TARGET cjpeg-static PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS}) +@@ -655,9 +665,10 @@ if(ENABLE_STATIC) + set_property(TARGET jpegtran-static PROPERTY COMPILE_FLAGS "${USE_SETMODE}") + endif() + +-add_executable(rdjpgcom rdjpgcom.c) +- +-add_executable(wrjpgcom wrjpgcom.c) ++if(ENABLE_EXECUTABLES) ++ add_executable(rdjpgcom rdjpgcom.c) ++ add_executable(wrjpgcom wrjpgcom.c) ++endif() + + + ############################################################################### +@@ -1337,10 +1348,14 @@ set(EXE ${CMAKE_EXECUTABLE_SUFFIX}) + + if(WITH_TURBOJPEG) + if(ENABLE_SHARED) +- install(TARGETS turbojpeg tjbench ++ install(TARGETS turbojpeg + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++ if(ENABLE_EXECUTABLES) ++ install(TARGETS tjbench ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++ endif() + if(NOT CMAKE_VERSION VERSION_LESS "3.1" AND MSVC AND + CMAKE_C_LINKER_SUPPORTS_PDB) + install(FILES "$" +@@ -1350,7 +1365,7 @@ if(WITH_TURBOJPEG) + if(ENABLE_STATIC) + install(TARGETS turbojpeg-static ARCHIVE + DESTINATION ${CMAKE_INSTALL_LIBDIR}) +- if(NOT ENABLE_SHARED) ++ if(NOT ENABLE_SHARED AND ENABLE_EXECUTABLES) + if(MSVC_IDE OR XCODE) + set(DIR "${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}") + else() +@@ -1360,13 +1375,15 @@ if(WITH_TURBOJPEG) + DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME tjbench${EXE}) + endif() + endif() +- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/turbojpeg.h +- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ++ if(INSTALL_HEADERS) ++ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/turbojpeg.h ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ++ endif() + endif() + + if(ENABLE_STATIC) + install(TARGETS jpeg-static ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +- if(NOT ENABLE_SHARED) ++ if(NOT ENABLE_SHARED AND ENABLE_EXECUTABLES) + if(MSVC_IDE OR XCODE) + set(DIR "${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}") + else() +@@ -1381,21 +1398,25 @@ if(ENABLE_STATIC) + endif() + endif() + +-install(TARGETS rdjpgcom wrjpgcom RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++if(ENABLE_EXECUTABLES) ++ install(TARGETS rdjpgcom wrjpgcom RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++endif() + +-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/README.ijg +- ${CMAKE_CURRENT_SOURCE_DIR}/README.md ${CMAKE_CURRENT_SOURCE_DIR}/example.txt +- ${CMAKE_CURRENT_SOURCE_DIR}/tjexample.c +- ${CMAKE_CURRENT_SOURCE_DIR}/libjpeg.txt +- ${CMAKE_CURRENT_SOURCE_DIR}/structure.txt +- ${CMAKE_CURRENT_SOURCE_DIR}/usage.txt ${CMAKE_CURRENT_SOURCE_DIR}/wizard.txt +- ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md DESTINATION ${CMAKE_INSTALL_DOCDIR}) +-if(WITH_JAVA) +- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/java/TJExample.java +- DESTINATION ${CMAKE_INSTALL_DOCDIR}) ++if(INSTALL_DOCS) ++ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/README.ijg ++ ${CMAKE_CURRENT_SOURCE_DIR}/README.md ${CMAKE_CURRENT_SOURCE_DIR}/example.txt ++ ${CMAKE_CURRENT_SOURCE_DIR}/tjexample.c ++ ${CMAKE_CURRENT_SOURCE_DIR}/libjpeg.txt ++ ${CMAKE_CURRENT_SOURCE_DIR}/structure.txt ++ ${CMAKE_CURRENT_SOURCE_DIR}/usage.txt ${CMAKE_CURRENT_SOURCE_DIR}/wizard.txt ++ ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md DESTINATION ${CMAKE_INSTALL_DOCDIR}) ++ if(WITH_JAVA) ++ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/java/TJExample.java ++ DESTINATION ${CMAKE_INSTALL_DOCDIR}) ++ endif() + endif() + +-if(UNIX OR MINGW) ++if((UNIX OR MINGW) AND INSTALL_DOCS) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cjpeg.1 + ${CMAKE_CURRENT_SOURCE_DIR}/djpeg.1 ${CMAKE_CURRENT_SOURCE_DIR}/jpegtran.1 + ${CMAKE_CURRENT_SOURCE_DIR}/rdjpgcom.1 +@@ -1406,10 +1427,12 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgscripts/libjpeg.pc + ${CMAKE_CURRENT_BINARY_DIR}/pkgscripts/libturbojpeg.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + +-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/jconfig.h +- ${CMAKE_CURRENT_SOURCE_DIR}/jerror.h ${CMAKE_CURRENT_SOURCE_DIR}/jmorecfg.h +- ${CMAKE_CURRENT_SOURCE_DIR}/jpeglib.h +- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ++if(INSTALL_HEADERS) ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/jconfig.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/jerror.h ${CMAKE_CURRENT_SOURCE_DIR}/jmorecfg.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/jpeglib.h ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ++endif() + + include(cmakescripts/BuildPackages.cmake) + +diff --git a/sharedlib/CMakeLists.txt b/sharedlib/CMakeLists.txt +index a5c4e39..794c2af 100644 +--- a/sharedlib/CMakeLists.txt ++++ b/sharedlib/CMakeLists.txt +@@ -71,27 +71,35 @@ else() + set(DJPEG_BMP_SOURCES ../wrbmp.c ../wrtarga.c) + endif() + +-add_executable(cjpeg ../cjpeg.c ../cdjpeg.c ../rdgif.c ../rdppm.c +- ../rdswitch.c ${CJPEG_BMP_SOURCES}) +-set_property(TARGET cjpeg PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS}) +-target_link_libraries(cjpeg jpeg) ++if(ENABLE_EXECUTABLES) ++ add_executable(cjpeg ../cjpeg.c ../cdjpeg.c ../rdgif.c ../rdppm.c ++ ../rdswitch.c ${CJPEG_BMP_SOURCES}) ++ set_property(TARGET cjpeg PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS}) ++ target_link_libraries(cjpeg jpeg) + +-add_executable(djpeg ../djpeg.c ../cdjpeg.c ../rdcolmap.c ../rdswitch.c +- ../wrgif.c ../wrppm.c ${DJPEG_BMP_SOURCES}) +-set_property(TARGET djpeg PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS}) +-target_link_libraries(djpeg jpeg) ++ add_executable(djpeg ../djpeg.c ../cdjpeg.c ../rdcolmap.c ../rdswitch.c ++ ../wrgif.c ../wrppm.c ${DJPEG_BMP_SOURCES}) ++ set_property(TARGET djpeg PROPERTY COMPILE_FLAGS ${COMPILE_FLAGS}) ++ target_link_libraries(djpeg jpeg) + +-add_executable(jpegtran ../jpegtran.c ../cdjpeg.c ../rdswitch.c ../transupp.c) +-target_link_libraries(jpegtran jpeg) +-set_property(TARGET jpegtran PROPERTY COMPILE_FLAGS "${USE_SETMODE}") ++ add_executable(jpegtran ../jpegtran.c ../cdjpeg.c ../rdswitch.c ../transupp.c) ++ target_link_libraries(jpegtran jpeg) ++ set_property(TARGET jpegtran PROPERTY COMPILE_FLAGS "${USE_SETMODE}") + +-add_executable(jcstest ../jcstest.c) +-target_link_libraries(jcstest jpeg) ++ add_executable(jcstest ../jcstest.c) ++ target_link_libraries(jcstest jpeg) ++endif() + +-install(TARGETS jpeg cjpeg djpeg jpegtran ++install(TARGETS jpeg + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++if(ENABLE_EXECUTABLES) ++ install(TARGETS cjpeg djpeg jpegtran ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++endif() + if(NOT CMAKE_VERSION VERSION_LESS "3.1" AND MSVC AND + CMAKE_C_LINKER_SUPPORTS_PDB) + install(FILES "$" diff --git a/vcpkg/ports/libjpeg-turbo/portfile.cmake b/vcpkg/ports/libjpeg-turbo/portfile.cmake new file mode 100644 index 0000000..95fae01 --- /dev/null +++ b/vcpkg/ports/libjpeg-turbo/portfile.cmake @@ -0,0 +1,85 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libjpeg-turbo/libjpeg-turbo + REF ae87a958613b69628b92088b313ded0d4f59a716 # 2.0.5 + SHA512 25e8857a3542cc74c48775959f11811529fe6a853990cb285f91a6218c1cde5dd1e58043208e81709fb7a71c376396b2de1f20b53b2c5b8595ca097fa02992fd + HEAD_REF master + PATCHES + add-options-for-exes-docs-headers.patch + + #workaround for vcpkg bug see #5697 on github for more information + workaround_cmake_system_processor.patch +) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR (VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")) + set(LIBJPEGTURBO_SIMD -DWITH_SIMD=OFF) +else() + set(LIBJPEGTURBO_SIMD -DWITH_SIMD=ON) + vcpkg_find_acquire_program(NASM) + get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) + set(ENV{PATH} "$ENV{PATH};${NASM_EXE_PATH}") +endif() + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(ENV{_CL_} "-DNO_GETENV -DNO_PUTENV") +endif() + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_SHARED) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" WITH_CRT_DLL) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DENABLE_STATIC=${ENABLE_STATIC} + -DENABLE_SHARED=${ENABLE_SHARED} + -DENABLE_EXECUTABLES=OFF + -DINSTALL_DOCS=OFF + -DWITH_CRT_DLL=${WITH_CRT_DLL} + ${LIBJPEGTURBO_SIMD} + OPTIONS_DEBUG -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +# Rename libraries for static builds +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/jpeg-static.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/jpeg-static.lib" "${CURRENT_PACKAGES_DIR}/lib/jpeg.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/turbojpeg-static.lib" "${CURRENT_PACKAGES_DIR}/lib/turbojpeg.lib") + endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/jpeg-static.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/jpeg-static.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/jpegd.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/turbojpeg-static.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/turbojpegd.lib") + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() +else(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/jpeg.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/jpeg.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/jpegd.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/turbojpeg.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/turbojpegd.lib") + endif() +endif() + +file(COPY + ${SOURCE_PATH}/LICENSE.md + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} +) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man) + +file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +if(EXE OR DEBUG_EXE) + file(REMOVE ${EXE} ${DEBUG_EXE}) +endif() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/jpeg) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libjpeg-turbo/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/libjpeg-turbo/copyright) + +vcpkg_copy_pdbs() + diff --git a/vcpkg/ports/libjpeg-turbo/usage b/vcpkg/ports/libjpeg-turbo/usage new file mode 100644 index 0000000..ccd4771 --- /dev/null +++ b/vcpkg/ports/libjpeg-turbo/usage @@ -0,0 +1,5 @@ +The package libjpeg-turbo is compatible with built-in CMake targets: + + find_package(JPEG REQUIRED) + target_link_libraries(main PRIVATE ${JPEG_LIBRARIES}) + target_include_directories(main PRIVATE ${JPEG_INCLUDE_DIR}) diff --git a/vcpkg/ports/libjpeg-turbo/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/libjpeg-turbo/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..5b0dae6 --- /dev/null +++ b/vcpkg/ports/libjpeg-turbo/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,28 @@ +_find_package(${ARGS}) +if(JPEG_FOUND AND NOT TARGET JPEG::JPEG) + # Backfill JPEG::JPEG to versions of cmake before 3.12 + add_library(JPEG::JPEG UNKNOWN IMPORTED) + if(DEFINED JPEG_INCLUDE_DIRS) + set_target_properties(JPEG::JPEG PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${JPEG_INCLUDE_DIRS}") + endif() + if(EXISTS "${JPEG_LIBRARY}") + set_target_properties(JPEG::JPEG PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${JPEG_LIBRARY}") + endif() + if(EXISTS "${JPEG_LIBRARY_RELEASE}") + set_property(TARGET JPEG::JPEG APPEND PROPERTY + IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(JPEG::JPEG PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C" + IMPORTED_LOCATION_RELEASE "${JPEG_LIBRARY_RELEASE}") + endif() + if(EXISTS "${JPEG_LIBRARY_DEBUG}") + set_property(TARGET JPEG::JPEG APPEND PROPERTY + IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties(JPEG::JPEG PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C" + IMPORTED_LOCATION_DEBUG "${JPEG_LIBRARY_DEBUG}") + endif() +endif() diff --git a/vcpkg/ports/libjpeg-turbo/workaround_cmake_system_processor.patch b/vcpkg/ports/libjpeg-turbo/workaround_cmake_system_processor.patch new file mode 100644 index 0000000..613504d --- /dev/null +++ b/vcpkg/ports/libjpeg-turbo/workaround_cmake_system_processor.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b2f137a..3754095 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -40,7 +40,7 @@ message(STATUS "VERSION = ${VERSION}, BUILD = ${BUILD}") + + # Detect CPU type and whether we're building 64-bit or 32-bit code + math(EXPR BITS "${CMAKE_SIZEOF_VOID_P} * 8") +-string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} CMAKE_SYSTEM_PROCESSOR_LC) ++string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" CMAKE_SYSTEM_PROCESSOR_LC) + if(CMAKE_SYSTEM_PROCESSOR_LC MATCHES "x86_64" OR + CMAKE_SYSTEM_PROCESSOR_LC MATCHES "amd64" OR + CMAKE_SYSTEM_PROCESSOR_LC MATCHES "i[0-9]86" OR diff --git a/vcpkg/ports/libkml/CONTROL b/vcpkg/ports/libkml/CONTROL new file mode 100644 index 0000000..33de121 --- /dev/null +++ b/vcpkg/ports/libkml/CONTROL @@ -0,0 +1,6 @@ +Source: libkml +Version: 1.3.0 +Port-Version: 6 +Homepage: https://github.com/libkml/libkml +Description: Reference implementation of OGC KML 2.2 +Build-Depends: zlib, expat, minizip[bzip2], uriparser, boost-smart-ptr \ No newline at end of file diff --git a/vcpkg/ports/libkml/patch_empty_literal_on_vc.patch b/vcpkg/ports/libkml/patch_empty_literal_on_vc.patch new file mode 100644 index 0000000..8a3581a --- /dev/null +++ b/vcpkg/ports/libkml/patch_empty_literal_on_vc.patch @@ -0,0 +1,13 @@ +diff --git a/src/kml/base/file_win32.cc b/src/kml/base/file_win32.cc +index c46e099..28ccb36 100644 +--- a/src/kml/base/file_win32.cc ++++ b/src/kml/base/file_win32.cc +@@ -42,7 +42,7 @@ namespace kmlbase { + // Internal to the win32 file class. We need a conversion from string to + // LPCWSTR. + static std::wstring Str2Wstr(const string& str) { +- std::wstring wstr(str.length(), L''); ++ std::wstring wstr(str.length(), L' '); + std::copy(str.begin(), str.end(), wstr.begin()); + return wstr; + } diff --git a/vcpkg/ports/libkml/portfile.cmake b/vcpkg/ports/libkml/portfile.cmake new file mode 100644 index 0000000..581a3b6 --- /dev/null +++ b/vcpkg/ports/libkml/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libkml/libkml + REF 1.3.0 + SHA512 aa48158103d3af764bf98c1fb4cf3e1356b9cc6c8e79d80b96850916f0a8ccb1dac3a46427735dd0bf20647daa047d10e722ac3da2a214d4c1559bf6d5d7c853 + HEAD_REF master + PATCHES + patch_empty_literal_on_vc.patch +) + +file(REMOVE ${SOURCE_PATH}/cmake/External_boost.cmake) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +elseif (VCPKG_TARGET_IS_LINUX) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libkml) +elseif (VCPKG_TARGET_IS_OSX) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libkml) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/liblas/CONTROL b/vcpkg/ports/liblas/CONTROL new file mode 100644 index 0000000..f441925 --- /dev/null +++ b/vcpkg/ports/liblas/CONTROL @@ -0,0 +1,12 @@ +Source: liblas +Version: 1.8.1-4 +Build-Depends: boost, boost-thread, boost-system, boost-iostreams, boost-filesystem, libgeotiff +Description: A C/C++ library for reading and writing the very common LAS LiDAR format. + +Feature: jpeg +Description: Support for jpeg +Build-Depends: libjpeg-turbo + +Feature: zlib +Build-Depends: zlib +Description: Support zlib for compression \ No newline at end of file diff --git a/vcpkg/ports/liblas/fix-BuildError.patch b/vcpkg/ports/liblas/fix-BuildError.patch new file mode 100644 index 0000000..4f9d768 --- /dev/null +++ b/vcpkg/ports/liblas/fix-BuildError.patch @@ -0,0 +1,33 @@ +diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt +index beb83e2..6f216bd 100644 +--- a/apps/CMakeLists.txt ++++ b/apps/CMakeLists.txt +@@ -155,7 +152,7 @@ endif() + # Targets installation + + install(TARGETS ${LIBLAS_UTILITIES} +- RUNTIME DESTINATION ${LIBLAS_BIN_DIR} ++ RUNTIME DESTINATION tools + LIBRARY DESTINATION ${LIBLAS_LIB_DIR} + ARCHIVE DESTINATION ${LIBLAS_LIB_DIR}) + +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +index c7f583d..ca9e602 100644 +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt +@@ -5,13 +5,8 @@ + # Set where cmake will install liblas-config.cmake. It's installed in + # ${CMAKE_INSTALL_PREFIX}/${INSTALL_CMAKE_DIR} and ${PROJECT_ROOT_DIR} + # is the relative path to the root from there. +-if (NOT WIN32) +- set(INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}") +- set (PROJECT_ROOT_DIR "../../..") +-else () +- set(INSTALL_CMAKE_DIR "cmake") +- set (PROJECT_ROOT_DIR "..") +-endif () ++set(INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}") ++set (PROJECT_ROOT_DIR "../../..") + + # Now create the liblas-config files using the .in templates + configure_file (liblas-config.cmake.in diff --git a/vcpkg/ports/liblas/fix-boost-headers.patch b/vcpkg/ports/liblas/fix-boost-headers.patch new file mode 100644 index 0000000..4725a6c --- /dev/null +++ b/vcpkg/ports/liblas/fix-boost-headers.patch @@ -0,0 +1,55 @@ +diff --git a/include/liblas/detail/binary.hpp b/include/liblas/detail/binary.hpp +index d3116a1..ab20e06 100644 +--- a/include/liblas/detail/binary.hpp ++++ b/include/liblas/detail/binary.hpp +@@ -17,6 +17,8 @@ + #ifndef LIBLAS_DETAIL_BINARY_HPP_INCLUDED + #define LIBLAS_DETAIL_BINARY_HPP_INCLUDED + ++#include ++ + #include + #include + #include +@@ -25,7 +27,6 @@ + + #include + #include +-#include + #include + + #if CHAR_BIT != 8 +@@ -43,7 +44,7 @@ namespace detail { namespace binary { + struct big_endian_tag {}; + struct little_endian_tag {}; + +-#ifdef BOOST_BIG_ENDIAN ++#ifdef LIBLAS_BIG_ENDIAN + typedef big_endian_tag native_endian_tag; + #else + typedef little_endian_tag native_endian_tag; +diff --git a/src/c_api.cpp b/src/c_api.cpp +index a70fe74..e8be785 100644 +--- a/src/c_api.cpp ++++ b/src/c_api.cpp +@@ -96,6 +96,7 @@ using namespace liblas; + #endif + + #include ++#include + + bool IsReprojectionTransform(liblas::TransformPtr const& p) + { +diff --git a/src/header.cpp b/src/header.cpp +index 9987ce1..a5c8f7d 100644 +--- a/src/header.cpp ++++ b/src/header.cpp +@@ -54,7 +54,7 @@ + // boost + #include + #include +- ++#include + //std + #include + #include diff --git a/vcpkg/ports/liblas/portfile.cmake b/vcpkg/ports/liblas/portfile.cmake new file mode 100644 index 0000000..f1416ec --- /dev/null +++ b/vcpkg/ports/liblas/portfile.cmake @@ -0,0 +1,50 @@ +include(vcpkg_common_functions) + +set(VERSION 1.8.1) + +vcpkg_download_distfile(ARCHIVE + URLS "http://download.osgeo.org/liblas/libLAS-${VERSION}.tar.bz2" + FILENAME "libLAS-${VERSION}-src.tar.bz2" + SHA512 1cb39c557af0006c54f1100d0d409977fcc1886abd155c1b144d806c47f8675a9f2125d3a9aca16bae65d2aabba84d5e5e322b42085e7db312f3d53f92342acf + HEAD_REF master +) + +vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH + PATCHES + fix-BuildError.patch + fix-boost-headers.patch +) + +file(REMOVE ${SOURCE_PATH}/cmake/modules/FindPROJ4.cmake) +file(REMOVE ${SOURCE_PATH}/cmake/modules/FindGeoTIFF.cmake) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_OSGEO4W=OFF # Disable osgeo4w + -DWITH_TESTS=OFF + -DWITH_UTILITIES=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_ZLIB=${CMAKE_DISABLE_FIND_PACKAGE_ZLIB} + -DCMAKE_DISABLE_FIND_PACKAGE_JPEG=${CMAKE_DISABLE_FIND_PACKAGE_JPEG} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/share/cmake/libLAS/liblas-depends.cmake) + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/libLAS) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/liblbfgs/CMakeLists.txt b/vcpkg/ports/liblbfgs/CMakeLists.txt new file mode 100644 index 0000000..34220b9 --- /dev/null +++ b/vcpkg/ports/liblbfgs/CMakeLists.txt @@ -0,0 +1,21 @@ +cmake_minimum_required(VERSION 3.12 FATAL_ERROR) +PROJECT(liblbfgs) + +file(GLOB SOURCE_FILE + "lib/*.c" +) +file(GLOB HEADERS_FILE + "include/*.h" + "lib/*.h" +) +include_directories("include") +add_library (lbfgs STATIC ${SOURCE_FILE} ${HEADERS_FILE}) + +install(TARGETS lbfgs + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + + +install(FILES ${HEADERS_FILE} DESTINATION include) \ No newline at end of file diff --git a/vcpkg/ports/liblbfgs/CONTROL b/vcpkg/ports/liblbfgs/CONTROL new file mode 100644 index 0000000..bb1514f --- /dev/null +++ b/vcpkg/ports/liblbfgs/CONTROL @@ -0,0 +1,4 @@ +Source: liblbfgs +Version: 1.10 +Homepage: http://www.chokkan.org/software/liblbfgs/ +Description: libLBFGS: a library of Limited-memory Broyden-Fletcher-Goldfarb-Shanno (L-BFGS) diff --git a/vcpkg/ports/liblbfgs/portfile.cmake b/vcpkg/ports/liblbfgs/portfile.cmake new file mode 100644 index 0000000..ccb6487 --- /dev/null +++ b/vcpkg/ports/liblbfgs/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO chokkan/liblbfgs + REF v1.10 + SHA512 2b08dc5d4fdd737575f58983fa7b6c143bc12edaca47b7aeadf221afe6e573fa4a53423f323f569aa93c9dbeafb9b80a6d2f755fec6da04e6b7221f0a67816f8 + HEAD_REF master +) + +message(STATUS "source path is : ${SOURCE_PATH}") + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFIX_NINJA +) +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblbfgs RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/liblemon/CONTROL b/vcpkg/ports/liblemon/CONTROL new file mode 100644 index 0000000..3463c5e --- /dev/null +++ b/vcpkg/ports/liblemon/CONTROL @@ -0,0 +1,4 @@ +Source: liblemon +Version: 2019-06-13-1 +Homepage: https://lemon.cs.elte.hu/trac/lemon +Description: Library for Efficient Modeling and Optimization in Networks \ No newline at end of file diff --git a/vcpkg/ports/liblemon/cmake.patch b/vcpkg/ports/liblemon/cmake.patch new file mode 100644 index 0000000..3b08a2d --- /dev/null +++ b/vcpkg/ports/liblemon/cmake.patch @@ -0,0 +1,34 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 03e1cc7..fd9d737 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -280,6 +280,13 @@ ELSEIF(WIN32) + ) + ENDIF() + ++install( ++ EXPORT lemon-targets ++ FILE lemon-config.cmake ++ NAMESPACE lemon:: ++ DESTINATION share/lemon ++) ++ + CONFIGURE_FILE( + ${PROJECT_SOURCE_DIR}/cmake/version.cmake.in + ${PROJECT_BINARY_DIR}/cmake/version.cmake +diff --git a/lemon/CMakeLists.txt b/lemon/CMakeLists.txt +index 4e6567e..76f9cae 100644 +--- a/lemon/CMakeLists.txt ++++ b/lemon/CMakeLists.txt +@@ -71,6 +71,11 @@ INSTALL( + COMPONENT library + ) + ++install(TARGETS lemon EXPORT lemon-targets ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) ++ + INSTALL( + DIRECTORY . bits concepts + DESTINATION include/lemon diff --git a/vcpkg/ports/liblemon/fixup-targets.patch b/vcpkg/ports/liblemon/fixup-targets.patch new file mode 100644 index 0000000..883e2a6 --- /dev/null +++ b/vcpkg/ports/liblemon/fixup-targets.patch @@ -0,0 +1,50 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9a7c918..3d6cf35 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -268,7 +268,7 @@ CONFIGURE_FILE( + ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake + @ONLY + ) +-IF(UNIX) ++IF(UNIX OR TRUE) + INSTALL( + FILES ${PROJECT_BINARY_DIR}/cmake/LEMONConfig.cmake + DESTINATION share/lemon/cmake +@@ -282,9 +282,9 @@ ENDIF() + + install( + EXPORT lemon-targets +- FILE lemon-config.cmake +- NAMESPACE lemon:: +- DESTINATION share/lemon ++ FILE lemon-targets.cmake ++ NAMESPACE unofficial::lemon:: ++ DESTINATION share/lemon/cmake + ) + + CONFIGURE_FILE( +diff --git a/cmake/LEMONConfig.cmake.in b/cmake/LEMONConfig.cmake.in +index b0d2d8b..ce54986 100644 +--- a/cmake/LEMONConfig.cmake.in ++++ b/cmake/LEMONConfig.cmake.in +@@ -1,4 +1,4 @@ +-SET(LEMON_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include" CACHE PATH "LEMON include directory") ++SET(LEMON_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/../../include" CACHE PATH "LEMON include directory") + SET(LEMON_INCLUDE_DIRS "${LEMON_INCLUDE_DIR}") + + IF(UNIX) +@@ -7,7 +7,12 @@ ELSEIF(WIN32) + SET(LEMON_LIB_NAME "lemon.lib") + ENDIF(UNIX) + +-SET(LEMON_LIBRARY "@CMAKE_INSTALL_PREFIX@/lib/${LEMON_LIB_NAME}" CACHE FILEPATH "LEMON library") ++SET(LEMON_LIBRARY ++ optimized "${CMAKE_CURRENT_LIST_DIR}/../../lib/${LEMON_LIB_NAME}" ++ debug "${CMAKE_CURRENT_LIST_DIR}/../../debug/lib/${LEMON_LIB_NAME}" ++ CACHE FILEPATH "LEMON library") + SET(LEMON_LIBRARIES "${LEMON_LIBRARY}") + + MARK_AS_ADVANCED(LEMON_LIBRARY LEMON_INCLUDE_DIR) ++ ++include(${CMAKE_CURRENT_LIST_DIR}/lemon-targets.cmake) diff --git a/vcpkg/ports/liblemon/portfile.cmake b/vcpkg/ports/liblemon/portfile.cmake new file mode 100644 index 0000000..14eebfe --- /dev/null +++ b/vcpkg/ports/liblemon/portfile.cmake @@ -0,0 +1,44 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +set(VERSION ed2c21cbd6ef) + +vcpkg_download_distfile(ARCHIVE + URLS "http://lemon.cs.elte.hu/hg/lemon/archive/${VERSION}.zip" + FILENAME "lemon-${VERSION}.zip" + SHA512 029640e4f791a18068cb2e2b4e794d09822d9d56fb957eb3e2cceae3a30065c0041a31c465637cfcadf7b2473564070b34adc88513439cdf9046831854e2aa70 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${VERSION} + PATCHES + cmake.patch + fixup-targets.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DLEMON_ENABLE_GLPK=OFF + -DLEMON_ENABLE_ILOG=OFF + -DLEMON_ENABLE_COIN=OFF + -DLEMON_ENABLE_SOPLEX=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/lemon/cmake TARGET_PATH share/lemon) + +file(GLOB EXE ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(COPY ${EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/liblemon/) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/liblemon) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/liblinear/CMakeLists.txt b/vcpkg/ports/liblinear/CMakeLists.txt new file mode 100644 index 0000000..093b0f4 --- /dev/null +++ b/vcpkg/ports/liblinear/CMakeLists.txt @@ -0,0 +1,47 @@ +cmake_minimum_required(VERSION 3.9) +project(liblinear) + +add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + +add_library(blas OBJECT + blas/daxpy.c + blas/ddot.c + blas/dnrm2.c + blas/dscal.c +) + +add_library(liblinear + linear.cpp + newton.cpp + $ +) +target_include_directories(liblinear PRIVATE .) +if(BUILD_SHARED_LIBS) + target_link_libraries(liblinear PRIVATE "-DEF:${CMAKE_CURRENT_SOURCE_DIR}/linear.def") +endif() + +add_executable(train train.c $) +target_link_libraries(train liblinear) + +add_executable(predict predict.c $) +target_link_libraries(predict liblinear) + +install( + TARGETS liblinear + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_TOOLS) + install( + TARGETS train predict + RUNTIME DESTINATION tools/liblinear + ) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install( + FILES linear.h newton.h + DESTINATION include/liblinear) +endif() \ No newline at end of file diff --git a/vcpkg/ports/liblinear/CONTROL b/vcpkg/ports/liblinear/CONTROL new file mode 100644 index 0000000..03a915a --- /dev/null +++ b/vcpkg/ports/liblinear/CONTROL @@ -0,0 +1,5 @@ +Source: liblinear +Version: 241 +Homepage: https://github.com/cjlin1/liblinear +Description: A Library for Large Linear Classification +Supports: !uwp diff --git a/vcpkg/ports/liblinear/portfile.cmake b/vcpkg/ports/liblinear/portfile.cmake new file mode 100644 index 0000000..4a9b4b6 --- /dev/null +++ b/vcpkg/ports/liblinear/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cjlin1/liblinear + REF 2381122d05bbb1e4ee24b522298dd548f0ec0d24 #v241 + SHA512 ee784b6325681b3d9e3dc0b59f4a703d87be35fb898cc16df93e4a814a959d530736a8451be4f0f2c856769d81e3f5acbcd6f0f8677425e700597e3502f9f36d + 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 + -DDISABLE_INSTALL_TOOLS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +if(NOT DISABLE_INSTALL_TOOLS) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/liblinear) +endif() + +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/liblo/CONTROL b/vcpkg/ports/liblo/CONTROL new file mode 100644 index 0000000..b2fc4de --- /dev/null +++ b/vcpkg/ports/liblo/CONTROL @@ -0,0 +1,4 @@ +Source: liblo +Version: 0.30 +Homepage: https://github.com/radarsat1/liblo +Description: liblo is an implementation of the Open Sound Control protocol for POSIX systems \ No newline at end of file diff --git a/vcpkg/ports/liblo/portfile.cmake b/vcpkg/ports/liblo/portfile.cmake new file mode 100644 index 0000000..27e41af --- /dev/null +++ b/vcpkg/ports/liblo/portfile.cmake @@ -0,0 +1,36 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO radarsat1/liblo + REF 0.30 + SHA512 d36c141c513f869e6d1963bd0d584030038019b8be0b27bb9a684722b6e7a38e942ad2ee7c2e67ac13b965560937aad97259435ed86034aa2dc8cb92d23845d8 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/cmake + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS -DTHREADING=1 +) + +vcpkg_install_cmake() + +# Install needed files into package directory +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/liblo) + +file(INSTALL ${CURRENT_PACKAGES_DIR}/bin/oscsend.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/liblo) +file(INSTALL ${CURRENT_PACKAGES_DIR}/bin/oscdump.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/liblo) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/liblo) + +# Remove unnecessary files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/oscsend.exe ${CURRENT_PACKAGES_DIR}/bin/oscdump.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/oscsend.exe ${CURRENT_PACKAGES_DIR}/debug/bin/oscdump.exe) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblo RENAME copyright) diff --git a/vcpkg/ports/liblsl/CONTROL b/vcpkg/ports/liblsl/CONTROL new file mode 100644 index 0000000..924dd32 --- /dev/null +++ b/vcpkg/ports/liblsl/CONTROL @@ -0,0 +1,3 @@ +Source: liblsl +Version: 1.13.0-b11-1 +Description: C++ lsl library for multi-modal time-synched data transmission over the local network diff --git a/vcpkg/ports/liblsl/portfile.cmake b/vcpkg/ports/liblsl/portfile.cmake new file mode 100644 index 0000000..bd1afdd --- /dev/null +++ b/vcpkg/ports/liblsl/portfile.cmake @@ -0,0 +1,37 @@ +include(vcpkg_common_functions) + +set(VCPKG_LIBRARY_LINKAGE dynamic) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sccn/liblsl + REF 1.13.0-b11 # NOTE: when updating version, also change it in the parameter to vcpkg_configure_cmake + SHA512 212f28070b8239dc176d2e35bf4091896babbf7688e4cbe1c2bb0c3788f317ce2a80f92d4b008c6e577b01a09e8faf65228d396ff13e9ade0c1ffdc5e08cb9e5 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DLSL_BUILD_STATIC=OFF + -DLSL_UNIXFOLDERS=ON + -DLSL_NO_FANCY_LIBNAME=ON + -Dlslgitrevision="1.13.0-b11" + -Dlslgitbranch="master" +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +if(VCPKG_TARGET_IS_WINDOWS) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/lslver.exe) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/lslver/) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/lslver.exe ${CURRENT_PACKAGES_DIR}/tools/lslver/lslver.exe) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblsl RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblsl) diff --git a/vcpkg/ports/liblzma/CMakeLists.txt b/vcpkg/ports/liblzma/CMakeLists.txt new file mode 100644 index 0000000..c87b0b6 --- /dev/null +++ b/vcpkg/ports/liblzma/CMakeLists.txt @@ -0,0 +1,182 @@ +cmake_minimum_required(VERSION 3.0) +project(LibLZMA) + +set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed") +set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed") +set(INSTALL_INCLUDE_DIR "include" CACHE PATH "Path where headers will be installed") +set(INSTALL_CMAKE_DIR "share/liblzma" CACHE PATH "Path where cmake configs will be installed") +set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Append a suffix to debug libraries") + +if(NOT WIN32) + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/config.h + " +#define TUKLIB_SYMBOL_PREFIX lzma_ +#define ASSUME_RAM 128 +#define HAVE_CHECK_CRC32 1 +#define HAVE_CHECK_CRC64 1 +#define HAVE_CHECK_SHA256 1 +#define HAVE_DECODERS 1 +#define HAVE_DECODER_ARM 1 +#define HAVE_DECODER_ARMTHUMB 1 +#define HAVE_DECODER_DELTA 1 +#define HAVE_DECODER_IA64 1 +#define HAVE_DECODER_LZMA1 1 +#define HAVE_DECODER_LZMA2 1 +#define HAVE_DECODER_POWERPC 1 +#define HAVE_DECODER_SPARC 1 +#define HAVE_DECODER_X86 1 +#define HAVE_ENCODERS 1 +#define HAVE_ENCODER_ARM 1 +#define HAVE_ENCODER_ARMTHUMB 1 +#define HAVE_ENCODER_DELTA 1 +#define HAVE_ENCODER_IA64 1 +#define HAVE_ENCODER_LZMA1 1 +#define HAVE_ENCODER_LZMA2 1 +#define HAVE_ENCODER_POWERPC 1 +#define HAVE_ENCODER_SPARC 1 +#define HAVE_ENCODER_X86 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_LIMITS_H 1 +#define HAVE_MF_BT2 1 +#define HAVE_MF_BT3 1 +#define HAVE_MF_BT4 1 +#define HAVE_MF_HC3 1 +#define HAVE_MF_HC4 1 +#define HAVE_STDBOOL_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_VISIBILITY 1 +#define MYTHREAD_POSIX 1 +#define PACKAGE_NAME \"XZ Utils\" +#define PACKAGE_URL \"http://tukaani.org/xz/\" +#define SIZEOF_SIZE_T (sizeof(size_t)) +") +endif() + +add_library(LibLZMA + src/common/tuklib_cpucores.c + src/common/tuklib_physmem.c + src/liblzma/check/check.c + src/liblzma/check/crc32_fast.c + src/liblzma/check/crc32_table.c + src/liblzma/check/crc64_fast.c + src/liblzma/check/crc64_table.c + src/liblzma/check/sha256.c + src/liblzma/common/alone_decoder.c + src/liblzma/common/alone_encoder.c + src/liblzma/common/auto_decoder.c + src/liblzma/common/block_buffer_decoder.c + src/liblzma/common/block_buffer_encoder.c + src/liblzma/common/block_decoder.c + src/liblzma/common/block_encoder.c + src/liblzma/common/block_header_decoder.c + src/liblzma/common/block_header_encoder.c + src/liblzma/common/block_util.c + src/liblzma/common/common.c + src/liblzma/common/easy_buffer_encoder.c + src/liblzma/common/easy_decoder_memusage.c + src/liblzma/common/easy_encoder.c + src/liblzma/common/easy_encoder_memusage.c + src/liblzma/common/easy_preset.c + src/liblzma/common/filter_buffer_decoder.c + src/liblzma/common/filter_buffer_encoder.c + src/liblzma/common/filter_common.c + src/liblzma/common/filter_decoder.c + src/liblzma/common/filter_encoder.c + src/liblzma/common/filter_flags_decoder.c + src/liblzma/common/filter_flags_encoder.c + src/liblzma/common/hardware_cputhreads.c + src/liblzma/common/hardware_physmem.c + src/liblzma/common/index.c + src/liblzma/common/index_decoder.c + src/liblzma/common/index_encoder.c + src/liblzma/common/index_hash.c + src/liblzma/common/outqueue.c + src/liblzma/common/stream_buffer_decoder.c + src/liblzma/common/stream_buffer_encoder.c + src/liblzma/common/stream_decoder.c + src/liblzma/common/stream_encoder.c + src/liblzma/common/stream_encoder_mt.c + src/liblzma/common/stream_flags_common.c + src/liblzma/common/stream_flags_decoder.c + src/liblzma/common/stream_flags_encoder.c + src/liblzma/common/vli_decoder.c + src/liblzma/common/vli_encoder.c + src/liblzma/common/vli_size.c + src/liblzma/delta/delta_common.c + src/liblzma/delta/delta_decoder.c + src/liblzma/delta/delta_encoder.c + src/liblzma/lzma/fastpos_table.c + src/liblzma/lzma/lzma2_decoder.c + src/liblzma/lzma/lzma2_encoder.c + src/liblzma/lzma/lzma_decoder.c + src/liblzma/lzma/lzma_encoder.c + src/liblzma/lzma/lzma_encoder_optimum_fast.c + src/liblzma/lzma/lzma_encoder_optimum_normal.c + src/liblzma/lzma/lzma_encoder_presets.c + src/liblzma/lz/lz_decoder.c + src/liblzma/lz/lz_encoder.c + src/liblzma/lz/lz_encoder_mf.c + src/liblzma/rangecoder/price_table.c + src/liblzma/simple/arm.c + src/liblzma/simple/armthumb.c + src/liblzma/simple/ia64.c + src/liblzma/simple/powerpc.c + src/liblzma/simple/simple_coder.c + src/liblzma/simple/simple_decoder.c + src/liblzma/simple/simple_encoder.c + src/liblzma/simple/sparc.c + src/liblzma/simple/x86.c +) + +if(WIN32) + target_include_directories(LibLZMA PRIVATE $) +else() + target_compile_definitions(LibLZMA PRIVATE -DHAVE_VISIBILITY=1) +endif() + +if(BUILD_SHARED_LIBS) + target_compile_definitions(LibLZMA PRIVATE -DDLL_EXPORT) + target_compile_definitions(LibLZMA PUBLIC -DLIBLZMADLL_EXPORTS) +else() + target_compile_definitions(LibLZMA PUBLIC -DLZMA_API_STATIC) +endif() +target_compile_definitions(LibLZMA PRIVATE -DHAVE_CONFIG_H) + +target_include_directories(LibLZMA PUBLIC + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ + $ +) + +set_target_properties(LibLZMA PROPERTIES OUTPUT_NAME "lzma") + +set_target_properties(LibLZMA PROPERTIES PUBLIC_HEADER +"${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/base.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/bcj.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/block.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/check.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/container.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/delta.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/filter.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/hardware.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/index.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/index_hash.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/lzma12.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/stream_flags.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/version.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/vli.h" +) + +install(TARGETS LibLZMA EXPORT LibLZMATargets + RUNTIME DESTINATION "${INSTALL_BIN_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" + PUBLIC_HEADER DESTINATION "${INSTALL_INCLUDE_DIR}/lzma" +) + +install(FILES "${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma.h" + DESTINATION "${INSTALL_INCLUDE_DIR}" +) + +install(EXPORT LibLZMATargets + FILE LibLZMAConfig.cmake + NAMESPACE LibLZMA:: + DESTINATION "${INSTALL_CMAKE_DIR}" +) diff --git a/vcpkg/ports/liblzma/CONTROL b/vcpkg/ports/liblzma/CONTROL new file mode 100644 index 0000000..dc9d0fd --- /dev/null +++ b/vcpkg/ports/liblzma/CONTROL @@ -0,0 +1,5 @@ +Source: liblzma +Version: 5.2.5 +Port-Version: 1 +Homepage: https://github.com/xz-mirror/xz +Description: Compression library with an API similar to that of zlib. diff --git a/vcpkg/ports/liblzma/enable-uwp-builds.patch b/vcpkg/ports/liblzma/enable-uwp-builds.patch new file mode 100644 index 0000000..4551ce7 --- /dev/null +++ b/vcpkg/ports/liblzma/enable-uwp-builds.patch @@ -0,0 +1,26 @@ +diff --git a/src/common/tuklib_physmem.c b/src/common/tuklib_physmem.c +index 4053ad0..c49db6d 100644 +--- a/src/common/tuklib_physmem.c ++++ b/src/common/tuklib_physmem.c +@@ -79,6 +79,13 @@ tuklib_physmem(void) + uint64_t ret = 0; + + #if defined(_WIN32) || defined(__CYGWIN__) ++#if defined (WINAPI_FAMILY_PARTITION) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) ++ MEMORYSTATUSEX ms; ++ ms.dwLength = sizeof(ms); ++ if(!GlobalMemoryStatusEx(&ms)) ++ return 0; ++ return ms.ullTotalPhys; ++#else + if ((GetVersion() & 0xFF) >= 5) { + // Windows 2000 and later have GlobalMemoryStatusEx() which + // supports reporting values greater than 4 GiB. To keep the +@@ -107,6 +114,7 @@ tuklib_physmem(void) + GlobalMemoryStatus(&meminfo); + ret = meminfo.dwTotalPhys; + } ++#endif + + #elif defined(__OS2__) + unsigned long mem; diff --git a/vcpkg/ports/liblzma/portfile.cmake b/vcpkg/ports/liblzma/portfile.cmake new file mode 100644 index 0000000..c29dbaf --- /dev/null +++ b/vcpkg/ports/liblzma/portfile.cmake @@ -0,0 +1,95 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xz-mirror/xz + REF v5.2.5 + SHA512 686f01cfe33e2194766a856c48668c661b25eee194a443524f87ce3f866e0eb54914075b4e00185921516c5211db8cd5d2658f4b91f4a3580508656f776f468e + HEAD_REF master + PATCHES + enable-uwp-builds.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() + +file(APPEND ${CURRENT_PACKAGES_DIR}/share/liblzma/LibLZMAConfig.cmake +" +include(\${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) +find_path(LibLZMA_INCLUDE_DIR + NAMES lzma.h + PATH_SUFFIXES lzma +) +if(NOT LibLZMA_LIBRARY) + find_library(LibLZMA_LIBRARY_RELEASE NAMES lzma LZMA LibLZMA PATHS \${_IMPORT_PREFIX}/lib/) + find_library(LibLZMA_LIBRARY_DEBUG NAMES lzmad LZMAd LibLZMAd PATHS \${_IMPORT_PREFIX}/debug/lib/) + select_library_configurations(LibLZMA) +endif() +set(LibLZMA_INCLUDE_DIRS \${LibLZMA_INCLUDE_DIR} CACHE PATH \"\") +set(LibLZMA_LIBRARIES \${LibLZMA_LIBRARY} CACHE STRING \"\") +set(LZMA_INCLUDE_DIR \${LibLZMA_INCLUDE_DIR} CACHE PATH \"\") +set(LZMA_LIBRARY \${LibLZMA_LIBRARY} CACHE STRING \"\") +set(LZMA_INCLUDE_DIRS \${LibLZMA_INCLUDE_DIR} CACHE PATH \"\") +set(LZMA_LIBRARIES \${LibLZMA_LIBRARY} CACHE STRING \"\") +set(LIBLZMA_INCLUDE_DIRS \${LibLZMA_INCLUDE_DIR} CACHE PATH \"\") +set(LIBLZMA_LIBRARIES \${LibLZMA_LIBRARY} CACHE STRING \"\") +set(LIBLZMA_INCLUDE_DIR \${LibLZMA_INCLUDE_DIR} CACHE PATH \"\") +set(LIBLZMA_LIBRARY \${LibLZMA_LIBRARY} CACHE STRING \"\") + +if(LIBLZMA_INCLUDE_DIR AND EXISTS \"\${LIBLZMA_INCLUDE_DIR}/lzma/version.h\") + file(STRINGS \"\${LIBLZMA_INCLUDE_DIR}/lzma/version.h\" LIBLZMA_HEADER_CONTENTS REGEX \"#define LZMA_VERSION_[A-Z]+ [0-9]+\") + + string(REGEX REPLACE \".*#define LZMA_VERSION_MAJOR ([0-9]+).*\" \"\\\\1\" LIBLZMA_VERSION_MAJOR \"\${LIBLZMA_HEADER_CONTENTS}\") + string(REGEX REPLACE \".*#define LZMA_VERSION_MINOR ([0-9]+).*\" \"\\\\1\" LIBLZMA_VERSION_MINOR \"\${LIBLZMA_HEADER_CONTENTS}\") + string(REGEX REPLACE \".*#define LZMA_VERSION_PATCH ([0-9]+).*\" \"\\\\1\" LIBLZMA_VERSION_PATCH \"\${LIBLZMA_HEADER_CONTENTS}\") + + set(LIBLZMA_VERSION_STRING \"\${LIBLZMA_VERSION_MAJOR}.\${LIBLZMA_VERSION_MINOR}.\${LIBLZMA_VERSION_PATCH}\") + unset(LIBLZMA_HEADER_CONTENTS) +endif() + +## We're using new code known now as XZ, even library still been called LZMA +## it can be found in http://tukaani.org/xz/ +## Avoid using old codebase +#if (LIBLZMA_LIBRARY) +# include(\${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake) +# CHECK_LIBRARY_EXISTS(\${LibLZMA_LIBRARY_RELEASE} lzma_auto_decoder \"\" LIBLZMA_HAS_AUTO_DECODER) +# CHECK_LIBRARY_EXISTS(\${LibLZMA_LIBRARY_RELEASE} lzma_easy_encoder \"\" LIBLZMA_HAS_EASY_ENCODER) +# CHECK_LIBRARY_EXISTS(\${LibLZMA_LIBRARY_RELEASE} lzma_lzma_preset \"\" LIBLZMA_HAS_LZMA_PRESET) +#endif () + +set(LibLZMA_FOUND TRUE CACHE BOOL \"\") +set(LZMA_FOUND TRUE CACHE BOOL \"\") +set(LIBLZMA_FOUND TRUE CACHE BOOL \"\") +") + +file(READ ${CURRENT_PACKAGES_DIR}/include/lzma.h _contents) +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined(LZMA_API_STATIC)" "1" _contents "${_contents}") +else() + string(REPLACE "defined(LZMA_API_STATIC)" "0" _contents "${_contents}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/lzma.h "${_contents}") + +if (VCPKG_BUILD_TYPE STREQUAL debug) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include) +else() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_replace_string( + "${CURRENT_PACKAGES_DIR}/include/lzma.h" + "if !defined(LZMA_API_STATIC)" + "if 0" + ) +endif() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/liblzma/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/liblzma/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..b7572d7 --- /dev/null +++ b/vcpkg/ports/liblzma/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,4 @@ +list(REMOVE_ITEM ARGS "NO_MODULE") +list(REMOVE_ITEM ARGS "CONFIG") +list(REMOVE_ITEM ARGS "MODULE") +_find_package(${ARGS} CONFIG) diff --git a/vcpkg/ports/libmad/0001-Fix-MSVC-ARM.patch b/vcpkg/ports/libmad/0001-Fix-MSVC-ARM.patch new file mode 100644 index 0000000..9cdc57c --- /dev/null +++ b/vcpkg/ports/libmad/0001-Fix-MSVC-ARM.patch @@ -0,0 +1,25 @@ +diff --git a/mad.h b/mad.h +index 9ef6cc8..5e3f7aa 100644 +--- a/mad.h ++++ b/mad.h +@@ -24,7 +24,11 @@ + extern "C" { + # endif + ++#ifdef _WIN64 ++# define FPM_64BIT ++#else + # define FPM_INTEL ++#endif + + + +@@ -184,7 +188,7 @@ typedef mad_fixed_t mad_sample_t; + + # elif defined(FPM_INTEL) + +-# if defined(_MSC_VER) ++# if defined(_MSC_VER) && defined(_M_IX86) + # pragma warning(push) + # pragma warning(disable: 4035) /* no return value */ + static __forceinline diff --git a/vcpkg/ports/libmad/CMakeLists.txt b/vcpkg/ports/libmad/CMakeLists.txt new file mode 100644 index 0000000..47db84c --- /dev/null +++ b/vcpkg/ports/libmad/CMakeLists.txt @@ -0,0 +1,53 @@ +cmake_minimum_required(VERSION 2.8) + +project(libmad) + +set(SOURCES + bit.c + bit.h + config.h + decoder.c + decoder.h + fixed.c + fixed.h + frame.c + frame.h + global.h + huffman.c + huffman.h + layer12.c + layer12.h + layer3.c + layer3.h + mad.h + stream.c + stream.h + synth.c + synth.h + timer.c + timer.h + version.c + version.h +) + +add_library( + mad + ${SOURCES} +) + +target_compile_definitions(mad + PRIVATE _LIB _MBCS ASO_ZEROCHECK HAVE_CONFIG_H FPM_DEFAULT + PRIVATE _CRT_SECURE_NO_WARNINGS +) + +install( + TARGETS mad + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install( + FILES mad.h + DESTINATION include +) diff --git a/vcpkg/ports/libmad/CONTROL b/vcpkg/ports/libmad/CONTROL new file mode 100644 index 0000000..356ecc6 --- /dev/null +++ b/vcpkg/ports/libmad/CONTROL @@ -0,0 +1,4 @@ +Source: libmad +Version: 0.15.1-8 +Homepage: http://www.mars.org/home/rob/proj/mpeg/ +Description: high-quality MPEG audio decoder diff --git a/vcpkg/ports/libmad/portfile.cmake b/vcpkg/ports/libmad/portfile.cmake new file mode 100644 index 0000000..ebf84de --- /dev/null +++ b/vcpkg/ports/libmad/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO mad/libmad + REF 0.15.1b + FILENAME "libmad-0.15.1b.tar.gz" + SHA512 2cad30347fb310dc605c46bacd9da117f447a5cabedd8fefdb24ab5de641429e5ec5ce8af7aefa6a75a3f545d3adfa255e3fa0a2d50971f76bc0c4fc0400cc45 + PATCHES 0001-Fix-MSVC-ARM.patch +) + +#The archive only contains a Visual Studio 6.0 era DSP project file, so use a custom CMakeLists.txt +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +#Use the msvc++ config.h header +file(COPY ${SOURCE_PATH}/msvc++/config.h DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmad) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmad/COPYING ${CURRENT_PACKAGES_DIR}/share/libmad/copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/vcpkg/ports/libmagic/CONTROL b/vcpkg/ports/libmagic/CONTROL new file mode 100644 index 0000000..750b651 --- /dev/null +++ b/vcpkg/ports/libmagic/CONTROL @@ -0,0 +1,5 @@ +Source: libmagic +Version: 5.37 +Port-Version: 2 +Homepage: https://github.com/file/file +Description: This library can be used to classify files according to magic number tests. diff --git a/vcpkg/ports/libmagic/portfile.cmake b/vcpkg/ports/libmagic/portfile.cmake new file mode 100644 index 0000000..363fa14 --- /dev/null +++ b/vcpkg/ports/libmagic/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO file/file + REF a0d5b0e4e9f97d74a9911e95cedd579852e25398 + SHA512 bd20a7f3a3117da10556a1f746f691d2e26b23b30cb70a6c08e05110eb415d457b82265dd910a7b05fc30bc34ba9019a33b1c59a34d844c14c2df7ba1eea060e + HEAD_REF mater +) + +vcpkg_configure_make( + AUTOCONFIG + SOURCE_PATH ${SOURCE_PATH} +) +vcpkg_install_make() +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/man5) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libmariadb/CONTROL b/vcpkg/ports/libmariadb/CONTROL new file mode 100644 index 0000000..d3b39d0 --- /dev/null +++ b/vcpkg/ports/libmariadb/CONTROL @@ -0,0 +1,14 @@ +Source: libmariadb +Version: 3.1.7 +Port-Version: 2 +Homepage: https://github.com/MariaDB/mariadb-connector-c +Description: MariaDB Connector/C is used to connect C/C++ applications to MariaDB and MySQL databases +Default-Features: zlib, openssl + +Feature: zlib +Build-Depends: zlib +Description: Use internal zlib + +Feature: openssl +Build-Depends: openssl +Description: Enable SSL support diff --git a/vcpkg/ports/libmariadb/disable-test-build.patch b/vcpkg/ports/libmariadb/disable-test-build.patch new file mode 100644 index 0000000..c877fb5 --- /dev/null +++ b/vcpkg/ports/libmariadb/disable-test-build.patch @@ -0,0 +1,34 @@ +diff --git a/unittest/libmariadb/CMakeLists.txt b/unittest/libmariadb/CMakeLists.txt +index 9cea916..a39ba94 100644 +--- a/unittest/libmariadb/CMakeLists.txt ++++ b/unittest/libmariadb/CMakeLists.txt +@@ -58,16 +58,16 @@ ENDIF() + + ADD_LIBRARY(ma_getopt ma_getopt.c) + +-FOREACH(API_TEST ${API_TESTS}) +- IF (NOT TARGET ${API_TEST}) +- ADD_EXECUTABLE(${API_TEST} ${API_TEST}.c) +- ENDIF() +- TARGET_LINK_LIBRARIES(${API_TEST} cctap ma_getopt mariadbclient) +- ADD_TEST(${API_TEST} ${EXECUTABLE_OUTPUT_PATH}/${API_TEST}) +- SET_TESTS_PROPERTIES(${API_TEST} PROPERTIES TIMEOUT 180) +-ENDFOREACH(API_TEST) +- +-FOREACH(API_TEST ${MANUAL_TESTS}) +- ADD_EXECUTABLE(${API_TEST} ${API_TEST}.c) +- TARGET_LINK_LIBRARIES(${API_TEST} cctap ma_getopt mariadbclient) +-ENDFOREACH() ++#FOREACH(API_TEST ${API_TESTS}) ++# IF (NOT TARGET ${API_TEST}) ++# ADD_EXECUTABLE(${API_TEST} ${API_TEST}.c) ++# ENDIF() ++# TARGET_LINK_LIBRARIES(${API_TEST} cctap ma_getopt mariadbclient) ++# ADD_TEST(${API_TEST} ${EXECUTABLE_OUTPUT_PATH}/${API_TEST}) ++# SET_TESTS_PROPERTIES(${API_TEST} PROPERTIES TIMEOUT 180) ++#ENDFOREACH(API_TEST) ++# ++#FOREACH(API_TEST ${MANUAL_TESTS}) ++# ADD_EXECUTABLE(${API_TEST} ${API_TEST}.c) ++# TARGET_LINK_LIBRARIES(${API_TEST} cctap ma_getopt mariadbclient) ++#ENDFOREACH() diff --git a/vcpkg/ports/libmariadb/fix-InstallPath.patch b/vcpkg/ports/libmariadb/fix-InstallPath.patch new file mode 100644 index 0000000..667a428 --- /dev/null +++ b/vcpkg/ports/libmariadb/fix-InstallPath.patch @@ -0,0 +1,49 @@ +diff --git a/cmake/install_plugins.cmake b/cmake/install_plugins.cmake +index cd5616c..d058a5c 100644 +--- a/cmake/install_plugins.cmake ++++ b/cmake/install_plugins.cmake +@@ -8,7 +8,7 @@ + # plugin installation + + MACRO(INSTALL_PLUGIN name binary_dir) +- INSTALL(TARGETS ${name} COMPONENT ClientPlugins DESTINATION ${INSTALL_PLUGINDIR}) ++ INSTALL(TARGETS ${name} COMPONENT ClientPlugins DESTINATION ${INSTALL_PLUGINDIR}/../../../bin/plugin) + IF(WIN32) + FILE(APPEND ${CC_BINARY_DIR}/win/packaging/plugin.conf "\n") + FILE(APPEND ${CC_BINARY_DIR}/win/packaging/plugin.conf "\n") +diff --git a/libmariadb/CMakeLists.txt b/libmariadb/CMakeLists.txt +index a1f039e..03a3a6f 100644 +--- a/libmariadb/CMakeLists.txt ++++ b/libmariadb/CMakeLists.txt +@@ -386,10 +386,10 @@ ADD_LIBRARY(mariadbclient STATIC ${MARIADB_OBJECTS} ${EMPTY_FILE}) + TARGET_LINK_LIBRARIES(mariadbclient ${SYSTEM_LIBS}) + + IF(UNIX) +- ADD_LIBRARY(libmariadb SHARED ${libmariadb_RC} ${MARIADB_OBJECTS} ${EMPTY_FILE}) ++ ADD_LIBRARY(libmariadb ${libmariadb_RC} ${MARIADB_OBJECTS} ${EMPTY_FILE}) + SET_TARGET_PROPERTIES(libmariadb PROPERTIES COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS}") + ELSE() +- ADD_LIBRARY(libmariadb SHARED ${libmariadb_RC} mariadbclient.def) ++ ADD_LIBRARY(libmariadb ${libmariadb_RC} mariadbclient.def) + TARGET_LINK_LIBRARIES(libmariadb mariadbclient) + SET_TARGET_PROPERTIES(libmariadb PROPERTIES LINKER_LANGUAGE C) + ENDIF() +@@ -441,13 +441,14 @@ ENDIF() + + INSTALL(TARGETS mariadbclient + COMPONENT Development +- DESTINATION ${INSTALL_LIBDIR}) ++ LIBRARY DESTINATION lib) + INSTALL(TARGETS libmariadb + COMPONENT SharedLibraries +- DESTINATION ${INSTALL_LIBDIR}) ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) + +- +-IF(WIN32) ++IF(0) + # On Windows, install PDB + INSTALL(FILES $ DESTINATION "${INSTALL_LIBDIR}" + CONFIGURATIONS Debug RelWithDebInfo diff --git a/vcpkg/ports/libmariadb/md.patch b/vcpkg/ports/libmariadb/md.patch new file mode 100644 index 0000000..dc92b69 --- /dev/null +++ b/vcpkg/ports/libmariadb/md.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 528c170..a5cd3fe 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -108,7 +108,7 @@ IF(MSVC) + # Speedup system tests + INCLUDE(${CC_SOURCE_DIR}/cmake/WindowsCache.cmake) + ADD_DEFINITIONS(-DWIN32_LEAN_AND_MEAN) +- IF (MSVC) ++ IF (MSVC AND 0) + SET(CONFIG_TYPES "DEBUG" "RELEASE" "RELWITHDEBINFO") + FOREACH(BUILD_TYPE ${CONFIG_TYPES}) + FOREACH(COMPILER CXX C) diff --git a/vcpkg/ports/libmariadb/portfile.cmake b/vcpkg/ports/libmariadb/portfile.cmake new file mode 100644 index 0000000..6943c93 --- /dev/null +++ b/vcpkg/ports/libmariadb/portfile.cmake @@ -0,0 +1,69 @@ + +if (EXISTS "${CURRENT_INSTALLED_DIR}/share/libmysql") + message(FATAL_ERROR "FATAL ERROR: libmysql and libmariadb are incompatible.") +endif() + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO MariaDB/mariadb-connector-c + REF 8e9c3116105d9a998a60991b7f4ba910d454d4b1 # v3.1.7 + SHA512 b663effe7794d997c0589a9a20dab6b7359414612e60e3cb43e3fd0ddeae0391bcbc2d816cba4a7438602566ad6781cbf8e18b0062f1d37a2b2bd521af16033c + HEAD_REF master + PATCHES + md.patch + disable-test-build.patch + fix-InstallPath.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + zlib WITH_EXTERNAL_ZLIB + openssl WITH_SSL +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DWITH_UNITTEST=OFF + -DWITH_CURL=OFF +) + +vcpkg_install_cmake() + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + # remove debug header + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +if(VCPKG_BUILD_TYPE STREQUAL "debug") + # move headers + file(RENAME + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/include) +endif() + +# remove plugin folder +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/lib/mariadb + ${CURRENT_PACKAGES_DIR}/debug/lib/mariadb) + +# copy & remove header files +file(REMOVE + ${CURRENT_PACKAGES_DIR}/include/mariadb/my_config.h.in + ${CURRENT_PACKAGES_DIR}/include/mariadb/mysql_version.h.in + ${CURRENT_PACKAGES_DIR}/include/mariadb/CMakeLists.txt + ${CURRENT_PACKAGES_DIR}/include/mariadb/Makefile.am) +file(RENAME + ${CURRENT_PACKAGES_DIR}/include/mariadb + ${CURRENT_PACKAGES_DIR}/include/mysql) + +# copy license file +file(COPY ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmariadb) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmariadb/COPYING.LIB ${CURRENT_PACKAGES_DIR}/share/libmariadb/copyright) diff --git a/vcpkg/ports/libmaxminddb/CMakeLists.txt b/vcpkg/ports/libmaxminddb/CMakeLists.txt new file mode 100644 index 0000000..c46c631 --- /dev/null +++ b/vcpkg/ports/libmaxminddb/CMakeLists.txt @@ -0,0 +1,34 @@ +cmake_minimum_required (VERSION 3.9) +project(maxminddb C) + +set(CMAKE_DEBUG_POSTFIX d) +set(CMAKE_SHARED_LIBRARY_PREFIX lib) +set(CMAKE_STATIC_LIBRARY_PREFIX lib) + +if(MSVC) + add_compile_options(-D_CRT_SECURE_NO_WARNINGS) +endif() + +set(SRCS + src/maxminddb.c + src/data-pool.c +) + +include_directories(. src include projects/VS12) + +add_library(maxminddb ${SRCS}) + +if(WIN32) + target_link_libraries(maxminddb ws2_32) +endif() + +install( + TARGETS maxminddb + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES include/maxminddb.h projects/VS12/maxminddb_config.h DESTINATION include/maxminddb) +endif() diff --git a/vcpkg/ports/libmaxminddb/CONTROL b/vcpkg/ports/libmaxminddb/CONTROL new file mode 100644 index 0000000..c12d403 --- /dev/null +++ b/vcpkg/ports/libmaxminddb/CONTROL @@ -0,0 +1,4 @@ +Source: libmaxminddb +Version: 1.4.3 +Homepage: https://github.com/maxmind/libmaxminddb +Description: C library for the MaxMind DB file format \ No newline at end of file diff --git a/vcpkg/ports/libmaxminddb/fix-linux-build.patch b/vcpkg/ports/libmaxminddb/fix-linux-build.patch new file mode 100644 index 0000000..bdf9b77 --- /dev/null +++ b/vcpkg/ports/libmaxminddb/fix-linux-build.patch @@ -0,0 +1,19 @@ +diff --git a/include/maxminddb.h b/include/maxminddb.h +index 13b276f..6c70e49 100644 +--- a/include/maxminddb.h ++++ b/include/maxminddb.h +@@ -24,11 +24,12 @@ extern "C" { + #include + #include + ++/* libmaxminddb package version from configure */ ++#define PACKAGE_VERSION "1.4.3" ++ + #ifdef _WIN32 + #include + #include +-/* libmaxminddb package version from configure */ +-#define PACKAGE_VERSION "1.4.3" + + typedef ADDRESS_FAMILY sa_family_t; + diff --git a/vcpkg/ports/libmaxminddb/portfile.cmake b/vcpkg/ports/libmaxminddb/portfile.cmake new file mode 100644 index 0000000..db280fa --- /dev/null +++ b/vcpkg/ports/libmaxminddb/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO maxmind/libmaxminddb + REF 07797e9dfb6771190f9fa41a33babe19425ef552 #1.4.3 + SHA512 94f7fbd46a7846c804edad9759ceedf2f7c4b2085430322f74bea5c89f6c3fa0824f154f551119a8c69becec5120650efef89c6d7f5a2ef3df476086070c8c7e + HEAD_REF master + PATCHES fix-linux-build.patch +) + +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() +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/libmediainfo/CONTROL b/vcpkg/ports/libmediainfo/CONTROL new file mode 100644 index 0000000..1ca85c7 --- /dev/null +++ b/vcpkg/ports/libmediainfo/CONTROL @@ -0,0 +1,5 @@ +Source: libmediainfo +Version: 20.08 +Homepage: https://github.com/MediaArea/MediaInfoLib +Description: Get most relevant technical and tag data from video and audio files +Build-Depends: libzen, curl, zlib diff --git a/vcpkg/ports/libmediainfo/portfile.cmake b/vcpkg/ports/libmediainfo/portfile.cmake new file mode 100644 index 0000000..955bb9c --- /dev/null +++ b/vcpkg/ports/libmediainfo/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO MediaArea/MediaInfoLib + REF v20.08 + SHA512 271742af2b2407c04a0555d851fc9ef5590326f4101413ef2092d0a0b99e8367d01bb6442464d171b582b00bb2f45edb9bc9867e74a8d14daba99e2416bc08f3 + HEAD_REF master + PATCHES vcpkg_support_in_cmakelists.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/Project/CMake + PREFER_NINJA + OPTIONS + -DBUILD_ZENLIB=0 + -DBUILD_ZLIB=0 +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/mediainfolib TARGET_PATH share/mediainfolib) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libmediainfo/vcpkg_support_in_cmakelists.patch b/vcpkg/ports/libmediainfo/vcpkg_support_in_cmakelists.patch new file mode 100644 index 0000000..d3c22ab --- /dev/null +++ b/vcpkg/ports/libmediainfo/vcpkg_support_in_cmakelists.patch @@ -0,0 +1,54 @@ +diff --git a/Project/CMake/CMakeLists.txt b/Project/CMake/CMakeLists.txt +index 47c4ed13..f13ff531 100644 +--- a/Project/CMake/CMakeLists.txt ++++ b/Project/CMake/CMakeLists.txt +@@ -88,7 +88,7 @@ endif() + find_package(TinyXML) + + # use system curl if is present +-find_package(CURL) ++find_package(CURL CONFIG REQUIRED) + + include_directories(${MediaInfoLib_SOURCES_PATH}) + include_directories(${MediaInfoLib_SOURCES_PATH}/ThirdParty/md5/) +@@ -398,13 +398,7 @@ endif() + target_link_libraries(mediainfo ${ZenLib_LIBRARY} ${ZLIB_LIBRARIES}) + + if(MSVC AND BUILD_SHARED_LIBS) +- get_target_property(LOCATION mediainfo LOCATION_DEBUG) +- string(REGEX REPLACE "\\.[^.]*$" ".pdb" LOCATION "${LOCATION}") +- install(FILES ${LOCATION} DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS Debug) +- +- get_target_property(LOCATION mediainfo LOCATION_RELWITHDEBINFO) +- string(REGEX REPLACE "\\.[^.]*$" ".pdb" LOCATION "${LOCATION}") +- install(FILES ${LOCATION} DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS RelWithDebInfo) ++ install(FILES $ DESTINATION ${BIN_INSTALL_DIR} OPTIONAL) + endif() + + if (APPLE) +diff --git a/Source/ThirdParty/aes-gladman/aesopt.h b/Source/ThirdParty/aes-gladman/aesopt.h +index 6ad9ca1e..a858396f 100644 +--- a/Source/ThirdParty/aes-gladman/aesopt.h ++++ b/Source/ThirdParty/aes-gladman/aesopt.h +@@ -183,6 +183,6 @@ Issue Date: 20/12/2007 + AES_REV_DKS must NOT be defined when such assembler files are + built + */ +-#if 1 && defined( _WIN64 ) && defined( _MSC_VER ) ++#if 1 && defined( _WIN64 ) && defined( _MSC_VER ) && defined( _M_AMD64 ) + # define INTEL_AES_POSSIBLE + #endif +diff --git a/Source/ThirdParty/aes-gladman/brg_endian.h b/Source/ThirdParty/aes-gladman/brg_endian.h +index 4c34f2b5..fae471b9 100644 +--- a/Source/ThirdParty/aes-gladman/brg_endian.h ++++ b/Source/ThirdParty/aes-gladman/brg_endian.h +@@ -110,7 +110,8 @@ Issue Date: 20/12/2007 + defined( __MRC__ ) || defined( __MVS__ ) || defined( __MWERKS__ ) || \ + defined( sparc ) || defined( __sparc) || defined( SYMANTEC_C ) || \ + defined( __VOS__ ) || defined( __TIGCC__ ) || defined( __TANDEM ) || \ +- defined( THINK_C ) || defined( __VMCMS__ ) || defined( _AIX ) ++ defined( THINK_C ) || defined( __VMCMS__ ) || defined( _AIX ) || \ ++ defined( _M_ARM64 ) || defined ( _M_ARM ) + # define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN + + #elif 0 /* **** EDIT HERE IF NECESSARY **** */ diff --git a/vcpkg/ports/libmesh/CONTROL b/vcpkg/ports/libmesh/CONTROL new file mode 100644 index 0000000..0350119 --- /dev/null +++ b/vcpkg/ports/libmesh/CONTROL @@ -0,0 +1,4 @@ +Source: libmesh +Version: 1.5.0-1 +Homepage: https://github.com/libMesh/libmesh +Description: The libMesh library provides a framework for the numerical simulation of partial differential equations using arbitrary unstructured discretizations on serial and parallel platforms. A major goal of the library is to provide support for adaptive mesh refinement (AMR) computations in parallel while allowing a research scientist to focus on the physics they are modeling. diff --git a/vcpkg/ports/libmesh/copyright b/vcpkg/ports/libmesh/copyright new file mode 100644 index 0000000..a912156 --- /dev/null +++ b/vcpkg/ports/libmesh/copyright @@ -0,0 +1,169 @@ +GNU LESSER GENERAL PUBLIC LICENSE +Version 2.1, February 1999 + +Copyright (C) 1991, 1999 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] +Preamble +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. + +This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. + +When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. + +To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. + +For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. + +We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. + +To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. + +Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. + +Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. + +When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. + +We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. + +For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. + +In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. + +Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. + +The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. + +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION +0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". + +A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. + +The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) + +"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. + +1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + +a) The modified work must itself be a software library. +b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. +c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. +d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. +(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. + +Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. + +This option is useful when you wish to copy part of the code of the Library into a program that is not a library. + +4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. + +If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. + +5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. + +However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. + +When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. + +If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) + +Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. + +6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. + +You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: + +a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) +b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. +c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. +d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. +e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. +For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. + +7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: + +a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. +b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. +8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. + +10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. + +11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. + +14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS +How to Apply These Terms to Your New Libraries +If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). + +To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. + +one line to give the library's name and an idea of what it does. +Copyright (C) year name of author + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: + +Yoyodyne, Inc., hereby disclaims all copyright interest in +the library `Frob' (a library for tweaking knobs) written +by James Random Hacker. + +signature of Ty Coon, 1 April 1990 +Ty Coon, President of Vice +That's all there is to it! \ No newline at end of file diff --git a/vcpkg/ports/libmesh/portfile.cmake b/vcpkg/ports/libmesh/portfile.cmake new file mode 100644 index 0000000..9a16dbf --- /dev/null +++ b/vcpkg/ports/libmesh/portfile.cmake @@ -0,0 +1,56 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libMesh/libmesh + REF 21f623c837b3865ed65ec9608b357bdb1935d428 #1.5.0 + SHA512 53ad41ed0cd99cb5096ff338a3ff5d8a8ecbfb17dc1d7ee0d2b0cbffecbede7f7c11b7c3c2233cec9dde0988c8828ba0199247effd3442befc72230e641a185e + HEAD_REF master +) + +if(VCPKG_TARGET_IS_WINDOWS) + set(OPTIONS --disable-qhull ) +endif() +# There a lot of configure options in this port which are not yet correctly handled by VCPKG +# To only mention two: +# --enable-vtk-required Error if VTK is not detected by configure +# --enable-capnp-required Error if Cap'n Proto support is not detected by +# but there are a lot more which need to be checked/fixed +# So this port can only be considered a Work In Progress +vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS ${OPTIONS} +) + +vcpkg_install_make() + +if (EXISTS ${CURRENT_PACKAGES_DIR}/contrib/bin/libtool) + file(COPY ${CURRENT_PACKAGES_DIR}/contrib/bin/libtool DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + file(REMOVE ${CURRENT_PACKAGES_DIR}/contrib/bin/libtool) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/contrib ${CURRENT_PACKAGES_DIR}/debug/contrib) + +file(GLOB ${CURRENT_PACKAGES_DIR}/bin LIBMESH_TOOLS) +foreach (LIBMESH_TOOL ${LIBMESH_TOOLS}) + file(COPY ${LIBMESH_TOOL} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + file(REMOVE ${LIBMESH_TOOL}) +endforeach() + +file(GLOB LIBMESH_TOOLS ${CURRENT_PACKAGES_DIR}/examples/*) +foreach (LIBMESH_TOOL ${LIBMESH_TOOLS}) + file(COPY ${LIBMESH_TOOL} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + file(REMOVE ${LIBMESH_TOOL}) +endforeach() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Remove tools and debug include directories +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/contrib ${CURRENT_PACKAGES_DIR}/debug/etc + ${CURRENT_PACKAGES_DIR}/debug/examples ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/Make.common ${CURRENT_PACKAGES_DIR}/debug/Make.common) + +vcpkg_copy_pdbs() + +file(INSTALL ${CURRENT_PORT_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + diff --git a/vcpkg/ports/libmicrohttpd/CONTROL b/vcpkg/ports/libmicrohttpd/CONTROL new file mode 100644 index 0000000..c1a76d5 --- /dev/null +++ b/vcpkg/ports/libmicrohttpd/CONTROL @@ -0,0 +1,6 @@ +Source: libmicrohttpd +Version: 0.9.63 +Port-Version: 4 +Homepage: https://www.gnu.org/software/libmicrohttpd/ +Description: GNU libmicrohttpd is a small C library that is supposed to make it easy to run an HTTP server as part of another application +Supports: !(arm|uwp) \ No newline at end of file diff --git a/vcpkg/ports/libmicrohttpd/fix-msvc-project.patch b/vcpkg/ports/libmicrohttpd/fix-msvc-project.patch new file mode 100644 index 0000000..29071a2 --- /dev/null +++ b/vcpkg/ports/libmicrohttpd/fix-msvc-project.patch @@ -0,0 +1,12 @@ +diff --git a/w32/common/libmicrohttpd-files.vcxproj b/w32/common/libmicrohttpd-files.vcxproj +index 6f1e03b..c0ddea8 100644 +--- a/w32/common/libmicrohttpd-files.vcxproj ++++ b/w32/common/libmicrohttpd-files.vcxproj +@@ -3,6 +3,7 @@ + + + ++ + + + diff --git a/vcpkg/ports/libmicrohttpd/portfile.cmake b/vcpkg/ports/libmicrohttpd/portfile.cmake new file mode 100644 index 0000000..e055a24 --- /dev/null +++ b/vcpkg/ports/libmicrohttpd/portfile.cmake @@ -0,0 +1,45 @@ +vcpkg_fail_port_install(ON_TARGET "UWP" ON_ARCH "arm") + +set(MICROHTTPD_VERSION 0.9.63) + +vcpkg_download_distfile(ARCHIVE + URLS + "https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-${MICROHTTPD_VERSION}.tar.gz" + "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-${MICROHTTPD_VERSION}.tar.gz" + FILENAME "libmicrohttpd-${MICROHTTPD_VERSION}.tar.gz" + SHA512 cb99e7af84fb6d7c0fd3894a9dc0fbff14959b35347506bd3211a65bbfad36455007b9e67493e97c9d8394834408df10eeabdc7758573e6aae0ba6f5f87afe17 +) + +vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH + PATCHES fix-msvc-project.patch +) + +if (VCPKG_TARGET_IS_WINDOWS) + if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(CFG_SUFFIX "dll") + else() + set(CFG_SUFFIX "static") + endif() + + vcpkg_install_msbuild( + SOURCE_PATH "${SOURCE_PATH}" + PROJECT_SUBPATH w32/VS2015/libmicrohttpd.vcxproj + RELEASE_CONFIGURATION "Release-${CFG_SUFFIX}" + DEBUG_CONFIGURATION "Debug-${CFG_SUFFIX}" + ) + + file(GLOB MICROHTTPD_HEADERS ${SOURCE_PATH}/src/include/microhttpd*.h) + file(COPY ${MICROHTTPD_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) +else() + vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + ) + + vcpkg_install_make() + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libmikmod/CONTROL b/vcpkg/ports/libmikmod/CONTROL new file mode 100644 index 0000000..637052c --- /dev/null +++ b/vcpkg/ports/libmikmod/CONTROL @@ -0,0 +1,5 @@ +Source: libmikmod +Version: 3.3.11.1-8 +Homepage: https://sourceforge.net/projects/mikmod/ +Description: Mikmod is a module player and library supporting many formats, including mod, s3m, it, and xm. +Build-Depends: openal-soft diff --git a/vcpkg/ports/libmikmod/fix-missing-dll.patch b/vcpkg/ports/libmikmod/fix-missing-dll.patch new file mode 100644 index 0000000..a15c240 --- /dev/null +++ b/vcpkg/ports/libmikmod/fix-missing-dll.patch @@ -0,0 +1,29 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 53a174e..b4d31d3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -856,11 +856,19 @@ INSTALL( + ARCHIVE DESTINATION "lib${LIB_SUFFIX}" + ) + +-INSTALL( +- FILES "${CMAKE_BINARY_DIR}/libmikmod-config" +- PERMISSIONS GROUP_EXECUTE GROUP_READ OWNER_EXECUTE OWNER_READ OWNER_WRITE WORLD_EXECUTE WORLD_READ +- DESTINATION "bin" +-) ++IF(WIN32) ++ SET(LIB_SUFFIX_USED ".dll") ++ELSEIF(UNIX) ++ SET(LIB_SUFFIX_USED ".so") ++ELSEIF(APPLE) ++ SET(LIB_SUFFIX_USED ".dylib") ++ELSE() ++ SET(LIB_SUFFIX_USED) ++ENDIF() ++ ++IF(NOT ENABLE_STATIC) ++ INSTALL(FILES "${CMAKE_BINARY_DIR}/mikmod${LIB_SUFFIX_USED}" DESTINATION "bin") ++ENDIF() + + INSTALL( + FILES diff --git a/vcpkg/ports/libmikmod/name_conflict.patch b/vcpkg/ports/libmikmod/name_conflict.patch new file mode 100644 index 0000000..be0ba1d --- /dev/null +++ b/vcpkg/ports/libmikmod/name_conflict.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 53a174e..5983882 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -404,7 +404,7 @@ IF (ENABLE_STATIC) + + SET_TARGET_PROPERTIES( + mikmod-static +- PROPERTIES OUTPUT_NAME "mikmod" ++ PROPERTIES OUTPUT_NAME "mikmod-static" + ) + SET_TARGET_PROPERTIES( + ${LIBMIKMOD_LIBS} diff --git a/vcpkg/ports/libmikmod/portfile.cmake b/vcpkg/ports/libmikmod/portfile.cmake new file mode 100644 index 0000000..55556e2 --- /dev/null +++ b/vcpkg/ports/libmikmod/portfile.cmake @@ -0,0 +1,47 @@ +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO mikmod/libmikmod + REF 3.3.11.1 + FILENAME "libmikmod-3.3.11.1.tar.gz" + SHA512 f2439e2b691613847cd0787dd4e050116683ce7b05c215b8afecde5c6add819ea6c18e678e258c0a80786bef463f406072de15127f64368f694287a5e8e1a9de + PATCHES + fix-missing-dll.patch + name_conflict.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(ENABLE_STATIC ON) +else() + set(ENABLE_STATIC OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DENABLE_DOC=OFF + -DENABLE_THREADS=ON + -DDISABLE_HQMIXER=OFF + -DENABLE_AF=ON + -DENABLE_AIFF=ON + -DENABLE_NAS=ON + -DENABLE_OPENAL=ON + -DENABLE_PIPE=ON + -DENABLE_RAW=ON + -DENABLE_STDOUT=ON + -DENABLE_WAV=ON + -DOPENAL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include + -DENABLE_STATIC=${ENABLE_STATIC} + OPTIONS_RELEASE -DENABLE_SIMD=ON + OPTIONS_DEBUG -DENABLE_SIMD=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libmodbus/CMakeLists.txt b/vcpkg/ports/libmodbus/CMakeLists.txt new file mode 100644 index 0000000..618ba5f --- /dev/null +++ b/vcpkg/ports/libmodbus/CMakeLists.txt @@ -0,0 +1,114 @@ +cmake_minimum_required(VERSION 3.0) +project(libmodbus VERSION 3.1.6) + +set(LIBMODBUS_VERSION ${PROJECT_VERSION}) +set(LIBMODBUS_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) +set(LIBMODBUS_VERSION_MINOR ${PROJECT_VERSION_MINOR}) +set(LIBMODBUS_VERSION_MICRO ${PROJECT_VERSION_PATCH}) +configure_file(src/modbus-version.h.in ${CMAKE_CURRENT_BINARY_DIR}/modbus-version.h) + +if(WIN32) + set(HAVE_ERRNO_H 1) + set(HAVE_FCNTL_H 1) + set(HAVE_LIMITS_H 1) + set(HAVE_SYS_TYPES_H 1) + set(HAVE_TIME_H 1) + set(HAVE_MALLOC 1) + set(HAVE_MEMSET 1) + set(HAVE_STRERROR 1) +else() + include(CheckIncludeFile) + check_include_file(arpa/inet.h HAVE_ARPA_INET_H) + check_include_file(byteswap.h HAVE_BYTESWAP_H) + check_include_file(errno.h HAVE_ERRNO_H) + check_include_file(fcntl.h HAVE_FCNTL_H) + check_include_file(limits.h HAVE_LIMITS_H) + check_include_file(linux/serial.h HAVE_LINUX_SERIAL_H) + check_include_file(netdb.h HAVE_NETDB_H) + check_include_file(netinet/in.h HAVE_NETINET_IN_H) + check_include_file(netinet/tcp.h HAVE_NETINET_TCP_H) + check_include_file(sys/ioctl.h HAVE_SYS_IOCTL_H) + check_include_file(sys/params.h HAVE_SYS_PARAMS_H) + check_include_file(sys/socket.h HAVE_SYS_SOCKET_H) + check_include_file(sys/time.h HAVE_SYS_TIME_H) + check_include_file(sys/types.h HAVE_SYS_TYPES_H) + check_include_file(termios.h HAVE_TERMIOS_H) + check_include_file(time.h HAVE_TIME_H) + check_include_file(unistd.h HAVE_UNISTD_H) + + include(CheckFunctionExists) + check_function_exists(accept4 HAVE_ACCEPT4) + check_function_exists(fork HAVE_FORK) + check_function_exists(getaddrinfo HAVE_GETADDRINFO) + check_function_exists(gettimeofday HAVE_GETTIMEOFDAY) + check_function_exists(inet_ntoa HAVE_INET_NTOA) + check_function_exists(malloc HAVE_MALLOC) + check_function_exists(memset HAVE_MEMSET) + check_function_exists(select HAVE_SELECT) + check_function_exists(socket HAVE_SOCKET) + check_function_exists(strerror HAVE_STRERROR) + check_function_exists(strlcpy HAVE_STRLCPY) + + include(CheckSymbolExists) + check_symbol_exists(TIOCSRS485 sys/ioctl.h HAVE_TIOCRS485) + check_symbol_exists(TIOCM_RTS sys/ioctl.h HAVE_TIOCM_RTS) +endif() + +configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) + + +if(BUILD_SHARED_LIBS) + add_compile_options(-DDLLBUILD=ON) +else() + add_compile_options(-DLIBBUILD=ON) +endif() + +set(MODBUS_PUBLIC_HEADERS + src/modbus-rtu.h + src/modbus-tcp.h + src/modbus.h + ${CMAKE_CURRENT_BINARY_DIR}/modbus-version.h +) + +add_library(modbus + src/modbus-data.c + src/modbus-rtu.c + src/modbus-tcp.c +src/modbus.c) + +target_include_directories(modbus PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) +target_include_directories(modbus INTERFACE + $ +) +set_target_properties(modbus PROPERTIES PUBLIC_HEADER "${MODBUS_PUBLIC_HEADERS}") + +if(CMAKE_COMPILER_IS_GNUCC) + target_compile_options(modbus PRIVATE -D_GNU_SOURCE) +endif() + +if(WIN32) + target_link_libraries(modbus wsock32 ws2_32) +endif() + +set(LIBMODBUS_SOVERSION_VERSION 5.1.0) +set(LIBMODBUS_SOVERSION_SOVERSION 5) + + +set_target_properties(modbus PROPERTIES + VERSION ${LIBMODBUS_SOVERSION_VERSION} +SOVERSION ${LIBMODBUS_SOVERSION_SOVERSION}) + + +install( + TARGETS modbus + EXPORT libmodbusConfig + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) +install(EXPORT libmodbusConfig DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) + + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES ${MODBUS_PUBLIC_HEADERS} DESTINATION include/) +endif() diff --git a/vcpkg/ports/libmodbus/config.h.cmake b/vcpkg/ports/libmodbus/config.h.cmake new file mode 100644 index 0000000..b8f7585 --- /dev/null +++ b/vcpkg/ports/libmodbus/config.h.cmake @@ -0,0 +1,49 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#cmakedefine HAVE_ARPA_INET_H +#cmakedefine HAVE_BYTESWAP_H +#cmakedefine HAVE_ERRNO_H +#cmakedefine HAVE_FCNTL_H +#cmakedefine HAVE_LIMITS_H +#cmakedefine HAVE_LINUX_SERIAL_H +#cmakedefine HAVE_NETDB_H +#cmakedefine HAVE_NETINET_IN_H +#cmakedefine HAVE_NETINET_TCP_H +#cmakedefine HAVE_SYS_IOCTL_H +#cmakedefine HAVE_SYS_PARAMS_H +#cmakedefine HAVE_SYS_SOCKET_H +#cmakedefine HAVE_SYS_TIME_H +#cmakedefine HAVE_SYS_TYPES_H +#cmakedefine HAVE_TERMIOS_H +#cmakedefine HAVE_TIME_H +#cmakedefine HAVE_UNISTD_H + +#cmakedefine HAVE_ACCEPT4 +#cmakedefine HAVE_FORK +#cmakedefine HAVE_GETADDRINFO +#cmakedefine HAVE_GETTIMEOFDAY +#cmakedefine HAVE_INET_NTOA +#cmakedefine HAVE_MALLOC +#cmakedefine HAVE_MEMSET +#cmakedefine HAVE_SELECT +#cmakedefine HAVE_SOCKET +#cmakedefine HAVE_STRERROR +#cmakedefine HAVE_STRLCPY + +#cmakedefine HAVE_TIOCRS485 +#cmakedefine HAVE_TIOCM_RTS + +#ifdef HAVE_TIOCM_RTS +#define HAVE_DECL_TIOCM_RTS 1 +#else +#define HAVE_DECL_TIOCM_RTS 0 +#endif + +#ifdef HAVE_TIOCRS485 +#define HAVE_DECL_TIOCSRS485 1 +#else +#define HAVE_DECL_TIOCSRS485 0 +#endif + +#endif \ No newline at end of file diff --git a/vcpkg/ports/libmodbus/fix-static-linkage.patch b/vcpkg/ports/libmodbus/fix-static-linkage.patch new file mode 100644 index 0000000..7d7ae79 --- /dev/null +++ b/vcpkg/ports/libmodbus/fix-static-linkage.patch @@ -0,0 +1,13 @@ +diff --git a/src/modbus.h b/src/modbus.h +index fbe20bc..895d05d 100644 +--- a/src/modbus.h ++++ b/src/modbus.h +@@ -24,6 +24,8 @@ + # if defined(DLLBUILD) + /* define DLLBUILD when building the DLL */ + # define MODBUS_API __declspec(dllexport) ++# elif defined(LIBBUILD) ++# define MODBUS_API + # else + # define MODBUS_API __declspec(dllimport) + # endif diff --git a/vcpkg/ports/libmodbus/portfile.cmake b/vcpkg/ports/libmodbus/portfile.cmake new file mode 100644 index 0000000..a607f5a --- /dev/null +++ b/vcpkg/ports/libmodbus/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO stephane/libmodbus + REF v3.1.6 + SHA512 9eaa395c75e1170e703e01f8c52c6e6e87efe4eaa22adfc3b51153fd5535d545aea35cf68e1aba29720a6c1dd13d9c60b6b08a5c8098dccd13ccfdc6944420a9 + HEAD_REF master + PATCHES fix-static-linkage.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${CMAKE_CURRENT_LIST_DIR}/config.h.cmake DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) + +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/modbus.h "elif defined(LIBBUILD)" "elif 1") +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING.LESSER DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) \ No newline at end of file diff --git a/vcpkg/ports/libmodbus/vcpkg.json b/vcpkg/ports/libmodbus/vcpkg.json new file mode 100644 index 0000000..cea7889 --- /dev/null +++ b/vcpkg/ports/libmodbus/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "libmodbus", + "version-string": "3.1.6", + "port-version": 1, + "description": "libmodbus is a free software library to send/receive data with a device which respects the Modbus protocol", + "homepage": "https://github.com/stephane/libmodbus", + "supports": "!uwp" +} diff --git a/vcpkg/ports/libmodman/CONTROL b/vcpkg/ports/libmodman/CONTROL new file mode 100644 index 0000000..21b45a2 --- /dev/null +++ b/vcpkg/ports/libmodman/CONTROL @@ -0,0 +1,8 @@ +Source: libmodman +Version: 2.0.1-2 +Homepage: https://code.google.com/p/libmodman +Description: a simple library for managing modules + +Feature: tests +Description: Build libmodman tests +Build-Depends: zlib diff --git a/vcpkg/ports/libmodman/fix-install-path.patch b/vcpkg/ports/libmodman/fix-install-path.patch new file mode 100644 index 0000000..066813b --- /dev/null +++ b/vcpkg/ports/libmodman/fix-install-path.patch @@ -0,0 +1,39 @@ +diff --git a/libmodman/CMakeLists.txt b/libmodman/CMakeLists.txt +index 0aff593..9e419ce 100644 +--- a/libmodman/CMakeLists.txt ++++ b/libmodman/CMakeLists.txt +@@ -30,15 +30,15 @@ if(NOT WIN32 AND NOT APPLE) + configure_file(libmodman-2.0.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/libmodman-2.0.pc @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libmodman-2.0.pc +- DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) ++ DESTINATION lib/pkgconfig) + endif() + + # CMake Find helper +-if (NOT WIN32 AND NOT APPLE) ++if (1) + configure_file(Findlibmodman.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/Findlibmodman.cmake @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/Findlibmodman.cmake +- DESTINATION ${SHARE_INSTALL_DIR}/cmake/Modules) ++ DESTINATION share/${PROJECT_NAME}) + endif() + + # Define the library itself +@@ -50,8 +50,13 @@ if(NOT WIN32) + target_link_libraries(modman dl) + endif() + set_target_properties(modman PROPERTIES PREFIX "lib" VERSION 1.0.0 SOVERSION 1) +-install(TARGETS modman DESTINATION ${LIB_INSTALL_DIR}) +-install(FILES module_manager.hpp module.hpp DESTINATION ${INCLUDE_INSTALL_DIR}/${PROJECT_NAME}) ++install( ++ TARGETS modman ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) ++install(FILES module_manager.hpp module.hpp DESTINATION include/${PROJECT_NAME}) + + ### Tests + add_testdirectory(test) diff --git a/vcpkg/ports/libmodman/fix-undefined-typeid.patch b/vcpkg/ports/libmodman/fix-undefined-typeid.patch new file mode 100644 index 0000000..93db675 --- /dev/null +++ b/vcpkg/ports/libmodman/fix-undefined-typeid.patch @@ -0,0 +1,12 @@ +diff --git a/libmodman/test/main.hpp b/libmodman/test/main.hpp +index 90ca87f..f4f8844 100644 +--- a/libmodman/test/main.hpp ++++ b/libmodman/test/main.hpp +@@ -20,6 +20,7 @@ + #ifndef MAIN_HPP_ + #define MAIN_HPP_ + ++#include + #include "../module_manager.hpp" + + using namespace std; diff --git a/vcpkg/ports/libmodman/portfile.cmake b/vcpkg/ports/libmodman/portfile.cmake new file mode 100644 index 0000000..35bedf9 --- /dev/null +++ b/vcpkg/ports/libmodman/portfile.cmake @@ -0,0 +1,43 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +# Enable static build in UNIX +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) +endif() + +set(LIBMODMAN_VER 2.0.1) + +vcpkg_download_distfile(ARCHIVE + URLS "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/libmodman/libmodman-${LIBMODMAN_VER}.zip" + FILENAME "libmodman-${LIBMODMAN_VER}.zip" + SHA512 1fecc0fa3637c4aa86d114f5bc991605172d39183fa0f39d8c7858ef5d0d894152025bd426de4dd017a41372d800bf73f53b2328c57b77352a508e12792729fa +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tests BUILD_TESTING +) + +vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH + PATCHES + fix-install-path.patch + fix-undefined-typeid.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/libmodman) +vcpkg_copy_pdbs() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake + ${CMAKE_CURRENT_LIST_DIR}/usage + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libmodman/usage b/vcpkg/ports/libmodman/usage new file mode 100644 index 0000000..220de42 --- /dev/null +++ b/vcpkg/ports/libmodman/usage @@ -0,0 +1,5 @@ +The package libmodman provides CMake targets: + + find_package(libmodman CONFIG REQUIRED) + target_include_directories(main PRIVATE ${LIBMODMAN_INCLUDE_DIR}) + target_link_libraries(main PRIVATE ${LIBMODMAN_LIBRARIES}) diff --git a/vcpkg/ports/libmodman/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/libmodman/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..f372257 --- /dev/null +++ b/vcpkg/ports/libmodman/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,6 @@ +set(LIBMODMAN_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${LIBMODMAN_PREV_MODULE_PATH}) diff --git a/vcpkg/ports/libmodplug/001-automagically-define-modplug-static.patch b/vcpkg/ports/libmodplug/001-automagically-define-modplug-static.patch new file mode 100644 index 0000000..d0df454 --- /dev/null +++ b/vcpkg/ports/libmodplug/001-automagically-define-modplug-static.patch @@ -0,0 +1,13 @@ +diff --git a/src/modplug.h b/src/modplug.h +index 3ffbf9d..fd19ae5 100644 +--- a/src/modplug.h ++++ b/src/modplug.h +@@ -11,6 +11,8 @@ + extern "C" { + #endif + ++#define MODPLUG_STATIC ++ + #if defined(_WIN32) || defined(__CYGWIN__) + # if defined(MODPLUG_BUILD) && defined(DLL_EXPORT) /* building libmodplug as a dll for windows */ + # define MODPLUG_EXPORT __declspec(dllexport) diff --git a/vcpkg/ports/libmodplug/002-detect_sinf.patch b/vcpkg/ports/libmodplug/002-detect_sinf.patch new file mode 100644 index 0000000..784e2e6 --- /dev/null +++ b/vcpkg/ports/libmodplug/002-detect_sinf.patch @@ -0,0 +1,35 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2ada51b..468f1a3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4,6 +4,7 @@ project(libmodplug) + add_definitions(-DMODPLUG_BUILD) + + include (CheckFunctionExists) ++include (CheckIncludeFile) + + include_directories(AFTER + src +@@ -11,6 +12,10 @@ include_directories(AFTER + ${PROJECT_BINARY_DIR} + ) + ++if (UNIX) ++ set (CMAKE_REQUIRED_LIBRARIES m) ++endif() ++ + if (WIN32) + add_definitions(-D_USE_MATH_DEFINES) + add_definitions(-DNOMINMAX) +@@ -44,6 +49,11 @@ if (WIN32 AND NOT (MINGW OR MSYS)) + "Compilation may fail if inttypes.h is not natively supported by the compiler." + "You can get inttypes.h from http://code.google.com/p/msinttypes/") + endif() ++else() ++ check_include_file("stdint.h" HAVE_STDINT) ++ if (HAVE_STDINT) ++ add_definitions(-DHAVE_STDINT_H) ++ endif() + endif() + + check_function_exists("setenv" HAVE_SETENV) diff --git a/vcpkg/ports/libmodplug/003-use-static-cast-for-ctype.patch b/vcpkg/ports/libmodplug/003-use-static-cast-for-ctype.patch new file mode 100644 index 0000000..2054e8a --- /dev/null +++ b/vcpkg/ports/libmodplug/003-use-static-cast-for-ctype.patch @@ -0,0 +1,14 @@ +diff --git a/src/load_abc.cpp b/src/load_abc.cpp +index ee79f39..874ab8f 100644 +--- a/src/load_abc.cpp ++++ b/src/load_abc.cpp +@@ -268,7 +268,8 @@ static void setenv(const char *name, const char *value, int overwrite) + #endif + + static int abc_isvalidchar(char c) { +- return(isalpha(c) || isdigit(c) || isspace(c) || c == '%' || c == ':'); ++ unsigned char u = static_cast(c); ++ return(isalpha(u) || isdigit(u) || isspace(u) || c == '%' || c == ':'); + } + #if 0 + static const char *abc_skipspace(const char *p) diff --git a/vcpkg/ports/libmodplug/CONTROL b/vcpkg/ports/libmodplug/CONTROL new file mode 100644 index 0000000..c8339b1 --- /dev/null +++ b/vcpkg/ports/libmodplug/CONTROL @@ -0,0 +1,5 @@ +Source: libmodplug +Version: 0.8.9.0 +Port-Version: 6 +Homepage: https://github.com/Konstanty/libmodplug +Description: The ModPlug mod file playing library. diff --git a/vcpkg/ports/libmodplug/portfile.cmake b/vcpkg/ports/libmodplug/portfile.cmake new file mode 100644 index 0000000..9cc8e5a --- /dev/null +++ b/vcpkg/ports/libmodplug/portfile.cmake @@ -0,0 +1,48 @@ +set(MODPLUG_HASH 5a39f5913d07ba3e61d8d5afdba00b70165da81d) + +include(vcpkg_common_functions) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_from_github(ARCHIVE + OUT_SOURCE_PATH SOURCE_PATH + REPO Konstanty/libmodplug + REF ${MODPLUG_HASH} + SHA512 c43bb3190b62c3a4e3636bba121b5593bbf8e6577ca9f2aa04d90b03730ea7fb590e640cdadeb565758b92e81187bc456e693fe37f1f4deace9b9f37556e3ba1 + PATCHES + "001-automagically-define-modplug-static.patch" + "002-detect_sinf.patch" + "003-use-static-cast-for-ctype.patch" + ) +else() + vcpkg_from_github(ARCHIVE + OUT_SOURCE_PATH SOURCE_PATH + REPO Konstanty/libmodplug + REF ${MODPLUG_HASH} + SHA512 c43bb3190b62c3a4e3636bba121b5593bbf8e6577ca9f2aa04d90b03730ea7fb590e640cdadeb565758b92e81187bc456e693fe37f1f4deace9b9f37556e3ba1 + PATCHES + "002-detect_sinf.patch" + "003-use-static-cast-for-ctype.patch" + ) +endif() + +vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} PREFER_NINJA) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic AND VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_TARGET_IS_MINGW) + set(BIN_NAME libmodplug.dll) + else() + set(BIN_NAME modplug.dll) + endif() + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/${BIN_NAME} ${CURRENT_PACKAGES_DIR}/bin/${BIN_NAME}) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/${BIN_NAME} ${CURRENT_PACKAGES_DIR}/debug/bin/${BIN_NAME}) + vcpkg_copy_pdbs() +endif() + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmodplug) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmodplug/COPYING ${CURRENT_PACKAGES_DIR}/share/libmodplug/copyright) diff --git a/vcpkg/ports/libmorton/CONTROL b/vcpkg/ports/libmorton/CONTROL new file mode 100644 index 0000000..bfbf6bf --- /dev/null +++ b/vcpkg/ports/libmorton/CONTROL @@ -0,0 +1,3 @@ +Source: libmorton +Version: 0.2 +Description: header-only library for encoding/decoding Morton codes in/from 2D/3D coordinates diff --git a/vcpkg/ports/libmorton/portfile.cmake b/vcpkg/ports/libmorton/portfile.cmake new file mode 100644 index 0000000..4738014 --- /dev/null +++ b/vcpkg/ports/libmorton/portfile.cmake @@ -0,0 +1,15 @@ +#header-only library +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Forceflow/libmorton + REF v0.2 + SHA512 04cf8332a1cee52eebfb25a46ac64517900704f62fe53ccf1d6a74c535ccac5af4e3ce2e0a5ce94ee850fadb429fe0d88d5a66901f16e4308341a621e599d33d + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmorton) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmorton/LICENSE ${CURRENT_PACKAGES_DIR}/share/libmorton/copyright) + +file(GLOB HEADER_FILES ${SOURCE_PATH}/libmorton/include/*.h) +file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/libmorton) diff --git a/vcpkg/ports/libmpeg2/0001-Add-naive-MSVC-support-to-sources.patch b/vcpkg/ports/libmpeg2/0001-Add-naive-MSVC-support-to-sources.patch new file mode 100644 index 0000000..1bbebff --- /dev/null +++ b/vcpkg/ports/libmpeg2/0001-Add-naive-MSVC-support-to-sources.patch @@ -0,0 +1,146 @@ +From ed3b6e4bca1fe5211e3d7ca06bbbf9b161c8bc19 Mon Sep 17 00:00:00 2001 +From: Michal Janiszewski +Date: Sat, 2 Nov 2019 14:50:53 -0700 +Subject: [PATCH] Add naive MSVC support to sources + +--- + libmpeg2/convert/rgb.c | 2 +- + libmpeg2/cpu_accel.c | 4 ++-- + libmpeg2/cpu_state.c | 4 ++-- + libmpeg2/idct.c | 2 +- + libmpeg2/motion_comp.c | 2 +- + libvo/video_out_dx.c | 6 +++--- + vc++/config.h | 2 ++ + 7 files changed, 12 insertions(+), 10 deletions(-) + +diff --git a/libmpeg2/convert/rgb.c b/libmpeg2/convert/rgb.c +index 8863b0b..db6f4e3 100644 +--- a/libmpeg2/convert/rgb.c ++++ b/libmpeg2/convert/rgb.c +@@ -499,7 +499,7 @@ static int rgb_internal (mpeg2convert_rgb_order_t order, unsigned int bpp, + int convert420 = 0; + int rgb_stride_min = ((bpp + 7) >> 3) * seq->width; + +-#ifdef ARCH_X86 ++#if !defined(_MSC_VER) && defined(ARCH_X86) + if (!copy && (accel & MPEG2_ACCEL_X86_MMXEXT)) { + convert420 = 0; + copy = mpeg2convert_rgb_mmxext (order, bpp, seq); +diff --git a/libmpeg2/cpu_accel.c b/libmpeg2/cpu_accel.c +index 9b24610..a922df1 100644 +--- a/libmpeg2/cpu_accel.c ++++ b/libmpeg2/cpu_accel.c +@@ -29,7 +29,7 @@ + #include "attributes.h" + #include "mpeg2_internal.h" + +-#if defined(ARCH_X86) || defined(ARCH_X86_64) ++#if !defined(_MSC_VER) && (defined(ARCH_X86) || defined(ARCH_X86_64)) + static inline uint32_t arch_accel (uint32_t accel) + { + if (accel & (MPEG2_ACCEL_X86_3DNOW | MPEG2_ACCEL_X86_MMXEXT)) +@@ -253,7 +253,7 @@ static inline uint32_t arch_accel (uint32_t accel) + + uint32_t mpeg2_detect_accel (uint32_t accel) + { +-#if defined (ARCH_X86) || defined (ARCH_X86_64) || defined (ARCH_PPC) || defined (ARCH_ALPHA) || defined (ARCH_SPARC) ++#if !defined(_MSC_VER) && (defined (ARCH_X86) || defined (ARCH_X86_64) || defined (ARCH_PPC) || defined (ARCH_ALPHA) || defined (ARCH_SPARC)) + accel = arch_accel (accel); + #endif + return accel; +diff --git a/libmpeg2/cpu_state.c b/libmpeg2/cpu_state.c +index 2f2f64a..f4966c1 100644 +--- a/libmpeg2/cpu_state.c ++++ b/libmpeg2/cpu_state.c +@@ -36,7 +36,7 @@ + void (* mpeg2_cpu_state_save) (cpu_state_t * state) = NULL; + void (* mpeg2_cpu_state_restore) (cpu_state_t * state) = NULL; + +-#if defined(ARCH_X86) || defined(ARCH_X86_64) ++#if !defined(_MSC_VER) && (defined(ARCH_X86) || defined(ARCH_X86_64)) + static void state_restore_mmx (cpu_state_t * state) + { + emms (); +@@ -115,7 +115,7 @@ static void state_restore_altivec (cpu_state_t * state) + + void mpeg2_cpu_state_init (uint32_t accel) + { +-#if defined(ARCH_X86) || defined(ARCH_X86_64) ++#if !defined(_MSC_VER) && (defined(ARCH_X86) || defined(ARCH_X86_64)) + if (accel & MPEG2_ACCEL_X86_MMX) { + mpeg2_cpu_state_restore = state_restore_mmx; + } +diff --git a/libmpeg2/idct.c b/libmpeg2/idct.c +index 81c57e0..a057bf7 100644 +--- a/libmpeg2/idct.c ++++ b/libmpeg2/idct.c +@@ -235,7 +235,7 @@ static void mpeg2_idct_add_c (const int last, int16_t * block, + + void mpeg2_idct_init (uint32_t accel) + { +-#ifdef ARCH_X86 ++#if !defined(_MSC_VER) && defined(ARCH_X86) + if (accel & MPEG2_ACCEL_X86_SSE2) { + mpeg2_idct_copy = mpeg2_idct_copy_sse2; + mpeg2_idct_add = mpeg2_idct_add_sse2; +diff --git a/libmpeg2/motion_comp.c b/libmpeg2/motion_comp.c +index 7aed113..b00a32d 100644 +--- a/libmpeg2/motion_comp.c ++++ b/libmpeg2/motion_comp.c +@@ -33,7 +33,7 @@ mpeg2_mc_t mpeg2_mc; + + void mpeg2_mc_init (uint32_t accel) + { +-#ifdef ARCH_X86 ++#if !defined(_MSC_VER) && defined(ARCH_X86) + if (accel & MPEG2_ACCEL_X86_MMXEXT) + mpeg2_mc = mpeg2_mc_mmxext; + else if (accel & MPEG2_ACCEL_X86_3DNOW) +diff --git a/libvo/video_out_dx.c b/libvo/video_out_dx.c +index 36de68a..0797cdc 100644 +--- a/libvo/video_out_dx.c ++++ b/libvo/video_out_dx.c +@@ -82,7 +82,7 @@ static void update_overlay (dx_instance_t * instance) + dwFlags, &ddofx); + } + +-static long FAR PASCAL event_procedure (HWND hwnd, UINT message, ++static LRESULT FAR PASCAL event_procedure (HWND hwnd, UINT message, + WPARAM wParam, LPARAM lParam) + { + RECT rect_window; +@@ -92,7 +92,7 @@ static long FAR PASCAL event_procedure (HWND hwnd, UINT message, + switch (message) { + + case WM_WINDOWPOSCHANGED: +- instance = (dx_instance_t *) GetWindowLong (hwnd, GWL_USERDATA); ++ instance = (dx_instance_t *) GetWindowLongPtr (hwnd, GWLP_USERDATA); + + /* update the window position and size */ + point_window.x = 0; +@@ -173,7 +173,7 @@ static int create_window (dx_instance_t * instance) + /* store a directx_instance pointer into the window local storage + * (for later use in event_handler). + * We need to use SetWindowLongPtr when it is available in mingw */ +- SetWindowLong (instance->window, GWL_USERDATA, (LONG) instance); ++ SetWindowLongPtr (instance->window, GWLP_USERDATA, (LONG_PTR) instance); + + ShowWindow (instance->window, SW_SHOW); + +diff --git a/vc++/config.h b/vc++/config.h +index 93719f0..a03cce6 100644 +--- a/vc++/config.h ++++ b/vc++/config.h +@@ -16,7 +16,9 @@ + /* #undef ARCH_SPARC */ + + /* x86 architecture */ ++#if defined(_M_AMD64) || defined(_M_IX86) + #define ARCH_X86 ++#endif + + /* maximum supported data alignment */ + /* #undef ATTRIBUTE_ALIGNED_MAX */ +-- +2.25.0 + diff --git a/vcpkg/ports/libmpeg2/CMakeLists.txt b/vcpkg/ports/libmpeg2/CMakeLists.txt new file mode 100644 index 0000000..88c0c87 --- /dev/null +++ b/vcpkg/ports/libmpeg2/CMakeLists.txt @@ -0,0 +1,108 @@ +cmake_minimum_required(VERSION 3.2) +project(libmpeg2) + +option(TOOLS "Build libmpeg2 tools" OFF) + +set(MPEG2_SOURCE_FILES + libmpeg2/alloc.c + libmpeg2/cpu_accel.c + libmpeg2/cpu_state.c + libmpeg2/decode.c + libmpeg2/header.c + libmpeg2/idct.c + libmpeg2/idct_alpha.c + libmpeg2/idct_altivec.c + #libmpeg2/idct_mmx.c + libmpeg2/motion_comp.c + libmpeg2/motion_comp_alpha.c + libmpeg2/motion_comp_altivec.c + libmpeg2/motion_comp_arm.c + #libmpeg2/motion_comp_mmx.c + libmpeg2/motion_comp_vis.c + libmpeg2/slice.c + ) +set(VO_SOURCE_FILES + libvo/video_out.c + libvo/video_out_dx.c + libvo/video_out_null.c + libvo/video_out_pgm.c + libvo/video_out_sdl.c + libvo/video_out_x11.c + ) +set(MPEG2_CONVERT_SOURCES + libmpeg2/convert/rgb.c + #libmpeg2/convert/rgb_mmx.c + libmpeg2/convert/rgb_vis.c + libmpeg2/convert/uyvy.c + ) +set(GETOPT_FILES + src/getopt.c + ) +set(HEADERS + include/mpeg2.h + include/mpeg2convert.h + ) + +add_library(mpeg2 ${MPEG2_SOURCE_FILES}) +add_library(mpeg2convert ${MPEG2_CONVERT_SOURCES}) +add_library(getopt STATIC ${GETOPT_FILES}) +add_library(vo STATIC ${VO_SOURCE_FILES}) + +target_include_directories(mpeg2convert PUBLIC + "${CMAKE_SOURCE_DIR}/vc++" + "${CMAKE_SOURCE_DIR}/include" + ) +target_include_directories(getopt PUBLIC + "${CMAKE_SOURCE_DIR}/vc++" + "${CMAKE_SOURCE_DIR}/include" + ) +target_include_directories(vo PUBLIC + "${CMAKE_SOURCE_DIR}/vc++" + "${CMAKE_SOURCE_DIR}/include" + ) +target_include_directories(mpeg2 PUBLIC + "${CMAKE_SOURCE_DIR}/vc++" + "${CMAKE_SOURCE_DIR}/include" + ) +target_include_directories(mpeg2 INTERFACE + "${CMAKE_SOURCE_DIR}/include" + ) + +target_compile_definitions(getopt PUBLIC HAVE_CONFIG_H) +target_link_libraries(vo mpeg2convert) + +if (TOOLS) + add_executable(mpeg2dec src/mpeg2dec.c src/dump_state.c src/gettimeofday.c) + add_executable(extract_mpeg2 src/extract_mpeg2.c) + add_executable(corrupt_mpeg2 src/corrupt_mpeg2.c) + + target_compile_definitions(extract_mpeg2 PUBLIC HAVE_CONFIG_H) + target_compile_definitions(corrupt_mpeg2 PUBLIC HAVE_CONFIG_H) + + target_link_libraries(mpeg2dec PRIVATE getopt vo mpeg2convert mpeg2 gdi32) + target_link_libraries(extract_mpeg2 PRIVATE getopt) + target_link_libraries(corrupt_mpeg2 PRIVATE getopt) + + target_include_directories(mpeg2dec PUBLIC + "${CMAKE_SOURCE_DIR}/vc++" + "${CMAKE_SOURCE_DIR}/include" + "${CMAKE_SOURCE_DIR}/src" + ) + target_include_directories(extract_mpeg2 PUBLIC + "${CMAKE_SOURCE_DIR}/vc++" + "${CMAKE_SOURCE_DIR}/include" + "${CMAKE_SOURCE_DIR}/src" + ) + target_include_directories(corrupt_mpeg2 PUBLIC + "${CMAKE_SOURCE_DIR}/vc++" + "${CMAKE_SOURCE_DIR}/include" + "${CMAKE_SOURCE_DIR}/src" + ) +endif (TOOLS) + +install(TARGETS mpeg2 + EXPORT libmpeg2 + LIBRARY DESTINATION lib +) + +install(FILES ${HEADERS} DESTINATION "include/mpeg2dec") diff --git a/vcpkg/ports/libmpeg2/CONTROL b/vcpkg/ports/libmpeg2/CONTROL new file mode 100644 index 0000000..380cc64 --- /dev/null +++ b/vcpkg/ports/libmpeg2/CONTROL @@ -0,0 +1,8 @@ +Source: libmpeg2 +Version: 0.5.1 +Homepage: http://libmpeg2.sourceforge.net/ +Description: a free MPEG-2 video stream decoder +Supports: !(linux|osx|uwp) + +Feature: tools +Description: Build tools provided with libmpeg2 diff --git a/vcpkg/ports/libmpeg2/portfile.cmake b/vcpkg/ports/libmpeg2/portfile.cmake new file mode 100644 index 0000000..3813e0d --- /dev/null +++ b/vcpkg/ports/libmpeg2/portfile.cmake @@ -0,0 +1,38 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports Windows Desktop platform." ON_TARGET "Linux" "OSX" "uwp") +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +# There is archived version of releases available at https://github.com/janisozaur/libmpeg2 +vcpkg_download_distfile(ARCHIVE + URLS "http://libmpeg2.sourceforge.net/files/libmpeg2-0.5.1.tar.gz" + FILENAME "libmpeg2-0.5.1.tar.gz" + SHA512 3648a2b3d7e2056d5adb328acd2fb983a1fa9a05ccb6f9388cc686c819445421811f42e8439418a0491a13080977f074a0d8bf8fa6bc101ff245ddea65a46fbc +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + 0001-Add-naive-MSVC-support-to-sources.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + tools TOOLS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +# # Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmpeg2 RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/libmspack/CMakeLists.txt b/vcpkg/ports/libmspack/CMakeLists.txt new file mode 100644 index 0000000..fdff795 --- /dev/null +++ b/vcpkg/ports/libmspack/CMakeLists.txt @@ -0,0 +1,50 @@ +cmake_minimum_required(VERSION 3.8) + +project(libmspack C) + +add_definitions(-DHAVE_CONFIG_H) + +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) +endif() + +# List the source files +set(LIB_SRC mspack/cabc.c + mspack/cabd.c + mspack/chmc.c + mspack/chmd.c + mspack/crc32.c + mspack/hlpc.c + mspack/hlpd.c + mspack/kwajc.c + mspack/kwajd.c + mspack/litc.c + mspack/litd.c + mspack/lzssd.c + mspack/lzxc.c + mspack/lzxd.c + mspack/mszipc.c + mspack/mszipd.c + mspack/oabc.c + mspack/oabd.c + mspack/qtmd.c + mspack/system.c + mspack/szddc.c + mspack/szddd.c +) + +if(BUILD_SHARED_LIBS) + set(LIB_DEF libmspack.def) +endif() + +add_library(libmspack ${LIB_SRC} ${LIB_DEF}) + +target_include_directories(libmspack PRIVATE . ./mspack) + +install(TARGETS libmspack + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +install(FILES mspack/mspack.h DESTINATION include) diff --git a/vcpkg/ports/libmspack/CONTROL b/vcpkg/ports/libmspack/CONTROL new file mode 100644 index 0000000..4bde920 --- /dev/null +++ b/vcpkg/ports/libmspack/CONTROL @@ -0,0 +1,4 @@ +Source: libmspack +Version: 0.10.1-3 +Homepage: https://www.cabextract.org.uk/libmspack +Description: libmspack is a portable library for some loosely related Microsoft compression formats. diff --git a/vcpkg/ports/libmspack/config.h b/vcpkg/ports/libmspack/config.h new file mode 100644 index 0000000..54c05ae --- /dev/null +++ b/vcpkg/ports/libmspack/config.h @@ -0,0 +1,4 @@ +#define HAVE_LIMITS_H 1 +#define HAVE_INTTYPES_H 1 + +#define HAVE_TOWLOWER 1 diff --git a/vcpkg/ports/libmspack/libmspack.def b/vcpkg/ports/libmspack/libmspack.def new file mode 100644 index 0000000..129637f --- /dev/null +++ b/vcpkg/ports/libmspack/libmspack.def @@ -0,0 +1,35 @@ +EXPORTS + +mspack_create_cab_compressor +mspack_create_chm_compressor +mspack_create_lit_compressor +mspack_create_hlp_compressor +mspack_create_szdd_compressor +mspack_create_kwaj_compressor +mspack_create_oab_compressor + +mspack_create_cab_decompressor +mspack_create_chm_decompressor +mspack_create_lit_decompressor +mspack_create_hlp_decompressor +mspack_create_szdd_decompressor +mspack_create_kwaj_decompressor +mspack_create_oab_decompressor + +mspack_destroy_cab_compressor +mspack_destroy_cab_decompressor +mspack_destroy_chm_compressor +mspack_destroy_chm_decompressor +mspack_destroy_lit_compressor +mspack_destroy_lit_decompressor +mspack_destroy_hlp_compressor +mspack_destroy_hlp_decompressor +mspack_destroy_szdd_compressor +mspack_destroy_szdd_decompressor +mspack_destroy_kwaj_compressor +mspack_destroy_kwaj_decompressor +mspack_destroy_oab_compressor +mspack_destroy_oab_decompressor + +mspack_sys_selftest_internal +mspack_version diff --git a/vcpkg/ports/libmspack/portfile.cmake b/vcpkg/ports/libmspack/portfile.cmake new file mode 100644 index 0000000..3da56e9 --- /dev/null +++ b/vcpkg/ports/libmspack/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +set(LIB_NAME libmspack) +set(LIB_VERSION 0.10.1alpha) +set(LIB_FILENAME ${LIB_NAME}-${LIB_VERSION}.tar.gz) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.cabextract.org.uk/libmspack/${LIB_FILENAME}" + FILENAME "${LIB_FILENAME}" + SHA512 a7b5f7caa49190c5021f3e768b92f2e51cc0ce685c9ab6ed6fb36de885c73231b58d47a8a3b5c5aa5c9ac56c25c500eb683d84dbf11f09f97f6cb4fff5adc245 +) + +vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/libmspack.def DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# License and man +file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${LIB_NAME} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/libmupdf/CMakeLists.txt b/vcpkg/ports/libmupdf/CMakeLists.txt new file mode 100644 index 0000000..6800bea --- /dev/null +++ b/vcpkg/ports/libmupdf/CMakeLists.txt @@ -0,0 +1,65 @@ +cmake_minimum_required(VERSION 3.9) +project(libmupdf C) + +set(CMAKE_DEBUG_POSTFIX d) + +if(WIN32) + execute_process( + COMMAND "cmd.exe" "/c" "platform\\win32\\generate.bat" + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + ) +else() + find_program(MAKE_EXE NAMES make REQUIRED) + execute_process( + COMMAND ${MAKE_EXE} "generate" + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" + ) +endif() + + +find_package(freetype NO_MODULE REQUIRED) +find_package(JPEG REQUIRED) +find_path(HARFBUZZ_INCLUDE hb.h PATH_SUFFIXES harfbuzz) +find_library(HARFBUZZ_LIBRARIES harfbuzz) +find_package(ZLIB REQUIRED) +find_package(OpenJPEG CONFIG REQUIRED) +find_library(JBIG2DEC_LIB NAMES jbig2decd jbig2dec) + +file(GLOB_RECURSE SOURCES "source/*.c" "generated/*.c") +list(FILTER SOURCES EXCLUDE REGEX "source/tools/[a-z]*\\.c$") +list(FILTER SOURCES EXCLUDE REGEX "source/tests/.*.c$") + +add_library(libmupdf ${SOURCES}) + +if(WIN32) + target_compile_definitions(libmupdf PRIVATE -DSHARE_JPEG -DFZ_ENABLE_JS=0 -DFZ_ENABLE_ICC=0) +else() + target_compile_definitions(libmupdf PRIVATE -DSHARE_JPEG -DFZ_ENABLE_JS=0 -DFZ_ENABLE_ICC=0 -DHAVE_PTHREAD=1) +endif() +target_include_directories(libmupdf + PUBLIC + include + PRIVATE + generated + ${JPEG_INCLUDE_DIR} + ${HARFBUZZ_INCLUDE} +) +target_link_libraries(libmupdf PRIVATE + openjp2 + freetype + ${JPEG_LIBRARIES} + ${HARFBUZZ_LIBRARIES} + ${JBIG2DEC_LIB} + ZLIB::ZLIB +) + +install(TARGETS libmupdf + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(BUILD_EXAMPLES) + add_executable(mu-office-test source/tests/mu-office-test.c) + target_link_libraries(mu-office-test PRIVATE libmupdf) +endif() diff --git a/vcpkg/ports/libmupdf/CONTROL b/vcpkg/ports/libmupdf/CONTROL new file mode 100644 index 0000000..e18d966 --- /dev/null +++ b/vcpkg/ports/libmupdf/CONTROL @@ -0,0 +1,6 @@ +Source: libmupdf +Version: 1.17.0 +Build-Depends: freetype, libjpeg-turbo, harfbuzz, zlib, curl, glfw3, openjpeg, jbig2dec +Homepage: https://github.com/ArtifexSoftware/mupdf +Description: a lightweight PDF, XPS, and E-book library +Supports: !osx diff --git a/vcpkg/ports/libmupdf/portfile.cmake b/vcpkg/ports/libmupdf/portfile.cmake new file mode 100644 index 0000000..0ecbeaf --- /dev/null +++ b/vcpkg/ports/libmupdf/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_fail_port_install(ON_TARGET "osx") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ArtifexSoftware/mupdf + REF 96751b25462f83d6e16a9afaf8980b0c3f979c8b # 1.17.0 + SHA512 ee8603a606895c7362fc44905f627f2a05e3c9d8a682b27051b5c67dac971719e315a08da3cd51107024bcc67d7d43cafcb9a6ad8b534c89a55982001f400537 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + DISABLE_PARALLEL_CONFIGURE + PREFER_NINJA + OPTIONS + -DBUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +file(COPY ${SOURCE_PATH}/include/mupdf DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libmysql/CONTROL b/vcpkg/ports/libmysql/CONTROL new file mode 100644 index 0000000..3979b93 --- /dev/null +++ b/vcpkg/ports/libmysql/CONTROL @@ -0,0 +1,6 @@ +Source: libmysql +Version: 8.0.20 +Homepage: https://github.com/mysql/mysql-server +Build-Depends: boost-algorithm, boost-geometry, boost-optional, boost-functional, boost-graph, openssl, icu, libevent, lz4, zlib +Description: A MySQL client library for C development. +Supports: !(windows&x86)&!uwp \ No newline at end of file diff --git a/vcpkg/ports/libmysql/ignore-boost-version.patch b/vcpkg/ports/libmysql/ignore-boost-version.patch new file mode 100644 index 0000000..99cee24 --- /dev/null +++ b/vcpkg/ports/libmysql/ignore-boost-version.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/boost.cmake b/cmake/boost.cmake +index 592a67f..202a770 100644 +--- a/cmake/boost.cmake ++++ b/cmake/boost.cmake +@@ -297,7 +297,7 @@ IF(NOT BOOST_MAJOR_VERSION EQUAL 10) + COULD_NOT_FIND_BOOST() + ENDIF() + +-IF(NOT BOOST_MINOR_VERSION EQUAL 70) ++IF(NOT BOOST_MINOR_VERSION EQUAL 70 AND NOT IGNORE_BOOST_VERSION) + MESSAGE(WARNING "Boost minor version found is ${BOOST_MINOR_VERSION} " + "we need 70" + ) diff --git a/vcpkg/ports/libmysql/portfile.cmake b/vcpkg/ports/libmysql/portfile.cmake new file mode 100644 index 0000000..b943805 --- /dev/null +++ b/vcpkg/ports/libmysql/portfile.cmake @@ -0,0 +1,114 @@ +vcpkg_fail_port_install(ON_TARGET "UWP" ON_ARCH "x86") + +if (EXISTS "${CURRENT_INSTALLED_DIR}/include/mysql/mysql.h") + message(FATAL_ERROR "FATAL ERROR: ${PORT} and libmariadb are incompatible.") +endif() + +if (VCPKG_TARGET_IS_LINUX) + message(WARNING "${PORT} needs ncurses on LINUX, please install ncurses first.\nOn Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mysql/mysql-server + REF 7d10c82196c8e45554f27c00681474a9fb86d137 # 8.0.20 + SHA512 9f5e8cc254ea2a4cf76313287c7bb6fc693400810464dd2901e67d51ecb27f8916009464fd8aed8365c3038314b845b3d517db6e82ae5c7908612f0b3b72335f + HEAD_REF master + PATCHES + ignore-boost-version.patch + system-libs.patch + rename-version.patch +) + +file(REMOVE_RECURSE ${SOURCE_PATH}/include/boost_1_70_0) + +set(STACK_DIRECTION) +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(STACK_DIRECTION -DSTACK_DIRECTION=-1) +endif() + +#Skip the version check for Visual Studio +if(VCPKG_TARGET_IS_WINDOWS) + set(FORCE_UNSUPPORTED_COMPILER 1) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DWITHOUT_SERVER=ON + -DWITH_UNIT_TESTS=OFF + -DENABLED_PROFILING=OFF + -DWIX_DIR=OFF + ${STACK_DIRECTION} + -DIGNORE_BOOST_VERSION=ON + -DWITH_SSL=system + -DWITH_ICU=system + -DWITH_LIBEVENT=system + -DWITH_LZ4=system + -DWITH_ZLIB=system + -DFORCE_UNSUPPORTED_COMPILER=${FORCE_UNSUPPORTED_COMPILER} +) + +vcpkg_install_cmake(ADD_BIN_TO_PATH) + +# delete debug headers +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include) + +# switch mysql into /mysql +file(RENAME ${CURRENT_PACKAGES_DIR}/include ${CURRENT_PACKAGES_DIR}/include2) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) +file(RENAME ${CURRENT_PACKAGES_DIR}/include2 ${CURRENT_PACKAGES_DIR}/include/mysql) + +## delete useless vcruntime/scripts/bin/msg file +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/share + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/bin + ${CURRENT_PACKAGES_DIR}/docs + ${CURRENT_PACKAGES_DIR}/debug/docs + ${CURRENT_PACKAGES_DIR}/lib/debug + ${CURRENT_PACKAGES_DIR}/lib/plugin/debug) + +## remove misc files +file(REMOVE + ${CURRENT_PACKAGES_DIR}/LICENSE + ${CURRENT_PACKAGES_DIR}/README + ${CURRENT_PACKAGES_DIR}/debug/LICENSE + ${CURRENT_PACKAGES_DIR}/debug/README) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE + ${CURRENT_PACKAGES_DIR}/lib/libmysql.lib + ${CURRENT_PACKAGES_DIR}/lib/libmysql.dll + ${CURRENT_PACKAGES_DIR}/lib/libmysql.pdb + ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.dll + ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.pdb) +else() + file(REMOVE + ${CURRENT_PACKAGES_DIR}/lib/mysqlclient.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/mysqlclient.lib) + + # correct the dll directory + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file (RENAME ${CURRENT_PACKAGES_DIR}/lib/libmysql.dll ${CURRENT_PACKAGES_DIR}/bin/libmysql.dll) + file (RENAME ${CURRENT_PACKAGES_DIR}/lib/libmysql.pdb ${CURRENT_PACKAGES_DIR}/bin/libmysql.pdb) + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file (RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libmysql.dll) + file (RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/libmysql.pdb) + endif() +endif() + +file(READ ${CURRENT_PACKAGES_DIR}/include/mysql/mysql_com.h _contents) +string(REPLACE "#include " "#include \"mysql/udf_registration_types.h\"" _contents "${_contents}") +file(WRITE ${CURRENT_PACKAGES_DIR}/include/mysql/mysql_com.h "${_contents}") + +# copy license +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libmysql/rename-version.patch b/vcpkg/ports/libmysql/rename-version.patch new file mode 100644 index 0000000..1559838 --- /dev/null +++ b/vcpkg/ports/libmysql/rename-version.patch @@ -0,0 +1,26 @@ +diff --git a/VERSION b/VERSION.txt +similarity index 100% +rename from VERSION +rename to VERSION.txt +diff --git a/cmake/mysql_version.cmake b/cmake/mysql_version.cmake +index bed6e9f02e2..a924ef09bac 100644 +--- a/cmake/mysql_version.cmake ++++ b/cmake/mysql_version.cmake +@@ -30,7 +30,7 @@ SET(PROTOCOL_VERSION "10") + + # Generate "something" to trigger cmake rerun when VERSION changes + CONFIGURE_FILE( +- ${CMAKE_SOURCE_DIR}/VERSION ++ ${CMAKE_SOURCE_DIR}/VERSION.txt + ${CMAKE_BINARY_DIR}/VERSION.dep + ) + +@@ -38,7 +38,7 @@ CONFIGURE_FILE( + + MACRO(MYSQL_GET_CONFIG_VALUE keyword var) + IF(NOT ${var}) +- FILE (STRINGS ${CMAKE_SOURCE_DIR}/VERSION str REGEX "^[ ]*${keyword}=") ++ FILE (STRINGS ${CMAKE_SOURCE_DIR}/VERSION.txt str REGEX "^[ ]*${keyword}=") + IF(str) + STRING(REPLACE "${keyword}=" "" str ${str}) + STRING(REGEX REPLACE "[ ].*" "" str "${str}") diff --git a/vcpkg/ports/libmysql/system-libs.patch b/vcpkg/ports/libmysql/system-libs.patch new file mode 100644 index 0000000..2715823 --- /dev/null +++ b/vcpkg/ports/libmysql/system-libs.patch @@ -0,0 +1,131 @@ +diff --git a/cmake/icu.cmake b/cmake/icu.cmake +index fde3a75..9f694b9 100644 +--- a/cmake/icu.cmake ++++ b/cmake/icu.cmake +@@ -38,49 +38,11 @@ + # install_root is either 'system' or is assumed to be a path. + # + MACRO (FIND_ICU install_root) +- IF("${install_root}" STREQUAL "system") +- SET(EXTRA_FIND_LIB_ARGS) +- SET(EXTRA_FIND_INC_ARGS) +- ELSE() +- SET(EXTRA_FIND_LIB_ARGS HINTS "${install_root}" +- PATH_SUFFIXES "lib" "lib64" NO_DEFAULT_PATH) +- SET(EXTRA_FIND_INC_ARGS HINTS "${install_root}" +- PATH_SUFFIXES "include" NO_DEFAULT_PATH) +- ENDIF() +- +- FIND_PATH(ICU_INCLUDE_DIR NAMES unicode/regex.h ${EXTRA_FIND_INC_ARGS}) +- IF (NOT ICU_INCLUDE_DIR) +- MESSAGE(FATAL_ERROR "Cannot find ICU regular expression headers") +- ENDIF() +- +- IF(WIN32) +- SET(ICU_LIBS icuuc icuio icudt icuin) +- ELSE() +- SET(ICU_LIBS icuuc icuio icudata icui18n) +- ENDIF() +- +- SET(ICU_SYSTEM_LIBRARIES) +- FOREACH(ICU_LIB ${ICU_LIBS}) +- UNSET(ICU_LIB_PATH CACHE) +- FIND_LIBRARY(ICU_LIB_PATH NAMES ${ICU_LIB} ${EXTRA_FIND_LIB_ARGS}) +- IF(NOT ICU_LIB_PATH) +- MESSAGE(FATAL_ERROR "Cannot find the ICU library ${ICU_LIB}") +- ENDIF() +- LIST(APPEND ICU_SYSTEM_LIBRARIES ${ICU_LIB_PATH}) +- ENDFOREACH() +- +- # To do: If we include the path in ICU_INCLUDE_DIR, it leads to GUnit +- # picking up the wrong regex.h header. And it looks like we don't need it; +- # at least on Linux, the header gets installed in an OS path anyway. +- IF(NOT "${install_root}" STREQUAL "system") +- SET(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR}) +- ENDIF() +- +- SET(ICU_LIBRARIES ${ICU_SYSTEM_LIBRARIES}) +- +- # Needed for version information. +- SET(ICU_COMMON_DIR ${ICU_INCLUDE_DIR}) + ++ find_package(ICU REQUIRED COMPONENTS uc io dt in) ++ set(ICU_SYSTEM_LIBRARIES ICU::uc ICU::io ICU::dt ICU::in) ++ set(ICU_COMMON_DIR ${ICU_INCLUDE_DIR}) ++ SET(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR}) + ENDMACRO() + + MACRO (MYSQL_USE_BUNDLED_ICU) +diff --git a/cmake/lz4.cmake b/cmake/lz4.cmake +index 9aad130..68cbaba 100644 +--- a/cmake/lz4.cmake ++++ b/cmake/lz4.cmake +@@ -25,7 +25,7 @@ + + MACRO (FIND_SYSTEM_LZ4) + FIND_PATH(PATH_TO_LZ4 NAMES lz4frame.h) +- FIND_LIBRARY(LZ4_SYSTEM_LIBRARY NAMES lz4) ++ FIND_LIBRARY(LZ4_SYSTEM_LIBRARY NAMES lz4d lz4) + IF (PATH_TO_LZ4 AND LZ4_SYSTEM_LIBRARY) + SET(SYSTEM_LZ4_FOUND 1) + INCLUDE_DIRECTORIES(SYSTEM ${PATH_TO_LZ4}) +diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake +index 52feade..4a0237a 100644 +--- a/cmake/ssl.cmake ++++ b/cmake/ssl.cmake +@@ -93,7 +93,20 @@ ENDMACRO() + # Provides the following configure options: + # WITH_SSL=[yes|system|] + MACRO (MYSQL_CHECK_SSL) ++ find_package(OpenSSL REQUIRED) ++ set(OPENSSL_LIBRARY ${OPENSSL_SSL_LIBRARY} CACHE STRING "") ++ set(CRYPTO_LIBRARY ${OPENSSL_CRYPTO_LIBRARY} CACHE STRING "") ++ FIND_PROGRAM(OPENSSL_EXECUTABLE openssl ++ DOC "path to the openssl executable") ++ SET(SSL_DEFINES "-DHAVE_OPENSSL") ++ set(SSL_LIBRARIES ${OPENSSL_LIBRARIES}) ++ if(NOT WIN32) ++ find_package(Threads REQUIRED) ++ list(APPEND SSL_LIBRARIES Threads::Threads) ++ endif() ++ENDMACRO() + ++MACRO (MYSQL_CHECK_SSL_OLD) + IF(NOT WITH_SSL) + SET(WITH_SSL "system" CACHE STRING ${WITH_SSL_DOC_STRING} FORCE) + ENDIF() +diff --git a/cmake/zlib.cmake b/cmake/zlib.cmake +index 26c56fe..65bebb4 100644 +--- a/cmake/zlib.cmake ++++ b/cmake/zlib.cmake +@@ -51,28 +51,7 @@ MACRO (MYSQL_CHECK_ZLIB_WITH_COMPRESS) + IF(WITH_ZLIB STREQUAL "bundled") + MYSQL_USE_BUNDLED_ZLIB() + ELSE() +- SET(ZLIB_FIND_QUIETLY TRUE) +- INCLUDE(FindZLIB) +- IF(ZLIB_FOUND) +- INCLUDE(CheckFunctionExists) +- SET(SAVE_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}) +- SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} z) +- CHECK_FUNCTION_EXISTS(crc32 HAVE_CRC32) +- CHECK_FUNCTION_EXISTS(compressBound HAVE_COMPRESSBOUND) +- CHECK_FUNCTION_EXISTS(deflateBound HAVE_DEFLATEBOUND) +- SET(CMAKE_REQUIRED_LIBRARIES ${SAVE_CMAKE_REQUIRED_LIBRARIES}) +- IF(HAVE_CRC32 AND HAVE_COMPRESSBOUND AND HAVE_DEFLATEBOUND) +- SET(ZLIB_LIBRARY ${ZLIB_LIBRARIES} CACHE INTERNAL "System zlib library") +- SET(WITH_ZLIB "system" CACHE STRING +- "Which zlib to use (possible values are 'bundled' or 'system')") +- SET(ZLIB_SOURCES "") +- ELSE() +- SET(ZLIB_FOUND FALSE CACHE INTERNAL "Zlib found but not usable") +- MESSAGE(STATUS "system zlib found but not usable") +- ENDIF() +- ENDIF() +- IF(NOT ZLIB_FOUND) +- MYSQL_USE_BUNDLED_ZLIB() +- ENDIF() ++ find_package(ZLIB REQUIRED) ++ SET(ZLIB_LIBRARY ZLIB::ZLIB CACHE INTERNAL "System zlib library") + ENDIF() + ENDMACRO() diff --git a/vcpkg/ports/libnice/CMakeLists.txt b/vcpkg/ports/libnice/CMakeLists.txt new file mode 100644 index 0000000..da4c2ca --- /dev/null +++ b/vcpkg/ports/libnice/CMakeLists.txt @@ -0,0 +1,148 @@ +cmake_minimum_required(VERSION 3.0) +project(libnice + LANGUAGES C + VERSION 0.1.15) +SET (this_target libnice) + +add_definitions( + -D_CRT_SECURE_NO_WARNINGS + -D_SCL_SECURE_NO_WARNINGS + -DHAVE_OPENSSL + -DPACKAGE_STRING="${PROJECT_VERSION}") + +configure_file(${CMAKE_SOURCE_DIR}/win32/vs9/config.h ${CMAKE_SOURCE_DIR}/config.h COPYONLY) +configure_file(${CMAKE_SOURCE_DIR}/win32/vs9/libnice.def ${CMAKE_SOURCE_DIR}/libnice.def COPYONLY) + +find_path(GLIB_INCLUDE_DIR glib.h) +find_library(GLIB_LIBRARY glib-2.0) +find_library(GOBJECT_LIBRARY gobject-2.0) +find_library(GIO_LIBRARY gio-2.0) +find_library(IPHLPAPI_LIBRARY iphlpapi) +find_library(WS2_32_LIB ws2_32) +find_library(ADVAPI32_LIB advapi32) +find_package(OpenSSL REQUIRED) +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/agent + ${CMAKE_CURRENT_SOURCE_DIR}/random + ${CMAKE_CURRENT_SOURCE_DIR}/socket + ${CMAKE_CURRENT_SOURCE_DIR}/stun + ${GLIB_INCLUDE_DIR}) + + +SET (SRCS + ./agent/address.c + ./agent/agent-enum-types.c + ./agent/agent.c + ./agent/candidate.c + ./agent/component.c + ./agent/conncheck.c + ./agent/debug.c + ./agent/discovery.c + ./agent/inputstream.c + ./agent/interfaces.c + ./agent/iostream.c + ./agent/outputstream.c + ./agent/pseudotcp.c + ./agent/stream.c + ./random/random-glib.c + ./random/random.c + ./random/test.c + ./socket/http.c + ./socket/pseudossl.c + ./socket/socket.c + ./socket/socks5.c + ./socket/tcp-active.c + ./socket/tcp-bsd.c + ./socket/tcp-passive.c + ./socket/udp-bsd.c + ./socket/udp-turn-over-tcp.c + ./socket/udp-turn.c + ./stun/debug.c + ./stun/rand.c + ./stun/stun5389.c + ./stun/stunagent.c + ./stun/stuncrc32.c + ./stun/stunhmac.c + ./stun/stunmessage.c + ./stun/usages/bind.c + ./stun/usages/ice.c + ./stun/usages/timer.c + ./stun/usages/turn.c + ./stun/utils.c + ./libnice.def + ) +SET(HEADERS + ./agent/address.h + ./agent/agent-enum-types.h + ./agent/agent-priv.h + ./agent/agent.h + ./agent/candidate.h + ./agent/component.h + ./agent/conncheck.h + ./agent/debug.h + ./agent/discovery.h + ./agent/inputstream.h + ./agent/interfaces.h + ./agent/iostream.h + ./agent/outputstream.h + ./agent/pseudotcp.h + ./agent/stream.h + ./config.h + ./nice/nice.h + ./random/random-glib.h + ./random/random.h + ./socket/http.h + ./socket/pseudossl.h + ./socket/socket-priv.h + ./socket/socket.h + ./socket/socks5.h + ./socket/tcp-active.h + ./socket/tcp-bsd.h + ./socket/tcp-passive.h + ./socket/udp-bsd.h + ./socket/udp-turn-over-tcp.h + ./socket/udp-turn.h + ./stun/constants.h + ./stun/debug.h + ./stun/rand.h + ./stun/stun5389.h + ./stun/stunagent.h + ./stun/stuncrc32.h + ./stun/stunhmac.h + ./stun/stunmessage.h + ./stun/tools/stund.h + ./stun/usages/bind.h + ./stun/usages/ice.h + ./stun/usages/timer.h + ./stun/usages/turn.h + ./stun/utils.h + ./stun/win32_common.h + ./win32/vs9/config.h + ) +add_library(libnice ${SRCS} ${HEADERS}) +set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "/wd4244 /wd4005 /wd4391 /wd4142 /wd4267") +target_link_libraries(libnice ${IPHLPAPI_LIBRARY} ${WS2_32_LIB} ${ADVAPI32_LIB} ${GLIB_LIBRARY} ${GOBJECT_LIBRARY} ${GIO_LIBRARY} OpenSSL::SSL) +install(TARGETS libnice +RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +if (CMAKE_BUILD_TYPE STREQUAL "Release") +install(FILES agent/address.h DESTINATION include/nice) +install(FILES agent/agent.h DESTINATION include/nice) +install(FILES agent/candidate.h DESTINATION include/nice) +install(FILES agent/debug.h DESTINATION include/nice) +install(FILES agent/interfaces.h DESTINATION include/nice) +install(FILES nice/nice.h DESTINATION include/nice) +install(FILES agent/pseudotcp.h DESTINATION include/nice) +install(FILES stun/constants.h DESTINATION include/stun) +install(FILES stun/debug.h DESTINATION include/stun) +install(FILES stun/stunagent.h DESTINATION include/stun) +install(FILES stun/stunmessage.h DESTINATION include/stun) +install(FILES stun/usages/bind.h DESTINATION include/stun/usages) +install(FILES stun/usages/ice.h DESTINATION include/stun/usages) +install(FILES stun/usages/timer.h DESTINATION include/stun/usages) +install(FILES stun/usages/turn.h DESTINATION include/stun/usages) +install(FILES stun/win32_common.h DESTINATION include/stun) +endif() \ No newline at end of file diff --git a/vcpkg/ports/libnice/CONTROL b/vcpkg/ports/libnice/CONTROL new file mode 100644 index 0000000..a2f87af --- /dev/null +++ b/vcpkg/ports/libnice/CONTROL @@ -0,0 +1,5 @@ +Source: libnice +Version: 0.1.15-4 +Homepage: https://nice.freedesktop.org +Description: Libnice is an implementation of the IETF's Interactive Connectivity Establishment (ICE) standard (RFC 5245) and the Session Traversal Utilities for NAT (STUN) standard (RFC 5389). +Build-Depends: glib, openssl diff --git a/vcpkg/ports/libnice/portfile.cmake b/vcpkg/ports/libnice/portfile.cmake new file mode 100644 index 0000000..ff09f48 --- /dev/null +++ b/vcpkg/ports/libnice/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_download_distfile( + ARCHIVE + URLS "https://nice.freedesktop.org/releases/libnice-0.1.15.tar.gz" + FILENAME "libnice-0.1.15.tar.gz" + SHA512 60a8bcca06c0ab300dfabbf13e45aeac2085d553c420c5cc4d2fdeb46b449b2b9c9aee8015b0662c16bd1cecf5a49824b7e24951a8a0b66a87074cb00a619c0c +) +vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH + ) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_RELEASE -DOPTIMIZE=1 + OPTIONS_DEBUG -DDEBUGGABLE=1 +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(COPY ${SOURCE_PATH}/COPYING.LGPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(COPY ${SOURCE_PATH}/COPYING.MPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libnoise/CONTROL b/vcpkg/ports/libnoise/CONTROL new file mode 100644 index 0000000..53009a4 --- /dev/null +++ b/vcpkg/ports/libnoise/CONTROL @@ -0,0 +1,3 @@ +Source: libnoise +Version: 1.0.0 +Description: A general-purpose library that generates three-dimensional coherent noise. Useful for terrain generation and procedural texture generation. Uses a broad number of techniques (Perlin noise, ridged multifractal, etc.) and combinations of those techniques. diff --git a/vcpkg/ports/libnoise/portfile.cmake b/vcpkg/ports/libnoise/portfile.cmake new file mode 100644 index 0000000..28465f5 --- /dev/null +++ b/vcpkg/ports/libnoise/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +set( LIBNOISE_VERSION "1.0.0" ) +set( LIBNOISE_COMMIT "d7e68784a2b24c632868506780eba336ede74ecd" ) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO RobertHue/libnoise + REF ${LIBNOISE_COMMIT} + SHA512 8c4d654acb4ae3d90ee62ebdf0447f876022dcb887ebfad88f39b09d29183a58e6fc1b1f1d03edff804975c8befcc6eda33c44797495285aae338c2e869a14d7 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +# Include files should not be duplicated into the /debug/include directory. +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/libnoise) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libnoise/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/libnoise/copyright) + +# Post-build test for cmake libraries +vcpkg_test_cmake(PACKAGE_NAME libnoise) \ No newline at end of file diff --git a/vcpkg/ports/libodb-boost/CMakeLists.txt b/vcpkg/ports/libodb-boost/CMakeLists.txt new file mode 100644 index 0000000..5dd0eb9 --- /dev/null +++ b/vcpkg/ports/libodb-boost/CMakeLists.txt @@ -0,0 +1,47 @@ +cmake_minimum_required(VERSION 3.0) +project(libodb-boost VERSION 2.4.0 LANGUAGES CXX) +find_package(odb 2.4.0 REQUIRED COMPONENTS libodb) +configure_file(config.unix.h.in + ${CMAKE_CURRENT_SOURCE_DIR}/odb/boost/details/config.h COPYONLY) + +# FIXME: should we require boost? which packages? +# find_package(PostgreSQL REQUIRED) +set(LIBODB_INSTALL_HEADERS ON CACHE BOOL "Install the header files (a debug install)") +file(GLOB_RECURSE libodb_src LIST_DIRECTORIES False + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + *.cxx) +add_library(libodb-boost ${libodb_src}) +target_include_directories(libodb-boost + PUBLIC + $ + $ + +) + +target_link_libraries(libodb-boost PRIVATE odb::libodb) +if(BUILD_SHARED_LIBS) + target_compile_definitions(libodb-boost PRIVATE + -DLIBODB_BOOST_DYNAMIC_LIB) +else() + target_compile_definitions(libodb-boost PRIVATE + -DLIBODB_BOOST_STATIC_LIB) +endif() +install(TARGETS libodb-boost EXPORT odb_boostConfig + COMPONENT boost + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) +if(LIBODB_INSTALL_HEADERS) +install(DIRECTORY odb DESTINATION include/ + COMPONENT sqlite + FILES_MATCHING + PATTERN "*.h" + PATTERN "*.hxx" + PATTERN "*.ixx" + PATTERN "*.txx" + PATTERN "*.options" +) +endif() +install(EXPORT odb_boostConfig NAMESPACE odb:: COMPONENT boost DESTINATION share/odb) +export(TARGETS libodb-boost NAMESPACE odb:: FILE odb_boostConfig.cmake) diff --git a/vcpkg/ports/libodb-boost/CONTROL b/vcpkg/ports/libodb-boost/CONTROL new file mode 100644 index 0000000..3dec841 --- /dev/null +++ b/vcpkg/ports/libodb-boost/CONTROL @@ -0,0 +1,4 @@ +Source: libodb-boost +Version: 2.4.0-3 +Description: Description: Boost support for the ODB ORM library +Build-Depends: libodb diff --git a/vcpkg/ports/libodb-boost/config.unix.h.in b/vcpkg/ports/libodb-boost/config.unix.h.in new file mode 100644 index 0000000..b049efd --- /dev/null +++ b/vcpkg/ports/libodb-boost/config.unix.h.in @@ -0,0 +1,14 @@ +/* odb/boost/details/config.h. Generated from config.h.in by configure. */ +/* file : odb/boost/details/config.h.in + * copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC + * license : GNU GPL v2; see accompanying LICENSE file + */ + +/* This file is automatically processed by configure. */ + +#ifndef ODB_BOOST_DETAILS_CONFIG_H +#define ODB_BOOST_DETAILS_CONFIG_H + +/* #undef LIBODB_BOOST_STATIC_LIB */ + +#endif /* ODB_BOOST_DETAILS_CONFIG_H */ diff --git a/vcpkg/ports/libodb-boost/portfile.cmake b/vcpkg/ports/libodb-boost/portfile.cmake new file mode 100644 index 0000000..08689fb --- /dev/null +++ b/vcpkg/ports/libodb-boost/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_download_distfile(ARCHIVE + URLS "http://www.codesynthesis.com/download/odb/2.4/libodb-boost-2.4.0.tar.gz" + FILENAME "libodb-boost-2.4.0.tar.gz" + SHA512 af716b0385cf4ea18b20dcd5880c69c43cfc195eec4ff196a8e438833306489c39ab06a494e5d60cd08ba0d94caa05bd07e5f3fa836d835bad15c8a2ad7de306 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_LIST_DIR}/config.unix.h.in + DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DLIBODB_INSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(READ ${CURRENT_PACKAGES_DIR}/debug/share/odb/odb_boostConfig-debug.cmake LIBODB_DEBUG_TARGETS) +string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" LIBODB_DEBUG_TARGETS "${LIBODB_DEBUG_TARGETS}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/odb/odb_boostConfig-debug.cmake "${LIBODB_DEBUG_TARGETS}") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libodb-mysql/CMakeLists.txt b/vcpkg/ports/libodb-mysql/CMakeLists.txt new file mode 100644 index 0000000..fe02585 --- /dev/null +++ b/vcpkg/ports/libodb-mysql/CMakeLists.txt @@ -0,0 +1,47 @@ +cmake_minimum_required(VERSION 3.0) +project(libodb-mysql VERSION 2.4.0 LANGUAGES CXX) +find_package(odb 2.4.0 REQUIRED COMPONENTS libodb) +configure_file(config.unix.h.in + ${CMAKE_CURRENT_SOURCE_DIR}/odb/mysql/details/config.h COPYONLY) + +INCLUDE_DIRECTORIES(${MYSQL_INCLUDE_DIR}) +set(LIBODB_INSTALL_HEADERS ON CACHE BOOL "Install the header files (a debug install)") +file(GLOB_RECURSE libodb_src + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + *.cxx) +add_library(libodb-mysql ${libodb_src}) +target_include_directories(libodb-mysql + PUBLIC + $ + $ + +) + +target_link_libraries(libodb-mysql PRIVATE odb::libodb ${MYSQL_LIB}) +if(BUILD_SHARED_LIBS) + target_compile_definitions(libodb-mysql PRIVATE + -DLIBODB_MYSQL_DYNAMIC_LIB + -DLIBODB_MYSQL_HAVE_UNLOCK_NOTIFY) +else() + target_compile_definitions(libodb-mysql PRIVATE + -DLIBODB_MYSQL_STATIC_LIB + -DLIBODB_MYSQL_HAVE_UNLOCK_NOTIFY) +endif() +install(TARGETS libodb-mysql EXPORT odb_mysqlConfig + COMPONENT mysql + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) +if(LIBODB_INSTALL_HEADERS) +install(DIRECTORY odb DESTINATION include/ + COMPONENT mysql + FILES_MATCHING + PATTERN "*.h" + PATTERN "*.hxx" + PATTERN "*.ixx" + PATTERN "*.txx" +) +endif() +install(EXPORT odb_mysqlConfig NAMESPACE odb:: COMPONENT mysql DESTINATION share/odb) +export(TARGETS libodb-mysql NAMESPACE odb:: FILE odb_mysqlConfig.cmake) \ No newline at end of file diff --git a/vcpkg/ports/libodb-mysql/CONTROL b/vcpkg/ports/libodb-mysql/CONTROL new file mode 100644 index 0000000..e6a4e06 --- /dev/null +++ b/vcpkg/ports/libodb-mysql/CONTROL @@ -0,0 +1,5 @@ +Source: libodb-mysql +Version: 2.4.0-7 +Homepage: https://www.codesynthesis.com/products/odb/ +Description: MySQL support for the ODB ORM library +Build-Depends: libodb, libmysql diff --git a/vcpkg/ports/libodb-mysql/adapter_mysql_8.0.patch b/vcpkg/ports/libodb-mysql/adapter_mysql_8.0.patch new file mode 100644 index 0000000..9e2f237 --- /dev/null +++ b/vcpkg/ports/libodb-mysql/adapter_mysql_8.0.patch @@ -0,0 +1,13 @@ +diff --git a/odb/mysql/mysql-types.hxx b/odb/mysql/mysql-types.hxx +index 1254ccd..5396791 100644 +--- a/odb/mysql/mysql-types.hxx ++++ b/odb/mysql/mysql-types.hxx +@@ -7,7 +7,7 @@ + + #include + +-typedef char my_bool; ++typedef bool my_bool; + typedef struct st_mysql_bind MYSQL_BIND; + + #ifdef LIBODB_MYSQL_INCLUDE_SHORT diff --git a/vcpkg/ports/libodb-mysql/config.unix.h.in b/vcpkg/ports/libodb-mysql/config.unix.h.in new file mode 100644 index 0000000..b1270e2 --- /dev/null +++ b/vcpkg/ports/libodb-mysql/config.unix.h.in @@ -0,0 +1,19 @@ +/* odb/mysql/details/config.h. Generated from config.h.in by configure. */ +/* file : odb/mysql/details/config.h.in + * copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC + * license : GNU GPL v2; see accompanying LICENSE file + */ + +/* This file is automatically processed by configure. */ + +#ifndef ODB_MYSQL_DETAILS_CONFIG_H +#define ODB_MYSQL_DETAILS_CONFIG_H + +/* #undef LIBODB_MYSQL_STATIC_LIB */ + +/* #undef LIBODB_MYSQL_INCLUDE_SHORT */ +#define LIBODB_MYSQL_INCLUDE_LONG 1 + +/* #undef LIBODB_MYSQL_THR_KEY_VISIBLE */ + +#endif /* ODB_MYSQL_DETAILS_CONFIG_H */ diff --git a/vcpkg/ports/libodb-mysql/fix-redefinttion.patch b/vcpkg/ports/libodb-mysql/fix-redefinttion.patch new file mode 100644 index 0000000..ec6dab4 --- /dev/null +++ b/vcpkg/ports/libodb-mysql/fix-redefinttion.patch @@ -0,0 +1,32 @@ +diff --git a/odb/mysql/mysql-types.hxx b/odb/mysql/mysql-types.hxx +index 5396791..32a2a03 100644 +--- a/odb/mysql/mysql-types.hxx ++++ b/odb/mysql/mysql-types.hxx +@@ -7,13 +7,24 @@ + + #include + ++#include ++ + typedef bool my_bool; ++ ++#if !defined(LIBODB_MYSQL_MARIADB) && MYSQL_VERSION_ID >= 80011 ++struct MYSQL_BIND; ++#else + typedef struct st_mysql_bind MYSQL_BIND; ++#endif + +-#ifdef LIBODB_MYSQL_INCLUDE_SHORT +-# include ++#ifdef LIBODB_MYSQL_MARIADB ++# include + #else +-# include ++# ifdef LIBODB_MYSQL_INCLUDE_SHORT ++# include ++# else ++# include ++# endif + #endif + + #endif // ODB_MYSQL_MYSQL_TYPES_HXX diff --git a/vcpkg/ports/libodb-mysql/portfile.cmake b/vcpkg/ports/libodb-mysql/portfile.cmake new file mode 100644 index 0000000..a52f6fc --- /dev/null +++ b/vcpkg/ports/libodb-mysql/portfile.cmake @@ -0,0 +1,45 @@ +vcpkg_download_distfile(ARCHIVE + URLS "https://www.codesynthesis.com/download/odb/2.4/libodb-mysql-2.4.0.tar.gz" + FILENAME "libodb-mysql-2.4.0.tar.gz" + SHA512 c27b73c3f61dccdd149c11c122185f645a00d5bc346b366ee65b738f8719c39d03fad07a0d55b62b3db9e3ad2507679c24ddda331e5d110f367ad32f7cf8b910 +) + +vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH + PATCHES + adapter_mysql_8.0.patch + fix-redefinttion.patch +) + +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_LIST_DIR}/config.unix.h.in + DESTINATION ${SOURCE_PATH}) + +set(MYSQL_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include/mysql") +set(MYSQL_LIB "${CURRENT_INSTALLED_DIR}/lib/libmysql.lib") +set(MYSQL_LIB_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib/libmysql.lib") +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE + PREFER_NINJA + OPTIONS + -DMYSQL_INCLUDE_DIR=${MYSQL_INCLUDE_DIR} + OPTIONS_RELEASE + -DMYSQL_LIB=${MYSQL_LIB} + OPTIONS_DEBUG + -DLIBODB_INSTALL_HEADERS=OFF + -DMYSQL_LIB=${MYSQL_LIB_DEBUG} +) + +vcpkg_install_cmake() + +file(READ ${CURRENT_PACKAGES_DIR}/debug/share/odb/odb_mysqlConfig-debug.cmake LIBODB_DEBUG_TARGETS) +string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" LIBODB_DEBUG_TARGETS "${LIBODB_DEBUG_TARGETS}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/odb/odb_mysqlConfig-debug.cmake "${LIBODB_DEBUG_TARGETS}") +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libodb-pgsql/CMakeLists.txt b/vcpkg/ports/libodb-pgsql/CMakeLists.txt new file mode 100644 index 0000000..46137ab --- /dev/null +++ b/vcpkg/ports/libodb-pgsql/CMakeLists.txt @@ -0,0 +1,46 @@ +cmake_minimum_required(VERSION 3.0) +project(libodb-pgsql VERSION 2.4.0 LANGUAGES CXX) +find_package(odb 2.4.0 REQUIRED COMPONENTS libodb) +find_package(PostgreSQL REQUIRED) +configure_file(config.unix.h.in + ${CMAKE_CURRENT_SOURCE_DIR}/odb/pgsql/details/config.h COPYONLY) + +set(LIBODB_INSTALL_HEADERS ON CACHE BOOL "Install the header files (a debug install)") +file(GLOB_RECURSE libodb_src LIST_DIRECTORIES False + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + *.cxx) +list(FILTER libodb_src EXCLUDE REGEX /posix/.*) +add_library(libodb-pgsql ${libodb_src}) +target_include_directories(libodb-pgsql + PUBLIC + $ + $ + +) + +target_link_libraries(libodb-pgsql PRIVATE odb::libodb ${PostgreSQL_LIBRARY}) +if(BUILD_SHARED_LIBS) + target_compile_definitions(libodb-pgsql PRIVATE + -DLIBODB_PGSQL_DYNAMIC_LIB) +else() + target_compile_definitions(libodb-pgsql PRIVATE + -DLIBODB_PGSQL_STATIC_LIB) +endif() +install(TARGETS libodb-pgsql EXPORT odb_pgsqlConfig + COMPONENT pgsql + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) +if(LIBODB_INSTALL_HEADERS) +install(DIRECTORY odb DESTINATION include/ + COMPONENT sqlite + FILES_MATCHING + PATTERN "*.h" + PATTERN "*.hxx" + PATTERN "*.ixx" + PATTERN "*.txx" +) +endif() +install(EXPORT odb_pgsqlConfig NAMESPACE odb:: COMPONENT pgsql DESTINATION share/odb) +export(TARGETS libodb-pgsql NAMESPACE odb:: FILE odb_pgsqlConfig.cmake) \ No newline at end of file diff --git a/vcpkg/ports/libodb-pgsql/CONTROL b/vcpkg/ports/libodb-pgsql/CONTROL new file mode 100644 index 0000000..a6988ee --- /dev/null +++ b/vcpkg/ports/libodb-pgsql/CONTROL @@ -0,0 +1,5 @@ +Source: libodb-pgsql +Version: 2.4.0-3 +Homepage: https://www.codesynthesis.com/products/odb/ +Description: Description: PostgreSQL support for the ODB ORM library +Build-Depends: libodb, libpq diff --git a/vcpkg/ports/libodb-pgsql/config.unix.h.in b/vcpkg/ports/libodb-pgsql/config.unix.h.in new file mode 100644 index 0000000..cdced9e --- /dev/null +++ b/vcpkg/ports/libodb-pgsql/config.unix.h.in @@ -0,0 +1,14 @@ +/* odb/pgsql/details/config.h. Generated from config.h.in by configure. */ +/* file : odb/pgsql/details/config.h.in + * copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC + * license : GNU GPL v2; see accompanying LICENSE file + */ + +/* This file is automatically processed by configure. */ + +#ifndef ODB_PGSQL_DETAILS_CONFIG_H +#define ODB_PGSQL_DETAILS_CONFIG_H + +/* #undef LIBODB_PGSQL_STATIC_LIB */ + +#endif /* ODB_PGSQL_DETAILS_CONFIG_H */ diff --git a/vcpkg/ports/libodb-pgsql/portfile.cmake b/vcpkg/ports/libodb-pgsql/portfile.cmake new file mode 100644 index 0000000..c8a7203 --- /dev/null +++ b/vcpkg/ports/libodb-pgsql/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "http://www.codesynthesis.com/download/odb/2.4/libodb-pgsql-2.4.0.tar.gz" + FILENAME "libodb-pgsql-2.4.0.tar.gz" + SHA512 535515356233b815f144c0098940174f7a530e7fa4e930c0a9ebdc255fdb8bac8cdcceac31f25be4864105323e00bfe50808efa648e7c8ffb5a944e52f514b69 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_LIST_DIR}/config.unix.h.in + DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DLIBODB_INSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +file(READ ${CURRENT_PACKAGES_DIR}/debug/share/odb/odb_pgsqlConfig-debug.cmake LIBODB_DEBUG_TARGETS) +string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" LIBODB_DEBUG_TARGETS "${LIBODB_DEBUG_TARGETS}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/odb/odb_pgsqlConfig-debug.cmake "${LIBODB_DEBUG_TARGETS}") +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libodb-pgsql) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libodb-pgsql/LICENSE ${CURRENT_PACKAGES_DIR}/share/libodb-pgsql/copyright) +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/libodb-sqlite/CMakeLists.txt b/vcpkg/ports/libodb-sqlite/CMakeLists.txt new file mode 100644 index 0000000..e0689fa --- /dev/null +++ b/vcpkg/ports/libodb-sqlite/CMakeLists.txt @@ -0,0 +1,55 @@ +cmake_minimum_required(VERSION 3.0) +project(libodb-sqlite VERSION 2.4.0 LANGUAGES CXX) +find_package(odb 2.4.0 REQUIRED COMPONENTS libodb) +find_package(unofficial-sqlite3 CONFIG) +configure_file(config.unix.h.in odb/sqlite/details/config.h COPYONLY) + +set(LIBODB_INSTALL_HEADERS ON CACHE BOOL "Install the header files (a debug install)") +file(GLOB_RECURSE libodb_src LIST_DIRECTORIES False + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + *.cxx) +list(FILTER libodb_src EXCLUDE REGEX /posix/.*) +add_library(libodb-sqlite ${libodb_src}) +target_include_directories(libodb-sqlite + PUBLIC + $ + $ + $ +) + +target_link_libraries(libodb-sqlite PRIVATE odb::libodb unofficial::sqlite3::sqlite3) +if(BUILD_SHARED_LIBS) + target_compile_definitions(libodb-sqlite PRIVATE + -DLIBODB_SQLITE_DYNAMIC_LIB + -DLIBODB_SQLITE_HAVE_UNLOCK_NOTIFY) +else() + target_compile_definitions(libodb-sqlite PRIVATE + -DLIBODB_SQLITE_STATIC_LIB + -DLIBODB_SQLITE_HAVE_UNLOCK_NOTIFY) +endif() +install(TARGETS libodb-sqlite EXPORT odb_sqliteConfig + COMPONENT sqlite + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) +if(LIBODB_INSTALL_HEADERS) + install( + DIRECTORY odb + DESTINATION include/ + COMPONENT sqlite + FILES_MATCHING + PATTERN "*.h" + PATTERN "*.hxx" + PATTERN "*.ixx" + PATTERN "*.txx" + ) + install( + FILES config.unix.h.in + DESTINATION include/odb/sqlite/detail + COMPONENT sqlite + RENAME config.h + ) +endif() +install(EXPORT odb_sqliteConfig NAMESPACE odb:: COMPONENT sqlite DESTINATION share/odb) +export(TARGETS libodb-sqlite NAMESPACE odb:: FILE odb_sqliteConfig.cmake) \ No newline at end of file diff --git a/vcpkg/ports/libodb-sqlite/CONTROL b/vcpkg/ports/libodb-sqlite/CONTROL new file mode 100644 index 0000000..ae35fc3 --- /dev/null +++ b/vcpkg/ports/libodb-sqlite/CONTROL @@ -0,0 +1,6 @@ +Source: libodb-sqlite +Version: 2.4.0 +Port-Version: 7 +Homepage: https://www.codesynthesis.com/products/odb/ +Description: Sqlite support for the ODB ORM library +Build-Depends: libodb, sqlite3 diff --git a/vcpkg/ports/libodb-sqlite/config.unix.h.in b/vcpkg/ports/libodb-sqlite/config.unix.h.in new file mode 100644 index 0000000..f5af346 --- /dev/null +++ b/vcpkg/ports/libodb-sqlite/config.unix.h.in @@ -0,0 +1,15 @@ +/* odb/sqlite/details/config.h. Generated from config.h.in by configure. */ +/* file : odb/sqlite/details/config.h.in + * copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC + * license : GNU GPL v2; see accompanying LICENSE file + */ + +/* This file is automatically processed by configure. */ + +#ifndef ODB_SQLITE_DETAILS_CONFIG_H +#define ODB_SQLITE_DETAILS_CONFIG_H + +/* #undef LIBODB_SQLITE_STATIC_LIB */ +#define LIBODB_SQLITE_HAVE_UNLOCK_NOTIFY 1 + +#endif /* ODB_SQLITE_DETAILS_CONFIG_H */ diff --git a/vcpkg/ports/libodb-sqlite/portfile.cmake b/vcpkg/ports/libodb-sqlite/portfile.cmake new file mode 100644 index 0000000..113307a --- /dev/null +++ b/vcpkg/ports/libodb-sqlite/portfile.cmake @@ -0,0 +1,35 @@ +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "http://www.codesynthesis.com/download/odb/2.4/libodb-sqlite-2.4.0.tar.gz" + FILENAME "libodb-sqlite-2.4.0.tar.gz" + SHA512 af16da7c82cf8845ca3b393fbd8957a92b05ebc925a5191f20d414ab558345850073cd9c46457d0ef0edfb12ebcb27f267b934c9c69ef598380242fe920c8577 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_LIST_DIR}/config.unix.h.in + DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DLIBODB_INSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +file(READ ${CURRENT_PACKAGES_DIR}/debug/share/odb/odb_sqliteConfig-debug.cmake LIBODB_DEBUG_TARGETS) +string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" LIBODB_DEBUG_TARGETS "${LIBODB_DEBUG_TARGETS}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/odb/odb_sqliteConfig-debug.cmake "${LIBODB_DEBUG_TARGETS}") +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/libodb/CMakeLists.txt b/vcpkg/ports/libodb/CMakeLists.txt new file mode 100644 index 0000000..a49175a --- /dev/null +++ b/vcpkg/ports/libodb/CMakeLists.txt @@ -0,0 +1,47 @@ +cmake_minimum_required(VERSION 3.0) +project(libodb VERSION 2.4.0 LANGUAGES CXX) +set(LIBODB_INSTALL_HEADERS ON CACHE BOOL "Install the header files (a debug install)") +configure_file(config.unix.h.in + ${CMAKE_CURRENT_SOURCE_DIR}/odb/details/config.h COPYONLY) + +file(GLOB_RECURSE libodb_src LIST_DIRECTORIES False + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + *.cxx) +if (WIN32) + list(FILTER libodb_src EXCLUDE REGEX /posix/.*) +elseif (UNIX) + list(FILTER libodb_src EXCLUDE REGEX /win32/.*) +endif() + +add_library(libodb ${libodb_src}) +target_include_directories(libodb + PUBLIC + $ + $ + +) +if(BUILD_SHARED_LIBS) + target_compile_definitions(libodb PRIVATE + -DLIBODB_DYNAMIC_LIB) +else() + target_compile_definitions(libodb PRIVATE + -DLIBODB_STATIC_LIB) +endif() +install(TARGETS libodb EXPORT odb_libodbConfig + COMPONENT libodb + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) +if(LIBODB_INSTALL_HEADERS) +install(DIRECTORY odb DESTINATION include/ + COMPONENT libodb + FILES_MATCHING + PATTERN "*.h" + PATTERN "*.hxx" + PATTERN "*.ixx" + PATTERN "*.txx" +) +endif() +install(EXPORT odb_libodbConfig NAMESPACE odb:: COMPONENT libodb DESTINATION share/odb) +export(TARGETS libodb NAMESPACE odb:: FILE odb_libodbConfig.cmake) diff --git a/vcpkg/ports/libodb/CONTROL b/vcpkg/ports/libodb/CONTROL new file mode 100644 index 0000000..71af419 --- /dev/null +++ b/vcpkg/ports/libodb/CONTROL @@ -0,0 +1,4 @@ +Source: libodb +Version: 2.4.0-6 +Homepage: https://www.codesynthesis.com/products/odb/ +Description: ODB library, base runtime for the ODB ORM solution diff --git a/vcpkg/ports/libodb/config.unix.h.in b/vcpkg/ports/libodb/config.unix.h.in new file mode 100644 index 0000000..4df77c5 --- /dev/null +++ b/vcpkg/ports/libodb/config.unix.h.in @@ -0,0 +1,20 @@ +/* odb/details/config.h. Generated from config.h.in by configure. */ +/* file : odb/details/config.h.in + * copyright : Copyright (c) 2009-2015 Code Synthesis Tools CC + * license : GNU GPL v2; see accompanying LICENSE file + */ + +/* This file is automatically processed by configure. */ + +#ifndef ODB_DETAILS_CONFIG_H +#define ODB_DETAILS_CONFIG_H + +/* #undef ODB_THREADS_NONE */ +#define ODB_THREADS_POSIX 1 +/* #undef ODB_THREADS_WIN32 */ +#define ODB_THREADS_TLS_KEYWORD 1 +/* #undef ODB_THREADS_TLS_DECLSPEC */ + +/* #undef LIBODB_STATIC_LIB */ + +#endif /* ODB_DETAILS_CONFIG_H */ diff --git a/vcpkg/ports/libodb/odbConfig.cmake b/vcpkg/ports/libodb/odbConfig.cmake new file mode 100644 index 0000000..afe51dc --- /dev/null +++ b/vcpkg/ports/libodb/odbConfig.cmake @@ -0,0 +1,10 @@ +set(_supported_components libodb sqlite pgsql) + +foreach(_comp ${odb_FIND_COMPONENTS}) + if(NOT ";${_supported_components};" MATCHES _comp) + set(odb_FOUND False) + set(odb_NOTFOUND_MESSAGE "Unsupported component: ${_comp}") + endif() + include("${CMAKE_CURRENT_LIST_DIR}/odb_${_comp}Config.cmake") +endforeach() +set(odb_FOUND True) \ No newline at end of file diff --git a/vcpkg/ports/libodb/portfile.cmake b/vcpkg/ports/libodb/portfile.cmake new file mode 100644 index 0000000..d616f1b --- /dev/null +++ b/vcpkg/ports/libodb/portfile.cmake @@ -0,0 +1,50 @@ +include(vcpkg_common_functions) +include(CMakePackageConfigHelpers) + +vcpkg_download_distfile(ARCHIVE + URLS "http://www.codesynthesis.com/download/odb/2.4/libodb-2.4.0.tar.gz" + FILENAME "libodb-2.4.0.tar.gz" + SHA512 f1311458634695eb6ba307ebfd492e3b260e7beb06db1c5c46df58c339756be4006322cdc4e42d055bf5b2ad14ce4656ddcafcc4e16c282034db8a77d255c3eb +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_LIST_DIR}/config.unix.h.in + DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS_DEBUG + -DLIBODB_INSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() +file(READ ${CURRENT_PACKAGES_DIR}/debug/share/odb/odb_libodbConfig-debug.cmake LIBODB_DEBUG_TARGETS) +string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" LIBODB_DEBUG_TARGETS "${LIBODB_DEBUG_TARGETS}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/odb/odb_libodbConfig-debug.cmake "${LIBODB_DEBUG_TARGETS}") +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/odbConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/odb) +write_basic_package_version_file(${CURRENT_PACKAGES_DIR}/share/odb/odbConfigVersion.cmake + VERSION 2.4.0 + COMPATIBILITY SameMajorVersion +) + +set(LIBODB_HEADER_PATH ${CURRENT_PACKAGES_DIR}/include/odb/details/export.hxx) +file(READ ${LIBODB_HEADER_PATH} LIBODB_HEADER) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + string(REPLACE "#ifdef LIBODB_STATIC_LIB" "#if 1" LIBODB_HEADER ${LIBODB_HEADER}) +else() + string(REPLACE "#ifdef LIBODB_STATIC_LIB" "#if 0" LIBODB_HEADER ${LIBODB_HEADER}) +endif() +file(WRITE ${LIBODB_HEADER_PATH} "${LIBODB_HEADER}") + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libogg/CONTROL b/vcpkg/ports/libogg/CONTROL new file mode 100644 index 0000000..c89497a --- /dev/null +++ b/vcpkg/ports/libogg/CONTROL @@ -0,0 +1,5 @@ +Source: libogg +Version: 1.3.4 +Port-Version: 2 +Description: Ogg is a multimedia container format, and the native file and stream format for the Xiph.org multimedia codecs. +Homepage: https://github.com/xiph/ogg diff --git a/vcpkg/ports/libogg/portfile.cmake b/vcpkg/ports/libogg/portfile.cmake new file mode 100644 index 0000000..617a8a6 --- /dev/null +++ b/vcpkg/ports/libogg/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiph/ogg + REF c8fca6b4a02d695b1ceea39b330d4406001c03ed + SHA512 52980fcca3c1dbb5fbfa4032f179679a5c4000f1fea88e7ed8b2522d80d27513be96d94933daeb9e36f4ac8556e7e4e8ec7e91101e2ba456e0fce51c484eee9e + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DINSTALL_DOCS=0 -DINSTALL_PKG_CONFIG_MODULE=1 +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Ogg TARGET_PATH share/ogg) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + diff --git a/vcpkg/ports/libopenmpt/CMakeLists.txt b/vcpkg/ports/libopenmpt/CMakeLists.txt new file mode 100644 index 0000000..5e9b207 --- /dev/null +++ b/vcpkg/ports/libopenmpt/CMakeLists.txt @@ -0,0 +1,289 @@ +cmake_minimum_required(VERSION 3.9) +project(libopenmpt) + +if(MSVC) + add_compile_options( + /W3 /wd4005 /wd4267 /wd4244 /wd4996 /wd410 /wd4018 + -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE + -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS + ) +endif() + +find_package(ZLIB REQUIRED) + +find_path(MPG123_INCLUDE_DIR NAMES mpg123.h) +find_library(MPG123_LIBRARY NAMES mpg123 libmpg123) + +find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h) +find_path(OGG_INCLUDE_DIR ogg/ogg.h) + +find_library(OGG_LIBRARY NAMES ogg) +find_library(VORBIS_LIBRARY NAMES vorbis) +find_library(VORBISFILE_LIBRARY NAMES vorbisfile) + +find_path(FLAC_INCLUDE_DIR FLAC/all.h) +find_library(FLAC_LIBRARY NAMES FLAC flac) + +find_path(PORTAUDIO_INCLUDE_DIR NAMES portaudio.h) +find_library(PORTAUDIO_LIBRARY NAMES portaudio) + + + +set( + lib_headers + libopenmpt/libopenmpt.h + libopenmpt/libopenmpt.hpp + libopenmpt/libopenmpt_config.h + libopenmpt/libopenmpt_ext.h + libopenmpt/libopenmpt_ext.hpp + libopenmpt/libopenmpt_ext_impl.hpp + libopenmpt/libopenmpt_impl.hpp + libopenmpt/libopenmpt_internal.h + libopenmpt/libopenmpt_stream_callbacks_buffer.h + libopenmpt/libopenmpt_stream_callbacks_fd.h + libopenmpt/libopenmpt_stream_callbacks_file.h + libopenmpt/libopenmpt_version.h +) + + +include_directories( + . + build/svn_version + libopenmpt + common + soundbase + sounddsp + soundlib + openmpt123 + ${MPG123_INCLUDE_DIR} + ${VORBIS_INCLUDE_DIR} + ${OGG_INCLUDE_DIR} + ${FLAC_INCLUDE_DIR} + ${PORTAUDIO_INCLUDE_DIR} +) + +set( + lib_sources + common/ComponentManager.cpp + common/FileReader.cpp + common/Logging.cpp + common/Profiler.cpp + common/misc_util.cpp + common/mptCPU.cpp + common/mptFileIO.cpp + common/mptIO.cpp + common/mptLibrary.cpp + common/mptOS.cpp + common/mptPathString.cpp + common/mptRandom.cpp + common/mptString.cpp + common/mptStringFormat.cpp + common/mptStringParse.cpp + common/mptTime.cpp + common/mptUUID.cpp + common/mptWine.cpp + common/serialization_utils.cpp + common/stdafx.cpp + common/typedefs.cpp + common/version.cpp + libopenmpt/libopenmpt_c.cpp + libopenmpt/libopenmpt_cxx.cpp + libopenmpt/libopenmpt_ext_impl.cpp + libopenmpt/libopenmpt_impl.cpp + sounddsp/AGC.cpp + sounddsp/DSP.cpp + sounddsp/EQ.cpp + sounddsp/Reverb.cpp + soundlib/AudioCriticalSection.cpp + soundlib/ContainerMMCMP.cpp + soundlib/ContainerPP20.cpp + soundlib/ContainerUMX.cpp + soundlib/ContainerXPK.cpp + soundlib/Dither.cpp + soundlib/Dlsbank.cpp + soundlib/Fastmix.cpp + soundlib/ITCompression.cpp + soundlib/ITTools.cpp + soundlib/InstrumentExtensions.cpp + soundlib/Load_669.cpp + soundlib/Load_amf.cpp + soundlib/Load_ams.cpp + soundlib/Load_dbm.cpp + soundlib/Load_digi.cpp + soundlib/Load_dmf.cpp + soundlib/Load_dsm.cpp + soundlib/Load_dtm.cpp + soundlib/Load_far.cpp + soundlib/Load_gdm.cpp + soundlib/Load_imf.cpp + soundlib/Load_it.cpp + soundlib/Load_itp.cpp + soundlib/Load_mdl.cpp + soundlib/Load_med.cpp + soundlib/Load_mid.cpp + soundlib/Load_mo3.cpp + soundlib/Load_mod.cpp + soundlib/Load_mt2.cpp + soundlib/Load_mtm.cpp + soundlib/Load_okt.cpp + soundlib/Load_plm.cpp + soundlib/Load_psm.cpp + soundlib/Load_ptm.cpp + soundlib/Load_s3m.cpp + soundlib/Load_sfx.cpp + soundlib/Load_stm.cpp + soundlib/Load_stp.cpp + soundlib/Load_uax.cpp + soundlib/Load_ult.cpp + soundlib/Load_wav.cpp + soundlib/Load_xm.cpp + soundlib/MIDIEvents.cpp + soundlib/MIDIMacros.cpp + soundlib/MPEGFrame.cpp + soundlib/Message.cpp + soundlib/MixFuncTable.cpp + soundlib/MixerLoops.cpp + soundlib/MixerSettings.cpp + soundlib/ModChannel.cpp + soundlib/ModInstrument.cpp + soundlib/ModSample.cpp + soundlib/ModSequence.cpp + soundlib/OggStream.cpp + soundlib/Paula.cpp + soundlib/RowVisitor.cpp + soundlib/S3MTools.cpp + soundlib/SampleFormatFLAC.cpp + soundlib/SampleFormatMP3.cpp + soundlib/SampleFormatMediaFoundation.cpp + soundlib/SampleFormatOpus.cpp + soundlib/SampleFormatVorbis.cpp + soundlib/SampleFormats.cpp + soundlib/SampleIO.cpp + soundlib/Snd_flt.cpp + soundlib/Snd_fx.cpp + soundlib/Sndfile.cpp + soundlib/Sndmix.cpp + soundlib/SoundFilePlayConfig.cpp + soundlib/Tables.cpp + soundlib/Tagging.cpp + soundlib/UMXTools.cpp + soundlib/UpgradeModule.cpp + soundlib/WAVTools.cpp + soundlib/WindowedFIR.cpp + soundlib/XMTools.cpp + soundlib/load_j2b.cpp + soundlib/mod_specifications.cpp + soundlib/modcommand.cpp + soundlib/modsmp_ctrl.cpp + soundlib/pattern.cpp + soundlib/patternContainer.cpp + soundlib/plugins/DigiBoosterEcho.cpp + soundlib/plugins/LFOPlugin.cpp + soundlib/plugins/PlugInterface.cpp + soundlib/plugins/PluginManager.cpp + soundlib/plugins/dmo/Chorus.cpp + soundlib/plugins/dmo/Compressor.cpp + soundlib/plugins/dmo/DMOPlugin.cpp + soundlib/plugins/dmo/Distortion.cpp + soundlib/plugins/dmo/Echo.cpp + soundlib/plugins/dmo/Flanger.cpp + soundlib/plugins/dmo/Gargle.cpp + soundlib/plugins/dmo/I3DL2Reverb.cpp + soundlib/plugins/dmo/ParamEq.cpp + soundlib/plugins/dmo/WavesReverb.cpp + soundlib/tuning.cpp + soundlib/tuningCollection.cpp + soundlib/tuningbase.cpp +) + +add_library(libopenmpt ${lib_sources}) + +target_compile_definitions(libopenmpt PRIVATE + -DMPT_WITH_MPG123 -DMPT_WITH_OGG + -DMPT_WITH_VORBIS -DMPT_WITH_VORBISFILE + -DMPT_WITH_ZLIB -DMPT_BUILD_VCPKG + -DLIBOPENMPT_BUILD +) + +set(cli_srcs openmpt123/openmpt123.cpp) + +add_executable(openmpt123 ${cli_srcs}) + +target_compile_definitions(openmpt123 PRIVATE + -DMPT_WITH_MPG123 -DMPT_WITH_OGG + -DMPT_WITH_VORBIS -DMPT_WITH_VORBISFILE + -DMPT_WITH_ZLIB -DMPT_BUILD_VCPKG + -DLIBOPENMPT_BUILD +) + + + +if(BUILD_SHARED_LIBS) + target_compile_definitions( + libopenmpt + PRIVATE + -DMPT_BUILD_MSVC_SHARED -DLIBOPENMPT_BUILD_DLL + ) + target_compile_definitions( + openmpt123 + PRIVATE + -DMPT_BUILD_MSVC_SHARED -DLIBOPENMPT_BUILD_DLL + ) +else() + target_compile_definitions( + libopenmpt + PRIVATE + -DMPT_BUILD_MSVC_STATIC + ) + target_compile_definitions( + openmpt123 + PRIVATE + -DMPT_BUILD_MSVC_STATIC + ) +endif() + +target_link_libraries( + libopenmpt + PRIVATE + ${OGG_LIBRARY} + ${MPG123_LIBRARY} + ${VORBISFILE_LIBRARY} + ${VORBIS_LIBRARY} + ${VORBISFILE_LIBRARY} + ZLIB::ZLIB +) + +target_link_libraries( + openmpt123 + PRIVATE + libopenmpt + ${OGG_LIBRARY} + ${MPG123_LIBRARY} + ${VORBISFILE_LIBRARY} + ${VORBIS_LIBRARY} + ${VORBISFILE_LIBRARY} + ${FLAC_LIBRARY} + ${PORTAUDIO_LIBRARY} + Winmm + ZLIB::ZLIB +) + + +install( + TARGETS libopenmpt + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES ${lib_headers} DESTINATION include/libopenmpt) +endif() + +if(NOT DISABLE_INSTALL_TOOLS) + install ( + TARGETS openmpt123 + RUNTIME DESTINATION tools/libopenmpt + ) +endif() diff --git a/vcpkg/ports/libopenmpt/CONTROL b/vcpkg/ports/libopenmpt/CONTROL new file mode 100644 index 0000000..be431f4 --- /dev/null +++ b/vcpkg/ports/libopenmpt/CONTROL @@ -0,0 +1,6 @@ +Source: libopenmpt +Version: 2017-01-28-cf2390140 +Homepage: https://github.com/OpenMPT/openmpt +Description: a library to render tracker music +Build-Depends: zlib, mpg123, libogg, libvorbis, portaudio, libflac +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/libopenmpt/portfile.cmake b/vcpkg/ports/libopenmpt/portfile.cmake new file mode 100644 index 0000000..c43f64a --- /dev/null +++ b/vcpkg/ports/libopenmpt/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "Windowstore not supported") +endif() +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OpenMPT/openmpt + REF cf2390140c37a53ecf7d5fe73412982d346efba4 + SHA512 6401bac7a899eaacebb601591f982fabde6351f1c0dc0c2d24f1f303b78592e7883a84463bdf3cf0fd029eb38d7b7085fdfadafea2931b307b43d0b601db863e + 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 -DDISABLE_INSTALL_TOOLS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/libopenmpt) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libopenmpt RENAME copyright) diff --git a/vcpkg/ports/libopusenc/CMakeLists.txt b/vcpkg/ports/libopusenc/CMakeLists.txt new file mode 100644 index 0000000..4ab1a4e --- /dev/null +++ b/vcpkg/ports/libopusenc/CMakeLists.txt @@ -0,0 +1,39 @@ +cmake_minimum_required(VERSION 3.4) +project(libopusenc C) + +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4267 /wd4244 /wd4996 /wd4101 /wd4018") + +find_path(OPUS_INCLUDE_DIR opus.h PATH_SUFFIXES opus) +find_library(OPUS_LIBRARY opus) + +add_library(opusenc + src/ogg_packer.c + src/opus_header.c + src/opusenc.c + src/picture.c + src/resample.c + src/unicode_support.c) + +get_filename_component(FOLDER ${CMAKE_CURRENT_SOURCE_DIR} NAME) +string(REPLACE "libopusenc-" "" VERSION ${FOLDER}) + +target_compile_definitions(opusenc PRIVATE + RANDOM_PREFIX=libopusenc + OUTSIDE_SPEEX + FLOATING_POINT + PACKAGE_VERSION="${VERSION}" + PACKAGE_NAME="libopusenc" + OPE_BUILD) +set_target_properties(opusenc PROPERTIES DEFINE_SYMBOL DLL_EXPORT) +target_include_directories(opusenc PRIVATE include ${OPUS_INCLUDE_DIR}) +target_link_libraries(opusenc PRIVATE ${OPUS_LIBRARY}) + +install(TARGETS opusenc + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +if(NOT OPUSENC_SKIP_HEADERS) + install(FILES include/opusenc.h + DESTINATION include/opus) +endif() diff --git a/vcpkg/ports/libopusenc/CONTROL b/vcpkg/ports/libopusenc/CONTROL new file mode 100644 index 0000000..7e52b13 --- /dev/null +++ b/vcpkg/ports/libopusenc/CONTROL @@ -0,0 +1,6 @@ +Source: libopusenc +Version: 0.2.1 +Homepage: https://github.com/xiph/libopusenc +Description: Library for encoding .opus audio files and live streams. +Build-Depends: opus +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/libopusenc/portfile.cmake b/vcpkg/ports/libopusenc/portfile.cmake new file mode 100644 index 0000000..f3c226a --- /dev/null +++ b/vcpkg/ports/libopusenc/portfile.cmake @@ -0,0 +1,29 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "UWP builds not supported") +endif() + +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiph/libopusenc + REF v0.2.1 + SHA512 9681421a967b93770796dd3503c00e1418de86438d2bfe77011dc68f6db5d666508d33c0df7308db3b7ea18f5e1b14a3115fd63837987e16347ec801c3771d26 + 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 + -DOPUSENC_SKIP_HEADERS=ON) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# make includes work with MSBuild integration +file(READ ${CURRENT_PACKAGES_DIR}/include/opus/opusenc.h OPUSENC_H) + string(REPLACE "#include " "#include \"opus.h\"" OPUSENC_H "${OPUSENC_H}") +file(WRITE ${CURRENT_PACKAGES_DIR}/include/opus/opusenc.h "${OPUSENC_H}") + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libopusenc) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libopusenc/COPYING ${CURRENT_PACKAGES_DIR}/share/libopusenc/copyright) diff --git a/vcpkg/ports/libosip2/CONTROL b/vcpkg/ports/libosip2/CONTROL new file mode 100644 index 0000000..5d17251 --- /dev/null +++ b/vcpkg/ports/libosip2/CONTROL @@ -0,0 +1,6 @@ +Source: libosip2 +Version: 5.1.0-4 +Homepage: https://www.gnu.org/software/osip/ +Description: oSIP is an LGPL implementation of SIP. It's stable, portable, flexible and compliant! -may be more-! It is used mostly with eXosip2 stack (GPL) which provides simpler API for User-Agent implementation. +Build-Depends: pthread +Supports: !(windows|uwp) diff --git a/vcpkg/ports/libosip2/portfile.cmake b/vcpkg/ports/libosip2/portfile.cmake new file mode 100644 index 0000000..28321ff --- /dev/null +++ b/vcpkg/ports/libosip2/portfile.cmake @@ -0,0 +1,28 @@ +set(LIBOSIP2_VER "5.1.0") + +vcpkg_download_distfile(ARCHIVE + URLS "https://ftp.gnu.org/gnu/osip/libosip2-${LIBOSIP2_VER}.tar.gz" "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/osip/libosip2-${LIBOSIP2_VER}.tar.gz" + FILENAME "libosip2-${LIBOSIP2_VER}.tar.gz" + SHA512 391c9a0ea399f789d7061b0216d327eecba5bbf0429659f4f167604b9e703e1678ba6f58079aa4f84b3636a937064ecfb92e985368164fcb679e95654e43d65b +) + +vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH +) + +if(VCPKG_TARGET_IS_WINDOWS) + set(OPTIONS --enable-mt=no) +endif() +vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS ${OPTIONS} +) + +vcpkg_install_make() +vcpkg_fixup_pkgconfig() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/libosmium/CONTROL b/vcpkg/ports/libosmium/CONTROL new file mode 100644 index 0000000..42b97a7 --- /dev/null +++ b/vcpkg/ports/libosmium/CONTROL @@ -0,0 +1,5 @@ +Source: libosmium +Version: 2.15.5 +Homepage: https://osmcode.org/libosmium/ +Description: A fast and flexible C++ library for working with OpenStreetMap data +Build-Depends: utfcpp, expat, zlib, proj4, bzip2, protozero, boost diff --git a/vcpkg/ports/libosmium/portfile.cmake b/vcpkg/ports/libosmium/portfile.cmake new file mode 100644 index 0000000..9dd5c09 --- /dev/null +++ b/vcpkg/ports/libosmium/portfile.cmake @@ -0,0 +1,21 @@ +# header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO osmcode/libosmium + REF v2.15.5 + SHA512 a4972901db8ed89302e6ba15fd104543b5e36a41bc83daf8f6f6fb29ce73b0dbd8596de801d099a33df413b26eec1b3a6f4f0d669936ecc6d25f88d783468a59 +) +set(BOOST_ROOT ${CURRENT_INSTALLED_DIR}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") diff --git a/vcpkg/ports/libp7-baical/CMakeLists.txt b/vcpkg/ports/libp7-baical/CMakeLists.txt new file mode 100644 index 0000000..6b1044e --- /dev/null +++ b/vcpkg/ports/libp7-baical/CMakeLists.txt @@ -0,0 +1,53 @@ +project(P7) +cmake_minimum_required(VERSION 3.0) + +set(SOURCES "Sources/ClBaical.cpp" + "Sources/ClFile.cpp" + "Sources/Client.cpp" + "Sources/ClNull.cpp" + "Sources/ClText.cpp" + "Sources/CRC32.cpp" + "Sources/Proxy.cpp" + "Sources/Telemetry.cpp" + "Sources/Trace.cpp" +) + +if(WIN32) + set(RESOURCES "Sources/P7Client.rc") +else() + set(RESOURCES "") +endif() + +add_library(P7 "${SOURCES}" "${RESOURCES}") +target_include_directories(P7 PRIVATE "Headers/") +target_include_directories(P7 PRIVATE "Shared/") +if(WIN32) + target_include_directories(P7 PRIVATE "Shared/Platforms/Windows_x86/") + target_link_libraries(P7 "ws2_32") +else() + target_include_directories(P7 PRIVATE "Shared/Platforms/Linux_x86/") +endif() + +if(WIN32) + set_target_properties(P7 PROPERTIES PREFIX "") + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set_target_properties(P7 PROPERTIES DEBUG_POSTFIX "x64d") + set_target_properties(P7 PROPERTIES RELEASE_POSTFIX "x64") + else() + set_target_properties(P7 PROPERTIES DEBUG_POSTFIX "x32d") + set_target_properties(P7 PROPERTIES RELEASE_POSTFIX "x32") + endif() +else() + set_target_properties(P7 PROPERTIES PREFIX "lib") + set_target_properties(P7 PROPERTIES POSTFIX "") + set_target_properties(P7 PROPERTIES DEBUG_POSTFIX "d") +endif() + +install(TARGETS P7 + RUNTIME DESTINATION "bin" + ARCHIVE DESTINATION "lib" + LIBRARY DESTINATION "lib") + +install(DIRECTORY Headers/ + DESTINATION include/P7 + FILES_MATCHING PATTERN "*.h") diff --git a/vcpkg/ports/libp7-baical/CONTROL b/vcpkg/ports/libp7-baical/CONTROL new file mode 100644 index 0000000..8003745 --- /dev/null +++ b/vcpkg/ports/libp7-baical/CONTROL @@ -0,0 +1,5 @@ +Source: libp7-baical +Version: 4.4-4 +Homepage: https://baical.net/ +Description: P7 is a library for high-speed sending telemetry & trace data from application +Supports: !(arm|uwp) \ No newline at end of file diff --git a/vcpkg/ports/libp7-baical/portfile.cmake b/vcpkg/ports/libp7-baical/portfile.cmake new file mode 100644 index 0000000..bae7c89 --- /dev/null +++ b/vcpkg/ports/libp7-baical/portfile.cmake @@ -0,0 +1,38 @@ +include(vcpkg_common_functions) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm) + message(FATAL_ERROR "libP7 does not support ARM") +endif() + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "libP7 does not support UWP") +endif() + +set(LIBP7_VERSION 4.4) +set(LIBP7_HASH 500fefdf6fb01999ddb2accc8309cf8749fb7a65abb98faaf6d71a5ae3da4eac8c00c083905b01f7f6cc973387b605f2c4db0bb007562f76b7ad43b6abe2b91f) + +vcpkg_download_distfile(ARCHIVE + URLS "http://baical.net/files/libP7_v${LIBP7_VERSION}.zip" + FILENAME "libP7_v${LIBP7_VERSION}.zip" + SHA512 ${LIBP7_HASH} +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(COPY ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/libp7-baical/) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libp7-baical/License.txt ${CURRENT_PACKAGES_DIR}/share/libp7-baical/copyright) \ No newline at end of file diff --git a/vcpkg/ports/libp7client/CONTROL b/vcpkg/ports/libp7client/CONTROL new file mode 100644 index 0000000..f7020b6 --- /dev/null +++ b/vcpkg/ports/libp7client/CONTROL @@ -0,0 +1,4 @@ +Source: libp7client +Version: 5.2-1 +Description: Open source, cross-platform, fastest library for sending logs, telemetry & trace data from your application. +Supports: x86|x64 \ No newline at end of file diff --git a/vcpkg/ports/libp7client/fix-runtime-library.patch b/vcpkg/ports/libp7client/fix-runtime-library.patch new file mode 100644 index 0000000..d7d2ab9 --- /dev/null +++ b/vcpkg/ports/libp7client/fix-runtime-library.patch @@ -0,0 +1,76 @@ +diff --git a/Sources/P7ClientDll.vcxproj b/Sources/P7ClientDll.vcxproj +index 9fab3d0..a7035d9 100644 +--- a/Sources/P7ClientDll.vcxproj ++++ b/Sources/P7ClientDll.vcxproj +@@ -112,7 +112,7 @@ + $(ProjectDir)\..\Shared\;$(ProjectDir)\..\Shared\Platforms\Windows_x86;$(ProjectDir)\..\Headers;%(AdditionalIncludeDirectories) + false + false +- MultiThreadedDebug ++ MultiThreadedDebugDLL + + + Windows +@@ -137,7 +137,7 @@ + Disabled + _WIN64;_DEBUG;_LIB;%(PreprocessorDefinitions) + $(ProjectDir)\..\Shared\;$(ProjectDir)\..\Shared\Platforms\Windows_x86;$(ProjectDir)\..\Headers;%(AdditionalIncludeDirectories) +- MultiThreadedDebug ++ MultiThreadedDebugDLL + + + Windows +@@ -165,7 +165,7 @@ + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + $(ProjectDir)\..\Shared\;$(ProjectDir)\..\Shared\Platforms\Windows_x86;$(ProjectDir)\..\Headers;%(AdditionalIncludeDirectories) + ProgramDatabase +- MultiThreaded ++ MultiThreadedDll + + + Windows +@@ -195,7 +195,7 @@ + _WIN64;NDEBUG;_LIB;%(PreprocessorDefinitions) + $(ProjectDir)\..\Shared\;$(ProjectDir)\..\Shared\Platforms\Windows_x86;$(ProjectDir)\..\Headers;%(AdditionalIncludeDirectories) + ProgramDatabase +- MultiThreaded ++ MultiThreadedDll + + + Windows +diff --git a/Sources/P7ClientLib.vcxproj b/Sources/P7ClientLib.vcxproj +index 3b46bab..725f8a4 100644 +--- a/Sources/P7ClientLib.vcxproj ++++ b/Sources/P7ClientLib.vcxproj +@@ -161,6 +161,7 @@ + $(ProjectDir)\..\Shared\;$(ProjectDir)\..\Shared\Platforms\Windows_x86;$(ProjectDir)\..\Headers;%(AdditionalIncludeDirectories) + false + false ++ MultiThreadedDebug + + + Windows +@@ -181,6 +182,7 @@ + Disabled + _WIN64;_DEBUG;_LIB;%(PreprocessorDefinitions) + $(ProjectDir)\..\Shared\;$(ProjectDir)\..\Shared\Platforms\Windows_x86;$(ProjectDir)\..\Headers;%(AdditionalIncludeDirectories) ++ MultiThreadedDebug + + + Windows +@@ -204,6 +206,7 @@ + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + $(ProjectDir)\..\Shared\;$(ProjectDir)\..\Shared\Platforms\Windows_x86;$(ProjectDir)\..\Headers;%(AdditionalIncludeDirectories) + ProgramDatabase ++ MultiThreaded + + + Windows +@@ -255,6 +258,7 @@ + _WIN64;NDEBUG;_LIB;%(PreprocessorDefinitions) + $(ProjectDir)\..\Shared\;$(ProjectDir)\..\Shared\Platforms\Windows_x86;$(ProjectDir)\..\Headers;%(AdditionalIncludeDirectories) + ProgramDatabase ++ MultiThreaded + + + Windows diff --git a/vcpkg/ports/libp7client/portfile.cmake b/vcpkg/ports/libp7client/portfile.cmake new file mode 100644 index 0000000..1a0b002 --- /dev/null +++ b/vcpkg/ports/libp7client/portfile.cmake @@ -0,0 +1,118 @@ +include(vcpkg_common_functions) + +if (NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) + message(FATAL_ERROR "Unsupported system: ${VCPKG_CMAKE_SYSTEM_NAME}") +endif() + +if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(BUILD_ARCH "Win32") + set(ARCH "32") +elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(BUILD_ARCH "x64") + set(ARCH "64") +elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") +elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") +else() + message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() + +set(VERSION 5.2) + +vcpkg_download_distfile(ARCHIVE + URLS "http://baical.net/files/libP7Client_v${VERSION}.zip" + FILENAME "libP7Client_v${VERSION}.zip" + SHA512 9744b9c3f091db90aca3485408d3e1169317152ea353ab3845cd7cfb9d61d105b55be17ad83c5970e01d7d0f37566313bc18c0f8a4c16bcd1582cd7a5ea29b87 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL + REF ${VERSION} + PATCHES + "fix-runtime-library.patch" +) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/Sources/P7ClientLib.vcxproj + PLATFORM ${BUILD_ARCH} + RELEASE_CONFIGURATION + DEBUG_CONFIGURATION + OPTIONS + "/p:NoWarn=C4996" + ) + + file(GLOB LIB_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/Binaries/*${ARCH}.lib") + file(GLOB D_LIB_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/Binaries/*${ARCH}d.lib") +else() + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/Sources/P7ClientDll.vcxproj + PLATFORM ${BUILD_ARCH} + #RELEASE_CONFIGURATION + #DEBUG_CONFIGURATION + OPTIONS + "/p:NoWarn=C4996" + ) + + file(GLOB DLL_LIB_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/Binaries/*${ARCH}.dll.lib") + file(GLOB D_DLL_LIB_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/Binaries/*${ARCH}d.dll.lib") + + file(GLOB DLL_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/Binaries/*${ARCH}.dll") + file(GLOB D_DLL_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/Binaries/*${ARCH}d.dll") + + file(GLOB PDB_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/Binaries/*${ARCH}.pdb") + file(GLOB D_PDB_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/Binaries/*${ARCH}d.pdb") + +endif() + +file(GLOB HEADER_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/Headers/*.h") +file(INSTALL + ${HEADER_FILES} + DESTINATION ${CURRENT_PACKAGES_DIR}/include/P7 +) + +#file(GLOB EXE_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/Binaries/*${ARCH}.exe") +#file(GLOB D_EXE_FILES LIST_DIRECTORIES false "${SOURCE_PATH}/Binaries/*${ARCH}d.exe") + +file(INSTALL + ${LIB_FILES} + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) +file(INSTALL + ${D_LIB_FILES} + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) +file(INSTALL + ${DLL_LIB_FILES} + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) +file(INSTALL + ${D_DLL_LIB_FILES} + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) +file(INSTALL + ${DLL_FILES} + DESTINATION ${CURRENT_PACKAGES_DIR}/bin +) +file(INSTALL + ${D_DLL_FILES} + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin +) +file(INSTALL + ${PDB_FILES} + DESTINATION ${CURRENT_PACKAGES_DIR}/bin +) +file(INSTALL + ${D_PDB_FILES} + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin +) + +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/libp7client RENAME copyright) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_copy_pdbs() \ No newline at end of file diff --git a/vcpkg/ports/libpcap/0001-fix-package-name.patch b/vcpkg/ports/libpcap/0001-fix-package-name.patch new file mode 100644 index 0000000..cd1deee --- /dev/null +++ b/vcpkg/ports/libpcap/0001-fix-package-name.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 55b93f1..f4f9d51 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2358,7 +2358,6 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pcap-namedb.h DESTINATION include) + # On UN*X, and on Windows when not using MSVC, generate libpcap.pc and + # pcap-config and process man pages and arrange that they be installed. + if(NOT MSVC) +- set(PACKAGE_NAME ${LIBRARY_NAME}) + set(prefix ${CMAKE_INSTALL_PREFIX}) + set(exec_prefix "\${prefix}") + set(includedir "\${prefix}/include") diff --git a/vcpkg/ports/libpcap/CONTROL b/vcpkg/ports/libpcap/CONTROL new file mode 100644 index 0000000..d96e558 --- /dev/null +++ b/vcpkg/ports/libpcap/CONTROL @@ -0,0 +1,5 @@ +Source: libpcap +Version: 1.9.1-2 +Description: A portable C/C++ library for network traffic capture +Homepage: https://www.tcpdump.org/ +Supports: !(arm64|uwp|osx) diff --git a/vcpkg/ports/libpcap/add-disable-packet-option.patch b/vcpkg/ports/libpcap/add-disable-packet-option.patch new file mode 100644 index 0000000..842176a --- /dev/null +++ b/vcpkg/ports/libpcap/add-disable-packet-option.patch @@ -0,0 +1,47 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3fe9979..23783d3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -161,6 +161,7 @@ set(SEPTEL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/../septel" CACHE PATH "Path to dire + option(DISABLE_SNF "Disable Myricom SNF support" OFF) + + option(DISABLE_TC "Disable Riverbed TurboCap support" OFF) ++option(DISABLE_PACKET "Disable Packet support" OFF) + + # + # Debugging options. +@@ -220,19 +221,21 @@ if(WIN32) + include_directories(${CMAKE_HOME_DIRECTORY}/../../Common) + endif(IS_DIRECTORY ${CMAKE_HOME_DIRECTORY}/../../Common) + +- find_package(Packet) +- if(PACKET_FOUND) +- set(HAVE_PACKET32 TRUE) +- include_directories(${PACKET_INCLUDE_DIRS}) +- # +- # Check whether we have the NPcap PacketIsLoopbackAdapter() +- # function. +- # +- cmake_push_check_state() +- set(CMAKE_REQUIRED_LIBRARIES ${PACKET_LIBRARIES}) +- check_function_exists(PacketIsLoopbackAdapter HAVE_PACKET_IS_LOOPBACK_ADAPTER) +- cmake_pop_check_state() +- endif(PACKET_FOUND) ++ if(NOT DISABLE_PACKET) ++ find_package(Packet) ++ if(PACKET_FOUND) ++ set(HAVE_PACKET32 TRUE) ++ include_directories(${PACKET_INCLUDE_DIRS}) ++ # ++ # Check whether we have the NPcap PacketIsLoopbackAdapter() ++ # function. ++ # ++ cmake_push_check_state() ++ set(CMAKE_REQUIRED_LIBRARIES ${PACKET_LIBRARIES}) ++ check_function_exists(PacketIsLoopbackAdapter HAVE_PACKET_IS_LOOPBACK_ADAPTER) ++ cmake_pop_check_state() ++ endif(PACKET_FOUND) ++ endif() + + message(STATUS "checking for Npcap's version.h") + check_symbol_exists(WINPCAP_PRODUCT_NAME "../../version.h" HAVE_VERSION_H) diff --git a/vcpkg/ports/libpcap/install-pc-on-msvc.patch b/vcpkg/ports/libpcap/install-pc-on-msvc.patch new file mode 100644 index 0000000..f2cd64b --- /dev/null +++ b/vcpkg/ports/libpcap/install-pc-on-msvc.patch @@ -0,0 +1,97 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 55b93f1..3fe9979 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2355,48 +2355,54 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pcap.h DESTINATION include) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pcap-bpf.h DESTINATION include) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pcap-namedb.h DESTINATION include) + +-# On UN*X, and on Windows when not using MSVC, generate libpcap.pc and ++# Generate libpcap.pc ++if(BUILD_SHARED_LIBS) ++ set(PACKAGE_NAME ${LIBRARY_NAME}) ++else() ++ set(PACKAGE_NAME pcap) ++endif() ++set(prefix ${CMAKE_INSTALL_PREFIX}) ++set(exec_prefix "\${prefix}") ++set(includedir "\${prefix}/include") ++set(libdir "\${exec_prefix}/lib") ++if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR ++ CMAKE_SYSTEM_NAME STREQUAL "NetBSD" OR ++ CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR ++ CMAKE_SYSTEM_NAME STREQUAL "DragonFly BSD" OR ++ CMAKE_SYSTEM_NAME STREQUAL "Linux" OR ++ CMAKE_SYSTEM_NAME STREQUAL "OSF1") ++ # ++ # Platforms where the linker is the GNU linker ++ # or accepts command-line arguments like ++ # those the GNU linker accepts. ++ # ++ set(V_RPATH_OPT "-Wl,-rpath,") ++elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND CMAKE_SYSTEM_VERSION MATCHES "5[.][0-9.]*") ++ # ++ # SunOS 5.x. ++ # ++ # XXX - this assumes GCC is using the Sun linker, ++ # rather than the GNU linker. ++ # ++ set(V_RPATH_OPT "-Wl,-R,") ++else() ++ # ++ # No option needed to set the RPATH. ++ # ++ set(V_RPATH_OPT "") ++endif() ++set(LIBS "") ++foreach(LIB ${PCAP_LINK_LIBRARIES}) ++ set(LIBS "${LIBS} -l${LIB}") ++endforeach(LIB) ++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpcap.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libpcap.pc @ONLY) ++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpcap.pc DESTINATION lib/pkgconfig) ++ ++# On UN*X, and on Windows when not using MSVC, generate + # pcap-config and process man pages and arrange that they be installed. + if(NOT MSVC) +- set(prefix ${CMAKE_INSTALL_PREFIX}) +- set(exec_prefix "\${prefix}") +- set(includedir "\${prefix}/include") +- set(libdir "\${exec_prefix}/lib") +- if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR +- CMAKE_SYSTEM_NAME STREQUAL "NetBSD" OR +- CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR +- CMAKE_SYSTEM_NAME STREQUAL "DragonFly BSD" OR +- CMAKE_SYSTEM_NAME STREQUAL "Linux" OR +- CMAKE_SYSTEM_NAME STREQUAL "OSF1") +- # +- # Platforms where the linker is the GNU linker +- # or accepts command-line arguments like +- # those the GNU linker accepts. +- # +- set(V_RPATH_OPT "-Wl,-rpath,") +- elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND CMAKE_SYSTEM_VERSION MATCHES "5[.][0-9.]*") +- # +- # SunOS 5.x. +- # +- # XXX - this assumes GCC is using the Sun linker, +- # rather than the GNU linker. +- # +- set(V_RPATH_OPT "-Wl,-R,") +- else() +- # +- # No option needed to set the RPATH. +- # +- set(V_RPATH_OPT "") +- endif() +- set(LIBS "") +- foreach(LIB ${PCAP_LINK_LIBRARIES}) +- set(LIBS "${LIBS} -l${LIB}") +- endforeach(LIB) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/pcap-config.in ${CMAKE_CURRENT_BINARY_DIR}/pcap-config @ONLY) +- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpcap.pc.in ${CMAKE_CURRENT_BINARY_DIR}/libpcap.pc @ONLY) + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/pcap-config DESTINATION bin) +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpcap.pc DESTINATION lib/pkgconfig) +- + # + # Man pages. + # diff --git a/vcpkg/ports/libpcap/portfile.cmake b/vcpkg/ports/libpcap/portfile.cmake new file mode 100644 index 0000000..ab25404 --- /dev/null +++ b/vcpkg/ports/libpcap/portfile.cmake @@ -0,0 +1,95 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports x64-windows, x86-windows and Linux" ON_TARGET "UWP" "OSX" ON_ARCH "arm64") + +if(EXISTS "${CURRENT_INSTALLED_DIR}/share/winpcap") + message(FATAL_ERROR "FATAL ERROR: winpcap and libpcap are incompatible.") +endif() + +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") + message( +"libpcap currently requires the following libraries from the system package manager: + flex + libbison-dev +These can be installed on Ubuntu systems via sudo apt install flex libbison-dev" + ) +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +vcpkg_download_distfile( + SOURCE_ARCHIVE_PATH + URLS http://www.tcpdump.org/release/libpcap-1.9.1.tar.gz + FILENAME libpcap-1.9.1.tar.gz + SHA512 ae0d6b0ad8253e7e059336c0f4ed3850d20d7d2f4dc1d942c2951f99a5443a690f0cc42c6f8fdc4a0ccb19e9e985192ba6f399c4bde2c7076e420f547fddfb08 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${SOURCE_ARCHIVE_PATH} + REF 1.9.1 + PATCHES + 0001-fix-package-name.patch + install-pc-on-msvc.patch + add-disable-packet-option.patch +) + +# Only dynamic builds are currently supported on Windows +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) +endif() + +vcpkg_find_acquire_program(BISON) +get_filename_component(BISON_PATH ${BISON} DIRECTORY) +vcpkg_add_to_path(${BISON_PATH}) +vcpkg_find_acquire_program(FLEX) +get_filename_component(FLEX_PATH ${FLEX} DIRECTORY) +vcpkg_add_to_path(${FLEX_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DDISABLE_USB=ON + -DDISABLE_NETMAP=ON + -DDISABLE_BLUETOOTH=ON + -DDISABLE_DBUS=ON + -DDISABLE_RDMA=ON + -DDISABLE_DAG=ON + -DDISABLE_SEPTEL=ON + -DDISABLE_SNF=ON + -DDISABLE_TC=ON + -DDISABLE_PACKET=ON + -DENABLE_REMOTE=OFF +) + +vcpkg_install_cmake() +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# On Windows 64-bit, libpcap 1.9.1 installs the libraries in a amd64 subdirectory of the usual directories +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(libsubdir "amd64") + file(GLOB_RECURSE FILES_TO_MOVE ${CURRENT_PACKAGES_DIR}/lib/${libsubdir}/*) + file(COPY ${FILES_TO_MOVE} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(GLOB_RECURSE FILES_TO_MOVE ${CURRENT_PACKAGES_DIR}/debug/lib/${libsubdir}/*) + file(COPY ${FILES_TO_MOVE} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(GLOB_RECURSE FILES_TO_MOVE ${CURRENT_PACKAGES_DIR}/bin/${libsubdir}/*) + file(COPY ${FILES_TO_MOVE} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(GLOB_RECURSE FILES_TO_MOVE ${CURRENT_PACKAGES_DIR}/debug/bin/${libsubdir}/*) + file(COPY ${FILES_TO_MOVE} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/${libsubdir} + ${CURRENT_PACKAGES_DIR}/debug/lib/${libsubdir} + ${CURRENT_PACKAGES_DIR}/bin/${libsubdir} + ${CURRENT_PACKAGES_DIR}/debug/bin/${libsubdir}) +endif() + +# Even if compiled with BUILD_SHARED_LIBS=ON, pcap also install a pcap_static library +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/pcap_static.lib ${CURRENT_PACKAGES_DIR}/debug/lib/pcap_static.lib) +endif() + +vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES ws2_32) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/man) + diff --git a/vcpkg/ports/libpff/CMakeLists.txt b/vcpkg/ports/libpff/CMakeLists.txt new file mode 100644 index 0000000..276db5d --- /dev/null +++ b/vcpkg/ports/libpff/CMakeLists.txt @@ -0,0 +1,81 @@ +cmake_minimum_required(VERSION 3.12) + +project(libpff C) + +find_package(zlib REQUIRED) + +if(MSVC) + add_compile_definitions(_CRT_SECURE_NO_DEPRECATE) + add_compile_definitions(_CRT_NONSTDC_NO_DEPRECATE) +endif() + +add_compile_definitions(HAVE_LOCAL_LIBCERROR) +add_compile_definitions(HAVE_LOCAL_LIBCTHREADS) +add_compile_definitions(HAVE_LOCAL_LIBCDATA) +add_compile_definitions(HAVE_LOCAL_LIBCLOCALE) +add_compile_definitions(HAVE_LOCAL_LIBCNOTIFY) +add_compile_definitions(HAVE_LOCAL_LIBCSPLIT) +add_compile_definitions(HAVE_LOCAL_LIBCFILE) +add_compile_definitions(HAVE_LOCAL_LIBCPATH) +add_compile_definitions(HAVE_LOCAL_LIBUNA) +add_compile_definitions(HAVE_LOCAL_LIBBFIO) +add_compile_definitions(HAVE_LOCAL_LIBFCACHE) +add_compile_definitions(HAVE_LOCAL_LIBFDATA) +add_compile_definitions(HAVE_LOCAL_LIBFDATETIME) +add_compile_definitions(HAVE_LOCAL_LIBFGUID) +add_compile_definitions(HAVE_LOCAL_LIBFWNT) +add_compile_definitions(HAVE_LOCAL_LIBFMAPI) +add_compile_definitions(HAVE_LOCAL_LIBFVALUE) +add_compile_definitions(ZLIB_DLL) + +add_compile_definitions(LIBPFF_DLL_EXPORT) + +if(MSVC) + set(LIB_RC libpff/libpff.rc) +endif() + + +include(GNUInstallDirs) +include(CMakePackageConfigHelpers) + +# Add CMake find_package() integration +set(PROJECT_TARGET_NAME "unofficial-${PROJECT_NAME}") +set(CONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") +set(PROJECT_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/generated/${PROJECT_TARGET_NAME}Config.cmake") +set(TARGETS_EXPORT_NAME "${PROJECT_TARGET_NAME}Targets") +set(NAMESPACE "unofficial-libpff::") + +# Source files +file(GLOB LIB_SRC lib*/*.c) + +# Headers +file(GLOB LIB_INST_HEADERS include/libpff/*.h) + +add_library(${PROJECT_NAME} ${LIB_SRC} ${LIB_RC}) + +target_include_directories(${PROJECT_NAME} PRIVATE ./include ./common) +target_include_directories(${PROJECT_NAME} PRIVATE ./libbfio ./libcdata ./libcerror ./libcfile ./libclocale ./libcnotify) +target_include_directories(${PROJECT_NAME} PRIVATE ./libcpath ./libcsplit ./libcthreads ./libfcache ./libfdata ./libfdatetime) +target_include_directories(${PROJECT_NAME} PRIVATE ./libfguid ./libfmapi ./libfvalue ./libfwnt ./libuna) + +target_link_libraries(${PROJECT_NAME} PRIVATE ZLIB::ZLIB) + +install(TARGETS ${PROJECT_NAME} + EXPORT ${TARGETS_EXPORT_NAME} + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + INCLUDES DESTINATION include) + +install(FILES ${LIB_INST_HEADERS} DESTINATION include/libpff) +install(FILES include/libpff.h DESTINATION include) + + +# Generate and install unofficial-libpffConfig.cmake +configure_package_config_file("Config.cmake.in" "${PROJECT_CONFIG}" INSTALL_DESTINATION "${CONFIG_INSTALL_DIR}") +install(FILES "${PROJECT_CONFIG}" DESTINATION "${CONFIG_INSTALL_DIR}") + +# Generate and install unofficial-libpffTargets*.cmake +install(EXPORT ${TARGETS_EXPORT_NAME} + NAMESPACE ${NAMESPACE} + DESTINATION "${CONFIG_INSTALL_DIR}") diff --git a/vcpkg/ports/libpff/CONTROL b/vcpkg/ports/libpff/CONTROL new file mode 100644 index 0000000..8520aa1 --- /dev/null +++ b/vcpkg/ports/libpff/CONTROL @@ -0,0 +1,4 @@ +Source: libpff +Version: 2018-07-14-1 +Build-Depends: zlib +Description: Library and tools to access the Personal Folder File (PFF) and the Offline Folder File (OFF) format. diff --git a/vcpkg/ports/libpff/Config.cmake.in b/vcpkg/ports/libpff/Config.cmake.in new file mode 100644 index 0000000..bd6bd45 --- /dev/null +++ b/vcpkg/ports/libpff/Config.cmake.in @@ -0,0 +1,4 @@ +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake") +check_required_components("@PROJECT_NAME@") diff --git a/vcpkg/ports/libpff/portfile.cmake b/vcpkg/ports/libpff/portfile.cmake new file mode 100644 index 0000000..6d327d8 --- /dev/null +++ b/vcpkg/ports/libpff/portfile.cmake @@ -0,0 +1,39 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +set(LIB_VERSION 20180714) +set(LIB_FILENAME libpff-experimental-${LIB_VERSION}.tar.gz) + +# Release distribution file contains configured sources, while the source code in the repository does not. +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/libyal/libpff/releases/download/${LIB_VERSION}/${LIB_FILENAME}" + FILENAME "${LIB_FILENAME}" + SHA512 7207ba87607ea2fd4609a081c2f4b061344a783e188605e88df99fd473f2a8da1269b065e57b054f4622888d40aa8f2b8272dc4748334ddfe358b28d443d6ad1 +) + + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${LIB_VERSION} +) + + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") +file(COPY "${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in" DESTINATION "${SOURCE_PATH}") + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libpff TARGET_PATH share/unofficial-libpff) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +# License and man +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/libpff" RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/libplist/CMakeLists.txt b/vcpkg/ports/libplist/CMakeLists.txt new file mode 100644 index 0000000..0752c2e --- /dev/null +++ b/vcpkg/ports/libplist/CMakeLists.txt @@ -0,0 +1,33 @@ +cmake_minimum_required(VERSION 3.8) +project(plist C) + +file(GLOB_RECURSE PLIST_HEADER include/plist/*.h) +file(GLOB_RECURSE PLIST_SRC src/*.c) + +file(GLOB_RECURSE LIBCNARY_HEADER libcnary/include/*.h) +file(GLOB_RECURSE LIBCNARY_SRC libcnary/*c) + +add_library(plist ${PLIST_SRC} ${PLIST_HEADER} ${LIBCNARY_SRC} ${LIBCNARY_HEADER}) +target_include_directories(plist PRIVATE src include libcnary/include) + +if(WIN32) + target_compile_options(plist PRIVATE -W3 -WX- -sdl-) + target_compile_definitions(plist PRIVATE -DLIBPLIST_EXPORTS) +endif() + +install( + TARGETS plist + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/src/libplist.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/libplist.pc + @ONLY +) +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/libplist.pc + DESTINATION lib/pkgconfig) + +install(FILES ${PLIST_HEADER} DESTINATION include/plist) \ No newline at end of file diff --git a/vcpkg/ports/libplist/CONTROL b/vcpkg/ports/libplist/CONTROL new file mode 100644 index 0000000..b7aa23a --- /dev/null +++ b/vcpkg/ports/libplist/CONTROL @@ -0,0 +1,3 @@ +Source: libplist +Version: 1.2.185 +Description: A library to handle Apple Property List format in binary or XML diff --git a/vcpkg/ports/libplist/dllexport.patch b/vcpkg/ports/libplist/dllexport.patch new file mode 100644 index 0000000..f5e0062 --- /dev/null +++ b/vcpkg/ports/libplist/dllexport.patch @@ -0,0 +1,37 @@ +diff --git a/include/plist/plist.h b/include/plist/plist.h +index 2863c74..9cdb219 100644 +--- a/include/plist/plist.h ++++ b/include/plist/plist.h +@@ -42,7 +42,7 @@ extern "C" + #include + #endif + +-#ifdef _MSC_VER ++#if defined(_MSC_VER) && defined(LIBPLIST_EXPORTS) + #define PLIST_API_MSC __declspec( dllexport ) + #else + #define PLIST_API_MSC +diff --git a/src/plist.h b/src/plist.h +index 1e5d0d1..6690343 100644 +--- a/src/plist.h ++++ b/src/plist.h +@@ -39,10 +39,7 @@ + #include + #endif + +-#ifdef _MSC_VER +- #define PLIST_API __declspec( dllexport ) +-#else +-#ifdef WIN32 ++#if (defined(_MSC_VER) || defined(WIN32)) && defined(LIBPLIST_EXPORTS) + #define PLIST_API __declspec( dllexport ) + #else + #ifdef HAVE_FVISIBILITY +@@ -51,7 +48,6 @@ + #define PLIST_API + #endif + #endif +-#endif + + struct plist_data_s + { diff --git a/vcpkg/ports/libplist/portfile.cmake b/vcpkg/ports/libplist/portfile.cmake new file mode 100644 index 0000000..4e59e90 --- /dev/null +++ b/vcpkg/ports/libplist/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_CRT ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libimobiledevice-win32/libplist + REF efeba335a63110d9ce2b3cd2481743cb0028d9c7 # v1.2.185 + SHA512 c2f742a60c7a6e0601d33eae03d934f2cdb01fdd121be33212955f261a6756c14753ff3c8e173375b228f44f007d7a96ff6833ae66b5a8a6c7c245017cdc9b07 + HEAD_REF msvc-master + PATCHES dllexport.patch +) + +configure_file(${CURRENT_PORT_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libpmemobj-cpp/CONTROL b/vcpkg/ports/libpmemobj-cpp/CONTROL new file mode 100644 index 0000000..f282490 --- /dev/null +++ b/vcpkg/ports/libpmemobj-cpp/CONTROL @@ -0,0 +1,8 @@ +Source: libpmemobj-cpp +Version: 1.10 +Homepage: https://github.com/pmem/libpmemobj-cpp +Description: C++ bindings for libpmemobj (https://github.com/pmem/pmdk). + +Feature: benchmark +Build-Depends: pmdk +Description: build benchmarks diff --git a/vcpkg/ports/libpmemobj-cpp/fixlibpmemobj-cpp.patch b/vcpkg/ports/libpmemobj-cpp/fixlibpmemobj-cpp.patch new file mode 100644 index 0000000..e5221b1 --- /dev/null +++ b/vcpkg/ports/libpmemobj-cpp/fixlibpmemobj-cpp.patch @@ -0,0 +1,47 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 55f068b..7123174 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -133,15 +133,17 @@ if(CLANG) + endif() + endif() + +-if(BUILD_TESTS OR BUILD_EXAMPLES) +- if(PKG_CONFIG_FOUND) +- pkg_check_modules(LIBPMEMOBJ REQUIRED libpmemobj>=${LIBPMEMOBJ_REQUIRED_VERSION}) +- pkg_check_modules(LIBPMEM REQUIRED libpmem>=${LIBPMEM_REQUIRED_VERSION}) +- else() +- find_package(LIBPMEMOBJ REQUIRED ${LIBPMEMOBJ_REQUIRED_VERSION}) +- find_package(LIBPMEM REQUIRED ${LIBPMEM_REQUIRED_VERSION}) +- endif() ++if (BUILD_BENCHMARKS OR BUILD_TESTS OR BUILD_EXAMPLES) ++if(PKG_CONFIG_FOUND) ++ pkg_check_modules(LIBPMEMOBJ REQUIRED libpmemobj>=${LIBPMEMOBJ_REQUIRED_VERSION}) ++ pkg_check_modules(LIBPMEM REQUIRED libpmem>=${LIBPMEM_REQUIRED_VERSION}) ++else() ++ find_package(LIBPMEMOBJ REQUIRED ${LIBPMEMOBJ_REQUIRED_VERSION}) ++ find_package(LIBPMEM REQUIRED ${LIBPMEM_REQUIRED_VERSION}) ++endif() ++endif() + ++if(BUILD_TESTS OR BUILD_EXAMPLES) + if (LIBPMEMOBJ_VERSION AND LIBPMEMOBJ_VERSION MATCHES "[0-9]+[.][0-9]+.*") + string(REGEX REPLACE "\\+git.*" "" LIBPMEMOBJ_VERSION_SHORT ${LIBPMEMOBJ_VERSION}) + string(REGEX REPLACE "-rc.*" "" LIBPMEMOBJ_VERSION_SHORT ${LIBPMEMOBJ_VERSION_SHORT}) +diff --git a/benchmarks/CMakeLists.txt b/benchmarks/CMakeLists.txt +index a390731..e4764d3 100644 +--- a/benchmarks/CMakeLists.txt ++++ b/benchmarks/CMakeLists.txt +@@ -27,6 +27,12 @@ function(add_benchmark name) + prepend(srcs ${CMAKE_CURRENT_SOURCE_DIR} ${srcs}) + add_executable(benchmark-${name} ${srcs}) + target_link_libraries(benchmark-${name} ${LIBPMEMOBJ_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) ++ install( ++ TARGETS benchmark-${name} ++ RUNTIME DESTINATION tools ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ ) + endfunction() + + add_check_whitespace(benchmarks-cmake ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt) diff --git a/vcpkg/ports/libpmemobj-cpp/portfile.cmake b/vcpkg/ports/libpmemobj-cpp/portfile.cmake new file mode 100644 index 0000000..172765f --- /dev/null +++ b/vcpkg/ports/libpmemobj-cpp/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pmem/libpmemobj-cpp + REF 8ff8c542a87a6ac9cb52c5c04def66d844c290cb #v1.10 + SHA512 09ee9a027fee74d6352ec92445fb5c688b7cc28bc30258d4a9efc250242a1c43f6c55c07f9e43e72d50e09f93dc8eeaffabec9e205f2af2899bde63b7fbdfca1 + HEAD_REF master + PATCHES + fixlibpmemobj-cpp.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + benchmark BUILD_BENCHMARKS +) + +vcpkg_find_acquire_program(PERL) +get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) +vcpkg_add_to_path(${PERL_EXE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS ${FEATURE_OPTIONS} + -DBUILD_TESTS=OFF + -DBUILD_EXAMPLES=OFF + -DBUILD_DOC=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/libpmemobj++/cmake TARGET_PATH share/libpmemobj++) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib/libpmemobj++) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libpng/CONTROL b/vcpkg/ports/libpng/CONTROL new file mode 100644 index 0000000..988f95e --- /dev/null +++ b/vcpkg/ports/libpng/CONTROL @@ -0,0 +1,9 @@ +Source: libpng +Version: 1.6.37 +Port-Version: 11 +Build-Depends: zlib +Homepage: https://github.com/glennrp/libpng +Description: libpng is a library implementing an interface for reading and writing PNG (Portable Network Graphics) format files. + +Feature: apng +Description: This is backward compatible with the regular libpng, both in library usage and format. diff --git a/vcpkg/ports/libpng/cmake.patch b/vcpkg/ports/libpng/cmake.patch new file mode 100644 index 0000000..f2eb6aa --- /dev/null +++ b/vcpkg/ports/libpng/cmake.patch @@ -0,0 +1,47 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6451fcf..6599e1d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -44,7 +44,7 @@ if(NOT PNG_BUILD_ZLIB) + endif() + + if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU) +- find_library(M_LIBRARY m) ++ set(M_LIBRARY m) + else() + # libm is not needed and/or not available + set(M_LIBRARY "") +@@ -551,21 +551,14 @@ endif() + + if(PNG_STATIC) + # does not work without changing name +- set(PNG_LIB_NAME_STATIC png_static) + add_library(png_static STATIC ${libpng_sources}) + add_dependencies(png_static genfiles) + # MSVC doesn't use a different file extension for shared vs. static + # libs. We are able to change OUTPUT_NAME to remove the _static + # for all other platforms. +- if(NOT MSVC) +- set_target_properties(png_static PROPERTIES +- OUTPUT_NAME "${PNG_LIB_NAME}" +- CLEAN_DIRECT_OUTPUT 1) +- else() +- set_target_properties(png_static PROPERTIES +- OUTPUT_NAME "${PNG_LIB_NAME}_static" +- CLEAN_DIRECT_OUTPUT 1) +- endif() ++ set_target_properties(png_static PROPERTIES ++ OUTPUT_NAME "${PNG_LIB_NAME}" ++ CLEAN_DIRECT_OUTPUT 1) + list(APPEND PNG_LIB_TARGETS png_static) + if(MSVC) + # msvc does not append 'lib' - do it here to have consistent name +@@ -915,7 +908,7 @@ endif() + + # Create an export file that CMake users can include() to import our targets. + if(NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL) +- install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake) ++ install(EXPORT libpng DESTINATION lib/libpng FILE libpngConfig.cmake) + endif() + + # what's with libpng-manual.txt and all the extra files? diff --git a/vcpkg/ports/libpng/pkgconfig.2.patch b/vcpkg/ports/libpng/pkgconfig.2.patch new file mode 100644 index 0000000..99c1b19 --- /dev/null +++ b/vcpkg/ports/libpng/pkgconfig.2.patch @@ -0,0 +1,48 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6451fcf..4090f42 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -821,20 +821,31 @@ endif() + # Only do this on Windows for Cygwin - the files don't make much sense outside + # of a UNIX look-alike. + if(NOT WIN32 OR CYGWIN OR MINGW) +- set(prefix ${CMAKE_INSTALL_PREFIX}) +- set(exec_prefix ${CMAKE_INSTALL_PREFIX}) +- set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) +- set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR}) +- set(LIBS "-lz -lm") +- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in +- ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY) +- create_symlink(libpng.pc FILE ${PNGLIB_NAME}.pc) +- +- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in +- ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY) +- create_symlink(libpng-config FILE ${PNGLIB_NAME}-config) ++ set(LIBS "-lz") ++ if(NOT APPLE) ++ string(APPEND LIBS " -lm") ++ endif() ++else() ++ if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") ++ set(LIBS "-lzlibd") ++ else() ++ set(LIBS "-lzlib") ++ endif() + endif() + ++set(prefix ${CMAKE_INSTALL_PREFIX}) ++set(exec_prefix ${CMAKE_INSTALL_PREFIX}) ++set(libdir ${CMAKE_INSTALL_FULL_LIBDIR}) ++set(includedir ${CMAKE_INSTALL_FULL_INCLUDEDIR}) ++ ++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in ++ ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY) ++create_symlink(libpng.pc FILE ${PNGLIB_NAME}.pc) ++ ++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in ++ ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY) ++create_symlink(libpng-config FILE ${PNGLIB_NAME}-config) ++ + # SET UP LINKS + if(PNG_SHARED) + set_target_properties(png PROPERTIES diff --git a/vcpkg/ports/libpng/pkgconfig.patch b/vcpkg/ports/libpng/pkgconfig.patch new file mode 100644 index 0000000..5640f38 --- /dev/null +++ b/vcpkg/ports/libpng/pkgconfig.patch @@ -0,0 +1,24 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6599e1d7d..c0bb2fad2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -894,13 +894,13 @@ if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL) + install(FILES libpng.3 libpngpf.3 DESTINATION ${PNG_MAN_DIR}/man3) + install(FILES png.5 DESTINATION ${PNG_MAN_DIR}/man5) + # Install pkg-config files ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + if(NOT CMAKE_HOST_WIN32 OR CYGWIN OR MINGW) +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config +- DESTINATION bin) ++ DESTINATION tools/libpng) +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config +- DESTINATION bin) ++ DESTINATION tools/libpng) + endif() diff --git a/vcpkg/ports/libpng/portfile.cmake b/vcpkg/ports/libpng/portfile.cmake new file mode 100644 index 0000000..d366283 --- /dev/null +++ b/vcpkg/ports/libpng/portfile.cmake @@ -0,0 +1,135 @@ +set(LIBPNG_VER 1.6.37) + +# Download the apng patch +set(LIBPNG_APNG_OPTION ) +if ("apng" IN_LIST FEATURES) + set(LIBPNG_APG_PATCH_NAME libpng-${LIBPNG_VER}-apng.patch) + set(LIBPNG_APG_PATCH_PATH ${CURRENT_BUILDTREES_DIR}/src/${LIBPNG_APG_PATCH_NAME}) + if (NOT EXISTS ${LIBPNG_APG_PATCH_PATH}) + if (NOT EXISTS ${CURRENT_BUILDTREES_DIR}/src) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src) + endif() + vcpkg_download_distfile(LIBPNG_APNG_PATCH_ARCHIVE + URLS "https://downloads.sourceforge.net/project/libpng-apng/libpng16/${LIBPNG_VER}/${LIBPNG_APG_PATCH_NAME}.gz" + FILENAME "${LIBPNG_APG_PATCH_NAME}.gz" + SHA512 226adcb3a8c60f2267fe2976ab531329ae43c2603dab4d0cf8f16217d64069936b879f3d6516b75d259c47d6f5c5b1f24f887602206c8e46abde0fb7f5c7946b + ) + vcpkg_find_acquire_program(7Z) + vcpkg_execute_required_process( + COMMAND ${7Z} x ${LIBPNG_APNG_PATCH_ARCHIVE} -aoa + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src + LOGNAME extract-patch.log + ) + endif() + set(APNG_EXTRA_PATCH ${LIBPNG_APG_PATCH_PATH}) + set(LIBPNG_APNG_OPTION "-DPNG_PREFIX=a") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO glennrp/libpng + REF v${LIBPNG_VER} + SHA512 ccb3705c23b2724e86d072e2ac8cfc380f41fadfd6977a248d588a8ad57b6abe0e4155e525243011f245e98d9b7afbe2e8cc7fd4ff7d82fcefb40c0f48f88918 + HEAD_REF master + PATCHES + use_abort.patch + cmake.patch + pkgconfig.patch + pkgconfig.2.patch + ${APNG_EXTRA_PATCH} +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(PNG_STATIC_LIBS OFF) + set(PNG_SHARED_LIBS ON) +else() + set(PNG_STATIC_LIBS ON) + set(PNG_SHARED_LIBS OFF) +endif() + +set(LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION ) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL iOS) + set(LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION "-DPNG_HARDWARE_OPTIMIZATIONS=OFF") +endif() + +set(LD_VERSION_SCRIPT_OPTION ) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Android) + set(LD_VERSION_SCRIPT_OPTION "-Dld-version-script=OFF") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPNG_MAN_DIR=share/${PORT}/man + ${LIBPNG_APNG_OPTION} + ${LIBPNG_HARDWARE_OPTIMIZATIONS_OPTION} + ${LD_VERSION_SCRIPT_OPTION} + -DPNG_ARM_NEON=on + -DPNG_STATIC=${PNG_STATIC_LIBS} + -DPNG_SHARED=${PNG_SHARED_LIBS} + -DPNG_TESTS=OFF + -DSKIP_INSTALL_PROGRAMS=ON + -DSKIP_INSTALL_EXECUTABLES=ON + -DSKIP_INSTALL_FILES=OFF + OPTIONS_DEBUG + -DSKIP_INSTALL_HEADERS=ON +) +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/libpng) +set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libpng16.pc") +if(EXISTS ${_file}) + file(READ "${_file}" _contents) + if(VCPKG_TARGET_IS_WINDOWS) + string(REGEX REPLACE "-lpng16(d)?" "-llibpng16d" _contents "${_contents}") + else() + string(REGEX REPLACE "-lpng16(d)?" "-lpng16d" _contents "${_contents}") + endif() + if(VCPKG_TARGET_IS_MINGW) + string(REPLACE "-lz" "-lzlibd" _contents "${_contents}") + else() + string(REPLACE "-lzlib" "-lzlibd" _contents "${_contents}") + endif() + file(WRITE "${_file}" "${_contents}") +endif() +set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libpng.pc") +if(EXISTS ${_file}) + file(READ "${_file}" _contents) + if(VCPKG_TARGET_IS_WINDOWS) + string(REGEX REPLACE "-lpng16(d)?" "-llibpng16d" _contents "${_contents}") + else() + string(REGEX REPLACE "-lpng16(d)?" "-lpng16d" _contents "${_contents}") + endif() + if(VCPKG_TARGET_IS_MINGW) + string(REPLACE "-lz" "-lzlibd" _contents "${_contents}") + else() + string(REPLACE "-lzlib" "-lzlibd" _contents "${_contents}") + endif() + file(WRITE "${_file}" "${_contents}") +endif() +if(VCPKG_TARGET_IS_WINDOWS) + set(_file "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libpng16.pc") + if(EXISTS ${_file}) + file(READ "${_file}" _contents) + string(REPLACE "-lpng16" "-llibpng16" _contents "${_contents}") + if(VCPKG_TARGET_IS_MINGW) + string(REPLACE "-lz" "-lzlib" _contents "${_contents}") + endif() + file(WRITE "${_file}" "${_contents}") + endif() + set(_file "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libpng.pc") + if(EXISTS ${_file}) + file(READ "${_file}" _contents) + string(REPLACE "-lpng16" "-llibpng16" _contents "${_contents}") + if(VCPKG_TARGET_IS_MINGW) + string(REPLACE "-lz" "-lzlib" _contents "${_contents}") + endif() + file(WRITE "${_file}" "${_contents}") + endif() +endif() +vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m) + +vcpkg_copy_pdbs() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libpng/use_abort.patch b/vcpkg/ports/libpng/use_abort.patch new file mode 100644 index 0000000..c52df5c --- /dev/null +++ b/vcpkg/ports/libpng/use_abort.patch @@ -0,0 +1,17 @@ +diff --git a/pngpriv.h b/pngpriv.h +index 583c26f..135651c 100644 +--- a/pngpriv.h ++++ b/pngpriv.h +@@ -556,11 +556,7 @@ + + /* Memory model/platform independent fns */ + #ifndef PNG_ABORT +-# ifdef _WINDOWS_ +-# define PNG_ABORT() ExitProcess(0) +-# else +-# define PNG_ABORT() abort() +-# endif ++# define PNG_ABORT() abort() + #endif + + /* These macros may need to be architecture dependent. */ diff --git a/vcpkg/ports/libpopt/0004-vcpkg-fixmsvc.patch b/vcpkg/ports/libpopt/0004-vcpkg-fixmsvc.patch new file mode 100644 index 0000000..d9bc082 --- /dev/null +++ b/vcpkg/ports/libpopt/0004-vcpkg-fixmsvc.patch @@ -0,0 +1,62 @@ +diff -Naur a/poptconfig.c b/poptconfig.c +--- a/poptconfig.c 2009-05-20 16:18:07.000000000 +0300 ++++ b/poptconfig.c 2017-01-21 03:10:17.116120500 +0300 +@@ -141,17 +141,23 @@ + int poptSaneFile(const char * fn) + { + struct stat sb; +- uid_t uid = getuid(); ++#ifndef _MSC_VER ++ uid_t uid = getuid(); ++#endif // ! _MSC_VER + + if (stat(fn, &sb) == -1) + return 1; ++#ifndef _MSC_VER + if ((uid_t)sb.st_uid != uid) + return 0; ++#endif // ! _MSC_VER + if (!S_ISREG(sb.st_mode)) + return 0; + /*@-bitwisesigned@*/ +- if (sb.st_mode & (S_IWGRP|S_IWOTH)) +- return 0; ++#ifndef _MSC_VER ++ if (sb.st_mode & (S_IWGRP | S_IWOTH)) ++ return 0; ++#endif // ! _MSC_VER + /*@=bitwisesigned@*/ + return 1; + } +diff -Naur a/popthelp.c b/popthelp.c +--- a/popthelp.c 2009-08-28 03:06:33.000000000 +0300 ++++ b/popthelp.c 2017-01-21 02:59:26.665695800 +0300 +@@ -10,7 +10,10 @@ + + #include "system.h" + +-#define POPT_USE_TIOCGWINSZ ++#ifndef _MSC_VER ++#define POPT_USE_TIOCGWINSZ ++#endif ++ + #ifdef POPT_USE_TIOCGWINSZ + #include + #endif +diff -Naur a/system.h b/system.h +--- a/system.h 2008-12-18 19:09:49.000000000 +0200 ++++ b/system.h 2017-01-21 03:10:59.195367500 +0300 +@@ -100,4 +100,13 @@ + #endif + #define UNUSED(x) x __attribute__((__unused__)) + ++#if defined(_MSC_VER) ++#define X_OK 0 ++ ++#include ++typedef SSIZE_T ssize_t; ++ ++#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) ++#endif ++ + #include "popt.h" diff --git a/vcpkg/ports/libpopt/CMakeLists.txt b/vcpkg/ports/libpopt/CMakeLists.txt new file mode 100644 index 0000000..5348757 --- /dev/null +++ b/vcpkg/ports/libpopt/CMakeLists.txt @@ -0,0 +1,59 @@ +cmake_minimum_required(VERSION 3.0) +project(popt VERSION 1.16 LANGUAGES C) + +set(PACKAGE "popt") +set(POPT_SYSCONFDIR "C:\\\\") +set(CMAKE_DEBUG_POSTFIX "d") + +file(GLOB SOURCES "popt.c" + "poptconfig.c" + "popthelp.c" + "poptint.c" + "poptparse.c" + "popt.def" +) + +option(POPT_USE_CONFIG "Use configuration file" OFF) + +if(POPT_USE_CONFIG) + include(CheckIncludeFile) + include(CheckFunctionExists) + + check_include_file(float.h HAVE_FLOAT_H) + check_include_file(fnmatch.h HAVE_FNMATCH_H) + check_include_file(glob.h HAVE_GLOB_H) + check_include_file(langinfo.h HAVE_LANGINFO_H) + check_include_file(libintl.h HAVE_LIBINTL_H) + check_include_file(mcheck.h HAVE_MCHECK_H) + check_include_file(unistd.h HAVE_UNISTD_H) + + + check_function_exists(gettext HAVE_GETTEXT) + check_function_exists(iconv HAVE_ICONV) + check_function_exists(mtrace HAVE_MTRACE) + check_function_exists(srandom HAVE_SRANDOM) + check_function_exists(stpcpy HAVE_STPCPY) + check_function_exists(strerror HAVE_STRERROR) + check_function_exists(vasprintf HAVE_VASPRINTF) + check_function_exists(__secure_getenv HAVE___SECURE_GETENV) + + configure_file(config.h.cmake config.h @ONLY) + add_definitions(-DHAVE_CONFIG_H) +endif() + +add_definitions(-D_CRT_SECURE_NO_WARNINGS) + +include_directories(${CMAKE_BINARY_DIR}) + +add_library(popt ${SOURCES}) +if (MSVC) + target_compile_options(popt PRIVATE /wd4996) +endif() + +install(TARGETS popt + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install(FILES "popt.h" DESTINATION "include") \ No newline at end of file diff --git a/vcpkg/ports/libpopt/CONTROL b/vcpkg/ports/libpopt/CONTROL new file mode 100644 index 0000000..7dc75fc --- /dev/null +++ b/vcpkg/ports/libpopt/CONTROL @@ -0,0 +1,3 @@ +Source: libpopt +Version: 1.16-13 +Description: Library for parsing command line parameters diff --git a/vcpkg/ports/libpopt/config.h.cmake b/vcpkg/ports/libpopt/config.h.cmake new file mode 100644 index 0000000..f641fc7 --- /dev/null +++ b/vcpkg/ports/libpopt/config.h.cmake @@ -0,0 +1,61 @@ +#ifndef CONFIG_H +#define CONFIG_H + +/* Define to 1 if translation of program messages to the user's native language is requested. */ +#cmakedefine ENABLE_NLS 1 + +/* Define if the GNU dcgettext() function is already present or preinstalled. */ +#cmakedefine HAVE_DCGETTEXT 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_FLOAT_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_FNMATCH_H 1 + +/* Define if the GNU gettext() function is already present or preinstalled. */ +#cmakedefine HAVE_GETTEXT 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_GLOB_H 1 + +/* Define if you have the iconv() function and it works. */ +#cmakedefine HAVE_ICONV 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_LANGINFO_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_LIBINTL_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_MCHECK_H 1 + +/* Define to 1 if you have the `mtrace' function. */ +#cmakedefine HAVE_MTRACE 1 + +/* Define to 1 if you have the `srandom' function. */ +#cmakedefine HAVE_SRANDOM 1 + +/* Define to 1 if you have the `stpcpy' function. */ +#cmakedefine HAVE_STPCPY 1 + +/* Define to 1 if you have the `strerror' function. */ +#cmakedefine HAVE_STRERROR 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `vasprintf' function. */ +#cmakedefine HAVE_VASPRINTF 1 + +/* Define to 1 if you have the `__secure_getenv' function. */ +#cmakedefine HAVE___SECURE_GETENV 1 + +/* Name of package */ +#cmakedefine PACKAGE "@PACKAGE@" + +/* Full path to default POPT configuration directory */ +#cmakedefine POPT_SYSCONFDIR "@POPT_SYSCONFDIR@" + +#endif \ No newline at end of file diff --git a/vcpkg/ports/libpopt/popt.def b/vcpkg/ports/libpopt/popt.def new file mode 100644 index 0000000..20bb70a --- /dev/null +++ b/vcpkg/ports/libpopt/popt.def @@ -0,0 +1,50 @@ +EXPORTS + _poptArgMask + _poptBitsK + _poptBitsM + _poptBitsN + _poptGroupMask + poptAddAlias + poptAddItem + poptAliasOptions + poptBadOption + poptBitsAdd + poptBitsArgs + poptBitsChk + poptBitsClr + poptBitsDel + poptBitsIntersect + poptBitsUnion + poptConfigFileToString + poptDupArgv + poptFini + poptFreeContext + poptGetArg + poptGetArgs + poptGetContext + poptGetInvocationName + poptGetNextOpt + poptGetOptArg + poptHelpOptions + poptInit + poptParseArgvString + poptPeekArg + poptPrintHelp + poptPrintUsage + poptReadConfigFile + poptReadConfigFiles + poptReadDefaultConfig + poptReadFile + poptResetContext + poptSaneFile + poptSaveBits + poptSaveInt + poptSaveLong + poptSaveLongLong + poptSaveShort + poptSaveString + poptSetExecPath + poptSetOtherOptionHelp + poptStrerror + poptStrippedArgv + poptStuffArgs \ No newline at end of file diff --git a/vcpkg/ports/libpopt/portfile.cmake b/vcpkg/ports/libpopt/portfile.cmake new file mode 100644 index 0000000..a4ead06 --- /dev/null +++ b/vcpkg/ports/libpopt/portfile.cmake @@ -0,0 +1,33 @@ +set(LIBPOPT_VERSION 1.16) +set(LIBPOPT_HASH bae2dd4e5d682ef023fdc77ae60c4aad01a3a576d45af9d78d22490c11e410e60edda37ede171920746d4ae0d5de3c060d15cecfd41ba75b727a811be828d694) + +vcpkg_download_distfile(ARCHIVE + URLS + "https://ftp.openbsd.org/pub/OpenBSD/distfiles/popt-${LIBPOPT_VERSION}.tar.gz" + FILENAME "popt-${LIBPOPT_VERSION}.tar.gz" + SHA512 ${LIBPOPT_HASH} +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + 0004-vcpkg-fixmsvc.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.cmake DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/popt.def DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DPOPT_USE_CONFIG=1 +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libpq/CONTROL b/vcpkg/ports/libpq/CONTROL new file mode 100644 index 0000000..ab24473 --- /dev/null +++ b/vcpkg/ports/libpq/CONTROL @@ -0,0 +1,64 @@ +Source: libpq +Version: 12.2 +Port-Version: 7 +Build-Depends: libpq[bonjour] (osx) +Supports: !uwp +Homepage: https://www.postgresql.org/ +Description: The official database access API of postgresql +Default-Features: zlib, openssl + +Feature: openssl +Build-Depends: openssl +Description: support for encrypted client connections and random number generation on platforms that do not have "/dev/urandom" (except windows) (--with-openssl) + +Feature: zlib +Build-Depends: zlib +Description: Use zlib (else --without-zlib) + +Feature: readline +Build-Depends: readline +Description: Use readline (else --without-readline) + +Feature: libedit +Build-Depends: libedit +Description: prefer libedit (--with-libedit-preferred) + +Feature: python +Build-Depends: python3, libpq[core,client] +Description: build the PL/Python server programming language (dynamic only?) (--with-python) + +Feature: tcl +Build-Depends: tcl, libpq[core,client] +Description: build the PL/Tcl procedural language(dynamic only?) (--with-tcl) + +Feature: nls +Build-Depends: gettext +Description: Native Language Support (--enable-nls[=LANGUAGES]) + +Feature: systemd +Description: Build with support for systemd service notifications. (--with-systemd) + +Feature: llvm +Build-Depends: llvm +Description: Build with support for LLVM based JIT compilation (--with-llvm) + +Feature: icu +Build-Depends: icu +Description: Build with support for the ICU library (--with-icu) + +Feature: bonjour +Description: Build with Bonjour support (--with-bonjour) + +Feature: uuid +Description: Build the uuid-ossp module (which provides functions to generate UUIDs) (--with-uuid=LIBRARY LIBRARY=(bsd|e2fs|ossp)) + +Feature: xml +Build-Depends: libxml2 +Description: Build with libxml (--with-libxml) + +Feature: xslt +Build-Depends: libxslt +Description: Build with libxslt (--with-libxslt) + +Feature: client +Description: Build all client tools and libraries. diff --git a/vcpkg/ports/libpq/Makefile b/vcpkg/ports/libpq/Makefile new file mode 100644 index 0000000..4832b50 --- /dev/null +++ b/vcpkg/ports/libpq/Makefile @@ -0,0 +1,34 @@ +subdir = . +top_builddir = . +include src/Makefile.global + +.NOTPARALLEL: + +ifeq ($(LIBPQ_LIBRARY_TYPE), shared) +LIBPQ_LIB_SUFFIX = _shlib +endif + +ifeq ($(LIBPQ_LIBRARY_TYPE), static) +LIBPQ_INSTALL_LIBS = install-stlib +endif + +.PHONY: all +all: + $(MAKE) -C src/include MAKELEVEL=0 + $(MAKE) -C src/common MAKELEVEL=0 libpgcommon$(LIBPQ_LIB_SUFFIX).a + $(MAKE) -C src/port MAKELEVEL=0 libpgport$(LIBPQ_LIB_SUFFIX).a + $(MAKE) -C src/interfaces/libpq MAKELEVEL=0 all-$(LIBPQ_LIBRARY_TYPE)-lib + $(MAKE) -C src/bin/pg_config MAKELEVEL=0 + +.PHONY: install-stlib +install-stlib: + $(MAKE) -C src/common MAKELEVEL=0 install -o all + rm -f '$(DESTDIR)$(libdir)/libpgcommon_shlib.a' + $(MAKE) -C src/port MAKELEVEL=0 install -o all + rm -f '$(DESTDIR)$(libdir)/libpgport_shlib.a' + +.PHONY: install +install: $(LIBPQ_INSTALL_LIBS) + $(MAKE) -C src/include MAKELEVEL=0 install + $(MAKE) -C src/interfaces/libpq MAKELEVEL=0 install-lib-$(LIBPQ_LIBRARY_TYPE) install-lib-pc install -o all -o install-lib + $(MAKE) -C src/bin/pg_config MAKELEVEL=0 install diff --git a/vcpkg/ports/libpq/config.pl b/vcpkg/ports/libpq/config.pl new file mode 100644 index 0000000..cbe605e --- /dev/null +++ b/vcpkg/ports/libpq/config.pl @@ -0,0 +1,27 @@ +our $config = { + asserts => 0, # --enable-cassert + # float4byval=>1, # --disable-float4-byval, on by default + + # float8byval=> $platformbits == 64, # --disable-float8-byval, + # off by default on 32 bit platforms, on by default on 64 bit platforms + + # blocksize => 8, # --with-blocksize, 8kB by default + # wal_blocksize => 8, # --with-wal-blocksize, 8kB by default + ldap => undef, # --with-ldap + extraver => undef, # --with-extra-version= + gss => undef, # --with-gssapi= + icu => undef, # --with-icu= + nls => undef, # --enable-nls= + tap_tests => undef, # --enable-tap-tests + tcl => undef, # --with-tcl= + perl => undef, # --with-perl + python => undef, # --with-python= + openssl => undef, # --with-openssl= + uuid => undef, # --with-ossp-uuid + xml => undef, # --with-libxml= + xslt => undef, # --with-libxslt= + iconv => undef, # (not in configure, path to iconv) + zlib => undef # --with-zlib= +}; + +1; diff --git a/vcpkg/ports/libpq/patches/linux/configure.patch b/vcpkg/ports/libpq/patches/linux/configure.patch new file mode 100644 index 0000000..84ebcbd --- /dev/null +++ b/vcpkg/ports/libpq/patches/linux/configure.patch @@ -0,0 +1,22 @@ +diff --git a/configure b/configure +index 54c852aca..96e2c89ba 100644 +--- a/configure ++++ b/configure +@@ -11923,7 +11923,7 @@ if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lcrypto $LIBS" ++LIBS="-lcrypto -pthread $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -11958,7 +11958,7 @@ if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then : + #define HAVE_LIBCRYPTO 1 + _ACEOF + +- LIBS="-lcrypto $LIBS" ++ LIBS="-lcrypto -pthread $LIBS" + + else + as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5 diff --git a/vcpkg/ports/libpq/patches/windows/MSBuildProject-static-crt.patch b/vcpkg/ports/libpq/patches/windows/MSBuildProject-static-crt.patch new file mode 100644 index 0000000..03bd832 --- /dev/null +++ b/vcpkg/ports/libpq/patches/windows/MSBuildProject-static-crt.patch @@ -0,0 +1,23 @@ +diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm +index 823357c02..faa3e336f 100644 +--- a/src/tools/msvc/MSBuildProject.pm ++++ b/src/tools/msvc/MSBuildProject.pm +@@ -84,16 +84,16 @@ EOF + defs => "_DEBUG;DEBUG=1", + opt => 'Disabled', + strpool => 'false', +- runtime => 'MultiThreadedDebugDLL' ++ runtime => 'MultiThreadedDebug' + }); + $self->WriteItemDefinitionGroup( + $f, + 'Release', + { + defs => "", + opt => 'Full', + strpool => 'true', +- runtime => 'MultiThreadedDLL' ++ runtime => 'MultiThreaded' + }); + return; + } diff --git a/vcpkg/ports/libpq/patches/windows/MSBuildProject-static-lib.patch b/vcpkg/ports/libpq/patches/windows/MSBuildProject-static-lib.patch new file mode 100644 index 0000000..ba72a82 --- /dev/null +++ b/vcpkg/ports/libpq/patches/windows/MSBuildProject-static-lib.patch @@ -0,0 +1,13 @@ +diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm +index 823357c02..e1dc59aa7 100644 +--- a/src/tools/msvc/MSBuildProject.pm ++++ b/src/tools/msvc/MSBuildProject.pm +@@ -262,7 +262,7 @@ sub WriteConfigurationPropertyGroup + my $cfgtype = + ($self->{type} eq "exe") + ? 'Application' +- : ($self->{type} eq "dll" ? 'DynamicLibrary' : 'StaticLibrary'); ++ : ($self->{type} eq "dll" ? 'StaticLibrary' : 'StaticLibrary'); + + print $f < diff --git a/vcpkg/ports/libpq/patches/windows/MSBuildProject_fix_gendef_perl.patch b/vcpkg/ports/libpq/patches/windows/MSBuildProject_fix_gendef_perl.patch new file mode 100644 index 0000000..6c52713 --- /dev/null +++ b/vcpkg/ports/libpq/patches/windows/MSBuildProject_fix_gendef_perl.patch @@ -0,0 +1,13 @@ +diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm +index 823357c02..b93992f22 100644 +--- a/src/tools/msvc/MSBuildProject.pm ++++ b/src/tools/msvc/MSBuildProject.pm +@@ -381,7 +381,7 @@ EOF + print $f < + Generate DEF file +- perl src\\tools\\msvc\\gendef.pl $cfgname\\$self->{name} $self->{platform} ++ perl "src\\tools\\msvc\\gendef.pl" $cfgname\\$self->{name} $self->{platform} + + EOF + } diff --git a/vcpkg/ports/libpq/patches/windows/Mkvcbuild-static-lib.patch b/vcpkg/ports/libpq/patches/windows/Mkvcbuild-static-lib.patch new file mode 100644 index 0000000..818134f --- /dev/null +++ b/vcpkg/ports/libpq/patches/windows/Mkvcbuild-static-lib.patch @@ -0,0 +1,13 @@ +diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm +index 99f39caa5..4f51c12f2 100644 +--- a/src/tools/msvc/Mkvcbuild.pm ++++ b/src/tools/msvc/Mkvcbuild.pm +@@ -182,7 +182,7 @@ sub mkvcbuild + 'syncrep_gram.y'); + $postgres->AddFiles('src/backend/utils/adt', 'jsonpath_scan.l', + 'jsonpath_gram.y'); +- $postgres->AddDefine('BUILDING_DLL'); ++ # $postgres->AddDefine('BUILDING_DLL'); + $postgres->AddLibrary('secur32.lib'); + $postgres->AddLibrary('ws2_32.lib'); + $postgres->AddLibrary('wldap32.lib') if ($solution->{options}->{ldap}); diff --git a/vcpkg/ports/libpq/patches/windows/Solution.patch b/vcpkg/ports/libpq/patches/windows/Solution.patch new file mode 100644 index 0000000..2259e3e --- /dev/null +++ b/vcpkg/ports/libpq/patches/windows/Solution.patch @@ -0,0 +1,39 @@ +diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm +index 51711c2bf..d33fdc3b0 100644 +--- a/src/tools/msvc/Solution.pm ++++ b/src/tools/msvc/Solution.pm +@@ -69,9 +69,15 @@ sub DeterminePlatform + my $self = shift; + + # Examine CL help output to determine if we are in 32 or 64-bit mode. +- my $output = `cl /? 2>&1`; ++ my $output = `cl 2>&1`; + $? >> 8 == 0 or die "cl command not found"; +- $self->{platform} = ($output =~ /^\/favor:<.+AMD64/m) ? 'x64' : 'Win32'; ++ if ($output =~ m/x64\n/) { $self->{platform} = 'x64'; ++ } elsif ($output =~ m/x86\n/) { $self->{platform} = 'Win32'; ++ } elsif ($output =~ m/ARM64\n/) { $self->{platform} = 'ARM64'; ++ } elsif ($output =~ m/ARM\n/) { $self->{platform} = 'ARM'; ++ } else { $self->{platform} = 'Unknown' ++ } ++ print "cl output $output."; + print "Detected hardware platform: $self->{platform}\n"; + return; + } +@@ -526,14 +526,14 @@ EOF + || confess "Could not open pg_config_paths.h"; + print $o <{options}->{zlib}) + { + $proj->AddIncludeDir($self->{options}->{zlib} . '\include'); +- $proj->AddLibrary($self->{options}->{zlib} . '\lib\zdll.lib'); ++ $proj->AddLibrary($self->{options}->{zlib} . '\debug\lib\zlibd.lib'); # This must be updated + } + if ($self->{options}->{openssl}) + { +@@ -661,7 +661,7 @@ sub AddProject + # changed their library names from: + # - libeay to libcrypto + # - ssleay to libssl +- if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0') ++ if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0') # This must be updated + { + my $dbgsuffix; + my $libsslpath; +@@ -670,27 +670,27 @@ sub AddProject + # The format name of the libraries is slightly + # different between the Win32 and Win64 platform, so + # adapt. +- if (-e "$self->{options}->{openssl}/lib/VC/sslcrypto32MD.lib") ++ if (-e "$self->{options}->{openssl}/lib/VC/sslcrypto32MD.lib") # This must be updated + { + # Win32 here, with a debugging library set. + $dbgsuffix = 1; +- $libsslpath = '\lib\VC\libssl32.lib'; +- $libcryptopath = '\lib\VC\libcrypto32.lib'; ++ $libsslpath = '\lib\VC\libssl32.lib'; # This must be updated ++ $libcryptopath = '\lib\VC\libcrypto32.lib'; # This must be updated + } +- elsif (-e "$self->{options}->{openssl}/lib/VC/sslcrypto64MD.lib") ++ elsif (-e "$self->{options}->{openssl}/lib/VC/sslcrypto64MD.lib") # This must be updated + { + # Win64 here, with a debugging library set. + $dbgsuffix = 1; +- $libsslpath = '\lib\VC\libssl64.lib'; +- $libcryptopath = '\lib\VC\libcrypto64.lib'; ++ $libsslpath = '\lib\VC\libssl64.lib'; # This must be updated ++ $libcryptopath = '\lib\VC\libcrypto64.lib'; # This must be updated + } + else + { + # On both Win32 and Win64 the same library + # names are used without a debugging context. + $dbgsuffix = 0; +- $libsslpath = '\lib\libssl.lib'; +- $libcryptopath = '\lib\libcrypto.lib'; ++ $libsslpath = '\debug\lib\libssl.lib'; # This must be updated ++ $libcryptopath = '\debug\lib\libcrypto.lib'; # This must be updated + } + + $proj->AddLibrary($self->{options}->{openssl} . $libsslpath, +@@ -698,16 +698,16 @@ sub AddProject + $proj->AddLibrary($self->{options}->{openssl} . $libcryptopath, + $dbgsuffix); + } +- else ++ else + { + # Choose which set of libraries to use depending on if + # debugging libraries are in place in the installer. +- if (-e "$self->{options}->{openssl}/lib/VC/ssleay32MD.lib") ++ if (-e "$self->{options}->{openssl}/lib/VC/ssleay32MD.lib") # This must be updated + { + $proj->AddLibrary( +- $self->{options}->{openssl} . '\lib\VC\ssleay32.lib', 1); ++ $self->{options}->{openssl} . '\lib\VC\ssleay32.lib', 1); # This must be updated + $proj->AddLibrary( +- $self->{options}->{openssl} . '\lib\VC\libeay32.lib', 1); ++ $self->{options}->{openssl} . '\lib\VC\libeay32.lib', 1); # This must be updated + } + else + { +@@ -715,60 +715,60 @@ sub AddProject + # to be here, so don't ask for it in last + # parameter. + $proj->AddLibrary( +- $self->{options}->{openssl} . '\lib\ssleay32.lib', 0); ++ $self->{options}->{openssl} . '\debug\lib\ssleay32.lib', 0); # This must be updated + $proj->AddLibrary( +- $self->{options}->{openssl} . '\lib\libeay32.lib', 0); ++ $self->{options}->{openssl} . '\debug\lib\libeay32.lib', 0); # This must be updated + } + } + } + if ($self->{options}->{nls}) + { + $proj->AddIncludeDir($self->{options}->{nls} . '\include'); +- $proj->AddLibrary($self->{options}->{nls} . '\lib\libintl.lib'); ++ $proj->AddLibrary($self->{options}->{nls} . '\debug\lib\libintl.lib'); # This must be updated + } + if ($self->{options}->{gss}) + { +- $proj->AddIncludeDir($self->{options}->{gss} . '\inc\krb5'); +- $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\krb5_32.lib'); +- $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\comerr32.lib'); +- $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\gssapi32.lib'); ++ $proj->AddIncludeDir($self->{options}->{gss} . '\inc\krb5'); # This must be updated ++ $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\krb5_32.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\comerr32.lib');# This must be updated ++ $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\gssapi32.lib');# This must be updated + } + if ($self->{options}->{iconv}) + { + $proj->AddIncludeDir($self->{options}->{iconv} . '\include'); +- $proj->AddLibrary($self->{options}->{iconv} . '\lib\iconv.lib'); ++ $proj->AddLibrary($self->{options}->{iconv} . '\debug\lib\libiconv.lib'); # This must be updated + } + if ($self->{options}->{icu}) + { + $proj->AddIncludeDir($self->{options}->{icu} . '\include'); + if ($self->{platform} eq 'Win32') + { +- $proj->AddLibrary($self->{options}->{icu} . '\lib\icuin.lib'); +- $proj->AddLibrary($self->{options}->{icu} . '\lib\icuuc.lib'); +- $proj->AddLibrary($self->{options}->{icu} . '\lib\icudt.lib'); ++ $proj->AddLibrary($self->{options}->{icu} . '\debug\lib\icuind.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{icu} . '\debug\lib\icuucd.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{icu} . '\debug\lib\icudtd.lib'); # This must be updated + } + else + { +- $proj->AddLibrary($self->{options}->{icu} . '\lib64\icuin.lib'); +- $proj->AddLibrary($self->{options}->{icu} . '\lib64\icuuc.lib'); +- $proj->AddLibrary($self->{options}->{icu} . '\lib64\icudt.lib'); ++ $proj->AddLibrary($self->{options}->{icu} . '\debug\lib\icuind.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{icu} . '\debug\lib\icuucd.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{icu} . '\debug\lib\icudtd.lib'); # This must be updated + } + } + if ($self->{options}->{xml}) + { + $proj->AddIncludeDir($self->{options}->{xml} . '\include'); + $proj->AddIncludeDir($self->{options}->{xml} . '\include\libxml2'); +- $proj->AddLibrary($self->{options}->{xml} . '\lib\libxml2.lib'); ++ $proj->AddLibrary($self->{options}->{xml} . '\debug\lib\libxml2.lib'); # This must be updated + } + if ($self->{options}->{xslt}) + { + $proj->AddIncludeDir($self->{options}->{xslt} . '\include'); +- $proj->AddLibrary($self->{options}->{xslt} . '\lib\libxslt.lib'); ++ $proj->AddLibrary($self->{options}->{xslt} . '\debug\lib\libxslt.lib'); # This must be updated + } + if ($self->{options}->{uuid}) + { + $proj->AddIncludeDir($self->{options}->{uuid} . '\include'); +- $proj->AddLibrary($self->{options}->{uuid} . '\lib\uuid.lib'); ++ $proj->AddLibrary($self->{options}->{uuid} . '\debug\lib\uuid.lib'); # This must be updated + } + return $proj; + } diff --git a/vcpkg/ports/libpq/patches/windows/Solution_Release.patch b/vcpkg/ports/libpq/patches/windows/Solution_Release.patch new file mode 100644 index 0000000..e4b653c --- /dev/null +++ b/vcpkg/ports/libpq/patches/windows/Solution_Release.patch @@ -0,0 +1,157 @@ +diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm +index 51711c2bf..d33fdc3b0 100644 +--- a/src/tools/msvc/Solution.pm ++++ b/src/tools/msvc/Solution.pm +@@ -650,7 +650,7 @@ sub AddProject + if ($self->{options}->{zlib}) + { + $proj->AddIncludeDir($self->{options}->{zlib} . '\include'); +- $proj->AddLibrary($self->{options}->{zlib} . '\lib\zdll.lib'); ++ $proj->AddLibrary($self->{options}->{zlib} . '\lib\zlib.lib'); # This must be updated + } + if ($self->{options}->{openssl}) + { +@@ -661,7 +661,7 @@ sub AddProject + # changed their library names from: + # - libeay to libcrypto + # - ssleay to libssl +- if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0') ++ if ($digit1 >= '1' && $digit2 >= '1' && $digit3 >= '0') # This must be updated + { + my $dbgsuffix; + my $libsslpath; +@@ -670,27 +670,27 @@ sub AddProject + # The format name of the libraries is slightly + # different between the Win32 and Win64 platform, so + # adapt. +- if (-e "$self->{options}->{openssl}/lib/VC/sslcrypto32MD.lib") ++ if (-e "$self->{options}->{openssl}/lib/VC/sslcrypto32MD.lib") # This must be updated + { + # Win32 here, with a debugging library set. + $dbgsuffix = 1; +- $libsslpath = '\lib\VC\libssl32.lib'; +- $libcryptopath = '\lib\VC\libcrypto32.lib'; ++ $libsslpath = '\lib\VC\libssl32.lib'; # This must be updated ++ $libcryptopath = '\lib\VC\libcrypto32.lib'; # This must be updated + } +- elsif (-e "$self->{options}->{openssl}/lib/VC/sslcrypto64MD.lib") ++ elsif (-e "$self->{options}->{openssl}/lib/VC/sslcrypto64MD.lib") # This must be updated + { + # Win64 here, with a debugging library set. + $dbgsuffix = 1; +- $libsslpath = '\lib\VC\libssl64.lib'; +- $libcryptopath = '\lib\VC\libcrypto64.lib'; ++ $libsslpath = '\lib\VC\libssl64.lib'; # This must be updated ++ $libcryptopath = '\lib\VC\libcrypto64.lib'; # This must be updated + } + else + { + # On both Win32 and Win64 the same library + # names are used without a debugging context. + $dbgsuffix = 0; +- $libsslpath = '\lib\libssl.lib'; +- $libcryptopath = '\lib\libcrypto.lib'; ++ $libsslpath = '\lib\libssl.lib'; # This must be updated ++ $libcryptopath = '\lib\libcrypto.lib'; # This must be updated + } + + $proj->AddLibrary($self->{options}->{openssl} . $libsslpath, +@@ -698,16 +698,16 @@ sub AddProject + $proj->AddLibrary($self->{options}->{openssl} . $libcryptopath, + $dbgsuffix); + } +- else ++ else + { + # Choose which set of libraries to use depending on if + # debugging libraries are in place in the installer. +- if (-e "$self->{options}->{openssl}/lib/VC/ssleay32MD.lib") ++ if (-e "$self->{options}->{openssl}/lib/VC/ssleay32MD.lib") # This must be updated + { + $proj->AddLibrary( +- $self->{options}->{openssl} . '\lib\VC\ssleay32.lib', 1); ++ $self->{options}->{openssl} . '\lib\VC\ssleay32.lib', 1); # This must be updated + $proj->AddLibrary( +- $self->{options}->{openssl} . '\lib\VC\libeay32.lib', 1); ++ $self->{options}->{openssl} . '\lib\VC\libeay32.lib', 1); # This must be updated + } + else + { +@@ -715,60 +715,60 @@ sub AddProject + # to be here, so don't ask for it in last + # parameter. + $proj->AddLibrary( +- $self->{options}->{openssl} . '\lib\ssleay32.lib', 0); ++ $self->{options}->{openssl} . '\lib\ssleay32.lib', 0); # This must be updated + $proj->AddLibrary( +- $self->{options}->{openssl} . '\lib\libeay32.lib', 0); ++ $self->{options}->{openssl} . '\lib\libeay32.lib', 0); # This must be updated + } + } + } + if ($self->{options}->{nls}) + { + $proj->AddIncludeDir($self->{options}->{nls} . '\include'); +- $proj->AddLibrary($self->{options}->{nls} . '\lib\libintl.lib'); ++ $proj->AddLibrary($self->{options}->{nls} . '\lib\libintl.lib'); # This must be updated + } + if ($self->{options}->{gss}) + { +- $proj->AddIncludeDir($self->{options}->{gss} . '\inc\krb5'); +- $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\krb5_32.lib'); +- $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\comerr32.lib'); +- $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\gssapi32.lib'); ++ $proj->AddIncludeDir($self->{options}->{gss} . '\inc\krb5'); # This must be updated ++ $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\krb5_32.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\comerr32.lib');# This must be updated ++ $proj->AddLibrary($self->{options}->{gss} . '\lib\i386\gssapi32.lib');# This must be updated + } + if ($self->{options}->{iconv}) + { + $proj->AddIncludeDir($self->{options}->{iconv} . '\include'); +- $proj->AddLibrary($self->{options}->{iconv} . '\lib\iconv.lib'); ++ $proj->AddLibrary($self->{options}->{iconv} . '\lib\libiconv.lib'); # This must be updated + } + if ($self->{options}->{icu}) + { + $proj->AddIncludeDir($self->{options}->{icu} . '\include'); + if ($self->{platform} eq 'Win32') + { +- $proj->AddLibrary($self->{options}->{icu} . '\lib\icuin.lib'); +- $proj->AddLibrary($self->{options}->{icu} . '\lib\icuuc.lib'); +- $proj->AddLibrary($self->{options}->{icu} . '\lib\icudt.lib'); ++ $proj->AddLibrary($self->{options}->{icu} . '\lib\icuin.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{icu} . '\lib\icuuc.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{icu} . '\lib\icudt.lib'); # This must be updated + } + else + { +- $proj->AddLibrary($self->{options}->{icu} . '\lib64\icuin.lib'); +- $proj->AddLibrary($self->{options}->{icu} . '\lib64\icuuc.lib'); +- $proj->AddLibrary($self->{options}->{icu} . '\lib64\icudt.lib'); ++ $proj->AddLibrary($self->{options}->{icu} . '\lib\icuin.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{icu} . '\lib\icuuc.lib'); # This must be updated ++ $proj->AddLibrary($self->{options}->{icu} . '\lib\icudt.lib'); # This must be updated + } + } + if ($self->{options}->{xml}) + { + $proj->AddIncludeDir($self->{options}->{xml} . '\include'); + $proj->AddIncludeDir($self->{options}->{xml} . '\include\libxml2'); +- $proj->AddLibrary($self->{options}->{xml} . '\lib\libxml2.lib'); ++ $proj->AddLibrary($self->{options}->{xml} . '\lib\libxml2.lib'); # This must be updated + } + if ($self->{options}->{xslt}) + { + $proj->AddIncludeDir($self->{options}->{xslt} . '\include'); +- $proj->AddLibrary($self->{options}->{xslt} . '\lib\libxslt.lib'); ++ $proj->AddLibrary($self->{options}->{xslt} . '\lib\libxslt.lib'); # This must be updated + } + if ($self->{options}->{uuid}) + { + $proj->AddIncludeDir($self->{options}->{uuid} . '\include'); +- $proj->AddLibrary($self->{options}->{uuid} . '\lib\uuid.lib'); ++ $proj->AddLibrary($self->{options}->{uuid} . '\lib\uuid.lib'); # This must be updated + } + return $proj; + } diff --git a/vcpkg/ports/libpq/patches/windows/arm.patch b/vcpkg/ports/libpq/patches/windows/arm.patch new file mode 100644 index 0000000..0e47c34 --- /dev/null +++ b/vcpkg/ports/libpq/patches/windows/arm.patch @@ -0,0 +1,39 @@ +diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm +index 99f39caa5..4f51c12f2 100644 +--- a/src/tools/msvc/Mkvcbuild.pm ++++ b/src/tools/msvc/Mkvcbuild.pm +@@ -110,8 +110,8 @@ sub mkvcbuild + + if ($vsVersion >= '9.00') + { +- push(@pgportfiles, 'pg_crc32c_sse42_choose.c'); +- push(@pgportfiles, 'pg_crc32c_sse42.c'); ++ #push(@pgportfiles, 'pg_crc32c_sse42_choose.c'); ++ #push(@pgportfiles, 'pg_crc32c_sse42.c'); + push(@pgportfiles, 'pg_crc32c_sb8.c'); + } + else +diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm +index 823357c02..625f32bf8 100644 +--- a/src/tools/msvc/MSBuildProject.pm ++++ b/src/tools/msvc/MSBuildProject.pm +@@ -307,9 +307,8 @@ sub WriteItemDefinitionGroup + : ($self->{type} eq "dll" ? 'DynamicLibrary' : 'StaticLibrary'); + my $libs = $self->GetAdditionalLinkerDependencies($cfgname, ';'); + +- my $targetmachine = +- $self->{platform} eq 'Win32' ? 'MachineX86' : 'MachineX64'; +- ++ my $targetmachine = $self->{platform} eq 'ARM64' ? 'MachineARM64' : 'MachineARM'; ++ + my $includes = $self->{includes}; + unless ($includes eq '' or $includes =~ /;$/) + { +@@ -347,7 +349,6 @@ sub WriteItemDefinitionGroup + .\\$cfgname\\$self->{name}\\$self->{name}.pdb + false + .\\$cfgname\\$self->{name}\\$self->{name}.map +- false + + + Console diff --git a/vcpkg/ports/libpq/patches/windows/host_skip_openssl.patch b/vcpkg/ports/libpq/patches/windows/host_skip_openssl.patch new file mode 100644 index 0000000..e18e178 --- /dev/null +++ b/vcpkg/ports/libpq/patches/windows/host_skip_openssl.patch @@ -0,0 +1,38 @@ +diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm +index 25a549015..9018270ab 100644 +--- a/src/tools/msvc/Solution.pm ++++ b/src/tools/msvc/Solution.pm +@@ -132,21 +132,21 @@ sub GetOpenSSLVersion + # Attempt to get OpenSSL version and location. This assumes that + # openssl.exe is in the specified directory. + # Quote the .exe name in case it has spaces +- my $opensslcmd = +- qq("openssl.exe" version 2>&1); +- my $sslout = `$opensslcmd`; ++ #my $opensslcmd = ++ # qq("openssl.exe" version 2>&1); ++ #my $sslout = `$opensslcmd`; + +- $? >> 8 == 0 +- or croak +- "Unable to determine OpenSSL version: The openssl.exe command wasn't found."; ++ #$? >> 8 == 0 ++ # or croak ++ # "Unable to determine OpenSSL version: The openssl.exe command wasn't found."; + +- if ($sslout =~ /(\d+)\.(\d+)\.(\d+)(\D)/m) +- { +- return ($1, $2, $3); +- } ++ #if ($sslout =~ /(\d+)\.(\d+)\.(\d+)(\D)/m) ++ #{ ++ return (1, 1, 1); ++ #} + +- croak +- "Unable to determine OpenSSL version: The openssl.exe version could not be determined."; ++ #croak ++ # "Unable to determine OpenSSL version: The openssl.exe version could not be determined."; + } + + sub GenerateFiles diff --git a/vcpkg/ports/libpq/patches/windows/install.patch b/vcpkg/ports/libpq/patches/windows/install.patch new file mode 100644 index 0000000..206dd1d --- /dev/null +++ b/vcpkg/ports/libpq/patches/windows/install.patch @@ -0,0 +1,225 @@ +diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm +index d109b2c90..75c7446e6 100644 +--- a/src/tools/msvc/Install.pm ++++ b/src/tools/msvc/Install.pm +@@ -106,7 +106,7 @@ sub Install + } + }, + @top_dir); +- CopySetOfFiles('config files', $sample_files, $target . '/share/'); ++ CopySetOfFiles('config files', $sample_files, $target . '/share/libpq/'); + CopyFiles( + 'Import libraries', + $target . '/lib/', +@@ -78,10 +78,10 @@ sub Install + my $majorver = DetermineMajorVersion(); + print "Installing version $majorver for $conf in $target\n"; + +- my @client_dirs = ('bin', 'lib', 'share', 'symbols'); ++ my @client_dirs = ('bin', 'lib', 'share', 'tools', 'share/libpq', 'tools/libpq'); + my @all_dirs = ( +- @client_dirs, 'doc', 'doc/contrib', 'doc/extension', 'share/contrib', +- 'share/extension', 'share/timezonesets', 'share/tsearch_data'); ++ @client_dirs, 'doc', 'doc/libpq', 'doc/libpq/contrib', 'doc/libpq/extension', 'share/libpq/contrib', ++ 'share/libpq/extension', 'share/libpq/timezonesets', 'share/libpq/tsearch_data'); + if ($insttype eq "client") + { + EnsureDirectories($target, @client_dirs); +@@ -120,35 +120,35 @@ sub Install + CopySetOfFiles( + 'timezone names', + [ glob('src\timezone\tznames\*.txt') ], +- $target . '/share/timezonesets/'); ++ $target . '/share/libpq/timezonesets/'); + CopyFiles( + 'timezone sets', +- $target . '/share/timezonesets/', ++ $target . '/share/libpq/timezonesets/', + 'src/timezone/tznames/', 'Default', 'Australia', 'India'); + CopySetOfFiles( + 'BKI files', + [ glob("src\\backend\\catalog\\postgres.*") ], +- $target . '/share/'); ++ $target . '/share/libpq/'); + CopySetOfFiles( + 'SQL files', + [ glob("src\\backend\\catalog\\*.sql") ], +- $target . '/share/'); ++ $target . '/share/libpq/'); + CopyFiles( +- 'Information schema data', $target . '/share/', ++ 'Information schema data', $target . '/share/libpq/', + 'src/backend/catalog/', 'sql_features.txt'); + CopyFiles( +- 'Error code data', $target . '/share/', ++ 'Error code data', $target . '/share/libpq/', + 'src/backend/utils/', 'errcodes.txt'); + GenerateTimezoneFiles($target, $conf); + GenerateTsearchFiles($target); + CopySetOfFiles( + 'Stopword files', + [ glob("src\\backend\\snowball\\stopwords\\*.stop") ], +- $target . '/share/tsearch_data/'); ++ $target . '/share/libpq/tsearch_data/'); + CopySetOfFiles( + 'Dictionaries sample files', + [ glob("src\\backend\\tsearch\\dicts\\*_sample*") ], +- $target . '/share/tsearch_data/'); ++ $target . '/share/libpq/tsearch_data/'); + + my $pl_extension_files = []; + my @pldirs = ('src/pl/plpgsql/src'); +@@ -167,7 +167,7 @@ sub Install + }, + @pldirs); + CopySetOfFiles('PL Extension files', +- $pl_extension_files, $target . '/share/extension/'); ++ $pl_extension_files, $target . '/share/libpq/extension/'); + } + + GenerateNLSFiles($target, $config->{nls}, $majorver) if ($config->{nls}); +@@ -282,23 +282,26 @@ sub CopySolutionOutput + { + if ($1 == 1) + { +- push(@{ $install_list{'bin'} }, "exe"); ++ push(@{ $install_list{'tools\\libpq'} }, "exe"); + } + elsif ($1 == 2) + { +- push(@{ $install_list{'lib'} }, "dll"); ++ push(@{ $install_list{'bin'} }, "dll"); + if ($is_sharedlib) + { + push(@{ $install_list{'bin'} }, "dll"); + push(@{ $install_list{'lib'} }, "lib"); + } ++ else ++ { ++ push(@{ $install_list{'lib'} }, "lib"); ++ } + } + else + { +- ++ push(@{ $install_list{'lib'} }, "lib"); + # Static libraries, such as libpgport, only used internally + # during build, don't install. +- next; + } + } + elsif ($vcproj eq 'vcxproj' +@@ -306,11 +309,11 @@ sub CopySolutionOutput + { + if ($1 eq 'Application') + { +- push(@{ $install_list{'bin'} }, "exe"); ++ push(@{ $install_list{'tools\\libpq'} }, "exe"); + } + elsif ($1 eq 'DynamicLibrary') + { +- push(@{ $install_list{'lib'} }, "dll"); ++ push(@{ $install_list{'bin'} }, "dll"); + if ($is_sharedlib) + { + push(@{ $install_list{'bin'} }, "dll"); +@@ -319,10 +322,9 @@ sub CopySolutionOutput + } + else # 'StaticLibrary' + { +- ++ push(@{ $install_list{'lib'} }, "lib"); + # Static lib, such as libpgport, only used internally + # during build, don't install. +- next; + } + } + else +@@ -339,7 +339,7 @@ sub CopySolutionOutput + || croak "Could not copy $pf.$ext\n"; + } + } +- lcopy("$conf\\$pf\\$pf.pdb", "$target\\symbols\\$pf.pdb") ++ lcopy("$conf\\$pf\\$pf.pdb", "$target\\bin\\$pf.pdb") + || croak "Could not copy $pf.pdb\n"; + print "."; + } +@@ -366,7 +366,7 @@ sub GenerateTimezoneFiles + print "Generating timezone files..."; + + my @args = +- ("$conf/zic/zic", '-d', "$target/share/timezone", '-p', "$posixrules"); ++ ("$conf/zic/zic", '-d', "$target/share/libpq/timezone", '-p', "$posixrules"); + foreach (@tzfiles) + { + my $tzfile = $_; +@@ -391,7 +391,7 @@ sub GenerateTsearchFiles + $mf =~ /^LANGUAGES\s*=\s*(.*)$/m + || die "Could not find LANGUAGES line in snowball Makefile\n"; + my @pieces = split /\s+/, $1; +- open($F, '>', "$target/share/snowball_create.sql") ++ open($F, '>', "$target/share/libpq/snowball_create.sql") + || die "Could not write snowball_create.sql"; + print $F read_file('src/backend/snowball/snowball_func.sql.in'); + +@@ -476,7 +476,7 @@ sub CopySubdirFiles + foreach my $f (split /\s+/, $flist) + { + lcopy("$subdir/$module/$f.control", +- "$target/share/extension/$f.control") ++ "$target/share/libpq/extension/$f.control") + || croak("Could not copy file $f.control in contrib $module"); + print '.'; + } +@@ -494,7 +494,7 @@ sub CopySubdirFiles + foreach my $f (split /\s+/, $flist) + { + lcopy("$subdir/$module/$f", +- "$target/share/$moduledir/" . basename($f)) ++ "$target/share/libpq/$moduledir/" . basename($f)) + || croak("Could not copy file $f in contrib $module"); + print '.'; + } +@@ -509,7 +509,7 @@ sub CopySubdirFiles + foreach my $f (split /\s+/, $flist) + { + lcopy("$subdir/$module/$f", +- "$target/share/tsearch_data/" . basename($f)) ++ "$target/share/libpq/tsearch_data/" . basename($f)) + || croak("Could not copy file $f in $subdir $module"); + print '.'; + } +@@ -572,7 +572,7 @@ sub CopySubdirFiles + if ($module eq 'spi'); + foreach my $f (split /\s+/, $flist) + { +- lcopy("$subdir/$module/$f", "$target/doc/$moduledir/$f") ++ lcopy("$subdir/$module/$f", "$target/doc/libpq/$moduledir/$f") + || croak("Could not copy file $f in contrib $module"); + print '.'; + } +@@ -701,7 +701,7 @@ sub GenerateNLSFiles + my $majorver = shift; + + print "Installing NLS files..."; +- EnsureDirectories($target, "share/locale"); ++ EnsureDirectories($target, "share/libpq/locale"); + my @flist; + File::Find::find( + { +@@ -723,12 +723,12 @@ sub GenerateNLSFiles + next unless /([^\/]+)\.po/; + $lang = $1; + +- EnsureDirectories($target, "share/locale/$lang", +- "share/locale/$lang/LC_MESSAGES"); ++ EnsureDirectories($target, "share/libpq/locale/$lang", ++ "share/libpq/locale/$lang/LC_MESSAGES"); + my @args = ( + "$nlspath\\bin\\msgfmt", + '-o', +- "$target\\share\\locale\\$lang\\LC_MESSAGES\\$prgm-$majorver.mo", ++ "$target\\share\\libpq\\locale\\$lang\\LC_MESSAGES\\$prgm-$majorver.mo", + $_); + system(@args) && croak("Could not run msgfmt on $dir\\$_"); + print "."; diff --git a/vcpkg/ports/libpq/patches/windows/minimize_install.patch b/vcpkg/ports/libpq/patches/windows/minimize_install.patch new file mode 100644 index 0000000..1d1eb2b --- /dev/null +++ b/vcpkg/ports/libpq/patches/windows/minimize_install.patch @@ -0,0 +1,35 @@ +diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm +index d109b2c90..75c7446e6 100644 +--- a/src/tools/msvc/Install.pm ++++ b/src/tools/msvc/Install.pm +@@ -19,13 +19,13 @@ our (@ISA, @EXPORT_OK); + + my $insttype; + my @client_contribs = ('oid2name', 'pgbench', 'vacuumlo'); +-my @client_program_files = ( +- 'clusterdb', 'createdb', 'createuser', 'dropdb', +- 'dropuser', 'ecpg', 'libecpg', 'libecpg_compat', +- 'libpgtypes', 'libpq', 'pg_basebackup', 'pg_config', +- 'pg_dump', 'pg_dumpall', 'pg_isready', 'pg_receivewal', +- 'pg_recvlogical', 'pg_restore', 'psql', 'reindexdb', +- 'vacuumdb', @client_contribs); ++my @client_program_files = ( 'libecpg','libecpg_compat', 'libpgtypes', 'libpq' ); ++ # 'clusterdb', 'createdb', 'createuser', 'dropdb', ++ # 'dropuser', 'ecpg', 'libecpg', 'libecpg_compat', ++ #'libpgtypes', 'libpq', 'pg_basebackup', 'pg_config', ++ #'pg_dump', 'pg_dumpall', 'pg_isready', 'pg_receivewal', ++ #'pg_recvlogical', 'pg_restore', 'psql', 'reindexdb', ++ #'vacuumdb', @client_contribs); + + sub lcopy + { +@@ -110,7 +110,7 @@ sub Install + CopyFiles( + 'Import libraries', + $target . '/lib/', +- "$conf\\", "postgres\\postgres.lib", "libpgcommon\\libpgcommon.lib", ++ "$conf\\", "libpgcommon\\libpgcommon.lib", + "libpgport\\libpgport.lib"); + CopyContribFiles($config, $target); + CopyIncludeFiles($target); + diff --git a/vcpkg/ports/libpq/patches/windows/msgfmt.patch b/vcpkg/ports/libpq/patches/windows/msgfmt.patch new file mode 100644 index 0000000..352daed --- /dev/null +++ b/vcpkg/ports/libpq/patches/windows/msgfmt.patch @@ -0,0 +1,13 @@ +diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm +index 66c0c3483..2154c6cf6 100644 +--- a/src/tools/msvc/Install.pm ++++ b/src/tools/msvc/Install.pm +@@ -728,7 +728,7 @@ sub GenerateNLSFiles + EnsureDirectories($target, "share/libpq/locale/$lang", + "share/libpq/locale/$lang/LC_MESSAGES"); + my @args = ( +- "$nlspath\\bin\\msgfmt", ++ "msgfmt.exe", + '-o', + "$target\\share\\libpq\\locale\\$lang\\LC_MESSAGES\\$prgm-$majorver.mo", + $_); diff --git a/vcpkg/ports/libpq/patches/windows/openssl_exe_path.patch b/vcpkg/ports/libpq/patches/windows/openssl_exe_path.patch new file mode 100644 index 0000000..533f1c4 --- /dev/null +++ b/vcpkg/ports/libpq/patches/windows/openssl_exe_path.patch @@ -0,0 +1,13 @@ +diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm +index 51711c2bf..d33fdc3b0 100644 +--- a/src/tools/msvc/Solution.pm ++++ b/src/tools/msvc/Solution.pm +@@ -133,7 +133,7 @@ sub GetOpenSSLVersion + # openssl.exe is in the specified directory. + # Quote the .exe name in case it has spaces + my $opensslcmd = +- qq("$self->{options}->{openssl}\\bin\\openssl.exe" version 2>&1); ++ qq("openssl.exe" version 2>&1); + my $sslout = `$opensslcmd`; + + $? >> 8 == 0 diff --git a/vcpkg/ports/libpq/patches/windows/python3_build_Debug.patch b/vcpkg/ports/libpq/patches/windows/python3_build_Debug.patch new file mode 100644 index 0000000..cbc722e --- /dev/null +++ b/vcpkg/ports/libpq/patches/windows/python3_build_Debug.patch @@ -0,0 +1,40 @@ +diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm +index 99f39caa5..21b5559d6 100644 +--- a/src/tools/msvc/Mkvcbuild.pm ++++ b/src/tools/msvc/Mkvcbuild.pm +@@ -494,14 +494,15 @@ sub mkvcbuild + + # Attempt to get python version and location. + # Assume python.exe in specified dir. +- my $pythonprog = "import sys;print(sys.prefix);" +- . "print(str(sys.version_info[0])+str(sys.version_info[1]))"; +- my $prefixcmd = +- $solution->{options}->{python} . "\\python -c \"$pythonprog\""; +- my $pyout = `$prefixcmd`; +- die "Could not query for python version!\n" if $?; +- my ($pyprefix, $pyver) = split(/\r?\n/, $pyout); +- ++ #my $pythonprog = "import sys;print(sys.prefix);" ++ # . "print(str(sys.version_info[0])+str(sys.version_info[1]))"; ++ #my $prefixcmd = ++ # $solution->{options}->{python} . "\\python -c \"$pythonprog\""; ++ #my $pyout = `$prefixcmd`; ++ #die "Could not query for python version!\n" if $?; ++ #my ($pyprefix, $pyver) = split(/\r?\n/, $pyout); ++ my $pyprefix = $solution->{options}->{python}; ++ my $pyver = 37; + # Sometimes (always?) if python is not present, the execution + # appears to work, but gives no data... + die "Failed to query python for version information\n" +@@ -510,8 +511,9 @@ sub mkvcbuild + my $pymajorver = substr($pyver, 0, 1); + my $plpython = $solution->AddProject('plpython' . $pymajorver, + 'dll', 'PLs', 'src/pl/plpython'); +- $plpython->AddIncludeDir($pyprefix . '/include'); +- $plpython->AddLibrary($pyprefix . "/Libs/python$pyver.lib"); ++ $plpython->AddIncludeDir($pyprefix . '/include/python3.7'); ++ $plpython->AddDefine('_DEBUG'); # required for python autolink linking correctly! ++ $plpython->AddLibrary($pyprefix . "/debug/lib/python$pyver" . "_d.lib"); + $plpython->AddReference($postgres); + + # Add transform modules dependent on plpython diff --git a/vcpkg/ports/libpq/patches/windows/python3_build_Release.patch b/vcpkg/ports/libpq/patches/windows/python3_build_Release.patch new file mode 100644 index 0000000..5ac42cf --- /dev/null +++ b/vcpkg/ports/libpq/patches/windows/python3_build_Release.patch @@ -0,0 +1,39 @@ +diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm +index 99f39caa5..21b5559d6 100644 +--- a/src/tools/msvc/Mkvcbuild.pm ++++ b/src/tools/msvc/Mkvcbuild.pm +@@ -494,14 +494,15 @@ sub mkvcbuild + + # Attempt to get python version and location. + # Assume python.exe in specified dir. +- my $pythonprog = "import sys;print(sys.prefix);" +- . "print(str(sys.version_info[0])+str(sys.version_info[1]))"; +- my $prefixcmd = +- $solution->{options}->{python} . "\\python -c \"$pythonprog\""; +- my $pyout = `$prefixcmd`; +- die "Could not query for python version!\n" if $?; +- my ($pyprefix, $pyver) = split(/\r?\n/, $pyout); +- ++ #my $pythonprog = "import sys;print(sys.prefix);" ++ # . "print(str(sys.version_info[0])+str(sys.version_info[1]))"; ++ #my $prefixcmd = ++ # $solution->{options}->{python} . "\\python -c \"$pythonprog\""; ++ #my $pyout = `$prefixcmd`; ++ #die "Could not query for python version!\n" if $?; ++ #my ($pyprefix, $pyver) = split(/\r?\n/, $pyout); ++ my $pyprefix = $solution->{options}->{python}; ++ my $pyver = 37; + # Sometimes (always?) if python is not present, the execution + # appears to work, but gives no data... + die "Failed to query python for version information\n" +@@ -510,8 +511,8 @@ sub mkvcbuild + my $pymajorver = substr($pyver, 0, 1); + my $plpython = $solution->AddProject('plpython' . $pymajorver, + 'dll', 'PLs', 'src/pl/plpython'); +- $plpython->AddIncludeDir($pyprefix . '/include'); +- $plpython->AddLibrary($pyprefix . "/Libs/python$pyver.lib"); ++ $plpython->AddIncludeDir($pyprefix . '/include/python3.7'); ++ $plpython->AddLibrary($pyprefix . "/lib/python$pyver.lib"); + $plpython->AddReference($postgres); + + # Add transform modules dependent on plpython diff --git a/vcpkg/ports/libpq/patches/windows/python_lib.patch b/vcpkg/ports/libpq/patches/windows/python_lib.patch new file mode 100644 index 0000000..8b52e26 --- /dev/null +++ b/vcpkg/ports/libpq/patches/windows/python_lib.patch @@ -0,0 +1,17 @@ +diff --git a/src/pl/plpython/plpython.h b/src/pl/plpython/plpython.h +index 3a1f0d56d..6a8a09a20 100644 +--- a/src/pl/plpython/plpython.h ++++ b/src/pl/plpython/plpython.h +@@ -46,12 +46,10 @@ + #if defined(_MSC_VER) && defined(_DEBUG) + /* Python uses #pragma to bring in a non-default libpython on VC++ if + * _DEBUG is defined */ +-#undef _DEBUG + /* Also hide away errcode, since we load Python.h before postgres.h */ + #define errcode __msvc_errcode + #include + #undef errcode +-#define _DEBUG + #elif defined (_MSC_VER) + #define errcode __msvc_errcode + #include diff --git a/vcpkg/ports/libpq/patches/windows/win_bison_flex.patch b/vcpkg/ports/libpq/patches/windows/win_bison_flex.patch new file mode 100644 index 0000000..95df3f4 --- /dev/null +++ b/vcpkg/ports/libpq/patches/windows/win_bison_flex.patch @@ -0,0 +1,43 @@ +diff --git a/src/tools/msvc/pgflex.pl b/src/tools/msvc/pgflex.pl +index aceed5ffd..f6ed215e8 100644 +--- a/src/tools/msvc/pgflex.pl ++++ b/src/tools/msvc/pgflex.pl +@@ -12,7 +12,7 @@ $ENV{CYGWIN} = 'nodosfilewarning'; + + do './src/tools/msvc/buildenv.pl' if -e 'src/tools/msvc/buildenv.pl'; + +-my ($flexver) = `flex -V`; # grab first line ++my ($flexver) = `win_flex -V`; # grab first line + $flexver = (split(/\s+/, $flexver))[1]; + $flexver =~ s/[^0-9.]//g; + my @verparts = split(/\./, $flexver); +@@ -48,7 +47,7 @@ close($mf); + my $basetarg = basename($output); + my $flexflags = ($make =~ /^$basetarg:\s*FLEXFLAGS\s*=\s*(\S.*)/m ? $1 : ''); + +-system("flex $flexflags -o$output $input"); ++system("win_flex $flexflags -o$output $input"); + if ($? == 0) + { + +diff --git a/src/tools/msvc/pgbison.pl b/src/tools/msvc/pgbison.pl +index 895e398c0..f5b524a5d 100644 +--- a/src/tools/msvc/pgbison.pl ++++ b/src/tools/msvc/pgbison.pl +@@ -9,7 +9,7 @@ use File::Basename; + + do './src/tools/msvc/buildenv.pl' if -e 'src/tools/msvc/buildenv.pl'; + +-my ($bisonver) = `bison -V`; # grab first line ++my ($bisonver) = `win_bison -V`; # grab first line + $bisonver = (split(/\s+/, $bisonver))[3]; # grab version number + + unless ($bisonver eq '1.875' || $bisonver ge '2.2') +@@ -45,5 +45,5 @@ close($mf); + my $basetarg = basename($output); + my $headerflag = ($make =~ /^$basetarg:\s+BISONFLAGS\b.*-d/m ? '-d' : ''); + +-system("bison $headerflag $input -o $output"); ++system("win_bison $headerflag $input -o $output"); + exit $? >> 8; + diff --git a/vcpkg/ports/libpq/portfile.cmake b/vcpkg/ports/libpq/portfile.cmake new file mode 100644 index 0000000..4c8f4fa --- /dev/null +++ b/vcpkg/ports/libpq/portfile.cmake @@ -0,0 +1,306 @@ +set(PORT_VERSION 12.2) + +macro(feature_unsupported) + foreach(_feat ${ARGN}) + if("${FEATURES}" MATCHES "${_feat}") + message(FATAL_ERROR "Feature ${_feat} not supported by configure script on the target platform") + endif() + endforeach() +endmacro() + +macro(feature_not_implemented_yet) + foreach(_feat ${ARGN}) + if("${FEATURES}" MATCHES "${_feat}") + message(FATAL_ERROR "Feature ${_feat} is not yet implement on the target platform") + endif() + endforeach() +endmacro() + +if(VCPKG_TARGET_IS_WINDOWS) + # on windows libpq seems to only depend on openssl gss(kerberos) and ldap on the soruce site_name + # the configuration header depends on zlib, nls, uuid, xml, xlst,gss,openssl,icu + feature_unsupported(readline bonjour libedit systemd llvm) + feature_not_implemented_yet(uuid) +elseif(VCPKG_TARGET_IS_OSX) + feature_not_implemented_yet(readline libedit systemd llvm python tcl uuid) +else() + feature_not_implemented_yet(readline bonjour libedit systemd llvm python tcl uuid) +endif() + +## Download and extract sources +vcpkg_download_distfile(ARCHIVE + URLS "https://ftp.postgresql.org/pub/source/v${PORT_VERSION}/postgresql-${PORT_VERSION}.tar.bz2" + FILENAME "postgresql-${PORT_VERSION}.tar.bz2" + SHA512 0e0ce8e21856e8f43e58b840c10c4e3ffae6d5207e0d778e9176e36f8e20e34633cbb06f0030a7c963c3491bb7e941456d91b55444c561cfc6f283fba76f33ee +) + +set(PATCHES + patches/windows/install.patch + patches/windows/win_bison_flex.patch + patches/windows/openssl_exe_path.patch + patches/windows/Solution.patch + patches/windows/MSBuildProject_fix_gendef_perl.patch + patches/windows/msgfmt.patch + patches/windows/python_lib.patch + patches/linux/configure.patch) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + list(APPEND PATCHES patches/windows/MSBuildProject-static-lib.patch) + list(APPEND PATCHES patches/windows/Mkvcbuild-static-lib.patch) +endif() +if(VCPKG_CRT_LINKAGE STREQUAL static) + list(APPEND PATCHES patches/windows/MSBuildProject-static-crt.patch) +endif() +if(VCPKG_TARGET_ARCHITECTURE MATCHES "arm") + list(APPEND PATCHES patches/windows/arm.patch) + list(APPEND PATCHES patches/windows/host_skip_openssl.patch) # Skip openssl.exe version check since it cannot be executed by the host +endif() +if(NOT "${FEATURES}" MATCHES "client") + list(APPEND PATCHES patches/windows/minimize_install.patch) +else() + set(HAS_TOOLS TRUE) +endif() +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES ${PATCHES} +) +unset(buildenv_contents) +# Get paths to required programs +set(REQUIRED_PROGRAMS PERL) +if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND REQUIRED_PROGRAMS BISON FLEX) +endif() +foreach(program_name ${REQUIRED_PROGRAMS}) + # Need to rename win_bison and win_flex to just bison and flex + vcpkg_find_acquire_program(${program_name}) + get_filename_component(${program_name}_EXE_PATH ${${program_name}} DIRECTORY) + vcpkg_add_to_path(PREPEND "${${program_name}_EXE_PATH}") + set(buildenv_contents "${buildenv_contents}\n\$ENV{'PATH'}=\$ENV{'PATH'} . ';${${program_name}_EXE_PATH}';") +endforeach() + +## Setup build types +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE MATCHES "[Rr][Ee][Ll][Ee][Aa][Ss][Ee]") + set(_buildtype RELEASE) + set(_short rel) + list(APPEND port_config_list ${_buildtype}) + set(INSTALL_PATH_SUFFIX_${_buildtype} "") + set(BUILDPATH_${_buildtype} "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${_short}") + file(REMOVE_RECURSE "${BUILDPATH_${_buildtype}}") #Clean old builds + set(PACKAGE_DIR_${_buildtype} ${CURRENT_PACKAGES_DIR}) + unset(_short) + unset(_buildtype) +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE MATCHES "[Dd][Ee][Bb][Uu][Gg]") + set(_buildtype DEBUG) + set(_short dbg) + list(APPEND port_config_list ${_buildtype}) + set(INSTALL_PATH_SUFFIX_${_buildtype} "/debug") + set(BUILDPATH_${_buildtype} "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${_short}") + file(REMOVE_RECURSE "${BUILDPATH_${_buildtype}}") #Clean old builds + set(PACKAGE_DIR_${_buildtype} ${CURRENT_PACKAGES_DIR}${INSTALL_PATH_SUFFIX_${_buildtype}}) + unset(_short) + unset(_buildtype) +endif() + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +## Do the build +if(VCPKG_TARGET_IS_WINDOWS) + file(GLOB SOURCE_FILES ${SOURCE_PATH}/*) + foreach(_buildtype ${port_config_list}) + # Copy libpq sources. + message(STATUS "Copying libpq source files to ${BUILDPATH_${_buildtype}}...") + foreach(SOURCE_FILE ${SOURCE_FILES}) + file(COPY ${SOURCE_FILE} DESTINATION "${BUILDPATH_${_buildtype}}") + endforeach() + message(STATUS "Copying libpq source files... done") + + vcpkg_apply_patches( + SOURCE_PATH "${BUILDPATH_${_buildtype}}" + PATCHES patches/windows/Solution_${_buildtype}.patch + patches/windows/python3_build_${_buildtype}.patch + ) + message(STATUS "Patches applied!") + file(COPY "${CURRENT_PORT_DIR}/config.pl" DESTINATION "${BUILDPATH_${_buildtype}}/src/tools/msvc") + + set(MSPROJ_PERL "${BUILDPATH_${_buildtype}}/src/tools/msvc/MSBuildProject.pm") + file(READ "${MSPROJ_PERL}" _contents) + string(REPLACE "perl" "\"${PERL}\"" _contents "${_contents}") + file(WRITE "${MSPROJ_PERL}" "${_contents}") + + set(CONFIG_FILE "${BUILDPATH_${_buildtype}}/src/tools/msvc/config.pl") + file(READ "${CONFIG_FILE}" _contents) + + ## ldap => undef, # --with-ldap + ## extraver => undef, # --with-extra-version= + ## gss => undef, # --with-gssapi= + ## icu => undef, # --with-icu= ##done + ## nls => undef, # --enable-nls= ##done + ## tap_tests => undef, # --enable-tap-tests + ## tcl => undef, # --with-tcl= #done + ## perl => undef, # --with-perl + ## python => undef, # --with-python= ##done + ## openssl => undef, # --with-openssl= ##done + ## uuid => undef, # --with-ossp-uuid + ## xml => undef, # --with-libxml= ##done + ## xslt => undef, # --with-libxslt= ##done + ## iconv => undef, # (not in configure, path to iconv) ##done (needed by xml) + ## zlib => undef # --with-zlib= ##done + + ## Setup external dependencies + ##"-DFEATURES=core;openssl;zlib" "-DALL_FEATURES=openssl;zlib;readline;libedit;python;tcl;nls;systemd;llvm;icu;bonjour;uuid;xml;xslt;" + if("${FEATURES}" MATCHES "icu") + string(REPLACE "icu => undef" "icu => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}") + endif() + if("${FEATURES}" MATCHES "nls") + string(REPLACE "nls => undef" "nls => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}") + vcpkg_acquire_msys(MSYS_ROOT PACKAGES gettext) + vcpkg_add_to_path("${MSYS_ROOT}/usr/bin") + endif() + if("${FEATURES}" MATCHES "openssl") + set(buildenv_contents "${buildenv_contents}\n\$ENV{'PATH'}=\$ENV{'PATH'} . ';${CURRENT_INSTALLED_DIR}/tools/openssl';") + #set(_contents "${_contents}\n\$ENV{PATH}=\$ENV{PATH} . ';${CURRENT_INSTALLED_DIR}/tools/openssl';") + string(REPLACE "openssl => undef" "openssl => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}") + endif() + if("${FEATURES}" MATCHES "python") + #vcpkg_find_acquire_program(PYTHON3) + #get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) + #vcpkg_add_to_path("${PYTHON3_EXE_PATH}") + string(REPLACE "python => undef" "python => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}") + endif() + if("${FEATURES}" MATCHES "tcl") + string(REPLACE "tcl => undef" "tcl => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}") + endif() + if("${FEATURES}" MATCHES "xml") + string(REPLACE "xml => undef" "xml => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}") + string(REPLACE "iconv => undef" "iconv => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}") + endif() + + if("${FEATURES}" MATCHES "xslt") + string(REPLACE "xslt => undef" "xslt => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}") + endif() + + if("${FEATURES}" MATCHES "zlib") + string(REPLACE "zlib => undef" "zlib => \"${CURRENT_INSTALLED_DIR}\"" _contents "${_contents}") + endif() + + file(WRITE "${CONFIG_FILE}" "${_contents}") + file(WRITE "${BUILDPATH_${_buildtype}}/src/tools/msvc/buildenv.pl" "${buildenv_contents}") + vcpkg_get_windows_sdk(VCPKG_TARGET_PLATFORM_VERSION) + set(ENV{MSBFLAGS} "/p:PlatformToolset=${VCPKG_PLATFORM_TOOLSET} + /p:VCPkgLocalAppDataDisabled=true + /p:UseIntelMKL=No + /p:WindowsTargetPlatformVersion=${VCPKG_TARGET_PLATFORM_VERSION} + /m + /p:ForceImportBeforeCppTargets=\"${SCRIPTS}/buildsystems/msbuild/vcpkg.targets\" + /p:VcpkgTriplet=${TARGET_TRIPLET} + /p:VcpkgCurrentInstalledDir=\"${CURRENT_INSTALLED_DIR}\"" + ) + if(HAS_TOOLS) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + set(ENV{MSBFLAGS} "$ENV{MSBFLAGS} /p:Platform=Win32") + endif() + message(STATUS "Building libpq ${TARGET_TRIPLET}-${_buildtype}...") + vcpkg_execute_required_process( + COMMAND ${PERL} build.pl ${_buildtype} + WORKING_DIRECTORY ${BUILDPATH_${_buildtype}}/src/tools/msvc + LOGNAME build-${TARGET_TRIPLET}-${_buildtype} + ) + message(STATUS "Building libpq ${TARGET_TRIPLET}-${_buildtype}... done") + else() + set(build_libs libpq libecpg_compat) + foreach(build_lib ${build_libs}) + message(STATUS "Building ${build_lib} ${TARGET_TRIPLET}-${_buildtype}...") + vcpkg_execute_required_process( + COMMAND ${PERL} build.pl ${_buildtype} ${build_lib} + WORKING_DIRECTORY ${BUILDPATH_${_buildtype}}/src/tools/msvc + LOGNAME build-${build_lib}-${TARGET_TRIPLET}-${_buildtype} + ) + message(STATUS "Building ${build_lib} ${TARGET_TRIPLET}-${_buildtype}... done") + endforeach() + endif() + + message(STATUS "Installing libpq ${TARGET_TRIPLET}-${_buildtype}...") + vcpkg_execute_required_process( + COMMAND ${PERL} install.pl ${CURRENT_PACKAGES_DIR}${INSTALL_PATH_SUFFIX_${_buildtype}} client + WORKING_DIRECTORY ${BUILDPATH_${_buildtype}}/src/tools/msvc + LOGNAME install-${TARGET_TRIPLET}-${_buildtype} + ) + message(STATUS "Installing libpq ${TARGET_TRIPLET}-${_buildtype}... done") + endforeach() + + + message(STATUS "Cleanup libpq ${TARGET_TRIPLET}...") + #Cleanup + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/symbols) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/symbols) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() + + if(NOT HAS_TOOLS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) + else() + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + endif() + + message(STATUS "Cleanup libpq ${TARGET_TRIPLET}... - done") +else() + file(COPY ${CMAKE_CURRENT_LIST_DIR}/Makefile DESTINATION ${SOURCE_PATH}) + + if("${FEATURES}" MATCHES "openssl") + list(APPEND BUILD_OPTS --with-openssl) + endif() + if(NOT "${FEATURES}" MATCHES "zlib") + list(APPEND BUILD_OPTS --without-zlib) + endif() + if(NOT "${FEATURES}" MATCHES "readline") + list(APPEND BUILD_OPTS --without-readline) + endif() + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + COPY_SOURCE + OPTIONS + ${BUILD_OPTS} + --with-includes=${CURRENT_INSTALLED_DIR}/include + OPTIONS_RELEASE + --with-libraries=${CURRENT_INSTALLED_DIR}/lib + OPTIONS_DEBUG + --with-libraries=${CURRENT_INSTALLED_DIR}/debug/lib + --enable-debug + ) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(ENV{LIBPQ_LIBRARY_TYPE} shared) + else() + set(ENV{LIBPQ_LIBRARY_TYPE} static) + endif() + vcpkg_install_make() + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + if(NOT HAS_TOOLS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + else() + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + endif() +endif() +#vcpkg_copy_pdbs() + +#if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/libpq.lib") + #RENAME debug library due to CMake. In general that is a bad idea but it will have consquences for the generated cmake targets + # of other ports if not renamed. Maybe a vcpkg_cmake_wrapper is required here to correct the target information if the rename is removed? +# file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/libpq.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/libpqd.lib") +#endif() + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/postgresql) +file(INSTALL ${CURRENT_PORT_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/postgresql) +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libpq/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/libpq/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..5fd40d2 --- /dev/null +++ b/vcpkg/ports/libpq/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,17 @@ +# Give the CMake module a little bit of help to find the debug libraries +find_library(PostgreSQL_LIBRARY_DEBUG +NAMES pq +PATHS + "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" +NO_DEFAULT_PATH +) +_find_package(${ARGS}) +if(PostgreSQL_FOUND) + find_library(PostgreSQL_DL_LIBRARY NAMES dl) + if(PostgreSQL_DL_LIBRARY) + list(APPEND PostgreSQL_LIBRARIES "dl") + if(TARGET PostgreSQL::PostgreSQL) + set_property(TARGET PostgreSQL::PostgreSQL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "dl") + endif() + endif() +endif() diff --git a/vcpkg/ports/libpqxx/CMakeLists.txt b/vcpkg/ports/libpqxx/CMakeLists.txt new file mode 100644 index 0000000..00575c4 --- /dev/null +++ b/vcpkg/ports/libpqxx/CMakeLists.txt @@ -0,0 +1,77 @@ +cmake_minimum_required(VERSION 3.5) +project(libpqxx VERSION 6.4.3 LANGUAGES CXX) + +set(CMAKE_DEBUG_POSTFIX "d") +set(CMAKE_CXX_STANDARD 14) + +find_library(LIBPQD NAMES libpqd pqd) +find_library(LIBPQ NAMES libpq pq) +find_path(LIBPQ_FE_H libpq-fe.h) +find_path(POSTGRES_EXT_H postgres_ext.h) + +include(CheckIncludeFileCXX) + +check_include_file_cxx(poll.h HAVE_POLL) +check_include_file_cxx(sys/select.h HAVE_SYS_SELECT_H) +check_include_file_cxx(sys/time.h HAVE_SYS_TIME_H) +check_include_file_cxx(sys/types.h HAVE_SYS_TYPES_H) +check_include_file_cxx(unistd.h HAVE_UNISTD_H) + +include(CheckCXXSourceCompiles) + +check_cxx_source_compiles("[[deprecated]] void f(); +int main() { return 0; }" PQXX_HAVE_DEPRECATED) +check_cxx_source_compiles("#include +int main() { return std::optional(0).value(); }" PQXX_HAVE_OPTIONAL) +check_cxx_source_compiles("#include +int main() { return std::experimental::optional(0).value(); }" PQXX_HAVE_EXP_OPTIONAL) + +configure_file(config-internal-compiler.h.in pqxx/config-internal-compiler.h) +configure_file(config-public-compiler.h.in pqxx/config-public-compiler.h) + +file(GLOB SRCS "${PROJECT_SOURCE_DIR}/src/*.cxx") + +if(BUILD_SHARED_LIBS) + set(TARGET libpqxx) + set(SHARED_DEFINITION -DPQXX_SHARED) + if(MSVC) + list(APPEND SRCS "${PROJECT_SOURCE_DIR}/win32/libpqxx.cxx") + endif() +else() + set(TARGET libpqxx_static) + set(SHARED_DEFINITION "") +endif() + +IF(UNIX) + set(TARGET pqxx_static) +ENDIF() + +add_library(${TARGET} ${SRCS}) +target_compile_definitions(${TARGET} PRIVATE -DPQXX_INTERNAL -DNOMINMAX ${SHARED_DEFINITION}) +target_include_directories(${TARGET} PRIVATE include ${LIBPQ_FE_H} ${POSTGRES_EXT_H} ${CMAKE_BINARY_DIR}) +target_link_libraries(${TARGET} PRIVATE ws2_32) +if(LIBPQD AND LIBPQ) + target_link_libraries(${TARGET} PRIVATE debug ${LIBPQD} optimized ${LIBPQ}) +elseif(LIBPQD) + target_link_libraries(${TARGET} PRIVATE ${LIBPQD}) +else() + target_link_libraries(${TARGET} PRIVATE ${LIBPQ}) +endif() + +install(TARGETS ${TARGET} + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + ) +install(DIRECTORY include/ DESTINATION include + CONFIGURATIONS Release + PATTERN "doc" EXCLUDE + PATTERN "*.am" EXCLUDE + PATTERN "*.in" EXCLUDE + PATTERN "*.template" EXCLUDE + PATTERN "CMakeLists.txt" EXCLUDE + ) +install(DIRECTORY ${CMAKE_BINARY_DIR}/pqxx/ DESTINATION include/pqxx + CONFIGURATIONS Release + FILES_MATCHING PATTERN "*.h" + ) diff --git a/vcpkg/ports/libpqxx/CONTROL b/vcpkg/ports/libpqxx/CONTROL new file mode 100644 index 0000000..f118a48 --- /dev/null +++ b/vcpkg/ports/libpqxx/CONTROL @@ -0,0 +1,5 @@ +Source: libpqxx +Version: 6.4.5-3 +Homepage: https://github.com/jtv/libpqxx +Description: The official C++ client API for PostgreSQL +Build-Depends: libpq[core] diff --git a/vcpkg/ports/libpqxx/config-internal-compiler.h.in b/vcpkg/ports/libpqxx/config-internal-compiler.h.in new file mode 100644 index 0000000..6a5f07f --- /dev/null +++ b/vcpkg/ports/libpqxx/config-internal-compiler.h.in @@ -0,0 +1,14 @@ +/* System supports poll(). */ +#cmakedefine HAVE_POLL 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_UNISTD_H 1 diff --git a/vcpkg/ports/libpqxx/config-public-compiler.h.in b/vcpkg/ports/libpqxx/config-public-compiler.h.in new file mode 100644 index 0000000..2447970 --- /dev/null +++ b/vcpkg/ports/libpqxx/config-public-compiler.h.in @@ -0,0 +1,8 @@ +/* Define if compiler supports [[deprecated]] attribute */ +#cmakedefine PQXX_HAVE_DEPRECATED 1 + +/* Define if the compiler supports std::experimental::optional. */ +#cmakedefine PQXX_HAVE_EXP_OPTIONAL 1 + +/* Define if the compiler supports std::optional. */ +#cmakedefine PQXX_HAVE_OPTIONAL 1 diff --git a/vcpkg/ports/libpqxx/fix-deprecated-bug.patch b/vcpkg/ports/libpqxx/fix-deprecated-bug.patch new file mode 100644 index 0000000..d3486be --- /dev/null +++ b/vcpkg/ports/libpqxx/fix-deprecated-bug.patch @@ -0,0 +1,40 @@ +diff --git a/include/pqxx/tablereader.hxx b/include/pqxx/tablereader.hxx +index f5300cb..0cc0e43 100644 +--- a/include/pqxx/tablereader.hxx ++++ b/include/pqxx/tablereader.hxx +@@ -34,13 +34,13 @@ public: + const std::string &Name, + const std::string &Null=std::string{}); + template +- PQXX_DEPRECATED tablereader( ++ tablereader( + transaction_base &, + const std::string &Name, + ITER begincolumns, + ITER endcolumns); + template +- PQXX_DEPRECATED tablereader( ++ tablereader( + transaction_base &, + const std::string &Name, + ITER begincolumns, +diff --git a/include/pqxx/tablewriter.hxx b/include/pqxx/tablewriter.hxx +index 32e7a98..a25b356 100644 +--- a/include/pqxx/tablewriter.hxx ++++ b/include/pqxx/tablewriter.hxx +@@ -36,13 +36,13 @@ public: + const std::string &WName, + const std::string &Null=std::string{}); + template +- PQXX_DEPRECATED tablewriter( ++ tablewriter( + transaction_base &, + const std::string &WName, + ITER begincolumns, + ITER endcolumns); + template +- PQXX_DEPRECATED tablewriter( ++ tablewriter( + transaction_base &T, + const std::string &WName, + ITER begincolumns, diff --git a/vcpkg/ports/libpqxx/portfile.cmake b/vcpkg/ports/libpqxx/portfile.cmake new file mode 100644 index 0000000..85e9ced --- /dev/null +++ b/vcpkg/ports/libpqxx/portfile.cmake @@ -0,0 +1,25 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jtv/libpqxx + REF a6b1d60e74c1427c8ac2324b85cd4a0dc2068332 + SHA512 990083f738322283dc9c98b138a676e5ba04ab77794d5a51d672557e0562d2366b5085ad5571dd91af8ba4dea56baa94e8c1e4e6fe571341c95e92eb28d2b15a + HEAD_REF master + PATCHES + fix-deprecated-bug.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config-public-compiler.h.in DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config-internal-compiler.h.in DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libpqxx RENAME copyright) diff --git a/vcpkg/ports/libproxy/CONTROL b/vcpkg/ports/libproxy/CONTROL new file mode 100644 index 0000000..1855f99 --- /dev/null +++ b/vcpkg/ports/libproxy/CONTROL @@ -0,0 +1,26 @@ +Source: libproxy +Version: 0.4.15-2 +Homepage: https://github.com/libproxy/libproxy +Description: libproxy is a library that provides automatic proxy configuration management. +Build-Depends: libmodman + +Feature: bindings-csharp +Description: Install C# bindings + +Feature: bindings-python +Description: Install Python bindings + +Feature: bindings-perl +Description: Install PERL bindings + +Feature: bindings-ruby +Description: Install Ruby bindings + +Feature: bindings-vala +Description: Install Vala bindings + +Feature: tools +Description: build tools + +Feature: tests +Description: Build libproxy tests diff --git a/vcpkg/ports/libproxy/fix-arm-build.patch b/vcpkg/ports/libproxy/fix-arm-build.patch new file mode 100644 index 0000000..ad898c8 --- /dev/null +++ b/vcpkg/ports/libproxy/fix-arm-build.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 51b0e5e..aa94b87 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -51,6 +51,10 @@ else() + endif() + endif() + ++if (WIN32) ++ link_libraries(Advapi32) ++endif() ++ + # Conditionally build bindings + if(NOT WIN32) + add_subdirectory(bindings) diff --git a/vcpkg/ports/libproxy/fix-dependency-libmodman.patch b/vcpkg/ports/libproxy/fix-dependency-libmodman.patch new file mode 100644 index 0000000..c84b86d --- /dev/null +++ b/vcpkg/ports/libproxy/fix-dependency-libmodman.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 451e7a6..b6782fb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -32,13 +32,15 @@ option(WITH_WEBKIT3 "Build against gtk-3 version of webkitgtk" OFF) + ### Subdirectories + # Conditionally build bundled libmodman + option(FORCE_SYSTEM_LIBMODMAN "Force using system libmodman" OFF) +-find_package(libmodman QUIET) ++find_package(libmodman REQUIRED) + if(LIBMODMAN_FOUND) + if("${LIBMODMAN_VERSION_MAJOR}" STREQUAL "2") + message(STATUS "Building with system libmodman") + else() + message(FATAL_ERROR "Found incompatible libmodman on your system (libmodman 2.X is needed)") + endif() ++ include_directories(${LIBMODMAN_INCLUDE_DIR}) ++ link_libraries(${LIBMODMAN_LIBRARIES}) + else() + if(FORCE_SYSTEM_LIBMODMAN) + message(FATAL_ERROR "Libmodman could not be found on your system") diff --git a/vcpkg/ports/libproxy/fix-install-py.patch b/vcpkg/ports/libproxy/fix-install-py.patch new file mode 100644 index 0000000..c429be7 --- /dev/null +++ b/vcpkg/ports/libproxy/fix-install-py.patch @@ -0,0 +1,36 @@ +diff --git a/bindings/python/python3/CMakeLists.txt b/bindings/python/python3/CMakeLists.txt +index bf87dfc..9f94c2d 100644 +--- a/bindings/python/python3/CMakeLists.txt ++++ b/bindings/python/python3/CMakeLists.txt +@@ -21,5 +21,4 @@ if(PYTHON3INTERP_FOUND) + + message(STATUS "Using PYTHON3_SITEPKG_DIR=${PYTHON3_SITEPKG_DIR}") + +- install(FILES ../libproxy.py DESTINATION ${PYTHON3_SITEPKG_DIR}) + endif() +diff --git a/bindings/python/python2/CMakeLists.txt b/bindings/python/python2/CMakeLists.txt +index 00df551..15d78f9 100644 +--- a/bindings/python/python2/CMakeLists.txt ++++ b/bindings/python/python2/CMakeLists.txt +@@ -21,5 +21,4 @@ if(PYTHON2INTERP_FOUND) + + message(STATUS "Using PYTHON2_SITEPKG_DIR=${PYTHON2_SITEPKG_DIR}") + +- install(FILES ../libproxy.py DESTINATION ${PYTHON2_SITEPKG_DIR}) + endif() +diff --git a/bindings/perl/lib/CMakeLists.txt b/bindings/perl/lib/CMakeLists.txt +index 9856627..f54c138 100644 +--- a/bindings/perl/lib/CMakeLists.txt ++++ b/bindings/perl/lib/CMakeLists.txt +@@ -1,2 +1 @@ + add_custom_target(PMlibproxy ALL ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Libproxy.pm ${CMAKE_BINARY_DIR}/perl/blib/lib/Libproxy.pm) +-install( FILES Libproxy.pm DESTINATION ${PX_PERL_ARCH}/Net ) +diff --git a/bindings/perl/src/CMakeLists.txt b/bindings/perl/src/CMakeLists.txt +index 05176c4..9ca532f 100644 +--- a/bindings/perl/src/CMakeLists.txt ++++ b/bindings/perl/src/CMakeLists.txt +@@ -21,4 +21,3 @@ target_link_libraries(PLlibproxy ${PLlibproxy_LIB_DEPENDENCIES}) + set_target_properties(PLlibproxy PROPERTIES OUTPUT_NAME "Libproxy") + set_target_properties(PLlibproxy PROPERTIES PREFIX "") + +-install( TARGETS PLlibproxy DESTINATION ${PX_PERL_ARCH}/auto/Net/Libproxy ) diff --git a/vcpkg/ports/libproxy/fix-module-lib-name.patch b/vcpkg/ports/libproxy/fix-module-lib-name.patch new file mode 100644 index 0000000..a4d8cb2 --- /dev/null +++ b/vcpkg/ports/libproxy/fix-module-lib-name.patch @@ -0,0 +1,13 @@ +diff --git a/libproxy/Findlibproxy.cmake.in b/libproxy/Findlibproxy.cmake.in +index ef44489..c0bd2ae 100644 +--- a/libproxy/Findlibproxy.cmake.in ++++ b/libproxy/Findlibproxy.cmake.in +@@ -12,7 +12,7 @@ + + # Find proxy.h and the corresponding library (libproxy.so) + FIND_PATH(LIBPROXY_INCLUDE_DIR proxy.h ) +-FIND_LIBRARY(LIBPROXY_LIBRARIES NAMES proxy ) ++FIND_LIBRARY(LIBPROXY_LIBRARIES NAMES proxy libproxy) + + # Set library version + SET(LIBPROXY_VERSION @PROJECT_VERSION@) diff --git a/vcpkg/ports/libproxy/fix-tools-path.patch b/vcpkg/ports/libproxy/fix-tools-path.patch new file mode 100644 index 0000000..ba50611 --- /dev/null +++ b/vcpkg/ports/libproxy/fix-tools-path.patch @@ -0,0 +1,27 @@ +diff --git a/libproxy/cmake/pxmodule.cmk b/libproxy/cmake/pxmodule.cmk +index bbbd989..956948a 100644 +--- a/libproxy/cmake/pxmodule.cmk ++++ b/libproxy/cmake/pxmodule.cmk +@@ -20,7 +20,7 @@ function(px_module name build builtin) + add_library(${name} MODULE modules/${name}.cpp) + target_link_libraries(${name} libproxy) + set_target_properties(${name} PROPERTIES PREFIX "") +- install(TARGETS ${name} LIBRARY DESTINATION ${MODULE_INSTALL_DIR}) ++ install(TARGETS ${name} LIBRARY DESTINATION tools) + if(${ARGC} GREATER 3) + target_link_libraries(${name} ${ARGN}) + endif() +diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt +index 52010c6..0a3f4b5 100644 +--- a/utils/CMakeLists.txt ++++ b/utils/CMakeLists.txt +@@ -1,5 +1,7 @@ + include_directories("../libproxy") + ++if (BUILD_TOOLS) + add_executable(proxy proxy.c) + target_link_libraries(proxy libproxy) +-install(TARGETS proxy RUNTIME DESTINATION ${BIN_INSTALL_DIR}) ++install(TARGETS proxy RUNTIME DESTINATION tools) ++endif() +\ No newline at end of file diff --git a/vcpkg/ports/libproxy/portfile.cmake b/vcpkg/ports/libproxy/portfile.cmake new file mode 100644 index 0000000..214e946 --- /dev/null +++ b/vcpkg/ports/libproxy/portfile.cmake @@ -0,0 +1,50 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +# Enable static build in UNIX +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libproxy/libproxy + REF 5924d4223e2b7238607749d977c0a878fe33cdbc #0.4.15 + SHA512 3c3be46e1ccd7e25a9b6e5fd71bfac5c1075bc9230a9a7ca94ee5e82bdbf090ab08dd53d8c6946db1353024409b234b35822d22f95a02cfb48bb54705b07d478 + HEAD_REF master + PATCHES + fix-tools-path.patch + support-windows.patch + fix-dependency-libmodman.patch + fix-install-py.patch + fix-arm-build.patch + fix-module-lib-name.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + bindings-csharp WITH_DOTNET + bindings-python WITH_PYTHON2 + bindings-python WITH_PYTHON3 + bindings-perl WITH_PERL + bindings-vala WITH_VALA + tools BUILD_TOOLS + tests BUILD_TESTING +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DWITH_WEBKIT3=OFF + -DFORCE_SYSTEM_LIBMODMAN=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/Modules) +vcpkg_copy_pdbs() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake + ${CMAKE_CURRENT_LIST_DIR}/usage + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(REMOVE_RECURSE ${LIBPROXY_TOOLS} ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libproxy/support-windows.patch b/vcpkg/ports/libproxy/support-windows.patch new file mode 100644 index 0000000..fdbe801 --- /dev/null +++ b/vcpkg/ports/libproxy/support-windows.patch @@ -0,0 +1,83 @@ +diff --git a/cmake/paths.cmk b/cmake/paths.cmk +index 593ebc1..bbf8754 100644 +--- a/cmake/paths.cmk ++++ b/cmake/paths.cmk +@@ -1,4 +1,4 @@ +-if(WIN32 AND NOT MINGW) ++if(0) + set(CMAKE_INSTALL_PREFIX "" CACHE PATH "Install prefix") + set(BIN_INSTALL_DIR . CACHE PATH "Binary install dir") + set(LIB_INSTALL_DIR . CACHE PATH "Library install dir") +diff --git a/libproxy/cmake/devfiles.cmk b/libproxy/cmake/devfiles.cmk +index 0301dce..0eb5f83 100644 +--- a/libproxy/cmake/devfiles.cmk ++++ b/libproxy/cmake/devfiles.cmk +@@ -1,4 +1,4 @@ +-if(NOT WIN32 OR MINGW) ++if(1) + # PkgConfig file + set (PKGCONFIG_PREFIX ${CMAKE_INSTALL_PREFIX}) + +diff --git a/libproxy/cmake/libproxy.cmk b/libproxy/cmake/libproxy.cmk +index aab7593..465685f 100644 +--- a/libproxy/cmake/libproxy.cmk ++++ b/libproxy/cmake/libproxy.cmk +@@ -21,5 +21,5 @@ set_property(SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/proxy.cpp + set_target_properties(libproxy PROPERTIES PREFIX "" VERSION 1.0.0 SOVERSION 1) + set_target_properties(libproxy PROPERTIES INTERFACE_LINK_LIBRARIES "") + set_target_properties(libproxy PROPERTIES LINK_INTERFACE_LIBRARIES "") +-install(TARGETS libproxy DESTINATION ${LIB_INSTALL_DIR}) ++install(TARGETS libproxy RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) + install(FILES proxy.h DESTINATION ${INCLUDE_INSTALL_DIR}) +diff --git a/libproxy/modules/config_kde.cpp b/libproxy/modules/config_kde.cpp +index b9bd241..73b978e 100644 +--- a/libproxy/modules/config_kde.cpp ++++ b/libproxy/modules/config_kde.cpp +@@ -19,7 +19,9 @@ + ******************************************************************************/ + + #include ++#if !defined(WIN32) + #include ++#endif + + #include + #include +@@ -137,7 +139,11 @@ private: + string command_output(const string &cmdline) throw (runtime_error) { + // Capture stderr as well + const string command = "(" + cmdline + ")2>&1"; ++#if !defined(WIN32) + FILE *pipe = popen(command.c_str(), "r"); ++#else ++ FILE *pipe = _popen(command.c_str(), "r"); ++#endif + if (!pipe) + throw runtime_error("Unable to run command"); + +@@ -148,7 +154,11 @@ private: + result += buffer; // TODO: If this throws bad_alloc, pipe is leaked + } + ++#if !defined(WIN32) + if(pclose(pipe) != 0) ++#else ++ if(_pclose(pipe) != 0) ++#endif + throw runtime_error("Command failed"); + + // Trim newlines and whitespace at end +diff --git a/libproxy/url.cpp b/libproxy/url.cpp +index b61a9bc..021763e 100644 +--- a/libproxy/url.cpp ++++ b/libproxy/url.cpp +@@ -33,7 +33,9 @@ + #include // For atoi() + #include // For stat() + #include // For transform() ++#if !defined(WIN32) + #include // For read() close() ++#endif + + #ifdef WIN32 + #include diff --git a/vcpkg/ports/libproxy/usage b/vcpkg/ports/libproxy/usage new file mode 100644 index 0000000..a37b13c --- /dev/null +++ b/vcpkg/ports/libproxy/usage @@ -0,0 +1,5 @@ +The package libproxy provides CMake targets: + + find_package(libproxy CONFIG REQUIRED) + target_include_directories(main PRIVATE ${LIBPROXY_INCLUDE_DIR}) + target_link_libraries(main PRIVATE ${LIBPROXY_LIBRARIES}) diff --git a/vcpkg/ports/libproxy/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/libproxy/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..6315843 --- /dev/null +++ b/vcpkg/ports/libproxy/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,6 @@ +set(LIBPROXY_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${LIBPROXY_PREV_MODULE_PATH}) diff --git a/vcpkg/ports/libqcow/CMakeLists.txt b/vcpkg/ports/libqcow/CMakeLists.txt new file mode 100644 index 0000000..ac199f4 --- /dev/null +++ b/vcpkg/ports/libqcow/CMakeLists.txt @@ -0,0 +1,83 @@ +cmake_minimum_required(VERSION 3.12) + +project(libqcow C) + +find_package(OpenSSL) +find_package(ZLIB REQUIRED) + +if(MSVC) + add_compile_definitions(_CRT_SECURE_NO_DEPRECATE) + add_compile_definitions(_CRT_NONSTDC_NO_DEPRECATE) +endif() + +add_compile_definitions(HAVE_LOCAL_LIBCAES) +add_compile_definitions(HAVE_LOCAL_LIBCERROR) +add_compile_definitions(HAVE_LOCAL_LIBCTHREADS) +add_compile_definitions(HAVE_LOCAL_LIBCDATA) +add_compile_definitions(HAVE_LOCAL_LIBCLOCALE) +add_compile_definitions(HAVE_LOCAL_LIBCNOTIFY) +add_compile_definitions(HAVE_LOCAL_LIBCSPLIT) +add_compile_definitions(HAVE_LOCAL_LIBCFILE) +add_compile_definitions(HAVE_LOCAL_LIBCPATH) +add_compile_definitions(HAVE_LOCAL_LIBUNA) +add_compile_definitions(HAVE_LOCAL_LIBBFIO) +add_compile_definitions(HAVE_LOCAL_LIBFCACHE) +add_compile_definitions(HAVE_LOCAL_LIBFDATA) +add_compile_definitions(ZLIB_DLL) + +if(UNIX) + configure_file(common/config.h.in common/config.h) + add_compile_definitions(HAVE_CONFIG_H) + add_compile_definitions(LOCALEDIR="/usr/share/locale") +endif() + +if(MSVC) + add_compile_definitions(LIBQCOW_DLL_EXPORT) + set(LIB_RC libqcow/libqcow.rc) +endif() + + +include(GNUInstallDirs) +include(CMakePackageConfigHelpers) + +# Add CMake find_package() integration +set(PROJECT_TARGET_NAME "${PROJECT_NAME}") +set(CONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") +set(PROJECT_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/generated/${PROJECT_TARGET_NAME}Config.cmake") +set(TARGETS_EXPORT_NAME "${PROJECT_TARGET_NAME}Targets") +set(NAMESPACE "libqcow::") + +# Source files +file(GLOB LIB_SRC lib*/*.c) + +# Headers +file(GLOB LIB_INST_HEADERS include/libqcow/*.h) + +add_library(${PROJECT_NAME} ${LIB_SRC} ${LIB_RC}) + +target_include_directories(${PROJECT_NAME} PRIVATE ./include ./common) +target_include_directories(${PROJECT_NAME} PRIVATE ./libbfio ./libcaes ./libcdata ./libcerror ./libcfile ./libclocale) +target_include_directories(${PROJECT_NAME} PRIVATE ./libcnotify ./libcpath ./libcsplit ./libcthreads) +target_include_directories(${PROJECT_NAME} PRIVATE ./libfcache ./libfdata ./libuna) + +target_link_libraries(${PROJECT_NAME} PRIVATE ZLIB::ZLIB OpenSSL::Crypto) + +install(TARGETS ${PROJECT_NAME} + EXPORT ${TARGETS_EXPORT_NAME} + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + INCLUDES DESTINATION include) + +install(FILES ${LIB_INST_HEADERS} DESTINATION include/libqcow) +install(FILES include/libqcow.h DESTINATION include) + + +# Generate and install libqcowConfig.cmake +configure_package_config_file("Config.cmake.in" "${PROJECT_CONFIG}" INSTALL_DESTINATION "${CONFIG_INSTALL_DIR}") +install(FILES "${PROJECT_CONFIG}" DESTINATION "${CONFIG_INSTALL_DIR}") + +# Generate and install libqcowTargets*.cmake +install(EXPORT ${TARGETS_EXPORT_NAME} + NAMESPACE ${NAMESPACE} + DESTINATION "${CONFIG_INSTALL_DIR}") diff --git a/vcpkg/ports/libqcow/CONTROL b/vcpkg/ports/libqcow/CONTROL new file mode 100644 index 0000000..703b77f --- /dev/null +++ b/vcpkg/ports/libqcow/CONTROL @@ -0,0 +1,6 @@ +Source: libqcow +Version: 20200928 +Homepage: https://github.com/libyal/libqcow +Build-Depends: gettext,openssl,zlib +Description: Library and tools to access the QEMU Copy-On-Write (QCOW) image format. +Supports: !uwp diff --git a/vcpkg/ports/libqcow/Config.cmake.in b/vcpkg/ports/libqcow/Config.cmake.in new file mode 100644 index 0000000..bd6bd45 --- /dev/null +++ b/vcpkg/ports/libqcow/Config.cmake.in @@ -0,0 +1,4 @@ +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake") +check_required_components("@PROJECT_NAME@") diff --git a/vcpkg/ports/libqcow/macos_fixes.patch b/vcpkg/ports/libqcow/macos_fixes.patch new file mode 100644 index 0000000..4e3061c --- /dev/null +++ b/vcpkg/ports/libqcow/macos_fixes.patch @@ -0,0 +1,38 @@ +diff --git a/libcfile/libcfile_file.c b/libcfile/libcfile_file.c +index a618083..5299c77 100644 +--- a/libcfile/libcfile_file.c ++++ b/libcfile/libcfile_file.c +@@ -56,7 +56,7 @@ + #elif defined( HAVE_CYGWIN_FS_H ) + #include + +-#elif defined( HAVE_LINUX_FS_H ) ++#elif defined( __linux__ ) && defined( HAVE_LINUX_FS_H ) + /* Required for Linux platforms that use a sizeof( u64 ) + * in linux/fs.h but have no typedef of it + */ +@@ -4128,6 +4128,11 @@ ssize_t libcfile_internal_file_io_control_read_with_error_code( + #error Missing file IO control with data function + #endif + ++// Force disable on Darwin, it can be erroneously defined ++#if defined ( __APPLE__ ) ++#undef HAVE_POSIX_FADVISE ++#endif ++ + /* Read data from a device file using IO control + * Returns the number of bytes read if successful or -1 on error + */ +diff --git a/libqcow/libqcow_i18n.c b/libqcow/libqcow_i18n.c +index 96d1a31..621e748 100644 +--- a/libqcow/libqcow_i18n.c ++++ b/libqcow/libqcow_i18n.c +@@ -40,7 +40,7 @@ int libqcow_i18n_initialize( + + if( libqcow_i18n_initialized == 0 ) + { +-#if defined( HAVE_BINDTEXTDOMAIN ) ++#if !defined( __APPLE__ ) && defined( HAVE_BINDTEXTDOMAIN ) + if( bindtextdomain( + "libqcow", + LOCALEDIR ) == NULL ) diff --git a/vcpkg/ports/libqcow/portfile.cmake b/vcpkg/ports/libqcow/portfile.cmake new file mode 100644 index 0000000..1a26c60 --- /dev/null +++ b/vcpkg/ports/libqcow/portfile.cmake @@ -0,0 +1,37 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +set(LIB_VERSION 20200928) +set(LIB_FILENAME libqcow-alpha-${LIB_VERSION}.tar.gz) + +# Release distribution file contains configured sources, while the source code in the repository does not. +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/libyal/libqcow/releases/download/${LIB_VERSION}/${LIB_FILENAME}" + FILENAME "${LIB_FILENAME}" + SHA512 c0112bb26924b82ea84eb14a5d5b2ec53a421159de97a6136b3af0940453fba1ca46a7f8130429d5f812ccb3625e93aa3e4237278575fe439b918bc14b0565a5 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${LIB_VERSION} + PATCHES macos_fixes.patch +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") +file(COPY "${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in" DESTINATION "${SOURCE_PATH}") + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA +) +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/libqcow" TARGET_PATH "share/libqcow") + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +# License and man +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libqglviewer/CONTROL b/vcpkg/ports/libqglviewer/CONTROL new file mode 100644 index 0000000..b5adc19 --- /dev/null +++ b/vcpkg/ports/libqglviewer/CONTROL @@ -0,0 +1,4 @@ +Source: libqglviewer +Version: 2.7.2-3 +Description: libQGLViewer is an open source C++ library based on Qt that eases the creation of OpenGL 3D viewers. +Build-Depends: qt5-base[core] diff --git a/vcpkg/ports/libqglviewer/destdir.patch b/vcpkg/ports/libqglviewer/destdir.patch new file mode 100644 index 0000000..d1cd4f3 --- /dev/null +++ b/vcpkg/ports/libqglviewer/destdir.patch @@ -0,0 +1,21 @@ +diff --git a/QGLViewer/QGLViewer.pro b/QGLViewer/QGLViewer.pro +index 263a141..51e3359 100644 +--- a/QGLViewer/QGLViewer.pro ++++ b/QGLViewer/QGLViewer.pro +@@ -38,7 +38,6 @@ SOURCES = \ + + HEADERS *= $${QGL_HEADERS} + DISTFILES *= qglviewer-icon.xpm +-DESTDIR = $${PWD} + + TRANSLATIONS = qglviewer_fr.ts + +@@ -273,7 +272,7 @@ win32 { + QMAKE_CXXFLAGS *= -TP -GR + DEFINES += NOMINMAX + win32-msvc { +- QMAKE_CXXFLAGS *= -EHs -FS ++ QMAKE_CXXFLAGS *= -EHs -FS + } else { + QMAKE_CXXFLAGS *= -EHs + } diff --git a/vcpkg/ports/libqglviewer/portfile.cmake b/vcpkg/ports/libqglviewer/portfile.cmake new file mode 100644 index 0000000..0c46c11 --- /dev/null +++ b/vcpkg/ports/libqglviewer/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO GillesDebunne/libQGLViewer + REF fee0916f2af3d0993df51956d2e5a51bbaf0c1f0 #v2.7.2 + SHA512 449bf4ccadaf50d4333bd91050e9b50f440a64229391827aaf4a80ade2c3f5fc60501d2baee885cf1214f7e2a8a04615bafe9ac7da9f866ffa4ebe33b9b999d8 + HEAD_REF master + PATCHES + use-default-config-on-all-platforms.patch + destdir.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(OPTIONS CONFIG*=staticlib) +endif() + +vcpkg_configure_qmake( + SOURCE_PATH ${SOURCE_PATH}/QGLViewer/QGLViewer.pro + OPTIONS ${OPTIONS} +) + +vcpkg_install_qmake() + +file(INSTALL ${SOURCE_PATH}/QGLViewer DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.h") +file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libqglviewer RENAME copyright) diff --git a/vcpkg/ports/libqglviewer/use-default-config-on-all-platforms.patch b/vcpkg/ports/libqglviewer/use-default-config-on-all-platforms.patch new file mode 100644 index 0000000..bd8281f --- /dev/null +++ b/vcpkg/ports/libqglviewer/use-default-config-on-all-platforms.patch @@ -0,0 +1,33 @@ +diff --git a/QGLViewer/QGLViewer.pro b/QGLViewer/QGLViewer.pro +index e0205e5..6db4c81 100644 +--- a/QGLViewer/QGLViewer.pro ++++ b/QGLViewer/QGLViewer.pro +@@ -108,9 +108,6 @@ contains( DEFINES, NO_VECTORIAL_RENDER ) { + # -- U n i x -- + # --------------- + unix { +- CONFIG -= debug debug_and_release +- CONFIG *= release +- + # INCLUDE_DIR and LIB_DIR specify where to install the include files and the library. + # Use qmake INCLUDE_DIR=... LIB_DIR=... , or qmake PREFIX=... to customize your installation. + isEmpty( PREFIX ) { +@@ -250,9 +247,6 @@ macx|darwin-g++ { + # -- W i n d o w s -- + # --------------------- + win32 { +- # Windows requires a debug lib version to link against debug applications +- CONFIG *= debug_and_release build_all +- + # Needed by Intel C++, (icl.exe) so that WINGDIAPI is a defined symbol in gl.h. + DEFINES *= WIN32 + +@@ -279,7 +273,7 @@ win32 { + QMAKE_CXXFLAGS *= -TP -GR + DEFINES += NOMINMAX + win32-msvc { +- QMAKE_CXXFLAGS *= -EH -FS ++ QMAKE_CXXFLAGS *= -EHs -FS + } else { + QMAKE_CXXFLAGS *= -EHs + } diff --git a/vcpkg/ports/libqrencode/CONTROL b/vcpkg/ports/libqrencode/CONTROL new file mode 100644 index 0000000..51ac671 --- /dev/null +++ b/vcpkg/ports/libqrencode/CONTROL @@ -0,0 +1,9 @@ +Source: libqrencode +Version: 4.1.0 +Build-Depends: libpng, libiconv +Homepage: https://github.com/fukuchi/libqrencode +Description: libqrencode - a fast and compact QR Code encoding library + +Feature: tool +Description: Build qrencode tool +Build-Depends: getopt (windows) diff --git a/vcpkg/ports/libqrencode/portfile.cmake b/vcpkg/ports/libqrencode/portfile.cmake new file mode 100644 index 0000000..0097ad6 --- /dev/null +++ b/vcpkg/ports/libqrencode/portfile.cmake @@ -0,0 +1,57 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fukuchi/libqrencode + REF 0f6149e41533a34029e72ff9234a18e0f22ab992 #v4.1.0 + SHA512 7aa215d1a9b06df19bcc0178d241af285d5215f6df994f9e2cf64cde716c7451252380a17e60ef27899bf9039e91306c8eb1948b40ede188d49a25555a94c22a + HEAD_REF master +) + +if("tool" IN_LIST FEATURES) + set(WITH_TOOLS YES) +else() + set(WITH_TOOLS NO) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DWITH_TOOLS=${WITH_TOOLS} + -DWITH_TEST=NO + -DSKIP_INSTALL_PROGRAMS=ON + -DSKIP_INSTALL_EXECUTABLES=ON + -DSKIP_INSTALL_FILES=ON + OPTIONS_DEBUG + -DSKIP_INSTALL_HEADERS=ON + -DWITH_TOOLS=NO +) + +vcpkg_install_cmake() + +if(VCPKG_TARGET_IS_WINDOWS) # Windows + set(EXECUTABLE_SUFFIX ".exe") +else() + set(EXECUTABLE_SUFFIX "") +endif() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/qrencode.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/qrencode.dll ${CURRENT_PACKAGES_DIR}/bin/qrencode.dll) +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/qrencoded.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/qrencoded.dll ${CURRENT_PACKAGES_DIR}/debug/bin/qrencoded.dll) +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/qrencode${EXECUTABLE_SUFFIX}) + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/qrencode") + file(RENAME "${CURRENT_PACKAGES_DIR}/bin/qrencode${EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/qrencode/qrencode${EXECUTABLE_SUFFIX}") + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/qrencode) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) \ No newline at end of file diff --git a/vcpkg/ports/libqrencode/usage b/vcpkg/ports/libqrencode/usage new file mode 100644 index 0000000..f6003f4 --- /dev/null +++ b/vcpkg/ports/libqrencode/usage @@ -0,0 +1,10 @@ +To use libqrencode library in CMakeLists.txt: + + find_path(QRENCODE_INCLUDE_DIR NAMES qrencode.h) + find_library(QRENCODE_LIBRARY_RELEASE qrencode) + find_library(QRENCODE_LIBRARY_DEBUG qrencoded) + set(QRENCODE_LIBRARIES optimized ${QRENCODE_LIBRARY_RELEASE} debug ${QRENCODE_LIBRARY_DEBUG}) + + add_executable(main main.cpp) + target_include_directories(main PRIVATE ${QRENCODE_INCLUDE_DIR}) + target_link_libraries(main PRIVATE ${QRENCODE_LIBRARIES}) diff --git a/vcpkg/ports/librabbitmq/CONTROL b/vcpkg/ports/librabbitmq/CONTROL new file mode 100644 index 0000000..ae06b8b --- /dev/null +++ b/vcpkg/ports/librabbitmq/CONTROL @@ -0,0 +1,5 @@ +Source: librabbitmq +Version: 2020-06-03 +Build-Depends: openssl +Homepage: https://github.com/alanxz/rabbitmq-c +Description: A C-language AMQP client library for use with v2.0+ of the RabbitMQ broker. diff --git a/vcpkg/ports/librabbitmq/fix-uwpwarning.patch b/vcpkg/ports/librabbitmq/fix-uwpwarning.patch new file mode 100644 index 0000000..8961459 --- /dev/null +++ b/vcpkg/ports/librabbitmq/fix-uwpwarning.patch @@ -0,0 +1,13 @@ +diff --git a/librabbitmq/CMakeLists.txt b/librabbitmq/CMakeLists.txt +index bd5369a..f6d703f 100644 +--- a/librabbitmq/CMakeLists.txt ++++ b/librabbitmq/CMakeLists.txt +@@ -113,7 +113,7 @@ set(RABBITMQ_SOURCES + ${AMQP_SSL_SRCS} + ) + +-add_definitions(-DAMQP_BUILD) ++add_definitions(-DAMQP_BUILD -D_CRT_SECURE_NO_WARNINGS) + + set(RMQ_LIBRARIES ${AMQP_SSL_LIBS} ${SOCKET_LIBRARIES} ${LIBRT} ${CMAKE_THREAD_LIBS_INIT}) + diff --git a/vcpkg/ports/librabbitmq/portfile.cmake b/vcpkg/ports/librabbitmq/portfile.cmake new file mode 100644 index 0000000..7957cfb --- /dev/null +++ b/vcpkg/ports/librabbitmq/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO alanxz/rabbitmq-c + REF d416b8b16d196085106cfe137a0ff6919a9f6752 + SHA512 3fc137893fc18509a3e583cc8d40a8e91f219063237b9fd018a65cf14da188914ddba3a031c4bc033a886fed19fc6291d1b28b55458b9163eb6d20425b0474dc + HEAD_REF master + PATCHES + fix-uwpwarning.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_EXAMPLES=OFF + -DBUILD_TESTS=OFF + -DBUILD_TOOLS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/rabbitmq-c TARGET_PATH share/rabbitmq-c) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +file(INSTALL ${SOURCE_PATH}/LICENSE-MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libraqm/CMakeLists.txt b/vcpkg/ports/libraqm/CMakeLists.txt new file mode 100644 index 0000000..9ad1db6 --- /dev/null +++ b/vcpkg/ports/libraqm/CMakeLists.txt @@ -0,0 +1,38 @@ +cmake_minimum_required(VERSION 3.11) + +project(raqm) + +set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_MODULE_PATH}") + +find_package(Freetype REQUIRED) +find_package(Fribidi REQUIRED) +find_package(harfbuzz CONFIG REQUIRED) + +find_path(HARFBUZZ_INCLUDE_DIRS + NAMES hb.h + PATH_SUFFIXES harfbuzz) +find_path(FREETYPE_ADDITIONAL_INCLUDE_DIRS NAMES ft2build.h PATH_SUFFIXES freetype2) + +configure_file(src/raqm-version.h.in src/raqm-version.h) + +add_library(raqm src/raqm.c src/raqm.h src/raqm-version.h) + +target_include_directories(raqm PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/src) +target_include_directories(raqm SYSTEM PUBLIC ${FREETYPE_ADDITIONAL_INCLUDE_DIRS}) +target_include_directories(raqm SYSTEM PUBLIC ${FREETYPE_INCLUDE_DIRS}) +target_include_directories(raqm SYSTEM PUBLIC ${HARFBUZZ_INCLUDE_DIRS}) +target_include_directories(raqm SYSTEM PUBLIC ${FRIBIDI_INCLUDE_DIR}) + +target_link_libraries(raqm PRIVATE Freetype::Freetype) +target_link_libraries(raqm PRIVATE harfbuzz::harfbuzz ${FRIBIDI_LIBRARY}) + +install(TARGETS raqm + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +set(RAQM_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src") +set(RAQM_LIBRARY raqm) +set(RAQM_LIBRARIES ${HARFBUZZ_LIBRARY} ${FRIBIDI_LIBRARY} ${RAQM_LIBRARY}) +file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/src/raqm.h ${CMAKE_CURRENT_BINARY_DIR}/src/raqm-version.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/vcpkg/ports/libraqm/CONTROL b/vcpkg/ports/libraqm/CONTROL new file mode 100644 index 0000000..460e66c --- /dev/null +++ b/vcpkg/ports/libraqm/CONTROL @@ -0,0 +1,5 @@ +Source: libraqm +Version: 0.7.0 +Port-Version: 2 +Description: A library for complex text layout +Build-Depends: freetype, harfbuzz, fribidi \ No newline at end of file diff --git a/vcpkg/ports/libraqm/FindFribidi.cmake b/vcpkg/ports/libraqm/FindFribidi.cmake new file mode 100644 index 0000000..a12bdb6 --- /dev/null +++ b/vcpkg/ports/libraqm/FindFribidi.cmake @@ -0,0 +1,12 @@ +find_path(FRIBIDI_INCLUDE_DIR + NAMES fribidi/fribidi.h) + +set(FRIBIDI_INCLUDE_DIR "${FRIBIDI_INCLUDE_DIR}/fribidi") +find_library(FRIBIDI_LIBRARY NAMES fribidi) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(FriBidi + FOUND_VAR FRIBIDI_FOUND + REQUIRED_VARS FRIBIDI_LIBRARY FRIBIDI_INCLUDE_DIR + VERSION_VAR FRIBIDI_VERSION_STRING +) \ No newline at end of file diff --git a/vcpkg/ports/libraqm/portfile.cmake b/vcpkg/ports/libraqm/portfile.cmake new file mode 100644 index 0000000..702fe8b --- /dev/null +++ b/vcpkg/ports/libraqm/portfile.cmake @@ -0,0 +1,38 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +set(RAQM_VERSION_MAJOR 0) +set(RAQM_VERSION_MINOR 7) +set(RAQM_VERSION_MICRO 0) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO HOST-Oman/libraqm + REF v${RAQM_VERSION_MAJOR}.${RAQM_VERSION_MINOR}.${RAQM_VERSION_MICRO} + SHA512 fe2f5e5707334d72518e720adff4379666ba5c4c045531e92588c5f843d4f56111e7b66ea4e7a061621320fa98f13229624994a950a789a477674d3a359cb58c + HEAD_REF master +) + +file(COPY ${CURRENT_PORT_DIR}/FindFribidi.cmake DESTINATION ${SOURCE_PATH}) +file(COPY ${CURRENT_PORT_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCURRENT_PACKAGES_DIR=${CURRENT_PACKAGES_DIR} + -DRAQM_VERSION_MAJOR=${RAQM_VERSION_MAJOR} + -DRAQM_VERSION_MINOR=${RAQM_VERSION_MINOR} + -DRAQM_VERSION_MICRO=${RAQM_VERSION_MICRO} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libraqm RENAME copyright) + +# Post-build test for cmake libraries +vcpkg_test_cmake(PACKAGE_NAME raqm) diff --git a/vcpkg/ports/libraw/CONTROL b/vcpkg/ports/libraw/CONTROL new file mode 100644 index 0000000..b5cbd73 --- /dev/null +++ b/vcpkg/ports/libraw/CONTROL @@ -0,0 +1,5 @@ +Source: libraw +Version: 201903-3 +Build-Depends: lcms, jasper +Homepage: https://www.libraw.org +Description: raw image decoder library diff --git a/vcpkg/ports/libraw/findlibraw_debug_fix.patch b/vcpkg/ports/libraw/findlibraw_debug_fix.patch new file mode 100644 index 0000000..294963e --- /dev/null +++ b/vcpkg/ports/libraw/findlibraw_debug_fix.patch @@ -0,0 +1,41 @@ +--- a/cmake/modules/FindLibRaw.cmake 2016-11-02 07:09:50.000000000 +0100 ++++ b/cmake/modules/FindLibRaw.cmake 2019-06-03 22:05:28.759307500 +0200 +@@ -31,18 +31,36 @@ + PATH_SUFFIXES libraw + ) + +-FIND_LIBRARY(LibRaw_LIBRARIES NAMES raw ++FIND_LIBRARY(LibRaw_LIBRARY_RELEASE NAMES raw + HINTS + ${PC_LIBRAW_LIBDIR} + ${PC_LIBRAW_LIBRARY_DIRS} + ) + +-FIND_LIBRARY(LibRaw_r_LIBRARIES NAMES raw_r ++FIND_LIBRARY(LibRaw_LIBRARY_DEBUG NAMES rawd ++ HINTS ++ ${PC_LIBRAW_LIBDIR} ++ ${PC_LIBRAW_LIBRARY_DIRS} ++ ) ++ ++INCLUDE(SelectLibraryConfigurations) ++ ++select_library_configurations(LibRaw) ++ ++FIND_LIBRARY(LibRaw_r_LIBRARY_RELEASE NAMES raw_r + HINTS + ${PC_LIBRAW_R_LIBDIR} + ${PC_LIBRAW_R_LIBRARY_DIRS} + ) + ++FIND_LIBRARY(LibRaw_r_LIBRARY_DEBUG NAMES raw_rd ++ HINTS ++ ${PC_LIBRAW_R_LIBDIR} ++ ${PC_LIBRAW_R_LIBRARY_DIRS} ++ ) ++ ++select_library_configurations(LibRaw_r) ++ + IF(LibRaw_INCLUDE_DIR) + FILE(READ ${LibRaw_INCLUDE_DIR}/libraw_version.h _libraw_version_content) + diff --git a/vcpkg/ports/libraw/lcms2_debug_fix.patch b/vcpkg/ports/libraw/lcms2_debug_fix.patch new file mode 100644 index 0000000..b0d48ed --- /dev/null +++ b/vcpkg/ports/libraw/lcms2_debug_fix.patch @@ -0,0 +1,66 @@ +--- a/cmake/modules/FindLCMS2.cmake 2016-11-02 07:09:50.000000000 +0100 ++++ b/cmake/modules/FindLCMS2.cmake 2018-06-02 00:43:27.309100600 +0200 +@@ -13,7 +13,6 @@ + # Redistribution and use is allowed according to the terms of the BSD license. + # For details see the accompanying LICENSE file. + +- + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + if(NOT WIN32) +@@ -29,18 +28,30 @@ + PATH_SUFFIXES lcms2 liblcms2 + ) + +-find_library(LCMS2_LIBRARIES NAMES lcms2 liblcms2 lcms-2 liblcms-2 ++include(SelectLibraryConfigurations) ++ ++find_library(LCMS2_LIBRARY_RELEASE NAMES lcms2 liblcms2 lcms-2 liblcms-2 ++ PATHS ++ ${PC_LCMS2_LIBDIR} ++ ${PC_LCMS2_LIBRARY_DIRS} ++ PATH_SUFFIXES lcms2 ++) ++ ++find_library(LCMS2_LIBRARY_DEBUG NAMES lcms2d liblcms2d lcms-2d liblcms-2d + PATHS + ${PC_LCMS2_LIBDIR} + ${PC_LCMS2_LIBRARY_DIRS} + PATH_SUFFIXES lcms2 + ) + +-if(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARIES) ++select_library_configurations(LCMS2) ++ ++ ++if(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARY) + set(LCMS2_FOUND TRUE) +-else(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARIES) ++else(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARY) + set(LCMS2_FOUND FALSE) +-endif(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARIES) ++endif(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARY) + + if(LCMS2_FOUND) + file(READ ${LCMS2_INCLUDE_DIR}/lcms2.h LCMS2_VERSION_CONTENT) +@@ -50,11 +61,11 @@ + if(NOT LCMS2_FIND_QUIETLY) + string(SUBSTRING ${LCMS2_VERSION} 0 1 LCMS2_MAJOR_VERSION) + string(SUBSTRING ${LCMS2_VERSION} 1 2 LCMS2_MINOR_VERSION) +- message(STATUS "Found lcms version ${LCMS2_MAJOR_VERSION}.${LCMS2_MINOR_VERSION}, ${LCMS2_LIBRARIES}") ++ message(STATUS "Found lcms version ${LCMS2_MAJOR_VERSION}.${LCMS2_MINOR_VERSION}, ${LCMS2_LIBRARY}") + endif(NOT LCMS2_FIND_QUIETLY) + else(LCMS2_VERSION_MATCH) + if(NOT LCMS2_FIND_QUIETLY) +- message(STATUS "Found lcms2 but failed to find version ${LCMS2_LIBRARIES}") ++ message(STATUS "Found lcms2 but failed to find version ${LCMS2_LIBRARY}") + endif(NOT LCMS2_FIND_QUIETLY) + set(LCMS2_VERSION NOTFOUND) + endif(LCMS2_VERSION_MATCH) +@@ -68,5 +79,5 @@ + endif(NOT LCMS2_FIND_QUIETLY) + endif(LCMS2_FOUND) + +-mark_as_advanced(LCMS2_INCLUDE_DIR LCMS2_LIBRARIES LCMS2_VERSION) ++mark_as_advanced(LCMS2_INCLUDE_DIR LCMS2_LIBRARY LCMS2_VERSION) + diff --git a/vcpkg/ports/libraw/portfile.cmake b/vcpkg/ports/libraw/portfile.cmake new file mode 100644 index 0000000..73c6046 --- /dev/null +++ b/vcpkg/ports/libraw/portfile.cmake @@ -0,0 +1,82 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO LibRaw/LibRaw + REF d4f05dd1b9b2d44c8f7e82043cbad3c724db2416 + SHA512 5794521f535163afd7815ad005295301c5e0e2f8b2f34ef0a911d9dd1572c1f456b292777548203f9767957a55782b5bc9041c033190d25d1e9b4240d7df32b9 + HEAD_REF master +) + +vcpkg_from_github( + OUT_SOURCE_PATH LIBRAW_CMAKE_SOURCE_PATH + REPO LibRaw/LibRaw-cmake + REF a71f3b83ee3dccd7be32f9a2f410df4d9bdbde0a + SHA512 607e6f76bcb57534da4f0c864b7a421f1ed49244468b1b52abe77f65aa599cae80715520b3a951294321b812deffd4f163757c9949f337571aa54f414ccc58a5 + HEAD_REF master + PATCHES + findlibraw_debug_fix.patch + lcms2_debug_fix.patch +) + +file(COPY ${LIBRAW_CMAKE_SOURCE_PATH}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${LIBRAW_CMAKE_SOURCE_PATH}/cmake DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DINSTALL_CMAKE_MODULE_PATH=${CURRENT_PACKAGES_DIR}/share/libraw + -DCMAKE_DEBUG_POSTFIX=d +) + +vcpkg_install_cmake() + +file(READ ${CURRENT_PACKAGES_DIR}/include/libraw/libraw_types.h LIBRAW_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + string(REPLACE "#ifdef LIBRAW_NODLL" "#if 1" LIBRAW_H "${LIBRAW_H}") +else() + string(REPLACE "#ifdef LIBRAW_NODLL" "#if 0" LIBRAW_H "${LIBRAW_H}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/libraw/libraw_types.h "${LIBRAW_H}") + +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + # Rename thread-safe version to be "raw.lib". This is unfortunately needed + # because otherwise libraries that build on top of libraw have to choose. + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/raw.lib ${CURRENT_PACKAGES_DIR}/debug/lib/rawd.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/raw_r.lib ${CURRENT_PACKAGES_DIR}/lib/raw.lib) + if(NOT VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/raw_rd.lib ${CURRENT_PACKAGES_DIR}/debug/lib/rawd.lib) + endif() + + # Cleanup + file(GLOB RELEASE_EXECUTABLES ${CURRENT_PACKAGES_DIR}/bin/*.exe) + file(REMOVE ${RELEASE_EXECUTABLES}) + if(NOT VCPKG_BUILD_TYPE STREQUAL "release") + file(GLOB DEBUG_EXECUTABLES ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + file(REMOVE ${DEBUG_EXECUTABLES}) + endif() +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +else() + if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/raw.dll ${CURRENT_PACKAGES_DIR}/debug/bin/rawd.dll) + endif() +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Rename cmake module into a config in order to allow more flexible lookup rules +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libraw/FindLibRaw.cmake ${CURRENT_PACKAGES_DIR}/share/libraw/libraw-config.cmake) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/libraw) +endif() + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + diff --git a/vcpkg/ports/libraw/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/libraw/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..c0ecc48 --- /dev/null +++ b/vcpkg/ports/libraw/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,7 @@ +_find_package(${ARGS}) +find_package(Jasper REQUIRED) +if (Jasper_FOUND) + list(APPEND LibRaw_LIBRARIES ${JASPER_LIBRARIES}) + list(APPEND LibRaw_r_LIBRARIES ${JASPER_LIBRARIES}) +endif () + diff --git a/vcpkg/ports/librdkafka/CONTROL b/vcpkg/ports/librdkafka/CONTROL new file mode 100644 index 0000000..12f1ae2 --- /dev/null +++ b/vcpkg/ports/librdkafka/CONTROL @@ -0,0 +1,23 @@ +Source: librdkafka +Version: 1.5.0 +Description: The Apache Kafka C/C++ library +Homepage: https://github.com/edenhill/librdkafka + +Feature: lz4 +Description: Enable external LZ4 library support +Build-Depends: lz4 + +Feature: ssl +Description: Build with OpenSSL +Build-Depends: openssl + +Feature: zlib +Description: Build with zlib +Build-Depends: zlib + +Feature: zstd +Description: Build with zstd +Build-Depends: zstd + +Feature: snappy +Description: Build with snappy diff --git a/vcpkg/ports/librdkafka/fix-arm64.patch b/vcpkg/ports/librdkafka/fix-arm64.patch new file mode 100644 index 0000000..6a7750c --- /dev/null +++ b/vcpkg/ports/librdkafka/fix-arm64.patch @@ -0,0 +1,21 @@ +diff --git a/src/snappy_compat.h b/src/snappy_compat.h +index acda21ec..bf2fe4c7 100644 +--- a/src/snappy_compat.h ++++ b/src/snappy_compat.h +@@ -89,7 +89,7 @@ struct iovec { + // x86, PowerPC, and ARM64 can simply do these loads and stores native. + #if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) || \ + defined(_M_IX86) || defined(_M_X64) || defined(_M_AMD64) || \ +- defined(__aarch64__) ++ defined(__arm64) || defined(__aarch64__) || defined(__AARCH64EL__) || defined(_M_ARM64) + + #define get_unaligned get_unaligned_direct + #define put_unaligned put_unaligned_direct +@@ -115,6 +115,7 @@ struct iovec { + !defined(__ARM_ARCH_6J__) && \ + !defined(__ARM_ARCH_6K__) && \ + !defined(__ARM_ARCH_6Z__) && \ ++ !defined(__ARM_ARCH_6KZ__) && \ + !defined(__ARM_ARCH_6ZK__) && \ + !defined(__ARM_ARCH_6T2__) + diff --git a/vcpkg/ports/librdkafka/portfile.cmake b/vcpkg/ports/librdkafka/portfile.cmake new file mode 100644 index 0000000..5ae2b69 --- /dev/null +++ b/vcpkg/ports/librdkafka/portfile.cmake @@ -0,0 +1,78 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO edenhill/librdkafka + REF 39796d359898c07ea422849e6d7cd34cd13ec466 #v1.5.0 + SHA512 96bc1e1063d4387483f955315a8523045a308aba5fc40197c805f14ceb12ff5241f98b6937c41ab84094fe39e034e8b11ba66dd4d69a758b6ecb20d56d78cbfe + HEAD_REF master + PATCHES + fix-arm64.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" RDKAFKA_BUILD_STATIC) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + lz4 ENABLE_LZ4_EXT + ssl WITH_SSL + zlib WITH_ZLIB + zstd WITH_ZSTD + snappy WITH_SNAPPY +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DRDKAFKA_BUILD_STATIC=${RDKAFKA_BUILD_STATIC} + -DRDKAFKA_BUILD_EXAMPLES=OFF + -DRDKAFKA_BUILD_TESTS=OFF + -DWITH_BUNDLED_SSL=OFF + ${FEATURE_OPTIONS} + OPTIONS_DEBUG + -DENABLE_DEVEL=ON + -DENABLE_REFCNT_DEBUG=ON + -DENABLE_SHAREDPTR_DEBUG=ON + -DWITHOUT_OPTIMIZATION=ON + OPTIONS_RELEASE + -DENABLE_DEVEL=OFF + -DENABLE_REFCNT_DEBUG=OFF + -DENABLE_SHAREDPTR_DEBUG=OFF + -DWITHOUT_OPTIMIZATION=OFF +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets( + CONFIG_PATH lib/cmake/RdKafka + TARGET_PATH share/rdkafka +) + +if("lz4" IN_LIST FEATURES) + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/share/rdkafka/RdKafkaConfig.cmake + "find_dependency(LZ4)" + "include(\"\${CMAKE_CURRENT_LIST_DIR}/FindLZ4.cmake\")\n find_dependency(LZ4)" + ) +endif() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + foreach(hdr rdkafka.h rdkafkacpp.h) + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/include/librdkafka/${hdr} + "#ifdef LIBRDKAFKA_STATICLIB" + "#if 1 // #ifdef LIBRDKAFKA_STATICLIB" + ) + endforeach() +endif() + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSES.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# Install usage +configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY) diff --git a/vcpkg/ports/librdkafka/usage b/vcpkg/ports/librdkafka/usage new file mode 100644 index 0000000..4f00a6a --- /dev/null +++ b/vcpkg/ports/librdkafka/usage @@ -0,0 +1,4 @@ +The package @PORT@:@TARGET_TRIPLET@ provides CMake targets: + + find_package(RdKafka CONFIG REQUIRED) + target_link_libraries(main PRIVATE RdKafka::rdkafka RdKafka::rdkafka++) diff --git a/vcpkg/ports/librdkafka/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/librdkafka/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..6f32a45 --- /dev/null +++ b/vcpkg/ports/librdkafka/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,45 @@ +include(SelectLibraryConfigurations) + +list(REMOVE_ITEM ARGS "NO_MODULE") +list(REMOVE_ITEM ARGS "CONFIG") +list(REMOVE_ITEM ARGS "MODULE") + +_find_package(${ARGS} CONFIG) + +if(RdKafka_FOUND) + if(TARGET RdKafka::rdkafka) + set(TARGET_NAME RdKafka::rdkafka) + else(TARGET RdKafka::rdkafka++) + set(TARGET_NAME RdKafka::rdkafka++) + endif() + + if(TARGET ${TARGET_NAME} AND NOT DEFINED RdKafka_INCLUDE_DIRS) + get_target_property(_RdKafka_INCLUDE_DIRS ${TARGET_NAME} INTERFACE_INCLUDE_DIRECTORIES) + get_target_property(_RdKafka_LINK_LIBRARIES ${TARGET_NAME} INTERFACE_LINK_LIBRARIES) + + if (CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + get_target_property(_RdKafka_LIBRARY_DEBUG ${TARGET_NAME} IMPORTED_IMPLIB_DEBUG) + get_target_property(_RdKafka_LIBRARY_RELEASE ${TARGET_NAME} IMPORTED_IMPLIB_RELEASE) + endif() + + if(NOT _RdKafka_LIBRARY_DEBUG AND NOT _RdKafka_LIBRARY_RELEASE) + get_target_property(_RdKafka_LIBRARY_DEBUG ${TARGET_NAME} IMPORTED_LOCATION_DEBUG) + get_target_property(_RdKafka_LIBRARY_RELEASE ${TARGET_NAME} IMPORTED_LOCATION_RELEASE) + endif() + + set(RdKafka_INCLUDE_DIR "${_RdKafka_INCLUDE_DIRS}") + set(RdKafka_LIBRARY_DEBUG "${_RdKafka_LIBRARY_DEBUG}") + set(RdKafka_LIBRARY_RELEASE "${_RdKafka_LIBRARY_RELEASE}") + + select_library_configurations(RdKafka) + + list(APPEND RdKafka_LIBRARIES ${_RdKafka_LINK_LIBRARIES}) + list(APPEND RdKafka_LIBRARY ${_RdKafka_LINK_LIBRARIES}) + + unset(_RdKafka_INCLUDE_DIRS) + unset(_RdKafka_LINK_LIBRARIES) + unset(_RdKafka_LIBRARY_DEBUG) + unset(_RdKafka_LIBRARY_DEBUG) + unset(TARGET_NAME) + endif() +endif() \ No newline at end of file diff --git a/vcpkg/ports/libressl/0001-enable-ocspcheck-on-msvc.patch b/vcpkg/ports/libressl/0001-enable-ocspcheck-on-msvc.patch new file mode 100644 index 0000000..fa1884a --- /dev/null +++ b/vcpkg/ports/libressl/0001-enable-ocspcheck-on-msvc.patch @@ -0,0 +1,254 @@ +diff --git a/apps/ocspcheck/CMakeLists.txt b/apps/ocspcheck/CMakeLists.txt +index 3c80458..e8d3bf5 100644 +--- a/apps/ocspcheck/CMakeLists.txt ++++ b/apps/ocspcheck/CMakeLists.txt +@@ -1,5 +1,3 @@ +-if(NOT MSVC) +- + set( + OCSPCHECK_SRC + http.c +@@ -13,13 +11,27 @@ else() + set(OCSPCHECK_SRC ${OCSPCHECK_SRC} compat/memmem.c) + endif() + ++check_function_exists(getopt HAVE_GETOPT) ++if(HAVE_GETOPT) ++ add_definitions(-DHAVE_GETOPT) ++else() ++ set(GETOPT_SRC compat/getopt.c) ++endif() ++ ++check_function_exists(ftruncate HAVE_FTRUNCATE) ++if(HAVE_FTRUNCATE) ++ add_definitions(-DHAVE_FTRUNCATE) ++else() ++ set(FTRUNCATE_SRC compat/ftruncate.c) ++endif() ++ + if(NOT "${OPENSSLDIR}" STREQUAL "") + add_definitions(-DDEFAULT_CA_FILE=\"${OPENSSLDIR}/cert.pem\") + else() + add_definitions(-DDEFAULT_CA_FILE=\"${CMAKE_INSTALL_PREFIX}/etc/ssl/cert.pem\") + endif() + +-add_executable(ocspcheck ${OCSPCHECK_SRC}) ++add_executable(ocspcheck ${OCSPCHECK_SRC} ${GETOPT_SRC} ${FTRUNCATE_SRC}) + target_include_directories(ocspcheck PRIVATE . ./compat ../../include/compat) + target_link_libraries(ocspcheck tls ${OPENSSL_LIBS}) + +@@ -28,5 +40,3 @@ if(ENABLE_LIBRESSL_INSTALL) + install(FILES ocspcheck.8 DESTINATION ${CMAKE_INSTALL_MANDIR}/man8) + + endif(ENABLE_LIBRESSL_INSTALL) +- +-endif() +diff --git a/apps/ocspcheck/compat/ftruncate.c b/apps/ocspcheck/compat/ftruncate.c +new file mode 100644 +index 0000000..e825e50 +--- /dev/null ++++ b/apps/ocspcheck/compat/ftruncate.c +@@ -0,0 +1,17 @@ ++/* ++ * Public domain ++ * ++ * Kinichiro Inoguchi ++ */ ++ ++#ifdef _WIN32 ++ ++#include ++ ++int ++ftruncate(int fd, off_t length) ++{ ++ return _chsize(fd, length); ++} ++ ++#endif +diff --git a/apps/ocspcheck/compat/getopt.c b/apps/ocspcheck/compat/getopt.c +new file mode 100644 +index 0000000..ff05743 +--- /dev/null ++++ b/apps/ocspcheck/compat/getopt.c +@@ -0,0 +1,131 @@ ++/* ++ * Public domain ++ * ++ * EternalPhane ++ */ ++ ++#include ++#include ++ ++#include "getopt.h" ++ ++char *optarg = NULL; ++int optind = 0, optopt = '?'; ++ ++typedef int bool; ++#define true 1 ++#define false 0 ++ ++static int nonopt_begin = 0, nonopt_end = 0; ++ ++void clear_buf(); ++ ++void permute(char *const argv[]) ++{ ++ static char* buf = NULL; ++ if (!argv && buf) ++ return free(buf); ++ if (!buf) ++ atexit(clear_buf); ++ if (nonopt_begin == nonopt_end) ++ { ++ nonopt_begin = nonopt_end = optind; ++ return; ++ } ++ int nonopt_size = nonopt_end - nonopt_begin, ++ opt_size = optind - nonopt_end; ++ if (nonopt_size <= opt_size) ++ { ++ if (!realloc(buf, nonopt_size)) ++ free(buf), buf = malloc(nonopt_size); ++ memcpy(buf, nonopt_begin, nonopt_size); ++ memmove(nonopt_begin, nonopt_end, opt_size); ++ memcpy(nonopt_begin + opt_size, buf, nonopt_size); ++ } ++ else ++ { ++ if (!realloc(buf, opt_size)) ++ free(buf), buf = malloc(opt_size); ++ memcpy(buf, nonopt_end, opt_size); ++ memmove(nonopt_begin + opt_size, nonopt_begin, nonopt_size); ++ memcpy(nonopt_begin, buf, opt_size); ++ } ++ nonopt_begin += opt_size; ++ nonopt_end = optind; ++} ++ ++void clear_buf() ++{ ++ permute(NULL); ++} ++ ++int getopt(int argc, char *const argv[], const char *optstring) ++{ ++ static char *nextchar = NULL; ++ static bool posixly_correct = false, always_return_nonopt = false; ++ if (optind >= argc) ++ return -1; ++ if (!optind) ++ { ++ nonopt_begin = nonopt_end = 0; ++ posixly_correct = '+' == optstring[0] || getenv("POSIXLY_CORRECT"); ++ always_return_nonopt = '-' == optstring[0]; ++ if (posixly_correct || always_return_nonopt) ++ optstring++; ++ } ++ if (!nextchar || !*nextchar) ++ { ++ if (!posixly_correct && !always_return_nonopt) ++ { ++ int temp = optind++; ++ for (;;) ++ { ++ if (++temp >= argc || !strcmp("--", argv[temp])) ++ { ++ permute(argv); ++ if (temp < argc) ++ { ++ optind = temp + 1; ++ permute(argv); ++ } ++ optind = nonopt_begin; ++ return -1; ++ } ++ if ('-' == argv[temp][0] && argv[temp][1]) ++ break; ++ } ++ if (temp > optind) ++ { ++ permute(argv); ++ nonopt_end = optind = temp; ++ } ++ nextchar = argv[optind] + 1; ++ } ++ else ++ { ++ if (++optind >= argc || !strcmp("--", argv[optind])) ++ return -1; ++ if ('-' != argv[optind][0] || !argv[optind][1]) ++ return posixly_correct ? -1 : (optarg = argv[optind++], 1); ++ } ++ } ++ const char *temp = strchr(optstring, *nextchar++); ++ if (!temp) ++ return optopt = *(nextchar - 1), '?'; ++ if (':' == temp[1]) ++ { ++ bool err = false; ++ if (':' == temp[2]) ++ optarg = *nextchar ? nextchar : NULL; ++ else if (*nextchar) ++ optarg = nextchar; ++ else if ('-' != argv[++optind][0]) ++ optarg = argv[optind]; ++ else ++ return nextchar = argv[optind] + 1, ++ optopt = *temp, ++ ':' == optstring[0] ? ':' : '?'; ++ nextchar += strlen(nextchar); ++ } ++ return *temp; ++} +diff --git a/apps/ocspcheck/compat/getopt.h b/apps/ocspcheck/compat/getopt.h +new file mode 100644 +index 0000000..ada142e +--- /dev/null ++++ b/apps/ocspcheck/compat/getopt.h +@@ -0,0 +1,15 @@ ++/* ++ * Public domain ++ * ++ * EternalPhane ++ */ ++ ++#ifndef GETOPT_H__ ++#define GETOPT_H__ ++ ++extern char *optarg; ++extern int optind, opterr, optopt; ++ ++int getopt(int argc, char *const argv[], const char *optstring); ++ ++#endif +\ No newline at end of file +diff --git a/apps/ocspcheck/ocspcheck.c b/apps/ocspcheck/ocspcheck.c +index 551a8fa..c608578 100644 +--- a/apps/ocspcheck/ocspcheck.c ++++ b/apps/ocspcheck/ocspcheck.c +@@ -519,6 +519,10 @@ main(int argc, char **argv) + ssize_t written, w; + short port; + ++#ifndef HAVE_GETOPT ++#include "getopt.h" ++#endif ++ + while ((ch = getopt(argc, argv, "C:i:No:v")) != -1) { + switch (ch) { + case 'C': +diff --git a/include/compat/unistd.h b/include/compat/unistd.h +index f521b94..f11db44 100644 +--- a/include/compat/unistd.h ++++ b/include/compat/unistd.h +@@ -23,6 +23,7 @@ ssize_t pwrite(int d, const void *buf, size_t nbytes, off_t offset); + #include + #include + ++#define STDIN_FILENO 0 + #define STDOUT_FILENO 1 + #define STDERR_FILENO 2 + diff --git a/vcpkg/ports/libressl/0002-suppress-msvc-warnings.patch b/vcpkg/ports/libressl/0002-suppress-msvc-warnings.patch new file mode 100644 index 0000000..7a5bf00 --- /dev/null +++ b/vcpkg/ports/libressl/0002-suppress-msvc-warnings.patch @@ -0,0 +1,47 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a6a7554..b20fd4b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -111,6 +111,11 @@ if(WIN32) + set(PLATFORM_LIBS ${PLATFORM_LIBS} ws2_32) + endif() + ++if(MSVC AND MSVC_VERSION GREATER_EQUAL 1912) ++ message(STATUS "Setting /Qspectre switch") ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Qspectre") ++endif() ++ + if(MSVC) + add_definitions(-Dinline=__inline) + message(STATUS "Using [${CMAKE_C_COMPILER_ID}] compiler") +@@ -123,16 +128,29 @@ if(MSVC) + "C4127" # conditional expression is constant + "C4146" # unary minus operator applied to unsigned type, + # result still unsigned ++ "C4242" # 'identifier' : conversion from 'type1' to 'type2', ++ # possible loss of data + "C4244" # 'argument' : conversion from 'type1' to 'type2', + # possible loss of data + "C4245" # 'conversion' : conversion from 'type1' to 'type2', + # signed/unsigned mismatch ++ "C4255" # 'function' : no function prototype given: ++ # converting '()' to '(void)' + "C4267" # 'var' : conversion from 'size_t' to 'type', + # possible loss of data ++ "C4388" # 'expression': signed/unsigned mismatch + "C4389" # 'operator' : signed/unsigned mismatch ++ "C4464" # relative include path contains '..' ++ "C4668" # 'symbol' is not defined as a preprocessor macro, ++ # replacing with '0' for 'directives' + "C4706" # assignment within conditional expression ++ "C4710" # 'function' : function not inlined ++ "C4711" # function 'function' selected for inline expansion ++ "C4820" # 'bytes' bytes padding added after construct 'member_name' + "C4996" # The POSIX name for this item is deprecated. + # Instead, use the ISO C and C++ conformant name ++ "C5045" # Compiler will insert Spectre mitigation for memory load ++ # if /Qspectre switch specified + ) + elseif(CMAKE_C_COMPILER_ID MATCHES "Intel") + add_definitions(-D_CRT_SUPPRESS_RESTRICT) + diff --git a/vcpkg/ports/libressl/CONTROL b/vcpkg/ports/libressl/CONTROL new file mode 100644 index 0000000..2b7d62e --- /dev/null +++ b/vcpkg/ports/libressl/CONTROL @@ -0,0 +1,8 @@ +Source: libressl +Version: 2.9.1 +Port-Version: 3 +Description: LibreSSL is a version of the TLS/crypto stack forked from OpenSSL in 2014, with goals of modernizing the codebase, improving security, and applying best practice development processes. +Supports: !(uwp|arm) + +Feature: tools +Description: Build openssl and ocspcheck executables diff --git a/vcpkg/ports/libressl/portfile.cmake b/vcpkg/ports/libressl/portfile.cmake new file mode 100644 index 0000000..7e37c20 --- /dev/null +++ b/vcpkg/ports/libressl/portfile.cmake @@ -0,0 +1,77 @@ +if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h") + message(WARNING "Can't build libressl if openssl is installed. Please remove openssl, and try install libressl again if you need it. Build will continue since libressl is a subset of openssl") + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + return() +endif() + +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") + +set(LIBRESSL_VERSION 2.9.1) +set(LIBRESSL_HASH 7051911e566bb093c48a70da72c9981b870e3bf49a167ba6c934eece873084cc41221fbe3cd0c8baba268d0484070df7164e4b937854e716337540a87c214354) + +vcpkg_download_distfile( + LIBRESSL_SOURCE_ARCHIVE + URLS https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${PORT}-${LIBRESSL_VERSION}.tar.gz https://ftp.fau.de/openbsd/LibreSSL/${PORT}-${LIBRESSL_VERSION}.tar.gz + FILENAME ${PORT}-${LIBRESSL_VERSION}.tar.gz + SHA512 ${LIBRESSL_HASH} +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${LIBRESSL_SOURCE_ARCHIVE}" + REF ${LIBRESSL_VERSION} + PATCHES + 0001-enable-ocspcheck-on-msvc.patch + 0002-suppress-msvc-warnings.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + "tools" LIBRESSL_APPS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DLIBRESSL_TESTS=OFF + OPTIONS_DEBUG + -DLIBRESSL_APPS=OFF +) + +vcpkg_install_cmake() + +if("tools" IN_LIST FEATURES) + if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) + set(EXECUTABLE_SUFFIX .exe) + endif() + file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/openssl") + file(RENAME "${CURRENT_PACKAGES_DIR}/bin/openssl${EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/openssl/openssl${EXECUTABLE_SUFFIX}") + file(RENAME "${CURRENT_PACKAGES_DIR}/bin/ocspcheck${EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/openssl/ocspcheck${EXECUTABLE_SUFFIX}") + vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/openssl") +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/bin" + "${CURRENT_PACKAGES_DIR}/debug/bin" + ) +endif() +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/etc/ssl/certs" + "${CURRENT_PACKAGES_DIR}/share/man" + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" +) + +vcpkg_copy_pdbs() + +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + +if((VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) AND (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")) + file(GLOB_RECURSE LIBS "${CURRENT_PACKAGES_DIR}/*.lib") + foreach(LIB ${LIBS}) + string(REGEX REPLACE "(.+)-[0-9]+\\.lib" "\\1.lib" LINK "${LIB}") + execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${LIB}" "${LINK}") + endforeach() +endif() diff --git a/vcpkg/ports/librsvg/CMakeLists.txt b/vcpkg/ports/librsvg/CMakeLists.txt new file mode 100644 index 0000000..b3b3ca8 --- /dev/null +++ b/vcpkg/ports/librsvg/CMakeLists.txt @@ -0,0 +1,164 @@ +cmake_minimum_required(VERSION 3.11) +project(librsvg C) + +find_package(unofficial-cairo CONFIG REQUIRED) +find_package(unofficial-libcroco CONFIG REQUIRED) +find_package(unofficial-glib CONFIG REQUIRED) +find_package(LibXml2 REQUIRED) +if(CMAKE_SYSTEM_NAME MATCHES "Windows") + find_library(PANGO_LIB pango-1.0) + find_library(PANGO_CAIRO_LIB pangocairo-1.0) + find_library(GDK_PIXBUF_LIB gdk_pixbuf-2.0) +elseif(CMAKE_SYSTEM_NAME MATCHES "Linux") + find_library(PANGO_LIB pango-1.0) + find_library(PANGO_CAIRO_LIB pangocairo-1.0) + find_library(GDK_PIXBUF_LIB gdk_pixbuf-2) +else() + find_library(PANGO_LIB pango-1) + find_library(PANGO_CAIRO_LIB pangocairo-1) + find_library(PANGO_FT2_LIB pangoft2-1) + find_library(FONTCONFIG_LIB fontconfig) + find_library(GDK_PIXBUF_LIB gdk_pixbuf-2) +endif() + +find_path(CAIRO_INCLUDE_DIR cairo/cairo.h) + +# Add include directories +include_directories(${CAIRO_INCLUDE_DIR} ${GDK_PIXBUF_INCLUDE_DIR}) + +set(LIBRSVG_SOURCES + librsvg-features.c + rsvg-css.c + rsvg-css.h + rsvg-compat.h + rsvg-defs.c + rsvg-defs.h + rsvg-image.c + rsvg-image.h + rsvg-io.c + rsvg-io.h + rsvg-paint-server.c + rsvg-paint-server.h + rsvg-path.c + rsvg-path.h + rsvg-private.h + rsvg-base-file-util.c + rsvg-filter.c + rsvg-filter.h + rsvg-marker.c + rsvg-marker.h + rsvg-mask.c + rsvg-mask.h + rsvg-shapes.c + rsvg-shapes.h + rsvg-structure.c + rsvg-structure.h + rsvg-styles.c + rsvg-styles.h + rsvg-text.c + rsvg-text.h + rsvg-cond.c + rsvg-base.c + librsvg-enum-types.c + rsvg-cairo-draw.c + rsvg-cairo-draw.h + rsvg-cairo-render.c + rsvg-cairo-render.h + rsvg-cairo-clip.h + rsvg-cairo-clip.c + rsvg.c + rsvg-gobject.c + rsvg-file-util.c + rsvg-size-callback.c + rsvg-size-callback.h + rsvg-xml.c + rsvg-xml.h + rsvg.h + rsvg-cairo.h + librsvg-features.h + librsvg-enum-types.h +) + +set(PIXBUFLOADERSVG_SOURCES + gdk-pixbuf-loader/io-svg.c +) + +if(WIN32) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.win32 ${CMAKE_CURRENT_SOURCE_DIR}/config.h COPYONLY) + add_custom_command(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/rsvg.def + COMMAND echo "EXPORTS" > ${CMAKE_CURRENT_SOURCE_DIR}/rsvg.def + COMMAND ${CMAKE_C_COMPILER} /EP ${CMAKE_CURRENT_SOURCE_DIR}/rsvg.symbols >> ${CMAKE_CURRENT_SOURCE_DIR}/rsvg.def) + list(APPEND LIBRSVG_SOURCES rsvg.def) +else() + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.linux ${CMAKE_CURRENT_SOURCE_DIR}/config.h COPYONLY) + list(APPEND LIBRSVG_SOURCES rsvg.symbols) +endif() + +set(CMAKE_DEBUG_POSTFIX "d") + +add_library(rsvg-2.40 ${LIBRSVG_SOURCES}) +add_library(pixbufloader-svg ${PIXBUFLOADERSVG_SOURCES}) + +target_compile_definitions(rsvg-2.40 PRIVATE -DRSVG_COMPILATION -D_CRT_SECURE_NO_WARNINGS -DSRCDIR="${CMAKE_CURRENT_SOURCE_DIR}") + +target_include_directories(pixbufloader-svg PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) +target_compile_definitions(pixbufloader-svg PRIVATE + -DRSVG_COMPILATION + -D_CRT_SECURE_NO_WARNINGS + -DSRCDIR="${CMAKE_CURRENT_SOURCE_DIR}" + -DGDK_PIXBUF_ENABLE_BACKEND + -DG_LOG_DOMAIN="libpixbufloader-svg") + +target_link_libraries(rsvg-2.40 PRIVATE + unofficial::cairo::cairo + unofficial::libcroco::croco-0.6 + unofficial::glib::gio + unofficial::glib::glib + unofficial::glib::gmodule + unofficial::glib::gobject + ${LIBXML2_LIBRARIES} + ${PANGO_LIB} + ${PANGO_CAIRO_LIB} + ${GDK_PIXBUF_LIB} + ${PANGO_FT2_LIB} + ${FONTCONFIG_LIB} +) +target_link_libraries(pixbufloader-svg PRIVATE + rsvg-2.40 + unofficial::glib::glib + unofficial::glib::gobject + ${GDK_PIXBUF_LIB} +) + +install(TARGETS rsvg-2.40 pixbufloader-svg + EXPORT librsvg-targets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install( + EXPORT librsvg-targets + NAMESPACE unofficial::librsvg:: + FILE unofficial-librsvg-targets.cmake + DESTINATION share/unofficial-librsvg +) + +install(FILES + rsvg.h + rsvg-cairo.h + librsvg-features.h + librsvg-enum-types.h + DESTINATION include/librsvg +) + +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/unofficial-librsvg-config.cmake " +include(CMakeFindDependencyMacro) +find_dependency(unofficial-cairo CONFIG) +find_dependency(unofficial-libcroco CONFIG) +find_dependency(gdk-pixbuf CONFIG) +find_dependency(pango CONFIG) + +include(\${CMAKE_CURRENT_LIST_DIR}/unofficial-librsvg-targets.cmake) +") +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-librsvg-config.cmake DESTINATION share/unofficial-librsvg) diff --git a/vcpkg/ports/librsvg/CONTROL b/vcpkg/ports/librsvg/CONTROL new file mode 100644 index 0000000..380186c --- /dev/null +++ b/vcpkg/ports/librsvg/CONTROL @@ -0,0 +1,5 @@ +Source: librsvg +Version: 2.40.20-2 +Homepage: https://gitlab.gnome.org/GNOME/librsvg +Description: A small library to render Scalable Vector Graphics (SVG) +Build-Depends: cairo, pango, gdk-pixbuf, libcroco \ No newline at end of file diff --git a/vcpkg/ports/librsvg/config.h.linux b/vcpkg/ports/librsvg/config.h.linux new file mode 100644 index 0000000..c3881b8 --- /dev/null +++ b/vcpkg/ports/librsvg/config.h.linux @@ -0,0 +1,89 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define if your file defines LC_MESSAGES. */ +#define HAVE_LC_MESSAGES 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Have the pangoft2 library */ +#define HAVE_PANGOFT2 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strtok_r' function. */ +#define HAVE_STRTOK_R 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "librsvg" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "https://bugzilla.gnome.org/enter_bug.cgi?product=librsvg" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "RSVG" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "RSVG 2.40.20" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "librsvg" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "2.40.20" + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Version number of package */ +#define VERSION "2.40.20" + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif diff --git a/vcpkg/ports/librsvg/portfile.cmake b/vcpkg/ports/librsvg/portfile.cmake new file mode 100644 index 0000000..4c76330 --- /dev/null +++ b/vcpkg/ports/librsvg/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_download_distfile(ARCHIVE + URLS "https://download.gnome.org/sources/librsvg/2.40/librsvg-2.40.20.tar.xz" + FILENAME "librsvg-2.40.20.tar.xz" + SHA512 cdd8224deb4c3786e29f48ed02c32ed9dff5cb15aba574a5ef845801ad3669cfcc3eedb9d359c22213dc7a29de24c363248825adad5877c40abf73b3688ff12f +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +configure_file(${CMAKE_CURRENT_LIST_DIR}/config.h.linux ${SOURCE_PATH}/config.h.linux COPYONLY) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-librsvg TARGET_PATH share/unofficial-librsvg) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +#vcpkg_test_cmake(PACKAGE_NAME unofficial-librsvg) diff --git a/vcpkg/ports/librsync/CONTROL b/vcpkg/ports/librsync/CONTROL new file mode 100644 index 0000000..2b16c9f --- /dev/null +++ b/vcpkg/ports/librsync/CONTROL @@ -0,0 +1,5 @@ +Source: librsync +Version: 2020-09-16 +Description: librsync is a library for calculating and applying network deltas, with an interface designed to ease integration into diverse network applications. +Homepage: http://librsync.sourcefrog.net/ +Supports: !uwp diff --git a/vcpkg/ports/librsync/portfile.cmake b/vcpkg/ports/librsync/portfile.cmake new file mode 100644 index 0000000..6344688 --- /dev/null +++ b/vcpkg/ports/librsync/portfile.cmake @@ -0,0 +1,41 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO librsync/librsync + REF d1938c387e86ab5bbf7cb2e84244229c5bbd5ebf # commit 2020-06-04 + SHA512 2afb844f20e6d74d8874b2022db5c4c4befa09f2cfcf5360ffcdd4fd3ef56270d3ab8de6be76fc68f8648d871c28f3bbe15e4f6f417c0776b542f86ac6a910cb + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_RDIFF:BOOL=OFF + -DENABLE_COMPRESSION:BOOL=OFF + -DENABLE_TRACE:BOOL=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/rsync.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/rsync.dll ${CURRENT_PACKAGES_DIR}/bin/rsync.dll) +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/rsync.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/rsync.dll ${CURRENT_PACKAGES_DIR}/debug/bin/rsync.dll) +endif() + +file(INSTALL + ${SOURCE_PATH}/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright +) + +vcpkg_copy_pdbs() \ No newline at end of file diff --git a/vcpkg/ports/librtmp/CMakeLists.txt b/vcpkg/ports/librtmp/CMakeLists.txt new file mode 100644 index 0000000..9751f3d --- /dev/null +++ b/vcpkg/ports/librtmp/CMakeLists.txt @@ -0,0 +1,56 @@ +cmake_minimum_required(VERSION 3.8) + +project(librtmp C) + +find_package(ZLIB REQUIRED) +find_package(OpenSSL REQUIRED) + +include_directories(${ZLIB_INCLUDE_DIRS}) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) + +set(CMAKE_DEBUG_POSTFIX "d") + +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) + add_definitions(-D_WINSOCK_DEPRECATED_NO_WARNINGS) +endif() + +add_definitions(-DLIBRTMP_ONLY) + +# List the header files +set(HEADERS librtmp/amf.h + librtmp/bytes.h + librtmp/dh.h + librtmp/dhgroups.h + librtmp/handshake.h + librtmp/http.h + librtmp/log.h + librtmp/rtmp.h + librtmp/rtmp_sys.h +) + +# List the source files +set(SRCS librtmp/amf.c + librtmp/hashswf.c + librtmp/log.c + librtmp/parseurl.c + librtmp/rtmp.c +) + +if(MSVC) + set(SRCS_MSVC "librtmp/librtmp.def") +endif() + +add_library(librtmp ${SRCS} ${HEADERS} ${SRCS_MSVC}) + +target_include_directories(librtmp PRIVATE ./librtmp) +target_link_libraries(librtmp PRIVATE ${ZLIB_LIBRARIES} ${OPENSSL_LIBRARIES}) +target_link_libraries(librtmp PRIVATE Ws2_32.lib Winmm.lib) + +install(TARGETS librtmp + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +install(DIRECTORY ${PROJECT_SOURCE_DIR}/librtmp DESTINATION include FILES_MATCHING PATTERN "*.h") diff --git a/vcpkg/ports/librtmp/CONTROL b/vcpkg/ports/librtmp/CONTROL new file mode 100644 index 0000000..9afbe90 --- /dev/null +++ b/vcpkg/ports/librtmp/CONTROL @@ -0,0 +1,5 @@ +Source: librtmp +Version: 2019-11-11_1 +Build-Depends: zlib, openssl +Homepage: https://rtmpdump.mplayerhq.hu +Description: RTMPDump Real-Time Messaging Protocol API diff --git a/vcpkg/ports/librtmp/dh.patch b/vcpkg/ports/librtmp/dh.patch new file mode 100644 index 0000000..4b03453 --- /dev/null +++ b/vcpkg/ports/librtmp/dh.patch @@ -0,0 +1,136 @@ +diff --git a/librtmp/dh.h b/librtmp/dh.h +index 8e285a60c..ea562d200 100644 +--- a/librtmp/dh.h ++++ b/librtmp/dh.h +@@ -139,11 +139,14 @@ typedef BIGNUM * MP_t; + #define MP_setbin(u,buf,len) BN_bn2bin(u,buf) + #define MP_getbin(u,buf,len) u = BN_bin2bn(buf,len,0) + ++ + #define MDH DH + #define MDH_new() DH_new() + #define MDH_free(dh) DH_free(dh) + #define MDH_generate_key(dh) DH_generate_key(dh) + #define MDH_compute_key(secret, seclen, pub, dh) DH_compute_key(secret, pub, dh) ++#define MPH_set_pqg(dh, p, q, g, res) res = DH_set0_pqg(dh, p, q, g) ++#define MPH_set_length(dh, len, res) res = DH_set_length(dh,len) + + #endif + +@@ -152,7 +155,7 @@ typedef BIGNUM * MP_t; + + /* RFC 2631, Section 2.1.5, http://www.ietf.org/rfc/rfc2631.txt */ + static int +-isValidPublicKey(MP_t y, MP_t p, MP_t q) ++isValidPublicKey(const MP_t y,const MP_t p, MP_t q) + { + int ret = TRUE; + MP_t bn; +@@ -211,20 +214,33 @@ DHInit(int nKeyBits) + if (!dh) + goto failed; + +- MP_new(dh->g); ++ MP_t g,p; ++ MP_new(g); + +- if (!dh->g) ++ if (!g) ++ { + goto failed; ++ } + +- MP_gethex(dh->p, P1024, res); /* prime P1024, see dhgroups.h */ ++ DH_get0_pqg(dh, (BIGNUM const**)&p, NULL, NULL); ++ MP_gethex(p, P1024, res); /* prime P1024, see dhgroups.h */ + if (!res) + { + goto failed; + } + +- MP_set_w(dh->g, 2); /* base 2 */ +- +- dh->length = nKeyBits; ++ MP_set_w(g, 2); /* base 2 */ ++ MPH_set_pqg(dh,p,NULL,g, res); ++ if (!res) ++ { ++ MP_free(g); ++ goto failed; ++ } ++ MPH_set_length(dh,nKeyBits, res); ++ if (!res) ++ { ++ goto failed; ++ } + return dh; + + failed: +@@ -250,14 +267,11 @@ DHGenerateKey(MDH *dh) + + MP_gethex(q1, Q1024, res); + assert(res); +- +- res = isValidPublicKey(dh->pub_key, dh->p, q1); ++ res = isValidPublicKey(DH_get0_pub_key(dh), DH_get0_p(dh), q1); + if (!res) +- { +- MP_free(dh->pub_key); +- MP_free(dh->priv_key); +- dh->pub_key = dh->priv_key = 0; +- } ++ { ++ MDH_free(dh); // Cannot set priv_key to nullptr so there is no way to generate a new pub/priv key pair in openssl 1.1.1. ++ } + + MP_free(q1); + } +@@ -272,15 +286,16 @@ static int + DHGetPublicKey(MDH *dh, uint8_t *pubkey, size_t nPubkeyLen) + { + int len; +- if (!dh || !dh->pub_key) ++ MP_t pub = DH_get0_pub_key(dh); ++ if (!dh || !pub) + return 0; + +- len = MP_bytes(dh->pub_key); ++ len = MP_bytes(pub); + if (len <= 0 || len > (int) nPubkeyLen) + return 0; + + memset(pubkey, 0, nPubkeyLen); +- MP_setbin(dh->pub_key, pubkey + (nPubkeyLen - len), len); ++ MP_setbin(pub, pubkey + (nPubkeyLen - len), len); + return 1; + } + +@@ -288,15 +303,16 @@ DHGetPublicKey(MDH *dh, uint8_t *pubkey, size_t nPubkeyLen) + static int + DHGetPrivateKey(MDH *dh, uint8_t *privkey, size_t nPrivkeyLen) + { +- if (!dh || !dh->priv_key) ++ MP_t priv = DH_get0_priv_key(dh); ++ if (!dh || !priv) + return 0; + +- int len = MP_bytes(dh->priv_key); ++ int len = MP_bytes(priv); + if (len <= 0 || len > (int) nPrivkeyLen) + return 0; + + memset(privkey, 0, nPrivkeyLen); +- MP_setbin(dh->priv_key, privkey + (nPrivkeyLen - len), len); ++ MP_setbin(priv, privkey + (nPrivkeyLen - len), len); + return 1; + } + #endif +@@ -322,7 +338,7 @@ DHComputeSharedSecretKey(MDH *dh, uint8_t *pubkey, size_t nPubkeyLen, + MP_gethex(q1, Q1024, len); + assert(len); + +- if (isValidPublicKey(pubkeyBn, dh->p, q1)) ++ if (isValidPublicKey(pubkeyBn, DH_get0_p(dh), q1)) + res = MDH_compute_key(secret, nPubkeyLen, pubkeyBn, dh); + else + res = -1; diff --git a/vcpkg/ports/librtmp/fix_strncasecmp.patch b/vcpkg/ports/librtmp/fix_strncasecmp.patch new file mode 100644 index 0000000..3e0c7ea --- /dev/null +++ b/vcpkg/ports/librtmp/fix_strncasecmp.patch @@ -0,0 +1,20 @@ +diff --git a/librtmp/rtmp_sys.h b/librtmp/rtmp_sys.h +index 6a3f215..1b5ac2a 100644 +--- a/librtmp/rtmp_sys.h ++++ b/librtmp/rtmp_sys.h +@@ -28,11 +28,13 @@ + #include + + #ifdef _MSC_VER /* MSVC */ ++#if _MSC_VER < 1900 + #define snprintf _snprintf +-#define strcasecmp stricmp +-#define strncasecmp strnicmp + #define vsnprintf _vsnprintf + #endif ++#define strcasecmp _stricmp ++#define strncasecmp _strnicmp ++#endif + + #define GetSockError() WSAGetLastError() + #define SetSockError(e) WSASetLastError(e) diff --git a/vcpkg/ports/librtmp/handshake.patch b/vcpkg/ports/librtmp/handshake.patch new file mode 100644 index 0000000..88f5d24 --- /dev/null +++ b/vcpkg/ports/librtmp/handshake.patch @@ -0,0 +1,35 @@ +diff --git a/librtmp/handshake.h b/librtmp/handshake.h +index 98bf3c877..0819152bd 100644 +--- a/librtmp/handshake.h ++++ b/librtmp/handshake.h +@@ -66,9 +66,9 @@ typedef gcry_cipher_hd_t RC4_handle; + #if OPENSSL_VERSION_NUMBER < 0x0090800 || !defined(SHA256_DIGEST_LENGTH) + #error Your OpenSSL is too old, need 0.9.8 or newer with SHA256 + #endif +-#define HMAC_setup(ctx, key, len) HMAC_CTX_init(&ctx); HMAC_Init_ex(&ctx, key, len, EVP_sha256(), 0) +-#define HMAC_crunch(ctx, buf, len) HMAC_Update(&ctx, buf, len) +-#define HMAC_finish(ctx, dig, dlen) HMAC_Final(&ctx, dig, &dlen); HMAC_CTX_cleanup(&ctx) ++#define HMAC_setup(ctx, key, len) ctx = HMAC_CTX_new(); HMAC_Init_ex(ctx, key, len, EVP_sha256(), 0) ++#define HMAC_crunch(ctx, buf, len) HMAC_Update(ctx, buf, len) ++#define HMAC_finish(ctx, dig, dlen) HMAC_Final(ctx, dig, &dlen); HMAC_CTX_free(ctx) + + typedef RC4_KEY * RC4_handle; + #define RC4_alloc(h) *h = malloc(sizeof(RC4_KEY)) +@@ -114,7 +114,7 @@ static void InitRC4Encryption + { + uint8_t digest[SHA256_DIGEST_LENGTH]; + unsigned int digestLen = 0; +- HMAC_CTX ctx; ++ HMAC_CTX *ctx; + + RC4_alloc(rc4keyIn); + RC4_alloc(rc4keyOut); +@@ -263,7 +263,7 @@ HMACsha256(const uint8_t *message, size_t messageLen, const uint8_t *key, + size_t keylen, uint8_t *digest) + { + unsigned int digestLen; +- HMAC_CTX ctx; ++ HMAC_CTX *ctx; + + HMAC_setup(ctx, key, keylen); + HMAC_crunch(ctx, message, messageLen); diff --git a/vcpkg/ports/librtmp/hashswf.patch b/vcpkg/ports/librtmp/hashswf.patch new file mode 100644 index 0000000..fb29549 --- /dev/null +++ b/vcpkg/ports/librtmp/hashswf.patch @@ -0,0 +1,28 @@ +diff --git a/librtmp/hashswf.c b/librtmp/hashswf.c +index 3c56b6922..964a64d01 100644 +--- a/librtmp/hashswf.c ++++ b/librtmp/hashswf.c +@@ -57,10 +57,10 @@ + #include + #include + #include +-#define HMAC_setup(ctx, key, len) HMAC_CTX_init(&ctx); HMAC_Init_ex(&ctx, (unsigned char *)key, len, EVP_sha256(), 0) +-#define HMAC_crunch(ctx, buf, len) HMAC_Update(&ctx, (unsigned char *)buf, len) +-#define HMAC_finish(ctx, dig, dlen) HMAC_Final(&ctx, (unsigned char *)dig, &dlen); +-#define HMAC_close(ctx) HMAC_CTX_cleanup(&ctx) ++#define HMAC_setup(ctx, key, len) ctx = HMAC_CTX_new(); HMAC_Init_ex(ctx, (unsigned char *)key, len, EVP_sha256(), 0) ++#define HMAC_crunch(ctx, buf, len) HMAC_Update(ctx, (unsigned char *)buf, len) ++#define HMAC_finish(ctx, dig, dlen) HMAC_Final(ctx, (unsigned char *)dig, &dlen); ++#define HMAC_close(ctx) HMAC_CTX_free(ctx) + #endif + + extern void RTMP_TLS_Init(); +@@ -289,7 +289,7 @@ leave: + struct info + { + z_stream *zs; +- HMAC_CTX ctx; ++ HMAC_CTX *ctx; + int first; + int zlib; + int size; diff --git a/vcpkg/ports/librtmp/hide_netstackdump.patch b/vcpkg/ports/librtmp/hide_netstackdump.patch new file mode 100644 index 0000000..1cc7c8c --- /dev/null +++ b/vcpkg/ports/librtmp/hide_netstackdump.patch @@ -0,0 +1,58 @@ +diff --git a/librtmp/rtmp.c b/librtmp/rtmp.c +index 0865689..b00710e 100644 +--- a/librtmp/rtmp.c ++++ b/librtmp/rtmp.c +@@ -155,7 +155,7 @@ static int clk_tck; + uint32_t + RTMP_GetTime() + { +-#ifdef _DEBUG ++#if defined(_DEBUG) && !defined(LIBRTMP_ONLY) + return 0; + #elif defined(_WIN32) + return timeGetTime(); +@@ -1381,7 +1381,7 @@ RTMP_ClientPacket(RTMP *r, RTMPPacket *packet) + return bHasMediaPacket; + } + +-#ifdef _DEBUG ++#if defined(_DEBUG) && !defined(LIBRTMP_ONLY) + extern FILE *netstackdump; + extern FILE *netstackdump_read; + #endif +@@ -1469,7 +1469,7 @@ ReadN(RTMP *r, char *buffer, int n) + return FALSE; + } + /*RTMP_Log(RTMP_LOGDEBUG, "%s: %d bytes\n", __FUNCTION__, nBytes); */ +-#ifdef _DEBUG ++#if defined(_DEBUG) && !defined(LIBRTMP_ONLY) + fwrite(ptr, 1, nBytes, netstackdump_read); + #endif + +@@ -3757,7 +3757,7 @@ HandShake(RTMP *r, int FP9HandShake) + + memset(&clientsig[4], 0, 4); + +-#ifdef _DEBUG ++#if defined(_DEBUG) && !defined(LIBRTMP_ONLY) + for (i = 8; i < RTMP_SIG_SIZE; i++) + clientsig[i] = 0xff; + #else +@@ -3829,7 +3829,7 @@ SHandShake(RTMP *r) + memcpy(serversig, &uptime, 4); + + memset(&serversig[4], 0, 4); +-#ifdef _DEBUG ++#if defined(_DEBUG) && !defined(LIBRTMP_ONLY) + for (i = 8; i < RTMP_SIG_SIZE; i++) + serversig[i] = 0xff; + #else +@@ -4298,7 +4298,7 @@ RTMPSockBuf_Send(RTMPSockBuf *sb, const char *buf, int len) + { + int rc; + +-#ifdef _DEBUG ++#if defined(_DEBUG) && !defined(LIBRTMP_ONLY) + fwrite(buf, 1, len, netstackdump); + #endif + diff --git a/vcpkg/ports/librtmp/librtmp.def b/vcpkg/ports/librtmp/librtmp.def new file mode 100644 index 0000000..837e6a3 --- /dev/null +++ b/vcpkg/ports/librtmp/librtmp.def @@ -0,0 +1,109 @@ +EXPORTS + AMF3_Decode + AMF3CD_AddProp + AMF3CD_GetProp + AMF3Prop_Decode + AMF3ReadInteger + AMF3ReadString + + AMF_AddProp + AMF_CountProp + AMF_Decode + AMF_DecodeArray + AMF_DecodeBoolean + AMF_DecodeInt16 + AMF_DecodeInt24 + AMF_DecodeInt32 + AMF_DecodeLongString + AMF_DecodeNumber + AMF_DecodeString + AMF_Dump + AMF_Encode + AMF_EncodeBoolean + AMF_EncodeInt16 + AMF_EncodeInt24 + AMF_EncodeInt32 + AMF_EncodeNamedBoolean + AMF_EncodeNamedNumber + AMF_EncodeNamedString + AMF_EncodeNumber + AMF_EncodeString + AMF_GetProp + AMF_Reset + + AMFProp_Decode + AMFProp_Dump + AMFProp_Encode + AMFProp_GetBoolean + AMFProp_GetName + AMFProp_GetNumber + AMFProp_GetObject + AMFProp_GetString + AMFProp_GetType + AMFProp_IsValid + AMFProp_Reset + AMFProp_SetName + + RTMP_Alloc + RTMP_ClientPacket + RTMP_Close + RTMP_Connect + RTMP_Connect0 + RTMP_Connect1 + RTMP_ConnectStream + RTMP_debuglevel + RTMP_DeleteStream + RTMP_DropRequest + RTMP_EnableWrite + RTMP_FindFirstMatchingProperty + RTMP_FindPrefixProperty + RTMP_Free + RTMP_GetDuration + RTMP_GetNextMediaPacket + RTMP_GetTime + RTMP_HashSWF + RTMP_Init + RTMP_IsConnected + RTMP_IsTimedout + RTMP_LibVersion + RTMP_Log + RTMP_LogGetLevel + RTMP_LogHex + RTMP_LogHexString + RTMP_LogPrintf + RTMP_LogSetCallback + RTMP_LogSetLevel + RTMP_LogSetOutput + RTMP_LogStatus + RTMP_ParsePlaypath + RTMP_ParseURL + RTMP_Pause + RTMP_Read + RTMP_ReadPacket + RTMP_ReconnectStream + RTMP_SendChunk + RTMP_SendClientBW + RTMP_SendCreateStream + RTMP_SendCtrl + RTMP_SendPacket + RTMP_SendPause + RTMP_SendSeek + RTMP_SendServerBW + RTMP_Serve + RTMP_SetBufferMS + RTMP_SetOpt + RTMP_SetupStream + RTMP_SetupURL + RTMP_Socket + RTMP_TLS_Init + RTMP_ToggleStream + RTMP_UpdateBufferMS + RTMP_UserInterrupt + RTMP_Write + RTMPPacket_Alloc + RTMPPacket_Dump + RTMPPacket_Free + RTMPPacket_Reset + RTMPSockBuf_Close + RTMPSockBuf_Fill + RTMPSockBuf_Send diff --git a/vcpkg/ports/librtmp/portfile.cmake b/vcpkg/ports/librtmp/portfile.cmake new file mode 100644 index 0000000..6f4e73e --- /dev/null +++ b/vcpkg/ports/librtmp/portfile.cmake @@ -0,0 +1,31 @@ +set(RTMPDUMP_REVISION c5f04a58fc2aeea6296ca7c44ee4734c18401aa3) + +vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH + URL https://git.ffmpeg.org/rtmpdump + REF ${RTMPDUMP_REVISION} + PATCHES + dh.patch #Openssl 1.1.1 patch + handshake.patch #Openssl 1.1.1 patch + hashswf.patch #Openssl 1.1.1 patch + fix_strncasecmp.patch + hide_netstackdump.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/librtmp.def DESTINATION ${SOURCE_PATH}/librtmp) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# License and man +file(INSTALL ${SOURCE_PATH}/librtmp/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/librtmp RENAME copyright) +file(INSTALL ${SOURCE_PATH}/librtmp/librtmp.3.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/librtmp) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/libsamplerate/CMakeLists.txt b/vcpkg/ports/libsamplerate/CMakeLists.txt new file mode 100644 index 0000000..44ba227 --- /dev/null +++ b/vcpkg/ports/libsamplerate/CMakeLists.txt @@ -0,0 +1,14 @@ +add_library(libsamplerate-0 + samplerate.c + src_sinc.c + src_zoh.c + src_linear.c + ../Win32/libsamplerate-0.def +) + +install(TARGETS libsamplerate-0 + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +install(FILES samplerate.h DESTINATION include) diff --git a/vcpkg/ports/libsamplerate/CONTROL b/vcpkg/ports/libsamplerate/CONTROL new file mode 100644 index 0000000..36e5df9 --- /dev/null +++ b/vcpkg/ports/libsamplerate/CONTROL @@ -0,0 +1,4 @@ +Source: libsamplerate +Version: 0.1.9.0-1 +Homepage: https://www.mega-nerd.com/SRC +Description: Sample Rate Converter for audio diff --git a/vcpkg/ports/libsamplerate/portfile.cmake b/vcpkg/ports/libsamplerate/portfile.cmake new file mode 100644 index 0000000..b2453f8 --- /dev/null +++ b/vcpkg/ports/libsamplerate/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "http://www.mega-nerd.com/SRC/libsamplerate-0.1.9.tar.gz" + FILENAME "libsamplerate-0.1.9.tar.gz" + SHA512 78596657963cbf06785e3e6e1190b093df71da52ca340e75bd8246a962cd79dd1c90fa5527c607cebcb296e2c1ee605015278b274e3b768f2f3fbeb0eadfb728 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/src) +file(COPY ${SOURCE_PATH}/Win32/config.h DESTINATION ${SOURCE_PATH}/src) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/src + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libsamplerate RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/libsbml/CONTROL b/vcpkg/ports/libsbml/CONTROL new file mode 100644 index 0000000..654ea75 --- /dev/null +++ b/vcpkg/ports/libsbml/CONTROL @@ -0,0 +1,49 @@ +Source: libsbml +Version: 5.18.0 +Description: A library for reading / writing SBML files +Default-Features: expat,comp,fbc,groups,layout,render,libxml2 +Supports: !uwp + +Feature: test +Description: Unit testing of libSBMLs implementation +Build-Depends: check + +Feature: bzip2 +Description: bz2 compression support for libsbml +Build-Depends: bzip2 + +Feature: zlib +Description: gzip compression support for libsbml +Build-Depends: zlib + +Feature: expat +Description: libsbml using expat parser +Build-Depends: expat + +Feature: libxml2 +Description: libsbml using libxml2 parser +Build-Depends: libxml2 + +Feature: comp +Description: support for Hierarchical Model Composition + +Feature: fbc +Description: support for Flux Balance Constrant Modeling + +Feature: groups +Description: support for Groups + +Feature: layout +Description: support for Pathway Layouts + +Feature: multi +Description: support for Multistate Modeling + +Feature: qual +Description: support for Qualitative Modeling + +Feature: render +Description: support for Rendering information + +Feature: namespace +Description: Build with the WITH_CPP_NAMESPACE option set to on diff --git a/vcpkg/ports/libsbml/fix-linkage-type.patch b/vcpkg/ports/libsbml/fix-linkage-type.patch new file mode 100644 index 0000000..0818635 --- /dev/null +++ b/vcpkg/ports/libsbml/fix-linkage-type.patch @@ -0,0 +1,22 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index eb692cf..11158db 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -524,7 +524,7 @@ INSTALL( + endif() + + +-endif() ++else() + + add_library (${LIBSBML_LIBRARY}-static STATIC ${LIBSBML_SOURCES} ) + +@@ -560,7 +560,7 @@ INSTALL(FILES + DESTINATION ${PACKAGE_CONFIG_DIR} + ) + endif() +- ++endif() + ############################################################################## + # + # add native tests diff --git a/vcpkg/ports/libsbml/portfile.cmake b/vcpkg/ports/libsbml/portfile.cmake new file mode 100644 index 0000000..ed7749d --- /dev/null +++ b/vcpkg/ports/libsbml/portfile.cmake @@ -0,0 +1,83 @@ +vcpkg_download_distfile(ARCHIVE + URLS "https://sourceforge.net/projects/sbml/files/libsbml/5.18.0/stable/libSBML-5.18.0-core-plus-packages-src.tar.gz/download" + FILENAME "libSBML-5.18.0.zip" + SHA512 49dedaa2fcd2077e7389a8f940adf931d80aa7a8f9d57330328372d2ac8ebcaeb03a20524df2fe0f1c6933587904613754585076c46e6cb5d6f7a001f427185b +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES fix-linkage-type.patch +) + +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_RUNTIME) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATIC_LIBRARY) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + comp ENABLE_COMP + fbc ENABLE_FBC + groups ENABLE_GROUPS + layout ENABLE_LAYOUT + multi ENABLE_MULTI + qual ENABLE_QUAL + render ENABLE_RENDER + render ENABLE_LAYOUT + bzip2 WITH_BZIP2 + zlib WITH_ZLIB + test WITH_CHECK + namespace WITH_CPP_NAMESPACE +) + +# Handle conflict features +set(WITH_EXPAT OFF) +if ("expat" IN_LIST FEATURES) + set(WITH_EXPAT ON) +endif() + +set(WITH_LIBXML OFF) +if ("libxml2" IN_LIST FEATURES) + set(WITH_LIBXML ON) +endif() + +if (WITH_EXPAT AND WITH_LIBXML) + message("Feature expat conflict with feature libxml2, currently using libxml2...") + set(WITH_EXPAT OFF) +endif() + +if ("test" IN_LIST FEATURES AND WIN32) + message(FATAL_ERROR "Feature test only support UNIX.") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS ${FEATURE_OPTIONS} + -DWITH_EXPAT=${WITH_EXPAT} + -DWITH_LIBXML=${WITH_LIBXML} + -DENABLE_L3V2EXTENDEDMATH:BOOL=ON + -DWITH_STATIC_RUNTIME=${STATIC_RUNTIME} + -DLIBSBML_SKIP_SHARED_LIBRARY=${STATIC_LIBRARY} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(GLOB TXT_FILES ${CURRENT_PACKAGES_DIR}/debug/*.txt) +if (TXT_FILES) + file(REMOVE ${TXT_FILES}) +endif() +file(GLOB TXT_FILES ${CURRENT_PACKAGES_DIR}/*.txt) +if (TXT_FILES) + file(REMOVE ${TXT_FILES}) +endif() + +if (EXISTS ${CURRENT_PACKAGES_DIR}/debug/share) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/libsigcpp-3/disable_tests_enable_static_build.patch b/vcpkg/ports/libsigcpp-3/disable_tests_enable_static_build.patch new file mode 100644 index 0000000..2c4909d --- /dev/null +++ b/vcpkg/ports/libsigcpp-3/disable_tests_enable_static_build.patch @@ -0,0 +1,41 @@ +From 219b3f5a681731bcaeee9fee0f136e6eb6143d33 Mon Sep 17 00:00:00 2001 +From: Bruk Tedla +Date: Thu, 17 Sep 2020 19:45:27 +0300 +Subject: [PATCH] disable_tests_enable_static_build + +--- + CMakeLists.txt | 4 ++-- + sigc++/CMakeLists.txt | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2e7f383..b2b8395 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -89,8 +89,8 @@ enable_testing() + + + add_subdirectory (sigc++) +-add_subdirectory (examples) +-add_subdirectory (tests) ++#add_subdirectory (examples) ++#add_subdirectory (tests) + + + set (PROJECT_CMAKE_NAME "${PROJECT_NAME}-3") +diff --git a/sigc++/CMakeLists.txt b/sigc++/CMakeLists.txt +index fa5a91a..86f1be7 100644 +--- a/sigc++/CMakeLists.txt ++++ b/sigc++/CMakeLists.txt +@@ -23,7 +23,7 @@ set (SOURCE_FILES + + set (SIGCPP_LIB_NAME sigc-${SIGCXX_API_VERSION}) + +-add_library(${SIGCPP_LIB_NAME} SHARED ${SOURCE_FILES}) ++add_library(${SIGCPP_LIB_NAME} ${SOURCE_FILES}) + + set_property (TARGET ${SIGCPP_LIB_NAME} PROPERTY VERSION ${PACKAGE_VERSION}) + set_property(TARGET ${SIGCPP_LIB_NAME} PROPERTY SOVERSION ${LIBSIGCPP_SOVERSION}) +-- +2.27.0.windows.1 + diff --git a/vcpkg/ports/libsigcpp-3/portfile.cmake b/vcpkg/ports/libsigcpp-3/portfile.cmake new file mode 100644 index 0000000..44cf6c8 --- /dev/null +++ b/vcpkg/ports/libsigcpp-3/portfile.cmake @@ -0,0 +1,19 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libsigcplusplus/libsigcplusplus + REF 7e20b36bddab74faed39aa3768d07fd372fce596 + SHA512 6220a3974ee90afb5028a5b60ffcbff353fffbbfcf1570d8db05b6d91604324a73badcb17c73c852d6c5265e2b31e1c2de1b3ea20c0e60ecdb17ce90c9ca40bd + HEAD_REF master + PATCHES disable_tests_enable_static_build.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sigc++-3 TARGET_PATH share/sigc++-3) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libsigcpp-3/vcpkg.json b/vcpkg/ports/libsigcpp-3/vcpkg.json new file mode 100644 index 0000000..b7cf550 --- /dev/null +++ b/vcpkg/ports/libsigcpp-3/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "libsigcpp-3", + "version-string": "3.0.3", + "description": "Typesafe callback framework for C++", + "homepage": "https://libsigcplusplus.github.io/libsigcplusplus/" +} diff --git a/vcpkg/ports/libsigcpp/CMakeLists.txt b/vcpkg/ports/libsigcpp/CMakeLists.txt new file mode 100644 index 0000000..9c43b1a --- /dev/null +++ b/vcpkg/ports/libsigcpp/CMakeLists.txt @@ -0,0 +1,59 @@ +cmake_minimum_required(VERSION 3.0) +project(libsigc++) + +set(CMAKE_CXX_STANDARD 17) + +set(SIGCPP_API_VERSION 2.0) + +add_definitions(-DSIGC_BUILD) + +include_directories(./MSVC_Net2013) # config file for windows is there +include_directories(.) + +set(SICGPP_SOURCES + sigc++/connection.cc + sigc++/signal_base.cc + sigc++/trackable.cc + sigc++/adaptors/lambda/lambda.cc + sigc++/functors/slot_base.cc) + +add_library(sigc ${SICGPP_SOURCES}) +set_target_properties(sigc PROPERTIES OUTPUT_NAME sigc-${SIGCPP_API_VERSION}) +install(TARGETS sigc RUNTIME DESTINATION bin ARCHIVE DESTINATION lib) + +if(NOT SIGCPP_SKIP_HEADERS) + install(FILES MSVC_Net2013/sigc++config.h DESTINATION include) + install(FILES sigc++/sigc++.h DESTINATION include/sigc++) + install(FILES sigc++/bind.h DESTINATION include/sigc++) + install(FILES sigc++/bind_return.h DESTINATION include/sigc++) + install(FILES sigc++/connection.h DESTINATION include/sigc++) + install(FILES sigc++/limit_reference.h DESTINATION include/sigc++) + install(FILES sigc++/reference_wrapper.h DESTINATION include/sigc++) + install(FILES sigc++/retype_return.h DESTINATION include/sigc++) + install(FILES sigc++/signal.h DESTINATION include/sigc++) + install(FILES sigc++/signal_base.h DESTINATION include/sigc++) + install(FILES sigc++/slot.h DESTINATION include/sigc++) + install(FILES sigc++/trackable.h DESTINATION include/sigc++) + install(FILES sigc++/type_traits.h DESTINATION include/sigc++) + install(FILES sigc++/visit_each.h DESTINATION include/sigc++) + install(FILES sigc++/adaptors/adaptors.h DESTINATION include/sigc++/adaptors) + install(FILES sigc++/adaptors/adaptor_trait.h DESTINATION include/sigc++/adaptors) + install(FILES sigc++/adaptors/bind.h DESTINATION include/sigc++/adaptors) + install(FILES sigc++/adaptors/bind_return.h DESTINATION include/sigc++/adaptors) + install(FILES sigc++/adaptors/bound_argument.h DESTINATION include/sigc++/adaptors) + install(FILES sigc++/adaptors/compose.h DESTINATION include/sigc++/adaptors) + install(FILES sigc++/adaptors/deduce_result_type.h DESTINATION include/sigc++/adaptors) + install(FILES sigc++/adaptors/exception_catch.h DESTINATION include/sigc++/adaptors) + install(FILES sigc++/adaptors/hide.h DESTINATION include/sigc++/adaptors) + install(FILES sigc++/adaptors/retype.h DESTINATION include/sigc++/adaptors) + install(FILES sigc++/adaptors/retype_return.h DESTINATION include/sigc++/adaptors) + install(FILES sigc++/adaptors/track_obj.h DESTINATION include/sigc++/adaptors) + install(FILES sigc++/adaptors/lambda/base.h DESTINATION include/sigc++/adaptors/lambda) + install(FILES sigc++/adaptors/lambda/select.h DESTINATION include/sigc++/adaptors/lambda) + install(FILES sigc++/functors/functors.h DESTINATION include/sigc++/functors) + install(FILES sigc++/functors/functor_trait.h DESTINATION include/sigc++/functors) + install(FILES sigc++/functors/mem_fun.h DESTINATION include/sigc++/functors) + install(FILES sigc++/functors/ptr_fun.h DESTINATION include/sigc++/functors) + install(FILES sigc++/functors/slot.h DESTINATION include/sigc++/functors) + install(FILES sigc++/functors/slot_base.h DESTINATION include/sigc++/functors) +endif() diff --git a/vcpkg/ports/libsigcpp/CONTROL b/vcpkg/ports/libsigcpp/CONTROL new file mode 100644 index 0000000..617328c --- /dev/null +++ b/vcpkg/ports/libsigcpp/CONTROL @@ -0,0 +1,3 @@ +Source: libsigcpp +Version: 2.10-3 +Description: Typesafe callback framework for C++ diff --git a/vcpkg/ports/libsigcpp/portfile.cmake b/vcpkg/ports/libsigcpp/portfile.cmake new file mode 100644 index 0000000..707e590 --- /dev/null +++ b/vcpkg/ports/libsigcpp/portfile.cmake @@ -0,0 +1,34 @@ + +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.10/libsigc++-2.10.0.tar.xz" + FILENAME "libsigc++-2.10.0.tar.xz" + SHA512 5b96df21d6bd6ba41520c7219e77695a86aabc60b7259262c7a9f4b8475ce0e2fd8dc37bcf7c17e24e818ff28c262d682b964c83e215b51bdbe000f3f58794ae +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG + -DSIGCPP_SKIP_HEADERS=ON) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(READ ${CURRENT_PACKAGES_DIR}/include/sigc++config.h SIGCPPCONFIG_H) + string(REPLACE "endif /* !SIGC_MSC */" + "endif /* !SIGC_MSC */ +#undef SIGC_DLL" SIGCPPCONFIG_H "${SIGCPPCONFIG_H}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/sigc++config.h "${SIGCPPCONFIG_H}") +endif() + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libsigcpp) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libsigcpp/COPYING ${CURRENT_PACKAGES_DIR}/share/libsigcpp/copyright) diff --git a/vcpkg/ports/libsndfile/portfile.cmake b/vcpkg/ports/libsndfile/portfile.cmake new file mode 100644 index 0000000..ad7650e --- /dev/null +++ b/vcpkg/ports/libsndfile/portfile.cmake @@ -0,0 +1,48 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO erikd/libsndfile + REF v1.0.30 + SHA512 2714dfbe923450a1f6f6d2a53ae0e88163170a5e0ce436bee27c1c41fc9b5526d6bc38e58918132248a9044f5b05fa29cd483c06c75ed67e6d83c961e30aaac9 + HEAD_REF master +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + vcpkg_find_acquire_program(PYTHON3) +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES external-libs ENABLE_EXTERNAL_LIBS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_EXAMPLES=OFF + -DBUILD_REGTEST=OFF + -DBUILD_TESTING=OFF + -DENABLE_BOW_DOCS=OFF + -DBUILD_PROGRAMS=OFF + -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON + -DPYTHON_EXECUTABLE=${PYTHON3} + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +if(WIN32 AND (NOT MINGW) AND (NOT CYGWIN)) + set(CONFIG_PATH cmake) +else() + set(CONFIG_PATH lib/cmake/SndFile) +endif() + +vcpkg_fixup_cmake_targets(CONFIG_PATH ${CONFIG_PATH} TARGET_PATH share/SndFile) +vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libsndfile/vcpkg.json b/vcpkg/ports/libsndfile/vcpkg.json new file mode 100644 index 0000000..b26c9f7 --- /dev/null +++ b/vcpkg/ports/libsndfile/vcpkg.json @@ -0,0 +1,20 @@ +{ + "name": "libsndfile", + "version-string": "1.0.30", + "description": "Library to read, write and manipulate many soundfile types. Authored by Eric de Castro Lopo", + "homepage": "https://github.com/erikd/libsndfile", + "license": "LGPL-2.1", + "default-features": [ + "external-libs" + ], + "features": { + "external-libs": { + "description": "Default feature. Enables Ogg Vorbis, FLAC and Ogg Opus formats support.", + "dependencies": [ + "libflac", + "libvorbis", + "opus" + ] + } + } +} diff --git a/vcpkg/ports/libsodium/CMakeLists.txt b/vcpkg/ports/libsodium/CMakeLists.txt new file mode 100644 index 0000000..474eb7e --- /dev/null +++ b/vcpkg/ports/libsodium/CMakeLists.txt @@ -0,0 +1,744 @@ +cmake_minimum_required(VERSION 3.9) + +include(CheckCSourceRuns) + +file(STRINGS ${CMAKE_CURRENT_LIST_DIR}/configure.ac config_ac_contents) + +foreach (line ${config_ac_contents}) + if (line MATCHES "AC_INIT\\(\\[libsodium\\],\\[([0-9.]+)\\],") + set(VERSION ${CMAKE_MATCH_1}) + elseif (line MATCHES "SODIUM_LIBRARY_VERSION_(MAJOR|MINOR)=([0-9]+)") + set(SODIUM_LIBRARY_VERSION_${CMAKE_MATCH_1} ${CMAKE_MATCH_2}) + endif () +endforeach () + +message("VERSION: ${VERSION}") +message("SODIUM_LIBRARY_VERSION_MAJOR: ${SODIUM_LIBRARY_VERSION_MAJOR}") +message("SODIUM_LIBRARY_VERSION_MINOR: ${SODIUM_LIBRARY_VERSION_MINOR}") + +project(sodium VERSION ${VERSION} LANGUAGES C ASM) + +include(CheckCSourceCompiles) +include(CheckFunctionExists) +include(CheckIncludeFile) +include(CMakePackageConfigHelpers) +include(CTest) +include(GNUInstallDirs) +include(TestBigEndian) + +set(CMAKE_C_STANDARD 99) +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) +set(CMAKE_DISABLE_SOURCE_CHANGES ON) +set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) + +option(BUILD_SHARED_LIBS "Build shared library" ${BUILD_SHARED_LIBS}) +option(ENABLE_SSP "Compile with -fstack-protector" ON) +option(ENABLE_PIE "Compile with -fPIE" ON) +option(ENABLE_BLOCKING_RANDOM "Enable blocking random" OFF) +option(ENABLE_MINIMAL "Only compile the minimum set of functions required for the high-level API" OFF) +option(ENABLE_PTHREADS "Use pthreads library" ON) +option(ENABLE_RETPOLINE "Use return trampolines for indirect calls" OFF) + +if (ENABLE_MINIMAL) + set(SODIUM_LIBRARY_MINIMAL_DEF "#define SODIUM_LIBRARY_MINIMAL 1") +endif () + +configure_file( + src/libsodium/include/sodium/version.h.in + ${CMAKE_BINARY_DIR}/sodium/version.h +) + +file(GLOB sodium_headers + ${PROJECT_SOURCE_DIR}/src/libsodium/include/sodium/*.h + ${PROJECT_SOURCE_DIR}/src/libsodium/include/sodium.h + ${CMAKE_BINARY_DIR}/sodium/version.h +) + +if (UNIX) + file(GLOB_RECURSE sodium_sources + ${PROJECT_SOURCE_DIR}/src/libsodium/*.c + ${PROJECT_SOURCE_DIR}/src/libsodium/*.S # HAVE_AVX_ASM + ) +else () + file(GLOB_RECURSE sodium_sources + ${PROJECT_SOURCE_DIR}/src/libsodium/*.c + ) +endif () + +if (MSVC) + enable_language(RC) + + list(APPEND sodium_sources + builds/msvc/resource.rc + ) +endif () + +add_library(${PROJECT_NAME} + ${sodium_headers} + ${sodium_sources} +) + +set_target_properties(${PROJECT_NAME} + PROPERTIES + PREFIX "" + OUTPUT_NAME "lib${PROJECT_NAME}" +) + +test_big_endian(IS_BIG_ENDIAN) + +if (IS_BIG_ENDIAN) + target_compile_definitions(${PROJECT_NAME} PRIVATE NATIVE_BIG_ENDIAN) +else () + target_compile_definitions(${PROJECT_NAME} PRIVATE NATIVE_LITTLE_ENDIAN) +endif () + +macro (sodium_check_func func var) + check_function_exists(${func} ${var}) + if (${var}) + target_compile_definitions(${PROJECT_NAME} PRIVATE ${var}=1) + endif () +endmacro () + +if (MSVC) + target_compile_options(${PROJECT_NAME} + PRIVATE + /D_CONSOLE + /D_CRT_SECURE_NO_WARNINGS + /DCPU_UNALIGNED_ACCESS=1 + /MP + /Dinline=__inline + /wd4068 # Unknown pragma + /wd4197 + /wd4244 # Macro redefinition + ) + + target_link_libraries(${PROJECT_NAME} + PUBLIC + advapi32 + ) +else () + if (ENABLE_BLOCKING_RANDOM) + target_compile_definitions(${PROJECT_NAME} PRIVATE USE_BLOCKING_RANDOM) + endif () + + if (ENABLE_PTHREADS) + target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_PTHREAD) + target_compile_options(${PROJECT_NAME} PRIVATE -ftls-model=local-dynamic) + target_compile_options(${PROJECT_NAME} PUBLIC -pthread) + endif () + + if (ENABLE_SSP) + target_compile_options(${PROJECT_NAME} PRIVATE -fstack-protector-all) + endif () + + if (ENABLE_PIE) + target_compile_options(${PROJECT_NAME} PRIVATE -fPIE) + endif () + + if (ENABLE_RETPOLINE) + target_compile_options(${PROJECT_NAME} + PRIVATE + -mindirect-branch=thunk-inline + -mindirect-branch-register + ) + endif () + + target_compile_options(${PROJECT_NAME} + PRIVATE + -flax-vector-conversions + -fvisibility=hidden + -fPIC + -fwrapv + -Wall + -Wextra + -Wbad-function-cast + -Wcast-qual + #-Wdiv-by-zero + #-Wduplicated-branches + #-Wduplicated-cond + -Wfloat-equal + -Wformat=2 + -Wlogical-op + -Wmaybe-uninitialized + #-Wmisleading-indentation + -Wmissing-declarations + -Wmissing-prototypes + -Wnested-externs + #-Wno-type-limits + #-Wno-unknown-pragmas + -Wnormalized=id + #-Wnull-dereference + -Wold-style-declaration + -Wpointer-arith + -Wredundant-decls + #-Wrestrict + #-Wsometimes-uninitialized + -Wstrict-prototypes + -Wswitch-enum + #-Wvariable-decl + -Wwrite-strings + -Wl,-z,relro + -Wl,-z,now + -Wl,-z,noexecstack + ) + + if (CMAKE_C_COMPILER_ID STREQUAL "Clang" OR + CMAKE_C_COMPILER_ID STREQUAL "AppleClang") + target_compile_options(${PROJECT_NAME} + PRIVATE + -Wno-unknown-warning-option + -Wshorten-64-to-32 + ) + endif () + + check_include_file(sys/mman.h HAVE_SYS_MMAN_H) + if (HAVE_SYS_MMAN_H) + target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_SYS_MMAN_H) + endif () + + sodium_check_func(arc4random HAVE_SAFE_ARC4RANDOM) + sodium_check_func(mmap HAVE_MMAP) + sodium_check_func(mlock HAVE_MLOCK) + sodium_check_func(madvise HAVE_MADVISE) + sodium_check_func(mprotect HAVE_MPROTECT) + sodium_check_func(memset_s HAVE_MEMSET_S) + sodium_check_func(explicit_bzero HAVE_EXPLICIT_BZERO) + sodium_check_func(explicit_memset HAVE_EXPLICIT_MEMSET) + sodium_check_func(nanosleep HAVE_NANOSLEEP) + sodium_check_func(posix_memalign HAVE_POSIX_MEMALIGN) + sodium_check_func(getpid HAVE_GETPID) + + check_c_source_runs( + " + #pragma GCC target(\"mmx\") + #include + int main(void) + { + __m64 x = _mm_setzero_si64(); + } + " + HAVE_MMINTRIN_H + ) + + if (HAVE_MMINTRIN_H) + target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_MMINTRIN_H=1) + target_compile_options(${PROJECT_NAME} PRIVATE -mmmx) + endif () + + check_c_source_runs( + " + #pragma GCC target(\"sse2\") + #ifndef __SSE2__ + # define __SSE2__ + #endif + + #include + int main(void) { + __m128d x = _mm_setzero_pd(); + __m128i z = _mm_srli_epi64(_mm_setzero_si128(), 26); + } + " + HAVE_EMMINTRIN_H + ) + + if (HAVE_EMMINTRIN_H) + target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_EMMINTRIN_H=1) + target_compile_options(${PROJECT_NAME} PRIVATE -msse2) + endif () + + check_c_source_runs( + " + #pragma GCC target(\"sse3\") + #include + int main(void) { + __m128 x = _mm_addsub_ps(_mm_cvtpd_ps(_mm_setzero_pd()), _mm_cvtpd_ps(_mm_setzero_pd())); + } + " + HAVE_PMMINTRIN_H + ) + + if (HAVE_PMMINTRIN_H) + target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_PMMINTRIN_H=1) + target_compile_options(${PROJECT_NAME} PRIVATE -msse3) + endif () + + check_c_source_runs( + " + #pragma GCC target(\"ssse3\") + #include + int main(void) { + __m64 x = _mm_abs_pi32(_m_from_int(0)); + } + " + HAVE_TMMINTRIN_H + ) + + if (HAVE_TMMINTRIN_H) + target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_TMMINTRIN_H=1) + target_compile_options(${PROJECT_NAME} PRIVATE -mssse3) + endif () + + check_c_source_runs( + " + #pragma GCC target(\"sse4.1\") + #include + int main(void) { + __m128i x = _mm_minpos_epu16(_mm_setzero_si128()); + } + " + HAVE_SMMINTRIN_H + ) + + if (HAVE_SMMINTRIN_H) + target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_SMMINTRIN_H=1) + target_compile_options(${PROJECT_NAME} PRIVATE -msse4.1) + endif () + + check_c_source_runs( + " + #ifdef __native_client__ + # error NativeClient detected - Avoiding AVX opcodes + #endif + #pragma GCC target(\"avx\") + #include + int main(void) { + _mm256_zeroall(); + } + " + HAVE_AVXINTRIN_H + ) + + if (HAVE_AVXINTRIN_H) + target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_AVXINTRIN_H=1) + target_compile_options(${PROJECT_NAME} PRIVATE -mavx) + endif () + + check_c_source_runs( + " + #ifdef __native_client__ + # error NativeClient detected - Avoiding AVX2 opcodes + #endif + #pragma GCC target(\"avx2\") + #include + int main(void) { + __m256 x = _mm256_set1_ps(3.14); + __m256 y = _mm256_permutevar8x32_ps(x, _mm256_set1_epi32(42)); + return _mm256_movemask_ps(_mm256_cmp_ps(x, y, _CMP_NEQ_OQ)); + } + " + HAVE_AVX2INTRIN_H + ) + + if (HAVE_AVX2INTRIN_H) + target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_AVX2INTRIN_H=1) + target_compile_options(${PROJECT_NAME} PRIVATE -mavx2) + + check_c_source_runs( + " + #ifdef __native_client__ + # error NativeClient detected - Avoiding AVX2 opcodes + #endif + #pragma GCC target(\"avx2\") + #include + int main(void) { + __m256i y = _mm256_broadcastsi128_si256(_mm_setzero_si128()); + } + " + _mm256_broadcastsi128_si256_DEFINED + ) + + if (NOT _mm256_broadcastsi128_si256_DEFINED) + target_compile_definitions(${PROJECT_NAME} + PRIVATE + _mm256_broadcastsi128_si256=_mm_broadcastsi128_si256 + ) + endif () + endif () + + check_c_source_runs( + " + #ifdef __native_client__ + # error NativeClient detected - Avoiding AVX512F opcodes + #endif + #pragma GCC target(\"avx512f\") + #include + + #ifndef __AVX512F__ + # error No AVX512 support + #elif defined(__clang__) + # if __clang_major__ < 4 + # error Compiler AVX512 support may be broken + # endif + #elif defined(__GNUC__) + # if __GNUC__ < 6 + # error Compiler AVX512 support may be broken + # endif + #endif + + int main(void) { + __m512i x = _mm512_setzero_epi32(); + __m512i y = _mm512_permutexvar_epi64(_mm512_setr_epi64(0, 1, 4, 5, 2, 3, 6, 7), x); + } + " + HAVE_AVX512FINTRIN_H + ) + + if (HAVE_AVX512FINTRIN_H) + target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_AVX512FINTRIN_H=1) + target_compile_options(${PROJECT_NAME} PRIVATE -mavx512f) + else () + target_compile_options(${PROJECT_NAME} PRIVATE -mno-avx512f) + endif () + + check_c_source_runs( + " + #ifdef __native_client__ + # error NativeClient detected - Avoiding AESNI opcodes + #endif + #pragma GCC target(\"aes\") + #pragma GCC target(\"pclmul\") + #include + + int main(void) { + __m128i x = _mm_aesimc_si128(_mm_setzero_si128()); + __m128i y = _mm_clmulepi64_si128(_mm_setzero_si128(), _mm_setzero_si128(), 0); + } + " + HAVE_WMMINTRIN_H + ) + + if (HAVE_WMMINTRIN_H) + target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_WMMINTRIN_H=1) + target_compile_options(${PROJECT_NAME} PRIVATE -maes -mpclmul) + endif () + + check_c_source_runs( + " + #ifdef __native_client__ + # error NativeClient detected - Avoiding RDRAND opcodes + #endif + #pragma GCC target(\"rdrnd\") + #include + + int main(void) { + unsigned long long x; + _rdrand64_step(&x); + } + " + HAVE_RDRAND + ) + + if (HAVE_RDRAND) + target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_RDRAND=1) + target_compile_options(${PROJECT_NAME} PRIVATE -mrdrnd) + endif () + + check_c_source_runs( + " + #include + + int main(void) { + (void) _xgetbv(0); + } + " + HAVE__XGETBV + ) + + if (HAVE__XGETBV) + target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE__XGETBV=1) + endif () + + check_c_source_runs( + " + int main(void) { + int a = 42; + int *pnt = &a; + __asm__ __volatile__ (\"\" : : \"r\"(pnt) : \"memory\"); + } + " + HAVE_INLINE_ASM + ) + + if (HAVE_INLINE_ASM) + target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_INLINE_ASM=1) + endif () + + check_c_source_runs( + " + int main(void) { + #if defined(__amd64) || defined(__amd64__) || defined(__x86_64__) + # if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__) || defined(_WIN32) || defined(_WIN64) + # error Windows x86_64 calling conventions are not supported yet + # endif + /* neat */ + #else + # error !x86_64 + #endif + unsigned char i = 0, o = 0, t; + __asm__ __volatile__ (\"pxor %%xmm12, %%xmm6 \n\" + \"movb (%[i]), %[t] \n\" + \"addb %[t], (%[o]) \n\" + : [t] \"=&r\"(t) + : [o] \"D\"(&o), [i] \"S\"(&i) + : \"memory\", \"flags\", \"cc\"); + } + " + HAVE_AMD64_ASM + ) + + if (HAVE_AMD64_ASM) + target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_AMD64_ASM=1) + endif () + + check_c_source_runs( + " + int main(void) { + #if defined(__amd64) || defined(__amd64__) || defined(__x86_64__) + # if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__MINGW64__) || defined(_WIN32) || defined(_WIN64) + # error Windows x86_64 calling conventions are not supported yet + # endif + /* neat */ + #else + # error !x86_64 + #endif + __asm__ __volatile__ (\"vpunpcklqdq %xmm0,%xmm13,%xmm0\"); + } + " + HAVE_AVX_ASM + ) + + if (HAVE_AVX_ASM) + target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_AVX_ASM=1) + endif () + + check_c_source_runs( + " + #if !defined(__clang__) && !defined(__GNUC__) && !defined(__SIZEOF_INT128__) + # error mode(TI) is a gcc extension, and __int128 is not available + #endif + #if defined(__clang__) && !defined(__x86_64__) && !defined(__aarch64__) + # error clang does not properly handle the 128-bit type on 32-bit systems + #endif + #ifndef NATIVE_LITTLE_ENDIAN + # error libsodium currently expects a little endian CPU for the 128-bit type + #endif + #ifdef __EMSCRIPTEN__ + # error emscripten currently doesn't support some operations on integers larger than 64 bits + #endif + #include + #include + #if defined(__SIZEOF_INT128__) + typedef unsigned __int128 uint128_t; + #else + typedef unsigned uint128_t __attribute__((mode(TI))); + #endif + void fcontract(uint128_t *t) { + *t += 0x8000000000000 - 1; + *t *= *t; + *t >>= 84; + } + + int main(void) { + (void) fcontract; + } + " + HAVE_TI_MODE + ) + + if (HAVE_TI_MODE) + target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_TI_MODE=1) + endif () + + check_c_source_runs( + " + int main(void) { + unsigned int cpu_info[4]; + __asm__ __volatile__ (\"xchgl %%ebx, %k1; cpuid; xchgl %%ebx, %k1\" : + \"=a\" (cpu_info[0]), \"=&r\" (cpu_info[1]), + \"=c\" (cpu_info[2]), \"=d\" (cpu_info[3]) : + \"0\" (0U), \"2\" (0U)); + } + " + HAVE_CPUID + ) + + if (HAVE_CPUID) + target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_CPUID=1) + endif () + + check_c_source_runs( + " + #if !defined(__ELF__) && !defined(__APPLE_CC__) + # error Support for weak symbols may not be available + #endif + __attribute__((weak)) void __dummy(void *x) { } + void f(void *x) { __dummy(x); } + int main(void) {} + " + HAVE_WEAK_SYMBOLS + ) + + if (HAVE_WEAK_SYMBOLS) + target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_WEAK_SYMBOLS=1) + endif () + + check_c_source_runs( + " + int main(void) { + static volatile int _sodium_lock; + __sync_lock_test_and_set(&_sodium_lock, 1); + __sync_lock_release(&_sodium_lock); + } + " + HAVE_ATOMIC_OPS + ) + + if (HAVE_ATOMIC_OPS) + target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_ATOMIC_OPS=1) + endif () + + check_c_source_runs( + " + #include + #include + int main(void) { + (void) SIZE_MAX; + (void) UINT64_MAX; + } + " + STDC_LIMIT_MACROS_REQUIRED + ) + + if (STDC_LIMIT_MACROS_REQUIRED) + target_compile_definitions(${PROJECT_NAME} + PRIVATE + __STDC_LIMIT_MACROS + __STDC_CONSTANT_MACROS + ) + endif () + + # include/sodium/private/common.h + target_compile_definitions(${PROJECT_NAME} PRIVATE CONFIGURED=1) +endif () + +if (BUILD_SHARED_LIBS) + if (MSVC) + target_compile_definitions(${PROJECT_NAME} + PRIVATE + SODIUM_DLL_EXPORT + ) + endif () +else () + target_compile_definitions(${PROJECT_NAME} + PUBLIC + SODIUM_STATIC + ) +endif () + +target_include_directories(${PROJECT_NAME} + PRIVATE + $ + $ +) + +if (BUILD_TESTING) + file(GLOB sodium_test_sources ${PROJECT_SOURCE_DIR}/test/default/*.c) + + foreach (test_src ${sodium_test_sources}) + get_filename_component(test_name ${test_src} NAME_WE) + + add_executable(${test_name} ${test_src}) + + if (MSVC) + target_compile_definitions(${test_name} PRIVATE _CRT_SECURE_NO_WARNINGS) + endif () + + target_include_directories(${test_name} + PRIVATE + $ + $ + $ + $ + ) + + target_link_libraries(${test_name} PRIVATE ${PROJECT_NAME}) + + add_custom_command(TARGET ${test_name} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + "${CMAKE_CURRENT_LIST_DIR}/test/default/${test_name}.exp" + $) + + add_test( + NAME ${test_name} + COMMAND ${test_name} + WORKING_DIRECTORY $ + ) + endforeach () +endif () + +install(DIRECTORY src/libsodium/include/ + DESTINATION include/ + USE_SOURCE_PERMISSIONS + PATTERN "*.h" + PATTERN "*.h.in" EXCLUDE + REGEX "private($|/)" EXCLUDE +) + +install(FILES ${CMAKE_BINARY_DIR}/sodium/version.h + DESTINATION include/sodium +) + +install(TARGETS ${PROJECT_NAME} + EXPORT ${PROJECT_NAME}-targets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +) + +install(EXPORT ${PROJECT_NAME}-targets + FILE unofficial-${PROJECT_NAME}Targets.cmake + NAMESPACE unofficial-${PROJECT_NAME}:: + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/unofficial-${PROJECT_NAME} +) + +set(TARGET_NAME unofficial-${PROJECT_NAME}::${PROJECT_NAME}) + +configure_package_config_file( + ${PROJECT_NAME}Config.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/unofficial-${PROJECT_NAME}Config.cmake + INSTALL_DESTINATION ${PROJECT_BINARY_DIR} +) + +write_basic_package_version_file( + ${CMAKE_CURRENT_BINARY_DIR}/unofficial-${PROJECT_NAME}ConfigVersion.cmake + VERSION ${VERSION} + COMPATIBILITY AnyNewerVersion +) + +unset(TARGET_NAME) + +install( + FILES + ${CMAKE_CURRENT_BINARY_DIR}/unofficial-${PROJECT_NAME}Config.cmake + ${CMAKE_CURRENT_BINARY_DIR}/unofficial-${PROJECT_NAME}ConfigVersion.cmake + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/unofficial-${PROJECT_NAME} +) + +# References: +# https://github.com/boost-cmake/bcm/wiki/Cmake-best-practices-and-guidelines +# https://github.com/jedisct1/libsodium/pull/74/files +# https://github.com/jedisct1/libsodium/pull/156/files +# https://github.com/jedisct1/libsodium/pull/181/files +# https://github.com/jedisct1/libsodium/issues/378 +# https://github.com/jedisct1/libsodium/issues/636 +# https://github.com/jedisct1/libsodium/issues/771 +# https://github.com/jedisct1/libsodium/blob/gyp/sodium.gyp +# https://github.com/imefisto/cmake-libsodium +# https://github.com/Cyberunner23/libsodium-CMake +# https://stackoverflow.com/questions/29901352/appending-to-cmake-c-flags +# https://stackoverflow.com/questions/986426/what-do-stdc-limit-macros-and-stdc-constant-macros-mean +# https://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html +# https://stackoverflow.com/questions/15132185/mixing-c-and-assembly-sources-and-build-with-cmake +# https://stackoverflow.com/questions/647892/how-to-check-header-files-and-library-functions-in-cmake-like-it-is-done-in-auto +# https://stackoverflow.com/questions/31038963/how-do-you-rename-a-library-filename-in-cmake diff --git a/vcpkg/ports/libsodium/CONTROL b/vcpkg/ports/libsodium/CONTROL new file mode 100644 index 0000000..4ae58fa --- /dev/null +++ b/vcpkg/ports/libsodium/CONTROL @@ -0,0 +1,4 @@ +Source: libsodium +Version: 1.0.18-2 +Description: A modern and easy-to-use crypto library +Homepage: https://github.com/jedisct1/libsodium diff --git a/vcpkg/ports/libsodium/portfile.cmake b/vcpkg/ports/libsodium/portfile.cmake new file mode 100644 index 0000000..2d61a45 --- /dev/null +++ b/vcpkg/ports/libsodium/portfile.cmake @@ -0,0 +1,59 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jedisct1/libsodium + REF 1.0.18 + SHA512 727fe50a5fb1df86ec5d807770f408a52609cbeb8510b4f4183b2a35a537905719bdb6348afcb103ff00ce946a8094ac9559b6e3e5b2ccc2a2d0c08f75577eeb + HEAD_REF master +) + +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt + ${SOURCE_PATH}/CMakeLists.txt + COPYONLY +) + +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/sodiumConfig.cmake.in + ${SOURCE_PATH}/sodiumConfig.cmake.in + COPYONLY +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets( + CONFIG_PATH lib/cmake/unofficial-sodium + TARGET_PATH share/unofficial-sodium +) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include +) + +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/Makefile.am) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/include/sodium/export.h + "#ifdef SODIUM_STATIC" + "#if 1 //#ifdef SODIUM_STATIC" + ) +endif () + +configure_file( + ${SOURCE_PATH}/LICENSE + ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright + COPYONLY +) + +#vcpkg_test_cmake(PACKAGE_NAME unofficial-sodium) diff --git a/vcpkg/ports/libsodium/sodiumConfig.cmake.in b/vcpkg/ports/libsodium/sodiumConfig.cmake.in new file mode 100644 index 0000000..d416e2b --- /dev/null +++ b/vcpkg/ports/libsodium/sodiumConfig.cmake.in @@ -0,0 +1,61 @@ +# sodium cmake module +# This module sets the following variables in your project: +# +# sodium_FOUND - true if sodium found on the system +# sodium_INCLUDE_DIR - the directory containing sodium headers +# sodium_LIBRARY_DEBUG +# sodium_LIBRARY_RELEASE +# sodium_LIBRARIES +# sodium_VERSION +# + +include(FindPackageHandleStandardArgs) +include(SelectLibraryConfigurations) + +@PACKAGE_INIT@ + +if (NOT TARGET @TARGET_NAME@) + include("${CMAKE_CURRENT_LIST_DIR}/unofficial-@PROJECT_NAME@Targets.cmake") + + set(@PROJECT_NAME@_VERSION @VERSION@) + + get_target_property(@PROJECT_NAME@_INCLUDE_DIR @TARGET_NAME@ INTERFACE_INCLUDE_DIRECTORIES) + + get_target_property(@PROJECT_NAME@_LIBRARY_DEBUG @TARGET_NAME@ IMPORTED_IMPLIB_DEBUG) + if (@PROJECT_NAME@_LIBRARY_DEBUG MATCHES ".*-NOTFOUND") + get_target_property(@PROJECT_NAME@_LIBRARY_DEBUG @TARGET_NAME@ IMPORTED_LOCATION_DEBUG) + else () + get_target_property(@PROJECT_NAME@_DLL_DEBUG @TARGET_NAME@ IMPORTED_LOCATION_DEBUG) + endif () + + get_target_property(@PROJECT_NAME@_LIBRARY_RELEASE @TARGET_NAME@ IMPORTED_IMPLIB_RELEASE) + if (@PROJECT_NAME@_LIBRARY_RELEASE MATCHES ".*-NOTFOUND") + get_target_property(@PROJECT_NAME@_LIBRARY_RELEASE @TARGET_NAME@ IMPORTED_LOCATION_RELEASE) + else () + get_target_property(@PROJECT_NAME@_DLL_RELEASE @TARGET_NAME@ IMPORTED_LOCATION_RELEASE) + endif () + + select_library_configurations(@PROJECT_NAME@) +endif () + +find_package_handle_standard_args( + @PROJECT_NAME@ + REQUIRED_VARS + @PROJECT_NAME@_INCLUDE_DIR + @PROJECT_NAME@_LIBRARIES + VERSION_VAR + @PROJECT_NAME@_VERSION +) + +mark_as_advanced(@PROJECT_NAME@_INCLUDE_DIR) + +if (WIN32) + mark_as_advanced(@PROJECT_NAME@_DLL_DEBUG) + mark_as_advanced(@PROJECT_NAME@_DLL_RELEASE) +endif() + + +# References: +# https://github.com/jedisct1/libsodium/blob/master/contrib/Findsodium.cmake +# https://github.com/QuantStack/xeus/blob/master/xeusConfig.cmake.in +# https://github.com/zeromq/libzmq/blob/master/builds/cmake/ZeroMQConfig.cmake.in diff --git a/vcpkg/ports/libsoundio/CONTROL b/vcpkg/ports/libsoundio/CONTROL new file mode 100644 index 0000000..d8abcf0 --- /dev/null +++ b/vcpkg/ports/libsoundio/CONTROL @@ -0,0 +1,5 @@ +Source: libsoundio +Version: 2.0.0-3 +Description: libsoundio is C library providing cross-platform audio input and output. +Homepage: http://libsound.io/ +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/libsoundio/fix_cmakelists.patch b/vcpkg/ports/libsoundio/fix_cmakelists.patch new file mode 100644 index 0000000..ffe00ad --- /dev/null +++ b/vcpkg/ports/libsoundio/fix_cmakelists.patch @@ -0,0 +1,49 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6541f1b..e81bdce 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,5 @@ +-cmake_minimum_required(VERSION 2.8.5) ++cmake_minimum_required(VERSION 3.14) ++cmake_policy(SET CMP0022 NEW) + project(libsoundio C) + set(CMAKE_MODULE_PATH ${libsoundio_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) + +@@ -233,7 +234,8 @@ if(BUILD_DYNAMIC_LIBS) + LINKER_LANGUAGE C + ) + target_link_libraries(libsoundio_shared LINK_PUBLIC ${LIBSOUNDIO_LIBS}) +- install(TARGETS libsoundio_shared DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ target_include_directories(libsoundio_shared PUBLIC $) ++ install(TARGETS libsoundio_shared EXPORT libsoundio-export) + endif() + + if(BUILD_STATIC_LIBS) +@@ -243,9 +245,26 @@ if(BUILD_STATIC_LIBS) + COMPILE_FLAGS ${LIB_CFLAGS} + LINKER_LANGUAGE C + ) +- install(TARGETS libsoundio_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ target_link_libraries(libsoundio_static PUBLIC ${LIBSOUNDIO_LIBS}) ++ target_include_directories(libsoundio_static PUBLIC $) ++ install(TARGETS libsoundio_static EXPORT libsoundio-export) + endif() + ++add_library(libsoundio INTERFACE) ++if(BUILD_DYNAMIC_LIBS) ++ target_link_libraries(libsoundio INTERFACE libsoundio_shared) ++else() ++ target_link_libraries(libsoundio INTERFACE libsoundio_static) ++endif() ++install(TARGETS libsoundio EXPORT libsoundio-export) ++install( ++ EXPORT libsoundio-export ++ FILE libsoundio-config.cmake ++ DESTINATION share/libsoundio/ ++ NAMESPACE ${PROJECT_NAME}:: ++ EXPORT_LINK_INTERFACE_LIBRARIES ++) ++ + install(FILES + ${LIBSOUNDIO_HEADERS} + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/soundio") diff --git a/vcpkg/ports/libsoundio/portfile.cmake b/vcpkg/ports/libsoundio/portfile.cmake new file mode 100644 index 0000000..e28aa40 --- /dev/null +++ b/vcpkg/ports/libsoundio/portfile.cmake @@ -0,0 +1,43 @@ + +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO andrewrk/libsoundio + REF 2.0.0 + SHA512 347a9be1789a41e778ea8d0efa1d00e03e725a4ab65e3aaf6c71e49138643f08a50a81bd60087d86a3b4d63beaeec617e47ba6b81f829ece8a3ac17418eb5309 + HEAD_REF master + PATCHES + fix_cmakelists.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_DYNAMIC_LIBS) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIBS) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_DYNAMIC_LIBS=${BUILD_DYNAMIC_LIBS} + -DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS} + -DBUILD_EXAMPLE_PROGRAMS=OFF + -DBUILD_TESTS=OFF + -DENABLE_JACK=OFF + -DENABLE_PULSEAUDIO=OFF + -DENABLE_ALSA=OFF + -DENABLE_COREAUDIO=${VCPKG_TARGET_IS_OSX} + -DENABLE_WASAPI=${VCPKG_TARGET_IS_WINDOWS} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() +vcpkg_copy_pdbs() + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libsoundio RENAME copyright) + +vcpkg_test_cmake(PACKAGE_NAME libsoundio) diff --git a/vcpkg/ports/libspatialindex/CONTROL b/vcpkg/ports/libspatialindex/CONTROL new file mode 100644 index 0000000..aa1da63 --- /dev/null +++ b/vcpkg/ports/libspatialindex/CONTROL @@ -0,0 +1,6 @@ +Source: libspatialindex +Version: 1.9.0 +Homepage: http://libspatialindex.github.com +Description: C++ implementation of R*-tree, an MVR-tree and a TPR-tree with C API. +Build-Depends: zlib + diff --git a/vcpkg/ports/libspatialindex/portfile.cmake b/vcpkg/ports/libspatialindex/portfile.cmake new file mode 100644 index 0000000..f71182d --- /dev/null +++ b/vcpkg/ports/libspatialindex/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libspatialindex/libspatialindex + REF 1.9.0 + SHA512 368537e9bfe52db96486a1febfabe035f9f7714fd1cb50450e3ab89d51c5ffffb0e2ea219e08bee34f772ba9813a3a7f9e63d8b8946887ce83811ef68d17d1cc + HEAD_REF master + PATCHES + static.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS -DCMAKE_DEBUG_POSTFIX=d -DSIDX_BUILD_TESTS:BOOL=OFF +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +#Debug +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libspatialindex) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libspatialindex/COPYING ${CURRENT_PACKAGES_DIR}/share/libspatialindex/copyright) \ No newline at end of file diff --git a/vcpkg/ports/libspatialindex/static.patch b/vcpkg/ports/libspatialindex/static.patch new file mode 100644 index 0000000..bf783bc --- /dev/null +++ b/vcpkg/ports/libspatialindex/static.patch @@ -0,0 +1,21 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index e6b733bd..8f227ab0 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -194,9 +194,13 @@ if (NOT WITH_STATIC_LASZIP) + endif() + endif() + +-add_library(${SIDX_LIB_NAME} SHARED ${SIDX_SOURCES}) +- +-add_library(${SIDX_C_LIB_NAME} SHARED ${SIDX_CAPI_CPP}) ++if(BUILD_SHARED_LIBS) ++ add_library(${SIDX_LIB_NAME} SHARED ${SIDX_SOURCES}) ++ add_library(${SIDX_C_LIB_NAME} SHARED ${SIDX_CAPI_CPP}) ++else(BUILD_SHARED_LIBS) ++ add_library(${SIDX_LIB_NAME} STATIC ${SIDX_SOURCES}) ++ add_library(${SIDX_C_LIB_NAME} STATIC ${SIDX_CAPI_CPP}) ++endif(BUILD_SHARED_LIBS) + + target_link_libraries(${SIDX_C_LIB_NAME} + ${SIDX_LIB_NAME} diff --git a/vcpkg/ports/libspatialite/CONTROL b/vcpkg/ports/libspatialite/CONTROL new file mode 100644 index 0000000..364bd88 --- /dev/null +++ b/vcpkg/ports/libspatialite/CONTROL @@ -0,0 +1,7 @@ +Source: libspatialite +Version: 4.3.0a +Port-Version: 5 +Homepage: https://www.gaia-gis.it/gaia-sins/libspatialite-sources +Description: SpatiaLite is an open source library intended to extend the SQLite core to support fully fledged Spatial SQL capabilities. +Build-Depends: libxml2, sqlite3, geos, proj4, zlib, freexl, libiconv + diff --git a/vcpkg/ports/libspatialite/fix-configure-debug.patch b/vcpkg/ports/libspatialite/fix-configure-debug.patch new file mode 100644 index 0000000..77a4c77 --- /dev/null +++ b/vcpkg/ports/libspatialite/fix-configure-debug.patch @@ -0,0 +1,58 @@ +diff --git a/configure b/configure +index aafdad55b..11dde35fa 100644 +--- a/configure ++++ b/configure +@@ -18089,7 +18089,7 @@ return GEOSCoveredBy (); + return 0; + } + _ACEOF +-for ac_lib in '' geos_c; do ++for ac_lib in '' geos_cd; do + if test -z "$ac_lib"; then + ac_res="none required" + else +@@ -18124,7 +18124,7 @@ else + fi + + LIBS="$LIBS_SAVE" +- LIBS="$LIBS $GEOS_LDFLAGS -lgeos_c" ++ LIBS="$LIBS $GEOS_LDFLAGS -lgeos_cd" + + #----------------------------------------------------------------------- + # --enable-controlpoints +@@ -18176,7 +18176,7 @@ return GEOSDelaunayTriangulation (); + return 0; + } + _ACEOF +-for ac_lib in '' geos_c; do ++for ac_lib in '' geos_cd; do + if test -z "$ac_lib"; then + ac_res="none required" + else +@@ -18240,7 +18240,7 @@ fi + done + + _save_libs="$LIBS" +- LIBS=$LIBS' -llwgeom -lgeos_c' ++ LIBS=$LIBS' -llwgeom -lgeos_cd' + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + int main() { return lwgeom_make_valid(); return 0; } +@@ -18255,7 +18255,7 @@ fi + rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$_save_libs" +- LIBS=$LIBS' -llwgeom -lgeos_c' ++ LIBS=$LIBS' -llwgeom -lgeos_cd' + # + # testing for PostGIS 2.1 - lwgeom_set_handlers + # +@@ -18283,7 +18283,7 @@ return lwgeom_set_handlers (); + return 0; + } + _ACEOF +-for ac_lib in '' geos_c; do ++for ac_lib in '' geos_cd; do + if test -z "$ac_lib"; then + ac_res="none required" + else diff --git a/vcpkg/ports/libspatialite/fix-latin-literals.patch b/vcpkg/ports/libspatialite/fix-latin-literals.patch new file mode 100644 index 0000000..3060593 --- /dev/null +++ b/vcpkg/ports/libspatialite/fix-latin-literals.patch @@ -0,0 +1,108 @@ +diff --git a/src/srsinit/epsg_inlined_prussian.c b/src/srsinit/epsg_inlined_prussian.c +index a5c8334..dd75dde 100644 +--- a/src/srsinit/epsg_inlined_prussian.c ++++ b/src/srsinit/epsg_inlined_prussian.c +@@ -282,10 +282,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs * + add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",17.11233917],"); + add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],"); + add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187913\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]"); +- p = add_epsg_def(filter,first,last,187914,"mj10777.de",187914,"DHDN / Soldner 14 Gröditzberg I"); ++ p = add_epsg_def(filter,first,last,187914,"mj10777.de",187914,u8"DHDN / Soldner 14 Gr\u00f6ditzberg I"); + add_proj4text(p,0,"+proj=cass +lat_0=51.17819342 +lon_0=15.76127086 "); + add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"); +- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 14 Gröditzberg I\","); ++ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 14 Gr\u00f6ditzberg I\","); + add_srs_wkt(p,1,"GEOGCS[\"DHDN\","); + add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\","); + add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],"); +@@ -346,10 +346,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs * + add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",14.70144539],"); + add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],"); + add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187916\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]"); +- p = add_epsg_def(filter,first,last,187918,"mj10777.de",187918,"DHDN / Soldner 18 Müggelberg 600"); ++ p = add_epsg_def(filter,first,last,187918,u8"mj10777.de",187918,"DHDN / Soldner 18 M\u00fcggelberg 600"); + add_proj4text(p,0,"+proj=cass +lat_0=52.41864827777778 +lon_0=13.62720366666667 "); + add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"); +- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 18 Müggelberg 600\","); ++ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 18 M\u00fcggelberg 600\","); + add_srs_wkt(p,1,"GEOGCS[\"DHDN\","); + add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\","); + add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],"); +@@ -362,10 +362,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs * + add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",13.62720366666667],"); + add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],"); + add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187918\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]"); +- p = add_epsg_def(filter,first,last,187919,"mj10777.de",187919,"DHDN / Soldner 19 Götzer Berg 650"); ++ p = add_epsg_def(filter,first,last,187919,"mj10777.de",187919,u8"DHDN / Soldner 19 G\u00f6tzer Berg 650"); + add_proj4text(p,0,"+proj=cass +lat_0=52.43725961111112 +lon_0=12.72882972222223 "); + add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"); +- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 19 Götzer Berg 650\","); ++ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 19 G\u00f6tzer Berg 650\","); + add_srs_wkt(p,1,"GEOGCS[\"DHDN\","); + add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\","); + add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],"); +@@ -458,10 +458,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs * + add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",9.23411097],"); + add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],"); + add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187924\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]"); +- p = add_epsg_def(filter,first,last,187925,"mj10777.de",187925,"DHDN / Soldner 25 Rathkrügen"); ++ p = add_epsg_def(filter,first,last,187925,"mj10777.de",187925,u8"DHDN / Soldner 25 Rathkr\u00fcgen"); + add_proj4text(p,0,"+proj=cass +lat_0=53.81839364 +lon_0=10.04220189 "); + add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"); +- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 25 Rathkrügen\","); ++ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 25 Rathkr\u00fcgen\","); + add_srs_wkt(p,1,"GEOGCS[\"DHDN\","); + add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\","); + add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],"); +@@ -570,10 +570,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs * + add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",8.84051853],"); + add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],"); + add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187931\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]"); +- p = add_epsg_def(filter,first,last,187932,"mj10777.de",187932,"DHDN / Soldner 32 Münster"); ++ p = add_epsg_def(filter,first,last,187932,"mj10777.de",187932,u8"DHDN / Soldner 32 M\u00fcnster"); + add_proj4text(p,0,"+proj=cass +lat_0=51.96547642 +lon_0=7.62334994 "); + add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"); +- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 32 Münster\","); ++ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 32 M\u00fcnster\","); + add_srs_wkt(p,1,"GEOGCS[\"DHDN\","); + add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\","); + add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],"); +@@ -634,10 +634,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs * + add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",9.50203072],"); + add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],"); + add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187935\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]"); +- p = add_epsg_def(filter,first,last,187936,"mj10777.de",187936,"DHDN / Soldner 36 Schaumburg, Schloßturm"); ++ p = add_epsg_def(filter,first,last,187936,"mj10777.de",187936,u8"DHDN / Soldner 36 Schaumburg, Schlo\u00dfturm"); + add_proj4text(p,0,"+proj=cass +lat_0=50.34048964 +lon_0=7.97808156 "); + add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"); +- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 36 Schaumburg, Schloßturm\","); ++ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 36 Schaumburg, Schlo\u00dfturm\","); + add_srs_wkt(p,1,"GEOGCS[\"DHDN\","); + add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\","); + add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],"); +@@ -666,10 +666,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs * + add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",7.60594289],"); + add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],"); + add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187937\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]"); +- p = add_epsg_def(filter,first,last,187938,"mj10777.de",187938,"DHDN / Soldner 38 Cöln, Dom"); ++ p = add_epsg_def(filter,first,last,187938,"mj10777.de",187938,u8"DHDN / Soldner 38 C\u00f6ln, Dom"); + add_proj4text(p,0,"+proj=cass +lat_0=50.94257242 +lon_0=6.95897600 "); + add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"); +- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 38 Cöln, Dom\","); ++ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 38 C\u00f6ln, Dom\","); + add_srs_wkt(p,1,"GEOGCS[\"DHDN\","); + add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\","); + add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],"); +@@ -682,10 +682,10 @@ initialize_epsg_prussian(int filter,struct epsg_defs **first, struct epsg_defs * + add_srs_wkt(p,10,"PARAMETER[\"central_meridian\",6.95897600],"); + add_srs_wkt(p,11,"PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],"); + add_srs_wkt(p,12,"AUTHORITY[\"mj10777.de\",\"187938\"],AXIS[\"x\",NORTH],AXIS[\"y\",EAST]]"); +- p = add_epsg_def(filter,first,last,187939,"mj10777.de",187939,"DHDN / Soldner 39 Langschoß"); ++ p = add_epsg_def(filter,first,last,187939,u8"mj10777.de",187939,"DHDN / Soldner 39 Langscho\u00df"); + add_proj4text(p,0,"+proj=cass +lat_0=50.66738711 +lon_0=6.28935703 "); + add_proj4text(p,1,"+x_0=0 +y_0=0 +ellps=bessel +datum=potsdam +units=m +no_defs"); +- add_srs_wkt(p,0,"PROJCS[\"DHDN / Soldner 39 Langschoß\","); ++ add_srs_wkt(p,0,u8"PROJCS[\"DHDN / Soldner 39 Langscho\u00df\","); + add_srs_wkt(p,1,"GEOGCS[\"DHDN\","); + add_srs_wkt(p,2,"DATUM[\"Deutsches_Hauptdreiecksnetz\",SPHEROID[\"Bessel 1841\","); + add_srs_wkt(p,3,"6377397.155,299.1528128,AUTHORITY[\"EPSG\",\"7004\"]],"); diff --git a/vcpkg/ports/libspatialite/fix-linux-configure.patch b/vcpkg/ports/libspatialite/fix-linux-configure.patch new file mode 100644 index 0000000..59afa8c --- /dev/null +++ b/vcpkg/ports/libspatialite/fix-linux-configure.patch @@ -0,0 +1,135 @@ +diff --git a/configure b/configure +index aafdad5..fe46039 100644 +--- a/configure ++++ b/configure +@@ -17448,6 +17448,7 @@ fi + # --enable-proj + # + # Check whether --enable-proj was given. ++ + if test "${enable_proj+set}" = set; then : + enableval=$enable_proj; + else +@@ -17469,122 +17470,6 @@ fi + + done + +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pj_init_plus" >&5 +-$as_echo_n "checking for library containing pj_init_plus... " >&6; } +-if ${ac_cv_search_pj_init_plus+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_func_search_save_LIBS=$LIBS +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char pj_init_plus (); +-int +-main () +-{ +-return pj_init_plus (); +- ; +- return 0; +-} +-_ACEOF +-for ac_lib in '' proj; do +- if test -z "$ac_lib"; then +- ac_res="none required" +- else +- ac_res=-l$ac_lib +- LIBS="-l$ac_lib -lm $ac_func_search_save_LIBS" +- fi +- if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_search_pj_init_plus=$ac_res +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext +- if ${ac_cv_search_pj_init_plus+:} false; then : +- break +-fi +-done +-if ${ac_cv_search_pj_init_plus+:} false; then : +- +-else +- ac_cv_search_pj_init_plus=no +-fi +-rm conftest.$ac_ext +-LIBS=$ac_func_search_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pj_init_plus" >&5 +-$as_echo "$ac_cv_search_pj_init_plus" >&6; } +-ac_res=$ac_cv_search_pj_init_plus +-if test "$ac_res" != no; then : +- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +- +-else +- as_fn_error $? "'libproj' is required but it doesn't seem to be installed on this system." "$LINENO" 5 +-fi +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pj_init_ctx" >&5 +-$as_echo_n "checking for library containing pj_init_ctx... " >&6; } +-if ${ac_cv_search_pj_init_ctx+:} false; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_func_search_save_LIBS=$LIBS +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char pj_init_ctx (); +-int +-main () +-{ +-return pj_init_ctx (); +- ; +- return 0; +-} +-_ACEOF +-for ac_lib in '' proj; do +- if test -z "$ac_lib"; then +- ac_res="none required" +- else +- ac_res=-l$ac_lib +- LIBS="-l$ac_lib -lm $ac_func_search_save_LIBS" +- fi +- if ac_fn_c_try_link "$LINENO"; then : +- ac_cv_search_pj_init_ctx=$ac_res +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext +- if ${ac_cv_search_pj_init_ctx+:} false; then : +- break +-fi +-done +-if ${ac_cv_search_pj_init_ctx+:} false; then : +- +-else +- ac_cv_search_pj_init_ctx=no +-fi +-rm conftest.$ac_ext +-LIBS=$ac_func_search_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pj_init_ctx" >&5 +-$as_echo "$ac_cv_search_pj_init_ctx" >&6; } +-ac_res=$ac_cv_search_pj_init_ctx +-if test "$ac_res" != no; then : +- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +- +-else +- as_fn_error $? "'libproj' is required but the version on this system does not support the required features (Version 4.8.0 or later is needed)." "$LINENO" 5 +-fi +- + else + $as_echo "#define OMIT_PROJ 1" >>confdefs.h + diff --git a/vcpkg/ports/libspatialite/fix-makefiles.patch b/vcpkg/ports/libspatialite/fix-makefiles.patch new file mode 100644 index 0000000..9372739 --- /dev/null +++ b/vcpkg/ports/libspatialite/fix-makefiles.patch @@ -0,0 +1,61 @@ +diff --git a/makefile.vc b/makefile.vc +index 9b9e8ee..b524a27 100644 +--- a/makefile.vc ++++ b/makefile.vc +@@ -59,7 +59,7 @@ LIBOBJ = src\gaiaaux\gg_sqlaux.obj src\gaiaaux\gg_utf8.obj \ + src\versioninfo\version.obj src\virtualtext\virtualtext.obj + SPATIALITE_DLL = spatialite$(VERSION).dll + +-CFLAGS = /nologo -I.\src\headers -I. -IC:\OSGeo4W\include $(OPTFLAGS) ++CFLAGS = /nologo -I.\src\headers -I. -I$(INSTALLED_ROOT)\include $(OPTFLAGS) + + default: all + +@@ -73,12 +73,9 @@ spatialite.lib: $(LIBOBJ) + $(SPATIALITE_DLL): spatialite_i.lib + + spatialite_i.lib: $(LIBOBJ) +- link /debug /dll /out:$(SPATIALITE_DLL) \ ++ link $(LINK_FLAGS) /dll /out:$(SPATIALITE_DLL) \ + /implib:spatialite_i.lib $(LIBOBJ) \ +- C:\OSGeo4W\lib\proj_i.lib C:\OSGeo4W\lib\geos_c.lib \ +- C:\OSGeo4w\lib\freexl_i.lib C:\OSGeo4w\lib\iconv.lib \ +- C:\OSGeo4W\lib\sqlite3_i.lib C:\OSGeo4W\lib\zlib.lib \ +- C:\OSGeo4W\lib\libxml2.lib ++ $(LIBS_ALL) + if exist $(SPATIALITE_DLL).manifest mt -manifest \ + $(SPATIALITE_DLL).manifest -outputresource:$(SPATIALITE_DLL);2 + +@@ -90,16 +87,7 @@ clean: + del *.exp + del *.manifest + del *.lib +- del src\gaiaaux\*.obj +- del src\gaiaexif\*.obj +- del src\gaiageo\*.obj +- del src\spatialite\*.obj +- del src\srsinit\*.obj +- del src\versioninfo\*.obj +- del src\virtualtext\*.obj +- del src\wfs\*.obj +- del src\dxf\*.obj +- del src\md5\*.obj ++ forfiles /m *.obj* /s /c "cmd /c del @path" & exit 0 + del *.pdb + + install: all +diff --git a/nmake.opt b/nmake.opt +index 0960ec1..276bc84 100644 +--- a/nmake.opt ++++ b/nmake.opt +@@ -1,8 +1,8 @@ + # Directory tree where SpatiaLite will be installed. +-INSTDIR=C:\OSGeo4W ++INSTDIR=$(INST_DIR) + + # Uncomment the first for an optimized build, or the second for debug. +-OPTFLAGS= /nologo /Ox /fp:precise /W3 /MD /D_CRT_SECURE_NO_WARNINGS \ ++OPTFLAGS= /nologo /fp:precise /W3 $(CL_FLAGS) /D_CRT_SECURE_NO_WARNINGS \ + /DDLL_EXPORT /DYY_NO_UNISTD_H + #OPTFLAGS= /nologo /Zi /MD /Fdspatialite.pdb /DDLL_EXPORT + diff --git a/vcpkg/ports/libspatialite/fix-sources.patch b/vcpkg/ports/libspatialite/fix-sources.patch new file mode 100644 index 0000000..63def0d --- /dev/null +++ b/vcpkg/ports/libspatialite/fix-sources.patch @@ -0,0 +1,32 @@ +diff --git a/config-msvc.h b/config-msvc.h +index 9c7f477..a812546 100644 +--- a/config-msvc.h ++++ b/config-msvc.h +@@ -143,7 +143,7 @@ + #define HAVE_SYS_TYPES_H 1 + + /* Define to 1 if you have the header file. */ +-#define HAVE_UNISTD_H 1 ++#undef HAVE_UNISTD_H + + /* Define to 1 if you have the header file. */ + #define HAVE_ZLIB_H 1 +diff --git a/src/gaiageo/gg_extras.c b/src/gaiageo/gg_extras.c +index ff3dd7c..49ec986 100644 +--- a/src/gaiageo/gg_extras.c ++++ b/src/gaiageo/gg_extras.c +@@ -59,14 +59,6 @@ the terms of any one of the MPL, the GPL or the LGPL. + #include + #include + +-#if defined(_WIN32) && !defined(__MINGW32__) +-static double +-rint (double x) +-{ +- return floor (x + 0.5); +-} +-#endif +- + static void + auxGridSnapPoint (int dimension_model, gaiaPointPtr pt, gaiaGeomCollPtr result, + double origin_x, double origin_y, double origin_z, diff --git a/vcpkg/ports/libspatialite/geos-config-debug.in b/vcpkg/ports/libspatialite/geos-config-debug.in new file mode 100644 index 0000000..d274c2a --- /dev/null +++ b/vcpkg/ports/libspatialite/geos-config-debug.in @@ -0,0 +1,75 @@ +#!/bin/sh +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ + +usage() +{ + cat <&2 +fi +while test $# -gt 0; do +case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; +esac +case $1 in + --prefix) + echo ${prefix} + ;; + --version) + echo 3.6.3 + ;; + --cflags) + echo -I${prefix}/include + ;; + --libs) + # TODO: make an alias for --clibs + # see http://trac.osgeo.org/geos/ticket/497 + echo -L${libdir} -lgeosd + ;; + --clibs) + echo -L${libdir} -lgeos_cd + ;; + --cclibs) + echo -L${libdir} -lgeosd + ;; + --static-clibs) + echo -L${libdir} -lgeos_cd -lgeosd -lm + ;; + --static-cclibs) + echo -L${libdir} -lgeosd -lm + ;; + --ldflags) + echo -L${libdir} -lgeos_cd -lgeosd -lstdc++ -lm + ;; + --includes) + echo ${prefix}/include + ;; + --jtsport) + echo 1.13.0 + ;; + *) + usage 1 1>&2 + ;; + esac + shift +done + diff --git a/vcpkg/ports/libspatialite/geos-config.in b/vcpkg/ports/libspatialite/geos-config.in new file mode 100644 index 0000000..a2a6d5d --- /dev/null +++ b/vcpkg/ports/libspatialite/geos-config.in @@ -0,0 +1,75 @@ +#!/bin/sh +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ + +usage() +{ + cat <&2 +fi +while test $# -gt 0; do +case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; +esac +case $1 in + --prefix) + echo ${prefix} + ;; + --version) + echo 3.6.3 + ;; + --cflags) + echo -I${prefix}/include + ;; + --libs) + # TODO: make an alias for --clibs + # see http://trac.osgeo.org/geos/ticket/497 + echo -L${libdir} -lgeos + ;; + --clibs) + echo -L${libdir} -lgeos_c + ;; + --cclibs) + echo -L${libdir} -lgeos + ;; + --static-clibs) + echo -L${libdir} -lgeos_c -lgeos -lm + ;; + --static-cclibs) + echo -L${libdir} -lgeos -lm + ;; + --ldflags) + echo -L${libdir} -lgeos_c -lgeos -lstdc++ -lm + ;; + --includes) + echo ${prefix}/include + ;; + --jtsport) + echo 1.13.0 + ;; + *) + usage 1 1>&2 + ;; + esac + shift +done + diff --git a/vcpkg/ports/libspatialite/portfile.cmake b/vcpkg/ports/libspatialite/portfile.cmake new file mode 100644 index 0000000..043fce9 --- /dev/null +++ b/vcpkg/ports/libspatialite/portfile.cmake @@ -0,0 +1,238 @@ +include(vcpkg_common_functions) +set(LIBSPATIALITE_VERSION_STR "4.3.0a") +vcpkg_download_distfile(ARCHIVE + URLS "http://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-${LIBSPATIALITE_VERSION_STR}.tar.gz" + FILENAME "libspatialite-${LIBSPATIALITE_VERSION_STR}.tar.gz" + SHA512 adfd63e8dde0f370b07e4e7bb557647d2bfb5549205b60bdcaaca69ff81298a3d885e7c1ca515ef56dd0aca152ae940df8b5dbcb65bb61ae0a9337499895c3c0 +) + +if (VCPKG_TARGET_IS_WINDOWS) + find_program(NMAKE nmake) + + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + fix-makefiles.patch + fix-sources.patch + fix-latin-literals.patch + ) + + # fix most of the problems when spacebar is in the path + set(CURRENT_INSTALLED_DIR "\"${CURRENT_INSTALLED_DIR}\"") + + if(VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(CL_FLAGS_DBG "/MDd /Zi /DACCEPT_USE_OF_DEPRECATED_PROJ_API_H") + set(CL_FLAGS_REL "/MD /Ox /DACCEPT_USE_OF_DEPRECATED_PROJ_API_H") + set(GEOS_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib") + set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib") + set(LIBXML2_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib") + set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib") + else() + set(CL_FLAGS_DBG "/MTd /Zi /DACCEPT_USE_OF_DEPRECATED_PROJ_API_H") + set(CL_FLAGS_REL "/MT /Ox /DACCEPT_USE_OF_DEPRECATED_PROJ_API_H") + set(GEOS_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/geos_c.lib ${CURRENT_INSTALLED_DIR}/lib/geos.lib") + set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/geos_cd.lib ${CURRENT_INSTALLED_DIR}/debug/lib/geosd.lib") + set(LIBXML2_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/lib/lzma.lib ws2_32.lib") + set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/debug/lib/lzmad.lib ws2_32.lib") + endif() + + set(LIBS_ALL_DBG + "${CURRENT_INSTALLED_DIR}/debug/lib/libiconv.lib \ + ${CURRENT_INSTALLED_DIR}/debug/lib/libcharset.lib \ + ${CURRENT_INSTALLED_DIR}/debug/lib/sqlite3.lib \ + ${CURRENT_INSTALLED_DIR}/debug/lib/freexl.lib \ + ${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib \ + ${LIBXML2_LIBS_DBG} \ + ${GEOS_LIBS_DBG} \ + ${CURRENT_INSTALLED_DIR}/debug/lib/proj_d.lib" + ) + set(LIBS_ALL_REL + "${CURRENT_INSTALLED_DIR}/lib/libiconv.lib \ + ${CURRENT_INSTALLED_DIR}/lib/libcharset.lib \ + ${CURRENT_INSTALLED_DIR}/lib/sqlite3.lib \ + ${CURRENT_INSTALLED_DIR}/lib/freexl.lib \ + ${CURRENT_INSTALLED_DIR}/lib/zlib.lib \ + ${LIBXML2_LIBS_REL} \ + ${GEOS_LIBS_REL} \ + ${CURRENT_INSTALLED_DIR}/lib/proj.lib" + ) + + ################ + # Debug build + ################ + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Building ${TARGET_TRIPLET}-dbg") + + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/debug" INST_DIR_DBG) + + vcpkg_execute_required_process( + COMMAND ${NMAKE} -f makefile.vc clean install + "INST_DIR=\"${INST_DIR_DBG}\"" INSTALLED_ROOT=${CURRENT_INSTALLED_DIR} "LINK_FLAGS=/debug" "CL_FLAGS=${CL_FLAGS_DBG}" "LIBS_ALL=${LIBS_ALL_DBG}" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME nmake-build-${TARGET_TRIPLET}-debug + ) + message(STATUS "Building ${TARGET_TRIPLET}-dbg done") + vcpkg_copy_pdbs() + endif() + + ################ + # Release build + ################ + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Building ${TARGET_TRIPLET}-rel") + + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL) + vcpkg_execute_required_process( + COMMAND ${NMAKE} -f makefile.vc clean install + "INST_DIR=\"${INST_DIR_REL}\"" INSTALLED_ROOT=${CURRENT_INSTALLED_DIR} "LINK_FLAGS=" "CL_FLAGS=${CL_FLAGS_REL}" "LIBS_ALL=${LIBS_ALL_REL}" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME nmake-build-${TARGET_TRIPLET}-release + ) + message(STATUS "Building ${TARGET_TRIPLET}-rel done") + endif() + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libspatialite RENAME copyright) + + if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/spatialite_i.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite_i.lib) + else() + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/spatialite.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite.lib) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/spatialite_i.lib ${CURRENT_PACKAGES_DIR}/lib/spatialite.lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/spatialite.lib) + endif() + endif() + + message(STATUS "Packaging ${TARGET_TRIPLET} done") +elseif (VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) # Build in UNIX + # Check build system first + find_program(MAKE make) + if (NOT MAKE) + message(FATAL_ERROR "MAKE not found") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + ################ + # Release build + ################ + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH_RELEASE + ARCHIVE ${ARCHIVE} + REF release + PATCHES + fix-sources.patch + fix-latin-literals.patch + fix-linux-configure.patch + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + set(OUT_PATH_RELEASE ${SOURCE_PATH_RELEASE}/../../make-build-${TARGET_TRIPLET}-release) + file(REMOVE_RECURSE ${OUT_PATH_RELEASE}) + file(MAKE_DIRECTORY ${OUT_PATH_RELEASE}) + set(prefix ${CURRENT_INSTALLED_DIR}) + set(exec_prefix ${prefix}/bin) + set(includedir ${prefix}/include) + set(libdir ${prefix}/lib) + configure_file(${CMAKE_CURRENT_LIST_DIR}/geos-config.in + ${SOURCE_PATH_RELEASE}/geos-config @ONLY) + vcpkg_execute_required_process( + COMMAND chmod -R 777 ${SOURCE_PATH_RELEASE}/geos-config + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME config-${TARGET_TRIPLET}-rel + ) + vcpkg_execute_required_process( + COMMAND "${SOURCE_PATH_RELEASE}/configure" --prefix=${OUT_PATH_RELEASE} "CFLAGS=-I${includedir} ${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_RELEASE} -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" "LDFLAGS=-L${libdir}" "LIBS=-lpthread -ldl -lproj" "--with-geosconfig=${SOURCE_PATH_RELEASE}/geos-config" "LIBXML2_LIBS=-lxml2 -llzma" "LIBXML2_CFLAGS=${includedir}" + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME config-${TARGET_TRIPLET}-rel + ) + + message(STATUS "Building ${TARGET_TRIPLET}-rel") + vcpkg_execute_build_process( + COMMAND make -j ${VCPKG_CONCURRENCY} + NO_PARALLEL_COMMAND make + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME make-build-${TARGET_TRIPLET}-release + ) + + message(STATUS "Installing ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND make install + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME make-install-${TARGET_TRIPLET}-release + ) + + set(VERSION ${LIBSPATIALITE_VERSION_STR}) + configure_file(${SOURCE_PATH_RELEASE}/spatialite.pc.in + ${OUT_PATH_RELEASE}/lib/pkgconfig/spatialite.pc @ONLY) + file(COPY ${OUT_PATH_RELEASE}/lib DESTINATION ${CURRENT_PACKAGES_DIR}) + file(COPY ${OUT_PATH_RELEASE}/include DESTINATION ${CURRENT_PACKAGES_DIR}) + file(INSTALL ${SOURCE_PATH_RELEASE}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libspatialite RENAME copyright) + message(STATUS "Installing ${TARGET_TRIPLET}-rel done") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + ################ + # Debug build + ################ + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH_DEBUG + ARCHIVE ${ARCHIVE} + REF debug + PATCHES + fix-sources.patch + fix-latin-literals.patch + fix-configure-debug.patch + fix-linux-configure.patch + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + set(OUT_PATH_DEBUG ${SOURCE_PATH_DEBUG}/../../make-build-${TARGET_TRIPLET}-debug) + file(REMOVE_RECURSE ${OUT_PATH_DEBUG}) + file(MAKE_DIRECTORY ${OUT_PATH_DEBUG}) + set(prefix ${CURRENT_INSTALLED_DIR}) + set(exec_prefix ${prefix}/debug/bin) + set(includedir ${prefix}/include) + set(libdir ${prefix}/debug/lib) + configure_file(${CMAKE_CURRENT_LIST_DIR}/geos-config-debug.in + ${SOURCE_PATH_DEBUG}/geos-config @ONLY) + vcpkg_execute_required_process( + COMMAND chmod -R 777 ${SOURCE_PATH_DEBUG}/geos-config + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME config-${TARGET_TRIPLET}-debug + ) + vcpkg_execute_required_process( + COMMAND "${SOURCE_PATH_DEBUG}/configure" --prefix=${OUT_PATH_DEBUG} "CFLAGS=-I${includedir} ${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_DEBUG} -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H" "LDFLAGS=-L${libdir}" "LIBS=-lpthread -ldl -lproj" "--with-geosconfig=${SOURCE_PATH_DEBUG}/geos-config" "LIBXML2_LIBS=-lxml2 -llzmad" "LIBXML2_CFLAGS=${includedir}" + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME config-${TARGET_TRIPLET}-debug + ) + + message(STATUS "Building ${TARGET_TRIPLET}-dbg") + vcpkg_execute_build_process( + COMMAND make -j ${VCPKG_CONCURRENCY} + NO_PARALLEL_COMMAND make + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME make-build-${TARGET_TRIPLET}-debug + ) + + message(STATUS "Installing ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND make -j install + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME make-install-${TARGET_TRIPLET}-debug + ) + + set(VERSION ${LIBSPATIALITE_VERSION_STR}) + configure_file(${SOURCE_PATH_DEBUG}/spatialite.pc.in + ${OUT_PATH_DEBUG}/lib/pkgconfig/spatialite.pc @ONLY) + file(COPY ${OUT_PATH_DEBUG}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) + message(STATUS "Installing ${TARGET_TRIPLET}-dbg done") + endif() +else() # Other build system + message(FATAL_ERROR "Unsupport build system.") +endif() \ No newline at end of file diff --git a/vcpkg/ports/libsquish/CONTROL b/vcpkg/ports/libsquish/CONTROL new file mode 100644 index 0000000..2e35004 --- /dev/null +++ b/vcpkg/ports/libsquish/CONTROL @@ -0,0 +1,4 @@ +Source: libsquish +Version: 1.15-7 +Homepage: https://sourceforge.net/projects/libsquish +Description: Open source DXT compression library. diff --git a/vcpkg/ports/libsquish/fix-export-symbols.patch b/vcpkg/ports/libsquish/fix-export-symbols.patch new file mode 100644 index 0000000..a777eea --- /dev/null +++ b/vcpkg/ports/libsquish/fix-export-symbols.patch @@ -0,0 +1,105 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a36e574..a3ecdde 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -75,6 +75,13 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) + + ADD_LIBRARY(squish ${SQUISH_SRCS} ${SQUISH_HDRS}) + ++INCLUDE(GenerateExportHeader) ++GENERATE_EXPORT_HEADER(squish ++ EXPORT_FILE_NAME ${CMAKE_CURRENT_SOURCE_DIR}/squish_export.h ++ ) ++ ++list(APPEND SQUISH_HDRS "squish_export.h") ++ + SET_TARGET_PROPERTIES( + squish PROPERTIES + PUBLIC_HEADER "${SQUISH_HDRS}" +@@ -109,9 +116,12 @@ IF (BUILD_SQUISH_EXTRA) + ENDIF (PNG_FOUND) + ENDIF (BUILD_SQUISH_EXTRA) + ++INCLUDE(GNUInstallDirs) ++ + INSTALL( + TARGETS squish +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib +- PUBLIC_HEADER DESTINATION include ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + ) +diff --git a/squish.h b/squish.h +index 14c9bb5..aaffbb2 100644 +--- a/squish.h ++++ b/squish.h +@@ -26,6 +26,8 @@ + #ifndef SQUISH_H + #define SQUISH_H + ++#include "squish_export.h" ++ + //! All squish API functions live in this namespace. + namespace squish { + +@@ -115,5 +117,5 @@ + */ +-void CompressMasked( u8 const* rgba, int mask, void* block, int flags, float* metric = 0 ); ++SQUISH_EXPORT void CompressMasked( u8 const* rgba, int mask, void* block, int flags, float* metric = 0 ); + + // ----------------------------------------------------------------------------- + +@@ -176,7 +178,7 @@ inline void Compress( u8 const* rgba, void* block, int flags, float* metric = 0 + however, DXT1 will be used by default if none is specified. All other flags + are ignored. + */ +-void Decompress( u8* rgba, void const* block, int flags ); ++SQUISH_EXPORT void Decompress( u8* rgba, void const* block, int flags ); + + // ----------------------------------------------------------------------------- + +@@ -194,7 +196,7 @@ void Decompress( u8* rgba, void const* block, int flags ); + function supports arbitrary size images by allowing the outer blocks to + be only partially used. + */ +-int GetStorageRequirements( int width, int height, int flags ); ++SQUISH_EXPORT int GetStorageRequirements( int width, int height, int flags ); + + // ----------------------------------------------------------------------------- + +@@ -249,8 +251,8 @@ int GetStorageRequirements( int width, int height, int flags ); + Windows platform but for other platforms like MacOS X a different + gamma value may be more suitable. + */ +-void CompressImage( u8 const* rgba, int width, int height, int pitch, void* blocks, int flags, float* metric = 0 ); +-void CompressImage( u8 const* rgba, int width, int height, void* blocks, int flags, float* metric = 0 ); ++SQUISH_EXPORT void CompressImage( u8 const* rgba, int width, int height, int pitch, void* blocks, int flags, float* metric = 0 ); ++SQUISH_EXPORT void CompressImage( u8 const* rgba, int width, int height, void* blocks, int flags, float* metric = 0 ); + + // ----------------------------------------------------------------------------- + +@@ -274,8 +276,8 @@ void CompressImage( u8 const* rgba, int width, int height, void* blocks, int fla + + Internally this function calls squish::Decompress for each block. + */ +-void DecompressImage( u8* rgba, int width, int height, int pitch, void const* blocks, int flags ); +-void DecompressImage( u8* rgba, int width, int height, void const* blocks, int flags ); ++SQUISH_EXPORT void DecompressImage( u8* rgba, int width, int height, int pitch, void const* blocks, int flags ); ++SQUISH_EXPORT void DecompressImage( u8* rgba, int width, int height, void const* blocks, int flags ); + + // ----------------------------------------------------------------------------- + +@@ -299,8 +301,8 @@ void DecompressImage( u8* rgba, int width, int height, void const* blocks, int f + + Internally this function calls squish::Decompress for each block. + */ +-void ComputeMSE(u8 const *rgba, int width, int height, int pitch, u8 const *dxt, int flags, double &colourMSE, double &alphaMSE); +-void ComputeMSE(u8 const *rgba, int width, int height, u8 const *dxt, int flags, double &colourMSE, double &alphaMSE); ++SQUISH_EXPORT void ComputeMSE(u8 const *rgba, int width, int height, int pitch, u8 const *dxt, int flags, double &colourMSE, double &alphaMSE); ++SQUISH_EXPORT void ComputeMSE(u8 const *rgba, int width, int height, u8 const *dxt, int flags, double &colourMSE, double &alphaMSE); + + // ----------------------------------------------------------------------------- + diff --git a/vcpkg/ports/libsquish/portfile.cmake b/vcpkg/ports/libsquish/portfile.cmake new file mode 100644 index 0000000..a7ff155 --- /dev/null +++ b/vcpkg/ports/libsquish/portfile.cmake @@ -0,0 +1,20 @@ +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO libsquish + FILENAME "libsquish-1.15.tgz" + NO_REMOVE_ONE_LEVEL + SHA512 5b569b7023874c7a43063107e2e428ea19e6eb00de045a4a13fafe852ed5402093db4b65d540b5971ec2be0d21cb97dfad9161ebfe6cf6e5376174ff6c6c3e7a + PATCHES fix-export-symbols.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libsrt/CONTROL b/vcpkg/ports/libsrt/CONTROL new file mode 100644 index 0000000..76a985f --- /dev/null +++ b/vcpkg/ports/libsrt/CONTROL @@ -0,0 +1,8 @@ +Source: libsrt +Version: 1.3.4 +Description: Secure Reliable Transport (SRT) is an open source transport technology that optimizes streaming performance across unpredictable networks, such as the Internet. +Homepage: https://github.com/Haivision/srt +Build-Depends: openssl, pthreads (windows) + +Feature: tool +Description: Builds libsrt executable \ No newline at end of file diff --git a/vcpkg/ports/libsrt/fix-dependency-install.patch b/vcpkg/ports/libsrt/fix-dependency-install.patch new file mode 100644 index 0000000..12967e6 --- /dev/null +++ b/vcpkg/ports/libsrt/fix-dependency-install.patch @@ -0,0 +1,74 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ec91d08..f19d28d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -234,6 +234,10 @@ if (ENABLE_ENCRYPTION) + # fall back to find_package method otherwise + if (USE_OPENSSL_PC) + pkg_check_modules(SSL ${SSL_REQUIRED_MODULES}) ++ else() ++ find_package(OpenSSL REQUIRED) ++ set(SSL_FOUND ${OpenSSL_FOUND}) ++ set(SSL_LIBRARIES OpenSSL::SSL OpenSSL::Crypto) + endif() + if (SSL_FOUND) + # We have some cases when pkg-config is improperly configured +@@ -438,7 +442,7 @@ elseif (WIN32 AND NOT MINGW) + message(FATAL_ERROR "Failed to find pthread.h. Specify PTHREAD_INCLUDE_DIR.") + endif() + +- find_library(PTHREAD_LIBRARY NAMES pthread pthread_dll pthread_lib HINTS C:/pthread-win32/lib C:/pthread-win64/lib) ++ find_library(PTHREAD_LIBRARY NAMES pthreadVC3 REQUIRED) + if (PTHREAD_LIBRARY) + message(STATUS "Pthread library: ${PTHREAD_LIBRARY}") + else() +@@ -637,6 +641,7 @@ if (ENABLE_SHARED) + target_compile_definitions(srt_virtual PUBLIC -DSRT_DYNAMIC) + target_compile_definitions(haicrypt_virtual PRIVATE -DHAICRYPT_EXPORTS) + endif() ++target_link_libraries(haicrypt_virtual PRIVATE ${SSL_LIBRARIES}) + + if (srt_libspec_shared) + if (MICROSOFT) +@@ -650,6 +655,7 @@ set (INSTALL_SHARED_DIR ${CMAKE_INSTALL_LIBDIR}) + if (CYGWIN) + set (INSTALL_SHARED_DIR ${CMAKE_INSTALL_BINDIR}) + endif() ++set(CMAKE_INSTALL_INCLUDEDIR include) + + message(STATUS "INSTALL DIRS: bin=${CMAKE_INSTALL_BINDIR} lib=${CMAKE_INSTALL_LIBDIR} shlib=${INSTALL_SHARED_DIR} include=${CMAKE_INSTALL_INCLUDEDIR}") + +@@ -730,7 +736,7 @@ macro(srt_add_program name) + add_executable(${name} ${ARGN}) + target_include_directories(${name} PRIVATE apps) + target_include_directories(${name} PRIVATE common) +- install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++ install(TARGETS ${name} RUNTIME DESTINATION tools) + endmacro() + + macro(srt_make_application name) +@@ -769,7 +775,7 @@ endmacro() + macro(srt_add_application name) # ARGN=sources... + srt_add_program(${name} apps/${name}.cpp ${ARGN}) + srt_make_application(${name}) +- install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++ install(TARGETS ${name} RUNTIME DESTINATION tools) + endmacro() + + ## FIXME: transmitmedia.cpp does not build on OpenBSD +@@ -923,7 +929,7 @@ if (ENABLE_UNITTESTS AND ENABLE_CXX11) + endif() + + +-install(PROGRAMS scripts/srt-ffplay DESTINATION ${CMAKE_INSTALL_BINDIR}) ++install(PROGRAMS scripts/srt-ffplay DESTINATION tools) + + + if (DEFINED SRT_EXTRA_APPS_INC) +@@ -939,5 +945,5 @@ if ( ENABLE_SUFLIP ) + ) + srt_add_program(suflip ${SOURCES_suflip}) + target_link_libraries(suflip ${srt_link_library}) +- install(TARGETS suflip RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++ install(TARGETS suflip RUNTIME DESTINATION tools) + endif () diff --git a/vcpkg/ports/libsrt/portfile.cmake b/vcpkg/ports/libsrt/portfile.cmake new file mode 100644 index 0000000..d18551e --- /dev/null +++ b/vcpkg/ports/libsrt/portfile.cmake @@ -0,0 +1,41 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Haivision/srt + REF v1.3.4 + SHA512 3a9f9a8fd8ba56ae9ca04203bdea9e9a25275e1f531ca10deee0e760e6beaf44e83ee7a616cfe3ade9676082d9cc8611214de876f64d141e1e8c3b1e16273001 + HEAD_REF master + PATCHES fix-dependency-install.patch +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(BUILD_DYNAMIC ON) + set(BUILD_STATIC OFF) +else() + set(BUILD_DYNAMIC OFF) + set(BUILD_STATIC ON) +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tool ENABLE_APPS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS ${FEATURE_OPTIONS} + -DENABLE_SHARED=${BUILD_DYNAMIC} + -DENABLE_STATIC=${BUILD_STATIC} + -DINSTALL_DOCS=ON + -DINSTALL_PKG_CONFIG_MODULE=ON + -DENABLE_SUFLIP=OFF # Since there are some file not found, disable this feature + -DENABLE_UNITTESTS=OFF + -DUSE_OPENSSL_PC=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/libsrtp/CONTROL b/vcpkg/ports/libsrtp/CONTROL new file mode 100644 index 0000000..9fa7f48 --- /dev/null +++ b/vcpkg/ports/libsrtp/CONTROL @@ -0,0 +1,3 @@ +Source: libsrtp +Version: 2.2.0 +Description: This package provides an implementation of the Secure Real-time Transport Protocol (SRTP), the Universal Security Transform (UST), and a supporting cryptographic kernel. \ No newline at end of file diff --git a/vcpkg/ports/libsrtp/portfile.cmake b/vcpkg/ports/libsrtp/portfile.cmake new file mode 100644 index 0000000..4d6ec02 --- /dev/null +++ b/vcpkg/ports/libsrtp/portfile.cmake @@ -0,0 +1,33 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cisco/libsrtp + REF 56a065555aea2abddaf9fb60353fe59f277837a3 + SHA512 59afa25df79f875d28eefe95ef89b5956b1d2f319bba38ec34b832c2faa16b5425aae2f6ad19cf478afe02b28f4032b5dcf20a301d647d897d4577f66ca77376 +) + +if (VCPKG_TARGET_IS_WINDOWS) + set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS /wd4703") + set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS /wd4703") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/srtp2.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/srtp2.dll ${CURRENT_PACKAGES_DIR}/bin/srtp2.dll) +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/srtp2.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/srtp2.dll ${CURRENT_PACKAGES_DIR}/debug/bin/srtp2.dll) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libsrtp RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/libssh/CONTROL b/vcpkg/ports/libssh/CONTROL new file mode 100644 index 0000000..fbee566 --- /dev/null +++ b/vcpkg/ports/libssh/CONTROL @@ -0,0 +1,22 @@ +Source: libssh +Version: 0.9.5 +Homepage: https://www.libssh.org/ +Description: libssh is a multiplatform C library implementing the SSHv2 protocol on client and server side +Default-Features: crypto +Supports: !uwp + +Feature: crypto +Build-Depends: libssh[mbedtls] +Description: Default crypto backend + +Feature: mbedtls +Build-Depends: mbedtls[pthreads] +Description: Crypto support (mbedTLS) + +Feature: openssl +Build-Depends: openssl +Description: Crypto support (OpenSSL) + +Feature: zlib +Description: libssh with zlib +Build-Depends: zlib diff --git a/vcpkg/ports/libssh/portfile.cmake b/vcpkg/ports/libssh/portfile.cmake new file mode 100644 index 0000000..3874d19 --- /dev/null +++ b/vcpkg/ports/libssh/portfile.cmake @@ -0,0 +1,56 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +set(VERSION 0.9.5) +vcpkg_download_distfile(ARCHIVE + URLS "https://www.libssh.org/files/0.9/libssh-${VERSION}.tar.xz" + FILENAME "libssh-${VERSION}.tar.xz" + SHA512 64e692a0bfa7f73585ea7b7b8b1d4c9a7f9be59565bfd4de32ca8cd9db121f87e7ad51f5c80269fbd99545af34dcf1894374ed8a6d6c1ac5f8601c026572ac18 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${VERSION} +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + mbedtls WITH_MBEDTLS + zlib WITH_ZLIB +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DWITH_EXAMPLES=OFF + -DUNIT_TESTING=OFF + -DCLIENT_TESTING=OFF + -DSERVER_TESTING=OFF + -DWITH_NACL=OFF) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/include/libssh/libssh.h + "#ifdef LIBSSH_STATIC" + "#if 1" + ) +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/share/libssh/libssh-config.cmake + ".dll" + ".lib" + ) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${CURRENT_PORT_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/libssh/usage b/vcpkg/ports/libssh/usage new file mode 100644 index 0000000..39cb551 --- /dev/null +++ b/vcpkg/ports/libssh/usage @@ -0,0 +1,4 @@ +The package libssh is compatible with built-in CMake targets: + + find_package(libssh CONFIG REQUIRED) + target_link_libraries(main PRIVATE ssh) diff --git a/vcpkg/ports/libssh2/0001-Fix-UWP.patch b/vcpkg/ports/libssh2/0001-Fix-UWP.patch new file mode 100644 index 0000000..270dd7b --- /dev/null +++ b/vcpkg/ports/libssh2/0001-Fix-UWP.patch @@ -0,0 +1,48 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 6401acf..64de3e9 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -349,7 +349,7 @@ target_include_directories(libssh2 PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) + # Check for the OS. + # Daniel's note: this should not be necessary and we need to work to + # get this removed. +-if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows") ++if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows" OR ${CMAKE_SYSTEM_NAME} STREQUAL "WindowsStore") + target_compile_definitions(libssh2 PRIVATE LIBSSH2_WIN32) + elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + target_compile_definitions(libssh2 PRIVATE LIBSSH2_DARWIN) +diff --git a/src/agent.c b/src/agent.c +index c2ba422..f1799f8 100644 +--- a/src/agent.c ++++ b/src/agent.c +@@ -51,6 +51,10 @@ + #include "userauth.h" + #include "session.h" + ++#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP) ++#define IS_UWP 1 ++#endif /* #if defined(WINAPI_FAMILY) */ ++ + /* Requests from client to agent for protocol 1 key operations */ + #define SSH_AGENTC_REQUEST_RSA_IDENTITIES 1 + #define SSH_AGENTC_RSA_CHALLENGE 3 +@@ -254,7 +258,7 @@ struct agent_ops agent_ops_unix = { + }; + #endif /* PF_UNIX */ + +-#ifdef WIN32 ++#if defined(WIN32) && !defined(IS_UWP) + /* Code to talk to Pageant was taken from PuTTY. + * + * Portions copyright Robert de Bath, Joris van Rantwijk, Delian +@@ -362,8 +366,8 @@ static struct { + const char *name; + struct agent_ops *ops; + } supported_backends[] = { +-#ifdef WIN32 +- {"Pageant", &agent_ops_pageant}, ++#if defined(WIN32) && !defined(IS_UWP) ++ {"Pageant", &agent_ops_pageant}, + #endif /* WIN32 */ + #ifdef PF_UNIX + {"Unix", &agent_ops_unix}, diff --git a/vcpkg/ports/libssh2/CONTROL b/vcpkg/ports/libssh2/CONTROL new file mode 100644 index 0000000..e870b0e --- /dev/null +++ b/vcpkg/ports/libssh2/CONTROL @@ -0,0 +1,5 @@ +Source: libssh2 +Version: 1.9.0 +Build-Depends: zlib, openssl +Homepage: https://www.libssh2.org +Description: The SSH library diff --git a/vcpkg/ports/libssh2/LICENSE b/vcpkg/ports/libssh2/LICENSE new file mode 100644 index 0000000..d629fbd --- /dev/null +++ b/vcpkg/ports/libssh2/LICENSE @@ -0,0 +1,41 @@ +/* Copyright (c) 2004-2007 Sara Golemon + * Copyright (c) 2005,2006 Mikhail Gusarov + * Copyright (c) 2006-2007 The Written Word, Inc. + * Copyright (c) 2007 Eli Fant + * Copyright (c) 2009-2014 Daniel Stenberg + * Copyright (C) 2008, 2009 Simon Josefsson + * All rights reserved. + * + * Redistribution and use in source and binary forms, + * with or without modification, are permitted provided + * that the following conditions are met: + * + * Redistributions of source code must retain the above + * copyright notice, this list of conditions and the + * following disclaimer. + * + * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * Neither the name of the copyright holder nor the names + * of any other contributors may be used to endorse or + * promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + */ \ No newline at end of file diff --git a/vcpkg/ports/libssh2/portfile.cmake b/vcpkg/ports/libssh2/portfile.cmake new file mode 100644 index 0000000..de3cee5 --- /dev/null +++ b/vcpkg/ports/libssh2/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libssh2/libssh2 + REF 42d37aa63129a1b2644bf6495198923534322d64 + SHA512 e86c0787e2aa7be5e9f19356e543493e53c7d1b51b585c46facfb05f769e6491209f820b207bf594348f4760c492c32dda3fcc94fc0af93cb09c736492a8e231 + HEAD_REF master + PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-Fix-UWP.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_EXAMPLES=OFF + -DBUILD_TESTING=OFF + -DENABLE_ZLIB_COMPRESSION=ON + OPTIONS_DEBUG + -DENABLE_DEBUG_LOGGING=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libssh2) + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libssh2 RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/libstemmer/CMakeLists.txt b/vcpkg/ports/libstemmer/CMakeLists.txt new file mode 100644 index 0000000..787bb26 --- /dev/null +++ b/vcpkg/ports/libstemmer/CMakeLists.txt @@ -0,0 +1,22 @@ +cmake_minimum_required(VERSION 3.8.0) + +project(libstemmer) + +file(GLOB SNOWBALL_SOURCES + src_c/*.c + runtime/api.c + runtime/utilities.c + libstemmer/libstemmer.c +) + +add_library(stemmer ${SNOWBALL_SOURCES}) + +install( + TARGETS stemmer + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES include/libstemmer.h DESTINATION include) +endif() diff --git a/vcpkg/ports/libstemmer/CONTROL b/vcpkg/ports/libstemmer/CONTROL new file mode 100644 index 0000000..57d28d8 --- /dev/null +++ b/vcpkg/ports/libstemmer/CONTROL @@ -0,0 +1,4 @@ +Source: libstemmer +Version: 2017-9-5 +Homepage: https://snowball.tartarus.org/ +Description: Snowball is a small string processing language designed for creating stemming algorithms for use in Information Retrieval diff --git a/vcpkg/ports/libstemmer/LICENSE b/vcpkg/ports/libstemmer/LICENSE new file mode 100644 index 0000000..0c9e7c0 --- /dev/null +++ b/vcpkg/ports/libstemmer/LICENSE @@ -0,0 +1,19 @@ +Snowball - License +Except where explicitly noted, all the software given out on this Snowball site is covered by the 3-clause BSD License: + +Copyright (c) 2001, Dr Martin Porter, +Copyright (c) 2002, Richard Boulton. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Essentially, all this means is that you can do what you like with the code, except claim another Copyright for it, or claim that it is issued under a different license. The software is also issued without warranties, which means that if anyone suffers through its use, they cannot come back and sue you. You also have to alert anyone to whom you give the Snowball software to the fact that it is covered by the BSD license. + +We have not bothered to insert the licensing arrangement into the text of the Snowball software. diff --git a/vcpkg/ports/libstemmer/portfile.cmake b/vcpkg/ports/libstemmer/portfile.cmake new file mode 100644 index 0000000..68580f4 --- /dev/null +++ b/vcpkg/ports/libstemmer/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "http://snowball.tartarus.org/dist/libstemmer_c.tgz" + FILENAME "libstemmer_c.tgz" + SHA512 9ab5b8bfd5b4071dbbd63d769e09fae3971b49ee441ad970aa95d90b3297f5ffc9deed1613d99974d1485bf3b69292663591957f52bbeddcadbf9d9a4af432f2 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +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 ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libstemmer RENAME copyright) diff --git a/vcpkg/ports/libstk/CMakeLists.txt b/vcpkg/ports/libstk/CMakeLists.txt new file mode 100644 index 0000000..7d92632 --- /dev/null +++ b/vcpkg/ports/libstk/CMakeLists.txt @@ -0,0 +1,215 @@ +cmake_minimum_required(VERSION 3.0) +project(libstk) + +set(LIBSTK_SOURCES + src/ADSR.cpp + src/Asymp.cpp + src/BandedWG.cpp + src/BeeThree.cpp + src/BiQuad.cpp + src/Blit.cpp + src/BlitSaw.cpp + src/BlitSquare.cpp + src/BlowBotl.cpp + src/BlowHole.cpp + src/Bowed.cpp + src/Brass.cpp + src/Chorus.cpp + src/Clarinet.cpp + src/Delay.cpp + src/DelayA.cpp + src/DelayL.cpp + src/Drummer.cpp + src/Echo.cpp + src/Envelope.cpp + src/FileLoop.cpp + src/FileRead.cpp + src/FileWrite.cpp + src/FileWvIn.cpp + src/FileWvOut.cpp + src/Fir.cpp + src/Flute.cpp + src/FM.cpp + src/FMVoices.cpp + src/FormSwep.cpp + src/FreeVerb.cpp + src/Granulate.cpp + src/Guitar.cpp + src/HevyMetl.cpp + src/Iir.cpp + src/JCRev.cpp + src/LentPitShift.cpp + src/Makefile.in + src/Mandolin.cpp + src/Mesh2D.cpp + src/Messager.cpp + src/MidiFileIn.cpp + src/Modal.cpp + src/ModalBar.cpp + src/Modulate.cpp + src/Moog.cpp + src/Noise.cpp + src/NRev.cpp + src/OnePole.cpp + src/OneZero.cpp + src/PercFlut.cpp + src/Phonemes.cpp + src/PitShift.cpp + src/Plucked.cpp + src/PoleZero.cpp + src/PRCRev.cpp + src/Resonate.cpp + src/Rhodey.cpp + src/Sampler.cpp + src/Saxofony.cpp + src/Shakers.cpp + src/Simple.cpp + src/SineWave.cpp + src/SingWave.cpp + src/Sitar.cpp + src/Skini.cpp + src/Sphere.cpp + src/StifKarp.cpp + src/Stk.cpp + src/TapDelay.cpp + src/TubeBell.cpp + src/Twang.cpp + src/TwoPole.cpp + src/TwoZero.cpp + src/Voicer.cpp + src/VoicForm.cpp + src/Whistle.cpp + src/Wurley.cpp) + +set(LIBSTK_REALTIME_SOURCES + src/InetWvIn.cpp + src/InetWvOut.cpp + src/Mutex.cpp + src/RtAudio.cpp + src/RtMidi.cpp + src/RtWvIn.cpp + src/RtWvOut.cpp + src/Socket.cpp + src/TcpClient.cpp + src/TcpServer.cpp + src/Thread.cpp + src/UdpSocket.cpp +) + +set(LIBSTK_HEADERS + include/ADSR.h + include/Asymp.h + include/BandedWG.h + include/BeeThree.h + include/BiQuad.h + include/Blit.h + include/BlitSaw.h + include/BlitSquare.h + include/BlowBotl.h + include/BlowHole.h + include/Bowed.h + include/BowTable.h + include/Brass.h + include/Chorus.h + include/Clarinet.h + include/Cubic.h + include/Delay.h + include/DelayA.h + include/DelayL.h + include/Drummer.h + include/Echo.h + include/Effect.h + include/Envelope.h + include/FileLoop.h + include/FileRead.h + include/FileWrite.h + include/FileWvIn.h + include/FileWvOut.h + include/Filter.h + include/Fir.h + include/Flute.h + include/FM.h + include/FMVoices.h + include/FormSwep.h + include/FreeVerb.h + include/Function.h + include/Generator.h + include/Granulate.h + include/Guitar.h + include/HevyMetl.h + include/Iir.h + include/InetWvIn.h + include/InetWvOut.h + include/Instrmnt.h + include/JCRev.h + include/JetTable.h + include/LentPitShift.h + include/Mandolin.h + include/Mesh2D.h + include/Messager.h + include/MidiFileIn.h + include/Modal.h + include/ModalBar.h + include/Modulate.h + include/Moog.h + include/Mutex.h + include/Noise.h + include/NRev.h + include/OnePole.h + include/OneZero.h + include/PercFlut.h + include/Phonemes.h + include/PitShift.h + include/Plucked.h + include/PoleZero.h + include/PRCRev.h + include/ReedTable.h + include/Resonate.h + include/Rhodey.h + include/RtAudio.h + include/RtMidi.h + include/RtWvIn.h + include/RtWvOut.h + include/Sampler.h + include/Saxofony.h + include/Shakers.h + include/Simple.h + include/SineWave.h + include/SingWave.h + include/Sitar.h + include/Skini.h + include/SKINImsg.h + include/SKINItbl.h + include/Socket.h + include/Sphere.h + include/StifKarp.h + include/Stk.h + include/TapDelay.h + include/TcpClient.h + include/TcpServer.h + include/Thread.h + include/TubeBell.h + include/Twang.h + include/TwoPole.h + include/TwoZero.h + include/UdpSocket.h + include/Vector3D.h + include/Voicer.h + include/VoicForm.h + include/Whistle.h + include/Wurley.h + include/WvIn.h + include/WvOut.h +) + +add_library(libstk ${LIBSTK_SOURCES}) +target_include_directories(libstk PRIVATE include PUBLIC $) +set_target_properties(libstk PROPERTIES PUBLIC_HEADER "${LIBSTK_HEADERS}") +target_compile_definitions(libstk PRIVATE __LITTLE_ENDIAN__) + +install(TARGETS libstk EXPORT unofficial-libstk-config + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin + PUBLIC_HEADER DESTINATION include/stk) +install(EXPORT unofficial-libstk-config NAMESPACE unofficial::libstk:: DESTINATION share/unofficial-libstk) diff --git a/vcpkg/ports/libstk/CONTROL b/vcpkg/ports/libstk/CONTROL new file mode 100644 index 0000000..1de9780 --- /dev/null +++ b/vcpkg/ports/libstk/CONTROL @@ -0,0 +1,3 @@ +Source: libstk +Version: 4.6.1 +Description: The Synthesis ToolKit in C++ (STK) is a set of open source audio signal processing and algorithmic synthesis classes written in the C++ programming language. diff --git a/vcpkg/ports/libstk/portfile.cmake b/vcpkg/ports/libstk/portfile.cmake new file mode 100644 index 0000000..84b9297 --- /dev/null +++ b/vcpkg/ports/libstk/portfile.cmake @@ -0,0 +1,36 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO thestk/stk + REF 4.6.1 + SHA512 61d4db7b4a45446e231dedc13e139cb488e2ce805278f0b20aa95e69ddb1fa9be549ab5f1fe24c69aa865ebc2940d5fba6e3819a1a7fb1d68e236131fcfb4cac + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-libstk TARGET_PATH share/unofficial-libstk) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libstk RENAME copyright) + +file(GLOB RAWFILES ${SOURCE_PATH}/rawwaves/*.raw) +file(COPY ${RAWFILES} DESTINATION ${CURRENT_PACKAGES_DIR}/share/libstk/rawwaves) + +# Post-build test for cmake libraries +# vcpkg_test_cmake(PACKAGE_NAME libstk) diff --git a/vcpkg/ports/libsvm/CMakeLists.txt b/vcpkg/ports/libsvm/CMakeLists.txt new file mode 100644 index 0000000..560b053 --- /dev/null +++ b/vcpkg/ports/libsvm/CMakeLists.txt @@ -0,0 +1,62 @@ +cmake_minimum_required(VERSION 3.14) + +project(libsvm LANGUAGES C CXX) + +include(GNUInstallDirs) + +option(SVM_BUILD_TOOLS "Build SVM tools" OFF) + +set(libsvm_sources svm.cpp) +if (WIN32) + list(APPEND libsvm_sources svm.def) +endif () + +add_library(libsvm ${libsvm_sources}) + +target_compile_definitions( + libsvm + PRIVATE + $<$: + _CRT_SECURE_NO_WARNINGS + strdup=_strdup + > +) + +target_include_directories( + libsvm + PUBLIC + $ + $ +) + +set_target_properties(libsvm PROPERTIES PUBLIC_HEADER svm.h) + +install(TARGETS libsvm EXPORT unofficial-libsvm-config) + +install( + EXPORT unofficial-libsvm-config + NAMESPACE unofficial::libsvm:: + DESTINATION share/unofficial-libsvm + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) + +if (SVM_BUILD_TOOLS) + add_executable(svm-predict svm-predict.c) + target_link_libraries(svm-predict PRIVATE libsvm) + + add_executable(svm-scale svm-scale.c) + target_link_libraries(svm-scale PRIVATE libsvm) + + add_executable(svm-train svm-train.c) + target_link_libraries(svm-train PRIVATE libsvm) + + install(TARGETS svm-predict svm-scale svm-train) + + if (WIN32) + add_executable(svm-toy svm-toy/windows/svm-toy.cpp) + target_link_libraries(svm-toy PRIVATE libsvm) + set_target_properties(svm-toy PROPERTIES WIN32_EXECUTABLE ON) + + install(TARGETS svm-toy) + endif () +endif () diff --git a/vcpkg/ports/libsvm/CONTROL b/vcpkg/ports/libsvm/CONTROL new file mode 100644 index 0000000..4a9af60 --- /dev/null +++ b/vcpkg/ports/libsvm/CONTROL @@ -0,0 +1,7 @@ +Source: libsvm +Version: 323-1 +Description: A library for Support Vector Machines +Homepage: https://www.csie.ntu.edu.tw/~cjlin/libsvm/ + +Feature: tools +Description: Build libsvm tools diff --git a/vcpkg/ports/libsvm/portfile.cmake b/vcpkg/ports/libsvm/portfile.cmake new file mode 100644 index 0000000..e473fd3 --- /dev/null +++ b/vcpkg/ports/libsvm/portfile.cmake @@ -0,0 +1,43 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cjlin1/libsvm + REF v323 + SHA512 c4abd408acf860c76cfc743e6c65d241fcb18443e741fc0f557f7cf7b4d0913c05f3afc5d49de8a42ff88db6fc7b046d08bcb0a3d2a24ba23e297ed1cfbb9131 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tools SVM_BUILD_TOOLS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DSVM_BUILD_TOOLS=OFF + OPTIONS_RELEASE + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) + +if ("tools" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES svm-predict svm-scale svm-toy svm-train AUTO_CLEAN) +endif () + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/COPYRIGHT ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME unofficial-${PORT}) diff --git a/vcpkg/ports/libtheora/0001-fix-uwp.patch b/vcpkg/ports/libtheora/0001-fix-uwp.patch new file mode 100644 index 0000000..b6dc877 --- /dev/null +++ b/vcpkg/ports/libtheora/0001-fix-uwp.patch @@ -0,0 +1,53 @@ +From 47eb8d07a8caaa6cc1e6e906a7cd5b44ee0fb624 Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka +Date: Thu, 27 Jul 2017 04:24:36 +0300 +Subject: [PATCH] remove redundant assignments + +--- + lib/tokenize.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/lib/tokenize.c b/lib/tokenize.c +index 57b7aa8..3f53fb5 100644 +--- a/lib/tokenize.c ++++ b/lib/tokenize.c +@@ -487,11 +487,11 @@ int oc_enc_tokenize_ac(oc_enc_ctx *_enc,int _pli,ptrdiff_t _fragi, + zzj=64; + for(zzi=OC_MINI(_zzi,63);zzi>0;zzi--){ + ogg_uint32_t best_cost; +- int best_bits=best_bits; +- int best_next=best_next; +- int best_token=best_token; +- int best_eb=best_eb; +- int best_qc=best_qc; ++ int best_bits; ++ int best_next; ++ int best_token; ++ int best_eb; ++ int best_qc; + ogg_uint32_t d2; + int dq; + int qc_m; +@@ -1091,8 +1091,8 @@ void oc_enc_tokenize_dc_frag_list(oc_enc_ctx *_enc,int _pli, + int neobs1; + int token; + int eb; +- int token1=token1; +- int eb1=eb1; ++ int token1; ++ int eb1; + /*Return immediately if there are no coded fragments; otherwise we'd flush + any trailing EOB run into the AC 1 list and never read it back out.*/ + if(_ncoded_fragis<=0)return; +@@ -1328,7 +1328,7 @@ void oc_enc_tokenize_finish(oc_enc_ctx *_enc){ + int new_eb; + int zzj; + int plj; +- ptrdiff_t ti=ti; ++ ptrdiff_t ti; + int run_count; + /*Make sure this coefficient has tokens at all.*/ + if(_enc->ndct_tokens[pli][zzi]<=0)continue; +-- +2.12.2.windows.2 + diff --git a/vcpkg/ports/libtheora/CMakeLists.txt b/vcpkg/ports/libtheora/CMakeLists.txt new file mode 100644 index 0000000..cf8799e --- /dev/null +++ b/vcpkg/ports/libtheora/CMakeLists.txt @@ -0,0 +1,92 @@ +cmake_minimum_required(VERSION 3.0) +project(theora LANGUAGES C) + +set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}") +FIND_PACKAGE(OGG REQUIRED) + +file(GLOB HEADERS + "include/theora/codec.h" + "include/theora/theora.h" + "include/theora/theoradec.h" + "include/theora/theoraenc.h" +) + +include_directories("include") +include_directories(${OGG_INCLUDE_DIR}) + +set(LIBTHEORA_COMMON + "lib/apiwrapper.c" + "lib/bitpack.c" + "lib/dequant.c" + "lib/fragment.c" + "lib/idct.c" + "lib/info.c" + "lib/internal.c" + "lib/state.c" + "lib/quant.c" + + "lib/x86_vc/mmxfrag.c" + "lib/x86_vc/mmxidct.c" + "lib/x86_vc/mmxstate.c" + "lib/x86_vc/x86cpu.c" + "lib/x86_vc/x86state.c" +) + +set(LIBTHEORA_ENC + "lib/analyze.c" + "lib/encapiwrapper.c" + "lib/encfrag.c" + "lib/encinfo.c" + "lib/encode.c" + "lib/enquant.c" + "lib/fdct.c" + "lib/huffenc.c" + "lib/mathops.c" + "lib/mcenc.c" + "lib/rate.c" + "lib/tokenize.c" + + "lib/x86_vc/mmxencfrag.c" + "lib/x86_vc/mmxfdct.c" + "lib/x86_vc/x86enc.c" +) + +set(LIBTHEORA_DEC + "lib/decapiwrapper.c" + "lib/decinfo.c" + "lib/decode.c" + "lib/huffdec.c" +) + +add_definitions(-D_CRT_SECURE_NO_DEPRECATE) +add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) + +option(USE_X86 "Use x86 optimization" OFF) +if(USE_X86) + add_definitions(-DOC_X86_ASM) +endif() + +if (BUILD_SHARED_LIBS) + add_definitions(-DLIBTHEORA_EXPORTS) +endif() + +add_library(theora-common OBJECT ${LIBTHEORA_COMMON} ${HEADERS}) +add_library(theora-enc OBJECT ${LIBTHEORA_ENC} ${HEADERS}) +add_library(theora-dec OBJECT ${LIBTHEORA_DEC} ${HEADERS}) + +add_library(theora $ $ $ "libtheora.def") +target_link_libraries(theora ${OGG_LIBRARY}) + +add_library(theoraenc $ $ "win32/xmingw32/libtheoraenc-all.def") +target_link_libraries(theoraenc ${OGG_LIBRARY}) + +add_library(theoradec $ $ "win32/xmingw32/libtheoradec-all.def") +target_link_libraries(theoradec ${OGG_LIBRARY}) + +install(FILES ${HEADERS} DESTINATION include/theora) + +install(TARGETS theora theoraenc theoradec + RUNTIME DESTINATION bin + LIBRARY DESTINATION bin + ARCHIVE DESTINATION lib +) diff --git a/vcpkg/ports/libtheora/CONTROL b/vcpkg/ports/libtheora/CONTROL new file mode 100644 index 0000000..6485b12 --- /dev/null +++ b/vcpkg/ports/libtheora/CONTROL @@ -0,0 +1,5 @@ +Source: libtheora +Version: 1.2.0alpha1-20170719-1 +Homepage: https://github.com/xiph/theora +Description: Theora is a free and open video compression format from the Xiph.org Foundation. +Build-Depends: libogg diff --git a/vcpkg/ports/libtheora/FindOGG.cmake b/vcpkg/ports/libtheora/FindOGG.cmake new file mode 100644 index 0000000..ba3c8b1 --- /dev/null +++ b/vcpkg/ports/libtheora/FindOGG.cmake @@ -0,0 +1,8 @@ +find_path(OGG_INCLUDE_DIR NAMES ogg/ogg.h) + +find_library(OGG_LIBRARY NAMES ogg libogg) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(OGG DEFAULT_MSG OGG_LIBRARY OGG_INCLUDE_DIR) + +mark_as_advanced(OGG_INCLUDE_DIR OGG_LIBRARY) diff --git a/vcpkg/ports/libtheora/libtheora.def b/vcpkg/ports/libtheora/libtheora.def new file mode 100644 index 0000000..9755b81 --- /dev/null +++ b/vcpkg/ports/libtheora/libtheora.def @@ -0,0 +1,61 @@ +EXPORTS +; Old alpha API + theora_version_string + theora_version_number + theora_decode_header + theora_decode_init + theora_decode_packetin + theora_decode_YUVout + theora_control + theora_packet_isheader + theora_packet_iskeyframe + theora_granule_shift + theora_granule_frame + theora_granule_time + theora_info_init + theora_info_clear + theora_clear + theora_comment_init + theora_comment_add + theora_comment_add_tag + theora_comment_query + theora_comment_query_count + theora_comment_clear +; New theora-exp API + th_version_string + th_version_number + th_decode_headerin + th_decode_alloc + th_setup_free + th_decode_ctl + th_decode_packetin + th_decode_ycbcr_out + th_decode_free + th_packet_isheader + th_packet_iskeyframe + th_granule_frame + th_granule_time + th_info_init + th_info_clear + th_comment_init + th_comment_add + th_comment_add_tag + th_comment_query + th_comment_query_count + th_comment_clear +; Old alpha API + theora_encode_init + theora_encode_YUVin + theora_encode_packetout + theora_encode_header + theora_encode_comment + theora_encode_tables +; New theora-exp API + th_encode_alloc + th_encode_ctl + th_encode_flushheader + th_encode_ycbcr_in + th_encode_packetout + th_encode_free + TH_VP31_QUANT_INFO + TH_VP31_HUFF_CODES diff --git a/vcpkg/ports/libtheora/portfile.cmake b/vcpkg/ports/libtheora/portfile.cmake new file mode 100644 index 0000000..7d90805 --- /dev/null +++ b/vcpkg/ports/libtheora/portfile.cmake @@ -0,0 +1,36 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiph/theora + REF fa5707d68c2a4338d58aa8b6afc95539ba89fecb + SHA512 e33da23a17e93709dfe4421b512cedbd9aab0d706f5650e0436f9c8e1cde76b902c3338d46750bb86d83e1bceb111ee84e90df36fb59b5c2e7f7aee1610752b2 + HEAD_REF master + PATCHES + 0001-fix-uwp.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/libtheora.def DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindOGG.cmake DESTINATION ${SOURCE_PATH}) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(THEORA_X86_OPT ON) +else() + set(THEORA_X86_OPT OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DUSE_X86=${THEORA_X86_OPT} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libtheora) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libtheora/LICENSE ${CURRENT_PACKAGES_DIR}/share/libtheora/copyright) diff --git a/vcpkg/ports/libtins/CONTROL b/vcpkg/ports/libtins/CONTROL new file mode 100644 index 0000000..7c68a64 --- /dev/null +++ b/vcpkg/ports/libtins/CONTROL @@ -0,0 +1,4 @@ +Source: libtins +Version: 4.3 +Description: High-level, multiplatform C++ network packet sniffing and crafting library +Build-Depends: winpcap (windows), boost-icl, boost-any diff --git a/vcpkg/ports/libtins/portfile.cmake b/vcpkg/ports/libtins/portfile.cmake new file mode 100644 index 0000000..82ce841 --- /dev/null +++ b/vcpkg/ports/libtins/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mfontanini/libtins + REF v4.3 + SHA512 29d606004fe9a440c9a53eede42fd5c6dbd049677d2cca2c5cfd26311ee2ca4c64ca3e665fbc81efd5bfab5577a5181ed0754c617e139317d9ae0cabba05aff7 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LIBTINS_BUILD_SHARED) + +set(ENABLE_PCAP FALSE) +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(ENABLE_PCAP TRUE) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DLIBTINS_BUILD_SHARED=${LIBTINS_BUILD_SHARED} + -DLIBTINS_ENABLE_PCAP=${ENABLE_PCAP} + -DLIBTINS_ENABLE_CXX11=1 +) + +vcpkg_install_cmake() + +if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "windows" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") #Windows + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +else() #Linux/Unix/Darwin + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libtins) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libtins RENAME copyright) + +# Post-build test for cmake libraries +vcpkg_test_cmake(PACKAGE_NAME libtins) diff --git a/vcpkg/ports/libtomcrypt/CONTROL b/vcpkg/ports/libtomcrypt/CONTROL new file mode 100644 index 0000000..c5f79aa --- /dev/null +++ b/vcpkg/ports/libtomcrypt/CONTROL @@ -0,0 +1,5 @@ +Source: libtomcrypt +Version: 1.18.2-1 +Description: LibTomCrypt is a fairly comprehensive, modular and portable cryptographic toolkit that provides developers with a vast array of well known published block ciphers, one-way hash functions, chaining modes, pseudo-random number generators, public key cryptography and a plethora of other routines. +Homepage: https://www.libtom.net/LibTomCrypt/ +Build-Depends: libtommath \ No newline at end of file diff --git a/vcpkg/ports/libtomcrypt/portfile.cmake b/vcpkg/ports/libtomcrypt/portfile.cmake new file mode 100644 index 0000000..e547d83 --- /dev/null +++ b/vcpkg/ports/libtomcrypt/portfile.cmake @@ -0,0 +1,95 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libtom/libtomcrypt + REF v1.18.2 + SHA512 53accb4f92077ff1c52102bece270e77c497e599c392aa0bf4dbc173b6789e7e4f1012d8b5f257c438764197cb7bac8ba409a9d4e3a70e69bec5863b9495329e + HEAD_REF develop +) + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + + if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + set(CRTFLAG "/MD") + else() + set(CRTFLAG "/MT") + endif() + + # Make sure we start from a clean slate + vcpkg_execute_build_process( + COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc clean + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME clean-${TARGET_TRIPLET}-dbg + ) + + #Debug Build + vcpkg_execute_build_process( + COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc "CFLAGS=${CRTFLAG}d /DUSE_LTM /DLTM_DESC \"/I${CURRENT_INSTALLED_DIR}/include\"" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + + file(INSTALL + ${SOURCE_PATH}/tomcrypt.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + + # Clean up necessary to rebuild without debug symbols + vcpkg_execute_build_process( + COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc clean + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME clean-${TARGET_TRIPLET}-rel + ) + + #Release Build + vcpkg_execute_build_process( + COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc "CFLAGS=${CRTFLAG} /Ox /DNDEBUG /DUSE_LTM /DLTM_DESC \"/I${CURRENT_INSTALLED_DIR}/include\"" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-rel + ) + + file(INSTALL + ${SOURCE_PATH}/tomcrypt.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) + + file(INSTALL + ${SOURCE_PATH}/src/headers/ + DESTINATION ${CURRENT_PACKAGES_DIR}/include + ) +else() + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(MAKE_FILE "makefile.shared") + else() + set(MAKE_FILE "makefile") + endif() + + set(ENV{CFLAGS} "-fPIC -DUSE_LTM -DLTM_DESC -I${CURRENT_INSTALLED_DIR}/include") + + vcpkg_execute_build_process( + COMMAND make -f ${MAKE_FILE} clean + WORKING_DIRECTORY ${SOURCE_PATH} + ) + vcpkg_execute_build_process( + COMMAND make -j${VCPKG_CONCURRENCY} -f ${MAKE_FILE} PREFIX=${CURRENT_PACKAGES_DIR}/debug LTC_DEBUG=1 install + WORKING_DIRECTORY ${SOURCE_PATH} + ) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + + vcpkg_execute_build_process( + COMMAND make -f ${MAKE_FILE} clean + WORKING_DIRECTORY ${SOURCE_PATH} + ) + vcpkg_execute_build_process( + COMMAND make -j${VCPKG_CONCURRENCY} -f ${MAKE_FILE} PREFIX=${CURRENT_PACKAGES_DIR} install + WORKING_DIRECTORY ${SOURCE_PATH} + ) + +endif() + +#Copy license +file( + INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright +) \ No newline at end of file diff --git a/vcpkg/ports/libtommath/CONTROL b/vcpkg/ports/libtommath/CONTROL new file mode 100644 index 0000000..dd6359b --- /dev/null +++ b/vcpkg/ports/libtommath/CONTROL @@ -0,0 +1,4 @@ +Source: libtommath +Version: 1.2.0-1 +Description: LibTomMath is a free open source portable number theoretic multiple-precision integer library written entirely in C. +Homepage: https://www.libtom.net/LibTomMath/ diff --git a/vcpkg/ports/libtommath/portfile.cmake b/vcpkg/ports/libtommath/portfile.cmake new file mode 100644 index 0000000..746ead4 --- /dev/null +++ b/vcpkg/ports/libtommath/portfile.cmake @@ -0,0 +1,91 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libtom/libtommath + REF v1.2.0 + SHA512 500bce4467d6cdb0b014e6c66d3b994a8d63b51475db6c3cd77c15c8368fbab4e3b5c458fcd5b35838b74c457a33c15b42d2356964f5ef2a0bd31fd544735c9a + HEAD_REF develop +) + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + + if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + set(CRTFLAG "/MD") + else() + set(CRTFLAG "/MT") + endif() + + # Make sure we start from a clean slate + vcpkg_execute_build_process( + COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc clean + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME clean-${TARGET_TRIPLET}-dbg + ) + + #Debug Build + vcpkg_execute_build_process( + COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc CFLAGS="${CRTFLAG}d" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + + file(INSTALL + ${SOURCE_PATH}/tommath.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + + # Clean up necessary to rebuild without debug symbols + vcpkg_execute_build_process( + COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc clean + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME clean-${TARGET_TRIPLET}-rel + ) + + vcpkg_execute_build_process( + COMMAND nmake -f ${SOURCE_PATH}/makefile.msvc CFLAGS="${CRTFLAG}" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-rel + ) + + file(INSTALL + ${SOURCE_PATH}/tommath.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) + + file(INSTALL + ${SOURCE_PATH}/tommath.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include + ) +else() + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(MAKE_FILE "makefile.shared") + else() + set(MAKE_FILE "makefile") + endif() + + vcpkg_execute_build_process( + COMMAND make -f ${MAKE_FILE} clean + WORKING_DIRECTORY ${SOURCE_PATH} + ) + + vcpkg_execute_build_process( + COMMAND make -j${VCPKG_CONCURRENCY} -f ${MAKE_FILE} PREFIX=${CURRENT_PACKAGES_DIR}/debug COMPILE_DEBUG=1 install + WORKING_DIRECTORY ${SOURCE_PATH} + ) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + + vcpkg_execute_build_process( + COMMAND make -f ${MAKE_FILE} clean + WORKING_DIRECTORY ${SOURCE_PATH} + ) + + vcpkg_execute_build_process( + COMMAND make -j${VCPKG_CONCURRENCY} -f ${MAKE_FILE} PREFIX=${CURRENT_PACKAGES_DIR} install + WORKING_DIRECTORY ${SOURCE_PATH} + ) +endif() + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright +) \ No newline at end of file diff --git a/vcpkg/ports/libtorrent/CONTROL b/vcpkg/ports/libtorrent/CONTROL new file mode 100644 index 0000000..47ef418 --- /dev/null +++ b/vcpkg/ports/libtorrent/CONTROL @@ -0,0 +1,28 @@ +Source: libtorrent +Version: 1.2.10 +Port-Version: 1 +Homepage: https://github.com/arvidn/libtorrent +Description: An efficient feature complete C++ BitTorrent implementation +Build-Depends: openssl, boost-system, boost-date-time, boost-chrono, boost-random, boost-asio, boost-crc, boost-config, boost-iterator, boost-scope-exit, boost-multiprecision, boost-pool, boost-variant +Supports: !uwp&!(windows&arm) + +Feature: deprfun +Description: build with deprecated functions enabled + +Feature: examples +Description: build the examples in the examples directory + +Feature: iconv +Build-Depends: libiconv (windows) +Description: build with libiconv on Windows + +Feature: python +Build-Depends: boost-python, libtorrent[deprfun] +Description: build the python bindings in bindings/python directory + +Feature: test +Build-Depends: libtorrent[deprfun] +Description: build the libtorrent tests + +Feature: tools +Description: build the tools in the tools directory diff --git a/vcpkg/ports/libtorrent/add-datetime-to-boost-libs.patch b/vcpkg/ports/libtorrent/add-datetime-to-boost-libs.patch new file mode 100644 index 0000000..e9eeae9 --- /dev/null +++ b/vcpkg/ports/libtorrent/add-datetime-to-boost-libs.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9efd451fb..7ff587631 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -719,9 +719,9 @@ else() + endif() + + # Boost +-find_public_dependency(Boost REQUIRED COMPONENTS system) ++find_public_dependency(Boost REQUIRED COMPONENTS system date_time) + target_include_directories(torrent-rasterbar PUBLIC ${Boost_INCLUDE_DIRS}) +-target_link_libraries(torrent-rasterbar PUBLIC ${Boost_SYSTEM_LIBRARY}) ++target_link_libraries(torrent-rasterbar PUBLIC ${Boost_LIBRARIES}) + + if (exceptions) + if (MSVC) diff --git a/vcpkg/ports/libtorrent/fix_find_iconv.patch b/vcpkg/ports/libtorrent/fix_find_iconv.patch new file mode 100644 index 0000000..2c22c15 --- /dev/null +++ b/vcpkg/ports/libtorrent/fix_find_iconv.patch @@ -0,0 +1,35 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9efd451fb..d85b31fd4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -643,24 +643,19 @@ target_optional_compile_definitions(torrent-rasterbar PUBLIC FEATURE NAME mutabl + target_optional_compile_definitions(torrent-rasterbar PUBLIC FEATURE NAME streaming DEFAULT ON + DESCRIPTION "Enables support for piece deadline" DISABLED TORRENT_DISABLE_STREAMING) + +-find_public_dependency(Iconv) +-if(MSVC) +- set(iconv_package_type OPTIONAL) +-else() +- set(iconv_package_type RECOMMENDED) +-endif() ++find_public_dependency(unofficial-iconv REQUIRED) + +-set_package_properties(Iconv ++set_package_properties(unofficial-iconv + PROPERTIES + URL "https://www.gnu.org/software/libiconv/" +- DESCRIPTION "GNU encoding conversion library" +- TYPE ${iconv_package_type} ++ DESCRIPTION "GNU encoding conversion library (unofficial vcpkg CMake port)" ++ TYPE REQUIRED + PURPOSE "Convert strings between various encodings" + ) + +-if(Iconv_FOUND) ++if(unofficial-iconv_FOUND) + target_compile_definitions(torrent-rasterbar PUBLIC TORRENT_USE_ICONV) +- target_link_libraries(torrent-rasterbar PRIVATE Iconv::Iconv) ++ target_link_libraries(torrent-rasterbar PRIVATE unofficial::iconv::libiconv unofficial::iconv::libcharset) + endif() + + find_public_dependency(OpenSSL) diff --git a/vcpkg/ports/libtorrent/fix_python_cmake.patch b/vcpkg/ports/libtorrent/fix_python_cmake.patch new file mode 100644 index 0000000..f114b86 --- /dev/null +++ b/vcpkg/ports/libtorrent/fix_python_cmake.patch @@ -0,0 +1,130 @@ +diff --git a/bindings/python/CMakeLists.txt b/bindings/python/CMakeLists.txt +index 53e09439f..de027f965 100644 +--- a/bindings/python/CMakeLists.txt ++++ b/bindings/python/CMakeLists.txt +@@ -1,7 +1,6 @@ + # To build python bindings we need a python executable and boost python module. Unfortunately, + # their names might not be interlinked and we can not implement a general solution. +-# The code below assumes default boost installation, when the module for python 2 is named +-# 'python' and the module for python 3 is named 'python3'. ++# The code below assumes default boost installation, when the module for python 3 is named 'python3'. + # To customize that one can provide a name for the Boost::python module via + # 'boost-python-module-name' variable when invoking cmake. + # E.g. on Gentoo with python 3.6 and Boost::python library name 'libboost_python-3.6.so' +@@ -15,12 +14,9 @@ + # Sets _ret to a list of python versions (major.minor) that use the same MSVC runtime as this build does + # assumes MSVC was detected already + # See https://en.wikipedia.org/wiki/Microsoft_Visual_C++#Internal_version_numbering ++# See https://devguide.python.org/#status-of-python-branches for supported python versions + function(_get_compatible_python_versions _ret) +- if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16) +- list(APPEND _tmp 2.6 2.7 3.0 3.1 3.2) +- elseif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 16 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17) +- list(APPEND _tmp 3.3 3.4) +- elseif(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 20) ++ if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 20) + list(APPEND _tmp 3.5 3.6 3.7 3.8) + endif() + set(${_ret} ${_tmp} PARENT_SCOPE) +@@ -31,23 +27,22 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC" AND NOT skip-python-runtime-test) + _get_compatible_python_versions(Python_ADDITIONAL_VERSIONS) + endif() + +-find_package(PythonInterp REQUIRED) ++find_package(Python3 COMPONENTS Interpreter Development REQUIRED) + if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC" AND NOT skip-python-runtime-test) +- message(STATUS "Testing found python version. Requested: ${Python_ADDITIONAL_VERSIONS}, found: ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}") +- if (NOT "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}" IN_LIST Python_ADDITIONAL_VERSIONS) +- message(FATAL_ERROR "Incompatible Python and C runtime: MSVC ${CMAKE_CXX_COMPILER_VERSION} and Python ${PYTHON_VERSION_STRING}") ++ message(STATUS "Testing found python version. Requested: ${Python_ADDITIONAL_VERSIONS}, found: ${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}") ++ if (NOT "${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}" IN_LIST Python_ADDITIONAL_VERSIONS) ++ message(FATAL_ERROR "Incompatible Python and C runtime: MSVC ${CMAKE_CXX_COMPILER_VERSION} and Python ${Python3_VERSION}") + endif() + endif() + +-set(Python_ADDITIONAL_VERSIONS "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}") +-find_package(PythonLibs REQUIRED) ++set(Python_ADDITIONAL_VERSIONS "${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}") + + if (NOT boost-python-module-name) + # use active python + # if (PYTHON_VERSION_STRING VERSION_GREATER_EQUAL "3") + # set(_boost-python-module-name "python${PYTHON_VERSION_MAJOR}") + # else() +- set(_boost-python-module-name "python") # to overwrite possible value from a previous run ++ set(_boost-python-module-name "python${Python3_VERSION_MAJOR}") # to overwrite possible value from a previous run + # endif() + endif() + +@@ -55,7 +50,7 @@ set(boost-python-module-name ${_boost-python-module-name} CACHE STRING "Boost:py + + find_package(Boost REQUIRED COMPONENTS ${boost-python-module-name}) + +-python_add_module(python-libtorrent ++Python3_add_library(python-libtorrent STATIC + src/module.cpp + src/sha1_hash.cpp + src/converters.cpp +@@ -80,12 +75,12 @@ python_add_module(python-libtorrent + + set_target_properties(python-libtorrent + PROPERTIES +- OUTPUT_NAME libtorrent ++ OUTPUT_NAME torrent + ) + + target_include_directories(python-libtorrent + PRIVATE +- ${PYTHON_INCLUDE_DIRS} ++ ${Python3_INCLUDE_DIRS} + ) + + string(TOUPPER "${boost-python-module-name}" boost_python_module_name_uppercase) +@@ -96,7 +91,7 @@ target_link_libraries(python-libtorrent + # Boost::python adds that but without a path to the library. Therefore we have to either + # provide the path (but, unfortunately, FindPythonLibs.cmake does not return the library dir), + # or give the full file name here (this FindPythonLibs.cmake provides to us). +- ${PYTHON_LIBRARIES} ++ ${Python3_LIBRARIES} + ) + + # Bindings module uses deprecated libtorrent features, thus we disable these warnings +@@ -108,7 +103,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") + endif() + + execute_process(COMMAND +- ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig; ++ ${Python3_EXECUTABLE} -c "import distutils.sysconfig; + print(';'.join(map(str, [ + distutils.sysconfig.get_python_lib(plat_specific=True, prefix=''), + distutils.sysconfig.get_config_var('EXT_SUFFIX') +@@ -119,13 +114,11 @@ list(GET _python_sysconfig_vars 0 PYTHON_SITE_PACKAGES) + list(GET _python_sysconfig_vars 1 PYTHON_EXT_SUFFIX) + + message(STATUS "Python site packages: ${PYTHON_SITE_PACKAGES}") +-# python 2 does not provide the 'EXT_SUFFIX' sysconfig variable, so we use cmake default then +-if (NOT "${PYTHON_EXT_SUFFIX}" STREQUAL "None") +- message(STATUS "Python extension suffix: ${PYTHON_EXT_SUFFIX}") +- # we mimic the name, created by setuptools +- # example: libtorrent.cpython-36m-x86_64-linux-gnu.so +- set_target_properties(python-libtorrent PROPERTIES SUFFIX ${PYTHON_EXT_SUFFIX}) +-endif() ++ ++message(STATUS "Python extension suffix: ${PYTHON_EXT_SUFFIX}") ++# we mimic the name, created by setuptools ++# example: libtorrent.cpython-36m-x86_64-linux-gnu.so ++set_target_properties(python-libtorrent PROPERTIES SUFFIX ${PYTHON_EXT_SUFFIX}) + + set(SETUP_PY_IN "${CMAKE_CURRENT_SOURCE_DIR}/setup.py.cmake.in") + set(SETUP_PY "${CMAKE_CURRENT_BINARY_DIR}/setup.py") +@@ -135,8 +128,8 @@ set(DEPS python-libtorrent "${SETUP_PY}") + configure_file(${SETUP_PY_IN} ${SETUP_PY} @ONLY) + + add_custom_command(OUTPUT ${OUTPUT} +- COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY} build -b "${CMAKE_CURRENT_SOURCE_DIR}" +- COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY} egg_info -b "${CMAKE_CURRENT_SOURCE_DIR}" ++ COMMAND ${Python3_EXECUTABLE} ${SETUP_PY} build -b "${CMAKE_CURRENT_SOURCE_DIR}" ++ COMMAND ${Python3_EXECUTABLE} ${SETUP_PY} egg_info -b "${CMAKE_CURRENT_SOURCE_DIR}" + COMMAND ${CMAKE_COMMAND} -E touch ${OUTPUT} + DEPENDS ${DEPS}) + diff --git a/vcpkg/ports/libtorrent/no_use_iconv.patch b/vcpkg/ports/libtorrent/no_use_iconv.patch new file mode 100644 index 0000000..3f27529 --- /dev/null +++ b/vcpkg/ports/libtorrent/no_use_iconv.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9efd451fb..05066be82 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -643,26 +643,6 @@ target_optional_compile_definitions(torrent-rasterbar PUBLIC FEATURE NAME mutabl + target_optional_compile_definitions(torrent-rasterbar PUBLIC FEATURE NAME streaming DEFAULT ON + DESCRIPTION "Enables support for piece deadline" DISABLED TORRENT_DISABLE_STREAMING) + +-find_public_dependency(Iconv) +-if(MSVC) +- set(iconv_package_type OPTIONAL) +-else() +- set(iconv_package_type RECOMMENDED) +-endif() +- +-set_package_properties(Iconv +- PROPERTIES +- URL "https://www.gnu.org/software/libiconv/" +- DESCRIPTION "GNU encoding conversion library" +- TYPE ${iconv_package_type} +- PURPOSE "Convert strings between various encodings" +-) +- +-if(Iconv_FOUND) +- target_compile_definitions(torrent-rasterbar PUBLIC TORRENT_USE_ICONV) +- target_link_libraries(torrent-rasterbar PRIVATE Iconv::Iconv) +-endif() +- + find_public_dependency(OpenSSL) + set_package_properties(OpenSSL + PROPERTIES diff --git a/vcpkg/ports/libtorrent/portfile.cmake b/vcpkg/ports/libtorrent/portfile.cmake new file mode 100644 index 0000000..54d40d6 --- /dev/null +++ b/vcpkg/ports/libtorrent/portfile.cmake @@ -0,0 +1,69 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +if(VCPKG_TARGET_IS_WINDOWS) + # Building python bindings is currently broken on Windows + if("python" IN_LIST FEATURES) + message(FATAL_ERROR "The python feature is currently broken on Windows") + endif() + + if("iconv" IN_LIST FEATURES) + set(ICONV_PATCH "fix_find_iconv.patch") + else() + # prevent picking up libiconv if it happens to already be installed + set(ICONV_PATCH "no_use_iconv.patch") + endif() + + if(VCPKG_CRT_LINKAGE STREQUAL "static") + set(_static_runtime ON) + endif() +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + deprfun deprecated-functions + examples build_examples + python python-bindings + test build_tests + tools build_tools +) + +# Note: the python feature currently requires `python3-dev` and `python3-setuptools` installed on the system +if("python" IN_LIST FEATURES) + vcpkg_find_acquire_program(PYTHON3) + get_filename_component(PYTHON3_PATH ${PYTHON3} DIRECTORY) + vcpkg_add_to_path(${PYTHON3_PATH}) + + file(GLOB BOOST_PYTHON_LIB "${CURRENT_INSTALLED_DIR}/lib/*boost_python*") + string(REGEX REPLACE ".*(python)([0-9])([0-9]+).*" "\\1\\2\\3" _boost-python-module-name "${BOOST_PYTHON_LIB}") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO arvidn/libtorrent + REF libtorrent-1.2.10 + SHA512 e6de939fb6527783695e0b6623ddbe27f85842a36c0899b93ea0284cb3c6f3d14b8c39e29316adb3bf9acac7804f38385cc06854a32df28e7f4f6839af9f382d + HEAD_REF RC_1_2 + PATCHES + add-datetime-to-boost-libs.patch + fix_python_cmake.patch + ${ICONV_PATCH} +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + ${FEATURE_OPTIONS} + -Dboost-python-module-name=${_boost-python-module-name} + -Dstatic_runtime=${_static_runtime} + -DPython3_USE_STATIC_LIBS=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/LibtorrentRasterbar TARGET_PATH share/LibtorrentRasterbar) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# Do not duplicate include files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/cmake) diff --git a/vcpkg/ports/libu2f-server/CMakeLists.txt b/vcpkg/ports/libu2f-server/CMakeLists.txt new file mode 100644 index 0000000..5e1f50e --- /dev/null +++ b/vcpkg/ports/libu2f-server/CMakeLists.txt @@ -0,0 +1,30 @@ +cmake_minimum_required(VERSION 3.5) + +project(libu2f-server C) + +file(GLOB_RECURSE LIBU2F_SERVER_HEADERS u2f-server/*.h) +file(GLOB_RECURSE LIBU2F_SERVER_SOURCE u2f-server/*.c) + +add_library(libu2f-server ${LIBU2F_SERVER_SOURCE}) + +target_include_directories(libu2f-server PUBLIC $ $) +target_compile_definitions(libu2f-server PRIVATE _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_DEPRECATE) + +find_package(json-c CONFIG REQUIRED) +find_package(OpenSSL REQUIRED) +target_link_libraries(libu2f-server PRIVATE OpenSSL::SSL OpenSSL::Crypto json-c::json-c) + +install(TARGETS libu2f-server + EXPORT libu2f-serverConfig + RUNTIME DESTINATION "bin" + ARCHIVE DESTINATION "lib" + LIBRARY DESTINATION "lib" +) + +INSTALL(FILES ${LIBU2F_SERVER_HEADERS} DESTINATION "include/libu2f-server") + +install(EXPORT libu2f-serverConfig + FILE libu2f-serverConfig.cmake + NAMESPACE libu2f-server:: + DESTINATION "share/libu2f-server" +) \ No newline at end of file diff --git a/vcpkg/ports/libu2f-server/CONTROL b/vcpkg/ports/libu2f-server/CONTROL new file mode 100644 index 0000000..1af6aa8 --- /dev/null +++ b/vcpkg/ports/libu2f-server/CONTROL @@ -0,0 +1,7 @@ +Source: libu2f-server +Version: 1.1.0 +Port-Version: 2 +Build-Depends: openssl, json-c +Homepage: https://developers.yubico.com/libu2f-server/ +Description: Yubico Universal 2nd Factor (U2F) Server C Library +Supports: (x86 | x64) & windows diff --git a/vcpkg/ports/libu2f-server/portfile.cmake b/vcpkg/ports/libu2f-server/portfile.cmake new file mode 100644 index 0000000..e4f7c6d --- /dev/null +++ b/vcpkg/ports/libu2f-server/portfile.cmake @@ -0,0 +1,37 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Yubico/libu2f-server + REF libu2f-server-1.1.0 + SHA512 085f8e7d74c1efb347747b8930386f18ba870f668f82e9bd479c9f8431585c5dc7f95b2f6b82bdd3a6de0c06f8cb2fbf51c363ced54255a936ab96536158ee59 + HEAD_REF master + PATCHES + windows.patch + strndup-fix.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/u2f-server-version.h DESTINATION ${SOURCE_PATH}/u2f-server) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + ) + +vcpkg_install_cmake() + +# The include file must be patched after the build has completed, because the source files use the wrong subdirectory name! +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/libu2f-server/u2f-server.h + "#include " + "#include " +) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_copy_pdbs() + +# Handle copyright +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/libu2f-server/strndup-fix.patch b/vcpkg/ports/libu2f-server/strndup-fix.patch new file mode 100644 index 0000000..f5b7ffd --- /dev/null +++ b/vcpkg/ports/libu2f-server/strndup-fix.patch @@ -0,0 +1,31 @@ +diff --git a/u2f-server/core.c b/u2f-server/core.c +index 294c94b..746932b 100644 +--- a/u2f-server/core.c ++++ b/u2f-server/core.c +@@ -211,7 +211,7 @@ u2fs_rc u2fs_set_keyHandle(u2fs_ctx_t * ctx, const char *keyHandle) + ctx->keyHandle = NULL; + } + +- ctx->keyHandle = strndup(keyHandle, strlen(keyHandle)); ++ ctx->keyHandle = strdup(keyHandle); + + if (ctx->keyHandle == NULL) + return U2FS_MEMORY_ERROR; +@@ -726,7 +726,7 @@ static u2fs_rc decode_clientData(const char *clientData, char **output) + fprintf(stderr, "clientData: %s\n", data); + } + +- *output = strndup(data, strlen(data)); ++ *output = strdup(data); + + free(data); + data = NULL; +@@ -870,7 +870,7 @@ u2fs_rc u2fs_registration_verify(u2fs_ctx_t * ctx, const char *response, + goto failure; + + u2fs_EC_KEY_t *key_ptr; +- (*output)->keyHandle = strndup(buf, strlen(buf)); ++ (*output)->keyHandle = strdup(buf); + + rc = decode_user_key(user_public_key, &key_ptr); + if (rc != U2FS_OK) diff --git a/vcpkg/ports/libu2f-server/u2f-server-version.h b/vcpkg/ports/libu2f-server/u2f-server-version.h new file mode 100644 index 0000000..b38ccac --- /dev/null +++ b/vcpkg/ports/libu2f-server/u2f-server-version.h @@ -0,0 +1,94 @@ +/* +* Copyright (c) 2014 Yubico AB +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are +* met: +* +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* +* * Redistributions in binary form must reproduce the above +* copyright notice, this list of conditions and the following +* disclaimer in the documentation and/or other materials provided +* with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef U2F_SERVER_VERSION_H +#define U2F_SERVER_VERSION_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * U2FS_VERSION_STRING + * + * Pre-processor symbol with a string that describe the header file + * version number. Used together with u2fs_check_version() to verify + * header file and run-time library consistency. + */ +#define U2FS_VERSION_STRING "1.1.0" + +/** + * U2FS_VERSION_NUMBER + * + * Pre-processor symbol with a hexadecimal value describing the header + * file version number. For example, when the header version is 1.2.3 + * this symbol will have the value 0x01020300. The last two digits + * are only used between public releases, and will otherwise be 00. + */ +#define U2FS_VERSION_NUMBER 0x01010000 + +/** + * U2FS_VERSION_MAJOR + * + * Pre-processor symbol with a decimal value that describe the major + * level of the header file version number. For example, when the + * header version is 1.2.3 this symbol will be 1. + */ +#define U2FS_VERSION_MAJOR 1 + +/** + * U2FS_VERSION_MINOR + * + * Pre-processor symbol with a decimal value that describe the minor + * level of the header file version number. For example, when the + * header version is 1.2.3 this symbol will be 2. + */ +#define U2FS_VERSION_MINOR 1 + +/** + * U2FS_VERSION_PATCH + * + * Pre-processor symbol with a decimal value that describe the patch + * level of the header file version number. For example, when the + * header version is 1.2.3 this symbol will be 3. + */ +#define U2FS_VERSION_PATCH 0 + +#ifndef TRUE +#define TRUE 1 +#endif + +#ifndef FALSE +#define FALSE 0 +#endif + +#ifdef __cplusplus +} +#endif +#endif diff --git a/vcpkg/ports/libu2f-server/windows.patch b/vcpkg/ports/libu2f-server/windows.patch new file mode 100644 index 0000000..2cc68ec --- /dev/null +++ b/vcpkg/ports/libu2f-server/windows.patch @@ -0,0 +1,41 @@ +diff --git a/u2f-server/cdecode.c b/u2f-server/cdecode.c +index 6fff114..dc05ca5 100644 +--- a/u2f-server/cdecode.c ++++ b/u2f-server/cdecode.c +@@ -5,7 +5,7 @@ This is part of the libb64 project, and has been placed in the public domain. + For details, see http://sourceforge.net/projects/libb64 + */ + +-#include ++#include "b64/cdecode.h" + + int base64_decode_value(char value_in) + { +diff --git a/u2f-server/cencode.c b/u2f-server/cencode.c +index eebb24a..f3b7fa4 100644 +--- a/u2f-server/cencode.c ++++ b/u2f-server/cencode.c +@@ -5,7 +5,7 @@ This is part of the libb64 project, and has been placed in the public domain. + For details, see http://sourceforge.net/projects/libb64 + */ + +-#include ++#include "b64/cencode.h" + + const int CHARS_PER_LINE = 72; + +diff --git a/u2f-server/core.c b/u2f-server/core.c +index da440ec..294c94b 100644 +--- a/u2f-server/core.c ++++ b/u2f-server/core.c +@@ -30,8 +30,7 @@ + #include "internal.h" + + #include +-#include +-#include ++#include + #include "crypto.h" + #include "b64/cencode.h" + #include "b64/cdecode.h" + \ No newline at end of file diff --git a/vcpkg/ports/libudis86/CMakeLists.txt b/vcpkg/ports/libudis86/CMakeLists.txt new file mode 100644 index 0000000..8f412cf --- /dev/null +++ b/vcpkg/ports/libudis86/CMakeLists.txt @@ -0,0 +1,56 @@ +cmake_minimum_required (VERSION 3.9) + +project (udis86) + + +set( + lib_sources + libudis86/decode.c + libudis86/itab.c + libudis86/syn-att.c + libudis86/syn-intel.c + libudis86/syn.c + libudis86/udis86.c +) + +set(lib_headers + libudis86/decode.h + libudis86/itab.h + libudis86/extern.h + libudis86/syn.h + libudis86/types.h + libudis86/udint.h +) + +set(cli_srcs udcli/udcli.c) + +include_directories(.) + +add_library(libudis86 ${lib_sources}) + +if(BUILD_SHARED_LIBS) + target_compile_definitions(libudis86 PRIVATE -D_USRDLL) +endif() + +add_executable(udcli ${cli_srcs}) +target_link_libraries(udcli libudis86) + + +install( + TARGETS libudis86 + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_TOOLS) + install ( + TARGETS udcli + RUNTIME DESTINATION tools/libudis86 + ) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES ${lib_headers} DESTINATION include/libudis86) + install(FILES udis86.h DESTINATION include) +endif() diff --git a/vcpkg/ports/libudis86/CONTROL b/vcpkg/ports/libudis86/CONTROL new file mode 100644 index 0000000..8e67b89 --- /dev/null +++ b/vcpkg/ports/libudis86/CONTROL @@ -0,0 +1,4 @@ +Source: libudis86 +Version: 2018-01-28-56ff6c87 +Homepage: https://github.com/vmt/udis86 +Description: Disassembler Library for x86 and x86-64 diff --git a/vcpkg/ports/libudis86/portfile.cmake b/vcpkg/ports/libudis86/portfile.cmake new file mode 100644 index 0000000..a4f5aa9 --- /dev/null +++ b/vcpkg/ports/libudis86/portfile.cmake @@ -0,0 +1,33 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO vmt/udis86 + REF 56ff6c87c11de0ffa725b14339004820556e343d + SHA512 7a98333f9310f5f0466294bd980f03f9269c118a7557832015c59a7b6349a0eeab5642e0e6598d0be76d71f5d2d566d8b8af0ec75c26bdcff45646d60ff18e3a + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_find_acquire_program(PYTHON2) + +vcpkg_execute_required_process( + COMMAND ${PYTHON2} ${SOURCE_PATH}/scripts/ud_itab.py ${SOURCE_PATH}/docs/x86/optable.xml ${SOURCE_PATH}/libudis86/ + WORKING_DIRECTORY SOURCE_PATH + LOGNAME python-${TARGET_TRIPLET}-generate-sources +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON + -DDISABLE_INSTALL_TOOLS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/libudis86) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libudis86 RENAME copyright) diff --git a/vcpkg/ports/libudns/CONTROL b/vcpkg/ports/libudns/CONTROL new file mode 100644 index 0000000..d9bb84f --- /dev/null +++ b/vcpkg/ports/libudns/CONTROL @@ -0,0 +1,4 @@ +Source: libudns +Version: 0.4-2 +Homepage: https://github.com/ortclib/udns +Description: The DNS library, udns, implements thread-safe stub DNS resolver functionality, which may be used both traditional, syncronous way and asyncronously, with application-supplied event loop. diff --git a/vcpkg/ports/libudns/ignore_unknown_options.patch b/vcpkg/ports/libudns/ignore_unknown_options.patch new file mode 100644 index 0000000..4adbcf2 --- /dev/null +++ b/vcpkg/ports/libudns/ignore_unknown_options.patch @@ -0,0 +1,26 @@ +diff --git a/configure b/configure +index dda98b3ab..6f5f8a3c8 100644 +--- a/configure ++++ b/configure +@@ -25,10 +25,9 @@ fi + enable() { + opt=`echo "$1" | sed 's/^--[^-]*-//'` + case "$opt" in +- ipv6) ;; +- *) echo "configure: unrecognized option \`$1'" >&2; exit 1;; ++ ipv6) eval enable_$opt=$2 ;; ++ *) echo "configure: unrecognized option \`$1'" >&2;; + esac +- eval enable_$opt=$2 + } + + while [ $# -gt 0 ]; do +@@ -50,7 +49,7 @@ Optional features (all enabled by default if system supports a feature): + EOF + exit 0 + ;; +- *) echo "configure: unknown option \`$1'" >&2; exit 1 ;; ++ *) echo "configure: unknown option \`$1'" >&2;; + esac + shift + done diff --git a/vcpkg/ports/libudns/portfile.cmake b/vcpkg/ports/libudns/portfile.cmake new file mode 100644 index 0000000..826c4c6 --- /dev/null +++ b/vcpkg/ports/libudns/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports Linux platform" ON_TARGET "Windows" "OSX") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ortclib/udns + REF udns_0_4 + SHA512 4df8def718c75872536d42a757237d6c8e0afce8a53aedd7fea73814dc5cf8b5d6c9ae8f01a8cfc76864aa8293c172f08953a6750a66749ba19a3721bb4cf2ec + HEAD_REF master + PATCHES ignore_unknown_options.patch +) + +vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + COPY_SOURCE +) + +vcpkg_build_make() +vcpkg_fixup_pkgconfig() +# Install +if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/libudns.a DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +endif() +if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/libudns.a DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +endif() + +file(INSTALL ${SOURCE_PATH}/udns.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING.LGPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libui/001-fix-cmake.patch b/vcpkg/ports/libui/001-fix-cmake.patch new file mode 100644 index 0000000..3d20658 --- /dev/null +++ b/vcpkg/ports/libui/001-fix-cmake.patch @@ -0,0 +1,46 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c7193fbb..50c997f8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -152,8 +152,7 @@ add_subdirectory("common") + add_subdirectory("${_OSNAME}") + add_library(libui ${_LIBUI_SOURCES}) + target_include_directories(libui +- PUBLIC . +- PRIVATE ${_LIBUI_INCLUEDIRS}) ++ PUBLIC $) + target_compile_definitions(libui + PRIVATE ${_LIBUI_DEFS}) + # cmake produces this for us by default but only for shared libraries +@@ -229,10 +228,30 @@ macro(_add_exec _name) + # TODOfor some reason these don't propagate + if(NOT WIN32) + target_include_directories(${_name} +- PUBLIC .) ++ PUBLIC $) + target_compile_options(${_name} + PUBLIC ${_COMMON_CFLAGS}) + endif() + endmacro() + add_subdirectory("test") + add_subdirectory("examples") ++ ++if(BUILD_SHARED_LIBS) ++ install(TARGETS ${PROJECT_NAME} ++ EXPORT ${PROJECT_NAME}-config ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++else() ++ install(TARGETS ${PROJECT_NAME} ++ EXPORT ${PROJECT_NAME}-config ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++endif() ++ ++install(EXPORT ${PROJECT_NAME}-config ++ FILE unofficial-${PROJECT_NAME}-config.cmake ++ NAMESPACE unofficial::libui:: ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ++) ++ ++install(FILES ui.h DESTINATION include) diff --git a/vcpkg/ports/libui/002-fix-macosx-build.patch b/vcpkg/ports/libui/002-fix-macosx-build.patch new file mode 100644 index 0000000..a5b91c7 --- /dev/null +++ b/vcpkg/ports/libui/002-fix-macosx-build.patch @@ -0,0 +1,19 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 50c997f..a23b84d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -16,7 +16,13 @@ cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) + # TODO figure out what other variables must be set with CACHE + # TODO figure out if FORCE is needed here + # TODO figure out whether STRING "" is best or if something else is better; also what FORCE does because I forget and later I say it's needed +-set(CMAKE_OSX_DEPLOYMENT_TARGET "10.8" CACHE STRING "" FORCE) ++ ++# VCPKG PATCH NOTE: Fix build on MacOS ++# Due to a bug in CMake (https://gitlab.kitware.com/cmake/cmake/issues/18396) we change CMAKE_OSX_DEPLOYMENT_TARGET to "10.9". ++# See the discussion here: ++# * https://github.com/andlabs/libui/issues/422 ++# * https://github.com/andlabs/libui/issues/457 ++set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "" FORCE) + + # we want to disable incremental linking + # see also: diff --git a/vcpkg/ports/libui/CONTROL b/vcpkg/ports/libui/CONTROL new file mode 100644 index 0000000..919f7a1 --- /dev/null +++ b/vcpkg/ports/libui/CONTROL @@ -0,0 +1,3 @@ +Source: libui +Version: 2018-11-03-1 +Description: Simple and portable (but not inflexible) native GUI library in C. diff --git a/vcpkg/ports/libui/portfile.cmake b/vcpkg/ports/libui/portfile.cmake new file mode 100644 index 0000000..77c2d44 --- /dev/null +++ b/vcpkg/ports/libui/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO andlabs/libui + REF 7138276ccfbde94873cb6e2db65642adcbd2ee19 + SHA512 3a9fb27d0c376479f58ba2fc5be3579efa5f462776a7e725313b92413ce78f3ca60897e63b580c419eeaee2cd2101de2be1ee5af80a547ef433c6284a3053d45 + HEAD_REF master + PATCHES + "001-fix-cmake.patch" + "002-fix-macosx-build.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libui TARGET_PATH share/unofficial-libui) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/libui/copyright COPYONLY) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/libunibreak/CMakeLists.txt b/vcpkg/ports/libunibreak/CMakeLists.txt new file mode 100644 index 0000000..7bbff8f --- /dev/null +++ b/vcpkg/ports/libunibreak/CMakeLists.txt @@ -0,0 +1,38 @@ +cmake_minimum_required(VERSION 3.8.0) + +project(libunibreak) + +set(libunibreak_srcs + src/linebreakdata.c + src/linebreakdef.c + src/linebreak.c + src/wordbreak.c + src/graphemebreak.c + src/unibreakbase.c + src/unibreakdef.c +) + + +include_directories(src) + +add_library(libunibreak ${libunibreak_srcs}) + +install( + TARGETS libunibreak + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install( + FILES + src/linebreak.h + src/linebreakdef.h + src/wordbreak.h + src/wordbreakdef.h + src/unibreakbase.h + src/unibreakdef.h + DESTINATION include + ) +endif() diff --git a/vcpkg/ports/libunibreak/CONTROL b/vcpkg/ports/libunibreak/CONTROL new file mode 100644 index 0000000..8d2869d --- /dev/null +++ b/vcpkg/ports/libunibreak/CONTROL @@ -0,0 +1,4 @@ +Source: libunibreak +Version: 4.2-1-0 +Homepage: https://github.com/adah1972/libunibreak +Description: an implementation of the line breaking and word breaking algorithms as described in [Unicode Standard Annex 14] 1 and [Unicode Standard Annex 29] 2. Check the project's [home page] 3 for up-to-date information. diff --git a/vcpkg/ports/libunibreak/portfile.cmake b/vcpkg/ports/libunibreak/portfile.cmake new file mode 100644 index 0000000..4d533b1 --- /dev/null +++ b/vcpkg/ports/libunibreak/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO adah1972/libunibreak + REF a411e4d291741623962a11595dae880422a20ef5 # libunibreak_4_2-1 + SHA512 b4935989990ea1a1a881836696d943c658cf41dd43404e07863c4091a54aa35242e38a359f78899b9975fe2c97e866166da3d0fc3912b9df327deb8a315a590f + 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}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libunibreak RENAME copyright) diff --git a/vcpkg/ports/libusb-win32/CMakeLists.txt b/vcpkg/ports/libusb-win32/CMakeLists.txt new file mode 100644 index 0000000..57004fa --- /dev/null +++ b/vcpkg/ports/libusb-win32/CMakeLists.txt @@ -0,0 +1,27 @@ +cmake_minimum_required(VERSION 3.0) +project(libusb-win32) + +set(lib_headers src/lusb0_usb.h) + +set(lib_srcs src/descriptors.c + src/error.c + src/install.c + src/registry.c + src/usb.c + src/windows.c + libusb0.def) + +add_library(libusb0 ${lib_srcs}) +target_include_directories(libusb0 PRIVATE "src/driver") +target_link_libraries(libusb0 Setupapi) +target_compile_definitions(libusb0 PRIVATE "-D_CRT_SECURE_NO_WARNINGS") + +install( + TARGETS libusb0 + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +install( + FILES ${lib_headers} + DESTINATION include) \ No newline at end of file diff --git a/vcpkg/ports/libusb-win32/CONTROL b/vcpkg/ports/libusb-win32/CONTROL new file mode 100644 index 0000000..24dd02c --- /dev/null +++ b/vcpkg/ports/libusb-win32/CONTROL @@ -0,0 +1,5 @@ +Source: libusb-win32 +Version: 1.2.6.0-6 +Homepage: https://sourceforge.net/projects/libusb-win32 +Description: Allows user space applications to access many USB device on Windows. +Supports: windows \ No newline at end of file diff --git a/vcpkg/ports/libusb-win32/portfile.cmake b/vcpkg/ports/libusb-win32/portfile.cmake new file mode 100644 index 0000000..1cca3be --- /dev/null +++ b/vcpkg/ports/libusb-win32/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_fail_port_install(ON_TARGET "Linux" "OSX") + +set(LIBUSB_VERSION 1.2.6.0) +set(LIBUSB_HASH 972438b7465a22882bc91a1238291240ee3cdb09f374454a027d003b150656d4c262553104f74418bb49b4a7ca2f1a4f72d20e689fa3a7728881bafc876267f4) + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO libusb-win32/libusb-win32-releases + REF ${LIBUSB_VERSION} + FILENAME "libusb-win32-src-${LIBUSB_VERSION}.zip" + SHA512 ${LIBUSB_HASH} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(COPY ${SOURCE_PATH}/COPYING_LGPL.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/libusb-win32) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libusb-win32/COPYING_LGPL.txt ${CURRENT_PACKAGES_DIR}/share/libusb-win32/copyright) diff --git a/vcpkg/ports/libusb/CONTROL b/vcpkg/ports/libusb/CONTROL new file mode 100644 index 0000000..c2a9653 --- /dev/null +++ b/vcpkg/ports/libusb/CONTROL @@ -0,0 +1,6 @@ +Source: libusb +Version: 1.0.23 +Port-Version: 3 +Homepage: https://github.com/libusb/libusb +Description: a cross-platform library to access USB devices +Supports: !uwp diff --git a/vcpkg/ports/libusb/portfile.cmake b/vcpkg/ports/libusb/portfile.cmake new file mode 100644 index 0000000..c8d49f1 --- /dev/null +++ b/vcpkg/ports/libusb/portfile.cmake @@ -0,0 +1,62 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +if(VCPKG_TARGET_IS_LINUX) + message("${PORT} currently requires the following tools and libraries from the system package manager:\n autoreconf\n libudev\n\nThese can be installed on Ubuntu systems via apt-get install autoreconf libudev-dev") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libusb/libusb + REF e782eeb2514266f6738e242cdcb18e3ae1ed06fa # v1.0.23 + SHA512 27cfff4bbf64d5ec5014acac0871ace74b6af76141bd951309206f4806e3e3f2c7ed32416f5b55fd18d033ca5494052eb2e50ed3cc0be10839be2bd4168a9d4c + HEAD_REF master +) + +if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_PLATFORM_TOOLSET MATCHES "v142") + set(MSVS_VERSION 2017) #they are abi compatible, so it should work + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(MSVS_VERSION 2017) + else() + set(MSVS_VERSION 2015) + endif() + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(LIBUSB_PROJECT_TYPE dll) + if (VCPKG_CRT_LINKAGE STREQUAL static) + file(READ "${SOURCE_PATH}/msvc/libusb_${LIBUSB_PROJECT_TYPE}_${MSVS_VERSION}.vcxproj" PROJ_FILE) + string(REPLACE "MultiThreadedDLL" "MultiThreaded" PROJ_FILE "${PROJ_FILE}") + string(REPLACE "MultiThreadedDebugDLL" "MultiThreadedDebug" PROJ_FILE "${PROJ_FILE}") + file(WRITE "${SOURCE_PATH}/msvc/libusb_${LIBUSB_PROJECT_TYPE}_${MSVS_VERSION}.vcxproj" "${PROJ_FILE}") + endif() + else() + set(LIBUSB_PROJECT_TYPE static) + if (VCPKG_CRT_LINKAGE STREQUAL dynamic) + file(READ "${SOURCE_PATH}/msvc/libusb_${LIBUSB_PROJECT_TYPE}_${MSVS_VERSION}.vcxproj" PROJ_FILE) + string(REPLACE "MultiThreaded" "MultiThreadedDLL" PROJ_FILE "${PROJ_FILE}") + string(REPLACE "MultiThreadedDebug" "MultiThreadedDebugDLL" PROJ_FILE "${PROJ_FILE}") + file(WRITE "${SOURCE_PATH}/msvc/libusb_${LIBUSB_PROJECT_TYPE}_${MSVS_VERSION}.vcxproj" "${PROJ_FILE}") + endif() + endif() + + # The README file in the archive is a symlink to README.md + # which causes issues with the windows MSBUILD process + file(REMOVE ${SOURCE_PATH}/README) + + vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH msvc/libusb_${LIBUSB_PROJECT_TYPE}_${MSVS_VERSION}.vcxproj + LICENSE_SUBPATH COPYING + ) + file(INSTALL ${SOURCE_PATH}/libusb/libusb.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/libusb-1.0) +else() + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + ) + vcpkg_install_make() +endif() + +configure_file(${CURRENT_PORT_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY) +file(INSTALL ${CURRENT_PORT_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libusb/usage b/vcpkg/ports/libusb/usage new file mode 100644 index 0000000..de236d4 --- /dev/null +++ b/vcpkg/ports/libusb/usage @@ -0,0 +1,5 @@ +The package @PORT@:@TARGET_TRIPLET@ provides CMake targets: + + find_package(@PORT@ CONFIG REQUIRED) + target_include_directories(main PRIVATE ${LIBUSB_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${LIBUSB_LIBRARIES}) diff --git a/vcpkg/ports/libusb/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/libusb/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..8f0f358 --- /dev/null +++ b/vcpkg/ports/libusb/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,10 @@ +include(SelectLibraryConfigurations) + +find_path(LIBUSB_INCLUDE_DIR libusb.h PATH_SUFFIXES libusb-1.0) +find_library(LIBUSB_LIBRARY_DEBUG NAMES libusb-1.0 usb-1.0 NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) +find_library(LIBUSB_LIBRARY_RELEASE NAMES libusb-1.0 usb-1.0 NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED) + +select_library_configurations(LIBUSB) + +set(LIBUSB_INCLUDE_DIRS ${LIBUSB_INCLUDE_DIR}) +set(LIBUSB_LIBRARIES ${LIBUSB_LIBRARY}) diff --git a/vcpkg/ports/libusbmuxd/CMakeLists.txt b/vcpkg/ports/libusbmuxd/CMakeLists.txt new file mode 100644 index 0000000..3b314fb --- /dev/null +++ b/vcpkg/ports/libusbmuxd/CMakeLists.txt @@ -0,0 +1,42 @@ +cmake_minimum_required(VERSION 3.0) +project(libusbmuxd C) + +# find dependencies +find_path(libplist_INCLUDES plist.h PATH_SUFFIXES plist) +set(libplist_INCLUDES ${libplist_INCLUDES}/../) +find_library(libplist plist REQUIRED) + +# ready to create library +file(GLOB_RECURSE IDVCACTV_TOOLS_HDR common/*.h) +file(GLOB_RECURSE IDVCACTV_TOOLS_SRC common/*.c) + +file(GLOB_RECURSE IDVCACTV_PUBLIC_HDR include/*.h) +file(GLOB_RECURSE IDVCACTV_SRC src/*.c) + +add_library(libusbmuxd ${IDVCACTV_TOOLS_HDR} ${IDVCACTV_TOOLS_SRC} ${IDVCACTV_SRC} ${IDVCACTV_PUBLIC_HDR}) +target_include_directories(libusbmuxd PRIVATE ${libplist_INCLUDES} include common) +target_compile_definitions(libusbmuxd PRIVATE -DPACKAGE_STRING="1.2.77") +if (WIN32) + target_compile_definitions(libusbmuxd PRIVATE -DWIN32) + target_link_libraries(libusbmuxd PRIVATE Ws2_32) +endif() +target_link_libraries(libusbmuxd PRIVATE ${libplist}) + +# install +install( + TARGETS libusbmuxd + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/libusbmuxd.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/libusbmuxd.pc + @ONLY +) +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/libusbmuxd.pc + DESTINATION lib/pkgconfig +) + +install(FILES ${IDVCACTV_PUBLIC_HDR} DESTINATION include) \ No newline at end of file diff --git a/vcpkg/ports/libusbmuxd/CONTROL b/vcpkg/ports/libusbmuxd/CONTROL new file mode 100644 index 0000000..615147f --- /dev/null +++ b/vcpkg/ports/libusbmuxd/CONTROL @@ -0,0 +1,5 @@ +Source: libusbmuxd +Version: 1.2.185-1 +Description: A client library to multiplex connections from and to iOS devices +Build-Depends: libplist +Supports: !(uwp|linux|osx) diff --git a/vcpkg/ports/libusbmuxd/fix-win-build.patch b/vcpkg/ports/libusbmuxd/fix-win-build.patch new file mode 100644 index 0000000..a1b7f2e --- /dev/null +++ b/vcpkg/ports/libusbmuxd/fix-win-build.patch @@ -0,0 +1,20 @@ +diff --git a/src/libusbmuxd.c b/src/libusbmuxd.c +index e85cf4a..35ed1b5 100644 +--- a/src/libusbmuxd.c ++++ b/src/libusbmuxd.c +@@ -86,6 +86,15 @@ static char* stpncpy(char *dst, const char *src, size_t len) + } + #endif + ++#ifdef WIN32 ++int strcasecmp(char *s1, char *s2) ++{ ++ while (toupper((unsigned char)*s1) == toupper((unsigned char)*s2++)) ++ if (*s1++ == '\0') return 0; ++ return(toupper((unsigned char)*s1) - toupper((unsigned char)*--s2)); ++} ++#endif ++ + #include + #define PLIST_CLIENT_VERSION_STRING PACKAGE_STRING + #define PLIST_LIBUSBMUX_VERSION 3 diff --git a/vcpkg/ports/libusbmuxd/portfile.cmake b/vcpkg/ports/libusbmuxd/portfile.cmake new file mode 100644 index 0000000..26518b2 --- /dev/null +++ b/vcpkg/ports/libusbmuxd/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_fail_port_install( ON_TARGET "uwp" "linux" "osx") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libimobiledevice-win32/libusbmuxd + REF 65561d92bc4786599c90a257d856cede3519e432 # v1.2.185 + SHA512 b3bcf2a5d99a605431ba22fe5701068ea6a2c4284044412e3e1d3dc57bb7b42adac20cf21c0d8e09965c8e8f7bcffc72b5949eaefaa48d024d2a3cb16329ed78 + HEAD_REF msvc-master + PATCHES fix-win-build.patch +) + +configure_file(${CURRENT_PORT_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libuuid/CMakeLists.txt b/vcpkg/ports/libuuid/CMakeLists.txt new file mode 100644 index 0000000..ff1edd0 --- /dev/null +++ b/vcpkg/ports/libuuid/CMakeLists.txt @@ -0,0 +1,35 @@ +cmake_minimum_required(VERSION 3.0) +project(libuuid C) + +configure_file(config.linux.h config.h COPYONLY) + +include_directories(${CMAKE_CURRENT_BINARY_DIR}) + +add_library(uuid STATIC + clear.c + compare.c + copy.c + gen_uuid.c + isnull.c + pack.c + parse.c + randutils.c + unpack.c + unparse.c + uuid_time.c +) +target_compile_options(uuid PRIVATE -include "${CMAKE_CURRENT_BINARY_DIR}/config.h") + +add_executable(test_uuid test_uuid.c) +target_link_libraries(test_uuid uuid) + +if(CMAKE_BUILD_TYPE STREQUAL "Release") + install(FILES uuid.h DESTINATION include/uuid) +endif() + +install( + TARGETS uuid + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) diff --git a/vcpkg/ports/libuuid/CONTROL b/vcpkg/ports/libuuid/CONTROL new file mode 100644 index 0000000..5c11b9c --- /dev/null +++ b/vcpkg/ports/libuuid/CONTROL @@ -0,0 +1,5 @@ +Source: libuuid +Version: 1.0.3-7 +Homepage: https://sourceforge.net/projects/libuuid +Description: Universally unique id library +Supports: linux|osx \ No newline at end of file diff --git a/vcpkg/ports/libuuid/config.linux.h b/vcpkg/ports/libuuid/config.linux.h new file mode 100644 index 0000000..38b53ca --- /dev/null +++ b/vcpkg/ports/libuuid/config.linux.h @@ -0,0 +1,13 @@ +#define HAVE_DECL__SC_HOST_NAME_MAX 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_NETINET_IN_H 1 +#define HAVE_SRANDOM 1 +#define HAVE_STDINT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_SYS_FILE_H 1 +#define HAVE_SYS_IOCTL_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_USLEEP 1 +#define PACKAGE_STRING "libuuid 1.0.3" diff --git a/vcpkg/ports/libuuid/portfile.cmake b/vcpkg/ports/libuuid/portfile.cmake new file mode 100644 index 0000000..bb03f31 --- /dev/null +++ b/vcpkg/ports/libuuid/portfile.cmake @@ -0,0 +1,38 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports unix platform" ON_TARGET "Windows") + +set(LIBUUID_VERSION 1.0.3) + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO libuuid + FILENAME "libuuid-${LIBUUID_VERSION}.tar.gz" + SHA512 77488caccc66503f6f2ded7bdfc4d3bc2c20b24a8dc95b2051633c695e99ec27876ffbafe38269b939826e1fdb06eea328f07b796c9e0aaca12331a787175507 +) + +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_LIST_DIR}/config.linux.h + DESTINATION ${SOURCE_PATH} +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +set(prefix ${CURRENT_INSTALLED_DIR}) +set(exec_prefix \$\{prefix\}) +set(libdir \$\{exec_prefix\}/lib) +set(includedir \$\{prefix\}/include) +configure_file(${SOURCE_PATH}/uuid.pc.in ${SOURCE_PATH}/uuid.pc @ONLY) +file(INSTALL ${SOURCE_PATH}/uuid.pc DESTINATION ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +file(INSTALL ${SOURCE_PATH}/uuid.pc DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) +vcpkg_fixup_pkgconfig() + +file(INSTALL + ${SOURCE_PATH}/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/libuv/CMakeLists.txt b/vcpkg/ports/libuv/CMakeLists.txt new file mode 100644 index 0000000..b51630d --- /dev/null +++ b/vcpkg/ports/libuv/CMakeLists.txt @@ -0,0 +1,82 @@ +cmake_minimum_required(VERSION 3.5) +project(libuv C) + +find_package(Threads REQUIRED) + +file(GLOB UV_SOURCES_COMMON src/*.c) + +file(GLOB UV_SOURCES_UNIX + src/unix/async.c + src/unix/core.c + src/unix/dl.c + src/unix/fs.c + src/unix/getaddrinfo.c + src/unix/getnameinfo.c + src/unix/loop.c + src/unix/loop-watcher.c + src/unix/pipe.c + src/unix/poll.c + src/unix/process.c + src/unix/signal.c + src/unix/stream.c + src/unix/tcp.c + src/unix/thread.c + src/unix/tty.c + src/unix/udp.c +) +file(GLOB UV_SOURCES_LINUX + src/unix/proctitle.c + src/unix/linux-core.c + src/unix/linux-inotify.c + src/unix/linux-syscalls.c + src/unix/procfs-exepath.c + src/unix/sysinfo-loadavg.c + src/unix/sysinfo-memory.c +) +file(GLOB UV_SOURCES_DARWIN + src/unix/proctitle.c + src/unix/darwin.c + src/unix/fsevents.c + src/unix/darwin-proctitle.c + src/unix/bsd-ifaddrs.c + src/unix/kqueue.c +) +file(GLOB UV_SOURCES_FREEBSD + src/unix/freebsd.c + src/unix/posix-hrtime.c + src/unix/bsd-proctitle.c + src/unix/bsd-ifaddrs.c + src/unix/kqueue.c +) +file(GLOB UV_SOURCES_WIN src/win/*.c) + +if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_WIN}) + target_compile_definitions(libuv PRIVATE WIN32_LEAN_AND_MEAN "_WIN32_WINNT=0x0600") + target_link_libraries(libuv PRIVATE iphlpapi psapi shell32 userenv ws2_32) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_UNIX} ${UV_SOURCES_DARWIN}) +elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_UNIX} ${UV_SOURCES_FREEBSD}) +else() # Assume some Linux variant + add_library(libuv ${UV_SOURCES_COMMON} ${UV_SOURCES_UNIX} ${UV_SOURCES_LINUX}) +endif() + +target_link_libraries(libuv PRIVATE Threads::Threads) +target_include_directories(libuv PUBLIC $ $ $) +set_target_properties(libuv PROPERTIES DEFINE_SYMBOL BUILDING_UV_SHARED) + +if(NOT UV_SKIP_HEADERS) + install( + DIRECTORY include/ + DESTINATION include + ) +endif() + +install(TARGETS libuv + EXPORT libuv + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) +install(EXPORT libuv FILE unofficial-libuv-targets.cmake NAMESPACE unofficial::libuv:: DESTINATION share/unofficial-libuv) diff --git a/vcpkg/ports/libuv/CONTROL b/vcpkg/ports/libuv/CONTROL new file mode 100644 index 0000000..efae909 --- /dev/null +++ b/vcpkg/ports/libuv/CONTROL @@ -0,0 +1,4 @@ +Source: libuv +Version: 1.34.2-1 +Homepage: https://github.com/libuv/libuv +Description: libuv is a multi-platform support library with a focus on asynchronous I/O. diff --git a/vcpkg/ports/libuv/portfile.cmake b/vcpkg/ports/libuv/portfile.cmake new file mode 100644 index 0000000..4cc164c --- /dev/null +++ b/vcpkg/ports/libuv/portfile.cmake @@ -0,0 +1,38 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libuv/libuv + REF f868c9ab0c307525a16fff99fd21e32a6ebc3837 # v1.34.2 + SHA512 1a64b34dc488a6fc6f563246e6e79f11d64f16cf9f2f1dab3eb38af9e5cf6ff513f67168bef95f72d260291259adda9567f982e0158bcfdacce15f5d23431ecf + HEAD_REF v1.x +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DUV_SKIP_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-libuv TARGET_PATH share/unofficial-libuv) +vcpkg_copy_pdbs() + +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/unofficial-libuv-config.in.cmake + ${CURRENT_PACKAGES_DIR}/share/unofficial-libuv/unofficial-libuv-config.cmake + @ONLY +) + +file(READ ${CURRENT_PACKAGES_DIR}/include/uv.h UV_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + string(REPLACE "defined(USING_UV_SHARED)" "1" UV_H "${UV_H}") +else() + string(REPLACE "defined(USING_UV_SHARED)" "0" UV_H "${UV_H}") + configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY) +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/uv.h "${UV_H}") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + diff --git a/vcpkg/ports/libuv/unofficial-libuv-config.in.cmake b/vcpkg/ports/libuv/unofficial-libuv-config.in.cmake new file mode 100644 index 0000000..7ff66b1 --- /dev/null +++ b/vcpkg/ports/libuv/unofficial-libuv-config.in.cmake @@ -0,0 +1,7 @@ + +if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static" AND NOT WIN32) + include(CMakeFindDependencyMacro) + find_dependency(Threads) +endif() + +include(${CMAKE_CURRENT_LIST_DIR}/unofficial-libuv-targets.cmake) diff --git a/vcpkg/ports/libuv/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/libuv/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..10b6e64 --- /dev/null +++ b/vcpkg/ports/libuv/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,16 @@ +_find_package(${ARGS}) + +if(WIN32) + list(APPEND LibUV_LIBRARIES iphlpapi psapi shell32 userenv ws2_32) + if(TARGET LibUV::LibUV) + target_link_libraries(LibUV::LibUV INTERFACE iphlpapi psapi shell32 userenv ws2_32) + endif() +endif() +include(CMakeFindDependencyMacro) +find_dependency(Threads) +list(APPEND LibUV_LIBRARIES Threads::Threads) +if(TARGET LibUV::LibUV) + target_link_libraries(LibUV::LibUV INTERFACE Threads::Threads) +endif() + + diff --git a/vcpkg/ports/libvmdk/CMakeLists.txt b/vcpkg/ports/libvmdk/CMakeLists.txt new file mode 100644 index 0000000..1fb043d --- /dev/null +++ b/vcpkg/ports/libvmdk/CMakeLists.txt @@ -0,0 +1,84 @@ +cmake_minimum_required(VERSION 3.12) + +project(libvmdk C) + +find_package(ZLIB REQUIRED) + +if(MSVC) + add_compile_definitions(_CRT_SECURE_NO_DEPRECATE) + add_compile_definitions(_CRT_NONSTDC_NO_DEPRECATE) +endif() + +add_compile_definitions(HAVE_LOCAL_LIBCAES) +add_compile_definitions(HAVE_LOCAL_LIBCERROR) +add_compile_definitions(HAVE_LOCAL_LIBCTHREADS) +add_compile_definitions(HAVE_LOCAL_LIBCDATA) +add_compile_definitions(HAVE_LOCAL_LIBCLOCALE) +add_compile_definitions(HAVE_LOCAL_LIBCNOTIFY) +add_compile_definitions(HAVE_LOCAL_LIBCSPLIT) +add_compile_definitions(HAVE_LOCAL_LIBCFILE) +add_compile_definitions(HAVE_LOCAL_LIBCPATH) +add_compile_definitions(HAVE_LOCAL_LIBUNA) +add_compile_definitions(HAVE_LOCAL_LIBBFIO) +add_compile_definitions(HAVE_LOCAL_LIBFCACHE) +add_compile_definitions(HAVE_LOCAL_LIBFDATA) +add_compile_definitions(HAVE_LOCAL_LIBFVALUE) +add_compile_definitions(ZLIB_DLL) + +if(UNIX) + configure_file(common/config.h.in common/config.h) + add_compile_definitions(HAVE_CONFIG_H) + add_compile_definitions(LOCALEDIR="/usr/share/locale") +endif() + +if(MSVC) + add_compile_definitions(LIBVMDK_DLL_EXPORT) + set(LIB_RC libvmdk/libvmdk.rc) +endif() + + +include(GNUInstallDirs) +include(CMakePackageConfigHelpers) + +# Add CMake find_package() integration +set(PROJECT_TARGET_NAME "${PROJECT_NAME}") +set(CONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}") +set(PROJECT_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/generated/${PROJECT_TARGET_NAME}Config.cmake") +set(TARGETS_EXPORT_NAME "${PROJECT_TARGET_NAME}Targets") +set(NAMESPACE "libvmdk::") + +# Source files +file(GLOB LIB_SRC lib*/*.c) + +# Headers +file(GLOB LIB_INST_HEADERS include/libvmdk/*.h) + +add_library(${PROJECT_NAME} ${LIB_SRC} ${LIB_RC}) + +target_include_directories(${PROJECT_NAME} PRIVATE ./include ./common) +target_include_directories(${PROJECT_NAME} PRIVATE ./libbfio ./libcdata ./libcerror ./libcfile ./libclocale) +target_include_directories(${PROJECT_NAME} PRIVATE ./libcnotify ./libcpath ./libcsplit ./libcthreads) +target_include_directories(${PROJECT_NAME} PRIVATE ./libfcache ./libfdata ./libfvalue ./libuna) + +target_link_libraries(${PROJECT_NAME} PRIVATE ZLIB::ZLIB) + +install(TARGETS ${PROJECT_NAME} + EXPORT ${TARGETS_EXPORT_NAME} + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + INCLUDES DESTINATION include) + +install(FILES ${LIB_INST_HEADERS} DESTINATION include/libvmdk) +install(FILES include/libvmdk.h DESTINATION include) + + +# Generate and install libvmdkConfig.cmake +configure_package_config_file("Config.cmake.in" "${PROJECT_CONFIG}" INSTALL_DESTINATION "${CONFIG_INSTALL_DIR}") +install(FILES "${PROJECT_CONFIG}" DESTINATION "${CONFIG_INSTALL_DIR}") + +# Generate and install libvmdkTargets*.cmake +install(EXPORT ${TARGETS_EXPORT_NAME} + NAMESPACE ${NAMESPACE} + DESTINATION "${CONFIG_INSTALL_DIR}") + diff --git a/vcpkg/ports/libvmdk/CONTROL b/vcpkg/ports/libvmdk/CONTROL new file mode 100644 index 0000000..21a1e9c --- /dev/null +++ b/vcpkg/ports/libvmdk/CONTROL @@ -0,0 +1,6 @@ +Source: libvmdk +Version: 20200926 +Homepage: https://github.com/libyal/libvmdk +Description: Library and tools to access the VMware Virtual Disk (VMDK) format +Build-Depends: gettext,zlib +Supports: !uwp diff --git a/vcpkg/ports/libvmdk/Config.cmake.in b/vcpkg/ports/libvmdk/Config.cmake.in new file mode 100644 index 0000000..bd6bd45 --- /dev/null +++ b/vcpkg/ports/libvmdk/Config.cmake.in @@ -0,0 +1,4 @@ +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake") +check_required_components("@PROJECT_NAME@") diff --git a/vcpkg/ports/libvmdk/portfile.cmake b/vcpkg/ports/libvmdk/portfile.cmake new file mode 100644 index 0000000..505d5e6 --- /dev/null +++ b/vcpkg/ports/libvmdk/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +set(LIB_VERSION 20200926) +set(LIB_FILENAME libvmdk-alpha-${LIB_VERSION}.tar.gz) + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/libyal/libvmdk/releases/download/${LIB_VERSION}/${LIB_FILENAME}" + FILENAME "${LIB_FILENAME}" + SHA512 e70c42580dc58ad0a6459fe461504a8ef128f8d5df9d500f84f316e627232606f22eb4906fc1debc3e75e71daa6a07951af80822695de13d5e466adda4cfd5e0 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${LIB_VERSION} +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") +file(COPY "${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in" DESTINATION "${SOURCE_PATH}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/libvmdk" TARGET_PATH "share/libvmdk") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/libvorbis/0001-Dont-export-vorbisenc-functions.patch b/vcpkg/ports/libvorbis/0001-Dont-export-vorbisenc-functions.patch new file mode 100644 index 0000000..f2bab5c --- /dev/null +++ b/vcpkg/ports/libvorbis/0001-Dont-export-vorbisenc-functions.patch @@ -0,0 +1,16 @@ +diff --git a/win32/vorbis.def b/win32/vorbis.def +index 9cca64d..a80fff7 100644 +--- a/win32/vorbis.def ++++ b/win32/vorbis.def +@@ -49,11 +49,4 @@ vorbis_synthesis_idheader + ; + vorbis_window + ;_analysis_output_always +-vorbis_encode_init +-vorbis_encode_setup_managed +-vorbis_encode_setup_vbr +-vorbis_encode_init_vbr +-vorbis_encode_setup_init +-vorbis_encode_ctl +-; + vorbis_version_string diff --git a/vcpkg/ports/libvorbis/0002-Fixup-pkgconfig-libs.patch b/vcpkg/ports/libvorbis/0002-Fixup-pkgconfig-libs.patch new file mode 100644 index 0000000..85508f1 --- /dev/null +++ b/vcpkg/ports/libvorbis/0002-Fixup-pkgconfig-libs.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f377c428..07530304 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -60,6 +60,9 @@ message(STATUS "Configuring ${PROJECT_NAME} ${PROJECT_VERSION}") + # Find math library + + check_library_exists(m floor "" HAVE_LIBM) ++if(HAVE_LIBM) ++ set(VORBIS_LIBS "-lm") ++endif() + + # Find ogg dependency + find_package(Ogg REQUIRED) + diff --git a/vcpkg/ports/libvorbis/portfile.cmake b/vcpkg/ports/libvorbis/portfile.cmake new file mode 100644 index 0000000..a015e0e --- /dev/null +++ b/vcpkg/ports/libvorbis/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiph/vorbis + REF v1.3.7 + SHA512 bfb6f5dbfd49ed38b2b08b3667c06d02e68f649068a050f21a3cc7e1e56b27afd546aaa3199c4f6448f03f6e66a82f9a9dc2241c826d3d1d4acbd38339b9e9fb + HEAD_REF master + PATCHES + 0001-Dont-export-vorbisenc-functions.patch + 0002-Fixup-pkgconfig-libs.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets( + CONFIG_PATH lib/cmake/Vorbis + TARGET_PATH share/Vorbis +) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +vcpkg_copy_pdbs() + +vcpkg_fixup_pkgconfig() diff --git a/vcpkg/ports/libvorbis/vcpkg.json b/vcpkg/ports/libvorbis/vcpkg.json new file mode 100644 index 0000000..af19c18 --- /dev/null +++ b/vcpkg/ports/libvorbis/vcpkg.json @@ -0,0 +1,11 @@ +{ + "name": "libvorbis", + "version-string": "1.3.7", + "port-version": 1, + "description": "Ogg Vorbis is a fully open, non-proprietary, patent-and-royalty-free, general-purpose compressed audio format", + "homepage": "https://github.com/xiph/vorbis", + "license": "BSD-3-Clause", + "dependencies": [ + "libogg" + ] +} diff --git a/vcpkg/ports/libvpx/CONTROL b/vcpkg/ports/libvpx/CONTROL new file mode 100644 index 0000000..8cdbaa4 --- /dev/null +++ b/vcpkg/ports/libvpx/CONTROL @@ -0,0 +1,6 @@ +Source: libvpx +Version: 1.9.0 +Port-Version: 2 +Homepage: https://github.com/webmproject/libvpx +Description: The reference software implementation for the video coding formats VP8 and VP9. +Supports: !(uwp&arm) diff --git a/vcpkg/ports/libvpx/portfile.cmake b/vcpkg/ports/libvpx/portfile.cmake new file mode 100644 index 0000000..5e36511 --- /dev/null +++ b/vcpkg/ports/libvpx/portfile.cmake @@ -0,0 +1,230 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +set(LIBVPX_VERSION 1.9.0) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO webmproject/libvpx + REF v${LIBVPX_VERSION} + SHA512 8d544552b35000ea5712aec220b78bb5f7dc210704b2f609365214cb95a4f5a0e343b362723d829cb4a9ac203b10d5443700ba84b28fd6b2fefbabb40663e298 + HEAD_REF master +) + +vcpkg_find_acquire_program(YASM) +vcpkg_find_acquire_program(PERL) + +get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY) +get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) + +if(CMAKE_HOST_WIN32) + vcpkg_acquire_msys(MSYS_ROOT PACKAGES make) + set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) + set(ENV{PATH} "${YASM_EXE_PATH};${MSYS_ROOT}/usr/bin;$ENV{PATH};${PERL_EXE_PATH}") +else() + set(BASH /bin/bash) + set(ENV{PATH} "${YASM_EXE_PATH}:${MSYS_ROOT}/usr/bin:$ENV{PATH}:${PERL_EXE_PATH}") +endif() + +if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) + + if(VCPKG_CRT_LINKAGE STREQUAL static) + set(LIBVPX_CRT_LINKAGE --enable-static-msvcrt) + set(LIBVPX_CRT_SUFFIX mt) + else() + set(LIBVPX_CRT_SUFFIX md) + endif() + + if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + set(LIBVPX_TARGET_ARCH "x86-win32") + set(LIBVPX_ARCH_DIR "Win32") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + set(LIBVPX_TARGET_ARCH "x86_64-win64") + set(LIBVPX_ARCH_DIR "x64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64) + set(LIBVPX_TARGET_ARCH "arm64-win64") + set(LIBVPX_ARCH_DIR "ARM64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL arm) + set(LIBVPX_TARGET_ARCH "armv7-win32") + set(LIBVPX_ARCH_DIR "ARM") + endif() + + set(LIBVPX_TARGET_VS "vs15") + + message(STATUS "Generating makefile") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) + vcpkg_execute_required_process( + COMMAND + ${BASH} --noprofile --norc + "${SOURCE_PATH}/configure" + --target=${LIBVPX_TARGET_ARCH}-${LIBVPX_TARGET_VS} + ${LIBVPX_CRT_LINKAGE} + --disable-examples + --disable-tools + --disable-docs + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}" + LOGNAME configure-${TARGET_TRIPLET}) + + message(STATUS "Generating MSBuild projects") + vcpkg_execute_required_process( + COMMAND + ${BASH} --noprofile --norc -c "make dist" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}" + LOGNAME generate-${TARGET_TRIPLET}) + + vcpkg_build_msbuild( + PROJECT_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/vpx.vcxproj" + OPTIONS /p:UseEnv=True + ) + + # note: pdb file names are hardcoded in the lib file, cannot rename + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Release/vpxmd.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib") + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Release/vpx/vpx.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/lib") + else() + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Release/vpxmt.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib") + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Release/vpx/vpx.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/lib") + endif() + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Debug/vpxmdd.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Debug/vpx/vpx.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") + else() + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Debug/vpxmtd.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/${LIBVPX_ARCH_DIR}/Debug/vpx/vpx.pdb" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") + endif() + endif() + + if (VCPKG_TARGET_ARCHITECTURE STREQUAL arm64) + set(LIBVPX_INCLUDE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/vpx-vp8-vp9-nopost-nodocs-${LIBVPX_TARGET_ARCH}${LIBVPX_CRT_SUFFIX}-${LIBVPX_TARGET_VS}-v${LIBVPX_VERSION}/include/vpx") + elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL arm) + set(LIBVPX_INCLUDE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/vpx-vp8-vp9-nopost-nomt-nodocs-${LIBVPX_TARGET_ARCH}${LIBVPX_CRT_SUFFIX}-${LIBVPX_TARGET_VS}-v${LIBVPX_VERSION}/include/vpx") + else() + set(LIBVPX_INCLUDE_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/vpx-vp8-vp9-nodocs-${LIBVPX_TARGET_ARCH}${LIBVPX_CRT_SUFFIX}-${LIBVPX_TARGET_VS}-v${LIBVPX_VERSION}/include/vpx") + endif() + file( + INSTALL + ${LIBVPX_INCLUDE_DIR} + DESTINATION + "${CURRENT_PACKAGES_DIR}/include" + RENAME + "vpx") + +else() + + set(OPTIONS "--disable-examples --disable-tools --disable-docs --disable-unit-tests") + + set(OPTIONS_DEBUG "--enable-debug-libs --enable-debug --prefix=${CURRENT_PACKAGES_DIR}/debug") + set(OPTIONS_RELEASE "--prefix=${CURRENT_PACKAGES_DIR}") + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(OPTIONS "${OPTIONS} --disable-static --enable-shared") + else() + set(OPTIONS "${OPTIONS} --enable-static --disable-shared") + endif() + + if(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + set(LIBVPX_TARGET_ARCH "x86") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + set(LIBVPX_TARGET_ARCH "x86_64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64) + set(LIBVPX_TARGET_ARCH "arm64") + else() + message(FATAL_ERROR "libvpx does not support architecture ${VCPKG_TARGET_ARCHITECTURE}") + endif() + + if(VCPKG_TARGET_IS_MINGW) + if(LIBVPX_TARGET_ARCH STREQUAL "x86") + set(LIBVPX_TARGET "x86-win32-gcc") + else() + set(LIBVPX_TARGET "x86_64-win64-gcc") + endif() + elseif(VCPKG_TARGET_IS_LINUX) + set(LIBVPX_TARGET "${LIBVPX_TARGET_ARCH}-linux-gcc") + elseif(VCPKG_TARGET_IS_OSX) + set(LIBVPX_TARGET "${LIBVPX_TARGET_ARCH}-darwin17-gcc") # enable latest CPU instructions for best performance and less CPU usage on MacOS + else() + set(LIBVPX_TARGET "generic-gnu") # use default target + endif() + + message(STATUS "Build info. Target: ${LIBVPX_TARGET}; Options: ${OPTIONS}") + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Configuring libvpx for Release") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + vcpkg_execute_required_process( + COMMAND + ${BASH} --noprofile --norc + "${SOURCE_PATH}/configure" + --target=${LIBVPX_TARGET} + ${OPTIONS} + ${OPTIONS_RELEASE} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + LOGNAME configure-${TARGET_TRIPLET}-rel) + + message(STATUS "Building libvpx for Release") + vcpkg_execute_required_process( + COMMAND + ${BASH} --noprofile --norc -c "make -j8" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + LOGNAME build-${TARGET_TRIPLET}-rel + ) + + message(STATUS "Installing libvpx for Release") + vcpkg_execute_required_process( + COMMAND + ${BASH} --noprofile --norc -c "make install" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + LOGNAME install-${TARGET_TRIPLET}-rel + ) + endif() + + # --- --- --- + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Configuring libvpx for Debug") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + vcpkg_execute_required_process( + COMMAND + ${BASH} --noprofile --norc + "${SOURCE_PATH}/configure" + --target=${LIBVPX_TARGET} + ${OPTIONS} + ${OPTIONS_DEBUG} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + LOGNAME configure-${TARGET_TRIPLET}-dbg) + + message(STATUS "Building libvpx for Debug") + vcpkg_execute_required_process( + COMMAND + ${BASH} --noprofile --norc -c "make -j8" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + + message(STATUS "Installing libvpx for Debug") + vcpkg_execute_required_process( + COMMAND + ${BASH} --noprofile --norc -c "make install" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + LOGNAME install-${TARGET_TRIPLET}-dbg + ) + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libvpx_g.a) + endif() +endif() + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + set(LIBVPX_CONFIG_DEBUG ON) +else() + set(LIBVPX_CONFIG_DEBUG OFF) +endif() + +configure_file(${CMAKE_CURRENT_LIST_DIR}/unofficial-libvpx-config.cmake.in ${CURRENT_PACKAGES_DIR}/share/unofficial-libvpx/unofficial-libvpx-config.cmake @ONLY) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libvpx/unofficial-libvpx-config.cmake.in b/vcpkg/ports/libvpx/unofficial-libvpx-config.cmake.in new file mode 100644 index 0000000..e475927 --- /dev/null +++ b/vcpkg/ports/libvpx/unofficial-libvpx-config.cmake.in @@ -0,0 +1,49 @@ +if(NOT TARGET unofficial::libvpx::libvpx) + # Compute the installation prefix relative to this file. + get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) + get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) + get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) + + # Add library target (note: vpx always has a static build in vcpkg). + add_library(unofficial::libvpx::libvpx STATIC IMPORTED) + + # Add interface include directories and link interface languages (applies to all configurations). + set_target_properties(unofficial::libvpx::libvpx PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + ) + list(APPEND _IMPORT_CHECK_FILES "${_IMPORT_PREFIX}/include/vpx/vpx_codec.h") + + # Add release configuration properties. + find_library(_LIBFILE_RELEASE NAMES vpx vpx@LIBVPX_CRT_SUFFIX@ PATHS "${_IMPORT_PREFIX}/lib/" NO_DEFAULT_PATH) + set_property(TARGET unofficial::libvpx::libvpx + APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) + set_target_properties(unofficial::libvpx::libvpx PROPERTIES + IMPORTED_LOCATION_RELEASE ${_LIBFILE_RELEASE}) + list(APPEND _IMPORT_CHECK_FILES ${_LIBFILE_RELEASE}) + unset(_LIBFILE_RELEASE CACHE) + + # Add debug configuration properties. + if(@LIBVPX_CONFIG_DEBUG@) + find_library(_LIBFILE_DEBUG NAMES vpx vpx@LIBVPX_CRT_SUFFIX@d PATHS "${_IMPORT_PREFIX}/debug/lib/" NO_DEFAULT_PATH) + set_property(TARGET unofficial::libvpx::libvpx + APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) + set_target_properties(unofficial::libvpx::libvpx PROPERTIES + IMPORTED_LOCATION_DEBUG ${_LIBFILE_DEBUG}) + list(APPEND _IMPORT_CHECK_FILES ${_LIBFILE_DEBUG}) + unset(_LIBFILE_DEBUG CACHE) + endif() + + # Check header and library files are present. + foreach(file ${_IMPORT_CHECK_FILES} ) + if(NOT EXISTS "${file}" ) + message(FATAL_ERROR "unofficial::libvpx::libvpx references the file + \"${file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +") + endif() + endforeach() + unset(_IMPORT_CHECK_FILES) +endif() diff --git a/vcpkg/ports/libwandio/CONTROL b/vcpkg/ports/libwandio/CONTROL new file mode 100644 index 0000000..1150b06 --- /dev/null +++ b/vcpkg/ports/libwandio/CONTROL @@ -0,0 +1,7 @@ +Source: libwandio +Version: 4.2.1 +Port-Version: 3 +Homepage: https://github.com/wanduow/wandio +Description: C library for simple and efficient file IO. +Build-Depends: zlib, zstd, liblzma, lzo, lz4, curl, pthread, bzip2 +Supports: !windows diff --git a/vcpkg/ports/libwandio/configure.lib.patch b/vcpkg/ports/libwandio/configure.lib.patch new file mode 100644 index 0000000..3898836 --- /dev/null +++ b/vcpkg/ports/libwandio/configure.lib.patch @@ -0,0 +1,122 @@ +diff --git a/configure.ac b/configure.ac +index 4579fbb3d..f6be008c8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -112,10 +112,11 @@ AC_HEADER_STDC + AC_CHECK_HEADERS(stddef.h inttypes.h sys/prctl.h) + + # Checks for various "optional" libraries +-AC_CHECK_LIB(pthread, pthread_create, have_pthread=1, have_pthread=0) ++# AC_CHECK_LIB(pthread, pthread_create, have_pthread=1, have_pthread=0) ++AC_SEARCH_LIBS(pthread_create, [pthreadGC pthreadVC pthread], have_pthread=1, have_pthread=0) + + if test "$have_pthread" = 1; then +- LIBWANDIO_LIBS="$LIBWANDIO_LIBS -lpthread" ++ LIBWANDIO_LIBS="$LIBWANDIO_LIBS $ac_cv_search_pthread_create" + AC_DEFINE(HAVE_LIBPTHREAD, 1, [Set to 1 if pthreads are supported]) + fi + +@@ -128,12 +129,13 @@ AC_ARG_WITH([bzip2], + + AS_IF([test "x$with_bzip2" != "xno"], + [ +- AC_CHECK_LIB(bz2, BZ2_bzDecompressInit, have_bzip=yes, have_bzip=no) ++ AC_SEARCH_LIBS(BZ2_bzDecompressInit, [bz2 bz2d bzip2 bzip2d], have_bzip=yes, have_bzip=no) ++ # AC_CHECK_LIB(bz2, BZ2_bzDecompressInit, have_bzip=yes, have_bzip=no) + ], [have_bzip=no]) + + AS_IF([test "x$have_bzip" = "xyes"], [ +- if test "$ac_cv_lib_bz2_BZ2_bzDecompressInit" != "none required"; then +- LIBWANDIO_LIBS="$LIBWANDIO_LIBS -lbz2" ++ if test "$ac_cv_search_BZ2_bzDecompressInit" != "none required"; then ++ LIBWANDIO_LIBS="$LIBWANDIO_LIBS $ac_cv_search_BZ2_bzDecompressInit" + fi + with_bzip2=yes + AC_DEFINE(HAVE_LIBBZ2, 1, "Compiled with bzip2 support")], +@@ -149,12 +151,13 @@ AC_ARG_WITH([zlib], + + AS_IF([test "x$with_zlib" != "xno"], + [ +- AC_CHECK_LIB(z, deflate, have_zlib=yes, have_zlib=no) ++ AC_SEARCH_LIBS(deflate, [z zlib zlibd zd], have_zlib=yes, have_zlib=no) ++ # AC_CHECK_LIB(z, deflate, have_zlib=yes, have_zlib=no) + ], [have_zlib=no]) + + AS_IF([test "x$have_zlib" = "xyes"], [ +- if test "$ac_cv_lib_z_deflate" != "none required"; then +- LIBWANDIO_LIBS="$LIBWANDIO_LIBS -lz" ++ if test "$ac_cv_search_deflate" != "none required"; then ++ LIBWANDIO_LIBS="$LIBWANDIO_LIBS $ac_cv_search_deflate" + fi + AC_DEFINE(HAVE_LIBZ, 1, "Compiled with zlib support") + with_zlib=yes], +@@ -193,12 +196,13 @@ AC_ARG_WITH([lzma], + + AS_IF([test "x$with_lzma" != "xno"], + [ +- AC_CHECK_HEADER(lzma.h, have_lzma=yes, have_lzma=no) ++ # AC_CHECK_HEADER(lzma.h, have_lzma=yes, have_lzma=no) ++ AC_SEARCH_LIBS(lzma_free, [lzma lzmad], have_lzma=yes, have_lzma=no) + ], [have_lzma=no]) + + AS_IF([test "x$have_lzma" = "xyes"], [ +- if test "$ac_cv_lib_lzma_code" != "none required"; then +- LIBWANDIO_LIBS="$LIBWANDIO_LIBS -llzma" ++ if test "$ac_cv_search_lzma_free" != "none required"; then ++ LIBWANDIO_LIBS="$LIBWANDIO_LIBS $ac_cv_search_lzma_free" + fi + AC_DEFINE(HAVE_LIBLZMA, 1, "Compiled with lzma support") + with_lzma=yes], +@@ -215,12 +219,13 @@ AC_ARG_WITH([zstd], + + AS_IF([test "x$with_zstd" != "xno"], + [ +- AC_CHECK_LIB(zstd, ZSTD_createDStream, have_zstd=yes, have_zstd=no) ++ AC_SEARCH_LIBS(ZSTD_createDStream, [zstd zstdd], have_zstd=yes, have_zstd=no) ++ # AC_CHECK_LIB(zstd, ZSTD_createDStream, have_zstd=yes, have_zstd=no) + ], [have_zstd=no]) + + AS_IF([test "x$have_zstd" = "xyes"], [ +- if test "$ac_cv_lib_zstd_code" != "none required"; then +- LIBWANDIO_LIBS="$LIBWANDIO_LIBS -lzstd" ++ if test "$ac_cv_search_ZSTD_createDStream" != "none required"; then ++ LIBWANDIO_LIBS="$LIBWANDIO_LIBS $ac_cv_search_ZSTD_createDStream" + fi + AC_DEFINE(HAVE_LIBZSTD, 1, "Compiled with zstd support") + with_zstd=yes], +@@ -259,25 +264,28 @@ AC_ARG_WITH([lz4], + + AS_IF([test "x$with_lz4" != "xno"], + [ +- AC_CHECK_LIB(lz4, LZ4F_createDecompressionContext, have_lz4f=yes, have_lz4f=no) ++ AC_SEARCH_LIBS(LZ4F_createDecompressionContext, [lz4 lz4d], have_lz4f=yes, have_lz4f=no) ++ # AC_CHECK_LIB(lz4, LZ4F_createDecompressionContext, have_lz4f=yes, have_lz4f=no) + ], [have_zstd=no]) + + AS_IF([test "x$have_lz4f" = "xyes"], [ +- if test "$ac_cv_lib_lz4_code" != "none required"; then +- LIBWANDIO_LIBS="$LIBWANDIO_LIBS -llz4" ++ if test "$ac_cv_search_LZ4F_createDecompressionContext" != "none required"; then ++ LIBWANDIO_LIBS="$LIBWANDIO_LIBS $ac_cv_search_LZ4F_createDecompressionContext" + fi + AC_DEFINE(HAVE_LIBLZ4F, 1, "Compiled with lz4 frame support") +- AC_CHECK_LIB(lz4, LZ4F_getVersion, have_lz4_173=yes, have_lz4_173=no) ++ AC_SEARCH_LIBS(LZ4F_getVersion, [lz4 lz4d], have_lz4_173=yes, have_lz4_173=no) ++ # AC_CHECK_LIB(lz4, LZ4F_getVersion, have_lz4_173=yes, have_lz4_173=no) + if test "x$have_lz4_173" = "xyes"; then + AC_DEFINE(HAVE_LIBLZ4_MOVABLE, 1, "If defined then liblz4 does NOT have the ERROR_srcPtr_wrong bug") + fi + with_lz4=frameapi], + [ + AC_DEFINE(HAVE_LIBLZ4F, 0, "Compiled with lz4 frame support") +- AC_CHECK_LIB(lz4, LZ4_decompress_safe_continue, have_lz4s=yes, have_lz4s=no) ++ AC_SEARCH_LIBS(LZ4_decompress_safe_continue, [lz4 lz4d], have_lz4s=yes, have_lz4s=no) ++ # AC_CHECK_LIB(lz4, LZ4_decompress_safe_continue, have_lz4s=yes, have_lz4s=no) + AS_IF([test "x$have_lz4s" = "xyes"], [ +- if test "$ac_cv_lib_lz4_code" != "none required"; then +- LIBWANDIO_LIBS="$LIBWANDIO_LIBS -llz4" ++ if test "$ac_cv_search_LZ4_decompress_safe_continue" != "none required"; then ++ LIBWANDIO_LIBS="$LIBWANDIO_LIBS $ac_cv_search_LZ4_decompress_safe_continue" + fi + AC_DEFINE(HAVE_LIBLZ4S, 1, "Compiled with lz4 stream support") + with_lz4=streamapi diff --git a/vcpkg/ports/libwandio/configure.patch b/vcpkg/ports/libwandio/configure.patch new file mode 100644 index 0000000..929662d --- /dev/null +++ b/vcpkg/ports/libwandio/configure.patch @@ -0,0 +1,14 @@ +diff --git a/configure.ac b/configure.ac +index e250c0c31..0465120ba 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -83,7 +83,7 @@ ADD_INCLS="" + ADD_LDFLAGS="$ADD_LDFLAGS -L\$(abs_top_srcdir)/lib" + LIBWANDIO_LIBS="" + +-CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wextra -DLT_BUILDING_DLL=1" ++CFLAGS="$CFLAGS -Wall -DLT_BUILDING_DLL=1 -DNOMINMAX" +-CXXFLAGS="$CXXFLAGS -Wall -DLT_BUILDING_DLL=1" ++CXXFLAGS="$CXXFLAGS -Wall -DLT_BUILDING_DLL=1 -DNOMINMAX" + + # Check for -fvisibility diff --git a/vcpkg/ports/libwandio/curl.patch b/vcpkg/ports/libwandio/curl.patch new file mode 100644 index 0000000..326700e --- /dev/null +++ b/vcpkg/ports/libwandio/curl.patch @@ -0,0 +1,22 @@ +diff --git a/configure.ac b/configure.ac +index 4579fbb3d..f6be008c8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -296,12 +304,14 @@ AC_ARG_WITH([http], + AS_IF([test "x$with_http" != "xno"], + [ + # we need curl_easy_pause which was added in 7.18.0 +- AC_CHECK_LIB(curl, curl_easy_pause, have_curl=yes, have_curl=no) ++ AC_SEARCH_LIBS(curl_easy_pause, [curl curl-d libcurl libcurl-d], have_curl=yes, have_curl=no, [-lCrypt32 -lWldap32 -lWs2_32 -ladvapi32]) ++ # AC_CHECK_LIB(curl, curl_easy_pause, have_curl=yes, have_curl=no) + ], [have_curl=no]) + + AS_IF([test "x$have_curl" = "xyes"], [ +- if test "$ac_cv_lib_curl_curl_easy_pause" != "none required"; then +- LIBWANDIO_LIBS="$LIBWANDIO_LIBS -lcurl" ++ if test "$ac_cv_search_curl_easy_pause" != "none required"; then ++ LIBWANDIO_LIBS="$LIBWANDIO_LIBS -lCrypt32 -lWldap32 -lWs2_32 -ladvapi32 $ac_cv_search_curl_easy_pause" ++ LIBS="$LIBS" + fi + AC_DEFINE(HAVE_HTTP, 1, "Compiled with http support") + with_http=yes], diff --git a/vcpkg/ports/libwandio/openssl.patch b/vcpkg/ports/libwandio/openssl.patch new file mode 100644 index 0000000..586cdfa --- /dev/null +++ b/vcpkg/ports/libwandio/openssl.patch @@ -0,0 +1,22 @@ +diff --git a/configure.ac b/configure.ac +index 4579fbb3d..f6be008c8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -296,12 +304,14 @@ AC_ARG_WITH([http], + AS_IF([test "x$with_http" != "xno"], + [ + # we need curl_easy_pause which was added in 7.18.0 +- AC_CHECK_LIB(curl, curl_easy_pause, have_curl=yes, have_curl=no) ++ AC_SEARCH_LIBS(curl_easy_pause, [curl curl-d], have_curl=yes, have_curl=no, [-lssl -lcrypto $ac_cv_search_pthread_create -ldl]) ++ # AC_CHECK_LIB(curl, curl_easy_pause, have_curl=yes, have_curl=no) + ], [have_curl=no]) + + AS_IF([test "x$have_curl" = "xyes"], [ +- if test "$ac_cv_lib_curl_curl_easy_pause" != "none required"; then +- LIBWANDIO_LIBS="$LIBWANDIO_LIBS -lcurl" ++ if test "$ac_cv_search_curl_easy_pause" != "none required"; then ++ LIBWANDIO_LIBS="$LIBWANDIO_LIBS $ac_cv_search_curl_easy_pause -lssl -lcrypto $ac_cv_search_pthread_create -ldl" ++ LIBS="$LIBS -lssl -lcrypto $ac_cv_search_pthread_create -ldl" + fi + AC_DEFINE(HAVE_HTTP, 1, "Compiled with http support") + with_http=yes], diff --git a/vcpkg/ports/libwandio/portfile.cmake b/vcpkg/ports/libwandio/portfile.cmake new file mode 100644 index 0000000..a03d5c7 --- /dev/null +++ b/vcpkg/ports/libwandio/portfile.cmake @@ -0,0 +1,36 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + set(PATCHES curl.patch) + #TODO: Still does not work. Requires proper "signal" support and "unistd" +else() + set(PATCHES openssl.patch) # needed if curl is using openssl +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO wanduow/wandio + REF 012b646e7ba7ab191a5a2206488adfac493fcdc6 + SHA512 e94a82038902c34933c4256f8bd4d7ef3f2cf32fea46f8e31a25df34cc90d3a275ff56d3bc9892aca0c85e6d875e696f96a836cc1444fe165db8364331e6e77d + HEAD_REF master + PATCHES configure.lib.patch # This is how configure.ac files with dependencies get fixed. + configure.patch + ${PATCHES} +) + +vcpkg_configure_make( + AUTOCONFIG + SOURCE_PATH ${SOURCE_PATH} + COPY_SOURCE +) +vcpkg_install_make() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libwebm/0001-fix-cmake.patch b/vcpkg/ports/libwebm/0001-fix-cmake.patch new file mode 100644 index 0000000..6cbbe1c --- /dev/null +++ b/vcpkg/ports/libwebm/0001-fix-cmake.patch @@ -0,0 +1,65 @@ +From 5bd18b68658c2ba66e358341c159b17d9ba18791 Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka +Date: Wed, 15 Mar 2017 00:01:24 +0300 +Subject: [PATCH] fix cmake + +- enable shared lib +- add install target +- set _CRT_SECURE_NO_WARNINGS +--- + CMakeLists.txt | 29 +++++++++++++++++++++++++++-- + 1 file changed, 27 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index bf99829..a7bf021 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,14 +5,21 @@ + ## tree. An additional intellectual property rights grant can be found + ## in the file PATENTS. All contributing project authors may + ## be found in the AUTHORS file in the root of the source tree. +-cmake_minimum_required(VERSION 2.8) ++cmake_minimum_required(VERSION 3.4) + project(LIBWEBM) ++ ++set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) ++ + include("${CMAKE_CURRENT_SOURCE_DIR}/build/msvc_runtime.cmake") + + set(LIBWEBM_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}") + ++if(MSVC) ++ add_definitions(-D_CRT_SECURE_NO_WARNINGS) ++endif() ++ + # Libwebm section. +-add_library(webm STATIC ++add_library(webm + "${LIBWEBM_SRC_DIR}/mkvmuxer.cpp" + "${LIBWEBM_SRC_DIR}/mkvmuxer.hpp" + "${LIBWEBM_SRC_DIR}/mkvmuxertypes.hpp" +@@ -62,3 +69,21 @@ add_executable(webm2pes + "${LIBWEBM_SRC_DIR}/webm2pes.cc" + "${LIBWEBM_SRC_DIR}/webm2pes.h") + target_link_libraries(webm2pes LINK_PUBLIC webm) ++ ++install( ++ TARGETS webm ++ RUNTIME DESTINATION bin ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib) ++ ++install( ++ FILES ++ "mkvmuxer.hpp" ++ "mkvmuxertypes.hpp" ++ "mkvmuxerutil.hpp" ++ "mkvparser.hpp" ++ "mkvreader.hpp" ++ "mkvwriter.hpp" ++ "webmids.hpp" ++ DESTINATION ++ "include/libwebm") +-- +2.11.0.windows.1 + diff --git a/vcpkg/ports/libwebm/CONTROL b/vcpkg/ports/libwebm/CONTROL new file mode 100644 index 0000000..c2d9d87 --- /dev/null +++ b/vcpkg/ports/libwebm/CONTROL @@ -0,0 +1,4 @@ +Source: libwebm +Version: 1.0.0.27-5 +Homepage: https://github.com/webmproject/libwebm +Description: WebM File Parser diff --git a/vcpkg/ports/libwebm/no-samples.patch b/vcpkg/ports/libwebm/no-samples.patch new file mode 100644 index 0000000..c160726 --- /dev/null +++ b/vcpkg/ports/libwebm/no-samples.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b48868f..f2fe35b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -41,6 +41,7 @@ endif(WIN32) + + include_directories("${LIBWEBM_SRC_DIR}") + ++if(BUILD_SAMPLES) + # Sample section. + add_executable(sample + "${LIBWEBM_SRC_DIR}/sample.cpp") +@@ -69,6 +70,7 @@ add_executable(webm2pes + "${LIBWEBM_SRC_DIR}/webm2pes.cc" + "${LIBWEBM_SRC_DIR}/webm2pes.h") + target_link_libraries(webm2pes LINK_PUBLIC webm) ++endif() + + install( + TARGETS webm diff --git a/vcpkg/ports/libwebm/portfile.cmake b/vcpkg/ports/libwebm/portfile.cmake new file mode 100644 index 0000000..024933e --- /dev/null +++ b/vcpkg/ports/libwebm/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO webmproject/libwebm + REF libwebm-1.0.0.27 + SHA512 15650b8b121b226654a5abed45a3586ddaf785dee8dac7c72df3f3f9aef76af4e561b75a2ef05328af8dfcfde21948b2edb59cd884dad08b8919cab4ee5a8596 + HEAD_REF master + PATCHES + 0001-fix-cmake.patch + no-samples.patch +) + +if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + set(LIBWEBM_CRT_LINKAGE -DMSVC_RUNTIME=dll) +else() + set(LIBWEBM_CRT_LINKAGE -DMSVC_RUNTIME=static) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${LIBWEBM_CRT_LINKAGE} + -DCMAKE_DEBUG_POSTFIX=d +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(COPY ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/libwebm) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libwebm/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/libwebm/copyright) diff --git a/vcpkg/ports/libwebp/0001-build.patch b/vcpkg/ports/libwebp/0001-build.patch new file mode 100644 index 0000000..e95468c --- /dev/null +++ b/vcpkg/ports/libwebp/0001-build.patch @@ -0,0 +1,46 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9503daacb..2fb9ef137 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -167,6 +167,9 @@ add_definitions(-DHAVE_CONFIG_H) + if(MSVC) + # avoid security warnings for e.g., fopen() used in the examples. + add_definitions(-D_CRT_SECURE_NO_WARNINGS) ++ if(BUILD_SHARED_LIBS) ++ add_definitions("-DWEBP_EXTERN=__declspec(dllexport)" "-DWEBP_DLL") ++ endif() + else() + add_definitions(-Wall) + endif() +@@ -420,9 +423,9 @@ if(WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP) + "${CMAKE_CURRENT_SOURCE_DIR}/src/webp/mux.h;\ + ${CMAKE_CURRENT_SOURCE_DIR}/src/webp/mux_types.h;\ + ${CMAKE_CURRENT_SOURCE_DIR}/src/webp/types.h;") +- set_target_properties(libwebpmux PROPERTIES OUTPUT_NAME webpmux) ++ set_target_properties(libwebpmux PROPERTIES OUTPUT_NAME $<$:lib>webpmux) + list(APPEND INSTALLED_LIBRARIES libwebpmux) + configure_pkg_config("src/mux/libwebpmux.pc") + endif() + + if(WEBP_BUILD_GIF2WEBP) +@@ -524,7 +528,11 @@ if(WEBP_BUILD_EXTRAS) + + # webp_quality + add_executable(webp_quality ${WEBP_QUALITY_SRCS} ${WEBP_EXTRAS_SRCS}) + target_link_libraries(webp_quality exampleutil imagedec) ++ if(BUILD_SHARED_LIBS) ++ target_link_libraries(webp_quality webpdspdecode) ++ endif() + target_include_directories(webp_quality + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ++ ${CMAKE_CURRENT_SOURCE_DIR}/src + ${CMAKE_CURRENT_BINARY_DIR}) +@@ -573,7 +573,7 @@ if(WEBP_BUILD_WEBP_JS) + "-s EXPORTED_FUNCTIONS='[\"_WebpToSDL\"]' -s INVOKE_RUN=0 \ + -s EXTRA_EXPORTED_RUNTIME_METHODS='[\"cwrap\"]'") + set_target_properties(webp_js PROPERTIES OUTPUT_NAME webp) +- target_compile_definitions(webp_js PUBLIC EMSCRIPTEN WEBP_HAVE_SDL) ++ target_compile_definitions(webp_js PUBLIC EMSCRIPTEN WEBP_HAVE_SDL WEBP_HAVE_JUST_SDL_H) + + # WASM version + add_executable(webp_wasm ${CMAKE_CURRENT_SOURCE_DIR}/extras/webp_to_sdl.c) diff --git a/vcpkg/ports/libwebp/0002-cmake-config-add-backwards-compatibility.patch b/vcpkg/ports/libwebp/0002-cmake-config-add-backwards-compatibility.patch new file mode 100644 index 0000000..2ed199e --- /dev/null +++ b/vcpkg/ports/libwebp/0002-cmake-config-add-backwards-compatibility.patch @@ -0,0 +1,69 @@ +diff --git a/cmake/WebPConfig.cmake.in b/cmake/WebPConfig.cmake.in +index bb22164..3ad256f 100644 +--- a/cmake/WebPConfig.cmake.in ++++ b/cmake/WebPConfig.cmake.in +@@ -4,8 +4,60 @@ set(WEBP_VERSION ${WebP_VERSION}) + @PACKAGE_INIT@ + + include ("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") ++include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) + +-set(WebP_INCLUDE_DIRS "webp") +-set(WEBP_INCLUDE_DIRS ${WebP_INCLUDE_DIRS}) +-set(WebP_LIBRARIES "@INSTALLED_LIBRARIES@") +-set(WEBP_LIBRARIES "${WebP_LIBRARIES}") ++find_path(WEBP_INCLUDE_DIR NAMES webp/types.h) ++set(WebP_INCLUDE_DIR ${WEBP_INCLUDE_DIR}) ++set(WebP_INCLUDE_DIRS ${WEBP_INCLUDE_DIR}) ++set(WEBP_INCLUDE_DIRS ${WEBP_INCLUDE_DIR}) ++ ++if(NOT WEBP_BASE_LIBRARY AND NOT WebP_BASE_LIBRARY) ++ find_library(WEBP_BASE_LIBRARY_RELEASE NAMES webp) ++ find_library(WEBP_BASE_LIBRARY_DEBUG NAMES webpd) ++ select_library_configurations(WEBP_BASE) ++ set(WebP_BASE_LIBRARY ${WEBP_BASE_LIBRARY}) ++ if(WEBP_BASE_LIBRARY) ++ list(APPEND WEBP_LIBRARIES "${WEBP_BASE_LIBRARY}") ++ list(APPEND WebP_LIBRARIES "${WebP_BASE_LIBRARY}") ++ endif() ++endif() ++ ++if(NOT WEBP_DECODER_LIBRARY AND NOT WebP_DECODER_LIBRARY) ++ find_library(WEBP_DECODER_LIBRARY_RELEASE NAMES webpdecoder) ++ find_library(WEBP_DECODER_LIBRARY_DEBUG NAMES webpdecoderd) ++ select_library_configurations(WEBP_DECODER) ++ set(WebP_DECODER_LIBRARY ${WEBP_DECODER_LIBRARY}) ++ if(WEBP_DECODER_LIBRARY) ++ list(APPEND WEBP_LIBRARIES "${WEBP_DECODER_LIBRARY}") ++ list(APPEND WebP_LIBRARIES "${WebP_DECODER_LIBRARY}") ++ endif() ++endif() ++ ++if(NOT WEBP_DEMUX_LIBRARY AND NOT WebP_DEMUX_LIBRARY) ++ find_library(WEBP_DEMUX_LIBRARY_RELEASE NAMES webpdemux) ++ find_library(WEBP_DEMUX_LIBRARY_DEBUG NAMES webpdemuxd) ++ select_library_configurations(WEBP_DEMUX) ++ set(WebP_DEMUX_LIBRARY ${WEBP_DEMUX_LIBRARY}) ++ if(WEBP_DEMUX_LIBRARY) ++ list(APPEND WEBP_LIBRARIES "${WEBP_DEMUX_LIBRARY}") ++ list(APPEND WebP_LIBRARIES "${WebP_DEMUX_LIBRARY}") ++ endif() ++endif() ++ ++if(NOT WEBP_MUX_LIBRARY AND NOT WebP_MUX_LIBRARY) ++ find_library(WEBP_MUX_LIBRARY_RELEASE NAMES libwebpmux) ++ find_library(WEBP_MUX_LIBRARY_DEBUG NAMES libwebpmuxd) ++ select_library_configurations(WEBP_MUX) ++ set(WebP_MUX_LIBRARY ${WEBP_MUX_LIBRARY}) ++ if(WEBP_MUX_LIBRARY) ++ list(APPEND WEBP_LIBRARIES "${WEBP_MUX_LIBRARY}") ++ list(APPEND WebP_LIBRARIES "${WebP_MUX_LIBRARY}") ++ endif() ++endif() ++ ++set(WEBP_LIBRARY ${WEBP_BASE_LIBRARY}) ++set(WebP_LIBRARY ${WebP_BASE_LIBRARY}) ++if(WEBP_BASE_LIBRARY AND WEBP_INCLUDE_DIR) ++ set(WEBP_FOUND 1) ++ set(WebP_FOUND 1) ++endif() diff --git a/vcpkg/ports/libwebp/0003-always-mux.patch b/vcpkg/ports/libwebp/0003-always-mux.patch new file mode 100644 index 0000000..1484bc8 --- /dev/null +++ b/vcpkg/ports/libwebp/0003-always-mux.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6f6c8eca2..00366ae53 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -405,7 +405,7 @@ if(WEBP_BUILD_CWEBP) + install(TARGETS cwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + endif() + +-if(WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP) ++if(WEBP_BUILD_GIF2WEBP OR WEBP_BUILD_IMG2WEBP OR TRUE) + parse_makefile_am(${CMAKE_CURRENT_SOURCE_DIR}/src/mux "WEBP_MUX_SRCS" "") + add_library(libwebpmux ${WEBP_MUX_SRCS}) + target_link_libraries(libwebpmux webp) diff --git a/vcpkg/ports/libwebp/0004-add-missing-linked-library.patch b/vcpkg/ports/libwebp/0004-add-missing-linked-library.patch new file mode 100644 index 0000000..6cbb394 --- /dev/null +++ b/vcpkg/ports/libwebp/0004-add-missing-linked-library.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a98540c..a3697cb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -479,6 +479,10 @@ if(WEBP_BUILD_VWEBP) + PRIVATE ${GLUT_INCLUDE_DIR} + ${CMAKE_CURRENT_BINARY_DIR}/src + ${OPENGL_INCLUDE_DIR}) ++ if(UNIX AND NOT(ANDROID OR BLACKBERRY OR APPLE)) ++ find_package(X11 REQUIRED) ++ target_link_libraries(vwebp ${X11_LIBRARIES} ${X11_Xxf86vm_LIB}) ++ endif() + install(TARGETS vwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + check_c_compiler_flag("-Wno-deprecated-declarations" HAS_NO_DEPRECATED) diff --git a/vcpkg/ports/libwebp/0006-fix-dependecies-platform.patch b/vcpkg/ports/libwebp/0006-fix-dependecies-platform.patch new file mode 100644 index 0000000..819c1f9 --- /dev/null +++ b/vcpkg/ports/libwebp/0006-fix-dependecies-platform.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 83edb3a..f634094 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -540,7 +540,11 @@ if(WEBP_BUILD_EXTRAS) + find_package(SDL) + if(SDL_FOUND) + add_executable(vwebp_sdl ${VWEBP_SDL_SRCS}) +- target_link_libraries(vwebp_sdl ${SDL_LIBRARY} imageioutil webp) ++ target_link_libraries(vwebp_sdl ${SDL_LIBRARY} imageioutil webp) ++ if (MSVC) ++ target_link_libraries(vwebp_sdl dxguid winmm) ++ endif() ++ target_compile_definitions(vwebp_sdl PRIVATE WEBP_HAVE_JUST_SDL_H) + target_include_directories(vwebp_sdl + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/src diff --git a/vcpkg/ports/libwebp/0007-fix-arm-build.patch b/vcpkg/ports/libwebp/0007-fix-arm-build.patch new file mode 100644 index 0000000..aae5e39 --- /dev/null +++ b/vcpkg/ports/libwebp/0007-fix-arm-build.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/cpu.cmake b/cmake/cpu.cmake +index da9a42a4..ce7a69f3 100644 +--- a/cmake/cpu.cmake ++++ b/cmake/cpu.cmake +@@ -73,7 +73,7 @@ foreach(I_SIMD RANGE ${WEBP_SIMD_FLAGS_RANGE}) + set(CMAKE_REQUIRED_FLAGS ${SIMD_COMPILE_FLAG}) + webp_check_compiler_flag(${WEBP_SIMD_FLAG} ${WEBP_ENABLE_SIMD}) + else() +- if(MSVC) ++ if(MSVC AND NOT (CMAKE_GENERATOR_PLATFORM MATCHES "^ARM")) + list(GET SIMD_ENABLE_FLAGS ${I_SIMD} SIMD_COMPILE_FLAG) + else() + set(SIMD_COMPILE_FLAG " ") diff --git a/vcpkg/ports/libwebp/0008-sdl.patch b/vcpkg/ports/libwebp/0008-sdl.patch new file mode 100644 index 0000000..7f3363f --- /dev/null +++ b/vcpkg/ports/libwebp/0008-sdl.patch @@ -0,0 +1,36 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7b0d2fa55..efd10887b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -563,10 +563,11 @@ if(WEBP_BUILD_EXTRAS) + endif() + + if(WEBP_BUILD_WEBP_JS) ++ find_package(SDL REQUIRED) + # JavaScript version + add_executable(webp_js ${CMAKE_CURRENT_SOURCE_DIR}/extras/webp_to_sdl.c) +- target_link_libraries(webp_js webpdecoder SDL) +- target_include_directories(webp_js PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) ++ target_link_libraries(webp_js webpdecoder ${SDL_LIBRARY}) ++ target_include_directories(webp_js PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${SDL_INCLUDE_DIR}) + set(WEBP_HAVE_SDL 1) + set_target_properties( + webp_js +@@ -578,14 +579,14 @@ if(WEBP_BUILD_WEBP_JS) + + # WASM version + add_executable(webp_wasm ${CMAKE_CURRENT_SOURCE_DIR}/extras/webp_to_sdl.c) +- target_link_libraries(webp_wasm webpdecoder SDL) +- target_include_directories(webp_wasm PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) ++ target_link_libraries(webp_wasm webpdecoder ${SDL_LIBRARY}) ++ target_include_directories(webp_wasm PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${SDL_INCLUDE_DIR}) + set_target_properties( + webp_wasm + PROPERTIES LINK_FLAGS "-s WASM=1 \ + -s EXPORTED_FUNCTIONS='[\"_WebpToSDL\"]' -s INVOKE_RUN=0 \ + -s EXTRA_EXPORTED_RUNTIME_METHODS='[\"cwrap\"]'") +- target_compile_definitions(webp_wasm PUBLIC EMSCRIPTEN WEBP_HAVE_SDL) ++ target_compile_definitions(webp_wasm PUBLIC EMSCRIPTEN WEBP_HAVE_SDL WEBP_HAVE_JUST_SDL_H) + + target_compile_definitions(webpdspdecode PUBLIC EMSCRIPTEN) + endif() diff --git a/vcpkg/ports/libwebp/0009-glut.patch b/vcpkg/ports/libwebp/0009-glut.patch new file mode 100644 index 0000000..e1bf267 --- /dev/null +++ b/vcpkg/ports/libwebp/0009-glut.patch @@ -0,0 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index efd10887b..8b41cc1ba 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -470,7 +470,7 @@ if(WEBP_BUILD_VWEBP) + target_link_libraries(vwebp + ${OPENGL_LIBRARIES} + exampleutil +- ${GLUT_glut_LIBRARY} ++ GLUT::GLUT + imageioutil + webp + webpdemux) +@@ -481,6 +481,9 @@ if(WEBP_BUILD_VWEBP) + if(UNIX AND NOT(ANDROID OR BLACKBERRY OR APPLE)) + find_package(X11 REQUIRED) + target_link_libraries(vwebp ${X11_LIBRARIES} ${X11_Xxf86vm_LIB}) ++ if(X11_Xrandr_FOUND) # due to glut linking xrandr if found ++ target_link_libraries(vwebp ${X11_Xrandr_LIB}) ++ endif() + endif() + install(TARGETS vwebp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") diff --git a/vcpkg/ports/libwebp/CONTROL b/vcpkg/ports/libwebp/CONTROL new file mode 100644 index 0000000..a96f6c4 --- /dev/null +++ b/vcpkg/ports/libwebp/CONTROL @@ -0,0 +1,59 @@ +Source: libwebp +Version: 1.1.0 +Port-Version: 1 +Homepage: https://github.com/webmproject/libwebp +Description: WebP codec: library to encode and decode images in WebP format +Default-Features: simd, nearlossless +Build-Depends: libwebp[unicode] (windows) + +Feature: anim +Description: Build animation utilities. +Build-Depends: libwebp[mux, img2webp] + +Feature: gif2webp +Description: Build the gif2webp conversion tool. +Build-Depends: giflib + +Feature: img2webp +Description: Build the img2webp animation tool. +Build-Depends: libjpeg-turbo, libpng, tiff + +Feature: vwebp +Description: Build the vwebp viewer tool. +Build-Depends: opengl, freeglut (!osx) + +Feature: vwebp-sdl +Description: Build the vwebp viewer tool. +Build-Depends: libwebp[vwebp], sdl1 (windows) + +Feature: info +Description: Build the webpinfo command line tool. + +Feature: mux +Description: Build the webpmux command line tool. + +Feature: extras +Description: Build extras. +Build-Depends: sdl1 (windows), libwebp[vwebp] + +Feature: nearlossless +Description: Enable near-lossless encoding + +Feature: unicode +Description: Build Unicode executables. (Adds definition UNICODE and _UNICODE) + +Feature: simd +Description: Enable any SIMD optimization. + +Feature: cwebp +Description: Build the cwebp command line tool. + +Feature: dwebp +Description: Build the dwebp command line tool. + +Feature: swap16bitcsp +Description: Enable byte swap for 16 bit colorspaces. + +Feature: all +Description: enable all features except for swap16bitcsp +Build-Depends: libwebp[anim, gif2webp, img2webp, info, mux, nearlossless, simd, cwebp, dwebp], libwebp[vwebp-sdl] (!osx), libwebp[extras] (!osx) diff --git a/vcpkg/ports/libwebp/portfile.cmake b/vcpkg/ports/libwebp/portfile.cmake new file mode 100644 index 0000000..9bea70a --- /dev/null +++ b/vcpkg/ports/libwebp/portfile.cmake @@ -0,0 +1,89 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO webmproject/libwebp + REF d7844e9762b61c9638c263657bd49e1690184832 # v1.1.0 + SHA512 13692970e7dd909cd6aaa03c9a0c863243baac1885644794362dec0c0b0721d6807f281f746215bfd856c6e0cb742b01a731a33fe075a32ff24496e10c1a94b4 + HEAD_REF master + PATCHES + 0001-build.patch + 0002-cmake-config-add-backwards-compatibility.patch + 0003-always-mux.patch #always build libwebpmux + 0004-add-missing-linked-library.patch + 0006-fix-dependecies-platform.patch + 0007-fix-arm-build.patch + 0008-sdl.patch + 0009-glut.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + anim WEBP_BUILD_ANIM_UTILS + gif2webp WEBP_BUILD_GIF2WEBP + img2webp WEBP_BUILD_IMG2WEBP + vwebp WEBP_BUILD_VWEBP + vwebp-sdl WEBP_HAVE_SDL + info WEBP_BUILD_WEBPINFO + mux WEBP_BUILD_WEBPMUX + extras WEBP_BUILD_EXTRAS + nearlossless WEBP_NEAR_LOSSLESS + simd WEBP_ENABLE_SIMD + cwebp WEBP_BUILD_CWEBP + dwebp WEBP_BUILD_DWEBP + swap16bitcsp WEBP_ENABLE_SWAP_16BIT_CSP + unicode WEBP_UNICODE +) + + +if(VCPKG_TARGET_IS_LINUX) + message("WebP currently requires the following library from the system package manager:\n Xxf86vm\n\nThis can be installed on Ubuntu systems via apt-get install libxxf86vm-dev") +endif() + +if(VCPKG_TARGET_IS_OSX) + if("vwebp" IN_LIST FEATURES OR "extras" IN_LIST FEATURES) + message(FATAL_ERROR "Due to GLUT Framework problems with CMake, at the moment it's not possible to build VWebP or extras on Mac!") + endif() +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + OPTIONS_DEBUG + -DCMAKE_DEBUG_POSTFIX=d +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/WebP/cmake TARGET_PATH share/WebP) # find_package is called with WebP not libwebp +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + + +set(BIN_NAMES get_disto gif2webp img2webp vwebp vwebp_sdl webpinfo webpmux webp_quality cwebp dwebp) +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/webp/") +foreach(tool ${BIN_NAMES}) + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + endif() + + if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + file(RENAME "${CURRENT_PACKAGES_DIR}/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}" "${CURRENT_PACKAGES_DIR}/tools/webp/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + endif() +endforeach() +vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/webp") + +#No tools +file(GLOB_RECURSE RESULT "${CURRENT_PACKAGES_DIR}/tools/") +list(LENGTH RESULT RES_LEN) +if(RES_LEN EQUAL 0) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/tools/") +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/vcpkg/ports/libwebsockets/CMakeLists.patch b/vcpkg/ports/libwebsockets/CMakeLists.patch new file mode 100644 index 0000000..1c63d25 --- /dev/null +++ b/vcpkg/ports/libwebsockets/CMakeLists.patch @@ -0,0 +1,13 @@ +diff --git a/lib/event-libs/libuv/CMakeLists.txt b/lib/event-libs/libuv/CMakeLists.txt +index fb810a8..2258ade 100644 +--- a/lib/event-libs/libuv/CMakeLists.txt ++++ b/lib/event-libs/libuv/CMakeLists.txt +@@ -36,7 +36,7 @@ set(LWS_LIBUV_INCLUDE_DIRS CACHE PATH "Path to the libuv include directory") + if ("${LWS_LIBUV_LIBRARIES}" STREQUAL "" OR "${LWS_LIBUV_INCLUDE_DIRS}" STREQUAL "") + if (NOT LIBUV_FOUND) + find_path(LIBUV_INCLUDE_DIRS NAMES uv.h) +- find_library(LIBUV_LIBRARIES NAMES uv) ++ find_library(LIBUV_LIBRARIES NAMES uv libuv) + endif() + else() + set(LIBUV_LIBRARIES ${LWS_LIBUV_LIBRARIES}) diff --git a/vcpkg/ports/libwebsockets/CONTROL b/vcpkg/ports/libwebsockets/CONTROL new file mode 100644 index 0000000..01bf576 --- /dev/null +++ b/vcpkg/ports/libwebsockets/CONTROL @@ -0,0 +1,6 @@ +Source: libwebsockets +Version: 4.1.2 +Build-Depends: zlib, openssl, libuv, pthreads (windows) +Homepage: https://github.com/warmcat/libwebsockets +Description: Libwebsockets is a lightweight pure C library built to use minimal CPU and memory resources, and provide fast throughput in both directions as client or server. +Supports: !(arm|uwp) \ No newline at end of file diff --git a/vcpkg/ports/libwebsockets/fix-build-error.patch b/vcpkg/ports/libwebsockets/fix-build-error.patch new file mode 100644 index 0000000..0bab319 --- /dev/null +++ b/vcpkg/ports/libwebsockets/fix-build-error.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1e737e5..75534c1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -422,6 +422,11 @@ set(LWS_LIBMOUNT_LIBRARIES CACHE PATH "Path to the libmount library") + set(LWS_EXT_PTHREAD_INCLUDE_DIR CACHE PATH "Path to an external pthreads include directory") + set(LWS_EXT_PTHREAD_LIBRARIES CACHE PATH "Path to an external pthreads library") + ++if(WIN32) ++ find_package(pthreads_windows REQUIRED) ++ set(LWS_EXT_PTHREAD_INCLUDE_DIR ${PThreads4W_INCLUDE_DIR}) ++ set(LWS_EXT_PTHREAD_LIBRARIES ${PThreads4W_LIBRARY}) ++endif() + + if (LWS_WITH_HTTP_STREAM_COMPRESSION) + set(LWS_WITH_ZLIB 1) +@@ -728,7 +733,7 @@ if (MSVC) + # Turn off pointless microsoft security warnings. + add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE) + # Fail the build if any warnings +- add_compile_options(/W3 /WX) ++ add_compile_options(/W3 /WX /wd4142 /wd4267) + endif(MSVC) + + if (MINGW) diff --git a/vcpkg/ports/libwebsockets/portfile.cmake b/vcpkg/ports/libwebsockets/portfile.cmake new file mode 100644 index 0000000..1d0ed31 --- /dev/null +++ b/vcpkg/ports/libwebsockets/portfile.cmake @@ -0,0 +1,177 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO warmcat/libwebsockets + REF 64232ddc4cf67ccc75683a42a322e596b3611069 # v4.1.2 + SHA512 199f25b969860a436cee5d1dd210ccde0ad7aaf4836c24aa4a5d0252bb13a61b12d96529e6ebf45dc78f4ec9ade11a324a0f2de51991e9e66045b57348ce6eec + HEAD_REF master + PATCHES + CMakeLists.patch + fix-build-error.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" LWS_WITH_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" LWS_WITH_SHARED) + +## All LWS options could be possible features: +# # +# # Major individual features +# # +# option(LWS_WITH_NETWORK "Compile with network-related code" ON) +# option(LWS_ROLE_H1 "Compile with support for http/1 (needed for ws)" ON) +# option(LWS_ROLE_WS "Compile with support for websockets" ON) +# option(LWS_ROLE_DBUS "Compile with support for DBUS" OFF) +# option(LWS_ROLE_RAW_PROXY "Raw packet proxy" OFF) +# option(LWS_WITH_HTTP2 "Compile with server support for HTTP/2" ON) +# option(LWS_WITH_LWSWS "Libwebsockets Webserver" OFF) +# option(LWS_WITH_CGI "Include CGI (spawn process with network-connected stdin/out/err) APIs" OFF) +# option(LWS_IPV6 "Compile with support for ipv6" OFF) +# option(LWS_UNIX_SOCK "Compile with support for UNIX domain socket" OFF) +# option(LWS_WITH_PLUGINS "Support plugins for protocols and extensions" OFF) +# option(LWS_WITH_HTTP_PROXY "Support for HTTP proxying" OFF) +# option(LWS_WITH_ZIP_FOPS "Support serving pre-zipped files" OFF) +# option(LWS_WITH_SOCKS5 "Allow use of SOCKS5 proxy on client connections" OFF) +# option(LWS_WITH_GENERIC_SESSIONS "With the Generic Sessions plugin" OFF) +# option(LWS_WITH_PEER_LIMITS "Track peers and restrict resources a single peer can allocate" OFF) +# option(LWS_WITH_ACCESS_LOG "Support generating Apache-compatible access logs" OFF) +# option(LWS_WITH_RANGES "Support http ranges (RFC7233)" OFF) +# option(LWS_WITH_SERVER_STATUS "Support json + jscript server monitoring" OFF) +# option(LWS_WITH_THREADPOOL "Managed worker thread pool support (relies on pthreads)" OFF) +# option(LWS_WITH_HTTP_STREAM_COMPRESSION "Support HTTP stream compression" OFF) +# option(LWS_WITH_HTTP_BROTLI "Also offer brotli http stream compression (requires LWS_WITH_HTTP_STREAM_COMPRESSION)" OFF) +# option(LWS_WITH_ACME "Enable support for ACME automatic cert acquisition + maintenance (letsencrypt etc)" OFF) +# option(LWS_WITH_HUBBUB "Enable libhubbub rewriting support" OFF) +# option(LWS_WITH_FTS "Full Text Search support" OFF) +# # +# # TLS library options... all except mbedTLS are basically OpenSSL variants. +# # +# option(LWS_WITH_SSL "Include SSL support (defaults to OpenSSL or similar, mbedTLS if LWS_WITH_MBEDTLS is set)" ON) +# option(LWS_WITH_MBEDTLS "Use mbedTLS (>=2.0) replacement for OpenSSL. When setting this, you also may need to specify LWS_MBEDTLS_LIBRARIES and LWS_MBEDTLS_INCLUDE_DIRS" OFF) +# option(LWS_WITH_BORINGSSL "Use BoringSSL replacement for OpenSSL" OFF) +# option(LWS_WITH_CYASSL "Use CyaSSL replacement for OpenSSL. When setting this, you also need to specify LWS_CYASSL_LIBRARIES and LWS_CYASSL_INCLUDE_DIRS" OFF) +# option(LWS_WITH_WOLFSSL "Use wolfSSL replacement for OpenSSL. When setting this, you also need to specify LWS_WOLFSSL_LIBRARIES and LWS_WOLFSSL_INCLUDE_DIRS" OFF) +# option(LWS_SSL_CLIENT_USE_OS_CA_CERTS "SSL support should make use of the OS-installed CA root certs" ON) +# # +# # Event library options (may select multiple, or none for default poll() +# # +# option(LWS_WITH_LIBEV "Compile with support for libev" OFF) +# option(LWS_WITH_LIBUV "Compile with support for libuv" OFF) +# option(LWS_WITH_LIBEVENT "Compile with support for libevent" OFF) +# # +# # Static / Dynamic build options +# # +# option(LWS_WITH_STATIC "Build the static version of the library" ON) +# option(LWS_WITH_SHARED "Build the shared version of the library" ON) +# option(LWS_LINK_TESTAPPS_DYNAMIC "Link the test apps to the shared version of the library. Default is to link statically" OFF) +# option(LWS_STATIC_PIC "Build the static version of the library with position-independent code" OFF) +# # +# # Specific platforms +# # +# option(LWS_WITH_ESP32 "Build for ESP32" OFF) +# option(LWS_WITH_ESP32_HELPER "Build ESP32 helper" OFF) +# option(LWS_PLAT_OPTEE "Build for OPTEE" OFF) +# # +# # Client / Server / Test Apps build control +# # +# option(LWS_WITHOUT_CLIENT "Don't build the client part of the library" OFF) +# option(LWS_WITHOUT_SERVER "Don't build the server part of the library" OFF) +# option(LWS_WITHOUT_TESTAPPS "Don't build the libwebsocket-test-apps" OFF) +# option(LWS_WITHOUT_TEST_SERVER "Don't build the test server" OFF) +# option(LWS_WITHOUT_TEST_SERVER_EXTPOLL "Don't build the test server version that uses external poll" OFF) +# option(LWS_WITHOUT_TEST_PING "Don't build the ping test application" OFF) +# option(LWS_WITHOUT_TEST_CLIENT "Don't build the client test application" OFF) +# # +# # Extensions (permessage-deflate) +# # +# option(LWS_WITHOUT_EXTENSIONS "Don't compile with extensions" ON) +# # +# # Helpers + misc +# # +# option(LWS_WITHOUT_BUILTIN_GETIFADDRS "Don't use the BSD getifaddrs implementation from libwebsockets if it is missing (this will result in a compilation error) ... The default is to assume that your libc provides it. On some systems such as uclibc it doesn't exist." OFF) +# option(LWS_FALLBACK_GETHOSTBYNAME "Also try to do dns resolution using gethostbyname if getaddrinfo fails" OFF) +# option(LWS_WITHOUT_BUILTIN_SHA1 "Don't build the lws sha-1 (eg, because openssl will provide it" OFF) +# option(LWS_WITH_LATENCY "Build latency measuring code into the library" OFF) +# option(LWS_WITHOUT_DAEMONIZE "Don't build the daemonization api" ON) +# option(LWS_SSL_SERVER_WITH_ECDH_CERT "Include SSL server use ECDH certificate" OFF) +# option(LWS_WITH_LEJP "With the Lightweight JSON Parser" ON) +# option(LWS_WITH_SQLITE3 "Require SQLITE3 support" OFF) +# option(LWS_WITH_STRUCT_JSON "Generic struct serialization to and from JSON" ON) +# option(LWS_WITH_STRUCT_SQLITE3 "Generic struct serialization to and from SQLITE3" OFF) +# option(LWS_WITH_SMTP "Provide SMTP support" OFF) +# if (WIN32 OR LWS_WITH_ESP32) +# option(LWS_WITH_DIR "Directory scanning api support" OFF) +# option(LWS_WITH_LEJP_CONF "With LEJP configuration parser as used by lwsws" OFF) +# else() +# option(LWS_WITH_DIR "Directory scanning api support" ON) +# option(LWS_WITH_LEJP_CONF "With LEJP configuration parser as used by lwsws" ON) +# endif() +# option(LWS_WITH_NO_LOGS "Disable all logging from being compiled in" OFF) +# option(LWS_AVOID_SIGPIPE_IGN "Android 7+ reportedly needs this" OFF) +# option(LWS_WITH_STATS "Keep statistics of lws internal operations" OFF) +# option(LWS_WITH_JOSE "JSON Web Signature / Encryption / Keys (RFC7515/6/) API" OFF) +# option(LWS_WITH_GENCRYPTO "Enable support for Generic Crypto apis independent of TLS backend" OFF) +# option(LWS_WITH_SELFTESTS "Selftests run at context creation" OFF) +# option(LWS_WITH_GCOV "Build with gcc gcov coverage instrumentation" OFF) +# option(LWS_WITH_EXPORT_LWSTARGETS "Export libwebsockets CMake targets. Disable if they conflict with an outer cmake project." ON) +# option(LWS_REPRODUCIBLE "Build libwebsockets reproducible. It removes the build user and hostname from the build" ON) +# option(LWS_WITH_MINIMAL_EXAMPLES "Also build the normally standalone minimal examples, for QA" OFF) +# option(LWS_WITH_LWSAC "lwsac Chunk Allocation api" ON) +# option(LWS_WITH_CUSTOM_HEADERS "Store and allow querying custom HTTP headers (H1 only)" ON) +# option(LWS_WITH_DISKCACHE "Hashed cache directory with lazy LRU deletion to size limit" OFF) +# option(LWS_WITH_ASAN "Build with gcc runtime sanitizer options enabled (needs libasan)" OFF) +# option(LWS_WITH_DIR "Directory scanning api support" OFF) +# option(LWS_WITH_LEJP_CONF "With LEJP configuration parser as used by lwsws" OFF) +# option(LWS_WITH_ZLIB "Include zlib support (required for extensions)" OFF) +# option(LWS_WITH_BUNDLED_ZLIB "Use bundled zlib version (Windows only)" ${LWS_WITH_BUNDLED_ZLIB_DEFAULT}) +# option(LWS_WITH_MINIZ "Use miniz instead of zlib" OFF) +# option(LWS_WITH_DEPRECATED_LWS_DLL "Migrate to lws_dll2 instead ASAP" OFF) +# option(LWS_WITH_SEQUENCER "lws_seq_t support" ON) +# option(LWS_WITH_EXTERNAL_POLL "Support external POLL integration using callback messages (not recommended)" OFF) +# option(LWS_WITH_LWS_DSH "Support lws_dsh_t Disordered Shared Heap" OFF) +## + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DLWS_WITH_STATIC=${LWS_WITH_STATIC} + -DLWS_WITH_SHARED=${LWS_WITH_SHARED} + -DLWS_WITH_BUNDLED_ZLIB=OFF + -DLWS_WITHOUT_TESTAPPS=ON + -DLWS_IPV6=ON + -DLWS_WITH_HTTP2=ON + -DLWS_WITH_HTTP_STREAM_COMPRESSION=ON # Since zlib is already a dependency + -DLWS_WITH_LIBUV=ON + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 +) + +vcpkg_install_cmake() + +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libwebsockets) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/libwebsockets-test-server) +file(READ ${CURRENT_PACKAGES_DIR}/share/libwebsockets/libwebsockets-config.cmake LIBWEBSOCKETSCONFIG_CMAKE) +string(REPLACE "/../include" "/../../include" LIBWEBSOCKETSCONFIG_CMAKE "${LIBWEBSOCKETSCONFIG_CMAKE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/libwebsockets/libwebsockets-config.cmake "${LIBWEBSOCKETSCONFIG_CMAKE}") +file(READ ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-debug.cmake LIBWEBSOCKETSTARGETSDEBUG_CMAKE) +string(REPLACE "websockets_static.lib" "websockets.lib" LIBWEBSOCKETSTARGETSDEBUG_CMAKE "${LIBWEBSOCKETSTARGETSDEBUG_CMAKE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-debug.cmake "${LIBWEBSOCKETSTARGETSDEBUG_CMAKE}") +file(READ ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-release.cmake LIBWEBSOCKETSTARGETSRELEASE_CMAKE) +string(REPLACE "websockets_static.lib" "websockets.lib" LIBWEBSOCKETSTARGETSRELEASE_CMAKE "${LIBWEBSOCKETSTARGETSRELEASE_CMAKE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/libwebsockets/LibwebsocketsTargets-release.cmake "${LIBWEBSOCKETSTARGETSRELEASE_CMAKE}") +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + if (VCPKG_TARGET_IS_WINDOWS) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/websockets_static.lib ${CURRENT_PACKAGES_DIR}/debug/lib/websockets.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/websockets_static.lib ${CURRENT_PACKAGES_DIR}/lib/websockets.lib) + endif() +endif () +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/libxdiff/CONTROL b/vcpkg/ports/libxdiff/CONTROL new file mode 100644 index 0000000..81db30f --- /dev/null +++ b/vcpkg/ports/libxdiff/CONTROL @@ -0,0 +1,5 @@ +Source: libxdiff +Version: 0.23 +Homepage: https://github.com/Drako/libxdiff +Description: The LibXDiff library implements basic and yet complete functionalities to create file differences/patches to both binary and text files. The library uses memory files as file abstraction to achieve both performance and portability. +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/libxdiff/portfile.cmake b/vcpkg/ports/libxdiff/portfile.cmake new file mode 100644 index 0000000..05b7ade --- /dev/null +++ b/vcpkg/ports/libxdiff/portfile.cmake @@ -0,0 +1,45 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports being built for desktop" ON_TARGET "UWP") + +set(LIBXDIFF_REF 77e30f3190685efd87cce2c9c5d688cbaa1b0134) +set(LIBXDIFF_SHA512 c559b575e6d6f06f3b3064f3e077a15d8f57422340199215a4cbd7beab527bc250347c8779a8d6f8c4e41799a032431e83c7336f86569527ab754444455b8c87) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" KEYSTONE_BUILD_SHARED) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Drako/libxdiff + REF ${LIBXDIFF_REF} + SHA512 ${LIBXDIFF_SHA512} + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBUILD_SHARED=${KEYSTONE_BUILD_SHARED} +) + +vcpkg_install_cmake() + +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/xdiff.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/xdiff.dll") + endif() +endif() + + +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release) + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/xdiff.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/xdiff.dll") + endif() +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/XDiff TARGET_PATH share/XDiff) diff --git a/vcpkg/ports/libxlsxwriter/CONTROL b/vcpkg/ports/libxlsxwriter/CONTROL new file mode 100644 index 0000000..2cd6384 --- /dev/null +++ b/vcpkg/ports/libxlsxwriter/CONTROL @@ -0,0 +1,5 @@ +Source: libxlsxwriter +Version: 0.9.4 +Description: Libxlsxwriter is a C library that can be used to write text, numbers, formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file. +Homepage: https://github.com/jmcnamara/libxlsxwriter +Build-Depends: zlib diff --git a/vcpkg/ports/libxlsxwriter/portfile.cmake b/vcpkg/ports/libxlsxwriter/portfile.cmake new file mode 100644 index 0000000..c19db94 --- /dev/null +++ b/vcpkg/ports/libxlsxwriter/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jmcnamara/libxlsxwriter + REF RELEASE_0.9.4 + SHA512 d7bc319e6b9cd2ad6aaa2f3eb6fdce1c5bcc1d5af23ffb3413e29760191f6aed41f836aaa71a322efe7966f3753a6d8a01cb0b403d682b13a6a3734a87cc12ba + HEAD_REF master +) + +if (VCPKG_TARGET_IS_UWP) + set(USE_WINDOWSSTORE ON) +else() + set(USE_WINDOWSSTORE OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DWINDOWSSTORE=${USE_WINDOWSSTORE} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libxml2/CMakeLists.txt b/vcpkg/ports/libxml2/CMakeLists.txt new file mode 100644 index 0000000..69fc246 --- /dev/null +++ b/vcpkg/ports/libxml2/CMakeLists.txt @@ -0,0 +1,152 @@ +cmake_minimum_required(VERSION 3.8) +project(libxml2 C) + +option(INSTALL_HEADERS "Install public header files" ON) + +set(CMAKE_SHARED_LIBRARY_PREFIX) +set(CMAKE_STATIC_LIBRARY_PREFIX) + +find_package(ZLIB REQUIRED) +find_package(LibLZMA REQUIRED) +find_package(unofficial-iconv REQUIRED) + +file(GLOB SOURCES *.c) +list(FILTER SOURCES EXCLUDE REGEX "/(run|test|trio)[^/]*$") +list(FILTER SOURCES EXCLUDE REGEX "xml(lint|catalog).c$") +list(FILTER SOURCES EXCLUDE REGEX "rngparser\.c$") + +# Generate xmlexports with fixed definition of LIBXML_STATIC +file(READ include/libxml/xmlexports.h XMLEXPORTS_H) +if(BUILD_SHARED_LIBS) + string(REPLACE "!defined(LIBXML_STATIC)" "1" XMLEXPORTS_H "${XMLEXPORTS_H}") +else() + string(REPLACE "!defined(LIBXML_STATIC)" "0" XMLEXPORTS_H "${XMLEXPORTS_H}") +endif() +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/xmlexports.h "${XMLEXPORTS_H}") + +if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + configure_file(include/win32config.h config.h COPYONLY) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + configure_file("${PORT_DIR}/config.osx.h" config.h COPYONLY) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") + configure_file("${PORT_DIR}/config.linux.h" config.h COPYONLY) +else() + message(FATAL_ERROR "No config.h checked in for the target platform. Please run ./configure for libxml2 and add the resulting config.h into this port.") +endif() + +message(STATUS "Reading version info from configure.ac") + +file(STRINGS "configure.ac" + _libxml_version_defines REGEX "LIBXML_(MAJOR|MINOR|MICRO)_VERSION=([0-9]+)$") + +foreach(ver ${_libxml_version_defines}) + if(ver MATCHES "LIBXML_(MAJOR|MINOR|MICRO)_VERSION=([0-9]+)$") + set(LIBXML_${CMAKE_MATCH_1}_VERSION "${CMAKE_MATCH_2}" CACHE INTERNAL "") + endif() +endforeach() + +set(VERSION ${LIBXML_MAJOR_VERSION}.${LIBXML_MINOR_VERSION}.${LIBXML_MICRO_VERSION}) +math(EXPR LIBXML_VERSION_NUMBER + "${LIBXML_MAJOR_VERSION} * 10000 + ${LIBXML_MINOR_VERSION} * 100 + ${LIBXML_MICRO_VERSION}") + +message(STATUS "LIBXML_MAJOR_VERSION: ${LIBXML_MAJOR_VERSION}") +message(STATUS "LIBXML_MINOR_VERSION: ${LIBXML_MINOR_VERSION}") +message(STATUS "LIBXML_MICRO_VERSION: ${LIBXML_MICRO_VERSION}") +message(STATUS "VERSION: ${VERSION}") +message(STATUS "LIBXML_VERSION_NUMBER: ${LIBXML_VERSION_NUMBER}") + +set(WITH_TRIO 0) +set(WITH_THREADS 1) +set(WITH_THREAD_ALLOC 0) +set(WITH_TREE 1) +set(WITH_OUTPUT 1) +set(WITH_PUSH 1) +set(WITH_READER 1) +set(WITH_PATTERN 1) +set(WITH_WRITER 1) +set(WITH_SAX1 1) +set(WITH_FTP 1) +set(WITH_HTTP 1) +set(WITH_VALID 1) +set(WITH_HTML 1) +set(WITH_LEGACY 1) +set(WITH_C14N 1) +set(WITH_CATALOG 1) +set(WITH_DOCB 1) +set(WITH_XPATH 1) +set(WITH_XPTR 1) +set(WITH_XINCLUDE 1) +set(WITH_ICONV 1) +set(WITH_ICU 0) +set(WITH_ISO8859X 1) +set(WITH_DEBUG 1) +set(WITH_MEM_DEBUG 0) +set(WITH_RUN_DEBUG 0) +set(WITH_REGEXPS 1) +set(WITH_SCHEMAS 1) +set(WITH_SCHEMATRON 1) +set(WITH_MODULES 1) +set(MODULE_EXTENSION ".so") +set(WITH_ZLIB 1) +set(WITH_LZMA 1) + +if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(WITH_CATALOG 0) + set(WITH_MODULES 0) +endif() + +message(STATUS "Generating xmlversion.h") + +configure_file(include/libxml/xmlversion.h.in include/libxml/xmlversion.h) + +add_library(libxml2 ${SOURCES}) +if(INSTALL_HEADERS) + file(GLOB PUBLIC_HEADERS include/libxml/*.h ${CMAKE_CURRENT_BINARY_DIR}/include/libxml/xmlversion.h) + list(FILTER PUBLIC_HEADERS EXCLUDE REGEX "xmlexports\\.h$") + list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/xmlexports.h) + + set_target_properties(libxml2 PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADERS}") +endif() +target_include_directories(libxml2 PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/include include ${LIBLZMA_INCLUDE_DIRS}) +target_link_libraries(libxml2 PRIVATE + unofficial::iconv::libcharset unofficial::iconv::libiconv + ZLIB::ZLIB + ${LIBLZMA_LIBRARIES} +) +if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + target_include_directories(libxml2 PRIVATE win32/vc10) + target_link_libraries(libxml2 PRIVATE + wsock32.lib + ws2_32.lib + ) + target_compile_definitions(libxml2 PRIVATE + -DHAVE_WIN32_THREADS + _WINSOCK_DEPRECATED_NO_WARNINGS + ) + target_sources(libxml2 PRIVATE win32/libxml2.rc) + set_source_files_properties(win32/libxml2.rc PROPERTIES COMPILE_FLAGS "-DLIBXML_MAJOR_VERSION=${LIBXML_MAJOR_VERSION} -DLIBXML_MINOR_VERSION=${LIBXML_MINOR_VERSION} -DLIBXML_MICRO_VERSION=${LIBXML_MICRO_VERSION} -DLIBXML_DOTTED_VERSION=\\\"${VERSION}\\\"") +endif() + +target_compile_definitions(libxml2 PRIVATE + -D_CRT_SECURE_NO_DEPRECATE + -D_CRT_NONSTDC_NO_DEPRECATE + -D_REENTRANT + -DNOLIBTOOL + -DHAVE_ZLIB_H + -DHAVE_LZMA_H +) +if(NOT BUILD_SHARED_LIBS) + target_compile_definitions(libxml2 PRIVATE -DLIBXML_STATIC) +endif() + +set(TARGET_INSTALL_OPTIONS) +if(INSTALL_HEADERS) + set(TARGET_INSTALL_OPTIONS PUBLIC_HEADER DESTINATION include/libxml) +endif() + +install(TARGETS libxml2 + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + ${TARGET_INSTALL_OPTIONS} +) diff --git a/vcpkg/ports/libxml2/CONTROL b/vcpkg/ports/libxml2/CONTROL new file mode 100644 index 0000000..6f8d189 --- /dev/null +++ b/vcpkg/ports/libxml2/CONTROL @@ -0,0 +1,5 @@ +Source: libxml2 +Version: 2.9.10 +Homepage: https://xmlsoft.org/ +Description: Libxml2 is the XML C parser and toolkit developed for the Gnome project (but usable outside of the Gnome platform) +Build-Depends: zlib, libiconv, liblzma diff --git a/vcpkg/ports/libxml2/RemoveIncludeFromWindowsRcFile.patch b/vcpkg/ports/libxml2/RemoveIncludeFromWindowsRcFile.patch new file mode 100644 index 0000000..ce5a3fc --- /dev/null +++ b/vcpkg/ports/libxml2/RemoveIncludeFromWindowsRcFile.patch @@ -0,0 +1,10 @@ +diff --git a/win32/libxml2.rc b/win32/libxml2.rc +index c774a5ee..08e2da1e 100644 +--- a/win32/libxml2.rc ++++ b/win32/libxml2.rc +@@ -1,5 +1,4 @@ + #include +-#include "rcVersion.h" + + VS_VERSION_INFO VERSIONINFO + FILEVERSION LIBXML_MAJOR_VERSION,LIBXML_MINOR_VERSION,LIBXML_MICRO_VERSION,0 diff --git a/vcpkg/ports/libxml2/config.linux.h b/vcpkg/ports/libxml2/config.linux.h new file mode 100644 index 0000000..d029e95 --- /dev/null +++ b/vcpkg/ports/libxml2/config.linux.h @@ -0,0 +1,56 @@ +#define GETHOSTBYNAME_ARG_CAST /**/ +#define HAVE_ANSIDECL_H 1 +#define HAVE_ARPA_INET_H 1 +#define HAVE_ARPA_NAMESER_H 1 +#define HAVE_CTYPE_H 1 +#define HAVE_DIRENT_H 1 +#define HAVE_DLFCN_H 1 +#define HAVE_DLOPEN /**/ +#define HAVE_ERRNO_H 1 +#define HAVE_FCNTL_H 1 +#define HAVE_FLOAT_H 1 +#define HAVE_FTIME 1 +#define HAVE_GETADDRINFO /**/ +#define HAVE_GETTIMEOFDAY 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_ISASCII 1 +#define HAVE_LIMITS_H 1 +#define HAVE_LOCALTIME 1 +#define HAVE_LZMA_H 1 +#define HAVE_MALLOC_H 1 +#define HAVE_MATH_H 1 +#define HAVE_MMAP 1 +#define HAVE_NETDB_H 1 +#define HAVE_NETINET_IN_H 1 +#define HAVE_POLL_H 1 +#define HAVE_PTHREAD_H /**/ +#define HAVE_PUTENV 1 +#define HAVE_RAND 1 +#define HAVE_RAND_R 1 +#define HAVE_RESOLV_H 1 +#define HAVE_SIGNAL_H 1 +#define HAVE_SRAND 1 +#define HAVE_STAT 1 +#define HAVE_STDARG_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRFTIME 1 +#define HAVE_STRINGS_H 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_MMAN_H 1 +#define HAVE_SYS_SELECT_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TIMEB_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_TIME 1 +#define HAVE_TIME_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_VA_COPY 1 +#define HAVE_ZLIB_H 1 +#define ICONV_CONST +#define SEND_ARG2_CAST /**/ +#define SUPPORT_IP6 /**/ +#define VA_LIST_IS_ARRAY 1 +#define XML_SOCKLEN_T socklen_t diff --git a/vcpkg/ports/libxml2/config.osx.h b/vcpkg/ports/libxml2/config.osx.h new file mode 100644 index 0000000..95d83ed --- /dev/null +++ b/vcpkg/ports/libxml2/config.osx.h @@ -0,0 +1,54 @@ +#define GETHOSTBYNAME_ARG_CAST /**/ +#define HAVE_ARPA_INET_H 1 +#define HAVE_ARPA_NAMESER_H 1 +#define HAVE_CTYPE_H 1 +#define HAVE_DIRENT_H 1 +#define HAVE_DLFCN_H 1 +#define HAVE_DLOPEN /**/ +#define HAVE_ERRNO_H 1 +#define HAVE_FCNTL_H 1 +#define HAVE_FLOAT_H 1 +#define HAVE_FTIME 1 +#define HAVE_GETADDRINFO /**/ +#define HAVE_GETTIMEOFDAY 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_ISASCII 1 +#define HAVE_LIMITS_H 1 +#define HAVE_LOCALTIME 1 +#define HAVE_LZMA_H 1 +#define HAVE_MATH_H 1 +#define HAVE_MMAP 1 +#define HAVE_NETDB_H 1 +#define HAVE_NETINET_IN_H 1 +#define HAVE_POLL_H 1 +#define HAVE_PTHREAD_H /**/ +#define HAVE_PUTENV 1 +#define HAVE_RAND 1 +#define HAVE_RAND_R 1 +#define HAVE_RESOLV_H 1 +#define HAVE_SIGNAL_H 1 +#define HAVE_SRAND 1 +#define HAVE_STAT 1 +#define HAVE_STDARG_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRFTIME 1 +#define HAVE_STRINGS_H 1 +#define HAVE_STRING_H 1 +#define HAVE_SYS_MMAN_H 1 +#define HAVE_SYS_SELECT_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TIMEB_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_TIME 1 +#define HAVE_TIME_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_VA_COPY 1 +#define HAVE_ZLIB_H 1 +#define ICONV_CONST +#define SEND_ARG2_CAST /**/ +#define SUPPORT_IP6 /**/ +#define VA_LIST_IS_ARRAY 1 +#define XML_SOCKLEN_T socklen_t diff --git a/vcpkg/ports/libxml2/portfile.cmake b/vcpkg/ports/libxml2/portfile.cmake new file mode 100644 index 0000000..7dda323 --- /dev/null +++ b/vcpkg/ports/libxml2/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO GNOME/libxml2 + REF v2.9.10 + SHA512 de8d7c6c90f9d0441747deec320c4887faee1fd8aff9289115caf7ce51ab73b6e2c4628ae7eaad4a33a64561d23a92fd5e8a5afa7fa74183bdcd9a7b06bc67f1 + HEAD_REF master + PATCHES + RemoveIncludeFromWindowsRcFile.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DPORT_DIR=${CMAKE_CURRENT_LIST_DIR} + OPTIONS_DEBUG -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +# Handle copyright +configure_file(${SOURCE_PATH}/Copyright ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# Install usage +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +endif() diff --git a/vcpkg/ports/libxml2/usage b/vcpkg/ports/libxml2/usage new file mode 100644 index 0000000..fd94c4b --- /dev/null +++ b/vcpkg/ports/libxml2/usage @@ -0,0 +1,5 @@ +The package libxml2 is compatible with built-in CMake targets: + + find_package(LibXml2 REQUIRED) + target_include_directories(main PRIVATE ${LIBXML2_INCLUDE_DIR}) + target_link_libraries(main PRIVATE ${LIBXML2_LIBRARIES}) diff --git a/vcpkg/ports/libxml2/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/libxml2/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..94ef458 --- /dev/null +++ b/vcpkg/ports/libxml2/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,26 @@ +_find_package(${ARGS}) +if(LibXml2_FOUND) + find_package(LibLZMA) + find_package(ZLIB) + include(SelectLibraryConfigurations) + find_library(ICONV_LIBRARY_DEBUG NAMES iconvd libiconvd iconv libiconv NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_INSTALLED_DIR}/debug" NO_DEFAULT_PATH) + find_library(ICONV_LIBRARY_RELEASE NAMES iconv libiconv NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH) + find_library(ICONV_LIBRARY_RELEASE NAMES iconv libiconv NAMES_PER_DIR PATH_SUFFIXES lib) + find_library(CHARSET_LIBRARY_DEBUG NAMES charsetd libcharsetd charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH) + find_library(CHARSET_LIBRARY_RELEASE NAMES charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH) + find_library(CHARSET_LIBRARY_RELEASE NAMES charset libcharset NAMES_PER_DIR PATH_SUFFIXES lib) + select_library_configurations(ICONV) + select_library_configurations(CHARSET) + list(APPEND LIBXML2_LIBRARIES ${LIBLZMA_LIBRARIES} ${ZLIB_LIBRARIES}) + if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + list(APPEND LIBXML2_LIBRARIES m) + else() + list(APPEND LIBXML2_LIBRARIES ${ICONV_LIBRARIES} ${CHARSET_LIBRARIES}) + if(TARGET LibXml2::LibXml2) + target_link_libraries(LibXml2::LibXml2 INTERFACE ${ICONV_LIBRARIES} ${CHARSET_LIBRARIES}) + endif() + endif() + if(CMAKE_SYSTEM_NAME STREQUAL "Windows") + list(APPEND LIBXML2_LIBRARIES ws2_32) + endif() +endif() diff --git a/vcpkg/ports/libxmlmm/CMakeLists.txt b/vcpkg/ports/libxmlmm/CMakeLists.txt new file mode 100644 index 0000000..721641a --- /dev/null +++ b/vcpkg/ports/libxmlmm/CMakeLists.txt @@ -0,0 +1,59 @@ +cmake_minimum_required(VERSION 3.8) +project(libxmlmm CXX) + +set(CMAKE_SHARED_LIBRARY_PREFIX) +set(CMAKE_STATIC_LIBRARY_PREFIX) + +find_package(LibXml2 REQUIRED) + +set(HEADERS_LIBXMLMM + libxmlmm/Attribute.h + libxmlmm/CData.h + libxmlmm/Comment.h + libxmlmm/Content.h + libxmlmm/defines.h + libxmlmm/Document.h + libxmlmm/Element.h + libxmlmm/exceptions.h + libxmlmm/libxmlmm.h + libxmlmm/LibXmlSentry.h + libxmlmm/Node.h + libxmlmm/ProcessingInstruction.h + libxmlmm/Text.h + libxmlmm/utils.h +) + +set(SOURCES_LIBXMLMM + libxmlmm/Attribute.cpp + libxmlmm/CData.cpp + libxmlmm/Comment.cpp + libxmlmm/Content.cpp + libxmlmm/Document.cpp + libxmlmm/Element.cpp + libxmlmm/LibXmlSentry.cpp + libxmlmm/Node.cpp + libxmlmm/ProcessingInstruction.cpp + libxmlmm/Text.cpp + libxmlmm/utils.cpp +) + +add_library(libxmlmm ${SOURCES_LIBXMLMM}) +include_directories(${LIBXML2_INCLUDE_DIR}) +target_link_libraries (libxmlmm ${LIBXML2_LIBRARIES}) + +set_target_properties(libxmlmm PROPERTIES + CXX_STANDARD 17 + PUBLIC_HEADER "${HEADERS_LIBXMLMM}" +) + +target_include_directories(libxmlmm PUBLIC + $ + $) + +install(TARGETS ${PROJECT_NAME} + EXPORT litehtmlTargets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + PUBLIC_HEADER DESTINATION include/libxmlmm +) diff --git a/vcpkg/ports/libxmlmm/CONTROL b/vcpkg/ports/libxmlmm/CONTROL new file mode 100644 index 0000000..a943bcf --- /dev/null +++ b/vcpkg/ports/libxmlmm/CONTROL @@ -0,0 +1,5 @@ +Source: libxmlmm +Version: 0.6.0 +Homepage: https://github.com/rioki/libxmlmm +Description: Libxmlmm is a C++ wrapper for libxml 2.0 that only relies on standard C++ and libxml2. +Build-Depends: libxml2 diff --git a/vcpkg/ports/libxmlmm/portfile.cmake b/vcpkg/ports/libxmlmm/portfile.cmake new file mode 100644 index 0000000..552bd6c --- /dev/null +++ b/vcpkg/ports/libxmlmm/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rioki/libxmlmm + REF r0.6 + SHA512 4f619e730de2f88b891ef31dd7ced2e6be75fff7f3852ec178843bf8d099d2e1ea84e0fcde35ff7fefc201b026f63e4b5d55f88e48334c49a0333be0327894df + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +# Handle copyright +configure_file(${SOURCE_PATH}/README.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") diff --git a/vcpkg/ports/libxmlpp/CMakeLists.txt b/vcpkg/ports/libxmlpp/CMakeLists.txt new file mode 100644 index 0000000..bbaae7c --- /dev/null +++ b/vcpkg/ports/libxmlpp/CMakeLists.txt @@ -0,0 +1,95 @@ +cmake_minimum_required(VERSION 3.9) +project(libxmlpp) + +set(CMAKE_CXX_STANDARD 17) + +find_path(GLIBMM_INCLUDE_DIR NAMES glibmm.h) +find_library(GLIBMM_LIBRARY NAMES glibmm) +find_library(GIOMM_LIBRARY NAMES giomm) +find_library(GLIB_LIBRARY NAMES glib glib-2.0) +find_library(GIO_LIBRARY NAMES gio gio-2.0) +find_library(GMODULE_LIBRARY NAMES gmodule gmodule-2.0) +find_library(GOBJECT_LIBRARY NAMES gobject gobject-2.0) +find_library(SIGCPP_LIBRARY NAMES sigc sigc-2.0) +find_library(FFI_LIBRARY NAMES ffi libffi) +find_library(PCRE_LIBRARY NAMES pcre libpcre) +find_package(LibXml2 REQUIRED) +find_package(LibLZMA REQUIRED) +find_package(ZLIB REQUIRED) + +if(APPLE) + find_library(LIBINTL_LIBRARY NAMES intl) +endif() + +find_package(unofficial-iconv REQUIRED) +link_libraries(${LIBINTL_LIBRARY} unofficial::iconv::libiconv) + +if(APPLE) + find_library(COREFOUNDATION_LIBRARY CoreFoundation) + find_library(CORESERVICES_LIBRARY CoreServices) + find_library(FOUNDATION_LIBRARY Foundation) + link_libraries(${COREFOUNDATION_LIBRARY} ${CORESERVICES_LIBRARY} ${FOUNDATION_LIBRARY}) +endif() + +link_libraries( + ${GIOMM_LIBRARY} + ${GLIBMM_LIBRARY} + ${GMODULE_LIBRARY} + ${GOBJECT_LIBRARY} + ${GIO_LIBRARY} + ${GLIB_LIBRARY} + ${SIGCPP_LIBRARY} + ${FFI_LIBRARY} + ${LIBXML2_LIBRARIES} + ${PCRE_LIBRARY} + ${LIBLZMA_LIBRARIES} + ZLIB::ZLIB +) +include_directories(${GLIBMM_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIRS} ${LIBLZMA_INCLUDE_DIRS}) +include_directories(. ${CMAKE_BINARY_DIR}/config) +if(NOT WIN32) + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) + link_libraries(Threads::Threads ${CMAKE_DL_LIBS}) +endif() + +# config file +if(WIN32) + configure_file(MSVC_Net2010/libxml++/libxml++config.h ${CMAKE_BINARY_DIR}/config/libxml++config.h COPYONLY) +else() + set(ENV{GLIBMM_CFLAGS} -I${GLIBMM_INCLUDE_DIR}) + set(ENV{GLIBMM_LIBS} "${GLIBMM_LIBRARY}") + set(ENV{GIOMM_CFLAGS} -I${GLIBMM_INCLUDE_DIR}) + set(ENV{GIOMM_LIBS} "${GIOMM_LIBRARY}") + set(ENV{PKG_CONFIG} "echo") + + file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/config) + execute_process( + COMMAND "${CMAKE_SOURCE_DIR}/configure" + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/config + RESULT_VARIABLE res + ) + if(NOT res EQUAL 0) + message(FATAL_ERROR "Configure failed.") + endif() +endif() + +file(GLOB_RECURSE SOURCES libxml++/*.cc) +add_library(xml++ ${SOURCES}) +target_compile_definitions(xml++ PRIVATE -DLIBXMLPP_BUILD) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES ${CMAKE_BINARY_DIR}/config/libxml++config.h DESTINATION include) + install(DIRECTORY libxml++ DESTINATION include FILES_MATCHING PATTERN *.h) +endif() +install( + TARGETS xml++ + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +if(NOT DISABLE_EXAMPLES) + add_executable(dom_build examples/dom_build/main.cc) + target_link_libraries(dom_build xml++) +endif() diff --git a/vcpkg/ports/libxmlpp/CONTROL b/vcpkg/ports/libxmlpp/CONTROL new file mode 100644 index 0000000..247704f --- /dev/null +++ b/vcpkg/ports/libxmlpp/CONTROL @@ -0,0 +1,4 @@ +Source: libxmlpp +Version: 2.40.1-5 +Description: a C++ wrapper for the libxml XML parser library. +Build-Depends: libxml2, glibmm diff --git a/vcpkg/ports/libxmlpp/fixAutoPtrExpired.patch b/vcpkg/ports/libxmlpp/fixAutoPtrExpired.patch new file mode 100644 index 0000000..98d4df6 --- /dev/null +++ b/vcpkg/ports/libxmlpp/fixAutoPtrExpired.patch @@ -0,0 +1,114 @@ +diff --git a/libxml++/parsers/saxparser.h b/libxml++/parsers/saxparser.h +index 1362ca3..0bd36d2 100644 +--- a/libxml++/parsers/saxparser.h ++++ b/libxml++/parsers/saxparser.h +@@ -221,7 +221,7 @@ private: + //TODO: Remove the virtual when we can break ABI? + virtual void parse(); + +- std::auto_ptr<_xmlSAXHandler> sax_handler_; ++ std::unique_ptr<_xmlSAXHandler> sax_handler_; + + // A separate xmlpp::Document that is just used for entity resolution, + // and never seen in the API: +diff --git a/libxml++/parsers/textreader.h b/libxml++/parsers/textreader.h +index 48901b2..17f0737 100644 +--- a/libxml++/parsers/textreader.h ++++ b/libxml++/parsers/textreader.h +@@ -257,7 +257,7 @@ class TextReader: NonCopyable + void * locator); + void check_for_exceptions() const; + +- std::auto_ptr propertyreader; ++ std::unique_ptr propertyreader; + _xmlTextReader* impl_; + int severity_; + Glib::ustring error_; +diff --git a/libxml++/relaxngschema.h b/libxml++/relaxngschema.h +index 8df7089..ffe2eaa 100644 +--- a/libxml++/relaxngschema.h ++++ b/libxml++/relaxngschema.h +@@ -23,7 +23,7 @@ + + #include + #include +-#include // std::auto_ptr ++#include // std::unique_ptr + + #ifndef DOXYGEN_SHOULD_SKIP_THIS + extern "C" { +@@ -105,7 +105,7 @@ protected: + + private: + struct Impl; +- std::auto_ptr pimpl_; ++ std::unique_ptr pimpl_; + }; + + } // namespace xmlpp +diff --git a/libxml++/validators/relaxngvalidator.h b/libxml++/validators/relaxngvalidator.h +index 5cd5ad7..cd29393 100644 +--- a/libxml++/validators/relaxngvalidator.h ++++ b/libxml++/validators/relaxngvalidator.h +@@ -22,7 +22,7 @@ + #define __LIBXMLPP_VALIDATOR_RELAXNGVALIDATOR_H + + #include +-#include // std::auto_ptr ++#include // std::unique_ptr + + namespace Glib + { +@@ -156,7 +156,7 @@ protected: + + private: + struct Impl; +- std::auto_ptr pimpl_; ++ std::unique_ptr pimpl_; + }; + + } // namespace xmlpp +diff --git a/libxml++/validators/xsdvalidator.h b/libxml++/validators/xsdvalidator.h +index 941d7f1..d64b971 100644 +--- a/libxml++/validators/xsdvalidator.h ++++ b/libxml++/validators/xsdvalidator.h +@@ -20,7 +20,7 @@ + #define __LIBXMLPP_VALIDATOR_XSDVALIDATOR_H + + #include +-#include // std::auto_ptr ++#include // std::unique_ptr + + namespace Glib + { +@@ -146,7 +146,7 @@ protected: + + private: + struct Impl; +- std::auto_ptr pimpl_; ++ std::unique_ptr pimpl_; + }; + + } // namespace xmlpp +diff --git a/libxml++/xsdschema.h b/libxml++/xsdschema.h +index 1333025..8220e4e 100644 +--- a/libxml++/xsdschema.h ++++ b/libxml++/xsdschema.h +@@ -21,7 +21,7 @@ + + #include + #include +-#include // std::auto_ptr ++#include // std::unique_ptr + + #ifndef DOXYGEN_SHOULD_SKIP_THIS + extern "C" { +@@ -96,7 +96,7 @@ protected: + + private: + struct Impl; +- std::auto_ptr pimpl_; ++ std::unique_ptr pimpl_; + }; + + } // namespace xmlpp diff --git a/vcpkg/ports/libxmlpp/portfile.cmake b/vcpkg/ports/libxmlpp/portfile.cmake new file mode 100644 index 0000000..1b31ed2 --- /dev/null +++ b/vcpkg/ports/libxmlpp/portfile.cmake @@ -0,0 +1,35 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +set(LIBXMLPP_VERSION 2.40.1) + +vcpkg_download_distfile(ARCHIVE + URLS "http://ftp.gnome.org/pub/GNOME/sources/libxml++/2.40/libxml++-${LIBXMLPP_VERSION}.tar.xz" + FILENAME "libxml++-${LIBXMLPP_VERSION}.tar.xz" + SHA512 a4ec2e8182d981c57bdcb8f0a203a3161f8c735ceb59fd212408b7a539d1dc826adf6717bed8f4d544ab08afd9c2fc861efe518e24bbd3a1c4b158e2ca48183a +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + fixAutoPtrExpired.patch +) + +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() + +vcpkg_copy_pdbs() + +# Handle copyright and readme +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxmlpp RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/libxmlpp) diff --git a/vcpkg/ports/libxmp-lite/0001-msvc-buildfix.patch b/vcpkg/ports/libxmp-lite/0001-msvc-buildfix.patch new file mode 100644 index 0000000..dfd5481 --- /dev/null +++ b/vcpkg/ports/libxmp-lite/0001-msvc-buildfix.patch @@ -0,0 +1,23 @@ +diff -Naur .\libxmp-lite-4.4.1/src/common.h .\libxmp-lite-4.4.1-orig/src/common.h +--- a/src/common.h 2016-07-16 13:37:36 +0200 ++++ b/src/common.h 2017-05-23 00:52:17 +0200 +@@ -77,19 +77,12 @@ + #ifndef CLIB_DECL + #define CLIB_DECL + #endif +-#ifdef DEBUG +-#ifndef ATTR_PRINTF +-#define ATTR_PRINTF(x,y) +-#endif +-void CLIB_DECL D_(const char *text, ...) ATTR_PRINTF(1,2); +-#else + // VS prior to VC7.1 does not support variadic macros. VC8.0 does not optimize unused parameters passing + #if _MSC_VER < 1400 + void __inline CLIB_DECL D_(const char *text, ...) { do {} while (0); } + #else + #define D_(args, ...) do {} while (0) + #endif +-#endif + + #elif defined __ANDROID__ + diff --git a/vcpkg/ports/libxmp-lite/0002-fix-symbols.patch b/vcpkg/ports/libxmp-lite/0002-fix-symbols.patch new file mode 100644 index 0000000..f765a7b --- /dev/null +++ b/vcpkg/ports/libxmp-lite/0002-fix-symbols.patch @@ -0,0 +1,44 @@ +diff --git a/lite/src/format.c b/lite/src/format.c +--- a/src/format.c ++++ b/src/format.c +@@ -27,20 +27,20 @@ + #endif + #include "format.h" + +-extern const struct format_loader xm_loader; +-extern const struct format_loader mod_loader; +-extern const struct format_loader it_loader; +-extern const struct format_loader s3m_loader; ++extern const struct format_loader libxmp_loader_xm; ++extern const struct format_loader libxmp_loader_mod; ++extern const struct format_loader libxmp_loader_it; ++extern const struct format_loader libxmp_loader_s3m; + + extern const struct pw_format *const pw_format[]; + + const struct format_loader *const format_loader[5] = { +- &xm_loader, +- &mod_loader, ++ &libxmp_loader_xm, ++ &libxmp_loader_mod, + #ifndef LIBXMP_CORE_DISABLE_IT +- &it_loader, ++ &libxmp_loader_it, + #endif +- &s3m_loader, ++ &libxmp_loader_s3m, + NULL + }; + +diff --git a/lite/src/loaders/mod_load.c b/lite/src/loaders/mod_load.c +--- a/src/loaders/mod_load.c ++++ b/src/loaders/mod_load.c +@@ -36,7 +36,7 @@ + static int mod_test (HIO_HANDLE *, char *, const int); + static int mod_load (struct module_data *, HIO_HANDLE *, const int); + +-const struct format_loader mod_loader = { ++const struct format_loader libxmp_loader_mod = { + "Protracker", + mod_test, + mod_load diff --git a/vcpkg/ports/libxmp-lite/CMakeLists.txt b/vcpkg/ports/libxmp-lite/CMakeLists.txt new file mode 100644 index 0000000..e1f14f3 --- /dev/null +++ b/vcpkg/ports/libxmp-lite/CMakeLists.txt @@ -0,0 +1,63 @@ +cmake_minimum_required(VERSION 3.4) +project(libxmp-lite) + +set(HEADERS "include/libxmp-lite/xmp.h") + +set(SOURCES src/virtual.c + src/format.c + src/period.c + src/player.c + src/read_event.c + src/dataio.c + src/lfo.c + src/scan.c + src/control.c + src/filter.c + src/effects.c + src/mixer.c + src/mix_all.c + src/load_helpers.c + src/load.c + src/hio.c + src/smix.c + src/memio.c + src/loaders/common.c + src/loaders/itsex.c + src/loaders/sample.c + src/loaders/xm_load.c + src/loaders/mod_load.c + src/loaders/s3m_load.c + src/loaders/it_load.c +) + +include_directories(include/libxmp-lite src) + +option(BUILD_SHARED_LIBS "Build shared libs" OFF) +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + option(INSTALL_HEADERS "Install header files" OFF) +else() + option(INSTALL_HEADERS "Install header files" ON) +endif() + +add_library(libxmp-lite ${SOURCES}) +target_compile_definitions(libxmp-lite PRIVATE + LIBXMP_CORE_PLAYER=1 + inline=__inline + _USE_MATH_DEFINES=1 +) + +# Fix UWP /sdl compile errors +# Disable C4703: Not initialized +# Disable C4996: Deprecated +set_target_properties(libxmp-lite PROPERTIES COMPILE_FLAGS "/wd4703 /wd4996") + +install( + TARGETS libxmp-lite + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) + +if(INSTALL_HEADERS) + install(FILES ${HEADERS} DESTINATION include) +endif() diff --git a/vcpkg/ports/libxmp-lite/CONTROL b/vcpkg/ports/libxmp-lite/CONTROL new file mode 100644 index 0000000..fd791aa --- /dev/null +++ b/vcpkg/ports/libxmp-lite/CONTROL @@ -0,0 +1,4 @@ +Source: libxmp-lite +Version: 4.4.1-6 +Homepage: https://sourceforge.net/projects/xmp/ +Description: Lightweight version of libxmp that supports MOD, S3M, XM and IT modules. diff --git a/vcpkg/ports/libxmp-lite/portfile.cmake b/vcpkg/ports/libxmp-lite/portfile.cmake new file mode 100644 index 0000000..4f3ce63 --- /dev/null +++ b/vcpkg/ports/libxmp-lite/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO xmp/libxmp + REF 4.4.1 + FILENAME "libxmp-lite-4.4.1.tar.gz" + SHA512 f27e3f9fb79ff15ce90b51fb29641c01cadf7455150da57cde6860c2ba075ed497650eb44ec9143bdd3538288228c609f7db6d862c9d73f007f686eccb05543e + PATCHES + 0001-msvc-buildfix.patch + 0002-fix-symbols.patch +) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libxslt/0001-Fix-makefile.patch b/vcpkg/ports/libxslt/0001-Fix-makefile.patch new file mode 100644 index 0000000..8648a3f --- /dev/null +++ b/vcpkg/ports/libxslt/0001-Fix-makefile.patch @@ -0,0 +1,47 @@ +--- + win32/Makefile.msvc | 29 +++++++++++++++-------------- + 1 file changed, 15 insertions(+), 14 deletions(-) + +diff --git a/win32/Makefile.msvc b/win32/Makefile.msvc +index 23a02d2..b13dd26 100644 +--- a/win32/Makefile.msvc ++++ b/win32/Makefile.msvc +@@ -59,7 +59,13 @@ CFLAGS = $(CFLAGS) /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE + LD = link.exe + LDFLAGS = /nologo + LDFLAGS = $(LDFLAGS) /LIBPATH:$(BINDIR) /LIBPATH:$(LIBPREFIX) +-LIBS = wsock32.lib ++# The libraries are needed for static builds (the makefile builds all tools and dlls) ++LIBS = wsock32.lib libiconv.lib libcharset.lib ++!if "$(DEBUG)" == "1" ++LIBS = $(LIBS) zlibd.lib ++!else ++LIBS = $(LIBS) zlib.lib ++!endif + + # The archiver and its options. + AR = lib.exe +@@ -71,6 +77,7 @@ CFLAGS = $(CFLAGS) /D "_DEBUG" /Od /Z7 + LDFLAGS = $(LDFLAGS) /DEBUG + !else + CFLAGS = $(CFLAGS) /D "NDEBUG" /O2 ++LDFLAGS = $(LDFLAGS) /DEBUG /OPT:REF /OPT:ICF + !endif + + # Libxslt object files. +@@ -309,13 +316,7 @@ $(UTILS_INTDIR) : + # An implicit rule for xsltproc and friends. + APPLIBS = $(LIBS) + !if "$(STATIC)" == "1" +-APPLIBS = $(LIBS) libxml2_a.lib +-!if "$(WITH_ICONV)" == "1" +-APPLIBS = $(APPLIBS) iconv.lib +-!endif +-!if "$(WITH_ZLIB)" == "1" +-APPLIBS = $(APPLIBS) zlib.lib +-!endif ++APPLIBS = $(LIBS) libxml2.lib + {$(UTILS_SRCDIR)}.c{$(BINDIR)}.exe: + $(CC) /D "LIBXML_STATIC" /D "LIBXSLT_STATIC" /D "LIBEXSLT_STATIC" \ + $(CFLAGS) /Fo$(UTILS_INTDIR)\ /c $< +-- diff --git a/vcpkg/ports/libxslt/0002-Fix-lzma.patch b/vcpkg/ports/libxslt/0002-Fix-lzma.patch new file mode 100644 index 0000000..8c0e287 --- /dev/null +++ b/vcpkg/ports/libxslt/0002-Fix-lzma.patch @@ -0,0 +1,61 @@ +diff --git a/win32/Makefile.msvc b/win32/Makefile.msvc +index 0d1953d..0e538ef 100644 +--- a/win32/Makefile.msvc ++++ b/win32/Makefile.msvc +@@ -62,9 +62,9 @@ LDFLAGS = $(LDFLAGS) /LIBPATH:$(BINDIR) /LIBPATH:$(LIBPREFIX) + # The libraries are needed for static builds (the makefile builds all tools and dlls) + LIBS = wsock32.lib libiconv.lib libcharset.lib + !if "$(DEBUG)" == "1" +-LIBS = $(LIBS) zlibd.lib ++LIBS = $(LIBS) zlibd.lib lzmad.lib + !else +-LIBS = $(LIBS) zlib.lib ++LIBS = $(LIBS) zlib.lib lzma.lib + !endif + + # The archiver and its options. +diff --git a/win32/configure.js b/win32/configure.js +index 56694cc..24ccc8d 100644 +--- a/win32/configure.js ++++ b/win32/configure.js +@@ -45,6 +45,7 @@ var withMemDebug = false; + var withDebugger = true; + var withIconv = true; + var withZlib = false; ++var withLzma = true; + var withCrypto = true; + var withModules = false; + /* Win32 build options. */ +@@ -104,6 +105,7 @@ function usage() + txt += " debugger: Enable external debugger support (" + (withDebugger? "yes" : "no") + ")\n"; + txt += " iconv: Use iconv library (" + (withIconv? "yes" : "no") + ")\n"; + txt += " zlib: Use zlib library (" + (withZlib? "yes" : "no") + ")\n"; ++ txt += " lzma: Use lzma library (" + (withLzma? "yes" : "no") + ")\n"; + txt += " crypto: Enable Crypto support (" + (withCrypto? "yes" : "no") + ")\n"; + txt += " modules: Enable Module support (" + (withModules? "yes" : "no") + ")\n"; + txt += "\nWin32 build options, default value given in parentheses:\n\n"; +@@ -190,6 +192,7 @@ function discoverVersion() + vf.WriteLine("WITH_DEBUGGER=" + (withDebugger? "1" : "0")); + vf.WriteLine("WITH_ICONV=" + (withIconv? "1" : "0")); + vf.WriteLine("WITH_ZLIB=" + (withZlib? "1" : "0")); ++ vf.WriteLine("WITH_LZMA=" + (withLzma? "1" : "0")); + vf.WriteLine("WITH_CRYPTO=" + (withCrypto? "1" : "0")); + vf.WriteLine("WITH_MODULES=" + (withModules? "1" : "0")); + vf.WriteLine("DEBUG=" + (buildDebug? "1" : "0")); +@@ -339,6 +342,8 @@ for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) { + withIconv = strToBool(arg.substring(opt.length + 1, arg.length)); + else if (opt == "zlib") + withZlib = strToBool(arg.substring(opt.length + 1, arg.length)); ++ else if (opt == "lzma") ++ withLzma = strToBool(arg.substring(opt.length + 1, arg.length)); + else if (opt == "crypto") + withCrypto = strToBool(arg.substring(opt.length + 1, arg.length)); + else if (opt == "modules") +@@ -475,6 +480,7 @@ txtOut += " Memory debugging: " + boolToStr(withMemDebug) + "\n"; + txtOut += " Debugger support: " + boolToStr(withDebugger) + "\n"; + txtOut += " Use iconv: " + boolToStr(withIconv) + "\n"; + txtOut += " With zlib: " + boolToStr(withZlib) + "\n"; ++txtOut += " Lzma: " + boolToStr(withLzma) + "\n"; + txtOut += " Crypto: " + boolToStr(withCrypto) + "\n"; + txtOut += " Modules: " + boolToStr(withModules) + "\n"; + txtOut += "\n"; diff --git a/vcpkg/ports/libxslt/CONTROL b/vcpkg/ports/libxslt/CONTROL new file mode 100644 index 0000000..38eea5f --- /dev/null +++ b/vcpkg/ports/libxslt/CONTROL @@ -0,0 +1,5 @@ +Source: libxslt +Version: 1.1.33-7 +Homepage: https://github.com/GNOME/libxslt +Description: Libxslt is a XSLT library implemented in C for XSLT 1.0 and most of EXSLT +Build-Depends: libxml2, liblzma diff --git a/vcpkg/ports/libxslt/portfile.cmake b/vcpkg/ports/libxslt/portfile.cmake new file mode 100644 index 0000000..c3296f0 --- /dev/null +++ b/vcpkg/ports/libxslt/portfile.cmake @@ -0,0 +1,156 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO GNOME/libxslt + REF v1.1.33 + SHA512 2c20b2af3c19952b25b10dca0d95fe227602f7f815db352b04dd061c52c458d745f92c597ce08ac9207ba0fbe0169ea2fb78263d8590743717553f84463fe1d9 + HEAD_REF master + PATCHES + 0001-Fix-makefile.patch + 0002-Fix-lzma.patch +) + +if (VCPKG_TARGET_IS_WINDOWS) + # Create some directories ourselves, because the makefile doesn't + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() + set(CONFIGURE_COMMAND_TEMPLATE + cruntime=@CRUNTIME@ + debug=@DEBUGMODE@ + prefix=@INSTALL_DIR@ + include=@INCLUDE_DIR@ + lib=@LIB_DIR@ + bindir=$(PREFIX)\\tools\\ + sodir=$(PREFIX)\\bin\\ + ) + # Debug params + if(VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(CRUNTIME /MD) + else() + set(CRUNTIME /MT) + endif() + set(DEBUGMODE no) + set(LIB_DIR ${CURRENT_INSTALLED_DIR}/lib) + set(INCLUDE_DIR ${CURRENT_INSTALLED_DIR}/include) + set(INSTALL_DIR ${CURRENT_PACKAGES_DIR}) + file(TO_NATIVE_PATH "${LIB_DIR}" LIB_DIR) + file(TO_NATIVE_PATH "${INCLUDE_DIR}" INCLUDE_DIR) + file(TO_NATIVE_PATH "${INSTALL_DIR}" INSTALL_DIR) + string(CONFIGURE "${CONFIGURE_COMMAND_TEMPLATE}" CONFIGURE_COMMAND_REL) + # Release params + if(VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(CRUNTIME /MDd) + else() + set(CRUNTIME /MTd) + endif() + set(DEBUGMODE yes) + set(LIB_DIR ${CURRENT_INSTALLED_DIR}/debug/lib) + set(INSTALL_DIR ${CURRENT_PACKAGES_DIR}/debug) + file(TO_NATIVE_PATH "${LIB_DIR}" LIB_DIR) + file(TO_NATIVE_PATH "${INSTALL_DIR}" INSTALL_DIR) + string(CONFIGURE "${CONFIGURE_COMMAND_TEMPLATE}" CONFIGURE_COMMAND_DBG) + + vcpkg_install_nmake( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH win32 + PROJECT_NAME Makefile.msvc + PRERUN_SHELL_DEBUG cscript configure.js ${CONFIGURE_COMMAND_DBG} + PRERUN_SHELL_RELEASE cscript configure.js ${CONFIGURE_COMMAND_REL} + OPTIONS rebuild + ) + + # The makefile builds both static and dynamic libraries, so remove the ones we don't want + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libxslt_a${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${CURRENT_PACKAGES_DIR}/lib/libexslt_a${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libxslt_a${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${CURRENT_PACKAGES_DIR}/debug/lib/libexslt_a${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}) + else() + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libxslt${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${CURRENT_PACKAGES_DIR}/lib/libexslt${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libxslt${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${CURRENT_PACKAGES_DIR}/debug/lib/libexslt${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + # Rename the libs to match the dynamic lib names + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libxslt_a${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${CURRENT_PACKAGES_DIR}/lib/libxslt${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libexslt_a${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${CURRENT_PACKAGES_DIR}/lib/libexslt${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libxslt_a${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${CURRENT_PACKAGES_DIR}/debug/lib/libxslt${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libexslt_a${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} ${CURRENT_PACKAGES_DIR}/debug/lib/libexslt${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}) + endif() +else() + vcpkg_find_acquire_program(PYTHON2) + get_filename_component(PYTHON2_DIR ${PYTHON2} DIRECTORY) + + find_library(LibXml2_DEBUG_LIBRARIES libxml2 PATHS ${CURRENT_INSTALLED_DIR}/debug/lib REQUIRED) + find_library(LibXml2_RELEASE_LIBRARIES libxml2 PATHS ${CURRENT_INSTALLED_DIR}/lib REQUIRED) + + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + OPTIONS + --with-crypto + --with-plugins + --with-libxml-include-prefix=${CURRENT_INSTALLED_DIR}/include + --with-python=${PYTHON2_DIR} + OPTIONS_DEBUG + --with-mem-debug + --with-debug + --with-debugger + --with-libxml-libs-prefix="${CURRENT_INSTALLED_DIR}/debug/lib -lxml2 -lz -llzmad" + --with-html-dir=${CURRENT_INSTALLED_DIR}/debug/tools + --with-html-subdir=${CURRENT_INSTALLED_DIR}/debug/tools + OPTIONS_RELEASE + --with-libxml-libs-prefix="${CURRENT_INSTALLED_DIR}/lib -lxml2 -lz -llzma" + --with-html-dir=${CURRENT_INSTALLED_DIR}/tools + --with-html-subdir=${CURRENT_INSTALLED_DIR}/tools + ) + + vcpkg_install_make() + #vcpkg_fixup_pkgconfig()? + + if (EXISTS ${CURRENT_PACKAGES_DIR}/bin/xslt-config) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/xslt-config DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/xslt-config) + endif() + if (EXISTS ${CURRENT_PACKAGES_DIR}/bin/xsltproc) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/xsltproc DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/xslt-config) + endif() + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(COPY ${CURRENT_PACKAGES_DIR}/lib/libxslt.so ${CURRENT_PACKAGES_DIR}/bin/) + else() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/libxslt-plugins ${CURRENT_PACKAGES_DIR}/debug/lib/libxslt-plugins) + endif() + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libxslt.so) +endif() +# +# Cleanup +# + +# You have to define LIB(E)XSLT_STATIC or not, depending on how you link +file(READ ${CURRENT_PACKAGES_DIR}/include/libxslt/xsltexports.h XSLTEXPORTS_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "!defined(LIBXSLT_STATIC)" "0" XSLTEXPORTS_H "${XSLTEXPORTS_H}") +else() + string(REPLACE "!defined(LIBXSLT_STATIC)" "1" XSLTEXPORTS_H "${XSLTEXPORTS_H}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/libxslt/xsltexports.h "${XSLTEXPORTS_H}") + +file(READ ${CURRENT_PACKAGES_DIR}/include/libexslt/exsltexports.h EXSLTEXPORTS_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "!defined(LIBEXSLT_STATIC)" "0" EXSLTEXPORTS_H "${EXSLTEXPORTS_H}") +else() + string(REPLACE "!defined(LIBEXSLT_STATIC)" "1" EXSLTEXPORTS_H "${EXSLTEXPORTS_H}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/libexslt/exsltexports.h "${EXSLTEXPORTS_H}") + +# Remove tools and debug include directories +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/tools) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/tools) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + vcpkg_copy_pdbs() +endif() + +file(INSTALL ${SOURCE_PATH}/Copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + diff --git a/vcpkg/ports/libyaml/CONTROL b/vcpkg/ports/libyaml/CONTROL new file mode 100644 index 0000000..d6d9107 --- /dev/null +++ b/vcpkg/ports/libyaml/CONTROL @@ -0,0 +1,4 @@ +Source: libyaml +Version: 0.2.5 +Homepage: https://github.com/yaml/libyaml +Description: A C library for parsing and emitting YAML. diff --git a/vcpkg/ports/libyaml/fix-POSIX_name.patch b/vcpkg/ports/libyaml/fix-POSIX_name.patch new file mode 100644 index 0000000..0aa6d21 --- /dev/null +++ b/vcpkg/ports/libyaml/fix-POSIX_name.patch @@ -0,0 +1,13 @@ +diff --git a/src/api.c b/src/api.c +index e793b08..6f16fc5 100644 +--- a/src/api.c ++++ b/src/api.c +@@ -63,7 +63,7 @@ yaml_strdup(const yaml_char_t *str) + if (!str) + return NULL; + +- return (yaml_char_t *)strdup((char *)str); ++ return (yaml_char_t *)_strdup((char *)str); + } + + /* diff --git a/vcpkg/ports/libyaml/portfile.cmake b/vcpkg/ports/libyaml/portfile.cmake new file mode 100644 index 0000000..a9b75c7 --- /dev/null +++ b/vcpkg/ports/libyaml/portfile.cmake @@ -0,0 +1,28 @@ +if (WIN32) + set(PATCHES fix-POSIX_name.patch) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO yaml/libyaml + REF 2c891fc7a770e8ba2fec34fc6b545c672beb37e6 # 0.2.5 + SHA512 7cdde7b48c937777b851747f7e0b9a74cb7da30173e09305dad931ef83c3fcee3e125e721166690fe6a0987ba897564500530e5518e4b66b1c9b1db8900bf320 + HEAD_REF master + PATCHES ${PATCHES} +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF + -DINSTALL_CMAKE_DIR=share/yaml +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/yaml TARGET_PATH share/yaml) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include/config.h ${CURRENT_PACKAGES_DIR}/debug/share) + +configure_file(${SOURCE_PATH}/License ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/libyuv/CONTROL b/vcpkg/ports/libyuv/CONTROL new file mode 100644 index 0000000..bd998bd --- /dev/null +++ b/vcpkg/ports/libyuv/CONTROL @@ -0,0 +1,6 @@ +Source: libyuv +Version: fec9121 +Port-Version: 3 +Homepage: https://chromium.googlesource.com/libyuv/libyuv +Build-Depends: libjpeg-turbo +Description: libyuv is an open source project that includes YUV scaling and conversion functionality. diff --git a/vcpkg/ports/libyuv/fix-build-type.patch b/vcpkg/ports/libyuv/fix-build-type.patch new file mode 100644 index 0000000..179a7f7 --- /dev/null +++ b/vcpkg/ports/libyuv/fix-build-type.patch @@ -0,0 +1,62 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 50442cd..fdc82f2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -28,24 +28,32 @@ LIST ( SORT ly_unittest_sources ) + INCLUDE_DIRECTORIES( BEFORE ${ly_inc_dir} ) + + # this creates the static library (.a) ++if (NOT BUILD_SHARED_LIBS) + ADD_LIBRARY ( ${ly_lib_static} STATIC ${ly_source_files} ) + SET_TARGET_PROPERTIES( ${ly_lib_static} PROPERTIES PUBLIC_HEADER include/libyuv.h ) +- ++else() + # this creates the shared library (.so) + ADD_LIBRARY ( ${ly_lib_shared} SHARED ${ly_source_files} ) + SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES OUTPUT_NAME "${ly_lib_name}" ) + SET_TARGET_PROPERTIES ( ${ly_lib_shared} PROPERTIES PREFIX "lib" ) +- ++endif() + # this creates the conversion tool + ADD_EXECUTABLE ( yuvconvert ${ly_base_dir}/util/yuvconvert.cc ) +-TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_static} ) +- ++if (BUILD_SHARED_LIBS) ++ TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_shared} ) ++else() ++ TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_static} ) ++endif() + + INCLUDE ( FindJPEG ) + if (JPEG_FOUND) +- include_directories( ${JPEG_INCLUDE_DIR} ) +- target_link_libraries( ${ly_lib_shared} PUBLIC ${JPEG_LIBRARY} ) +- target_link_libraries( yuvconvert ${JPEG_LIBRARY} ) ++ include_directories( ${JPEG_INCLUDE_DIR}) ++ if( BUILD_SHARED_LIBS) ++ target_link_libraries(${ly_lib_shared} PUBLIC ${JPEG_LIBRARY}) ++ else() ++ target_link_libraries(${ly_lib_static} PUBLIC ${JPEG_LIBRARY}) ++ endif() ++ target_link_libraries(yuvconvert ${JPEG_LIBRARY}) + add_definitions( -DHAVE_JPEG ) + endif() + +@@ -88,11 +96,13 @@ endif() + + + # install the conversion tool, .so, .a, and all the header files +-INSTALL ( TARGETS yuvconvert DESTINATION bin ) ++INSTALL ( TARGETS yuvconvert DESTINATION tools ) + INSTALL ( FILES ${ly_include_files} DESTINATION include/libyuv ) +-INSTALL ( TARGETS ${ly_lib_static} EXPORT libyuv-targets DESTINATION lib INCLUDES DESTINATION include PUBLIC_HEADER DESTINATION include ) +-INSTALL ( TARGETS ${ly_lib_shared} EXPORT libyuv-targets LIBRARY DESTINATION lib RUNTIME DESTINATION bin ) +- ++if (NOT BUILD_SHARED_LIBS) ++ INSTALL ( TARGETS ${ly_lib_static} EXPORT libyuv-targets DESTINATION lib INCLUDES DESTINATION include PUBLIC_HEADER DESTINATION include ) ++else() ++ INSTALL ( TARGETS ${ly_lib_shared} EXPORT libyuv-targets LIBRARY DESTINATION lib RUNTIME DESTINATION bin ) ++endif() + INSTALL( EXPORT libyuv-targets DESTINATION share/cmake/libyuv/ EXPORT_LINK_INTERFACE_LIBRARIES ) + + # create the .deb and .rpm packages using cpack diff --git a/vcpkg/ports/libyuv/fix_cmakelists.patch b/vcpkg/ports/libyuv/fix_cmakelists.patch new file mode 100644 index 0000000..00cc505 --- /dev/null +++ b/vcpkg/ports/libyuv/fix_cmakelists.patch @@ -0,0 +1,61 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ed4948f..5b4e112 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2,10 +2,14 @@ + # Originally created for "roxlu build system" to compile libyuv on windows + # Run with -DTEST=ON to build unit tests + +-PROJECT ( YUV C CXX ) # "C" is required even for C++ projects + CMAKE_MINIMUM_REQUIRED( VERSION 2.8 ) ++CMAKE_POLICY( SET CMP0022 NEW ) ++ ++PROJECT ( YUV C CXX ) # "C" is required even for C++ projects + OPTION( TEST "Built unit tests" OFF ) + ++SET( CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON ) ++ + SET ( ly_base_dir ${PROJECT_SOURCE_DIR} ) + SET ( ly_src_dir ${ly_base_dir}/source ) + SET ( ly_inc_dir ${ly_base_dir}/include ) +@@ -14,6 +18,7 @@ SET ( ly_lib_name yuv ) + SET ( ly_lib_static ${ly_lib_name} ) + SET ( ly_lib_shared ${ly_lib_name}_shared ) + ++FILE ( GLOB_RECURSE ly_include_files ${ly_inc_dir}/libyuv/*.h ) + FILE ( GLOB_RECURSE ly_source_files ${ly_src_dir}/*.cc ) + LIST ( SORT ly_source_files ) + +@@ -24,6 +29,7 @@ INCLUDE_DIRECTORIES( BEFORE ${ly_inc_dir} ) + + # this creates the static library (.a) + ADD_LIBRARY ( ${ly_lib_static} STATIC ${ly_source_files} ) ++SET_TARGET_PROPERTIES( ${ly_lib_static} PROPERTIES PUBLIC_HEADER include/libyuv.h ) + + # this creates the shared library (.so) + ADD_LIBRARY ( ${ly_lib_shared} SHARED ${ly_source_files} ) +@@ -38,6 +44,7 @@ TARGET_LINK_LIBRARIES ( yuvconvert ${ly_lib_static} ) + INCLUDE ( FindJPEG ) + if (JPEG_FOUND) + include_directories( ${JPEG_INCLUDE_DIR} ) ++ target_link_libraries( ${ly_lib_shared} PUBLIC ${JPEG_LIBRARY} ) + target_link_libraries( yuvconvert ${JPEG_LIBRARY} ) + add_definitions( -DHAVE_JPEG ) + endif() +@@ -81,10 +88,12 @@ endif() + + + # install the conversion tool, .so, .a, and all the header files +-INSTALL ( PROGRAMS ${CMAKE_BINARY_DIR}/yuvconvert DESTINATION bin ) +-INSTALL ( TARGETS ${ly_lib_static} DESTINATION lib ) +-INSTALL ( TARGETS ${ly_lib_shared} LIBRARY DESTINATION lib RUNTIME DESTINATION bin ) +-INSTALL ( DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DESTINATION include ) ++INSTALL ( TARGETS yuvconvert DESTINATION bin ) ++INSTALL ( FILES ${ly_include_files} DESTINATION include/libyuv ) ++INSTALL ( TARGETS ${ly_lib_static} EXPORT libyuv-targets DESTINATION lib INCLUDES DESTINATION include PUBLIC_HEADER DESTINATION include ) ++INSTALL ( TARGETS ${ly_lib_shared} EXPORT libyuv-targets LIBRARY DESTINATION lib RUNTIME DESTINATION bin ) ++ ++INSTALL( EXPORT libyuv-targets DESTINATION share/cmake/libyuv/ EXPORT_LINK_INTERFACE_LIBRARIES ) + + # create the .deb and .rpm packages using cpack + INCLUDE ( CM_linux_packages.cmake ) diff --git a/vcpkg/ports/libyuv/libyuv-config.cmake b/vcpkg/ports/libyuv/libyuv-config.cmake new file mode 100644 index 0000000..7031edd --- /dev/null +++ b/vcpkg/ports/libyuv/libyuv-config.cmake @@ -0,0 +1,5 @@ +include(CMakeFindDependencyMacro) +find_dependency(JPEG) + +set(libyuv_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/../../include") +include("${CMAKE_CURRENT_LIST_DIR}/libyuv-targets.cmake") diff --git a/vcpkg/ports/libyuv/portfile.cmake b/vcpkg/ports/libyuv/portfile.cmake new file mode 100644 index 0000000..590f72b --- /dev/null +++ b/vcpkg/ports/libyuv/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH + URL https://chromium.googlesource.com/libyuv/libyuv + REF fec9121b676eccd9acea2460aec7d6ae219701b9 + PATCHES + fix_cmakelists.patch + fix-build-type.patch +) + +set(POSTFIX d) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DCMAKE_DEBUG_POSTFIX=${POSTFIX} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/libyuv) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/libyuv/convert.h "#ifdef HAVE_JPEG" "#if 1") +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/libyuv/convert_argb.h "#ifdef HAVE_JPEG" "#if 1") + +configure_file(${CMAKE_CURRENT_LIST_DIR}/libyuv-config.cmake ${CURRENT_PACKAGES_DIR}/share/libyuv COPYONLY) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libzen/CONTROL b/vcpkg/ports/libzen/CONTROL new file mode 100644 index 0000000..7470be2 --- /dev/null +++ b/vcpkg/ports/libzen/CONTROL @@ -0,0 +1,3 @@ +Source: libzen +Version: 0.4.38 +Description: ZenLib is a C++ utility library for easiest cross-platform development diff --git a/vcpkg/ports/libzen/portfile.cmake b/vcpkg/ports/libzen/portfile.cmake new file mode 100644 index 0000000..1a9bf9b --- /dev/null +++ b/vcpkg/ports/libzen/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO MediaArea/ZenLib + REF v0.4.38 + SHA512 92c3fc3994bd7110021adbfa3ce48ed6e80f162946b912e9e06ed58edc224600e56e3aab3203ad3fa8759dab9790cb5536475f070f0c060b00585911a6cc0661 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/Project/CMake + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/zenlib TARGET_PATH share/zenlib) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) + +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/libzen RENAME copyright) + +vcpkg_test_cmake(PACKAGE_NAME ZenLib MODULE) diff --git a/vcpkg/ports/libzip/CONTROL b/vcpkg/ports/libzip/CONTROL new file mode 100644 index 0000000..d0f5e7f --- /dev/null +++ b/vcpkg/ports/libzip/CONTROL @@ -0,0 +1,32 @@ +Source: libzip +Version: 1.7.3 +Homepage: https://github.com/nih-at/libzip +Build-Depends: zlib +Default-Features: bzip2,default-aes +Description: A library for reading, creating, and modifying zip archives + +Feature: bzip2 +Build-Depends: bzip2 +Description: Support bzip2-compressed zip archives + +Feature: liblzma +Build-Depends: liblzma +Description: Support XZ compressed zip archives using liblzma + +Feature: default-aes +Build-Depends: libzip[core,openssl](!(windows|osx)),libzip[core,wincrypto](windows),libzip[core,commoncrypto](osx) +Description: Use default AES + +Feature: openssl +Build-Depends: openssl +Description: AES (encryption) support using OpenSSL + +Feature: wincrypto +Description: AES (encryption) support using Windows Crypto API + +Feature: commoncrypto +Description: AES( encryption) support using Apple's Common Crypto API + +Feature: mbedtls +Build-Depends: mbedtls +Description: AES (encryption) support using mbedtls \ No newline at end of file diff --git a/vcpkg/ports/libzip/fix-findpackage.patch b/vcpkg/ports/libzip/fix-findpackage.patch new file mode 100644 index 0000000..7080a9e --- /dev/null +++ b/vcpkg/ports/libzip/fix-findpackage.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 017f7cf0..9770c158 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -437,10 +437,10 @@ export(TARGETS zip + if(LIBZIP_DO_INSTALL) + install(FILES ${PROJECT_BINARY_DIR}/zipconf.h DESTINATION include) + install(FILES ${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config.cmake ${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake + ) + install(EXPORT ${PROJECT_NAME}-targets NAMESPACE libzip:: FILE ${PROJECT_NAME}-targets.cmake +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake + ) + endif() + diff --git a/vcpkg/ports/libzip/portfile.cmake b/vcpkg/ports/libzip/portfile.cmake new file mode 100644 index 0000000..eb42311 --- /dev/null +++ b/vcpkg/ports/libzip/portfile.cmake @@ -0,0 +1,45 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nih-at/libzip + REF 66e496489bdae81bfda8b0088172871d8fda0032 #v1.7.3 + SHA512 ae0cda3e9decf5a71bf1e0907a2a21b2c0d83e6e576faf4d9401d6954707ae298c1c09febbc5339f457ace3577fdd405a790c819ef24778990ca6bf1e9516d54 + HEAD_REF v1.7.3 + PATCHES fix-findpackage.patch +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + bzip2 ENABLE_BZIP2 + liblzma ENABLE_LZMA + openssl ENABLE_OPENSSL + wincrypto ENABLE_WINDOWS_CRYPTO + commoncrypto ENABLE_COMMONCRYPTO + mbedtls ENABLE_MBEDTLS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DBUILD_DOC=OFF + -DBUILD_EXAMPLES=OFF + -DBUILD_REGRESS=OFF + -DBUILD_TOOLS=OFF + -DENABLE_GNUTLS=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share/libzip) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Remove include directories from lib +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/libzip ${CURRENT_PACKAGES_DIR}/debug/lib/libzip) + +# Remove debug include +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Copy copright information +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/libzippp/CONTROL b/vcpkg/ports/libzippp/CONTROL new file mode 100644 index 0000000..0ffb5ff --- /dev/null +++ b/vcpkg/ports/libzippp/CONTROL @@ -0,0 +1,5 @@ +Source: libzippp +Version: 4.0-1.7.3 +Homepage: https://github.com/ctabin/libzippp +Description: Simple basic C++ wrapper around the libzip library. It is meant to be a portable and easy-to-use library for ZIP handling +Build-Depends: zlib, libzip[bzip2] diff --git a/vcpkg/ports/libzippp/portfile.cmake b/vcpkg/ports/libzippp/portfile.cmake new file mode 100644 index 0000000..bbedf3d --- /dev/null +++ b/vcpkg/ports/libzippp/portfile.cmake @@ -0,0 +1,30 @@ + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ctabin/libzippp + REF 791bdc43eb18b87e3bdfa087493e3e32217e672c #v4.0-1.7.3 with CXX std version c++11 + SHA512 c6a90ecec21bb2d9e3af681c35d7eec0bee7b356fc1438004dc84be32ee7b94d047c35817d46b222237d54699ea54afa4fd3ae5deeba40dfce4fd2035a38b0e5 + HEAD_REF libzippp-v4.0-1.7.3 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DLIBZIPPP_BUILD_TESTS=OFF + OPTIONS_DEBUG + -DLIBZIPPP_INSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +if(WIN32) + vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake/libzippp") +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH "share/libzippp") +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libzippp RENAME copyright) diff --git a/vcpkg/ports/licensepp/0001-use-old-pem-pack.patch b/vcpkg/ports/licensepp/0001-use-old-pem-pack.patch new file mode 100644 index 0000000..37656f6 --- /dev/null +++ b/vcpkg/ports/licensepp/0001-use-old-pem-pack.patch @@ -0,0 +1,29 @@ +From d1b446c7a69344cb53be6692cd76186960a1428d Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Wed, 23 Sep 2020 09:40:32 -0700 +Subject: [PATCH 1/2] use old pem pack + +In this commit: https://github.com/noloader/cryptopp-pem/commit/0cfa60820ec1d5e8ac4d77a0a8786ee43e9a2400 +the parameter orders have been changed. +But we cannot update pem-pack to this version or newer because it +wont compile with the current version of cryptopp in vcpkg. +--- + src/external/Ripe.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/external/Ripe.cc b/src/external/Ripe.cc +index 6ff9561..a1d1eec 100644 +--- a/src/external/Ripe.cc ++++ b/src/external/Ripe.cc +@@ -227,7 +227,7 @@ Ripe::KeyPair Ripe::generateRSAKeyPair(unsigned int length, const std::string& s + if (secret.empty()) { + PEM_Save(snk, privateKey); + } else { +- PEM_Save(snk, privateKey, rng, PRIVATE_RSA_ALGORITHM, secret.data(), secret.size()); ++ PEM_Save(snk, rng, privateKey, PRIVATE_RSA_ALGORITHM, secret.data(), secret.size()); + } + snk.MessageEnd(); + } +-- +2.24.3 (Apple Git-128) + diff --git a/vcpkg/ports/licensepp/0002-fix-cmake.patch b/vcpkg/ports/licensepp/0002-fix-cmake.patch new file mode 100644 index 0000000..5f13d03 --- /dev/null +++ b/vcpkg/ports/licensepp/0002-fix-cmake.patch @@ -0,0 +1,38 @@ +From 5a7cbbe8423ee3daf533bcc1fefa7d1f1315634c Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Wed, 23 Sep 2020 09:43:37 -0700 +Subject: [PATCH 2/2] fix cmake + +Remove this patch if https://github.com/amrayn/licensepp/pull/33 is merged +--- + CMakeLists.txt | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b2c39d1..0d49632 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -35,10 +35,8 @@ if (APPLE) + endif() + endif() + +-if(MSVC) +- list (APPEND CMAKE_CXX_FLAGS " -std=c++11 -O3 ") +-else() +- list (APPEND CMAKE_CXX_FLAGS " -std=c++11 -O3 -Wall -Werror ") ++if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3 -Wall") + endif() + + # Check for cryptopp (static) +@@ -73,6 +71,7 @@ endif() + set_target_properties (licensepp-lib PROPERTIES + VERSION ${LICENSEPP_SOVERSION} + ) ++target_include_directories(licensepp-lib PUBLIC $) + target_link_libraries (licensepp-lib + ${CRYPTOPP_LIBRARIES} + ) +-- +2.24.3 (Apple Git-128) + diff --git a/vcpkg/ports/licensepp/CONTROL b/vcpkg/ports/licensepp/CONTROL new file mode 100644 index 0000000..b9bf20b --- /dev/null +++ b/vcpkg/ports/licensepp/CONTROL @@ -0,0 +1,7 @@ +Source: licensepp +Version: 2020-05-19 +Port-Version: 1 +Description: Cross platform software licensing library +Build-Depends: cryptopp[pem-pack] +Supports: !uwp +Homepage: https://github.com/zuhd-org/licensepp diff --git a/vcpkg/ports/licensepp/FindCryptoPP.cmake b/vcpkg/ports/licensepp/FindCryptoPP.cmake new file mode 100644 index 0000000..c7e0f70 --- /dev/null +++ b/vcpkg/ports/licensepp/FindCryptoPP.cmake @@ -0,0 +1,27 @@ +find_path(CRYPTOPP_INCLUDE_DIRS NAMES cryptopp/cryptlib.h) + +get_filename_component(_prefix_path ${CRYPTOPP_INCLUDE_DIRS} PATH) + +find_library( + CRYPTOPP_LIBRARY_DEBUG + NAMES cryptopp-static cryptopp + PATHS ${_prefix_path}/debug/lib + NO_DEFAULT_PATH +) +find_library( + CRYPTOPP_LIBRARY_RELEASE + NAMES cryptopp-static cryptopp + PATHS ${_prefix_path}/lib + NO_DEFAULT_PATH +) + +unset(_prefix_path) + +include(SelectLibraryConfigurations) +select_library_configurations(CRYPTOPP) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + CryptoPP + REQUIRED_VARS CRYPTOPP_LIBRARIES CRYPTOPP_INCLUDE_DIRS +) diff --git a/vcpkg/ports/licensepp/portfile.cmake b/vcpkg/ports/licensepp/portfile.cmake new file mode 100644 index 0000000..aa4d009 --- /dev/null +++ b/vcpkg/ports/licensepp/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO amrayn/licensepp + REF 0b6d669c0b323be004f73d8c811d38158ce8c0c7 + SHA512 2161575815d8ff49110d7c2823662ba30d9f1ca2eb6be6dad1ee0807fb3fa9f28483839a133c9d380035254df7c452f8d6fa7f17fd4f29acd8b9bfbbda059291 + HEAD_REF master + PATCHES + 0001-use-old-pem-pack.patch + 0002-fix-cmake.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindCryptoPP.cmake DESTINATION ${SOURCE_PATH}/cmake) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -Dtest=OFF + -Dtravis=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/${PORT}/cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/linalg/CONTROL b/vcpkg/ports/linalg/CONTROL new file mode 100644 index 0000000..eb2afe6 --- /dev/null +++ b/vcpkg/ports/linalg/CONTROL @@ -0,0 +1,3 @@ +Source: linalg +Version: 2.1 +Description: linalg.h is a single header public domain linear algebra library for C++11 diff --git a/vcpkg/ports/linalg/portfile.cmake b/vcpkg/ports/linalg/portfile.cmake new file mode 100644 index 0000000..4f27777 --- /dev/null +++ b/vcpkg/ports/linalg/portfile.cmake @@ -0,0 +1,12 @@ +#header-only library +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sgorsten/linalg + REF v2.1 + SHA512 48d8248ea1bca3d4fe35d038690f496cd0c8c9469d76eca684668ce6fef5df0eb9556f9b49e4da90e2c2e8ef475791877aa815c3f9437c097fbfc303134d02d7 + HEAD_REF master +) + +configure_file(${SOURCE_PATH}/UNLICENSE ${CURRENT_PACKAGES_DIR}/share/linalg/copyright COPYONLY) +configure_file(${SOURCE_PATH}/linalg.h ${CURRENT_PACKAGES_DIR}/include/linalg.h COPYONLY) \ No newline at end of file diff --git a/vcpkg/ports/linenoise-ng/CONTROL b/vcpkg/ports/linenoise-ng/CONTROL new file mode 100644 index 0000000..cb5f942 --- /dev/null +++ b/vcpkg/ports/linenoise-ng/CONTROL @@ -0,0 +1,3 @@ +Source: linenoise-ng +Version: 4754bee2d8eb3-1 +Description: A small, portable GNU readline replacement for Linux, Windows and MacOS which is capable of handling UTF-8 characters. \ No newline at end of file diff --git a/vcpkg/ports/linenoise-ng/portfile.cmake b/vcpkg/ports/linenoise-ng/portfile.cmake new file mode 100644 index 0000000..18dcfd2 --- /dev/null +++ b/vcpkg/ports/linenoise-ng/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO arangodb/linenoise-ng + REF 4754bee2d8eb3c4511e6ac87cac62255b2011e2f + SHA512 080c6b4cde911a162885a2e6fc95143ab481b4dcc0f8b871a55a071ccb4ab868b19201ec17475a3c3ceef1b82325d757913383b3c46da6946ddc8bfc0d82d9ca + HEAD_REF master +) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/linenoise-ng RENAME copyright) diff --git a/vcpkg/ports/live555/CMakeLists.txt b/vcpkg/ports/live555/CMakeLists.txt new file mode 100644 index 0000000..cb0854b --- /dev/null +++ b/vcpkg/ports/live555/CMakeLists.txt @@ -0,0 +1,33 @@ +cmake_minimum_required(VERSION 3.5) +project(live555 C CXX) + +include_directories( + BasicUsageEnvironment/include + groupsock/include + liveMedia/include + UsageEnvironment/include +) + +if (NOT MSVC) + add_compile_options(-DSOCKLEN_T=socklen_t) +endif() + +file(GLOB BASIC_USAGE_ENVIRONMENT_SRCS BasicUsageEnvironment/*.c BasicUsageEnvironment/*.cpp) +add_library(BasicUsageEnvironment ${BASIC_USAGE_ENVIRONMENT_SRCS}) + +file(GLOB GROUPSOCK_SRCS groupsock/*.c groupsock/*.cpp) +add_library(groupsock ${GROUPSOCK_SRCS}) + +file(GLOB LIVEMEDIA_SRCS liveMedia/*.c liveMedia/*.cpp) +add_library(liveMedia ${LIVEMEDIA_SRCS}) +find_package(OpenSSL REQUIRED) +target_include_directories(liveMedia PRIVATE "${OPENSSL_INCLUDE_DIR}") + +file(GLOB USAGE_ENVIRONMENT_SRCS UsageEnvironment/*.c UsageEnvironment/*.cpp) +add_library(UsageEnvironment ${USAGE_ENVIRONMENT_SRCS}) + +install(TARGETS groupsock BasicUsageEnvironment liveMedia UsageEnvironment + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) diff --git a/vcpkg/ports/live555/CONTROL b/vcpkg/ports/live555/CONTROL new file mode 100644 index 0000000..490972f --- /dev/null +++ b/vcpkg/ports/live555/CONTROL @@ -0,0 +1,5 @@ +Source: live555 +Version: latest-1 +Homepage: https://www.live555.com/liveMedia +Description: A complete RTSP server application +Build-Depends: openssl diff --git a/vcpkg/ports/live555/fix-RTSPClient.patch b/vcpkg/ports/live555/fix-RTSPClient.patch new file mode 100644 index 0000000..6686396 --- /dev/null +++ b/vcpkg/ports/live555/fix-RTSPClient.patch @@ -0,0 +1,13 @@ +diff --git a/liveMedia/RTSPClient.cpp b/liveMedia/RTSPClient.cpp +index 02c46c7..6127698 100644 +--- a/liveMedia/RTSPClient.cpp ++++ b/liveMedia/RTSPClient.cpp +@@ -1939,7 +1939,7 @@ int RTSPClient::write(const u_int8_t* data, unsigned count) { + if (fTLS.isNeeded) { + return fTLS.write(data, count); + } else { +- return send(fOutputSocketNum, data, count, 0); ++ return send(fOutputSocketNum, (const char *)data, count, 0); + } + } + diff --git a/vcpkg/ports/live555/portfile.cmake b/vcpkg/ports/live555/portfile.cmake new file mode 100644 index 0000000..d4a5c06 --- /dev/null +++ b/vcpkg/ports/live555/portfile.cmake @@ -0,0 +1,42 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +if(NOT VCPKG_USE_HEAD_VERSION) + # Live555 only makes the latest releases available for download on their site + message(FATAL_ERROR "Live555 does not have persistent releases. Please re-run the installation with --head.") +endif() + +set(LIVE_VERSION latest) + +vcpkg_download_distfile(ARCHIVE + URLS "http://www.live555.com/liveMedia/public/live555-${LIVE_VERSION}.tar.gz" + FILENAME "live555-${LIVE_VERSION}.tar.gz" + SKIP_SHA512 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + fix-RTSPClient.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(GLOB HEADERS + "${SOURCE_PATH}/BasicUsageEnvironment/include/*.h*" + "${SOURCE_PATH}/groupsock/include/*.h*" + "${SOURCE_PATH}/liveMedia/include/*.h*" + "${SOURCE_PATH}/UsageEnvironment/include/*.h*" +) + +file(COPY ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/llgl/CONTROL b/vcpkg/ports/llgl/CONTROL new file mode 100644 index 0000000..fcba2d2 --- /dev/null +++ b/vcpkg/ports/llgl/CONTROL @@ -0,0 +1,11 @@ +Source: llgl +Version: 2019-08-15 +Homepage: https://github.com/LukasBanana/LLGL +Description: Low Level Graphics Library (LLGL) is a thin abstraction layer for the modern graphics APIs OpenGL, Direct3D, Vulkan, and Metal. +Supports: !uwp + +Feature: opengl +Description: Support for opengl + +Feature: direct3d11 +Description: Support for direct3d11 \ No newline at end of file diff --git a/vcpkg/ports/llgl/fix-arm64-build-error.patch b/vcpkg/ports/llgl/fix-arm64-build-error.patch new file mode 100644 index 0000000..d80061c --- /dev/null +++ b/vcpkg/ports/llgl/fix-arm64-build-error.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f440884..f1a9190 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -559,6 +559,8 @@ if(APPLE) + endif() + elseif(UNIX) + target_link_libraries(LLGL X11 pthread Xxf86vm Xrandr) ++elseif(WIN32) ++ target_link_libraries(LLGL gdi32 shell32) + endif() + + set_target_properties(LLGL PROPERTIES LINKER_LANGUAGE CXX DEBUG_POSTFIX "D") diff --git a/vcpkg/ports/llgl/fix-install-error.patch b/vcpkg/ports/llgl/fix-install-error.patch new file mode 100644 index 0000000..30b9c30 --- /dev/null +++ b/vcpkg/ports/llgl/fix-install-error.patch @@ -0,0 +1,44 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f440884..d1b0c2f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -614,6 +614,12 @@ if(LLGL_BUILD_RENDERER_OPENGL) + target_link_libraries(LLGL_OpenGL LLGL ${OPENGL_LIBRARIES}) + + ADD_DEFINE(LLGL_BUILD_RENDERER_OPENGL) ++ ++ install(TARGETS LLGL_OpenGL ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ ) + else() + message("Missing OpenGL -> LLGL_OpenGL renderer will be excluded from project") + endif() +@@ -681,6 +687,12 @@ if(WIN32) + target_link_libraries(LLGL_Direct3D11 LLGL d3d11 dxgi D3DCompiler) + + ADD_DEFINE(LLGL_BUILD_RENDERER_DIRECT3D11) ++ ++ install(TARGETS LLGL_Direct3D11 ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ ) + endif() + + if(LLGL_BUILD_RENDERER_DIRECT3D12) +@@ -821,4 +833,13 @@ if(LLGL_ENABLE_SPIRV_REFLECT) + message("Including Submodule: SPIRV") + endif() + ++# Install targets ++install(TARGETS ${PROJECT_NAME} ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) ++# Install headers ++install(DIRECTORY ${PROJECT_INCLUDE_DIR} DESTINATION include) ++ + diff --git a/vcpkg/ports/llgl/portfile.cmake b/vcpkg/ports/llgl/portfile.cmake new file mode 100644 index 0000000..c41de8b --- /dev/null +++ b/vcpkg/ports/llgl/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} currently doesn't supports UWP.") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO LukasBanana/LLGL + REF 8f28437960ed60622e94f4f97b24e842b5a0e9e6 + SHA512 8a6bd4109e977f9def0f04a3d31f7bd4beebbe162c52eaa08a54daf8335871615215ece166e5a9d5b5475b834fd53a26ff9638ff270a2f00c88bab21ed156760 + HEAD_REF master + PATCHES + fix-install-error.patch + fix-arm64-build-error.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + opengl LLGL_BUILD_RENDERER_OPENGL + direct3d11 LLGL_BUILD_RENDERER_DIRECT3D11 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_copy_pdbs() + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) \ No newline at end of file diff --git a/vcpkg/ports/llvm/0001-allow-to-use-commas.patch b/vcpkg/ports/llvm/0001-allow-to-use-commas.patch new file mode 100644 index 0000000..8276efa --- /dev/null +++ b/vcpkg/ports/llvm/0001-allow-to-use-commas.patch @@ -0,0 +1,30 @@ +diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt +index a02c2a5a23f..bdbf0b1303c 100644 +--- a/llvm/CMakeLists.txt ++++ b/llvm/CMakeLists.txt +@@ -70,6 +70,12 @@ if( LLVM_ENABLE_PROJECTS STREQUAL "all" ) + set( LLVM_ENABLE_PROJECTS ${LLVM_ALL_PROJECTS}) + endif() + ++# Allow to use commas in LLVM_ENABLE_PROJECTS ("llvm,clang,...") ++string(REPLACE "," ";" fixed_LLVM_ENABLE_PROJECTS "${LLVM_ENABLE_PROJECTS}") ++if(NOT fixed_LLVM_ENABLE_PROJECTS STREQUAL LLVM_ENABLE_PROJECTS) ++ set(LLVM_ENABLE_PROJECTS "${fixed_LLVM_ENABLE_PROJECTS}" CACHE STRING "" FORCE) ++endif() ++ + # LLVM_ENABLE_PROJECTS_USED is `ON` if the user has ever used the + # `LLVM_ENABLE_PROJECTS` CMake cache variable. This exists for + # several reasons: +@@ -383,6 +389,12 @@ set(LLVM_TARGETS_TO_BUILD + ${LLVM_EXPERIMENTAL_TARGETS_TO_BUILD}) + list(REMOVE_DUPLICATES LLVM_TARGETS_TO_BUILD) + ++# Allow to use commas in the LLVM_TARGETS_TO_BUILD ("X86,AArch64,...") ++string(REPLACE "," ";" fixed_LLVM_TARGETS_TO_BUILD "${LLVM_TARGETS_TO_BUILD}") ++if(NOT fixed_LLVM_TARGETS_TO_BUILD STREQUAL LLVM_TARGETS_TO_BUILD) ++ set(LLVM_TARGETS_TO_BUILD "${fixed_LLVM_TARGETS_TO_BUILD}" CACHE STRING "" FORCE) ++endif() ++ + option(LLVM_ENABLE_PIC "Build Position-Independent Code" ON) + option(LLVM_ENABLE_WARNINGS "Enable compiler warnings." ON) + option(LLVM_ENABLE_MODULES "Compile with C++ modules enabled." OFF) diff --git a/vcpkg/ports/llvm/0002-fix-install-paths.patch b/vcpkg/ports/llvm/0002-fix-install-paths.patch new file mode 100644 index 0000000..5e63424 --- /dev/null +++ b/vcpkg/ports/llvm/0002-fix-install-paths.patch @@ -0,0 +1,42 @@ +diff --git a/clang/cmake/modules/CMakeLists.txt b/clang/cmake/modules/CMakeLists.txt +index d233f552f01..26f502ad2d2 100644 +--- a/clang/cmake/modules/CMakeLists.txt ++++ b/clang/cmake/modules/CMakeLists.txt +@@ -1,11 +1,11 @@ + # Generate a list of CMake library targets so that other CMake projects can + # link against them. LLVM calls its version of this file LLVMExports.cmake, but + # the usual CMake convention seems to be ${Project}Targets.cmake. +-set(CLANG_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/clang) ++set(CLANG_INSTALL_PACKAGE_DIR share/clang) + set(clang_cmake_builddir "${CMAKE_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR}") + + # Keep this in sync with llvm/cmake/CMakeLists.txt! +-set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm) ++set(LLVM_INSTALL_PACKAGE_DIR share/llvm) + set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}") + + get_property(CLANG_EXPORTS GLOBAL PROPERTY CLANG_EXPORTS) +diff --git a/llvm/cmake/modules/CMakeLists.txt b/llvm/cmake/modules/CMakeLists.txt +index 9cf22b436fa..8eeb27d1794 100644 +--- a/llvm/cmake/modules/CMakeLists.txt ++++ b/llvm/cmake/modules/CMakeLists.txt +@@ -1,4 +1,4 @@ +-set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm) ++set(LLVM_INSTALL_PACKAGE_DIR share/llvm) + set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}") + + # First for users who use an installed LLVM, create the LLVMExports.cmake file. +diff --git a/polly/cmake/CMakeLists.txt b/polly/cmake/CMakeLists.txt +index 211f9551271..2abe3803f91 100644 +--- a/polly/cmake/CMakeLists.txt ++++ b/polly/cmake/CMakeLists.txt +@@ -1,7 +1,7 @@ + # Keep this in sync with llvm/cmake/CMakeLists.txt! + +-set(LLVM_INSTALL_PACKAGE_DIR "lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm") +-set(POLLY_INSTALL_PACKAGE_DIR "lib${LLVM_LIBDIR_SUFFIX}/cmake/polly") ++set(LLVM_INSTALL_PACKAGE_DIR share/llvm) ++set(POLLY_INSTALL_PACKAGE_DIR share/polly) + if (CMAKE_CONFIGURATION_TYPES) + set(POLLY_EXPORTS_FILE_NAME "PollyExports-$>.cmake") + else() diff --git a/vcpkg/ports/llvm/0003-fix-vs2019-v16.6.patch b/vcpkg/ports/llvm/0003-fix-vs2019-v16.6.patch new file mode 100644 index 0000000..0c89eb5 --- /dev/null +++ b/vcpkg/ports/llvm/0003-fix-vs2019-v16.6.patch @@ -0,0 +1,15 @@ +diff --git a/llvm/include/llvm/Support/ManagedStatic.h b/llvm/include/llvm/Support/ManagedStatic.h +index bbd0d04ed..f2b41422f 100644 +--- a/llvm/include/llvm/Support/ManagedStatic.h ++++ b/llvm/include/llvm/Support/ManagedStatic.h +@@ -40,8 +40,8 @@ template struct object_deleter { + // constexpr, a dynamic initializer may be emitted depending on optimization + // settings. For the affected versions of MSVC, use the old linker + // initialization pattern of not providing a constructor and leaving the fields +-// uninitialized. +-#if !defined(_MSC_VER) || defined(__clang__) ++// uninitialized. See http://llvm.org/PR41367 for details. ++#if !defined(_MSC_VER) || (_MSC_VER >= 1925) || defined(__clang__) + #define LLVM_USE_CONSTEXPR_CTOR + #endif + diff --git a/vcpkg/ports/llvm/0004-fix-dr-1734.patch b/vcpkg/ports/llvm/0004-fix-dr-1734.patch new file mode 100644 index 0000000..adfbe5a --- /dev/null +++ b/vcpkg/ports/llvm/0004-fix-dr-1734.patch @@ -0,0 +1,14 @@ +diff --git a/llvm/include/llvm/Support/type_traits.h b/llvm/include/llvm/Support/type_traits.h +index b7d48e8e1ad..53ba24efc00 100644 +--- a/llvm/include/llvm/Support/type_traits.h ++++ b/llvm/include/llvm/Support/type_traits.h +@@ -177,7 +177,8 @@ class is_trivially_copyable { + (has_deleted_copy_assign || has_trivial_copy_assign) && + (has_deleted_copy_constructor || has_trivial_copy_constructor); + +-#ifdef HAVE_STD_IS_TRIVIALLY_COPYABLE ++ // due to DR 1734, a type can be std::is_trivially_copyable but not llvm::is_trivially_copyable ++#if 0 + static_assert(value == std::is_trivially_copyable::value, + "inconsistent behavior between llvm:: and std:: implementation of is_trivially_copyable"); + #endif diff --git a/vcpkg/ports/llvm/CONTROL b/vcpkg/ports/llvm/CONTROL new file mode 100644 index 0000000..f461f1c --- /dev/null +++ b/vcpkg/ports/llvm/CONTROL @@ -0,0 +1,103 @@ +Source: llvm +Version: 10.0.0 +Port-Version: 5 +Homepage: https://llvm.org/ +Description: The LLVM Compiler Infrastructure +Supports: !uwp +Default-Features: tools, enable-rtti, disable-assertions, disable-abi-breaking-checks, clang, disable-clang-static-analyzer, lld + +Feature: tools +Description: Build LLVM tools. + +Feature: utils +Description: Build LLVM utils. + +Feature: target-all +Description: Build with all backends. + +Feature: target-aarch64 +Description: Build with AArch64 backend. + +Feature: target-amdgpu +Description: Build with AMDGPU backend. + +Feature: target-arm +Description: Build with ARM backend. + +Feature: target-bpf +Description: Build with BPF backend. + +Feature: target-hexagon +Description: Build with Hexagon backend. + +Feature: target-lanai +Description: Build with Lanai backend. + +Feature: target-mips +Description: Build with Mips backend. + +Feature: target-msp430 +Description: Build with MSP430 backend. + +Feature: target-nvptx +Description: Build with NVPTX backend. + +Feature: target-powerpc +Description: Build with PowerPC backend. + +Feature: target-riscv +Description: Build with RISCV backend. + +Feature: target-sparc +Description: Build with Sparc backend. + +Feature: target-systemz +Description: Build with SystemZ backend. + +Feature: target-webassembly +Description: Build with WebAssembly backend. + +Feature: target-x86 +Description: Build with X86 backend. + +Feature: target-xcore +Description: Build with XCore backend. + +Feature: enable-rtti +Description: Build LLVM with run-time type information. + +Feature: enable-assertions +Description: Build LLVM with assertions. + +Feature: disable-assertions +Description: Build LLVM without assertions. + +Feature: enable-abi-breaking-checks +Description: Build LLVM with LLVM_ABI_BREAKING_CHECKS=FORCE_ON. + +Feature: disable-abi-breaking-checks +Description: Build LLVM with LLVM_ABI_BREAKING_CHECKS=FORCE_OFF. + +Feature: clang +Description: Build C Language Family Front-end. + +Feature: disable-clang-static-analyzer +Description: Build without static analyzer. + +Feature: clang-tools-extra +Description: Build Clang tools. + +Feature: compiler-rt +Description: Build compiler's runtime libraries. + +Feature: lld +Description: Build LLVM linker. + +Feature: openmp +Description: Build LLVM OpenMP libraries. + +Feature: lldb +Description: Build LLDB debugger. + +Feature: polly +Description: Build polyhedral optimizations for LLVM. diff --git a/vcpkg/ports/llvm/portfile.cmake b/vcpkg/ports/llvm/portfile.cmake new file mode 100644 index 0000000..305e6bf --- /dev/null +++ b/vcpkg/ports/llvm/portfile.cmake @@ -0,0 +1,262 @@ +set(VERSION "10.0.0") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO llvm/llvm-project + REF llvmorg-10.0.0 + SHA512 baa182d62fef1851836013ae8a1a00861ea89769778d67fb97b407a9de664e6c85da2af9c5b3f75d2bf34ff6b00004e531ca7e4b3115a26c0e61c575cf2303a0 + HEAD_REF master + PATCHES + 0001-allow-to-use-commas.patch + 0002-fix-install-paths.patch + 0003-fix-vs2019-v16.6.patch + 0004-fix-dr-1734.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tools LLVM_BUILD_TOOLS + tools LLVM_INCLUDE_TOOLS + utils LLVM_BUILD_UTILS + utils LLVM_INCLUDE_UTILS + enable-rtti LLVM_ENABLE_RTTI +) + +# By default assertions are enabled for Debug configuration only. +if("enable-assertions" IN_LIST FEATURES) + # Force enable assertions for all configurations. + list(APPEND FEATURE_OPTIONS + -DLLVM_ENABLE_ASSERTIONS=ON + ) +elseif("disable-assertions" IN_LIST FEATURES) + # Force disable assertions for all configurations. + list(APPEND FEATURE_OPTIONS + -DLLVM_ENABLE_ASSERTIONS=OFF + ) +endif() + +# LLVM_ABI_BREAKING_CHECKS can be WITH_ASSERTS (default), FORCE_ON or FORCE_OFF. +# By default abi-breaking checks are enabled if assertions are enabled. +if("enable-abi-breaking-checks" IN_LIST FEATURES) + # Force enable abi-breaking checks. + list(APPEND FEATURE_OPTIONS + -DLLVM_ABI_BREAKING_CHECKS=FORCE_ON + ) +elseif("disable-abi-breaking-checks" IN_LIST FEATURES) + # Force disable abi-breaking checks. + list(APPEND FEATURE_OPTIONS + -DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF + ) +endif() + +set(LLVM_ENABLE_PROJECTS) +if("clang" IN_LIST FEATURES OR "clang-tools-extra" IN_LIST FEATURES) + list(APPEND LLVM_ENABLE_PROJECTS "clang") + if("disable-clang-static-analyzer" IN_LIST FEATURES) + list(APPEND FEATURE_OPTIONS + # Disable ARCMT + -DCLANG_ENABLE_ARCMT=OFF + # Disable static analyzer + -DCLANG_ENABLE_STATIC_ANALYZER=OFF + ) + endif() + if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND FEATURE_OPTIONS + # Disable dl library on Windows + -DDL_LIBRARY_PATH:FILEPATH= + ) + endif() +endif() +if("clang-tools-extra" IN_LIST FEATURES) + list(APPEND LLVM_ENABLE_PROJECTS "clang-tools-extra") +endif() +if("compiler-rt" IN_LIST FEATURES) + list(APPEND LLVM_ENABLE_PROJECTS "compiler-rt") +endif() +if("lld" IN_LIST FEATURES) + list(APPEND LLVM_ENABLE_PROJECTS "lld") +endif() +if("openmp" IN_LIST FEATURES) + list(APPEND LLVM_ENABLE_PROJECTS "openmp") + # Perl is required for the OpenMP run-time + vcpkg_find_acquire_program(PERL) + list(APPEND FEATURE_OPTIONS + -DPERL_EXECUTABLE=${PERL} + ) +endif() +if("lldb" IN_LIST FEATURES) + list(APPEND LLVM_ENABLE_PROJECTS "lldb") +endif() +if("polly" IN_LIST FEATURES) + list(APPEND LLVM_ENABLE_PROJECTS "polly") +endif() + +set(LLVM_TARGETS_TO_BUILD) +if("target-all" IN_LIST FEATURES) + set(LLVM_TARGETS_TO_BUILD "all") +else() + if("target-aarch64" IN_LIST FEATURES) + list(APPEND LLVM_TARGETS_TO_BUILD "AArch64") + endif() + if("target-amdgpu" IN_LIST FEATURES) + list(APPEND LLVM_TARGETS_TO_BUILD "AMDGPU") + endif() + if("target-arm" IN_LIST FEATURES) + list(APPEND LLVM_TARGETS_TO_BUILD "ARM") + endif() + if("target-bpf" IN_LIST FEATURES) + list(APPEND LLVM_TARGETS_TO_BUILD "BPF") + endif() + if("target-hexagon" IN_LIST FEATURES) + list(APPEND LLVM_TARGETS_TO_BUILD "Hexagon") + endif() + if("target-lanai" IN_LIST FEATURES) + list(APPEND LLVM_TARGETS_TO_BUILD "Lanai") + endif() + if("target-mips" IN_LIST FEATURES) + list(APPEND LLVM_TARGETS_TO_BUILD "Mips") + endif() + if("target-msp430" IN_LIST FEATURES) + list(APPEND LLVM_TARGETS_TO_BUILD "MSP430") + endif() + if("target-nvptx" IN_LIST FEATURES) + list(APPEND LLVM_TARGETS_TO_BUILD "NVPTX") + endif() + if("target-powerpc" IN_LIST FEATURES) + list(APPEND LLVM_TARGETS_TO_BUILD "PowerPC") + endif() + if("target-riscv" IN_LIST FEATURES) + list(APPEND LLVM_TARGETS_TO_BUILD "RISCV") + endif() + if("target-sparc" IN_LIST FEATURES) + list(APPEND LLVM_TARGETS_TO_BUILD "Sparc") + endif() + if("target-systemz" IN_LIST FEATURES) + list(APPEND LLVM_TARGETS_TO_BUILD "SystemZ") + endif() + if("target-webassembly" IN_LIST FEATURES) + list(APPEND LLVM_TARGETS_TO_BUILD "WebAssembly") + endif() + if("target-x86" IN_LIST FEATURES) + list(APPEND LLVM_TARGETS_TO_BUILD "X86") + endif() + if("target-xcore" IN_LIST FEATURES) + list(APPEND LLVM_TARGETS_TO_BUILD "XCore") + endif() +endif() + +# Detect target to build if not specified +if("${LLVM_TARGETS_TO_BUILD}" STREQUAL "") + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(LLVM_TARGETS_TO_BUILD "X86") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(LLVM_TARGETS_TO_BUILD "ARM") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(LLVM_TARGETS_TO_BUILD "AArch64") + else() + set(LLVM_TARGETS_TO_BUILD "all") + endif() +endif() + +# Use comma-separated string instead of semicolon-separated string. +# See https://github.com/microsoft/vcpkg/issues/4320 +string(REPLACE ";" "," LLVM_ENABLE_PROJECTS "${LLVM_ENABLE_PROJECTS}") +string(REPLACE ";" "," LLVM_TARGETS_TO_BUILD "${LLVM_TARGETS_TO_BUILD}") + +vcpkg_find_acquire_program(PYTHON3) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/llvm + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DLLVM_INCLUDE_EXAMPLES=OFF + -DLLVM_BUILD_EXAMPLES=OFF + -DLLVM_INCLUDE_TESTS=OFF + -DLLVM_BUILD_TESTS=OFF + # Disable optional dependencies to libxml2 and zlib + -DLLVM_ENABLE_LIBXML2=OFF + -DLLVM_ENABLE_ZLIB=OFF + # Force TableGen to be built with optimization. This will significantly improve build time. + -DLLVM_OPTIMIZED_TABLEGEN=ON + # LLVM generates CMake error due to Visual Studio version 16.4 is known to miscompile part of LLVM. + # LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON disables this error. + # See https://developercommunity.visualstudio.com/content/problem/845933/miscompile-boolean-condition-deduced-to-be-always.html + -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON + -DLLVM_ENABLE_PROJECTS=${LLVM_ENABLE_PROJECTS} + -DLLVM_TARGETS_TO_BUILD=${LLVM_TARGETS_TO_BUILD} + -DPACKAGE_VERSION=${VERSION} + -DPYTHON_EXECUTABLE=${PYTHON3} + # Limit the maximum number of concurrent link jobs to 1. This should fix low amount of memory issue for link. + -DLLVM_PARALLEL_LINK_JOBS=1 + # Disable build LLVM-C.dll (Windows only) due to doesn't compile with CMAKE_DEBUG_POSTFIX + -DLLVM_BUILD_LLVM_C_DYLIB=OFF + -DCMAKE_DEBUG_POSTFIX=d +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/${PORT}) +if("clang" IN_LIST FEATURES) + vcpkg_fixup_cmake_targets(CONFIG_PATH share/clang TARGET_PATH share/clang) +endif() + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(GLOB_RECURSE _llvm_release_targets + "${CURRENT_PACKAGES_DIR}/share/llvm/*-release.cmake" + ) + set(_clang_release_targets) + if("clang" IN_LIST FEATURES) + file(GLOB_RECURSE _clang_release_targets + "${CURRENT_PACKAGES_DIR}/share/clang/*-release.cmake" + ) + endif() + foreach(_target IN LISTS _llvm_release_targets _clang_release_targets) + file(READ ${_target} _contents) + # LLVM tools should be located in the bin folder because llvm-config expects to be inside a bin dir. + # Rename `/tools/${PORT}` to `/bin` back because there is no way to avoid this in vcpkg_fixup_cmake_targets. + string(REPLACE "{_IMPORT_PREFIX}/tools/${PORT}" "{_IMPORT_PREFIX}/bin" _contents "${_contents}") + file(WRITE ${_target} "${_contents}") + endforeach() +endif() + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(GLOB_RECURSE _llvm_debug_targets + "${CURRENT_PACKAGES_DIR}/share/llvm/*-debug.cmake" + ) + set(_clang_debug_targets) + if("clang" IN_LIST FEATURES) + file(GLOB_RECURSE _clang_debug_targets + "${CURRENT_PACKAGES_DIR}/share/clang/*-debug.cmake" + ) + endif() + foreach(_target IN LISTS _llvm_debug_targets _clang_debug_targets) + file(READ ${_target} _contents) + # LLVM tools should be located in the bin folder because llvm-config expects to be inside a bin dir. + # Rename `/tools/${PORT}` to `/bin` back because there is no way to avoid this in vcpkg_fixup_cmake_targets. + string(REPLACE "{_IMPORT_PREFIX}/tools/${PORT}" "{_IMPORT_PREFIX}/bin" _contents "${_contents}") + # Debug shared libraries should have `d` suffix and should be installed in the `/bin` directory. + # Rename `/debug/bin/` to `/bin` + string(REPLACE "{_IMPORT_PREFIX}/debug/bin/" "{_IMPORT_PREFIX}/bin/" _contents "${_contents}") + file(WRITE ${_target} "${_contents}") + endforeach() + + # Install debug shared libraries in the `/bin` directory + file(GLOB _debug_shared_libs ${CURRENT_PACKAGES_DIR}/debug/bin/*${CMAKE_SHARED_LIBRARY_SUFFIX}) + file(INSTALL ${_debug_shared_libs} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/bin + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/llvm/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +if("clang" IN_LIST FEATURES) + file(INSTALL ${SOURCE_PATH}/clang/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/clang RENAME copyright) +endif() + +# Don't fail if the bin folder exists. +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/vcpkg/ports/lmdb/CONTROL b/vcpkg/ports/lmdb/CONTROL new file mode 100644 index 0000000..baee5bd --- /dev/null +++ b/vcpkg/ports/lmdb/CONTROL @@ -0,0 +1,4 @@ +Source: lmdb +Version: 0.9.24 +Homepage: https://github.com/LMDB/lmdb +Description: LMDB is an extraordinarily fast, memory-efficient database diff --git a/vcpkg/ports/lmdb/cmake/CMakeLists.txt b/vcpkg/ports/lmdb/cmake/CMakeLists.txt new file mode 100644 index 0000000..dfa6178 --- /dev/null +++ b/vcpkg/ports/lmdb/cmake/CMakeLists.txt @@ -0,0 +1,82 @@ +cmake_minimum_required(VERSION 2.8) + +file(READ "${CMAKE_CURRENT_SOURCE_DIR}/lmdb.h" VERSION_HEADER) +string(REGEX MATCH ".*MDB_VERSION_MAJOR[ \t]+([0-9])" MAJOR_VERSION_MATCH "${VERSION_HEADER}") +set(LMDB_MAJOR_VERSION ${CMAKE_MATCH_1}) +string(REGEX MATCH ".*MDB_VERSION_MINOR[ \t]+([0-9])" MINOR_VERSION_MATCH "${VERSION_HEADER}") +set(LMDB_MINOR_VERSION ${CMAKE_MATCH_1}) +string(REGEX MATCH ".*MDB_VERSION_PATCH[ \t]+([0-9]+)" PATCH_VERSION_MATCH "${VERSION_HEADER}") +set(LMDB_PATCH_VERSION ${CMAKE_MATCH_1}) + +set(LMDB_VERSION "${LMDB_MAJOR_VERSION}.${LMDB_MINOR_VERSION}.${LMDB_PATCH_VERSION}") + +project(lmdb) + +option(LMDB_BUILD_TOOLS "Build lmdb tools" OFF) +option(LMDB_BUILD_TESTS "Build lmdb tests" OFF) +option(LMDB_INSTALL_HEADERS "Install LMDB header files" ON) +set(LMDB_INCLUDE_INSTALL_DIR include CACHE PATH "Install directory for headers") +set(LMDB_LIBRARY_INSTALL_DIR lib CACHE PATH "Install directory for library") +set(LMDB_RUNTIME_INSTALL_DIR bin CACHE PATH "Install directory for binaries/dlls") +set(LMDB_CONFIG_INSTALL_DIR share/lmdb CACHE PATH "Install directory for cmake config files") + + +if(BUILD_SHARED_LIBS) +set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DEF:\"${CMAKE_CURRENT_SOURCE_DIR}/lmdbd.def\"") +set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DEF:\"${CMAKE_CURRENT_SOURCE_DIR}/lmdb.def\"") +endif() + +set(SRCS lmdb mdb.c lmdb.h midl.c midl.h ) +add_library(lmdb ${SRCS}) +set_target_properties(lmdb PROPERTIES DEBUG_POSTFIX d) +if (WIN32) + target_link_libraries(lmdb PRIVATE ntdll.lib) +endif() + +install(TARGETS lmdb DESTINATION lib + EXPORT lmdb-targets + RUNTIME DESTINATION ${LMDB_RUNTIME_INSTALL_DIR} + LIBRARY DESTINATION ${LMDB_LIBRARY_INSTALL_DIR} + ARCHIVE DESTINATION ${LMDB_LIBRARY_INSTALL_DIR} + ) + +if(LMDB_INSTALL_HEADERS) + install(FILES lmdb.h midl.h DESTINATION ${LMDB_INCLUDE_INSTALL_DIR}) +endif() + +include(CMakePackageConfigHelpers) + +set(INSTALL_INCLUDE_DIR ${LMDB_INCLUDE_INSTALL_DIR}) +configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/package-config.cmakein ${CMAKE_CURRENT_BINARY_DIR}/lmdb-config.cmake + INSTALL_DESTINATION ${LMDB_CONFIG_INSTALL_DIR} + PATH_VARS INSTALL_INCLUDE_DIR + ) + +write_basic_package_version_file( ${CMAKE_CURRENT_BINARY_DIR}/lmdb-config-version.cmake VERSION ${LMDB_VERSION} COMPATIBILITY SameMajorVersion ) + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lmdb-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/lmdb-config-version.cmake + DESTINATION ${LMDB_CONFIG_INSTALL_DIR} ) + + +install(EXPORT lmdb-targets DESTINATION ${LMDB_CONFIG_INSTALL_DIR}) + +if(LMDB_BUILD_TOOLS) + # don't build mdb_dump/load/stat since they will + # not build on windows + foreach(_tool mdb_copy) + add_executable(${_tool} ${_tool}.c) + target_link_libraries(${_tool} lmdb) + endforeach() +endif() + +if(LMDB_BUILD_TESTS) + enable_testing() + # don't use mtest6 since it will only build in static + # build + foreach(_test mtest mtest2 mtest3 mtest4 mtest5) + add_executable(${_test} ${_test}.c) + target_link_libraries(${_test} lmdb) + add_test(NAME ${_test} + COMMAND ${CMAKE_COMMAND} -DTEST=$ +) + +file(WRITE "${CMAKE_BINARY_DIR}/lodepng-config.cmake" "include(\"\${CMAKE_CURRENT_LIST_DIR}/lodepng-targets.cmake\")") +install(FILES "${CMAKE_BINARY_DIR}/lodepng-config.cmake" DESTINATION "share/lodepng/") + +install(TARGETS lodepng EXPORT lodepng-targets) + +install(EXPORT lodepng-targets DESTINATION share/lodepng/) + +if(NOT DDISABLE_INSTALL_EXAMPLES) + install(DIRECTORY examples DESTINATION share/lodepng/) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES lodepng.h lodepng_util.h DESTINATION include) +endif() diff --git a/vcpkg/ports/lodepng/CONTROL b/vcpkg/ports/lodepng/CONTROL new file mode 100644 index 0000000..b923854 --- /dev/null +++ b/vcpkg/ports/lodepng/CONTROL @@ -0,0 +1,4 @@ +Source: lodepng +Version: 2020-03-15 +Homepage: https://github.com/lvandeve/lodepng +Description: PNG encoder and decoder in C and C++ diff --git a/vcpkg/ports/lodepng/portfile.cmake b/vcpkg/ports/lodepng/portfile.cmake new file mode 100644 index 0000000..680c04d --- /dev/null +++ b/vcpkg/ports/lodepng/portfile.cmake @@ -0,0 +1,29 @@ + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lvandeve/lodepng + REF e34ac04553e51a6982ae234d98ce6b76dd57a6a1 + SHA512 ab79fb2c6403e5d7bdf0b94a3f93f6513889eda8e6b74fb2b569fbc6f95fb79474654818cb0e71eff88214ca7c42ebd7c95f734a2faa77259fe06bfddcb6967a + 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 + -DDISABLE_INSTALL_TOOLS=ON + -DDDISABLE_INSTALL_EXAMPLES=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Moves all .cmake files from /debug/share/lodepng/ to /share/lodepng/ +vcpkg_fixup_cmake_targets() + +file(INSTALL ${SOURCE_PATH}/lodepng.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/log4cplus/CONTROL b/vcpkg/ports/log4cplus/CONTROL new file mode 100644 index 0000000..9a288a1 --- /dev/null +++ b/vcpkg/ports/log4cplus/CONTROL @@ -0,0 +1,5 @@ +Source: log4cplus +Version: 2.0.5 +Homepage: https://github.com/log4cplus/log4cplus +Description: A simple to use C++ logging API providing thread--safe, flexible, and arbitrarily granular control over log management and configuration +Build-Depends: catch diff --git a/vcpkg/ports/log4cplus/portfile.cmake b/vcpkg/ports/log4cplus/portfile.cmake new file mode 100644 index 0000000..a8862e7 --- /dev/null +++ b/vcpkg/ports/log4cplus/portfile.cmake @@ -0,0 +1,45 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO log4cplus/log4cplus + REF 9d00f7d10f2507f68f9ab5fea8b842735d9c6cfe # REL_2_0_5 + SHA512 b64a1d3a60584b2ba3a58470a0b0ec4c22eb0c054c0ef8ef3808fcba5604860fbd5b2d96148939ea15d3bf2ff1e40e684710dc81b57b73232851a486251f648d + HEAD_REF master +) + +vcpkg_from_github( + OUT_SOURCE_PATH THREADPOOL_SOURCE_PATH + REPO log4cplus/ThreadPool + REF cc0b6371d3963f7028c2da5fc007733f9f3bf205 + SHA512 ad4d287c1f83acac4c127136bc92489c43bb5293613dc54b878b8e75a8583f7eefda6434d09789dad47b87a5d38f10a07a746d42d299410c11f2dbcce8af3012 + HEAD_REF master +) + +file( + COPY + ${THREADPOOL_SOURCE_PATH}/COPYING + ${THREADPOOL_SOURCE_PATH}/example.cpp + ${THREADPOOL_SOURCE_PATH}/README.md + ${THREADPOOL_SOURCE_PATH}/ThreadPool.h + DESTINATION ${SOURCE_PATH}/threadpool +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DLOG4CPLUS_BUILD_TESTING=OFF + -DLOG4CPLUS_BUILD_LOGGINGSERVER=OFF + -DWITH_UNIT_TESTS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/log4cplus) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/log4cpp/CONTROL b/vcpkg/ports/log4cpp/CONTROL new file mode 100644 index 0000000..11d3c02 --- /dev/null +++ b/vcpkg/ports/log4cpp/CONTROL @@ -0,0 +1,6 @@ +Source: log4cpp +Version: 2.9.1 +Port-Version: 3 +Homepage: https://github.com/orocos-toolchain/log4cpp +Description: Log4cpp is library of C++ classes for flexible logging to files, syslog, IDSA and other destinations. It is modeled after the Log4j Java library, staying as close to their API as is reasonable. +Supports: !uwp diff --git a/vcpkg/ports/log4cpp/Fix-StaticSupport.patch b/vcpkg/ports/log4cpp/Fix-StaticSupport.patch new file mode 100644 index 0000000..8053b4c --- /dev/null +++ b/vcpkg/ports/log4cpp/Fix-StaticSupport.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 529c18e..beace9e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -21,7 +21,11 @@ SET(LOG4CPP_LIBS) + + IF (WIN32) + SET (CMAKE_DEBUG_POSTFIX "d") +- LIST(APPEND LOG4CPP_CFLAGS -D_CRT_SECURE_NO_WARNINGS -DLOG4CPP_HAS_DLL -DLOG4CPP_BUILD_DLL ) ++ IF (BUILD_SHARED_LIBS) ++ LIST(APPEND LOG4CPP_CFLAGS -D_CRT_SECURE_NO_WARNINGS -DLOG4CPP_HAS_DLL -DLOG4CPP_BUILD_DLL ) ++ ELSE () ++ LIST(APPEND LOG4CPP_CFLAGS -D_CRT_SECURE_NO_WARNINGS ) ++ ENDIF () + ELSE (WIN32) + IF (APPLE) + # LIST(APPEND LOG4CPP_CFLAGS -DLOG4CPP_HAVE_SSTREAM) +@@ -32,7 +36,7 @@ ENDIF (WIN32) + + SET ( LOG4CPP_LIBRARY_NAME "orocos-log4cpp" ) + +-ADD_LIBRARY ( ${LOG4CPP_LIBRARY_NAME} SHARED ++ADD_LIBRARY ( ${LOG4CPP_LIBRARY_NAME} + src/Appender.cpp + src/AppenderSkeleton.cpp + src/AppendersFactory.cpp diff --git a/vcpkg/ports/log4cpp/fix-includepath.patch b/vcpkg/ports/log4cpp/fix-includepath.patch new file mode 100644 index 0000000..2fdac90 --- /dev/null +++ b/vcpkg/ports/log4cpp/fix-includepath.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index beace9e..c8264ec 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -136,7 +136,7 @@ SET(prefix "${CMAKE_INSTALL_PREFIX}") + SET(exec_prefix "\${prefix}") + SET(log4cpp_cflags "") + SET(log4cpp_libs "${LOG4CPP_LIBS}") +-SET(includedir "\${prefix}/include/orocos") ++SET(includedir "\${prefix}/include") + SET(libdir "\${prefix}/lib") + CONFIGURE_FILE(log4cpp.pc.in ${CMAKE_CURRENT_BINARY_DIR}/orocos-log4cpp.pc @ONLY) + +@@ -147,7 +147,7 @@ INSTALL( + + INSTALL ( + DIRECTORY include/log4cpp +- DESTINATION include/orocos ++ DESTINATION include + PATTERN "config.h.in" EXCLUDE + PATTERN ".svn" EXCLUDE + PATTERN "*.am" EXCLUDE +@@ -157,7 +157,7 @@ INSTALL ( + + INSTALL ( + FILES ${CMAKE_CURRENT_BINARY_DIR}/include/log4cpp/config.h +- DESTINATION include/orocos/log4cpp ++ DESTINATION include/log4cpp + ) + + INSTALL(TARGETS ${LOG4CPP_LIBRARY_NAME} diff --git a/vcpkg/ports/log4cpp/fix-install-targets.patch b/vcpkg/ports/log4cpp/fix-install-targets.patch new file mode 100644 index 0000000..49cdedf --- /dev/null +++ b/vcpkg/ports/log4cpp/fix-install-targets.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8db2287..529c18e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -159,7 +159,7 @@ INSTALL ( + INSTALL(TARGETS ${LOG4CPP_LIBRARY_NAME} + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +- RUNTIME DESTINATION lib) ++ RUNTIME DESTINATION bin) + + INSTALL(FILES package.xml DESTINATION share/log4cpp) + diff --git a/vcpkg/ports/log4cpp/portfile.cmake b/vcpkg/ports/log4cpp/portfile.cmake new file mode 100644 index 0000000..e8de2c0 --- /dev/null +++ b/vcpkg/ports/log4cpp/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO orocos-toolchain/log4cpp + REF v2.9.1 + SHA512 5bd222c820a15c5d96587ac9fe864c3e2dc0fbce8389692be8dd41553ac0308002ad8d6f4ef3ef10af1d796f8ded410788d1a5d22f15505fac639da3f73e3518 + HEAD_REF master + PATCHES + fix-install-targets.patch + Fix-StaticSupport.patch + fix-includepath.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/pkgconfig TARGET_PATH share/${PORT}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/log4cxx/CONTROL b/vcpkg/ports/log4cxx/CONTROL new file mode 100644 index 0000000..b7713bd --- /dev/null +++ b/vcpkg/ports/log4cxx/CONTROL @@ -0,0 +1,7 @@ +Source: log4cxx +Version: 0.11.0 +Port-Version: 1 +Homepage: https://logging.apache.org/log4cxx +Description: Apache log4cxx is a logging framework for C++ patterned after Apache log4j, which uses Apache Portable Runtime for most platform-specific code and should be usable on any platform supported by APR +Supports: !uwp +Build-Depends: apr, apr-util diff --git a/vcpkg/ports/log4cxx/expat.patch b/vcpkg/ports/log4cxx/expat.patch new file mode 100644 index 0000000..da01721 --- /dev/null +++ b/vcpkg/ports/log4cxx/expat.patch @@ -0,0 +1,59 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d30a71b..3ecf5f0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -23,6 +23,9 @@ find_package(APR REQUIRED) + # Find Apache Runtime Utilities + find_package(APR-Util REQUIRED) + ++# Find expat for XML parsing ++find_package(EXPAT REQUIRED) ++ + # Building + add_subdirectory(src) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 3e0cb17..9a450b7 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1,7 +1,7 @@ + add_subdirectory(main) + target_compile_definitions(log4cxx PRIVATE ${LOG4CXX_COMPILE_DEFINITIONS} ${APR_COMPILE_DEFINITIONS} ${APR_UTIL_COMPILE_DEFINITIONS} ) + target_include_directories(log4cxx INTERFACE $ PRIVATE ${APR_INCLUDE_DIR} ${APR_UTIL_INCLUDE_DIR}) +-target_link_libraries(log4cxx PRIVATE ${APR_UTIL_LIBRARIES} ${XMLLIB_LIBRARIES} ${APR_LIBRARIES} ${APR_SYSTEM_LIBS}) ++target_link_libraries(log4cxx PRIVATE ${APR_UTIL_LIBRARIES} EXPAT::EXPAT ${APR_LIBRARIES} ${APR_SYSTEM_LIBS}) + if(WIN32) + # The ODBC appender is always enabled in the Windows configuration + target_link_libraries(log4cxx PRIVATE odbc32.lib) +diff --git a/src/cmake/FindAPR-Util.cmake b/src/cmake/FindAPR-Util.cmake +index bb4e951..75093d8 100644 +--- a/src/cmake/FindAPR-Util.cmake ++++ b/src/cmake/FindAPR-Util.cmake +@@ -38,7 +38,6 @@ if(EXISTS ${APR_UTIL_CONFIG_EXECUTABLE}) + _apu_invoke(_apu_util_link_args --link-ld) + string(REGEX MATCH "-L([^ ]+)" _apu_util_L_flag ${_apu_util_link_args}) + find_library(APR_UTIL_LIBRARIES NAMES libaprutil-1.a PATHS "${CMAKE_MATCH_1}") +- _apu_invoke(XMLLIB_LIBRARIES --libs) + set(APR_UTIL_COMPILE_DEFINITIONS APU_DECLARE_STATIC) + else() + _apu_invoke(APR_UTIL_LIBRARIES --link-ld) +@@ -48,8 +47,6 @@ else() + if (APU_STATIC OR NOT BUILD_SHARED_LIBS) + set(APR_UTIL_COMPILE_DEFINITIONS APU_DECLARE_STATIC) + find_library(APR_UTIL_LIBRARIES NAMES aprutil-1) +- find_library(XMLLIB_LIBRARIES NAMES libexpat) +- find_program(XMLLIB_DLL libexpat.dll) + else() + find_library(APR_UTIL_LIBRARIES NAMES libaprutil-1) + find_program(APR_UTIL_DLL libaprutil-1.dll) +diff --git a/src/test/cpp/xml/CMakeLists.txt b/src/test/cpp/xml/CMakeLists.txt +index bddfe48..138c489 100644 +--- a/src/test/cpp/xml/CMakeLists.txt ++++ b/src/test/cpp/xml/CMakeLists.txt +@@ -4,5 +4,5 @@ add_executable(xmltests + xmllayouttestcase + ) + +-target_link_libraries(xmltests PRIVATE ${APR_UTIL_LIBRARIES} ${XMLLIB_LIBRARIES}) ++target_link_libraries(xmltests PRIVATE ${APR_UTIL_LIBRARIES} EXPAT::EXPAT) + set(ALL_LOG4CXX_TESTS ${ALL_LOG4CXX_TESTS} xmltests PARENT_SCOPE) diff --git a/vcpkg/ports/log4cxx/linux.patch b/vcpkg/ports/log4cxx/linux.patch new file mode 100644 index 0000000..01c51c2 --- /dev/null +++ b/vcpkg/ports/log4cxx/linux.patch @@ -0,0 +1,17 @@ +diff --git a/src/cmake/FindAPR.cmake b/src/cmake/FindAPR.cmake +index a204ece..4d2b48d 100644 +--- a/src/cmake/FindAPR.cmake ++++ b/src/cmake/FindAPR.cmake +@@ -45,7 +45,11 @@ if(EXISTS ${APR_CONFIG_EXECUTABLE}) + else() + find_path(APR_INCLUDE_DIR apr.h PATH_SUFFIXES apr-1) + if (APR_STATIC OR NOT BUILD_SHARED_LIBS) +- set(APR_SYSTEM_LIBS ws2_32 mswsock rpcrt4) ++ if(WIN32) ++ set(APR_SYSTEM_LIBS ws2_32 mswsock rpcrt4) ++ else() ++ set(APR_SYSTEM_LIBS pthread) ++ endif() + set(APR_COMPILE_DEFINITIONS APR_DECLARE_STATIC) + find_library(APR_LIBRARIES NAMES apr-1) + else() diff --git a/vcpkg/ports/log4cxx/portfile.cmake b/vcpkg/ports/log4cxx/portfile.cmake new file mode 100644 index 0000000..2e9a421 --- /dev/null +++ b/vcpkg/ports/log4cxx/portfile.cmake @@ -0,0 +1,33 @@ +set(VERSION 0.11.0) +vcpkg_download_distfile(ARCHIVE + URLS "https://archive.apache.org/dist/logging/log4cxx/${VERSION}/apache-log4cxx-${VERSION}.tar.gz" + FILENAME "apache-log4cxx-${VERSION}.tar.gz" + SHA512 f8aa37c9c094e7a4d6ca92dff13c032f69f1e078c51ea55e284fcb931c13256b08950af3ea6eaf7a12282240f6073e9acab19bfe217f88dbd62a5d2360f3fbdd +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${VERSION} + PATCHES + expat.patch + linux.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DLOG4CXX_INSTALL_PDB=OFF # Installing pdbs failed on debug static. So, disable it and let vcpkg_copy_pdbs() do it + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/log4cxx) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/loguru/CMakeLists.txt b/vcpkg/ports/loguru/CMakeLists.txt new file mode 100644 index 0000000..3688e11 --- /dev/null +++ b/vcpkg/ports/loguru/CMakeLists.txt @@ -0,0 +1,48 @@ +cmake_minimum_required(VERSION 3.12) + +project(loguru CXX) +set(CMAKE_CXX_STANDARD 11) + +option(INSTALL_HEADERS "Install header files" ON) + +set(loguru_headers + loguru.hpp +) +set(loguru_sources + loguru.cpp +) + +add_library(loguru ${loguru_sources}) +target_include_directories(loguru PUBLIC + $ + $) + +if(UNIX) + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) + target_link_libraries(loguru PUBLIC Threads::Threads ${CMAKE_DL_LIBS}) +endif() + +set(LOGURU_INCLUDE_INSTALL_DIR include/loguru CACHE PATH "Install directory for headers") +if(INSTALL_HEADERS) + install(FILES ${loguru_headers} DESTINATION ${LOGURU_INCLUDE_INSTALL_DIR}) +endif() + +set(INCLUDE_INSTALL_DIR ${LOGURU_INCLUDE_INSTALL_DIR}) + +include(CMakePackageConfigHelpers) +configure_package_config_file(loguruConfig.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/loguruConfig.cmake + INSTALL_DESTINATION share/loguru + NO_CHECK_REQUIRED_COMPONENTS_MACRO + PATH_VARS INCLUDE_INSTALL_DIR) + +install(TARGETS loguru + EXPORT loguruTargets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/loguruConfig.cmake DESTINATION share/loguru) +install(EXPORT loguruTargets DESTINATION share/loguru) diff --git a/vcpkg/ports/loguru/CONTROL b/vcpkg/ports/loguru/CONTROL new file mode 100644 index 0000000..dd80030 --- /dev/null +++ b/vcpkg/ports/loguru/CONTROL @@ -0,0 +1,4 @@ +Source: loguru +Version: 2.1.0-1 +Homepage: https://github.com/emilk/loguru +Description: A lightweight and flexible C++ logging library diff --git a/vcpkg/ports/loguru/copyright b/vcpkg/ports/loguru/copyright new file mode 100644 index 0000000..334edab --- /dev/null +++ b/vcpkg/ports/loguru/copyright @@ -0,0 +1,3 @@ +This software is in the public domain. Where that dedication is not recognized, you are granted a perpetual, irrevocable license to copy, modify and distribute it as you see fit. + +That being said, I would appreciate credit! If you find Loguru useful, tweet me at @ernerfeldt mail me at emil.ernerfeldt@gmail.com. \ No newline at end of file diff --git a/vcpkg/ports/loguru/loguruConfig.cmake.in b/vcpkg/ports/loguru/loguruConfig.cmake.in new file mode 100644 index 0000000..b75b189 --- /dev/null +++ b/vcpkg/ports/loguru/loguruConfig.cmake.in @@ -0,0 +1,9 @@ +@PACKAGE_INIT@ + +if(UNIX) + include(CMakeFindDependencyMacro) + find_dependency(Threads) +endif() + +set_and_check(loguru_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") +include("${CMAKE_CURRENT_LIST_DIR}/loguruTargets.cmake") diff --git a/vcpkg/ports/loguru/portfile.cmake b/vcpkg/ports/loguru/portfile.cmake new file mode 100644 index 0000000..236c4de --- /dev/null +++ b/vcpkg/ports/loguru/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO emilk/loguru + REF 9c2fea0d4530657f23259be4132f8101c98b579e #v2.1.0 + SHA512 49eebf8648f9d29273af76dca0a4e49155daa3664e98979df005e64eb0fa9f4eeb4228245327d469772c51076571acbe39a644eba531444d8676d9709a7e3914 + HEAD_REF master +) + +if(VCPKG_TARGET_IS_WINDOWS) + file(INSTALL ${SOURCE_PATH}/loguru.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include/loguru) + file(INSTALL ${SOURCE_PATH}/loguru.cpp DESTINATION ${CURRENT_PACKAGES_DIR}/include/loguru) +endif() + +if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) + configure_file(${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY) + configure_file(${CMAKE_CURRENT_LIST_DIR}/loguruConfig.cmake.in ${SOURCE_PATH}/loguruConfig.cmake.in COPYONLY) + + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DINSTALL_HEADERS=OFF + ) + + vcpkg_install_cmake() + vcpkg_fixup_cmake_targets() + vcpkg_copy_pdbs() +endif() + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/lpeg/CMakeLists.txt b/vcpkg/ports/lpeg/CMakeLists.txt new file mode 100644 index 0000000..993e570 --- /dev/null +++ b/vcpkg/ports/lpeg/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.0) +project(lpeg) + +find_path(LUA_INCLUDE_DIR lua.h PATH_SUFFIXES lua) +find_library(LUA_LIBRARY lua) +set(LPEG_INCLUDES ${LUA_INCLUDE_DIR}) +set(LPEG_LIBRARIES ${LUA_LIBRARY}) + +add_library(lpeg + lpvm.c + lptree.c + lpprint.c + lpcap.c + lpcode.c + lpeg.def) + +target_include_directories(lpeg PRIVATE ${LPEG_INCLUDES}) +target_link_libraries(lpeg PRIVATE ${LPEG_LIBRARIES}) + +install(TARGETS lpeg + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) +install(FILES re.lua DESTINATION share/lua) diff --git a/vcpkg/ports/lpeg/CONTROL b/vcpkg/ports/lpeg/CONTROL new file mode 100644 index 0000000..c88fdad --- /dev/null +++ b/vcpkg/ports/lpeg/CONTROL @@ -0,0 +1,5 @@ +Source: lpeg +Version: 1.0.2-1 +Homepage: https://www.inf.puc-rio.br/~roberto/lpeg +Description: LPeg is a pattern-matching library for Lua, based on Parsing Expression Grammars (PEGs). +Build-Depends: lua diff --git a/vcpkg/ports/lpeg/lpeg.def b/vcpkg/ports/lpeg/lpeg.def new file mode 100644 index 0000000..c4c1285 --- /dev/null +++ b/vcpkg/ports/lpeg/lpeg.def @@ -0,0 +1,3 @@ +LIBRARY lpeg +EXPORTS + luaopen_lpeg diff --git a/vcpkg/ports/lpeg/portfile.cmake b/vcpkg/ports/lpeg/portfile.cmake new file mode 100644 index 0000000..24d77f0 --- /dev/null +++ b/vcpkg/ports/lpeg/portfile.cmake @@ -0,0 +1,31 @@ +set(LPEG_VER 1.0.2) + +vcpkg_download_distfile(ARCHIVE + URLS "http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-${LPEG_VER}.tar.gz" + FILENAME "lpeg-${LPEG_VER}.tar.gz" + SHA512 110527ddf9f8e5e8a80ef0ae8847c8ba8cd2597dba3bfe2865cba9af60daafbb885f21e74231952f5ab793d021e050b482066a821c6954d52090a5eae77e9814 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/lpeg.def DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +# Remove debug share +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/lpeg.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# Allow empty include directory +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/vcpkg/ports/lua/CMakeLists.txt b/vcpkg/ports/lua/CMakeLists.txt new file mode 100644 index 0000000..fd04503 --- /dev/null +++ b/vcpkg/ports/lua/CMakeLists.txt @@ -0,0 +1,118 @@ +# Lua can be compiled as either C or C++. +# Default configuration is C, set COMPILE_AS_CPP to ON to use C++. +# See http://stackoverflow.com/questions/13560945/c-and-c-library-using-longjmp for why would you want to do that. +# Primary differences: +# - Exceptions will be used instead of setjmp/longjmp +# - The name mangling for functions will be C++ instead of C. +# - This is a source-incompatible change because extern "C" is chosen by the including application. +# - The lua.hpp header will not be available. + +PROJECT ( lua ) + + +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) + +SET (HDR_LIBLUA +src/lapi.h src/lauxlib.h src/lcode.h src/lctype.h src/ldebug.h src/ldo.h src/lfunc.h +src/lgc.h src/llex.h src/llimits.h src/lmem.h src/lobject.h src/lopcodes.h src/lparser.h +src/lstate.h src/lstring.h src/ltable.h src/ltm.h src/lua.h src/luaconf.h src/lualib.h +src/lundump.h src/lvm.h src/lzio.h +) + +# Build Libraries +SET (SRC_LIBLUA +src/lapi.c src/lauxlib.c src/lbaselib.c src/lbitlib.c src/lcode.c src/lcorolib.c +src/lctype.c src/ldblib.c src/ldebug.c src/ldo.c src/ldump.c src/lfunc.c src/lgc.c +src/linit.c src/liolib.c src/llex.c src/lmathlib.c src/lmem.c src/loadlib.c src/lobject.c +src/lopcodes.c src/loslib.c src/lparser.c src/lstate.c src/lstring.c src/lstrlib.c +src/ltable.c src/ltablib.c src/ltm.c src/lundump.c src/lutf8lib.c src/lvm.c src/lzio.c +) + +IF (COMPILE_AS_CPP) + SET_SOURCE_FILES_PROPERTIES(${SRC_LIBLUA} src/lua.c src/luac.c PROPERTIES LANGUAGE CXX) +ELSE () + SET (CMAKE_C_STANDARD 99) +ENDIF () + +# append headers to sources to make them show up in MSVC GUI +LIST(APPEND SRC_LIBLUA ${HDR_LIBLUA}) + +IF (WIN32) + # remove warnings + ADD_DEFINITIONS (-D_CRT_SECURE_NO_WARNINGS ) +ENDIF () + +IF (UNIX) + ADD_DEFINITIONS (-DLUA_USE_POSIX) + FIND_LIBRARY (LIB_MATH NAMES m) + IF (LIB_MATH) + LINK_LIBRARIES (${LIB_MATH}) + ENDIF () +ENDIF () + +#DLL +ADD_LIBRARY ( lua ${SRC_LIBLUA} ) +SET_PROPERTY (TARGET lua PROPERTY POSITION_INDEPENDENT_CODE ON) +IF (COMPILE_AS_CPP) + SET_TARGET_PROPERTIES(lua PROPERTIES OUTPUT_NAME "lua-c++") +ENDIF() + +IF (BUILD_SHARED_LIBS AND WIN32) + TARGET_COMPILE_DEFINITIONS (lua PUBLIC -DLUA_BUILD_AS_DLL ) +ENDIF () + +IF (UNIX) + IF (APPLE) + TARGET_COMPILE_DEFINITIONS (lua PUBLIC -DLUA_USE_DLOPEN) + ELSE () + FIND_LIBRARY (LIB_DLOPEN NAMES dl) + IF (LIB_DLOPEN) + TARGET_COMPILE_DEFINITIONS (lua PUBLIC -DLUA_USE_DLOPEN) + TARGET_LINK_LIBRARIES (lua ${LIB_DLOPEN}) + ENDIF () + ENDIF () +ENDIF () + +INSTALL ( TARGETS lua + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib +) + +IF (NOT DEFINED SKIP_INSTALL_TOOLS) + ADD_EXECUTABLE ( luac src/luac.c ${SRC_LIBLUA} ) # compiler uses non-exported APIs, so must include sources directly. + ADD_EXECUTABLE ( luai src/lua.c ) # interpreter + TARGET_LINK_LIBRARIES ( luai lua ) + SET_TARGET_PROPERTIES ( luai PROPERTIES OUTPUT_NAME lua PDB_NAME luai ) + IF (UNIX) + IF (CMAKE_SYSTEM_NAME STREQUAL FreeBSD) + SET (_LIB_READLINE_NAME edit) + ELSE () + SET (_LIB_READLINE_NAME readline) + ENDIF () + FIND_LIBRARY (LIB_READLINE NAMES ${_LIB_READLINE_NAME}) + IF (LIB_READLINE) + TARGET_COMPILE_DEFINITIONS (luai PUBLIC -DLUA_USE_READLINE) + TARGET_LINK_LIBRARIES(luai ${LIB_READLINE}) + IF (_LIB_READLINE_NAME STREQUAL edit) + TARGET_INCLUDE_DIRECTORIES (luai PUBLIC /usr/include/edit) + ENDIF () + ENDIF () + ENDIF () + INSTALL ( TARGETS luai luac RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/tools/lua ) +ENDIF () + +IF (NOT DEFINED SKIP_INSTALL_HEADERS) + INSTALL( + FILES + src/lualib.h + src/lua.h + src/luaconf.h + src/lauxlib.h + DESTINATION include + ) + # If using C++, don't install extern "C" wrapper. + IF (NOT COMPILE_AS_CPP) + INSTALL(FILES src/lua.hpp DESTINATION include) + ENDIF () +ENDIF () diff --git a/vcpkg/ports/lua/CONTROL b/vcpkg/ports/lua/CONTROL new file mode 100644 index 0000000..72839f9 --- /dev/null +++ b/vcpkg/ports/lua/CONTROL @@ -0,0 +1,7 @@ +Source: lua +Version: 5.3.5-5 +Homepage: https://www.lua.org +Description: a powerful, fast, lightweight, embeddable scripting language + +Feature: cpp +Description: Builds lua for C++ linkage. \ No newline at end of file diff --git a/vcpkg/ports/lua/COPYRIGHT b/vcpkg/ports/lua/COPYRIGHT new file mode 100644 index 0000000..729a2cc --- /dev/null +++ b/vcpkg/ports/lua/COPYRIGHT @@ -0,0 +1,6 @@ +Copyright © 1994–2016 Lua.org, PUC-Rio. +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vcpkg/ports/lua/portfile.cmake b/vcpkg/ports/lua/portfile.cmake new file mode 100644 index 0000000..823bd65 --- /dev/null +++ b/vcpkg/ports/lua/portfile.cmake @@ -0,0 +1,59 @@ +vcpkg_download_distfile(ARCHIVE + URLS "https://www.lua.org/ftp/lua-5.3.5.tar.gz" + FILENAME "lua-5.3.5.tar.gz" + SHA512 4f9516acc4659dfd0a9e911bfa00c0788f0ad9348e5724fe8fb17aac59e9c0060a64378f82be86f8534e49c6c013e7488ad17321bafcc787831d3d67406bd0f4 +) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES vs2015-impl-c99.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCOMPILE_AS_CPP=OFF + OPTIONS_DEBUG + -DSKIP_INSTALL_HEADERS=ON + -DSKIP_INSTALL_TOOLS=ON +) + +vcpkg_install_cmake() + +set(ENABLE_LUA_CPP 0) +if("cpp" IN_LIST FEATURES) + set(ENABLE_LUA_CPP 1) + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCOMPILE_AS_CPP=ON + OPTIONS_DEBUG + -DSKIP_INSTALL_HEADERS=ON + -DSKIP_INSTALL_TOOLS=ON + ) + + vcpkg_install_cmake() +endif() + +vcpkg_copy_pdbs() + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/lua) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + file(READ ${CURRENT_PACKAGES_DIR}/include/luaconf.h LUA_CONF_H) + string(REPLACE "defined(LUA_BUILD_AS_DLL)" "1" LUA_CONF_H "${LUA_CONF_H}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/luaconf.h "${LUA_CONF_H}") + endif() +endif() + +# Handle post-build CMake instructions +configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in ${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake @ONLY) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +# Handle copyright +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/lua/usage b/vcpkg/ports/lua/usage new file mode 100644 index 0000000..8a11e20 --- /dev/null +++ b/vcpkg/ports/lua/usage @@ -0,0 +1,9 @@ +Use this package via the module FindLua that comes with CMake. To use in your CMakeLists.txt: + + include(FindLua) + find_package(lua REQUIRED) + target_link_libraries(main PRIVATE ${LUA_LIBRARIES}) + target_include_directories(main PRIVATE ${LUA_INCLUDE_DIR}) + +For more information about the variables set by this module, please see: + https://cmake.org/cmake/help/latest/module/FindLua.html \ No newline at end of file diff --git a/vcpkg/ports/lua/vcpkg-cmake-wrapper.cmake.in b/vcpkg/ports/lua/vcpkg-cmake-wrapper.cmake.in new file mode 100644 index 0000000..3b97404 --- /dev/null +++ b/vcpkg/ports/lua/vcpkg-cmake-wrapper.cmake.in @@ -0,0 +1,6 @@ +_find_package(${ARGS}) + +if (@ENABLE_LUA_CPP@) + find_library(lua_cpp NAMES lua-c++ liblua-c++ REQUIRED) + set(LUA_LIBRARIES ${LUA_LIBRARIES} ${lua_cpp}) +endif() \ No newline at end of file diff --git a/vcpkg/ports/lua/vs2015-impl-c99.patch b/vcpkg/ports/lua/vs2015-impl-c99.patch new file mode 100644 index 0000000..e281e83 --- /dev/null +++ b/vcpkg/ports/lua/vs2015-impl-c99.patch @@ -0,0 +1,11 @@ +--- a/src/luaconf.h ++++ b/src/luaconf.h +@@ -54,7 +54,7 @@ + + #if defined(LUA_USE_WINDOWS) + #define LUA_DL_DLL /* enable support for DLL */ +-#define LUA_USE_C89 /* broadly, Windows is C89 */ ++//#define LUA_USE_C89 /* broadly, Windows is C89 */ + #endif + + diff --git a/vcpkg/ports/luabridge/CONTROL b/vcpkg/ports/luabridge/CONTROL new file mode 100644 index 0000000..91f5373 --- /dev/null +++ b/vcpkg/ports/luabridge/CONTROL @@ -0,0 +1,3 @@ +Source: luabridge +Version: 2.4.1 +Description: A lightweight, dependency-free library for binding Lua to C++ diff --git a/vcpkg/ports/luabridge/portfile.cmake b/vcpkg/ports/luabridge/portfile.cmake new file mode 100644 index 0000000..140e046 --- /dev/null +++ b/vcpkg/ports/luabridge/portfile.cmake @@ -0,0 +1,20 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO vinniefalco/LuaBridge + REF 78ab57abf2f76bf20f76a3bbc7dae7a1754a02c7 # 2.4.1 + SHA512 b53544cd544e9939e6e5f32a2b88f603a94fcbbf344b14b08f9e677c8e01c4e4185c0cecca0513449c9488a741e93285150156a96d633c8e54762b503b8999b4 + HEAD_REF master +) + +file( + COPY ${SOURCE_PATH}/Source/LuaBridge + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) + +# Handle copyright +configure_file( + ${SOURCE_PATH}/README.md + ${CURRENT_PACKAGES_DIR}/share/luabridge/copyright + COPYONLY +) diff --git a/vcpkg/ports/luafilesystem/CMakeLists.txt b/vcpkg/ports/luafilesystem/CMakeLists.txt new file mode 100644 index 0000000..79dd424 --- /dev/null +++ b/vcpkg/ports/luafilesystem/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.0) +project(luafilesystem) + +find_path(LUA_INCLUDE_DIR lua.h PATH_SUFFIXES lua) +find_library(LUA_LIBRARY lua) +set(LFS_INCLUDES ${LUA_INCLUDE_DIR}) +set(LFS_LIBRARIES ${LUA_LIBRARY}) + +add_library( lfs src/lfs.h src/lfs.c src/lfs.def) + +target_include_directories(lfs PRIVATE ${LFS_INCLUDES}) +target_link_libraries(lfs PRIVATE ${LFS_LIBRARIES}) + +install(TARGETS lfs + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) diff --git a/vcpkg/ports/luafilesystem/CONTROL b/vcpkg/ports/luafilesystem/CONTROL new file mode 100644 index 0000000..021620e --- /dev/null +++ b/vcpkg/ports/luafilesystem/CONTROL @@ -0,0 +1,5 @@ +Source: luafilesystem +Version: 1.8.0-1 +Homepage: https://github.com/keplerproject/luafilesystem +Description: LuaFileSystem is a Lua library developed to complement the set of functions related to file systems offered by the standard Lua distribution. +Build-Depends: lua diff --git a/vcpkg/ports/luafilesystem/portfile.cmake b/vcpkg/ports/luafilesystem/portfile.cmake new file mode 100644 index 0000000..bd6f1eb --- /dev/null +++ b/vcpkg/ports/luafilesystem/portfile.cmake @@ -0,0 +1,27 @@ +set(LUAFILESYSTEM_VERSION 1.8.0) +set(LUAFILESYSTEM_REVISION v1_8_0) +set(LUAFILESYSTEM_HASH 79d964f13ae43716281dc8521d2f128b22f2261234c443e242b857cfdf621e208bdf4512f8ba710baa113e9b3b71e2544609de65e2c483f569c243a5cf058247) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO keplerproject/luafilesystem + REF ${LUAFILESYSTEM_REVISION} + SHA512 ${LUAFILESYSTEM_HASH} + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# Allow empty include directory +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/vcpkg/ports/luajit/001-fix-build-path.patch b/vcpkg/ports/luajit/001-fix-build-path.patch new file mode 100644 index 0000000..bd14d70 --- /dev/null +++ b/vcpkg/ports/luajit/001-fix-build-path.patch @@ -0,0 +1,119 @@ +diff --git a/src/msvcbuild.bat b/src/msvcbuild.bat +index 42e3652..6a889e1 100644 +--- a/src/msvcbuild.bat ++++ b/src/msvcbuild.bat +@@ -14,17 +14,18 @@ + @if not defined INCLUDE goto :FAIL + + @setlocal +-@set LJCOMPILE=cl /nologo /c /O2 /W3 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_STDIO_INLINE=__declspec(dllexport)__inline ++@set SOURCEDIR=%1 ++@set LJCOMPILE=cl /nologo /c /O2 /W3 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_STDIO_INLINE=__declspec(dllexport)__inline /I%SOURCEDIR% + @set LJLINK=link /nologo + @set LJMT=mt /nologo + @set LJLIB=lib /nologo /nodefaultlib +-@set DASMDIR=..\dynasm ++@set DASMDIR=%SOURCEDIR%\..\dynasm + @set DASM=%DASMDIR%\dynasm.lua + @set LJDLLNAME=lua51.dll + @set LJLIBNAME=lua51.lib +-@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c ++@set ALL_LIB=%SOURCEDIR%\lib_base.c %SOURCEDIR%\lib_math.c %SOURCEDIR%\lib_bit.c %SOURCEDIR%\lib_string.c %SOURCEDIR%\lib_table.c %SOURCEDIR%\lib_io.c %SOURCEDIR%\lib_os.c %SOURCEDIR%\lib_package.c %SOURCEDIR%\lib_debug.c %SOURCEDIR%\lib_jit.c %SOURCEDIR%\lib_ffi.c + +-%LJCOMPILE% host\minilua.c ++%LJCOMPILE% %SOURCEDIR%\host\minilua.c /Fdminilua.pdb + @if errorlevel 1 goto :BAD + %LJLINK% /out:minilua.exe minilua.obj + @if errorlevel 1 goto :BAD +@@ -38,10 +39,10 @@ if exist minilua.exe.manifest^ + @set DASMFLAGS=-D WIN -D JIT -D FFI + @set LJARCH=x86 + :X64 +-minilua %DASM% -LN %DASMFLAGS% -o host\buildvm_arch.h vm_x86.dasc ++minilua %DASM% -LN %DASMFLAGS% -o %SOURCEDIR%\host\buildvm_arch.h %SOURCEDIR%\vm_x86.dasc + @if errorlevel 1 goto :BAD + +-%LJCOMPILE% /I "." /I %DASMDIR% host\buildvm*.c ++%LJCOMPILE% /I "." /I %DASMDIR% %SOURCEDIR%\host\buildvm*.c /Fdbuildvm.pdb + @if errorlevel 1 goto :BAD + %LJLINK% /out:buildvm.exe buildvm*.obj + @if errorlevel 1 goto :BAD +@@ -50,39 +51,39 @@ if exist buildvm.exe.manifest^ + + buildvm -m peobj -o lj_vm.obj + @if errorlevel 1 goto :BAD +-buildvm -m bcdef -o lj_bcdef.h %ALL_LIB% ++buildvm -m bcdef -o %SOURCEDIR%\lj_bcdef.h %ALL_LIB% + @if errorlevel 1 goto :BAD +-buildvm -m ffdef -o lj_ffdef.h %ALL_LIB% ++buildvm -m ffdef -o %SOURCEDIR%\lj_ffdef.h %ALL_LIB% + @if errorlevel 1 goto :BAD +-buildvm -m libdef -o lj_libdef.h %ALL_LIB% ++buildvm -m libdef -o %SOURCEDIR%\lj_libdef.h %ALL_LIB% + @if errorlevel 1 goto :BAD +-buildvm -m recdef -o lj_recdef.h %ALL_LIB% ++buildvm -m recdef -o %SOURCEDIR%\lj_recdef.h %ALL_LIB% + @if errorlevel 1 goto :BAD +-buildvm -m vmdef -o jit\vmdef.lua %ALL_LIB% ++buildvm -m vmdef -o %SOURCEDIR%\jit\vmdef.lua %ALL_LIB% + @if errorlevel 1 goto :BAD +-buildvm -m folddef -o lj_folddef.h lj_opt_fold.c ++buildvm -m folddef -o %SOURCEDIR%\lj_folddef.h %SOURCEDIR%\lj_opt_fold.c + @if errorlevel 1 goto :BAD + +-@if "%1" neq "debug" goto :NODEBUG ++@set LJLINK=%LJLINK% /debug ++@if "%2" neq "debug" goto :NODEBUG + @shift + @set LJCOMPILE=%LJCOMPILE% /Zi +-@set LJLINK=%LJLINK% /debug + :NODEBUG +-@if "%1"=="amalg" goto :AMALGDLL +-@if "%1"=="static" goto :STATIC +-%LJCOMPILE% /MD /DLUA_BUILD_AS_DLL lj_*.c lib_*.c ++@if "%2"=="amalg" goto :AMALGDLL ++@if "%2"=="static" goto :STATIC ++%LJCOMPILE% /MD /DLUA_BUILD_AS_DLL %SOURCEDIR%\lj_*.c %SOURCEDIR%\lib_*.c /Fdlua51.pdb + @if errorlevel 1 goto :BAD + %LJLINK% /DLL /out:%LJDLLNAME% lj_*.obj lib_*.obj + @if errorlevel 1 goto :BAD + @goto :MTDLL + :STATIC +-%LJCOMPILE% lj_*.c lib_*.c ++%LJCOMPILE% %SOURCEDIR%\lj_*.c %SOURCEDIR%\lib_*.c /Fdlua51.pdb + @if errorlevel 1 goto :BAD + %LJLIB% /OUT:%LJLIBNAME% lj_*.obj lib_*.obj + @if errorlevel 1 goto :BAD + @goto :MTDLL + :AMALGDLL +-%LJCOMPILE% /MD /DLUA_BUILD_AS_DLL ljamalg.c ++%LJCOMPILE% /MD /DLUA_BUILD_AS_DLL %SOURCEDIR%\ljamalg.c + @if errorlevel 1 goto :BAD + %LJLINK% /DLL /out:%LJDLLNAME% ljamalg.obj lj_vm.obj + @if errorlevel 1 goto :BAD +@@ -90,7 +91,7 @@ buildvm -m folddef -o lj_folddef.h lj_opt_fold.c + if exist %LJDLLNAME%.manifest^ + %LJMT% -manifest %LJDLLNAME%.manifest -outputresource:%LJDLLNAME%;2 + +-%LJCOMPILE% luajit.c ++%LJCOMPILE% %SOURCEDIR%\luajit.c /Fdluajit.pdb + @if errorlevel 1 goto :BAD + %LJLINK% /out:luajit.exe luajit.obj %LJLIBNAME% + @if errorlevel 1 goto :BAD +@@ -98,8 +99,8 @@ if exist luajit.exe.manifest^ + %LJMT% -manifest luajit.exe.manifest -outputresource:luajit.exe + + @del *.obj *.manifest minilua.exe buildvm.exe +-@del host\buildvm_arch.h +-@del lj_bcdef.h lj_ffdef.h lj_libdef.h lj_recdef.h lj_folddef.h ++@del %SOURCEDIR%\host\buildvm_arch.h ++@del %SOURCEDIR%\lj_bcdef.h %SOURCEDIR%\lj_ffdef.h %SOURCEDIR%\lj_libdef.h %SOURCEDIR%\lj_recdef.h %SOURCEDIR%\lj_folddef.h + @echo. + @echo === Successfully built LuaJIT for Windows/%LJARCH% === + +@@ -112,4 +113,5 @@ if exist luajit.exe.manifest^ + @goto :END + :FAIL + @echo You must open a "Visual Studio .NET Command Prompt" to run this script ++exit 1 + :END diff --git a/vcpkg/ports/luajit/002-fix-crt-linkage.patch b/vcpkg/ports/luajit/002-fix-crt-linkage.patch new file mode 100644 index 0000000..cbc273e --- /dev/null +++ b/vcpkg/ports/luajit/002-fix-crt-linkage.patch @@ -0,0 +1,42 @@ +diff --git a/src/msvcbuild.bat b/src/msvcbuild.bat +index 6a889e1..08c4e3c 100644 +--- a/src/msvcbuild.bat ++++ b/src/msvcbuild.bat +@@ -64,20 +64,23 @@ buildvm -m vmdef -o %SOURCEDIR%\jit\vmdef.lua %ALL_LIB% + buildvm -m folddef -o %SOURCEDIR%\lj_folddef.h %SOURCEDIR%\lj_opt_fold.c + @if errorlevel 1 goto :BAD + ++@if "%2"=="static" set CRT_LINKAGE=/MT ++@if "%2"=="dynamic" set CRT_LINKAGE=/MD + @set LJLINK=%LJLINK% /debug +-@if "%2" neq "debug" goto :NODEBUG ++@if "%3" neq "debug" goto :NODEBUG + @shift + @set LJCOMPILE=%LJCOMPILE% /Zi ++@set CRT_LINKAGE=%CRT_LINKAGE%d + :NODEBUG +-@if "%2"=="amalg" goto :AMALGDLL ++@if "%3"=="amalg" goto :AMALGDLL +-@if "%2"=="static" goto :STATIC ++@if "%3"=="static" goto :STATIC +-%LJCOMPILE% /MD /DLUA_BUILD_AS_DLL %SOURCEDIR%\lj_*.c %SOURCEDIR%\lib_*.c /Fdlua51.pdb ++%LJCOMPILE% %CRT_LINKAGE% /DLUA_BUILD_AS_DLL %SOURCEDIR%\lj_*.c %SOURCEDIR%\lib_*.c /Fdlua51.pdb + @if errorlevel 1 goto :BAD + %LJLINK% /DLL /out:%LJDLLNAME% lj_*.obj lib_*.obj + @if errorlevel 1 goto :BAD + @goto :MTDLL + :STATIC +-%LJCOMPILE% %SOURCEDIR%\lj_*.c %SOURCEDIR%\lib_*.c /Fdlua51.pdb ++%LJCOMPILE% %CRT_LINKAGE% %SOURCEDIR%\lj_*.c %SOURCEDIR%\lib_*.c /Fdlua51.pdb + @if errorlevel 1 goto :BAD + %LJLIB% /OUT:%LJLIBNAME% lj_*.obj lib_*.obj + @if errorlevel 1 goto :BAD +@@ -94,7 +94,7 @@ + if exist %LJDLLNAME%.manifest^ + %LJMT% -manifest %LJDLLNAME%.manifest -outputresource:%LJDLLNAME%;2 + +-%LJCOMPILE% %SOURCEDIR%\luajit.c /Fdluajit.pdb ++%LJCOMPILE% %CRT_LINKAGE% %SOURCEDIR%\luajit.c /Fdluajit.pdb + @if errorlevel 1 goto :BAD + %LJLINK% /out:luajit.exe luajit.obj %LJLIBNAME% + @if errorlevel 1 goto :BAD diff --git a/vcpkg/ports/luajit/CONTROL b/vcpkg/ports/luajit/CONTROL new file mode 100644 index 0000000..f37d4dc --- /dev/null +++ b/vcpkg/ports/luajit/CONTROL @@ -0,0 +1,5 @@ +Source: luajit +Version: 2.0.5-3 +Homepage: https://github.com/LuaJIT/LuaJIT +Description: LuaJIT is a Just-In-Time (JIT) compiler for the Lua programming language. +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/luajit/portfile.cmake b/vcpkg/ports/luajit/portfile.cmake new file mode 100644 index 0000000..262f7ec --- /dev/null +++ b/vcpkg/ports/luajit/portfile.cmake @@ -0,0 +1,73 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports being built for desktop" ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO LuaJIT/LuaJIT + REF v2.0.5 + SHA512 65d982d7fe532a61335613f414f3b8fa5333747bdf7aefc2c2d52022d227594ade827639049b97e3c4ffae9f38f32cb15f1a17b1780fb0a943e1a3af05e2b576 + HEAD_REF master + PATCHES + 001-fix-build-path.patch + 002-fix-crt-linkage.patch +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set (LJIT_STATIC "") +else() + set (LJIT_STATIC "static") +endif() + +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug) + message(STATUS "Building ${TARGET_TRIPLET}-dbg") + file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + + vcpkg_execute_required_process_repeat( + COUNT 1 + COMMAND "${SOURCE_PATH}/src/msvcbuild.bat" ${SOURCE_PATH}/src ${VCPKG_CRT_LINKAGE} debug ${LJIT_STATIC} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/luajit.exe DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lua51.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lua51.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(COPY ${CURRENT_PACKAGES_DIR}/debug/bin/lua51.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools) + endif() + vcpkg_copy_pdbs() +endif() + + +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release) + message(STATUS "Building ${TARGET_TRIPLET}-rel") + file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + + vcpkg_execute_required_process_repeat(d8un + COUNT 1 + COMMAND "${SOURCE_PATH}/src/msvcbuild.bat" ${SOURCE_PATH}/src ${VCPKG_CRT_LINKAGE} ${LJIT_STATIC} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + LOGNAME build-${TARGET_TRIPLET}-rel + ) + + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/luajit.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lua51.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lua51.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools) + endif() + vcpkg_copy_pdbs() +endif() + +file(INSTALL ${SOURCE_PATH}/src/lua.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +file(INSTALL ${SOURCE_PATH}/src/luajit.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +file(INSTALL ${SOURCE_PATH}/src/luaconf.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +file(INSTALL ${SOURCE_PATH}/src/lualib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +file(INSTALL ${SOURCE_PATH}/src/lauxlib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +file(INSTALL ${SOURCE_PATH}/src/lua.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) \ No newline at end of file diff --git a/vcpkg/ports/luasocket/CMakeLists.txt b/vcpkg/ports/luasocket/CMakeLists.txt new file mode 100644 index 0000000..3ab763d --- /dev/null +++ b/vcpkg/ports/luasocket/CMakeLists.txt @@ -0,0 +1,65 @@ +cmake_minimum_required(VERSION 3.0.2) +project(luasocket) + +if(NOT WIN32) + message(FATAL_ERROR "Written for windows only") +endif() + +find_path(LUA_INCLUDE_DIR lua.h PATH_SUFFIXES lua) +find_library(LUA_LIBRARY lua) +set(LUASOCKET_INCLUDES ${LUA_INCLUDE_DIR} src) +set(LUASOCKET_LIBRARIES ${LUA_LIBRARY} ws2_32) + +add_library(socket.core + src/luasocket.c + src/timeout.c + src/buffer.c + src/io.c + src/auxiliar.c + src/options.c + src/inet.c + src/except.c + src/select.c + src/tcp.c + src/udp.c + src/compat.c + src/wsocket.c) + +add_library(mime.core + src/mime.c + src/compat.c) + +target_include_directories(socket.core PRIVATE ${LUASOCKET_INCLUDES}) +target_link_libraries(socket.core PRIVATE ${LUASOCKET_LIBRARIES}) + +target_include_directories(mime.core PRIVATE ${LUASOCKET_INCLUDES}) +target_link_libraries(mime.core PRIVATE ${LUASOCKET_LIBRARIES}) + +add_definitions( + "-DLUASOCKET_API=__declspec(dllexport)" + "-DMIME_API=__declspec(dllexport)") + +install(TARGETS socket.core + RUNTIME DESTINATION bin/socket + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +install(TARGETS mime.core + RUNTIME DESTINATION bin/mime + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +install(FILES + src/ltn12.lua + src/socket.lua + src/mime.lua + DESTINATION share/lua) + +install(FILES + src/http.lua + src/url.lua + src/tp.lua + src/ftp.lua + src/headers.lua + src/smtp.lua + DESTINATION share/lua/socket) diff --git a/vcpkg/ports/luasocket/CONTROL b/vcpkg/ports/luasocket/CONTROL new file mode 100644 index 0000000..e50ca87 --- /dev/null +++ b/vcpkg/ports/luasocket/CONTROL @@ -0,0 +1,5 @@ +Source: luasocket +Version: 2019-05-07 +Homepage: https://github.com/diegonehab/luasocket +Description: LuaSocket is a Lua extension library that is composed by two parts: a C core that provides support for the TCP and UDP transport layers, and a set of Lua modules that add support for functionality commonly needed by applications that deal with the Internet. +Build-Depends: lua diff --git a/vcpkg/ports/luasocket/portfile.cmake b/vcpkg/ports/luasocket/portfile.cmake new file mode 100644 index 0000000..0f4bfbf --- /dev/null +++ b/vcpkg/ports/luasocket/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO diegonehab/luasocket + REF 733af884f1aa18ff469bf3c4d18810e815853211 + SHA512 632d66a9460636758428261b5b0d8669a90492de716915c07d1d1bf66c795bc9599f9edcd4345bbc3ef06830d670303b6cfb56c206e022b4bc5307fec2a20395 + HEAD_REF master) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Remove debug share +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/luasocket) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/luasocket/LICENSE ${CURRENT_PACKAGES_DIR}/share/luasocket/copyright) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") +# Handle socket dll name + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/socket/socket.core.dll ${CURRENT_PACKAGES_DIR}/bin/socket/core.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/socket/socket.core.pdb ${CURRENT_PACKAGES_DIR}/bin/socket/core.pdb) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/socket/socket.core.dll ${CURRENT_PACKAGES_DIR}/debug/bin/socket/core.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/socket/socket.core.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/socket/core.pdb) + +# Handle mime dll name + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/mime/mime.core.dll ${CURRENT_PACKAGES_DIR}/bin/mime/core.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/mime/mime.core.pdb ${CURRENT_PACKAGES_DIR}/bin/mime/core.pdb) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/mime/mime.core.dll ${CURRENT_PACKAGES_DIR}/debug/bin/mime/core.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/mime/mime.core.pdb ${CURRENT_PACKAGES_DIR}/debug/bin/mime/core.pdb) +endif() + +# Allow empty include directory +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/vcpkg/ports/lv2/CMakeLists.txt b/vcpkg/ports/lv2/CMakeLists.txt new file mode 100644 index 0000000..fb51906 --- /dev/null +++ b/vcpkg/ports/lv2/CMakeLists.txt @@ -0,0 +1,35 @@ +cmake_minimum_required(VERSION 3.17) +project(lv2 NONE) + +add_library(lv2 INTERFACE) + +install( + TARGETS lv2 + EXPORT lv2-config + INCLUDES DESTINATION include +) + +install( + DIRECTORY lv2 + DESTINATION include + FILES_MATCHING PATTERN "*.h" +) +install(FILES lv2/core/lv2.h DESTINATION include) + +# Install headers to old URI-style paths, using mapping from wscript +file(READ wscript WSCRIPT) +string(REGEX MATCHALL "'[^']+' *: 'lv2/[^']+'" SPEC_MAP "${WSCRIPT}") +foreach(PAIR ${SPEC_MAP}) + string(REGEX MATCH "'([^']+)' *: '([^']+)'" _ "${PAIR}") + install( + DIRECTORY "lv2/${CMAKE_MATCH_1}/" + DESTINATION "include/${CMAKE_MATCH_2}" + FILES_MATCHING PATTERN "*.h" + ) +endforeach() + +install( + EXPORT lv2-config + NAMESPACE lv2:: + DESTINATION "${CMAKE_INSTALL_PREFIX}/share/lv2" +) diff --git a/vcpkg/ports/lv2/portfile.cmake b/vcpkg/ports/lv2/portfile.cmake new file mode 100644 index 0000000..393bd5d --- /dev/null +++ b/vcpkg/ports/lv2/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.com + OUT_SOURCE_PATH SOURCE_PATH + REPO lv2/lv2 + REF v1.18.0 + SHA512 f84c5f2b31f42ed5cab10976d1975743c62f06025a5b67bc99778ba5d0f354c06cb9fad8f5899a52b8c1131f4c9085f5867c83da4d8269c234fd2a22a2c6a689 + HEAD_REF master +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") +file( + INSTALL "${SOURCE_PATH}/COPYING" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright +) diff --git a/vcpkg/ports/lv2/vcpkg.json b/vcpkg/ports/lv2/vcpkg.json new file mode 100644 index 0000000..8192f73 --- /dev/null +++ b/vcpkg/ports/lv2/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "lv2", + "version-string": "1.18.0", + "description": "LV2 is a plugin standard for audio systems. It defines a minimal yet extensible C API for plugin code and a format for plugin \"bundles\".", + "homepage": "https://lv2plug.in", + "license": "ISC" +} diff --git a/vcpkg/ports/lz4/CMakeLists.txt b/vcpkg/ports/lz4/CMakeLists.txt new file mode 100644 index 0000000..1e272dd --- /dev/null +++ b/vcpkg/ports/lz4/CMakeLists.txt @@ -0,0 +1,49 @@ +cmake_minimum_required(VERSION 3.0) +project(lz4 C) + +if(MSVC AND BUILD_SHARED_LIBS) + add_definitions(-DLZ4_DLL_EXPORT) +endif() +add_definitions(-DXXH_NAMESPACE=LZ4_) + +set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_DIR}" CACHE PATH "Install prefix") +set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed") +set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed") +set(INSTALL_INCLUDE_DIR "include" CACHE PATH "Path where headers will be installed") +set(INSTALL_CMAKE_DIR "share/lz4" CACHE PATH "Path where cmake configs will be installed") + +file(GLOB LZ4_HEADERS lib/*.h) + +add_library(lz4 + ${LZ4_HEADERS} + lib/lz4.c + lib/lz4frame.c + lib/lz4hc.c + lib/xxhash.c +) + +target_include_directories(lz4 PUBLIC $ $) +set_target_properties(lz4 PROPERTIES PUBLIC_HEADER ${LZ4_HEADERS}) + +install(TARGETS lz4 + EXPORT lz4Config + RUNTIME DESTINATION "${INSTALL_BIN_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" + PUBLIC_HEADER DESTINATION "${INSTALL_INCLUDE_DIR}" + PRIVATE_HEADER DESTINATION "${INSTALL_INCLUDE_DIR}" + COMPONENT dev +) + +FILE(GLOB lz4h "${CMAKE_CURRENT_LIST_DIR}/lib/*.h") +list(REMOVE_ITEM lz4h "${CMAKE_CURRENT_LIST_DIR}/lib/xxhash.h") +INSTALL(FILES ${lz4h} DESTINATION "${INSTALL_INCLUDE_DIR}") + +install(EXPORT lz4Config + FILE lz4-config.cmake + NAMESPACE lz4:: + DESTINATION "${INSTALL_CMAKE_DIR}" +) + +# Export the package for use from the build-tree (this registers the build-tree with a global CMake-registry) +export(PACKAGE lz4) diff --git a/vcpkg/ports/lz4/CONTROL b/vcpkg/ports/lz4/CONTROL new file mode 100644 index 0000000..280ec3c --- /dev/null +++ b/vcpkg/ports/lz4/CONTROL @@ -0,0 +1,5 @@ +Source: lz4 +Version: 1.9.2-2 +Homepage: https://github.com/lz4/lz4 +Description: Lossless compression algorithm, providing compression speed at 400 MB/s per core. +Build-Depends: xxhash diff --git a/vcpkg/ports/lz4/portfile.cmake b/vcpkg/ports/lz4/portfile.cmake new file mode 100644 index 0000000..003f059 --- /dev/null +++ b/vcpkg/ports/lz4/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lz4/lz4 + REF v1.9.2 + SHA512 ae714c61ec8e33ed91359b63f2896cfa102d66b730dce112b74696ec5850e59d88bd5527173e01e354a70fbe8f036557a47c767ee0766bc5f9c257978116c3c1 + HEAD_REF dev +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DCMAKE_DEBUG_POSTFIX=d +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +foreach(FILE lz4.h lz4frame.h) + file(READ ${CURRENT_PACKAGES_DIR}/include/${FILE} LZ4_HEADER) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + string(REPLACE "defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)" "1 && defined(_MSC_VER)" LZ4_HEADER "${LZ4_HEADER}") + else() + string(REPLACE "defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)" "0" LZ4_HEADER "${LZ4_HEADER}") + endif() + file(WRITE ${CURRENT_PACKAGES_DIR}/include/${FILE} "${LZ4_HEADER}") +endforeach() + +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/lib/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/lzfse/CONTROL b/vcpkg/ports/lzfse/CONTROL new file mode 100644 index 0000000..cc46699 --- /dev/null +++ b/vcpkg/ports/lzfse/CONTROL @@ -0,0 +1,5 @@ +Source: lzfse +Version: 1.0-2 +Homepage: https://github.com/lzfse/lzfse +Description: Lempel-Ziv style data compressor using Finite State Entropy coding. +Supports: !arm \ No newline at end of file diff --git a/vcpkg/ports/lzfse/disable-cli-option.patch b/vcpkg/ports/lzfse/disable-cli-option.patch new file mode 100644 index 0000000..260b7a2 --- /dev/null +++ b/vcpkg/ports/lzfse/disable-cli-option.patch @@ -0,0 +1,51 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 336a68d..96a2a74 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -67,18 +67,20 @@ add_library(lzfse + src/lzvn_encode_base.c) + lzfse_add_compiler_flags(lzfse -Wall -Wno-unknown-pragmas -Wno-unused-variable) + +-add_executable(lzfse_cli +- src/lzfse_main.c) +-target_link_libraries(lzfse_cli lzfse) +-set_target_properties(lzfse_cli PROPERTIES OUTPUT_NAME lzfse) +-lzfse_add_compiler_flags(lzfse_cli -Wall -Wno-unknown-pragmas -Wno-unused-variable) +- +-if(CMAKE_VERSION VERSION_LESS 3.1 OR CMAKE_C_COMPLIER_ID STREQUAL "Intel") +- lzfse_add_compiler_flags(lzfse -std=c99) +- lzfse_add_compiler_flags(lzfse_cli -std=c99) +-else() +- set_property(TARGET lzfse PROPERTY C_STANDARD 99) +- set_property(TARGET lzfse_cli PROPERTY C_STANDARD 99) ++if(NOT LZFSE_DISABLE_CLI) ++ add_executable(lzfse_cli ++ src/lzfse_main.c) ++ target_link_libraries(lzfse_cli lzfse) ++ set_target_properties(lzfse_cli PROPERTIES OUTPUT_NAME lzfse) ++ lzfse_add_compiler_flags(lzfse_cli -Wall -Wno-unknown-pragmas -Wno-unused-variable) ++ ++ if(CMAKE_VERSION VERSION_LESS 3.1 OR CMAKE_C_COMPLIER_ID STREQUAL "Intel") ++ lzfse_add_compiler_flags(lzfse -std=c99) ++ lzfse_add_compiler_flags(lzfse_cli -std=c99) ++ else() ++ set_property(TARGET lzfse PROPERTY C_STANDARD 99) ++ set_property(TARGET lzfse_cli PROPERTY C_STANDARD 99) ++ endif() + endif() + + set_target_properties(lzfse PROPERTIES +@@ -95,7 +97,12 @@ endif() + if(NOT LZFSE_BUNDLE_MODE) + include(GNUInstallDirs) + +- install(TARGETS lzfse lzfse_cli ++ if(NOT LZFSE_DISABLE_CLI) ++ install(TARGETS lzfse_cli ++ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") ++ endif() ++ ++ install(TARGETS lzfse + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") diff --git a/vcpkg/ports/lzfse/portfile.cmake b/vcpkg/ports/lzfse/portfile.cmake new file mode 100644 index 0000000..65a1792 --- /dev/null +++ b/vcpkg/ports/lzfse/portfile.cmake @@ -0,0 +1,37 @@ +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + message(FATAL_ERROR "ARM build not supported") +endif() + +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lzfse/lzfse + REF lzfse-1.0 + SHA512 9d7ca44e6d3d2bdf4b82b0eb66c14922369b8b6fe2cf891187a77c6708b8d26c2c1b2ccddec6059e85dbbbb37c497419549f02812b5f34d06238ac246a8cf912 + HEAD_REF master + PATCHES + disable-cli-option.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DLZFSE_DISABLE_TESTS=ON + -DLZFSE_DISABLE_CLI=ON) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(READ ${CURRENT_PACKAGES_DIR}/include/lzfse.h LZFSE_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + string(REPLACE "defined(LZFSE_DLL)" "1" LZFSE_H "${LZFSE_H}") +else() + string(REPLACE "defined(LZFSE_DLL)" "0" LZFSE_H "${LZFSE_H}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/lzfse.h "${LZFSE_H}") + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/lzfse) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/lzfse/LICENSE ${CURRENT_PACKAGES_DIR}/share/lzfse/copyright) diff --git a/vcpkg/ports/lzo/CONTROL b/vcpkg/ports/lzo/CONTROL new file mode 100644 index 0000000..4548ae9 --- /dev/null +++ b/vcpkg/ports/lzo/CONTROL @@ -0,0 +1,4 @@ +Source: lzo +Version: 2.10-5 +Homepage: https://www.oberhumer.com/opensource/lzo/ +Description: Lossless data compression library diff --git a/vcpkg/ports/lzo/portfile.cmake b/vcpkg/ports/lzo/portfile.cmake new file mode 100644 index 0000000..7ccc628 --- /dev/null +++ b/vcpkg/ports/lzo/portfile.cmake @@ -0,0 +1,46 @@ +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "http://www.oberhumer.com/opensource/lzo/download/lzo-2.10.tar.gz" + FILENAME "lzo-2.10.tar.gz" + SHA512 a3dae5e4a6b93b1f5bf7435e8ab114a9be57252e9efc5dd444947d7a2d031b0819f34bcaeb35f60b5629a01b1238d738735a64db8f672be9690d3c80094511a4 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +set(LZO_STATIC OFF) +set(LZO_SHARED OFF) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(LZO_STATIC ON) +else() + set(LZO_SHARED ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DENABLE_STATIC=${LZO_STATIC} + -DENABLE_SHARED=${LZO_SHARED} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/libexec) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/libexec) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(READ ${CURRENT_PACKAGES_DIR}/include/lzo/lzoconf.h LZO_CONFIG) + string(REPLACE "# define __LZO_EXPORT1 /*empty*/" + "# define __LZO_EXPORT1 __declspec(dllimport)" LZO_CONFIG "${LZO_CONFIG}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/lzo/lzoconf.h "${LZO_CONFIG}") +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/lzokay/portfile.cmake b/vcpkg/ports/lzokay/portfile.cmake new file mode 100644 index 0000000..719c63d --- /dev/null +++ b/vcpkg/ports/lzokay/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jackoalan/lzokay + REF 546a9695271e8a8b4711383f828172754fd825f2 + SHA512 b4e96183ea52dc5ba0d88b4b9b27baa2c3e2c540b1bfd50cf7a3c2569337fbe9d73dd9939cb456d5f7459df8e10d84677d40ee33f7d524f0f5f8a723d7a70583 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/lzokay/vcpkg.json b/vcpkg/ports/lzokay/vcpkg.json new file mode 100644 index 0000000..fb2b078 --- /dev/null +++ b/vcpkg/ports/lzokay/vcpkg.json @@ -0,0 +1,6 @@ +{ + "name": "lzokay", + "version-string": "2020-07-30", + "description": "lzokay – MIT licensed C++ implementation of LZO compression/decompression algorithm", + "homepage": "https://github.com/jackoalan/lzokay" +} diff --git a/vcpkg/ports/magic-enum/CONTROL b/vcpkg/ports/magic-enum/CONTROL new file mode 100644 index 0000000..f6ff383 --- /dev/null +++ b/vcpkg/ports/magic-enum/CONTROL @@ -0,0 +1,4 @@ +Source: magic-enum +Version: 0.6.6 +Description: Header-only C++17 library provides static reflection for enums, work with any enum type without any macro or boilerplate code. +Homepage: https://github.com/Neargye/magic_enum diff --git a/vcpkg/ports/magic-enum/portfile.cmake b/vcpkg/ports/magic-enum/portfile.cmake new file mode 100644 index 0000000..30d8f96 --- /dev/null +++ b/vcpkg/ports/magic-enum/portfile.cmake @@ -0,0 +1,26 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Neargye/magic_enum + REF v0.6.6 + SHA512 aeab69a87d0bcac93a987489a7bce9bd5971b7df1a5f83bfe9c58292dec736aa3b60a238c38d04080608199ea45c946da50b13934fb320e5f63e38b9185b526f + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DMAGIC_ENUM_OPT_BUILD_EXAMPLES=OFF + -DMAGIC_ENUM_OPT_BUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/magic_enum TARGET_PATH share/magic_enum) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/magic-get/CONTROL b/vcpkg/ports/magic-get/CONTROL new file mode 100644 index 0000000..c614761 --- /dev/null +++ b/vcpkg/ports/magic-get/CONTROL @@ -0,0 +1,4 @@ +Source: magic-get +Version: 2019-09-02-1 +Homepage: https://github.com/apolukhin/magic_get +Description: This C++14 library is meant for accessing structure elements by index and providing other std::tuple like methods for user defined types without any macro or boilerplate code. diff --git a/vcpkg/ports/magic-get/portfile.cmake b/vcpkg/ports/magic-get/portfile.cmake new file mode 100644 index 0000000..1546bbe --- /dev/null +++ b/vcpkg/ports/magic-get/portfile.cmake @@ -0,0 +1,19 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO apolukhin/magic_get + REF abb467c0e22a83bf75a46a9e6610370fabfc39af #Branch develop, Commits on Sep 2, 2019 + SHA512 1feb5d105d13a20aec8ab2c748dbd79ecc5d2267c8c0ee7db93a3d0c6b7186ea0c475fdc14712e78502ea839788f6dfb0b359e3fedbec59d331dafe137326fa4 + HEAD_REF develop +) + +vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://www.boost.org/LICENSE_1_0.txt" + FILENAME "boost_license_1_0.txt" + SHA512 d6078467835dba8932314c1c1e945569a64b065474d7aced27c9a7acc391d52e9f234138ed9f1aa9cd576f25f12f557e0b733c14891d42c16ecdc4a7bd4d60b8 +) + +file(COPY ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) + +# Handle copyright +# On Homepage README.md, License Distributed under the Boost Software License, Version 1.0. https://www.boost.org/LICENSE_1_0.txt +file(INSTALL ${OCV_DOWNLOAD} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/magnum-extras/CONTROL b/vcpkg/ports/magnum-extras/CONTROL new file mode 100644 index 0000000..b9583b5 --- /dev/null +++ b/vcpkg/ports/magnum-extras/CONTROL @@ -0,0 +1,9 @@ +Source: magnum-extras +Version: 2020.06 +Build-Depends: magnum[core] +Description: Extras for magnum, C++11/C++14 graphics middleware for games and data visualization +Homepage: https://magnum.graphics/ + +Feature: ui +Description: Ui library +Build-Depends: corrade[interconnect], magnum[text] diff --git a/vcpkg/ports/magnum-extras/portfile.cmake b/vcpkg/ports/magnum-extras/portfile.cmake new file mode 100644 index 0000000..d2a0af3 --- /dev/null +++ b/vcpkg/ports/magnum-extras/portfile.cmake @@ -0,0 +1,74 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mosra/magnum-extras + REF v2020.06 + SHA512 7419af84a6de72f666a9bd12a325c4b40f9e2a25fec3d0b22c348faab0a402b62fa782231b9b12180d84f4ab2508b02df25a97713948bdd2f21c9e8cb831fa25 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) + +# Handle features +set(_COMPONENT_FLAGS "") +foreach(_feature IN LISTS ALL_FEATURES) + # Uppercase the feature name and replace "-" with "_" + string(TOUPPER "${_feature}" _FEATURE) + string(REPLACE "-" "_" _FEATURE "${_FEATURE}") + + # Turn "-DWITH_*=" ON or OFF depending on whether the feature + # is in the list. + if(_feature IN_LIST FEATURES) + list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=ON") + else() + list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=OFF") + endif() +endforeach() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + ${_COMPONENT_FLAGS} + -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() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/MagnumExtras TARGET_PATH share/magnumextras) + +# Messages to the user +if("ui" IN_LIST FEATURES) + message(WARNING "It is recommended to install one of magnum-plugins[freetypefont,harfbuzzfont,stbtruetypefont] to have the UI library working out of the box") +endif() + +# Debug includes and share are the same as release +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +# Clean up empty directories +if("${FEATURES}" STREQUAL "core") + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/debug + ) + set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +endif() + +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(INSTALL ${SOURCE_PATH}/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright) + + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/magnum-integration/CONTROL b/vcpkg/ports/magnum-integration/CONTROL new file mode 100644 index 0000000..893ce96 --- /dev/null +++ b/vcpkg/ports/magnum-integration/CONTROL @@ -0,0 +1,27 @@ +Source: magnum-integration +Version: 2020.06 +Build-Depends: magnum[core] +Description: Integrations for magnum, C++11/C++14 graphics middleware for games and data visualization +Homepage: https://magnum.graphics/ + +Feature: bullet +Description: BulletIntegration library +Build-Depends: bullet3 + +Feature: eigen +Description: EigenIntegration library +Build-Depends: eigen3 + +Feature: glm +Description: GlmIntegration library +Build-Depends: glm + +Feature: imgui +Description: ImGuiIntegration library +Build-Depends: imgui +#Feature: ovr +#Description: OvrIntegration library +#Build-Depends: ovrsdk +#Feature: dart +#Description: DartIntegration library +#Build-Depends: dart diff --git a/vcpkg/ports/magnum-integration/portfile.cmake b/vcpkg/ports/magnum-integration/portfile.cmake new file mode 100644 index 0000000..9bb8a64 --- /dev/null +++ b/vcpkg/ports/magnum-integration/portfile.cmake @@ -0,0 +1,66 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mosra/magnum-integration + REF v2020.06 + SHA512 0b615acdb49ed55bd678a5fb019b1a8ccf522084f3114b2b8dd7e121c27d39ae2aab2879a2e2fa8b083163be711a86f64202fcf380413dec0c705fffd7d649c5 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) + +# Handle features +set(_COMPONENT_FLAGS "") +foreach(_feature IN LISTS ALL_FEATURES) + # Uppercase the feature name and replace "-" with "_" + string(TOUPPER "${_feature}" _FEATURE) + string(REPLACE "-" "_" _FEATURE "${_FEATURE}") + + # Turn "-DWITH_*=" ON or OFF depending on whether the feature + # is in the list. + if(_feature IN_LIST FEATURES) + list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=ON") + else() + list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=OFF") + endif() +endforeach() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + ${_COMPONENT_FLAGS} + -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() + +# Debug includes and share are the same as release +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +# Clean up empty directories +if("${FEATURES}" STREQUAL "core") + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/debug + ) + set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +endif() + +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(INSTALL ${SOURCE_PATH}/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/magnum-plugins/001-tools-path.patch b/vcpkg/ports/magnum-plugins/001-tools-path.patch new file mode 100644 index 0000000..18a351c --- /dev/null +++ b/vcpkg/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/vcpkg/ports/magnum-plugins/002-fix-stb-conflict.patch b/vcpkg/ports/magnum-plugins/002-fix-stb-conflict.patch new file mode 100644 index 0000000..13d535b --- /dev/null +++ b/vcpkg/ports/magnum-plugins/002-fix-stb-conflict.patch @@ -0,0 +1,13 @@ +diff --git a/src/MagnumPlugins/StbImageImporter/StbImageImporter.cpp b/src/MagnumPlugins/StbImageImporter/StbImageImporter.cpp +index c24a968..1a38162 100644 +--- a/src/MagnumPlugins/StbImageImporter/StbImageImporter.cpp ++++ b/src/MagnumPlugins/StbImageImporter/StbImageImporter.cpp +@@ -45,7 +45,7 @@ + #endif + + /* Not defining malloc/free, because there's no equivalent for realloc in C++ */ +-#include "stb_image.h" ++#include "external/stb/stb_image.h" + + namespace Magnum { namespace Trade { + diff --git a/vcpkg/ports/magnum-plugins/CONTROL b/vcpkg/ports/magnum-plugins/CONTROL new file mode 100644 index 0000000..dee9a32 --- /dev/null +++ b/vcpkg/ports/magnum-plugins/CONTROL @@ -0,0 +1,117 @@ +Source: magnum-plugins +Version: 2020.06 +Port-Version: 1 +Build-Depends: magnum[core] +Description: Plugins for magnum, C++11/C++14 graphics middleware for games and data visualization +Homepage: https://magnum.graphics/ +Default-Features: ddsimporter, icoimporter, miniexrimageconverter, opengeximporter, stanfordimporter, stanfordsceneconverter, stbimageconverter, stbimageimporter, stlimporter + +Feature: assimpimporter +Description: AssimpImporter plugin +Build-Depends: assimp, magnum[anyimageimporter], magnum[trade] + +Feature: openddl +Description: OpenDdl library + +Feature: basisimageconverter +Description: BasisImageConverter plugin +Build-Depends: magnum[trade] + +Feature: basisimporter +Description: BasisImporter plugin +Build-Depends: magnum[trade] + +Feature: ddsimporter +Description: DdsImporter plugin +Build-Depends: magnum[trade] + +Feature: devilimageimporter +Description: DevIlImageImporter plugin +Build-Depends: devil, magnum[trade] + +Feature: drflacaudioimporter +Description: DrFlacAudioImporter plugin +Build-Depends: magnum[audio] + +Feature: drmp3audioimporter +Description: DrMp3AudioImporter plugin +Build-Depends: magnum[audio] + +Feature: drwavaudioimporter +Description: DrWavAudioImporter plugin +Build-Depends: magnum[audio] +#Feature: faad2audioimporter +#Description: Faad2AudioImporter plugin +#Build-Depends: magnum[audio], faad2 + +Feature: freetypefont +Description: FreeTypeFont plugin +Build-Depends: freetype, magnum[text] + +Feature: harfbuzzfont +Description: HarfBuzzFont plugin +Build-Depends: harfbuzz, magnum-plugins[freetypefont] + +Feature: icoimporter +Description: IcoImporter plugin +Build-Depends: magnum[trade] + +Feature: jpegimporter +Description: JpegImporter plugin +Build-Depends: libjpeg-turbo, magnum[trade] + +Feature: jpegimageconverter +Description: JpegImageConverter plugin +Build-Depends: libjpeg-turbo, magnum[trade] + +Feature: meshoptimizersceneconverter +Description: MeshOptimizerSceneConverter plugin +Build-Depends: magnum[trade], meshoptimizer + +Feature: miniexrimageconverter +Description: MiniExrImageConverter plugin +Build-Depends: magnum[trade] + +Feature: opengeximporter +Description: OpenGexImporter plugin +Build-Depends: magnum[anyimageimporter], magnum[trade], magnum-plugins[openddl] + +Feature: pngimageconverter +Description: PngImageConverter plugin +Build-Depends: libpng, magnum[trade] + +Feature: pngimporter +Description: PngImporter plugin +Build-Depends: libpng, magnum[trade] + +Feature: stanfordimporter +Description: StanfordImporter plugin +Build-Depends: magnum[trade] + +Feature: stanfordsceneconverter +Description: StanfordSceneConverter plugin +Build-Depends: magnum[trade] + +Feature: stbimageconverter +Description: StbImageConverter plugin +Build-Depends: magnum[trade] + +Feature: stbimageimporter +Description: StbImageImporter plugin +Build-Depends: magnum[trade] + +Feature: stbtruetypefont +Description: StbTrueTypeFont plugin +Build-Depends: magnum[text] + +Feature: stbvorbisaudioimporter +Description: StbVorbisAudioImporter plugin +Build-Depends: magnum[audio] + +Feature: stlimporter +Description: StlImporter plugin +Build-Depends: magnum[trade] + +Feature: tinygltfimporter +Description: TinyGltfImporter plugin +Build-Depends: magnum[anyimageimporter], magnum-plugins[stbimageimporter], magnum[trade] diff --git a/vcpkg/ports/magnum-plugins/portfile.cmake b/vcpkg/ports/magnum-plugins/portfile.cmake new file mode 100644 index 0000000..766d91c --- /dev/null +++ b/vcpkg/ports/magnum-plugins/portfile.cmake @@ -0,0 +1,111 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mosra/magnum-plugins + REF v2020.06 + SHA512 3c11c2928bfc9d04c1ad64f72b6ffac6cf80a1ef3aacc5d0486b9ad955cf4f6ea6d5dcb3846dc5d73f64ec522a015eafb997f62c79ad7ff91169702341f23af0 + HEAD_REF master + PATCHES + 001-tools-path.patch + 002-fix-stb-conflict.patch +) + +if("basisimporter" IN_LIST FEATURES OR "basisimageconverter" IN_LIST FEATURES) + # Bundle Basis Universal, a commit that's before the UASTC support (which + # is not implemented yet). The repo has big unrequired files in its + # history, so we're downloading just a snapshot instead of a git clone. + vcpkg_download_distfile( + _BASIS_UNIVERSAL_PATCHES + URLS "https://github.com/BinomialLLC/basis_universal/commit/e9c55faac7745ebf38d08cd3b4f71aaf542f8191.diff" + FILENAME "e9c55faac7745ebf38d08cd3b4f71aaf542f8191.patch" + SHA512 e5dda11de2ba8cfd39728e69c74a7656bb522e509786fe5673c94b26be9bd4bee897510096479ee6323f5276d34cba1c44c60804a515c0b35ff7b6ac9d625b88 + ) + set(_BASIS_VERSION "8565af680d1bd2ad56ab227ca7d96c56dfbe93ed") + vcpkg_download_distfile( + _BASIS_UNIVERSAL_ARCHIVE + URLS "https://github.com/BinomialLLC/basis_universal/archive/${_BASIS_VERSION}.tar.gz" + FILENAME "basis-universal-${_BASIS_VERSION}.tar.gz" + SHA512 65062ab3ba675c46760f56475a7528189ed4097fb9bab8316e25d9e23ffec2a9560eb9a6897468baf2a6ab2bd698b5907283e96deaeaef178085a47f9d371bb2 + ) + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH _BASIS_UNIVERSAL_SOURCE + ARCHIVE ${_BASIS_UNIVERSAL_ARCHIVE} + WORKING_DIRECTORY "${SOURCE_PATH}/src/external" + PATCHES + ${_BASIS_UNIVERSAL_PATCHES}) + # Remove potentially cached directory which would cause renaming to fail + file(REMOVE_RECURSE "${SOURCE_PATH}/src/external/basis-universal") + # Rename the output folder so that magnum auto-detects it + file(RENAME ${_BASIS_UNIVERSAL_SOURCE} "${SOURCE_PATH}/src/external/basis-universal") +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILD_PLUGINS_STATIC 1) +else() + set(BUILD_PLUGINS_STATIC 0) +endif() + +set(_COMPONENTS "") +# Generate cmake parameters from feature names +foreach(_feature IN LISTS ALL_FEATURES) + # Uppercase the feature name and replace "-" with "_" + string(TOUPPER "${_feature}" _FEATURE) + string(REPLACE "-" "_" _FEATURE "${_FEATURE}") + + # Final feature is empty, ignore it + if(_feature) + list(APPEND _COMPONENTS ${_feature} WITH_${_FEATURE}) + endif() +endforeach() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS ${_COMPONENTS}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + ${FEATURE_OPTIONS} + -DBUILD_STATIC=${BUILD_PLUGINS_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() + +# Debug includes and share are the same as release +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share) + +# Clean up empty directories, if not building anything. +# FEATURES may only contain "core", but that does not build anything. +if(NOT FEATURES OR FEATURES STREQUAL "core") + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/debug) + set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +endif() + +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() + set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/magnum) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/magnum-d) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/magnum/001-tools-path.patch b/vcpkg/ports/magnum/001-tools-path.patch new file mode 100644 index 0000000..18a351c --- /dev/null +++ b/vcpkg/ports/magnum/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/vcpkg/ports/magnum/002-sdl-includes.patch b/vcpkg/ports/magnum/002-sdl-includes.patch new file mode 100644 index 0000000..fb2ffed --- /dev/null +++ b/vcpkg/ports/magnum/002-sdl-includes.patch @@ -0,0 +1,43 @@ +diff --git a/src/Magnum/Platform/Sdl2Application.cpp b/src/Magnum/Platform/Sdl2Application.cpp +index 276c7ee55..90c52f3cb 100644 +--- a/src/Magnum/Platform/Sdl2Application.cpp ++++ b/src/Magnum/Platform/Sdl2Application.cpp +@@ -34,7 +34,7 @@ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpragma-pack" + #endif +-#include ++#include + #ifdef CORRADE_TARGET_CLANG_CL + #pragma clang diagnostic pop + #endif +diff --git a/src/Magnum/Platform/Sdl2Application.h b/src/Magnum/Platform/Sdl2Application.h +index b2426d513..176729fdb 100644 +--- a/src/Magnum/Platform/Sdl2Application.h ++++ b/src/Magnum/Platform/Sdl2Application.h +@@ -57,11 +57,11 @@ + #pragma clang diagnostic ignored "-Wpragma-pack" + #endif + /* SDL.h includes the world, adding 50k LOC. We don't want that either. */ +-#include +-#include +-#include /* huh, why is this not pulled in implicitly?! */ +-#include +-#include ++#include ++#include ++#include /* huh, why is this not pulled in implicitly?! */ ++#include ++#include + + #ifdef CORRADE_TARGET_IOS + /* Including SDL_main.h unconditionally would mean it'd override Corrade::Main +@@ -74,7 +74,7 @@ + #endif + + #ifdef CORRADE_TARGET_WINDOWS_RT +-#include /* For SDL_WinRTRunApp */ ++#include /* For SDL_WinRTRunApp */ + #include /* For the WinMain entrypoint */ + #endif + #ifdef CORRADE_TARGET_CLANG_CL diff --git a/vcpkg/ports/magnum/CONTROL b/vcpkg/ports/magnum/CONTROL new file mode 100644 index 0000000..8bea92f --- /dev/null +++ b/vcpkg/ports/magnum/CONTROL @@ -0,0 +1,154 @@ +Source: magnum +Version: 2020.06 +Build-Depends: corrade[utility] +Description: C++11/C++14 graphics middleware for games and data visualization +Homepage: https://magnum.graphics/ +Default-Features: anyaudioimporter, anyimageimporter, anyimageconverter, anysceneconverter, anysceneimporter, debugtools, gl, meshtools, primitives, scenegraph, shaders, text, texturetools, trade, sdl2application + +Feature: al-info +Description: magnum-al-info utility +Build-Depends: magnum[audio] + +Feature: anyimageimporter +Description: AnyImageImporter plugin +Build-Depends: magnum[trade] + +Feature: anyaudioimporter +Description: AnyAudioImporter plugin +Build-Depends: magnum[audio], corrade[pluginmanager] + +Feature: anyimageconverter +Description: AnyImageConverter plugin +Build-Depends: magnum[trade] + +Feature: anysceneconverter +Description: AnySceneConverter plugin +Build-Depends: magnum[trade] + +Feature: anysceneimporter +Description: AnySceneImporter plugin +Build-Depends: magnum[trade] + +Feature: audio +Description: Audio library +Build-Depends: openal-soft + +Feature: debugtools +Description: DebugTools library + +Feature: distancefieldconverter +Description: magnum-distancefieldconverter utility +Build-Depends: magnum[texturetools], magnum[gl] + +Feature: fontconverter +Description: magnum-fontconverter utility +Build-Depends: magnum[text], magnum[gl] + +Feature: gl +Description: GL library + +Feature: gl-info +Description: gl-info utility +Build-Depends: magnum[gl] + +Feature: glfwapplication +Description: GlfwApplication library +Build-Depends: glfw3 + +Feature: imageconverter +Description: magnum-imageconverter utility +Build-Depends: magnum[trade] + +Feature: magnumfont +Description: MagnumFont plugin +Build-Depends: magnum[text] + +Feature: magnumfontconverter +Description: MagnumFontConverter plugin +Build-Depends: magnum[text], magnum[tgaimageconverter] + +Feature: meshtools +Description: MeshTools library +Build-Depends: magnum[trade] + +Feature: objimporter +Description: ObjImporter plugin +Build-Depends: magnum[trade] + +Feature: tgaimageconverter +Description: TgaImageConverter plugin +Build-Depends: magnum[trade] + +Feature: opengltester +Description: OpenGLTester library +Build-Depends: corrade[testsuite], magnum[gl] + +Feature: primitives +Description: Primitives library +Build-Depends: magnum[trade] + +Feature: sdl2application +Description: Sdl2Application library +Build-Depends: sdl2 + +Feature: scenegraph +Description: SceneGraph library + +Feature: sceneconverter +Description: magnum-sceneconverter utility +Build-Depends: magnum[anysceneconverter] + +Feature: shaders +Description: Shaders library +Build-Depends: magnum[gl] + +Feature: text +Description: Text library +Build-Depends: magnum[texturetools], magnum[gl], corrade[pluginmanager] + +Feature: texturetools +Description: TextureTools library + +Feature: tgaimporter +Description: TgaImporter plugin +Build-Depends: magnum[trade] + +Feature: trade +Description: Trade library +Build-Depends: corrade[pluginmanager] + +Feature: wavaudioimporter +Description: WavAudioImporter plugin +Build-Depends: magnum[audio] + +Feature: windowlesscglapplication +Description: WindowlessCglApplication library +Build-Depends: magnum[gl] + +Feature: cglcontext +Description: CglContext library +Build-Depends: magnum[gl] + +Feature: windowlesswglapplication +Description: WindowlessWglApplication library +Build-Depends: magnum[gl] + +Feature: wglcontext +Description: WglContext library +Build-Depends: magnum[gl] + +Feature: windowlesseglapplication +Description: WindowlessEglApplication library +Build-Depends: magnum[gl] + +Feature: eglcontext +Description: EglContext library +Build-Depends: magnum[gl] + +Feature: windowlessglxapplication +Description: WindowlessGlxApplication library +Build-Depends: magnum[gl] + +Feature: glxcontext +Description: GlxContext library +Build-Depends: magnum[gl] diff --git a/vcpkg/ports/magnum/magnumdeploy.ps1 b/vcpkg/ports/magnum/magnumdeploy.ps1 new file mode 100644 index 0000000..203f2ba --- /dev/null +++ b/vcpkg/ports/magnum/magnumdeploy.ps1 @@ -0,0 +1,38 @@ +# Magnum's plugin deployment strategy is that each Magnum module has a hardcoded +# set of plugin directories. Each of these directories is deployed in +# full if that Module is referenced. +# +# Note: this function signature and behavior is depended upon by applocal.ps1 +function deployPluginsIfMagnum([string]$targetBinaryDir, [string]$MagnumPluginsDir, [string]$targetBinaryName) { + Write-Verbose "Deploying magnum plugins" + + $baseDir = Split-Path $MagnumPluginsDir -parent + $pluginsBase = Split-Path $MagnumPluginsDir -Leaf + $binDir = "$baseDir\bin" + + function deployPlugins([string]$pluginSubdirName) { + if (Test-Path "$MagnumPluginsDir\$pluginSubdirName") { + Write-Verbose " Deploying plugins directory '$pluginSubdirName'" + New-Item "$targetBinaryDir\$pluginsBase\$pluginSubdirName" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null + Get-ChildItem -Path "$MagnumPluginsDir\$pluginSubdirName\*" -Include "*.dll", "*.conf", "*.pdb" | % { + deployBinary "$targetBinaryDir\$pluginsBase\$pluginSubdirName" "$MagnumPluginsDir\$pluginSubdirName" $_.Name + resolve $_ + } + } else { + Write-Verbose " Skipping plugins directory '$pluginSubdirName': doesn't exist" + } + } + + # We detect Magnum modules in use via the DLLs themselves. + # Rather than checking for Magnum*.dll, we check for Magnum.dll and + # Magnum-d.dll to avoid falsly matching MagnumTextureTools.dll for example. + if ($targetBinaryName -like "MagnumAudio.dll" -or $targetBinaryName -like "MagnumAudio-d.dll") { + deployPlugins "audioimporters" + } elseif ($targetBinaryName -like "MagnumText.dll" -or $targetBinaryName -like "MagnumText-d.dll") { + deployPlugins "fonts" + deployPlugins "fontconverters" + } elseif ($targetBinaryName -like "Magnum.dll" -or $targetBinaryName -like "Magnum-d.dll") { + deployPlugins "importers" + deployPlugins "imageconverters" + } +} diff --git a/vcpkg/ports/magnum/portfile.cmake b/vcpkg/ports/magnum/portfile.cmake new file mode 100644 index 0000000..cbdb34c --- /dev/null +++ b/vcpkg/ports/magnum/portfile.cmake @@ -0,0 +1,128 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mosra/magnum + REF v2020.06 + SHA512 65b0c8a4520d1d282420c30ecd7c8525525d4dbb6e562e1e2e93d110f4eb686af43f098bf02460727fab1e1f9446dd00a99051e150c05ea40b1486a44fea1042 + HEAD_REF master + PATCHES + 001-tools-path.patch + 002-sdl-includes.patch +) + +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() + +# Remove platform-specific feature that are not available +# on current target platform from all features. + +# For documentation on VCPKG_CMAKE_SYSTEM_NAME see +# https://github.com/microsoft/vcpkg/blob/master/docs/users/triplets.md#vcpkg_cmake_system_name + +set(ALL_SUPPORTED_FEATURES ${ALL_FEATURES}) +# Windows Desktop +if(NOT "${VCPKG_CMAKE_SYSTEM_NAME}" STREQUAL "") + list(REMOVE_ITEM ALL_SUPPORTED_FEATURES wglcontext windowlesswglapplication) +endif() + +# Universal Windows Platform +if(NOT "${VCPKG_CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore") + # No UWP specific features +endif() + +# Mac OSX +if(NOT "${VCPKG_CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") + list(REMOVE_ITEM ALL_SUPPORTED_FEATURES cglcontext windowlesscglapplication) +endif() + +# Linux +if(NOT "${VCPKG_CMAKE_SYSTEM_NAME}" STREQUAL "Linux") + list(REMOVE_ITEM ALL_SUPPORTED_FEATURES glxcontext windowlessglxapplication) +endif() + +# WebAssembly / Linux +if(NOT "${VCPKG_CMAKE_SYSTEM_NAME}" MATCHES "(Emscripten|Linux)") + list(REMOVE_ITEM ALL_SUPPORTED_FEATURES eglcontext windowlesseglapplication) +endif() + +set(_COMPONENTS "") +# Generate cmake parameters from feature names +foreach(_feature IN LISTS ALL_SUPPORTED_FEATURES) + # Uppercase the feature name and replace "-" with "_" + string(TOUPPER "${_feature}" _FEATURE) + string(REPLACE "-" "_" _FEATURE "${_FEATURE}") + + # Final feature is empty, ignore it + if(_feature) + list(APPEND _COMPONENTS ${_feature} WITH_${_FEATURE}) + endif() +endforeach() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS ${_COMPONENTS}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + ${FEATURE_OPTIONS} + -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() + +vcpkg_copy_pdbs() + +# Drop a copy of tools +if(NOT VCPKG_CMAKE_SYSTEM_NAME) + set(EXE_SUFFIX .exe) +else() + set(EXE_SUFFIX) +endif() + +# Copy tools into vcpkg's tools directory +set(_TOOL_EXEC_NAMES "") +set(_TOOLS + al-info + distancefieldconverter + fontconverter + gl-info + imageconverter + sceneconverter) +foreach(_tool IN LISTS _TOOLS) + if("${_tool}" IN_LIST FEATURES) + list(APPEND _TOOL_EXEC_NAMES magnum-${_tool}) + endif() +endforeach() +message(STATUS ${_TOOL_EXEC_NAMES}) +if(_TOOL_EXEC_NAMES) + vcpkg_copy_tools(TOOL_NAMES "${_TOOL_EXEC_NAMES}" AUTO_CLEAN) +endif() + +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) + # 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() + file(COPY ${CMAKE_CURRENT_LIST_DIR}/magnumdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/bin/magnum) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/magnumdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/magnum-d) +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright) diff --git a/vcpkg/ports/mapbox-variant/CONTROL b/vcpkg/ports/mapbox-variant/CONTROL new file mode 100644 index 0000000..fad7259 --- /dev/null +++ b/vcpkg/ports/mapbox-variant/CONTROL @@ -0,0 +1,3 @@ +Source: mapbox-variant +Version: 1.1.6-0f734f0-1 +Description: C++11/C++14 Variant diff --git a/vcpkg/ports/mapbox-variant/portfile.cmake b/vcpkg/ports/mapbox-variant/portfile.cmake new file mode 100644 index 0000000..60fdd07 --- /dev/null +++ b/vcpkg/ports/mapbox-variant/portfile.cmake @@ -0,0 +1,17 @@ +# header-only +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mapbox/variant + REF 0f734f01e685a298e3756d30044a4164786c58c5 + SHA512 36b842ffbaa7d466c26b4783d68dff17b0079927aca876bd021f439591a4ee5f184c71a60ca59857c35675b2e27cf650bedea7a3cdf9c3fc959c3c0ec3b135eb + HEAD_REF master +) + +# Copy header files +file(COPY ${SOURCE_PATH}/include/mapbox/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/mapbox FILES_MATCHING PATTERN "*.hpp") + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/mapbox-variant) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/mapbox-variant/LICENSE ${CURRENT_PACKAGES_DIR}/share/mapbox-variant/copyright) diff --git a/vcpkg/ports/marble/CONTROL b/vcpkg/ports/marble/CONTROL new file mode 100644 index 0000000..20dd30c --- /dev/null +++ b/vcpkg/ports/marble/CONTROL @@ -0,0 +1,6 @@ +Source: marble +Version: 19.08.2 +Homepage: https://marble.kde.org +Description: Marble KDE library +Supports: windows & x64 & !static +Build-Depends: qt5-base, qt5-svg, qt5-quickcontrols, qt5-webchannel diff --git a/vcpkg/ports/marble/portfile.cmake b/vcpkg/ports/marble/portfile.cmake new file mode 100644 index 0000000..665eb31 --- /dev/null +++ b/vcpkg/ports/marble/portfile.cmake @@ -0,0 +1,45 @@ +vcpkg_fail_port_install(ON_TARGET "LINUX" "OSX" "UWP" "ANDROID" ON_ARCH "arm" "x86" ON_LIBRARY_LINKAGE "static") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/marble + REF 552cb9ae1f34482d1ec56532a703e0d820856286 #v20.04.3 + SHA512 ac6106a6db53534c96d7281b1a07624c2852ed8c78cce0b91c5f865b106487f1f49aaa4c72d00ffb1f79a761d8d2eca18129ef9517bef463a1840554ed3e51fb + HEAD_REF master + PATCHES "qtfix.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) + +# Install plugins and data files +file(GLOB_RECURSE PLUGINS "${CURRENT_PACKAGES_DIR}/plugins/*") +file(GLOB_RECURSE PLUGINS_DESIGNER "${CURRENT_PACKAGES_DIR}/lib/plugins/*") +file(GLOB_RECURSE PLUGINS_DEBUG "${CURRENT_PACKAGES_DIR}/debug/lib/plugins/*") +file(GLOB_RECURSE MKSPECS "${CURRENT_PACKAGES_DIR}/mkspecs/*") + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}) +file(COPY ${PLUGINS} ${PLUGINS_DESIGNER} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}/plugins) +file(COPY ${PLUGINS_DEBUG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/plugins) +file(COPY "${CURRENT_PACKAGES_DIR}/data" DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) # have to keep folder structure here +file(COPY ${MKSPECS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}/mkspecs) + +# remove plugin folder +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/plugins ${CURRENT_PACKAGES_DIR}/debug/plugins + ${CURRENT_PACKAGES_DIR}/data ${CURRENT_PACKAGES_DIR}/debug/data + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/mkspecs ${CURRENT_PACKAGES_DIR}/debug/mkspecs + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/debug/lib/plugins ${CURRENT_PACKAGES_DIR}/lib/plugins +) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/marble/qtfix.patch b/vcpkg/ports/marble/qtfix.patch new file mode 100644 index 0000000..39a420b --- /dev/null +++ b/vcpkg/ports/marble/qtfix.patch @@ -0,0 +1,97 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a3b2139dc..1f9a10513 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -171,7 +171,7 @@ set (PEDANTIC FALSE CACHE BOOL "Determines if we should compile with -Wall -Werr + set (WITH_DESIGNER_PLUGIN TRUE CACHE BOOL "Build plugins for Qt Designer") + add_feature_info("Qt Designer plugins" WITH_DESIGNER_PLUGIN "Marble widget support in Qt Designer. Toggle with WITH_DESIGNER_PLUGIN=YES/NO") + +-set(EXEC_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "Base directory for executables and libraries" FORCE) ++set(EXEC_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}/bin CACHE PATH "Base directory for executables and libraries" FORCE) + if (NOT QT_PLUGINS_DIR) + set(QT_PLUGINS_DIR ${CMAKE_INSTALL_LIBDIR}/plugins) + endif() +@@ -248,7 +248,7 @@ add_definitions( + -DQT_NO_URL_CAST_FROM_STRING + -DQT_NO_CAST_TO_ASCII + -DQT_NO_CAST_FROM_BYTEARRAY +- -DQT_STRICT_ITERATORS ++# -DQT_STRICT_ITERATORS + -DQT_DISABLE_DEPRECATED_BEFORE=0x050700 + ) + +diff --git a/src/apps/marble-qt/CMakeLists.txt b/src/apps/marble-qt/CMakeLists.txt +index d28e3aa5e..7bbf4a63c 100644 +--- a/src/apps/marble-qt/CMakeLists.txt ++++ b/src/apps/marble-qt/CMakeLists.txt +@@ -48,7 +48,7 @@ if(STATIC_BUILD) + endif(STATIC_BUILD) + + if(WIN32) +-install (TARGETS marble-qt RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}) ++ install (TARGETS marble-qt RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/tools/marble) + else(WIN32) + if (APPLE) + # No need for this when installing to a bundle +diff --git a/src/lib/astro/CMakeLists.txt b/src/lib/astro/CMakeLists.txt +index 5e1afd60f..fc53985f4 100644 +--- a/src/lib/astro/CMakeLists.txt ++++ b/src/lib/astro/CMakeLists.txt +@@ -50,7 +50,7 @@ target_include_directories(astro + + # choose the correct target install library path + if(WIN32) +- INSTALL(TARGETS astro EXPORT AstroTargets RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX} ARCHIVE DESTINATION lib) ++ INSTALL(TARGETS astro EXPORT AstroTargets RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) + elseif(APPLE) + INSTALL(TARGETS astro LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/lib) + else() +diff --git a/src/lib/marble/CMakeLists.txt b/src/lib/marble/CMakeLists.txt +index 7d27be94b..f1f377967 100644 +--- a/src/lib/marble/CMakeLists.txt ++++ b/src/lib/marble/CMakeLists.txt +@@ -448,7 +448,7 @@ target_include_directories(marblewidget + + # choose the correct target install library path + if(WIN32) +- install(TARGETS marblewidget EXPORT MarbleTargets RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX} ARCHIVE DESTINATION lib) ++ install(TARGETS marblewidget EXPORT MarbleTargets RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) + elseif(APPLE) + install(TARGETS marblewidget LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/Marble.app/Contents/MacOS/lib) + else() +diff --git a/src/lib/marble/declarative/CMakeLists.txt b/src/lib/marble/declarative/CMakeLists.txt +index dd5d519c4..482a02ad5 100644 +--- a/src/lib/marble/declarative/CMakeLists.txt ++++ b/src/lib/marble/declarative/CMakeLists.txt +@@ -53,7 +53,7 @@ if(Qt5Positioning_FOUND) + endif() + + if(WIN32) +- install(TARGETS marbledeclarative RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX} ARCHIVE DESTINATION lib) ++ install(TARGETS marbledeclarative RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) + else() + install(TARGETS marbledeclarative LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() +diff --git a/src/plugins/positionprovider/CMakeLists.txt b/src/plugins/positionprovider/CMakeLists.txt +index 85591098e..87011876e 100644 +--- a/src/plugins/positionprovider/CMakeLists.txt ++++ b/src/plugins/positionprovider/CMakeLists.txt +@@ -12,12 +12,12 @@ find_package(Qt5 ${REQUIRED_QT_VERSION} + COMPONENTS + Positioning + ) +-marble_set_package_properties( Qt5Positioning PROPERTIES DESCRIPTION "a collection of APIs and frameworks" ) +-marble_set_package_properties( Qt5Positioning PROPERTIES URL "https://www.qt.io/developers/" ) +-marble_set_package_properties( Qt5Positioning PROPERTIES TYPE OPTIONAL PURPOSE "position information via Qt5Positioning" ) +-if(Qt5Positioning_FOUND) +- ADD_SUBDIRECTORY( qtpositioning ) +-endif() ++#marble_set_package_properties( Qt5Positioning PROPERTIES DESCRIPTION "a collection of APIs and frameworks" ) ++#marble_set_package_properties( Qt5Positioning PROPERTIES URL "https://www.qt.io/developers/" ) ++#arble_set_package_properties( Qt5Positioning PROPERTIES TYPE OPTIONAL PURPOSE "position information via Qt5Positioning" ) ++#if(Qt5Positioning_FOUND) ++# ADD_SUBDIRECTORY( qtpositioning ) ++#endif() + + + macro_optional_find_package(libwlocate) diff --git a/vcpkg/ports/marl/portfile.cmake b/vcpkg/ports/marl/portfile.cmake new file mode 100644 index 0000000..40d5102 --- /dev/null +++ b/vcpkg/ports/marl/portfile.cmake @@ -0,0 +1,37 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/marl + REF 45be9b248306e6ec3136efdd256d769c23b581d1 + SHA512 24efe143718adbf4894e21e715ef5ed2585085b7b3729d9e21d3b0951c7c939e16c9f531eb52ec489cb539d1f70a2dcde025b7bbcbb2165ddf1a5b8278f9b806 + HEAD_REF main +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" MARL_BUILD_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DMARL_BUILD_SHARED=${MARL_BUILD_SHARED} + -DMARL_INSTALL=ON +) + +vcpkg_install_cmake() + +if(MARL_BUILD_SHARED) + vcpkg_replace_string( + "${CURRENT_PACKAGES_DIR}/include/marl/export.h" + "#ifdef MARL_DLL" + "#if 1 // #ifdef MARL_DLL" + ) +endif() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/marl/vcpkg.json b/vcpkg/ports/marl/vcpkg.json new file mode 100644 index 0000000..7bf0f8e --- /dev/null +++ b/vcpkg/ports/marl/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "marl", + "version-string": "2020-06-30", + "description": "A hybrid thread/fiber task scheduler written in modern C++", + "homepage": "https://github.com/google/marl", + "license": "Apache-2.0", + "supports": "!uwp" +} diff --git a/vcpkg/ports/mathc/CMakeLists.txt b/vcpkg/ports/mathc/CMakeLists.txt new file mode 100644 index 0000000..7c221be --- /dev/null +++ b/vcpkg/ports/mathc/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.14) + +project(mathc LANGUAGES C) + +include(GNUInstallDirs) + +add_library(mathc mathc.c) + +target_include_directories( + mathc + PUBLIC + $ +) + +set_target_properties(mathc PROPERTIES PUBLIC_HEADER mathc.h) + +install(TARGETS mathc EXPORT unofficial-mathc-config) + +install( + EXPORT unofficial-mathc-config + NAMESPACE unofficial::mathc:: + DESTINATION share/unofficial-mathc + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) diff --git a/vcpkg/ports/mathc/CONTROL b/vcpkg/ports/mathc/CONTROL new file mode 100644 index 0000000..47292b5 --- /dev/null +++ b/vcpkg/ports/mathc/CONTROL @@ -0,0 +1,4 @@ +Source: mathc +Version: 2019-09-29 +Description: Pure C math library for 2D and 3D programming +Homepage: https://github.com/felselva/mathc diff --git a/vcpkg/ports/mathc/portfile.cmake b/vcpkg/ports/mathc/portfile.cmake new file mode 100644 index 0000000..7b3d263 --- /dev/null +++ b/vcpkg/ports/mathc/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO felselva/mathc + REF d672725203fc80f6f79fba64533b87d51c32d714 + SHA512 6db96b7ca9b26745b6ead774b547f6cccdecaef0b55cb766d4f26ae7149bbb72e2bd877cb7994455bd19cae129d014efaf40b50395b1114b7ac95dc6ed53bf34 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME unofficial-${PORT}) diff --git a/vcpkg/ports/mathgl/CONTROL b/vcpkg/ports/mathgl/CONTROL new file mode 100644 index 0000000..7dc82d3 --- /dev/null +++ b/vcpkg/ports/mathgl/CONTROL @@ -0,0 +1,48 @@ +Source: mathgl +Version: 2.4.3-6 +Description: MathGL is a free library of fast C++ routines for the plotting of the data varied in one or more dimensions +Default-Features: opengl, jpeg, png, zlib + +Feature: hdf5 +Build-Depends: hdf5 +Description: hdf5 module + +Feature: fltk +Build-Depends: fltk +Description: fltk module + +Feature: gif +Build-Depends: giflib +Description: gif module + +Feature: png +Build-Depends: libpng +Description: png module + +Feature: zlib +Build-Depends: zlib +Description: zlib module + +Feature: jpeg +Build-Depends: libjpeg-turbo +Description: jpeg module + +Feature: gsl +Build-Depends: gsl +Description: gsl module + +Feature: opengl +Build-Depends: opengl +Description: opengl module + +Feature: glut +Build-Depends: freeglut +Description: glut module + +Feature: wx +Build-Depends: wxwidgets +Description: wx module + +Feature: qt5 +Build-Depends: qt5 +Description: qt5 module diff --git a/vcpkg/ports/mathgl/fix_cmakelists_and_cpp.patch b/vcpkg/ports/mathgl/fix_cmakelists_and_cpp.patch new file mode 100644 index 0000000..a929f1e --- /dev/null +++ b/vcpkg/ports/mathgl/fix_cmakelists_and_cpp.patch @@ -0,0 +1,153 @@ +diff --git a/mgllab/CMakeLists.txt b/mgllab/CMakeLists.txt +index 1649104..eeec1c1 100644 +--- a/mgllab/CMakeLists.txt ++++ b/mgllab/CMakeLists.txt +@@ -38,7 +38,11 @@ if(MGL_HAVE_FLTK) + set(mgllab_src ${mgllab_src} mgllab.rc) + endif(WIN32) + add_executable(mgllab ${mgllab_src} ${mgllab_hdr}) +- target_link_libraries(mgllab mgl mgl-fltk ${FLTK_LIBRARIES}) ++ if(WIN32) ++ target_link_libraries(mgllab mgl mgl-fltk mgl-fltk-static mgl-static getopt-static ${FLTK_LIBRARIES}) ++ else(WIN32) ++ target_link_libraries(mgllab mgl mgl-fltk ${FLTK_LIBRARIES}) ++ endif(WIN32) + install( + TARGETS mgllab + RUNTIME DESTINATION bin ) +diff --git a/mgllab/table.cpp b/mgllab/table.cpp +index 5243549..23eebe5 100644 +--- a/mgllab/table.cpp ++++ b/mgllab/table.cpp +@@ -559,8 +559,13 @@ public: + o->tooltip(_("Change data values and close this window")); + w->set_modal(); w->end(); + } +- double min() { return wmin->value(); } +- double max() { return wmax->value(); } ++ #if WIN32 ++ double _min() { return wmin->value(); } ++ double _max() { return wmax->value(); } ++ #else ++ double min() { return wmin->value(); } ++ double max() { return wmax->value(); } ++ #endif + int sym() { return wsym->value(); } + bool ok() { return !result.empty(); } + void cb_ok() +@@ -581,8 +586,14 @@ void fill_cb(Fl_Widget*, void*v) + HMDT d = dynamic_cast(e->var); + HADT c = dynamic_cast(e->var); + char ch = nrm_dlg.result[0]; +- if(d) { d->Fill(nrm_dlg.min(),nrm_dlg.max(),ch); e->refresh(); } +- if(c) { c->Fill(nrm_dlg.min(),nrm_dlg.max(),ch); e->refresh(); } ++ #if WIN32 ++ if(d) { d->Fill(nrm_dlg._min(),nrm_dlg._max(),ch); e->refresh(); } ++ if(c) { c->Fill(nrm_dlg._min(),nrm_dlg._max(),ch); e->refresh(); } ++ #else ++ if(d) { d->Fill(nrm_dlg.min(),nrm_dlg.max(),ch); e->refresh(); } ++ if(c) { c->Fill(nrm_dlg.min(),nrm_dlg.max(),ch); e->refresh(); } ++ #endif ++ + } + } + //----------------------------------------------------------------------------- +@@ -594,8 +605,13 @@ void normal_cb(Fl_Widget*, void*v) + { + HMDT d = dynamic_cast(e->var); + HADT c = dynamic_cast(e->var); +- if(d) { d->Norm(nrm_dlg.min(),nrm_dlg.max(),nrm_dlg.sym()); e->refresh(); } +- if(c) { c->Fill(nrm_dlg.min(),nrm_dlg.max(),nrm_dlg.sym()); e->refresh(); } ++ #if WIN32 ++ if(d) { d->Norm(nrm_dlg._min(),nrm_dlg._max(),nrm_dlg.sym()); e->refresh(); } ++ if(c) { c->Fill(nrm_dlg._min(),nrm_dlg._max(),nrm_dlg.sym()); e->refresh(); } ++ #else ++ if(d) { d->Norm(nrm_dlg.min(),nrm_dlg.max(),nrm_dlg.sym()); e->refresh(); } ++ if(c) { c->Fill(nrm_dlg.min(),nrm_dlg.max(),nrm_dlg.sym()); e->refresh(); } ++ #endif + } + } + //----------------------------------------------------------------------------- +diff --git a/src/parser.cpp b/src/parser.cpp +index 577191d..e6909a1 100644 +--- a/src/parser.cpp ++++ b/src/parser.cpp +@@ -58,7 +58,10 @@ void mglParser::FillBaseCmd() + HMDT MGL_NO_EXPORT mglFormulaCalc(std::wstring string, mglParser *arg, const std::vector &head); + HADT MGL_NO_EXPORT mglFormulaCalcC(std::wstring string, mglParser *arg, const std::vector &head); + //----------------------------------------------------------------------------- ++#ifndef MGL_ASK_FUNC ++#define MGL_ASK_FUNC + MGL_EXPORT void (*mgl_ask_func)(const wchar_t *, wchar_t *)=0; ++#endif + void MGL_EXPORT mgl_ask_gets(const wchar_t *quest, wchar_t *res) + { printf("%ls\n",quest); if(!fgetws(res,1024,stdin)) *res=0; } + //----------------------------------------------------------------------------- +@@ -69,7 +72,10 @@ void MGL_EXPORT mgl_progress_txt(int value, int maximal, HMGL) + else for(int i=prev;i anim; + mglParse p(true); +diff --git a/include/mgl2/datac.h b/include/mgl2/datac.h +index f2c0251..0e69de7 100644 +--- a/include/mgl2/datac.h ++++ b/include/mgl2/datac.h +@@ -474,7 +474,7 @@ using mglDataA::Momentum; + void set_v(mreal val, long i,long j=0,long k=0) { a[i+nx*(j+ny*k)]=val; } + #else + /// Get the value in given cell of the data with border checking +- mreal v(long i,long j=0,long k=0) const { return mgl_abs(mgl_datac_get_value(this,i,j,k)); } ++ mreal v(long i,long j=0,long k=0) const { return abs(a[i+nx*(j+ny*k)]); } + /// Set the value in given cell of the data + void set_v(mreal val, long i,long j=0,long k=0) { mgl_datac_set_value(this,val,i,j,k); } + #endif +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d0c779d..acd9d7f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -579,10 +579,15 @@ if(enable-glut) + if(NOT MGL_HAVE_OPENGL) + message(SEND_ERROR "You have to enable OpenGL if you plan to use GLUT.") + endif(NOT MGL_HAVE_OPENGL) +- include(FindGLUT) ++ find_path(GLUT_INCLUDE_DIR freeglut.h PATH_SUFFIXES GL) ++ include(SelectLibraryConfigurations) ++ find_library(GLUT_LIBRARY_RELEASE NAMES freeglut) ++ find_library(GLUT_LIBRARY_DEBUG NAMES freeglutd) ++ select_library_configurations(GLUT) + if(NOT GLUT_FOUND) + message(SEND_ERROR "Couldn't find GLUT library.") + endif(NOT GLUT_FOUND) ++ include_directories(${GLUT_INCLUDE_DIR}/GL) + else(enable-glut) + set(MGL_HAVE_GLUT 0) + endif(enable-glut) diff --git a/vcpkg/ports/mathgl/portfile.cmake b/vcpkg/ports/mathgl/portfile.cmake new file mode 100644 index 0000000..af6a691 --- /dev/null +++ b/vcpkg/ports/mathgl/portfile.cmake @@ -0,0 +1,78 @@ +set(MATHGL_VERSION "2.4.3") + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO mathgl/mathgl + REF mathgl%20${MATHGL_VERSION} + FILENAME "mathgl-${MATHGL_VERSION}.tar.gz" + SHA512 e47fc8171ce80c8b33a8f03d9375bc036455dae539b47cf4ee922f8fa36f5afcf8b3f0666997764e453eb698c0e8c03da36dd0ac2bf71c158e95309b247d27de + PATCHES + type_fix.patch + fix_cmakelists_and_cpp.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + hdf5 enable-hdf5 + fltk enable-fltk + gif enable-gif + png enable-png + zlib enable-zlib + jpeg enable-jpeg + gsl enable-gsl + opengl enable-opengl + glut enable-glut + wx enable-wx + qt5 enable-qt5 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + file(REMOVE ${CURRENT_PACKAGES_DIR}/mathgl2-config.cmake) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/mathgl2-config.cmake) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/mathgl) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +#somehow the native CMAKE_EXECUTABLE_SUFFIX does not work, so here we emulate it +if(CMAKE_HOST_WIN32) + set(EXECUTABLE_SUFFIX ".exe") +else() + set(EXECUTABLE_SUFFIX "") +endif() + +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mgllab${EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mglview${EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mglconv${EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mgltask${EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/udav${EXECUTABLE_SUFFIX}) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/mathgl/) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/mglconv${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/mathgl/mglconv${EXECUTABLE_SUFFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/mgltask${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/mathgl/mgltask${EXECUTABLE_SUFFIX}) +if (EXISTS ${CURRENT_PACKAGES_DIR}/bin/mgllab${EXECUTABLE_SUFFIX}) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/mgllab${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/mathgl/mgllab${EXECUTABLE_SUFFIX}) +endif() +if (EXISTS ${CURRENT_PACKAGES_DIR}/bin/mglview${EXECUTABLE_SUFFIX}) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/mglview${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/mathgl/mglview${EXECUTABLE_SUFFIX}) +endif() +if (EXISTS ${CURRENT_PACKAGES_DIR}/bin/udav${EXECUTABLE_SUFFIX}) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/udav${EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/mathgl/udav${EXECUTABLE_SUFFIX}) +endif() + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/mathgl) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mathgl RENAME copyright) diff --git a/vcpkg/ports/mathgl/type_fix.patch b/vcpkg/ports/mathgl/type_fix.patch new file mode 100644 index 0000000..288f6b1 --- /dev/null +++ b/vcpkg/ports/mathgl/type_fix.patch @@ -0,0 +1,62 @@ +diff --git a/src/complex.cpp b/src/complex.cpp +index 2fcc14c..fb3498f 100755 +--- a/src/complex.cpp ++++ b/src/complex.cpp +@@ -863,12 +863,12 @@ void MGL_EXPORT mgl_datac_insert_(uintptr_t *d, const char *dir, int *at, int *n + void MGL_EXPORT mgl_datac_delete_(uintptr_t *d, const char *dir, int *at, int *num, int) + { mgl_datac_delete(_DC_,*dir,*at,*num); } + //----------------------------------------------------------------------------- +-void MGL_EXPORT mgl_datac_set_value(HADT dat, dual v, long i, long j, long k) ++void MGL_EXPORT mgl_datac_set_value(HADT dat, mdual v, long i, long j, long k) + { + if(i>=0 && inx && j>=0 && jny && k>=0 && knz) + dat->a[i+dat->nx*(j+dat->ny*k)]=v; + } +-void MGL_EXPORT mgl_datac_set_value_(uintptr_t *d, dual *v, int *i, int *j, int *k) ++void MGL_EXPORT mgl_datac_set_value_(uintptr_t *d, mdual *v, int *i, int *j, int *k) + { mgl_datac_set_value(_DC_,*v,*i,*j,*k); } + //----------------------------------------------------------------------------- + cmdual MGL_EXPORT mgl_datac_get_value(HCDT dat, long i, long j, long k) +diff --git a/src/complex_io.cpp b/src/complex_io.cpp +index 2fcd40a..49feb5c 100755 +--- a/src/complex_io.cpp ++++ b/src/complex_io.cpp +@@ -343,14 +343,14 @@ void MGL_EXPORT mgl_datac_create(HADT d,long mx,long my,long mz) + void MGL_EXPORT mgl_datac_create_(uintptr_t *d, int *nx,int *ny,int *nz) + { mgl_datac_create(_DC_,*nx,*ny,*nz); } + //----------------------------------------------------------------------------- +-void MGL_EXPORT mgl_datac_link(HADT d, dual *A, long mx,long my,long mz) ++void MGL_EXPORT mgl_datac_link(HADT d, mdual *A, long mx,long my,long mz) + { + if(!A) return; + if(!d->link && d->a) delete [](d->a); + d->nx = mx>0 ? mx:1; d->ny = my>0 ? my:1; d->nz = mz>0 ? mz:1; +- d->link=true; d->a=A; d->NewId(); ++ d->link=true; d->a=(dual*)A; d->NewId(); + } +-void MGL_EXPORT mgl_datac_link_(uintptr_t *d, dual *A, int *nx,int *ny,int *nz) ++void MGL_EXPORT mgl_datac_link_(uintptr_t *d, mdual *A, int *nx,int *ny,int *nz) + { mgl_datac_link(_DC_,A,*nx,*ny,*nz); } + //----------------------------------------------------------------------------- + int MGL_EXPORT mgl_datac_read_dim(HADT d, const char *fname,long mx,long my,long mz) +diff --git a/utils/mgltask.cpp b/utils/mgltask.cpp +index b9bb7da..4566512 100755 +--- a/utils/mgltask.cpp ++++ b/utils/mgltask.cpp +@@ -2,6 +2,7 @@ + #include + #include + #include ++#define _USE_MATH_DEFINES + #include + #include + //=================================================================== +@@ -100,7 +101,7 @@ int main(int argc, char *argv[]) + double x1[10],x2[10],dx[10],x[10]; + int k,i,n=argc-3;//=(argc==4) ? 1:2; + FILE *fm,*fo; +- ++ + // first place zeros + for(i=0;i<10;i++) + { diff --git a/vcpkg/ports/matio/CMakeLists.txt b/vcpkg/ports/matio/CMakeLists.txt new file mode 100644 index 0000000..d7b6bb6 --- /dev/null +++ b/vcpkg/ports/matio/CMakeLists.txt @@ -0,0 +1,60 @@ +cmake_minimum_required(VERSION 3.8.0) +project(libmatio C) + +set(SRC + src/endian.c + src/inflate.c + src/io.c + src/mat.c + src/mat4.c + src/mat5.c + src/mat73.c + visual_studio/matio.def + src/matvar_cell.c + src/matvar_struct.c + src/read_data.c + src/snprintf.c +) + +add_library(libmatio ${SRC}) +target_include_directories(libmatio PRIVATE src visual_studio) +target_compile_definitions(libmatio PRIVATE + -DH5_NO_DEPRECATED_SYMBOLS + -DMAT73=1 + -DREPLACE_GETOPT + -DMATIO_HAVE_INTTYPES_H=1 + -DMATIO_HAVE_STDINT_H=1 +) + +find_package(ZLIB REQUIRED) +target_link_libraries(libmatio PRIVATE ZLIB::ZLIB) +target_compile_definitions(libmatio PRIVATE -DHAVE_ZLIB=1) + +find_package(hdf5 CONFIG REQUIRED) + +if(BUILD_SHARED_LIBS) + target_compile_definitions(libmatio PRIVATE -DHAVE_HDF5=1 -DH5_BUILT_AS_DYNAMIC_LIB) + if(HDF5_USE_STATIC_LIBRARIES) + target_link_libraries(libmatio PRIVATE hdf5::hdf5-static hdf5::hdf5_hl-static) + else() + target_link_libraries(libmatio PRIVATE hdf5::hdf5-shared hdf5::hdf5_hl-shared) + endif() +else() + target_compile_definitions(libmatio PRIVATE -DHAVE_HDF5=1 -DH5_BUILT_AS_STATIC_LIB) + target_link_libraries(libmatio PRIVATE hdf5::hdf5-static hdf5::hdf5_hl-static) +endif() + +install( + TARGETS libmatio + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES + src/matio.h + visual_studio/matio_pubconf.h + DESTINATION include + ) +endif() diff --git a/vcpkg/ports/matio/CONTROL b/vcpkg/ports/matio/CONTROL new file mode 100644 index 0000000..fe3f568 --- /dev/null +++ b/vcpkg/ports/matio/CONTROL @@ -0,0 +1,5 @@ +Source: matio +Version: 1.5.17 +Homepage: https://github.com/tbeu/matio +Description: MATLAB MAT File I/O Library +Build-Depends: zlib, hdf5 diff --git a/vcpkg/ports/matio/portfile.cmake b/vcpkg/ports/matio/portfile.cmake new file mode 100644 index 0000000..2d73da3 --- /dev/null +++ b/vcpkg/ports/matio/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tbeu/matio + REF 64f793668e09216029447990702c145403d14375 # v1.5.17 + SHA512 bbb1c5f1f2609d329b69963f16ff8b60052922f83513d20f3ef687c04c4278536b88116c4727855de06f12ddf34103fe4be250012ae24706868490583ee90fde + 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}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/matio RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/matplotlib-cpp/CONTROL b/vcpkg/ports/matplotlib-cpp/CONTROL new file mode 100644 index 0000000..807f6c1 --- /dev/null +++ b/vcpkg/ports/matplotlib-cpp/CONTROL @@ -0,0 +1,4 @@ +Source: matplotlib-cpp +Version: 2020-08-27 +Description: Extremely simple yet powerful header-only C++ plotting library built on the popular matplotlib +Homepage: https://github.com/lava/matplotlib-cpp diff --git a/vcpkg/ports/matplotlib-cpp/portfile.cmake b/vcpkg/ports/matplotlib-cpp/portfile.cmake new file mode 100644 index 0000000..e3b61c2 --- /dev/null +++ b/vcpkg/ports/matplotlib-cpp/portfile.cmake @@ -0,0 +1,14 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lava/matplotlib-cpp + REF 70d508fcb7febc66535ba923eac1b1a4e571e4d1 + SHA512 4da452fc38b6c349a1b08b97775ef2d90354fabd3c8c3a0383f08609b22dea222b7f3e091efc1b833755f6b5c1e8564e675d2ed54cdc21f8b07b1b7bb44a82f4 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/matplotlibcpp.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/matroska/CONTROL b/vcpkg/ports/matroska/CONTROL new file mode 100644 index 0000000..1a5235d --- /dev/null +++ b/vcpkg/ports/matroska/CONTROL @@ -0,0 +1,6 @@ +Source: matroska +Version: 1.5.2 +Homepage: https://github.com/Matroska-Org/libmatroska +Description: a C++ libary to parse Matroska files (.mkv and .mka) +Build-Depends: ebml +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/matroska/portfile.cmake b/vcpkg/ports/matroska/portfile.cmake new file mode 100644 index 0000000..bf41c8f --- /dev/null +++ b/vcpkg/ports/matroska/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "matroska does not currently support UWP") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Matroska-Org/libmatroska + REF release-1.5.2 + SHA512 5e819d611455efb1dd49ea26b6b124899b1f6ba07b4af93b2f3437ffe7c2c0089a922ef894a7c8612faddadeea75142d0604ee54e6c5822439dc8c65008e119b + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DDISABLE_PKGCONFIG=1 +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Matroska) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.LGPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/matroska RENAME copyright) diff --git a/vcpkg/ports/mbedtls/CONTROL b/vcpkg/ports/mbedtls/CONTROL new file mode 100644 index 0000000..74164ea --- /dev/null +++ b/vcpkg/ports/mbedtls/CONTROL @@ -0,0 +1,10 @@ +Source: mbedtls +Version: 2.24.0 +Port-Version: 1 +Homepage: https://github.com/ARMmbed/mbedtls +Description: An open source, portable, easy to use, readable and flexible SSL library +Supports: !uwp + +Feature: pthreads +Build-Depends: pthreads (windows) +Description: Multi-threading support diff --git a/vcpkg/ports/mbedtls/enable-pthread.patch b/vcpkg/ports/mbedtls/enable-pthread.patch new file mode 100644 index 0000000..6353103 --- /dev/null +++ b/vcpkg/ports/mbedtls/enable-pthread.patch @@ -0,0 +1,102 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8833246..f68ab02 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -28,6 +28,7 @@ set(MBEDTLS_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + + option(USE_PKCS11_HELPER_LIBRARY "Build mbed TLS with the pkcs11-helper library." OFF) + option(ENABLE_ZLIB_SUPPORT "Build mbed TLS with zlib library." OFF) ++option(ENABLE_PTHREAD "Build mbed TLS with pthread" OFF) + + option(ENABLE_PROGRAMS "Build mbed TLS programs." ON) + +@@ -231,6 +232,8 @@ else() + set(LIB_INSTALL_DIR lib) + endif() + ++include_directories(${CMAKE_CURRENT_BINARY_DIR}/include/) ++ + if(ENABLE_ZLIB_SUPPORT) + find_package(ZLIB) + +@@ -239,6 +242,17 @@ if(ENABLE_ZLIB_SUPPORT) + endif(ZLIB_FOUND) + endif(ENABLE_ZLIB_SUPPORT) + ++if(ENABLE_PTHREAD) ++ if(WIN32) ++ find_package(pthreads_windows REQUIRED) ++ include_directories(${PThreads4W_INCLUDE_DIR}) ++ else() ++ set(CMAKE_THREAD_PREFER_PTHREAD ON) ++ find_package(Threads REQUIRED) ++ endif() ++ set(LINK_WITH_PTHREAD ON) ++endif() ++ + add_subdirectory(include) + + add_subdirectory(3rdparty) +diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt +index 62c0f62..7923202 100644 +--- a/include/CMakeLists.txt ++++ b/include/CMakeLists.txt +@@ -1,10 +1,14 @@ + option(INSTALL_MBEDTLS_HEADERS "Install mbed TLS headers." ON) + ++configure_file(mbedtls/config_threading.h.in mbedtls/config_threading.h) ++ + if(INSTALL_MBEDTLS_HEADERS) + + file(GLOB headers "mbedtls/*.h") + file(GLOB psa_headers "psa/*.h") +- ++ ++ set(headers ${headers} ${CMAKE_CURRENT_BINARY_DIR}/mbedtls/config_threading.h) ++ + install(FILES ${headers} + DESTINATION include/mbedtls + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ) +diff --git a/include/mbedtls/config.h b/include/mbedtls/config.h +index 1e6e052..51c20da 100644 +--- a/include/mbedtls/config.h ++++ b/include/mbedtls/config.h +@@ -24,6 +24,8 @@ + * limitations under the License. + */ + ++#include "mbedtls/config_threading.h" ++ + #ifndef MBEDTLS_CONFIG_H + #define MBEDTLS_CONFIG_H + +diff --git a/include/mbedtls/config_threading.h.in b/include/mbedtls/config_threading.h.in +new file mode 100644 +index 0000000..9d5d42e +--- /dev/null ++++ b/include/mbedtls/config_threading.h.in +@@ -0,0 +1,6 @@ ++#cmakedefine ENABLE_PTHREAD ++ ++#ifdef ENABLE_PTHREAD ++#define MBEDTLS_THREADING_C ++#define MBEDTLS_THREADING_PTHREAD ++#endif +\ No newline at end of file +diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt +index 33e2cfc..4b99331 100644 +--- a/library/CMakeLists.txt ++++ b/library/CMakeLists.txt +@@ -137,7 +137,11 @@ if(ENABLE_ZLIB_SUPPORT) + endif(ENABLE_ZLIB_SUPPORT) + + if(LINK_WITH_PTHREAD) +- set(libs ${libs} pthread) ++ if(WIN32) ++ set(libs ${libs} ${PThreads4W_LIBRARY}) ++ else() ++ set(libs ${libs} pthread) ++ endif() + endif() + + if(LINK_WITH_TRUSTED_STORAGE) diff --git a/vcpkg/ports/mbedtls/portfile.cmake b/vcpkg/ports/mbedtls/portfile.cmake new file mode 100644 index 0000000..196f7c0 --- /dev/null +++ b/vcpkg/ports/mbedtls/portfile.cmake @@ -0,0 +1,40 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +set(VCPKG_LIBRARY_LINKAGE static) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ARMmbed/mbedtls + REF 523f0554b6cdc7ace5d360885c3f5bbcc73ec0e8 # mbedtls-2.24.0 + SHA512 1ce78f34e8d87c2ce0454e0a08f4c6e5b3129d4b24cfa44162af21c2e8b5dc7feabf849e4fa547ce3781b5ce11aaf675cfed47412bae40091fbdd87bbcdbee07 + HEAD_REF master + PATCHES + enable-pthread.patch +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + pthreads ENABLE_PTHREAD +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DENABLE_TESTING=OFF + -DENABLE_PROGRAMS=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +if(WIN32 AND pthreads IN_LIST FEATURES) + file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +endif() + +vcpkg_copy_pdbs() \ No newline at end of file diff --git a/vcpkg/ports/mbedtls/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/mbedtls/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..40a0bcc --- /dev/null +++ b/vcpkg/ports/mbedtls/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,29 @@ +include(FindPackageHandleStandardArgs) + +find_path(MBEDTLS_INCLUDE_DIR mbedtls/ssl.h) + +find_library(MBEDTLS_CRYPTO_LIBRARY mbedcrypto) +find_package(pthreads_windows QUIET) +set(MBEDTLS_CRYPTO_LIBRARY ${MBEDTLS_CRYPTO_LIBRARY} ${PThreads4W_LIBRARY}) +find_library(MBEDTLS_X509_LIBRARY mbedx509) +find_library(MBEDTLS_TLS_LIBRARY mbedtls) +set(MBEDTLS_LIBRARIES ${MBEDTLS_CRYPTO_LIBRARY} ${MBEDTLS_X509_LIBRARY} ${MBEDTLS_TLS_LIBRARY}) + +if (MBEDTLS_INCLUDE_DIR AND EXISTS "${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h") + file( + STRINGS ${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h _MBEDTLS_VERLINE + REGEX "^#define[ \t]+MBEDTLS_VERSION_STRING[\t ].*" + ) + string(REGEX REPLACE ".*MBEDTLS_VERSION_STRING[\t ]+\"(.*)\"" "\\1" MBEDTLS_VERSION ${_MBEDTLS_VERLINE}) +endif() + +find_package_handle_standard_args( + mbedTLS + REQUIRED_VARS + MBEDTLS_INCLUDE_DIR + MBEDTLS_CRYPTO_LIBRARY + MBEDTLS_X509_LIBRARY + MBEDTLS_TLS_LIBRARY + PThreads4W_FOUND + VERSION_VAR MBEDTLS_VERSION +) diff --git a/vcpkg/ports/mcpp/0001-fix-_POSIX_C_SOURCE.patch b/vcpkg/ports/mcpp/0001-fix-_POSIX_C_SOURCE.patch new file mode 100644 index 0000000..37f625b --- /dev/null +++ b/vcpkg/ports/mcpp/0001-fix-_POSIX_C_SOURCE.patch @@ -0,0 +1,38 @@ +From d2625f80e08ff811a173ca3dbe76a0e004c26c65 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 16:21:43 -0700 +Subject: [PATCH] fix _POSIX_C_SOURCE + +set it to correctly ask for 200112L, for readlink +--- + configed.H | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/configed.H b/configed.H +index 2e01c15..250f441 100644 +--- a/configed.H ++++ b/configed.H +@@ -189,19 +189,13 @@ + #define _POSIX_ 1 + #define _POSIX_SOURCE 1 + #ifndef _POSIX_C_SOURCE +-#define _POSIX_C_SOURCE 1 ++#define _POSIX_C_SOURCE 200112L + #define _POSIX_C_SOURCE_defined 1 + #endif + #include "limits.h" + #ifdef _AIX + #include "sys/stat.h" + #endif +-#undef _POSIX_ +-#undef _POSIX_SOURCE +-#ifdef _POSIX_C_SOURCE_defined +-#undef _POSIX_C_SOURCE +-#undef _POSIX_C_SOURCE_defined +-#endif + #define CHARBIT CHAR_BIT + #define UCHARMAX UCHAR_MAX + #define USHRTMAX USHRT_MAX +-- +2.24.3 (Apple Git-128) + diff --git a/vcpkg/ports/mcpp/CONTROL b/vcpkg/ports/mcpp/CONTROL new file mode 100644 index 0000000..dc607ae --- /dev/null +++ b/vcpkg/ports/mcpp/CONTROL @@ -0,0 +1,5 @@ +Source: mcpp +Version: 2.7.2.14 +Port-Version: 2 +Homepage: https://github.com/zeroc-ice/mcpp +Description: Fork of mcpp, a C/C++ preprocessor diff --git a/vcpkg/ports/mcpp/portfile.cmake b/vcpkg/ports/mcpp/portfile.cmake new file mode 100644 index 0000000..8e2928e --- /dev/null +++ b/vcpkg/ports/mcpp/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zeroc-ice/mcpp + REF e6abf9a561294b667bb931b80cf749c9be2d1a2f + SHA512 131b68401683bcfb947ac4969a59aa4c1683412c30f76c50e9e9c5c952a881b9950127db2ef22c96968d8c90d26bcdb5a90fb1b77d4dda7dee67bfe4a2676b35 + HEAD_REF master + PATCHES + 0001-fix-_POSIX_C_SOURCE.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file( + INSTALL + ${SOURCE_PATH}/mcpp_lib.h + ${SOURCE_PATH}/mcpp_out.h + DESTINATION + ${CURRENT_PACKAGES_DIR}/include +) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/mdnsresponder/CONTROL b/vcpkg/ports/mdnsresponder/CONTROL new file mode 100644 index 0000000..9f97716 --- /dev/null +++ b/vcpkg/ports/mdnsresponder/CONTROL @@ -0,0 +1,5 @@ +Source: mdnsresponder +Version: 765.30.11-2 +Description: The mDNSResponder project is a component of Bonjour, Apple's ease-of-use IP networking initiative. +Homepage: https://developer.apple.com/bonjour/ +Supports: !arm \ No newline at end of file diff --git a/vcpkg/ports/mdnsresponder/portfile.cmake b/vcpkg/ports/mdnsresponder/portfile.cmake new file mode 100644 index 0000000..c37b07a --- /dev/null +++ b/vcpkg/ports/mdnsresponder/portfile.cmake @@ -0,0 +1,92 @@ +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS https://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-765.30.11.tar.gz + FILENAME mDNSResponder-765.30.11.tar.gz + SHA512 dfdea663ec1089058c2225ede13d70241dfec8311ff7fb8d29c8d386f5077a4104455d78f8777496cce96b8ff289b73ed1aec2bf65c52154b866fc1b7675ef90 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +IF (TRIPLET_SYSTEM_ARCH MATCHES "x86") + SET(BUILD_ARCH "Win32") +ELSEIF(TRIPLET_SYSTEM_ARCH MATCHES "arm") + MESSAGE(FATAL_ERROR " ARM is currently not supported.") +ELSE() + SET(BUILD_ARCH ${TRIPLET_SYSTEM_ARCH}) +ENDIF() + +function(FIX_VCXPROJ VCXPROJ_PATH) + file(READ ${VCXPROJ_PATH} ORIG) + if(${VCPKG_CRT_LINKAGE} STREQUAL "dynamic") + string(REGEX REPLACE + "MultiThreadedDebug" + "MultiThreadedDebugDLL" + ORIG "${ORIG}") + string(REGEX REPLACE + "MultiThreaded" + "MultiThreadedDLL" + ORIG "${ORIG}") + else() + string(REGEX REPLACE + "MultiThreadedDebugDLL" + "MultiThreadedDebug" + ORIG "${ORIG}") + string(REGEX REPLACE + "MultiThreadedDLL" + "MultiThreaded" + ORIG "${ORIG}") + endif() + if(${VCPKG_LIBRARY_LINKAGE} STREQUAL "dynamic") + string(REPLACE + "StaticLibrary" + "DynamicLibrary" + ORIG "${ORIG}") + else() + string(REPLACE + "DynamicLibrary" + "StaticLibrary" + ORIG "${ORIG}") + endif() + file(WRITE ${VCXPROJ_PATH} "${ORIG}") +endfunction() + +FIX_VCXPROJ(${SOURCE_PATH}/mDNSWindows/DLL/dnssd.vcxproj) +FIX_VCXPROJ(${SOURCE_PATH}/Clients/DNS-SD.VisualStudio/dns-sd.vcxproj) + +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/mDNSResponder.sln + PLATFORM ${BUILD_ARCH} + TARGET dns-sd +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(INSTALL + ${SOURCE_PATH}/mDNSWindows/DLL/${BUILD_ARCH}/Release/dnssd.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) + file(INSTALL + ${SOURCE_PATH}/mDNSWindows/DLL/${BUILD_ARCH}/Debug/dnssd.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) +endif() +file(INSTALL + ${SOURCE_PATH}/mDNSWindows/DLL/${BUILD_ARCH}/Release/dnssd.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) +file(INSTALL + ${SOURCE_PATH}/mDNSWindows/DLL/${BUILD_ARCH}/Debug/dnssd.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) +file(INSTALL + ${SOURCE_PATH}/mDNSShared/dns_sd.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/mdnsresponder/copyright +) +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/mecab/CMakeLists.txt b/vcpkg/ports/mecab/CMakeLists.txt new file mode 100644 index 0000000..9ebf42e --- /dev/null +++ b/vcpkg/ports/mecab/CMakeLists.txt @@ -0,0 +1,67 @@ +cmake_minimum_required(VERSION 3.12 FATAL_ERROR) + +PROJECT(mecab VERSION 1.0) + +file(GLOB SOURCE_FILE + "*.cpp" + "*.c" +) +file(GLOB HEADERS_FILE + "*.h" +) + +message(STATUS "current cmake path: ${CMAKE_CURRENT_SOURCE_DIR}") +list(REMOVE_ITEM SOURCE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/mecab-cost-train.cpp) +list(REMOVE_ITEM SOURCE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/mecab-dict-gen.cpp) +list(REMOVE_ITEM SOURCE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/mecab-dict-index.cpp) +list(REMOVE_ITEM SOURCE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/mecab-system-eval.cpp) +list(REMOVE_ITEM SOURCE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/mecab-test-gen.cpp) +#list(REMOVE_ITEM SOURCE_FILE "mecab-cost-train.cpp" "mecab-dict-gen.cpp" "mecab-dict-index.cpp" "mecab-system-eval.cpp" "mecab-test-gen.cpp") + +add_library (mecab ${SOURCE_FILE}) +target_include_directories(mecab PUBLIC + $ + $) + +if(UNIX) + target_compile_definitions(mecab PUBLIC -DHAVE_UNISTD_H -DHAVE_FCNTL_H -DHAVE_STDINT_H -DHAVE_SYS_TYPES_H -DHAVE_SYS_STAT_H -DHAVE_DIRENT_H -DDIC_VERSION=102 -DVERSION="@VERSION@" -DPACKAGE="mecab" -DMECAB_DEFAULT_RC="./mecabrc") +endif(UNIX) +if(WIN32) + target_compile_definitions(mecab PUBLIC -D_CRT_SECURE_NO_DEPRECATE -DMECAB_USE_THREAD -DDLL_EXPORT -DHAVE_GETENV -DHAVE_WINDOWS_H -DDIC_VERSION=102 -DVERSION="@VERSION@" -DPACKAGE="mecab" -DUNICODE -D_UNICODE -DMECAB_DEFAULT_RC="mecabrc") +endif(WIN32) + + +include (GNUInstallDirs) +include(CMakePackageConfigHelpers) + +set (mecab_CMAKE_DIR share/mecab CACHE STRING "Installation dir") +set (targets_export_name mecabTargets CACHE INTERNAL "") + +install(TARGETS mecab + EXPORT ${targets_export_name} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +) + +install(FILES ${HEADERS_FILE} DESTINATION include/mecab CONFIGURATIONS Release) + +install(EXPORT ${targets_export_name} + NAMESPACE mecab:: + DESTINATION ${mecab_CMAKE_DIR}) + +configure_package_config_file( + "${PROJECT_SOURCE_DIR}/Config.cmake.in" + "${PROJECT_BINARY_DIR}/mecabConfig.cmake" + INSTALL_DESTINATION ${mecab_CMAKE_DIR}) + + +write_basic_package_version_file( + ${PROJECT_BINARY_DIR}/mecabConfigVersion.cmake + VERSION ${PROJECT_VERSION} + COMPATIBILITY SameMajorVersion ) + +install(FILES + ${PROJECT_BINARY_DIR}/mecabConfig.cmake + ${PROJECT_BINARY_DIR}/mecabConfigVersion.cmake + DESTINATION ${mecab_CMAKE_DIR}) diff --git a/vcpkg/ports/mecab/CONTROL b/vcpkg/ports/mecab/CONTROL new file mode 100644 index 0000000..7e0e236 --- /dev/null +++ b/vcpkg/ports/mecab/CONTROL @@ -0,0 +1,5 @@ +Source: mecab +Version: 2019-09-25 +Port-Version: 1 +Description: A morphological analysis engine based on CRF +Supports: !(uwp|arm|arm64) diff --git a/vcpkg/ports/mecab/Config.cmake.in b/vcpkg/ports/mecab/Config.cmake.in new file mode 100644 index 0000000..927b363 --- /dev/null +++ b/vcpkg/ports/mecab/Config.cmake.in @@ -0,0 +1,4 @@ +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake") +check_required_components(mecab) \ No newline at end of file diff --git a/vcpkg/ports/mecab/fix_wpath_unsigned.patch b/vcpkg/ports/mecab/fix_wpath_unsigned.patch new file mode 100644 index 0000000..d8dcf15 --- /dev/null +++ b/vcpkg/ports/mecab/fix_wpath_unsigned.patch @@ -0,0 +1,40 @@ +diff --git a/mecab/src/common.h b/mecab/src/common.h +index d1fc459..2951d5a 100644 +--- a/mecab/src/common.h ++++ b/mecab/src/common.h +@@ -86,7 +86,8 @@ + #define WPATH_FORCE(path) (MeCab::Utf8ToWide(path).c_str()) + #define WPATH(path) (path) + #else +-#define WPATH(path) WPATH_FORCE(path) ++#define WPATH_FORCE(path) (MeCab::Utf8ToWide(path).c_str()) ++#define WPATH(path) (path) + #endif + #else + #define WPATH_FORCE(path) (path) +diff --git a/mecab/src/feature_index.cpp b/mecab/src/feature_index.cpp +index 051bdf8..fdd0145 100644 +--- a/mecab/src/feature_index.cpp ++++ b/mecab/src/feature_index.cpp +@@ -353,7 +353,7 @@ bool FeatureIndex::buildUnigramFeature(LearnerPath *path, + if (!r) goto NEXT; + os_ << r; + } break; +- case 't': os_ << (size_t)path->rnode->char_type; break; ++ case 't': os_ << (int)(size_t)path->rnode->char_type; break; + case 'u': os_ << ufeature; break; + case 'w': + if (path->rnode->stat == MECAB_NOR_NODE) { +diff --git a/mecab/src/writer.cpp b/mecab/src/writer.cpp +index 0ef6975..f068fa3 100644 +--- a/mecab/src/writer.cpp ++++ b/mecab/src/writer.cpp +@@ -257,7 +257,7 @@ bool Writer::writeNode(Lattice *lattice, + // input sentence + case 'S': os->write(lattice->sentence(), lattice->size()); break; + // sentence length +- case 'L': *os << lattice->size(); break; ++ case 'L': *os << (int)lattice->size(); break; + // morph + case 'm': os->write(node->surface, node->length); break; + case 'M': os->write(reinterpret_cast diff --git a/vcpkg/ports/mecab/portfile.cmake b/vcpkg/ports/mecab/portfile.cmake new file mode 100644 index 0000000..8493776 --- /dev/null +++ b/vcpkg/ports/mecab/portfile.cmake @@ -0,0 +1,30 @@ +if (VCPKG_TARGET_TRIPLET STREQUAL "x64-uwp" OR VCPKG_TARGET_TRIPLET STREQUAL "arm64-windows" OR VCPKG_TARGET_TRIPLET STREQUAL "arm-uwp") + message(FATAL_ERROR "mecab does not support on this platform") +endif() + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO taku910/mecab + REF 3a07c4eefaffb4e7a0690a7f4e5e0263d3ddb8a3 + SHA512 d3288cca7207daf66df4349819b64fc9cc069c775512cf0607ca855e9e5512509c36b0e2bb0e955478acae13ff0c35df7442f18a8458fab0ed664d62854c0b25 + HEAD_REF master + PATCHES + fix_wpath_unsigned.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/mecab/src) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in DESTINATION ${SOURCE_PATH}/mecab/src) +file(COPY ${SOURCE_PATH}/mecab/COPYING DESTINATION ${SOURCE_PATH}/mecab/src) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/mecab/src +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() +vcpkg_copy_pdbs() + +file(COPY ${SOURCE_PATH}/mecab/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mecab) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/mecab/COPYING ${CURRENT_PACKAGES_DIR}/share/mecab/copyright) diff --git a/vcpkg/ports/memorymodule/CONTROL b/vcpkg/ports/memorymodule/CONTROL new file mode 100644 index 0000000..ffc05ce --- /dev/null +++ b/vcpkg/ports/memorymodule/CONTROL @@ -0,0 +1,8 @@ +Source: memorymodule +Version: 2019-12-31 +Description: Library to load a DLL from memory +Homepage: https://github.com/fancycode/MemoryModule +Default-Features: unicode + +Feature: unicode +Description: Compile with UNICODE support diff --git a/vcpkg/ports/memorymodule/portfile.cmake b/vcpkg/ports/memorymodule/portfile.cmake new file mode 100644 index 0000000..7c77271 --- /dev/null +++ b/vcpkg/ports/memorymodule/portfile.cmake @@ -0,0 +1,45 @@ +vcpkg_fail_port_install(ON_TARGET "Linux" "OSX" "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fancycode/MemoryModule + REF 5f83e41c3a3e7c6e8284a5c1afa5a38790809461 + SHA512 6d42bd80dfeaf7bc662adafe7d6a7d7301eff5ea53bb59fce7e9c1a6ee22d31d2ab5696afc0a92c1501aa4161a60366418bfc3bed7ed2dcb6cae24243f4fa6d4 + HEAD_REF master +) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + unicode UNICODE +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DTESTSUITE=OFF + ${FEATURE_OPTIONS} +) + +vcpkg_build_cmake(TARGET MemoryModule) + +file(INSTALL ${SOURCE_PATH}/MemoryModule.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/MemoryModule.lib) + file(INSTALL + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/MemoryModule.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) +endif() + +if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/MemoryModule.lib) + file(INSTALL + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/MemoryModule.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/meschach/CMakeLists.txt b/vcpkg/ports/meschach/CMakeLists.txt new file mode 100644 index 0000000..e60d290 --- /dev/null +++ b/vcpkg/ports/meschach/CMakeLists.txt @@ -0,0 +1,85 @@ +cmake_minimum_required(VERSION 3.8.0) +project(meschach) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +set(meschach_srcs + bdfactor.c + bkpfacto.c + chfactor.c + copy.c + err.c + extras.c + fft.c + givens.c + hessen.c + hsehldr.c + init.c + iter0.c + iternsym.c + itersym.c + ivecop.c + lufactor.c + machine.c + matlab.c + matop.c + matrixio.c + meminfo.c + memory.c + memstat.c + mfunc.c + norm.c + otherio.c + pxop.c + qrfactor.c + schur.c + solve.c + sparse.c + sparseio.c + spbkp.c + spchfctr.c + splufctr.c + sprow.c + spswap.c + submat.c + svd.c + symmeig.c + update.c + vecop.c + version.c + zcopy.c + zfunc.c + zgivens.c + zhessen.c + zhsehldr.c + zlufctr.c + zmachine.c + zmatio.c + zmatlab.c + zmatop.c + zmemory.c + znorm.c + zqrfctr.c + zschur.c + zsolve.c + ztorture.c + zvecop.c +) +file(GLOB meschach_headers "*.h") + +include_directories(".") + +add_library(meschach ${meschach_srcs}) +target_compile_definitions(meschach PRIVATE -DHAVE_MEMORY_H -DHAVE_COMPLEX_H) + +install( + TARGETS meschach + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES ${meschach_headers} DESTINATION include/meschach) +endif() diff --git a/vcpkg/ports/meschach/CONTROL b/vcpkg/ports/meschach/CONTROL new file mode 100644 index 0000000..2a9d869 --- /dev/null +++ b/vcpkg/ports/meschach/CONTROL @@ -0,0 +1,4 @@ +Source: meschach +Version: 1.2b-3 +Homepage: https://homepage.math.uiowa.edu/~dstewart/meschach +Description: Matrix computations in C diff --git a/vcpkg/ports/meschach/portfile.cmake b/vcpkg/ports/meschach/portfile.cmake new file mode 100644 index 0000000..6c4a6f6 --- /dev/null +++ b/vcpkg/ports/meschach/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "http://homepage.math.uiowa.edu/~dstewart/meschach/mesch12b.tar.gz" + FILENAME "mesch12b.tar.gz" + SHA512 9051e1502b8c9741400c61fd6038e514887f305f267ba4e97d747423de3da1270f835f65b2d1f538f8938677060bc0fcfd7a94022d74fbfd31a0450116e9d79e +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL +) + +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() +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/meschach) diff --git a/vcpkg/ports/meshoptimizer/CONTROL b/vcpkg/ports/meshoptimizer/CONTROL new file mode 100644 index 0000000..320908e --- /dev/null +++ b/vcpkg/ports/meshoptimizer/CONTROL @@ -0,0 +1,5 @@ +Source: meshoptimizer +Version: 0.14 +Port-Version: 1 +Homepage: https://github.com/zeux/meshoptimizer +Description: Mesh optimization library that makes meshes smaller and faster to render diff --git a/vcpkg/ports/meshoptimizer/portfile.cmake b/vcpkg/ports/meshoptimizer/portfile.cmake new file mode 100644 index 0000000..e46b174 --- /dev/null +++ b/vcpkg/ports/meshoptimizer/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zeux/meshoptimizer + REF v0.14 + SHA512 303b3bf1bed7cba8f89bce1c2782e3718fc8f4ec01f7ffd64f5ca23406130097f07d234b142916b16fe586db97c7deaa0ae9135b4e558543cc1664e7db85de67 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED_LIBS) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DMESHOPT_BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/meshoptimizer) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.md + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/metis/CONTROL b/vcpkg/ports/metis/CONTROL new file mode 100644 index 0000000..c47b9d8 --- /dev/null +++ b/vcpkg/ports/metis/CONTROL @@ -0,0 +1,4 @@ +Source: metis +Version: 5.1.0-6 +Homepage: https://glaros.dtc.umn.edu/gkhome/metis/metis/overview +Description: Serial Graph Partitioning and Fill-reducing Matrix Ordering diff --git a/vcpkg/ports/metis/disable-programs.patch b/vcpkg/ports/metis/disable-programs.patch new file mode 100644 index 0000000..0c23be5 --- /dev/null +++ b/vcpkg/ports/metis/disable-programs.patch @@ -0,0 +1,8 @@ +--- a/CMakeLists.txt Wed Dec 21 18:24:22 2016 ++++ b/CMakeLists.txt Wed Dec 21 18:24:26 2016 +@@ -20,4 +20,4 @@ + # Recursively look for CMakeLists.txt in subdirs. + add_subdirectory("include") + add_subdirectory("libmetis") +-add_subdirectory("programs") ++# add_subdirectory("programs") diff --git a/vcpkg/ports/metis/enable-install.patch b/vcpkg/ports/metis/enable-install.patch new file mode 100644 index 0000000..9f36623 --- /dev/null +++ b/vcpkg/ports/metis/enable-install.patch @@ -0,0 +1,15 @@ +--- a/CMakeLists.txt Sat Mar 30 17:24:45 2013 ++++ b/CMakeLists.txt Wed Dec 21 18:23:43 2016 +@@ -4,11 +4,7 @@ + set(GKLIB_PATH "GKlib" CACHE PATH "path to GKlib") + set(SHARED FALSE CACHE BOOL "build a shared library") + +-if(MSVC) +- set(METIS_INSTALL FALSE) +-else() +- set(METIS_INSTALL TRUE) +-endif() ++set(METIS_INSTALL TRUE) + + # Configure libmetis library. + if(SHARED) diff --git a/vcpkg/ports/metis/fix-gklib-vs14-math.patch b/vcpkg/ports/metis/fix-gklib-vs14-math.patch new file mode 100644 index 0000000..e83a682 --- /dev/null +++ b/vcpkg/ports/metis/fix-gklib-vs14-math.patch @@ -0,0 +1,11 @@ +--- a/GKlib/gk_arch.h Wed Dec 21 18:34:18 2016 ++++ b/GKlib/gk_arch.h Wed Dec 21 18:30:49 2016 +@@ -58,7 +58,7 @@ + #define PTRDIFF_MAX INT64_MAX + #endif + +-#ifdef __MSC__ ++#if defined(__MSC__) && (_MSC_VER < 1900) + /* MSC does not have rint() function */ + #define rint(x) ((int)((x)+0.5)) + diff --git a/vcpkg/ports/metis/fix-linux-build-error.patch b/vcpkg/ports/metis/fix-linux-build-error.patch new file mode 100644 index 0000000..b3563a8 --- /dev/null +++ b/vcpkg/ports/metis/fix-linux-build-error.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e94f050..b9613a7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,7 +1,8 @@ + cmake_minimum_required(VERSION 2.8) + project(METIS) + +-set(GKLIB_PATH "GKlib" CACHE PATH "path to GKlib") ++set(GKLIB_PATH "${CMAKE_SOURCE_DIR}/GKlib" CACHE PATH "path to GKlib") ++ + set(SHARED FALSE CACHE BOOL "build a shared library") + + set(METIS_INSTALL TRUE) diff --git a/vcpkg/ports/metis/fix-metis-vs14-math.patch b/vcpkg/ports/metis/fix-metis-vs14-math.patch new file mode 100644 index 0000000..a296213 --- /dev/null +++ b/vcpkg/ports/metis/fix-metis-vs14-math.patch @@ -0,0 +1,11 @@ +--- a/libmetis/metislib.h Sat Mar 30 17:24:45 2013 ++++ b/libmetis/metislib.h Wed Dec 21 18:30:59 2016 +@@ -31,7 +31,7 @@ + #include + + +-#if defined(COMPILER_MSC) ++#if defined(COMPILER_MSC) && (_MSC_VER < 1900) + #if defined(rint) + #undef rint + #endif diff --git a/vcpkg/ports/metis/fix-runtime-install-destination.patch b/vcpkg/ports/metis/fix-runtime-install-destination.patch new file mode 100644 index 0000000..8d9147e --- /dev/null +++ b/vcpkg/ports/metis/fix-runtime-install-destination.patch @@ -0,0 +1,10 @@ +--- a/libmetis/CMakeLists.txt Sat Mar 30 17:24:45 2013 ++++ b/libmetis/CMakeLists.txt Wed Dec 21 17:41:37 2016 +@@ -11,6 +11,6 @@ + if(METIS_INSTALL) + install(TARGETS metis + LIBRARY DESTINATION lib +- RUNTIME DESTINATION lib ++ RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib) + endif() diff --git a/vcpkg/ports/metis/install-metisConfig.patch b/vcpkg/ports/metis/install-metisConfig.patch new file mode 100644 index 0000000..c07600a --- /dev/null +++ b/vcpkg/ports/metis/install-metisConfig.patch @@ -0,0 +1,44 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b9613a7..e43ffee 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -22,3 +22,23 @@ include_directories(include) + add_subdirectory("include") + add_subdirectory("libmetis") + # add_subdirectory("programs") ++ ++if(METIS_INSTALL) ++ set(PRJ_NAME metis) ++ set(PRJ_VER 5.1.0) ++ install(EXPORT metisTargets ++ FILE ${PRJ_NAME}Targets.cmake ++ DESTINATION lib/cmake/${PRJ_NAME}) ++ include(CMakePackageConfigHelpers) ++ write_basic_package_version_file( ++ ${CMAKE_CURRENT_BINARY_DIR}/${PRJ_NAME}ConfigVersion.cmake ++ VERSION ${PRJ_VER} ++ COMPATIBILITY SameMajorVersion) ++ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${PRJ_NAME}Config.cmake ++ "include(\${CMAKE_CURRENT_LIST_DIR}/${PRJ_NAME}Targets.cmake)") ++ install(FILES ++ ${CMAKE_CURRENT_BINARY_DIR}/${PRJ_NAME}ConfigVersion.cmake ++ ${CMAKE_CURRENT_BINARY_DIR}/${PRJ_NAME}Config.cmake ++ DESTINATION lib/cmake/${PRJ_NAME}) ++endif() ++ +diff --git a/libmetis/CMakeLists.txt b/libmetis/CMakeLists.txt +index 7a5fc74..5a68cf0 100644 +--- a/libmetis/CMakeLists.txt ++++ b/libmetis/CMakeLists.txt +@@ -9,8 +9,9 @@ if(UNIX) + endif() + + if(METIS_INSTALL) +- install(TARGETS metis ++ install(TARGETS metis EXPORT metisTargets + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +- ARCHIVE DESTINATION lib) ++ ARCHIVE DESTINATION lib ++ INCLUDES DESTINATION include) + endif() diff --git a/vcpkg/ports/metis/portfile.cmake b/vcpkg/ports/metis/portfile.cmake new file mode 100644 index 0000000..1ba641b --- /dev/null +++ b/vcpkg/ports/metis/portfile.cmake @@ -0,0 +1,42 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +set(OPTIONS -DSHARED=OFF) + +set(METIS_VERSION 5.1.0) + +vcpkg_download_distfile(ARCHIVE + URLS "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-${METIS_VERSION}.tar.gz" + FILENAME "metis-${METIS_VERSION}.tar.gz" + SHA512 deea47749d13bd06fbeaf98a53c6c0b61603ddc17a43dae81d72c8015576f6495fd83c11b0ef68d024879ed5415c14ebdbd87ce49c181bdac680573bea8bdb25 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${METIS_VERSION} + PATCHES + enable-install.patch + disable-programs.patch + fix-runtime-install-destination.patch + fix-metis-vs14-math.patch + fix-gklib-vs14-math.patch + fix-linux-build-error.patch + install-metisConfig.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/metis) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/metis) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/metis/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/metis/copyright) diff --git a/vcpkg/ports/metrohash/CMakeLists.txt b/vcpkg/ports/metrohash/CMakeLists.txt new file mode 100644 index 0000000..41e1a74 --- /dev/null +++ b/vcpkg/ports/metrohash/CMakeLists.txt @@ -0,0 +1,43 @@ +cmake_minimum_required(VERSION 3.14) +project(metrohash LANGUAGES CXX) +set(CMAKE_CXX_STANDARD 17) + +add_library(metrohash + src/metrohash64.cpp + src/metrohash128.cpp + src/metrohash128crc.cpp + ) +target_compile_options(metrohash PRIVATE -march=native) +set(metro_headers src/metrohash.h src/metrohash64.h src/metrohash128.h src/metrohash128crc.h) +set_target_properties(metrohash PROPERTIES + PUBLIC_HEADER "${metro_headers}" + ) + +include(CMakePackageConfigHelpers) + +set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated") +set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake") +set(config_install_dir "lib/cmake/${PROJECT_NAME}") +set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets") +set(namespace "${PROJECT_NAME}::") + +configure_package_config_file( + "${CMAKE_SOURCE_DIR}/cmake/Config.cmake.in" + "${project_config}" + INSTALL_DESTINATION "${config_install_dir}" +) +#Installation +install(TARGETS metrohash + EXPORT "${TARGETS_EXPORT_NAME}" + LIBRARY DESTINATION "lib" + ARCHIVE DESTINATION "lib" + PUBLIC_HEADER DESTINATION "include") + +install( + FILES "${project_config}" + DESTINATION "${config_install_dir}" +) +install(EXPORT "${TARGETS_EXPORT_NAME}" + NAMESPACE "${namespace}" + DESTINATION "${config_install_dir}" + ) diff --git a/vcpkg/ports/metrohash/CONTROL b/vcpkg/ports/metrohash/CONTROL new file mode 100644 index 0000000..85a795a --- /dev/null +++ b/vcpkg/ports/metrohash/CONTROL @@ -0,0 +1,5 @@ +Source: metrohash +Version: 1.1.3-1 +Homepage: https://github.com/jandrewrogers/MetroHash +Description: MetroHash is a set of state-of-the-art hash functions for non-cryptographic use cases. +Supports: !(uwp|arm|x86) diff --git a/vcpkg/ports/metrohash/Config.cmake.in b/vcpkg/ports/metrohash/Config.cmake.in new file mode 100644 index 0000000..38bbde7 --- /dev/null +++ b/vcpkg/ports/metrohash/Config.cmake.in @@ -0,0 +1,4 @@ +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake") +check_required_components("@PROJECT_NAME@") diff --git a/vcpkg/ports/metrohash/portfile.cmake b/vcpkg/ports/metrohash/portfile.cmake new file mode 100644 index 0000000..1c272c8 --- /dev/null +++ b/vcpkg/ports/metrohash/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_fail_port_install(ON_TARGET "UWP" ON_TARGET "x86" "arm" "aarch64") +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jandrewrogers/MetroHash + REF 690a521d9beb2e1050cc8f273fdabc13b31bf8f6 + SHA512 51ba58a43f7a60be823746082c1bdebf52a1fd452a0f778434850ccc71dd6f62750fc966ec6aed6b4b523279ad400733df3f56544e2d2e057c212044a2dc16a4 + HEAD_REF master +) + +configure_file(${CURRENT_PORT_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY) +configure_file(${CURRENT_PORT_DIR}/Config.cmake.in ${SOURCE_PATH}/cmake/Config.cmake.in COPYONLY) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/mgnlibs/CONTROL b/vcpkg/ports/mgnlibs/CONTROL new file mode 100644 index 0000000..0be2570 --- /dev/null +++ b/vcpkg/ports/mgnlibs/CONTROL @@ -0,0 +1,4 @@ +Source: mgnlibs +Version: 2019-09-29 +Homepage: https://github.com/mattiasgustavsson/libs +Description: Single-file public domain libraries for C/C++ diff --git a/vcpkg/ports/mgnlibs/portfile.cmake b/vcpkg/ports/mgnlibs/portfile.cmake new file mode 100644 index 0000000..e49a122 --- /dev/null +++ b/vcpkg/ports/mgnlibs/portfile.cmake @@ -0,0 +1,17 @@ +#header-only library +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mattiasgustavsson/libs + REF 9a6e7205caecbe336e41aebdc9c79a5c47daa5ec + SHA512 87493f883f0752a334bbcec69228e325d9e1f36a99d313be9243f4e6e14876bcd5a976682d3fd7e3e285e426ac69587d35ba3378b2124450b9a8ed6127f110a5 + HEAD_REF master +) + +# Put the licence file where vcpkg expects it +file(COPY ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/mgnlibs/README.md) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/mgnlibs/README.md ${CURRENT_PACKAGES_DIR}/share/mgnlibs/copyright) + +# Copy the header files +file(GLOB HEADER_FILES ${SOURCE_PATH}/*.h) +file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/mgnlibs) diff --git a/vcpkg/ports/mhook/CONTROL b/vcpkg/ports/mhook/CONTROL new file mode 100644 index 0000000..24fae14 --- /dev/null +++ b/vcpkg/ports/mhook/CONTROL @@ -0,0 +1,3 @@ +Source: mhook +Version: 2.5.1-1 +Description: A Windows API hooking library. diff --git a/vcpkg/ports/mhook/fix-windows-packing-mismatch.patch b/vcpkg/ports/mhook/fix-windows-packing-mismatch.patch new file mode 100644 index 0000000..847cd4b --- /dev/null +++ b/vcpkg/ports/mhook/fix-windows-packing-mismatch.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6e1df9f..e1e6ced 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4,7 +4,7 @@ project(mhook) + set_property(GLOBAL PROPERTY USE_FOLDERS ON) + set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMake") + +-add_definitions(-DNO_SANITY_CHECKS -DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN) ++add_definitions(-DNO_SANITY_CHECKS -DUNICODE -D_UNICODE -DWIN32_LEAN_AND_MEAN -DWINDOWS_IGNORE_PACKING_MISMATCH) + + file(GLOB DisasmSrc disasm-lib/*.c disasm-lib/*.h) + file(GLOB MhookSrc mhook-lib/*.cpp mhook-lib/*.h) diff --git a/vcpkg/ports/mhook/portfile.cmake b/vcpkg/ports/mhook/portfile.cmake new file mode 100644 index 0000000..db42cc2 --- /dev/null +++ b/vcpkg/ports/mhook/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO apriorit/mhook + REF 2.5.1 + SHA512 914f198417b1e30301a42463af5cfbf9269dc64bcf1be87d3d6d2943fd72b3536f48eb4bfb25a51dd0bbe0f8f099777b2d49c9d58cb2e2eeb517d998917ae976 + HEAD_REF master + PATCHES fix-windows-packing-mismatch.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mhook RENAME copyright) + +vcpkg_copy_pdbs() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/vcpkg/ports/microsoft-signalr/CONTROL b/vcpkg/ports/microsoft-signalr/CONTROL new file mode 100644 index 0000000..0cec60b --- /dev/null +++ b/vcpkg/ports/microsoft-signalr/CONTROL @@ -0,0 +1,13 @@ +Source: microsoft-signalr +Version: 0.1.0-alpha1-1 +Description: C++ Client for ASP.NET Core SignalR. +Default-Features: default-features +Homepage: https://github.com/aspnet/SignalR-Client-Cpp + +Feature: default-features +Build-Depends: microsoft-signalr[cpprestsdk] (!uwp) +Description: Features installed by default + +Feature: cpprestsdk +Description: Add default Http and WebSocket implementations using CppRestSDK +Build-Depends: cpprestsdk[default-features,websockets] \ No newline at end of file diff --git a/vcpkg/ports/microsoft-signalr/portfile.cmake b/vcpkg/ports/microsoft-signalr/portfile.cmake new file mode 100644 index 0000000..e566f59 --- /dev/null +++ b/vcpkg/ports/microsoft-signalr/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO aspnet/SignalR-Client-Cpp + REF v0.1.0-alpha1 + SHA512 d37eea194b0352a08dd89ac7622bdd6224312ad48a31d8ab36627a8aaff5e795e3513ad010eed516703f6da842a95119c1a4a290b145a43e91ff80a37fff8676 + HEAD_REF master +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + cpprestsdk USE_CPPRESTSDK +) + +if("cpprestsdk" IN_LIST FEATURES AND VCPKG_TARGET_IS_UWP) + message(FATAL_ERROR "microsoft-signalr[cpprestsdk] is not supported on UWP, use microsoft-signalr[core] instead") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF + ${FEATURE_OPTIONS} + -DWALL=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(COPY ${SOURCE_PATH}/third-party-notices.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/microsoft-signalr) + +vcpkg_copy_pdbs() \ No newline at end of file diff --git a/vcpkg/ports/mikktspace/CMakeLists.txt b/vcpkg/ports/mikktspace/CMakeLists.txt new file mode 100644 index 0000000..34c2ef2 --- /dev/null +++ b/vcpkg/ports/mikktspace/CMakeLists.txt @@ -0,0 +1,41 @@ +cmake_minimum_required(VERSION 3.8) +project(mikktspace C) + +set(CMAKE_DEBUG_POSTFIX d) + +add_library(${PROJECT_NAME} "") +add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) +target_include_directories( + ${PROJECT_NAME} + PUBLIC + $ + $ +) + +target_sources( + ${PROJECT_NAME} + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/mikktspace.c +) + +install( + TARGETS ${PROJECT_NAME} + EXPORT ${PROJECT_NAME}_target + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) + +if(NOT MIKKTSPACE_SKIP_HEADERS) + install(FILES + ${CMAKE_CURRENT_SOURCE_DIR}/mikktspace.h + DESTINATION include + ) +endif() + +install( + EXPORT ${PROJECT_NAME}_target + NAMESPACE ${PROJECT_NAME}:: + FILE ${PROJECT_NAME}-config.cmake + DESTINATION share/${PROJECT_NAME} +) diff --git a/vcpkg/ports/mikktspace/CONTROL b/vcpkg/ports/mikktspace/CONTROL new file mode 100644 index 0000000..2cbf006 --- /dev/null +++ b/vcpkg/ports/mikktspace/CONTROL @@ -0,0 +1,4 @@ +Source: mikktspace +Version: 2020-10-06 +Homepage: https://github.com/mmikk/MikkTSpace +Description: A common standard for tangent space used in baking tools to produce normal maps diff --git a/vcpkg/ports/mikktspace/portfile.cmake b/vcpkg/ports/mikktspace/portfile.cmake new file mode 100644 index 0000000..2849389 --- /dev/null +++ b/vcpkg/ports/mikktspace/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mmikk/MikkTSpace + REF 3e895b49d05ea07e4c2133156cfa94369e19e409 + SHA512 3ca433bd4efd0e048138f9efc5ba9021e4f3f78a535ea48733088ba5f43e60aad7f840f00e0597a0c053cda4776177bf6deb14cecf4d172b9b68acf00d5a1ca7 + 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 + -DMIKKTSPACE_SKIP_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(INSTALL ${SOURCE_PATH}/mikktspace.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/milerius-sfml-imgui/CONTROL b/vcpkg/ports/milerius-sfml-imgui/CONTROL new file mode 100644 index 0000000..0414fc1 --- /dev/null +++ b/vcpkg/ports/milerius-sfml-imgui/CONTROL @@ -0,0 +1,4 @@ +Source: milerius-sfml-imgui +Version: 1.1-2 +Description: imgui dll for sfml usage +Build-Depends: sfml, imgui diff --git a/vcpkg/ports/milerius-sfml-imgui/FixFindPackageIssue.patch b/vcpkg/ports/milerius-sfml-imgui/FixFindPackageIssue.patch new file mode 100644 index 0000000..a3d8053 --- /dev/null +++ b/vcpkg/ports/milerius-sfml-imgui/FixFindPackageIssue.patch @@ -0,0 +1,53 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 27b8bd8..33fe623 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2,7 +2,7 @@ if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) + message(FATAL_ERROR "Prevented in-tree built. Please create a build directory outside of the source code and call cmake from there") + endif () + +-project(sfml-imgui) ++project(milerius-sfml-imgui) + cmake_minimum_required(VERSION 3.9) + set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +@@ -26,7 +26,7 @@ include(CMakePackageConfigHelpers) + + install(TARGETS + ${PROJECT_NAME} +- EXPORT sfml-imgui-targets ++ EXPORT milerius-sfml-imgui-targets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +@@ -39,7 +39,7 @@ install(EXPORT ${PROJECT_NAME}-targets + ) + + configure_package_config_file( +- "${PROJECT_SOURCE_DIR}/cmake/${PROJECT_NAME}-config.cmake.in" ++ "${PROJECT_SOURCE_DIR}/cmake/sfml-imgui-config.cmake.in" + "${PROJECT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" + INSTALL_DESTINATION lib/cmake/${PROJECT_NAME} + ) +@@ -51,6 +51,6 @@ install(FILES + install(DIRECTORY + ${CMAKE_CURRENT_SOURCE_DIR}/sfml-imgui + DESTINATION +- ${CMAKE_INSTALL_INCLUDEDIR}/sfml-imgui ++ ${CMAKE_INSTALL_INCLUDEDIR}/ + FILES_MATCHING PATTERN "*.h*" + ) +diff --git a/cmake/sfml-imgui-config.cmake.in b/cmake/sfml-imgui-config.cmake.in +index cd790be..e1bdd77 100644 +--- a/cmake/sfml-imgui-config.cmake.in ++++ b/cmake/sfml-imgui-config.cmake.in +@@ -2,5 +2,5 @@ + find_package(SFML CONFIG REQUIRED graphics) + find_package(imgui CONFIG REQUIRED) + find_package(OpenGL REQUIRED) +-include("${CMAKE_CURRENT_LIST_DIR}/sfml-imgui-targets.cmake") +-check_required_components("sfml-imgui") +\ No newline at end of file ++include("${CMAKE_CURRENT_LIST_DIR}/milerius-sfml-imgui-targets.cmake") ++check_required_components("milerius-sfml-imgui") +\ No newline at end of file diff --git a/vcpkg/ports/milerius-sfml-imgui/portfile.cmake b/vcpkg/ports/milerius-sfml-imgui/portfile.cmake new file mode 100644 index 0000000..b154a59 --- /dev/null +++ b/vcpkg/ports/milerius-sfml-imgui/portfile.cmake @@ -0,0 +1,25 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Milerius/imgui-sfml-shared + REF 1.1 + SHA512 191184f7b302f643bd7c241b69d9f9edc0d03c6f5a0b3a49f57ac84f3828202f8065291fb17993073a2c07f1237ba491de677c47e2f8160dc70ea77f20eb1946 + HEAD_REF master + PATCHES FixFindPackageIssue.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/milerius-sfml-imgui) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/milerius-sfml-imgui) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/milerius-sfml-imgui/LICENSE ${CURRENT_PACKAGES_DIR}/share/milerius-sfml-imgui/copyright) \ No newline at end of file diff --git a/vcpkg/ports/mimalloc/CONTROL b/vcpkg/ports/mimalloc/CONTROL new file mode 100644 index 0000000..90cb64d --- /dev/null +++ b/vcpkg/ports/mimalloc/CONTROL @@ -0,0 +1,14 @@ +Source: mimalloc +Version: 1.6.4 +Description: Compact general purpose allocator with excellent performance +Homepage: https://github.com/microsoft/mimalloc +Supports: !(arm|uwp) + +Feature: asm +Description: Generate assembly files + +Feature: override +Description: Override the standard malloc interface + +Feature: secure +Description: Use security mitigations (like guard pages and randomization) diff --git a/vcpkg/ports/mimalloc/fix-cmake.patch b/vcpkg/ports/mimalloc/fix-cmake.patch new file mode 100644 index 0000000..42d74f8 --- /dev/null +++ b/vcpkg/ports/mimalloc/fix-cmake.patch @@ -0,0 +1,59 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 37616eb..4c81e6a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -251,14 +251,28 @@ if(MI_BUILD_SHARED) + ) + if(WIN32) + # On windows copy the mimalloc redirection dll too. ++ if(CMAKE_SIZEOF_VOID_P EQUAL 8) + target_link_libraries(mimalloc PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/bin/mimalloc-redirect.lib) + add_custom_command(TARGET mimalloc POST_BUILD + COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/bin/mimalloc-redirect.dll" $ + COMMENT "Copy mimalloc-redirect.dll to output directory") +- endif() ++ install ( ++ FILES $/mimalloc-redirect.dll ++ DESTINATION ${CMAKE_INSTALL_BINDIR} ++ ) ++ elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) ++ target_link_libraries(mimalloc PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/bin/mimalloc-redirect32.lib) ++ add_custom_command(TARGET mimalloc POST_BUILD ++ COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/bin/mimalloc-redirect32.dll" $ ++ COMMENT "Copy mimalloc-redirect32.dll to output directory") ++ install ( ++ FILES $/mimalloc-redirect32.dll ++ DESTINATION ${CMAKE_INSTALL_BINDIR} ++ ) ++ endif() ++endif() + +- install(TARGETS mimalloc EXPORT mimalloc DESTINATION ${mi_install_dir} LIBRARY) +- install(EXPORT mimalloc DESTINATION ${mi_install_dir}/cmake) ++ install(TARGETS mimalloc EXPORT mimalloc ARCHIVE DESTINATION lib RUNTIME DESTINATION bin LIBRARY DESTINATION lib NAMELINK_SKIP) + endif() + + # static library +@@ -281,9 +295,11 @@ if (MI_BUILD_STATIC) + set_target_properties(mimalloc-static PROPERTIES OUTPUT_NAME ${mi_basename}) + endif() + +- install(TARGETS mimalloc-static EXPORT mimalloc DESTINATION ${mi_install_dir}) ++ install(TARGETS mimalloc-static EXPORT mimalloc DESTINATION lib) + endif() + ++install(EXPORT mimalloc DESTINATION ${mi_install_dir}/cmake) ++ + # install include files + install(FILES include/mimalloc.h DESTINATION ${mi_install_dir}/include) + install(FILES include/mimalloc-override.h DESTINATION ${mi_install_dir}/include) +@@ -315,9 +331,6 @@ if (MI_BUILD_OBJECT) + + # the FILES expression can also be: $ + # but that fails cmake versions less than 3.10 so we leave it as is for now +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/mimalloc-obj.dir/src/static.c${CMAKE_C_OUTPUT_EXTENSION} +- DESTINATION ${mi_install_dir} +- RENAME ${mi_basename}${CMAKE_C_OUTPUT_EXTENSION} ) + endif() + + # ----------------------------------------------------------------------------- diff --git a/vcpkg/ports/mimalloc/portfile.cmake b/vcpkg/ports/mimalloc/portfile.cmake new file mode 100644 index 0000000..154fa3c --- /dev/null +++ b/vcpkg/ports/mimalloc/portfile.cmake @@ -0,0 +1,71 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO microsoft/mimalloc + REF a9686d6ecf00e4467e772f7c0b4ef76a15f325f6 # v1.6.4 + SHA512 a1bda1b31d1bb3a4680fec91f180a988cf5ff486dcb8848fefd9245907f7986e4c4f10ce33133a3d796a7409ba38328bd156c47eba4f19368a2226a43b1ad298 + HEAD_REF master + PATCHES + fix-cmake.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + asm MI_SEE_ASM + secure MI_SECURE + override MI_OVERRIDE +) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" MI_BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" MI_BUILD_SHARED) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DMI_CHECK_FULL=ON + OPTIONS_RELEASE + -DMI_CHECK_FULL=OFF + OPTIONS + -DMI_INTERPOSE=ON + -DMI_USE_CXX=OFF + -DMI_BUILD_TESTS=OFF + ${FEATURE_OPTIONS} + -DMI_BUILD_STATIC=${MI_BUILD_STATIC} + -DMI_BUILD_SHARED=${MI_BUILD_SHARED} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(GLOB lib_directories RELATIVE ${CURRENT_PACKAGES_DIR}/lib "${CURRENT_PACKAGES_DIR}/lib/${PORT}-*") +list(GET lib_directories 0 lib_install_dir) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/${lib_install_dir}/cmake) + +vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/share/${PORT}/mimalloc.cmake + "lib/${lib_install_dir}/" + "" +) + +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} +) + +file(COPY ${CURRENT_PACKAGES_DIR}/lib/${lib_install_dir}/include DESTINATION ${CURRENT_PACKAGES_DIR}) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/lib/${lib_install_dir} + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/lib/${lib_install_dir} +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/include/mimalloc.h + "!defined(MI_SHARED_LIB)" + "0 // !defined(MI_SHARED_LIB)" + ) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/mimalloc/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/mimalloc/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..4e2a70c --- /dev/null +++ b/vcpkg/ports/mimalloc/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,9 @@ +_find_package(${ARGS}) + +if(TARGET mimalloc AND NOT TARGET mimalloc-static) + add_library(mimalloc-static INTERFACE IMPORTED) + set_target_properties(mimalloc-static PROPERTIES INTERFACE_LINK_LIBRARIES mimalloc) +elseif(TARGET mimalloc-static AND NOT TARGET mimalloc) + add_library(mimalloc INTERFACE IMPORTED) + set_target_properties(mimalloc PROPERTIES INTERFACE_LINK_LIBRARIES mimalloc-static) +endif() diff --git a/vcpkg/ports/minc/CONTROL b/vcpkg/ports/minc/CONTROL new file mode 100644 index 0000000..6cd1d54 --- /dev/null +++ b/vcpkg/ports/minc/CONTROL @@ -0,0 +1,9 @@ +Source: minc +Version: 2.4.03 +Description: MINC - Medical Image NetCDF or MINC isn't netCDF +Homepage: https://github.com/BIC-MNI/libminc +Build-Depends: nifticlib, hdf5[core], zlib + +Feature: minc1 +Description: Support minc1 file format, requires NETCDF +Build-Depends: netcdf[core] \ No newline at end of file diff --git a/vcpkg/ports/minc/build.patch b/vcpkg/ports/minc/build.patch new file mode 100644 index 0000000..d0275c2 --- /dev/null +++ b/vcpkg/ports/minc/build.patch @@ -0,0 +1,67 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 52cc81ace..d7a1f63f8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -403,9 +404,11 @@ ENDIF(LIBMINC_MINC1_SUPPORT) + # Keep this variable for compatibility + SET(VOLUME_IO_LIBRARY ${LIBMINC_EXTERNAL_LIB_PREFIX}minc2) + SET(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}) + + ADD_LIBRARY(${LIBMINC_LIBRARY} ${LIBRARY_TYPE} ${minc_LIB_SRCS} ${minc_HEADERS} ${volume_io_LIB_SRCS} ${volume_io_HEADERS} ) +- ++if(WIN32) ++ target_link_libraries(${LIBMINC_LIBRARY} ws2_32) ++endif() + IF(NIFTI_FOUND AND NOT LIBMINC_USE_SYSTEM_NIFTI) + ADD_DEPENDENCIES(${LIBMINC_LIBRARY} NIFTI) + ENDIF() +@@ -453,7 +456,7 @@ IF( LIBMINC_INSTALL_LIB_DIR ) + ${LIBMINC_EXPORTED_TARGETS} + LIBRARY DESTINATION ${LIBMINC_INSTALL_LIB_DIR} COMPONENT libraries + ARCHIVE DESTINATION ${LIBMINC_INSTALL_LIB_DIR} COMPONENT libraries +- RUNTIME DESTINATION ${LIBMINC_INSTALL_LIB_DIR} COMPONENT libraries ++ RUNTIME DESTINATION ${LIBMINC_INSTALL_BIN_DIR} COMPONENT libraries + ) + ENDIF( LIBMINC_INSTALL_LIB_DIR ) + +@@ -538,7 +541,7 @@ IF(LIBMINC_INSTALL_LIB_DIR AND NOT LIBMINC_INSTALL_NO_DEVELOPMENT) + ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/Use${LIBMINC_EXTERNAL_LIB_PREFIX}LIBMINC.cmake + ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${LIBMINC_EXTERNAL_LIB_PREFIX}LIBMINCConfig.cmake + DESTINATION +- ${LIBMINC_INSTALL_LIB_DIR} ++ ${LIBMINC_INSTALL_LIB_DIR}/cmake + COMPONENT Development) + + ENDIF(LIBMINC_INSTALL_LIB_DIR AND NOT LIBMINC_INSTALL_NO_DEVELOPMENT) +diff --git a/config.h.cmake b/config.h.cmake +index 9ceffa8fc..21c2f3baf 100644 +--- a/config.h.cmake ++++ b/config.h.cmake +@@ -1,4 +1,8 @@ + /* various defines */ ++#ifdef _MSC_VER ++#define strcasecmp _stricmp ++#define strncasecmp _strnicmp ++#endif + + #ifndef MINC2 + #define MINC2 @MINC2@ +diff --git a/libcommon/minc_config.c b/libcommon/minc_config.c +index 531ef108e..5472d9274 100644 +--- a/libcommon/minc_config.c ++++ b/libcommon/minc_config.c +@@ -20,14 +20,6 @@ + + #include "minc_config.h" + +-#ifdef _MSC_VER +-#define snprintf _snprintf +-#define vsnprintf _vsnprintf +-#define strcasecmp _stricmp +-#define strncasecmp _strnicmp +-#endif +- +- + static const char *_CONFIG_VAR[]= + { + "MINC_FORCE_V2", diff --git a/vcpkg/ports/minc/config.patch b/vcpkg/ports/minc/config.patch new file mode 100644 index 0000000..a726b9a --- /dev/null +++ b/vcpkg/ports/minc/config.patch @@ -0,0 +1,15 @@ +diff --git a/LIBMINCConfig.cmake.in b/LIBMINCConfig.cmake.in +index 7790597b2..c041b685a 100644 +--- a/LIBMINCConfig.cmake.in ++++ b/LIBMINCConfig.cmake.in +@@ -1,3 +1,4 @@ ++set(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_DIR}/../../") + # LIBMINC CMake configuration file + + get_filename_component(LIBMINC_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH ) +@@ -37,3 +38,4 @@ set( LIBMINC_FOUND 1 ) + # set( LIBMINC_TARGETS_IMPORTED 1 ) + # include( "${LIBMINC_CMAKE_DIR}/@LIBMINC_EXPORTED_TARGETS@.cmake" ) + #endif() ++unset(_IMPORT_PREFIX) +\ No newline at end of file diff --git a/vcpkg/ports/minc/portfile.cmake b/vcpkg/ports/minc/portfile.cmake new file mode 100644 index 0000000..4b9ff63 --- /dev/null +++ b/vcpkg/ports/minc/portfile.cmake @@ -0,0 +1,47 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO BIC-MNI/libminc + REF e75a936c12a305b596d743c26a5437196ebce2a4 + SHA512 744f879ac8f0594c310d1c1b7fe67543c5feeb3e5a0979035918dbb2bf1d0973fbd389e5357a75631e618cc614b648c21179f7467576bd68e3522e63f21451b0 + HEAD_REF master + PATCHES build.patch + config.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + "minc1" LIBMINC_MINC1_SUPPORT +) + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) # Symbols are not properly exported +endif() + +set(OPTIONS) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + list(APPEND OPTIONS "-DLIBMINC_BUILD_SHARED_LIBS=ON") +else() + list(APPEND OPTIONS "-DLIBMINC_BUILD_SHARED_LIBS=OFF") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + "-DBUILD_TESTING=OFF" + "-DLIBMINC_USE_SYSTEM_NIFTI=ON" + ${OPTIONS} + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share/libminc) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/minhook/CONTROL b/vcpkg/ports/minhook/CONTROL new file mode 100644 index 0000000..1c475bd --- /dev/null +++ b/vcpkg/ports/minhook/CONTROL @@ -0,0 +1,5 @@ +Source: minhook +Version: 1.3.3 +Port-Version: 1 +Description: The Minimalistic x86/x64 API Hooking Library for Windows. +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/minhook/fix-usage.patch b/vcpkg/ports/minhook/fix-usage.patch new file mode 100644 index 0000000..198b879 --- /dev/null +++ b/vcpkg/ports/minhook/fix-usage.patch @@ -0,0 +1,10 @@ +diff --git a/cmake/minhook-config.cmake.in b/cmake/minhook-config.cmake.in +index 14e6463..28fa17c 100644 +--- a/cmake/minhook-config.cmake.in ++++ b/cmake/minhook-config.cmake.in +@@ -36,4 +36,4 @@ set(MINHOOK_FOUND ON) + set_and_check(MINHOOK_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/include/") + set_and_check(MINHOOK_LIBRARY_DIRS "${PACKAGE_PREFIX_DIR}/lib") + +-include("${PACKAGE_PREFIX_DIR}/lib/minhook/minhook-targets.cmake") ++include("${CMAKE_CURRENT_LIST_DIR}/minhook-targets.cmake") diff --git a/vcpkg/ports/minhook/portfile.cmake b/vcpkg/ports/minhook/portfile.cmake new file mode 100644 index 0000000..bd022d5 --- /dev/null +++ b/vcpkg/ports/minhook/portfile.cmake @@ -0,0 +1,43 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") + set(BUILD_ARCH "Win32") + set(OUTPUT_DIR "Win32") +elseif (VCPKG_TARGET_ARCHITECTURE MATCHES "x64") + set(BUILD_ARCH "x64") + set(OUTPUT_DIR "Win64") +else() + message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() + +# Download files to enable CMake support for minhook - Adds CMakeLists.txt and minhook-config.cmake.in +vcpkg_download_distfile( + CMAKE_SUPPORT_PATCH + URLS https://github.com/TsudaKageyu/minhook/commit/3f2e34976c1685ee372a09f54c0c8c8f4240ef90.patch + FILENAME minhook-cmake-support.patch + SHA512 5f353b167e2c31e5e06258420c78fbae0095368cf687ff06a350d6b69b30476824785dde5dbcea3e30ff827e7cdb293727a73e6b1e6875f00aa891b2980c3877 +) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO TsudaKageyu/minhook + REF v1.3.3 + SHA512 9f10c92a926a06cde1e4092b664a3aab00477e8b9f20cee54e1d2b3747fad91043d199a2753f7e083497816bbefc5d75d9162d2098dd044420dbca555e80b060 + HEAD_REF master + PATCHES + "${CMAKE_SUPPORT_PATCH}" + fix-usage.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/minhook) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/minifb/CONTROL b/vcpkg/ports/minifb/CONTROL new file mode 100644 index 0000000..5a86f9b --- /dev/null +++ b/vcpkg/ports/minifb/CONTROL @@ -0,0 +1,5 @@ +Source: minifb +Version: 2019-08-20-1 +Homepage: https://github.com/emoon/minifb +Description: MiniFB (Mini FrameBuffer) is a small cross platform library that makes it easy to render (32-bit) pixels in a window. +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/minifb/fix-arm-build-error.patch b/vcpkg/ports/minifb/fix-arm-build-error.patch new file mode 100644 index 0000000..66579d4 --- /dev/null +++ b/vcpkg/ports/minifb/fix-arm-build-error.patch @@ -0,0 +1,40 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 06ba472..0f5874c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -54,6 +54,27 @@ add_library(minifb STATIC + ${SrcLib} + ) + ++if (WIN32) ++add_executable(noise ++ tests/noise.c ++) ++target_link_libraries(noise minifb Gdi32.lib) ++ ++add_executable(input_events ++ tests/input_events.c ++) ++target_link_libraries(input_events minifb Gdi32.lib) ++ ++add_executable(input_events_cpp ++ tests/input_events_cpp.cpp ++) ++target_link_libraries(input_events_cpp minifb Gdi32.lib) ++ ++add_executable(multiple_windows ++ tests/multiple_windows.c ++) ++target_link_libraries(multiple_windows minifb Gdi32.lib) ++else() + add_executable(noise + tests/noise.c + ) +@@ -73,6 +94,7 @@ add_executable(multiple_windows + tests/multiple_windows.c + ) + target_link_libraries(multiple_windows minifb) ++endif() + + if (MSVC) + elseif (MINGW) diff --git a/vcpkg/ports/minifb/fix-build-error.patch b/vcpkg/ports/minifb/fix-build-error.patch new file mode 100644 index 0000000..e1a4c07 --- /dev/null +++ b/vcpkg/ports/minifb/fix-build-error.patch @@ -0,0 +1,25 @@ +diff --git a/src/windows/WinMiniFB.c b/src/windows/WinMiniFB.c +index 84ed0cb..b33f252 100644 +--- a/src/windows/WinMiniFB.c ++++ b/src/windows/WinMiniFB.c +@@ -19,7 +19,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) + { + LRESULT res = 0; + +- SWindowData *window_data = (SWindowData *) GetWindowLongPtr(hWnd, GWL_USERDATA); ++ SWindowData *window_data = (SWindowData *) GetWindowLongPtr(hWnd, GWLP_USERDATA); + SWindowData_Win *window_data_win = 0x0; + if(window_data != 0x0) { + window_data_win = (SWindowData_Win *) window_data->specific; +diff --git a/tests/multiple_windows.c b/tests/multiple_windows.c +index 4b301c0..29276be 100644 +--- a/tests/multiple_windows.c ++++ b/tests/multiple_windows.c +@@ -1,6 +1,7 @@ + #include + #include + #include ++#define _USE_MATH_DEFINES + #include + + #define kUnused(var) (void) var; diff --git a/vcpkg/ports/minifb/fix-install-error.patch b/vcpkg/ports/minifb/fix-install-error.patch new file mode 100644 index 0000000..64f5af0 --- /dev/null +++ b/vcpkg/ports/minifb/fix-install-error.patch @@ -0,0 +1,54 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 06ba472..6dc7988 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -17,6 +17,12 @@ file(GLOB SrcMacOSX "src/macosx/*.c" + file(GLOB SrcWayland "src/wayland/*.c") + file(GLOB SrcX11 "src/x11/*.c") + ++file(GLOB HEADERS "include/*.h") ++file(GLOB HeaderWindows "src/windows/*.h") ++file(GLOB HeaderMacOSX "src/macosx/*.h") ++file(GLOB HeaderWayland "src/wayland/*.h") ++file(GLOB HeaderX11 "src/x11/*.h") ++ + if (NOT MSVC) + set (CMAKE_C_FLAGS "-g -Wall -Wextra -pedantic -Wno-switch -Wno-unused-function") + set (CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -std=c++11") +@@ -34,19 +40,24 @@ if (MSVC) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) + add_definitions(-D_WIN32_WINNT=0x0600) + list (APPEND SrcLib ${SrcWindows}) ++ list (APPEND HEADERS ${HeaderWindows}) + elseif (MINGW) + add_definitions(-D_WIN32_WINNT=0x0600) + list(APPEND SrcLib ${SrcWindows}) ++ list (APPEND HEADERS ${HeaderWindows}) + elseif (APPLE) + if(USE_METAL_API) + add_definitions(-DUSE_METAL_API) + endif() + list(APPEND SrcLib ${SrcMacOSX}) ++ list (APPEND HEADERS ${HeaderMacOSX}) + elseif (UNIX) + if(USE_WAYLAND_API) + list(APPEND SrcLib ${SrcWayland}) ++ list (APPEND HEADERS ${HeaderWayland}) + else() + list(APPEND SrcLib ${SrcX11}) ++ list (APPEND HEADERS ${HeaderX11}) + endif() + endif() + +@@ -112,3 +123,11 @@ elseif (UNIX) + target_link_libraries(multiple_windows -lX11) + endif() + endif() ++ ++install(TARGETS minifb ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ ) ++ ++install(FILES ${HEADERS} DESTINATION include) diff --git a/vcpkg/ports/minifb/portfile.cmake b/vcpkg/ports/minifb/portfile.cmake new file mode 100644 index 0000000..d4ea8c6 --- /dev/null +++ b/vcpkg/ports/minifb/portfile.cmake @@ -0,0 +1,32 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} currently doesn't supports UWP.") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO emoon/minifb + REF 25a440f8226f12b8014d24288ad0587724005afc + SHA512 e54d86e43193d22263003a9539b11cc61cfd4a1b7093c982165cdd6e6f150b431a44e7d4dc8512b62b9853a7605e29cee19f85b8d25a34b3b530f9aa41a2f4a9 + HEAD_REF master + PATCHES + fix-install-error.patch + fix-build-error.patch + fix-arm-build-error.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) \ No newline at end of file diff --git a/vcpkg/ports/minimp3/CONTROL b/vcpkg/ports/minimp3/CONTROL new file mode 100644 index 0000000..dda4558 --- /dev/null +++ b/vcpkg/ports/minimp3/CONTROL @@ -0,0 +1,4 @@ +Source: minimp3 +Version: 2019-07-24-1 +Homepage: https://github.com/lieff/minimp3 +Description: Minimalistic, single-header library for decoding MP3. minimp3 is designed to be small, fast (with SSE and NEON support), and accurate (ISO conformant). \ No newline at end of file diff --git a/vcpkg/ports/minimp3/portfile.cmake b/vcpkg/ports/minimp3/portfile.cmake new file mode 100644 index 0000000..8bc4e7e --- /dev/null +++ b/vcpkg/ports/minimp3/portfile.cmake @@ -0,0 +1,15 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lieff/minimp3 + REF 977514a6dfc4960d819a103f43b358e58ac6c28f #committed on Jul 24 + SHA512 9120cbd84a737e93d0c8d6d53a1b9b7af1fb4387b7b0756abbf9e0f41164a26a731e1e75ff6d02052c785357cdf8465ee92f04b6e9704f830086c3cf6808d2b8 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/minimp3.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +file(COPY ${SOURCE_PATH}/minimp3_ex.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/minisat-master-keying/CONTROL b/vcpkg/ports/minisat-master-keying/CONTROL new file mode 100644 index 0000000..109ba31 --- /dev/null +++ b/vcpkg/ports/minisat-master-keying/CONTROL @@ -0,0 +1,5 @@ +Source: minisat-master-keying +Version: 2.2-mod-2 +Description: A minimalistic high-performance SAT solver + This is a modernized, cross-platform, CMake-enabled fork of the original MiniSat. +Homepage: https://github.com/master-keying/minisat diff --git a/vcpkg/ports/minisat-master-keying/portfile.cmake b/vcpkg/ports/minisat-master-keying/portfile.cmake new file mode 100644 index 0000000..0578623 --- /dev/null +++ b/vcpkg/ports/minisat-master-keying/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO master-keying/minisat + REF 60f47c0b59a5116639a73ceb9b50eb818536af0b + SHA512 267b7dd44bd1390826228c45ce0e71976a78940d2086470a26b59a6c692ad5e0e911c255eda0c187c33f8138b34deab59aa53191a0e1a46df38c5b73680d74d6 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/MiniSat TARGET_PATH share/minisat) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/minisat-master-keying RENAME copyright) diff --git a/vcpkg/ports/minitrace/CMakeLists.txt b/vcpkg/ports/minitrace/CMakeLists.txt new file mode 100644 index 0000000..fcae784 --- /dev/null +++ b/vcpkg/ports/minitrace/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required(VERSION 3.8) +project(minitrace C) + +set(minitrace_HEADERS minitrace.h) +set(minitrace_SOURCES minitrace.c) + +add_library(minitrace ${minitrace_SOURCES}) + +# Install headers +install(FILES ${minitrace_HEADERS} DESTINATION include/minitrace) + +# Install minitrace +install( + TARGETS minitrace EXPORT minitraceConfig + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib +) + +# Export config file for minitrace +export( + TARGETS minitrace + NAMESPACE minitrace:: + FILE "${CMAKE_CURRENT_BINARY_DIR}/minitrace-config.cmake" +) + +# Install config file +install( + EXPORT minitraceConfig + DESTINATION "${CMAKE_INSTALL_PREFIX}/share/minitrace" + NAMESPACE minitrace:: +) diff --git a/vcpkg/ports/minitrace/CONTROL b/vcpkg/ports/minitrace/CONTROL new file mode 100644 index 0000000..83763fa --- /dev/null +++ b/vcpkg/ports/minitrace/CONTROL @@ -0,0 +1,3 @@ +Source: minitrace +Version: 2019.02.06 +Description: Simple C/C++ library for producing JSON traces suitable for Chrome's built-in trace viewer. diff --git a/vcpkg/ports/minitrace/portfile.cmake b/vcpkg/ports/minitrace/portfile.cmake new file mode 100644 index 0000000..9410ed8 --- /dev/null +++ b/vcpkg/ports/minitrace/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO hrydgard/minitrace + REF a48215c409dd848fa0a76c5eb4dfaba4ca3bca39 + SHA512 591fa52132b6bbe8e7e121526a43d07056deff8fe026227c1a4c26bebf95536e5d68750fa8551d23afebf048fe8b8503017b9a93650e18a992cf2e5678d46135 + HEAD_REF master +) + +file(COPY ${CURRENT_PORT_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/minitrace RENAME copyright) + +vcpkg_test_cmake(PACKAGE_NAME minitrace) diff --git a/vcpkg/ports/miniupnpc/CONTROL b/vcpkg/ports/miniupnpc/CONTROL new file mode 100644 index 0000000..a639f1a --- /dev/null +++ b/vcpkg/ports/miniupnpc/CONTROL @@ -0,0 +1,3 @@ +Source: miniupnpc +Version: 2.1-1 +Description: UPnP client library/tool to access Internet Gateway Devices diff --git a/vcpkg/ports/miniupnpc/cmakelists.diff b/vcpkg/ports/miniupnpc/cmakelists.diff new file mode 100644 index 0000000..4df7ef7 --- /dev/null +++ b/vcpkg/ports/miniupnpc/cmakelists.diff @@ -0,0 +1,11 @@ +--- a/miniupnpc/CMakeLists.txt 2018-05-07 13:12:58.000000000 +0200 ++++ b/miniupnpc/CMakeLists.txt 2018-11-13 11:51:57.897598000 +0100 +@@ -124,7 +124,7 @@ + target_link_libraries (libminiupnpc-shared PRIVATE miniupnpc-private) + target_compile_definitions(libminiupnpc-shared PRIVATE MINIUPNP_EXPORTS) + +- target_include_directories(libminiupnpc-static INTERFACE ../${CMAKE_CURRENT_SOURCE_DIR}) ++ target_include_directories(libminiupnpc-shared INTERFACE ../${CMAKE_CURRENT_SOURCE_DIR}) + if (WIN32) + target_link_libraries(libminiupnpc-shared INTERFACE ws2_32 iphlpapi) + endif() diff --git a/vcpkg/ports/miniupnpc/portfile.cmake b/vcpkg/ports/miniupnpc/portfile.cmake new file mode 100644 index 0000000..1b886b9 --- /dev/null +++ b/vcpkg/ports/miniupnpc/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO miniupnp/miniupnp + REF miniupnpc_2_1 + SHA512 f2ab5116c094982f7838ccab460d3db07a99de1094448277fc45841e0e64ea1b4216d75a7e5dd471c79ff9b0132b89e4d801c3ad1b60d55631c12c916df658f5 + HEAD_REF master + PATCHES + cmakelists.diff +) + +string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "dynamic" MINIUPNPC_BUILD_SHARED) +string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "static" MINIUPNPC_BUILD_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/miniupnpc + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DUPNPC_BUILD_STATIC=${MINIUPNPC_BUILD_STATIC} + -DUPNPC_BUILD_SHARED=${MINIUPNPC_BUILD_SHARED} + -DUPNPC_BUILD_TESTS=OFF + -DUPNPC_BUILD_SAMPLE=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/miniupnpc RENAME copyright) diff --git a/vcpkg/ports/miniz/CMakeLists-targets.patch b/vcpkg/ports/miniz/CMakeLists-targets.patch new file mode 100644 index 0000000..c9d32e4 --- /dev/null +++ b/vcpkg/ports/miniz/CMakeLists-targets.patch @@ -0,0 +1,55 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f3e453a..094a4e8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -8,13 +8,12 @@ if(CMAKE_BUILD_TYPE STREQUAL "") + CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." FORCE) + endif () + +-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin) +- + set(miniz_SOURCE miniz.c miniz_zip.c miniz_tinfl.c miniz_tdef.c) + +-add_library(miniz ${miniz_SOURCE}) +-target_include_directories(miniz PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") +- ++add_library(miniz STATIC ${miniz_SOURCE}) ++target_compile_definitions(miniz PRIVATE _CRT_SECURE_NO_WARNINGS) ++ ++if(FALSE) + set(EXAMPLE1_SRC_LIST "${CMAKE_CURRENT_SOURCE_DIR}/examples/example1.c") + set(EXAMPLE2_SRC_LIST "${CMAKE_CURRENT_SOURCE_DIR}/examples/example2.c") + set(EXAMPLE3_SRC_LIST "${CMAKE_CURRENT_SOURCE_DIR}/examples/example3.c") +@@ -41,12 +40,28 @@ if(${UNIX}) + target_link_libraries(example6 m) + endif() + ++target_compile_definitions(example1 PRIVATE _CRT_SECURE_NO_WARNINGS) ++target_compile_definitions(example2 PRIVATE _CRT_SECURE_NO_WARNINGS) ++target_compile_definitions(example3 PRIVATE _CRT_SECURE_NO_WARNINGS) ++target_compile_definitions(example4 PRIVATE _CRT_SECURE_NO_WARNINGS) ++target_compile_definitions(example5 PRIVATE _CRT_SECURE_NO_WARNINGS) ++target_compile_definitions(example6 PRIVATE _CRT_SECURE_NO_WARNINGS) ++ + # add_executable(miniz_tester ${MINIZ_TESTER_SRC_LIST}) + # target_link_libraries(miniz_tester miniz) ++endif() + +-install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Targets +- ARCHIVE DESTINATION lib +- LIBRARY DESTINATION lib ++install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Config ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) ++export(TARGETS ${PROJECT_NAME} ++ NAMESPACE miniz:: ++ FILE "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" ++) ++install(EXPORT ${PROJECT_NAME}Config ++ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/miniz" ++ NAMESPACE miniz:: ++) + file(GLOB INSTALL_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/*.h) + install(FILES ${INSTALL_HEADERS} DESTINATION include/${PROJECT_NAME}) +\ No newline at end of file diff --git a/vcpkg/ports/miniz/CONTROL b/vcpkg/ports/miniz/CONTROL new file mode 100644 index 0000000..519eee2 --- /dev/null +++ b/vcpkg/ports/miniz/CONTROL @@ -0,0 +1,4 @@ +Source: miniz +Version: 2.1.0-1 +Homepage: https://github.com/richgel999/miniz +Description: Single C source file zlib-replacement library diff --git a/vcpkg/ports/miniz/portfile.cmake b/vcpkg/ports/miniz/portfile.cmake new file mode 100644 index 0000000..b932b69 --- /dev/null +++ b/vcpkg/ports/miniz/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO richgel999/miniz + REF a4264837ae37384b1d7a205a6732db322f0f3769 + SHA512 88f0e03cccfe66c796db7594b93c667bd52cd7f4d13803181e9d86b4aa26f214fd2907a45a752da603d3e87f8d53c40bfc0956b279c0d49016f7b943aeb9cd33 + HEAD_REF master + PATCHES + CMakeLists-targets.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/minizip/0001-remove-ifndef-NOUNCRYPT.patch b/vcpkg/ports/minizip/0001-remove-ifndef-NOUNCRYPT.patch new file mode 100644 index 0000000..d9c051d --- /dev/null +++ b/vcpkg/ports/minizip/0001-remove-ifndef-NOUNCRYPT.patch @@ -0,0 +1,29 @@ +From a6fd3992d44053a523a67aa16f5ae88fecfb20e1 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 14:09:53 -0700 +Subject: [PATCH 1/2] remove `#ifndef NOUNCRYPT` + +enable decrypt support for password-encrypted ZIP files + +--- + contrib/minizip/unzip.c | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/contrib/minizip/unzip.c b/contrib/minizip/unzip.c +index bcfb941..1895a0f 100644 +--- a/contrib/minizip/unzip.c ++++ b/contrib/minizip/unzip.c +@@ -68,10 +68,6 @@ + #include + #include + +-#ifndef NOUNCRYPT +- #define NOUNCRYPT +-#endif +- + #include "zlib.h" + #include "unzip.h" + +-- +2.24.3 (Apple Git-128) + diff --git a/vcpkg/ports/minizip/0002-add-declaration-for-mkdir.patch b/vcpkg/ports/minizip/0002-add-declaration-for-mkdir.patch new file mode 100644 index 0000000..8786a84 --- /dev/null +++ b/vcpkg/ports/minizip/0002-add-declaration-for-mkdir.patch @@ -0,0 +1,29 @@ +From 6c38b6f544b55f9fc554f0fe22e2cbaddfaed7f8 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 14:15:04 -0700 +Subject: [PATCH 2/2] add declaration for mkdir + +It's invalid in C99 to implicitly declare mkdir + +--- + contrib/minizip/miniunz.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/contrib/minizip/miniunz.c b/contrib/minizip/miniunz.c +index 3d65401..5341af2 100644 +--- a/contrib/minizip/miniunz.c ++++ b/contrib/minizip/miniunz.c +@@ -12,6 +12,10 @@ + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + */ + ++#if !defined(_WIN32) ++#include ++#endif ++ + #if (!defined(_WIN32)) && (!defined(WIN32)) && (!defined(__APPLE__)) + #ifndef __USE_FILE_OFFSET64 + #define __USE_FILE_OFFSET64 +-- +2.24.3 (Apple Git-128) + diff --git a/vcpkg/ports/minizip/CMakeLists.txt b/vcpkg/ports/minizip/CMakeLists.txt new file mode 100644 index 0000000..c21b327 --- /dev/null +++ b/vcpkg/ports/minizip/CMakeLists.txt @@ -0,0 +1,106 @@ +cmake_minimum_required(VERSION 3.8) +project(minizip C) + +set(PROJECT_VERSION 1.2.11) +set(PROJECT_VERSION_MAJOR 1) +set(PROJECT_VERSION_MINOR 2) +set(PROJECT_VERSION_PATCH 11) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +find_package(ZLIB REQUIRED) +set(MIN_SRC contrib/minizip) + +include_directories(${MIN_SRC} ${ZLIB_INCLUDE_DIRS}) + +set(MINIZIP_LIBRARIES ZLIB::ZLIB) +if(ENABLE_BZIP2) + message(STATUS "Building with bzip2 support") + find_package(BZip2) + + include_directories(${BZIP2_INCLUDE_DIR}) + set(MINIZIP_LIBRARIES ${MINIZIP_LIBRARIES} ${BZIP2_LIBRARIES}) +else() + message(STATUS "Building without bzip2 support") +endif() + +set(SRC + ${MIN_SRC}/ioapi.c + ${MIN_SRC}/unzip.c + ${MIN_SRC}/zip.c + ${MIN_SRC}/mztools.c +) +if(WIN32) + list(APPEND SRC ${MIN_SRC}/iowin32.c) +endif() + +set(HEADERS + ${MIN_SRC}/crypt.h + ${MIN_SRC}/ioapi.h + ${MIN_SRC}/unzip.h + ${MIN_SRC}/zip.h + ${MIN_SRC}/mztools.h +) +if(WIN32) + list(APPEND HEADERS ${MIN_SRC}/iowin32.h) +endif() + +add_library(minizip ${SRC}) + +target_link_libraries(minizip PRIVATE ZLIB::ZLIB) +target_compile_definitions(minizip PRIVATE -D_ZLIB_H) + +if(ENABLE_BZIP2) + target_link_libraries(minizip PRIVATE ${BZIP2_LIBRARIES}) + target_compile_definitions(minizip PRIVATE -DHAVE_BZIP2=1) +endif() + +add_executable(minizip_bin ${MIN_SRC}/minizip.c) +add_executable(miniunz_bin ${MIN_SRC}/miniunz.c) + +target_link_libraries(minizip_bin minizip ${MINIZIP_LIBRARIES}) +target_link_libraries(miniunz_bin minizip ${MINIZIP_LIBRARIES}) + +set_target_properties(minizip_bin PROPERTIES OUTPUT_NAME minizip) +set_target_properties(miniunz_bin PROPERTIES OUTPUT_NAME miniunz) + + +install( + TARGETS minizip + EXPORT minizipTargets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +include(CMakePackageConfigHelpers) +write_basic_package_version_file("${PROJECT_BINARY_DIR}/minizipConfigVersion.cmake" + COMPATIBILITY SameMajorVersion) + +configure_package_config_file(${PROJECT_SOURCE_DIR}/cmake/minizipConfig.cmake.in + minizipConfig.cmake + INSTALL_DESTINATION share/minizip) + +install(FILES + "${PROJECT_BINARY_DIR}/minizipConfig.cmake" + "${PROJECT_BINARY_DIR}/minizipConfigVersion.cmake" + DESTINATION share/minizip +) + +install(EXPORT minizipTargets + NAMESPACE minizip:: + DESTINATION share/minizip +) + +if(NOT DISABLE_INSTALL_TOOLS) + install ( + TARGETS minizip_bin miniunz_bin + RUNTIME DESTINATION tools/minizip + ) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES ${HEADERS} DESTINATION include/minizip) +endif() diff --git a/vcpkg/ports/minizip/CONTROL b/vcpkg/ports/minizip/CONTROL new file mode 100644 index 0000000..d4fafd4 --- /dev/null +++ b/vcpkg/ports/minizip/CONTROL @@ -0,0 +1,11 @@ +Source: minizip +Version: 1.2.11 +Port-Version: 7 +Build-Depends: zlib +Homepage: https://github.com/madler/zlib +Description: Zip compression library +Supports: !uwp + +Feature: bzip2 +Build-Depends: bzip2 +Description: Support compression using bzip2 library diff --git a/vcpkg/ports/minizip/minizipConfig.cmake.in b/vcpkg/ports/minizip/minizipConfig.cmake.in new file mode 100644 index 0000000..9f27956 --- /dev/null +++ b/vcpkg/ports/minizip/minizipConfig.cmake.in @@ -0,0 +1,4 @@ +#@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") +check_required_components("@PROJECT_NAME@") \ No newline at end of file diff --git a/vcpkg/ports/minizip/portfile.cmake b/vcpkg/ports/minizip/portfile.cmake new file mode 100644 index 0000000..b70f26d --- /dev/null +++ b/vcpkg/ports/minizip/portfile.cmake @@ -0,0 +1,46 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO madler/zlib + REF v1.2.11 + SHA512 104c62ed1228b5f1199bc037081861576900eb0697a226cafa62a35c4c890b5cb46622e399f9aad82ee5dfb475bae26ae75e2bd6da3d261361b1c8b996970faf + HEAD_REF master + PATCHES + 0001-remove-ifndef-NOUNCRYPT.patch + 0002-add-declaration-for-mkdir.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + bzip2 ENABLE_BZIP2 +) + +configure_file(${CMAKE_CURRENT_LIST_DIR}/minizipConfig.cmake.in ${SOURCE_PATH}/cmake/minizipConfig.cmake.in COPYONLY) +configure_file(${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON + -DDISABLE_INSTALL_TOOLS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/minizip) + +if ("bzip2" IN_LIST FEATURES) + file(GLOB HEADERS "${CURRENT_PACKAGES_DIR}/include/minizip/*.h") + foreach(HEADER ${HEADERS}) + file(READ "${HEADER}" _contents) + string(REPLACE "#ifdef HAVE_BZIP2" "#if 1" _contents "${_contents}") + file(WRITE "${HEADER}" "${_contents}") + endforeach() +endif() + +file(INSTALL ${SOURCE_PATH}/contrib/minizip/MiniZip64_info.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/mio/CONTROL b/vcpkg/ports/mio/CONTROL new file mode 100644 index 0000000..895c4c3 --- /dev/null +++ b/vcpkg/ports/mio/CONTROL @@ -0,0 +1,3 @@ +Source: mio +Version: 2019-02-10 +Description: Cross-platform header-only C++11 library for memory mapped file IO. diff --git a/vcpkg/ports/mio/portfile.cmake b/vcpkg/ports/mio/portfile.cmake new file mode 100644 index 0000000..9c7e259 --- /dev/null +++ b/vcpkg/ports/mio/portfile.cmake @@ -0,0 +1,26 @@ +# header-only library +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mandreyel/mio + REF cafa31360fee8866be89b4c602d8b9a7a18dbf5e + SHA512 21a5e6c6b90b9ac39bfe7fef59b6dc9c6dc3516b850de5897df63672e81e22abea7bdd7e363e8206dcb72697af797af2501b1c14480bbb8a9284f28c70ca9d67 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -Dmio.tests=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/mio) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/mio RENAME copyright) diff --git a/vcpkg/ports/mlpack/CONTROL b/vcpkg/ports/mlpack/CONTROL new file mode 100644 index 0000000..7c99745 --- /dev/null +++ b/vcpkg/ports/mlpack/CONTROL @@ -0,0 +1,10 @@ +Source: mlpack +Version: 3.2.2 +Port-Version: 6 +Homepage: https://github.com/mlpack/mlpack +Description: mlpack is a fast, flexible machine learning library, written in C++, that aims to provide fast, extensible implementations of cutting-edge machine learning algorithms. +Build-Depends: openblas, lapack, boost, armadillo, ensmallen, stb +Supports: !uwp + +Feature: tools +Description: Build command-line executables. diff --git a/vcpkg/ports/mlpack/cmakelists.patch b/vcpkg/ports/mlpack/cmakelists.patch new file mode 100644 index 0000000..79f1764 --- /dev/null +++ b/vcpkg/ports/mlpack/cmakelists.patch @@ -0,0 +1,78 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 26757a5..c200b40 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -288,6 +282,7 @@ endif() + # and find LAPACK and BLAS ourselves, using a slightly modified variant of the + # script Armadillo uses to find these. + if (WIN32) ++ if(0) + find_library(LAPACK_LIBRARY + NAMES lapack liblapack lapack_win32_MT lapack_win32 + PATHS "C:/Program Files/Armadillo" +@@ -305,24 +306,25 @@ if (WIN32) + if (NOT BLAS_LIBRARY) + message(FATAL_ERROR "Cannot find BLAS library (.lib)!") + endif () ++ endif() + ++ find_package(LAPACK REQUIRED) ++ find_package(BLAS REQUIRED) + # Piggyback LAPACK and BLAS linking into Armadillo link. + set(ARMADILLO_LIBRARIES +- ${ARMADILLO_LIBRARIES} ${BLAS_LIBRARY} ${LAPACK_LIBRARY}) ++ ${ARMADILLO_LIBRARIES} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) + + # Ensure that the libraries are added to the MSVC IDE runtime path. +- get_filename_component(BLAS_DIR ${BLAS_LIBRARY} DIRECTORY) +- get_filename_component(LAPACK_DIR ${LAPACK_LIBRARY} DIRECTORY) + + # Sometimes, especially with an OpenBLAS install via nuget, the DLLs are + # actually in ../../bin/x64/. Automatically add these. +- if (EXISTS "${BLAS_DIR}/../../bin/x64/") +- get_filename_component(BLAS_DLL_DIR "${BLAS_DIR}/../../bin/x64" ABSOLUTE) ++ if (0) ++ get_filename_component(BLAS_DLL_DIR "${BLAS_DIR}" ABSOLUTE) + set(DLL_COPY_DIRS ${DLL_COPY_DIRS} "${BLAS_DLL_DIR}") + endif () + +- if (EXISTS "${LAPACK_DIR}/../../bin/x64/") +- get_filename_component(LAPACK_DLL_DIR "${LAPACK_DIR}/../../bin/x64" ABSOLUTE) ++ if (0) ++ get_filename_component(LAPACK_DLL_DIR "${LAPACK_DIR}" ABSOLUTE) + set(DLL_COPY_DIRS ${DLL_COPY_DIRS} "${BLAS_DLL_DIR}") + endif () + endif () +@@ -415,8 +423,8 @@ if (NOT ENSMALLEN_FOUND) + "Successfully downloaded ensmallen into ${CMAKE_BINARY_DIR}/deps/${ENSMALLEN_INCLUDE_DIR}/") + + # Now we have to also ensure these header files get installed. +- install(DIRECTORY "${CMAKE_BINARY_DIR}/deps/${ENSMALLEN_INCLUDE_DIR}/include/ensmallen_bits/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/ensmallen_bits") +- install(FILES "${CMAKE_BINARY_DIR}/deps/${ENSMALLEN_INCLUDE_DIR}/include/ensmallen.hpp" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") ++ #install(DIRECTORY "${CMAKE_BINARY_DIR}/deps/${ENSMALLEN_INCLUDE_DIR}/include/ensmallen_bits/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/ensmallen_bits") ++ #install(FILES "${CMAKE_BINARY_DIR}/deps/${ENSMALLEN_INCLUDE_DIR}/include/ensmallen.hpp" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + else () + message(FATAL_ERROR "Problem unpacking ensmallen! Expected only one directory ensmallen-x.y.z/; found ${ENS_DIRECTORIES}. Try removing the directory ${CMAKE_BINARY_DIR}/deps and reconfiguring.") + endif () +@@ -472,6 +480,7 @@ find_package(Boost 1.49 + REQUIRED + ) + ++if(0) + link_directories(${Boost_LIBRARY_DIRS}) + + # In Visual Studio, automatic linking is performed, so we don't need to worry +@@ -483,10 +492,12 @@ if (MSVC) + message("boost lib dirs ${Boost_LIBRARY_DIRS}") + set(Boost_LIBRARIES "") + endif () ++endif() + ++link_directories(${Boost_LIBRARIES}) + set(MLPACK_INCLUDE_DIRS ${MLPACK_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}) + set(MLPACK_LIBRARIES ${MLPACK_LIBRARIES} ${Boost_LIBRARIES}) +-set(MLPACK_LIBRARY_DIRS ${MLPACK_LIBRARY_DIRS} ${Boost_LIBRARY_DIRS}) ++set(MLPACK_LIBRARY_DIRS ${MLPACK_LIBRARY_DIRS} ${Boost_LIBRARIES}) + + # For Boost testing framework (will have no effect on non-testing executables). + # This specifies to Boost that we are dynamically linking to the Boost test diff --git a/vcpkg/ports/mlpack/portfile.cmake b/vcpkg/ports/mlpack/portfile.cmake new file mode 100644 index 0000000..11f6aa8 --- /dev/null +++ b/vcpkg/ports/mlpack/portfile.cmake @@ -0,0 +1,93 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mlpack/mlpack + REF a8af4882af5e163ae8c8023653c66c8914ac1c22 # 3.2.2 + SHA512 879dd24f6cface3e6e1a0990e912ca4463060725c7c105e1e7d228c90123b1f44728cbe1ae327fa20e0e4981626a5d1eb2c411257899ef849c9600891616eed4 + HEAD_REF master + PATCHES + cmakelists.patch +) + +file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindACML.cmake) +file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindACMLMP.cmake) +file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindARPACK.cmake) +file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindBLAS.cmake) +file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindCBLAS.cmake) +file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindCLAPACK.cmake) +file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindLAPACK.cmake) +file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindMKL.cmake) +file(REMOVE ${SOURCE_PATH}/CMake/ARMA_FindOpenBLAS.cmake) +file(REMOVE ${SOURCE_PATH}/CMake/FindArmadillo.cmake) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tools BUILD_CLI_EXECUTABLES +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTS=OFF + -DDOWNLOAD_STB_IMAGE=OFF + -DDOWNLOAD_ENSMALLEN=OFF + -DBUILD_PYTHON_BINDINGS=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON + ${FEATURE_OPTIONS} +) +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +if("tools" IN_LIST FEATURES) + vcpkg_copy_tools(AUTO_CLEAN TOOL_NAMES + mlpack_adaboost + mlpack_approx_kfn + mlpack_cf + mlpack_dbscan + mlpack_decision_stump + mlpack_decision_tree + mlpack_det + mlpack_emst + mlpack_fastmks + mlpack_gmm_generate + mlpack_gmm_probability + mlpack_gmm_train + mlpack_hmm_generate + mlpack_hmm_loglik + mlpack_hmm_train + mlpack_hmm_viterbi + mlpack_hoeffding_tree + mlpack_kde + mlpack_kernel_pca + mlpack_kfn + mlpack_kmeans + mlpack_knn + mlpack_krann + mlpack_lars + mlpack_linear_regression + mlpack_linear_svm + mlpack_lmnn + mlpack_local_coordinate_coding + mlpack_logistic_regression + mlpack_lsh + mlpack_mean_shift + mlpack_nbc + mlpack_nca + mlpack_nmf + mlpack_pca + mlpack_perceptron + mlpack_preprocess_binarize + mlpack_preprocess_describe + mlpack_preprocess_imputer + mlpack_preprocess_scale + mlpack_preprocess_split + mlpack_radical + mlpack_random_forest + mlpack_range_search + mlpack_softmax_regression + mlpack_sparse_coding + ) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYRIGHT.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/mman/CONTROL b/vcpkg/ports/mman/CONTROL new file mode 100644 index 0000000..75a043f --- /dev/null +++ b/vcpkg/ports/mman/CONTROL @@ -0,0 +1,4 @@ +Source: mman +Version: git-f5ff813-3 +Homepage: https://github.com/witwall/mman-win32 +Description: A light implementation of the mmap functions for MinGW. diff --git a/vcpkg/ports/mman/mman-static.patch b/vcpkg/ports/mman/mman-static.patch new file mode 100644 index 0000000..ce7be49 --- /dev/null +++ b/vcpkg/ports/mman/mman-static.patch @@ -0,0 +1,33 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4696ad4..a72bbce 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -8,6 +8,10 @@ option (BUILD_TESTS "tests?" OFF) + set (headers mman.h) + set (sources mman.c) + ++if(NOT BUILD_SHARED_LIBS) ++ add_definitions(-DMMANSHARED_EXPORT=) ++endif() ++ + add_library (mman ${sources}) + + install (TARGETS mman RUNTIME DESTINATION bin +diff --git a/mman.h b/mman.h +index 4065bc6..435ea26 100644 +--- a/mman.h ++++ b/mman.h +@@ -15,11 +15,13 @@ + #include <_mingw.h> + #endif + ++#if !defined(MMANSHARED_EXPORT) + #if defined(MMAN_LIBRARY) + #define MMANSHARED_EXPORT __declspec(dllexport) + #else + #define MMANSHARED_EXPORT __declspec(dllimport) + #endif ++#endif + + /* Determine offset type */ + #include diff --git a/vcpkg/ports/mman/portfile.cmake b/vcpkg/ports/mman/portfile.cmake new file mode 100644 index 0000000..5918d37 --- /dev/null +++ b/vcpkg/ports/mman/portfile.cmake @@ -0,0 +1,33 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO witwall/mman-win32 + REF f5ff813c53935c3078f48e1f03a6944c4e7b459c + SHA512 49c9a63a0a3c6fa585a76e65425f6fb1fdaa23cc87e53d5afb7a1298bcd4956298c076ee78f24dd5df5f5a0c5f6244c6abb63b40818e4d2546185fa37a73bf0d + HEAD_REF master + PATCHES + mman-static.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include/mman) +file(RENAME ${CURRENT_PACKAGES_DIR}/include/sys ${CURRENT_PACKAGES_DIR}/include/mman/sys) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/mman) +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/mman RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(READ ${CURRENT_PACKAGES_DIR}/include/mman/sys/mman.h _contents) + string(REPLACE "__declspec(dllimport)" "" _contents "${_contents}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/mman/sys/mman.h "${_contents}") +endif() + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/mman/usage b/vcpkg/ports/mman/usage new file mode 100644 index 0000000..25d00d4 --- /dev/null +++ b/vcpkg/ports/mman/usage @@ -0,0 +1,4 @@ +The mman.h header deployed by mman is placed in mman/sys/mman.h to avoid accidental inclusion. + + find_path(MMAN_DIR NAMES sys/mman.h PATH_SUFFIXES mman) + target_include_directories(main PRIVATE ${MMAN_DIR}) diff --git a/vcpkg/ports/mmloader/CONTROL b/vcpkg/ports/mmloader/CONTROL new file mode 100644 index 0000000..e575560 --- /dev/null +++ b/vcpkg/ports/mmloader/CONTROL @@ -0,0 +1,8 @@ +Source: mmloader +Version: 2020-05-15 +Description: A library for loading dll module bypassing windows PE loader from memory (x86/x64) +Homepage: http://tishion.github.io/mmLoader/ +Supports: (x86|x64)&windows&static + +Feature: shellcode +Description: Generate mmLoader shell code headers diff --git a/vcpkg/ports/mmloader/portfile.cmake b/vcpkg/ports/mmloader/portfile.cmake new file mode 100644 index 0000000..2a3411c --- /dev/null +++ b/vcpkg/ports/mmloader/portfile.cmake @@ -0,0 +1,42 @@ + +# fail early for unsupported triplets +vcpkg_fail_port_install( + MESSAGE "mmLoader supports only x86/x64-windows-static triplets" + ON_TARGET "UWP" "LINUX" "OSX" "ANDROID" "FREEBSD" + ON_ARCH "arm" "arm64" + ON_CRT_LINKAGE "dynamic" + ON_LIBRARY_LINKAGE "dynamic" +) + +# source +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tishion/mmLoader + REF 1.0.0 + SHA512 ceb2ab4b60d74209fa46d198cde6fd87a97d911abb875ac35383288a67828d0420bb38ff8d2f17dd4a3f46ba3abf554152d1246eeb05215258e8af64ac4a39de + HEAD_REF master +) + +# feature +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + shellcode BUILD_SHELLCODE_GEN +) + +# config +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + ${FEATURE_OPTIONS} +) + +# pre-clean +file(REMOVE_RECURSE ${SOURCE_PATH}/output) + +# build and install +vcpkg_install_cmake(DISABLE_PARALLEL) + +# remove the debug/include directory +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# collect license files +file(INSTALL ${SOURCE_PATH}/License DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/mmx/CONTROL b/vcpkg/ports/mmx/CONTROL new file mode 100644 index 0000000..ee64036 --- /dev/null +++ b/vcpkg/ports/mmx/CONTROL @@ -0,0 +1,4 @@ +Source: mmx +Version: 2019-09-29 +Homepage: https://github.com/vurtun/mmx +Description: Single header libraries for C/C++ \ No newline at end of file diff --git a/vcpkg/ports/mmx/copyright b/vcpkg/ports/mmx/copyright new file mode 100644 index 0000000..f02e1ba --- /dev/null +++ b/vcpkg/ports/mmx/copyright @@ -0,0 +1,52 @@ +Licenses are stated in each header file + +json.h - public domain - Micha Mettke + +lexer.h - zlib LICENSE +LICENSE: (zlib) +Copyright (c) 2016 Micha Mettke + +sched.h - zlib LICENSE +LICENSE: (zlib) +Copyright (c) 2016 Doug Binks + +vec.h - zlib LICENSE +LICENSE: (zlib) +Copyright (c) 2015 Micha Mettke + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + + +web.h - BSD LICENSE - Andreas Fredriksson +LICENSE: (BSD) +Copyright (c) 2016, Andreas Fredriksson, Micha Mettke +All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/vcpkg/ports/mmx/portfile.cmake b/vcpkg/ports/mmx/portfile.cmake new file mode 100644 index 0000000..78f7d9e --- /dev/null +++ b/vcpkg/ports/mmx/portfile.cmake @@ -0,0 +1,12 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO vurtun/mmx + REF b99867658dadcaed2fbfb95ad0e0c461a7a80a0c + SHA512 3ad01562f439fac364c45d9e4091d136c7cec36adeab219773c2df0d32b09f4e258bdb11884cbeed7dc2835381d2b409c55fe80e0913e995e54a1b7ebbe0f2bc + HEAD_REF master +) + +file(GLOB_RECURSE MMX_HEADERS "${SOURCE_PATH}/*.h") +file(INSTALL ${MMX_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/modp-base64/CMakeLists.txt b/vcpkg/ports/modp-base64/CMakeLists.txt new file mode 100644 index 0000000..5a2dffe --- /dev/null +++ b/vcpkg/ports/modp-base64/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.8) +project(libmodpbase64 C) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +configure_file(config.h.cmake config.h @ONLY) + +include_directories(. ${SOURCE_PATH}/src ${CMAKE_CURRENT_BINARY_DIR}) + +add_library(libmodpbase64 ${SOURCE_PATH}/src/modp_b64.c libmodpbase64.def) + +install( + TARGETS libmodpbase64 + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install( + FILES ${SOURCE_PATH}/src/modp_b64.h + DESTINATION include + ) +endif() diff --git a/vcpkg/ports/modp-base64/CONTROL b/vcpkg/ports/modp-base64/CONTROL new file mode 100644 index 0000000..396fa0b --- /dev/null +++ b/vcpkg/ports/modp-base64/CONTROL @@ -0,0 +1,3 @@ +Source: modp-base64 +Version: 2020-09-26 +Description: High performance base64 encoder/decoder diff --git a/vcpkg/ports/modp-base64/config.h.cmake b/vcpkg/ports/modp-base64/config.h.cmake new file mode 100644 index 0000000..da32c24 --- /dev/null +++ b/vcpkg/ports/modp-base64/config.h.cmake @@ -0,0 +1,4 @@ +#ifndef MODP_CONFIG_H +#define MODP_CONFIG_H + +#endif diff --git a/vcpkg/ports/modp-base64/libmodpbase64.def b/vcpkg/ports/modp-base64/libmodpbase64.def new file mode 100644 index 0000000..defd83b --- /dev/null +++ b/vcpkg/ports/modp-base64/libmodpbase64.def @@ -0,0 +1,4 @@ +LIBRARY libmodpbase64 +EXPORTS + modp_b64_encode @1 + modp_b64_decode @2 diff --git a/vcpkg/ports/modp-base64/modp_b64_data.h b/vcpkg/ports/modp-base64/modp_b64_data.h new file mode 100644 index 0000000..e3c54b4 --- /dev/null +++ b/vcpkg/ports/modp-base64/modp_b64_data.h @@ -0,0 +1,480 @@ +#include +#define CHAR62 '+' +#define CHAR63 '/' +#define CHARPAD '=' +static const char e0[256] = { + 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'C', 'C', + 'C', 'C', 'D', 'D', 'D', 'D', 'E', 'E', 'E', 'E', + 'F', 'F', 'F', 'F', 'G', 'G', 'G', 'G', 'H', 'H', + 'H', 'H', 'I', 'I', 'I', 'I', 'J', 'J', 'J', 'J', + 'K', 'K', 'K', 'K', 'L', 'L', 'L', 'L', 'M', 'M', + 'M', 'M', 'N', 'N', 'N', 'N', 'O', 'O', 'O', 'O', + 'P', 'P', 'P', 'P', 'Q', 'Q', 'Q', 'Q', 'R', 'R', + 'R', 'R', 'S', 'S', 'S', 'S', 'T', 'T', 'T', 'T', + 'U', 'U', 'U', 'U', 'V', 'V', 'V', 'V', 'W', 'W', + 'W', 'W', 'X', 'X', 'X', 'X', 'Y', 'Y', 'Y', 'Y', + 'Z', 'Z', 'Z', 'Z', 'a', 'a', 'a', 'a', 'b', 'b', + 'b', 'b', 'c', 'c', 'c', 'c', 'd', 'd', 'd', 'd', + 'e', 'e', 'e', 'e', 'f', 'f', 'f', 'f', 'g', 'g', + 'g', 'g', 'h', 'h', 'h', 'h', 'i', 'i', 'i', 'i', + 'j', 'j', 'j', 'j', 'k', 'k', 'k', 'k', 'l', 'l', + 'l', 'l', 'm', 'm', 'm', 'm', 'n', 'n', 'n', 'n', + 'o', 'o', 'o', 'o', 'p', 'p', 'p', 'p', 'q', 'q', + 'q', 'q', 'r', 'r', 'r', 'r', 's', 's', 's', 's', + 't', 't', 't', 't', 'u', 'u', 'u', 'u', 'v', 'v', + 'v', 'v', 'w', 'w', 'w', 'w', 'x', 'x', 'x', 'x', + 'y', 'y', 'y', 'y', 'z', 'z', 'z', 'z', '0', '0', + '0', '0', '1', '1', '1', '1', '2', '2', '2', '2', + '3', '3', '3', '3', '4', '4', '4', '4', '5', '5', + '5', '5', '6', '6', '6', '6', '7', '7', '7', '7', + '8', '8', '8', '8', '9', '9', '9', '9', '+', '+', + '+', '+', '/', '/', '/', '/' +}; + +static const char e1[256] = { + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', + 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', + 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', + 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', + 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', + 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', '+', '/', 'A', 'B', 'C', 'D', 'E', 'F', + 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', + 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', + 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', + 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', + '4', '5', '6', '7', '8', '9', '+', '/', 'A', 'B', + 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', + 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', + 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '+', '/', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', + 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', + 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', + 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', + 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', + 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', + '6', '7', '8', '9', '+', '/' +}; + +static const char e2[256] = { + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', + 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', + 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', + 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', + 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', + 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', '+', '/', 'A', 'B', 'C', 'D', 'E', 'F', + 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', + 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', + 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', + 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', + '4', '5', '6', '7', '8', '9', '+', '/', 'A', 'B', + 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', + 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', + 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + '+', '/', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', + 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', + 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', + 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', + 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', + 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', + '6', '7', '8', '9', '+', '/' +}; + + + +#ifdef WORDS_BIGENDIAN + + +/* SPECIAL DECODE TABLES FOR BIG ENDIAN (IBM/MOTOROLA/SUN) CPUS */ + +static const uint32_t d0[256] = { +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x00f80000, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00fc0000, +0x00d00000, 0x00d40000, 0x00d80000, 0x00dc0000, 0x00e00000, 0x00e40000, +0x00e80000, 0x00ec0000, 0x00f00000, 0x00f40000, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000, +0x00040000, 0x00080000, 0x000c0000, 0x00100000, 0x00140000, 0x00180000, +0x001c0000, 0x00200000, 0x00240000, 0x00280000, 0x002c0000, 0x00300000, +0x00340000, 0x00380000, 0x003c0000, 0x00400000, 0x00440000, 0x00480000, +0x004c0000, 0x00500000, 0x00540000, 0x00580000, 0x005c0000, 0x00600000, +0x00640000, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x00680000, 0x006c0000, 0x00700000, 0x00740000, 0x00780000, +0x007c0000, 0x00800000, 0x00840000, 0x00880000, 0x008c0000, 0x00900000, +0x00940000, 0x00980000, 0x009c0000, 0x00a00000, 0x00a40000, 0x00a80000, +0x00ac0000, 0x00b00000, 0x00b40000, 0x00b80000, 0x00bc0000, 0x00c00000, +0x00c40000, 0x00c80000, 0x00cc0000, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff +}; + + +static const uint32_t d1[256] = { +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x0003e000, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x0003f000, +0x00034000, 0x00035000, 0x00036000, 0x00037000, 0x00038000, 0x00039000, +0x0003a000, 0x0003b000, 0x0003c000, 0x0003d000, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000, +0x00001000, 0x00002000, 0x00003000, 0x00004000, 0x00005000, 0x00006000, +0x00007000, 0x00008000, 0x00009000, 0x0000a000, 0x0000b000, 0x0000c000, +0x0000d000, 0x0000e000, 0x0000f000, 0x00010000, 0x00011000, 0x00012000, +0x00013000, 0x00014000, 0x00015000, 0x00016000, 0x00017000, 0x00018000, +0x00019000, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x0001a000, 0x0001b000, 0x0001c000, 0x0001d000, 0x0001e000, +0x0001f000, 0x00020000, 0x00021000, 0x00022000, 0x00023000, 0x00024000, +0x00025000, 0x00026000, 0x00027000, 0x00028000, 0x00029000, 0x0002a000, +0x0002b000, 0x0002c000, 0x0002d000, 0x0002e000, 0x0002f000, 0x00030000, +0x00031000, 0x00032000, 0x00033000, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff +}; + + +static const uint32_t d2[256] = { +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x00000f80, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000fc0, +0x00000d00, 0x00000d40, 0x00000d80, 0x00000dc0, 0x00000e00, 0x00000e40, +0x00000e80, 0x00000ec0, 0x00000f00, 0x00000f40, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000, +0x00000040, 0x00000080, 0x000000c0, 0x00000100, 0x00000140, 0x00000180, +0x000001c0, 0x00000200, 0x00000240, 0x00000280, 0x000002c0, 0x00000300, +0x00000340, 0x00000380, 0x000003c0, 0x00000400, 0x00000440, 0x00000480, +0x000004c0, 0x00000500, 0x00000540, 0x00000580, 0x000005c0, 0x00000600, +0x00000640, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x00000680, 0x000006c0, 0x00000700, 0x00000740, 0x00000780, +0x000007c0, 0x00000800, 0x00000840, 0x00000880, 0x000008c0, 0x00000900, +0x00000940, 0x00000980, 0x000009c0, 0x00000a00, 0x00000a40, 0x00000a80, +0x00000ac0, 0x00000b00, 0x00000b40, 0x00000b80, 0x00000bc0, 0x00000c00, +0x00000c40, 0x00000c80, 0x00000cc0, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff +}; + + +static const uint32_t d3[256] = { +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x0000003e, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x0000003f, +0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, +0x0000003a, 0x0000003b, 0x0000003c, 0x0000003d, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000, +0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, +0x00000007, 0x00000008, 0x00000009, 0x0000000a, 0x0000000b, 0x0000000c, +0x0000000d, 0x0000000e, 0x0000000f, 0x00000010, 0x00000011, 0x00000012, +0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, +0x00000019, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x0000001a, 0x0000001b, 0x0000001c, 0x0000001d, 0x0000001e, +0x0000001f, 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, +0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002a, +0x0000002b, 0x0000002c, 0x0000002d, 0x0000002e, 0x0000002f, 0x00000030, +0x00000031, 0x00000032, 0x00000033, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff +}; + + +#else + + +/* SPECIAL DECODE TABLES FOR LITTLE ENDIAN (INTEL) CPUS */ + +static const uint32_t d0[256] = { +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x000000f8, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x000000fc, +0x000000d0, 0x000000d4, 0x000000d8, 0x000000dc, 0x000000e0, 0x000000e4, +0x000000e8, 0x000000ec, 0x000000f0, 0x000000f4, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000, +0x00000004, 0x00000008, 0x0000000c, 0x00000010, 0x00000014, 0x00000018, +0x0000001c, 0x00000020, 0x00000024, 0x00000028, 0x0000002c, 0x00000030, +0x00000034, 0x00000038, 0x0000003c, 0x00000040, 0x00000044, 0x00000048, +0x0000004c, 0x00000050, 0x00000054, 0x00000058, 0x0000005c, 0x00000060, +0x00000064, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x00000068, 0x0000006c, 0x00000070, 0x00000074, 0x00000078, +0x0000007c, 0x00000080, 0x00000084, 0x00000088, 0x0000008c, 0x00000090, +0x00000094, 0x00000098, 0x0000009c, 0x000000a0, 0x000000a4, 0x000000a8, +0x000000ac, 0x000000b0, 0x000000b4, 0x000000b8, 0x000000bc, 0x000000c0, +0x000000c4, 0x000000c8, 0x000000cc, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff +}; + + +static const uint32_t d1[256] = { +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x0000e003, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x0000f003, +0x00004003, 0x00005003, 0x00006003, 0x00007003, 0x00008003, 0x00009003, +0x0000a003, 0x0000b003, 0x0000c003, 0x0000d003, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000, +0x00001000, 0x00002000, 0x00003000, 0x00004000, 0x00005000, 0x00006000, +0x00007000, 0x00008000, 0x00009000, 0x0000a000, 0x0000b000, 0x0000c000, +0x0000d000, 0x0000e000, 0x0000f000, 0x00000001, 0x00001001, 0x00002001, +0x00003001, 0x00004001, 0x00005001, 0x00006001, 0x00007001, 0x00008001, +0x00009001, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x0000a001, 0x0000b001, 0x0000c001, 0x0000d001, 0x0000e001, +0x0000f001, 0x00000002, 0x00001002, 0x00002002, 0x00003002, 0x00004002, +0x00005002, 0x00006002, 0x00007002, 0x00008002, 0x00009002, 0x0000a002, +0x0000b002, 0x0000c002, 0x0000d002, 0x0000e002, 0x0000f002, 0x00000003, +0x00001003, 0x00002003, 0x00003003, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff +}; + + +static const uint32_t d2[256] = { +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x00800f00, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00c00f00, +0x00000d00, 0x00400d00, 0x00800d00, 0x00c00d00, 0x00000e00, 0x00400e00, +0x00800e00, 0x00c00e00, 0x00000f00, 0x00400f00, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000, +0x00400000, 0x00800000, 0x00c00000, 0x00000100, 0x00400100, 0x00800100, +0x00c00100, 0x00000200, 0x00400200, 0x00800200, 0x00c00200, 0x00000300, +0x00400300, 0x00800300, 0x00c00300, 0x00000400, 0x00400400, 0x00800400, +0x00c00400, 0x00000500, 0x00400500, 0x00800500, 0x00c00500, 0x00000600, +0x00400600, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x00800600, 0x00c00600, 0x00000700, 0x00400700, 0x00800700, +0x00c00700, 0x00000800, 0x00400800, 0x00800800, 0x00c00800, 0x00000900, +0x00400900, 0x00800900, 0x00c00900, 0x00000a00, 0x00400a00, 0x00800a00, +0x00c00a00, 0x00000b00, 0x00400b00, 0x00800b00, 0x00c00b00, 0x00000c00, +0x00400c00, 0x00800c00, 0x00c00c00, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff +}; + + +static const uint32_t d3[256] = { +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x003e0000, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x003f0000, +0x00340000, 0x00350000, 0x00360000, 0x00370000, 0x00380000, 0x00390000, +0x003a0000, 0x003b0000, 0x003c0000, 0x003d0000, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000, +0x00010000, 0x00020000, 0x00030000, 0x00040000, 0x00050000, 0x00060000, +0x00070000, 0x00080000, 0x00090000, 0x000a0000, 0x000b0000, 0x000c0000, +0x000d0000, 0x000e0000, 0x000f0000, 0x00100000, 0x00110000, 0x00120000, +0x00130000, 0x00140000, 0x00150000, 0x00160000, 0x00170000, 0x00180000, +0x00190000, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x001a0000, 0x001b0000, 0x001c0000, 0x001d0000, 0x001e0000, +0x001f0000, 0x00200000, 0x00210000, 0x00220000, 0x00230000, 0x00240000, +0x00250000, 0x00260000, 0x00270000, 0x00280000, 0x00290000, 0x002a0000, +0x002b0000, 0x002c0000, 0x002d0000, 0x002e0000, 0x002f0000, 0x00300000, +0x00310000, 0x00320000, 0x00330000, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, +0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff +}; + + +#endif diff --git a/vcpkg/ports/modp-base64/portfile.cmake b/vcpkg/ports/modp-base64/portfile.cmake new file mode 100644 index 0000000..2508b54 --- /dev/null +++ b/vcpkg/ports/modp-base64/portfile.cmake @@ -0,0 +1,19 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO client9/stringencoders + REF e1448a9415f4ebf6f559c86718193ba067cbb99d + SHA512 68c9b9a9eb09075c792cfc0a8ce1959c60a86e5256de8568b0cb6934f748fd9e95c5f1801a8982fecac65850a8f2d633a64dc98e4505ee8e6914bd0b0fb996cf + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR} + PREFER_NINJA + OPTIONS -DSOURCE_PATH=${SOURCE_PATH} + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +# Handle copyright +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/mongo-c-driver/CONTROL b/vcpkg/ports/mongo-c-driver/CONTROL new file mode 100644 index 0000000..17df29f --- /dev/null +++ b/vcpkg/ports/mongo-c-driver/CONTROL @@ -0,0 +1,13 @@ +Source: mongo-c-driver +Version: 1.16.1-1 +Build-Depends: libbson, openssl (!windows), zlib +Description: Client library written in C for MongoDB. +Homepage: https://github.com/mongodb/mongo-c-driver + +Feature: snappy +Description: Enables snappy compressor support +Build-Depends: snappy + +Feature: icu +Description: Enable ICU support, necessary to use non-ASCII usernames or passwords +Build-Depends: icu \ No newline at end of file diff --git a/vcpkg/ports/mongo-c-driver/disable-static-when-dynamic-build.patch b/vcpkg/ports/mongo-c-driver/disable-static-when-dynamic-build.patch new file mode 100644 index 0000000..5652d7b --- /dev/null +++ b/vcpkg/ports/mongo-c-driver/disable-static-when-dynamic-build.patch @@ -0,0 +1,61 @@ +diff --git a/src/libmongoc/CMakeLists.txt b/src/libmongoc/CMakeLists.txt +index 797aaec..91d97dc 100644 +--- a/src/libmongoc/CMakeLists.txt ++++ b/src/libmongoc/CMakeLists.txt +@@ -694,6 +694,7 @@ if (WIN32) + set (LIBRARIES ${LIBRARIES} ws2_32) + endif () + ++if (NOT MONGOC_ENABLE_STATIC) + add_library (mongoc_shared SHARED ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) + set_target_properties (mongoc_shared PROPERTIES CMAKE_CXX_VISIBILITY_PRESET hidden) + target_link_libraries (mongoc_shared PRIVATE ${LIBRARIES} PUBLIC ${BSON_LIBRARIES}) +@@ -706,7 +707,7 @@ target_compile_definitions (mongoc_shared PRIVATE MONGOC_COMPILATION) + set_target_properties (mongoc_shared PROPERTIES VERSION 0.0.0 SOVERSION 0) + set_target_properties (mongoc_shared PROPERTIES OUTPUT_NAME "${MONGOC_OUTPUT_BASENAME}-${MONGOC_API_VERSION}") + +-if (MONGOC_ENABLE_STATIC) ++else () + add_library (mongoc_static STATIC ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) + target_link_libraries (mongoc_static ${STATIC_LIBRARIES} ${BSON_LIBRARIES}) + target_include_directories (mongoc_static BEFORE PUBLIC ${MONGOC_INTERNAL_INCLUDE_DIRS}) +@@ -733,8 +734,13 @@ if (ENABLE_APPLE_FRAMEWORK) + endif () + + add_executable (mongoc-stat ${PROJECT_SOURCE_DIR}/../../src/tools/mongoc-stat.c) ++if (NOT MONGOC_ENABLE_STATIC) + target_include_directories (mongoc-stat PRIVATE ${BSON_INCLUDE_DIRS}) + target_link_libraries (mongoc-stat mongoc_shared ${LIBRARIES}) ++else() ++target_include_directories (mongoc-stat PRIVATE ${BSON_INCLUDE_DIRS}) ++target_link_libraries (mongoc-stat mongoc_static ${LIBRARIES}) ++endif() + + # mongoc-stat works if shared memory performance counters are enabled. + if (ENABLE_SHM_COUNTERS STREQUAL "ON") +@@ -980,7 +986,7 @@ file (COPY ${PROJECT_SOURCE_DIR}/tests/x509gen DESTINATION ${PROJECT_BINARY_DIR} + file (COPY ${PROJECT_SOURCE_DIR}/tests/release_files DESTINATION ${PROJECT_BINARY_DIR}/tests) + + if (MONGOC_ENABLE_STATIC) +- set (TARGETS_TO_INSTALL mongoc_shared mongoc_static) ++ set (TARGETS_TO_INSTALL mongoc_static) + else () + set (TARGETS_TO_INSTALL mongoc_shared) + endif () +@@ -1000,6 +1006,7 @@ install ( + ) + + if (MSVC) ++ if (NOT MONGOC_ENABLE_STATIC) + add_custom_command ( + TARGET mongoc_shared + POST_BUILD +@@ -1011,7 +1018,7 @@ if (MSVC) + FILES $/lib$ + DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) +- if (TARGET mongoc_static) ++ else () + add_custom_command ( + TARGET mongoc_static + POST_BUILD diff --git a/vcpkg/ports/mongo-c-driver/fix-arm-build.patch b/vcpkg/ports/mongo-c-driver/fix-arm-build.patch new file mode 100644 index 0000000..8d61b74 --- /dev/null +++ b/vcpkg/ports/mongo-c-driver/fix-arm-build.patch @@ -0,0 +1,24 @@ +diff --git a/src/libmongoc/CMakeLists.txt b/src/libmongoc/CMakeLists.txt +index 91d97dc..ccebc2a 100644 +--- a/src/libmongoc/CMakeLists.txt ++++ b/src/libmongoc/CMakeLists.txt +@@ -698,6 +698,9 @@ if (NOT MONGOC_ENABLE_STATIC) + add_library (mongoc_shared SHARED ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) + set_target_properties (mongoc_shared PROPERTIES CMAKE_CXX_VISIBILITY_PRESET hidden) + target_link_libraries (mongoc_shared PRIVATE ${LIBRARIES} PUBLIC ${BSON_LIBRARIES}) ++if (WIN32) ++ target_link_libraries (mongoc_shared PRIVATE Advapi32) ++endif() + target_include_directories (mongoc_shared BEFORE PUBLIC ${MONGOC_INTERNAL_INCLUDE_DIRS}) + target_include_directories (mongoc_shared PRIVATE ${PRIVATE_ZLIB_INCLUDES}) + target_include_directories (mongoc_shared PRIVATE ${LIBMONGOCRYPT_INCLUDE_DIRECTORIES}) +@@ -710,6 +713,9 @@ set_target_properties (mongoc_shared PROPERTIES OUTPUT_NAME "${MONGOC_OUTPUT_BAS + else () + add_library (mongoc_static STATIC ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) + target_link_libraries (mongoc_static ${STATIC_LIBRARIES} ${BSON_LIBRARIES}) ++ if (WIN32) ++ target_link_libraries (mongoc_static Advapi32) ++ endif() + target_include_directories (mongoc_static BEFORE PUBLIC ${MONGOC_INTERNAL_INCLUDE_DIRS}) + target_include_directories (mongoc_static PRIVATE ${PRIVATE_ZLIB_INCLUDES}) + target_include_directories (mongoc_static PRIVATE ${LIBMONGOCRYPT_INCLUDE_DIRECTORIES}) diff --git a/vcpkg/ports/mongo-c-driver/fix-dependency-libbson.patch b/vcpkg/ports/mongo-c-driver/fix-dependency-libbson.patch new file mode 100644 index 0000000..68e7b2b --- /dev/null +++ b/vcpkg/ports/mongo-c-driver/fix-dependency-libbson.patch @@ -0,0 +1,87 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1a2b7ba..7c939d6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -169,14 +169,6 @@ if (ENABLE_BSON STREQUAL SYSTEM) + endif () + + set (USING_SYSTEM_BSON TRUE) +- if (NOT TARGET mongo::bson_shared) +- message (FATAL_ERROR "System libbson built without shared library target") +- endif () +- set (BSON_LIBRARIES mongo::bson_shared) +- if (NOT TARGET mongo::bson_static) +- message (FATAL_ERROR "System libbson built without static library target") +- endif () +- set (BSON_STATIC_LIBRARIES mongo::bson_static) + endif () + + unset (dist_generated CACHE) +diff --git a/src/libmongoc/CMakeLists.txt b/src/libmongoc/CMakeLists.txt +index 0f9e50c..797aaec 100644 +--- a/src/libmongoc/CMakeLists.txt ++++ b/src/libmongoc/CMakeLists.txt +@@ -700,6 +700,7 @@ target_link_libraries (mongoc_shared PRIVATE ${LIBRARIES} PUBLIC ${BSON_LIBRARIE + target_include_directories (mongoc_shared BEFORE PUBLIC ${MONGOC_INTERNAL_INCLUDE_DIRS}) + target_include_directories (mongoc_shared PRIVATE ${PRIVATE_ZLIB_INCLUDES}) + target_include_directories (mongoc_shared PRIVATE ${LIBMONGOCRYPT_INCLUDE_DIRECTORIES}) ++target_include_directories (mongoc_shared PRIVATE ${BSON_INCLUDE_DIRS}) + target_compile_definitions (mongoc_shared PRIVATE MONGOC_COMPILATION) + + set_target_properties (mongoc_shared PROPERTIES VERSION 0.0.0 SOVERSION 0) +@@ -707,10 +708,11 @@ set_target_properties (mongoc_shared PROPERTIES OUTPUT_NAME "${MONGOC_OUTPUT_BAS + + if (MONGOC_ENABLE_STATIC) + add_library (mongoc_static STATIC ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING}) +- target_link_libraries (mongoc_static ${STATIC_LIBRARIES} ${BSON_STATIC_LIBRARIES}) ++ target_link_libraries (mongoc_static ${STATIC_LIBRARIES} ${BSON_LIBRARIES}) + target_include_directories (mongoc_static BEFORE PUBLIC ${MONGOC_INTERNAL_INCLUDE_DIRS}) + target_include_directories (mongoc_static PRIVATE ${PRIVATE_ZLIB_INCLUDES}) + target_include_directories (mongoc_static PRIVATE ${LIBMONGOCRYPT_INCLUDE_DIRECTORIES}) ++ target_include_directories (mongoc_static PRIVATE ${BSON_INCLUDE_DIRS}) + target_compile_definitions (mongoc_static + PUBLIC MONGOC_STATIC ${BSON_STATIC_PUBLIC_DEFINITIONS} + PRIVATE MONGOC_COMPILATION +@@ -731,6 +733,7 @@ if (ENABLE_APPLE_FRAMEWORK) + endif () + + add_executable (mongoc-stat ${PROJECT_SOURCE_DIR}/../../src/tools/mongoc-stat.c) ++target_include_directories (mongoc-stat PRIVATE ${BSON_INCLUDE_DIRS}) + target_link_libraries (mongoc-stat mongoc_shared ${LIBRARIES}) + + # mongoc-stat works if shared memory performance counters are enabled. +diff --git a/src/libmongoc/build/cmake/libmongoc-1.0-config.cmake.in b/src/libmongoc/build/cmake/libmongoc-1.0-config.cmake.in +index feeca02..62aa21a 100644 +--- a/src/libmongoc/build/cmake/libmongoc-1.0-config.cmake.in ++++ b/src/libmongoc/build/cmake/libmongoc-1.0-config.cmake.in +@@ -19,7 +19,7 @@ set (MONGOC_MINOR_VERSION @MONGOC_MINOR_VERSION@) + set (MONGOC_MICRO_VERSION @MONGOC_MICRO_VERSION@) + set (MONGOC_VERSION @MONGOC_VERSION@) + +-find_package (libbson-1.0 "@MONGOC_MAJOR_VERSION@.@MONGOC_MINOR_VERSION@" REQUIRED) ++find_package (bson-1.0 "@MONGOC_MAJOR_VERSION@.@MONGOC_MINOR_VERSION@" REQUIRED) + + @PACKAGE_INIT@ + +diff --git a/src/libmongoc/build/cmake/libmongoc-static-1.0-config.cmake.in b/src/libmongoc/build/cmake/libmongoc-static-1.0-config.cmake.in +index 6f05b0c..113804e 100644 +--- a/src/libmongoc/build/cmake/libmongoc-static-1.0-config.cmake.in ++++ b/src/libmongoc/build/cmake/libmongoc-static-1.0-config.cmake.in +@@ -19,7 +19,7 @@ set (MONGOC_STATIC_MINOR_VERSION @MONGOC_MINOR_VERSION@) + set (MONGOC_STATIC_MICRO_VERSION @MONGOC_MICRO_VERSION@) + set (MONGOC_STATIC_VERSION @MONGOC_VERSION@) + +-find_package (libbson-static-1.0 "@MONGOC_MAJOR_VERSION@.@MONGOC_MINOR_VERSION@" REQUIRED) ++find_package (bson-1.0 "@MONGOC_MAJOR_VERSION@.@MONGOC_MINOR_VERSION@" REQUIRED) + + @PACKAGE_INIT@ + +@@ -57,3 +57,7 @@ foreach (LIB @SASL_LIBRARIES@ @SSL_LIBRARIES@ @SHM_LIBRARIES@ @ZLIB_LIBRARIES@ + endforeach () + + set (MONGOC_STATIC_DEFINITIONS MONGOC_STATIC ${BSON_STATIC_DEFINITIONS}) ++ ++set (MONGOC_INCLUDE_DIRS ${MONGOC_STATIC_INCLUDE_DIRS}) ++set (MONGOC_LIBRARIES ${MONGOC_STATIC_LIBRARIES}) ++set (MONGOC_DEFINITIONS ${MONGOC_STATIC_DEFINITIONS}) +\ No newline at end of file diff --git a/vcpkg/ports/mongo-c-driver/portfile.cmake b/vcpkg/ports/mongo-c-driver/portfile.cmake new file mode 100644 index 0000000..3516886 --- /dev/null +++ b/vcpkg/ports/mongo-c-driver/portfile.cmake @@ -0,0 +1,136 @@ +# This port needs to be updated at the same time as libbson +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mongodb/mongo-c-driver + REF 99d422877c5b5ea52006c13ee3b48297251b2b2d # debian/1.16.1 + SHA512 e2f129439ff3697981774e0de35586a6afe98838acfc52d8a115bcb298350f2779b886dc6b27130e78b3b81f9b0a85b2bc6bcef246f9685c05f6789747c4739d + HEAD_REF master + PATCHES + fix-dependency-libbson.patch + disable-static-when-dynamic-build.patch + fix-arm-build.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + "snappy" ENABLE_SNAPPY + "icu" ENABLE_ICU +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(ENABLE_STATIC ON) +else() + set(ENABLE_STATIC OFF) +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + set(ENABLE_SSL "WINDOWS") +else() + set(ENABLE_SSL "OPENSSL") +endif() + +file(READ ${CMAKE_CURRENT_LIST_DIR}/CONTROL _contents) +string(REGEX MATCH "\nVersion:[ ]*[^ \n]+" _contents "${_contents}") +string(REGEX REPLACE ".+Version:[ ]*([\\.0-9]+).*" "\\1" BUILD_VERSION "${_contents}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBSON_ROOT_DIR=${CURRENT_INSTALLED_DIR} + -DENABLE_MONGOC=ON + -DENABLE_BSON=SYSTEM + -DENABLE_TESTS=OFF + -DENABLE_EXAMPLES=OFF + -DENABLE_SSL=${ENABLE_SSL} + -DENABLE_ZLIB=SYSTEM + -DENABLE_STATIC=${ENABLE_STATIC} + -DBUILD_VERSION=${BUILD_VERSION} + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +set(PORT_POSTFIX "1.0") + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libmongoc-static-${PORT_POSTFIX} TARGET_PATH share/libmongoc-${PORT_POSTFIX}) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libmongoc-${PORT_POSTFIX} TARGET_PATH share/libmongoc-${PORT_POSTFIX}) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# This rename is needed because the official examples expect to use #include +# See Microsoft/vcpkg#904 +file(RENAME + ${CURRENT_PACKAGES_DIR}/include/libmongoc-${PORT_POSTFIX} + ${CURRENT_PACKAGES_DIR}/temp) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include) +file(RENAME ${CURRENT_PACKAGES_DIR}/temp ${CURRENT_PACKAGES_DIR}/include) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_TARGET_IS_UWP) + file(RENAME + ${CURRENT_PACKAGES_DIR}/lib/libmongoc-static-1.0.a + ${CURRENT_PACKAGES_DIR}/lib/libmongoc-1.0.a) + file(RENAME + ${CURRENT_PACKAGES_DIR}/debug/lib/libmongoc-static-1.0.a + ${CURRENT_PACKAGES_DIR}/debug/lib/libmongoc-1.0.a) + else() + file(RENAME + ${CURRENT_PACKAGES_DIR}/lib/mongoc-static-1.0.lib + ${CURRENT_PACKAGES_DIR}/lib/mongoc-1.0.lib) + file(RENAME + ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-static-1.0.lib + ${CURRENT_PACKAGES_DIR}/debug/lib/mongoc-1.0.lib) + endif() + + # drop the __declspec(dllimport) when building static + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/mongoc/mongoc-macros.h + "define MONGOC_API __declspec(dllimport)" "define MONGOC_API") + + file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmongoc-${PORT_POSTFIX}/libmongoc-static-${PORT_POSTFIX}-config.cmake + ${CURRENT_PACKAGES_DIR}/share/libmongoc-${PORT_POSTFIX}/libmongoc-${PORT_POSTFIX}-config.cmake) + file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmongoc-${PORT_POSTFIX}/libmongoc-static-${PORT_POSTFIX}-config-version.cmake + ${CURRENT_PACKAGES_DIR}/share/libmongoc-${PORT_POSTFIX}/libmongoc-${PORT_POSTFIX}-config-version.cmake) + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) +endif() + +# Create cmake files for _both_ find_package(mongo-c-driver) and find_package(libmongoc-static-1.0)/find_package(libmongoc-1.0) +file(READ ${CURRENT_PACKAGES_DIR}/share/libmongoc-${PORT_POSTFIX}/libmongoc-${PORT_POSTFIX}-config.cmake LIBMONGOC_CONFIG_CMAKE) + +# Patch: Set _IMPORT_PREFIX and replace PACKAGE_PREFIX_DIR +string(REPLACE +[[ +get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE) +]] +[[ +# VCPKG PATCH SET IMPORT_PREFIX +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() +]] + LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") +string(REPLACE [[PACKAGE_PREFIX_DIR]] [[_IMPORT_PREFIX]] LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") + +string(REPLACE "/include/libmongoc-1.0" "/include" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") +string(REPLACE "mongoc-static-1.0" "mongoc-1.0" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") +#Something similar is probably required for windows too! +if (NOT VCPKG_TARGET_IS_WINDOWS) + string(REPLACE "/lib/libssl.a" "\$<\$:/debug>/lib/libssl.a" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") + string(REPLACE "/lib/libcrypto.a" "\$<\$:/debug>/lib/libcrypto.a" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") + string(REPLACE "/lib/libz.a" "\$<\$:/debug>/lib/libz.a" LIBMONGOC_CONFIG_CMAKE "${LIBMONGOC_CONFIG_CMAKE}") +endif() + +file(WRITE ${CURRENT_PACKAGES_DIR}/share/libmongoc-${PORT_POSTFIX}/libmongoc-${PORT_POSTFIX}-config.cmake "${LIBMONGOC_CONFIG_CMAKE}") + +file(COPY ${SOURCE_PATH}/THIRD_PARTY_NOTICES DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/mongo-c-driver/usage b/vcpkg/ports/mongo-c-driver/usage new file mode 100644 index 0000000..d334796 --- /dev/null +++ b/vcpkg/ports/mongo-c-driver/usage @@ -0,0 +1,7 @@ +The package mongo-c-driver is compatible with built-in CMake targets: + + find_package(libmongoc-1.0 CONFIG REQUIRED) + + target_include_directories(main PRIVATE ${MONGOC_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${MONGOC_LIBRARIES}) + target_compile_definitions(main PRIVATE ${MONGOC_DEFINITIONS}) diff --git a/vcpkg/ports/mongo-cxx-driver/CONTROL b/vcpkg/ports/mongo-cxx-driver/CONTROL new file mode 100644 index 0000000..ecd41b4 --- /dev/null +++ b/vcpkg/ports/mongo-cxx-driver/CONTROL @@ -0,0 +1,17 @@ +Source: mongo-cxx-driver +Version: 3.4.0-5 +Build-Depends: libbson, mongo-c-driver, boost-smart-ptr, boost-optional, boost-utility +Homepage: https://github.com/mongodb/mongo-cxx-driver +Description: MongoDB C++ Driver. + +Feature: mnmlstc +Description: Use MNMLSTC/core C++17 polyfill. + +Feature: system-mnmlstc +Description: Use an available version of MNMLSTC on your system as C++17 polyfill. + +Feature: boost +Description: Use Boost C++17 polyfill. The only option under MSVC. + +Feature: std-experimental +Description: Use optional and string_view from std::experimental. diff --git a/vcpkg/ports/mongo-cxx-driver/disable-c2338-mongo-cxx-driver.patch b/vcpkg/ports/mongo-cxx-driver/disable-c2338-mongo-cxx-driver.patch new file mode 100644 index 0000000..04bbcd6 --- /dev/null +++ b/vcpkg/ports/mongo-cxx-driver/disable-c2338-mongo-cxx-driver.patch @@ -0,0 +1,11 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index a019eb1..8ab0f71 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -14,5 +14,6 @@ + + add_definitions(-DMONGO_CXX_DRIVER_COMPILING) + add_definitions(-D_SCL_SECURE_NO_WARNINGS) ++add_definitions(-D_DISABLE_EXTENDED_ALIGNED_STORAGE) + add_subdirectory(bsoncxx) + add_subdirectory(mongocxx) diff --git a/vcpkg/ports/mongo-cxx-driver/disable_test_and_example.patch b/vcpkg/ports/mongo-cxx-driver/disable_test_and_example.patch new file mode 100644 index 0000000..2c24024 --- /dev/null +++ b/vcpkg/ports/mongo-cxx-driver/disable_test_and_example.patch @@ -0,0 +1,42 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c6f56e4..5601f90 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -89,6 +89,8 @@ endif() + + set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + ++if(0) ++ + add_custom_target(hugo_dir + COMMAND ${CMAKE_COMMAND} -E make_directory hugo + ) +@@ -147,6 +149,8 @@ add_custom_target(docs + + set(THIRD_PARTY_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/third_party) + ++endif() ++ + enable_testing() + + add_subdirectory(src) +diff --git a/src/bsoncxx/CMakeLists.txt b/src/bsoncxx/CMakeLists.txt +index 50085d0..5966d21 100644 +--- a/src/bsoncxx/CMakeLists.txt ++++ b/src/bsoncxx/CMakeLists.txt +@@ -249,4 +249,4 @@ install( + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PKG}-${BSONCXX_VERSION} + ) + +-add_subdirectory(test) ++# add_subdirectory(test) +diff --git a/src/mongocxx/CMakeLists.txt b/src/mongocxx/CMakeLists.txt +index 3cba62d..64ff936 100644 +--- a/src/mongocxx/CMakeLists.txt ++++ b/src/mongocxx/CMakeLists.txt +@@ -259,4 +259,4 @@ install( + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PKG}-${MONGOCXX_VERSION} + ) + +-add_subdirectory(test) ++# add_subdirectory(test) diff --git a/vcpkg/ports/mongo-cxx-driver/fix-dependency-libbson.patch b/vcpkg/ports/mongo-cxx-driver/fix-dependency-libbson.patch new file mode 100644 index 0000000..405919c --- /dev/null +++ b/vcpkg/ports/mongo-cxx-driver/fix-dependency-libbson.patch @@ -0,0 +1,25 @@ +diff --git a/src/bsoncxx/CMakeLists.txt b/src/bsoncxx/CMakeLists.txt +index 69b53b3..655b33a 100644 +--- a/src/bsoncxx/CMakeLists.txt ++++ b/src/bsoncxx/CMakeLists.txt +@@ -78,15 +78,15 @@ set(LIBBSON_REQUIRED_VERSION 1.13.0) + set(LIBBSON_REQUIRED_ABI_VERSION 1.0) + + if (BUILD_SHARED_LIBS) +- find_package(libbson-${LIBBSON_REQUIRED_ABI_VERSION} ${LIBBSON_REQUIRED_VERSION} REQUIRED) ++ find_package(bson-${LIBBSON_REQUIRED_ABI_VERSION} ${LIBBSON_REQUIRED_VERSION} CONFIG REQUIRED) + set(libbson_libraries ${BSON_LIBRARIES}) + set(libbson_include_directories ${BSON_INCLUDE_DIRS}) + set(libbson_definitions ${BSON_DEFINITIONS}) + else() +- find_package(libbson-static-${LIBBSON_REQUIRED_ABI_VERSION} ${LIBBSON_REQUIRED_VERSION} REQUIRED) +- set(libbson_libraries ${BSON_STATIC_LIBRARIES}) +- set(libbson_include_directories ${BSON_STATIC_INCLUDE_DIRS}) +- set(libbson_definitions ${BSON_STATIC_DEFINITIONS}) ++ find_package(bson-${LIBBSON_REQUIRED_ABI_VERSION} ${LIBBSON_REQUIRED_VERSION} CONFIG REQUIRED) ++ set(libbson_libraries ${BSON_LIBRARIES}) ++ set(libbson_include_directories ${BSON_INCLUDE_DIRS}) ++ set(libbson_definitions ${BSON_DEFINITIONS}) + endif() + + add_subdirectory(third_party) diff --git a/vcpkg/ports/mongo-cxx-driver/fix-dependency-mongocdriver.patch b/vcpkg/ports/mongo-cxx-driver/fix-dependency-mongocdriver.patch new file mode 100644 index 0000000..99a6a8e --- /dev/null +++ b/vcpkg/ports/mongo-cxx-driver/fix-dependency-mongocdriver.patch @@ -0,0 +1,19 @@ +diff --git a/src/mongocxx/CMakeLists.txt b/src/mongocxx/CMakeLists.txt +index 64ff936..e4d4e14 100644 +--- a/src/mongocxx/CMakeLists.txt ++++ b/src/mongocxx/CMakeLists.txt +@@ -39,10 +39,10 @@ if (BUILD_SHARED_LIBS) + set(libmongoc_include_directories ${MONGOC_INCLUDE_DIRS}) + set(libmongoc_definitions ${MONGOC_DEFINITIONS}) + else() +- find_package(libmongoc-static-${LIBMONGOC_REQUIRED_ABI_VERSION} ${LIBMONGOC_REQUIRED_VERSION} REQUIRED) +- set(libmongoc_libraries ${MONGOC_STATIC_LIBRARIES}) +- set(libmongoc_include_directories ${MONGOC_STATIC_INCLUDE_DIRS}) +- set(libmongoc_definitions ${MONGOC_STATIC_DEFINITIONS}) ++ find_package(libmongoc-${LIBMONGOC_REQUIRED_ABI_VERSION} ${LIBMONGOC_REQUIRED_VERSION} REQUIRED) ++ set(libmongoc_libraries ${MONGOC_LIBRARIES}) ++ set(libmongoc_include_directories ${MONGOC_INCLUDE_DIRS}) ++ set(libmongoc_definitions ${MONGOC_DEFINITIONS}) + endif() + + add_subdirectory(config) diff --git a/vcpkg/ports/mongo-cxx-driver/fix-uwp.patch b/vcpkg/ports/mongo-cxx-driver/fix-uwp.patch new file mode 100644 index 0000000..fffaa83 --- /dev/null +++ b/vcpkg/ports/mongo-cxx-driver/fix-uwp.patch @@ -0,0 +1,11 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 40cd480..08cd37f 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -13,5 +13,6 @@ + # limitations under the License. + + add_definitions(-DMONGO_CXX_DRIVER_COMPILING) ++add_definitions(-D_SCL_SECURE_NO_WARNINGS) + add_subdirectory(bsoncxx) + add_subdirectory(mongocxx) diff --git a/vcpkg/ports/mongo-cxx-driver/github-654.patch b/vcpkg/ports/mongo-cxx-driver/github-654.patch new file mode 100644 index 0000000..f0eda29 --- /dev/null +++ b/vcpkg/ports/mongo-cxx-driver/github-654.patch @@ -0,0 +1,30 @@ +From e1a92d8bf8f07abc89350a956819b78df05bc4fe Mon Sep 17 00:00:00 2001 +From: Billy Robert O'Neal III +Date: Mon, 25 May 2020 20:47:58 -0700 +Subject: [PATCH] Disable trivially_constructible test for atomic on MSVC++. + +MSVC++ implements P0883 unconditionally, which changes the rules for std::atomic. It removes atomic's trivial constructor, and makes the default constructor value initialize the T. + +Note that Mongo was not following the C++11 rules, because it used the atomic before calling atomic_init first. MSVC++ never implemented the C++11 rules and previously default initialized the T. + +All versions of MSVC++ will provide constant initialization of the guarded value "current_instance". In old versions, atomic didn't implement P0883 due to bugs in the constexpr evaluator; in current versions the constexpr evaluator was fixed and atomic value initializes unconditionally. Therefore, this PR disables the check whenever MSVC++'s standard library is detected. + +See https://github.com/microsoft/STL/issues/661 for further discussion. +--- + src/mongocxx/instance.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/mongocxx/instance.cpp b/src/mongocxx/instance.cpp +index e67d41ec7..6eb456c65 100644 +--- a/src/mongocxx/instance.cpp ++++ b/src/mongocxx/instance.cpp +@@ -75,7 +75,8 @@ typename std::aligned_storage::type sentine + std::atomic current_instance{nullptr}; + static_assert(std::is_standard_layout::value, + "Must be standard layout"); +-#if (!defined(__GNUC__) || (defined(__clang__) && !defined(__GLIBCXX__))) || (__GNUC__ >= 5) ++#if (!defined(_MSVC_STL_VERSION)) \ ++ && ((!defined(__GNUC__) || (defined(__clang__) && !defined(__GLIBCXX__))) || (__GNUC__ >= 5)) + static_assert(std::is_trivially_constructible::value, + "Must be trivially constructible"); + #endif diff --git a/vcpkg/ports/mongo-cxx-driver/portfile.cmake b/vcpkg/ports/mongo-cxx-driver/portfile.cmake new file mode 100644 index 0000000..695843e --- /dev/null +++ b/vcpkg/ports/mongo-cxx-driver/portfile.cmake @@ -0,0 +1,117 @@ +set(VERSION_MAJOR 3) +set(VERSION_MINOR 4) +set(VERSION_PATCH 0) +set(VERSION_FULL ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mongodb/mongo-cxx-driver + REF r${VERSION_FULL} + SHA512 28c052904f1b456b92482097166238eae1ad50c3ed207496f09366b46f2c9465c7e98c7219f4f10314e4d8fdd01c36b70a2221891bb75231adcc1edf013d43ce + HEAD_REF master + PATCHES + fix-uwp.patch + disable-c2338-mongo-cxx-driver.patch + disable_test_and_example.patch + fix-dependency-libbson.patch + fix-dependency-mongocdriver.patch + github-654.patch +) + +if ("mnmlstc" IN_LIST FEATURES) + if (VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "Feature mnmlstc only support UNIX") + endif() + set(BSONCXX_POLY MNMLSTC) +elseif ("system-mnmlstc" IN_LIST FEATURES) + message("Please make sure you have mnmlstc installed via the package manager") + set(BSONCXX_POLY SYSTEM_MNMLSTC) +elseif ("boost" IN_LIST FEATURES) + set(BSONCXX_POLY BOOST) +elseif("std-experimental" IN_LIST FEATURES) + set(BSONCXX_POLY STD_EXPERIMENTAL) +else() + if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(BSONCXX_POLY BOOST) + else() + set(BSONCXX_POLY MNMLSTC) + endif() +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DLIBBSON_DIR=${CURRENT_INSTALLED_DIR} + -DLIBMONGOC_DIR=${CURRENT_INSTALLED_DIR} + -DMONGOCXX_HEADER_INSTALL_DIR=include + -DBSONCXX_HEADER_INSTALL_DIR=include + -DBSONCXX_POLY_USE_${BSONCXX_POLY}=1 +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(WRITE ${CURRENT_PACKAGES_DIR}/share/libbsoncxx/libbsoncxx-config.cmake +" +set(LIBBSONCXX_VERSION_MAJOR ${VERSION_MAJOR}) +set(LIBBSONCXX_VERSION_MINOR ${VERSION_MINOR}) +set(LIBBSONCXX_VERSION_PATCH ${VERSION_PATCH}) +set(LIBBSONCXX_PACKAGE_VERSION ${VERSION_FULL}) + +get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/../../\" ABSOLUTE) + +set(LIBBSONCXX_INCLUDE_DIRS \"\${PACKAGE_PREFIX_DIR}/include\") +find_library(LIBBSONCXX_LIBRARY_PATH_RELEASE bsoncxx bsoncxx-static PATHS \"\${PACKAGE_PREFIX_DIR}/lib\" NO_DEFAULT_PATH) +find_library(LIBBSONCXX_LIBRARY_PATH_DEBUG bsoncxx bsoncxx-static PATHS \"\${PACKAGE_PREFIX_DIR}/debug/lib\" NO_DEFAULT_PATH) +set(LIBBSONCXX_LIBRARIES optimized \${LIBBSONCXX_LIBRARY_PATH_RELEASE} debug \${LIBBSONCXX_LIBRARY_PATH_DEBUG}) +" +) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/libmongocxx/libmongocxx-config.cmake +" +set(LIBMONGOCXX_VERSION_MAJOR ${VERSION_MAJOR}) +set(LIBMONGOCXX_VERSION_MINOR ${VERSION_MINOR}) +set(LIBMONGOCXX_VERSION_PATCH ${VERSION_PATCH}) +set(LIBMONGOCXX_PACKAGE_VERSION ${VERSION_FULL}) + +include(CMakeFindDependencyMacro) + +find_dependency(libbsoncxx) + +get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/../../\" ABSOLUTE) + +set(LIBMONGOCXX_INCLUDE_DIRS \"\${PACKAGE_PREFIX_DIR}/include\" \${LIBBSONCXX_INCLUDE_DIRS}) +find_library(LIBMONGOCXX_LIBRARY_PATH_RELEASE NAMES mongocxx mongocxx-static PATHS \"\${PACKAGE_PREFIX_DIR}/lib\" NO_DEFAULT_PATH) +find_library(LIBMONGOCXX_LIBRARY_PATH_DEBUG NAMES mongocxx mongocxx-static PATHS \"\${PACKAGE_PREFIX_DIR}/debug/lib\" NO_DEFAULT_PATH) +set(LIBMONGOCXX_LIBRARIES optimized \${LIBMONGOCXX_LIBRARY_PATH_RELEASE} debug \${LIBMONGOCXX_LIBRARY_PATH_DEBUG} \${LIBBSONCXX_LIBRARIES}) +" +) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) + +if (NOT BSONCXX_POLY STREQUAL MNMLSTC) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/bsoncxx/third_party) +endif() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/include/bsoncxx/cmake + ${CURRENT_PACKAGES_DIR}/include/bsoncxx/config/private + ${CURRENT_PACKAGES_DIR}/include/bsoncxx/private + ${CURRENT_PACKAGES_DIR}/include/bsoncxx/test + ${CURRENT_PACKAGES_DIR}/include/bsoncxx/test_util + + ${CURRENT_PACKAGES_DIR}/include/mongocxx/cmake + ${CURRENT_PACKAGES_DIR}/include/mongocxx/config/private + ${CURRENT_PACKAGES_DIR}/include/mongocxx/exception/private + ${CURRENT_PACKAGES_DIR}/include/mongocxx/options/private + ${CURRENT_PACKAGES_DIR}/include/mongocxx/gridfs/private + ${CURRENT_PACKAGES_DIR}/include/mongocxx/private + ${CURRENT_PACKAGES_DIR}/include/mongocxx/test + ${CURRENT_PACKAGES_DIR}/include/mongocxx/test_util + + ${CURRENT_PACKAGES_DIR}/debug/include +) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(COPY ${SOURCE_PATH}/THIRD-PARTY-NOTICES DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/mongoose/CMakeLists.txt b/vcpkg/ports/mongoose/CMakeLists.txt new file mode 100644 index 0000000..ae2cce3 --- /dev/null +++ b/vcpkg/ports/mongoose/CMakeLists.txt @@ -0,0 +1,28 @@ +cmake_minimum_required(VERSION 3.14) + +project(mongoose C) + +include(GNUInstallDirs) + +option(ENABLE_SSL "Build with openssl support" OFF) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +add_library(mongoose mongoose.c) +target_include_directories(mongoose PUBLIC $) +set_target_properties(mongoose PROPERTIES PUBLIC_HEADER mongoose.h) + +if (ENABLE_SSL) + find_package(OpenSSL REQUIRED) + target_compile_options(mongoose PRIVATE -DMG_ENABLE_SSL) + target_link_libraries(mongoose PRIVATE OpenSSL::SSL OpenSSL::Crypto) +endif() + +install(TARGETS mongoose EXPORT unofficial-mongoose-config) + +install( + EXPORT unofficial-mongoose-config + NAMESPACE unofficial::mongoose:: + DESTINATION share/unofficial-mongoose + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) diff --git a/vcpkg/ports/mongoose/CONTROL b/vcpkg/ports/mongoose/CONTROL new file mode 100644 index 0000000..a6c7f86 --- /dev/null +++ b/vcpkg/ports/mongoose/CONTROL @@ -0,0 +1,9 @@ +Source: mongoose +Version: 6.15-2 +Description: Embedded web server / embedded networking library +Homepage: https://cesanta.com/ +Supports: !uwp + +Feature: ssl +Build-Depends: openssl +Description: Build with openssl diff --git a/vcpkg/ports/mongoose/portfile.cmake b/vcpkg/ports/mongoose/portfile.cmake new file mode 100644 index 0000000..d8dbbad --- /dev/null +++ b/vcpkg/ports/mongoose/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cesanta/mongoose + REF 6.15 + SHA512 d736aeb9ccb7a67fb8180ed324d3fa26e005bfc2ede1db00d73349976bfcfb45489ce3efb178817937fae3cd9f6a6e9c4b620af8517e3ace9c53b9541539bdde + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + ssl ENABLE_SSL +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/monkeys-audio/CONTROL b/vcpkg/ports/monkeys-audio/CONTROL new file mode 100644 index 0000000..388299f --- /dev/null +++ b/vcpkg/ports/monkeys-audio/CONTROL @@ -0,0 +1,9 @@ +Source: monkeys-audio +Version: 5.48 +Homepage: https://monkeysaudio.com +Description: Monkey's Audio is an excellent audio compression tool which has multiple advantages over traditional methods. + Audio files compressed with it end with .ape extension. +Supports: !(uwp|osx|linux) + +Feature: tools +Description: Build monkeys-audio tools diff --git a/vcpkg/ports/monkeys-audio/fix-project-config.patch b/vcpkg/ports/monkeys-audio/fix-project-config.patch new file mode 100644 index 0000000..08351e1 --- /dev/null +++ b/vcpkg/ports/monkeys-audio/fix-project-config.patch @@ -0,0 +1,16 @@ +diff --git a/Source/Projects/VS2019/MACDll/MACDll.vcxproj b/Source/Projects/VS2019/MACDll/MACDll.vcxproj +index 4e84b52..79882b0 100644 +--- a/Source/Projects/VS2019/MACDll/MACDll.vcxproj ++++ b/Source/Projects/VS2019/MACDll/MACDll.vcxproj +@@ -75,10 +75,9 @@ + <_ProjectFileVersion>11.0.50727.1 + + +- C:\Applications\Winamp\plugins\ ++ $(Configuration)\ + $(Configuration)\ + true +- in_ape.dll + + + $(Configuration)\ diff --git a/vcpkg/ports/monkeys-audio/license b/vcpkg/ports/monkeys-audio/license new file mode 100644 index 0000000..a4ab2f0 --- /dev/null +++ b/vcpkg/ports/monkeys-audio/license @@ -0,0 +1,42 @@ +Monkey's Audio Program License Agreement +======================================== + +1. Monkey's Audio is completely free for personal, educational, or commercial use. + +2. Although the software has been tested thoroughly, the author is in no way responsible for + damages due to bugs or misuse. + +3. The redistribution of Monkey's Audio is only allowed in cases where the original installer and + components therein have not been modified. + +4. The use of Monkey's Audio or any component thereof from another program requires + compliance with the 'Monkey's Audio SDK and Source Code License Agreement'. + +5. Installing and using Monkey's Audio signifies the acceptance of these terms. If you do not + agree with any of the above terms, you must cease using Monkey's Audio and remove it from + your storage device. + + +Monkey's Audio SDK and Source Code License Agreement +==================================================== + +1. The Monkey's Audio SDK and source code can be freely used to add APE format playback, + encoding, or tagging support to any product, free or commercial. + +2. Monkey's Audio source can be included in GPL and open-source software, although Monkey's + Audio itself will not be subjected to external licensing requirements or other viral source + restrictions. + +3. Code changes and improvements must be contributed back to the Monkey's Audio project or + made freely available, unless exempted by written consent of the author. + +4. Any source code, ideas, or libraries used must be plainly acknowledged in the software using + the code. + +5. Although the software has been tested thoroughly, the author is in no way responsible for + damages due to bugs or misuse. + +6. If you do not completely agree with all of the previous stipulations, you must cease using this + source code and remove it from your storage device. + +All materials and programs copyrighted ©2000-2018 by Matt Ashland diff --git a/vcpkg/ports/monkeys-audio/portfile.cmake b/vcpkg/ports/monkeys-audio/portfile.cmake new file mode 100644 index 0000000..f0edaaf --- /dev/null +++ b/vcpkg/ports/monkeys-audio/portfile.cmake @@ -0,0 +1,70 @@ +vcpkg_fail_port_install(ON_TARGET "UWP" "OSX" "Linux") + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) + +set(MA_VERSION 548) + +vcpkg_download_distfile(ARCHIVE + URLS "https://monkeysaudio.com/files/MAC_SDK_${MA_VERSION}.zip" + FILENAME "MAC_SDK_${MA_VERSION}.zip" + SHA512 036c75f4cc8dc54837b2f9f822d260ebdbed918dff9ac744746e2786d13a33364d0cd7f380f015e89eaf5ebedd7180df979dfd15cb8f0160e339fafebc93f4ba +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL + PATCHES fix-project-config.patch +) + +file(REMOVE_RECURSE + ${SOURCE_PATH}/Shared/32 + ${SOURCE_PATH}/Shared/64 +) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(PLATFORM Win32) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(PLATFORM x64) +else() + message(FATAL_ERROR "Unsupported architecture") +endif() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH Source/Projects/VS2019/MACDll/MACDll.vcxproj + PLATFORM ${PLATFORM} + ) +else() + vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH Source/Projects/VS2019/MACLib/MACLib.vcxproj + PLATFORM ${PLATFORM} + ) +endif() + +if ("tools" IN_LIST FEATURES) + vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH Source/Projects/VS2019/Console/Console.vcxproj + PLATFORM ${PLATFORM} + ) + + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/Console.lib ${CURRENT_PACKAGES_DIR}/debug/lib/Console.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/tools/monkeys-audio/Console.exe ${CURRENT_PACKAGES_DIR}/tools/monkeys-audio/mac.exe) + + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) +endif() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/MACLib.lib ${CURRENT_PACKAGES_DIR}/debug/lib/MACLib.lib) +endif() + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/Shared/ + DESTINATION ${CURRENT_PACKAGES_DIR}/include/monkeys-audio + FILES_MATCHING PATTERN "*.h") +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/monkeys-audio/MACDll.h) + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/moos-core/CONTROL b/vcpkg/ports/moos-core/CONTROL new file mode 100644 index 0000000..15a5a5e --- /dev/null +++ b/vcpkg/ports/moos-core/CONTROL @@ -0,0 +1,4 @@ +Source: moos-core +Version: 10.4.0-4 +Description: A very light weight, easy to use middleware. +Homepage: https://sites.google.com/site/moossoftware/ diff --git a/vcpkg/ports/moos-core/cmake_fix.patch b/vcpkg/ports/moos-core/cmake_fix.patch new file mode 100644 index 0000000..96c569c --- /dev/null +++ b/vcpkg/ports/moos-core/cmake_fix.patch @@ -0,0 +1,48 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 75f367f..6ef3dc2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -190,7 +190,7 @@ add_subdirectory(Core) + export( + TARGETS MOOS + NAMESPACE MOOS:: +- FILE UseMOOS.cmake ++ FILE UseMOOSTargets.cmake + ) + + # Support existing projects that expect to find MOOS_LIBRARIES and +@@ -222,7 +222,7 @@ set(PROJECT_CONFIG_PATH "lib/cmake/MOOS") + install( + EXPORT MOOS + NAMESPACE MOOS:: +- FILE UseMOOS.cmake ++ FILE UseMOOSTargets.cmake + DESTINATION ${PROJECT_CONFIG_PATH} + ) + +diff --git a/Core/libMOOS/CMakeLists.txt b/Core/libMOOS/CMakeLists.txt +index b74a30f..492df50 100644 +--- a/Core/libMOOS/CMakeLists.txt ++++ b/Core/libMOOS/CMakeLists.txt +@@ -196,7 +196,7 @@ mark_as_advanced(TIME_WARP_AGGLOMERATION_CONSTANT) + install( + DIRECTORY ${INCLUDE_ROOTS} + DESTINATION . +- FILES_MATCHING PATTERN "*.h" PATTERN "*.hxx" ++ FILES_MATCHING PATTERN "*.h" PATTERN "*.hxx" PATTERN "*.hpp" + ) + + # install libraries +diff --git a/MOOSConfig.cmake.in b/MOOSConfig.cmake.in +index 10af599..dff769a 100644 +--- a/MOOSConfig.cmake.in ++++ b/MOOSConfig.cmake.in +@@ -2,7 +2,7 @@ + + # Pick up the auto-generated file which knows how to add the imported library + # targets for the libraries that MOOS exports. +-set(exports_file "${CMAKE_CURRENT_LIST_DIR}/UseMOOS.cmake") ++set(exports_file "${CMAKE_CURRENT_LIST_DIR}/UseMOOSTargets.cmake") + include(${exports_file}) + + include(FindPackageHandleStandardArgs) diff --git a/vcpkg/ports/moos-core/portfile.cmake b/vcpkg/ports/moos-core/portfile.cmake new file mode 100644 index 0000000..663ad6d --- /dev/null +++ b/vcpkg/ports/moos-core/portfile.cmake @@ -0,0 +1,32 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO themoos/core-moos + REF v10.4.0 + SHA512 8a82074bd219bbedbe56c2187afe74a55a252b0654a675c64d1f75e62353b0874e7b405d9f677fadb297e955d11aea50a07e8f5f3546be3c4ddab76fe356a51e + HEAD_REF master + PATCHES + cmake_fix.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_ENABLE_EXPORT=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/MOOS) + +# Stage tools +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/tools/${PORT}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/debug/include) + +# Put the licence file where vcpkg expects it +file(COPY ${SOURCE_PATH}/Core/GPLCore.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/vcpkg/ports/moos-essential/CONTROL b/vcpkg/ports/moos-essential/CONTROL new file mode 100644 index 0000000..32fd954 --- /dev/null +++ b/vcpkg/ports/moos-essential/CONTROL @@ -0,0 +1,5 @@ +Source: moos-essential +Version: 10.0.1-2 +Description: a set of useful applications that leverage the core-moos communications layer. +Homepage: https://sites.google.com/site/moossoftware/ +Build-Depends: moos-core diff --git a/vcpkg/ports/moos-essential/fix.patch b/vcpkg/ports/moos-essential/fix.patch new file mode 100644 index 0000000..0020c6a --- /dev/null +++ b/vcpkg/ports/moos-essential/fix.patch @@ -0,0 +1,23 @@ +diff --git a/Essentials/pShare/CMakeLists.txt b/Essentials/pShare/CMakeLists.txt +index 5128a50..7fee919 100644 +--- a/Essentials/pShare/CMakeLists.txt ++++ b/Essentials/pShare/CMakeLists.txt +@@ -20,4 +20,4 @@ file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/pshare_test_scripts DESTINATION ${CMAKE_RU + + add_custom_command(TARGET pShare POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_directory +- ${CMAKE_SOURCE_DIR}/pshare_test_scripts ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) ++ ${CMAKE_SOURCE_DIR}/Essentials/pShare/pshare_test_scripts ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) +diff --git a/Essentials/pShare/Share.cpp b/Essentials/pShare/Share.cpp +index 7825e00..756a760 100644 +--- a/Essentials/pShare/Share.cpp ++++ b/Essentials/pShare/Share.cpp +@@ -17,7 +17,7 @@ + + #include "MOOS/libMOOS/Utils/MOOSUtilityFunctions.h" + #include "MOOS/libMOOS/Utils/IPV4Address.h" +-#include "MOOS/libMOOS/Thirdparty/getpot/GetPot" ++#include "MOOS/libMOOS/Thirdparty/getpot/GetPot.hpp" + #include "MOOS/libMOOS/Utils/SafeList.h" + #include "MOOS/libMOOS/Utils/ConsoleColours.h" + #include "MOOS/libMOOS/Utils/KeyboardCapture.h" diff --git a/vcpkg/ports/moos-essential/portfile.cmake b/vcpkg/ports/moos-essential/portfile.cmake new file mode 100644 index 0000000..634b153 --- /dev/null +++ b/vcpkg/ports/moos-essential/portfile.cmake @@ -0,0 +1,35 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO themoos/essential-moos + REF b897ea86dba8b61412dc48ac0cfb5ff34cdaf5f6 + SHA512 7284744d211dcdcb0cd321eec96f3632ccda690e8894261f4f09a06bc8faefb2de68f4f2f755f4eeef5bb586044e98ac65cdd18c15193a1a4632bd2f4208c52f + HEAD_REF master + PATCHES + fix.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/MOOS) +if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/pAntler") + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/pAntler ${CURRENT_PACKAGES_DIR}/tools/MOOS/pAntler) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/pLogger ${CURRENT_PACKAGES_DIR}/tools/MOOS/pLoggers) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/pMOOSBridge ${CURRENT_PACKAGES_DIR}/tools/MOOS/pMOOSBridge) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/pScheduler ${CURRENT_PACKAGES_DIR}/tools/MOOS/pScheduler) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/pShare ${CURRENT_PACKAGES_DIR}/tools/MOOS/pShare) +endif() + + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug) +endif() + +file(WRITE ${CURRENT_PACKAGES_DIR}/include/fake_header.h "// fake header to pass vcpkg post install check \n") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "see moos-core for copyright\n" ) diff --git a/vcpkg/ports/moos-ui/CONTROL b/vcpkg/ports/moos-ui/CONTROL new file mode 100644 index 0000000..8894e8b --- /dev/null +++ b/vcpkg/ports/moos-ui/CONTROL @@ -0,0 +1,5 @@ +Source: moos-ui +Version: 10.0.1-2 +Description: set of user interface tools to use and leverage the MOOS project. +Homepage: https://sites.google.com/site/moossoftware/ +Build-Depends: moos-core diff --git a/vcpkg/ports/moos-ui/portfile.cmake b/vcpkg/ports/moos-ui/portfile.cmake new file mode 100644 index 0000000..55cbebb --- /dev/null +++ b/vcpkg/ports/moos-ui/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO themoos/ui-moos + REF ba7dd1db7db1848acb3e68b9e54d3da9d7014684 + SHA512 96225216973656a9029d4e8ac8a8b69df15db5c160bcbd02755cd291bfe5817dbde3a6a5f46b71a138ddf4a389c3c702d4d502ade91ad88554042d7b9d75f843 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_CONSOLE_TOOLS=ON + -DBUILD_GRAPHICAL_TOOLS=OFF #${BUILD_GRAPHICAL_TOOLS} +) + +vcpkg_install_cmake() + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/MOOS) +if (VCPKG_TARGET_IS_WINDOWS) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/uPoke.exe ${CURRENT_PACKAGES_DIR}/tools/MOOS/uPoke.exe) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/iRemoteLite.exe ${CURRENT_PACKAGES_DIR}/tools/MOOS/iRemoteLite.exe) +else() + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/uPoke ${CURRENT_PACKAGES_DIR}/tools/MOOS/uPoke) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/iRemoteLite ${CURRENT_PACKAGES_DIR}/tools/MOOS/iRemoteLite) +endif() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/MOOS) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug) + +file(WRITE ${CURRENT_PACKAGES_DIR}/include/fake_header_ui.h "// fake header to pass vcpkg post install check \n") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "see moos-core for copyright\n" ) diff --git a/vcpkg/ports/morton-nd/CONTROL b/vcpkg/ports/morton-nd/CONTROL new file mode 100644 index 0000000..e686677 --- /dev/null +++ b/vcpkg/ports/morton-nd/CONTROL @@ -0,0 +1,4 @@ +Source: morton-nd +Version: 3.0.0 +Homepage: https://github.com/kevinhartman/morton-nd +Description: header-only constexpr library for fast Morton encoding/decoding in N dimensions. diff --git a/vcpkg/ports/morton-nd/portfile.cmake b/vcpkg/ports/morton-nd/portfile.cmake new file mode 100644 index 0000000..46aa5be --- /dev/null +++ b/vcpkg/ports/morton-nd/portfile.cmake @@ -0,0 +1,30 @@ +#header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kevinhartman/morton-nd + REF v3.0.0 + SHA512 659c903c0c4a4ee4179d01950a952fe0c40d2c426063c10515ae5d2ad13ec8ca6b83d8de50c9eb86dd3c2c3747e1594d832f0c28cd6d414703baf9a7ab2f1f36 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/morton-nd/cmake TARGET_PATH) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/share/doc +) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) +file(COPY ${SOURCE_PATH}/NOTICE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/mosquitto/0001-add-archive-destination-to-install.patch b/vcpkg/ports/mosquitto/0001-add-archive-destination-to-install.patch new file mode 100644 index 0000000..5df6128 --- /dev/null +++ b/vcpkg/ports/mosquitto/0001-add-archive-destination-to-install.patch @@ -0,0 +1,39 @@ +From df5ec7ba4e7b1516a2636e47c33a4a6161b5c422 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 15:38:44 -0700 +Subject: [PATCH 1/5] add archive destination to install + +--- + lib/CMakeLists.txt | 2 +- + lib/cpp/CMakeLists.txt | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index e1521f1..bd60b75 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -87,7 +87,7 @@ set_target_properties(libmosquitto PROPERTIES + SOVERSION 1 + ) + +-install(TARGETS libmosquitto RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") ++install(TARGETS libmosquitto RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") + + if (WITH_STATIC_LIBRARIES) + add_library(libmosquitto_static STATIC ${C_SRC}) +diff --git a/lib/cpp/CMakeLists.txt b/lib/cpp/CMakeLists.txt +index b39ac3f..5805244 100644 +--- a/lib/cpp/CMakeLists.txt ++++ b/lib/cpp/CMakeLists.txt +@@ -13,7 +13,7 @@ set_target_properties(mosquittopp PROPERTIES + VERSION ${VERSION} + SOVERSION 1 + ) +-install(TARGETS mosquittopp RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") ++install(TARGETS mosquittopp RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") + + if (WITH_STATIC_LIBRARIES) + add_library(mosquittopp_static STATIC +-- +2.24.3 (Apple Git-128) + diff --git a/vcpkg/ports/mosquitto/0002-win64-support.patch b/vcpkg/ports/mosquitto/0002-win64-support.patch new file mode 100644 index 0000000..8698db8 --- /dev/null +++ b/vcpkg/ports/mosquitto/0002-win64-support.patch @@ -0,0 +1,44 @@ +From 675ba1de6c01b4050ae3cc60916d3f0a72b03105 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 15:40:55 -0700 +Subject: [PATCH 2/5] win64 support + +--- + CMakeLists.txt | 7 +------ + config.h | 2 +- + 2 files changed, 2 insertions(+), 7 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e11959c..1a92fe3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -57,12 +57,7 @@ option(WITH_THREADING "Include client library threading support?" ON) + if (WITH_THREADING) + add_definitions("-DWITH_THREADING") + if (WIN32) +- if (CMAKE_CL_64) +- set (PTHREAD_LIBRARIES C:\\pthreads\\Pre-built.2\\lib\\x64\\pthreadVC2.lib) +- else (CMAKE_CL_64) +- set (PTHREAD_LIBRARIES C:\\pthreads\\Pre-built.2\\lib\\x86\\pthreadVC2.lib) +- endif (CMAKE_CL_64) +- set (PTHREAD_INCLUDE_DIR C:\\pthreads\\Pre-built.2\\include) ++ find_package(pthread REQUIRED) + else (WIN32) + find_library(LIBPTHREAD pthread) + if (LIBPTHREAD) +diff --git a/config.h b/config.h +index 5cce39e..c673bf4 100644 +--- a/config.h ++++ b/config.h +@@ -31,7 +31,7 @@ + # define EPROTO ECONNABORTED + #endif + +-#ifdef WIN32 ++#ifdef _WIN32 + # ifndef strcasecmp + # define strcasecmp strcmpi + # endif +-- +2.24.3 (Apple Git-128) + diff --git a/vcpkg/ports/mosquitto/0003-add-find_package-libwebsockets.patch b/vcpkg/ports/mosquitto/0003-add-find_package-libwebsockets.patch new file mode 100644 index 0000000..b167b0d --- /dev/null +++ b/vcpkg/ports/mosquitto/0003-add-find_package-libwebsockets.patch @@ -0,0 +1,24 @@ +From 902ab5bf91937188d3ebf0aece81a704729e5580 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 15:42:53 -0700 +Subject: [PATCH 3/5] add find_package libwebsockets + +--- + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1a92fe3..3c78b2c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -45,6 +45,7 @@ endif (WITH_TLS) + + option(WITH_SOCKS "Include SOCKS5 support?" ON) + if (WITH_SOCKS) ++ find_package(Libwebsockets CONFIG REQUIRED) + add_definitions("-DWITH_SOCKS") + endif (WITH_SOCKS) + +-- +2.24.3 (Apple Git-128) + diff --git a/vcpkg/ports/mosquitto/0004-support-static-build.patch b/vcpkg/ports/mosquitto/0004-support-static-build.patch new file mode 100644 index 0000000..55606e7 --- /dev/null +++ b/vcpkg/ports/mosquitto/0004-support-static-build.patch @@ -0,0 +1,51 @@ +From 4bb19e77e95bc505d32e098190ffbf056810017c Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 15:44:42 -0700 +Subject: [PATCH 4/5] support static build + +--- + lib/CMakeLists.txt | 2 +- + src/CMakeLists.txt | 8 ++++++-- + 2 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index bd60b75..cc01a2a 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -60,7 +60,7 @@ if (UNIX AND NOT APPLE) + endif (UNIX AND NOT APPLE) + + if (WIN32) +- set (LIBRARIES ${LIBRARIES} ws2_32) ++ set (LIBRARIES ${LIBRARIES} ws2_32 crypt32) + endif (WIN32) + + if (WITH_SRV) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 7898ff5..f066aea 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -158,7 +158,7 @@ if (UNIX) + endif (UNIX) + + if (WIN32) +- set (MOSQ_LIBS ${MOSQ_LIBS} ws2_32) ++ set (MOSQ_LIBS ${MOSQ_LIBS} ws2_32 crypt32) + endif (WIN32) + + if (WITH_WEBSOCKETS) +@@ -189,6 +189,10 @@ install(FILES mosquitto_broker.h mosquitto_plugin.h DESTINATION "${CMAKE_INSTALL + + if (WITH_TLS) + add_executable(mosquitto_passwd mosquitto_passwd.c) +- target_link_libraries(mosquitto_passwd ${OPENSSL_LIBRARIES}) ++ if(WIN32) ++ target_link_libraries(mosquitto_passwd ${OPENSSL_LIBRARIES} ws2_32 crypt32) ++ else() ++ target_link_libraries(mosquitto_passwd ${OPENSSL_LIBRARIES}) ++ endif() + install(TARGETS mosquitto_passwd RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") + endif (WITH_TLS) +-- +2.24.3 (Apple Git-128) + diff --git a/vcpkg/ports/mosquitto/0005-add-mach.h-include.patch b/vcpkg/ports/mosquitto/0005-add-mach.h-include.patch new file mode 100644 index 0000000..b01ff53 --- /dev/null +++ b/vcpkg/ports/mosquitto/0005-add-mach.h-include.patch @@ -0,0 +1,27 @@ +From af7d62dceb064b5a8458616536bc27329ad236b1 Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Tue, 22 Sep 2020 15:46:06 -0700 +Subject: [PATCH 5/5] add mach.h include + +--- + lib/mosquitto.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/lib/mosquitto.c b/lib/mosquitto.c +index 795013e..cd00513 100644 +--- a/lib/mosquitto.c ++++ b/lib/mosquitto.c +@@ -33,6 +33,10 @@ Contributors: + #include "packet_mosq.h" + #include "will_mosq.h" + ++#if defined(__APPLE__) ++#include ++#endif ++ + + void mosquitto__destroy(struct mosquitto *mosq); + +-- +2.24.3 (Apple Git-128) + diff --git a/vcpkg/ports/mosquitto/portfile.cmake b/vcpkg/ports/mosquitto/portfile.cmake new file mode 100644 index 0000000..bf83210 --- /dev/null +++ b/vcpkg/ports/mosquitto/portfile.cmake @@ -0,0 +1,53 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO eclipse/mosquitto + REF e55f7facce7628b33e57d6b44cc8e9dd1042e624 # v1.6.8 + SHA512 c192b53f52ce9dc8e02d31acd9e93c00cafbe543b038d7619e6b653f102126872bbd485c94604bca9287e71a5dfe0de2f4d8d3f51cdd5c37f90fd2a6535bd89b + HEAD_REF master + PATCHES + 0001-add-archive-destination-to-install.patch + 0002-win64-support.patch + 0003-add-find_package-libwebsockets.patch + 0004-support-static-build.patch + 0005-add-mach.h-include.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DWITH_SRV=OFF + -DWITH_WEBSOCKETS=ON + -DWITH_TLS=ON + -DWITH_TLS_PSK=ON + -DWITH_THREADING=ON + -DDOCUMENTATION=OFF + OPTIONS_RELEASE + -DENABLE_DEBUG=OFF + OPTIONS_DEBUG + -DENABLE_DEBUG=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_passwd${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_passwd${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_pub${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_pub${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_rr${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_rr${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mosquitto_sub${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/mosquitto_sub${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake @ONLY) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/mosquitto/usage b/vcpkg/ports/mosquitto/usage new file mode 100644 index 0000000..1f4e673 --- /dev/null +++ b/vcpkg/ports/mosquitto/usage @@ -0,0 +1,5 @@ +The package mosquitto provides CMake targets: + + find_package(mosquitto REQUIRED) + target_include_directories(main PRIVATE ${MOSQUITTO_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${MOSQUITTO_LIBRARIES}) diff --git a/vcpkg/ports/mosquitto/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/mosquitto/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..ad8124c --- /dev/null +++ b/vcpkg/ports/mosquitto/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,15 @@ +include(FindPackageHandleStandardArgs) +include(SelectLibraryConfigurations) + +find_path(MOSQUITTO_INCLUDE_DIR mosquitto.h) + +find_library(MOSQUITTO_LIBRARY_DEBUG NAMES mosquitto libmosquitto NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) +find_library(MOSQUITTO_LIBRARY_RELEASE NAMES mosquitto libmosquitto NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED) +find_library(MOSQUITTOPP_LIBRARY_DEBUG NAMES mosquittopp libmosquittopp NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) +find_library(MOSQUITTOPP_LIBRARY_RELEASE NAMES mosquittopp libmosquittopp NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED) + +select_library_configurations(MOSQUITTO) +select_library_configurations(MOSQUITTOPP) + +set(MOSQUITTO_INCLUDE_DIRS ${MOSQUITTO_INCLUDE_DIR}) +set(MOSQUITTO_LIBRARIES ${MOSQUITTO_LIBRARY} ${MOSQUITTOPP_LIBRARY}) diff --git a/vcpkg/ports/mosquitto/vcpkg.json b/vcpkg/ports/mosquitto/vcpkg.json new file mode 100644 index 0000000..4f0c616 --- /dev/null +++ b/vcpkg/ports/mosquitto/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "mosquitto", + "version-string": "1.6.8", + "port-version": 3, + "description": "Mosquitto is an open source message broker that implements the MQ Telemetry Transport protocol versions 3.1 and 3.1.1, MQTT provides a lightweight method of carrying out messaging using a publish/subscribe model, This makes it suitable for machine to machine messaging such as with low power sensors or mobile devices such as phones, embedded computers or microcontrollers like the Arduino", + "homepage": "https://mosquitto.org/download/", + "dependencies": [ + "c-ares", + "libwebsockets", + "openssl", + "pthreads" + ] +} diff --git a/vcpkg/ports/mozjpeg/CONTROL b/vcpkg/ports/mozjpeg/CONTROL new file mode 100644 index 0000000..998e5ea --- /dev/null +++ b/vcpkg/ports/mozjpeg/CONTROL @@ -0,0 +1,5 @@ +Source: mozjpeg +Version: 2020-06-02-1 +Build-Depends: libpng +Homepage: https://github.com/mozilla/mozjpeg +Description: MozJPEG reduces file sizes of JPEG images while retaining quality and compatibility with the vast majority of the world's deployed decoders. It's compatible with libjpeg API and ABI, and can be used as a drop-in replacement for libjpeg. diff --git a/vcpkg/ports/mozjpeg/fix-install-error.patch b/vcpkg/ports/mozjpeg/fix-install-error.patch new file mode 100644 index 0000000..0d0a283 --- /dev/null +++ b/vcpkg/ports/mozjpeg/fix-install-error.patch @@ -0,0 +1,33 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1369,13 +1369,13 @@ + ############################################################################### + + set(EXE ${CMAKE_EXECUTABLE_SUFFIX}) + + if(WITH_TURBOJPEG) + if(ENABLE_SHARED) +- install(TARGETS turbojpeg tjbench ++ install(TARGETS turbojpeg #tjbench + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + if(NOT CMAKE_VERSION VERSION_LESS "3.1" AND MSVC AND + CMAKE_C_LINKER_SUPPORTS_PDB) + install(FILES "$" +@@ -1413,13 +1413,13 @@ + DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME djpeg${EXE}) + install(PROGRAMS ${DIR}/jpegtran-static${EXE} + DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME jpegtran${EXE}) + endif() + endif() + +-install(TARGETS rdjpgcom wrjpgcom RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++#install(TARGETS rdjpgcom wrjpgcom RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/README.ijg + ${CMAKE_CURRENT_SOURCE_DIR}/README.md ${CMAKE_CURRENT_SOURCE_DIR}/example.txt + ${CMAKE_CURRENT_SOURCE_DIR}/tjexample.c + ${CMAKE_CURRENT_SOURCE_DIR}/libjpeg.txt + ${CMAKE_CURRENT_SOURCE_DIR}/structure.txt diff --git a/vcpkg/ports/mozjpeg/portfile.cmake b/vcpkg/ports/mozjpeg/portfile.cmake new file mode 100644 index 0000000..9c756e7 --- /dev/null +++ b/vcpkg/ports/mozjpeg/portfile.cmake @@ -0,0 +1,57 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mozilla/mozjpeg + REF 6d95c51adf0c314017f541b6cb07e13cc1bce754 + SHA512 a21c8b3a561b387933a27befaa1d05a8c63b0e203d72d73071a4c9b57c6b7d57b44836f211c4dcb80eee4b01876f0a0fb4c91a60c3ae867e906e5e4e27165627 + HEAD_REF master + PATCHES + fix-install-error.patch +) + +vcpkg_find_acquire_program(NASM) +get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) +vcpkg_add_to_path(${NASM_EXE_PATH}) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_SHARED) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" WITH_CRT_DLL) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DENABLE_SHARED=${ENABLE_SHARED} + -DENABLE_STATIC=${ENABLE_STATIC} + -DWITH_CRT_DLL=${WITH_CRT_DLL} +) + +vcpkg_install_cmake() + +# Rename libraries for static builds +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/jpeg-static.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/jpeg-static.lib" "${CURRENT_PACKAGES_DIR}/lib/jpeg.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/lib/turbojpeg-static.lib" "${CURRENT_PACKAGES_DIR}/lib/turbojpeg.lib") + endif() + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/jpeg-static.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/jpeg-static.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/jpeg.lib") + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/turbojpeg-static.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/turbojpeg.lib") + endif() +endif() + +# Remove extra debug files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_tools(TOOL_NAMES cjpeg djpeg jpegtran AUTO_CLEAN) +vcpkg_fixup_pkgconfig() + +# Remove empty folders after static build +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(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +vcpkg_copy_pdbs() \ No newline at end of file diff --git a/vcpkg/ports/mp-units/CONTROL b/vcpkg/ports/mp-units/CONTROL new file mode 100644 index 0000000..355d1cf --- /dev/null +++ b/vcpkg/ports/mp-units/CONTROL @@ -0,0 +1,5 @@ +Source: mp-units +Version: 0.6.0 +Homepage: https://github.com/mpusz/units +Description: mp-units - A Units Library for C++ +Build-Depends: fmt, ms-gsl diff --git a/vcpkg/ports/mp-units/cmake.patch b/vcpkg/ports/mp-units/cmake.patch new file mode 100644 index 0000000..d5a57ce --- /dev/null +++ b/vcpkg/ports/mp-units/cmake.patch @@ -0,0 +1,35 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b18a30a96..d89248aa1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -40,14 +40,24 @@ conan_init(cmake) + add_subdirectory(src) + + # set restrictive compilation warnings +-set_warnings(mp-units) ++# set_warnings(mp-units) + + # add unit tests +-enable_testing() +-add_subdirectory(test) ++option(BUILD_TESTING "Build tests" OFF) ++if(BUILD_TESTING) ++ set_warnings(mp-units) ++ enable_testing() ++ add_subdirectory(test) ++endif() + + # add usage example +-add_subdirectory(example) +- ++option(BUILD_EXAMPLES "Build usage examples" OFF) ++if(BUILD_EXAMPLES) ++ add_subdirectory(example) ++endif() + # generate project documentation +-add_subdirectory(docs) ++ ++option(BUILD_DOCS "Generate docs" OFF) ++if(BUILD_DOCS) ++ add_subdirectory(docs) ++endif() diff --git a/vcpkg/ports/mp-units/config.patch b/vcpkg/ports/mp-units/config.patch new file mode 100644 index 0000000..5bd81c9 --- /dev/null +++ b/vcpkg/ports/mp-units/config.patch @@ -0,0 +1,9 @@ +diff --git a/cmake/common/simple-config.cmake.in b/cmake/common/simple-config.cmake.in +index f40ebfa88..d521e0ba8 100644 +--- a/cmake/common/simple-config.cmake.in ++++ b/cmake/common/simple-config.cmake.in +@@ -1 +1,4 @@ ++include(CMakeFindDependencyMacro) ++find_dependency(fmt CONFIG) ++find_dependency(Microsoft.GSL CONFIG) + include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake") diff --git a/vcpkg/ports/mp-units/portfile.cmake b/vcpkg/ports/mp-units/portfile.cmake new file mode 100644 index 0000000..1200c17 --- /dev/null +++ b/vcpkg/ports/mp-units/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mpusz/units + REF 33ad51311b835efb7f7767473f971c02a3140073 + SHA512 18c9a4bb1812d7ab59e86d3eef5f62aa760c8f78eac81086bd3b25f7e2d359f2fba71b0298cf91ecb31dbe13846f2e5ce75133b0db534020102b788dd1c1a1da + PATCHES + cmake.patch + config.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +# Handle copyright/readme/package files +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug" + "${CURRENT_PACKAGES_DIR}/lib") # Header only \ No newline at end of file diff --git a/vcpkg/ports/mp3lame/00001-msvc-upgrade-solution-up-to-vc11.patch b/vcpkg/ports/mp3lame/00001-msvc-upgrade-solution-up-to-vc11.patch new file mode 100644 index 0000000..0777809 --- /dev/null +++ b/vcpkg/ports/mp3lame/00001-msvc-upgrade-solution-up-to-vc11.patch @@ -0,0 +1,1018 @@ +diff --git a/vc_solution/arch_nasm.props b/vc_solution/arch_nasm.props +new file mode 100644 +index 0000000..13174c9 +--- /dev/null ++++ b/vc_solution/arch_nasm.props +@@ -0,0 +1,15 @@ ++ ++ ++ ++ ++ ++ ++ <_ProjectFileVersion>11.0.61030.0 ++ ++ ++ ++ TAKEHIRO_IEEE754_HACK;HAVE_NASM;MMX_choose_table;%(PreprocessorDefinitions) ++ ++ ++ ++ +\ No newline at end of file +diff --git a/vc_solution/arch_sse2.props b/vc_solution/arch_sse2.props +new file mode 100644 +index 0000000..1f97d57 +--- /dev/null ++++ b/vc_solution/arch_sse2.props +@@ -0,0 +1,17 @@ ++ ++ ++ ++ ++ ++ ++ <_ProjectFileVersion>11.0.61030.0 ++ ++ ++ ++ HAVE_XMMINTRIN_H;MIN_ARCH_SSE;%(PreprocessorDefinitions) ++ StreamingSIMDExtensions2 ++ Fast ++ ++ ++ ++ +\ No newline at end of file +diff --git a/vc_solution/arch_x87.props b/vc_solution/arch_x87.props +new file mode 100644 +index 0000000..3268c6b +--- /dev/null ++++ b/vc_solution/arch_x87.props +@@ -0,0 +1,15 @@ ++ ++ ++ ++ ++ ++ ++ <_ProjectFileVersion>11.0.61030.0 ++ ++ ++ ++ TAKEHIRO_IEEE754_HACK;%(PreprocessorDefinitions) ++ ++ ++ ++ +\ No newline at end of file +diff --git a/vc_solution/vc11_lame.sln b/vc_solution/vc11_lame.sln +new file mode 100644 +index 0000000..9453bb0 +--- /dev/null ++++ b/vc_solution/vc11_lame.sln +@@ -0,0 +1,41 @@ ++ ++Microsoft Visual Studio Solution File, Format Version 12.00 ++# Visual Studio 2012 ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lame", "vc11_lame_lame.vcxproj", "{EEF5B49E-DBD1-4E1B-8B86-C5D64FCBAD38}" ++ ProjectSection(ProjectDependencies) = postProject ++ {92BD50AA-04D6-4FBF-ACE1-468FAF6778F2} = {92BD50AA-04D6-4FBF-ACE1-468FAF6778F2} ++ EndProjectSection ++EndProject ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmp3lame-static", "vc11_libmp3lame.vcxproj", "{20536101-3B0E-43EF-94F9-080D595DAC57}" ++EndProject ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmp3lame", "vc11_libmp3lame_dll.vcxproj", "{92BD50AA-04D6-4FBF-ACE1-468FAF6778F2}" ++EndProject ++Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmpghip-static", "vc11_mpglib.vcxproj", "{E2DAB91A-8248-4625-8A85-2C2C2A390DD8}" ++EndProject ++Global ++ GlobalSection(SolutionConfigurationPlatforms) = preSolution ++ Debug|Win32 = Debug|Win32 ++ Release|Win32 = Release|Win32 ++ EndGlobalSection ++ GlobalSection(ProjectConfigurationPlatforms) = postSolution ++ {EEF5B49E-DBD1-4E1B-8B86-C5D64FCBAD38}.Debug|Win32.ActiveCfg = Debug|Win32 ++ {EEF5B49E-DBD1-4E1B-8B86-C5D64FCBAD38}.Debug|Win32.Build.0 = Debug|Win32 ++ {EEF5B49E-DBD1-4E1B-8B86-C5D64FCBAD38}.Release|Win32.ActiveCfg = Release|Win32 ++ {EEF5B49E-DBD1-4E1B-8B86-C5D64FCBAD38}.Release|Win32.Build.0 = Release|Win32 ++ {20536101-3B0E-43EF-94F9-080D595DAC57}.Debug|Win32.ActiveCfg = Debug|Win32 ++ {20536101-3B0E-43EF-94F9-080D595DAC57}.Debug|Win32.Build.0 = Debug|Win32 ++ {20536101-3B0E-43EF-94F9-080D595DAC57}.Release|Win32.ActiveCfg = Release|Win32 ++ {20536101-3B0E-43EF-94F9-080D595DAC57}.Release|Win32.Build.0 = Release|Win32 ++ {92BD50AA-04D6-4FBF-ACE1-468FAF6778F2}.Debug|Win32.ActiveCfg = Debug|Win32 ++ {92BD50AA-04D6-4FBF-ACE1-468FAF6778F2}.Debug|Win32.Build.0 = Debug|Win32 ++ {92BD50AA-04D6-4FBF-ACE1-468FAF6778F2}.Release|Win32.ActiveCfg = Release|Win32 ++ {92BD50AA-04D6-4FBF-ACE1-468FAF6778F2}.Release|Win32.Build.0 = Release|Win32 ++ {E2DAB91A-8248-4625-8A85-2C2C2A390DD8}.Debug|Win32.ActiveCfg = Debug|Win32 ++ {E2DAB91A-8248-4625-8A85-2C2C2A390DD8}.Debug|Win32.Build.0 = Debug|Win32 ++ {E2DAB91A-8248-4625-8A85-2C2C2A390DD8}.Release|Win32.ActiveCfg = Release|Win32 ++ {E2DAB91A-8248-4625-8A85-2C2C2A390DD8}.Release|Win32.Build.0 = Release|Win32 ++ EndGlobalSection ++ GlobalSection(SolutionProperties) = preSolution ++ HideSolutionNode = FALSE ++ EndGlobalSection ++EndGlobal +diff --git a/vc_solution/vc11_lame_config.props b/vc_solution/vc11_lame_config.props +new file mode 100644 +index 0000000..fd60017 +--- /dev/null ++++ b/vc_solution/vc11_lame_config.props +@@ -0,0 +1,32 @@ ++ ++ ++ ++ ++ ++ ++ <_ProjectFileVersion>11.0.61030.0 ++ $(SolutionDir)..\output\$(Configuration)\ ++ $(SolutionDir)..\obj\$(Configuration)\$(ProjectName)\ ++ false ++ ++ ++ ++ $(IntDir)$(ProjectName).bsc ++ ++ ++ _CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATED;%(PreprocessorDefinitions) ++ true ++ true ++ $(IntDir) ++ true ++ Level4 ++ 4995;4996;%(DisableSpecificWarnings) ++ ++ ++ $(OutDir);%(AdditionalLibraryDirectories) ++ $(OutDir)$(TargetName).pdb ++ true ++ ++ ++ ++ +\ No newline at end of file +diff --git a/vc_solution/vc11_lame_lame.vcxproj b/vc_solution/vc11_lame_lame.vcxproj +new file mode 100644 +index 0000000..faf101a +--- /dev/null ++++ b/vc_solution/vc11_lame_lame.vcxproj +@@ -0,0 +1,128 @@ ++ ++ ++ ++ ++ Debug ++ Win32 ++ ++ ++ Release ++ Win32 ++ ++ ++ ++ lame ++ {EEF5B49E-DBD1-4E1B-8B86-C5D64FCBAD38} ++ lame ++ ++ ++ ++ Application ++ v110 ++ false ++ ++ ++ Application ++ v110 ++ false ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ <_ProjectFileVersion>11.0.61030.0 ++ ++ ++ ++ ..\output\Debug/lame.tlb ++ ++ ++ ++ Disabled ++ ../;../mpglib;../libmp3lame;../include;%(AdditionalIncludeDirectories) ++ _DEBUG;WIN32;_WIN32;_CONSOLE;_WINDOWS;HAVE_MPGLIB;HAVE_CONFIG_H;%(PreprocessorDefinitions) ++ MultiThreadedDebugDLL ++ ProgramDatabase ++ ++ ++ _DEBUG;_APP=$(TargetFileName);%(PreprocessorDefinitions) ++ 0x0409 ++ ++ ++ $(OutDir)lame.exe ++ true ++ Console ++ false ++ /APPCONTAINER /machine:x86 %(AdditionalOptions) ++ NotSet ++ ++ ++ ++ ++ ..\output\Release/lame.tlb ++ ++ ++ ++ Full ++ AnySuitable ++ true ++ Speed ++ ..;../mpglib;../libmp3lame;../include;../;%(AdditionalIncludeDirectories) ++ NDEBUG;WIN32;_WIN32;_CONSOLE;_WINDOWS;HAVE_MPGLIB;HAVE_CONFIG_H;%(PreprocessorDefinitions) ++ MultiThreadedDLL ++ ++ ++ NDEBUG;_APP=$(TargetFileName);%(PreprocessorDefinitions) ++ 0x0409 ++ ++ ++ $(OutDir)lame.exe ++ Console ++ false ++ /APPCONTAINER /machine:x86 %(AdditionalOptions) ++ NotSet ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ {20536101-3b0e-43ef-94f9-080d595dac57} ++ false ++ ++ ++ ++ ++ ++ +\ No newline at end of file +diff --git a/vc_solution/vc11_libmp3lame.vcxproj b/vc_solution/vc11_libmp3lame.vcxproj +new file mode 100644 +index 0000000..d4636b0 +--- /dev/null ++++ b/vc_solution/vc11_libmp3lame.vcxproj +@@ -0,0 +1,188 @@ ++ ++ ++ ++ ++ Debug ++ Win32 ++ ++ ++ Release ++ Win32 ++ ++ ++ ++ libmp3lame-static ++ {20536101-3B0E-43EF-94F9-080D595DAC57} ++ libmp3lame ++ ++ ++ ++ StaticLibrary ++ v110 ++ false ++ ++ ++ StaticLibrary ++ v110 ++ false ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ <_ProjectFileVersion>11.0.61030.0 ++ ++ ++ ++ Full ++ AnySuitable ++ true ++ Speed ++ ../mpglib;../include;..;%(AdditionalIncludeDirectories) ++ NDEBUG;_WINDOWS;HAVE_MPGLIB;WIN32;HAVE_CONFIG_H;%(PreprocessorDefinitions) ++ MultiThreadedDLL ++ ++ ++ 0x0409 ++ ++ ++ $(OutDir)libmp3lame-static.lib ++ ++ ++ ++ ++ Disabled ++ ../mpglib;../include;..;%(AdditionalIncludeDirectories) ++ _DEBUG;_WINDOWS;HAVE_MPGLIB;WIN32;HAVE_CONFIG_H;%(PreprocessorDefinitions) ++ MultiThreadedDebugDLL ++ $(OutDir)$(TargetName).pdb ++ OldStyle ++ ++ ++ 0x0409 ++ ++ ++ $(OutDir)libmp3lame-static.lib ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Level1 ++ Level1 ++ ++ ++ ++ ++ ++ ++ ++ ../libmp3lame;%(AdditionalIncludeDirectories) ++ ../libmp3lame;%(AdditionalIncludeDirectories) ++ ++ ++ ++ ++ ++ Performing Custom Build Step on %(Filename) ++ copy ..\configMS.h ..\config.h ++ ++ ..\config.h;%(Outputs) ++ Performing Custom Build Step on %(Filename) ++ copy ..\configMS.h ..\config.h ++ ++ ..\config.h;%(Outputs) ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ true ++ true ++ ++ ++ true ++ true ++ ++ ++ true ++ true ++ ++ ++ true ++ true ++ ++ ++ true ++ true ++ ++ ++ true ++ true ++ ++ ++ true ++ true ++ ++ ++ true ++ true ++ ++ ++ ++ ++ {e2dab91a-8248-4625-8a85-2c2c2a390dd8} ++ false ++ ++ ++ ++ ++ ++ ++ +\ No newline at end of file +diff --git a/vc_solution/vc11_libmp3lame_dll.vcxproj b/vc_solution/vc11_libmp3lame_dll.vcxproj +new file mode 100644 +index 0000000..9dad9d5 +--- /dev/null ++++ b/vc_solution/vc11_libmp3lame_dll.vcxproj +@@ -0,0 +1,125 @@ ++ ++ ++ ++ ++ Debug ++ Win32 ++ ++ ++ Release ++ Win32 ++ ++ ++ ++ libmp3lame ++ {92BD50AA-04D6-4FBF-ACE1-468FAF6778F2} ++ libmp3lameDLL ++ ++ ++ ++ DynamicLibrary ++ v110 ++ false ++ ++ ++ DynamicLibrary ++ v110 ++ false ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ <_ProjectFileVersion>11.0.61030.0 ++ ++ ++ ++ ..\output\Release/libmp3lame_dll.tlb ++ ++ ++ ++ Full ++ AnySuitable ++ true ++ Speed ++ ../libmp3lame;../;../mpglib;../include;..;%(AdditionalIncludeDirectories) ++ NDEBUG;_WINDOWS;HAVE_MPGLIB;WIN32;HAVE_CONFIG_H;%(PreprocessorDefinitions) ++ MultiThreadedDLL ++ ++ ++ _VC80_UPGRADE=0x0600;_DLL=$(TargetFileName);%(PreprocessorDefinitions) ++ 0x0409 ++ ++ ++ false ++ ++ ++ $(OutDir)libmp3lame.dll ++ ..\include\lame.def ++ $(OutDir)libmp3lame.lib ++ /APPCONTAINER /machine:x86 %(AdditionalOptions) ++ false ++ NotSet ++ ++ ++ ++ ++ ..\output\Debug/libmp3lame_dll.tlb ++ ++ ++ ++ Disabled ++ ../libmp3lame;../;../mpglib;../include;..;%(AdditionalIncludeDirectories) ++ _DEBUG;_WINDOWS;HAVE_MPGLIB;WIN32;HAVE_CONFIG_H;%(PreprocessorDefinitions) ++ MultiThreadedDebugDLL ++ ProgramDatabase ++ ++ ++ _VC80_UPGRADE=0x0600;_DLL=$(TargetFileName);_DEBUG;%(PreprocessorDefinitions) ++ 0x0409 ++ ++ ++ false ++ ++ ++ $(OutDir)libmp3lame.dll ++ ..\include\lame.def ++ true ++ $(OutDir)libmp3lame.lib ++ /APPCONTAINER /machine:x86 %(AdditionalOptions) ++ false ++ NotSet ++ ++ ++ ++ ++ true ++ true ++ ++ ++ ++ ++ ++ ++ ++ {20536101-3b0e-43ef-94f9-080d595dac57} ++ false ++ ++ ++ ++ ++ ++ ++ +\ No newline at end of file +diff --git a/vc_solution/vc11_mpglib.vcxproj b/vc_solution/vc11_mpglib.vcxproj +new file mode 100644 +index 0000000..a455bca +--- /dev/null ++++ b/vc_solution/vc11_mpglib.vcxproj +@@ -0,0 +1,116 @@ ++ ++ ++ ++ ++ Debug ++ Win32 ++ ++ ++ Release ++ Win32 ++ ++ ++ ++ libmpghip-static ++ {E2DAB91A-8248-4625-8A85-2C2C2A390DD8} ++ libmpghip ++ ++ ++ ++ StaticLibrary ++ v110 ++ false ++ ++ ++ StaticLibrary ++ v110 ++ false ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ <_ProjectFileVersion>11.0.61030.0 ++ ++ ++ ++ Full ++ AnySuitable ++ true ++ Speed ++ ../libmp3lame;../include;..;%(AdditionalIncludeDirectories) ++ NDEBUG;HAVE_MPGLIB;_WINDOWS;USE_LAYER_2;WIN32;HAVE_CONFIG_H;%(PreprocessorDefinitions) ++ MultiThreadedDLL ++ ++ ++ 0x0409 ++ ++ ++ $(OutDir)libmpghip-static.lib ++ ++ ++ ++ ++ Disabled ++ ../libmp3lame;../include;..;%(AdditionalIncludeDirectories) ++ _DEBUG;_WINDOWS;USE_LAYER_2;HAVE_MPGLIB;WIN32;HAVE_CONFIG_H;%(PreprocessorDefinitions) ++ MultiThreadedDebugDLL ++ $(OutDir)$(TargetName).pdb ++ OldStyle ++ ++ ++ 0x0409 ++ ++ ++ $(OutDir)libmpghip-static.lib ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Performing Custom Build Step on %(Filename) ++ copy ..\configMS.h ..\config.h ++ ++ ..\config.h;%(Outputs) ++ Performing Custom Build Step on %(Filename) ++ copy ..\configMS.h ..\config.h ++ ++ ..\config.h;%(Outputs) ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +\ No newline at end of file +diff --git a/vc_solution/vc11_nasm.props b/vc_solution/vc11_nasm.props +new file mode 100644 +index 0000000..0f8542f +--- /dev/null ++++ b/vc_solution/vc11_nasm.props +@@ -0,0 +1,24 @@ ++ ++ ++ ++ Midl ++ CustomBuild ++ ++ ++ _SelectedFiles;$(NASMDependsOn) ++ ++ ++ ++ $(IntDir)%(Filename).obj ++ win32 ++ %(RootDir)%(Directory) ++ WIN32 ++ nasmw [BinFormat] [IncludeDir] [Defines] -o [OutFile] %(FullPath) ++ [OutFile] ++ Assembling %(Filename)... ++ false ++ ++ ++ +\ No newline at end of file +diff --git a/vc_solution/vc11_nasm.targets b/vc_solution/vc11_nasm.targets +new file mode 100644 +index 0000000..3158d8d +--- /dev/null ++++ b/vc_solution/vc11_nasm.targets +@@ -0,0 +1,85 @@ ++ ++ ++ ++ ++ ++ _NASM ++ ++ ++ ++ $(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml ++ ++ ++ ++ ++ ++ ++ ++ @(NASM, '|') ++ ++ ++ ++ ++ ++ ++ ++ ++ $(ComputeLinkInputsTargets); ++ ComputeNASMOutput; ++ ++ ++ $(ComputeLibInputsTargets); ++ ComputeNASMOutput; ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ +\ No newline at end of file +diff --git a/vc_solution/vc11_nasm.xml b/vc_solution/vc11_nasm.xml +new file mode 100644 +index 0000000..390d570 +--- /dev/null ++++ b/vc_solution/vc11_nasm.xml +@@ -0,0 +1,149 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ General ++ ++ ++ ++ ++ Command Line ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Execute Before ++ ++ ++ Specifies the targets for the build customization to run before. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Execute After ++ ++ ++ Specifies the targets for the build customization to run after. ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ Additional Options ++ ++ ++ Additional Options ++ ++ ++ ++ ++ ++ ++ +\ No newline at end of file diff --git a/vcpkg/ports/mp3lame/CONTROL b/vcpkg/ports/mp3lame/CONTROL new file mode 100644 index 0000000..8db5ca4 --- /dev/null +++ b/vcpkg/ports/mp3lame/CONTROL @@ -0,0 +1,5 @@ +Source: mp3lame +Version: 3.100 +Port-Version: 4 +Homepage: http://lame.sourceforge.net/ +Description: LAME is a high quality MPEG Audio Layer III (MP3) encoder licensed under the LGPL. diff --git a/vcpkg/ports/mp3lame/Config.cmake.in b/vcpkg/ports/mp3lame/Config.cmake.in new file mode 100644 index 0000000..9630b9e --- /dev/null +++ b/vcpkg/ports/mp3lame/Config.cmake.in @@ -0,0 +1,60 @@ + +get_filename_component(_mp3lame_root "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_mp3lame_root "${_mp3lame_root}" PATH) +get_filename_component(_mp3lame_root "${_mp3lame_root}" PATH) + +set(_mp3lame_rel_lib "${_mp3lame_root}/lib/@MP3LAME_LIB@") +set(_mp3lame_dbg_lib "${_mp3lame_root}/debug/lib/@MP3LAME_LIB@") + +if (EXISTS "${_mp3lame_rel_lib}" OR EXISTS "${_mp3lame_dbg_lib}") + + add_library(mp3lame::mp3lame UNKNOWN IMPORTED) + set_target_properties(mp3lame::mp3lame + PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${_mp3lame_root}/include") + + if (EXISTS "${_mp3lame_rel_lib}") + set_target_properties(mp3lame::mp3lame + PROPERTIES IMPORTED_LOCATION_RELEASE "${_mp3lame_rel_lib}") + set_property(TARGET mp3lame::mp3lame APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) + endif() + if (EXISTS "${_mp3lame_dbg_lib}") + set_target_properties(mp3lame::mp3lame + PROPERTIES IMPORTED_LOCATION_DEBUG "${_mp3lame_dbg_lib}") + set_property(TARGET mp3lame::mp3lame APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) + endif() + + set(_mp3lame_mpghip_rel_lib "${_mp3lame_root}/lib/libmpghip-static.lib") + set(_mp3lame_mpghip_dbg_lib "${_mp3lame_root}/debug/lib/libmpghip-static.lib") + + if (EXISTS "${_mp3lame_mpghip_rel_lib}" OR EXISTS "${_mp3lame_mpghip_dbg_lib}") + + add_library(mp3lame::mpghip UNKNOWN IMPORTED) + + if (EXISTS "${_mp3lame_rel_lib}") + set_target_properties(mp3lame::mpghip + PROPERTIES IMPORTED_LOCATION_RELEASE "${_mp3lame_mpghip_rel_lib}") + set_property(TARGET mp3lame::mpghip APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) + endif() + if (EXISTS "${_mp3lame_dbg_lib}") + set_target_properties(mp3lame::mpghip + PROPERTIES IMPORTED_LOCATION_DEBUG "${_mp3lame_mpghip_dbg_lib}") + set_property(TARGET mp3lame::mpghip APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) + endif() + + set_target_properties(mp3lame::mp3lame PROPERTIES INTERFACE_LINK_LIBRARIES mp3lame::mpghip) + + endif() + + unset(_mp3lame_mpghip_rel_lib) + unset(_mp3lame_mpghip_dbg_lib) + +else() + + set(mp3lame_FOUND FALSE) + +endif() + +unset(_mp3lame_rel_lib) +unset(_mp3lame_dbg_lib) + +unset(_mp3lame_root) diff --git a/vcpkg/ports/mp3lame/portfile.cmake b/vcpkg/ports/mp3lame/portfile.cmake new file mode 100644 index 0000000..9244775 --- /dev/null +++ b/vcpkg/ports/mp3lame/portfile.cmake @@ -0,0 +1,146 @@ +set(VERSION 3.100) + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO lame/lame + REF ${VERSION} + FILENAME "lame-${VERSION}.tar.gz" + SHA512 0844b9eadb4aacf8000444621451277de365041cc1d97b7f7a589da0b7a23899310afd4e4d81114b9912aa97832621d20588034715573d417b2923948c08634b + PATCHES 00001-msvc-upgrade-solution-up-to-vc11.patch +) + +if(VCPKG_TARGET_IS_WINDOWS) + + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(platform "ARM64") + set(machine "ARM64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(platform "ARM") + set(machine "ARM") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(platform "x64") + set(machine "x64") + else() + set(platform "Win32") + set(machine "x86") + endif() + + file(READ "${SOURCE_PATH}/vc_solution/vc11_lame.sln" sln_con) + string(REPLACE "|Win32" "|${platform}" sln_con "${sln_con}") + string(REPLACE "\"vc11_" "\"${machine}_vc11_" sln_con "${sln_con}") + file(WRITE "${SOURCE_PATH}/vc_solution/${machine}_vc11_lame.sln" "${sln_con}") + + + file(GLOB vcxprojs RELATIVE "${SOURCE_PATH}/vc_solution" "${SOURCE_PATH}/vc_solution/vc11_*.vcxproj") + foreach(vcxproj ${vcxprojs}) + file(READ "${SOURCE_PATH}/vc_solution/${vcxproj}" vcxproj_con) + + if(NOT VCPKG_CRT_LINKAGE STREQUAL dynamic) + string(REPLACE "DLL" "" vcxproj_con "${vcxproj_con}") + endif() + + string(REPLACE "/machine:x86" "/machine:${machine}" vcxproj_con "${vcxproj_con}") + string(REPLACE "Win32" "${platform}" vcxproj_con "${vcxproj_con}") + string(REPLACE "|Win32" "|${platform}" vcxproj_con "${vcxproj_con}") + string(REPLACE "Include=\"vc11_" "Include=\"${machine}_vc11_" vcxproj_con "${vcxproj_con}") + + if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + string(REPLACE "/APPCONTAINER" "" vcxproj_con "${vcxproj_con}") + endif() + + file(WRITE "${SOURCE_PATH}/vc_solution/${machine}_${vcxproj}" "${vcxproj_con}") + endforeach() + + vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH "vc_solution/${machine}_vc11_lame.sln" + TARGET "lame" + PLATFORM "${platform}" + ) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libmp3lame.lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libmp3lame.lib) + endif() + set(MP3LAME_LIB "libmp3lame-static.lib") + else() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libmp3lame-static.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libmpghip-static.lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libmp3lame-static.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libmpghip-static.lib) + endif() + set(MP3LAME_LIB "libmp3lame.lib") + endif() + +else() + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(OPTIONS --enable-static=yes --enable-shared=no) + set(MP3LAME_LIB "libmp3lame.a") + else() + set(OPTIONS --enable-shared=yes --enable-static=no) + set(MP3LAME_LIB "libmp3lame.so") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND ${SOURCE_PATH}/configure ${OPTIONS} --with-pic=yes --prefix=${CURRENT_PACKAGES_DIR}/debug + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME configure-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Building ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND make -j install "CFLAGS=${CFLAGS}" "LDFLAGS=${LDFLAGS}" + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME install-${TARGET_TRIPLET}-dbg + ) + + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/bin + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ) + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND ${SOURCE_PATH}/configure ${OPTIONS} --with-pic=yes --prefix=${CURRENT_PACKAGES_DIR} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME configure-${TARGET_TRIPLET}-rel + ) + + message(STATUS "Building ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND make -j install "CFLAGS=${CFLAGS}" "LDFLAGS=${LDFLAGS}" + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME install-${TARGET_TRIPLET}-rel + ) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + endif() + + endif() + +endif() + +file(COPY ${SOURCE_PATH}/include/lame.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/lame) +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) +configure_file(${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in ${CURRENT_PACKAGES_DIR}/share/mp3lame/mp3lame-config.cmake @ONLY) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/mp3lame/usage b/vcpkg/ports/mp3lame/usage new file mode 100644 index 0000000..6efb86c --- /dev/null +++ b/vcpkg/ports/mp3lame/usage @@ -0,0 +1,4 @@ +The package mp3lame provides CMake targets: + + find_package(mp3lame CONFIG REQUIRED) + target_link_libraries(main PRIVATE mp3lame::mp3lame) diff --git a/vcpkg/ports/mpark-variant/CONTROL b/vcpkg/ports/mpark-variant/CONTROL new file mode 100644 index 0000000..45cd9e2 --- /dev/null +++ b/vcpkg/ports/mpark-variant/CONTROL @@ -0,0 +1,3 @@ +Source: mpark-variant +Version: 1.4.0 +Description: an implementation of C++17 std::variant for C++11/14/17. diff --git a/vcpkg/ports/mpark-variant/portfile.cmake b/vcpkg/ports/mpark-variant/portfile.cmake new file mode 100644 index 0000000..c601035 --- /dev/null +++ b/vcpkg/ports/mpark-variant/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mpark/variant + REF v1.4.0 + SHA512 598ef21824f9cd7586f88de5a51bfe24dde4c492e8e6b8288d2912920812c48fd01c54d9683e1620cb034563c4eac737a382620e6b4af473808a2e77017a89e3 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/mpark_variant TARGET_PATH share/mpark_variant) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +file(INSTALL + ${SOURCE_PATH}/LICENSE.md + DESTINATION ${CURRENT_PACKAGES_DIR}/share/mpark-variant RENAME copyright) diff --git a/vcpkg/ports/mpfr/CMakeLists.txt b/vcpkg/ports/mpfr/CMakeLists.txt new file mode 100644 index 0000000..6664e99 --- /dev/null +++ b/vcpkg/ports/mpfr/CMakeLists.txt @@ -0,0 +1,281 @@ +cmake_minimum_required(VERSION 3.3.0) + +project(MPFR VERSION 4.0.2 LANGUAGES C) + +# Find GMP (or MPIR) +find_library(GMP_LIBRARY NAMES gmp mpir) +find_path(GMP_INCLUDE_DIR "gmp.h") + +set(GMP_LIBRARIES ${GMP_LIBRARY}) +set(GMP_INCLUDE_DIRS ${GMP_INCLUDE_DIR}) + +# Sources +set(SRCS + src/abort_prec_max.c + src/acos.c + src/acosh.c + src/add.c + src/add1.c + src/add1sp.c + src/add_d.c + src/add_ui.c + src/agm.c + src/ai.c + src/asin.c + src/asinh.c + src/atan.c + src/atan2.c + src/atanh.c + src/bernoulli.c + src/beta.c + src/buildopt.c + src/cache.c + src/cbrt.c + src/check.c + src/clear.c + src/clears.c + src/cmp.c + src/cmp2.c + src/cmp_abs.c + src/cmp_d.c + src/cmp_ld.c + src/cmp_si.c + src/cmp_ui.c + src/comparisons.c + src/constant.c + src/const_catalan.c + src/const_euler.c + src/const_log2.c + src/const_pi.c + src/copysign.c + src/cos.c + src/cosh.c + src/cot.c + src/coth.c + src/csc.c + src/csch.c + src/digamma.c + src/dim.c + src/div.c + src/div_2exp.c + src/div_2si.c + src/div_2ui.c + src/div_d.c + src/div_ui.c + src/dump.c + src/d_div.c + src/d_sub.c + src/eint.c + src/eq.c + src/erandom.c + src/erf.c + src/erfc.c + src/exceptions.c + src/exp.c + src/exp10.c + src/exp2.c + src/exp3.c + src/expm1.c + src/exp_2.c + src/extract.c + src/factorial.c + src/fits_intmax.c + src/fits_sint.c + src/fits_slong.c + src/fits_sshort.c + src/fits_uint.c + src/fits_uintmax.c + src/fits_ulong.c + src/fits_ushort.c + src/fma.c + src/fmma.c + src/fms.c + src/frac.c + src/free_cache.c + src/frexp.c + src/gamma.c + src/gammaonethird.c + src/gamma_inc.c + src/get_d.c + src/get_d64.c + src/get_exp.c + src/get_f.c + src/get_float128.c + src/get_flt.c + src/get_ld.c + src/get_patches.c + src/get_q.c + src/get_si.c + src/get_sj.c + src/get_str.c + src/get_ui.c + src/get_uj.c + src/get_z.c + src/get_z_exp.c + src/gmp_op.c + src/grandom.c + src/hypot.c + src/init.c + src/init2.c + src/inits.c + src/inits2.c + src/inp_str.c + src/int_ceil_log2.c + src/isinf.c + src/isinteger.c + src/isnan.c + src/isnum.c + src/isqrt.c + src/isregular.c + src/iszero.c + src/jn.c + src/li2.c + src/lngamma.c + src/log.c + src/log10.c + src/log1p.c + src/log2.c + src/logging.c + src/log_ui.c + src/minmax.c + src/min_prec.c + src/modf.c + src/mpfr-gmp.c + src/mpfr-mini-gmp.c + src/mpn_exp.c + src/mp_clz_tab.c + src/mul.c + src/mulders.c + src/mul_2exp.c + src/mul_2si.c + src/mul_2ui.c + src/mul_d.c + src/mul_ui.c + src/neg.c + src/next.c + src/nrandom.c + src/odd_p.c + src/out_str.c + src/pool.c + src/pow.c + src/powerof2.c + src/pow_si.c + src/pow_ui.c + src/pow_z.c + src/printf.c + src/print_raw.c + src/print_rnd_mode.c + src/random_deviate.c + src/rec_sqrt.c + src/reldiff.c + src/rem1.c + src/rint.c + src/rndna.c + src/root.c + src/round_near_x.c + src/round_p.c + src/round_prec.c + src/scale2.c + src/sec.c + src/sech.c + src/set.c + src/setmax.c + src/setmin.c + src/setsign.c + src/set_d.c + src/set_d64.c + src/set_dfl_prec.c + src/set_exp.c + src/set_f.c + src/set_float128.c + src/set_flt.c + src/set_inf.c + src/set_ld.c + src/set_nan.c + src/set_prc_raw.c + src/set_prec.c + src/set_q.c + src/set_rnd.c + src/set_si.c + src/set_si_2exp.c + src/set_sj.c + src/set_str.c + src/set_str_raw.c + src/set_ui.c + src/set_ui_2exp.c + src/set_uj.c + src/set_z.c + src/set_zero.c + src/set_z_exp.c + src/sgn.c + src/signbit.c + src/sin.c + src/sinh.c + src/sinh_cosh.c + src/sin_cos.c + src/si_op.c + src/sqr.c + src/sqrt.c + src/sqrt_ui.c + src/stack_interface.c + src/strtofr.c + src/sub.c + src/sub1.c + src/sub1sp.c + src/subnormal.c + src/sub_d.c + src/sub_ui.c + src/sum.c + src/swap.c + src/tan.c + src/tanh.c + src/ubf.c + src/uceil_exp2.c + src/uceil_log2.c + src/ufloor_log2.c + src/ui_div.c + src/ui_pow.c + src/ui_pow_ui.c + src/ui_sub.c + src/urandom.c + src/urandomb.c + src/vasprintf.c + src/version.c + src/volatile.c + src/yn.c + src/zeta.c + src/zeta_ui.c) + +configure_file("src/mparam_h.in" "mparam.h") + +# Create and configure the target +add_library(mpfr ${SRCS}) + +# target_compile_definitions(mpfr PRIVATE HAVE_CONFIG_H) +target_compile_definitions(mpfr PRIVATE __MPFR_WITHIN_MPFR) +target_compile_definitions(mpfr PRIVATE HAVE_STDINT_H) +target_compile_definitions(mpfr PRIVATE HAVE_STDARG) +if(BUILD_SHARED_LIBS) + target_compile_definitions(mpfr PRIVATE __GMP_LIBGMP_DLL) +endif() + +target_link_libraries(mpfr ${GMP_LIBRARIES}) + +target_include_directories(mpfr PUBLIC ${GMP_INCLUDE_DIRS}) +target_include_directories(mpfr PRIVATE ${CMAKE_BINARY_DIR}) +target_include_directories(mpfr PRIVATE ${PROJECT_SOURCE_DIR}) +target_include_directories(mpfr PRIVATE ${PROJECT_SOURCE_DIR}/src) + +# Install +install( + TARGETS mpfr + EXPORT MPFRExports + RUNTIME DESTINATION "bin" + LIBRARY DESTINATION "lib" + ARCHIVE DESTINATION "lib" + ) + +install( + FILES src/mpfr.h + DESTINATION "include" +) diff --git a/vcpkg/ports/mpfr/CONTROL b/vcpkg/ports/mpfr/CONTROL new file mode 100644 index 0000000..050de1d --- /dev/null +++ b/vcpkg/ports/mpfr/CONTROL @@ -0,0 +1,5 @@ +Source: mpfr +Version: 4.0.2-2 +Homepage: https://www.mpfr.org +Description: The MPFR library is a C library for multiple-precision floating-point computations with correct rounding +Build-Depends: mpir diff --git a/vcpkg/ports/mpfr/portfile.cmake b/vcpkg/ports/mpfr/portfile.cmake new file mode 100644 index 0000000..2e202a5 --- /dev/null +++ b/vcpkg/ports/mpfr/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_download_distfile(ARCHIVE + URLS "http://www.mpfr.org/mpfr-4.0.2/mpfr-4.0.2.tar.xz" "https://ftp.gnu.org/gnu/mpfr/mpfr-4.0.2.tar.xz" + FILENAME "mpfr-4.0.2.tar.xz" + SHA512 d583555d08863bf36c89b289ae26bae353d9a31f08ee3894520992d2c26e5683c4c9c193d7ad139632f71c0a476d85ea76182702a98bf08dde7b6f65a54f8b88 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/mpg123/0001-fix-crt-linking.patch b/vcpkg/ports/mpg123/0001-fix-crt-linking.patch new file mode 100644 index 0000000..c0a74c3 --- /dev/null +++ b/vcpkg/ports/mpg123/0001-fix-crt-linking.patch @@ -0,0 +1,88 @@ +From fcf5f82c9abeb6068be26dc43f613a253cac3436 Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka +Date: Mon, 13 Mar 2017 02:59:35 +0300 +Subject: [PATCH] ports/msvc/libmpg123: fix static library linking + +--- + ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj b/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj +index 0a69525..ecf3a66 100644 +--- a/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj ++++ b/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj +@@ -265,7 +265,7 @@ + + + EnableFastChecks +- MultiThreadedDebugDLL ++ MultiThreadedDebug + false + Level3 + ProgramDatabase +@@ -285,7 +285,7 @@ + + + EnableFastChecks +- MultiThreadedDebugDLL ++ MultiThreadedDebug + false + Level3 + ProgramDatabase +@@ -312,7 +312,7 @@ + WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;%(PreprocessorDefinitions) + + +- MultiThreadedDLL ++ MultiThreaded + false + false + Level3 +@@ -336,7 +336,7 @@ + WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;%(PreprocessorDefinitions) + + +- MultiThreadedDLL ++ MultiThreaded + false + false + Level3 +@@ -474,7 +474,7 @@ + + + EnableFastChecks +- MultiThreadedDebugDLL ++ MultiThreadedDebug + false + Level3 + ProgramDatabase +@@ -562,7 +562,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(IntDir)synth_stereo_sse_ + + + EnableFastChecks +- MultiThreadedDebugDLL ++ MultiThreadedDebug + false + Level3 + ProgramDatabase +@@ -623,7 +623,7 @@ yasm -a x86 -m amd64 -f win64 -p gas -r raw -g null -o "$(IntDir)synth_stereo_x8 + WIN32;_CRT_SECURE_NO_WARNINGS;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;%(PreprocessorDefinitions) + + +- MultiThreadedDLL ++ MultiThreaded + false + false + Level3 +@@ -716,7 +716,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(IntDir)synth_stereo_sse_ + WIN32;_CRT_SECURE_NO_WARNINGS;OPT_MULTI;OPT_GENERIC;OPT_X86_64;%(PreprocessorDefinitions) + + +- MultiThreadedDLL ++ MultiThreaded + false + false + Level3 +-- +2.11.0.windows.1 + diff --git a/vcpkg/ports/mpg123/0002-fix-x86-build.patch b/vcpkg/ports/mpg123/0002-fix-x86-build.patch new file mode 100644 index 0000000..2d0b10b --- /dev/null +++ b/vcpkg/ports/mpg123/0002-fix-x86-build.patch @@ -0,0 +1,37 @@ +diff --git a/src/libmpg123/mangle.h b/src/libmpg123/mangle.h +index 6012ccc..bf37cd7 100644 +--- a/src/libmpg123/mangle.h ++++ b/src/libmpg123/mangle.h +@@ -85,6 +85,10 @@ + #define ASM_VALUE(a) MANGLE_MACROCAT($,a) + #endif + ++#if defined(_WIN32) && !defined(_WIN64) ++#define OPT_X86 ++#endif ++ + /* Enable position-independent code for certain platforms. */ + + #if defined(OPT_X86) +@@ -130,7 +134,7 @@ Lpic_base: \ + /* Dummies for everyone else. */ + #define LOCAL_VAR(a) a + #define GLOBAL_VAR ASM_NAME +-#define GLOBAL_VAR_PTR(a) #error Cannot use indirect addressing in non-PIC object. ++#define GLOBAL_VAR_PTR(a) // #error Cannot use indirect addressing in non-PIC object. + #define FUNC ASM_NAME + #define EXTERNAL_FUNC ASM_NAME + #define GET_GOT +diff --git a/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj b/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj +index 1edf77d..f78999b 100644 +--- a/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj ++++ b/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj +@@ -700,7 +700,7 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(IntDir)synth_stereo_sse_ + + + +- Shlwapi.lib;dct36_3dnow.o;dct36_3dnowext.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies) ++ Shlwapi.lib;dct36_3dnow.o;dct36_3dnowext.o;dct36_sse.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies) + $(IntDir);%(AdditionalLibraryDirectories) + true + diff --git a/vcpkg/ports/mpg123/0003-add-arm-configs.patch b/vcpkg/ports/mpg123/0003-add-arm-configs.patch new file mode 100644 index 0000000..d343c76 --- /dev/null +++ b/vcpkg/ports/mpg123/0003-add-arm-configs.patch @@ -0,0 +1,1149 @@ +diff --git a/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj b/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj +index 5849861..4c4e51e 100644 +--- a/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj ++++ b/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj +@@ -1,6 +1,14 @@ +  + + ++ ++ Debug_Generic_Dll ++ ARM ++ ++ ++ Debug_Generic_Dll ++ ARM64 ++ + + Debug_Generic_Dll + Win32 +@@ -9,6 +17,14 @@ + Debug_Generic_Dll + x64 + ++ ++ Debug_Generic ++ ARM ++ ++ ++ Debug_Generic ++ ARM64 ++ + + Debug_Generic + Win32 +@@ -17,6 +33,14 @@ + Debug_Generic + x64 + ++ ++ Debug_x86_Dll ++ ARM ++ ++ ++ Debug_x86_Dll ++ ARM64 ++ + + Debug_x86_Dll + Win32 +@@ -25,6 +49,14 @@ + Debug_x86_Dll + x64 + ++ ++ Debug_x86 ++ ARM ++ ++ ++ Debug_x86 ++ ARM64 ++ + + Debug_x86 + Win32 +@@ -33,6 +65,14 @@ + Debug_x86 + x64 + ++ ++ Release_Generic_Dll ++ ARM ++ ++ ++ Release_Generic_Dll ++ ARM64 ++ + + Release_Generic_Dll + Win32 +@@ -41,6 +81,14 @@ + Release_Generic_Dll + x64 + ++ ++ Release_Generic ++ ARM ++ ++ ++ Release_Generic ++ ARM64 ++ + + Release_Generic + Win32 +@@ -49,6 +97,14 @@ + Release_Generic + x64 + ++ ++ Release_x86_Dll ++ ARM ++ ++ ++ Release_x86_Dll ++ ARM64 ++ + + Release_x86_Dll + Win32 +@@ -57,6 +113,14 @@ + Release_x86_Dll + x64 + ++ ++ Release_x86 ++ ARM ++ ++ ++ Release_x86 ++ ARM64 ++ + + Release_x86 + Win32 +@@ -78,164 +142,311 @@ + true + v140 + ++ ++ DynamicLibrary ++ Unicode ++ true ++ v140 ++ + + DynamicLibrary + Unicode + true + v140 + ++ ++ DynamicLibrary ++ Unicode ++ true ++ v140 ++ + + DynamicLibrary + Unicode + v140 + ++ ++ DynamicLibrary ++ Unicode ++ v140 ++ + + DynamicLibrary + Unicode + v140 + ++ ++ DynamicLibrary ++ Unicode ++ v140 ++ + + StaticLibrary + Unicode + true + v140 + ++ ++ StaticLibrary ++ Unicode ++ true ++ v140 ++ + + StaticLibrary + Unicode + true + v140 + ++ ++ StaticLibrary ++ Unicode ++ true ++ v140 ++ + + StaticLibrary + Unicode + v140 + ++ ++ StaticLibrary ++ Unicode ++ v140 ++ + + StaticLibrary + Unicode + v140 + ++ ++ StaticLibrary ++ Unicode ++ v140 ++ + + DynamicLibrary + Unicode + true + v140 + ++ ++ DynamicLibrary ++ Unicode ++ true ++ v140 ++ + + DynamicLibrary + Unicode + true + v140 + ++ ++ DynamicLibrary ++ Unicode ++ true ++ v140 ++ + + DynamicLibrary + Unicode + v140 + ++ ++ DynamicLibrary ++ Unicode ++ v140 ++ + + DynamicLibrary + Unicode + v140 + ++ ++ DynamicLibrary ++ Unicode ++ v140 ++ + + StaticLibrary + Unicode + true + v140 + ++ ++ StaticLibrary ++ Unicode ++ true ++ v140 ++ + + StaticLibrary + Unicode + true + v140 + ++ ++ StaticLibrary ++ Unicode ++ true ++ v140 ++ + + StaticLibrary + Unicode + v140 + ++ ++ StaticLibrary ++ Unicode ++ v140 ++ + + StaticLibrary + Unicode + v140 + ++ ++ StaticLibrary ++ Unicode ++ v140 ++ + + + + + + ++ ++ ++ + + + ++ ++ ++ + + + ++ ++ ++ + + + ++ ++ ++ + + + ++ ++ ++ + + + ++ ++ ++ + + + ++ ++ ++ + + + ++ ++ ++ + + + ++ ++ ++ + + + ++ ++ ++ + + + ++ ++ ++ + + + ++ ++ ++ + + + ++ ++ ++ + + + ++ ++ ++ + + + ++ ++ ++ + + + ++ ++ ++ + + + <_ProjectFileVersion>10.0.21006.1 + $(SolutionDir)$(Platform)\Debug\ + $(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\Release\ + $(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\Debug\ + $(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\Release\ + $(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\Debug\ + $(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\Release\ + $(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\Debug\ + $(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ + $(SolutionDir)$(Platform)\Release\ + $(Platform)\$(Configuration)\ ++ $(Platform)\$(Configuration)\ + false ++ false + false ++ false + + + $(SolutionDir)$(Platform)\Release\ + ++ + + $(SolutionDir)$(Platform)\Release\ + +@@ -257,6 +468,30 @@ + + $(SolutionDir)$(Platform)\Debug\ + ++ ++ $(SolutionDir)$(Platform)\Release\ ++ ++ ++ $(SolutionDir)$(Platform)\Release\ ++ ++ ++ $(SolutionDir)$(Platform)\Debug\ ++ ++ ++ $(SolutionDir)$(Platform)\Debug\ ++ ++ ++ $(SolutionDir)$(Platform)\Debug\ ++ ++ ++ $(SolutionDir)$(Platform)\Debug\ ++ ++ ++ $(SolutionDir)$(Platform)\Release\ ++ ++ ++ $(SolutionDir)$(Platform)\Release\ ++ + + + Disabled +@@ -277,6 +512,26 @@ + Shlwapi.lib + + ++ ++ ++ Disabled ++ $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\..\src;$(ProjectDir)..\..\..\..\..\src\libmpg123;$(ProjectDir)..\..\..\..\..\src\compat;%(AdditionalIncludeDirectories) ++ WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;_DEBUG;%(PreprocessorDefinitions) ++ ++ ++ EnableFastChecks ++ MultiThreadedDebug ++ false ++ Level3 ++ ProgramDatabase ++ CompileAsC ++ 4996;%(DisableSpecificWarnings) ++ ++ ++ ++ Shlwapi.lib ++ ++ + + + Disabled +@@ -301,6 +556,30 @@ + Shlwapi.lib;%(AdditionalDependencies) + + ++ ++ ++ Disabled ++ $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\..\src;$(ProjectDir)..\..\..\..\..\src\libmpg123;$(ProjectDir)..\..\..\..\..\src\compat;%(AdditionalIncludeDirectories) ++ WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;_DEBUG;%(PreprocessorDefinitions) ++ ++ ++ EnableFastChecks ++ MultiThreadedDebug ++ false ++ Level3 ++ ProgramDatabase ++ CompileAsC ++ 4996;%(DisableSpecificWarnings) ++ ++ ++ ++ ++ ++ ++ ++ Shlwapi.lib;%(AdditionalDependencies) ++ ++ + + + MaxSpeed +@@ -325,6 +604,30 @@ + Shlwapi.lib + + ++ ++ ++ MaxSpeed ++ AnySuitable ++ true ++ Speed ++ true ++ $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\..\src;$(ProjectDir)..\..\..\..\..\src\libmpg123;$(ProjectDir)..\..\..\..\..\src\compat;%(AdditionalIncludeDirectories) ++ WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;%(PreprocessorDefinitions) ++ ++ ++ MultiThreaded ++ false ++ false ++ Level3 ++ ProgramDatabase ++ CompileAsC ++ 4996;%(DisableSpecificWarnings) ++ ++ ++ ++ Shlwapi.lib ++ ++ + + + MaxSpeed +@@ -353,6 +656,34 @@ + Shlwapi.lib;%(AdditionalDependencies) + + ++ ++ ++ MaxSpeed ++ AnySuitable ++ true ++ Speed ++ true ++ $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\..\src;$(ProjectDir)..\..\..\..\..\src\libmpg123;$(ProjectDir)..\..\..\..\..\src\compat;%(AdditionalIncludeDirectories) ++ WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;%(PreprocessorDefinitions) ++ ++ ++ MultiThreaded ++ false ++ false ++ Level3 ++ ProgramDatabase ++ CompileAsC ++ 4996;%(DisableSpecificWarnings) ++ ++ ++ ++ ++ ++ ++ ++ Shlwapi.lib;%(AdditionalDependencies) ++ ++ + + + Disabled +@@ -378,6 +709,32 @@ + Shlwapi.lib;%(AdditionalDependencies) + + ++ ++ ++ Disabled ++ $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\..\src;$(ProjectDir)..\..\..\..\..\src\libmpg123;$(ProjectDir)..\..\..\..\..\src\compat;%(AdditionalIncludeDirectories) ++ WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;_DEBUG;BUILD_MPG123_DLL;%(PreprocessorDefinitions) ++ ++ ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ false ++ Level3 ++ false ++ ProgramDatabase ++ CompileAsC ++ 4996;%(DisableSpecificWarnings) ++ ++ ++ DebugFastLink ++ true ++ ++ ++ true ++ false ++ Shlwapi.lib;%(AdditionalDependencies) ++ ++ + + + Disabled +@@ -403,12 +760,98 @@ + true + Shlwapi.lib;%(AdditionalDependencies) + +- +- +- +- ++ ++ ++ ++ ++ ++ ++ ++ Disabled ++ $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\..\src;$(ProjectDir)..\..\..\..\..\src\libmpg123;$(ProjectDir)..\..\..\..\..\src\compat;%(AdditionalIncludeDirectories) ++ WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;_DEBUG;BUILD_MPG123_DLL;%(PreprocessorDefinitions) ++ ++ ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ false ++ Level3 ++ false ++ ProgramDatabase ++ CompileAsC ++ 4996;%(DisableSpecificWarnings) ++ ++ ++ $(IntDir);%(AdditionalLibraryDirectories) ++ DebugFastLink ++ true ++ ++ ++ true ++ false ++ Shlwapi.lib;%(AdditionalDependencies) ++ ++ ++ ++ ++ ++ ++ ++ ++ MaxSpeed ++ AnySuitable ++ true ++ Speed ++ true ++ $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\..\src;$(ProjectDir)..\..\..\..\..\src\libmpg123;$(ProjectDir)..\..\..\..\..\src\compat;%(AdditionalIncludeDirectories) ++ WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;BUILD_MPG123_DLL;%(PreprocessorDefinitions) ++ ++ ++ MultiThreadedDLL ++ false ++ false ++ Level3 ++ false ++ ProgramDatabase ++ CompileAsC ++ 4996;%(DisableSpecificWarnings) ++ ++ ++ 0x63000000 ++ false ++ true ++ Shlwapi.lib;%(AdditionalDependencies) ++ ++ ++ ++ ++ MaxSpeed ++ AnySuitable ++ true ++ Speed ++ true ++ $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\..\src;$(ProjectDir)..\..\..\..\..\src\libmpg123;$(ProjectDir)..\..\..\..\..\src\compat;%(AdditionalIncludeDirectories) ++ WIN32;_CRT_SECURE_NO_WARNINGS;OPT_GENERIC;BUILD_MPG123_DLL;%(PreprocessorDefinitions) ++ ++ ++ MultiThreadedDLL ++ false ++ false ++ Level3 ++ false ++ ProgramDatabase ++ CompileAsC ++ 4996;%(DisableSpecificWarnings) ++ ++ ++ ++ ++ true ++ false ++ Shlwapi.lib;%(AdditionalDependencies) ++ + +- ++ + + MaxSpeed + AnySuitable +@@ -434,8 +877,12 @@ + true + Shlwapi.lib;%(AdditionalDependencies) + ++ ++ ++ ++ + +- ++ + + MaxSpeed + AnySuitable +@@ -456,9 +903,10 @@ + 4996;%(DisableSpecificWarnings) + + +- 0x63000000 +- false +- true ++ ++ ++ true ++ false + Shlwapi.lib;%(AdditionalDependencies) + + +@@ -554,6 +1002,30 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(IntDir)synth_stereo_sse_ + $(IntDir);%(AdditionalLibraryDirectories) + + ++ ++ ++ Disabled ++ $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\..\src;$(ProjectDir)..\..\..\..\..\src\libmpg123;$(ProjectDir)..\..\..\..\..\src\compat;%(AdditionalIncludeDirectories) ++ WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;%(PreprocessorDefinitions) ++ ++ ++ EnableFastChecks ++ MultiThreadedDebug ++ false ++ Level3 ++ ProgramDatabase ++ CompileAsC ++ 4996;%(DisableSpecificWarnings) ++ ++ ++ ++ ++ ++ ++ Shlwapi.lib;dct36_3dnow.o;dct36_3dnowext.o;dct36_sse.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies) ++ $(IntDir);%(AdditionalLibraryDirectories) ++ ++ + + + Disabled +@@ -612,6 +1084,30 @@ yasm -a x86 -m amd64 -f win64 -p gas -r raw -g null -o "$(IntDir)synth_stereo_x8 + $(IntDir);%(AdditionalLibraryDirectories) + + ++ ++ ++ Disabled ++ $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\..\src;$(ProjectDir)..\..\..\..\..\src\libmpg123;$(ProjectDir)..\..\..\..\..\src\compat;%(AdditionalIncludeDirectories) ++ WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;OPT_MULTI;OPT_GENERIC;OPT_X86_64;%(PreprocessorDefinitions) ++ ++ ++ EnableFastChecks ++ MultiThreadedDebug ++ false ++ Level3 ++ ProgramDatabase ++ CompileAsC ++ 4996;%(DisableSpecificWarnings) ++ ++ ++ ++ ++ ++ ++ Shlwapi.lib;getcpuflags_x86_64.o;dct36_x86_64.o;synth_x86_64_float.o;synth_x86_64_s32.o;synth_stereo_x86_64_float.o;synth_stereo_x86_64_s32.o;synth_x86_64.o;dct64_x86_64.o;dct64_x86_64_float.o;synth_stereo_x86_64.o;synth_x86_64_accurate.o;synth_stereo_x86_64_accurate.o;%(AdditionalDependencies) ++ $(IntDir);%(AdditionalLibraryDirectories) ++ ++ + + + MaxSpeed +@@ -705,6 +1201,35 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(IntDir)synth_stereo_sse_ + true + + ++ ++ ++ MaxSpeed ++ AnySuitable ++ true ++ Speed ++ true ++ $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\..\src;$(ProjectDir)..\..\..\..\..\src\libmpg123;$(ProjectDir)..\..\..\..\..\src\compat;%(AdditionalIncludeDirectories) ++ WIN32;_CRT_SECURE_NO_WARNINGS;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;%(PreprocessorDefinitions) ++ ++ ++ MultiThreaded ++ false ++ false ++ Level3 ++ ProgramDatabase ++ CompileAsC ++ 4996;%(DisableSpecificWarnings) ++ ++ ++ ++ ++ ++ ++ Shlwapi.lib;dct36_3dnow.o;dct36_3dnowext.o;dct36_sse.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies) ++ $(IntDir);%(AdditionalLibraryDirectories) ++ true ++ ++ + + + MaxSpeed +@@ -768,6 +1293,35 @@ yasm -a x86 -m amd64 -f win64 -p gas -r raw -g null -o "$(IntDir)synth_stereo_x8 + true + + ++ ++ ++ MaxSpeed ++ AnySuitable ++ true ++ Speed ++ true ++ $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\..\src;$(ProjectDir)..\..\..\..\..\src\libmpg123;$(ProjectDir)..\..\..\..\..\src\compat;%(AdditionalIncludeDirectories) ++ WIN32;_CRT_SECURE_NO_WARNINGS;OPT_MULTI;OPT_GENERIC;OPT_X86_64;%(PreprocessorDefinitions) ++ ++ ++ MultiThreaded ++ false ++ false ++ Level3 ++ ProgramDatabase ++ CompileAsC ++ 4996;%(DisableSpecificWarnings) ++ ++ ++ ++ ++ ++ ++ Shlwapi.lib;getcpuflags_x86_64.o;dct36_x86_64.o;synth_x86_64_float.o;synth_x86_64_s32.o;synth_stereo_x86_64_float.o;synth_stereo_x86_64_s32.o;synth_x86_64.o;dct64_x86_64.o;dct64_x86_64_float.o;synth_stereo_x86_64.o;synth_x86_64_accurate.o;synth_stereo_x86_64_accurate.o;%(AdditionalDependencies) ++ $(IntDir);%(AdditionalLibraryDirectories) ++ true ++ ++ + + + Disabled +@@ -862,6 +1416,36 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(IntDir)synth_stereo_sse_ + false + + ++ ++ ++ Disabled ++ $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\..\src;$(ProjectDir)..\..\..\..\..\src\libmpg123;$(ProjectDir)..\..\..\..\..\src\compat;%(AdditionalIncludeDirectories) ++ WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;BUILD_MPG123_DLL;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;%(PreprocessorDefinitions) ++ ++ ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ false ++ Level3 ++ false ++ ProgramDatabase ++ CompileAsC ++ 4996;%(DisableSpecificWarnings) ++ ++ ++ ++ ++ ++ ++ Shlwapi.lib;dct36_3dnow.o;dct36_3dnowext.o;dct36_sse.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies) ++ $(IntDir);%(AdditionalLibraryDirectories) ++ DebugFastLink ++ true ++ 0x63000000 ++ true ++ false ++ ++ + + + Disabled +@@ -926,6 +1510,36 @@ yasm -a x86 -m amd64 -f win64 -p gas -r raw -g null -o "$(IntDir)synth_stereo_x8 + false + + ++ ++ ++ Disabled ++ $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\..\src;$(ProjectDir)..\..\..\..\..\src\libmpg123;$(ProjectDir)..\..\..\..\..\src\compat;%(AdditionalIncludeDirectories) ++ WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;BUILD_MPG123_DLL;OPT_MULTI;OPT_GENERIC;OPT_X86_64;%(PreprocessorDefinitions) ++ ++ ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ false ++ Level3 ++ false ++ ProgramDatabase ++ CompileAsC ++ 4996;%(DisableSpecificWarnings) ++ ++ ++ ++ ++ ++ ++ Shlwapi.lib;getcpuflags_x86_64.o;dct36_x86_64.o;synth_x86_64_float.o;synth_x86_64_s32.o;synth_stereo_x86_64_float.o;synth_stereo_x86_64_s32.o;synth_x86_64.o;dct64_x86_64.o;dct64_x86_64_float.o;synth_stereo_x86_64.o;synth_x86_64_accurate.o;synth_stereo_x86_64_accurate.o;%(AdditionalDependencies) ++ $(IntDir);%(AdditionalLibraryDirectories) ++ DebugFastLink ++ true ++ 0x63000000 ++ true ++ false ++ ++ + + + +@@ -1030,6 +1644,46 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(IntDir)synth_stereo_sse_ + + + ++ ++ ++ ++ ++ ++ ++ MaxSpeed ++ AnySuitable ++ true ++ Speed ++ true ++ $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\..\src;$(ProjectDir)..\..\..\..\..\src\libmpg123;$(ProjectDir)..\..\..\..\..\src\compat;%(AdditionalIncludeDirectories) ++ WIN32;_CRT_SECURE_NO_WARNINGS;BUILD_MPG123_DLL;OPT_MULTI;OPT_GENERIC;OPT_I386;OPT_I586;OPT_MMX;OPT_3DNOW;OPT_3DNOWEXT;OPT_SSE;%(PreprocessorDefinitions) ++ ++ ++ MultiThreadedDLL ++ false ++ false ++ Level3 ++ false ++ ProgramDatabase ++ CompileAsC ++ 4996;%(DisableSpecificWarnings) ++ ++ ++ ++ ++ ++ ++ Shlwapi.lib;dct36_3dnow.o;dct36_3dnowext.o;dct36_sse.o;dct64_3dnow.o;dct64_3dnowext.o;dct64_mmx.o;dct64_sse.o;dct64_sse_float.o;equalizer_3dnow.o;getcpuflags.o;synth_3dnow.o;synth_3dnowext.o;synth_i586.o;synth_mmx.o;synth_sse.o;synth_sse_float.o;synth_stereo_sse_float.o;tabinit_mmx.o;synth_sse_accurate.o;synth_sse_s32.o;synth_stereo_sse_accurate.o;synth_stereo_sse_s32.o;%(AdditionalDependencies) ++ $(IntDir);%(AdditionalLibraryDirectories) ++ 0x63000000 ++ false ++ true ++ ++ ++ ++ ++ ++ + + + +@@ -1102,37 +1756,99 @@ yasm -a x86 -m amd64 -f win64 -p gas -r raw -g null -o "$(IntDir)synth_stereo_x8 + + + ++ ++ ++ ++ ++ ++ ++ MaxSpeed ++ AnySuitable ++ true ++ Speed ++ true ++ $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\..\src;$(ProjectDir)..\..\..\..\..\src\libmpg123;$(ProjectDir)..\..\..\..\..\src\compat;%(AdditionalIncludeDirectories) ++ WIN32;_CRT_SECURE_NO_WARNINGS;BUILD_MPG123_DLL;OPT_MULTI;OPT_GENERIC;OPT_X86_64;%(PreprocessorDefinitions) ++ ++ ++ MultiThreadedDLL ++ false ++ false ++ Level3 ++ CompileAsC ++ 4996;%(DisableSpecificWarnings) ++ ++ ++ ++ ++ ++ ++ Shlwapi.lib;getcpuflags_x86_64.o;dct36_x86_64.o;synth_x86_64_float.o;synth_x86_64_s32.o;synth_stereo_x86_64_float.o;synth_stereo_x86_64_s32.o;synth_x86_64.o;dct64_x86_64.o;dct64_x86_64_float.o;synth_stereo_x86_64.o;synth_x86_64_accurate.o;synth_stereo_x86_64_accurate.o;%(AdditionalDependencies) ++ $(IntDir);%(AdditionalLibraryDirectories) ++ 0x63000000 ++ false ++ true ++ ++ ++ ++ ++ ++ + + + + + + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + + + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + + + +@@ -1156,21 +1872,37 @@ yasm -a x86 -m amd64 -f win64 -p gas -r raw -g null -o "$(IntDir)synth_stereo_x8 + + + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + true ++ true + + + diff --git a/vcpkg/ports/mpg123/0004-add-arm64-uwp-config.patch b/vcpkg/ports/mpg123/0004-add-arm64-uwp-config.patch new file mode 100644 index 0000000..be18b6a --- /dev/null +++ b/vcpkg/ports/mpg123/0004-add-arm64-uwp-config.patch @@ -0,0 +1,181 @@ +diff --git a/ports/MSVC++/2015/uwp/libmpg123.sln b/ports/MSVC++/2015/uwp/libmpg123.sln +index 6e4eaee..ecedd3d 100644 +--- a/ports/MSVC++/2015/uwp/libmpg123.sln ++++ b/ports/MSVC++/2015/uwp/libmpg123.sln +@@ -8,21 +8,27 @@ EndProject + Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM = Debug|ARM ++ Debug|ARM64 = Debug|ARM64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|ARM = Release|ARM ++ Release|ARM64 = Release|ARM64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Debug|ARM.ActiveCfg = Debug|ARM + {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Debug|ARM.Build.0 = Debug|ARM ++ {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Debug|ARM64.ActiveCfg = Debug|ARM64 ++ {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Debug|ARM64.Build.0 = Debug|ARM64 + {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Debug|x64.ActiveCfg = Debug|x64 + {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Debug|x64.Build.0 = Debug|x64 + {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Debug|x86.ActiveCfg = Debug|Win32 + {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Debug|x86.Build.0 = Debug|Win32 + {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Release|ARM.ActiveCfg = Release|ARM + {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Release|ARM.Build.0 = Release|ARM ++ {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Release|ARM64.ActiveCfg = Release|ARM64 ++ {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Release|ARM64.Build.0 = Release|ARM64 + {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Release|x64.ActiveCfg = Release|x64 + {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Release|x64.Build.0 = Release|x64 + {2411FC2F-79ED-4787-A143-DE3644B0FBF5}.Release|x86.ActiveCfg = Release|Win32 +diff --git a/ports/MSVC++/2015/uwp/libmpg123/libmpg123.vcxproj b/ports/MSVC++/2015/uwp/libmpg123/libmpg123.vcxproj +index 0e54f92..91f40db 100644 +--- a/ports/MSVC++/2015/uwp/libmpg123/libmpg123.vcxproj ++++ b/ports/MSVC++/2015/uwp/libmpg123/libmpg123.vcxproj +@@ -5,6 +5,10 @@ + Debug + ARM + ++ ++ Debug ++ ARM64 ++ + + Debug + Win32 +@@ -17,6 +21,10 @@ + Release + ARM + ++ ++ Release ++ ARM64 ++ + + Release + Win32 +@@ -76,6 +84,8 @@ + true + true + true ++ true ++ true + + + +@@ -105,6 +115,8 @@ + true + true + true ++ true ++ true + + + +@@ -206,6 +218,11 @@ + true + v140 + ++ ++ DynamicLibrary ++ true ++ v140 ++ + + DynamicLibrary + true +@@ -221,6 +238,11 @@ + false + v140 + ++ ++ DynamicLibrary ++ false ++ v140 ++ + + DynamicLibrary + false +@@ -240,9 +262,15 @@ + + + ++ ++ ++ + + + ++ ++ ++ + + + +@@ -273,6 +301,15 @@ + false + false + ++ ++ false ++ false ++ ++ ++ false ++ false ++ false ++ + + false + false +@@ -497,6 +534,48 @@ yasm -a x86 -p gas -r raw -f win32 -g null -m x86 -o "$(IntDir)synth_stereo_sse_ + + + ++ ++ ++ NotUsing ++ false ++ $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\..\src;$(ProjectDir)..\..\..\..\..\src\libmpg123;$(ProjectDir)..\..\..\..\..\src\compat;%(AdditionalIncludeDirectories) ++ WIN32;_CRT_SECURE_NO_WARNINGS;BUILD_MPG123_DLL;OPT_MULTI;OPT_GENERIC;%(PreprocessorDefinitions) ++ CompileAsC ++ 4996;%(DisableSpecificWarnings) ++ ++ ++ Console ++ false ++ false ++ $(OutDir) ++ Default ++ ++ ++ ++ ++ ++ ++ ++ ++ NotUsing ++ false ++ $(ProjectDir)..\..\..;$(ProjectDir)..\..\..\..\..\src;$(ProjectDir)..\..\..\..\..\src\libmpg123;$(ProjectDir)..\..\..\..\..\src\compat;%(AdditionalIncludeDirectories) ++ WIN32;_CRT_SECURE_NO_WARNINGS;BUILD_MPG123_DLL;OPT_MULTI;OPT_GENERIC;%(PreprocessorDefinitions) ++ CompileAsC ++ 4996;%(DisableSpecificWarnings) ++ MultiThreadedDLL ++ ++ ++ Console ++ false ++ false ++ $(OutDir) ++ ++ ++ ++ ++ ++ + + + NotUsing diff --git a/vcpkg/ports/mpg123/CONTROL b/vcpkg/ports/mpg123/CONTROL new file mode 100644 index 0000000..3e7705a --- /dev/null +++ b/vcpkg/ports/mpg123/CONTROL @@ -0,0 +1,5 @@ +Source: mpg123 +Version: 1.25.8 +Port-Version: 13 +Homepage: https://sourceforge.net/projects/mpg123/ +Description: mpg123 is a real time MPEG 1.0/2.0/2.5 audio player/decoder for layers 1, 2 and 3 (MPEG 1.0 layer 3 also known as MP3). diff --git a/vcpkg/ports/mpg123/portfile.cmake b/vcpkg/ports/mpg123/portfile.cmake new file mode 100644 index 0000000..9438c58 --- /dev/null +++ b/vcpkg/ports/mpg123/portfile.cmake @@ -0,0 +1,155 @@ +set(MPG123_VERSION 1.25.8) +set(MPG123_HASH f226317dddb07841a13753603fa13c0a867605a5a051626cb30d45cfba266d3d4296f5b8254f65b403bb5eef6addce1784ae8829b671a746854785cda1bad203) + +#architecture detection +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(MPG123_ARCH Win32) + set(MPG123_CONFIGURATION _x86) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(MPG123_ARCH x64) + set(MPG123_CONFIGURATION _x86) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(MPG123_ARCH ARM) + set(MPG123_CONFIGURATION _Generic) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(MPG123_ARCH ARM64) + set(MPG123_CONFIGURATION _Generic) +else() + message(FATAL_ERROR "unsupported architecture") +endif() + +#linking +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(MPG123_CONFIGURATION_SUFFIX _Dll) +endif() + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO mpg123/mpg123 + REF ${MPG123_VERSION} + FILENAME "mpg123-${MPG123_VERSION}.tar.bz2" + SHA512 ${MPG123_HASH} + PATCHES + 0001-fix-crt-linking.patch + 0002-fix-x86-build.patch + 0003-add-arm-configs.patch + 0004-add-arm64-uwp-config.patch +) + +vcpkg_find_acquire_program(YASM) +get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY) +set(ENV{PATH} "$ENV{PATH};${YASM_EXE_PATH}") + +if(VCPKG_TARGET_IS_UWP) + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/ports/MSVC++/2015/uwp/libmpg123/libmpg123.vcxproj + OPTIONS /p:UseEnv=True + ) + + message(STATUS "Installing") + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/2015/uwp/libmpg123/${MPG123_ARCH}/Debug/libmpg123/libmpg123.dll + ${SOURCE_PATH}/ports/MSVC++/2015/uwp/libmpg123/${MPG123_ARCH}/Debug/libmpg123/libmpg123.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/2015/uwp/libmpg123/${MPG123_ARCH}/Debug/libmpg123/libmpg123.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/2015/uwp/libmpg123/${MPG123_ARCH}/Release/libmpg123/libmpg123.dll + ${SOURCE_PATH}/ports/MSVC++/2015/uwp/libmpg123/${MPG123_ARCH}/Release/libmpg123/libmpg123.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/2015/uwp/libmpg123/${MPG123_ARCH}/Release/libmpg123/libmpg123.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/mpg123.h + ${SOURCE_PATH}/src/libmpg123/fmt123.h + ${SOURCE_PATH}/src/libmpg123/mpg123.h.in + DESTINATION ${CURRENT_PACKAGES_DIR}/include + ) +elseif(VCPKG_TARGET_IS_WINDOWS) + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/libmpg123.vcxproj + OPTIONS /p:UseEnv=True + RELEASE_CONFIGURATION Release${MPG123_CONFIGURATION}${MPG123_CONFIGURATION_SUFFIX} + DEBUG_CONFIGURATION Debug${MPG123_CONFIGURATION}${MPG123_CONFIGURATION_SUFFIX} + ) + + message(STATUS "Installing") + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.dll + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.dll + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) + else() + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug_x86/libmpg123.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release_x86/libmpg123.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) + endif() + + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Debug/libmpg123.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/2015/win32/libmpg123/${MPG123_ARCH}/Release/libmpg123.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) + file(INSTALL + ${SOURCE_PATH}/ports/MSVC++/mpg123.h + ${SOURCE_PATH}/src/libmpg123/fmt123.h + ${SOURCE_PATH}/src/libmpg123/mpg123.h.in + DESTINATION ${CURRENT_PACKAGES_DIR}/include + ) +elseif(VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_LINUX) + set(MPG123_OPTIONS + --disable-dependency-tracking + ) + + # Find cross-compiler prefix + if(VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + include("${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") + endif() + if(CMAKE_C_COMPILER) + vcpkg_execute_required_process( + COMMAND ${CMAKE_C_COMPILER} -dumpmachine + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} + LOGNAME dumpmachine-${TARGET_TRIPLET} + ) + file(READ ${CURRENT_BUILDTREES_DIR}/dumpmachine-${TARGET_TRIPLET}-out.log MPG123_HOST) + string(REPLACE "\n" "" MPG123_HOST "${MPG123_HOST}") + message(STATUS "Cross-compiling with ${CMAKE_C_COMPILER}") + message(STATUS "Detected autoconf triplet --host=${MPG123_HOST}") + set(MPG123_OPTIONS + --host=${MPG123_HOST} + ${MPG123_OPTIONS} + ) + endif() + + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS ${MPG123_OPTIONS} + ) + vcpkg_install_make() + + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +message(STATUS "Installing done") diff --git a/vcpkg/ports/mpi/CONTROL b/vcpkg/ports/mpi/CONTROL new file mode 100644 index 0000000..b5db97f --- /dev/null +++ b/vcpkg/ports/mpi/CONTROL @@ -0,0 +1,4 @@ +Source: mpi +Version: 1 +Description: Message Passing Interface (MPI) is a standardized and portable message-passing standard designed by a group of researchers from academia and industry to function on a wide variety of parallel computing architectures. The standard defines the syntax and semantics of a core of library routines useful to a wide range of users writing portable message-passing programs in C, C++, and Fortran. There are several well-tested and efficient implementations of MPI, many of which are open-source or in the public domain. +Build-Depends: msmpi (windows), openmpi (!windows) diff --git a/vcpkg/ports/mpi/portfile.cmake b/vcpkg/ports/mpi/portfile.cmake new file mode 100644 index 0000000..e46edeb --- /dev/null +++ b/vcpkg/ports/mpi/portfile.cmake @@ -0,0 +1,3 @@ +include(vcpkg_common_functions) + +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/vcpkg/ports/mpir/enable-runtimelibrary-toggle.patch b/vcpkg/ports/mpir/enable-runtimelibrary-toggle.patch new file mode 100644 index 0000000..391d4e1 --- /dev/null +++ b/vcpkg/ports/mpir/enable-runtimelibrary-toggle.patch @@ -0,0 +1,27 @@ +diff --git a/build.vc/mpir_debug_lib.props b/build.vc/mpir_debug_lib.props +index b2fd57b..3937570 100644 +--- a/build.vc/mpir_debug_lib.props ++++ b/build.vc/mpir_debug_lib.props +@@ -9,7 +9,8 @@ + + + $(IntDir)dum\my\%(RelativeDir) +- MultiThreadedDebug ++ $(RuntimeLibrary) ++ OldStyle + $(TargetDir)$(TargetName).pdb + + +diff --git a/build.vc/mpir_release_lib.props b/build.vc/mpir_release_lib.props +index 6cdff3e..3937570 100644 +--- a/build.vc/mpir_release_lib.props ++++ b/build.vc/mpir_release_lib.props +@@ -9,7 +9,7 @@ + + + $(IntDir)dum\my\%(RelativeDir) +- MultiThreaded ++ $(RuntimeLibrary) + $(TargetDir)$(TargetName).pdb + + diff --git a/vcpkg/ports/mpir/portfile.cmake b/vcpkg/ports/mpir/portfile.cmake new file mode 100644 index 0000000..856e4e2 --- /dev/null +++ b/vcpkg/ports/mpir/portfile.cmake @@ -0,0 +1,153 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") + +if(EXISTS "${CURRENT_INSTALLED_DIR}/include/gmp.h" OR "${CURRENT_INSTALLED_DIR}/include/gmpxx.h") + message(FATAL_ERROR "Can't build ${PORT} if gmp is installed. Please remove gmp, and try to install ${PORT} again if you need it.") +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL "static" AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message(FATAL_ERROR "${PORT} currently can only be built using the dynamic CRT when building DLLs") +endif() + +set(MPIR_VERSION 3.0.0) + +if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) + vcpkg_download_distfile( + ARCHIVE + URLS "http://mpir.org/mpir-${MPIR_VERSION}.tar.bz2" + FILENAME mpir-${MPIR_VERSION}.tar.bz2 + SHA512 c735105db8b86db739fd915bf16064e6bc82d0565ad8858059e4e93f62c9d72d9a1c02a5ca9859b184346a8dc64fa714d4d61404cff1e405dc548cbd54d0a88e + ) + + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${MPIR_VERSION} + ) + + vcpkg_find_acquire_program(YASM) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(SHARED_STATIC --enable-static --disable-shared) + else() + set(SHARED_STATIC --disable-static --enable-shared) + endif() + + set(OPTIONS --disable-silent-rules --enable-gmpcompat --enable-cxx ${SHARED_STATIC}) + + string(APPEND VCPKG_C_FLAGS " -Wno-implicit-function-declaration") + string(APPEND VCPKG_CXX_FLAGS " -Wno-implicit-function-declaration") + + # on Linux, autoconf is required; on macOS, it isn't + if(VCPKG_TARGET_IS_LINUX) + set(AUTOCONFIG "AUTOCONFIG") + endif() + + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + ${AUTOCONFIG} + OPTIONS ${OPTIONS} + ) + + vcpkg_install_make() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + endif() + + configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +elseif(VCPKG_TARGET_IS_WINDOWS) + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO wbhart/mpir + REF mpir-${MPIR_VERSION} + SHA512 7d37f60645c533a6638dde5d9c48f5535022fa0ea02bafd5b714649c70814e88c5e5e3b0bef4c5a749aaf8772531de89c331716ee00ba1c2f9521c2cc8f3c61b + HEAD_REF master + PATCHES enable-runtimelibrary-toggle.patch + ) + + if(VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(MSVC_VERSION 15) + else() + set(MSVC_VERSION 14) + endif() + + if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(DLL_OR_LIB dll) + else() + set(DLL_OR_LIB lib) + endif() + + if(VCPKG_CRT_LINKAGE STREQUAL "static") + set(RuntimeLibraryExt "") + else() + set(RuntimeLibraryExt "DLL") + endif() + + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) + file(GLOB FILES ${SOURCE_PATH}/*) + file(COPY ${FILES} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) + + vcpkg_build_msbuild( + PROJECT_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/build.vc${MSVC_VERSION}/${DLL_OR_LIB}_mpir_gc/${DLL_OR_LIB}_mpir_gc.vcxproj + OPTIONS_DEBUG "/p:RuntimeLibrary=MultiThreadedDebug${RuntimeLibraryExt}" + OPTIONS_RELEASE "/p:RuntimeLibrary=MultiThreaded${RuntimeLibraryExt}" + ) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_build_msbuild( + PROJECT_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/build.vc${MSVC_VERSION}/${DLL_OR_LIB}_mpir_cxx/${DLL_OR_LIB}_mpir_cxx.vcxproj + OPTIONS_DEBUG "/p:RuntimeLibrary=MultiThreadedDebug${RuntimeLibraryExt}" + OPTIONS_RELEASE "/p:RuntimeLibrary=MultiThreaded${RuntimeLibraryExt}" + ) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(GLOB REL_LIBS_CXX ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/mpirxx.lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(GLOB DBG_LIBS_CXX ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Debug/mpirxx.lib) + endif() + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(GLOB HEADERS + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/gmp.h + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/gmpxx.h + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/mpir.h + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/mpirxx.h + ) + file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + + file(GLOB REL_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/mpir.dll) + file(GLOB REL_LIBS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Release/mpir.lib) + list(APPEND REL_LIBS ${REL_LIBS_CXX}) + + file(INSTALL ${REL_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${REL_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(GLOB HEADERS + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Debug/gmp.h + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Debug/gmpxx.h + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Debug/mpir.h + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Debug/mpirxx.h + ) + file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + + file(GLOB DBG_DLLS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Debug/mpir.dll) + file(GLOB DBG_LIBS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}/*/*/Debug/mpir.lib) + list(APPEND DBG_LIBS ${DBG_LIBS_CXX}) + + file(INSTALL ${DBG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(INSTALL ${DBG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() + endif() + + vcpkg_copy_pdbs() + + file(INSTALL ${SOURCE_PATH}/COPYING.lib DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +endif() diff --git a/vcpkg/ports/mpir/vcpkg.json b/vcpkg/ports/mpir/vcpkg.json new file mode 100644 index 0000000..29754cc --- /dev/null +++ b/vcpkg/ports/mpir/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "mpir", + "version-string": "3.0.0", + "port-version": 10, + "description": "Multiple Precision Integers and Rationals", + "homepage": "https://github.com/wbhart/mpir", + "supports": "!(uwp | arm)" +} diff --git a/vcpkg/ports/mpmcqueue/CONTROL b/vcpkg/ports/mpmcqueue/CONTROL new file mode 100644 index 0000000..3da89f6 --- /dev/null +++ b/vcpkg/ports/mpmcqueue/CONTROL @@ -0,0 +1,4 @@ +Source: mpmcqueue +Version: 2019-07-26 +Description: A bounded multi-producer multi-consumer lock-free queue written in C++11 +Homepage: https://github.com/rigtorp/MPMCQueue diff --git a/vcpkg/ports/mpmcqueue/portfile.cmake b/vcpkg/ports/mpmcqueue/portfile.cmake new file mode 100644 index 0000000..be2f030 --- /dev/null +++ b/vcpkg/ports/mpmcqueue/portfile.cmake @@ -0,0 +1,19 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rigtorp/MPMCQueue + REF 5883e32b07e8a60c22d532d9120ea5c11348aea9 + SHA512 4adbbe5e014e0ef5c7030aaa9faa4e07e2c65753cd89c770da250811c13776576c4f1caf4144542318c41ebc7433b106e802c482a5d44572963a5ab59047257e + HEAD_REF master +) + +file(COPY + ${SOURCE_PATH}/include/rigtorp/MPMCQueue.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include/rigtorp +) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/mqtt-cpp/CONTROL b/vcpkg/ports/mqtt-cpp/CONTROL new file mode 100644 index 0000000..4ea550b --- /dev/null +++ b/vcpkg/ports/mqtt-cpp/CONTROL @@ -0,0 +1,5 @@ +Source: mqtt-cpp +Version: 7.0.1-2 +Description: Header-only MQTT client/server for C++14 based on Boost.Asio. +Homepage: https://github.com/redboltz/mqtt_cpp +Build-Depends: boost-asio, boost-any, boost-multi-index, boost-type-erasure diff --git a/vcpkg/ports/mqtt-cpp/portfile.cmake b/vcpkg/ports/mqtt-cpp/portfile.cmake new file mode 100644 index 0000000..d1b9308 --- /dev/null +++ b/vcpkg/ports/mqtt-cpp/portfile.cmake @@ -0,0 +1,21 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO redboltz/mqtt_cpp + REF v7.0.1 + SHA512 7128943e1136200debca344600b015b94a6e216f6136f2b432f4692fd8dabe1a7e50fa3d436d4df85950831f5ed776e03fc02c324afbf2178455770a33bff828 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DMQTT_BUILD_EXAMPLES=OFF + -DMQTT_BUILD_TESTS=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/ms-angle/CONTROL b/vcpkg/ports/ms-angle/CONTROL new file mode 100644 index 0000000..003ab3f --- /dev/null +++ b/vcpkg/ports/ms-angle/CONTROL @@ -0,0 +1,4 @@ +Source: ms-angle +Version: alias +Description: Deprecated alias for ms-angle +Build-Depends: angle \ No newline at end of file diff --git a/vcpkg/ports/ms-angle/portfile.cmake b/vcpkg/ports/ms-angle/portfile.cmake new file mode 100644 index 0000000..0015715 --- /dev/null +++ b/vcpkg/ports/ms-angle/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) \ No newline at end of file diff --git a/vcpkg/ports/ms-gsl/CONTROL b/vcpkg/ports/ms-gsl/CONTROL new file mode 100644 index 0000000..7fb9333 --- /dev/null +++ b/vcpkg/ports/ms-gsl/CONTROL @@ -0,0 +1,4 @@ +Source: ms-gsl +Version: 3.1.0 +Homepage: https://github.com/Microsoft/GSL +Description: Microsoft implementation of the Guidelines Support Library diff --git a/vcpkg/ports/ms-gsl/portfile.cmake b/vcpkg/ports/ms-gsl/portfile.cmake new file mode 100644 index 0000000..73ce946 --- /dev/null +++ b/vcpkg/ports/ms-gsl/portfile.cmake @@ -0,0 +1,27 @@ +#header-only library with an install target +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/GSL + REF 0f6dbc9e2915ef5c16830f3fa3565738de2a9230 + SHA512 f72d7d9a18b8055401feb99d99f17c70c0c2015b1a2112ae13fedd27949ff7f9b30718b6afd0b5730ed5573390cb1cc987cd45b7e7fbb92f4134f11d1637ddb7 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DGSL_TEST=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets( + CONFIG_PATH share/cmake/Microsoft.GSL + TARGET_PATH share/Microsoft.GSL +) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/msgpack/CONTROL b/vcpkg/ports/msgpack/CONTROL new file mode 100644 index 0000000..0ec6083 --- /dev/null +++ b/vcpkg/ports/msgpack/CONTROL @@ -0,0 +1,4 @@ +Source: msgpack +Version: 3.3.0 +Homepage: https://github.com/msgpack/msgpack-c +Description: MessagePack is an efficient binary serialization format, which lets you exchange data among multiple languages like JSON, except that it's faster and smaller. diff --git a/vcpkg/ports/msgpack/portfile.cmake b/vcpkg/ports/msgpack/portfile.cmake new file mode 100644 index 0000000..86e2ea3 --- /dev/null +++ b/vcpkg/ports/msgpack/portfile.cmake @@ -0,0 +1,37 @@ +if (EXISTS ${CURRENT_INSTALLED_DIR}/include/msgpack/pack.h) + message(FATAL_ERROR "Cannot install ${PORT} when rest-rpc is already installed, please remove rest-rpc using \"./vcpkg remove rest-rpc:${TARGET_TRIPLET}\"") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO msgpack/msgpack-c + REF cpp-3.3.0 + SHA512 33ed87b23d776cadcc230666e6435088e402c5813e7e4dce5ce79c8c3aceba5a36db8f395278042c6ac44c474b33018ff1635889d8b20bc41c5f6f1d1c963cae + HEAD_REF master +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(MSGPACK_ENABLE_SHARED OFF) + set(MSGPACK_ENABLE_STATIC ON) +else() + set(MSGPACK_ENABLE_SHARED ON) + set(MSGPACK_ENABLE_STATIC OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DMSGPACK_ENABLE_SHARED=${MSGPACK_ENABLE_SHARED} + -DMSGPACK_ENABLE_STATIC=${MSGPACK_ENABLE_STATIC} + -DMSGPACK_BUILD_EXAMPLES=OFF + -DMSGPACK_BUILD_TESTS=OFF) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/msgpack) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/msgpack) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/msgpack/COPYING ${CURRENT_PACKAGES_DIR}/share/msgpack/copyright) diff --git a/vcpkg/ports/msgpack11/CONTROL b/vcpkg/ports/msgpack11/CONTROL new file mode 100644 index 0000000..3fde8f3 --- /dev/null +++ b/vcpkg/ports/msgpack11/CONTROL @@ -0,0 +1,6 @@ +Source: msgpack11 +Version: 0.0.10-1 +Homepage: https://msgpack.org +Build-Depends: gtest +Description: msgpack11 is a tiny MsgPack library for C++11, providing MsgPack parsing and serialization.This library is inspired by json11.The API of msgpack11 is designed to be similar with json11. + diff --git a/vcpkg/ports/msgpack11/fix-additerator.patch b/vcpkg/ports/msgpack11/fix-additerator.patch new file mode 100644 index 0000000..5a6b232 --- /dev/null +++ b/vcpkg/ports/msgpack11/fix-additerator.patch @@ -0,0 +1,12 @@ +diff --git a/msgpack11.cpp b/msgpack11.cpp +index fa572fa..640ba9a 100644 +--- a/msgpack11.cpp ++++ b/msgpack11.cpp +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + + namespace msgpack11 { + diff --git a/vcpkg/ports/msgpack11/msvc.patch b/vcpkg/ports/msgpack11/msvc.patch new file mode 100644 index 0000000..b7e0293 --- /dev/null +++ b/vcpkg/ports/msgpack11/msvc.patch @@ -0,0 +1,19 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9424838..080cefa 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,9 +6,12 @@ option(MSGPACK11_BUILD_TESTS "Build unit tests" ON) + set(CMAKE_CXX_STANDARD 11) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + +-add_library(msgpack11 msgpack11.cpp) ++add_library(msgpack11 STATIC msgpack11.cpp) + target_include_directories(msgpack11 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +-target_compile_options(msgpack11 PRIVATE -fno-rtti -Wall -Wextra -Werror) ++target_compile_options(msgpack11 PRIVATE -fno-rtti) ++if(NOT MSVC) ++ target_compile_options(msgpack11 PRIVATE -Wall -Wextra -Werror) ++endif() + configure_file("msgpack11.pc.in" "msgpack11.pc" @ONLY) + + if (MSGPACK11_BUILD_TESTS) diff --git a/vcpkg/ports/msgpack11/portfile.cmake b/vcpkg/ports/msgpack11/portfile.cmake new file mode 100644 index 0000000..cf828f6 --- /dev/null +++ b/vcpkg/ports/msgpack11/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ar90n/msgpack11 + REF v0.0.10 + SHA512 7b90893f9cdec529789f6e75703f5945c6fc5c946b8708a7a2cb295faf4af111c8cc61265b636f385641031b85181929205be9c5d155f405909445dce85b4ce8 + HEAD_REF master + PATCHES + msvc.patch + fix-additerator.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DMSGPACK11_BUILD_TESTS=OFF + -DMSGPACK11_BUILD_EXAMPLES=OFF +) + + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/msinttypes/CONTROL b/vcpkg/ports/msinttypes/CONTROL new file mode 100644 index 0000000..51939d0 --- /dev/null +++ b/vcpkg/ports/msinttypes/CONTROL @@ -0,0 +1,4 @@ +Source: msinttypes +Version: 2018-02-25 +Homepage: https://github.com/chemeris/msinttypes +Description: msinttypes is a package to provide missing ISO C9x compliant headers for Microsoft Visual Studio diff --git a/vcpkg/ports/msinttypes/portfile.cmake b/vcpkg/ports/msinttypes/portfile.cmake new file mode 100644 index 0000000..9393ea5 --- /dev/null +++ b/vcpkg/ports/msinttypes/portfile.cmake @@ -0,0 +1,13 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO chemeris/msinttypes + REF f9e7c5758ed9e3b9f4b2394de1881c704dd79de0 + SHA512 943ccb1245e41ad554908fd7664725f2aac929222bd823b375fbd2e8a4c4ffc42c268543c43a817b65dca047c3253d04527378ec3902e5e7df7f6ba5a736d6f3 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/inttypes.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/msinttypes) +file(INSTALL ${SOURCE_PATH}/stdint.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/msinttypes) +file(INSTALL ${SOURCE_PATH}/stdint.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/msinttypes RENAME copyright) diff --git a/vcpkg/ports/msix/CMakeLists.txt b/vcpkg/ports/msix/CMakeLists.txt new file mode 100644 index 0000000..166d904 --- /dev/null +++ b/vcpkg/ports/msix/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 3.14) + +add_custom_target(LIBS) + +find_package(XercesC CONFIG REQUIRED) +add_library(xerces-c INTERFACE IMPORTED GLOBAL) +target_link_libraries(xerces-c INTERFACE XercesC::XercesC) + +find_package(ZLIB REQUIRED) + +add_library(zlib INTERFACE IMPORTED GLOBAL) +add_library(zlibstatic INTERFACE IMPORTED GLOBAL) + +target_link_libraries(zlib INTERFACE ZLIB::ZLIB) +target_link_libraries(zlibstatic INTERFACE ZLIB::ZLIB) diff --git a/vcpkg/ports/msix/CONTROL b/vcpkg/ports/msix/CONTROL new file mode 100644 index 0000000..ec246a8 --- /dev/null +++ b/vcpkg/ports/msix/CONTROL @@ -0,0 +1,6 @@ +Source: msix +Version: 1.7-2 +Build-Depends: xerces-c, zlib, openssl (!uwp&!windows), catch2 +Homepage: https://github.com/microsoft/msix-packaging +Description: The MSIX Packaging SDK project is an effort to enable developers on a variety of platforms to pack and unpack packages for the purposes of distribution from either the Microsoft Store, or their own content distribution networks. + The MSIX Packaging APIs that a client app would use to interact with .msix/.appx packages are a subset of those documented here. See sample/ExtractContentsSample/ExtractContentsSample.cpp for additional details. diff --git a/vcpkg/ports/msix/fix-dependency-catch2.patch b/vcpkg/ports/msix/fix-dependency-catch2.patch new file mode 100644 index 0000000..4b20305 --- /dev/null +++ b/vcpkg/ports/msix/fix-dependency-catch2.patch @@ -0,0 +1,22 @@ +diff --git a/src/test/msixtest/CMakeLists.txt b/src/test/msixtest/CMakeLists.txt +index e991231..e5c43ed 100644 +--- a/src/test/msixtest/CMakeLists.txt ++++ b/src/test/msixtest/CMakeLists.txt +@@ -5,6 +5,8 @@ + cmake_minimum_required(VERSION 3.8.0 FATAL_ERROR) + project (msixtest) + ++find_package(Catch2 CONFIG REQUIRED) ++ + if(WIN32) + set(DESCRIPTION "msixtest manifest") + configure_file(${MSIX_PROJECT_ROOT}/manifest.cmakein ${MSIX_TEST_OUTPUT_DIRECTORY}/${PROJECT_NAME}.exe.manifest CRLF) +@@ -91,7 +93,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES + ) + + add_dependencies(${PROJECT_NAME} msix) +-target_link_libraries(${PROJECT_NAME} msix) ++target_link_libraries(${PROJECT_NAME} msix Catch2::Catch2) + + # For windows copy the library + if(WIN32) diff --git a/vcpkg/ports/msix/install-cmake.patch b/vcpkg/ports/msix/install-cmake.patch new file mode 100644 index 0000000..e8f930f --- /dev/null +++ b/vcpkg/ports/msix/install-cmake.patch @@ -0,0 +1,37 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 20098bf..38c3c95 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -190,3 +190,5 @@ message(STATUS "src processed") + add_subdirectory(sample) + message(STATUS "sample processed") + message(STATUS "DONE!") ++ ++install(TARGETS msix) +\ No newline at end of file +diff --git a/src/msix/CMakeLists.txt b/src/msix/CMakeLists.txt +index 296eda4..cf87993 100644 +--- a/src/msix/CMakeLists.txt ++++ b/src/msix/CMakeLists.txt +@@ -87,9 +87,9 @@ endif() + include(msix_resources) # Handles all the certificates and schemas we are going to use. + + set(LIB_PUBLIC_HEADERS +- ../inc/AppxPackaging.hpp +- ../inc/MSIXWindows.hpp +- ../inc/MsixErrors.hpp ++ ${CMAKE_CURRENT_SOURCE_DIR}/../inc/AppxPackaging.hpp ++ ${CMAKE_CURRENT_SOURCE_DIR}/../inc/MSIXWindows.hpp ++ ${CMAKE_CURRENT_SOURCE_DIR}/../inc/MsixErrors.hpp + ) + + set(MsixSrc) # list with all the files we are going to use +@@ -260,7 +260,7 @@ if(WIN32) + "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll") + string(REPLACE ";" " " DELAYFLAGS "${DELAYFLAGS}") + set_property(TARGET ${PROJECT_NAME} APPEND_STRING PROPERTY LINK_FLAGS "${DELAYFLAGS} /LTCG") +- set_property(TARGET ${PROJECT_NAME} APPEND_STRING PROPERTY LINK_FLAGS " /DEF:windowsexports.def") ++ set_property(TARGET ${PROJECT_NAME} APPEND_STRING PROPERTY LINK_FLAGS " /DEF:${CMAKE_CURRENT_BINARY_DIR}/windowsexports.def") + if(USE_STATIC_MSVC) + if(CMAKE_BUILD_TYPE MATCHES Debug) + set_property(TARGET ${PROJECT_NAME} APPEND_STRING PROPERTY LINK_FLAGS " /NODEFAULTLIB:MSVCRTD") diff --git a/vcpkg/ports/msix/portfile.cmake b/vcpkg/ports/msix/portfile.cmake new file mode 100644 index 0000000..249d6fd --- /dev/null +++ b/vcpkg/ports/msix/portfile.cmake @@ -0,0 +1,50 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO microsoft/msix-packaging + REF ab322965d64baf1448548cbe18139e8872d686f2 # v1.7 + SHA512 d64767c84d5933bf3d1e0e62e9dc21fa13e02b8cf31776ccbe2e7066e514798d8ff758dc2b6fd64f6eabcf3deb83ef0eaa03e1a7d407307f347a045e8a75d3dd + HEAD_REF master + PATCHES + install-cmake.patch + fix-dependency-catch2.patch +) + +file(REMOVE_RECURSE ${SOURCE_PATH}/lib) +file(MAKE_DIRECTORY ${SOURCE_PATH}/lib) +configure_file(${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${SOURCE_PATH}/lib/CMakeLists.txt) + +if(VCPKG_TARGET_IS_WINDOWS) + set(PLATFORM WIN32) + set(CRYPTO_LIB crypt32) +elseif(VCPKG_TARGET_IS_LINUX) + set(PLATFORM LINUX) + set(CRYPTO_LIB openssl) +elseif(VCPKG_TARGET_IS_OSX) + set(PLATFORM MACOS) + set(CRYPTO_LIB openssl) +else() + message(FATAL_ERROR "Unknown system: ${VCPKG_CMAKE_SYSTEM_NAME}") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + NO_CHARSET_FLAG + OPTIONS + -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON + -DINSTALL_LIBMSIX=ON + -DUSE_SHARED_ZLIB=ON + -D${PLATFORM}=ON + -DXML_PARSER=xerces + -DCRYPTO_LIB=${CRYPTO_LIB} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/msmpi/CONTROL b/vcpkg/ports/msmpi/CONTROL new file mode 100644 index 0000000..9640f56 --- /dev/null +++ b/vcpkg/ports/msmpi/CONTROL @@ -0,0 +1,5 @@ +Source: msmpi +Version: 10.1 +Homepage: https://docs.microsoft.com/en-us/message-passing-interface/microsoft-mpi +Description: Microsoft MPI +Supports: windows diff --git a/vcpkg/ports/msmpi/portfile.cmake b/vcpkg/ports/msmpi/portfile.cmake new file mode 100644 index 0000000..58c3661 --- /dev/null +++ b/vcpkg/ports/msmpi/portfile.cmake @@ -0,0 +1,127 @@ +vcpkg_fail_port_install(ON_TARGET "Linux" "OSX" "UWP") + +set(MSMPI_VERSION "10.1.12498") +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/msmpi-${MSMPI_VERSION}) + +vcpkg_download_distfile(SDK_ARCHIVE + URLS "https://download.microsoft.com/download/a/5/2/a5207ca5-1203-491a-8fb8-906fd68ae623/msmpisdk.msi" + FILENAME "msmpisdk-${MSMPI_VERSION}.msi" + SHA512 330fad53c1979dfae786abed228d82c82207f0d61148e2efc1f37c8931838b806eb50554e7f006a56962f748a21f7017c540bd70444b7a93a72c313a64e9254c +) + + +#to enable CI, you should modify the following URL also in ${VCPKG_ROOT}/scripts/azure-pipelines/windows/provision-image.ps1 +macro(download_msmpi_redistributable_package) + vcpkg_download_distfile(REDIST_ARCHIVE + URLS "https://download.microsoft.com/download/a/5/2/a5207ca5-1203-491a-8fb8-906fd68ae623/msmpisetup.exe" + FILENAME "msmpisetup-${MSMPI_VERSION}.exe" + SHA512 1ee463e7dfc3e55a7ac048fdfde13fef09a5eea4b74d8fd7c22a7aad667a025b467ce939e5de308e25bbc186c3fe66e0e24ac03a3741656fc7558f2af2fa132a + ) +endmacro() + +### Check for correct version of installed redistributable package + +# We always want the ProgramFiles folder even on a 64-bit machine (not the ProgramFilesx86 folder) +vcpkg_get_program_files_platform_bitness(PROGRAM_FILES_PLATFORM_BITNESS) +set(SYSTEM_MPIEXEC_FILEPATH "${PROGRAM_FILES_PLATFORM_BITNESS}/Microsoft MPI/Bin/mpiexec.exe") + +if(EXISTS "${SYSTEM_MPIEXEC_FILEPATH}") + set(MPIEXEC_VERSION_LOGNAME "mpiexec-version") + vcpkg_execute_required_process( + COMMAND ${SYSTEM_MPIEXEC_FILEPATH} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} + LOGNAME ${MPIEXEC_VERSION_LOGNAME} + ) + file(READ ${CURRENT_BUILDTREES_DIR}/${MPIEXEC_VERSION_LOGNAME}-out.log MPIEXEC_OUTPUT) + + if(MPIEXEC_OUTPUT MATCHES "\\[Version ([0-9]+\\.[0-9]+\\.[0-9]+)\\.[0-9]+\\]") + if(NOT CMAKE_MATCH_1 STREQUAL MSMPI_VERSION) + download_msmpi_redistributable_package() + + message(FATAL_ERROR + " The version of the installed MSMPI redistributable packages does not match the version to be installed\n" + " Expected version: ${MSMPI_VERSION}\n" + " Found version: ${CMAKE_MATCH_1}\n" + " Please upgrade the installed version on your system.\n" + " The appropriate installer for the expected version has been downloaded to:\n" + " ${REDIST_ARCHIVE}\n") + endif() + else() + message(FATAL_ERROR + " Could not determine installed MSMPI redistributable package version.\n" + " See logs for more information:\n" + " ${CURRENT_BUILDTREES_DIR}\\${MPIEXEC_VERSION_LOGNAME}-out.log\n" + " ${CURRENT_BUILDTREES_DIR}\\${MPIEXEC_VERSION_LOGNAME}-err.log\n") + endif() +else() + download_msmpi_redistributable_package() + + message(FATAL_ERROR + " Could not find:\n" + " ${SYSTEM_MPIEXEC_FILEPATH}\n" + " Please install the MSMPI redistributable package before trying to install this port.\n" + " The appropriate installer has been downloaded to:\n" + " ${REDIST_ARCHIVE}\n") +endif() + +file(TO_NATIVE_PATH "${SDK_ARCHIVE}" SDK_ARCHIVE) +file(TO_NATIVE_PATH "${SOURCE_PATH}/sdk" SDK_SOURCE_DIR) +file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}/msiexec-${TARGET_TRIPLET}.log" MSIEXEC_LOG_PATH) + +set(PARAM_MSI "/a \"${SDK_ARCHIVE}\"") +set(PARAM_LOG "/log \"${MSIEXEC_LOG_PATH}\"") +set(PARAM_TARGET_DIR "TARGETDIR=\"${SDK_SOURCE_DIR}\"") +set(SCRIPT_FILE ${CURRENT_BUILDTREES_DIR}/msiextract-msmpi.bat) +# Write the command out to a script file and run that to avoid weird escaping behavior when spaces are present +file(WRITE ${SCRIPT_FILE} "msiexec ${PARAM_MSI} /qn ${PARAM_LOG} ${PARAM_TARGET_DIR}") + +vcpkg_execute_required_process( + COMMAND ${SCRIPT_FILE} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} + LOGNAME extract-sdk +) + +set(SOURCE_INCLUDE_PATH "${SOURCE_PATH}/sdk/PFiles/Microsoft SDKs/MPI/Include") +set(SOURCE_LIB_PATH "${SOURCE_PATH}/sdk/PFiles/Microsoft SDKs/MPI/Lib") + +# Install include files +file(INSTALL + "${SOURCE_INCLUDE_PATH}/mpi.h" + "${SOURCE_INCLUDE_PATH}/mpif.h" + "${SOURCE_INCLUDE_PATH}/mpi.f90" + "${SOURCE_INCLUDE_PATH}/mpio.h" + "${SOURCE_INCLUDE_PATH}/mspms.h" + "${SOURCE_INCLUDE_PATH}/pmidbg.h" + "${SOURCE_INCLUDE_PATH}/${TRIPLET_SYSTEM_ARCH}/mpifptr.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include +) + +# NOTE: since the binary distribution does not include any debug libraries we always install the release libraries +SET(VCPKG_POLICY_ONLY_RELEASE_CRT enabled) + +file(GLOB STATIC_LIBS + ${SOURCE_LIB_PATH}/${TRIPLET_SYSTEM_ARCH}/msmpifec.lib + ${SOURCE_LIB_PATH}/${TRIPLET_SYSTEM_ARCH}/msmpifmc.lib + ${SOURCE_LIB_PATH}/${TRIPLET_SYSTEM_ARCH}/msmpifes.lib + ${SOURCE_LIB_PATH}/${TRIPLET_SYSTEM_ARCH}/msmpifms.lib +) + +file(INSTALL + "${SOURCE_LIB_PATH}/${TRIPLET_SYSTEM_ARCH}/msmpi.lib" + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) +file(INSTALL + "${SOURCE_LIB_PATH}/${TRIPLET_SYSTEM_ARCH}/msmpi.lib" + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) + +if(VCPKG_CRT_LINKAGE STREQUAL "static") + file(INSTALL ${STATIC_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(INSTALL ${STATIC_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +endif() + +# Handle copyright +file(COPY "${SOURCE_PATH}/sdk/PFiles/Microsoft SDKs/MPI/License/MicrosoftMPI-SDK-EULA.rtf" DESTINATION ${CURRENT_PACKAGES_DIR}/share/msmpi) +file(COPY "${SOURCE_PATH}/sdk/PFiles/Microsoft SDKs/MPI/License/MPI-SDK-TPN.txt" DESTINATION ${CURRENT_PACKAGES_DIR}/share/msmpi) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/msmpi/copyright "See the accompanying MicrosoftMPI-SDK-EULA.rtf and MPI-SDK-TPN.txt") diff --git a/vcpkg/ports/mstch/CONTROL b/vcpkg/ports/mstch/CONTROL new file mode 100644 index 0000000..eef64a5 --- /dev/null +++ b/vcpkg/ports/mstch/CONTROL @@ -0,0 +1,5 @@ +Source: mstch +Version: 1.0.2-2 +Homepage: https://github.com/no1msd/mstch +Description: Mstch is a complete implementation of {{mustache}} templates using modern C++ +Build-Depends: boost-variant diff --git a/vcpkg/ports/mstch/do-not-force-release.patch b/vcpkg/ports/mstch/do-not-force-release.patch new file mode 100644 index 0000000..63916f5 --- /dev/null +++ b/vcpkg/ports/mstch/do-not-force-release.patch @@ -0,0 +1,25 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8d8e0c7..4304ad7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,17 +5,17 @@ option(WITH_UNIT_TESTS "enable building unit test executable" OFF) + option(WITH_BENCHMARK "enable building benchmark executable" OFF) + + set(CMAKE_INCLUDE_CURRENT_DIR ON) +-set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON) +-set(CMAKE_BUILD_TYPE Release) + + set(mstch_VERSION 1.0.1) + + if(NOT MSVC) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -O3") ++ set(CMAKE_CXX_STANDARD 11) + endif() + + add_subdirectory(src) + ++target_include_directories(mstch PUBLIC $) ++ + if(WITH_UNIT_TESTS) + enable_testing() + add_subdirectory(vendor/headerize) diff --git a/vcpkg/ports/mstch/portfile.cmake b/vcpkg/ports/mstch/portfile.cmake new file mode 100644 index 0000000..e742273 --- /dev/null +++ b/vcpkg/ports/mstch/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO no1msd/mstch + REF ff459067bd02e80dc399006bb610238223d41c50 #1.0.2 + SHA512 b01f4c3e39a40fc9a6accc81ecbfac4b8a9ce1c2ec3df441a16039f4bf126dfeef83f87d3a5e9ec03dc133a1c5f54f5bc931479915e8a92bbfc8ebbc87c8e4dd + HEAD_REF master + PATCHES do-not-force-release.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/mstch) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/mujs/CMakeLists.txt b/vcpkg/ports/mujs/CMakeLists.txt new file mode 100644 index 0000000..639d2a9 --- /dev/null +++ b/vcpkg/ports/mujs/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.9) +project(mujs) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +file(GLOB libmujs_sources js*.c utf*.c regexp.c) + +include_directories(.) + + +add_library(libmujs ${libmujs_sources}) + +install( + TARGETS libmujs + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES mujs.h DESTINATION include) +endif() diff --git a/vcpkg/ports/mujs/CONTROL b/vcpkg/ports/mujs/CONTROL new file mode 100644 index 0000000..1444af1 --- /dev/null +++ b/vcpkg/ports/mujs/CONTROL @@ -0,0 +1,4 @@ +Source: mujs +Version: 2018-07-30-1 +Homepage: https://github.com/ccxvii/mujs +Description: An embeddable Javascript interpreter in C diff --git a/vcpkg/ports/mujs/portfile.cmake b/vcpkg/ports/mujs/portfile.cmake new file mode 100644 index 0000000..f9eff13 --- /dev/null +++ b/vcpkg/ports/mujs/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ccxvii/mujs + REF c86267d8b2b5f9a6ae318dc69886109eee0c7b61 + SHA512 927b000cd6a28b785d510917445a5a39a4dbaf0e13eab920cf83c7838b111b8a0542cfab0110f8493dc65b88a48261deb6ba7a871cbe77fb46119b536a69d470 + 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 -DDISABLE_INSTALL_TOOLS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/mujs RENAME copyright) diff --git a/vcpkg/ports/munit/CONTROL b/vcpkg/ports/munit/CONTROL new file mode 100644 index 0000000..8e1bb2e --- /dev/null +++ b/vcpkg/ports/munit/CONTROL @@ -0,0 +1,5 @@ +Source: munit +Version: 2019-04-06 +Description: A small but full-featured unit testing framework for C +Supports: !(arm|arm64|uwp) +Homepage: https://github.com/nemequ/munit diff --git a/vcpkg/ports/munit/fix-install.patch b/vcpkg/ports/munit/fix-install.patch new file mode 100644 index 0000000..6ba7461 --- /dev/null +++ b/vcpkg/ports/munit/fix-install.patch @@ -0,0 +1,13 @@ +diff --git a/meson.build b/meson.build +index c15b405..44ee737 100644 +--- a/meson.build ++++ b/meson.build +@@ -11,7 +11,7 @@ root_include = include_directories('.') + + munit = library('munit', + ['munit.c'], +- install: meson.is_subproject()) ++ install: not meson.is_subproject()) + + if meson.is_subproject() + munit_dep = declare_dependency( diff --git a/vcpkg/ports/munit/portfile.cmake b/vcpkg/ports/munit/portfile.cmake new file mode 100644 index 0000000..bd45959 --- /dev/null +++ b/vcpkg/ports/munit/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "uwp") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nemequ/munit + REF da8f73412998e4f1adf1100dc187533a51af77fd + SHA512 cd08c1291a73487f15fdba7bf8675fea9177f0ec9766900f65efb5f00c662532a16499447e9087d304de34ff9138f47d04ebf18713f5aa8aacede22c5e23b98b + HEAD_REF master + PATCHES + fix-install.patch +) + +vcpkg_configure_meson( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + --backend=ninja +) + +vcpkg_install_meson() + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/muparser/CONTROL b/vcpkg/ports/muparser/CONTROL new file mode 100644 index 0000000..b41faa9 --- /dev/null +++ b/vcpkg/ports/muparser/CONTROL @@ -0,0 +1,5 @@ +Source: muparser +Version: 2.3.2 +Homepage: https://github.com/beltoforion/muparser +Description: Fast math parser library +Supports: !uwp diff --git a/vcpkg/ports/muparser/portfile.cmake b/vcpkg/ports/muparser/portfile.cmake new file mode 100644 index 0000000..db4bc98 --- /dev/null +++ b/vcpkg/ports/muparser/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO beltoforion/muparser + REF 207d5b77c05c9111ff51ab91082701221220c477 # v2.3.2 + SHA512 75cebef831eeb08c92c08d2b29932a4af550edbda56c2adb6bc86b1228775294013a07d51974157b39460e60dab937b0b641553cd7ddeef72ba0b23f65c52bf4 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DENABLE_SAMPLES=OFF + -DENABLE_OPENMP=OFF + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/murmurhash/CMakeLists.txt b/vcpkg/ports/murmurhash/CMakeLists.txt new file mode 100644 index 0000000..83ffe81 --- /dev/null +++ b/vcpkg/ports/murmurhash/CMakeLists.txt @@ -0,0 +1,53 @@ +cmake_minimum_required(VERSION 3.14) + +set(VERSION "1.0.0") +project(murmurhash LANGUAGES CXX VERSION ${VERSION}) + +set(CMAKE_CXX_STANDARD 17) + +add_library(murmurhash + src/MurmurHash2.cpp + src/MurmurHash3.cpp + ) + +set(MURMUR_HEADERS + src/MurmurHash2.h + src/MurmurHash3.h + ) +set_target_properties(murmurhash PROPERTIES + PUBLIC_HEADER "${MURMUR_HEADERS}" + ) + +#Configuration +set(generated_dir "${CMAKE_CURRENT_BINARY_DIR}/generated") +set(config_install_dir "lib/cmake/${PROJECT_NAME}") +set(version_config "${generated_dir}/${PROJECT_NAME}ConfigVersion.cmake") +set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake") +set(TARGETS_EXPORT_NAME "${PROJECT_NAME}Targets") +set(namespace "${PROJECT_NAME}::") + +include(CMakePackageConfigHelpers) + +write_basic_package_version_file( + "${version_config}" COMPATIBILITY SameMajorVersion +) + +configure_package_config_file( + "${CMAKE_SOURCE_DIR}/Config.cmake.in" + "${project_config}" + INSTALL_DESTINATION "${config_install_dir}" +) +#Installation +install(TARGETS murmurhash + EXPORT "${TARGETS_EXPORT_NAME}" + LIBRARY DESTINATION "lib" + ARCHIVE DESTINATION "lib" + PUBLIC_HEADER DESTINATION "include") + +install(FILES "${project_config}" "${version_config}" + DESTINATION "${config_install_dir}" + ) +install(EXPORT "${TARGETS_EXPORT_NAME}" + NAMESPACE "${namespace}" + DESTINATION "${config_install_dir}" + ) \ No newline at end of file diff --git a/vcpkg/ports/murmurhash/CONTROL b/vcpkg/ports/murmurhash/CONTROL new file mode 100644 index 0000000..c83cb98 --- /dev/null +++ b/vcpkg/ports/murmurhash/CONTROL @@ -0,0 +1,4 @@ +Source: murmurhash +Version: 2016-01-09-3 +Homepage: https://github.com/aappleby/smhasher +Description: MurmurHash a family of hash functions. diff --git a/vcpkg/ports/murmurhash/Config.cmake.in b/vcpkg/ports/murmurhash/Config.cmake.in new file mode 100644 index 0000000..38bbde7 --- /dev/null +++ b/vcpkg/ports/murmurhash/Config.cmake.in @@ -0,0 +1,4 @@ +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake") +check_required_components("@PROJECT_NAME@") diff --git a/vcpkg/ports/murmurhash/portfile.cmake b/vcpkg/ports/murmurhash/portfile.cmake new file mode 100644 index 0000000..380570b --- /dev/null +++ b/vcpkg/ports/murmurhash/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP") +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO aappleby/smhasher + REF 61a0530f28277f2e850bfc39600ce61d02b518de + SHA512 36877b53386153c20421ccd32d544c28ee72f6f13ea37c14ab1a1db378f6463db28339b2149671c12611384497bf595b798e99c34ea0ebceb6f9ef2f8908a2b6 + HEAD_REF master +) + +configure_file(${CURRENT_PORT_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY) +configure_file(${CURRENT_PORT_DIR}/Config.cmake.in ${SOURCE_PATH}/Config.cmake.in COPYONLY) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "MurmurHash3 was written by Austin Appleby, and is placed in the public domain. The author hereby disclaims copyright to this source code.") diff --git a/vcpkg/ports/mygui/CONTROL b/vcpkg/ports/mygui/CONTROL new file mode 100644 index 0000000..934ee31 --- /dev/null +++ b/vcpkg/ports/mygui/CONTROL @@ -0,0 +1,9 @@ +Source: mygui +Version: 2020-06-17 +Build-Depends: freetype, sdl2-image +Homepage: http://mygui.info +Description: Fast, flexible and simple GUI + +Feature: opengl +Description: Use OpenGL render system. +Build-Depends: opengl diff --git a/vcpkg/ports/mygui/fix-generation.patch b/vcpkg/ports/mygui/fix-generation.patch new file mode 100644 index 0000000..9e51731 --- /dev/null +++ b/vcpkg/ports/mygui/fix-generation.patch @@ -0,0 +1,55 @@ +diff --git a/CMake/CMakeLists.txt b/CMake/CMakeLists.txt +index b0fc12a82..6e545edea 100644 +--- a/CMake/CMakeLists.txt ++++ b/CMake/CMakeLists.txt +@@ -5,7 +5,7 @@ + ############################################################# + + if(WIN32) +- set(MYGUI_CMAKE_DIR "CMake") ++ set(MYGUI_CMAKE_DIR "share") + else(WIN32) + set(MYGUI_CMAKE_DIR "lib/MYGUI/cmake") + endif(WIN32) +diff --git a/CMake/Utils/MyGUIConfigTargets.cmake b/CMake/Utils/MyGUIConfigTargets.cmake +index d1dbd016d..25c8bbac6 100644 +--- a/CMake/Utils/MyGUIConfigTargets.cmake ++++ b/CMake/Utils/MyGUIConfigTargets.cmake +@@ -6,10 +6,10 @@ if (WIN32) + set(MYGUI_RELWDBG_PATH "/RelWithDebInfo") + set(MYGUI_MINSIZE_PATH "/MinSizeRel") + set(MYGUI_DEBUG_PATH "/Debug") +- set(MYGUI_LIB_RELEASE_PATH "/Release") ++ set(MYGUI_LIB_RELEASE_PATH "") + set(MYGUI_LIB_RELWDBG_PATH "/RelWithDebInfo") + set(MYGUI_LIB_MINSIZE_PATH "/MinSizeRel") +- set(MYGUI_LIB_DEBUG_PATH "/Debug") ++ set(MYGUI_LIB_DEBUG_PATH "") + set(MYGUI_PLUGIN_PATH "/opt") + elseif (UNIX) + set(MYGUI_RELEASE_PATH "") +diff --git a/CMake/Utils/PrecompiledHeader.cmake b/CMake/Utils/PrecompiledHeader.cmake +index a8bf3ce49..104703282 100644 +--- a/CMake/Utils/PrecompiledHeader.cmake ++++ b/CMake/Utils/PrecompiledHeader.cmake +@@ -16,7 +16,7 @@ + macro(use_precompiled_header TARGET HEADER_FILE SRC_FILE) + get_filename_component(HEADER ${HEADER_FILE} NAME) + +- if (MSVC AND NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") ++ if (FALSE) + add_definitions(/Yu"${HEADER}") + set_source_files_properties(${SRC_FILE} + PROPERTIES COMPILE_FLAGS /Yc"${HEADER}" +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fea0bff8b..5831dfa8a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,6 +9,7 @@ cmake_minimum_required(VERSION 2.6) + set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE) + cmake_policy(SET CMP0003 NEW) + cmake_policy(SET CMP0011 NEW) ++cmake_policy(SET CMP0021 OLD) + + project(MYGUI) + diff --git a/vcpkg/ports/mygui/portfile.cmake b/vcpkg/ports/mygui/portfile.cmake new file mode 100644 index 0000000..3f3bd90 --- /dev/null +++ b/vcpkg/ports/mygui/portfile.cmake @@ -0,0 +1,44 @@ +# MyGUI supports compiling itself as a DLL, +# but it seems platform-related stuff doesn't support dynamic linkage +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO MyGUI/mygui + REF 26109822f36a4f7d72d5d8ecd41659897f085a40 + SHA512 4d1f001e8c04d08ad911bc0345a2287b5e17e21284728cf23d7a930e8befb2f85902053e3c90283444bf9e32c7dada2f37c498e735d6314732b297d97ed339e4 + HEAD_REF master + PATCHES + fix-generation.patch +) + +if("opengl" IN_LIST FEATURES) + set(MYGUI_RENDERSYSTEM 4) +else() + set(MYGUI_RENDERSYSTEM 1) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DMYGUI_STATIC=TRUE + -DMYGUI_BUILD_DEMOS=FALSE + -DMYGUI_BUILD_PLUGINS=TRUE + -DMYGUI_BUILD_TOOLS=FALSE + -DMYGUI_BUILD_UNITTESTS=FALSE + -DMYGUI_BUILD_TEST_APP=FALSE + -DMYGUI_BUILD_WRAPPER=FALSE + -DMYGUI_BUILD_DOCS=FALSE + -DMYGUI_RENDERSYSTEM=${MYGUI_RENDERSYSTEM} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING.MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/nameof/CONTROL b/vcpkg/ports/nameof/CONTROL new file mode 100644 index 0000000..f004d4f --- /dev/null +++ b/vcpkg/ports/nameof/CONTROL @@ -0,0 +1,4 @@ +Source: nameof +Version: 0.9.4 +Description: Nameof operator for modern C++, simply obtain the name of a variable, type, function, macro, and enum. +Homepage: https://github.com/Neargye/nameof diff --git a/vcpkg/ports/nameof/portfile.cmake b/vcpkg/ports/nameof/portfile.cmake new file mode 100644 index 0000000..ed893a3 --- /dev/null +++ b/vcpkg/ports/nameof/portfile.cmake @@ -0,0 +1,26 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Neargye/nameof + REF v0.9.4 + SHA512 658abf7da2bbc831648aca017815e6368163335840d59f4538ecc0d8438dc3843ad6efc9c2ca8ec1f6ad2208349eee880106fc60cda44bd7b19c73a1f23d067f + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DNAMEOF_OPT_BUILD_EXAMPLES=OFF + -DNAMEOF_OPT_BUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/nameof TARGET_PATH share/nameof) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/nana/CMakeLists.txt b/vcpkg/ports/nana/CMakeLists.txt new file mode 100644 index 0000000..036d5bc --- /dev/null +++ b/vcpkg/ports/nana/CMakeLists.txt @@ -0,0 +1,86 @@ +cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +project(nana VERSION 1.7.4 LANGUAGES CXX) + +option(NANA_ENABLE_PNG "Enable PNG support" OFF) +option(NANA_ENABLE_JPEG "Enable JPEG support" OFF) +option(NANA_INSTALL_HEADERS "Install headers" ON) + +if(APPLE) + add_definitions(-DAPPLE) +elseif(UNIX) + add_definitions(-Dlinux) +endif() + +file(GLOB_RECURSE headers include/*.hpp) +source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/include PREFIX "include" FILES ${headers}) + +file(GLOB sources source/*.hpp source/*.cpp) +foreach(subdir detail filesystem gui paint system threads) + file(GLOB_RECURSE sources_subdir source/${subdir}/*.hpp source/${subdir}/*.cpp) + list(APPEND sources ${sources_subdir}) +endforeach() +source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/source PREFIX "source" FILES ${sources}) + +add_library(nana ${headers} ${sources}) +target_include_directories(nana PUBLIC + $ + $) + +target_compile_features(nana PUBLIC cxx_std_17) + +if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + target_link_libraries(nana PUBLIC c++experimental) +endif() + +if(CMAKE_CXX_COMPILER_ID MATCHES "GCC") + target_link_libraries(nana PUBLIC stdc++fs) +endif() + +if(UNIX) + find_package(Threads REQUIRED) + target_link_libraries(nana PUBLIC Threads::Threads) + + find_package(Freetype REQUIRED) + target_link_libraries(nana PUBLIC Freetype::Freetype) + + find_package(X11 REQUIRED) + target_include_directories(nana PUBLIC ${X11_INCLUDE_DIR}) + target_link_libraries(nana PUBLIC ${X11_LIBRARIES} ${X11_Xft_LIB}) + + find_library(FONTCONFIG_LIB NAMES fontconfig) + target_link_libraries(nana PUBLIC ${FONTCONFIG_LIB}) +endif() + +if(NANA_ENABLE_PNG) + find_package(PNG REQUIRED) + target_link_libraries(nana PUBLIC PNG::PNG) + target_compile_definitions(nana PUBLIC NANA_ENABLE_PNG=1 USE_LIBPNG_FROM_OS=1) +endif() + +if(NANA_ENABLE_JPEG) + find_package(JPEG REQUIRED) + target_include_directories(nana PUBLIC ${JPEG_INCLUDE_DIR}) + target_link_libraries(nana PUBLIC $) + target_compile_definitions(nana PUBLIC NANA_ENABLE_JPEG=1 USE_LIBJPEG_FROM_OS=1) +endif() + +install(TARGETS nana EXPORT nana + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +if(NANA_INSTALL_HEADERS) + install(DIRECTORY include/nana DESTINATION include) +endif() + +include(CMakePackageConfigHelpers) + +configure_package_config_file(config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/unofficial-nana-config.cmake + INSTALL_DESTINATION share/unofficial-nana) + +write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/unofficial-nana-config-version.cmake + VERSION ${PROJECT_VERSION} COMPATIBILITY SameMajorVersion) + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-nana-config.cmake DESTINATION share/unofficial-nana) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-nana-config-version.cmake DESTINATION share/unofficial-nana) +install(EXPORT nana FILE unofficial-nana-targets.cmake NAMESPACE unofficial::nana:: DESTINATION share/unofficial-nana) diff --git a/vcpkg/ports/nana/CONTROL b/vcpkg/ports/nana/CONTROL new file mode 100644 index 0000000..65e75a8 --- /dev/null +++ b/vcpkg/ports/nana/CONTROL @@ -0,0 +1,5 @@ +Source: nana +Version: 1.7.4 +Homepage: https://github.com/cnjinhao/nana +Description: Cross-platform library for GUI programming in modern C++ style. +Build-Depends: libpng, libjpeg-turbo, freetype (!uwp&&!windows), fontconfig (!uwp&&!windows) diff --git a/vcpkg/ports/nana/config.cmake.in b/vcpkg/ports/nana/config.cmake.in new file mode 100644 index 0000000..43b21dc --- /dev/null +++ b/vcpkg/ports/nana/config.cmake.in @@ -0,0 +1,29 @@ +@PACKAGE_INIT@ + +if(UNIX) + find_package(Threads REQUIRED) + find_package(Freetype REQUIRED) + find_package(X11 REQUIRED) + find_library(FONTCONFIG_LIB NAMES fontconfig) +endif() + +option(NANA_ENABLE_PNG "Enable PNG support" @NANA_ENABLE_PNG@) +option(NANA_ENABLE_JPEG "Enable JPEG support" @NANA_ENABLE_JPEG@) + +if(NANA_ENABLE_PNG) + find_package(PNG REQUIRED) +endif() + +if(NANA_ENABLE_JPEG) + find_package(JPEG REQUIRED) +endif() + +include("${CMAKE_CURRENT_LIST_DIR}/unofficial-nana-targets.cmake") + +if(UNIX) + target_link_libraries(unofficial::nana::nana INTERFACE ${FONTCONFIG_LIB} ${X11_LIBRARIES} ${X11_Xft_LIB}) +endif() + +if(NANA_ENABLE_JPEG) + target_link_libraries(unofficial::nana::nana INTERFACE ${JPEG_LIBRARIES}) +endif() diff --git a/vcpkg/ports/nana/fix-build-error.patch b/vcpkg/ports/nana/fix-build-error.patch new file mode 100644 index 0000000..d007143 --- /dev/null +++ b/vcpkg/ports/nana/fix-build-error.patch @@ -0,0 +1,13 @@ +diff --git a/source/system/split_string.cpp b/source/system/split_string.cpp +index 8269db6..c40016b 100644 +--- a/source/system/split_string.cpp ++++ b/source/system/split_string.cpp +@@ -18,7 +18,7 @@ std::vector split_string (const split_string_type& text, char + sep_pos = text.find(sep, sep_pos); + sep_pos = (text.npos == sep_pos ? text.size() : sep_pos); + const std::size_t end = sep_pos; +- while (sep_pos < text.size() and sep == text[sep_pos]) { ++ while (sep_pos < text.size() && sep == text[sep_pos]) { + ++sep_pos; + } + diff --git a/vcpkg/ports/nana/portfile.cmake b/vcpkg/ports/nana/portfile.cmake new file mode 100644 index 0000000..8aa0cbe --- /dev/null +++ b/vcpkg/ports/nana/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +if(NOT VCPKG_TARGET_IS_WINDOWS) + message(WARNING "You will need to install Xorg dependencies to use nana:\napt install libx11-dev libxft-dev libxcursor-dev\n") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cnjinhao/nana + REF 554c4fe87fc31b8ee104228e9117d545d34855b5 # v1.7.4 + SHA512 d9db8ea1bd47fe663b8e2443a1a3e279760dbd11ef6bc78d9dc8f6fd12f9736b8c8315dfc84d21325e02ad6b2dc3a429593ac80e7610097ddc7253668c383178 + HEAD_REF develop + PATCHES + fix-build-error.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.cmake.in DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DNANA_ENABLE_PNG=ON + -DNANA_ENABLE_JPEG=ON + OPTIONS_DEBUG + -DNANA_INSTALL_HEADERS=OFF) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-nana TARGET_PATH share/unofficial-nana) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/nano-signal-slot/CONTROL b/vcpkg/ports/nano-signal-slot/CONTROL new file mode 100644 index 0000000..99cee9f --- /dev/null +++ b/vcpkg/ports/nano-signal-slot/CONTROL @@ -0,0 +1,5 @@ +Source: nano-signal-slot +Version: 2.0.1 +Homepage: https://github.com/NoAvailableAlias/nano-signal-slot +Description: Pure C++17 Signals and Slots +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/nano-signal-slot/portfile.cmake b/vcpkg/ports/nano-signal-slot/portfile.cmake new file mode 100644 index 0000000..ea4f936 --- /dev/null +++ b/vcpkg/ports/nano-signal-slot/portfile.cmake @@ -0,0 +1,12 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO NoAvailableAlias/nano-signal-slot + REF 7e237d75e72501109d1276d7c0c97b33e9d7caf1 + SHA512 a998e59bfded36d9fe2c88d8f3c5229db4fa3c02062f218267f070f4809f63d0bad07300d3cf1f60141ab84bb1802402ac11de06159df6af460f0be4c47f8b9a + HEAD_REF master +) + +file(GLOB INCLUDES ${SOURCE_PATH}/*.hpp) +file(INSTALL ${INCLUDES} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/nanobench/CONTROL b/vcpkg/ports/nanobench/CONTROL new file mode 100644 index 0000000..f8366a0 --- /dev/null +++ b/vcpkg/ports/nanobench/CONTROL @@ -0,0 +1,4 @@ +Source: nanobench +Version: 4.0.0 +Homepage: https://nanobench.ankerl.com +Description: Simple, fast, accurate single-header microbenchmarking functionality for C++11/14/17/20 diff --git a/vcpkg/ports/nanobench/portfile.cmake b/vcpkg/ports/nanobench/portfile.cmake new file mode 100644 index 0000000..272306f --- /dev/null +++ b/vcpkg/ports/nanobench/portfile.cmake @@ -0,0 +1,16 @@ +# Header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO martinus/nanobench + REF c534992696b9341274c6714931d0064d74239fcb #v4.0.0 + SHA512 09078f1100c6f843e7646b8aaab687c32e71ba2dc05a2a5b282c72ab064ceffbf4aeb5ad14c4a2bdbe2ea66dca9cd207dee5eade44f77844cddfa490b4c09c32 + HEAD_REF master +) + +file( + COPY ${SOURCE_PATH}/src/include/nanobench.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/nanodbc/CONTROL b/vcpkg/ports/nanodbc/CONTROL new file mode 100644 index 0000000..08070ae --- /dev/null +++ b/vcpkg/ports/nanodbc/CONTROL @@ -0,0 +1,6 @@ +Source: nanodbc +Version: 2.13.0 +Port-Version: 1 +Homepage: https://github.com/lexicalunit/nanodbc +Description: A small C++ wrapper for the native C ODBC API. +Build-Depends: unixodbc(!windows) diff --git a/vcpkg/ports/nanodbc/portfile.cmake b/vcpkg/ports/nanodbc/portfile.cmake new file mode 100644 index 0000000..c020a16 --- /dev/null +++ b/vcpkg/ports/nanodbc/portfile.cmake @@ -0,0 +1,31 @@ +# Only static libraries are supported. +# See https://github.com/nanodbc/nanodbc/issues/13 +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nanodbc/nanodbc + REF 7404a4dd7697e188df5724ab95a7553d2fc404eb + SHA512 35ca098e783d771f3df611bce84e9b8207a6a5b72c492d2f3909977bc91a7c22bb262c34768b0d97ebfbdf12eeda0214064a8ea171e7bdda7b759f93ff346f45 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DNANODBC_DISABLE_EXAMPLES=ON + -DNANODBC_DISABLE_TESTS=ON + -DNANODBC_ENABLE_UNICODE=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/nanoflann/CONTROL b/vcpkg/ports/nanoflann/CONTROL new file mode 100644 index 0000000..efdc648 --- /dev/null +++ b/vcpkg/ports/nanoflann/CONTROL @@ -0,0 +1,4 @@ +Source: nanoflann +Version: 1.3.1 +Homepage: https://github.com/jlblancoc/nanoflann +Description: nanoflann is a C++11 header-only library for building KD-Trees of datasets with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and 3D rotation groups). \ No newline at end of file diff --git a/vcpkg/ports/nanoflann/portfile.cmake b/vcpkg/ports/nanoflann/portfile.cmake new file mode 100644 index 0000000..20c372c --- /dev/null +++ b/vcpkg/ports/nanoflann/portfile.cmake @@ -0,0 +1,19 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jlblancoc/nanoflann + REF e8792e464ab05267216acde8b4ddf301714176a2 #1.3.1 + SHA512 78a04d39b418b6c6582e6d4180958bb0b492547a9662026da07a8b75d7186140bc4d6b50b6eece32db0196607cfcc901aaf4b458e9ab8a9a115b569acc2bae40 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT} TARGET_PATH share/${PORT}) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/nanogui/CONTROL b/vcpkg/ports/nanogui/CONTROL new file mode 100644 index 0000000..9c532e4 --- /dev/null +++ b/vcpkg/ports/nanogui/CONTROL @@ -0,0 +1,7 @@ +Source: nanogui +Version: 2019-09-23 +Port-Version: 1 +Homepage: https://github.com/wjakob/nanogui +Description: NanoGUI is a minimalistic cross-platform widget library for OpenGL 3.x or higher. +Build-Depends: glfw3, nanovg, eigen3 +Supports: !uwp diff --git a/vcpkg/ports/nanogui/fix-cmakelists.patch b/vcpkg/ports/nanogui/fix-cmakelists.patch new file mode 100644 index 0000000..cc4aa05 --- /dev/null +++ b/vcpkg/ports/nanogui/fix-cmakelists.patch @@ -0,0 +1,72 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8c59277..3fe6f5d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -11,11 +11,7 @@ if (POLICY CMP0058) + cmake_policy(SET CMP0058 NEW) + endif() + +-if (NOT IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/ext/glfw/src") +- message(FATAL_ERROR "The NanoGUI dependency repositories (GLFW, etc.) are missing! " +- "You probably did not clone the project with --recursive. It is possible to recover " +- "by calling \"git submodule update --init --recursive\"") +-endif() ++ + + if (WIN32) + set(NANOGUI_USE_GLAD_DEFAULT ON) +@@ -78,13 +74,11 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations") + endif() + +-add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/ext/glfw" "ext_build/glfw") + # Two targets have now been defined: `glfw_objects`, which will be merged into + # NanoGUI at the end, and `glfw`. The `glfw` target is the library itself + # (e.g., libglfw.so), but can be skipped as we do not need to link against it + # (because we merge `glfw_objects` into NanoGUI). Skipping is required for + # XCode, but preferable for all build systems (reduces build artifacts). +-set_target_properties(glfw PROPERTIES EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_DEFAULT_BUILD 1) + + # Python support: add NANOGUI_PYTHON flag to all targets + if (NANOGUI_BUILD_PYTHON) +@@ -310,7 +304,6 @@ add_definitions(${NANOGUI_EXTRA_DEFS}) + # Compile main NanoGUI library + add_library(nanogui-obj OBJECT + # Merge NanoVG into the NanoGUI library +- ext/nanovg/src/nanovg.c + # Merge GLAD into the NanoGUI library (only if needed) + ${LIBNANOGUI_EXTRA_SOURCE} + # Fonts etc. +@@ -352,6 +345,11 @@ add_library(nanogui-obj OBJECT + src/serializer.cpp + ) + ++find_path(EIGEN_INCLUDE_DIR Eigen/Core) ++target_include_directories(nanogui-obj PRIVATE ${EIGEN_INCLUDE_DIR}) ++find_path(STB_INCLUDE_DIR stb_image.h) ++target_include_directories(nanogui-obj PRIVATE ${STB_INCLUDE_DIR}) ++ + # XCode has a serious bug where the XCode project produces an invalid target + # that will not get linked if it consists only of objects from object libraries, + # it will not generate any products (executables, libraries). The only work +@@ -363,15 +361,18 @@ if (CMAKE_GENERATOR STREQUAL Xcode) + add_library(nanogui ${NANOGUI_LIBRARY_TYPE} + ${XCODE_DUMMY} + $ +- $ + ) + else() + add_library(nanogui ${NANOGUI_LIBRARY_TYPE} + $ +- $ + ) + endif() + ++find_package(nanovg CONFIG REQUIRED) ++find_package(Eigen3 CONFIG REQUIRED) ++find_package(glfw3 CONFIG REQUIRED) ++target_link_libraries(nanogui glfw nanovg::nanovg Eigen3::Eigen) ++ + if (NANOGUI_BUILD_SHARED) + set_property(TARGET nanogui-obj PROPERTY POSITION_INDEPENDENT_CODE ON) + endif() diff --git a/vcpkg/ports/nanogui/portfile.cmake b/vcpkg/ports/nanogui/portfile.cmake new file mode 100644 index 0000000..f1cb824 --- /dev/null +++ b/vcpkg/ports/nanogui/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO wjakob/nanogui + REF e9ec8a1a9861cf578d9c6e85a6420080aa715c03 #Commits on Sep 23, 2019 + SHA512 36c93bf977862ced2df4030211e2b83625e60a11fc9fdb6c1f2996bb234758331d3f41a7fbafd25a5bca0239ed9bac9c93446a4a7fac4c5e6d7943af2be3e14a + HEAD_REF master + PATCHES + fix-cmakelists.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DNANOGUI_EIGEN_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/eigen3 + -DEIGEN_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/eigen3 +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/nanomsg/CONTROL b/vcpkg/ports/nanomsg/CONTROL new file mode 100644 index 0000000..8f6d45e --- /dev/null +++ b/vcpkg/ports/nanomsg/CONTROL @@ -0,0 +1,7 @@ +Source: nanomsg +Version: 1.1.5-2 +Description: a simple high-performance implementation of several "scalability protocols". + These scalability protocols are light-weight messaging protocols which can be used to solve a number of very common messaging patterns, such as request/reply, publish/subscribe, surveyor/respondent, and so forth. These protocols can run over a variety of transports such as TCP, UNIX sockets, and even WebSocket. + +Feature: tool +Description: nanomsg tool (nanocat) diff --git a/vcpkg/ports/nanomsg/portfile.cmake b/vcpkg/ports/nanomsg/portfile.cmake new file mode 100644 index 0000000..a412543 --- /dev/null +++ b/vcpkg/ports/nanomsg/portfile.cmake @@ -0,0 +1,65 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nanomsg/nanomsg + REF 1.1.5 + SHA512 773b8e169a7accac21414c63972423a249164f5b843c6c65c1b03a2eb90d21da788a98debdeb396dab795e52d30605696bc2cf65e5e05687bf115438d5b22717 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" NN_STATIC_LIB) + +if("tool" IN_LIST FEATURES) + set(NN_ENABLE_NANOCAT ON) +else() + set(NN_ENABLE_NANOCAT OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_DISABLE_FIND_PACKAGE_Git=TRUE + -DNN_STATIC_LIB=${NN_STATIC_LIB} + -DNN_TESTS=OFF + -DNN_TOOLS=OFF + -DNN_ENABLE_DOC=OFF + -DNN_ENABLE_NANOCAT=${NN_ENABLE_NANOCAT} +) + +vcpkg_install_cmake() + +file(STRINGS ${SOURCE_PATH}/.version NN_PACKAGE_VERSION) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/nanomsg-${NN_PACKAGE_VERSION}) + +vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/share/${PORT}/nanomsg-config.cmake + "lib/cmake/nanomsg-${NN_PACKAGE_VERSION}" + "share/nanomsg" +) + +if(NN_ENABLE_NANOCAT) + vcpkg_copy_tools(TOOL_NAMES nanocat AUTO_CLEAN) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/include/nanomsg/nn.h + "defined(NN_STATIC_LIB)" + "1 // defined(NN_STATIC_LIB)" + ) + + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/share/${PORT}/nanomsg-config.cmake + "set_and_check(nanomsg_BINDIR \${PACKAGE_PREFIX_DIR}/bin)" + "" + ) +endif() + +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/nanopb/CONTROL b/vcpkg/ports/nanopb/CONTROL new file mode 100644 index 0000000..40d18ea --- /dev/null +++ b/vcpkg/ports/nanopb/CONTROL @@ -0,0 +1,3 @@ +Source: nanopb +Version: 2019-02-12-2 +Description: A small code-size Protocol Buffers implementation in ANSI C. diff --git a/vcpkg/ports/nanopb/portfile.cmake b/vcpkg/ports/nanopb/portfile.cmake new file mode 100644 index 0000000..35d662c --- /dev/null +++ b/vcpkg/ports/nanopb/portfile.cmake @@ -0,0 +1,39 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +message(WARNING "\ +The nanopb's code generator is not installed as part of the installation \ +currently. So you have to run the code generator manually." +) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nanopb/nanopb + REF d1305ddef1c18b4cb33992254494ccd255701aaa + SHA512 70e588b0ff13846005658a9fafe57551dc2c126a32f351fe0b6c166c142c42b3bcc44567288f609f2f3a5adc1fe1bf1c585fec8c5fe90817b5b3ab47955aa1fc + HEAD_REF master +) + +string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "static" BUILD_STATIC_LIBS) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -Dnanopb_BUILD_RUNTIME=ON + -Dnanopb_BUILD_GENERATOR=OFF + -DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS} + -Dnanopb_MSVC_STATIC_RUNTIME=OFF +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/nanoprintf/CONTROL b/vcpkg/ports/nanoprintf/CONTROL new file mode 100644 index 0000000..f3518b9 --- /dev/null +++ b/vcpkg/ports/nanoprintf/CONTROL @@ -0,0 +1,4 @@ +Source: nanoprintf +Version: 2020-05-27 +Description: A tiny embeddable printf replacement written in C99 +Homepage: https://github.com/charlesnicholson/nanoprintf diff --git a/vcpkg/ports/nanoprintf/portfile.cmake b/vcpkg/ports/nanoprintf/portfile.cmake new file mode 100644 index 0000000..7587949 --- /dev/null +++ b/vcpkg/ports/nanoprintf/portfile.cmake @@ -0,0 +1,12 @@ +# header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO charlesnicholson/nanoprintf + REF b210b50a2b8608e2f0226b47a8f82c3476177a4f + SHA512 8340bf3785a8609568188e28e3fb905007d6da052f860df02fe0b8b2fdef3ca1ac87b91f7ac203fbd7235bcd50c8a63f33b2fca2854cad1351899c59cd8d7646 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/nanoprintf.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/nanorange/CONTROL b/vcpkg/ports/nanorange/CONTROL new file mode 100644 index 0000000..0ff1b40 --- /dev/null +++ b/vcpkg/ports/nanorange/CONTROL @@ -0,0 +1,3 @@ +Source: nanorange +Version: 0.0.0 +Description: NanoRange is a C++14 implementation of the C++20 Ranges proposals. \ No newline at end of file diff --git a/vcpkg/ports/nanorange/portfile.cmake b/vcpkg/ports/nanorange/portfile.cmake new file mode 100644 index 0000000..aa039c3 --- /dev/null +++ b/vcpkg/ports/nanorange/portfile.cmake @@ -0,0 +1,24 @@ +# header-only +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tcbrindle/NanoRange + HEAD_REF master +) + +# +#vcpkg_configure_cmake( +# SOURCE_PATH ${SOURCE_PATH} +# PREFER_NINJA +#) +#vcpkg_build_cmake() +# + +# Copy header files +file(COPY ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.hpp") + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/nanorange) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/nanorange/LICENSE_1_0.txt ${CURRENT_PACKAGES_DIR}/share/nanorange/copyright) + diff --git a/vcpkg/ports/nanort/CONTROL b/vcpkg/ports/nanort/CONTROL new file mode 100644 index 0000000..6b45af8 --- /dev/null +++ b/vcpkg/ports/nanort/CONTROL @@ -0,0 +1,4 @@ +Source: nanort +Version: 2019-08-20-1 +Description: Single header only modern ray tracing kernel +Homepage: https://github.com/lighttransport/nanort diff --git a/vcpkg/ports/nanort/portfile.cmake b/vcpkg/ports/nanort/portfile.cmake new file mode 100644 index 0000000..3c9ff02 --- /dev/null +++ b/vcpkg/ports/nanort/portfile.cmake @@ -0,0 +1,13 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lighttransport/nanort + REF c85fe7a10be5baf8242c81288718c244f25d0183 + SHA512 0917ffdc51db9d5f936fc79d5b3d1886c5163470e650a2613200417a9e7a344b75c76c115f64160877d6a3480f7eda7884f3097927eb371267cc6d3c30afed37 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/nanort.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/nanovg/CMakeLists.txt b/vcpkg/ports/nanovg/CMakeLists.txt new file mode 100644 index 0000000..8caf732 --- /dev/null +++ b/vcpkg/ports/nanovg/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required(VERSION 3.11) +project(nanovg C) + +find_path(STB_INCLUDES stb_image.h include) + +set(NANOVG_SOURCES src/nanovg.c) +set(NANOVG_HEADERS src/nanovg.h src/nanovg_gl.h src/nanovg_gl_utils.h) +add_library(nanovg STATIC ${NANOVG_SOURCES} ${NANOVG_HEADERS}) +set_target_properties(nanovg PROPERTIES PUBLIC_HEADER "${NANOVG_HEADERS}") +target_include_directories(nanovg PRIVATE ${STB_INCLUDES}) + +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + target_compile_definitions(nanovg PRIVATE DEBUG) +else() + target_compile_definitions(nanovg PRIVATE NDEBUG) +endif() + +install(TARGETS nanovg + EXPORT nanovgTargets + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + PUBLIC_HEADER DESTINATION include) + +install(EXPORT nanovgTargets + FILE nanovgTargets.cmake + NAMESPACE nanovg:: + DESTINATION share/nanovg) + +install(FILES + ${CMAKE_CURRENT_SOURCE_DIR}/nanovgConfig.cmake + DESTINATION share/nanovg) diff --git a/vcpkg/ports/nanovg/CONTROL b/vcpkg/ports/nanovg/CONTROL new file mode 100644 index 0000000..57bd00f --- /dev/null +++ b/vcpkg/ports/nanovg/CONTROL @@ -0,0 +1,5 @@ +Source: nanovg +Version: 2019-8-30-3 +Homepage: https://github.com/memononen/nanovg +Description: NanoVG is small antialiased vector graphics rendering library for OpenGL. +Build-Depends: stb \ No newline at end of file diff --git a/vcpkg/ports/nanovg/nanovgConfig.cmake b/vcpkg/ports/nanovg/nanovgConfig.cmake new file mode 100644 index 0000000..e849dff --- /dev/null +++ b/vcpkg/ports/nanovg/nanovgConfig.cmake @@ -0,0 +1 @@ +include(${CMAKE_CURRENT_LIST_DIR}/nanovgTargets.cmake) diff --git a/vcpkg/ports/nanovg/portfile.cmake b/vcpkg/ports/nanovg/portfile.cmake new file mode 100644 index 0000000..6a83880 --- /dev/null +++ b/vcpkg/ports/nanovg/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO memononen/nanovg + REF 1f9c8864fc556a1be4d4bf1d6bfe20cde25734b4 + SHA512 99a44f01114ee653a966d4695596886240752f5a06d540c408b5aeaebdcc5360fc2043276515695580d048649a20dc50409107f89c4ce506d2ccb83a0635d29f + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/nanovgConfig.cmake DESTINATION ${SOURCE_PATH}) + +file(GLOB STB_SRCS ${SOURCE_PATH}/src/stb_*) +if(STB_SRCS) + file(REMOVE_RECURSE ${STB_SRCS}) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/nativefiledialog/CMakeLists.txt b/vcpkg/ports/nativefiledialog/CMakeLists.txt new file mode 100644 index 0000000..8f5b79d --- /dev/null +++ b/vcpkg/ports/nativefiledialog/CMakeLists.txt @@ -0,0 +1,70 @@ +cmake_minimum_required(VERSION 3.14) + +project(nfd LANGUAGES C) + +include(GNUInstallDirs) + +option(NFD_GTK_BACKEND "Using GTK backend" ON) + +file(GLOB nfd_sources + "${PROJECT_SOURCE_DIR}/src/*.h" + "${PROJECT_SOURCE_DIR}/src/include/*.h" + "${PROJECT_SOURCE_DIR}/src/nfd_common.c" +) + +if (WIN32) + enable_language(CXX) + list(APPEND nfd_sources "${PROJECT_SOURCE_DIR}/src/nfd_win.cpp") +elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") + if (NFD_GTK_BACKEND) + find_package(GTK3 QUIET) + if (GTK3_FOUND) + list(APPEND nfd_sources "${PROJECT_SOURCE_DIR}/src/nfd_gtk.c") + else () + list(APPEND nfd_sources "${PROJECT_SOURCE_DIR}/src/nfd_zenity.c") + endif () + else () + list(APPEND nfd_sources "${PROJECT_SOURCE_DIR}/src/nfd_zenity.c") + endif () +elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + list(APPEND nfd_sources "${PROJECT_SOURCE_DIR}/src/nfd_cocoa.m") +endif () + +add_library(nfd ${nfd_sources}) + +set_target_properties( + nfd + PROPERTIES + DEBUG_POSTFIX "_d" + PUBLIC_HEADER ${CMAKE_CURRENT_LIST_DIR}/src/include/nfd.h +) + +target_compile_definitions( + nfd + PRIVATE + $<$:_CRT_SECURE_NO_WARNINGS> +) + +target_include_directories( + nfd + PUBLIC + $ + $ +) + +if (GTK3_FOUND) + target_include_directories(nfd PUBLIC ${GTK3_INCLUDE_DIRS}) + target_link_libraries(nfd PUBLIC ${GTK3_LIBRARIES}) +endif () + +install(TARGETS nfd EXPORT unofficial-nativefiledialog-config) + +install( + EXPORT unofficial-nativefiledialog-config + NAMESPACE unofficial::nativefiledialog:: + DESTINATION share/unofficial-nativefiledialog + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) diff --git a/vcpkg/ports/nativefiledialog/CONTROL b/vcpkg/ports/nativefiledialog/CONTROL new file mode 100644 index 0000000..afe2835 --- /dev/null +++ b/vcpkg/ports/nativefiledialog/CONTROL @@ -0,0 +1,8 @@ +Source: nativefiledialog +Version: 2019-08-28 +Description: A tiny, neat C library that portably invokes native file open and save dialogs +Homepage: https://github.com/mlabbe/nativefiledialog +Supports: !uwp + +Feature: zenity +Description: Using Zenity backend on Linux diff --git a/vcpkg/ports/nativefiledialog/portfile.cmake b/vcpkg/ports/nativefiledialog/portfile.cmake new file mode 100644 index 0000000..f8e0faa --- /dev/null +++ b/vcpkg/ports/nativefiledialog/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mlabbe/nativefiledialog + REF ceb75f7abf30736aa8ee4800cde0d444c798f8b9 + SHA512 dd2bff28bb08fb1f6b07ad28530da039f176fb641e300b816040a2b2b840611e418cad44fdaf395ec565c50149ce58c80f88f6a77b403b843f2b14f1f2c91d7d + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES "zenity" NFD_GTK_BACKEND +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME unofficial-${PORT}) diff --git a/vcpkg/ports/neargye-semver/CONTROL b/vcpkg/ports/neargye-semver/CONTROL new file mode 100644 index 0000000..4b7745b --- /dev/null +++ b/vcpkg/ports/neargye-semver/CONTROL @@ -0,0 +1,4 @@ +Source: neargye-semver +Version: 0.2.2 +Description: C++17 header-only dependency-free versioning library complying with Semantic Versioning 2.0.0 +Homepage: https://github.com/Neargye/semver diff --git a/vcpkg/ports/neargye-semver/portfile.cmake b/vcpkg/ports/neargye-semver/portfile.cmake new file mode 100644 index 0000000..8a74ee9 --- /dev/null +++ b/vcpkg/ports/neargye-semver/portfile.cmake @@ -0,0 +1,13 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Neargye/semver + REF v0.2.2 + SHA512 f299e6d74f0232f40e20959ed3d7138d5faff924f60748827849e21951d76d34070bac2479a35f3ea6e801ec5e23ebf8391adedc70d778c4aa5e4c89b20c332c + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/include/semver.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include/neargye) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/netcdf-c/CONTROL b/vcpkg/ports/netcdf-c/CONTROL new file mode 100644 index 0000000..92d0439 --- /dev/null +++ b/vcpkg/ports/netcdf-c/CONTROL @@ -0,0 +1,6 @@ +Source: netcdf-c +Version: 4.7.3 +Port-Version: 4 +Build-Depends: hdf5, curl +Homepage: https://github.com/Unidata/netcdf-c +Description: a set of self-describing, machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data. diff --git a/vcpkg/ports/netcdf-c/config-pkg-location.patch b/vcpkg/ports/netcdf-c/config-pkg-location.patch new file mode 100644 index 0000000..532082c --- /dev/null +++ b/vcpkg/ports/netcdf-c/config-pkg-location.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 46892ee..803ff46 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1742,7 +1742,9 @@ FILE(COPY ${netCDF_SOURCE_DIR}/include/netcdf_meta.h + # Create CMake package configuration files. With these, other packages using + # cmake should be able to find netcdf using find_package and find_library. + # The EXPORT call is paired with one in liblib. +-set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/netCDF) ++if(NOT DEFINED ConfigPackageLocation) ++ set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/netCDF) ++endif(NOT DEFINED ConfigPackageLocation) + + install(EXPORT netCDFTargets + DESTINATION ${ConfigPackageLocation} diff --git a/vcpkg/ports/netcdf-c/fix-dependency-libmath.patch b/vcpkg/ports/netcdf-c/fix-dependency-libmath.patch new file mode 100644 index 0000000..0db00cc --- /dev/null +++ b/vcpkg/ports/netcdf-c/fix-dependency-libmath.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 35c694f..e2c03e5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -839,7 +839,7 @@ ENDIF() + + # Check for the math library so it can be explicitly linked. + IF(NOT WIN32) +- FIND_LIBRARY(HAVE_LIBM NAMES math m libm) ++ FIND_LIBRARY(HAVE_LIBM NAMES m libm math) + MESSAGE(STATUS "Found Math library: ${HAVE_LIBM}") + IF(NOT HAVE_LIBM) + MESSAGE(FATAL_ERROR "Unable to find the math library.") diff --git a/vcpkg/ports/netcdf-c/mpi.patch b/vcpkg/ports/netcdf-c/mpi.patch new file mode 100644 index 0000000..64027e6 --- /dev/null +++ b/vcpkg/ports/netcdf-c/mpi.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 101f97719..b070121b8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1004,6 +1004,8 @@ IF(ENABLE_PARALLEL4 AND ENABLE_NETCDF_4) + IF(MSVC) + FIND_PACKAGE(MPI REQUIRED) + INCLUDE_DIRECTORIES(${MPI_C_INCLUDE_PATH}) ++ list(APPEND CMAKE_REQUIRED_LIBRARIES MPI::MPI_C) ++ list(APPEND EXTRA_DEPS MPI::MPI_C) + ENDIF() + SET(HDF5_PARALLEL ON CACHE BOOL "") + SET(USE_PARALLEL ON CACHE BOOL "") + diff --git a/vcpkg/ports/netcdf-c/no-install-deps.patch b/vcpkg/ports/netcdf-c/no-install-deps.patch new file mode 100644 index 0000000..3d44b38 --- /dev/null +++ b/vcpkg/ports/netcdf-c/no-install-deps.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e87f3de..46892ee 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1570,7 +1570,7 @@ ADD_SUBDIRECTORY(docs) + # install them in the binary dir. Grab all of the .libs, put them + # in the libdir. + ## +-IF(MSVC) ++IF(MSVC AND NOT DISABLE_INSTALL_DEPENDENCIES) + FILE(GLOB COPY_FILES ${CMAKE_PREFIX_PATH}/lib/*.lib) + INSTALL(FILES ${COPY_FILES} + DESTINATION ${CMAKE_INSTALL_LIBDIR} diff --git a/vcpkg/ports/netcdf-c/portfile.cmake b/vcpkg/ports/netcdf-c/portfile.cmake new file mode 100644 index 0000000..4813aa5 --- /dev/null +++ b/vcpkg/ports/netcdf-c/portfile.cmake @@ -0,0 +1,54 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Unidata/netcdf-c + REF b7cd387bee8c661141fabb490f4969587c008c55 # v4.7.3 + SHA512 a55391620fac61e4975fe62907ca21049911afce6190fc12d183d24133a32aae8cd223b97a3fe57fc82d8bdca1a7db451046e3be3c379051624d48b1f56c0332 + HEAD_REF master + PATCHES + no-install-deps.patch + config-pkg-location.patch + use_targets.patch + mpi.patch + fix-dependency-libmath.patch +) + +#Remove outdated find modules +file(REMOVE "${SOURCE_PATH}/cmake/modules/FindSZIP.cmake") +file(REMOVE "${SOURCE_PATH}/cmake/modules/FindZLIB.cmake") +file(REMOVE "${SOURCE_PATH}/cmake/modules/windows/FindHDF5.cmake") + +if(VCPKG_CRT_LINKAGE STREQUAL "static") + set(NC_USE_STATIC_CRT ON) +else() + set(NC_USE_STATIC_CRT OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE # netcdf-c configures in the source! + PREFER_NINJA + OPTIONS + -DBUILD_UTILITIES=OFF + -DBUILD_TESTING=OFF + -DENABLE_EXAMPLES=OFF + -DENABLE_TESTS=OFF + -DENABLE_FILTER_TESTING=OFF + -DUSE_HDF5=ON + -DENABLE_DAP_REMOTE_TESTS=OFF + -DDISABLE_INSTALL_DEPENDENCIES=ON + -DNC_USE_STATIC_CRT=${NC_USE_STATIC_CRT} + -DConfigPackageLocation=share/netcdf +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/netcdf) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/netcdf-c/usage b/vcpkg/ports/netcdf-c/usage new file mode 100644 index 0000000..681a20f --- /dev/null +++ b/vcpkg/ports/netcdf-c/usage @@ -0,0 +1,4 @@ +The package netcdf-c provides CMake targets: + + find_package(netCDF CONFIG REQUIRED) + target_link_libraries(main PRIVATE netcdf) diff --git a/vcpkg/ports/netcdf-c/use_targets.patch b/vcpkg/ports/netcdf-c/use_targets.patch new file mode 100644 index 0000000..99e50dc --- /dev/null +++ b/vcpkg/ports/netcdf-c/use_targets.patch @@ -0,0 +1,168 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1ce05e0fe..7671d7b1e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -431,7 +431,6 @@ IF(NC_EXTRA_DEPS) + SET(EXTRA_DEPS ${EXTRA_DEPS} "${${_LIB}_DEP}") + ENDFOREACH() + MESSAGE("Extra deps: ${EXTRA_DEPS}") +- LIST(REMOVE_DUPLICATES EXTRA_DEPS) + SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${EXTRA_DEPS}) + ENDIF() + ### +@@ -599,15 +599,6 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) + # we will use a static library. This can be toggled + # by explicitly modifying NC_FIND_SHARED_LIBS. + ## +- IF(NC_FIND_SHARED_LIBS) +- SET(NC_HDF5_LINK_TYPE "shared") +- SET(NC_HDF5_LINK_TYPE_UPPER "SHARED") +- ADD_DEFINITIONS(-DH5_BUILT_AS_DYNAMIC_LIB) +- ELSE(NC_FIND_SHARED_LIBS) +- SET(NC_HDF5_LINK_TYPE "static") +- SET(NC_HDF5_LINK_TYPE_UPPER "STATIC") +- ADD_DEFINITIONS(-DH5_BUILT_AS_STATIC_LIB) +- ENDIF(NC_FIND_SHARED_LIBS) + + ##### + # First, find the C and HL libraries. +@@ -620,9 +620,9 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) + SET(SEARCH_PACKAGE_NAME ${HDF5_PACKAGE_NAME}) + FIND_PACKAGE(HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS C HL CONFIG REQUIRED ${NC_HDF5_LINK_TYPE}) + ELSE(MSVC) +- FIND_PACKAGE(HDF5 COMPONENTS C HL REQUIRED) ++ FIND_PACKAGE(HDF5 COMPONENTS C HL CONFIG REQUIRED) + ENDIF(MSVC) +- ++ + ## + # Next, check the HDF5 version. This will inform which + # HDF5 variables we need to munge. +@@ -695,6 +695,19 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) + ENDIF() + ENDIF(HDF5_C_LIBRARY AND HDF5_HL_LIBRARY AND HDF5_INCLUDE_DIR) + ++ if(TARGET hdf5::hdf5-shared) ++ set(HDF5_C_LIBRARY hdf5::hdf5-shared) ++ set(HDF5_C_LIBRARY_hdf5 hdf5::hdf5-shared) ++ set(HDF5_HL_LIBRARIES hdf5::hdf5_hl-shared) ++ ADD_DEFINITIONS(-DH5_BUILT_AS_DYNAMIC_LIB) ++ else() ++ set(HDF5_C_LIBRARY hdf5::hdf5-static) ++ set(HDF5_C_LIBRARY_hdf5 hdf5::hdf5-static) ++ set(HDF5_HL_LIBRARIES hdf5::hdf5_hl-static) ++ ADD_DEFINITIONS(-DH5_BUILT_AS_STATIC_LIB) ++ endif() ++ list(APPEND CMAKE_REQUIRED_LIBRARIES ${HDF5_C_LIBRARY}) ++ + FIND_PACKAGE(Threads) + + # There is a missing case in the above code so default it +@@ -721,16 +733,11 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) + CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Pset_all_coll_metadata_ops "" HDF5_HAS_COLL_METADATA_OPS) + + #Check to see if H5Z_SZIP exists in HDF5_Libraries. If so, we must use szip. +- CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Z_SZIP "" USE_SZIP) ++ set(USE_SZIP ${HDF5_ENABLE_SZIP_SUPPORT}) + IF(USE_SZIP) +- FIND_LIBRARY(SZIP NAMES szip sz) +- IF(SZIP) ++ #FIND_LIBRARY(SZIP NAMES szip sz) ++ #IF(SZIP) + SET(HAVE_H5Z_SZIP 1) +- SET(SZIP_LIBRARY ${SZIP}) +- SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${SZIP}) +- ELSE() +- MESSAGE(FATAL_ERROR "HDF5 Requires SZIP, but cannot find libszip or libsz.") +- ENDIF() + ENDIF() + + CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Pset_libver_bounds "" HAVE_H5PSET_LIBVER_BOUNDS) +@@ -764,8 +776,7 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) + ENDIF(USE_HDF5 OR ENABLE_NETCDF_4) + + # See if we have libcurl +-FIND_PACKAGE(CURL) +-ADD_DEFINITIONS(-DCURL_STATICLIB=1) ++FIND_PACKAGE(CURL CONFIG) + INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIRS}) + + # Check to see if CURLOPT_USERNAME is defined. +@@ -1890,7 +1902,6 @@ ENDIF() + + STRING(REPLACE ";" " " LINKFLAGS "${LINKFLAGS}") + +-LIST(REMOVE_DUPLICATES NC_LIBS) + LIST(REMOVE_DUPLICATES LINKFLAGS) + + SET(LIBS ${NC_LIBS}) +diff --git a/liblib/CMakeLists.txt b/liblib/CMakeLists.txt +index ea9b02949..ec7851f37 100644 +--- a/liblib/CMakeLists.txt ++++ b/liblib/CMakeLists.txt +@@ -58,7 +58,7 @@ ENDIF() + + SET(TLL_LIBS "") + +-SET(TLL_LIBS ${TLL_LIBS} ${HAVE_LIBM} ${ZLIB_LIBRARY}) ++SET(TLL_LIBS ${TLL_LIBS} ${HAVE_LIBM} ZLIB::ZLIB) + + # Add extra dependencies specified via NC_EXTRA_DEPS + SET(TLL_LIBS ${TLL_LIBS} ${EXTRA_DEPS}) +@@ -68,27 +68,15 @@ IF(HAVE_LIBDL) + ENDIF() + + IF(USE_HDF5 OR USE_NETCDF4) +- IF(NOT MSVC) +- # Some version of cmake define HDF5_hdf5_LIBRARY instead of +- # HDF5_LIBRARY. Same with HDF5_HL_LIBRARIES +- IF(HDF5_hdf5_LIBRARY AND NOT HDF5_C_LIBRARIES) +- SET(HDF5_C_LIBRARIES ${HDF5_hdf5_LIBRARY}) +- ENDIF() +- IF(HDF5_hdf5_hl_LIBRARY AND NOT HDF5_HL_LIBRARIES) +- SET(HDF5_HL_LIBRARIES ${HDF5_hdf5_hl_LIBRARY}) +- ENDIF() +- # The order of the libraries is important here for static +- # builds: +- # Make sure that HDF5_C_LIBRARY appears *after* +- # HDF5_HL_LIBRARY. +- SET(TLL_LIBS ${HDF5_HL_LIBRARIES} ${HDF5_C_LIBRARIES} ${TLL_LIBS} ${SZIP_LIBRARY}) +- ELSE() # Windows CMake defines HDF5_LIBRARIES. +- SET(TLL_LIBS ${HDF5_LIBRARIES} ${TLL_LIBS} ${SZIP_LIBRARY}) +- ENDIF() ++ if(TARGET hdf5::hdf5-shared) ++ SET(TLL_LIBS ${TLL_LIBS} hdf5::hdf5-shared hdf5::hdf5_hl-shared) ++ else() ++ SET(TLL_LIBS ${TLL_LIBS} hdf5::hdf5-static hdf5::hdf5_hl-static) ++ endif() + ENDIF() + + IF(USE_DAP) +- SET(TLL_LIBS ${TLL_LIBS} ${CURL_LIBRARY}) ++ SET(TLL_LIBS ${TLL_LIBS} CURL::libcurl) + ENDIF() + + IF(USE_HDF4) +@@ -100,7 +88,6 @@ IF(ENABLE_PNETCDF AND PNETCDF) + ENDIF() + + IF(TLL_LIBS) +- LIST(REMOVE_DUPLICATES TLL_LIBS) + ENDIF() + + TARGET_LINK_LIBRARIES(netcdf ${TLL_LIBS}) +diff --git a/netCDFConfig.cmake.in b/netCDFConfig.cmake.in +index c89cf3e67..b81f35a1b 100644 +--- a/netCDFConfig.cmake.in ++++ b/netCDFConfig.cmake.in +@@ -12,6 +12,10 @@ set_and_check(netCDF_LIB_DIR "@PACKAGE_CMAKE_INSTALL_LIBDIR@") + set(netCDF_LIBRARIES netcdf) + + # include target information ++include(CMakeFindDependencyMacro) ++find_dependency(ZLIB) ++find_dependency(HDF5 CONFIG) ++find_dependency(CURL CONFIG) + include("${CMAKE_CURRENT_LIST_DIR}/netCDFTargets.cmake") + + # Compiling Options diff --git a/vcpkg/ports/netcdf-cxx4/CONTROL b/vcpkg/ports/netcdf-cxx4/CONTROL new file mode 100644 index 0000000..b628a38 --- /dev/null +++ b/vcpkg/ports/netcdf-cxx4/CONTROL @@ -0,0 +1,6 @@ +Source: netcdf-cxx4 +Version: 4.3.1 +Port-Version: 1 +Build-Depends: hdf5, netcdf-c +Homepage: https://github.com/Unidata/netcdf-cxx4 +Description: a set of machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data. diff --git a/vcpkg/ports/netcdf-cxx4/fix-dependecy-hdf5.patch b/vcpkg/ports/netcdf-cxx4/fix-dependecy-hdf5.patch new file mode 100644 index 0000000..73b9a0d --- /dev/null +++ b/vcpkg/ports/netcdf-cxx4/fix-dependecy-hdf5.patch @@ -0,0 +1,41 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 60c699d..f06fcc0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -395,14 +395,20 @@ ENDIF(NC_HAS_DEF_VAR_FILTER) + ### + # Find HDF5 + ### +-IF(MSVC) ++IF(0) + SET(SEARCH_PACKAGE_NAME ${HDF5_PACKAGE_NAME}) + FIND_PACKAGE(HDF5 NAMES ${SEARCH_PACKAGE_NAME} COMPONENTS C HL NO_MODULES REQUIRED ${NC_HDF5_LINK_TYPE}) + ELSE(MSVC) +- FIND_PACKAGE(HDF5 COMPONENTS C HL REQUIRED) ++ FIND_PACKAGE(hdf5 CONFIG REQUIRED) ++ set(HDF5_FOUND ${hdf5_FOUND}) ++ if (NOT HDF5_USE_STATIC_LIBRARIES) ++ set(HDF5_C_LIBRARY_hdf5 hdf5::hdf5-shared hdf5::hdf5_hl-shared) ++ else() ++ set(HDF5_C_LIBRARY_hdf5 hdf5::hdf5-static hdf5::hdf5_hl-static) ++ endif() + ENDIF(MSVC) + +-CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5free_memory "" HAVE_H5FREE_MEMORY) ++set(HAVE_H5FREE_MEMORY ON) + IF(NOT HAVE_H5FREE_MEMORY) + MESSAGE(STATUS "Plugin support requires libhdf5 with H5Free support. Your libhdf5 install does not provide H5Free. Please install a newer version of libhdf5 if you require plugin compression support.") + SET(NC_HAS_DEF_VAR_FILTER "") +diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt +index 30a4a96..1809d29 100644 +--- a/plugins/CMakeLists.txt ++++ b/plugins/CMakeLists.txt +@@ -23,7 +23,7 @@ SET_TARGET_PROPERTIES(test_bzip2 PROPERTIES OUTPUT_NAME "bzip2") + SET_TARGET_PROPERTIES(test_bzip2 PROPERTIES LIBRARY_OUTPUT_NAME "h5bzip2") + SET_TARGET_PROPERTIES(test_bzip2 PROPERTIES ARCHIVE_OUTPUT_NAME "h5bzip2") + SET_TARGET_PROPERTIES(test_bzip2 PROPERTIES RUNTIME_OUTPUT_NAME "h5bzip2") +-TARGET_LINK_LIBRARIES(test_bzip2 ${ALL_TLL_LIBS}) ++TARGET_LINK_LIBRARIES(test_bzip2 ${ALL_TLL_LIBS} ${HDF5_C_LIBRARY_hdf5}) + + ADD_LIBRARY(misc MODULE ${libmisc_SOURCES}) + SET_TARGET_PROPERTIES(misc PROPERTIES LIBRARY_OUTPUT_NAME "misc") diff --git a/vcpkg/ports/netcdf-cxx4/portfile.cmake b/vcpkg/ports/netcdf-cxx4/portfile.cmake new file mode 100644 index 0000000..3efd8e3 --- /dev/null +++ b/vcpkg/ports/netcdf-cxx4/portfile.cmake @@ -0,0 +1,37 @@ +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" HDF5_USE_STATIC_LIBRARIES) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Unidata/netcdf-cxx4 + REF f8882188267488ef801691e69ad072e3eb217ad8 # v4.3.1 + SHA512 9816acf221d196e21af19d4c3d85484934916e7c018e9b2c96aab9f5660b2f08c5db9cd8254ba3fa5f0aa5f5c5ad7bd3a3aaba559e5e640c5349d44e07a20ed3 + HEAD_REF master + PATCHES fix-dependecy-hdf5.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DNCXX_ENABLE_TESTS=OFF + -DCMAKE_INSTALL_CMAKECONFIGDIR=share/netCDFCxx + -DHDF5_USE_STATIC_LIBRARIES=${HDF5_USE_STATIC_LIBRARIES} + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/netCDFCxx TARGET_PATH share/netCDFCxx) +vcpkg_copy_pdbs() + +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 ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/nethost/0001-nethost-cmakelists.patch b/vcpkg/ports/nethost/0001-nethost-cmakelists.patch new file mode 100644 index 0000000..93d49b9 --- /dev/null +++ b/vcpkg/ports/nethost/0001-nethost-cmakelists.patch @@ -0,0 +1,58 @@ +diff --git a/src/installer/corehost/cli/common.cmake b/src/installer/corehost/cli/common.cmake +index 63e7306..639c90e 100644 +--- a/src/installer/corehost/cli/common.cmake ++++ b/src/installer/corehost/cli/common.cmake +@@ -5,9 +5,6 @@ + project(${DOTNET_PROJECT_NAME}) + + if(WIN32) +- add_compile_options($<$:/MT>) +- add_compile_options($<$:/MT>) +- add_compile_options($<$:/MTd>) + else() + add_compile_options(-fvisibility=hidden) + endif() +diff --git a/src/installer/corehost/cli/nethost/CMakeLists.txt b/src/installer/corehost/cli/nethost/CMakeLists.txt +index 7473958..49c664f 100644 +--- a/src/installer/corehost/cli/nethost/CMakeLists.txt ++++ b/src/installer/corehost/cli/nethost/CMakeLists.txt +@@ -2,12 +2,14 @@ + # The .NET Foundation licenses this file to you under the MIT license. + # See the LICENSE file in the project root for more information. + +-cmake_minimum_required (VERSION 2.6) ++cmake_minimum_required (VERSION 3.14) + project(nethost) + + set(DOTNET_PROJECT_NAME "nethost") + + # Include directories ++include(../../../settings.cmake) ++include(../../../functions.cmake) + include_directories(../fxr) + + # CMake does not recommend using globbing since it messes with the freshness checks +@@ -22,13 +24,18 @@ if(WIN32) + Exports.def) + endif() + ++if(BUILD_SHARED_LIBS) + include(../lib.cmake) ++else() + include(../lib_static.cmake) ++endif() + + add_definitions(-DFEATURE_LIBHOST=1) + add_definitions(-DNETHOST_EXPORT) + +-install(FILES nethost.h DESTINATION corehost) +-install(TARGETS nethost DESTINATION corehost) +-install(TARGETS libnethost DESTINATION corehost) +-install_symbols(nethost corehost) +\ No newline at end of file ++install(FILES nethost.h ../coreclr_delegates.h ../hostfxr.h DESTINATION include) ++if(BUILD_SHARED_LIBS) ++install(TARGETS nethost) ++else() ++install(TARGETS libnethost) ++endif() diff --git a/vcpkg/ports/nethost/0002-settings-cmake.patch b/vcpkg/ports/nethost/0002-settings-cmake.patch new file mode 100644 index 0000000..7143b94 --- /dev/null +++ b/vcpkg/ports/nethost/0002-settings-cmake.patch @@ -0,0 +1,13 @@ +diff --git a/src/installer/settings.cmake b/src/installer/settings.cmake +index 29d57b44..6ea63902 100644 +--- a/src/installer/settings.cmake ++++ b/src/installer/settings.cmake +@@ -114,7 +114,7 @@ endfunction() + + function(install_symbols targetName destination_path) + if(WIN32) +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/$/${targetName}.pdb DESTINATION ${destination_path}) ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${targetName}.pdb DESTINATION ${destination_path}) + else() + strip_symbols(${targetName} strip_destination_file) + install(FILES ${strip_destination_file} DESTINATION ${destination_path}) diff --git a/vcpkg/ports/nethost/CONTROL b/vcpkg/ports/nethost/CONTROL new file mode 100644 index 0000000..f1e97e1 --- /dev/null +++ b/vcpkg/ports/nethost/CONTROL @@ -0,0 +1,4 @@ +Source: nethost +Version: 2019-12-21 +Description: Provides a set of APIs that can be used to host .NET Core (dotnet) +Homepage: https://github.com/dotnet/runtime/tree/master/src/installer/corehost/cli/nethost diff --git a/vcpkg/ports/nethost/portfile.cmake b/vcpkg/ports/nethost/portfile.cmake new file mode 100644 index 0000000..3809d98 --- /dev/null +++ b/vcpkg/ports/nethost/portfile.cmake @@ -0,0 +1,68 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +set(COMMIT_HASH 188427d7e18102c45fc6d0e20c135e226f215992) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dotnet/runtime + REF ${COMMIT_HASH} + SHA512 5a93c66c87e2113f733702d938efd39456c99fb74b383097b8d877df21536fcbcba901606aa70db6c8f1a16421ea8f06822c5b0ab1d882631b6daecbed8d03cc + HEAD_REF master + PATCHES + 0001-nethost-cmakelists.patch + 0002-settings-cmake.patch +) + +set(PRODUCT_VERSION "5.0.0") + +if(VCPKG_TARGET_IS_WINDOWS) + set(RID_PLAT "win") +elseif(VCPKG_TARGET_IS_OSX) + set(RID_PLAT "osx") +elseif(VCPKG_TARGET_IS_LINUX) + set(RID_PLAT "linux") +else() + message(FATAL_ERROR "Unsupported platform") +endif() + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(RID_ARCH "x86") + set(ARCH_NAME "I386") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(RID_ARCH "x64") + set(ARCH_NAME "AMD64") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(RID_ARCH "arm") + set(ARCH_NAME "ARM") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(RID_ARCH "arm64") + set(ARCH_NAME "ARM64") +else() + message(FATAL_ERROR "Unsupported architecture") +endif() + +set(BASE_RID "${RID_PLAT}-${RID_ARCH}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/src/installer/corehost/cli/nethost + PREFER_NINJA + OPTIONS + "-DSKIP_VERSIONING=1" + "-DCLI_CMAKE_HOST_POLICY_VER:STRING=${PRODUCT_VERSION}" + "-DCLI_CMAKE_HOST_FXR_VER:STRING=${PRODUCT_VERSION}" + "-DCLI_CMAKE_HOST_VER:STRING=${PRODUCT_VERSION}" + "-DCLI_CMAKE_COMMON_HOST_VER:STRING=${PRODUCT_VERSION}" + "-DCLI_CMAKE_PKG_RID:STRING=${BASE_RID}" + "-DCLI_CMAKE_COMMIT_HASH:STRING=${COMMIT_HASH}" + "-DCLI_CMAKE_PLATFORM_ARCH_${ARCH_NAME}=1" + "-DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=10.0" +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/nethost/usage b/vcpkg/ports/nethost/usage new file mode 100644 index 0000000..6e6d860 --- /dev/null +++ b/vcpkg/ports/nethost/usage @@ -0,0 +1,6 @@ +The package nethost can be used via CMake: + + find_path(NETHOST_INCLUDE_DIRS nethost.h) + find_library(NETHOST_LIBRARY NAMES libnethost nethost) + target_include_directories(main PRIVATE ${NETHOST_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${NETHOST_LIBRARY}) diff --git a/vcpkg/ports/nettle/CONTROL b/vcpkg/ports/nettle/CONTROL new file mode 100644 index 0000000..48c4259 --- /dev/null +++ b/vcpkg/ports/nettle/CONTROL @@ -0,0 +1,6 @@ +Source: nettle +Version: 3.5.1 +Port-Version: 3 +Homepage: https://git.lysator.liu.se/nettle/nettle +Description: Nettle is a low-level cryptographic library that is designed to fit easily in more or less any context: In crypto toolkits for object-oriented languages (C++, Python, Pike, ...), in applications like LSH or GNUPG, or even in kernel space. +Build-Depends: gmp, vs-yasm (windows) \ No newline at end of file diff --git a/vcpkg/ports/nettle/fix-InstallLibPath.patch b/vcpkg/ports/nettle/fix-InstallLibPath.patch new file mode 100644 index 0000000..363cda9 --- /dev/null +++ b/vcpkg/ports/nettle/fix-InstallLibPath.patch @@ -0,0 +1,36 @@ +diff --git a/configure.ac b/configure.ac +index 3547cae..e13a5bf 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -366,25 +366,25 @@ if test "x$ABI" != xstandard ; then + else + # The dash builtin pwd tries to be "helpful" and remember + # symlink names. Use -P option, and hope it's portable enough. +- test -d /usr/lib${ABI} \ +- && (cd /usr/lib${ABI} && pwd -P | grep >/dev/null "/lib${ABI}"'$') \ +- && libdir='${exec_prefix}/'"lib${ABI}" ++ test -d /usr/lib \ ++ && (cd /usr/lib && pwd -P | grep >/dev/null "/lib"'$') \ ++ && libdir='${exec_prefix}/'"lib" + fi + ;; + # On freebsd, it seems 32-bit libraries are in lib32, + # and 64-bit in lib. Don't know about "kfreebsd", does + # it follow the Linux fhs conventions? + *:freebsd*:32) +- libdir='${exec_prefix}/lib32' ++ libdir='${exec_prefix}/lib' + ;; + *:freebsd*:64) + libdir='${exec_prefix}/lib' + ;; + *:irix*:32) +- libdir='${exec_prefix}/lib32' ++ libdir='${exec_prefix}/lib' + ;; + *:irix*:64) +- libdir='${exec_prefix}/lib64' ++ libdir='${exec_prefix}/lib' + ;; + *) + AC_MSG_WARN([Don't know where to install $ABI-bit libraries on this system.]); dnl ' diff --git a/vcpkg/ports/nettle/gmp.patch b/vcpkg/ports/nettle/gmp.patch new file mode 100644 index 0000000..b732e03 --- /dev/null +++ b/vcpkg/ports/nettle/gmp.patch @@ -0,0 +1,273 @@ +diff --git a/SMP/config.h b/SMP/config.h +index 5e59a1daa..c5a658954 100644 +--- a/SMP/config.h ++++ b/SMP/config.h +@@ -101,7 +101,7 @@ + #define HAVE_SYS_TYPES_H 1 + + /* Define to 1 if you have the header file. */ +-#define HAVE_UNISTD_H 1 ++//#define HAVE_UNISTD_H 1 + + /* Define to 1 if you have the header file. */ + /* #undef HAVE_VALGRIND_MEMCHECK_H */ +diff --git a/SMP/libhogweed.vcxproj b/SMP/libhogweed.vcxproj +index cdf309639..9d37146a4 100644 +--- a/SMP/libhogweed.vcxproj ++++ b/SMP/libhogweed.vcxproj +@@ -1325,7 +1325,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + true + 5.1 +- nettled.lib;gmpd.lib;%(AdditionalDependencies) ++ nettled.lib;gmpd.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -1457,7 +1457,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 10.0 + 8.1 +- nettled_winrt.lib;gmpd_winrt.lib;%(AdditionalDependencies) ++ nettled.lib;gmpd.lib;%(AdditionalDependencies) + $(OutDir)\lib\x86\$(RootNamespace).winmd + /IGNORE:4006,4221,4078 %(AdditionalOptions) + +@@ -1585,7 +1585,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) + true + 6.1 +- nettled.lib;gmpd.lib;%(AdditionalDependencies) ++ nettled.lib;gmpd.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -1715,7 +1715,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 10.0 + 8.1 +- nettled_winrt.lib;gmpd_winrt.lib;%(AdditionalDependencies) ++ nettled.lib;gmpd.lib;%(AdditionalDependencies) + $(OutDir)\lib\x64\$(RootNamespace).winmd + /IGNORE:4006,4221,4078 %(AdditionalOptions) + +@@ -2368,7 +2368,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + true + 5.1 +- nettle.lib;gmp.lib;%(AdditionalDependencies) ++ nettle.lib;gmp.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -2641,7 +2641,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 10.0 + 8.1 +- nettle_winrt.lib;gmp_winrt.lib;%(AdditionalDependencies) ++ nettle.lib;gmp.lib;%(AdditionalDependencies) + $(OutDir)\lib\x86\$(RootNamespace).winmd + /IGNORE:4006,4221,4078 %(AdditionalOptions) + +@@ -2915,7 +2915,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) + true + 6.1 +- nettle.lib;gmp.lib;%(AdditionalDependencies) ++ nettle.lib;gmp.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -3186,7 +3186,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 10.0 + 8.1 +- nettle_winrt.lib;gmp_winrt.lib;%(AdditionalDependencies) ++ nettle.lib;gmp.lib;%(AdditionalDependencies) + $(OutDir)\lib\x64\$(RootNamespace).winmd + /IGNORE:4006,4221,4078 %(AdditionalOptions) + +diff --git a/SMP/libnettle.vcxproj b/SMP/libnettle.vcxproj +index 9ea0d8ea7..56583e10f 100644 +--- a/SMP/libnettle.vcxproj ++++ b/SMP/libnettle.vcxproj +@@ -968,7 +968,7 @@ + MachineX86 + Windows + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- libgmpd.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -1091,7 +1091,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX86 + Windows + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- libgmpd_winrt.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -1212,7 +1212,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX64 + Windows + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- libgmpd.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -1335,7 +1335,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX64 + Windows + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- libgmpd_winrt.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -1463,7 +1463,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 5.1 + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- gmpd.lib;%(AdditionalDependencies) ++ gmpd.lib;%(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -1595,7 +1595,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + 8.1 + $(OutDir)\lib\x86\$(RootNamespace).winmd + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- gmpd_winrt.lib;%(AdditionalDependencies) ++ gmpd.lib;%(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -1721,7 +1721,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 6.1 + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- gmpd.lib;%(AdditionalDependencies) ++ gmpd.lib;%(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -1851,7 +1851,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + 8.1 + $(OutDir)\lib\x64\$(RootNamespace).winmd + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- gmpd_winrt.lib;%(AdditionalDependencies) ++ gmpd.lib;%(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -1979,7 +1979,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX86 + Windows + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- libgmp.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -2108,7 +2108,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX86 + Windows + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- libgmp_winrt.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -2235,7 +2235,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX64 + Windows + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- libgmp.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -2364,7 +2364,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX64 + Windows + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- libgmp_winrt.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -2498,7 +2498,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 5.1 + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- gmp.lib;%(AdditionalDependencies) ++ gmp.lib;%(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -2632,7 +2632,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 5.1 + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- libgmp.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -2770,7 +2770,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + 8.1 + $(OutDir)\lib\x86\$(RootNamespace).winmd + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- gmp_winrt.lib;%(AdditionalDependencies) ++ gmp.lib;%(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -2908,7 +2908,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + 8.1 + $(OutDir)\lib\x86\$(RootNamespace).winmd + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- libgmp_winrt.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -3041,7 +3041,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 6.1 + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- gmp.lib;%(AdditionalDependencies) ++ gmp.lib;%(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -3174,7 +3174,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 6.1 + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- libgmp.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -3311,7 +3311,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + 8.1 + $(OutDir)\lib\x64\$(RootNamespace).winmd + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- gmp_winrt.lib;%(AdditionalDependencies) ++ gmp.lib;%(AdditionalDependencies) + + + mkdir "$(OutDir)"\include +@@ -3448,7 +3448,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + 8.1 + $(OutDir)\lib\x64\$(RootNamespace).winmd + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- libgmp_winrt.lib;%(AdditionalDependencies) ++ %(AdditionalDependencies) + + + mkdir "$(OutDir)"\include diff --git a/vcpkg/ports/nettle/name.dir.patch b/vcpkg/ports/nettle/name.dir.patch new file mode 100644 index 0000000..753aaff --- /dev/null +++ b/vcpkg/ports/nettle/name.dir.patch @@ -0,0 +1,567 @@ +diff --git a/SMP/libhogweed.vcxproj b/SMP/libhogweed.vcxproj +index 9f741e240..5bb05b359 100644 +--- a/SMP/libhogweed.vcxproj ++++ b/SMP/libhogweed.vcxproj +@@ -670,142 +670,142 @@ + + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libhogweedd ++ hogweedd + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libhogweedd_winrt ++ hogweedd + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libhogweedd +- $(ProjectDir)..\..\..\msvc\ ++ hogweedd ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libhogweedd_winrt +- $(ProjectDir)..\..\..\msvc\ ++ hogweedd ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + hogweedd + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- hogweedd_winrt ++ hogweedd + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + hogweedd +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- hogweedd_winrt +- $(ProjectDir)..\..\..\msvc\ ++ hogweedd ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libhogweed ++ hogweed + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libhogweed_winrt ++ hogweed + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libhogweed +- $(ProjectDir)..\..\..\msvc\ ++ hogweed ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libhogweed_winrt +- $(ProjectDir)..\..\..\msvc\ ++ hogweed ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + hogweed + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + hogweed + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- hogweed_winrt ++ hogweed + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- hogweed_winrt ++ hogweed + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + hogweed +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + hogweed +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- hogweed_winrt +- $(ProjectDir)..\..\..\msvc\ ++ hogweed ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- hogweed_winrt +- $(ProjectDir)..\..\..\msvc\ ++ hogweed ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + +@@ -826,7 +826,7 @@ + MachineX86 + Windows + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- libnettled.lib;%(AdditionalDependencies) ++ nettled.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -950,7 +950,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX86 + Windows + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- libnettled_winrt.lib;%(AdditionalDependencies) ++ nettled.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -1072,7 +1072,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX64 + Windows + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- libnettled.lib;%(AdditionalDependencies) ++ nettled.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -1196,7 +1196,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX64 + Windows + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- libnettled_winrt.lib;%(AdditionalDependencies) ++ nettled.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -1325,7 +1325,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + true + 5.1 +- nettled.lib;gmpd.lib;%(AdditionalDependencies) ++ nettled.lib;gmpd.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -1457,7 +1457,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 10.0 + 8.1 +- nettled.lib;gmpd.lib;%(AdditionalDependencies) ++ nettled.lib;gmpd.lib;%(AdditionalDependencies) + $(OutDir)\lib\x86\$(RootNamespace).winmd + /IGNORE:4006,4221,4078 %(AdditionalOptions) + +@@ -1585,7 +1585,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) + true + 6.1 +- nettled.lib;gmpd.lib;%(AdditionalDependencies) ++ nettled.lib;gmpd.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -1715,7 +1715,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 10.0 + 8.1 +- nettled.lib;gmpd.lib;%(AdditionalDependencies) ++ nettled.lib;gmpd.lib;%(AdditionalDependencies) + $(OutDir)\lib\x64\$(RootNamespace).winmd + /IGNORE:4006,4221,4078 %(AdditionalOptions) + +@@ -1845,7 +1845,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX86 + Windows + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- libnettle.lib;%(AdditionalDependencies) ++ nettle.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -1975,7 +1975,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX86 + Windows + $(OutDir)\lib\x86\;$(ProjectDir)\..\..\prebuilt\lib\x86\;%(AdditionalLibraryDirectories) +- libnettle_winrt.lib;%(AdditionalDependencies) ++ nettle.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -2103,7 +2103,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX64 + Windows + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- libnettle.lib;%(AdditionalDependencies) ++ nettle.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -2233,7 +2233,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + MachineX64 + Windows + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) +- libnettle_winrt.lib;%(AdditionalDependencies) ++ nettle.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -2368,7 +2368,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + true + 5.1 +- nettle.lib;gmp.lib;%(AdditionalDependencies) ++ nettle.lib;gmp.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -2503,7 +2503,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + true + 5.1 +- libnettle.lib;%(AdditionalDependencies) ++ nettle.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -2641,7 +2641,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 10.0 + 8.1 +- nettle.lib;gmp.lib;%(AdditionalDependencies) ++ nettle.lib;gmp.lib;%(AdditionalDependencies) + $(OutDir)\lib\x86\$(RootNamespace).winmd + /IGNORE:4006,4221,4078 %(AdditionalOptions) + +@@ -2780,7 +2780,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 10.0 + 8.1 +- libnettle_winrt.lib;%(AdditionalDependencies) ++ nettle.lib;%(AdditionalDependencies) + $(OutDir)\lib\x86\$(RootNamespace).winmd + /IGNORE:4006,4221,4078 %(AdditionalOptions) + +@@ -2915,7 +2915,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) + true + 6.1 +- nettle.lib;gmp.lib;%(AdditionalDependencies) ++ nettle.lib;gmp.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -3049,7 +3049,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + $(OutDir)\lib\x64\;$(ProjectDir)\..\..\prebuilt\lib\x64\;%(AdditionalLibraryDirectories) + true + 6.1 +- libnettle.lib;%(AdditionalDependencies) ++ nettle.lib;%(AdditionalDependencies) + /IGNORE:4006,4221,4078 %(AdditionalOptions) + + +@@ -3186,7 +3186,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 10.0 + 8.1 +- nettle.lib;gmp.lib;%(AdditionalDependencies) ++ nettle.lib;gmp.lib;%(AdditionalDependencies) + $(OutDir)\lib\x64\$(RootNamespace).winmd + /IGNORE:4006,4221,4078 %(AdditionalOptions) + +@@ -3324,7 +3324,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + true + 10.0 + 8.1 +- libnettle_winrt.lib;%(AdditionalDependencies) ++ nettle.lib;%(AdditionalDependencies) + $(OutDir)\lib\x64\$(RootNamespace).winmd + /IGNORE:4006,4221,4078 %(AdditionalOptions) + +diff --git a/SMP/libnettle.vcxproj b/SMP/libnettle.vcxproj +index 56583e10f..665e8ef4e 100644 +--- a/SMP/libnettle.vcxproj ++++ b/SMP/libnettle.vcxproj +@@ -812,142 +812,142 @@ + + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libnettled ++ nettled + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libnettled_winrt ++ nettled + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libnettled +- $(ProjectDir)..\..\..\msvc\ ++ nettled ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libnettled_winrt +- $(ProjectDir)..\..\..\msvc\ ++ nettled ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + nettled + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- nettled_winrt ++ nettled + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + nettled +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- nettled_winrt +- $(ProjectDir)..\..\..\msvc\ ++ nettled ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libnettle ++ nettle + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libnettle_winrt ++ nettle + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libnettle +- $(ProjectDir)..\..\..\msvc\ ++ nettle ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- libnettle_winrt +- $(ProjectDir)..\..\..\msvc\ ++ nettle ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + nettle + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + nettle + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- nettle_winrt ++ nettle + Clean + MSB8012 + + +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- nettle_winrt ++ nettle + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + nettle +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ + nettle +- $(ProjectDir)..\..\..\msvc\ ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- nettle_winrt +- $(ProjectDir)..\..\..\msvc\ ++ nettle ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + + + $(SolutionDir)obj\$(Configuration)\$(Platform)\$(ProjectName)\ +- nettle_winrt +- $(ProjectDir)..\..\..\msvc\ ++ nettle ++ $(ProjectDir)..\msvc\ + Clean + MSB8012 + +diff --git a/hogweed.pc.in b/hogweed.pc.in +index 97fb9d46a..ce977c02e 100644 +--- a/hogweed.pc.in ++++ b/hogweed.pc.in +@@ -13,7 +13,7 @@ URL: http://www.lysator.liu.se/~nisse/nettle + Version: @PACKAGE_VERSION@ + Requires: @IF_NOT_SHARED@ nettle + Requires.private: @IF_SHARED@ nettle +-Libs: -L${libdir} -lhogweed @IF_NOT_SHARED@ @LIBS@ ++Libs: -L${libdir} @HOGWEED@ @IF_NOT_SHARED@ @LIBS@ + Libs.private: @IF_SHARED@ @LIBS@ + Cflags: -I${includedir} + +diff --git a/nettle.pc.in b/nettle.pc.in +index eb0020caa..6e3ed1e4f 100644 +--- a/nettle.pc.in ++++ b/nettle.pc.in +@@ -7,5 +7,6 @@ Name: Nettle + Description: Nettle low-level cryptographic library (symmetric algorithms) + URL: http://www.lysator.liu.se/~nisse/nettle + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -lnettle ++Requires.private: gmp ++Libs: -L${libdir} @LIBS@ + Cflags: -I${includedir} diff --git a/vcpkg/ports/nettle/portfile.cmake b/vcpkg/ports/nettle/portfile.cmake new file mode 100644 index 0000000..9ba1cf5 --- /dev/null +++ b/vcpkg/ports/nettle/portfile.cmake @@ -0,0 +1,133 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ShiftMediaProject/nettle + REF 1d0a6e64e01458fdf37eaf5d90975deb52c3da41 #v3.5.1 + SHA512 6124fbd223e6519d88290c3f4e3b8cc399e038c9c77cfec38e6ab17b075846e662fd0360d62c132c882536489c8a865795f64059e2d2b21467f65d90320e5c39 + HEAD_REF master + PATCHES gmp.patch + name.dir.patch + runtime.nettle.patch + runtime.hogweed.patch + ) + vcpkg_find_acquire_program(YASM) + get_filename_component(YASM_DIR "${YASM}" DIRECTORY) + vcpkg_add_to_path("${YASM_DIR}") + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(CONFIGURATION_RELEASE ReleaseDLL) + set(CONFIGURATION_DEBUG DebugDLL) + else() + set(CONFIGURATION_RELEASE Release) + set(CONFIGURATION_DEBUG Debug) + endif() + + if(VCPKG_TARGET_IS_UWP) + string(APPEND CONFIGURATION_RELEASE WinRT) + string(APPEND CONFIGURATION_DEBUG WinRT) + endif() + + #Setup YASM integration + set(_file "${SOURCE_PATH}/SMP/libnettle.vcxproj") + file(READ "${_file}" _contents) + string(REPLACE [[]] + "" + _contents "${_contents}") + string(REPLACE [[]] + "" + _contents "${_contents}") + string(REGEX REPLACE "${VCPKG_ROOT_DIR}/installed/[^/]+/share" "${CURRENT_INSTALLED_DIR}/share" _contents "${_contents}") # Above already replaced by another triplet + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + STRING(REPLACE ">MultiThreadedDebugDLL<" ">MultiThreadedDebug<" _contents "${_contents}") + STRING(REPLACE ">MultiThreadedDLL<" ">MultiThreaded<" _contents "${_contents}") + else() + STRING(REPLACE ">MultiThreadedDebug<" ">MultiThreadedDebugDLL<" _contents "${_contents}") + STRING(REPLACE ">MultiThreaded<" ">MultiThreadedDLL<" _contents "${_contents}") + endif() + file(WRITE "${_file}" "${_contents}") + set(_file "${SOURCE_PATH}/SMP/libhogweed.vcxproj") + file(READ "${_file}" _contents) + string(REPLACE [[]] + "" + _contents "${_contents}") + string(REPLACE [[]] + "" + _contents "${_contents}") + string(REGEX REPLACE "${VCPKG_ROOT_DIR}/installed/[^/]+/share" "${CURRENT_INSTALLED_DIR}/share" _contents "${_contents}") # Above already replaced by another triplet + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + STRING(REPLACE ">MultiThreadedDebugDLL<" ">MultiThreadedDebug<" _contents "${_contents}") + STRING(REPLACE ">MultiThreadedDLL<" ">MultiThreaded<" _contents "${_contents}") + else() + STRING(REPLACE ">MultiThreadedDebug<" ">MultiThreadedDebugDLL<" _contents "${_contents}") + STRING(REPLACE ">MultiThreaded<" ">MultiThreadedDLL<" _contents "${_contents}") + endif() + file(WRITE "${_file}" "${_contents}") + + vcpkg_install_msbuild( + USE_VCPKG_INTEGRATION + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH SMP/libnettle.sln + PLATFORM ${TRIPLET_SYSTEM_ARCH} + LICENSE_SUBPATH COPYING.LESSERv3 + TARGET Rebuild + RELEASE_CONFIGURATION ${CONFIGURATION_RELEASE} + DEBUG_CONFIGURATION ${CONFIGURATION_DEBUG} + SKIP_CLEAN + OPTIONS /p:UseEnv=True + ) + + get_filename_component(SOURCE_PATH_SUFFIX "${SOURCE_PATH}" NAME) + file(RENAME "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${SOURCE_PATH_SUFFIX}/msvc/include" "${CURRENT_PACKAGES_DIR}/include") + set(PACKAGE_VERSION 3.5.1) + set(prefix "${CURRENT_INSTALLED_DIR}") + set(exec_prefix "\${prefix}") + set(libdir "\${prefix}/lib") + set(includedir "\${prefix}/include") + set(LIBS -lnettle -lgmp) + configure_file("${SOURCE_PATH}/nettle.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/nettle.pc" @ONLY) + set(HOGWEED -lhogweed) + set(LIBS -lnettle) + configure_file("${SOURCE_PATH}/hogweed.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libhogweed.pc" @ONLY) + set(prefix "${CURRENT_INSTALLED_DIR}/debug") + set(exec_prefix "\${prefix}") + set(libdir "\${prefix}/lib") + set(includedir "\${prefix}/../include") + set(LIBS -lnettled -lgmpd) + configure_file("${SOURCE_PATH}/nettle.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/nettle.pc" @ONLY) + set(LIBS -lnettled) + set(HOGWEED -lhogweedd) + configure_file("${SOURCE_PATH}/hogweed.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libhogweed.pc" @ONLY) + vcpkg_fixup_pkgconfig() +else() + vcpkg_from_gitlab( + GITLAB_URL https://git.lysator.liu.se/ + OUT_SOURCE_PATH SOURCE_PATH + REPO nettle/nettle + REF ee5d62898cf070f08beedc410a8d7c418588bd95 #v3.5.1 + SHA512 881912548f4abb21460f44334de11439749c8a055830849a8beb4332071d11d9196d9eecaeba5bf822819d242356083fba91eb8719a64f90e41766826e6d75e1 + HEAD_REF master # branch name + PATCHES fix-InstallLibPath.patch + ) + + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + OPTIONS + --disable-documentation + ${OPTIONS} + ) + + vcpkg_install_make() + vcpkg_fixup_pkgconfig() + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share/") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + + # # Handle copyright + file(INSTALL "${SOURCE_PATH}/COPYINGv3" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR VCPKG_TARGET_IS_LINUX) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") + endif() +endif() + + diff --git a/vcpkg/ports/nettle/runtime.hogweed.patch b/vcpkg/ports/nettle/runtime.hogweed.patch new file mode 100644 index 0000000..a096b77 --- /dev/null +++ b/vcpkg/ports/nettle/runtime.hogweed.patch @@ -0,0 +1,84 @@ +diff --git a/SMP/libhogweed.vcxproj b/SMP/libhogweed.vcxproj +index 3f400af81..e5758ea27 100644 +--- a/SMP/libhogweed.vcxproj ++++ b/SMP/libhogweed.vcxproj +@@ -1066,6 +1066,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4146;4267;4028;4244;%(DisableSpecificWarnings) ++ MultiThreadedDebug + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -1190,6 +1191,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4146;4267;4028;4244;%(DisableSpecificWarnings) ++ MultiThreadedDebug + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -1574,6 +1576,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4146;4267;4028;4244;%(DisableSpecificWarnings) ++ MultiThreadedDebugDLL + + + $(OutDir)\bin\x64\$(TargetName)$(TargetExt) +@@ -1703,6 +1706,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4146;4267;4028;4244;%(DisableSpecificWarnings) ++ MultiThreadedDebugDLL + + + $(OutDir)\bin\x64\$(TargetName)$(TargetExt) +@@ -2097,6 +2101,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + $(OutDir)\lib\x64\$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) + 4146;4267;4028;4244;%(DisableSpecificWarnings) ++ MultiThreaded + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -2227,6 +2232,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4146;4267;4028;4244;%(DisableSpecificWarnings) ++ MultiThreaded + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -2902,6 +2908,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + $(IntDir)$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) + 4146;4267;4028;4244;%(DisableSpecificWarnings) ++ MultiThreadedDLL + + + true +@@ -3036,6 +3043,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + $(IntDir)$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) + 4146;4267;4028;4244;%(DisableSpecificWarnings) ++ MultiThreadedDLL + + + true +@@ -3172,6 +3180,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4146;4267;4028;4244;%(DisableSpecificWarnings) ++ MultiThreadedDLL + + + true +@@ -3310,6 +3319,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4146;4267;4028;4244;%(DisableSpecificWarnings) ++ MultiThreadedDLL + + + true diff --git a/vcpkg/ports/nettle/runtime.nettle.patch b/vcpkg/ports/nettle/runtime.nettle.patch new file mode 100644 index 0000000..33d147e --- /dev/null +++ b/vcpkg/ports/nettle/runtime.nettle.patch @@ -0,0 +1,84 @@ +diff --git a/SMP/libnettle.vcxproj b/SMP/libnettle.vcxproj +index 54f686af6..05b903ab9 100644 +--- a/SMP/libnettle.vcxproj ++++ b/SMP/libnettle.vcxproj +@@ -1206,6 +1206,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4267;4098;%(DisableSpecificWarnings) ++ MultiThreadedDebug + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -1329,6 +1330,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4267;4098;%(DisableSpecificWarnings) ++ MultiThreadedDebug + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -1710,6 +1712,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4267;4098;%(DisableSpecificWarnings) ++ MultiThreadedDebugDLL + + + $(OutDir)\bin\x64\$(TargetName)$(TargetExt) +@@ -1838,6 +1841,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4267;4098;%(DisableSpecificWarnings) ++ MultiThreadedDebugDLL + + + $(OutDir)\bin\x64\$(TargetName)$(TargetExt) +@@ -2229,6 +2233,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + $(OutDir)\lib\x64\$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4267;4098;%(DisableSpecificWarnings) ++ MultiThreaded + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -2358,6 +2363,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4267;4098;%(DisableSpecificWarnings) ++ MultiThreaded + + + $(OutDir)\lib\x64\$(TargetName)$(TargetExt) +@@ -3028,6 +3034,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + $(IntDir)$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4267;4098;%(DisableSpecificWarnings) ++ MultiThreadedDLL + + + true +@@ -3161,6 +3168,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + $(IntDir)$(TargetName).pdb + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4267;4098;%(DisableSpecificWarnings) ++ MultiThreaded + + + true +@@ -3296,6 +3304,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4267;4098;%(DisableSpecificWarnings) ++ MultiThreadedDLL + + + true +@@ -3433,6 +3442,7 @@ del /f /q $(OutDir)\licenses\nettle.txt + false + 4113;%(TreatSpecificWarningsAsErrors) + 4244;4146;4267;4098;%(DisableSpecificWarnings) ++ MultiThreaded + + + true diff --git a/vcpkg/ports/networkdirect-sdk/CONTROL b/vcpkg/ports/networkdirect-sdk/CONTROL new file mode 100644 index 0000000..1581838 --- /dev/null +++ b/vcpkg/ports/networkdirect-sdk/CONTROL @@ -0,0 +1,5 @@ +Source: networkdirect-sdk +Version: 2.0.1 +Description: The Network Direct architecture allows hardware vendors to expose the advanced capabilities of their networking devices. +Homepage: https://www.nuget.org/packages/NetworkDirect +Supports: windows&(x64|x86) \ No newline at end of file diff --git a/vcpkg/ports/networkdirect-sdk/portfile.cmake b/vcpkg/ports/networkdirect-sdk/portfile.cmake new file mode 100644 index 0000000..bb893ed --- /dev/null +++ b/vcpkg/ports/networkdirect-sdk/portfile.cmake @@ -0,0 +1,42 @@ +include(vcpkg_common_functions) + +#only supports windows +if (VCPKG_CMAKE_SYSTEM_NAME) + message(FATAL_ERROR "networkDirect-sdk only supports windows") +endif() + +if(NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + message(FATAL_ERROR "networkDirect-sdk only supports x64 and x86") +endif() + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.nuget.org/api/v2/package/NetworkDirect/2.0.1" + FILENAME "networkDirect-2.0.1.zip" + SHA512 97e48ab293c164a80a3ed9e51f1f9f5ae85c07ee91c49950a76b486567d2e50346a2379b8284ffcb9d7d2fe70f76eff9455dce740cf9d3e0c1b83100e25168a8 +) + +vcpkg_download_distfile(LICENSE + URLS "https://raw.githubusercontent.com/microsoft/NetworkDirect/master/LICENSE.txt" + FILENAME "networkingDirect_license.txt" + SHA512 7d79aae4c9beb85811a3e122a2b12aad231f519dd12a461ac49d52864a735a6b05a263d433c11ede1406d2e49b6dc62dd38487eb7bd8c079d7198a20cf85fc4d +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL +) + +file(COPY ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}/ ) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + file(COPY ${SOURCE_PATH}/lib/x64/ndutil.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) + file(COPY ${SOURCE_PATH}/lib/x64/ndutil.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + file(COPY ${SOURCE_PATH}/lib/Win32/ndutil.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) + file(COPY ${SOURCE_PATH}/lib/Win32/ndutil.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) +endif() + +file(COPY ${LICENSE} DESTINATION ${CURRENT_PACKAGES_DIR}/share/networkdirect-sdk/COPYRIGHT) diff --git a/vcpkg/ports/nghttp2/CONTROL b/vcpkg/ports/nghttp2/CONTROL new file mode 100644 index 0000000..6afd6f8 --- /dev/null +++ b/vcpkg/ports/nghttp2/CONTROL @@ -0,0 +1,4 @@ +Source: nghttp2 +Version: 1.39.2-2 +Homepage: https://github.com/nghttp2/nghttp2 +Description: Implementation of the Hypertext Transfer Protocol version 2 in C diff --git a/vcpkg/ports/nghttp2/portfile.cmake b/vcpkg/ports/nghttp2/portfile.cmake new file mode 100644 index 0000000..c7b5a53 --- /dev/null +++ b/vcpkg/ports/nghttp2/portfile.cmake @@ -0,0 +1,45 @@ +set(LIB_NAME nghttp2) +set(LIB_VERSION 1.39.2) + +set(LIB_FILENAME ${LIB_NAME}-${LIB_VERSION}.tar.gz) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nghttp2/nghttp2 + REF v${LIB_VERSION} + SHA512 1ddfb8c6538e209e39199fb5e2f9c262d58d188f25c98cd03f9f733bb261055b7625f0f79863731b112e69bc40c9d6a7d10d4fe69f56c615127e03277ee3af1d + HEAD_REF master +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(ENABLE_STATIC_LIB ON) + set(ENABLE_SHARED_LIB OFF) +else() + set(ENABLE_STATIC_LIB OFF) + set(ENABLE_SHARED_LIB ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DENABLE_LIB_ONLY=ON + -DENABLE_ASIO_LIB=OFF + -DENABLE_STATIC_LIB=${ENABLE_STATIC_LIB} + -DENABLE_SHARED_LIB=${ENABLE_SHARED_LIB} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/ngspice/CONTROL b/vcpkg/ports/ngspice/CONTROL new file mode 100644 index 0000000..df7fd9b --- /dev/null +++ b/vcpkg/ports/ngspice/CONTROL @@ -0,0 +1,6 @@ +Source: ngspice +Version: 32 +Port-Version: 1 +Homepage: http://ngspice.sourceforge.net/ +Description: Ngspice is a mixed-level/mixed-signal electronic circuit simulator. It is a successor of the latest stable release of Berkeley SPICE +Supports: !(linux|osx|arm|uwp) diff --git a/vcpkg/ports/ngspice/portfile.cmake b/vcpkg/ports/ngspice/portfile.cmake new file mode 100644 index 0000000..66675c8 --- /dev/null +++ b/vcpkg/ports/ngspice/portfile.cmake @@ -0,0 +1,52 @@ +vcpkg_fail_port_install(ON_TARGET "Linux" "OSX" "UWP" ON_ARCH "arm" "arm64") + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +# ngspice produces self-contained DLLs +set(VCPKG_CRT_LINKAGE static) + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO ngspice/ng-spice-rework + REF 32 + FILENAME "ngspice-32.tar.gz" + SHA512 222eaa0cd6577a6eb8454bb49a7050a162d430c4b07a4fdc6baf350c5b3f5b018bac640fd44f465ec09c8cba6a9729b1cbe8d3d8c097f672acc2c22fabe8f4bc + PATCHES + use-winbison-global.patch +) + +vcpkg_find_acquire_program(BISON) + +get_filename_component(BISON_DIR "${BISON}" DIRECTORY) +vcpkg_add_to_path(PREPEND "${BISON_DIR}") + +# Ensure its windows +if (VCPKG_TARGET_IS_WINDOWS) + # Sadly, vcpkg globs .libs inside install_msbuild and whines that the 47 year old SPICE format isn't a MSVC lib ;) + # We need to kill them off first before the source tree is copied to a tmp location by install_msbuild + + file(REMOVE_RECURSE ${SOURCE_PATH}/contrib) + file(REMOVE_RECURSE ${SOURCE_PATH}/examples) + file(REMOVE_RECURSE ${SOURCE_PATH}/man) + file(REMOVE_RECURSE ${SOURCE_PATH}/tests) + + vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + INCLUDES_SUBPATH /src/include + LICENSE_SUBPATH COPYING + # install_msbuild swaps x86 for win32(bad) if we dont force our own setting + PLATFORM ${TRIPLET_SYSTEM_ARCH} + PROJECT_SUBPATH visualc/sharedspice.sln + TARGET Build + ) +else() + message(FATAL_ERROR "Sorry but ngspice only can be built in Windows") +endif() + +# Unforunately install_msbuild isn't able to dual include directories that effectively layer +file(GLOB NGSPICE_INCLUDES + ${SOURCE_PATH}/visualc/src/include/ngspice/* +) +file(COPY ${NGSPICE_INCLUDES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/ngspice) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/ngspice/use-winbison-global.patch b/vcpkg/ports/ngspice/use-winbison-global.patch new file mode 100644 index 0000000..f28a34a --- /dev/null +++ b/vcpkg/ports/ngspice/use-winbison-global.patch @@ -0,0 +1,13 @@ +diff --git a/visualc/sharedspice.vcxproj b/visualc/sharedspice.vcxproj +index 96786b1..f5d9322 100644 +--- a/visualc/sharedspice.vcxproj ++++ b/visualc/sharedspice.vcxproj +@@ -879,7 +879,7 @@ + + + invoke win_bison.exe for %(Identity) +- ..\..\flex-bison\win_bison.exe --output=.\tmp-bison\%(Filename).c --defines=.\tmp-bison\%(Filename).h %(Identity) || exit 1 ++ win_bison.exe --output=.\tmp-bison\%(Filename).c --defines=.\tmp-bison\%(Filename).h %(Identity) || exit 1 + .\tmp-bison\%(Filename).c;.\tmp-bison\%(Filename).h + + diff --git a/vcpkg/ports/nifticlib/CONTROL b/vcpkg/ports/nifticlib/CONTROL new file mode 100644 index 0000000..acd8aed --- /dev/null +++ b/vcpkg/ports/nifticlib/CONTROL @@ -0,0 +1,25 @@ +Source: nifticlib +Version: 2020-04-30 +Description: Nifticlib is a C I/O library for reading and writing files in the nifti-1 data format. +Homepage: NIFTI-Imaging/nifti_clib +Build-Depends: zlib +Default-Features: nifti2, nifticdf +Supports: !uwp + +Feature: cifti +Description: Build cifti libraries and tools + +Feature: fsl +Description: Build fsl libraries and tools + +Feature: nifti2 +Description: Build nifti2 libraries and tools + +Feature: nifticdf +Description: Build nifticdf libraries and tools + +Feature: tools +Description: Build tools + +Feature: tests +Description: Build tests diff --git a/vcpkg/ports/nifticlib/portfile.cmake b/vcpkg/ports/nifticlib/portfile.cmake new file mode 100644 index 0000000..c9d74a4 --- /dev/null +++ b/vcpkg/ports/nifticlib/portfile.cmake @@ -0,0 +1,48 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO NIFTI-Imaging/nifti_clib + REF 65f801b9c2f1f15f4de4a19d45e6595c25765632 + SHA512 be03cdc6cf17fd9ff74c5ecc1f6b2132121bb4b7973a731da334af2a8428d1f0dbbf7b94b2511d1ff7e515b8cc4cf3316d62b189566fb6ffc88c6146eebd48ff + HEAD_REF master + PATCHES zlib_include.patch +) + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + "cifti" USE_CIFTI_CODE + "fsl" USE_FSL_CODE + "nifti2" USE_NIFTI2_CODE + "nifticdf" USE_NIFTICDF_CODE + "tools" NIFTI_BUILD_APPLICATIONS + "tests" BUILD_TESTING +) +set(TOOL_NAMES) +if("tools" IN_LIST FEATURES) + list(APPEND TOOL_NAMES nifti_stats nifti_tool nifti1_tool) +endif() +if("tests" IN_LIST FEATURES) + list(APPEND TOOL_NAMES nifit_test) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake TARGET_PATH share) + +if(TOOL_NAMES) + vcpkg_copy_tools(TOOL_NAMES ${TOOL_NAMES} AUTO_CLEAN) +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/nifticlib/zlib_include.patch b/vcpkg/ports/nifticlib/zlib_include.patch new file mode 100644 index 0000000..1ef462b --- /dev/null +++ b/vcpkg/ports/nifticlib/zlib_include.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 54150d739..c3ca8fe50 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -77,6 +77,7 @@ set_if_not_defined(ZNZ_COMPILE_DEF "") + if(NOT NIFTI_ZLIB_LIBRARIES) # If using a custom zlib library, skip the find package + ### USE AS STAND ALONE PACKAGE + find_package(ZLIB REQUIRED) ++ include_directories(${ZLIB_INCLUDE_DIRS}) + set(NIFTI_ZLIB_LIBRARIES ${ZLIB_LIBRARIES}) + endif() + #message(STATUS "---------------------ZLIB -${NIFTI_ZLIB_LIBRARIES}--") diff --git a/vcpkg/ports/nlohmann-fifo-map/CMakeLists.txt b/vcpkg/ports/nlohmann-fifo-map/CMakeLists.txt new file mode 100644 index 0000000..3450e51 --- /dev/null +++ b/vcpkg/ports/nlohmann-fifo-map/CMakeLists.txt @@ -0,0 +1,30 @@ +cmake_minimum_required(VERSION 3.1) +project(nlohmann-fifo-map LANGUAGES CXX) + +include(GNUInstallDirs) + +set(NLOHMANN_FIFO_MAP_TARGET_NAME ${PROJECT_NAME}) +set(NLOHMANN_FIFO_MAP_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/nlohmann") +set(NLOHMANN_FIFO_MAP_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/nlohmann-fifo-map") +set(NLOHMANN_FIFO_MAP_CONFIG_EXPORT_NAME "${PROJECT_NAME}-config") +set(NLOHMANN_FIFO_MAP_INCLUDE_BUILD_DIR "${CMAKE_SOURCE_DIR}/src/") + +add_library(${NLOHMANN_FIFO_MAP_TARGET_NAME} INTERFACE) +add_library(${PROJECT_NAME}::${NLOHMANN_FIFO_MAP_TARGET_NAME} ALIAS ${NLOHMANN_FIFO_MAP_TARGET_NAME}) + +install( + DIRECTORY ${NLOHMANN_FIFO_MAP_INCLUDE_BUILD_DIR} + DESTINATION ${NLOHMANN_FIFO_MAP_INCLUDE_INSTALL_DIR} +) + +install( + TARGETS ${NLOHMANN_FIFO_MAP_TARGET_NAME} EXPORT ${NLOHMANN_FIFO_MAP_CONFIG_EXPORT_NAME} + INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +) + +install( + EXPORT ${NLOHMANN_FIFO_MAP_CONFIG_EXPORT_NAME} + DESTINATION ${NLOHMANN_FIFO_MAP_CONFIG_INSTALL_DIR} + NAMESPACE ${PROJECT_NAME}:: +) + diff --git a/vcpkg/ports/nlohmann-fifo-map/CONTROL b/vcpkg/ports/nlohmann-fifo-map/CONTROL new file mode 100644 index 0000000..22b81c5 --- /dev/null +++ b/vcpkg/ports/nlohmann-fifo-map/CONTROL @@ -0,0 +1,4 @@ +Source: nlohmann-fifo-map +Version: 2018.05.07-1 +Homepage: https://github.com/nlohmann/fifo_map +Description: a FIFO-ordered associative container for C++ diff --git a/vcpkg/ports/nlohmann-fifo-map/portfile.cmake b/vcpkg/ports/nlohmann-fifo-map/portfile.cmake new file mode 100644 index 0000000..3079e96 --- /dev/null +++ b/vcpkg/ports/nlohmann-fifo-map/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nlohmann/fifo_map + REF 0dfbf5dacbb15a32c43f912a7e66a54aae39d0f9 + SHA512 1e515d02ff49684dc8439ee1f3b9fbece3c727b6f669ee9a251eae8d8bf33eff0a36ab58829956a698cd9bfb757f9c6ade227d601197aa7b824c0584f48e181d + HEAD_REF master +) + +#make sure we don't use any integrated pre-built library nor any unnecessary CMake module +file(REMOVE_RECURSE ${SOURCE_PATH}/test) +file(REMOVE ${SOURCE_PATH}/CMakeLists.txt) + +file(COPY ${CURRENT_PORT_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/nlohmann-json/CONTROL b/vcpkg/ports/nlohmann-json/CONTROL new file mode 100644 index 0000000..f474ce9 --- /dev/null +++ b/vcpkg/ports/nlohmann-json/CONTROL @@ -0,0 +1,4 @@ +Source: nlohmann-json +Version: 3.9.1 +Homepage: https://github.com/nlohmann/json +Description: JSON for Modern C++ diff --git a/vcpkg/ports/nlohmann-json/portfile.cmake b/vcpkg/ports/nlohmann-json/portfile.cmake new file mode 100644 index 0000000..448ca04 --- /dev/null +++ b/vcpkg/ports/nlohmann-json/portfile.cmake @@ -0,0 +1,68 @@ +set(SOURCE_VERSION 3.9.1) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${PORT}-v${SOURCE_VERSION}) + +file(MAKE_DIRECTORY ${SOURCE_PATH}) + +function(download_src SUBPATH SHA512) + vcpkg_download_distfile(FILE + URLS "https://github.com/nlohmann/json/raw/v${SOURCE_VERSION}/${SUBPATH}" + FILENAME "${PORT}-v${SOURCE_VERSION}/${SUBPATH}" + SHA512 ${SHA512} + ) + get_filename_component(SUBPATH_DIR "${SOURCE_PATH}/${SUBPATH}" DIRECTORY) + file(COPY ${FILE} DESTINATION ${SUBPATH_DIR}) +endfunction() + +download_src(CMakeLists.txt d0ea797de0e3f98778cfcfa1249e9a363f0ae14f057f8f4338a2026d59eb929ddee9e45889c7f25d2c48633baa89ae9b4db4e5d99205f5ce7e1238fd82f3c113) +download_src(LICENSE.MIT d5f7bb6a33469e19250a5e20db44e7ba09602ee85bc0afb03e4932402b08ca1c0dbbe6376b7e0a84eb11c782d70ae96f130755967204d35420c6ecbcafd301e5) +download_src(nlohmann_json.natvis 9bce6758db0e54777394a4e718e60a281952b15f0c6dc6a6ad4a6d023c958b5515b2d39b7d4c66c03f0d3fdfdc1d6c23afb8b8419f1345c9d44d7b9a9ee2582b) +download_src(cmake/config.cmake.in 7caab6166baa891f77f5b632ac4a920e548610ec41777b885ec51fe68d3665ffe91984dd2881caf22298b5392dfbd84b526fda252467bb66de9eb90e6e6ade5a) +download_src(cmake/pkg-config.pc.in 34afe9f9ef9c77c9053f81bdc5605523ba5c20ca1bc2e0cb26afe1754362b25e88d809df47cdd63024c60f346240010a6aa343ff46d6a959a38612b3f1955664) +download_src(cmake/nlohmann_jsonConfigVersion.cmake.in 3b3ca2cfe740ba9646e5976b1112ba37c229bf527959bfb47a5e6c2fcd5ba6b5626d3c2455c181fe41a72ec78500738e2950e4fe76a2e91ba2073ba01f5595a8) + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/nlohmann/json/releases/download/v${SOURCE_VERSION}/include.zip" + FILENAME ${PORT}-v${SOURCE_VERSION}-include.zip + SHA512 24984da33c5bf80eb276712d4bdc698c2724e72dc0f4c70e87527fb6b16e21f535f5a022d52c7ed2f59dcfe4a4e5b61a56101b61def09b31c827689f6c7ec673 +) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH OUT_PATH + ARCHIVE ${ARCHIVE} + REF ${SOURCE_VERSION} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR} + NO_REMOVE_ONE_LEVEL +) +file(COPY "${OUT_PATH}/include" DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DJSON_BuildTests=0 + -DJSON_MultipleHeaders=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/nlohmann_json TARGET_PATH share/nlohmann_json) + +vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/share/nlohmann_json/nlohmann_jsonTargets.cmake + "{_IMPORT_PREFIX}/nlohmann_json.natvis" + "{_IMPORT_PREFIX}/share/nlohmann_json/nlohmann_json.natvis" +) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/lib +) + +if(EXISTS ${CURRENT_PACKAGES_DIR}/nlohmann_json.natvis) + file(RENAME + ${CURRENT_PACKAGES_DIR}/nlohmann_json.natvis + ${CURRENT_PACKAGES_DIR}/share/nlohmann_json/nlohmann_json.natvis + ) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/nlopt/0001-suppress-MS-compiler-complaint-about-negating-unsign.patch b/vcpkg/ports/nlopt/0001-suppress-MS-compiler-complaint-about-negating-unsign.patch new file mode 100644 index 0000000..cd5fed4 --- /dev/null +++ b/vcpkg/ports/nlopt/0001-suppress-MS-compiler-complaint-about-negating-unsign.patch @@ -0,0 +1,31 @@ +From 004f415c5d04dd1f616a953eb8ad078a20b72c58 Mon Sep 17 00:00:00 2001 +From: "Steven G. Johnson" +Date: Sat, 9 May 2020 13:56:40 -0400 +Subject: [PATCH] suppress MS compiler complaint about negating unsigned + (closes #330) + +--- + src/util/sobolseq.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/src/util/sobolseq.c b/src/util/sobolseq.c +index 6626f51..848ff68 100644 +--- a/src/util/sobolseq.c ++++ b/src/util/sobolseq.c +@@ -93,7 +93,12 @@ static unsigned rightzero32(uint32_t n) + const uint32_t a = 0x05f66a47; /* magic number, found by brute force */ + static const unsigned decode[32] = { 0, 1, 2, 26, 23, 3, 15, 27, 24, 21, 19, 4, 12, 16, 28, 6, 31, 25, 22, 14, 20, 18, 11, 5, 30, 13, 17, 10, 29, 9, 8, 7 }; + n = ~n; /* change to rightmost-one problem */ +- n = a * (n & (-n)); /* store in n to make sure mult. is 32 bits */ ++#ifdef _MSC_VER ++#pragma warning(suppress:4146) ++ n = a * (n & (-n)); /* same as below, but suppress spurious warning/error with MS compiler about negating unsigned int */ ++#else ++ n = a * (n & (-n)); /* store in n to make sure mult. is 32 bits */ ++#endif + return decode[n >> 27]; + #endif + } +-- +2.26.2.windows.1 + diff --git a/vcpkg/ports/nlopt/CONTROL b/vcpkg/ports/nlopt/CONTROL new file mode 100644 index 0000000..8d13449 --- /dev/null +++ b/vcpkg/ports/nlopt/CONTROL @@ -0,0 +1,4 @@ +Source: nlopt +Version: 2.6.2-1 +Homepage: https://github.com/stevengj/nlopt +Description: a library for nonlinear local and global optimization, for functions with and without gradient information. diff --git a/vcpkg/ports/nlopt/portfile.cmake b/vcpkg/ports/nlopt/portfile.cmake new file mode 100644 index 0000000..157a3cc --- /dev/null +++ b/vcpkg/ports/nlopt/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO stevengj/nlopt + REF v2.6.2 + SHA512 61e5c01140a57c0ad2a0acd82ad50dce1b5679dc281e55cbbc332e876b19a689013100617545a42b721d8c487df37d6ccd67859171243433fe29468f259b556b + HEAD_REF master + PATCHES + 0001-suppress-MS-compiler-complaint-about-negating-unsign.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DNLOPT_FORTRAN=OFF + -DNLOPT_PYTHON=OFF + -DNLOPT_OCTAVE=OFF + -DNLOPT_MATLAB=OFF + -DNLOPT_GUILE=OFF + -DNLOPT_SWIG=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/nlopt) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/nmap/CONTROL b/vcpkg/ports/nmap/CONTROL new file mode 100644 index 0000000..a703b49 --- /dev/null +++ b/vcpkg/ports/nmap/CONTROL @@ -0,0 +1,4 @@ +Source: nmap +Version: 7.70-4 +Build-Depends: winpcap (windows), libpcap (!windows), lua, openssl, python2 (windows), libssh2, zlib, pcre +Description: A library for scanning network ports. diff --git a/vcpkg/ports/nmap/fix-msvc-prj.patch b/vcpkg/ports/nmap/fix-msvc-prj.patch new file mode 100644 index 0000000..25893f1 --- /dev/null +++ b/vcpkg/ports/nmap/fix-msvc-prj.patch @@ -0,0 +1,1986 @@ +diff --git a/libdnet-stripped/libdnet-stripped.vcxproj b/libdnet-stripped/libdnet-stripped.vcxproj +index 1f2b760..1756c5c 100644 +--- a/libdnet-stripped/libdnet-stripped.vcxproj ++++ b/libdnet-stripped/libdnet-stripped.vcxproj +@@ -5,10 +5,18 @@ + Debug + Win32 + ++ ++ Debug ++ x64 ++ + + Release + Win32 + ++ ++ Release ++ x64 ++ + + + libdnet-stripped +@@ -22,11 +30,21 @@ + MultiByte + v120 + ++ ++ StaticLibrary ++ MultiByte ++ v120 ++ + + StaticLibrary + MultiByte + v120 + ++ ++ StaticLibrary ++ MultiByte ++ v120 ++ + + + +@@ -34,10 +52,18 @@ + + + ++ ++ ++ ++ + + + + ++ ++ ++ ++ + + + <_ProjectFileVersion>10.0.30319.1 +@@ -64,6 +90,23 @@ + $(OutDir)libdnet-stripped.lib + + ++ ++ ++ /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) ++ Disabled ++ include;..\mswin32\pcap-include;%(AdditionalIncludeDirectories) ++ WIN32;_LIB;BPF_MAJOR_VERSION;%(PreprocessorDefinitions) ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ ++ ++ Level3 ++ ProgramDatabase ++ ++ ++ $(OutDir)libdnet-stripped.lib ++ ++ + + + /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) +@@ -78,6 +121,20 @@ + $(OutDir)libdnet-stripped.lib + + ++ ++ ++ /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) ++ include;..\mswin32\pcap-include;%(AdditionalIncludeDirectories) ++ WIN32;_LIB;BPF_MAJOR_VERSION;%(PreprocessorDefinitions) ++ ++ ++ Level3 ++ ProgramDatabase ++ ++ ++ $(OutDir)libdnet-stripped.lib ++ ++ + + + +diff --git a/liblinear/liblinear.vcxproj b/liblinear/liblinear.vcxproj +index cf99e3d..ac5ff7c 100644 +--- a/liblinear/liblinear.vcxproj ++++ b/liblinear/liblinear.vcxproj +@@ -5,10 +5,18 @@ + Debug + Win32 + ++ ++ Debug ++ x64 ++ + + Release + Win32 + ++ ++ Release ++ x64 ++ + + + +@@ -36,6 +44,12 @@ + Unicode + v120 + ++ ++ StaticLibrary ++ true ++ Unicode ++ v120 ++ + + StaticLibrary + false +@@ -43,19 +57,33 @@ + Unicode + v120 + ++ ++ StaticLibrary ++ false ++ true ++ Unicode ++ v120 ++ + + + + + + ++ ++ ++ + + + ++ ++ ++ + + + .\ + ++ + + .\ + +@@ -75,6 +103,21 @@ + true + + ++ ++ ++ ++ ++ Level3 ++ Disabled ++ WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) ++ MultiThreadedDebugDLL ++ /D_CRT_SECURE_NO_WARNINGS=1 %(AdditionalOptions) ++ ++ ++ Windows ++ true ++ ++ + + + Level3 +@@ -93,6 +136,24 @@ + true + + ++ ++ ++ Level3 ++ ++ ++ MaxSpeed ++ true ++ true ++ WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) ++ /D_CRT_SECURE_NO_WARNINGS=1 %(AdditionalOptions) ++ ++ ++ Windows ++ true ++ true ++ true ++ ++ + + + +diff --git a/liblua/liblua.vcxproj b/liblua/liblua.vcxproj +index 8e80221..db6b1ea 100644 +--- a/liblua/liblua.vcxproj ++++ b/liblua/liblua.vcxproj +@@ -5,10 +5,18 @@ + Debug + Win32 + ++ ++ Debug ++ x64 ++ + + Release + Win32 + ++ ++ Release ++ x64 ++ + + + {31FB0767-A71F-4575-8379-002D72B8AF86} +@@ -22,20 +30,37 @@ + true + v120 + ++ ++ StaticLibrary ++ NotSet ++ true ++ v120 ++ + + StaticLibrary + NotSet + v120 + ++ ++ StaticLibrary ++ NotSet ++ v120 ++ + + + + + + ++ ++ ++ + + + ++ ++ ++ + + + <_ProjectFileVersion>10.0.30319.1 +@@ -68,6 +93,29 @@ + $(OutDir)liblua.lib + + ++ ++ ++ /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) ++ Disabled ++ WIN32;_LIB;%(PreprocessorDefinitions) ++ ++ ++ Default ++ MultiThreadedDebugDLL ++ false ++ false ++ false ++ ++ ++ Level3 ++ ProgramDatabase ++ Cdecl ++ CompileAsC ++ ++ ++ $(OutDir)liblua.lib ++ ++ + + + /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) +@@ -91,6 +139,29 @@ + $(OutDir)liblua.lib + + ++ ++ ++ /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) ++ false ++ WIN32;_LIB;%(PreprocessorDefinitions) ++ false ++ ++ ++ Default ++ false ++ false ++ false ++ ++ ++ Level3 ++ ++ ++ CompileAsC ++ ++ ++ $(OutDir)liblua.lib ++ ++ + + + +diff --git a/libnetutil/libnetutil.vcxproj b/libnetutil/libnetutil.vcxproj +index 8f4fbb5..00cc7c2 100644 +--- a/libnetutil/libnetutil.vcxproj ++++ b/libnetutil/libnetutil.vcxproj +@@ -5,10 +5,18 @@ + Debug + Win32 + ++ ++ Debug ++ x64 ++ + + Release + Win32 + ++ ++ Release ++ x64 ++ + + + {99157C3F-39F6-4663-99D7-1D9C1484494E} +@@ -22,20 +30,37 @@ + true + v120 + ++ ++ StaticLibrary ++ Unicode ++ true ++ v120 ++ + + StaticLibrary + Unicode + v120 + ++ ++ StaticLibrary ++ Unicode ++ v120 ++ + + + + + + ++ ++ ++ + + + ++ ++ ++ + + + <_ProjectFileVersion>10.0.30319.1 +@@ -61,6 +86,22 @@ + $(OutDir)libnetutil.lib + + ++ ++ ++ Disabled ++ ..;../mswin32;../nbase;../mswin32/pcap-include;../libdnet-stripped/include;%(AdditionalIncludeDirectories) ++ WIN32;BPF_MAJOR_VERSION;_DEBUG;_LIB;%(PreprocessorDefinitions) ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ ++ ++ Level3 ++ ProgramDatabase ++ ++ ++ $(OutDir)libnetutil.lib ++ ++ + + + MaxSpeed +@@ -74,6 +115,19 @@ + ProgramDatabase + + ++ ++ ++ MaxSpeed ++ true ++ ..;../mswin32;../nbase;../mswin32/pcap-include;../libdnet-stripped/include;%(AdditionalIncludeDirectories) ++ WIN32;BPF_MAJOR_VERSION;NDEBUG;_LIB;%(PreprocessorDefinitions) ++ true ++ ++ ++ Level3 ++ ProgramDatabase ++ ++ + + + +diff --git a/mswin32/nmap.sln b/mswin32/nmap.sln +index 3f9fa22..4484bbd 100644 +--- a/mswin32/nmap.sln ++++ b/mswin32/nmap.sln +@@ -5,14 +5,11 @@ MinimumVisualStudioVersion = 10.0.40219.1 + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nmap", "nmap.vcxproj", "{361719F0-AB42-4C93-9DE8-7D2144B96625}" + ProjectSection(ProjectDependencies) = postProject + {99157C3F-39F6-4663-99D7-1D9C1484494E} = {99157C3F-39F6-4663-99D7-1D9C1484494E} +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} = {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} + {A7BE3D76-F20C-40C5-8986-DE4028B3B57D} = {A7BE3D76-F20C-40C5-8986-DE4028B3B57D} + EndProjectSection + EndProject + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nsock", "..\nsock\nsock.vcxproj", "{F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}" + EndProject +-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpcre", "..\libpcre\libpcre.vcxproj", "{5DE86C7A-DE72-4265-8807-4CA38F94F22A}" +-EndProject + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nbase", "..\nbase\nbase.vcxproj", "{B630C8F7-3138-43E8-89ED-78742FA2AC5F}" + EndProject + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libdnet-stripped", "..\libdnet-stripped\libdnet-stripped.vcxproj", "{5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}" +@@ -27,14 +24,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnetutil", "..\libnetutil + EndProject + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblinear", "..\liblinear\liblinear.vcxproj", "{A7BE3D76-F20C-40C5-8986-DE4028B3B57D}" + EndProject +-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nmap-update", "..\nmap-update\nmap-update.vcxproj", "{BBF27339-C7B6-4F52-B742-897796C1F13B}" +-EndProject +-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libz", "..\libz\contrib\vstudio\vc11\zlibvc.vcxproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}" +-EndProject +-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libssh2", "..\libssh2\win32\libssh2.vcxproj", "{ED957342-E43B-496E-92D9-4C76B525BDF5}" +-EndProject +-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "..\libz\contrib\vstudio\vc11\zlibstat.vcxproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}" +-EndProject + Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 +@@ -49,176 +38,148 @@ Global + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {361719F0-AB42-4C93-9DE8-7D2144B96625}.Debug|Win32.ActiveCfg = Debug|Win32 + {361719F0-AB42-4C93-9DE8-7D2144B96625}.Debug|Win32.Build.0 = Debug|Win32 +- {361719F0-AB42-4C93-9DE8-7D2144B96625}.Debug|x64.ActiveCfg = Debug|Win32 ++ {361719F0-AB42-4C93-9DE8-7D2144B96625}.Debug|x64.ActiveCfg = Debug|x64 ++ {361719F0-AB42-4C93-9DE8-7D2144B96625}.Debug|x64.Build.0 = Debug|x64 + {361719F0-AB42-4C93-9DE8-7D2144B96625}.Ncat Static|Win32.ActiveCfg = Release|Win32 +- {361719F0-AB42-4C93-9DE8-7D2144B96625}.Ncat Static|x64.ActiveCfg = Release|Win32 ++ {361719F0-AB42-4C93-9DE8-7D2144B96625}.Ncat Static|x64.ActiveCfg = Release|x64 ++ {361719F0-AB42-4C93-9DE8-7D2144B96625}.Ncat Static|x64.Build.0 = Release|x64 + {361719F0-AB42-4C93-9DE8-7D2144B96625}.Release|Win32.ActiveCfg = Release|Win32 + {361719F0-AB42-4C93-9DE8-7D2144B96625}.Release|Win32.Build.0 = Release|Win32 +- {361719F0-AB42-4C93-9DE8-7D2144B96625}.Release|x64.ActiveCfg = Release|Win32 ++ {361719F0-AB42-4C93-9DE8-7D2144B96625}.Release|x64.ActiveCfg = Release|x64 ++ {361719F0-AB42-4C93-9DE8-7D2144B96625}.Release|x64.Build.0 = Release|x64 + {361719F0-AB42-4C93-9DE8-7D2144B96625}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {361719F0-AB42-4C93-9DE8-7D2144B96625}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 +- {361719F0-AB42-4C93-9DE8-7D2144B96625}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 ++ {361719F0-AB42-4C93-9DE8-7D2144B96625}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 ++ {361719F0-AB42-4C93-9DE8-7D2144B96625}.ReleaseWithoutAsm|x64.Build.0 = Release|x64 + {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Debug|Win32.ActiveCfg = Debug|Win32 + {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Debug|Win32.Build.0 = Debug|Win32 +- {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Debug|x64.ActiveCfg = Debug|Win32 ++ {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Debug|x64.ActiveCfg = Debug|x64 ++ {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Debug|x64.Build.0 = Debug|x64 + {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Ncat Static|Win32.ActiveCfg = Static|Win32 + {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Ncat Static|Win32.Build.0 = Static|Win32 +- {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Ncat Static|x64.ActiveCfg = Static|Win32 ++ {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Ncat Static|x64.ActiveCfg = Static|x64 ++ {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Ncat Static|x64.Build.0 = Static|x64 + {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Release|Win32.ActiveCfg = Release|Win32 + {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Release|Win32.Build.0 = Release|Win32 +- {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Release|x64.ActiveCfg = Release|Win32 ++ {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Release|x64.ActiveCfg = Release|x64 ++ {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.Release|x64.Build.0 = Release|x64 + {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseNoPcap|Win32 + {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseNoPcap|Win32 +- {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseNoPcap|Win32 +- {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.Debug|Win32.ActiveCfg = Debug|Win32 +- {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.Debug|Win32.Build.0 = Debug|Win32 +- {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.Debug|x64.ActiveCfg = Debug|Win32 +- {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.Ncat Static|Win32.ActiveCfg = Release|Win32 +- {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.Ncat Static|x64.ActiveCfg = Release|Win32 +- {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.Release|Win32.ActiveCfg = Release|Win32 +- {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.Release|Win32.Build.0 = Release|Win32 +- {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.Release|x64.ActiveCfg = Release|Win32 +- {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 +- {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 +- {5DE86C7A-DE72-4265-8807-4CA38F94F22A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 ++ {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseNoPcap|x64 ++ {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4}.ReleaseWithoutAsm|x64.Build.0 = ReleaseNoPcap|x64 + {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Debug|Win32.ActiveCfg = Debug|Win32 + {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Debug|Win32.Build.0 = Debug|Win32 +- {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Debug|x64.ActiveCfg = Debug|Win32 ++ {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Debug|x64.ActiveCfg = Debug|x64 ++ {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Debug|x64.Build.0 = Debug|x64 + {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Ncat Static|Win32.ActiveCfg = Static|Win32 + {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Ncat Static|Win32.Build.0 = Static|Win32 +- {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Ncat Static|x64.ActiveCfg = Static|Win32 ++ {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Ncat Static|x64.ActiveCfg = Static|x64 ++ {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Ncat Static|x64.Build.0 = Static|x64 + {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Release|Win32.ActiveCfg = Release|Win32 + {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Release|Win32.Build.0 = Release|Win32 +- {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Release|x64.ActiveCfg = Release|Win32 ++ {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Release|x64.ActiveCfg = Release|x64 ++ {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.Release|x64.Build.0 = Release|x64 + {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 +- {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 ++ {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 ++ {B630C8F7-3138-43E8-89ED-78742FA2AC5F}.ReleaseWithoutAsm|x64.Build.0 = Release|x64 + {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Debug|Win32.ActiveCfg = Debug|Win32 + {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Debug|Win32.Build.0 = Debug|Win32 +- {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Debug|x64.ActiveCfg = Debug|Win32 ++ {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Debug|x64.ActiveCfg = Debug|x64 ++ {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Debug|x64.Build.0 = Debug|x64 + {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Ncat Static|Win32.ActiveCfg = Release|Win32 +- {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Ncat Static|x64.ActiveCfg = Release|Win32 ++ {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Ncat Static|x64.ActiveCfg = Release|x64 ++ {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Ncat Static|x64.Build.0 = Release|x64 + {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Release|Win32.ActiveCfg = Release|Win32 + {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Release|Win32.Build.0 = Release|Win32 +- {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Release|x64.ActiveCfg = Release|Win32 ++ {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Release|x64.ActiveCfg = Release|x64 ++ {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.Release|x64.Build.0 = Release|x64 + {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 +- {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 ++ {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 ++ {5328E0BE-BC0A-4C2A-8CB9-CE00B61B9C4C}.ReleaseWithoutAsm|x64.Build.0 = Release|x64 + {31FB0767-A71F-4575-8379-002D72B8AF86}.Debug|Win32.ActiveCfg = Debug|Win32 + {31FB0767-A71F-4575-8379-002D72B8AF86}.Debug|Win32.Build.0 = Debug|Win32 +- {31FB0767-A71F-4575-8379-002D72B8AF86}.Debug|x64.ActiveCfg = Debug|Win32 ++ {31FB0767-A71F-4575-8379-002D72B8AF86}.Debug|x64.ActiveCfg = Debug|x64 ++ {31FB0767-A71F-4575-8379-002D72B8AF86}.Debug|x64.Build.0 = Debug|x64 + {31FB0767-A71F-4575-8379-002D72B8AF86}.Ncat Static|Win32.ActiveCfg = Release|Win32 +- {31FB0767-A71F-4575-8379-002D72B8AF86}.Ncat Static|x64.ActiveCfg = Release|Win32 ++ {31FB0767-A71F-4575-8379-002D72B8AF86}.Ncat Static|x64.ActiveCfg = Release|x64 ++ {31FB0767-A71F-4575-8379-002D72B8AF86}.Ncat Static|x64.Build.0 = Release|x64 + {31FB0767-A71F-4575-8379-002D72B8AF86}.Release|Win32.ActiveCfg = Release|Win32 + {31FB0767-A71F-4575-8379-002D72B8AF86}.Release|Win32.Build.0 = Release|Win32 +- {31FB0767-A71F-4575-8379-002D72B8AF86}.Release|x64.ActiveCfg = Release|Win32 ++ {31FB0767-A71F-4575-8379-002D72B8AF86}.Release|x64.ActiveCfg = Release|x64 ++ {31FB0767-A71F-4575-8379-002D72B8AF86}.Release|x64.Build.0 = Release|x64 + {31FB0767-A71F-4575-8379-002D72B8AF86}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {31FB0767-A71F-4575-8379-002D72B8AF86}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 +- {31FB0767-A71F-4575-8379-002D72B8AF86}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 ++ {31FB0767-A71F-4575-8379-002D72B8AF86}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 ++ {31FB0767-A71F-4575-8379-002D72B8AF86}.ReleaseWithoutAsm|x64.Build.0 = Release|x64 + {C1E04411-E021-468B-83F1-CB624BBA7589}.Debug|Win32.ActiveCfg = Debug|Win32 + {C1E04411-E021-468B-83F1-CB624BBA7589}.Debug|Win32.Build.0 = Debug|Win32 +- {C1E04411-E021-468B-83F1-CB624BBA7589}.Debug|x64.ActiveCfg = Debug|Win32 ++ {C1E04411-E021-468B-83F1-CB624BBA7589}.Debug|x64.ActiveCfg = Debug|x64 ++ {C1E04411-E021-468B-83F1-CB624BBA7589}.Debug|x64.Build.0 = Debug|x64 + {C1E04411-E021-468B-83F1-CB624BBA7589}.Ncat Static|Win32.ActiveCfg = Static|Win32 + {C1E04411-E021-468B-83F1-CB624BBA7589}.Ncat Static|Win32.Build.0 = Static|Win32 +- {C1E04411-E021-468B-83F1-CB624BBA7589}.Ncat Static|x64.ActiveCfg = Static|Win32 ++ {C1E04411-E021-468B-83F1-CB624BBA7589}.Ncat Static|x64.ActiveCfg = Static|x64 ++ {C1E04411-E021-468B-83F1-CB624BBA7589}.Ncat Static|x64.Build.0 = Static|x64 + {C1E04411-E021-468B-83F1-CB624BBA7589}.Release|Win32.ActiveCfg = Release|Win32 + {C1E04411-E021-468B-83F1-CB624BBA7589}.Release|Win32.Build.0 = Release|Win32 +- {C1E04411-E021-468B-83F1-CB624BBA7589}.Release|x64.ActiveCfg = Release|Win32 ++ {C1E04411-E021-468B-83F1-CB624BBA7589}.Release|x64.ActiveCfg = Release|x64 ++ {C1E04411-E021-468B-83F1-CB624BBA7589}.Release|x64.Build.0 = Release|x64 + {C1E04411-E021-468B-83F1-CB624BBA7589}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {C1E04411-E021-468B-83F1-CB624BBA7589}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 +- {C1E04411-E021-468B-83F1-CB624BBA7589}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 ++ {C1E04411-E021-468B-83F1-CB624BBA7589}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 ++ {C1E04411-E021-468B-83F1-CB624BBA7589}.ReleaseWithoutAsm|x64.Build.0 = Release|x64 + {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Debug|Win32.ActiveCfg = Debug|Win32 + {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Debug|Win32.Build.0 = Debug|Win32 +- {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Debug|x64.ActiveCfg = Debug|Win32 ++ {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Debug|x64.ActiveCfg = Debug|x64 ++ {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Debug|x64.Build.0 = Debug|x64 + {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Ncat Static|Win32.ActiveCfg = Release|Win32 +- {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Ncat Static|x64.ActiveCfg = Release|Win32 ++ {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Ncat Static|x64.ActiveCfg = Release|x64 ++ {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Ncat Static|x64.Build.0 = Release|x64 + {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Release|Win32.ActiveCfg = Release|Win32 + {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Release|Win32.Build.0 = Release|Win32 +- {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Release|x64.ActiveCfg = Release|Win32 ++ {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Release|x64.ActiveCfg = Release|x64 ++ {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.Release|x64.Build.0 = Release|x64 + {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 +- {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 ++ {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 ++ {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36}.ReleaseWithoutAsm|x64.Build.0 = Release|x64 + {99157C3F-39F6-4663-99D7-1D9C1484494E}.Debug|Win32.ActiveCfg = Debug|Win32 + {99157C3F-39F6-4663-99D7-1D9C1484494E}.Debug|Win32.Build.0 = Debug|Win32 +- {99157C3F-39F6-4663-99D7-1D9C1484494E}.Debug|x64.ActiveCfg = Debug|Win32 ++ {99157C3F-39F6-4663-99D7-1D9C1484494E}.Debug|x64.ActiveCfg = Debug|x64 ++ {99157C3F-39F6-4663-99D7-1D9C1484494E}.Debug|x64.Build.0 = Debug|x64 + {99157C3F-39F6-4663-99D7-1D9C1484494E}.Ncat Static|Win32.ActiveCfg = Release|Win32 +- {99157C3F-39F6-4663-99D7-1D9C1484494E}.Ncat Static|x64.ActiveCfg = Release|Win32 ++ {99157C3F-39F6-4663-99D7-1D9C1484494E}.Ncat Static|x64.ActiveCfg = Release|x64 ++ {99157C3F-39F6-4663-99D7-1D9C1484494E}.Ncat Static|x64.Build.0 = Release|x64 + {99157C3F-39F6-4663-99D7-1D9C1484494E}.Release|Win32.ActiveCfg = Release|Win32 + {99157C3F-39F6-4663-99D7-1D9C1484494E}.Release|Win32.Build.0 = Release|Win32 +- {99157C3F-39F6-4663-99D7-1D9C1484494E}.Release|x64.ActiveCfg = Release|Win32 ++ {99157C3F-39F6-4663-99D7-1D9C1484494E}.Release|x64.ActiveCfg = Release|x64 ++ {99157C3F-39F6-4663-99D7-1D9C1484494E}.Release|x64.Build.0 = Release|x64 + {99157C3F-39F6-4663-99D7-1D9C1484494E}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {99157C3F-39F6-4663-99D7-1D9C1484494E}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 +- {99157C3F-39F6-4663-99D7-1D9C1484494E}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 ++ {99157C3F-39F6-4663-99D7-1D9C1484494E}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 ++ {99157C3F-39F6-4663-99D7-1D9C1484494E}.ReleaseWithoutAsm|x64.Build.0 = Release|x64 + {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Debug|Win32.ActiveCfg = Debug|Win32 + {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Debug|Win32.Build.0 = Debug|Win32 +- {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Debug|x64.ActiveCfg = Debug|Win32 ++ {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Debug|x64.ActiveCfg = Debug|x64 ++ {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Debug|x64.Build.0 = Debug|x64 + {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Ncat Static|Win32.ActiveCfg = Release|Win32 + {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Ncat Static|Win32.Build.0 = Release|Win32 +- {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Ncat Static|x64.ActiveCfg = Release|Win32 ++ {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Ncat Static|x64.ActiveCfg = Release|x64 ++ {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Ncat Static|x64.Build.0 = Release|x64 + {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Release|Win32.ActiveCfg = Release|Win32 + {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Release|Win32.Build.0 = Release|Win32 +- {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Release|x64.ActiveCfg = Release|Win32 ++ {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Release|x64.ActiveCfg = Release|x64 ++ {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.Release|x64.Build.0 = Release|x64 + {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 +- {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 +- {BBF27339-C7B6-4F52-B742-897796C1F13B}.Debug|Win32.ActiveCfg = Debug|Win32 +- {BBF27339-C7B6-4F52-B742-897796C1F13B}.Debug|Win32.Build.0 = Debug|Win32 +- {BBF27339-C7B6-4F52-B742-897796C1F13B}.Debug|x64.ActiveCfg = Debug|Win32 +- {BBF27339-C7B6-4F52-B742-897796C1F13B}.Ncat Static|Win32.ActiveCfg = Release|Win32 +- {BBF27339-C7B6-4F52-B742-897796C1F13B}.Ncat Static|Win32.Build.0 = Release|Win32 +- {BBF27339-C7B6-4F52-B742-897796C1F13B}.Ncat Static|x64.ActiveCfg = Release|Win32 +- {BBF27339-C7B6-4F52-B742-897796C1F13B}.Release|Win32.ActiveCfg = Release|Win32 +- {BBF27339-C7B6-4F52-B742-897796C1F13B}.Release|Win32.Build.0 = Release|Win32 +- {BBF27339-C7B6-4F52-B742-897796C1F13B}.Release|x64.ActiveCfg = Release|Win32 +- {BBF27339-C7B6-4F52-B742-897796C1F13B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 +- {BBF27339-C7B6-4F52-B742-897796C1F13B}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 +- {BBF27339-C7B6-4F52-B742-897796C1F13B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Ncat Static|Win32.ActiveCfg = Release|Win32 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Ncat Static|Win32.Build.0 = Release|Win32 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Ncat Static|x64.ActiveCfg = Release|x64 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Ncat Static|x64.Build.0 = Release|x64 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = Release|x64 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = Release|x64 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 +- {8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 +- {ED957342-E43B-496E-92D9-4C76B525BDF5}.Debug|Win32.ActiveCfg = Debug|Win32 +- {ED957342-E43B-496E-92D9-4C76B525BDF5}.Debug|Win32.Build.0 = Debug|Win32 +- {ED957342-E43B-496E-92D9-4C76B525BDF5}.Debug|x64.ActiveCfg = Debug|Win32 +- {ED957342-E43B-496E-92D9-4C76B525BDF5}.Ncat Static|Win32.ActiveCfg = Debug|Win32 +- {ED957342-E43B-496E-92D9-4C76B525BDF5}.Ncat Static|Win32.Build.0 = Debug|Win32 +- {ED957342-E43B-496E-92D9-4C76B525BDF5}.Ncat Static|x64.ActiveCfg = Release|Win32 +- {ED957342-E43B-496E-92D9-4C76B525BDF5}.Release|Win32.ActiveCfg = Release|Win32 +- {ED957342-E43B-496E-92D9-4C76B525BDF5}.Release|Win32.Build.0 = Release|Win32 +- {ED957342-E43B-496E-92D9-4C76B525BDF5}.Release|x64.ActiveCfg = Release|Win32 +- {ED957342-E43B-496E-92D9-4C76B525BDF5}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 +- {ED957342-E43B-496E-92D9-4C76B525BDF5}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 +- {ED957342-E43B-496E-92D9-4C76B525BDF5}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Ncat Static|Win32.ActiveCfg = Release|Win32 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Ncat Static|Win32.Build.0 = Release|Win32 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Ncat Static|x64.ActiveCfg = Release|x64 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Ncat Static|x64.Build.0 = Release|x64 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 +- {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 ++ {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.ReleaseWithoutAsm|x64.ActiveCfg = Release|x64 ++ {A7BE3D76-F20C-40C5-8986-DE4028B3B57D}.ReleaseWithoutAsm|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection ++ GlobalSection(ExtensibilityGlobals) = postSolution ++ SolutionGuid = {DAA6BF7B-6F78-4BE7-A3FC-3B1BD73676C3} ++ EndGlobalSection + EndGlobal +diff --git a/mswin32/nmap.vcxproj b/mswin32/nmap.vcxproj +index a3abbc6..d5e1977 100644 +--- a/mswin32/nmap.vcxproj ++++ b/mswin32/nmap.vcxproj +@@ -5,10 +5,18 @@ + Debug + Win32 + ++ ++ Debug ++ x64 ++ + + Release + Win32 + ++ ++ Release ++ x64 ++ + + + {361719F0-AB42-4C93-9DE8-7D2144B96625} +@@ -21,12 +29,24 @@ + MultiByte + v120 + ++ ++ Application ++ false ++ MultiByte ++ v120 ++ + + Application + false + MultiByte + v120 + ++ ++ Application ++ false ++ MultiByte ++ v120 ++ + + + +@@ -34,10 +54,18 @@ + + + ++ ++ ++ ++ + + + + ++ ++ ++ ++ + + + <_ProjectFileVersion>10.0.30319.1 +@@ -76,7 +104,7 @@ + false + + +- liblua.lib;nsock.lib;libpcre.lib;nbase.lib;libdnet-stripped.lib;libssh2.lib;zlibstat.lib;liblinear.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libeay32.lib;ssleay32.lib;shell32.lib;libnetutil.lib ++ liblua.lib;nsock.lib;pcred.lib;nbase.lib;libdnet-stripped.lib;libssh2.lib;zlibd.lib;liblinear.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libssl.lib;libcrypto.lib;shell32.lib;libnetutil.lib + .\Debug\nmap.exe + true + ..\libssh2\win32\Release_dll;lib;..\liblua;..\libpcre;..\nsock;..\nbase;..\libdnet-stripped;../libnetutil;..\..\nmap-mswin32-aux\OpenSSL\lib;..\liblinear;..\libz\contrib\vstudio\vc11\x86\ZlibStatRelease;%(AdditionalLibraryDirectories) +@@ -91,8 +119,57 @@ + MachineX86 + + +- xcopy "$(SolutionDir)..\scripts" ".\$(Configuration)\scripts\" /e /y && xcopy "$(SolutionDir)..\nselib\*.lua" "$(SolutionDir)\$(Configuration)\nselib\" /y && xcopy /s /e "$(SolutionDir)..\nselib\data\*.*" "$(SolutionDir)\$(Configuration)\nselib\data\" /y && xcopy "$(SolutionDir)\..\..\nmap-mswin32-aux\OpenSSL\bin\*.dll" "$(SolutionDir)\$(Configuration)\" /y && xcopy "$(SolutionDir)..\nse_main.lua" "$(SolutionDir)\$(Configuration)\" /y +-xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(ProjectDir)$(OutDir)" ++ xcopy "$(SolutionDir)..\scripts" ".\$(Configuration)\scripts\" /e /y && xcopy "$(SolutionDir)..\nselib\*.lua" "$(SolutionDir)\$(Configuration)\nselib\" /y && xcopy /s /e "$(SolutionDir)..\nselib\data\*.*" "$(SolutionDir)\$(Configuration)\nselib\data\" /y && xcopy "$(SolutionDir)..\nse_main.lua" "$(SolutionDir)\$(Configuration)\" /y ++ ++ ++ $(IntDir)%(Filename).res ++ ++ ++ ++ ++ .\Debug/nmap.tlb ++ ++ ++ ++ ++ Disabled ++ .;..;..\liblua;..\nbase;..\libpcre;..\nsock\include;pcap-include;..\libdnet-stripped\include;..\..\nmap-mswin32-aux\OpenSSL\include;..\liblinear;..\libssh2\include;..\libz;%(AdditionalIncludeDirectories) ++ WIN32;_CONSOLE;%(PreprocessorDefinitions) ++ ..\libssh2\include;.;..;..\liblua;..\nbase;..\libpcre;..\nsock\include;pcap-include;..\libdnet-stripped\include;..\..\nmap-mswin32-aux\OpenSSL\include;..\liblinear;%(AdditionalIncludeDirectories) ++ WIN32;_CONSOLE;BPF_MAJOR_VERSION;%(PreprocessorDefinitions) ++ false ++ false ++ false ++ EnableFastChecks ++ ++ ++ .\Debug/nmap.pch ++ .\Debug/ ++ .\Debug/ ++ .\Debug/ ++ Level2 ++ true ++ ProgramDatabase ++ CompileAsCpp ++ MultiThreadedDebugDLL ++ false ++ ++ ++ liblua.lib;nsock.lib;pcred.lib;nbase.lib;libdnet-stripped.lib;libssh2.lib;zlibd.lib;liblinear.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libssl.lib;libcrypto.lib;shell32.lib;libnetutil.lib ++ .\Debug\nmap.exe ++ true ++ ..\libssh2\win32\Release_dll;lib;..\liblua\x64\Debug;..\libpcre\x64\Debug;..\nsock\x64\Debug;..\nbase\x64\Debug;..\libdnet-stripped\x64\Debug;..\libnetutil\x64\Debug;..\..\nmap-mswin32-aux\OpenSSL\lib;..\liblinear\x64\Debug;..\libz\contrib\vstudio\vc11\x86\ZlibStatRelease;%(AdditionalLibraryDirectories) ++ %(IgnoreSpecificDefaultLibraries) ++ packet.dll;wpcap.dll;iphlpapi.dll;%(DelayLoadDLLs) ++ true ++ .\Debug/nmap.pdb ++ Console ++ false ++ ++ ++ ++ ++ xcopy "$(SolutionDir)..\scripts" ".\$(Configuration)\scripts\" /e /y && xcopy "$(SolutionDir)..\nselib\*.lua" "$(SolutionDir)\$(Configuration)\nselib\" /y && xcopy /s /e "$(SolutionDir)..\nselib\data\*.*" "$(SolutionDir)\$(Configuration)\nselib\data\" /y && xcopy "$(SolutionDir)..\nse_main.lua" "$(SolutionDir)\$(Configuration)\" /y + + + $(IntDir)%(Filename).res +@@ -121,7 +198,7 @@ xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(Proje + CompileAsCpp + + +- liblua.lib;nsock.lib;libpcre.lib;nbase.lib;libdnet-stripped.lib;libssh2.lib;zlibstat.lib;liblinear.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libeay32.lib;ssleay32.lib;shell32.lib;libnetutil.lib ++ liblua.lib;nsock.lib;pcre.lib;nbase.lib;libdnet-stripped.lib;libssh2.lib;zlib.lib;liblinear.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libssl.lib;libcrypto.lib;shell32.lib;libnetutil.lib + .\Release/nmap.exe + true + ..\libssh2\win32\Release_dll;lib;..\liblua;..\libpcre;..\nsock;..\nbase;..\libdnet-stripped;../libnetutil;..\..\nmap-mswin32-aux\OpenSSL\lib;..\liblinear;..\libz\contrib\vstudio\vc11\x86\ZlibStatRelease;%(AdditionalLibraryDirectories) +@@ -135,8 +212,46 @@ xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(Proje + /LTCG %(AdditionalOptions) + + +- xcopy "$(SolutionDir)..\scripts" ".\$(Configuration)\scripts\" /e /y && xcopy "$(SolutionDir)..\nselib\*.lua" "$(SolutionDir)\$(Configuration)\nselib\" /y && xcopy /s /e "$(SolutionDir)..\nselib\data\*.*" "$(SolutionDir)\$(Configuration)\nselib\data\" /y && xcopy "$(SolutionDir)\..\..\nmap-mswin32-aux\OpenSSL\bin\*.dll" "$(SolutionDir)\$(Configuration)\" /y && xcopy "$(SolutionDir)..\nse_main.lua" "$(SolutionDir)\$(Configuration)\" /y +-xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(ProjectDir)$(OutDir)" ++ xcopy "$(SolutionDir)..\scripts" ".\$(Configuration)\scripts\" /e /y && xcopy "$(SolutionDir)..\nselib\*.lua" "$(SolutionDir)\$(Configuration)\nselib\" /y && xcopy /s /e "$(SolutionDir)..\nselib\data\*.*" "$(SolutionDir)\$(Configuration)\nselib\data\" /y && xcopy "$(SolutionDir)..\nse_main.lua" "$(SolutionDir)\$(Configuration)\" /y ++ ++ ++ ++ ++ .\Release/nmap.tlb ++ ++ ++ ++ ++ MaxSpeed ++ OnlyExplicitInline ++ .;..;..\liblua;..\nbase;..\libpcre;..\nsock\include;pcap-include;..\libdnet-stripped\include;..\..\nmap-mswin32-aux\OpenSSL\include;..\liblinear;..\libssh2\include;..\libz;%(AdditionalIncludeDirectories) ++ WIN32;_CONSOLE;BPF_MAJOR_VERSION;%(PreprocessorDefinitions) ++ true ++ true ++ ++ ++ .\Release/nmap.pch ++ .\Release/ ++ .\Release/ ++ .\Release/ ++ true ++ CompileAsCpp ++ ++ ++ liblua.lib;nsock.lib;pcre.lib;nbase.lib;libdnet-stripped.lib;libssh2.lib;zlib.lib;liblinear.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libssl.lib;libcrypto.lib;shell32.lib;libnetutil.lib ++ .\Release/nmap.exe ++ true ++ ..\libssh2\win32\Release_dll;lib;..\liblua\x64\Release;..\libpcre;..\nsock\x64\Release;..\nbase\x64\Release;..\libdnet-stripped\x64\Release;..\libnetutil\x64\Release;..\..\nmap-mswin32-aux\OpenSSL\lib;..\liblinear\x64\Release;..\libz\contrib\vstudio\vc11\x86\ZlibStatRelease;%(AdditionalLibraryDirectories) ++ %(IgnoreSpecificDefaultLibraries) ++ packet.dll;wpcap.dll;iphlpapi.dll;%(DelayLoadDLLs) ++ .\Release/nmap.pdb ++ Console ++ true ++ true ++ /LTCG %(AdditionalOptions) ++ ++ ++ xcopy "$(SolutionDir)..\scripts" ".\$(Configuration)\scripts\" /e /y && xcopy "$(SolutionDir)..\nselib\*.lua" "$(SolutionDir)\$(Configuration)\nselib\" /y && xcopy /s /e "$(SolutionDir)..\nselib\data\*.*" "$(SolutionDir)\$(Configuration)\nselib\data\" /y && xcopy "$(SolutionDir)..\nse_main.lua" "$(SolutionDir)\$(Configuration)\" /y + + + +@@ -191,7 +306,9 @@ xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(Proje + + + Sync ++ Sync + Sync ++ Sync + + + +@@ -251,83 +368,147 @@ xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(Proje + + + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + + + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + + + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + + + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + + + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + + + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + + + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + Copying %(Filename) to output directory... ++ Copying %(Filename) to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename)" > nul + + $(TargetDir)%(Filename);%(Outputs) ++ $(TargetDir)%(Filename);%(Outputs) + + + Copying %(Filename).xsl to output directory... ++ Copying %(Filename).xsl to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename).xsl" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename).xsl" > nul + + $(TargetDir)%(Filename).xsl;%(Outputs) ++ $(TargetDir)%(Filename).xsl;%(Outputs) + Copying %(Filename).xsl to output directory... ++ Copying %(Filename).xsl to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename).xsl" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename).xsl" > nul + + $(TargetDir)%(Filename).xsl;%(Outputs) ++ $(TargetDir)%(Filename).xsl;%(Outputs) + + + +@@ -339,18 +520,6 @@ xcopy /y /d "$(ProjectDir)..\libssh2\win32\$(Configuration)_dll\*.dll" "$(Proje + {31fb0767-a71f-4575-8379-002d72b8af86} + false + +- +- {5de86c7a-de72-4265-8807-4ca38f94f22a} +- false +- +- +- {ed957342-e43b-496e-92d9-4c76b525bdf5} +- false +- false +- false +- true +- false +- + + {b630c8f7-3138-43e8-89ed-78742fa2ac5f} + false +diff --git a/nbase/nbase.vcxproj b/nbase/nbase.vcxproj +index 948d7c8..b600c7b 100644 +--- a/nbase/nbase.vcxproj ++++ b/nbase/nbase.vcxproj +@@ -5,14 +5,26 @@ + Debug + Win32 + ++ ++ Debug ++ x64 ++ + + Release + Win32 + ++ ++ Release ++ x64 ++ + + Static + Win32 + ++ ++ Static ++ x64 ++ + + + {B630C8F7-3138-43E8-89ED-78742FA2AC5F} +@@ -25,16 +37,31 @@ + MultiByte + v120 + ++ ++ StaticLibrary ++ MultiByte ++ v120 ++ + + StaticLibrary + MultiByte + v120 + ++ ++ StaticLibrary ++ MultiByte ++ v120 ++ + + StaticLibrary + MultiByte + v120 + ++ ++ StaticLibrary ++ MultiByte ++ v120 ++ + + + +@@ -42,14 +69,26 @@ + + + ++ ++ ++ ++ + + + + ++ ++ ++ ++ + + + + ++ ++ ++ ++ + + + <_ProjectFileVersion>10.0.30319.1 +@@ -76,6 +115,21 @@ + $(OutDir)nbase.lib + + ++ ++ ++ Disabled ++ WIN32;_LIB;%(PreprocessorDefinitions) ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ ++ ++ Level3 ++ ProgramDatabase ++ ++ ++ $(OutDir)nbase.lib ++ ++ + + + /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) +@@ -89,6 +143,19 @@ + $(OutDir)nbase.lib + + ++ ++ ++ /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) ++ WIN32;_LIB;%(PreprocessorDefinitions) ++ ++ ++ Level3 ++ ProgramDatabase ++ ++ ++ $(OutDir)nbase.lib ++ ++ + + + /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) +@@ -103,6 +170,20 @@ + $(OutDir)nbase.lib + + ++ ++ ++ /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) ++ WIN32;_LIB;%(PreprocessorDefinitions) ++ MultiThreaded ++ ++ ++ Level3 ++ ProgramDatabase ++ ++ ++ $(OutDir)nbase.lib ++ ++ + + + +diff --git a/ncat/ncat.vcxproj b/ncat/ncat.vcxproj +index fc44dfa..e066b29 100644 +--- a/ncat/ncat.vcxproj ++++ b/ncat/ncat.vcxproj +@@ -5,14 +5,26 @@ + Debug + Win32 + ++ ++ Debug ++ x64 ++ + + Release + Win32 + ++ ++ Release ++ x64 ++ + + Static + Win32 + ++ ++ Static ++ x64 ++ + + + {C1E04411-E021-468B-83F1-CB624BBA7589} +@@ -25,18 +37,36 @@ + MultiByte + v120 + ++ ++ Application ++ false ++ MultiByte ++ v120 ++ + + Application + false + MultiByte + v120 + ++ ++ Application ++ false ++ MultiByte ++ v120 ++ + + Application + false + MultiByte + v120 + ++ ++ Application ++ false ++ MultiByte ++ v120 ++ + + + +@@ -44,26 +74,41 @@ + + + ++ ++ ++ ++ + + + + ++ ++ ++ ++ + + + + ++ ++ ++ ++ + + + <_ProjectFileVersion>10.0.30319.1 + .\$(Configuration)\ + .\$(Configuration)\ + true ++ true + .\Release\ + .\Release\ + .\Release\ + .\Release\ + true ++ true + true ++ true + + + +@@ -111,6 +156,51 @@ + xcopy "..\..\nmap-mswin32-aux\OpenSSL\bin\*.dll" "$(Configuration)\" /y + + ++ ++ ++ .\Debug/ncat.tlb ++ ++ ++ ++ ++ Disabled ++ .;..;../nbase;..\nsock\include;..\mswin32\pcap-include;..\..\nmap-mswin32-aux\OpenSSL\include;..\liblua;%(AdditionalIncludeDirectories) ++ WIN32;_CONSOLE;%(PreprocessorDefinitions) ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ ++ ++ .\Debug/ncat.pch ++ .\Debug/ ++ .\Debug/ ++ .\Debug/ ++ Level2 ++ true ++ ProgramDatabase ++ CompileAsCpp ++ ++ ++ ++ ++ ++ ++ nbase.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;nsock.lib;advapi32.lib;libcrypto.lib;libssl.lib;liblua.lib ++ .\Debug\ncat.exe ++ true ++ ..\mswin32\lib;..\nsock;..\nbase;..\..\nmap-mswin32-aux\OpenSSL\lib;..\liblua;%(AdditionalLibraryDirectories) ++ %(IgnoreSpecificDefaultLibraries) ++ wpcap.dll;%(DelayLoadDLLs) ++ true ++ .\Debug/ncat.pdb ++ Console ++ false ++ ++ ++ ++ ++ xcopy "..\..\nmap-mswin32-aux\OpenSSL\bin\*.dll" "$(Configuration)\" /y ++ ++ + + + .\Release/ncat.tlb +@@ -151,6 +241,45 @@ + xcopy "..\..\nmap-mswin32-aux\OpenSSL\bin\*.dll" "$(Configuration)\" /y + + ++ ++ ++ .\Release/ncat.tlb ++ ++ ++ ++ ++ MaxSpeed ++ OnlyExplicitInline ++ .;..;../nbase;..\nsock\include;..\mswin32\pcap-include;..\..\nmap-mswin32-aux\OpenSSL\include;..\liblua;%(AdditionalIncludeDirectories) ++ WIN32;_CONSOLE;%(PreprocessorDefinitions) ++ true ++ true ++ ++ ++ .\Release/ncat.pch ++ .\Release/ ++ .\Release/ ++ .\Release/ ++ Level2 ++ true ++ CompileAsCpp ++ ++ ++ nsock.lib;nbase.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;advapi32.lib;libcrypto.lib;libssl.lib ++ .\Release/ncat.exe ++ true ++ ..\mswin32\lib;..\nsock;..\nbase;..\..\nmap-mswin32-aux\OpenSSL\lib;%(AdditionalLibraryDirectories) ++ %(IgnoreSpecificDefaultLibraries) ++ wpcap.dll;%(DelayLoadDLLs) ++ .\Release/ncat.pdb ++ Console ++ true ++ true ++ ++ ++ xcopy "..\..\nmap-mswin32-aux\OpenSSL\bin\*.dll" "$(Configuration)\" /y ++ ++ + + + .\Release/ncat.tlb +@@ -193,6 +322,47 @@ + + + ++ ++ ++ .\Release/ncat.tlb ++ ++ ++ ++ ++ MaxSpeed ++ OnlyExplicitInline ++ .;..;../nbase;..\nsock\include;..\mswin32\pcap-include;..\..\nmap-mswin32-aux\OpenSSL\include;%(AdditionalIncludeDirectories) ++ WIN32;_CONSOLE;%(PreprocessorDefinitions) ++ true ++ MultiThreaded ++ true ++ ++ ++ .\Release/ncat.pch ++ .\Release/ ++ .\Release/ ++ .\Release/ ++ Level2 ++ true ++ CompileAsCpp ++ ++ ++ nsock.lib;nbase.lib;ws2_32.lib;IPHlpAPI.Lib;advapi32.lib;libssl.lib;libcrypto.lib;user32.lib;gdi32.lib ++ .\Release/ncat.exe ++ true ++ ..\mswin32\lib;..\nsock;..\nbase;..\..\nmap-mswin32-aux\OpenSSL\lib;%(AdditionalLibraryDirectories) ++ %(IgnoreSpecificDefaultLibraries) ++ %(DelayLoadDLLs) ++ .\Release/ncat.pdb ++ Console ++ true ++ true ++ ++ ++ ++ ++ ++ + + + +@@ -230,17 +400,29 @@ + + + Copying %(Filename).crt to output directory... ++ Copying %(Filename).crt to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename).crt" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename).crt" > nul + + $(TargetDir)%(Filename).crt;%(Outputs) ++ $(TargetDir)%(Filename).crt;%(Outputs) + Copying %(Filename).crt to output directory... ++ Copying %(Filename).crt to output directory... + Copying %(Filename).crt to output directory... ++ Copying %(Filename).crt to output directory... + copy /y "%(FullPath)" "$(TargetDir)%(Filename).crt" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename).crt" > nul + + copy /y "%(FullPath)" "$(TargetDir)%(Filename).crt" > nul ++ ++ copy /y "%(FullPath)" "$(TargetDir)%(Filename).crt" > nul + + $(TargetDir)%(Filename).crt;%(Outputs) ++ $(TargetDir)%(Filename).crt;%(Outputs) + $(TargetDir)%(Filename).crt;%(Outputs) ++ $(TargetDir)%(Filename).crt;%(Outputs) + + + +diff --git a/nping/nping.vcxproj b/nping/nping.vcxproj +index 57bd4ed..fa7a604 100644 +--- a/nping/nping.vcxproj ++++ b/nping/nping.vcxproj +@@ -5,10 +5,18 @@ + Debug + Win32 + ++ ++ Debug ++ x64 ++ + + Release + Win32 + ++ ++ Release ++ x64 ++ + + + {CDB10BBA-9085-4B9B-AC8F-BA31D3906B36} +@@ -21,12 +29,24 @@ + MultiByte + v120 + ++ ++ Application ++ false ++ MultiByte ++ v120 ++ + + Application + false + MultiByte + v120 + ++ ++ Application ++ false ++ MultiByte ++ v120 ++ + + + +@@ -34,19 +54,29 @@ + + + ++ ++ ++ ++ + + + + ++ ++ ++ ++ + + + <_ProjectFileVersion>10.0.30319.1 + .\$(Configuration)\ + .\$(Configuration)\ + true ++ true + .\Release\ + .\Release\ + true ++ true + + + +@@ -93,6 +123,50 @@ + xcopy "..\..\nmap-mswin32-aux\OpenSSL\bin\*.dll" "$(SolutionDir)\$(Configuration)\" /y + + ++ ++ ++ .\Debug/nmap.tlb ++ ++ ++ ++ ++ Disabled ++ .;..;..\mswin32;../nbase;..\nsock\include;..\mswin32\pcap-include;..\libdnet-stripped\include;..\..\nmap-mswin32-aux\OpenSSL\include;%(AdditionalIncludeDirectories) ++ WIN32;_CONSOLE;BPF_MAJOR_VERSION;%(PreprocessorDefinitions) ++ false ++ false ++ false ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ ++ ++ .\Debug/nmap.pch ++ .\Debug/ ++ .\Debug/ ++ .\Debug/ ++ Level2 ++ true ++ ProgramDatabase ++ CompileAsCpp ++ ++ ++ nsock.lib;nbase.lib;libdnet-stripped.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libssl.lib;libcrypto.lib;shell32.lib;libnetutil.lib ++ .\Debug\nping.exe ++ true ++ ..\mswin32\lib;..\nsock;..\nbase;..\libdnet-stripped;../libnetutil;..\..\nmap-mswin32-aux\OpenSSL\lib;%(AdditionalLibraryDirectories) ++ %(IgnoreSpecificDefaultLibraries) ++ packet.dll;wpcap.dll;iphlpapi.dll;%(DelayLoadDLLs) ++ true ++ .\Debug/nmap.pdb ++ Console ++ false ++ ++ ++ ++ ++ xcopy "..\..\nmap-mswin32-aux\OpenSSL\bin\*.dll" "$(SolutionDir)\$(Configuration)\" /y ++ ++ + + + .\Release/nmap.tlb +@@ -132,6 +206,44 @@ + xcopy "..\..\nmap-mswin32-aux\OpenSSL\bin\*.dll" "$(SolutionDir)\$(Configuration)\" /y + + ++ ++ ++ .\Release/nmap.tlb ++ ++ ++ ++ ++ MaxSpeed ++ OnlyExplicitInline ++ .;..;..\mswin32;../nbase;..\nsock\include;..\mswin32\pcap-include;..\libdnet-stripped\include;..\..\nmap-mswin32-aux\OpenSSL\include;%(AdditionalIncludeDirectories) ++ WIN32;_CONSOLE;BPF_MAJOR_VERSION;%(PreprocessorDefinitions) ++ true ++ true ++ ++ ++ .\Release/nping.pch ++ .\Release/ ++ .\Release/ ++ .\Release/ ++ true ++ CompileAsCpp ++ ++ ++ nsock.lib;nbase.lib;libdnet-stripped.lib;ws2_32.lib;IPHlpAPI.Lib;wpcap.lib;packet.lib;advapi32.lib;libssl.lib;libcrypto.lib;shell32.lib;libnetutil.lib ++ .\Release/nping.exe ++ true ++ ..\mswin32\lib;..\nsock;..\nbase;..\libdnet-stripped;../libnetutil;..\..\nmap-mswin32-aux\OpenSSL\lib;%(AdditionalLibraryDirectories) ++ %(IgnoreSpecificDefaultLibraries) ++ packet.dll;wpcap.dll;iphlpapi.dll;%(DelayLoadDLLs) ++ .\Release/nping.pdb ++ Console ++ true ++ true ++ ++ ++ xcopy "..\..\nmap-mswin32-aux\OpenSSL\bin\*.dll" "$(SolutionDir)\$(Configuration)\" /y ++ ++ + + + +diff --git a/nsock/nsock.vcxproj b/nsock/nsock.vcxproj +index 36feb48..f720258 100644 +--- a/nsock/nsock.vcxproj ++++ b/nsock/nsock.vcxproj +@@ -5,22 +5,42 @@ + DebugNoPcap + Win32 + ++ ++ DebugNoPcap ++ x64 ++ + + Debug + Win32 + ++ ++ Debug ++ x64 ++ + + ReleaseNoPcap + Win32 + ++ ++ ReleaseNoPcap ++ x64 ++ + + Release + Win32 + ++ ++ Release ++ x64 ++ + + Static + Win32 + ++ ++ Static ++ x64 ++ + + + {F8D6D1E3-D4EA-402C-98AA-168E5309BAF4} +@@ -33,26 +53,51 @@ + MultiByte + v120 + ++ ++ StaticLibrary ++ MultiByte ++ v120 ++ + + StaticLibrary + MultiByte + v120 + ++ ++ StaticLibrary ++ MultiByte ++ v120 ++ + + StaticLibrary + MultiByte + v120 + ++ ++ StaticLibrary ++ MultiByte ++ v120 ++ + + StaticLibrary + MultiByte + v120 + ++ ++ StaticLibrary ++ MultiByte ++ v120 ++ + + StaticLibrary + MultiByte + v120 + ++ ++ StaticLibrary ++ MultiByte ++ v120 ++ + + + +@@ -60,22 +105,42 @@ + + + ++ ++ ++ ++ + + + + ++ ++ ++ ++ + + + + ++ ++ ++ ++ + + + + ++ ++ ++ ++ + + + + ++ ++ ++ ++ + + + <_ProjectFileVersion>10.0.30319.1 +@@ -110,6 +175,25 @@ + $(OutDir)nsock.lib + + ++ ++ ++ Disabled ++ ..\nbase\;include;..\mswin32\pcap-include;..\mswin32;..\;..\..\nmap-mswin32-aux\OpenSSL\include;%(AdditionalIncludeDirectories) ++ WIN32;_LIB;%(PreprocessorDefinitions) ++ ++ ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ ++ ++ Level3 ++ ProgramDatabase ++ CompileAsCpp ++ ++ ++ $(OutDir)nsock.lib ++ ++ + + + /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) +@@ -127,6 +211,23 @@ + $(OutDir)nsock.lib + + ++ ++ ++ /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) ++ ..\nbase\;include;..\mswin32\pcap-include;..\mswin32;..\;..\..\nmap-mswin32-aux\OpenSSL\include;%(AdditionalIncludeDirectories) ++ WIN32;_LIB;%(PreprocessorDefinitions) ++ ++ ++ ++ ++ Level3 ++ ProgramDatabase ++ CompileAsCpp ++ ++ ++ $(OutDir)nsock.lib ++ ++ + + + /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) +@@ -145,6 +246,24 @@ + $(OutDir)nsock.lib + + ++ ++ ++ /D "_CRT_SECURE_NO_DEPRECATE" %(AdditionalOptions) ++ ..\nbase\;include;..\mswin32\pcap-include;..\mswin32;..\;..\..\nmap-mswin32-aux\OpenSSL\include;%(AdditionalIncludeDirectories) ++ WIN32;_LIB;%(PreprocessorDefinitions);DISABLE_NSOCK_PCAP ++ ++ ++ MultiThreaded ++ ++ ++ Level3 ++ ProgramDatabase ++ CompileAsCpp ++ ++ ++ $(OutDir)nsock.lib ++ ++ + + + /D "DISABLE_NSOCK_PCAP" %(AdditionalOptions) +@@ -166,9 +285,47 @@ + $(OutDir)nsock.lib + + ++ ++ ++ /D "DISABLE_NSOCK_PCAP" %(AdditionalOptions) ++ Disabled ++ ..\nbase\;include;..\mswin32\pcap-include;..\mswin32;..\;..\..\nmap-mswin32-aux\OpenSSL\include;%(AdditionalIncludeDirectories) ++ WIN32;_LIB;%(PreprocessorDefinitions) ++ ++ ++ EnableFastChecks ++ MultiThreadedDebugDLL ++ ++ ++ Level3 ++ ProgramDatabase ++ CompileAsCpp ++ ++ ++ $(OutDir)nsock.lib ++ ++ + + + /D "_CRT_SECURE_NO_DEPRECATE" ++/D "DISABLE_NSOCK_PCAP" %(AdditionalOptions) ++ ..\nbase\;include;..\mswin32\pcap-include;..\mswin32;..\;..\..\nmap-mswin32-aux\OpenSSL\include;%(AdditionalIncludeDirectories) ++ WIN32;_LIB;%(PreprocessorDefinitions) ++ ++ ++ ++ ++ Level3 ++ ProgramDatabase ++ CompileAsCpp ++ ++ ++ $(OutDir)nsock.lib ++ ++ ++ ++ ++ /D "_CRT_SECURE_NO_DEPRECATE" + /D "DISABLE_NSOCK_PCAP" %(AdditionalOptions) + ..\nbase\;include;..\mswin32\pcap-include;..\mswin32;..\;..\..\nmap-mswin32-aux\OpenSSL\include;%(AdditionalIncludeDirectories) + WIN32;_LIB;%(PreprocessorDefinitions) diff --git a/vcpkg/ports/nmap/fix-snprintf.patch b/vcpkg/ports/nmap/fix-snprintf.patch new file mode 100644 index 0000000..aafd1cf --- /dev/null +++ b/vcpkg/ports/nmap/fix-snprintf.patch @@ -0,0 +1,39 @@ +diff --git a/libdnet-stripped/include/dnet_winconfig.h b/libdnet-stripped/include/dnet_winconfig.h +index e41907c..82bc595 100644 +--- a/libdnet-stripped/include/dnet_winconfig.h ++++ b/libdnet-stripped/include/dnet_winconfig.h +@@ -277,7 +277,7 @@ int strlcpy(char *, const char *, int); + char *strsep(char **, const char *); + #endif + +-#define snprintf _snprintf ++//#define snprintf _snprintf + + /* Without this, Windows will give us all sorts of crap about using functions + like strcpy() even if they are done safely */ +diff --git a/nbase/nbase.h b/nbase/nbase.h +index 0ecd9bc..c0eb395 100644 +--- a/nbase/nbase.h ++++ b/nbase/nbase.h +@@ -359,7 +359,7 @@ extern "C" int vsnprintf (char *, size_t, const char *, va_list); + #define putenv _putenv + + #if !defined(__GNUC__) +-#define snprintf _snprintf ++//#define snprintf _snprintf + #endif + + #define strcasecmp _stricmp +diff --git a/nse_libssh2.cc b/nse_libssh2.cc +index bf721b6..1fafe7f 100644 +--- a/nse_libssh2.cc ++++ b/nse_libssh2.cc +@@ -58,7 +58,7 @@ struct ssh_userdata { + + + #if defined(_MSC_VER) && _MSC_VER < 1900 +-#define snprintf c99_snprintf ++//#define snprintf c99_snprintf + #define vsnprintf c99_vsnprintf + + __inline int c99_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap) { diff --git a/vcpkg/ports/nmap/fix-ssize_t.patch b/vcpkg/ports/nmap/fix-ssize_t.patch new file mode 100644 index 0000000..36103a8 --- /dev/null +++ b/vcpkg/ports/nmap/fix-ssize_t.patch @@ -0,0 +1,16 @@ +diff --git a/libdnet-stripped/include/dnet/os.h b/libdnet-stripped/include/dnet/os.h +index 55a21b9..544ebd8 100644 +--- a/libdnet-stripped/include/dnet/os.h ++++ b/libdnet-stripped/include/dnet/os.h +@@ -23,7 +23,11 @@ + typedef u_short uint16_t; + typedef u_int uint32_t; + # ifndef __CYGWIN__ ++#ifdef _WIN64 ++ typedef __int64 ssize_t; ++#else + typedef long ssize_t; ++#endif + # endif + #else + # include diff --git a/vcpkg/ports/nmap/portfile.cmake b/vcpkg/ports/nmap/portfile.cmake new file mode 100644 index 0000000..8291533 --- /dev/null +++ b/vcpkg/ports/nmap/portfile.cmake @@ -0,0 +1,119 @@ +# nmap is a tools, so ignor POST_CHECK +SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +vcpkg_download_distfile(ARCHIVE + URLS "https://nmap.org/dist/nmap-7.70.tar.bz2" + FILENAME "nmap-7.70.tar.bz2" + SHA512 084c148b022ff6550e269d976d0077f7932a10e2ef218236fe13aa3a70b4eb6506df03329868fc68cb3ce78e4360b200f5a7a491d3145028fed679ef1c9ecae5 +) + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + fix-snprintf.patch + fix-ssize_t.patch + fix-msvc-prj.patch + ) + list(APPEND DEL_PROJS "libpcap" "libpcre" "libssh2" "libz") + foreach (DEL_PROJ ${DEL_PROJS}) + file(REMOVE_RECURSE ${SOURCE_PATH}/${DEL_PROJ}) + endforeach() + + # Clear + vcpkg_execute_required_process( + COMMAND "devenv.exe" + "nmap.sln" + /Clean + WORKING_DIRECTORY ${SOURCE_PATH}/mswin32 + ) + + # Uprade + message(STATUS "Upgrade solution...") + vcpkg_execute_required_process( + COMMAND "devenv.exe" + "nmap.sln" + /Upgrade + WORKING_DIRECTORY ${SOURCE_PATH}/mswin32 + LOGNAME upgrade-Packet-${TARGET_TRIPLET} + ) + # Build + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/mswin32/nmap.vcxproj + PLATFORM ${MSBUILD_PLATFORM} + USE_VCPKG_INTEGRATION + ) + + # Install + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL Release) + file(INSTALL ${SOURCE_PATH}/mswin32/Release/nmap.exe + ${SOURCE_PATH}/mswin32/Release/nmap.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + endif() + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL Debug) + file(INSTALL ${SOURCE_PATH}/mswin32/Debug/nmap.exe + ${SOURCE_PATH}/mswin32/Debug/nmap.pdb + DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + endif() +else() + set(ENV{LDFLAGS} "$ENV{LDFLAGS} -pthread") + foreach(BUILD_TYPE rel dbg) + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE}) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE}) + # Since nmap makefile has strong relationshop with codes, copy codes to obj path + vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${BUILD_TYPE}) + + endforeach() + set(OPTIONS --without-nmap-update --with-openssl=${CURRENT_INSTALLED_DIR} --with-libssh2=${CURRENT_INSTALLED_DIR} --with-libz=${CURRENT_INSTALLED_DIR} --with-libpcre=${CURRENT_INSTALLED_DIR}) + message(STATUS "Building Options: ${OPTIONS}") + + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL Release) + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + set(SOURCE_PATH_RELEASE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/nmap-7.70) + + vcpkg_execute_required_process( + COMMAND "./configure" ${OPTIONS} + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME config-${TARGET_TRIPLET}-rel + ) + + message(STATUS "Building ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND make + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME build-${TARGET_TRIPLET}-rel + ) + + message(STATUS "Installing ${TARGET_TRIPLET}-rel") + file(INSTALL ${SOURCE_PATH_RELEASE}/nmap DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + endif() + + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL Debug) + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + set(SOURCE_PATH_DEBUG ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/nmap-7.70) + + vcpkg_execute_required_process( + COMMAND "./configure" ${OPTIONS} + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME config-${TARGET_TRIPLET}-dbg + ) + + message(STATUS "Building ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND make + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + + message(STATUS "Installing ${TARGET_TRIPLET}-dbg") + file(INSTALL ${SOURCE_PATH_RELEASE}/nmap DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools) + endif() + + set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/nmap-7.70) +endif() + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/nmap/usage b/vcpkg/ports/nmap/usage new file mode 100644 index 0000000..d910c7d --- /dev/null +++ b/vcpkg/ports/nmap/usage @@ -0,0 +1,5 @@ +The package curl is compatible with built-in CMake targets: + + find_package(NMAP REQUIRED) + target_link_libraries(main PRIVATE ${NMAP_LIBRARIES}) + target_include_directories(main PRIVATE ${NMAP_INCLUDE_DIRS}) diff --git a/vcpkg/ports/nmslib/CONTROL b/vcpkg/ports/nmslib/CONTROL new file mode 100644 index 0000000..4faefb9 --- /dev/null +++ b/vcpkg/ports/nmslib/CONTROL @@ -0,0 +1,5 @@ +Source: nmslib +Version: 2.0.6 +Homepage: https://github.com/searchivarius/nmslib +Description: Non-Metric Space Library (NMSLIB) is an efficient similarity search library and a toolkit for evaluation of k-NN methods for generic non-metric spaces. +Supports: !(arm|uwp) \ No newline at end of file diff --git a/vcpkg/ports/nmslib/fix-headers.patch b/vcpkg/ports/nmslib/fix-headers.patch new file mode 100644 index 0000000..f06fd06 --- /dev/null +++ b/vcpkg/ports/nmslib/fix-headers.patch @@ -0,0 +1,77 @@ +diff --git a/similarity_search/src/method/hnsw.cc b/similarity_search/src/method/hnsw.cc +index 2741701..7587f7f 100644 +--- a/similarity_search/src/method/hnsw.cc ++++ b/similarity_search/src/method/hnsw.cc +@@ -27,7 +27,7 @@ + #include + #include + // This is only for _mm_prefetch +-#include ++#include + + #include "portable_simd.h" + #include "knnquery.h" +diff --git a/similarity_search/src/method/hnsw_distfunc_opt.cc b/similarity_search/src/method/hnsw_distfunc_opt.cc +index 4c691bd..6f1a9e6 100644 +--- a/similarity_search/src/method/hnsw_distfunc_opt.cc ++++ b/similarity_search/src/method/hnsw_distfunc_opt.cc +@@ -30,7 +30,7 @@ + #include "rangequery.h" + #include "portable_intrinsics.h" + // This is only for _mm_prefetch +-#include ++#include + #include "space.h" + + #include "sort_arr_bi.h" +diff --git a/similarity_search/src/method/pivot_neighb_invindx.cc b/similarity_search/src/method/pivot_neighb_invindx.cc +index c6113c7..a7d818b 100644 +--- a/similarity_search/src/method/pivot_neighb_invindx.cc ++++ b/similarity_search/src/method/pivot_neighb_invindx.cc +@@ -21,7 +21,7 @@ + #include + + // This is only for _mm_prefetch +-#include ++#include + + #include "portable_simd.h" + #include "space.h" +diff --git a/similarity_search/src/method/small_world_rand.cc b/similarity_search/src/method/small_world_rand.cc +index e67ea97..92fe70a 100644 +--- a/similarity_search/src/method/small_world_rand.cc ++++ b/similarity_search/src/method/small_world_rand.cc +@@ -17,7 +17,7 @@ + #include + #include + // This is only for _mm_prefetch +-#include ++#include + + #if defined(_WIN32) || defined(WIN32) + #include +diff --git a/similarity_search/src/method/vptree.cc b/similarity_search/src/method/vptree.cc +index 4da3b5f..d77e419 100644 +--- a/similarity_search/src/method/vptree.cc ++++ b/similarity_search/src/method/vptree.cc +@@ -20,7 +20,7 @@ + #include + + // This is only for _mm_prefetch +-#include ++#include + #if defined(_WIN32) || defined(WIN32) + #include + #endif +diff --git a/similarity_search/test/test_overlap.cc b/similarity_search/test/test_overlap.cc +index 326b26b..413d66d 100644 +--- a/similarity_search/test/test_overlap.cc ++++ b/similarity_search/test/test_overlap.cc +@@ -12,7 +12,6 @@ + * Apache License Version 2.0 http://www.apache.org/licenses/. + * + */ +-#include + + #include + #include diff --git a/vcpkg/ports/nmslib/portfile.cmake b/vcpkg/ports/nmslib/portfile.cmake new file mode 100644 index 0000000..fc5b3d1 --- /dev/null +++ b/vcpkg/ports/nmslib/portfile.cmake @@ -0,0 +1,45 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nmslib/nmslib + REF 5482e077d1c8637499f86231bcd3979cb7fa6aef # v2.0.6 + SHA512 e529c8d1d97e972f8314be9837e10f4ebab57d4a5f19a66341bb8e163dfe53d1d640a3909a708b021a52d0e6c2537954d749cb80e71757469700a3e9e173ceca + HEAD_REF master + PATCHES + fix-headers.patch +) + +# TODO: check SSE and AVX avability and set corresponding tags +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/similarity_search + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Move headers into separate folder +set(SUBFOLDERS factory method space) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include/nmslib) +foreach(SUBFOLER ${SUBFOLDERS}) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include/nmslib/${SUBFOLER}) +endforeach() + +file(GLOB HEADERS ${CURRENT_PACKAGES_DIR}/include/*.h ${CURRENT_PACKAGES_DIR}/include/*/*.h) +foreach(HEADER ${HEADERS}) + string(REPLACE "${CURRENT_PACKAGES_DIR}/include" "${CURRENT_PACKAGES_DIR}/include/nmslib" + MOVED_HEADER ${HEADER}) + file(RENAME ${HEADER} ${MOVED_HEADER}) +endforeach(HEADER ${HEADERS}) + +foreach(SUBFOLER ${SUBFOLDERS}) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/${SUBFOLER}/) +endforeach() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Put the license file where vcpkg expects it +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/nng/portfile.cmake b/vcpkg/ports/nng/portfile.cmake new file mode 100644 index 0000000..cccd74a --- /dev/null +++ b/vcpkg/ports/nng/portfile.cmake @@ -0,0 +1,55 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nanomsg/nng + REF 32b12a311e1f490f0d5c629ce887edfbf18f2d2c # version 1.3.2 + SHA512 cd1b1906e5b99d9f04ce41d3d93c0841c45a571ed824c4d19428ce68fd53366e5ed90411d5958baaf9fa0ab412639dec7594a8ec1f64de4b41168932e3565125 + HEAD_REF master +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + mbedtls NNG_ENABLE_TLS + tools NNG_ENABLE_NNGCAT +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DNNG_TESTS=OFF + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/nng) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/include/nng/nng.h + "defined(NNG_SHARED_LIB)" + "0 /* defined(NNG_SHARED_LIB) */" +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/include/nng/nng.h + "!defined(NNG_STATIC_LIB)" + "1 /* !defined(NNG_STATIC_LIB) */" + ) +else() + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/include/nng/nng.h + "!defined(NNG_STATIC_LIB)" + "0 /* !defined(NNG_STATIC_LIB) */" + ) +endif() + +if ("tools" IN_LIST FEATURES) + vcpkg_copy_tools(TOOL_NAMES nngcat AUTO_CLEAN) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/nng/vcpkg.json b/vcpkg/ports/nng/vcpkg.json new file mode 100644 index 0000000..6a0dd4f --- /dev/null +++ b/vcpkg/ports/nng/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "nng", + "version-string": "1.3.2", + "description": "nanomsg-next-gen, lightweight messaging library", + "homepage": "https://nng.nanomsg.org", + "license": "MIT", + "features": { + "mbedtls": { + "description": "nng TLS support", + "dependencies": [ + "mbedtls" + ] + }, + "tools": { + "description": "nng tools (nngcat, for example)" + } + } +} diff --git a/vcpkg/ports/nngpp/CONTROL b/vcpkg/ports/nngpp/CONTROL new file mode 100644 index 0000000..9c52b24 --- /dev/null +++ b/vcpkg/ports/nngpp/CONTROL @@ -0,0 +1,6 @@ +Source: nngpp +Version: 1.3.0 +Homepage: https://github.com/cwzx/nngpp +Description: C++ wrapper around the nanomsg NNG API. +Build-Depends: nng + diff --git a/vcpkg/ports/nngpp/portfile.cmake b/vcpkg/ports/nngpp/portfile.cmake new file mode 100644 index 0000000..5da246e --- /dev/null +++ b/vcpkg/ports/nngpp/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cwzx/nngpp + REF cc5d2641babab165d8a9943817c46d36c6dc17c2 #v1.3.0 + SHA512 76b78f5b39b24fae3820924abb5c2f8f51f1683c08211366668745196b184ee4b4c9b1fd2fc68e8f234a56b802a4a79249d173d1562af46046d19a4498222405 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DNNGPP_BUILD_DEMOS=OFF + -DNNGPP_BUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +# Move CMake config files to the right place +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + diff --git a/vcpkg/ports/nonius/CMakeLists.txt b/vcpkg/ports/nonius/CMakeLists.txt new file mode 100644 index 0000000..38f213d --- /dev/null +++ b/vcpkg/ports/nonius/CMakeLists.txt @@ -0,0 +1,30 @@ +cmake_minimum_required(VERSION 3.9) +cmake_policy(VERSION ${CMAKE_VERSION}) # use default policies of current cmake version + +project(nonius) + +add_library(nonius INTERFACE) +target_include_directories(nonius INTERFACE + $ + $ +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ + DESTINATION include + ) +endif() + +install(TARGETS nonius + EXPORT noniusExport + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install( + EXPORT noniusExport + FILE noniusConfig.cmake + NAMESPACE Nonius:: + DESTINATION share/nonius +) diff --git a/vcpkg/ports/nonius/CONTROL b/vcpkg/ports/nonius/CONTROL new file mode 100644 index 0000000..46c9840 --- /dev/null +++ b/vcpkg/ports/nonius/CONTROL @@ -0,0 +1,4 @@ +Source: nonius +Version: 2019-04-20-1 +Description: A C++ micro-benchmarking framework +Build-Depends: boost-algorithm, boost-lexical-cast, boost-math diff --git a/vcpkg/ports/nonius/portfile.cmake b/vcpkg/ports/nonius/portfile.cmake new file mode 100644 index 0000000..ca7f7b5 --- /dev/null +++ b/vcpkg/ports/nonius/portfile.cmake @@ -0,0 +1,28 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libnonius/nonius + REF 6396b7ad6685843eea63754ffa567dd66353c1a8 + SHA512 3b824a6011f1dbe116271dd76e8214ed98d73dfc215d7c9242bf298eb0e7ee3a3e3198f477b49fdbe098ac6e3e4edd8ca7bd2e03cc2036189bf3630ef3fcdca2 + 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() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +configure_file(${SOURCE_PATH}/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/nowide/CONTROL b/vcpkg/ports/nowide/CONTROL new file mode 100644 index 0000000..a7c69dc --- /dev/null +++ b/vcpkg/ports/nowide/CONTROL @@ -0,0 +1,4 @@ +Source: nowide +Version: 11.0.0 +Homepage: https://github.com/boostorg/nowide +Description: Boost nowide module (standalone) diff --git a/vcpkg/ports/nowide/portfile.cmake b/vcpkg/ports/nowide/portfile.cmake new file mode 100644 index 0000000..6ad39c0 --- /dev/null +++ b/vcpkg/ports/nowide/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/boostorg/nowide/releases/download/v11.0.0/nowide_standalone_v11.0.0.tar.gz" + FILENAME "nowide_standalone_v11.0.0.tar.gz" + SHA512 315b56e2e6cfe26459e71bc664953b6e5b81351e409dd8f63d6848a49fd5d5834e39f1ed4de28ce0ed288332d71b63a5ddac9894531d42181f23eaf627d077ac +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/nowide TARGET_PATH share/${PORT}) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/nrf-ble-driver/001-arm64-support.patch b/vcpkg/ports/nrf-ble-driver/001-arm64-support.patch new file mode 100644 index 0000000..2c97053 --- /dev/null +++ b/vcpkg/ports/nrf-ble-driver/001-arm64-support.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 99daa24..9a18ee5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -259,6 +259,9 @@ endforeach(SD_API_VER) + # Additional special linkage libraries + foreach(SD_API_VER ${SD_API_VERS}) + if(WIN32) ++ # arm64-windows support ++ target_link_libraries(${NRF_BLE_DRIVER_${SD_API_VER}_STATIC_LIB} PRIVATE "advapi32") ++ target_link_libraries(${NRF_BLE_DRIVER_${SD_API_VER}_SHARED_LIB} PRIVATE "advapi32") + elseif(APPLE) + target_link_libraries(${NRF_BLE_DRIVER_${SD_API_VER}_STATIC_LIB} PRIVATE "-framework CoreFoundation" "-framework IOKit") + target_link_libraries(${NRF_BLE_DRIVER_${SD_API_VER}_SHARED_LIB} PRIVATE "-framework CoreFoundation" "-framework IOKit") diff --git a/vcpkg/ports/nrf-ble-driver/CONTROL b/vcpkg/ports/nrf-ble-driver/CONTROL new file mode 100644 index 0000000..fa530b0 --- /dev/null +++ b/vcpkg/ports/nrf-ble-driver/CONTROL @@ -0,0 +1,4 @@ +Source: nrf-ble-driver +Version: 4.1.2 +Description: BLE driver is a library for Bluetooth Low Energy communication using Nordic Semiconductor development kits. +Build-Depends: spdlog, catch2, cli11, asio diff --git a/vcpkg/ports/nrf-ble-driver/portfile.cmake b/vcpkg/ports/nrf-ble-driver/portfile.cmake new file mode 100644 index 0000000..447f906 --- /dev/null +++ b/vcpkg/ports/nrf-ble-driver/portfile.cmake @@ -0,0 +1,54 @@ +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + message( +"${PORT} currently requires the following libraries from the system package manager: + libudev-dev +These can be installed on Ubuntu systems via sudo apt install libudev-dev" + ) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO NordicSemiconductor/pc-ble-driver + REF v4.1.2 + SHA512 625a52151f2c78421e48e90ff60292c6106e8504b55a26c7df716df75e051a40d2ee4a26c57b5daaa370e53a79002fe965aee8a0d8749f7dce380e8e4a617c95 + HEAD_REF master + PATCHES + 001-arm64-support.patch +) + +# Ensure that git is found within CMakeLists.txt by appending vcpkg's git executable dirpath to $PATH. +# Git should always be available as it is downloaded during the bootstrap phase. +# Append instead of prepend to $PATH to honor the user's git executable as a general rule. +find_program(GIT NAMES git git.cmd) +get_filename_component(GIT_EXE_DIRPATH "${GIT}" DIRECTORY) +set(ENV{PATH} "$ENV{PATH};${GIT_EXE_DIRPATH}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DDISABLE_EXAMPLES= -DDISABLE_TESTS= -DNRF_BLE_DRIVER_VERSION=4.1.2 -DCONNECTIVITY_VERSION=4.1.2 +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() + +# Copy hex files into shared folder for package +foreach(HEX_DIR IN ITEMS "sd_api_v2" "sd_api_v3" "sd_api_v5" "sd_api_v6") + set(TARGET_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}/hex/${HEX_DIR}") + file(MAKE_DIRECTORY ${TARGET_DIRECTORY}) + file(INSTALL "${SOURCE_PATH}/hex/${HEX_DIR}" DESTINATION ${TARGET_DIRECTORY}/..) +endforeach() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/LICENSE) +file(REMOVE ${CURRENT_PACKAGES_DIR}/LICENSE) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/nt-wrapper/CONTROL b/vcpkg/ports/nt-wrapper/CONTROL new file mode 100644 index 0000000..cd16e95 --- /dev/null +++ b/vcpkg/ports/nt-wrapper/CONTROL @@ -0,0 +1,4 @@ +Source: nt-wrapper +Version: 2019-08-10 +Description: A header only wrapper library around native windows system APIs +Homepage: https://github.com/JustasMasiulis/nt_wrapper diff --git a/vcpkg/ports/nt-wrapper/portfile.cmake b/vcpkg/ports/nt-wrapper/portfile.cmake new file mode 100644 index 0000000..7ed8146 --- /dev/null +++ b/vcpkg/ports/nt-wrapper/portfile.cmake @@ -0,0 +1,25 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO JustasMasiulis/nt_wrapper + REF 6a150292a43f6aea35918a5c5e93a66c334ea301 + SHA512 fb8a1c4c934d3cb48a76a935ba69fd51ec2e6b66f5c265a8da9456691f933c6080057fec9a714f252c39d02525603b993cecd905452598058254ac9318655c4f + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/nuklear/CONTROL b/vcpkg/ports/nuklear/CONTROL new file mode 100644 index 0000000..e3de49f --- /dev/null +++ b/vcpkg/ports/nuklear/CONTROL @@ -0,0 +1,4 @@ +Source: nuklear +Version: 2019-07-11 +Homepage: https://github.com/vurtun/nuklear +Description: This is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain diff --git a/vcpkg/ports/nuklear/portfile.cmake b/vcpkg/ports/nuklear/portfile.cmake new file mode 100644 index 0000000..7da7c77 --- /dev/null +++ b/vcpkg/ports/nuklear/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO vurtun/nuklear + REF 5fa99df235e50aef82e7757002099ead7a1395fe + SHA512 d0be03e891e4efbc54ef97e2fd8721071227b8aed17d4a57cc4aab4023975f7bf33710a864041a60d2375e3eb8f65cb2ea6255d83db874dcd21e0450ff2f5e5c + HEAD_REF master +) +file(INSTALL ${SOURCE_PATH}/nuklear.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/Readme.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/nuklear RENAME copyright) +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/numactl/CONTROL b/vcpkg/ports/numactl/CONTROL new file mode 100644 index 0000000..4c5c036 --- /dev/null +++ b/vcpkg/ports/numactl/CONTROL @@ -0,0 +1,3 @@ +Source: numactl +Version: 2.0.12 +Description: NUMA support for Linux diff --git a/vcpkg/ports/numactl/portfile.cmake b/vcpkg/ports/numactl/portfile.cmake new file mode 100644 index 0000000..3319d28 --- /dev/null +++ b/vcpkg/ports/numactl/portfile.cmake @@ -0,0 +1,73 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO numactl/numactl + REF v2.0.12 + SHA512 3814efd924d1c9152a30f6ae5b665afc20648226cd475d72b933c0ec4f30249af4e25110de17f144734b787ed765644dca09a657219806ab5c9c550abd45bf8e + HEAD_REF master +) + +if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + message(FATAL_ERROR "Package only supports linux platform.") +endif() + +message( +"numactl currently requires the following libraries from the system package manager: + autoconf libtool +These can be installed on Ubuntu systems via sudo apt install autoconf libtool" +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(SHARED_STATIC --enable-static --disable-shared) +else() + set(SHARED_STATIC --disable-static --enable-shared) +endif() + +set(OPTIONS ${SHARED_STATIC}) +vcpkg_execute_required_process( + COMMAND ${SOURCE_PATH}/autogen.sh + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME setup-${TARGET_TRIPLET} +) + +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) +file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) +message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") +set(CFLAGS "${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_DEBUG} -fPIC -O0 -g -I${SOURCE_PATH}/include") +set(LDFLAGS "${VCPKG_LINKER_FLAGS}") +vcpkg_execute_required_process( + COMMAND ${SOURCE_PATH}/configure --prefix=${CURRENT_PACKAGES_DIR}/debug ${OPTIONS} --with-sysroot=${CURRENT_INSTALLED_DIR}/debug + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME configure-${TARGET_TRIPLET}-dbg +) +message(STATUS "Building ${TARGET_TRIPLET}-dbg") +vcpkg_execute_required_process( + COMMAND make -j install "CFLAGS=${CFLAGS}" "LDFLAGS=${LDFLAGS}" + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME install-${TARGET_TRIPLET}-dbg +) + +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) +file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) +message(STATUS "Configuring ${TARGET_TRIPLET}-rel") +set(CFLAGS "${VCPKG_C_FLAGS} ${VCPKG_C_FLAGS_RELEASE} -fPIC -O3 -I${SOURCE_PATH}/include") +set(LDFLAGS "${VCPKG_LINKER_FLAGS}") +vcpkg_execute_required_process( + COMMAND ${SOURCE_PATH}/configure --prefix=${CURRENT_PACKAGES_DIR} ${OPTIONS} --with-sysroot=${CURRENT_INSTALLED_DIR} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME configure-${TARGET_TRIPLET}-rel +) +message(STATUS "Building ${TARGET_TRIPLET}-rel") +vcpkg_execute_required_process( + COMMAND make -j install "CFLAGS=${CFLAGS}" "LDFLAGS=${LDFLAGS}" + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME install-${TARGET_TRIPLET}-rel +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +configure_file(${SOURCE_PATH}/README.md ${CURRENT_PACKAGES_DIR}/share/numactl/copyright COPYONLY) diff --git a/vcpkg/ports/numcpp/portfile.cmake b/vcpkg/ports/numcpp/portfile.cmake new file mode 100644 index 0000000..d605b19 --- /dev/null +++ b/vcpkg/ports/numcpp/portfile.cmake @@ -0,0 +1,24 @@ +# header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dpilger26/NumCpp + REF fc68d897f8c2ae4f5b14baff3eefda897351abbd # 2.1.0 + SHA512 ce407d9782d304658853cd66ba5901a4dc84d8cf74d45b2dd466ca6328f6bf60b39906efd5373624df6b46c4253f861208b15254d0e156fdb09f32ca731ad2bc + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DNUMCPP_TEST=OFF + -DNUMCPP_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/NumCpp/cmake TARGET_PATH share/NumCpp) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/numcpp/vcpkg.json b/vcpkg/ports/numcpp/vcpkg.json new file mode 100644 index 0000000..dab0d3a --- /dev/null +++ b/vcpkg/ports/numcpp/vcpkg.json @@ -0,0 +1,25 @@ +{ + "name": "numcpp", + "version-string": "2.1.0", + "description": "C++ implementation of the Python Numpy library", + "homepage": "https://dpilger26.github.io/NumCpp", + "license": "MIT", + "dependencies": [ + "boost-algorithm", + "boost-endian", + "boost-integer", + "boost-math", + "boost-predef", + "boost-random", + "boost-type-traits" + ], + "features": { + "python": { + "description": "Interacting with python with pybind11 interface", + "dependencies": [ + "boost-python", + "pybind11" + ] + } + } +} diff --git a/vcpkg/ports/nuspell/CONTROL b/vcpkg/ports/nuspell/CONTROL new file mode 100644 index 0000000..0ca6240 --- /dev/null +++ b/vcpkg/ports/nuspell/CONTROL @@ -0,0 +1,7 @@ +Source: nuspell +Version: 3.1.1 +Description: Nuspell is a fast and safe spelling checker software program. + It is designed for languages with rich morphology and complex word compounding. + Nuspell is written in modern C++ and it supports Hunspell dictionaries. +Homepage: https://nuspell.github.io/ +Build-Depends: icu, boost-locale, boost-container, boost-range diff --git a/vcpkg/ports/nuspell/cmake-disable-cli-and-docs.patch b/vcpkg/ports/nuspell/cmake-disable-cli-and-docs.patch new file mode 100644 index 0000000..fd6f82f --- /dev/null +++ b/vcpkg/ports/nuspell/cmake-disable-cli-and-docs.patch @@ -0,0 +1,37 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a498118..161f0f3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -18,8 +18,6 @@ if (subproject) + return() + endif() + +-add_subdirectory(docs) +- + function(find_catch2_from_source) + set(Catch2_FOUND Catch2-NOTFOUND PARENT_SCOPE) + set(catch_cmake_lists ${PROJECT_SOURCE_DIR}/external/Catch2/CMakeLists.txt) +diff --git a/src/nuspell/CMakeLists.txt b/src/nuspell/CMakeLists.txt +index 22894f6..d58ad43 100644 +--- a/src/nuspell/CMakeLists.txt ++++ b/src/nuspell/CMakeLists.txt +@@ -23,13 +23,6 @@ target_include_directories(nuspell + target_link_libraries(nuspell + PUBLIC Boost::boost ICU::uc ICU::data) + +-add_executable(nuspell-bin main.cxx) +-set_target_properties(nuspell-bin PROPERTIES +- OUTPUT_NAME nuspell) +-target_compile_definitions(nuspell-bin PRIVATE +- PROJECT_VERSION=\"${PROJECT_VERSION}\") +-target_link_libraries(nuspell-bin nuspell Boost::locale) +- + if (NOT subproject) + install(TARGETS nuspell + EXPORT NuspellTargets +@@ -40,5 +33,4 @@ if (NOT subproject) + install(EXPORT NuspellTargets + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/nuspell + NAMESPACE Nuspell::) +- install(TARGETS nuspell-bin DESTINATION ${CMAKE_INSTALL_BINDIR}) + endif() diff --git a/vcpkg/ports/nuspell/portfile.cmake b/vcpkg/ports/nuspell/portfile.cmake new file mode 100644 index 0000000..a34c9cc --- /dev/null +++ b/vcpkg/ports/nuspell/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nuspell/nuspell + REF v3.1.1 + SHA512 239855051d9f49ba16913283090c4214a8f6a6cc290d359ab54014ff76fc297c131b67c6748bd1d4cdcec43c00dccc7f0c1bf8b07e06c9c648bff52ff193e096 + HEAD_REF master + + PATCHES cmake-disable-cli-and-docs.patch + # This patch disables building the CLI tool and leaves only the library. + # That is because Vcpkg complains when it finds .exe files in the folder + # "bin". Instead it expects them under "tools", which is different + # convention than on Unixes. This patch is quick fix, the CLI is not + # that important. +) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBUILD_TESTING=OFF +) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/nuspell) +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/lib/pkgconfig + ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) +file( + INSTALL ${SOURCE_PATH}/COPYING.LESSER + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright) diff --git a/vcpkg/ports/nvtt/001-define-value-for-HAVE_UNISTD_H-in-mac-os.patch b/vcpkg/ports/nvtt/001-define-value-for-HAVE_UNISTD_H-in-mac-os.patch new file mode 100644 index 0000000..366cff8 --- /dev/null +++ b/vcpkg/ports/nvtt/001-define-value-for-HAVE_UNISTD_H-in-mac-os.patch @@ -0,0 +1,16 @@ +diff --git a/src/nvconfig.h.in b/src/nvconfig.h.in +index 16da646..ada6be0 100644 +--- a/src/nvconfig.h.in ++++ b/src/nvconfig.h.in +@@ -1,7 +1,11 @@ + #ifndef NV_CONFIG + #define NV_CONFIG + ++#if NV_OS_DARWIN & !NV_OS_IOS ++#cmakedefine01 HAVE_UNISTD_H ++#else + #cmakedefine HAVE_UNISTD_H ++#endif + #cmakedefine HAVE_STDARG_H + #cmakedefine HAVE_SIGNAL_H + #cmakedefine HAVE_EXECINFO_H diff --git a/vcpkg/ports/nvtt/CONTROL b/vcpkg/ports/nvtt/CONTROL new file mode 100644 index 0000000..189ff6c --- /dev/null +++ b/vcpkg/ports/nvtt/CONTROL @@ -0,0 +1,3 @@ +Source: nvtt +Version: 2.1.1 +Description: Texture processing tools with support for Direct3D 10 and 11 formats. diff --git a/vcpkg/ports/nvtt/bc6h.patch b/vcpkg/ports/nvtt/bc6h.patch new file mode 100644 index 0000000..3e68ff5 --- /dev/null +++ b/vcpkg/ports/nvtt/bc6h.patch @@ -0,0 +1,14 @@ +diff --git a/src/bc6h/CMakeLists.txt b/src/bc6h/CMakeLists.txt +index 635e0f3a..f758df43 100644 +--- a/src/bc6h/CMakeLists.txt ++++ b/src/bc6h/CMakeLists.txt +@@ -20,3 +20,8 @@ IF(NOT WIN32) + SET_TARGET_PROPERTIES(bc6h PROPERTIES COMPILE_FLAGS -fPIC) + ENDIF(CMAKE_COMPILER_IS_GNUCXX) + ENDIF(NOT WIN32) ++ ++INSTALL(TARGETS bc6h ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib/static) +\ No newline at end of file diff --git a/vcpkg/ports/nvtt/bc7.patch b/vcpkg/ports/nvtt/bc7.patch new file mode 100644 index 0000000..c94fcef --- /dev/null +++ b/vcpkg/ports/nvtt/bc7.patch @@ -0,0 +1,14 @@ +diff --git a/src/bc7/CMakeLists.txt b/src/bc7/CMakeLists.txt +index 2eb01c06..0c36895b 100644 +--- a/src/bc7/CMakeLists.txt ++++ b/src/bc7/CMakeLists.txt +@@ -28,3 +28,8 @@ IF(NOT WIN32) + SET_TARGET_PROPERTIES(bc7 PROPERTIES COMPILE_FLAGS -fPIC) + ENDIF(CMAKE_COMPILER_IS_GNUCXX) + ENDIF(NOT WIN32) ++ ++INSTALL(TARGETS bc7 ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib/static) +\ No newline at end of file diff --git a/vcpkg/ports/nvtt/fix-build-error.patch b/vcpkg/ports/nvtt/fix-build-error.patch new file mode 100644 index 0000000..7ba1c19 --- /dev/null +++ b/vcpkg/ports/nvtt/fix-build-error.patch @@ -0,0 +1,39 @@ +diff --git a/extern/butteraugli/butteraugli.h b/extern/butteraugli/butteraugli.h +index 31824b8..c116a73 100644 +--- a/extern/butteraugli/butteraugli.h ++++ b/extern/butteraugli/butteraugli.h +@@ -134,7 +134,14 @@ bool ButteraugliAdaptiveQuantization(size_t xsize, size_t ysize, + // The conventional syntax uint8_t* const RESTRICT is more confusing - it is + // not immediately obvious that the pointee is non-const. + template ++#ifdef _MSC_VER ++// Due to MSVC bug: ++// https://developercommunity.visualstudio.com/content/problem/32196/msvc-cant-compile-a-templated-using-without-instan.html ++// , we cannot use __restrict now. Loss some performance instead of can't use this code. ++using ConstRestrict = T const; ++#else + using ConstRestrict = T const BUTTERAUGLI_RESTRICT; ++#endif + + // Functions that depend on the cache line size. + class CacheAligned { +diff --git a/src/nvthread/Atomic.h b/src/nvthread/Atomic.h +index 212b9cb..b8eaedb 100644 +--- a/src/nvthread/Atomic.h ++++ b/src/nvthread/Atomic.h +@@ -183,7 +183,6 @@ namespace nv { + + + #elif NV_CC_CLANG && (NV_OS_IOS || NV_OS_DARWIN) +- NV_COMPILER_CHECK(sizeof(uint32) == sizeof(long)); + + //ACS: Use Apple's atomics instead? I don't know if these are better in any way; there are non-barrier versions too. There's no OSAtomicSwap32 tho' + /* +@@ -254,7 +253,6 @@ namespace nv { + + + #elif NV_CC_CLANG && POSH_CPU_STRONGARM +- NV_COMPILER_CHECK(sizeof(uint32) == sizeof(long)); + + inline uint32 atomicIncrement(uint32 * value) + { diff --git a/vcpkg/ports/nvtt/portfile.cmake b/vcpkg/ports/nvtt/portfile.cmake new file mode 100644 index 0000000..bacdebb --- /dev/null +++ b/vcpkg/ports/nvtt/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO castano/nvidia-texture-tools + REF 2.1.1 + SHA512 3e6fef5977ca29daa7dc97afe11d61de57a8556c9caf30902db8c5c167d9c38f736bcb62eebdaaf7558299b39975bc269d41ab980c813b67dd1fc85064c853c9 + HEAD_REF master + PATCHES + 001-define-value-for-HAVE_UNISTD_H-in-mac-os.patch + bc6h.patch + bc7.patch + squish.patch + fix-build-error.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DNVTT_SHARED=0 + -DCMAKE_DEBUG_POSTFIX=_d # required by OSG +) + +vcpkg_install_cmake() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(REMOVE ${CURRENT_PACKAGES_DIR}/share/doc/nvtt/LICENSE) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/nvtt) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/nvtt/LICENSE ${CURRENT_PACKAGES_DIR}/share/nvtt/copyright) \ No newline at end of file diff --git a/vcpkg/ports/nvtt/squish.patch b/vcpkg/ports/nvtt/squish.patch new file mode 100644 index 0000000..36ce7be --- /dev/null +++ b/vcpkg/ports/nvtt/squish.patch @@ -0,0 +1,13 @@ +diff --git a/src/nvtt/squish/CMakeLists.txt b/src/nvtt/squish/CMakeLists.txt +index 832013e1..76824137 100644 +--- a/src/nvtt/squish/CMakeLists.txt ++++ b/src/nvtt/squish/CMakeLists.txt +@@ -33,3 +33,7 @@ IF(NOT WIN32) + ENDIF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX) + ENDIF(NOT WIN32) + ++INSTALL(TARGETS squish ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib/static) +\ No newline at end of file diff --git a/vcpkg/ports/oatpp-consul/CONTROL b/vcpkg/ports/oatpp-consul/CONTROL new file mode 100644 index 0000000..468f48f --- /dev/null +++ b/vcpkg/ports/oatpp-consul/CONTROL @@ -0,0 +1,5 @@ +Source: oatpp-consul +Version: 1.1.0 +Description: OAT++ Modern web framework consul module +Build-Depends: oatpp +Homepage: https://github.com/oatpp/oatpp-consul diff --git a/vcpkg/ports/oatpp-consul/portfile.cmake b/vcpkg/ports/oatpp-consul/portfile.cmake new file mode 100644 index 0000000..8c61812 --- /dev/null +++ b/vcpkg/ports/oatpp-consul/portfile.cmake @@ -0,0 +1,32 @@ +set(OATPP_VERSION "1.1.0") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp-consul + REF e8da386f8f21bc416329aa1f72507ba710ac8d94 # 1.1.0 + SHA512 69d159a8fb3887fdc0654598d14b3320d04bb91baff7113f7cf95394f28e29a3e78014c42d135825c17ecbaab456784b36983527161f8f694ee8b6f62aefee4e + HEAD_REF master +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "ON") +else() + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "OFF") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" + "-DCMAKE_CXX_FLAGS=-D_CRT_SECURE_NO_WARNINGS" + "-DBUILD_SHARED_LIBS:BOOL=${OATPP_BUILD_SHARED_LIBRARIES_OPTION}" +) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-consul-${OATPP_VERSION}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/oatpp-curl/CONTROL b/vcpkg/ports/oatpp-curl/CONTROL new file mode 100644 index 0000000..974c5e9 --- /dev/null +++ b/vcpkg/ports/oatpp-curl/CONTROL @@ -0,0 +1,5 @@ +Source: oatpp-curl +Version: 1.1.0 +Description: Oat++ Modern web framework curl module to use libcurl as a RequestExecutor on the oatpp's ApiClient +Build-Depends: curl,oatpp +Homepage: https://github.com/oatpp/oatpp-curl diff --git a/vcpkg/ports/oatpp-curl/curl-submodule-no-pkg-config-in-vcpkg.patch b/vcpkg/ports/oatpp-curl/curl-submodule-no-pkg-config-in-vcpkg.patch new file mode 100644 index 0000000..75fe7af --- /dev/null +++ b/vcpkg/ports/oatpp-curl/curl-submodule-no-pkg-config-in-vcpkg.patch @@ -0,0 +1,33 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 477064a..5da99e9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -95,8 +95,26 @@ message("## ${OATPP_THIS_MODULE_NAME} module. Resolving dependencies...\n") + ############################## + ## Find libcurl dependency + +-include(FindPkgConfig) +-pkg_check_modules(PKG_CURL REQUIRED libcurl) ++if (VCPKG_TOOLCHAIN) ++ find_package(CURL REQUIRED) ++ if (CMAKE_BUILD_TYPE MATCHES "^[Dd][Ee][Bb][Uu][Gg]$") ++ get_filename_component(PKG_CURL_LIBRARIES ${CURL_LIBRARY_DEBUG} NAME) ++ get_filename_component(PKG_CURL_LIBRARY_DIR ${CURL_LIBRARY_DEBUG} DIRECTORY) ++ else() ++ get_filename_component(PKG_CURL_LIBRARIES ${CURL_LIBRARY_RELEASE} NAME) ++ get_filename_component(PKG_CURL_LIBRARY_DIR ${CURL_LIBRARY_RELEASE} DIRECTORY) ++ endif() ++ if (PKG_CURL_LIBRARIES MATCHES [[^.*\.a$]]) ++ string(LENGTH ${PKG_CURL_LIBRARIES} _LEN) ++ math(EXPR _LEN "${_LEN} - 5") ++ string(SUBSTRING ${PKG_CURL_LIBRARIES} 3 ${_LEN} PKG_CURL_LIBRARIES) ++ endif() ++ set(PKG_CURL_VERSION ${CURL_VERSION}) ++ set(PKG_CURL_INCLUDE_DIRS ${CURL_INCLUDE_DIRS}) ++else() ++ include(FindPkgConfig) ++ pkg_check_modules(PKG_CURL REQUIRED libcurl) ++endif() + + message("[libcurl] libcurl found:") + message("[libcurl] LIBRARIES=${PKG_CURL_LIBRARIES}") diff --git a/vcpkg/ports/oatpp-curl/portfile.cmake b/vcpkg/ports/oatpp-curl/portfile.cmake new file mode 100644 index 0000000..d518719 --- /dev/null +++ b/vcpkg/ports/oatpp-curl/portfile.cmake @@ -0,0 +1,33 @@ +set(OATPP_VERSION "1.1.0") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp-curl + REF 7cf7a5acf7e79612598f38f4d7966ddbe498b846 # 1.1.0 + SHA512 77f02e53c4a2d28c689169b1d0aad9f8e7f28c03c31e0512624cd51a6f2ddd3f863a6a48631fc560311015108263bcd31d6e1a7e092e8c45595ea50b00d51df3 + HEAD_REF master + PATCHES "curl-submodule-no-pkg-config-in-vcpkg.patch" +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "ON") +else() + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "OFF") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" + "-DCMAKE_CXX_FLAGS=-D_CRT_SECURE_NO_WARNINGS" + "-DBUILD_SHARED_LIBS:BOOL=${OATPP_BUILD_SHARED_LIBRARIES_OPTION}" +) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-curl-${OATPP_VERSION}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/oatpp-libressl/CONTROL b/vcpkg/ports/oatpp-libressl/CONTROL new file mode 100644 index 0000000..fc95db3 --- /dev/null +++ b/vcpkg/ports/oatpp-libressl/CONTROL @@ -0,0 +1,5 @@ +Source: oatpp-libressl +Version: 1.1.0 +Build-Depends: libressl, oatpp +Description: Oat++ libressl module providing secure server and client connection providers +Homepage: https://github.com/oatpp/oatpp-libressl diff --git a/vcpkg/ports/oatpp-libressl/libress-submodule-downgrade-required-libressl-version.patch b/vcpkg/ports/oatpp-libressl/libress-submodule-downgrade-required-libressl-version.patch new file mode 100644 index 0000000..62644be --- /dev/null +++ b/vcpkg/ports/oatpp-libressl/libress-submodule-downgrade-required-libressl-version.patch @@ -0,0 +1,63 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4663a65..b91077a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -95,19 +95,25 @@ message("## ${OATPP_THIS_MODULE_NAME} module. Resolving dependencies...\n") + ############################## + ## Find Libressl dependency + +-include(FindPkgConfig) +-list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/module") +- +-find_package(LibreSSL 3.0.0 REQUIRED) +- +-message("LIBRESSL_INCLUDE_DIR=${LIBRESSL_INCLUDE_DIR}") +-message("LIBRESSL_TLS_LIBRARY=${LIBRESSL_TLS_LIBRARY}") +-message("LIBRESSL_SSL_LIBRARY=${LIBRESSL_SSL_LIBRARY}") +-message("LIBRESSL_CRYPTO_LIBRARY=${LIBRESSL_CRYPTO_LIBRARY}") +-message("LIBRESSL_LIBRARIES=${LIBRESSL_LIBRARIES}") +-message("LIBRESSL_VERSION=${LIBRESSL_VERSION}") +- +-message("\n############################################################################\n") ++find_file(LIBRESSL_INCLUDE_DIR tls.h) ++if (NOT LIBRESSL_INCLUDE_DIR) ++ find_file(_OPENSSL_SSL_INCLUDE_FILE openssl/ssl.h) ++ if (NOT _OPENSSL_SSL_INCLUDE_FILE) ++ message(FATAL_ERROR "LibreSSL and OpenSSL not found. LibreSSL must be installed.") ++ else() ++ message(FATAL_ERROR "OpenSSL installed instead of LibreSSL. oatpp-libressl requires LibreSSL.") ++ endif() ++endif() ++get_filename_component(LIBRESSL_INCLUDE_DIR ${LIBRESSL_INCLUDE_DIR} DIRECTORY) ++find_library(LIBRESSL_TLS_LIBRARY NAMES tls tls-21 tls-20 tls-19) ++find_library(LIBRESSL_SSL_LIBRARY NAMES ssl ssl-49 ssl-48 ssl-47) ++find_library(LIBRESSL_CRYPTO_LIBRARY NAMES crypto crypto-47 crypto-46 crypto-45) ++find_library(LIBRESSL_LIBRARIES "${LIBRESSL_CRYPTO_LIBRARY};${LIBRESSL_SSL_LIBRARY};${LIBRESSL_TLS_LIBRARY}") ++message(STATUS "LIBRESSL_INCLUDE_DIR=${LIBRESSL_INCLUDE_DIR}") ++message(STATUS "LIBRESSL_TLS_LIBRARY=${LIBRESSL_TLS_LIBRARY}") ++message(STATUS "LIBRESSL_SSL_LIBRARY=${LIBRESSL_SSL_LIBRARY}") ++message(STATUS "LIBRESSL_CRYPTO_LIBRARY=${LIBRESSL_CRYPTO_LIBRARY}") ++message(STATUS "LIBRESSL_LIBRARIES=${LIBRESSL_LIBRARIES}") + + ################################################################################################### + ## define targets +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index ace3b13..489fbb1 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -30,10 +30,12 @@ target_include_directories(${OATPP_THIS_MODULE_NAME} + PUBLIC $ + ) + ++target_include_directories(${OATPP_THIS_MODULE_NAME} ++ SYSTEM PRIVATE "${LIBRESSL_INCLUDE_DIR}" ++) ++ + target_link_libraries(${OATPP_THIS_MODULE_NAME} +- PUBLIC LibreSSL::TLS +- PUBLIC LibreSSL::SSL +- PUBLIC LibreSSL::Crypto ++ PUBLIC "${LIBRESSL_TLS_LIBRARY}" "${LIBRESSL_SSL_LIBRARY}" "${LIBRESSL_CRYPTO_LIBRARY}" + ) + + ####################################################################################################### diff --git a/vcpkg/ports/oatpp-libressl/portfile.cmake b/vcpkg/ports/oatpp-libressl/portfile.cmake new file mode 100644 index 0000000..f453507 --- /dev/null +++ b/vcpkg/ports/oatpp-libressl/portfile.cmake @@ -0,0 +1,36 @@ +set(OATPP_VERSION "1.1.0") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +# get the source +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp-libressl + REF 8a7f0f4449b9dbf63fb60fb892bd16a2f5fb0fab # 1.1.0 + SHA512 f6400e3d3976de1ab0d220f4c7bd84cbeafa6263671511a7ac113f855ad6a63470cab0571320d37ccd55a768ef9f3ca61adfa9066aadfd61bd00f5020c90777c + HEAD_REF master + PATCHES "libress-submodule-downgrade-required-libressl-version.patch" +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "ON") +else() + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "OFF") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" + "-DCMAKE_CXX_FLAGS=-D_CRT_SECURE_NO_WARNINGS" + "-DLIBRESSL_ROOT_DIR=${CURRENT_INSTALLED_DIR}" + "-DBUILD_SHARED_LIBS:BOOL=${OATPP_BUILD_SHARED_LIBRARIES_OPTION}" +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-libressl-${OATPP_VERSION}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/oatpp-mbedtls/CONTROL b/vcpkg/ports/oatpp-mbedtls/CONTROL new file mode 100644 index 0000000..e1bacf1 --- /dev/null +++ b/vcpkg/ports/oatpp-mbedtls/CONTROL @@ -0,0 +1,5 @@ +Source: oatpp-mbedtls +Version: 1.1.0 +Build-Depends: mbedtls, oatpp +Description: Oat++ Mbed TLS submodule providing secure server and client connection providers +Homepage: https://github.com/oatpp/oatpp-mbedtls diff --git a/vcpkg/ports/oatpp-mbedtls/find-mbedtls.patch b/vcpkg/ports/oatpp-mbedtls/find-mbedtls.patch new file mode 100644 index 0000000..533fd26 --- /dev/null +++ b/vcpkg/ports/oatpp-mbedtls/find-mbedtls.patch @@ -0,0 +1,135 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6b1e8c0f2..b0ef5518d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -97,7 +97,7 @@ message("## ${OATPP_THIS_MODULE_NAME} module. Resolving dependencies...\n") + include(FindPkgConfig) + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/module") + +-find_package(mbedtls 2.16.0 REQUIRED) ++find_package(mbedtls 2.16.3 REQUIRED) + + message("MBEDTLS_INCLUDE_DIR=${MBEDTLS_INCLUDE_DIR}") + message("MBEDTLS_TLS_LIBRARY=${MBEDTLS_TLS_LIBRARY}") +diff --git a/cmake/module/Findmbedtls.cmake b/cmake/module/Findmbedtls.cmake +index 8c76d0a73..5c223a615 100644 +--- a/cmake/module/Findmbedtls.cmake ++++ b/cmake/module/Findmbedtls.cmake +@@ -14,10 +14,10 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +-FindmbedTLS ++Findmbedtls + ------------ + +-Find the mbedTLS encryption library. ++Find the mbedtls encryption library. + + Optional Components + ^^^^^^^^^^^^^^^^^^^ +@@ -31,16 +31,16 @@ Imported Targets + This module defines the following imported targets: + + mbedtls::Crypto +- The mbedTLS crypto library, if found. ++ The mbedtls crypto library, if found. + + mbedtls::X509 +- The mbedTLS x509 library, if found. ++ The mbedtls x509 library, if found. + + mbedtls::SSL +- The mbedTLS ssl library, if found. Requires and includes mbedtls::Crypto automatically. ++ The mbedtls ssl library, if found. Requires and includes mbedtls::Crypto automatically. + + mbedtls::TLS +- The mbedTLS tls library, if found. Requires and includes mbedtls::SSL and mbedtls::Crypto automatically. ++ The mbedtls tls library, if found. Requires and includes mbedtls::SSL and mbedtls::Crypto automatically. + + Result Variables + ^^^^^^^^^^^^^^^^ +@@ -48,26 +48,26 @@ Result Variables + This module will set the following variables in your project: + + MBEDTLS_FOUND +- System has the mbedTLS library. If no components are requested it only requires the crypto library. ++ System has the mbedtls library. If no components are requested it only requires the crypto library. + MBEDTLS_INCLUDE_DIR +- The mbedTLS include directory. ++ The mbedtls include directory. + MBEDTLS_X509_LIBRARY +- The mbedTLS crypto library. ++ The mbedtls crypto library. + MBEDTLS_CRYPTO_LIBRARY +- The mbedTLS crypto library. ++ The mbedtls crypto library. + MBEDTLS_SSL_LIBRARY +- The mbedTLS SSL library. ++ The mbedtls SSL library. + MBEDTLS_TLS_LIBRARY +- The mbedTLS TLS library. ++ The mbedtls TLS library. + MBEDTLS_LIBRARIES +- All mbedTLS libraries. ++ All mbedtls libraries. + MBEDTLS_VERSION + This is set to $major.$minor.$revision (e.g. 2.6.8). + + Hints + ^^^^^ + +-Set MBEDTLS_ROOT_DIR to the root directory of an mbedTLS installation. ++Set MBEDTLS_ROOT_DIR to the root directory of an mbedtls installation. + + ]=======================================================================] + +@@ -175,7 +175,7 @@ if(MBEDTLS_INCLUDE_DIR AND EXISTS "${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h") + endif() + + # Set Find Package Arguments +-find_package_handle_standard_args(mbedTLS ++find_package_handle_standard_args(mbedtls + REQUIRED_VARS + MBEDTLS_X509_LIBRARY + MBEDTLS_TLS_LIBRARY +@@ -185,12 +185,12 @@ find_package_handle_standard_args(mbedTLS + MBEDTLS_VERSION + HANDLE_COMPONENTS + FAIL_MESSAGE +- "Could NOT find mbedTLS, try setting the path to mbedTLS using the MBEDTLS_ROOT_DIR environment variable" ++ "Could NOT find mbedtls, try setting the path to mbedtls using the MBEDTLS_ROOT_DIR environment variable" + ) + +-# mbedTLS Found +-if(MBEDTLS_FOUND) +- ++# mbedtls Found ++if(mbedtls_FOUND) ++ set(MBEDTLS_FOUND ${mbedtls_FOUND}) + # Set mbedtls::Crypto + if(NOT TARGET mbedtls::Crypto AND EXISTS "${MBEDTLS_CRYPTO_LIBRARY}") + +@@ -257,4 +257,4 @@ if(MBEDTLS_FOUND) + + endif() # mbedtls::TLS + +-endif(MBEDTLS_FOUND) ++endif(mbedtls_FOUND) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 6811f05ea..d80430c3e 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -31,9 +31,9 @@ target_include_directories(${OATPP_THIS_MODULE_NAME} + ) + + target_link_libraries(${OATPP_THIS_MODULE_NAME} +- PRIVATE mbedtls::TLS +- PRIVATE mbedtls::X509 +- PRIVATE mbedtls::Crypto ++ PRIVATE ${MBEDTLS_TLS_LIBRARY} ++ PRIVATE ${MBEDTLS_X509_LIBRARY} ++ PRIVATE ${MBEDTLS_CRYPTO_LIBRARY} + ) + + if(${OATPP_MBEDTLS_DEBUG} GREATER 0) diff --git a/vcpkg/ports/oatpp-mbedtls/portfile.cmake b/vcpkg/ports/oatpp-mbedtls/portfile.cmake new file mode 100644 index 0000000..82eea23 --- /dev/null +++ b/vcpkg/ports/oatpp-mbedtls/portfile.cmake @@ -0,0 +1,32 @@ +set(OATPP_VERSION "1.1.0") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp-mbedtls + REF 847b9562ddcd40f1d2b340177028b3519fb1f58a # 1.1.0 + SHA512 70559a33fb7a827714c353b158af8ef90fc5cd792e7f59bcf833ebd203874370e6f8f5b7a531497ea44d406cc515c42bfbef8d4f98e5e8074a141ba2ba78890b + HEAD_REF master + PATCHES find-mbedtls.patch +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "ON") +else() + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "OFF") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" + "-DBUILD_SHARED_LIBS:BOOL=${OATPP_BUILD_SHARED_LIBRARIES_OPTION}" +) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-mbedtls-${OATPP_VERSION}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/oatpp-swagger/CONTROL b/vcpkg/ports/oatpp-swagger/CONTROL new file mode 100644 index 0000000..d45a5e7 --- /dev/null +++ b/vcpkg/ports/oatpp-swagger/CONTROL @@ -0,0 +1,5 @@ +Source: oatpp-swagger +Version: 1.1.0 +Description: Oat++ OpenApi (Swagger) UI submodule +Build-Depends: oatpp +Homepage: https://github.com/oatpp/oatpp-swagger diff --git a/vcpkg/ports/oatpp-swagger/portfile.cmake b/vcpkg/ports/oatpp-swagger/portfile.cmake new file mode 100644 index 0000000..c8773b6 --- /dev/null +++ b/vcpkg/ports/oatpp-swagger/portfile.cmake @@ -0,0 +1,33 @@ +set(OATPP_VERSION "1.1.0") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp-swagger + REF 7aa5ecb07bfbf9931aa7906247d8c8f59f35a4b4 # 1.1.0 + SHA512 df1f61e69ad2a7a533bc2b2a78342edb6954ba77980cf941d22f09e86d2fe85073863061aec44ccd80f15b8ea70d5fc70024c806f85cddc6790331ee718ad8bc + HEAD_REF master +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "ON") +else() + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "OFF") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" + "-DCMAKE_CXX_FLAGS=-D_CRT_SECURE_NO_WARNINGS" + "-DBUILD_SHARED_LIBS:BOOL=${OATPP_BUILD_SHARED_LIBRARIES_OPTION}" +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-swagger-${OATPP_VERSION}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/oatpp-websocket/CONTROL b/vcpkg/ports/oatpp-websocket/CONTROL new file mode 100644 index 0000000..cf6ca6c --- /dev/null +++ b/vcpkg/ports/oatpp-websocket/CONTROL @@ -0,0 +1,5 @@ +Source: oatpp-websocket +Version: 1.1.0 +Description: Oat++ websocket module +Build-Depends: oatpp +Homepage: https://github.com/oatpp/oatpp-websocket diff --git a/vcpkg/ports/oatpp-websocket/portfile.cmake b/vcpkg/ports/oatpp-websocket/portfile.cmake new file mode 100644 index 0000000..5118152 --- /dev/null +++ b/vcpkg/ports/oatpp-websocket/portfile.cmake @@ -0,0 +1,32 @@ +set(OATPP_VERSION "1.1.0") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp-websocket + REF 41a0480fdd4cf8a076c9fbd79959be1156ecb204 # 1.1.0 + SHA512 7237e6d94ebc4873ee9a3350b01f2a841f419dc8fbc917a51aebd2dcd89927e1a58816dc83040bb7da1cee36d81aba6cf17833c58831c8693fd1454021610908 + HEAD_REF master +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "ON") +else() + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "OFF") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" + "-DBUILD_SHARED_LIBS:BOOL=${OATPP_BUILD_SHARED_LIBRARIES_OPTION}" +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-websocket-${OATPP_VERSION}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/oatpp/CONTROL b/vcpkg/ports/oatpp/CONTROL new file mode 100644 index 0000000..7b100d4 --- /dev/null +++ b/vcpkg/ports/oatpp/CONTROL @@ -0,0 +1,4 @@ +Source: oatpp +Version: 1.1.0 +Description: Modern web framework +Homepage: https://github.com/oatpp/oatpp diff --git a/vcpkg/ports/oatpp/portfile.cmake b/vcpkg/ports/oatpp/portfile.cmake new file mode 100644 index 0000000..4b87019 --- /dev/null +++ b/vcpkg/ports/oatpp/portfile.cmake @@ -0,0 +1,33 @@ +set(OATPP_VERSION "1.1.0") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oatpp/oatpp + REF 4427123bb3608a78806ebce654cfe74605a389bf # 1.0.0 + SHA512 91f3b66d573b918836bb2190fbaa5579da0f5b93b4905ed44ec63db2e947c64fa1be00f14f4ce85ff1103ab59f79506abf6dfbfe7edf7176f2365613e7aef825 + HEAD_REF master +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "ON") +else() + set(OATPP_BUILD_SHARED_LIBRARIES_OPTION "OFF") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + "-DOATPP_BUILD_TESTS:BOOL=OFF" + "-DCMAKE_CXX_FLAGS=-D_CRT_SECURE_NO_WARNINGS" + "-DBUILD_SHARED_LIBS:BOOL=${OATPP_BUILD_SHARED_LIBRARIES_OPTION}" +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/oatpp-${OATPP_VERSION}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/observer-ptr-lite/CONTROL b/vcpkg/ports/observer-ptr-lite/CONTROL new file mode 100644 index 0000000..547e642 --- /dev/null +++ b/vcpkg/ports/observer-ptr-lite/CONTROL @@ -0,0 +1,3 @@ +Source: observer-ptr-lite +Version: 0.4.0 +Description: A C++17-like observer_ptr for C++98 and later in a single-file header-only library diff --git a/vcpkg/ports/observer-ptr-lite/portfile.cmake b/vcpkg/ports/observer-ptr-lite/portfile.cmake new file mode 100644 index 0000000..4fea768 --- /dev/null +++ b/vcpkg/ports/observer-ptr-lite/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO martinmoene/observer-ptr-lite + REF v0.4.0 + SHA512 4e53d8e0ce595604880bda423440071e7c207dd63e7b6bfa09cc7a870a010f09c51c31e640142c565ce261c4911acab13c6e9f5970853ad8fc2da3e4034ab7d7 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DNSOP_OPT_BUILD_TESTS=OFF + -DNSOP_OPT_BUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets( + CONFIG_PATH lib/cmake/${PORT} +) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/lib +) + +file(INSTALL + ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright +) diff --git a/vcpkg/ports/ocilib/CONTROL b/vcpkg/ports/ocilib/CONTROL new file mode 100644 index 0000000..a4d44f4 --- /dev/null +++ b/vcpkg/ports/ocilib/CONTROL @@ -0,0 +1,6 @@ +Source: ocilib +Version: 4.6.4 +Port-Version: 2 +Homepage: https://vrogier.github.io/ocilib/ +Description: OCILIB is an open source and cross platform Oracle Driver that delivers efficient access to Oracle databases. +Supports: !(arm|uwp) \ No newline at end of file diff --git a/vcpkg/ports/ocilib/out_of_source_build_version_file_configure.patch b/vcpkg/ports/ocilib/out_of_source_build_version_file_configure.patch new file mode 100644 index 0000000..0359e23 --- /dev/null +++ b/vcpkg/ports/ocilib/out_of_source_build_version_file_configure.patch @@ -0,0 +1,13 @@ +diff --git a/configure b/configure +index 6a87f9c..89ca6db 100755 +--- a/configure ++++ b/configure +@@ -12628,7 +12628,7 @@ $as_echo "$OCILIB_PREFIX" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OCILIB version" >&5 + $as_echo_n "checking for OCILIB version... " >&6; } + +- OCILIB_VER=`cat VERSION` ++ OCILIB_VER=`cat ${srcdir}/VERSION` + + LT_MAJOR=`echo $OCILIB_VER | sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` + LT_AGE=`echo $OCILIB_VER | sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` diff --git a/vcpkg/ports/ocilib/portfile.cmake b/vcpkg/ports/ocilib/portfile.cmake new file mode 100644 index 0000000..a8a451f --- /dev/null +++ b/vcpkg/ports/ocilib/portfile.cmake @@ -0,0 +1,64 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO vrogier/ocilib + REF v4.6.4 + SHA512 83f5614a23c8fb4ab02517dec95d8b490c5ef472302735d5cc4cf483cc51513cc81ae2e1b4618c7c73fb5b071efe422e463b46fa79492ccb4775b511a943295a + HEAD_REF master + PATCHES + out_of_source_build_version_file_configure.patch +) + +if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_PLATFORM_TOOLSET MATCHES "v142") + set(SOLUTION_TYPE vs2019) + set(OCILIB_ARCH_X86 x86) + set(OCILIB_ARCH_X64 x64) + elseif(VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(SOLUTION_TYPE vs2017) + set(OCILIB_ARCH_X86 Win32) + set(OCILIB_ARCH_X64 Win64) + else() + set(SOLUTION_TYPE vs2015) + set(OCILIB_ARCH_X86 Win32) + set(OCILIB_ARCH_X64 Win64) + endif() + + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(PLATFORM ${OCILIB_ARCH_X86}) + else() + set(PLATFORM ${OCILIB_ARCH_X64}) + endif() + + # There is no debug configuration + # As it is a C library, build the release configuration and copy its output to the debug folder + set(VCPKG_BUILD_TYPE release) + vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH proj/dll/ocilib_dll_${SOLUTION_TYPE}.sln + INCLUDES_SUBPATH include + LICENSE_SUBPATH LICENSE + RELEASE_CONFIGURATION "Release - ANSI" + PLATFORM ${PLATFORM} + USE_VCPKG_INTEGRATION + ALLOW_ROOT_INCLUDES) + + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug) + file(COPY ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug) +else() + vcpkg_configure_make( + COPY_SOURCE + AUTOCONFIG + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + --with-oracle-import=runtime + ) + + vcpkg_install_make() + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + file(RENAME ${CURRENT_PACKAGES_DIR}/share/doc/${PORT} ${CURRENT_PACKAGES_DIR}/share/${PORT}) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) + file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +endif() diff --git a/vcpkg/ports/octomap/001-fix-exported-targets.patch b/vcpkg/ports/octomap/001-fix-exported-targets.patch new file mode 100644 index 0000000..c2b8e04 --- /dev/null +++ b/vcpkg/ports/octomap/001-fix-exported-targets.patch @@ -0,0 +1,78 @@ +diff --git a/octomap/src/CMakeLists.txt b/octomap/src/CMakeLists.txt +index 45b384f..ab1b6b1 100644 +--- a/octomap/src/CMakeLists.txt ++++ b/octomap/src/CMakeLists.txt +@@ -8,17 +8,16 @@ SET (octomap_SRCS + OcTreeNode.cpp + OcTreeStamped.cpp + ColorOcTree.cpp +- ) ++) ++ + +-# dynamic and static libs, see CMake FAQ: +-ADD_LIBRARY( octomap SHARED ${octomap_SRCS}) +-set_target_properties( octomap PROPERTIES ++ADD_LIBRARY(octomap ${octomap_SRCS}) ++set_target_properties(octomap PROPERTIES + VERSION ${OCTOMAP_VERSION} + SOVERSION ${OCTOMAP_SOVERSION} ++ OUTPUT_NAME "octomap" + ) +-ADD_LIBRARY( octomap-static STATIC ${octomap_SRCS}) +-SET_TARGET_PROPERTIES(octomap-static PROPERTIES OUTPUT_NAME "octomap") +-add_dependencies(octomap-static octomath-static) ++ + + TARGET_LINK_LIBRARIES(octomap octomath) + +@@ -26,7 +25,7 @@ if(NOT EXISTS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") + file(MAKE_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") + endif() + +-export(TARGETS octomap octomap-static ++export(TARGETS octomap + APPEND FILE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-targets.cmake") + + ADD_SUBDIRECTORY( testing ) +@@ -67,7 +66,7 @@ TARGET_LINK_LIBRARIES(intersection_example octomap) + ADD_EXECUTABLE(octree2pointcloud octree2pointcloud.cpp) + TARGET_LINK_LIBRARIES(octree2pointcloud octomap) + +-install(TARGETS octomap octomap-static ++install(TARGETS octomap + EXPORT octomap-targets + INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + ${INSTALL_TARGETS_DEFAULT_ARGS} +diff --git a/octomap/src/math/CMakeLists.txt b/octomap/src/math/CMakeLists.txt +index 3b47ec4..6a75170 100644 +--- a/octomap/src/math/CMakeLists.txt ++++ b/octomap/src/math/CMakeLists.txt +@@ -5,24 +5,22 @@ SET (octomath_SRCS + ) + + +-ADD_LIBRARY( octomath SHARED ${octomath_SRCS}) ++ADD_LIBRARY(octomath ${octomath_SRCS}) + + SET_TARGET_PROPERTIES( octomath PROPERTIES + VERSION ${OCTOMAP_VERSION} + SOVERSION ${OCTOMAP_SOVERSION} + ) + +-ADD_LIBRARY( octomath-static STATIC ${octomath_SRCS}) +-SET_TARGET_PROPERTIES(octomath-static PROPERTIES OUTPUT_NAME "octomath") + + if(NOT EXISTS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") + file(MAKE_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap") + endif() + +-export(TARGETS octomath octomath-static ++export(TARGETS octomath + APPEND FILE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/cmake/octomap/octomap-targets.cmake") + +-install(TARGETS octomath octomath-static ++install(TARGETS octomath + EXPORT octomap-targets + INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + ${INSTALL_TARGETS_DEFAULT_ARGS} diff --git a/vcpkg/ports/octomap/CONTROL b/vcpkg/ports/octomap/CONTROL new file mode 100644 index 0000000..1607f51 --- /dev/null +++ b/vcpkg/ports/octomap/CONTROL @@ -0,0 +1,4 @@ +Source: octomap +Version: 1.9.5 +Homepage: https://octomap.github.io/ +Description: An Efficient Probabilistic 3D Mapping Framework Based on Octrees diff --git a/vcpkg/ports/octomap/portfile.cmake b/vcpkg/ports/octomap/portfile.cmake new file mode 100644 index 0000000..1708296 --- /dev/null +++ b/vcpkg/ports/octomap/portfile.cmake @@ -0,0 +1,44 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OctoMap/octomap + REF v1.9.5 + SHA512 e58c6d33c351b14e9596e18a8702715d167c136fd029b1078ddd13a5926fe451d3b619231b5a8ccfb64b6e5fc6db8b57e6ef329099828d2f5195c0988700b581 + HEAD_REF master + PATCHES + "001-fix-exported-targets.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DBUILD_TESTING=OFF + -DBUILD_OCTOVIS_SUBPROJECT=OFF + -DBUILD_DYNAMICETD3D_SUBPROJECT=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_tools( + TOOL_NAMES binvox2bt bt2vrml compare_octrees convert_octree edit_octree eval_octree_accuracy graph2tree log2graph + AUTO_CLEAN) + +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/octomap") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/octomap/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/octomap/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/octomap/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..2dd237e --- /dev/null +++ b/vcpkg/ports/octomap/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,15 @@ +_find_package(${ARGS}) + +if(TARGET octomap AND NOT TARGET octomap-static) + add_library(octomap-static INTERFACE IMPORTED) + set_target_properties(octomap-static PROPERTIES INTERFACE_LINK_LIBRARIES "octomap") + + add_library(octomath-static INTERFACE IMPORTED) + set_target_properties(octomath-static PROPERTIES INTERFACE_LINK_LIBRARIES "octomath") +elseif(TARGET octomap-static AND NOT TARGET octomap) + add_library(octomap INTERFACE IMPORTED) + set_target_properties(octomap PROPERTIES INTERFACE_LINK_LIBRARIES "octomap-static") + + add_library(octomath INTERFACE IMPORTED) + set_target_properties(octomath PROPERTIES INTERFACE_LINK_LIBRARIES "octomath-static") +endif() diff --git a/vcpkg/ports/ode/CONTROL b/vcpkg/ports/ode/CONTROL new file mode 100644 index 0000000..4c01578 --- /dev/null +++ b/vcpkg/ports/ode/CONTROL @@ -0,0 +1,4 @@ +Source: ode +Version: 0.16.1 +Homepage: https://bitbucket.org/odedevs/ode/src/default/ +Description: Open Dynamics Engine diff --git a/vcpkg/ports/ode/portfile.cmake b/vcpkg/ports/ode/portfile.cmake new file mode 100644 index 0000000..cb10fc9 --- /dev/null +++ b/vcpkg/ports/ode/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_from_bitbucket( + OUT_SOURCE_PATH SOURCE_PATH + REPO odedevs/ode + REF 0.16.1 + SHA512 04429cae1b8fc703e53880c5de78293cee46fe4855c96ca7006bd5848255a0df004b75716a6b30ff5176df004e2bec29b2a31d4af8e7ac59da18f0af2eed8396 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DODE_WITH_DEMOS=0 -DODE_WITH_TESTS=0 +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/ode-0.16.1) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) diff --git a/vcpkg/ports/offscale-libetcd-cpp/CONTROL b/vcpkg/ports/offscale-libetcd-cpp/CONTROL new file mode 100644 index 0000000..e164c92 --- /dev/null +++ b/vcpkg/ports/offscale-libetcd-cpp/CONTROL @@ -0,0 +1,5 @@ +Source: offscale-libetcd-cpp +Version: 2019-07-10-1 +Homepage: https://github.com/offscale/libetcd-cpp +Description: A C++ client library for etcd. etcd is a distributed, reliable key-value store. +Build-Depends: grpc, protobuf diff --git a/vcpkg/ports/offscale-libetcd-cpp/fix-dependency-grpc.patch b/vcpkg/ports/offscale-libetcd-cpp/fix-dependency-grpc.patch new file mode 100644 index 0000000..6527203 --- /dev/null +++ b/vcpkg/ports/offscale-libetcd-cpp/fix-dependency-grpc.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0d9aad9..d68c5f7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -70,7 +70,7 @@ endif() + target_include_directories(etcdcpp PRIVATE "generated/") + target_include_directories(etcdcpp INTERFACE "${CMAKE_INSTALL_PREFIX}/include") + +-target_link_libraries(etcdcpp PRIVATE gRPC::gpr gRPC::grpc gRPC::grpc++ gRPC::grpc_cronet) ++target_link_libraries(etcdcpp PRIVATE gRPC::gpr gRPC::grpc gRPC::grpc++ gRPC::grpc++_alts) + target_link_libraries(etcdcpp PRIVATE protobuf::libprotoc protobuf::libprotobuf) + + install(TARGETS etcdcpp EXPORT etcdcpp DESTINATION lib) diff --git a/vcpkg/ports/offscale-libetcd-cpp/portfile.cmake b/vcpkg/ports/offscale-libetcd-cpp/portfile.cmake new file mode 100644 index 0000000..e6857aa --- /dev/null +++ b/vcpkg/ports/offscale-libetcd-cpp/portfile.cmake @@ -0,0 +1,18 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO offscale/libetcd-cpp + REF 8607d8d7080c6eb447bc41b799a24bfdb87cf638 + SHA512 9bf4bf14fd52f4f6bbf8cf68de61e6a19eeffbdc501f05c8f614b5f13f206410884afd7fe226a077448e58e02990c65a6b27ee895ed34ba5ee701abe0500b875 + HEAD_REF master + PATCHES fix-dependency-grpc.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE-MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/ogdf/CONTROL b/vcpkg/ports/ogdf/CONTROL new file mode 100644 index 0000000..f7f7909 --- /dev/null +++ b/vcpkg/ports/ogdf/CONTROL @@ -0,0 +1,5 @@ +Source: ogdf +Version: 2019-08-23 +Port-Version: 1 +Homepage: https://github.com/ogdf/ogdf +Description: Open Graph Drawing Framework diff --git a/vcpkg/ports/ogdf/fix-c4723.patch b/vcpkg/ports/ogdf/fix-c4723.patch new file mode 100644 index 0000000..14401c7 --- /dev/null +++ b/vcpkg/ports/ogdf/fix-c4723.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/compiler-specifics.cmake b/cmake/compiler-specifics.cmake +index 2446f32..45b00ac 100644 +--- a/cmake/compiler-specifics.cmake ++++ b/cmake/compiler-specifics.cmake +@@ -40,7 +40,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") + set(available_default_warning_flags_release "${available_default_warning_flags_release} -Wno-error=unused-variable") + set(warnings_as_errors_flag "-Werror") + elseif(MSVC) +- set(available_default_warning_flags "/W3 /wd4018 /wd4068 /wd4101 /wd4244 /wd4250 /wd4267 /wd4373 /wd4800 /wd4996") ++ set(available_default_warning_flags "/W3 /wd4018 /wd4068 /wd4101 /wd4244 /wd4250 /wd4267 /wd4373 /wd4800 /wd4996 /wd4723") + # this has to be explained because MSVC is so cryptic: + # /W3 sets the warning level of MSVC to 3 (all warnings except informational warnings), + # /wd disables the warning with the specific code, diff --git a/vcpkg/ports/ogdf/portfile.cmake b/vcpkg/ports/ogdf/portfile.cmake new file mode 100644 index 0000000..4595169 --- /dev/null +++ b/vcpkg/ports/ogdf/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ogdf/ogdf + REF 8a103cf3a7dfff87fe8b7534575604bc53c0870c + SHA512 264e8586be7a18640f253eb7b289dd99f1f2fc42c4d2304ab12f7c6aa9c5754b710642e7296038aea0cd9368d732d0106501fefed800743b403adafff7e3f0b2 + HEAD_REF master + PATCHES fix-c4723.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCOIN_INSTALL_LIBRARY_DIR:STRING=lib + -DCOIN_INSTALL_CMAKE_DIR:STRING=lib/cmake/OGDF + -DOGDF_INSTALL_LIBRARY_DIR:STRING=lib + -DOGDF_INSTALL_CMAKE_DIR:STRING=lib/cmake/OGDF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/OGDF) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/minisat/doc ${CURRENT_PACKAGES_DIR}/include/ogdf/lib/minisat/doc) diff --git a/vcpkg/ports/ogre-next/CONTROL b/vcpkg/ports/ogre-next/CONTROL new file mode 100644 index 0000000..f2ebbdd --- /dev/null +++ b/vcpkg/ports/ogre-next/CONTROL @@ -0,0 +1,18 @@ +Source: ogre-next +Version: 2019-10-20-1 +Build-Depends: zlib, freeimage, freetype, rapidjson, openvr, boost-thread, boost-date-time, poco, tbb, sdl2, tinyxml, zziplib +Homepage: https://github.com/OGRECave/ogre-next +Description: Ogre 2.1 & 2.2 - scene-oriented, flexible 3D engine written in C++ + +Feature: d3d9 +Description: Build Direct3D9 RenderSystem + +Feature: csharp +Description: Build csharp bindings + +Feature: java +Description: Build Java (JNI) bindings + +Feature: python +Description: Build Python bindings +Build-Depends: python3 diff --git a/vcpkg/ports/ogre-next/environment-overrides.cmake b/vcpkg/ports/ogre-next/environment-overrides.cmake new file mode 100644 index 0000000..4957cdc --- /dev/null +++ b/vcpkg/ports/ogre-next/environment-overrides.cmake @@ -0,0 +1,16 @@ +#[[ + +Building steps for ogre-next[d3d9]: + +1. Download and install "Microsoft DirectX SDK" +https://www.microsoft.com/en-us/download/confirmation.aspx?id=6812 + +2. Set env variable +set DXSDK_DIR=C:/Program Files (x86)/Microsoft DirectX SDK (June 2010) + +3. Install port +.\vcpkg.exe install ogre-next[d3d9] --triplet x64-windows + +]] + +set(VCPKG_ENV_PASSTHROUGH DXSDK_DIR) diff --git a/vcpkg/ports/ogre-next/fix_find_package_sdl2.patch b/vcpkg/ports/ogre-next/fix_find_package_sdl2.patch new file mode 100644 index 0000000..aa72be6 --- /dev/null +++ b/vcpkg/ports/ogre-next/fix_find_package_sdl2.patch @@ -0,0 +1,18 @@ +diff --git a/CMake/Dependencies.cmake b/CMake/Dependencies.cmake +index 4b67ed8cb..7da194820 100644 +--- a/CMake/Dependencies.cmake ++++ b/CMake/Dependencies.cmake +@@ -292,11 +292,11 @@ macro_log_feature(PYTHONLIBS_FOUND "Python" "Language bindings to use OGRE from + # Find sdl2 + if(NOT ANDROID AND NOT EMSCRIPTEN) + # find script does not work in cross compilation environment +- find_package(SDL2) ++ find_package(SDL2 CONFIG) + macro_log_feature(SDL2_FOUND "SDL2" "Simple DirectMedia Library needed for input handling in samples" "https://www.libsdl.org/" FALSE "" "") + if(SDL2_FOUND AND WIN32 AND NOT SDL2_BINARY) + # fix linking static SDL2 on windows +- set(SDL2_LIBRARY ${SDL2_LIBRARY} winmm.lib imm32.lib version.lib) ++ set(SDL2_LIBRARY SDL2::SDL2 winmm.lib imm32.lib version.lib) + endif() + endif() + diff --git a/vcpkg/ports/ogre-next/portfile.cmake b/vcpkg/ports/ogre-next/portfile.cmake new file mode 100644 index 0000000..02f147a --- /dev/null +++ b/vcpkg/ports/ogre-next/portfile.cmake @@ -0,0 +1,121 @@ +# This portfile is based (shamelessly copied and adapted a bit) on 'ogre' portfile. + +if (EXISTS "${CURRENT_INSTALLED_DIR}/Media/HLMS/Blendfunctions_piece_fs.glslt") + message(FATAL_ERROR "FATAL ERROR: ogre-next and ogre are incompatible.") +endif() + +if(NOT VCPKG_TARGET_IS_WINDOWS) + message("${PORT} currently requires the following library from the system package manager:\n Xaw\n\nIt can be installed on Ubuntu systems via apt-get install libxaw7-dev") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OGRECave/ogre-next + REF 8083067c1835147de5d82015347d95c710e36bc0 + SHA512 2660f739def7076b42009ba932a27532f2a20e7be8ec2674aff29116c7dcd7f2d75564d8ce07bef3dba13ece5293d604573ad4f8734f6086c1750127f52834cd + HEAD_REF master + PATCHES + toolchain_fixes.patch + rename_config_cmake.patch + fix_find_package_sdl2.patch +) + +file(REMOVE "${SOURCE_PATH}/CMake/Packages/FindOpenEXR.cmake") + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(OGRE_STATIC ON) +else() + set(OGRE_STATIC OFF) +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + d3d9 OGRE_BUILD_RENDERSYSTEM_D3D9 + java OGRE_BUILD_COMPONENT_JAVA + python OGRE_BUILD_COMPONENT_PYTHON + csharp OGRE_BUILD_COMPONENT_CSHARP +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DOGRE_BUILD_DEPENDENCIES=OFF + -DOGRE_BUILD_SAMPLES=OFF + -DOGRE_BUILD_TESTS=OFF + -DOGRE_BUILD_TOOLS=OFF + -DOGRE_BUILD_MSVC_MP=ON + -DOGRE_BUILD_MSVC_ZM=ON + -DOGRE_INSTALL_DEPENDENCIES=OFF + -DOGRE_INSTALL_DOCS=OFF + -DOGRE_INSTALL_PDB=OFF + -DOGRE_INSTALL_SAMPLES=OFF + -DOGRE_INSTALL_TOOLS=OFF + -DOGRE_INSTALL_CMAKE=ON + -DOGRE_INSTALL_VSPROPS=OFF + -DOGRE_STATIC=${OGRE_STATIC} + -DOGRE_CONFIG_THREAD_PROVIDER=std + -DOGRE_BUILD_RENDERSYSTEM_D3D11=ON + -DOGRE_BUILD_RENDERSYSTEM_GL=ON + -DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=ON + -DOGRE_BUILD_RENDERSYSTEM_GLES=OFF + -DOGRE_BUILD_RENDERSYSTEM_GLES2=OFF +# Optional stuff + ${FEATURE_OPTIONS} +# vcpkg specific stuff + -DOGRE_CMAKE_DIR=share/ogre-next +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(GLOB REL_CFGS ${CURRENT_PACKAGES_DIR}/bin/*.cfg) +if(REL_CFGS) + file(COPY ${REL_CFGS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(REMOVE ${REL_CFGS}) +endif() + +file(GLOB DBG_CFGS ${CURRENT_PACKAGES_DIR}/debug/bin/*.cfg) +if(DBG_CFGS) + file(COPY ${DBG_CFGS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(REMOVE ${DBG_CFGS}) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +#Remove OgreMain*.lib from lib/ folder, because autolink would complain, since it defines a main symbol +#manual-link subfolder is here to the rescue! +if(VCPKG_TARGET_IS_WINDOWS) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Release") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/OgreMain.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/OgreMain.lib) + else() + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/OgreMainStatic.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/OgreMainStatic.lib) + endif() + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/OgreMain_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/OgreMain_d.lib) + else() + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/OgreMainStatic_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/OgreMainStatic_d.lib) + endif() + endif() + + file(GLOB SHARE_FILES ${CURRENT_PACKAGES_DIR}/share/ogre-next/*.cmake) + foreach(SHARE_FILE ${SHARE_FILES}) + file(READ "${SHARE_FILE}" _contents) + string(REPLACE "lib/OgreMain" "lib/manual-link/OgreMain" _contents "${_contents}") + file(WRITE "${SHARE_FILE}" "${_contents}") + endforeach() +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/ogre-next/rename_config_cmake.patch b/vcpkg/ports/ogre-next/rename_config_cmake.patch new file mode 100644 index 0000000..d856032 --- /dev/null +++ b/vcpkg/ports/ogre-next/rename_config_cmake.patch @@ -0,0 +1,22 @@ +diff --git a/CMake/InstallResources.cmake b/CMake/InstallResources.cmake +index 79f7514..79bc033 100644 +--- a/CMake/InstallResources.cmake ++++ b/CMake/InstallResources.cmake +@@ -215,7 +215,7 @@ if(NOT DEFINED OGRE_CMAKE_DIR) + set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") + endif() + endif() +-configure_package_config_file(${OGRE_TEMPLATES_DIR}/OGREConfig.cmake.in ${PROJECT_BINARY_DIR}/cmake/OGREConfig.cmake ++configure_package_config_file(${OGRE_TEMPLATES_DIR}/OGREConfig.cmake.in ${PROJECT_BINARY_DIR}/cmake/ogre-nextConfig.cmake + INSTALL_DESTINATION ${OGRE_CMAKE_DIR} + PATH_VARS CMAKE_INSTALL_PREFIX) + write_basic_package_version_file( +@@ -223,7 +223,7 @@ write_basic_package_version_file( + VERSION ${OGRE_VERSION} + COMPATIBILITY SameMajorVersion) + install(FILES +- ${PROJECT_BINARY_DIR}/cmake/OGREConfig.cmake ++ ${PROJECT_BINARY_DIR}/cmake/ogre-nextConfig.cmake + ${PROJECT_BINARY_DIR}/cmake/OGREConfigVersion.cmake + DESTINATION ${OGRE_CMAKE_DIR} + ) diff --git a/vcpkg/ports/ogre-next/toolchain_fixes.patch b/vcpkg/ports/ogre-next/toolchain_fixes.patch new file mode 100644 index 0000000..9ff2d87 --- /dev/null +++ b/vcpkg/ports/ogre-next/toolchain_fixes.patch @@ -0,0 +1,291 @@ +diff --git a/CMake/CMakeLists.txt b/CMake/CMakeLists.txt +index a7a3796..2e21403 100644 +--- a/CMake/CMakeLists.txt ++++ b/CMake/CMakeLists.txt +@@ -13,10 +13,12 @@ + # directory, but can also be used for custom projects. + ############################################################# + +-if(WIN32 OR APPLE) +- set(OGRE_CMAKE_DIR "CMake") +-else() +- set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") ++if(NOT DEFINED OGRE_CMAKE_DIR) ++ if(WIN32 OR APPLE) ++ set(OGRE_CMAKE_DIR "CMake") ++ else() ++ set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") ++ endif() + endif() + + set(INST_FILES Utils/FindPkgMacros.cmake) +diff --git a/CMake/InstallResources.cmake b/CMake/InstallResources.cmake +index 783755e..79f7514 100644 +--- a/CMake/InstallResources.cmake ++++ b/CMake/InstallResources.cmake +@@ -208,10 +208,12 @@ endif () + # Create the CMake package files + include(CMakePackageConfigHelpers) + +-if(WIN32 OR APPLE) +- set(OGRE_CMAKE_DIR "CMake") +-else() +- set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") ++if(NOT DEFINED OGRE_CMAKE_DIR) ++ if(WIN32 OR APPLE) ++ set(OGRE_CMAKE_DIR "CMake") ++ else() ++ set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") ++ endif() + endif() + configure_package_config_file(${OGRE_TEMPLATES_DIR}/OGREConfig.cmake.in ${PROJECT_BINARY_DIR}/cmake/OGREConfig.cmake + INSTALL_DESTINATION ${OGRE_CMAKE_DIR} +diff --git a/CMake/Packages/FindCg.cmake b/CMake/Packages/FindCg.cmake +index 4501cf9..7eb57c3 100644 +--- a/CMake/Packages/FindCg.cmake ++++ b/CMake/Packages/FindCg.cmake +@@ -56,7 +56,7 @@ endif() + + find_library(Cg_LIBRARY_REL NAMES ${Cg_LIBRARY_NAMES} HINTS ${Cg_LIB_SEARCH_PATH} ${Cg_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel) + find_library(Cg_LIBRARY_DBG NAMES ${Cg_LIBRARY_NAMES_DBG} HINTS ${Cg_LIB_SEARCH_PATH} ${Cg_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug) +-make_library_set(Cg_LIBRARY) ++make_library_set(Cg) + + if (WIN32) + if (CMAKE_CL_64) +diff --git a/CMake/Packages/FindFreeImage.cmake b/CMake/Packages/FindFreeImage.cmake +index 7c89ec5..d8314f0 100644 +--- a/CMake/Packages/FindFreeImage.cmake ++++ b/CMake/Packages/FindFreeImage.cmake +@@ -43,7 +43,7 @@ find_path(FreeImage_INCLUDE_DIR NAMES FreeImage.h HINTS ${FreeImage_INC_SEARCH_P + find_library(FreeImage_LIBRARY_REL NAMES ${FreeImage_LIBRARY_NAMES} HINTS ${FreeImage_LIB_SEARCH_PATH} ${FreeImage_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel) + find_library(FreeImage_LIBRARY_DBG NAMES ${FreeImage_LIBRARY_NAMES_DBG} HINTS ${FreeImage_LIB_SEARCH_PATH} ${FreeImage_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug) + +-make_library_set(FreeImage_LIBRARY) ++make_library_set(FreeImage) + + findpkg_finish(FreeImage) + +diff --git a/CMake/Packages/FindGLSLOptimizer.cmake b/CMake/Packages/FindGLSLOptimizer.cmake +index dd4b179..6f158fc 100644 +--- a/CMake/Packages/FindGLSLOptimizer.cmake ++++ b/CMake/Packages/FindGLSLOptimizer.cmake +@@ -38,7 +38,7 @@ findpkg_framework(GLSL_Optimizer) + find_path(GLSL_Optimizer_INCLUDE_DIR NAMES glsl_optimizer.h HINTS ${GLSL_Optimizer_INC_SEARCH_PATH} ${GLSL_Optimizer_PKGC_INCLUDE_DIRS} PATH_SUFFIXES GLSL_Optimizer) + find_library(GLSL_Optimizer_LIBRARY_REL NAMES ${GLSL_Optimizer_LIBRARY_NAMES} HINTS ${GLSL_Optimizer_LIB_SEARCH_PATH} ${GLSL_Optimizer_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel) + find_library(GLSL_Optimizer_LIBRARY_DBG NAMES ${GLSL_Optimizer_LIBRARY_NAMES_DBG} HINTS ${GLSL_Optimizer_LIB_SEARCH_PATH} ${GLSL_Optimizer_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug) +-make_library_set(GLSL_Optimizer_LIBRARY) ++make_library_set(GLSL_Optimizer) + + findpkg_finish(GLSL_Optimizer) + add_parent_dir(GLSL_Optimizer_INCLUDE_DIRS GLSL_Optimizer_INCLUDE_DIR) +diff --git a/CMake/Packages/FindHLSL2GLSL.cmake b/CMake/Packages/FindHLSL2GLSL.cmake +index 7125895..13a306f 100644 +--- a/CMake/Packages/FindHLSL2GLSL.cmake ++++ b/CMake/Packages/FindHLSL2GLSL.cmake +@@ -38,7 +38,7 @@ findpkg_framework(HLSL2GLSL) + find_path(HLSL2GLSL_INCLUDE_DIR NAMES hlsl2glsl.h HINTS ${HLSL2GLSL_INC_SEARCH_PATH} ${HLSL2GLSL_PKGC_INCLUDE_DIRS} PATH_SUFFIXES HLSL2GLSL) + find_library(HLSL2GLSL_LIBRARY_REL NAMES ${HLSL2GLSL_LIBRARY_NAMES} HINTS ${HLSL2GLSL_LIB_SEARCH_PATH} ${HLSL2GLSL_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel) + find_library(HLSL2GLSL_LIBRARY_DBG NAMES ${HLSL2GLSL_LIBRARY_NAMES_DBG} HINTS ${HLSL2GLSL_LIB_SEARCH_PATH} ${HLSL2GLSL_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug) +-make_library_set(HLSL2GLSL_LIBRARY) ++make_library_set(HLSL2GLSL) + + findpkg_finish(HLSL2GLSL) + add_parent_dir(HLSL2GLSL_INCLUDE_DIRS HLSL2GLSL_INCLUDE_DIR) +diff --git a/CMake/Packages/FindNVAPI.cmake b/CMake/Packages/FindNVAPI.cmake +index 2b9deba..f33a298 100644 +--- a/CMake/Packages/FindNVAPI.cmake ++++ b/CMake/Packages/FindNVAPI.cmake +@@ -44,7 +44,7 @@ findpkg_framework(NVAPI) + find_path(NVAPI_INCLUDE_DIR NAMES nvapi.h HINTS ${NVAPI_FRAMEWORK_INCLUDES} ${NVAPI_INC_SEARCH_PATH} ${NVAPI_PKGC_INCLUDE_DIRS} PATH_SUFFIXES NVAPI) + find_library(NVAPI_LIBRARY_REL NAMES ${NVAPI_LIBRARY_NAMES} HINTS ${NVAPI_LIB_SEARCH_PATH} ${NVAPI_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" release relwithdebinfo minsizerel) + find_library(NVAPI_LIBRARY_DBG NAMES ${NVAPI_LIBRARY_NAMES_DBG} HINTS ${NVAPI_LIB_SEARCH_PATH} ${NVAPI_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" debug) +-make_library_set(NVAPI_LIBRARY) ++make_library_set(NVAPI) + + findpkg_finish(NVAPI) + add_parent_dir(NVAPI_INCLUDE_DIRS NVAPI_INCLUDE_DIR) +\ No newline at end of file +diff --git a/CMake/Packages/FindPOCO.cmake b/CMake/Packages/FindPOCO.cmake +index 6b6d7fa..3667b8b 100644 +--- a/CMake/Packages/FindPOCO.cmake ++++ b/CMake/Packages/FindPOCO.cmake +@@ -50,7 +50,7 @@ findpkg_framework(POCO) + find_path(POCO_INCLUDE_DIR NAMES Poco/Foundation.h HINTS ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES Foundation/include) + find_library(POCO_LIBRARY_REL NAMES ${POCO_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) + find_library(POCO_LIBRARY_DBG NAMES ${POCO_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) +-make_library_set(POCO_LIBRARY) ++make_library_set(POCO) + + findpkg_finish(POCO) + +@@ -66,7 +66,7 @@ get_debug_names(POCO_Util_LIBRARY_NAMES) + find_path(POCO_Util_INCLUDE_DIR NAMES Poco/Util/Util.h HINTS ${POCO_INCLUDE_DIR} ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES Util/include) + find_library(POCO_Util_LIBRARY_REL NAMES ${POCO_Util_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) + find_library(POCO_Util_LIBRARY_DBG NAMES ${POCO_Util_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) +-make_library_set(POCO_Util_LIBRARY) ++make_library_set(POCO_Util) + findpkg_finish(POCO_Util) + + # Look for Poco's Net package +@@ -76,7 +76,7 @@ get_debug_names(POCO_Net_LIBRARY_NAMES) + find_path(POCO_Net_INCLUDE_DIR NAMES Poco/Net/Net.h HINTS ${POCO_INCLUDE_DIR} ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES Net/include) + find_library(POCO_Net_LIBRARY_REL NAMES ${POCO_Net_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) + find_library(POCO_Net_LIBRARY_DBG NAMES ${POCO_Net_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) +-make_library_set(POCO_Net_LIBRARY) ++make_library_set(POCO_Net) + findpkg_finish(POCO_Net) + + # Look for Poco's NetSSL package +@@ -86,7 +86,7 @@ get_debug_names(POCO_NetSSL_LIBRARY_NAMES) + find_path(POCO_NetSSL_INCLUDE_DIR NAMES Poco/Net/NetSSL.h HINTS ${POCO_INCLUDE_DIR} ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES NetSSL/include) + find_library(POCO_NetSSL_LIBRARY_REL NAMES ${POCO_NetSSL_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) + find_library(POCO_NetSSL_LIBRARY_DBG NAMES ${POCO_NetSSL_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) +-make_library_set(POCO_NetSSL_LIBRARY) ++make_library_set(POCO_NetSSL) + findpkg_finish(POCO_NetSSL) + + # Look for Poco's XML package +@@ -96,6 +96,6 @@ get_debug_names(POCO_XML_LIBRARY_NAMES) + find_path(POCO_XML_INCLUDE_DIR NAMES Poco/XML/XML.h HINTS ${POCO_INCLUDE_DIR} ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES XML/include) + find_library(POCO_XML_LIBRARY_REL NAMES ${POCO_XML_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) + find_library(POCO_XML_LIBRARY_DBG NAMES ${POCO_XML_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) +-make_library_set(POCO_XML_LIBRARY) ++make_library_set(POCO_XML) + findpkg_finish(POCO_XML) + +diff --git a/CMake/Packages/FindTBB.cmake b/CMake/Packages/FindTBB.cmake +index 0c48510..c121966 100644 +--- a/CMake/Packages/FindTBB.cmake ++++ b/CMake/Packages/FindTBB.cmake +@@ -104,7 +104,7 @@ findpkg_framework(TBB) + find_path(TBB_INCLUDE_DIR NAMES tbb/tbb.h HINTS ${TBB_INC_SEARCH_PATH} ${TBB_PKGC_INCLUDE_DIRS}) + find_library(TBB_LIBRARY_REL NAMES ${TBB_LIBRARY_NAMES} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS}) + find_library(TBB_LIBRARY_DBG NAMES ${TBB_LIBRARY_NAMES_DBG} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS}) +-make_library_set(TBB_LIBRARY) ++make_library_set(TBB) + + findpkg_finish(TBB) + +@@ -120,7 +120,7 @@ get_debug_names(TBB_MALLOC_LIBRARY_NAMES) + find_path(TBB_MALLOC_INCLUDE_DIR NAMES tbb/tbb.h HINTS ${TBB_INCLUDE_DIR} ${TBB_INC_SEARCH_PATH} ${TBB_PKGC_INCLUDE_DIRS} ) + find_library(TBB_MALLOC_LIBRARY_REL NAMES ${TBB_MALLOC_LIBRARY_NAMES} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS} ) + find_library(TBB_MALLOC_LIBRARY_DBG NAMES ${TBB_MALLOC_LIBRARY_NAMES_DBG} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS} ) +-make_library_set(TBB_MALLOC_LIBRARY) ++make_library_set(TBB_MALLOC) + findpkg_finish(TBB_MALLOC) + + # Look for TBB's malloc proxy package +@@ -130,5 +130,5 @@ get_debug_names(TBB_MALLOC_PROXY_LIBRARY_NAMES) + find_path(TBB_MALLOC_PROXY_INCLUDE_DIR NAMES tbb/tbbmalloc_proxy.h HINTS ${TBB_INCLUDE_DIR} ${TBB_INC_SEARCH_PATH} ${TBB_PKGC_INCLUDE_DIRS}) + find_library(TBB_MALLOC_PROXY_LIBRARY_REL NAMES ${TBB_MALLOC_PROXY_LIBRARY_NAMES} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS}) + find_library(TBB_MALLOC_PROXY_LIBRARY_DBG NAMES ${TBB_MALLOC_PROXY_LIBRARY_NAMES_DBG} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS}) +-make_library_set(TBB_MALLOC_PROXY_LIBRARY) ++make_library_set(TBB_MALLOC_PROXY) + findpkg_finish(TBB_MALLOC_PROXY) +diff --git a/CMake/Packages/FindZZip.cmake b/CMake/Packages/FindZZip.cmake +index e97951e..54c2567 100644 +--- a/CMake/Packages/FindZZip.cmake ++++ b/CMake/Packages/FindZZip.cmake +@@ -39,12 +39,12 @@ use_pkgconfig(ZZip_PKGC zziplib) + + findpkg_framework(ZZip) + +-find_path(ZZip_INCLUDE_DIR NAMES zzip/zzip.h HINTS ${ZZip_INC_SEARCH_PATH} ${ZZip_PKGC_INCLUDE_DIRS}) ++find_path(ZZip_INCLUDE_DIRS NAMES zzip/zzip.h HINTS ${ZZip_INC_SEARCH_PATH} ${ZZip_PKGC_INCLUDE_DIRS}) + + find_library(ZZip_LIBRARY_REL NAMES ${ZZip_LIBRARY_NAMES} HINTS ${ZZip_LIB_SEARCH_PATH} ${ZZip_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel) + find_library(ZZip_LIBRARY_DBG NAMES ${ZZip_LIBRARY_NAMES_DBG} HINTS ${ZZip_LIB_SEARCH_PATH} ${ZZip_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug) + +-make_library_set(ZZip_LIBRARY) ++make_library_set(ZZip) + + findpkg_finish(ZZip) + +diff --git a/CMake/Utils/FindPkgMacros.cmake b/CMake/Utils/FindPkgMacros.cmake +index 374f84b..dc7066d 100644 +--- a/CMake/Utils/FindPkgMacros.cmake ++++ b/CMake/Utils/FindPkgMacros.cmake +@@ -79,15 +79,21 @@ endmacro (use_pkgconfig) + + # Couple a set of release AND debug libraries (or frameworks) + macro(make_library_set PREFIX) +- if (${PREFIX}_FWK) +- set(${PREFIX} ${${PREFIX}_FWK}) +- elseif (${PREFIX}_REL AND ${PREFIX}_DBG) +- set(${PREFIX} optimized ${${PREFIX}_REL} debug ${${PREFIX}_DBG}) +- elseif (${PREFIX}_REL) +- set(${PREFIX} ${${PREFIX}_REL}) +- elseif (${PREFIX}_DBG) +- set(${PREFIX} ${${PREFIX}_DBG}) +- endif () ++ include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) ++ set(PREFIX_LIB "${PREFIX}_LIBRARY") ++ if (${PREFIX_LIB}_FWK) ++ set(${PREFIX_LIB} ${${PREFIX_LIB}_FWK}) ++ elseif (${PREFIX_LIB}_REL AND ${PREFIX_LIB}_DBG) ++ set(${PREFIX_LIB}_RELEASE ${${PREFIX_LIB}_REL} CACHE STRING "") ++ set(${PREFIX_LIB}_DEBUG ${${PREFIX_LIB}_DBG} CACHE STRING "") ++ select_library_configurations(${PREFIX}) ++ elseif (${PREFIX_LIB}_REL) ++ set(${PREFIX_LIB} ${${PREFIX_LIB}_REL}) ++ set(${PREFIX_LIB}_RELEASE ${${PREFIX_LIB}_REL}) ++ elseif (${PREFIX_LIB}_DBG) ++ set(${PREFIX_LIB} ${${PREFIX_LIB}_DBG}) ++ set(${PREFIX_LIB}_DEBUG ${${PREFIX_LIB}_DBG}) ++ endif() + endmacro(make_library_set) + + # Generate debug names from given release names +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3e09d2d..58968f0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -274,7 +274,7 @@ elseif(EMSCRIPTEN) + elseif (APPLE AND NOT APPLE_IOS) + + set(XCODE_ATTRIBUTE_SDKROOT macosx) +- if(CMAKE_GENERATOR STREQUAL "Unix Makefiles") ++ if(1) + execute_process(COMMAND xcodebuild -version -sdk "${XCODE_ATTRIBUTE_SDKROOT}" Path | head -n 1 OUTPUT_VARIABLE CMAKE_OSX_SYSROOT) + string(REGEX REPLACE "(\r?\n)+$" "" CMAKE_OSX_SYSROOT "${CMAKE_OSX_SYSROOT}") + else() +diff --git a/Components/Overlay/CMakeLists.txt b/Components/Overlay/CMakeLists.txt +index bdb303d..d9cc221 100644 +--- a/Components/Overlay/CMakeLists.txt ++++ b/Components/Overlay/CMakeLists.txt +@@ -21,7 +21,7 @@ file(GLOB SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp") + # setup target + add_library(OgreOverlay ${OGRE_COMP_LIB_TYPE} ${HEADER_FILES} ${SOURCE_FILES} ${PLATFORM_HEADER_FILES} ${PLATFORM_SOURCE_FILES}) + set_target_properties(OgreOverlay PROPERTIES VERSION ${OGRE_SOVERSION} SOVERSION ${OGRE_SOVERSION}) +-target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE "${FREETYPE_LIBRARIES}" ZLIB::ZLIB) ++target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE ${FREETYPE_LIBRARIES} ZLIB::ZLIB) + target_include_directories(OgreOverlay PUBLIC + "$" + $ +diff --git a/OgreMain/CMakeLists.txt b/OgreMain/CMakeLists.txt +index 6ec4e34..cc9cb9d 100644 +--- a/OgreMain/CMakeLists.txt ++++ b/OgreMain/CMakeLists.txt +@@ -225,8 +225,6 @@ if (APPLE) + set_target_properties(OgreMain PROPERTIES + LINK_FLAGS "-framework IOKit -framework Cocoa -framework Carbon -framework OpenGL -framework CoreVideo" + ) +- +- set(OGRE_OSX_BUILD_CONFIGURATION "$(PLATFORM_NAME)/$(CONFIGURATION)") + + if(OGRE_BUILD_LIBS_AS_FRAMEWORKS) + add_custom_command(TARGET OgreMain POST_BUILD +diff --git a/PlugIns/EXRCodec/CMakeLists.txt b/PlugIns/EXRCodec/CMakeLists.txt +index e9c936a..bb8747e 100644 +--- a/PlugIns/EXRCodec/CMakeLists.txt ++++ b/PlugIns/EXRCodec/CMakeLists.txt +@@ -16,7 +16,7 @@ target_link_libraries(Codec_EXR OgreMain ${OPENEXR_LIBRARIES}) + target_include_directories(Codec_EXR PUBLIC + "$" + $) +-target_include_directories(Codec_EXR SYSTEM PRIVATE "${OPENEXR_INCLUDE_DIR}/OpenEXR") ++target_include_directories(Codec_EXR SYSTEM PRIVATE "${OPENEXR_INCLUDE_DIR}") + + ogre_config_framework(Codec_EXR) + ogre_config_plugin(Codec_EXR) diff --git a/vcpkg/ports/ogre/fix-dependency.patch b/vcpkg/ports/ogre/fix-dependency.patch new file mode 100644 index 0000000..ba7e751 --- /dev/null +++ b/vcpkg/ports/ogre/fix-dependency.patch @@ -0,0 +1,45 @@ +diff --git a/CMake/Dependencies.cmake b/CMake/Dependencies.cmake +index 959fdf5..dcd28bb 100644 +--- a/CMake/Dependencies.cmake ++++ b/CMake/Dependencies.cmake +@@ -217,7 +217,7 @@ find_package(FreeImage) + macro_log_feature(FreeImage_FOUND "freeimage" "Support for commonly used graphics image formats" "http://freeimage.sourceforge.net" FALSE "" "") + + # Find FreeType +-find_package(Freetype) ++find_package(freetype CONFIG REQUIRED) + macro_log_feature(FREETYPE_FOUND "freetype" "Portable font engine" "http://www.freetype.org" FALSE "" "") + + # Find X11 +@@ -291,7 +291,7 @@ macro_log_feature(SWIG_FOUND "SWIG" "Language bindings (Python, Java, C#) for OG + # Find sdl2 + if(NOT ANDROID AND NOT EMSCRIPTEN) + # find script does not work in cross compilation environment +- find_package(SDL2 QUIET) ++ find_package(SDL2 CONFIG REQUIRED) + macro_log_feature(SDL2_FOUND "SDL2" "Simple DirectMedia Library needed for input handling in samples" "https://www.libsdl.org/" FALSE "" "") + if(SDL2_FOUND AND NOT TARGET SDL2::SDL2) + add_library(SDL2::SDL2 INTERFACE IMPORTED) +diff --git a/PlugIns/DotScene/CMakeLists.txt b/PlugIns/DotScene/CMakeLists.txt +index fd285df..ab8e9c1 100644 +--- a/PlugIns/DotScene/CMakeLists.txt ++++ b/PlugIns/DotScene/CMakeLists.txt +@@ -1,4 +1,4 @@ +-find_package(pugixml QUIET) ++find_package(pugixml CONFIG REQUIRED) + + file(GLOB HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/*.h") + list(APPEND HEADER_FILES ${PROJECT_BINARY_DIR}/include/OgreDotScenePluginExports.h) +diff --git a/Tools/XMLConverter/CMakeLists.txt b/Tools/XMLConverter/CMakeLists.txt +index 8fe9683..2a516b2 100644 +--- a/Tools/XMLConverter/CMakeLists.txt ++++ b/Tools/XMLConverter/CMakeLists.txt +@@ -22,7 +22,7 @@ set(SOURCE_FILES + ) + + # allow override by cmake +-find_package(pugixml QUIET) ++find_package(pugixml CONFIG REQUIRED) + + add_executable(OgreXMLConverter ${HEADER_FILES} ${SOURCE_FILES}) + target_include_directories(OgreXMLConverter PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include) diff --git a/vcpkg/ports/ogre/fix-findimgui.patch b/vcpkg/ports/ogre/fix-findimgui.patch new file mode 100644 index 0000000..efd30d0 --- /dev/null +++ b/vcpkg/ports/ogre/fix-findimgui.patch @@ -0,0 +1,35 @@ +diff --git a/Components/Overlay/CMakeLists.txt b/Components/Overlay/CMakeLists.txt +index 1cea873..d3e756e 100644 +--- a/Components/Overlay/CMakeLists.txt ++++ b/Components/Overlay/CMakeLists.txt +@@ -19,12 +19,8 @@ list(APPEND HEADER_FILES + file(GLOB SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp") + + if(OGRE_BUILD_COMPONENT_OVERLAY_IMGUI) +- list(APPEND SOURCE_FILES +- ${CMAKE_CURRENT_SOURCE_DIR}/src/imgui/imgui.cpp +- ${CMAKE_CURRENT_SOURCE_DIR}/src/imgui/imgui_draw.cpp +- ${CMAKE_CURRENT_SOURCE_DIR}/src/imgui/imgui_widgets.cpp +- ${CMAKE_CURRENT_SOURCE_DIR}/src/imgui/imgui_demo.cpp +- ${CMAKE_CURRENT_SOURCE_DIR}/src/imgui/misc/freetype/imgui_freetype.cpp) ++ find_package(imgui CONFIG REQUIRED) ++ find_path(IMGUI_INCLUDE_DIR imgui.h) + else() + list(REMOVE_ITEM SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/OgreImGuiOverlay.cpp") + endif() +@@ -32,13 +28,13 @@ endif() + # setup target + add_library(OgreOverlay ${OGRE_COMP_LIB_TYPE} ${HEADER_FILES} ${SOURCE_FILES}) + set_target_properties(OgreOverlay PROPERTIES VERSION ${OGRE_SOVERSION} SOVERSION ${OGRE_SOVERSION}) +-target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE ${FREETYPE_LIBRARIES} ZLIB::ZLIB) ++target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE ${FREETYPE_LIBRARIES} ZLIB::ZLIB imgui::imgui) + target_include_directories(OgreOverlay PUBLIC + "$" + $ + PRIVATE ${FREETYPE_INCLUDE_DIRS}) + +-if(OGRE_BUILD_COMPONENT_OVERLAY_IMGUI) ++if(0) + target_include_directories(OgreOverlay PUBLIC + PUBLIC "$" + PRIVATE "$") diff --git a/vcpkg/ports/ogre/portfile.cmake b/vcpkg/ports/ogre/portfile.cmake new file mode 100644 index 0000000..408ce41 --- /dev/null +++ b/vcpkg/ports/ogre/portfile.cmake @@ -0,0 +1,121 @@ +if (EXISTS "${CURRENT_INSTALLED_DIR}/Media/HLMS/Blendfunctions_piece_fs.glslt") + message(FATAL_ERROR "FATAL ERROR: ogre-next and ogre are incompatible.") +endif() + +if(NOT VCPKG_TARGET_IS_WINDOWS) + message("${PORT} currently requires the following library from the system package manager:\n Xaw\n\nIt can be installed on Ubuntu systems via apt-get install libxaw7-dev") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OGRECave/ogre + REF 8ff1a4046716244fc4b3a3e44e5b6abeda755b0a #v1.12.7 + SHA512 60c66118e35904cbabe881301f3e59026483507341450956f99b67220e1aaebd7035caac69c3e06cf45f08163254264da111b93d0c6b3402c3fba64858786b66 + HEAD_REF master + PATCHES + toolchain_fixes.patch + fix-dependency.patch + fix-findimgui.patch +) + +file(REMOVE "${SOURCE_PATH}/CMake/Packages/FindOpenEXR.cmake") + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(OGRE_STATIC ON) +else() + set(OGRE_STATIC OFF) +endif() + +# Configure features + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + d3d9 OGRE_BUILD_RENDERSYSTEM_D3D9 + java OGRE_BUILD_COMPONENT_JAVA + python OGRE_BUILD_COMPONENT_PYTHON + csharp OGRE_BUILD_COMPONENT_CSHARP +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DOGRE_BUILD_DEPENDENCIES=OFF + -DOGRE_BUILD_SAMPLES=OFF + -DOGRE_BUILD_TESTS=OFF + -DOGRE_BUILD_TOOLS=OFF + -DOGRE_BUILD_MSVC_MP=ON + -DOGRE_BUILD_MSVC_ZM=ON + -DOGRE_INSTALL_DEPENDENCIES=OFF + -DOGRE_INSTALL_DOCS=OFF + -DOGRE_INSTALL_PDB=OFF + -DOGRE_INSTALL_SAMPLES=OFF + -DOGRE_INSTALL_TOOLS=OFF + -DOGRE_INSTALL_CMAKE=ON + -DOGRE_INSTALL_VSPROPS=OFF + -DOGRE_STATIC=${OGRE_STATIC} + -DOGRE_CONFIG_THREAD_PROVIDER=std + -DOGRE_BUILD_RENDERSYSTEM_D3D11=ON + -DOGRE_BUILD_RENDERSYSTEM_GL=ON + -DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=ON + -DOGRE_BUILD_RENDERSYSTEM_GLES=OFF + -DOGRE_BUILD_RENDERSYSTEM_GLES2=OFF +# Optional stuff + ${FEATURE_OPTIONS} +# vcpkg specific stuff + -DOGRE_CMAKE_DIR=share/ogre +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(GLOB REL_CFGS ${CURRENT_PACKAGES_DIR}/bin/*.cfg) +if(REL_CFGS) + file(COPY ${REL_CFGS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(REMOVE ${REL_CFGS}) +endif() + +file(GLOB DBG_CFGS ${CURRENT_PACKAGES_DIR}/debug/bin/*.cfg) +if(DBG_CFGS) + file(COPY ${DBG_CFGS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(REMOVE ${DBG_CFGS}) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +#Remove OgreMain*.lib from lib/ folder, because autolink would complain, since it defines a main symbol +#manual-link subfolder is here to the rescue! +if(VCPKG_TARGET_IS_WINDOWS) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Release") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/OgreMain.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/OgreMain.lib) + else() + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/OgreMainStatic.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/OgreMainStatic.lib) + endif() + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/OgreMain_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/OgreMain_d.lib) + else() + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/OgreMainStatic_d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/OgreMainStatic_d.lib) + endif() + endif() + + file(GLOB SHARE_FILES ${CURRENT_PACKAGES_DIR}/share/ogre/*.cmake) + foreach(SHARE_FILE ${SHARE_FILES}) + file(READ "${SHARE_FILE}" _contents) + string(REPLACE "lib/OgreMain" "lib/manual-link/OgreMain" _contents "${_contents}") + file(WRITE "${SHARE_FILE}" "${_contents}") + endforeach() +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/ogre/toolchain_fixes.patch b/vcpkg/ports/ogre/toolchain_fixes.patch new file mode 100644 index 0000000..cae36e1 --- /dev/null +++ b/vcpkg/ports/ogre/toolchain_fixes.patch @@ -0,0 +1,265 @@ +diff --git a/CMake/CMakeLists.txt b/CMake/CMakeLists.txt +index a7a3796..2e21403 100644 +--- a/CMake/CMakeLists.txt ++++ b/CMake/CMakeLists.txt +@@ -13,10 +13,12 @@ + # directory, but can also be used for custom projects. + ############################################################# + +-if(WIN32 OR APPLE) +- set(OGRE_CMAKE_DIR "CMake") +-else() +- set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") ++if(NOT DEFINED OGRE_CMAKE_DIR) ++ if(WIN32 OR APPLE) ++ set(OGRE_CMAKE_DIR "CMake") ++ else() ++ set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") ++ endif() + endif() + + set(INST_FILES Utils/FindPkgMacros.cmake) +diff --git a/CMake/InstallResources.cmake b/CMake/InstallResources.cmake +index 06a055b..09d10bd 100644 +--- a/CMake/InstallResources.cmake ++++ b/CMake/InstallResources.cmake +@@ -201,10 +201,12 @@ endif () + # Create the CMake package files + include(CMakePackageConfigHelpers) + +-if(WIN32 OR APPLE) +- set(OGRE_CMAKE_DIR "CMake") +-else() +- set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") ++if(NOT DEFINED OGRE_CMAKE_DIR) ++ if(WIN32 OR APPLE) ++ set(OGRE_CMAKE_DIR "CMake") ++ else() ++ set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake") ++ endif() + endif() + if(WIN32) + set(OGRE_PLUGIN_DIR_CMAKE "bin") +diff --git a/CMake/Packages/FindCg.cmake b/CMake/Packages/FindCg.cmake +index 4501cf9..7eb57c3 100644 +--- a/CMake/Packages/FindCg.cmake ++++ b/CMake/Packages/FindCg.cmake +@@ -56,7 +56,7 @@ endif() + + find_library(Cg_LIBRARY_REL NAMES ${Cg_LIBRARY_NAMES} HINTS ${Cg_LIB_SEARCH_PATH} ${Cg_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel) + find_library(Cg_LIBRARY_DBG NAMES ${Cg_LIBRARY_NAMES_DBG} HINTS ${Cg_LIB_SEARCH_PATH} ${Cg_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug) +-make_library_set(Cg_LIBRARY) ++make_library_set(Cg) + + if (WIN32) + if (CMAKE_CL_64) +diff --git a/CMake/Packages/FindFreeImage.cmake b/CMake/Packages/FindFreeImage.cmake +index 7c89ec5..d8314f0 100644 +--- a/CMake/Packages/FindFreeImage.cmake ++++ b/CMake/Packages/FindFreeImage.cmake +@@ -43,7 +43,7 @@ find_path(FreeImage_INCLUDE_DIR NAMES FreeImage.h HINTS ${FreeImage_INC_SEARCH_P + find_library(FreeImage_LIBRARY_REL NAMES ${FreeImage_LIBRARY_NAMES} HINTS ${FreeImage_LIB_SEARCH_PATH} ${FreeImage_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel) + find_library(FreeImage_LIBRARY_DBG NAMES ${FreeImage_LIBRARY_NAMES_DBG} HINTS ${FreeImage_LIB_SEARCH_PATH} ${FreeImage_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug) + +-make_library_set(FreeImage_LIBRARY) ++make_library_set(FreeImage) + + findpkg_finish(FreeImage) + +diff --git a/CMake/Packages/FindGLSLOptimizer.cmake b/CMake/Packages/FindGLSLOptimizer.cmake +index dd4b179..6f158fc 100644 +--- a/CMake/Packages/FindGLSLOptimizer.cmake ++++ b/CMake/Packages/FindGLSLOptimizer.cmake +@@ -38,7 +38,7 @@ findpkg_framework(GLSL_Optimizer) + find_path(GLSL_Optimizer_INCLUDE_DIR NAMES glsl_optimizer.h HINTS ${GLSL_Optimizer_INC_SEARCH_PATH} ${GLSL_Optimizer_PKGC_INCLUDE_DIRS} PATH_SUFFIXES GLSL_Optimizer) + find_library(GLSL_Optimizer_LIBRARY_REL NAMES ${GLSL_Optimizer_LIBRARY_NAMES} HINTS ${GLSL_Optimizer_LIB_SEARCH_PATH} ${GLSL_Optimizer_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel) + find_library(GLSL_Optimizer_LIBRARY_DBG NAMES ${GLSL_Optimizer_LIBRARY_NAMES_DBG} HINTS ${GLSL_Optimizer_LIB_SEARCH_PATH} ${GLSL_Optimizer_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug) +-make_library_set(GLSL_Optimizer_LIBRARY) ++make_library_set(GLSL_Optimizer) + + findpkg_finish(GLSL_Optimizer) + add_parent_dir(GLSL_Optimizer_INCLUDE_DIRS GLSL_Optimizer_INCLUDE_DIR) +diff --git a/CMake/Packages/FindHLSL2GLSL.cmake b/CMake/Packages/FindHLSL2GLSL.cmake +index 7125895..13a306f 100644 +--- a/CMake/Packages/FindHLSL2GLSL.cmake ++++ b/CMake/Packages/FindHLSL2GLSL.cmake +@@ -38,7 +38,7 @@ findpkg_framework(HLSL2GLSL) + find_path(HLSL2GLSL_INCLUDE_DIR NAMES hlsl2glsl.h HINTS ${HLSL2GLSL_INC_SEARCH_PATH} ${HLSL2GLSL_PKGC_INCLUDE_DIRS} PATH_SUFFIXES HLSL2GLSL) + find_library(HLSL2GLSL_LIBRARY_REL NAMES ${HLSL2GLSL_LIBRARY_NAMES} HINTS ${HLSL2GLSL_LIB_SEARCH_PATH} ${HLSL2GLSL_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel) + find_library(HLSL2GLSL_LIBRARY_DBG NAMES ${HLSL2GLSL_LIBRARY_NAMES_DBG} HINTS ${HLSL2GLSL_LIB_SEARCH_PATH} ${HLSL2GLSL_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug) +-make_library_set(HLSL2GLSL_LIBRARY) ++make_library_set(HLSL2GLSL) + + findpkg_finish(HLSL2GLSL) + add_parent_dir(HLSL2GLSL_INCLUDE_DIRS HLSL2GLSL_INCLUDE_DIR) +diff --git a/CMake/Packages/FindNVAPI.cmake b/CMake/Packages/FindNVAPI.cmake +index 95c70cd..893ce01 100644 +--- a/CMake/Packages/FindNVAPI.cmake ++++ b/CMake/Packages/FindNVAPI.cmake +@@ -44,7 +44,7 @@ findpkg_framework(NVAPI) + find_path(NVAPI_INCLUDE_DIR NAMES nvapi.h HINTS ${NVAPI_FRAMEWORK_INCLUDES} ${NVAPI_INC_SEARCH_PATH} ${NVAPI_PKGC_INCLUDE_DIRS} PATH_SUFFIXES NVAPI) + find_library(NVAPI_LIBRARY_REL NAMES ${NVAPI_LIBRARY_NAMES} HINTS ${NVAPI_LIB_SEARCH_PATH} ${NVAPI_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" release relwithdebinfo minsizerel) + find_library(NVAPI_LIBRARY_DBG NAMES ${NVAPI_LIBRARY_NAMES_DBG} HINTS ${NVAPI_LIB_SEARCH_PATH} ${NVAPI_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" debug) +-make_library_set(NVAPI_LIBRARY) ++make_library_set(NVAPI) + + findpkg_finish(NVAPI) + add_parent_dir(NVAPI_INCLUDE_DIRS NVAPI_INCLUDE_DIR) +\ No newline at end of file +diff --git a/CMake/Packages/FindPOCO.cmake b/CMake/Packages/FindPOCO.cmake +index 6b6d7fa..3667b8b 100644 +--- a/CMake/Packages/FindPOCO.cmake ++++ b/CMake/Packages/FindPOCO.cmake +@@ -50,7 +50,7 @@ findpkg_framework(POCO) + find_path(POCO_INCLUDE_DIR NAMES Poco/Foundation.h HINTS ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES Foundation/include) + find_library(POCO_LIBRARY_REL NAMES ${POCO_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) + find_library(POCO_LIBRARY_DBG NAMES ${POCO_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) +-make_library_set(POCO_LIBRARY) ++make_library_set(POCO) + + findpkg_finish(POCO) + +@@ -66,7 +66,7 @@ get_debug_names(POCO_Util_LIBRARY_NAMES) + find_path(POCO_Util_INCLUDE_DIR NAMES Poco/Util/Util.h HINTS ${POCO_INCLUDE_DIR} ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES Util/include) + find_library(POCO_Util_LIBRARY_REL NAMES ${POCO_Util_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) + find_library(POCO_Util_LIBRARY_DBG NAMES ${POCO_Util_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) +-make_library_set(POCO_Util_LIBRARY) ++make_library_set(POCO_Util) + findpkg_finish(POCO_Util) + + # Look for Poco's Net package +@@ -76,7 +76,7 @@ get_debug_names(POCO_Net_LIBRARY_NAMES) + find_path(POCO_Net_INCLUDE_DIR NAMES Poco/Net/Net.h HINTS ${POCO_INCLUDE_DIR} ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES Net/include) + find_library(POCO_Net_LIBRARY_REL NAMES ${POCO_Net_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) + find_library(POCO_Net_LIBRARY_DBG NAMES ${POCO_Net_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) +-make_library_set(POCO_Net_LIBRARY) ++make_library_set(POCO_Net) + findpkg_finish(POCO_Net) + + # Look for Poco's NetSSL package +@@ -86,7 +86,7 @@ get_debug_names(POCO_NetSSL_LIBRARY_NAMES) + find_path(POCO_NetSSL_INCLUDE_DIR NAMES Poco/Net/NetSSL.h HINTS ${POCO_INCLUDE_DIR} ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES NetSSL/include) + find_library(POCO_NetSSL_LIBRARY_REL NAMES ${POCO_NetSSL_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) + find_library(POCO_NetSSL_LIBRARY_DBG NAMES ${POCO_NetSSL_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) +-make_library_set(POCO_NetSSL_LIBRARY) ++make_library_set(POCO_NetSSL) + findpkg_finish(POCO_NetSSL) + + # Look for Poco's XML package +@@ -96,6 +96,6 @@ get_debug_names(POCO_XML_LIBRARY_NAMES) + find_path(POCO_XML_INCLUDE_DIR NAMES Poco/XML/XML.h HINTS ${POCO_INCLUDE_DIR} ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES XML/include) + find_library(POCO_XML_LIBRARY_REL NAMES ${POCO_XML_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) + find_library(POCO_XML_LIBRARY_DBG NAMES ${POCO_XML_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686) +-make_library_set(POCO_XML_LIBRARY) ++make_library_set(POCO_XML) + findpkg_finish(POCO_XML) + +diff --git a/CMake/Packages/FindTBB.cmake b/CMake/Packages/FindTBB.cmake +index 0c48510..c121966 100644 +--- a/CMake/Packages/FindTBB.cmake ++++ b/CMake/Packages/FindTBB.cmake +@@ -104,7 +104,7 @@ findpkg_framework(TBB) + find_path(TBB_INCLUDE_DIR NAMES tbb/tbb.h HINTS ${TBB_INC_SEARCH_PATH} ${TBB_PKGC_INCLUDE_DIRS}) + find_library(TBB_LIBRARY_REL NAMES ${TBB_LIBRARY_NAMES} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS}) + find_library(TBB_LIBRARY_DBG NAMES ${TBB_LIBRARY_NAMES_DBG} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS}) +-make_library_set(TBB_LIBRARY) ++make_library_set(TBB) + + findpkg_finish(TBB) + +@@ -120,7 +120,7 @@ get_debug_names(TBB_MALLOC_LIBRARY_NAMES) + find_path(TBB_MALLOC_INCLUDE_DIR NAMES tbb/tbb.h HINTS ${TBB_INCLUDE_DIR} ${TBB_INC_SEARCH_PATH} ${TBB_PKGC_INCLUDE_DIRS} ) + find_library(TBB_MALLOC_LIBRARY_REL NAMES ${TBB_MALLOC_LIBRARY_NAMES} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS} ) + find_library(TBB_MALLOC_LIBRARY_DBG NAMES ${TBB_MALLOC_LIBRARY_NAMES_DBG} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS} ) +-make_library_set(TBB_MALLOC_LIBRARY) ++make_library_set(TBB_MALLOC) + findpkg_finish(TBB_MALLOC) + + # Look for TBB's malloc proxy package +@@ -130,5 +130,5 @@ get_debug_names(TBB_MALLOC_PROXY_LIBRARY_NAMES) + find_path(TBB_MALLOC_PROXY_INCLUDE_DIR NAMES tbb/tbbmalloc_proxy.h HINTS ${TBB_INCLUDE_DIR} ${TBB_INC_SEARCH_PATH} ${TBB_PKGC_INCLUDE_DIRS}) + find_library(TBB_MALLOC_PROXY_LIBRARY_REL NAMES ${TBB_MALLOC_PROXY_LIBRARY_NAMES} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS}) + find_library(TBB_MALLOC_PROXY_LIBRARY_DBG NAMES ${TBB_MALLOC_PROXY_LIBRARY_NAMES_DBG} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS}) +-make_library_set(TBB_MALLOC_PROXY_LIBRARY) ++make_library_set(TBB_MALLOC_PROXY) + findpkg_finish(TBB_MALLOC_PROXY) +diff --git a/CMake/Packages/FindZZip.cmake b/CMake/Packages/FindZZip.cmake +index e97951e..54c2567 100644 +--- a/CMake/Packages/FindZZip.cmake ++++ b/CMake/Packages/FindZZip.cmake +@@ -39,12 +39,12 @@ use_pkgconfig(ZZip_PKGC zziplib) + + findpkg_framework(ZZip) + +-find_path(ZZip_INCLUDE_DIR NAMES zzip/zzip.h HINTS ${ZZip_INC_SEARCH_PATH} ${ZZip_PKGC_INCLUDE_DIRS}) ++find_path(ZZip_INCLUDE_DIRS NAMES zzip/zzip.h HINTS ${ZZip_INC_SEARCH_PATH} ${ZZip_PKGC_INCLUDE_DIRS}) + + find_library(ZZip_LIBRARY_REL NAMES ${ZZip_LIBRARY_NAMES} HINTS ${ZZip_LIB_SEARCH_PATH} ${ZZip_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel) + find_library(ZZip_LIBRARY_DBG NAMES ${ZZip_LIBRARY_NAMES_DBG} HINTS ${ZZip_LIB_SEARCH_PATH} ${ZZip_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug) + +-make_library_set(ZZip_LIBRARY) ++make_library_set(ZZip) + + findpkg_finish(ZZip) + +diff --git a/CMake/Utils/FindPkgMacros.cmake b/CMake/Utils/FindPkgMacros.cmake +index 374f84b..dc7066d 100644 +--- a/CMake/Utils/FindPkgMacros.cmake ++++ b/CMake/Utils/FindPkgMacros.cmake +@@ -79,15 +79,21 @@ endmacro (use_pkgconfig) + + # Couple a set of release AND debug libraries (or frameworks) + macro(make_library_set PREFIX) +- if (${PREFIX}_FWK) +- set(${PREFIX} ${${PREFIX}_FWK}) +- elseif (${PREFIX}_REL AND ${PREFIX}_DBG) +- set(${PREFIX} optimized ${${PREFIX}_REL} debug ${${PREFIX}_DBG}) +- elseif (${PREFIX}_REL) +- set(${PREFIX} ${${PREFIX}_REL}) +- elseif (${PREFIX}_DBG) +- set(${PREFIX} ${${PREFIX}_DBG}) +- endif () ++ include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) ++ set(PREFIX_LIB "${PREFIX}_LIBRARY") ++ if (${PREFIX_LIB}_FWK) ++ set(${PREFIX_LIB} ${${PREFIX_LIB}_FWK}) ++ elseif (${PREFIX_LIB}_REL AND ${PREFIX_LIB}_DBG) ++ set(${PREFIX_LIB}_RELEASE ${${PREFIX_LIB}_REL} CACHE STRING "") ++ set(${PREFIX_LIB}_DEBUG ${${PREFIX_LIB}_DBG} CACHE STRING "") ++ select_library_configurations(${PREFIX}) ++ elseif (${PREFIX_LIB}_REL) ++ set(${PREFIX_LIB} ${${PREFIX_LIB}_REL}) ++ set(${PREFIX_LIB}_RELEASE ${${PREFIX_LIB}_REL}) ++ elseif (${PREFIX_LIB}_DBG) ++ set(${PREFIX_LIB} ${${PREFIX_LIB}_DBG}) ++ set(${PREFIX_LIB}_DEBUG ${${PREFIX_LIB}_DBG}) ++ endif() + endmacro(make_library_set) + + # Generate debug names from given release names +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1602572..9fddbe7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -269,7 +269,7 @@ elseif(EMSCRIPTEN) + elseif (APPLE AND NOT APPLE_IOS) + + set(XCODE_ATTRIBUTE_SDKROOT macosx) +- if(CMAKE_GENERATOR STREQUAL "Unix Makefiles") ++ if(1) + execute_process(COMMAND xcodebuild -version -sdk "${XCODE_ATTRIBUTE_SDKROOT}" Path | head -n 1 OUTPUT_VARIABLE CMAKE_OSX_SYSROOT) + string(REGEX REPLACE "(\r?\n)+$" "" CMAKE_OSX_SYSROOT "${CMAKE_OSX_SYSROOT}") + else() +diff --git a/PlugIns/EXRCodec/CMakeLists.txt b/PlugIns/EXRCodec/CMakeLists.txt +index e9c936a..bb8747e 100644 +--- a/PlugIns/EXRCodec/CMakeLists.txt ++++ b/PlugIns/EXRCodec/CMakeLists.txt +@@ -16,7 +16,7 @@ target_link_libraries(Codec_EXR OgreMain ${OPENEXR_LIBRARIES}) + target_include_directories(Codec_EXR PUBLIC + "$" + $) +-target_include_directories(Codec_EXR SYSTEM PRIVATE "${OPENEXR_INCLUDE_DIR}/OpenEXR") ++target_include_directories(Codec_EXR SYSTEM PRIVATE "${OPENEXR_INCLUDE_DIR}") + + ogre_config_framework(Codec_EXR) + ogre_config_plugin(Codec_EXR) diff --git a/vcpkg/ports/ogre/vcpkg.json b/vcpkg/ports/ogre/vcpkg.json new file mode 100644 index 0000000..d99c2e2 --- /dev/null +++ b/vcpkg/ports/ogre/vcpkg.json @@ -0,0 +1,37 @@ +{ + "name": "ogre", + "version-string": "1.12.7", + "description": "3D Object-Oriented Graphics Rendering Engine", + "homepage": "https://github.com/OGRECave/ogre", + "dependencies": [ + "freeimage", + "freetype", + { + "name": "imgui", + "features": [ + "freetype" + ] + }, + "pugixml", + "sdl2", + "zlib", + "zziplib" + ], + "features": { + "csharp": { + "description": "Build csharp bindings" + }, + "d3d9": { + "description": "Build Direct3D9 RenderSystem" + }, + "java": { + "description": "Build Java (JNI) bindings" + }, + "python": { + "description": "Build Python bindings", + "dependencies": [ + "python3" + ] + } + } +} diff --git a/vcpkg/ports/ois/CONTROL b/vcpkg/ports/ois/CONTROL new file mode 100644 index 0000000..b43ed59 --- /dev/null +++ b/vcpkg/ports/ois/CONTROL @@ -0,0 +1,4 @@ +Source: ois +Version: 1.5-1 +Description: Cross Platform Object Oriented Input Lib System. Meant to be very robust and compatiable with many systems and operating systems. +Homepage: https://wgois.github.io/OIS/ \ No newline at end of file diff --git a/vcpkg/ports/ois/portfile.cmake b/vcpkg/ports/ois/portfile.cmake new file mode 100644 index 0000000..f35d3d5 --- /dev/null +++ b/vcpkg/ports/ois/portfile.cmake @@ -0,0 +1,28 @@ +# Automatically fail port install for UWP and ARM. Unsure if it is +# supported by library. See here: https://github.com/wgois/OIS/issues/57 +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO wgois/OIS + REF v1.5 + SHA512 5ab1dda7c25c1959ccbbb758ea3fda36bd62ad65f46e2c6b418317a5eb39e0bace52a44ae079dfb69fc58c90df54f8e50d589daae1100ec615325363c9d77513 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Include files should not be duplicated into the /debug/include directory +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/ompl/CONTROL b/vcpkg/ports/ompl/CONTROL new file mode 100644 index 0000000..c82008e --- /dev/null +++ b/vcpkg/ports/ompl/CONTROL @@ -0,0 +1,9 @@ +Source: ompl +Version: 1.5.0 +Homepage: https://bitbucket.org/ompl +Description: The Open Motion Planning Library, consists of many state-of-the-art sampling-based motion planning algorithms +Build-Depends: boost-dynamic-bitset, boost-filesystem, boost-graph, boost-odeint, boost-program-options, boost-serialization, boost-system, boost-test, boost-ublas, boost-timer, eigen3 + +Feature: app +Description: Add support for reading meshes and performing collision checking +Build-Depends: assimp, fcl diff --git a/vcpkg/ports/ompl/portfile.cmake b/vcpkg/ports/ompl/portfile.cmake new file mode 100644 index 0000000..3dab51f --- /dev/null +++ b/vcpkg/ports/ompl/portfile.cmake @@ -0,0 +1,74 @@ +vcpkg_buildpath_length_warning(37) + +set(OMPL_VERSION 1.5.0) + +if("app" IN_LIST FEATURES) + vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/ompl/omplapp/releases/download/1.5.0/omplapp-1.5.0-Source.tar.gz" + FILENAME "omplapp-${OMPL_VERSION}.tar.gz" + SHA512 ad221b67146915cb63be6731ca2fa7d827d85b7fd175d87ee64c799311dfe4878935881b1ae6447357fdd178f70c9aa01b178e857261a8d8769affa1e58ed72b + ) +else() + vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/ompl/ompl/archive/1.5.0.tar.gz" + FILENAME "ompl-${OMPL_VERSION}.tar.gz" + SHA512 a300682fa0af40768c93e44b819c677b6121812e4f968ad89b5ae4044f3171a7febca63fa5645f2ad0f99ec3dfb3b02fe8c7443c4e389bf19a4a4bc9c7a5d013 + ) +endif() + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${OMPL_VERSION} +) + +# Based on selected features different files get downloaded, so use the following command instead of patch. +file(READ ${SOURCE_PATH}/CMakeLists.txt _contents) +string(REPLACE "find_package(Eigen3 REQUIRED)" "find_package(Eigen3 REQUIRED CONFIG)" _contents "${_contents}") +string(REPLACE "find_package(ccd REQUIRED)" "find_package(ccd REQUIRED CONFIG)" _contents "${_contents}") +file(WRITE ${SOURCE_PATH}/CMakeLists.txt "${_contents}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DOMPL_VERSIONED_INSTALL=OFF + -DOMPL_REGISTRATION=OFF + -DOMPL_BUILD_DEMOS=OFF + -DOMPL_BUILD_TESTS=OFF + -DOMPL_BUILD_PYBINDINGS=OFF + -DOMPL_BUILD_PYTESTS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/ompl/cmake) + +# Remove debug distribution and other, move ompl_benchmark to tools/ dir +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/share/man + ${CURRENT_PACKAGES_DIR}/share/ompl/demos + ${CURRENT_PACKAGES_DIR}/share/ompl/ompl.conf + ${CURRENT_PACKAGES_DIR}/share/ompl/plannerarena +) +if ("app" IN_LIST FEATURES) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/ompl) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/ompl_benchmark.exe ${CURRENT_PACKAGES_DIR}/tools/ompl/ompl_benchmark.exe) + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/bin + ${CURRENT_PACKAGES_DIR}/include/omplapp/CMakeFiles + ${CURRENT_PACKAGES_DIR}/share/ompl/resources + ${CURRENT_PACKAGES_DIR}/share/ompl/webapp + ) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/oniguruma/CONTROL b/vcpkg/ports/oniguruma/CONTROL new file mode 100644 index 0000000..8ca0146 --- /dev/null +++ b/vcpkg/ports/oniguruma/CONTROL @@ -0,0 +1,7 @@ +Source: oniguruma +Version: 6.9.4 +Description: Modern and flexible regular expressions library +Homepage: https://github.com/kkos/oniguruma + +Feature: non-posix +Description: Disable POSIX API diff --git a/vcpkg/ports/oniguruma/fix-uwp.patch b/vcpkg/ports/oniguruma/fix-uwp.patch new file mode 100644 index 0000000..5f3fb51 --- /dev/null +++ b/vcpkg/ports/oniguruma/fix-uwp.patch @@ -0,0 +1,26 @@ +diff --git a/src/regcomp.c b/src/regcomp.c +index 69d4b95..380f441 100644 +--- a/src/regcomp.c ++++ b/src/regcomp.c +@@ -3880,7 +3880,7 @@ reduce_string_list(Node* node) + { + Node* prev; + Node* curr; +- Node* prev_node; ++ Node* prev_node = NULL; + Node* next_node; + + prev = NULL_NODE; +diff --git a/src/regexec.c b/src/regexec.c +index ce498c6..6848c0f 100644 +--- a/src/regexec.c ++++ b/src/regexec.c +@@ -4216,7 +4216,7 @@ regset_search_body_position_lead(OnigRegSet* set, + { + int r, n, i; + UChar *s, *prev; +- UChar *low, *high, *low_prev; ++ UChar *low, *high, *low_prev = NULL; + UChar* sch_range; + regex_t* reg; + OnigEncoding enc; diff --git a/vcpkg/ports/oniguruma/portfile.cmake b/vcpkg/ports/oniguruma/portfile.cmake new file mode 100644 index 0000000..aa19762 --- /dev/null +++ b/vcpkg/ports/oniguruma/portfile.cmake @@ -0,0 +1,47 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kkos/oniguruma + REF e03900b038a274ee2f1341039e9003875c11e47d # v6.9.4 + SHA512 77772e3994acbdde86a7405d24423fff101061e24cc8cd85975d3ab092935fc91c0c3b991fe2fa9e9a857b5254db7d923256cdb29a2e2d8a3cdd41837ed690f6 + HEAD_REF master + PATCHES fix-uwp.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES + "non-posix" ENABLE_POSIX_API +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/oniguruma.h + "#if defined(ONIGURUMA_EXPORT)" + "#if 0 // defined(ONIGURUMA_EXPORT)" + ) +else() + # oniguruma.h uses `\n` as line break. + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/oniguruma.h + "#ifndef ONIG_EXTERN\n#if defined(_WIN32) && !defined(__GNUC__)" + "#if 0\n#if defined(_WIN32) && !defined(__GNUC__)" + ) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/open62541/CONTROL b/vcpkg/ports/open62541/CONTROL new file mode 100644 index 0000000..7fe4dfe --- /dev/null +++ b/vcpkg/ports/open62541/CONTROL @@ -0,0 +1,14 @@ +Source: open62541 +Version: 1.1 +Homepage: https://open62541.org +Description: open62541 is an open source C (C99) implementation of OPC UA licensed under the Mozilla Public License v2.0. +Supports: !uwp +Default-Features: openssl + +Feature: openssl +Description: Enable encryption support (uses OpenSSL) +Build-Depends: openssl + +Feature: mbedtls +Description: Enable encryption support (uses MbedTLS) +Build-Depends: mbedtls diff --git a/vcpkg/ports/open62541/portfile.cmake b/vcpkg/ports/open62541/portfile.cmake new file mode 100644 index 0000000..99f12e7 --- /dev/null +++ b/vcpkg/ports/open62541/portfile.cmake @@ -0,0 +1,38 @@ +set(VERSION v1.1) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO open62541/open62541 + REF a524accc338c9611a5ec60bf595c1a587243b457 # v1.1 + SHA512 ee60e6b58f31bb7d4a8875c4390cf54edee83d242b39b1730ee39af0e13c29d4aeb8788294c3da00039d60020a9a2e1e241e1fb389ffe36598116c58a7ffdaba + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + openssl UA_ENABLE_ENCRYPTION_OPENSSL + mbedtls UA_ENABLE_ENCRYPTION_MBEDTLS +) + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) +vcpkg_add_to_path("${PYTHON3_DIR}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DOPEN62541_VERSION=${VERSION} + OPTIONS_DEBUG + -DCMAKE_DEBUG_POSTFIX=d +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/open62541/tools) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/openal-soft/CONTROL b/vcpkg/ports/openal-soft/CONTROL new file mode 100644 index 0000000..a139fb9 --- /dev/null +++ b/vcpkg/ports/openal-soft/CONTROL @@ -0,0 +1,6 @@ +Source: openal-soft +Version: 1.20.1 +Port-Version: 5 +Homepage: https://github.com/kcat/openal-soft +Description: OpenAL Soft is an LGPL-licensed, cross-platform, software implementation of the OpenAL 3D audio API. +Supports: !uwp diff --git a/vcpkg/ports/openal-soft/dont-export-symbols-in-static-build.patch b/vcpkg/ports/openal-soft/dont-export-symbols-in-static-build.patch new file mode 100644 index 0000000..b13b693 --- /dev/null +++ b/vcpkg/ports/openal-soft/dont-export-symbols-in-static-build.patch @@ -0,0 +1,14 @@ +diff --git a/config.h.in b/config.h.in +index 4a1e2b00..d5496972 100644 +--- a/config.h.in ++++ b/config.h.in +@@ -1,6 +1,8 @@ + /* API declaration export attribute */ ++#ifndef AL_LIBTYPE_STATIC + #define AL_API ${EXPORT_DECL} + #define ALC_API ${EXPORT_DECL} ++#endif + + /* Define a restrict macro for non-aliased pointers */ + #define RESTRICT ${RESTRICT_DECL} + \ No newline at end of file diff --git a/vcpkg/ports/openal-soft/fix-arm-builds.patch b/vcpkg/ports/openal-soft/fix-arm-builds.patch new file mode 100644 index 0000000..7b429c4 --- /dev/null +++ b/vcpkg/ports/openal-soft/fix-arm-builds.patch @@ -0,0 +1,63 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 98f9ad49..50b4297f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1193,6 +1193,7 @@ SET_TARGET_PROPERTIES(common PROPERTIES POSITION_INDEPENDENT_CODE TRUE) + UNSET(HAS_ROUTER) + SET(IMPL_TARGET OpenAL) # Either OpenAL or soft_oal. + SET(SUBSYS_FLAG ) ++SET(COMMON_LIB ) + + # Build main library + IF(LIBTYPE STREQUAL "STATIC") +@@ -1203,12 +1204,15 @@ IF(LIBTYPE STREQUAL "STATIC") + ADD_LIBRARY(${IMPL_TARGET} STATIC ${COMMON_OBJS} ${OPENAL_OBJS} ${ALC_OBJS}) + TARGET_LINK_LIBRARIES(${IMPL_TARGET} PRIVATE ${LINKER_FLAGS} ${EXTRA_LIBS} ${MATH_LIB}) + ELSE() ++ SET(COMMON_LIB common) ++ + IF(WIN32) + IF(MSVC) + SET(SUBSYS_FLAG ${SUBSYS_FLAG} "/SUBSYSTEM:WINDOWS") + ELSEIF(CMAKE_COMPILER_IS_GNUCC) + SET(SUBSYS_FLAG ${SUBSYS_FLAG} "-mwindows") + ENDIF() ++ set(COMMON_LIB ${COMMON_LIB} shell32 ole32) + ENDIF() + + SET(RC_CONFIG resources/openal32.rc) +@@ -1223,7 +1227,7 @@ ELSE() + TARGET_COMPILE_DEFINITIONS(OpenAL + PRIVATE AL_BUILD_LIBRARY AL_ALEXT_PROTOTYPES ${CPP_DEFS}) + TARGET_COMPILE_OPTIONS(OpenAL PRIVATE ${C_FLAGS}) +- TARGET_LINK_LIBRARIES(OpenAL PRIVATE common ${LINKER_FLAGS}) ++ TARGET_LINK_LIBRARIES(OpenAL PRIVATE ${COMMON_LIB} ${LINKER_FLAGS}) + TARGET_INCLUDE_DIRECTORIES(OpenAL + PUBLIC + $ +@@ -1248,7 +1252,7 @@ ELSE() + IF(WIN32) + SET_TARGET_PROPERTIES(${IMPL_TARGET} PROPERTIES PREFIX "") + ENDIF() +- TARGET_LINK_LIBRARIES(${IMPL_TARGET} PRIVATE common ${LINKER_FLAGS} ${EXTRA_LIBS} ${MATH_LIB}) ++ TARGET_LINK_LIBRARIES(${IMPL_TARGET} PRIVATE ${COMMON_LIB} ${LINKER_FLAGS} ${EXTRA_LIBS} ${MATH_LIB}) + ENDIF() + + TARGET_INCLUDE_DIRECTORIES(${IMPL_TARGET} +diff --git a/native-tools/CMakeLists.txt b/native-tools/CMakeLists.txt +index 5e816bba..5d7919f6 100644 +--- a/native-tools/CMakeLists.txt ++++ b/native-tools/CMakeLists.txt +@@ -24,6 +24,11 @@ set_target_properties(bsincgen PROPERTIES OUTPUT_NAME bsincgen) + set_target_properties(bsincgen PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}") + set_target_properties(bsincgen PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}") + target_compile_definitions(bsincgen PRIVATE ${CPP_DEFS}) ++set(BSINCGEN_LIB ) + if(HAVE_LIBM) +- target_link_libraries(bsincgen m) ++ set(BSINCGEN_LIB ${BSINCGEN_LIB} m) + endif(HAVE_LIBM) ++if(WIN32) ++ set(BSINCGEN_LIB ${BSINCGEN_LIB} shell32) ++endif() ++target_link_libraries(bsincgen ${BSINCGEN_LIB}) diff --git a/vcpkg/ports/openal-soft/fix-mingw-build.patch b/vcpkg/ports/openal-soft/fix-mingw-build.patch new file mode 100644 index 0000000..ffb2db3 --- /dev/null +++ b/vcpkg/ports/openal-soft/fix-mingw-build.patch @@ -0,0 +1,14 @@ +diff --git a/common/alstring.h b/common/alstring.h +index 194e54a1..5a5f87ed 100644 +--- a/common/alstring.h ++++ b/common/alstring.h +@@ -4,6 +4,9 @@ + #include + #include + ++// This fixes MinGW link errors. It defines strcasecmp and strncasecmp in string.h. ++#include ++ + #include "almalloc.h" + + diff --git a/vcpkg/ports/openal-soft/portfile.cmake b/vcpkg/ports/openal-soft/portfile.cmake new file mode 100644 index 0000000..31ebc6b --- /dev/null +++ b/vcpkg/ports/openal-soft/portfile.cmake @@ -0,0 +1,81 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kcat/openal-soft + REF f5e0eef34db3a3ab94b61a2f99f84f078ba947e7 # openal-soft-1.20.1 + SHA512 3b05e67406e594215bc5a5e684feafa05ae3b6c898f5b91ab923c59688d7bc4f37f7a9f3bbc8ae252f8997d2588dc2766f44866eb095f0f53cb42030596d26a5 + HEAD_REF master + PATCHES + dont-export-symbols-in-static-build.patch + fix-arm-builds.patch + fix-mingw-build.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(OPENAL_LIBTYPE "SHARED") +else() + set(OPENAL_LIBTYPE "STATIC") +endif() + +set(ALSOFT_REQUIRE_LINUX OFF) +set(ALSOFT_REQUIRE_WINDOWS OFF) +set(ALSOFT_REQUIRE_OSX OFF) + +if(VCPKG_TARGET_IS_LINUX) + set(ALSOFT_REQUIRE_LINUX ON) +endif() +if(VCPKG_TARGET_IS_WINDOWS) + set(ALSOFT_REQUIRE_WINDOWS ON) +endif() +if(VCPKG_TARGET_IS_OSX) + set(ALSOFT_REQUIRE_OSX ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DLIBTYPE=${OPENAL_LIBTYPE} + -DALSOFT_UTILS=OFF + -DALSOFT_NO_CONFIG_UTIL=ON + -DALSOFT_EXAMPLES=OFF + -DALSOFT_TESTS=OFF + -DALSOFT_CONFIG=OFF + -DALSOFT_HRTF_DEFS=OFF + -DALSOFT_AMBDEC_PRESETS=OFF + -DALSOFT_BACKEND_ALSA=${ALSOFT_REQUIRE_LINUX} + -DALSOFT_BACKEND_OSS=OFF + -DALSOFT_BACKEND_SOLARIS=OFF + -DALSOFT_BACKEND_SNDIO=OFF + -DALSOFT_BACKEND_QSA=OFF + -DALSOFT_BACKEND_PORTAUDIO=OFF + -DALSOFT_BACKEND_PULSEAUDIO=OFF + -DALSOFT_BACKEND_COREAUDIO=${ALSOFT_REQUIRE_OSX} + -DALSOFT_BACKEND_JACK=OFF + -DALSOFT_BACKEND_OPENSL=OFF + -DALSOFT_BACKEND_WAVE=ON + -DALSOFT_REQUIRE_WINMM=${ALSOFT_REQUIRE_WINDOWS} + -DALSOFT_REQUIRE_DSOUND=${ALSOFT_REQUIRE_WINDOWS} + -DALSOFT_REQUIRE_MMDEVAPI=${ALSOFT_REQUIRE_WINDOWS} + -DALSOFT_CPUEXT_NEON=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_WindowsSDK=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/OpenAL) + +foreach(HEADER al.h alc.h) + file(READ ${CURRENT_PACKAGES_DIR}/include/AL/${HEADER} AL_H) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined(AL_LIBTYPE_STATIC)" "1" AL_H "${AL_H}") + else() + string(REPLACE "defined(AL_LIBTYPE_STATIC)" "0" AL_H "${AL_H}") + endif() + file(WRITE ${CURRENT_PACKAGES_DIR}/include/AL/${HEADER} "${AL_H}") +endforeach() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/openal-soft/usage b/vcpkg/ports/openal-soft/usage new file mode 100644 index 0000000..1807fb9 --- /dev/null +++ b/vcpkg/ports/openal-soft/usage @@ -0,0 +1,4 @@ +The package openal-soft provides CMake targets: + + find_package(OpenAL CONFIG REQUIRED) + target_link_libraries(main PRIVATE OpenAL::OpenAL) diff --git a/vcpkg/ports/openblas/CONTROL b/vcpkg/ports/openblas/CONTROL new file mode 100644 index 0000000..898b74e --- /dev/null +++ b/vcpkg/ports/openblas/CONTROL @@ -0,0 +1,5 @@ +Source: openblas +Version: 0.3.10 +Homepage: https://github.com/xianyi/OpenBLAS +Build-Depends: pthread (!windows&!uwp) +Description: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version. diff --git a/vcpkg/ports/openblas/fix-pkg-config.patch b/vcpkg/ports/openblas/fix-pkg-config.patch new file mode 100644 index 0000000..9ed84d1 --- /dev/null +++ b/vcpkg/ports/openblas/fix-pkg-config.patch @@ -0,0 +1,19 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c324e224..4b82d767 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -389,11 +389,9 @@ if(NOT NO_LAPACKE) + install (FILES ${CMAKE_BINARY_DIR}/lapacke_mangling.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openblas${SUFFIX64}) + endif() + +-include(FindPkgConfig QUIET) +-if(PKG_CONFIG_FOUND) +- configure_file(${PROJECT_SOURCE_DIR}/cmake/openblas.pc.in ${PROJECT_BINARY_DIR}/openblas${SUFFIX64}.pc @ONLY) +- install (FILES ${PROJECT_BINARY_DIR}/openblas${SUFFIX64}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/) +-endif() ++# Install pkg-config files ++configure_file(${PROJECT_SOURCE_DIR}/cmake/openblas.pc.in ${PROJECT_BINARY_DIR}/openblas${SUFFIX64}.pc @ONLY) ++install (FILES ${PROJECT_BINARY_DIR}/openblas${SUFFIX64}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/) + + + # GNUInstallDirs "DATADIR" wrong here; CMake search path wants "share". diff --git a/vcpkg/ports/openblas/fix-redefinition-function.patch b/vcpkg/ports/openblas/fix-redefinition-function.patch new file mode 100644 index 0000000..176a29f --- /dev/null +++ b/vcpkg/ports/openblas/fix-redefinition-function.patch @@ -0,0 +1,28 @@ +diff --git a/openblas_config_template.h b/openblas_config_template.h +index 52dd49d..239219d 100644 +--- a/openblas_config_template.h ++++ b/openblas_config_template.h +@@ -64,6 +64,7 @@ typedef int blasint; + #ifndef __cplusplus + #include + #endif ++ #ifndef OPENBLAS_COMPLEX_STRUCT + typedef float _Complex openblas_complex_float; + typedef double _Complex openblas_complex_double; + typedef xdouble _Complex openblas_complex_xdouble; +@@ -76,7 +77,9 @@ typedef int blasint; + #define openblas_complex_double_imag(z) (cimag(z)) + #define openblas_complex_xdouble_real(z) (creal(z)) + #define openblas_complex_xdouble_imag(z) (cimag(z)) ++ #endif + #else ++ #ifndef OPENBLAS_COMPLEX_STRUCT + #define OPENBLAS_COMPLEX_STRUCT + typedef struct { float real, imag; } openblas_complex_float; + typedef struct { double real, imag; } openblas_complex_double; +@@ -90,4 +93,5 @@ typedef int blasint; + #define openblas_complex_double_imag(z) ((z).imag) + #define openblas_complex_xdouble_real(z) ((z).real) + #define openblas_complex_xdouble_imag(z) ((z).imag) ++ #endif + #endif diff --git a/vcpkg/ports/openblas/fix-space-path.patch b/vcpkg/ports/openblas/fix-space-path.patch new file mode 100644 index 0000000..b782a99 --- /dev/null +++ b/vcpkg/ports/openblas/fix-space-path.patch @@ -0,0 +1,43 @@ +diff --git a/cmake/prebuild.cmake b/cmake/prebuild.cmake +index 58ca1eb..e2f2134 100644 +--- a/cmake/prebuild.cmake ++++ b/cmake/prebuild.cmake +@@ -490,14 +490,14 @@ else(NOT CMAKE_CROSSCOMPILING) + + set(GETARCH_DIR "${PROJECT_BINARY_DIR}/getarch_build") + set(GETARCH_BIN "getarch${CMAKE_EXECUTABLE_SUFFIX}") +- file(MAKE_DIRECTORY ${GETARCH_DIR}) +- configure_file(${TARGET_CONF_TEMP} ${GETARCH_DIR}/${TARGET_CONF} COPYONLY) ++ file(MAKE_DIRECTORY "${GETARCH_DIR}") ++ configure_file(${TARGET_CONF_TEMP} "${GETARCH_DIR}/${TARGET_CONF}" COPYONLY) + if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore") +- try_compile(GETARCH_RESULT ${GETARCH_DIR} ++ try_compile(GETARCH_RESULT "${GETARCH_DIR}" + SOURCES ${GETARCH_SRC} + COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} -I"${GETARCH_DIR}" -I"${PROJECT_SOURCE_DIR}" -I"${PROJECT_BINARY_DIR}" + OUTPUT_VARIABLE GETARCH_LOG +- COPY_FILE ${PROJECT_BINARY_DIR}/${GETARCH_BIN} ++ COPY_FILE "${PROJECT_BINARY_DIR}/${GETARCH_BIN}" + ) + + if (NOT ${GETARCH_RESULT}) +@@ -518,14 +518,14 @@ execute_process(COMMAND "${BLASHELPER_BINARY_DIR}/${GETARCH_BIN}" 1 OUTPUT_VARIA + + set(GETARCH2_DIR "${PROJECT_BINARY_DIR}/getarch2_build") + set(GETARCH2_BIN "getarch_2nd${CMAKE_EXECUTABLE_SUFFIX}") +- file(MAKE_DIRECTORY ${GETARCH2_DIR}) +- configure_file(${TARGET_CONF_TEMP} ${GETARCH2_DIR}/${TARGET_CONF} COPYONLY) ++ file(MAKE_DIRECTORY "${GETARCH2_DIR}") ++ configure_file(${TARGET_CONF_TEMP} "${GETARCH2_DIR}/${TARGET_CONF}" COPYONLY) + if (NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore") +- try_compile(GETARCH2_RESULT ${GETARCH2_DIR} +- SOURCES ${PROJECT_SOURCE_DIR}/getarch_2nd.c ++ try_compile(GETARCH2_RESULT "${GETARCH2_DIR}" ++ SOURCES "${PROJECT_SOURCE_DIR}/getarch_2nd.c" + COMPILE_DEFINITIONS ${EXFLAGS} ${GETARCH_FLAGS} ${GETARCH2_FLAGS} -I"${GETARCH2_DIR}" -I"${PROJECT_SOURCE_DIR}" -I"${PROJECT_BINARY_DIR}" + OUTPUT_VARIABLE GETARCH2_LOG +- COPY_FILE ${PROJECT_BINARY_DIR}/${GETARCH2_BIN} ++ COPY_FILE "${PROJECT_BINARY_DIR}/${GETARCH2_BIN}" + ) + + if (NOT ${GETARCH2_RESULT}) diff --git a/vcpkg/ports/openblas/fix-uwp-build.patch b/vcpkg/ports/openblas/fix-uwp-build.patch new file mode 100644 index 0000000..7604cf7 --- /dev/null +++ b/vcpkg/ports/openblas/fix-uwp-build.patch @@ -0,0 +1,35 @@ +diff --git a/common_stackalloc.h b/common_stackalloc.h +index d3d5466..cd157fc 100644 +--- a/common_stackalloc.h ++++ b/common_stackalloc.h +@@ -36,7 +36,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #define STACK_ALLOC_PROTECT_CHECK + #endif + +-#if defined(MAX_STACK_ALLOC) && MAX_STACK_ALLOC > 0 ++#if defined(MAX_STACK_ALLOC) && MAX_STACK_ALLOC > 0 && !(defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)) + + /* + * Allocate a buffer on the stack if the size is smaller than MAX_STACK_ALLOC. +@@ -63,7 +63,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #endif + + +-#if defined(MAX_STACK_ALLOC) && MAX_STACK_ALLOC > 0 ++#if defined(MAX_STACK_ALLOC) && MAX_STACK_ALLOC > 0 && !(defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)) + #define STACK_FREE(BUFFER) \ + STACK_ALLOC_PROTECT_CHECK \ + if(!stack_alloc_size) \ +diff --git a/interface/zgemv.c b/interface/zgemv.c +index 3e98dba..ee597f7 100644 +--- a/interface/zgemv.c ++++ b/interface/zgemv.c +@@ -244,7 +244,7 @@ void CNAME(enum CBLAS_ORDER order, + buffer_size = (buffer_size + 3) & ~3; + STACK_ALLOC(buffer_size, FLOAT, buffer); + +-#if defined(ARCH_X86_64) && defined(MAX_STACK_ALLOC) && MAX_STACK_ALLOC > 0 ++#if defined(ARCH_X86_64) && defined(MAX_STACK_ALLOC) && MAX_STACK_ALLOC > 0 && !(defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)) + // cgemv_t.S return NaN if there are NaN or Inf in the buffer (see bug #746) + if(trans && stack_alloc_size) + memset(buffer, 0, MIN(BUFFER_SIZE, sizeof(FLOAT) * buffer_size)); diff --git a/vcpkg/ports/openblas/openblas_common.h b/vcpkg/ports/openblas/openblas_common.h new file mode 100644 index 0000000..9b798e5 --- /dev/null +++ b/vcpkg/ports/openblas/openblas_common.h @@ -0,0 +1,60 @@ +#pragma once +#include "openblas/openblas_config.h" + +#if defined(OPENBLAS_OS_WINNT) || defined(OPENBLAS_OS_CYGWIN_NT) || defined(OPENBLAS_OS_INTERIX) +#define OPENBLAS_WINDOWS_ABI +#define OPENBLAS_OS_WINDOWS + +#ifdef DOUBLE +#define DOUBLE_DEFINED DOUBLE +#undef DOUBLE +#endif +#endif + +#ifdef NEEDBUNDERSCORE +#define BLASFUNC(FUNC) FUNC##_ + +#else +#define BLASFUNC(FUNC) FUNC +#endif + + +#ifdef OPENBLAS_QUAD_PRECISION +typedef struct { + unsigned long x[2]; +} xdouble; +#elif defined OPENBLAS_EXPRECISION +#define xdouble long double +#else +#define xdouble double +#endif + +#if defined(OS_WINNT) && defined(__64BIT__) +typedef long long BLASLONG; +typedef unsigned long long BLASULONG; +#else +typedef long BLASLONG; +typedef unsigned long BLASULONG; +#endif + +#ifdef OPENBLAS_USE64BITINT +typedef BLASLONG blasint; +#else +typedef int blasint; +#endif + +#if defined(XDOUBLE) || defined(DOUBLE) +#define FLOATRET FLOAT +#else +#ifdef NEED_F2CCONV +#define FLOATRET double +#else +#define FLOATRET float +#endif +#endif + + +/* Inclusion of a standard header file is needed for definition of __STDC_* + predefined macros with some compilers (e.g. GCC 4.7 on Linux). This occurs + as a side effect of including either or . */ +#include diff --git a/vcpkg/ports/openblas/portfile.cmake b/vcpkg/ports/openblas/portfile.cmake new file mode 100644 index 0000000..81f45c3 --- /dev/null +++ b/vcpkg/ports/openblas/portfile.cmake @@ -0,0 +1,121 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xianyi/OpenBLAS + REF 63b03efc2af332c88b86d4fd8079d00f4b439adf # v0.3.10 + SHA512 269852348e042fe32d0d400d5e6f4cf758024389d3966a9b1bc217061d4a03b3a7003a399212130ec4e783f1e1e5b423eb531e6e0948485b5d5ac9fdc58982cb + HEAD_REF develop + PATCHES + uwp.patch + fix-space-path.patch + fix-redefinition-function.patch + fix-pkg-config.patch + fix-uwp-build.patch +) + +find_program(GIT NAMES git git.cmd) + +# sed and awk are installed with git but in a different directory +get_filename_component(GIT_EXE_PATH ${GIT} DIRECTORY) +set(SED_EXE_PATH "${GIT_EXE_PATH}/../usr/bin") + +# openblas require perl to generate .def for exports +vcpkg_find_acquire_program(PERL) +get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) +set(PATH_BACKUP "$ENV{PATH}") +vcpkg_add_to_path("${PERL_EXE_PATH}") +vcpkg_add_to_path("${SED_EXE_PATH}") + +set(COMMON_OPTIONS -DBUILD_WITHOUT_LAPACK=ON) + +# for UWP version, must build non uwp first for helper +# binaries. +if(VCPKG_TARGET_IS_UWP) + message(STATUS "Building Windows helper files") + set(TEMP_CMAKE_SYSTEM_NAME "${VCPKG_CMAKE_SYSTEM_NAME}") + set(TEMP_CMAKE_SYSTEM_VERSION "${VCPKG_CMAKE_SYSTEM_VERSION}") + set(TEMP_TARGET_TRIPLET "${TARGET_TRIPLET}") + unset(VCPKG_CMAKE_SYSTEM_NAME) + unset(VCPKG_CMAKE_SYSTEM_VERSION) + set(TARGET_TRIPLET "x64-windows") + + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + ${COMMON_OPTIONS} + -DTARGET=NEHALEM + ) + + # add just built path to environment for gen_config_h.exe, + # getarch.exe and getarch_2nd.exe + vcpkg_add_to_path("${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + + # restore target build information + set(VCPKG_CMAKE_SYSTEM_NAME "${TEMP_CMAKE_SYSTEM_NAME}") + set(VCPKG_CMAKE_SYSTEM_VERSION "${TEMP_CMAKE_SYSTEM_VERSION}") + set(TARGET_TRIPLET "${TEMP_TARGET_TRIPLET}") + + message(STATUS "Finished building Windows helper files") + + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + ${COMMON_OPTIONS} + -DCMAKE_SYSTEM_PROCESSOR=AMD64 + -DVS_WINRT_COMPONENT=TRUE + "-DBLASHELPER_BINARY_DIR=${CURRENT_BUILDTREES_DIR}/x64-windows-rel") + +elseif(VCPKG_TARGET_IS_WINDOWS) + vcpkg_configure_cmake( + PREFER_NINJA + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + ${COMMON_OPTIONS}) +else() + list(APPEND VCPKG_C_FLAGS "-DNEEDBUNDERSCORE") # Required to get common BLASFUNC to append extra _ + list(APPEND VCPKG_CXX_FLAGS "-DNEEDBUNDERSCORE") + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + ${COMMON_OPTIONS} + -DCMAKE_SYSTEM_PROCESSOR=AMD64 + -DNOFORTRAN=ON + -DBU=_ #required for all blas functions to append extra _ using NAME + ) +endif() + + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/OpenBLAS TARGET_PATH share/openblas) +set(ENV{PATH} "${PATH_BACKUP}") + +set(pcfile "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/openblas.pc") +if(EXISTS "${pcfile}") + file(READ "${pcfile}" _contents) + set(_contents "prefix=${CURRENT_INSTALLED_DIR}\n${_contents}") + file(WRITE "${pcfile}" "${_contents}") + #file(CREATE_LINK "${pcfile}" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/blas.pc" COPY_ON_ERROR) +endif() +set(pcfile "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/openblas.pc") +if(EXISTS "${pcfile}") + file(READ "${pcfile}" _contents) + set(_contents "prefix=${CURRENT_INSTALLED_DIR}/debug\n${_contents}") + file(WRITE "${pcfile}" "${_contents}") + #file(CREATE_LINK "${pcfile}" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/blas.pc" COPY_ON_ERROR) +endif() +vcpkg_fixup_pkgconfig() +#maybe we need also to write a wrapper inside share/blas to search implicitly for openblas, whenever we feel it's ready for its own -config.cmake file + +# openblas do not make the config file , so I manually made this +# but I think in most case, libraries will not include these files, they define their own used function prototypes +# this is only to quite vcpkg +file(COPY ${CMAKE_CURRENT_LIST_DIR}/openblas_common.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(READ ${SOURCE_PATH}/cblas.h CBLAS_H) +string(REPLACE "#include \"common.h\"" "#include \"openblas_common.h\"" CBLAS_H "${CBLAS_H}") +file(WRITE ${CURRENT_PACKAGES_DIR}/include/cblas.h "${CBLAS_H}") + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/openblas/uwp.patch b/vcpkg/ports/openblas/uwp.patch new file mode 100644 index 0000000..50a8e9b --- /dev/null +++ b/vcpkg/ports/openblas/uwp.patch @@ -0,0 +1,50 @@ +diff --git a/cmake/prebuild.cmake b/cmake/prebuild.cmake +--- a/cmake/prebuild.cmake 2019-01-28 03:05:58.422245700 -0600 ++++ b/cmake/prebuild.cmake 2019-01-28 03:07:02.885495800 -0600 +@@ -37,6 +37,9 @@ + + # CPUIDEMU = ../../cpuid/table.o + ++if (NOT DEFINED BLASHELPER_BINARY_DIR) ++ set(BLASHELPER_BINARY_DIR "${PROJECT_BINARY_DIR}") ++endif () + + if (DEFINED CPUIDEMU) + set(EXFLAGS "-DCPUIDEMU -DVENDOR=99") +@@ -310,8 +313,8 @@ else(NOT CMAKE_CROSSCOMPILING) + message(STATUS "Running getarch") + + # use the cmake binary w/ the -E param to run a shell command in a cross-platform way +-execute_process(COMMAND "${PROJECT_BINARY_DIR}/${GETARCH_BIN}" 0 OUTPUT_VARIABLE GETARCH_MAKE_OUT) +-execute_process(COMMAND "${PROJECT_BINARY_DIR}/${GETARCH_BIN}" 1 OUTPUT_VARIABLE GETARCH_CONF_OUT) ++execute_process(COMMAND "${BLASHELPER_BINARY_DIR}/${GETARCH_BIN}" 0 OUTPUT_VARIABLE GETARCH_MAKE_OUT) ++execute_process(COMMAND "${BLASHELPER_BINARY_DIR}/${GETARCH_BIN}" 1 OUTPUT_VARIABLE GETARCH_CONF_OUT) + + message(STATUS "GETARCH results:\n${GETARCH_MAKE_OUT}") + +@@ -337,8 +340,8 @@ execute_process(COMMAND "${PROJECT_BINAR + endif () + + # use the cmake binary w/ the -E param to run a shell command in a cross-platform way +-execute_process(COMMAND "${PROJECT_BINARY_DIR}/${GETARCH2_BIN}" 0 OUTPUT_VARIABLE GETARCH2_MAKE_OUT) +-execute_process(COMMAND "${PROJECT_BINARY_DIR}/${GETARCH2_BIN}" 1 OUTPUT_VARIABLE GETARCH2_CONF_OUT) ++execute_process(COMMAND "${BLASHELPER_BINARY_DIR}/${GETARCH2_BIN}" 0 OUTPUT_VARIABLE GETARCH2_MAKE_OUT) ++execute_process(COMMAND "${BLASHELPER_BINARY_DIR}/${GETARCH2_BIN}" 1 OUTPUT_VARIABLE GETARCH2_CONF_OUT) + + # append config data from getarch_2nd to the TARGET file and read in CMake vars + file(APPEND ${TARGET_CONF_TEMP} ${GETARCH2_CONF_OUT}) + +diff --git a/cmake/system.cmake b/cmake/system.cmake +index a060d98..52ffa5a 100644 +--- a/cmake/system.cmake ++++ b/cmake/system.cmake +@@ -13,6 +13,9 @@ if(CMAKE_CROSSCOMPILING AND NOT DEFINED TARGET) + set(TARGET "ARMV8") + elseif(ARM) + set(TARGET "ARMV7") # TODO: Ask compiler which arch this is ++ elseif(${HOST_OS} STREQUAL "WINDOWSSTORE") ++ set(CMAKE_CROSSCOMPILING 0) ++ add_definitions(-D_CRT_SECURE_NO_WARNINGS=1) + else() + message(FATAL_ERROR "When cross compiling, a TARGET is required.") + endif() diff --git a/vcpkg/ports/opencascade/CONTROL b/vcpkg/ports/opencascade/CONTROL new file mode 100644 index 0000000..21c5148 --- /dev/null +++ b/vcpkg/ports/opencascade/CONTROL @@ -0,0 +1,13 @@ +Source: opencascade +Version: 7.4.0 +Build-Depends: freetype +Description: Open CASCADE Technology (OCCT) is an open-source software development platform for 3D CAD, CAM, CAE. +Supports: !(uwp|osx|linux|arm|static) + +Feature: freeimage +Build-Depends: freeimage +Description: Enable optional usage of freeimage + +Feature: tbb +Build-Depends: tbb +Description: Enable optional usage of tbb \ No newline at end of file diff --git a/vcpkg/ports/opencascade/fix-msvc-32bit-builds.patch b/vcpkg/ports/opencascade/fix-msvc-32bit-builds.patch new file mode 100644 index 0000000..2fa76ff --- /dev/null +++ b/vcpkg/ports/opencascade/fix-msvc-32bit-builds.patch @@ -0,0 +1,22 @@ + adm/cmake/occt_defs_flags.cmake | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/adm/cmake/occt_defs_flags.cmake b/adm/cmake/occt_defs_flags.cmake +index 5484c67..203ca6b 100644 +--- a/adm/cmake/occt_defs_flags.cmake ++++ b/adm/cmake/occt_defs_flags.cmake +@@ -16,6 +16,14 @@ if (MSVC) + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fp:precise") + endif() + ++# Turn off the "improved inline analyzer" that stalls on x86 release builds using MSVC 16.7 for 32-bit ++if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8) ++ if (MSVC) ++ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /d2DeepThoughtInliner-") ++ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /d2DeepThoughtInliner-") ++ endif() ++endif() ++ + # add SSE2 option for old MSVC compilers (VS 2005 - 2010, 32 bit only) + if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8) + if (MSVC AND ((MSVC_VERSION EQUAL 1400) OR (MSVC_VERSION EQUAL 1500) OR (MSVC_VERSION EQUAL 1600))) diff --git a/vcpkg/ports/opencascade/portfile.cmake b/vcpkg/ports/opencascade/portfile.cmake new file mode 100644 index 0000000..126122c --- /dev/null +++ b/vcpkg/ports/opencascade/portfile.cmake @@ -0,0 +1,58 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP" "OSX" "Linux") +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Open-Cascade-SAS/OCCT + REF V7_4_0 + SHA512 595ad7226b9365c1a7670b77001f71787a5d8aaa4a93a4a4d8eb938564670d79ae5a247ae7cc770b5da53c9a9f2e4166ba6e5ae104c1f2debad19ec2187f4a56 + HEAD_REF master + PATCHES fix-msvc-32bit-builds.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + "freeimage" USE_FREEIMAGE + "tbb" USE_TBB +) + +# VTK option in opencascade not currently supported because only 6.1.0 is supported but vcpkg has >= 9.0 + + +# We turn off BUILD_MODULE_Draw as it requires TCL 8.6 and TK 8.6 specifically which conflicts with vcpkg only having TCL 9.0 +# And pre-built ActiveTCL binaries are behind a marketing wall :( +# We use the Unix install layout for Windows as it matches vcpkg +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_LIBRARY_TYPE="Shared" + -DBUILD_MODULE_Draw=OFF + -DINSTALL_DIR_LAYOUT=Unix + -DBUILD_SAMPLES_MFC=OFF + -DBUILD_SAMPLES_QT=OFF + -DBUILD_DOC_Overview=OFF + ## Options from vcpkg_check_features() + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/opencascade TARGET_PATH share/opencascade) + +# debug creates libd and bind directories that need moving +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bind ${CURRENT_PACKAGES_DIR}/debug/bin) + +# Remove libd to lib, libd just has cmake files we dont want too +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib) +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/libd ${CURRENT_PACKAGES_DIR}/debug/lib) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# the bin directory ends up with bat files that are noise, let's clean that up +file(GLOB BATS ${CURRENT_PACKAGES_DIR}/bin/*.bat) +file(REMOVE_RECURSE ${BATS}) + + +file(INSTALL ${SOURCE_PATH}/OCCT_LGPL_EXCEPTION.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/opencc/CONTROL b/vcpkg/ports/opencc/CONTROL new file mode 100644 index 0000000..ab49052 --- /dev/null +++ b/vcpkg/ports/opencc/CONTROL @@ -0,0 +1,9 @@ +Source: opencc +Version: 2020-04-26 +Port-Version: 7 +Description: A project for conversion between Traditional and Simplified Chinese +Homepage: https://github.com/BYVoid/OpenCC +Supports: !(arm|arm64|uwp) + +Feature: tools +Description: Build OpenCC command-line tools diff --git a/vcpkg/ports/opencc/portfile.cmake b/vcpkg/ports/opencc/portfile.cmake new file mode 100644 index 0000000..c67b2d3 --- /dev/null +++ b/vcpkg/ports/opencc/portfile.cmake @@ -0,0 +1,52 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO BYVoid/OpenCC + REF e8ec6d59f264a4a42e310148a9534a8cc0123928 + SHA512 e6b3f6d681223b299795c324a48e82609abd1f411d3cbd5f9d8607284ec04717fa9878953d037c25a931a0857f50a5c0e883e0d44ddbea18c50830ad49514c59 + HEAD_REF master +) + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_DIR ${PYTHON3} DIRECTORY) +vcpkg_add_to_path(${PYTHON3_DIR}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_DOCUMENTATION=OFF + -DENABLE_GTEST=OFF +) + +vcpkg_install_cmake( + DISABLE_PARALLEL +) + +vcpkg_copy_pdbs() + +if(tools IN_LIST FEATURES) + foreach(opencc_tool opencc opencc_dict opencc_phrase_extract) + file(COPY + ${CURRENT_PACKAGES_DIR}/bin/${opencc_tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX} + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT} + ) + endforeach() + + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +else() + foreach(opencc_tool opencc opencc_dict opencc_phrase_extract) + file(REMOVE + ${CURRENT_PACKAGES_DIR}/bin/${opencc_tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX} + ${CURRENT_PACKAGES_DIR}/debug/bin/${opencc_tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX} + ) + endforeach() +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/opencensus-cpp/CONTROL b/vcpkg/ports/opencensus-cpp/CONTROL new file mode 100644 index 0000000..bb0e4e0 --- /dev/null +++ b/vcpkg/ports/opencensus-cpp/CONTROL @@ -0,0 +1,9 @@ +Source: opencensus-cpp +Version: 0.4.0-1 +Homepage: https://github.com/census-instrumentation/opencensus-cpp +Description: OpenCensus is a toolkit for collecting application performance and behavior data. It currently includes an API for tracing and stats. +Build-Depends: abseil +Supports: !windows + +Feature: test +Description: Build test \ No newline at end of file diff --git a/vcpkg/ports/opencensus-cpp/fix-install.patch b/vcpkg/ports/opencensus-cpp/fix-install.patch new file mode 100644 index 0000000..ac8781d --- /dev/null +++ b/vcpkg/ports/opencensus-cpp/fix-install.patch @@ -0,0 +1,154 @@ +diff --git a/cmake/OpenCensusHelpers.cmake b/cmake/OpenCensusHelpers.cmake +index c8d35e6..a15231a 100644 +--- a/cmake/OpenCensusHelpers.cmake ++++ b/cmake/OpenCensusHelpers.cmake +@@ -38,6 +38,13 @@ function(opencensus_test NAME SRC) + gmock + gtest_main) + add_test(NAME ${_NAME} COMMAND ${_NAME}) ++ ++ install( ++ TARGETS ${_NAME} ++ RUNTIME DESTINATION tools ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ ) + endif() + endfunction() + +@@ -51,6 +58,13 @@ function(opencensus_benchmark NAME SRC) + add_executable(${_NAME} ${SRC}) + prepend_opencensus(DEPS "${ARGN}") + target_link_libraries(${_NAME} "${DEPS}" benchmark) ++ ++ install( ++ TARGETS ${_NAME} ++ RUNTIME DESTINATION tools ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ ) + endif() + endfunction() + +@@ -76,6 +90,13 @@ function(opencensus_lib NAME) + if(ARG_PUBLIC) + add_library(${PROJECT_NAME}::${NAME} ALIAS ${_NAME}) + endif() ++ ++ install( ++ TARGETS ${_NAME} ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ ) + endfunction() + + # Helper function for fuzzing. Usage: +@@ -88,5 +109,12 @@ function(opencensus_fuzzer NAME SRC) + prepend_opencensus(DEPS "${ARGN}") + target_link_libraries(${_NAME} "${DEPS}" ${FUZZER}) + target_compile_options(${_NAME} PRIVATE ${FUZZER}) ++ ++ install( ++ TARGETS ${_NAME} ++ RUNTIME DESTINATION tools ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ ) + endif() + endfunction() +diff --git a/examples/helloworld/CMakeLists.txt b/examples/helloworld/CMakeLists.txt +index 456169f..71e43d1 100644 +--- a/examples/helloworld/CMakeLists.txt ++++ b/examples/helloworld/CMakeLists.txt +@@ -22,3 +22,10 @@ target_link_libraries(opencensus_examples_helloworld + opencensus-cpp::stats + opencensus-cpp::trace + Threads::Threads) ++ ++install( ++ TARGETS opencensus_examples_helloworld ++ RUNTIME DESTINATION tools ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) +\ No newline at end of file +diff --git a/opencensus/common/internal/CMakeLists.txt b/opencensus/common/internal/CMakeLists.txt +index c18859d..55a1121 100644 +--- a/opencensus/common/internal/CMakeLists.txt ++++ b/opencensus/common/internal/CMakeLists.txt +@@ -21,6 +21,8 @@ opencensus_lib(common_random + absl::base + absl::synchronization + absl::time) ++ ++install(FILES ${CMAKE_CURRENT_LIST_DIR}/../version.h DESTINATION include/opencensus-cpp/common/internal) + + opencensus_lib(common_stats_object DEPS absl::time) + +diff --git a/opencensus/context/CMakeLists.txt b/opencensus/context/CMakeLists.txt +index 525885b..537de02 100644 +--- a/opencensus/context/CMakeLists.txt ++++ b/opencensus/context/CMakeLists.txt +@@ -21,6 +21,10 @@ opencensus_lib(context + tags + trace) + ++install(FILES ${CMAKE_CURRENT_LIST_DIR}/context.h ++ ${CMAKE_CURRENT_LIST_DIR}/with_context.h ++ DESTINATION include/opencensus-cpp/context) ++ + opencensus_test(context_context_test + internal/context_test.cc + context +diff --git a/opencensus/exporters/stats/prometheus/CMakeLists.txt b/opencensus/exporters/stats/prometheus/CMakeLists.txt +index 4da7de7..39121f5 100644 +--- a/opencensus/exporters/stats/prometheus/CMakeLists.txt ++++ b/opencensus/exporters/stats/prometheus/CMakeLists.txt +@@ -28,6 +28,8 @@ opencensus_lib(exporters_stats_prometheus_utils + absl::strings + absl::time + prometheus-cpp::core) ++ ++install(FILES ${CMAKE_CURRENT_LIST_DIR}/prometheus_exporter.h DESTINATION include/opencensus-cpp/exporters/stats/prometheus) + + opencensus_test(exporters_stats_prometheus_utils_test + internal/prometheus_utils_test.cc +diff --git a/opencensus/exporters/stats/stdout/CMakeLists.txt b/opencensus/exporters/stats/stdout/CMakeLists.txt +index b4f3110..31bc991 100644 +--- a/opencensus/exporters/stats/stdout/CMakeLists.txt ++++ b/opencensus/exporters/stats/stdout/CMakeLists.txt +@@ -21,6 +21,8 @@ opencensus_lib(exporters_stats_stdout + absl::memory + absl::strings + absl::time) ++ ++install(FILES ${CMAKE_CURRENT_LIST_DIR}/stdout_exporter.h DESTINATION include/opencensus-cpp/exporters/stats/stdout) + + opencensus_test(exporters_stats_stdout_test + internal/stdout_exporter_test.cc +diff --git a/opencensus/exporters/trace/stdout/CMakeLists.txt b/opencensus/exporters/trace/stdout/CMakeLists.txt +index 2b8bc78..fce50e7 100644 +--- a/opencensus/exporters/trace/stdout/CMakeLists.txt ++++ b/opencensus/exporters/trace/stdout/CMakeLists.txt +@@ -21,6 +21,7 @@ opencensus_lib(exporters_trace_stdout + absl::base + absl::memory) + ++install(FILES ${CMAKE_CURRENT_LIST_DIR}/stdout_exporter.h DESTINATION include/opencensus-cpp/exporters/trace/stdout) + opencensus_test(exporters_trace_stdout_test + internal/stdout_exporter_test.cc + exporters_trace_stdout +diff --git a/opencensus/tags/CMakeLists.txt b/opencensus/tags/CMakeLists.txt +index dbc4c9b..1b304ce 100644 +--- a/opencensus/tags/CMakeLists.txt ++++ b/opencensus/tags/CMakeLists.txt +@@ -40,6 +40,8 @@ opencensus_lib(tags_with_tag_map + context + absl::strings) + ++file(GLOB TAGS_HDRS ${CMAKE_CURRENT_LIST_DIR}/*.h) ++install(FILES ${TAGS_HDRS} DESTINATION include/opencensus-cpp/tags) + opencensus_test(tags_context_util_test + internal/context_util_test.cc + tags diff --git a/vcpkg/ports/opencensus-cpp/portfile.cmake b/vcpkg/ports/opencensus-cpp/portfile.cmake new file mode 100644 index 0000000..be9283a --- /dev/null +++ b/vcpkg/ports/opencensus-cpp/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_fail_port_install(ON_TARGET "Windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO census-instrumentation/opencensus-cpp + REF 2b0725c2d0f809351300c634c54e70e0a8c3f4ed #v0.4.0 + SHA512 16f3975ed0580aec83e0dd98f15a04d614cf45bfa7e07b0b94e881afc12e8e4bac3c0efde1f8e7da9f5dc66365415ae1e3ab10dfcbd9e078879246db6e81cd56 + HEAD_REF master + PATCHES fix-install.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + test BUILD_TESTING +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/opencl/0001-include-unistd-for-gete-ug-id.patch b/vcpkg/ports/opencl/0001-include-unistd-for-gete-ug-id.patch new file mode 100644 index 0000000..4674aff --- /dev/null +++ b/vcpkg/ports/opencl/0001-include-unistd-for-gete-ug-id.patch @@ -0,0 +1,27 @@ +From 0f783f1a8eac7a78bc92198e140d4a5c745382ca Mon Sep 17 00:00:00 2001 +From: Nicole Mazzuca +Date: Wed, 23 Sep 2020 11:50:21 -0700 +Subject: [PATCH] include unistd for gete?[ug]id + +--- + loader/linux/icd_linux_envvars.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/loader/linux/icd_linux_envvars.c b/loader/linux/icd_linux_envvars.c +index 4af5a08..92b0698 100644 +--- a/loader/linux/icd_linux_envvars.c ++++ b/loader/linux/icd_linux_envvars.c +@@ -25,6 +25,10 @@ + + #include + ++#if defined(__APPLE__) ++#include ++#endif ++ + char *khrIcd_getenv(const char *name) { + // No allocation of memory necessary for Linux. + return getenv(name); +-- +2.24.3 (Apple Git-128) + diff --git a/vcpkg/ports/opencl/CONTROL b/vcpkg/ports/opencl/CONTROL new file mode 100644 index 0000000..41069be --- /dev/null +++ b/vcpkg/ports/opencl/CONTROL @@ -0,0 +1,8 @@ +Source: opencl +Version: 2.2 +Port-Version: 3 +Homepage: https://github.com/KhronosGroup/OpenCL-Headers +Description: C/C++ headers and ICD loader (Installable Client Driver) for OpenCL + +Feature: wdk +Description: Windows Driver Kit support diff --git a/vcpkg/ports/opencl/portfile.cmake b/vcpkg/ports/opencl/portfile.cmake new file mode 100644 index 0000000..e7b5e13 --- /dev/null +++ b/vcpkg/ports/opencl/portfile.cmake @@ -0,0 +1,115 @@ +if("wdk" IN_LIST FEATURES) + if(NOT VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "Windows Driver Kit support is only available builds targeting Windows") + endif() + set(WITH_WDK ON) +else() + set(WITH_WDK OFF) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KhronosGroup/OpenCL-Headers + REF 0d5f18c6e7196863bc1557a693f1509adfcee056 + SHA512 7e8fa6c8e73c660d8e9e31ddea3bfef887ed827fc21a1da559bde9dd4af6c52a91f609401bb718528b5c96d21e4c01aee7b8027bdf3dec4b0aa326270788a4b0 + HEAD_REF master +) + +file(INSTALL + "${SOURCE_PATH}/CL" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include +) + +# OpenCL C++ headers +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KhronosGroup/OpenCL-CLHPP + REF d62a02090625655e5b2d791d6a58618b043c989c + SHA512 837bbe914931d2f18a468f21634dbd4d088eda0a2f22eea23304c0323b9ee064c3ee76db7ebf28ba67fbe07c44129241f8dca62512d89bc7a6b35c2b4b316ed7 + HEAD_REF master +) + +vcpkg_find_acquire_program(PYTHON3) + +vcpkg_execute_required_process( + COMMAND "${PYTHON3}" "${SOURCE_PATH}/gen_cl_hpp.py" + -i ${SOURCE_PATH}/input_cl.hpp + -o ${CURRENT_PACKAGES_DIR}/include/CL/cl.hpp + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME generate_clhpp-${TARGET_TRIPLET} +) + +vcpkg_execute_required_process( + COMMAND "${PYTHON3}" "${SOURCE_PATH}/gen_cl_hpp.py" + -i ${SOURCE_PATH}/input_cl2.hpp + -o ${CURRENT_PACKAGES_DIR}/include/CL/cl2.hpp + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME generate_cl2hpp-${TARGET_TRIPLET} +) +message(STATUS "Generating OpenCL C++ headers done") + +# OpenCL ICD loader +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KhronosGroup/OpenCL-ICD-Loader + REF e6e30ab9c7a61c171cf68d2e7f5c0ce28e2a4eae + SHA512 f3563c0a4c094d3795d8386ec0db41189d350ab8136d80ae5de611ee3db87fbb0ab851bad2b33e111eddf135add5dbfef77d96979473ca5a23c036608d443378 + HEAD_REF master + PATCHES + 0001-include-unistd-for-gete-ug-id.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DOPENCL_ICD_LOADER_HEADERS_DIR=${CURRENT_PACKAGES_DIR}/include + -DOPENCL_ICD_LOADER_REQUIRE_WDK=${WITH_WDK} +) + +vcpkg_build_cmake(TARGET OpenCL) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${VCPKG_TARGET_STATIC_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + endif() + if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/${VCPKG_TARGET_STATIC_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() +else() + if(VCPKG_TARGET_IS_WINDOWS) + if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + endif() + if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() + elseif(VCPKG_TARGET_IS_LINUX) + if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}.1" DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}.1.2" DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + endif() + if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}.1" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}.1.2" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() + elseif(VCPKG_TARGET_IS_OSX) + if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/lib/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + endif() + if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/lib/${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}OpenCL${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() + endif() +endif() + +vcpkg_copy_pdbs() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/opencl/usage b/vcpkg/ports/opencl/usage new file mode 100644 index 0000000..adcd223 --- /dev/null +++ b/vcpkg/ports/opencl/usage @@ -0,0 +1,16 @@ +The package opencl is compatible with built-in CMake targets via CMake v3.6 and prior syntax + + find_package(OpenCL REQUIRED) + target_link_libraries(main PRIVATE ${OpenCL_LIBRARIES}) + target_include_directories(main PRIVATE ${OpenCL_INCLUDE_DIRS}) + +and the CMake v3.7 and beyond imported target syntax + + find_package(OpenCL REQUIRED) + target_link_libraries(main PRIVATE OpenCL::OpenCL) + +This package is only an OpenCL SDK. To actually run OpenCL code you also need to install an implementation. + + WINDOWS: implementations typically ship with the drivers of you CPU/GPU vendors. + LINUX: implementations may be installed from your distro's repo or manually. There are too many to count. + APPLE: consult your distribution vendor on the state of OpenCL support: https://support.apple.com/en-us/HT202823 diff --git a/vcpkg/ports/opencl/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/opencl/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..0893710 --- /dev/null +++ b/vcpkg/ports/opencl/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,18 @@ +_find_package(${ARGS}) +if(NOT BUILD_SHARED_LIBS AND (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")) + find_package(Threads REQUIRED) + set(OpenCL_Extra_Libs ${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT}) + if(CMAKE_SYSTEM_NAME MATCHES "Windows") + list(APPEND OpenCL_Extra_Libs cfgmgr32) + if($ENV{WindowsSDKVersion} MATCHES "^10") + list(APPEND OpenCL_Extra_Libs OneCoreUAP) + endif() + endif(CMAKE_SYSTEM_NAME MATCHES "Windows") + + if(TARGET OpenCL::OpenCL) + set_property(TARGET OpenCL::OpenCL APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${OpenCL_Extra_Libs}) + endif() + if(OpenCL_LIBRARIES) + list(APPEND OpenCL_LIBRARIES ${OpenCL_Extra_Libs}) + endif() +endif() \ No newline at end of file diff --git a/vcpkg/ports/opencolorio-tools/0001-lcms-dependency-search.patch b/vcpkg/ports/opencolorio-tools/0001-lcms-dependency-search.patch new file mode 100644 index 0000000..353a806 --- /dev/null +++ b/vcpkg/ports/opencolorio-tools/0001-lcms-dependency-search.patch @@ -0,0 +1,40 @@ +diff --git a/src/apps/ociobakelut/CMakeLists.txt b/src/apps/ociobakelut/CMakeLists.txt +index d31b4e3..2b57d1c 100644 +--- a/src/apps/ociobakelut/CMakeLists.txt ++++ b/src/apps/ociobakelut/CMakeLists.txt +@@ -5,6 +5,35 @@ if(LCMS_FOUND AND (LCMS_VERSION VERSION_EQUAL 2.1 OR LCMS_VERSION VERSION_GREATE + FIND_PACKAGE_MESSAGE(LCMS "Found lcms: ${LCMS_LIBRARIES}" + "${LCMS_INCLUDE_DIR}") + else() ++ find_path(LCMS_INCLUDE_DIRS ++ NAMES ++ lcms2.h ++ lcms2_plugin.h ++ HINTS ++ ${LCMS_INCLUDEDIR} ++ ${LCMS_INCLUDE_DIRS} ++ ) ++ ++ find_library(LCMS_LIBRARIES ++ LIBRARY_NAMES ++ lcms ++ lcms2 ++ HINTS ++ ${LCMS_LIBRARY_DIRS} ++ ) ++ ++ get_filename_component(LCMS_LIBRARY_DIRS ${LCMS_LIBRARIES} DIRECTORY) ++ ++ find_package_handle_standard_args(LCMS ++ REQUIRED_VARS ++ LCMS_LIBRARIES ++ LCMS_LIBRARY_DIRS ++ LCMS_INCLUDE_DIRS ++ ) ++ mark_as_advanced(LCMS_LIBRARIES LCMS_INCLUDE_DIRS LCMS_LIBRARY_DIRS LCMS_FOUND) ++endif() ++ ++if(NOT LCMS_FOUND) + find_package(Git) + if(NOT GIT_EXECUTABLE) + message("Git not found, could not build external LCMS as we cannot apply patch") diff --git a/vcpkg/ports/opencolorio-tools/0002-msvc-cpluscplus.patch b/vcpkg/ports/opencolorio-tools/0002-msvc-cpluscplus.patch new file mode 100644 index 0000000..c4349ea --- /dev/null +++ b/vcpkg/ports/opencolorio-tools/0002-msvc-cpluscplus.patch @@ -0,0 +1,84 @@ +diff --git a/src/apps/ocioconvert/CMakeLists.txt b/src/apps/ocioconvert/CMakeLists.txt +index 82b0792..7d16bdf 100644 +--- a/src/apps/ocioconvert/CMakeLists.txt ++++ b/src/apps/ocioconvert/CMakeLists.txt +@@ -6,16 +6,23 @@ if (OIIO_FOUND) + ${OIIO_INCLUDES} + ${ILMBASE_INCLUDES} + ) +- ++ + file(GLOB_RECURSE share_src_files "${CMAKE_SOURCE_DIR}/src/apps/share/*.cpp") +- ++ + add_executable(ocioconvert ${share_src_files} main.cpp) +- ++ ++ target_compile_options(ocioconvert ++ PRIVATE ++ $<$: ++ /Zc:__cplusplus # Enable updated __cplusplus macro ++ > ++ ) ++ + set_target_properties(ocioconvert PROPERTIES COMPILE_FLAGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}) + + target_link_libraries(ocioconvert ${OIIO_LIBRARIES} ${CMAKE_DL_LIBS}) +- ++ + target_link_OCIO(ocioconvert) +- ++ + install(TARGETS ocioconvert EXPORT OpenColorIO DESTINATION ${CMAKE_INSTALL_EXEC_PREFIX}/bin) + endif() +diff --git a/src/apps/ociodisplay/CMakeLists.txt b/src/apps/ociodisplay/CMakeLists.txt +index d11b9e1..0f27d86 100644 +--- a/src/apps/ociodisplay/CMakeLists.txt ++++ b/src/apps/ociodisplay/CMakeLists.txt +@@ -11,6 +11,13 @@ if (OIIO_FOUND) + + add_executable(ociodisplay main.cpp) + ++ target_compile_options(ociodisplay ++ PRIVATE ++ $<$: ++ /Zc:__cplusplus # Enable updated __cplusplus macro ++ > ++ ) ++ + # set_target_properties(ociodisplay PROPERTIES INSTALL_RPATH ${OIIO_LIBRARIES} ) + set_target_properties(ociodisplay PROPERTIES COMPILE_FLAGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}) + target_link_libraries(ociodisplay ${GLEW_LIBRARIES} ${GLUT_LIBRARY} ${OPENGL_LIBRARY} ${OIIO_LIBRARIES}) +diff --git a/src/apps/ociolutimage/CMakeLists.txt b/src/apps/ociolutimage/CMakeLists.txt +index 528333f..821155d 100644 +--- a/src/apps/ociolutimage/CMakeLists.txt ++++ b/src/apps/ociolutimage/CMakeLists.txt +@@ -6,16 +6,23 @@ if (OIIO_FOUND) + ${OIIO_INCLUDES} + ${ILMBASE_INCLUDES} + ) +- ++ + file(GLOB_RECURSE share_src_files "${CMAKE_SOURCE_DIR}/src/apps/share/*.cpp") +- ++ + add_executable(ociolutimage ${share_src_files} main.cpp) +- ++ ++ target_compile_options(ociolutimage ++ PRIVATE ++ $<$: ++ /Zc:__cplusplus # Enable updated __cplusplus macro ++ > ++ ) ++ + set_target_properties(ociolutimage PROPERTIES COMPILE_FLAGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}) + + target_link_libraries(ociolutimage ${OIIO_LIBRARIES} ${CMAKE_DL_LIBS}) +- ++ + target_link_OCIO(ociolutimage) +- ++ + install(TARGETS ociolutimage EXPORT OpenColorIO DESTINATION ${CMAKE_INSTALL_EXEC_PREFIX}/bin) + endif() diff --git a/vcpkg/ports/opencolorio-tools/0003-osx-self-assign-field.patch b/vcpkg/ports/opencolorio-tools/0003-osx-self-assign-field.patch new file mode 100644 index 0000000..18947bb --- /dev/null +++ b/vcpkg/ports/opencolorio-tools/0003-osx-self-assign-field.patch @@ -0,0 +1,13 @@ +diff --git a/src/core/Config.cpp b/src/core/Config.cpp +index f5cb379..5ea178e 100644 +--- a/src/core/Config.cpp ++++ b/src/core/Config.cpp +@@ -330,7 +330,7 @@ OCIO_NAMESPACE_ENTER + sanitytext_ = rhs.sanitytext_; + + cacheids_ = rhs.cacheids_; +- cacheidnocontext_ = cacheidnocontext_; ++ cacheidnocontext_ = rhs.cacheidnocontext_; + } + return *this; + } diff --git a/vcpkg/ports/opencolorio-tools/0004-yaml-dependency-search.patch b/vcpkg/ports/opencolorio-tools/0004-yaml-dependency-search.patch new file mode 100644 index 0000000..30c01d4 --- /dev/null +++ b/vcpkg/ports/opencolorio-tools/0004-yaml-dependency-search.patch @@ -0,0 +1,108 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e4f3119..5cfa601 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -244,34 +244,49 @@ else(USE_EXTERNAL_TINYXML) + endif() + set_target_properties(TINYXML_LIB PROPERTIES FOLDER External) + endif(USE_EXTERNAL_TINYXML) +- ++ + ############################################################################### + ### YAML ### + + if(USE_EXTERNAL_YAML) +- # Set minimum yaml version for non-patched sources. +- set(YAML_VERSION_MIN "0.3.0") +- include(FindPkgConfig) +- pkg_check_modules(PC_YAML_CPP REQUIRED QUIET yaml-cpp) +- find_path(YAML_CPP_INCLUDE_DIR yaml-cpp/yaml.h +- HINTS ${PC_YAML_CPP_INCLUDEDIR} ${PC_YAML_CPP_INCLUDE_DIRS} ) +- find_library(YAML_CPP_LIBRARY LIBRARY_NAMES yaml-cpp libyaml-cpp +- HINTS ${PC_YAML_CPP_LIBRARY_DIRS} ) +- set(YAML_CPP_LIBRARIES ${YAML_CPP_LIBRARY}) +- set(YAML_CPP_INCLUDE_DIRS ${YAML_CPP_INCLUDE_DIR}) +- set(YAML_CPP_VERSION ${PC_YAML_CPP_VERSION}) +- +- if(YAML_CPP_VERSION VERSION_LESS ${YAML_VERSION_MIN}) +- message(FATAL_ERROR "ERROR: yaml-cpp ${YAML_VERSION_MIN} or greater is required.") +- endif() ++ find_package(yaml-cpp 0.3.0) ++ if(yaml-cpp_FOUND) ++ include(FindPackageMessage) ++ ++ set(YAML_CPP_FOUND ${yaml-cpp_FOUND}) ++ set(YAML_CPP_INCLUDE_DIRS ${YAML_CPP_INCLUDE_DIR}) ++ set(YAML_CPP_VERSION ${yaml-cpp_VERSION}) ++ set(YAML_CPP_LIBRARIES yaml-cpp) ++ ++ find_package_message(yaml-cpp ++ "Found yaml ${YAML_CPP_VERSION}: ${YAML_CPP_INCLUDE_DIRS}" ++ "${YAML_CPP_INCLUDE_DIRS}:${YAML_CPP_LIBRARIES}" ++ ) ++ else() ++ # Set minimum yaml version for non-patched sources. ++ set(YAML_VERSION_MIN "0.3.0") ++ include(FindPkgConfig) ++ pkg_check_modules(PC_YAML_CPP REQUIRED QUIET yaml-cpp) ++ find_path(YAML_CPP_INCLUDE_DIR yaml-cpp/yaml.h ++ HINTS ${PC_YAML_CPP_INCLUDEDIR} ${PC_YAML_CPP_INCLUDE_DIRS} ) ++ find_library(YAML_CPP_LIBRARY LIBRARY_NAMES yaml-cpp libyaml-cpp ++ HINTS ${PC_YAML_CPP_LIBRARY_DIRS} ) ++ set(YAML_CPP_LIBRARIES ${YAML_CPP_LIBRARY}) ++ set(YAML_CPP_INCLUDE_DIRS ${YAML_CPP_INCLUDE_DIR}) ++ set(YAML_CPP_VERSION ${PC_YAML_CPP_VERSION}) ++ ++ if(YAML_CPP_VERSION VERSION_LESS ${YAML_VERSION_MIN}) ++ message(FATAL_ERROR "ERROR: yaml-cpp ${YAML_VERSION_MIN} or greater is required.") ++ endif() + +- find_package_handle_standard_args(yaml-cpp +- REQUIRED_VARS YAML_CPP_LIBRARIES YAML_CPP_INCLUDE_DIRS ) +- set(YAML_CPP_FOUND ${YAML-CPP_FOUND}) +- mark_as_advanced(YAML_CPP_INCLUDE_DIR YAML_CPP_LIBRARY YAML-CPP_FOUND) ++ find_package_handle_standard_args(yaml-cpp ++ REQUIRED_VARS YAML_CPP_LIBRARIES YAML_CPP_INCLUDE_DIRS ) ++ set(YAML_CPP_FOUND ${YAML-CPP_FOUND}) ++ mark_as_advanced(YAML_CPP_INCLUDE_DIR YAML_CPP_LIBRARY YAML-CPP_FOUND) ++ endif() + + if(YAML_CPP_FOUND) +- if(YAML_CPP_VERSION VERSION_GREATER "0.5.0") ++ if(YAML_CPP_VERSION VERSION_GREATER "0.5.0" AND YAML_CPP_VERSION VERSION_LESS "0.6.0") + # Need to also get the boost headers here, as yaml-cpp 0.5.0+ requires them. + # Don't bother doing this step if we are already including the boost headers for shared_ptr + if(NOT OCIO_USE_BOOST_PTR) +diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt +index 4b931ef..12a1dbf 100644 +--- a/src/core/CMakeLists.txt ++++ b/src/core/CMakeLists.txt +@@ -77,7 +77,14 @@ endif() + if(OCIO_BUILD_STATIC) + list(REMOVE_ITEM core_src_files ${CMAKE_SOURCE_DIR}/src/core/UnitTest.cpp) + add_library(OpenColorIO_STATIC STATIC ${EXTERNAL_OBJECTS} ${core_src_files}) +- add_dependencies(OpenColorIO_STATIC TINYXML_LIB YAML_CPP_LIB) ++ add_dependencies(OpenColorIO_STATIC TINYXML_LIB) ++ ++ if(USE_EXTERNAL_YAML) ++ target_link_libraries(OpenColorIO_STATIC ${YAML_CPP_LIBRARIES}) ++ else(USE_EXTERNAL_YAML) ++ add_dependencies(OpenColorIO_STATIC YAML_CPP_LIB) ++ endif() ++ + if(EXTERNAL_LIBRARIES) + target_link_libraries(OpenColorIO_STATIC ${EXTERNAL_LIBRARIES}) + endif() +diff --git a/src/core/OCIOYaml.cpp b/src/core/OCIOYaml.cpp +index aeee4d1..f1c662d 100644 +--- a/src/core/OCIOYaml.cpp ++++ b/src/core/OCIOYaml.cpp +@@ -69,7 +69,7 @@ namespace YAML { + + #ifdef WIN32 + #pragma warning( push ) +-#pragma warning( disable: 4146 ) ++#pragma warning( disable: 4146 4251 ) + #endif + + #include diff --git a/vcpkg/ports/opencolorio-tools/0005-tinyxml-dependency-search.patch b/vcpkg/ports/opencolorio-tools/0005-tinyxml-dependency-search.patch new file mode 100644 index 0000000..319f88b --- /dev/null +++ b/vcpkg/ports/opencolorio-tools/0005-tinyxml-dependency-search.patch @@ -0,0 +1,18 @@ +diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt +index 45e55f9..f4b687d 100644 +--- a/src/core/CMakeLists.txt ++++ b/src/core/CMakeLists.txt +@@ -77,7 +77,12 @@ endif() + if(OCIO_BUILD_STATIC) + list(REMOVE_ITEM core_src_files ${CMAKE_SOURCE_DIR}/src/core/UnitTest.cpp) + add_library(OpenColorIO_STATIC STATIC ${EXTERNAL_OBJECTS} ${core_src_files}) +- add_dependencies(OpenColorIO_STATIC TINYXML_LIB) ++ ++ if(USE_EXTERNAL_TINYXML) ++ target_link_libraries(OpenColorIO_STATIC ${TINYXML_LIBRARIES}) ++ else(USE_EXTERNAL_TINYXML) ++ add_dependencies(OpenColorIO_STATIC TINYXML_LIB) ++ endif(USE_EXTERNAL_TINYXML) + + if(USE_EXTERNAL_YAML) + target_link_libraries(OpenColorIO_STATIC ${YAML_CPP_LIBRARIES}) diff --git a/vcpkg/ports/opencolorio-tools/0006-oiio-dependency-search.patch b/vcpkg/ports/opencolorio-tools/0006-oiio-dependency-search.patch new file mode 100644 index 0000000..09624e5 --- /dev/null +++ b/vcpkg/ports/opencolorio-tools/0006-oiio-dependency-search.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5cfa601..f79807c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -475,7 +475,8 @@ endif() + if(OCIO_BUILD_APPS AND (OCIO_BUILD_STATIC OR OCIO_BUILD_SHARED) ) + + # Try to find OpenImageIO (OIIO) and OpenGL stuff +- OCIOFindOpenImageIO() ++ find_package(OpenImageIO CONFIG REQUIRED) ++ set(OIIO_LIBRARIES OpenImageIO::OpenImageIO OpenImageIO::OpenImageIO_Util) + + if(OIIO_FOUND) + add_subdirectory(src/apps/ocioconvert) diff --git a/vcpkg/ports/opencolorio-tools/CONTROL b/vcpkg/ports/opencolorio-tools/CONTROL new file mode 100644 index 0000000..679933a --- /dev/null +++ b/vcpkg/ports/opencolorio-tools/CONTROL @@ -0,0 +1,5 @@ +Source: opencolorio-tools +Version: 1.1.1 +Homepage: https://opencolorio.org/ +Description: OpenColorIO applications, same source with port OpenColorIO. +Build-Depends: openimageio[opencolorio] diff --git a/vcpkg/ports/opencolorio-tools/portfile.cmake b/vcpkg/ports/opencolorio-tools/portfile.cmake new file mode 100644 index 0000000..f08786a --- /dev/null +++ b/vcpkg/ports/opencolorio-tools/portfile.cmake @@ -0,0 +1,68 @@ +# Note: Should be maintained simultaneously with opencolorio! +SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(_BUILD_SHARED OFF) + set(_BUILD_STATIC ON) +else() + set(_BUILD_SHARED ON) + set(_BUILD_STATIC OFF) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO imageworks/OpenColorIO + REF v1.1.1 + SHA512 bed722f9ddce1887d28aacef2882debccd7c3f3c0c708d2723fea58a097de9f02721af9e85453e089ffda5406aef593ab6536c6886307823c132aa787e492e33 + HEAD_REF master + PATCHES + 0001-lcms-dependency-search.patch + 0002-msvc-cpluscplus.patch + 0003-osx-self-assign-field.patch + 0004-yaml-dependency-search.patch + 0005-tinyxml-dependency-search.patch + 0006-oiio-dependency-search.patch +) + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_PATH "${PYTHON3}" DIRECTORY) +vcpkg_add_to_path(PREPEND ${PYTHON3_PATH}) + +# TODO(theblackunknown) build additional targets based on feature + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DOCIO_BUILD_APPS=ON + -DOCIO_BUILD_SHARED:BOOL=${_BUILD_SHARED} + -DOCIO_BUILD_STATIC:BOOL=${_BUILD_STATIC} + -DOCIO_BUILD_TRUELIGHT:BOOL=OFF + -DOCIO_BUILD_NUKE:BOOL=OFF + -DOCIO_BUILD_DOCS:BOOL=OFF + -DOCIO_BUILD_TESTS:BOOL=OFF + -DOCIO_BUILD_PYGLUE:BOOL=OFF + -DOCIO_BUILD_JNIGLUE:BOOL=OFF + -DOCIO_STATIC_JNIGLUE:BOOL=OFF + -DUSE_EXTERNAL_TINYXML:BOOL=ON + -DUSE_EXTERNAL_YAML:BOOL=ON +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_copy_tools(TOOL_NAMES ociobakelut ociocheck) + +# Clean redundant files +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/include + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/cmake + ${CURRENT_PACKAGES_DIR}/share) + +file(REMOVE ${CURRENT_PACKAGES_DIR}/OpenColorIOConfig.cmake) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/opencolorio/0001-lcms-dependency-search.patch b/vcpkg/ports/opencolorio/0001-lcms-dependency-search.patch new file mode 100644 index 0000000..353a806 --- /dev/null +++ b/vcpkg/ports/opencolorio/0001-lcms-dependency-search.patch @@ -0,0 +1,40 @@ +diff --git a/src/apps/ociobakelut/CMakeLists.txt b/src/apps/ociobakelut/CMakeLists.txt +index d31b4e3..2b57d1c 100644 +--- a/src/apps/ociobakelut/CMakeLists.txt ++++ b/src/apps/ociobakelut/CMakeLists.txt +@@ -5,6 +5,35 @@ if(LCMS_FOUND AND (LCMS_VERSION VERSION_EQUAL 2.1 OR LCMS_VERSION VERSION_GREATE + FIND_PACKAGE_MESSAGE(LCMS "Found lcms: ${LCMS_LIBRARIES}" + "${LCMS_INCLUDE_DIR}") + else() ++ find_path(LCMS_INCLUDE_DIRS ++ NAMES ++ lcms2.h ++ lcms2_plugin.h ++ HINTS ++ ${LCMS_INCLUDEDIR} ++ ${LCMS_INCLUDE_DIRS} ++ ) ++ ++ find_library(LCMS_LIBRARIES ++ LIBRARY_NAMES ++ lcms ++ lcms2 ++ HINTS ++ ${LCMS_LIBRARY_DIRS} ++ ) ++ ++ get_filename_component(LCMS_LIBRARY_DIRS ${LCMS_LIBRARIES} DIRECTORY) ++ ++ find_package_handle_standard_args(LCMS ++ REQUIRED_VARS ++ LCMS_LIBRARIES ++ LCMS_LIBRARY_DIRS ++ LCMS_INCLUDE_DIRS ++ ) ++ mark_as_advanced(LCMS_LIBRARIES LCMS_INCLUDE_DIRS LCMS_LIBRARY_DIRS LCMS_FOUND) ++endif() ++ ++if(NOT LCMS_FOUND) + find_package(Git) + if(NOT GIT_EXECUTABLE) + message("Git not found, could not build external LCMS as we cannot apply patch") diff --git a/vcpkg/ports/opencolorio/0002-msvc-cpluscplus.patch b/vcpkg/ports/opencolorio/0002-msvc-cpluscplus.patch new file mode 100644 index 0000000..c4349ea --- /dev/null +++ b/vcpkg/ports/opencolorio/0002-msvc-cpluscplus.patch @@ -0,0 +1,84 @@ +diff --git a/src/apps/ocioconvert/CMakeLists.txt b/src/apps/ocioconvert/CMakeLists.txt +index 82b0792..7d16bdf 100644 +--- a/src/apps/ocioconvert/CMakeLists.txt ++++ b/src/apps/ocioconvert/CMakeLists.txt +@@ -6,16 +6,23 @@ if (OIIO_FOUND) + ${OIIO_INCLUDES} + ${ILMBASE_INCLUDES} + ) +- ++ + file(GLOB_RECURSE share_src_files "${CMAKE_SOURCE_DIR}/src/apps/share/*.cpp") +- ++ + add_executable(ocioconvert ${share_src_files} main.cpp) +- ++ ++ target_compile_options(ocioconvert ++ PRIVATE ++ $<$: ++ /Zc:__cplusplus # Enable updated __cplusplus macro ++ > ++ ) ++ + set_target_properties(ocioconvert PROPERTIES COMPILE_FLAGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}) + + target_link_libraries(ocioconvert ${OIIO_LIBRARIES} ${CMAKE_DL_LIBS}) +- ++ + target_link_OCIO(ocioconvert) +- ++ + install(TARGETS ocioconvert EXPORT OpenColorIO DESTINATION ${CMAKE_INSTALL_EXEC_PREFIX}/bin) + endif() +diff --git a/src/apps/ociodisplay/CMakeLists.txt b/src/apps/ociodisplay/CMakeLists.txt +index d11b9e1..0f27d86 100644 +--- a/src/apps/ociodisplay/CMakeLists.txt ++++ b/src/apps/ociodisplay/CMakeLists.txt +@@ -11,6 +11,13 @@ if (OIIO_FOUND) + + add_executable(ociodisplay main.cpp) + ++ target_compile_options(ociodisplay ++ PRIVATE ++ $<$: ++ /Zc:__cplusplus # Enable updated __cplusplus macro ++ > ++ ) ++ + # set_target_properties(ociodisplay PROPERTIES INSTALL_RPATH ${OIIO_LIBRARIES} ) + set_target_properties(ociodisplay PROPERTIES COMPILE_FLAGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}) + target_link_libraries(ociodisplay ${GLEW_LIBRARIES} ${GLUT_LIBRARY} ${OPENGL_LIBRARY} ${OIIO_LIBRARIES}) +diff --git a/src/apps/ociolutimage/CMakeLists.txt b/src/apps/ociolutimage/CMakeLists.txt +index 528333f..821155d 100644 +--- a/src/apps/ociolutimage/CMakeLists.txt ++++ b/src/apps/ociolutimage/CMakeLists.txt +@@ -6,16 +6,23 @@ if (OIIO_FOUND) + ${OIIO_INCLUDES} + ${ILMBASE_INCLUDES} + ) +- ++ + file(GLOB_RECURSE share_src_files "${CMAKE_SOURCE_DIR}/src/apps/share/*.cpp") +- ++ + add_executable(ociolutimage ${share_src_files} main.cpp) +- ++ ++ target_compile_options(ociolutimage ++ PRIVATE ++ $<$: ++ /Zc:__cplusplus # Enable updated __cplusplus macro ++ > ++ ) ++ + set_target_properties(ociolutimage PROPERTIES COMPILE_FLAGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}) + + target_link_libraries(ociolutimage ${OIIO_LIBRARIES} ${CMAKE_DL_LIBS}) +- ++ + target_link_OCIO(ociolutimage) +- ++ + install(TARGETS ociolutimage EXPORT OpenColorIO DESTINATION ${CMAKE_INSTALL_EXEC_PREFIX}/bin) + endif() diff --git a/vcpkg/ports/opencolorio/0003-osx-self-assign-field.patch b/vcpkg/ports/opencolorio/0003-osx-self-assign-field.patch new file mode 100644 index 0000000..18947bb --- /dev/null +++ b/vcpkg/ports/opencolorio/0003-osx-self-assign-field.patch @@ -0,0 +1,13 @@ +diff --git a/src/core/Config.cpp b/src/core/Config.cpp +index f5cb379..5ea178e 100644 +--- a/src/core/Config.cpp ++++ b/src/core/Config.cpp +@@ -330,7 +330,7 @@ OCIO_NAMESPACE_ENTER + sanitytext_ = rhs.sanitytext_; + + cacheids_ = rhs.cacheids_; +- cacheidnocontext_ = cacheidnocontext_; ++ cacheidnocontext_ = rhs.cacheidnocontext_; + } + return *this; + } diff --git a/vcpkg/ports/opencolorio/0004-yaml-dependency-search.patch b/vcpkg/ports/opencolorio/0004-yaml-dependency-search.patch new file mode 100644 index 0000000..30c01d4 --- /dev/null +++ b/vcpkg/ports/opencolorio/0004-yaml-dependency-search.patch @@ -0,0 +1,108 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e4f3119..5cfa601 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -244,34 +244,49 @@ else(USE_EXTERNAL_TINYXML) + endif() + set_target_properties(TINYXML_LIB PROPERTIES FOLDER External) + endif(USE_EXTERNAL_TINYXML) +- ++ + ############################################################################### + ### YAML ### + + if(USE_EXTERNAL_YAML) +- # Set minimum yaml version for non-patched sources. +- set(YAML_VERSION_MIN "0.3.0") +- include(FindPkgConfig) +- pkg_check_modules(PC_YAML_CPP REQUIRED QUIET yaml-cpp) +- find_path(YAML_CPP_INCLUDE_DIR yaml-cpp/yaml.h +- HINTS ${PC_YAML_CPP_INCLUDEDIR} ${PC_YAML_CPP_INCLUDE_DIRS} ) +- find_library(YAML_CPP_LIBRARY LIBRARY_NAMES yaml-cpp libyaml-cpp +- HINTS ${PC_YAML_CPP_LIBRARY_DIRS} ) +- set(YAML_CPP_LIBRARIES ${YAML_CPP_LIBRARY}) +- set(YAML_CPP_INCLUDE_DIRS ${YAML_CPP_INCLUDE_DIR}) +- set(YAML_CPP_VERSION ${PC_YAML_CPP_VERSION}) +- +- if(YAML_CPP_VERSION VERSION_LESS ${YAML_VERSION_MIN}) +- message(FATAL_ERROR "ERROR: yaml-cpp ${YAML_VERSION_MIN} or greater is required.") +- endif() ++ find_package(yaml-cpp 0.3.0) ++ if(yaml-cpp_FOUND) ++ include(FindPackageMessage) ++ ++ set(YAML_CPP_FOUND ${yaml-cpp_FOUND}) ++ set(YAML_CPP_INCLUDE_DIRS ${YAML_CPP_INCLUDE_DIR}) ++ set(YAML_CPP_VERSION ${yaml-cpp_VERSION}) ++ set(YAML_CPP_LIBRARIES yaml-cpp) ++ ++ find_package_message(yaml-cpp ++ "Found yaml ${YAML_CPP_VERSION}: ${YAML_CPP_INCLUDE_DIRS}" ++ "${YAML_CPP_INCLUDE_DIRS}:${YAML_CPP_LIBRARIES}" ++ ) ++ else() ++ # Set minimum yaml version for non-patched sources. ++ set(YAML_VERSION_MIN "0.3.0") ++ include(FindPkgConfig) ++ pkg_check_modules(PC_YAML_CPP REQUIRED QUIET yaml-cpp) ++ find_path(YAML_CPP_INCLUDE_DIR yaml-cpp/yaml.h ++ HINTS ${PC_YAML_CPP_INCLUDEDIR} ${PC_YAML_CPP_INCLUDE_DIRS} ) ++ find_library(YAML_CPP_LIBRARY LIBRARY_NAMES yaml-cpp libyaml-cpp ++ HINTS ${PC_YAML_CPP_LIBRARY_DIRS} ) ++ set(YAML_CPP_LIBRARIES ${YAML_CPP_LIBRARY}) ++ set(YAML_CPP_INCLUDE_DIRS ${YAML_CPP_INCLUDE_DIR}) ++ set(YAML_CPP_VERSION ${PC_YAML_CPP_VERSION}) ++ ++ if(YAML_CPP_VERSION VERSION_LESS ${YAML_VERSION_MIN}) ++ message(FATAL_ERROR "ERROR: yaml-cpp ${YAML_VERSION_MIN} or greater is required.") ++ endif() + +- find_package_handle_standard_args(yaml-cpp +- REQUIRED_VARS YAML_CPP_LIBRARIES YAML_CPP_INCLUDE_DIRS ) +- set(YAML_CPP_FOUND ${YAML-CPP_FOUND}) +- mark_as_advanced(YAML_CPP_INCLUDE_DIR YAML_CPP_LIBRARY YAML-CPP_FOUND) ++ find_package_handle_standard_args(yaml-cpp ++ REQUIRED_VARS YAML_CPP_LIBRARIES YAML_CPP_INCLUDE_DIRS ) ++ set(YAML_CPP_FOUND ${YAML-CPP_FOUND}) ++ mark_as_advanced(YAML_CPP_INCLUDE_DIR YAML_CPP_LIBRARY YAML-CPP_FOUND) ++ endif() + + if(YAML_CPP_FOUND) +- if(YAML_CPP_VERSION VERSION_GREATER "0.5.0") ++ if(YAML_CPP_VERSION VERSION_GREATER "0.5.0" AND YAML_CPP_VERSION VERSION_LESS "0.6.0") + # Need to also get the boost headers here, as yaml-cpp 0.5.0+ requires them. + # Don't bother doing this step if we are already including the boost headers for shared_ptr + if(NOT OCIO_USE_BOOST_PTR) +diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt +index 4b931ef..12a1dbf 100644 +--- a/src/core/CMakeLists.txt ++++ b/src/core/CMakeLists.txt +@@ -77,7 +77,14 @@ endif() + if(OCIO_BUILD_STATIC) + list(REMOVE_ITEM core_src_files ${CMAKE_SOURCE_DIR}/src/core/UnitTest.cpp) + add_library(OpenColorIO_STATIC STATIC ${EXTERNAL_OBJECTS} ${core_src_files}) +- add_dependencies(OpenColorIO_STATIC TINYXML_LIB YAML_CPP_LIB) ++ add_dependencies(OpenColorIO_STATIC TINYXML_LIB) ++ ++ if(USE_EXTERNAL_YAML) ++ target_link_libraries(OpenColorIO_STATIC ${YAML_CPP_LIBRARIES}) ++ else(USE_EXTERNAL_YAML) ++ add_dependencies(OpenColorIO_STATIC YAML_CPP_LIB) ++ endif() ++ + if(EXTERNAL_LIBRARIES) + target_link_libraries(OpenColorIO_STATIC ${EXTERNAL_LIBRARIES}) + endif() +diff --git a/src/core/OCIOYaml.cpp b/src/core/OCIOYaml.cpp +index aeee4d1..f1c662d 100644 +--- a/src/core/OCIOYaml.cpp ++++ b/src/core/OCIOYaml.cpp +@@ -69,7 +69,7 @@ namespace YAML { + + #ifdef WIN32 + #pragma warning( push ) +-#pragma warning( disable: 4146 ) ++#pragma warning( disable: 4146 4251 ) + #endif + + #include diff --git a/vcpkg/ports/opencolorio/0005-tinyxml-dependency-search.patch b/vcpkg/ports/opencolorio/0005-tinyxml-dependency-search.patch new file mode 100644 index 0000000..319f88b --- /dev/null +++ b/vcpkg/ports/opencolorio/0005-tinyxml-dependency-search.patch @@ -0,0 +1,18 @@ +diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt +index 45e55f9..f4b687d 100644 +--- a/src/core/CMakeLists.txt ++++ b/src/core/CMakeLists.txt +@@ -77,7 +77,12 @@ endif() + if(OCIO_BUILD_STATIC) + list(REMOVE_ITEM core_src_files ${CMAKE_SOURCE_DIR}/src/core/UnitTest.cpp) + add_library(OpenColorIO_STATIC STATIC ${EXTERNAL_OBJECTS} ${core_src_files}) +- add_dependencies(OpenColorIO_STATIC TINYXML_LIB) ++ ++ if(USE_EXTERNAL_TINYXML) ++ target_link_libraries(OpenColorIO_STATIC ${TINYXML_LIBRARIES}) ++ else(USE_EXTERNAL_TINYXML) ++ add_dependencies(OpenColorIO_STATIC TINYXML_LIB) ++ endif(USE_EXTERNAL_TINYXML) + + if(USE_EXTERNAL_YAML) + target_link_libraries(OpenColorIO_STATIC ${YAML_CPP_LIBRARIES}) diff --git a/vcpkg/ports/opencolorio/0006-oiio-dependency-search.patch b/vcpkg/ports/opencolorio/0006-oiio-dependency-search.patch new file mode 100644 index 0000000..09624e5 --- /dev/null +++ b/vcpkg/ports/opencolorio/0006-oiio-dependency-search.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5cfa601..f79807c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -475,7 +475,8 @@ endif() + if(OCIO_BUILD_APPS AND (OCIO_BUILD_STATIC OR OCIO_BUILD_SHARED) ) + + # Try to find OpenImageIO (OIIO) and OpenGL stuff +- OCIOFindOpenImageIO() ++ find_package(OpenImageIO CONFIG REQUIRED) ++ set(OIIO_LIBRARIES OpenImageIO::OpenImageIO OpenImageIO::OpenImageIO_Util) + + if(OIIO_FOUND) + add_subdirectory(src/apps/ocioconvert) diff --git a/vcpkg/ports/opencolorio/CONTROL b/vcpkg/ports/opencolorio/CONTROL new file mode 100644 index 0000000..9380823 --- /dev/null +++ b/vcpkg/ports/opencolorio/CONTROL @@ -0,0 +1,6 @@ +Source: opencolorio +Version: 1.1.1 +Port-Version: 4 +Homepage: https://opencolorio.org/ +Description: OpenColorIO (OCIO) is a complete color management solution geared towards motion picture production with an emphasis on visual effects and computer animation. OCIO provides a straightforward and consistent user experience across all supporting applications while allowing for sophisticated back-end configuration options suitable for high-end production usage. OCIO is compatible with the Academy Color Encoding Specification (ACES) and is LUT-format agnostic, supporting many popular formats. +Build-Depends: glew[core], freeglut[core], lcms[core], yaml-cpp[core], tinyxml[core] \ No newline at end of file diff --git a/vcpkg/ports/opencolorio/portfile.cmake b/vcpkg/ports/opencolorio/portfile.cmake new file mode 100644 index 0000000..6d970d3 --- /dev/null +++ b/vcpkg/ports/opencolorio/portfile.cmake @@ -0,0 +1,64 @@ +# Note: Should be maintained simultaneously with opencolorio-tools! +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(_BUILD_SHARED OFF) + set(_BUILD_STATIC ON) +else() + set(_BUILD_SHARED ON) + set(_BUILD_STATIC OFF) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO AcademySoftwareFoundation/OpenColorIO + REF ebdec4111f449bea995d01ecd9693b7e704498fe # v1.1.1 + SHA512 b93796541f8b086f137eaebeef102e29a4aabac6dba5b1696c9ab23d62af39b233ca52ce97b04ea432d85ae0a1fe186939c52aab0cd2c4cd5d2775ac5c021eef + HEAD_REF master + PATCHES + 0001-lcms-dependency-search.patch + 0002-msvc-cpluscplus.patch + 0003-osx-self-assign-field.patch + 0004-yaml-dependency-search.patch + 0005-tinyxml-dependency-search.patch +) + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_PATH "${PYTHON3}" DIRECTORY) +vcpkg_add_to_path(PREPEND ${PYTHON3_PATH}) + +# TODO(theblackunknown) build additional targets based on feature + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DOCIO_BUILD_APPS=OFF + -DOCIO_BUILD_SHARED:BOOL=${_BUILD_SHARED} + -DOCIO_BUILD_STATIC:BOOL=${_BUILD_STATIC} + -DOCIO_BUILD_TRUELIGHT:BOOL=OFF + -DOCIO_BUILD_NUKE:BOOL=OFF + -DOCIO_BUILD_DOCS:BOOL=OFF + -DOCIO_BUILD_TESTS:BOOL=OFF + -DOCIO_BUILD_PYGLUE:BOOL=OFF + -DOCIO_BUILD_JNIGLUE:BOOL=OFF + -DOCIO_STATIC_JNIGLUE:BOOL=OFF + -DUSE_EXTERNAL_TINYXML:BOOL=ON + -DUSE_EXTERNAL_YAML:BOOL=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "cmake") + +vcpkg_copy_pdbs() + +# Clean redundant files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# CMake Configs leftovers +file(REMOVE + ${CURRENT_PACKAGES_DIR}/OpenColorIOConfig.cmake + ${CURRENT_PACKAGES_DIR}/debug/OpenColorIOConfig.cmake +) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/opencsg/CMakeLists.txt b/vcpkg/ports/opencsg/CMakeLists.txt new file mode 100644 index 0000000..683529d --- /dev/null +++ b/vcpkg/ports/opencsg/CMakeLists.txt @@ -0,0 +1,46 @@ +cmake_minimum_required (VERSION 3.4) +project (opencsg) + +set(HEADERS + include/opencsg.h +) + +set(SRCS + src/area.cpp + src/batch.cpp + src/context.cpp + src/channelManager.cpp + src/frameBufferObject.cpp + src/frameBufferObjectExt.cpp + src/occlusionQuery.cpp + src/opencsgRender.cpp + src/openglHelper.cpp + src/primitive.cpp + src/primitiveHelper.cpp + src/renderGoldfeather.cpp + src/renderSCS.cpp + src/scissorMemo.cpp + src/settings.cpp + src/stencilManager.cpp + src/pBufferTexture.cpp + RenderTexture/RenderTexture.cpp +) + + +add_library(opencsg ${SRCS} ${HEADERS}) + +include_directories(src include RenderTexture ".") +find_package(GLEW REQUIRED) +include_directories(${GLEW_INCLUDE_DIRS}) +target_link_libraries(opencsg PRIVATE GLEW::GLEW) + +install( + TARGETS opencsg + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES ${HEADERS} DESTINATION include/opencsg) +endif() diff --git a/vcpkg/ports/opencsg/CONTROL b/vcpkg/ports/opencsg/CONTROL new file mode 100644 index 0000000..f48cff6 --- /dev/null +++ b/vcpkg/ports/opencsg/CONTROL @@ -0,0 +1,4 @@ +Source: opencsg +Version: 1.4.2-1 +Build-Depends: glew +Description: OpenCSG is a library that does image-based CSG rendering using OpenGL. OpenCSG is written in C++ and supports most modern graphics hardware using Microsoft Windows or the Linux operating system. diff --git a/vcpkg/ports/opencsg/illegal_char.patch b/vcpkg/ports/opencsg/illegal_char.patch new file mode 100644 index 0000000..5c700fd --- /dev/null +++ b/vcpkg/ports/opencsg/illegal_char.patch @@ -0,0 +1,13 @@ +diff --git a/include/opencsg.h b/include/opencsg.h +index d753a0e..b482c40 100644 +--- a/include/opencsg.h ++++ b/include/opencsg.h +@@ -156,7 +156,7 @@ namespace OpenCSG { + /// The DepthComplexityAlgorithm specifies the strategy for profiting + /// from depth complexity when performing the CSG rendering. + /// - NoDepthComplexitySampling: Does not employ the depth complexity. +- /// This essentially makes the algorithm O(n²), but with ++ /// This essentially makes the algorithm O(n²), but with + /// low constant costs. + /// - DepthComplexitySampling: Calculates the depth complexity k using + /// the stencil buffer. This makes algorithm O(n*k), but diff --git a/vcpkg/ports/opencsg/portfile.cmake b/vcpkg/ports/opencsg/portfile.cmake new file mode 100644 index 0000000..f47996a --- /dev/null +++ b/vcpkg/ports/opencsg/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO floriankirsch/OpenCSG + REF "opencsg-1-4-2-release" + SHA512 df117a1b7153a95332d236918d1547b0afe6f3ead46af2733c5feee6e25cec984b21affc41fd8320a45be9292bd3b32e21ed8bb3d08371ddd657f659b9bb932a + HEAD_REF master + PATCHES illegal_char.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DUNICODE=1 -D_UNICODE=1 + # OPTIONS_RELEASE -DOPTIMIZE=1 + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/opencv/CONTROL b/vcpkg/ports/opencv/CONTROL new file mode 100644 index 0000000..768d8fd --- /dev/null +++ b/vcpkg/ports/opencv/CONTROL @@ -0,0 +1,102 @@ +Source: opencv +Version: 4.3.0 +Homepage: https://github.com/opencv/opencv +Description: Computer vision library +Build-Depends: opencv4[core] +Default-Features: dnn, jpeg, opengl, png, tiff, webp + +Feature: nonfree +Build-Depends: opencv4[core,nonfree] +Description: opencv nonfree module + +Feature: ade +Build-Depends: opencv4[core,ade] +Description: graph api + +Feature: contrib +Build-Depends: opencv4[core,contrib] +Description: opencv_contrib module + +Feature: cuda +Build-Depends: opencv4[core,cuda] +Description: CUDA support for opencv + +Feature: dnn +Build-Depends: opencv4[core,dnn] +Description: Enable dnn module + +Feature: eigen +Build-Depends: opencv4[core,eigen] +Description: Eigen support for opencv + +Feature: ffmpeg +Build-Depends: opencv4[core,ffmpeg] +Description: ffmpeg support for opencv + +Feature: gdcm +Build-Depends: opencv4[core,gdcm] +Description: GDCM support for opencv + +Feature: halide +Build-Depends: opencv4[core,halide] +Description: Halide support for opencv + +Feature: ipp +Build-Depends: opencv4[core,ipp] +Description: Enable Intel Integrated Performance Primitives + +Feature: jasper +Build-Depends: opencv4[core,jasper] +Description: JPEG 2000 support for opencv + +Feature: jpeg +Build-Depends: opencv4[core,jpeg] +Description: JPEG support for opencv + +Feature: openexr +Build-Depends: opencv4[core,openexr] +Description: OpenEXR support for opencv + +Feature: opengl +Build-Depends: opencv4[core,opengl] +Description: opengl support for opencv + +Feature: openmp +Build-Depends: opencv4[core,openmp] +Description: Enable openmp support for opencv + +Feature: ovis +Build-Depends: opencv4[core,ovis] +Description: opencv_ovis module + +Feature: png +Build-Depends: opencv4[core,png] +Description: PNG support for opencv + +Feature: qt +Build-Depends: opencv4[core,qt] +Description: Qt GUI support for opencv + +Feature: sfm +Build-Depends: opencv4[core,sfm] +Description: opencv_sfm module + +Feature: tbb +Build-Depends: opencv4[core,tbb] +Description: Enable Intel Threading Building Blocks + +Feature: tiff +Build-Depends: opencv4[core,tiff] +Description: TIFF support for opencv + +Feature: vtk +Build-Depends: opencv4[core,vtk] +Description: vtk support for opencv + +Feature: webp +Build-Depends: opencv4[core,webp] +Description: WebP support for opencv + +Feature: world +Build-Depends: opencv4[core,world] +Description: Compile to a single package support for opencv diff --git a/vcpkg/ports/opencv/portfile.cmake b/vcpkg/ports/opencv/portfile.cmake new file mode 100644 index 0000000..cc6e26f --- /dev/null +++ b/vcpkg/ports/opencv/portfile.cmake @@ -0,0 +1 @@ +SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/vcpkg/ports/opencv2/0002-install-options.patch b/vcpkg/ports/opencv2/0002-install-options.patch new file mode 100644 index 0000000..206fb28 --- /dev/null +++ b/vcpkg/ports/opencv2/0002-install-options.patch @@ -0,0 +1,359 @@ +diff --git a/3rdparty/libtiff/CMakeLists.txt b/3rdparty/libtiff/CMakeLists.txt +index b0e076f..3f7ade1 100644 +--- a/3rdparty/libtiff/CMakeLists.txt ++++ b/3rdparty/libtiff/CMakeLists.txt +@@ -102,7 +102,7 @@ if(UNIX AND (CMAKE_COMPILER_IS_GNUCXX OR CV_ICC)) + endif() + + add_library(${TIFF_LIBRARY} STATIC ${lib_srcs}) +-target_link_libraries(${TIFF_LIBRARY} ${ZLIB_LIBRARIES}) ++target_link_libraries(${TIFF_LIBRARY} ZLIB::ZLIB) + + set_target_properties(${TIFF_LIBRARY} + PROPERTIES +diff --git a/3rdparty/openexr/CMakeLists.txt b/3rdparty/openexr/CMakeLists.txt +index 9387616..54ecc1a 100644 +--- a/3rdparty/openexr/CMakeLists.txt ++++ b/3rdparty/openexr/CMakeLists.txt +@@ -55,7 +55,7 @@ if(MSVC AND CV_ICC) + endif() + + add_library(IlmImf STATIC ${lib_hdrs} ${lib_srcs}) +-target_link_libraries(IlmImf ${ZLIB_LIBRARIES}) ++target_link_libraries(IlmImf ZLIB::ZLIB) + + set_target_properties(IlmImf + PROPERTIES +diff --git a/3rdparty/tbb/CMakeLists.txt b/3rdparty/tbb/CMakeLists.txt +index fd8ef32..fe571a2 100644 +--- a/3rdparty/tbb/CMakeLists.txt ++++ b/3rdparty/tbb/CMakeLists.txt +@@ -116,7 +116,7 @@ endif() + + if(NOT EXISTS "${tbb_tarball}") + message(STATUS "Downloading ${tbb_ver}_src.tgz") +- file(DOWNLOAD "${tbb_url}" "${tbb_tarball}" TIMEOUT 600 STATUS __statvar) ++ message(FATAL_ERROR " Downloads are not permitted during configure. Please pre-download the file \"${CACHE_CANDIDATE}\":\n \n vcpkg_download_distfile(OCV_DOWNLOAD\n URLS \"${tbb_url}\"\n FILENAME \"${tbb_tarball}\"\n SHA512 0\n )") + if(NOT __statvar EQUAL 0) + message(FATAL_ERROR "Failed to download TBB sources (${__statvar}): ${tbb_url}") + endif() +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 90e16c2..6601820 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -275,23 +275,10 @@ if (ANDROID) + endif() + + if(NOT DEFINED OPENCV_DOC_INSTALL_PATH) +- if(ANDROID OR WIN32) +- set(OPENCV_DOC_INSTALL_PATH doc) +- elseif(INSTALL_TO_MANGLED_PATHS) +- set(OPENCV_DOC_INSTALL_PATH share/OpenCV-${OPENCV_VERSION}/doc) +- else() +- set(OPENCV_DOC_INSTALL_PATH share/OpenCV/doc) +- endif() ++ set(OPENCV_DOC_INSTALL_PATH share/opencv/doc) + endif() + +-if(WIN32) +- if(DEFINED OpenCV_RUNTIME AND DEFINED OpenCV_ARCH) +- set(OpenCV_INSTALL_BINARIES_PREFIX "${OpenCV_ARCH}/${OpenCV_RUNTIME}/") +- else() +- message(STATUS "Can't detect runtime and/or arch") +- set(OpenCV_INSTALL_BINARIES_PREFIX "") +- endif() +-elseif(ANDROID) ++if(ANDROID) + set(OpenCV_INSTALL_BINARIES_PREFIX "sdk/native/") + else() + set(OpenCV_INSTALL_BINARIES_PREFIX "") +@@ -322,29 +309,13 @@ if(ANDROID) + set(OPENCV_INCLUDE_INSTALL_PATH sdk/native/jni/include) + set(OPENCV_SAMPLES_SRC_INSTALL_PATH samples/native) + else() +- set(LIBRARY_OUTPUT_PATH "${OpenCV_BINARY_DIR}/lib") +- set(3P_LIBRARY_OUTPUT_PATH "${OpenCV_BINARY_DIR}/3rdparty/lib${LIB_SUFFIX}") +- if(WIN32) +- if(OpenCV_STATIC) +- set(OPENCV_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}staticlib${LIB_SUFFIX}") +- else() +- set(OPENCV_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}lib${LIB_SUFFIX}") +- endif() +- set(OPENCV_3P_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}staticlib${LIB_SUFFIX}") +- set(OPENCV_SAMPLES_SRC_INSTALL_PATH samples/native) +- else() +- set(OPENCV_LIB_INSTALL_PATH lib${LIB_SUFFIX}) +- set(OPENCV_3P_LIB_INSTALL_PATH share/OpenCV/3rdparty/${OPENCV_LIB_INSTALL_PATH}) +- set(OPENCV_SAMPLES_SRC_INSTALL_PATH share/OpenCV/samples) +- endif() +- set(OPENCV_INCLUDE_INSTALL_PATH "include") +- +- math(EXPR SIZEOF_VOID_P_BITS "8 * ${CMAKE_SIZEOF_VOID_P}") +- if(LIB_SUFFIX AND NOT SIZEOF_VOID_P_BITS EQUAL LIB_SUFFIX) +- set(OPENCV_CONFIG_INSTALL_PATH lib${LIB_SUFFIX}/cmake/opencv) +- else() +- set(OPENCV_CONFIG_INSTALL_PATH share/OpenCV) +- endif() ++ set(LIBRARY_OUTPUT_PATH "${OpenCV_BINARY_DIR}/lib") ++ set(3P_LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH}") ++ set(OPENCV_LIB_INSTALL_PATH "${OpenCV_INSTALL_BINARIES_PREFIX}lib") ++ set(OPENCV_3P_LIB_INSTALL_PATH "${OPENCV_LIB_INSTALL_PATH}") ++ set(OPENCV_SAMPLES_SRC_INSTALL_PATH "share/opencv/samples") ++ set(OPENCV_INCLUDE_INSTALL_PATH "include") ++ set(OPENCV_CONFIG_INSTALL_PATH "share/opencv") + endif() + + set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${OPENCV_LIB_INSTALL_PATH}") +@@ -356,7 +327,7 @@ endif() + + if(WIN32) + # Postfix of DLLs: +- set(OPENCV_DLLVERSION "${OPENCV_VERSION_MAJOR}${OPENCV_VERSION_MINOR}${OPENCV_VERSION_PATCH}") ++ set(OPENCV_DLLVERSION "") + set(OPENCV_DEBUG_POSTFIX d) + else() + # Postfix of so's: +@@ -397,8 +368,6 @@ if(CMAKE_HOST_WIN32) + endif() + endif() + +-find_host_program(GIT_EXECUTABLE NAMES ${git_names} PATH_SUFFIXES Git/cmd Git/bin DOC "git command line client") +-mark_as_advanced(GIT_EXECUTABLE) + + if(GIT_EXECUTABLE) + execute_process(COMMAND ${GIT_EXECUTABLE} describe --tags --always --dirty --match "2.[0-9].[0-9]*" +@@ -501,7 +470,6 @@ if(BUILD_DOCS) + endif(BUILD_DOCS) + + # --- Python Support --- +-include(cmake/OpenCVDetectPython.cmake) + + # --- Java Support --- + include(cmake/OpenCVDetectApacheAnt.cmake) +@@ -885,11 +853,7 @@ if(ANDROID) + endif() + + if(DEFINED WITH_FFMPEG OR HAVE_FFMPEG) +- if(WIN32) +- status(" FFMPEG:" WITH_FFMPEG THEN "YES (prebuilt binaries)" ELSE NO) +- else() + status(" FFMPEG:" HAVE_FFMPEG THEN YES ELSE NO) +- endif() + status(" avcodec:" FFMPEG_libavcodec_FOUND THEN "YES (ver ${FFMPEG_libavcodec_VERSION})" ELSE NO) + status(" avformat:" FFMPEG_libavformat_FOUND THEN "YES (ver ${FFMPEG_libavformat_VERSION})" ELSE NO) + status(" avutil:" FFMPEG_libavutil_FOUND THEN "YES (ver ${FFMPEG_libavutil_VERSION})" ELSE NO) +diff --git a/cmake/OpenCVCompilerOptions.cmake b/cmake/OpenCVCompilerOptions.cmake +index e61059a..ec6f34f 100644 +--- a/cmake/OpenCVCompilerOptions.cmake ++++ b/cmake/OpenCVCompilerOptions.cmake +@@ -269,7 +269,6 @@ if(MSVC) + set(OPENCV_EXTRA_FLAGS "${OPENCV_EXTRA_FLAGS} /bigobj") + endif() + if(BUILD_WITH_DEBUG_INFO) +- set(OPENCV_EXTRA_FLAGS_RELEASE "${OPENCV_EXTRA_FLAGS_RELEASE} /Zi") + endif() + + if(ENABLE_SSE4_1 AND CV_ICC AND NOT OPENCV_EXTRA_FLAGS MATCHES "/arch:") +diff --git a/cmake/OpenCVFindLibsVideo.cmake b/cmake/OpenCVFindLibsVideo.cmake +index 146043f..1202225 100644 +--- a/cmake/OpenCVFindLibsVideo.cmake ++++ b/cmake/OpenCVFindLibsVideo.cmake +@@ -185,12 +185,8 @@ endif(WITH_XIMEA) + # --- FFMPEG --- + ocv_clear_vars(HAVE_FFMPEG) + if(WITH_FFMPEG) +- if(WIN32 AND NOT ARM) +- include("${OpenCV_SOURCE_DIR}/3rdparty/ffmpeg/ffmpeg_version.cmake") ++ find_package(FFMPEG REQUIRED) + set(HAVE_FFMPEG TRUE) +- elseif(PKG_CONFIG_FOUND) +- ocv_check_modules(FFMPEG libavcodec libavformat libavutil libswscale) +- ocv_check_modules(FFMPEG_libavresample libavresample) + if(FFMPEG_libavresample_FOUND) + ocv_append_build_options(FFMPEG FFMPEG_libavresample) + endif() +@@ -211,9 +207,6 @@ if(WITH_FFMPEG) + ocv_append_build_options(HIGHGUI FFMPEG) + endif() + endif() +- else() +- message(STATUS "Can't find ffmpeg - 'pkg-config' utility is missing") +- endif() + endif(WITH_FFMPEG) + + # --- VideoInput/DirectShow --- +diff --git a/cmake/OpenCVGenConfig.cmake b/cmake/OpenCVGenConfig.cmake +index dacfbb1..3760866 100644 +--- a/cmake/OpenCVGenConfig.cmake ++++ b/cmake/OpenCVGenConfig.cmake +@@ -101,7 +101,7 @@ endif() + configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCVConfig.cmake.in" "${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig.cmake" @ONLY) + configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCVConfig-version.cmake.in" "${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig-version.cmake" @ONLY) + +-if(UNIX) # ANDROID configuration is created here also ++if(1) # ANDROID configuration is created here also + #http://www.vtk.org/Wiki/CMake/Tutorials/Packaging reference + # For a command "find_package( [major[.minor]] [EXACT] [REQUIRED|QUIET])" + # cmake will look in the following dir on unix: +@@ -126,7 +126,7 @@ endif() + # -------------------------------------------------------------------------------------------- + # Part 3/3: ${BIN_DIR}/win-install/OpenCVConfig.cmake -> For use within binary installers/packages + # -------------------------------------------------------------------------------------------- +-if(WIN32) ++if(0) + set(OpenCV_INCLUDE_DIRS_CONFIGCMAKE "\"\${OpenCV_CONFIG_PATH}/include\" \"\${OpenCV_CONFIG_PATH}/include/opencv\"") + set(OpenCV2_INCLUDE_DIRS_CONFIGCMAKE "\"\"") + +diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake +index 6f9fb0b..56f8879 100644 +--- a/cmake/OpenCVModule.cmake ++++ b/cmake/OpenCVModule.cmake +@@ -86,10 +86,10 @@ macro(ocv_add_dependencies full_modname) + endforeach() + unset(__depsvar) + +- ocv_list_unique(OPENCV_MODULE_${full_modname}_REQ_DEPS) +- ocv_list_unique(OPENCV_MODULE_${full_modname}_OPT_DEPS) +- ocv_list_unique(OPENCV_MODULE_${full_modname}_PRIVATE_REQ_DEPS) +- ocv_list_unique(OPENCV_MODULE_${full_modname}_PRIVATE_OPT_DEPS) ++ #ocv_list_unique(OPENCV_MODULE_${full_modname}_REQ_DEPS) ++ #ocv_list_unique(OPENCV_MODULE_${full_modname}_OPT_DEPS) ++ #ocv_list_unique(OPENCV_MODULE_${full_modname}_PRIVATE_REQ_DEPS) ++ #ocv_list_unique(OPENCV_MODULE_${full_modname}_PRIVATE_OPT_DEPS) + + set(OPENCV_MODULE_${full_modname}_REQ_DEPS ${OPENCV_MODULE_${full_modname}_REQ_DEPS} + CACHE INTERNAL "Required dependencies of ${full_modname} module") +@@ -277,7 +277,7 @@ endfunction() + + # sort modules by dependencies + function(__ocv_sort_modules_by_deps __lst) +- ocv_list_sort(${__lst}) ++ #ocv_list_sort(${__lst}) + set(${__lst}_ORDERED ${${__lst}} CACHE INTERNAL "") + set(__result "") + foreach (m ${${__lst}}) +@@ -382,7 +382,7 @@ function(__ocv_resolve_dependencies) + endforeach() + endforeach() + +- ocv_list_sort(OPENCV_MODULES_BUILD) ++ #ocv_list_sort(OPENCV_MODULES_BUILD) + + foreach(m ${OPENCV_MODULES_BUILD}) + # message(STATUS "FULL deps of ${m}: ${deps_${m}}") +@@ -397,7 +397,7 @@ function(__ocv_resolve_dependencies) + # reorder dependencies + foreach(m ${OPENCV_MODULES_BUILD}) + __ocv_sort_modules_by_deps(OPENCV_MODULE_${m}_DEPS) +- ocv_list_sort(OPENCV_MODULE_${m}_DEPS_EXT) ++ #ocv_list_sort(OPENCV_MODULE_${m}_DEPS_EXT) + + set(OPENCV_MODULE_${m}_DEPS ${OPENCV_MODULE_${m}_DEPS} CACHE INTERNAL "Flattened dependencies of ${m} module") + set(OPENCV_MODULE_${m}_DEPS_EXT ${OPENCV_MODULE_${m}_DEPS_EXT} CACHE INTERNAL "Extra dependencies of ${m} module") +diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt +index e3177bd..f902b2b 100644 +--- a/data/CMakeLists.txt ++++ b/data/CMakeLists.txt +@@ -5,8 +5,6 @@ if(ANDROID) + install(FILES ${HAAR_CASCADES} DESTINATION sdk/etc/haarcascades COMPONENT libs) + install(FILES ${LBP_CASCADES} DESTINATION sdk/etc/lbpcascades COMPONENT libs) + else() +- install(FILES ${HAAR_CASCADES} DESTINATION share/OpenCV/haarcascades COMPONENT libs) +- install(FILES ${LBP_CASCADES} DESTINATION share/OpenCV/lbpcascades COMPONENT libs) + endif() + + if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH) +@@ -51,4 +49,4 @@ if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH) + install(FILES ${DATAFILES_CASCADES} DESTINATION share/OpenCV/testdata/data/haarcascades COMPONENT tests) + endif() + endif() +-endif() +\ No newline at end of file ++endif() +diff --git a/modules/core/CMakeLists.txt b/modules/core/CMakeLists.txt +index d9de52d..be604dc 100644 +--- a/modules/core/CMakeLists.txt ++++ b/modules/core/CMakeLists.txt +@@ -1,9 +1,9 @@ + set(the_description "The Core Functionality") + + if (NOT HAVE_CUDA OR ENABLE_DYNAMIC_CUDA) +- ocv_add_module(core PRIVATE_REQUIRED ${ZLIB_LIBRARIES}) ++ ocv_add_module(core PRIVATE_REQUIRED ZLIB::ZLIB) + else() +- ocv_add_module(core PRIVATE_REQUIRED ${ZLIB_LIBRARIES} ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY}) ++ ocv_add_module(core PRIVATE_REQUIRED ZLIB::ZLIB ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY}) + endif() + + ocv_module_include_directories("${OpenCV_SOURCE_DIR}/modules/dynamicuda/include/" ${ZLIB_INCLUDE_DIR}) +diff --git a/modules/highgui/CMakeLists.txt b/modules/highgui/CMakeLists.txt +index d59e95a..ce7f87b 100644 +--- a/modules/highgui/CMakeLists.txt ++++ b/modules/highgui/CMakeLists.txt +@@ -15,23 +15,23 @@ endif() + + if(HAVE_PNG OR HAVE_TIFF OR HAVE_OPENEXR) + ocv_include_directories(${ZLIB_INCLUDE_DIR}) +- list(APPEND GRFMT_LIBS ${ZLIB_LIBRARIES}) ++ list(APPEND GRFMT_LIBS ZLIB::ZLIB) + endif() + + if(HAVE_JPEG) + ocv_include_directories(${JPEG_INCLUDE_DIR}) +- list(APPEND GRFMT_LIBS ${JPEG_LIBRARIES}) ++ list(APPEND GRFMT_LIBS JPEG::JPEG) + endif() + + if(HAVE_PNG) + add_definitions(${PNG_DEFINITIONS}) + ocv_include_directories(${PNG_INCLUDE_DIR}) +- list(APPEND GRFMT_LIBS ${PNG_LIBRARIES}) ++ list(APPEND GRFMT_LIBS PNG::PNG) + endif() + + if(HAVE_TIFF) + ocv_include_directories(${TIFF_INCLUDE_DIR}) +- list(APPEND GRFMT_LIBS ${TIFF_LIBRARIES}) ++ list(APPEND GRFMT_LIBS TIFF::TIFF) + endif() + + if(HAVE_JASPER) +@@ -296,38 +296,5 @@ endif() + ocv_add_precompiled_headers(${the_module}) + ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-deprecated-declarations -Wno-clobbered) + +-if(WIN32 AND WITH_FFMPEG) +- #copy ffmpeg dll to the output folder +- if(MSVC64 OR MINGW64) +- set(FFMPEG_SUFFIX _64) +- endif() +- +- set(ffmpeg_bare_name "opencv_ffmpeg${FFMPEG_SUFFIX}.dll") +- set(ffmpeg_bare_name_ver "opencv_ffmpeg${OPENCV_DLLVERSION}${FFMPEG_SUFFIX}.dll") +- set(ffmpeg_path "${OpenCV_SOURCE_DIR}/3rdparty/ffmpeg/${ffmpeg_bare_name}") +- +- #if(MSVC AND CMAKE_VERSION VERSION_GREATER "2.8.2") +- # add_custom_command(TARGET ${the_module} POST_BUILD +- # COMMAND ${CMAKE_COMMAND} -E copy "${ffmpeg_path}" "${EXECUTABLE_OUTPUT_PATH}/$/${ffmpeg_bare_name_ver}" +- # COMMENT "Copying ${ffmpeg_path} to the output directory") +- #else +- if(MSVC_IDE) +- add_custom_command(TARGET ${the_module} POST_BUILD +- COMMAND ${CMAKE_COMMAND} -E copy "${ffmpeg_path}" "${EXECUTABLE_OUTPUT_PATH}/Release/${ffmpeg_bare_name_ver}" +- COMMAND ${CMAKE_COMMAND} -E copy "${ffmpeg_path}" "${EXECUTABLE_OUTPUT_PATH}/Debug/${ffmpeg_bare_name_ver}" +- COMMENT "Copying ${ffmpeg_path} to the output directory") +- elseif(MSVC AND (CMAKE_GENERATOR MATCHES "Visual")) +- add_custom_command(TARGET ${the_module} POST_BUILD +- COMMAND ${CMAKE_COMMAND} -E copy "${ffmpeg_path}" "${EXECUTABLE_OUTPUT_PATH}/${CMAKE_BUILD_TYPE}/${ffmpeg_bare_name_ver}" +- COMMENT "Copying ${ffmpeg_path} to the output directory") +- else() +- add_custom_command(TARGET ${the_module} POST_BUILD +- COMMAND ${CMAKE_COMMAND} -E copy "${ffmpeg_path}" "${EXECUTABLE_OUTPUT_PATH}/${ffmpeg_bare_name_ver}" +- COMMENT "Copying ${ffmpeg_path} to the output directory") +- endif() +- +- install(FILES "${ffmpeg_path}" DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT libs RENAME "${ffmpeg_bare_name_ver}") +-endif() +- + ocv_add_accuracy_tests() + ocv_add_perf_tests() diff --git a/vcpkg/ports/opencv2/0003-force-package-requirements.patch b/vcpkg/ports/opencv2/0003-force-package-requirements.patch new file mode 100644 index 0000000..aea8936 --- /dev/null +++ b/vcpkg/ports/opencv2/0003-force-package-requirements.patch @@ -0,0 +1,58 @@ +diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake +index 43c3b16..9b43066 100644 +--- a/cmake/OpenCVFindLibsGrfmt.cmake ++++ b/cmake/OpenCVFindLibsGrfmt.cmake +@@ -6,7 +6,7 @@ + if(BUILD_ZLIB) + ocv_clear_vars(ZLIB_FOUND) + else() +- include(FindZLIB) ++ find_package(ZLIB REQUIRED) + if(ZLIB_FOUND AND ANDROID) + if(ZLIB_LIBRARIES STREQUAL "${ANDROID_SYSROOT}/usr/lib/libz.so" OR + ZLIB_LIBRARIES STREQUAL "${ANDROID_SYSROOT}/usr/lib64/libz.so") +@@ -32,7 +32,7 @@ if(WITH_TIFF) + if(BUILD_TIFF) + ocv_clear_vars(TIFF_FOUND) + else() +- include(FindTIFF) ++ find_package(TIFF REQUIRED) + if(TIFF_FOUND) + ocv_parse_header("${TIFF_INCLUDE_DIR}/tiff.h" TIFF_VERSION_LINES TIFF_VERSION_CLASSIC TIFF_VERSION_BIG TIFF_VERSION TIFF_BIGTIFF_VERSION) + endif() +@@ -74,7 +74,7 @@ if(WITH_JPEG) + if(BUILD_JPEG) + ocv_clear_vars(JPEG_FOUND) + else() +- include(FindJPEG) ++ find_package(JPEG REQUIRED) + endif() + + if(NOT JPEG_FOUND) +@@ -95,7 +95,7 @@ if(WITH_JASPER) + if(BUILD_JASPER) + ocv_clear_vars(JASPER_FOUND) + else() +- include(FindJasper) ++ find_package(Jasper REQUIRED) + endif() + + if(NOT JASPER_FOUND) +@@ -119,7 +119,7 @@ if(WITH_PNG) + if(BUILD_PNG) + ocv_clear_vars(PNG_FOUND) + else() +- include(FindPNG) ++ find_package(PNG REQUIRED) + if(PNG_FOUND) + include(CheckIncludeFile) + check_include_file("${PNG_PNG_INCLUDE_DIR}/libpng/png.h" HAVE_LIBPNG_PNG_H) +@@ -151,7 +151,7 @@ if(WITH_OPENEXR) + if(BUILD_OPENEXR) + ocv_clear_vars(OPENEXR_FOUND) + else() +- include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenEXR.cmake") ++ find_package(OpenEXR REQUIRED) + endif() + + if(NOT OPENEXR_FOUND) diff --git a/vcpkg/ports/opencv2/0004-add-ffmpeg-missing-defines.patch b/vcpkg/ports/opencv2/0004-add-ffmpeg-missing-defines.patch new file mode 100644 index 0000000..638581d --- /dev/null +++ b/vcpkg/ports/opencv2/0004-add-ffmpeg-missing-defines.patch @@ -0,0 +1,12 @@ +--- a/modules/highgui/src/cap_ffmpeg_impl.hpp ++++ b/modules/highgui/src/cap_ffmpeg_impl.hpp +@@ -42,6 +42,9 @@ + + #define HAVE_FFMPEG_SWSCALE + #define HAVE_GENTOO_FFMPEG ++#define AV_CODEC_FLAG_GLOBAL_HEADER (1 << 22) ++#define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER ++#define AVFMT_RAWPICTURE 0x0020 + + #include "cap_ffmpeg_api.hpp" + #include diff --git a/vcpkg/ports/opencv2/0005-fix-cuda.patch b/vcpkg/ports/opencv2/0005-fix-cuda.patch new file mode 100644 index 0000000..c5e2140 --- /dev/null +++ b/vcpkg/ports/opencv2/0005-fix-cuda.patch @@ -0,0 +1,138 @@ +--- a/cmake/OpenCVDetectCUDA.cmake ++++ b/cmake/OpenCVDetectCUDA.cmake +@@ -51,7 +51,7 @@ if(CUDA_FOUND) + + message(STATUS "CUDA detected: " ${CUDA_VERSION}) + +- set(_generations "Fermi" "Kepler") ++ set(_generations "Kepler" "Maxwell") + if(NOT CMAKE_CROSSCOMPILING) + list(APPEND _generations "Auto") + endif() +@@ -70,14 +70,10 @@ if(CUDA_FOUND) + endif() + + set(__cuda_arch_ptx "") +- if(CUDA_GENERATION STREQUAL "Fermi") +- set(__cuda_arch_bin "2.0 2.1(2.0)") +- elseif(CUDA_GENERATION STREQUAL "Kepler") +- if(${CUDA_VERSION} VERSION_LESS "5.0") +- set(__cuda_arch_bin "3.0") +- else() +- set(__cuda_arch_bin "3.0 3.5") +- endif() ++ if(CUDA_GENERATION STREQUAL "Kepler") ++ set(__cuda_arch_bin "3.0 3.5 3.7") ++ elseif(CUDA_GENERATION STREQUAL "Maxwell") ++ set(__cuda_arch_bin "5.0 5.2") + elseif(CUDA_GENERATION STREQUAL "Auto") + execute_process( COMMAND "${CUDA_NVCC_EXECUTABLE}" "${OpenCV_SOURCE_DIR}/cmake/checks/OpenCVDetectCudaArch.cu" "--run" + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/" +@@ -87,7 +83,6 @@ if(CUDA_FOUND) + message(STATUS "Automatic detection of CUDA generation failed. Going to build for all known architectures.") + else() + set(__cuda_arch_bin "${_nvcc_out}") +- string(REPLACE "2.1" "2.1(2.0)" __cuda_arch_bin "${__cuda_arch_bin}") + endif() + endif() + +@@ -102,11 +97,11 @@ if(CUDA_FOUND) + endif() + else() + if(${CUDA_VERSION} VERSION_LESS "5.0") +- set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0") ++ set(__cuda_arch_bin "3.0") + elseif(${CUDA_VERSION} VERSION_GREATER "6.5") +- set(__cuda_arch_bin "2.0 2.1(2.0) 3.0 3.5") ++ set(__cuda_arch_bin "3.0 3.5") + else() +- set(__cuda_arch_bin "1.1 1.2 1.3 2.0 2.1(2.0) 3.0 3.5") ++ set(__cuda_arch_bin "3.0 3.5") + endif() + set(__cuda_arch_ptx "3.0") + endif() +diff --git a/cmake/templates/OpenCVConfig.cmake.in b/cmake/templates/OpenCVConfig.cmake.in +index fe85571..0f9d2f5 100644 +--- a/cmake/templates/OpenCVConfig.cmake.in ++++ b/cmake/templates/OpenCVConfig.cmake.in +@@ -256,7 +256,7 @@ if(OpenCV_CUDA_VERSION) + + set(OpenCV_CUDA_LIBS_ABSPATH ${CUDA_LIBRARIES}) + +- if(${CUDA_VERSION} VERSION_LESS "5.5") ++ if(CUDA_VERSION VERSION_LESS "5.5") + list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_npp_LIBRARY}) + else() + find_cuda_helper_libs(nppc) +@@ -281,14 +281,16 @@ if(OpenCV_CUDA_VERSION) + list(APPEND OpenCV_CUDA_LIBS_ABSPATH ${CUDA_nvcuvenc_LIBRARIES}) + endif() + ++ set(OpenCV_CUDA_LIBS_RELPATH "") + foreach(l ${OpenCV_CUDA_LIBS_ABSPATH}) +- get_filename_component(_tmp "${l}" NAME_WE) +- string(REGEX REPLACE "^lib" "" _tmp "${_tmp}") +- if(NOT TARGET "opencv_dep_${_tmp}") # protect against repeated inclusions +- add_library("opencv_dep_${_tmp}" UNKNOWN IMPORTED) +- set_target_properties("opencv_dep_${_tmp}" PROPERTIES IMPORTED_LOCATION "${l}") ++ get_filename_component(_tmp ${l} PATH) ++ if(NOT ${_tmp} MATCHES "-Wl.*") ++ list(APPEND OpenCV_CUDA_LIBS_RELPATH ${_tmp}) + endif() + endforeach() ++ ++ list(REMOVE_DUPLICATES OpenCV_CUDA_LIBS_RELPATH) ++ link_directories(${OpenCV_CUDA_LIBS_RELPATH}) + endif() + + # ============================================================== +diff --git a/cmake/OpenCVDetectCUDA.cmake b/cmake/OpenCVDetectCUDA.cmake +index 30b5093..50dcdc9 100644 +--- a/cmake/OpenCVDetectCUDA.cmake ++++ b/cmake/OpenCVDetectCUDA.cmake +@@ -229,18 +229,40 @@ else() + endif() + + if(HAVE_CUDA) ++ set(CUDA_LIBS_PATH "") ++ foreach(p ${CUDA_LIBRARIES} ${CUDA_npp_LIBRARY}) ++ get_filename_component(_tmp ${p} PATH) ++ list(APPEND CUDA_LIBS_PATH ${_tmp}) ++ endforeach() ++ ++ if(HAVE_CUBLAS) ++ foreach(p ${CUDA_cublas_LIBRARY}) ++ get_filename_component(_tmp ${p} PATH) ++ list(APPEND CUDA_LIBS_PATH ${_tmp}) ++ endforeach() ++ endif() ++ ++ if(HAVE_CUFFT) ++ foreach(p ${CUDA_cufft_LIBRARY}) ++ get_filename_component(_tmp ${p} PATH) ++ list(APPEND CUDA_LIBS_PATH ${_tmp}) ++ endforeach() ++ endif() ++ ++ list(REMOVE_DUPLICATES CUDA_LIBS_PATH) ++ link_directories(${CUDA_LIBS_PATH}) ++ + set(CUDA_LIBRARIES_ABS ${CUDA_LIBRARIES}) +- ocv_create_imported_targets(CUDA_LIBRARIES ${CUDA_LIBRARIES}) ++ ocv_convert_to_lib_name(CUDA_LIBRARIES ${CUDA_LIBRARIES}) + set(CUDA_npp_LIBRARY_ABS ${CUDA_npp_LIBRARY}) +- ocv_create_imported_targets(CUDA_npp_LIBRARY ${CUDA_npp_LIBRARY}) +- ++ ocv_convert_to_lib_name(CUDA_npp_LIBRARY ${CUDA_npp_LIBRARY}) + if(HAVE_CUBLAS) + set(CUDA_cublas_LIBRARY_ABS ${CUDA_cublas_LIBRARY}) +- ocv_create_imported_targets(CUDA_cublas_LIBRARY ${CUDA_cublas_LIBRARY}) ++ ocv_convert_to_lib_name(CUDA_cublas_LIBRARY ${CUDA_cublas_LIBRARY}) + endif() + + if(HAVE_CUFFT) + set(CUDA_cufft_LIBRARY_ABS ${CUDA_cufft_LIBRARY}) +- ocv_create_imported_targets(CUDA_cufft_LIBRARY ${CUDA_cufft_LIBRARY}) ++ ocv_convert_to_lib_name(CUDA_cufft_LIBRARY ${CUDA_cufft_LIBRARY}) + endif() + endif() diff --git a/vcpkg/ports/opencv2/CONTROL b/vcpkg/ports/opencv2/CONTROL new file mode 100644 index 0000000..d2cff4b --- /dev/null +++ b/vcpkg/ports/opencv2/CONTROL @@ -0,0 +1,53 @@ +Source: opencv2 +Version: 2.4.13.7 +Port-Version: 2 +Build-Depends: zlib +Description: computer vision library, version 2 +Default-Features: eigen, jpeg, opengl, png, tiff + +Feature: cuda +Build-Depends: cuda +Description: CUDA support for opencv + +Feature: eigen +Build-Depends: eigen3 +Description: Eigen support for opencv + +Feature: ffmpeg +Build-Depends: ffmpeg +Description: ffmpeg support for opencv + +Feature: jasper +Build-Depends: jasper +Description: JPEG 2000 support for opencv + +Feature: jpeg +Build-Depends: libjpeg-turbo +Description: JPEG support for opencv + +Feature: openexr +Build-Depends: openexr +Description: OpenEXR support for opencv + +Feature: opengl +Build-Depends: opengl +Description: opengl support for opencv + +Feature: png +Build-Depends: libpng +Description: PNG support for opencv + +Feature: qt +Build-Depends: qt5-base[core] +Description: Qt GUI support for opencv + +Feature: tiff +Build-Depends: tiff +Description: TIFF support for opencv + +Feature: vtk +Build-Depends: vtk +Description: vtk support for opencv + +Feature: world +Description: Compile to a single package support for opencv diff --git a/vcpkg/ports/opencv2/FindCUDA.cmake b/vcpkg/ports/opencv2/FindCUDA.cmake new file mode 100644 index 0000000..56e15e8 --- /dev/null +++ b/vcpkg/ports/opencv2/FindCUDA.cmake @@ -0,0 +1,2026 @@ +#[=======================================================================[.rst: +FindCUDA +-------- + +.. deprecated:: 3.10 + + Superseded by first-class support for the CUDA language in CMake. + Superseded by the :module:`FindCUDAToolkit` for CUDA toolkit libraries. + +Replacement +^^^^^^^^^^^ + +It is no longer necessary to use this module or call ``find_package(CUDA)`` +for compiling CUDA code. Instead, list ``CUDA`` among the languages named +in the top-level call to the :command:`project` command, or call the +:command:`enable_language` command with ``CUDA``. +Then one can add CUDA (``.cu``) sources to programs directly +in calls to :command:`add_library` and :command:`add_executable`. + +To find and use the CUDA toolkit libraries the :module:`FindCUDAToolkit` +module has superseded this module. It works whether or not the ``CUDA`` +language is enabled. + +Documentation of Deprecated Usage +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Tools for building CUDA C files: libraries and build dependencies. + +This script locates the NVIDIA CUDA C tools. It should work on Linux, +Windows, and macOS and should be reasonably up to date with CUDA C +releases. + +This script makes use of the standard :command:`find_package` arguments of +````, ``REQUIRED`` and ``QUIET``. ``CUDA_FOUND`` will report if an +acceptable version of CUDA was found. + +The script will prompt the user to specify ``CUDA_TOOLKIT_ROOT_DIR`` if +the prefix cannot be determined by the location of nvcc in the system +path and ``REQUIRED`` is specified to :command:`find_package`. To use +a different installed version of the toolkit set the environment variable +``CUDA_BIN_PATH`` before running cmake (e.g. +``CUDA_BIN_PATH=/usr/local/cuda1.0`` instead of the default +``/usr/local/cuda``) or set ``CUDA_TOOLKIT_ROOT_DIR`` after configuring. If +you change the value of ``CUDA_TOOLKIT_ROOT_DIR``, various components that +depend on the path will be relocated. + +It might be necessary to set ``CUDA_TOOLKIT_ROOT_DIR`` manually on certain +platforms, or to use a CUDA runtime not installed in the default +location. In newer versions of the toolkit the CUDA library is +included with the graphics driver -- be sure that the driver version +matches what is needed by the CUDA runtime version. + +The following variables affect the behavior of the macros in the +script (in alphabetical order). Note that any of these flags can be +changed multiple times in the same directory before calling +``CUDA_ADD_EXECUTABLE``, ``CUDA_ADD_LIBRARY``, ``CUDA_COMPILE``, +``CUDA_COMPILE_PTX``, ``CUDA_COMPILE_FATBIN``, ``CUDA_COMPILE_CUBIN`` +or ``CUDA_WRAP_SRCS``:: + + CUDA_64_BIT_DEVICE_CODE (Default matches host bit size) + -- Set to ON to compile for 64 bit device code, OFF for 32 bit device code. + Note that making this different from the host code when generating object + or C files from CUDA code just won't work, because size_t gets defined by + nvcc in the generated source. If you compile to PTX and then load the + file yourself, you can mix bit sizes between device and host. + + CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE (Default ON) + -- Set to ON if you want the custom build rule to be attached to the source + file in Visual Studio. Turn OFF if you add the same cuda file to multiple + targets. + + This allows the user to build the target from the CUDA file; however, bad + things can happen if the CUDA source file is added to multiple targets. + When performing parallel builds it is possible for the custom build + command to be run more than once and in parallel causing cryptic build + errors. VS runs the rules for every source file in the target, and a + source can have only one rule no matter how many projects it is added to. + When the rule is run from multiple targets race conditions can occur on + the generated file. Eventually everything will get built, but if the user + is unaware of this behavior, there may be confusion. It would be nice if + this script could detect the reuse of source files across multiple targets + and turn the option off for the user, but no good solution could be found. + + CUDA_BUILD_CUBIN (Default OFF) + -- Set to ON to enable and extra compilation pass with the -cubin option in + Device mode. The output is parsed and register, shared memory usage is + printed during build. + + CUDA_BUILD_EMULATION (Default OFF for device mode) + -- Set to ON for Emulation mode. -D_DEVICEEMU is defined for CUDA C files + when CUDA_BUILD_EMULATION is TRUE. + + CUDA_LINK_LIBRARIES_KEYWORD (Default "") + -- The keyword to use for internal + target_link_libraries calls. The default is to use no keyword which + uses the old "plain" form of target_link_libraries. Note that is matters + because whatever is used inside the FindCUDA module must also be used + outside - the two forms of target_link_libraries cannot be mixed. + + CUDA_GENERATED_OUTPUT_DIR (Default CMAKE_CURRENT_BINARY_DIR) + -- Set to the path you wish to have the generated files placed. If it is + blank output files will be placed in CMAKE_CURRENT_BINARY_DIR. + Intermediate files will always be placed in + CMAKE_CURRENT_BINARY_DIR/CMakeFiles. + + CUDA_HOST_COMPILATION_CPP (Default ON) + -- Set to OFF for C compilation of host code. + + CUDA_HOST_COMPILER (Default CMAKE_C_COMPILER) + -- Set the host compiler to be used by nvcc. Ignored if -ccbin or + --compiler-bindir is already present in the CUDA_NVCC_FLAGS or + CUDA_NVCC_FLAGS_ variables. For Visual Studio targets, + the host compiler is constructed with one or more visual studio macros + such as $(VCInstallDir), that expands out to the path when + the command is run from within VS. + If the CUDAHOSTCXX environment variable is set it will + be used as the default. + + CUDA_NVCC_FLAGS + CUDA_NVCC_FLAGS_ + -- Additional NVCC command line arguments. NOTE: multiple arguments must be + semi-colon delimited (e.g. --compiler-options;-Wall) + + CUDA_PROPAGATE_HOST_FLAGS (Default ON) + -- Set to ON to propagate CMAKE_{C,CXX}_FLAGS and their configuration + dependent counterparts (e.g. CMAKE_C_FLAGS_DEBUG) automatically to the + host compiler through nvcc's -Xcompiler flag. This helps make the + generated host code match the rest of the system better. Sometimes + certain flags give nvcc problems, and this will help you turn the flag + propagation off. This does not affect the flags supplied directly to nvcc + via CUDA_NVCC_FLAGS or through the OPTION flags specified through + CUDA_ADD_LIBRARY, CUDA_ADD_EXECUTABLE, or CUDA_WRAP_SRCS. Flags used for + shared library compilation are not affected by this flag. + + CUDA_SEPARABLE_COMPILATION (Default OFF) + -- If set this will enable separable compilation for all CUDA runtime object + files. If used outside of CUDA_ADD_EXECUTABLE and CUDA_ADD_LIBRARY + (e.g. calling CUDA_WRAP_SRCS directly), + CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME and + CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS should be called. + + CUDA_SOURCE_PROPERTY_FORMAT + -- If this source file property is set, it can override the format specified + to CUDA_WRAP_SRCS (OBJ, PTX, CUBIN, or FATBIN). If an input source file + is not a .cu file, setting this file will cause it to be treated as a .cu + file. See documentation for set_source_files_properties on how to set + this property. + + CUDA_USE_STATIC_CUDA_RUNTIME (Default ON) + -- When enabled the static version of the CUDA runtime library will be used + in CUDA_LIBRARIES. If the version of CUDA configured doesn't support + this option, then it will be silently disabled. + + CUDA_VERBOSE_BUILD (Default OFF) + -- Set to ON to see all the commands used when building the CUDA file. When + using a Makefile generator the value defaults to VERBOSE (run make + VERBOSE=1 to see output), although setting CUDA_VERBOSE_BUILD to ON will + always print the output. + +The script creates the following macros (in alphabetical order):: + + CUDA_ADD_CUFFT_TO_TARGET( cuda_target ) + -- Adds the cufft library to the target (can be any target). Handles whether + you are in emulation mode or not. + + CUDA_ADD_CUBLAS_TO_TARGET( cuda_target ) + -- Adds the cublas library to the target (can be any target). Handles + whether you are in emulation mode or not. + + CUDA_ADD_EXECUTABLE( cuda_target file0 file1 ... + [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL] [OPTIONS ...] ) + -- Creates an executable "cuda_target" which is made up of the files + specified. All of the non CUDA C files are compiled using the standard + build rules specified by CMAKE and the cuda files are compiled to object + files using nvcc and the host compiler. In addition CUDA_INCLUDE_DIRS is + added automatically to include_directories(). Some standard CMake target + calls can be used on the target after calling this macro + (e.g. set_target_properties and target_link_libraries), but setting + properties that adjust compilation flags will not affect code compiled by + nvcc. Such flags should be modified before calling CUDA_ADD_EXECUTABLE, + CUDA_ADD_LIBRARY or CUDA_WRAP_SRCS. + + CUDA_ADD_LIBRARY( cuda_target file0 file1 ... + [STATIC | SHARED | MODULE] [EXCLUDE_FROM_ALL] [OPTIONS ...] ) + -- Same as CUDA_ADD_EXECUTABLE except that a library is created. + + CUDA_BUILD_CLEAN_TARGET() + -- Creates a convenience target that deletes all the dependency files + generated. You should make clean after running this target to ensure the + dependency files get regenerated. + + CUDA_COMPILE( generated_files file0 file1 ... [STATIC | SHARED | MODULE] + [OPTIONS ...] ) + -- Returns a list of generated files from the input source files to be used + with ADD_LIBRARY or ADD_EXECUTABLE. + + CUDA_COMPILE_PTX( generated_files file0 file1 ... [OPTIONS ...] ) + -- Returns a list of PTX files generated from the input source files. + + CUDA_COMPILE_FATBIN( generated_files file0 file1 ... [OPTIONS ...] ) + -- Returns a list of FATBIN files generated from the input source files. + + CUDA_COMPILE_CUBIN( generated_files file0 file1 ... [OPTIONS ...] ) + -- Returns a list of CUBIN files generated from the input source files. + + CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME( output_file_var + cuda_target + object_files ) + -- Compute the name of the intermediate link file used for separable + compilation. This file name is typically passed into + CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS. output_file_var is produced + based on cuda_target the list of objects files that need separable + compilation as specified by object_files. If the object_files list is + empty, then output_file_var will be empty. This function is called + automatically for CUDA_ADD_LIBRARY and CUDA_ADD_EXECUTABLE. Note that + this is a function and not a macro. + + CUDA_INCLUDE_DIRECTORIES( path0 path1 ... ) + -- Sets the directories that should be passed to nvcc + (e.g. nvcc -Ipath0 -Ipath1 ... ). These paths usually contain other .cu + files. + + + CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS( output_file_var cuda_target + nvcc_flags object_files) + -- Generates the link object required by separable compilation from the given + object files. This is called automatically for CUDA_ADD_EXECUTABLE and + CUDA_ADD_LIBRARY, but can be called manually when using CUDA_WRAP_SRCS + directly. When called from CUDA_ADD_LIBRARY or CUDA_ADD_EXECUTABLE the + nvcc_flags passed in are the same as the flags passed in via the OPTIONS + argument. The only nvcc flag added automatically is the bitness flag as + specified by CUDA_64_BIT_DEVICE_CODE. Note that this is a function + instead of a macro. + + CUDA_SELECT_NVCC_ARCH_FLAGS(out_variable [target_CUDA_architectures]) + -- Selects GPU arch flags for nvcc based on target_CUDA_architectures + target_CUDA_architectures : Auto | Common | All | LIST(ARCH_AND_PTX ...) + - "Auto" detects local machine GPU compute arch at runtime. + - "Common" and "All" cover common and entire subsets of architectures + ARCH_AND_PTX : NAME | NUM.NUM | NUM.NUM(NUM.NUM) | NUM.NUM+PTX + NAME: Fermi Kepler Maxwell Kepler+Tegra Kepler+Tesla Maxwell+Tegra Pascal + NUM: Any number. Only those pairs are currently accepted by NVCC though: + 2.0 2.1 3.0 3.2 3.5 3.7 5.0 5.2 5.3 6.0 6.2 + Returns LIST of flags to be added to CUDA_NVCC_FLAGS in ${out_variable} + Additionally, sets ${out_variable}_readable to the resulting numeric list + Example: + CUDA_SELECT_NVCC_ARCH_FLAGS(ARCH_FLAGS 3.0 3.5+PTX 5.2(5.0) Maxwell) + LIST(APPEND CUDA_NVCC_FLAGS ${ARCH_FLAGS}) + + More info on CUDA architectures: https://en.wikipedia.org/wiki/CUDA + Note that this is a function instead of a macro. + + CUDA_WRAP_SRCS ( cuda_target format generated_files file0 file1 ... + [STATIC | SHARED | MODULE] [OPTIONS ...] ) + -- This is where all the magic happens. CUDA_ADD_EXECUTABLE, + CUDA_ADD_LIBRARY, CUDA_COMPILE, and CUDA_COMPILE_PTX all call this + function under the hood. + + Given the list of files (file0 file1 ... fileN) this macro generates + custom commands that generate either PTX or linkable objects (use "PTX" or + "OBJ" for the format argument to switch). Files that don't end with .cu + or have the HEADER_FILE_ONLY property are ignored. + + The arguments passed in after OPTIONS are extra command line options to + give to nvcc. You can also specify per configuration options by + specifying the name of the configuration followed by the options. General + options must precede configuration specific options. Not all + configurations need to be specified, only the ones provided will be used. + + OPTIONS -DFLAG=2 "-DFLAG_OTHER=space in flag" + DEBUG -g + RELEASE --use_fast_math + RELWITHDEBINFO --use_fast_math;-g + MINSIZEREL --use_fast_math + + For certain configurations (namely VS generating object files with + CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE set to ON), no generated file will + be produced for the given cuda file. This is because when you add the + cuda file to Visual Studio it knows that this file produces an object file + and will link in the resulting object file automatically. + + This script will also generate a separate cmake script that is used at + build time to invoke nvcc. This is for several reasons. + + 1. nvcc can return negative numbers as return values which confuses + Visual Studio into thinking that the command succeeded. The script now + checks the error codes and produces errors when there was a problem. + + 2. nvcc has been known to not delete incomplete results when it + encounters problems. This confuses build systems into thinking the + target was generated when in fact an unusable file exists. The script + now deletes the output files if there was an error. + + 3. By putting all the options that affect the build into a file and then + make the build rule dependent on the file, the output files will be + regenerated when the options change. + + This script also looks at optional arguments STATIC, SHARED, or MODULE to + determine when to target the object compilation for a shared library. + BUILD_SHARED_LIBS is ignored in CUDA_WRAP_SRCS, but it is respected in + CUDA_ADD_LIBRARY. On some systems special flags are added for building + objects intended for shared libraries. A preprocessor macro, + _EXPORTS is defined when a shared library compilation is + detected. + + Flags passed into add_definitions with -D or /D are passed along to nvcc. + + + +The script defines the following variables:: + + CUDA_VERSION_MAJOR -- The major version of cuda as reported by nvcc. + CUDA_VERSION_MINOR -- The minor version. + CUDA_VERSION + CUDA_VERSION_STRING -- CUDA_VERSION_MAJOR.CUDA_VERSION_MINOR + CUDA_HAS_FP16 -- Whether a short float (float16,fp16) is supported. + + CUDA_TOOLKIT_ROOT_DIR -- Path to the CUDA Toolkit (defined if not set). + CUDA_SDK_ROOT_DIR -- Path to the CUDA SDK. Use this to find files in the + SDK. This script will not directly support finding + specific libraries or headers, as that isn't + supported by NVIDIA. If you want to change + libraries when the path changes see the + FindCUDA.cmake script for an example of how to clear + these variables. There are also examples of how to + use the CUDA_SDK_ROOT_DIR to locate headers or + libraries, if you so choose (at your own risk). + CUDA_INCLUDE_DIRS -- Include directory for cuda headers. Added automatically + for CUDA_ADD_EXECUTABLE and CUDA_ADD_LIBRARY. + CUDA_LIBRARIES -- Cuda RT library. + CUDA_CUFFT_LIBRARIES -- Device or emulation library for the Cuda FFT + implementation (alternative to: + CUDA_ADD_CUFFT_TO_TARGET macro) + CUDA_CUBLAS_LIBRARIES -- Device or emulation library for the Cuda BLAS + implementation (alternative to: + CUDA_ADD_CUBLAS_TO_TARGET macro). + CUDA_cudart_static_LIBRARY -- Statically linkable cuda runtime library. + Only available for CUDA version 5.5+ + CUDA_cudadevrt_LIBRARY -- Device runtime library. + Required for separable compilation. + CUDA_cupti_LIBRARY -- CUDA Profiling Tools Interface library. + Only available for CUDA version 4.0+. + CUDA_curand_LIBRARY -- CUDA Random Number Generation library. + Only available for CUDA version 3.2+. + CUDA_cusolver_LIBRARY -- CUDA Direct Solver library. + Only available for CUDA version 7.0+. + CUDA_cusparse_LIBRARY -- CUDA Sparse Matrix library. + Only available for CUDA version 3.2+. + CUDA_npp_LIBRARY -- NVIDIA Performance Primitives lib. + Only available for CUDA version 4.0+. + CUDA_nppc_LIBRARY -- NVIDIA Performance Primitives lib (core). + Only available for CUDA version 5.5+. + CUDA_nppi_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 5.5 - 8.0. + CUDA_nppial_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_nppicc_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_nppicom_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0 - 10.2. + Replaced by nvjpeg. + CUDA_nppidei_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_nppif_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_nppig_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_nppim_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_nppist_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_nppisu_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_nppitc_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_npps_LIBRARY -- NVIDIA Performance Primitives lib (signal processing). + Only available for CUDA version 5.5+. + CUDA_nvcuvenc_LIBRARY -- CUDA Video Encoder library. + Only available for CUDA version 3.2+. + Windows only. + CUDA_nvcuvid_LIBRARY -- CUDA Video Decoder library. + Only available for CUDA version 3.2+. + Windows only. + CUDA_nvToolsExt_LIBRARY + -- NVIDA CUDA Tools Extension library. + Available for CUDA version 5+. + CUDA_OpenCL_LIBRARY -- NVIDA CUDA OpenCL library. + Available for CUDA version 5+. + +#]=======================================================================] + +# James Bigler, NVIDIA Corp (nvidia.com - jbigler) +# Abe Stephens, SCI Institute -- http://www.sci.utah.edu/~abe/FindCuda.html +# +# Copyright (c) 2008 - 2009 NVIDIA Corporation. All rights reserved. +# +# Copyright (c) 2007-2009 +# Scientific Computing and Imaging Institute, University of Utah +# +# This code is licensed under the MIT License. See the FindCUDA.cmake script +# for the text of the license. + +# The MIT License +# +# License for the specific language governing rights and limitations under +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### + +# FindCUDA.cmake + +# This macro helps us find the location of helper files we will need the full path to +macro(CUDA_FIND_HELPER_FILE _name _extension) + set(_full_name "${_name}.${_extension}") + # CMAKE_CURRENT_LIST_FILE contains the full path to the file currently being + # processed. Using this variable, we can pull out the current path, and + # provide a way to get access to the other files we need local to here. + set(CUDA_${_name} "${CMAKE_ROOT}/Modules/FindCUDA/${_full_name}") + if(NOT EXISTS "${CUDA_${_name}}") + set(error_message "${_full_name} not found in ${CMAKE_ROOT}/Modules/FindCUDA") + if(CUDA_FIND_REQUIRED) + message(FATAL_ERROR "${error_message}") + else() + if(NOT CUDA_FIND_QUIETLY) + message(STATUS "${error_message}") + endif() + endif() + endif() + # Set this variable as internal, so the user isn't bugged with it. + set(CUDA_${_name} ${CUDA_${_name}} CACHE INTERNAL "Location of ${_full_name}" FORCE) +endmacro() + +##################################################################### +## CUDA_INCLUDE_NVCC_DEPENDENCIES +## + +# So we want to try and include the dependency file if it exists. If +# it doesn't exist then we need to create an empty one, so we can +# include it. + +# If it does exist, then we need to check to see if all the files it +# depends on exist. If they don't then we should clear the dependency +# file and regenerate it later. This covers the case where a header +# file has disappeared or moved. + +macro(CUDA_INCLUDE_NVCC_DEPENDENCIES dependency_file) + set(CUDA_NVCC_DEPEND) + set(CUDA_NVCC_DEPEND_REGENERATE FALSE) + + + # Include the dependency file. Create it first if it doesn't exist . The + # INCLUDE puts a dependency that will force CMake to rerun and bring in the + # new info when it changes. DO NOT REMOVE THIS (as I did and spent a few + # hours figuring out why it didn't work. + if(NOT EXISTS ${dependency_file}) + file(WRITE ${dependency_file} "#FindCUDA.cmake generated file. Do not edit.\n") + endif() + # Always include this file to force CMake to run again next + # invocation and rebuild the dependencies. + #message("including dependency_file = ${dependency_file}") + include(${dependency_file}) + + # Now we need to verify the existence of all the included files + # here. If they aren't there we need to just blank this variable and + # make the file regenerate again. +# if(DEFINED CUDA_NVCC_DEPEND) +# message("CUDA_NVCC_DEPEND set") +# else() +# message("CUDA_NVCC_DEPEND NOT set") +# endif() + if(CUDA_NVCC_DEPEND) + #message("CUDA_NVCC_DEPEND found") + foreach(f ${CUDA_NVCC_DEPEND}) + # message("searching for ${f}") + if(NOT EXISTS ${f}) + #message("file ${f} not found") + set(CUDA_NVCC_DEPEND_REGENERATE TRUE) + endif() + endforeach() + else() + #message("CUDA_NVCC_DEPEND false") + # No dependencies, so regenerate the file. + set(CUDA_NVCC_DEPEND_REGENERATE TRUE) + endif() + + #message("CUDA_NVCC_DEPEND_REGENERATE = ${CUDA_NVCC_DEPEND_REGENERATE}") + # No incoming dependencies, so we need to generate them. Make the + # output depend on the dependency file itself, which should cause the + # rule to re-run. + if(CUDA_NVCC_DEPEND_REGENERATE) + set(CUDA_NVCC_DEPEND ${dependency_file}) + #message("Generating an empty dependency_file: ${dependency_file}") + file(WRITE ${dependency_file} "#FindCUDA.cmake generated file. Do not edit.\n") + endif() + +endmacro() + +############################################################################### +############################################################################### +# Setup variables' defaults +############################################################################### +############################################################################### + +# Allow the user to specify if the device code is supposed to be 32 or 64 bit. +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(CUDA_64_BIT_DEVICE_CODE_DEFAULT ON) +else() + set(CUDA_64_BIT_DEVICE_CODE_DEFAULT OFF) +endif() +option(CUDA_64_BIT_DEVICE_CODE "Compile device code in 64 bit mode" ${CUDA_64_BIT_DEVICE_CODE_DEFAULT}) + +# Attach the build rule to the source file in VS. This option +option(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE "Attach the build rule to the CUDA source file. Enable only when the CUDA source file is added to at most one target." ON) + +# Prints out extra information about the cuda file during compilation +option(CUDA_BUILD_CUBIN "Generate and parse .cubin files in Device mode." OFF) + +# Set whether we are using emulation or device mode. +option(CUDA_BUILD_EMULATION "Build in Emulation mode" OFF) + +# Where to put the generated output. +set(CUDA_GENERATED_OUTPUT_DIR "" CACHE PATH "Directory to put all the output files. If blank it will default to the CMAKE_CURRENT_BINARY_DIR") + +# Parse HOST_COMPILATION mode. +option(CUDA_HOST_COMPILATION_CPP "Generated file extension" ON) + +# Extra user settable flags +cmake_initialize_per_config_variable(CUDA_NVCC_FLAGS "Semi-colon delimit multiple arguments.") + +if(DEFINED ENV{CUDAHOSTCXX}) + set(CUDA_HOST_COMPILER "$ENV{CUDAHOSTCXX}" CACHE FILEPATH "Host side compiler used by NVCC") +elseif(CMAKE_GENERATOR MATCHES "Visual Studio") + set(_CUDA_MSVC_HOST_COMPILER "$(VCInstallDir)Tools/MSVC/$(VCToolsVersion)/bin/Host$(Platform)/$(PlatformTarget)") + if(MSVC_VERSION LESS 1910) + set(_CUDA_MSVC_HOST_COMPILER "$(VCInstallDir)bin") + endif() + + set(CUDA_HOST_COMPILER "${_CUDA_MSVC_HOST_COMPILER}" CACHE FILEPATH "Host side compiler used by NVCC") + +else() + if(APPLE + AND "${CMAKE_C_COMPILER_ID}" MATCHES "Clang" + AND "${CMAKE_C_COMPILER}" MATCHES "/cc$") + # Using cc which is symlink to clang may let NVCC think it is GCC and issue + # unhandled -dumpspecs option to clang. Also in case neither + # CMAKE_C_COMPILER is defined (project does not use C language) nor + # CUDA_HOST_COMPILER is specified manually we should skip -ccbin and let + # nvcc use its own default C compiler. + # Only care about this on APPLE with clang to avoid + # following symlinks to things like ccache + if(DEFINED CMAKE_C_COMPILER AND NOT DEFINED CUDA_HOST_COMPILER) + get_filename_component(c_compiler_realpath "${CMAKE_C_COMPILER}" REALPATH) + # if the real path does not end up being clang then + # go back to using CMAKE_C_COMPILER + if(NOT "${c_compiler_realpath}" MATCHES "/clang$") + set(c_compiler_realpath "${CMAKE_C_COMPILER}") + endif() + else() + set(c_compiler_realpath "") + endif() + set(CUDA_HOST_COMPILER "${c_compiler_realpath}" CACHE FILEPATH "Host side compiler used by NVCC") + elseif(MSVC AND "${CMAKE_C_COMPILER}" MATCHES "clcache|sccache") + # NVCC does not think it will work if it is passed clcache.exe or sccache.exe + # as the host compiler, which means that builds with CC=cl.exe won't work. + # Best to just feed it whatever the actual cl.exe is as the host compiler. + set(CUDA_HOST_COMPILER "cl.exe" CACHE FILEPATH "Host side compiler used by NVCC") + else() + set(CUDA_HOST_COMPILER "${CMAKE_C_COMPILER}" + CACHE FILEPATH "Host side compiler used by NVCC") + endif() +endif() + +# Propagate the host flags to the host compiler via -Xcompiler +option(CUDA_PROPAGATE_HOST_FLAGS "Propagate C/CXX_FLAGS and friends to the host compiler via -Xcompile" ON) + +# Enable CUDA_SEPARABLE_COMPILATION +option(CUDA_SEPARABLE_COMPILATION "Compile CUDA objects with separable compilation enabled. Requires CUDA 5.0+" OFF) + +# Specifies whether the commands used when compiling the .cu file will be printed out. +option(CUDA_VERBOSE_BUILD "Print out the commands run while compiling the CUDA source file. With the Makefile generator this defaults to VERBOSE variable specified on the command line, but can be forced on with this option." OFF) + +mark_as_advanced( + CUDA_64_BIT_DEVICE_CODE + CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE + CUDA_GENERATED_OUTPUT_DIR + CUDA_HOST_COMPILATION_CPP + CUDA_NVCC_FLAGS + CUDA_PROPAGATE_HOST_FLAGS + CUDA_BUILD_CUBIN + CUDA_BUILD_EMULATION + CUDA_VERBOSE_BUILD + CUDA_SEPARABLE_COMPILATION + ) + +# Single config generators like Makefiles or Ninja don't usually have +# CMAKE_CONFIGURATION_TYPES defined (but note that it can be defined if set by +# projects or developers). Even CMAKE_BUILD_TYPE might not be defined for +# single config generators (and should not be defined for multi-config +# generators). To ensure we get a complete superset of all possible +# configurations, we combine CMAKE_CONFIGURATION_TYPES, CMAKE_BUILD_TYPE and +# all of the standard configurations, then weed out duplicates with +# list(REMOVE_DUPLICATES). Looping over the unique set then ensures we have +# each configuration-specific set of nvcc flags defined and marked as advanced. +set(CUDA_configuration_types ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE} Debug MinSizeRel Release RelWithDebInfo) +list(REMOVE_DUPLICATES CUDA_configuration_types) + +############################################################################### +############################################################################### +# Locate CUDA, Set Build Type, etc. +############################################################################### +############################################################################### + +macro(cuda_unset_include_and_libraries) + unset(CUDA_TOOLKIT_INCLUDE CACHE) + unset(CUDA_CUDART_LIBRARY CACHE) + unset(CUDA_CUDA_LIBRARY CACHE) + # Make sure you run this before you unset CUDA_VERSION. + if(CUDA_VERSION VERSION_EQUAL "3.0") + # This only existed in the 3.0 version of the CUDA toolkit + unset(CUDA_CUDARTEMU_LIBRARY CACHE) + endif() + unset(CUDA_cudart_static_LIBRARY CACHE) + unset(CUDA_cudadevrt_LIBRARY CACHE) + unset(CUDA_cublas_LIBRARY CACHE) + unset(CUDA_cublas_device_LIBRARY CACHE) + unset(CUDA_cublasemu_LIBRARY CACHE) + unset(CUDA_cufft_LIBRARY CACHE) + unset(CUDA_cufftemu_LIBRARY CACHE) + unset(CUDA_cupti_LIBRARY CACHE) + unset(CUDA_curand_LIBRARY CACHE) + unset(CUDA_cusolver_LIBRARY CACHE) + unset(CUDA_cusparse_LIBRARY CACHE) + unset(CUDA_npp_LIBRARY CACHE) + unset(CUDA_nppc_LIBRARY CACHE) + unset(CUDA_nppi_LIBRARY CACHE) + unset(CUDA_npps_LIBRARY CACHE) + unset(CUDA_nvcuvenc_LIBRARY CACHE) + unset(CUDA_nvcuvid_LIBRARY CACHE) + unset(CUDA_nvToolsExt_LIBRARY CACHE) + unset(CUDA_OpenCL_LIBRARY CACHE) + unset(CUDA_GPU_DETECT_OUTPUT CACHE) +endmacro() + +# Check to see if the CUDA_TOOLKIT_ROOT_DIR and CUDA_SDK_ROOT_DIR have changed, +# if they have then clear the cache variables, so that will be detected again. +if(NOT "${CUDA_TOOLKIT_ROOT_DIR}" STREQUAL "${CUDA_TOOLKIT_ROOT_DIR_INTERNAL}") + unset(CUDA_TOOLKIT_TARGET_DIR CACHE) + unset(CUDA_NVCC_EXECUTABLE CACHE) + cuda_unset_include_and_libraries() + unset(CUDA_VERSION CACHE) +endif() + +if(NOT "${CUDA_TOOLKIT_TARGET_DIR}" STREQUAL "${CUDA_TOOLKIT_TARGET_DIR_INTERNAL}") + cuda_unset_include_and_libraries() +endif() + +# +# End of unset() +# + +# +# Start looking for things +# + +# Search for the cuda distribution. +if(NOT CUDA_TOOLKIT_ROOT_DIR AND NOT CMAKE_CROSSCOMPILING) + # Search in the CUDA_BIN_PATH first. + find_program(CUDA_TOOLKIT_ROOT_DIR_NVCC + NAMES nvcc nvcc.exe + PATHS + ENV CUDA_TOOLKIT_ROOT + ENV CUDA_PATH + ENV CUDA_BIN_PATH + PATH_SUFFIXES bin bin64 + DOC "Toolkit location." + NO_DEFAULT_PATH + ) + + # Now search default paths + find_program(CUDA_TOOLKIT_ROOT_DIR_NVCC + NAMES nvcc nvcc.exe + PATHS /opt/cuda/bin + PATH_SUFFIXES cuda/bin + DOC "Toolkit location." + ) + + if (CUDA_TOOLKIT_ROOT_DIR_NVCC) + get_filename_component(CUDA_TOOLKIT_ROOT_DIR_NVCC_PAR "${CUDA_TOOLKIT_ROOT_DIR_NVCC}" DIRECTORY) + get_filename_component(CUDA_TOOLKIT_ROOT_DIR "${CUDA_TOOLKIT_ROOT_DIR_NVCC_PAR}" DIRECTORY CACHE) + string(REGEX REPLACE "[/\\\\]?bin[64]*[/\\\\]?$" "" CUDA_TOOLKIT_ROOT_DIR ${CUDA_TOOLKIT_ROOT_DIR}) + # We need to force this back into the cache. + set(CUDA_TOOLKIT_ROOT_DIR ${CUDA_TOOLKIT_ROOT_DIR} CACHE PATH "Toolkit location." FORCE) + set(CUDA_TOOLKIT_TARGET_DIR ${CUDA_TOOLKIT_ROOT_DIR}) + endif() + unset(CUDA_TOOLKIT_ROOT_DIR_NVCC CACHE) + + if (NOT EXISTS ${CUDA_TOOLKIT_ROOT_DIR}) + if(CUDA_FIND_REQUIRED) + message(FATAL_ERROR "Specify CUDA_TOOLKIT_ROOT_DIR") + elseif(NOT CUDA_FIND_QUIETLY) + message("CUDA_TOOLKIT_ROOT_DIR not found or specified") + endif() + endif () +endif () + +if(CMAKE_CROSSCOMPILING) + SET (CUDA_TOOLKIT_ROOT $ENV{CUDA_TOOLKIT_ROOT}) + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7-a") + # Support for NVPACK + set (CUDA_TOOLKIT_TARGET_NAME "armv7-linux-androideabi") + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm") + # Support for arm cross compilation + set(CUDA_TOOLKIT_TARGET_NAME "armv7-linux-gnueabihf") + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64") + # Support for aarch64 cross compilation + if (ANDROID_ARCH_NAME STREQUAL "arm64") + set(CUDA_TOOLKIT_TARGET_NAME "aarch64-linux-androideabi") + else() + set(CUDA_TOOLKIT_TARGET_NAME "aarch64-linux") + endif (ANDROID_ARCH_NAME STREQUAL "arm64") + endif() + + if (EXISTS "${CUDA_TOOLKIT_ROOT}/targets/${CUDA_TOOLKIT_TARGET_NAME}") + set(CUDA_TOOLKIT_TARGET_DIR "${CUDA_TOOLKIT_ROOT}/targets/${CUDA_TOOLKIT_TARGET_NAME}" CACHE PATH "CUDA Toolkit target location.") + SET (CUDA_TOOLKIT_ROOT_DIR ${CUDA_TOOLKIT_ROOT}) + mark_as_advanced(CUDA_TOOLKIT_TARGET_DIR) + endif() + + # add known CUDA targetr root path to the set of directories we search for programs, libraries and headers + set( CMAKE_FIND_ROOT_PATH "${CUDA_TOOLKIT_TARGET_DIR};${CMAKE_FIND_ROOT_PATH}") + macro( cuda_find_host_program ) + if (COMMAND find_host_program) + find_host_program( ${ARGN} ) + else() + find_program( ${ARGN} ) + endif() + endmacro() +else() + # for non-cross-compile, find_host_program == find_program and CUDA_TOOLKIT_TARGET_DIR == CUDA_TOOLKIT_ROOT_DIR + macro( cuda_find_host_program ) + find_program( ${ARGN} ) + endmacro() + SET (CUDA_TOOLKIT_TARGET_DIR ${CUDA_TOOLKIT_ROOT_DIR}) +endif() + + +# CUDA_NVCC_EXECUTABLE +if(DEFINED ENV{CUDA_NVCC_EXECUTABLE}) + set(CUDA_NVCC_EXECUTABLE "$ENV{CUDA_NVCC_EXECUTABLE}" CACHE FILEPATH "The CUDA compiler") +else() + cuda_find_host_program(CUDA_NVCC_EXECUTABLE + NAMES nvcc + PATHS "${CUDA_TOOLKIT_ROOT_DIR}" + ENV CUDA_PATH + ENV CUDA_BIN_PATH + PATH_SUFFIXES bin bin64 + NO_DEFAULT_PATH + ) + # Search default search paths, after we search our own set of paths. + cuda_find_host_program(CUDA_NVCC_EXECUTABLE nvcc) +endif() +mark_as_advanced(CUDA_NVCC_EXECUTABLE) + +if(CUDA_NVCC_EXECUTABLE AND NOT CUDA_VERSION) + # Compute the version. + execute_process (COMMAND ${CUDA_NVCC_EXECUTABLE} "--version" OUTPUT_VARIABLE NVCC_OUT) + string(REGEX REPLACE ".*release ([0-9]+)\\.([0-9]+).*" "\\1" CUDA_VERSION_MAJOR ${NVCC_OUT}) + string(REGEX REPLACE ".*release ([0-9]+)\\.([0-9]+).*" "\\2" CUDA_VERSION_MINOR ${NVCC_OUT}) + set(CUDA_VERSION "${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR}" CACHE STRING "Version of CUDA as computed from nvcc.") + mark_as_advanced(CUDA_VERSION) +else() + # Need to set these based off of the cached value + string(REGEX REPLACE "([0-9]+)\\.([0-9]+).*" "\\1" CUDA_VERSION_MAJOR "${CUDA_VERSION}") + string(REGEX REPLACE "([0-9]+)\\.([0-9]+).*" "\\2" CUDA_VERSION_MINOR "${CUDA_VERSION}") +endif() + + +# Always set this convenience variable +set(CUDA_VERSION_STRING "${CUDA_VERSION}") + +# CUDA_TOOLKIT_INCLUDE +find_path(CUDA_TOOLKIT_INCLUDE + device_functions.h # Header included in toolkit + PATHS ${CUDA_TOOLKIT_TARGET_DIR} + ENV CUDA_PATH + ENV CUDA_INC_PATH + PATH_SUFFIXES include + NO_DEFAULT_PATH + ) +# Search default search paths, after we search our own set of paths. +find_path(CUDA_TOOLKIT_INCLUDE device_functions.h) +mark_as_advanced(CUDA_TOOLKIT_INCLUDE) + +if (CUDA_VERSION VERSION_GREATER "7.0" OR EXISTS "${CUDA_TOOLKIT_INCLUDE}/cuda_fp16.h") + set(CUDA_HAS_FP16 TRUE) +else() + set(CUDA_HAS_FP16 FALSE) +endif() + +# Set the user list of include dir to nothing to initialize it. +set (CUDA_NVCC_INCLUDE_DIRS_USER "") +set (CUDA_INCLUDE_DIRS ${CUDA_TOOLKIT_INCLUDE}) + +macro(cuda_find_library_local_first_with_path_ext _var _names _doc _path_ext ) + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + # CUDA 3.2+ on Windows moved the library directories, so we need the new + # and old paths. + set(_cuda_64bit_lib_dir "${_path_ext}lib/x64" "${_path_ext}lib64" "${_path_ext}libx64" ) + endif() + # CUDA 3.2+ on Windows moved the library directories, so we need to new + # (lib/Win32) and the old path (lib). + find_library(${_var} + NAMES ${_names} + PATHS "${CUDA_TOOLKIT_TARGET_DIR}" + ENV CUDA_PATH + ENV CUDA_LIB_PATH + PATH_SUFFIXES ${_cuda_64bit_lib_dir} "${_path_ext}lib/Win32" "${_path_ext}lib" "${_path_ext}libWin32" + DOC ${_doc} + NO_DEFAULT_PATH + ) + if (NOT CMAKE_CROSSCOMPILING) + # Search default search paths, after we search our own set of paths. + find_library(${_var} + NAMES ${_names} + PATHS "/usr/lib/nvidia-current" + DOC ${_doc} + ) + endif() +endmacro() + +macro(cuda_find_library_local_first _var _names _doc) + cuda_find_library_local_first_with_path_ext( "${_var}" "${_names}" "${_doc}" "" ) +endmacro() + +macro(find_library_local_first _var _names _doc ) + cuda_find_library_local_first( "${_var}" "${_names}" "${_doc}" "" ) +endmacro() + + +# CUDA_LIBRARIES +cuda_find_library_local_first(CUDA_CUDART_LIBRARY cudart "\"cudart\" library") +if(CUDA_VERSION VERSION_EQUAL "3.0") + # The cudartemu library only existed for the 3.0 version of CUDA. + cuda_find_library_local_first(CUDA_CUDARTEMU_LIBRARY cudartemu "\"cudartemu\" library") + mark_as_advanced( + CUDA_CUDARTEMU_LIBRARY + ) +endif() + +if(NOT CUDA_VERSION VERSION_LESS "5.5") + cuda_find_library_local_first(CUDA_cudart_static_LIBRARY cudart_static "static CUDA runtime library") + mark_as_advanced(CUDA_cudart_static_LIBRARY) +endif() + + +if(CUDA_cudart_static_LIBRARY) + # If static cudart available, use it by default, but provide a user-visible option to disable it. + option(CUDA_USE_STATIC_CUDA_RUNTIME "Use the static version of the CUDA runtime library if available" ON) +else() + # If not available, silently disable the option. + set(CUDA_USE_STATIC_CUDA_RUNTIME OFF CACHE INTERNAL "") +endif() + +if(CUDA_USE_STATIC_CUDA_RUNTIME) + set(CUDA_CUDART_LIBRARY_VAR CUDA_cudart_static_LIBRARY) +else() + set(CUDA_CUDART_LIBRARY_VAR CUDA_CUDART_LIBRARY) +endif() + +if(NOT CUDA_VERSION VERSION_LESS "5.0") + cuda_find_library_local_first(CUDA_cudadevrt_LIBRARY cudadevrt "\"cudadevrt\" library") + mark_as_advanced(CUDA_cudadevrt_LIBRARY) +endif() + +if(CUDA_USE_STATIC_CUDA_RUNTIME) + if(UNIX) + # Check for the dependent libraries. + + # Many of the FindXYZ CMake comes with makes use of try_compile with int main(){return 0;} + # as the source file. Unfortunately this causes a warning with -Wstrict-prototypes and + # -Werror causes the try_compile to fail. We will just temporarily disable other flags + # when doing the find_package command here. + set(_cuda_cmake_c_flags ${CMAKE_C_FLAGS}) + set(CMAKE_C_FLAGS "-fPIC") + find_package(Threads REQUIRED) + set(CMAKE_C_FLAGS ${_cuda_cmake_c_flags}) + + if(NOT APPLE) + #On Linux, you must link against librt when using the static cuda runtime. + find_library(CUDA_rt_LIBRARY rt) + if (NOT CUDA_rt_LIBRARY) + message(WARNING "Expecting to find librt for libcudart_static, but didn't find it.") + endif() + endif() + endif() +endif() + +# CUPTI library showed up in cuda toolkit 4.0 +if(NOT CUDA_VERSION VERSION_LESS "4.0") + cuda_find_library_local_first_with_path_ext(CUDA_cupti_LIBRARY cupti "\"cupti\" library" "extras/CUPTI/") + mark_as_advanced(CUDA_cupti_LIBRARY) +endif() + +# Set the CUDA_LIBRARIES variable. This is the set of stuff to link against if you are +# using the CUDA runtime. For the dynamic version of the runtime, most of the +# dependencies are brough in, but for the static version there are additional libraries +# and linker commands needed. +# Initialize to empty +set(CUDA_LIBRARIES) + +# If we are using emulation mode and we found the cudartemu library then use +# that one instead of cudart. +if(CUDA_BUILD_EMULATION AND CUDA_CUDARTEMU_LIBRARY) + list(APPEND CUDA_LIBRARIES ${CUDA_CUDARTEMU_LIBRARY}) +elseif(CUDA_USE_STATIC_CUDA_RUNTIME AND CUDA_cudart_static_LIBRARY) + list(APPEND CUDA_LIBRARIES ${CUDA_cudart_static_LIBRARY}) + if (TARGET Threads::Threads) + list(APPEND CUDA_LIBRARIES Threads::Threads) + endif() + list(APPEND CUDA_LIBRARIES ${CMAKE_DL_LIBS}) + if (CUDA_rt_LIBRARY) + list(APPEND CUDA_LIBRARIES ${CUDA_rt_LIBRARY}) + endif() + if(APPLE) + # We need to add the default path to the driver (libcuda.dylib) as an rpath, so that + # the static cuda runtime can find it at runtime. + list(APPEND CUDA_LIBRARIES -Wl,-rpath,/usr/local/cuda/lib) + endif() +else() + list(APPEND CUDA_LIBRARIES ${CUDA_CUDART_LIBRARY}) +endif() + +# 1.1 toolkit on linux doesn't appear to have a separate library on +# some platforms. +cuda_find_library_local_first(CUDA_CUDA_LIBRARY cuda "\"cuda\" library (older versions only).") + +mark_as_advanced( + CUDA_CUDA_LIBRARY + CUDA_CUDART_LIBRARY + ) + +####################### +# Look for some of the toolkit helper libraries +macro(FIND_CUDA_HELPER_LIBS _name) + cuda_find_library_local_first(CUDA_${_name}_LIBRARY ${_name} "\"${_name}\" library") + mark_as_advanced(CUDA_${_name}_LIBRARY) +endmacro() + +####################### +# Disable emulation for v3.1 onward +if(CUDA_VERSION VERSION_GREATER "3.0") + if(CUDA_BUILD_EMULATION) + message(FATAL_ERROR "CUDA_BUILD_EMULATION is not supported in version 3.1 and onwards. You must disable it to proceed. You have version ${CUDA_VERSION}.") + endif() +endif() + +# Search for additional CUDA toolkit libraries. +if(CUDA_VERSION VERSION_LESS "3.1") + # Emulation libraries aren't available in version 3.1 onward. + find_cuda_helper_libs(cufftemu) + find_cuda_helper_libs(cublasemu) +endif() +find_cuda_helper_libs(cufft) +find_cuda_helper_libs(cublas) +if(NOT CUDA_VERSION VERSION_LESS "3.2") + # cusparse showed up in version 3.2 + find_cuda_helper_libs(cusparse) + find_cuda_helper_libs(curand) + if (WIN32) + find_cuda_helper_libs(nvcuvenc) + find_cuda_helper_libs(nvcuvid) + endif() +endif() +if(CUDA_VERSION VERSION_GREATER "5.0" AND CUDA_VERSION VERSION_LESS "9.2") + # In CUDA 9.2 cublas_device was deprecated + find_cuda_helper_libs(cublas_device) +endif() + +if(NOT CUDA_VERSION VERSION_LESS "5.0") + find_cuda_helper_libs(nvToolsExt) + find_cuda_helper_libs(OpenCL) +endif() + +if(NOT CUDA_VERSION VERSION_LESS "9.0") + # In CUDA 9.0 NPP was nppi was removed + find_cuda_helper_libs(nppc) + find_cuda_helper_libs(nppial) + find_cuda_helper_libs(nppicc) + if(CUDA_VERSION VERSION_LESS "11.0") + find_cuda_helper_libs(nppicom) + endif() + find_cuda_helper_libs(nppidei) + find_cuda_helper_libs(nppif) + find_cuda_helper_libs(nppig) + find_cuda_helper_libs(nppim) + find_cuda_helper_libs(nppist) + find_cuda_helper_libs(nppisu) + find_cuda_helper_libs(nppitc) + find_cuda_helper_libs(npps) + set(CUDA_npp_LIBRARY "${CUDA_nppc_LIBRARY};${CUDA_nppial_LIBRARY};${CUDA_nppicc_LIBRARY};${CUDA_nppicom_LIBRARY};${CUDA_nppidei_LIBRARY};${CUDA_nppif_LIBRARY};${CUDA_nppig_LIBRARY};${CUDA_nppim_LIBRARY};${CUDA_nppist_LIBRARY};${CUDA_nppisu_LIBRARY};${CUDA_nppitc_LIBRARY};${CUDA_npps_LIBRARY}") +elseif(CUDA_VERSION VERSION_GREATER "5.0") + # In CUDA 5.5 NPP was split into 3 separate libraries. + find_cuda_helper_libs(nppc) + find_cuda_helper_libs(nppi) + find_cuda_helper_libs(npps) + set(CUDA_npp_LIBRARY "${CUDA_nppc_LIBRARY};${CUDA_nppi_LIBRARY};${CUDA_npps_LIBRARY}") +elseif(NOT CUDA_VERSION VERSION_LESS "4.0") + find_cuda_helper_libs(npp) +endif() +if(NOT CUDA_VERSION VERSION_LESS "7.0") + # cusolver showed up in version 7.0 + find_cuda_helper_libs(cusolver) +endif() + +if (CUDA_BUILD_EMULATION) + set(CUDA_CUFFT_LIBRARIES ${CUDA_cufftemu_LIBRARY}) + set(CUDA_CUBLAS_LIBRARIES ${CUDA_cublasemu_LIBRARY}) +else() + set(CUDA_CUFFT_LIBRARIES ${CUDA_cufft_LIBRARY}) + set(CUDA_CUBLAS_LIBRARIES ${CUDA_cublas_LIBRARY} ${CUDA_cublas_device_LIBRARY}) +endif() + +######################## +# Look for the SDK stuff. As of CUDA 3.0 NVSDKCUDA_ROOT has been replaced with +# NVSDKCOMPUTE_ROOT with the old CUDA C contents moved into the C subdirectory +find_path(CUDA_SDK_ROOT_DIR common/inc/cutil.h + HINTS + "$ENV{NVSDKCOMPUTE_ROOT}/C" + ENV NVSDKCUDA_ROOT + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\NVIDIA Corporation\\Installed Products\\NVIDIA SDK 10\\Compute;InstallDir]" + PATHS + "/Developer/GPU\ Computing/C" + ) + +# Keep the CUDA_SDK_ROOT_DIR first in order to be able to override the +# environment variables. +set(CUDA_SDK_SEARCH_PATH + "${CUDA_SDK_ROOT_DIR}" + "${CUDA_TOOLKIT_ROOT_DIR}/local/NVSDK0.2" + "${CUDA_TOOLKIT_ROOT_DIR}/NVSDK0.2" + "${CUDA_TOOLKIT_ROOT_DIR}/NV_CUDA_SDK" + "$ENV{HOME}/NVIDIA_CUDA_SDK" + "$ENV{HOME}/NVIDIA_CUDA_SDK_MACOSX" + "/Developer/CUDA" + ) + +# Example of how to find an include file from the CUDA_SDK_ROOT_DIR + +# find_path(CUDA_CUT_INCLUDE_DIR +# cutil.h +# PATHS ${CUDA_SDK_SEARCH_PATH} +# PATH_SUFFIXES "common/inc" +# DOC "Location of cutil.h" +# NO_DEFAULT_PATH +# ) +# # Now search system paths +# find_path(CUDA_CUT_INCLUDE_DIR cutil.h DOC "Location of cutil.h") + +# mark_as_advanced(CUDA_CUT_INCLUDE_DIR) + + +# Example of how to find a library in the CUDA_SDK_ROOT_DIR + +# # cutil library is called cutil64 for 64 bit builds on windows. We don't want +# # to get these confused, so we are setting the name based on the word size of +# # the build. + +# if(CMAKE_SIZEOF_VOID_P EQUAL 8) +# set(cuda_cutil_name cutil64) +# else() +# set(cuda_cutil_name cutil32) +# endif() + +# find_library(CUDA_CUT_LIBRARY +# NAMES cutil ${cuda_cutil_name} +# PATHS ${CUDA_SDK_SEARCH_PATH} +# # The new version of the sdk shows up in common/lib, but the old one is in lib +# PATH_SUFFIXES "common/lib" "lib" +# DOC "Location of cutil library" +# NO_DEFAULT_PATH +# ) +# # Now search system paths +# find_library(CUDA_CUT_LIBRARY NAMES cutil ${cuda_cutil_name} DOC "Location of cutil library") +# mark_as_advanced(CUDA_CUT_LIBRARY) +# set(CUDA_CUT_LIBRARIES ${CUDA_CUT_LIBRARY}) + + + +############################# +# Check for required components +set(CUDA_FOUND TRUE) + +set(CUDA_TOOLKIT_ROOT_DIR_INTERNAL "${CUDA_TOOLKIT_ROOT_DIR}" CACHE INTERNAL + "This is the value of the last time CUDA_TOOLKIT_ROOT_DIR was set successfully." FORCE) +set(CUDA_TOOLKIT_TARGET_DIR_INTERNAL "${CUDA_TOOLKIT_TARGET_DIR}" CACHE INTERNAL + "This is the value of the last time CUDA_TOOLKIT_TARGET_DIR was set successfully." FORCE) +set(CUDA_SDK_ROOT_DIR_INTERNAL "${CUDA_SDK_ROOT_DIR}" CACHE INTERNAL + "This is the value of the last time CUDA_SDK_ROOT_DIR was set successfully." FORCE) + +include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) + +find_package_handle_standard_args(CUDA + REQUIRED_VARS + CUDA_TOOLKIT_ROOT_DIR + CUDA_NVCC_EXECUTABLE + CUDA_INCLUDE_DIRS + ${CUDA_CUDART_LIBRARY_VAR} + VERSION_VAR + CUDA_VERSION + ) + + + +############################################################################### +############################################################################### +# Macros +############################################################################### +############################################################################### + +############################################################################### +# Add include directories to pass to the nvcc command. +macro(CUDA_INCLUDE_DIRECTORIES) + foreach(dir ${ARGN}) + list(APPEND CUDA_NVCC_INCLUDE_DIRS_USER ${dir}) + endforeach() +endmacro() + + +############################################################################## +cuda_find_helper_file(parse_cubin cmake) +cuda_find_helper_file(make2cmake cmake) +cuda_find_helper_file(run_nvcc cmake) +include("${CMAKE_ROOT}/Modules/FindCUDA/select_compute_arch.cmake") + +############################################################################## +# Separate the OPTIONS out from the sources +# +macro(CUDA_GET_SOURCES_AND_OPTIONS _sources _cmake_options _options) + set( ${_sources} ) + set( ${_cmake_options} ) + set( ${_options} ) + set( _found_options FALSE ) + foreach(arg ${ARGN}) + if("x${arg}" STREQUAL "xOPTIONS") + set( _found_options TRUE ) + elseif( + "x${arg}" STREQUAL "xWIN32" OR + "x${arg}" STREQUAL "xMACOSX_BUNDLE" OR + "x${arg}" STREQUAL "xEXCLUDE_FROM_ALL" OR + "x${arg}" STREQUAL "xSTATIC" OR + "x${arg}" STREQUAL "xSHARED" OR + "x${arg}" STREQUAL "xMODULE" + ) + list(APPEND ${_cmake_options} ${arg}) + else() + if ( _found_options ) + list(APPEND ${_options} ${arg}) + else() + # Assume this is a file + list(APPEND ${_sources} ${arg}) + endif() + endif() + endforeach() +endmacro() + +############################################################################## +# Parse the OPTIONS from ARGN and set the variables prefixed by _option_prefix +# +macro(CUDA_PARSE_NVCC_OPTIONS _option_prefix) + set( _found_config ) + foreach(arg ${ARGN}) + # Determine if we are dealing with a perconfiguration flag + foreach(config ${CUDA_configuration_types}) + string(TOUPPER ${config} config_upper) + if (arg STREQUAL "${config_upper}") + set( _found_config _${arg}) + # Set arg to nothing to keep it from being processed further + set( arg ) + endif() + endforeach() + + if ( arg ) + list(APPEND ${_option_prefix}${_found_config} "${arg}") + endif() + endforeach() +endmacro() + +############################################################################## +# Helper to add the include directory for CUDA only once +function(CUDA_ADD_CUDA_INCLUDE_ONCE) + get_directory_property(_include_directories INCLUDE_DIRECTORIES) + set(_add TRUE) + if(_include_directories) + foreach(dir ${_include_directories}) + if("${dir}" STREQUAL "${CUDA_INCLUDE_DIRS}") + set(_add FALSE) + endif() + endforeach() + endif() + if(_add) + include_directories(${CUDA_INCLUDE_DIRS}) + endif() +endfunction() + +function(CUDA_BUILD_SHARED_LIBRARY shared_flag) + set(cmake_args ${ARGN}) + # If SHARED, MODULE, or STATIC aren't already in the list of arguments, then + # add SHARED or STATIC based on the value of BUILD_SHARED_LIBS. + list(FIND cmake_args SHARED _cuda_found_SHARED) + list(FIND cmake_args MODULE _cuda_found_MODULE) + list(FIND cmake_args STATIC _cuda_found_STATIC) + if( _cuda_found_SHARED GREATER -1 OR + _cuda_found_MODULE GREATER -1 OR + _cuda_found_STATIC GREATER -1) + set(_cuda_build_shared_libs) + else() + if (BUILD_SHARED_LIBS) + set(_cuda_build_shared_libs SHARED) + else() + set(_cuda_build_shared_libs STATIC) + endif() + endif() + set(${shared_flag} ${_cuda_build_shared_libs} PARENT_SCOPE) +endfunction() + +############################################################################## +# Helper to avoid clashes of files with the same basename but different paths. +# This doesn't attempt to do exactly what CMake internals do, which is to only +# add this path when there is a conflict, since by the time a second collision +# in names is detected it's already too late to fix the first one. For +# consistency sake the relative path will be added to all files. +function(CUDA_COMPUTE_BUILD_PATH path build_path) + #message("CUDA_COMPUTE_BUILD_PATH([${path}] ${build_path})") + # Only deal with CMake style paths from here on out + file(TO_CMAKE_PATH "${path}" bpath) + if (IS_ABSOLUTE "${bpath}") + # Absolute paths are generally unnessary, especially if something like + # file(GLOB_RECURSE) is used to pick up the files. + + string(FIND "${bpath}" "${CMAKE_CURRENT_BINARY_DIR}" _binary_dir_pos) + if (_binary_dir_pos EQUAL 0) + file(RELATIVE_PATH bpath "${CMAKE_CURRENT_BINARY_DIR}" "${bpath}") + else() + file(RELATIVE_PATH bpath "${CMAKE_CURRENT_SOURCE_DIR}" "${bpath}") + endif() + endif() + + # This recipe is from cmLocalGenerator::CreateSafeUniqueObjectFileName in the + # CMake source. + + # Remove leading / + string(REGEX REPLACE "^[/]+" "" bpath "${bpath}") + # Avoid absolute paths by removing ':' + string(REPLACE ":" "_" bpath "${bpath}") + # Avoid relative paths that go up the tree + string(REPLACE "../" "__/" bpath "${bpath}") + # Avoid spaces + string(REPLACE " " "_" bpath "${bpath}") + + # Strip off the filename. I wait until here to do it, since removin the + # basename can make a path that looked like path/../basename turn into + # path/.. (notice the trailing slash). + get_filename_component(bpath "${bpath}" PATH) + + set(${build_path} "${bpath}" PARENT_SCOPE) + #message("${build_path} = ${bpath}") +endfunction() + +############################################################################## +# This helper macro populates the following variables and setups up custom +# commands and targets to invoke the nvcc compiler to generate C or PTX source +# dependent upon the format parameter. The compiler is invoked once with -M +# to generate a dependency file and a second time with -cuda or -ptx to generate +# a .cpp or .ptx file. +# INPUT: +# cuda_target - Target name +# format - PTX, CUBIN, FATBIN or OBJ +# FILE1 .. FILEN - The remaining arguments are the sources to be wrapped. +# OPTIONS - Extra options to NVCC +# OUTPUT: +# generated_files - List of generated files +############################################################################## +############################################################################## + +macro(CUDA_WRAP_SRCS cuda_target format generated_files) + + # Put optional arguments in list. + set(_argn_list "${ARGN}") + # If one of the given optional arguments is "PHONY", make a note of it, then + # remove it from the list. + list(FIND _argn_list "PHONY" _phony_idx) + if("${_phony_idx}" GREATER "-1") + set(_target_is_phony true) + list(REMOVE_AT _argn_list ${_phony_idx}) + else() + set(_target_is_phony false) + endif() + + # If CMake doesn't support separable compilation, complain + if(CUDA_SEPARABLE_COMPILATION AND CMAKE_VERSION VERSION_LESS "2.8.10.1") + message(SEND_ERROR "CUDA_SEPARABLE_COMPILATION isn't supported for CMake versions less than 2.8.10.1") + endif() + + # Set up all the command line flags here, so that they can be overridden on a per target basis. + + set(nvcc_flags "") + + # Emulation if the card isn't present. + if (CUDA_BUILD_EMULATION) + # Emulation. + set(nvcc_flags ${nvcc_flags} --device-emulation -D_DEVICEEMU -g) + else() + # Device mode. No flags necessary. + endif() + + if(CUDA_HOST_COMPILATION_CPP) + set(CUDA_C_OR_CXX CXX) + else() + if(CUDA_VERSION VERSION_LESS "3.0") + set(nvcc_flags ${nvcc_flags} --host-compilation C) + else() + message(WARNING "--host-compilation flag is deprecated in CUDA version >= 3.0. Removing --host-compilation C flag" ) + endif() + set(CUDA_C_OR_CXX C) + endif() + + set(generated_extension ${CMAKE_${CUDA_C_OR_CXX}_OUTPUT_EXTENSION}) + + if(CUDA_64_BIT_DEVICE_CODE) + set(nvcc_flags ${nvcc_flags} -m64) + else() + set(nvcc_flags ${nvcc_flags} -m32) + endif() + + if(CUDA_TARGET_CPU_ARCH) + set(nvcc_flags ${nvcc_flags} "--target-cpu-architecture=${CUDA_TARGET_CPU_ARCH}") + endif() + + # This needs to be passed in at this stage, because VS needs to fill out the + # various macros from within VS. Note that CCBIN is only used if + # -ccbin or --compiler-bindir isn't used and CUDA_HOST_COMPILER matches + # _CUDA_MSVC_HOST_COMPILER + if(CMAKE_GENERATOR MATCHES "Visual Studio") + set(ccbin_flags -D "\"CCBIN:PATH=${_CUDA_MSVC_HOST_COMPILER}\"" ) + else() + set(ccbin_flags) + endif() + + # Figure out which configure we will use and pass that in as an argument to + # the script. We need to defer the decision until compilation time, because + # for VS projects we won't know if we are making a debug or release build + # until build time. + if(CMAKE_GENERATOR MATCHES "Visual Studio") + set( CUDA_build_configuration "$(ConfigurationName)" ) + else() + set( CUDA_build_configuration "${CMAKE_BUILD_TYPE}") + endif() + + # Initialize our list of includes with the user ones followed by the CUDA system ones. + set(CUDA_NVCC_INCLUDE_DIRS ${CUDA_NVCC_INCLUDE_DIRS_USER} "${CUDA_INCLUDE_DIRS}") + if(_target_is_phony) + # If the passed in target name isn't a real target (i.e., this is from a call to one of the + # cuda_compile_* functions), need to query directory properties to get include directories + # and compile definitions. + get_directory_property(_dir_include_dirs INCLUDE_DIRECTORIES) + get_directory_property(_dir_compile_defs COMPILE_DEFINITIONS) + + list(APPEND CUDA_NVCC_INCLUDE_DIRS "${_dir_include_dirs}") + set(CUDA_NVCC_COMPILE_DEFINITIONS "${_dir_compile_defs}") + else() + # Append the include directories for this target via generator expression, which is + # expanded by the FILE(GENERATE) call below. This generator expression captures all + # include dirs set by the user, whether via directory properties or target properties + list(APPEND CUDA_NVCC_INCLUDE_DIRS "$") + + # Do the same thing with compile definitions + set(CUDA_NVCC_COMPILE_DEFINITIONS "$") + endif() + + + # Reset these variables + set(CUDA_WRAP_OPTION_NVCC_FLAGS) + foreach(config ${CUDA_configuration_types}) + string(TOUPPER ${config} config_upper) + set(CUDA_WRAP_OPTION_NVCC_FLAGS_${config_upper}) + endforeach() + + CUDA_GET_SOURCES_AND_OPTIONS(_cuda_wrap_sources _cuda_wrap_cmake_options _cuda_wrap_options ${_argn_list}) + CUDA_PARSE_NVCC_OPTIONS(CUDA_WRAP_OPTION_NVCC_FLAGS ${_cuda_wrap_options}) + + # Figure out if we are building a shared library. BUILD_SHARED_LIBS is + # respected in CUDA_ADD_LIBRARY. + set(_cuda_build_shared_libs FALSE) + # SHARED, MODULE + list(FIND _cuda_wrap_cmake_options SHARED _cuda_found_SHARED) + list(FIND _cuda_wrap_cmake_options MODULE _cuda_found_MODULE) + if(_cuda_found_SHARED GREATER -1 OR _cuda_found_MODULE GREATER -1) + set(_cuda_build_shared_libs TRUE) + endif() + # STATIC + list(FIND _cuda_wrap_cmake_options STATIC _cuda_found_STATIC) + if(_cuda_found_STATIC GREATER -1) + set(_cuda_build_shared_libs FALSE) + endif() + + # CUDA_HOST_FLAGS + if(_cuda_build_shared_libs) + # If we are setting up code for a shared library, then we need to add extra flags for + # compiling objects for shared libraries. + set(CUDA_HOST_SHARED_FLAGS ${CMAKE_SHARED_LIBRARY_${CUDA_C_OR_CXX}_FLAGS}) + else() + set(CUDA_HOST_SHARED_FLAGS) + endif() + # Only add the CMAKE_{C,CXX}_FLAGS if we are propagating host flags. We + # always need to set the SHARED_FLAGS, though. + if(CUDA_PROPAGATE_HOST_FLAGS) + set(_cuda_host_flags "set(CMAKE_HOST_FLAGS ${CMAKE_${CUDA_C_OR_CXX}_FLAGS} ${CUDA_HOST_SHARED_FLAGS})") + else() + set(_cuda_host_flags "set(CMAKE_HOST_FLAGS ${CUDA_HOST_SHARED_FLAGS})") + endif() + + set(_cuda_nvcc_flags_config "# Build specific configuration flags") + # Loop over all the configuration types to generate appropriate flags for run_nvcc.cmake + foreach(config ${CUDA_configuration_types}) + string(TOUPPER ${config} config_upper) + # CMAKE_FLAGS are strings and not lists. By not putting quotes around CMAKE_FLAGS + # we convert the strings to lists (like we want). + + if(CUDA_PROPAGATE_HOST_FLAGS) + # nvcc chokes on -g3 in versions previous to 3.0, so replace it with -g + set(_cuda_fix_g3 FALSE) + + if(CMAKE_COMPILER_IS_GNUCC) + if (CUDA_VERSION VERSION_LESS "3.0" OR + CUDA_VERSION VERSION_EQUAL "4.1" OR + CUDA_VERSION VERSION_EQUAL "4.2" + ) + set(_cuda_fix_g3 TRUE) + endif() + endif() + if(_cuda_fix_g3) + string(REPLACE "-g3" "-g" _cuda_C_FLAGS "${CMAKE_${CUDA_C_OR_CXX}_FLAGS_${config_upper}}") + else() + set(_cuda_C_FLAGS "${CMAKE_${CUDA_C_OR_CXX}_FLAGS_${config_upper}}") + endif() + + string(APPEND _cuda_host_flags "\nset(CMAKE_HOST_FLAGS_${config_upper} ${_cuda_C_FLAGS})") + endif() + + # Note that if we ever want CUDA_NVCC_FLAGS_ to be string (instead of a list + # like it is currently), we can remove the quotes around the + # ${CUDA_NVCC_FLAGS_${config_upper}} variable like the CMAKE_HOST_FLAGS_ variable. + string(APPEND _cuda_nvcc_flags_config "\nset(CUDA_NVCC_FLAGS_${config_upper} ${CUDA_NVCC_FLAGS_${config_upper}} ;; ${CUDA_WRAP_OPTION_NVCC_FLAGS_${config_upper}})") + endforeach() + + # Process the C++11 flag. If the host sets the flag, we need to add it to nvcc and + # remove it from the host. This is because -Xcompile -std=c++ will choke nvcc (it uses + # the C preprocessor). In order to get this to work correctly, we need to use nvcc's + # specific c++11 flag. + if( "${_cuda_host_flags}" MATCHES "-std=c\\+\\+11") + # Add the c++11 flag to nvcc if it isn't already present. Note that we only look at + # the main flag instead of the configuration specific flags. + if( NOT "${CUDA_NVCC_FLAGS}" MATCHES "-std=c\\+\\+11" ) + list(APPEND nvcc_flags --std c++11) + endif() + string(REGEX REPLACE "[-]+std=c\\+\\+11" "" _cuda_host_flags "${_cuda_host_flags}") + endif() + + if(_cuda_build_shared_libs) + list(APPEND nvcc_flags "-D${cuda_target}_EXPORTS") + endif() + + # Reset the output variable + set(_cuda_wrap_generated_files "") + + # Iterate over the macro arguments and create custom + # commands for all the .cu files. + foreach(file ${_argn_list}) + # Ignore any file marked as a HEADER_FILE_ONLY + get_source_file_property(_is_header ${file} HEADER_FILE_ONLY) + # Allow per source file overrides of the format. Also allows compiling non-.cu files. + get_source_file_property(_cuda_source_format ${file} CUDA_SOURCE_PROPERTY_FORMAT) + if((${file} MATCHES "\\.cu$" OR _cuda_source_format) AND NOT _is_header) + + if(NOT _cuda_source_format) + set(_cuda_source_format ${format}) + endif() + # If file isn't a .cu file, we need to tell nvcc to treat it as such. + if(NOT ${file} MATCHES "\\.cu$") + set(cuda_language_flag -x=cu) + else() + set(cuda_language_flag) + endif() + + if( ${_cuda_source_format} MATCHES "OBJ") + set( cuda_compile_to_external_module OFF ) + else() + set( cuda_compile_to_external_module ON ) + if( ${_cuda_source_format} MATCHES "PTX" ) + set( cuda_compile_to_external_module_type "ptx" ) + elseif( ${_cuda_source_format} MATCHES "CUBIN") + set( cuda_compile_to_external_module_type "cubin" ) + elseif( ${_cuda_source_format} MATCHES "FATBIN") + set( cuda_compile_to_external_module_type "fatbin" ) + else() + message( FATAL_ERROR "Invalid format flag passed to CUDA_WRAP_SRCS or set with CUDA_SOURCE_PROPERTY_FORMAT file property for file '${file}': '${_cuda_source_format}'. Use OBJ, PTX, CUBIN or FATBIN.") + endif() + endif() + + if(cuda_compile_to_external_module) + # Don't use any of the host compilation flags for PTX targets. + set(CUDA_HOST_FLAGS) + set(CUDA_NVCC_FLAGS_CONFIG) + else() + set(CUDA_HOST_FLAGS ${_cuda_host_flags}) + set(CUDA_NVCC_FLAGS_CONFIG ${_cuda_nvcc_flags_config}) + endif() + + # Determine output directory + cuda_compute_build_path("${file}" cuda_build_path) + set(cuda_compile_intermediate_directory "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${cuda_target}.dir/${cuda_build_path}") + if(CUDA_GENERATED_OUTPUT_DIR) + set(cuda_compile_output_dir "${CUDA_GENERATED_OUTPUT_DIR}") + else() + if ( cuda_compile_to_external_module ) + set(cuda_compile_output_dir "${CMAKE_CURRENT_BINARY_DIR}") + else() + set(cuda_compile_output_dir "${cuda_compile_intermediate_directory}") + endif() + endif() + + # Add a custom target to generate a c or ptx file. ###################### + + get_filename_component( basename ${file} NAME ) + if( cuda_compile_to_external_module ) + set(generated_file_path "${cuda_compile_output_dir}") + set(generated_file_basename "${cuda_target}_generated_${basename}.${cuda_compile_to_external_module_type}") + set(format_flag "-${cuda_compile_to_external_module_type}") + file(MAKE_DIRECTORY "${cuda_compile_output_dir}") + else() + set(generated_file_path "${cuda_compile_output_dir}/${CMAKE_CFG_INTDIR}") + set(generated_file_basename "${cuda_target}_generated_${basename}${generated_extension}") + if(CUDA_SEPARABLE_COMPILATION) + set(format_flag "-dc") + else() + set(format_flag "-c") + endif() + endif() + + # Set all of our file names. Make sure that whatever filenames that have + # generated_file_path in them get passed in through as a command line + # argument, so that the ${CMAKE_CFG_INTDIR} gets expanded at run time + # instead of configure time. + set(generated_file "${generated_file_path}/${generated_file_basename}") + set(cmake_dependency_file "${cuda_compile_intermediate_directory}/${generated_file_basename}.depend") + set(NVCC_generated_dependency_file "${cuda_compile_intermediate_directory}/${generated_file_basename}.NVCC-depend") + set(generated_cubin_file "${generated_file_path}/${generated_file_basename}.cubin.txt") + set(custom_target_script_pregen "${cuda_compile_intermediate_directory}/${generated_file_basename}.cmake.pre-gen") + set(custom_target_script "${cuda_compile_intermediate_directory}/${generated_file_basename}$<$>:.$>.cmake") + + # Setup properties for obj files: + if( NOT cuda_compile_to_external_module ) + set_source_files_properties("${generated_file}" + PROPERTIES + EXTERNAL_OBJECT true # This is an object file not to be compiled, but only be linked. + ) + endif() + + # Don't add CMAKE_CURRENT_SOURCE_DIR if the path is already an absolute path. + get_filename_component(file_path "${file}" PATH) + if(IS_ABSOLUTE "${file_path}") + set(source_file "${file}") + else() + set(source_file "${CMAKE_CURRENT_SOURCE_DIR}/${file}") + endif() + + if( NOT cuda_compile_to_external_module AND CUDA_SEPARABLE_COMPILATION) + list(APPEND ${cuda_target}_SEPARABLE_COMPILATION_OBJECTS "${generated_file}") + endif() + + # Bring in the dependencies. Creates a variable CUDA_NVCC_DEPEND ####### + cuda_include_nvcc_dependencies(${cmake_dependency_file}) + + # Convenience string for output ######################################### + if(CUDA_BUILD_EMULATION) + set(cuda_build_type "Emulation") + else() + set(cuda_build_type "Device") + endif() + + # Build the NVCC made dependency file ################################### + set(build_cubin OFF) + if ( NOT CUDA_BUILD_EMULATION AND CUDA_BUILD_CUBIN ) + if ( NOT cuda_compile_to_external_module ) + set ( build_cubin ON ) + endif() + endif() + + # Configure the build script + configure_file("${CUDA_run_nvcc}" "${custom_target_script_pregen}" @ONLY) + file(GENERATE + OUTPUT "${custom_target_script}" + INPUT "${custom_target_script_pregen}" + ) + + # So if a user specifies the same cuda file as input more than once, you + # can have bad things happen with dependencies. Here we check an option + # to see if this is the behavior they want. + if(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE) + set(main_dep MAIN_DEPENDENCY ${source_file}) + else() + set(main_dep DEPENDS ${source_file}) + endif() + + if(CUDA_VERBOSE_BUILD) + set(verbose_output ON) + elseif(CMAKE_GENERATOR MATCHES "Makefiles") + set(verbose_output "$(VERBOSE)") + else() + set(verbose_output OFF) + endif() + + # Create up the comment string + file(RELATIVE_PATH generated_file_relative_path "${CMAKE_BINARY_DIR}" "${generated_file}") + if(cuda_compile_to_external_module) + set(cuda_build_comment_string "Building NVCC ${cuda_compile_to_external_module_type} file ${generated_file_relative_path}") + else() + set(cuda_build_comment_string "Building NVCC (${cuda_build_type}) object ${generated_file_relative_path}") + endif() + + set(_verbatim VERBATIM) + if(ccbin_flags MATCHES "\\$\\(VCInstallDir\\)") + set(_verbatim "") + endif() + + # Build the generated file and dependency file ########################## + add_custom_command( + OUTPUT ${generated_file} + # These output files depend on the source_file and the contents of cmake_dependency_file + ${main_dep} + DEPENDS ${CUDA_NVCC_DEPEND} + DEPENDS ${custom_target_script} + # Make sure the output directory exists before trying to write to it. + COMMAND ${CMAKE_COMMAND} -E make_directory "${generated_file_path}" + COMMAND ${CMAKE_COMMAND} ARGS + -D verbose:BOOL=${verbose_output} + ${ccbin_flags} + -D build_configuration:STRING=${CUDA_build_configuration} + -D "generated_file:STRING=${generated_file}" + -D "generated_cubin_file:STRING=${generated_cubin_file}" + -P "${custom_target_script}" + WORKING_DIRECTORY "${cuda_compile_intermediate_directory}" + COMMENT "${cuda_build_comment_string}" + ${_verbatim} + ) + + # Make sure the build system knows the file is generated. + set_source_files_properties(${generated_file} PROPERTIES GENERATED TRUE) + + list(APPEND _cuda_wrap_generated_files ${generated_file}) + + # Add the other files that we want cmake to clean on a cleanup ########## + list(APPEND CUDA_ADDITIONAL_CLEAN_FILES "${cmake_dependency_file}") + list(REMOVE_DUPLICATES CUDA_ADDITIONAL_CLEAN_FILES) + set(CUDA_ADDITIONAL_CLEAN_FILES ${CUDA_ADDITIONAL_CLEAN_FILES} CACHE INTERNAL "List of intermediate files that are part of the cuda dependency scanning.") + + endif() + endforeach() + + # Set the return parameter + set(${generated_files} ${_cuda_wrap_generated_files}) +endmacro() + +function(_cuda_get_important_host_flags important_flags flag_string) + if(CMAKE_GENERATOR MATCHES "Visual Studio") + string(REGEX MATCHALL "/M[DT][d]?" flags "${flag_string}") + list(APPEND ${important_flags} ${flags}) + else() + string(REGEX MATCHALL "-fPIC" flags "${flag_string}") + list(APPEND ${important_flags} ${flags}) + endif() + set(${important_flags} ${${important_flags}} PARENT_SCOPE) +endfunction() + +############################################################################### +############################################################################### +# Separable Compilation Link +############################################################################### +############################################################################### + +# Compute the filename to be used by CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS +function(CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME output_file_var cuda_target object_files) + if (object_files) + set(generated_extension ${CMAKE_${CUDA_C_OR_CXX}_OUTPUT_EXTENSION}) + set(output_file "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${cuda_target}.dir/${CMAKE_CFG_INTDIR}/${cuda_target}_intermediate_link${generated_extension}") + else() + set(output_file) + endif() + + set(${output_file_var} "${output_file}" PARENT_SCOPE) +endfunction() + +# Setup the build rule for the separable compilation intermediate link file. +function(CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS output_file cuda_target options object_files) + if (object_files) + + set_source_files_properties("${output_file}" + PROPERTIES + EXTERNAL_OBJECT TRUE # This is an object file not to be compiled, but only + # be linked. + GENERATED TRUE # This file is generated during the build + ) + + # For now we are ignoring all the configuration specific flags. + set(nvcc_flags) + CUDA_PARSE_NVCC_OPTIONS(nvcc_flags ${options}) + if(CUDA_64_BIT_DEVICE_CODE) + list(APPEND nvcc_flags -m64) + else() + list(APPEND nvcc_flags -m32) + endif() + # If -ccbin, --compiler-bindir has been specified, don't do anything. Otherwise add it here. + list( FIND nvcc_flags "-ccbin" ccbin_found0 ) + list( FIND nvcc_flags "--compiler-bindir" ccbin_found1 ) + if( ccbin_found0 LESS 0 AND ccbin_found1 LESS 0 AND CUDA_HOST_COMPILER ) + # Match VERBATIM check below. + if(CUDA_HOST_COMPILER MATCHES "\\$\\(VCInstallDir\\)") + list(APPEND nvcc_flags -ccbin "\"${CUDA_HOST_COMPILER}\"") + else() + list(APPEND nvcc_flags -ccbin "${CUDA_HOST_COMPILER}") + endif() + endif() + + # Create a list of flags specified by CUDA_NVCC_FLAGS_${CONFIG} and CMAKE_${CUDA_C_OR_CXX}_FLAGS* + set(config_specific_flags) + set(flags) + foreach(config ${CUDA_configuration_types}) + string(TOUPPER ${config} config_upper) + # Add config specific flags + foreach(f ${CUDA_NVCC_FLAGS_${config_upper}}) + list(APPEND config_specific_flags $<$:${f}>) + endforeach() + set(important_host_flags) + _cuda_get_important_host_flags(important_host_flags "${CMAKE_${CUDA_C_OR_CXX}_FLAGS_${config_upper}}") + foreach(f ${important_host_flags}) + list(APPEND flags $<$:-Xcompiler> $<$:${f}>) + endforeach() + endforeach() + # Add CMAKE_${CUDA_C_OR_CXX}_FLAGS + set(important_host_flags) + _cuda_get_important_host_flags(important_host_flags "${CMAKE_${CUDA_C_OR_CXX}_FLAGS}") + foreach(f ${important_host_flags}) + list(APPEND flags -Xcompiler ${f}) + endforeach() + + # Add our general CUDA_NVCC_FLAGS with the configuration specifig flags + set(nvcc_flags ${CUDA_NVCC_FLAGS} ${config_specific_flags} ${nvcc_flags}) + + file(RELATIVE_PATH output_file_relative_path "${CMAKE_BINARY_DIR}" "${output_file}") + + # Some generators don't handle the multiple levels of custom command + # dependencies correctly (obj1 depends on file1, obj2 depends on obj1), so + # we work around that issue by compiling the intermediate link object as a + # pre-link custom command in that situation. + set(do_obj_build_rule TRUE) + if (MSVC_VERSION GREATER 1599 AND MSVC_VERSION LESS 1800) + # VS 2010 and 2012 have this problem. + set(do_obj_build_rule FALSE) + endif() + + set(_verbatim VERBATIM) + if(nvcc_flags MATCHES "\\$\\(VCInstallDir\\)") + set(_verbatim "") + endif() + + if (do_obj_build_rule) + add_custom_command( + OUTPUT ${output_file} + DEPENDS ${object_files} + COMMAND ${CUDA_NVCC_EXECUTABLE} ${nvcc_flags} -dlink ${object_files} -o ${output_file} + ${flags} + COMMENT "Building NVCC intermediate link file ${output_file_relative_path}" + COMMAND_EXPAND_LISTS + ${_verbatim} + ) + else() + get_filename_component(output_file_dir "${output_file}" DIRECTORY) + add_custom_command( + TARGET ${cuda_target} + PRE_LINK + COMMAND ${CMAKE_COMMAND} -E echo "Building NVCC intermediate link file ${output_file_relative_path}" + COMMAND ${CMAKE_COMMAND} -E make_directory "${output_file_dir}" + COMMAND ${CUDA_NVCC_EXECUTABLE} ${nvcc_flags} ${flags} -dlink ${object_files} -o "${output_file}" + COMMAND_EXPAND_LISTS + ${_verbatim} + ) + endif() + endif() +endfunction() + +############################################################################### +############################################################################### +# ADD LIBRARY +############################################################################### +############################################################################### +macro(CUDA_ADD_LIBRARY cuda_target) + + CUDA_ADD_CUDA_INCLUDE_ONCE() + + # Separate the sources from the options + CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN}) + CUDA_BUILD_SHARED_LIBRARY(_cuda_shared_flag ${ARGN}) + # Create custom commands and targets for each file. + CUDA_WRAP_SRCS( ${cuda_target} OBJ _generated_files ${_sources} + ${_cmake_options} ${_cuda_shared_flag} + OPTIONS ${_options} ) + + # Compute the file name of the intermedate link file used for separable + # compilation. + CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME(link_file ${cuda_target} "${${cuda_target}_SEPARABLE_COMPILATION_OBJECTS}") + + # Add the library. + add_library(${cuda_target} ${_cmake_options} + ${_generated_files} + ${_sources} + ${link_file} + ) + + # Add a link phase for the separable compilation if it has been enabled. If + # it has been enabled then the ${cuda_target}_SEPARABLE_COMPILATION_OBJECTS + # variable will have been defined. + CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS("${link_file}" ${cuda_target} "${_options}" "${${cuda_target}_SEPARABLE_COMPILATION_OBJECTS}") + + target_link_libraries(${cuda_target} ${CUDA_LINK_LIBRARIES_KEYWORD} + ${CUDA_LIBRARIES} + ) + + if(CUDA_SEPARABLE_COMPILATION) + target_link_libraries(${cuda_target} ${CUDA_LINK_LIBRARIES_KEYWORD} + ${CUDA_cudadevrt_LIBRARY} + ) + endif() + + # We need to set the linker language based on what the expected generated file + # would be. CUDA_C_OR_CXX is computed based on CUDA_HOST_COMPILATION_CPP. + set_target_properties(${cuda_target} + PROPERTIES + LINKER_LANGUAGE ${CUDA_C_OR_CXX} + ) + +endmacro() + + +############################################################################### +############################################################################### +# ADD EXECUTABLE +############################################################################### +############################################################################### +macro(CUDA_ADD_EXECUTABLE cuda_target) + + CUDA_ADD_CUDA_INCLUDE_ONCE() + + # Separate the sources from the options + CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN}) + # Create custom commands and targets for each file. + CUDA_WRAP_SRCS( ${cuda_target} OBJ _generated_files ${_sources} OPTIONS ${_options} ) + + # Compute the file name of the intermedate link file used for separable + # compilation. + CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME(link_file ${cuda_target} "${${cuda_target}_SEPARABLE_COMPILATION_OBJECTS}") + + # Add the library. + add_executable(${cuda_target} ${_cmake_options} + ${_generated_files} + ${_sources} + ${link_file} + ) + + # Add a link phase for the separable compilation if it has been enabled. If + # it has been enabled then the ${cuda_target}_SEPARABLE_COMPILATION_OBJECTS + # variable will have been defined. + CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS("${link_file}" ${cuda_target} "${_options}" "${${cuda_target}_SEPARABLE_COMPILATION_OBJECTS}") + + target_link_libraries(${cuda_target} ${CUDA_LINK_LIBRARIES_KEYWORD} + ${CUDA_LIBRARIES} + ) + + # We need to set the linker language based on what the expected generated file + # would be. CUDA_C_OR_CXX is computed based on CUDA_HOST_COMPILATION_CPP. + set_target_properties(${cuda_target} + PROPERTIES + LINKER_LANGUAGE ${CUDA_C_OR_CXX} + ) + +endmacro() + + +############################################################################### +############################################################################### +# (Internal) helper for manually added cuda source files with specific targets +############################################################################### +############################################################################### +macro(cuda_compile_base cuda_target format generated_files) + # Update a counter in this directory, to keep phony target names unique. + set(_cuda_target "${cuda_target}") + get_property(_counter DIRECTORY PROPERTY _cuda_internal_phony_counter) + if(_counter) + math(EXPR _counter "${_counter} + 1") + else() + set(_counter 1) + endif() + string(APPEND _cuda_target "_${_counter}") + set_property(DIRECTORY PROPERTY _cuda_internal_phony_counter ${_counter}) + + # Separate the sources from the options + CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN}) + + # Create custom commands and targets for each file. + CUDA_WRAP_SRCS( ${_cuda_target} ${format} _generated_files ${_sources} + ${_cmake_options} OPTIONS ${_options} PHONY) + + set( ${generated_files} ${_generated_files}) + +endmacro() + +############################################################################### +############################################################################### +# CUDA COMPILE +############################################################################### +############################################################################### +macro(CUDA_COMPILE generated_files) + cuda_compile_base(cuda_compile OBJ ${generated_files} ${ARGN}) +endmacro() + +############################################################################### +############################################################################### +# CUDA COMPILE PTX +############################################################################### +############################################################################### +macro(CUDA_COMPILE_PTX generated_files) + cuda_compile_base(cuda_compile_ptx PTX ${generated_files} ${ARGN}) +endmacro() + +############################################################################### +############################################################################### +# CUDA COMPILE FATBIN +############################################################################### +############################################################################### +macro(CUDA_COMPILE_FATBIN generated_files) + cuda_compile_base(cuda_compile_fatbin FATBIN ${generated_files} ${ARGN}) +endmacro() + +############################################################################### +############################################################################### +# CUDA COMPILE CUBIN +############################################################################### +############################################################################### +macro(CUDA_COMPILE_CUBIN generated_files) + cuda_compile_base(cuda_compile_cubin CUBIN ${generated_files} ${ARGN}) +endmacro() + + +############################################################################### +############################################################################### +# CUDA ADD CUFFT TO TARGET +############################################################################### +############################################################################### +macro(CUDA_ADD_CUFFT_TO_TARGET target) + if (CUDA_BUILD_EMULATION) + target_link_libraries(${target} ${CUDA_LINK_LIBRARIES_KEYWORD} ${CUDA_cufftemu_LIBRARY}) + else() + target_link_libraries(${target} ${CUDA_LINK_LIBRARIES_KEYWORD} ${CUDA_cufft_LIBRARY}) + endif() +endmacro() + +############################################################################### +############################################################################### +# CUDA ADD CUBLAS TO TARGET +############################################################################### +############################################################################### +macro(CUDA_ADD_CUBLAS_TO_TARGET target) + if (CUDA_BUILD_EMULATION) + target_link_libraries(${target} ${CUDA_LINK_LIBRARIES_KEYWORD} ${CUDA_cublasemu_LIBRARY}) + else() + target_link_libraries(${target} ${CUDA_LINK_LIBRARIES_KEYWORD} ${CUDA_cublas_LIBRARY} ${CUDA_cublas_device_LIBRARY}) + endif() +endmacro() + +############################################################################### +############################################################################### +# CUDA BUILD CLEAN TARGET +############################################################################### +############################################################################### +macro(CUDA_BUILD_CLEAN_TARGET) + # Call this after you add all your CUDA targets, and you will get a + # convenience target. You should also make clean after running this target + # to get the build system to generate all the code again. + + set(cuda_clean_target_name clean_cuda_depends) + if (CMAKE_GENERATOR MATCHES "Visual Studio") + string(TOUPPER ${cuda_clean_target_name} cuda_clean_target_name) + endif() + add_custom_target(${cuda_clean_target_name} + COMMAND ${CMAKE_COMMAND} -E rm -f ${CUDA_ADDITIONAL_CLEAN_FILES}) + + # Clear out the variable, so the next time we configure it will be empty. + # This is useful so that the files won't persist in the list after targets + # have been removed. + set(CUDA_ADDITIONAL_CLEAN_FILES "" CACHE INTERNAL "List of intermediate files that are part of the cuda dependency scanning.") +endmacro() diff --git a/vcpkg/ports/opencv2/portfile.cmake b/vcpkg/ports/opencv2/portfile.cmake new file mode 100644 index 0000000..e901c77 --- /dev/null +++ b/vcpkg/ports/opencv2/portfile.cmake @@ -0,0 +1,139 @@ +if (EXISTS "${CURRENT_INSTALLED_DIR}/share/opencv3") + message(FATAL_ERROR "OpenCV 3 is installed, please uninstall and try again:\n vcpkg remove opencv3") +endif() + +if (EXISTS "${CURRENT_INSTALLED_DIR}/share/opencv4") + message(FATAL_ERROR "OpenCV 4 is installed, please uninstall and try again:\n vcpkg remove opencv4") +endif() + +if (VCPKG_TARGET_IS_UWP) + # - opengl feature is broken on UWP + # - jasper and openexr are not available on UWP due to missing dependencies + # - opencv2 code itself fails even if previous conditions are avoided + message(FATAL_ERROR "${PORT} doesn't support UWP") +endif() + +set(OPENCV_VERSION "2.4.13.7") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO opencv/opencv + REF ${OPENCV_VERSION} + SHA512 de7d24ac7ed78ac14673011cbecc477cae688b74222a972e553c95a557b5cb8e5913f97db525421d6a72af30998ca300112fa0b285daed65f65832eb2cf7241a + HEAD_REF master + PATCHES + 0002-install-options.patch + 0003-force-package-requirements.patch + 0004-add-ffmpeg-missing-defines.patch + 0005-fix-cuda.patch +) + +file(REMOVE "${SOURCE_PATH}/cmake/FindCUDA.cmake") +file(REMOVE_RECURSE "${SOURCE_PATH}/cmake/FindCUDA") +file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindCUDA.cmake DESTINATION ${SOURCE_PATH}/cmake/) #contains fixes for CUDA 11 compat, remove when CMake has support for it + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + "cuda" WITH_CUDA + "eigen" WITH_EIGEN + "ffmpeg" WITH_FFMPEG + "jasper" WITH_JASPER + "jpeg" WITH_JPEG + "openexr" WITH_OPENEXR + "opengl" WITH_OPENGL + "png" WITH_PNG + "qt" WITH_QT + "tiff" WITH_TIFF + "world" BUILD_opencv_world +) + +set(WITH_VTK OFF) +if("vtk" IN_LIST FEATURES) + set(WITH_VTK ON) +endif() + +set(WITH_MSMF ON) +if(NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) + set(WITH_MSMF OFF) +endif() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + if (WITH_VTK) + message(WARNING "VTK is currently unsupported in this build configuration, turning it off") + set(WITH_VTK OFF) + endif() +endif() + +if("ffmpeg" IN_LIST FEATURES) + if(VCPKG_TARGET_IS_UWP) + set(VCPKG_C_FLAGS "/sdl- ${VCPKG_C_FLAGS}") + set(VCPKG_CXX_FLAGS "/sdl- ${VCPKG_CXX_FLAGS}") + endif() +endif() + +vcpkg_configure_cmake( + PREFER_NINJA + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + ###### ocv_options + -DCMAKE_DEBUG_POSTFIX=d + # Do not build docs/examples + -DBUILD_DOCS=OFF + -DBUILD_EXAMPLES=OFF + ###### Disable build 3rd party libs + -DBUILD_JASPER=OFF + -DBUILD_JPEG=OFF + -DBUILD_OPENEXR=OFF + -DBUILD_PNG=OFF + -DBUILD_TIFF=OFF + -DBUILD_TBB=OFF + -DBUILD_ZLIB=OFF + ###### OpenCV Build components + -DBUILD_opencv_apps=OFF + -DBUILD_PACKAGE=OFF + -DBUILD_PERF_TESTS=OFF + -DBUILD_TESTS=OFF + -DBUILD_WITH_DEBUG_INFO=ON + # CMAKE + -DCMAKE_DISABLE_FIND_PACKAGE_JNI=ON + ###### customized properties + ## Options from vcpkg_check_features() + ${FEATURE_OPTIONS} + -DWITH_1394=OFF + -DWITH_IPP=OFF + -DWITH_LAPACK=OFF + -DWITH_MSMF=${WITH_MSMF} + -DWITH_OPENCLAMDBLAS=OFF + -DWITH_OPENMP=OFF + -DWITH_ZLIB=ON + -DWITH_CUBLAS=OFF # newer libcublas cannot be found by the old cuda cmake script in opencv2, requires a fix +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH "share/opencv" TARGET_PATH "share/opencv") +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(READ ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake OPENCV_MODULES) + string(REPLACE "set(CMAKE_IMPORT_FILE_VERSION 1)" + "set(CMAKE_IMPORT_FILE_VERSION 1) +find_package(CUDA QUIET) +find_package(Threads QUIET) +find_package(PNG QUIET) +find_package(OpenEXR QUIET) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) +find_package(Qt5 COMPONENTS OpenGL Concurrent Test QUIET) +find_package(TIFF QUIET)" OPENCV_MODULES "${OPENCV_MODULES}") + + file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake "${OPENCV_MODULES}") + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE ${CURRENT_PACKAGES_DIR}/LICENSE) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/LICENSE) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/opencv3/0001-disable-downloading.patch b/vcpkg/ports/opencv3/0001-disable-downloading.patch new file mode 100644 index 0000000..41131c6 --- /dev/null +++ b/vcpkg/ports/opencv3/0001-disable-downloading.patch @@ -0,0 +1,14 @@ +diff --git a/cmake/OpenCVDownload.cmake b/cmake/OpenCVDownload.cmake +index 63cf6d3..01e84a5 100644 +--- a/cmake/OpenCVDownload.cmake ++++ b/cmake/OpenCVDownload.cmake +@@ -157,6 +157,9 @@ function(ocv_download) + # Download + if(NOT EXISTS "${CACHE_CANDIDATE}") + ocv_download_log("#cmake_download \"${CACHE_CANDIDATE}\" \"${DL_URL}\"") ++ string(REPLACE "${OPENCV_DOWNLOAD_PATH}/" "opencv-cache/" CACHE_SUBPATH "${CACHE_CANDIDATE}") ++ message(FATAL_ERROR " Downloads are not permitted during configure. Please pre-download the file \"${CACHE_CANDIDATE}\":\n \n vcpkg_download_distfile(OCV_DOWNLOAD\n URLS \"${DL_URL}\"\n FILENAME \"${CACHE_SUBPATH}\"\n SHA512 0\n )") ++ + foreach(try ${OPENCV_DOWNLOAD_TRIES_LIST}) + ocv_download_log("#try ${try}") + file(DOWNLOAD "${DL_URL}" "${CACHE_CANDIDATE}" diff --git a/vcpkg/ports/opencv3/0002-install-options.patch b/vcpkg/ports/opencv3/0002-install-options.patch new file mode 100644 index 0000000..4f0197f --- /dev/null +++ b/vcpkg/ports/opencv3/0002-install-options.patch @@ -0,0 +1,65 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 614baa2..1e930a3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -601,7 +601,7 @@ endif() + ocv_cmake_hook(POST_CMAKE_BUILD_OPTIONS) + + # --- Python Support --- +-if(NOT IOS) ++if(0) + include(cmake/OpenCVDetectPython.cmake) + endif() + +diff --git a/cmake/OpenCVCompilerOptions.cmake b/cmake/OpenCVCompilerOptions.cmake +index 476156f..4b27b6a 100644 +--- a/cmake/OpenCVCompilerOptions.cmake ++++ b/cmake/OpenCVCompilerOptions.cmake +@@ -261,7 +261,6 @@ if(MSVC) + #endif() + + if(BUILD_WITH_DEBUG_INFO) +- set(OPENCV_EXTRA_FLAGS_RELEASE "${OPENCV_EXTRA_FLAGS_RELEASE} /Zi") + set(OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE "${OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE} /debug") + set(OPENCV_EXTRA_SHARED_LINKER_FLAGS_RELEASE "${OPENCV_EXTRA_SHARED_LINKER_FLAGS_RELEASE} /debug") + endif() +diff --git a/cmake/OpenCVGenConfig.cmake b/cmake/OpenCVGenConfig.cmake +index c7f9fc2..84bd302 100644 +--- a/cmake/OpenCVGenConfig.cmake ++++ b/cmake/OpenCVGenConfig.cmake +@@ -109,11 +109,11 @@ function(ocv_gen_config TMP_DIR NESTED_PATH ROOT_NAME) + endif() + endfunction() + +-if((CMAKE_HOST_SYSTEM_NAME MATCHES "Linux" OR UNIX) AND NOT ANDROID) ++if(TRUE) + ocv_gen_config("${CMAKE_BINARY_DIR}/unix-install" "" "") + endif() + +-if(ANDROID) ++if(FALSE) + ocv_gen_config("${CMAKE_BINARY_DIR}/unix-install" "abi-${ANDROID_NDK_ABI_NAME}" "OpenCVConfig.root-ANDROID.cmake.in") + install(FILES "${OpenCV_SOURCE_DIR}/platforms/android/android.toolchain.cmake" DESTINATION "${OPENCV_CONFIG_INSTALL_PATH}" COMPONENT dev) + endif() +@@ -121,7 +121,7 @@ endif() + # -------------------------------------------------------------------------------------------- + # Part 3/3: ${BIN_DIR}/win-install/OpenCVConfig.cmake -> For use within binary installers/packages + # -------------------------------------------------------------------------------------------- +-if(WIN32) ++if(0) + if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows AND NOT OPENCV_SKIP_CMAKE_ROOT_CONFIG) + ocv_gen_config("${CMAKE_BINARY_DIR}/win-install" + "${OPENCV_INSTALL_BINARIES_PREFIX}${OPENCV_INSTALL_BINARIES_SUFFIX}" +diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt +index 1f0d720..0bb1ff7 100644 +--- a/data/CMakeLists.txt ++++ b/data/CMakeLists.txt +@@ -1,8 +1,6 @@ + file(GLOB HAAR_CASCADES haarcascades/*.xml) + file(GLOB LBP_CASCADES lbpcascades/*.xml) + +-install(FILES ${HAAR_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/haarcascades COMPONENT libs) +-install(FILES ${LBP_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/lbpcascades COMPONENT libs) + + if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH) + install(DIRECTORY "${OPENCV_TEST_DATA_PATH}/" DESTINATION "${OPENCV_TEST_DATA_INSTALL_PATH}" COMPONENT "tests") diff --git a/vcpkg/ports/opencv3/0003-force-package-requirements.patch b/vcpkg/ports/opencv3/0003-force-package-requirements.patch new file mode 100644 index 0000000..7f1b0c9 --- /dev/null +++ b/vcpkg/ports/opencv3/0003-force-package-requirements.patch @@ -0,0 +1,121 @@ +diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake +index fcf716b..f3951e3 100644 +--- a/cmake/OpenCVFindLibsGrfmt.cmake ++++ b/cmake/OpenCVFindLibsGrfmt.cmake +@@ -6,7 +6,7 @@ + if(BUILD_ZLIB) + ocv_clear_vars(ZLIB_FOUND) + else() +- find_package(ZLIB "${MIN_VER_ZLIB}") ++ find_package(ZLIB "${MIN_VER_ZLIB}" REQUIRED) + if(ZLIB_FOUND AND ANDROID) + if(ZLIB_LIBRARIES MATCHES "/usr/(lib|lib32|lib64)/libz.so$") + set(ZLIB_LIBRARIES z) +@@ -30,7 +30,7 @@ if(WITH_JPEG) + if(BUILD_JPEG) + ocv_clear_vars(JPEG_FOUND) + else() +- include(FindJPEG) ++ find_package(JPEG REQUIRED) + endif() + + if(NOT JPEG_FOUND) +@@ -74,7 +74,7 @@ if(WITH_TIFF) + if(BUILD_TIFF) + ocv_clear_vars(TIFF_FOUND) + else() +- include(FindTIFF) ++ find_package(TIFF REQUIRED) + if(TIFF_FOUND) + ocv_parse_header("${TIFF_INCLUDE_DIR}/tiff.h" TIFF_VERSION_LINES TIFF_VERSION_CLASSIC TIFF_VERSION_BIG TIFF_VERSION TIFF_BIGTIFF_VERSION) + endif() +@@ -117,7 +117,7 @@ if(WITH_WEBP) + if(BUILD_WEBP) + ocv_clear_vars(WEBP_FOUND WEBP_LIBRARY WEBP_LIBRARIES WEBP_INCLUDE_DIR) + else() +- include(cmake/OpenCVFindWebP.cmake) ++ find_package(WebP REQUIRED) + if(WEBP_FOUND) + set(HAVE_WEBP 1) + endif() +@@ -158,7 +158,7 @@ if(WITH_JASPER) + if(BUILD_JASPER) + ocv_clear_vars(JASPER_FOUND) + else() +- include(FindJasper) ++ find_package(Jasper REQUIRED) + endif() + + if(NOT JASPER_FOUND) +@@ -182,7 +182,7 @@ if(WITH_PNG) + if(BUILD_PNG) + ocv_clear_vars(PNG_FOUND) + else() +- include(FindPNG) ++ find_package(PNG REQUIRED) + if(PNG_FOUND) + include(CheckIncludeFile) + check_include_file("${PNG_PNG_INCLUDE_DIR}/libpng/png.h" HAVE_LIBPNG_PNG_H) +@@ -213,7 +213,7 @@ endif() + if(WITH_OPENEXR) + ocv_clear_vars(HAVE_OPENEXR) + if(NOT BUILD_OPENEXR) +- include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenEXR.cmake") ++ find_package(OpenEXR REQUIRED) + endif() + + if(OPENEXR_FOUND) +@@ -231,7 +231,7 @@ endif() + + # --- GDAL (optional) --- + if(WITH_GDAL) +- find_package(GDAL QUIET) ++ find_package(GDAL REQUIRED) + + if(NOT GDAL_FOUND) + set(HAVE_GDAL NO) +@@ -243,7 +243,7 @@ if(WITH_GDAL) + endif() + + if (WITH_GDCM) +- find_package(GDCM QUIET) ++ find_package(GDCM REQUIRED) + if(NOT GDCM_FOUND) + set(HAVE_GDCM NO) + ocv_clear_vars(GDCM_VERSION GDCM_LIBRARIES) +diff --git a/cmake/OpenCVFindLibsPerf.cmake b/cmake/OpenCVFindLibsPerf.cmake +index b9b1a95..596c152 100644 +--- a/cmake/OpenCVFindLibsPerf.cmake ++++ b/cmake/OpenCVFindLibsPerf.cmake +@@ -51,14 +51,9 @@ endif(WITH_CUDA) + + # --- Eigen --- + if(WITH_EIGEN AND NOT HAVE_EIGEN) +- find_package(Eigen3 QUIET) ++ find_package(Eigen3 REQUIRED) + + if(Eigen3_FOUND) +- if(TARGET Eigen3::Eigen) +- # Use Eigen3 imported target if possible +- list(APPEND OPENCV_LINKER_LIBS Eigen3::Eigen) +- set(HAVE_EIGEN 1) +- else() + if(DEFINED EIGEN3_INCLUDE_DIRS) + set(EIGEN_INCLUDE_PATH ${EIGEN3_INCLUDE_DIRS}) + set(HAVE_EIGEN 1) +@@ -66,7 +61,6 @@ if(WITH_EIGEN AND NOT HAVE_EIGEN) + set(EIGEN_INCLUDE_PATH ${EIGEN3_INCLUDE_DIR}) + set(HAVE_EIGEN 1) + endif() +- endif() + if(HAVE_EIGEN) + if(DEFINED EIGEN3_WORLD_VERSION) # CMake module + set(EIGEN_WORLD_VERSION ${EIGEN3_WORLD_VERSION}) +@@ -77,6 +71,7 @@ if(WITH_EIGEN AND NOT HAVE_EIGEN) + set(EIGEN_MAJOR_VERSION ${EIGEN3_VERSION_MINOR}) + set(EIGEN_MINOR_VERSION ${EIGEN3_VERSION_PATCH}) + endif() ++ ocv_include_directories(${EIGEN_INCLUDE_PATH}) + endif() + endif() + diff --git a/vcpkg/ports/opencv3/0004-add-missing-stdexcept-include.patch b/vcpkg/ports/opencv3/0004-add-missing-stdexcept-include.patch new file mode 100644 index 0000000..4f0df7d --- /dev/null +++ b/vcpkg/ports/opencv3/0004-add-missing-stdexcept-include.patch @@ -0,0 +1,12 @@ +diff --git a/modules/cvv/src/util/observer_ptr.hpp b/modules/cvv/src/util/observer_ptr.hpp +index fef3fea..68d1a80 100644 +--- a/modules/cvv/src/util/observer_ptr.hpp ++++ b/modules/cvv/src/util/observer_ptr.hpp +@@ -11,6 +11,7 @@ + #include //size_t + #include // [u]intXX_t + #include // since some people like to forget that one ++#include + + namespace cvv + { diff --git a/vcpkg/ports/opencv3/0009-fix-uwp.patch b/vcpkg/ports/opencv3/0009-fix-uwp.patch new file mode 100644 index 0000000..73cac14 --- /dev/null +++ b/vcpkg/ports/opencv3/0009-fix-uwp.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake +index 634b5b2..07a96fb 100644 +--- a/cmake/OpenCVModule.cmake ++++ b/cmake/OpenCVModule.cmake +@@ -1183,7 +1183,7 @@ function(ocv_add_perf_tests) + set_target_properties(${the_target} PROPERTIES FOLDER "tests performance") + endif() + +- if(WINRT) ++ if(WINRT AND BUILD_TESTS) + # removing APPCONTAINER from tests to run from console + # look for detailed description inside of ocv_create_module macro above + add_custom_command(TARGET "opencv_perf_${name}" diff --git a/vcpkg/ports/opencv3/CONTROL b/vcpkg/ports/opencv3/CONTROL new file mode 100644 index 0000000..623eb99 --- /dev/null +++ b/vcpkg/ports/opencv3/CONTROL @@ -0,0 +1,94 @@ +Source: opencv3 +Version: 3.4.10 +Build-Depends: protobuf, zlib +Homepage: https://github.com/opencv/opencv +Description: computer vision library +Default-Features: dnn, jpeg, opengl, png, tiff, webp + +Feature: nonfree +Description: allow nonfree and unredistributable libraries + +Feature: flann +Description: opencv_flann module + +Feature: contrib +Build-Depends: opencv3[dnn], hdf5 (!uwp), tesseract (!uwp) +Description: opencv_contrib module + +Feature: cuda +Build-Depends: opencv3[contrib], cuda, cudnn +Description: CUDA support for opencv + +Feature: dnn +Build-Depends: opencv3[flann] +Description: Enable dnn module + +Feature: eigen +Build-Depends: eigen3 +Description: Eigen support for opencv + +Feature: ffmpeg +Build-Depends: ffmpeg +Description: ffmpeg support for opencv + +Feature: gdcm +Build-Depends: gdcm +Description: GDCM support for opencv + +Feature: halide +Build-Depends: halide, opencv3[core], opencv3[dnn] +Description: Halide support for opencv + +Feature: ipp +Description: Enable Intel Integrated Performance Primitives + +Feature: jasper +Build-Depends: jasper +Description: JPEG 2000 support for opencv + +Feature: jpeg +Build-Depends: libjpeg-turbo +Description: JPEG support for opencv + +Feature: openexr +Build-Depends: openexr +Description: OpenEXR support for opencv + +Feature: opengl +Build-Depends: opengl +Description: opengl support for opencv + +Feature: ovis +Build-Depends: opencv3[contrib], ogre +Description: opencv_ovis module + +Feature: png +Build-Depends: libpng +Description: PNG support for opencv + +Feature: qt +Build-Depends: qt5-base[core] +Description: Qt GUI support for opencv + +Feature: sfm +Build-Depends: opencv3[contrib], eigen3, glog, gflags, ceres +Description: opencv_sfm module + +Feature: tbb +Build-Depends: tbb +Description: Enable Intel Threading Building Blocks + +Feature: tiff +Build-Depends: tiff +Description: TIFF support for opencv + +Feature: vtk +Build-Depends: vtk +Description: vtk support for opencv + +Feature: webp +Build-Depends: libwebp +Description: WebP support for opencv + +Feature: world +Description: Compile to a single package support for opencv diff --git a/vcpkg/ports/opencv3/FindCUDA.cmake b/vcpkg/ports/opencv3/FindCUDA.cmake new file mode 100644 index 0000000..56e15e8 --- /dev/null +++ b/vcpkg/ports/opencv3/FindCUDA.cmake @@ -0,0 +1,2026 @@ +#[=======================================================================[.rst: +FindCUDA +-------- + +.. deprecated:: 3.10 + + Superseded by first-class support for the CUDA language in CMake. + Superseded by the :module:`FindCUDAToolkit` for CUDA toolkit libraries. + +Replacement +^^^^^^^^^^^ + +It is no longer necessary to use this module or call ``find_package(CUDA)`` +for compiling CUDA code. Instead, list ``CUDA`` among the languages named +in the top-level call to the :command:`project` command, or call the +:command:`enable_language` command with ``CUDA``. +Then one can add CUDA (``.cu``) sources to programs directly +in calls to :command:`add_library` and :command:`add_executable`. + +To find and use the CUDA toolkit libraries the :module:`FindCUDAToolkit` +module has superseded this module. It works whether or not the ``CUDA`` +language is enabled. + +Documentation of Deprecated Usage +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Tools for building CUDA C files: libraries and build dependencies. + +This script locates the NVIDIA CUDA C tools. It should work on Linux, +Windows, and macOS and should be reasonably up to date with CUDA C +releases. + +This script makes use of the standard :command:`find_package` arguments of +````, ``REQUIRED`` and ``QUIET``. ``CUDA_FOUND`` will report if an +acceptable version of CUDA was found. + +The script will prompt the user to specify ``CUDA_TOOLKIT_ROOT_DIR`` if +the prefix cannot be determined by the location of nvcc in the system +path and ``REQUIRED`` is specified to :command:`find_package`. To use +a different installed version of the toolkit set the environment variable +``CUDA_BIN_PATH`` before running cmake (e.g. +``CUDA_BIN_PATH=/usr/local/cuda1.0`` instead of the default +``/usr/local/cuda``) or set ``CUDA_TOOLKIT_ROOT_DIR`` after configuring. If +you change the value of ``CUDA_TOOLKIT_ROOT_DIR``, various components that +depend on the path will be relocated. + +It might be necessary to set ``CUDA_TOOLKIT_ROOT_DIR`` manually on certain +platforms, or to use a CUDA runtime not installed in the default +location. In newer versions of the toolkit the CUDA library is +included with the graphics driver -- be sure that the driver version +matches what is needed by the CUDA runtime version. + +The following variables affect the behavior of the macros in the +script (in alphabetical order). Note that any of these flags can be +changed multiple times in the same directory before calling +``CUDA_ADD_EXECUTABLE``, ``CUDA_ADD_LIBRARY``, ``CUDA_COMPILE``, +``CUDA_COMPILE_PTX``, ``CUDA_COMPILE_FATBIN``, ``CUDA_COMPILE_CUBIN`` +or ``CUDA_WRAP_SRCS``:: + + CUDA_64_BIT_DEVICE_CODE (Default matches host bit size) + -- Set to ON to compile for 64 bit device code, OFF for 32 bit device code. + Note that making this different from the host code when generating object + or C files from CUDA code just won't work, because size_t gets defined by + nvcc in the generated source. If you compile to PTX and then load the + file yourself, you can mix bit sizes between device and host. + + CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE (Default ON) + -- Set to ON if you want the custom build rule to be attached to the source + file in Visual Studio. Turn OFF if you add the same cuda file to multiple + targets. + + This allows the user to build the target from the CUDA file; however, bad + things can happen if the CUDA source file is added to multiple targets. + When performing parallel builds it is possible for the custom build + command to be run more than once and in parallel causing cryptic build + errors. VS runs the rules for every source file in the target, and a + source can have only one rule no matter how many projects it is added to. + When the rule is run from multiple targets race conditions can occur on + the generated file. Eventually everything will get built, but if the user + is unaware of this behavior, there may be confusion. It would be nice if + this script could detect the reuse of source files across multiple targets + and turn the option off for the user, but no good solution could be found. + + CUDA_BUILD_CUBIN (Default OFF) + -- Set to ON to enable and extra compilation pass with the -cubin option in + Device mode. The output is parsed and register, shared memory usage is + printed during build. + + CUDA_BUILD_EMULATION (Default OFF for device mode) + -- Set to ON for Emulation mode. -D_DEVICEEMU is defined for CUDA C files + when CUDA_BUILD_EMULATION is TRUE. + + CUDA_LINK_LIBRARIES_KEYWORD (Default "") + -- The keyword to use for internal + target_link_libraries calls. The default is to use no keyword which + uses the old "plain" form of target_link_libraries. Note that is matters + because whatever is used inside the FindCUDA module must also be used + outside - the two forms of target_link_libraries cannot be mixed. + + CUDA_GENERATED_OUTPUT_DIR (Default CMAKE_CURRENT_BINARY_DIR) + -- Set to the path you wish to have the generated files placed. If it is + blank output files will be placed in CMAKE_CURRENT_BINARY_DIR. + Intermediate files will always be placed in + CMAKE_CURRENT_BINARY_DIR/CMakeFiles. + + CUDA_HOST_COMPILATION_CPP (Default ON) + -- Set to OFF for C compilation of host code. + + CUDA_HOST_COMPILER (Default CMAKE_C_COMPILER) + -- Set the host compiler to be used by nvcc. Ignored if -ccbin or + --compiler-bindir is already present in the CUDA_NVCC_FLAGS or + CUDA_NVCC_FLAGS_ variables. For Visual Studio targets, + the host compiler is constructed with one or more visual studio macros + such as $(VCInstallDir), that expands out to the path when + the command is run from within VS. + If the CUDAHOSTCXX environment variable is set it will + be used as the default. + + CUDA_NVCC_FLAGS + CUDA_NVCC_FLAGS_ + -- Additional NVCC command line arguments. NOTE: multiple arguments must be + semi-colon delimited (e.g. --compiler-options;-Wall) + + CUDA_PROPAGATE_HOST_FLAGS (Default ON) + -- Set to ON to propagate CMAKE_{C,CXX}_FLAGS and their configuration + dependent counterparts (e.g. CMAKE_C_FLAGS_DEBUG) automatically to the + host compiler through nvcc's -Xcompiler flag. This helps make the + generated host code match the rest of the system better. Sometimes + certain flags give nvcc problems, and this will help you turn the flag + propagation off. This does not affect the flags supplied directly to nvcc + via CUDA_NVCC_FLAGS or through the OPTION flags specified through + CUDA_ADD_LIBRARY, CUDA_ADD_EXECUTABLE, or CUDA_WRAP_SRCS. Flags used for + shared library compilation are not affected by this flag. + + CUDA_SEPARABLE_COMPILATION (Default OFF) + -- If set this will enable separable compilation for all CUDA runtime object + files. If used outside of CUDA_ADD_EXECUTABLE and CUDA_ADD_LIBRARY + (e.g. calling CUDA_WRAP_SRCS directly), + CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME and + CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS should be called. + + CUDA_SOURCE_PROPERTY_FORMAT + -- If this source file property is set, it can override the format specified + to CUDA_WRAP_SRCS (OBJ, PTX, CUBIN, or FATBIN). If an input source file + is not a .cu file, setting this file will cause it to be treated as a .cu + file. See documentation for set_source_files_properties on how to set + this property. + + CUDA_USE_STATIC_CUDA_RUNTIME (Default ON) + -- When enabled the static version of the CUDA runtime library will be used + in CUDA_LIBRARIES. If the version of CUDA configured doesn't support + this option, then it will be silently disabled. + + CUDA_VERBOSE_BUILD (Default OFF) + -- Set to ON to see all the commands used when building the CUDA file. When + using a Makefile generator the value defaults to VERBOSE (run make + VERBOSE=1 to see output), although setting CUDA_VERBOSE_BUILD to ON will + always print the output. + +The script creates the following macros (in alphabetical order):: + + CUDA_ADD_CUFFT_TO_TARGET( cuda_target ) + -- Adds the cufft library to the target (can be any target). Handles whether + you are in emulation mode or not. + + CUDA_ADD_CUBLAS_TO_TARGET( cuda_target ) + -- Adds the cublas library to the target (can be any target). Handles + whether you are in emulation mode or not. + + CUDA_ADD_EXECUTABLE( cuda_target file0 file1 ... + [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL] [OPTIONS ...] ) + -- Creates an executable "cuda_target" which is made up of the files + specified. All of the non CUDA C files are compiled using the standard + build rules specified by CMAKE and the cuda files are compiled to object + files using nvcc and the host compiler. In addition CUDA_INCLUDE_DIRS is + added automatically to include_directories(). Some standard CMake target + calls can be used on the target after calling this macro + (e.g. set_target_properties and target_link_libraries), but setting + properties that adjust compilation flags will not affect code compiled by + nvcc. Such flags should be modified before calling CUDA_ADD_EXECUTABLE, + CUDA_ADD_LIBRARY or CUDA_WRAP_SRCS. + + CUDA_ADD_LIBRARY( cuda_target file0 file1 ... + [STATIC | SHARED | MODULE] [EXCLUDE_FROM_ALL] [OPTIONS ...] ) + -- Same as CUDA_ADD_EXECUTABLE except that a library is created. + + CUDA_BUILD_CLEAN_TARGET() + -- Creates a convenience target that deletes all the dependency files + generated. You should make clean after running this target to ensure the + dependency files get regenerated. + + CUDA_COMPILE( generated_files file0 file1 ... [STATIC | SHARED | MODULE] + [OPTIONS ...] ) + -- Returns a list of generated files from the input source files to be used + with ADD_LIBRARY or ADD_EXECUTABLE. + + CUDA_COMPILE_PTX( generated_files file0 file1 ... [OPTIONS ...] ) + -- Returns a list of PTX files generated from the input source files. + + CUDA_COMPILE_FATBIN( generated_files file0 file1 ... [OPTIONS ...] ) + -- Returns a list of FATBIN files generated from the input source files. + + CUDA_COMPILE_CUBIN( generated_files file0 file1 ... [OPTIONS ...] ) + -- Returns a list of CUBIN files generated from the input source files. + + CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME( output_file_var + cuda_target + object_files ) + -- Compute the name of the intermediate link file used for separable + compilation. This file name is typically passed into + CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS. output_file_var is produced + based on cuda_target the list of objects files that need separable + compilation as specified by object_files. If the object_files list is + empty, then output_file_var will be empty. This function is called + automatically for CUDA_ADD_LIBRARY and CUDA_ADD_EXECUTABLE. Note that + this is a function and not a macro. + + CUDA_INCLUDE_DIRECTORIES( path0 path1 ... ) + -- Sets the directories that should be passed to nvcc + (e.g. nvcc -Ipath0 -Ipath1 ... ). These paths usually contain other .cu + files. + + + CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS( output_file_var cuda_target + nvcc_flags object_files) + -- Generates the link object required by separable compilation from the given + object files. This is called automatically for CUDA_ADD_EXECUTABLE and + CUDA_ADD_LIBRARY, but can be called manually when using CUDA_WRAP_SRCS + directly. When called from CUDA_ADD_LIBRARY or CUDA_ADD_EXECUTABLE the + nvcc_flags passed in are the same as the flags passed in via the OPTIONS + argument. The only nvcc flag added automatically is the bitness flag as + specified by CUDA_64_BIT_DEVICE_CODE. Note that this is a function + instead of a macro. + + CUDA_SELECT_NVCC_ARCH_FLAGS(out_variable [target_CUDA_architectures]) + -- Selects GPU arch flags for nvcc based on target_CUDA_architectures + target_CUDA_architectures : Auto | Common | All | LIST(ARCH_AND_PTX ...) + - "Auto" detects local machine GPU compute arch at runtime. + - "Common" and "All" cover common and entire subsets of architectures + ARCH_AND_PTX : NAME | NUM.NUM | NUM.NUM(NUM.NUM) | NUM.NUM+PTX + NAME: Fermi Kepler Maxwell Kepler+Tegra Kepler+Tesla Maxwell+Tegra Pascal + NUM: Any number. Only those pairs are currently accepted by NVCC though: + 2.0 2.1 3.0 3.2 3.5 3.7 5.0 5.2 5.3 6.0 6.2 + Returns LIST of flags to be added to CUDA_NVCC_FLAGS in ${out_variable} + Additionally, sets ${out_variable}_readable to the resulting numeric list + Example: + CUDA_SELECT_NVCC_ARCH_FLAGS(ARCH_FLAGS 3.0 3.5+PTX 5.2(5.0) Maxwell) + LIST(APPEND CUDA_NVCC_FLAGS ${ARCH_FLAGS}) + + More info on CUDA architectures: https://en.wikipedia.org/wiki/CUDA + Note that this is a function instead of a macro. + + CUDA_WRAP_SRCS ( cuda_target format generated_files file0 file1 ... + [STATIC | SHARED | MODULE] [OPTIONS ...] ) + -- This is where all the magic happens. CUDA_ADD_EXECUTABLE, + CUDA_ADD_LIBRARY, CUDA_COMPILE, and CUDA_COMPILE_PTX all call this + function under the hood. + + Given the list of files (file0 file1 ... fileN) this macro generates + custom commands that generate either PTX or linkable objects (use "PTX" or + "OBJ" for the format argument to switch). Files that don't end with .cu + or have the HEADER_FILE_ONLY property are ignored. + + The arguments passed in after OPTIONS are extra command line options to + give to nvcc. You can also specify per configuration options by + specifying the name of the configuration followed by the options. General + options must precede configuration specific options. Not all + configurations need to be specified, only the ones provided will be used. + + OPTIONS -DFLAG=2 "-DFLAG_OTHER=space in flag" + DEBUG -g + RELEASE --use_fast_math + RELWITHDEBINFO --use_fast_math;-g + MINSIZEREL --use_fast_math + + For certain configurations (namely VS generating object files with + CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE set to ON), no generated file will + be produced for the given cuda file. This is because when you add the + cuda file to Visual Studio it knows that this file produces an object file + and will link in the resulting object file automatically. + + This script will also generate a separate cmake script that is used at + build time to invoke nvcc. This is for several reasons. + + 1. nvcc can return negative numbers as return values which confuses + Visual Studio into thinking that the command succeeded. The script now + checks the error codes and produces errors when there was a problem. + + 2. nvcc has been known to not delete incomplete results when it + encounters problems. This confuses build systems into thinking the + target was generated when in fact an unusable file exists. The script + now deletes the output files if there was an error. + + 3. By putting all the options that affect the build into a file and then + make the build rule dependent on the file, the output files will be + regenerated when the options change. + + This script also looks at optional arguments STATIC, SHARED, or MODULE to + determine when to target the object compilation for a shared library. + BUILD_SHARED_LIBS is ignored in CUDA_WRAP_SRCS, but it is respected in + CUDA_ADD_LIBRARY. On some systems special flags are added for building + objects intended for shared libraries. A preprocessor macro, + _EXPORTS is defined when a shared library compilation is + detected. + + Flags passed into add_definitions with -D or /D are passed along to nvcc. + + + +The script defines the following variables:: + + CUDA_VERSION_MAJOR -- The major version of cuda as reported by nvcc. + CUDA_VERSION_MINOR -- The minor version. + CUDA_VERSION + CUDA_VERSION_STRING -- CUDA_VERSION_MAJOR.CUDA_VERSION_MINOR + CUDA_HAS_FP16 -- Whether a short float (float16,fp16) is supported. + + CUDA_TOOLKIT_ROOT_DIR -- Path to the CUDA Toolkit (defined if not set). + CUDA_SDK_ROOT_DIR -- Path to the CUDA SDK. Use this to find files in the + SDK. This script will not directly support finding + specific libraries or headers, as that isn't + supported by NVIDIA. If you want to change + libraries when the path changes see the + FindCUDA.cmake script for an example of how to clear + these variables. There are also examples of how to + use the CUDA_SDK_ROOT_DIR to locate headers or + libraries, if you so choose (at your own risk). + CUDA_INCLUDE_DIRS -- Include directory for cuda headers. Added automatically + for CUDA_ADD_EXECUTABLE and CUDA_ADD_LIBRARY. + CUDA_LIBRARIES -- Cuda RT library. + CUDA_CUFFT_LIBRARIES -- Device or emulation library for the Cuda FFT + implementation (alternative to: + CUDA_ADD_CUFFT_TO_TARGET macro) + CUDA_CUBLAS_LIBRARIES -- Device or emulation library for the Cuda BLAS + implementation (alternative to: + CUDA_ADD_CUBLAS_TO_TARGET macro). + CUDA_cudart_static_LIBRARY -- Statically linkable cuda runtime library. + Only available for CUDA version 5.5+ + CUDA_cudadevrt_LIBRARY -- Device runtime library. + Required for separable compilation. + CUDA_cupti_LIBRARY -- CUDA Profiling Tools Interface library. + Only available for CUDA version 4.0+. + CUDA_curand_LIBRARY -- CUDA Random Number Generation library. + Only available for CUDA version 3.2+. + CUDA_cusolver_LIBRARY -- CUDA Direct Solver library. + Only available for CUDA version 7.0+. + CUDA_cusparse_LIBRARY -- CUDA Sparse Matrix library. + Only available for CUDA version 3.2+. + CUDA_npp_LIBRARY -- NVIDIA Performance Primitives lib. + Only available for CUDA version 4.0+. + CUDA_nppc_LIBRARY -- NVIDIA Performance Primitives lib (core). + Only available for CUDA version 5.5+. + CUDA_nppi_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 5.5 - 8.0. + CUDA_nppial_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_nppicc_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_nppicom_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0 - 10.2. + Replaced by nvjpeg. + CUDA_nppidei_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_nppif_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_nppig_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_nppim_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_nppist_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_nppisu_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_nppitc_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_npps_LIBRARY -- NVIDIA Performance Primitives lib (signal processing). + Only available for CUDA version 5.5+. + CUDA_nvcuvenc_LIBRARY -- CUDA Video Encoder library. + Only available for CUDA version 3.2+. + Windows only. + CUDA_nvcuvid_LIBRARY -- CUDA Video Decoder library. + Only available for CUDA version 3.2+. + Windows only. + CUDA_nvToolsExt_LIBRARY + -- NVIDA CUDA Tools Extension library. + Available for CUDA version 5+. + CUDA_OpenCL_LIBRARY -- NVIDA CUDA OpenCL library. + Available for CUDA version 5+. + +#]=======================================================================] + +# James Bigler, NVIDIA Corp (nvidia.com - jbigler) +# Abe Stephens, SCI Institute -- http://www.sci.utah.edu/~abe/FindCuda.html +# +# Copyright (c) 2008 - 2009 NVIDIA Corporation. All rights reserved. +# +# Copyright (c) 2007-2009 +# Scientific Computing and Imaging Institute, University of Utah +# +# This code is licensed under the MIT License. See the FindCUDA.cmake script +# for the text of the license. + +# The MIT License +# +# License for the specific language governing rights and limitations under +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### + +# FindCUDA.cmake + +# This macro helps us find the location of helper files we will need the full path to +macro(CUDA_FIND_HELPER_FILE _name _extension) + set(_full_name "${_name}.${_extension}") + # CMAKE_CURRENT_LIST_FILE contains the full path to the file currently being + # processed. Using this variable, we can pull out the current path, and + # provide a way to get access to the other files we need local to here. + set(CUDA_${_name} "${CMAKE_ROOT}/Modules/FindCUDA/${_full_name}") + if(NOT EXISTS "${CUDA_${_name}}") + set(error_message "${_full_name} not found in ${CMAKE_ROOT}/Modules/FindCUDA") + if(CUDA_FIND_REQUIRED) + message(FATAL_ERROR "${error_message}") + else() + if(NOT CUDA_FIND_QUIETLY) + message(STATUS "${error_message}") + endif() + endif() + endif() + # Set this variable as internal, so the user isn't bugged with it. + set(CUDA_${_name} ${CUDA_${_name}} CACHE INTERNAL "Location of ${_full_name}" FORCE) +endmacro() + +##################################################################### +## CUDA_INCLUDE_NVCC_DEPENDENCIES +## + +# So we want to try and include the dependency file if it exists. If +# it doesn't exist then we need to create an empty one, so we can +# include it. + +# If it does exist, then we need to check to see if all the files it +# depends on exist. If they don't then we should clear the dependency +# file and regenerate it later. This covers the case where a header +# file has disappeared or moved. + +macro(CUDA_INCLUDE_NVCC_DEPENDENCIES dependency_file) + set(CUDA_NVCC_DEPEND) + set(CUDA_NVCC_DEPEND_REGENERATE FALSE) + + + # Include the dependency file. Create it first if it doesn't exist . The + # INCLUDE puts a dependency that will force CMake to rerun and bring in the + # new info when it changes. DO NOT REMOVE THIS (as I did and spent a few + # hours figuring out why it didn't work. + if(NOT EXISTS ${dependency_file}) + file(WRITE ${dependency_file} "#FindCUDA.cmake generated file. Do not edit.\n") + endif() + # Always include this file to force CMake to run again next + # invocation and rebuild the dependencies. + #message("including dependency_file = ${dependency_file}") + include(${dependency_file}) + + # Now we need to verify the existence of all the included files + # here. If they aren't there we need to just blank this variable and + # make the file regenerate again. +# if(DEFINED CUDA_NVCC_DEPEND) +# message("CUDA_NVCC_DEPEND set") +# else() +# message("CUDA_NVCC_DEPEND NOT set") +# endif() + if(CUDA_NVCC_DEPEND) + #message("CUDA_NVCC_DEPEND found") + foreach(f ${CUDA_NVCC_DEPEND}) + # message("searching for ${f}") + if(NOT EXISTS ${f}) + #message("file ${f} not found") + set(CUDA_NVCC_DEPEND_REGENERATE TRUE) + endif() + endforeach() + else() + #message("CUDA_NVCC_DEPEND false") + # No dependencies, so regenerate the file. + set(CUDA_NVCC_DEPEND_REGENERATE TRUE) + endif() + + #message("CUDA_NVCC_DEPEND_REGENERATE = ${CUDA_NVCC_DEPEND_REGENERATE}") + # No incoming dependencies, so we need to generate them. Make the + # output depend on the dependency file itself, which should cause the + # rule to re-run. + if(CUDA_NVCC_DEPEND_REGENERATE) + set(CUDA_NVCC_DEPEND ${dependency_file}) + #message("Generating an empty dependency_file: ${dependency_file}") + file(WRITE ${dependency_file} "#FindCUDA.cmake generated file. Do not edit.\n") + endif() + +endmacro() + +############################################################################### +############################################################################### +# Setup variables' defaults +############################################################################### +############################################################################### + +# Allow the user to specify if the device code is supposed to be 32 or 64 bit. +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(CUDA_64_BIT_DEVICE_CODE_DEFAULT ON) +else() + set(CUDA_64_BIT_DEVICE_CODE_DEFAULT OFF) +endif() +option(CUDA_64_BIT_DEVICE_CODE "Compile device code in 64 bit mode" ${CUDA_64_BIT_DEVICE_CODE_DEFAULT}) + +# Attach the build rule to the source file in VS. This option +option(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE "Attach the build rule to the CUDA source file. Enable only when the CUDA source file is added to at most one target." ON) + +# Prints out extra information about the cuda file during compilation +option(CUDA_BUILD_CUBIN "Generate and parse .cubin files in Device mode." OFF) + +# Set whether we are using emulation or device mode. +option(CUDA_BUILD_EMULATION "Build in Emulation mode" OFF) + +# Where to put the generated output. +set(CUDA_GENERATED_OUTPUT_DIR "" CACHE PATH "Directory to put all the output files. If blank it will default to the CMAKE_CURRENT_BINARY_DIR") + +# Parse HOST_COMPILATION mode. +option(CUDA_HOST_COMPILATION_CPP "Generated file extension" ON) + +# Extra user settable flags +cmake_initialize_per_config_variable(CUDA_NVCC_FLAGS "Semi-colon delimit multiple arguments.") + +if(DEFINED ENV{CUDAHOSTCXX}) + set(CUDA_HOST_COMPILER "$ENV{CUDAHOSTCXX}" CACHE FILEPATH "Host side compiler used by NVCC") +elseif(CMAKE_GENERATOR MATCHES "Visual Studio") + set(_CUDA_MSVC_HOST_COMPILER "$(VCInstallDir)Tools/MSVC/$(VCToolsVersion)/bin/Host$(Platform)/$(PlatformTarget)") + if(MSVC_VERSION LESS 1910) + set(_CUDA_MSVC_HOST_COMPILER "$(VCInstallDir)bin") + endif() + + set(CUDA_HOST_COMPILER "${_CUDA_MSVC_HOST_COMPILER}" CACHE FILEPATH "Host side compiler used by NVCC") + +else() + if(APPLE + AND "${CMAKE_C_COMPILER_ID}" MATCHES "Clang" + AND "${CMAKE_C_COMPILER}" MATCHES "/cc$") + # Using cc which is symlink to clang may let NVCC think it is GCC and issue + # unhandled -dumpspecs option to clang. Also in case neither + # CMAKE_C_COMPILER is defined (project does not use C language) nor + # CUDA_HOST_COMPILER is specified manually we should skip -ccbin and let + # nvcc use its own default C compiler. + # Only care about this on APPLE with clang to avoid + # following symlinks to things like ccache + if(DEFINED CMAKE_C_COMPILER AND NOT DEFINED CUDA_HOST_COMPILER) + get_filename_component(c_compiler_realpath "${CMAKE_C_COMPILER}" REALPATH) + # if the real path does not end up being clang then + # go back to using CMAKE_C_COMPILER + if(NOT "${c_compiler_realpath}" MATCHES "/clang$") + set(c_compiler_realpath "${CMAKE_C_COMPILER}") + endif() + else() + set(c_compiler_realpath "") + endif() + set(CUDA_HOST_COMPILER "${c_compiler_realpath}" CACHE FILEPATH "Host side compiler used by NVCC") + elseif(MSVC AND "${CMAKE_C_COMPILER}" MATCHES "clcache|sccache") + # NVCC does not think it will work if it is passed clcache.exe or sccache.exe + # as the host compiler, which means that builds with CC=cl.exe won't work. + # Best to just feed it whatever the actual cl.exe is as the host compiler. + set(CUDA_HOST_COMPILER "cl.exe" CACHE FILEPATH "Host side compiler used by NVCC") + else() + set(CUDA_HOST_COMPILER "${CMAKE_C_COMPILER}" + CACHE FILEPATH "Host side compiler used by NVCC") + endif() +endif() + +# Propagate the host flags to the host compiler via -Xcompiler +option(CUDA_PROPAGATE_HOST_FLAGS "Propagate C/CXX_FLAGS and friends to the host compiler via -Xcompile" ON) + +# Enable CUDA_SEPARABLE_COMPILATION +option(CUDA_SEPARABLE_COMPILATION "Compile CUDA objects with separable compilation enabled. Requires CUDA 5.0+" OFF) + +# Specifies whether the commands used when compiling the .cu file will be printed out. +option(CUDA_VERBOSE_BUILD "Print out the commands run while compiling the CUDA source file. With the Makefile generator this defaults to VERBOSE variable specified on the command line, but can be forced on with this option." OFF) + +mark_as_advanced( + CUDA_64_BIT_DEVICE_CODE + CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE + CUDA_GENERATED_OUTPUT_DIR + CUDA_HOST_COMPILATION_CPP + CUDA_NVCC_FLAGS + CUDA_PROPAGATE_HOST_FLAGS + CUDA_BUILD_CUBIN + CUDA_BUILD_EMULATION + CUDA_VERBOSE_BUILD + CUDA_SEPARABLE_COMPILATION + ) + +# Single config generators like Makefiles or Ninja don't usually have +# CMAKE_CONFIGURATION_TYPES defined (but note that it can be defined if set by +# projects or developers). Even CMAKE_BUILD_TYPE might not be defined for +# single config generators (and should not be defined for multi-config +# generators). To ensure we get a complete superset of all possible +# configurations, we combine CMAKE_CONFIGURATION_TYPES, CMAKE_BUILD_TYPE and +# all of the standard configurations, then weed out duplicates with +# list(REMOVE_DUPLICATES). Looping over the unique set then ensures we have +# each configuration-specific set of nvcc flags defined and marked as advanced. +set(CUDA_configuration_types ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE} Debug MinSizeRel Release RelWithDebInfo) +list(REMOVE_DUPLICATES CUDA_configuration_types) + +############################################################################### +############################################################################### +# Locate CUDA, Set Build Type, etc. +############################################################################### +############################################################################### + +macro(cuda_unset_include_and_libraries) + unset(CUDA_TOOLKIT_INCLUDE CACHE) + unset(CUDA_CUDART_LIBRARY CACHE) + unset(CUDA_CUDA_LIBRARY CACHE) + # Make sure you run this before you unset CUDA_VERSION. + if(CUDA_VERSION VERSION_EQUAL "3.0") + # This only existed in the 3.0 version of the CUDA toolkit + unset(CUDA_CUDARTEMU_LIBRARY CACHE) + endif() + unset(CUDA_cudart_static_LIBRARY CACHE) + unset(CUDA_cudadevrt_LIBRARY CACHE) + unset(CUDA_cublas_LIBRARY CACHE) + unset(CUDA_cublas_device_LIBRARY CACHE) + unset(CUDA_cublasemu_LIBRARY CACHE) + unset(CUDA_cufft_LIBRARY CACHE) + unset(CUDA_cufftemu_LIBRARY CACHE) + unset(CUDA_cupti_LIBRARY CACHE) + unset(CUDA_curand_LIBRARY CACHE) + unset(CUDA_cusolver_LIBRARY CACHE) + unset(CUDA_cusparse_LIBRARY CACHE) + unset(CUDA_npp_LIBRARY CACHE) + unset(CUDA_nppc_LIBRARY CACHE) + unset(CUDA_nppi_LIBRARY CACHE) + unset(CUDA_npps_LIBRARY CACHE) + unset(CUDA_nvcuvenc_LIBRARY CACHE) + unset(CUDA_nvcuvid_LIBRARY CACHE) + unset(CUDA_nvToolsExt_LIBRARY CACHE) + unset(CUDA_OpenCL_LIBRARY CACHE) + unset(CUDA_GPU_DETECT_OUTPUT CACHE) +endmacro() + +# Check to see if the CUDA_TOOLKIT_ROOT_DIR and CUDA_SDK_ROOT_DIR have changed, +# if they have then clear the cache variables, so that will be detected again. +if(NOT "${CUDA_TOOLKIT_ROOT_DIR}" STREQUAL "${CUDA_TOOLKIT_ROOT_DIR_INTERNAL}") + unset(CUDA_TOOLKIT_TARGET_DIR CACHE) + unset(CUDA_NVCC_EXECUTABLE CACHE) + cuda_unset_include_and_libraries() + unset(CUDA_VERSION CACHE) +endif() + +if(NOT "${CUDA_TOOLKIT_TARGET_DIR}" STREQUAL "${CUDA_TOOLKIT_TARGET_DIR_INTERNAL}") + cuda_unset_include_and_libraries() +endif() + +# +# End of unset() +# + +# +# Start looking for things +# + +# Search for the cuda distribution. +if(NOT CUDA_TOOLKIT_ROOT_DIR AND NOT CMAKE_CROSSCOMPILING) + # Search in the CUDA_BIN_PATH first. + find_program(CUDA_TOOLKIT_ROOT_DIR_NVCC + NAMES nvcc nvcc.exe + PATHS + ENV CUDA_TOOLKIT_ROOT + ENV CUDA_PATH + ENV CUDA_BIN_PATH + PATH_SUFFIXES bin bin64 + DOC "Toolkit location." + NO_DEFAULT_PATH + ) + + # Now search default paths + find_program(CUDA_TOOLKIT_ROOT_DIR_NVCC + NAMES nvcc nvcc.exe + PATHS /opt/cuda/bin + PATH_SUFFIXES cuda/bin + DOC "Toolkit location." + ) + + if (CUDA_TOOLKIT_ROOT_DIR_NVCC) + get_filename_component(CUDA_TOOLKIT_ROOT_DIR_NVCC_PAR "${CUDA_TOOLKIT_ROOT_DIR_NVCC}" DIRECTORY) + get_filename_component(CUDA_TOOLKIT_ROOT_DIR "${CUDA_TOOLKIT_ROOT_DIR_NVCC_PAR}" DIRECTORY CACHE) + string(REGEX REPLACE "[/\\\\]?bin[64]*[/\\\\]?$" "" CUDA_TOOLKIT_ROOT_DIR ${CUDA_TOOLKIT_ROOT_DIR}) + # We need to force this back into the cache. + set(CUDA_TOOLKIT_ROOT_DIR ${CUDA_TOOLKIT_ROOT_DIR} CACHE PATH "Toolkit location." FORCE) + set(CUDA_TOOLKIT_TARGET_DIR ${CUDA_TOOLKIT_ROOT_DIR}) + endif() + unset(CUDA_TOOLKIT_ROOT_DIR_NVCC CACHE) + + if (NOT EXISTS ${CUDA_TOOLKIT_ROOT_DIR}) + if(CUDA_FIND_REQUIRED) + message(FATAL_ERROR "Specify CUDA_TOOLKIT_ROOT_DIR") + elseif(NOT CUDA_FIND_QUIETLY) + message("CUDA_TOOLKIT_ROOT_DIR not found or specified") + endif() + endif () +endif () + +if(CMAKE_CROSSCOMPILING) + SET (CUDA_TOOLKIT_ROOT $ENV{CUDA_TOOLKIT_ROOT}) + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7-a") + # Support for NVPACK + set (CUDA_TOOLKIT_TARGET_NAME "armv7-linux-androideabi") + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm") + # Support for arm cross compilation + set(CUDA_TOOLKIT_TARGET_NAME "armv7-linux-gnueabihf") + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64") + # Support for aarch64 cross compilation + if (ANDROID_ARCH_NAME STREQUAL "arm64") + set(CUDA_TOOLKIT_TARGET_NAME "aarch64-linux-androideabi") + else() + set(CUDA_TOOLKIT_TARGET_NAME "aarch64-linux") + endif (ANDROID_ARCH_NAME STREQUAL "arm64") + endif() + + if (EXISTS "${CUDA_TOOLKIT_ROOT}/targets/${CUDA_TOOLKIT_TARGET_NAME}") + set(CUDA_TOOLKIT_TARGET_DIR "${CUDA_TOOLKIT_ROOT}/targets/${CUDA_TOOLKIT_TARGET_NAME}" CACHE PATH "CUDA Toolkit target location.") + SET (CUDA_TOOLKIT_ROOT_DIR ${CUDA_TOOLKIT_ROOT}) + mark_as_advanced(CUDA_TOOLKIT_TARGET_DIR) + endif() + + # add known CUDA targetr root path to the set of directories we search for programs, libraries and headers + set( CMAKE_FIND_ROOT_PATH "${CUDA_TOOLKIT_TARGET_DIR};${CMAKE_FIND_ROOT_PATH}") + macro( cuda_find_host_program ) + if (COMMAND find_host_program) + find_host_program( ${ARGN} ) + else() + find_program( ${ARGN} ) + endif() + endmacro() +else() + # for non-cross-compile, find_host_program == find_program and CUDA_TOOLKIT_TARGET_DIR == CUDA_TOOLKIT_ROOT_DIR + macro( cuda_find_host_program ) + find_program( ${ARGN} ) + endmacro() + SET (CUDA_TOOLKIT_TARGET_DIR ${CUDA_TOOLKIT_ROOT_DIR}) +endif() + + +# CUDA_NVCC_EXECUTABLE +if(DEFINED ENV{CUDA_NVCC_EXECUTABLE}) + set(CUDA_NVCC_EXECUTABLE "$ENV{CUDA_NVCC_EXECUTABLE}" CACHE FILEPATH "The CUDA compiler") +else() + cuda_find_host_program(CUDA_NVCC_EXECUTABLE + NAMES nvcc + PATHS "${CUDA_TOOLKIT_ROOT_DIR}" + ENV CUDA_PATH + ENV CUDA_BIN_PATH + PATH_SUFFIXES bin bin64 + NO_DEFAULT_PATH + ) + # Search default search paths, after we search our own set of paths. + cuda_find_host_program(CUDA_NVCC_EXECUTABLE nvcc) +endif() +mark_as_advanced(CUDA_NVCC_EXECUTABLE) + +if(CUDA_NVCC_EXECUTABLE AND NOT CUDA_VERSION) + # Compute the version. + execute_process (COMMAND ${CUDA_NVCC_EXECUTABLE} "--version" OUTPUT_VARIABLE NVCC_OUT) + string(REGEX REPLACE ".*release ([0-9]+)\\.([0-9]+).*" "\\1" CUDA_VERSION_MAJOR ${NVCC_OUT}) + string(REGEX REPLACE ".*release ([0-9]+)\\.([0-9]+).*" "\\2" CUDA_VERSION_MINOR ${NVCC_OUT}) + set(CUDA_VERSION "${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR}" CACHE STRING "Version of CUDA as computed from nvcc.") + mark_as_advanced(CUDA_VERSION) +else() + # Need to set these based off of the cached value + string(REGEX REPLACE "([0-9]+)\\.([0-9]+).*" "\\1" CUDA_VERSION_MAJOR "${CUDA_VERSION}") + string(REGEX REPLACE "([0-9]+)\\.([0-9]+).*" "\\2" CUDA_VERSION_MINOR "${CUDA_VERSION}") +endif() + + +# Always set this convenience variable +set(CUDA_VERSION_STRING "${CUDA_VERSION}") + +# CUDA_TOOLKIT_INCLUDE +find_path(CUDA_TOOLKIT_INCLUDE + device_functions.h # Header included in toolkit + PATHS ${CUDA_TOOLKIT_TARGET_DIR} + ENV CUDA_PATH + ENV CUDA_INC_PATH + PATH_SUFFIXES include + NO_DEFAULT_PATH + ) +# Search default search paths, after we search our own set of paths. +find_path(CUDA_TOOLKIT_INCLUDE device_functions.h) +mark_as_advanced(CUDA_TOOLKIT_INCLUDE) + +if (CUDA_VERSION VERSION_GREATER "7.0" OR EXISTS "${CUDA_TOOLKIT_INCLUDE}/cuda_fp16.h") + set(CUDA_HAS_FP16 TRUE) +else() + set(CUDA_HAS_FP16 FALSE) +endif() + +# Set the user list of include dir to nothing to initialize it. +set (CUDA_NVCC_INCLUDE_DIRS_USER "") +set (CUDA_INCLUDE_DIRS ${CUDA_TOOLKIT_INCLUDE}) + +macro(cuda_find_library_local_first_with_path_ext _var _names _doc _path_ext ) + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + # CUDA 3.2+ on Windows moved the library directories, so we need the new + # and old paths. + set(_cuda_64bit_lib_dir "${_path_ext}lib/x64" "${_path_ext}lib64" "${_path_ext}libx64" ) + endif() + # CUDA 3.2+ on Windows moved the library directories, so we need to new + # (lib/Win32) and the old path (lib). + find_library(${_var} + NAMES ${_names} + PATHS "${CUDA_TOOLKIT_TARGET_DIR}" + ENV CUDA_PATH + ENV CUDA_LIB_PATH + PATH_SUFFIXES ${_cuda_64bit_lib_dir} "${_path_ext}lib/Win32" "${_path_ext}lib" "${_path_ext}libWin32" + DOC ${_doc} + NO_DEFAULT_PATH + ) + if (NOT CMAKE_CROSSCOMPILING) + # Search default search paths, after we search our own set of paths. + find_library(${_var} + NAMES ${_names} + PATHS "/usr/lib/nvidia-current" + DOC ${_doc} + ) + endif() +endmacro() + +macro(cuda_find_library_local_first _var _names _doc) + cuda_find_library_local_first_with_path_ext( "${_var}" "${_names}" "${_doc}" "" ) +endmacro() + +macro(find_library_local_first _var _names _doc ) + cuda_find_library_local_first( "${_var}" "${_names}" "${_doc}" "" ) +endmacro() + + +# CUDA_LIBRARIES +cuda_find_library_local_first(CUDA_CUDART_LIBRARY cudart "\"cudart\" library") +if(CUDA_VERSION VERSION_EQUAL "3.0") + # The cudartemu library only existed for the 3.0 version of CUDA. + cuda_find_library_local_first(CUDA_CUDARTEMU_LIBRARY cudartemu "\"cudartemu\" library") + mark_as_advanced( + CUDA_CUDARTEMU_LIBRARY + ) +endif() + +if(NOT CUDA_VERSION VERSION_LESS "5.5") + cuda_find_library_local_first(CUDA_cudart_static_LIBRARY cudart_static "static CUDA runtime library") + mark_as_advanced(CUDA_cudart_static_LIBRARY) +endif() + + +if(CUDA_cudart_static_LIBRARY) + # If static cudart available, use it by default, but provide a user-visible option to disable it. + option(CUDA_USE_STATIC_CUDA_RUNTIME "Use the static version of the CUDA runtime library if available" ON) +else() + # If not available, silently disable the option. + set(CUDA_USE_STATIC_CUDA_RUNTIME OFF CACHE INTERNAL "") +endif() + +if(CUDA_USE_STATIC_CUDA_RUNTIME) + set(CUDA_CUDART_LIBRARY_VAR CUDA_cudart_static_LIBRARY) +else() + set(CUDA_CUDART_LIBRARY_VAR CUDA_CUDART_LIBRARY) +endif() + +if(NOT CUDA_VERSION VERSION_LESS "5.0") + cuda_find_library_local_first(CUDA_cudadevrt_LIBRARY cudadevrt "\"cudadevrt\" library") + mark_as_advanced(CUDA_cudadevrt_LIBRARY) +endif() + +if(CUDA_USE_STATIC_CUDA_RUNTIME) + if(UNIX) + # Check for the dependent libraries. + + # Many of the FindXYZ CMake comes with makes use of try_compile with int main(){return 0;} + # as the source file. Unfortunately this causes a warning with -Wstrict-prototypes and + # -Werror causes the try_compile to fail. We will just temporarily disable other flags + # when doing the find_package command here. + set(_cuda_cmake_c_flags ${CMAKE_C_FLAGS}) + set(CMAKE_C_FLAGS "-fPIC") + find_package(Threads REQUIRED) + set(CMAKE_C_FLAGS ${_cuda_cmake_c_flags}) + + if(NOT APPLE) + #On Linux, you must link against librt when using the static cuda runtime. + find_library(CUDA_rt_LIBRARY rt) + if (NOT CUDA_rt_LIBRARY) + message(WARNING "Expecting to find librt for libcudart_static, but didn't find it.") + endif() + endif() + endif() +endif() + +# CUPTI library showed up in cuda toolkit 4.0 +if(NOT CUDA_VERSION VERSION_LESS "4.0") + cuda_find_library_local_first_with_path_ext(CUDA_cupti_LIBRARY cupti "\"cupti\" library" "extras/CUPTI/") + mark_as_advanced(CUDA_cupti_LIBRARY) +endif() + +# Set the CUDA_LIBRARIES variable. This is the set of stuff to link against if you are +# using the CUDA runtime. For the dynamic version of the runtime, most of the +# dependencies are brough in, but for the static version there are additional libraries +# and linker commands needed. +# Initialize to empty +set(CUDA_LIBRARIES) + +# If we are using emulation mode and we found the cudartemu library then use +# that one instead of cudart. +if(CUDA_BUILD_EMULATION AND CUDA_CUDARTEMU_LIBRARY) + list(APPEND CUDA_LIBRARIES ${CUDA_CUDARTEMU_LIBRARY}) +elseif(CUDA_USE_STATIC_CUDA_RUNTIME AND CUDA_cudart_static_LIBRARY) + list(APPEND CUDA_LIBRARIES ${CUDA_cudart_static_LIBRARY}) + if (TARGET Threads::Threads) + list(APPEND CUDA_LIBRARIES Threads::Threads) + endif() + list(APPEND CUDA_LIBRARIES ${CMAKE_DL_LIBS}) + if (CUDA_rt_LIBRARY) + list(APPEND CUDA_LIBRARIES ${CUDA_rt_LIBRARY}) + endif() + if(APPLE) + # We need to add the default path to the driver (libcuda.dylib) as an rpath, so that + # the static cuda runtime can find it at runtime. + list(APPEND CUDA_LIBRARIES -Wl,-rpath,/usr/local/cuda/lib) + endif() +else() + list(APPEND CUDA_LIBRARIES ${CUDA_CUDART_LIBRARY}) +endif() + +# 1.1 toolkit on linux doesn't appear to have a separate library on +# some platforms. +cuda_find_library_local_first(CUDA_CUDA_LIBRARY cuda "\"cuda\" library (older versions only).") + +mark_as_advanced( + CUDA_CUDA_LIBRARY + CUDA_CUDART_LIBRARY + ) + +####################### +# Look for some of the toolkit helper libraries +macro(FIND_CUDA_HELPER_LIBS _name) + cuda_find_library_local_first(CUDA_${_name}_LIBRARY ${_name} "\"${_name}\" library") + mark_as_advanced(CUDA_${_name}_LIBRARY) +endmacro() + +####################### +# Disable emulation for v3.1 onward +if(CUDA_VERSION VERSION_GREATER "3.0") + if(CUDA_BUILD_EMULATION) + message(FATAL_ERROR "CUDA_BUILD_EMULATION is not supported in version 3.1 and onwards. You must disable it to proceed. You have version ${CUDA_VERSION}.") + endif() +endif() + +# Search for additional CUDA toolkit libraries. +if(CUDA_VERSION VERSION_LESS "3.1") + # Emulation libraries aren't available in version 3.1 onward. + find_cuda_helper_libs(cufftemu) + find_cuda_helper_libs(cublasemu) +endif() +find_cuda_helper_libs(cufft) +find_cuda_helper_libs(cublas) +if(NOT CUDA_VERSION VERSION_LESS "3.2") + # cusparse showed up in version 3.2 + find_cuda_helper_libs(cusparse) + find_cuda_helper_libs(curand) + if (WIN32) + find_cuda_helper_libs(nvcuvenc) + find_cuda_helper_libs(nvcuvid) + endif() +endif() +if(CUDA_VERSION VERSION_GREATER "5.0" AND CUDA_VERSION VERSION_LESS "9.2") + # In CUDA 9.2 cublas_device was deprecated + find_cuda_helper_libs(cublas_device) +endif() + +if(NOT CUDA_VERSION VERSION_LESS "5.0") + find_cuda_helper_libs(nvToolsExt) + find_cuda_helper_libs(OpenCL) +endif() + +if(NOT CUDA_VERSION VERSION_LESS "9.0") + # In CUDA 9.0 NPP was nppi was removed + find_cuda_helper_libs(nppc) + find_cuda_helper_libs(nppial) + find_cuda_helper_libs(nppicc) + if(CUDA_VERSION VERSION_LESS "11.0") + find_cuda_helper_libs(nppicom) + endif() + find_cuda_helper_libs(nppidei) + find_cuda_helper_libs(nppif) + find_cuda_helper_libs(nppig) + find_cuda_helper_libs(nppim) + find_cuda_helper_libs(nppist) + find_cuda_helper_libs(nppisu) + find_cuda_helper_libs(nppitc) + find_cuda_helper_libs(npps) + set(CUDA_npp_LIBRARY "${CUDA_nppc_LIBRARY};${CUDA_nppial_LIBRARY};${CUDA_nppicc_LIBRARY};${CUDA_nppicom_LIBRARY};${CUDA_nppidei_LIBRARY};${CUDA_nppif_LIBRARY};${CUDA_nppig_LIBRARY};${CUDA_nppim_LIBRARY};${CUDA_nppist_LIBRARY};${CUDA_nppisu_LIBRARY};${CUDA_nppitc_LIBRARY};${CUDA_npps_LIBRARY}") +elseif(CUDA_VERSION VERSION_GREATER "5.0") + # In CUDA 5.5 NPP was split into 3 separate libraries. + find_cuda_helper_libs(nppc) + find_cuda_helper_libs(nppi) + find_cuda_helper_libs(npps) + set(CUDA_npp_LIBRARY "${CUDA_nppc_LIBRARY};${CUDA_nppi_LIBRARY};${CUDA_npps_LIBRARY}") +elseif(NOT CUDA_VERSION VERSION_LESS "4.0") + find_cuda_helper_libs(npp) +endif() +if(NOT CUDA_VERSION VERSION_LESS "7.0") + # cusolver showed up in version 7.0 + find_cuda_helper_libs(cusolver) +endif() + +if (CUDA_BUILD_EMULATION) + set(CUDA_CUFFT_LIBRARIES ${CUDA_cufftemu_LIBRARY}) + set(CUDA_CUBLAS_LIBRARIES ${CUDA_cublasemu_LIBRARY}) +else() + set(CUDA_CUFFT_LIBRARIES ${CUDA_cufft_LIBRARY}) + set(CUDA_CUBLAS_LIBRARIES ${CUDA_cublas_LIBRARY} ${CUDA_cublas_device_LIBRARY}) +endif() + +######################## +# Look for the SDK stuff. As of CUDA 3.0 NVSDKCUDA_ROOT has been replaced with +# NVSDKCOMPUTE_ROOT with the old CUDA C contents moved into the C subdirectory +find_path(CUDA_SDK_ROOT_DIR common/inc/cutil.h + HINTS + "$ENV{NVSDKCOMPUTE_ROOT}/C" + ENV NVSDKCUDA_ROOT + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\NVIDIA Corporation\\Installed Products\\NVIDIA SDK 10\\Compute;InstallDir]" + PATHS + "/Developer/GPU\ Computing/C" + ) + +# Keep the CUDA_SDK_ROOT_DIR first in order to be able to override the +# environment variables. +set(CUDA_SDK_SEARCH_PATH + "${CUDA_SDK_ROOT_DIR}" + "${CUDA_TOOLKIT_ROOT_DIR}/local/NVSDK0.2" + "${CUDA_TOOLKIT_ROOT_DIR}/NVSDK0.2" + "${CUDA_TOOLKIT_ROOT_DIR}/NV_CUDA_SDK" + "$ENV{HOME}/NVIDIA_CUDA_SDK" + "$ENV{HOME}/NVIDIA_CUDA_SDK_MACOSX" + "/Developer/CUDA" + ) + +# Example of how to find an include file from the CUDA_SDK_ROOT_DIR + +# find_path(CUDA_CUT_INCLUDE_DIR +# cutil.h +# PATHS ${CUDA_SDK_SEARCH_PATH} +# PATH_SUFFIXES "common/inc" +# DOC "Location of cutil.h" +# NO_DEFAULT_PATH +# ) +# # Now search system paths +# find_path(CUDA_CUT_INCLUDE_DIR cutil.h DOC "Location of cutil.h") + +# mark_as_advanced(CUDA_CUT_INCLUDE_DIR) + + +# Example of how to find a library in the CUDA_SDK_ROOT_DIR + +# # cutil library is called cutil64 for 64 bit builds on windows. We don't want +# # to get these confused, so we are setting the name based on the word size of +# # the build. + +# if(CMAKE_SIZEOF_VOID_P EQUAL 8) +# set(cuda_cutil_name cutil64) +# else() +# set(cuda_cutil_name cutil32) +# endif() + +# find_library(CUDA_CUT_LIBRARY +# NAMES cutil ${cuda_cutil_name} +# PATHS ${CUDA_SDK_SEARCH_PATH} +# # The new version of the sdk shows up in common/lib, but the old one is in lib +# PATH_SUFFIXES "common/lib" "lib" +# DOC "Location of cutil library" +# NO_DEFAULT_PATH +# ) +# # Now search system paths +# find_library(CUDA_CUT_LIBRARY NAMES cutil ${cuda_cutil_name} DOC "Location of cutil library") +# mark_as_advanced(CUDA_CUT_LIBRARY) +# set(CUDA_CUT_LIBRARIES ${CUDA_CUT_LIBRARY}) + + + +############################# +# Check for required components +set(CUDA_FOUND TRUE) + +set(CUDA_TOOLKIT_ROOT_DIR_INTERNAL "${CUDA_TOOLKIT_ROOT_DIR}" CACHE INTERNAL + "This is the value of the last time CUDA_TOOLKIT_ROOT_DIR was set successfully." FORCE) +set(CUDA_TOOLKIT_TARGET_DIR_INTERNAL "${CUDA_TOOLKIT_TARGET_DIR}" CACHE INTERNAL + "This is the value of the last time CUDA_TOOLKIT_TARGET_DIR was set successfully." FORCE) +set(CUDA_SDK_ROOT_DIR_INTERNAL "${CUDA_SDK_ROOT_DIR}" CACHE INTERNAL + "This is the value of the last time CUDA_SDK_ROOT_DIR was set successfully." FORCE) + +include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) + +find_package_handle_standard_args(CUDA + REQUIRED_VARS + CUDA_TOOLKIT_ROOT_DIR + CUDA_NVCC_EXECUTABLE + CUDA_INCLUDE_DIRS + ${CUDA_CUDART_LIBRARY_VAR} + VERSION_VAR + CUDA_VERSION + ) + + + +############################################################################### +############################################################################### +# Macros +############################################################################### +############################################################################### + +############################################################################### +# Add include directories to pass to the nvcc command. +macro(CUDA_INCLUDE_DIRECTORIES) + foreach(dir ${ARGN}) + list(APPEND CUDA_NVCC_INCLUDE_DIRS_USER ${dir}) + endforeach() +endmacro() + + +############################################################################## +cuda_find_helper_file(parse_cubin cmake) +cuda_find_helper_file(make2cmake cmake) +cuda_find_helper_file(run_nvcc cmake) +include("${CMAKE_ROOT}/Modules/FindCUDA/select_compute_arch.cmake") + +############################################################################## +# Separate the OPTIONS out from the sources +# +macro(CUDA_GET_SOURCES_AND_OPTIONS _sources _cmake_options _options) + set( ${_sources} ) + set( ${_cmake_options} ) + set( ${_options} ) + set( _found_options FALSE ) + foreach(arg ${ARGN}) + if("x${arg}" STREQUAL "xOPTIONS") + set( _found_options TRUE ) + elseif( + "x${arg}" STREQUAL "xWIN32" OR + "x${arg}" STREQUAL "xMACOSX_BUNDLE" OR + "x${arg}" STREQUAL "xEXCLUDE_FROM_ALL" OR + "x${arg}" STREQUAL "xSTATIC" OR + "x${arg}" STREQUAL "xSHARED" OR + "x${arg}" STREQUAL "xMODULE" + ) + list(APPEND ${_cmake_options} ${arg}) + else() + if ( _found_options ) + list(APPEND ${_options} ${arg}) + else() + # Assume this is a file + list(APPEND ${_sources} ${arg}) + endif() + endif() + endforeach() +endmacro() + +############################################################################## +# Parse the OPTIONS from ARGN and set the variables prefixed by _option_prefix +# +macro(CUDA_PARSE_NVCC_OPTIONS _option_prefix) + set( _found_config ) + foreach(arg ${ARGN}) + # Determine if we are dealing with a perconfiguration flag + foreach(config ${CUDA_configuration_types}) + string(TOUPPER ${config} config_upper) + if (arg STREQUAL "${config_upper}") + set( _found_config _${arg}) + # Set arg to nothing to keep it from being processed further + set( arg ) + endif() + endforeach() + + if ( arg ) + list(APPEND ${_option_prefix}${_found_config} "${arg}") + endif() + endforeach() +endmacro() + +############################################################################## +# Helper to add the include directory for CUDA only once +function(CUDA_ADD_CUDA_INCLUDE_ONCE) + get_directory_property(_include_directories INCLUDE_DIRECTORIES) + set(_add TRUE) + if(_include_directories) + foreach(dir ${_include_directories}) + if("${dir}" STREQUAL "${CUDA_INCLUDE_DIRS}") + set(_add FALSE) + endif() + endforeach() + endif() + if(_add) + include_directories(${CUDA_INCLUDE_DIRS}) + endif() +endfunction() + +function(CUDA_BUILD_SHARED_LIBRARY shared_flag) + set(cmake_args ${ARGN}) + # If SHARED, MODULE, or STATIC aren't already in the list of arguments, then + # add SHARED or STATIC based on the value of BUILD_SHARED_LIBS. + list(FIND cmake_args SHARED _cuda_found_SHARED) + list(FIND cmake_args MODULE _cuda_found_MODULE) + list(FIND cmake_args STATIC _cuda_found_STATIC) + if( _cuda_found_SHARED GREATER -1 OR + _cuda_found_MODULE GREATER -1 OR + _cuda_found_STATIC GREATER -1) + set(_cuda_build_shared_libs) + else() + if (BUILD_SHARED_LIBS) + set(_cuda_build_shared_libs SHARED) + else() + set(_cuda_build_shared_libs STATIC) + endif() + endif() + set(${shared_flag} ${_cuda_build_shared_libs} PARENT_SCOPE) +endfunction() + +############################################################################## +# Helper to avoid clashes of files with the same basename but different paths. +# This doesn't attempt to do exactly what CMake internals do, which is to only +# add this path when there is a conflict, since by the time a second collision +# in names is detected it's already too late to fix the first one. For +# consistency sake the relative path will be added to all files. +function(CUDA_COMPUTE_BUILD_PATH path build_path) + #message("CUDA_COMPUTE_BUILD_PATH([${path}] ${build_path})") + # Only deal with CMake style paths from here on out + file(TO_CMAKE_PATH "${path}" bpath) + if (IS_ABSOLUTE "${bpath}") + # Absolute paths are generally unnessary, especially if something like + # file(GLOB_RECURSE) is used to pick up the files. + + string(FIND "${bpath}" "${CMAKE_CURRENT_BINARY_DIR}" _binary_dir_pos) + if (_binary_dir_pos EQUAL 0) + file(RELATIVE_PATH bpath "${CMAKE_CURRENT_BINARY_DIR}" "${bpath}") + else() + file(RELATIVE_PATH bpath "${CMAKE_CURRENT_SOURCE_DIR}" "${bpath}") + endif() + endif() + + # This recipe is from cmLocalGenerator::CreateSafeUniqueObjectFileName in the + # CMake source. + + # Remove leading / + string(REGEX REPLACE "^[/]+" "" bpath "${bpath}") + # Avoid absolute paths by removing ':' + string(REPLACE ":" "_" bpath "${bpath}") + # Avoid relative paths that go up the tree + string(REPLACE "../" "__/" bpath "${bpath}") + # Avoid spaces + string(REPLACE " " "_" bpath "${bpath}") + + # Strip off the filename. I wait until here to do it, since removin the + # basename can make a path that looked like path/../basename turn into + # path/.. (notice the trailing slash). + get_filename_component(bpath "${bpath}" PATH) + + set(${build_path} "${bpath}" PARENT_SCOPE) + #message("${build_path} = ${bpath}") +endfunction() + +############################################################################## +# This helper macro populates the following variables and setups up custom +# commands and targets to invoke the nvcc compiler to generate C or PTX source +# dependent upon the format parameter. The compiler is invoked once with -M +# to generate a dependency file and a second time with -cuda or -ptx to generate +# a .cpp or .ptx file. +# INPUT: +# cuda_target - Target name +# format - PTX, CUBIN, FATBIN or OBJ +# FILE1 .. FILEN - The remaining arguments are the sources to be wrapped. +# OPTIONS - Extra options to NVCC +# OUTPUT: +# generated_files - List of generated files +############################################################################## +############################################################################## + +macro(CUDA_WRAP_SRCS cuda_target format generated_files) + + # Put optional arguments in list. + set(_argn_list "${ARGN}") + # If one of the given optional arguments is "PHONY", make a note of it, then + # remove it from the list. + list(FIND _argn_list "PHONY" _phony_idx) + if("${_phony_idx}" GREATER "-1") + set(_target_is_phony true) + list(REMOVE_AT _argn_list ${_phony_idx}) + else() + set(_target_is_phony false) + endif() + + # If CMake doesn't support separable compilation, complain + if(CUDA_SEPARABLE_COMPILATION AND CMAKE_VERSION VERSION_LESS "2.8.10.1") + message(SEND_ERROR "CUDA_SEPARABLE_COMPILATION isn't supported for CMake versions less than 2.8.10.1") + endif() + + # Set up all the command line flags here, so that they can be overridden on a per target basis. + + set(nvcc_flags "") + + # Emulation if the card isn't present. + if (CUDA_BUILD_EMULATION) + # Emulation. + set(nvcc_flags ${nvcc_flags} --device-emulation -D_DEVICEEMU -g) + else() + # Device mode. No flags necessary. + endif() + + if(CUDA_HOST_COMPILATION_CPP) + set(CUDA_C_OR_CXX CXX) + else() + if(CUDA_VERSION VERSION_LESS "3.0") + set(nvcc_flags ${nvcc_flags} --host-compilation C) + else() + message(WARNING "--host-compilation flag is deprecated in CUDA version >= 3.0. Removing --host-compilation C flag" ) + endif() + set(CUDA_C_OR_CXX C) + endif() + + set(generated_extension ${CMAKE_${CUDA_C_OR_CXX}_OUTPUT_EXTENSION}) + + if(CUDA_64_BIT_DEVICE_CODE) + set(nvcc_flags ${nvcc_flags} -m64) + else() + set(nvcc_flags ${nvcc_flags} -m32) + endif() + + if(CUDA_TARGET_CPU_ARCH) + set(nvcc_flags ${nvcc_flags} "--target-cpu-architecture=${CUDA_TARGET_CPU_ARCH}") + endif() + + # This needs to be passed in at this stage, because VS needs to fill out the + # various macros from within VS. Note that CCBIN is only used if + # -ccbin or --compiler-bindir isn't used and CUDA_HOST_COMPILER matches + # _CUDA_MSVC_HOST_COMPILER + if(CMAKE_GENERATOR MATCHES "Visual Studio") + set(ccbin_flags -D "\"CCBIN:PATH=${_CUDA_MSVC_HOST_COMPILER}\"" ) + else() + set(ccbin_flags) + endif() + + # Figure out which configure we will use and pass that in as an argument to + # the script. We need to defer the decision until compilation time, because + # for VS projects we won't know if we are making a debug or release build + # until build time. + if(CMAKE_GENERATOR MATCHES "Visual Studio") + set( CUDA_build_configuration "$(ConfigurationName)" ) + else() + set( CUDA_build_configuration "${CMAKE_BUILD_TYPE}") + endif() + + # Initialize our list of includes with the user ones followed by the CUDA system ones. + set(CUDA_NVCC_INCLUDE_DIRS ${CUDA_NVCC_INCLUDE_DIRS_USER} "${CUDA_INCLUDE_DIRS}") + if(_target_is_phony) + # If the passed in target name isn't a real target (i.e., this is from a call to one of the + # cuda_compile_* functions), need to query directory properties to get include directories + # and compile definitions. + get_directory_property(_dir_include_dirs INCLUDE_DIRECTORIES) + get_directory_property(_dir_compile_defs COMPILE_DEFINITIONS) + + list(APPEND CUDA_NVCC_INCLUDE_DIRS "${_dir_include_dirs}") + set(CUDA_NVCC_COMPILE_DEFINITIONS "${_dir_compile_defs}") + else() + # Append the include directories for this target via generator expression, which is + # expanded by the FILE(GENERATE) call below. This generator expression captures all + # include dirs set by the user, whether via directory properties or target properties + list(APPEND CUDA_NVCC_INCLUDE_DIRS "$") + + # Do the same thing with compile definitions + set(CUDA_NVCC_COMPILE_DEFINITIONS "$") + endif() + + + # Reset these variables + set(CUDA_WRAP_OPTION_NVCC_FLAGS) + foreach(config ${CUDA_configuration_types}) + string(TOUPPER ${config} config_upper) + set(CUDA_WRAP_OPTION_NVCC_FLAGS_${config_upper}) + endforeach() + + CUDA_GET_SOURCES_AND_OPTIONS(_cuda_wrap_sources _cuda_wrap_cmake_options _cuda_wrap_options ${_argn_list}) + CUDA_PARSE_NVCC_OPTIONS(CUDA_WRAP_OPTION_NVCC_FLAGS ${_cuda_wrap_options}) + + # Figure out if we are building a shared library. BUILD_SHARED_LIBS is + # respected in CUDA_ADD_LIBRARY. + set(_cuda_build_shared_libs FALSE) + # SHARED, MODULE + list(FIND _cuda_wrap_cmake_options SHARED _cuda_found_SHARED) + list(FIND _cuda_wrap_cmake_options MODULE _cuda_found_MODULE) + if(_cuda_found_SHARED GREATER -1 OR _cuda_found_MODULE GREATER -1) + set(_cuda_build_shared_libs TRUE) + endif() + # STATIC + list(FIND _cuda_wrap_cmake_options STATIC _cuda_found_STATIC) + if(_cuda_found_STATIC GREATER -1) + set(_cuda_build_shared_libs FALSE) + endif() + + # CUDA_HOST_FLAGS + if(_cuda_build_shared_libs) + # If we are setting up code for a shared library, then we need to add extra flags for + # compiling objects for shared libraries. + set(CUDA_HOST_SHARED_FLAGS ${CMAKE_SHARED_LIBRARY_${CUDA_C_OR_CXX}_FLAGS}) + else() + set(CUDA_HOST_SHARED_FLAGS) + endif() + # Only add the CMAKE_{C,CXX}_FLAGS if we are propagating host flags. We + # always need to set the SHARED_FLAGS, though. + if(CUDA_PROPAGATE_HOST_FLAGS) + set(_cuda_host_flags "set(CMAKE_HOST_FLAGS ${CMAKE_${CUDA_C_OR_CXX}_FLAGS} ${CUDA_HOST_SHARED_FLAGS})") + else() + set(_cuda_host_flags "set(CMAKE_HOST_FLAGS ${CUDA_HOST_SHARED_FLAGS})") + endif() + + set(_cuda_nvcc_flags_config "# Build specific configuration flags") + # Loop over all the configuration types to generate appropriate flags for run_nvcc.cmake + foreach(config ${CUDA_configuration_types}) + string(TOUPPER ${config} config_upper) + # CMAKE_FLAGS are strings and not lists. By not putting quotes around CMAKE_FLAGS + # we convert the strings to lists (like we want). + + if(CUDA_PROPAGATE_HOST_FLAGS) + # nvcc chokes on -g3 in versions previous to 3.0, so replace it with -g + set(_cuda_fix_g3 FALSE) + + if(CMAKE_COMPILER_IS_GNUCC) + if (CUDA_VERSION VERSION_LESS "3.0" OR + CUDA_VERSION VERSION_EQUAL "4.1" OR + CUDA_VERSION VERSION_EQUAL "4.2" + ) + set(_cuda_fix_g3 TRUE) + endif() + endif() + if(_cuda_fix_g3) + string(REPLACE "-g3" "-g" _cuda_C_FLAGS "${CMAKE_${CUDA_C_OR_CXX}_FLAGS_${config_upper}}") + else() + set(_cuda_C_FLAGS "${CMAKE_${CUDA_C_OR_CXX}_FLAGS_${config_upper}}") + endif() + + string(APPEND _cuda_host_flags "\nset(CMAKE_HOST_FLAGS_${config_upper} ${_cuda_C_FLAGS})") + endif() + + # Note that if we ever want CUDA_NVCC_FLAGS_ to be string (instead of a list + # like it is currently), we can remove the quotes around the + # ${CUDA_NVCC_FLAGS_${config_upper}} variable like the CMAKE_HOST_FLAGS_ variable. + string(APPEND _cuda_nvcc_flags_config "\nset(CUDA_NVCC_FLAGS_${config_upper} ${CUDA_NVCC_FLAGS_${config_upper}} ;; ${CUDA_WRAP_OPTION_NVCC_FLAGS_${config_upper}})") + endforeach() + + # Process the C++11 flag. If the host sets the flag, we need to add it to nvcc and + # remove it from the host. This is because -Xcompile -std=c++ will choke nvcc (it uses + # the C preprocessor). In order to get this to work correctly, we need to use nvcc's + # specific c++11 flag. + if( "${_cuda_host_flags}" MATCHES "-std=c\\+\\+11") + # Add the c++11 flag to nvcc if it isn't already present. Note that we only look at + # the main flag instead of the configuration specific flags. + if( NOT "${CUDA_NVCC_FLAGS}" MATCHES "-std=c\\+\\+11" ) + list(APPEND nvcc_flags --std c++11) + endif() + string(REGEX REPLACE "[-]+std=c\\+\\+11" "" _cuda_host_flags "${_cuda_host_flags}") + endif() + + if(_cuda_build_shared_libs) + list(APPEND nvcc_flags "-D${cuda_target}_EXPORTS") + endif() + + # Reset the output variable + set(_cuda_wrap_generated_files "") + + # Iterate over the macro arguments and create custom + # commands for all the .cu files. + foreach(file ${_argn_list}) + # Ignore any file marked as a HEADER_FILE_ONLY + get_source_file_property(_is_header ${file} HEADER_FILE_ONLY) + # Allow per source file overrides of the format. Also allows compiling non-.cu files. + get_source_file_property(_cuda_source_format ${file} CUDA_SOURCE_PROPERTY_FORMAT) + if((${file} MATCHES "\\.cu$" OR _cuda_source_format) AND NOT _is_header) + + if(NOT _cuda_source_format) + set(_cuda_source_format ${format}) + endif() + # If file isn't a .cu file, we need to tell nvcc to treat it as such. + if(NOT ${file} MATCHES "\\.cu$") + set(cuda_language_flag -x=cu) + else() + set(cuda_language_flag) + endif() + + if( ${_cuda_source_format} MATCHES "OBJ") + set( cuda_compile_to_external_module OFF ) + else() + set( cuda_compile_to_external_module ON ) + if( ${_cuda_source_format} MATCHES "PTX" ) + set( cuda_compile_to_external_module_type "ptx" ) + elseif( ${_cuda_source_format} MATCHES "CUBIN") + set( cuda_compile_to_external_module_type "cubin" ) + elseif( ${_cuda_source_format} MATCHES "FATBIN") + set( cuda_compile_to_external_module_type "fatbin" ) + else() + message( FATAL_ERROR "Invalid format flag passed to CUDA_WRAP_SRCS or set with CUDA_SOURCE_PROPERTY_FORMAT file property for file '${file}': '${_cuda_source_format}'. Use OBJ, PTX, CUBIN or FATBIN.") + endif() + endif() + + if(cuda_compile_to_external_module) + # Don't use any of the host compilation flags for PTX targets. + set(CUDA_HOST_FLAGS) + set(CUDA_NVCC_FLAGS_CONFIG) + else() + set(CUDA_HOST_FLAGS ${_cuda_host_flags}) + set(CUDA_NVCC_FLAGS_CONFIG ${_cuda_nvcc_flags_config}) + endif() + + # Determine output directory + cuda_compute_build_path("${file}" cuda_build_path) + set(cuda_compile_intermediate_directory "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${cuda_target}.dir/${cuda_build_path}") + if(CUDA_GENERATED_OUTPUT_DIR) + set(cuda_compile_output_dir "${CUDA_GENERATED_OUTPUT_DIR}") + else() + if ( cuda_compile_to_external_module ) + set(cuda_compile_output_dir "${CMAKE_CURRENT_BINARY_DIR}") + else() + set(cuda_compile_output_dir "${cuda_compile_intermediate_directory}") + endif() + endif() + + # Add a custom target to generate a c or ptx file. ###################### + + get_filename_component( basename ${file} NAME ) + if( cuda_compile_to_external_module ) + set(generated_file_path "${cuda_compile_output_dir}") + set(generated_file_basename "${cuda_target}_generated_${basename}.${cuda_compile_to_external_module_type}") + set(format_flag "-${cuda_compile_to_external_module_type}") + file(MAKE_DIRECTORY "${cuda_compile_output_dir}") + else() + set(generated_file_path "${cuda_compile_output_dir}/${CMAKE_CFG_INTDIR}") + set(generated_file_basename "${cuda_target}_generated_${basename}${generated_extension}") + if(CUDA_SEPARABLE_COMPILATION) + set(format_flag "-dc") + else() + set(format_flag "-c") + endif() + endif() + + # Set all of our file names. Make sure that whatever filenames that have + # generated_file_path in them get passed in through as a command line + # argument, so that the ${CMAKE_CFG_INTDIR} gets expanded at run time + # instead of configure time. + set(generated_file "${generated_file_path}/${generated_file_basename}") + set(cmake_dependency_file "${cuda_compile_intermediate_directory}/${generated_file_basename}.depend") + set(NVCC_generated_dependency_file "${cuda_compile_intermediate_directory}/${generated_file_basename}.NVCC-depend") + set(generated_cubin_file "${generated_file_path}/${generated_file_basename}.cubin.txt") + set(custom_target_script_pregen "${cuda_compile_intermediate_directory}/${generated_file_basename}.cmake.pre-gen") + set(custom_target_script "${cuda_compile_intermediate_directory}/${generated_file_basename}$<$>:.$>.cmake") + + # Setup properties for obj files: + if( NOT cuda_compile_to_external_module ) + set_source_files_properties("${generated_file}" + PROPERTIES + EXTERNAL_OBJECT true # This is an object file not to be compiled, but only be linked. + ) + endif() + + # Don't add CMAKE_CURRENT_SOURCE_DIR if the path is already an absolute path. + get_filename_component(file_path "${file}" PATH) + if(IS_ABSOLUTE "${file_path}") + set(source_file "${file}") + else() + set(source_file "${CMAKE_CURRENT_SOURCE_DIR}/${file}") + endif() + + if( NOT cuda_compile_to_external_module AND CUDA_SEPARABLE_COMPILATION) + list(APPEND ${cuda_target}_SEPARABLE_COMPILATION_OBJECTS "${generated_file}") + endif() + + # Bring in the dependencies. Creates a variable CUDA_NVCC_DEPEND ####### + cuda_include_nvcc_dependencies(${cmake_dependency_file}) + + # Convenience string for output ######################################### + if(CUDA_BUILD_EMULATION) + set(cuda_build_type "Emulation") + else() + set(cuda_build_type "Device") + endif() + + # Build the NVCC made dependency file ################################### + set(build_cubin OFF) + if ( NOT CUDA_BUILD_EMULATION AND CUDA_BUILD_CUBIN ) + if ( NOT cuda_compile_to_external_module ) + set ( build_cubin ON ) + endif() + endif() + + # Configure the build script + configure_file("${CUDA_run_nvcc}" "${custom_target_script_pregen}" @ONLY) + file(GENERATE + OUTPUT "${custom_target_script}" + INPUT "${custom_target_script_pregen}" + ) + + # So if a user specifies the same cuda file as input more than once, you + # can have bad things happen with dependencies. Here we check an option + # to see if this is the behavior they want. + if(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE) + set(main_dep MAIN_DEPENDENCY ${source_file}) + else() + set(main_dep DEPENDS ${source_file}) + endif() + + if(CUDA_VERBOSE_BUILD) + set(verbose_output ON) + elseif(CMAKE_GENERATOR MATCHES "Makefiles") + set(verbose_output "$(VERBOSE)") + else() + set(verbose_output OFF) + endif() + + # Create up the comment string + file(RELATIVE_PATH generated_file_relative_path "${CMAKE_BINARY_DIR}" "${generated_file}") + if(cuda_compile_to_external_module) + set(cuda_build_comment_string "Building NVCC ${cuda_compile_to_external_module_type} file ${generated_file_relative_path}") + else() + set(cuda_build_comment_string "Building NVCC (${cuda_build_type}) object ${generated_file_relative_path}") + endif() + + set(_verbatim VERBATIM) + if(ccbin_flags MATCHES "\\$\\(VCInstallDir\\)") + set(_verbatim "") + endif() + + # Build the generated file and dependency file ########################## + add_custom_command( + OUTPUT ${generated_file} + # These output files depend on the source_file and the contents of cmake_dependency_file + ${main_dep} + DEPENDS ${CUDA_NVCC_DEPEND} + DEPENDS ${custom_target_script} + # Make sure the output directory exists before trying to write to it. + COMMAND ${CMAKE_COMMAND} -E make_directory "${generated_file_path}" + COMMAND ${CMAKE_COMMAND} ARGS + -D verbose:BOOL=${verbose_output} + ${ccbin_flags} + -D build_configuration:STRING=${CUDA_build_configuration} + -D "generated_file:STRING=${generated_file}" + -D "generated_cubin_file:STRING=${generated_cubin_file}" + -P "${custom_target_script}" + WORKING_DIRECTORY "${cuda_compile_intermediate_directory}" + COMMENT "${cuda_build_comment_string}" + ${_verbatim} + ) + + # Make sure the build system knows the file is generated. + set_source_files_properties(${generated_file} PROPERTIES GENERATED TRUE) + + list(APPEND _cuda_wrap_generated_files ${generated_file}) + + # Add the other files that we want cmake to clean on a cleanup ########## + list(APPEND CUDA_ADDITIONAL_CLEAN_FILES "${cmake_dependency_file}") + list(REMOVE_DUPLICATES CUDA_ADDITIONAL_CLEAN_FILES) + set(CUDA_ADDITIONAL_CLEAN_FILES ${CUDA_ADDITIONAL_CLEAN_FILES} CACHE INTERNAL "List of intermediate files that are part of the cuda dependency scanning.") + + endif() + endforeach() + + # Set the return parameter + set(${generated_files} ${_cuda_wrap_generated_files}) +endmacro() + +function(_cuda_get_important_host_flags important_flags flag_string) + if(CMAKE_GENERATOR MATCHES "Visual Studio") + string(REGEX MATCHALL "/M[DT][d]?" flags "${flag_string}") + list(APPEND ${important_flags} ${flags}) + else() + string(REGEX MATCHALL "-fPIC" flags "${flag_string}") + list(APPEND ${important_flags} ${flags}) + endif() + set(${important_flags} ${${important_flags}} PARENT_SCOPE) +endfunction() + +############################################################################### +############################################################################### +# Separable Compilation Link +############################################################################### +############################################################################### + +# Compute the filename to be used by CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS +function(CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME output_file_var cuda_target object_files) + if (object_files) + set(generated_extension ${CMAKE_${CUDA_C_OR_CXX}_OUTPUT_EXTENSION}) + set(output_file "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${cuda_target}.dir/${CMAKE_CFG_INTDIR}/${cuda_target}_intermediate_link${generated_extension}") + else() + set(output_file) + endif() + + set(${output_file_var} "${output_file}" PARENT_SCOPE) +endfunction() + +# Setup the build rule for the separable compilation intermediate link file. +function(CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS output_file cuda_target options object_files) + if (object_files) + + set_source_files_properties("${output_file}" + PROPERTIES + EXTERNAL_OBJECT TRUE # This is an object file not to be compiled, but only + # be linked. + GENERATED TRUE # This file is generated during the build + ) + + # For now we are ignoring all the configuration specific flags. + set(nvcc_flags) + CUDA_PARSE_NVCC_OPTIONS(nvcc_flags ${options}) + if(CUDA_64_BIT_DEVICE_CODE) + list(APPEND nvcc_flags -m64) + else() + list(APPEND nvcc_flags -m32) + endif() + # If -ccbin, --compiler-bindir has been specified, don't do anything. Otherwise add it here. + list( FIND nvcc_flags "-ccbin" ccbin_found0 ) + list( FIND nvcc_flags "--compiler-bindir" ccbin_found1 ) + if( ccbin_found0 LESS 0 AND ccbin_found1 LESS 0 AND CUDA_HOST_COMPILER ) + # Match VERBATIM check below. + if(CUDA_HOST_COMPILER MATCHES "\\$\\(VCInstallDir\\)") + list(APPEND nvcc_flags -ccbin "\"${CUDA_HOST_COMPILER}\"") + else() + list(APPEND nvcc_flags -ccbin "${CUDA_HOST_COMPILER}") + endif() + endif() + + # Create a list of flags specified by CUDA_NVCC_FLAGS_${CONFIG} and CMAKE_${CUDA_C_OR_CXX}_FLAGS* + set(config_specific_flags) + set(flags) + foreach(config ${CUDA_configuration_types}) + string(TOUPPER ${config} config_upper) + # Add config specific flags + foreach(f ${CUDA_NVCC_FLAGS_${config_upper}}) + list(APPEND config_specific_flags $<$:${f}>) + endforeach() + set(important_host_flags) + _cuda_get_important_host_flags(important_host_flags "${CMAKE_${CUDA_C_OR_CXX}_FLAGS_${config_upper}}") + foreach(f ${important_host_flags}) + list(APPEND flags $<$:-Xcompiler> $<$:${f}>) + endforeach() + endforeach() + # Add CMAKE_${CUDA_C_OR_CXX}_FLAGS + set(important_host_flags) + _cuda_get_important_host_flags(important_host_flags "${CMAKE_${CUDA_C_OR_CXX}_FLAGS}") + foreach(f ${important_host_flags}) + list(APPEND flags -Xcompiler ${f}) + endforeach() + + # Add our general CUDA_NVCC_FLAGS with the configuration specifig flags + set(nvcc_flags ${CUDA_NVCC_FLAGS} ${config_specific_flags} ${nvcc_flags}) + + file(RELATIVE_PATH output_file_relative_path "${CMAKE_BINARY_DIR}" "${output_file}") + + # Some generators don't handle the multiple levels of custom command + # dependencies correctly (obj1 depends on file1, obj2 depends on obj1), so + # we work around that issue by compiling the intermediate link object as a + # pre-link custom command in that situation. + set(do_obj_build_rule TRUE) + if (MSVC_VERSION GREATER 1599 AND MSVC_VERSION LESS 1800) + # VS 2010 and 2012 have this problem. + set(do_obj_build_rule FALSE) + endif() + + set(_verbatim VERBATIM) + if(nvcc_flags MATCHES "\\$\\(VCInstallDir\\)") + set(_verbatim "") + endif() + + if (do_obj_build_rule) + add_custom_command( + OUTPUT ${output_file} + DEPENDS ${object_files} + COMMAND ${CUDA_NVCC_EXECUTABLE} ${nvcc_flags} -dlink ${object_files} -o ${output_file} + ${flags} + COMMENT "Building NVCC intermediate link file ${output_file_relative_path}" + COMMAND_EXPAND_LISTS + ${_verbatim} + ) + else() + get_filename_component(output_file_dir "${output_file}" DIRECTORY) + add_custom_command( + TARGET ${cuda_target} + PRE_LINK + COMMAND ${CMAKE_COMMAND} -E echo "Building NVCC intermediate link file ${output_file_relative_path}" + COMMAND ${CMAKE_COMMAND} -E make_directory "${output_file_dir}" + COMMAND ${CUDA_NVCC_EXECUTABLE} ${nvcc_flags} ${flags} -dlink ${object_files} -o "${output_file}" + COMMAND_EXPAND_LISTS + ${_verbatim} + ) + endif() + endif() +endfunction() + +############################################################################### +############################################################################### +# ADD LIBRARY +############################################################################### +############################################################################### +macro(CUDA_ADD_LIBRARY cuda_target) + + CUDA_ADD_CUDA_INCLUDE_ONCE() + + # Separate the sources from the options + CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN}) + CUDA_BUILD_SHARED_LIBRARY(_cuda_shared_flag ${ARGN}) + # Create custom commands and targets for each file. + CUDA_WRAP_SRCS( ${cuda_target} OBJ _generated_files ${_sources} + ${_cmake_options} ${_cuda_shared_flag} + OPTIONS ${_options} ) + + # Compute the file name of the intermedate link file used for separable + # compilation. + CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME(link_file ${cuda_target} "${${cuda_target}_SEPARABLE_COMPILATION_OBJECTS}") + + # Add the library. + add_library(${cuda_target} ${_cmake_options} + ${_generated_files} + ${_sources} + ${link_file} + ) + + # Add a link phase for the separable compilation if it has been enabled. If + # it has been enabled then the ${cuda_target}_SEPARABLE_COMPILATION_OBJECTS + # variable will have been defined. + CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS("${link_file}" ${cuda_target} "${_options}" "${${cuda_target}_SEPARABLE_COMPILATION_OBJECTS}") + + target_link_libraries(${cuda_target} ${CUDA_LINK_LIBRARIES_KEYWORD} + ${CUDA_LIBRARIES} + ) + + if(CUDA_SEPARABLE_COMPILATION) + target_link_libraries(${cuda_target} ${CUDA_LINK_LIBRARIES_KEYWORD} + ${CUDA_cudadevrt_LIBRARY} + ) + endif() + + # We need to set the linker language based on what the expected generated file + # would be. CUDA_C_OR_CXX is computed based on CUDA_HOST_COMPILATION_CPP. + set_target_properties(${cuda_target} + PROPERTIES + LINKER_LANGUAGE ${CUDA_C_OR_CXX} + ) + +endmacro() + + +############################################################################### +############################################################################### +# ADD EXECUTABLE +############################################################################### +############################################################################### +macro(CUDA_ADD_EXECUTABLE cuda_target) + + CUDA_ADD_CUDA_INCLUDE_ONCE() + + # Separate the sources from the options + CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN}) + # Create custom commands and targets for each file. + CUDA_WRAP_SRCS( ${cuda_target} OBJ _generated_files ${_sources} OPTIONS ${_options} ) + + # Compute the file name of the intermedate link file used for separable + # compilation. + CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME(link_file ${cuda_target} "${${cuda_target}_SEPARABLE_COMPILATION_OBJECTS}") + + # Add the library. + add_executable(${cuda_target} ${_cmake_options} + ${_generated_files} + ${_sources} + ${link_file} + ) + + # Add a link phase for the separable compilation if it has been enabled. If + # it has been enabled then the ${cuda_target}_SEPARABLE_COMPILATION_OBJECTS + # variable will have been defined. + CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS("${link_file}" ${cuda_target} "${_options}" "${${cuda_target}_SEPARABLE_COMPILATION_OBJECTS}") + + target_link_libraries(${cuda_target} ${CUDA_LINK_LIBRARIES_KEYWORD} + ${CUDA_LIBRARIES} + ) + + # We need to set the linker language based on what the expected generated file + # would be. CUDA_C_OR_CXX is computed based on CUDA_HOST_COMPILATION_CPP. + set_target_properties(${cuda_target} + PROPERTIES + LINKER_LANGUAGE ${CUDA_C_OR_CXX} + ) + +endmacro() + + +############################################################################### +############################################################################### +# (Internal) helper for manually added cuda source files with specific targets +############################################################################### +############################################################################### +macro(cuda_compile_base cuda_target format generated_files) + # Update a counter in this directory, to keep phony target names unique. + set(_cuda_target "${cuda_target}") + get_property(_counter DIRECTORY PROPERTY _cuda_internal_phony_counter) + if(_counter) + math(EXPR _counter "${_counter} + 1") + else() + set(_counter 1) + endif() + string(APPEND _cuda_target "_${_counter}") + set_property(DIRECTORY PROPERTY _cuda_internal_phony_counter ${_counter}) + + # Separate the sources from the options + CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN}) + + # Create custom commands and targets for each file. + CUDA_WRAP_SRCS( ${_cuda_target} ${format} _generated_files ${_sources} + ${_cmake_options} OPTIONS ${_options} PHONY) + + set( ${generated_files} ${_generated_files}) + +endmacro() + +############################################################################### +############################################################################### +# CUDA COMPILE +############################################################################### +############################################################################### +macro(CUDA_COMPILE generated_files) + cuda_compile_base(cuda_compile OBJ ${generated_files} ${ARGN}) +endmacro() + +############################################################################### +############################################################################### +# CUDA COMPILE PTX +############################################################################### +############################################################################### +macro(CUDA_COMPILE_PTX generated_files) + cuda_compile_base(cuda_compile_ptx PTX ${generated_files} ${ARGN}) +endmacro() + +############################################################################### +############################################################################### +# CUDA COMPILE FATBIN +############################################################################### +############################################################################### +macro(CUDA_COMPILE_FATBIN generated_files) + cuda_compile_base(cuda_compile_fatbin FATBIN ${generated_files} ${ARGN}) +endmacro() + +############################################################################### +############################################################################### +# CUDA COMPILE CUBIN +############################################################################### +############################################################################### +macro(CUDA_COMPILE_CUBIN generated_files) + cuda_compile_base(cuda_compile_cubin CUBIN ${generated_files} ${ARGN}) +endmacro() + + +############################################################################### +############################################################################### +# CUDA ADD CUFFT TO TARGET +############################################################################### +############################################################################### +macro(CUDA_ADD_CUFFT_TO_TARGET target) + if (CUDA_BUILD_EMULATION) + target_link_libraries(${target} ${CUDA_LINK_LIBRARIES_KEYWORD} ${CUDA_cufftemu_LIBRARY}) + else() + target_link_libraries(${target} ${CUDA_LINK_LIBRARIES_KEYWORD} ${CUDA_cufft_LIBRARY}) + endif() +endmacro() + +############################################################################### +############################################################################### +# CUDA ADD CUBLAS TO TARGET +############################################################################### +############################################################################### +macro(CUDA_ADD_CUBLAS_TO_TARGET target) + if (CUDA_BUILD_EMULATION) + target_link_libraries(${target} ${CUDA_LINK_LIBRARIES_KEYWORD} ${CUDA_cublasemu_LIBRARY}) + else() + target_link_libraries(${target} ${CUDA_LINK_LIBRARIES_KEYWORD} ${CUDA_cublas_LIBRARY} ${CUDA_cublas_device_LIBRARY}) + endif() +endmacro() + +############################################################################### +############################################################################### +# CUDA BUILD CLEAN TARGET +############################################################################### +############################################################################### +macro(CUDA_BUILD_CLEAN_TARGET) + # Call this after you add all your CUDA targets, and you will get a + # convenience target. You should also make clean after running this target + # to get the build system to generate all the code again. + + set(cuda_clean_target_name clean_cuda_depends) + if (CMAKE_GENERATOR MATCHES "Visual Studio") + string(TOUPPER ${cuda_clean_target_name} cuda_clean_target_name) + endif() + add_custom_target(${cuda_clean_target_name} + COMMAND ${CMAKE_COMMAND} -E rm -f ${CUDA_ADDITIONAL_CLEAN_FILES}) + + # Clear out the variable, so the next time we configure it will be empty. + # This is useful so that the files won't persist in the list after targets + # have been removed. + set(CUDA_ADDITIONAL_CLEAN_FILES "" CACHE INTERNAL "List of intermediate files that are part of the cuda dependency scanning.") +endmacro() diff --git a/vcpkg/ports/opencv3/portfile.cmake b/vcpkg/ports/opencv3/portfile.cmake new file mode 100644 index 0000000..f190376 --- /dev/null +++ b/vcpkg/ports/opencv3/portfile.cmake @@ -0,0 +1,404 @@ +if (EXISTS "${CURRENT_INSTALLED_DIR}/share/opencv2") + message(FATAL_ERROR "OpenCV 2 is installed, please uninstall and try again:\n vcpkg remove opencv2") +endif() + +if (EXISTS "${CURRENT_INSTALLED_DIR}/share/opencv4") + message(FATAL_ERROR "OpenCV 4 is installed, please uninstall and try again:\n vcpkg remove opencv4") +endif() + +set(OPENCV_VERSION "3.4.10") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO opencv/opencv + REF ${OPENCV_VERSION} + SHA512 7ccdc7fef26436b2f643cce2a13c9f9f77e56d3fd0340117419df3c1665ca12416277b626cce3c056fdc14899805bbe9ece391f11d28c6adea716d47ce8894bc + HEAD_REF master + PATCHES + 0001-disable-downloading.patch + 0002-install-options.patch + 0003-force-package-requirements.patch + 0009-fix-uwp.patch +) + +file(REMOVE "${SOURCE_PATH}/cmake/FindCUDNN.cmake") +file(REMOVE "${SOURCE_PATH}/cmake/FindCUDA.cmake") +file(REMOVE_RECURSE "${SOURCE_PATH}/cmake/FindCUDA") +file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindCUDA.cmake DESTINATION ${SOURCE_PATH}/cmake/) # backported from CMake 3.18, remove when released + +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_WITH_STATIC_CRT) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + "contrib" WITH_CONTRIB + "cuda" WITH_CUDA + "cuda" WITH_CUBLAS + "dnn" BUILD_opencv_dnn + "eigen" WITH_EIGEN + "ffmpeg" WITH_FFMPEG + "flann" BUILD_opencv_flann + "gdcm" WITH_GDCM + "halide" WITH_HALIDE + "jasper" WITH_JASPER + "jpeg" WITH_JPEG + "nonfree" OPENCV_ENABLE_NONFREE + "openexr" WITH_OPENEXR + "opengl" WITH_OPENGL + "png" WITH_PNG + "qt" WITH_QT + "sfm" BUILD_opencv_sfm + "tiff" WITH_TIFF + "webp" WITH_WEBP + "world" BUILD_opencv_world +) + +# Cannot use vcpkg_check_features() for "dnn", "ipp", ovis", "tbb", and "vtk". +# As the respective value of their variables can be unset conditionally. +set(BUILD_opencv_dnn OFF) +if("dnn" IN_LIST FEATURES) + if(NOT VCPKG_TARGET_IS_ANDROID) + set(BUILD_opencv_dnn ON) + else() + message(WARNING "The dnn module cannot be enabled on Android") + endif() +endif() + +set(WITH_IPP OFF) +if("ipp" IN_LIST FEATURES) + set(WITH_IPP ON) +endif() + +set(BUILD_opencv_ovis OFF) +if("ovis" IN_LIST FEATURES) + set(BUILD_opencv_ovis ON) +endif() + +set(WITH_TBB OFF) +if("tbb" IN_LIST FEATURES) + set(WITH_TBB ON) +endif() + +set(WITH_VTK OFF) +if("vtk" IN_LIST FEATURES) + set(WITH_VTK ON) +endif() + +if("dnn" IN_LIST FEATURES) + vcpkg_download_distfile(TINYDNN_ARCHIVE + URLS "https://github.com/tiny-dnn/tiny-dnn/archive/v1.0.0a3.tar.gz" + FILENAME "opencv-cache/tiny_dnn/adb1c512e09ca2c7a6faef36f9c53e59-v1.0.0a3.tar.gz" + SHA512 5f2c1a161771efa67e85b1fea395953b7744e29f61187ac5a6c54c912fb195b3aef9a5827135c3668bd0eeea5ae04a33cc433e1f6683e2b7955010a2632d168b + ) +endif() + +# Build image quality module when building with 'contrib' feature and not UWP. +set(BUILD_opencv_quality OFF) +if("contrib" IN_LIST FEATURES) + if (VCPKG_TARGET_IS_UWP) + set(BUILD_opencv_quality OFF) + message(WARNING "The image quality module (quality) does not build for UWP, the module has been disabled.") + # The hdf module is silently disabled by OpenCVs buildsystem if HDF5 is not detected. + message(WARNING "The hierarchical data format module (hdf) depends on HDF5 which doesn't support UWP, the module has been disabled.") + else() + set(BUILD_opencv_quality CMAKE_DEPENDS_IN_PROJECT_ONLY) + endif() + + vcpkg_from_github( + OUT_SOURCE_PATH CONTRIB_SOURCE_PATH + REPO opencv/opencv_contrib + REF ${OPENCV_VERSION} + SHA512 70b4ecfaf9881390ad826a2aba24cced8514a680965ec7151df9926082fff53364bbe6be36458bb9ff466fda6f6f6ca2174eeac94c10a6bada989f07ed1c4da1 + HEAD_REF master + PATCHES + 0004-add-missing-stdexcept-include.patch + ) + set(BUILD_WITH_CONTRIB_FLAG "-DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules") + + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/8afa57abc8229d611c4937165d20e2a2d9fc5a12/face_landmark_model.dat" + FILENAME "opencv-cache/data/7505c44ca4eb54b4ab1e4777cb96ac05-face_landmark_model.dat" + SHA512 c16e60a6c4bb4de3ab39b876ae3c3f320ea56f69c93e9303bd2dff8760841dcd71be4161fff8bc71e8fe4fe8747fa8465d49d6bd8f5ebcdaea161f4bc2da7c93 + ) + + function(download_opencv_3rdparty ID COMMIT HASH) + if(NOT EXISTS "${DOWNLOADS}/opencv-cache/${ID}/${COMMIT}.stamp") + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://github.com/opencv/opencv_3rdparty/archive/${COMMIT}.zip" + FILENAME "opencv_3rdparty-${COMMIT}.zip" + SHA512 ${HASH} + ) + vcpkg_extract_source_archive(${OCV_DOWNLOAD}) + file(MAKE_DIRECTORY "${DOWNLOADS}/opencv-cache/${ID}") + file(GLOB XFEATURES2D_I ${CURRENT_BUILDTREES_DIR}/src/opencv_3rdparty-${COMMIT}/*) + foreach(FILE ${XFEATURES2D_I}) + file(COPY ${FILE} DESTINATION "${DOWNLOADS}/opencv-cache/${ID}") + get_filename_component(XFEATURES2D_I_NAME "${FILE}" NAME) + file(MD5 "${FILE}" FILE_HASH) + file(RENAME "${DOWNLOADS}/opencv-cache/${ID}/${XFEATURES2D_I_NAME}" "${DOWNLOADS}/opencv-cache/${ID}/${FILE_HASH}-${XFEATURES2D_I_NAME}") + endforeach() + file(WRITE "${DOWNLOADS}/opencv-cache/${ID}/${COMMIT}.stamp") + endif() + endfunction() + + # Used for opencv's xfeature2d module + download_opencv_3rdparty( + xfeatures2d/boostdesc + 34e4206aef44d50e6bbcd0ab06354b52e7466d26 + 2ccdc8fb59da55eabc73309a80a4d3b1e73e2341027cdcdd2d714e0f519e60f243f38f79b13ed3de32f595aa23e4f86418eed42e741f32a81b1e6e0879190601 + ) + + # Used for opencv's xfeature2d module + download_opencv_3rdparty( + xfeatures2d/vgg + fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d + 7051f5d6ccb938d296b919dd6d5dcddc5afb527aed456639c9984276a8f64565c084d96a72499a7756f127f8d2b1ce9ab70e4cbb3f89c4e16f82296c2a15daed + ) +endif() + +if(WITH_IPP) + if(VCPKG_TARGET_IS_OSX) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/a56b6ac6f030c312b2dce17430eef13aed9af274/ippicv/ippicv_2020_mac_intel64_20191018_general.tgz" + FILENAME "opencv-cache/ippicv/1c3d675c2a2395d094d523024896e01b-ippicv_2020_mac_intel64_20191018_general.tgz" + SHA512 454dfaaa245e3a3b2f1ffb1aa8e27e280b03685009d66e147482b14e5796fdf2d332cac0f9b0822caedd5760fda4ee0ce2961889597456bbc18202f10bf727cd + ) + else() + message(WARNING "This target architecture is not supported IPPICV") + set(WITH_IPP OFF) + endif() + elseif(VCPKG_TARGET_IS_LINUX) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/a56b6ac6f030c312b2dce17430eef13aed9af274/ippicv/ippicv_2020_lnx_intel64_20191018_general.tgz" + FILENAME "opencv-cache/ippicv/7421de0095c7a39162ae13a6098782f9-ippicv_2020_lnx_intel64_20191018_general.tgz" + SHA512 de6d80695cd6deef359376476edc4ff85fdddcf94972b936e0017f8a48aaa5d18f55c4253ae37deb83bff2f71410f68408063c88b5f3bf4df3c416aa93ceca87 + ) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/a56b6ac6f030c312b2dce17430eef13aed9af274/ippicv/ippicv_2020_lnx_ia32_20191018_general.tgz" + FILENAME "opencv-cache/ippicv/ad189a940fb60eb71f291321322fe3e8-ippicv_2020_lnx_ia32_20191018_general.tgz" + SHA512 5ca9dafc3a634e2a5f83f6a498611c990ef16d54358e9b44574b01694e9d64b118d46d6e2011506e40d37e5a9865f576f790e37ff96b7c8b503507633631a296 + ) + else() + message(WARNING "This target architecture is not supported IPPICV") + set(WITH_IPP OFF) + endif() + elseif(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/a56b6ac6f030c312b2dce17430eef13aed9af274/ippicv/ippicv_2020_win_intel64_20191018_general.zip" + FILENAME "opencv-cache/ippicv/879741a7946b814455eee6c6ffde2984-ippicv_2020_win_intel64_20191018_general.zip" + SHA512 50c4af4b7fe2161d652264230389dad2330e8c95b734d04fb7565bffdab855c06d43085e480da554c56b04f8538087d49503538d5943221ee2a772ee7be4c93c + ) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/a56b6ac6f030c312b2dce17430eef13aed9af274/ippicv/ippicv_2020_win_ia32_20191018_general.zip" + FILENAME "opencv-cache/ippicv/cd39bdf0c2e1cac9a61101dad7a2413e-ippicv_2020_win_ia32_20191018_general.zip" + SHA512 058d00775d9f16955c7a557d554b8c2976ab9dbad4ba3fdb9823c0f768809edbd835e4397f01dc090a9bc80d81de834375e7006614d2a898f42e8004de0e04bf + ) + else() + message(WARNING "This target architecture is not supported IPPICV") + set(WITH_IPP OFF) + endif() + else() + message(WARNING "This target architecture is not supported IPPICV") + set(WITH_IPP OFF) + endif() +endif() + +set(WITH_MSMF ON) +if(NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) + set(WITH_MSMF OFF) +endif() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + if (WITH_TBB) + message(WARNING "TBB is currently unsupported in this build configuration, turning it off") + set(WITH_TBB OFF) + endif() + + if (WITH_VTK) + message(WARNING "VTK is currently unsupported in this build configuration, turning it off") + set(WITH_VTK OFF) + endif() + + if (VCPKG_TARGET_IS_WINDOWS AND BUILD_opencv_ovis) + message(WARNING "OVIS is currently unsupported in this build configuration, turning it off") + set(BUILD_opencv_ovis OFF) + endif() +endif() + +if("ffmpeg" IN_LIST FEATURES) + if(VCPKG_TARGET_IS_UWP) + set(VCPKG_C_FLAGS "/sdl- ${VCPKG_C_FLAGS}") + set(VCPKG_CXX_FLAGS "/sdl- ${VCPKG_CXX_FLAGS}") + endif() +endif() + +if("qt" IN_LIST FEATURES) + list(APPEND ADDITIONAL_BUILD_FLAGS "-DCMAKE_AUTOMOC=ON") +endif() + +set(BUILD_opencv_line_descriptor ON) +set(BUILD_opencv_saliency ON) +set(BUILD_opencv_bgsegm ON) +if(VCPKG_TARGET_ARCHITECTURE MATCHES "arm") + set(BUILD_opencv_line_descriptor OFF) + set(BUILD_opencv_saliency OFF) + set(BUILD_opencv_bgsegm OFF) +endif() + +vcpkg_configure_cmake( + PREFER_NINJA + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DOPENCV_CUDA_FORCE_BUILTIN_CMAKE_MODULE=ON #to use custom module with fixes for CUDA 11 compat, waiting for CMake support + ###### ocv_options + -DOpenCV_INSTALL_BINARIES_PREFIX= + -DOPENCV_BIN_INSTALL_PATH=bin + -DOPENCV_INCLUDE_INSTALL_PATH=include + -DOPENCV_LIB_INSTALL_PATH=lib + -DOPENCV_3P_LIB_INSTALL_PATH=lib + -DOPENCV_CONFIG_INSTALL_PATH=share/opencv + -DINSTALL_TO_MANGLED_PATHS=OFF + -DOPENCV_FFMPEG_USE_FIND_PACKAGE=FFMPEG + -DCMAKE_DEBUG_POSTFIX=d + -DOPENCV_DLLVERSION= + -DOPENCV_DEBUG_POSTFIX=d + -DOPENCV_GENERATE_SETUPVARS=OFF + # Do not build docs/examples + -DBUILD_DOCS=OFF + -DBUILD_EXAMPLES=OFF + ###### Disable build 3rd party libs + -DBUILD_JASPER=OFF + -DBUILD_JPEG=OFF + -DBUILD_OPENEXR=OFF + -DBUILD_PNG=OFF + -DBUILD_TIFF=OFF + -DBUILD_WEBP=OFF + -DBUILD_ZLIB=OFF + -DBUILD_TBB=OFF + -DBUILD_IPP_IW=OFF + -DBUILD_ITT=OFF + ###### Disable build 3rd party components + -DBUILD_PROTOBUF=OFF + ###### OpenCV Build components + -DBUILD_opencv_apps=OFF + -DBUILD_opencv_bgsegm=${BUILD_opencv_bgsegm} + -DBUILD_opencv_line_descriptor=${BUILD_opencv_line_descriptor} + -DBUILD_opencv_saliency=${BUILD_opencv_saliency} + -DBUILD_ANDROID_PROJECT=OFF + -DBUILD_ANDROID_EXAMPLES=OFF + -DBUILD_PACKAGE=OFF + -DBUILD_PERF_TESTS=OFF + -DBUILD_TESTS=OFF + -DBUILD_WITH_DEBUG_INFO=ON + -DBUILD_WITH_STATIC_CRT=${BUILD_WITH_STATIC_CRT} + -DBUILD_JAVA=OFF + -DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR} + ###### PROTOBUF + -DPROTOBUF_UPDATE_FILES=ON + -DUPDATE_PROTO_FILES=ON + ###### PYLINT/FLAKE8 + -DENABLE_PYLINT=OFF + -DENABLE_FLAKE8=OFF + # CMAKE + -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON + -DCMAKE_DISABLE_FIND_PACKAGE_JNI=ON + # ENABLE + -DENABLE_CXX11=ON + ###### OPENCV vars + "-DOPENCV_DOWNLOAD_PATH=${DOWNLOADS}/opencv-cache" + ${BUILD_WITH_CONTRIB_FLAG} + -DOPENCV_OTHER_INSTALL_PATH=share/opencv + ###### customized properties + ## Options from vcpkg_check_features() + ${FEATURE_OPTIONS} + -DCMAKE_DISABLE_FIND_PACKAGE_Halide=ON + -DHALIDE_ROOT_DIR=${CURRENT_INSTALLED_DIR} + -DWITH_GTK=OFF + -DWITH_IPP=${WITH_IPP} + -DWITH_MATLAB=OFF + -DWITH_MSMF=${WITH_MSMF} + -DWITH_OPENMP=OFF + -DWITH_PROTOBUF=ON + -DWITH_OPENCLAMDBLAS=OFF + -DWITH_TBB=${WITH_TBB} + -DWITH_VTK=${WITH_VTK} + -DWITH_OPENJPEG=OFF + ###### WITH PROPERTIES explicitly disabled, they have problems with libraries if already installed by user and that are "involuntarily" found during install + -DWITH_LAPACK=OFF + ###### BUILD_options (mainly modules which require additional libraries) + -DBUILD_opencv_ovis=${BUILD_opencv_ovis} + -DBUILD_opencv_dnn=${BUILD_opencv_dnn} + ###### The following modules are disabled for UWP + -DBUILD_opencv_quality=${BUILD_opencv_quality} + ###### Additional build flags + ${ADDITIONAL_BUILD_FLAGS} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH "share/opencv" TARGET_PATH "share/opencv") +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(READ ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake OPENCV_MODULES) + string(REPLACE "set(CMAKE_IMPORT_FILE_VERSION 1)" + "set(CMAKE_IMPORT_FILE_VERSION 1) +find_package(Protobuf REQUIRED) +if(Protobuf_FOUND) + if(TARGET protobuf::libprotobuf) + add_library(libprotobuf INTERFACE IMPORTED) + set_target_properties(libprotobuf PROPERTIES + INTERFACE_LINK_LIBRARIES protobuf::libprotobuf + ) + else() + add_library(libprotobuf UNKNOWN IMPORTED) + set_target_properties(libprotobuf PROPERTIES + IMPORTED_LOCATION \"${Protobuf_LIBRARY}\" + INTERFACE_INCLUDE_DIRECTORIES \"${Protobuf_INCLUDE_DIR}\" + INTERFACE_SYSTEM_INCLUDE_DIRECTORIES \"${Protobuf_INCLUDE_DIR}\" + ) + endif() +endif() +find_package(CUDA QUIET) +find_package(Threads QUIET) +find_package(TIFF QUIET) +find_package(HDF5 QUIET) +find_package(Freetype QUIET) +find_package(Ogre QUIET) +find_package(gflags QUIET) +find_package(Ceres QUIET) +find_package(ade QUIET) +find_package(VTK QUIET) +find_package(OpenMP QUIET) +find_package(Tesseract QUIET) +find_package(OpenEXR QUIET) +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +find_package(Qt5 COMPONENTS OpenGL Concurrent Test QUIET) +find_package(GDCM QUIET)" OPENCV_MODULES "${OPENCV_MODULES}") + + if(BUILD_opencv_ovis) + string(REPLACE "OgreGLSupportStatic" + "OgreGLSupport" OPENCV_MODULES "${OPENCV_MODULES}") + endif() + + file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake "${OPENCV_MODULES}") + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE ${CURRENT_PACKAGES_DIR}/LICENSE) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/LICENSE) + +if(VCPKG_TARGET_IS_ANDROID) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/README.android) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/README.android) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/opencv4/0001-disable-downloading.patch b/vcpkg/ports/opencv4/0001-disable-downloading.patch new file mode 100644 index 0000000..41131c6 --- /dev/null +++ b/vcpkg/ports/opencv4/0001-disable-downloading.patch @@ -0,0 +1,14 @@ +diff --git a/cmake/OpenCVDownload.cmake b/cmake/OpenCVDownload.cmake +index 63cf6d3..01e84a5 100644 +--- a/cmake/OpenCVDownload.cmake ++++ b/cmake/OpenCVDownload.cmake +@@ -157,6 +157,9 @@ function(ocv_download) + # Download + if(NOT EXISTS "${CACHE_CANDIDATE}") + ocv_download_log("#cmake_download \"${CACHE_CANDIDATE}\" \"${DL_URL}\"") ++ string(REPLACE "${OPENCV_DOWNLOAD_PATH}/" "opencv-cache/" CACHE_SUBPATH "${CACHE_CANDIDATE}") ++ message(FATAL_ERROR " Downloads are not permitted during configure. Please pre-download the file \"${CACHE_CANDIDATE}\":\n \n vcpkg_download_distfile(OCV_DOWNLOAD\n URLS \"${DL_URL}\"\n FILENAME \"${CACHE_SUBPATH}\"\n SHA512 0\n )") ++ + foreach(try ${OPENCV_DOWNLOAD_TRIES_LIST}) + ocv_download_log("#try ${try}") + file(DOWNLOAD "${DL_URL}" "${CACHE_CANDIDATE}" diff --git a/vcpkg/ports/opencv4/0002-install-options.patch b/vcpkg/ports/opencv4/0002-install-options.patch new file mode 100644 index 0000000..9707a6a --- /dev/null +++ b/vcpkg/ports/opencv4/0002-install-options.patch @@ -0,0 +1,65 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4c0b388..16c0ede 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -594,7 +594,7 @@ endif() + ocv_cmake_hook(POST_CMAKE_BUILD_OPTIONS) + + # --- Python Support --- +-if(NOT IOS) ++if(0) + include(cmake/OpenCVDetectPython.cmake) + endif() + +diff --git a/cmake/OpenCVCompilerOptions.cmake b/cmake/OpenCVCompilerOptions.cmake +index 87b2161..5192875 100644 +--- a/cmake/OpenCVCompilerOptions.cmake ++++ b/cmake/OpenCVCompilerOptions.cmake +@@ -263,7 +263,6 @@ if(MSVC) + #endif() + + if(BUILD_WITH_DEBUG_INFO) +- set(OPENCV_EXTRA_FLAGS_RELEASE "${OPENCV_EXTRA_FLAGS_RELEASE} /Zi") + set(OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE "${OPENCV_EXTRA_EXE_LINKER_FLAGS_RELEASE} /debug") + set(OPENCV_EXTRA_SHARED_LINKER_FLAGS_RELEASE "${OPENCV_EXTRA_SHARED_LINKER_FLAGS_RELEASE} /debug") + endif() +diff --git a/cmake/OpenCVGenConfig.cmake b/cmake/OpenCVGenConfig.cmake +index 6991289..3a691c5 100644 +--- a/cmake/OpenCVGenConfig.cmake ++++ b/cmake/OpenCVGenConfig.cmake +@@ -109,11 +109,11 @@ function(ocv_gen_config TMP_DIR NESTED_PATH ROOT_NAME) + endif() + endfunction() + +-if((CMAKE_HOST_SYSTEM_NAME MATCHES "Linux" OR UNIX) AND NOT ANDROID) ++if(TRUE) + ocv_gen_config("${CMAKE_BINARY_DIR}/unix-install" "" "") + endif() + +-if(ANDROID) ++if(FALSE) + ocv_gen_config("${CMAKE_BINARY_DIR}/unix-install" "abi-${ANDROID_NDK_ABI_NAME}" "OpenCVConfig.root-ANDROID.cmake.in") + install(FILES "${OpenCV_SOURCE_DIR}/platforms/android/android.toolchain.cmake" DESTINATION "${OPENCV_CONFIG_INSTALL_PATH}" COMPONENT dev) + endif() +@@ -121,7 +121,7 @@ endif() + # -------------------------------------------------------------------------------------------- + # Part 3/3: ${BIN_DIR}/win-install/OpenCVConfig.cmake -> For use within binary installers/packages + # -------------------------------------------------------------------------------------------- +-if(WIN32) ++if(0) + if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows AND NOT OPENCV_SKIP_CMAKE_ROOT_CONFIG) + ocv_gen_config("${CMAKE_BINARY_DIR}/win-install" + "${OPENCV_INSTALL_BINARIES_PREFIX}${OPENCV_INSTALL_BINARIES_SUFFIX}" +diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt +index 1f0d720..0bb1ff7 100644 +--- a/data/CMakeLists.txt ++++ b/data/CMakeLists.txt +@@ -1,8 +1,6 @@ + file(GLOB HAAR_CASCADES haarcascades/*.xml) + file(GLOB LBP_CASCADES lbpcascades/*.xml) + +-install(FILES ${HAAR_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/haarcascades COMPONENT libs) +-install(FILES ${LBP_CASCADES} DESTINATION ${OPENCV_OTHER_INSTALL_PATH}/lbpcascades COMPONENT libs) + + if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH) + install(DIRECTORY "${OPENCV_TEST_DATA_PATH}/" DESTINATION "${OPENCV_TEST_DATA_INSTALL_PATH}" COMPONENT "tests") diff --git a/vcpkg/ports/opencv4/0003-force-package-requirements.patch b/vcpkg/ports/opencv4/0003-force-package-requirements.patch new file mode 100644 index 0000000..b25668b --- /dev/null +++ b/vcpkg/ports/opencv4/0003-force-package-requirements.patch @@ -0,0 +1,121 @@ +diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake +index 0beaf19..3ba1ebd 100644 +--- a/cmake/OpenCVFindLibsGrfmt.cmake ++++ b/cmake/OpenCVFindLibsGrfmt.cmake +@@ -6,7 +6,7 @@ + if(BUILD_ZLIB) + ocv_clear_vars(ZLIB_FOUND) + else() +- find_package(ZLIB "${MIN_VER_ZLIB}") ++ find_package(ZLIB "${MIN_VER_ZLIB}" REQUIRED) + if(ZLIB_FOUND AND ANDROID) + if(ZLIB_LIBRARIES MATCHES "/usr/(lib|lib32|lib64)/libz.so$") + set(ZLIB_LIBRARIES z) +@@ -30,7 +30,7 @@ if(WITH_JPEG) + if(BUILD_JPEG) + ocv_clear_vars(JPEG_FOUND) + else() +- include(FindJPEG) ++ find_package(JPEG REQUIRED) + endif() + + if(NOT JPEG_FOUND) +@@ -74,7 +74,7 @@ if(WITH_TIFF) + if(BUILD_TIFF) + ocv_clear_vars(TIFF_FOUND) + else() +- include(FindTIFF) ++ find_package(TIFF REQUIRED) + if(TIFF_FOUND) + ocv_parse_header("${TIFF_INCLUDE_DIR}/tiff.h" TIFF_VERSION_LINES TIFF_VERSION_CLASSIC TIFF_VERSION_BIG TIFF_VERSION TIFF_BIGTIFF_VERSION) + endif() +@@ -117,7 +117,7 @@ if(WITH_WEBP) + if(BUILD_WEBP) + ocv_clear_vars(WEBP_FOUND WEBP_LIBRARY WEBP_LIBRARIES WEBP_INCLUDE_DIR) + else() +- include(cmake/OpenCVFindWebP.cmake) ++ find_package(WebP REQUIRED) + if(WEBP_FOUND) + set(HAVE_WEBP 1) + endif() +@@ -173,7 +173,7 @@ if(WITH_JASPER AND NOT HAVE_OPENJPEG) + if(BUILD_JASPER) + ocv_clear_vars(JASPER_FOUND) + else() +- include(FindJasper) ++ find_package(Jasper REQUIRED) + endif() + + if(NOT JASPER_FOUND) +@@ -197,7 +197,7 @@ if(WITH_PNG) + if(BUILD_PNG) + ocv_clear_vars(PNG_FOUND) + else() +- include(FindPNG) ++ find_package(PNG REQUIRED) + if(PNG_FOUND) + include(CheckIncludeFile) + check_include_file("${PNG_PNG_INCLUDE_DIR}/libpng/png.h" HAVE_LIBPNG_PNG_H) +@@ -228,7 +228,7 @@ endif() + if(WITH_OPENEXR) + ocv_clear_vars(HAVE_OPENEXR) + if(NOT BUILD_OPENEXR) +- include("${OpenCV_SOURCE_DIR}/cmake/OpenCVFindOpenEXR.cmake") ++ find_package(OpenEXR REQUIRED) + endif() + + if(OPENEXR_FOUND) +@@ -246,7 +246,7 @@ endif() + + # --- GDAL (optional) --- + if(WITH_GDAL) +- find_package(GDAL QUIET) ++ find_package(GDAL REQUIRED) + + if(NOT GDAL_FOUND) + set(HAVE_GDAL NO) +@@ -258,7 +258,7 @@ if(WITH_GDAL) + endif() + + if (WITH_GDCM) +- find_package(GDCM QUIET) ++ find_package(GDCM REQUIRED) + if(NOT GDCM_FOUND) + set(HAVE_GDCM NO) + ocv_clear_vars(GDCM_VERSION GDCM_LIBRARIES) +diff --git a/cmake/OpenCVFindLibsPerf.cmake b/cmake/OpenCVFindLibsPerf.cmake +index b9b1a95..596c152 100644 +--- a/cmake/OpenCVFindLibsPerf.cmake ++++ b/cmake/OpenCVFindLibsPerf.cmake +@@ -51,14 +51,9 @@ endif(WITH_CUDA) + + # --- Eigen --- + if(WITH_EIGEN AND NOT HAVE_EIGEN) +- find_package(Eigen3 QUIET) ++ find_package(Eigen3 REQUIRED) + + if(Eigen3_FOUND) +- if(TARGET Eigen3::Eigen) +- # Use Eigen3 imported target if possible +- list(APPEND OPENCV_LINKER_LIBS Eigen3::Eigen) +- set(HAVE_EIGEN 1) +- else() + if(DEFINED EIGEN3_INCLUDE_DIRS) + set(EIGEN_INCLUDE_PATH ${EIGEN3_INCLUDE_DIRS}) + set(HAVE_EIGEN 1) +@@ -66,7 +61,6 @@ if(WITH_EIGEN AND NOT HAVE_EIGEN) + set(EIGEN_INCLUDE_PATH ${EIGEN3_INCLUDE_DIR}) + set(HAVE_EIGEN 1) + endif() +- endif() + if(HAVE_EIGEN) + if(DEFINED EIGEN3_WORLD_VERSION) # CMake module + set(EIGEN_WORLD_VERSION ${EIGEN3_WORLD_VERSION}) +@@ -77,6 +71,7 @@ if(WITH_EIGEN AND NOT HAVE_EIGEN) + set(EIGEN_MAJOR_VERSION ${EIGEN3_VERSION_MINOR}) + set(EIGEN_MINOR_VERSION ${EIGEN3_VERSION_PATCH}) + endif() ++ ocv_include_directories(${EIGEN_INCLUDE_PATH}) + endif() + endif() + diff --git a/vcpkg/ports/opencv4/0004-fix-policy-CMP0057.patch b/vcpkg/ports/opencv4/0004-fix-policy-CMP0057.patch new file mode 100644 index 0000000..7f0f0c0 --- /dev/null +++ b/vcpkg/ports/opencv4/0004-fix-policy-CMP0057.patch @@ -0,0 +1,9 @@ +diff --git a/modules/videoio/CMakeLists.txt b/modules/videoio/CMakeLists.txt +index c1c6754..360aa6b 100644 +--- a/modules/videoio/CMakeLists.txt ++++ b/modules/videoio/CMakeLists.txt +@@ -1,3 +1,4 @@ ++cmake_minimum_required(VERSION 3.3) + set(VIDEOIO_PLUGIN_LIST "" CACHE STRING "List of videoio backends to be compiled as plugins (ffmpeg, gstreamer)") + set(VIDEOIO_ENABLE_PLUGINS "ON" CACHE BOOL "Allow building videoio plugin support") + set(VIDEOIO_ENABLE_STRICT_PLUGIN_CHECK "ON" CACHE BOOL "Make sure OpenCV version is the same in plugin and host code") diff --git a/vcpkg/ports/opencv4/0005-add-missing-stdexcept-include.patch b/vcpkg/ports/opencv4/0005-add-missing-stdexcept-include.patch new file mode 100644 index 0000000..4f0df7d --- /dev/null +++ b/vcpkg/ports/opencv4/0005-add-missing-stdexcept-include.patch @@ -0,0 +1,12 @@ +diff --git a/modules/cvv/src/util/observer_ptr.hpp b/modules/cvv/src/util/observer_ptr.hpp +index fef3fea..68d1a80 100644 +--- a/modules/cvv/src/util/observer_ptr.hpp ++++ b/modules/cvv/src/util/observer_ptr.hpp +@@ -11,6 +11,7 @@ + #include //size_t + #include // [u]intXX_t + #include // since some people like to forget that one ++#include + + namespace cvv + { diff --git a/vcpkg/ports/opencv4/0009-fix-uwp.patch b/vcpkg/ports/opencv4/0009-fix-uwp.patch new file mode 100644 index 0000000..1c40cf1 --- /dev/null +++ b/vcpkg/ports/opencv4/0009-fix-uwp.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/OpenCVModule.cmake b/cmake/OpenCVModule.cmake +index 9053957..d2b6412 100644 +--- a/cmake/OpenCVModule.cmake ++++ b/cmake/OpenCVModule.cmake +@@ -1196,7 +1196,7 @@ function(ocv_add_perf_tests) + set_target_properties(${the_target} PROPERTIES FOLDER "tests performance") + endif() + +- if(WINRT) ++ if(WINRT AND BUILD_TESTS) + # removing APPCONTAINER from tests to run from console + # look for detailed description inside of ocv_create_module macro above + add_custom_command(TARGET "opencv_perf_${name}" diff --git a/vcpkg/ports/opencv4/CONTROL b/vcpkg/ports/opencv4/CONTROL new file mode 100644 index 0000000..f06945f --- /dev/null +++ b/vcpkg/ports/opencv4/CONTROL @@ -0,0 +1,98 @@ +Source: opencv4 +Version: 4.3.0 +Port-Version: 1 +Build-Depends: protobuf, zlib +Homepage: https://github.com/opencv/opencv +Description: computer vision library +Default-Features: dnn, jpeg, opengl, png, tiff, webp + +Feature: nonfree +Description: allow nonfree and unredistributable libraries + +Feature: ade +Build-Depends: ade +Description: graph api + +Feature: contrib +Build-Depends: hdf5 (!uwp), tesseract (!uwp) +Description: opencv_contrib module + +Feature: cuda +Build-Depends: opencv4[core,contrib], cuda, cudnn +Description: CUDA support for opencv + +Feature: dnn +Description: Enable dnn module + +Feature: eigen +Build-Depends: eigen3 +Description: Eigen support for opencv + +Feature: ffmpeg +Build-Depends: ffmpeg +Description: ffmpeg support for opencv + +Feature: gdcm +Build-Depends: gdcm +Description: GDCM support for opencv + +Feature: halide +Build-Depends: halide, opencv4[core], opencv4[dnn] +Description: Halide support for opencv + +Feature: ipp +Description: Enable Intel Integrated Performance Primitives + +Feature: jasper +Build-Depends: jasper +Description: JPEG 2000 support for opencv + +Feature: jpeg +Build-Depends: libjpeg-turbo +Description: JPEG support for opencv + +Feature: openexr +Build-Depends: openexr +Description: OpenEXR support for opencv + +Feature: opengl +Build-Depends: opengl +Description: opengl support for opencv + +Feature: openmp +Description: Enable openmp support for opencv + +Feature: ovis +Build-Depends: opencv4[core,contrib], ogre +Description: opencv_ovis module + +Feature: png +Build-Depends: libpng +Description: PNG support for opencv + +Feature: qt +Build-Depends: qt5-base[core] +Description: Qt GUI support for opencv + +Feature: sfm +Build-Depends: opencv4[core,contrib], opencv4[core,eigen], glog, gflags, ceres +Description: opencv_sfm module + +Feature: tbb +Build-Depends: tbb +Description: Enable Intel Threading Building Blocks + +Feature: tiff +Build-Depends: tiff +Description: TIFF support for opencv + +Feature: vtk +Build-Depends: vtk +Description: vtk support for opencv + +Feature: webp +Build-Depends: libwebp +Description: WebP support for opencv + +Feature: world +Description: Compile to a single package support for opencv diff --git a/vcpkg/ports/opencv4/FindCUDA.cmake b/vcpkg/ports/opencv4/FindCUDA.cmake new file mode 100644 index 0000000..56e15e8 --- /dev/null +++ b/vcpkg/ports/opencv4/FindCUDA.cmake @@ -0,0 +1,2026 @@ +#[=======================================================================[.rst: +FindCUDA +-------- + +.. deprecated:: 3.10 + + Superseded by first-class support for the CUDA language in CMake. + Superseded by the :module:`FindCUDAToolkit` for CUDA toolkit libraries. + +Replacement +^^^^^^^^^^^ + +It is no longer necessary to use this module or call ``find_package(CUDA)`` +for compiling CUDA code. Instead, list ``CUDA`` among the languages named +in the top-level call to the :command:`project` command, or call the +:command:`enable_language` command with ``CUDA``. +Then one can add CUDA (``.cu``) sources to programs directly +in calls to :command:`add_library` and :command:`add_executable`. + +To find and use the CUDA toolkit libraries the :module:`FindCUDAToolkit` +module has superseded this module. It works whether or not the ``CUDA`` +language is enabled. + +Documentation of Deprecated Usage +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Tools for building CUDA C files: libraries and build dependencies. + +This script locates the NVIDIA CUDA C tools. It should work on Linux, +Windows, and macOS and should be reasonably up to date with CUDA C +releases. + +This script makes use of the standard :command:`find_package` arguments of +````, ``REQUIRED`` and ``QUIET``. ``CUDA_FOUND`` will report if an +acceptable version of CUDA was found. + +The script will prompt the user to specify ``CUDA_TOOLKIT_ROOT_DIR`` if +the prefix cannot be determined by the location of nvcc in the system +path and ``REQUIRED`` is specified to :command:`find_package`. To use +a different installed version of the toolkit set the environment variable +``CUDA_BIN_PATH`` before running cmake (e.g. +``CUDA_BIN_PATH=/usr/local/cuda1.0`` instead of the default +``/usr/local/cuda``) or set ``CUDA_TOOLKIT_ROOT_DIR`` after configuring. If +you change the value of ``CUDA_TOOLKIT_ROOT_DIR``, various components that +depend on the path will be relocated. + +It might be necessary to set ``CUDA_TOOLKIT_ROOT_DIR`` manually on certain +platforms, or to use a CUDA runtime not installed in the default +location. In newer versions of the toolkit the CUDA library is +included with the graphics driver -- be sure that the driver version +matches what is needed by the CUDA runtime version. + +The following variables affect the behavior of the macros in the +script (in alphabetical order). Note that any of these flags can be +changed multiple times in the same directory before calling +``CUDA_ADD_EXECUTABLE``, ``CUDA_ADD_LIBRARY``, ``CUDA_COMPILE``, +``CUDA_COMPILE_PTX``, ``CUDA_COMPILE_FATBIN``, ``CUDA_COMPILE_CUBIN`` +or ``CUDA_WRAP_SRCS``:: + + CUDA_64_BIT_DEVICE_CODE (Default matches host bit size) + -- Set to ON to compile for 64 bit device code, OFF for 32 bit device code. + Note that making this different from the host code when generating object + or C files from CUDA code just won't work, because size_t gets defined by + nvcc in the generated source. If you compile to PTX and then load the + file yourself, you can mix bit sizes between device and host. + + CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE (Default ON) + -- Set to ON if you want the custom build rule to be attached to the source + file in Visual Studio. Turn OFF if you add the same cuda file to multiple + targets. + + This allows the user to build the target from the CUDA file; however, bad + things can happen if the CUDA source file is added to multiple targets. + When performing parallel builds it is possible for the custom build + command to be run more than once and in parallel causing cryptic build + errors. VS runs the rules for every source file in the target, and a + source can have only one rule no matter how many projects it is added to. + When the rule is run from multiple targets race conditions can occur on + the generated file. Eventually everything will get built, but if the user + is unaware of this behavior, there may be confusion. It would be nice if + this script could detect the reuse of source files across multiple targets + and turn the option off for the user, but no good solution could be found. + + CUDA_BUILD_CUBIN (Default OFF) + -- Set to ON to enable and extra compilation pass with the -cubin option in + Device mode. The output is parsed and register, shared memory usage is + printed during build. + + CUDA_BUILD_EMULATION (Default OFF for device mode) + -- Set to ON for Emulation mode. -D_DEVICEEMU is defined for CUDA C files + when CUDA_BUILD_EMULATION is TRUE. + + CUDA_LINK_LIBRARIES_KEYWORD (Default "") + -- The keyword to use for internal + target_link_libraries calls. The default is to use no keyword which + uses the old "plain" form of target_link_libraries. Note that is matters + because whatever is used inside the FindCUDA module must also be used + outside - the two forms of target_link_libraries cannot be mixed. + + CUDA_GENERATED_OUTPUT_DIR (Default CMAKE_CURRENT_BINARY_DIR) + -- Set to the path you wish to have the generated files placed. If it is + blank output files will be placed in CMAKE_CURRENT_BINARY_DIR. + Intermediate files will always be placed in + CMAKE_CURRENT_BINARY_DIR/CMakeFiles. + + CUDA_HOST_COMPILATION_CPP (Default ON) + -- Set to OFF for C compilation of host code. + + CUDA_HOST_COMPILER (Default CMAKE_C_COMPILER) + -- Set the host compiler to be used by nvcc. Ignored if -ccbin or + --compiler-bindir is already present in the CUDA_NVCC_FLAGS or + CUDA_NVCC_FLAGS_ variables. For Visual Studio targets, + the host compiler is constructed with one or more visual studio macros + such as $(VCInstallDir), that expands out to the path when + the command is run from within VS. + If the CUDAHOSTCXX environment variable is set it will + be used as the default. + + CUDA_NVCC_FLAGS + CUDA_NVCC_FLAGS_ + -- Additional NVCC command line arguments. NOTE: multiple arguments must be + semi-colon delimited (e.g. --compiler-options;-Wall) + + CUDA_PROPAGATE_HOST_FLAGS (Default ON) + -- Set to ON to propagate CMAKE_{C,CXX}_FLAGS and their configuration + dependent counterparts (e.g. CMAKE_C_FLAGS_DEBUG) automatically to the + host compiler through nvcc's -Xcompiler flag. This helps make the + generated host code match the rest of the system better. Sometimes + certain flags give nvcc problems, and this will help you turn the flag + propagation off. This does not affect the flags supplied directly to nvcc + via CUDA_NVCC_FLAGS or through the OPTION flags specified through + CUDA_ADD_LIBRARY, CUDA_ADD_EXECUTABLE, or CUDA_WRAP_SRCS. Flags used for + shared library compilation are not affected by this flag. + + CUDA_SEPARABLE_COMPILATION (Default OFF) + -- If set this will enable separable compilation for all CUDA runtime object + files. If used outside of CUDA_ADD_EXECUTABLE and CUDA_ADD_LIBRARY + (e.g. calling CUDA_WRAP_SRCS directly), + CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME and + CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS should be called. + + CUDA_SOURCE_PROPERTY_FORMAT + -- If this source file property is set, it can override the format specified + to CUDA_WRAP_SRCS (OBJ, PTX, CUBIN, or FATBIN). If an input source file + is not a .cu file, setting this file will cause it to be treated as a .cu + file. See documentation for set_source_files_properties on how to set + this property. + + CUDA_USE_STATIC_CUDA_RUNTIME (Default ON) + -- When enabled the static version of the CUDA runtime library will be used + in CUDA_LIBRARIES. If the version of CUDA configured doesn't support + this option, then it will be silently disabled. + + CUDA_VERBOSE_BUILD (Default OFF) + -- Set to ON to see all the commands used when building the CUDA file. When + using a Makefile generator the value defaults to VERBOSE (run make + VERBOSE=1 to see output), although setting CUDA_VERBOSE_BUILD to ON will + always print the output. + +The script creates the following macros (in alphabetical order):: + + CUDA_ADD_CUFFT_TO_TARGET( cuda_target ) + -- Adds the cufft library to the target (can be any target). Handles whether + you are in emulation mode or not. + + CUDA_ADD_CUBLAS_TO_TARGET( cuda_target ) + -- Adds the cublas library to the target (can be any target). Handles + whether you are in emulation mode or not. + + CUDA_ADD_EXECUTABLE( cuda_target file0 file1 ... + [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL] [OPTIONS ...] ) + -- Creates an executable "cuda_target" which is made up of the files + specified. All of the non CUDA C files are compiled using the standard + build rules specified by CMAKE and the cuda files are compiled to object + files using nvcc and the host compiler. In addition CUDA_INCLUDE_DIRS is + added automatically to include_directories(). Some standard CMake target + calls can be used on the target after calling this macro + (e.g. set_target_properties and target_link_libraries), but setting + properties that adjust compilation flags will not affect code compiled by + nvcc. Such flags should be modified before calling CUDA_ADD_EXECUTABLE, + CUDA_ADD_LIBRARY or CUDA_WRAP_SRCS. + + CUDA_ADD_LIBRARY( cuda_target file0 file1 ... + [STATIC | SHARED | MODULE] [EXCLUDE_FROM_ALL] [OPTIONS ...] ) + -- Same as CUDA_ADD_EXECUTABLE except that a library is created. + + CUDA_BUILD_CLEAN_TARGET() + -- Creates a convenience target that deletes all the dependency files + generated. You should make clean after running this target to ensure the + dependency files get regenerated. + + CUDA_COMPILE( generated_files file0 file1 ... [STATIC | SHARED | MODULE] + [OPTIONS ...] ) + -- Returns a list of generated files from the input source files to be used + with ADD_LIBRARY or ADD_EXECUTABLE. + + CUDA_COMPILE_PTX( generated_files file0 file1 ... [OPTIONS ...] ) + -- Returns a list of PTX files generated from the input source files. + + CUDA_COMPILE_FATBIN( generated_files file0 file1 ... [OPTIONS ...] ) + -- Returns a list of FATBIN files generated from the input source files. + + CUDA_COMPILE_CUBIN( generated_files file0 file1 ... [OPTIONS ...] ) + -- Returns a list of CUBIN files generated from the input source files. + + CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME( output_file_var + cuda_target + object_files ) + -- Compute the name of the intermediate link file used for separable + compilation. This file name is typically passed into + CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS. output_file_var is produced + based on cuda_target the list of objects files that need separable + compilation as specified by object_files. If the object_files list is + empty, then output_file_var will be empty. This function is called + automatically for CUDA_ADD_LIBRARY and CUDA_ADD_EXECUTABLE. Note that + this is a function and not a macro. + + CUDA_INCLUDE_DIRECTORIES( path0 path1 ... ) + -- Sets the directories that should be passed to nvcc + (e.g. nvcc -Ipath0 -Ipath1 ... ). These paths usually contain other .cu + files. + + + CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS( output_file_var cuda_target + nvcc_flags object_files) + -- Generates the link object required by separable compilation from the given + object files. This is called automatically for CUDA_ADD_EXECUTABLE and + CUDA_ADD_LIBRARY, but can be called manually when using CUDA_WRAP_SRCS + directly. When called from CUDA_ADD_LIBRARY or CUDA_ADD_EXECUTABLE the + nvcc_flags passed in are the same as the flags passed in via the OPTIONS + argument. The only nvcc flag added automatically is the bitness flag as + specified by CUDA_64_BIT_DEVICE_CODE. Note that this is a function + instead of a macro. + + CUDA_SELECT_NVCC_ARCH_FLAGS(out_variable [target_CUDA_architectures]) + -- Selects GPU arch flags for nvcc based on target_CUDA_architectures + target_CUDA_architectures : Auto | Common | All | LIST(ARCH_AND_PTX ...) + - "Auto" detects local machine GPU compute arch at runtime. + - "Common" and "All" cover common and entire subsets of architectures + ARCH_AND_PTX : NAME | NUM.NUM | NUM.NUM(NUM.NUM) | NUM.NUM+PTX + NAME: Fermi Kepler Maxwell Kepler+Tegra Kepler+Tesla Maxwell+Tegra Pascal + NUM: Any number. Only those pairs are currently accepted by NVCC though: + 2.0 2.1 3.0 3.2 3.5 3.7 5.0 5.2 5.3 6.0 6.2 + Returns LIST of flags to be added to CUDA_NVCC_FLAGS in ${out_variable} + Additionally, sets ${out_variable}_readable to the resulting numeric list + Example: + CUDA_SELECT_NVCC_ARCH_FLAGS(ARCH_FLAGS 3.0 3.5+PTX 5.2(5.0) Maxwell) + LIST(APPEND CUDA_NVCC_FLAGS ${ARCH_FLAGS}) + + More info on CUDA architectures: https://en.wikipedia.org/wiki/CUDA + Note that this is a function instead of a macro. + + CUDA_WRAP_SRCS ( cuda_target format generated_files file0 file1 ... + [STATIC | SHARED | MODULE] [OPTIONS ...] ) + -- This is where all the magic happens. CUDA_ADD_EXECUTABLE, + CUDA_ADD_LIBRARY, CUDA_COMPILE, and CUDA_COMPILE_PTX all call this + function under the hood. + + Given the list of files (file0 file1 ... fileN) this macro generates + custom commands that generate either PTX or linkable objects (use "PTX" or + "OBJ" for the format argument to switch). Files that don't end with .cu + or have the HEADER_FILE_ONLY property are ignored. + + The arguments passed in after OPTIONS are extra command line options to + give to nvcc. You can also specify per configuration options by + specifying the name of the configuration followed by the options. General + options must precede configuration specific options. Not all + configurations need to be specified, only the ones provided will be used. + + OPTIONS -DFLAG=2 "-DFLAG_OTHER=space in flag" + DEBUG -g + RELEASE --use_fast_math + RELWITHDEBINFO --use_fast_math;-g + MINSIZEREL --use_fast_math + + For certain configurations (namely VS generating object files with + CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE set to ON), no generated file will + be produced for the given cuda file. This is because when you add the + cuda file to Visual Studio it knows that this file produces an object file + and will link in the resulting object file automatically. + + This script will also generate a separate cmake script that is used at + build time to invoke nvcc. This is for several reasons. + + 1. nvcc can return negative numbers as return values which confuses + Visual Studio into thinking that the command succeeded. The script now + checks the error codes and produces errors when there was a problem. + + 2. nvcc has been known to not delete incomplete results when it + encounters problems. This confuses build systems into thinking the + target was generated when in fact an unusable file exists. The script + now deletes the output files if there was an error. + + 3. By putting all the options that affect the build into a file and then + make the build rule dependent on the file, the output files will be + regenerated when the options change. + + This script also looks at optional arguments STATIC, SHARED, or MODULE to + determine when to target the object compilation for a shared library. + BUILD_SHARED_LIBS is ignored in CUDA_WRAP_SRCS, but it is respected in + CUDA_ADD_LIBRARY. On some systems special flags are added for building + objects intended for shared libraries. A preprocessor macro, + _EXPORTS is defined when a shared library compilation is + detected. + + Flags passed into add_definitions with -D or /D are passed along to nvcc. + + + +The script defines the following variables:: + + CUDA_VERSION_MAJOR -- The major version of cuda as reported by nvcc. + CUDA_VERSION_MINOR -- The minor version. + CUDA_VERSION + CUDA_VERSION_STRING -- CUDA_VERSION_MAJOR.CUDA_VERSION_MINOR + CUDA_HAS_FP16 -- Whether a short float (float16,fp16) is supported. + + CUDA_TOOLKIT_ROOT_DIR -- Path to the CUDA Toolkit (defined if not set). + CUDA_SDK_ROOT_DIR -- Path to the CUDA SDK. Use this to find files in the + SDK. This script will not directly support finding + specific libraries or headers, as that isn't + supported by NVIDIA. If you want to change + libraries when the path changes see the + FindCUDA.cmake script for an example of how to clear + these variables. There are also examples of how to + use the CUDA_SDK_ROOT_DIR to locate headers or + libraries, if you so choose (at your own risk). + CUDA_INCLUDE_DIRS -- Include directory for cuda headers. Added automatically + for CUDA_ADD_EXECUTABLE and CUDA_ADD_LIBRARY. + CUDA_LIBRARIES -- Cuda RT library. + CUDA_CUFFT_LIBRARIES -- Device or emulation library for the Cuda FFT + implementation (alternative to: + CUDA_ADD_CUFFT_TO_TARGET macro) + CUDA_CUBLAS_LIBRARIES -- Device or emulation library for the Cuda BLAS + implementation (alternative to: + CUDA_ADD_CUBLAS_TO_TARGET macro). + CUDA_cudart_static_LIBRARY -- Statically linkable cuda runtime library. + Only available for CUDA version 5.5+ + CUDA_cudadevrt_LIBRARY -- Device runtime library. + Required for separable compilation. + CUDA_cupti_LIBRARY -- CUDA Profiling Tools Interface library. + Only available for CUDA version 4.0+. + CUDA_curand_LIBRARY -- CUDA Random Number Generation library. + Only available for CUDA version 3.2+. + CUDA_cusolver_LIBRARY -- CUDA Direct Solver library. + Only available for CUDA version 7.0+. + CUDA_cusparse_LIBRARY -- CUDA Sparse Matrix library. + Only available for CUDA version 3.2+. + CUDA_npp_LIBRARY -- NVIDIA Performance Primitives lib. + Only available for CUDA version 4.0+. + CUDA_nppc_LIBRARY -- NVIDIA Performance Primitives lib (core). + Only available for CUDA version 5.5+. + CUDA_nppi_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 5.5 - 8.0. + CUDA_nppial_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_nppicc_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_nppicom_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0 - 10.2. + Replaced by nvjpeg. + CUDA_nppidei_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_nppif_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_nppig_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_nppim_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_nppist_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_nppisu_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_nppitc_LIBRARY -- NVIDIA Performance Primitives lib (image processing). + Only available for CUDA version 9.0. + CUDA_npps_LIBRARY -- NVIDIA Performance Primitives lib (signal processing). + Only available for CUDA version 5.5+. + CUDA_nvcuvenc_LIBRARY -- CUDA Video Encoder library. + Only available for CUDA version 3.2+. + Windows only. + CUDA_nvcuvid_LIBRARY -- CUDA Video Decoder library. + Only available for CUDA version 3.2+. + Windows only. + CUDA_nvToolsExt_LIBRARY + -- NVIDA CUDA Tools Extension library. + Available for CUDA version 5+. + CUDA_OpenCL_LIBRARY -- NVIDA CUDA OpenCL library. + Available for CUDA version 5+. + +#]=======================================================================] + +# James Bigler, NVIDIA Corp (nvidia.com - jbigler) +# Abe Stephens, SCI Institute -- http://www.sci.utah.edu/~abe/FindCuda.html +# +# Copyright (c) 2008 - 2009 NVIDIA Corporation. All rights reserved. +# +# Copyright (c) 2007-2009 +# Scientific Computing and Imaging Institute, University of Utah +# +# This code is licensed under the MIT License. See the FindCUDA.cmake script +# for the text of the license. + +# The MIT License +# +# License for the specific language governing rights and limitations under +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +############################################################################### + +# FindCUDA.cmake + +# This macro helps us find the location of helper files we will need the full path to +macro(CUDA_FIND_HELPER_FILE _name _extension) + set(_full_name "${_name}.${_extension}") + # CMAKE_CURRENT_LIST_FILE contains the full path to the file currently being + # processed. Using this variable, we can pull out the current path, and + # provide a way to get access to the other files we need local to here. + set(CUDA_${_name} "${CMAKE_ROOT}/Modules/FindCUDA/${_full_name}") + if(NOT EXISTS "${CUDA_${_name}}") + set(error_message "${_full_name} not found in ${CMAKE_ROOT}/Modules/FindCUDA") + if(CUDA_FIND_REQUIRED) + message(FATAL_ERROR "${error_message}") + else() + if(NOT CUDA_FIND_QUIETLY) + message(STATUS "${error_message}") + endif() + endif() + endif() + # Set this variable as internal, so the user isn't bugged with it. + set(CUDA_${_name} ${CUDA_${_name}} CACHE INTERNAL "Location of ${_full_name}" FORCE) +endmacro() + +##################################################################### +## CUDA_INCLUDE_NVCC_DEPENDENCIES +## + +# So we want to try and include the dependency file if it exists. If +# it doesn't exist then we need to create an empty one, so we can +# include it. + +# If it does exist, then we need to check to see if all the files it +# depends on exist. If they don't then we should clear the dependency +# file and regenerate it later. This covers the case where a header +# file has disappeared or moved. + +macro(CUDA_INCLUDE_NVCC_DEPENDENCIES dependency_file) + set(CUDA_NVCC_DEPEND) + set(CUDA_NVCC_DEPEND_REGENERATE FALSE) + + + # Include the dependency file. Create it first if it doesn't exist . The + # INCLUDE puts a dependency that will force CMake to rerun and bring in the + # new info when it changes. DO NOT REMOVE THIS (as I did and spent a few + # hours figuring out why it didn't work. + if(NOT EXISTS ${dependency_file}) + file(WRITE ${dependency_file} "#FindCUDA.cmake generated file. Do not edit.\n") + endif() + # Always include this file to force CMake to run again next + # invocation and rebuild the dependencies. + #message("including dependency_file = ${dependency_file}") + include(${dependency_file}) + + # Now we need to verify the existence of all the included files + # here. If they aren't there we need to just blank this variable and + # make the file regenerate again. +# if(DEFINED CUDA_NVCC_DEPEND) +# message("CUDA_NVCC_DEPEND set") +# else() +# message("CUDA_NVCC_DEPEND NOT set") +# endif() + if(CUDA_NVCC_DEPEND) + #message("CUDA_NVCC_DEPEND found") + foreach(f ${CUDA_NVCC_DEPEND}) + # message("searching for ${f}") + if(NOT EXISTS ${f}) + #message("file ${f} not found") + set(CUDA_NVCC_DEPEND_REGENERATE TRUE) + endif() + endforeach() + else() + #message("CUDA_NVCC_DEPEND false") + # No dependencies, so regenerate the file. + set(CUDA_NVCC_DEPEND_REGENERATE TRUE) + endif() + + #message("CUDA_NVCC_DEPEND_REGENERATE = ${CUDA_NVCC_DEPEND_REGENERATE}") + # No incoming dependencies, so we need to generate them. Make the + # output depend on the dependency file itself, which should cause the + # rule to re-run. + if(CUDA_NVCC_DEPEND_REGENERATE) + set(CUDA_NVCC_DEPEND ${dependency_file}) + #message("Generating an empty dependency_file: ${dependency_file}") + file(WRITE ${dependency_file} "#FindCUDA.cmake generated file. Do not edit.\n") + endif() + +endmacro() + +############################################################################### +############################################################################### +# Setup variables' defaults +############################################################################### +############################################################################### + +# Allow the user to specify if the device code is supposed to be 32 or 64 bit. +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(CUDA_64_BIT_DEVICE_CODE_DEFAULT ON) +else() + set(CUDA_64_BIT_DEVICE_CODE_DEFAULT OFF) +endif() +option(CUDA_64_BIT_DEVICE_CODE "Compile device code in 64 bit mode" ${CUDA_64_BIT_DEVICE_CODE_DEFAULT}) + +# Attach the build rule to the source file in VS. This option +option(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE "Attach the build rule to the CUDA source file. Enable only when the CUDA source file is added to at most one target." ON) + +# Prints out extra information about the cuda file during compilation +option(CUDA_BUILD_CUBIN "Generate and parse .cubin files in Device mode." OFF) + +# Set whether we are using emulation or device mode. +option(CUDA_BUILD_EMULATION "Build in Emulation mode" OFF) + +# Where to put the generated output. +set(CUDA_GENERATED_OUTPUT_DIR "" CACHE PATH "Directory to put all the output files. If blank it will default to the CMAKE_CURRENT_BINARY_DIR") + +# Parse HOST_COMPILATION mode. +option(CUDA_HOST_COMPILATION_CPP "Generated file extension" ON) + +# Extra user settable flags +cmake_initialize_per_config_variable(CUDA_NVCC_FLAGS "Semi-colon delimit multiple arguments.") + +if(DEFINED ENV{CUDAHOSTCXX}) + set(CUDA_HOST_COMPILER "$ENV{CUDAHOSTCXX}" CACHE FILEPATH "Host side compiler used by NVCC") +elseif(CMAKE_GENERATOR MATCHES "Visual Studio") + set(_CUDA_MSVC_HOST_COMPILER "$(VCInstallDir)Tools/MSVC/$(VCToolsVersion)/bin/Host$(Platform)/$(PlatformTarget)") + if(MSVC_VERSION LESS 1910) + set(_CUDA_MSVC_HOST_COMPILER "$(VCInstallDir)bin") + endif() + + set(CUDA_HOST_COMPILER "${_CUDA_MSVC_HOST_COMPILER}" CACHE FILEPATH "Host side compiler used by NVCC") + +else() + if(APPLE + AND "${CMAKE_C_COMPILER_ID}" MATCHES "Clang" + AND "${CMAKE_C_COMPILER}" MATCHES "/cc$") + # Using cc which is symlink to clang may let NVCC think it is GCC and issue + # unhandled -dumpspecs option to clang. Also in case neither + # CMAKE_C_COMPILER is defined (project does not use C language) nor + # CUDA_HOST_COMPILER is specified manually we should skip -ccbin and let + # nvcc use its own default C compiler. + # Only care about this on APPLE with clang to avoid + # following symlinks to things like ccache + if(DEFINED CMAKE_C_COMPILER AND NOT DEFINED CUDA_HOST_COMPILER) + get_filename_component(c_compiler_realpath "${CMAKE_C_COMPILER}" REALPATH) + # if the real path does not end up being clang then + # go back to using CMAKE_C_COMPILER + if(NOT "${c_compiler_realpath}" MATCHES "/clang$") + set(c_compiler_realpath "${CMAKE_C_COMPILER}") + endif() + else() + set(c_compiler_realpath "") + endif() + set(CUDA_HOST_COMPILER "${c_compiler_realpath}" CACHE FILEPATH "Host side compiler used by NVCC") + elseif(MSVC AND "${CMAKE_C_COMPILER}" MATCHES "clcache|sccache") + # NVCC does not think it will work if it is passed clcache.exe or sccache.exe + # as the host compiler, which means that builds with CC=cl.exe won't work. + # Best to just feed it whatever the actual cl.exe is as the host compiler. + set(CUDA_HOST_COMPILER "cl.exe" CACHE FILEPATH "Host side compiler used by NVCC") + else() + set(CUDA_HOST_COMPILER "${CMAKE_C_COMPILER}" + CACHE FILEPATH "Host side compiler used by NVCC") + endif() +endif() + +# Propagate the host flags to the host compiler via -Xcompiler +option(CUDA_PROPAGATE_HOST_FLAGS "Propagate C/CXX_FLAGS and friends to the host compiler via -Xcompile" ON) + +# Enable CUDA_SEPARABLE_COMPILATION +option(CUDA_SEPARABLE_COMPILATION "Compile CUDA objects with separable compilation enabled. Requires CUDA 5.0+" OFF) + +# Specifies whether the commands used when compiling the .cu file will be printed out. +option(CUDA_VERBOSE_BUILD "Print out the commands run while compiling the CUDA source file. With the Makefile generator this defaults to VERBOSE variable specified on the command line, but can be forced on with this option." OFF) + +mark_as_advanced( + CUDA_64_BIT_DEVICE_CODE + CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE + CUDA_GENERATED_OUTPUT_DIR + CUDA_HOST_COMPILATION_CPP + CUDA_NVCC_FLAGS + CUDA_PROPAGATE_HOST_FLAGS + CUDA_BUILD_CUBIN + CUDA_BUILD_EMULATION + CUDA_VERBOSE_BUILD + CUDA_SEPARABLE_COMPILATION + ) + +# Single config generators like Makefiles or Ninja don't usually have +# CMAKE_CONFIGURATION_TYPES defined (but note that it can be defined if set by +# projects or developers). Even CMAKE_BUILD_TYPE might not be defined for +# single config generators (and should not be defined for multi-config +# generators). To ensure we get a complete superset of all possible +# configurations, we combine CMAKE_CONFIGURATION_TYPES, CMAKE_BUILD_TYPE and +# all of the standard configurations, then weed out duplicates with +# list(REMOVE_DUPLICATES). Looping over the unique set then ensures we have +# each configuration-specific set of nvcc flags defined and marked as advanced. +set(CUDA_configuration_types ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE} Debug MinSizeRel Release RelWithDebInfo) +list(REMOVE_DUPLICATES CUDA_configuration_types) + +############################################################################### +############################################################################### +# Locate CUDA, Set Build Type, etc. +############################################################################### +############################################################################### + +macro(cuda_unset_include_and_libraries) + unset(CUDA_TOOLKIT_INCLUDE CACHE) + unset(CUDA_CUDART_LIBRARY CACHE) + unset(CUDA_CUDA_LIBRARY CACHE) + # Make sure you run this before you unset CUDA_VERSION. + if(CUDA_VERSION VERSION_EQUAL "3.0") + # This only existed in the 3.0 version of the CUDA toolkit + unset(CUDA_CUDARTEMU_LIBRARY CACHE) + endif() + unset(CUDA_cudart_static_LIBRARY CACHE) + unset(CUDA_cudadevrt_LIBRARY CACHE) + unset(CUDA_cublas_LIBRARY CACHE) + unset(CUDA_cublas_device_LIBRARY CACHE) + unset(CUDA_cublasemu_LIBRARY CACHE) + unset(CUDA_cufft_LIBRARY CACHE) + unset(CUDA_cufftemu_LIBRARY CACHE) + unset(CUDA_cupti_LIBRARY CACHE) + unset(CUDA_curand_LIBRARY CACHE) + unset(CUDA_cusolver_LIBRARY CACHE) + unset(CUDA_cusparse_LIBRARY CACHE) + unset(CUDA_npp_LIBRARY CACHE) + unset(CUDA_nppc_LIBRARY CACHE) + unset(CUDA_nppi_LIBRARY CACHE) + unset(CUDA_npps_LIBRARY CACHE) + unset(CUDA_nvcuvenc_LIBRARY CACHE) + unset(CUDA_nvcuvid_LIBRARY CACHE) + unset(CUDA_nvToolsExt_LIBRARY CACHE) + unset(CUDA_OpenCL_LIBRARY CACHE) + unset(CUDA_GPU_DETECT_OUTPUT CACHE) +endmacro() + +# Check to see if the CUDA_TOOLKIT_ROOT_DIR and CUDA_SDK_ROOT_DIR have changed, +# if they have then clear the cache variables, so that will be detected again. +if(NOT "${CUDA_TOOLKIT_ROOT_DIR}" STREQUAL "${CUDA_TOOLKIT_ROOT_DIR_INTERNAL}") + unset(CUDA_TOOLKIT_TARGET_DIR CACHE) + unset(CUDA_NVCC_EXECUTABLE CACHE) + cuda_unset_include_and_libraries() + unset(CUDA_VERSION CACHE) +endif() + +if(NOT "${CUDA_TOOLKIT_TARGET_DIR}" STREQUAL "${CUDA_TOOLKIT_TARGET_DIR_INTERNAL}") + cuda_unset_include_and_libraries() +endif() + +# +# End of unset() +# + +# +# Start looking for things +# + +# Search for the cuda distribution. +if(NOT CUDA_TOOLKIT_ROOT_DIR AND NOT CMAKE_CROSSCOMPILING) + # Search in the CUDA_BIN_PATH first. + find_program(CUDA_TOOLKIT_ROOT_DIR_NVCC + NAMES nvcc nvcc.exe + PATHS + ENV CUDA_TOOLKIT_ROOT + ENV CUDA_PATH + ENV CUDA_BIN_PATH + PATH_SUFFIXES bin bin64 + DOC "Toolkit location." + NO_DEFAULT_PATH + ) + + # Now search default paths + find_program(CUDA_TOOLKIT_ROOT_DIR_NVCC + NAMES nvcc nvcc.exe + PATHS /opt/cuda/bin + PATH_SUFFIXES cuda/bin + DOC "Toolkit location." + ) + + if (CUDA_TOOLKIT_ROOT_DIR_NVCC) + get_filename_component(CUDA_TOOLKIT_ROOT_DIR_NVCC_PAR "${CUDA_TOOLKIT_ROOT_DIR_NVCC}" DIRECTORY) + get_filename_component(CUDA_TOOLKIT_ROOT_DIR "${CUDA_TOOLKIT_ROOT_DIR_NVCC_PAR}" DIRECTORY CACHE) + string(REGEX REPLACE "[/\\\\]?bin[64]*[/\\\\]?$" "" CUDA_TOOLKIT_ROOT_DIR ${CUDA_TOOLKIT_ROOT_DIR}) + # We need to force this back into the cache. + set(CUDA_TOOLKIT_ROOT_DIR ${CUDA_TOOLKIT_ROOT_DIR} CACHE PATH "Toolkit location." FORCE) + set(CUDA_TOOLKIT_TARGET_DIR ${CUDA_TOOLKIT_ROOT_DIR}) + endif() + unset(CUDA_TOOLKIT_ROOT_DIR_NVCC CACHE) + + if (NOT EXISTS ${CUDA_TOOLKIT_ROOT_DIR}) + if(CUDA_FIND_REQUIRED) + message(FATAL_ERROR "Specify CUDA_TOOLKIT_ROOT_DIR") + elseif(NOT CUDA_FIND_QUIETLY) + message("CUDA_TOOLKIT_ROOT_DIR not found or specified") + endif() + endif () +endif () + +if(CMAKE_CROSSCOMPILING) + SET (CUDA_TOOLKIT_ROOT $ENV{CUDA_TOOLKIT_ROOT}) + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7-a") + # Support for NVPACK + set (CUDA_TOOLKIT_TARGET_NAME "armv7-linux-androideabi") + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm") + # Support for arm cross compilation + set(CUDA_TOOLKIT_TARGET_NAME "armv7-linux-gnueabihf") + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64") + # Support for aarch64 cross compilation + if (ANDROID_ARCH_NAME STREQUAL "arm64") + set(CUDA_TOOLKIT_TARGET_NAME "aarch64-linux-androideabi") + else() + set(CUDA_TOOLKIT_TARGET_NAME "aarch64-linux") + endif (ANDROID_ARCH_NAME STREQUAL "arm64") + endif() + + if (EXISTS "${CUDA_TOOLKIT_ROOT}/targets/${CUDA_TOOLKIT_TARGET_NAME}") + set(CUDA_TOOLKIT_TARGET_DIR "${CUDA_TOOLKIT_ROOT}/targets/${CUDA_TOOLKIT_TARGET_NAME}" CACHE PATH "CUDA Toolkit target location.") + SET (CUDA_TOOLKIT_ROOT_DIR ${CUDA_TOOLKIT_ROOT}) + mark_as_advanced(CUDA_TOOLKIT_TARGET_DIR) + endif() + + # add known CUDA targetr root path to the set of directories we search for programs, libraries and headers + set( CMAKE_FIND_ROOT_PATH "${CUDA_TOOLKIT_TARGET_DIR};${CMAKE_FIND_ROOT_PATH}") + macro( cuda_find_host_program ) + if (COMMAND find_host_program) + find_host_program( ${ARGN} ) + else() + find_program( ${ARGN} ) + endif() + endmacro() +else() + # for non-cross-compile, find_host_program == find_program and CUDA_TOOLKIT_TARGET_DIR == CUDA_TOOLKIT_ROOT_DIR + macro( cuda_find_host_program ) + find_program( ${ARGN} ) + endmacro() + SET (CUDA_TOOLKIT_TARGET_DIR ${CUDA_TOOLKIT_ROOT_DIR}) +endif() + + +# CUDA_NVCC_EXECUTABLE +if(DEFINED ENV{CUDA_NVCC_EXECUTABLE}) + set(CUDA_NVCC_EXECUTABLE "$ENV{CUDA_NVCC_EXECUTABLE}" CACHE FILEPATH "The CUDA compiler") +else() + cuda_find_host_program(CUDA_NVCC_EXECUTABLE + NAMES nvcc + PATHS "${CUDA_TOOLKIT_ROOT_DIR}" + ENV CUDA_PATH + ENV CUDA_BIN_PATH + PATH_SUFFIXES bin bin64 + NO_DEFAULT_PATH + ) + # Search default search paths, after we search our own set of paths. + cuda_find_host_program(CUDA_NVCC_EXECUTABLE nvcc) +endif() +mark_as_advanced(CUDA_NVCC_EXECUTABLE) + +if(CUDA_NVCC_EXECUTABLE AND NOT CUDA_VERSION) + # Compute the version. + execute_process (COMMAND ${CUDA_NVCC_EXECUTABLE} "--version" OUTPUT_VARIABLE NVCC_OUT) + string(REGEX REPLACE ".*release ([0-9]+)\\.([0-9]+).*" "\\1" CUDA_VERSION_MAJOR ${NVCC_OUT}) + string(REGEX REPLACE ".*release ([0-9]+)\\.([0-9]+).*" "\\2" CUDA_VERSION_MINOR ${NVCC_OUT}) + set(CUDA_VERSION "${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR}" CACHE STRING "Version of CUDA as computed from nvcc.") + mark_as_advanced(CUDA_VERSION) +else() + # Need to set these based off of the cached value + string(REGEX REPLACE "([0-9]+)\\.([0-9]+).*" "\\1" CUDA_VERSION_MAJOR "${CUDA_VERSION}") + string(REGEX REPLACE "([0-9]+)\\.([0-9]+).*" "\\2" CUDA_VERSION_MINOR "${CUDA_VERSION}") +endif() + + +# Always set this convenience variable +set(CUDA_VERSION_STRING "${CUDA_VERSION}") + +# CUDA_TOOLKIT_INCLUDE +find_path(CUDA_TOOLKIT_INCLUDE + device_functions.h # Header included in toolkit + PATHS ${CUDA_TOOLKIT_TARGET_DIR} + ENV CUDA_PATH + ENV CUDA_INC_PATH + PATH_SUFFIXES include + NO_DEFAULT_PATH + ) +# Search default search paths, after we search our own set of paths. +find_path(CUDA_TOOLKIT_INCLUDE device_functions.h) +mark_as_advanced(CUDA_TOOLKIT_INCLUDE) + +if (CUDA_VERSION VERSION_GREATER "7.0" OR EXISTS "${CUDA_TOOLKIT_INCLUDE}/cuda_fp16.h") + set(CUDA_HAS_FP16 TRUE) +else() + set(CUDA_HAS_FP16 FALSE) +endif() + +# Set the user list of include dir to nothing to initialize it. +set (CUDA_NVCC_INCLUDE_DIRS_USER "") +set (CUDA_INCLUDE_DIRS ${CUDA_TOOLKIT_INCLUDE}) + +macro(cuda_find_library_local_first_with_path_ext _var _names _doc _path_ext ) + if(CMAKE_SIZEOF_VOID_P EQUAL 8) + # CUDA 3.2+ on Windows moved the library directories, so we need the new + # and old paths. + set(_cuda_64bit_lib_dir "${_path_ext}lib/x64" "${_path_ext}lib64" "${_path_ext}libx64" ) + endif() + # CUDA 3.2+ on Windows moved the library directories, so we need to new + # (lib/Win32) and the old path (lib). + find_library(${_var} + NAMES ${_names} + PATHS "${CUDA_TOOLKIT_TARGET_DIR}" + ENV CUDA_PATH + ENV CUDA_LIB_PATH + PATH_SUFFIXES ${_cuda_64bit_lib_dir} "${_path_ext}lib/Win32" "${_path_ext}lib" "${_path_ext}libWin32" + DOC ${_doc} + NO_DEFAULT_PATH + ) + if (NOT CMAKE_CROSSCOMPILING) + # Search default search paths, after we search our own set of paths. + find_library(${_var} + NAMES ${_names} + PATHS "/usr/lib/nvidia-current" + DOC ${_doc} + ) + endif() +endmacro() + +macro(cuda_find_library_local_first _var _names _doc) + cuda_find_library_local_first_with_path_ext( "${_var}" "${_names}" "${_doc}" "" ) +endmacro() + +macro(find_library_local_first _var _names _doc ) + cuda_find_library_local_first( "${_var}" "${_names}" "${_doc}" "" ) +endmacro() + + +# CUDA_LIBRARIES +cuda_find_library_local_first(CUDA_CUDART_LIBRARY cudart "\"cudart\" library") +if(CUDA_VERSION VERSION_EQUAL "3.0") + # The cudartemu library only existed for the 3.0 version of CUDA. + cuda_find_library_local_first(CUDA_CUDARTEMU_LIBRARY cudartemu "\"cudartemu\" library") + mark_as_advanced( + CUDA_CUDARTEMU_LIBRARY + ) +endif() + +if(NOT CUDA_VERSION VERSION_LESS "5.5") + cuda_find_library_local_first(CUDA_cudart_static_LIBRARY cudart_static "static CUDA runtime library") + mark_as_advanced(CUDA_cudart_static_LIBRARY) +endif() + + +if(CUDA_cudart_static_LIBRARY) + # If static cudart available, use it by default, but provide a user-visible option to disable it. + option(CUDA_USE_STATIC_CUDA_RUNTIME "Use the static version of the CUDA runtime library if available" ON) +else() + # If not available, silently disable the option. + set(CUDA_USE_STATIC_CUDA_RUNTIME OFF CACHE INTERNAL "") +endif() + +if(CUDA_USE_STATIC_CUDA_RUNTIME) + set(CUDA_CUDART_LIBRARY_VAR CUDA_cudart_static_LIBRARY) +else() + set(CUDA_CUDART_LIBRARY_VAR CUDA_CUDART_LIBRARY) +endif() + +if(NOT CUDA_VERSION VERSION_LESS "5.0") + cuda_find_library_local_first(CUDA_cudadevrt_LIBRARY cudadevrt "\"cudadevrt\" library") + mark_as_advanced(CUDA_cudadevrt_LIBRARY) +endif() + +if(CUDA_USE_STATIC_CUDA_RUNTIME) + if(UNIX) + # Check for the dependent libraries. + + # Many of the FindXYZ CMake comes with makes use of try_compile with int main(){return 0;} + # as the source file. Unfortunately this causes a warning with -Wstrict-prototypes and + # -Werror causes the try_compile to fail. We will just temporarily disable other flags + # when doing the find_package command here. + set(_cuda_cmake_c_flags ${CMAKE_C_FLAGS}) + set(CMAKE_C_FLAGS "-fPIC") + find_package(Threads REQUIRED) + set(CMAKE_C_FLAGS ${_cuda_cmake_c_flags}) + + if(NOT APPLE) + #On Linux, you must link against librt when using the static cuda runtime. + find_library(CUDA_rt_LIBRARY rt) + if (NOT CUDA_rt_LIBRARY) + message(WARNING "Expecting to find librt for libcudart_static, but didn't find it.") + endif() + endif() + endif() +endif() + +# CUPTI library showed up in cuda toolkit 4.0 +if(NOT CUDA_VERSION VERSION_LESS "4.0") + cuda_find_library_local_first_with_path_ext(CUDA_cupti_LIBRARY cupti "\"cupti\" library" "extras/CUPTI/") + mark_as_advanced(CUDA_cupti_LIBRARY) +endif() + +# Set the CUDA_LIBRARIES variable. This is the set of stuff to link against if you are +# using the CUDA runtime. For the dynamic version of the runtime, most of the +# dependencies are brough in, but for the static version there are additional libraries +# and linker commands needed. +# Initialize to empty +set(CUDA_LIBRARIES) + +# If we are using emulation mode and we found the cudartemu library then use +# that one instead of cudart. +if(CUDA_BUILD_EMULATION AND CUDA_CUDARTEMU_LIBRARY) + list(APPEND CUDA_LIBRARIES ${CUDA_CUDARTEMU_LIBRARY}) +elseif(CUDA_USE_STATIC_CUDA_RUNTIME AND CUDA_cudart_static_LIBRARY) + list(APPEND CUDA_LIBRARIES ${CUDA_cudart_static_LIBRARY}) + if (TARGET Threads::Threads) + list(APPEND CUDA_LIBRARIES Threads::Threads) + endif() + list(APPEND CUDA_LIBRARIES ${CMAKE_DL_LIBS}) + if (CUDA_rt_LIBRARY) + list(APPEND CUDA_LIBRARIES ${CUDA_rt_LIBRARY}) + endif() + if(APPLE) + # We need to add the default path to the driver (libcuda.dylib) as an rpath, so that + # the static cuda runtime can find it at runtime. + list(APPEND CUDA_LIBRARIES -Wl,-rpath,/usr/local/cuda/lib) + endif() +else() + list(APPEND CUDA_LIBRARIES ${CUDA_CUDART_LIBRARY}) +endif() + +# 1.1 toolkit on linux doesn't appear to have a separate library on +# some platforms. +cuda_find_library_local_first(CUDA_CUDA_LIBRARY cuda "\"cuda\" library (older versions only).") + +mark_as_advanced( + CUDA_CUDA_LIBRARY + CUDA_CUDART_LIBRARY + ) + +####################### +# Look for some of the toolkit helper libraries +macro(FIND_CUDA_HELPER_LIBS _name) + cuda_find_library_local_first(CUDA_${_name}_LIBRARY ${_name} "\"${_name}\" library") + mark_as_advanced(CUDA_${_name}_LIBRARY) +endmacro() + +####################### +# Disable emulation for v3.1 onward +if(CUDA_VERSION VERSION_GREATER "3.0") + if(CUDA_BUILD_EMULATION) + message(FATAL_ERROR "CUDA_BUILD_EMULATION is not supported in version 3.1 and onwards. You must disable it to proceed. You have version ${CUDA_VERSION}.") + endif() +endif() + +# Search for additional CUDA toolkit libraries. +if(CUDA_VERSION VERSION_LESS "3.1") + # Emulation libraries aren't available in version 3.1 onward. + find_cuda_helper_libs(cufftemu) + find_cuda_helper_libs(cublasemu) +endif() +find_cuda_helper_libs(cufft) +find_cuda_helper_libs(cublas) +if(NOT CUDA_VERSION VERSION_LESS "3.2") + # cusparse showed up in version 3.2 + find_cuda_helper_libs(cusparse) + find_cuda_helper_libs(curand) + if (WIN32) + find_cuda_helper_libs(nvcuvenc) + find_cuda_helper_libs(nvcuvid) + endif() +endif() +if(CUDA_VERSION VERSION_GREATER "5.0" AND CUDA_VERSION VERSION_LESS "9.2") + # In CUDA 9.2 cublas_device was deprecated + find_cuda_helper_libs(cublas_device) +endif() + +if(NOT CUDA_VERSION VERSION_LESS "5.0") + find_cuda_helper_libs(nvToolsExt) + find_cuda_helper_libs(OpenCL) +endif() + +if(NOT CUDA_VERSION VERSION_LESS "9.0") + # In CUDA 9.0 NPP was nppi was removed + find_cuda_helper_libs(nppc) + find_cuda_helper_libs(nppial) + find_cuda_helper_libs(nppicc) + if(CUDA_VERSION VERSION_LESS "11.0") + find_cuda_helper_libs(nppicom) + endif() + find_cuda_helper_libs(nppidei) + find_cuda_helper_libs(nppif) + find_cuda_helper_libs(nppig) + find_cuda_helper_libs(nppim) + find_cuda_helper_libs(nppist) + find_cuda_helper_libs(nppisu) + find_cuda_helper_libs(nppitc) + find_cuda_helper_libs(npps) + set(CUDA_npp_LIBRARY "${CUDA_nppc_LIBRARY};${CUDA_nppial_LIBRARY};${CUDA_nppicc_LIBRARY};${CUDA_nppicom_LIBRARY};${CUDA_nppidei_LIBRARY};${CUDA_nppif_LIBRARY};${CUDA_nppig_LIBRARY};${CUDA_nppim_LIBRARY};${CUDA_nppist_LIBRARY};${CUDA_nppisu_LIBRARY};${CUDA_nppitc_LIBRARY};${CUDA_npps_LIBRARY}") +elseif(CUDA_VERSION VERSION_GREATER "5.0") + # In CUDA 5.5 NPP was split into 3 separate libraries. + find_cuda_helper_libs(nppc) + find_cuda_helper_libs(nppi) + find_cuda_helper_libs(npps) + set(CUDA_npp_LIBRARY "${CUDA_nppc_LIBRARY};${CUDA_nppi_LIBRARY};${CUDA_npps_LIBRARY}") +elseif(NOT CUDA_VERSION VERSION_LESS "4.0") + find_cuda_helper_libs(npp) +endif() +if(NOT CUDA_VERSION VERSION_LESS "7.0") + # cusolver showed up in version 7.0 + find_cuda_helper_libs(cusolver) +endif() + +if (CUDA_BUILD_EMULATION) + set(CUDA_CUFFT_LIBRARIES ${CUDA_cufftemu_LIBRARY}) + set(CUDA_CUBLAS_LIBRARIES ${CUDA_cublasemu_LIBRARY}) +else() + set(CUDA_CUFFT_LIBRARIES ${CUDA_cufft_LIBRARY}) + set(CUDA_CUBLAS_LIBRARIES ${CUDA_cublas_LIBRARY} ${CUDA_cublas_device_LIBRARY}) +endif() + +######################## +# Look for the SDK stuff. As of CUDA 3.0 NVSDKCUDA_ROOT has been replaced with +# NVSDKCOMPUTE_ROOT with the old CUDA C contents moved into the C subdirectory +find_path(CUDA_SDK_ROOT_DIR common/inc/cutil.h + HINTS + "$ENV{NVSDKCOMPUTE_ROOT}/C" + ENV NVSDKCUDA_ROOT + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\NVIDIA Corporation\\Installed Products\\NVIDIA SDK 10\\Compute;InstallDir]" + PATHS + "/Developer/GPU\ Computing/C" + ) + +# Keep the CUDA_SDK_ROOT_DIR first in order to be able to override the +# environment variables. +set(CUDA_SDK_SEARCH_PATH + "${CUDA_SDK_ROOT_DIR}" + "${CUDA_TOOLKIT_ROOT_DIR}/local/NVSDK0.2" + "${CUDA_TOOLKIT_ROOT_DIR}/NVSDK0.2" + "${CUDA_TOOLKIT_ROOT_DIR}/NV_CUDA_SDK" + "$ENV{HOME}/NVIDIA_CUDA_SDK" + "$ENV{HOME}/NVIDIA_CUDA_SDK_MACOSX" + "/Developer/CUDA" + ) + +# Example of how to find an include file from the CUDA_SDK_ROOT_DIR + +# find_path(CUDA_CUT_INCLUDE_DIR +# cutil.h +# PATHS ${CUDA_SDK_SEARCH_PATH} +# PATH_SUFFIXES "common/inc" +# DOC "Location of cutil.h" +# NO_DEFAULT_PATH +# ) +# # Now search system paths +# find_path(CUDA_CUT_INCLUDE_DIR cutil.h DOC "Location of cutil.h") + +# mark_as_advanced(CUDA_CUT_INCLUDE_DIR) + + +# Example of how to find a library in the CUDA_SDK_ROOT_DIR + +# # cutil library is called cutil64 for 64 bit builds on windows. We don't want +# # to get these confused, so we are setting the name based on the word size of +# # the build. + +# if(CMAKE_SIZEOF_VOID_P EQUAL 8) +# set(cuda_cutil_name cutil64) +# else() +# set(cuda_cutil_name cutil32) +# endif() + +# find_library(CUDA_CUT_LIBRARY +# NAMES cutil ${cuda_cutil_name} +# PATHS ${CUDA_SDK_SEARCH_PATH} +# # The new version of the sdk shows up in common/lib, but the old one is in lib +# PATH_SUFFIXES "common/lib" "lib" +# DOC "Location of cutil library" +# NO_DEFAULT_PATH +# ) +# # Now search system paths +# find_library(CUDA_CUT_LIBRARY NAMES cutil ${cuda_cutil_name} DOC "Location of cutil library") +# mark_as_advanced(CUDA_CUT_LIBRARY) +# set(CUDA_CUT_LIBRARIES ${CUDA_CUT_LIBRARY}) + + + +############################# +# Check for required components +set(CUDA_FOUND TRUE) + +set(CUDA_TOOLKIT_ROOT_DIR_INTERNAL "${CUDA_TOOLKIT_ROOT_DIR}" CACHE INTERNAL + "This is the value of the last time CUDA_TOOLKIT_ROOT_DIR was set successfully." FORCE) +set(CUDA_TOOLKIT_TARGET_DIR_INTERNAL "${CUDA_TOOLKIT_TARGET_DIR}" CACHE INTERNAL + "This is the value of the last time CUDA_TOOLKIT_TARGET_DIR was set successfully." FORCE) +set(CUDA_SDK_ROOT_DIR_INTERNAL "${CUDA_SDK_ROOT_DIR}" CACHE INTERNAL + "This is the value of the last time CUDA_SDK_ROOT_DIR was set successfully." FORCE) + +include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) + +find_package_handle_standard_args(CUDA + REQUIRED_VARS + CUDA_TOOLKIT_ROOT_DIR + CUDA_NVCC_EXECUTABLE + CUDA_INCLUDE_DIRS + ${CUDA_CUDART_LIBRARY_VAR} + VERSION_VAR + CUDA_VERSION + ) + + + +############################################################################### +############################################################################### +# Macros +############################################################################### +############################################################################### + +############################################################################### +# Add include directories to pass to the nvcc command. +macro(CUDA_INCLUDE_DIRECTORIES) + foreach(dir ${ARGN}) + list(APPEND CUDA_NVCC_INCLUDE_DIRS_USER ${dir}) + endforeach() +endmacro() + + +############################################################################## +cuda_find_helper_file(parse_cubin cmake) +cuda_find_helper_file(make2cmake cmake) +cuda_find_helper_file(run_nvcc cmake) +include("${CMAKE_ROOT}/Modules/FindCUDA/select_compute_arch.cmake") + +############################################################################## +# Separate the OPTIONS out from the sources +# +macro(CUDA_GET_SOURCES_AND_OPTIONS _sources _cmake_options _options) + set( ${_sources} ) + set( ${_cmake_options} ) + set( ${_options} ) + set( _found_options FALSE ) + foreach(arg ${ARGN}) + if("x${arg}" STREQUAL "xOPTIONS") + set( _found_options TRUE ) + elseif( + "x${arg}" STREQUAL "xWIN32" OR + "x${arg}" STREQUAL "xMACOSX_BUNDLE" OR + "x${arg}" STREQUAL "xEXCLUDE_FROM_ALL" OR + "x${arg}" STREQUAL "xSTATIC" OR + "x${arg}" STREQUAL "xSHARED" OR + "x${arg}" STREQUAL "xMODULE" + ) + list(APPEND ${_cmake_options} ${arg}) + else() + if ( _found_options ) + list(APPEND ${_options} ${arg}) + else() + # Assume this is a file + list(APPEND ${_sources} ${arg}) + endif() + endif() + endforeach() +endmacro() + +############################################################################## +# Parse the OPTIONS from ARGN and set the variables prefixed by _option_prefix +# +macro(CUDA_PARSE_NVCC_OPTIONS _option_prefix) + set( _found_config ) + foreach(arg ${ARGN}) + # Determine if we are dealing with a perconfiguration flag + foreach(config ${CUDA_configuration_types}) + string(TOUPPER ${config} config_upper) + if (arg STREQUAL "${config_upper}") + set( _found_config _${arg}) + # Set arg to nothing to keep it from being processed further + set( arg ) + endif() + endforeach() + + if ( arg ) + list(APPEND ${_option_prefix}${_found_config} "${arg}") + endif() + endforeach() +endmacro() + +############################################################################## +# Helper to add the include directory for CUDA only once +function(CUDA_ADD_CUDA_INCLUDE_ONCE) + get_directory_property(_include_directories INCLUDE_DIRECTORIES) + set(_add TRUE) + if(_include_directories) + foreach(dir ${_include_directories}) + if("${dir}" STREQUAL "${CUDA_INCLUDE_DIRS}") + set(_add FALSE) + endif() + endforeach() + endif() + if(_add) + include_directories(${CUDA_INCLUDE_DIRS}) + endif() +endfunction() + +function(CUDA_BUILD_SHARED_LIBRARY shared_flag) + set(cmake_args ${ARGN}) + # If SHARED, MODULE, or STATIC aren't already in the list of arguments, then + # add SHARED or STATIC based on the value of BUILD_SHARED_LIBS. + list(FIND cmake_args SHARED _cuda_found_SHARED) + list(FIND cmake_args MODULE _cuda_found_MODULE) + list(FIND cmake_args STATIC _cuda_found_STATIC) + if( _cuda_found_SHARED GREATER -1 OR + _cuda_found_MODULE GREATER -1 OR + _cuda_found_STATIC GREATER -1) + set(_cuda_build_shared_libs) + else() + if (BUILD_SHARED_LIBS) + set(_cuda_build_shared_libs SHARED) + else() + set(_cuda_build_shared_libs STATIC) + endif() + endif() + set(${shared_flag} ${_cuda_build_shared_libs} PARENT_SCOPE) +endfunction() + +############################################################################## +# Helper to avoid clashes of files with the same basename but different paths. +# This doesn't attempt to do exactly what CMake internals do, which is to only +# add this path when there is a conflict, since by the time a second collision +# in names is detected it's already too late to fix the first one. For +# consistency sake the relative path will be added to all files. +function(CUDA_COMPUTE_BUILD_PATH path build_path) + #message("CUDA_COMPUTE_BUILD_PATH([${path}] ${build_path})") + # Only deal with CMake style paths from here on out + file(TO_CMAKE_PATH "${path}" bpath) + if (IS_ABSOLUTE "${bpath}") + # Absolute paths are generally unnessary, especially if something like + # file(GLOB_RECURSE) is used to pick up the files. + + string(FIND "${bpath}" "${CMAKE_CURRENT_BINARY_DIR}" _binary_dir_pos) + if (_binary_dir_pos EQUAL 0) + file(RELATIVE_PATH bpath "${CMAKE_CURRENT_BINARY_DIR}" "${bpath}") + else() + file(RELATIVE_PATH bpath "${CMAKE_CURRENT_SOURCE_DIR}" "${bpath}") + endif() + endif() + + # This recipe is from cmLocalGenerator::CreateSafeUniqueObjectFileName in the + # CMake source. + + # Remove leading / + string(REGEX REPLACE "^[/]+" "" bpath "${bpath}") + # Avoid absolute paths by removing ':' + string(REPLACE ":" "_" bpath "${bpath}") + # Avoid relative paths that go up the tree + string(REPLACE "../" "__/" bpath "${bpath}") + # Avoid spaces + string(REPLACE " " "_" bpath "${bpath}") + + # Strip off the filename. I wait until here to do it, since removin the + # basename can make a path that looked like path/../basename turn into + # path/.. (notice the trailing slash). + get_filename_component(bpath "${bpath}" PATH) + + set(${build_path} "${bpath}" PARENT_SCOPE) + #message("${build_path} = ${bpath}") +endfunction() + +############################################################################## +# This helper macro populates the following variables and setups up custom +# commands and targets to invoke the nvcc compiler to generate C or PTX source +# dependent upon the format parameter. The compiler is invoked once with -M +# to generate a dependency file and a second time with -cuda or -ptx to generate +# a .cpp or .ptx file. +# INPUT: +# cuda_target - Target name +# format - PTX, CUBIN, FATBIN or OBJ +# FILE1 .. FILEN - The remaining arguments are the sources to be wrapped. +# OPTIONS - Extra options to NVCC +# OUTPUT: +# generated_files - List of generated files +############################################################################## +############################################################################## + +macro(CUDA_WRAP_SRCS cuda_target format generated_files) + + # Put optional arguments in list. + set(_argn_list "${ARGN}") + # If one of the given optional arguments is "PHONY", make a note of it, then + # remove it from the list. + list(FIND _argn_list "PHONY" _phony_idx) + if("${_phony_idx}" GREATER "-1") + set(_target_is_phony true) + list(REMOVE_AT _argn_list ${_phony_idx}) + else() + set(_target_is_phony false) + endif() + + # If CMake doesn't support separable compilation, complain + if(CUDA_SEPARABLE_COMPILATION AND CMAKE_VERSION VERSION_LESS "2.8.10.1") + message(SEND_ERROR "CUDA_SEPARABLE_COMPILATION isn't supported for CMake versions less than 2.8.10.1") + endif() + + # Set up all the command line flags here, so that they can be overridden on a per target basis. + + set(nvcc_flags "") + + # Emulation if the card isn't present. + if (CUDA_BUILD_EMULATION) + # Emulation. + set(nvcc_flags ${nvcc_flags} --device-emulation -D_DEVICEEMU -g) + else() + # Device mode. No flags necessary. + endif() + + if(CUDA_HOST_COMPILATION_CPP) + set(CUDA_C_OR_CXX CXX) + else() + if(CUDA_VERSION VERSION_LESS "3.0") + set(nvcc_flags ${nvcc_flags} --host-compilation C) + else() + message(WARNING "--host-compilation flag is deprecated in CUDA version >= 3.0. Removing --host-compilation C flag" ) + endif() + set(CUDA_C_OR_CXX C) + endif() + + set(generated_extension ${CMAKE_${CUDA_C_OR_CXX}_OUTPUT_EXTENSION}) + + if(CUDA_64_BIT_DEVICE_CODE) + set(nvcc_flags ${nvcc_flags} -m64) + else() + set(nvcc_flags ${nvcc_flags} -m32) + endif() + + if(CUDA_TARGET_CPU_ARCH) + set(nvcc_flags ${nvcc_flags} "--target-cpu-architecture=${CUDA_TARGET_CPU_ARCH}") + endif() + + # This needs to be passed in at this stage, because VS needs to fill out the + # various macros from within VS. Note that CCBIN is only used if + # -ccbin or --compiler-bindir isn't used and CUDA_HOST_COMPILER matches + # _CUDA_MSVC_HOST_COMPILER + if(CMAKE_GENERATOR MATCHES "Visual Studio") + set(ccbin_flags -D "\"CCBIN:PATH=${_CUDA_MSVC_HOST_COMPILER}\"" ) + else() + set(ccbin_flags) + endif() + + # Figure out which configure we will use and pass that in as an argument to + # the script. We need to defer the decision until compilation time, because + # for VS projects we won't know if we are making a debug or release build + # until build time. + if(CMAKE_GENERATOR MATCHES "Visual Studio") + set( CUDA_build_configuration "$(ConfigurationName)" ) + else() + set( CUDA_build_configuration "${CMAKE_BUILD_TYPE}") + endif() + + # Initialize our list of includes with the user ones followed by the CUDA system ones. + set(CUDA_NVCC_INCLUDE_DIRS ${CUDA_NVCC_INCLUDE_DIRS_USER} "${CUDA_INCLUDE_DIRS}") + if(_target_is_phony) + # If the passed in target name isn't a real target (i.e., this is from a call to one of the + # cuda_compile_* functions), need to query directory properties to get include directories + # and compile definitions. + get_directory_property(_dir_include_dirs INCLUDE_DIRECTORIES) + get_directory_property(_dir_compile_defs COMPILE_DEFINITIONS) + + list(APPEND CUDA_NVCC_INCLUDE_DIRS "${_dir_include_dirs}") + set(CUDA_NVCC_COMPILE_DEFINITIONS "${_dir_compile_defs}") + else() + # Append the include directories for this target via generator expression, which is + # expanded by the FILE(GENERATE) call below. This generator expression captures all + # include dirs set by the user, whether via directory properties or target properties + list(APPEND CUDA_NVCC_INCLUDE_DIRS "$") + + # Do the same thing with compile definitions + set(CUDA_NVCC_COMPILE_DEFINITIONS "$") + endif() + + + # Reset these variables + set(CUDA_WRAP_OPTION_NVCC_FLAGS) + foreach(config ${CUDA_configuration_types}) + string(TOUPPER ${config} config_upper) + set(CUDA_WRAP_OPTION_NVCC_FLAGS_${config_upper}) + endforeach() + + CUDA_GET_SOURCES_AND_OPTIONS(_cuda_wrap_sources _cuda_wrap_cmake_options _cuda_wrap_options ${_argn_list}) + CUDA_PARSE_NVCC_OPTIONS(CUDA_WRAP_OPTION_NVCC_FLAGS ${_cuda_wrap_options}) + + # Figure out if we are building a shared library. BUILD_SHARED_LIBS is + # respected in CUDA_ADD_LIBRARY. + set(_cuda_build_shared_libs FALSE) + # SHARED, MODULE + list(FIND _cuda_wrap_cmake_options SHARED _cuda_found_SHARED) + list(FIND _cuda_wrap_cmake_options MODULE _cuda_found_MODULE) + if(_cuda_found_SHARED GREATER -1 OR _cuda_found_MODULE GREATER -1) + set(_cuda_build_shared_libs TRUE) + endif() + # STATIC + list(FIND _cuda_wrap_cmake_options STATIC _cuda_found_STATIC) + if(_cuda_found_STATIC GREATER -1) + set(_cuda_build_shared_libs FALSE) + endif() + + # CUDA_HOST_FLAGS + if(_cuda_build_shared_libs) + # If we are setting up code for a shared library, then we need to add extra flags for + # compiling objects for shared libraries. + set(CUDA_HOST_SHARED_FLAGS ${CMAKE_SHARED_LIBRARY_${CUDA_C_OR_CXX}_FLAGS}) + else() + set(CUDA_HOST_SHARED_FLAGS) + endif() + # Only add the CMAKE_{C,CXX}_FLAGS if we are propagating host flags. We + # always need to set the SHARED_FLAGS, though. + if(CUDA_PROPAGATE_HOST_FLAGS) + set(_cuda_host_flags "set(CMAKE_HOST_FLAGS ${CMAKE_${CUDA_C_OR_CXX}_FLAGS} ${CUDA_HOST_SHARED_FLAGS})") + else() + set(_cuda_host_flags "set(CMAKE_HOST_FLAGS ${CUDA_HOST_SHARED_FLAGS})") + endif() + + set(_cuda_nvcc_flags_config "# Build specific configuration flags") + # Loop over all the configuration types to generate appropriate flags for run_nvcc.cmake + foreach(config ${CUDA_configuration_types}) + string(TOUPPER ${config} config_upper) + # CMAKE_FLAGS are strings and not lists. By not putting quotes around CMAKE_FLAGS + # we convert the strings to lists (like we want). + + if(CUDA_PROPAGATE_HOST_FLAGS) + # nvcc chokes on -g3 in versions previous to 3.0, so replace it with -g + set(_cuda_fix_g3 FALSE) + + if(CMAKE_COMPILER_IS_GNUCC) + if (CUDA_VERSION VERSION_LESS "3.0" OR + CUDA_VERSION VERSION_EQUAL "4.1" OR + CUDA_VERSION VERSION_EQUAL "4.2" + ) + set(_cuda_fix_g3 TRUE) + endif() + endif() + if(_cuda_fix_g3) + string(REPLACE "-g3" "-g" _cuda_C_FLAGS "${CMAKE_${CUDA_C_OR_CXX}_FLAGS_${config_upper}}") + else() + set(_cuda_C_FLAGS "${CMAKE_${CUDA_C_OR_CXX}_FLAGS_${config_upper}}") + endif() + + string(APPEND _cuda_host_flags "\nset(CMAKE_HOST_FLAGS_${config_upper} ${_cuda_C_FLAGS})") + endif() + + # Note that if we ever want CUDA_NVCC_FLAGS_ to be string (instead of a list + # like it is currently), we can remove the quotes around the + # ${CUDA_NVCC_FLAGS_${config_upper}} variable like the CMAKE_HOST_FLAGS_ variable. + string(APPEND _cuda_nvcc_flags_config "\nset(CUDA_NVCC_FLAGS_${config_upper} ${CUDA_NVCC_FLAGS_${config_upper}} ;; ${CUDA_WRAP_OPTION_NVCC_FLAGS_${config_upper}})") + endforeach() + + # Process the C++11 flag. If the host sets the flag, we need to add it to nvcc and + # remove it from the host. This is because -Xcompile -std=c++ will choke nvcc (it uses + # the C preprocessor). In order to get this to work correctly, we need to use nvcc's + # specific c++11 flag. + if( "${_cuda_host_flags}" MATCHES "-std=c\\+\\+11") + # Add the c++11 flag to nvcc if it isn't already present. Note that we only look at + # the main flag instead of the configuration specific flags. + if( NOT "${CUDA_NVCC_FLAGS}" MATCHES "-std=c\\+\\+11" ) + list(APPEND nvcc_flags --std c++11) + endif() + string(REGEX REPLACE "[-]+std=c\\+\\+11" "" _cuda_host_flags "${_cuda_host_flags}") + endif() + + if(_cuda_build_shared_libs) + list(APPEND nvcc_flags "-D${cuda_target}_EXPORTS") + endif() + + # Reset the output variable + set(_cuda_wrap_generated_files "") + + # Iterate over the macro arguments and create custom + # commands for all the .cu files. + foreach(file ${_argn_list}) + # Ignore any file marked as a HEADER_FILE_ONLY + get_source_file_property(_is_header ${file} HEADER_FILE_ONLY) + # Allow per source file overrides of the format. Also allows compiling non-.cu files. + get_source_file_property(_cuda_source_format ${file} CUDA_SOURCE_PROPERTY_FORMAT) + if((${file} MATCHES "\\.cu$" OR _cuda_source_format) AND NOT _is_header) + + if(NOT _cuda_source_format) + set(_cuda_source_format ${format}) + endif() + # If file isn't a .cu file, we need to tell nvcc to treat it as such. + if(NOT ${file} MATCHES "\\.cu$") + set(cuda_language_flag -x=cu) + else() + set(cuda_language_flag) + endif() + + if( ${_cuda_source_format} MATCHES "OBJ") + set( cuda_compile_to_external_module OFF ) + else() + set( cuda_compile_to_external_module ON ) + if( ${_cuda_source_format} MATCHES "PTX" ) + set( cuda_compile_to_external_module_type "ptx" ) + elseif( ${_cuda_source_format} MATCHES "CUBIN") + set( cuda_compile_to_external_module_type "cubin" ) + elseif( ${_cuda_source_format} MATCHES "FATBIN") + set( cuda_compile_to_external_module_type "fatbin" ) + else() + message( FATAL_ERROR "Invalid format flag passed to CUDA_WRAP_SRCS or set with CUDA_SOURCE_PROPERTY_FORMAT file property for file '${file}': '${_cuda_source_format}'. Use OBJ, PTX, CUBIN or FATBIN.") + endif() + endif() + + if(cuda_compile_to_external_module) + # Don't use any of the host compilation flags for PTX targets. + set(CUDA_HOST_FLAGS) + set(CUDA_NVCC_FLAGS_CONFIG) + else() + set(CUDA_HOST_FLAGS ${_cuda_host_flags}) + set(CUDA_NVCC_FLAGS_CONFIG ${_cuda_nvcc_flags_config}) + endif() + + # Determine output directory + cuda_compute_build_path("${file}" cuda_build_path) + set(cuda_compile_intermediate_directory "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${cuda_target}.dir/${cuda_build_path}") + if(CUDA_GENERATED_OUTPUT_DIR) + set(cuda_compile_output_dir "${CUDA_GENERATED_OUTPUT_DIR}") + else() + if ( cuda_compile_to_external_module ) + set(cuda_compile_output_dir "${CMAKE_CURRENT_BINARY_DIR}") + else() + set(cuda_compile_output_dir "${cuda_compile_intermediate_directory}") + endif() + endif() + + # Add a custom target to generate a c or ptx file. ###################### + + get_filename_component( basename ${file} NAME ) + if( cuda_compile_to_external_module ) + set(generated_file_path "${cuda_compile_output_dir}") + set(generated_file_basename "${cuda_target}_generated_${basename}.${cuda_compile_to_external_module_type}") + set(format_flag "-${cuda_compile_to_external_module_type}") + file(MAKE_DIRECTORY "${cuda_compile_output_dir}") + else() + set(generated_file_path "${cuda_compile_output_dir}/${CMAKE_CFG_INTDIR}") + set(generated_file_basename "${cuda_target}_generated_${basename}${generated_extension}") + if(CUDA_SEPARABLE_COMPILATION) + set(format_flag "-dc") + else() + set(format_flag "-c") + endif() + endif() + + # Set all of our file names. Make sure that whatever filenames that have + # generated_file_path in them get passed in through as a command line + # argument, so that the ${CMAKE_CFG_INTDIR} gets expanded at run time + # instead of configure time. + set(generated_file "${generated_file_path}/${generated_file_basename}") + set(cmake_dependency_file "${cuda_compile_intermediate_directory}/${generated_file_basename}.depend") + set(NVCC_generated_dependency_file "${cuda_compile_intermediate_directory}/${generated_file_basename}.NVCC-depend") + set(generated_cubin_file "${generated_file_path}/${generated_file_basename}.cubin.txt") + set(custom_target_script_pregen "${cuda_compile_intermediate_directory}/${generated_file_basename}.cmake.pre-gen") + set(custom_target_script "${cuda_compile_intermediate_directory}/${generated_file_basename}$<$>:.$>.cmake") + + # Setup properties for obj files: + if( NOT cuda_compile_to_external_module ) + set_source_files_properties("${generated_file}" + PROPERTIES + EXTERNAL_OBJECT true # This is an object file not to be compiled, but only be linked. + ) + endif() + + # Don't add CMAKE_CURRENT_SOURCE_DIR if the path is already an absolute path. + get_filename_component(file_path "${file}" PATH) + if(IS_ABSOLUTE "${file_path}") + set(source_file "${file}") + else() + set(source_file "${CMAKE_CURRENT_SOURCE_DIR}/${file}") + endif() + + if( NOT cuda_compile_to_external_module AND CUDA_SEPARABLE_COMPILATION) + list(APPEND ${cuda_target}_SEPARABLE_COMPILATION_OBJECTS "${generated_file}") + endif() + + # Bring in the dependencies. Creates a variable CUDA_NVCC_DEPEND ####### + cuda_include_nvcc_dependencies(${cmake_dependency_file}) + + # Convenience string for output ######################################### + if(CUDA_BUILD_EMULATION) + set(cuda_build_type "Emulation") + else() + set(cuda_build_type "Device") + endif() + + # Build the NVCC made dependency file ################################### + set(build_cubin OFF) + if ( NOT CUDA_BUILD_EMULATION AND CUDA_BUILD_CUBIN ) + if ( NOT cuda_compile_to_external_module ) + set ( build_cubin ON ) + endif() + endif() + + # Configure the build script + configure_file("${CUDA_run_nvcc}" "${custom_target_script_pregen}" @ONLY) + file(GENERATE + OUTPUT "${custom_target_script}" + INPUT "${custom_target_script_pregen}" + ) + + # So if a user specifies the same cuda file as input more than once, you + # can have bad things happen with dependencies. Here we check an option + # to see if this is the behavior they want. + if(CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE) + set(main_dep MAIN_DEPENDENCY ${source_file}) + else() + set(main_dep DEPENDS ${source_file}) + endif() + + if(CUDA_VERBOSE_BUILD) + set(verbose_output ON) + elseif(CMAKE_GENERATOR MATCHES "Makefiles") + set(verbose_output "$(VERBOSE)") + else() + set(verbose_output OFF) + endif() + + # Create up the comment string + file(RELATIVE_PATH generated_file_relative_path "${CMAKE_BINARY_DIR}" "${generated_file}") + if(cuda_compile_to_external_module) + set(cuda_build_comment_string "Building NVCC ${cuda_compile_to_external_module_type} file ${generated_file_relative_path}") + else() + set(cuda_build_comment_string "Building NVCC (${cuda_build_type}) object ${generated_file_relative_path}") + endif() + + set(_verbatim VERBATIM) + if(ccbin_flags MATCHES "\\$\\(VCInstallDir\\)") + set(_verbatim "") + endif() + + # Build the generated file and dependency file ########################## + add_custom_command( + OUTPUT ${generated_file} + # These output files depend on the source_file and the contents of cmake_dependency_file + ${main_dep} + DEPENDS ${CUDA_NVCC_DEPEND} + DEPENDS ${custom_target_script} + # Make sure the output directory exists before trying to write to it. + COMMAND ${CMAKE_COMMAND} -E make_directory "${generated_file_path}" + COMMAND ${CMAKE_COMMAND} ARGS + -D verbose:BOOL=${verbose_output} + ${ccbin_flags} + -D build_configuration:STRING=${CUDA_build_configuration} + -D "generated_file:STRING=${generated_file}" + -D "generated_cubin_file:STRING=${generated_cubin_file}" + -P "${custom_target_script}" + WORKING_DIRECTORY "${cuda_compile_intermediate_directory}" + COMMENT "${cuda_build_comment_string}" + ${_verbatim} + ) + + # Make sure the build system knows the file is generated. + set_source_files_properties(${generated_file} PROPERTIES GENERATED TRUE) + + list(APPEND _cuda_wrap_generated_files ${generated_file}) + + # Add the other files that we want cmake to clean on a cleanup ########## + list(APPEND CUDA_ADDITIONAL_CLEAN_FILES "${cmake_dependency_file}") + list(REMOVE_DUPLICATES CUDA_ADDITIONAL_CLEAN_FILES) + set(CUDA_ADDITIONAL_CLEAN_FILES ${CUDA_ADDITIONAL_CLEAN_FILES} CACHE INTERNAL "List of intermediate files that are part of the cuda dependency scanning.") + + endif() + endforeach() + + # Set the return parameter + set(${generated_files} ${_cuda_wrap_generated_files}) +endmacro() + +function(_cuda_get_important_host_flags important_flags flag_string) + if(CMAKE_GENERATOR MATCHES "Visual Studio") + string(REGEX MATCHALL "/M[DT][d]?" flags "${flag_string}") + list(APPEND ${important_flags} ${flags}) + else() + string(REGEX MATCHALL "-fPIC" flags "${flag_string}") + list(APPEND ${important_flags} ${flags}) + endif() + set(${important_flags} ${${important_flags}} PARENT_SCOPE) +endfunction() + +############################################################################### +############################################################################### +# Separable Compilation Link +############################################################################### +############################################################################### + +# Compute the filename to be used by CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS +function(CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME output_file_var cuda_target object_files) + if (object_files) + set(generated_extension ${CMAKE_${CUDA_C_OR_CXX}_OUTPUT_EXTENSION}) + set(output_file "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${cuda_target}.dir/${CMAKE_CFG_INTDIR}/${cuda_target}_intermediate_link${generated_extension}") + else() + set(output_file) + endif() + + set(${output_file_var} "${output_file}" PARENT_SCOPE) +endfunction() + +# Setup the build rule for the separable compilation intermediate link file. +function(CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS output_file cuda_target options object_files) + if (object_files) + + set_source_files_properties("${output_file}" + PROPERTIES + EXTERNAL_OBJECT TRUE # This is an object file not to be compiled, but only + # be linked. + GENERATED TRUE # This file is generated during the build + ) + + # For now we are ignoring all the configuration specific flags. + set(nvcc_flags) + CUDA_PARSE_NVCC_OPTIONS(nvcc_flags ${options}) + if(CUDA_64_BIT_DEVICE_CODE) + list(APPEND nvcc_flags -m64) + else() + list(APPEND nvcc_flags -m32) + endif() + # If -ccbin, --compiler-bindir has been specified, don't do anything. Otherwise add it here. + list( FIND nvcc_flags "-ccbin" ccbin_found0 ) + list( FIND nvcc_flags "--compiler-bindir" ccbin_found1 ) + if( ccbin_found0 LESS 0 AND ccbin_found1 LESS 0 AND CUDA_HOST_COMPILER ) + # Match VERBATIM check below. + if(CUDA_HOST_COMPILER MATCHES "\\$\\(VCInstallDir\\)") + list(APPEND nvcc_flags -ccbin "\"${CUDA_HOST_COMPILER}\"") + else() + list(APPEND nvcc_flags -ccbin "${CUDA_HOST_COMPILER}") + endif() + endif() + + # Create a list of flags specified by CUDA_NVCC_FLAGS_${CONFIG} and CMAKE_${CUDA_C_OR_CXX}_FLAGS* + set(config_specific_flags) + set(flags) + foreach(config ${CUDA_configuration_types}) + string(TOUPPER ${config} config_upper) + # Add config specific flags + foreach(f ${CUDA_NVCC_FLAGS_${config_upper}}) + list(APPEND config_specific_flags $<$:${f}>) + endforeach() + set(important_host_flags) + _cuda_get_important_host_flags(important_host_flags "${CMAKE_${CUDA_C_OR_CXX}_FLAGS_${config_upper}}") + foreach(f ${important_host_flags}) + list(APPEND flags $<$:-Xcompiler> $<$:${f}>) + endforeach() + endforeach() + # Add CMAKE_${CUDA_C_OR_CXX}_FLAGS + set(important_host_flags) + _cuda_get_important_host_flags(important_host_flags "${CMAKE_${CUDA_C_OR_CXX}_FLAGS}") + foreach(f ${important_host_flags}) + list(APPEND flags -Xcompiler ${f}) + endforeach() + + # Add our general CUDA_NVCC_FLAGS with the configuration specifig flags + set(nvcc_flags ${CUDA_NVCC_FLAGS} ${config_specific_flags} ${nvcc_flags}) + + file(RELATIVE_PATH output_file_relative_path "${CMAKE_BINARY_DIR}" "${output_file}") + + # Some generators don't handle the multiple levels of custom command + # dependencies correctly (obj1 depends on file1, obj2 depends on obj1), so + # we work around that issue by compiling the intermediate link object as a + # pre-link custom command in that situation. + set(do_obj_build_rule TRUE) + if (MSVC_VERSION GREATER 1599 AND MSVC_VERSION LESS 1800) + # VS 2010 and 2012 have this problem. + set(do_obj_build_rule FALSE) + endif() + + set(_verbatim VERBATIM) + if(nvcc_flags MATCHES "\\$\\(VCInstallDir\\)") + set(_verbatim "") + endif() + + if (do_obj_build_rule) + add_custom_command( + OUTPUT ${output_file} + DEPENDS ${object_files} + COMMAND ${CUDA_NVCC_EXECUTABLE} ${nvcc_flags} -dlink ${object_files} -o ${output_file} + ${flags} + COMMENT "Building NVCC intermediate link file ${output_file_relative_path}" + COMMAND_EXPAND_LISTS + ${_verbatim} + ) + else() + get_filename_component(output_file_dir "${output_file}" DIRECTORY) + add_custom_command( + TARGET ${cuda_target} + PRE_LINK + COMMAND ${CMAKE_COMMAND} -E echo "Building NVCC intermediate link file ${output_file_relative_path}" + COMMAND ${CMAKE_COMMAND} -E make_directory "${output_file_dir}" + COMMAND ${CUDA_NVCC_EXECUTABLE} ${nvcc_flags} ${flags} -dlink ${object_files} -o "${output_file}" + COMMAND_EXPAND_LISTS + ${_verbatim} + ) + endif() + endif() +endfunction() + +############################################################################### +############################################################################### +# ADD LIBRARY +############################################################################### +############################################################################### +macro(CUDA_ADD_LIBRARY cuda_target) + + CUDA_ADD_CUDA_INCLUDE_ONCE() + + # Separate the sources from the options + CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN}) + CUDA_BUILD_SHARED_LIBRARY(_cuda_shared_flag ${ARGN}) + # Create custom commands and targets for each file. + CUDA_WRAP_SRCS( ${cuda_target} OBJ _generated_files ${_sources} + ${_cmake_options} ${_cuda_shared_flag} + OPTIONS ${_options} ) + + # Compute the file name of the intermedate link file used for separable + # compilation. + CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME(link_file ${cuda_target} "${${cuda_target}_SEPARABLE_COMPILATION_OBJECTS}") + + # Add the library. + add_library(${cuda_target} ${_cmake_options} + ${_generated_files} + ${_sources} + ${link_file} + ) + + # Add a link phase for the separable compilation if it has been enabled. If + # it has been enabled then the ${cuda_target}_SEPARABLE_COMPILATION_OBJECTS + # variable will have been defined. + CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS("${link_file}" ${cuda_target} "${_options}" "${${cuda_target}_SEPARABLE_COMPILATION_OBJECTS}") + + target_link_libraries(${cuda_target} ${CUDA_LINK_LIBRARIES_KEYWORD} + ${CUDA_LIBRARIES} + ) + + if(CUDA_SEPARABLE_COMPILATION) + target_link_libraries(${cuda_target} ${CUDA_LINK_LIBRARIES_KEYWORD} + ${CUDA_cudadevrt_LIBRARY} + ) + endif() + + # We need to set the linker language based on what the expected generated file + # would be. CUDA_C_OR_CXX is computed based on CUDA_HOST_COMPILATION_CPP. + set_target_properties(${cuda_target} + PROPERTIES + LINKER_LANGUAGE ${CUDA_C_OR_CXX} + ) + +endmacro() + + +############################################################################### +############################################################################### +# ADD EXECUTABLE +############################################################################### +############################################################################### +macro(CUDA_ADD_EXECUTABLE cuda_target) + + CUDA_ADD_CUDA_INCLUDE_ONCE() + + # Separate the sources from the options + CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN}) + # Create custom commands and targets for each file. + CUDA_WRAP_SRCS( ${cuda_target} OBJ _generated_files ${_sources} OPTIONS ${_options} ) + + # Compute the file name of the intermedate link file used for separable + # compilation. + CUDA_COMPUTE_SEPARABLE_COMPILATION_OBJECT_FILE_NAME(link_file ${cuda_target} "${${cuda_target}_SEPARABLE_COMPILATION_OBJECTS}") + + # Add the library. + add_executable(${cuda_target} ${_cmake_options} + ${_generated_files} + ${_sources} + ${link_file} + ) + + # Add a link phase for the separable compilation if it has been enabled. If + # it has been enabled then the ${cuda_target}_SEPARABLE_COMPILATION_OBJECTS + # variable will have been defined. + CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS("${link_file}" ${cuda_target} "${_options}" "${${cuda_target}_SEPARABLE_COMPILATION_OBJECTS}") + + target_link_libraries(${cuda_target} ${CUDA_LINK_LIBRARIES_KEYWORD} + ${CUDA_LIBRARIES} + ) + + # We need to set the linker language based on what the expected generated file + # would be. CUDA_C_OR_CXX is computed based on CUDA_HOST_COMPILATION_CPP. + set_target_properties(${cuda_target} + PROPERTIES + LINKER_LANGUAGE ${CUDA_C_OR_CXX} + ) + +endmacro() + + +############################################################################### +############################################################################### +# (Internal) helper for manually added cuda source files with specific targets +############################################################################### +############################################################################### +macro(cuda_compile_base cuda_target format generated_files) + # Update a counter in this directory, to keep phony target names unique. + set(_cuda_target "${cuda_target}") + get_property(_counter DIRECTORY PROPERTY _cuda_internal_phony_counter) + if(_counter) + math(EXPR _counter "${_counter} + 1") + else() + set(_counter 1) + endif() + string(APPEND _cuda_target "_${_counter}") + set_property(DIRECTORY PROPERTY _cuda_internal_phony_counter ${_counter}) + + # Separate the sources from the options + CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN}) + + # Create custom commands and targets for each file. + CUDA_WRAP_SRCS( ${_cuda_target} ${format} _generated_files ${_sources} + ${_cmake_options} OPTIONS ${_options} PHONY) + + set( ${generated_files} ${_generated_files}) + +endmacro() + +############################################################################### +############################################################################### +# CUDA COMPILE +############################################################################### +############################################################################### +macro(CUDA_COMPILE generated_files) + cuda_compile_base(cuda_compile OBJ ${generated_files} ${ARGN}) +endmacro() + +############################################################################### +############################################################################### +# CUDA COMPILE PTX +############################################################################### +############################################################################### +macro(CUDA_COMPILE_PTX generated_files) + cuda_compile_base(cuda_compile_ptx PTX ${generated_files} ${ARGN}) +endmacro() + +############################################################################### +############################################################################### +# CUDA COMPILE FATBIN +############################################################################### +############################################################################### +macro(CUDA_COMPILE_FATBIN generated_files) + cuda_compile_base(cuda_compile_fatbin FATBIN ${generated_files} ${ARGN}) +endmacro() + +############################################################################### +############################################################################### +# CUDA COMPILE CUBIN +############################################################################### +############################################################################### +macro(CUDA_COMPILE_CUBIN generated_files) + cuda_compile_base(cuda_compile_cubin CUBIN ${generated_files} ${ARGN}) +endmacro() + + +############################################################################### +############################################################################### +# CUDA ADD CUFFT TO TARGET +############################################################################### +############################################################################### +macro(CUDA_ADD_CUFFT_TO_TARGET target) + if (CUDA_BUILD_EMULATION) + target_link_libraries(${target} ${CUDA_LINK_LIBRARIES_KEYWORD} ${CUDA_cufftemu_LIBRARY}) + else() + target_link_libraries(${target} ${CUDA_LINK_LIBRARIES_KEYWORD} ${CUDA_cufft_LIBRARY}) + endif() +endmacro() + +############################################################################### +############################################################################### +# CUDA ADD CUBLAS TO TARGET +############################################################################### +############################################################################### +macro(CUDA_ADD_CUBLAS_TO_TARGET target) + if (CUDA_BUILD_EMULATION) + target_link_libraries(${target} ${CUDA_LINK_LIBRARIES_KEYWORD} ${CUDA_cublasemu_LIBRARY}) + else() + target_link_libraries(${target} ${CUDA_LINK_LIBRARIES_KEYWORD} ${CUDA_cublas_LIBRARY} ${CUDA_cublas_device_LIBRARY}) + endif() +endmacro() + +############################################################################### +############################################################################### +# CUDA BUILD CLEAN TARGET +############################################################################### +############################################################################### +macro(CUDA_BUILD_CLEAN_TARGET) + # Call this after you add all your CUDA targets, and you will get a + # convenience target. You should also make clean after running this target + # to get the build system to generate all the code again. + + set(cuda_clean_target_name clean_cuda_depends) + if (CMAKE_GENERATOR MATCHES "Visual Studio") + string(TOUPPER ${cuda_clean_target_name} cuda_clean_target_name) + endif() + add_custom_target(${cuda_clean_target_name} + COMMAND ${CMAKE_COMMAND} -E rm -f ${CUDA_ADDITIONAL_CLEAN_FILES}) + + # Clear out the variable, so the next time we configure it will be empty. + # This is useful so that the files won't persist in the list after targets + # have been removed. + set(CUDA_ADDITIONAL_CLEAN_FILES "" CACHE INTERNAL "List of intermediate files that are part of the cuda dependency scanning.") +endmacro() diff --git a/vcpkg/ports/opencv4/portfile.cmake b/vcpkg/ports/opencv4/portfile.cmake new file mode 100644 index 0000000..0ea97e7 --- /dev/null +++ b/vcpkg/ports/opencv4/portfile.cmake @@ -0,0 +1,473 @@ +if (EXISTS "${CURRENT_INSTALLED_DIR}/share/opencv2") + message(FATAL_ERROR "OpenCV 2 is installed, please uninstall and try again:\n vcpkg remove opencv2") +endif() + +if (EXISTS "${CURRENT_INSTALLED_DIR}/share/opencv3") + message(FATAL_ERROR "OpenCV 3 is installed, please uninstall and try again:\n vcpkg remove opencv3") +endif() + +set(OPENCV_VERSION "4.3.0") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO opencv/opencv + REF ${OPENCV_VERSION} + SHA512 ac22b41fffa3e3138701fa0df0d19900b3ce72e168f4478ecdc593c5c9fd004b4b1b26612d62c25b681db99a8720db7a11b5b224e576e595624965fa79b0f383 + HEAD_REF master + PATCHES + 0001-disable-downloading.patch + 0002-install-options.patch + 0003-force-package-requirements.patch + 0004-fix-policy-CMP0057.patch + 0009-fix-uwp.patch +) + +file(REMOVE "${SOURCE_PATH}/cmake/FindCUDNN.cmake") +file(REMOVE "${SOURCE_PATH}/cmake/FindCUDA.cmake") +file(REMOVE_RECURSE "${SOURCE_PATH}/cmake/FindCUDA") +file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindCUDA.cmake DESTINATION ${SOURCE_PATH}/cmake/) # backported from CMake 3.18, remove when released + +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_WITH_STATIC_CRT) + +set(ADE_DIR ${CURRENT_INSTALLED_DIR}/share/ade CACHE PATH "Path to existing ADE CMake Config file") + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + "ade" WITH_ADE + "contrib" WITH_CONTRIB + "cuda" WITH_CUDA + "cuda" WITH_CUBLAS + "eigen" WITH_EIGEN + "ffmpeg" WITH_FFMPEG + "gdcm" WITH_GDCM + "halide" WITH_HALIDE + "jasper" WITH_JASPER + "jpeg" WITH_JPEG + "nonfree" OPENCV_ENABLE_NONFREE + "openexr" WITH_OPENEXR + "opengl" WITH_OPENGL + "png" WITH_PNG + "qt" WITH_QT + "sfm" BUILD_opencv_sfm + "tiff" WITH_TIFF + "webp" WITH_WEBP + "world" BUILD_opencv_world +) + +# Cannot use vcpkg_check_features() for "dnn", ipp", "openmp", "ovis", "tbb", and "vtk". +# As the respective value of their variables can be unset conditionally. +set(BUILD_opencv_dnn OFF) +if("dnn" IN_LIST FEATURES) + if(NOT VCPKG_TARGET_IS_ANDROID) + set(BUILD_opencv_dnn ON) + else() + message(WARNING "The dnn module cannot be enabled on Android") + endif() +endif() + +set(WITH_IPP OFF) +if("ipp" IN_LIST FEATURES) + set(WITH_IPP ON) +endif() + +set(WITH_OPENMP OFF) +if("openmp" IN_LIST FEATURES) + if(NOT VCPKG_TARGET_IS_OSX) + set(WITH_OPENMP ON) + else() + message(WARNING "The OpenMP feature is not supported on macOS") + endif() +endif() + +set(BUILD_opencv_ovis OFF) +if("ovis" IN_LIST FEATURES) + set(BUILD_opencv_ovis ON) +endif() + +set(WITH_TBB OFF) +if("tbb" IN_LIST FEATURES) + set(WITH_TBB ON) +endif() + +set(WITH_VTK OFF) +if("vtk" IN_LIST FEATURES) + set(WITH_VTK ON) +endif() + +if("dnn" IN_LIST FEATURES) + vcpkg_download_distfile(TINYDNN_ARCHIVE + URLS "https://github.com/tiny-dnn/tiny-dnn/archive/v1.0.0a3.tar.gz" + FILENAME "opencv-cache/tiny_dnn/adb1c512e09ca2c7a6faef36f9c53e59-v1.0.0a3.tar.gz" + SHA512 5f2c1a161771efa67e85b1fea395953b7744e29f61187ac5a6c54c912fb195b3aef9a5827135c3668bd0eeea5ae04a33cc433e1f6683e2b7955010a2632d168b + ) +endif() + +if("cuda" IN_LIST FEATURES) + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://github.com/NVIDIA/NVIDIAOpticalFlowSDK/archive/79c6cee80a2df9a196f20afd6b598a9810964c32.zip" + FILENAME "opencv-cache/nvidia_optical_flow/ca5acedee6cb45d0ec610a6732de5c15-79c6cee80a2df9a196f20afd6b598a9810964c32.zip" + SHA512 d80cdedec588dafaad4ebb8615349f842ecdc64d3ca9480fee7086d606e6f2362606a9a2ce273c5cf507be2840ec24bbcbe32c2962672c3bcfb72d31428ef73d + ) +endif() + +# Build image quality module when building with 'contrib' feature and not UWP. +set(BUILD_opencv_quality OFF) +if("contrib" IN_LIST FEATURES) + if (VCPKG_TARGET_IS_UWP) + set(BUILD_opencv_quality OFF) + message(WARNING "The image quality module (quality) does not build for UWP, the module has been disabled.") + # The hdf module is silently disabled by OpenCVs buildsystem if HDF5 is not detected. + message(WARNING "The hierarchical data format module (hdf) depends on HDF5 which doesn't support UWP, the module has been disabled.") + else() + set(BUILD_opencv_quality CMAKE_DEPENDS_IN_PROJECT_ONLY) + endif() + + vcpkg_from_github( + OUT_SOURCE_PATH CONTRIB_SOURCE_PATH + REPO opencv/opencv_contrib + REF ${OPENCV_VERSION} + SHA512 cfeda06a9f86ccaedbca9521c35bf685c3d8d3a182fb943f9378a7ecd1949d6e2e9df1673f0e3e9686840ca4c9e5a8e8cf2ac962a33b6e1f88f8278abd8c37e5 + HEAD_REF master + PATCHES + 0005-add-missing-stdexcept-include.patch + ) + set(BUILD_WITH_CONTRIB_FLAG "-DOPENCV_EXTRA_MODULES_PATH=${CONTRIB_SOURCE_PATH}/modules") + + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm.i" + FILENAME "opencv-cache/xfeatures2d/boostdesc/0ea90e7a8f3f7876d450e4149c97c74f-boostdesc_bgm.i" + SHA512 5c8702a60314fac4ebb6dafb62a603948ec034058d1a582fcb89a063b51511802c02e192eadfc0b233b1f711f4c74cabab6d9ebe8a50c3554ea0ccdbef87dc5c + ) + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_bi.i" + FILENAME "opencv-cache/xfeatures2d/boostdesc/232c966b13651bd0e46a1497b0852191-boostdesc_bgm_bi.i" + SHA512 b28ba2b615e0755ff0f6733b567682800fb9e7d522250aa498075cc1b8927f4177cacdcb0cfdf712539a29c4773232dc714931b6d292292b091b5cf170b203a6 + ) + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_hd.i" + FILENAME "opencv-cache/xfeatures2d/boostdesc/324426a24fa56ad9c5b8e3e0b3e5303e-boostdesc_bgm_hd.i" + SHA512 c214045c3730a1d9dfc594f70895edf82d2fd3058a3928908627014371e02460d052cbaedf41bb96cf76460c0a8b4b01b7b0ac7d269ec5d3f17f2a46c9f0091b + ) + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_064.i" + FILENAME "opencv-cache/xfeatures2d/boostdesc/202e1b3e9fec871b04da31f7f016679f-boostdesc_binboost_064.i" + SHA512 f32240a7b975233d2bbad02fdb74c6e29ed71ed6f0c08172ca33eb1e69a7a7f6d6964adf41422213a0452121a9c4bb2effe3d7b9d6743c9bf58d4bc8c9b1db36 + ) + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_128.i" + FILENAME "opencv-cache/xfeatures2d/boostdesc/98ea99d399965c03d555cef3ea502a0b-boostdesc_binboost_128.i" + SHA512 f58e2bebfaa690d324691a6c2067d9a1e5267037ea0f2b397966289253b9efd27d8238aff6206e95262086e1fcddf01ae1a1c49f066a8bbac3aa7908214b9a8f + ) + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_256.i" + FILENAME "opencv-cache/xfeatures2d/boostdesc/e6dcfa9f647779eb1ce446a8d759b6ea-boostdesc_binboost_256.i" + SHA512 351ee07b9714a379c311f293d96e99f001c894393c911a421b4c536345d43c02ba2d867e9f657eac104841563045ab8c8edab878e5ffeb1e1a7494375ef58987 + ) + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_lbgm.i" + FILENAME "opencv-cache/xfeatures2d/boostdesc/0ae0675534aa318d9668f2a179c2a052-boostdesc_lbgm.i" + SHA512 7fa12e2207ff154acf2433bbb4f3f47aa71d1fa8789493b688d635d20586b7ead30ee8dcd3b3753992ebbe98062cbde44d02683db1c563d52e35aefd7912a4f2 + ) + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_48.i" + FILENAME "opencv-cache/xfeatures2d/vgg/e8d0dcd54d1bcfdc29203d011a797179-vgg_generated_48.i" + SHA512 2403e9119738261a05a3116ca7e5c9e11da452c422f8670cd96ad2cb5bf970f76172e23b9913a3172adf06f2b31bee956f605b66dbccf3d706c4334aff713774 + ) + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_64.i" + FILENAME "opencv-cache/xfeatures2d/vgg/7126a5d9a8884ebca5aea5d63d677225-vgg_generated_64.i" + SHA512 2c954223677905f489b01988389ac80a8caa33bdb57adb3cb9409075012b5e2f472f14966d8be75d75c90c9330f66d59c69539dc6b5a5e265a4d98ff5041f0ea + ) + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_80.i" + FILENAME "opencv-cache/xfeatures2d/vgg/7cd47228edec52b6d82f46511af325c5-vgg_generated_80.i" + SHA512 9931ad1d1bd6d11951ca5357ab0a524f6ff9b33f936ceeafebc0dafb379ec7e2105e467443e9f424f60a0f2f445bdff821ed9e42330abed883227183ebad4a9e + ) + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_120.i" + FILENAME "opencv-cache/xfeatures2d/vgg/151805e03568c9f490a5e3a872777b75-vgg_generated_120.i" + SHA512 ad7c1d2b159ab5790c898815663bb90549f1cf7ade3c82d939d381608b26d26c5b2af01eb1ba21f4d114ced74586ab3fc83f14e2d8cfe4e6faac538aa0e7e255 + ) + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/8afa57abc8229d611c4937165d20e2a2d9fc5a12/face_landmark_model.dat" + FILENAME "opencv-cache/data/7505c44ca4eb54b4ab1e4777cb96ac05-face_landmark_model.dat" + SHA512 c16e60a6c4bb4de3ab39b876ae3c3f320ea56f69c93e9303bd2dff8760841dcd71be4161fff8bc71e8fe4fe8747fa8465d49d6bd8f5ebcdaea161f4bc2da7c93 + ) +endif() + +if(WITH_IPP) + if(VCPKG_TARGET_IS_OSX) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/a56b6ac6f030c312b2dce17430eef13aed9af274/ippicv/ippicv_2020_mac_intel64_20191018_general.tgz" + FILENAME "opencv-cache/ippicv/1c3d675c2a2395d094d523024896e01b-ippicv_2020_mac_intel64_20191018_general.tgz" + SHA512 454dfaaa245e3a3b2f1ffb1aa8e27e280b03685009d66e147482b14e5796fdf2d332cac0f9b0822caedd5760fda4ee0ce2961889597456bbc18202f10bf727cd + ) + else() + message(WARNING "This target architecture is not supported IPPICV") + set(WITH_IPP OFF) + endif() + elseif(VCPKG_TARGET_IS_LINUX) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/a56b6ac6f030c312b2dce17430eef13aed9af274/ippicv/ippicv_2020_lnx_intel64_20191018_general.tgz" + FILENAME "opencv-cache/ippicv/7421de0095c7a39162ae13a6098782f9-ippicv_2020_lnx_intel64_20191018_general.tgz" + SHA512 de6d80695cd6deef359376476edc4ff85fdddcf94972b936e0017f8a48aaa5d18f55c4253ae37deb83bff2f71410f68408063c88b5f3bf4df3c416aa93ceca87 + ) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/a56b6ac6f030c312b2dce17430eef13aed9af274/ippicv/ippicv_2020_lnx_ia32_20191018_general.tgz" + FILENAME "opencv-cache/ippicv/ad189a940fb60eb71f291321322fe3e8-ippicv_2020_lnx_ia32_20191018_general.tgz" + SHA512 5ca9dafc3a634e2a5f83f6a498611c990ef16d54358e9b44574b01694e9d64b118d46d6e2011506e40d37e5a9865f576f790e37ff96b7c8b503507633631a296 + ) + else() + message(WARNING "This target architecture is not supported IPPICV") + set(WITH_IPP OFF) + endif() + elseif(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/a56b6ac6f030c312b2dce17430eef13aed9af274/ippicv/ippicv_2020_win_intel64_20191018_general.zip" + FILENAME "opencv-cache/ippicv/879741a7946b814455eee6c6ffde2984-ippicv_2020_win_intel64_20191018_general.zip" + SHA512 50c4af4b7fe2161d652264230389dad2330e8c95b734d04fb7565bffdab855c06d43085e480da554c56b04f8538087d49503538d5943221ee2a772ee7be4c93c + ) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + vcpkg_download_distfile(OCV_DOWNLOAD + URLS "https://raw.githubusercontent.com/opencv/opencv_3rdparty/a56b6ac6f030c312b2dce17430eef13aed9af274/ippicv/ippicv_2020_win_ia32_20191018_general.zip" + FILENAME "opencv-cache/ippicv/cd39bdf0c2e1cac9a61101dad7a2413e-ippicv_2020_win_ia32_20191018_general.zip" + SHA512 058d00775d9f16955c7a557d554b8c2976ab9dbad4ba3fdb9823c0f768809edbd835e4397f01dc090a9bc80d81de834375e7006614d2a898f42e8004de0e04bf + ) + else() + message(WARNING "This target architecture is not supported IPPICV") + set(WITH_IPP OFF) + endif() + else() + message(WARNING "This target architecture is not supported IPPICV") + set(WITH_IPP OFF) + endif() +endif() + +set(WITH_MSMF ON) +if(NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) + set(WITH_MSMF OFF) +endif() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + if (WITH_TBB) + message(WARNING "TBB is currently unsupported in this build configuration, turning it off") + set(WITH_TBB OFF) + endif() + + if (WITH_VTK) + message(WARNING "VTK is currently unsupported in this build configuration, turning it off") + set(WITH_VTK OFF) + endif() + + if (VCPKG_TARGET_IS_WINDOWS AND BUILD_opencv_ovis) + message(WARNING "OVIS is currently unsupported in this build configuration, turning it off") + set(BUILD_opencv_ovis OFF) + endif() +endif() + +if("ffmpeg" IN_LIST FEATURES) + if(VCPKG_TARGET_IS_UWP) + set(VCPKG_C_FLAGS "/sdl- ${VCPKG_C_FLAGS}") + set(VCPKG_CXX_FLAGS "/sdl- ${VCPKG_CXX_FLAGS}") + endif() +endif() + +if("qt" IN_LIST FEATURES) + list(APPEND ADDITIONAL_BUILD_FLAGS "-DCMAKE_AUTOMOC=ON") +endif() + +vcpkg_configure_cmake( + PREFER_NINJA + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DOPENCV_CUDA_FORCE_BUILTIN_CMAKE_MODULE=ON #to use custom module with fixes for CUDA 11 compat, waiting for CMake support + ###### ocv_options + -DOpenCV_INSTALL_BINARIES_PREFIX= + -DOPENCV_BIN_INSTALL_PATH=bin + -DOPENCV_INCLUDE_INSTALL_PATH=include + -DOPENCV_LIB_INSTALL_PATH=lib + -DOPENCV_3P_LIB_INSTALL_PATH=lib + -DOPENCV_CONFIG_INSTALL_PATH=share/opencv + -DINSTALL_TO_MANGLED_PATHS=OFF + -DOPENCV_FFMPEG_USE_FIND_PACKAGE=FFMPEG + -DCMAKE_DEBUG_POSTFIX=d + -DOPENCV_DLLVERSION= + -DOPENCV_DEBUG_POSTFIX=d + -DOPENCV_GENERATE_SETUPVARS=OFF + # Do not build docs/examples + -DBUILD_DOCS=OFF + -DBUILD_EXAMPLES=OFF + -Dade_DIR=${ADE_DIR} + ###### Disable build 3rd party libs + -DBUILD_JASPER=OFF + -DBUILD_JPEG=OFF + -DBUILD_OPENEXR=OFF + -DBUILD_PNG=OFF + -DBUILD_TIFF=OFF + -DBUILD_WEBP=OFF + -DBUILD_ZLIB=OFF + -DBUILD_TBB=OFF + -DBUILD_IPP_IW=OFF + -DBUILD_ITT=OFF + ###### Disable build 3rd party components + -DBUILD_PROTOBUF=OFF + ###### OpenCV Build components + -DBUILD_opencv_apps=OFF + -DBUILD_opencv_java=OFF + -DBUILD_opencv_js=OFF + -DBUILD_ANDROID_PROJECT=OFF + -DBUILD_ANDROID_EXAMPLES=OFF + -DBUILD_PACKAGE=OFF + -DBUILD_PERF_TESTS=OFF + -DBUILD_TESTS=OFF + -DBUILD_WITH_DEBUG_INFO=ON + -DBUILD_WITH_STATIC_CRT=${BUILD_WITH_STATIC_CRT} + -DBUILD_JAVA=OFF + -DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR} + ###### PROTOBUF + -DPROTOBUF_UPDATE_FILES=ON + -DUPDATE_PROTO_FILES=ON + ###### PYLINT/FLAKE8 + -DENABLE_PYLINT=OFF + -DENABLE_FLAKE8=OFF + # CMAKE + -DCMAKE_DISABLE_FIND_PACKAGE_Git=ON + -DCMAKE_DISABLE_FIND_PACKAGE_JNI=ON + # ENABLE + -DENABLE_CXX11=ON + ###### OPENCV vars + "-DOPENCV_DOWNLOAD_PATH=${DOWNLOADS}/opencv-cache" + ${BUILD_WITH_CONTRIB_FLAG} + -DOPENCV_OTHER_INSTALL_PATH=share/opencv + ###### customized properties + ## Options from vcpkg_check_features() + ${FEATURE_OPTIONS} + -DHALIDE_ROOT_DIR=${CURRENT_INSTALLED_DIR} + -DCMAKE_DISABLE_FIND_PACKAGE_Halide=ON + -DWITH_GTK=OFF + -DWITH_IPP=${WITH_IPP} + -DWITH_MSMF=${WITH_MSMF} + -DWITH_OPENMP=${WITH_OPENMP} + -DWITH_PROTOBUF=ON + -DWITH_TBB=${WITH_TBB} + -DWITH_VTK=${WITH_VTK} + -DWITH_OPENJPEG=OFF + ###### WITH PROPERTIES explicitly disabled, they have problems with libraries if already installed by user and that are "involuntarily" found during install + -DWITH_LAPACK=OFF + ###### BUILD_options (mainly modules which require additional libraries) + -DBUILD_opencv_ovis=${BUILD_opencv_ovis} + -DBUILD_opencv_dnn=${BUILD_opencv_dnn} + ###### The following modules are disabled for UWP + -DBUILD_opencv_quality=${BUILD_opencv_quality} + ###### The following module is disabled because it's broken #https://github.com/opencv/opencv_contrib/issues/2307 + -DBUILD_opencv_rgbd=OFF + ###### Additional build flags + ${ADDITIONAL_BUILD_FLAGS} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH "share/opencv" TARGET_PATH "share/opencv") +vcpkg_copy_pdbs() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(READ ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake OPENCV_MODULES) + set(DEPS_STRING "include(CMakeFindDependencyMacro) +find_dependency(protobuf CONFIG) +if(protobuf_FOUND) + if(TARGET protobuf::libprotobuf) + add_library (libprotobuf INTERFACE IMPORTED) + set_target_properties(libprotobuf PROPERTIES + INTERFACE_LINK_LIBRARIES protobuf::libprotobuf + ) + else() + add_library (libprotobuf UNKNOWN IMPORTED) + set_target_properties(libprotobuf PROPERTIES + IMPORTED_LOCATION \"${Protobuf_LIBRARY}\" + INTERFACE_INCLUDE_DIRECTORIES \"${Protobuf_INCLUDE_DIR}\" + INTERFACE_SYSTEM_INCLUDE_DIRECTORIES \"${Protobuf_INCLUDE_DIR}\" + ) + endif() +endif() +find_dependency(Threads)") + if("tiff" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(TIFF)") + endif() + if("cuda" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(CUDA)") + endif() + if(BUILD_opencv_quality) + string(APPEND DEPS_STRING " +# C language is required for try_compile tests in FindHDF5 +enable_language(C) +find_dependency(HDF5) +find_dependency(Tesseract)") + endif() + if(WITH_TBB) + string(APPEND DEPS_STRING "\nfind_dependency(TBB)") + endif() + if(WITH_VTK) + string(APPEND DEPS_STRING "\nfind_dependency(VTK)") + endif() + if("sfm" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(gflags CONFIG)\nfind_dependency(Ceres CONFIG)") + endif() + if("eigen" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(Eigen3 CONFIG)") + endif() + if("openexr" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(OpenEXR CONFIG)") + endif() + if(WITH_OPENMP) + string(APPEND DEPS_STRING "\nfind_dependency(OpenMP CONFIG)") + endif() + if(BUILD_opencv_ovis) + string(APPEND DEPS_STRING "\nfind_dependency(Ogre)\nfind_dependency(Freetype)") + endif() + if("qt" IN_LIST FEATURES) + string(APPEND DEPS_STRING " +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) +find_dependency(Qt5 COMPONENTS OpenGL Concurrent Test)") + endif() + if("ade" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(ade)") + endif() + if("gdcm" IN_LIST FEATURES) + string(APPEND DEPS_STRING "\nfind_dependency(GDCM)") + endif() + + string(REPLACE "set(CMAKE_IMPORT_FILE_VERSION 1)" + "set(CMAKE_IMPORT_FILE_VERSION 1)\n${DEPS_STRING}" OPENCV_MODULES "${OPENCV_MODULES}") + + if(WITH_OPENMP) + string(REPLACE "set_target_properties(opencv_core PROPERTIES + INTERFACE_LINK_LIBRARIES \"" + "set_target_properties(opencv_core PROPERTIES + INTERFACE_LINK_LIBRARIES \"\$;" OPENCV_MODULES "${OPENCV_MODULES}") + endif() + + if(BUILD_opencv_ovis) + string(REPLACE "OgreGLSupportStatic" + "OgreGLSupport" OPENCV_MODULES "${OPENCV_MODULES}") + endif() + + file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake "${OPENCV_MODULES}") + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE ${CURRENT_PACKAGES_DIR}/LICENSE) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/LICENSE) + +if(VCPKG_TARGET_IS_ANDROID) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/README.android) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/README.android) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/opendnp3/CONTROL b/vcpkg/ports/opendnp3/CONTROL new file mode 100644 index 0000000..a30de26 --- /dev/null +++ b/vcpkg/ports/opendnp3/CONTROL @@ -0,0 +1,5 @@ +Source: opendnp3 +Version: 2.3.2 +Description: DNP3 (IEEE-1815) protocol stack. Modern C++ with bindings for .NET and Java. +Homepage: https://github.com/dnp3/opendnp3/ +Build-Depends: asio, openssl diff --git a/vcpkg/ports/opendnp3/export-cmake.patch b/vcpkg/ports/opendnp3/export-cmake.patch new file mode 100644 index 0000000..ee0ab50 --- /dev/null +++ b/vcpkg/ports/opendnp3/export-cmake.patch @@ -0,0 +1,140 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1381bab..e184423 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -104,20 +104,54 @@ include_directories(./cpp/tests/libs/src) + # ---- openpal library ---- + file(GLOB_RECURSE openpal_SRC ./cpp/libs/src/openpal/*.cpp ./cpp/libs/src/openpal/*.h ./cpp/libs/include/openpal/*.h) + add_library(openpal ${LIB_TYPE} ${openpal_SRC}) +-install(TARGETS openpal DESTINATION lib) + set_target_properties(openpal PROPERTIES FOLDER cpp/libs VERSION ${OPENDNP3_VERSION} SOVERSION ${OPENDNP3_MAJOR_VERSION}) + clang_format(openpal) + clang_tidy(openpal) + ++include(CMakePackageConfigHelpers) ++write_basic_package_version_file(openpal-version.cmake VERSION ${OPENDNP3_VERSION} COMPATIBILITY ExactVersion) ++ ++install( ++ TARGETS openpal ++ EXPORT openpal-config ++ DESTINATION lib ++) ++ ++install( ++ EXPORT openpal-config ++ DESTINATION share/openpal ++) ++ + # ---- opendnp3 library ---- + file(GLOB_RECURSE opendnp3_SRC ./cpp/libs/src/opendnp3/*.cpp ./cpp/libs/src/opendnp3/*.h ./cpp/libs/include/opendnp3/*.h) + add_library(opendnp3 ${LIB_TYPE} ${opendnp3_SRC}) + target_link_libraries(opendnp3 openpal) +-install(TARGETS opendnp3 DESTINATION lib) ++ + set_target_properties(opendnp3 PROPERTIES FOLDER cpp/libs VERSION ${OPENDNP3_VERSION} SOVERSION ${OPENDNP3_MAJOR_VERSION}) + clang_format(opendnp3 EXCLUDES ".*/gen/.*" ".*/objects/.*") + clang_tidy(opendnp3) + ++write_basic_package_version_file(opendnp3-version.cmake VERSION ${OPENDNP3_VERSION} COMPATIBILITY ExactVersion) ++ ++set(PROJECT_NAME opendnp3) ++set(FIND_DEPENDS "find_dependency(openpal)") ++configure_package_config_file(opendnp3-config.cmake.in opendnp3-config.cmake ++ INSTALL_DESTINATION share/opendnp3 ++ PATH_VARS PROJECT_NAME FIND_DEPENDS ++) ++ ++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/opendnp3-config.cmake DESTINATION share/opendnp3) ++ ++install( ++ TARGETS opendnp3 ++ EXPORT opendnp3-targets ++ DESTINATION lib ++) ++install( ++ EXPORT opendnp3-targets ++ DESTINATION share/opendnp3 ++) ++ + if(DNP3_DECODER) + file(GLOB_RECURSE dnp3decode_SRC ./cpp/libs/src/dnp3decode/*.cpp ./cpp/libs/src/dnp3decode/*.h ./cpp/libs/include/dnp3decode/*.h) + add_library(dnp3decode ${LIB_TYPE} ${dnp3decode_SRC}) +@@ -144,8 +178,7 @@ if(DNP3_TLS) + set(asiopal_link_libraries "${asiopal_link_libraries};${OPENSSL_LIBRARIES}") + endif() + +-target_link_libraries(asiopal ${asiopal_link_libraries}) +-install(TARGETS asiopal DESTINATION lib) ++target_link_libraries(asiopal PUBLIC ${asiopal_link_libraries}) + set_target_properties(asiopal PROPERTIES FOLDER cpp/libs VERSION ${OPENDNP3_VERSION} SOVERSION ${OPENDNP3_MAJOR_VERSION}) + if(FLOCK) + add_definitions(-DUSE_FLOCK) +@@ -153,6 +186,32 @@ endif() + clang_format(asiopal) + clang_tidy(asiopal) + ++install( ++ TARGETS asiopal ++ EXPORT asiopal-targets ++ DESTINATION lib ++) ++ ++write_basic_package_version_file(asiopal-version.cmake VERSION ${OPENDNP3_VERSION} COMPATIBILITY ExactVersion) ++ ++set(PROJECT_NAME asiopal) ++if (DNP3_TLS) ++ set(FIND_DEPENDS "find_dependency(openpal)\nfind_dependency(OpenSSL)") ++else() ++ set(FIND_DEPENDS "find_dependency(openpal)") ++endif() ++configure_package_config_file(opendnp3-config.cmake.in asiopal-config.cmake ++ INSTALL_DESTINATION share/asiopal ++ PATH_VARS PROJECT_NAME FIND_DEPENDS ++) ++ ++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/asiopal-config.cmake DESTINATION share/asiopal) ++ ++install( ++ EXPORT asiopal-targets ++ DESTINATION share/asiopal ++) ++ + # ---- asiodnp3 library ---- + file(GLOB_RECURSE asiodnp3_HPP ./cpp/libs/src/asiodnp3/*.h ./cpp/libs/include/asiodnp3/*.h) + if(DNP3_TLS) +@@ -161,12 +220,33 @@ else() + file(GLOB asiodnp3_CPP ./cpp/libs/src/asiodnp3/*.cpp) + endif() + add_library(asiodnp3 ${LIB_TYPE} ${asiodnp3_HPP} ${asiodnp3_CPP}) +-target_link_libraries(asiodnp3 asiopal opendnp3) +-install(TARGETS asiodnp3 DESTINATION lib) ++target_link_libraries(asiodnp3 PUBLIC asiopal opendnp3) + set_target_properties(asiodnp3 PROPERTIES FOLDER cpp/libs VERSION ${OPENDNP3_VERSION} SOVERSION ${OPENDNP3_MAJOR_VERSION}) + clang_format(asiodnp3) + clang_tidy(asiodnp3) + ++install( ++ TARGETS asiodnp3 ++ EXPORT asiodnp3-targets ++ DESTINATION lib ++) ++ ++write_basic_package_version_file(asiopal-version.cmake VERSION ${OPENDNP3_VERSION} COMPATIBILITY ExactVersion) ++ ++set(PROJECT_NAME asiodnp3) ++set(FIND_DEPENDS "find_dependency(asiopal)\nfind_dependency(opendnp3)") ++configure_package_config_file(opendnp3-config.cmake.in asiodnp3-config.cmake ++ INSTALL_DESTINATION share/asiopal ++ PATH_VARS PROJECT_NAME FIND_DEPENDS ++) ++ ++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/asiodnp3-config.cmake DESTINATION share/asiodnp3) ++ ++install( ++ EXPORT asiodnp3-targets ++ DESTINATION share/asiodnp3 ++) ++ + if(DNP3_JAVA) + file(GLOB_RECURSE opendnp3java_SRC ./java/cpp/*.h ./java/cpp/*.cpp) + add_library(opendnp3java SHARED ${opendnp3java_SRC}) diff --git a/vcpkg/ports/opendnp3/opendnp3-config.cmake.in b/vcpkg/ports/opendnp3/opendnp3-config.cmake.in new file mode 100644 index 0000000..79b2ef8 --- /dev/null +++ b/vcpkg/ports/opendnp3/opendnp3-config.cmake.in @@ -0,0 +1,22 @@ +# Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set(@PROJECT_NAME@_VERSION @PROJECT_VERSION@) + +@PACKAGE_INIT@ + +include(CMakeFindDependencyMacro) +@FIND_DEPENDS@ + +include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake) \ No newline at end of file diff --git a/vcpkg/ports/opendnp3/portfile.cmake b/vcpkg/ports/opendnp3/portfile.cmake new file mode 100644 index 0000000..538f726 --- /dev/null +++ b/vcpkg/ports/opendnp3/portfile.cmake @@ -0,0 +1,37 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATICLIBS) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dnp3/opendnp3 + REF 2.3.2 + SHA512 41686b5c32234088a5af3c71769b0193deb10a95d623579508cc740f126f35c18796f761093cec12ead469f0088839a680cc7d137b2f762a80c1736d71c3d90a + HEAD_REF master + PATCHES export-cmake.patch +) + +file(COPY ${CURRENT_PORT_DIR}/opendnp3-config.cmake.in DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DSTATICLIBS=${STATICLIBS} -DDNP3_TLS=ON +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/asiodnp3 TARGET_PATH share/asiodnp3) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/asiopal TARGET_PATH share/asiopal) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/opendnp3 TARGET_PATH share/opendnp3) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/openpal TARGET_PATH share/openpal) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/openexr/CONTROL b/vcpkg/ports/openexr/CONTROL new file mode 100644 index 0000000..0a725a0 --- /dev/null +++ b/vcpkg/ports/openexr/CONTROL @@ -0,0 +1,7 @@ +Source: openexr +Version: 2.5.0 +Port-Version: 1 +Homepage: https://www.openexr.com/ +Description: OpenEXR is a high dynamic-range (HDR) image file format developed by Industrial Light & Magic for use in computer imaging applications +Build-Depends: zlib, python3 +Supports: !uwp diff --git a/vcpkg/ports/openexr/fixup_cmake_exports_path.patch b/vcpkg/ports/openexr/fixup_cmake_exports_path.patch new file mode 100644 index 0000000..e39bd37 --- /dev/null +++ b/vcpkg/ports/openexr/fixup_cmake_exports_path.patch @@ -0,0 +1,78 @@ +diff --git a/IlmBase/config/CMakeLists.txt b/IlmBase/config/CMakeLists.txt +index d9c5ae4..45ee6cc 100644 +--- a/IlmBase/config/CMakeLists.txt ++++ b/IlmBase/config/CMakeLists.txt +@@ -105,7 +105,7 @@ endif() + include(CMakePackageConfigHelpers) + configure_package_config_file(IlmBaseConfig.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake +- INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ++ INSTALL_DESTINATION share/ilmbase + ) + write_basic_package_version_file("${PROJECT_NAME}ConfigVersion.cmake" + VERSION ${ILMBASE_VERSION} +@@ -113,10 +113,10 @@ write_basic_package_version_file("${PROJECT_NAME}ConfigVersion.cmake" + ) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ++ DESTINATION share/ilmbase + ) + install(EXPORT ${PROJECT_NAME} +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ++ DESTINATION share/ilmbase + FILE ${PROJECT_NAME}Targets.cmake + NAMESPACE ${PROJECT_NAME}:: + EXPORT_LINK_INTERFACE_LIBRARIES +diff --git a/OpenEXR/config/CMakeLists.txt b/OpenEXR/config/CMakeLists.txt +index b52ad0d..3dc6d22 100644 +--- a/OpenEXR/config/CMakeLists.txt ++++ b/OpenEXR/config/CMakeLists.txt +@@ -19,7 +19,7 @@ int main() + sysconf(_SC_NPROCESSORS_ONLN); + } + " OPENEXR_IMF_HAVE_SYSCONF_NPROCESSORS_ONLN +-) ++) + + check_cxx_source_compiles( + " +@@ -100,7 +100,7 @@ endif() + include(CMakePackageConfigHelpers) + configure_package_config_file(OpenEXRConfig.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake +- INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ++ INSTALL_DESTINATION share/openexr + ) + write_basic_package_version_file("${PROJECT_NAME}ConfigVersion.cmake" + VERSION ${OPENEXR_VERSION} +@@ -108,10 +108,10 @@ write_basic_package_version_file("${PROJECT_NAME}ConfigVersion.cmake" + ) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ++ DESTINATION share/openexr + ) + install(EXPORT ${PROJECT_NAME} +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ++ DESTINATION share/openexr + FILE ${PROJECT_NAME}Targets.cmake + NAMESPACE ${PROJECT_NAME}:: + EXPORT_LINK_INTERFACE_LIBRARIES +diff --git a/PyIlmBase/config/CMakeLists.txt b/PyIlmBase/config/CMakeLists.txt +index 1872c89..bc61f43 100644 +--- a/PyIlmBase/config/CMakeLists.txt ++++ b/PyIlmBase/config/CMakeLists.txt +@@ -39,10 +39,10 @@ write_basic_package_version_file("${PROJECT_NAME}ConfigVersion.cmake" + COMPATIBILITY SameMajorVersion + ) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ++ DESTINATION share/pyilmbase + ) + install(EXPORT ${PROJECT_NAME} +- DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ++ DESTINATION share/pyilmbase + FILE ${PROJECT_NAME}Config.cmake + NAMESPACE ${PROJECT_NAME}:: + EXPORT_LINK_INTERFACE_LIBRARIES diff --git a/vcpkg/ports/openexr/portfile.cmake b/vcpkg/ports/openexr/portfile.cmake new file mode 100644 index 0000000..d73520c --- /dev/null +++ b/vcpkg/ports/openexr/portfile.cmake @@ -0,0 +1,59 @@ +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "UWP build not supported") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO openexr/openexr + REF ed64d5467dee9763f28baf300f7699e6288b9f5f + SHA512 549d37ed1ef4d1ff7e732d583f7213ee15c7f92625aea9fd65345e4c5b854902c02e5940d0692b1af5ae0a02abf46aaefea2662db2389d1b2fb4264a373baac2 + HEAD_REF master + PATCHES + remove_find_package_macro.patch + fixup_cmake_exports_path.patch + remove_symlinks.patch +) + +vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_DEBUG_POSTFIX=_d + -DPYILMBASE_ENABLE=FALSE +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/ilmbase TARGET_PATH share/ilmbase) +vcpkg_fixup_cmake_targets() + +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrenvmap${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrheader${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrmakepreview${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrmaketiled${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrmultipart${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrmultiview${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exrstdattr${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/exr2aces${VCPKG_HOST_EXECUTABLE_SUFFIX}) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/openexr/) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrenvmap${VCPKG_HOST_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrenvmap${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrheader${VCPKG_HOST_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrheader${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrmakepreview${VCPKG_HOST_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrmakepreview${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrmaketiled${VCPKG_HOST_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrmaketiled${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrmultipart${VCPKG_HOST_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrmultipart${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrmultiview${VCPKG_HOST_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrmultiview${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exrstdattr${VCPKG_HOST_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exrstdattr${VCPKG_HOST_EXECUTABLE_SUFFIX}) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/exr2aces${VCPKG_HOST_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/openexr/exr2aces${VCPKG_HOST_EXECUTABLE_SUFFIX}) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/openexr) + +vcpkg_copy_pdbs() + +if (VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/openexr/remove_find_package_macro.patch b/vcpkg/ports/openexr/remove_find_package_macro.patch new file mode 100644 index 0000000..967e89a --- /dev/null +++ b/vcpkg/ports/openexr/remove_find_package_macro.patch @@ -0,0 +1,87 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 111a603..109394f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -25,22 +25,12 @@ endif() + project(OpenEXRMetaProject) + + +-# An "official" way to make this a super-project +-# basically overrides the find_package to not find anything +-# for stuff we're including locally +-set(as_subproject IlmBase OpenEXR) +-macro(find_package) +- if(NOT "${ARGV0}" IN_LIST as_subproject) +- _find_package(${ARGV}) +- endif() +-endmacro() +- + + # If you want to use ctest to configure, build and + # upload the results, cmake has builtin support for + # submitting to CDash, or any server who speaks the + # same protocol +-# ++# + # These settings will need to be set for your environment, + # and then a script such as the example in + # +@@ -51,7 +41,7 @@ endmacro() + # cmake -S cmake/SampleCTestScript.cmake + # + # [or whatever you name the file you edit] +-# ++# + #set(CTEST_PROJECT_NAME "OpenEXR") + #set(CTEST_NIGHTLY_START_TIME "01:01:01 UTC") + #set(CTEST_DROP_METHOD "http") # there are others... +diff --git a/OpenEXR/CMakeLists.txt b/OpenEXR/CMakeLists.txt +index 390b27f..87b2d01 100644 +--- a/OpenEXR/CMakeLists.txt ++++ b/OpenEXR/CMakeLists.txt +@@ -35,7 +35,6 @@ include(config/OpenEXRSetup.cmake) + + # Everyone depends on IlmBase, and we currently rely on + # the version matched with our release +-find_package(IlmBase ${OPENEXR_VERSION} EXACT REQUIRED CONFIG) + + # generates config headers, package config files + add_subdirectory(config) +diff --git a/OpenEXR/config/OpenEXRSetup.cmake b/OpenEXR/config/OpenEXRSetup.cmake +index 5116726..34c7c87 100644 +--- a/OpenEXR/config/OpenEXRSetup.cmake ++++ b/OpenEXR/config/OpenEXRSetup.cmake +@@ -33,7 +33,7 @@ endif() + # Whether to build & install the various command line utility programs + option(OPENEXR_BUILD_UTILS "Enables building of utility programs" ON) + +-# This is a variable here for use in controlling where include files are ++# This is a variable here for use in controlling where include files are + # installed. Care must be taken when changing this, as many things + # probably assume this is OpenEXR + set(OPENEXR_OUTPUT_SUBDIR OpenEXR CACHE STRING "Destination sub-folder of the include path for install") +diff --git a/OpenEXR_Viewers/CMakeLists.txt b/OpenEXR_Viewers/CMakeLists.txt +index 5efa353..5246fa7 100644 +--- a/OpenEXR_Viewers/CMakeLists.txt ++++ b/OpenEXR_Viewers/CMakeLists.txt +@@ -24,8 +24,6 @@ project(OpenEXR_Viewers VERSION ${OPENEXR_VIEWERS_VERSION}) + ####################################### + include(config/OpenEXRViewersSetup.cmake) + +-find_package(IlmBase ${OPENEXR_VIEWERS_VERSION} EXACT REQUIRED CONFIG) +-find_package(OpenEXR ${OPENEXR_VIEWERS_VERSION} EXACT REQUIRED CONFIG) + + # This is for newer cmake versions who know about vendor versions + set(OpenGL_GL_PREFERENCE GLVND) +diff --git a/PyIlmBase/CMakeLists.txt b/PyIlmBase/CMakeLists.txt +index 291b96e..7d5074f 100644 +--- a/PyIlmBase/CMakeLists.txt ++++ b/PyIlmBase/CMakeLists.txt +@@ -27,7 +27,6 @@ project(PyIlmBase VERSION ${PYILMBASE_VERSION} LANGUAGES C CXX) + include(config/PyIlmBaseSetup.cmake) + + # we have a strong dependence on IlmBase being an exact match +-find_package(IlmBase ${PYILMBASE_VERSION} EXACT REQUIRED CONFIG) + + # we are building a python extension, so of course we depend on + # python as well. Except we don't know which version... diff --git a/vcpkg/ports/openexr/remove_symlinks.patch b/vcpkg/ports/openexr/remove_symlinks.patch new file mode 100644 index 0000000..89b9c53 --- /dev/null +++ b/vcpkg/ports/openexr/remove_symlinks.patch @@ -0,0 +1,40 @@ +diff --git a/IlmBase/config/LibraryDefine.cmake b/IlmBase/config/LibraryDefine.cmake +index 44254a7..1f5d2a6 100644 +--- a/IlmBase/config/LibraryDefine.cmake ++++ b/IlmBase/config/LibraryDefine.cmake +@@ -101,15 +101,6 @@ function(ILMBASE_DEFINE_LIBRARY libname) + if(BUILD_SHARED_LIBS AND (NOT "${ILMBASE_LIB_SUFFIX}" STREQUAL "")) + set(verlibname ${CMAKE_SHARED_LIBRARY_PREFIX}${libname}${ILMBASE_LIB_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}) + set(baselibname ${CMAKE_SHARED_LIBRARY_PREFIX}${libname}${CMAKE_SHARED_LIBRARY_SUFFIX}) +- if(WIN32) +- install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E chdir \"\$ENV\{DESTDIR\}${CMAKE_INSTALL_FULL_BINDIR}\" ${CMAKE_COMMAND} -E create_symlink ${verlibname} ${baselibname})") +- install(CODE "message(\"-- Creating symlink in ${CMAKE_INSTALL_FULL_BINDIR} ${baselibname} -> ${verlibname}\")") +- else() +- install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E chdir \"\$ENV\{DESTDIR\}${CMAKE_INSTALL_FULL_LIBDIR}\" ${CMAKE_COMMAND} -E create_symlink ${verlibname} ${baselibname})") +- install(CODE "message(\"-- Creating symlink in ${CMAKE_INSTALL_FULL_LIBDIR} ${baselibname} -> ${verlibname}\")") +- endif() +- set(verlibname) +- set(baselibname) + endif() + + if(ILMBASE_BUILD_BOTH_STATIC_SHARED) +diff --git a/OpenEXR/config/LibraryDefine.cmake b/OpenEXR/config/LibraryDefine.cmake +index a9561dc..42853af 100644 +--- a/OpenEXR/config/LibraryDefine.cmake ++++ b/OpenEXR/config/LibraryDefine.cmake +@@ -95,15 +95,6 @@ function(OPENEXR_DEFINE_LIBRARY libname) + if(BUILD_SHARED_LIBS AND (NOT "${OPENEXR_LIB_SUFFIX}" STREQUAL "")) + set(verlibname ${CMAKE_SHARED_LIBRARY_PREFIX}${libname}${OPENEXR_LIB_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}) + set(baselibname ${CMAKE_SHARED_LIBRARY_PREFIX}${libname}${CMAKE_SHARED_LIBRARY_SUFFIX}) +- if(WIN32) +- install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E chdir \"\$ENV\{DESTDIR\}${CMAKE_INSTALL_FULL_BINDIR}\" ${CMAKE_COMMAND} -E create_symlink ${verlibname} ${baselibname})") +- install(CODE "message(\"-- Creating symlink in ${CMAKE_INSTALL_FULL_BINDIR} ${baselibname} -> ${verlibname}\")") +- else() +- install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E chdir \"\$ENV\{DESTDIR\}${CMAKE_INSTALL_FULL_LIBDIR}\" ${CMAKE_COMMAND} -E create_symlink ${verlibname} ${baselibname})") +- install(CODE "message(\"-- Creating symlink in ${CMAKE_INSTALL_FULL_DIR} ${baselibname} -> ${verlibname}\")") +- endif() +- set(verlibname) +- set(baselibname) + endif() + + if(OPENEXR_BUILD_BOTH_STATIC_SHARED) diff --git a/vcpkg/ports/openexr/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/openexr/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..479cd30 --- /dev/null +++ b/vcpkg/ports/openexr/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,38 @@ +_find_package(${ARGS}) + +if(TARGET OpenEXR::IlmImf AND NOT OPENEXR_LIBRARIES AND NOT OPENEXR_FOUND) + set(OPENEXR_FOUND TRUE CACHE BOOL "") + set(OpenEXR_FOUND TRUE CACHE BOOL "") + set(OPENEXR_VERSION "2.5.0" CACHE STRING "") + set(OpenEXR_VERSION "2.5.0" CACHE STRING "") + get_target_property(OpenEXR_INCLUDE_DIRS OpenEXR::IlmImf INTERFACE_INCLUDE_DIRECTORIES) + get_target_property(OPENEXR_INCLUDE_PATHS OpenEXR::IlmImf INTERFACE_INCLUDE_DIRECTORIES) + get_target_property(OPENEXR_INCLUDE_DIRS OpenEXR::IlmImf INTERFACE_INCLUDE_DIRECTORIES) + get_target_property(OPENEXR_INCLUDE_DIR OpenEXR::IlmImf INTERFACE_INCLUDE_DIRECTORIES) + set(OpenEXR_INCLUDE_DIRS ${OpenEXR_INCLUDE_DIRS} CACHE STRING "") + set(OPENEXR_INCLUDE_PATHS ${OPENEXR_INCLUDE_PATHS} CACHE STRING "") + set(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIRS} CACHE STRING "") + set(OPENEXR_INCLUDE_DIR ${OPENEXR_INCLUDE_DIR} CACHE STRING "") + set(OPENEXR_ILMIMF_LIBRARY "OpenEXR::IlmImf" CACHE STRING "") + set(OPENEXR_ILMIMFUTIL_LIBRARY "OpenEXR::IlmImfUtil" CACHE STRING "") + set(OPENEXR_LIBRARIES ${OPENEXR_ILMIMFUTIL_LIBRARY} ${OPENEXR_ILMIMF_LIBRARY} CACHE STRING "") +endif() + +if(TARGET IlmBase::Half AND NOT ILMBASE_LIBRARIES AND NOT ILMBASE_FOUND) + set(ILMBASE_FOUND TRUE CACHE BOOL "") + set(IlmBASE_FOUND TRUE CACHE BOOL "") + set(ILMBASE_VERSION "2.5.0" CACHE STRING "") + set(IlmBASE_VERSION "2.5.0" CACHE STRING "") + get_target_property(ILMBASE_INCLUDE_DIR IlmBase::Half INTERFACE_INCLUDE_DIRECTORIES) + get_target_property(ILMBASE_INCLUDE_DIRS IlmBase::Half INTERFACE_INCLUDE_DIRECTORIES) + get_target_property(ILMBASE_INCLUDE_PATHS IlmBase::Half INTERFACE_INCLUDE_DIRECTORIES) + set(ILMBASE_INCLUDE_DIR ${ILMBASE_INCLUDE_DIR} CACHE STRING "") + set(ILMBASE_INCLUDE_DIRS ${ILMBASE_INCLUDE_DIRS} CACHE STRING "") + set(ILMBASE_INCLUDE_PATHS ${ILMBASE_INCLUDE_PATHS} CACHE STRING "") + set(OPENEXR_HALF_LIBRARY "IlmBase::Half" CACHE STRING "") + set(OPENEXR_IEX_LIBRARY "IlmBase::Iex" CACHE STRING "") + set(OPENEXR_IEXMATH_LIBRARY "IlmBase::IexMath" CACHE STRING "") + set(OPENEXR_ILMTHREAD_LIBRARY "IlmBase::IlmThread" CACHE STRING "") + set(OPENEXR_IMATH_LIBRARY "IlmBase::Imath" CACHE STRING "") + set(ILMBASE_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${OPENEXR_IEXMATH_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} CACHE STRING "") +endif() diff --git a/vcpkg/ports/opengl-registry/CONTROL b/vcpkg/ports/opengl-registry/CONTROL new file mode 100644 index 0000000..fece531 --- /dev/null +++ b/vcpkg/ports/opengl-registry/CONTROL @@ -0,0 +1,5 @@ +Source: opengl-registry +Version: 2020-03-25 +Homepage: https://github.com/KhronosGroup/OpenGL-Registry +Build-Depends: egl-registry +Description: the API and Extension registries for the OpenGL family APIs diff --git a/vcpkg/ports/opengl-registry/portfile.cmake b/vcpkg/ports/opengl-registry/portfile.cmake new file mode 100644 index 0000000..13f9386 --- /dev/null +++ b/vcpkg/ports/opengl-registry/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KhronosGroup/OpenGL-Registry + REF 4594c03239fb76580bc5d5a13acb2a8f563f0158 + SHA512 c005a4eb7e5c17002647e7762ae1a7ecba0d0780a62d66f1afd3b7f45c1ca49bd5a069ab0fabb94de3ec971604586457932941fa8eb924cf5ac3a959d8f5f146 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/api/GL DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/api/GLES DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/api/GLES2 DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/api/GLES3 DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/api/GLSC DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/api/GLSC2 DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY + ${SOURCE_PATH}/xml/gl.xml + ${SOURCE_PATH}/xml/glx.xml + ${SOURCE_PATH}/xml/wgl.xml + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} +) + +# Using the Makefile because it is the smallest file with a complete copy of the license text +file( + INSTALL ${SOURCE_PATH}/xml/Makefile + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) diff --git a/vcpkg/ports/opengl/CONTROL b/vcpkg/ports/opengl/CONTROL new file mode 100644 index 0000000..74eff93 --- /dev/null +++ b/vcpkg/ports/opengl/CONTROL @@ -0,0 +1,3 @@ +Source: opengl +Version: 0.0-7 +Description: Open Graphics Library (OpenGL)[3][4][5] is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. diff --git a/vcpkg/ports/opengl/portfile.cmake b/vcpkg/ports/opengl/portfile.cmake new file mode 100644 index 0000000..6d27810 --- /dev/null +++ b/vcpkg/ports/opengl/portfile.cmake @@ -0,0 +1,60 @@ +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + vcpkg_get_windows_sdk(WINDOWS_SDK) + + if (WINDOWS_SDK MATCHES "10.") + set(LIBGLFILEPATH "$ENV{WindowsSdkDir}Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib") + set(LIBGLUFILEPATH "$ENV{WindowsSdkDir}Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib") + set(HEADERSPATH "$ENV{WindowsSdkDir}Include\\${WINDOWS_SDK}\\um") + elseif(WINDOWS_SDK MATCHES "8.") + set(LIBGLFILEPATH "$ENV{WindowsSdkDir}Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib") + set(LIBGLUFILEPATH "$ENV{WindowsSdkDir}Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\GlU32.Lib") + set(HEADERSPATH "$ENV{WindowsSdkDir}Include\\um") + else() + message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}") + endif() + + if (NOT EXISTS "${LIBGLFILEPATH}") + message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBGLFILEPATH}") + endif() + + if (NOT EXISTS "${LIBGLUFILEPATH}") + message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBGLUFILEPATH}") + endif() + + file(MAKE_DIRECTORY + ${CURRENT_PACKAGES_DIR}/include/gl + ${CURRENT_PACKAGES_DIR}/share/opengl + ) + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(MAKE_DIRECTORY + ${CURRENT_PACKAGES_DIR}/lib + ) + endif() + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY + ${CURRENT_PACKAGES_DIR}/debug/lib + ) + endif() + + file(COPY + "${HEADERSPATH}\\gl\\GL.h" + "${HEADERSPATH}\\gl\\GLU.h" + DESTINATION ${CURRENT_PACKAGES_DIR}/include/gl + ) + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(COPY ${LIBGLFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(COPY ${LIBGLUFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + endif() + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(COPY ${LIBGLFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(COPY ${LIBGLUFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() + + if (WINDOWS_SDK MATCHES "10.") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/opengl/copyright "See https://developer.microsoft.com/windows/downloads/windows-10-sdk for the Windows 10 SDK license") + elseif(WINDOWS_SDK MATCHES "8.") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/opengl/copyright "See https://developer.microsoft.com/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license") + endif() +else() + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +endif() diff --git a/vcpkg/ports/opengl/usage b/vcpkg/ports/opengl/usage new file mode 100644 index 0000000..33e33f6 --- /dev/null +++ b/vcpkg/ports/opengl/usage @@ -0,0 +1,24 @@ +The package opengl is compatible with built-in CMake targets via CMake v3.7 and prior syntax + + find_package(OpenGL REQUIRED) + target_link_libraries(main PRIVATE ${OPENGL_LIBRARIES}) + target_include_directories(main PRIVATE ${OPENGL_INCLUDE_DIR}) + +and the CMake v3.8 and beyond imported target syntax + + find_package(OpenGL REQUIRED) + target_link_libraries(main PRIVATE OpenGL::GL) + +introduction of various components + + find_package(OpenGL REQUIRED COMPONENTS GL # v3.8 + GLU # v3.8 + GLX # v3.10 + EGL # v3.10 + OpenGL) # v3.10 + +The OpenGL SDK is highly platform dependent and is usually an OS component. It's not realistic to build from source for every platform. + + WINDOWS: is part of the Windows SDK which this package installs. + LINUX: the SDK may be installed from your distro's repo or from 3rd parties manually. There are too many to count. + APPLE: consult your distribution vendor on the state of OpenGL support: https://support.apple.com/en-us/HT202823 diff --git a/vcpkg/ports/openigtlink/CONTROL b/vcpkg/ports/openigtlink/CONTROL new file mode 100644 index 0000000..488c406 --- /dev/null +++ b/vcpkg/ports/openigtlink/CONTROL @@ -0,0 +1,3 @@ +Source: openigtlink +Version: 3.0 +Description: OpenIGTLink is an open-source network communication interface specifically designed for image-guided interventions. diff --git a/vcpkg/ports/openigtlink/portfile.cmake b/vcpkg/ports/openigtlink/portfile.cmake new file mode 100644 index 0000000..a5a240f --- /dev/null +++ b/vcpkg/ports/openigtlink/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO openigtlink/OpenIGTLink + REF v3.0 + SHA512 3f62ef1c4ca349f653712cecd43af8b5afce642cc3950256498905999861d68143ba3003f6b0899f5f5c3c5c755eb282c63488ac59b4793b3622a47571452739 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/igtl/cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_pdbs() + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) \ No newline at end of file diff --git a/vcpkg/ports/openimageio/CONTROL b/vcpkg/ports/openimageio/CONTROL new file mode 100644 index 0000000..3612d39 --- /dev/null +++ b/vcpkg/ports/openimageio/CONTROL @@ -0,0 +1,49 @@ +Source: openimageio +Version: 2.1.16.0 +Port-Version: 3 +Homepage: https://github.com/OpenImageIO/oiio +Description: A library for reading and writing images, and a bunch of related classes, utilities, and application +Build-Depends: libjpeg-turbo, tiff, libpng, libheif, openexr, boost-thread, boost-smart-ptr, boost-foreach, boost-regex, boost-type-traits, boost-static-assert, boost-unordered, boost-config, boost-algorithm, boost-filesystem, boost-system, boost-thread, boost-asio, boost-random, robin-map, boost-stacktrace, fmt + +Feature: libraw +Build-Depends: libraw +Description: Enable RAW image files support + +Feature: opencolorio +Build-Depends: opencolorio +Description: Enable opencolorio support for openimageio + +Feature: ffmpeg +Build-Depends: ffmpeg[avresample] +Description: Enable ffmpeg support for openimageio + +Feature: field3d +Build-Depends: field3d +Description: Enable field3D support for openimageio + +Feature: freetype +Build-Depends: freetype +Description: Enable freetype support for openimageio + +Feature: opencv +Build-Depends: opencv +Description: Enable opencv support for openimageio + +Feature: gif +Build-Depends: giflib +Description: Enable giflib support for openimageio + +Feature: openjpeg +Build-Depends: openjpeg +Description: Enable openjpeg support for openimageio + +Feature: webp +Build-Depends: libwebp +Description: Enable libwebp support for openimageio + +Feature: pybind11 +Build-Depends: pybind11 +Description: Enable Python bindings support for openimageio + +Feature: tools +Description: Build openimageio tools \ No newline at end of file diff --git a/vcpkg/ports/openimageio/fix-config-cmake.patch b/vcpkg/ports/openimageio/fix-config-cmake.patch new file mode 100644 index 0000000..e943d1c --- /dev/null +++ b/vcpkg/ports/openimageio/fix-config-cmake.patch @@ -0,0 +1,12 @@ +diff --git a/src/cmake/Config.cmake.in b/src/cmake/Config.cmake.in +index c578a1b..298362a 100644 +--- a/src/cmake/Config.cmake.in ++++ b/src/cmake/Config.cmake.in +@@ -14,6 +14,6 @@ set (@PROJECT_NAME@_PLUGIN_SEARCH_PATH "@PLUGIN_SEARCH_PATH_NATIVE@") + #...logic to determine installedPrefix from the own location... + #set (@PROJECT_NAME@_CONFIG_DIR "${installedPrefix}/@CONFIG_INSTALL_DIR@") + +-include ("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") ++include("${CMAKE_CURRENT_LIST_DIR}/OpenImageIOTargets.cmake") + + check_required_components ("@PROJECT_NAME@") diff --git a/vcpkg/ports/openimageio/fix-dependency.patch b/vcpkg/ports/openimageio/fix-dependency.patch new file mode 100644 index 0000000..3dc3a16 --- /dev/null +++ b/vcpkg/ports/openimageio/fix-dependency.patch @@ -0,0 +1,97 @@ +diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake +index 2f4f7ce..16035df 100644 +--- a/src/cmake/externalpackages.cmake ++++ b/src/cmake/externalpackages.cmake +@@ -169,10 +169,17 @@ checked_find_package (PNG REQUIRED) + checked_find_package (TIFF 3.0 REQUIRED) + + # IlmBase & OpenEXR ++find_package (Threads) ++if (CMAKE_USE_PTHREADS_INIT) ++ set (ILMBASE_PTHREADS ${CMAKE_THREAD_LIBS_INIT}) ++endif () + checked_find_package (OpenEXR 2.0 REQUIRED) + # We use Imath so commonly, may as well include it everywhere. +-include_directories ("${OPENEXR_INCLUDES}" "${ILMBASE_INCLUDES}" +- "${ILMBASE_INCLUDES}/OpenEXR") ++set(ILMBASE_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${ILMBASE_PTHREADS} CACHE STRING "The libraries needed to use IlmBase") ++set(OPENEXR_LIBRARIES ${OPENEXR_ILMIMF_LIBRARY} ${ILMBASE_LIBRARIES} CACHE STRING "The libraries needed to use OpenEXR") ++set(ILMBASE_INCLUDE_DIR ${OPENEXR_INCLUDE_DIR}) ++set(ILMBASE_FOUND TRUE) ++include_directories ("${OPENEXR_INCLUDE_DIR}") + if (CMAKE_COMPILER_IS_CLANG AND OPENEXR_VERSION VERSION_LESS 2.3) + # clang C++ >= 11 doesn't like 'register' keyword in old exr headers + add_compile_options (-Wno-deprecated-register) +@@ -217,7 +224,7 @@ checked_find_package (HDF5 + ISDEPOF Field3D) + checked_find_package (OpenColorIO + DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1) +-checked_find_package (OpenCV ++checked_find_package (OpenCV CONFIG + DEFINITIONS -DUSE_OPENCV=1) + + # Intel TBB +@@ -226,19 +233,23 @@ checked_find_package (TBB 2017 + ISDEPOF OpenVDB) + + checked_find_package (DCMTK 3.6.1) # For DICOM images +-checked_find_package (FFmpeg 2.6) ++checked_find_package (FFMPEG) + checked_find_package (Field3D + DEPS HDF5 + DEFINITIONS -DUSE_FIELD3D=1) + checked_find_package (GIF 4) + checked_find_package (Libheif 1.3) # For HEIF/HEIC format + checked_find_package (LibRaw) +-checked_find_package (OpenJpeg) ++checked_find_package (OpenJPEG CONFIG) + checked_find_package (OpenVDB 5.0 + DEPS TBB + DEFINITIONS -DUSE_OPENVDB=1) +-checked_find_package (PTex) +-checked_find_package (Webp) ++checked_find_package (ptex CONFIG) ++set(PTEX_FOUND ${ptex_FOUND}) ++set(PTEX_LIBRARIES Ptex::Ptex) ++checked_find_package (Webp CONFIG) ++set(WEBP_FOUND ${Webp_FOUND}) ++set(WEBP_LIBRARY WebP::webp WebP::webpdemux WebP::webpdecoder) + + option (USE_R3DSDK "Enable R3DSDK (RED camera) support" OFF) + checked_find_package (R3DSDK) # RED camera +@@ -254,7 +265,9 @@ if (OPENGL_FOUND) + list (APPEND qt5_modules OpenGL) + endif () + option (USE_QT "Use Qt if found" ON) ++if (USE_QT) + checked_find_package (Qt5 COMPONENTS ${qt5_modules}) ++endif() + if (USE_QT AND NOT Qt5_FOUND AND APPLE) + message (STATUS " If you think you installed qt5 with Homebrew and it still doesn't work,") + message (STATUS " try: export PATH=/usr/local/opt/qt5/bin:$PATH") +diff --git a/src/jpeg2000.imageio/CMakeLists.txt b/src/jpeg2000.imageio/CMakeLists.txt +index 7bc6adb..0ac8937 100644 +--- a/src/jpeg2000.imageio/CMakeLists.txt ++++ b/src/jpeg2000.imageio/CMakeLists.txt +@@ -3,7 +3,7 @@ + # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md + + if (OPENJPEG_FOUND) +- if (${OPENJPEG_VERSION} VERSION_LESS 2.0) ++ if (0) + # Old OpenJpeg 1.5. Remove this eventually. + # + # For reasons I don't understand, OpenJPEG 1.5 fails imageinout_test +diff --git a/src/raw.imageio/CMakeLists.txt b/src/raw.imageio/CMakeLists.txt +index 81a0ff5..23326a0 100644 +--- a/src/raw.imageio/CMakeLists.txt ++++ b/src/raw.imageio/CMakeLists.txt +@@ -5,7 +5,7 @@ + if (LIBRAW_FOUND) + add_oiio_plugin (rawinput.cpp + INCLUDE_DIRS ${LibRaw_INCLUDE_DIR} +- LINK_LIBRARIES ${LibRaw_r_LIBRARIES} ++ LINK_LIBRARIES ${LibRaw_LIBRARIES} + DEFINITIONS "-DUSE_LIBRAW=1") + else () + message (WARNING "Raw plugin will not be built") diff --git a/vcpkg/ports/openimageio/fix-dependfmt.patch b/vcpkg/ports/openimageio/fix-dependfmt.patch new file mode 100644 index 0000000..f0791f8 --- /dev/null +++ b/vcpkg/ports/openimageio/fix-dependfmt.patch @@ -0,0 +1,13 @@ +diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake +index 4f1dfaf..1a17d1e 100644 +--- a/src/cmake/externalpackages.cmake ++++ b/src/cmake/externalpackages.cmake +@@ -385,5 +385,7 @@ macro (find_or_download_fmt) + checked_find_package (fmt REQUIRED) + endmacro() + +-find_or_download_fmt() ++find_package(fmt CONFIG REQUIRED) ++get_property(FMT_INCLUDES TARGET fmt::fmt PROPERTY INTERFACE_INCLUDE_DIRECTORIES) ++checked_find_package (fmt CONFIG REQUIRED) + include_directories (${FMT_INCLUDES}) diff --git a/vcpkg/ports/openimageio/fix-tools-path.patch b/vcpkg/ports/openimageio/fix-tools-path.patch new file mode 100644 index 0000000..b7bf375 --- /dev/null +++ b/vcpkg/ports/openimageio/fix-tools-path.patch @@ -0,0 +1,13 @@ +diff --git a/src/cmake/oiio_macros.cmake b/src/cmake/oiio_macros.cmake +index 9e54f67..d9c9437 100644 +--- a/src/cmake/oiio_macros.cmake ++++ b/src/cmake/oiio_macros.cmake +@@ -142,7 +142,7 @@ macro (fancy_add_executable) + target_link_libraries (${_target_NAME} PRIVATE ${_target_LINK_LIBRARIES}) + endif () + set_target_properties (${_target_NAME} PROPERTIES FOLDER "Tools") +- install_targets (${_target_NAME}) ++ install(TARGETS ${_target_NAME} RUNTIME DESTINATION tools/openimageio) + else () + message (STATUS "${ColorRed}Disabling ${_target_NAME} ${ColorReset}") + endif () diff --git a/vcpkg/ports/openimageio/fix_static_build.patch b/vcpkg/ports/openimageio/fix_static_build.patch new file mode 100644 index 0000000..a5ebb46 --- /dev/null +++ b/vcpkg/ports/openimageio/fix_static_build.patch @@ -0,0 +1,13 @@ +diff --git a/src/cmake/compiler.cmake b/src/cmake/compiler.cmake +index 1468be3..ed4167a 100644 +--- a/src/cmake/compiler.cmake ++++ b/src/cmake/compiler.cmake +@@ -482,7 +482,7 @@ set (EXTRA_DSO_LINK_ARGS "" CACHE STRING "Extra command line definitions when bu + # + option (BUILD_SHARED_LIBS "Build shared libraries (set to OFF to build static libs)" ON) + if (NOT BUILD_SHARED_LIBS) +- add_definitions (-D${PROJ_NAME}_STATIC_DEFINE=1) ++ add_definitions (-DOIIO_STATIC_DEFINE=1) + endif () + + diff --git a/vcpkg/ports/openimageio/portfile.cmake b/vcpkg/ports/openimageio/portfile.cmake new file mode 100644 index 0000000..f549457 --- /dev/null +++ b/vcpkg/ports/openimageio/portfile.cmake @@ -0,0 +1,85 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OpenImageIO/oiio + REF e028a5264bd229e128b37a4362f7eb9c73ea82cc #2.1.16.0 + SHA512 be5741e139c3c1d2fe62d6706833e9b158b6b00e1a57d141626f28cd3653f63e587b76de676b6b45d1a2330a0e71ebb2f1d00c108b68509cc418b6026424cfda + HEAD_REF master + PATCHES + fix-dependency.patch + fix_static_build.patch + fix-tools-path.patch + fix-config-cmake.patch + fix-dependfmt.patch +) + +file(REMOVE_RECURSE "${SOURCE_PATH}/ext") + +file(REMOVE "${SOURCE_PATH}/src/cmake/modules/FindLibRaw.cmake" + "${SOURCE_PATH}/src/cmake/modules/FindOpenEXR.cmake" + "${SOURCE_PATH}/src/cmake/modules/FindOpenCV.cmake" + "${SOURCE_PATH}/src/cmake/modules/FindFFmpeg.cmake" + "${SOURCE_PATH}/src/cmake/modules/FindWebp.cmake") + +file(MAKE_DIRECTORY "${SOURCE_PATH}/ext/robin-map/tsl") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(LINKSTATIC ON) +else() + set(LINKSTATIC OFF) +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + libraw USE_LIBRAW + opencolorio USE_OCIO + ffmpeg USE_FFMPEG + field3d USE_FIELD3D + freetype USE_FREETYPE + gif USE_GIF + opencv USE_OPENCV + openjpeg USE_OPENJPEG + webp USE_WEBP + pybind11 USE_PYTHON + tools OIIO_BUILD_TOOLS +) + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) +vcpkg_add_to_path("${PYTHON3_DIR}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DOIIO_BUILD_TESTS=OFF + -DHIDE_SYMBOLS=ON + -DUSE_DCMTK=OFF + -DUSE_NUKE=OFF + -DUSE_QT=OFF + -DUSE_PTEX=OFF + -DLINKSTATIC=${LINKSTATIC} + -DBUILD_MISSING_PYBIND11=OFF + -DBUILD_MISSING_DEPS=OFF + -DVERBOSE=ON +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/OpenImageIO TARGET_PATH share/OpenImageIO) + +if ("tools" IN_LIST FEATURES) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/openimageio) +endif() + +# Clean +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc + ${CURRENT_PACKAGES_DIR}/debug/doc + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share) + +file(COPY ${SOURCE_PATH}/src/cmake/modules/FindOpenImageIO.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/OpenImageIO) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/OpenImageIO) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/openimageio/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/openimageio/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..688c83f --- /dev/null +++ b/vcpkg/ports/openimageio/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,6 @@ +set(OPENIMAGEIO_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${OPENIMAGEIO_PREV_MODULE_PATH}) diff --git a/vcpkg/ports/openjpeg/CONTROL b/vcpkg/ports/openjpeg/CONTROL new file mode 100644 index 0000000..07afd75 --- /dev/null +++ b/vcpkg/ports/openjpeg/CONTROL @@ -0,0 +1,17 @@ +Source: openjpeg +Version: 2.3.1 +Port-Version: 2 +Homepage: https://github.com/uclouvain/openjpeg +Description: JPEG 2000 image library + +Feature: jpwl +Description: Build optional component jpwl + +Feature: mj2 +Description: Build optional component mj2 + +Feature: jpip +Description: Build optional component jpip + +Feature: jp3d +Description: Build optional component jp3d diff --git a/vcpkg/ports/openjpeg/dll.location.patch b/vcpkg/ports/openjpeg/dll.location.patch new file mode 100644 index 0000000..bdc77a5 --- /dev/null +++ b/vcpkg/ports/openjpeg/dll.location.patch @@ -0,0 +1,32 @@ +diff --git a/src/lib/openjp3d/CMakeLists.txt b/src/lib/openjp3d/CMakeLists.txt +index b0469af1f..75048ef13 100644 +--- a/src/lib/openjp3d/CMakeLists.txt ++++ b/src/lib/openjp3d/CMakeLists.txt +@@ -34,8 +34,9 @@ endif() + # Install library + install(TARGETS ${OPENJP3D_LIBRARY_NAME} + EXPORT OpenJP3DTargets +- DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} +- COMPONENT Libraries ++ RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications ++ LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries ++ ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries + ) + + # Install includes files +diff --git a/src/lib/openmj2/CMakeLists.txt b/src/lib/openmj2/CMakeLists.txt +index 25294b20e..e3acfe8e7 100644 +--- a/src/lib/openmj2/CMakeLists.txt ++++ b/src/lib/openmj2/CMakeLists.txt +@@ -53,8 +53,9 @@ endif() + # Install library + install(TARGETS ${OPENMJ2_LIBRARY_NAME} + EXPORT OpenMJ2Targets +- DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} +- COMPONENT Libraries ++ RUNTIME DESTINATION ${OPENJPEG_INSTALL_BIN_DIR} COMPONENT Applications ++ LIBRARY DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries ++ ARCHIVE DESTINATION ${OPENJPEG_INSTALL_LIB_DIR} COMPONENT Libraries + ) + + # Install includes files diff --git a/vcpkg/ports/openjpeg/portfile.cmake b/vcpkg/ports/openjpeg/portfile.cmake new file mode 100644 index 0000000..c6d8544 --- /dev/null +++ b/vcpkg/ports/openjpeg/portfile.cmake @@ -0,0 +1,75 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO uclouvain/openjpeg + REF v2.3.1 + SHA512 339fbc899bddf2393d214df71ed5d6070a3a76b933b1e75576c8a0ae9dfcc4adec40bdc544f599e4b8d0bc173e4e9e7352408497b5b3c9356985605830c26c03 + HEAD_REF master + PATCHES dll.location.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + list(APPEND OPTIONS "-DBUILD_SHARED_LIBS=OFF" + "-DBUILD_STATIC_LIBS=ON") +else() + list(APPEND OPTIONS "-DBUILD_SHARED_LIBS=ON" + "-DBUILD_STATIC_LIBS=OFF") +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + "jpwl" BUILD_JPWL + "mj2" BUILD_MJ2 + "jpip" BUILD_JPIP + "jp3d" BUILD_JP3D + ) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBUILD_CODEC:BOOL=OFF + -DBUILD_DOC:BOOL=OFF + -DOPENJPEG_INSTALL_PACKAGE_DIR=share/openjpeg + -DOPENJPEG_INSTALL_INCLUDE_DIR=include + -DEXECUTABLE_OUTPUT_PATH=tools/${PORT} + -DBUILD_PKGCONFIG_FILES=ON + ${FEATURE_OPTIONS} + ${OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() +if(VCPKG_TARGET_IS_WINDOWS) + # TODO: remove -lm from *.pc files +endif() +vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +set(TOOL_NAMES) +if("jpwl" IN_LIST FEATURES) + list(APPEND TOOL_NAMES opj_dec_server opj_jpwl_compress opj_jpwl_decompress) +endif() +if("mj2" IN_LIST FEATURES) + list(APPEND TOOL_NAMES opj_compress opj_decompress opj_dump opj_mj2_compress opj_mj2_decompress opj_mj2_extract opj_mj2_wrap) +endif() +if("jpip" IN_LIST FEATURES) + list(APPEND TOOL_NAMES opj_jpip_addxml opj_jpip_test opj_jpip_transcode) +endif() +if("jp3d" IN_LIST FEATURES) + list(APPEND TOOL_NAMES opj_jp3d_compress opj_jp3d_decompress) +endif() +if(TOOL_NAMES) + vcpkg_copy_tools(TOOL_NAMES ${TOOL_NAMES} AUTO_CLEAN) +endif() +file(READ ${CURRENT_PACKAGES_DIR}/include/openjpeg.h OPENJPEG_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined(OPJ_STATIC)" "1" OPENJPEG_H "${OPENJPEG_H}") +else() + string(REPLACE "defined(OPJ_STATIC)" "0" OPENJPEG_H "${OPENJPEG_H}") +endif() +string(REPLACE "defined(DLL_EXPORT)" "0" OPENJPEG_H "${OPENJPEG_H}") +file(WRITE ${CURRENT_PACKAGES_DIR}/include/openjpeg.h "${OPENJPEG_H}") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/openmama/CONTROL b/vcpkg/ports/openmama/CONTROL new file mode 100644 index 0000000..5f0fd3c --- /dev/null +++ b/vcpkg/ports/openmama/CONTROL @@ -0,0 +1,7 @@ +Source: openmama +Version: 6.3.0 +Port-Version: 1 +Build-Depends: libevent, apr, qpid-proton +Supports: windows&(x64|x86) +Homepage: https://github.com/OpenMAMA/OpenMAMA +Description: OpenMAMA is a high performance vendor neutral lightweight wrapper that provides a common API interface to different middleware and messaging solutions across a variety of platforms and languages. diff --git a/vcpkg/ports/openmama/portfile.cmake b/vcpkg/ports/openmama/portfile.cmake new file mode 100644 index 0000000..34b737e --- /dev/null +++ b/vcpkg/ports/openmama/portfile.cmake @@ -0,0 +1,53 @@ +include(vcpkg_common_functions) + +vcpkg_find_acquire_program(FLEX) +vcpkg_find_acquire_program(SCONS) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OpenMAMA/OpenMAMA + REF abd490e1e1ffae4c643454102b57dc587a338737 # OpenMAMA-6.3.0-release + SHA512 fd53c9a01075be414b13636b6f3bfbeeb43512d950625826fe133ba108972d71b170a20ce01175ca3e9ed263fd11e108f3902c6d404d43dd812e6a4748c032e1 + HEAD_REF next +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPROTON_ROOT=${CURRENT_INSTALLED_DIR} + -DAPR_ROOT=${CURRENT_INSTALLED_DIR} + -DINSTALL_RUNTIME_DEPENDENCIES=OFF + -DFLEX_EXECUTABLE=${FLEX} + -DWITH_EXAMPLES=OFF + -DWITH_TESTTOOLS=OFF +) + +vcpkg_install_cmake() + +# Copy across license files and copyright +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/openmama) +file(COPY ${SOURCE_PATH}/LICENSE.md + ${SOURCE_PATH}/LICENSE-3RD-PARTY.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/openmama/) +file(COPY ${SOURCE_PATH}/LICENSE.md + DESTINATION ${CURRENT_PACKAGES_DIR}/share/openmama/copyright) + +# Clean up LICENSE file - vcpkg doesn't expect it to be there +file(REMOVE ${CURRENT_PACKAGES_DIR}/LICENSE.MD ${CURRENT_PACKAGES_DIR}/debug/LICENSE.MD) + +# Temporary workaround until upstream project puts dll in right place +if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/libmamaplugindqstrategymd.dll") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libmamaplugindqstrategymd.dll ${CURRENT_PACKAGES_DIR}/bin/libmamaplugindqstrategymd.dll) +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/libmamaplugindqstrategymd.dll") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libmamaplugindqstrategymd.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libmamaplugindqstrategymd.dll) +endif() + +# Vcpkg does not expect include files to be in the debug directory +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +# Vcpkg does not like this header name and shouldn't be required anyway, so remove it +file(REMOVE "${CURRENT_PACKAGES_DIR}/include/platform.h") + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/openmesh/CONTROL b/vcpkg/ports/openmesh/CONTROL new file mode 100644 index 0000000..08bb719 --- /dev/null +++ b/vcpkg/ports/openmesh/CONTROL @@ -0,0 +1,3 @@ +Source: openmesh +Version: 8.1 +Description: A generic and efficient polygon mesh data structure diff --git a/vcpkg/ports/openmesh/portfile.cmake b/vcpkg/ports/openmesh/portfile.cmake new file mode 100644 index 0000000..7ff6cf1 --- /dev/null +++ b/vcpkg/ports/openmesh/portfile.cmake @@ -0,0 +1,50 @@ +set(VERSION 8.1) + +# Note: upstream GitLab instance at https://graphics.rwth-aachen.de:9000 often goes down +vcpkg_download_distfile(ARCHIVE + URLS "https://www.openmesh.org/media/Releases/${VERSION}/OpenMesh-${VERSION}.tar.gz" + FILENAME "OpenMesh-${VERSION}.tar.gz" + SHA512 c146e6b21d709a31772621a6a913def93a51460c4abb950c2eb64eea4528c7efd4c86166ba56ae0bc8090cc5878dd9328b570e094e61c1b64d6d298de05aca61 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE}" + REF "${VERSION}" +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(OPENMESH_BUILD_SHARED ON) +else() + set(OPENMESH_BUILD_SHARED OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_APPS=OFF + -DOPENMESH_BUILD_SHARED=${OPENMESH_BUILD_SHARED} + # [TODO]: add apps as feature, requires qt5 and freeglut +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/OpenMesh/cmake TARGET_PATH share/OpenMesh/cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/OpenMesh/Tools/VDPM/xpm) +# Only move dynamic libraries to bin on Windows +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/OpenMeshCore.dll ${CURRENT_PACKAGES_DIR}/bin/OpenMeshCore.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/OpenMeshTools.dll ${CURRENT_PACKAGES_DIR}/bin/OpenMeshTools.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/OpenMeshCored.dll ${CURRENT_PACKAGES_DIR}/debug/bin/OpenMeshCored.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/OpenMeshToolsd.dll ${CURRENT_PACKAGES_DIR}/debug/bin/OpenMeshToolsd.dll) +endif() + +configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake @ONLY) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/openmesh/usage b/vcpkg/ports/openmesh/usage new file mode 100644 index 0000000..1bfc821 --- /dev/null +++ b/vcpkg/ports/openmesh/usage @@ -0,0 +1,5 @@ +The package openmesh provides CMake targets: + + find_package(openmesh REQUIRED) + target_include_directories(main PRIVATE ${OPENMESH_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${OPENMESH_LIBRARIES}) diff --git a/vcpkg/ports/openmesh/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/openmesh/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..ee59349 --- /dev/null +++ b/vcpkg/ports/openmesh/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,18 @@ +include(FindPackageHandleStandardArgs) +include(SelectLibraryConfigurations) + +find_path(OPENMESHCORE_INCLUDE_DIR EigenVectorT.hh PATH_SUFFIXES OpenMesh/Core/Geometry) +get_filename_component(OPENMESHCORE_INCLUDE_DIR ${OPENMESHCORE_INCLUDE_DIR} DIRECTORY) +get_filename_component(OPENMESHCORE_INCLUDE_DIR ${OPENMESHCORE_INCLUDE_DIR} DIRECTORY) +get_filename_component(OPENMESHCORE_INCLUDE_DIR ${OPENMESHCORE_INCLUDE_DIR} DIRECTORY) + +find_library(OPENMESHCORE_LIBRARY_DEBUG NAMES OpenMeshCored libOpenMeshCored NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) +find_library(OPENMESHCORE_LIBRARY_RELEASE NAMES OpenMeshCore libOpenMeshCore NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED) +find_library(OPENMESHTOOLS_LIBRARY_DEBUG NAMES OpenMeshToolsd libOpenMeshToolsd NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) +find_library(OPENMESHTOOLS_LIBRARY_RELEASE NAMES OpenMeshTools libOpenMeshTools NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED) + +select_library_configurations(OPENMESHCORE) +select_library_configurations(OPENMESHTOOLS) + +set(OPENMESH_INCLUDE_DIRS ${OPENMESHCORE_INCLUDE_DIR}) +set(OPENMESH_LIBRARIES ${OPENMESHCORE_LIBRARY} ${OPENMESHTOOLS_LIBRARY}) \ No newline at end of file diff --git a/vcpkg/ports/openmpi/CONTROL b/vcpkg/ports/openmpi/CONTROL new file mode 100644 index 0000000..b9c4df0 --- /dev/null +++ b/vcpkg/ports/openmpi/CONTROL @@ -0,0 +1,6 @@ +Source: openmpi +Version: 4.0.3 +Port-Version: 3 +Homepage: https://www.open-mpi.org/ +Description: The Open MPI Project is an open source Message Passing Interface implementation that is developed and maintained by a consortium of academic, research, and industry partners. Open MPI is therefore able to combine the expertise, technologies, and resources from all across the High Performance Computing community in order to build the best MPI library available. Open MPI offers advantages for system and software vendors, application developers and computer science researchers. +Supports: !(windows|uwp) diff --git a/vcpkg/ports/openmpi/portfile.cmake b/vcpkg/ports/openmpi/portfile.cmake new file mode 100644 index 0000000..a51f55d --- /dev/null +++ b/vcpkg/ports/openmpi/portfile.cmake @@ -0,0 +1,38 @@ +vcpkg_fail_port_install(ON_TARGET "Windows" "UWP") + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +set(OpenMPI_FULL_VERSION "4.0.3") +set(OpenMPI_SHORT_VERSION "4.0") + +vcpkg_download_distfile(ARCHIVE + URLS "https://download.open-mpi.org/release/open-mpi/v${OpenMPI_SHORT_VERSION}/openmpi-${OpenMPI_FULL_VERSION}.tar.gz" + FILENAME "openmpi-${OpenMPI_FULL_VERSION}.tar.gz" + SHA512 23a9dfb7f4a63589b82f4e073a825550d3bc7e6b34770898325323ef4a28ed90b47576acaae6be427eb2007b37a88e18c1ea44d929b8ca083fe576ef1111fef6 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +vcpkg_find_acquire_program(PERL) +get_filename_component(PERL_PATH ${PERL} DIRECTORY) +vcpkg_add_to_path(${PERL_PATH}) + +vcpkg_configure_make( + COPY_SOURCE + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + --with-hwloc=internal + --with-libevent=internal + OPTIONS_DEBUG + --enable-debug +) + +vcpkg_install_make(DISABLE_PARALLEL) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/openmvg/CONTROL b/vcpkg/ports/openmvg/CONTROL new file mode 100644 index 0000000..288d530 --- /dev/null +++ b/vcpkg/ports/openmvg/CONTROL @@ -0,0 +1,16 @@ +Source: openmvg +Version: 1.5 +Port-Version: 1 +Description: open Multiple View Geometry library. Basis for 3D computer vision and Structure from Motion. +Build-Depends: coinutils, clp, osi, liblemon, flann, eigen3, ceres[suitesparse,cxsparse], cereal, libjpeg-turbo, tiff, libpng, zlib, vlfeat + +Feature: opencv +Build-Depends: opencv[contrib] +Description: opencv support for openmvg + +Feature: openmp +Description: openmp support for openmvg + +Feature: software +Build-Depends: qt5-base, qt5-svg +Description: build openMVG tools diff --git a/vcpkg/ports/openmvg/build_fixes.patch b/vcpkg/ports/openmvg/build_fixes.patch new file mode 100644 index 0000000..fff8846 --- /dev/null +++ b/vcpkg/ports/openmvg/build_fixes.patch @@ -0,0 +1,723 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 9cfd06c..8859469 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -14,6 +14,7 @@ if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) + message(FATAL_ERROR "In-source builds not allowed.") + endif() + ++if(0) + # ============================================================================== + # OpenMVG build options + # ============================================================================== +@@ -31,7 +32,7 @@ option(OpenMVG_USE_OPENMP "Enable OpenMP parallelization" ON) + # and openMVG simultaneously + # ============================================================================== + option(OpenMVG_USE_OPENCV "Build or not opencv+openMVG samples programs" OFF) +- ++endif() + # ============================================================================== + # Since OpenCV 3, SIFT is no longer in the default modules. See + # https://github.com/itseez/opencv_contrib for more informations. +@@ -85,6 +86,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + register_definitions(-DOPENMVG_STD_UNORDERED_MAP) + endif() + ++if(0) + # ============================================================================== + # Check that submodule have been initialized and updated + # ============================================================================== +@@ -93,6 +95,7 @@ if (NOT EXISTS ${PROJECT_SOURCE_DIR}/dependencies/cereal/include) + "\n submodule(s) are missing, please update your repository:\n" + " > git submodule update -i\n") + endif() ++endif() + + # ============================================================================== + # Additional cmake find modules +@@ -128,7 +131,6 @@ if (OpenMVG_USE_OPENMP) + find_package(OpenMP) + if (OPENMP_FOUND) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") +- option(OpenMVG_USE_OPENMP "Use OpenMP for parallelization" ON) + register_definitions(-DOPENMVG_USE_OPENMP) + if (NOT MSVC) + if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") +@@ -139,11 +141,6 @@ if (OpenMVG_USE_OPENMP) + endif() + endif (NOT MSVC) + endif (OPENMP_FOUND) +-else (OpenMVG_USE_OPENMP) +- option(OpenMVG_USE_OPENMP "Use OpenMP for parallelization" OFF) +- include(UpdateCacheVariable) +- UPDATE_CACHE_VARIABLE(OpenMVG_USE_OPENMP OFF) +- remove_definitions(-DOPENMVG_USE_OPENMP) + endif (OpenMVG_USE_OPENMP) + + # ============================================================================== +@@ -160,10 +157,10 @@ endif() + # ============================================================================== + # IMAGE IO detection + # ============================================================================== +-find_package(JPEG QUIET) +-find_package(PNG QUIET) +-find_package(TIFF QUIET) +- ++find_package(JPEG REQUIRED) ++find_package(PNG REQUIRED) ++find_package(TIFF REQUIRED) ++find_package(vlfeat REQUIRED) + # Folders + set_property(GLOBAL PROPERTY USE_FOLDERS ON) + +@@ -182,6 +179,7 @@ if (OpenMVG_BUILD_OPENGL_EXAMPLES) + set_property(TARGET glfw PROPERTY FOLDER OpenMVG/3rdParty/glfw) + endif (OpenMVG_BUILD_OPENGL_EXAMPLES) + ++if(0) + # Dependencies install rules + install( + DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/ +@@ -189,7 +187,7 @@ install( + COMPONENT headers + FILES_MATCHING PATTERN "*.hpp" PATTERN "*.h" + ) +- ++endif() + # ============================================================================== + # --END-- SUBMODULE CONFIGURATION + # ============================================================================== +@@ -225,6 +223,7 @@ ENDMACRO(UNIT_TEST) + # - external by default + # - internal if cereal not found + # ============================================================================== ++if(0) + find_package(cereal QUIET CONFIG) + if (NOT TARGET cereal) + add_library(cereal INTERFACE) +@@ -237,6 +236,10 @@ if (NOT TARGET cereal) + + set(OpenMVG_USE_INTERNAL_CEREAL ON) + endif() ++endif() ++ ++find_package(cereal REQUIRED CONFIG) ++get_target_property(CEREAL_INCLUDE_DIRS cereal INTERFACE_INCLUDE_DIRECTORIES) + + # ============================================================================== + # Eigen +@@ -245,6 +248,7 @@ endif() + # - external if EIGEN_INCLUDE_DIR_HINTS is defined + # - internal if Eigen not found + # ============================================================================== ++if(0) + find_package(Eigen3 QUIET) + if (NOT Eigen3_FOUND) + set(EIGEN_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/eigen) +@@ -253,13 +257,17 @@ if (NOT Eigen3_FOUND) + else() + set(EIGEN_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR}) + endif() ++endif() + ++find_package(Eigen3 REQUIRED) ++set(EIGEN_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR}) + # ============================================================================== + # Ceres + # ============================================================================== + # - external by default if CERES_DIR_HINTS or find_package found a valid Ceres + # - internal if ceres not found (ceres-solver+cxsparse+miniglog) + # ============================================================================== ++if(0) + find_package(Ceres QUIET HINTS ${CERES_DIR_HINTS}) + if (NOT Ceres_FOUND) + set(OpenMVG_USE_INTERNAL_CERES ON) +@@ -271,13 +279,16 @@ if (NOT Ceres_FOUND) + STRING(REGEX REPLACE "version ([0-9.]+).*" "\\1" CERES_VERSION ${CERES_CONFIG}) + set(CERES_LIBRARIES openMVG_ceres) + endif() ++endif() + ++find_package(Ceres REQUIRED) + # ============================================================================== + # Flann + # ============================================================================== + # - internal by default (flann), + # - external if FLANN_INCLUDE_DIR_HINTS and a valid Flann setup is found + # ============================================================================== ++if(0) + if (NOT DEFINED FLANN_INCLUDE_DIR_HINTS) + set(FLANN_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/flann/src/cpp) + set(OpenMVG_USE_INTERNAL_FLANN ON) +@@ -286,13 +297,16 @@ find_package(Flann QUIET) + if (NOT FLANN_FOUND OR OpenMVG_USE_INTERNAL_FLANN) + set(FLANN_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/flann/src/cpp) + endif() ++endif() + ++find_package(flann REQUIRED) + # ============================================================================== + # CoinUtils + # ============================================================================== + # - internal by default (CoinUtils), + # - external if COINUTILS_INCLUDE_DIR_HINTS and a valid CoinUtils setup is found + # ============================================================================== ++if(0) + if (NOT DEFINED COINUTILS_INCLUDE_DIR_HINTS) + set(COINUTILS_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/CoinUtils/src/) + set(OpenMVG_USE_INTERNAL_COINUTILS ON) +@@ -302,13 +316,16 @@ if (NOT DEFINED COINUTILS_INCLUDE_DIR_HINTS) + else() + find_package(CoinUtils QUIET) + endif() ++endif() + ++find_package(CoinUtils REQUIRED) + ## ============================================================================== + ## Clp + ## ============================================================================== + ## - internal by default (Clp), + ## - external if CLP_INCLUDE_DIR_HINTS and a valid Clp setup is found + ## ============================================================================== ++if(0) + if (NOT DEFINED CLP_INCLUDE_DIR_HINTS) + set(CLP_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/Clp/src/) + set(OpenMVG_USE_INTERNAL_CLP ON) +@@ -320,6 +337,9 @@ if (NOT DEFINED CLP_INCLUDE_DIR_HINTS) + else() + find_package(Clp QUIET) + endif() ++endif() ++ ++find_package(Clp REQUIRED) + + # ============================================================================== + # Osi +@@ -327,6 +347,7 @@ endif() + # - internal by default (Osi), + # - external if OSI_INCLUDE_DIR_HINTS and a valid Osi setup is found + # ============================================================================== ++if(0) + if (NOT DEFINED OSI_INCLUDE_DIR_HINTS) + set(OSI_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/osi_clp/Osi/src/) + set(OpenMVG_USE_INTERNAL_OSI ON) +@@ -336,6 +357,9 @@ if (NOT DEFINED OSI_INCLUDE_DIR_HINTS) + else() + find_package(Osi QUIET) + endif() ++endif() ++ ++find_package(Osi REQUIRED) + + # ============================================================================== + # Internal CLP/OSI/COINUTILS libraries: +@@ -354,6 +378,7 @@ endif() + # - internal by default (Lemon), + # - external if LEMON_INCLUDE_DIR_HINTS and a valid Lemon setup is found + # ============================================================================== ++if(0) + if (NOT DEFINED LEMON_INCLUDE_DIR_HINTS) + set(LEMON_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/lemon) + set(OpenMVG_USE_INTERNAL_LEMON ON) +@@ -365,6 +390,9 @@ if (NOT LEMON_FOUND OR OpenMVG_USE_INTERNAL_LEMON) + ${PROJECT_BINARY_DIR}/third_party/lemon) + set(LEMON_LIBRARY openMVG_lemon) + endif() ++endif() ++ ++find_package(LEMON REQUIRED) + + # ============================================================================== + # OpenCV +@@ -372,20 +400,13 @@ endif() + # - only external and enabled only if OpenMVG_USE_OPENCV is set to ON + # ============================================================================== + if (OpenMVG_USE_OPENCV) +- find_package( OpenCV QUIET ) +- if (NOT OpenCV_FOUND OR OpenCV_VERSION VERSION_LESS "3.0.0") +- message(STATUS "OpenCV was not found (note that OpenCV version >= 3.0.0 is required). -> Disabling OpenCV support.") +- UPDATE_CACHE_VARIABLE(OpenMVG_USE_OPENCV OFF) +- UPDATE_CACHE_VARIABLE(OpenMVG_USE_OCVSIFT OFF) +- endif() ++ find_package( OpenCV REQUIRED ) + endif() + +- + # ============================================================================== + # Third-party libraries: + # ============================================================================== + add_subdirectory(third_party) +-add_subdirectory(testing) + + # ============================================================================== + # openMVG modules +@@ -472,67 +493,67 @@ message("** Use OpenCV SIFT features: " ${OpenMVG_USE_OCVSIFT}) + + message("\n") + +-if (DEFINED OpenMVG_USE_INTERNAL_CEREAL) ++if (OpenMVG_USE_INTERNAL_CEREAL) + message(STATUS "CEREAL: (internal)") + else() + message(STATUS "CEREAL: (external)") + endif() + +-if (DEFINED OpenMVG_USE_INTERNAL_EIGEN) ++if (OpenMVG_USE_INTERNAL_EIGEN) + message(STATUS "EIGEN: " ${EIGEN_VERSION} " (internal)") + else() + message(STATUS "EIGEN: " ${EIGEN_VERSION} " (external)") + endif() + +-if (DEFINED OpenMVG_USE_INTERNAL_CERES) ++if (OpenMVG_USE_INTERNAL_CERES) + message(STATUS "CERES: " ${CERES_VERSION} " (internal)") + else() + message(STATUS "CERES: " ${CERES_VERSION} " (external)") + endif() + +-if (DEFINED OpenMVG_USE_INTERNAL_FLANN) ++if (OpenMVG_USE_INTERNAL_FLANN) + message(STATUS "FLANN: " ${FLANN_VERSION} " (internal)") + else() + message(STATUS "FLANN: " ${FLANN_VERSION} " (external)") + endif() + +-if (DEFINED OpenMVG_USE_INTERNAL_TIFF) ++if (OpenMVG_USE_INTERNAL_TIFF) + message(STATUS "LIBTIFF: " ${TIFF_VERSION_STRING} " (internal)") + else() + message(STATUS "LIBTIFF: " ${TIFF_VERSION_STRING} " (external)") + endif() + +-if (DEFINED OpenMVG_USE_INTERNAL_PNG) ++if (OpenMVG_USE_INTERNAL_PNG) + message(STATUS "LIBPNG: " ${PNG_VERSION_STRING} " (internal)") + else() + message(STATUS "LIBPNG: " ${PNG_VERSION_STRING} " (external)") + endif() + +-if (DEFINED OpenMVG_USE_INTERNAL_JPEG) ++if (OpenMVG_USE_INTERNAL_JPEG) + message(STATUS "LIBJPEG (internal)") + else() + message(STATUS "LIBJPEG (external)") + endif() + +-if (DEFINED OpenMVG_USE_INTERNAL_CLP) ++if (OpenMVG_USE_INTERNAL_CLP) + message(STATUS "CLP: " ${CLP_VERSION} " (internal)") + else() + message(STATUS "CLP: " ${CLP_VERSION} " (external)") + endif() + +-if (DEFINED OpenMVG_USE_INTERNAL_COINUTILS) ++if (OpenMVG_USE_INTERNAL_COINUTILS) + message(STATUS "COINUTILS: " ${COINUTILS_VERSION} " (internal)") + else() + message(STATUS "COINUTILS: " ${COINUTILS_VERSION} " (external)") + endif() + +-if (DEFINED OpenMVG_USE_INTERNAL_OSI) ++if (OpenMVG_USE_INTERNAL_OSI) + message(STATUS "OSI: " ${OSI_VERSION} " (internal)") + else() + message(STATUS "OSI: " ${OSI_VERSION} " (external)") + endif() + +-if (DEFINED OpenMVG_USE_INTERNAL_LEMON) ++if (OpenMVG_USE_INTERNAL_LEMON) + message(STATUS "LEMON: " ${LEMON_VERSION} " (internal)") + else() + message(STATUS "LEMON: " ${LEMON_VERSION} " (external)") +diff --git a/src/cmakeFindModules/FindClp.cmake b/src/cmakeFindModules/FindClp.cmake +index 8a69c23..6a81580 100644 +--- a/src/cmakeFindModules/FindClp.cmake ++++ b/src/cmakeFindModules/FindClp.cmake +@@ -51,9 +51,8 @@ IF(EXISTS "${CLP_DIR}" AND NOT "${CLP_DIR}" STREQUAL "") + SET(CLP_INCLUDE_DIR ${CLP_DIR}) + + FIND_LIBRARY(CLP_LIBRARY NAMES Clp) +- FIND_LIBRARY(CLPSOLVER_LIBRARY NAMES ClpSolver) +- FIND_LIBRARY(OSICLP_LIBRARY NAMES OsiClp) +- ++ FIND_LIBRARY(CLPSOLVER_LIBRARY NAMES ClpSolver Clp) ++ FIND_LIBRARY(OSICLP_LIBRARY NAMES OsiClp Clp) + # locate Clp libraries + IF(DEFINED CLP_LIBRARY AND DEFINED CLPSOLVER_LIBRARY AND DEFINED OSICLP_LIBRARY) + SET(CLP_LIBRARIES ${CLP_LIBRARY} ${CLPSOLVER_LIBRARY} ${OSICLP_LIBRARY}) +diff --git a/src/cmakeFindModules/OpenMVGConfig.cmake.in b/src/cmakeFindModules/OpenMVGConfig.cmake.in +index e7dfbfd..c01910d 100644 +--- a/src/cmakeFindModules/OpenMVGConfig.cmake.in ++++ b/src/cmakeFindModules/OpenMVGConfig.cmake.in +@@ -19,7 +19,7 @@ + # OPENMVG_VERSION: Version of OpenMVG found. + # + +-# Called if we failed to find OpenMVG or any of it's required dependencies, ++# Called if we failed to find OpenMVG or any of its required dependencies, + # unsets all public (designed to be used externally) variables and reports + # error message at priority depending upon [REQUIRED/QUIET/] argument. + macro(OPENMVG_REPORT_NOT_FOUND REASON_MSG) +@@ -59,9 +59,19 @@ set(CALLERS_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}) + # script. + set(CMAKE_MODULE_PATH ${CURRENT_CONFIG_INSTALL_DIR}) + ++include(CMakeFindDependencyMacro) ++find_dependency(CoinUtils) ++find_dependency(Clp) ++find_dependency(Osi) ++find_dependency(flann) ++find_dependency(Threads) ++find_dependency(cereal) ++find_dependency(Ceres) ++find_dependency(vlfeat) ++ + # Build the absolute root install directory as a relative path + get_filename_component(CURRENT_ROOT_INSTALL_DIR +- ${CMAKE_MODULE_PATH}/../../../ ABSOLUTE) ++ ${CMAKE_MODULE_PATH}/../../ ABSOLUTE) + if (NOT EXISTS ${CURRENT_ROOT_INSTALL_DIR}) + OPENMVG_REPORT_NOT_FOUND( + "OpenMVG install root: ${CURRENT_ROOT_INSTALL_DIR}, " +diff --git a/src/nonFree/sift/CMakeLists.txt b/src/nonFree/sift/CMakeLists.txt +index 402a2d8..60ddc11 100644 +--- a/src/nonFree/sift/CMakeLists.txt ++++ b/src/nonFree/sift/CMakeLists.txt +@@ -1,36 +1,36 @@ + +-# libs should be static +-set(BUILD_SHARED_LIBS OFF) +- +-# use PIC code for link into shared lib +-if(UNIX) +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") +-endif(UNIX) +- +-if(NOT USE_SSE2) +- add_definitions(-DVL_DISABLE_SSE2) +-endif() +- +-add_definitions(-DVL_DISABLE_THREADS) +- +-include_directories(./vl) +-set(FEATS +- vl/generic.c +- vl/imopv_sse2.c +- vl/sift.c +- vl/imopv.c +- vl/mathop_sse2.c +- vl/sift.c +- vl/host.c +- vl/mathop.c +- vl/random.c) +-set_source_files_properties(${FEATS} PROPERTIES LANGUAGE C) +-add_library(vlsift ${FEATS}) +-install(TARGETS vlsift DESTINATION lib EXPORT openMVG-targets) +-set_property(TARGET vlsift PROPERTY FOLDER OpenMVG/nonFree) ++## libs should be static ++#set(BUILD_SHARED_LIBS OFF) ++# ++## use PIC code for link into shared lib ++#if(UNIX) ++# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") ++#endif(UNIX) ++# ++#if(NOT USE_SSE2) ++# add_definitions(-DVL_DISABLE_SSE2) ++#endif() ++# ++#add_definitions(-DVL_DISABLE_THREADS) ++# ++#include_directories(./vl) ++#set(FEATS ++# vl/generic.c ++# vl/imopv_sse2.c ++# vl/sift.c ++# vl/imopv.c ++# vl/mathop_sse2.c ++# vl/sift.c ++# vl/host.c ++# vl/mathop.c ++# vl/random.c) ++#set_source_files_properties(${FEATS} PROPERTIES LANGUAGE C) ++#add_library(vlsift ${FEATS}) ++#install(TARGETS vlsift DESTINATION lib EXPORT openMVG-targets) ++#set_property(TARGET vlsift PROPERTY FOLDER OpenMVG/nonFree) + install( + DIRECTORY . + DESTINATION include/openMVG_dependencies/nonFree/sift + COMPONENT headers +- FILES_MATCHING PATTERN "*.hpp" PATTERN "*.h" ++ FILES_MATCHING PATTERN "*.hpp" + ) +diff --git a/src/nonFree/sift/SIFT_describer.hpp b/src/nonFree/sift/SIFT_describer.hpp +index cd800b0..20e9c8e 100644 +--- a/src/nonFree/sift/SIFT_describer.hpp ++++ b/src/nonFree/sift/SIFT_describer.hpp +@@ -17,9 +17,7 @@ + #include + #include + +-extern "C" { +-#include "nonFree/sift/vl/sift.h" +-} ++#include + + namespace openMVG { + namespace features { +@@ -174,7 +172,7 @@ public: + const int nkeys = vl_sift_get_nkeypoints(filt); + + // Update gradient before launching parallel extraction +- vl_sift_update_gradient(filt); ++ update_gradient(filt); + + #ifdef OPENMVG_USE_OPENMP + #pragma omp parallel for private(descr, descriptor) +diff --git a/src/openMVG/linearProgramming/CMakeLists.txt b/src/openMVG/linearProgramming/CMakeLists.txt +index cc5212f..acc57dd 100644 +--- a/src/openMVG/linearProgramming/CMakeLists.txt ++++ b/src/openMVG/linearProgramming/CMakeLists.txt +@@ -15,16 +15,12 @@ target_link_libraries(openMVG_linearProgramming + PUBLIC + openMVG_numeric + PRIVATE +- ${CLP_LIBRARIES} # clp + solver wrapper +- ${COINUTILS_LIBRARY} # container tools +- ${OSI_LIBRARY} # generic LP ++ Coin::Clp # clp + solver wrapper ++ Coin::CoinUtils # container tools ++ Coin::Osi # generic LP + ) + + target_include_directories(openMVG_linearProgramming +- PRIVATE +- ${CLP_INCLUDE_DIRS} +- ${COINUTILS_INCLUDE_DIRS} +- ${OSI_INCLUDE_DIRS} + PUBLIC + $ + ) +diff --git a/src/openMVG/matching/CMakeLists.txt b/src/openMVG/matching/CMakeLists.txt +index 5fcd972..b21ea7b 100644 +--- a/src/openMVG/matching/CMakeLists.txt ++++ b/src/openMVG/matching/CMakeLists.txt +@@ -18,6 +18,7 @@ list(REMOVE_ITEM matching_files_cpp ${REMOVEFILESUNITTEST}) + + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads REQUIRED) ++find_package(flann REQUIRED) + + set_source_files_properties(${matching_files_cpp} PROPERTIES LANGUAGE CXX) + add_library(openMVG_matching +@@ -39,10 +40,10 @@ target_link_libraries(openMVG_matching + Threads::Threads + cereal + ) +-if (NOT DEFINED OpenMVG_USE_INTERNAL_FLANN) ++if (NOT OpenMVG_USE_INTERNAL_FLANN) + target_link_libraries(openMVG_matching + PUBLIC +- ${FLANN_LIBRARIES} ++ flann::flann + ) + endif() + set_target_properties(openMVG_matching PROPERTIES SOVERSION ${OPENMVG_VERSION_MAJOR} VERSION "${OPENMVG_VERSION_MAJOR}.${OPENMVG_VERSION_MINOR}") +diff --git a/src/openMVG/numeric/CMakeLists.txt b/src/openMVG/numeric/CMakeLists.txt +index 06baee7..47255be 100644 +--- a/src/openMVG/numeric/CMakeLists.txt ++++ b/src/openMVG/numeric/CMakeLists.txt +@@ -24,7 +24,7 @@ target_include_directories(openMVG_numeric + $ + $ + ) +-if (DEFINED OpenMVG_USE_INTERNAL_EIGEN) ++if (OpenMVG_USE_INTERNAL_EIGEN) + target_include_directories(openMVG_numeric PUBLIC + $) + else() +diff --git a/src/openMVG_Samples/describe_and_match_GUI/CMakeLists.txt b/src/openMVG_Samples/describe_and_match_GUI/CMakeLists.txt +index 862ffc7..326fc9a 100644 +--- a/src/openMVG_Samples/describe_and_match_GUI/CMakeLists.txt ++++ b/src/openMVG_Samples/describe_and_match_GUI/CMakeLists.txt +@@ -18,7 +18,7 @@ if (OpenMVG_BUILD_GUI_SOFTWARES) + add_executable( openMVG_sample_describe_and_match_GUI WIN32 ${FEATURES_PAIR_DEMO_SRCS} ${FEATURES_PAIR_DEMO_HDRS} ) + endif( APPLE ) + +- target_link_libraries( openMVG_sample_describe_and_match_GUI Qt5::Widgets openMVG_features openMVG_image openMVG_matching vlsift ) ++ target_link_libraries( openMVG_sample_describe_and_match_GUI Qt5::Widgets openMVG_features openMVG_image openMVG_matching unofficial::vlfeat::vl ) + + set_target_properties( openMVG_sample_describe_and_match_GUI PROPERTIES CXX_STANDARD 11) + +diff --git a/src/openMVG_Samples/features_image_matching/CMakeLists.txt b/src/openMVG_Samples/features_image_matching/CMakeLists.txt +index 18fb385..d44ffce 100644 +--- a/src/openMVG_Samples/features_image_matching/CMakeLists.txt ++++ b/src/openMVG_Samples/features_image_matching/CMakeLists.txt +@@ -5,7 +5,7 @@ target_link_libraries(openMVG_sample_image_matching + openMVG_features + openMVG_matching + ${STLPLUS_LIBRARY} +- vlsift) ++ unofficial::vlfeat::vl) + target_compile_definitions(openMVG_sample_image_matching + PRIVATE -DTHIS_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}") + +diff --git a/src/openMVG_Samples/features_repeatability/CMakeLists.txt b/src/openMVG_Samples/features_repeatability/CMakeLists.txt +index fd2b7c6..91f2766 100644 +--- a/src/openMVG_Samples/features_repeatability/CMakeLists.txt ++++ b/src/openMVG_Samples/features_repeatability/CMakeLists.txt +@@ -6,7 +6,7 @@ target_link_libraries(openMVG_sample_main_features_repeatability_dataset + openMVG_matching + openMVG_system + openMVG_multiview +- vlsift ++ unofficial::vlfeat::vl + ${STLPLUS_LIBRARY}) + + set_property(TARGET openMVG_sample_main_features_repeatability_dataset PROPERTY FOLDER OpenMVG/Samples) +diff --git a/src/software/Localization/CMakeLists.txt b/src/software/Localization/CMakeLists.txt +index 2f60393..0d57d0a 100644 +--- a/src/software/Localization/CMakeLists.txt ++++ b/src/software/Localization/CMakeLists.txt +@@ -11,7 +11,7 @@ target_link_libraries(openMVG_main_SfM_Localization + openMVG_sfm + openMVG_exif + ${STLPLUS_LIBRARY} +- vlsift ++ unofficial::vlfeat::vl + ) + + # Installation rules +diff --git a/src/software/SfM/CMakeLists.txt b/src/software/SfM/CMakeLists.txt +index 013a6c8..f38daa9 100644 +--- a/src/software/SfM/CMakeLists.txt ++++ b/src/software/SfM/CMakeLists.txt +@@ -44,7 +44,7 @@ target_link_libraries(openMVG_main_ComputeFeatures + openMVG_multiview + openMVG_sfm + ${STLPLUS_LIBRARY} +- vlsift ++ unofficial::vlfeat::vl + ) + if (MSVC) + set_target_properties(openMVG_main_ComputeFeatures PROPERTIES COMPILE_FLAGS "/bigobj") +@@ -235,7 +235,7 @@ if(OpenMVG_USE_OPENCV) + openMVG_multiview + openMVG_sfm + ${STLPLUS_LIBRARY} +- vlsift ++ unofficial::vlfeat::vl + ${OpenCV_LIBS}) + target_include_directories(openMVG_main_ComputeFeatures_OpenCV PRIVATE ${OpenCV_INCLUDE_DIRS}) + +diff --git a/src/software/SfM/SfM_GlobalPipeline.py.in b/src/software/SfM/SfM_GlobalPipeline.py.in +index 42405a4..28b0246 100644 +--- a/src/software/SfM/SfM_GlobalPipeline.py.in ++++ b/src/software/SfM/SfM_GlobalPipeline.py.in +@@ -21,7 +21,7 @@ + OPENMVG_SFM_BIN = "@OPENMVG_SOFTWARE_SFM_BUILD_DIR@" + + # Indicate the openMVG camera sensor width directory +-CAMERA_SENSOR_WIDTH_DIRECTORY = "@OPENMVG_SOFTWARE_SFM_SRC_DIR@" + "/../../openMVG/exif/sensor_width_database" ++CAMERA_SENSOR_WIDTH_DIRECTORY = "@OPENMVG_CAMERA_SENSOR_WIDTH_DIRECTORY@" + + import os + import subprocess +@@ -77,5 +77,3 @@ pRecons.wait() + + pRecons = subprocess.Popen( [os.path.join(OPENMVG_SFM_BIN, "openMVG_main_ComputeSfM_DataColor"), "-i", reconstruction_dir+"/robust.bin", "-o", os.path.join(reconstruction_dir,"robust_colorized.ply")] ) + pRecons.wait() +- +- +diff --git a/src/software/SfM/SfM_SequentialPipeline.py.in b/src/software/SfM/SfM_SequentialPipeline.py.in +index 9a5a482..e804a19 100644 +--- a/src/software/SfM/SfM_SequentialPipeline.py.in ++++ b/src/software/SfM/SfM_SequentialPipeline.py.in +@@ -21,7 +21,7 @@ + OPENMVG_SFM_BIN = "@OPENMVG_SOFTWARE_SFM_BUILD_DIR@" + + # Indicate the openMVG camera sensor width directory +-CAMERA_SENSOR_WIDTH_DIRECTORY = "@OPENMVG_SOFTWARE_SFM_SRC_DIR@" + "/../../openMVG/exif/sensor_width_database" ++CAMERA_SENSOR_WIDTH_DIRECTORY = "@OPENMVG_CAMERA_SENSOR_WIDTH_DIRECTORY@" + + import os + import subprocess +@@ -77,5 +77,3 @@ pRecons.wait() + + pRecons = subprocess.Popen( [os.path.join(OPENMVG_SFM_BIN, "openMVG_main_ComputeSfM_DataColor"), "-i", reconstruction_dir+"/robust.bin", "-o", os.path.join(reconstruction_dir,"robust_colorized.ply")] ) + pRecons.wait() +- +- +diff --git a/src/software/SfM/tutorial_demo.py.in b/src/software/SfM/tutorial_demo.py.in +index 259e24e..1097062 100644 +--- a/src/software/SfM/tutorial_demo.py.in ++++ b/src/software/SfM/tutorial_demo.py.in +@@ -12,7 +12,7 @@ + OPENMVG_SFM_BIN = "@OPENMVG_SOFTWARE_SFM_BUILD_DIR@" + + # Indicate the openMVG camera sensor width directory +-CAMERA_SENSOR_WIDTH_DIRECTORY = "@OPENMVG_SOFTWARE_SFM_SRC_DIR@" + "/../../openMVG/exif/sensor_width_database" ++CAMERA_SENSOR_WIDTH_DIRECTORY = "@OPENMVG_CAMERA_SENSOR_WIDTH_DIRECTORY@" + + import os + import subprocess +@@ -89,5 +89,3 @@ pRecons.wait() + print ("4. Structure from Known Poses (robust triangulation)") + pRecons = subprocess.Popen( [os.path.join(OPENMVG_SFM_BIN, "openMVG_main_ComputeStructureFromKnownPoses"), "-i", reconstruction_dir+"/sfm_data.bin", "-m", matches_dir, "-o", os.path.join(reconstruction_dir,"robust.ply")] ) + pRecons.wait() +- +- +diff --git a/src/software/VO/Tracker_opencv_klt.hpp b/src/software/VO/Tracker_opencv_klt.hpp +index aa7dffe..2c4d237 100644 +--- a/src/software/VO/Tracker_opencv_klt.hpp ++++ b/src/software/VO/Tracker_opencv_klt.hpp +@@ -80,7 +80,7 @@ struct Tracker_opencv_KLT : public Abstract_Tracker + std::vector m_nextKeypoints; + + cv::Ptr m_detector = cv::GFTTDetector::create(count); +- if (m_detector == NULL) ++ if (m_detector == nullptr) + return false; + + m_detector->detect(current_img, m_nextKeypoints); +diff --git a/src/third_party/CMakeLists.txt b/src/third_party/CMakeLists.txt +index 816a941..f0b7145 100644 +--- a/src/third_party/CMakeLists.txt ++++ b/src/third_party/CMakeLists.txt +@@ -18,7 +18,7 @@ add_subdirectory(stlplus3) + set(STLPLUS_LIBRARY openMVG_stlplus PARENT_SCOPE) + + # Add graph library +-if(DEFINED OpenMVG_USE_INTERNAL_LEMON) ++if(OpenMVG_USE_INTERNAL_LEMON) + add_subdirectory(lemon) + set_property(TARGET openMVG_lemon PROPERTY FOLDER OpenMVG/3rdParty/lemon) + set_property(TARGET check PROPERTY FOLDER OpenMVG/3rdParty/lemon) +@@ -68,7 +68,7 @@ endif (NOT TIFF_FOUND) + add_subdirectory(vectorGraphics) + + # Add ceres-solver (A Nonlinear Least Squares Minimizer) +-if (DEFINED OpenMVG_USE_INTERNAL_CERES) ++if (OpenMVG_USE_INTERNAL_CERES) + add_subdirectory(cxsparse) + add_subdirectory(ceres-solver) + set_property(TARGET openMVG_cxsparse PROPERTY FOLDER OpenMVG/3rdParty/ceres) +@@ -76,7 +76,7 @@ if (DEFINED OpenMVG_USE_INTERNAL_CERES) + endif() + + # Add an Approximate Nearest Neighbor library +-if (DEFINED OpenMVG_USE_INTERNAL_FLANN) ++if (OpenMVG_USE_INTERNAL_FLANN) + set(FLANN_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/openMVG/third_party/flann/src/cpp) + add_subdirectory(flann) + endif() +@@ -90,7 +90,7 @@ add_subdirectory(fast) + ## + # Install Header only libraries if necessary + ## +-if (DEFINED OpenMVG_USE_INTERNAL_EIGEN) ++if (OpenMVG_USE_INTERNAL_EIGEN) + #Configure Eigen install + set(EIGEN_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/openMVG/third_party/eigen) + add_subdirectory(eigen) diff --git a/vcpkg/ports/openmvg/portfile.cmake b/vcpkg/ports/openmvg/portfile.cmake new file mode 100644 index 0000000..0b3265d --- /dev/null +++ b/vcpkg/ports/openmvg/portfile.cmake @@ -0,0 +1,175 @@ +vcpkg_buildpath_length_warning(37) + +#the port produces some empty dlls when building shared libraries, since some components do not export anything, breaking the internal build itself +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +if("software" IN_LIST FEATURES AND VCPKG_CRT_LINKAGE STREQUAL static) + message(FATAL_ERROR "OpenMVG software currently cannot be built with static CRT linking. Please open an issue if you require this feature.") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO openMVG/openMVG + REF 606d1c9e82123dd50de282128151a50bf42262fc # v1.5 + SHA512 eddcf4c5f86541112840a6d89bbf360d30b085c2b3ff3e39b357030a465163b465e89d01474f8dbd65b66f8bccfc1f54a58963324f622482e2960f00214b2b75 + PATCHES + build_fixes.patch +) + +set(OpenMVG_USE_OPENMP OFF) +if("openmp" IN_LIST FEATURES) + if(VCPKG_TARGET_IS_WINDOWS) + message(WARNING "OpenMP feature is broken on Windows, disabled until fixed https://github.com/openMVG/openMVG/issues/1765") + else() + set(OpenMVG_USE_OPENMP ON) + endif() +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + opencv OpenMVG_USE_OPENCV + opencv OpenMVG_USE_OCVSIFT + software OpenMVG_BUILD_SOFTWARES + software OpenMVG_BUILD_GUI_SOFTWARES +) + +# remove some deps to prevent conflict +file(REMOVE_RECURSE ${SOURCE_PATH}/src/third_party/ceres-solver + ${SOURCE_PATH}/src/third_party/cxsparse + ${SOURCE_PATH}/src/third_party/eigen + ${SOURCE_PATH}/src/third_party/flann + ${SOURCE_PATH}/src/third_party/jpeg + ${SOURCE_PATH}/src/third_party/lemon + ${SOURCE_PATH}/src/third_party/png + ${SOURCE_PATH}/src/third_party/tiff + ${SOURCE_PATH}/src/third_party/zlib) + +# remove some cmake modules to force using our configs +file(REMOVE_RECURSE ${SOURCE_PATH}/src/cmakeFindModules/FindEigen.cmake + ${SOURCE_PATH}/src/cmakeFindModules/FindLemon.cmake + ${SOURCE_PATH}/src/cmakeFindModules/FindFlann.cmake + ${SOURCE_PATH}/src/cmakeFindModules/FindCoinUtils.cmake + ${SOURCE_PATH}/src/cmakeFindModules/FindClp.cmake + ${SOURCE_PATH}/src/cmakeFindModules/FindOsi.cmake) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/src + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DOpenMVG_USE_OPENMP=${OpenMVG_USE_OPENMP} + -DOpenMVG_BUILD_SHARED=OFF + -DOpenMVG_BUILD_TESTS=OFF + -DOpenMVG_BUILD_DOC=OFF + -DOpenMVG_BUILD_EXAMPLES=OFF + -DOpenMVG_BUILD_OPENGL_EXAMPLES=OFF + -DOpenMVG_BUILD_COVERAGE=OFF + -DOpenMVG_USE_INTERNAL_CLP=OFF + -DOpenMVG_USE_INTERNAL_COINUTILS=OFF + -DOpenMVG_USE_INTERNAL_OSI=OFF + -DOpenMVG_USE_INTERNAL_EIGEN=OFF + -DOpenMVG_USE_INTERNAL_CEREAL=OFF + -DOpenMVG_USE_INTERNAL_CERES=OFF + -DOpenMVG_USE_INTERNAL_FLANN=OFF + -DOpenMVG_USE_INTERNAL_LEMON=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/openMVG/cmake) + +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/openMVG/image/image_test + ${CURRENT_PACKAGES_DIR}/include/openMVG/exif/image_data + ${CURRENT_PACKAGES_DIR}/include/openMVG_dependencies/nonFree/sift/vl) + +if(OpenMVG_BUILD_SHARED) + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + # release + file(GLOB DLL_FILES ${CURRENT_PACKAGES_DIR}/lib/*.dll) + file(COPY ${DLL_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${DLL_FILES}) + endif() + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + # debug + file(GLOB DLL_FILES ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) + file(COPY ${DLL_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE ${DLL_FILES}) + endif() +endif() +vcpkg_copy_pdbs() + +if("software" IN_LIST FEATURES) + if(VCPKG_TARGET_IS_OSX) + vcpkg_copy_tools(TOOL_NAMES + openMVG_main_AlternativeVO.app + ui_openMVG_MatchesViewer.app + ) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/openMVG_main_AlternativeVO.app) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/ui_openMVG_MatchesViewer.app) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/openMVG_main_AlternativeVO.app) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/ui_openMVG_MatchesViewer.app) + else() + vcpkg_copy_tools(AUTO_CLEAN TOOL_NAMES + openMVG_main_AlternativeVO + ui_openMVG_MatchesViewer + ) + endif() + vcpkg_copy_tools(AUTO_CLEAN TOOL_NAMES + openMVG_main_ChangeLocalOrigin + openMVG_main_ColHarmonize + openMVG_main_ComputeClusters + openMVG_main_ComputeFeatures + openMVG_main_ComputeMatches + openMVG_main_ComputeSfM_DataColor + openMVG_main_ComputeStructureFromKnownPoses + openMVG_main_ConvertList + openMVG_main_ConvertSfM_DataFormat + openMVG_main_evalQuality + openMVG_main_ExportCameraFrustums + openMVG_main_exportKeypoints + openMVG_main_exportMatches + openMVG_main_exportTracks + openMVG_main_ExportUndistortedImages + openMVG_main_FrustumFiltering + openMVG_main_geodesy_registration_to_gps_position + openMVG_main_GlobalSfM + openMVG_main_IncrementalSfM + openMVG_main_IncrementalSfM2 + openMVG_main_ListMatchingPairs + openMVG_main_MatchesToTracks + openMVG_main_openMVG2Agisoft + openMVG_main_openMVG2CMPMVS + openMVG_main_openMVG2Colmap + openMVG_main_openMVG2MESHLAB + openMVG_main_openMVG2MVE2 + openMVG_main_openMVG2MVSTEXTURING + openMVG_main_openMVG2NVM + openMVG_main_openMVG2openMVS + openMVG_main_openMVG2PMVS + openMVG_main_openMVG2WebGL + openMVG_main_openMVGSpherical2Cubic + openMVG_main_PointsFiltering + openMVG_main_SfMInit_ImageListing + openMVG_main_SfMInit_ImageListingFromKnownPoses + openMVG_main_SfM_Localization + openMVG_main_SplitMatchFileIntoMatchFiles + ui_openMVG_control_points_registration + ) + if("opencv" IN_LIST FEATURES) + vcpkg_copy_tools(AUTO_CLEAN TOOL_NAMES + openMVG_main_ComputeFeatures_OpenCV + ) + endif() + + file(COPY ${SOURCE_PATH}/src/openMVG/exif/sensor_width_database/sensor_width_camera_database.txt DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + set(OPENMVG_SOFTWARE_SFM_BUILD_DIR ${CURRENT_INSTALLED_DIR}/tools/${PORT}) + set(OPENMVG_CAMERA_SENSOR_WIDTH_DIRECTORY ${CURRENT_INSTALLED_DIR}/tools/${PORT}) + configure_file("${SOURCE_PATH}/src/software/SfM/tutorial_demo.py.in" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/tutorial_demo.py" @ONLY) + configure_file("${SOURCE_PATH}/src/software/SfM/SfM_GlobalPipeline.py.in" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/SfM_GlobalPipeline.py" @ONLY) + configure_file("${SOURCE_PATH}/src/software/SfM/SfM_SequentialPipeline.py.in" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/SfM_SequentialPipeline.py" @ONLY) + message(STATUS "To use tools, you need graphviz installed and manually added to path (to have neato executable)") +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/openmvs/CONTROL b/vcpkg/ports/openmvs/CONTROL new file mode 100644 index 0000000..6947e92 --- /dev/null +++ b/vcpkg/ports/openmvs/CONTROL @@ -0,0 +1,13 @@ +Source: openmvs +Version: 1.1 +Port-Version: 4 +Description: OpenMVS: open Multi-View Stereo reconstruction library +Homepage: https://cdcseacave.github.io/openMVS +Build-Depends: zlib, boost-iostreams, boost-program-options, boost-system, boost-serialization, eigen3, opencv, cgal[core], glew, glfw3, vcglib, openmvg[software] (!(windows&static)), libpng, tiff + +Feature: cuda +Build-Depends: cuda +Description: cuda support for openmvs + +Feature: openmp +Description: openmp support for openmvs diff --git a/vcpkg/ports/openmvs/fix-build.patch b/vcpkg/ports/openmvs/fix-build.patch new file mode 100644 index 0000000..54d50c2 --- /dev/null +++ b/vcpkg/ports/openmvs/fix-build.patch @@ -0,0 +1,449 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7966ed5..f34b5b4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -63,9 +63,10 @@ INCLUDE_DIRECTORIES("${OpenMVS_SOURCE_DIR}") + SET(OpenMVS_EXTRA_LIBS "") + if(OpenMVS_USE_OPENMP) + SET(OpenMP_LIBS "") +- FIND_PACKAGE(OpenMP) +- if(OPENMP_FOUND) +- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") ++ FIND_PACKAGE(OpenMP REQUIRED) ++ if(OpenMP_FOUND) ++ link_libraries(OpenMP::OpenMP_CXX) ++ link_libraries(OpenMP::OpenMP_C) + ADD_DEFINITIONS(-D_USE_OPENMP) + SET(_USE_OPENMP TRUE) + #cmake only check for separate OpenMP library on AppleClang 7+ +@@ -83,7 +84,7 @@ if(OpenMVS_USE_OPENGL) + if(POLICY CMP0072) + cmake_policy(SET CMP0072 NEW) + endif() +- FIND_PACKAGE(OpenGL) ++ FIND_PACKAGE(OpenGL REQUIRED) + if(OPENGL_FOUND) + INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR}) + ADD_DEFINITIONS(${OpenGL_DEFINITIONS} -D_USE_OPENGL) +@@ -94,7 +95,7 @@ if(OpenMVS_USE_OPENGL) + endif() + + if(OpenMVS_USE_CUDA) +- FIND_PACKAGE(CUDA) ++ FIND_PACKAGE(CUDA REQUIRED) + if(CUDA_FOUND) + INCLUDE_DIRECTORIES(${CUDA_INCLUDE_DIRS}) + ADD_DEFINITIONS(-D_USE_CUDA) +@@ -108,7 +109,7 @@ else() + endif() + + if(OpenMVS_USE_BREAKPAD) +- FIND_PACKAGE(BREAKPAD) ++ FIND_PACKAGE(BREAKPAD REQUIRED) + if(BREAKPAD_FOUND) + INCLUDE_DIRECTORIES(${BREAKPAD_INCLUDE_DIRS}) + ADD_DEFINITIONS(${BREAKPAD_DEFINITIONS} -D_USE_BREAKPAD) +@@ -119,7 +120,7 @@ if(OpenMVS_USE_BREAKPAD) + endif() + endif() + +-FIND_PACKAGE(Boost ${SYSTEM_PACKAGE_REQUIRED} COMPONENTS iostreams program_options system serialization) ++FIND_PACKAGE(Boost COMPONENTS iostreams program_options system serialization REQUIRED) + if(Boost_FOUND) + INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) + ADD_DEFINITIONS(${Boost_DEFINITIONS} -D_USE_BOOST) +@@ -127,14 +128,14 @@ if(Boost_FOUND) + SET(_USE_BOOST TRUE) + endif() + +-FIND_PACKAGE(Eigen ${SYSTEM_PACKAGE_REQUIRED}) +-if(EIGEN_FOUND) +- INCLUDE_DIRECTORIES(${EIGEN_INCLUDE_DIRS}) +- ADD_DEFINITIONS(${EIGEN_DEFINITIONS} -D_USE_EIGEN) ++FIND_PACKAGE(Eigen3 REQUIRED) ++if(EIGEN3_FOUND) ++ INCLUDE_DIRECTORIES(${EIGEN3_INCLUDE_DIRS}) ++ ADD_DEFINITIONS(${EIGEN3_DEFINITIONS} -D_USE_EIGEN) + SET(_USE_EIGEN TRUE) + endif() + +-FIND_PACKAGE(OpenCV ${SYSTEM_PACKAGE_REQUIRED}) ++FIND_PACKAGE(OpenCV REQUIRED) + if(OpenCV_FOUND) + INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIRS}) + ADD_DEFINITIONS(${OpenCV_DEFINITIONS}) +@@ -170,7 +171,9 @@ ADD_DEFINITIONS(${OpenMVS_DEFINITIONS}) + + # Add modules + ADD_SUBDIRECTORY(libs) ++if(OpenMVS_BUILD_TOOLS) + ADD_SUBDIRECTORY(apps) ++endif() + ADD_SUBDIRECTORY(docs) + + if(OpenMVS_USE_CERES) +@@ -188,7 +191,7 @@ export(TARGETS Common IO Math MVS FILE "${PROJECT_BINARY_DIR}/OpenMVSTargets.cma + # Export the package for use from the build-tree + # (this registers the build-tree with a global CMake-registry) + export(PACKAGE OpenMVS) +- ++ + # Create the OpenMVSConfig.cmake and OpenMVSConfigVersion files + file(RELATIVE_PATH REL_INCLUDE_DIR "${INSTALL_CMAKE_DIR}" "${INSTALL_INCLUDE_DIR}") + # ... for the build tree +@@ -199,7 +202,7 @@ set(CONF_INCLUDE_DIRS "${INSTALL_CMAKE_DIR}/${REL_INCLUDE_DIR}") + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/build/OpenMVSConfig.cmake.in" "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/OpenMVSConfig.cmake" @ONLY) + # ... for both + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/build/OpenMVSConfigVersion.cmake.in" "${PROJECT_BINARY_DIR}/OpenMVSConfigVersion.cmake" @ONLY) +- ++ + # Install the OpenMVSConfig.cmake and OpenMVSConfigVersion.cmake + install(FILES + "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/OpenMVSConfig.cmake" +diff --git a/MvgMvsPipeline.py b/MvgMvsPipeline.py.in +similarity index 97% +rename from MvgMvsPipeline.py +rename to MvgMvsPipeline.py.in +index f4914bf..23d03e6 100644 +--- a/MvgMvsPipeline.py ++++ b/MvgMvsPipeline.py.in +@@ -91,12 +91,12 @@ def find(afile): + return None + + # Try to find openMVG and openMVS binaries in PATH +-OPENMVG_BIN = whereis("openMVG_main_SfMInit_ImageListing") +-OPENMVS_BIN = whereis("ReconstructMesh") ++OPENMVG_BIN = "@OPENMVG_TOOLS_PATH@" ++OPENMVS_BIN = "@OPENMVS_TOOLS_PATH@" + + # Try to find openMVG camera sensor database +-CAMERA_SENSOR_DB_FILE = "sensor_width_camera_database.txt" +-CAMERA_SENSOR_DB_DIRECTORY = find(CAMERA_SENSOR_DB_FILE) ++CAMERA_SENSOR_DB_FILE = "@SENSOR_WIDTH_CAMERA_DATABASE_TXT_PATH@" ++CAMERA_SENSOR_DB_DIRECTORY = "@OPENMVG_TOOLS_PATH@" + + # Ask user for openMVG and openMVS directories if not found + if not OPENMVG_BIN: +@@ -175,10 +175,10 @@ class StepsStore: + ["-i", "%input_dir%", "-o", "%matches_dir%", "-d", "%camera_file_params%"]], + ["Compute features", # 1 + os.path.join(OPENMVG_BIN, "openMVG_main_ComputeFeatures"), +- ["-i", "%matches_dir%/sfm_data.json", "-o", "%matches_dir%", "-m", "SIFT", "-n", "4"]], ++ ["-i", "%matches_dir%/sfm_data.json", "-o", "%matches_dir%", "-m", "SIFT"]], + ["Compute matches", # 2 + os.path.join(OPENMVG_BIN, "openMVG_main_ComputeMatches"), +- ["-i", "%matches_dir%/sfm_data.json", "-o", "%matches_dir%", "-n", "HNSWL2", "-r", ".8"]], ++ ["-i", "%matches_dir%/sfm_data.json", "-o", "%matches_dir%", "-n", "AUTO", "-r", ".8"]], + ["Incremental reconstruction", # 3 + os.path.join(OPENMVG_BIN, "openMVG_main_IncrementalSfM"), + ["-i", "%matches_dir%/sfm_data.json", "-m", "%matches_dir%", "-o", "%reconstruction_dir%"]], +diff --git a/apps/Viewer/CMakeLists.txt b/apps/Viewer/CMakeLists.txt +index c519040..934cd50 100644 +--- a/apps/Viewer/CMakeLists.txt ++++ b/apps/Viewer/CMakeLists.txt +@@ -16,18 +16,6 @@ else() + MESSAGE("-- Can't find GLEW. Continuing without it.") + RETURN() + endif() +-if(CMAKE_COMPILER_IS_GNUCXX) +- FIND_PACKAGE(PkgConfig QUIET) +- pkg_search_module(GLFW QUIET glfw3) +- if(GLFW_FOUND) +- INCLUDE_DIRECTORIES(${GLFW_INCLUDE_DIRS}) +- ADD_DEFINITIONS(${GLFW_DEFINITIONS}) +- MESSAGE(STATUS "GLFW3 ${GLFW_VERSION} found (include: ${GLFW_INCLUDE_DIRS})") +- else() +- MESSAGE("-- Can't find GLFW3. Continuing without it.") +- RETURN() +- endif() +-else() + FIND_PACKAGE(glfw3 QUIET) + if(glfw3_FOUND) + INCLUDE_DIRECTORIES(${glfw3_INCLUDE_DIRS}) +@@ -37,7 +25,6 @@ else() + MESSAGE("-- Can't find GLFW3. Continuing without it.") + RETURN() + endif() +-endif() + + # List sources files + FILE(GLOB PCH_C "Common.cpp") +diff --git a/build/OpenMVSConfig.cmake.in b/build/OpenMVSConfig.cmake.in +index 96b8fe2..fa6d4a6 100644 +--- a/build/OpenMVSConfig.cmake.in ++++ b/build/OpenMVSConfig.cmake.in +@@ -3,16 +3,71 @@ + # OpenMVS_INCLUDE_DIRS - include directories for OpenMVS + # OpenMVS_LIBRARIES - libraries to link against + # OpenMVS_BINARIES - the binaries +- ++ + # Compute paths + get_filename_component(OpenMVS_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) + set(OpenMVS_INCLUDE_DIRS "@CONF_INCLUDE_DIRS@") +- ++list(APPEND CMAKE_MODULE_PATH "${OpenMVS_CMAKE_DIR}") ++ ++if (MSVC) ++ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /GL") ++ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL") ++ set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG") ++ set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} /LTCG") ++endif() ++ ++set(CMAKE_CXX_STANDARD 14) ++set(CMAKE_CXX_STANDARD_REQUIRED ON) ++ ++include(CMakeFindDependencyMacro) ++ ++if(@OpenMVS_USE_OPENMP@) ++ find_dependency(OpenMP) ++ add_definitions(-D_USE_OPENMP) ++endif() ++ ++if(@OpenMVS_USE_OPENGL@) ++ find_dependency(OpenGL) ++ add_definitions(${OpenGL_DEFINITIONS} -D_USE_OPENGL) ++endif() ++ ++if(@OpenMVS_USE_CUDA@) ++ find_dependency(CUDA) ++ add_definitions(-D_USE_CUDA) ++ include_directories(${CUDA_INCLUDE_DIRS}) ++endif() ++ ++if(@OpenMVS_USE_BREAKPAD@) ++ find_dependency(BREAKPAD) ++ add_definitions(${BREAKPAD_DEFINITIONS} -D_USE_BREAKPAD) ++endif() ++ ++find_dependency(Boost) ++add_definitions(${Boost_DEFINITIONS} -D_USE_BOOST) ++include_directories(${Boost_INCLUDE_DIRS}) ++find_dependency(Eigen3) ++add_definitions(${EIGEN3_DEFINITIONS} -D_USE_EIGEN) ++include_directories(${EIGEN3_INCLUDE_DIRS}) ++find_dependency(OpenCV) ++add_definitions(${OpenCV_DEFINITIONS}) ++find_dependency(CGAL) ++add_definitions(${CGAL_DEFINITIONS}) ++ ++find_dependency(VCG REQUIRED) ++add_definitions(${VCG_DEFINITIONS}) ++ ++if(@OpenMVS_USE_CERES@) ++ find_dependency(Ceres) ++ add_definitions(${CERES_DEFINITIONS}) ++endif() ++ ++add_definitions(@OpenMVS_DEFINITIONS@) ++ + # Our library dependencies (contains definitions for IMPORTED targets) + if(NOT TARGET MVS AND NOT OpenMVS_BINARY_DIR) + include("${OpenMVS_CMAKE_DIR}/OpenMVSTargets.cmake") + endif() +- ++ + # These are IMPORTED targets created by OpenMVSTargets.cmake + set(OpenMVS_LIBRARIES MVS) + set(OpenMVS_BINARIES InterfaceVisualSFM DensifyPointCloud ReconstructMesh RefineMesh TextureMesh) +diff --git a/build/Utils.cmake b/build/Utils.cmake +index f41c9d8..31cd292 100644 +--- a/build/Utils.cmake ++++ b/build/Utils.cmake +@@ -160,7 +160,7 @@ macro(GetOperatingSystemArchitectureBitness) + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES i686.*|i386.*|x86.*) + set(X86 1) + endif() +- ++ + if(NOT ${MY_VAR_PREFIX}_PACKAGE_REQUIRED) + set(${MY_VAR_PREFIX}_PACKAGE_REQUIRED "REQUIRED") + endif() +@@ -173,30 +173,6 @@ macro(ComposePackageLibSuffix) + set(PACKAGE_LIB_SUFFIX "") + set(PACKAGE_LIB_SUFFIX_DBG "") + set(PACKAGE_LIB_SUFFIX_REL "") +- if(MSVC) +- if("${MSVC_VERSION}" STREQUAL "1921") +- set(PACKAGE_LIB_SUFFIX "/vc16") +- elseif("${MSVC_VERSION}" STREQUAL "1916") +- set(PACKAGE_LIB_SUFFIX "/vc15") +- elseif("${MSVC_VERSION}" STREQUAL "1900") +- set(PACKAGE_LIB_SUFFIX "/vc14") +- elseif("${MSVC_VERSION}" STREQUAL "1800") +- set(PACKAGE_LIB_SUFFIX "/vc12") +- elseif("${MSVC_VERSION}" STREQUAL "1700") +- set(PACKAGE_LIB_SUFFIX "/vc11") +- elseif("${MSVC_VERSION}" STREQUAL "1600") +- set(PACKAGE_LIB_SUFFIX "/vc10") +- elseif("${MSVC_VERSION}" STREQUAL "1500") +- set(PACKAGE_LIB_SUFFIX "/vc9") +- endif() +- if("${SYSTEM_BITNESS}" STREQUAL "64") +- set(PACKAGE_LIB_SUFFIX "${PACKAGE_LIB_SUFFIX}/x64") +- else() +- set(PACKAGE_LIB_SUFFIX "${PACKAGE_LIB_SUFFIX}/x86") +- endif() +- set(PACKAGE_LIB_SUFFIX_DBG "${PACKAGE_LIB_SUFFIX}/Debug") +- set(PACKAGE_LIB_SUFFIX_REL "${PACKAGE_LIB_SUFFIX}/Release") +- endif() + endmacro() + + +@@ -511,7 +487,7 @@ macro(optimize_default_compiler_settings) + endif() + add_extra_compiler_option(-fdiagnostics-show-option) + add_extra_compiler_option(-ftemplate-backtrace-limit=0) +- ++ + # The -Wno-long-long is required in 64bit systems when including sytem headers. + if(X86_64) + add_extra_compiler_option(-Wno-long-long) +@@ -817,7 +793,7 @@ macro(ConfigCompilerAndLinker) + else() + set(cxx_rtti_support "${cxx_no_rtti_flags}") + endif() +- ++ + SET(cxx_default "${cxx_exception_support} ${cxx_rtti_support}" CACHE PATH "Common compile CXX flags") + SET(c_default "${CMAKE_C_FLAGS} ${cxx_base_flags}" CACHE PATH "Common compile C flags") + endmacro() +@@ -825,16 +801,12 @@ endmacro() + # Initialize variables needed for a library type project. + macro(ConfigLibrary) + # Offer the user the choice of overriding the installation directories +- set(INSTALL_LIB_DIR "lib/${PROJECT_NAME}" CACHE PATH "Installation directory for libraries") +- set(INSTALL_BIN_DIR "bin/${PROJECT_NAME}" CACHE PATH "Installation directory for executables") +- set(INSTALL_INCLUDE_DIR "include/${PROJECT_NAME}" CACHE PATH "Installation directory for header files") +- if(WIN32 AND NOT CYGWIN) +- set(DEF_INSTALL_CMAKE_DIR "CMake") +- else() +- set(DEF_INSTALL_CMAKE_DIR "lib/CMake/${PROJECT_NAME}") +- endif() ++ set(INSTALL_LIB_DIR "lib" CACHE PATH "Installation directory for libraries") ++ set(INSTALL_BIN_DIR "bin" CACHE PATH "Installation directory for executables") ++ set(INSTALL_INCLUDE_DIR "include/openmvs" CACHE PATH "Installation directory for header files") ++ set(DEF_INSTALL_CMAKE_DIR "share/openmvs") + set(INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH "Installation directory for CMake files") +- ++ + # Make relative paths absolute (needed later on) + foreach(p LIB BIN INCLUDE CMAKE) + set(var INSTALL_${p}_DIR) +diff --git a/libs/Common/CMakeLists.txt b/libs/Common/CMakeLists.txt +index 2e6c1a4..6e1fa95 100644 +--- a/libs/Common/CMakeLists.txt ++++ b/libs/Common/CMakeLists.txt +@@ -18,6 +18,7 @@ set_target_pch(Common Common.h) + + # Link its dependencies + TARGET_LINK_LIBRARIES(Common ${Boost_LIBRARIES} ${OpenCV_LIBS}) ++TARGET_INCLUDE_DIRECTORIES(Common PUBLIC $ $) + + # Install + SET_TARGET_PROPERTIES(Common PROPERTIES +diff --git a/libs/Common/Strings.h b/libs/Common/MVSStrings.h +similarity index 100% +rename from libs/Common/Strings.h +rename to libs/Common/MVSStrings.h +diff --git a/libs/Common/Types.h b/libs/Common/Types.h +index bcac65c..9abeefb 100644 +--- a/libs/Common/Types.h ++++ b/libs/Common/Types.h +@@ -378,7 +378,7 @@ typedef TAliasCast CastD2I; + + // I N C L U D E S ///////////////////////////////////////////////// + +-#include "Strings.h" ++#include "MVSStrings.h" + #include "AutoPtr.h" + #include "List.h" + #include "Thread.h" +@@ -2558,7 +2558,7 @@ public: + + /// creates an SO3 as a rotation that takes Vector a into the direction of Vector b + /// with the rotation axis along a ^ b. If |a ^ b| == 0, it creates the identity rotation. +- /// An assertion will fail if Vector a and Vector b are in exactly opposite directions. ++ /// An assertion will fail if Vector a and Vector b are in exactly opposite directions. + /// @param a source Vector + /// @param b target Vector + SO3(const Vec3& a, const Vec3& b) { +@@ -2604,7 +2604,7 @@ public: + mat.row(2) -= mat.row(1) * d12; + mat.row(2).normalize(); + // check for positive determinant <=> right handed coordinate system of row vectors +- ASSERT(mat.row(0).cross(mat.row(1)).dot(mat.row(2)) > 0); ++ ASSERT(mat.row(0).cross(mat.row(1)).dot(mat.row(2)) > 0); + } + + /// Exponentiate a vector in the Lie algebra to generate a new SO3. +diff --git a/libs/IO/CMakeLists.txt b/libs/IO/CMakeLists.txt +index a354376..4fd478c 100644 +--- a/libs/IO/CMakeLists.txt ++++ b/libs/IO/CMakeLists.txt +@@ -43,7 +43,8 @@ cxx_library_with_type_no_pch(IO "Libs" "STATIC" "${cxx_default}" + set_target_pch(IO Common.h) + + # Link its dependencies +-TARGET_LINK_LIBRARIES(IO Common ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${TIFF_LIBRARIES} ${EXIV2_LIBS}) ++TARGET_LINK_LIBRARIES(IO Common ${TIFF_LIBRARIES} ${PNG_LIBRARIES} ${JPEG_LIBRARIES} ${EXIV2_LIBS}) ++TARGET_INCLUDE_DIRECTORIES(IO PUBLIC $ $) + + # Install + SET_TARGET_PROPERTIES(IO PROPERTIES +diff --git a/libs/MVS/CMakeLists.txt b/libs/MVS/CMakeLists.txt +index 14be620..867cfd5 100644 +--- a/libs/MVS/CMakeLists.txt ++++ b/libs/MVS/CMakeLists.txt +@@ -1,12 +1,12 @@ + # Find required packages +-FIND_PACKAGE(CGAL ${SYSTEM_PACKAGE_REQUIRED}) ++FIND_PACKAGE(CGAL REQUIRED) + if(CGAL_FOUND) + include_directories(${CGAL_INCLUDE_DIRS}) + add_definitions(${CGAL_DEFINITIONS}) + link_directories(${CGAL_LIBRARY_DIRS}) + endif() + +-FIND_PACKAGE(VCG ${SYSTEM_PACKAGE_REQUIRED}) ++FIND_PACKAGE(VCG REQUIRED) + if(VCG_FOUND) + include_directories(${VCG_INCLUDE_DIRS}) + add_definitions(${VCG_DEFINITIONS}) +@@ -14,12 +14,10 @@ endif() + + set(CERES_LIBS "") + if(OpenMVS_USE_CERES) +- FIND_PACKAGE(CERES) ++ FIND_PACKAGE(Ceres REQUIRED) + if(CERES_FOUND) + include_directories(${CERES_INCLUDE_DIRS}) + add_definitions(${CERES_DEFINITIONS}) +- else() +- set(OpenMVS_USE_CERES OFF) + endif() + endif() + +@@ -42,7 +40,8 @@ cxx_library_with_type_no_pch(MVS "Libs" "" "${cxx_default}" + set_target_pch(MVS Common.h) + + # Link its dependencies +-TARGET_LINK_LIBRARIES(MVS PRIVATE Common Math IO ${CERES_LIBS} ${CGAL_LIBS} ${CUDA_CUDA_LIBRARY}) ++TARGET_LINK_LIBRARIES(MVS PRIVATE Common Math IO ${CERES_LIBS} CGAL::CGAL ${CUDA_CUDA_LIBRARY}) ++TARGET_INCLUDE_DIRECTORIES(MVS PUBLIC $ $) + + # Install + SET_TARGET_PROPERTIES(MVS PROPERTIES +diff --git a/libs/Math/CMakeLists.txt b/libs/Math/CMakeLists.txt +index d592bd0..f1fe4c6 100644 +--- a/libs/Math/CMakeLists.txt ++++ b/libs/Math/CMakeLists.txt +@@ -35,6 +35,7 @@ set_target_pch(Math Common.h) + + # Link its dependencies + TARGET_LINK_LIBRARIES(Math Common) ++TARGET_INCLUDE_DIRECTORIES(Math PUBLIC $ $) + + # Install + INSTALL(FILES ${LIBRARY_FILES_H} DESTINATION "${INSTALL_INCLUDE_DIR}/Math" COMPONENT dev) diff --git a/vcpkg/ports/openmvs/portfile.cmake b/vcpkg/ports/openmvs/portfile.cmake new file mode 100644 index 0000000..2ec1bd0 --- /dev/null +++ b/vcpkg/ports/openmvs/portfile.cmake @@ -0,0 +1,71 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cdcseacave/openMVS + REF v1.1 + SHA512 baa9149853dc08c602deeb1a04cf57643d1cb0733aee2776f4e99b210279aad3b4a1013ab1d790e91a3a95b7c72b9c12c6be25f2c30a76b69b5319b610cb8e7a + HEAD_REF master + PATCHES + fix-build.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + cuda OpenMVS_USE_CUDA + openmp OpenMVS_USE_OPENMP +) + +file(REMOVE "${SOURCE_PATH}/build/Modules/FindCERES.cmake") +file(REMOVE "${SOURCE_PATH}/build/Modules/FindCGAL.cmake") +file(REMOVE "${SOURCE_PATH}/build/Modules/FindEIGEN.cmake") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DOpenMVS_USE_NONFREE=ON + -DOpenMVS_USE_CERES=OFF + -DOpenMVS_USE_FAST_FLOAT2INT=ON + -DOpenMVS_USE_FAST_INVSQRT=OFF + -DOpenMVS_USE_FAST_CBRT=ON + -DOpenMVS_USE_SSE=ON + -DOpenMVS_USE_OPENGL=ON + -DOpenMVS_USE_BREAKPAD=OFF + OPTIONS_RELEASE + -DOpenMVS_BUILD_TOOLS=ON + OPTIONS_DEBUG + -DOpenMVS_BUILD_TOOLS=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets() +file(READ ${CURRENT_PACKAGES_DIR}/share/openmvs/OpenMVSTargets-release.cmake TARGETS_CMAKE) +string(REPLACE "bin/InterfaceCOLMAP" "tools/openmvs/InterfaceCOLMAP" TARGETS_CMAKE "${TARGETS_CMAKE}") +string(REPLACE "bin/InterfaceVisualSFM" "tools/openmvs/InterfaceVisualSFM" TARGETS_CMAKE "${TARGETS_CMAKE}") +string(REPLACE "bin/DensifyPointCloud" "tools/openmvs/DensifyPointCloud" TARGETS_CMAKE "${TARGETS_CMAKE}") +string(REPLACE "bin/ReconstructMesh" "tools/openmvs/ReconstructMesh" TARGETS_CMAKE "${TARGETS_CMAKE}") +string(REPLACE "bin/RefineMesh" "tools/openmvs/RefineMesh" TARGETS_CMAKE "${TARGETS_CMAKE}") +string(REPLACE "bin/TextureMesh" "tools/openmvs/TextureMesh" TARGETS_CMAKE "${TARGETS_CMAKE}") +string(REPLACE "bin/Viewer" "tools/openmvs/Viewer" TARGETS_CMAKE "${TARGETS_CMAKE}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/openmvs/OpenMVSTargets-release.cmake "${TARGETS_CMAKE}") + +vcpkg_copy_tools(AUTO_CLEAN TOOL_NAMES + DensifyPointCloud + InterfaceCOLMAP + InterfaceVisualSFM + ReconstructMesh + RefineMesh + TextureMesh + Viewer +) + +set(OPENMVG_TOOLS_PATH "${CURRENT_INSTALLED_DIR}/tools/openmvg") +set(OPENMVS_TOOLS_PATH "${CURRENT_INSTALLED_DIR}/tools/${PORT}") +set(SENSOR_WIDTH_CAMERA_DATABASE_TXT_PATH "${OPENMVG_TOOLS_PATH}/sensor_width_camera_database.txt") +configure_file("${SOURCE_PATH}/MvgMvsPipeline.py.in" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/MvgMvsPipeline.py" @ONLY) +file(INSTALL "${SOURCE_PATH}/build/Modules/FindVCG.cmake" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/openni2/CONTROL b/vcpkg/ports/openni2/CONTROL new file mode 100644 index 0000000..c1b869a --- /dev/null +++ b/vcpkg/ports/openni2/CONTROL @@ -0,0 +1,6 @@ +Source: openni2 +Version: 2.2.0.33-11 +Build-Depends: kinectsdk1 +Homepage: https://github.com/OpenNI/OpenNI2 +Description: OpenNI is open source library for access to Natural Interaction (NI) devices such as RGB-D camera. +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/openni2/disable_kinect.patch b/vcpkg/ports/openni2/disable_kinect.patch new file mode 100644 index 0000000..593ca07 --- /dev/null +++ b/vcpkg/ports/openni2/disable_kinect.patch @@ -0,0 +1,40 @@ +diff --git a/OpenNI.sln b/OpenNI.sln +index 9af176a..3786850 100644 +--- a/OpenNI.sln ++++ b/OpenNI.sln +@@ -86,12 +86,6 @@ Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Install", "Packaging\Instal + {5B74F010-8B79-46B5-B906-C2B56CDB3386} = {5B74F010-8B79-46B5-B906-C2B56CDB3386} + {D5709FB9-909D-415F-8F86-2F25BEF6CE23} = {D5709FB9-909D-415F-8F86-2F25BEF6CE23} + {1723CBBA-8EE7-439A-93FB-2E94B4DB2E63} = {1723CBBA-8EE7-439A-93FB-2E94B4DB2E63} +- {E636BACA-795F-41CF-BC52-14C727BF014E} = {E636BACA-795F-41CF-BC52-14C727BF014E} +- EndProjectSection +-EndProject +-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Kinect", "Source\Drivers\Kinect\Kinect.vcxproj", "{E636BACA-795F-41CF-BC52-14C727BF014E}" +- ProjectSection(ProjectDependencies) = postProject +- {72D595BB-8C52-449B-91DB-0E9F6AEAF5BB} = {72D595BB-8C52-449B-91DB-0E9F6AEAF5BB} + EndProjectSection + EndProject + Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DepthUtils", "Source\DepthUtils\DepthUtils.vcxproj", "{72D595BB-8C52-449B-91DB-0E9F6AEABBBB}" +@@ -252,14 +246,6 @@ Global + {BAEB9C48-562C-4D56-A6CD-18932265480A}.Debug|x86.ActiveCfg = Debug|x86 + {BAEB9C48-562C-4D56-A6CD-18932265480A}.Release|x64.ActiveCfg = Release|x64 + {BAEB9C48-562C-4D56-A6CD-18932265480A}.Release|x86.ActiveCfg = Release|x86 +- {E636BACA-795F-41CF-BC52-14C727BF014E}.Debug|x64.ActiveCfg = Debug|x64 +- {E636BACA-795F-41CF-BC52-14C727BF014E}.Debug|x64.Build.0 = Debug|x64 +- {E636BACA-795F-41CF-BC52-14C727BF014E}.Debug|x86.ActiveCfg = Debug|Win32 +- {E636BACA-795F-41CF-BC52-14C727BF014E}.Debug|x86.Build.0 = Debug|Win32 +- {E636BACA-795F-41CF-BC52-14C727BF014E}.Release|x64.ActiveCfg = Release|x64 +- {E636BACA-795F-41CF-BC52-14C727BF014E}.Release|x64.Build.0 = Release|x64 +- {E636BACA-795F-41CF-BC52-14C727BF014E}.Release|x86.ActiveCfg = Release|Win32 +- {E636BACA-795F-41CF-BC52-14C727BF014E}.Release|x86.Build.0 = Release|Win32 + {72D595BB-8C52-449B-91DB-0E9F6AEABBBB}.Debug|x64.ActiveCfg = Debug|x64 + {72D595BB-8C52-449B-91DB-0E9F6AEABBBB}.Debug|x64.Build.0 = Debug|x64 + {72D595BB-8C52-449B-91DB-0E9F6AEABBBB}.Debug|x86.ActiveCfg = Debug|Win32 +@@ -317,7 +303,6 @@ Global + {9F6652AF-35F2-452E-A2D3-08D05F5C075E} = {238D091D-1A85-4A61-9DCD-483768C51804} + {31F0F25B-A84A-48AC-9716-5DF9137F3855} = {238D091D-1A85-4A61-9DCD-483768C51804} + {15ECC029-90DE-4D1D-B00A-4A8E647D8C24} = {238D091D-1A85-4A61-9DCD-483768C51804} +- {E636BACA-795F-41CF-BC52-14C727BF014E} = {238D091D-1A85-4A61-9DCD-483768C51804} + {5B74F010-8B79-46B5-B906-C2B56CDB3386} = {238D091D-1A85-4A61-9DCD-483768C51804} + {BDA3BF24-550A-4BF9-83E5-0056134EED40} = {20285393-1DB1-4300-8AD3-30AEAE3C5DA6} + {D39A4248-3985-41DE-AFD5-AEC58D29291F} = {20285393-1DB1-4300-8AD3-30AEAE3C5DA6} diff --git a/vcpkg/ports/openni2/inherit_from_parent_or_project_defaults.patch b/vcpkg/ports/openni2/inherit_from_parent_or_project_defaults.patch new file mode 100644 index 0000000..73893f3 --- /dev/null +++ b/vcpkg/ports/openni2/inherit_from_parent_or_project_defaults.patch @@ -0,0 +1,41 @@ +diff --git a/Source/Drivers/Kinect/Kinect.vcxproj b/Source/Drivers/Kinect/Kinect.vcxproj +index 7f54d04..08a49fe 100644 +--- a/Source/Drivers/Kinect/Kinect.vcxproj ++++ b/Source/Drivers/Kinect/Kinect.vcxproj +@@ -72,28 +72,29 @@ + + $(SolutionDir)Bin\$(Platform)-$(Configuration)\OpenNI2\Drivers\ + $(SolutionDir)Bin\Intermediate\$(Platform)-$(Configuration)\$(ProjectName)\ +- $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include +- $(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib; ++ $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;$(IncludePath) ++ $(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib;$(LibraryPath) + true + + + $(SolutionDir)Bin\$(Platform)-$(Configuration)\OpenNI2\Drivers\ + $(SolutionDir)Bin\Intermediate\$(Platform)-$(Configuration)\$(ProjectName)\ +- $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include; +- $(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSdkDir)lib\x64; ++ $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;$(IncludePath) ++ $(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSdkDir)lib\x64;$(LibraryPath) + true + + + $(SolutionDir)Bin\$(Platform)-$(Configuration)\OpenNI2\Drivers\ + $(SolutionDir)Bin\Intermediate\$(Platform)-$(Configuration)\$(ProjectName)\ +- $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include; +- $(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib; ++ $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;$(IncludePath) ++ $(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib;$(LibraryPath) + false + + + $(SolutionDir)Bin\$(Platform)-$(Configuration)\OpenNI2\Drivers\ + $(SolutionDir)Bin\Intermediate\$(Platform)-$(Configuration)\$(ProjectName)\ +- $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include ++ $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSdkDir)include;$(FrameworkSDKDir)\include;$(IncludePath) ++ $(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSdkDir)lib\x64;$(LibraryPath) + false + + diff --git a/vcpkg/ports/openni2/openni2deploy.ps1 b/vcpkg/ports/openni2/openni2deploy.ps1 new file mode 100644 index 0000000..f420014 --- /dev/null +++ b/vcpkg/ports/openni2/openni2deploy.ps1 @@ -0,0 +1,18 @@ +# Note: This function signature and behavior is depended upon by applocal.ps1 + +function deployOpenNI2([string]$targetBinaryDir, [string]$installedDir, [string]$targetBinaryName) { + if ($targetBinaryName -like "OpenNI2.dll") { + if(Test-Path "$installedDir\bin\OpenNI2\OpenNI.ini") { + Write-Verbose " Deploying OpenNI2 Initialization" + deployBinary "$targetBinaryDir" "$installedDir\bin\OpenNI2" "OpenNI.ini" + } + if(Test-Path "$installedDir\bin\OpenNI2\Drivers") { + Write-Verbose " Deploying OpenNI2 Drivers" + New-Item "$targetBinaryDir\OpenNI2\Drivers" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null + Get-ChildItem "$installedDir\bin\OpenNI2\Drivers\*.*" -include "*.dll","*.ini" | % { + deployBinary "$targetBinaryDir\OpenNI2\Drivers" "$installedDir\bin\OpenNI2\Drivers" $_.Name + } + } + } +} + diff --git a/vcpkg/ports/openni2/portfile.cmake b/vcpkg/ports/openni2/portfile.cmake new file mode 100644 index 0000000..92071e5 --- /dev/null +++ b/vcpkg/ports/openni2/portfile.cmake @@ -0,0 +1,215 @@ +include(vcpkg_common_functions) + +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "Error: UWP builds are currently not supported.") +endif() + +find_path(COR_H_PATH cor.h) +if(COR_H_PATH MATCHES "NOTFOUND") + message(FATAL_ERROR "Could not find . Ensure the NETFXSDK is installed.") +endif() +get_filename_component(NETFXSDK_PATH "${COR_H_PATH}/../.." ABSOLUTE) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OpenNI/OpenNI2 + REF 2.2-beta2 + SHA512 60a3a3043679f3069aea869e92dc5881328ce4393d4140ea8d089027321ac501ae27d283657214e2834d216d0d49bf4f29a4b3d3e43df27a6ed21f889cd0083f + HEAD_REF master + PATCHES upgrade_projects.patch + inherit_from_parent_or_project_defaults.patch + replace_environment_variable.patch +) + +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) +file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) +file(COPY ${SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) + +file(TO_NATIVE_PATH ${CURRENT_INSTALLED_DIR} NATIVE_INSTALLED_DIR) +configure_file("${SOURCE_PATH}/Source/Drivers/Kinect/Kinect.vcxproj" "${SOURCE_PATH}/Source/Drivers/Kinect/Kinect.vcxproj" @ONLY) + +# Build OpenNI2 +vcpkg_build_msbuild( + PROJECT_PATH "${SOURCE_PATH}/OpenNI.sln" + OPTIONS "/p:DotNetSdkRoot=${NETFXSDK_PATH}/" +) + +# Install OpenNI2 +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(PLATFORM Win32) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(PLATFORM x64) +endif() + +set(SOURCE_INCLUDE_PATH "${SOURCE_PATH}/Include") +set(SOURCE_BIN_PATH_RELEASE "${SOURCE_PATH}/Bin/${PLATFORM}-Release") +set(SOURCE_BIN_PATH_DEBUG "${SOURCE_PATH}/Bin/${PLATFORM}-Debug") +set(SOURCE_CONFIG_PATH ${SOURCE_PATH}/Config) +set(SOURCE_THIRDPARTY_PATH "${SOURCE_PATH}/ThirdParty") + +file( + INSTALL + "${SOURCE_INCLUDE_PATH}/Android-Arm/OniPlatformAndroid-Arm.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include/openni2/Android-Arm +) + +file( + INSTALL + "${SOURCE_INCLUDE_PATH}/Driver/OniDriverAPI.h" + "${SOURCE_INCLUDE_PATH}/Driver/OniDriverTypes.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include/openni2/Driver +) + +file( + INSTALL + "${SOURCE_INCLUDE_PATH}/Linux-Arm/OniPlatformLinux-Arm.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include/openni2/Linux-Arm +) + +file( + INSTALL + "${SOURCE_INCLUDE_PATH}/Linux-x86/OniPlatformLinux-x86.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include/openni2/Linux-x86 +) + +file( + INSTALL + "${SOURCE_INCLUDE_PATH}/MacOSX/OniPlatformMacOSX.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include/openni2/MacOSX +) + +file( + INSTALL + "${SOURCE_INCLUDE_PATH}/Win32/OniPlatformWin32.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include/openni2/Win32 +) + +file( + INSTALL + "${SOURCE_INCLUDE_PATH}/OniCAPI.h" + "${SOURCE_INCLUDE_PATH}/OniCEnums.h" + "${SOURCE_INCLUDE_PATH}/OniCProperties.h" + "${SOURCE_INCLUDE_PATH}/OniCTypes.h" + "${SOURCE_INCLUDE_PATH}/OniEnums.h" + "${SOURCE_INCLUDE_PATH}/OniPlatform.h" + "${SOURCE_INCLUDE_PATH}/OniProperties.h" + "${SOURCE_INCLUDE_PATH}/OniVersion.h" + "${SOURCE_INCLUDE_PATH}/OpenNI.h" + "${SOURCE_INCLUDE_PATH}/PrimeSense.h" + "${SOURCE_INCLUDE_PATH}/PS1080.h" + "${SOURCE_INCLUDE_PATH}/PSLink.h" + DESTINATION + ${CURRENT_PACKAGES_DIR}/include/openni2 +) + +file( + INSTALL + "${SOURCE_BIN_PATH_RELEASE}/OpenNI2.lib" + DESTINATION + ${CURRENT_PACKAGES_DIR}/lib +) + +file( + INSTALL + "${SOURCE_BIN_PATH_DEBUG}/OpenNI2.lib" + DESTINATION + ${CURRENT_PACKAGES_DIR}/debug/lib +) + +file( + INSTALL + "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/Kinect.dll" + "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/OniFile.dll" + "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/PS1080.dll" + "${SOURCE_CONFIG_PATH}/OpenNI2/Drivers/PS1080.ini" + "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/PSLink.dll" + "${SOURCE_CONFIG_PATH}/OpenNI2/Drivers/PSLink.ini" + DESTINATION + ${CURRENT_PACKAGES_DIR}/bin/OpenNI2/Drivers +) + +file( + INSTALL + "${SOURCE_CONFIG_PATH}/OpenNI.ini" + DESTINATION + ${CURRENT_PACKAGES_DIR}/bin/OpenNI2 +) + +file( + INSTALL + "${SOURCE_BIN_PATH_RELEASE}/OpenNI2.dll" + DESTINATION + ${CURRENT_PACKAGES_DIR}/bin +) + +file( + INSTALL + "${SOURCE_BIN_PATH_DEBUG}/OpenNI2/Drivers/Kinect.dll" + "${SOURCE_BIN_PATH_DEBUG}/OpenNI2/Drivers/OniFile.dll" + "${SOURCE_BIN_PATH_DEBUG}/OpenNI2/Drivers/PS1080.dll" + "${SOURCE_CONFIG_PATH}/OpenNI2/Drivers/PS1080.ini" + "${SOURCE_BIN_PATH_DEBUG}/OpenNI2/Drivers/PSLink.dll" + "${SOURCE_CONFIG_PATH}/OpenNI2/Drivers/PSLink.ini" + DESTINATION + ${CURRENT_PACKAGES_DIR}/debug/bin/OpenNI2/Drivers +) + +file( + INSTALL + "${SOURCE_CONFIG_PATH}/OpenNI.ini" + DESTINATION + ${CURRENT_PACKAGES_DIR}/debug/bin/OpenNI2 +) + +file( + INSTALL + "${SOURCE_BIN_PATH_DEBUG}/OpenNI2.dll" + DESTINATION + ${CURRENT_PACKAGES_DIR}/debug/bin +) + +file( + INSTALL + "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/Kinect.dll" + "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/OniFile.dll" + "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/PS1080.dll" + "${SOURCE_CONFIG_PATH}/OpenNI2/Drivers/PS1080.ini" + "${SOURCE_BIN_PATH_RELEASE}/OpenNI2/Drivers/PSLink.dll" + "${SOURCE_CONFIG_PATH}/OpenNI2/Drivers/PSLink.ini" + DESTINATION + ${CURRENT_PACKAGES_DIR}/tools/openni2/OpenNI2/Drivers +) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(NUMBEROFBIT 32) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(NUMBEROFBIT 64) +endif() + +file( + INSTALL + "${SOURCE_THIRDPARTY_PATH}/GL/glut${NUMBEROFBIT}.dll" + "${SOURCE_BIN_PATH_RELEASE}/NiViewer.exe" + "${SOURCE_CONFIG_PATH}/OpenNI.ini" + "${SOURCE_BIN_PATH_RELEASE}/OpenNI2.dll" + "${SOURCE_BIN_PATH_RELEASE}/PS1080Console.exe" + "${SOURCE_BIN_PATH_RELEASE}/PSLinkConsole.exe" + DESTINATION + ${CURRENT_PACKAGES_DIR}/tools/openni2 +) + +# Deploy Script +file(COPY ${CMAKE_CURRENT_LIST_DIR}/openni2deploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/bin/OpenNI2) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/openni2deploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/OpenNI2) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/openni2) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/openni2/LICENSE ${CURRENT_PACKAGES_DIR}/share/openni2/copyright) diff --git a/vcpkg/ports/openni2/replace_environment_variable.patch b/vcpkg/ports/openni2/replace_environment_variable.patch new file mode 100644 index 0000000..48978e8 --- /dev/null +++ b/vcpkg/ports/openni2/replace_environment_variable.patch @@ -0,0 +1,76 @@ +diff --git a/Source/Drivers/Kinect/Kinect.vcxproj b/Source/Drivers/Kinect/Kinect.vcxproj +index 08a49fe..7fd8620 100644 +--- a/Source/Drivers/Kinect/Kinect.vcxproj ++++ b/Source/Drivers/Kinect/Kinect.vcxproj +@@ -101,7 +101,7 @@ + + Level3 + Disabled +- ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; ++ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_INSTALLED_DIR@\include + _WINDLL;%(PreprocessorDefinitions);_WINDOWS + false + false +@@ -109,7 +109,7 @@ + + true + Kinect10.lib;XnLib.lib;%(AdditionalDependencies) +- $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\x86; ++ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_INSTALLED_DIR@\debug\lib + true + + +@@ -117,7 +117,7 @@ + + Level3 + Disabled +- ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; ++ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_INSTALLED_DIR@\include + _WINDLL;%(PreprocessorDefinitions);_WINDOWS + false + false +@@ -125,7 +125,7 @@ + + true + Kinect10.lib;XnLib.lib;%(AdditionalDependencies) +- $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\amd64; ++ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_INSTALLED_DIR@\debug\lib + + + +@@ -139,7 +139,7 @@ + MaxSpeed + true + true +- ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; ++ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_INSTALLED_DIR@\include + false + + +@@ -147,7 +147,7 @@ + true + true + Kinect10.lib;XnLib.lib;%(AdditionalDependencies) +- $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\x86; ++ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_INSTALLED_DIR@\lib + true + + +@@ -157,7 +157,7 @@ + MaxSpeed + true + true +- ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; ++ ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;@NATIVE_INSTALLED_DIR@\include + false + + +@@ -165,7 +165,7 @@ + true + true + Kinect10.lib;XnLib.lib;%(AdditionalDependencies) +- $(SolutionDir)Bin\$(Platform)-$(Configuration)\;$(KINECTSDK10_DIR)\lib\amd64; ++ $(SolutionDir)Bin\$(Platform)-$(Configuration)\;@NATIVE_INSTALLED_DIR@\lib + true + + diff --git a/vcpkg/ports/openni2/upgrade_projects.patch b/vcpkg/ports/openni2/upgrade_projects.patch new file mode 100644 index 0000000..86dee57 --- /dev/null +++ b/vcpkg/ports/openni2/upgrade_projects.patch @@ -0,0 +1,1572 @@ +diff --git a/Samples/ClosestPointViewer/ClosestPointViewer.vcxproj b/Samples/ClosestPointViewer/ClosestPointViewer.vcxproj +index fe63dbf..6050e8f 100644 +--- a/Samples/ClosestPointViewer/ClosestPointViewer.vcxproj ++++ b/Samples/ClosestPointViewer/ClosestPointViewer.vcxproj +@@ -2,4 +2,4 @@ +- ++ + + + Debug +@@ -27,23 +27,27 @@ + Application + true + MultiByte ++ v141 + + + Application + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + +@@ -84,7 +88,7 @@ + _WINDLL;%(PreprocessorDefinitions) + Level4 + true +- true ++ false + + + +@@ -105,7 +109,7 @@ + _WINDLL;%(PreprocessorDefinitions) + Level4 + true +- true ++ false + + + +@@ -133,7 +137,7 @@ + false + StreamingSIMDExtensions2 + Fast +- true ++ false + + + true +@@ -142,6 +146,7 @@ + glut32.lib;OpenNI2.lib;MWClosestPoint.lib + $(OutDir);..\..\ThirdParty\GL + true ++ false + + + ..\..\Include +@@ -161,7 +166,7 @@ + false + StreamingSIMDExtensions2 + Fast +- true ++ false + + + true +diff --git a/Samples/EventBasedRead/EventBasedRead.vcxproj b/Samples/EventBasedRead/EventBasedRead.vcxproj +index f67db7a..ffe19ac 100644 +--- a/Samples/EventBasedRead/EventBasedRead.vcxproj ++++ b/Samples/EventBasedRead/EventBasedRead.vcxproj +@@ -2,4 +2,4 @@ +- ++ + + + Debug +@@ -27,23 +27,27 @@ + Application + true + MultiByte ++ v141 + + + Application + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + +@@ -83,7 +87,7 @@ + ..\..\Include;..\Common;%(AdditionalIncludeDirectories) + _WINDLL;%(PreprocessorDefinitions) + Level4 +- true ++ false + true + + +@@ -101,7 +105,7 @@ + ..\..\Include;..\Common;%(AdditionalIncludeDirectories) + _WINDLL;%(PreprocessorDefinitions) + Level4 +- true ++ false + true + + +@@ -119,7 +123,7 @@ + MaxSpeed + true + ..\..\Include;..\Common;%(AdditionalIncludeDirectories) +- true ++ false + true + AnySuitable + Speed +@@ -144,7 +148,7 @@ + MaxSpeed + true + ..\..\Include;..\Common;%(AdditionalIncludeDirectories) +- true ++ false + true + AnySuitable + Speed +diff --git a/Samples/MWClosestPoint/MWClosestPoint.vcxproj b/Samples/MWClosestPoint/MWClosestPoint.vcxproj +index 74cafe7..5844506 100644 +--- a/Samples/MWClosestPoint/MWClosestPoint.vcxproj ++++ b/Samples/MWClosestPoint/MWClosestPoint.vcxproj +@@ -2,4 +2,4 @@ +- ++ + + + Debug +@@ -27,23 +27,27 @@ + DynamicLibrary + true + MultiByte ++ v141 + + + DynamicLibrary + true + MultiByte ++ v141 + + + DynamicLibrary + false + true + MultiByte ++ v141 + + + DynamicLibrary + false + true + MultiByte ++ v141 + + + +@@ -84,7 +88,7 @@ + ..\..\Include + _CLOSEST_POINT;%(PreprocessorDefinitions) + true +- true ++ false + + + +@@ -105,7 +109,7 @@ + ..\..\Include + _CLOSEST_POINT;%(PreprocessorDefinitions) + true +- true ++ false + + + +@@ -134,7 +138,7 @@ + false + StreamingSIMDExtensions2 + Fast +- true ++ false + + + true +@@ -163,7 +167,7 @@ + false + StreamingSIMDExtensions2 + Fast +- true ++ false + + + true +diff --git a/Samples/MWClosestPointApp/MWClosestPointApp.vcxproj b/Samples/MWClosestPointApp/MWClosestPointApp.vcxproj +index 063ec37..deb7c17 100644 +--- a/Samples/MWClosestPointApp/MWClosestPointApp.vcxproj ++++ b/Samples/MWClosestPointApp/MWClosestPointApp.vcxproj +@@ -2,4 +2,4 @@ +- ++ + + + Debug +@@ -27,23 +27,27 @@ + Application + true + MultiByte ++ v141 + + + Application + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + +@@ -83,7 +87,7 @@ + Disabled + ..\MWClosestPoint;..\..\Include + true +- true ++ false + + + +@@ -103,7 +107,7 @@ + Disabled + ..\MWClosestPoint;..\..\Include + true +- true ++ false + + + +@@ -131,7 +135,7 @@ + false + StreamingSIMDExtensions2 + Fast +- true ++ false + + + true +@@ -159,7 +163,7 @@ + false + StreamingSIMDExtensions2 + Fast +- true ++ false + + + true +diff --git a/Samples/MultiDepthViewer/MultiDepthViewer.vcxproj b/Samples/MultiDepthViewer/MultiDepthViewer.vcxproj +index d021c0d..85a0d4f 100644 +--- a/Samples/MultiDepthViewer/MultiDepthViewer.vcxproj ++++ b/Samples/MultiDepthViewer/MultiDepthViewer.vcxproj +@@ -2,4 +2,4 @@ +- ++ + + + Debug +@@ -27,23 +27,27 @@ + Application + true + MultiByte ++ v141 + + + Application + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + +@@ -84,7 +88,7 @@ + _WINDLL;%(PreprocessorDefinitions) + Level4 + true +- true ++ false + + + +@@ -102,7 +106,7 @@ + _WINDLL;%(PreprocessorDefinitions) + Level4 + true +- true ++ false + + + +@@ -127,7 +131,7 @@ + false + StreamingSIMDExtensions2 + Fast +- true ++ false + + + true +@@ -136,6 +140,7 @@ + glut32.lib;OpenNI2.lib + $(OutDir);..\..\ThirdParty\GL + true ++ false + + + +@@ -152,7 +157,7 @@ + false + StreamingSIMDExtensions2 + Fast +- true ++ false + + + true +diff --git a/Samples/MultipleStreamRead/MultipleStreamRead.vcxproj b/Samples/MultipleStreamRead/MultipleStreamRead.vcxproj +index 15887ec..5fa8202 100644 +--- a/Samples/MultipleStreamRead/MultipleStreamRead.vcxproj ++++ b/Samples/MultipleStreamRead/MultipleStreamRead.vcxproj +@@ -2,4 +2,4 @@ +- ++ + + + Debug +@@ -27,23 +27,27 @@ + Application + true + MultiByte ++ v141 + + + Application + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + +@@ -83,7 +87,7 @@ + ..\..\Include;..\Common;%(AdditionalIncludeDirectories) + _WINDLL;%(PreprocessorDefinitions) + Level4 +- true ++ false + true + + +@@ -101,7 +105,7 @@ + ..\..\Include;..\Common;%(AdditionalIncludeDirectories) + _WINDLL;%(PreprocessorDefinitions) + Level4 +- true ++ false + true + + +@@ -119,7 +123,7 @@ + MaxSpeed + true + ..\..\Include;..\Common;%(AdditionalIncludeDirectories) +- true ++ false + true + AnySuitable + Speed +@@ -144,7 +148,7 @@ + MaxSpeed + true + ..\..\Include;..\Common;%(AdditionalIncludeDirectories) +- true ++ false + true + AnySuitable + Speed +diff --git a/Samples/SimpleRead/SimpleRead.vcxproj b/Samples/SimpleRead/SimpleRead.vcxproj +index de3942f..6ce41e3 100644 +--- a/Samples/SimpleRead/SimpleRead.vcxproj ++++ b/Samples/SimpleRead/SimpleRead.vcxproj +@@ -2,4 +2,4 @@ +- ++ + + + Debug +@@ -27,23 +27,27 @@ + Application + true + MultiByte ++ v141 + + + Application + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + +@@ -83,7 +87,7 @@ + ..\Common;..\..\Include;%(AdditionalIncludeDirectories) + _WINDLL;%(PreprocessorDefinitions) + Level4 +- true ++ false + true + + +@@ -101,7 +105,7 @@ + ..\Common;..\..\Include;%(AdditionalIncludeDirectories) + _WINDLL;%(PreprocessorDefinitions) + Level4 +- true ++ false + true + + +@@ -119,7 +123,7 @@ + MaxSpeed + true + ..\Common;..\..\Include;%(AdditionalIncludeDirectories) +- true ++ false + true + AnySuitable + Speed +@@ -144,7 +148,7 @@ + MaxSpeed + true + ..\Common;..\..\Include;%(AdditionalIncludeDirectories) +- true ++ false + true + AnySuitable + Speed +diff --git a/Samples/SimpleViewer/SimpleViewer.vcxproj b/Samples/SimpleViewer/SimpleViewer.vcxproj +index d693a1d..40621e1 100644 +--- a/Samples/SimpleViewer/SimpleViewer.vcxproj ++++ b/Samples/SimpleViewer/SimpleViewer.vcxproj +@@ -2,4 +2,4 @@ +- ++ + + + Debug +@@ -27,23 +27,27 @@ + Application + true + MultiByte ++ v141 + + + Application + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + +@@ -84,7 +88,7 @@ + _WINDLL;%(PreprocessorDefinitions) + Level4 + true +- true ++ false + + + +@@ -102,7 +106,7 @@ + _WINDLL;%(PreprocessorDefinitions) + Level4 + true +- true ++ false + + + +@@ -127,7 +131,7 @@ + false + StreamingSIMDExtensions2 + Fast +- true ++ false + + + true +@@ -136,6 +140,7 @@ + glut32.lib;OpenNI2.lib + $(OutDir);..\..\ThirdParty\GL + true ++ false + + + +@@ -152,7 +157,7 @@ + false + StreamingSIMDExtensions2 + Fast +- true ++ false + + + true +diff --git a/Source/Core/OpenNI.vcxproj b/Source/Core/OpenNI.vcxproj +index 12189de..f176682 100644 +--- a/Source/Core/OpenNI.vcxproj ++++ b/Source/Core/OpenNI.vcxproj +@@ -2,4 +2,4 @@ +- ++ + + + Debug +@@ -27,23 +27,27 @@ + DynamicLibrary + true + MultiByte ++ v141 + + + DynamicLibrary + true + MultiByte ++ v141 + + + DynamicLibrary + false + true + MultiByte ++ v141 + + + DynamicLibrary + false + true + MultiByte ++ v141 + + + +@@ -88,7 +92,7 @@ + _WINDLL;%(PreprocessorDefinitions);OPENNI2_EXPORT + ProgramDatabase + Level4 +- true ++ false + true + + +@@ -110,7 +114,7 @@ + _WINDLL;%(PreprocessorDefinitions);OPENNI2_EXPORT + ProgramDatabase + Level4 +- true ++ false + true + + +@@ -132,7 +136,7 @@ + true + _MBCS;%(PreprocessorDefinitions);OPENNI2_EXPORT + ..\..\Include;..\Drivers\OniFile\Formats;..\..\ThirdParty\PSCommon\XnLib\Include;..\..\ThirdParty\LibJPEG;%(AdditionalIncludeDirectories) +- true ++ false + true + AnySuitable + Speed +@@ -161,7 +165,7 @@ + true + _MBCS;%(PreprocessorDefinitions);OPENNI2_EXPORT + ..\..\Include;..\Drivers\OniFile\Formats;..\..\ThirdParty\PSCommon\XnLib\Include;..\..\ThirdParty\LibJPEG;%(AdditionalIncludeDirectories) +- true ++ false + true + AnySuitable + Speed +diff --git a/Source/DepthUtils/DepthUtils.vcxproj b/Source/DepthUtils/DepthUtils.vcxproj +index dcab0b7..e474661 100644 +--- a/Source/DepthUtils/DepthUtils.vcxproj ++++ b/Source/DepthUtils/DepthUtils.vcxproj +@@ -2,4 +2,4 @@ +- ++ + + + Debug +@@ -35,23 +35,27 @@ + StaticLibrary + true + MultiByte ++ v141 + + + StaticLibrary + true + MultiByte ++ v141 + + + StaticLibrary + false + true + MultiByte ++ v141 + + + StaticLibrary + false + true + MultiByte ++ v141 + + + +@@ -94,7 +98,7 @@ + Disabled + _WINDLL;%(PreprocessorDefinitions);DepthUtils_EXPORT + Level4 +- true ++ false + true + + +@@ -114,7 +118,7 @@ + Disabled + _WINDLL;%(PreprocessorDefinitions);DepthUtils_EXPORT + Level4 +- true ++ false + true + + +@@ -134,7 +138,7 @@ + MaxSpeed + true + _MBCS;%(PreprocessorDefinitions);DepthUtils_EXPORT +- true ++ false + true + true + AnySuitable +@@ -160,7 +164,7 @@ + MaxSpeed + true + _MBCS;%(PreprocessorDefinitions);DepthUtils_EXPORT +- true ++ false + true + AnySuitable + Speed +diff --git a/Source/Drivers/DummyDevice/DummyDevice.vcxproj b/Source/Drivers/DummyDevice/DummyDevice.vcxproj +index 56c5944..0401f3d 100644 +--- a/Source/Drivers/DummyDevice/DummyDevice.vcxproj ++++ b/Source/Drivers/DummyDevice/DummyDevice.vcxproj +@@ -2,4 +2,4 @@ +- ++ + + + Debug +@@ -27,23 +27,27 @@ + DynamicLibrary + true + MultiByte ++ v141 + + + DynamicLibrary + true + MultiByte ++ v141 + + + DynamicLibrary + false + true + MultiByte ++ v141 + + + DynamicLibrary + false + true + MultiByte ++ v141 + + + +@@ -84,7 +88,7 @@ + _WINDLL;%(PreprocessorDefinitions);DummyDevice2_EXPORT + ProgramDatabase + Level4 +- true ++ false + true + + +@@ -104,7 +108,7 @@ + _WINDLL;%(PreprocessorDefinitions);DummyDevice2_EXPORT + ProgramDatabase + Level4 +- true ++ false + true + + +@@ -124,7 +128,7 @@ + true + _MBCS;%(PreprocessorDefinitions);DummyDevice2_EXPORT + ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include +- true ++ false + true + AnySuitable + Speed +@@ -153,7 +157,7 @@ + true + _MBCS;%(PreprocessorDefinitions);DummyDevice2_EXPORT + ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include +- true ++ false + true + AnySuitable + Speed +diff --git a/Source/Drivers/Kinect/Kinect.vcxproj b/Source/Drivers/Kinect/Kinect.vcxproj +index f54e8b2..6ea2656 100644 +--- a/Source/Drivers/Kinect/Kinect.vcxproj ++++ b/Source/Drivers/Kinect/Kinect.vcxproj +@@ -2,4 +2,4 @@ +- ++ + + + Debug +@@ -28,12 +28,14 @@ + true + Unicode + true ++ v141 + + + DynamicLibrary + true + Unicode + true ++ v141 + + + DynamicLibrary +@@ -41,6 +43,7 @@ + true + MultiByte + true ++ v141 + + + DynamicLibrary +@@ -48,6 +51,7 @@ + true + MultiByte + true ++ v141 + + + +@@ -99,7 +103,7 @@ + ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; + _WINDLL;%(PreprocessorDefinitions);_WINDOWS + false +- true ++ false + + + true +@@ -115,7 +119,7 @@ + ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; + _WINDLL;%(PreprocessorDefinitions);_WINDOWS + false +- true ++ false + + + true +@@ -125,7 +129,7 @@ + + + +- true ++ false + + + +@@ -135,7 +139,7 @@ + true + true + ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; +- true ++ false + + + true +@@ -153,7 +157,7 @@ + true + true + ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;$(KINECTSDK10_DIR)\inc; +- true ++ false + + + true +diff --git a/Source/Drivers/OniFile/OniFile.vcxproj b/Source/Drivers/OniFile/OniFile.vcxproj +index 9b173f7..e2f4391 100644 +--- a/Source/Drivers/OniFile/OniFile.vcxproj ++++ b/Source/Drivers/OniFile/OniFile.vcxproj +@@ -2,4 +2,4 @@ +- ++ + + + Debug +@@ -28,23 +28,27 @@ + DynamicLibrary + true + MultiByte ++ v141 + + + DynamicLibrary + true + MultiByte ++ v141 + + + DynamicLibrary + false + true + MultiByte ++ v141 + + + DynamicLibrary + false + true + MultiByte ++ v141 + + + +@@ -98,7 +102,7 @@ + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;ONIFILESPLAYER_EXPORTS;%(PreprocessorDefinitions) + ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;..\..\..\ThirdParty\LibJPEG +- true ++ false + true + + +@@ -133,7 +137,7 @@ + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;ONIFILESPLAYER_EXPORTS;%(PreprocessorDefinitions) + ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;..\..\..\ThirdParty\LibJPEG +- true ++ false + true + + +@@ -169,7 +173,7 @@ + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;ONIFILESPLAYER_EXPORTS;%(PreprocessorDefinitions) + ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;..\..\..\ThirdParty\LibJPEG +- true ++ false + true + AnySuitable + Speed +@@ -212,7 +216,7 @@ + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;ONIFILESPLAYER_EXPORTS;%(PreprocessorDefinitions) + ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;..\..\..\ThirdParty\LibJPEG +- true ++ false + true + AnySuitable + Speed +diff --git a/Source/Drivers/PS1080/PS1080.vcxproj b/Source/Drivers/PS1080/PS1080.vcxproj +index 2a1154d..8495c28 100644 +--- a/Source/Drivers/PS1080/PS1080.vcxproj ++++ b/Source/Drivers/PS1080/PS1080.vcxproj +@@ -2,4 +2,4 @@ +- ++ + + + Debug +@@ -525,23 +525,27 @@ + DynamicLibrary + true + Unicode ++ v141 + + + DynamicLibrary + true + Unicode ++ v141 + + + DynamicLibrary + false + true + Unicode ++ v141 + + + DynamicLibrary + false + true + Unicode ++ v141 + + + +@@ -587,7 +591,7 @@ + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;PS1080_EXPORTS;%(PreprocessorDefinitions) + .\Include;.\;..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;..\..\..\ThirdParty\LibJPEG;..\..\DepthUtils +- true ++ false + StreamingSIMDExtensions2 + true + +@@ -612,7 +616,7 @@ + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;PS1080_EXPORTS;%(PreprocessorDefinitions) + .\Include;.\;..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;..\..\..\ThirdParty\LibJPEG;..\..\DepthUtils +- true ++ false + StreamingSIMDExtensions2 + true + +@@ -638,7 +642,7 @@ + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;PS1080_EXPORTS;%(PreprocessorDefinitions) + .\Include;.\;..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;..\..\..\ThirdParty\LibJPEG;..\..\DepthUtils +- true ++ false + StreamingSIMDExtensions2 + true + AnySuitable +@@ -670,7 +674,7 @@ + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;PS1080_EXPORTS;%(PreprocessorDefinitions) + .\Include;.\;..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include;..\..\..\ThirdParty\LibJPEG;..\..\DepthUtils +- true ++ false + StreamingSIMDExtensions2 + true + AnySuitable +diff --git a/Source/Drivers/PS1080/PS1080Console/PS1080Console.vcxproj b/Source/Drivers/PS1080/PS1080Console/PS1080Console.vcxproj +index b9adfea..7446d5a 100644 +--- a/Source/Drivers/PS1080/PS1080Console/PS1080Console.vcxproj ++++ b/Source/Drivers/PS1080/PS1080Console/PS1080Console.vcxproj +@@ -2,4 +2,4 @@ +- ++ + + + Debug +@@ -28,19 +28,23 @@ + Application + MultiByte + true ++ v141 + + + Application + MultiByte ++ v141 + + + Application + MultiByte + true ++ v141 + + + Application + MultiByte ++ v141 + + + +@@ -87,7 +91,7 @@ + EditAndContinue + 4250;4127;%(DisableSpecificWarnings) + true +- true ++ false + + + XnLib.lib;OpenNI2.lib;%(AdditionalDependencies) +@@ -95,7 +99,7 @@ + true + Console + MachineX86 +- true ++ false + + + +@@ -114,7 +118,7 @@ + Level4 + ProgramDatabase + 4250;4127;%(DisableSpecificWarnings) +- true ++ false + + + XnLib.lib;OpenNI2.lib;%(AdditionalDependencies) +@@ -139,7 +143,7 @@ + Level4 + ProgramDatabase + 4250;4127;%(DisableSpecificWarnings) +- true ++ false + + + XnLib.lib;OpenNI2.lib;%(AdditionalDependencies) +@@ -169,7 +173,7 @@ + Level4 + ProgramDatabase + 4250;4127;%(DisableSpecificWarnings) +- true ++ false + + + XnLib.lib;OpenNI2.lib;%(AdditionalDependencies) +diff --git a/Source/Drivers/PSLink/PSLink.vcxproj b/Source/Drivers/PSLink/PSLink.vcxproj +index 8915163..68a7e96 100644 +--- a/Source/Drivers/PSLink/PSLink.vcxproj ++++ b/Source/Drivers/PSLink/PSLink.vcxproj +@@ -2,4 +2,4 @@ +- ++ + + + Debug +@@ -28,19 +28,23 @@ + DynamicLibrary + Unicode + true ++ v141 + + + DynamicLibrary + Unicode ++ v141 + + + DynamicLibrary + Unicode + true ++ v141 + + + DynamicLibrary + Unicode ++ v141 + + + +@@ -87,7 +91,7 @@ + EditAndContinue + 4250;4127;%(DisableSpecificWarnings) + true +- true ++ false + + + XnLib.lib;%(AdditionalDependencies) +@@ -95,7 +99,7 @@ + true + Windows + MachineX86 +- true ++ false + + + +@@ -115,7 +119,7 @@ + Level4 + ProgramDatabase + 4250;4127;%(DisableSpecificWarnings) +- true ++ false + + + XnLib.lib;%(AdditionalDependencies) +@@ -140,7 +144,7 @@ + Level4 + ProgramDatabase + 4250;4127;%(DisableSpecificWarnings) +- true ++ false + + + XnLib.lib;%(AdditionalDependencies) +@@ -170,7 +174,7 @@ + Level4 + ProgramDatabase + 4250;4127;%(DisableSpecificWarnings) +- true ++ false + + + XnLib.lib;%(AdditionalDependencies) +diff --git a/Source/Drivers/PSLink/PSLinkConsole/PSLinkConsole.vcxproj b/Source/Drivers/PSLink/PSLinkConsole/PSLinkConsole.vcxproj +index e6c7c8c..26ff9c8 100644 +--- a/Source/Drivers/PSLink/PSLinkConsole/PSLinkConsole.vcxproj ++++ b/Source/Drivers/PSLink/PSLinkConsole/PSLinkConsole.vcxproj +@@ -2,4 +2,4 @@ +- ++ + + + Debug +@@ -28,19 +28,23 @@ + Application + MultiByte + true ++ v141 + + + Application + MultiByte ++ v141 + + + Application + MultiByte + true ++ v141 + + + Application + MultiByte ++ v141 + + + +@@ -87,7 +91,7 @@ + EditAndContinue + 4250;4127;%(DisableSpecificWarnings) + true +- true ++ false + + + OpenNI2.lib;XnLib.lib;%(AdditionalDependencies) +@@ -95,7 +99,7 @@ + true + Console + MachineX86 +- true ++ false + + + +@@ -114,7 +118,7 @@ + Level4 + ProgramDatabase + 4250;4127;%(DisableSpecificWarnings) +- true ++ false + + + OpenNI2.lib;XnLib.lib;%(AdditionalDependencies) +@@ -139,7 +143,7 @@ + Level4 + ProgramDatabase + 4250;4127;%(DisableSpecificWarnings) +- true ++ false + + + OpenNI2.lib;XnLib.lib;%(AdditionalDependencies) +@@ -169,7 +173,7 @@ + Level4 + ProgramDatabase + 4250;4127;%(DisableSpecificWarnings) +- true ++ false + + + OpenNI2.lib;XnLib.lib;%(AdditionalDependencies) +diff --git a/Source/Drivers/TestDevice/TestDevice.vcxproj b/Source/Drivers/TestDevice/TestDevice.vcxproj +index e20a074..3777b2e 100644 +--- a/Source/Drivers/TestDevice/TestDevice.vcxproj ++++ b/Source/Drivers/TestDevice/TestDevice.vcxproj +@@ -2,4 +2,4 @@ +- ++ + + + Debug +@@ -27,23 +27,27 @@ + DynamicLibrary + true + MultiByte ++ v141 + + + DynamicLibrary + true + MultiByte ++ v141 + + + DynamicLibrary + false + true + MultiByte ++ v141 + + + DynamicLibrary + false + true + MultiByte ++ v141 + + + +@@ -84,7 +88,7 @@ + _WINDLL;%(PreprocessorDefinitions);TestDevice2_EXPORT + ProgramDatabase + Level4 +- true ++ false + true + + +@@ -101,7 +105,7 @@ + _WINDLL;%(PreprocessorDefinitions);TestDevice2_EXPORT + ProgramDatabase + Level4 +- true ++ false + true + + +@@ -118,7 +122,7 @@ + true + _MBCS;%(PreprocessorDefinitions);TestDevice2_EXPORT + ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include +- true ++ false + true + AnySuitable + Speed +@@ -144,7 +148,7 @@ + true + _MBCS;%(PreprocessorDefinitions);TestDevice2_EXPORT + ..\..\..\Include;..\..\..\ThirdParty\PSCommon\XnLib\Include +- true ++ false + true + AnySuitable + Speed +diff --git a/Source/Tools/NiViewer/NiViewer.vcxproj b/Source/Tools/NiViewer/NiViewer.vcxproj +index 0a4c392..e331009 100644 +--- a/Source/Tools/NiViewer/NiViewer.vcxproj ++++ b/Source/Tools/NiViewer/NiViewer.vcxproj +@@ -2,4 +2,4 @@ +- ++ + + + Debug +@@ -27,23 +27,27 @@ + Application + true + MultiByte ++ v141 + + + Application + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + Application + false + true + MultiByte ++ v141 + + + +@@ -84,7 +88,7 @@ + _WINDLL;%(PreprocessorDefinitions) + Level4 + true +- true ++ false + + + +@@ -105,7 +109,7 @@ + _WINDLL;%(PreprocessorDefinitions) + Level4 + true +- true ++ false + + + +@@ -133,7 +137,7 @@ + false + StreamingSIMDExtensions2 + Fast +- true ++ false + + + true +@@ -142,6 +146,7 @@ + Comdlg32.lib;OpenNI2.lib;XnLib.lib;glut32.lib + $(OutDir);..\..\..\ThirdParty\GL + true ++ false + + + ..\..\..\Include +@@ -161,7 +166,7 @@ + false + StreamingSIMDExtensions2 + Fast +- true ++ false + + + true +diff --git a/ThirdParty/PSCommon/XnLib/Source/XnLib.vcxproj b/ThirdParty/PSCommon/XnLib/Source/XnLib.vcxproj +index 2761222..f2094b3 100644 +--- a/ThirdParty/PSCommon/XnLib/Source/XnLib.vcxproj ++++ b/ThirdParty/PSCommon/XnLib/Source/XnLib.vcxproj +@@ -2,4 +2,4 @@ +- ++ + + + Debug +@@ -116,23 +116,27 @@ + StaticLibrary + true + MultiByte ++ v141 + + + StaticLibrary + true + MultiByte ++ v141 + + + StaticLibrary + false + true + MultiByte ++ v141 + + + StaticLibrary + false + true + MultiByte ++ v141 + + + +@@ -176,7 +180,7 @@ + ..\Include;..\Driver\Win32\Build\sys;%(AdditionalIncludeDirectories) + _WINDLL;%(PreprocessorDefinitions);XnLib_EXPORT + Level4 +- true ++ false + true + + +@@ -198,7 +202,7 @@ + ..\Include;..\Driver\Win32\Build\sys;%(AdditionalIncludeDirectories) + _WINDLL;%(PreprocessorDefinitions);XnLib_EXPORT + Level4 +- true ++ false + true + + +@@ -220,7 +224,7 @@ + true + _MBCS;%(PreprocessorDefinitions);XnLib_EXPORT + ..\Include;..\Driver\Win32\Build\sys;%(AdditionalIncludeDirectories) +- true ++ false + true + true + AnySuitable +@@ -248,7 +252,7 @@ + true + _MBCS;%(PreprocessorDefinitions);XnLib_EXPORT + ..\Include;..\Driver\Win32\Build\sys;%(AdditionalIncludeDirectories) +- true ++ false + true + AnySuitable + Speed +diff --git a/Wrappers/java/OpenNI.jni/OpenNI.jni.vcxproj b/Wrappers/java/OpenNI.jni/OpenNI.jni.vcxproj +index b95c484..bfd0503 100644 +--- a/Wrappers/java/OpenNI.jni/OpenNI.jni.vcxproj ++++ b/Wrappers/java/OpenNI.jni/OpenNI.jni.vcxproj +@@ -2,4 +2,4 @@ +- ++ + + + Debug +@@ -28,18 +28,22 @@ + true + Unicode + true ++ v141 + + + DynamicLibrary + false + true + Unicode ++ v141 + + + DynamicLibrary ++ v141 + + + DynamicLibrary ++ v141 + + + diff --git a/vcpkg/ports/openscap/CONTROL b/vcpkg/ports/openscap/CONTROL new file mode 100644 index 0000000..631a0c7 --- /dev/null +++ b/vcpkg/ports/openscap/CONTROL @@ -0,0 +1,18 @@ +Source: openscap +Version: 1.3.1 +Homepage: https://github.com/OpenSCAP/openscap +Description: The oscap program is a command line tool that allows users to load, scan, validate, edit, and export SCAP documents. +Build-Depends: libxslt, libxml2, libzip, curl, pcre2, libpopt, pthread, glib, openssl, zlib + +Feature: docs +Description: install docs + +Feature: tests +Description: build with tests + +Feature: util +Description: build available utils +Build-Depends: getopt-win32 (windows) + +Feature: python +Description: build with python3 \ No newline at end of file diff --git a/vcpkg/ports/openscap/fix-build.patch b/vcpkg/ports/openscap/fix-build.patch new file mode 100644 index 0000000..57d2294 --- /dev/null +++ b/vcpkg/ports/openscap/fix-build.patch @@ -0,0 +1,121 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4de5b57..5f483a3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -140,15 +140,25 @@ find_package(SWIG) + find_package(LibXml2 REQUIRED) + find_package(LibXslt REQUIRED) + find_package(BZip2) ++find_package(OpenSSL REQUIRED) ++find_package(ZLIB REQUIRED) + + # PThread +-set(CMAKE_THREAD_PREFER_PTHREAD) +-set(THREADS_PREFER_PTHREAD_FLAG) +-set(THREADS_USE_PTHREADS_WIN32 true) +-find_package(Threads REQUIRED) +-check_library_exists(pthread pthread_timedjoin_np "" HAVE_PTHREAD_TIMEDJOIN_NP) +-check_library_exists(pthread pthread_setname_np "" HAVE_PTHREAD_SETNAME_NP) +-check_library_exists(pthread pthread_getname_np "" HAVE_PTHREAD_GETNAME_NP) ++if (WIN32) ++ set(CMAKE_THREAD_PREFER_PTHREAD) ++ set(THREADS_PREFER_PTHREAD_FLAG) ++ set(THREADS_USE_PTHREADS_WIN32 true) ++ find_package(pthread CONFIG REQUIRED) ++ set(CMAKE_THREAD_LIBS_INIT ${PThreads4W_LIBRARY}) ++ check_library_exists(pthread pthread_timedjoin_np "" HAVE_PTHREAD_TIMEDJOIN_NP) ++ check_library_exists(pthread pthread_setname_np "" HAVE_PTHREAD_SETNAME_NP) ++ check_library_exists(pthread pthread_getname_np "" HAVE_PTHREAD_GETNAME_NP) ++else() ++ set(THREADS_USE_PTHREADS_WIN32 -pthread) ++endif() ++ ++# OpenSSL ++link_libraries(OpenSSL::SSL OpenSSL::Crypto) + + # WITH_CRYPTO + set(WITH_CRYPTO "gcrypt" CACHE STRING "gcrypt|nss3") +@@ -373,19 +383,9 @@ message(STATUS "asciidoc: ${ASCIIDOC_EXECUTABLE}") + + # ---------- PATHS + +-if(WIN32) +- # Windows installer does not allow full paths. +- # The install path can be changed by user in Windows installer. +- # We will use relative names - "schemas", "xsl" and "cpe" +- # directories will be located in the same directory as oscap.exe. +- set(OSCAP_DEFAULT_SCHEMA_PATH "schemas") +- set(OSCAP_DEFAULT_XSLT_PATH "xsl") +- set(OSCAP_DEFAULT_CPE_PATH "cpe") +-else() +- set(OSCAP_DEFAULT_SCHEMA_PATH "${CMAKE_INSTALL_FULL_DATADIR}/openscap/schemas") +- set(OSCAP_DEFAULT_XSLT_PATH "${CMAKE_INSTALL_FULL_DATADIR}/openscap/xsl") +- set(OSCAP_DEFAULT_CPE_PATH "${CMAKE_INSTALL_FULL_DATADIR}/openscap/cpe") +-endif() ++set(OSCAP_DEFAULT_SCHEMA_PATH share/openscap/schemas) ++set(OSCAP_DEFAULT_XSLT_PATH share/openscap/xsl) ++set(OSCAP_DEFAULT_CPE_PATH share/openscap/cpe) + set(OSCAP_TEMP_DIR "/tmp" CACHE STRING "use different temporary directory to execute sce scripts (default=/tmp)") + + # ---------- RPATHS for linking +diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt +index 2a3f373..781d05a 100644 +--- a/utils/CMakeLists.txt ++++ b/utils/CMakeLists.txt +@@ -6,27 +6,32 @@ if(ENABLE_OSCAP_UTIL) + add_executable(oscap ${UTILS_SOURCES}) + target_link_libraries(oscap openscap) + if(WIN32) +- set(OSCAP_UTIL_DESTINATION ".") ++ find_path(GETOPT_INCLUDE_DIR getopt.h) ++ include(SelectLibraryConfigurations) ++ find_library(GETOPT_LIBRARY_RELEASE NAMES getopt) ++ find_library(GETOPT_LIBRARY_DEBUG NAMES getopt PATH_SUFFIXES debug/lib) ++ select_library_configurations(GETOPT) ++ ++ message("GETOPT_INCLUDE_DIR: ${GETOPT_INCLUDE_DIR}") ++ message("GETOPT_LIBRARY: ${GETOPT_LIBRARY}") ++ ++ target_include_directories(oscap PRIVATE ${GETOPT_INCLUDE_DIR}) ++ target_link_libraries(oscap PRIVATE ${GETOPT_LIBRARY}) ++ ++ set(OSCAP_UTIL_DESTINATION tools) + # Install the 'oscap' utility + install(TARGETS "oscap" + DESTINATION ${OSCAP_UTIL_DESTINATION} + ) +- # Install all recursively dependent DLLs for oscap.exe +- set(APPS "\${CMAKE_INSTALL_PREFIX}/oscap.exe") # the \ before $ is required by BundleUtilities +- set(VCPKG_DLL_DIR "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin") +- install(CODE " +- include(BundleUtilities) +- fixup_bundle(\"${APPS}\" \"\" \"${VCPKG_DLL_DIR}\") +- ") + else() +- set(OSCAP_UTIL_DESTINATION ${CMAKE_INSTALL_BINDIR}) ++ set(OSCAP_UTIL_DESTINATION tools) + # Install the 'oscap' utility + install(TARGETS "oscap" + DESTINATION ${OSCAP_UTIL_DESTINATION} + ) + # Install manual page + install(FILES "oscap.8" +- DESTINATION "${CMAKE_INSTALL_MANDIR}/man8" ++ DESTINATION share/openscap/man8 + ) + endif() + endif() +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 9e18613..e84a21f 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -125,4 +125,8 @@ else() + set(OPENSCAP_INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() + +-install(TARGETS openscap DESTINATION ${OPENSCAP_INSTALL_DESTINATION}) ++install(TARGETS openscap ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++) diff --git a/vcpkg/ports/openscap/portfile.cmake b/vcpkg/ports/openscap/portfile.cmake new file mode 100644 index 0000000..70f55be --- /dev/null +++ b/vcpkg/ports/openscap/portfile.cmake @@ -0,0 +1,45 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OpenSCAP/openscap + REF 3a4c635691380fa990a226acc8558db35d7ebabc #1.3.1 + SHA512 12681d43b2ce067c5a5c4eb47e14d91d6e9362b1f98f1d35b05d79ad84c7ee8c29f438eaae8e8465033155e500bb0f936eb79af46fab15e4a07e03c6be8b655d + HEAD_REF dev + PATCHES + fix-build.patch +) + +if ("python" IN_LIST FEATURES) + vcpkg_find_acquire_program(PYTHON3) +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + docs ENABLE_DOCS + tests ENABLE_TESTS + util ENABLE_OSCAP_UTIL + python ENABLE_PYTHON3 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DPYTHON_EXECUTABLE=${PYTHON3} + -DENABLE_PERL=OFF + -DENABLE_MITRE=OFF + -DENABLE_VALGRIND=OFF + -DENABLE_OSCAP_UTIL_DOCKER=OFF + -DENABLE_OSCAP_UTIL_AS_RPM=OFF + -DENABLE_OSCAP_UTIL_SSH=OFF + -DENABLE_OSCAP_UTIL_VM=OFF + -DENABLE_OSCAP_UTIL_PODMAN=OFF + -DENABLE_OSCAP_UTIL_CHROOT=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_pdbs() + +#Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/openssl-unix/CMakeLists.txt b/vcpkg/ports/openssl-unix/CMakeLists.txt new file mode 100644 index 0000000..7e09222 --- /dev/null +++ b/vcpkg/ports/openssl-unix/CMakeLists.txt @@ -0,0 +1,183 @@ +cmake_minimum_required(VERSION 3.9) +project(openssl C) + +if(NOT SOURCE_PATH) + message(FATAL_ERROR "Requires SOURCE_PATH") +endif() + +if(CMAKE_SYSTEM_NAME STREQUAL "Android" OR CMAKE_SYSTEM_NAME STREQUAL "Linux") + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") + set(PLATFORM linux-x86_64) + else() + set(PLATFORM linux-generic32) + endif() +elseif(CMAKE_SYSTEM_NAME STREQUAL "iOS") + if(VCPKG_TARGET_ARCHITECTURE MATCHES "arm64") + set(PLATFORM ios64-xcrun) + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "arm") + set(PLATFORM ios-xcrun) + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "x86" OR + VCPKG_TARGET_ARCHITECTURE MATCHES "x64") + set(PLATFORM iossimulator-xcrun) + else() + message(FATAL_ERROR "Unknown iOS target architecture: ${VCPKG_TARGET_ARCHITECTURE}") + endif() + # disable that makes linkage error (e.g. require stderr usage) + list(APPEND DISABLES no-stdio no-ui no-asm) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(PLATFORM darwin64-x86_64-cc) +elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + set(PLATFORM BSD-generic64) +elseif(MINGW) + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") + set(PLATFORM mingw64) + else() + set(PLATFORM mingw) + endif() +else() + message(FATAL_ERROR "Unknown platform") +endif() + +get_filename_component(COMPILER_ROOT "${CMAKE_C_COMPILER}" DIRECTORY) + +message("CMAKE_C_COMPILER=${CMAKE_C_COMPILER}") +message("COMPILER_ROOT=${COMPILER_ROOT}") +message("CMAKE_SYSROOT=${CMAKE_SYSROOT}") +message("CMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}") +message("CMAKE_C_FLAGS=${CMAKE_C_FLAGS}") +message("CMAKE_C_FLAGS_RELEASE=${CMAKE_C_FLAGS_RELEASE}") +message("CMAKE_C_FLAGS_DEBUG=${CMAKE_C_FLAGS_DEBUG}") +message("CMAKE_INCLUDE_SYSTEM_FLAG_C=${CMAKE_INCLUDE_SYSTEM_FLAG_C}") + +set(CFLAGS "${CMAKE_C_FLAGS}") +if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + set(CFLAGS "-Wno-error=unused-command-line-argument ${CMAKE_C_FLAGS}") +endif() +if(CMAKE_C_COMPILER_TARGET AND CMAKE_C_COMPILE_OPTIONS_TARGET) + set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_TARGET}${CMAKE_C_COMPILER_TARGET}") +endif() +if(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN AND CMAKE_C_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN) + set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN}${CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN}") +endif() +if(CMAKE_SYSROOT AND CMAKE_C_COMPILE_OPTIONS_SYSROOT) + set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT}") +elseif(CMAKE_OSX_SYSROOT AND CMAKE_C_COMPILE_OPTIONS_SYSROOT) + set(CFLAGS "${CFLAGS} ${CMAKE_C_COMPILE_OPTIONS_SYSROOT}${CMAKE_OSX_SYSROOT}") +endif() + +string(REGEX REPLACE "^ " "" CFLAGS "${CFLAGS}") + +if(CMAKE_HOST_WIN32) + file(TO_NATIVE_PATH ENV_PATH "${COMPILER_ROOT};$ENV{PATH}") +else() + file(TO_NATIVE_PATH ENV_PATH "${COMPILER_ROOT}:$ENV{PATH}") +endif() +set(ENV{ANDROID_DEV} "${CMAKE_SYSROOT}/usr") +set(ENV{CC} "${CMAKE_C_COMPILER}") + +message("ENV{ANDROID_DEV}=$ENV{ANDROID_DEV}") + +get_filename_component(SOURCE_PATH_NAME "${SOURCE_PATH}" NAME) +set(BUILDDIR "${CMAKE_CURRENT_BINARY_DIR}/${SOURCE_PATH_NAME}") + +if(NOT EXISTS "${BUILDDIR}") + file(COPY ${SOURCE_PATH} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +endif() + +get_filename_component(MSYS_BIN_DIR "${MAKE}" DIRECTORY) + +if(BUILD_SHARED_LIBS) + set(SHARED shared) + file(STRINGS "${BUILDDIR}/include/openssl/opensslv.h" SHLIB_VERSION + REGEX "^#[\t ]*define[\t ]+SHLIB_VERSION_NUMBER[\t ]+\".*\".*") + string(REGEX REPLACE "^.*SHLIB_VERSION_NUMBER[\t ]+\"([^\"]*)\".*$" "\\1" + SHLIB_VERSION "${SHLIB_VERSION}") + if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR CMAKE_SYSTEM_NAME STREQUAL "iOS") + set(LIB_EXT dylib) + set(LIB_EXTS ${SHLIB_VERSION}.${LIB_EXT}) + elseif(MINGW) + string(REPLACE "." "_" SHLIB_VERSION "${SHLIB_VERSION}") + set(BIN_EXT dll) + set(LIB_EXT dll.a) + else() + set(LIB_EXT so) + set(LIB_EXTS ${LIB_EXT}.${SHLIB_VERSION}) + endif() + list(APPEND BIN_EXTS ${BIN_EXT}) + list(APPEND LIB_EXTS ${LIB_EXT}) +else() + set(SHARED no-shared) + set(LIB_EXTS a) +endif() +foreach(lib ssl crypto) + foreach(ext ${LIB_EXTS}) + list(APPEND INSTALL_LIBS "${BUILDDIR}/lib${lib}.${ext}") + endforeach() + foreach(ext ${BIN_EXTS}) + # This might be wrong for targets which don't follow this naming scheme, but I'm not aware of any + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") + list(APPEND INSTALL_BINS "${BUILDDIR}/lib${lib}-${SHLIB_VERSION}-x64.${ext}") + else() + list(APPEND INSTALL_BINS "${BUILDDIR}/lib${lib}-${SHLIB_VERSION}.${ext}") + endif() + endforeach() +endforeach() + +if(CMAKE_HOST_WIN32) + set(ENV_COMMAND set) + set(PATH_VAR ";%PATH%") +else() + set(ENV_COMMAND export) + set(PATH_VAR ":$ENV{PATH}") +endif() + + + +add_custom_command( + OUTPUT "${BUILDDIR}/Makefile" + COMMAND ${ENV_COMMAND} CC=${CMAKE_C_COMPILER} + COMMAND ${ENV_COMMAND} AR=${CMAKE_AR} + COMMAND ${ENV_COMMAND} LD=${CMAKE_LINKER} + COMMAND ${ENV_COMMAND} RANLIB=${CMAKE_RANLIB} + COMMAND ${ENV_COMMAND} MAKE=${MAKE} + COMMAND ${ENV_COMMAND} MAKEDEPPROG=${CMAKE_C_COMPILER} + COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}" + COMMAND "${PERL}" Configure + ${SHARED} + enable-static-engine + no-zlib + no-ssl2 + no-idea + no-bf + no-cast + no-seed + no-md2 + no-tests + ${DISABLES} + ${PLATFORM} + "--prefix=${CMAKE_INSTALL_PREFIX}" + "--openssldir=/etc/ssl" + ${CFLAGS} + COMMAND "${CMAKE_COMMAND}" "-DDIR=${BUILDDIR}" -P "${CMAKE_CURRENT_LIST_DIR}/remove-deps.cmake" + VERBATIM + WORKING_DIRECTORY "${BUILDDIR}" +) + +add_custom_target(build_libs ALL + COMMAND ${ENV_COMMAND} "PATH=${MSYS_BIN_DIR}${PATH_VAR}" + COMMAND "${CMAKE_COMMAND}" -E touch "${BUILDDIR}/krb5.h" + COMMAND "${MAKE}" build_libs + VERBATIM + WORKING_DIRECTORY "${BUILDDIR}" + DEPENDS "${BUILDDIR}/Makefile" + BYPRODUCTS ${INSTALL_LIBS} +) + +install( + FILES ${INSTALL_LIBS} + DESTINATION lib +) +install( + FILES ${INSTALL_BINS} + DESTINATION bin +) \ No newline at end of file diff --git a/vcpkg/ports/openssl-unix/CONTROL b/vcpkg/ports/openssl-unix/CONTROL new file mode 100644 index 0000000..9c28728 --- /dev/null +++ b/vcpkg/ports/openssl-unix/CONTROL @@ -0,0 +1,5 @@ +Source: openssl-unix +Version: 1.1.1g +Port-Version: 4 +Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. +Supports: !(windows|uwp) diff --git a/vcpkg/ports/openssl-unix/ConfigureIncludeQuotesFix.patch b/vcpkg/ports/openssl-unix/ConfigureIncludeQuotesFix.patch new file mode 100644 index 0000000..09494f5 --- /dev/null +++ b/vcpkg/ports/openssl-unix/ConfigureIncludeQuotesFix.patch @@ -0,0 +1,13 @@ +diff --git a/Configure b/Configure +index c98107a..77ad9d3 100644 +--- a/Configure ++++ b/Configure +@@ -972,7 +972,7 @@ PROCESS_ARGS: + } + elsif (/^--with-zlib-include=(.*)$/) + { +- $withargs{"zlib-include"}="-I$1"; ++ $withargs{"zlib-include"}="-I\"$1\""; + } + elsif (/^--with-fipsdir=(.*)$/) + { diff --git a/vcpkg/ports/openssl-unix/EmbedSymbolsInStaticLibsZ7.patch b/vcpkg/ports/openssl-unix/EmbedSymbolsInStaticLibsZ7.patch new file mode 100644 index 0000000..1a8de2c --- /dev/null +++ b/vcpkg/ports/openssl-unix/EmbedSymbolsInStaticLibsZ7.patch @@ -0,0 +1,25 @@ +diff --git a/util/pl/VC-32.pl b/util/pl/VC-32.pl +index dba96cb..5722f6e 100644 +--- a/util/pl/VC-32.pl ++++ b/util/pl/VC-32.pl +@@ -154,9 +154,17 @@ else + $cflags=$opt_cflags.$base_cflags; + } + +-# generate symbols.pdb unconditionally +-$app_cflag.=" /Zi /Fd\$(TMP_D)/app"; +-$lib_cflag.=" /Zi /Fd\$(TMP_D)/lib"; ++# generate symbols.pdb when building dlls and embed symbols when building static libs ++if ($shlib) ++ { ++ $app_cflag.=" /Zi /Fd\$(TMP_D)/app.pdb"; ++ $lib_cflag.=" /Zi /Fd\$(TMP_D)/lib.pdb"; ++ } ++else ++ { ++ $app_cflag.=" /Z7"; ++ $lib_cflag.=" /Z7"; ++ } + $lflags.=" /debug"; + + $obj='.obj'; diff --git a/vcpkg/ports/openssl-unix/STRINGIFYPatch.patch b/vcpkg/ports/openssl-unix/STRINGIFYPatch.patch new file mode 100644 index 0000000..dd8f9c2 --- /dev/null +++ b/vcpkg/ports/openssl-unix/STRINGIFYPatch.patch @@ -0,0 +1,23 @@ +diff --git a/crypto/cversion.c b/crypto/cversion.c +index bfff699..17b7912 100644 +--- a/crypto/cversion.c ++++ b/crypto/cversion.c +@@ -56,6 +56,9 @@ + * [including the GNU Public Licence.] + */ + ++#define STRINGIFY2(x) #x ++#define STRINGIFY(x) STRINGIFY2(x) ++ + #include "cryptlib.h" + + #ifndef NO_WINDOWS_BRAINDEATH +@@ -79,7 +82,7 @@ const char *SSLeay_version(int t) + } + if (t == SSLEAY_CFLAGS) { + #ifdef CFLAGS +- return (CFLAGS); ++ return STRINGIFY(CFLAGS); + #else + return ("compiler: information not available"); + #endif diff --git a/vcpkg/ports/openssl-unix/portfile.cmake b/vcpkg/ports/openssl-unix/portfile.cmake new file mode 100644 index 0000000..b3bdf72 --- /dev/null +++ b/vcpkg/ports/openssl-unix/portfile.cmake @@ -0,0 +1,63 @@ +if (NOT VCPKG_TARGET_IS_MINGW) + vcpkg_fail_port_install(MESSAGE "${PORT} is only for openssl on Unix-like systems" ON_TARGET "UWP" "Windows") +endif() + +if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h") + message(FATAL_ERROR "Can't build openssl if libressl/boringssl is installed. Please remove libressl/boringssl, and try install openssl again if you need it.") +endif() + + +vcpkg_find_acquire_program(PERL) + +set(OPENSSL_VERSION 1.1.1g) + +vcpkg_download_distfile(OPENSSL_SOURCE_ARCHIVE + URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.1.1/openssl-${OPENSSL_VERSION}.tar.gz" + FILENAME "openssl-${OPENSSL_VERSION}.tar.gz" + SHA512 01e3d0b1bceeed8fb066f542ef5480862001556e0f612e017442330bbd7e5faee228b2de3513d7fc347446b7f217e27de1003dc9d7214d5833b97593f3ec25ab +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH MASTER_COPY_SOURCE_PATH + ARCHIVE ${OPENSSL_SOURCE_ARCHIVE} + REF ${OPENSSL_VERSION} +) + +if(CMAKE_HOST_WIN32) + vcpkg_acquire_msys(MSYS_ROOT PACKAGES make perl) + set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) + set(MAKE ${MSYS_ROOT}/usr/bin/make.exe) + set(PERL ${MSYS_ROOT}/usr/bin/perl.exe) +else() + find_program(MAKE make) + if(NOT MAKE) + message(FATAL_ERROR "Could not find make. Please install it through your package manager.") + endif() +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR} + PREFER_NINJA + OPTIONS + -DSOURCE_PATH=${MASTER_COPY_SOURCE_PATH} + -DPERL=${PERL} + -DMAKE=${MAKE} + OPTIONS_RELEASE + -DINSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +file(GLOB HEADERS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/include/openssl/*.h) +set(RESOLVED_HEADERS) +foreach(HEADER ${HEADERS}) + get_filename_component(X "${HEADER}" REALPATH) + list(APPEND RESOLVED_HEADERS "${X}") +endforeach() + +file(INSTALL ${RESOLVED_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include/openssl) +file(INSTALL ${MASTER_COPY_SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl) +endif() diff --git a/vcpkg/ports/openssl-unix/remove-deps.cmake b/vcpkg/ports/openssl-unix/remove-deps.cmake new file mode 100644 index 0000000..a57c70f --- /dev/null +++ b/vcpkg/ports/openssl-unix/remove-deps.cmake @@ -0,0 +1,7 @@ +file(GLOB_RECURSE MAKEFILES ${DIR}/*/Makefile) +foreach(MAKEFILE ${MAKEFILES}) + message("removing deps from ${MAKEFILE}") + file(READ "${MAKEFILE}" _contents) + string(REGEX REPLACE "\n# DO NOT DELETE THIS LINE.*" "" _contents "${_contents}") + file(WRITE "${MAKEFILE}" "${_contents}") +endforeach() diff --git a/vcpkg/ports/openssl-unix/usage b/vcpkg/ports/openssl-unix/usage new file mode 100644 index 0000000..f535cb6 --- /dev/null +++ b/vcpkg/ports/openssl-unix/usage @@ -0,0 +1,4 @@ +The package openssl is compatible with built-in CMake targets: + + find_package(OpenSSL REQUIRED) + target_link_libraries(main PRIVATE OpenSSL::SSL OpenSSL::Crypto) diff --git a/vcpkg/ports/openssl-unix/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/openssl-unix/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..43e84cb --- /dev/null +++ b/vcpkg/ports/openssl-unix/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,18 @@ +_find_package(${ARGS}) +if(OPENSSL_FOUND) + find_library(OPENSSL_DL_LIBRARY NAMES dl) + if(OPENSSL_DL_LIBRARY) + list(APPEND OPENSSL_LIBRARIES "dl") + if(TARGET OpenSSL::Crypto) + set_property(TARGET OpenSSL::Crypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES "dl") + endif() + endif() + find_package(Threads REQUIRED) + list(APPEND OPENSSL_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) + if(TARGET OpenSSL::Crypto) + set_property(TARGET OpenSSL::Crypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES "Threads::Threads") + endif() + if(TARGET OpenSSL::SSL) + set_property(TARGET OpenSSL::SSL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "Threads::Threads") + endif() +endif() diff --git a/vcpkg/ports/openssl-uwp/CONTROL b/vcpkg/ports/openssl-uwp/CONTROL new file mode 100644 index 0000000..d82bb64 --- /dev/null +++ b/vcpkg/ports/openssl-uwp/CONTROL @@ -0,0 +1,5 @@ +Source: openssl-uwp +Version: 1.1.1g +Port-Version: 1 +Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. +Supports: uwp diff --git a/vcpkg/ports/openssl-uwp/EnableUWPSupport.patch b/vcpkg/ports/openssl-uwp/EnableUWPSupport.patch new file mode 100644 index 0000000..d534b9b --- /dev/null +++ b/vcpkg/ports/openssl-uwp/EnableUWPSupport.patch @@ -0,0 +1,176 @@ +diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf +index 3c4299d264..99fcb1f713 100644 +--- a/Configurations/10-main.conf ++++ b/Configurations/10-main.conf +@@ -1287,7 +1287,7 @@ my %targets = ( + }, + "VC-WIN64I" => { + inherit_from => [ "VC-WIN64-common", asm("ia64_asm"), +- sub { $disabled{shared} ? () : "ia64_uplink" } ], ++ sub { $disabled{uplink} ? () : "ia64_uplink" } ], + AS => "ias", + ASFLAGS => "-d debug", + asoutflag => "-o ", +@@ -1299,7 +1299,7 @@ my %targets = ( + }, + "VC-WIN64A" => { + inherit_from => [ "VC-WIN64-common", asm("x86_64_asm"), +- sub { $disabled{shared} ? () : "x86_64_uplink" } ], ++ sub { $disabled{uplink} ? () : "x86_64_uplink" } ], + AS => sub { vc_win64a_info()->{AS} }, + ASFLAGS => sub { vc_win64a_info()->{ASFLAGS} }, + asoutflag => sub { vc_win64a_info()->{asoutflag} }, +@@ -1312,7 +1312,7 @@ my %targets = ( + }, + "VC-WIN32" => { + inherit_from => [ "VC-noCE-common", asm("x86_asm"), +- sub { $disabled{shared} ? () : "uplink_common" } ], ++ sub { $disabled{uplink} ? () : "uplink_common" } ], + AS => sub { vc_win32_info()->{AS} }, + ASFLAGS => sub { vc_win32_info()->{ASFLAGS} }, + asoutflag => sub { vc_win32_info()->{asoutflag} }, +@@ -1374,7 +1374,7 @@ my %targets = ( + #### MinGW + "mingw" => { + inherit_from => [ "BASE_unix", asm("x86_asm"), +- sub { $disabled{shared} ? () : "x86_uplink" } ], ++ sub { $disabled{uplink} ? () : "x86_uplink" } ], + CC => "gcc", + CFLAGS => picker(default => "-Wall", + debug => "-g -O0", +diff --git a/Configurations/50-win-onecore.conf b/Configurations/50-win-onecore.conf +index d478f42b0f..e0fb70daca 100644 +--- a/Configurations/50-win-onecore.conf ++++ b/Configurations/50-win-onecore.conf +@@ -1,3 +1,4 @@ ++## -*- mode: perl; -*- + # Windows OneCore targets. + # + # OneCore is new API stability "contract" that transcends Desktop, IoT and +@@ -10,6 +11,25 @@ + # TODO: extend error handling to use ETW based eventing + # (Or rework whole error messaging) + ++my $UWP_info = {}; ++sub UWP_info { ++ unless (%$UWP_info) { ++ my $SDKver = `powershell -Command \"& {\$(Get-Item \\\"hklm:\\SOFTWARE\\WOW6432Node\\Microsoft\\Microsoft SDKs\\Windows\\\").GetValue(\\\"CurrentVersion\\\")}\"`; ++ $SDKver =~ s|\R$||; ++ my @SDKver_split = split(/\./, $SDKver); ++ # SDK version older than 10.0.17763 don't support our ASM builds ++ if ($SDKver_split[0] < 10 ++ || ($SDKver_split[0] == 10 ++ && $SDKver_split[1] == 0 ++ && $SDKver_split[2] < 17763)) { ++ $UWP_info->{disable} = [ 'asm' ]; ++ } else { ++ $UWP_info->{disable} = [ ]; ++ } ++ } ++ return $UWP_info; ++} ++ + my %targets = ( + "VC-WIN32-ONECORE" => { + inherit_from => [ "VC-WIN32" ], +@@ -61,4 +81,57 @@ my %targets = ( + ex_libs => "onecore.lib", + multilib => "-arm64", + }, ++ ++ # Universal Windows Platform (UWP) App Support ++ ++ # TODO ++ # ++ # The 'disable' attribute should have 'uplink'. ++ # however, these are checked in some 'inherit_from', which is processed ++ # very early, before the 'disable' attributes are seen. ++ # This is a problem that needs to be resolved in Configure first. ++ # ++ # But if you want to build library with Windows 10 Version 1809 SDK or ++ # earlier, the 'disable' attribute should also have 'asm'. ++ ++ "VC-WIN32-UWP" => { ++ inherit_from => [ "VC-WIN32-ONECORE" ], ++ lflags => add("/APPCONTAINER"), ++ defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP", ++ "_WIN32_WINNT=0x0A00"), ++ dso_scheme => "", ++ disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink', ++ @{ UWP_info()->{disable} } ] }, ++ ex_libs => "WindowsApp.lib", ++ }, ++ "VC-WIN64A-UWP" => { ++ inherit_from => [ "VC-WIN64A-ONECORE" ], ++ lflags => add("/APPCONTAINER"), ++ defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP", ++ "_WIN32_WINNT=0x0A00"), ++ dso_scheme => "", ++ disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink', ++ @{ UWP_info()->{disable} } ] }, ++ ex_libs => "WindowsApp.lib", ++ }, ++ "VC-WIN32-ARM-UWP" => { ++ inherit_from => [ "VC-WIN32-ARM" ], ++ lflags => add("/APPCONTAINER"), ++ defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP", ++ "_WIN32_WINNT=0x0A00"), ++ dso_scheme => "", ++ disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink', ++ @{ UWP_info()->{disable} } ] }, ++ ex_libs => "WindowsApp.lib", ++ }, ++ "VC-WIN64-ARM-UWP" => { ++ inherit_from => [ "VC-WIN64-ARM" ], ++ lflags => add("/APPCONTAINER"), ++ defines => add("WINAPI_FAMILY=WINAPI_FAMILY_APP", ++ "_WIN32_WINNT=0x0A00"), ++ dso_scheme => "", ++ disable => sub { [ 'ui-console', 'stdio', 'async', 'uplink', ++ @{ UWP_info()->{disable} } ] }, ++ ex_libs => "WindowsApp.lib", ++ }, + ); +diff --git a/Configure b/Configure +index 5a699836f3..de45f1e299 100755 +--- a/Configure ++++ b/Configure +@@ -1,4 +1,5 @@ + #! /usr/bin/env perl ++#! /usr/bin/env perl + # -*- mode: perl; -*- + # Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved. + # +@@ -407,6 +408,7 @@ my @disablables = ( + "ubsan", + "ui-console", + "unit-test", ++ "uplink", + "whirlpool", + "weak-ssl-ciphers", + "zlib", +@@ -491,8 +493,8 @@ my @disable_cascades = ( + + # Without position independent code, there can be no shared libraries or DSOs + "pic" => [ "shared" ], +- "shared" => [ "dynamic-engine" ], ++ "shared" => [ "dynamic-engine", "uplink" ], + "dso" => [ "dynamic-engine" ], + "engine" => [ "afalgeng", "devcryptoeng" ], + + # no-autoalginit is only useful when building non-shared +diff --git a/INSTALL b/INSTALL +index 2119cbae9e..ee54e8c215 100644 +--- a/INSTALL ++++ b/INSTALL +@@ -560,6 +560,10 @@ + likely to complement configuration command line with + suitable compiler-specific option. + ++ no-uplink ++ Don't build support for UPLINK interface. ++ ++ + no- + Don't build support for negotiating the specified SSL/TLS + protocol (one of ssl, ssl3, tls, tls1, tls1_1, tls1_2, diff --git a/vcpkg/ports/openssl-uwp/fix-uwp-configure-unicode.patch b/vcpkg/ports/openssl-uwp/fix-uwp-configure-unicode.patch new file mode 100644 index 0000000..a3b645a --- /dev/null +++ b/vcpkg/ports/openssl-uwp/fix-uwp-configure-unicode.patch @@ -0,0 +1,19 @@ +diff --git a/Configure b/Configure +index 67df080..57a15d8 100644 +--- a/Configure ++++ b/Configure +@@ -598,12 +598,12 @@ my %table=( + # 'perl Configure VC-WINSTORE + "VC-WINSTORE","cl:-W3 -WX -Gs0 -GF -Gy -nologo -DWIN32_LEAN_AND_MEAN -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -DOPENSSL_WINAPP -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -FIsdkddkver.h -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", + # 'perf Configure VC-WINUNIVERSAL +-"VC-WINUNIVERSAL","cl:-W3 -WX -Gs0 -GF -Gy -nologo -DWIN32_LEAN_AND_MEAN -DWINAPI_FAMILY=WINAPI_FAMILY_APP -DOPENSSL_WINAPP -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -FIsdkddkver.h -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", ++"VC-WINUNIVERSAL","cl:-W3 -WX -Gs0 -GF -Gy -nologo -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -DWINAPI_FAMILY=WINAPI_FAMILY_APP -DOPENSSL_WINAPP -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -FIsdkddkver.h -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", + + "debug-VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", + "debug-VC-WINPHONE","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DWIN32_LEAN_AND_MEAN -DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DOPENSSL_WINAPP -FIsdkddkver.h -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", + "debug-VC-WINSTORE","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DWIN32_LEAN_AND_MEAN -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -DOPENSSL_WINAPP -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -FIsdkddkver.h -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", +-"debug-VC-WINUNIVERSAL","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DWIN32_LEAN_AND_MEAN -DWINAPI_FAMILY=WINAPI_FAMILY_APP -DOPENSSL_WINAPP -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DOPENSSL_WINUCRT -FIsdkddkver.h -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", ++"debug-VC-WINUNIVERSAL","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -DWINAPI_FAMILY=WINAPI_FAMILY_APP -DOPENSSL_WINAPP -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DOPENSSL_WINUCRT -FIsdkddkver.h -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", + + # Unified CE target + "VC-CE","cl::::WINCE::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${no_asm}:win32", diff --git a/vcpkg/ports/openssl-uwp/make-openssl.bat b/vcpkg/ports/openssl-uwp/make-openssl.bat new file mode 100644 index 0000000..6f6166a --- /dev/null +++ b/vcpkg/ports/openssl-uwp/make-openssl.bat @@ -0,0 +1,16 @@ +set build=%1 + +perl Configure no-asm no-hw no-dso VC-WINUNIVERSAL -FS -FIWindows.h + +for /D %%f in ("%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.FoundationContract\*") do set LibPath=%LibPath%;%%f\ +for /D %%f in ("%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.UniversalApiContract\*") do set LibPath=%LibPath%;%%f\ +for /D %%f in ("%WindowsSdkDir%References\Windows.Foundation.FoundationContract\*") do set LibPath=%LibPath%;%%f\ +for /D %%f in ("%WindowsSdkDir%References\Windows.Foundation.UniversalApiContract\*") do set LibPath=%LibPath%;%%f\ + +call ms\do_winuniversal.bat + +mkdir inc32\openssl + +jom -j %NUMBER_OF_PROCESSORS% -k -f ms\ntdll.mak +REM due to a race condition in the build, we need to have a second single-threaded pass. +nmake -f ms\ntdll.mak diff --git a/vcpkg/ports/openssl-uwp/portfile.cmake b/vcpkg/ports/openssl-uwp/portfile.cmake new file mode 100644 index 0000000..e601742 --- /dev/null +++ b/vcpkg/ports/openssl-uwp/portfile.cmake @@ -0,0 +1,177 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} is only for Windows Universal Platform" ON_TARGET "Linux" "OSX") + +if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h") + message(FATAL_ERROR "Can't build openssl if libressl/boringssl is installed. Please remove libressl/boringssl, and try install openssl again if you need it.") +endif() + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_find_acquire_program(PERL) +vcpkg_find_acquire_program(JOM) +get_filename_component(JOM_EXE_PATH ${JOM} DIRECTORY) +get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) +vcpkg_add_to_path("${PERL_EXE_PATH}") +vcpkg_add_to_path("${JOM_EXE_PATH}") + +set(OPENSSL_VERSION 1.1.1g) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.1.1/openssl-${OPENSSL_VERSION}.tar.gz" + FILENAME "openssl-${OPENSSL_VERSION}.tar.gz" + SHA512 01e3d0b1bceeed8fb066f542ef5480862001556e0f612e017442330bbd7e5faee228b2de3513d7fc347446b7f217e27de1003dc9d7214d5833b97593f3ec25ab +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + EnableUWPSupport.patch +) + +vcpkg_find_acquire_program(NASM) +get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) +vcpkg_add_to_path(PREPEND "${NASM_EXE_PATH}") + +vcpkg_find_acquire_program(JOM) + +set(CONFIGURE_COMMAND ${PERL} Configure + enable-static-engine + enable-capieng + no-unit-test + no-ssl2 + no-asm + no-uplink + no-tests + -utf-8 + shared +) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(OPENSSL_ARCH VC-WIN32-UWP) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(OPENSSL_ARCH VC-WIN64A-UWP) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(OPENSSL_ARCH VC-WIN32-ARM-UWP) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(OPENSSL_ARCH VC-WIN64-ARM-UWP) +else() + message(FATAL_ERROR "Unsupported target architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() + +set(OPENSSL_MAKEFILE "makefile") + +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + + # Copy openssl sources. + message(STATUS "Copying openssl release source files...") + file(GLOB OPENSSL_SOURCE_FILES ${SOURCE_PATH}/*) + foreach(SOURCE_FILE ${OPENSSL_SOURCE_FILES}) + file(COPY ${SOURCE_FILE} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + endforeach() + message(STATUS "Copying openssl release source files... done") + set(SOURCE_PATH_RELEASE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + + set(OPENSSLDIR_RELEASE ${CURRENT_PACKAGES_DIR}) + + message(STATUS "Configure ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND ${CONFIGURE_COMMAND} ${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_RELEASE}" "--openssldir=${OPENSSLDIR_RELEASE}" -FS + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME configure-perl-${TARGET_TRIPLET}-${VCPKG_BUILD_TYPE}-rel + ) + message(STATUS "Configure ${TARGET_TRIPLET}-rel done") + + message(STATUS "Build ${TARGET_TRIPLET}-rel") + # Openssl's buildsystem has a race condition which will cause JOM to fail at some point. + # This is ok; we just do as much work as we can in parallel first, then follow up with a single-threaded build. + make_directory(${SOURCE_PATH_RELEASE}/inc32/openssl) + execute_process( + COMMAND ${JOM} -k -j $ENV{NUMBER_OF_PROCESSORS} -f ${OPENSSL_MAKEFILE} build_libs + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-out.log + ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-err.log + ) + vcpkg_execute_required_process( + COMMAND nmake -f ${OPENSSL_MAKEFILE} install_dev + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME build-${TARGET_TRIPLET}-rel-1) + + message(STATUS "Build ${TARGET_TRIPLET}-rel done") +endif() + + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + # Copy openssl sources. + message(STATUS "Copying openssl debug source files...") + file(GLOB OPENSSL_SOURCE_FILES ${SOURCE_PATH}/*) + foreach(SOURCE_FILE ${OPENSSL_SOURCE_FILES}) + file(COPY ${SOURCE_FILE} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + endforeach() + message(STATUS "Copying openssl debug source files... done") + set(SOURCE_PATH_DEBUG "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + + set(OPENSSLDIR_DEBUG ${CURRENT_PACKAGES_DIR}/debug) + + message(STATUS "Configure ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND ${CONFIGURE_COMMAND} debug-${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_DEBUG}" "--openssldir=${OPENSSLDIR_DEBUG}" -FS + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME configure-perl-${TARGET_TRIPLET}-${VCPKG_BUILD_TYPE}-dbg + ) + message(STATUS "Configure ${TARGET_TRIPLET}-dbg done") + + message(STATUS "Build ${TARGET_TRIPLET}-dbg") + make_directory(${SOURCE_PATH_DEBUG}/inc32/openssl) + execute_process( + COMMAND ${JOM} -k -j $ENV{NUMBER_OF_PROCESSORS} -f ${OPENSSL_MAKEFILE} build_libs + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-out.log + ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-err.log + ) + vcpkg_execute_required_process( + COMMAND nmake -f ${OPENSSL_MAKEFILE} install_dev + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME build-${TARGET_TRIPLET}-dbg-1) + + message(STATUS "Build ${TARGET_TRIPLET}-dbg done") +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/certs) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/private) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/engines-1_1) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/certs) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/engines-1_1) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/private) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + + + +file(REMOVE + ${CURRENT_PACKAGES_DIR}/bin/openssl.exe + ${CURRENT_PACKAGES_DIR}/debug/bin/openssl.exe + ${CURRENT_PACKAGES_DIR}/debug/openssl.cnf + ${CURRENT_PACKAGES_DIR}/openssl.cnf + ${CURRENT_PACKAGES_DIR}/ct_log_list.cnf + ${CURRENT_PACKAGES_DIR}/ct_log_list.cnf.dist + ${CURRENT_PACKAGES_DIR}/openssl.cnf.dist + ${CURRENT_PACKAGES_DIR}/debug/ct_log_list.cnf + ${CURRENT_PACKAGES_DIR}/debug/ct_log_list.cnf.dist + ${CURRENT_PACKAGES_DIR}/debug/openssl.cnf.dist +) + + +file(READ "${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" _contents) +string(REPLACE "" "" _contents "${_contents}") +file(WRITE "${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" "${_contents}") + +file(READ "${CURRENT_PACKAGES_DIR}/include/openssl/rand.h" _contents) +string(REPLACE "# include " "#ifndef _WINSOCKAPI_\n#define _WINSOCKAPI_\n#endif\n# include " _contents "${_contents}") +file(WRITE "${CURRENT_PACKAGES_DIR}/include/openssl/rand.h" "${_contents}") + +vcpkg_copy_pdbs() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/openssl-uwp/usage b/vcpkg/ports/openssl-uwp/usage new file mode 100644 index 0000000..f535cb6 --- /dev/null +++ b/vcpkg/ports/openssl-uwp/usage @@ -0,0 +1,4 @@ +The package openssl is compatible with built-in CMake targets: + + find_package(OpenSSL REQUIRED) + target_link_libraries(main PRIVATE OpenSSL::SSL OpenSSL::Crypto) diff --git a/vcpkg/ports/openssl-windows/CONTROL b/vcpkg/ports/openssl-windows/CONTROL new file mode 100644 index 0000000..e70ab22 --- /dev/null +++ b/vcpkg/ports/openssl-windows/CONTROL @@ -0,0 +1,5 @@ +Source: openssl-windows +Version: 1.1.1g +Port-Version: 1 +Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. +Supports: windows diff --git a/vcpkg/ports/openssl-windows/ConfigureIncludeQuotesFix.patch b/vcpkg/ports/openssl-windows/ConfigureIncludeQuotesFix.patch new file mode 100644 index 0000000..09494f5 --- /dev/null +++ b/vcpkg/ports/openssl-windows/ConfigureIncludeQuotesFix.patch @@ -0,0 +1,13 @@ +diff --git a/Configure b/Configure +index c98107a..77ad9d3 100644 +--- a/Configure ++++ b/Configure +@@ -972,7 +972,7 @@ PROCESS_ARGS: + } + elsif (/^--with-zlib-include=(.*)$/) + { +- $withargs{"zlib-include"}="-I$1"; ++ $withargs{"zlib-include"}="-I\"$1\""; + } + elsif (/^--with-fipsdir=(.*)$/) + { diff --git a/vcpkg/ports/openssl-windows/EmbedSymbolsInStaticLibsZ7.patch b/vcpkg/ports/openssl-windows/EmbedSymbolsInStaticLibsZ7.patch new file mode 100644 index 0000000..1a8de2c --- /dev/null +++ b/vcpkg/ports/openssl-windows/EmbedSymbolsInStaticLibsZ7.patch @@ -0,0 +1,25 @@ +diff --git a/util/pl/VC-32.pl b/util/pl/VC-32.pl +index dba96cb..5722f6e 100644 +--- a/util/pl/VC-32.pl ++++ b/util/pl/VC-32.pl +@@ -154,9 +154,17 @@ else + $cflags=$opt_cflags.$base_cflags; + } + +-# generate symbols.pdb unconditionally +-$app_cflag.=" /Zi /Fd\$(TMP_D)/app"; +-$lib_cflag.=" /Zi /Fd\$(TMP_D)/lib"; ++# generate symbols.pdb when building dlls and embed symbols when building static libs ++if ($shlib) ++ { ++ $app_cflag.=" /Zi /Fd\$(TMP_D)/app.pdb"; ++ $lib_cflag.=" /Zi /Fd\$(TMP_D)/lib.pdb"; ++ } ++else ++ { ++ $app_cflag.=" /Z7"; ++ $lib_cflag.=" /Z7"; ++ } + $lflags.=" /debug"; + + $obj='.obj'; diff --git a/vcpkg/ports/openssl-windows/EnableWinARM32.patch b/vcpkg/ports/openssl-windows/EnableWinARM32.patch new file mode 100644 index 0000000..f1eedcb --- /dev/null +++ b/vcpkg/ports/openssl-windows/EnableWinARM32.patch @@ -0,0 +1,21 @@ +diff --git a/util/pl/VC-32.pl b/util/pl/VC-32.pl +index dba96cba5e..7fd99959f1 100644 +--- a/util/pl/VC-32.pl ++++ b/util/pl/VC-32.pl +@@ -261,6 +261,8 @@ if ($shlib && $FLAVOR !~ /CE/) + { + $mlflags.=" $lflags /dll"; + $lib_cflag.=" -D_WINDLL"; ++ if ($base_cflags !~ /-D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE/) ++ { + # + # Engage Applink... + # +@@ -286,6 +288,7 @@ ___ + CRYPTOOBJ=ms\uptable.obj $(CRYPTOOBJ) + ___ + } ++ } + elsif ($shlib && $FLAVOR =~ /CE/) + { + $mlflags.=" $lflags /dll"; diff --git a/vcpkg/ports/openssl-windows/EnableWinARM64.patch b/vcpkg/ports/openssl-windows/EnableWinARM64.patch new file mode 100644 index 0000000..9ec813a --- /dev/null +++ b/vcpkg/ports/openssl-windows/EnableWinARM64.patch @@ -0,0 +1,16 @@ +diff --git a/Configure b/Configure +index 36a7a66..b31543d 100644 +--- a/Configure ++++ b/Configure +@@ -592,9 +592,9 @@ my %table=( + "debug-VC-WIN64A","cl:-W3 -Gs0 -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:".eval{my $asm=$x86_64_asm;$asm=~s/x86_64-gcc\.o/bn_asm.o/;$asm}.":auto:win32", + # x86 Win32 target defaults to ANSI API, if you want UNICODE, complement + # 'perl Configure VC-WIN32' with '-DUNICODE -D_UNICODE' +-"VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", ++"VC-WIN32","cl:-W3 -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", + # Unified CE target +-"debug-VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", ++"debug-VC-WIN32","cl:-W3 -Gs0 -GF -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32", + "VC-CE","cl::::WINCE::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${no_asm}:win32", + + # Borland C++ 4.5 diff --git a/vcpkg/ports/openssl-windows/STRINGIFYPatch.patch b/vcpkg/ports/openssl-windows/STRINGIFYPatch.patch new file mode 100644 index 0000000..dd8f9c2 --- /dev/null +++ b/vcpkg/ports/openssl-windows/STRINGIFYPatch.patch @@ -0,0 +1,23 @@ +diff --git a/crypto/cversion.c b/crypto/cversion.c +index bfff699..17b7912 100644 +--- a/crypto/cversion.c ++++ b/crypto/cversion.c +@@ -56,6 +56,9 @@ + * [including the GNU Public Licence.] + */ + ++#define STRINGIFY2(x) #x ++#define STRINGIFY(x) STRINGIFY2(x) ++ + #include "cryptlib.h" + + #ifndef NO_WINDOWS_BRAINDEATH +@@ -79,7 +82,7 @@ const char *SSLeay_version(int t) + } + if (t == SSLEAY_CFLAGS) { + #ifdef CFLAGS +- return (CFLAGS); ++ return STRINGIFY(CFLAGS); + #else + return ("compiler: information not available"); + #endif diff --git a/vcpkg/ports/openssl-windows/portfile.cmake b/vcpkg/ports/openssl-windows/portfile.cmake new file mode 100644 index 0000000..44de515 --- /dev/null +++ b/vcpkg/ports/openssl-windows/portfile.cmake @@ -0,0 +1,190 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} is only for Windows Desktop" ON_TARGET "UWP" "Linux" "OSX") + +if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openssl/ssl.h") + message(FATAL_ERROR "Can't build openssl if libressl/boringssl is installed. Please remove libressl/boringssl, and try install openssl again if you need it.") +endif() + +vcpkg_find_acquire_program(PERL) + +set(OPENSSL_VERSION 1.1.1g) + +get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) +vcpkg_add_to_path("${PERL_EXE_PATH}") + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" "https://www.openssl.org/source/old/1.1.1/openssl-${OPENSSL_VERSION}.tar.gz" + FILENAME "openssl-${OPENSSL_VERSION}.tar.gz" + SHA512 01e3d0b1bceeed8fb066f542ef5480862001556e0f612e017442330bbd7e5faee228b2de3513d7fc347446b7f217e27de1003dc9d7214d5833b97593f3ec25ab +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +vcpkg_find_acquire_program(NASM) +get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) +vcpkg_add_to_path(PREPEND "${NASM_EXE_PATH}") + +vcpkg_find_acquire_program(JOM) + +set(OPENSSL_SHARED no-shared) +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OPENSSL_SHARED shared) +endif() + +set(CONFIGURE_OPTIONS + enable-static-engine + enable-capieng + no-ssl2 + no-tests + -utf-8 + ${OPENSSL_SHARED} +) + +if(DEFINED OPENSSL_USE_NOPINSHARED) + set(CONFIGURE_OPTIONS ${CONFIGURE_OPTIONS} no-pinshared) +endif() + +set(CONFIGURE_COMMAND ${PERL} Configure ${CONFIGURE_OPTIONS}) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(OPENSSL_ARCH VC-WIN32) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(OPENSSL_ARCH VC-WIN64A) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(OPENSSL_ARCH VC-WIN32-ARM) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(OPENSSL_ARCH VC-WIN64-ARM) +else() + message(FATAL_ERROR "Unsupported target architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() + +set(OPENSSL_MAKEFILE "makefile") + +file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + + # Copy openssl sources. + message(STATUS "Copying openssl release source files...") + file(GLOB OPENSSL_SOURCE_FILES ${SOURCE_PATH}/*) + foreach(SOURCE_FILE ${OPENSSL_SOURCE_FILES}) + file(COPY ${SOURCE_FILE} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + endforeach() + message(STATUS "Copying openssl release source files... done") + set(SOURCE_PATH_RELEASE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + + set(OPENSSLDIR_RELEASE ${CURRENT_PACKAGES_DIR}) + + message(STATUS "Configure ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND ${CONFIGURE_COMMAND} ${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_RELEASE}" "--openssldir=${OPENSSLDIR_RELEASE}" -FS + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME configure-perl-${TARGET_TRIPLET}-${VCPKG_BUILD_TYPE}-rel + ) + message(STATUS "Configure ${TARGET_TRIPLET}-rel done") + + message(STATUS "Build ${TARGET_TRIPLET}-rel") + # Openssl's buildsystem has a race condition which will cause JOM to fail at some point. + # This is ok; we just do as much work as we can in parallel first, then follow up with a single-threaded build. + make_directory(${SOURCE_PATH_RELEASE}/inc32/openssl) + execute_process( + COMMAND ${JOM} -k -j $ENV{NUMBER_OF_PROCESSORS} -f ${OPENSSL_MAKEFILE} + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-out.log + ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-0-err.log + ) + vcpkg_execute_required_process( + COMMAND nmake -f ${OPENSSL_MAKEFILE} install_sw install_ssldirs + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME build-${TARGET_TRIPLET}-rel-1) + + message(STATUS "Build ${TARGET_TRIPLET}-rel done") +endif() + + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + # Copy openssl sources. + message(STATUS "Copying openssl debug source files...") + file(GLOB OPENSSL_SOURCE_FILES ${SOURCE_PATH}/*) + foreach(SOURCE_FILE ${OPENSSL_SOURCE_FILES}) + file(COPY ${SOURCE_FILE} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + endforeach() + message(STATUS "Copying openssl debug source files... done") + set(SOURCE_PATH_DEBUG "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + + set(OPENSSLDIR_DEBUG ${CURRENT_PACKAGES_DIR}/debug) + + message(STATUS "Configure ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND ${CONFIGURE_COMMAND} debug-${OPENSSL_ARCH} "--prefix=${OPENSSLDIR_DEBUG}" "--openssldir=${OPENSSLDIR_DEBUG}" -FS + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME configure-perl-${TARGET_TRIPLET}-${VCPKG_BUILD_TYPE}-dbg + ) + message(STATUS "Configure ${TARGET_TRIPLET}-dbg done") + + message(STATUS "Build ${TARGET_TRIPLET}-dbg") + make_directory(${SOURCE_PATH_DEBUG}/inc32/openssl) + execute_process( + COMMAND ${JOM} -k -j $ENV{NUMBER_OF_PROCESSORS} -f ${OPENSSL_MAKEFILE} + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-out.log + ERROR_FILE ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-dbg-0-err.log + ) + vcpkg_execute_required_process( + COMMAND nmake -f ${OPENSSL_MAKEFILE} install_sw install_ssldirs + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME build-${TARGET_TRIPLET}-dbg-1) + + message(STATUS "Build ${TARGET_TRIPLET}-dbg done") +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/certs) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/private) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/engines-1_1) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/certs) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/engines-1_1) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/private) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + + + +file(REMOVE + ${CURRENT_PACKAGES_DIR}/ct_log_list.cnf + ${CURRENT_PACKAGES_DIR}/ct_log_list.cnf.dist + ${CURRENT_PACKAGES_DIR}/openssl.cnf.dist + ${CURRENT_PACKAGES_DIR}/debug/bin/openssl.exe + ${CURRENT_PACKAGES_DIR}/debug/ct_log_list.cnf + ${CURRENT_PACKAGES_DIR}/debug/ct_log_list.cnf.dist + ${CURRENT_PACKAGES_DIR}/debug/openssl.cnf + ${CURRENT_PACKAGES_DIR}/debug/openssl.cnf.dist +) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/openssl/) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/openssl.exe ${CURRENT_PACKAGES_DIR}/tools/openssl/openssl.exe) +file(RENAME ${CURRENT_PACKAGES_DIR}/openssl.cnf ${CURRENT_PACKAGES_DIR}/tools/openssl/openssl.cnf) + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/openssl) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + # They should be empty, only the exes deleted above were in these directories + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin/) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/) +endif() + +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/openssl/dtls1.h" + "" + "" +) + +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/openssl/rand.h" + "# include " + "#ifndef _WINSOCKAPI_\n#define _WINSOCKAPI_\n#endif\n# include " +) + +vcpkg_copy_pdbs() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/openssl-windows/usage b/vcpkg/ports/openssl-windows/usage new file mode 100644 index 0000000..f535cb6 --- /dev/null +++ b/vcpkg/ports/openssl-windows/usage @@ -0,0 +1,4 @@ +The package openssl is compatible with built-in CMake targets: + + find_package(OpenSSL REQUIRED) + target_link_libraries(main PRIVATE OpenSSL::SSL OpenSSL::Crypto) diff --git a/vcpkg/ports/openssl/CONTROL b/vcpkg/ports/openssl/CONTROL new file mode 100644 index 0000000..d643a3c --- /dev/null +++ b/vcpkg/ports/openssl/CONTROL @@ -0,0 +1,6 @@ +Source: openssl +Version: 1.1.1g +Port-Version: 1 +Homepage: https://www.openssl.org +Description: OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. +Build-Depends: openssl-windows (!uwp&windows), openssl-uwp (uwp), openssl-unix (!uwp&!windows) diff --git a/vcpkg/ports/openssl/portfile.cmake b/vcpkg/ports/openssl/portfile.cmake new file mode 100644 index 0000000..3d55c36 --- /dev/null +++ b/vcpkg/ports/openssl/portfile.cmake @@ -0,0 +1,2 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/openssl/) diff --git a/vcpkg/ports/openssl/usage b/vcpkg/ports/openssl/usage new file mode 100644 index 0000000..f535cb6 --- /dev/null +++ b/vcpkg/ports/openssl/usage @@ -0,0 +1,4 @@ +The package openssl is compatible with built-in CMake targets: + + find_package(OpenSSL REQUIRED) + target_link_libraries(main PRIVATE OpenSSL::SSL OpenSSL::Crypto) diff --git a/vcpkg/ports/opensubdiv/fix_compile-option.patch b/vcpkg/ports/opensubdiv/fix_compile-option.patch new file mode 100644 index 0000000..1acae92 --- /dev/null +++ b/vcpkg/ports/opensubdiv/fix_compile-option.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b69912ae..dcde4297 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -218,7 +218,7 @@ elseif(MSVC) + + list(APPEND OSD_COMPILER_FLAGS + /W3 # Use warning level recommended for production purposes. +- /WX # Treat all compiler warnings as errors. ++ # /WX # Treat all compiler warnings as errors. + + # warning C4005: macro redefinition + /wd4005 diff --git a/vcpkg/ports/opensubdiv/portfile.cmake b/vcpkg/ports/opensubdiv/portfile.cmake new file mode 100644 index 0000000..c23e144 --- /dev/null +++ b/vcpkg/ports/opensubdiv/portfile.cmake @@ -0,0 +1,46 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "linux" "osx" "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO PixarAnimationStudios/OpenSubdiv + REF 82ab1b9f54c87fdd7e989a3470d53e137b8ca270 # 3.4.3 + SHA512 607cb9aa05d83a24bc2102bfd28abfec58f5723b1c56f6f431111ebf98f105ff7ca2a77610953acd21f73cb74d8d8ec68db3aeb11be1f9ca56d87c36c58dd095 + HEAD_REF master + PATCHES + fix_compile-option.patch +) + +vcpkg_find_acquire_program(PYTHON2) +get_filename_component(PYTHON2_DIR "${PYTHON2}" DIRECTORY) +vcpkg_add_to_path("${PYTHON2_DIR}") + +if (VCPKG_CRT_LINKAGE STREQUAL static) + set(STATIC_CRT_LNK ON) +else() + set(STATIC_CRT_LNK OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DNO_DX=ON + -DNO_CUDA=ON + -DNO_EXAMPLES=ON + -DNO_TUTORIALS=ON + -DNO_REGRESSION=ON + -DNO_TESTS=ON + -DMSVC_STATIC_CRT=${STATIC_CRT_LNK} +) + +vcpkg_install_cmake() + +# # Moves all .cmake files from /debug/share/opensubdiv/ to /share/opensubdiv/ +# # See /docs/maintainers/vcpkg_fixup_cmake_targets.md for more details +# vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/opensubdiv) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/opensubdiv/vcpkg.json b/vcpkg/ports/opensubdiv/vcpkg.json new file mode 100644 index 0000000..b66c98d --- /dev/null +++ b/vcpkg/ports/opensubdiv/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "opensubdiv", + "version-string": "3.4.3", + "description": "An Open-Source subdivision surface library.", + "homepage": "https://github.com/PixarAnimationStudios/OpenSubdiv", + "supports": "windows & !arm & !uwp" +} diff --git a/vcpkg/ports/opentracing/CONTROL b/vcpkg/ports/opentracing/CONTROL new file mode 100644 index 0000000..08c664f --- /dev/null +++ b/vcpkg/ports/opentracing/CONTROL @@ -0,0 +1,5 @@ +Source: opentracing +Version: 1.6.0 +Description: C++ implementation of the OpenTracing API +Homepage: https://opentracing.io +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/opentracing/portfile.cmake b/vcpkg/ports/opentracing/portfile.cmake new file mode 100644 index 0000000..7ccf34d --- /dev/null +++ b/vcpkg/ports/opentracing/portfile.cmake @@ -0,0 +1,62 @@ +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "Error: UWP build is not supported.") +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set( LOCAL_OPTIONS + -DBUILD_STATIC_LIBS=OFF + ) +else() + message("Static building is only possible when compiling static and dynamic versions at the same time. Enabling both.") + set(VCPKG_LIBRARY_LINKAGE dynamic) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO opentracing/opentracing-cpp + REF 4bb431f7728eaf383a07e86f9754a5b67575dab0 # v1.6.0 + SHA512 1c69ff4cfd5f6037a48815367d3026c1bf06c3c49ebf232a64c43167385fb62e444c3b3224fc38f68ef0fdb378e3736db6ee6ba57160e6e578c87c09e92e527e +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${OPTIONS} + ${LOCAL_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/OpenTracing) + +vcpkg_copy_pdbs() + +# Move DLLs to /bin +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/opentracing.dll ${CURRENT_PACKAGES_DIR}/bin/opentracing.dll) + + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/opentracing.dll ${CURRENT_PACKAGES_DIR}/debug/bin/opentracing.dll) + + # Fix targets + file(READ ${CURRENT_PACKAGES_DIR}/share/opentracing/OpenTracingTargets-release.cmake RELEASE_CONFIG) + string(REPLACE "\${_IMPORT_PREFIX}/lib/opentracing.dll" + "\${_IMPORT_PREFIX}/bin/opentracing.dll" RELEASE_CONFIG ${RELEASE_CONFIG}) + file(WRITE ${CURRENT_PACKAGES_DIR}/share/opentracing/OpenTracingTargets-release.cmake "${RELEASE_CONFIG}") + + file(READ ${CURRENT_PACKAGES_DIR}/share/opentracing/OpenTracingTargets-debug.cmake DEBUG_CONFIG) + string(REPLACE "\${_IMPORT_PREFIX}/debug/lib/opentracing.dll" + "\${_IMPORT_PREFIX}/debug/bin/opentracing.dll" DEBUG_CONFIG ${DEBUG_CONFIG}) + file(WRITE ${CURRENT_PACKAGES_DIR}/share/opentracing/OpenTracingTargets-debug.cmake "${DEBUG_CONFIG}") + endif() +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/opentracing RENAME copyright) + +# Remove duplicate headers +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/vcpkg/ports/openvdb/0001-remove-pkgconfig.patch b/vcpkg/ports/openvdb/0001-remove-pkgconfig.patch new file mode 100644 index 0000000..568dec6 --- /dev/null +++ b/vcpkg/ports/openvdb/0001-remove-pkgconfig.patch @@ -0,0 +1,145 @@ +diff --git a/cmake/FindBlosc.cmake b/cmake/FindBlosc.cmake +index cc80fc5..3ead1b3 100644 +--- a/cmake/FindBlosc.cmake ++++ b/cmake/FindBlosc.cmake +@@ -99,13 +99,6 @@ elseif(DEFINED ENV{BLOSC_ROOT}) + set(_BLOSC_ROOT $ENV{BLOSC_ROOT}) + endif() + +-# Additionally try and use pkconfig to find blosc +- +-if(NOT DEFINED PKG_CONFIG_FOUND) +- find_package(PkgConfig) +-endif() +-pkg_check_modules(PC_Blosc QUIET blosc) +- + # ------------------------------------------------------------------------ + # Search for blosc include DIR + # ------------------------------------------------------------------------ +diff --git a/cmake/FindCppUnit.cmake b/cmake/FindCppUnit.cmake +index af121ba..8fda97c 100644 +--- a/cmake/FindCppUnit.cmake ++++ b/cmake/FindCppUnit.cmake +@@ -101,13 +101,6 @@ elseif(DEFINED ENV{CPPUNIT_ROOT}) + set(_CPPUNIT_ROOT $ENV{CPPUNIT_ROOT}) + endif() + +-# Additionally try and use pkconfig to find cppunit +- +-if(NOT DEFINED PKG_CONFIG_FOUND) +- find_package(PkgConfig) +-endif() +-pkg_check_modules(PC_CppUnit QUIET cppunit) +- + # ------------------------------------------------------------------------ + # Search for CppUnit include DIR + # ------------------------------------------------------------------------ +diff --git a/cmake/FindIlmBase.cmake b/cmake/FindIlmBase.cmake +index f20f803..00a6d30 100644 +--- a/cmake/FindIlmBase.cmake ++++ b/cmake/FindIlmBase.cmake +@@ -142,13 +142,6 @@ elseif(DEFINED ENV{ILMBASE_ROOT}) + set(_ILMBASE_ROOT $ENV{ILMBASE_ROOT}) + endif() + +-# Additionally try and use pkconfig to find IlmBase +- +-if(NOT DEFINED PKG_CONFIG_FOUND) +- find_package(PkgConfig) +-endif() +-pkg_check_modules(PC_IlmBase QUIET IlmBase) +- + # ------------------------------------------------------------------------ + # Search for IlmBase include DIR + # ------------------------------------------------------------------------ +diff --git a/cmake/FindLog4cplus.cmake b/cmake/FindLog4cplus.cmake +index f11472e..f7388d4 100644 +--- a/cmake/FindLog4cplus.cmake ++++ b/cmake/FindLog4cplus.cmake +@@ -101,13 +101,6 @@ elseif(DEFINED ENV{LOG4CPLUS_ROOT}) + set(_LOG4CPLUS_ROOT $ENV{LOG4CPLUS_ROOT}) + endif() + +-# Additionally try and use pkconfig to find log4cplus +- +-if(NOT DEFINED PKG_CONFIG_FOUND) +- find_package(PkgConfig) +-endif() +-pkg_check_modules(PC_Log4cplus QUIET log4cplus) +- + # ------------------------------------------------------------------------ + # Search for Log4cplus include DIR + # ------------------------------------------------------------------------ +diff --git a/cmake/FindOpenEXR.cmake b/cmake/FindOpenEXR.cmake +index d0d356f..3d243d0 100644 +--- a/cmake/FindOpenEXR.cmake ++++ b/cmake/FindOpenEXR.cmake +@@ -135,13 +135,6 @@ elseif(DEFINED ENV{OPENEXR_ROOT}) + set(_OPENEXR_ROOT $ENV{OPENEXR_ROOT}) + endif() + +-# Additionally try and use pkconfig to find OpenEXR +- +-if(NOT DEFINED PKG_CONFIG_FOUND) +- find_package(PkgConfig) +-endif() +-pkg_check_modules(PC_OpenEXR QUIET OpenEXR) +- + # ------------------------------------------------------------------------ + # Search for OpenEXR include DIR + # ------------------------------------------------------------------------ +diff --git a/cmake/FindOpenVDB.cmake b/cmake/FindOpenVDB.cmake +index 18b1c83..01a2f04 100644 +--- a/cmake/FindOpenVDB.cmake ++++ b/cmake/FindOpenVDB.cmake +@@ -142,13 +142,6 @@ elseif(DEFINED ENV{OPENVDB_ROOT}) + set(_OPENVDB_ROOT $ENV{OPENVDB_ROOT}) + endif() + +-# Additionally try and use pkconfig to find OpenVDB +- +-if(NOT DEFINED PKG_CONFIG_FOUND) +- find_package(PkgConfig) +-endif() +-pkg_check_modules(PC_OpenVDB QUIET OpenVDB) +- + # This CMake module supports being called from external packages AND from + # within the OpenVDB repository for building openvdb components with the + # core library build disabled. Determine where we are being called from: +diff --git a/cmake/FindTBB.cmake b/cmake/FindTBB.cmake +index a537300..4be895b 100644 +--- a/cmake/FindTBB.cmake ++++ b/cmake/FindTBB.cmake +@@ -126,13 +126,6 @@ elseif(DEFINED ENV{TBB_ROOT}) + set(_TBB_ROOT $ENV{TBB_ROOT}) + endif() + +-# Additionally try and use pkconfig to find Tbb +- +-if(NOT DEFINED PKG_CONFIG_FOUND) +- find_package(PkgConfig) +-endif() +-pkg_check_modules(PC_Tbb QUIET tbb) +- + # ------------------------------------------------------------------------ + # Search for tbb include DIR + # ------------------------------------------------------------------------ +diff --git a/cmake/OpenVDBGLFW3Setup.cmake b/cmake/OpenVDBGLFW3Setup.cmake +index 84e54d9..bac685c 100644 +--- a/cmake/OpenVDBGLFW3Setup.cmake ++++ b/cmake/OpenVDBGLFW3Setup.cmake +@@ -65,14 +65,6 @@ else() + endif() + endif() + +-# Additionally try and use pkconfig to find glfw, though we only use +-# pkg-config to re-direct to the cmake. In other words, glfw's cmake is +-# expected to be installed +-if(NOT DEFINED PKG_CONFIG_FOUND) +- find_package(PkgConfig) +-endif() +-pkg_check_modules(PC_glfw3 QUIET glfw3) +- + if(PC_glfw3_FOUND) + foreach(DIR ${PC_glfw3_LIBRARY_DIRS}) + list(APPEND _GLFW3_ROOT_SEARCH_DIR ${DIR}) diff --git a/vcpkg/ports/openvdb/0002-fix-cmake-modules.patch b/vcpkg/ports/openvdb/0002-fix-cmake-modules.patch new file mode 100644 index 0000000..35b093c --- /dev/null +++ b/vcpkg/ports/openvdb/0002-fix-cmake-modules.patch @@ -0,0 +1,308 @@ +diff --git a/cmake/FindBlosc.cmake b/cmake/FindBlosc.cmake +index 3ead1b3..0522e4a 100644 +--- a/cmake/FindBlosc.cmake ++++ b/cmake/FindBlosc.cmake +@@ -75,6 +75,7 @@ if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) + endif() + ++if(0) + mark_as_advanced( + Blosc_INCLUDE_DIR + Blosc_LIBRARY +@@ -206,3 +207,30 @@ if(Blosc_FOUND) + elseif(Blosc_FIND_REQUIRED) + message(FATAL_ERROR "Unable to find Blosc") + endif() ++else() ++FIND_PACKAGE ( PackageHandleStandardArgs ) ++FIND_PATH( BLOSC_LOCATION include/blosc.h) ++FIND_PACKAGE_HANDLE_STANDARD_ARGS ( Blosc ++ REQUIRED_VARS BLOSC_LOCATION ++ ) ++IF ( BLOSC_FOUND ) ++SET ( _blosc_library_name "blosc" ) ++ # Static library setup ++ IF (Blosc_USE_STATIC_LIBS) ++ SET(CMAKE_FIND_LIBRARY_SUFFIXES_BACKUP ${CMAKE_FIND_LIBRARY_SUFFIXES}) ++ IF (WIN32) ++ SET ( _blosc_library_name "libblosc" ) ++ ELSE () ++ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a") ++ ENDIF () ++ ENDIF() ++ FIND_LIBRARY ( BLOSC_blosc_LIBRARY ${_blosc_library_name} ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ # Static library tear down ++ IF (Blosc_USE_STATIC_LIBS) ++ SET( CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_BACKUP} ) ++ ENDIF() ++ SET( BLOSC_INCLUDE_DIR "${BLOSC_LOCATION}/include" CACHE STRING "Blosc include directory" ) ++ENDIF ( BLOSC_FOUND ) ++endif() +\ No newline at end of file +diff --git a/cmake/FindIlmBase.cmake b/cmake/FindIlmBase.cmake +index 00a6d30..10322fd 100644 +--- a/cmake/FindIlmBase.cmake ++++ b/cmake/FindIlmBase.cmake +@@ -84,6 +84,7 @@ may be provided to tell this module where to look. + + cmake_minimum_required(VERSION 3.3) + ++if(0) + # Monitoring _ROOT variables + if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) +@@ -320,3 +321,144 @@ if(IlmBase_FOUND) + elseif(IlmBase_FIND_REQUIRED) + message(FATAL_ERROR "Unable to find IlmBase") + endif() ++else() ++FIND_PACKAGE ( PackageHandleStandardArgs ) ++FIND_PATH ( ILMBASE_LOCATION include/OpenEXR/IlmBaseConfig.h) ++FIND_PACKAGE_HANDLE_STANDARD_ARGS ( ILMBase ++ REQUIRED_VARS ILMBASE_LOCATION ++ ) ++OPTION ( ILMBASE_NAMESPACE_VERSIONING "Namespace versioning of libraries" ON ) ++ ++IF ( ILMBASE_FOUND ) ++ ++ FILE ( STRINGS "${ILMBASE_LOCATION}/include/OpenEXR/IlmBaseConfig.h" _ilmbase_version_major_string REGEX "#define ILMBASE_VERSION_MAJOR ") ++ STRING ( REGEX REPLACE "#define ILMBASE_VERSION_MAJOR" "" _ilmbase_version_major_unstrip "${_ilmbase_version_major_string}") ++ STRING ( STRIP "${_ilmbase_version_major_unstrip}" ILMBASE_VERSION_MAJOR ) ++ ++ FILE ( STRINGS "${ILMBASE_LOCATION}/include/OpenEXR/IlmBaseConfig.h" _ilmbase_version_minor_string REGEX "#define ILMBASE_VERSION_MINOR ") ++ STRING ( REGEX REPLACE "#define ILMBASE_VERSION_MINOR" "" _ilmbase_version_minor_unstrip "${_ilmbase_version_minor_string}") ++ STRING ( STRIP "${_ilmbase_version_minor_unstrip}" ILMBASE_VERSION_MINOR ) ++ ++ IF ( ILMBASE_NAMESPACE_VERSIONING ) ++ SET ( IEX_LIBRARY_NAME Iex-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} ) ++ SET ( IEXMATH_LIBRARY_NAME IexMath-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} ) ++ SET ( ILMTHREAD_LIBRARY_NAME IlmThread-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} ) ++ SET ( IMATH_LIBRARY_NAME Imath-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} ) ++ SET ( HALF_LIBRARY_NAME Half-${ILMBASE_VERSION_MAJOR}_${ILMBASE_VERSION_MINOR} ) ++ ELSE ( ILMBASE_NAMESPACE_VERSIONING ) ++ SET ( IEX_LIBRARY_NAME Iex ) ++ SET ( IEXMATH_LIBRARY_NAME IexMath ) ++ SET ( ILMTHREAD_LIBRARY_NAME IlmThread ) ++ SET ( IMATH_LIBRARY_NAME Imath ) ++ SET ( HALF_LIBRARY_NAME Half ) ++ ENDIF ( ILMBASE_NAMESPACE_VERSIONING ) ++ ++ SET ( ILMBASE_INCLUDE_DIRS ++ ${ILMBASE_LOCATION}/include ++ ${ILMBASE_LOCATION}/include/OpenEXR ++ CACHE STRING "ILMBase include directories") ++ SET ( ILMBASE_LIBRARYDIR ${ILMBASE_LOCATION}/lib ++ CACHE STRING "ILMBase library directories") ++ SET ( ILMBASE_FOUND TRUE ) ++ ++ SET ( ORIGINAL_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) ++ IF (Ilmbase_USE_STATIC_LIBS) ++ IF (APPLE) ++ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a") ++ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY Half PATHS ${ILMBASE_LIBRARYDIR} ) ++ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY Iex PATHS ${ILMBASE_LIBRARYDIR} ) ++ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY IlmThread PATHS ${ILMBASE_LIBRARYDIR} ) ++ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY Imath PATHS ${ILMBASE_LIBRARYDIR} ) ++ ELSEIF (WIN32) ++ # Link library ++ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib") ++ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY Half_static PATHS ${ILMBASE_LIBRARYDIR} ) ++ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY Iex_static PATHS ${ILMBASE_LIBRARYDIR} ) ++ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY IlmThread_static PATHS ${ILMBASE_LIBRARYDIR} ) ++ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY Imath_static PATHS ${ILMBASE_LIBRARYDIR} ) ++ ELSE (APPLE) ++ SET ( CMAKE_FIND_LIBRARY_SUFFIXES ".a") ++ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY Half PATHS ${ILMBASE_LIBRARYDIR} ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY Iex PATHS ${ILMBASE_LIBRARYDIR} ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY IlmThread PATHS ${ILMBASE_LIBRARYDIR} ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY Imath PATHS ${ILMBASE_LIBRARYDIR} ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ ENDIF (APPLE) ++ ELSE (Ilmbase_USE_STATIC_LIBS) ++ IF (APPLE) ++ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib") ++ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY Half PATHS ${ILMBASE_LIBRARYDIR} ) ++ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY Iex PATHS ${ILMBASE_LIBRARYDIR} ) ++ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY IlmThread PATHS ${ILMBASE_LIBRARYDIR} ) ++ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY Imath PATHS ${ILMBASE_LIBRARYDIR} ) ++ ELSEIF (WIN32) ++ # Link library ++ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib") ++ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY ${HALF_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ) ++ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY ${IEX_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ) ++ FIND_LIBRARY ( Ilmbase_IEXMATH_LIBRARY ${IEXMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ) ++ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY ${ILMTHREAD_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ) ++ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY ${IMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ) ++ # Load library ++ SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dll") ++ FIND_LIBRARY ( Ilmbase_HALF_DLL ${HALF_LIBRARY_NAME} PATHS ${ILMBASE_LOCATION}/bin ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ FIND_LIBRARY ( Ilmbase_IEX_DLL ${IEX_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ FIND_LIBRARY ( Ilmbase_IEXMATH_DLL ${IEXMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ FIND_LIBRARY ( Ilmbase_ILMTHREAD_DLL ${ILMTHREAD_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ FIND_LIBRARY ( Ilmbase_IMATH_DLL ${IMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ ELSE (APPLE) ++ FIND_LIBRARY ( Ilmbase_HALF_LIBRARY ${HALF_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ FIND_LIBRARY ( Ilmbase_IEX_LIBRARY ${IEX_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ FIND_LIBRARY ( Ilmbase_IEXMATH_LIBRARY ${IEXMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ FIND_LIBRARY ( Ilmbase_ILMTHREAD_LIBRARY ${ILMTHREAD_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ FIND_LIBRARY ( Ilmbase_IMATH_LIBRARY ${IMATH_LIBRARY_NAME} PATHS ${ILMBASE_LIBRARYDIR} ++ NO_DEFAULT_PATH ++ NO_SYSTEM_ENVIRONMENT_PATH ++ ) ++ ENDIF (APPLE) ++ ENDIF () ++ # MUST reset ++ SET(CMAKE_FIND_LIBRARY_SUFFIXES ${ORIGINAL_CMAKE_FIND_LIBRARY_SUFFIXES}) ++ ++ELSE ( ILMBASE_FOUND ) ++ MESSAGE ( FATAL_ERROR "Unable to find ILMBase, ILMBASE_ROOT = $ENV{ILMBASE_ROOT}") ++ENDIF ( ILMBASE_FOUND ) ++endif() +\ No newline at end of file +diff --git a/cmake/FindOpenEXR.cmake b/cmake/FindOpenEXR.cmake +index 3d243d0..a3340da 100644 +--- a/cmake/FindOpenEXR.cmake ++++ b/cmake/FindOpenEXR.cmake +@@ -80,6 +80,7 @@ may be provided to tell this module where to look. + + cmake_minimum_required(VERSION 3.3) + ++if(0) + # Monitoring _ROOT variables + if(POLICY CMP0074) + cmake_policy(SET CMP0074 NEW) +@@ -312,3 +313,92 @@ if(OpenEXR_FOUND) + elseif(OpenEXR_FIND_REQUIRED) + message(FATAL_ERROR "Unable to find OpenEXR") + endif() ++else() ++include(FindPackageHandleStandardArgs) ++ ++find_path(OpenEXR_INCLUDE_DIRS OpenEXR/OpenEXRConfig.h) ++find_path(OPENEXR_INCLUDE_PATHS NAMES ImfRgbaFile.h PATH_SUFFIXES OpenEXR) ++ ++file(STRINGS "${OpenEXR_INCLUDE_DIRS}/OpenEXR/OpenEXRConfig.h" OPENEXR_CONFIG_H) ++ ++string(REGEX REPLACE "^.*define OPENEXR_VERSION_MAJOR ([0-9]+).*$" "\\1" OpenEXR_VERSION_MAJOR "${OPENEXR_CONFIG_H}") ++string(REGEX REPLACE "^.*define OPENEXR_VERSION_MINOR ([0-9]+).*$" "\\1" OpenEXR_VERSION_MINOR "${OPENEXR_CONFIG_H}") ++set(OpenEXR_LIB_SUFFIX "${OpenEXR_VERSION_MAJOR}_${OpenEXR_VERSION_MINOR}") ++ ++include(SelectLibraryConfigurations) ++ ++if(NOT OpenEXR_BASE_LIBRARY) ++ find_library(OpenEXR_BASE_LIBRARY_RELEASE NAMES IlmImf-${OpenEXR_LIB_SUFFIX}) ++ find_library(OpenEXR_BASE_LIBRARY_DEBUG NAMES IlmImf-${OpenEXR_LIB_SUFFIX}_d) ++ select_library_configurations(OpenEXR_BASE) ++endif() ++ ++if(NOT OpenEXR_UTIL_LIBRARY) ++ find_library(OpenEXR_UTIL_LIBRARY_RELEASE NAMES IlmImfUtil-${OpenEXR_LIB_SUFFIX}) ++ find_library(OpenEXR_UTIL_LIBRARY_DEBUG NAMES IlmImfUtil-${OpenEXR_LIB_SUFFIX}_d) ++ select_library_configurations(OpenEXR_UTIL) ++endif() ++ ++if(NOT OpenEXR_HALF_LIBRARY) ++ find_library(OpenEXR_HALF_LIBRARY_RELEASE NAMES Half-${OpenEXR_LIB_SUFFIX}) ++ find_library(OpenEXR_HALF_LIBRARY_DEBUG NAMES Half-${OpenEXR_LIB_SUFFIX}_d) ++ select_library_configurations(OpenEXR_HALF) ++endif() ++ ++if(NOT OpenEXR_IEX_LIBRARY) ++ find_library(OpenEXR_IEX_LIBRARY_RELEASE NAMES Iex-${OpenEXR_LIB_SUFFIX}) ++ find_library(OpenEXR_IEX_LIBRARY_DEBUG NAMES Iex-${OpenEXR_LIB_SUFFIX}_d) ++ select_library_configurations(OpenEXR_IEX) ++endif() ++ ++if(NOT OpenEXR_MATH_LIBRARY) ++ find_library(OpenEXR_MATH_LIBRARY_RELEASE NAMES Imath-${OpenEXR_LIB_SUFFIX}) ++ find_library(OpenEXR_MATH_LIBRARY_DEBUG NAMES Imath-${OpenEXR_LIB_SUFFIX}_d) ++ select_library_configurations(OpenEXR_MATH) ++endif() ++ ++if(NOT OpenEXR_THREAD_LIBRARY) ++ find_library(OpenEXR_THREAD_LIBRARY_RELEASE NAMES IlmThread-${OpenEXR_LIB_SUFFIX}) ++ find_library(OpenEXR_THREAD_LIBRARY_DEBUG NAMES IlmThread-${OpenEXR_LIB_SUFFIX}_d) ++ select_library_configurations(OpenEXR_THREAD) ++endif() ++ ++if(NOT OpenEXR_IEXMATH_LIBRARY) ++ find_library(OpenEXR_IEXMATH_LIBRARY_RELEASE NAMES IexMath-${OpenEXR_LIB_SUFFIX}) ++ find_library(OpenEXR_IEXMATH_LIBRARY_DEBUG NAMES IexMath-${OpenEXR_LIB_SUFFIX}d) ++ select_library_configurations(OpenEXR_IEXMATH) ++endif() ++ ++set(OPENEXR_HALF_LIBRARY "${OpenEXR_HALF_LIBRARY}") ++set(OPENEXR_IEX_LIBRARY "${OpenEXR_IEX_LIBRARY}") ++set(OPENEXR_IMATH_LIBRARY "${OpenEXR_MATH_LIBRARY}") ++set(OPENEXR_ILMIMF_LIBRARY "${OpenEXR_BASE_LIBRARY}") ++set(OPENEXR_ILMIMFUTIL_LIBRARY "${OpenEXR_UTIL_LIBRARY}") ++set(OPENEXR_ILMTHREAD_LIBRARY "${OpenEXR_THREAD_LIBRARY}") ++ ++set(OpenEXR_LIBRARY "${OpenEXR_BASE_LIBRARY}") ++ ++set(OpenEXR_LIBRARIES ++ ${OpenEXR_LIBRARY} ++ ${OpenEXR_MATH_LIBRARY} ++ ${OpenEXR_IEXMATH_LIBRARY} ++ ${OpenEXR_UTIL_LIBRARY} ++ ${OpenEXR_HALF_LIBRARY} ++ ${OpenEXR_IEX_LIBRARY} ++ ${OpenEXR_THREAD_LIBRARY} ++) ++ ++set(OPENEXR_LIBRARIES ++ ${OPENEXR_HALF_LIBRARY} ++ ${OPENEXR_IEX_LIBRARY} ++ ${OPENEXR_IMATH_LIBRARY} ++ ${OPENEXR_ILMIMF_LIBRARY} ++ ${OPENEXR_ILMTHREAD_LIBRARY} ++) ++ ++FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenEXR REQUIRED_VARS OpenEXR_LIBRARIES OpenEXR_INCLUDE_DIRS) ++ ++if(OpenEXR_FOUND) ++ set(OPENEXR_FOUND 1) ++endif() ++endif() +\ No newline at end of file diff --git a/vcpkg/ports/openvdb/0003-fix-cmake.patch b/vcpkg/ports/openvdb/0003-fix-cmake.patch new file mode 100644 index 0000000..73adc91 --- /dev/null +++ b/vcpkg/ports/openvdb/0003-fix-cmake.patch @@ -0,0 +1,133 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d7c4ff8..123e50f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -302,7 +302,6 @@ if(OPENVDB_INSTALL_CMAKE_MODULES) + cmake/FindLog4cplus.cmake + cmake/FindOpenEXR.cmake + cmake/FindOpenVDB.cmake +- cmake/FindTBB.cmake + cmake/OpenVDBGLFW3Setup.cmake + cmake/OpenVDBHoudiniSetup.cmake + cmake/OpenVDBMayaSetup.cmake +diff --git a/cmake/FindOpenVDB.cmake b/cmake/FindOpenVDB.cmake +index 01a2f04..16b71bb 100644 +--- a/cmake/FindOpenVDB.cmake ++++ b/cmake/FindOpenVDB.cmake +@@ -299,7 +299,7 @@ endif() + # Add standard dependencies + + find_package(IlmBase REQUIRED COMPONENTS Half) +-find_package(TBB REQUIRED COMPONENTS tbb) ++find_package(TBB CONFIG REQUIRED) + find_package(ZLIB REQUIRED) + + if(NOT OPENVDB_USE_STATIC_LIBS) +diff --git a/openvdb/CMakeLists.txt b/openvdb/CMakeLists.txt +index 9501ff1..ab14fd9 100644 +--- a/openvdb/CMakeLists.txt ++++ b/openvdb/CMakeLists.txt +@@ -48,6 +48,7 @@ message(STATUS "----------------------------------------------------") + + # Collect and configure lib dependencies + ++if(0) + if(USE_EXR) + find_package(IlmBase ${MINIMUM_ILMBASE_VERSION} REQUIRED) + find_package(OpenEXR ${MINIMUM_OPENEXR_VERSION} REQUIRED) +@@ -76,6 +77,14 @@ if(OPENVDB_FUTURE_DEPRECATION AND FUTURE_MINIMUM_TBB_VERSION) + "is deprecated and will be removed.") + endif() + endif() ++endif() ++ ++if(USE_EXR) ++ find_package(IlmBase REQUIRED) ++ find_package(OpenEXR REQUIRED) ++else() ++ find_package(IlmBase REQUIRED COMPONENTS Half) ++endif() + + find_package(ZLIB ${MINIMUM_ZLIB_VERSION} REQUIRED) + +@@ -127,10 +136,10 @@ if(CONCURRENT_MALLOC STREQUAL "Jemalloc") + message(WARNING "Unable to find Jemalloc, attempting to fall back to TBB malloc. + It is recommended to use Jemalloc for optimum performance." + ) +- find_package(TBB ${MINIMUM_TBB_VERSION} REQUIRED COMPONENTS tbbmalloc tbbmalloc_proxy) ++ find_package(TBB CONFIG REQUIRED) + endif() + elseif(CONCURRENT_MALLOC STREQUAL "Tbbmalloc") +- find_package(TBB ${MINIMUM_TBB_VERSION} REQUIRED COMPONENTS tbbmalloc tbbmalloc_proxy) ++ find_package(TBB CONFIG REQUIRED) + endif() + + # Set deps. Note that the order here is important. If we're building against +@@ -142,15 +151,15 @@ endif() + set(OPENVDB_CORE_DEPENDENT_LIBS + Boost::iostreams + Boost::system +- IlmBase::Half ++ ${Ilmbase_HALF_LIBRARY} + ) + + if(USE_EXR) + list(APPEND OPENVDB_CORE_DEPENDENT_LIBS +- IlmBase::IlmThread +- IlmBase::Iex +- IlmBase::Imath +- OpenEXR::IlmImf ++ ${Ilmbase_ILMTHREAD_LIBRARY} ++ ${Ilmbase_IEX_LIBRARY} ++ ${Ilmbase_IMATH_LIBRARY} ++ ${OPENEXR_ILMIMF_LIBRARY} + ) + endif() + +@@ -162,7 +171,7 @@ endif() + # See FindOpenVDB.cmake + + if(USE_BLOSC) +- list(APPEND OPENVDB_CORE_DEPENDENT_LIBS Blosc::blosc) ++ list(APPEND OPENVDB_CORE_DEPENDENT_LIBS ${BLOSC_blosc_LIBRARY}) + endif() + + list(APPEND OPENVDB_CORE_DEPENDENT_LIBS +@@ -197,7 +206,11 @@ endif() + + # @todo Should be target definitions + if(WIN32) +- add_definitions(-D_WIN32 -DNOMINMAX -DOPENVDB_DLL) ++ add_definitions(-D_WIN32 -DNOMINMAX) ++ add_definitions(-D__TBB_NO_IMPLICIT_LINKAGE -D__TBBMALLOC_NO_IMPLICIT_LINKAGE) ++ if (OPENVDB_SHARED) ++ add_definitions(-DOPENEXR_DLL -DOPENVDB_DLL) ++ endif() + endif() + + ##### Core library configuration +@@ -415,6 +428,7 @@ if(USE_BLOSC) + list(APPEND OPENVDB_CORE_PRIVATE_DEFINES "-DOPENVDB_USE_BLOSC") + endif() + ++list(APPEND OPENVDB_CORE_PRIVATE_DEFINES "$<$:/bigobj>") + # Public defines + + if(USE_EXR) +diff --git a/openvdb/cmd/CMakeLists.txt b/openvdb/cmd/CMakeLists.txt +index 1e5ef0d..8e78efe 100644 +--- a/openvdb/cmd/CMakeLists.txt ++++ b/openvdb/cmd/CMakeLists.txt +@@ -133,9 +133,9 @@ if(OPENVDB_BUILD_VDB_RENDER) + # headers + + target_link_libraries(vdb_render +- OpenEXR::IlmImf +- IlmBase::IlmThread +- IlmBase::Iex ++ ${OPENEXR_ILMIMF_LIBRARY} ++ ${Ilmbase_ILMTHREAD_LIBRARY} ++ ${Ilmbase_IEX_LIBRARY} + ${OPENVDB_BINARIES_DEPENDENT_LIBS} + ) + diff --git a/vcpkg/ports/openvdb/CONTROL b/vcpkg/ports/openvdb/CONTROL new file mode 100644 index 0000000..c3e9a98 --- /dev/null +++ b/vcpkg/ports/openvdb/CONTROL @@ -0,0 +1,9 @@ +Source: openvdb +Version: 7.0.0 +Build-Depends: boost-ptr-container, openexr, tbb, blosc, boost-iostreams, boost-system, boost-thread, boost-date-time, boost-any, boost-uuid, boost-interprocess, ilmbase +Homepage: https://github.com/dreamworksanimation/openvdb +Description: Sparse volume data structure and tools + +Feature: tools +Description: OpenVDB utilities: view, print and render +Build-Depends: glew, glfw3 diff --git a/vcpkg/ports/openvdb/portfile.cmake b/vcpkg/ports/openvdb/portfile.cmake new file mode 100644 index 0000000..964088e --- /dev/null +++ b/vcpkg/ports/openvdb/portfile.cmake @@ -0,0 +1,72 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO AcademySoftwareFoundation/openvdb + REF c5e9e2944f085907e973b627843c49c838afe912 # v7.0.0 + SHA512 351611b04a192bcc501da599e55892a5dc7570dce6c0aea287d800612a20f6cb2a0d7825e062aa99f12bc2a968c51c7fe6af61badfdbd746edbd4e9fc9e4f2a4 + HEAD_REF master + PATCHES + 0001-remove-pkgconfig.patch + 0002-fix-cmake-modules.patch + 0003-fix-cmake.patch +) + +file(REMOVE ${SOURCE_PATH}/cmake/FindTBB.cmake) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(OPENVDB_STATIC ON) + set(OPENVDB_SHARED OFF) +else() + set(OPENVDB_STATIC OFF) + set(OPENVDB_SHARED ON) +endif() + +if ("tools" IN_LIST FEATURES) + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OPENVDB_BUILD_TOOLS ON) + else() + message(FATAL_ERROR "Unable to build tools if static libraries are required") + endif() +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DOPENVDB_BUILD_UNITTESTS=OFF + -DOPENVDB_BUILD_PYTHON_MODULE=OFF + -DOPENVDB_ENABLE_3_ABI_COMPATIBLE=OFF + -DUSE_GLFW3=ON + -DOPENVDB_CORE_STATIC=${OPENVDB_STATIC} + -DOPENVDB_CORE_SHARED=${OPENVDB_SHARED} + -DOPENVDB_BUILD_VDB_PRINT=${OPENVDB_BUILD_TOOLS} + -DOPENVDB_BUILD_VDB_VIEW=${OPENVDB_BUILD_TOOLS} + #-DOPENVDB_BUILD_VDB_RENDER=${OPENVDB_BUILD_TOOLS} # Enable vdb_render when https://github.com/openexr/openexr/issues/302 is fixed + -DOPENVDB_BUILD_VDB_LOD=${OPENVDB_BUILD_TOOLS} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/OpenVDB TARGET_PATH share/openvdb) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +if (OPENVDB_BUILD_TOOLS) + # copy tools to tools/openvdb directory + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}/) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vdb_print.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/vdb_print.exe) + #file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vdb_render.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/vdb_render.exe) + #file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vdb_view.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/vdb_view.exe) # vdb_view does not support win32 currently. + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vdb_lod.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/vdb_lod.exe) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + + # remove debug versions of tools + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vdb_print.exe) + #file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vdb_render.exe) + #file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vdb_view.exe) # vdb_view does not support win32 currently. + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/vdb_lod.exe) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/openvdb/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/openvpn3/CMakeLists.txt b/vcpkg/ports/openvpn3/CMakeLists.txt new file mode 100644 index 0000000..58514cb --- /dev/null +++ b/vcpkg/ports/openvpn3/CMakeLists.txt @@ -0,0 +1,34 @@ +cmake_minimum_required(VERSION 3.5) +project(openvpncli CXX) + +find_path(ASIO_HPP asio.hpp) +find_library(MBEDTLS_LIB mbedtls) +find_library(MBEDCRYPTO_LIB mbedcrypto) +find_library(MBEDX509_LIB mbedx509) + +include_directories(. ${ASIO_HPP}) + +if(WIN32) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") +endif() + +add_definitions(-DNOMINMAX -DUSE_ASIO -DUSE_MBEDTLS -D_WIN32_WINNT=0x0600) +if(LINUX) + add_compile_options(-include bits/endian.h) +endif() + +add_library(ovpncli client/ovpncli.cpp) +target_link_libraries(ovpncli PRIVATE Iphlpapi.lib Wininet.lib Setupapi.lib Cfgmgr32.lib Rpcrt4.lib Fwpuclnt.lib Wtsapi32.lib ${MBEDTLS_LIB} ${MBEDCRYPTO_LIB} ${MBEDX509_LIB}) + +install( + TARGETS ovpncli + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(BUILD_TOOL) + add_executable(cli test/ovpncli/cli.cpp) + target_compile_definitions(cli PRIVATE -DTAP_WIN_COMPONENT_ID=tap0901) + target_link_libraries(cli PRIVATE ovpncli) +endif() diff --git a/vcpkg/ports/openvpn3/CONTROL b/vcpkg/ports/openvpn3/CONTROL new file mode 100644 index 0000000..7ec0639 --- /dev/null +++ b/vcpkg/ports/openvpn3/CONTROL @@ -0,0 +1,4 @@ +Source: openvpn3 +Version: 3.4.1-1 +Build-Depends: asio, tap-windows6 (windows), mbedtls +Description: a C++ class library that implements the functionality of an OpenVPN client, and is protocol-compatible with the OpenVPN 2.x branch. diff --git a/vcpkg/ports/openvpn3/portfile.cmake b/vcpkg/ports/openvpn3/portfile.cmake new file mode 100644 index 0000000..fefa2cb --- /dev/null +++ b/vcpkg/ports/openvpn3/portfile.cmake @@ -0,0 +1,37 @@ +include(vcpkg_common_functions) + +set(VCPKG_LIBRARY_LINKAGE static) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OpenVPN/openvpn3 + REF release/3.4.1 + SHA512 2d0a7d2d48047c969ba1cb49b34d51c85dd82ae97296d7c096ead13a8e7cc69fa3908262228e29d93f60b7273814d8ef5a402a5d401cd7f91370868d5d308678 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(COPY ${SOURCE_PATH}/openvpn DESTINATION ${CURRENT_PACKAGES_DIR}/include/) +file(COPY ${SOURCE_PATH}/client/ovpncli.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include/openvpn/) + +file(GLOB_RECURSE HEADERS ${CURRENT_PACKAGES_DIR}/include/openvpn/*) +foreach(HEADER IN LISTS HEADERS) + file(READ "${HEADER}" _contents) + string(REPLACE "defined(USE_ASIO)" "1" _contents "${_contents}") + string(REPLACE "#ifdef USE_ASIO\n" "#if 1\n" _contents "${_contents}") + string(REPLACE "defined(USE_MBEDTLS)" "1" _contents "${_contents}") + string(REPLACE "#ifdef USE_MBEDTLS\n" "#if 1\n" _contents "${_contents}") + file(WRITE "${HEADER}" "${_contents}") +endforeach() + +file(INSTALL + ${SOURCE_PATH}/COPYRIGHT.AGPLV3 + DESTINATION ${CURRENT_PACKAGES_DIR}/share/openvpn3 RENAME copyright) diff --git a/vcpkg/ports/openvr/CONTROL b/vcpkg/ports/openvr/CONTROL new file mode 100644 index 0000000..bf99e39 --- /dev/null +++ b/vcpkg/ports/openvr/CONTROL @@ -0,0 +1,5 @@ +Source: openvr +Version: 1.12.5 +Homepage: https://github.com/ValveSoftware/openvr +Description: an API and runtime that allows access to VR hardware from multiple vendors without requiring that applications have specific knowledge of the hardware they are targeting. +Supports: !(arm|uwp|osx|android) \ No newline at end of file diff --git a/vcpkg/ports/openvr/portfile.cmake b/vcpkg/ports/openvr/portfile.cmake new file mode 100644 index 0000000..207bd0f --- /dev/null +++ b/vcpkg/ports/openvr/portfile.cmake @@ -0,0 +1,40 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp" "osx") +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ValveSoftware/openvr + REF 3a010f0f668d8de59fcba75b14e08a6a08ec68a0 # v1.12.5 + SHA512 a96b8d4bceb23cea64b8f276a4ec70a5ac2a09ec317da37561bf55527bbf3dda2423b4f7323ed93301384c387061498f6089ae1ef50ad6ff77f46f0af662ccd3 + HEAD_REF master +) + +if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(ARCH_PATH "win64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(ARCH_PATH "win32") + else() + message(FATAL_ERROR "Package only supports x64 and x86 Windows.") + endif() +elseif(VCPKG_TARGET_IS_LINUX) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(ARCH_PATH "linux64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(ARCH_PATH "linux32") + else() + message(FATAL_ERROR "Package only supports x64 and x86 Linux.") + endif() +else() + message(FATAL_ERROR "Package only supports Windows and Linux.") +endif() + +file(COPY ${SOURCE_PATH}/lib/${ARCH_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${SOURCE_PATH}/lib/${ARCH_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + +file(COPY ${SOURCE_PATH}/bin/${ARCH_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +file(COPY ${SOURCE_PATH}/bin/${ARCH_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + +file(INSTALL ${SOURCE_PATH}/headers DESTINATION ${CURRENT_PACKAGES_DIR} RENAME include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/openxr-loader/001-fix-array-decl.patch b/vcpkg/ports/openxr-loader/001-fix-array-decl.patch new file mode 100644 index 0000000..9bd25eb --- /dev/null +++ b/vcpkg/ports/openxr-loader/001-fix-array-decl.patch @@ -0,0 +1,26 @@ +--- openxr.hpp 2020-08-16 14:42:30.845279600 -0700 ++++ openxr.hpp 2020-08-16 14:45:19.707229200 -0700 +@@ -18249,9 +18249,9 @@ + public: + // ctor + SpatialGraphNodeSpaceCreateInfoMSFT ( +- const SpatialGraphNodeTypeMSFT& nodeType_ = {}, +- uint8_t nodeId[16]_ = 0, +- const Posef& pose_ = {} ++ const SpatialGraphNodeTypeMSFT& nodeType_, ++ uint8_t nodeId_[16], ++ const Posef& pose_ + ) + : + +@@ -18259,9 +18259,9 @@ + ) , + + nodeType {nodeType_} , +- nodeId {nodeId_} , + pose {pose_} + { ++ memcpy(nodeId, nodeId_, 16); + } + operator const XrSpatialGraphNodeSpaceCreateInfoMSFT&() const { return *reinterpret_cast(this); } + operator XrSpatialGraphNodeSpaceCreateInfoMSFT &() { diff --git a/vcpkg/ports/openxr-loader/CONTROL b/vcpkg/ports/openxr-loader/CONTROL new file mode 100644 index 0000000..451ffe0 --- /dev/null +++ b/vcpkg/ports/openxr-loader/CONTROL @@ -0,0 +1,8 @@ +Source: openxr-loader +Version: 1.0.11 +Description: Khronos API for abstracting VR/MR/AR hardware +Supports: !(arm|uwp) + +Feature: vulkan +Description: Vulkan functionality for OpenXR +Build-Depends: vulkan diff --git a/vcpkg/ports/openxr-loader/portfile.cmake b/vcpkg/ports/openxr-loader/portfile.cmake new file mode 100644 index 0000000..25c2dcb --- /dev/null +++ b/vcpkg/ports/openxr-loader/portfile.cmake @@ -0,0 +1,79 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KhronosGroup/OpenXR-SDK + REF e3a4e41d61544d8e2eba73f00da99b6818ec472b + SHA512 26c6b547aa30d89895efcc835dddc3b58ab57f0e450a4ae82655a990a816dd57c70e43267a10da75b1c2bd160189942e443c8e27367d6648417d1c9c134e7694 + HEAD_REF master +) + +vcpkg_from_github( + OUT_SOURCE_PATH SDK_SOURCE_PATH + REPO KhronosGroup/OpenXR-SDK-Source + REF 6dee6e228f47857adf5d7673eb90c64f04d33c60 + SHA512 0c522eef95b4d8bdc8e4f1ca852cd9798ff2bca9ef8511446d9cdf80bc314b0da454ab5c203658bbe43d3e7ff3d757b9427c3f75829b2a022a25041d1a2d2b12 + HEAD_REF master +) + +vcpkg_from_github( + OUT_SOURCE_PATH HPP_SOURCE_PATH + REPO KhronosGroup/OpenXR-hpp + REF 097a7535563fc84bb7648ea9c5a4531a1e909458 + SHA512 fe953405724e9c4a8218cd269a23317ebc8164330a519eb82de75e832bc05e2c51d24bca24e4ce13724bf275c33b26f6646e25f29eeffe6840ffc552f3351ad0 + HEAD_REF master +) + +# Weird behavior inside the OpenXR loader. On Windows they force shared libraries to use static crt, and +# vice-versa. Might be better in future iterations to patch the CMakeLists.txt for OpenXR +if (VCPKG_TARGET_IS_UWP OR VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(DYNAMIC_LOADER OFF) + set(VCPKG_CRT_LINKAGE dynamic) + else() + set(DYNAMIC_LOADER ON) + set(VCPKG_CRT_LINKAGE static) + endif() +endif() + +vcpkg_find_acquire_program(PYTHON3) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_API_LAYERS=OFF + -DBUILD_TESTS=OFF + -DBUILD_CONFORMANCE_TESTS=OFF + -DDYNAMIC_LOADER=${DYNAMIC_LOADER} + -DPYTHON_EXECUTABLE=${PYTHON3} +) + +vcpkg_install_cmake() + +set(ENV{OPENXR_REPO} ${SDK_SOURCE_PATH}) + +vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${HPP_SOURCE_PATH}/scripts/hpp_genxr.py -registry ${SDK_SOURCE_PATH}/specification/registry/xr.xml -o ${CURRENT_PACKAGES_DIR}/include/openxr openxr.hpp + WORKING_DIRECTORY ${HPP_SOURCE_PATH} + LOGFILE openxrhpp +) + +vcpkg_apply_patches( + SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include/openxr + PATCHES + 001-fix-array-decl.patch +) + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/OpenXR) +else(VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/openxr TARGET_PATH share/OpenXR) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/optional-bare/CONTROL b/vcpkg/ports/optional-bare/CONTROL new file mode 100644 index 0000000..0c9fe14 --- /dev/null +++ b/vcpkg/ports/optional-bare/CONTROL @@ -0,0 +1,3 @@ +Source: optional-bare +Version: 1.1.0 +Description: A simple version of a C++17-like optional for default-constructible, copyable types, for C++98 and later in a single-file header-only library diff --git a/vcpkg/ports/optional-bare/portfile.cmake b/vcpkg/ports/optional-bare/portfile.cmake new file mode 100644 index 0000000..6474d81 --- /dev/null +++ b/vcpkg/ports/optional-bare/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO martinmoene/optional-bare + REF v1.1.0 + SHA512 0eed103c4e909991b596c0cd23d6206662e3ca71cd8148e27c19d8e071c2a16e18cc940a6cd4f8571510f5e64577157f94c561fb889330bb7a868af64c2f3aa0 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DOPTIONAL_BARE_OPT_BUILD_TESTS=OFF + -DOPTIONAL_BARE_OPT_BUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets( + CONFIG_PATH lib/cmake/${PORT} +) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/lib +) + +file(INSTALL + ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright +) diff --git a/vcpkg/ports/optional-lite/CONTROL b/vcpkg/ports/optional-lite/CONTROL new file mode 100644 index 0000000..076a056 --- /dev/null +++ b/vcpkg/ports/optional-lite/CONTROL @@ -0,0 +1,3 @@ +Source: optional-lite +Version: 3.2.0 +Description: A C++17-like optional, a nullable object for C++98, C++11 and later in a single-file header-only library diff --git a/vcpkg/ports/optional-lite/portfile.cmake b/vcpkg/ports/optional-lite/portfile.cmake new file mode 100644 index 0000000..1716c89 --- /dev/null +++ b/vcpkg/ports/optional-lite/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO martinmoene/optional-lite + REF v3.2.0 + SHA512 7c3f93dc718953118ab18edb55f6c8dc1555febb6ee491d3f7df4a8d06aba245bbfba31883a711995bb6b8d6de9f44c805cbba44b9e322f3bb5c3272106f66ec +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DOPTIONAL_LITE_OPT_BUILD_TESTS=OFF + -DOPTIONAL_LITE_OPT_BUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets( + CONFIG_PATH lib/cmake/${PORT} +) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/lib +) + +file(INSTALL + ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright +) diff --git a/vcpkg/ports/opus/CONTROL b/vcpkg/ports/opus/CONTROL new file mode 100644 index 0000000..924e0dd --- /dev/null +++ b/vcpkg/ports/opus/CONTROL @@ -0,0 +1,8 @@ +Source: opus +Version: 1.3.1 +Port-Version: 5 +Homepage: https://github.com/xiph/opus +Description: Totally open, royalty-free, highly versatile audio codec + +Feature: avx +Description: Builds the library with avx instruction set diff --git a/vcpkg/ports/opus/portfile.cmake b/vcpkg/ports/opus/portfile.cmake new file mode 100644 index 0000000..b2e1e38 --- /dev/null +++ b/vcpkg/ports/opus/portfile.cmake @@ -0,0 +1,43 @@ +vcpkg_from_github( + OUT_SOURCE_PATH + SOURCE_PATH + REPO + xiph/opus + REF + 5c94ec3205c30171ffd01056f5b4622b7c0ab54c + SHA512 + 2423b1fc86d5b46c32d8e3bde5fc2b410a5c25c001995ce234a94a3a6c7a8b1446fdf19eafe9d6a8a7356fe0857697053db5eb8380d18f8111818aa770b4c4ea + HEAD_REF + master) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + avx AVX_SUPPORTED +) + +if(VCPKG_TARGET_IS_MINGW) + set(STACK_PROTECTOR OFF) + string(APPEND VCPKG_C_FLAGS "-D_FORTIFY_SOURCE=0") + string(APPEND VCPKG_CXX_FLAGS "-D_FORTIFY_SOURCE=0") +else() + set(STACK_PROTECTOR ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS ${FEATURE_OPTIONS} + -DOPUS_STACK_PROTECTOR=${STACK_PROTECTOR} + PREFER_NINJA) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Opus) +vcpkg_copy_pdbs() +vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m) + +file(INSTALL + ${SOURCE_PATH}/COPYING + DESTINATION + ${CURRENT_PACKAGES_DIR}/share/opus + RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake + ${CURRENT_PACKAGES_DIR}/lib/cmake + ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/vcpkg/ports/opusfile/CMakeLists.txt b/vcpkg/ports/opusfile/CMakeLists.txt new file mode 100644 index 0000000..ecef1d0 --- /dev/null +++ b/vcpkg/ports/opusfile/CMakeLists.txt @@ -0,0 +1,48 @@ +cmake_minimum_required(VERSION 3.4) +project(opusfile C) + +if(MSVC) +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4267 /wd4244 /wd4090") +endif() + +find_path(OGG_INCLUDE_DIR ogg/ogg.h) +find_library(OGG_LIBRARY ogg) + +find_path(OPUS_INCLUDE_DIR opus.h PATH_SUFFIXES opus) +find_library(OPUS_LIBRARY opus) + +add_library(opusfile + src/info.c + src/internal.c + src/opusfile.c + src/stream.c) + +target_include_directories(opusfile PRIVATE include PUBLIC ${OGG_INCLUDE_DIR} ${OPUS_INCLUDE_DIR}) +target_link_libraries(opusfile PRIVATE ${OGG_LIBRARY} ${OPUS_LIBRARY}) + +install(TARGETS opusfile + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +if(BUILD_OPUSURL) + find_package(OpenSSL MODULE REQUIRED) + + add_library(opusurl + src/http.c + src/wincerts.c) + + target_compile_definitions(opusurl PRIVATE OP_ENABLE_HTTP) + target_include_directories(opusurl PRIVATE include) + target_link_libraries(opusurl PRIVATE opusfile OpenSSL::SSL ws2_32.lib crypt32.lib) + + install(TARGETS opusurl + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) +endif() + +if(NOT OPUSFILE_SKIP_HEADERS) + install(FILES include/opusfile.h + DESTINATION include/opus) +endif() diff --git a/vcpkg/ports/opusfile/CONTROL b/vcpkg/ports/opusfile/CONTROL new file mode 100644 index 0000000..80ca95f --- /dev/null +++ b/vcpkg/ports/opusfile/CONTROL @@ -0,0 +1,10 @@ +Source: opusfile +Version: 0.11-3 +Homepage: https://github.com/xiph/opusfile +Description: Stand-alone decoder library for .opus streams +Build-Depends: libogg, opus +Supports: !uwp + +Feature: opusurl +Description: Support decoding of http(s) streams +Build-Depends: openssl diff --git a/vcpkg/ports/opusfile/portfile.cmake b/vcpkg/ports/opusfile/portfile.cmake new file mode 100644 index 0000000..aae9303 --- /dev/null +++ b/vcpkg/ports/opusfile/portfile.cmake @@ -0,0 +1,40 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "UWP builds not supported") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiph/opusfile + REF v0.11 + SHA512 b67976176ffacbeecacd00815877d1b332e149430b49f68d41d6a2f95e6d291e979214903314e14b4cc3f20e07ec8975b906f12f12aef8c786f74f6160d8791d + HEAD_REF master) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +if("opusurl" IN_LIST FEATURES) + set(BUILD_OPUSURL ON) +else() + set(BUILD_OPUSURL OFF) +endif() + +vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_OPUSURL=${BUILD_OPUSURL} + OPTIONS_DEBUG + -DOPUSFILE_SKIP_HEADERS=ON) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# make includes work with MSBuild integration +file(READ ${CURRENT_PACKAGES_DIR}/include/opus/opusfile.h OPUSFILE_H) + string(REPLACE "# include " "# include \"opus_multistream.h\"" OPUSFILE_H "${OPUSFILE_H}") +file(WRITE ${CURRENT_PACKAGES_DIR}/include/opus/opusfile.h "${OPUSFILE_H}") + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/opusfile) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/opusfile/COPYING ${CURRENT_PACKAGES_DIR}/share/opusfile/copyright) diff --git a/vcpkg/ports/orc/0003-dependencies-from-vcpkg.patch b/vcpkg/ports/orc/0003-dependencies-from-vcpkg.patch new file mode 100644 index 0000000..f753bbc --- /dev/null +++ b/vcpkg/ports/orc/0003-dependencies-from-vcpkg.patch @@ -0,0 +1,162 @@ +diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt +index 3d4a162..6926bc3 100644 +--- a/c++/src/CMakeLists.txt ++++ b/c++/src/CMakeLists.txt +@@ -230,12 +230,13 @@ endif(BUILD_LIBHDFSPP) + add_library (orc STATIC ${SOURCE_FILES}) + + target_link_libraries (orc +- protobuf +- zlib +- snappy +- lz4 +- zstd +- ${LIBHDFSPP_LIBRARIES} ++ PRIVATE ++ protobuf::libprotobuf ++ ZLIB::ZLIB ++ Snappy::snappy ++ lz4::lz4 ++ libzstd ++ ${LIBHDFSPP_LIBRARIES} + ) + + install(TARGETS orc DESTINATION lib) +diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake +index 3a35325..56ffd74 100644 +--- a/cmake_modules/ThirdpartyToolchain.cmake ++++ b/cmake_modules/ThirdpartyToolchain.cmake +@@ -59,8 +59,8 @@ endif () + # ---------------------------------------------------------------------- + # Snappy + +-if (NOT "${SNAPPY_HOME}" STREQUAL "") +- find_package (Snappy REQUIRED) ++if (1) ++ find_package (Snappy CONFIG REQUIRED) + set(SNAPPY_VENDORED FALSE) + else () + set(SNAPPY_HOME "${THIRDPARTY_DIR}/snappy_ep-install") +@@ -78,10 +78,6 @@ else () + set(SNAPPY_VENDORED TRUE) + endif () + +-include_directories (SYSTEM ${SNAPPY_INCLUDE_DIR}) +-add_library (snappy STATIC IMPORTED) +-set_target_properties (snappy PROPERTIES IMPORTED_LOCATION ${SNAPPY_STATIC_LIB}) +- + if (SNAPPY_VENDORED) + add_dependencies (snappy snappy_ep) + if (INSTALL_VENDORED_LIBS) +@@ -93,7 +89,7 @@ endif () + # ---------------------------------------------------------------------- + # ZLIB + +-if (NOT "${ZLIB_HOME}" STREQUAL "") ++if (1) + find_package (ZLIB REQUIRED) + set(ZLIB_VENDORED FALSE) + else () +@@ -120,10 +116,6 @@ else () + set(ZLIB_VENDORED TRUE) + endif () + +-include_directories (SYSTEM ${ZLIB_INCLUDE_DIR}) +-add_library (zlib STATIC IMPORTED) +-set_target_properties (zlib PROPERTIES IMPORTED_LOCATION ${ZLIB_STATIC_LIB}) +- + if (ZLIB_VENDORED) + add_dependencies (zlib zlib_ep) + if (INSTALL_VENDORED_LIBS) +@@ -135,8 +127,8 @@ endif () + # ---------------------------------------------------------------------- + # Zstd + +-if (NOT "${ZSTD_HOME}" STREQUAL "") +- find_package (ZSTD REQUIRED) ++if (1) ++ find_package (zstd CONFIG REQUIRED) + set(ZSTD_VENDORED FALSE) + else () + set(ZSTD_HOME "${THIRDPARTY_DIR}/zstd_ep-install") +@@ -169,10 +161,6 @@ else () + set(ZSTD_VENDORED TRUE) + endif () + +-include_directories (SYSTEM ${ZSTD_INCLUDE_DIR}) +-add_library (zstd STATIC IMPORTED) +-set_target_properties (zstd PROPERTIES IMPORTED_LOCATION ${ZSTD_STATIC_LIB}) +- + if (ZSTD_VENDORED) + add_dependencies (zstd zstd_ep) + if (INSTALL_VENDORED_LIBS) +@@ -184,8 +172,8 @@ endif () + # ---------------------------------------------------------------------- + # LZ4 + +-if (NOT "${LZ4_HOME}" STREQUAL "") +- find_package (LZ4 REQUIRED) ++if (1) ++ find_package (lz4 CONFIG REQUIRED) + set(LZ4_VENDORED FALSE) + else () + set(LZ4_PREFIX "${THIRDPARTY_DIR}/lz4_ep-install") +@@ -211,10 +199,6 @@ else () + set(LZ4_VENDORED TRUE) + endif () + +-include_directories (SYSTEM ${LZ4_INCLUDE_DIR}) +-add_library (lz4 STATIC IMPORTED) +-set_target_properties (lz4 PROPERTIES IMPORTED_LOCATION ${LZ4_STATIC_LIB}) +- + if (LZ4_VENDORED) + add_dependencies (lz4 lz4_ep) + if (INSTALL_VENDORED_LIBS) +@@ -288,8 +272,8 @@ endif () + # ---------------------------------------------------------------------- + # Protobuf + +-if (NOT "${PROTOBUF_HOME}" STREQUAL "") +- find_package (Protobuf REQUIRED) ++if (1) ++ find_package (Protobuf CONFIG REQUIRED) + set(PROTOBUF_VENDORED FALSE) + else () + set(PROTOBUF_PREFIX "${THIRDPARTY_DIR}/protobuf_ep-install") +@@ -327,12 +311,6 @@ endif () + + include_directories (SYSTEM ${PROTOBUF_INCLUDE_DIR}) + +-add_library (protobuf STATIC IMPORTED) +-set_target_properties (protobuf PROPERTIES IMPORTED_LOCATION ${PROTOBUF_STATIC_LIB}) +- +-add_library (protoc STATIC IMPORTED) +-set_target_properties (protoc PROPERTIES IMPORTED_LOCATION ${PROTOC_STATIC_LIB}) +- + if (PROTOBUF_VENDORED) + add_dependencies (protoc protobuf_ep) + add_dependencies (protobuf protobuf_ep) +diff --git a/tools/src/CMakeLists.txt b/tools/src/CMakeLists.txt +index f5a53ca..ec22e7a 100644 +--- a/tools/src/CMakeLists.txt ++++ b/tools/src/CMakeLists.txt +@@ -51,7 +51,6 @@ add_executable (orc-metadata + + target_link_libraries (orc-metadata + orc +- protobuf + ${CMAKE_THREAD_LIBS_INIT} + ) + +@@ -92,7 +91,7 @@ target_link_libraries (csv-import + ) + + install(TARGETS +- orc-contents +- orc-metadata +- orc-statistics +- DESTINATION bin) ++ orc-scan ++ orc-memory ++ csv-import ++ DESTINATION tools/orc) diff --git a/vcpkg/ports/orc/0005-disable-tzdata.patch b/vcpkg/ports/orc/0005-disable-tzdata.patch new file mode 100644 index 0000000..829bd18 --- /dev/null +++ b/vcpkg/ports/orc/0005-disable-tzdata.patch @@ -0,0 +1,30 @@ +diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt +index ea39023..599d79a 100644 +--- a/c++/test/CMakeLists.txt ++++ b/c++/test/CMakeLists.txt +@@ -67,6 +67,7 @@ target_link_libraries (create-test-files + protobuf + ) + ++if (ENABLE_TEST) + if (TEST_VALGRIND_MEMCHECK) + add_test (orc-test + valgrind --tool=memcheck --leak-check=full --error-exitcode=1 ./orc-test) +@@ -86,3 +87,4 @@ if (WIN32) + ENVIRONMENT "TZDIR=${TZDATA_DIR}" + ) + endif () ++endif() +diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake +index 3a35325..364470b 100644 +--- a/cmake_modules/ThirdpartyToolchain.cmake ++++ b/cmake_modules/ThirdpartyToolchain.cmake +@@ -226,7 +226,7 @@ endif () + # ---------------------------------------------------------------------- + # IANA - Time Zone Database + +-if (WIN32) ++if (WIN32 AND TEST_VALGRIND_MEMCHECK) + ExternalProject_Add(tzdata_ep + URL "ftp://cygwin.osuosl.org/pub/cygwin/noarch/release/tzdata/tzdata-2019b-1.tar.xz" + URL_HASH MD5=17D8AB346BB1009D4EB35BC08040E51D diff --git a/vcpkg/ports/orc/CONTROL b/vcpkg/ports/orc/CONTROL new file mode 100644 index 0000000..c3a1ff4 --- /dev/null +++ b/vcpkg/ports/orc/CONTROL @@ -0,0 +1,5 @@ +Source: orc +Version: 1.6.4 +Homepage: https://orc.apache.org/ +Build-Depends: zlib, protobuf, lz4, snappy, zstd, gtest +Description: The smallest, fastest columnar storage for Hadoop workloads. diff --git a/vcpkg/ports/orc/portfile.cmake b/vcpkg/ports/orc/portfile.cmake new file mode 100644 index 0000000..722b6a1 --- /dev/null +++ b/vcpkg/ports/orc/portfile.cmake @@ -0,0 +1,64 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO apache/orc + REF 23ecc03e87548f6d6783c2d8af2b46672c52214c # rel/release-1.6.4 + SHA512 907984c7e036ddaa90e7cbfabb9af4f6fd3520820b9a8732b304f2213030f7d67cef89ad87d50e028a51bff06f68ff359345ad6894850e299b2fca343d7c0c3e + HEAD_REF master + PATCHES + 0003-dependencies-from-vcpkg.patch + 0005-disable-tzdata.patch +) + +file(REMOVE "${SOURCE_PATH}/cmake_modules/FindGTest.cmake") +file(REMOVE "${SOURCE_PATH}/cmake_modules/FindLZ4.cmake") +file(REMOVE "${SOURCE_PATH}/cmake_modules/FindZSTD.cmake") +file(REMOVE "${SOURCE_PATH}/cmake_modules/FindProtobuf.cmake") +file(REMOVE "${SOURCE_PATH}/cmake_modules/FindSnappy.cmake") +file(REMOVE "${SOURCE_PATH}/cmake_modules/FindZLIB.cmake") + +if(CMAKE_HOST_WIN32) + set(PROTOBUF_EXECUTABLE ${CURRENT_INSTALLED_DIR}/tools/protobuf/protoc.exe) +else() + set(PROTOBUF_EXECUTABLE ${CURRENT_INSTALLED_DIR}/tools/protobuf/protoc) +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + set(BUILD_TOOLS OFF) +else() + set(BUILD_TOOLS ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TOOLS=${BUILD_TOOLS} + -DBUILD_CPP_TESTS=OFF + -DBUILD_JAVA=OFF + -DINSTALL_VENDORED_LIBS=OFF + -DBUILD_LIBHDFSPP=OFF + -DPROTOBUF_EXECUTABLE:FILEPATH=${PROTOBUF_EXECUTABLE} + -DSTOP_BUILD_ON_WARNING=OFF + -DENABLE_TEST=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(GLOB TOOLS ${CURRENT_PACKAGES_DIR}/bin/orc-*) +if(TOOLS) + file(COPY ${TOOLS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/orc) + file(REMOVE ${TOOLS}) +endif() + +file(GLOB BINS ${CURRENT_PACKAGES_DIR}/bin/*) +if(NOT BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/orc/usage b/vcpkg/ports/orc/usage new file mode 100644 index 0000000..b364b8b --- /dev/null +++ b/vcpkg/ports/orc/usage @@ -0,0 +1,11 @@ +The package orc does not provide CMake targets: + + find_package(protobuf CONFIG REQUIRED) + find_package(ZLIB REQUIRED) + find_package(Snappy CONFIG REQUIRED) + + find_library(LZ4_LIBRARY NAMES lz4d lz4) + find_library(ZSTD_LIBRARY NAMES zstd) + find_library(ORC_LIBRARY NAMES orc) + + target_link_libraries(main PRIVATE ${ORC_LIBRARY} protobuf::libprotoc protobuf::libprotobuf Snappy::snappy ${LZ4_LIBRARY} ${ZSTD_LIBRARY} ZLIB::ZLIB) diff --git a/vcpkg/ports/orocos-kdl/CONTROL b/vcpkg/ports/orocos-kdl/CONTROL new file mode 100644 index 0000000..1270962 --- /dev/null +++ b/vcpkg/ports/orocos-kdl/CONTROL @@ -0,0 +1,6 @@ +Source: orocos-kdl +Version: 1.4 +Port-Version: 3 +Homepage: https://github.com/orocos/orocos_kinematics_dynamics +Description: Kinematics and Dynamics Library +Build-Depends: eigen3 diff --git a/vcpkg/ports/orocos-kdl/portfile.cmake b/vcpkg/ports/orocos-kdl/portfile.cmake new file mode 100644 index 0000000..8044d3e --- /dev/null +++ b/vcpkg/ports/orocos-kdl/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO orocos/orocos_kinematics_dynamics + REF v1.4.0 + SHA512 7156465e2aff02f472933617512069355836a03a02d4587cfe03c1b1d667a9762a4e3ed6e055b2a44f1fce1b6746179203c7204389626a7b458dcab1b28930d8 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/orocos_kdl + 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() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/orocos_kdl/cmake TARGET_PATH share/orocos_kdl) + +file(READ ${CURRENT_PACKAGES_DIR}/share/orocos_kdl/orocos_kdl-config.cmake _contents) +string(REPLACE "\${CMAKE_CURRENT_LIST_DIR}/../../.." "\${CMAKE_CURRENT_LIST_DIR}/../.." _contents "${_contents}") +string(REPLACE "\${_IMPORT_PREFIX}" "\${CMAKE_CURRENT_LIST_DIR}/../.." _contents "${_contents}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/orocos_kdl/orocos_kdl-config.cmake "${_contents}") + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/share/doc + ${CURRENT_PACKAGES_DIR}/doc/liborocos-kdl) + +file(INSTALL ${SOURCE_PATH}/orocos_kdl/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# Post-build test for cmake libraries +# vcpkg_test_cmake(PACKAGE_NAME orocos-kdl) diff --git a/vcpkg/ports/osg-qt/CONTROL b/vcpkg/ports/osg-qt/CONTROL new file mode 100644 index 0000000..da3776a --- /dev/null +++ b/vcpkg/ports/osg-qt/CONTROL @@ -0,0 +1,4 @@ +Source: osg-qt +Version: Qt4-2 +Description: osgQt - Qt project for making use of OpenSceneGraph(OSG) +Build-Depends: osg, protobuf, qt5-base[core] \ No newline at end of file diff --git a/vcpkg/ports/osg-qt/OsgMacroUtils.patch b/vcpkg/ports/osg-qt/OsgMacroUtils.patch new file mode 100644 index 0000000..96f040c --- /dev/null +++ b/vcpkg/ports/osg-qt/OsgMacroUtils.patch @@ -0,0 +1,11 @@ +--- a/CMakeModules/OsgMacroUtils.cmake ++++ b/CMakeModules/OsgMacroUtils.cmake +@@ -88,7 +88,7 @@ MACRO(LINK_CORELIB_DEFAULT CORELIB_NAME) + ENDIF() + + LINK_EXTERNAL(${CORELIB_NAME} ${ALL_GL_LIBRARIES}) +- LINK_WITH_VARIABLES(${CORELIB_NAME} OPENTHREADS_LIBRARY) ++ #LINK_WITH_VARIABLES(${CORELIB_NAME} OPENTHREADS_LIBRARY) + IF(OPENSCENEGRAPH_SONAMES) + SET_TARGET_PROPERTIES(${CORELIB_NAME} PROPERTIES VERSION ${OPENSCENEGRAPH_VERSION} SOVERSION ${OPENSCENEGRAPH_SOVERSION}) + ENDIF(OPENSCENEGRAPH_SONAMES) diff --git a/vcpkg/ports/osg-qt/portfile.cmake b/vcpkg/ports/osg-qt/portfile.cmake new file mode 100644 index 0000000..7d002fc --- /dev/null +++ b/vcpkg/ports/osg-qt/portfile.cmake @@ -0,0 +1,37 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO openscenegraph/osgQt + REF Qt4 + SHA512 426a4ba88f680978d24817248b99c68cafa4517144e6e3d2480612870c4a224bb955539cacb438274d4ee1c93c36d94f8437d142070b2ecde2b81517bf357e71 + HEAD_REF master + PATCHES + OsgMacroUtils.patch +) + +if(VCPKG_TARGET_IS_OSX) + string(APPEND VCPKG_CXX_FLAGS " -stdlib=libc++") + string(APPEND VCPKG_C_FLAGS "") # both must be set +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OPTIONS -DDYNAMIC_OPENSCENEGRAPH=ON) +else() + set(OPTIONS -DDYNAMIC_OPENSCENEGRAPH=OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${OPTIONS} + -DBUILD_OSG_EXAMPLES=OFF + -DOSG_BUILD_APPLICATION_BUNDLES=OFF +) + +vcpkg_install_cmake() + +#Debug +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle License +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) \ No newline at end of file diff --git a/vcpkg/ports/osg/CONTROL b/vcpkg/ports/osg/CONTROL new file mode 100644 index 0000000..95e8396 --- /dev/null +++ b/vcpkg/ports/osg/CONTROL @@ -0,0 +1,28 @@ +Source: osg +Version: 3.6.5 +Port-Version: 1 +Homepage: https://github.com/openscenegraph/OpenSceneGraph +Description: The OpenSceneGraph is an open source high performance 3D graphics toolkit. +Build-Depends: zlib, fontconfig, boost-asio (!windows), boost-core (!windows), boost-logic (!windows), boost-lexical-cast (!windows), boost-smart-ptr (!windows), boost-tuple (!windows), boost-bind (!windows), freeglut (windows), expat (windows), openimageio (osx) + +Feature: collada +Description: Support for Collada (.dae) files +Build-Depends: collada-dom + +Feature: tools +Description: Enable to build OSG Applications (e.g. osgviewer) +Build-Depends: freetype, sdl1, curl, libjpeg-turbo, libpng, libiconv (windows) + +Feature: examples +Description: Enable to build OSG Examples +Build-Depends: freetype, sdl1, sdl2, libiconv (windows) + +Feature: plugins +Description: Build OSG Plugins - Disable for compile testing examples on a time limit +Build-Depends: freetype, sdl1, curl, openexr, ilmbase, gdal, giflib (windows), jasper, libjpeg-turbo, libpng, tiff, libxml2 (windows), libiconv (windows), libgta, liblas, nvtt + +Feature: packages +Description: Set to ON to generate CPack configuration files and packaging targets + +Feature: docs +Description: Build OpenSceneGraph reference documentation using doxygen (use: make doc_openscenegraph doc_openthreads diff --git a/vcpkg/ports/osg/collada.patch b/vcpkg/ports/osg/collada.patch new file mode 100644 index 0000000..80b2606 --- /dev/null +++ b/vcpkg/ports/osg/collada.patch @@ -0,0 +1,126 @@ +diff --git a/CMakeModules/FindCOLLADA.cmake b/CMakeModules/FindCOLLADA.cmake +index 7c7d290..5b456d7 100644 +--- a/CMakeModules/FindCOLLADA.cmake ++++ b/CMakeModules/FindCOLLADA.cmake +@@ -29,10 +29,7 @@ IF(APPLE) + ELSEIF(MINGW) + SET(COLLADA_BUILDNAME "mingw") + SET(COLLADA_BOOST_BUILDNAME ${COLLADA_BUILDNAME}) +-ELSEIF((MSVC_VERSION GREATER 1910) OR (MSVC_VERSION EQUAL 1910)) +- SET(COLLADA_BUILDNAME "vc14") +- SET(COLLADA_BOOST_BUILDNAME "vc141") +-ELSEIF(MSVC_VERSION EQUAL 1900) ++ELSEIF(MSVC_VERSION GREATER_EQUAL 1900) + SET(COLLADA_BUILDNAME "vc14") + SET(COLLADA_BOOST_BUILDNAME "vc140") + ELSEIF(MSVC_VERSION EQUAL 1800) +@@ -61,6 +58,7 @@ ENDIF() + + + FIND_PATH(COLLADA_INCLUDE_DIR dae.h ++ PATHS + ${COLLADA_DOM_ROOT}/include + $ENV{COLLADA_DIR}/include + $ENV{COLLADA_DIR} +@@ -68,27 +66,19 @@ FIND_PATH(COLLADA_INCLUDE_DIR dae.h + /Library/Frameworks + /opt/local/Library/Frameworks #macports + /usr/local/include +- /usr/local/include/colladadom +- /usr/local/include/collada-dom +- /usr/local/include/collada-dom2.5 +- /usr/local/include/collada-dom2.4 +- /usr/local/include/collada-dom2.2 +- /opt/local/include/collada-dom +- /opt/local/include/collada-dom2.5 +- /opt/local/include/collada-dom2.4 +- /opt/local/include/collada-dom2.2 + /usr/include/ +- /usr/include/colladadom +- /usr/include/collada-dom +- /usr/include/collada-dom2.5 +- /usr/include/collada-dom2.4 +- /usr/include/collada-dom2.2 + /sw/include # Fink + /opt/local/include # DarwinPorts + /opt/csw/include # Blastwave + /opt/include + /usr/freeware/include + ${ACTUAL_3DPARTY_DIR}/include ++ PATH_SUFFIXES ++ colladadom ++ collada-dom ++ collada-dom2.5 ++ collada-dom2.4 ++ collada-dom2.2 + ) + + FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY +@@ -116,7 +106,7 @@ FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY + ) + + FIND_LIBRARY(COLLADA_DYNAMIC_LIBRARY_DEBUG +- NAMES collada_dom-d collada14dom-d Collada14Dom-d libcollada14dom21-d libcollada14dom22-d collada-dom2.5-dp-d collada-dom2.5-dp-${COLLADA_BOOST_BUILDNAME}-mt-d collada-dom2.4-dp-d collada-dom2.4-dp-${COLLADA_BOOST_BUILDNAME}-mt-d ++ NAMES collada_dom-d collada14dom-d Collada14Dom-d libcollada14dom21-d libcollada14dom22-d collada-dom2.5-dp-d collada-dom2.5-dp-${COLLADA_BOOST_BUILDNAME}-mt-d collada-dom2.4-dp-d collada-dom2.4-dp-${COLLADA_BOOST_BUILDNAME}-mt-d collada-dom2.5-dp-${COLLADA_BOOST_BUILDNAME}-mt + PATHS + ${COLLADA_DOM_ROOT}/build/${COLLADA_BUILDNAME}-1.4-d + ${COLLADA_DOM_ROOT} +@@ -279,7 +269,7 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG + ) + + FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY +- NAMES libboost_filesystem boost_filesystem boost_filesystem-mt libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_54 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_55 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_58 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_62 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_63 ++ NAMES libboost_filesystem boost_filesystem boost_filesystem-mt libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_54 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_55 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_58 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_62 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-1_63 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt + PATHS + ${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME} + ${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw +@@ -287,7 +277,7 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG + ) + + FIND_LIBRARY(COLLADA_BOOST_FILESYSTEM_LIBRARY_DEBUG +- NAMES libboost_filesystem-d boost_filesystem-d boost_filesystem-mt-d libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_54 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_55 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_58 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_62 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_63 ++ NAMES libboost_filesystem-d boost_filesystem-d boost_filesystem-mt-d libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_54 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_55 libboost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_58 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_62 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_63 boost_filesystem-${COLLADA_BOOST_BUILDNAME}-mt-gd + PATHS + ${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME} + ${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw +@@ -295,7 +285,7 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG + ) + + FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY +- NAMES libboost_system boost_system boost_system-mt libboost_system-${COLLADA_BOOST_BUILDNAME}-mt libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_54 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_55 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_58 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_62 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_63 ++ NAMES libboost_system boost_system boost_system-mt libboost_system-${COLLADA_BOOST_BUILDNAME}-mt libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_54 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_55 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_58 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_62 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-1_63 boost_system-${COLLADA_BOOST_BUILDNAME}-mt + PATHS + ${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME} + ${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw +@@ -303,7 +293,7 @@ FIND_LIBRARY(COLLADA_STATIC_LIBRARY_DEBUG + ) + + FIND_LIBRARY(COLLADA_BOOST_SYSTEM_LIBRARY_DEBUG +- NAMES libboost_system-d boost_system-d boost_system-mt-d libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_54 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_55 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_58 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_62 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_63 ++ NAMES libboost_system-d boost_system-d boost_system-mt-d libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_54 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_55 libboost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_58 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_62 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd-1_63 boost_system-${COLLADA_BOOST_BUILDNAME}-mt-gd + PATHS + ${COLLADA_DOM_ROOT}/external-libs/boost/lib/${COLLADA_BUILDNAME} + ${COLLADA_DOM_ROOT}/external-libs/boost/lib/mingw +@@ -329,5 +319,3 @@ IF(COLLADA_DYNAMIC_LIBRARY OR COLLADA_STATIC_LIBRARY) + + ENDIF() + ENDIF() +- +- + +diff --git a/src/osgPlugins/dae/CMakeLists.txt b/src/osgPlugins/dae/CMakeLists.txt +index af03fb866..7eadfc2f3 100644 +--- a/src/osgPlugins/dae/CMakeLists.txt ++++ b/src/osgPlugins/dae/CMakeLists.txt +@@ -49,7 +49,9 @@ ELSE() + ENDIF() + + ADD_DEFINITIONS(-DNO_BOOST) +-ADD_DEFINITIONS(-DCOLLADA_DOM_SUPPORT141) ++ADD_DEFINITIONS(-DCOLLADA_DOM_USING_141 ++ -DCOLLADA_DOM_SUPPORT141 ++ -DCOLLADA_DOM_SUPPORT150) + + IF (COLLADA_DOM_2_4_OR_LATER) + ADD_DEFINITIONS(-DCOLLADA_DOM_2_4_OR_LATER) + diff --git a/vcpkg/ports/osg/disable-present3d-staticview-in-linux.patch b/vcpkg/ports/osg/disable-present3d-staticview-in-linux.patch new file mode 100644 index 0000000..fd76db3 --- /dev/null +++ b/vcpkg/ports/osg/disable-present3d-staticview-in-linux.patch @@ -0,0 +1,36 @@ +diff --git a/applications/CMakeLists.txt b/applications/CMakeLists.txt +index ab491c6..bee3d1f 100644 +--- a/applications/CMakeLists.txt ++++ b/applications/CMakeLists.txt +@@ -32,12 +32,16 @@ IF(DYNAMIC_OPENSCENEGRAPH) + ADD_SUBDIRECTORY(osgconv) + ADD_SUBDIRECTORY(osgfilecache) + ADD_SUBDIRECTORY(osgversion) +- ADD_SUBDIRECTORY(present3D) ++ if (NOT UNIX) ++ ADD_SUBDIRECTORY(present3D) ++ endif() + ELSE() + # need to define this on win32 or linker cries about _declspecs + ADD_DEFINITIONS(-DOSG_LIBRARY_STATIC) + + ADD_SUBDIRECTORY(osgversion) +- ADD_SUBDIRECTORY(present3D) ++ if (NOT UNIX) ++ ADD_SUBDIRECTORY(present3D) ++ endif() + ENDIF() + +diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt +index 788e507..3c550bc 100644 +--- a/examples/CMakeLists.txt ++++ b/examples/CMakeLists.txt +@@ -245,7 +245,7 @@ ELSE(DYNAMIC_OPENSCENEGRAPH) + + IF(OSG_BUILD_PLATFORM_IPHONE) + ADD_SUBDIRECTORY(osgviewerIPhone) +- ELSE() ++ ELSEIF (NOT UNIX) + ADD_SUBDIRECTORY(osgstaticviewer) + ENDIF() + diff --git a/vcpkg/ports/osg/fix-builderror-with-libtiff.patch b/vcpkg/ports/osg/fix-builderror-with-libtiff.patch new file mode 100644 index 0000000..d3a938e --- /dev/null +++ b/vcpkg/ports/osg/fix-builderror-with-libtiff.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeModules/OsgAndroidMacroUtils.cmake b/CMakeModules/OsgAndroidMacroUtils.cmake +index 50c22e0..8e79b09 100644 +--- a/CMakeModules/OsgAndroidMacroUtils.cmake ++++ b/CMakeModules/OsgAndroidMacroUtils.cmake +@@ -118,7 +118,7 @@ MACRO(ANDROID_3RD_PARTY) + #set(ENV{AND_OSG_LIB_PATHS} "$ENV{AND_OSG_LIB_PATHS}include ${TIFF_INCLUDE_DIR}/Android.mk \n") + if(TIFF_INCLUDE_DIR) + message(STATUS "TIF found ${TIFF_INCLUDE_DIR}" ) +- set(TIFF_FOUND "Yes") ++ #set(TIFF_FOUND "Yes") + install(DIRECTORY 3rdparty/build/libtiff/ DESTINATION ./ ) + else(TIFF_INCLUDE_DIR) + message(STATUS "TIF missing" ) +diff --git a/src/osgPlugins/CMakeLists.txt b/src/osgPlugins/CMakeLists.txt +index 77d66f8..1504bf9 100644 +--- a/src/osgPlugins/CMakeLists.txt ++++ b/src/osgPlugins/CMakeLists.txt +@@ -115,7 +115,7 @@ IF(PNG_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE) + ADD_PLUGIN_DIRECTORY(png) + ENDIF() + IF(TIFF_FOUND AND OSG_CPP_EXCEPTIONS_AVAILABLE) +- ADD_PLUGIN_DIRECTORY(tiff) ++ #ADD_PLUGIN_DIRECTORY(tiff) + ENDIF() + IF(GDAL_FOUND) + ADD_PLUGIN_DIRECTORY(gdal) diff --git a/vcpkg/ports/osg/fix-curl.patch b/vcpkg/ports/osg/fix-curl.patch new file mode 100644 index 0000000..e95fbee --- /dev/null +++ b/vcpkg/ports/osg/fix-curl.patch @@ -0,0 +1,18 @@ +diff --git a/src/osgPlugins/curl/CMakeLists.txt b/src/osgPlugins/curl/CMakeLists.txt +index cc459ff..370dbec 100644 +--- a/src/osgPlugins/curl/CMakeLists.txt ++++ b/src/osgPlugins/curl/CMakeLists.txt +@@ -23,11 +23,11 @@ SET(TARGET_H + + IF(ZLIB_FOUND) + SET(TARGET_LIBRARIES_VARS +- CURL_LIBRARY ++ CURL_LIBRARIES + ZLIB_LIBRARIES) + ELSE() + SET(TARGET_LIBRARIES_VARS +- CURL_LIBRARY) ++ CURL_LIBRARIES) + ENDIF() + + IF(WIN32 OR MINGW) diff --git a/vcpkg/ports/osg/fix-example-application.patch b/vcpkg/ports/osg/fix-example-application.patch new file mode 100644 index 0000000..4745f8b --- /dev/null +++ b/vcpkg/ports/osg/fix-example-application.patch @@ -0,0 +1,34 @@ +diff --git a/applications/present3D/CMakeLists.txt b/applications/present3D/CMakeLists.txt +index df859d0..123313a 100644 +--- a/applications/present3D/CMakeLists.txt ++++ b/applications/present3D/CMakeLists.txt +@@ -103,6 +103,11 @@ ENDIF() + IF (WIN32) + # to support cluster code + SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES} ws2_32) ++ ++ find_package(EXPAT REQUIRED) ++ find_package(unofficial-iconv CONFIG REQUIRED) ++ ++ list(APPEND TARGET_EXTERNAL_LIBRARIES EXPAT::EXPAT unofficial::iconv::libiconv unofficial::iconv::libcharset) + ELSE() + CHECK_LIBRARY_EXISTS("nsl" "gethostbyname" "" LIB_NSL_HAS_GETHOSTBYNAME) + IF(LIB_NSL_HAS_GETHOSTBYNAME) +diff --git a/examples/osgstaticviewer/CMakeLists.txt b/examples/osgstaticviewer/CMakeLists.txt +index 071ab26..bf8d85f 100644 +--- a/examples/osgstaticviewer/CMakeLists.txt ++++ b/examples/osgstaticviewer/CMakeLists.txt +@@ -19,6 +19,13 @@ IF(FREETYPE_FOUND) + SET(TARGET_ADDED_LIBRARIES ${TARGET_ADDED_LIBRARIES} osgdb_freetype) + ENDIF(FREETYPE_FOUND) + ++IF (WIN32) ++ find_package(EXPAT REQUIRED) ++ find_package(unofficial-iconv CONFIG REQUIRED) ++ ++ list(APPEND TARGET_EXTERNAL_LIBRARIES EXPAT::EXPAT unofficial::iconv::libiconv unofficial::iconv::libcharset) ++ENDIF() ++ + SET(TARGET_SRC osgstaticviewer.cpp ) + #### end var setup ### + SETUP_EXAMPLE(osgstaticviewer) diff --git a/vcpkg/ports/osg/fix-liblas.patch b/vcpkg/ports/osg/fix-liblas.patch new file mode 100644 index 0000000..c36396e --- /dev/null +++ b/vcpkg/ports/osg/fix-liblas.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b84fa06..a991670 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -765,7 +765,10 @@ ELSE() + ENDIF() + FIND_PACKAGE(ZeroConf) + +- FIND_PACKAGE(LIBLAS) ++ FIND_PACKAGE(liblas CONFIG) ++ set(LIBLAS_FOUND ${liblas_FOUND}) ++ set(LIBLAS_LIBRARY liblas) ++ set(LIBLASC_LIBRARY liblas_c) + + IF (NOT(OSG_USE_LOCAL_LUA_SOURCE)) + FIND_PACKAGE(Lua52) diff --git a/vcpkg/ports/osg/fix-nvtt.patch b/vcpkg/ports/osg/fix-nvtt.patch new file mode 100644 index 0000000..3cc1c4d --- /dev/null +++ b/vcpkg/ports/osg/fix-nvtt.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a991670..5b530c5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -759,7 +759,9 @@ ELSE() + FIND_PACKAGE(RSVG) + FIND_PACKAGE(GtkGl) + FIND_PACKAGE(DirectInput) ++ if (ENABLE_NVTT) + FIND_PACKAGE(NVTT) ++ endif() + IF (NOT WIN32) + FIND_PACKAGE(Asio) + ENDIF() diff --git a/vcpkg/ports/osg/fix-sdl.patch b/vcpkg/ports/osg/fix-sdl.patch new file mode 100644 index 0000000..e97d864 --- /dev/null +++ b/vcpkg/ports/osg/fix-sdl.patch @@ -0,0 +1,37 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 81328ea..c735419 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -755,8 +755,6 @@ ELSE() + FIND_PACKAGE(GStreamer COMPONENTS app pbutils) + FIND_PACKAGE(GLIB COMPONENTS gobject) + FIND_PACKAGE(DirectShow) +- FIND_PACKAGE(SDL2) +- FIND_PACKAGE(SDL) + FIND_PACKAGE(Poppler-glib) + FIND_PACKAGE(RSVG) + FIND_PACKAGE(GtkGl) +@@ -775,6 +773,10 @@ ELSE() + FIND_PACKAGE(Lua51) + ENDIF() + ENDIF() ++ ++ find_package(SDL) ++ find_package(SDL2 CONFIG) ++ set(SDL2_LIBRARY SDL2::SDL2 SDL2::SDL2main) + + # V8 and Python plugins are tests for linking against these libraries but aren't functionality beyond this. + # FIND_PACKAGE(V8) +diff --git a/examples/osgmovie/osgmovie.cpp b/examples/osgmovie/osgmovie.cpp +index 9de15b1..ae96e11 100644 +--- a/examples/osgmovie/osgmovie.cpp ++++ b/examples/osgmovie/osgmovie.cpp +@@ -691,7 +691,7 @@ int main(int argc, char** argv) + + #if USE_SDL || USE_SDL2 + +-#include "SDL.h" ++#include + + static void soundReadCallback(void * user_data, uint8_t * data, int datalen) + { diff --git a/vcpkg/ports/osg/portfile.cmake b/vcpkg/ports/osg/portfile.cmake new file mode 100644 index 0000000..3323591 --- /dev/null +++ b/vcpkg/ports/osg/portfile.cmake @@ -0,0 +1,138 @@ +set(OSG_VER 3.6.5) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO openscenegraph/OpenSceneGraph + REF OpenSceneGraph-${OSG_VER} + SHA512 7002fa30a3bcf6551d2e1050b4ca75a3736013fd190e4f50953717406864da1952deb09f530bc8c5ddf6e4b90204baec7dbc283f497829846d46d561f66feb4b + HEAD_REF master + PATCHES + collada.patch + static.patch + fix-sdl.patch + fix-example-application.patch + disable-present3d-staticview-in-linux.patch #Due to some link error we cannot solve yet, disable them in linux. + fix-curl.patch + remove-prefix.patch # Remove this patch when cmake fix Findosg_functions.cmake + fix-liblas.patch + fix-nvtt.patch + use-boost-asio.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(OSG_DYNAMIC OFF) +else() + set(OSG_DYNAMIC ON) +endif() + +file(REMOVE ${SOURCE_PATH}/CMakeModules/FindSDL2.cmake) + +set(OSG_USE_UTF8_FILENAME ON) +if (NOT VCPKG_TARGET_IS_WINDOWS) + message("Build osg requires gcc with version higher than 4.7.") + # Enable OSG_USE_UTF8_FILENAME will call some windows-only functions. + set(OSG_USE_UTF8_FILENAME OFF) +endif() + +set(OPTIONS) +if(NOT "collada" IN_LIST FEATURES) + list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_COLLADA=ON) +endif() +list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_FFmpeg=ON) +list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_DCMTK=ON) +list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_GStreamer=ON) +list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_GLIB=ON) +list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_SDL=ON) +list(APPEND OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_LIBLAS=ON) + +# Due to nvtt CRT linkage error, we can only enable static builds here +set(ENABLE_NVTT ON) +if (VCPKG_TARGET_IS_WINDOWS AND OSG_DYNAMIC) + set(ENABLE_NVTT OFF) +endif() +list(APPEND OPTIONS -DENABLE_NVTT=${ENABLE_NVTT}) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tools BUILD_OSG_APPLICATIONS + examples BUILD_OSG_EXAMPLES + plugins BUILD_OSG_PLUGINS + packages BUILD_OSG_PACKAGES + docs BUILD_DOCUMENTATION + docs BUILD_REF_DOCS_SEARCHENGINE + docs BUILD_REF_DOCS_TAGFILE +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS ${FEATURE_OPTIONS} + -DOSG_USE_UTF8_FILENAME=${OSG_USE_UTF8_FILENAME} + -DDYNAMIC_OPENSCENEGRAPH=${OSG_DYNAMIC} + -DDYNAMIC_OPENTHREADS=${OSG_DYNAMIC} + -DBUILD_DASHBOARD_REPORTS=OFF + -DCMAKE_CXX_STANDARD=11 + ${OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +# handle osg tools and plugins +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +set(OSG_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +file(GLOB OSG_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +if (OSG_TOOLS) + file(MAKE_DIRECTORY ${OSG_TOOL_PATH}) + file(COPY ${OSG_TOOLS} DESTINATION ${OSG_TOOL_PATH}) + file(REMOVE_RECURSE ${OSG_TOOLS}) + file(GLOB OSG_TOOLS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + file(REMOVE_RECURSE ${OSG_TOOLS_DBG}) +endif() +file(GLOB OSG_TOOLS ${CURRENT_PACKAGES_DIR}/share/OpenSceneGraph/bin/*${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +if (OSG_TOOLS) + file(COPY ${OSG_TOOLS} DESTINATION ${OSG_TOOL_PATH}) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/OpenSceneGraph) +endif() + + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(GLOB OSG_PLUGINS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-${OSG_VER}/*) + if (OSG_PLUGINS_DBG) + file(COPY ${OSG_PLUGINS_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/osgPlugins-${OSG_VER}) + endif() + file(GLOB OSG_PLUGINS_REL ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-${OSG_VER}/*) + if (OSG_PLUGINS_REL) + if (NOT EXISTS ${OSG_TOOL_PATH}) + file(MAKE_DIRECTORY ${OSG_TOOL_PATH}) + endif() + file(COPY ${OSG_PLUGINS_REL} DESTINATION ${OSG_TOOL_PATH}/osgPlugins-${OSG_VER}) + endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-${OSG_VER}/ ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-${OSG_VER}/) +endif() + +file(GLOB OSG_PLUGINS_DBG ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-${OSG_VER}/*) +if (OSG_PLUGINS_DBG) + file(COPY ${OSG_PLUGINS_DBG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}/osgPlugins-${OSG_VER}) +endif() + +file(GLOB OSG_PLUGINS_REL ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-${OSG_VER}/*) +if (OSG_PLUGINS_REL) + if (NOT EXISTS ${OSG_TOOL_PATH}) + file(MAKE_DIRECTORY ${OSG_TOOL_PATH}) + endif() + file(COPY ${OSG_PLUGINS_REL} DESTINATION ${OSG_TOOL_PATH}/osgPlugins-${OSG_VER}) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-${OSG_VER}/ ${CURRENT_PACKAGES_DIR}/debug/bin/osgPlugins-${OSG_VER}/) + +#Cleanup +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/osgPlugins-${OSG_VER}/) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/osg/remove-prefix.patch b/vcpkg/ports/osg/remove-prefix.patch new file mode 100644 index 0000000..ced9452 --- /dev/null +++ b/vcpkg/ports/osg/remove-prefix.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeModules/ModuleInstall.cmake b/CMakeModules/ModuleInstall.cmake +index bb3be63..356edcd 100644 +--- a/CMakeModules/ModuleInstall.cmake ++++ b/CMakeModules/ModuleInstall.cmake +@@ -21,7 +21,7 @@ SOURCE_GROUP( + FILES ${TARGET_H} + ) + +-IF(MSVC AND OSG_MSVC_VERSIONED_DLL) ++IF(0) + HANDLE_MSVC_DLL() + ENDIF() + +diff --git a/src/OpenThreads/win32/CMakeLists.txt b/src/OpenThreads/win32/CMakeLists.txt +index 84550bd..0e816f7 100644 +--- a/src/OpenThreads/win32/CMakeLists.txt ++++ b/src/OpenThreads/win32/CMakeLists.txt +@@ -39,7 +39,7 @@ LINK_DIRECTORIES( + ${CMAKE_CURRENT_BINARY_DIR} + ) + +-IF(MSVC AND OSG_MSVC_VERSIONED_DLL) ++IF(0) + HANDLE_MSVC_DLL(ot ${OPENTHREADS_SOVERSION}) + ENDIF() + diff --git a/vcpkg/ports/osg/static.patch b/vcpkg/ports/osg/static.patch new file mode 100644 index 0000000..c7278d2 --- /dev/null +++ b/vcpkg/ports/osg/static.patch @@ -0,0 +1,7 @@ +--- a/src/osgPlugins/curl/CMakeLists.txt ++++ b/src/osgPlugins/curl/CMakeLists.txt +@@ -35,3 +35,3 @@ + ADD_DEFINITIONS(-DCURL_STATICLIB) +- SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES} ws2_32 winmm wldap32) ++ SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES} ws2_32 winmm wldap32 crypt32) + ENDIF() diff --git a/vcpkg/ports/osg/use-boost-asio.patch b/vcpkg/ports/osg/use-boost-asio.patch new file mode 100644 index 0000000..4d80497 --- /dev/null +++ b/vcpkg/ports/osg/use-boost-asio.patch @@ -0,0 +1,92 @@ +diff --git a/CMakeModules/FindAsio.cmake b/CMakeModules/FindAsio.cmake +index 433d5c7..04a0edf 100644 +--- a/CMakeModules/FindAsio.cmake ++++ b/CMakeModules/FindAsio.cmake +@@ -1,22 +1,7 @@ + # Locate ASIO-headers (http://think-async.com/Asio) +-# This module defines +-# ASIO_FOUND, if false, do not try to link to gdal +-# ASIO_INCLUDE_DIR, where to find the headers +-# + # Created by Stephan Maximilian Huber + +-FIND_PATH(ASIO_INCLUDE_DIR +- NAMES +- asio.hpp +- PATHS +- /usr/include +- /usr/local/include +-) +- +-SET(ASIO_FOUND "NO") +-IF(ASIO_INCLUDE_DIR) +- FIND_PACKAGE( Boost 1.37 ) +- IF(Boost_FOUND) +- SET(ASIO_FOUND "YES") +- ENDIF() ++FIND_PACKAGE( Boost 1.37 COMPONENTS asio ) ++IF(Boost_FOUND) ++ SET(ASIO_FOUND "YES") + ENDIF() +diff --git a/src/osgPlugins/RestHttpDevice/CMakeLists.txt b/src/osgPlugins/RestHttpDevice/CMakeLists.txt +index 8464b9d..073e8ed 100644 +--- a/src/osgPlugins/RestHttpDevice/CMakeLists.txt ++++ b/src/osgPlugins/RestHttpDevice/CMakeLists.txt +@@ -1,5 +1,4 @@ + INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) +-INCLUDE_DIRECTORIES(${ASIO_INCLUDE_DIR}) + + SET(TARGET_SRC + connection.cpp +diff --git a/src/osgPlugins/RestHttpDevice/connection.hpp b/src/osgPlugins/RestHttpDevice/connection.hpp +index 99f3a93..b205759 100644 +--- a/src/osgPlugins/RestHttpDevice/connection.hpp ++++ b/src/osgPlugins/RestHttpDevice/connection.hpp +@@ -11,7 +11,7 @@ + #ifndef HTTP_SERVER_CONNECTION_HPP + #define HTTP_SERVER_CONNECTION_HPP + +-#include ++#include + #include + #include + #include +diff --git a/src/osgPlugins/RestHttpDevice/io_service_pool.hpp b/src/osgPlugins/RestHttpDevice/io_service_pool.hpp +index 1d363a8..b6e7195 100644 +--- a/src/osgPlugins/RestHttpDevice/io_service_pool.hpp ++++ b/src/osgPlugins/RestHttpDevice/io_service_pool.hpp +@@ -11,7 +11,7 @@ + #ifndef HTTP_SERVER_IO_SERVICE_POOL_HPP + #define HTTP_SERVER_IO_SERVICE_POOL_HPP + +-#include ++#include + #include + #include + #include +diff --git a/src/osgPlugins/RestHttpDevice/reply.hpp b/src/osgPlugins/RestHttpDevice/reply.hpp +index 89f264a..b63d0b9 100644 +--- a/src/osgPlugins/RestHttpDevice/reply.hpp ++++ b/src/osgPlugins/RestHttpDevice/reply.hpp +@@ -13,7 +13,7 @@ + + #include + #include +-#include ++#include + #include "header.hpp" + + namespace http { +diff --git a/src/osgPlugins/RestHttpDevice/server.hpp b/src/osgPlugins/RestHttpDevice/server.hpp +index a14f263..91c4b62 100644 +--- a/src/osgPlugins/RestHttpDevice/server.hpp ++++ b/src/osgPlugins/RestHttpDevice/server.hpp +@@ -11,7 +11,7 @@ + #ifndef HTTP_SERVER_SERVER_HPP + #define HTTP_SERVER_SERVER_HPP + +-#include ++#include + #include + #include + #include diff --git a/vcpkg/ports/osgearth/CONTROL b/vcpkg/ports/osgearth/CONTROL new file mode 100644 index 0000000..781ae1b --- /dev/null +++ b/vcpkg/ports/osgearth/CONTROL @@ -0,0 +1,6 @@ +Source: osgearth +Version: 3.0 +Port-Version: 1 +Homepage: https://github.com/gwaldron/osgearth +Description: osgEarth - Dynamic map generation toolkit for OpenSceneGraph Copyright 2015 Pelican Mapping. +Build-Depends: osg[plugins] diff --git a/vcpkg/ports/osgearth/RocksDB.patch b/vcpkg/ports/osgearth/RocksDB.patch new file mode 100644 index 0000000..c73cdad --- /dev/null +++ b/vcpkg/ports/osgearth/RocksDB.patch @@ -0,0 +1,79 @@ +diff --git a/CMakeModules/FindRocksDB.cmake b/CMakeModules/FindRocksDB.cmake +index b0692b0..984d3f2 100644 +--- a/CMakeModules/FindRocksDB.cmake ++++ b/CMakeModules/FindRocksDB.cmake +@@ -39,5 +39,49 @@ find_package_handle_standard_args(ROCKSDB + "Could NOT find ROCKSDB" + ) + ++if(ROCKSDB_FOUND) ++ FIND_PACKAGE(ZLIB REQUIRED) ++ ++ include(SelectLibraryConfigurations) ++ # Find Snappy library ++ find_library(SNAPPY_LIBRARY_DEBUG NAMES snappyd) ++ find_library(SNAPPY_LIBRARY_RELEASE NAMES snappy) ++ select_library_configurations(SNAPPY) ++ find_package_handle_standard_args(SNAPPY ++ FOUND_VAR ++ SNAPPY_FOUND ++ REQUIRED_VARS ++ SNAPPY_LIBRARY ++ FAIL_MESSAGE ++ "Could NOT find SNAPPY" ++ ) ++ ++ # Find LZ4 library ++ find_library(LZ4_LIBRARY_DEBUG NAMES lz4d) ++ find_library(LZ4_LIBRARY_RELEASE NAMES lz4) ++ select_library_configurations(LZ4) ++ find_package_handle_standard_args(LZ4 ++ FOUND_VAR ++ LZ4_FOUND ++ REQUIRED_VARS ++ LZ4_LIBRARY ++ FAIL_MESSAGE ++ "Could NOT find LZ4" ++ ) ++ ++ # Find ZSTD library ++ find_library(ZSTD_LIBRARY_DEBUG NAMES zstdd) ++ find_library(ZSTD_LIBRARY_RELEASE NAMES zstd) ++ select_library_configurations(ZSTD) ++ find_package_handle_standard_args(ZSTD ++ FOUND_VAR ++ ZSTD_FOUND ++ REQUIRED_VARS ++ ZSTD_LIBRARY ++ FAIL_MESSAGE ++ "Could NOT find ZSTD_" ++ ) ++endif(ROCKSDB_FOUND) ++ + set(ROCKSDB_INCLUDE_DIRS ${ROCKSDB_INCLUDE_DIR} ) + set(ROCKSDB_LIBRARIES ${ROCKSDB_LIBRARY}) +diff --git a/src/osgEarthDrivers/cache_rocksdb/CMakeLists.txt b/src/osgEarthDrivers/cache_rocksdb/CMakeLists.txt +index ecaac34..b4ec764 100644 +--- a/src/osgEarthDrivers/cache_rocksdb/CMakeLists.txt ++++ b/src/osgEarthDrivers/cache_rocksdb/CMakeLists.txt +@@ -34,7 +34,19 @@ IF(ROCKSDB_FOUND OR RocksDB_FOUND) + RocksDBCacheDriver.cpp + ) + +- SET(TARGET_LIBRARIES_VARS ROCKSDB_LIBRARY ZLIB_LIBRARY) ++ if(SNAPPY_FOUND) ++ SET(ROCKSDB_DEPENDENT_LIBRARY ${ROCKSDB_DEPENDENT_LIBRARY} ${SNAPPY_LIBRARY}) ++ endif(SNAPPY_FOUND) ++ ++ if(LZ4_FOUND) ++ SET(ROCKSDB_DEPENDENT_LIBRARY ${ROCKSDB_DEPENDENT_LIBRARY} ${LZ4_LIBRARY}) ++ endif(LZ4_FOUND) ++ ++ if(ZSTD_FOUND) ++ SET(ROCKSDB_DEPENDENT_LIBRARY ${ROCKSDB_DEPENDENT_LIBRARY} ${ZSTD_LIBRARY}) ++ endif(ZSTD_FOUND) ++ ++ SET(TARGET_LIBRARIES_VARS ROCKSDB_LIBRARY ZLIB_LIBRARY ROCKSDB_DEPENDENT_LIBRARY) + + IF(MSVC) + SET(TARGET_EXTERNAL_LIBRARIES ws2_32 winmm rpcrt4 shlwapi) diff --git a/vcpkg/ports/osgearth/portfile.cmake b/vcpkg/ports/osgearth/portfile.cmake new file mode 100644 index 0000000..5dc2109 --- /dev/null +++ b/vcpkg/ports/osgearth/portfile.cmake @@ -0,0 +1,63 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) + +file(GLOB OSG_PLUGINS_SUBDIR ${CURRENT_INSTALLED_DIR}/tools/osg/osgPlugins-*) +list(LENGTH OSG_PLUGINS_SUBDIR OSG_PLUGINS_SUBDIR_LENGTH) +if(NOT OSG_PLUGINS_SUBDIR_LENGTH EQUAL 1) + message(FATAL_ERROR "Could not determine osg version") +endif() +string(REPLACE "${CURRENT_INSTALLED_DIR}/tools/osg/" "" OSG_PLUGINS_SUBDIR "${OSG_PLUGINS_SUBDIR}") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO gwaldron/osgearth + REF dc73ac92b19fff1427414cfb981b6018c0ed88a1 #version 3.0 + SHA512 86c287a75946b902c05897d3952c9ff201853599d52023c7b2c850f2253b7e738c4b54ac7ae947bf0909b3aaf074bdb1472f4e92c59cd919458933a72fd13b80 + HEAD_REF master + PATCHES + RocksDB.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +#Release +set(OSGEARTH_TOOL_PATH ${CURRENT_PACKAGES_DIR}/tools/${PORT}) +set(OSGEARTH_TOOL_PLUGIN_PATH ${OSGEARTH_TOOL_PATH}/${OSG_PLUGINS_SUBDIR}) + +file(MAKE_DIRECTORY ${OSGEARTH_TOOL_PATH}) +file(MAKE_DIRECTORY ${OSGEARTH_TOOL_PLUGIN_PATH}) + +file(GLOB OSGEARTH_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(GLOB OSGDB_PLUGINS ${CURRENT_PACKAGES_DIR}/bin/osgdb*.dll) + +file(COPY ${OSGEARTH_TOOLS} DESTINATION ${OSGEARTH_TOOL_PATH}) +file(COPY ${OSGDB_PLUGINS} DESTINATION ${OSGEARTH_TOOL_PLUGIN_PATH}) + +file(REMOVE_RECURSE ${OSGEARTH_TOOLS}) +file(REMOVE_RECURSE ${OSGDB_PLUGINS}) + +#Debug +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +set(OSGEARTH_DEBUG_TOOL_PATH ${CURRENT_PACKAGES_DIR}/debug/tools/${PORT}) +set(OSGEARTH_DEBUG_TOOL_PLUGIN_PATH ${OSGEARTH_DEBUG_TOOL_PATH}/${OSG_PLUGINS_SUBDIR}) + +file(MAKE_DIRECTORY ${OSGEARTH_DEBUG_TOOL_PATH}) +file(MAKE_DIRECTORY ${OSGEARTH_DEBUG_TOOL_PLUGIN_PATH}) + +file(GLOB OSGEARTH_DEBUG_TOOLS ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +file(GLOB OSGDB_DEBUG_PLUGINS ${CURRENT_PACKAGES_DIR}/debug/bin/osgdb*.dll) + +file(COPY ${OSGEARTH_DEBUG_TOOLS} DESTINATION ${OSGEARTH_DEBUG_TOOL_PATH}) +file(COPY ${OSGDB_DEBUG_PLUGINS} DESTINATION ${OSGEARTH_DEBUG_TOOL_PLUGIN_PATH}) + +file(REMOVE_RECURSE ${OSGEARTH_DEBUG_TOOLS}) +file(REMOVE_RECURSE ${OSGDB_DEBUG_PLUGINS}) + + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/osi/CMakeLists.txt b/vcpkg/ports/osi/CMakeLists.txt new file mode 100644 index 0000000..0542339 --- /dev/null +++ b/vcpkg/ports/osi/CMakeLists.txt @@ -0,0 +1,89 @@ +cmake_minimum_required(VERSION 3.11) + +project(Osi LANGUAGES C CXX) + +set(PROJECT_VERSION 0.107.9) +set(PROJECT_VERSION_MAJOR 0) +set(PROJECT_VERSION_MINOR 107) +set(PROJECT_VERSION_PATCH 9) + +set(CMAKE_CXX_STANDARD 14) + +set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed") +set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed") +set(INSTALL_INCLUDE_DIR "include/Coin" CACHE PATH "Path where headers will be installed") +set(INSTALL_CMAKE_DIR "share/osi" CACHE PATH "Path where cmake configs will be installed") + +# Make relative paths absolute (needed later on) +set(RELATIVE_INSTALL_INCLUDE_DIR ${INSTALL_INCLUDE_DIR}) +foreach(p LIB BIN INCLUDE CMAKE) + set(var INSTALL_${p}_DIR) + if(NOT IS_ABSOLUTE "${${var}}") + set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}") + endif() +endforeach() + +if(MSVC) + set( + CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} /bigobj /MP /wd4996 /wd4819 /wd4251 /wd4267 /wd4244 /wd4275" + ) +endif() + +if(APPLE) + set( + CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -Wno-inconsistent-missing-override -Wno-unused-command-line-argument -Wno-unused-result -Wno-exceptions" + ) + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" + CACHE STRING "Minimum OS X deployment version") +endif() + +find_package(CoinUtils REQUIRED) + +file(GLOB OSI_SOURCES Osi/src/Osi/*.hpp Osi/src/Osi/*.cpp) + +add_library(${PROJECT_NAME} ${OSI_SOURCES}) + +target_include_directories(${PROJECT_NAME} PUBLIC $ $) + +if(MSVC) + target_compile_definitions(${PROJECT_NAME} PRIVATE _CRT_SECURE_NO_WARNINGS) +endif() +target_compile_definitions(${PROJECT_NAME} PRIVATE HAVE_CMATH) + +target_link_libraries(${PROJECT_NAME} PRIVATE Coin::CoinUtils) + +install(DIRECTORY Osi/src/Osi/ + DESTINATION ${INSTALL_INCLUDE_DIR} + FILES_MATCHING + PATTERN "*.h" + PATTERN "*.hpp" + PATTERN "config_default.h" EXCLUDE) + +install(TARGETS ${PROJECT_NAME} + EXPORT "${PROJECT_NAME}Targets" + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin) + +include(CMakePackageConfigHelpers) + +set(version_config "${CMAKE_CURRENT_BINARY_DIR}/temp/${PROJECT_NAME}ConfigVersion.cmake") +set(project_config "${CMAKE_CURRENT_BINARY_DIR}/temp/${PROJECT_NAME}Config.cmake") +set(namespace "Coin::") + +write_basic_package_version_file("${version_config}" + COMPATIBILITY SameMajorVersion) + +configure_package_config_file("Config.cmake.in" + "${project_config}" + INSTALL_DESTINATION + "${INSTALL_CMAKE_DIR}") + +install(FILES "${project_config}" "${version_config}" + DESTINATION "${INSTALL_CMAKE_DIR}") + +install(EXPORT "${PROJECT_NAME}Targets" + NAMESPACE "${namespace}" + DESTINATION "${INSTALL_CMAKE_DIR}") diff --git a/vcpkg/ports/osi/CONTROL b/vcpkg/ports/osi/CONTROL new file mode 100644 index 0000000..5057f15 --- /dev/null +++ b/vcpkg/ports/osi/CONTROL @@ -0,0 +1,4 @@ +Source: osi +Version: 0.108.6 +Description: Osi (Open Solver Interface) provides an abstract base class to a generic linear programming (LP) solver, along with derived classes for specific solvers. Many applications may be able to use the Osi to insulate themselves from a specific LP solver. +Build-Depends: coinutils diff --git a/vcpkg/ports/osi/Config.cmake.in b/vcpkg/ports/osi/Config.cmake.in new file mode 100644 index 0000000..2c12f83 --- /dev/null +++ b/vcpkg/ports/osi/Config.cmake.in @@ -0,0 +1,5 @@ + +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") +check_required_components("@PROJECT_NAME@") diff --git a/vcpkg/ports/osi/portfile.cmake b/vcpkg/ports/osi/portfile.cmake new file mode 100644 index 0000000..399381d --- /dev/null +++ b/vcpkg/ports/osi/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO coin-or/Osi + REF dfa6449d6756fdd96912cf96e168d0be07b1d37c # releases/0.108.6 + SHA512 8c23998a3f442766c515acd5549ed97608b972de61b9ef5b50b9e5d1d03b43fb5f77dc02d3562084fbf4f18f3397f9cd50c0f9bde4f576a4dff0dab795c04358 +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/osi RENAME copyright) diff --git a/vcpkg/ports/otl/CONTROL b/vcpkg/ports/otl/CONTROL new file mode 100644 index 0000000..6b6bfe5 --- /dev/null +++ b/vcpkg/ports/otl/CONTROL @@ -0,0 +1,4 @@ +Source: otl +Version: 4.0.455 +Description: Oracle, Odbc and DB2-CLI Template Library +Homepage: http://otl.sourceforge.net/ diff --git a/vcpkg/ports/otl/portfile.cmake b/vcpkg/ports/otl/portfile.cmake new file mode 100644 index 0000000..82a289a --- /dev/null +++ b/vcpkg/ports/otl/portfile.cmake @@ -0,0 +1,21 @@ +set(OTL_VERSION 40455) + +vcpkg_download_distfile(ARCHIVE + URLS "http://otl.sourceforge.net/otlv4_${OTL_VERSION}.zip" + FILENAME "otlv4_${OTL_VERSION}.zip" + SHA512 2d5c52af3eafdd93bf7c651de218607b8985acc1fce279d48d9bf58ecf8a012332c8d0b9a33223a6449f343134211e2d7c5412b71efb36ba484bda754e1afc45 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL +) + +file(INSTALL "${SOURCE_PATH}/otlv${OTL_VERSION}.h" + DESTINATION "${CURRENT_PACKAGES_DIR}/include/${PORT}" + RENAME otlv4.h) + +file(INSTALL "${SOURCE_PATH}/otlv${OTL_VERSION}.h" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright) diff --git a/vcpkg/ports/outcome/CONTROL b/vcpkg/ports/outcome/CONTROL new file mode 100644 index 0000000..449485e --- /dev/null +++ b/vcpkg/ports/outcome/CONTROL @@ -0,0 +1,4 @@ +Source: outcome +Version: 2.1.3 +Homepage: https://github.com/ned14/outcome +Description: Provides very lightweight outcome and result (non-Boost edition) diff --git a/vcpkg/ports/outcome/portfile.cmake b/vcpkg/ports/outcome/portfile.cmake new file mode 100644 index 0000000..0d1223f --- /dev/null +++ b/vcpkg/ports/outcome/portfile.cmake @@ -0,0 +1,13 @@ +# header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ned14/outcome + REF 34f3bd55e2bcaf246cb79efe64a5600e89b91b66 #v2.1.3 + SHA512 83eba50e2095e7c768dacb3af5f82db117c3451f1d5bc2f73d716608d56f7b73006ec33d0f3842fdefd076f0e82b72ece5777868712f75e83eac93aa8adf351c + HEAD_REF develop +) + +file(GLOB_RECURSE OUTCOME_HEADERS "${SOURCE_PATH}/single-header/*.hpp") +file(INSTALL ${OUTCOME_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${SOURCE_PATH}/Licence.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/p-ranav-csv/CONTROL b/vcpkg/ports/p-ranav-csv/CONTROL new file mode 100644 index 0000000..6ab672e --- /dev/null +++ b/vcpkg/ports/p-ranav-csv/CONTROL @@ -0,0 +1,4 @@ +Source: p-ranav-csv +Version: 2019-07-11 +Description: [deprecated] CSV for modern C++ +Homepage: https://github.com/p-ranav/csv diff --git a/vcpkg/ports/p-ranav-csv/portfile.cmake b/vcpkg/ports/p-ranav-csv/portfile.cmake new file mode 100644 index 0000000..1238424 --- /dev/null +++ b/vcpkg/ports/p-ranav-csv/portfile.cmake @@ -0,0 +1,25 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO p-ranav/csv + REF 13e04e5b31b585855c7d7e7f3c65e47ae863569b + SHA512 ddcdc7af68a0dabb2b7e15822f5900461b9f424ff5e0ac6cafd2454c2f21ca97785ef09ddb805a92e2452fe14c14167c762a822a8af6c5b86446f67e7f3f71bd + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCSV_BUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/p-ranav-csv2/CONTROL b/vcpkg/ports/p-ranav-csv2/CONTROL new file mode 100644 index 0000000..349d7df --- /dev/null +++ b/vcpkg/ports/p-ranav-csv2/CONTROL @@ -0,0 +1,4 @@ +Source: p-ranav-csv2 +Version: 2020-06-02 +Homepage: https://github.com/p-ranav/csv2 +Description: CSV for modern C++ diff --git a/vcpkg/ports/p-ranav-csv2/portfile.cmake b/vcpkg/ports/p-ranav-csv2/portfile.cmake new file mode 100644 index 0000000..32942c9 --- /dev/null +++ b/vcpkg/ports/p-ranav-csv2/portfile.cmake @@ -0,0 +1,25 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO p-ranav/csv2 + REF d659f90b637bb0de6c32246583fc4bb7caade215 + SHA512 d00b1356907a7e22529e3ac4a7b979c6868311e8a98e4fd8b0a8b1f0d94b2425854242649a80a933084202834f5cee1fe17b51476fcc17e87b00e1e3cb8ed0e9 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCSV2_BUILD_TESTS=OFF + -DCSV2_SAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/licenses) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.mio DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/paho-mqtt/CONTROL b/vcpkg/ports/paho-mqtt/CONTROL new file mode 100644 index 0000000..67f584e --- /dev/null +++ b/vcpkg/ports/paho-mqtt/CONTROL @@ -0,0 +1,5 @@ +Source: paho-mqtt +Version: 1.3.1 +Homepage: https://github.com/eclipse/paho.mqtt.c +Description: Paho project provides open-source client implementations of MQTT and MQTT-SN messaging protocols aimed at new, existing, and emerging applications for the Internet of Things +Build-Depends: openssl diff --git a/vcpkg/ports/paho-mqtt/export-cmake-targets.patch b/vcpkg/ports/paho-mqtt/export-cmake-targets.patch new file mode 100644 index 0000000..d328a99 --- /dev/null +++ b/vcpkg/ports/paho-mqtt/export-cmake-targets.patch @@ -0,0 +1,101 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 4fdafef..dc8fd8a 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -19,10 +19,6 @@ + # Note: on OS X you should install XCode and the associated command-line tools + + ## compilation/linkage settings +-INCLUDE_DIRECTORIES( +- . +- ${CMAKE_BINARY_DIR} +- ) + + CONFIGURE_FILE(VersionInfo.h.in + ${CMAKE_BINARY_DIR}/VersionInfo.h +@@ -84,8 +80,17 @@ IF (NOT PAHO_BUILD_STATIC) + paho-mqtt3c paho-mqtt3a PROPERTIES + VERSION ${CLIENT_VERSION} + SOVERSION ${PAHO_VERSION_MAJOR}) ++ FOREACH(TARGET paho-mqtt3c paho-mqtt3a) ++ TARGET_INCLUDE_DIRECTORIES(${TARGET} ++ PUBLIC ++ $ ++ $ ++ PRIVATE ++ ${CMAKE_BINARY_DIR}) ++ ENDFOREACH() + + INSTALL(TARGETS paho-mqtt3c paho-mqtt3a ++ EXPORT eclipse-paho-mqtt-cTargets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +@@ -98,7 +103,14 @@ ELSE() + + TARGET_LINK_LIBRARIES(paho-mqtt3c-static ${LIBS_SYSTEM}) + TARGET_LINK_LIBRARIES(paho-mqtt3a-static ${LIBS_SYSTEM}) +- ++ FOREACH(TARGET paho-mqtt3c-static paho-mqtt3a-static) ++ TARGET_INCLUDE_DIRECTORIES(${TARGET} ++ PUBLIC ++ $ ++ $ ++ PRIVATE ++ ${CMAKE_BINARY_DIR}) ++ ENDFOREACH() + INSTALL(TARGETS paho-mqtt3c-static paho-mqtt3a-static + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ENDIF() +@@ -159,7 +171,16 @@ IF (PAHO_WITH_SSL) + VERSION ${CLIENT_VERSION} + SOVERSION ${PAHO_VERSION_MAJOR} + COMPILE_DEFINITIONS "OPENSSL=1") ++ FOREACH(TARGET paho-mqtt3cs paho-mqtt3as) ++ TARGET_INCLUDE_DIRECTORIES(${TARGET} ++ PUBLIC ++ $ ++ $ ++ PRIVATE ++ ${CMAKE_BINARY_DIR}) ++ ENDFOREACH() + INSTALL(TARGETS paho-mqtt3cs paho-mqtt3as ++ EXPORT eclipse-paho-mqtt-cTargets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +@@ -175,12 +196,33 @@ IF (PAHO_WITH_SSL) + VERSION ${CLIENT_VERSION} + SOVERSION ${PAHO_VERSION_MAJOR} + COMPILE_DEFINITIONS "OPENSSL=1") +- ++ FOREACH(TARGET paho-mqtt3cs-static paho-mqtt3as-static) ++ TARGET_INCLUDE_DIRECTORIES(${TARGET} ++ PUBLIC ++ $ ++ $ ++ PRIVATE ++ ${CMAKE_BINARY_DIR}) ++ ENDFOREACH() + INSTALL(TARGETS paho-mqtt3cs-static paho-mqtt3as-static ++ EXPORT eclipse-paho-mqtt-cTargets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ENDIF() + ENDIF() + ++INSTALL(EXPORT eclipse-paho-mqtt-cTargets ++ FILE eclipse-paho-mqtt-cConfig.cmake ++ NAMESPACE eclipse-paho-mqtt-c:: ++ DESTINATION share/eclipse-paho-mqtt-c) ++ ++INCLUDE(CMakePackageConfigHelpers) ++WRITE_BASIC_PACKAGE_VERSION_FILE("eclipse-paho-mqtt-cConfigVersion.cmake" ++ VERSION ${CLIENT_VERSION} ++ COMPATIBILITY SameMajorVersion) ++INSTALL(FILES ++ "${CMAKE_CURRENT_BINARY_DIR}/eclipse-paho-mqtt-cConfigVersion.cmake" ++ DESTINATION share/eclipse-paho-mqtt-c) ++ + # Base64 test + ADD_EXECUTABLE( Base64Test EXCLUDE_FROM_ALL Base64.c Base64.h ) + TARGET_COMPILE_DEFINITIONS( Base64Test PUBLIC "-DBASE64_TEST" ) diff --git a/vcpkg/ports/paho-mqtt/fix-install-path.patch b/vcpkg/ports/paho-mqtt/fix-install-path.patch new file mode 100644 index 0000000..4781419 --- /dev/null +++ b/vcpkg/ports/paho-mqtt/fix-install-path.patch @@ -0,0 +1,56 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 64ae92c..6d552d1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -64,11 +64,11 @@ ENDIF() + IF (PAHO_ENABLE_CPACK) + ### packaging settings + FILE(GLOB samples "src/samples/*.c") +- INSTALL(FILES ${samples} DESTINATION samples) ++ INSTALL(FILES ${samples} DESTINATION share/paho-mqtt/samples) + + SET(CPACK_PACKAGE_VENDOR "Eclipse Paho") + SET(CPACK_PACKAGE_NAME "Eclipse-Paho-MQTT-C") +- INSTALL(FILES CONTRIBUTING.md epl-v10 edl-v10 README.md notice.html DESTINATION .) ++ INSTALL(FILES CONTRIBUTING.md epl-v10 edl-v10 README.md notice.html DESTINATION share/paho-mqtt) + + IF (WIN32) + SET(CPACK_GENERATOR "ZIP") +diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt +index f15f314..54deec5 100644 +--- a/doc/CMakeLists.txt ++++ b/doc/CMakeLists.txt +@@ -39,7 +39,7 @@ ENDFOREACH(DOXYFILE_SRC) + + ADD_CUSTOM_TARGET(doc ALL DEPENDS ${DOXYTARGETS}) + IF (PAHO_ENABLE_CPACK) +- INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION share) ++ INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION share/paho-mqtt) + ELSE() + INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION ${CMAKE_INSTALL_DOCDIR}) + ENDIF() +\ No newline at end of file +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index b46eaca..a132062 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -89,7 +89,7 @@ INSTALL(TARGETS paho-mqtt3c paho-mqtt3a + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + INSTALL(TARGETS MQTTVersion +- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++ RUNTIME DESTINATION tools/paho-mqtt) + + IF (PAHO_BUILD_STATIC) + ADD_LIBRARY(paho-mqtt3c-static STATIC $ MQTTClient.c) +@@ -102,8 +102,8 @@ IF (PAHO_BUILD_STATIC) + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ENDIF() + +-INSTALL(FILES MQTTAsync.h MQTTClient.h MQTTClientPersistence.h MQTTProperties.h MQTTReasonCodes.h MQTTSubscribeOpts.h +- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) ++INSTALL(FILES MQTTAsync.h MQTTClient.h MQTTClientPersistence.h MQTTProperties.h MQTTReasonCodes.h MQTTSubscribeOpts.h ++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/paho-mqtt) + + IF (PAHO_WITH_SSL) + SET(OPENSSL_SEARCH_PATH "" CACHE PATH "Directory containing OpenSSL libraries and includes") diff --git a/vcpkg/ports/paho-mqtt/fix-static-build.patch b/vcpkg/ports/paho-mqtt/fix-static-build.patch new file mode 100644 index 0000000..5e6aab0 --- /dev/null +++ b/vcpkg/ports/paho-mqtt/fix-static-build.patch @@ -0,0 +1,97 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 14b94b1..508c5b1 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -65,28 +65,29 @@ ENDIF() + ADD_LIBRARY(common_obj OBJECT ${common_src}) + SET_PROPERTY(TARGET common_obj PROPERTY POSITION_INDEPENDENT_CODE ON) + +-ADD_EXECUTABLE(MQTTVersion MQTTVersion.c) +- +-ADD_LIBRARY(paho-mqtt3c SHARED $ MQTTClient.c) +-ADD_LIBRARY(paho-mqtt3a SHARED $ MQTTAsync.c) +- +-TARGET_LINK_LIBRARIES(paho-mqtt3c ${LIBS_SYSTEM}) +-TARGET_LINK_LIBRARIES(paho-mqtt3a ${LIBS_SYSTEM}) +- +-TARGET_LINK_LIBRARIES(MQTTVersion paho-mqtt3a paho-mqtt3c ${LIBS_SYSTEM}) +-SET_TARGET_PROPERTIES( +- paho-mqtt3c paho-mqtt3a PROPERTIES +- VERSION ${CLIENT_VERSION} +- SOVERSION ${PAHO_VERSION_MAJOR}) +- +-INSTALL(TARGETS paho-mqtt3c paho-mqtt3a +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +-INSTALL(TARGETS MQTTVersion +- RUNTIME DESTINATION tools/paho-mqtt) +- +-IF (PAHO_BUILD_STATIC) ++IF (NOT PAHO_BUILD_STATIC) ++ ADD_EXECUTABLE(MQTTVersion MQTTVersion.c) ++ ++ ADD_LIBRARY(paho-mqtt3c SHARED $ MQTTClient.c) ++ ADD_LIBRARY(paho-mqtt3a SHARED $ MQTTAsync.c) ++ ++ TARGET_LINK_LIBRARIES(paho-mqtt3c ${LIBS_SYSTEM}) ++ TARGET_LINK_LIBRARIES(paho-mqtt3a ${LIBS_SYSTEM}) ++ ++ TARGET_LINK_LIBRARIES(MQTTVersion paho-mqtt3a paho-mqtt3c ${LIBS_SYSTEM}) ++ SET_TARGET_PROPERTIES( ++ paho-mqtt3c paho-mqtt3a PROPERTIES ++ VERSION ${CLIENT_VERSION} ++ SOVERSION ${PAHO_VERSION_MAJOR}) ++ ++ INSTALL(TARGETS paho-mqtt3c paho-mqtt3a ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++ INSTALL(TARGETS MQTTVersion ++ RUNTIME DESTINATION tools/paho-mqtt) ++ELSE() ++ message("Build as static library") + ADD_LIBRARY(paho-mqtt3c-static STATIC $ MQTTClient.c) + ADD_LIBRARY(paho-mqtt3a-static STATIC $ MQTTAsync.c) + +@@ -132,22 +133,24 @@ IF (PAHO_WITH_SSL) + ADD_LIBRARY(common_ssl_obj OBJECT ${common_src}) + SET_PROPERTY(TARGET common_ssl_obj PROPERTY POSITION_INDEPENDENT_CODE ON) + SET_PROPERTY(TARGET common_ssl_obj PROPERTY COMPILE_DEFINITIONS "OPENSSL=1") +- ADD_LIBRARY(paho-mqtt3cs SHARED $ MQTTClient.c SSLSocket.c) +- ADD_LIBRARY(paho-mqtt3as SHARED $ MQTTAsync.c SSLSocket.c) +- +- TARGET_LINK_LIBRARIES(paho-mqtt3cs ${OPENSSL_LIB} ${OPENSSLCRYPTO_LIB} ${LIBS_SYSTEM}) +- TARGET_LINK_LIBRARIES(paho-mqtt3as ${OPENSSL_LIB} ${OPENSSLCRYPTO_LIB} ${LIBS_SYSTEM}) +- SET_TARGET_PROPERTIES( +- paho-mqtt3cs paho-mqtt3as PROPERTIES +- VERSION ${CLIENT_VERSION} +- SOVERSION ${PAHO_VERSION_MAJOR} +- COMPILE_DEFINITIONS "OPENSSL=1") +- INSTALL(TARGETS paho-mqtt3cs paho-mqtt3as +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +- +- IF (PAHO_BUILD_STATIC) ++ ++ IF (NOT PAHO_BUILD_STATIC) ++ ADD_LIBRARY(paho-mqtt3cs SHARED $ MQTTClient.c SSLSocket.c) ++ ADD_LIBRARY(paho-mqtt3as SHARED $ MQTTAsync.c SSLSocket.c) ++ ++ TARGET_LINK_LIBRARIES(paho-mqtt3cs ${OPENSSL_LIB} ${OPENSSLCRYPTO_LIB} ${LIBS_SYSTEM}) ++ TARGET_LINK_LIBRARIES(paho-mqtt3as ${OPENSSL_LIB} ${OPENSSLCRYPTO_LIB} ${LIBS_SYSTEM}) ++ SET_TARGET_PROPERTIES( ++ paho-mqtt3cs paho-mqtt3as PROPERTIES ++ VERSION ${CLIENT_VERSION} ++ SOVERSION ${PAHO_VERSION_MAJOR} ++ COMPILE_DEFINITIONS "OPENSSL=1") ++ INSTALL(TARGETS paho-mqtt3cs paho-mqtt3as ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++ ELSE() ++ message("Build as static library") + ADD_LIBRARY(paho-mqtt3cs-static STATIC $ MQTTClient.c SSLSocket.c) + ADD_LIBRARY(paho-mqtt3as-static STATIC $ MQTTAsync.c SSLSocket.c) + diff --git a/vcpkg/ports/paho-mqtt/fix-unresolvedsymbol-arm.patch b/vcpkg/ports/paho-mqtt/fix-unresolvedsymbol-arm.patch new file mode 100644 index 0000000..1659018 --- /dev/null +++ b/vcpkg/ports/paho-mqtt/fix-unresolvedsymbol-arm.patch @@ -0,0 +1,12 @@ +diff --git a/src/SHA1.c b/src/SHA1.c +index 9bb1175..b2ef930 100644 +--- a/src/SHA1.c ++++ b/src/SHA1.c +@@ -19,6 +19,7 @@ + #if !defined(OPENSSL) + #if defined(WIN32) || defined(WIN64) + #pragma comment(lib, "crypt32.lib") ++#pragma comment(lib, "Advapi32.lib") + + int SHA1_Init(SHA_CTX *c) + { diff --git a/vcpkg/ports/paho-mqtt/fix-win-macro.patch b/vcpkg/ports/paho-mqtt/fix-win-macro.patch new file mode 100644 index 0000000..469db34 --- /dev/null +++ b/vcpkg/ports/paho-mqtt/fix-win-macro.patch @@ -0,0 +1,79 @@ +diff --git a/src/MQTTProperties.h b/src/MQTTProperties.h +index deec124..872032c 100644 +--- a/src/MQTTProperties.h ++++ b/src/MQTTProperties.h +@@ -50,7 +50,7 @@ enum MQTTPropertyCodes { + MQTTPROPERTY_CODE_SHARED_SUBSCRIPTION_AVAILABLE = 42/**< The value is 241 */ + }; + +-#if defined(WIN32) || defined(WIN64) ++#if defined(_WIN32) || defined(_WIN64) + #define DLLImport __declspec(dllimport) + #define DLLExport __declspec(dllexport) + #else +diff --git a/src/MQTTAsync.h b/src/MQTTAsync.h +index 1b3593d..04718f8 100644 +--- a/src/MQTTAsync.h ++++ b/src/MQTTAsync.h +@@ -92,7 +92,7 @@ + extern "C" { + #endif + +-#if defined(WIN32) || defined(WIN64) ++#if defined(_WIN32) || defined(_WIN64) + #define DLLImport __declspec(dllimport) + #define DLLExport __declspec(dllexport) + #else +@@ -1764,7 +1764,7 @@ int main(int argc, char* argv[]) + "on topic %s for client with ClientID: %s\n", + PAYLOAD, TOPIC, CLIENTID); + while (!finished) +- #if defined(WIN32) || defined(WIN64) ++ #if defined(_WIN32) || defined(_WIN64) + Sleep(100); + #else + usleep(10000L); +@@ -1914,7 +1914,7 @@ int main(int argc, char* argv[]) + } + + while (!subscribed) +- #if defined(WIN32) || defined(WIN64) ++ #if defined(_WIN32) || defined(_WIN64) + Sleep(100); + #else + usleep(10000L); +@@ -1935,7 +1935,7 @@ int main(int argc, char* argv[]) + exit(EXIT_FAILURE); + } + while (!disc_finished) +- #if defined(WIN32) || defined(WIN64) ++ #if defined(_WIN32) || defined(_WIN64) + Sleep(100); + #else + usleep(10000L); +diff --git a/src/MQTTClient.h b/src/MQTTClient.h +index b3fadbe..130b804 100644 +--- a/src/MQTTClient.h ++++ b/src/MQTTClient.h +@@ -110,7 +110,7 @@ + extern "C" { + #endif + +-#if defined(WIN32) || defined(WIN64) ++#if defined(_WIN32) || defined(_WIN64) + #define DLLImport __declspec(dllimport) + #define DLLExport __declspec(dllexport) + #else +diff --git a/src/MQTTReasonCodes.h b/src/MQTTReasonCodes.h +index 369543b..38c299b 100644 +--- a/src/MQTTReasonCodes.h ++++ b/src/MQTTReasonCodes.h +@@ -66,7 +66,7 @@ enum MQTTReasonCodes { + MQTTREASONCODE_WILDCARD_SUBSCRIPTIONS_NOT_SUPPORTED = 162 + }; + +-#if defined(WIN32) || defined(WIN64) ++#if defined(_WIN32) || defined(_WIN64) + #define DLLImport __declspec(dllimport) + #define DLLExport __declspec(dllexport) + #else diff --git a/vcpkg/ports/paho-mqtt/portfile.cmake b/vcpkg/ports/paho-mqtt/portfile.cmake new file mode 100644 index 0000000..33107e3 --- /dev/null +++ b/vcpkg/ports/paho-mqtt/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO eclipse/paho.mqtt.c + REF d34c51214f4172f2e12bb17532c9f44f72a57dd4 # v1.3.1 + SHA512 184a8ace64bb967c63ac11a2476e6753d7aad39f93b290be030356841a8891edec6e0ac4b925089f2234a56f6da9c09c1a92023d3883fa785d986342bfee3972 + HEAD_REF master + PATCHES + remove_compiler_options.patch + fix-install-path.patch + fix-static-build.patch + fix-unresolvedsymbol-arm.patch + export-cmake-targets.patch + fix-win-macro.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PAHO_BUILD_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPAHO_WITH_SSL=TRUE + -DPAHO_BUILD_STATIC=${PAHO_BUILD_STATIC} + -DPAHO_ENABLE_TESTING=FALSE +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/eclipse-paho-mqtt-c TARGET_PATH share/eclipse-paho-mqtt-c) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(RENAME ${CURRENT_PACKAGES_DIR}/share/paho-mqtt/README.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/readme) +file(INSTALL ${SOURCE_PATH}/about.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/paho-mqtt/remove_compiler_options.patch b/vcpkg/ports/paho-mqtt/remove_compiler_options.patch new file mode 100644 index 0000000..60bf370 --- /dev/null +++ b/vcpkg/ports/paho-mqtt/remove_compiler_options.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index be8d2e8..418e2f2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -37,7 +37,7 @@ STRING(TIMESTAMP BUILD_TIMESTAMP UTC) + MESSAGE(STATUS "Timestamp is ${BUILD_TIMESTAMP}") + + IF(WIN32) +- ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -MD) ++ ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN) + ELSEIF(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + ADD_DEFINITIONS(-DOSX) + ENDIF() diff --git a/vcpkg/ports/paho-mqttpp3/CONTROL b/vcpkg/ports/paho-mqttpp3/CONTROL new file mode 100644 index 0000000..601358f --- /dev/null +++ b/vcpkg/ports/paho-mqttpp3/CONTROL @@ -0,0 +1,10 @@ +Source: paho-mqttpp3 +Version: 1.1 +Homepage: https://github.com/eclipse/paho.mqtt.cpp +Description: Paho project provides open-source C++ wrapper for Paho C library +Build-Depends: paho-mqtt +Default-Features: ssl + +Feature: ssl +Description: Build with SSL support +Build-Depends: openssl diff --git a/vcpkg/ports/paho-mqttpp3/fix-dependency.patch b/vcpkg/ports/paho-mqttpp3/fix-dependency.patch new file mode 100644 index 0000000..a19644d --- /dev/null +++ b/vcpkg/ports/paho-mqttpp3/fix-dependency.patch @@ -0,0 +1,86 @@ +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +index a9f8908..5c98f3f 100644 +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt +@@ -17,6 +17,5 @@ install(EXPORT ${package_name} DESTINATION lib/cmake/${package_name} + + install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/${package_name}Config.cmake" +- FindPahoMqttC.cmake + "${CMAKE_CURRENT_BINARY_DIR}/${package_name}ConfigVersion.cmake" + DESTINATION lib/cmake/${package_name}) +diff --git a/cmake/PahoMqttCppConfig.cmake.in b/cmake/PahoMqttCppConfig.cmake.in +index aff9472..275655c 100644 +--- a/cmake/PahoMqttCppConfig.cmake.in ++++ b/cmake/PahoMqttCppConfig.cmake.in +@@ -5,7 +5,7 @@ set(PAHO_WITH_SSL @PAHO_WITH_SSL@) + + include(CMakeFindDependencyMacro) + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) +-find_dependency(PahoMqttC REQUIRED) ++find_dependency(eclipse-paho-mqtt-c REQUIRED) + list(REMOVE_AT CMAKE_MODULE_PATH -1) + + include("${CMAKE_CURRENT_LIST_DIR}/@package_name@Targets.cmake") +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 4e9b7c4..bd1e0a5 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -23,7 +23,7 @@ + # Frank Pagliughi - made the shared library optional + #*******************************************************************************/ + +-find_package(PahoMqttC REQUIRED) ++find_package(eclipse-paho-mqtt-c CONFIG REQUIRED) + + # --- The headers --- + +@@ -76,17 +76,23 @@ target_include_directories(paho-cpp-objs + src + ) + +- + ## --- Build the shared library, if requested --- + + if(PAHO_BUILD_SHARED) ++ ## set PAHO_C_LIB ++ if(PAHO_WITH_SSL) ++ set(_PAHO_MQTT_C_LIB_NAME eclipse-paho-mqtt-c::paho-mqtt3as eclipse-paho-mqtt-c::paho-mqtt3cs) ++ else() ++ set(_PAHO_MQTT_C_LIB_NAME eclipse-paho-mqtt-c::paho-mqtt3a eclipse-paho-mqtt-c::paho-mqtt3c) ++ endif() ++ + ## create the shared library + add_library(paho-mqttpp3 SHARED $) + + ## add dependencies to the shared library + target_link_libraries(paho-mqttpp3 + PRIVATE ${LIBS_SYSTEM} +- PUBLIC PahoMqttC::PahoMqttC Threads::Threads) ++ PUBLIC ${_PAHO_MQTT_C_LIB_NAME} Threads::Threads) + + # It would be nice to exort the include paths from the obj lib, but we + # get an export error. Perhaps in a future version? +@@ -118,13 +124,21 @@ endif() + ## --- Build static version of the library, if requested --- + + if(PAHO_BUILD_STATIC) ++ ++ ## set PAHO_C_LIB ++ if(PAHO_WITH_SSL) ++ set(_PAHO_MQTT_C_LIB_NAME eclipse-paho-mqtt-c::paho-mqtt3as-static eclipse-paho-mqtt-c::paho-mqtt3cs-static) ++ else() ++ set(_PAHO_MQTT_C_LIB_NAME eclipse-paho-mqtt-c::paho-mqtt3a-static eclipse-paho-mqtt-c::paho-mqtt3c-static) ++ endif() ++ + ## create the static library + add_library(paho-mqttpp3-static STATIC $) + + ## add dependencies to the shared library + target_link_libraries(paho-mqttpp3-static + PRIVATE ${LIBS_SYSTEM} +- PUBLIC PahoMqttC::PahoMqttC Threads::Threads) ++ PUBLIC ${_PAHO_MQTT_C_LIB_NAME} Threads::Threads) + + target_include_directories(paho-mqttpp3-static PUBLIC + $ diff --git a/vcpkg/ports/paho-mqttpp3/fix-include-path.patch b/vcpkg/ports/paho-mqttpp3/fix-include-path.patch new file mode 100644 index 0000000..bb9800c --- /dev/null +++ b/vcpkg/ports/paho-mqttpp3/fix-include-path.patch @@ -0,0 +1,223 @@ +diff --git a/src/mqtt/async_client.h b/src/mqtt/async_client.h +index 4bbd95c..9db5746 100644 +--- a/src/mqtt/async_client.h ++++ b/src/mqtt/async_client.h +@@ -25,7 +25,7 @@ + #ifndef __mqtt_async_client_h + #define __mqtt_async_client_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/types.h" + #include "mqtt/token.h" + #include "mqtt/string_collection.h" +diff --git a/src/mqtt/callback.h b/src/mqtt/callback.h +index 434b979..2d2ee1f 100644 +--- a/src/mqtt/callback.h ++++ b/src/mqtt/callback.h +@@ -24,7 +24,7 @@ + #ifndef __mqtt_callback_h + #define __mqtt_callback_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/delivery_token.h" + #include "mqtt/types.h" + #include +diff --git a/src/mqtt/connect_options.h b/src/mqtt/connect_options.h +index 891bd01..2046b93 100644 +--- a/src/mqtt/connect_options.h ++++ b/src/mqtt/connect_options.h +@@ -24,7 +24,7 @@ + #ifndef __mqtt_connect_options_h + #define __mqtt_connect_options_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/types.h" + #include "mqtt/message.h" + #include "mqtt/topic.h" +diff --git a/src/mqtt/delivery_token.h b/src/mqtt/delivery_token.h +index b70d582..ee1b306 100644 +--- a/src/mqtt/delivery_token.h ++++ b/src/mqtt/delivery_token.h +@@ -24,7 +24,7 @@ + #ifndef __mqtt_delivery_token_h + #define __mqtt_delivery_token_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/token.h" + #include "mqtt/message.h" + #include +diff --git a/src/mqtt/disconnect_options.h b/src/mqtt/disconnect_options.h +index d2ebdbf..6eb3e9a 100644 +--- a/src/mqtt/disconnect_options.h ++++ b/src/mqtt/disconnect_options.h +@@ -23,7 +23,7 @@ + #ifndef __mqtt_disconnect_options_h + #define __mqtt_disconnect_options_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/types.h" + #include "mqtt/token.h" + #include "mqtt/properties.h" +diff --git a/src/mqtt/exception.h b/src/mqtt/exception.h +index cdcd2fc..11ddc7d 100644 +--- a/src/mqtt/exception.h ++++ b/src/mqtt/exception.h +@@ -24,7 +24,7 @@ + #ifndef __mqtt_exception_h + #define __mqtt_exception_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/types.h" + #include + #include +diff --git a/src/mqtt/iaction_listener.h b/src/mqtt/iaction_listener.h +index 1e34577..2af8c1b 100644 +--- a/src/mqtt/iaction_listener.h ++++ b/src/mqtt/iaction_listener.h +@@ -24,7 +24,7 @@ + #ifndef __mqtt_iaction_listener_h + #define __mqtt_iaction_listener_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/types.h" + #include + +diff --git a/src/mqtt/iclient_persistence.h b/src/mqtt/iclient_persistence.h +index 852ec8e..aa721bc 100644 +--- a/src/mqtt/iclient_persistence.h ++++ b/src/mqtt/iclient_persistence.h +@@ -24,7 +24,7 @@ + #ifndef __mqtt_iclient_persistence_h + #define __mqtt_iclient_persistence_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/types.h" + #include "mqtt/buffer_view.h" + #include "mqtt/string_collection.h" +diff --git a/src/mqtt/message.h b/src/mqtt/message.h +index 5d64e8d..9f7096a 100644 +--- a/src/mqtt/message.h ++++ b/src/mqtt/message.h +@@ -25,7 +25,7 @@ + #ifndef __mqtt_message_h + #define __mqtt_message_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/buffer_ref.h" + #include "mqtt/properties.h" + #include "mqtt/exception.h" +diff --git a/src/mqtt/properties.h b/src/mqtt/properties.h +index bbe977c..fa55560 100644 +--- a/src/mqtt/properties.h ++++ b/src/mqtt/properties.h +@@ -25,7 +25,7 @@ + #define __mqtt_properties_h + + extern "C" { +- #include "MQTTProperties.h" ++ #include "paho-mqtt/MQTTProperties.h" + } + + #include "mqtt/types.h" +diff --git a/src/mqtt/response_options.h b/src/mqtt/response_options.h +index 48f7831..7ec94e4 100644 +--- a/src/mqtt/response_options.h ++++ b/src/mqtt/response_options.h +@@ -7,7 +7,7 @@ + #ifndef __mqtt_response_options_h + #define __mqtt_response_options_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/token.h" + #include "mqtt/delivery_token.h" + #include "subscribe_options.h" +diff --git a/src/mqtt/server_response.h b/src/mqtt/server_response.h +index 7f0fe72..4d0fb2c 100644 +--- a/src/mqtt/server_response.h ++++ b/src/mqtt/server_response.h +@@ -24,7 +24,7 @@ + #ifndef __mqtt_server_response_h + #define __mqtt_server_response_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/types.h" + #include "mqtt/properties.h" + +diff --git a/src/mqtt/ssl_options.h b/src/mqtt/ssl_options.h +index f44607c..cdd2cdc 100644 +--- a/src/mqtt/ssl_options.h ++++ b/src/mqtt/ssl_options.h +@@ -27,7 +27,7 @@ + #ifndef __mqtt_ssl_options_h + #define __mqtt_ssl_options_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/message.h" + #include "mqtt/topic.h" + #include "mqtt/types.h" +diff --git a/src/mqtt/subscribe_options.h b/src/mqtt/subscribe_options.h +index 753c811..5f0d86c 100644 +--- a/src/mqtt/subscribe_options.h ++++ b/src/mqtt/subscribe_options.h +@@ -24,8 +24,8 @@ + #ifndef __mqtt_subscribe_options_h + #define __mqtt_subscribe_options_h + +-#include "MQTTAsync.h" +-#include "MQTTSubscribeOpts.h" ++#include "paho-mqtt/MQTTAsync.h" ++#include "paho-mqtt/MQTTSubscribeOpts.h" + #include "mqtt/types.h" + + namespace mqtt { +diff --git a/src/mqtt/token.h b/src/mqtt/token.h +index efb1659..d0b2dee 100644 +--- a/src/mqtt/token.h ++++ b/src/mqtt/token.h +@@ -25,7 +25,7 @@ + #ifndef __mqtt_token_h + #define __mqtt_token_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/iaction_listener.h" + #include "mqtt/exception.h" + #include "mqtt/types.h" +diff --git a/src/mqtt/topic.h b/src/mqtt/topic.h +index 618eb85..555de60 100644 +--- a/src/mqtt/topic.h ++++ b/src/mqtt/topic.h +@@ -24,7 +24,7 @@ + #ifndef __mqtt_topic_h + #define __mqtt_topic_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/delivery_token.h" + #include "mqtt/subscribe_options.h" + #include "mqtt/message.h" +diff --git a/src/mqtt/will_options.h b/src/mqtt/will_options.h +index a685a96..7bfc46e 100644 +--- a/src/mqtt/will_options.h ++++ b/src/mqtt/will_options.h +@@ -26,7 +26,7 @@ + #ifndef __mqtt_will_options_h + #define __mqtt_will_options_h + +-#include "MQTTAsync.h" ++#include "paho-mqtt/MQTTAsync.h" + #include "mqtt/types.h" + #include "mqtt/message.h" + #include "mqtt/topic.h" diff --git a/vcpkg/ports/paho-mqttpp3/portfile.cmake b/vcpkg/ports/paho-mqttpp3/portfile.cmake new file mode 100644 index 0000000..16e9aca --- /dev/null +++ b/vcpkg/ports/paho-mqttpp3/portfile.cmake @@ -0,0 +1,69 @@ +# Download from Github +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO eclipse/paho.mqtt.cpp + REF f3a2a52259b5463ab50eee6d1c033cba18d6e84b + SHA512 9b12259e3aab347c7a362aa56d66e720532a09a44bff8671215b98c7f54bcc282a10545b529b5425eebf65e007113659364cf0e41b9c99cc938b00c1b37434d9 + HEAD_REF master + PATCHES + fix-include-path.patch + fix-dependency.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + "ssl" PAHO_WITH_SSL +) + +# Link with 'paho-mqtt3as' library +set(PAHO_C_LIBNAME paho-mqtt3as) + +# Setting the library path +if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + set(PAHO_C_LIBRARY_PATH "${CURRENT_INSTALLED_DIR}/lib") +else() + set(PAHO_C_LIBRARY_PATH "${CURRENT_INSTALLED_DIR}/debug/lib") +endif() + +# Setting the include path where MqttClient.h is present +set(PAHO_C_INC "${CURRENT_INSTALLED_DIR}/include") + +# Set the generator to Ninja +set(PAHO_CMAKE_GENERATOR "Ninja") + +# NOTE: the Paho C++ cmake files on Github are problematic. +# It uses two different options PAHO_BUILD_STATIC and PAHO_BUILD_SHARED instead of just using one variable. +# Unless the open source community cleans up the cmake files, we are stuck with setting both of them. +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(PAHO_MQTTPP3_STATIC ON) + set(PAHO_MQTTPP3_SHARED OFF) + set(PAHO_C_LIB "${PAHO_C_LIBRARY_PATH}/${PAHO_C_LIBNAME}") + set(PAHO_OPTIONS -DPAHO_MQTT_C_LIBRARIES=${PAHO_C_LIB}) +else() + set(PAHO_MQTTPP3_STATIC OFF) + set(PAHO_MQTTPP3_SHARED ON) + set(PAHO_OPTIONS) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + GENERATOR ${PAHO_CMAKE_GENERATOR} + OPTIONS + -DPAHO_BUILD_STATIC=${PAHO_MQTTPP3_STATIC} + -DPAHO_BUILD_SHARED=${PAHO_MQTTPP3_SHARED} + -DPAHO_MQTT_C_INCLUDE_DIRS=${PAHO_C_INC} + ${FEATURE_OPTIONS} + ${PAHO_OPTIONS} +) + +# Run the build, copy pdbs and fixup the cmake targets +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/PahoMqttCpp" TARGET_PATH "share/pahomqttcpp") + +# Remove the include and share folders in debug folder +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Add copyright +file(INSTALL ${SOURCE_PATH}/about.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/pango/0001-fix-static-symbols-export.diff b/vcpkg/ports/pango/0001-fix-static-symbols-export.diff new file mode 100644 index 0000000..a7ab609 --- /dev/null +++ b/vcpkg/ports/pango/0001-fix-static-symbols-export.diff @@ -0,0 +1,16 @@ +diff --git a/config.h.win32 b/config.h.win32 +index 31b330f..e5ed86c 100644 +--- a/config.h.win32 ++++ b/config.h.win32 +@@ -147,7 +147,11 @@ + + /* defines how to decorate public symbols while building */ + #ifdef _MSC_VER ++#ifdef PANGO_EXPORTS + #define _PANGO_EXTERN __declspec(dllexport) extern + #else ++#define _PANGO_EXTERN extern ++#endif ++#else + #define _PANGO_EXTERN __attribute__((visibility("default"))) __declspec(dllexport) extern + #endif diff --git a/vcpkg/ports/pango/CMakeLists.txt b/vcpkg/ports/pango/CMakeLists.txt new file mode 100644 index 0000000..127b923 --- /dev/null +++ b/vcpkg/ports/pango/CMakeLists.txt @@ -0,0 +1,211 @@ +cmake_minimum_required(VERSION 3.0) +project(pango C) + +set(PANGO_LIB_SUFFIX 1.0) +set(PANGO_DLL_SUFFIX 1) +set(GLIB_LIB_VERSION 2.0) + +if(WIN32) + configure_file(./config.h.win32 ${CMAKE_CURRENT_BINARY_DIR}/config.h COPYONLY) +else() + configure_file(./config.h.unix ${CMAKE_CURRENT_BINARY_DIR}/config.h COPYONLY) +endif() + +if (WIN32) + # Set utf-8 charset to avoid compile error C2001 + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /utf-8") +endif() + +add_definitions(-DHAVE_CONFIG_H) +include_directories(. ./pango ${CMAKE_CURRENT_BINARY_DIR}) + +if(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux") +# find libintl +find_path(LIBINTL_INCLUDE_DIR libintl.h) +find_library(LIBINTL_LIBRARY NAMES libintl intl) +endif() + +# find glib +find_path(GLIB_INCLUDE_DIR glib.h) +find_library(GLIB_GLIB_LIBRARY glib-${GLIB_LIB_VERSION}) +find_library(GLIB_GOBJECT_LIBRARY gobject-${GLIB_LIB_VERSION}) +find_library(GLIB_GMODULE_LIBRARY gmodule-${GLIB_LIB_VERSION}) +set(GLIB_LIBRARIES ${GLIB_GLIB_LIBRARY} ${GLIB_GOBJECT_LIBRARY} ${GLIB_GMODULE_LIBRARY}) + +# find cairo +find_path(CAIRO_INCLUDE_DIR cairo.h) +if(CMAKE_BUILD_TYPE STREQUAL Debug) + set(CAIRO_SUFFIX d) +endif() +find_library(CAIRO_LIBRARY + NAMES + cairo${CAIRO_SUFFIX} + cairo-static${CAIRO_SUFFIX}) +find_library(CAIRO_GOBJECT_LIBRARY cairo-gobject${CAIRO_SUFFIX}) +set(CAIRO_LIBRARIES ${CAIRO_LIBRARY} ${CAIRO_GOBJECT_LIBRARY}) + +# find fontconfig +find_path(FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h) +find_library(FONTCONFIG_LIBRARY fontconfig) + +# find freetype +find_package(Freetype REQUIRED) + +# find harfbuzz +find_path(HARFBUZZ_INCLUDE_DIR harfbuzz/hb.h) +find_library(HARFBUZZ_LIBRARY harfbuzz) + +if (APPLE) + find_library(COREFOUNDATION_LIBRARY CoreFoundation) + link_libraries(${COREFOUNDATION_LIBRARY}) +endif() + +set(FONT_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIR} ${FONTCONFIG_INCLUDE_DIR} ${HARFBUZZ_INCLUDE_DIR}/harfbuzz) +set(FONT_LIBRARIES Freetype::Freetype ${FONTCONFIG_LIBRARY} ${HARFBUZZ_LIBRARY}) + +macro(pango_add_module MODULE_NAME) + add_library(${MODULE_NAME} ${ARGN}) + target_include_directories(${MODULE_NAME} PRIVATE ${GLIB_INCLUDE_DIR} ${LIBINTL_INCLUDE_DIR}) + target_link_libraries(${MODULE_NAME} ${LIBINTL_LIBRARY} ${GLIB_LIBRARIES}) + target_compile_definitions(${MODULE_NAME} PRIVATE + G_LOG_DOMAIN="Pango" PANGO_ENABLE_BACKEND PANGO_ENABLE_ENGINE + G_DISABLE_SINGLE_INCLUDES SYSCONFDIR="/dummy/etc" LIBDIR="/dummy/lib") + target_compile_definitions(${MODULE_NAME} PRIVATE HAVE_CAIRO_FREETYPE=1) + set_target_properties(${MODULE_NAME} PROPERTIES + DEFINE_SYMBOL PANGO_EXPORTS + OUTPUT_NAME ${MODULE_NAME}-${PANGO_DLL_SUFFIX} + ARCHIVE_OUTPUT_NAME ${MODULE_NAME}-${PANGO_LIB_SUFFIX}) + install(TARGETS ${MODULE_NAME} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) +endmacro() + +pango_add_module(pango + pango/break-arabic.c + pango/break-indic.c + pango/mini-fribidi/fribidi.c + pango/mini-fribidi/fribidi_char_type.c + pango/mini-fribidi/fribidi_types.c + pango/break.c + pango/ellipsize.c + pango/fonts.c + pango/glyphstring.c + pango/modules.c + pango/pango-attributes.c + pango/pango-bidi-type.c + pango/pango-color.c + pango/pango-context.c + pango/pango-coverage.c + pango/pango-emoji.c + pango/pango-engine.c + pango/pango-fontmap.c + pango/pango-fontset.c + pango/pango-glyph-item.c + pango/pango-gravity.c + pango/pango-item.c + pango/pango-language.c + pango/pango-layout.c + pango/pango-markup.c + pango/pango-matrix.c + pango/pango-renderer.c + pango/pango-script.c + pango/pango-tabs.c + pango/pango-utils.c + pango/reorder-items.c + pango/shape.c + pango/pango-enum-types.c) + +if(WIN32) +pango_add_module(pangowin32 + pango/pangowin32.c + pango/pangowin32-fontcache.c + pango/pangowin32-fontmap.c + pango/pangowin32-shape.c) +target_link_libraries(pangowin32 usp10 pango gdi32) +endif() + +pango_add_module(pangoft2 + pango/pangofc-font.c + pango/pangofc-fontmap.c + pango/pangofc-decoder.c + pango/pangofc-shape.c + pango/pangoft2.c + pango/pangoft2-fontmap.c + pango/pangoft2-render.c + pango/pango-ot-buffer.c + pango/pango-ot-info.c + pango/pango-ot-ruleset.c + pango/pango-ot-tag.c) +target_link_libraries(pangoft2 pango ${FONT_LIBRARIES}) +target_include_directories(pangoft2 PRIVATE ${FONT_INCLUDE_DIRS}) + +list(APPEND PANGO_CAIRO_SOURCES + pango/pangocairo-fcfont.c + pango/pangocairo-fcfontmap.c + pango/pangocairo-context.c + pango/pangocairo-font.c + pango/pangocairo-fontmap.c + pango/pangocairo-render.c) + +if(WIN32) + list(APPEND PANGO_CAIRO_SOURCES + pango/pangocairo-win32font.c + pango/pangocairo-win32fontmap.c) +endif() + +pango_add_module(pangocairo ${PANGO_CAIRO_SOURCES}) +list(APPEND PANGO_CAIRO_LIBRARIES ${CAIRO_LIBRARIES} pango pangoft2 ${FONT_LIBRARIES}) +if (WIN32) + list(APPEND PANGO_CAIRO_LIBRARIES pangowin32) +endif() +target_link_libraries(pangocairo ${PANGO_CAIRO_LIBRARIES}) +target_include_directories(pangocairo PRIVATE ${CAIRO_INCLUDE_DIR} ${FONT_INCLUDE_DIRS}) + + +if(NOT PANGO_SKIP_HEADERS) + install(FILES + pango/pango.h + pango/pango-attributes.h + pango/pango-bidi-type.h + pango/pango-break.h + pango/pango-context.h + pango/pango-coverage.h + pango/pango-engine.h + pango/pango-font.h + pango/pango-fontmap.h + pango/pango-fontset.h + pango/pango-glyph.h + pango/pango-glyph-item.h + pango/pango-gravity.h + pango/pango-item.h + pango/pango-language.h + pango/pango-layout.h + pango/pango-matrix.h + pango/pango-modules.h + pango/pango-renderer.h + pango/pango-script.h + pango/pango-tabs.h + pango/pango-types.h + pango/pango-utils.h + pango/pango-version-macros.h + pango/pangocairo.h + pango/pangowin32.h + pango/pango-features.h + pango/pango-enum-types.h + pango/pangofc-decoder.h + pango/pangofc-font.h + pango/pangofc-fontmap.h + pango/pango-ot.h + pango/pangoft2.h + DESTINATION include/pango) +endif() + +message(STATUS "Link-time dependencies:") +message(STATUS " " ${LIBINTL_LIBRARY}) +foreach(GL ${GLIB_LIBRARIES}) + message(STATUS " " ${GL}) +endforeach() +foreach(CL ${CAIRO_LIBRARIES}) + message(STATUS " " ${CL}) +endforeach() +foreach(FL ${FONT_LIBRARIES}) + message(STATUS " " ${FL}) +endforeach() diff --git a/vcpkg/ports/pango/CONTROL b/vcpkg/ports/pango/CONTROL new file mode 100644 index 0000000..cea8f14 --- /dev/null +++ b/vcpkg/ports/pango/CONTROL @@ -0,0 +1,6 @@ +Source: pango +Version: 1.40.11 +Port-Version: 8 +Homepage: https://ftp.gnome.org/pub/GNOME/sources/pango/ +Description: Text and font handling library. +Build-Depends: glib, gettext, cairo[gobject], fontconfig, freetype, harfbuzz[glib] (!(windows&static)&!osx) diff --git a/vcpkg/ports/pango/config.h.unix b/vcpkg/ports/pango/config.h.unix new file mode 100644 index 0000000..83b2f52 --- /dev/null +++ b/vcpkg/ports/pango/config.h.unix @@ -0,0 +1,153 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Have usable Cairo library and font backend */ +#define HAVE_CAIRO 1 + +/* Whether Cairo can use FreeType for fonts */ +#define HAVE_CAIRO_FREETYPE 1 + +/* Whether Cairo has PDF support */ +/* #undef HAVE_CAIRO_PDF */ + +/* Whether Cairo has PNG support */ +/* #undef HAVE_CAIRO_PNG */ + +/* Whether Cairo has PS support */ +/* #undef HAVE_CAIRO_PS */ + +/* Whether Cairo can use Quartz for fonts */ +/* #undef HAVE_CAIRO_QUARTZ */ + +/* Whether Cairo can use the Win32 GDI for fonts */ +/* #undef HAVE_CAIRO_WIN32 */ + +/* Whether Cairo has Xlib support */ +/* #undef HAVE_CAIRO_XLIB */ + +/* Whether CoreText is available on the system */ +#ifdef __APPLE_CC__ + #define HAVE_CORE_TEXT 1 +#else + #undef HAVE_CORE_TEXT +#endif + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the `FcWeightFromOpenType' function. */ +/* #undef HAVE_FCWEIGHTFROMOPENTYPE */ + +/* Define to 1 if you have the `flockfile' function. */ +#define HAVE_FLOCKFILE 1 + +/* Have FreeType 2 library */ +#define HAVE_FREETYPE 1 + +/* Define to 1 if you have the `getpagesize' function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Whether libthai is available */ +/* #undef HAVE_LIBTHAI */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strtok_r' function. */ +#define HAVE_STRTOK_R 1 + +/* Define to 1 if you have the `sysconf' function. */ +#define HAVE_SYSCONF 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Have Xft library */ +/* #undef HAVE_XFT */ + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +#define PACKAGE "pango" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "http://bugzilla.gnome.org/enter_bug.cgi?product=pango" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "pango" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "pango 1.40.11" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "pango" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "1.40.11" + +/* PANGO binary age */ +#define PANGO_BINARY_AGE 4011 + +/* PANGO interface age */ +#define PANGO_INTERFACE_AGE 11 + +/* PANGO major version */ +#define PANGO_VERSION_MAJOR 1 + +/* PANGO micro version */ +#define PANGO_VERSION_MICRO 11 + +/* PANGO minor version */ +#define PANGO_VERSION_MINOR 40 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Version number of package */ +#define VERSION "1.40.11" + +/* defines how to decorate public symbols while building */ +#define _PANGO_EXTERN __attribute__((visibility("default"))) extern diff --git a/vcpkg/ports/pango/portfile.cmake b/vcpkg/ports/pango/portfile.cmake new file mode 100644 index 0000000..475d49f --- /dev/null +++ b/vcpkg/ports/pango/portfile.cmake @@ -0,0 +1,26 @@ +set(PANGO_VERSION 1.40.11) +vcpkg_download_distfile(ARCHIVE + URLS "http://ftp.gnome.org/pub/GNOME/sources/pango/1.40/pango-${PANGO_VERSION}.tar.xz" + FILENAME "pango-${PANGO_VERSION}.tar.xz" + SHA512 e4ac40f8da9c326e1e4dfaf4b1d2070601b17f88f5a12991a9a8bbc58bb08640404e2a794a5c68c5ebb2e7e80d9c186d4b26cd417bb63a23f024ef8a38bb152a) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${PANGO_VERSION} + PATCHES 0001-fix-static-symbols-export.diff +) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.unix DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DPANGO_SKIP_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/pangolin/CONTROL b/vcpkg/ports/pangolin/CONTROL new file mode 100644 index 0000000..5fb73b0 --- /dev/null +++ b/vcpkg/ports/pangolin/CONTROL @@ -0,0 +1,7 @@ +Source: pangolin +Version: 0.5 +Port-Version: 10 +Build-Depends: eigen3, glew, libpng, libjpeg-turbo, ffmpeg +Homepage: https://github.com/stevenlovegrove/Pangolin +Description: Lightweight GUI Library +Supports: !uwp & !osx & !(windows&static) diff --git a/vcpkg/ports/pangolin/deprecated_constants.patch b/vcpkg/ports/pangolin/deprecated_constants.patch new file mode 100644 index 0000000..813d236 --- /dev/null +++ b/vcpkg/ports/pangolin/deprecated_constants.patch @@ -0,0 +1,69 @@ +diff --git a/src/video/drivers/ffmpeg.cpp b/src/video/drivers/ffmpeg.cpp +index 435225d..ff30349 100644 +--- a/src/video/drivers/ffmpeg.cpp ++++ b/src/video/drivers/ffmpeg.cpp +@@ -34,6 +34,8 @@ extern "C" + #include + } + ++#define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER ++ + namespace pangolin + { + +@@ -74,8 +76,10 @@ std::string FfmpegFmtToString(const AVPixelFormat fmt) + TEST_PIX_FMT_RETURN(YUVJ420P); + TEST_PIX_FMT_RETURN(YUVJ422P); + TEST_PIX_FMT_RETURN(YUVJ444P); ++#ifdef FF_API_XVMC + TEST_PIX_FMT_RETURN(XVMC_MPEG2_MC); + TEST_PIX_FMT_RETURN(XVMC_MPEG2_IDCT); ++#endif + TEST_PIX_FMT_RETURN(UYVY422); + TEST_PIX_FMT_RETURN(UYYVYY411); + TEST_PIX_FMT_RETURN(BGR8); +@@ -95,11 +99,13 @@ std::string FfmpegFmtToString(const AVPixelFormat fmt) + TEST_PIX_FMT_RETURN(YUV440P); + TEST_PIX_FMT_RETURN(YUVJ440P); + TEST_PIX_FMT_RETURN(YUVA420P); ++#ifdef FF_API_VDPAU + TEST_PIX_FMT_RETURN(VDPAU_H264); + TEST_PIX_FMT_RETURN(VDPAU_MPEG1); + TEST_PIX_FMT_RETURN(VDPAU_MPEG2); + TEST_PIX_FMT_RETURN(VDPAU_WMV3); + TEST_PIX_FMT_RETURN(VDPAU_VC1); ++#endif + TEST_PIX_FMT_RETURN(RGB48BE ); + TEST_PIX_FMT_RETURN(RGB48LE ); + TEST_PIX_FMT_RETURN(RGB565BE); +@@ -119,7 +125,9 @@ std::string FfmpegFmtToString(const AVPixelFormat fmt) + TEST_PIX_FMT_RETURN(YUV422P16BE); + TEST_PIX_FMT_RETURN(YUV444P16LE); + TEST_PIX_FMT_RETURN(YUV444P16BE); ++#ifdef FF_API_VDPAU + TEST_PIX_FMT_RETURN(VDPAU_MPEG4); ++#endif + TEST_PIX_FMT_RETURN(DXVA2_VLD); + TEST_PIX_FMT_RETURN(RGB444BE); + TEST_PIX_FMT_RETURN(RGB444LE); +@@ -559,7 +567,8 @@ void FfmpegVideoOutputStream::WriteFrame(AVFrame* frame) + + int ret; + int got_packet = 1; +- ++ ++#if FF_API_LAVF_FMT_RAWPICTURE + // Setup AVPacket + if (recorder.oc->oformat->flags & AVFMT_RAWPICTURE) { + /* Raw video case - directly store the picture in the packet */ +@@ -569,6 +578,10 @@ void FfmpegVideoOutputStream::WriteFrame(AVFrame* frame) + pkt.pts = frame->pts; + ret = 0; + } else { ++#else ++ { ++#endif ++ + /* encode the image */ + #if (LIBAVFORMAT_VERSION_MAJOR >= 54) + ret = avcodec_encode_video2(stream->codec, &pkt, frame, &got_packet); diff --git a/vcpkg/ports/pangolin/fix-dependency-python.patch b/vcpkg/ports/pangolin/fix-dependency-python.patch new file mode 100644 index 0000000..67eae12 --- /dev/null +++ b/vcpkg/ports/pangolin/fix-dependency-python.patch @@ -0,0 +1,14 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 7f364a7..9e0baac 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -213,6 +213,9 @@ endif() + find_package(PythonLibs QUIET) + if(BUILD_PANGOLIN_GUI AND BUILD_PANGOLIN_VARS AND PYTHONLIBS_FOUND AND NOT _WIN_) + set(HAVE_PYTHON 1) ++ if (UNIX) ++ set(PYTHON_LIBRARY ${PYTHON_LIBRARY} dl util) ++ endif() + list(APPEND HEADERS + ${INCDIR}/console/ConsoleInterpreter.h + ${INCDIR}/console/ConsoleView.h diff --git a/vcpkg/ports/pangolin/fix-dependeny-ffmpeg.patch b/vcpkg/ports/pangolin/fix-dependeny-ffmpeg.patch new file mode 100644 index 0000000..2c52bb7 --- /dev/null +++ b/vcpkg/ports/pangolin/fix-dependeny-ffmpeg.patch @@ -0,0 +1,50 @@ +diff --git a/CMakeModules/FindFFMPEG.cmake b/CMakeModules/FindFFMPEG.cmake +index 4f77e5a..151762f 100644 +--- a/CMakeModules/FindFFMPEG.cmake ++++ b/CMakeModules/FindFFMPEG.cmake +@@ -21,6 +21,14 @@ FIND_PATH( + SWSCALE_INCLUDE_DIR libswscale/swscale.h + /usr/include /usr/local/include /opt/local/include + ) ++FIND_PATH( ++ AVDEVICE_INCLUDE_DIR libavdevice/avdevice.h ++ /usr/include /usr/local/include /opt/local/include ++) ++FIND_PATH( ++ SWRESAMPLE_INCLUDE_DIR libswresample/swresample.h ++ /usr/include /usr/local/include /opt/local/include ++) + + # Find Library files + FIND_LIBRARY( +@@ -43,15 +51,28 @@ FIND_LIBRARY( + NAMES swscale + PATH /usr/lib /usr/local/lib /opt/local/lib + ) ++FIND_LIBRARY( ++ AVDEVICE_LIBRARY ++ NAMES avdevice ++ PATH /usr/lib /usr/local/lib /opt/local/lib ++) ++FIND_LIBRARY( ++ SWRESAMPLE_LIBRARY ++ NAMES swresample ++ PATH /usr/lib /usr/local/lib /opt/local/lib ++) + + IF( EXISTS "${AVUTIL_INCLUDE_DIR}/libavutil/pixdesc.h" ) + SET( AVUTIL_HAVE_PIXDESC TRUE) + endif() + + IF(AVCODEC_INCLUDE_DIR AND AVFORMAT_INCLUDE_DIR AND AVUTIL_INCLUDE_DIR AND SWSCALE_INCLUDE_DIR AND AVCODEC_LIBRARY AND AVFORMAT_LIBRARY AND AVUTIL_LIBRARY AND SWSCALE_LIBRARY AND AVUTIL_HAVE_PIXDESC) ++ IF (WIN32) ++ SET(AVFORMAT_LIBRARY ${AVFORMAT_LIBRARY} Ws2_32 Secur32 Bcrypt) ++ ENDIF() + SET(FFMPEG_FOUND TRUE) +- SET(FFMPEG_LIBRARIES ${AVCODEC_LIBRARY} ${AVFORMAT_LIBRARY} ${AVUTIL_LIBRARY} ${SWSCALE_LIBRARY}) +- SET(FFMPEG_INCLUDE_DIRS ${AVCODEC_INCLUDE_DIR} ${AVFORMAT_INCLUDE_DIR} ${AVUTIL_INCLUDE_DIR} ${SWSCALE_INCLUDE_DIR}) ++ SET(FFMPEG_LIBRARIES ${AVFORMAT_LIBRARY} ${AVDEVICE_LIBRARY} ${AVCODEC_LIBRARY} ${AVUTIL_LIBRARY} ${SWSCALE_LIBRARY} ${SWRESAMPLE_LIBRARY}) ++ SET(FFMPEG_INCLUDE_DIRS ${AVCODEC_INCLUDE_DIR} ${AVFORMAT_INCLUDE_DIR} ${AVUTIL_INCLUDE_DIR} ${SWSCALE_INCLUDE_DIR} ${AVDEVICE_INCLUDE_DIR} ${SWRESAMPLE_INCLUDE_DIR}) + + include(CheckCXXSourceCompiles) + diff --git a/vcpkg/ports/pangolin/fix-includepath-error.patch b/vcpkg/ports/pangolin/fix-includepath-error.patch new file mode 100644 index 0000000..debb334 --- /dev/null +++ b/vcpkg/ports/pangolin/fix-includepath-error.patch @@ -0,0 +1,13 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index dd08d31..7f364a7 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -506,7 +506,7 @@ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake @ONLY IMMEDIATE ) + + # Install tree config +-set( EXPORT_LIB_INC_DIR "\${PROJECT_CMAKE_DIR}/${REL_INCLUDE_DIR}" ) ++set( EXPORT_LIB_INC_DIR "\${PROJECT_CMAKE_DIR}/../../include" ) + configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}Config.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PROJECT_NAME}Config.cmake @ONLY ) + diff --git a/vcpkg/ports/pangolin/portfile.cmake b/vcpkg/ports/pangolin/portfile.cmake new file mode 100644 index 0000000..682262e --- /dev/null +++ b/vcpkg/ports/pangolin/portfile.cmake @@ -0,0 +1,62 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO stevenlovegrove/Pangolin + REF v0.5 + SHA512 7ebeec108f33f1aa8b1ad08e3ca128a837b22d33e3fc580021f981784043b023a1bf563bbfa8b51d46863db770b336d24fc84ee3d836b85e0da1848281b2a5b2 + HEAD_REF master + PATCHES + deprecated_constants.patch # Change from upstream pangolin to address build failures from latest ffmpeg library + fix-includepath-error.patch # include path has one more ../ + fix-dependeny-ffmpeg.patch + fix-dependency-python.patch +) + +file(REMOVE ${SOURCE_PATH}/CMakeModules/FindGLEW.cmake) + +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" MSVC_USE_STATIC_CRT) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_EXTERN_GLEW=OFF + -DBUILD_EXTERN_LIBPNG=OFF + -DBUILD_EXTERN_LIBJPEG=OFF + -DMSVC_USE_STATIC_CRT=${MSVC_USE_STATIC_CRT} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Pangolin) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(GLOB EXE ${CURRENT_PACKAGES_DIR}/lib/*.dll) + file(COPY ${EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${EXE}) + + file(GLOB DEBUG_EXE ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) + file(COPY ${DEBUG_EXE} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${DEBUG_EXE}) + + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-debug.cmake + "lib/pangolin.dll" "bin/pangolin.dll" + ) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/pangolin/PangolinTargets-release.cmake + "lib/pangolin.dll" "bin/pangolin.dll" + ) +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + # Copy missing header file + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/src/include/pangolin/pangolin_export.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/pangolin) +endif() + +# Put the license file where vcpkg expects it +file(COPY ${CURRENT_PORT_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/) +file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/pangolin/usage b/vcpkg/ports/pangolin/usage new file mode 100644 index 0000000..93db9b7 --- /dev/null +++ b/vcpkg/ports/pangolin/usage @@ -0,0 +1,5 @@ +The package pangolin is compatible with built-in CMake targets: + + find_package(Pangolin CONFIG REQUIRED) + target_link_libraries(main PRIVATE pangolin) + target_include_directories(main PRIVATE ${Pangolin_INCLUDE_DIRS}) diff --git a/vcpkg/ports/pangomm/CONTROL b/vcpkg/ports/pangomm/CONTROL new file mode 100644 index 0000000..46f41db --- /dev/null +++ b/vcpkg/ports/pangomm/CONTROL @@ -0,0 +1,5 @@ +Source: pangomm +Version: 2.40.1-3 +Homepage: https://ftp.gnome.org/pub/GNOME/sources/pangomm +Description: pangomm is the official C++ interface for the Pango font layout library. See, for instance, the Pango::Layout class. +Build-Depends: glib, gettext, cairo, fontconfig, freetype, harfbuzz, pango, cairomm, glibmm diff --git a/vcpkg/ports/pangomm/COPYING b/vcpkg/ports/pangomm/COPYING new file mode 100644 index 0000000..c4792dd --- /dev/null +++ b/vcpkg/ports/pangomm/COPYING @@ -0,0 +1,515 @@ + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations +below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. +^L + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. +^L + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control +compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. +^L + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. +^L + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. +^L + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. +^L + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply, and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License +may add an explicit geographical distribution limitation excluding those +countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. +^L + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS +^L + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms +of the ordinary General Public License). + + To apply these terms, attach the following notices to the library. +It is safest to attach them to the start of each source file to most +effectively convey the exclusion of warranty; and each file should +have at least the "copyright" line and a pointer to where the full +notice is found. + + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper +mail. + +You should also get your employer (if you work as a programmer) or +your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James +Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/vcpkg/ports/pangomm/fix_charset.patch b/vcpkg/ports/pangomm/fix_charset.patch new file mode 100644 index 0000000..d57063c --- /dev/null +++ b/vcpkg/ports/pangomm/fix_charset.patch @@ -0,0 +1,110 @@ +diff --git a/MSVC_Net2013/gendef.vcxproj b/MSVC_Net2013/gendef.vcxproj +index ceca956..c29a2a1 100644 +--- a/MSVC_Net2013/gendef.vcxproj ++++ b/MSVC_Net2013/gendef.vcxproj +@@ -21,26 +21,27 @@ + + {07324745-C9BE-4D65-B08A-9C88188C0C28} + Win32Proj ++ 8.1 + + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + + Application +- MultiByte ++ Unicode + v120 + + +diff --git a/MSVC_Net2013/install.vcxproj b/MSVC_Net2013/install.vcxproj +index fecde32..8f97675 100644 +--- a/MSVC_Net2013/install.vcxproj ++++ b/MSVC_Net2013/install.vcxproj +@@ -22,28 +22,29 @@ + {2093D218-190E-4194-9421-3BA7CBF33B10} + install + Win32Proj ++ 8.1 + + + + Utility +- MultiByte ++ Unicode + true + v120 + + + Utility +- MultiByte ++ Unicode + v120 + + + Utility +- MultiByte ++ Unicode + true + v120 + + + Utility +- MultiByte ++ Unicode + v120 + + +diff --git a/MSVC_Net2013/pangomm.vcxproj b/MSVC_Net2013/pangomm.vcxproj +index aa03fad..d63becf 100644 +--- a/MSVC_Net2013/pangomm.vcxproj ++++ b/MSVC_Net2013/pangomm.vcxproj +@@ -23,26 +23,27 @@ + {A93D607A-5C37-4AEC-BA08-6A655F6DC834} + pangomm + Win32Proj ++ 8.1 + + + + DynamicLibrary +- MultiByte ++ Unicode + v120 + + + DynamicLibrary +- MultiByte ++ Unicode + v120 + + + DynamicLibrary +- MultiByte ++ Unicode + v120 + + + DynamicLibrary +- MultiByte ++ Unicode + v120 + + diff --git a/vcpkg/ports/pangomm/fix_properties.patch b/vcpkg/ports/pangomm/fix_properties.patch new file mode 100644 index 0000000..22ee67b --- /dev/null +++ b/vcpkg/ports/pangomm/fix_properties.patch @@ -0,0 +1,75 @@ +diff --git a/MSVC_Net2013/pangomm-build-defines.props b/MSVC_Net2013/pangomm-build-defines.props +index 3c3108d..f30890b 100644 +--- a/MSVC_Net2013/pangomm-build-defines.props ++++ b/MSVC_Net2013/pangomm-build-defines.props +@@ -5,8 +5,6 @@ + + + PANGOMM_BUILD +- glibmm-vc$(VSVer)0-2_4.lib;cairomm-vc$(VSVer)0-1_0.lib;sigc-vc$(VSVer)0-2_0.lib +- glibmm-vc$(VSVer)0-d-2_4.lib;cairomm-vc$(VSVer)0-d-1_0.lib;sigc-vc$(VSVer)0-d-2_0.lib + + + <_PropertySheetDisplayName>panogmmbuilddefinesprops +@@ -15,14 +13,14 @@ + + + +- .\pangomm;..\pango;$(GlibEtcInstallRoot)\include\glibmm-2.4;$(GlibEtcInstallRoot)\lib\glibmm-2.4\include;$(GlibEtcInstallRoot)\include\cairomm-1.0;$(GlibEtcInstallRoot)\lib\cairomm-1.0\include;$(GlibEtcInstallRoot)\include\sigc++-2.0;$(GlibEtcInstallRoot)\lib\sigc++-2.0\include;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories) ++ .\pangomm;..\pango;.;%(AdditionalIncludeDirectories) + msvc_recommended_pragmas.h;%(ForcedIncludeFiles) + true + /d2Zi+ %(AdditionalOptions) + + +- pangocairo-1.0.lib;pango-1.0.lib;gobject-2.0.lib;gmodule-2.0.lib;glib-2.0.lib;%(AdditionalDependencies) +- $(GlibEtcInstallRoot)\lib;%(AdditionalLibraryDirectories) ++ %(AdditionalDependencies) ++ %(AdditionalLibraryDirectories) + + + +diff --git a/MSVC_Net2013/pangomm-version-paths.props b/MSVC_Net2013/pangomm-version-paths.props +index b287629..01a267e 100644 +--- a/MSVC_Net2013/pangomm-version-paths.props ++++ b/MSVC_Net2013/pangomm-version-paths.props +@@ -2,13 +2,9 @@ + + + 12 +- $(SolutionDir)\..\..\vs$(VSVer)\$(Platform) +- $(GlibEtcInstallRoot) + $(SolutionDir)$(Configuration)\$(Platform)\obj\$(ProjectName)\ + 1 + 4 +- -vc$(VSVer)0-$(ApiMajorVersion)_$(ApiMinorVersion) +- -vc$(VSVer)0-d-$(ApiMajorVersion)_$(ApiMinorVersion) + + + <_PropertySheetDisplayName>pangommversionpathsprops +@@ -17,12 +13,6 @@ + + $(VSVer) + +- +- $(GlibEtcInstallRoot) +- +- +- $(CopyDir) +- + + $(DefDir) + +@@ -32,11 +22,5 @@ + + $(ApiMinorVersion) + +- +- $(ReleaseDllSuffix) +- +- +- $(DebugDllSuffix) +- + + +\ No newline at end of file diff --git a/vcpkg/ports/pangomm/msvc_recommended_pragmas.h b/vcpkg/ports/pangomm/msvc_recommended_pragmas.h new file mode 100644 index 0000000..c0eb1d5 --- /dev/null +++ b/vcpkg/ports/pangomm/msvc_recommended_pragmas.h @@ -0,0 +1,34 @@ +#ifndef _MSC_VER +#pragma error "This header is for Microsoft VC only." +#endif /* _MSC_VER */ + +/* Make MSVC more pedantic, this is a recommended pragma list + * from _Win32_Programming_ by Rector and Newcomer. + */ +#pragma warning(error:4002) /* too many actual parameters for macro */ +#pragma warning(error:4003) /* not enough actual parameters for macro */ +#pragma warning(1:4010) /* single-line comment contains line-continuation character */ +#pragma warning(error:4013) /* 'function' undefined; assuming extern returning int */ +#pragma warning(1:4016) /* no function return type; using int as default */ +#pragma warning(error:4020) /* too many actual parameters */ +#pragma warning(error:4021) /* too few actual parameters */ +#pragma warning(error:4027) /* function declared without formal parameter list */ +#pragma warning(error:4029) /* declared formal parameter list different from definition */ +#pragma warning(error:4033) /* 'function' must return a value */ +#pragma warning(error:4035) /* 'function' : no return value */ +#pragma warning(error:4045) /* array bounds overflow */ +#pragma warning(error:4047) /* different levels of indirection */ +#pragma warning(error:4049) /* terminating line number emission */ +#pragma warning(error:4053) /* An expression of type void was used as an operand */ +#pragma warning(error:4071) /* no function prototype given */ +#pragma warning(disable:4101) /* unreferenced local variable */ +#pragma warning(error:4150) + +#pragma warning(disable:4244) /* No possible loss of data warnings */ +#pragma warning(disable:4305) /* No truncation from int to char warnings */ + +#pragma warning(error:4819) /* The file contains a character that cannot be represented in the current code page */ + +/* work around Microsoft's premature attempt to deprecate the C-Library */ +#define _CRT_SECURE_NO_WARNINGS +#define _CRT_NONSTDC_NO_WARNINGS diff --git a/vcpkg/ports/pangomm/portfile.cmake b/vcpkg/ports/pangomm/portfile.cmake new file mode 100644 index 0000000..1e2cefa --- /dev/null +++ b/vcpkg/ports/pangomm/portfile.cmake @@ -0,0 +1,65 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64") + +vcpkg_download_distfile(ARCHIVE + URLS "http://ftp.gnome.org/pub/GNOME/sources/pangomm/2.40/pangomm-2.40.1.tar.xz" + FILENAME "pangomm-2.40.1.tar.xz" + SHA512 bed19800b76e69cc51abeb5997bdc2f687f261ebcbe36aeee51f1fbf5010a46f4b9469033c34a912502001d9985135fd5c7f7574d3de8ba33cc5832520c6aa6f +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + fix_properties.patch + fix_charset.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/msvc_recommended_pragmas.h DESTINATION ${SOURCE_PATH}/MSVC_Net2013) + +set(VS_PLATFORM ${VCPKG_TARGET_ARCHITECTURE}) +if(${VCPKG_TARGET_ARCHITECTURE} STREQUAL x86) + set(VS_PLATFORM "Win32") +endif() + +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/MSVC_Net2013/pangomm.sln + TARGET pangomm + PLATFORM ${VS_PLATFORM} + USE_VCPKG_INTEGRATION +) + +# Handle headers +file(COPY ${SOURCE_PATH}/MSVC_Net2013/pangomm/pangommconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/pango/pangomm.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file( + COPY + ${SOURCE_PATH}/pango/pangomm + DESTINATION ${CURRENT_PACKAGES_DIR}/include + FILES_MATCHING PATTERN *.h +) + +# Handle libraries +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/pangomm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Release/${VS_PLATFORM}/bin/pangomm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/pangomm.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin +) +file( + COPY + ${SOURCE_PATH}/MSVC_Net2013/Debug/${VS_PLATFORM}/bin/pangomm.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/parallel-hashmap/CONTROL b/vcpkg/ports/parallel-hashmap/CONTROL new file mode 100644 index 0000000..1732e09 --- /dev/null +++ b/vcpkg/ports/parallel-hashmap/CONTROL @@ -0,0 +1,3 @@ +Source: parallel-hashmap +Version: 1.32 +Description: A header-only, very fast and memory-friendly family of C++ hash maps. diff --git a/vcpkg/ports/parallel-hashmap/portfile.cmake b/vcpkg/ports/parallel-hashmap/portfile.cmake new file mode 100644 index 0000000..01a7e1b --- /dev/null +++ b/vcpkg/ports/parallel-hashmap/portfile.cmake @@ -0,0 +1,24 @@ +#header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO greg7mdp/parallel-hashmap + REF 1.32 + SHA512 838358bf5899876a53accea8a10e051d35189b4105b6bc01dfe4f3ff01fdbe68986efb36341cc3082bc58419be33735e76350a2fd9501c2cace153f9d4321f24 + HEAD_REF master +) + +# Use greg7mdp/parallel-hashmap's own build process, skipping examples and tests +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) +vcpkg_install_cmake() + +# Delete redundant directories +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/share/doc) + +file(COPY ${SOURCE_PATH}/phmap.natvis DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Put the licence file where vcpkg expects it +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/parallelstl/CONTROL b/vcpkg/ports/parallelstl/CONTROL new file mode 100644 index 0000000..4b7b054 --- /dev/null +++ b/vcpkg/ports/parallelstl/CONTROL @@ -0,0 +1,5 @@ +Source: parallelstl +Version: 20200330 +Homepage: https://github.com/intel/parallelstl +Description: Parallel STL is an implementation of the C++ standard library algorithms with support for execution policies, as specified in ISO/IEC 14882:2017 standard, commonly called C++17. +Build-Depends: tbb \ No newline at end of file diff --git a/vcpkg/ports/parallelstl/fix-cmakelist.patch b/vcpkg/ports/parallelstl/fix-cmakelist.patch new file mode 100644 index 0000000..01a2c22 --- /dev/null +++ b/vcpkg/ports/parallelstl/fix-cmakelist.patch @@ -0,0 +1,32 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 878b212..caa3cba 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -44,7 +44,7 @@ add_library(pstl::ParallelSTL ALIAS ParallelSTL) + if (PARALLELSTL_USE_PARALLEL_POLICIES) + message(STATUS "Using Parallel Policies") + if (PARALLELSTL_BACKEND STREQUAL "tbb") +- find_package(TBB 2018 REQUIRED tbb OPTIONAL_COMPONENTS tbbmalloc) ++ find_package(TBB CONFIG REQUIRED tbb OPTIONAL_COMPONENTS tbbmalloc) + message(STATUS "Parallel STL uses TBB ${TBB_VERSION} (interface version: ${TBB_INTERFACE_VERSION})") + target_link_libraries(ParallelSTL INTERFACE TBB::tbb) + else() +@@ -64,8 +64,7 @@ target_include_directories(ParallelSTL + INTERFACE + $ + $ +- $ +- $) ++ $) + + target_compile_features(ParallelSTL + INTERFACE +@@ -100,6 +99,8 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ParallelSTLConfig.cmake" + DESTINATION lib/cmake/ParallelSTL) + install(DIRECTORY include/pstl + DESTINATION include) ++file(GLOB STDLIB_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/stdlib/pstl/*) ++install(FILES ${STDLIB_HEADERS} DESTINATION include/pstl) + + add_custom_target(install-pstl + COMMAND "${CMAKE_COMMAND}" -P "${PROJECT_BINARY_DIR}/cmake_install.cmake" -DCOMPONENT=ParallelSTL) diff --git a/vcpkg/ports/parallelstl/portfile.cmake b/vcpkg/ports/parallelstl/portfile.cmake new file mode 100644 index 0000000..a082b8b --- /dev/null +++ b/vcpkg/ports/parallelstl/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO intel/parallelstl + REF 0241743d73bb405b16d9c4a24b693e4533dc34a7 # 20200330 + SHA512 cd2f1b60639e9da35a722bdef0bc6420ddca064e3bff979d8a6ea591fb43865b7614c811bced642fd5ff1fab659da1dfaa248dc2b321db7f27d0e74544a2f21e + HEAD_REF master + PATCHES + fix-cmakelist.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPARALLELSTL_USE_PARALLEL_POLICIES=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/ParallelSTL) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/paraview/CONTROL b/vcpkg/ports/paraview/CONTROL new file mode 100644 index 0000000..d40b55a --- /dev/null +++ b/vcpkg/ports/paraview/CONTROL @@ -0,0 +1,29 @@ +Source: paraview +Version: 5.8.0 +Port-Version: 3 +Homepage: https://www.paraview.org/ +Description: VTK-based Data Analysis and Visualization Application +Build-Depends: vtk[core,paraview], protobuf, cgns, boost-core, boost-format, boost-algorithm + +Feature: vtkm +Description: enables vtkm for the build of paraview +Build-Depends: vtk[core,vtkm] + +Feature: python +Description: enables the build of python wrappers +Build-Depends: vtk[core,python] + +Feature: cuda +Description: enables cuda within paraview +Build-Depends: cuda, vtk[core, cuda] + +Feature: mpi +Description: enables cuda within paraview +Build-Depends: hdf5[core,parallel], vtk[core, mpi] + +Feature: tools +Description: Build paraview tools + +Feature: all_modules +Description: enables the build of all paraview modules +Build-Depends: gdal, pdal, ffmpeg, laszip diff --git a/vcpkg/ports/paraview/VisIt_Build.patch b/vcpkg/ports/paraview/VisIt_Build.patch new file mode 100644 index 0000000..fb676a7 --- /dev/null +++ b/vcpkg/ports/paraview/VisIt_Build.patch @@ -0,0 +1,107 @@ +diff --git a/databases/readers/CEAucd/vtkCEAucdReader.C b/databases/readers/CEAucd/vtkCEAucdReader.C +index 0ad9a828a..cf37beb86 100644 +--- a/databases/readers/CEAucd/vtkCEAucdReader.C ++++ b/databases/readers/CEAucd/vtkCEAucdReader.C +@@ -172,7 +172,7 @@ const char *vtkCEAucdReader::GetByteOrderAsString() + } + } + +-void vtkCEAucdReader::SetFileStream( ifstream* istr ) ++void vtkCEAucdReader::SetFileStream( std::ifstream* istr ) + { + if( istr == this->FileStream ) return; + +@@ -311,9 +311,9 @@ int vtkCEAucdReader::RequestInformation( + { + vtkDebugMacro(<<"Open file "<FileName<<"\n"); + #ifdef _WIN32 +- this->FileStream = new ifstream(this->FileName, ios::in | ios::binary); ++ this->FileStream = new std::ifstream(this->FileName, std::ios::in | std::ios::binary); + #else +- this->FileStream = new ifstream(this->FileName, ios::in); ++ this->FileStream = new std::ifstream(this->FileName, std::ios::in); + #endif + } + +@@ -340,7 +340,7 @@ int vtkCEAucdReader::RequestInformation( + vtkDebugMacro(<<"Re-open file "<FileName<<" in ASCII mode"); + delete this->FileStream; // close file to reopen it later + this->FileStream = NULL; +- this->FileStream = new ifstream(this->FileName, ios::in); ++ this->FileStream = new std::ifstream(this->FileName, std::ios::in); + } + + char c='\0', buf[100]; +diff --git a/databases/readers/CEAucd/vtkCEAucdReader.h b/databases/readers/CEAucd/vtkCEAucdReader.h +index c3a86c16b..434556488 100644 +--- a/databases/readers/CEAucd/vtkCEAucdReader.h ++++ b/databases/readers/CEAucd/vtkCEAucdReader.h +@@ -49,7 +49,7 @@ class vtkCEAucdReader : public vtkUnstructuredGridAlgorithm + public: + static vtkCEAucdReader *New(); + vtkTypeMacro(vtkCEAucdReader,vtkUnstructuredGridAlgorithm); +- void PrintSelf(ostream& os, vtkIndent indent) override; ++ void PrintSelf(std::ostream& os, vtkIndent indent) override; + + // Description: + // Specify file name of CEA UCD datafile to read +@@ -120,7 +120,7 @@ class vtkCEAucdReader : public vtkUnstructuredGridAlgorithm + vtkSetStringMacro(ActivePointArray); + vtkGetStringMacro(ActivePointArray); + +- void SetFileStream( ifstream* istr ); ++ void SetFileStream( std::ifstream* istr ); + + // Description: + // The following methods allow selective reading of solutions fields. by +@@ -173,7 +173,7 @@ class vtkCEAucdReader : public vtkUnstructuredGridAlgorithm + vtkIdType * PointsInMaterial; + vtkIdType * CellIndexInMaterial; + +- ifstream *FileStream; ++ std::ifstream *FileStream; + long GlobalOffset; + long FileSize; + bool OwnStream; +diff --git a/databases/readers/Image/vtkStimulateReader.C b/databases/readers/Image/vtkStimulateReader.C +index be91dc91e..aeec88891 100644 +--- a/databases/readers/Image/vtkStimulateReader.C ++++ b/databases/readers/Image/vtkStimulateReader.C +@@ -104,7 +104,6 @@ int vtkStimulateReader::OpenFile(void) + // Close file from any previous image + if (this->File) + { +- this->File->close(); + delete this->File; + this->File = NULL; + } +@@ -122,9 +121,9 @@ int vtkStimulateReader::OpenFile(void) + if ( !FileFunctions::VisItStat( sdt_name, &fs) ) + { + #ifdef _WIN32 +- this->File = new ifstream(sdt_name, ios::in | ios::binary); ++ this->File = new std::ifstream(sdt_name, std::ios::in | std::ios::binary); + #else +- this->File = new ifstream(sdt_name, ios::in); ++ this->File = new std::ifstream(sdt_name, std::ios::in); + #endif + } + if (! this->File || this->File->fail()) +@@ -246,7 +245,7 @@ int vtkStimulateReader::CanReadFile(const char* fname) + return 0; + } + +- ifstream sdt_file(sdt_name); ++ std::ifstream sdt_file(sdt_name); + if (sdt_file.fail()) + { + vtkErrorMacro(<<"Cannot read file: invalid sdt_file " << sdt_name); +@@ -266,7 +265,7 @@ bool vtkStimulateReader::ReadSPRFile(const char *spr_name) + haveReadSPRFile = true; + validSPRFile = false; + +- ifstream spr_file(spr_name); ++ std::ifstream spr_file(spr_name); + if (spr_file.fail()) + { + vtkErrorMacro(<<"Unable to read SPR file " << spr_name << ": file " diff --git a/vcpkg/ports/paraview/add-tools-option.patch b/vcpkg/ports/paraview/add-tools-option.patch new file mode 100644 index 0000000..86ba2c5 --- /dev/null +++ b/vcpkg/ports/paraview/add-tools-option.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8b33b25..10cadda 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -730,7 +730,10 @@ if (PARAVIEW_ENABLE_WEB) + @ONLY) + endif () + ++option(PARAVIEW_BUILD_TOOLS "Build paraview tools" OFF) ++if (PARAVIEW_BUILD_TOOLS) + add_subdirectory(Clients) ++endif() + + if (PARAVIEW_USE_PYTHON) + add_subdirectory(Wrapping/Python) diff --git a/vcpkg/ports/paraview/cgns.patch b/vcpkg/ports/paraview/cgns.patch new file mode 100644 index 0000000..2ebb05e --- /dev/null +++ b/vcpkg/ports/paraview/cgns.patch @@ -0,0 +1,29 @@ +diff --git a/CMake/FindCGNS.cmake b/CMake/FindCGNS.cmake +index 005f1afd9..a45103a9f 100644 +--- a/CMake/FindCGNS.cmake ++++ b/CMake/FindCGNS.cmake +@@ -16,7 +16,7 @@ mark_as_advanced(CGNS_INCLUDE_DIR) + + find_library(CGNS_LIBRARY + NAMES +- cgns ++ cgnsdll cgns + DOC "CGNS library") + mark_as_advanced(CGNS_LIBRARY) + +@@ -45,4 +45,15 @@ if (CGNS_FOUND) + IMPORTED_LOCATION "${CGNS_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${CGNS_INCLUDE_DIR}") + endif () ++ include(CMakeFindDependencyMacro) ++ find_dependency(hdf5 CONFIG) ++ if(TARGET hdf5::hdf5-shared) ++ set_property(TARGET CGNS::CGNS APPEND PROPERTY ++ INTERFACE_LINK_LIBRARIES "hdf5::hdf5-shared") ++ elseif(TARGET hdf5::hdf5-static) ++ set_property(TARGET CGNS::CGNS APPEND PROPERTY ++ INTERFACE_LINK_LIBRARIES "hdf5::hdf5-static") ++ else() ++ message(FATAL_ERROR "No HDF5 target to link cgns against") ++ endif() + endif () diff --git a/vcpkg/ports/paraview/paraview_build.patch b/vcpkg/ports/paraview/paraview_build.patch new file mode 100644 index 0000000..042bbe6 --- /dev/null +++ b/vcpkg/ports/paraview/paraview_build.patch @@ -0,0 +1,745 @@ +diff --git a/CMake/ParaViewClient.cmake b/CMake/ParaViewClient.cmake +index 7dadad937..dd271739d 100644 +--- a/CMake/ParaViewClient.cmake ++++ b/CMake/ParaViewClient.cmake +@@ -516,6 +516,7 @@ function (paraview_client_documentation) + NAMES xmlpatterns-qt5 xmlpatterns + HINTS "${Qt5_DIR}/../../../bin" + "${Qt5_DIR}/../../../libexec/qt5/bin" ++ "${Qt5_DIR}/../../../tools/qt5/bin" + DOC "Path to xmlpatterns") + mark_as_advanced(qt_xmlpatterns_executable) + +diff --git a/CMake/ParaViewOptions.cmake b/CMake/ParaViewOptions.cmake +index 5e402e9fc..ccb553e8f 100644 +--- a/CMake/ParaViewOptions.cmake ++++ b/CMake/ParaViewOptions.cmake +@@ -88,7 +88,7 @@ endif() + #======================================================================== + + # XXX(VTK): External VTK is not yet actually supported. +-if (FALSE) ++if (TRUE) + option(PARAVIEW_USE_EXTERNAL_VTK "Use an external VTK." OFF) + mark_as_advanced(PARAVIEW_USE_EXTERNAL_VTK) + else () +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d7e8f1dfe..8b0e7a8c6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -73,7 +73,9 @@ if (NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY) + endif () + + set(paraview_cmake_dir "${CMAKE_CURRENT_SOURCE_DIR}/CMake") +-set(vtk_cmake_dir "${CMAKE_CURRENT_SOURCE_DIR}/VTK/CMake") ++set(vtk_cmake_dir "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/vtk") ++string(REPLACE "/debug" "" vtk_cmake_dir "${vtk_cmake_dir}") ++message(STATUS "vtk_cmake_dir:${vtk_cmake_dir}") + list(APPEND CMAKE_MODULE_PATH + "${paraview_cmake_dir}" + "${vtk_cmake_dir}") +@@ -214,6 +216,7 @@ if (NOT WIN32) + endif () + endif () + ++message(STATUS "PARAVIEW_USE_EXTERNAL_VTK:${PARAVIEW_USE_EXTERNAL_VTK}") + if (PARAVIEW_USE_EXTERNAL_VTK) + find_package(VTK REQUIRED) + else () +@@ -369,9 +372,73 @@ endif () + + if (PARAVIEW_USE_EXTERNAL_VTK) + if (paraview_required_modules OR paraview_unrecognized_modules) +- message(FATAL_ERROR +- "The following modules were requested or required, but not found: " +- "${paraview_required_modules};${paraview_unrecognized_modules}.") ++ message(STATUS "REQUIRED:${paraview_required_modules}") ++ foreach(mod ${paraview_required_modules}) ++ if(NOT TARGET ${mod}) ++ message(STATUS "REQUIRED TARGET not defined: ${mod}") ++ list(APPEND modules_notarget ${mod}) ++ endif() ++ if(${mod} MATCHES "VTK::") # For better debugging ++ message(STATUS "VTK TARGET found: ${mod}") ++ list(APPEND vtk_modules ${mod}) ++ endif() ++ endforeach() ++ foreach(mod ${paraview_unrecognized_modules}) ++ if(NOT TARGET ${mod}) ++ message(STATUS "UNREC TARGET not defined: ${mod}") ++ list(FIND paraview_rejected_modules ${mod} _found_mod) ++ if(_found_mod GREATER_EQUAL 0) ++ message(STATUS "MODULE ${mod} not necessary; Removing from unrecognized") ++ list(APPEND _to_remove ${mod}) ++ endif() ++ else() ++ list(APPEND _to_remove ${mod}) ++ #list(APPEND vtk_modules ${mod}) #probably do not need to add unrecognized_modules to the wrapper ++ endif() ++ endforeach() ++ message(STATUS "UNRECOGNIZED:${paraview_unrecognized_modules}") ++ list(REMOVE_ITEM paraview_unrecognized_modules ${_to_remove}) ++ message(STATUS "REJECTED MODULES: ${paraview_rejected_modules}") ++ message(STATUS "UNRECOGNIZED WITHOUT REJECTED AND KNOWN TARGETS: ${paraview_unrecognized_modules}") ++ message(STATUS "ALL PROVIDED MODULES: ${paraview_modules}") ++ set(_unnecessary_moduls ${paraview_modules}) ++ list(REMOVE_ITEM _unnecessary_moduls ${paraview_required_modules}) ++ message(STATUS "Unnecessary MODULES: ${_unnecessary_moduls}") ++ if(modules_notarget) ++ message(FATAL_ERROR ++ "The following modules were requested or required, but not found: " ++ "${modules_notarget}") ++ endif() ++ list(REMOVE_DUPLICATES vtk_modules) ++ macro(search_dependent_targets) ++ set(vtk_mod_dep_list) ++ foreach(vtk_targ ${ARGN}) ++ get_target_property(vtk_mod_dep ${vtk_targ} "INTERFACE_vtk_module_depends") ++ if(vtk_mod_dep) ++ list(APPEND vtk_mod_dep_list ${vtk_mod_dep}) ++ endif() ++ get_target_property(vtk_mod_pdep ${vtk_targ} "INTERFACE_vtk_module_private_depends") ++ if(vtk_mod_pdep) ++ list(APPEND vtk_mod_dep_list ${vtk_mod_pdep}) ++ endif() ++ get_target_property(vtk_mod_odep ${vtk_targ} "INTERFACE_vtk_module_opional_depends") ++ if(vtk_mod_odep) ++ list(APPEND vtk_mod_dep_list ${vtk_mod_odep}) ++ endif() ++ if(vtk_mod_dep_list) ++ message(STATUS "Target ${vtk_targ} depends on ${vtk_mod_dep_list}") ++ list(REMOVE_ITEM vtk_mod_dep_list ${vtk_modules}) ++ if(vtk_mod_dep_list) ++ message(STATUS "Newly discovered modules: ${vtk_mod_dep_list}") ++ list(APPEND vtk_modules ${vtk_mod_dep_list}) ++ search_dependent_targets(${vtk_mod_dep_list}) ++ else() ++ message(STATUS "No new modules discovered!") ++ endif() ++ endif() ++ endforeach() ++ endmacro() ++ search_dependent_targets(${vtk_modules}) + endif () + + if (PARAVIEW_USE_PYTHON) +@@ -498,7 +565,7 @@ else () + TEST_INPUT_DATA_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/VTK/Testing" + TEST_OUTPUT_DATA_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/ExternalData/VTK/Testing") + +- if (NOT PARAVIEW_USE_EXTERNAL_VTK AND PARAVIEW_INSTALL_DEVELOPMENT_FILES) ++ if (PARAVIEW_INSTALL_DEVELOPMENT_FILES) + set(vtk_cmake_dir + "${CMAKE_CURRENT_SOURCE_DIR}/VTK/CMake") + set(vtk_cmake_destination +@@ -543,9 +610,11 @@ vtk_module_build( + TEST_OUTPUT_DATA_DIRECTORY "${paraview_test_data_directory_output}") + + include(vtkModuleJson) +-vtk_module_json( +- MODULES "${vtk_modules}" +- OUTPUT "vtk-modules.json") ++if(NOT PARAVIEW_USE_EXTERNAL_VTK) ++ vtk_module_json( ++ MODULES "${vtk_modules}" ++ OUTPUT "vtk-modules.json") ++endif() + vtk_module_json( + MODULES "${paraview_modules}" + OUTPUT "paraview-modules.json") +diff --git a/Plugins/AnalyzeNIfTIReaderWriter/NIfTIIO/vtkAnalyzeReader.cxx b/Plugins/AnalyzeNIfTIReaderWriter/NIfTIIO/vtkAnalyzeReader.cxx +index be318d6d4..80187dd69 100644 +--- a/Plugins/AnalyzeNIfTIReaderWriter/NIfTIIO/vtkAnalyzeReader.cxx ++++ b/Plugins/AnalyzeNIfTIReaderWriter/NIfTIIO/vtkAnalyzeReader.cxx +@@ -1381,8 +1381,8 @@ int vtkAnalyzeReader::CanReadFile(const char* fname) + return false; + } + +- ifstream local_InputStream; +- local_InputStream.open(HeaderFileName.c_str(), ios::in | ios::binary); ++ std::ifstream local_InputStream; ++ local_InputStream.open(HeaderFileName.c_str(), std::ios::in | std::ios::binary); + if (local_InputStream.fail()) + { + return false; +diff --git a/Plugins/AnalyzeNIfTIReaderWriter/NIfTIIO/vtkNIfTIReader.cxx b/Plugins/AnalyzeNIfTIReaderWriter/NIfTIIO/vtkNIfTIReader.cxx +index e7df3dacc..1bae5ae22 100644 +--- a/Plugins/AnalyzeNIfTIReaderWriter/NIfTIIO/vtkNIfTIReader.cxx ++++ b/Plugins/AnalyzeNIfTIReaderWriter/NIfTIIO/vtkNIfTIReader.cxx +@@ -1277,8 +1277,8 @@ int vtkNIfTIReader::CanReadFile(const char* fname) + return false; + } + +- ifstream local_InputStream; +- local_InputStream.open(HeaderFileName.c_str(), ios::in | ios::binary); ++ std::ifstream local_InputStream; ++ local_InputStream.open(HeaderFileName.c_str(), std::ios::in | std::ios::binary); + if (local_InputStream.fail()) + { + return false; +diff --git a/Qt/Components/pqCustomFilterManager.cxx b/Qt/Components/pqCustomFilterManager.cxx +index 4c6911ac8..b04828168 100644 +--- a/Qt/Components/pqCustomFilterManager.cxx ++++ b/Qt/Components/pqCustomFilterManager.cxx +@@ -214,7 +214,7 @@ void pqCustomFilterManager::exportSelected(const QStringList& files) + QStringList::ConstIterator jter = files.begin(); + for (; jter != files.end(); ++jter) + { +- ofstream os((*jter).toLocal8Bit().data(), ios::out); ++ std::ofstream os((*jter).toLocal8Bit().data(), std::ios::out); + root->PrintXML(os, vtkIndent()); + } + +diff --git a/Qt/Components/pqPresetDialog.cxx b/Qt/Components/pqPresetDialog.cxx +index 411480e3e..af0195763 100644 +--- a/Qt/Components/pqPresetDialog.cxx ++++ b/Qt/Components/pqPresetDialog.cxx +@@ -952,7 +952,7 @@ void pqPresetDialog::exportPresets() + } + assert(presetCollection.size() > 0); + +- ofstream outfs; ++ std::ofstream outfs; + outfs.open(filename.toStdString().c_str()); + if (!outfs.is_open()) + { +diff --git a/Qt/Core/pqCoreTestUtility.cxx b/Qt/Core/pqCoreTestUtility.cxx +index 95c7df5b6..00f61e2f8 100644 +--- a/Qt/Core/pqCoreTestUtility.cxx ++++ b/Qt/Core/pqCoreTestUtility.cxx +@@ -45,7 +45,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include "QtTestingConfigure.h" + + #include "QVTKOpenGLNativeWidget.h" +-#include "QVTKOpenGLWidget.h" ++#include "QVTKOpenGLStereoWidget.h" + #include "pqApplicationCore.h" + #include "pqCollaborationEventPlayer.h" + #include "pqColorButtonEventPlayer.h" +@@ -309,13 +309,13 @@ bool pqCoreTestUtility::CompareImage(QWidget* widget, const QString& referenceIm + } + + // try to recover the render window directly +- QVTKOpenGLWidget* glWidget = qobject_cast(widget); ++ QVTKOpenGLStereoWidget* glWidget = qobject_cast(widget); + if (glWidget) + { + vtkRenderWindow* rw = glWidget->renderWindow(); + if (rw) + { +- cout << "Using QVTKOpenGLWidget RenderWindow API for capture" << endl; ++ cout << "Using QVTKOpenGLStereoWidget RenderWindow API for capture" << endl; + return pqCoreTestUtility::CompareImage( + rw, referenceImage, threshold, std::cerr, tempDirectory, size); + } +diff --git a/Qt/Core/pqQVTKWidgetBase.h b/Qt/Core/pqQVTKWidgetBase.h +index 5f11871de..c6b7dbcbb 100644 +--- a/Qt/Core/pqQVTKWidgetBase.h ++++ b/Qt/Core/pqQVTKWidgetBase.h +@@ -43,8 +43,8 @@ using pqQVTKWidgetBase = QVTKOpenGLNativeWidget; + #define PARAVIEW_USING_QVTKOPENGLNATIVEWIDGET 1 + #define PARAVIEW_USING_QVTKOPENGLWIDGET 0 + #else +-#include "QVTKOpenGLWidget.h" +-using pqQVTKWidgetBase = QVTKOpenGLWidget; ++#include "QVTKOpenGLStereoWidget.h" ++using pqQVTKWidgetBase = QVTKOpenGLStereoWidget; + #define PARAVIEW_USING_QVTKOPENGLNATIVEWIDGET 0 + #define PARAVIEW_USING_QVTKOPENGLWIDGET 1 + #endif +diff --git a/Qt/Core/pqQVTKWidgetEventPlayer.cxx b/Qt/Core/pqQVTKWidgetEventPlayer.cxx +index 105796d8a..63c0bde5f 100644 +--- a/Qt/Core/pqQVTKWidgetEventPlayer.cxx ++++ b/Qt/Core/pqQVTKWidgetEventPlayer.cxx +@@ -37,7 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include + + #include "QVTKOpenGLNativeWidget.h" +-#include "QVTKOpenGLWidget.h" ++#include "QVTKOpenGLStereoWidget.h" + #include "QVTKOpenGLWindow.h" + #include "pqEventDispatcher.h" + +@@ -49,7 +49,7 @@ pqQVTKWidgetEventPlayer::pqQVTKWidgetEventPlayer(QObject* p) + bool pqQVTKWidgetEventPlayer::playEvent( + QObject* Object, const QString& Command, const QString& Arguments, bool& Error) + { +- QVTKOpenGLWidget* qvtkWidget = qobject_cast(Object); ++ QVTKOpenGLStereoWidget* qvtkWidget = qobject_cast(Object); + QVTKOpenGLNativeWidget* qvtkNativeWidget = qobject_cast(Object); + if (qvtkWidget || qvtkNativeWidget) + { +@@ -92,7 +92,7 @@ bool pqQVTKWidgetEventPlayer::playEvent( + + if (qvtkWidget != nullptr) + { +- // Due to QTBUG-61836 (see QVTKOpenGLWidget::testingEvent()), events should ++ // Due to QTBUG-61836 (see QVTKOpenGLStereoWidget::testingEvent()), events should + // be propagated back to the internal QVTKOpenGLWindow when being fired + // explicitly on the widget instance. We have to use a custom event + // callback in this case to ensure that events are passed to the window. +diff --git a/Qt/Core/pqQVTKWidgetEventTranslator.cxx b/Qt/Core/pqQVTKWidgetEventTranslator.cxx +index f79d5c4e5..77950a0d1 100644 +--- a/Qt/Core/pqQVTKWidgetEventTranslator.cxx ++++ b/Qt/Core/pqQVTKWidgetEventTranslator.cxx +@@ -44,7 +44,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include + + #include "QVTKOpenGLNativeWidget.h" +-#include "QVTKOpenGLWidget.h" ++#include "QVTKOpenGLStereoWidget.h" + #include "QVTKOpenGLWindow.h" + + pqQVTKWidgetEventTranslator::pqQVTKWidgetEventTranslator(QObject* p) +@@ -70,7 +70,7 @@ bool pqQVTKWidgetEventTranslator::translateEvent( + // Look for a render window in the possible widget types. + vtkRenderWindow* rw = nullptr; + +- if (QVTKOpenGLWidget* const qvtkWidget = qobject_cast(Object)) ++ if (QVTKOpenGLStereoWidget* const qvtkWidget = qobject_cast(Object)) + { + rw = qvtkWidget->embeddedOpenGLWindow() ? qvtkWidget->renderWindow() : nullptr; + } +diff --git a/Remoting/ClientServerStream/vtkClientServerInterpreter.cxx b/Remoting/ClientServerStream/vtkClientServerInterpreter.cxx +index 487b5ad60..c6c24d81d 100644 +--- a/Remoting/ClientServerStream/vtkClientServerInterpreter.cxx ++++ b/Remoting/ClientServerStream/vtkClientServerInterpreter.cxx +@@ -184,7 +184,7 @@ void vtkClientServerInterpreter::SetLogFile(const char* name) + // If a non-empty name was given, open a new log file. + if (name && name[0]) + { +- this->LogFileStream = new ofstream(name); ++ this->LogFileStream = new std::ofstream(name); + if (this->LogFileStream && *this->LogFileStream) + { + this->LogStream = this->LogFileStream; +diff --git a/Remoting/ClientServerStream/vtkClientServerInterpreter.h b/Remoting/ClientServerStream/vtkClientServerInterpreter.h +index 1eafb27f3..1371ef727 100644 +--- a/Remoting/ClientServerStream/vtkClientServerInterpreter.h ++++ b/Remoting/ClientServerStream/vtkClientServerInterpreter.h +@@ -195,8 +195,8 @@ protected: + ~vtkClientServerInterpreter() override; + + // A stream to which a log is written. +- ostream* LogStream; +- ofstream* LogFileStream; ++ std::ostream* LogStream; ++ std::ofstream* LogFileStream; + + // Internal message processing functions. + int ProcessCommandNew(const vtkClientServerStream& css, int midx); +diff --git a/Remoting/Core/vtkPVPluginLoader.cxx b/Remoting/Core/vtkPVPluginLoader.cxx +index 5b04b2f00..447d9d63a 100644 +--- a/Remoting/Core/vtkPVPluginLoader.cxx ++++ b/Remoting/Core/vtkPVPluginLoader.cxx +@@ -73,12 +73,12 @@ public: + vtkPVXMLOnlyPlugin* instance = new vtkPVXMLOnlyPlugin(); + instance->PluginName = vtksys::SystemTools::GetFilenameWithoutExtension(xmlfile); + +- ifstream is; +- is.open(xmlfile, ios::binary); ++ std::ifstream is; ++ is.open(xmlfile, std::ios::binary); + // get length of file: +- is.seekg(0, ios::end); ++ is.seekg(0, std::ios::end); + size_t length = is.tellg(); +- is.seekg(0, ios::beg); ++ is.seekg(0, std::ios::beg); + + // allocate memory: + char* buffer = new char[length + 1]; +diff --git a/Remoting/ServerManager/vtkPVSessionCore.cxx b/Remoting/ServerManager/vtkPVSessionCore.cxx +index 8d36fad37..6ff043967 100644 +--- a/Remoting/ServerManager/vtkPVSessionCore.cxx ++++ b/Remoting/ServerManager/vtkPVSessionCore.cxx +@@ -293,7 +293,7 @@ vtkPVSessionCore::vtkPVSessionCore() + { + filename << this->ParallelController->GetLocalProcessId(); + } +- this->LogStream = new ofstream(filename.str().c_str()); ++ this->LogStream = new std::ofstream(filename.str().c_str()); + LOG("Log for " << options->GetArgv0() << " (" << this->ParallelController->GetLocalProcessId() + << ")"); + } +diff --git a/Remoting/ServerManager/vtkSMSessionProxyManager.cxx b/Remoting/ServerManager/vtkSMSessionProxyManager.cxx +index 8525457e5..05bdfd723 100644 +--- a/Remoting/ServerManager/vtkSMSessionProxyManager.cxx ++++ b/Remoting/ServerManager/vtkSMSessionProxyManager.cxx +@@ -1261,7 +1261,7 @@ void vtkSMSessionProxyManager::LoadXMLState( + bool vtkSMSessionProxyManager::SaveXMLState(const char* filename) + { + vtkPVXMLElement* rootElement = this->SaveXMLState(); +- ofstream os(filename, ios::out); ++ std::ofstream os(filename, std::ios::out); + if (!os.is_open()) + { + return false; +diff --git a/Remoting/Views/vtkPVRenderView.cxx b/Remoting/Views/vtkPVRenderView.cxx +index de9c50ab3..d7f739192 100644 +--- a/Remoting/Views/vtkPVRenderView.cxx ++++ b/Remoting/Views/vtkPVRenderView.cxx +@@ -2514,11 +2514,11 @@ void vtkPVRenderView::UpdateSkybox() + this->CubeMap->SetInputTexture(vtkOpenGLTexture::SafeDownCast(texture)); + this->CubeMap->InterpolateOn(); + this->GetRenderer()->AddActor(this->Skybox); +- this->GetRenderer()->SetEnvironmentCubeMap(this->CubeMap, true); ++ this->GetRenderer()->SetEnvironmentTexture(this->CubeMap, true); + } + else + { +- this->GetRenderer()->SetEnvironmentCubeMap(nullptr); ++ this->GetRenderer()->SetEnvironmentTexture(nullptr); + } + } + +diff --git a/Remoting/Views/vtkSMTransferFunctionPresets.cxx b/Remoting/Views/vtkSMTransferFunctionPresets.cxx +index 1151ce58f..21e5a28b7 100644 +--- a/Remoting/Views/vtkSMTransferFunctionPresets.cxx ++++ b/Remoting/Views/vtkSMTransferFunctionPresets.cxx +@@ -142,7 +142,7 @@ public: + Json::CharReaderBuilder builder; + builder["collectComments"] = false; + Json::Value root; +- ifstream file; ++ std::ifstream file; + file.open(filename); + if (!file) + { +@@ -456,7 +456,7 @@ bool vtkSMTransferFunctionPresets::ImportPresets(const char* filename) + if (vtksys::SystemTools::LowerCase(vtksys::SystemTools::GetFilenameLastExtension(filename)) == + ".xml") + { +- ifstream in(filename); ++ std::ifstream in(filename); + if (in) + { + std::ostringstream contents; +diff --git a/Remoting/Views/vtkSMTransferFunctionProxy.cxx b/Remoting/Views/vtkSMTransferFunctionProxy.cxx +index efa8e9341..2023ca41b 100644 +--- a/Remoting/Views/vtkSMTransferFunctionProxy.cxx ++++ b/Remoting/Views/vtkSMTransferFunctionProxy.cxx +@@ -273,7 +273,7 @@ bool vtkSMTransferFunctionProxy::ExportTransferFunction( + + exportCollection.append(transferFunction); + +- ofstream outfs; ++ std::ofstream outfs; + outfs.open(filename); + if (!outfs.is_open()) + { +@@ -1370,7 +1370,7 @@ bool vtkSMTransferFunctionProxy::ConvertLegacyColorMapsToJSON( + return false; + } + +- ofstream file; ++ std::ofstream file; + file.open(outjsonfile); + if (file) + { +diff --git a/ThirdParty/protobuf/CMakeLists.txt b/ThirdParty/protobuf/CMakeLists.txt +index 0502ca2d9..25b2e778f 100644 +--- a/ThirdParty/protobuf/CMakeLists.txt ++++ b/ThirdParty/protobuf/CMakeLists.txt +@@ -42,7 +42,8 @@ vtk_module_third_party( + PACKAGE Protobuf + VERSION "3.4" + TARGETS protobuf::libprotobuf +- STANDARD_INCLUDE_DIRS) ++ STANDARD_INCLUDE_DIRS ++ CONFIG_MODE) + + if (VTK_MODULE_USE_EXTERNAL_ParaView_protobuf) + # promote protobuf::protoc to GLOBAL to allow to call protobuf_generate from other directories +diff --git a/VTKExtensions/CGNSReader/vtkFileSeriesHelper.cxx b/VTKExtensions/CGNSReader/vtkFileSeriesHelper.cxx +index 66a7d6972..9d314b8ce 100644 +--- a/VTKExtensions/CGNSReader/vtkFileSeriesHelper.cxx ++++ b/VTKExtensions/CGNSReader/vtkFileSeriesHelper.cxx +@@ -211,7 +211,7 @@ bool vtkFileSeriesHelper::ReadMetaFile(const char* metafilename) + } + + // Open the metafile. +- ifstream metafile(metafilename); ++ std::ifstream metafile(metafilename); + if (metafile.bad()) + { + // vtkErrorMacro("Failed to open meta-file: " << metafilename); +diff --git a/VTKExtensions/IOCore/vtkCSVWriter.cxx b/VTKExtensions/IOCore/vtkCSVWriter.cxx +index 11f777c1a..a1773600c 100644 +--- a/VTKExtensions/IOCore/vtkCSVWriter.cxx ++++ b/VTKExtensions/IOCore/vtkCSVWriter.cxx +@@ -97,7 +97,7 @@ namespace + //----------------------------------------------------------------------------- + template + void vtkCSVWriterGetDataString( +- iterT* iter, vtkIdType tupleIndex, ofstream& stream, vtkCSVWriter* writer, bool* first) ++ iterT* iter, vtkIdType tupleIndex, std::ofstream& stream, vtkCSVWriter* writer, bool* first) + { + int numComps = iter->GetNumberOfComponents(); + vtkIdType index = tupleIndex * numComps; +@@ -118,7 +118,7 @@ void vtkCSVWriterGetDataString( + //----------------------------------------------------------------------------- + template <> + void vtkCSVWriterGetDataString(vtkArrayIteratorTemplate* iter, vtkIdType tupleIndex, +- ofstream& stream, vtkCSVWriter* writer, bool* first) ++ std::ofstream& stream, vtkCSVWriter* writer, bool* first) + { + int numComps = iter->GetNumberOfComponents(); + vtkIdType index = tupleIndex * numComps; +@@ -139,7 +139,7 @@ void vtkCSVWriterGetDataString(vtkArrayIteratorTemplate* iter, vtk + //----------------------------------------------------------------------------- + template <> + void vtkCSVWriterGetDataString(vtkArrayIteratorTemplate* iter, vtkIdType tupleIndex, +- ofstream& stream, vtkCSVWriter* writer, bool* first) ++ std::ofstream& stream, vtkCSVWriter* writer, bool* first) + { + int numComps = iter->GetNumberOfComponents(); + vtkIdType index = tupleIndex * numComps; +@@ -160,7 +160,7 @@ void vtkCSVWriterGetDataString(vtkArrayIteratorTemplate* iter, vtkIdType t + //----------------------------------------------------------------------------- + template <> + void vtkCSVWriterGetDataString(vtkArrayIteratorTemplate* iter, vtkIdType tupleIndex, +- ofstream& stream, vtkCSVWriter* writer, bool* first) ++ std::ofstream& stream, vtkCSVWriter* writer, bool* first) + { + int numComps = iter->GetNumberOfComponents(); + vtkIdType index = tupleIndex * numComps; +@@ -190,7 +190,7 @@ void vtkCSVWriterGetDataString(vtkArrayIteratorTemplate* iter, vt + + class vtkCSVWriter::CSVFile + { +- ofstream Stream; ++ std::ofstream Stream; + std::vector > ColumnInfo; + double Time = vtkMath::Nan(); + +diff --git a/VTKExtensions/IOCore/vtkFileSeriesReader.cxx b/VTKExtensions/IOCore/vtkFileSeriesReader.cxx +index f2448f2b8..7d84bc1ab 100644 +--- a/VTKExtensions/IOCore/vtkFileSeriesReader.cxx ++++ b/VTKExtensions/IOCore/vtkFileSeriesReader.cxx +@@ -783,7 +783,7 @@ int vtkFileSeriesReader::ReadMetaDataFile(const char* metafilename, vtkStringArr + std::vector& timeValues, int maxFilesToRead /*= VTK_INT_MAX*/) + { + // Open the metafile. +- ifstream metafile(metafilename); ++ std::ifstream metafile(metafilename); + if (metafile.bad()) + { + return 0; +diff --git a/VTKExtensions/IOEnSight/vtkPEnSightGoldBinaryReader.cxx b/VTKExtensions/IOEnSight/vtkPEnSightGoldBinaryReader.cxx +index 8370e21e3..ff90a0421 100644 +--- a/VTKExtensions/IOEnSight/vtkPEnSightGoldBinaryReader.cxx ++++ b/VTKExtensions/IOEnSight/vtkPEnSightGoldBinaryReader.cxx +@@ -50,7 +50,6 @@ vtkPEnSightGoldBinaryReader::~vtkPEnSightGoldBinaryReader() + { + if (this->IFile) + { +- this->IFile->close(); + delete this->IFile; + this->IFile = NULL; + } +@@ -72,7 +71,6 @@ int vtkPEnSightGoldBinaryReader::OpenFile(const char* filename) + // Close file from any previous image + if (this->IFile) + { +- this->IFile->close(); + delete this->IFile; + this->IFile = NULL; + } +@@ -86,9 +84,9 @@ int vtkPEnSightGoldBinaryReader::OpenFile(const char* filename) + this->FileSize = (long)(fs.st_size); + + #ifdef _WIN32 +- this->IFile = new ifstream(filename, ios::in | ios::binary); ++ this->IFile = new std::ifstream(filename, std::ios::in | std::ios::binary); + #else +- this->IFile = new ifstream(filename, ios::in); ++ this->IFile = new std::ifstream(filename, std::ios::in); + #endif + } + else +diff --git a/VTKExtensions/IOEnSight/vtkPEnSightGoldBinaryReader.h b/VTKExtensions/IOEnSight/vtkPEnSightGoldBinaryReader.h +index c5a5551d5..9c871e4a1 100644 +--- a/VTKExtensions/IOEnSight/vtkPEnSightGoldBinaryReader.h ++++ b/VTKExtensions/IOEnSight/vtkPEnSightGoldBinaryReader.h +@@ -204,7 +204,7 @@ protected: + int ElementIdsListed; + int Fortran; + +- ifstream* IFile; ++ std::ifstream* IFile; + // The size of the file could be used to choose byte order. + long FileSize; + +diff --git a/VTKExtensions/IOEnSight/vtkPEnSightGoldReader.cxx b/VTKExtensions/IOEnSight/vtkPEnSightGoldReader.cxx +index b433bc57a..b5cdc2672 100644 +--- a/VTKExtensions/IOEnSight/vtkPEnSightGoldReader.cxx ++++ b/VTKExtensions/IOEnSight/vtkPEnSightGoldReader.cxx +@@ -91,7 +91,7 @@ int vtkPEnSightGoldReader::ReadGeometryFile( + + // Opening the text file as binary. If not, the reader fails to read + // files with Unix line endings on Windows machines. +- this->IS = new ifstream(sfilename.c_str(), ios::in | ios::binary); ++ this->IS = new std::ifstream(sfilename.c_str(), std::ios::in | std::ios::binary); + if (this->IS->fail()) + { + vtkErrorMacro("Unable to open file: " << sfilename.c_str()); +@@ -291,7 +291,7 @@ int vtkPEnSightGoldReader::ReadMeasuredGeometryFile( + sfilename = fileName; + } + +- this->IS = new ifstream(sfilename.c_str(), ios::in | ios::binary); ++ this->IS = new std::ifstream(sfilename.c_str(), std::ios::in | std::ios::binary); + if (this->IS->fail()) + { + vtkErrorMacro("Unable to open file: " << sfilename.c_str()); +@@ -455,7 +455,7 @@ int vtkPEnSightGoldReader::ReadScalarsPerNode(const char* fileName, const char* + sfilename = fileName; + } + +- this->IS = new ifstream(sfilename.c_str(), ios::in | ios::binary); ++ this->IS = new std::ifstream(sfilename.c_str(), std::ios::in | std::ios::binary); + if (this->IS->fail()) + { + vtkErrorMacro("Unable to open file: " << sfilename.c_str()); +@@ -675,7 +675,7 @@ int vtkPEnSightGoldReader::ReadVectorsPerNode(const char* fileName, const char* + sfilename = fileName; + } + +- this->IS = new ifstream(sfilename.c_str(), ios::in | ios::binary); ++ this->IS = new std::ifstream(sfilename.c_str(), std::ios::in | std::ios::binary); + if (this->IS->fail()) + { + vtkErrorMacro("Unable to open file: " << sfilename.c_str()); +@@ -854,7 +854,7 @@ int vtkPEnSightGoldReader::ReadTensorsPerNode(const char* fileName, const char* + sfilename = fileName; + } + +- this->IS = new ifstream(sfilename.c_str(), ios::in | ios::binary); ++ this->IS = new std::ifstream(sfilename.c_str(), std::ios::in | std::ios::binary); + if (this->IS->fail()) + { + vtkErrorMacro("Unable to open file: " << sfilename.c_str()); +@@ -980,7 +980,7 @@ int vtkPEnSightGoldReader::ReadScalarsPerElement(const char* fileName, const cha + sfilename = fileName; + } + +- this->IS = new ifstream(sfilename.c_str(), ios::in | ios::binary); ++ this->IS = new std::ifstream(sfilename.c_str(), std::ios::in | std::ios::binary); + if (this->IS->fail()) + { + vtkErrorMacro("Unable to open file: " << sfilename.c_str()); +@@ -1187,7 +1187,7 @@ int vtkPEnSightGoldReader::ReadVectorsPerElement(const char* fileName, const cha + sfilename = fileName; + } + +- this->IS = new ifstream(sfilename.c_str(), ios::in | ios::binary); ++ this->IS = new std::ifstream(sfilename.c_str(), std::ios::in | std::ios::binary); + if (this->IS->fail()) + { + vtkErrorMacro("Unable to open file: " << sfilename.c_str()); +@@ -1356,7 +1356,7 @@ int vtkPEnSightGoldReader::ReadTensorsPerElement(const char* fileName, const cha + sfilename = fileName; + } + +- this->IS = new ifstream(sfilename.c_str(), ios::in | ios::binary); ++ this->IS = new std::ifstream(sfilename.c_str(), std::ios::in | ios::binary); + if (this->IS->fail()) + { + vtkErrorMacro("Unable to open file: " << sfilename.c_str()); +diff --git a/VTKExtensions/IOEnSight/vtkPEnSightReader.cxx b/VTKExtensions/IOEnSight/vtkPEnSightReader.cxx +index 4f4840f5c..dd515e5ca 100644 +--- a/VTKExtensions/IOEnSight/vtkPEnSightReader.cxx ++++ b/VTKExtensions/IOEnSight/vtkPEnSightReader.cxx +@@ -1319,7 +1319,7 @@ int vtkPEnSightReader::ReadCaseFile() + sfilename = this->CaseFileName; + } + +- this->IS = new ifstream(sfilename.c_str(), ios::in); ++ this->IS = new std::ifstream(sfilename.c_str(), ios::in); + if (this->IS->fail()) + { + vtkErrorMacro("Unable to open file: " << sfilename.c_str()); +diff --git a/VTKExtensions/IOEnSight/vtkPVEnSightMasterServerReader.cxx b/VTKExtensions/IOEnSight/vtkPVEnSightMasterServerReader.cxx +index 5768eb32f..8bbc582ae 100644 +--- a/VTKExtensions/IOEnSight/vtkPVEnSightMasterServerReader.cxx ++++ b/VTKExtensions/IOEnSight/vtkPVEnSightMasterServerReader.cxx +@@ -429,7 +429,7 @@ int vtkPVEnSightMasterServerReader::ParseMasterServerFile() + } + + // Open the file for reading. +- ifstream fin(sfilename.c_str(), ios::in); ++ std::ifstream fin(sfilename.c_str(), std::ios::in); + if (!fin) + { + vtkErrorMacro("Unable to open file: " << sfilename.c_str()); +diff --git a/VTKExtensions/IOEnSight/vtkPVEnSightMasterServerReader2.cxx b/VTKExtensions/IOEnSight/vtkPVEnSightMasterServerReader2.cxx +index e7701d458..a358b9df0 100644 +--- a/VTKExtensions/IOEnSight/vtkPVEnSightMasterServerReader2.cxx ++++ b/VTKExtensions/IOEnSight/vtkPVEnSightMasterServerReader2.cxx +@@ -512,7 +512,7 @@ int vtkPVEnSightMasterServerReader2::ParseMasterServerFile() + } + + // Open the file for reading. +- ifstream fin(sfilename.c_str(), ios::in); ++ std::ifstream fin(sfilename.c_str(), std::ios::in); + if (!fin) + { + vtkErrorMacro("Unable to open file: " << sfilename.c_str()); +diff --git a/VTKExtensions/IOSPCTH/vtkSpyPlotReader.cxx b/VTKExtensions/IOSPCTH/vtkSpyPlotReader.cxx +index 1af09a68e..4aba88655 100644 +--- a/VTKExtensions/IOSPCTH/vtkSpyPlotReader.cxx ++++ b/VTKExtensions/IOSPCTH/vtkSpyPlotReader.cxx +@@ -1289,7 +1289,7 @@ int vtkSpyPlotReader::MergeVectors(vtkDataSetAttributes* da, vtkDataArray* a1, v + //----------------------------------------------------------------------------- + int vtkSpyPlotReader::CanReadFile(const char* fname) + { +- ifstream ifs(fname, ios::binary | ios::in); ++ std::ifstream ifs(fname, std::ios::binary | std::ios::in); + if (!ifs) + { + return 0; +diff --git a/VTKExtensions/IOSPCTH/vtkSpyPlotReaderMap.cxx b/VTKExtensions/IOSPCTH/vtkSpyPlotReaderMap.cxx +index c7e1bac87..157768255 100644 +--- a/VTKExtensions/IOSPCTH/vtkSpyPlotReaderMap.cxx ++++ b/VTKExtensions/IOSPCTH/vtkSpyPlotReaderMap.cxx +@@ -83,7 +83,7 @@ bool vtkSpyPlotReaderMap::Initialize(const char* filename) + { + this->Clean(NULL); + +- ifstream ifs(filename); ++ std::ifstream ifs(filename); + if (!ifs) + { + vtkGenericWarningMacro("Error opening file " << filename); +@@ -238,7 +238,7 @@ bool vtkSpyPlotReaderMap::InitializeFromSpyFile(const char* filename) + bool vtkSpyPlotReaderMap::InitializeFromCaseFile(const char* filename) + { + // Setup the filemap and spcth structures +- ifstream ifs(filename); ++ std::ifstream ifs(filename); + if (!ifs) + { + vtkGenericWarningMacro("Error opening file " << filename); +diff --git a/VTKExtensions/IOSPCTH/vtkSpyPlotUniReader.cxx b/VTKExtensions/IOSPCTH/vtkSpyPlotUniReader.cxx +index 7dfe451c9..f4ea91928 100644 +--- a/VTKExtensions/IOSPCTH/vtkSpyPlotUniReader.cxx ++++ b/VTKExtensions/IOSPCTH/vtkSpyPlotUniReader.cxx +@@ -212,7 +212,7 @@ int vtkSpyPlotUniReader::MakeCurrent() + } + + std::vector arrayBuffer; +- ifstream ifs(this->FileName, ios::binary | ios::in); ++ std::ifstream ifs(this->FileName, std::ios::binary | std::ios::in); + vtkSpyPlotIStream spis; + spis.SetStream(&ifs); + int dump; +@@ -1358,7 +1358,7 @@ int vtkSpyPlotUniReader::ReadInformation() + vtkErrorMacro("FileName not specified"); + return 0; + } +- ifstream ifs(this->FileName, ios::binary | ios::in); ++ std::ifstream ifs(this->FileName, std::ios::binary | std::ios::in); + if (!ifs) + { + vtkErrorMacro("Cannot open file: " << this->FileName); diff --git a/vcpkg/ports/paraview/portfile.cmake b/vcpkg/ports/paraview/portfile.cmake new file mode 100644 index 0000000..ab64ef3 --- /dev/null +++ b/vcpkg/ports/paraview/portfile.cmake @@ -0,0 +1,172 @@ +set(VERSION 5.8) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + "cuda" PARAVIEW_USE_CUDA #untested; probably only affects internal VTK build so it does nothing here + "all_modules" PARAVIEW_BUILD_ALL_MODULES #untested + "mpi" PARAVIEW_USE_MPI #untested + "vtkm" PARAVIEW_USE_VTKM + "python" PARAVIEW_USE_PYTHON + "tools" PARAVIEW_BUILD_TOOLS +) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Kitware/ParaView + REF 56631fdd9a31f4acdfe5fce2c3be3c4fb6e6800f # v5.8.0 + SHA512 1cdf4065428debc301c98422233524cdafc843495c54569b0854bf53f6ffeba1e83acf60497450779d493e56051557cd377902325d6ece89ad1b98ae6ba831be + HEAD_REF master + PATCHES + paraview_build.patch + remove_duplicates.patch # Missed something in the above patch + cgns.patch + python_include.patch + python_wrapper.patch + add-tools-option.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + list(APPEND VisItPatches removedoublesymbols.patch) +endif() + +#The following two dependencies should probably be their own port +#but require additional patching in paraview to make it work. + +#Get VisItBridge Plugin +vcpkg_from_gitlab( + OUT_SOURCE_PATH VISITIT_SOURCE_PATH + GITLAB_URL https://gitlab.kitware.com/ + REPO paraview/visitbridge + REF c2605b5c3115bc4869c76a0d8bfdd8939b59f283 + SHA512 6d2c1d6e1cd345547926938451755e7a8be5dabd89e18a2ceb419db16c5b29f354554a5130eb365b7e522d655370fd4766953813ff530c06e4851fe26104ce58 + PATCHES + VisIt_Build.patch + #removeunusedsymbols.patch # These also get remove in master of ParaView + ${VisItPatches} +) +#Get QtTesting Plugin +vcpkg_from_gitlab( + OUT_SOURCE_PATH QTTESTING_SOURCE_PATH + GITLAB_URL https://gitlab.kitware.com/ + REPO paraview/qttesting + REF f2429588feb839e0d8f9f3ee73bfa8a032a3f178 + SHA512 752b13ff79095a14faa2edc134a64497ff0426da3aa6b1a5951624816fb4f113a26fbe559cedf495ebb775d782c9a1851421a88dd299a79f27cbebb730ea227e +) + +file(COPY ${VISITIT_SOURCE_PATH}/ DESTINATION ${SOURCE_PATH}/Utilities/VisItBridge) +file(COPY ${QTTESTING_SOURCE_PATH}/ DESTINATION ${SOURCE_PATH}/ThirdParty/QtTesting/vtkqttesting) + +if("python" IN_LIST FEATURES) + vcpkg_find_acquire_program(PYTHON3) + list(APPEND ADDITIONAL_OPTIONS + -DPython3_FIND_REGISTRY=NEVER + "-DPython3_EXECUTABLE:PATH=${PYTHON3}" # Required by more than one feature + ) + #VTK_PYTHON_SITE_PACKAGES_SUFFIX should be set to the install dir of the site-packages +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS ${FEATURE_OPTIONS} + -DPARAVIEW_BUILD_WITH_EXTERNAL:BOOL=ON + -DPARAVIEW_USE_EXTERNAL_VTK:BOOL=ON + -DPARAVIEW_ENABLE_VISITBRIDGE:BOOL=ON + -DVTK_MODULE_ENABLE_ParaView_qttesting=YES + -DPARAVIEW_ENABLE_EMBEDDED_DOCUMENTATION:BOOL=OFF + -DPARAVIEW_USE_QTHELP:BOOL=OFF + + #A little bit of help in finding the boost headers + "-DBoost_INCLUDE_DIR:PATH=${CURRENT_INSTALLED_DIR}/include" + + # Workarounds for CMake issues + -DHAVE_SYS_TYPES_H=0 ## For some strange reason the test first succeeds and then fails the second time around + -DWORDS_BIGENDIAN=0 ## Tests fails in VisItCommon.cmake for some unknown reason this is just a workaround since most systems are little endian. + ${ADDITIONAL_OPTIONS} + + #-DPARAVIEW_ENABLE_FFMPEG:BOOL=OFF +) +if(CMAKE_HOST_UNIX) + # ParaView runs Qt tools so LD_LIBRARY_PATH must be set correctly for them to find *.so files + set(BACKUP_LD_LIBRARY_PATH $ENV{LD_LIBRARY_PATH}) + set(ENV{LD_LIBRARY_PATH} "${BACKUP_LD_LIBRARY_PATH}:${CURRENT_INSTALLED_DIR}/lib") +endif() + +vcpkg_install_cmake(ADD_BIN_TO_PATH) # Bin to path required since paraview will use some self build tools + +if(CMAKE_HOST_UNIX) + set(ENV{LD_LIBRARY_PATH} "${BACKUP_LD_LIBRARY_PATH}") +endif() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/paraview-${VERSION}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +set(TOOLVER pv${VERSION}) +set(TOOLS paraview + pvbatch + pvdataserver + pvpython + pvrenderserver + pvserver + smTestDriver + vtkProcessXML + vtkWrapClientServer) + +foreach(tool ${TOOLS}) + # Remove debug tools + set(filename ${CURRENT_PACKAGES_DIR}/debug/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + if(EXISTS ${filename}) + file(REMOVE ${filename}) + endif() + set(filename ${CURRENT_PACKAGES_DIR}/debug/bin/${tool}-${TOOLVER}${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + if(EXISTS ${filename}) + file(REMOVE ${filename}) + endif() + set(filename ${CURRENT_PACKAGES_DIR}/debug/bin/${tool}-${TOOLVER}d${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + if(EXISTS ${filename}) + file(REMOVE ${filename}) + endif() + + # Move release tools + set(filename ${CURRENT_PACKAGES_DIR}/bin/${tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + if(EXISTS ${filename}) + file(INSTALL ${filename} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(REMOVE ${filename}) + endif() + set(filename ${CURRENT_PACKAGES_DIR}/bin/${tool}-${TOOLVER}${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + if(EXISTS ${filename}) + file(INSTALL ${filename} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(REMOVE ${filename}) + endif() +endforeach() +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +# # Handle copyright +file(INSTALL ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/paraview RENAME Copyright.txt) # Which one is the correct one? +file(INSTALL ${SOURCE_PATH}/License_v1.2.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/paraview RENAME copyright) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + macro(move_bin_to_lib name) + if(EXISTS ${CURRENT_PACKAGES_DIR}/bin/${name}) + file(RENAME "${CURRENT_PACKAGES_DIR}/bin/${name}" "${CURRENT_PACKAGES_DIR}/lib/${name}") + endif() + if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/bin/${name}) + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin/${name}" "${CURRENT_PACKAGES_DIR}/debug/lib/${name}") + endif() + endmacro() + + set(to_move Lib paraview-${VERSION} paraview-config) + foreach(name ${to_move}) + move_bin_to_lib(${name}) + endforeach() + + file(GLOB_RECURSE cmake_files ${CURRENT_PACKAGES_DIR}/share/${PORT}/*.cmake) + foreach(cmake_file ${cmake_files}) + file(READ "${cmake_file}" _contents) + STRING(REPLACE "bin/" "lib/" _contents "${_contents}") + file(WRITE "${cmake_file}" "${_contents}") + endforeach() + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() \ No newline at end of file diff --git a/vcpkg/ports/paraview/python_include.patch b/vcpkg/ports/paraview/python_include.patch new file mode 100644 index 0000000..42ada66 --- /dev/null +++ b/vcpkg/ports/paraview/python_include.patch @@ -0,0 +1,13 @@ +diff --git a/CMake/ParaViewOptions.cmake b/CMake/ParaViewOptions.cmake +index 0ecb928e9..5b5459a37 100644 +--- a/CMake/ParaViewOptions.cmake ++++ b/CMake/ParaViewOptions.cmake +@@ -136,7 +136,7 @@ option(PARAVIEW_ENABLE_RAYTRACING "Build ParaView with OSPray and/or OptiX ray-t + + set(paraview_web_default ON) + if (PARAVIEW_USE_PYTHON AND WIN32) +- include("${CMAKE_CURRENT_SOURCE_DIR}/VTK/CMake/FindPythonModules.cmake") ++ include(FindPythonModules) + find_python_module(win32api have_pywin32) + set(paraview_web_default "${have_pywin32}") + endif () diff --git a/vcpkg/ports/paraview/python_wrapper.patch b/vcpkg/ports/paraview/python_wrapper.patch new file mode 100644 index 0000000..33a70f0 --- /dev/null +++ b/vcpkg/ports/paraview/python_wrapper.patch @@ -0,0 +1,19 @@ +diff --git a/CMake/vtkModuleWrapClientServer.cmake b/CMake/vtkModuleWrapClientServer.cmake +index 3804a24e2..91fdd593a 100644 +--- a/CMake/vtkModuleWrapClientServer.cmake ++++ b/CMake/vtkModuleWrapClientServer.cmake +@@ -37,10 +37,13 @@ function (_vtk_module_wrap_client_server_sources module sources classes) + "$") + set(_vtk_client_server_genex_include_directories + "$") ++ set(_vtk_client_server_genex_interface_include_directories ++ "$") + file(GENERATE + OUTPUT "${_vtk_client_server_args_file}" + CONTENT "$<$:\n-D\'$\'>\n +-$<$:\n-I\'$\'>\n") ++ $<$:\n-I\'$\'>\n ++ $<$:\n-I\'$\'>\n") + + _vtk_module_get_module_property("${module}" + PROPERTY "hierarchy" diff --git a/vcpkg/ports/paraview/remove_duplicates.patch b/vcpkg/ports/paraview/remove_duplicates.patch new file mode 100644 index 0000000..4ea223e --- /dev/null +++ b/vcpkg/ports/paraview/remove_duplicates.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b7101666c..ebac50016 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -592,6 +592,9 @@ set(_paraview_add_tests_default_data_directory + set(_paraview_add_tests_default_test_data_target + "ParaViewData") + ++list(REMOVE_DUPLICATES vtk_modules) # Missed this somewhere ++list(REMOVE_DUPLICATES paraview_modules) # probably not needed ++ + vtk_module_build( + MODULES ${paraview_modules} + KITS ${paraview_kits} diff --git a/vcpkg/ports/paraview/removedoublesymbols.patch b/vcpkg/ports/paraview/removedoublesymbols.patch new file mode 100644 index 0000000..70df9b0 --- /dev/null +++ b/vcpkg/ports/paraview/removedoublesymbols.patch @@ -0,0 +1,89 @@ +diff --git a/Library/VisItLib/visit_vtk/lightweight/vtkUnstructuredGridFacelistFilter.C b/Library/VisItLib/visit_vtk/lightweight/vtkUnstructuredGridFacelistFilter.C +index db64a0534..0d987d8e7 100644 +--- a/Library/VisItLib/visit_vtk/lightweight/vtkUnstructuredGridFacelistFilter.C ++++ b/Library/VisItLib/visit_vtk/lightweight/vtkUnstructuredGridFacelistFilter.C +@@ -69,7 +69,10 @@ + // + // Forward declare some of types used to hash faces. + // +-class Quad; ++namespace hidden { ++ class Quad; ++} ++using hidden::Quad; + class QuadMemoryManager; + class Tri; + class TriMemoryManager; +@@ -322,43 +325,43 @@ class HashEntryList + // Creation: October 21, 2002 + // + // **************************************************************************** ++namespace hidden { ++ class Quad ++ { ++ friend class Tri; + +-class Quad +-{ +- friend class Tri; +- +- public: +- Quad() { ordering_case = 255; }; +- +- vtkIdType AssignNodes(const vtkIdType *); +- bool Equals(Quad *); +- bool Equals(Tri *); +- void AddInRemainingTriangle(Tri *, int); +- inline void ReRegisterMemory(void) +- { +- hashEntryList->qmm.ReRegisterQuad(this); +- } ++ public: ++ Quad() { ordering_case = 255; }; + +- inline void SetOriginalZone(const int &oz) { orig_zone = oz; }; +- inline int GetOriginalZone(void) { return orig_zone; }; ++ vtkIdType AssignNodes(const vtkIdType *); ++ bool Equals(Quad *); ++ bool Equals(Tri *); ++ void AddInRemainingTriangle(Tri *, int); ++ inline void ReRegisterMemory(void) ++ { ++ hashEntryList->qmm.ReRegisterQuad(this); ++ } + +- void OutputCell(int,vtkPolyData *, vtkCellData *, vtkCellData *); ++ inline void SetOriginalZone(const int &oz) { orig_zone = oz; }; ++ inline int GetOriginalZone(void) { return orig_zone; }; + +- inline void RegisterHashEntryList(HashEntryList *hel) +- { hashEntryList = hel; }; +- inline void SetNumberOfPoints(int np) { npts = np; }; ++ void OutputCell(int,vtkPolyData *, vtkCellData *, vtkCellData *); + +- protected: +- unsigned char ordering_case; +- vtkIdType nodes[3]; +- vtkIdType orig_zone; ++ inline void RegisterHashEntryList(HashEntryList *hel) ++ { hashEntryList = hel; }; ++ inline void SetNumberOfPoints(int np) { npts = np; }; + +- HashEntryList *hashEntryList; +- int npts; ++ protected: ++ unsigned char ordering_case; ++ vtkIdType nodes[3]; ++ vtkIdType orig_zone; + +- void AddInRemainingTriangle(int, int); +-}; ++ HashEntryList *hashEntryList; ++ int npts; + ++ void AddInRemainingTriangle(int, int); ++ }; ++} + // + // We will be re-ordering the nodes into numerical order. This enumerated + // type will allow the ordering to be preserved. diff --git a/vcpkg/ports/parmetis/CONTROL b/vcpkg/ports/parmetis/CONTROL new file mode 100644 index 0000000..c98d486 --- /dev/null +++ b/vcpkg/ports/parmetis/CONTROL @@ -0,0 +1,5 @@ +Source: parmetis +Version: 4.0.3-3 +Homepage: https://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview +Description: Parallel Graph Partitioning and Fill-reducing Matrix Ordering +Build-Depends: metis, mpi diff --git a/vcpkg/ports/parmetis/fix-gklib-vs14-math.patch b/vcpkg/ports/parmetis/fix-gklib-vs14-math.patch new file mode 100644 index 0000000..059890e --- /dev/null +++ b/vcpkg/ports/parmetis/fix-gklib-vs14-math.patch @@ -0,0 +1,11 @@ +--- a/metis/GKlib/gk_arch.h Wed Dec 21 18:34:18 2016 ++++ b/metis/GKlib/gk_arch.h Wed Dec 21 18:30:49 2016 +@@ -58,7 +58,7 @@ + #define PTRDIFF_MAX INT64_MAX + #endif + +-#ifdef __MSC__ ++#if defined(__MSC__) && (_MSC_VER < 1900) + /* MSC does not have rint() function */ + #define rint(x) ((int)((x)+0.5)) + diff --git a/vcpkg/ports/parmetis/fix-libparmetis-cmakelist.patch b/vcpkg/ports/parmetis/fix-libparmetis-cmakelist.patch new file mode 100644 index 0000000..6cdd7be --- /dev/null +++ b/vcpkg/ports/parmetis/fix-libparmetis-cmakelist.patch @@ -0,0 +1,15 @@ +--- a/libparmetis/CMakeLists.txt Sat Mar 30 17:24:50 2013 ++++ b/libparmetis/CMakeLists.txt Wed Dec 21 19:40:28 2016 +@@ -5,10 +5,10 @@ + # Create libparmetis + add_library(parmetis ${ParMETIS_LIBRARY_TYPE} ${parmetis_sources}) + # Link with metis and MPI libraries. +-target_link_libraries(parmetis metis ${MPI_LIBRARIES}) ++target_link_libraries(parmetis ${METIS_LIBRARY} ${MPI_LIBRARIES}) + set_target_properties(parmetis PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}") + + install(TARGETS parmetis + LIBRARY DESTINATION lib +- RUNTIME DESTINATION lib ++ RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib) diff --git a/vcpkg/ports/parmetis/fix-metis-vs14-math.patch b/vcpkg/ports/parmetis/fix-metis-vs14-math.patch new file mode 100644 index 0000000..ddf1005 --- /dev/null +++ b/vcpkg/ports/parmetis/fix-metis-vs14-math.patch @@ -0,0 +1,11 @@ +--- a/metis/libmetis/metislib.h Sat Mar 30 17:24:45 2013 ++++ b/metis/libmetis/metislib.h Wed Dec 21 18:30:59 2016 +@@ -31,7 +31,7 @@ + #include + + +-#if defined(COMPILER_MSC) ++#if defined(COMPILER_MSC) && (_MSC_VER < 1900) + #if defined(rint) + #undef rint + #endif diff --git a/vcpkg/ports/parmetis/fix-root-cmakelist.patch b/vcpkg/ports/parmetis/fix-root-cmakelist.patch new file mode 100644 index 0000000..914bf91 --- /dev/null +++ b/vcpkg/ports/parmetis/fix-root-cmakelist.patch @@ -0,0 +1,29 @@ +--- a/CMakeLists.txt Sat Mar 30 17:24:50 2013 ++++ b/CMakeLists.txt Wed Dec 21 19:38:12 2016 +@@ -16,6 +16,9 @@ + # endif() + # set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MPI_COMPILE_FLAGS}") + ++find_package(MPI REQUIRED) ++find_library(METIS_LIBRARY NAMES metis) ++ + # Prepare libraries. + if(SHARED) + set(ParMETIS_LIBRARY_TYPE SHARED) +@@ -30,13 +33,13 @@ + include_directories(include) + include_directories(${MPI_INCLUDE_PATH}) + include_directories(${GKLIB_PATH}) +-include_directories(${METIS_PATH}/include) ++# include_directories(${METIS_PATH}/include) + + # List of directories that cmake will look for CMakeLists.txt +-add_subdirectory(${METIS_PATH}/libmetis ${CMAKE_BINARY_DIR}/libmetis) ++# add_subdirectory(${METIS_PATH}/libmetis ${CMAKE_BINARY_DIR}/libmetis) + add_subdirectory(include) + add_subdirectory(libparmetis) +-add_subdirectory(programs) ++# add_subdirectory(programs) + + # This is for testing during development and is not being distributed + #add_subdirectory(test) diff --git a/vcpkg/ports/parmetis/portfile.cmake b/vcpkg/ports/parmetis/portfile.cmake new file mode 100644 index 0000000..f3eee99 --- /dev/null +++ b/vcpkg/ports/parmetis/portfile.cmake @@ -0,0 +1,37 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +set(ADDITIONAL_OPTIONS -DSHARED=OFF) + +vcpkg_download_distfile(ARCHIVE + URLS "http://glaros.dtc.umn.edu/gkhome/fetch/sw/parmetis/parmetis-4.0.3.tar.gz" + FILENAME "parmetis-4.0.3.tar.gz" + SHA512 454a91921ca35c981df11c9846a11963ff8fd8407a25179453af33f8fe69493f6dd7f2a0b8feed9a7d3f121e45b715749dd7a94873eaac2bae4cad1e535ca132 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + fix-metis-vs14-math.patch + fix-gklib-vs14-math.patch + fix-root-cmakelist.patch + fix-libparmetis-cmakelist.patch + use_stdint.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${ADDITIONAL_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/parmetis) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/parmetis/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/parmetis/copyright) diff --git a/vcpkg/ports/parmetis/use_stdint.patch b/vcpkg/ports/parmetis/use_stdint.patch new file mode 100644 index 0000000..5b239e6 --- /dev/null +++ b/vcpkg/ports/parmetis/use_stdint.patch @@ -0,0 +1,22 @@ +diff --git a/metis/GKlib/ms_stdint.h b/metis/GKlib/ms_stdint.h +index 7e200dc..0d07a7a 100644 +--- a/metis/GKlib/ms_stdint.h ++++ b/metis/GKlib/ms_stdint.h +@@ -42,6 +42,10 @@ + + #include + ++#if(_MSC_VER >= 1900) ++ #include ++#else ++ + // For Visual Studio 6 in C++ mode wrap include with 'extern "C++" {}' + // or compiler give many errors like this: + // error C2733: second C linkage of overloaded function 'wmemchr' not allowed +@@ -218,5 +222,6 @@ typedef uint64_t uintmax_t; + + #endif // __STDC_CONSTANT_MACROS ] + ++#endif + + #endif // _MSC_STDINT_H_ ] diff --git a/vcpkg/ports/parquet/CONTROL b/vcpkg/ports/parquet/CONTROL new file mode 100644 index 0000000..21584e8 --- /dev/null +++ b/vcpkg/ports/parquet/CONTROL @@ -0,0 +1,4 @@ +Source: parquet +Version: 0 +Build-Depends: arrow +Description: Parquet-cpp is a C++ library to read and write the Apache Parquet columnar data format. It is now part of the arrow library. \ No newline at end of file diff --git a/vcpkg/ports/parquet/portfile.cmake b/vcpkg/ports/parquet/portfile.cmake new file mode 100644 index 0000000..593c1e1 --- /dev/null +++ b/vcpkg/ports/parquet/portfile.cmake @@ -0,0 +1,2 @@ +# The parquet library has been merged into arrow +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/vcpkg/ports/parson/CMakeLists.txt b/vcpkg/ports/parson/CMakeLists.txt new file mode 100644 index 0000000..f96ed42 --- /dev/null +++ b/vcpkg/ports/parson/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.5) +project(parson C) + +add_library(parson parson.c) +target_include_directories(parson PUBLIC $) + +install(TARGETS parson + EXPORT unofficial-parson-targets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install( + EXPORT unofficial-parson-targets + FILE unofficial-parson-config.cmake + NAMESPACE unofficial::parson:: + DESTINATION share/unofficial-parson +) diff --git a/vcpkg/ports/parson/CONTROL b/vcpkg/ports/parson/CONTROL new file mode 100644 index 0000000..278cdc2 --- /dev/null +++ b/vcpkg/ports/parson/CONTROL @@ -0,0 +1,3 @@ +Source: parson +Version: 2019-07-11 +Description: a lighweight json library written in C diff --git a/vcpkg/ports/parson/portfile.cmake b/vcpkg/ports/parson/portfile.cmake new file mode 100644 index 0000000..3438043 --- /dev/null +++ b/vcpkg/ports/parson/portfile.cmake @@ -0,0 +1,33 @@ +include(vcpkg_common_functions) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message("parson only supports static linkage") + set(VCPKG_LIBRARY_LINKAGE "static") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kgabis/parson + REF 33e5519d0ae68784c91c92af2f48a5b07dc14490 + SHA512 b4477fe1038465edb210d1d02c8241ba02c44a01fa7838fb6217b36659eae3c5eaf450ec559bd609dfdc2417b4948eacc4a643ed7f1684f9b4bbaded421d7b80 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(COPY ${SOURCE_PATH}/parson.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-parson TARGET_PATH share/unofficial-parson) + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/parson RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/pbc/CONTROL b/vcpkg/ports/pbc/CONTROL new file mode 100644 index 0000000..e7f0cc3 --- /dev/null +++ b/vcpkg/ports/pbc/CONTROL @@ -0,0 +1,7 @@ +Source: pbc +Version: 0.5.14 +Port-Version: 4 +Build-Depends: mpir (windows), gmp (!windows) +Homepage: https://crypto.stanford.edu/pbc +Description: Pairing-Based Crypto library provides low-level routines for pairing-based cryptosystems. +Supports: !uwp diff --git a/vcpkg/ports/pbc/linux.patch b/vcpkg/ports/pbc/linux.patch new file mode 100644 index 0000000..1982777 --- /dev/null +++ b/vcpkg/ports/pbc/linux.patch @@ -0,0 +1,45 @@ +--- configure.ac 2018-11-29 13:51:14.495012138 +0100 ++++ configure.ac 2018-11-29 13:51:45.308095312 +0100 +@@ -10,7 +10,6 @@ + LT_INIT + #AC_CANONICAL_HOST + +-CFLAGS= + default_fink_path=/sw + case $host_os in + darwin*) +@@ -78,20 +77,7 @@ + AC_PROG_MAKE_SET + + AC_PROG_LEX +-if test "x$LEX" != xflex; then +- echo "************************" +- echo "flex not found" +- echo "************************" +- exit -1 +-fi +- + AC_PROG_YACC +-if test "x$YACC" != "xbison -y"; then +- echo "************************" +- echo "bison not found" +- echo "************************" +- exit -1 +-fi + + # Checks for libraries. + lib_err_msg="add its path to LDFLAGS\nsee ./configure --help" +@@ -121,13 +134,6 @@ + + CFLAGS="$CFLAGS -Wall -W -Wfloat-equal -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wredundant-decls \ + -Wendif-labels -Wshadow -pipe -ffast-math -U__STRICT_ANSI__ -std=gnu99" +-if test "$with_debug" == "y"; then +- CFLAGS="$CFLAGS -g3 -O0" +-elif test "$with_enable_optimized" != "no"; then +- CFLAGS="$CFLAGS -g -O2" +-else +- CFLAGS="$CFLAGS -fomit-frame-pointer -O3" +-fi + + if test "$with_safe_clean" != "n"; then + CFLAGS="$CFLAGS -DSAFE_CLEAN" diff --git a/vcpkg/ports/pbc/portfile.cmake b/vcpkg/ports/pbc/portfile.cmake new file mode 100644 index 0000000..93b06c5 --- /dev/null +++ b/vcpkg/ports/pbc/portfile.cmake @@ -0,0 +1,115 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP") + +set(PBC_VERSION 0.5.14) + +if(NOT VCPKG_TARGET_IS_WINDOWS) + vcpkg_download_distfile( + ARCHIVE + URLS "https://crypto.stanford.edu/pbc/files/pbc-${PBC_VERSION}.tar.gz" + FILENAME pbc-${PBC_VERSION}.tar.gz + SHA512 d75d4ceb3f67ee62c7ca41e2a91ee914fbffaeb70256675aed6734d586950ea8e64e2f16dc069d71481eddb703624df8d46497005fb58e75cf098dd7e7961333 + ) + + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${PBC_VERSION} + PATCHES linux.patch + ) + + vcpkg_find_acquire_program(BISON) + vcpkg_find_acquire_program(FLEX) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(SHARED_STATIC --enable-static --disable-shared) + else() + set(SHARED_STATIC --disable-static --enable-shared) + endif() + + set(OPTIONS ${SHARED_STATIC} LEX=${FLEX} YACC=${BISON}\ -y) + + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + COPY_SOURCE + OPTIONS + ${OPTIONS} + ) + + vcpkg_install_make() + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/info) + file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +else() + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO blynn/pbc + REF fbf4589036ce4f662e2d06905862c9e816cf9d08 + SHA512 9348afd3866090b9fca189ae3a6bbb86c842b5f6ee7e1972f1a579993e589952c5926cb0795d4db1e647e3af263827e22c7602314c39bd97e03ffe9ad0fb48ab + HEAD_REF master + PATCHES windows.patch + ) + + set(CMAKE_FIND_LIBRARY_PREFIXES "") + set(CMAKE_FIND_LIBRARY_SUFFIXES "") + + find_path(MPIR_INCLUDE_DIR "gmp.h" HINTS ${CURRENT_INSTALLED_DIR} PATH_SUFFIXES include) + if(NOT MPIR_INCLUDE_DIR) + message(FATAL_ERROR "GMP includes not found") + endif() + + find_library(MPIR_LIBRARIES_REL NAMES "mpir.lib" HINTS ${CURRENT_INSTALLED_DIR} PATH_SUFFIXES lib) + if(NOT MPIR_LIBRARIES_REL) + message(FATAL_ERROR "mpir library not found") + endif() + + find_library(MPIR_LIBRARIES_DBG NAMES "mpir.lib" HINTS ${CURRENT_INSTALLED_DIR} PATH_SUFFIXES debug/lib) + if(NOT MPIR_LIBRARIES_DBG) + message(FATAL_ERROR "mpir debug library not found") + endif() + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(LibrarySuffix "lib") + set(ConfigurationSuffix "") + else() + set(LibrarySuffix "dll") + set(ConfigurationSuffix " DLL") + endif() + + if(VCPKG_CRT_LINKAGE STREQUAL "static") + set(RuntimeLibraryExt "") + else() + set(RuntimeLibraryExt "DLL") + endif() + + if(TRIPLET_SYSTEM_ARCH STREQUAL "x86") + set(Platform "Win32") + else() + set(Platform ${TRIPLET_SYSTEM_ARCH}) + endif() + + # PBC expects mpir directory in build root + get_filename_component(SOURCE_PATH_PARENT ${SOURCE_PATH} DIRECTORY) + file(REMOVE_RECURSE ${SOURCE_PATH_PARENT}/mpir) + file(MAKE_DIRECTORY ${SOURCE_PATH_PARENT}/mpir) + file(GLOB FILES ${MPIR_INCLUDE_DIR}/gmp*.h) + file(COPY ${FILES} ${MPIR_LIBRARIES_REL} DESTINATION "${SOURCE_PATH_PARENT}/mpir/${LibrarySuffix}/${Platform}/Release") + file(COPY ${FILES} ${MPIR_LIBRARIES_DBG} DESTINATION "${SOURCE_PATH_PARENT}/mpir/${LibrarySuffix}/${Platform}/Debug") + + get_filename_component(SOURCE_PATH_SUFFIX ${SOURCE_PATH} NAME) + vcpkg_install_msbuild(SOURCE_PATH ${SOURCE_PATH_PARENT} + PROJECT_SUBPATH ${SOURCE_PATH_SUFFIX}/pbcwin/projects/pbclib.vcxproj + INCLUDES_SUBPATH ${SOURCE_PATH_SUFFIX}/include + LICENSE_SUBPATH ${SOURCE_PATH_SUFFIX}/COPYING + RELEASE_CONFIGURATION "Release${ConfigurationSuffix}" + DEBUG_CONFIGURATION "Debug${ConfigurationSuffix}" + OPTIONS_DEBUG "/p:RuntimeLibrary=MultiThreadedDebug${RuntimeLibraryExt}" + OPTIONS_RELEASE "/p:RuntimeLibrary=MultiThreaded${RuntimeLibraryExt}" + OPTIONS /p:SolutionDir=../ + ALLOW_ROOT_INCLUDES ON + ) + + # clean up mpir stuff + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/mpir.lib ${CURRENT_PACKAGES_DIR}/debug/lib/mpir.lib) +endif() diff --git a/vcpkg/ports/pbc/windows.patch b/vcpkg/ports/pbc/windows.patch new file mode 100644 index 0000000..ea4942c --- /dev/null +++ b/vcpkg/ports/pbc/windows.patch @@ -0,0 +1,130 @@ +diff --git "a/include/pbc_curve.h" "b/include/pbc_curve.h" +--- "a/include/pbc_curve.h" ++++ "b/include/pbc_curve.h" +@@ -60,7 +60,9 @@ + + void field_curve_set_quotient_cmp(field_ptr c, mpz_t quotient_cmp); + ++#ifdef __GNUC__ + #pragma GCC visibility push(hidden) ++#endif + // Internal: + + element_ptr curve_x_coord(element_t e); +@@ -74,6 +76,8 @@ + void curve_set_si(element_t R, long int x, long int y); + void curve_set_gen_no_cofac(element_ptr a); + ++#ifdef __GNUC__ + #pragma GCC visibility pop ++#endif + + #endif //__PBC_CURVE_H__ +diff --git "a/include/pbc_vc_compat.win32.h" "b/include/pbc_vc_compat.win32.h" +index 27d3bba..7f772d4 100644 +--- "a/include/pbc_vc_compat.win32.h" ++++ "b/include/pbc_vc_compat.win32.h" +@@ -3,7 +3,3 @@ + #define __attribute__(X) + #define inline + #define __func__ __FUNCTION__ +- +-#define NULL 0 +- +-#define snprintf _snprintf +\ No newline at end of file +diff --git "a/pbcwin/projects/pbclib.vcxproj" "b/pbcwin/projects/pbclib.vcxproj" +index f0a9b3f..507c24d 100644 +--- "a/pbcwin/projects/pbclib.vcxproj" ++++ "b/pbcwin/projects/pbclib.vcxproj" +@@ -214,13 +214,13 @@  + + + $(SolutionDir)..\include;$(SolutionDir)..;$(SolutionDir)..\..\mpir\lib\$(Platform)\Release;$(IncludePath) +- $(SolutionDir)..\..\mpir\lib\x64\Release;$(LibraryPath) ++ $(SolutionDir)..\..\mpir\lib\$(Platform)\Release;$(LibraryPath) + $(SolutionDir)lib\$(Platform)\Release\ + $(SolutionDir)obj\$(Platform)\$(Configuration)\$(ProjectName)\ + + +- $(SolutionDir)..\include;$(SolutionDir)..;$(SolutionDir)..\..\mpir\lib\x64\Release;$(IncludePath) +- $(SolutionDir)..\..\mpir\lib\x64\Release;$(LibraryPath) ++ $(SolutionDir)..\include;$(SolutionDir)..;$(SolutionDir)..\..\mpir\lib\$(Platform)\Release;$(IncludePath) ++ $(SolutionDir)..\..\mpir\lib\$(Platform)\Release;$(LibraryPath) + $(SolutionDir)lib\$(Platform)\Release\ + $(SolutionDir)obj\$(Platform)\$(Configuration)\$(ProjectName)\ + +@@ -245,7 +245,8 @@  + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + pbc_vc_compat.win32.h + 4068 +- MultiThreadedDebug ++ $(RuntimeLibrary) ++ OldStyle + + + true +@@ -275,7 +276,8 @@ echo *************************************************************************** + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + pbc_vc_compat.win32.h + 4068 +- MultiThreadedDebug ++ $(RuntimeLibrary) ++ OldStyle + + + true +@@ -305,7 +307,7 @@ echo *************************************************************************** + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + pbc_vc_compat.win32.h + 4068 +- MultiThreadedDebugDLL ++ $(RuntimeLibrary) + + + true +@@ -332,7 +334,7 @@ echo *************************************************************************** + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + pbc_vc_compat.win32.h + 4068 +- MultiThreadedDebugDLL ++ $(RuntimeLibrary) + + + true +@@ -361,7 +363,7 @@ echo *************************************************************************** + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + pbc_vc_compat.win32.h + 4068 +- MultiThreaded ++ $(RuntimeLibrary) + + + true +@@ -395,7 +397,7 @@ echo *************************************************************************** + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + pbc_vc_compat.win32.h + 4068 +- MultiThreaded ++ $(RuntimeLibrary) + + + true +@@ -429,7 +431,7 @@ echo *************************************************************************** + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + pbc_vc_compat.win32.h + 4068 +- MultiThreadedDLL ++ $(RuntimeLibrary) + + + true +@@ -460,7 +462,7 @@ echo *************************************************************************** + _CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + pbc_vc_compat.win32.h + 4068 +- MultiThreadedDLL ++ $(RuntimeLibrary) + + + true diff --git a/vcpkg/ports/pcg/CONTROL b/vcpkg/ports/pcg/CONTROL new file mode 100644 index 0000000..e010350 --- /dev/null +++ b/vcpkg/ports/pcg/CONTROL @@ -0,0 +1,3 @@ +Source: pcg +Version: 0.98.1 +Description: Permuted Congruential Generator diff --git a/vcpkg/ports/pcg/portfile.cmake b/vcpkg/ports/pcg/portfile.cmake new file mode 100644 index 0000000..75a4c90 --- /dev/null +++ b/vcpkg/ports/pcg/portfile.cmake @@ -0,0 +1,14 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO imneme/pcg-cpp + REF v0.98.1 + SHA512 3625913eba3b5d3ff0763a00728535cd5273a335f0ce0a9ab8e0cd8183a52309cbf72ae50d089cfea89445201993466a5533469db1cb6e82b14c62564731fe70 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/include/pcg_extras.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/include/pcg_random.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/include/pcg_uint128.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/pcg RENAME copyright) diff --git a/vcpkg/ports/pcl/CONTROL b/vcpkg/ports/pcl/CONTROL new file mode 100644 index 0000000..92b6dc7 --- /dev/null +++ b/vcpkg/ports/pcl/CONTROL @@ -0,0 +1,34 @@ +Source: pcl +Version: 1.11.0 +Port-Version: 2 +Homepage: https://github.com/PointCloudLibrary/pcl +Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing. +Build-Depends: eigen3, flann, qhull, libpng, boost-system, boost-filesystem, boost-thread, boost-date-time, boost-iostreams, boost-random, boost-foreach, boost-dynamic-bitset, boost-property-map, boost-graph, boost-multi-array, boost-signals2, boost-sort, boost-ptr-container, boost-uuid, boost-interprocess, boost-asio +Supports: !(arm64&windows) + +Feature: openni2 +Description: OpenNI2 support for PCL +Build-Depends: openni2 + +Feature: qt +Description: Qt support for PCL +Build-Depends: vtk[qt] + +Feature: pcap +Description: PCAP support for PCL +Build-Depends: winpcap (windows), libpcap (!windows) + +Feature: tools +Description: Build PCL utilities +Build-Depends: boost-accumulators + +Feature: cuda +Description: CUDA support for PCL +Build-Depends: cuda + +Feature: opengl +Description: OpenGL support for PCL + +Feature: vtk +Description: VTK-Visualizations support for PCL +Build-Depends: vtk diff --git a/vcpkg/ports/pcl/boost-1.70.patch b/vcpkg/ports/pcl/boost-1.70.patch new file mode 100644 index 0000000..eed9be0 --- /dev/null +++ b/vcpkg/ports/pcl/boost-1.70.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b301cf1..789b660 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -462,6 +462,9 @@ endif() + + # Boost (required) + include("${PCL_SOURCE_DIR}/cmake/pcl_find_boost.cmake") ++if (NOT APPLE AND NOT WIN32) ++ add_definitions(-fext-numeric-literals) ++endif() + + ### ---[ Create the config.h file + set(pcl_config_h_in "${CMAKE_CURRENT_SOURCE_DIR}/pcl_config.h.in") diff --git a/vcpkg/ports/pcl/fix-check-sse.patch b/vcpkg/ports/pcl/fix-check-sse.patch new file mode 100644 index 0000000..4fd6e67 --- /dev/null +++ b/vcpkg/ports/pcl/fix-check-sse.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e580b1a..572ea06 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -86,7 +86,7 @@ endif() + + # check for SSE flags + include("${PCL_SOURCE_DIR}/cmake/pcl_find_sse.cmake") +-if(PCL_ENABLE_SSE AND "${CMAKE_CXX_FLAGS}" STREQUAL "${CMAKE_CXX_FLAGS_DEFAULT}") ++if(PCL_ENABLE_SSE) + PCL_CHECK_FOR_SSE() + endif() + diff --git a/vcpkg/ports/pcl/fix-link-libpng.patch b/vcpkg/ports/pcl/fix-link-libpng.patch new file mode 100644 index 0000000..2d5ea5f --- /dev/null +++ b/vcpkg/ports/pcl/fix-link-libpng.patch @@ -0,0 +1,20 @@ +diff --git a/io/CMakeLists.txt b/io/CMakeLists.txt +index f234971..86ea242 100644 +--- a/io/CMakeLists.txt ++++ b/io/CMakeLists.txt +@@ -333,12 +333,13 @@ set(LIB_NAME "pcl_${SUBSYS_NAME}") + add_definitions(${VTK_DEFINES}) + PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${compression_incs} ${impl_incs} ${OPENNI_INCLUDES} ${OPENNI2_INCLUDES}) + target_include_directories(${LIB_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include") +-link_directories(${VTK_LINK_DIRECTORIES}) +-target_link_libraries("${LIB_NAME}" pcl_common pcl_io_ply ${VTK_LIBRARIES}) + if(PNG_FOUND) + target_link_libraries("${LIB_NAME}" ${PNG_LIBRARIES}) + endif() + ++link_directories(${VTK_LINK_DIRECTORIES}) ++target_link_libraries("${LIB_NAME}" pcl_common pcl_io_ply ${VTK_LIBRARIES}) ++ + if(LIBUSB_1_FOUND) + target_link_libraries("${LIB_NAME}" ${LIBUSB_1_LIBRARIES}) + endif() diff --git a/vcpkg/ports/pcl/pcl_config.patch b/vcpkg/ports/pcl/pcl_config.patch new file mode 100644 index 0000000..60bcec8 --- /dev/null +++ b/vcpkg/ports/pcl/pcl_config.patch @@ -0,0 +1,33 @@ +diff --git a/PCLConfig.cmake.in b/PCLConfig.cmake.in +index 9f78fcf..0cbe94f 100644 +--- a/PCLConfig.cmake.in ++++ b/PCLConfig.cmake.in +@@ -396,25 +396,16 @@ file(TO_CMAKE_PATH "${PCL_DIR}" PCL_DIR) + if(WIN32 AND NOT MINGW) + # PCLConfig.cmake is installed to PCL_ROOT/cmake + get_filename_component(PCL_ROOT "${PCL_DIR}" PATH) ++ get_filename_component(PCL_ROOT "${PCL_ROOT}" PATH) + else() + # PCLConfig.cmake is installed to PCL_ROOT/share/pcl-x.y + get_filename_component(PCL_ROOT "${CMAKE_CURRENT_LIST_DIR}/../.." ABSOLUTE) + endif() + + # check whether PCLConfig.cmake is found into a PCL installation or in a build tree +-if(EXISTS "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}/pcl/pcl_config.h") +- # Found a PCL installation +- # pcl_message("Found a PCL installation") +- set(PCL_CONF_INCLUDE_DIR "${PCL_ROOT}/include/pcl-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}") +- set(PCL_LIBRARY_DIRS "${PCL_ROOT}/@LIB_INSTALL_DIR@") +- if(EXISTS "${PCL_ROOT}/3rdParty") +- set(PCL_ALL_IN_ONE_INSTALLER ON) +- endif() +-elseif(EXISTS "${PCL_ROOT}/include/pcl/pcl_config.h") +- # Found a non-standard (likely ANDROID) PCL installation +- # pcl_message("Found a PCL installation") ++if(EXISTS "${PCL_ROOT}/include/pcl/pcl_config.h") + set(PCL_CONF_INCLUDE_DIR "${PCL_ROOT}/include") +- set(PCL_LIBRARY_DIRS "${PCL_ROOT}/lib") ++ set(PCL_LIBRARY_DIRS "${PCL_ROOT}/@LIB_INSTALL_DIR@" "${PCL_ROOT}/debug/@LIB_INSTALL_DIR@") + if(EXISTS "${PCL_ROOT}/3rdParty") + set(PCL_ALL_IN_ONE_INSTALLER ON) + endif() diff --git a/vcpkg/ports/pcl/pcl_utils.patch b/vcpkg/ports/pcl/pcl_utils.patch new file mode 100644 index 0000000..21b7593 --- /dev/null +++ b/vcpkg/ports/pcl/pcl_utils.patch @@ -0,0 +1,28 @@ +diff --git a/cmake/pcl_utils.cmake b/cmake/pcl_utils.cmake +index d87d02d..7c951bf 100644 +--- a/cmake/pcl_utils.cmake ++++ b/cmake/pcl_utils.cmake +@@ -94,21 +94,12 @@ macro(SET_INSTALL_DIRS) + if(NOT DEFINED LIB_INSTALL_DIR) + set(LIB_INSTALL_DIR "lib") + endif() +- if(NOT ANDROID) +- set(INCLUDE_INSTALL_ROOT +- "include/${PROJECT_NAME_LOWER}-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}") +- else() +- set(INCLUDE_INSTALL_ROOT "include") # Android, don't put into subdir +- endif() ++ set(INCLUDE_INSTALL_ROOT "include") + set(INCLUDE_INSTALL_DIR "${INCLUDE_INSTALL_ROOT}/pcl") + set(DOC_INSTALL_DIR "share/doc/${PROJECT_NAME_LOWER}-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}") + set(BIN_INSTALL_DIR "bin") + set(PKGCFG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig") +- if(WIN32 AND NOT MINGW) +- set(PCLCONFIG_INSTALL_DIR "cmake") +- else() +- set(PCLCONFIG_INSTALL_DIR "share/${PROJECT_NAME_LOWER}-${PCL_VERSION_MAJOR}.${PCL_VERSION_MINOR}") +- endif() ++ set(PCLCONFIG_INSTALL_DIR "share/pcl") + endmacro() + + diff --git a/vcpkg/ports/pcl/portfile.cmake b/vcpkg/ports/pcl/portfile.cmake new file mode 100644 index 0000000..06cd056 --- /dev/null +++ b/vcpkg/ports/pcl/portfile.cmake @@ -0,0 +1,75 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO PointCloudLibrary/pcl + REF f9f214f34a38d5bb67441140703a681c5d299906 # pcl-1.11.0 + SHA512 7d1bbadcd6843001895bd1faeb5ad4166f7746bf77f83573160507746d438797fbe9e283a8989f517fe1dc7195934ad59e008b4fce61e5943ce6426d49141365 + HEAD_REF master + PATCHES + pcl_utils.patch + pcl_config.patch + use_flann_targets.patch + boost-1.70.patch + fix-link-libpng.patch + remove-broken-targets.patch + fix-check-sse.patch +) + +file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindFLANN.cmake) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PCL_SHARED_LIBS) + +if ("cuda" IN_LIST FEATURES AND VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + message(FATAL_ERROR "Feature cuda only supports 64-bit compilation.") +endif() + +if ("tools" IN_LIST FEATURES AND VCPKG_LIBRARY_LINKAGE STREQUAL static) + message(FATAL_ERROR "Feature tools only supports dynamic build") +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + openni2 WITH_OPENNI2 + qt WITH_QT + pcap WITH_PCAP + cuda WITH_CUDA + cuda BUILD_CUDA + cuda BUILD_GPU + tools BUILD_tools + opengl WITH_OPENGL + vtk WITH_VTK +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + # BUILD + -DBUILD_surface_on_nurbs=ON + # PCL + -DPCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32=${PCL_SHARED_LIBS} + -DPCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32=${PCL_SHARED_LIBS} + -DPCL_BUILD_WITH_QHULL_DYNAMIC_LINKING_WIN32=${PCL_SHARED_LIBS} + -DPCL_SHARED_LIBS=${PCL_SHARED_LIBS} + # WITH + -DWITH_LIBUSB=OFF + -DWITH_PNG=ON + -DWITH_QHULL=ON + # FEATURES + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +if("tools" IN_LIST FEATURES) + 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/pcl) + file(REMOVE ${EXEFILES_RELEASE} ${EXEFILES_DEBUG}) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/pcl) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/pcl/remove-broken-targets.patch b/vcpkg/ports/pcl/remove-broken-targets.patch new file mode 100644 index 0000000..b6a5831 --- /dev/null +++ b/vcpkg/ports/pcl/remove-broken-targets.patch @@ -0,0 +1,20 @@ +diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt +index 1911f7b..11566a2 100644 +--- a/tools/CMakeLists.txt ++++ b/tools/CMakeLists.txt +@@ -123,15 +123,6 @@ target_link_libraries(pcl_concatenate_points_pcd pcl_common pcl_io) + PCL_ADD_EXECUTABLE(pcl_poisson_reconstruction COMPONENT ${SUBSYS_NAME} SOURCES poisson_reconstruction.cpp) + target_link_libraries(pcl_poisson_reconstruction pcl_common pcl_io pcl_surface) + +-PCL_ADD_EXECUTABLE(pcl_train_linemod_template COMPONENT ${SUBSYS_NAME} SOURCES train_linemod_template.cpp) +-target_link_libraries(pcl_train_linemod_template pcl_common pcl_io pcl_segmentation pcl_recognition) +- +-PCL_ADD_EXECUTABLE(pcl_match_linemod_template COMPONENT ${SUBSYS_NAME} SOURCES match_linemod_template.cpp) +-target_link_libraries(pcl_match_linemod_template pcl_common pcl_io pcl_recognition) +- +-PCL_ADD_EXECUTABLE(pcl_linemod_detection COMPONENT ${SUBSYS_NAME} SOURCES linemod_detection.cpp) +-target_link_libraries(pcl_linemod_detection pcl_common pcl_io pcl_recognition) +- + PCL_ADD_EXECUTABLE(pcl_fast_bilateral_filter COMPONENT ${SUBSYS_NAME} SOURCES fast_bilateral_filter.cpp) + target_link_libraries(pcl_fast_bilateral_filter pcl_common pcl_io pcl_filters) + diff --git a/vcpkg/ports/pcl/use_flann_targets.patch b/vcpkg/ports/pcl/use_flann_targets.patch new file mode 100644 index 0000000..a948cc0 --- /dev/null +++ b/vcpkg/ports/pcl/use_flann_targets.patch @@ -0,0 +1,97 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 93a6448..b24f681 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -302,10 +302,9 @@ find_package(Eigen 3.1 REQUIRED) + include_directories(SYSTEM ${EIGEN_INCLUDE_DIRS}) + + # FLANN (required) +-if(NOT PCL_SHARED_LIBS OR ((WIN32 AND NOT MINGW) AND NOT PCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32)) +- set(FLANN_USE_STATIC ON) +-endif() ++set(FLANN_USE_STATIC ON) + find_package(FLANN 1.7.0 REQUIRED) ++find_package(lz4) + + # libusb-1.0 + option(WITH_LIBUSB "Build USB RGBD-Camera drivers" TRUE) +diff --git a/PCLConfig.cmake.in b/PCLConfig.cmake.in +index 79077fb..042467b 100644 +--- a/PCLConfig.cmake.in ++++ b/PCLConfig.cmake.in +@@ -88,11 +88,6 @@ endmacro() + + ### ---[ 3rd party libraries + macro(find_boost) +- if(PCL_ALL_IN_ONE_INSTALLER) +- set(BOOST_ROOT "${PCL_ROOT}/3rdParty/Boost") +- elseif(NOT BOOST_INCLUDEDIR) +- set(BOOST_INCLUDEDIR "@Boost_INCLUDE_DIR@") +- endif() + # use static Boost in Windows + if(WIN32) + set(Boost_USE_STATIC_LIBS @Boost_USE_STATIC_LIBS@) +@@ -667,8 +662,8 @@ pcl_remove_duplicate_libraries(PCL_COMPONENTS PCL_LIBRARIES) + + # Add 3rd party libraries, as user code might include our .HPP implementations + list(APPEND PCL_LIBRARIES ${BOOST_LIBRARIES} ${QHULL_LIBRARIES} ${OPENNI_LIBRARIES} ${OPENNI2_LIBRARIES} ${ENSENSO_LIBRARIES} ${davidSDK_LIBRARIES} ${DSSDK_LIBRARIES} ${RSSDK_LIBRARIES} ${RSSDK2_LIBRARIES} ${VTK_LIBRARIES}) +-if (TARGET FLANN::FLANN) +- list(APPEND PCL_LIBRARIES FLANN::FLANN) ++if (TARGET flann::flann_cpp) ++ list(APPEND PCL_LIBRARIES flann::flann_cpp) + endif() + + find_package_handle_standard_args(PCL DEFAULT_MSG PCL_LIBRARIES PCL_INCLUDE_DIRS) +diff --git a/doc/tutorials/content/sources/vfh_recognition/CMakeLists.txt b/doc/tutorials/content/sources/vfh_recognition/CMakeLists.txt +index 7d25d3f..18227a6 100644 +--- a/doc/tutorials/content/sources/vfh_recognition/CMakeLists.txt ++++ b/doc/tutorials/content/sources/vfh_recognition/CMakeLists.txt +@@ -16,7 +16,7 @@ include_directories(SYSTEM + + add_executable(build_tree build_tree.cpp) + target_link_libraries(build_tree ${PCL_LIBRARIES} ${Boost_LIBRARIES} +- FLANN::FLANN ${HDF5_LIBRARIES}) ++ flann::flann_cpp ${HDF5_LIBRARIES}) + + add_executable(nearest_neighbors nearest_neighbors.cpp) +-target_link_libraries(nearest_neighbors ${PCL_LIBRARIES} ${Boost_LIBRARIES} FLANN::FLANN ${HDF5_LIBRARIES}) ++target_link_libraries(nearest_neighbors ${PCL_LIBRARIES} ${Boost_LIBRARIES} flann::flann_cpp ${HDF5_LIBRARIES}) +diff --git a/kdtree/CMakeLists.txt b/kdtree/CMakeLists.txt +index 826e902..f714130 100644 +--- a/kdtree/CMakeLists.txt ++++ b/kdtree/CMakeLists.txt +@@ -31,7 +31,7 @@ set(impl_incs + set(LIB_NAME "pcl_${SUBSYS_NAME}") + include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include") + PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${impl_incs}) +-target_link_libraries("${LIB_NAME}" pcl_common FLANN::FLANN) ++target_link_libraries("${LIB_NAME}" pcl_common flann::flann_cpp) + set(EXT_DEPS flann) + PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC ${SUBSYS_DESC} PCL_DEPS ${SUBSYS_DEPS} EXT_DEPS ${EXT_DEPS}) + +diff --git a/search/CMakeLists.txt b/search/CMakeLists.txt +index 46f4632..67c5e53 100644 +--- a/search/CMakeLists.txt ++++ b/search/CMakeLists.txt +@@ -41,7 +41,7 @@ set(impl_incs + set(LIB_NAME "pcl_${SUBSYS_NAME}") + include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include") + PCL_ADD_LIBRARY(${LIB_NAME} COMPONENT ${SUBSYS_NAME} SOURCES ${srcs} ${incs} ${impl_incs}) +-target_link_libraries("${LIB_NAME}" pcl_common FLANN::FLANN pcl_octree pcl_kdtree) ++target_link_libraries("${LIB_NAME}" pcl_common flann::flann_cpp pcl_octree pcl_kdtree) + list(APPEND EXT_DEPS flann) + PCL_MAKE_PKGCONFIG(${LIB_NAME} COMPONENT ${SUBSYS_NAME} DESC ${SUBSYS_DESC} PCL_DEPS ${SUBSYS_DEPS}) + +diff --git a/test/features/CMakeLists.txt b/test/features/CMakeLists.txt +index 9775415..bf582ac 100644 +--- a/test/features/CMakeLists.txt ++++ b/test/features/CMakeLists.txt +@@ -91,7 +91,7 @@ if(BUILD_io) + ARGUMENTS "${PCL_SOURCE_DIR}/test/bun0.pcd") + PCL_ADD_TEST(features_narf test_narf + FILES test_narf.cpp +- LINK_WITH pcl_gtest pcl_features FLANN::FLANN) ++ LINK_WITH pcl_gtest pcl_features flann::flann_cpp) + PCL_ADD_TEST(a_ii_normals_test test_ii_normals + FILES test_ii_normals.cpp + LINK_WITH pcl_gtest pcl_io pcl_features diff --git a/vcpkg/ports/pcre/CONTROL b/vcpkg/ports/pcre/CONTROL new file mode 100644 index 0000000..cbd70b8 --- /dev/null +++ b/vcpkg/ports/pcre/CONTROL @@ -0,0 +1,5 @@ +Source: pcre +Version: 8.44 +Port-Version: 7 +Homepage: https://www.pcre.org/ +Description: Perl Compatible Regular Expressions diff --git a/vcpkg/ports/pcre/pcre-8.44_suppress_cmake_and_compiler_warnings-errors.patch b/vcpkg/ports/pcre/pcre-8.44_suppress_cmake_and_compiler_warnings-errors.patch new file mode 100644 index 0000000..1279268 --- /dev/null +++ b/vcpkg/ports/pcre/pcre-8.44_suppress_cmake_and_compiler_warnings-errors.patch @@ -0,0 +1,18 @@ +--- a/CMakeLists.txt 2017-01-23 16:33:46.000000000 +0100 ++++ b/CMakeLists.txt 2020-03-08 21:12:00.225068400 +0100 +@@ -74,7 +74,6 @@ + # CMP0026 to avoid warnings for the use of LOCATION in GET_TARGET_PROPERTY. + + CMAKE_MINIMUM_REQUIRED(VERSION 2.8.0) +-CMAKE_POLICY(SET CMP0026 OLD) + + SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) # for FindReadline.cmake + +@@ -191,6 +190,7 @@ + ENDIF(MINGW) + + IF(MSVC) ++ add_definitions(/wd4703 /wd4146 /wd4308) + OPTION(PCRE_STATIC_RUNTIME + "ON=Compile against the static runtime (/MT)." + OFF) diff --git a/vcpkg/ports/pcre/portfile.cmake b/vcpkg/ports/pcre/portfile.cmake new file mode 100644 index 0000000..6175b0b --- /dev/null +++ b/vcpkg/ports/pcre/portfile.cmake @@ -0,0 +1,126 @@ +set(PCRE_VERSION 8.44) +set(EXPECTED_SHA adddec1236b25ff1c90e73835c2ba25d60a5839cbde2d6be7838a8ec099f7443dede931dc39002943243e21afea572eda71ee8739058e72235a192e4324398f0) +set(PATCHES + # Fix CMake Deprecation Warning concerning OLD behavior for policy CMP0026 + # Suppress MSVC compiler warnings C4703, C4146, C4308, which fixes errors + # under x64-uwp and arm-uwp + pcre-8.44_suppress_cmake_and_compiler_warnings-errors.patch) + +vcpkg_download_distfile(ARCHIVE + URLS "https://ftp.pcre.org/pub/pcre/pcre-${PCRE_VERSION}.zip" + FILENAME "pcre-${PCRE_VERSION}.zip" + SHA512 ${EXPECTED_SHA} + SILENT_EXIT +) + +if (EXISTS "${ARCHIVE}") + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES ${PATCHES} + ) +else() + vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO pcre/pcre + REF ${PCRE_VERSION} + FILENAME "pcre-${PCRE_VERSION}.zip" + SHA512 ${EXPECTED_SHA} + PATCHES ${PATCHES} + ) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DPCRE_BUILD_TESTS=NO + -DPCRE_BUILD_PCREGREP=NO + -DPCRE_BUILD_PCRE32=YES + -DPCRE_BUILD_PCRE16=YES + -DPCRE_BUILD_PCRE8=YES + -DPCRE_SUPPORT_JIT=YES + -DPCRE_SUPPORT_UTF=YES + -DPCRE_SUPPORT_UNICODE_PROPERTIES=YES + # optional dependencies for PCREGREP + -DPCRE_SUPPORT_LIBBZ2=OFF + -DPCRE_SUPPORT_LIBZ=OFF + -DPCRE_SUPPORT_LIBEDIT=OFF + -DPCRE_SUPPORT_LIBREADLINE=OFF + # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2 + # OPTIONS_RELEASE -DOPTIMIZE=1 + # OPTIONS_DEBUG -DDEBUGGABLE=1 +) + +vcpkg_install_cmake() + +foreach(FILE ${CURRENT_PACKAGES_DIR}/include/pcre.h ${CURRENT_PACKAGES_DIR}/include/pcreposix.h) + file(READ ${FILE} PCRE_H) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined(PCRE_STATIC)" "1" PCRE_H "${PCRE_H}") + else() + string(REPLACE "defined(PCRE_STATIC)" "0" PCRE_H "${PCRE_H}") + endif() + file(WRITE ${FILE} "${PCRE_H}") +endforeach() + +# Create pkgconfig files +set(PACKAGE_VERSION ${PCRE_VERSION}) +set(prefix "${CURRENT_INSTALLED_DIR}") +set(exec_prefix "\${prefix}") +set(libdir "\${prefix}/lib") +set(includedir "\${prefix}/include") +if(VCPKG_TARGET_IS_LINUX) + # Used here in .pc.in files: Libs.private: @PTHREAD_CFLAGS@ + set(PTHREAD_CFLAGS "-pthread") +endif() +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + + configure_file("${SOURCE_PATH}/libpcre.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libpcre.pc" @ONLY) + configure_file("${SOURCE_PATH}/libpcre16.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libpcre16.pc" @ONLY) + configure_file("${SOURCE_PATH}/libpcre32.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libpcre32.pc" @ONLY) + configure_file("${SOURCE_PATH}/libpcrecpp.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libpcrecpp.pc" @ONLY) + configure_file("${SOURCE_PATH}/libpcreposix.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libpcreposix.pc" @ONLY) +endif() +# debug +set(prefix "${CURRENT_INSTALLED_DIR}/debug") +set(exec_prefix "\${prefix}") +set(libdir "\${prefix}/lib") +set(includedir "\${prefix}/../include") +if(NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + configure_file("${SOURCE_PATH}/libpcre.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libpcre.pc" @ONLY) + configure_file("${SOURCE_PATH}/libpcre16.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libpcre16.pc" @ONLY) + configure_file("${SOURCE_PATH}/libpcre32.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libpcre32.pc" @ONLY) + configure_file("${SOURCE_PATH}/libpcrecpp.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libpcrecpp.pc" @ONLY) + configure_file("${SOURCE_PATH}/libpcreposix.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libpcreposix.pc" @ONLY) + + if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libpcre.pc + "-lpcre" "-lpcred" + ) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libpcre16.pc + "-lpcre16" "-lpcre16d" + ) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libpcre32.pc + "-lpcre32" "-lpcre32d" + ) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libpcrecpp.pc + "-lpcre -lpcrecpp" "-lpcred -lpcrecppd" + ) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libpcreposix.pc + "-lpcreposix" "-lpcreposixd" + ) + endif() +endif() + +vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES pthread) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/man) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/man) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/pcre2/CONTROL b/vcpkg/ports/pcre2/CONTROL new file mode 100644 index 0000000..75fd954 --- /dev/null +++ b/vcpkg/ports/pcre2/CONTROL @@ -0,0 +1,5 @@ +Source: pcre2 +Version: 10.35 +Port-Version: 1 +Homepage: https://pcre.org/ +Description: PCRE2 is a re-working of the original Perl Compatible Regular Expressions library diff --git a/vcpkg/ports/pcre2/pcre2-10.35_add_check_for_Intel_CET.patch b/vcpkg/ports/pcre2/pcre2-10.35_add_check_for_Intel_CET.patch new file mode 100644 index 0000000..81b91d0 --- /dev/null +++ b/vcpkg/ports/pcre2/pcre2-10.35_add_check_for_Intel_CET.patch @@ -0,0 +1,26 @@ +--- a/CMakeLists.txt 2020-05-09 16:43:10.000000000 +0200 ++++ b/CMakeLists.txt 2020-07-09 19:33:12.725648600 +0200 +@@ -146,6 +146,23 @@ + ) + set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS}) + ++# Check whether Intel CET is enabled, and if so, adjust compiler flags. This ++# code was written by PH, trying to imitate the logic from the autotools ++# configuration. ++ ++CHECK_C_SOURCE_COMPILES( ++ "#ifndef __CET__ ++ #error CET is not enabled ++ #endif ++ int main() { return 0; }" ++ INTEL_CET_ENABLED ++) ++ ++IF (INTEL_CET_ENABLED) ++ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mshstk") ++ENDIF(INTEL_CET_ENABLED) ++ ++ + # User-configurable options + # + # Note: CMakeSetup displays these in alphabetical order, regardless of diff --git a/vcpkg/ports/pcre2/pcre2-10.35_fix-space.patch b/vcpkg/ports/pcre2/pcre2-10.35_fix-space.patch new file mode 100644 index 0000000..abcd75d --- /dev/null +++ b/vcpkg/ports/pcre2/pcre2-10.35_fix-space.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt 2020-05-09 16:43:10.000000000 +0200 ++++ b/CMakeLists.txt 2020-06-03 20:50:46.532419900 +0200 +@@ -108,7 +108,7 @@ + + LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) + +-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${PROJECT_SOURCE_DIR}/src") ++SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I\"${PROJECT_SOURCE_DIR}/src\"") + + # external packages + FIND_PACKAGE( BZip2 ) diff --git a/vcpkg/ports/pcre2/pcre2-10.35_fix-uwp.patch b/vcpkg/ports/pcre2/pcre2-10.35_fix-uwp.patch new file mode 100644 index 0000000..476dde0 --- /dev/null +++ b/vcpkg/ports/pcre2/pcre2-10.35_fix-uwp.patch @@ -0,0 +1,10 @@ +--- a/CMakeLists.txt 2020-05-09 16:43:10.000000000 +0200 ++++ b/CMakeLists.txt 2020-06-03 20:57:17.026182500 +0200 +@@ -619,6 +619,7 @@ + + IF(MSVC) + ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS) ++ add_compile_options(/wd4146) + ENDIF(MSVC) + + SET(CMAKE_INCLUDE_CURRENT_DIR 1) diff --git a/vcpkg/ports/pcre2/pcre2-10.35_fix_postfix_for_debug_Windows_builds.patch b/vcpkg/ports/pcre2/pcre2-10.35_fix_postfix_for_debug_Windows_builds.patch new file mode 100644 index 0000000..3cb78ae --- /dev/null +++ b/vcpkg/ports/pcre2/pcre2-10.35_fix_postfix_for_debug_Windows_builds.patch @@ -0,0 +1,141 @@ +Index: CMakeLists.txt +=================================================================== +--- CMakeLists.txt (revision 1255) ++++ CMakeLists.txt (working copy) +@@ -475,6 +475,12 @@ + ${PROJECT_BINARY_DIR}/pcre2.h + @ONLY) + ++# Make sure to not link debug libs ++# against release libs and vice versa ++IF(WIN32) ++ SET(CMAKE_DEBUG_POSTFIX "d") ++ENDIF(WIN32) ++ + # Generate pkg-config files + + SET(PACKAGE_VERSION "${PCRE2_MAJOR}.${PCRE2_MINOR}") +@@ -483,6 +489,9 @@ + SET(exec_prefix "\${prefix}") + SET(libdir "\${exec_prefix}/lib") + SET(includedir "\${prefix}/include") ++IF(WIN32 AND (CMAKE_BUILD_TYPE MATCHES Debug)) ++ SET(LIB_POSTFIX ${CMAKE_DEBUG_POSTFIX}) ++ENDIF() + CONFIGURE_FILE(libpcre2-posix.pc.in libpcre2-posix.pc @ONLY) + SET(pkg_config_files ${pkg_config_files} "${CMAKE_CURRENT_BINARY_DIR}/libpcre2-posix.pc") + +@@ -622,11 +631,6 @@ + ENDIF(MSVC) + + SET(CMAKE_INCLUDE_CURRENT_DIR 1) +-# needed to make sure to not link debug libs +-# against release libs and vice versa +-IF(WIN32) +- SET(CMAKE_DEBUG_POSTFIX "d") +-ENDIF(WIN32) + + SET(targets) + +Index: configure.ac +=================================================================== +--- configure.ac (revision 1255) ++++ configure.ac (working copy) +@@ -1007,6 +1007,9 @@ + AM_CONDITIONAL([WITH_GCOV],[test "x$enable_coverage" = "xyes"]) + + # Produce these files, in addition to config.h. ++# LIB_POSTFIX is used by CMakeLists.txt for Windows debug builds. ++# Pass empty LIB_POSTFIX to *.pc files and pcre2-config here. ++AC_SUBST(LIB_POSTFIX) + AC_CONFIG_FILES( + Makefile + libpcre2-8.pc +Index: libpcre2-16.pc.in +=================================================================== +--- libpcre2-16.pc.in (revision 1255) ++++ libpcre2-16.pc.in (working copy) +@@ -8,6 +8,6 @@ + Name: libpcre2-16 + Description: PCRE2 - Perl compatible regular expressions C library (2nd API) with 16 bit character support + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -lpcre2-16 ++Libs: -L${libdir} -lpcre2-16@LIB_POSTFIX@ + Libs.private: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ + Cflags: -I${includedir} @PCRE2_STATIC_CFLAG@ +Index: libpcre2-32.pc.in +=================================================================== +--- libpcre2-32.pc.in (revision 1255) ++++ libpcre2-32.pc.in (working copy) +@@ -8,6 +8,6 @@ + Name: libpcre2-32 + Description: PCRE2 - Perl compatible regular expressions C library (2nd API) with 32 bit character support + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -lpcre2-32 ++Libs: -L${libdir} -lpcre2-32@LIB_POSTFIX@ + Libs.private: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ + Cflags: -I${includedir} @PCRE2_STATIC_CFLAG@ +Index: libpcre2-8.pc.in +=================================================================== +--- libpcre2-8.pc.in (revision 1255) ++++ libpcre2-8.pc.in (working copy) +@@ -8,6 +8,6 @@ + Name: libpcre2-8 + Description: PCRE2 - Perl compatible regular expressions C library (2nd API) with 8 bit character support + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -lpcre2-8 ++Libs: -L${libdir} -lpcre2-8@LIB_POSTFIX@ + Libs.private: @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ + Cflags: -I${includedir} @PCRE2_STATIC_CFLAG@ +Index: libpcre2-posix.pc.in +=================================================================== +--- libpcre2-posix.pc.in (revision 1255) ++++ libpcre2-posix.pc.in (working copy) +@@ -8,6 +8,6 @@ + Name: libpcre2-posix + Description: Posix compatible interface to libpcre2-8 + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -lpcre2-posix ++Libs: -L${libdir} -lpcre2-posix@LIB_POSTFIX@ + Cflags: -I${includedir} @PCRE2_STATIC_CFLAG@ + Requires.private: libpcre2-8 +Index: pcre2-config.in +=================================================================== +--- pcre2-config.in (revision 1255) ++++ pcre2-config.in (working copy) +@@ -86,7 +86,7 @@ + ;; + --libs-posix) + if test @enable_pcre2_8@ = yes ; then +- echo $libS$libR -lpcre2-posix -lpcre2-8 ++ echo $libS$libR -lpcre2-posix@LIB_POSTFIX@ -lpcre2-8@LIB_POSTFIX@ + else + echo "${usage}" 1>&2 + fi +@@ -93,7 +93,7 @@ + ;; + --libs8) + if test @enable_pcre2_8@ = yes ; then +- echo $libS$libR -lpcre2-8 ++ echo $libS$libR -lpcre2-8@LIB_POSTFIX@ + else + echo "${usage}" 1>&2 + fi +@@ -100,7 +100,7 @@ + ;; + --libs16) + if test @enable_pcre2_16@ = yes ; then +- echo $libS$libR -lpcre2-16 ++ echo $libS$libR -lpcre2-16@LIB_POSTFIX@ + else + echo "${usage}" 1>&2 + fi +@@ -107,7 +107,7 @@ + ;; + --libs32) + if test @enable_pcre2_32@ = yes ; then +- echo $libS$libR -lpcre2-32 ++ echo $libS$libR -lpcre2-32@LIB_POSTFIX@ + else + echo "${usage}" 1>&2 + fi diff --git a/vcpkg/ports/pcre2/portfile.cmake b/vcpkg/ports/pcre2/portfile.cmake new file mode 100644 index 0000000..3395ccc --- /dev/null +++ b/vcpkg/ports/pcre2/portfile.cmake @@ -0,0 +1,81 @@ +set(PCRE2_VERSION 10.35) +set(EXPECTED_SHA bf1cb6ab8b1103f9503609783945b02cdc4294bb266643d0ba03656c941f07b6e183793f3bf513da950460e78cb9b429bff8ade27d8930339a63caed3a3236e3) +set(PATCHES + pcre2-10.35_fix-space.patch # Upstream: https://bugs.exim.org/show_bug.cgi?id=2588 + pcre2-10.35_fix-uwp.patch + pcre2-10.35_fix_postfix_for_debug_Windows_builds.patch # Upstream: https://bugs.exim.org/show_bug.cgi?id=2600 + pcre2-10.35_add_check_for_Intel_CET.patch # Upstream: https://bugs.exim.org/show_bug.cgi?id=2578 +) + +vcpkg_download_distfile(ARCHIVE + URLS "https://ftp.pcre.org/pub/pcre/pcre2-${PCRE2_VERSION}.zip" + FILENAME "pcre2-${PCRE2_VERSION}.zip" + SHA512 ${EXPECTED_SHA} + SILENT_EXIT +) + +if (EXISTS "${ARCHIVE}") + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES ${PATCHES} + ) +else() + vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO pcre/pcre2 + REF ${PCRE2_VERSION} + FILENAME "pcre2-${PCRE2_VERSION}.zip" + SHA512 ${EXPECTED_SHA} + PATCHES ${PATCHES} + ) +endif() + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Emscripten" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "iOS") + set(JIT OFF) +else() + set(JIT ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPCRE2_BUILD_PCRE2_8=ON + -DPCRE2_BUILD_PCRE2_16=ON + -DPCRE2_BUILD_PCRE2_32=ON + -DPCRE2_SUPPORT_JIT=${JIT} + -DPCRE2_SUPPORT_UNICODE=ON + -DPCRE2_BUILD_TESTS=OFF + -DPCRE2_BUILD_PCRE2GREP=OFF) + +vcpkg_install_cmake() + +file(READ ${CURRENT_PACKAGES_DIR}/include/pcre2.h PCRE2_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "defined(PCRE2_STATIC)" "1" PCRE2_H "${PCRE2_H}") +else() + string(REPLACE "defined(PCRE2_STATIC)" "0" PCRE2_H "${PCRE2_H}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/pcre2.h "${PCRE2_H}") + +# don't install POSIX wrapper +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/pcre2posix.h) +file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/pcre2-posix.lib ${CURRENT_PACKAGES_DIR}/debug/lib/pcre2-posixd.lib) +file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/pcre2-posix.dll ${CURRENT_PACKAGES_DIR}/debug/bin/pcre2-posixd.dll) +file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/libpcre2-posix.pc ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libpcre2-posix.pc) + +vcpkg_fixup_pkgconfig() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/man) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/man) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/pdal-c/CONTROL b/vcpkg/ports/pdal-c/CONTROL new file mode 100644 index 0000000..061e1a6 --- /dev/null +++ b/vcpkg/ports/pdal-c/CONTROL @@ -0,0 +1,4 @@ +Source: pdal-c +Version: 1.8-2 +Description: C API for the Point Data Abstraction Library (PDAL) +Build-Depends: pdal diff --git a/vcpkg/ports/pdal-c/fix-docs-version.patch b/vcpkg/ports/pdal-c/fix-docs-version.patch new file mode 100644 index 0000000..d44b50b --- /dev/null +++ b/vcpkg/ports/pdal-c/fix-docs-version.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1fbc4a4..c8a325a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -23,7 +23,8 @@ set(CMAKE_RELWITHDEBINFO_POSTFIX "" CACHE STRING "CMake RelWithDebInfo suffix") + set(PDALC_ENABLE_CODE_COVERAGE ON CACHE BOOL "Enable code coverage calculation") + set(PDALC_GCC_PARAM_GGC_MIN_HEAPSIZE "131072" CACHE STRING "GCC garbage collection minimum heap size") + +-include(ObtainProjectVersion) ++set(${PROJECT_NAME}_VERSION "1.8") ++set(BUILD_ID "vcpkg build") + include_directories("${CMAKE_SOURCE_DIR}/source") + + if(CMAKE_COMPILER_IS_GNUCXX) diff --git a/vcpkg/ports/pdal-c/portfile.cmake b/vcpkg/ports/pdal-c/portfile.cmake new file mode 100644 index 0000000..bdfdd38 --- /dev/null +++ b/vcpkg/ports/pdal-c/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO PDAL/CAPI + REF 1.8 + SHA512 6a5f4cb3d36b419f3cd195028c3e6dc17abf3cdb7495aa3df638bc1f842ba98243c73e051e9cfcd3afe22787309cb871374b152ded92e6e06f404cd7b1ae50bf + HEAD_REF master + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-docs-version.patch + ${CMAKE_CURRENT_LIST_DIR}/preserve-install-dir.patch + ${CMAKE_CURRENT_LIST_DIR}/remove-tests.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPDALC_ENABLE_CODE_COVERAGE:BOOL=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Remove headers from debug +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Install copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.md + DESTINATION ${CURRENT_PACKAGES_DIR}/share/pdal-c + RENAME copyright +) diff --git a/vcpkg/ports/pdal-c/preserve-install-dir.patch b/vcpkg/ports/pdal-c/preserve-install-dir.patch new file mode 100644 index 0000000..87377ab --- /dev/null +++ b/vcpkg/ports/pdal-c/preserve-install-dir.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1fbc4a4..075c86c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -13,8 +13,6 @@ set(CMAKE_CXX_STANDARD 11) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) + +-# Install to the build directory +-set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}" CACHE STRING "CMake install prefix" FORCE) + + # Use "d" suffix for debug builds + # Do not use a suffix for RelWithDebInfo diff --git a/vcpkg/ports/pdal-c/remove-tests.patch b/vcpkg/ports/pdal-c/remove-tests.patch new file mode 100644 index 0000000..c50914e --- /dev/null +++ b/vcpkg/ports/pdal-c/remove-tests.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1fbc4a4..e31e552 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -44,7 +44,3 @@ endif() + + add_subdirectory("source/pdal") + add_subdirectory("doc") +- +-include(CTest) +-add_subdirectory("tests/data") +-add_subdirectory("tests/pdal") diff --git a/vcpkg/ports/pdal/0001-win32_compiler_options.cmake.patch b/vcpkg/ports/pdal/0001-win32_compiler_options.cmake.patch new file mode 100644 index 0000000..8486cc1 --- /dev/null +++ b/vcpkg/ports/pdal/0001-win32_compiler_options.cmake.patch @@ -0,0 +1,14 @@ +diff -Nuar a/cmake/win32_compiler_options.cmake b/cmake/win32_compiler_options.cmake +--- a/cmake/win32_compiler_options.cmake 2018-04-06 20:24:17.000000000 +0200 ++++ b/cmake/win32_compiler_options.cmake 2018-04-28 19:40:54.534593200 +0200 +@@ -67,10 +67,6 @@ + endif() + endif() + +-set(CMAKE_INCLUDE_PATH "c:/OSGeo4W64/include;$ENV{CMAKE_INCLUDE_PATH}") +-set(CMAKE_LIBRARY_PATH "c:/OSGeo4W64/lib;$ENV{CMAKE_LIBRARY_PATH}") +-set(CMAKE_PREFIX_PATH "c:/OSGeo4W64/cmake;$ENV{CMAKE_LIBRARY_PATH}") +- + #ABELL (& gadomski) - WHY? + set(PDAL_PLATFORM_WIN32 1) + set(WINSOCK_LIBRARY ws2_32) diff --git a/vcpkg/ports/pdal/0002-no-source-dir-writes.patch b/vcpkg/ports/pdal/0002-no-source-dir-writes.patch new file mode 100644 index 0000000..f7ec12f --- /dev/null +++ b/vcpkg/ports/pdal/0002-no-source-dir-writes.patch @@ -0,0 +1,49 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index dc146d1..9b82544 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -140,7 +140,7 @@ get_git_head_revision(GIT_REFSPEC GIT_SHA1) + + configure_file( + "${PROJECT_SOURCE_DIR}/gitsha.cpp.in" +- "${PROJECT_SOURCE_DIR}/pdal/gitsha.cpp") ++ "${PROJECT_BINARY_DIR}/pdal/gitsha.cpp") + + # needs to come before configuration of pdal_features + if(APPLE) +@@ -201,6 +201,7 @@ file(GLOB BASE_SRCS + ${PDAL_IO_DIR}/*.cpp + ${PDAL_KERNELS_DIR}/*.cpp + ${PDAL_SRC_DIR}/*.cpp ++ ${PROJECT_BINARY_DIR}/pdal/gitsha.cpp + ${PDAL_SRC_DIR}/compression/*.cpp) + file(GLOB_RECURSE PRIVATE_SRCS + ${PDAL_FILTERS_DIR}/private/*.cpp +diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt +index b02aa4a..d60b041 100644 +--- a/apps/CMakeLists.txt ++++ b/apps/CMakeLists.txt +@@ -66,9 +66,9 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pdal.pc + if(UNIX OR APPLE) + # Autoconf compatibility variables to use the same script source. + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/pdal-config.in" +- "${CMAKE_CURRENT_SOURCE_DIR}/pdal-config" @ONLY) ++ "${CMAKE_CURRENT_BINARY_DIR}/pdal-config" @ONLY) + +- file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/pdal-config" ++ file(COPY "${CMAKE_CURRENT_BINARY_DIR}/pdal-config" + DESTINATION + "${PDAL_OUTPUT_BIN_DIR}/" + FILE_PERMISSIONS +@@ -85,9 +85,9 @@ if(UNIX OR APPLE) + elseif(WIN32) + # Autoconf compatibility variables to use the same script source. + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/pdal-config-bat.in" +- "${CMAKE_CURRENT_SOURCE_DIR}/pdal-config.bat" @ONLY) ++ "${CMAKE_CURRENT_BINARY_DIR}/pdal-config.bat" @ONLY) + +- file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/pdal-config.bat" ++ file(COPY "${CMAKE_CURRENT_BINARY_DIR}/pdal-config.bat" + DESTINATION + "${PDAL_OUTPUT_BIN_DIR}/" + FILE_PERMISSIONS diff --git a/vcpkg/ports/pdal/0003-fix-copy-vendor.patch b/vcpkg/ports/pdal/0003-fix-copy-vendor.patch new file mode 100644 index 0000000..3aad7af --- /dev/null +++ b/vcpkg/ports/pdal/0003-fix-copy-vendor.patch @@ -0,0 +1,59 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 43e446a..c4c7d6f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -339,6 +339,30 @@ install(DIRECTORY ${PDAL_FILTERS_DIR} + install(FILES ${DIMENSION_OUTFILE} ${pdal_features_hpp} + DESTINATION include/pdal + ) ++# Install vendor headers ++install(DIRECTORY ${PDAL_VENDOR_ARBITER_DIR} ++ DESTINATION include/pdal/vendor ++ FILES_MATCHING PATTERN "*.hpp" ++ PATTERN "private" EXCLUDE ++) ++ ++install(DIRECTORY ${PDAL_VENDOR_JSONCPP_DIR} ++ DESTINATION include/pdal/vendor ++ FILES_MATCHING PATTERN "*.h" ++ PATTERN "private" EXCLUDE ++) ++ ++install(DIRECTORY ${PDAL_VENDOR_KAZHDAN_DIR} ++ DESTINATION include/pdal/vendor ++ FILES_MATCHING PATTERN "*.h" ++ PATTERN "private" EXCLUDE ++) ++ ++install(DIRECTORY ${PDAL_VENDOR_NANOFLANN_DIR} ++ DESTINATION include/pdal/vendor ++ FILES_MATCHING PATTERN "*.hpp" ++ PATTERN "private" EXCLUDE ++) + + # + # CPACK +@@ -348,7 +373,7 @@ add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source) + + export( + TARGETS +- ${PDAL_BASE_LIB_NAME} ${PDAL_UTIL_LIB_NAME} ++ ${PDAL_BASE_LIB_NAME} ${PDAL_ARBITER_LIB_NAME} ${PDAL_KAZHDAN_LIB_NAME} ${PDAL_UTIL_LIB_NAME} + FILE + "${PDAL_BINARY_DIR}/PDALTargets.cmake") + +diff --git a/cmake/directories.cmake b/cmake/directories.cmake +index f079ec7..8e366e8 100644 +--- a/cmake/directories.cmake ++++ b/cmake/directories.cmake +@@ -11,4 +11,7 @@ set(PDAL_KERNELS_DIR ${ROOT_DIR}/kernels) + set(PDAL_FILTERS_DIR ${ROOT_DIR}/filters) + set(PDAL_IO_DIR ${ROOT_DIR}/io) + set(PDAL_VENDOR_DIR ${ROOT_DIR}/vendor) +- ++set(PDAL_VENDOR_ARBITER_DIR ${PDAL_VENDOR_DIR}/arbiter) ++set(PDAL_VENDOR_JSONCPP_DIR ${PDAL_VENDOR_DIR}/jsoncpp) ++set(PDAL_VENDOR_KAZHDAN_DIR ${PDAL_VENDOR_DIR}/kazhdan) ++set(PDAL_VENDOR_NANOFLANN_DIR ${PDAL_VENDOR_DIR}/nanoflann) + +\ No newline at end of file diff --git a/vcpkg/ports/pdal/CONTROL b/vcpkg/ports/pdal/CONTROL new file mode 100644 index 0000000..d105dec --- /dev/null +++ b/vcpkg/ports/pdal/CONTROL @@ -0,0 +1,4 @@ +Source: pdal +Version: 1.7.1-8 +Description: PDAL - Point Data Abstraction Library is a library for manipulating point cloud data. +Build-Depends: gdal, geos, jsoncpp, libgeotiff, laszip, boost-system, boost-filesystem diff --git a/vcpkg/ports/pdal/FindGEOS.cmake b/vcpkg/ports/pdal/FindGEOS.cmake new file mode 100644 index 0000000..88d17b0 --- /dev/null +++ b/vcpkg/ports/pdal/FindGEOS.cmake @@ -0,0 +1,13 @@ +find_path(GEOS_INCLUDE_DIR geos_c.h) + +find_library(GEOS_LIBRARY_DEBUG NAMES geos_cd) +find_library(GEOS_LIBRARY_RELEASE NAMES geos_c) + +include(SelectLibraryConfigurations) +select_library_configurations(GEOS) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS( + GEOS DEFAULT_MSG + GEOS_LIBRARY GEOS_INCLUDE_DIR +) diff --git a/vcpkg/ports/pdal/PDALConfig.patch b/vcpkg/ports/pdal/PDALConfig.patch new file mode 100644 index 0000000..25e9bfc --- /dev/null +++ b/vcpkg/ports/pdal/PDALConfig.patch @@ -0,0 +1,14 @@ +diff --git a/PDALConfig.cmake.in b/PDALConfig.cmake.in +index a03ef142e..2d06a2937 100644 +--- a/PDALConfig.cmake.in ++++ b/PDALConfig.cmake.in +@@ -15,6 +15,9 @@ foreach(_dir @PDAL_CONFIG_LIBRARY_DIRS@) + list(APPEND PDAL_LIBRARY_DIRS ${_foo}) + endforeach(_dir) + ++include(CMakeFindDependencyMacro) ++find_dependency(GeoTIFF) ++find_dependency(CURL) + include("${CMAKE_CURRENT_LIST_DIR}/PDALTargets.cmake") + + if (WIN32) diff --git a/vcpkg/ports/pdal/fix-dependency.patch b/vcpkg/ports/pdal/fix-dependency.patch new file mode 100644 index 0000000..f7351c9 --- /dev/null +++ b/vcpkg/ports/pdal/fix-dependency.patch @@ -0,0 +1,228 @@ +diff --git a/cmake/geos.cmake b/cmake/geos.cmake +index 90b79d9..4e144a6 100644 +--- a/cmake/geos.cmake ++++ b/cmake/geos.cmake +@@ -1,7 +1,11 @@ + # + # GEOS (required) + # +-find_package(GEOS QUIET 3.3) ++include(SelectLibraryConfigurations) ++find_library(GEOS_LIBRARY_RELEASE NAMES geos_c libgeos_c) ++find_library(GEOS_LIBRARY_DEBUG NAMES geos_cd libgeos_cd) ++select_library_configurations(GEOS) ++find_path(GEOS_INCLUDE_DIR geos_c.h) + set_package_properties(GEOS PROPERTIES TYPE REQUIRED + PURPOSE "Provides general purpose geometry support") + +diff --git a/cmake/modules/FindPostgreSQL.cmake b/cmake/modules/FindPostgreSQL.cmake +index 8178418..31b54d6 100644 +--- a/cmake/modules/FindPostgreSQL.cmake ++++ b/cmake/modules/FindPostgreSQL.cmake +@@ -80,4 +80,11 @@ find_package_handle_standard_args(PostgreSQL + POSTGRESQL_LIBRARIES + POSTGRESQL_VERSION) + +-mark_as_advanced(POSTGRESQL_INCLUDE_DIR POSTGRESQL_LIBRARIES) ++include (CMakeFindDependencyMacro) ++find_package(OpenSSL REQUIRED) ++set(POSTGRESQL_LIBRARIES ${POSTGRESQL_LIBRARIES} OpenSSL::SSL OpenSSL::Crypto) ++if (WIN32) ++ set(POSTGRESQL_LIBRARIES ${POSTGRESQL_LIBRARIES} Secur32) ++endif() ++ ++mark_as_advanced(POSTGRESQL_INCLUDE_DIR POSTGRESQL_LIBRARIES) +\ No newline at end of file +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 42cca1e..43b0ced 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -174,7 +174,6 @@ if (WITH_TESTS) + add_subdirectory(test) + endif() + add_subdirectory(dimbuilder) +-add_subdirectory(vendor/pdalboost) + add_subdirectory(vendor/arbiter) + add_subdirectory(vendor/kazhdan) + if (NOT PDAL_HAVE_JSONCPP) +diff --git a/PDALConfig.cmake.in b/PDALConfig.cmake.in +index ea695cf..21b66a1 100644 +--- a/PDALConfig.cmake.in ++++ b/PDALConfig.cmake.in +@@ -18,6 +18,7 @@ endforeach(_dir) + include(CMakeFindDependencyMacro) + find_dependency(GeoTIFF) + find_dependency(CURL) ++find_dependency(Boost COMPONENTS system filesystem) + include("${CMAKE_CURRENT_LIST_DIR}/PDALTargets.cmake") + + if (WIN32) +diff --git a/pdal/util/CMakeLists.txt b/pdal/util/CMakeLists.txt +index 19a2dd1..d498080 100644 +--- a/pdal/util/CMakeLists.txt ++++ b/pdal/util/CMakeLists.txt +@@ -8,6 +8,8 @@ endif() + + include(${PDAL_CMAKE_DIR}/execinfo.cmake) + ++find_package(Boost COMPONENTS system filesystem REQUIRED) ++ + set(PDAL_UTIL_SOURCES + "${PDAL_UTIL_DIR}/Bounds.cpp" + "${PDAL_UTIL_DIR}/Charbuf.cpp" +@@ -16,14 +18,14 @@ set(PDAL_UTIL_SOURCES + "${PDAL_UTIL_DIR}/Utils.cpp" + ) + +-PDAL_ADD_FREE_LIBRARY(${PDAL_UTIL_LIB_NAME} SHARED ${PDAL_UTIL_SOURCES}) ++PDAL_ADD_FREE_LIBRARY(${PDAL_UTIL_LIB_NAME} ${PDAL_UTIL_SOURCES}) + target_link_libraries(${PDAL_UTIL_LIB_NAME} + PRIVATE + ${EXECINFO_LIBRARY} +- ${PDAL_BOOST_LIB_NAME} ++ PUBLIC ++ Boost::system ++ Boost::filesystem + ) +-target_include_directories(${PDAL_UTIL_LIB_NAME} PRIVATE +- ${PDAL_VENDOR_DIR}/pdalboost) + + if (UNIX AND NOT APPLE) + target_link_libraries(${PDAL_UTIL_LIB_NAME} +diff --git a/pdal/util/FileUtils.cpp b/pdal/util/FileUtils.cpp +index 7679f22..b18b674 100644 +--- a/pdal/util/FileUtils.cpp ++++ b/pdal/util/FileUtils.cpp +@@ -124,19 +124,19 @@ std::ostream *createFile(std::string const& name, bool asBinary) + bool directoryExists(const std::string& dirname) + { + //ABELL - Seems we should be calling is_directory +- return pdalboost::filesystem::exists(dirname); ++ return boost::filesystem::exists(dirname); + } + + + bool createDirectory(const std::string& dirname) + { +- return pdalboost::filesystem::create_directory(dirname); ++ return boost::filesystem::create_directory(dirname); + } + + + void deleteDirectory(const std::string& dirname) + { +- pdalboost::filesystem::remove_all(dirname); ++ boost::filesystem::remove_all(dirname); + } + + +@@ -146,15 +146,15 @@ std::vector directoryList(const std::string& dir) + + try + { +- pdalboost::filesystem::directory_iterator it(dir); +- pdalboost::filesystem::directory_iterator end; ++ boost::filesystem::directory_iterator it(dir); ++ boost::filesystem::directory_iterator end; + while (it != end) + { + files.push_back(it->path().string()); + it++; + } + } +- catch (pdalboost::filesystem::filesystem_error) ++ catch (boost::filesystem::filesystem_error) + { + files.clear(); + } +@@ -194,13 +194,13 @@ void closeFile(std::istream* in) + + bool deleteFile(const std::string& file) + { +- return pdalboost::filesystem::remove(file); ++ return boost::filesystem::remove(file); + } + + + void renameFile(const std::string& dest, const std::string& src) + { +- pdalboost::filesystem::rename(src, dest); ++ boost::filesystem::rename(src, dest); + } + + +@@ -211,9 +211,9 @@ bool fileExists(const std::string& name) + + try + { +- return pdalboost::filesystem::exists(name); ++ return boost::filesystem::exists(name); + } +- catch (pdalboost::filesystem::filesystem_error) ++ catch (boost::filesystem::filesystem_error) + { + } + return false; +@@ -222,7 +222,7 @@ bool fileExists(const std::string& name) + + uintmax_t fileSize(const std::string& file) + { +- return pdalboost::filesystem::file_size(file); ++ return boost::filesystem::file_size(file); + } + + +@@ -243,7 +243,7 @@ std::string readFileIntoString(const std::string& filename) + + std::string getcwd() + { +- const pdalboost::filesystem::path p = pdalboost::filesystem::current_path(); ++ const boost::filesystem::path p = boost::filesystem::current_path(); + return addTrailingSlash(p.string()); + } + +@@ -271,7 +271,7 @@ std::string toAbsolutePath(const std::string& filename) + // otherwise, make it absolute (relative to current working dir) and return that + std::string toAbsolutePath(const std::string& filename) + { +- return pdalboost::filesystem::absolute(filename).string(); ++ return boost::filesystem::absolute(filename).string(); + } + + +@@ -283,7 +283,7 @@ std::string toAbsolutePath(const std::string& filename) + std::string toAbsolutePath(const std::string& filename, const std::string base) + { + const std::string newbase = toAbsolutePath(base); +- return pdalboost::filesystem::absolute(filename, newbase).string(); ++ return boost::filesystem::absolute(filename, newbase).string(); + } + + std::string getFilename(const std::string& path) +@@ -304,8 +304,8 @@ std::string getFilename(const std::string& path) + // Get the directory part of a filename. + std::string getDirectory(const std::string& path) + { +- const pdalboost::filesystem::path dir = +- pdalboost::filesystem::path(path).parent_path(); ++ const boost::filesystem::path dir = ++ boost::filesystem::path(path).parent_path(); + return addTrailingSlash(dir.string()); + } + +@@ -326,13 +326,13 @@ std::string stem(const std::string& path) + // Determine if the path represents a directory. + bool isDirectory(const std::string& path) + { +- return pdalboost::filesystem::is_directory(path); ++ return boost::filesystem::is_directory(path); + } + + // Determine if the path is an absolute path + bool isAbsolutePath(const std::string& path) + { +- return pdalboost::filesystem::path(path).is_absolute(); ++ return boost::filesystem::path(path).is_absolute(); + } + + diff --git a/vcpkg/ports/pdal/libpq.patch b/vcpkg/ports/pdal/libpq.patch new file mode 100644 index 0000000..3aac218 --- /dev/null +++ b/vcpkg/ports/pdal/libpq.patch @@ -0,0 +1,33 @@ +diff --git a/cmake/postgres.cmake b/cmake/postgres.cmake +index 0dad71069..32fdae2f8 100644 +--- a/cmake/postgres.cmake ++++ b/cmake/postgres.cmake +@@ -7,3 +7,27 @@ find_package(PostgreSQL REQUIRED) + mark_as_advanced(CLEAR POSTGRESQL_INCLUDE_DIR) + mark_as_advanced(CLEAR POSTGRESQL_LIBRARIES) + include_directories(${POSTGRESQL_INCLUDE_DIR}) ++ ++include(SelectLibraryConfigurations) ++ ++find_library(PostgreSQLCommon_LIBRARY_DEBUG ++NAMES libpgcommond pgcommond pgcommon libpgcommon ++NAMES_PER_DIR ++) ++find_library(PostgreSQLCommon_LIBRARY_RELEASE ++NAMES pgcommon libpgcommon ++NAMES_PER_DIR ++) ++select_library_configurations(PostgreSQLCommon) ++ ++find_library(PostgreSQLPort_LIBRARY_DEBUG ++NAMES pgportd libpgportd pgport libpgport ++NAMES_PER_DIR ++) ++find_library(PostgreSQLPort_LIBRARY_RELEASE ++NAMES pgport libpgport ++NAMES_PER_DIR ++) ++select_library_configurations(PostgreSQLPort) ++ ++list(APPEND POSTGRESQL_LIBRARIES ${PostgreSQLPort_LIBRARIES} ${PostgreSQLCommon_LIBRARIES}) +\ No newline at end of file diff --git a/vcpkg/ports/pdal/portfile.cmake b/vcpkg/ports/pdal/portfile.cmake new file mode 100644 index 0000000..ef792f3 --- /dev/null +++ b/vcpkg/ports/pdal/portfile.cmake @@ -0,0 +1,80 @@ +set(PDAL_VERSION_STR "1.7.1") + +vcpkg_download_distfile(ARCHIVE + URLS "http://download.osgeo.org/pdal/PDAL-${PDAL_VERSION_STR}-src.tar.gz" + FILENAME "PDAL-${PDAL_VERSION_STR}-src.tar.gz" + SHA512 e3e63bb05930c1a28c4f46c7edfaa8e9ea20484f1888d845b660a29a76f1dd1daea3db30a98607be0c2eeb86930ec8bfd0965d5d7d84b07a4fe4cb4512da9b09 +) + +vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH + PATCHES + 0001-win32_compiler_options.cmake.patch + 0002-no-source-dir-writes.patch + 0003-fix-copy-vendor.patch + PDALConfig.patch + fix-dependency.patch + libpq.patch +) + +file(REMOVE "${SOURCE_PATH}/pdal/gitsha.cpp") + +# Deploy custom CMake modules to enforce expected dependencies look-up +foreach(_module IN ITEMS FindGDAL FindGEOS FindGeoTIFF FindCurl) # Outdated; Supplied by CMake + file(REMOVE "${SOURCE_PATH}/cmake/modules/${_module}.cmake") +endforeach() +foreach(_module IN ITEMS FindGEOS) # Overwritten Modules. + file(REMOVE "${SOURCE_PATH}/cmake/modules/${_module}.cmake") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/${_module}.cmake + DESTINATION ${SOURCE_PATH}/cmake/modules/ + ) +endforeach() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(VCPKG_BUILD_SHARED_LIBS ON) + set(VCPKG_BUILD_STATIC_LIBS OFF) +else() + set(VCPKG_BUILD_SHARED_LIBS OFF) + set(VCPKG_BUILD_STATIC_LIBS ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPDAL_BUILD_STATIC:BOOL=${VCPKG_BUILD_STATIC_LIBS} + -DWITH_TESTS:BOOL=OFF + -DWITH_COMPLETION:BOOL=OFF +) + +vcpkg_install_cmake(ADD_BIN_TO_PATH) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/pdal/cmake) +vcpkg_copy_pdbs() + +# Install PDAL executable +file(GLOB _pdal_apps ${CURRENT_PACKAGES_DIR}/bin/*.exe) +file(COPY ${_pdal_apps} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/pdal) +file(REMOVE ${_pdal_apps}) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +# Post-install clean-up +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/lib/pdal + ${CURRENT_PACKAGES_DIR}/debug/lib/pdal + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin) +else() + file(GLOB _pdal_bats ${CURRENT_PACKAGES_DIR}/bin/*.bat) + file(REMOVE ${_pdal_bats}) + file(GLOB _pdal_bats ${CURRENT_PACKAGES_DIR}/debug/bin/*.bat) + file(REMOVE ${_pdal_bats}) + file(GLOB _pdal_apps ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + file(REMOVE ${_pdal_apps}) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/pdcurses/CONTROL b/vcpkg/ports/pdcurses/CONTROL new file mode 100644 index 0000000..96fcf8e --- /dev/null +++ b/vcpkg/ports/pdcurses/CONTROL @@ -0,0 +1,4 @@ +Source: pdcurses +Version: 3.9 +Homepage: https://sourceforge.net/projects/pdcurses/ +Description: Public Domain Curses - a curses library for environments that don't fit the termcap/terminfo model. diff --git a/vcpkg/ports/pdcurses/LICENSE b/vcpkg/ports/pdcurses/LICENSE new file mode 100644 index 0000000..ec633d8 --- /dev/null +++ b/vcpkg/ports/pdcurses/LICENSE @@ -0,0 +1,7 @@ +The core package is in the public domain, but small portions of PDCurses are subject to copyright under various licenses. + +The win32 files are released to the public domain. + +If you use PDCurses in an application, an acknowledgement would be appreciated, but is not mandatory. If you make corrections or enhancements to PDCurses, please forward them to the current maintainer for the benefit of other users. + +This software is provided AS IS with NO WARRANTY whatsoever. \ No newline at end of file diff --git a/vcpkg/ports/pdcurses/portfile.cmake b/vcpkg/ports/pdcurses/portfile.cmake new file mode 100644 index 0000000..81b201c --- /dev/null +++ b/vcpkg/ports/pdcurses/portfile.cmake @@ -0,0 +1,73 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_CRT) + +find_program(NMAKE nmake) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO wmcbrine/PDCurses + REF 6c1f95c4fa9f9f105879c2d99dd72a5bf335c046 # 3.9 + SHA512 2d682a3516baaa58a97854aca64d985768b7af76d998240b54afc57ddf2a44894835a1748888f8dd7c1cc8045ede77488284f8adf1b73878879b4b4d3391218d + HEAD_REF master +) + +set(PDC_NMAKE_CMD ${NMAKE} /A -f ${SOURCE_PATH}/wincon/Makefile.vc WIDE=Y UTF8=Y) + +set(PDC_NMAKE_CWD ${SOURCE_PATH}/wincon) +set(PDC_PDCLIB ${SOURCE_PATH}/wincon/pdcurses) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(PDC_NMAKE_CMD ${PDC_NMAKE_CMD} DLL=Y) +endif() + +message(STATUS "Build ${TARGET_TRIPLET}-rel") +vcpkg_execute_required_process( + COMMAND ${PDC_NMAKE_CMD} + WORKING_DIRECTORY ${PDC_NMAKE_CWD} + LOGNAME build-${TARGET_TRIPLET}-rel +) +message(STATUS "Build ${TARGET_TRIPLET}-rel done") + +file ( + COPY ${PDC_PDCLIB}.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib +) +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file ( + COPY ${PDC_PDCLIB}.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) +endif() + +message(STATUS "Build ${TARGET_TRIPLET}-dbg") +vcpkg_execute_required_process( + COMMAND ${PDC_NMAKE_CMD} DEBUG=Y + WORKING_DIRECTORY ${PDC_NMAKE_CWD} + LOGNAME build-${TARGET_TRIPLET}-dbg +) +message(STATUS "Build ${TARGET_TRIPLET}-dbg done") + +file ( + INSTALL ${PDC_PDCLIB}.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib +) +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file ( + INSTALL ${PDC_PDCLIB}.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) +endif() + +file( + INSTALL ${SOURCE_PATH}/curses.h ${SOURCE_PATH}/panel.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(READ ${CURRENT_PACKAGES_DIR}/include/curses.h _contents) + string(REPLACE "#ifdef PDC_DLL_BUILD" "#if 1" _contents "${_contents}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/curses.h "${_contents}") +endif() + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/pdcurses RENAME copyright) + +vcpkg_copy_pdbs() \ No newline at end of file diff --git a/vcpkg/ports/pdqsort/CONTROL b/vcpkg/ports/pdqsort/CONTROL new file mode 100644 index 0000000..6d1d9e6 --- /dev/null +++ b/vcpkg/ports/pdqsort/CONTROL @@ -0,0 +1,4 @@ +Source: pdqsort +Version: 2019-07-30 +Homepage: https://github.com/orlp/pdqsort +Description: Pattern-defeating quicksort (pdqsort) is a novel sorting algorithm diff --git a/vcpkg/ports/pdqsort/portfile.cmake b/vcpkg/ports/pdqsort/portfile.cmake new file mode 100644 index 0000000..a9c6a92 --- /dev/null +++ b/vcpkg/ports/pdqsort/portfile.cmake @@ -0,0 +1,15 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO orlp/pdqsort + REF 08879029ab8dcb80a70142acb709e3df02de5d37 + SHA512 38e8b6e35edf1e88e26850a13ce892d8adc0d3e1d7954287d024b3bb858a6b2284e25fbf7c92a694b3ec77cacaf6bbc27fc365187115f7cca6bc88088f67a18f + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/pdqsort.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/pdqsort) + +# Handle copyright +file(COPY ${SOURCE_PATH}/license.txt ${SOURCE_PATH}/readme.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/pdqsort) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/pdqsort/license.txt ${CURRENT_PACKAGES_DIR}/share/pdqsort/copyright) \ No newline at end of file diff --git a/vcpkg/ports/pe-parse/CONTROL b/vcpkg/ports/pe-parse/CONTROL new file mode 100644 index 0000000..c269edd --- /dev/null +++ b/vcpkg/ports/pe-parse/CONTROL @@ -0,0 +1,5 @@ +Source: pe-parse +Version: 1.2.0 +Description: pe-parse is a principled, lightweight C/C++ PE parser +Homepage: https://github.com/trailofbits/pe-parse +Supports: !uwp diff --git a/vcpkg/ports/pe-parse/portfile.cmake b/vcpkg/ports/pe-parse/portfile.cmake new file mode 100644 index 0000000..f0dc4de --- /dev/null +++ b/vcpkg/ports/pe-parse/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO trailofbits/pe-parse + REF v1.2.0 + SHA512 916ec515585ba1e83e2c6ae29667fd25bd4cac90c39e587ae6847dc9d503186e8853bd80f4e2a99177a3214f5c51eceff85fa610cadbc2bc1d3a79251e8ce942 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBUILD_COMMAND_LINE_TOOLS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/pe-parse TARGET_PATH share/pe-parse) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file( + INSTALL + "${SOURCE_PATH}/LICENSE" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/pe-parse" + RENAME copyright +) diff --git a/vcpkg/ports/pegtl-2/CONTROL b/vcpkg/ports/pegtl-2/CONTROL new file mode 100644 index 0000000..842c908 --- /dev/null +++ b/vcpkg/ports/pegtl-2/CONTROL @@ -0,0 +1,4 @@ +Source: pegtl-2 +Version: 2.8.1-1 +Description: The Parsing Expression Grammar Template Library (PEGTL) is a zero-dependency C++ header-only parser combinator library for creating parsers according to a Parsing Expression Grammar (PEG). This version maintains compatibility with C++11. +Homepage: https://github.com/taocpp/PEGTL \ No newline at end of file diff --git a/vcpkg/ports/pegtl-2/portfile.cmake b/vcpkg/ports/pegtl-2/portfile.cmake new file mode 100644 index 0000000..5eedd0c --- /dev/null +++ b/vcpkg/ports/pegtl-2/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO taocpp/pegtl + REF 2.8.1 + SHA512 7a8f6829123fbbd5a0ef1c8ef2c72bdae48576ef94056a1dff7914e4bb85caac1df02839131ea5cfb4131c8902addeca92df48fe7dd5815bdf5cb35759dace49 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPEGTL_BUILD_TESTS=OFF + -DPEGTL_BUILD_EXAMPLES=OFF + -DPEGTL_INSTALL_INCLUDE_DIR=include/pegtl-2 + -DPEGTL_INSTALL_DOC_DIR=share/pegtl-2 + -DPEGTL_INSTALL_CMAKE_DIR=share/pegtl-2/cmake +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/pegtl-2/cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) + +# Handle collision with latest pegtl +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/pegtl-config.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/${PORT}-config.cmake) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/pegtl-config-version.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/${PORT}-config-version.cmake) diff --git a/vcpkg/ports/pegtl/CONTROL b/vcpkg/ports/pegtl/CONTROL new file mode 100644 index 0000000..be3e18f --- /dev/null +++ b/vcpkg/ports/pegtl/CONTROL @@ -0,0 +1,4 @@ +Source: pegtl +Version: 3.0.0-pre-70971f4 +Description: The Parsing Expression Grammar Template Library (PEGTL) is a zero-dependency C++ header-only parser combinator library for creating parsers according to a Parsing Expression Grammar (PEG). +Homepage: https://github.com/taocpp/PEGTL diff --git a/vcpkg/ports/pegtl/portfile.cmake b/vcpkg/ports/pegtl/portfile.cmake new file mode 100644 index 0000000..6735a36 --- /dev/null +++ b/vcpkg/ports/pegtl/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO taocpp/pegtl + REF 70971f441d7611ba3905b5c0d5c8bf4338602ef2 + SHA512 8ff0f06eaa59e547e4f00002d27241f99f06b398d7cd021c3b8475431d59234d0aa32fff8ce74faee3468c9fb542020326547a6d9cd7b98561b3bdd233a1e715 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPEGTL_BUILD_TESTS=OFF + -DPEGTL_BUILD_EXAMPLES=OFF + -DPEGTL_INSTALL_DOC_DIR=share/pegtl + -DPEGTL_INSTALL_CMAKE_DIR=share/pegtl/cmake +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/pegtl/cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(RENAME ${CURRENT_PACKAGES_DIR}/share/pegtl/LICENSE ${CURRENT_PACKAGES_DIR}/share/pegtl/copyright) diff --git a/vcpkg/ports/pfring/CONTROL b/vcpkg/ports/pfring/CONTROL new file mode 100644 index 0000000..edddaa9 --- /dev/null +++ b/vcpkg/ports/pfring/CONTROL @@ -0,0 +1,5 @@ +Source: pfring +Version: 2019-10-17-2 +Homepage: https://github.com/ntop/PF_RING +Description: PF_RINGâ„¢ is a Linux kernel module and user-space framework that allows you to process packets at high-rates while providing you a consistent API for packet processing applications. +Build-Depends: libpcap diff --git a/vcpkg/ports/pfring/makefile.patch b/vcpkg/ports/pfring/makefile.patch new file mode 100644 index 0000000..cc17fb1 --- /dev/null +++ b/vcpkg/ports/pfring/makefile.patch @@ -0,0 +1,59 @@ +diff --git a/Makefile b/Makefile +index 4b377c628..39cbf5cb4 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,10 +1,12 @@ + all: +- cd kernel; make +- cd userland; ./configure; make +- cd drivers; make ++ $(MAKE) -C kernel; ++ #cd kernel; make ++ cd userland; ./configure; ++ $(MAKE) -C userland; ++ $(MAKE) -C drivers; + + install: +- cd userland; make install ++ $(MAKE) install -C userland; + + clean: + -cd kernel; make clean +diff --git a/userland/Makefile b/userland/Makefile +index 959470c0f..e35ca8de7 100644 +--- a/userland/Makefile ++++ b/userland/Makefile +@@ -9,22 +9,22 @@ lib/Makefile: + config: lib/Makefile + + libpfring: config +- cd lib; make ++ $(MAKE) -C lib + + build_nbpf: config +- cd nbpf; make ++ $(MAKE) -C nbpf + + build_c++: libpfring +- cd c++; make ++ $(MAKE) -C c++ + + tcpdump/Makefile: + cd tcpdump; ./configure --with_system_libpcap=yes + + build_tcpdump: libpfring tcpdump/Makefile +- cd tcpdump; make ++ $(MAKE) -C tcpdump + + build_extcap: libpfring +- cd wireshark/extcap; make ++ $(MAKE) -C wireshark/extcap + + ################### + +@@ -46,4 +46,4 @@ extcap_clean: + cd wireshark/extcap; make clean + + install: libpfring +- cd lib; make install ++ $(MAKE) -C lib install diff --git a/vcpkg/ports/pfring/portfile.cmake b/vcpkg/ports/pfring/portfile.cmake new file mode 100644 index 0000000..967bdc5 --- /dev/null +++ b/vcpkg/ports/pfring/portfile.cmake @@ -0,0 +1,65 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports Linux and Mac platforms" ON_TARGET "Windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ntop/PF_RING + REF 582fa09bc58411cfe6f27facd7e6438924f779d2 + SHA512 78dd2d2f9df259483196905f80a904534632a835f742d1f8b3ad645ea80f2dad78356960a2b35e2678525786a7344fa248b708bd3f86101c43fb36c7abc05598 + HEAD_REF dev + PATCHES + use-vcpkg-libpcap.patch + makefile.patch +) + +file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(COPY "${SOURCE_PATH}/" DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(COPY "${SOURCE_PATH}/" DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") +endif() +set(ENV{VCPKG_LIBPCAP_DIR} "${CURRENT_INSTALLED_DIR}") +vcpkg_build_make() +vcpkg_fixup_pkgconfig() + +vcpkg_copy_pdbs() + +# Install manually because pfring cannot set prefix +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug) + set(PFRING_OBJ_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + + if (VCPKG_BUILD_TYPE STREQUAL debug) + file(GLOB_RECURSE PFRING_KO_FILES "${PFRING_OBJ_DIR}/*.ko") + file(INSTALL ${PFRING_KO_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/share/${PORT}) + + file(INSTALL ${SOURCE_PATH}/userland/lib/pfring.h DESTINATION ${CURRENT_PACKAGES_DIR}/debug/include) + endif() + + file(GLOB_RECURSE PFRING_LIBS "${PFRING_OBJ_DIR}/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}") + file(INSTALL ${PFRING_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(GLOB_RECURSE PFRING_DLLS "${PFRING_OBJ_DIR}/*${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}") + file(INSTALL ${PFRING_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() +endif() + +if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release) + set(PFRING_OBJ_DIR ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + + file(GLOB_RECURSE PFRING_KO_FILES "${PFRING_OBJ_DIR}/*.ko") + file(INSTALL ${PFRING_KO_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + + file(GLOB_RECURSE PFRING_LIBS "${PFRING_OBJ_DIR}/*${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}") + file(INSTALL ${PFRING_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(GLOB_RECURSE PFRING_DLLS "${PFRING_OBJ_DIR}/*${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}") + file(INSTALL ${PFRING_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + endif() + + file(INSTALL ${SOURCE_PATH}/userland/lib/pfring.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +endif() + +#Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/pfring/use-vcpkg-libpcap.patch b/vcpkg/ports/pfring/use-vcpkg-libpcap.patch new file mode 100644 index 0000000..e005442 --- /dev/null +++ b/vcpkg/ports/pfring/use-vcpkg-libpcap.patch @@ -0,0 +1,146 @@ +diff --git a/userland/Makefile b/userland/Makefile +index d5392c09..959470c0 100644 +--- a/userland/Makefile ++++ b/userland/Makefile +@@ -1,4 +1,4 @@ +-all: libpfring pcap build_examples build_examples_zc build_examples_ft build_extcap ++all: libpfring build_extcap + # build_tcpdump build_c++ + + ################### +@@ -14,52 +14,25 @@ libpfring: config + build_nbpf: config + cd nbpf; make + +-libpcap/Makefile: +- cd libpcap; ./configure --enable-ipv6 --enable-dbus=no --without-libnl --with-snf=no --disable-bluetooth --disable-canusb --with-dag=no +- +-pcap: libpfring libpcap/Makefile +- cd libpcap; make +- +-build_examples: config +- cd examples; make +- +-build_examples_zc: config +- cd examples_zc; make +- +-build_examples_ft: config +- cd examples_ft; make +- + build_c++: libpfring + cd c++; make + + tcpdump/Makefile: +- cd tcpdump; ./configure ++ cd tcpdump; ./configure --with_system_libpcap=yes + +-build_tcpdump: libpfring pcap tcpdump/Makefile ++build_tcpdump: libpfring tcpdump/Makefile + cd tcpdump; make + +-build_extcap: libpfring pcap ++build_extcap: libpfring + cd wireshark/extcap; make + + ################### + +-clean: libpfring_clean pcap_clean examples_clean examples_ft_clean examples_zc_clean c++_clean tcpdump_clean nbpf_clean extcap_clean ++clean: libpfring_clean c++_clean tcpdump_clean nbpf_clean extcap_clean + + libpfring_clean: + cd lib; make clean + +-pcap_clean: +- if test -f libpcap/config.status; then cd libpcap; make clean; fi +- +-examples_clean: +- cd examples; make clean +- +-examples_zc_clean: +- cd examples_zc; make clean +- +-examples_ft_clean: +- cd examples_ft; make clean +- + c++_clean: + cd c++; make clean + +@@ -72,8 +45,5 @@ nbpf_clean: + extcap_clean: + cd wireshark/extcap; make clean + +-install: libpfring pcap examples examples_zc examples_ft ++install: libpfring + cd lib; make install +- cd libpcap; make install +- cd examples; make install +- cd examples_zc; make install +diff --git a/userland/c++/Makefile.in b/userland/c++/Makefile.in +index 02bf5164..b0442d84 100644 +--- a/userland/c++/Makefile.in ++++ b/userland/c++/Makefile.in +@@ -1,8 +1,7 @@ + CPP=g++ -g + + KERNEL_DIR=../../kernel +-LIBPCAP_DIR=../libpcap +-INCLUDE=-I$(KERNEL_DIR) -I$(LIBPCAP_DIR) -I../lib `../lib/pfring_config --include` ++INCLUDE=-I$(KERNEL_DIR) -I$(VCPKG_LIBPCAP_DIR)/include -I../lib `../lib/pfring_config --include` + LIBPFRING_CPP=libpfring_cpp.a + RANLIB=ranlib + OBJ=PFring.o +@@ -11,7 +10,7 @@ LIBS=../lib/libpfring.a `../lib/pfring_config --libs` -lpthread + all: $(LIBPFRING_CPP) pf_test + + pf_test: pf_test.cpp $(LIBPFRING_CPP) +- $(CPP) $(INCLUDE) $< $(LIBPFRING_CPP) -o $@ $(LIBS) $(LIBPCAP_DIR)/libpcap.a @SYSLIBS@ ++ $(CPP) $(INCLUDE) $< $(LIBPFRING_CPP) -o $@ $(LIBS) $(VCPKG_LIBPCAP_DIR)/lib/libpcap.a @SYSLIBS@ + + $(LIBPFRING_CPP): $(OBJ) + @rm -f $@ +diff --git a/userland/snort/pfring-daq-module-zc/Makefile.am b/userland/snort/pfring-daq-module-zc/Makefile.am +index 7123de18..45998688 100644 +--- a/userland/snort/pfring-daq-module-zc/Makefile.am ++++ b/userland/snort/pfring-daq-module-zc/Makefile.am +@@ -4,5 +4,5 @@ ACLOCAL_AMFLAGS = -I m4 + + pkglib_LTLIBRARIES = daq_pfring_zc.la + daq_pfring_zc_la_SOURCES = daq_pfring_zc.c +-daq_pfring_zc_la_CFLAGS = -DBUILDING_SO -I../../libpcap +-daq_pfring_zc_la_LDFLAGS = -module -export-dynamic -avoid-version -shared -lrt ../../libpcap/libpcap.a ++daq_pfring_zc_la_CFLAGS = -DBUILDING_SO -I${VCPKG_LIBPCAP_DIR}/include ++daq_pfring_zc_la_LDFLAGS = -module -export-dynamic -avoid-version -shared -lrt ${VCPKG_LIBPCAP_DIR}/lib/libpcap.a +diff --git a/userland/tcpdump-4.9.2/Makefile.in b/userland/tcpdump-4.9.2/Makefile.in +index e2c74d13..47d9e2cc 100644 +--- a/userland/tcpdump-4.9.2/Makefile.in ++++ b/userland/tcpdump-4.9.2/Makefile.in +@@ -373,7 +373,7 @@ TEST_DIST= `find tests \( -name 'DIFF' -prune \) -o \( -name NEW -prune \) -o -t + + all: $(PROG) $(LIBNETDISSECT) + +-$(PROG): $(OBJ) @V_PCAPDEP@ ++$(PROG): $(OBJ) $(VCPKG_LIBPCAP_DIR)/lib/libpcap.a + @rm -f $@ + $(CC) $(FULL_CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) + +diff --git a/userland/wireshark/extcap/Makefile.in b/userland/wireshark/extcap/Makefile.in +index 970b9680..3e34ccc8 100644 +--- a/userland/wireshark/extcap/Makefile.in ++++ b/userland/wireshark/extcap/Makefile.in +@@ -20,14 +20,13 @@ LIBPFRING = ${PFRINGDIR}/libpfring.a + # + O_FLAG = -O2 -DHAVE_PF_RING + EXTRA_LIBS = +-PCAPDIR = ../../libpcap +-LIBPCAP = ${PCAPDIR}/libpcap.a ${EXTRA_LIBS} ++LIBPCAP = ${VCPKG_LIBPCAP_DIR}/lib/libpcap.a ${EXTRA_LIBS} + + # + # Search directories + # + PFRING_KERNEL=../../../kernel +-INCLUDE = -I${PFRING_KERNEL} -I${PFRINGDIR} -I${PCAPDIR} -Ithird-party `../../lib/pfring_config --include` ++INCLUDE = -I${PFRING_KERNEL} -I${PFRINGDIR} -I${VCPKG_LIBPCAP_DIR}/include -Ithird-party `../../lib/pfring_config --include` + + # + # C compiler and flags diff --git a/vcpkg/ports/pfultz2-linq/CONTROL b/vcpkg/ports/pfultz2-linq/CONTROL new file mode 100644 index 0000000..e8185c3 --- /dev/null +++ b/vcpkg/ports/pfultz2-linq/CONTROL @@ -0,0 +1,4 @@ +Source: pfultz2-linq +Version: 2019-05-14 +Description: Linq for list comprehension in C++ +Build-Depends: boost-fusion, boost-iterator, boost-mpl, boost-optional, boost-preprocessor, boost-range, boost-static-assert, boost-type-traits, boost-unordered, boost-utility diff --git a/vcpkg/ports/pfultz2-linq/portfile.cmake b/vcpkg/ports/pfultz2-linq/portfile.cmake new file mode 100644 index 0000000..de0980b --- /dev/null +++ b/vcpkg/ports/pfultz2-linq/portfile.cmake @@ -0,0 +1,30 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pfultz2/Linq + REF 7ff0a73fed52be5e11df3d79128ce7b11f430af2 + SHA512 6768e28bf17568436b4c3fed18f6b1edbe048b871ebee25580419b805498beb0800e473ecdc5acc0f9f89bec47d16fd3806018ce6395bdf14a8e2975cde9381f + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/linq TARGET_PATH share/linq) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME linq) diff --git a/vcpkg/ports/phnt/CONTROL b/vcpkg/ports/phnt/CONTROL new file mode 100644 index 0000000..c563c0d --- /dev/null +++ b/vcpkg/ports/phnt/CONTROL @@ -0,0 +1,4 @@ +Source: phnt +Version: 2019-05-01 +Homepage: https://github.com/processhacker/phnt +Description: Windows Native API header files \ No newline at end of file diff --git a/vcpkg/ports/phnt/portfile.cmake b/vcpkg/ports/phnt/portfile.cmake new file mode 100644 index 0000000..f381d5a --- /dev/null +++ b/vcpkg/ports/phnt/portfile.cmake @@ -0,0 +1,17 @@ +#header-only library +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO processhacker/phnt + REF 33cfd75a2be59bbde3aa4db3399a9e6bab66ae6a + SHA512 90a1b38d27e35e7706e66dae0f4e151b50f5b74fbedf15ad165beece6a94b8a87263e16e1e0b891a324091c3769fd2ff2f541e11691b322413e575e6f08dc746 + HEAD_REF master +) + +# Install headers +file(GLOB HEADER_FILES ${SOURCE_PATH}/*.h) +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/phnt RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/physfs/CONTROL b/vcpkg/ports/physfs/CONTROL new file mode 100644 index 0000000..de52b6a --- /dev/null +++ b/vcpkg/ports/physfs/CONTROL @@ -0,0 +1,6 @@ +Source: physfs +Version: 3.0.2-2 +Homepage: https://icculus.org/physfs/ +Description: a library to provide abstract access to various archives +Build-Depends: zlib +Supports: !arm64 diff --git a/vcpkg/ports/physfs/portfile.cmake b/vcpkg/ports/physfs/portfile.cmake new file mode 100644 index 0000000..86d56b4 --- /dev/null +++ b/vcpkg/ports/physfs/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_fail_port_install(ON_ARCH "arm64") +set(PHYSFS_VERSION 3.0.2) + +vcpkg_download_distfile(ARCHIVE + URLS "https://icculus.org/physfs/downloads/physfs-${PHYSFS_VERSION}.tar.bz2" + "https://hg.icculus.org/icculus/physfs/archive/release-${PHYSFS_VERSION}.tar.bz2" + FILENAME "physfs-${PHYSFS_VERSION}.tar.bz2" + SHA512 4024b6c3348e0b6fc1036aac330192112dfe17de3e3d14773be9f06e9a062df5a1006869f21162b4e0b584989f463788a35e64186b1913225c073fea62754472 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${PHYSFS_VERSION} +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PHYSFS_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PHYSFS_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPHYSFS_BUILD_STATIC=${PHYSFS_STATIC} + -DPHYSFS_BUILD_SHARED=${PHYSFS_SHARED} + -DPHYSFS_BUILD_TEST=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/physx/CONTROL b/vcpkg/ports/physx/CONTROL new file mode 100644 index 0000000..7b8c12c --- /dev/null +++ b/vcpkg/ports/physx/CONTROL @@ -0,0 +1,5 @@ +Source: physx +Version: 4.1.1 +Port-Version: 5 +Description: The NVIDIA PhysX SDK is a scalable multi-platform physics solution supporting a wide range of devices, from smartphones to high-end multicore CPUs and GPUs +Supports: !uwp diff --git a/vcpkg/ports/physx/internalMBP_symbols.patch b/vcpkg/ports/physx/internalMBP_symbols.patch new file mode 100644 index 0000000..a74e2ea --- /dev/null +++ b/vcpkg/ports/physx/internalMBP_symbols.patch @@ -0,0 +1,49 @@ +diff --git a/physx/source/lowlevelaabb/src/BpBroadPhaseMBP.cpp b/physx/source/lowlevelaabb/src/BpBroadPhaseMBP.cpp +index f19ba271..51580049 100644 +--- a/physx/source/lowlevelaabb/src/BpBroadPhaseMBP.cpp ++++ b/physx/source/lowlevelaabb/src/BpBroadPhaseMBP.cpp +@@ -90,6 +90,8 @@ using namespace Cm; + return ir; + }*/ + ++namespace internalMBP { ++ + struct RegionHandle : public Ps::UserAllocated + { + PxU16 mHandle; // Handle from region +@@ -582,6 +584,10 @@ struct RegionData : public Ps::UserAllocated + #endif + #endif + ++} ++ ++using namespace internalMBP; ++ + /////////////////////////////////////////////////////////////////////////////// + + MBP_PairManager::MBP_PairManager() : +diff --git a/physx/source/lowlevelaabb/src/BpBroadPhaseMBP.h b/physx/source/lowlevelaabb/src/BpBroadPhaseMBP.h +index cf15f6d3..90f43e47 100644 +--- a/physx/source/lowlevelaabb/src/BpBroadPhaseMBP.h ++++ b/physx/source/lowlevelaabb/src/BpBroadPhaseMBP.h +@@ -35,8 +35,10 @@ + #include "BpBroadPhaseMBPCommon.h" + #include "BpMBPTasks.h" + ++namespace internalMBP { + class MBP; +- ++} ++ + namespace physx + { + namespace Bp +@@ -84,7 +86,7 @@ namespace Bp + MBPUpdateWorkTask mMBPUpdateWorkTask; + MBPPostUpdateWorkTask mMBPPostUpdateWorkTask; + +- MBP* mMBP; // PT: TODO: aggregate ++ internalMBP::MBP* mMBP; // PT: TODO: aggregate + + MBP_Handle* mMapping; + PxU32 mCapacity; diff --git a/vcpkg/ports/physx/msvc_142_bug_workaround.patch b/vcpkg/ports/physx/msvc_142_bug_workaround.patch new file mode 100644 index 0000000..5543335 --- /dev/null +++ b/vcpkg/ports/physx/msvc_142_bug_workaround.patch @@ -0,0 +1,13 @@ +diff --git a/physx/source/foundation/include/windows/PsWindowsInlineAoS.h b/physx/source/foundation/include/windows/PsWindowsInlineAoS.h +index 881dffb..7111189 100644 +--- a/physx/source/foundation/include/windows/PsWindowsInlineAoS.h ++++ b/physx/source/foundation/include/windows/PsWindowsInlineAoS.h +@@ -363,7 +363,7 @@ + PX_FORCE_INLINE Vec3V V3LoadA(const PxF32* const f) + { + ASSERT_ISALIGNED16(f); +- return V4ClearW(_mm_load_ps(f)); ++ return [ & ](){ return V4ClearW(_mm_load_ps(f)); }(); // MSVC 142 bug workaround + } + + PX_FORCE_INLINE Vec3V V3LoadU(const PxF32* const i) diff --git a/vcpkg/ports/physx/portfile.cmake b/vcpkg/ports/physx/portfile.cmake new file mode 100644 index 0000000..2dcb5bd --- /dev/null +++ b/vcpkg/ports/physx/portfile.cmake @@ -0,0 +1,155 @@ +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(SYSTEM_PLATFORM "32") + set(SYSTEM_PLATFORM_PATH "x86_32") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(SYSTEM_PLATFORM "64") + set(SYSTEM_PLATFORM_PATH "x86_64") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(SYSTEM_PLATFORM "arm32") + set(SYSTEM_PLATFORM_PATH "arm_32") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(SYSTEM_PLATFORM "arm64") + set(SYSTEM_PLATFORM_PATH "arm_64") +else() + message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(GENERATE_STATIC_LIBRARIES "True") +elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(GENERATE_STATIC_LIBRARIES "False") +endif() + +if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(MSBUILD_PLATFORM "Win32") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(MSBUILD_PLATFORM "x64") + elseif(VCPKG_TARGET_IS_UWP) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(MSBUILD_PLATFORM "ARM") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(MSBUILD_PLATFORM "ARM64") + else() + message(FATAL_ERROR "Unsupported UWP architecture: ${VCPKG_TARGET_ARCHITECTURE}") + endif() + else() + message(FATAL_ERROR "Unsupported Windows architecture: ${VCPKG_TARGET_ARCHITECTURE}") + endif() + + if(VCPKG_PLATFORM_TOOLSET STREQUAL "v140") + set(MSVC_VERSION "14") + set(TOOLSET_VERSION "140") + elseif(VCPKG_PLATFORM_TOOLSET STREQUAL "v141") + set(MSVC_VERSION "15") + set(TOOLSET_VERSION "141") + elseif(VCPKG_PLATFORM_TOOLSET STREQUAL "v142") + set(MSVC_VERSION "16") + set(TOOLSET_VERSION "142") + else() + message(FATAL_ERROR "Unsupported platform toolset.") + endif() + + set(FLOAT_POINT_PRECISE_MATH "False") + set(BUILD_SNIPPETS "False") + set(BUILD_PUBLIC_SAMPLES "False") + + if(VCPKG_TARGET_IS_WINDOWS) + set(SYSTEM "win") + if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + set(USE_STATIC_WINCRT "False") + set(RUNTIME_LIBRARY_LINKAGE "md") + elseif(VCPKG_CRT_LINKAGE STREQUAL "static") + set(USE_STATIC_WINCRT "True") + set(RUNTIME_LIBRARY_LINKAGE "mt") + endif() + set(USE_DEBUG_CRT "True") + set(COMPILER "vc${MSVC_VERSION}${SYSTEM}${SYSTEM_PLATFORM}") + set(PRESET_FILE ${COMPILER}-${RUNTIME_LIBRARY_LINKAGE}-${VCPKG_LIBRARY_LINKAGE}) + set(BUILD_PATH "${SYSTEM}.${SYSTEM_PLATFORM_PATH}.vc${TOOLSET_VERSION}.${RUNTIME_LIBRARY_LINKAGE}") + elseif(VCPKG_TARGET_IS_UWP) + set(SYSTEM "uwp") + set(USE_STATIC_WINCRT "False") + set(USE_DEBUG_CRT "False") + set(COMPILER "vc${MSVC_VERSION}${SYSTEM}${SYSTEM_PLATFORM}") + set(PRESET_FILE ${COMPILER}-${VCPKG_LIBRARY_LINKAGE}) + set(BUILD_PATH "${SYSTEM}.${SYSTEM_PLATFORM_PATH}.vc${TOOLSET_VERSION}") + endif() +else() + message(FATAL_ERROR "Unsupported platform: ${VCPKG_CMAKE_SYSTEM_NAME}") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO NVIDIAGameWorks/PhysX + REF ae80dede0546d652040ae6260a810e53e20a06fa + SHA512 f3a690039cf39fe2db9a728b82af0d39eaa02340a853bdad4b5152d63532367eb24fc7033a614882168049b80d803b6225fc60ed2900a9d0deab847f220540be + HEAD_REF master + PATCHES + internalMBP_symbols.patch + msvc_142_bug_workaround.patch + vs16_3_typeinfo_header_fix.patch +) + +file(REMOVE ${SOURCE_PATH}/physx/buildtools/presets/public/${PRESET_FILE}.xml) +configure_file(${CMAKE_CURRENT_LIST_DIR}/preset.xml.in ${SOURCE_PATH}/physx/buildtools/presets/public/${PRESET_FILE}.xml) + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_DIR ${PYTHON3} DIRECTORY) +vcpkg_add_to_path(${PYTHON3_DIR}) + +get_filename_component(CMAKE_DIR ${CMAKE_COMMAND} DIRECTORY) +# If cmake is not installed then adding it to the end of the path +# will allow generate_projects.bat to find the cmake used by vcpkg. +vcpkg_add_to_path(${CMAKE_DIR}) + +vcpkg_execute_required_process( + COMMAND ${SOURCE_PATH}/physx/generate_projects.bat ${PRESET_FILE} + WORKING_DIRECTORY ${SOURCE_PATH}/physx + LOGNAME build-${TARGET_TRIPLET} +) + +if(NOT DEFINED RELEASE_CONFIGURATION) + set(RELEASE_CONFIGURATION "release") +endif() +set(DEBUG_CONFIGURATION "debug") + +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/physx/compiler/${COMPILER}/PhysXSDK.sln + RELEASE_CONFIGURATION ${RELEASE_CONFIGURATION} + DEBUG_CONFIGURATION ${DEBUG_CONFIGURATION} + PLATFORM ${MSBUILD_PLATFORM} +) + +file(INSTALL ${SOURCE_PATH}/physx/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}/) +file(INSTALL ${SOURCE_PATH}/pxshared/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}/) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(GLOB RELEASE_BINS ${SOURCE_PATH}/physx/bin/${BUILD_PATH}/${RELEASE_CONFIGURATION}/*.dll) + file(INSTALL ${RELEASE_BINS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + + file(GLOB DEBUG_BINS ${SOURCE_PATH}/physx/bin/${BUILD_PATH}/${DEBUG_CONFIGURATION}/*.dll) + file(INSTALL ${DEBUG_BINS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + + vcpkg_copy_pdbs() +endif() + +file( + GLOB + RELEASE_LIBS + ${SOURCE_PATH}/physx/bin/${BUILD_PATH}/${RELEASE_CONFIGURATION}/*.lib + ${SOURCE_PATH}/physx/bin/${BUILD_PATH}/${RELEASE_CONFIGURATION}/*.pdb + ${SOURCE_PATH}/physx/compiler/${COMPILER}/sdk_source_bin/${RELEASE_CONFIGURATION}/*.pdb +) +file(INSTALL ${RELEASE_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + +file( + GLOB + DEBUG_LIBS + ${SOURCE_PATH}/physx/bin/${BUILD_PATH}/${DEBUG_CONFIGURATION}/*.lib + ${SOURCE_PATH}/physx/bin/${BUILD_PATH}/${DEBUG_CONFIGURATION}/*.pdb + ${SOURCE_PATH}/physx/compiler/${COMPILER}/sdk_source_bin/${DEBUG_CONFIGURATION}/*.pdb +) +file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/physx/preset.xml.in b/vcpkg/ports/physx/preset.xml.in new file mode 100644 index 0000000..b72619a --- /dev/null +++ b/vcpkg/ports/physx/preset.xml.in @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vcpkg/ports/physx/vs16_3_typeinfo_header_fix.patch b/vcpkg/ports/physx/vs16_3_typeinfo_header_fix.patch new file mode 100644 index 0000000..8c2a5a0 --- /dev/null +++ b/vcpkg/ports/physx/vs16_3_typeinfo_header_fix.patch @@ -0,0 +1,12 @@ +diff --git a/physx/source/foundation/include/PsAllocator.h b/physx/source/foundation/include/PsAllocator.h +--- a/physx/source/foundation/include/PsAllocator.h ++++ b/physx/source/foundation/include/PsAllocator.h +@@ -37,7 +37,7 @@ + + #if(PX_WINDOWS_FAMILY || PX_XBOXONE) + #include +- #include ++ #include + #endif + #if(PX_APPLE_FAMILY) + #include diff --git a/vcpkg/ports/picojson/CONTROL b/vcpkg/ports/picojson/CONTROL new file mode 100644 index 0000000..72ac9c5 --- /dev/null +++ b/vcpkg/ports/picojson/CONTROL @@ -0,0 +1,5 @@ +Source: picojson +Version: 1.3.0-1 +Homepage: https://github.com/kazuho/picojson +Description: A header-file-only, JSON parser serializer in C++. + diff --git a/vcpkg/ports/picojson/portfile.cmake b/vcpkg/ports/picojson/portfile.cmake new file mode 100644 index 0000000..1919e61 --- /dev/null +++ b/vcpkg/ports/picojson/portfile.cmake @@ -0,0 +1,15 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kazuho/picojson + REF v1.3.0 + SHA512 76d5a6b3b9e1151198eee707faffcbbba28a2842daccf03d99a5d02ae017f9517ef3ac9da4acc74a4fc1357feaf19e14a15c34698a1d4cb65acb6d23b566b284 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/picojson.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/picosha2/CONTROL b/vcpkg/ports/picosha2/CONTROL new file mode 100644 index 0000000..a388045 --- /dev/null +++ b/vcpkg/ports/picosha2/CONTROL @@ -0,0 +1,4 @@ +Source: picosha2 +Version: 2018-07-30 +Homepage: https://github.com/okdshin/PicoSHA2 +Description: PicoSHA2 - a C++ SHA256 hash generator diff --git a/vcpkg/ports/picosha2/portfile.cmake b/vcpkg/ports/picosha2/portfile.cmake new file mode 100644 index 0000000..7a93b2d --- /dev/null +++ b/vcpkg/ports/picosha2/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO okdshin/PicoSHA2 + REF b699e6c900be6e00152db5a3d123c1db42ea13d0 + SHA512 5972dfe7675c560a0c58491e72938e8e5ea46eabb2e2f564086001eda21b237035aa0deef94bb36a21154a4b5cbc160b9b0f6b5988f6580d693ad74cfbc53bb5 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/picosha2.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/picosha2 RENAME copyright) diff --git a/vcpkg/ports/piex/CMakeLists.txt b/vcpkg/ports/piex/CMakeLists.txt new file mode 100644 index 0000000..35a8810 --- /dev/null +++ b/vcpkg/ports/piex/CMakeLists.txt @@ -0,0 +1,43 @@ +cmake_minimum_required(VERSION 3.8.0) +project(piex) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +include_directories(".") + +add_library(binary_parse + src/binary_parse/cached_paged_byte_array.cc + src/binary_parse/range_checked_byte_ptr.cc +) + +add_library(image_type_recognition + src/image_type_recognition/image_type_recognition_lite.cc +) + +target_link_libraries(image_type_recognition binary_parse) + +add_library(tiff_directory + src/tiff_directory/tiff_directory.cc +) + +target_link_libraries(tiff_directory binary_parse) + +add_library(piex + src/piex.cc + src/tiff_parser.cc +) + +target_link_libraries(piex tiff_directory image_type_recognition binary_parse) + +install( + TARGETS piex + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES src/piex.h src/piex_types.h DESTINATION include/src) +endif() diff --git a/vcpkg/ports/piex/CONTROL b/vcpkg/ports/piex/CONTROL new file mode 100644 index 0000000..2ff82df --- /dev/null +++ b/vcpkg/ports/piex/CONTROL @@ -0,0 +1,4 @@ +Source: piex +Version: 2019-07-11 +Homepage: https://github.com/google/piex +Description: The Preview Image Extractor (PIEX) is designed to find and extract the largest diff --git a/vcpkg/ports/piex/portfile.cmake b/vcpkg/ports/piex/portfile.cmake new file mode 100644 index 0000000..a05fe83 --- /dev/null +++ b/vcpkg/ports/piex/portfile.cmake @@ -0,0 +1,25 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/piex + REF 256bd102be288c19b4165e0ecc7097a18c004e92 + SHA512 ae948588a99d586593788c995c3d65a488faaf99b2ab6c51ec39df7e11a42c89454dd505117e90b1f152f6abfc2e3e11f61b0af97e42ecdff0d978934e20f582 + 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() +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/piex RENAME copyright) diff --git a/vcpkg/ports/pistache/CONTROL b/vcpkg/ports/pistache/CONTROL new file mode 100644 index 0000000..307fe01 --- /dev/null +++ b/vcpkg/ports/pistache/CONTROL @@ -0,0 +1,5 @@ +Source: pistache +Version: 2019-08-05 +Homepage: https://github.com/oktal/pistache +Description: Pistache is a modern and elegant HTTP and REST framework for C++. It is entirely written in pure-C++11 and provides a clear and pleasant API. +Supports: linux \ No newline at end of file diff --git a/vcpkg/ports/pistache/portfile.cmake b/vcpkg/ports/pistache/portfile.cmake new file mode 100644 index 0000000..d0400dc --- /dev/null +++ b/vcpkg/ports/pistache/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +if(NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + message(FATAL_ERROR "${PORT} currently only supports Linux platform.") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oktal/pistache + REF 4dc9e3ef9a1b953a62e5fadbed88e72b4b3734de + SHA512 427b6a6e7200e5f91ce8737cd1cc5d6cd689025033c85979c96f0ece64ae05d9c6839a936d7d6015b0e1065dc72362f6f70ab588ea7cae7aa718dfe5cd288554 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/vcpkg/ports/pixel/CONTROL b/vcpkg/ports/pixel/CONTROL new file mode 100644 index 0000000..fae73d2 --- /dev/null +++ b/vcpkg/ports/pixel/CONTROL @@ -0,0 +1,6 @@ +Source: pixel +Version: 0.3-1 +Description: Simple 2D Graphics based on standard and portable OpenGL. +Build-Depends: glew, opengl, sdl2 +Homepage: https://github.com/dascandy/pixel +Supports: !windows \ No newline at end of file diff --git a/vcpkg/ports/pixel/portfile.cmake b/vcpkg/ports/pixel/portfile.cmake new file mode 100644 index 0000000..0b63c66 --- /dev/null +++ b/vcpkg/ports/pixel/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_fail_port_install(ON_TARGET "Windows") + +if(VCPKG_TARGET_IS_LINUX) + message(WARNING"${PORT} currently requires libglu1-mesa from the system package manager: + This can be installed on Ubuntu systems via sudo apt install libglu1-mesa-dev") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dascandy/pixel + REF v0.3 + SHA512 d7d622679195d0eb30c8ed411333711369b108e2171d1e4b0a93c7ae3bd1fb36a25fbe1f5771c858615c07ee139412e5353b8cb5489cb409dd94829253c18a7b + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/pixman/CMakeLists.txt b/vcpkg/ports/pixman/CMakeLists.txt new file mode 100644 index 0000000..48e01ec --- /dev/null +++ b/vcpkg/ports/pixman/CMakeLists.txt @@ -0,0 +1,87 @@ +cmake_minimum_required(VERSION 3.0) +project(pixman VERSION 0.34.0 LANGUAGES C) + +set(CMAKE_DEBUG_POSTFIX "d") + +if(UNIX) + add_definitions(-DHAVE_PTHREADS) +endif() + +include_directories(".") + +file(GLOB SOURCES +"pixman.c" +"pixman-access.c" +"pixman-access-accessors.c" +"pixman-bits-image.c" +"pixman-combine32.c" +"pixman-combine-float.c" +"pixman-conical-gradient.c" +"pixman-filter.c" +"pixman-x86.c" +"pixman-mips.c" +"pixman-arm.c" +"pixman-ppc.c" +"pixman-edge.c" +"pixman-edge-accessors.c" +"pixman-fast-path.c" +"pixman-glyph.c" +"pixman-general.c" +"pixman-gradient-walker.c" +"pixman-image.c" +"pixman-implementation.c" +"pixman-linear-gradient.c" +"pixman-matrix.c" +"pixman-noop.c" +"pixman-radial-gradient.c" +"pixman-region16.c" +"pixman-region32.c" +"pixman-solid-fill.c" +"pixman-timer.c" +"pixman-trap.c" +"pixman-utils.c" +) + +# pixman requires the three PACKAGE* definitions in order to compile. +set(PIXMAN_DEFS + PRIVATE + PACKAGE="pixman-1" + PACKAGE_VERSION="0.34.0" + PACKAGE_BUGREPORT="" +) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64 OR VCPKG_TARGET_ARCHITECTURE STREQUAL arm) + # don't enable SSE2 for arm64-windows and arm-windows +else() + # The USE_SSE2 definition lets it use SSE2 instructions for speed. Every x86/64 target machine should have SSE2 these days. + set(PIXMAN_DEFS ${PIXMAN_DEFS} USE_SSE2) + file(GLOB SSE2_SOURCES "pixman-sse2.c") + set(SOURCES ${SOURCES} ${SSE2_SOURCES}) +endif() + +add_library(pixman-1 ${SOURCES}) +target_include_directories(pixman-1 PUBLIC $) +target_compile_definitions(pixman-1 ${PIXMAN_DEFS}) + +if(UNIX AND CMAKE_SIZEOF_VOID_P EQUAL 4) + target_compile_options(pixman-1 PRIVATE -msse2) +endif() + +# pixman produces a lot of warnings which are disabled here because they otherwise fill up the log files +if(MSVC) + target_compile_options(pixman-1 PRIVATE "/wd4244" "/wd4146" "/wd4996") # PUBLIC "/D_CRT_SECURE_NO_WARNINGS" +endif() + +install(TARGETS pixman-1 + EXPORT pixman-targets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install( + EXPORT pixman-targets + NAMESPACE unofficial::pixman:: + FILE unofficial-pixman-config.cmake + DESTINATION share/unofficial-pixman +) diff --git a/vcpkg/ports/pixman/CONTROL b/vcpkg/ports/pixman/CONTROL new file mode 100644 index 0000000..d081eaa --- /dev/null +++ b/vcpkg/ports/pixman/CONTROL @@ -0,0 +1,4 @@ +Source: pixman +Version: 0.38.4-1 +Homepage: https://www.cairographics.org/releases +Description: Pixman is a low-level software library for pixel manipulation, providing features such as image compositing and trapezoid rasterization. diff --git a/vcpkg/ports/pixman/portfile.cmake b/vcpkg/ports/pixman/portfile.cmake new file mode 100644 index 0000000..6e4f2f6 --- /dev/null +++ b/vcpkg/ports/pixman/portfile.cmake @@ -0,0 +1,47 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +set(PIXMAN_VERSION 0.38.4) +vcpkg_download_distfile(ARCHIVE + URLS "https://www.cairographics.org/releases/pixman-${PIXMAN_VERSION}.tar.gz" + FILENAME "pixman-${PIXMAN_VERSION}.tar.gz" + SHA512 b66dc23c0bc7327cb90085cbc14ccf96ad58001a927f23af24e0258ca13f32d4255535862f1efcf00e9e723410aa9f51edf26fb01c8cde49379d1225acf7b5af +) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${PIXMAN_VERSION} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/pixman) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/pixman + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-pixman TARGET_PATH share/unofficial-pixman) + +# Copy the appropriate header files. +file(COPY + "${SOURCE_PATH}/pixman/pixman.h" + "${SOURCE_PATH}/pixman/pixman-accessor.h" + "${SOURCE_PATH}/pixman/pixman-combine32.h" + "${SOURCE_PATH}/pixman/pixman-compiler.h" + "${SOURCE_PATH}/pixman/pixman-edge-imp.h" + "${SOURCE_PATH}/pixman/pixman-inlines.h" + "${SOURCE_PATH}/pixman/pixman-private.h" + "${SOURCE_PATH}/pixman/pixman-version.h" + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/pixman) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/pixman/COPYING ${CURRENT_PACKAGES_DIR}/share/pixman/copyright) + +vcpkg_copy_pdbs() + +vcpkg_test_cmake(PACKAGE_NAME unofficial-pixman) diff --git a/vcpkg/ports/platform-folders/CONTROL b/vcpkg/ports/platform-folders/CONTROL new file mode 100644 index 0000000..8b5227d --- /dev/null +++ b/vcpkg/ports/platform-folders/CONTROL @@ -0,0 +1,4 @@ +Source: platform-folders +Version: 4.0.0 +Port-Version: 6 +Description: A C++ library to look for special directories like "My Documents" and "%APPDATA%" diff --git a/vcpkg/ports/platform-folders/portfile.cmake b/vcpkg/ports/platform-folders/portfile.cmake new file mode 100644 index 0000000..564fe1b --- /dev/null +++ b/vcpkg/ports/platform-folders/portfile.cmake @@ -0,0 +1,38 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +set(TARGET_BUILD_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sago007/PlatformFolders + REF 4.0.0 + SHA512 89bd9b971cff55ddb051ffcf2e1bbf1678ec14c601916d65ebd4d8e46a79cf93f12cbe9c13ebd0417808f35d7031d13274cda78f009a26fbd19d71e13a5e5ac6 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(INSTALL ${TARGET_BUILD_PATH}-rel/platform_folders.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin/) + file(INSTALL ${TARGET_BUILD_PATH}-dbg/platform_folders.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin/) +endif() + +if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "MinGW") + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake/ TARGET_PATH /share/platform_folders) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/ TARGET_PATH /share/) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/platform-folders RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/plf-colony/CONTROL b/vcpkg/ports/plf-colony/CONTROL new file mode 100644 index 0000000..9175034 --- /dev/null +++ b/vcpkg/ports/plf-colony/CONTROL @@ -0,0 +1,4 @@ +Source: plf-colony +Version: 5.33 +Description: An unordered data container providing fast iteration/insertion/erasure while maintaining pointer validity to non-erased elements +Homepage: https://www.plflib.org/ diff --git a/vcpkg/ports/plf-colony/portfile.cmake b/vcpkg/ports/plf-colony/portfile.cmake new file mode 100644 index 0000000..85c9409 --- /dev/null +++ b/vcpkg/ports/plf-colony/portfile.cmake @@ -0,0 +1,16 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mattreecebentley/plf_colony + REF 7aba4b3f27e3dd7ca54cbe41738d04695d2c05e1 + SHA512 78dc8ee96174776e6993b03f15b1e7452864015641854ff89ffbe8d45e2203982347da9bf6eed1f7a0b40a794c53ab7c06e92eee101e4e0aae20997d240db872 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/plf_colony.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/plf-list/CONTROL b/vcpkg/ports/plf-list/CONTROL new file mode 100644 index 0000000..338eec5 --- /dev/null +++ b/vcpkg/ports/plf-list/CONTROL @@ -0,0 +1,4 @@ +Source: plf-list +Version: 2019-08-10 +Description: A drop-in replacement for std::list with 293% faster insertion, 57% faster erasure, 17% faster iteration and 77% faster sorting on average +Homepage: https://www.plflib.org/ diff --git a/vcpkg/ports/plf-list/portfile.cmake b/vcpkg/ports/plf-list/portfile.cmake new file mode 100644 index 0000000..f9efd1e --- /dev/null +++ b/vcpkg/ports/plf-list/portfile.cmake @@ -0,0 +1,16 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mattreecebentley/plf_list + REF 42fcfca9890598d1c1fda45eb9dbe2b2b2d4dd2b + SHA512 879157aac16dc1b76db942a8ddf25dc33ede10e769496b7f300a070913c6c6946cb40853dd3071ecf3d9c870e1dee5d420d42fbb388e83361235659171f6bd44 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/plf_list.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/plf-nanotimer/CONTROL b/vcpkg/ports/plf-nanotimer/CONTROL new file mode 100644 index 0000000..10ac0ac --- /dev/null +++ b/vcpkg/ports/plf-nanotimer/CONTROL @@ -0,0 +1,4 @@ +Source: plf-nanotimer +Version: 2019-08-10 +Description: A simple C++ 03/11/etc timer class for ~microsecond-precision cross-platform benchmarking +Homepage: https://www.plflib.org/ diff --git a/vcpkg/ports/plf-nanotimer/portfile.cmake b/vcpkg/ports/plf-nanotimer/portfile.cmake new file mode 100644 index 0000000..4c25a2c --- /dev/null +++ b/vcpkg/ports/plf-nanotimer/portfile.cmake @@ -0,0 +1,16 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mattreecebentley/plf_nanotimer + REF bc8b44d2befc4395f63701c923ece89835d8415c + SHA512 ec816e82ab855dd7029b03931ffb1e945d3e77f7bb446c4985c4a8404afe20e9de8fac02f64459c47c34e31c06fa8838dba310263197d309e39ec1b0b5da0b6d + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/plf_nanotimer.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/plf-stack/CONTROL b/vcpkg/ports/plf-stack/CONTROL new file mode 100644 index 0000000..d0a40be --- /dev/null +++ b/vcpkg/ports/plf-stack/CONTROL @@ -0,0 +1,4 @@ +Source: plf-stack +Version: 2019-08-10 +Description: A C++ data container replicating std::stack functionality but with better performance +Homepage: https://www.plflib.org/ diff --git a/vcpkg/ports/plf-stack/portfile.cmake b/vcpkg/ports/plf-stack/portfile.cmake new file mode 100644 index 0000000..11a9fb0 --- /dev/null +++ b/vcpkg/ports/plf-stack/portfile.cmake @@ -0,0 +1,16 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mattreecebentley/plf_stack + REF 9d046154d8954eafc12f8d4845505beec8c4a5da + SHA512 2202bbff0e93bf515ae7b237551d084dcba9b870bca82f49b4e1a64446f4574079b0cb45fb91f0ad0472e008f21ad014464b45e307ffa6dab19affc6dc38626a + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/plf_stack.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/plib/CMakeLists.txt b/vcpkg/ports/plib/CMakeLists.txt new file mode 100644 index 0000000..ac35b66 --- /dev/null +++ b/vcpkg/ports/plib/CMakeLists.txt @@ -0,0 +1,361 @@ +cmake_minimum_required(VERSION 3.3.0) + +project(plib VERSION 1.8.5) + +set(CMAKE_DEBUG_POSTFIX d) + +# Sources & Headers +set(fnt_SOURCES + src/fnt/fnt.cxx + src/fnt/fntBitmap.cxx + src/fnt/fntTXF.cxx) + +set(fnt_HEADERS + src/fnt/fnt.h + src/fnt/fntLocal.h) + +set(js_SOURCES + src/js/js.cxx + src/js/jsBSD.cxx + src/js/jsLinux.cxx + src/js/jsMacOS.cxx + src/js/jsMacOSX.cxx + src/js/jsNone.cxx + src/js/jsWindows.cxx) + +set(js_HEADERS + src/js/js.h) + +set(net_SOURCES + src/net/netBuffer.cxx + src/net/netChannel.cxx + src/net/netChat.cxx + src/net/netMessage.cxx + src/net/netMonitor.cxx + src/net/netSocket.cxx) + +set(net_HEADERS + src/net/netBuffer.h + src/net/netChannel.h + src/net/netChat.h + src/net/netMessage.h + src/net/netMonitor.h + src/net/netSocket.h) + +set(psl_SOURCES + src/psl/psl.cxx + src/psl/pslCodeGen.cxx + src/psl/pslCompiler.cxx + src/psl/pslContext.cxx + src/psl/pslDump.cxx + src/psl/pslError.cxx + src/psl/pslExpression.cxx + src/psl/pslFileIO.cxx + src/psl/pslProgram.cxx + src/psl/pslSymbols.cxx + src/psl/pslToken.cxx) + +set(psl_HEADERS + src/psl/psl.h + src/psl/pslCompiler.h + src/psl/pslContext.h + src/psl/pslFileIO.h + src/psl/pslLocal.h + src/psl/pslOpcodes.h + src/psl/pslSymbol.h) + +set(puAux_SOURCES + src/puAux/puAux.cxx + src/puAux/puAuxBiSlider.cxx + src/puAux/puAuxBiSliderWithEnds.cxx + src/puAux/puAuxChooser.cxx + src/puAux/puAuxComboBox.cxx + src/puAux/puAuxCompass.cxx + src/puAux/puAuxFileSelector.cxx + src/puAux/puAuxLargeInput.cxx + src/puAux/puAuxList.cxx + src/puAux/puAuxScrollBar.cxx + src/puAux/puAuxSelectBox.cxx + src/puAux/puAuxSliderWithInput.cxx + src/puAux/puAuxSpinBox.cxx + src/puAux/puAuxTriSlider.cxx + src/puAux/puAuxVerticalMenu.cxx) + +set(puAux_HEADERS + src/puAux/puAux.h + src/puAux/puAuxLocal.h) + +set(pui_SOURCES + src/pui/pu.cxx + src/pui/puArrowButton.cxx + src/pui/puBox.cxx + src/pui/puButton.cxx + src/pui/puButtonBox.cxx + src/pui/puDial.cxx + src/pui/puDialogBox.cxx + src/pui/puFont.cxx + src/pui/puFrame.cxx + src/pui/puGroup.cxx + src/pui/puInput.cxx + src/pui/puInputBase.cxx + src/pui/puInterface.cxx + src/pui/puListBox.cxx + src/pui/puMenuBar.cxx + src/pui/puObject.cxx + src/pui/puOneShot.cxx + src/pui/puPopup.cxx + src/pui/puPopupMenu.cxx + src/pui/puRange.cxx + src/pui/puSlider.cxx + src/pui/puText.cxx + src/pui/puValue.cxx) + +set(pui_HEADERS + src/pui/pu.h + src/pui/puFLTK.h + src/pui/puGLUT.h + src/pui/puLocal.h + src/pui/puNative.h + src/pui/puPW.h + src/pui/puSDL.h) + +set(pw_SOURCES + src/pw/pwWindows.cxx) + +set(pw_HEADERS + src/pw/pw.h) + +set(sg_SOURCES + src/sg/sg.cxx + src/sg/sgd.cxx + src/sg/sgdIsect.cxx + src/sg/sgIsect.cxx + src/sg/sgPerlinNoise.cxx) + +set(sg_HEADERS + src/sg/sg.h) + +set(sl_SOURCES + src/sl/slDSP.cxx + src/sl/slEnvelope.cxx + src/sl/slMODdacio.cxx + src/sl/slMODfile.cxx + src/sl/slMODinst.cxx + src/sl/slMODnote.cxx + src/sl/slMODPlayer.cxx + src/sl/slPlayer.cxx + src/sl/slSample.cxx + src/sl/slSamplePlayer.cxx + src/sl/slScheduler.cxx + src/sl/smMixer.cxx) + +set(sl_HEADERS + src/sl/sl.h + src/sl/slMODfile.h + src/sl/slMODPrivate.h + src/sl/slPortability.h + src/sl/sm.h) + +set(ssg_SOURCES + src/ssg/ssg.cxx + src/ssg/ssgAnimation.cxx + src/ssg/ssgAnimTransform.cxx + src/ssg/ssgAxisTransform.cxx + src/ssg/ssgBase.cxx + src/ssg/ssgBaseTransform.cxx + src/ssg/ssgBranch.cxx + src/ssg/ssgContext.cxx + src/ssg/ssgCutout.cxx + src/ssg/ssgDList.cxx + src/ssg/ssgEntity.cxx + src/ssg/ssgInvisible.cxx + src/ssg/ssgIO.cxx + src/ssg/ssgIsect.cxx + src/ssg/ssgLeaf.cxx + src/ssg/ssgList.cxx + src/ssg/ssgLoad.cxx + src/ssg/ssgLoad3ds.cxx + src/ssg/ssgLoadAC.cxx + src/ssg/ssgLoadASC.cxx + src/ssg/ssgLoadASE.cxx + src/ssg/ssgLoadATG.cxx + src/ssg/ssgLoadBMP.cxx + src/ssg/ssgLoadDOF.cxx + src/ssg/ssgLoadDXF.cxx + src/ssg/ssgLoaderWriterStuff.cxx + src/ssg/ssgLoadFLT.cxx + src/ssg/ssgLoadIV.cxx + src/ssg/ssgLoadM.cxx + src/ssg/ssgLoadMD2.cxx + src/ssg/ssgLoadMDL.cxx + src/ssg/ssgLoadMDL_BGLTexture.cxx + src/ssg/ssgLoadOBJ.cxx + src/ssg/ssgLoadOFF.cxx + src/ssg/ssgLoadPCX.cxx + src/ssg/ssgLoadPNG.cxx + src/ssg/ssgLoadSGI.cxx + src/ssg/ssgLoadSSG.cxx + src/ssg/ssgLoadStrip.cxx + src/ssg/ssgLoadTexture.cxx + src/ssg/ssgLoadTGA.cxx + src/ssg/ssgLoadTRI.cxx + src/ssg/ssgLoadVRML1.cxx + src/ssg/ssgLoadX.cxx + src/ssg/ssgLoadXPlaneObj.cxx + src/ssg/ssgOptimiser.cxx + src/ssg/ssgParser.cxx + src/ssg/ssgRangeSelector.cxx + src/ssg/ssgRoot.cxx + src/ssg/ssgSave3ds.cxx + src/ssg/ssgSaveAC.cxx + src/ssg/ssgSaveASC.cxx + src/ssg/ssgSaveASE.cxx + src/ssg/ssgSaveATG.cxx + src/ssg/ssgSaveDXF.cxx + src/ssg/ssgSaveFLT.cxx + src/ssg/ssgSaveIV.cxx + src/ssg/ssgSaveM.cxx + src/ssg/ssgSaveOBJ.cxx + src/ssg/ssgSaveOFF.cxx + src/ssg/ssgSaveQHI.cxx + src/ssg/ssgSaveTRI.cxx + src/ssg/ssgSaveVRML1.cxx + src/ssg/ssgSaveX.cxx + src/ssg/ssgSelector.cxx + src/ssg/ssgSimpleList.cxx + src/ssg/ssgSimpleState.cxx + src/ssg/ssgState.cxx + src/ssg/ssgStateSelector.cxx + src/ssg/ssgStateTables.cxx + src/ssg/ssgStatistics.cxx + src/ssg/ssgStats.cxx + src/ssg/ssgTexTrans.cxx + src/ssg/ssgTexture.cxx + src/ssg/ssgTransform.cxx + src/ssg/ssgTween.cxx + src/ssg/ssgTweenController.cxx + src/ssg/ssgVertSplitter.cxx + src/ssg/ssgVTable.cxx + src/ssg/ssgVtxArray.cxx + src/ssg/ssgVtxTable.cxx) + +set(ssg_HEADERS + src/ssg/ssg.h + src/ssg/ssg3ds.h + src/ssg/ssgKeyFlier.h + src/ssg/ssgLoaderWriterStuff.h + src/ssg/ssgLoadMDL.h + src/ssg/ssgLoadVRML.h + src/ssg/ssgLocal.h + src/ssg/ssgMSFSPalette.h + src/ssg/ssgParser.h + src/ssg/ssgVertSplitter.h) + +set(ssgAux_SOURCES + src/ssgAux/ssgAux.cxx + src/ssgAux/ssgaBillboards.cxx + src/ssgAux/ssgaCelestialBody.cxx + src/ssgAux/ssgaCloudLayer.cxx + src/ssgAux/ssgaFire.cxx + src/ssgAux/ssgaLensFlare.cxx + src/ssgAux/ssgaLensFlareTexture.cxx + src/ssgAux/ssgaParticleSystem.cxx + src/ssgAux/ssgaPatch.cxx + src/ssgAux/ssgaScreenDump.cxx + src/ssgAux/ssgaShapes.cxx + src/ssgAux/ssgaSky.cxx + src/ssgAux/ssgaSkyDome.cxx + src/ssgAux/ssgaSphere.cxx + src/ssgAux/ssgaStars.cxx + src/ssgAux/ssgaTeapot.cxx + src/ssgAux/ssgaWaveSystem.cxx) + +set(ssgAux_HEADERS + src/ssgAux/ssgAux.h + src/ssgAux/ssgaBillboards.h + src/ssgAux/ssgaFire.h + src/ssgAux/ssgaLensFlare.h + src/ssgAux/ssgaParticleSystem.h + src/ssgAux/ssgaScreenDump.h + src/ssgAux/ssgaShapes.h + src/ssgAux/ssgaSky.h + src/ssgAux/ssgaSphere.h + src/ssgAux/ssgaWaveSystem.h) + +set(ul_SOURCES + src/util/ul.cxx + src/util/ulClock.cxx + src/util/ulError.cxx + src/util/ulLinkedList.cxx + src/util/ulList.cxx + src/util/ulRTTI.cxx) + +set(ul_HEADERS + src/util/ul.h + src/util/ulLocal.h + src/util/ulRTTI.h) + +# Create and configure the targets +add_library(plib_fnt STATIC ${fnt_SOURCES} ${fnt_HEADERS}) +target_include_directories(plib_fnt PRIVATE src/sg src/util) + +add_library(plib_js STATIC ${js_SOURCES} ${js_HEADERS}) +target_include_directories(plib_js PRIVATE src/util) + +add_library(plib_net STATIC ${net_SOURCES} ${net_HEADERS}) +target_include_directories(plib_net PRIVATE src/util) + +add_library(plib_psl STATIC ${psl_SOURCES} ${psl_HEADERS}) +target_include_directories(plib_psl PRIVATE src/util) + +add_library(plib_puAux STATIC ${puAux_SOURCES} ${puAux_HEADERS}) +target_include_directories(plib_puAux PRIVATE + src/fnt + src/pui + src/sg + src/util +) + +add_library(plib_pui STATIC ${pui_SOURCES} ${pui_HEADERS}) +target_include_directories(plib_pui PRIVATE src/fnt src/sg src/util) + +add_library(plib_pw STATIC ${pw_SOURCES} ${pw_HEADERS}) +target_include_directories(plib_pw PRIVATE src/util) + +add_library(plib_sg STATIC ${sg_SOURCES} ${sg_HEADERS}) +target_include_directories(plib_sg PRIVATE src/util) + +add_library(plib_sl STATIC ${sl_SOURCES} ${sl_HEADERS}) +target_include_directories(plib_sl PRIVATE src/util) + +add_library(plib_ssg STATIC ${ssg_SOURCES} ${ssg_HEADERS}) +target_include_directories(plib_ssg PRIVATE src/sg src/util) + +add_library(plib_ssgAux STATIC ${ssgAux_SOURCES} ${ssgAux_HEADERS}) +target_include_directories(plib_ssgAux PRIVATE src/sg src/ssg src/util) + +add_library(plib_ul STATIC ${ul_SOURCES} ${ul_HEADERS}) + +# Install +install( + TARGETS plib_fnt plib_js plib_net plib_psl plib_puAux plib_pui plib_pw plib_sg plib_sl plib_ssg plib_ssgAux plib_ul + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) + +install( + FILES ${fnt_HEADERS} + ${js_HEADERS} + ${net_HEADERS} + ${psl_HEADERS} + ${puAux_HEADERS} + ${pui_HEADERS} + ${pw_HEADERS} + ${sg_HEADERS} + ${sl_HEADERS} + ${ssg_HEADERS} + ${ssgAux_HEADERS} + ${ul_HEADERS} + DESTINATION include/plib +) diff --git a/vcpkg/ports/plib/CONTROL b/vcpkg/ports/plib/CONTROL new file mode 100644 index 0000000..3b6b99c --- /dev/null +++ b/vcpkg/ports/plib/CONTROL @@ -0,0 +1,3 @@ +Source: plib +Version: 1.8.5-4 +Description: A suite of portable game libraries diff --git a/vcpkg/ports/plib/portfile.cmake b/vcpkg/ports/plib/portfile.cmake new file mode 100644 index 0000000..73fe786 --- /dev/null +++ b/vcpkg/ports/plib/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "http://plib.sourceforge.net/dist/plib-1.8.5.tar.gz" + FILENAME "plib-1.8.5.tar.gz" + SHA512 17154cc77243fe576c2bcbcb0285b98aef1a0634658f5473e95fe0ac8fa3ed477dbe5620e44ccf0b7cc616f812af0cd44d6fcbba0c563180d3b61c9d6f158e1d +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/plibsys/CONTROL b/vcpkg/ports/plibsys/CONTROL new file mode 100644 index 0000000..dec1285 --- /dev/null +++ b/vcpkg/ports/plibsys/CONTROL @@ -0,0 +1,6 @@ +Source: plibsys +Version: 0.0.4 +Port-Version: 4 +Homepage: https://github.com/saprykin/plibsys +Description: Highly portable C system library: threads and synchronization, sockets, IPC, data structures and more. +Supports: !uwp diff --git a/vcpkg/ports/plibsys/fix_configuration.patch b/vcpkg/ports/plibsys/fix_configuration.patch new file mode 100644 index 0000000..f48249b --- /dev/null +++ b/vcpkg/ports/plibsys/fix_configuration.patch @@ -0,0 +1,142 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 343e3d2..aff7929 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -785,18 +785,18 @@ if (PLIBSYS_PLATFORM_DEFINES) + endif() + + # Add targets +-add_library (plibsys SHARED ${PLIBSYS_SRCS} ${PLIBSYS_PLATFORM_SRCS} ${PLIBSYS_PUBLIC_HDRS} ${PLIBSYS_PRIVATE_HDRS}) +- + if (PLIBSYS_BUILD_STATIC) + add_library (plibsysstatic STATIC ${PLIBSYS_SRCS} ${PLIBSYS_PLATFORM_SRCS} ${PLIBSYS_PUBLIC_HDRS} ${PLIBSYS_PRIVATE_HDRS}) ++else() ++ add_library (plibsys SHARED ${PLIBSYS_SRCS} ${PLIBSYS_PLATFORM_SRCS} ${PLIBSYS_PUBLIC_HDRS} ${PLIBSYS_PRIVATE_HDRS}) + endif() + + # Add include directories + if (COMMAND target_include_directories) +- target_include_directories (plibsys PUBLIC ${PLIBSYS_INCLUDE_DIRS}) +- + if (PLIBSYS_BUILD_STATIC) + target_include_directories (plibsysstatic PUBLIC ${PLIBSYS_INCLUDE_DIRS}) ++ else() ++ target_include_directories (plibsys PUBLIC ${PLIBSYS_INCLUDE_DIRS}) + endif() + else() + include_directories (${PLIBSYS_INCLUDE_DIRS}) +@@ -804,15 +804,16 @@ endif() + + # Add compile definitions + if (COMMAND target_compile_definitions) +- target_compile_definitions (plibsys PRIVATE ${PLIBSYS_COMPILE_DEFS}) +- + if (PLIBSYS_BUILD_STATIC) + target_compile_definitions (plibsysstatic PRIVATE ${PLIBSYS_COMPILE_DEFS}) ++ else() ++ target_compile_definitions (plibsys PRIVATE ${PLIBSYS_COMPILE_DEFS}) + endif() + else() + add_definitions (${PLIBSYS_COMPILE_DEFS}) + endif() + ++if(NOT PLIBSYS_BUILD_STATIC) + set_target_properties (plibsys PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${OUTPUT_DIR}) + set_target_properties (plibsys PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_DIR}) + set_target_properties (plibsys PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${OUTPUT_DIR}) +@@ -820,6 +821,7 @@ set_target_properties (plibsys PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${OUTPUT_DIR} + if (NOT PLIBSYS_TARGET_OS STREQUAL os2 AND NOT PLIBSYS_TARGET_OS STREQUAL amigaos) + set_target_properties (plibsys PROPERTIES SOVERSION ${PLIBSYS_SOVERSION}) + endif() ++endif() + + if (PLIBSYS_BUILD_STATIC) + set_target_properties (plibsysstatic PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${OUTPUT_DIR}) +@@ -834,10 +836,10 @@ if (PLIBSYS_PLATFORM_CFLAGS) + set (PLIBSYS_PLATFORM_CFLAGS_STR "${PLIBSYS_PLATFORM_CFLAGS_STR} ${PLATFORM_CFLAG}") + endforeach() + +- set_target_properties (plibsys PROPERTIES COMPILE_FLAGS "${PLIBSYS_PLATFORM_CFLAGS_STR}") +- + if (PLIBSYS_BUILD_STATIC) + set_target_properties (plibsysstatic PROPERTIES COMPILE_FLAGS "${PLIBSYS_PLATFORM_CFLAGS_STR}") ++ else() ++ set_target_properties (plibsys PROPERTIES COMPILE_FLAGS "${PLIBSYS_PLATFORM_CFLAGS_STR}") + endif() + endif() + +@@ -846,29 +848,30 @@ if (PLIBSYS_PLATFORM_LDFLAGS) + set (PLIBSYS_PLATFORM_LDFLAGS_STR "${PLIBSYS_PLATFORM_LDFLAGS_STR} ${PLATFORM_LDFLAG}") + endforeach() + +- set_target_properties (plibsys PROPERTIES LINK_FLAGS "${PLIBSYS_PLATFORM_LDFLAGS_STR}") +- + if (PLIBSYS_BUILD_STATIC) + set_target_properties (plibsysstatic PROPERTIES LINK_FLAGS "${PLIBSYS_PLATFORM_LDFLAGS_STR}") ++ else() ++ set_target_properties (plibsys PROPERTIES LINK_FLAGS "${PLIBSYS_PLATFORM_LDFLAGS_STR}") + endif() + endif() + +-target_link_libraries (plibsys ${PLIBSYS_PLATFORM_LINK_LIBRARIES}) + + if (PLIBSYS_BUILD_STATIC) +- target_link_libraries (plibsysstatic ${PLIBSYS_PLATFORM_LINK_LIBRARIES}) ++ target_link_libraries (plibsysstatic ${PLIBSYS_PLATFORM_LINK_LIBRARIES}) ++else() ++ target_link_libraries (plibsys ${PLIBSYS_PLATFORM_LINK_LIBRARIES}) + endif() + + if (PLIBSYS_BUILD_STATIC) +- set (PLIBSYS_INSTALL_TARGETS plibsys plibsysstatic) ++ set (PLIBSYS_INSTALL_TARGETS plibsysstatic) + else() + set (PLIBSYS_INSTALL_TARGETS plibsys) + endif() + + if (PLIBSYS_NATIVE_WINDOWS) + install (TARGETS ${PLIBSYS_INSTALL_TARGETS} +- DESTINATION lib +- RUNTIME DESTINATION lib ++ LIBRARY DESTINATION lib ++ RUNTIME DESTINATION bin + COMPONENT Core + ) + +@@ -878,11 +881,6 @@ if (PLIBSYS_NATIVE_WINDOWS) + + set (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE) + include (InstallRequiredSystemLibraries) +- +- install (PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} +- DESTINATION lib +- COMPONENT Core +- ) + endif() + + # Prepare installation dirs +@@ -890,18 +888,18 @@ if (NOT CMAKE_INSTALL_LIBDIR) + set (CMAKE_INSTALL_LIBDIR "lib") + endif() + ++if (NOT CMAKE_INSTALL_BINDIR) ++ set (CMAKE_INSTALL_BINDIR "bin") ++endif() ++ + if (NOT CMAKE_INSTALL_INCLUDEDIR) + set (CMAKE_INSTALL_INCLUDEDIR "include") + endif() + + install (TARGETS ${PLIBSYS_INSTALL_TARGETS} EXPORT plibsys-targets +- DESTINATION ${CMAKE_INSTALL_LIBDIR} +- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- COMPONENT Core +-) +-install (TARGETS ${PLIBSYS_INSTALL_TARGETS} +- DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + COMPONENT Core + ) + install (FILES diff --git a/vcpkg/ports/plibsys/portfile.cmake b/vcpkg/ports/plibsys/portfile.cmake new file mode 100644 index 0000000..c6ab653 --- /dev/null +++ b/vcpkg/ports/plibsys/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO saprykin/plibsys + REF 0.0.4 + SHA512 61957666fb454469e1ff68435463eaf426e960caed33540dbb495e1aa7c446c9803d100f33f1a6ea70d5f2ee2d0d19ec315f3a8c651747f65a186ad061c05e51 + HEAD_REF master + PATCHES + fix_configuration.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PLIBSYS_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPLIBSYS_TESTS=OFF + -DPLIBSYS_COVERAGE=OFF + -DPLIBSYS_BUILD_DOC=OFF + -DPLIBSYS_BUILD_STATIC=${PLIBSYS_STATIC} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() + +configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake @ONLY) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + + diff --git a/vcpkg/ports/plibsys/usage b/vcpkg/ports/plibsys/usage new file mode 100644 index 0000000..e679f1b --- /dev/null +++ b/vcpkg/ports/plibsys/usage @@ -0,0 +1,5 @@ +The package plibsys provides CMake targets: + + find_package(plibsys CONFIG REQUIRED) + target_include_directories(main PRIVATE ${PLIBSYS_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${PLIBSYS_LIBRARIES}) diff --git a/vcpkg/ports/plibsys/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/plibsys/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..acf1ac9 --- /dev/null +++ b/vcpkg/ports/plibsys/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,12 @@ +include(FindPackageHandleStandardArgs) +include(SelectLibraryConfigurations) + +find_path(PLIBSYS_INCLUDE_DIR NAMES plibsys.h HINTS ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} PATH_SUFFIXES plibsys) + +find_library(PLIBSYS_LIBRARY_DEBUG NAMES plibsys plibsysstatic libplibsys NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) +find_library(PLIBSYS_LIBRARY_RELEASE NAMES plibsys plibsysstatic libplibsys NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED) + +select_library_configurations(PLIBSYS) + +set(PLIBSYS_INCLUDE_DIRS ${PLIBSYS_INCLUDE_DIR}) +set(PLIBSYS_LIBRARIES ${PLIBSYS_LIBRARY}) diff --git a/vcpkg/ports/plog/CONTROL b/vcpkg/ports/plog/CONTROL new file mode 100644 index 0000000..8ffd4fd --- /dev/null +++ b/vcpkg/ports/plog/CONTROL @@ -0,0 +1,4 @@ +Source: plog +Version: 1.1.5 +Homepage: https://github.com/SergiusTheBest/plog +Description: Portable, simple and extensible C++ logging library. diff --git a/vcpkg/ports/plog/portfile.cmake b/vcpkg/ports/plog/portfile.cmake new file mode 100644 index 0000000..1d5f36e --- /dev/null +++ b/vcpkg/ports/plog/portfile.cmake @@ -0,0 +1,17 @@ +# Header-only library +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO SergiusTheBest/plog + REF 1.1.5 + SHA512 c16b428e1855c905c486130c8610d043962bedc2b40d1d986c250c8f7fd7139540164a3cbb408ed08298370aa150d5937f358c13ccae2728ce8ea47fa897fd0b + HEAD_REF master +) + +# Put the licence file where vcpkg expects it +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/plog) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/plog/LICENSE ${CURRENT_PACKAGES_DIR}/share/plog/copyright) + +# Copy header files +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.h") diff --git a/vcpkg/ports/plplot/0001-findwxwidgets-fixes.patch b/vcpkg/ports/plplot/0001-findwxwidgets-fixes.patch new file mode 100644 index 0000000..cc30ca5 --- /dev/null +++ b/vcpkg/ports/plplot/0001-findwxwidgets-fixes.patch @@ -0,0 +1,71 @@ +diff --git a/cmake/modules/FindwxWidgets.cmake b/cmake/modules/FindwxWidgets.cmake +index 4d3a2d1..c83d8a6 100644 +--- a/cmake/modules/FindwxWidgets.cmake ++++ b/cmake/modules/FindwxWidgets.cmake +@@ -515,7 +515,14 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") + set(_WX_ARCH _x64) + endif() + endif() +- if(BUILD_SHARED_LIBS) ++ ++ include(SelectLibraryConfigurations) ++ find_library(wxWidgets_LIB_DIR_LIBRARY_RELEASE NAMES wxmsw31u_core) ++ find_library(wxWidgets_LIB_DIR_LIBRARY_DEBUG NAMES wxmsw31ud_core) ++ select_library_configurations(wxWidgets_LIB_DIR) ++ get_filename_component(wxWidgets_LIB_DIR ${wxWidgets_LIB_DIR} DIRECTORY) ++ if(0) ++ if(BUILD_SHARED_LIBS) + find_path(wxWidgets_LIB_DIR + NAMES + msw/wx/setup.h +@@ -554,6 +561,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") + NO_DEFAULT_PATH + ) + endif() ++ endif() + unset(_WX_TOOL) + unset(_WX_TOOLVER) + unset(_WX_ARCH) +@@ -571,7 +579,9 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") + set(wxWidgets_DEFINITIONS WXUSINGDLL) + DBG_MSG_V("detected SHARED/DLL tree WX_LIB_DIR=${WX_LIB_DIR}") + endif() +- ++ if(BUILD_SHARED_LIBS) ++ set(wxWidgets_DEFINITIONS WXUSINGDLL) ++ endif(BUILD_SHARED_LIBS) + # Search for available configuration types. + foreach(CFG mswunivud mswunivd mswud mswd mswunivu mswuniv mswu msw) + set(WX_${CFG}_FOUND FALSE) +@@ -583,6 +593,13 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") + endforeach() + DBG_MSG_V("WX_CONFIGURATION_LIST=${WX_CONFIGURATION_LIST}") + ++ if(CMAKE_BUILD_TYPE STREQUAL "Debug") ++ set(WX_CONFIGURATION "mswud") ++ else() ++ set(WX_CONFIGURATION "mswu") ++ endif() ++ set(WX_${WX_CONFIGURATION}_FOUND TRUE) ++ + if(WX_CONFIGURATION) + set(wxWidgets_FOUND TRUE) + +@@ -616,6 +633,8 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") + WX_GET_NAME_COMPONENTS(${wxWidgets_CONFIGURATION} UNV UCD DBG) + + # Set wxWidgets lib setup include directory. ++ set(wxWidgets_INCLUDE_DIRS "${wxWidgets_ROOT_DIR}/include") ++ if(0) + if(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h) + set(wxWidgets_INCLUDE_DIRS + ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}) +@@ -623,7 +642,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") + DBG_MSG("wxWidgets_FOUND FALSE because ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h does not exists.") + set(wxWidgets_FOUND FALSE) + endif() +- ++ endif() + # Set wxWidgets main include directory. + if(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h) + list(APPEND wxWidgets_INCLUDE_DIRS ${WX_ROOT_DIR}/include) diff --git a/vcpkg/ports/plplot/0002-wxwidgets-dev-fixes.patch b/vcpkg/ports/plplot/0002-wxwidgets-dev-fixes.patch new file mode 100644 index 0000000..707c647 --- /dev/null +++ b/vcpkg/ports/plplot/0002-wxwidgets-dev-fixes.patch @@ -0,0 +1,12 @@ +diff --git a/drivers/wxwidgets_dev.cpp b/drivers/wxwidgets_dev.cpp +index f025bd8..f5881b1 100644 +--- a/drivers/wxwidgets_dev.cpp ++++ b/drivers/wxwidgets_dev.cpp +@@ -31,6 +31,7 @@ + + // Headers needed for Rand + #ifdef WIN32 ++#define _WINSOCKAPI_ + // This include must occur before any other include of stdlib.h due to + // the #define _CRT_RAND_S + #define _CRT_RAND_S diff --git a/vcpkg/ports/plplot/CONTROL b/vcpkg/ports/plplot/CONTROL new file mode 100644 index 0000000..fe5ea0b --- /dev/null +++ b/vcpkg/ports/plplot/CONTROL @@ -0,0 +1,8 @@ +Source: plplot +Version: 5.13.0-8 +Build-Depends: freetype, zlib, libpng, bzip2 +Description: PLplot is a cross-platform software package for creating scientific plots whose (UTF-8) plot symbols and text are limited in practice only by what Unicode-aware system fonts are installed on a user's computer. + +Feature: wxwidgets +Build-Depends: wxwidgets +Description: plplot wxwidgets module \ No newline at end of file diff --git a/vcpkg/ports/plplot/fix_utils.patch b/vcpkg/ports/plplot/fix_utils.patch new file mode 100644 index 0000000..d1d8596 --- /dev/null +++ b/vcpkg/ports/plplot/fix_utils.patch @@ -0,0 +1,23 @@ +diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt +index 59cfe20..b936dad 100644 +--- a/utils/CMakeLists.txt ++++ b/utils/CMakeLists.txt +@@ -75,7 +75,8 @@ add_executable(parity_bit_check parity_bit_check.c) + if(ENABLE_wxwidgets AND NOT OLD_WXWIDGETS) + # Build wxwidgets applications with same wxwidgets compile and link flags + # as used with the PLplot wxwidgets device driver. +- ++ find_package(JPEG REQUIRED) ++ find_package(TIFF REQUIRED) + set(wxPLViewer_SRCS wxplviewer.cpp wxplframe.cpp ${CMAKE_SOURCE_DIR}/drivers/wxwidgets_comms.cpp) + set_source_files_properties(${wxPLViewer_SRCS} + PROPERTIES COMPILE_FLAGS "${wxwidgets_COMPILE_FLAGS}") +@@ -90,7 +91,7 @@ if(ENABLE_wxwidgets AND NOT OLD_WXWIDGETS) + COMPILE_DEFINITIONS "USINGDLL" + ) + endif(BUILD_SHARED_LIBS) +- target_link_libraries(wxPLViewer plplotwxwidgets plplotcxx ${wxwidgets_LINK_FLAGS} ${MATH_LIB} ${RT_LIB}) ++ target_link_libraries(wxPLViewer plplotwxwidgets plplotcxx ${wxwidgets_LINK_FLAGS} ${MATH_LIB} ${RT_LIB} ${JPEG_LIBRARIES} ${TIFF_LIBRARIES}) + + if(USE_RPATH) + # Assume that plplotwxwidgets and plplotcxx have the same install location as plplot diff --git a/vcpkg/ports/plplot/install-interface-include-directories.patch b/vcpkg/ports/plplot/install-interface-include-directories.patch new file mode 100644 index 0000000..3e124b5 --- /dev/null +++ b/vcpkg/ports/plplot/install-interface-include-directories.patch @@ -0,0 +1,13 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index d81b6a7..6b51809 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -181,6 +181,8 @@ include_directories( + add_library(plplot ${plplot_LIB_SRCS}) + add_dependencies(plplot plhershey-unicode.h_built) + ++target_include_directories(plplot INTERFACE $) ++ + # Deal with external libraries. + set(LIB_INSTALL_RPATH ${LIB_DIR}) + set(libplplot_LINK_LIBRARIES) diff --git a/vcpkg/ports/plplot/portfile.cmake b/vcpkg/ports/plplot/portfile.cmake new file mode 100644 index 0000000..97efa25 --- /dev/null +++ b/vcpkg/ports/plplot/portfile.cmake @@ -0,0 +1,67 @@ +set(PLPLOT_VERSION 5.13.0) + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO plplot/plplot + REF ${PLPLOT_VERSION}%20Source + FILENAME "plplot-${PLPLOT_VERSION}.tar.gz" + SHA512 1d5cb5da17d4bde6d675585bff1f8dcb581719249a0b2687867e767703f8dab0870e7ea44b9549a497f4ac0141a3cabf6761c49520c0e2b26ffe581468512cbb + PATCHES + 0001-findwxwidgets-fixes.patch + 0002-wxwidgets-dev-fixes.patch + install-interface-include-directories.patch + use-math-h-nan.patch + fix_utils.patch +) + +set(BUILD_with_wxwidgets OFF) +if("wxwidgets" IN_LIST FEATURES) + set(BUILD_with_wxwidgets ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DENABLE_tcl=OFF + -DPL_HAVE_QHULL=OFF + -DENABLE_qt=OFF + -DPLPLOT_USE_QT5=OFF + -DENABLE_ocaml=OFF + -DPL_DOUBLE=ON + -DPLD_wxwidgets=${BUILD_with_wxwidgets} + -DENABLE_DYNDRIVERS=OFF + -DDATA_DIR=${CURRENT_PACKAGES_DIR}/share/plplot + OPTIONS_DEBUG + -DDRV_DIR=${CURRENT_PACKAGES_DIR}/debug/bin + OPTIONS_RELEASE + -DDRV_DIR=${CURRENT_PACKAGES_DIR}/bin +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/plplot) + +# Remove unnecessary tool +file(REMOVE + ${CURRENT_PACKAGES_DIR}/debug/bin/pltek.exe + ${CURRENT_PACKAGES_DIR}/bin/pltek.exe + ${CURRENT_PACKAGES_DIR}/debug/bin/wxPLViewer.exe + ${CURRENT_PACKAGES_DIR}/bin/wxPLViewer.exe +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message(STATUS "Static build: Removing the full bin directory.") + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/bin + ${CURRENT_PACKAGES_DIR}/bin + ) +endif() + +# Remove unwanted and duplicate directories +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/Copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/plplot/use-math-h-nan.patch b/vcpkg/ports/plplot/use-math-h-nan.patch new file mode 100644 index 0000000..1f39877 --- /dev/null +++ b/vcpkg/ports/plplot/use-math-h-nan.patch @@ -0,0 +1,28 @@ +diff --git "a/lib/csa/nan.h" "b/lib/csa/nan.h" +index 29fd3d2f..7f16e8c8 100644 +--- "a/lib/csa/nan.h" ++++ "b/lib/csa/nan.h" +@@ -19,6 +19,16 @@ + #if !defined ( _NAN_H ) + #define _NAN_H + ++// Try to use the implementation-provided NAN constant: ++ ++#include ++ ++#if defined(NAN) ++ ++#define NaN ((double)NAN) ++ ++#else // ^^^ implementation provides NAN // implementation does not provide NAN vvv ++ + #if ( defined ( __GNUC__ ) && !defined ( __ICC ) ) || defined ( __BORLANDC__ ) + + static const double NaN = 0.0 / 0.0; +@@ -63,4 +73,6 @@ static const long long lNaN = ( (unsigned long long) 1 << 63 ) - 1; + + #endif + ++#endif // defined(NAN) ++ + #endif diff --git a/vcpkg/ports/plustache/CMakeLists.txt b/vcpkg/ports/plustache/CMakeLists.txt new file mode 100644 index 0000000..f9579c0 --- /dev/null +++ b/vcpkg/ports/plustache/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.1 FATAL_ERROR) +project(plustache LANGUAGES CXX) + +find_package(Boost REQUIRED COMPONENTS regex) + +add_library( + plustache + + src/template.cpp + src/context.cpp + ) + + +target_include_directories( + plustache + + PUBLIC + ${CMAKE_CURRENT_LIST_DIR}/include + PRIVATE + ${Boost_INCLUDE_DIRS} +) + +target_link_libraries( + plustache + + PRIVATE + ${Boost_LIBRARIES} +) + + +install(TARGETS plustache + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + ) +install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/include/plustache DESTINATION include) diff --git a/vcpkg/ports/plustache/CONTROL b/vcpkg/ports/plustache/CONTROL new file mode 100644 index 0000000..f01f159 --- /dev/null +++ b/vcpkg/ports/plustache/CONTROL @@ -0,0 +1,4 @@ +Source: plustache +Version: 0.4.0-1 +Description: {{mustaches}} for C++ +Build-Depends: boost-regex, boost-algorithm diff --git a/vcpkg/ports/plustache/portfile.cmake b/vcpkg/ports/plustache/portfile.cmake new file mode 100644 index 0000000..237e1b2 --- /dev/null +++ b/vcpkg/ports/plustache/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mrtazz/plustache + REF 3208529343e1858cfe504041be8c1fa0af0a59d1 + SHA512 8d9ae368b2f276da2faaf4e3b543fc7ded88ebd8fbe33544aa7d85765a38d085d4c31bb68f6a2f73d4f660da1618d187fb94c74a5f6594e7642bf3949707c67b + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +#Debug +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/plustache) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/plustache/LICENSE ${CURRENT_PACKAGES_DIR}/share/plustache/copyright) diff --git a/vcpkg/ports/pmdk/CONTROL b/vcpkg/ports/pmdk/CONTROL new file mode 100644 index 0000000..2c84efb --- /dev/null +++ b/vcpkg/ports/pmdk/CONTROL @@ -0,0 +1,5 @@ +Source: pmdk +Version: 1.9 +Homepage: https://github.com/pmem/pmdk +Description: Persistent Memory Development Kit +Supports: !(arm|x86) \ No newline at end of file diff --git a/vcpkg/ports/pmdk/portfile.cmake b/vcpkg/ports/pmdk/portfile.cmake new file mode 100644 index 0000000..6f436e9 --- /dev/null +++ b/vcpkg/ports/pmdk/portfile.cmake @@ -0,0 +1,58 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) + +vcpkg_fail_port_install(ON_ARCH "arm" "x86") + +set(PMDK_VERSION "1.9") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pmem/pmdk + REF 1926ffb8f3f5f0617b3b3ed32029d437c272f187 #Commit id corresponding to the version 1.9 + SHA512 dc828866291f1c4a6901de5845d21a60eb2c7951c6b5ebc680b309a4e5f7596b0d9bea663f997dff9f08f666124850aecd2219caf12bab571b4c2b63db28ec7f + HEAD_REF master + PATCHES + remove-non-ascii-character.patch +) + +# Build only the selected projects +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/src/PMDK.sln + TARGET "Solution Items\\libpmem,Solution Items\\libpmemlog,Solution Items\\libpmemblk,Solution Items\\libpmemobj,Solution Items\\libpmempool,Solution Items\\Tools\\pmempool" + OPTIONS /p:SRCVERSION=${PMDK_VERSION} +) + +set(DEBUG_ARTIFACTS_PATH ${SOURCE_PATH}/src/x64/Debug) +set(RELEASE_ARTIFACTS_PATH ${SOURCE_PATH}/src/x64/Release) + +# Install header files +file(GLOB HEADER_FILES ${SOURCE_PATH}/src/include/*.h) +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(GLOB HEADER_FILES ${SOURCE_PATH}/src/include/libpmemobj/*.h) +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/libpmemobj) + +# Remove unneeded header files +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/libvmmalloc.h) +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/librpmem.h) + +# Install libraries (debug) +file(GLOB LIB_DEBUG_FILES ${DEBUG_ARTIFACTS_PATH}/libs/libpmem*.lib) +file(INSTALL ${LIB_DEBUG_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libpmemcommon.lib) +file(GLOB LIB_DEBUG_FILES ${DEBUG_ARTIFACTS_PATH}/libs/libpmem*.dll) +file(INSTALL ${LIB_DEBUG_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + +# Install libraries (release) +file(GLOB LIB_RELEASE_FILES ${RELEASE_ARTIFACTS_PATH}/libs/libpmem*.lib) +file(INSTALL ${LIB_RELEASE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/libpmemcommon.lib) +file(GLOB LIB_RELEASE_FILES ${RELEASE_ARTIFACTS_PATH}/libs/libpmem*.dll) +file(INSTALL ${LIB_RELEASE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + +# Install tools (release only) +file(INSTALL ${RELEASE_ARTIFACTS_PATH}/libs/pmempool.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/pmdk) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/pmdk/remove-non-ascii-character.patch b/vcpkg/ports/pmdk/remove-non-ascii-character.patch new file mode 100644 index 0000000..a133bee --- /dev/null +++ b/vcpkg/ports/pmdk/remove-non-ascii-character.patch @@ -0,0 +1,17 @@ +diff --git a/src/libpmemobj/critnib.c b/src/libpmemobj/critnib.c +index 41fec79..f201dbd 100644 +--- a/src/libpmemobj/critnib.c ++++ b/src/libpmemobj/critnib.c +@@ -360,9 +360,9 @@ alloc_leaf(struct critnib *__restrict c) + * crinib_insert -- write a key:value pair to the critnib structure + * + * Returns: +- * • 0 on success +- * • EEXIST if such a key already exists +- * • ENOMEM if we're out of memory ++ * 0 on success ++ * EEXIST if such a key already exists ++ * ENOMEM if we're out of memory + * + * Takes a global write lock but doesn't stall any readers. + */ diff --git a/vcpkg/ports/pngpp/portfile.cmake b/vcpkg/ports/pngpp/portfile.cmake new file mode 100644 index 0000000..1fa23e4 --- /dev/null +++ b/vcpkg/ports/pngpp/portfile.cmake @@ -0,0 +1,15 @@ +# Header only library +vcpkg_download_distfile(ARCHIVE + URLS "http://download.savannah.nongnu.org/releases/pngpp/png++-0.2.10.tar.gz" + FILENAME "png++-0.2.10.tar.gz" + SHA512 c54a74c0c20212bd0dcf86386c0c11dd824ad14952917ba0ff4c184b6547744458728a4f06018371acb7d5b842b641708914ccaa81bad8e72e173903f494ca85 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(GLOB HEADER_FILES ${SOURCE_PATH}/*.hpp) +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/png++) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/pngpp/vcpkg.json b/vcpkg/ports/pngpp/vcpkg.json new file mode 100644 index 0000000..67312ef --- /dev/null +++ b/vcpkg/ports/pngpp/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "pngpp", + "version-string": "0.2.10", + "description": "A C++ wrapper for libpng library.", + "dependencies": [ + "libpng" + ] +} diff --git a/vcpkg/ports/pngwriter/CONTROL b/vcpkg/ports/pngwriter/CONTROL new file mode 100644 index 0000000..286244e --- /dev/null +++ b/vcpkg/ports/pngwriter/CONTROL @@ -0,0 +1,4 @@ +Source: pngwriter +Version: 0.7.0-2 +Build-Depends: zlib, libpng, freetype +Description: PNGwriter is a very easy to use open source graphics library that uses PNG as its output format diff --git a/vcpkg/ports/pngwriter/portfile.cmake b/vcpkg/ports/pngwriter/portfile.cmake new file mode 100644 index 0000000..0679305 --- /dev/null +++ b/vcpkg/ports/pngwriter/portfile.cmake @@ -0,0 +1,25 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pngwriter/pngwriter + REF 0.7.0 + SHA512 3e4ef098e4d715d18844cada64f32dbf079fdd1f7a64b6fe5e19584094f6b2a61f80c53804f936b6eefd7ef9dad4a01a7210b1273939d385a0850e48f8ba6683 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/PNGwriter) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/doc/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/pngwriter RENAME copyright) diff --git a/vcpkg/ports/poco/CONTROL b/vcpkg/ports/poco/CONTROL new file mode 100644 index 0000000..939a749 --- /dev/null +++ b/vcpkg/ports/poco/CONTROL @@ -0,0 +1,22 @@ +Source: poco +Version: 1.9.2 +Port-Version: 4 +Build-Depends: expat, libpq, pcre, sqlite3, zlib, libpng +Description: Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems. +Homepage: https://github.com/pocoproject/poco + +Feature: mysql +Build-Depends: libmysql +Description: Mysql support for POCO + +Feature: mariadb +Build-Depends: libmariadb +Description: MariaDB support for POCO + +Feature: postgresql +Build-Depends: libpqxx +Description: PostgreSQL support for POCO + +Feature: pdf +Build-Depends: libharu +Description: Haru support for POCO diff --git a/vcpkg/ports/poco/arm64_pcre.patch b/vcpkg/ports/poco/arm64_pcre.patch new file mode 100644 index 0000000..faf8ce9 --- /dev/null +++ b/vcpkg/ports/poco/arm64_pcre.patch @@ -0,0 +1,62 @@ +diff --git a/Foundation/include/Poco/Platform.h b/Foundation/include/Poco/Platform.h +index 3f26008..d0bbd31 100644 +--- a/Foundation/include/Poco/Platform.h ++++ b/Foundation/include/Poco/Platform.h +@@ -193,7 +193,7 @@ + #else + #define POCO_ARCH_LITTLE_ENDIAN 1 + #endif +-#elif defined(__arm64__) || defined(__arm64) ++#elif defined(__arm64__) || defined(__arm64) || defined(_M_ARM64) + #define POCO_ARCH POCO_ARCH_ARM64 + #if defined(__ARMEB__) + #define POCO_ARCH_BIG_ENDIAN 1 +diff --git a/Foundation/src/EventLogChannel.cpp b/Foundation/src/EventLogChannel.cpp +index 4d655da..26567c8 100644 +--- a/Foundation/src/EventLogChannel.cpp ++++ b/Foundation/src/EventLogChannel.cpp +@@ -11,6 +11,7 @@ + // SPDX-License-Identifier: BSL-1.0 + // + ++#pragma comment(lib,"advapi32.lib") + + #include "Poco/EventLogChannel.h" + #include "Poco/Message.h" +diff --git a/Foundation/src/utils.h b/Foundation/src/utils.h +index e2b6a06..1b045c1 100644 +--- a/Foundation/src/utils.h ++++ b/Foundation/src/utils.h +@@ -54,7 +54,7 @@ + // disabled.) + // On Linux,x86 89255e-22 != Div_double(89255.0/1e22) + #if defined(_M_X64) || defined(__x86_64__) || \ +- defined(__ARMEL__) || defined(_M_ARM) || defined(__arm__) || defined(__arm64__) || \ ++ defined(__ARMEL__) || defined(_M_ARM) || defined(__arm__) || defined(__arm64__) || defined(_M_ARM64) || \ + defined(__avr32__) || \ + defined(__hppa__) || defined(__ia64__) || \ + defined(__mips__) || \ +diff --git a/Net/src/Net.cpp b/Net/src/Net.cpp +index e81b4b5..36ae436 100644 +--- a/Net/src/Net.cpp ++++ b/Net/src/Net.cpp +@@ -11,6 +11,7 @@ + // SPDX-License-Identifier: BSL-1.0 + // + ++#pragma comment(lib,"advapi32.lib") + + #include "Poco/Net/Net.h" + +diff --git a/Util/src/WinRegistryKey.cpp b/Util/src/WinRegistryKey.cpp +index 4c2ad7d..cf1de17 100644 +--- a/Util/src/WinRegistryKey.cpp ++++ b/Util/src/WinRegistryKey.cpp +@@ -11,6 +11,7 @@ + // SPDX-License-Identifier: BSL-1.0 + // + ++#pragma comment(lib,"advapi32.lib") + + #include "Poco/Util/WinRegistryKey.h" + #include "Poco/Exception.h" diff --git a/vcpkg/ports/poco/find_pcre.patch b/vcpkg/ports/poco/find_pcre.patch new file mode 100644 index 0000000..3b73ae4 --- /dev/null +++ b/vcpkg/ports/poco/find_pcre.patch @@ -0,0 +1,22 @@ +diff --git a/cmake/FindPCRE.cmake b/cmake/FindPCRE.cmake +index 41a99cb..b1acb32 100644 +--- a/cmake/FindPCRE.cmake ++++ b/cmake/FindPCRE.cmake +@@ -14,9 +14,15 @@ ENDIF (PCRE_INCLUDE_DIRS) + + FIND_PATH(PCRE_INCLUDE_DIR pcre.h) + +-SET(PCRE_NAMES pcre) ++if (WIN32) ++include(SelectLibraryConfigurations) ++find_library(PCRE_LIBRARY_RELEASE NAMES pcre) ++find_library(PCRE_LIBRARY_DEBUG NAMES pcred) ++select_library_configurations(PCRE) ++else() ++SET(PCRE_NAMES pcred pcre) + FIND_LIBRARY(PCRE_LIBRARY NAMES ${PCRE_NAMES} ) +- ++endif() + # handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if + # all listed variables are TRUE + INCLUDE(FindPackageHandleStandardArgs) diff --git a/vcpkg/ports/poco/fix_foundation_link.patch b/vcpkg/ports/poco/fix_foundation_link.patch new file mode 100644 index 0000000..c8830ed --- /dev/null +++ b/vcpkg/ports/poco/fix_foundation_link.patch @@ -0,0 +1,24 @@ +diff --git a/Foundation/src/Environment_WIN32.cpp b/Foundation/src/Environment_WIN32.cpp +index 62845fa..edcf6fe 100644 +--- a/Foundation/src/Environment_WIN32.cpp ++++ b/Foundation/src/Environment_WIN32.cpp +@@ -22,6 +22,7 @@ + #include + #include + ++#pragma comment(lib, "IPHLPAPI.lib") + + namespace Poco { + +diff --git a/Foundation/src/Environment_WINCE.cpp b/Foundation/src/Environment_WINCE.cpp +index afa59b6..c43767b 100644 +--- a/Foundation/src/Environment_WINCE.cpp ++++ b/Foundation/src/Environment_WINCE.cpp +@@ -23,6 +23,7 @@ + #include + #include + ++#pragma comment(lib, "IPHLPAPI.lib") + + namespace Poco { + diff --git a/vcpkg/ports/poco/include_pcre.patch b/vcpkg/ports/poco/include_pcre.patch new file mode 100644 index 0000000..5db2372 --- /dev/null +++ b/vcpkg/ports/poco/include_pcre.patch @@ -0,0 +1,12 @@ +diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt +index 26a2365..0b8f7bc 100644 +--- a/Foundation/CMakeLists.txt ++++ b/Foundation/CMakeLists.txt +@@ -168,6 +168,7 @@ target_link_libraries( "${LIBNAME}" ${SYSLIBS}) + target_include_directories( "${LIBNAME}" + PUBLIC + $ ++ $ + $ + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src + ) diff --git a/vcpkg/ports/poco/portfile.cmake b/vcpkg/ports/poco/portfile.cmake new file mode 100644 index 0000000..184db9c --- /dev/null +++ b/vcpkg/ports/poco/portfile.cmake @@ -0,0 +1,152 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pocoproject/poco + REF 8a127d6f16795d914cadc342d3f4f3b9b7999e3b #1.9.2 + SHA512 282097ee2118ac55320ebdde05bb53ed27d68af49c201b0b26027706ef935ae08f8090abb8aab1cafe84c72520ea73b01263b439d32bd2d0bd55319b0634b168 + HEAD_REF master + PATCHES + # Find pcre in debug + find_pcre.patch + # Add include path to public interface for static build + include_pcre.patch + # Fix embedded copy of pcre in static linking mode + static_pcre.patch + # Use vcpkg installed libharu for feature pdf + use-vcpkg-libharu.patch + # Add the support of arm64-windows + arm64_pcre.patch + fix_foundation_link.patch +) + +# define Poco linkage type +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" POCO_STATIC) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" POCO_MT) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + pdf ENABLE_PDF +) + +# MySQL / MariaDDB feature +if("mysql" IN_LIST FEATURES OR "mariadb" IN_LIST FEATURES) + if("mysql" IN_LIST FEATURES) + # enabling MySQL support + set(MYSQL_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include/mysql") + set(MYSQL_LIBRARY "${CURRENT_INSTALLED_DIR}/lib/libmysql.lib") + set(MYSQL_LIBRARY_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib/libmysql.lib") + endif() + if("mariadb" IN_LIST FEATURES) + # enabling MariaDB support + set(MYSQL_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include/mysql") + set(MYSQL_LIBRARY "${CURRENT_INSTALLED_DIR}/lib/libmariadb.lib") + set(MYSQL_LIBRARY_DEBUG "${CURRENT_INSTALLED_DIR}/debug/lib/libmariadb.lib") + endif() +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + #PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + # Set to OFF|ON (default is OFF) to control linking dependencies as external + -DPOCO_UNBUNDLED=ON + # Define linking feature + -DPOCO_STATIC=${POCO_STATIC} + -DPOCO_MT=${POCO_MT} + # Set to OFF|ON (default is OFF) to control build of POCO tests + -DENABLE_TESTS=OFF + # Set to OFF|ON (default is OFF) to control build of POCO samples + -DENABLE_SAMPLES=OFF + # Allow enabling and disabling components + # POCO_ENABLE_SQL_ODBC, POCO_ENABLE_SQL_MYSQL and POCO_ENABLE_SQL_POSTGRESQL are + # defined on the fly if the required librairies are present + -DENABLE_ENCODINGS=ON + -DENABLE_ENCODINGS_COMPILER=ON + -DENABLE_XML=ON + -DENABLE_JSON=ON + -DENABLE_MONGODB=ON + # -DPOCO_ENABLE_SQL_SQLITE=ON # SQLITE are not supported. + -DENABLE_REDIS=ON + -DENABLE_UTIL=ON + -DENABLE_NET=ON + -DENABLE_SEVENZIP=ON + -DENABLE_ZIP=ON + -DENABLE_CPPPARSER=ON + -DENABLE_POCODOC=ON + -DENABLE_PAGECOMPILER=ON + -DENABLE_PAGECOMPILER_FILE2PAGE=ON + # + -DMYSQL_INCLUDE_DIR=${MYSQL_INCLUDE_DIR} + OPTIONS_RELEASE + -DMYSQL_LIB=${MYSQL_LIBRARY} + OPTIONS_DEBUG + -DMYSQL_LIB=${MYSQL_LIBRARY_DEBUG} +) + +vcpkg_install_cmake() + + +# Copy additional include files not part of any libraries +if(EXISTS "${CURRENT_PACKAGES_DIR}/include/Poco/SQL") + file(COPY ${SOURCE_PATH}/Data/include DESTINATION ${CURRENT_PACKAGES_DIR}) +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/include/Poco/SQL/MySQL") + file(COPY ${SOURCE_PATH}/Data/MySQL/include DESTINATION ${CURRENT_PACKAGES_DIR}) +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/include/Poco/SQL/ODBC") + file(COPY ${SOURCE_PATH}/Data/ODBC/include DESTINATION ${CURRENT_PACKAGES_DIR}) +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/include/Poco/SQL/PostgreSQL") + file(COPY ${SOURCE_PATH}/Data/PostgreSQL/include DESTINATION ${CURRENT_PACKAGES_DIR}) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/libpq) +endif() +if(EXISTS "${CURRENT_PACKAGES_DIR}/include/Poco/SQL/SQLite") + file(COPY ${SOURCE_PATH}/Data/SQLite/include DESTINATION ${CURRENT_PACKAGES_DIR}) +endif() + + +# Move apps to the tools folder +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) +if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/cpspc.exe") + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/cpspc.exe ${CURRENT_PACKAGES_DIR}/tools/cpspc.exe) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/f2cpsp.exe ${CURRENT_PACKAGES_DIR}/tools/f2cpsp.exe) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/PocoDoc.exe ${CURRENT_PACKAGES_DIR}/tools/PocoDoc.exe) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/tec.exe ${CURRENT_PACKAGES_DIR}/tools/tec.exe) +else() + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/cpspc ${CURRENT_PACKAGES_DIR}/tools/cpspc) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/f2cpsp ${CURRENT_PACKAGES_DIR}/tools/f2cpsp) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/PocoDoc ${CURRENT_PACKAGES_DIR}/tools/PocoDoc) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/tec ${CURRENT_PACKAGES_DIR}/tools/tec) +endif() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static OR VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/bin) +else() + file(REMOVE + ${CURRENT_PACKAGES_DIR}/bin/cpspc.pdb + ${CURRENT_PACKAGES_DIR}/bin/f2cpsp.pdb + ${CURRENT_PACKAGES_DIR}/bin/PocoDoc.pdb + ${CURRENT_PACKAGES_DIR}/bin/tec.pdb + ${CURRENT_PACKAGES_DIR}/debug/bin/cpspc.exe + ${CURRENT_PACKAGES_DIR}/debug/bin/cpspc.pdb + ${CURRENT_PACKAGES_DIR}/debug/bin/f2cpsp.exe + ${CURRENT_PACKAGES_DIR}/debug/bin/f2cpsp.pdb + ${CURRENT_PACKAGES_DIR}/debug/bin/PocoDoc.exe + ${CURRENT_PACKAGES_DIR}/debug/bin/PocoDoc.pdb + ${CURRENT_PACKAGES_DIR}/debug/bin/tec.exe + ${CURRENT_PACKAGES_DIR}/debug/bin/tec.pdb) +endif() + +if(EXISTS "${CURRENT_PACKAGES_DIR}/cmake") + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +elseif(EXISTS "${CURRENT_PACKAGES_DIR}/lib/cmake/Poco") + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Poco) +endif() + +# remove unused files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# copy license +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/poco/static_pcre.patch b/vcpkg/ports/poco/static_pcre.patch new file mode 100644 index 0000000..a6dab02 --- /dev/null +++ b/vcpkg/ports/poco/static_pcre.patch @@ -0,0 +1,26 @@ +diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt +index 0b8f7bc..c362890 100644 +--- a/Foundation/CMakeLists.txt ++++ b/Foundation/CMakeLists.txt +@@ -53,6 +53,21 @@ if (POCO_UNBUNDLED) + include_directories(${ZLIB_INCLUDE_DIRS}) + + add_definitions(-DPOCO_UNBUNDLED) ++ add_definitions( ++ -D_pcre_utf8_table1=_poco_pcre_utf8_table1 ++ -D_pcre_utf8_table1_size=_poco_pcre_utf8_table1_size ++ -D_pcre_utf8_table2=_poco_pcre_utf8_table2 ++ -D_pcre_utf8_table3=_poco_pcre_utf8_table3 ++ -D_pcre_utf8_table4=_poco_pcre_utf8_table4 ++ -D_pcre_utt_names=_poco_pcre_utt_names ++ -D_pcre_utt=_poco_pcre_utt ++ -D_pcre_utt_size=_poco_pcre_utt_size ++ -D_pcre_OP_lengths=_poco_pcre_OP_lengths ++ -D_pcre_hspace_list=_poco_pcre_hspace_list ++ -D_pcre_vspace_list=_poco_pcre_vspace_list ++ -D_pcre_ucp_gentype=_poco_pcre_ucp_gentype ++ -D_pcre_ucp_gbtable=_poco_pcre_ucp_gbtable ++ ) + + else() + # pcre diff --git a/vcpkg/ports/poco/use-vcpkg-libharu.patch b/vcpkg/ports/poco/use-vcpkg-libharu.patch new file mode 100644 index 0000000..e43b3c9 --- /dev/null +++ b/vcpkg/ports/poco/use-vcpkg-libharu.patch @@ -0,0 +1,18 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5f8a2a6..1ffd0a0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -195,8 +195,11 @@ if(EXISTS ${PROJECT_SOURCE_DIR}/Redis AND ENABLE_REDIS) + add_subdirectory(Redis) + list(APPEND Poco_COMPONENTS "Redis") + endif() +-if(EXISTS ${PROJECT_SOURCE_DIR}/PDF AND ENABLE_PDF) +-add_subdirectory(PDF) ++if(ENABLE_PDF) ++include(SelectLibraryConfigurations) ++find_library(PocoPDF_LIBRARY_RELEASE NAMES libhpdf) ++find_library(PocoPDF_LIBRARY_DEBUG NAMES libhpdfd) ++select_library_configurations(PocoPDF) + list(APPEND Poco_COMPONENTS "PDF") + endif() + diff --git a/vcpkg/ports/podofo/0001-unique_ptr.patch b/vcpkg/ports/podofo/0001-unique_ptr.patch new file mode 100644 index 0000000..5c70e84 --- /dev/null +++ b/vcpkg/ports/podofo/0001-unique_ptr.patch @@ -0,0 +1,198 @@ +diff -ruNp a/src/base/PdfFilter.cpp b/src/base/PdfFilter.cpp +--- a/src/base/PdfFilter.cpp 2016-11-18 20:08:56.000000000 +0100 ++++ b/src/base/PdfFilter.cpp 2019-01-16 10:25:22.934430500 +0100 +@@ -131,7 +131,7 @@ class PdfFilteredEncodeStream : public P + + private: + PdfOutputStream* m_pOutputStream; +- std::auto_ptr m_filter; ++ std::unique_ptr m_filter; + }; + + /** Create a filter that is a PdfOutputStream. +@@ -206,7 +206,7 @@ class PdfFilteredDecodeStream : public P + + private: + PdfOutputStream* m_pOutputStream; +- std::auto_ptr m_filter; ++ std::unique_ptr m_filter; + bool m_bFilterFailed; + }; + +@@ -264,7 +264,7 @@ PdfFilterFactory::PdfFilterFactory() + { + } + +-std::auto_ptr PdfFilterFactory::Create( const EPdfFilter eFilter ) ++std::unique_ptr PdfFilterFactory::Create( const EPdfFilter eFilter ) + { + PdfFilter* pFilter = NULL; + switch( eFilter ) +@@ -316,7 +316,7 @@ std::auto_ptr PdfFilterFactor + break; + } + +- return std::auto_ptr(pFilter); ++ return std::unique_ptr(pFilter); + } + + PdfOutputStream* PdfFilterFactory::CreateEncodeStream( const TVecFilters & filters, PdfOutputStream* pStream ) +diff -ruNp a/src/base/PdfFilter.h b/src/base/PdfFilter.h +--- a/src/base/PdfFilter.h 2016-11-18 20:08:56.000000000 +0100 ++++ b/src/base/PdfFilter.h 2019-01-16 10:25:22.981323900 +0100 +@@ -454,7 +454,7 @@ class PODOFO_API PdfFilterFactory { + public: + /** Create a filter from an enum. + * +- * Ownership is transferred to the caller, who should let the auto_ptr ++ * Ownership is transferred to the caller, who should let the unique_ptr + * the filter is returned in take care of freeing it when they're done + * with it. + * +@@ -463,7 +463,7 @@ class PODOFO_API PdfFilterFactory { + * \returns a new PdfFilter allocated using new, or NULL if no + * filter is available for this type. + */ +- static std::auto_ptr Create( const EPdfFilter eFilter ); ++ static std::unique_ptr Create( const EPdfFilter eFilter ); + + /** Create a PdfOutputStream that applies a list of filters + * on all data written to it. +diff -ruNp a/src/base/PdfMemStream.cpp b/src/base/PdfMemStream.cpp +--- a/src/base/PdfMemStream.cpp 2016-11-18 20:08:56.000000000 +0100 ++++ b/src/base/PdfMemStream.cpp 2019-01-16 10:25:23.479681200 +0100 +@@ -245,7 +245,7 @@ void PdfMemStream::FlateCompressStreamDa + if( !m_lLength ) + return; + +- std::auto_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_FlateDecode ); ++ std::unique_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_FlateDecode ); + if( pFilter.get() ) + { + pFilter->Encode( m_buffer.GetBuffer(), m_buffer.GetSize(), &pBuffer, &lLen ); +diff -ruNp a/src/base/PdfStream.cpp b/src/base/PdfStream.cpp +--- a/src/base/PdfStream.cpp 2016-11-18 20:08:56.000000000 +0100 ++++ b/src/base/PdfStream.cpp 2019-01-16 10:25:24.387075400 +0100 +@@ -91,9 +91,9 @@ void PdfStream::GetFilteredCopy( char** + PdfMemoryOutputStream stream; + if( vecFilters.size() ) + { +- // Use std::auto_ptr so that pDecodeStream is deleted ++ // Use std::unique_ptr so that pDecodeStream is deleted + // even in the case of an exception +- std::auto_ptr pDecodeStream( PdfFilterFactory::CreateDecodeStream( vecFilters, &stream, ++ std::unique_ptr pDecodeStream( PdfFilterFactory::CreateDecodeStream( vecFilters, &stream, + m_pParent ? + &(m_pParent->GetDictionary()) : NULL ) ); + +diff -ruNp a/src/base/PdfString.cpp b/src/base/PdfString.cpp +--- a/src/base/PdfString.cpp 2018-03-10 17:30:53.000000000 +0100 ++++ b/src/base/PdfString.cpp 2019-01-16 10:25:24.480799400 +0100 +@@ -673,7 +673,7 @@ PdfString PdfString::HexEncode() const + return *this; + else + { +- std::auto_ptr pFilter; ++ std::unique_ptr pFilter; + + pdf_long lLen = (m_buffer.GetSize() - 1) << 1; + PdfString str; +@@ -702,7 +702,7 @@ PdfString PdfString::HexDecode() const + return *this; + else + { +- std::auto_ptr pFilter; ++ std::unique_ptr pFilter; + + pdf_long lLen = m_buffer.GetSize() >> 1; + PdfString str; +diff -ruNp a/src/doc/PdfFont.cpp b/src/doc/PdfFont.cpp +--- a/src/doc/PdfFont.cpp 2016-05-13 16:04:34.000000000 +0200 ++++ b/src/doc/PdfFont.cpp 2019-01-16 10:25:26.372048300 +0100 +@@ -145,7 +145,7 @@ void PdfFont::WriteStringToStream( const + pdf_long lLen = 0; + char* pBuffer = NULL; + +- std::auto_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_ASCIIHexDecode ); ++ std::unique_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_ASCIIHexDecode ); + pFilter->Encode( buffer.GetBuffer(), buffer.GetSize(), &pBuffer, &lLen ); + + pStream->Append( "<", 1 ); +diff -ruNp a/src/doc/PdfPainter.cpp b/src/doc/PdfPainter.cpp +--- a/src/doc/PdfPainter.cpp 2018-03-06 15:04:03.000000000 +0100 ++++ b/src/doc/PdfPainter.cpp 2019-01-16 10:25:28.512159900 +0100 +@@ -829,7 +829,7 @@ void PdfPainter::DrawText( double dX, do + + /* + char* pBuffer; +- std::auto_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_ASCIIHexDecode ); ++ std::unique_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_ASCIIHexDecode ); + pFilter->Encode( sString.GetString(), sString.GetLength(), &pBuffer, &lLen ); + + m_pCanvas->Append( pBuffer, lLen ); +diff -ruNp a/test/CreationTest/CreationTest.cpp b/test/CreationTest/CreationTest.cpp +--- a/test/CreationTest/CreationTest.cpp 2018-02-25 12:48:38.000000000 +0100 ++++ b/test/CreationTest/CreationTest.cpp 2019-01-16 10:25:29.605315700 +0100 +@@ -37,7 +37,7 @@ void WriteStringToStream( const PdfStrin + pdf_long lLen = 0; + char* pBuffer = NULL; + +- std::auto_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_ASCIIHexDecode ); ++ std::unique_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_ASCIIHexDecode ); + pFilter->Encode( buffer.GetBuffer(), buffer.GetSize(), &pBuffer, &lLen ); + + oss << "<"; +diff -ruNp a/test/FilterTest/FilterTest.cpp b/test/FilterTest/FilterTest.cpp +--- a/test/FilterTest/FilterTest.cpp 2018-03-10 15:06:27.000000000 +0100 ++++ b/test/FilterTest/FilterTest.cpp 2019-01-16 10:25:29.777214800 +0100 +@@ -57,7 +57,7 @@ void test_filter( EPdfFilter eFilter, co + pdf_long lEncoded; + pdf_long lDecoded; + +- std::auto_ptr pFilter = PdfFilterFactory::Create( eFilter ); ++ std::unique_ptr pFilter = PdfFilterFactory::Create( eFilter ); + if( !pFilter.get() ) + { + printf("!!! Filter %i not implemented.\n", eFilter); +@@ -256,7 +256,7 @@ int main() + char* pLargeBuffer2 = static_cast(malloc( strlen(pszInputAscii85Lzw) * 6 )); + + try { +- std::auto_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_ASCII85Decode ); ++ std::unique_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_ASCII85Decode ); + pFilter->Decode( pszInputAscii85Lzw, strlen(pszInputAscii85Lzw), + &pLargeBuffer1, &lLargeBufer1 ); + pFilter->Encode( pLargeBuffer1, lLargeBufer1, +diff -ruNp a/test/VariantTest/VariantTest.cpp b/test/VariantTest/VariantTest.cpp +--- a/test/VariantTest/VariantTest.cpp 2010-10-21 19:09:00.000000000 +0200 ++++ b/test/VariantTest/VariantTest.cpp 2019-01-16 10:25:32.418465600 +0100 +@@ -124,7 +124,7 @@ int main() + printf("This test tests the PdfVariant class.\n"); + printf("---\n"); + +- std::auto_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_ASCIIHexDecode ); ++ std::unique_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_ASCIIHexDecode ); + + // testing strings + TEST_SAFE_OP( Test( "(Hallo Welt!)", ePdfDataType_String ) ); +diff -ruNp a/test/unit/FilterTest.cpp b/test/unit/FilterTest.cpp +--- a/test/unit/FilterTest.cpp 2016-05-12 22:25:45.000000000 +0200 ++++ b/test/unit/FilterTest.cpp 2019-01-16 10:25:31.464162600 +0100 +@@ -59,7 +59,7 @@ void FilterTest::TestFilter( EPdfFilter + pdf_long lEncoded; + pdf_long lDecoded; + +- std::auto_ptr pFilter = PdfFilterFactory::Create( eFilter ); ++ std::unique_ptr pFilter = PdfFilterFactory::Create( eFilter ); + if( !pFilter.get() ) + { + printf("!!! Filter %i not implemented.\n", eFilter); +@@ -123,7 +123,7 @@ void FilterTest::testFilters() + + void FilterTest::testCCITT() + { +- std::auto_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_CCITTFaxDecode ); ++ std::unique_ptr pFilter = PdfFilterFactory::Create( ePdfFilter_CCITTFaxDecode ); + if( !pFilter.get() ) + { + printf("!!! ePdfFilter_CCITTFaxDecode not implemented skipping test!\n"); diff --git a/vcpkg/ports/podofo/0002-HAVE_UNISTD_H.patch b/vcpkg/ports/podofo/0002-HAVE_UNISTD_H.patch new file mode 100644 index 0000000..6aed4b2 --- /dev/null +++ b/vcpkg/ports/podofo/0002-HAVE_UNISTD_H.patch @@ -0,0 +1,15 @@ +diff --git a/podofo_config.h.in b/podofo_config.h.in +index fea9ada..a813c7b 100644 +--- a/podofo_config.h.in ++++ b/podofo_config.h.in +@@ -59,3 +59,10 @@ + #cmakedefine PODOFO_HAVE_OPENSSL_NO_RC4 + #cmakedefine PODOFO_HAVE_LIBIDN + #cmakedefine PODOFO_HAVE_UNISTRING_LIB ++ ++/* Fix build for MacOS 10.13 */ ++#if defined(__APPLE__) && !defined(__IOS__) ++#cmakedefine01 HAVE_UNISTD_H ++#else ++#cmakedefine HAVE_UNISTD_H ++#endif diff --git a/vcpkg/ports/podofo/0003-uwp_fix.patch b/vcpkg/ports/podofo/0003-uwp_fix.patch new file mode 100644 index 0000000..91872d7 --- /dev/null +++ b/vcpkg/ports/podofo/0003-uwp_fix.patch @@ -0,0 +1,15 @@ +diff --git a/src/base/PdfCompilerCompat.h b/src/base/PdfCompilerCompat.h +index 706875f..8efb349 100644 +--- a/src/base/PdfCompilerCompat.h ++++ b/src/base/PdfCompilerCompat.h +@@ -113,6 +113,10 @@ + #define NOMINMAX + #endif + ++#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) ++#include ++#endif ++ + // Integer types - fixed size types guaranteed to work anywhere + // because we detect the right underlying type name to use with + // CMake. Use typedefs rather than macros for saner error messages diff --git a/vcpkg/ports/podofo/CONTROL b/vcpkg/ports/podofo/CONTROL new file mode 100644 index 0000000..933f736 --- /dev/null +++ b/vcpkg/ports/podofo/CONTROL @@ -0,0 +1,10 @@ +Source: podofo +Version: 0.9.6 +Port-Version: 12 +Homepage: https://sourceforge.net/projects/podofo/ +Description: PoDoFo is a library to work with the PDF file format +Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openssl, freetype + +Feature: fontconfig +Description: Enable font manager support on Unix platforms. +Build-Depends: fontconfig diff --git a/vcpkg/ports/podofo/freetype.patch b/vcpkg/ports/podofo/freetype.patch new file mode 100644 index 0000000..f241690 --- /dev/null +++ b/vcpkg/ports/podofo/freetype.patch @@ -0,0 +1,18 @@ +diff --git a/cmake/modules/FindFREETYPE.cmake b/cmake/modules/FindFREETYPE.cmake +index 41114798f..0911dc092 100644 +--- a/cmake/modules/FindFREETYPE.cmake ++++ b/cmake/modules/FindFREETYPE.cmake +@@ -15,9 +15,13 @@ SET(FREETYPE_FIND_QUIETLY 1) + # first we try to find ft2build.h in the new location as + # of freetype 2.5.1 + FIND_PATH(FREETYPE_INCLUDE_DIR_FT2BUILD ft2build.h ++ PATHS + /usr/include/freetype2 + /usr/local/include/freetype2 + /usr/X11/include/freetype2 ++ PATH_SUFFIXES ++ freetype2 ++ include/freetype2 + NO_CMAKE_SYSTEM_PATH + ) + diff --git a/vcpkg/ports/podofo/portfile.cmake b/vcpkg/ports/podofo/portfile.cmake new file mode 100644 index 0000000..36bd2c4 --- /dev/null +++ b/vcpkg/ports/podofo/portfile.cmake @@ -0,0 +1,55 @@ +set(PODOFO_VERSION 0.9.6) + +if (VCPKG_TARGET_IS_UWP) + set(ADDITIONAL_PATCH "0003-uwp_fix.patch") +endif() + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO podofo/podofo + REF ${PODOFO_VERSION} + FILENAME "podofo-${PODOFO_VERSION}.tar.gz" + SHA512 35c1a457758768bdadc93632385f6b9214824fead279f1b85420443fb2135837cefca9ced476df0d47066f060e9150e12fcd40f60fa1606b177da433feb20130 + PATCHES + 0001-unique_ptr.patch + 0002-HAVE_UNISTD_H.patch + freetype.patch + ${ADDITIONAL_PATCH} +) + +set(PODOFO_NO_FONTMANAGER ON) +if("fontconfig" IN_LIST FEATURES) + set(PODOFO_NO_FONTMANAGER OFF) +endif() + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" PODOFO_BUILD_SHARED) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PODOFO_BUILD_STATIC) + +set(IS_WIN32 OFF) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) + set(IS_WIN32 ON) +endif() + +file(REMOVE ${SOURCE_PATH}/cmake/modules/FindOpenSSL.cmake) +file(REMOVE ${SOURCE_PATH}/cmake/modules/FindZLIB.cmake) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPODOFO_BUILD_LIB_ONLY=1 + -DPODOFO_BUILD_SHARED=${PODOFO_BUILD_SHARED} + -DPODOFO_BUILD_STATIC=${PODOFO_BUILD_STATIC} + -DPODOFO_NO_FONTMANAGER=${PODOFO_NO_FONTMANAGER} + -DCMAKE_DISABLE_FIND_PACKAGE_FONTCONFIG=${PODOFO_NO_FONTMANAGER} + -DCMAKE_DISABLE_FIND_PACKAGE_LIBCRYPTO=${IS_WIN32} + -DCMAKE_DISABLE_FIND_PACKAGE_LIBIDN=ON + -DCMAKE_DISABLE_FIND_PACKAGE_CppUnit=ON + -DCMAKE_DISABLE_FIND_PACKAGE_Boost=ON +) + +vcpkg_install_cmake() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/poly2tri/CMakeLists.txt b/vcpkg/ports/poly2tri/CMakeLists.txt new file mode 100644 index 0000000..d387871 --- /dev/null +++ b/vcpkg/ports/poly2tri/CMakeLists.txt @@ -0,0 +1,57 @@ +cmake_minimum_required(VERSION 3.0) + +project(poly2tri LANGUAGES C CXX) + +set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed") +set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed") +set(INSTALL_INCLUDE_DIR "include/${PROJECT_NAME}" CACHE PATH "Path where headers will be installed") +set(INSTALL_CMAKE_DIR "share/${PROJECT_NAME}" CACHE PATH "Path where cmake configs will be installed") + +set(${PROJECT_NAME}_HEADERS + "poly2tri/poly2tri.h" +) + +set(${PROJECT_NAME}_COMMON_HEADERS + "poly2tri/common/shapes.h" + "poly2tri/common/utils.h" +) + +set(${PROJECT_NAME}_SWEEP_HEADERS + "poly2tri/sweep/advancing_front.h" + "poly2tri/sweep/cdt.h" + "poly2tri/sweep/sweep.h" + "poly2tri/sweep/sweep_context.h" +) + +set(${PROJECT_NAME}_SOURCES + "poly2tri/common/shapes.cc" + "poly2tri/sweep/advancing_front.cc" + "poly2tri/sweep/cdt.cc" + "poly2tri/sweep/sweep.cc" + "poly2tri/sweep/sweep_context.cc" +) + +add_library(${PROJECT_NAME} "${${PROJECT_NAME}_HEADERS}" "${${PROJECT_NAME}_COMMON_HEADERS}" "${${PROJECT_NAME}_SWEEP_HEADERS}" "${${PROJECT_NAME}_SOURCES}") +set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "${${PROJECT_NAME}_HEADERS}") +target_include_directories(${PROJECT_NAME} PUBLIC + $ + $ + $ +) + +install(FILES ${${PROJECT_NAME}_COMMON_HEADERS} DESTINATION "${INSTALL_INCLUDE_DIR}/common") +install(FILES ${${PROJECT_NAME}_SWEEP_HEADERS} DESTINATION "${INSTALL_INCLUDE_DIR}/sweep") + +install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Targets + RUNTIME DESTINATION "${INSTALL_BIN_DIR}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + PUBLIC_HEADER DESTINATION "${INSTALL_INCLUDE_DIR}" + COMPONENT dev +) + +install (EXPORT ${PROJECT_NAME}Targets + FILE ${PROJECT_NAME}Config.cmake + NAMESPACE ${PROJECT_NAME}:: + DESTINATION "${INSTALL_CMAKE_DIR}" +) diff --git a/vcpkg/ports/poly2tri/CONTROL b/vcpkg/ports/poly2tri/CONTROL new file mode 100644 index 0000000..21ed149 --- /dev/null +++ b/vcpkg/ports/poly2tri/CONTROL @@ -0,0 +1,5 @@ +Source: poly2tri +Version: 2020-07-21 +Homepage: https://github.com/greenm01/poly2tri +Description: The Clipper library performs clipping and offsetting for both lines and polygons. All four boolean clipping operations are supported - intersection, union, difference and exclusive-or. Polygons can be of any shape including self-intersecting polygons. +Supports: !uwp diff --git a/vcpkg/ports/poly2tri/portfile.cmake b/vcpkg/ports/poly2tri/portfile.cmake new file mode 100644 index 0000000..278e3d8 --- /dev/null +++ b/vcpkg/ports/poly2tri/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO greenm01/poly2tri + REF 88de49021b6d9bef6faa1bc94ceb3fbd85c3c204 + SHA512 fa256bcf923ad59f42205edf5a7e07cac6cbd9a37cefb9a0961a2e06aea7fa8ffd09d4e26154c0028601c12804483842cb935d9f602385f5f203c9628382c4fb + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/polyclipping/CONTROL b/vcpkg/ports/polyclipping/CONTROL new file mode 100644 index 0000000..6ae3575 --- /dev/null +++ b/vcpkg/ports/polyclipping/CONTROL @@ -0,0 +1,5 @@ +Source: polyclipping +Version: 6.4.2 +Port-Version: 6 +Homepage: https://sourceforge.net/projects/polyclipping/ +Description: The Clipper library performs clipping and offsetting for both lines and polygons. All four boolean clipping operations are supported - intersection, union, difference and exclusive-or. Polygons can be of any shape including self-intersecting polygons. diff --git a/vcpkg/ports/polyclipping/FindCLIPPER.cmake b/vcpkg/ports/polyclipping/FindCLIPPER.cmake new file mode 100644 index 0000000..5a1fcab --- /dev/null +++ b/vcpkg/ports/polyclipping/FindCLIPPER.cmake @@ -0,0 +1,45 @@ +# Distributed under the OSI-approved BSD 3-Clause License. + +#.rst: +# FindCLIPPER +# -------- +# +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# This module will set the following variables in your project:: +# +# ``CLIPPER_FOUND`` +# True if CLIPPER found on the local system +# +# ``CLIPPER_INCLUDE_DIRS`` +# Location of CLIPPER header files. +# +# ``CLIPPER_LIBRARIES`` +# The clipper libraries. +# + +include(FindPackageHandleStandardArgs) +include(SelectLibraryConfigurations) + +if(NOT CLIPPER_INCLUDE_DIR) + find_path(CLIPPER_INCLUDE_DIR clipper.hpp + PATH_SUFFIXES polyclipping) +endif() + +if(NOT CLIPPER_LIBRARY) + find_library(CLIPPER_LIBRARY_RELEASE NAMES polyclipping PATHS "${CMAKE_CURRENT_LIST_DIR}/../../lib" NO_DEFAULT_PATH) + find_library(CLIPPER_LIBRARY_DEBUG NAMES polyclipping PATHS "${CMAKE_CURRENT_LIST_DIR}/../../debug/lib" NO_DEFAULT_PATH) + select_library_configurations(CLIPPER) +endif() + +mark_as_advanced(CLIPPER_LIBRARY CLIPPER_INCLUDE_DIR) + +find_package_handle_standard_args(CLIPPER + REQUIRED_VARS CLIPPER_LIBRARY CLIPPER_INCLUDE_DIR +) + +if(CLIPPER_FOUND) + set(CLIPPER_LIBRARIES ${CLIPPER_LIBRARY}) + set(CLIPPER_INCLUDE_DIRS ${CLIPPER_INCLUDE_DIR}) +endif() diff --git a/vcpkg/ports/polyclipping/fix_targets.patch b/vcpkg/ports/polyclipping/fix_targets.patch new file mode 100644 index 0000000..ebae8f6 --- /dev/null +++ b/vcpkg/ports/polyclipping/fix_targets.patch @@ -0,0 +1,17 @@ +diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt +index f0ed7e8..a5ed444 100644 +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -19,3 +19,12 @@ INSTALL (TARGETS polyclipping LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") + INSTALL (FILES "${PCFILE}" DESTINATION "${CMAKE_INSTALL_PKGCONFIGDIR}") + + SET_TARGET_PROPERTIES(polyclipping PROPERTIES VERSION 22.0.0 SOVERSION 22 ) ++ ++install(TARGETS polyclipping EXPORT polyclippingConfig) ++ ++install( ++ EXPORT polyclippingConfig ++ NAMESPACE polyclipping:: ++ DESTINATION share/polyclipping ++) ++target_include_directories(polyclipping PUBLIC $) diff --git a/vcpkg/ports/polyclipping/portfile.cmake b/vcpkg/ports/polyclipping/portfile.cmake new file mode 100644 index 0000000..8eb73a6 --- /dev/null +++ b/vcpkg/ports/polyclipping/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO polyclipping + FILENAME "clipper_ver6.4.2.zip" + NO_REMOVE_ONE_LEVEL + SHA512 ffc88818c44a38aa278d5010db6cfd505796f39664919f1e48c7fa9267563f62135868993e88f7246dcd688241d1172878e4a008a390648acb99738452e3e5dd + PATCHES + fix_targets.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/cpp + PREFER_NINJA +) + + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/FindCLIPPER.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/clipper) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/clipper) + +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/polyclipping/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/polyclipping/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..bd89342 --- /dev/null +++ b/vcpkg/ports/polyclipping/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,10 @@ +list(REMOVE_ITEM ARGS "NO_MODULE") +list(REMOVE_ITEM ARGS "CONFIG") +list(REMOVE_ITEM ARGS "MODULE") + +set(clipper_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${clipper_PREV_MODULE_PATH}) diff --git a/vcpkg/ports/polyhook2/CONTROL b/vcpkg/ports/polyhook2/CONTROL new file mode 100644 index 0000000..753b775 --- /dev/null +++ b/vcpkg/ports/polyhook2/CONTROL @@ -0,0 +1,30 @@ +Source: polyhook2 +Version: 2020-09-22 +Homepage: https://github.com/stevemk14ebr/PolyHook_2_0 +Description: C++17, x86/x64 Hooking Libary v2.0 +Supports: !(arm|uwp|linux|osx) +Default-Features: capstone,zydis,exception,detours,inlinentd,pe,virtuals + +Feature: capstone +Build-Depends: capstone[x86] +Description: Capstone disassembler integration. + +Feature: zydis +Build-Depends: zydis +Description: Zydis disassembler integration. + +Feature: exception +Description: Implement all exception hooking functionality + +Feature: detours +Description: Implement detour functionality + +Feature: inlinentd +Build-Depends: asmjit +Description: Support inline hooks without specifying typedefs by generating callback stubs at runtime with AsmJit + +Feature: pe +Description: Implement all win pe hooking functionality + +Feature: virtuals +Description: Implement all virtual table hooking functionality diff --git a/vcpkg/ports/polyhook2/portfile.cmake b/vcpkg/ports/polyhook2/portfile.cmake new file mode 100644 index 0000000..a7a86e5 --- /dev/null +++ b/vcpkg/ports/polyhook2/portfile.cmake @@ -0,0 +1,52 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "Linux" "OSX" "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO stevemk14ebr/PolyHook_2_0 + REF 99a4b7da142f35380564f462e537f4fe04e5b5f0 + SHA512 2a8e77344deffe5ca345dd6102b92b9154c3c7d36f2b99cfa3bae96cf37078dc9cdeae671f82bfef5d98bbb72507dc39ae569e7b8bcb9698d8bc787dca438d83 + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + capstone POLYHOOK_DISASM_CAPSTONE + zydis POLYHOOK_DISASM_ZYDIS + exception POLYHOOK_FEATURE_EXCEPTION + detours POLYHOOK_FEATURE_DETOURS + inlinentd POLYHOOK_FEATURE_INLINENTD + pe POLYHOOK_FEATURE_PE + virtuals POLYHOOK_FEATURE_VIRTUALS +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(BUILD_SHARED_LIB OFF) +else() + set(BUILD_SHARED_LIB ON) +endif() + +if (VCPKG_CRT_LINKAGE STREQUAL "static") + set(BUILD_STATIC_RUNTIME ON) +else() + set(BUILD_STATIC_RUNTIME OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DPOLYHOOK_BUILD_SHARED_LIB=${BUILD_SHARED_LIB} + -DPOLYHOOK_BUILD_STATIC_RUNTIME=${BUILD_STATIC_RUNTIME} + -DPOLYHOOK_USE_EXTERNAL_ASMJIT=ON + -DPOLYHOOK_USE_EXTERNAL_CAPSTONE=ON + -DPOLYHOOK_USE_EXTERNAL_ZYDIS=ON +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/PolyHook_2 TARGET_PATH share/PolyHook_2) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/polymorphic-value/001_no_catch_submodule.patch b/vcpkg/ports/polymorphic-value/001_no_catch_submodule.patch new file mode 100644 index 0000000..8fec58a --- /dev/null +++ b/vcpkg/ports/polymorphic-value/001_no_catch_submodule.patch @@ -0,0 +1,33 @@ +diff --git C:/Users/Charles Barto/Source/vcpkg/buildtrees/polymorphic-value/src/1.3.0-33dc249788/CMakeLists.txt C:/Users/Charles Barto/patched_list.txt +index 2819bf6a4..0ee5fba76 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,9 +9,9 @@ set(POLYMOPHIC_VALUE_VERSION "1.3.0") # Revision 3, see paper p0201r3 + project(polymorphic_value VERSION ${POLYMOPHIC_VALUE_VERSION}) + + option(ENABLE_SANITIZERS "Enable Address Sanitizer and Undefined Behaviour Sanitizer if available" OFF) +- ++if(BUILD_TESTING) + add_subdirectory(externals/catch) +- ++endif() + add_library(polymorphic_value INTERFACE) + target_include_directories(polymorphic_value + INTERFACE +@@ -45,6 +45,7 @@ target_compile_features(polymorphic_value + add_library(polymorphic_value::polymorphic_value ALIAS polymorphic_value) + + if(POLYMORPHIC_IS_NOT_SUBPROJECT) ++ if(BUILD_TESTING) + add_executable(test_polymorphic_value test_polymorphic_value.cpp) + target_link_libraries(test_polymorphic_value + PRIVATE +@@ -107,7 +108,7 @@ if(POLYMORPHIC_IS_NOT_SUBPROJECT) + list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/externals/catch/contrib) + include(Catch) + catch_discover_tests(test_polymorphic_value) +- ++ endif() + install( + FILES + "${CMAKE_CURRENT_SOURCE_DIR}/polymorphic_value.h" diff --git a/vcpkg/ports/polymorphic-value/002_fixed_config.patch b/vcpkg/ports/polymorphic-value/002_fixed_config.patch new file mode 100644 index 0000000..77a99b0 --- /dev/null +++ b/vcpkg/ports/polymorphic-value/002_fixed_config.patch @@ -0,0 +1,14 @@ +diff --git a/./broken_config.cmake.in b/./fixed_config.cmake.in +index e64f8a20f..38c441451 100644 +--- a/polymorphic_value-config.cmake.in ++++ b/polymorphic_value-config.cmake.in +@@ -1,5 +1,7 @@ + @PACKAGE_INIT@ + +-set_and_check(POLYMORPHIC_VALUE_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") + +-check_required_components(Foo) ++ ++check_required_components(polymorphic_value) ++ ++include(${CMAKE_CURRENT_LIST_DIR}/polymorphic_value-target.cmake) diff --git a/vcpkg/ports/polymorphic-value/CONTROL b/vcpkg/ports/polymorphic-value/CONTROL new file mode 100644 index 0000000..1016ead --- /dev/null +++ b/vcpkg/ports/polymorphic-value/CONTROL @@ -0,0 +1,4 @@ +Source: polymorphic-value +Version: 1.3.0-1 +Description: A polymorphic value-type for C++ +Homepage: https://github.com/jbcoe/polymorphic_value diff --git a/vcpkg/ports/polymorphic-value/portfile.cmake b/vcpkg/ports/polymorphic-value/portfile.cmake new file mode 100644 index 0000000..5a03c82 --- /dev/null +++ b/vcpkg/ports/polymorphic-value/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jbcoe/polymorphic_value + REF 1.3.0 + SHA512 67d49933c46d2a2bccb68c65c6f28b92603e193c68ff434b2c6b1602a573855a176fc98227d85cd24a64ae9299461adb42e792b4f165482bb250488620161742 + HEAD_REF master + PATCHES 001_no_catch_submodule.patch + 002_fixed_config.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() +if(VCPKG_HEAD_VERSION) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/polymorphic_value TARGET_PATH share/polymorphic_value) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/polymorphic_value) + file(REMOVE "${CURRENT_PACKAGES_DIR}/LICENSE.txt") +endif() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") +file( + INSTALL ${SOURCE_PATH}/LICENSE.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) + diff --git a/vcpkg/ports/ponder/CONTROL b/vcpkg/ports/ponder/CONTROL new file mode 100644 index 0000000..6efa617 --- /dev/null +++ b/vcpkg/ports/ponder/CONTROL @@ -0,0 +1,4 @@ +Source: ponder +Version: 3.0.0-1 +Description: A C++ multi-purpose reflection library. +Homepage: https://github.com/billyquith/ponder diff --git a/vcpkg/ports/ponder/github-121.patch b/vcpkg/ports/ponder/github-121.patch new file mode 100644 index 0000000..e756442 --- /dev/null +++ b/vcpkg/ports/ponder/github-121.patch @@ -0,0 +1,21 @@ +From 83b292f263b92082e981a82f5777d927a61772ee Mon Sep 17 00:00:00 2001 +From: Cheney-Wang +Date: Fri, 13 Mar 2020 02:50:33 -0700 +Subject: [PATCH] Include in config.h + +--- + include/ponder/config.hpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/ponder/config.hpp b/include/ponder/config.hpp +index cd035c19..814403cd 100644 +--- a/include/ponder/config.hpp ++++ b/include/ponder/config.hpp +@@ -60,6 +60,7 @@ + #if defined(_MSC_VER) + #pragma warning(disable: 4275) // non dll-interface class 'X' used as base for dll-interface class 'Y' + #pragma warning(disable: 4251) // class 'X' needs to have dll-interface to be used by clients of class 'Y' ++ #include //In future MSVC, doesn't transitively , ponder will compile failed with error C2027 and C2065, so add for fixing these issues. + #endif + + #if defined(__GNUC__) && __GNUC__ <= 4 && __GNUC_MINOR__ < 9 diff --git a/vcpkg/ports/ponder/no-install-unused.patch b/vcpkg/ports/ponder/no-install-unused.patch new file mode 100644 index 0000000..e540dd9 --- /dev/null +++ b/vcpkg/ports/ponder/no-install-unused.patch @@ -0,0 +1,27 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 091f56d..715f86e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -325,14 +325,14 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/PonderConfig.cmake ${CMAKE_CURRENT_BIN + COMPONENT devel + ) + +-install(FILES README.md COPYING.txt +- DESTINATION ${INSTALL_MISC_DIR} +-) +- +-install(DIRECTORY cmake +- DESTINATION ${INSTALL_MISC_DIR} +- COMPONENT utils +-) ++#install(FILES README.md COPYING.txt ++# DESTINATION ${INSTALL_MISC_DIR} ++#) ++ ++#install(DIRECTORY cmake ++# DESTINATION ${INSTALL_MISC_DIR} ++# COMPONENT utils ++#) + + ############################### + # packaging diff --git a/vcpkg/ports/ponder/portfile.cmake b/vcpkg/ports/ponder/portfile.cmake new file mode 100644 index 0000000..5c800cd --- /dev/null +++ b/vcpkg/ports/ponder/portfile.cmake @@ -0,0 +1,38 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO billyquith/ponder + REF 3.0.0 + SHA512 b6ba1ce9fa0584b16085c56afb70e31f204a66b57193c1a4225bfe18abbda561bb71b3279dd0a4f1b21867b985ef5ce78c8e360f3fc654c61ce61c44d35c5f38 + HEAD_REF master + PATCHES + no-install-unused.patch + github-121.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DUSES_RAPIDJSON=OFF + -DUSES_RAPIDXML=OFF + -DBUILD_TEST=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/${PORT}/cmake) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/lib/${PORT} + ${CURRENT_PACKAGES_DIR}/lib/${PORT}) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(READ ${CURRENT_PACKAGES_DIR}/include/${PORT}/config.hpp _contents) + string(REPLACE "ifndef PONDER_STATIC" "if 0 //ifndef PONDER_STATIC" _contents "${_contents}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/${PORT}/config.hpp "${_contents}") +endif() + +# Handle copyright +configure_file(${SOURCE_PATH}/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/portable-snippets/CMakeLists.txt b/vcpkg/ports/portable-snippets/CMakeLists.txt new file mode 100644 index 0000000..5f51126 --- /dev/null +++ b/vcpkg/ports/portable-snippets/CMakeLists.txt @@ -0,0 +1,96 @@ +cmake_minimum_required(VERSION 3.14) + +project(portable-snippets LANGUAGES C) + +include(GNUInstallDirs) + +option(PSNIP_INSTALL_HEADERS "Install header files" ON) + +# https://stackoverflow.com/questions/7787823/cmake-how-to-get-the-name-of-all-subdirectories-of-a-directory +function (list_subdir output_variable path) + file(GLOB sub_entries RELATIVE ${path} ${path}/*) + + set(dirlist "") + + foreach (entry ${sub_entries}) + if (IS_DIRECTORY ${path}/${entry}) + list(APPEND dirlist ${entry}) + endif () + endforeach () + + set(${output_variable} ${dirlist} PARENT_SCOPE) +endfunction () + +function (check_if_header_only output_variable files) + set(is_header_only 1) + + foreach (entry ${files}) + get_filename_component(file_ext ${entry} EXT) + if (file_ext STREQUAL .c) + set(is_header_only 0) + endif () + endforeach () + + set(${output_variable} ${is_header_only} PARENT_SCOPE) +endfunction () + +list_subdir(subdirs ${CMAKE_CURRENT_LIST_DIR}) +list(REMOVE_ITEM subdirs tests) + +set(namespace unofficial::portable-snippets) + +foreach (subdir ${subdirs}) + set(module ${subdir}) + set(module_path "${CMAKE_CURRENT_LIST_DIR}/${subdir}") + + file(GLOB entries + LIST_DIRECTORIES false + ${module_path}/*.h + ${module_path}/*.c + ) + + check_if_header_only(header_only "${entries}") + + if (header_only) + add_library(${module} INTERFACE) + + target_include_directories( + ${module} + INTERFACE + $ + ) + else () + add_library(${module} STATIC ${entries}) + + set_target_properties( + ${module} + PROPERTIES + PREFIX "" + OUTPUT_NAME "psnip-${module}" + ) + + target_include_directories( + ${module} + PUBLIC + $ + $ + ) + + list(FILTER entries EXCLUDE REGEX "\.c$") + endif () + + add_library(${namespace}::${module} ALIAS ${module}) + + if (PSNIP_INSTALL_HEADERS) + install(FILES ${entries} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${subdir}) + endif () + + install(TARGETS ${module} EXPORT unofficial-portable-snippets-config) +endforeach () + +install( + EXPORT unofficial-portable-snippets-config + NAMESPACE ${namespace}:: + DESTINATION share/unofficial-portable-snippets + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) diff --git a/vcpkg/ports/portable-snippets/CONTROL b/vcpkg/ports/portable-snippets/CONTROL new file mode 100644 index 0000000..792cb9f --- /dev/null +++ b/vcpkg/ports/portable-snippets/CONTROL @@ -0,0 +1,4 @@ +Source: portable-snippets +Version: 2019-09-20 +Description: Collection of miscellaneous portable C snippets +Homepage: https://github.com/nemequ/portable-snippets diff --git a/vcpkg/ports/portable-snippets/portfile.cmake b/vcpkg/ports/portable-snippets/portfile.cmake new file mode 100644 index 0000000..c84aca2 --- /dev/null +++ b/vcpkg/ports/portable-snippets/portfile.cmake @@ -0,0 +1,32 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nemequ/portable-snippets + REF 26496acb37ab46ee249ea19d45381da6955d89c4 + SHA512 6213b22e4358b06f92396731d94fd27d4cf3568a47c56c057174c1839929c6a569ad5b1e1302fe0d092c4f393c570607b96e9e977223f86a9e3c2862010f3af0 + 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 + -DPSNIP_INSTALL_HEADERS=OFF + OPTIONS_RELEASE + -DPSNIP_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) + +# Handle copyright +configure_file(${SOURCE_PATH}/COPYING.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME unofficial-${PORT}) diff --git a/vcpkg/ports/portaudio/CONTROL b/vcpkg/ports/portaudio/CONTROL new file mode 100644 index 0000000..e93f1a6 --- /dev/null +++ b/vcpkg/ports/portaudio/CONTROL @@ -0,0 +1,4 @@ +Source: portaudio +Version: 2020-02-02 +Homepage: https://app.assembla.com/spaces/portaudio/wiki +Description: PortAudio Portable Cross-platform Audio I/O API PortAudio is a free, cross-platform, open-source, audio I/O library. It lets you write simple audio programs in 'C' or C++ that will compile and run on many platforms including Windows, Macintosh OS X, and Unix (OSS/ALSA). It is intended to promote the exchange of audio software between developers on different platforms. Many applications use PortAudio for Audio I/O. \ No newline at end of file diff --git a/vcpkg/ports/portaudio/fix-include.patch b/vcpkg/ports/portaudio/fix-include.patch new file mode 100644 index 0000000..4003959 --- /dev/null +++ b/vcpkg/ports/portaudio/fix-include.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1024016..7e6ea20 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -365,7 +365,7 @@ IF(PA_BUILD_SHARED) + ADD_LIBRARY(portaudio SHARED ${PA_INCLUDES} ${PA_COMMON_INCLUDES} ${PA_SOURCES} ${PA_NON_UNICODE_SOURCES} ${PA_EXTRA_SHARED_SOURCES}) + SET_PROPERTY(TARGET portaudio APPEND_STRING PROPERTY COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS}) + TARGET_INCLUDE_DIRECTORIES(portaudio PRIVATE ${PA_PRIVATE_INCLUDE_PATHS}) +- TARGET_INCLUDE_DIRECTORIES(portaudio PUBLIC "$") ++ TARGET_INCLUDE_DIRECTORIES(portaudio PUBLIC "$" "$") + TARGET_LINK_LIBRARIES(portaudio ${PA_LIBRARY_DEPENDENCIES}) + ENDIF() + +@@ -374,7 +374,7 @@ IF(PA_BUILD_STATIC) + ADD_LIBRARY(portaudio_static STATIC ${PA_INCLUDES} ${PA_COMMON_INCLUDES} ${PA_SOURCES} ${PA_NON_UNICODE_SOURCES}) + SET_PROPERTY(TARGET portaudio_static APPEND_STRING PROPERTY COMPILE_DEFINITIONS ${PA_PRIVATE_COMPILE_DEFINITIONS}) + TARGET_INCLUDE_DIRECTORIES(portaudio_static PRIVATE ${PA_PRIVATE_INCLUDE_PATHS}) +- TARGET_INCLUDE_DIRECTORIES(portaudio_static PUBLIC "$") ++ TARGET_INCLUDE_DIRECTORIES(portaudio_static PUBLIC "$" "$") + TARGET_LINK_LIBRARIES(portaudio_static ${PA_LIBRARY_DEPENDENCIES}) + IF(NOT PA_LIBNAME_ADD_SUFFIX) + SET_PROPERTY(TARGET portaudio_static PROPERTY OUTPUT_NAME portaudio) diff --git a/vcpkg/ports/portaudio/fix-library-can-not-be-found.patch b/vcpkg/ports/portaudio/fix-library-can-not-be-found.patch new file mode 100644 index 0000000..93353d7 --- /dev/null +++ b/vcpkg/ports/portaudio/fix-library-can-not-be-found.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1024016..266e6d5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -352,11 +352,6 @@ ENDIF() + # embedded builds this is not an issue as they will only build the configuration + # used in the host application. + MARK_AS_ADVANCED(PA_LIBNAME_ADD_SUFFIX) +-IF(MSVC AND PA_BUILD_STATIC AND PA_BUILD_SHARED AND NOT PA_LIBNAME_ADD_SUFFIX) +- MESSAGE(WARNING "Building both shared and static libraries, and avoiding the suffix _static will lead to a name conflict") +- SET(PA_LIBNAME_ADD_SUFFIX ON CACHE BOOL "Forcing use of suffix _static to avoid name conflict between static and import library" FORCE) +- MESSAGE(WARNING "PA_LIBNAME_ADD_SUFFIX was set to ON") +-ENDIF() + + SET(PA_TARGETS "") + diff --git a/vcpkg/ports/portaudio/portfile.cmake b/vcpkg/ports/portaudio/portfile.cmake new file mode 100644 index 0000000..38c2bda --- /dev/null +++ b/vcpkg/ports/portaudio/portfile.cmake @@ -0,0 +1,37 @@ +vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH + URL https://git.assembla.com/portaudio.git + REF c5d2c51bd6fe354d0ee1119ba932bfebd3ebfacc + PATCHES + fix-library-can-not-be-found.patch + fix-include.patch +) + +# NOTE: the ASIO backend will be built automatically if the ASIO-SDK is provided +# in a sibling folder of the portaudio source in vcpkg/buildtrees/portaudio/src +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPA_USE_DS=ON + -DPA_USE_WASAPI=ON + -DPA_USE_WDMKS=ON + -DPA_USE_WMME=ON + -DPA_LIBNAME_ADD_SUFFIX=OFF + OPTIONS_DEBUG + -DPA_ENABLE_DEBUG_OUTPUT:BOOL=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_copy_pdbs() + +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 ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/portaudio RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/portmidi/CONTROL b/vcpkg/ports/portmidi/CONTROL new file mode 100644 index 0000000..9f9f60c --- /dev/null +++ b/vcpkg/ports/portmidi/CONTROL @@ -0,0 +1,5 @@ +Source: portmidi +Version: 0.234 +Homepage: https://sourceforge.net/projects/portmedia/ +Description: Free, cross-platform, open-source I/O library for MIDI +Supports: windows&!uwp&!arm diff --git a/vcpkg/ports/portmidi/portfile.cmake b/vcpkg/ports/portmidi/portfile.cmake new file mode 100644 index 0000000..a204927 --- /dev/null +++ b/vcpkg/ports/portmidi/portfile.cmake @@ -0,0 +1,47 @@ +vcpkg_fail_port_install(ON_TARGET "linux" "osx" "uwp" ON_ARCH "arm") + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO portmedia + FILENAME "portmedia-code-r234.zip" + SHA512 cbc332d89bc465450b38245a83cc300dfd2e1e6de7c62284edf754ff4d8a9aa3dc49a395dcee535ed9688befb019186fa87fd6d8a3698898c2acbf3e6b7a0794 +) + +# Alter path to main portmidi root +set(SOURCE_PATH "${SOURCE_PATH}/portmidi/trunk") + +# Mark portmidi-static as static, disable pmjni library depending on the Java SDK + +file(READ "${SOURCE_PATH}/pm_common/CMakeLists.txt" PM_CMAKE) +string(REPLACE "add_library(portmidi-static \${LIBSRC})" "add_library(portmidi-static STATIC \${LIBSRC})" PM_CMAKE "${PM_CMAKE}") +string(REPLACE "add_library(pmjni SHARED \${JNISRC})" "# Removed pmjni" PM_CMAKE "${PM_CMAKE}") +string(REPLACE "target_link_libraries(pmjni \${JNI_EXTRA_LIBS})" "# Removed pmjni" PM_CMAKE "${PM_CMAKE}") +string(REPLACE "set_target_properties(pmjni PROPERTIES EXECUTABLE_EXTENSION \"jnilib\")" "# Removed pmjni" PM_CMAKE "${PM_CMAKE}") +file(WRITE "${SOURCE_PATH}/pm_common/CMakeLists.txt" "${PM_CMAKE}") + +# Run cmake configure step +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DJAVA_INCLUDE_PATH= + -DJAVA_INCLUDE_PATH2= + -DJAVA_JVM_LIBRARY= +) + +# Run cmake build step, nothing is installed on Windows +vcpkg_build_cmake() + +file(INSTALL ${SOURCE_PATH}/pm_common/portmidi.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/porttime/porttime.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/portmidi_s.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/portmidi_s.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +else() + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/portmidi.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/portmidi.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/portmidi.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/portmidi.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +endif() + +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/portmidi RENAME copyright) diff --git a/vcpkg/ports/ppconsul/CONTROL b/vcpkg/ports/ppconsul/CONTROL new file mode 100644 index 0000000..0c8dfd8 --- /dev/null +++ b/vcpkg/ports/ppconsul/CONTROL @@ -0,0 +1,5 @@ +Source: ppconsul +Version: 0.5-1 +Homepage: https://github.com/oliora/ppconsul +Description: A C++ client library for Consul. Consul is a distributed tool for discovering and configuring services in your infrastructure. +Build-Depends: boost-core, boost-variant, boost-optional, boost-fusion, curl[openssl], json11 diff --git a/vcpkg/ports/ppconsul/cmake_build.patch b/vcpkg/ports/ppconsul/cmake_build.patch new file mode 100644 index 0000000..a66c8e1 --- /dev/null +++ b/vcpkg/ports/ppconsul/cmake_build.patch @@ -0,0 +1,70 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 92e4698..aa643aa 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -52,6 +52,8 @@ endif() + + enable_testing() + ++find_package(json11 REQUIRED) ++ + if (${USE_CPPNETLIB}) + find_package(Boost ${BOOST_MIN_VERSION} REQUIRED COMPONENTS thread filesystem system date_time chrono regex) + +@@ -75,6 +77,8 @@ else () + set (CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "${CURL_ROOT}/lib") + endif () + find_package(CURL REQUIRED) ++ find_package(OpenSSL REQUIRED) ++ find_package(ZLIB REQUIRED) + endif () + + set(LIBB64_DIR "${PROJECT_SOURCE_DIR}/ext/b64") +@@ -87,9 +91,7 @@ if (WIN32 AND NOT BUILD_STATIC_LIB) + message(FATAL_ERROR "Building Ppconsul as dynamic library on Windows is not supported, see https://github.com/oliora/ppconsul/issues/25") + endif() + +-add_subdirectory(ext/json11) + add_subdirectory(src) +-add_subdirectory(tests) + + install( + DIRECTORY "${HEADERS_DIR}" +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index d747100..966c7e2 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -78,7 +78,7 @@ target_include_directories(${PROJECT_NAME} + + target_link_libraries(${PROJECT_NAME} + PRIVATE +- json11 ++ ${JSON11_LIBRARIES} + ${Boost_LIBRARIES} + ) + +@@ -87,7 +87,10 @@ if (${USE_CPPNETLIB}) + target_link_libraries(${PROJECT_NAME} PRIVATE ${CPPNETLIB_LIBRARIES}) + else () + target_include_directories(${PROJECT_NAME} PRIVATE ${CURL_INCLUDE_DIR}) +- target_link_libraries(${PROJECT_NAME} PRIVATE ${CURL_LIBRARIES}) ++ target_link_libraries(${PROJECT_NAME} PRIVATE ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES} ZLIB::ZLIB) ++ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") ++ target_link_libraries(${PROJECT_NAME} PRIVATE "-framework CoreFoundation" "-framework Security") ++ endif () + endif () + + source_group(${PROJECT_NAME} FILES ${SOURCES}) +diff --git a/src/s11n.h b/src/s11n.h +index c317834..3cb03c4 100644 +--- a/src/s11n.h ++++ b/src/s11n.h +@@ -6,7 +6,7 @@ + + #include "ppconsul/config.h" + #include "ppconsul/error.h" +-#include ++#include + #include + #include + #include diff --git a/vcpkg/ports/ppconsul/portfile.cmake b/vcpkg/ports/ppconsul/portfile.cmake new file mode 100644 index 0000000..9b8c4c4 --- /dev/null +++ b/vcpkg/ports/ppconsul/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oliora/ppconsul + REF 8aed30cae0e2df76d920b5cd77933604a4644ee9 + SHA512 756f07c7c8099868fa181571941f511987088abc110ad5eda517ad591ed10b40532cd7b1541dbdad76c2617ce804a1dc26a121380f20f8e4a40e29063523cbbd + HEAD_REF master + PATCHES "cmake_build.patch" +) + +# Force the use of the vcpkg installed versions +file(REMOVE_RECURSE ${SOURCE_PATH}/ext/json11) +file(REMOVE_RECURSE ${SOURCE_PATH}/ext/catch) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + + +file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/ppmagic/CONTROL b/vcpkg/ports/ppmagic/CONTROL new file mode 100644 index 0000000..c31d605 --- /dev/null +++ b/vcpkg/ports/ppmagic/CONTROL @@ -0,0 +1,4 @@ +Source: ppmagic +Version: 2020-07-03 +Description: C/C++ preprocessor macros that you can use to simplify your life. +Homepage: https://github.com/kobalicek/ppmagic diff --git a/vcpkg/ports/ppmagic/portfile.cmake b/vcpkg/ports/ppmagic/portfile.cmake new file mode 100644 index 0000000..18f491f --- /dev/null +++ b/vcpkg/ports/ppmagic/portfile.cmake @@ -0,0 +1,13 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kobalicek/ppmagic + REF 2c7894e3056c610d383027b2d48149ba9d4a1c62 + SHA512 4ab5f1dbef4c9b7892d8042e2a2b01df21a201b2b05a1b75a6ad594f50e2ec1c6a3e4782bb1d702266c90440df679d7eb24dfe595ce35680f7d263ec6c371a3b + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/ppmagic.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/pprint/CONTROL b/vcpkg/ports/pprint/CONTROL new file mode 100644 index 0000000..ea94b19 --- /dev/null +++ b/vcpkg/ports/pprint/CONTROL @@ -0,0 +1,4 @@ +Source: pprint +Version: 2019-07-19 +Description: Pretty Printer for Modern C++ +Homepage: https://github.com/p-ranav/pprint diff --git a/vcpkg/ports/pprint/portfile.cmake b/vcpkg/ports/pprint/portfile.cmake new file mode 100644 index 0000000..3b360e6 --- /dev/null +++ b/vcpkg/ports/pprint/portfile.cmake @@ -0,0 +1,27 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO p-ranav/pprint + REF 2fb81cd4af62c019ea28ea1707164fc3637bc656 + SHA512 51bdf0e06666511fb475b46ff2d512e5d04b231f63c274c021f56b194501885a0302af95cc90977b0a3b39b555d1076926f618d0a6751926acb5f8b2a968bc0a + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPPRINT_BUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/pqp/CMakeLists.txt b/vcpkg/ports/pqp/CMakeLists.txt new file mode 100644 index 0000000..dab5080 --- /dev/null +++ b/vcpkg/ports/pqp/CMakeLists.txt @@ -0,0 +1,22 @@ +cmake_minimum_required(VERSION 3.0) +project(pqp) + +set(SOURCE_CUSTOM_DIR "PQP_v1.3") +include_directories(${SOURCE_CUSTOM_DIR}/src) + +file(GLOB SRCS + "${SOURCE_CUSTOM_DIR}/src/*.cpp") +file(GLOB HDRS + "${SOURCE_CUSTOM_DIR}/src/*.h") + +add_library(pqp STATIC ${SRCS}) + +install(TARGETS pqp EXPORT pqpConfig + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + +foreach (file ${HDRS}) + get_filename_component(dir ${file} DIRECTORY) + install(FILES ${file} DESTINATION include/ CONFIGURATIONS Release) +endforeach() diff --git a/vcpkg/ports/pqp/CONTROL b/vcpkg/ports/pqp/CONTROL new file mode 100644 index 0000000..8525cac --- /dev/null +++ b/vcpkg/ports/pqp/CONTROL @@ -0,0 +1,4 @@ +Source: pqp +Version: 1.3-4 +Homepage: https://gamma.cs.unc.edu/SSV/ +Description: a proximity query package diff --git a/vcpkg/ports/pqp/LICENSE b/vcpkg/ports/pqp/LICENSE new file mode 100644 index 0000000..2d4e481 --- /dev/null +++ b/vcpkg/ports/pqp/LICENSE @@ -0,0 +1,32 @@ +Copyright 1999 University of North Carolina at Chapel Hill. +All rights reserved. + +Permission to use, copy, modify, and distribute this software and its +documentation for educational, research, and non-profit purposes, without fee, +and without a written agreement is hereby granted, provided that the above +copyright notice and the following three paragraphs appear in all copies. + +IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL BE LIABLE TO +ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, +INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS +DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL HAS +BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL SPECIFICALLY DISCLAIMS ANY +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED +HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT +CHAPEL HILL HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, +ENHANCEMENTS, OR MODIFICATIONS. + +The authors may be contacted via: + +US Mail: Eric Larsen, Stefan Gottschalk + Department of Computer Science + Sitterson Hall, CB #3175 + University of North Carolina + Chapel Hill, NC 27599-3175 + +Phone: (919) 962-1749 + +Email: geom@cs.unc.edu \ No newline at end of file diff --git a/vcpkg/ports/pqp/fix-math-functions.patch b/vcpkg/ports/pqp/fix-math-functions.patch new file mode 100644 index 0000000..51a4f15 --- /dev/null +++ b/vcpkg/ports/pqp/fix-math-functions.patch @@ -0,0 +1,17 @@ +--- a/PQP_v1.3/src/PQP_Compile.h ++++ b/PQP_v1.3/src/PQP_Compile.h +@@ -44,10 +44,10 @@ + // prevents compiler warnings when PQP_REAL is float + + #include +-inline float sqrt(float x) { return (float)sqrt((double)x); } +-inline float cos(float x) { return (float)cos((double)x); } +-inline float sin(float x) { return (float)sin((double)x); } +-inline float fabs(float x) { return (float)fabs((double)x); } ++//inline float sqrt(float x) { return (float)sqrt((double)x); } ++//inline float cos(float x) { return (float)cos((double)x); } ++//inline float sin(float x) { return (float)sin((double)x); } ++//inline float fabs(float x) { return (float)fabs((double)x); } + + //------------------------------------------------------------------------- + // diff --git a/vcpkg/ports/pqp/portfile.cmake b/vcpkg/ports/pqp/portfile.cmake new file mode 100644 index 0000000..56b36a0 --- /dev/null +++ b/vcpkg/ports/pqp/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "http://gamma.cs.unc.edu/software/downloads/SSV/pqp-1.3.tar.gz" + FILENAME "pqp-1.3.tar.gz" + SHA512 baad7b050b13a6d13de5110cdec443048a3543b65b0d3b30d1b5f737b46715052661f762ef71345d39978c0c788a30a3a935717664806b4729722ee3594ebdc1 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + fix-math-functions.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +# Handle copyright +file(COPY ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/pqp) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/pqp/LICENSE ${CURRENT_PACKAGES_DIR}/share/pqp/copyright) diff --git a/vcpkg/ports/proj/CONTROL b/vcpkg/ports/proj/CONTROL new file mode 100644 index 0000000..d6c204f --- /dev/null +++ b/vcpkg/ports/proj/CONTROL @@ -0,0 +1,4 @@ +Source: proj +Version: 0 +Description: a stub package that pulls in proj4. Do not depend on this package. +Build-Depends: proj4 diff --git a/vcpkg/ports/proj/portfile.cmake b/vcpkg/ports/proj/portfile.cmake new file mode 100644 index 0000000..cc6e26f --- /dev/null +++ b/vcpkg/ports/proj/portfile.cmake @@ -0,0 +1 @@ +SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/vcpkg/ports/proj4/CONTROL b/vcpkg/ports/proj4/CONTROL new file mode 100644 index 0000000..ef83912 --- /dev/null +++ b/vcpkg/ports/proj4/CONTROL @@ -0,0 +1,11 @@ +Source: proj4 +Version: 6.3.1 +Port-Version: 2 +Homepage: https://github.com/OSGeo/PROJ +Description: PROJ.4 library for cartographic projections +Build-Depends: sqlite3[core] +Default-Features: database + +Feature: database +Build-Depends: sqlite3[tool] (!uwp&!arm) +Description: generate database diff --git a/vcpkg/ports/proj4/disable-export-namespace.patch b/vcpkg/ports/proj4/disable-export-namespace.patch new file mode 100644 index 0000000..87646fe --- /dev/null +++ b/vcpkg/ports/proj4/disable-export-namespace.patch @@ -0,0 +1,28 @@ +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +index 61c69f7..777b5d8 100644 +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt +@@ -28,7 +28,3 @@ install(FILES + install(EXPORT targets + FILE ${PROJECT_NAME_LOWER}-targets.cmake + DESTINATION "${CMAKECONFIGDIR}") +-install(EXPORT targets +- NAMESPACE ${PROJECT_NAME}:: +- FILE ${PROJECT_NAME_LOWER}-namespace-targets.cmake +- DESTINATION "${CMAKECONFIGDIR}") +diff --git a/cmake/project-config.cmake.in b/cmake/project-config.cmake.in +index c62ecb4..9a52b3b 100644 +--- a/cmake/project-config.cmake.in ++++ b/cmake/project-config.cmake.in +@@ -20,10 +20,9 @@ set (@PROJECT_NAME@_INCLUDE_DIRS "${_ROOT}/@INCLUDEDIR@") + set (@PROJECT_NAME@_LIBRARY_DIRS "${_ROOT}/@LIBDIR@") + set (@PROJECT_NAME@_BINARY_DIRS "${_ROOT}/@BINDIR@") + +-set (@PROJECT_NAME@_LIBRARIES @PROJECT_NAME@::proj) ++set (@PROJECT_NAME@_LIBRARIES proj) + # Read in the exported definition of the library + include ("${_DIR}/@PROJECT_NAME_LOWER@-targets.cmake") +-include ("${_DIR}/@PROJECT_NAME_LOWER@-namespace-targets.cmake") + + unset (_ROOT) + unset (_DIR) diff --git a/vcpkg/ports/proj4/disable-projdb-with-arm-uwp.patch b/vcpkg/ports/proj4/disable-projdb-with-arm-uwp.patch new file mode 100644 index 0000000..218a353 --- /dev/null +++ b/vcpkg/ports/proj4/disable-projdb-with-arm-uwp.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9213990..f51cc5e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -224,7 +224,9 @@ set(CMAKECONFIGDIR "${DEFAULT_CMAKEDIR}" + include_directories(${PROJ4_SOURCE_DIR}/src) + + message(STATUS "") +-add_subdirectory(data) ++if(BUILD_PROJ_DATABASE) ++ add_subdirectory(data) ++endif() + add_subdirectory(include) + add_subdirectory(src) + add_subdirectory(man) diff --git a/vcpkg/ports/proj4/fix-linux-build.patch b/vcpkg/ports/proj4/fix-linux-build.patch new file mode 100644 index 0000000..0d81ef3 --- /dev/null +++ b/vcpkg/ports/proj4/fix-linux-build.patch @@ -0,0 +1,18 @@ +diff --git a/src/lib_proj.cmake b/src/lib_proj.cmake +index cf7533b..236581f 100644 +--- a/src/lib_proj.cmake ++++ b/src/lib_proj.cmake +@@ -431,11 +431,11 @@ set(PROJ_LIBRARIES ${PROJ_LIBRARIES} PARENT_SCOPE) + if(UNIX) + find_library(M_LIB m) + if(M_LIB) +- target_link_libraries(${PROJ_CORE_TARGET} -lm) ++ target_link_libraries(${PROJ_CORE_TARGET} PRIVATE -lm) + endif() + endif() + if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT) +- target_link_libraries(${PROJ_CORE_TARGET} ${CMAKE_THREAD_LIBS_INIT}) ++ target_link_libraries(${PROJ_CORE_TARGET} PRIVATE ${CMAKE_THREAD_LIBS_INIT}) + endif() + + include_directories(${SQLITE3_INCLUDE_DIR}) diff --git a/vcpkg/ports/proj4/fix-sqlite-dependency-export.patch b/vcpkg/ports/proj4/fix-sqlite-dependency-export.patch new file mode 100644 index 0000000..06ea71c --- /dev/null +++ b/vcpkg/ports/proj4/fix-sqlite-dependency-export.patch @@ -0,0 +1,13 @@ +diff --git a/src/lib_proj.cmake b/src/lib_proj.cmake +index 2e90f98f..dc171e91 100644 +--- a/src/lib_proj.cmake ++++ b/src/lib_proj.cmake +@@ -441,7 +441,7 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT) + endif() + + include_directories(${SQLITE3_INCLUDE_DIR}) +-target_link_libraries(${PROJ_CORE_TARGET} ${SQLITE3_LIBRARY}) ++target_link_libraries(${PROJ_CORE_TARGET} PRIVATE ${SQLITE3_LIBRARY}) + + if(MSVC AND BUILD_LIBPROJ_SHARED) + target_compile_definitions(${PROJ_CORE_TARGET} diff --git a/vcpkg/ports/proj4/fix-sqlite3-bin.patch b/vcpkg/ports/proj4/fix-sqlite3-bin.patch new file mode 100644 index 0000000..20fea71 --- /dev/null +++ b/vcpkg/ports/proj4/fix-sqlite3-bin.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 75c4696..2e8a957 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -110,7 +110,7 @@ include(policies) + ################################################################################ + # Check for sqlite3 + ################################################################################ +-find_program(EXE_SQLITE3 sqlite3) ++# Use incoming parameter + if(NOT EXE_SQLITE3) + message(SEND_ERROR "sqlite3 binary not found!") + endif() diff --git a/vcpkg/ports/proj4/fix-win-output-name.patch b/vcpkg/ports/proj4/fix-win-output-name.patch new file mode 100644 index 0000000..5964d11 --- /dev/null +++ b/vcpkg/ports/proj4/fix-win-output-name.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/ProjUtilities.cmake b/cmake/ProjUtilities.cmake +index 1a2b605..cf62f02 100644 +--- a/cmake/ProjUtilities.cmake ++++ b/cmake/ProjUtilities.cmake +@@ -104,7 +104,7 @@ function(proj_target_output_name TARGET_NAME OUTPUT_NAME) + + # On Windows, ABI version is specified using binary file name suffix. + # On Unix, suffix is empty and SOVERSION is used instead. +- if(WIN32) ++ if(0) + string(LENGTH "${${PROJECT_INTERN_NAME}_ABI_VERSION}" abilen) + if(abilen GREATER 0) + set(SUFFIX "_${${PROJECT_INTERN_NAME}_ABI_VERSION}") diff --git a/vcpkg/ports/proj4/portfile.cmake b/vcpkg/ports/proj4/portfile.cmake new file mode 100644 index 0000000..b669bfd --- /dev/null +++ b/vcpkg/ports/proj4/portfile.cmake @@ -0,0 +1,72 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OSGeo/PROJ + REF 6.3.1 + SHA512 ec5a2b61b12d3d3ec2456b9e742cf7be98767889c4759334e60276f609054fa8eb59f13f07af38e69e9ee7b6f2b9542e2d5d7806726ce5616062af4de626c6fa + HEAD_REF master + PATCHES + fix-sqlite3-bin.patch + disable-export-namespace.patch + disable-projdb-with-arm-uwp.patch + fix-win-output-name.patch + fix-sqlite-dependency-export.patch + fix-linux-build.patch + use-sqlite3-config.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(VCPKG_BUILD_SHARED_LIBS ON) +else() + set(VCPKG_BUILD_SHARED_LIBS OFF) +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + database BUILD_PROJ_DATABASE +) +if ("database" IN_LIST FEATURES) + if (VCPKG_TARGET_IS_WINDOWS) + set(BIN_SUFFIX .exe) + if (EXISTS ${CURRENT_INSTALLED_DIR}/../x86-windows/tools/sqlite3.exe) + set(SQLITE3_BIN_PATH ${CURRENT_INSTALLED_DIR}/../x86-windows/tools) + elseif (EXISTS ${CURRENT_INSTALLED_DIR}/../x86-windows-static/tools/sqlite3.exe) + set(SQLITE3_BIN_PATH ${CURRENT_INSTALLED_DIR}/../x86-windows-static/tools) + elseif (EXISTS ${CURRENT_INSTALLED_DIR}/../x64-windows/tools/sqlite3.exe AND (NOT CMAKE_HOST_SYSTEM_PROCESSOR OR CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64")) + set(SQLITE3_BIN_PATH ${CURRENT_INSTALLED_DIR}/../x64-windows/tools) + elseif (EXISTS ${CURRENT_INSTALLED_DIR}/../x64-windows-static/tools/sqlite3.exe AND (NOT CMAKE_HOST_SYSTEM_PROCESSOR OR CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64")) + set(SQLITE3_BIN_PATH ${CURRENT_INSTALLED_DIR}/../x64-windows-static/tools) + elseif (NOT TRIPLET_SYSTEM_ARCH STREQUAL "arm" AND EXISTS ${CURRENT_INSTALLED_DIR}/tools/sqlite3.exe) + set(SQLITE3_BIN_PATH ${CURRENT_INSTALLED_DIR}/tools) + else() + message(FATAL_ERROR "Proj4 database need to install sqlite3[tool]:x86-windows first.") + endif() + else() + set(BIN_SUFFIX) + set(SQLITE3_BIN_PATH ${CURRENT_INSTALLED_DIR}/tools) + endif() +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DBUILD_LIBPROJ_SHARED=${VCPKG_BUILD_SHARED_LIBS} + -DPROJ_LIB_SUBDIR=lib + -DPROJ_INCLUDE_SUBDIR=include + -DPROJ_DATA_SUBDIR=share/proj4 + -DBUILD_CCT=OFF + -DBUILD_CS2CS=OFF + -DBUILD_GEOD=OFF + -DBUILD_GIE=OFF + -DBUILD_PROJ=OFF + -DBUILD_PROJINFO=OFF + -DPROJ_TESTS=OFF + -DEXE_SQLITE3=${SQLITE3_BIN_PATH}/sqlite3${BIN_SUFFIX} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/proj4) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/proj4/use-sqlite3-config.patch b/vcpkg/ports/proj4/use-sqlite3-config.patch new file mode 100644 index 0000000..050a884 --- /dev/null +++ b/vcpkg/ports/proj4/use-sqlite3-config.patch @@ -0,0 +1,57 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c617912..bed0428 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -122,7 +122,23 @@ if(NOT EXE_SQLITE3) + message(SEND_ERROR "sqlite3 binary not found!") + endif() + +-find_package(Sqlite3 REQUIRED) ++#find_package(Sqlite3 REQUIRED) ++find_package(unofficial-sqlite3 CONFIG REQUIRED) ++if(unofficial-sqlite3_FOUND) ++ set(SQLITE3_FOUND true) ++ get_target_property(SQLITE3_INCLUDE_DIR unofficial::sqlite3::sqlite3 INTERFACE_INCLUDE_DIRECTORIES) ++ set(SQLITE3_LIBRARY unofficial::sqlite3::sqlite3) ++ # Extract version information from the header file ++ if(SQLITE3_INCLUDE_DIR) ++ file(STRINGS ${SQLITE3_INCLUDE_DIR}/sqlite3.h _ver_line ++ REGEX "^#define SQLITE_VERSION *\"[0-9]+\\.[0-9]+\\.[0-9]+\"" ++ LIMIT_COUNT 1) ++ string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" ++ SQLITE3_VERSION "${_ver_line}") ++ unset(_ver_line) ++ endif() ++endif() ++ + if(NOT SQLITE3_FOUND) + message(SEND_ERROR "sqlite3 dependency not found!") + endif() +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +index 92197c8..ab65de7 100644 +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt +@@ -25,6 +25,10 @@ else () + endif () + + string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER) ++set(FIND_DEPENDENCY_SQLITE3 "") ++if(NOT BUILD_LIBPROJ_SHARED) ++ set(FIND_DEPENDENCY_SQLITE3 "find_package(unofficial-sqlite3 CONFIG REQUIRED)") ++endif() + configure_file(project-config.cmake.in project-config.cmake @ONLY) + configure_file(project-config-version.cmake.in + project-config-version.cmake @ONLY) +diff --git a/cmake/project-config.cmake.in b/cmake/project-config.cmake.in +index 9a52b3b..295d95d 100644 +--- a/cmake/project-config.cmake.in ++++ b/cmake/project-config.cmake.in +@@ -13,6 +13,8 @@ message (STATUS "Reading ${CMAKE_CURRENT_LIST_FILE}") + message (STATUS + "@PROJECT_NAME@ configuration, version ${@PROJECT_NAME@_VERSION}") + ++@FIND_DEPENDENCY_SQLITE3@ ++ + # Tell the user project where to find our headers and libraries + get_filename_component (_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) + get_filename_component (_ROOT "${_DIR}/@PROJECT_ROOT_DIR@" ABSOLUTE) diff --git a/vcpkg/ports/prometheus-cpp/CONTROL b/vcpkg/ports/prometheus-cpp/CONTROL new file mode 100644 index 0000000..aed6c30 --- /dev/null +++ b/vcpkg/ports/prometheus-cpp/CONTROL @@ -0,0 +1,20 @@ +Source: prometheus-cpp +Version: 0.10.0 +Description: Prometheus Client Library for Modern C++ +Default-Features: compression, pull + +Feature: compression +Build-Depends: zlib +Description: Enable zlib compression + +Feature: tests +Build-Depends: gtest +Description: Additional testing support + +Feature: pull +Build-Depends: civetweb, cppcodec +Description: Support for regular pull mode + +Feature: push +Build-Depends: curl +Description: Support push gateway diff --git a/vcpkg/ports/prometheus-cpp/portfile.cmake b/vcpkg/ports/prometheus-cpp/portfile.cmake new file mode 100644 index 0000000..6573a01 --- /dev/null +++ b/vcpkg/ports/prometheus-cpp/portfile.cmake @@ -0,0 +1,43 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jupp0r/prometheus-cpp + REF 62897f9e794e9f16471e8a53f367268109e7fa6e # v0.10.0 + SHA512 b065a1caaa29c5e7d31b89f4dc0f0a6309a58322a2c95ad784d47c9717dfb525c4f27df38ef7562e3a1be605898b30caf7702a801928f9b09c30b64f9a2becc8 + HEAD_REF master +) + +macro(feature FEATURENAME OPTIONNAME) + if("${FEATURENAME}" IN_LIST FEATURES) + list(APPEND FEATURE_OPTIONS -D${OPTIONNAME}=TRUE) + else() + list(APPEND FEATURE_OPTIONS -D${OPTIONNAME}=FALSE) + endif() +endmacro() + +feature(compression ENABLE_COMPRESSION) +feature(pull ENABLE_PULL) +feature(push ENABLE_PUSH) +feature(tests ENABLE_TESTING) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DUSE_THIRDPARTY_LIBRARIES=OFF # use vcpkg packages + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/prometheus-cpp) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/prometheus-cpp/copyright COPYONLY) diff --git a/vcpkg/ports/protobuf-c/CONTROL b/vcpkg/ports/protobuf-c/CONTROL new file mode 100644 index 0000000..171a6d1 --- /dev/null +++ b/vcpkg/ports/protobuf-c/CONTROL @@ -0,0 +1,12 @@ +Source: protobuf-c +Version: 1.3.2-2 +Homepage: https://github.com/protobuf-c/protobuf-c +Description: This is protobuf-c, a C implementation of the Google Protocol Buffers data serialization format. +Build-Depends: protobuf + +Feature: tools +Description: build tools. + +Feature: test +Description: build test project. +Build-Depends: protobuf-c[tools] \ No newline at end of file diff --git a/vcpkg/ports/protobuf-c/fix-features.patch b/vcpkg/ports/protobuf-c/fix-features.patch new file mode 100644 index 0000000..89b2dd4 --- /dev/null +++ b/vcpkg/ports/protobuf-c/fix-features.patch @@ -0,0 +1,62 @@ +diff --git a/build-cmake/CMakeLists.txt b/build-cmake/CMakeLists.txt +index bc1728f..7c6a04d 100644 +--- a/build-cmake/CMakeLists.txt ++++ b/build-cmake/CMakeLists.txt +@@ -61,11 +61,15 @@ if (MSVC AND MSVC_STATIC_BUILD) + endif(${flag_var} MATCHES "/MD") + endforeach(flag_var) + endif (MSVC AND MSVC_STATIC_BUILD) ++ ++IF(WITH_TOOLS) + FILE(GLOB PROTOC_GEN_C_SRC ${MAIN_DIR}/protoc-c/*.h ${MAIN_DIR}/protoc-c/*.cc ) + ADD_EXECUTABLE(protoc-gen-c ${PROTOC_GEN_C_SRC}) + + TARGET_LINK_LIBRARIES(protoc-gen-c ${PROTOBUF_PROTOC_LIBRARY} ${PROTOBUF_LIBRARY}) ++ENDIF() + ++IF(WITH_TEST AND WITH_TOOLS) + IF(CMAKE_HOST_UNIX) + ADD_CUSTOM_COMMAND(TARGET ${PROJECT_NAME} POST_BUILD + COMMAND ln -sf protoc-gen-c protoc-c +@@ -79,8 +83,6 @@ FUNCTION(GENERATE_TEST_SOURCES PROTO_FILE SRC HDR) + DEPENDS protoc-gen-c) + ENDFUNCTION() + +- +-IF(CMAKE_BUILD_TYPE MATCHES Debug) + ENABLE_TESTING() + + GENERATE_TEST_SOURCES(${TEST_DIR}/test.proto t/test.pb-c.c t/test.pb-c.h) +@@ -126,17 +128,17 @@ GENERATE_TEST_SOURCES(${TEST_DIR}/test-proto3.proto t/test-proto3.pb-c.c t/test- + ADD_EXECUTABLE(test-generated-code3 ${TEST_DIR}/generated-code/test-generated-code.c t/test-proto3.pb-c.c t/test-proto3.pb-c.h) + TARGET_COMPILE_DEFINITIONS(test-generated-code3 PUBLIC -DPROTO3) + TARGET_LINK_LIBRARIES(test-generated-code3 protobuf-c) +- + ENDIF() + +-INSTALL(TARGETS protoc-gen-c protobuf-c RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) +-INSTALL(FILES ${MAIN_DIR}/protobuf-c/protobuf-c.h DESTINATION include/protobuf-c) +-INSTALL(FILES ${MAIN_DIR}/protobuf-c/protobuf-c.h DESTINATION include) ++IF (WITH_TOOLS) ++INSTALL(TARGETS protoc-gen-c RUNTIME DESTINATION tools LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ++ENDIF() + + IF(CMAKE_HOST_UNIX) + INSTALL(CODE "EXECUTE_PROCESS (COMMAND ln -sf protoc-gen-c protoc-c WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin)") + ENDIF() + ++IF (WITH_TEST) + INCLUDE(Dart) + + SET(DART_TESTING_TIMEOUT 5) +@@ -147,5 +149,10 @@ ADD_TEST(test-issue220 test-issue220) + ADD_TEST(test-issue251 test-issue251) + ADD_TEST(test-version test-version) + ++ENDIF() ++ ++INSTALL(TARGETS protobuf-c RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ++INSTALL(FILES ${MAIN_DIR}/protobuf-c/protobuf-c.h DESTINATION include/protobuf-c) ++INSTALL(FILES ${MAIN_DIR}/protobuf-c/protobuf-c.h DESTINATION include) + + INCLUDE(CPack) diff --git a/vcpkg/ports/protobuf-c/fix-usage-issue.patch b/vcpkg/ports/protobuf-c/fix-usage-issue.patch new file mode 100644 index 0000000..ce5e4cf --- /dev/null +++ b/vcpkg/ports/protobuf-c/fix-usage-issue.patch @@ -0,0 +1,36 @@ +diff --git a/build-cmake/CMakeLists.txt b/build-cmake/CMakeLists.txt +index 7c6a04d..83534cb 100644 +--- a/build-cmake/CMakeLists.txt ++++ b/build-cmake/CMakeLists.txt +@@ -14,6 +14,11 @@ option(BUILD_PROTO3 "BUILD_PROTO3" ON) + INCLUDE(TestBigEndian) + TEST_BIG_ENDIAN(WORDS_BIGENDIAN) + ++ ++IF(CMAKE_HOST_UNIX) ++ FIND_PACKAGE(Threads REQUIRED) ++ENDIF() ++ + SET(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") + ADD_DEFINITIONS(-DPACKAGE_VERSION="${PACKAGE_VERSION}") + ADD_DEFINITIONS(-DPACKAGE_STRING="${PACKAGE_STRING}") +@@ -67,6 +72,9 @@ FILE(GLOB PROTOC_GEN_C_SRC ${MAIN_DIR}/protoc-c/*.h ${MAIN_DIR}/protoc-c/*.cc ) + ADD_EXECUTABLE(protoc-gen-c ${PROTOC_GEN_C_SRC}) + + TARGET_LINK_LIBRARIES(protoc-gen-c ${PROTOBUF_PROTOC_LIBRARY} ${PROTOBUF_LIBRARY}) ++IF(CMAKE_HOST_UNIX) ++ TARGET_LINK_LIBRARIES(protoc-gen-c ${CMAKE_THREAD_LIBS_INIT}) ++ENDIF() + ENDIF() + + IF(WITH_TEST AND WITH_TOOLS) +@@ -99,6 +107,9 @@ GENERATE_TEST_SOURCES(${TEST_DIR}/test-full.proto t/test-full.pb-c.c t/test-full + + ADD_EXECUTABLE(cxx-generate-packed-data ${TEST_DIR}/generated-code2/cxx-generate-packed-data.cc t/test-full.pb.h t/test-full.pb.cc) + TARGET_LINK_LIBRARIES(cxx-generate-packed-data ${PROTOBUF_LIBRARY}) ++IF (CMAKE_HOST_UNIX) ++ TARGET_LINK_LIBRARIES(cxx-generate-packed-data ${CMAKE_THREAD_LIBS_INIT}) ++ENDIF() + + FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/t/generated-code2) + ADD_CUSTOM_COMMAND(OUTPUT t/generated-code2/test-full-cxx-output.inc diff --git a/vcpkg/ports/protobuf-c/portfile.cmake b/vcpkg/ports/protobuf-c/portfile.cmake new file mode 100644 index 0000000..98f7035 --- /dev/null +++ b/vcpkg/ports/protobuf-c/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports Linux platform" ON_TARGET "Windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO protobuf-c/protobuf-c + REF 1390409f4ee4e26d0635310995b516eb702c3f9e #1.3.2 + SHA512 5c60883c4ef064c641875bfe7f89bf255a29dd20b5e0be5878cbaec03f2efd1f926c3e40dc0090cb172b8eef227fddafe86051f08edb3e1c26d0bd6aca673e41 + HEAD_REF master + PATCHES + fix-features.patch + fix-usage-issue.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tools WITH_TOOLS + test WITH_TEST +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/build-cmake + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +# Include files should not be duplicated into the /debug/include directory. +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/protobuf/CONTROL b/vcpkg/ports/protobuf/CONTROL new file mode 100644 index 0000000..115b306 --- /dev/null +++ b/vcpkg/ports/protobuf/CONTROL @@ -0,0 +1,9 @@ +Source: protobuf +Version: 3.13.0 +Port-Version: 2 +Homepage: https://github.com/protocolbuffers/protobuf +Description: Protocol Buffers - Google's data interchange format + +Feature: zlib +Description: ZLib based features like Gzip streams +Build-Depends: zlib diff --git a/vcpkg/ports/protobuf/fix-android-log.patch b/vcpkg/ports/protobuf/fix-android-log.patch new file mode 100644 index 0000000..47a9350 --- /dev/null +++ b/vcpkg/ports/protobuf/fix-android-log.patch @@ -0,0 +1,28 @@ +diff --git a/cmake/libprotobuf-lite.cmake b/cmake/libprotobuf-lite.cmake +index 6bf86a277..424854798 100644 +--- a/cmake/libprotobuf-lite.cmake ++++ b/cmake/libprotobuf-lite.cmake +@@ -67,6 +67,9 @@ target_link_libraries(libprotobuf-lite ${CMAKE_THREAD_LIBS_INIT}) + if(protobuf_LINK_LIBATOMIC) + target_link_libraries(libprotobuf-lite atomic) + endif() ++if(${CMAKE_SYSTEM_NAME} STREQUAL "Android") ++ target_link_libraries(libprotobuf-lite log) ++endif() + target_include_directories(libprotobuf-lite PUBLIC ${protobuf_source_dir}/src) + if(MSVC AND protobuf_BUILD_SHARED_LIBS) + target_compile_definitions(libprotobuf-lite +diff --git a/cmake/libprotobuf.cmake b/cmake/libprotobuf.cmake +index 0c12596c2..a5be494fb 100644 +--- a/cmake/libprotobuf.cmake ++++ b/cmake/libprotobuf.cmake +@@ -121,6 +121,9 @@ endif() + if(protobuf_LINK_LIBATOMIC) + target_link_libraries(libprotobuf atomic) + endif() ++if(${CMAKE_SYSTEM_NAME} STREQUAL "Android") ++ target_link_libraries(libprotobuf log) ++endif() + target_include_directories(libprotobuf PUBLIC ${protobuf_source_dir}/src) + if(MSVC AND protobuf_BUILD_SHARED_LIBS) + target_compile_definitions(libprotobuf diff --git a/vcpkg/ports/protobuf/fix-static-build.patch b/vcpkg/ports/protobuf/fix-static-build.patch new file mode 100644 index 0000000..22d9943 --- /dev/null +++ b/vcpkg/ports/protobuf/fix-static-build.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/install.cmake b/cmake/install.cmake +index be47c54..8b1bd97 100644 +--- a/cmake/install.cmake ++++ b/cmake/install.cmake +@@ -31,7 +31,7 @@ endforeach() + if (protobuf_BUILD_PROTOC_BINARIES) + install(TARGETS protoc EXPORT protobuf-targets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc) +- if (UNIX AND NOT APPLE) ++ if (UNIX AND NOT APPLE AND NOT protobuf_MSVC_STATIC_RUNTIME) + set_property(TARGET protoc + PROPERTY INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}") + elseif (APPLE) diff --git a/vcpkg/ports/protobuf/fix-uwp.patch b/vcpkg/ports/protobuf/fix-uwp.patch new file mode 100644 index 0000000..44f2357 --- /dev/null +++ b/vcpkg/ports/protobuf/fix-uwp.patch @@ -0,0 +1,12 @@ +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +index 9ca31ac0b..237468c55 100644 +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt +@@ -207,6 +207,7 @@ if (MSVC) + /wd4506 # no definition for inline function 'function' + /wd4800 # 'type' : forcing value to bool 'true' or 'false' (performance warning) + /wd4996 # The compiler encountered a deprecated declaration. ++ /wd4703 # Potentially uninitialized local pointer variable 'name' used. + ) + # Allow big object + add_definitions(/bigobj) diff --git a/vcpkg/ports/protobuf/portfile.cmake b/vcpkg/ports/protobuf/portfile.cmake new file mode 100644 index 0000000..47510b5 --- /dev/null +++ b/vcpkg/ports/protobuf/portfile.cmake @@ -0,0 +1,142 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO protocolbuffers/protobuf + REF fde7cf7358ec7cd69e8db9be4f1fa6a5c431386a #v3.13.0 + SHA512 b458410311a0905048c86d70ded263ae0cbb6693fd42cba730d3a95c69ca533cf453eb15c5f8bf8b00003ddc63fe96b3c4242907e2d6b00d5bec5d37b2ae1c5e + HEAD_REF master + PATCHES + fix-uwp.patch + fix-android-log.patch + fix-static-build.patch +) + +if(CMAKE_HOST_WIN32 AND NOT VCPKG_TARGET_ARCHITECTURE MATCHES "x64" AND NOT VCPKG_TARGET_ARCHITECTURE MATCHES "x86") + set(protobuf_BUILD_PROTOC_BINARIES OFF) +elseif(CMAKE_HOST_WIN32 AND NOT VCPKG_TARGET_IS_MINGW AND NOT (VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_UWP)) + set(protobuf_BUILD_PROTOC_BINARIES OFF) +else() + set(protobuf_BUILD_PROTOC_BINARIES ON) +endif() + +if(NOT protobuf_BUILD_PROTOC_BINARIES AND NOT EXISTS ${CURRENT_INSTALLED_DIR}/../x86-windows/tools/protobuf) + message(FATAL_ERROR "Cross-targetting protobuf requires the x86-windows protoc to be available. Please install protobuf:x86-windows first.") +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + set(VCPKG_BUILD_SHARED_LIBS ON) +else() + set(VCPKG_BUILD_SHARED_LIBS OFF) +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + set(VCPKG_BUILD_STATIC_CRT OFF) +else() + set(VCPKG_BUILD_STATIC_CRT ON) +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + zlib protobuf_WITH_ZLIB +) + +if (VCPKG_DOWNLOAD_MODE) + # download PKGCONFIG in download mode which is used in `vcpkg_fixup_pkgconfig()` at the end of this script. + # download it here because `vcpkg_configure_cmake()` halts execution in download mode when running configure process. + vcpkg_find_acquire_program(PKGCONFIG) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/cmake + PREFER_NINJA + OPTIONS + -Dprotobuf_BUILD_SHARED_LIBS=${VCPKG_BUILD_SHARED_LIBS} + -Dprotobuf_MSVC_STATIC_RUNTIME=${VCPKG_BUILD_STATIC_CRT} + -Dprotobuf_BUILD_TESTS=OFF + -DCMAKE_INSTALL_CMAKEDIR:STRING=share/protobuf + -Dprotobuf_BUILD_PROTOC_BINARIES=${protobuf_BUILD_PROTOC_BINARIES} + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +# It appears that at this point the build hasn't actually finished. There is probably +# a process spawned by the build, therefore we need to wait a bit. + +function(protobuf_try_remove_recurse_wait PATH_TO_REMOVE) + file(REMOVE_RECURSE ${PATH_TO_REMOVE}) + if (EXISTS "${PATH_TO_REMOVE}") + execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 5) + file(REMOVE_RECURSE ${PATH_TO_REMOVE}) + endif() +endfunction() + +protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/include) + +if(CMAKE_HOST_WIN32) + set(EXECUTABLE_SUFFIX ".exe") +else() + set(EXECUTABLE_SUFFIX "") +endif() + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake + "\${_IMPORT_PREFIX}/bin/protoc${EXECUTABLE_SUFFIX}" + "\${_IMPORT_PREFIX}/tools/protobuf/protoc${EXECUTABLE_SUFFIX}" +) +endif() + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(READ ${CURRENT_PACKAGES_DIR}/debug/share/protobuf/protobuf-targets-debug.cmake DEBUG_MODULE) + string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" DEBUG_MODULE "${DEBUG_MODULE}") + string(REPLACE "\${_IMPORT_PREFIX}/debug/bin/protoc${EXECUTABLE_SUFFIX}" "\${_IMPORT_PREFIX}/tools/protobuf/protoc${EXECUTABLE_SUFFIX}" DEBUG_MODULE "${DEBUG_MODULE}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-debug.cmake "${DEBUG_MODULE}") +endif() + +protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/share) + +if(CMAKE_HOST_WIN32) + if(protobuf_BUILD_PROTOC_BINARIES) + vcpkg_copy_tools(TOOL_NAMES protoc) + else() + file(COPY ${CURRENT_INSTALLED_DIR}/../x86-windows/tools/${PORT} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + endif() + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/bin) + protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin) + else() + protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/bin/protoc.exe) + protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin/protoc.exe) + endif() +else() + file(GLOB EXECUTABLES ${CURRENT_PACKAGES_DIR}/bin/protoc*) + foreach(E IN LISTS EXECUTABLES) + file(INSTALL ${E} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT} + PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ) + endforeach() + protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/debug/bin) + protobuf_try_remove_recurse_wait(${CURRENT_PACKAGES_DIR}/bin) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/platform_macros.h + "\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" + "\#ifndef PROTOBUF_USE_DLLS\n\#define PROTOBUF_USE_DLLS\n\#endif // PROTOBUF_USE_DLLS\n\n\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_" +) +endif() + +vcpkg_copy_pdbs() +set(packages protobuf protobuf-lite) +foreach(_package IN LISTS packages) + set(_file ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/${_package}.pc) + if(EXISTS "${_file}") + vcpkg_replace_string(${_file} "-l${_package}" "-l${_package}d") + endif() +endforeach() + +if(NOT VCPKG_TARGET_IS_WINDOWS) + set(SYSTEM_LIBRARIES SYSTEM_LIBRARIES pthread) +endif() +vcpkg_fixup_pkgconfig(${SYSTEM_LIBRARIES}) + +configure_file(${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake @ONLY) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/protobuf/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/protobuf/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..1a0f683 --- /dev/null +++ b/vcpkg/ports/protobuf/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,13 @@ +if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.3) + cmake_policy(PUSH) + cmake_policy(SET CMP0057 NEW) + if(NOT "CONFIG" IN_LIST ARGS AND NOT "NO_MODULE" IN_LIST ARGS) + if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static") + set(Protobuf_USE_STATIC_LIBS ON) + else() + set(Protobuf_USE_STATIC_LIBS OFF) + endif() + endif() + cmake_policy(POP) +endif() +_find_package(${ARGS}) diff --git a/vcpkg/ports/protozero/CONTROL b/vcpkg/ports/protozero/CONTROL new file mode 100644 index 0000000..c8e1403 --- /dev/null +++ b/vcpkg/ports/protozero/CONTROL @@ -0,0 +1,5 @@ +Source: protozero +Version: 1.6.8 +Homepage: https://github.com/am2222/mapnik-windows/ +Description: Minimalist protocol buffer decoder and encoder in C++ +Build-Depends: protobuf \ No newline at end of file diff --git a/vcpkg/ports/protozero/portfile.cmake b/vcpkg/ports/protozero/portfile.cmake new file mode 100644 index 0000000..5570349 --- /dev/null +++ b/vcpkg/ports/protozero/portfile.cmake @@ -0,0 +1,19 @@ + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mapbox/protozero + SHA512 24bab4bf4ff7c67b4f2d8e97919ccde115db4fa476462926102da2f48b4689d6b454df56dbc30754d0e81c37f669535e4b2101033b079ace0f4ea2706447abe1 + REF v1.6.8 + HEAD_REF master +) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja +) + +vcpkg_install_cmake() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug") +file(COPY ${SOURCE_PATH}/include/protozero DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN *.h) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/proxygen/CONTROL b/vcpkg/ports/proxygen/CONTROL new file mode 100644 index 0000000..86c5b5b --- /dev/null +++ b/vcpkg/ports/proxygen/CONTROL @@ -0,0 +1,5 @@ +Source: proxygen +Version: 2019.10.21.00 +Homepage: https://github.com/facebook/proxygen +Description: It comprises the core C++ HTTP abstractions used at Facebook. +Build-Depends: folly, fizz, wangle, zstd, zlib, openssl, boost-iostreams, boost-context, boost-date-time, boost-filesystem, boost-program-options, boost-regex, boost-system, boost-thread \ No newline at end of file diff --git a/vcpkg/ports/proxygen/fix-tools-path.patch b/vcpkg/ports/proxygen/fix-tools-path.patch new file mode 100644 index 0000000..2e6ab17 --- /dev/null +++ b/vcpkg/ports/proxygen/fix-tools-path.patch @@ -0,0 +1,49 @@ +diff --git a/proxygen/httpserver/CMakeLists.txt b/proxygen/httpserver/CMakeLists.txt +index 40046e5..ab53b06 100644 +--- a/proxygen/httpserver/CMakeLists.txt ++++ b/proxygen/httpserver/CMakeLists.txt +@@ -45,7 +45,7 @@ target_link_libraries( + install( + TARGETS proxygen_push + EXPORT proxygen-exports +- DESTINATION bin ++ DESTINATION tools + ) + + add_executable(proxygen_proxy +@@ -66,7 +66,7 @@ target_link_libraries( + install( + TARGETS proxygen_proxy + EXPORT proxygen-exports +- DESTINATION bin ++ DESTINATION tools + ) + + add_executable(proxygen_static +@@ -87,7 +87,7 @@ target_link_libraries( + install( + TARGETS proxygen_static + EXPORT proxygen-exports +- DESTINATION bin ++ DESTINATION tools + ) + + add_executable(proxygen_echo +@@ -108,7 +108,7 @@ target_link_libraries( + install( + TARGETS proxygen_echo + EXPORT proxygen-exports +- DESTINATION bin ++ DESTINATION tools + ) + + if (BUILD_QUIC) +@@ -140,7 +140,7 @@ if (BUILD_QUIC) + install( + TARGETS hq + EXPORT proxygen-exports +- DESTINATION bin ++ DESTINATION tools + ) + endif() + diff --git a/vcpkg/ports/proxygen/portfile.cmake b/vcpkg/ports/proxygen/portfile.cmake new file mode 100644 index 0000000..8624ea4 --- /dev/null +++ b/vcpkg/ports/proxygen/portfile.cmake @@ -0,0 +1,39 @@ +vcpkg_fail_port_install(ON_TARGET "Windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO facebook/proxygen + REF ac8a0f520b1d5fb91cd3f3ef681d4b37053b09f0 #v2019.10.21.00 + SHA512 2a76fed7cf9947e1096b36d25fe7886c06655fa2faf6d4829fd07c682efdf2bd9003a4c9e4772a4ccfd72df81e7066df736d2330a5edf0e836da30dcc81d3b5f + HEAD_REF master + PATCHES fix-tools-path.patch +) + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_PATH ${PYTHON3} DIRECTORY) +vcpkg_add_to_path(${PYTHON3_PATH}) + +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_find_acquire_program(GPERF) + get_filename_component(GPERF_PATH ${GPERF} DIRECTORY) + vcpkg_add_to_path(${GPERF_PATH}) +else() + # gperf only have windows package in vcpkg now. + if (NOT EXISTS /usr/bin/gperf) + message(FATAL_ERROR "proxygen requires gperf, these can be installed on Ubuntu systems via apt-get install gperf.") + endif() +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/proxygen) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +#Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/proxywrapper/CONTROL b/vcpkg/ports/proxywrapper/CONTROL new file mode 100644 index 0000000..c982b2c --- /dev/null +++ b/vcpkg/ports/proxywrapper/CONTROL @@ -0,0 +1,5 @@ +Source: proxywrapper +Version: 1.0.0 +Description: Provides a standalone wrapper around the libproxy library. +Homepage: https://github.com/microsoft/proxy-wrapper +Build-Depends: libproxy diff --git a/vcpkg/ports/proxywrapper/fix-find-libproxy.patch b/vcpkg/ports/proxywrapper/fix-find-libproxy.patch new file mode 100644 index 0000000..aeb45b9 --- /dev/null +++ b/vcpkg/ports/proxywrapper/fix-find-libproxy.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5a867a4..3ba85fa 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,11 +5,12 @@ project(proxywrapper) + + include(GNUInstallDirs) + +-find_library(proxy REQUIRED) ++find_package(libproxy REQUIRED) + +-add_library(proxywrapper SHARED ProxyWrapper.cpp) ++add_library(proxywrapper ProxyWrapper.cpp) + +-target_link_libraries(proxywrapper proxy) ++target_link_libraries(proxywrapper PRIVATE ${LIBPROXY_LIBRARIES}) ++target_include_directories(proxywrapper PRIVATE ${LIBPROXY_INCLUDE_DIR}) + + install(TARGETS proxywrapper EXPORT proxywrapper DESTINATION ${CMAKE_INSTALL_LIBDIR}) + diff --git a/vcpkg/ports/proxywrapper/fix-macos-build.patch b/vcpkg/ports/proxywrapper/fix-macos-build.patch new file mode 100644 index 0000000..8bdaeac --- /dev/null +++ b/vcpkg/ports/proxywrapper/fix-macos-build.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3ba85fa..f18fd1e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,7 +1,9 @@ + + cmake_minimum_required(VERSION 3.8) + +-project(proxywrapper) ++project(proxywrapper C CXX) ++ ++set(CMAKE_CXX_STANDARD 11) + + include(GNUInstallDirs) + diff --git a/vcpkg/ports/proxywrapper/portfile.cmake b/vcpkg/ports/proxywrapper/portfile.cmake new file mode 100644 index 0000000..048a9f9 --- /dev/null +++ b/vcpkg/ports/proxywrapper/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO microsoft/proxy-wrapper + REF b113aa0a284508ce0c2878febf9073d1f03b59dc + SHA512 9793ec8b9cc0467c88d850ea51a96a0fdc3c3027cc5b7fd9f5d0362d7fd559e909f19a4eaca6554a9316d6e3a86bb5f541034ca9ce2fb8797fb2e5bdff42b0de + HEAD_REF master + PATCHES + fix-find-libproxy.patch + fix-macos-build.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + diff --git a/vcpkg/ports/ptex/CONTROL b/vcpkg/ports/ptex/CONTROL new file mode 100644 index 0000000..501913c --- /dev/null +++ b/vcpkg/ports/ptex/CONTROL @@ -0,0 +1,6 @@ +Source: ptex +Version: 2.3.2-1 +Homepage: https://github.com/wdas/ptex +Description: Per-Face Texture Mapping for Production Rendering. +Build-Depends: zlib +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/ptex/fix-build.patch b/vcpkg/ports/ptex/fix-build.patch new file mode 100644 index 0000000..9c74eed --- /dev/null +++ b/vcpkg/ports/ptex/fix-build.patch @@ -0,0 +1,99 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c708153..0e004da 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -60,10 +60,11 @@ include(GNUInstallDirs) + include(CTest) + include(FindThreads) + ++find_package(ZLIB REQUIRED) ++if (0) + # Use pkg-config to create a PkgConfig::Ptex_ZLIB imported target + find_package(PkgConfig REQUIRED) + pkg_checK_modules(Ptex_ZLIB REQUIRED zlib IMPORTED_TARGET) +- + enable_testing() + + if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) +@@ -77,6 +78,7 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Release" CACHE STRING "type of build" FORCE) + endif () + endif () ++endif() + + if (NOT WIN32) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic") +@@ -99,7 +101,9 @@ endif () + include_directories(src/ptex) + + add_subdirectory(src/ptex) ++if (0) + add_subdirectory(src/utils) + add_subdirectory(src/tests) + add_subdirectory(src/doc) ++endif() + add_subdirectory(src/build) +diff --git a/src/ptex/CMakeLists.txt b/src/ptex/CMakeLists.txt +index ba3a3cc..1619ff1 100644 +--- a/src/ptex/CMakeLists.txt ++++ b/src/ptex/CMakeLists.txt +@@ -1,6 +1,8 @@ +-if (WIN32) +- add_definitions(/DPTEX_EXPORTS) +-endif (WIN32) ++if (BUILD_SHARED_LIBS) ++ add_definitions(-DPTEX_EXPORTS) ++else () ++ add_definitions(-DPTEX_STATIC) ++endif () + + configure_file(PtexVersion.h.in + ${CMAKE_CURRENT_SOURCE_DIR}/PtexVersion.h @ONLY) +@@ -18,29 +20,35 @@ set(SRCS + PtexWriter.cpp) + + if(PTEX_BUILD_STATIC_LIBS) +- add_library(Ptex_static STATIC ${SRCS}) +- set_target_properties(Ptex_static PROPERTIES OUTPUT_NAME Ptex) +- target_include_directories(Ptex_static ++ add_library(Ptex STATIC ${SRCS}) ++ target_include_directories(Ptex + PUBLIC + $ + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}) +- target_link_libraries(Ptex_static +- PUBLIC ${CMAKE_THREAD_LIBS_INIT} PkgConfig::Ptex_ZLIB) +- install(TARGETS Ptex_static EXPORT Ptex DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ target_link_libraries(Ptex ++ PUBLIC ${CMAKE_THREAD_LIBS_INIT} ZLIB::ZLIB) ++ install(TARGETS Ptex EXPORT Ptex ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ ) + endif() + + if(PTEX_BUILD_SHARED_LIBS) +- add_library(Ptex_dynamic SHARED ${SRCS}) +- set_target_properties(Ptex_dynamic PROPERTIES OUTPUT_NAME Ptex) +- target_include_directories(Ptex_dynamic ++ add_library(Ptex SHARED ${SRCS}) ++ target_include_directories(Ptex + PUBLIC + $ + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}) +- target_link_libraries(Ptex_dynamic +- PUBLIC ${CMAKE_THREAD_LIBS_INIT} PkgConfig::Ptex_ZLIB) +- install(TARGETS Ptex_dynamic EXPORT Ptex DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ target_link_libraries(Ptex ++ PUBLIC ${CMAKE_THREAD_LIBS_INIT} ZLIB::ZLIB) ++ install(TARGETS Ptex EXPORT Ptex ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ ) + endif() + + install(FILES diff --git a/vcpkg/ports/ptex/fix-config.cmake.patch b/vcpkg/ports/ptex/fix-config.cmake.patch new file mode 100644 index 0000000..d635d4e --- /dev/null +++ b/vcpkg/ports/ptex/fix-config.cmake.patch @@ -0,0 +1,18 @@ +diff --git a/src/build/ptex-config.cmake b/src/build/ptex-config.cmake +index f95df9e..2d3f58f 100644 +--- a/src/build/ptex-config.cmake ++++ b/src/build/ptex-config.cmake +@@ -1,11 +1,11 @@ + @PACKAGE_INIT@ + ++include(CMakeFindDependencyMacro) + include("${CMAKE_CURRENT_LIST_DIR}/ptex-version.cmake") + include("${CMAKE_CURRENT_LIST_DIR}/ptex-exports.cmake") + + # Provide PkgConfig::ZLIB to downstream dependents +-find_package(PkgConfig REQUIRED) +-pkg_checK_modules(Ptex_ZLIB REQUIRED zlib IMPORTED_TARGET) ++find_dependency(ZLIB REQUIRED) + + set_and_check(Ptex_DIR @PACKAGE_CMAKE_INSTALL_PREFIX@) + set_and_check(Ptex_LIBRARY_DIRS @PACKAGE_CMAKE_INSTALL_LIBDIR@) diff --git a/vcpkg/ports/ptex/portfile.cmake b/vcpkg/ports/ptex/portfile.cmake new file mode 100644 index 0000000..9333640 --- /dev/null +++ b/vcpkg/ports/ptex/portfile.cmake @@ -0,0 +1,49 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +set(PTEX_VER 2.3.2) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO wdas/ptex + REF 1b8bc985a71143317ae9e4969fa08e164da7c2e5 + SHA512 37f2df9ec195f3d69d9526d0dea6a93ef49d69287bfae6ccd9671477491502ea760ed14e3b206b4f488831ab728dc749847b7d176c9b8439fb58b0a0466fe6c5 + HEAD_REF master + PATCHES + fix-build.patch + fix-config.cmake.patch +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(BUILD_SHARED_LIB ON) + set(BUILD_STATIC_LIB OFF) +else() + set(BUILD_SHARED_LIB OFF) + set(BUILD_STATIC_LIB ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPTEX_VER="v${PTEX_VER}" + -DPTEX_BUILD_SHARED_LIBS=${BUILD_SHARED_LIB} + -DPTEX_BUILD_STATIC_LIBS=${BUILD_STATIC_LIB} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/Ptex) +vcpkg_copy_pdbs() + +foreach(HEADER PtexHalf.h Ptexture.h) + file(READ ${CURRENT_PACKAGES_DIR}/include/${HEADER} PTEX_HEADER) + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + string(REPLACE "ifndef PTEX_STATIC" "if 1" PTEX_HEADER "${PTEX_HEADER}") + else() + string(REPLACE "ifndef PTEX_STATIC" "if 0" PTEX_HEADER "${PTEX_HEADER}") + endif() + file(WRITE ${CURRENT_PACKAGES_DIR}/include/${HEADER} "${PTEX_HEADER}") +endforeach() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +# Handle copyright +file(INSTALL ${SOURCE_PATH}/src/doc/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/pthread/CONTROL b/vcpkg/ports/pthread/CONTROL new file mode 100644 index 0000000..6ce3193 --- /dev/null +++ b/vcpkg/ports/pthread/CONTROL @@ -0,0 +1,4 @@ +Source: pthread +Version: 3.0.0 +Build-Depends: pthreads +Description: empty package, linking to other port diff --git a/vcpkg/ports/pthread/portfile.cmake b/vcpkg/ports/pthread/portfile.cmake new file mode 100644 index 0000000..9aefc82 --- /dev/null +++ b/vcpkg/ports/pthread/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/vcpkg/ports/pthreads/CONTROL b/vcpkg/ports/pthreads/CONTROL new file mode 100644 index 0000000..0aadc97 --- /dev/null +++ b/vcpkg/ports/pthreads/CONTROL @@ -0,0 +1,5 @@ +Source: pthreads +Version: 3.0.0-6 +Homepage: https://sourceware.org/pub/pthreads-win32/ +Description: pthreads for windows +Supports: !(uwp|arm|arm64) \ No newline at end of file diff --git a/vcpkg/ports/pthreads/portfile.cmake b/vcpkg/ports/pthreads/portfile.cmake new file mode 100644 index 0000000..911eb4d --- /dev/null +++ b/vcpkg/ports/pthreads/portfile.cmake @@ -0,0 +1,94 @@ +if(NOT VCPKG_TARGET_IS_WINDOWS) + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + return() +endif() + +vcpkg_fail_port_install(MESSAGE "${PORT} does not currently support UWP platform nor ARM architectures" ON_TARGET "UWP" ON_ARCH "arm" ) + +set(PTHREADS4W_VERSION "3.0.0") + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO pthreads4w + FILENAME "pthreads4w-code-v${PTHREADS4W_VERSION}.zip" + SHA512 49e541b66c26ddaf812edb07b61d0553e2a5816ab002edc53a38a897db8ada6d0a096c98a9af73a8f40c94283df53094f76b429b09ac49862465d8697ed20013 +) + +find_program(NMAKE nmake REQUIRED) + +################ +# Release build +################ +message(STATUS "Building ${TARGET_TRIPLET}-rel") +file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL) +vcpkg_execute_required_process( + COMMAND ${NMAKE} -f Makefile all install + "DESTROOT=\"${INST_DIR_REL}\"" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME nmake-build-${TARGET_TRIPLET}-release +) +message(STATUS "Building ${TARGET_TRIPLET}-rel done") + +################ +# Debug build +################ +message(STATUS "Building ${TARGET_TRIPLET}-dbg") +file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/debug" INST_DIR_DBG) +vcpkg_execute_required_process( + COMMAND ${NMAKE} /G -f Makefile all install + "DESTROOT=\"${INST_DIR_DBG}\"" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME nmake-build-${TARGET_TRIPLET}-debug +) +message(STATUS "Building ${TARGET_TRIPLET}-dbg done") + +file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/pthreadVC3d.dll") +file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/pthreadVCE3d.dll") +file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/pthreadVSE3d.dll") +file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/pthreadVC3.dll") +file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/pthreadVCE3.dll") +file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/pthreadVSE3.dll") + +file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/libpthreadVC3d.lib") +file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/libpthreadVCE3d.lib") +file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/libpthreadVSE3d.lib") +file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/libpthreadVC3.lib") +file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/libpthreadVCE3.lib") +file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/libpthreadVSE3.lib") + +file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/pthreadVC3d.lib") +file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/pthreadVCE3d.lib") +file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/pthreadVSE3d.lib") +file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/pthreadVC3.lib") +file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/pthreadVCE3.lib") +file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/pthreadVSE3.lib") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/libpthreadVC3.lib") + file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/libpthreadVCE3.lib") + file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/libpthreadVSE3.lib") + file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/libpthreadVC3d.lib") + file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/libpthreadVCE3d.lib") + file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/libpthreadVSE3d.lib") +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libpthreadVC3.lib ${CURRENT_PACKAGES_DIR}/lib/pthreadVC3.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libpthreadVCE3.lib ${CURRENT_PACKAGES_DIR}/lib/pthreadVCE3.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libpthreadVSE3.lib ${CURRENT_PACKAGES_DIR}/lib/pthreadVSE3.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libpthreadVC3d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/pthreadVC3d.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libpthreadVCE3d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/pthreadVCE3d.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libpthreadVSE3d.lib ${CURRENT_PACKAGES_DIR}/debug/lib/pthreadVSE3d.lib) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/pthread) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/pthreads) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/pthreads_windows) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +set(VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS enabled) diff --git a/vcpkg/ports/pthreads/usage b/vcpkg/ports/pthreads/usage new file mode 100644 index 0000000..343c97f --- /dev/null +++ b/vcpkg/ports/pthreads/usage @@ -0,0 +1,9 @@ +The package pthreads provides CMake targets: + + find_package(pthreads REQUIRED) + + target_link_libraries(main PRIVATE PThreads4W::PThreads4W) + #or + target_link_libraries(main PRIVATE PThreads4W::PThreads4W_CXXEXC) + #or + target_link_libraries(main PRIVATE PThreads4W::PThreads4W_STRUCTEXC) \ No newline at end of file diff --git a/vcpkg/ports/pthreads/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/pthreads/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..12d390a --- /dev/null +++ b/vcpkg/ports/pthreads/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,224 @@ +#.rst: +# PThreads4W config wrap for vcpkg +# ------------ +# +# Find the PThread4W includes and library. +# +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# This script defines the following variables: +# +# ``PThreads4W_FOUND`` +# True if PThreads4W library found +# +# ``PThreads4W_VERSION`` +# Containing the PThreads4W version tag (manually defined) +# +# ``PThreads4W_INCLUDE_DIR`` +# Location of PThreads4W headers +# +# ``PThreads4W_LIBRARY`` +# List of libraries to link with when using PThreads4W (no exception handling) +# +# ``PThreads4W_CXXEXC_LIBRARY`` +# List of libraries to link with when using PThreads4W (C++ exception handling) +# +# ``PThreads4W_STRUCTEXC_LIBRARY`` +# List of libraries to link with when using PThreads4W (struct exception handling) +# +# Result Targets +# ^^^^^^^^^^^^^^^^ +# +# This script defines the following targets: +# +# ``PThreads4W::PThreads4W`` +# Target to use PThreads4W (no exception handling) +# +# ``PThreads4W::PThreads4W_CXXEXC`` +# Target to use PThreads4W (C++ exception handling) +# +# ``PThreads4W::PThreads4W_STRUCTEXC`` +# Target to use PThreads4W (struct exception handling) +# + +include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) +include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) + +if(NOT PThreads4W_INCLUDE_DIR) + find_path(PThreads4W_INCLUDE_DIR NAMES pthread.h) +endif() + +set(PThreads4W_MAJOR_VERSION 3) +set(PThreads4W_MINOR_VERSION 0) +set(PThreads4W_PATCH_VERSION 0) +set(PThreads4W_VERSION "${PThreads4W_MAJOR_VERSION}.${PThreads4W_MINOR_VERSION}.${PThreads4W_PATCH_VERSION}") + +# Allow libraries to be set manually +if(NOT PThreads4W_LIBRARY) + find_library(PThreads4W_LIBRARY_RELEASE NAMES pthreadVC${PThreads4W_MAJOR_VERSION}) + find_library(PThreads4W_LIBRARY_DEBUG NAMES pthreadVC${PThreads4W_MAJOR_VERSION}d) + select_library_configurations(PThreads4W) +endif() +if(NOT PThreads4W_CXXEXC_LIBRARY) + find_library(PThreads4W_CXXEXC_LIBRARY_RELEASE NAMES pthreadVCE${PThreads4W_MAJOR_VERSION}) + find_library(PThreads4W_CXXEXC_LIBRARY_DEBUG NAMES pthreadVCE${PThreads4W_MAJOR_VERSION}d) + select_library_configurations(PThreads4W_CXXEXC) +endif() +if(NOT PThreads4W_STRUCTEXC_LIBRARY) + find_library(PThreads4W_STRUCTEXC_LIBRARY_RELEASE NAMES pthreadVSE${PThreads4W_MAJOR_VERSION}) + find_library(PThreads4W_STRUCTEXC_LIBRARY_DEBUG NAMES pthreadVSE${PThreads4W_MAJOR_VERSION}d) + select_library_configurations(PThreads4W_STRUCTEXC) +endif() + +find_package_handle_standard_args(PThreads4W DEFAULT_MSG PThreads4W_LIBRARY PThreads4W_CXXEXC_LIBRARY PThreads4W_STRUCTEXC_LIBRARY PThreads4W_INCLUDE_DIR) +mark_as_advanced(PThreads4W_INCLUDE_DIR PThreads4W_LIBRARY PThreads4W_CXXEXC_LIBRARY PThreads4W_STRUCTEXC_LIBRARY) + +set(PThreads4W_DLL_DIR ${PThreads4W_INCLUDE_DIR}) +list(TRANSFORM PThreads4W_DLL_DIR APPEND "/../bin") +message(STATUS "PThreads4W_DLL_DIR: ${PThreads4W_DLL_DIR}") + +find_file(PThreads4W_LIBRARY_RELEASE_DLL NAMES pthreadVC${PThreads4W_MAJOR_VERSION}.dll PATHS ${PThreads4W_DLL_DIR}) +find_file(PThreads4W_LIBRARY_DEBUG_DLL NAMES pthreadVC${PThreads4W_MAJOR_VERSION}d.dll PATHS ${PThreads4W_DLL_DIR}) +find_file(PThreads4W_CXXEXC_LIBRARY_RELEASE_DLL NAMES pthreadVCE${PThreads4W_MAJOR_VERSION}.dll PATHS ${PThreads4W_DLL_DIR}) +find_file(PThreads4W_CXXEXC_LIBRARY_DEBUG_DLL NAMES pthreadVCE${PThreads4W_MAJOR_VERSION}d.dll PATHS ${PThreads4W_DLL_DIR}) +find_file(PThreads4W_STRUCTEXC_LIBRARY_RELEASE_DLL NAMES pthreadVSE${PThreads4W_MAJOR_VERSION}.dll PATHS ${PThreads4W_DLL_DIR}) +find_file(PThreads4W_STRUCTEXC_LIBRARY_DEBUG_DLL NAMES pthreadVSE${PThreads4W_MAJOR_VERSION}d.dll PATHS ${PThreads4W_DLL_DIR}) + +#Compatibility definitions, deprecated +set(PTHREAD_INCLUDE_DIR ${PThreads4W_INCLUDE_DIR} CACHE PATH "") +set(PTHREADS_INCLUDE_DIR ${PThreads4W_INCLUDE_DIR} CACHE PATH "") +set(PThreads_windows_INCLUDE_DIR ${PThreads4W_INCLUDE_DIR} CACHE PATH "") +set(PTHREAD_LIBRARIES ${PThreads4W_LIBRARY} CACHE STRING "") +set(PTHREADS_LIBRARIES ${PThreads4W_LIBRARY} CACHE STRING "") +set(PTHREAD_LIBRARY ${PThreads4W_LIBRARY} CACHE STRING "") +set(PTHREADS_LIBRARY ${PThreads4W_LIBRARY} CACHE STRING "") +set(LIBPTHREAD ${PThreads4W_LIBRARY} CACHE STRING "") +set(LIBPTHREADS ${PThreads4W_LIBRARY} CACHE STRING "") +set(PThreads_windows_LIBRARY ${PThreads4W_LIBRARY} CACHE STRING "") +set(PThreads_VERSION "${PThreads4W_VERSION}") +if(PThreads4W_FOUND) + set(PThreads_windows_FOUND TRUE) +endif() + +#TARGETS +if( PThreads4W_FOUND AND NOT TARGET PThreads4W::PThreads4W_CXXEXC ) + if( EXISTS "${PThreads4W_CXXEXC_LIBRARY_RELEASE_DLL}" ) + add_library( PThreads4W::PThreads4W_CXXEXC SHARED IMPORTED ) + set_target_properties( PThreads4W::PThreads4W_CXXEXC PROPERTIES + IMPORTED_LOCATION_RELEASE "${PThreads4W_CXXEXC_LIBRARY_RELEASE_DLL}" + IMPORTED_IMPLIB "${PThreads4W_CXXEXC_LIBRARY_RELEASE}" + INTERFACE_INCLUDE_DIRECTORIES "${PThreads4W_INCLUDE_DIR}" + IMPORTED_CONFIGURATIONS Release + IMPORTED_LINK_INTERFACE_LANGUAGES "C" ) + if( EXISTS "${PThreads4W_CXXEXC_LIBRARY_DEBUG_DLL}" ) + set_property( TARGET PThreads4W::PThreads4W_CXXEXC APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug ) + set_target_properties( PThreads4W::PThreads4W_CXXEXC PROPERTIES + IMPORTED_LOCATION_DEBUG "${PThreads4W_CXXEXC_LIBRARY_DEBUG_DLL}" + IMPORTED_IMPLIB_DEBUG "${PThreads4W_CXXEXC_LIBRARY_DEBUG}" ) + endif() + else() + add_library( PThreads4W::PThreads4W_CXXEXC UNKNOWN IMPORTED ) + set_target_properties( PThreads4W::PThreads4W_CXXEXC PROPERTIES + IMPORTED_LOCATION_RELEASE "${PThreads4W_CXXEXC_LIBRARY_RELEASE}" + INTERFACE_INCLUDE_DIRECTORIES "${PThreads4W_INCLUDE_DIR}" + IMPORTED_CONFIGURATIONS Release + IMPORTED_LINK_INTERFACE_LANGUAGES "C" ) + if( EXISTS "${PThreads4W_CXXEXC_LIBRARY_DEBUG}" ) + set_property( TARGET PThreads4W::PThreads4W_CXXEXC APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug ) + set_target_properties( PThreads4W::PThreads4W_CXXEXC PROPERTIES + IMPORTED_LOCATION_DEBUG "${PThreads4W_CXXEXC_LIBRARY_DEBUG}" ) + endif() + endif() +endif() + +if( PThreads4W_FOUND AND NOT TARGET PThreads4W::PThreads4W_STRUCTEXC ) + if( EXISTS "${PThreads4W_STRUCTEXC_LIBRARY_RELEASE_DLL}" ) + add_library( PThreads4W::PThreads4W_STRUCTEXC SHARED IMPORTED ) + set_target_properties( PThreads4W::PThreads4W_STRUCTEXC PROPERTIES + IMPORTED_LOCATION_RELEASE "${PThreads4W_STRUCTEXC_LIBRARY_RELEASE_DLL}" + IMPORTED_IMPLIB "${PThreads4W_STRUCTEXC_LIBRARY_RELEASE}" + INTERFACE_INCLUDE_DIRECTORIES "${PThreads4W_INCLUDE_DIR}" + IMPORTED_CONFIGURATIONS Release + IMPORTED_LINK_INTERFACE_LANGUAGES "C" ) + if( EXISTS "${PThreads4W_STRUCTEXC_LIBRARY_DEBUG_DLL}" ) + set_property( TARGET PThreads4W::PThreads4W_STRUCTEXC APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug ) + set_target_properties( PThreads4W::PThreads4W_STRUCTEXC PROPERTIES + IMPORTED_LOCATION_DEBUG "${PThreads4W_STRUCTEXC_LIBRARY_DEBUG_DLL}" + IMPORTED_IMPLIB_DEBUG "${PThreads4W_STRUCTEXC_LIBRARY_DEBUG}" ) + endif() + else() + add_library( PThreads4W::PThreads4W_STRUCTEXC UNKNOWN IMPORTED ) + set_target_properties( PThreads4W::PThreads4W_STRUCTEXC PROPERTIES + IMPORTED_LOCATION_RELEASE "${PThreads4W_STRUCTEXC_LIBRARY_RELEASE}" + INTERFACE_INCLUDE_DIRECTORIES "${PThreads4W_INCLUDE_DIR}" + IMPORTED_CONFIGURATIONS Release + IMPORTED_LINK_INTERFACE_LANGUAGES "C" ) + if( EXISTS "${PThreads4W_STRUCTEXC_LIBRARY_DEBUG}" ) + set_property( TARGET PThreads4W::PThreads4W_STRUCTEXC APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug ) + set_target_properties( PThreads4W::PThreads4W_STRUCTEXC PROPERTIES + IMPORTED_LOCATION_DEBUG "${PThreads4W_STRUCTEXC_LIBRARY_DEBUG}" ) + endif() + endif() +endif() + +if( PThreads4W_FOUND AND NOT TARGET PThreads4W::PThreads4W ) + if( EXISTS "${PThreads4W_LIBRARY_RELEASE_DLL}" ) + add_library( PThreads4W::PThreads4W SHARED IMPORTED ) + set_target_properties( PThreads4W::PThreads4W PROPERTIES + IMPORTED_LOCATION_RELEASE "${PThreads4W_LIBRARY_RELEASE_DLL}" + IMPORTED_IMPLIB "${PThreads4W_LIBRARY_RELEASE}" + INTERFACE_INCLUDE_DIRECTORIES "${PThreads4W_INCLUDE_DIR}" + IMPORTED_CONFIGURATIONS Release + IMPORTED_LINK_INTERFACE_LANGUAGES "C" ) + if( EXISTS "${PThreads4W_LIBRARY_DEBUG_DLL}" ) + set_property( TARGET PThreads4W::PThreads4W APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug ) + set_target_properties( PThreads4W::PThreads4W PROPERTIES + IMPORTED_LOCATION_DEBUG "${PThreads4W_LIBRARY_DEBUG_DLL}" + IMPORTED_IMPLIB_DEBUG "${PThreads4W_LIBRARY_DEBUG}" ) + endif() + else() + add_library( PThreads4W::PThreads4W UNKNOWN IMPORTED ) + set_target_properties( PThreads4W::PThreads4W PROPERTIES + IMPORTED_LOCATION_RELEASE "${PThreads4W_LIBRARY_RELEASE}" + INTERFACE_INCLUDE_DIRECTORIES "${PThreads4W_INCLUDE_DIR}" + IMPORTED_CONFIGURATIONS Release + IMPORTED_LINK_INTERFACE_LANGUAGES "C" ) + if( EXISTS "${PThreads4W_LIBRARY_DEBUG}" ) + set_property( TARGET PThreads4W::PThreads4W APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug ) + set_target_properties( PThreads4W::PThreads4W PROPERTIES + IMPORTED_LOCATION_DEBUG "${PThreads4W_LIBRARY_DEBUG}" ) + endif() + endif() +endif() + +#Compatibility targets, deprecated +if( PThreads4W_FOUND AND NOT TARGET PThreads_windows::PThreads_windows ) + if( EXISTS "${PThreads4W_LIBRARY_RELEASE_DLL}" ) + add_library( PThreads_windows::PThreads_windows SHARED IMPORTED ) + set_target_properties( PThreads_windows::PThreads_windows PROPERTIES + IMPORTED_LOCATION_RELEASE "${PThreads4W_LIBRARY_RELEASE_DLL}" + IMPORTED_IMPLIB "${PThreads4W_LIBRARY_RELEASE}" + INTERFACE_INCLUDE_DIRECTORIES "${PThreads4W_INCLUDE_DIR}" + IMPORTED_CONFIGURATIONS Release + IMPORTED_LINK_INTERFACE_LANGUAGES "C" ) + if( EXISTS "${PThreads4W_LIBRARY_DEBUG_DLL}" ) + set_property( TARGET PThreads_windows::PThreads_windows APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug ) + set_target_properties( PThreads_windows::PThreads_windows PROPERTIES + IMPORTED_LOCATION_DEBUG "${PThreads4W_LIBRARY_DEBUG_DLL}" + IMPORTED_IMPLIB_DEBUG "${PThreads4W_LIBRARY_DEBUG}" ) + endif() + else() + add_library( PThreads_windows::PThreads_windows UNKNOWN IMPORTED ) + set_target_properties( PThreads_windows::PThreads_windows PROPERTIES + IMPORTED_LOCATION_RELEASE "${PThreads4W_LIBRARY_RELEASE}" + INTERFACE_INCLUDE_DIRECTORIES "${PThreads4W_INCLUDE_DIR}" + IMPORTED_CONFIGURATIONS Release + IMPORTED_LINK_INTERFACE_LANGUAGES "C" ) + if( EXISTS "${PThreads4W_LIBRARY_DEBUG}" ) + set_property( TARGET PThreads_windows::PThreads_windows APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug ) + set_target_properties( PThreads_windows::PThreads_windows PROPERTIES + IMPORTED_LOCATION_DEBUG "${PThreads4W_LIBRARY_DEBUG}" ) + endif() + endif() +endif() diff --git a/vcpkg/ports/pugixml/CONTROL b/vcpkg/ports/pugixml/CONTROL new file mode 100644 index 0000000..2d4b2a4 --- /dev/null +++ b/vcpkg/ports/pugixml/CONTROL @@ -0,0 +1,5 @@ +Source: pugixml +Version: 1.10 +Port-Version: 2 +Homepage: https://github.com/zeux/pugixml +Description: C++ XML processing library diff --git a/vcpkg/ports/pugixml/portfile.cmake b/vcpkg/ports/pugixml/portfile.cmake new file mode 100644 index 0000000..a96d0ad --- /dev/null +++ b/vcpkg/ports/pugixml/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zeux/pugixml + REF v1.10 + SHA512 0634053d4f757b9293997763bb2e51595197c192f3974e954975d6d6ff91e4a6cb7c194efa530e0eef1a2a93db16592c5630010b6482430dff5ffc6879e84b6a + HEAD_REF master + PATCHES pugixml-v1.10_fix_debug_pkgconfig.patch # Upstream: https://github.com/zeux/pugixml/pull/363 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DUSE_POSTFIX=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/pugixml) +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/readme.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/pugixml/pugixml-v1.10_fix_debug_pkgconfig.patch b/vcpkg/ports/pugixml/pugixml-v1.10_fix_debug_pkgconfig.patch new file mode 100644 index 0000000..24d428d --- /dev/null +++ b/vcpkg/ports/pugixml/pugixml-v1.10_fix_debug_pkgconfig.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f043962..b281cba 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -94,6 +94,16 @@ install(TARGETS ${LIBRARY} EXPORT pugixml-config + install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}${INSTALL_SUFFIX}) + install(EXPORT pugixml-config DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml) + ++if (USE_POSTFIX) ++ if(CMAKE_BUILD_TYPE MATCHES RelWithDebInfo) ++ set(LIB_POSTFIX "_r") ++ elseif(CMAKE_BUILD_TYPE MATCHES MinSizeRel) ++ set(LIB_POSTFIX "_m") ++ elseif(CMAKE_BUILD_TYPE MATCHES Debug) ++ set(LIB_POSTFIX "_d") ++ endif() ++endif() ++ + configure_file(scripts/pugixml.pc.in ${PROJECT_BINARY_DIR}/pugixml.pc @ONLY) + install(FILES ${PROJECT_BINARY_DIR}/pugixml.pc DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig) + +diff --git a/scripts/pugixml.pc.in b/scripts/pugixml.pc.in +index f9c3fd4..7958774 100644 +--- a/scripts/pugixml.pc.in ++++ b/scripts/pugixml.pc.in +@@ -8,4 +8,4 @@ Description: Light-weight, simple and fast XML parser for C++ with XPath support + URL: https://pugixml.org/ + Version: @pugixml_VERSION@ + Cflags: -I${includedir} +-Libs: -L${libdir} -lpugixml ++Libs: -L${libdir} -lpugixml@LIB_POSTFIX@ diff --git a/vcpkg/ports/pybind11/CONTROL b/vcpkg/ports/pybind11/CONTROL new file mode 100644 index 0000000..aba68cb --- /dev/null +++ b/vcpkg/ports/pybind11/CONTROL @@ -0,0 +1,6 @@ +Source: pybind11 +Version: 2.5.0 +Port-Version: 1 +Homepage: https://github.com/pybind/pybind11 +Description: pybind11 is a lightweight header-only library that exposes C++ types in Python and vice versa, mainly to create Python bindings of existing C++ code. +Build-Depends: python3 (windows) diff --git a/vcpkg/ports/pybind11/portfile.cmake b/vcpkg/ports/pybind11/portfile.cmake new file mode 100644 index 0000000..7277205 --- /dev/null +++ b/vcpkg/ports/pybind11/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pybind/pybind11 + REF 3b1dbebabc801c9cf6f0953a4c20b904d444f879 # v2.5.0 + SHA512 1a75d29447dbba96eebf8ecdebad1be0dd5327c32f5122b0ece9d9ec22eae4feacd0efb3a5070b3a135a892b1682c7215b0c529b179493694df932945a379f4c + HEAD_REF master +) + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYPATH ${PYTHON3} PATH) +vcpkg_add_to_path("${PYPATH}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPYBIND11_TEST=OFF + -DPYTHONLIBS_FOUND=ON + -DPYTHON_INCLUDE_DIRS=${CURRENT_INSTALLED_DIR}/include + -DPYTHON_MODULE_EXTENSION=.dll + OPTIONS_RELEASE + -DPYTHON_IS_DEBUG=OFF + -DPYTHON_LIBRARIES=${CURRENT_INSTALLED_DIR}/lib/python36.lib + OPTIONS_DEBUG + -DPYTHON_IS_DEBUG=ON + -DPYTHON_LIBRARIES=${CURRENT_INSTALLED_DIR}/debug/lib/python36_d.lib +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/pybind11) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/) + +# copy license +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/pystring/CMakeLists.txt b/vcpkg/ports/pystring/CMakeLists.txt new file mode 100644 index 0000000..ecfdaa4 --- /dev/null +++ b/vcpkg/ports/pystring/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.5.1) +project(libpystring C CXX) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +add_library(libpystring pystring.cpp) + +install( + TARGETS libpystring + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES pystring.h DESTINATION include) +endif() diff --git a/vcpkg/ports/pystring/CONTROL b/vcpkg/ports/pystring/CONTROL new file mode 100644 index 0000000..698e046 --- /dev/null +++ b/vcpkg/ports/pystring/CONTROL @@ -0,0 +1,4 @@ +Source: pystring +Version: 1.1.3-2 +Homepage: https://github.com/imageworks/pystring +Description: Pystring is a collection of C++ functions which match the interface and behavior of python's string class methods using std::string diff --git a/vcpkg/ports/pystring/portfile.cmake b/vcpkg/ports/pystring/portfile.cmake new file mode 100644 index 0000000..8384bc0 --- /dev/null +++ b/vcpkg/ports/pystring/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO imageworks/pystring + REF v1.1.3 + SHA512 a46bb2e96d6eb351a4a8097cde46ac2877d28e88f9e57e0ac36c42e8fc8543517c4be70306a01e2f88a891fc53c612494aeb37f47a200d94b8e1b050ed16eff6 + 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() +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/pystring RENAME copyright) diff --git a/vcpkg/ports/python2/001-build-msvc.patch b/vcpkg/ports/python2/001-build-msvc.patch new file mode 100644 index 0000000..e16258e --- /dev/null +++ b/vcpkg/ports/python2/001-build-msvc.patch @@ -0,0 +1,227 @@ +From 4988ea4f4ce6af0b567e6a2dc2c23aaf7cc5f12d Mon Sep 17 00:00:00 2001 +From: Jean-Christophe Fillion-Robin +Date: Mon, 31 Jul 2017 10:59:47 -0400 +Subject: [PATCH 1/3] VS2010 Support: Backport "Fix #13210. Port the Windows + build from VS2008 to VS2010." + +This commit is a partial backport of python/cpython@401f9f3. It was +originally designed to work with python-cmake-buildsystem. + +The following modules have NOT been backported: + +* Tools/msi +* Tools/buildbot +* PCBuild +--- + Lib/distutils/command/build_ext.py | 2 +- + Lib/distutils/msvc9compiler.py | 11 ++++++----- + PC/dl_nt.c | 11 ++++++++++- + PC/msvcrtmodule.c | 15 ++++++++++++++- + PC/pyconfig.h | 9 +++++++-- + Python/dynload_win.c | 8 ++++++++ + 6 files changed, 46 insertions(+), 10 deletions(-) + +diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py +index 2c68be3..f1d184b 100644 +--- a/Lib/distutils/command/build_ext.py ++++ b/Lib/distutils/command/build_ext.py +@@ -193,7 +193,7 @@ class build_ext (Command): + # Append the source distribution include and library directories, + # this allows distutils on windows to work in the source tree + self.include_dirs.append(os.path.join(sys.exec_prefix, 'PC')) +- if MSVC_VERSION == 9: ++ if MSVC_VERSION >= 9: + # Use the .lib files for the correct architecture + if self.plat_name == 'win32': + suffix = '' +diff --git a/Lib/distutils/msvc9compiler.py b/Lib/distutils/msvc9compiler.py +index 33d3e51..f6de11c 100644 +--- a/Lib/distutils/msvc9compiler.py ++++ b/Lib/distutils/msvc9compiler.py +@@ -662,11 +662,12 @@ class MSVCCompiler(CCompiler) : + if mfinfo is not None: + mffilename, mfid = mfinfo + out_arg = '-outputresource:%s;%s' % (output_filename, mfid) +- try: +- self.spawn(['mt.exe', '-nologo', '-manifest', +- mffilename, out_arg]) +- except DistutilsExecError, msg: +- raise LinkError(msg) ++ if self.__version < 10: ++ try: ++ self.spawn(['mt.exe', '-nologo', '-manifest', ++ temp_manifest, out_arg]) ++ except PackagingExecError as msg: ++ raise LinkError(msg) + else: + log.debug("skipping %s (up-to-date)", output_filename) + +diff --git a/PC/dl_nt.c b/PC/dl_nt.c +index ef1ce09..5ff07fd 100644 +--- a/PC/dl_nt.c ++++ b/PC/dl_nt.c +@@ -18,7 +18,8 @@ char dllVersionBuffer[16] = ""; // a private buffer + HMODULE PyWin_DLLhModule = NULL; + const char *PyWin_DLLVersionString = dllVersionBuffer; + +-// Windows "Activation Context" work: ++#if HAVE_SXS ++// Windows "Activation Context" work. + // Our .pyd extension modules are generally built without a manifest (ie, + // those included with Python and those built with a default distutils. + // This requires we perform some "activation context" magic when loading our +@@ -29,6 +30,8 @@ const char *PyWin_DLLVersionString = dllVersionBuffer; + // As an added complication, this magic only works on XP or later - we simply + // use the existence (or not) of the relevant function pointers from kernel32. + // See bug 4566 (http://python.org/sf/4566) for more details. ++// In Visual Studio 2010, side by side assemblies are no longer used by ++// default. + + typedef BOOL (WINAPI * PFN_GETCURRENTACTCTX)(HANDLE *); + typedef BOOL (WINAPI * PFN_ACTIVATEACTCTX)(HANDLE, ULONG_PTR *); +@@ -76,6 +79,8 @@ void _Py_DeactivateActCtx(ULONG_PTR cookie) + OutputDebugString("Python failed to de-activate the activation context\n"); + } + ++#endif /* HAVE_SXS */ ++ + BOOL WINAPI DllMain (HANDLE hInst, + ULONG ul_reason_for_call, + LPVOID lpReserved) +@@ -87,17 +92,21 @@ BOOL WINAPI DllMain (HANDLE hInst, + // 1000 is a magic number I picked out of the air. Could do with a #define, I spose... + LoadString(hInst, 1000, dllVersionBuffer, sizeof(dllVersionBuffer)); + ++#if HAVE_SXS + // and capture our activation context for use when loading extensions. + _LoadActCtxPointers(); + if (pfnGetCurrentActCtx && pfnAddRefActCtx) + if ((*pfnGetCurrentActCtx)(&PyWin_DLLhActivationContext)) + if (!(*pfnAddRefActCtx)(PyWin_DLLhActivationContext)) + OutputDebugString("Python failed to load the default activation context\n"); ++#endif + break; + + case DLL_PROCESS_DETACH: ++#if HAVE_SXS + if (pfnReleaseActCtx) + (*pfnReleaseActCtx)(PyWin_DLLhActivationContext); ++#endif + break; + } + return TRUE; +diff --git a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c +index 44c82e4..68928dd 100644 +--- a/PC/msvcrtmodule.c ++++ b/PC/msvcrtmodule.c +@@ -25,6 +25,8 @@ + #ifdef _MSC_VER + #if _MSC_VER >= 1500 && _MSC_VER < 1600 + #include ++#elif _MSC_VER >= 1600 ++#include + #endif + #endif + +@@ -398,7 +400,7 @@ PyMODINIT_FUNC + initmsvcrt(void) + { + int st; +- PyObject *d; ++ PyObject *d, *version; + PyObject *m = Py_InitModule("msvcrt", msvcrt_functions); + if (m == NULL) + return; +@@ -412,6 +414,7 @@ initmsvcrt(void) + insertint(d, "LK_UNLCK", _LK_UNLCK); + + /* constants for the crt versions */ ++ (void)st; + #ifdef _VC_ASSEMBLY_PUBLICKEYTOKEN + st = PyModule_AddStringConstant(m, "VC_ASSEMBLY_PUBLICKEYTOKEN", + _VC_ASSEMBLY_PUBLICKEYTOKEN); +@@ -427,4 +430,14 @@ initmsvcrt(void) + __LIBRARIES_ASSEMBLY_NAME_PREFIX); + if (st < 0)return; + #endif ++ ++/* constants for the 2010 crt versions */ ++#if defined(_VC_CRT_MAJOR_VERSION) && defined (_VC_CRT_MINOR_VERSION) && defined(_VC_CRT_BUILD_VERSION) && defined(_VC_CRT_RBUILD_VERSION) ++ version = PyUnicode_FromFormat("%d.%d.%d.%d", _VC_CRT_MAJOR_VERSION, ++ _VC_CRT_MINOR_VERSION, ++ _VC_CRT_BUILD_VERSION, ++ _VC_CRT_RBUILD_VERSION); ++ st = PyModule_AddObject(m, "CRT_ASSEMBLY_VERSION", version); ++ if (st < 0) return NULL; ++#endif + } +diff --git a/PC/pyconfig.h b/PC/pyconfig.h +index 5d1c90a..b60af1e 100644 +--- a/PC/pyconfig.h ++++ b/PC/pyconfig.h +@@ -231,14 +231,19 @@ typedef int pid_t; + #define hypot _hypot + #endif + +-#endif /* _MSC_VER */ ++/* Side by Side assemblies supported in VS 2005 and VS 2008 but not 2010*/ ++#if _MSC_VER >= 1400 && _MSC_VER < 1600 ++#define HAVE_SXS 1 ++#endif + + /* define some ANSI types that are not defined in earlier Win headers */ +-#if defined(_MSC_VER) && _MSC_VER >= 1200 ++#if _MSC_VER >= 1200 + /* This file only exists in VC 6.0 or higher */ + #include + #endif + ++#endif /* _MSC_VER */ ++ + /* ------------------------------------------------------------------------*/ + /* The Borland compiler defines __BORLANDC__ */ + /* XXX These defines are likely incomplete, but should be easy to fix. */ +diff --git a/Python/dynload_win.c b/Python/dynload_win.c +index 4e5555e..8626642 100644 +--- a/Python/dynload_win.c ++++ b/Python/dynload_win.c +@@ -12,8 +12,10 @@ + #include + + // "activation context" magic - see dl_nt.c... ++#if HAVE_SXS + extern ULONG_PTR _Py_ActivateActCtx(); + void _Py_DeactivateActCtx(ULONG_PTR cookie); ++#endif + + const struct filedescr _PyImport_DynLoadFiletab[] = { + #ifdef _DEBUG +@@ -176,7 +178,9 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname, + char pathbuf[260]; + LPTSTR dummy; + unsigned int old_mode; ++#if HAVE_SXS + ULONG_PTR cookie = 0; ++#endif + /* We use LoadLibraryEx so Windows looks for dependent DLLs + in directory of pathname first. However, Windows95 + can sometimes not work correctly unless the absolute +@@ -190,11 +194,15 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname, + sizeof(pathbuf), + pathbuf, + &dummy)) { ++#if HAVE_SXS + ULONG_PTR cookie = _Py_ActivateActCtx(); ++#endif + /* XXX This call doesn't exist in Windows CE */ + hDLL = LoadLibraryEx(pathname, NULL, + LOAD_WITH_ALTERED_SEARCH_PATH); ++#if HAVE_SXS + _Py_DeactivateActCtx(cookie); ++#endif + } + + /* restore old error mode settings */ +-- +2.5.0 + diff --git a/vcpkg/ports/python2/002-build-msvc.patch b/vcpkg/ports/python2/002-build-msvc.patch new file mode 100644 index 0000000..85748fc --- /dev/null +++ b/vcpkg/ports/python2/002-build-msvc.patch @@ -0,0 +1,264 @@ +From e6a1f39d2d876bbfc8b02e628dfd1d0fef4a0651 Mon Sep 17 00:00:00 2001 +From: Jean-Christophe Fillion-Robin +Date: Tue, 1 Aug 2017 15:40:29 -0400 +Subject: [PATCH 2/3] VS2015 Support: Backport "Issue #22919: Windows build + updated to support VC 14.0 (Visual Studio 2015), which will be used for the + official 3.5 release." + +This commit is a partial backport of python/cpython@65e4cb1. It was +originally designed to work with python-cmake-buildsystem. + +This patch do not backport the define "timezone" as "_timezone" as it was done in Python 3.x. +Keeping "timezone" is required in Python 2.7.x to avoid the following build issue +``error C2032: '__timezone': function cannot be member of struct '__timeb64'`` +associated with `sys/timeb.h`. The need for `sys/timeb.h` was removed in Python 3.x in python/cpython@6fc4ade and python/cpython@0011124 +but is still used in Python 2.7.x. + +The following modules have NOT been backported: + +* Lib/distutils/sysconfig +* Modules/socketmodule.c .... : Not required since changes related to WSA have been introduced in Python 3.x (see python/cpython@6b4883d) +* Tools/buildbot +* PCBuild +--- + Lib/ctypes/util.py | 6 +++++- + Lib/distutils/command/build_ext.py | 2 +- + Lib/distutils/msvc9compiler.py | 3 +++ + Lib/distutils/msvccompiler.py | 3 +++ + Modules/posixmodule.c | 22 ++++++++++++++++++++-- + Modules/timemodule.c | 4 ++-- + PC/bdist_wininst/install.c | 29 ++++++----------------------- + PC/pyconfig.h | 7 +++++++ + 8 files changed, 47 insertions(+), 29 deletions(-) + +diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py +index ab10ec5..a163239 100644 +--- a/Lib/ctypes/util.py ++++ b/Lib/ctypes/util.py +@@ -19,6 +19,8 @@ if os.name == "nt": + i = i + len(prefix) + s, rest = sys.version[i:].split(" ", 1) + majorVersion = int(s[:-2]) - 6 ++ if majorVersion >= 13: ++ majorVersion += 1 + minorVersion = int(s[2:3]) / 10.0 + # I don't think paths are affected by minor version in version 6 + if majorVersion == 6: +@@ -36,8 +38,10 @@ if os.name == "nt": + return None + if version <= 6: + clibname = 'msvcrt' +- else: ++ elif version <= 13: + clibname = 'msvcr%d' % (version * 10) ++ else: ++ clibname = 'appcrt%d' % (version * 10) + + # If python was built with in debug mode + import imp +diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py +index f1d184b..0851690 100644 +--- a/Lib/distutils/command/build_ext.py ++++ b/Lib/distutils/command/build_ext.py +@@ -196,7 +196,7 @@ class build_ext (Command): + if MSVC_VERSION >= 9: + # Use the .lib files for the correct architecture + if self.plat_name == 'win32': +- suffix = '' ++ suffix = 'win32' + else: + # win-amd64 or win-ia64 + suffix = self.plat_name[4:] +diff --git a/Lib/distutils/msvc9compiler.py b/Lib/distutils/msvc9compiler.py +index f6de11c..ee61ac2 100644 +--- a/Lib/distutils/msvc9compiler.py ++++ b/Lib/distutils/msvc9compiler.py +@@ -182,6 +182,9 @@ def get_build_version(): + i = i + len(prefix) + s, rest = sys.version[i:].split(" ", 1) + majorVersion = int(s[:-2]) - 6 ++ if majorVersion >= 13: ++ # v13 was skipped and should be v14 ++ majorVersion += 1 + minorVersion = int(s[2:3]) / 10.0 + # I don't think paths are affected by minor version in version 6 + if majorVersion == 6: +diff --git a/Lib/distutils/msvccompiler.py b/Lib/distutils/msvccompiler.py +index 0e69fd3..77025c6 100644 +--- a/Lib/distutils/msvccompiler.py ++++ b/Lib/distutils/msvccompiler.py +@@ -164,6 +164,9 @@ def get_build_version(): + i = i + len(prefix) + s, rest = sys.version[i:].split(" ", 1) + majorVersion = int(s[:-2]) - 6 ++ if majorVersion >= 13: ++ # v13 was skipped and should be v14 ++ majorVersion += 1 + minorVersion = int(s[2:3]) / 10.0 + # I don't think paths are affected by minor version in version 6 + if majorVersion == 6: +diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c +index e73805f..90d5318 100644 +--- a/Modules/posixmodule.c ++++ b/Modules/posixmodule.c +@@ -558,15 +558,33 @@ _PyInt_FromDev(PY_LONG_LONG v) + /* The actual size of the structure is determined at runtime. + * Only the first items must be present. + */ ++ ++#if _MSC_VER >= 1900 ++ ++typedef struct { ++ CRITICAL_SECTION lock; ++ intptr_t osfhnd; ++ __int64 startpos; ++ char osfile; ++} my_ioinfo; ++ ++#define IOINFO_L2E 6 ++#define IOINFO_ARRAYS 128 ++ ++#else ++ + typedef struct { + intptr_t osfhnd; + char osfile; + } my_ioinfo; + +-extern __declspec(dllimport) char * __pioinfo[]; + #define IOINFO_L2E 5 +-#define IOINFO_ARRAY_ELTS (1 << IOINFO_L2E) + #define IOINFO_ARRAYS 64 ++ ++#endif ++ ++extern __declspec(dllimport) char * __pioinfo[]; ++#define IOINFO_ARRAY_ELTS (1 << IOINFO_L2E) + #define _NHANDLE_ (IOINFO_ARRAYS * IOINFO_ARRAY_ELTS) + #define FOPEN 0x01 + #define _NO_CONSOLE_FILENO (intptr_t)-2 +diff --git a/Modules/timemodule.c b/Modules/timemodule.c +index 12c43b0..db190b8 100644 +--- a/Modules/timemodule.c ++++ b/Modules/timemodule.c +@@ -808,7 +808,7 @@ inittimezone(PyObject *m) { + #ifdef PYOS_OS2 + PyModule_AddIntConstant(m, "timezone", _timezone); + #else /* !PYOS_OS2 */ +- PyModule_AddIntConstant(m, "timezone", timezone); ++ PyModule_AddIntConstant(m, "timezone", _timezone); + #endif /* PYOS_OS2 */ + #ifdef HAVE_ALTZONE + PyModule_AddIntConstant(m, "altzone", altzone); +@@ -816,7 +816,7 @@ inittimezone(PyObject *m) { + #ifdef PYOS_OS2 + PyModule_AddIntConstant(m, "altzone", _timezone-3600); + #else /* !PYOS_OS2 */ +- PyModule_AddIntConstant(m, "altzone", timezone-3600); ++ PyModule_AddIntConstant(m, "altzone", _timezone-3600); + #endif /* PYOS_OS2 */ + #endif + PyModule_AddIntConstant(m, "daylight", daylight); +diff --git a/PC/bdist_wininst/install.c b/PC/bdist_wininst/install.c +index f1cc7fe..5b11dcc 100644 +--- a/PC/bdist_wininst/install.c ++++ b/PC/bdist_wininst/install.c +@@ -1184,7 +1184,7 @@ static void CenterWindow(HWND hwnd) + + #include + +-BOOL CALLBACK ++INT_PTR CALLBACK + IntroDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) + { + LPNMHDR lpnm; +@@ -1533,7 +1533,7 @@ SCHEME *GetScheme(int major, int minor) + return old_scheme; + } + +-BOOL CALLBACK ++INT_PTR CALLBACK + SelectPythonDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) + { + LPNMHDR lpnm; +@@ -1835,7 +1835,7 @@ static void CloseLogfile(void) + fclose(logfile); + } + +-BOOL CALLBACK ++INT_PTR CALLBACK + InstallFilesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) + { + LPNMHDR lpnm; +@@ -1990,7 +1990,7 @@ InstallFilesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) + } + + +-BOOL CALLBACK ++INT_PTR CALLBACK + FinishedDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) + { + LPNMHDR lpnm; +@@ -2166,23 +2166,6 @@ BOOL NeedAutoUAC() + return TRUE; + } + +-// Returns TRUE if the platform supports UAC. +-BOOL PlatformSupportsUAC() +-{ +- // Note that win2k does seem to support ShellExecute with 'runas', +- // but does *not* support IsUserAnAdmin - so we just pretend things +- // only work on XP and later. +- BOOL bIsWindowsXPorLater; +- OSVERSIONINFO winverinfo; +- winverinfo.dwOSVersionInfoSize = sizeof(winverinfo); +- if (!GetVersionEx(&winverinfo)) +- return FALSE; // something bad has gone wrong +- bIsWindowsXPorLater = +- ( (winverinfo.dwMajorVersion > 5) || +- ( (winverinfo.dwMajorVersion == 5) && (winverinfo.dwMinorVersion >= 1) )); +- return bIsWindowsXPorLater; +-} +- + // Spawn ourself as an elevated application. On failure, a message is + // displayed to the user - but this app will always terminate, even + // on error. +@@ -2238,7 +2221,7 @@ int DoInstall(void) + + // See if we need to do the Vista UAC magic. + if (strcmp(user_access_control, "force")==0) { +- if (PlatformSupportsUAC() && !MyIsUserAnAdmin()) { ++ if (!MyIsUserAnAdmin()) { + SpawnUAC(); + return 0; + } +@@ -2246,7 +2229,7 @@ int DoInstall(void) + } else if (strcmp(user_access_control, "auto")==0) { + // Check if it looks like we need UAC control, based + // on how Python itself was installed. +- if (PlatformSupportsUAC() && !MyIsUserAnAdmin() && NeedAutoUAC()) { ++ if (!MyIsUserAnAdmin() && NeedAutoUAC()) { + SpawnUAC(); + return 0; + } +diff --git a/PC/pyconfig.h b/PC/pyconfig.h +index b60af1e..b517146 100644 +--- a/PC/pyconfig.h ++++ b/PC/pyconfig.h +@@ -231,6 +231,13 @@ typedef int pid_t; + #define hypot _hypot + #endif + ++/* VS 2015 defines these names with a leading underscore */ ++#if _MSC_VER >= 1900 ++// #define timezone _timezone ++#define daylight _daylight ++#define tzname _tzname ++#endif ++ + /* Side by Side assemblies supported in VS 2005 and VS 2008 but not 2010*/ + #if _MSC_VER >= 1400 && _MSC_VER < 1600 + #define HAVE_SXS 1 +-- +2.5.0 + diff --git a/vcpkg/ports/python2/003-build-msvc.patch b/vcpkg/ports/python2/003-build-msvc.patch new file mode 100644 index 0000000..71d5569 --- /dev/null +++ b/vcpkg/ports/python2/003-build-msvc.patch @@ -0,0 +1,234 @@ +From 00164b4a9821e82f513183035587bea9243a7d5e Mon Sep 17 00:00:00 2001 +From: Jean-Christophe Fillion-Robin +Date: Tue, 1 Aug 2017 14:13:24 -0400 +Subject: [PATCH 3/3] VS2015 Support: Backport of "Issue #23524: Replace + _PyVerify_fd function with calling + _set_thread_local_invalid_parameter_handler on every thread." + +This commit is a partial backport of python/cpython@d81431f. It was +originally designed to work with python-cmake-buildsystem. + +Implementation of "_PyVerify_fd" in "Python/fileutils.c" found only in +Python 3.x has been copied into "Modules/posixmodule.c" + +The following modules have NOT been backported: + +* PCbuild +--- + Modules/posixmodule.c | 54 +++++++++++++++++++++++------------------- + PC/invalid_parameter_handler.c | 22 +++++++++++++++++ + Python/pystate.c | 12 ++++++++++ + PCbuild/pythoncore.vcxproj | 1 + + PCbuild/pythoncore.vcxproj.filters | 1 + + 5 files changed, 65 insertions(+), 26 deletions(-) + create mode 100644 PC/invalid_parameter_handler.c + +diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c +index 90d5318..6a180a0 100644 +--- a/Modules/posixmodule.c ++++ b/Modules/posixmodule.c +@@ -277,6 +277,7 @@ extern int lstat(const char *, struct stat *); + #include "osdefs.h" + #include + #include ++#include + #include /* for ShellExecute() */ + #define popen _popen + #define pclose _pclose +@@ -535,8 +534,28 @@ _PyInt_FromDev(PY_LONG_LONG v) + # define _PyInt_FromDev PyInt_FromLong + #endif + ++#ifdef _MSC_VER ++#if _MSC_VER >= 1900 ++ ++/* This function lets the Windows CRT validate the file handle without ++ terminating the process if it's invalid. */ ++int ++_PyVerify_fd(int fd) ++{ ++ intptr_t osh; ++ /* Fast check for the only condition we know */ ++ if (fd < 0) { ++ _set_errno(EBADF); ++ return 0; ++ } ++ osh = _get_osfhandle(fd); ++ return osh != (intptr_t)-1; ++} ++ ++#define _PyVerify_fd_dup2(fd1, fd2) (_PyVerify_fd(fd1) && (fd2) >= 0) ++ ++#elif _MSC_VER >= 1400 + +-#if defined _MSC_VER && _MSC_VER >= 1400 + /* Microsoft CRT in VS2005 and higher will verify that a filehandle is + * valid and raise an assertion if it isn't. + * Normally, an invalid fd is likely to be a C program error and therefore +@@ -601,35 +580,18 @@ _PyInt_FromDev(PY_LONG_LONG v) + * Only the first items must be present. + */ + +-#if _MSC_VER >= 1900 +- +-typedef struct { +- CRITICAL_SECTION lock; +- intptr_t osfhnd; +- __int64 startpos; +- char osfile; +-} my_ioinfo; +- +-#define IOINFO_L2E 6 +-#define IOINFO_ARRAYS 128 +- +-#else +- + typedef struct { + intptr_t osfhnd; + char osfile; + } my_ioinfo; + +-#define IOINFO_L2E 5 +-#define IOINFO_ARRAYS 64 +- +-#endif +- + extern __declspec(dllimport) char * __pioinfo[]; + #define IOINFO_ARRAY_ELTS (1 << IOINFO_L2E) + #define _NHANDLE_ (IOINFO_ARRAYS * IOINFO_ARRAY_ELTS) + #define FOPEN 0x01 + #define _NO_CONSOLE_FILENO (intptr_t)-2 ++#define IOINFO_L2E 5 ++#define IOINFO_ARRAYS 64 + + /* This function emulates what the windows CRT does to validate file handles */ + int +@@ -653,6 +649,8 @@ _PyVerify_fd_dup2(int fd1, int fd2) + #define _PyVerify_fd_dup2(A, B) (1) + #endif + ++#endif /* defined _MSC_VER */ ++ + /* Return a dictionary corresponding to the POSIX environment table */ + #if defined(WITH_NEXT_FRAMEWORK) || (defined(__APPLE__) && defined(Py_ENABLE_SHARED)) + /* On Darwin/MacOSX a shared library or framework has no access to +@@ -1260,14 +1254,10 @@ win32_fstat(int file_number, struct win32_stat *result) + + h = (HANDLE)_get_osfhandle(file_number); + +- /* Protocol violation: we explicitly clear errno, instead of +- setting it to a POSIX error. Callers should use GetLastError. */ + errno = 0; + + if (h == INVALID_HANDLE_VALUE) { +- /* This is really a C library error (invalid file handle). +- We set the Win32 error to the closes one matching. */ +- SetLastError(ERROR_INVALID_HANDLE); ++ errno = EBADF; + return -1; + } + memset(result, 0, sizeof(*result)); +@@ -1268,6 +1266,7 @@ win32_fstat(int file_number, struct win32_stat *result) + if (type == FILE_TYPE_UNKNOWN) { + DWORD error = GetLastError(); + if (error != 0) { ++ errno = EINVAL; + return -1; + } + /* else: valid but unknown file */ +@@ -1284,6 +1281,7 @@ win32_fstat(int file_number, struct win32_stat *result) + } + + if (!GetFileInformationByHandle(h, &info)) { ++ errno = EINVAL; + return -1; + } + +diff --git a/PC/invalid_parameter_handler.c b/PC/invalid_parameter_handler.c +new file mode 100644 +index 0000000..3bc0104 +--- /dev/null ++++ b/PC/invalid_parameter_handler.c +@@ -0,0 +1,22 @@ ++#ifdef _MSC_VER ++ ++#include ++ ++#if _MSC_VER >= 1900 ++/* pyconfig.h uses this function in the _Py_BEGIN/END_SUPPRESS_IPH ++ * macros. It does not need to be defined when building using MSVC ++ * earlier than 14.0 (_MSC_VER == 1900). ++ */ ++ ++static void __cdecl _silent_invalid_parameter_handler( ++ wchar_t const* expression, ++ wchar_t const* function, ++ wchar_t const* file, ++ unsigned int line, ++ uintptr_t pReserved) { } ++ ++void *_Py_silent_invalid_parameter_handler = ++ (void*)_silent_invalid_parameter_handler; ++#endif ++ ++#endif +diff --git a/Python/pystate.c b/Python/pystate.c +index eb992c1..1c0f970 100644 +--- a/Python/pystate.c ++++ b/Python/pystate.c +@@ -22,6 +22,12 @@ the expense of doing their own locking). + #endif + #endif + ++#if defined _MSC_VER && _MSC_VER >= 1900 ++/* Issue #23524: Temporary fix to disable termination due to invalid parameters */ ++PyAPI_DATA(void*) _Py_silent_invalid_parameter_handler; ++#include ++#endif ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -202,6 +208,12 @@ new_threadstate(PyInterpreterState *interp, int init) + tstate->next = interp->tstate_head; + interp->tstate_head = tstate; + HEAD_UNLOCK(); ++ ++#if defined _MSC_VER && _MSC_VER >= 1900 ++ /* Issue #23524: Temporary fix to disable termination due to invalid parameters */ ++ _set_thread_local_invalid_parameter_handler((_invalid_parameter_handler)_Py_silent_invalid_parameter_handler); ++#endif ++ + } + + return tstate; +-- +2.5.0 + +diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj +index 99291ea..af17762 100644 +--- a/PCbuild/pythoncore.vcxproj ++++ b/PCbuild/pythoncore.vcxproj +@@ -333,6 +333,7 @@ + + + ++ + + + + +diff --git a/PCbuild/pythoncore.vcxproj.filters b/PCbuild/pythoncore.vcxproj.filters +index 99291ea..af17762 100644 +--- a/PCbuild/pythoncore.vcxproj.filters ++++ b/PCbuild/pythoncore.vcxproj.filters +@@ -794,6 +794,9 @@ + + Parser + ++ ++ PC ++ + + PC + diff --git a/vcpkg/ports/python2/004-static-library-msvc.patch b/vcpkg/ports/python2/004-static-library-msvc.patch new file mode 100644 index 0000000..6c5cb75 --- /dev/null +++ b/vcpkg/ports/python2/004-static-library-msvc.patch @@ -0,0 +1,38 @@ +--- a/PCbuild/pythoncore.vcxproj ++++ b/PCbuild/pythoncore.vcxproj +@@ -41,7 +41,7 @@ + + + +- DynamicLibrary ++ StaticLibrary + false + + +@@ -70,12 +70,24 @@ + + /Zm200 %(AdditionalOptions) + $(PySourcePath)Python;$(PySourcePath)Modules\zlib;%(AdditionalIncludeDirectories) +- _USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) ++ _USRDLL;Py_BUILD_CORE;Py_NO_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) + + + ws2_32.lib;%(AdditionalDependencies) + 0x1e000000 + ++ ++ MachineX86 ++ ++ ++ MachineX86 ++ ++ ++ MachineX86 ++ ++ ++ MachineX86 ++ + + + +-- diff --git a/vcpkg/ports/python2/005-static-crt-msvc.patch b/vcpkg/ports/python2/005-static-crt-msvc.patch new file mode 100644 index 0000000..0bcd389 --- /dev/null +++ b/vcpkg/ports/python2/005-static-crt-msvc.patch @@ -0,0 +1,15 @@ +--- a/PCbuild/pythoncore.vcxproj ++++ b/PCbuild/pythoncore.vcxproj +@@ -71,6 +71,10 @@ + /Zm200 %(AdditionalOptions) + $(PySourcePath)Python;$(PySourcePath)Modules\zlib;%(AdditionalIncludeDirectories) + _USRDLL;Py_BUILD_CORE;Py_NO_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) ++ MultiThreadedDebug ++ MultiThreadedDebug ++ MultiThreaded ++ MultiThreaded + + + ws2_32.lib;%(AdditionalDependencies) +-- + diff --git a/vcpkg/ports/python2/006-static-fix-headers.patch b/vcpkg/ports/python2/006-static-fix-headers.patch new file mode 100644 index 0000000..9e3030b --- /dev/null +++ b/vcpkg/ports/python2/006-static-fix-headers.patch @@ -0,0 +1,14 @@ +diff --git a/PC/pyconfig.h b/PC/pyconfig.h +index 64e7aec..aa36745 100644 +--- a/PC/pyconfig.h ++++ b/PC/pyconfig.h +@@ -331,6 +331,7 @@ typedef int pid_t; + + /* For Windows the Python core is in a DLL by default. Test + Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ ++#define Py_NO_ENABLE_SHARED + #if !defined(MS_NO_COREDLL) && !defined(Py_NO_ENABLE_SHARED) + # define Py_ENABLE_SHARED 1 /* standard symbol for shared library */ + # define MS_COREDLL /* deprecated old symbol */ +-- + diff --git a/vcpkg/ports/python2/007-fix-build-path.patch b/vcpkg/ports/python2/007-fix-build-path.patch new file mode 100644 index 0000000..5dc4633 --- /dev/null +++ b/vcpkg/ports/python2/007-fix-build-path.patch @@ -0,0 +1,14 @@ +diff --git a/PCbuild/python.props b/PCbuild/python.props +index d2b1991..a22c054 100644 +--- a/PCbuild/python.props ++++ b/PCbuild/python.props +@@ -26,8 +26,7 @@ + $(PySourcePath)\ + + +- $(PySourcePath)PCBuild\ +- $(BuildPath)\$(ArchName)\ ++ $(PySourcePath)PCBuild\$(ArchName)\ + $(BuildPath)\ + + diff --git a/vcpkg/ports/python2/CONTROL b/vcpkg/ports/python2/CONTROL new file mode 100644 index 0000000..4b03ff8 --- /dev/null +++ b/vcpkg/ports/python2/CONTROL @@ -0,0 +1,3 @@ +Source: python2 +Version: 2.7.15-2 +Description: The Python programming language as an embeddable library diff --git a/vcpkg/ports/python2/portfile.cmake b/vcpkg/ports/python2/portfile.cmake new file mode 100644 index 0000000..ea11b33 --- /dev/null +++ b/vcpkg/ports/python2/portfile.cmake @@ -0,0 +1,77 @@ +# Patches are from: +# - https://github.com/python-cmake-buildsystem/python-cmake-buildsystem/tree/master/patches/2.7.13/Windows-MSVC/1900 +# - https://github.com/Microsoft/vcpkg/tree/master/ports/python3 + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic AND VCPKG_CRT_LINKAGE STREQUAL static) + message(STATUS "Warning: Dynamic library with static CRT is not supported. Building static library.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +set(PYTHON_VERSION_MAJOR 2) +set(PYTHON_VERSION_MINOR 7) +set(PYTHON_VERSION_PATCH 15) +set(PYTHON_VERSION ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.${PYTHON_VERSION_PATCH}) + +include(vcpkg_common_functions) + +set(_PYTHON_PATCHES "") +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + list(APPEND _PYTHON_PATCHES + ${CMAKE_CURRENT_LIST_DIR}/004-static-library-msvc.patch + ${CMAKE_CURRENT_LIST_DIR}/006-static-fix-headers.patch + ) +endif() +if (VCPKG_CRT_LINKAGE STREQUAL static) + list(APPEND _PYTHON_PATCHES ${CMAKE_CURRENT_LIST_DIR}/005-static-crt-msvc.patch) +endif() + + +vcpkg_download_distfile(ARCHIVE + URLS https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz + FILENAME Python-${PYTHON_VERSION}.tar.xz + SHA512 27ea43eb45fc68f3d2469d5f07636e10801dee11635a430ec8ec922ed790bb426b072da94df885e4dfa1ea8b7a24f2f56dd92f9b0f51e162330f161216bd6de6 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/001-build-msvc.patch + ${CMAKE_CURRENT_LIST_DIR}/002-build-msvc.patch + ${CMAKE_CURRENT_LIST_DIR}/003-build-msvc.patch + ${_PYTHON_PATCHES} + ${CMAKE_CURRENT_LIST_DIR}/007-fix-build-path.patch +) + +if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") + set(BUILD_ARCH "Win32") + set(OUT_DIR "win32") +elseif (VCPKG_TARGET_ARCHITECTURE MATCHES "x64") + set(BUILD_ARCH "x64") + set(OUT_DIR "amd64") +else() + message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() + +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/PCBuild/pythoncore.vcxproj + PLATFORM ${BUILD_ARCH}) + +file(GLOB HEADERS ${SOURCE_PATH}/Include/*.h) +file(COPY ${HEADERS} ${SOURCE_PATH}/PC/pyconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) + +file(COPY ${SOURCE_PATH}/Lib DESTINATION ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}) + +file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}_d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(COPY ${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}_d.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}/LICENSE ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}/copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/python3/0001-static-library.patch b/vcpkg/ports/python3/0001-static-library.patch new file mode 100644 index 0000000..d9d6024 --- /dev/null +++ b/vcpkg/ports/python3/0001-static-library.patch @@ -0,0 +1,63 @@ +diff --git a/PC/pyconfig.h b/PC/pyconfig.h +index b6b8d445869bc..35b329f307c12 100644 +--- a/PC/pyconfig.h ++++ b/PC/pyconfig.h +@@ -257,6 +257,7 @@ typedef int pid_t; + + /* For Windows the Python core is in a DLL by default. Test + Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ ++#define Py_NO_ENABLE_SHARED + #if !defined(MS_NO_COREDLL) && !defined(Py_NO_ENABLE_SHARED) + # define Py_ENABLE_SHARED 1 /* standard symbol for shared library */ + # define MS_COREDLL /* deprecated old symbol */ +@@ -282,6 +283,11 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ + # endif /* _DEBUG */ + # endif /* _MSC_VER */ + # endif /* Py_BUILD_CORE */ ++#else ++ /* So MSVC users need not specify the .lib file in their own config */ ++# pragma comment(lib, "version.lib") ++# pragma comment(lib, "shlwapi.lib") ++# pragma comment(lib, "ws2_32.lib") + #endif /* MS_COREDLL */ + + #if defined(MS_WIN64) +diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj +index 0666b90f66cc9..ca83b82d8a0fe 100644 +--- a/PCbuild/pythoncore.vcxproj ++++ b/PCbuild/pythoncore.vcxproj +@@ -73,7 +73,7 @@ + + + +- DynamicLibrary ++ StaticLibrary + false + + +@@ -102,12 +102,24 @@ + /Zm200 %(AdditionalOptions) + $(PySourcePath)Python;%(AdditionalIncludeDirectories) + $(zlibDir);%(AdditionalIncludeDirectories) +- _USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) ++ _USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) + _Py_HAVE_ZLIB;%(PreprocessorDefinitions) + + + version.lib;shlwapi.lib;ws2_32.lib;%(AdditionalDependencies) + ++ ++ MachineX86 ++ ++ ++ MachineX86 ++ ++ ++ MachineX86 ++ ++ ++ MachineX86 ++ + + + diff --git a/vcpkg/ports/python3/0002-static-crt.patch b/vcpkg/ports/python3/0002-static-crt.patch new file mode 100644 index 0000000..362610f --- /dev/null +++ b/vcpkg/ports/python3/0002-static-crt.patch @@ -0,0 +1,15 @@ +diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj +index ca83b82d8a0fe..b925a26a96e5e 100644 +--- a/PCbuild/pythoncore.vcxproj ++++ b/PCbuild/pythoncore.vcxproj +@@ -104,6 +104,10 @@ + $(zlibDir);%(AdditionalIncludeDirectories) + _USRDLL;Py_BUILD_CORE;Py_BUILD_CORE_BUILTIN;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions) + _Py_HAVE_ZLIB;%(PreprocessorDefinitions) ++ MultiThreadedDebug ++ MultiThreadedDebug ++ MultiThreaded ++ MultiThreaded + + + version.lib;shlwapi.lib;ws2_32.lib;%(AdditionalDependencies) diff --git a/vcpkg/ports/python3/CONTROL b/vcpkg/ports/python3/CONTROL new file mode 100644 index 0000000..aecb34d --- /dev/null +++ b/vcpkg/ports/python3/CONTROL @@ -0,0 +1,9 @@ +Source: python3 +Version: 3.8.3 +Port-Version: 2 +Homepage: https://github.com/python/cpython +Description: The Python programming language as an embeddable library +Build-Depends: libffi, openssl, zlib (!uwp&!windows) + +Feature: enable-shared +Description: Build shared libraries in addition to static ones built by default diff --git a/vcpkg/ports/python3/portfile.cmake b/vcpkg/ports/python3/portfile.cmake new file mode 100644 index 0000000..087e59a --- /dev/null +++ b/vcpkg/ports/python3/portfile.cmake @@ -0,0 +1,253 @@ +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic AND VCPKG_CRT_LINKAGE STREQUAL static) + message(STATUS "Warning: Dynamic library with static CRT is not supported. Building static library.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +set(PYTHON_VERSION_MAJOR 3) +set(PYTHON_VERSION_MINOR 8) +set(PYTHON_VERSION_PATCH 3) +set(PYTHON_VERSION ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.${PYTHON_VERSION_PATCH}) + +if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + list(APPEND PATCHES ${CMAKE_CURRENT_LIST_DIR}/0001-static-library.patch) + endif() + if (VCPKG_CRT_LINKAGE STREQUAL static) + list(APPEND PATCHES ${CMAKE_CURRENT_LIST_DIR}/0002-static-crt.patch) + endif() +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH TEMP_SOURCE_PATH + REPO python/cpython + REF v${PYTHON_VERSION} + SHA512 eb264a858ef55f2f61b53f663454be6e99ffe9035d8fcdb3366d7a08fd3b295613e5d15e93e2e4b9b18ad297d8c17139bde5e90e396db04fe04c6f441a443fd2 + HEAD_REF master + PATCHES ${PATCHES} +) + +if("enable-shared" IN_LIST FEATURES) + set(_ENABLED_SHARED --enable-shared) + if(VCPKG_TARGET_IS_LINUX) + message(WARNING"Feature enable-shared requires libffi-devel from the system package manager, please install it on Ubuntu system via sudo apt-get install libffi-dev.") + endif() +else() + unset(_ENABLED_SHARED) +endif() + +if (VCPKG_TARGET_IS_WINDOWS) + if(DEFINED _ENABLED_SHARED) + message(WARNING "enable-shared requested, by Windows build already produce a shared library by default") + endif() + set(SOURCE_PATH "${TEMP_SOURCE_PATH}-Lib-Win") + file(REMOVE_RECURSE ${SOURCE_PATH}) + file(RENAME "${TEMP_SOURCE_PATH}" ${SOURCE_PATH}) + + if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") + set(BUILD_ARCH "Win32") + set(OUT_DIR "win32") + elseif (VCPKG_TARGET_ARCHITECTURE MATCHES "x64") + set(BUILD_ARCH "x64") + set(OUT_DIR "amd64") + else() + message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") + endif() + + vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/PCBuild/pythoncore.vcxproj + PLATFORM ${BUILD_ARCH}) + + file(INSTALL + "${SOURCE_PATH}/Include/" + "${SOURCE_PATH}/PC/pyconfig.h" + DESTINATION "${CURRENT_PACKAGES_DIR}/include/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}" + FILES_MATCHING PATTERN *.h + ) + file(INSTALL + "${SOURCE_PATH}/Lib" + DESTINATION + "${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}" + ) + file(INSTALL + "${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.lib" + DESTINATION + "${CURRENT_PACKAGES_DIR}/lib" + ) + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(INSTALL "${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}_d.lib" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() + + if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(INSTALL "${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.dll" DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(INSTALL "${SOURCE_PATH}/PCBuild/${OUT_DIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}_d.dll" DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + vcpkg_copy_pdbs() + endif() + # Handle copyright + file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR} RENAME copyright) + +elseif (VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX) + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + set(SOURCE_PATH_DEBUG "${TEMP_SOURCE_PATH}-${TARGET_TRIPLET}-debug") + endif() + + set(SOURCE_PATH_RELEASE "${TEMP_SOURCE_PATH}-${TARGET_TRIPLET}-release") + file(REMOVE_RECURSE ${SOURCE_PATH_RELEASE}) + file(GLOB FILES ${TEMP_SOURCE_PATH}/*) + file(COPY ${FILES} DESTINATION ${SOURCE_PATH_RELEASE}) + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(REMOVE_RECURSE ${SOURCE_PATH_DEBUG}) + file(RENAME "${TEMP_SOURCE_PATH}" ${SOURCE_PATH_DEBUG}) + endif() + + find_program(MAKE make) + if (NOT MAKE) + message(FATAL_ERROR "MAKE not found") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + ################ + # Release build + ################ + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + set(OUT_PATH_RELEASE ${SOURCE_PATH_RELEASE}/../../make-build-${TARGET_TRIPLET}-release) + file(MAKE_DIRECTORY ${OUT_PATH_RELEASE}) + + if(VCPKG_TARGET_IS_OSX) + vcpkg_execute_build_process( + COMMAND + "${SOURCE_PATH_RELEASE}/configure" + ${_ENABLED_SHARED} + --prefix=${OUT_PATH_RELEASE} + --with-openssl=${CURRENT_INSTALLED_DIR} + "CPPFLAGS=-I${CURRENT_INSTALLED_DIR}/include -framework CoreFoundation" "LDFLAGS=-L${CURRENT_INSTALLED_DIR}/lib" "LIBS=-liconv" + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME config-${TARGET_TRIPLET}-rel + ) + else() + vcpkg_execute_build_process( + COMMAND + "${SOURCE_PATH_RELEASE}/configure" + ${_ENABLED_SHARED} + --prefix=${OUT_PATH_RELEASE} + --with-openssl=${CURRENT_INSTALLED_DIR} + "CPPFLAGS=-I${CURRENT_INSTALLED_DIR}/include" "LDFLAGS=-L${CURRENT_INSTALLED_DIR}/lib" + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME config-${TARGET_TRIPLET}-rel + ) + endif() + + message(STATUS "Building ${TARGET_TRIPLET}-rel") + + vcpkg_execute_build_process( + COMMAND make install -j ${VCPKG_CONCURRENCY} + NO_PARALLEL_COMMAND make install + WORKING_DIRECTORY ${SOURCE_PATH_RELEASE} + LOGNAME make-build-${TARGET_TRIPLET}-release + ) + + message(STATUS "Installing ${TARGET_TRIPLET}-rel headers...") + file(INSTALL "${OUT_PATH_RELEASE}/include/" + DESTINATION ${CURRENT_PACKAGES_DIR}/include + FILES_MATCHING PATTERN *.h + ) + + message(STATUS "Installing ${TARGET_TRIPLET}-rel lib files...") + file(GLOB PY_LIBS + ${OUT_PATH_RELEASE}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/*) + file(INSTALL ${PY_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR}/Lib + PATTERN "*.pyc" EXCLUDE + PATTERN "*__pycache__*" EXCLUDE + ) + + message(STATUS "Installing ${TARGET_TRIPLET}-rel share files...") + file(GLOB PKGCFG ${OUT_PATH_RELEASE}/lib/pkgconfig/*) + file(INSTALL ${PKGCFG} DESTINATION ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR} + PATTERN "*.pyc" EXCLUDE + PATTERN "*__pycache__*" EXCLUDE + ) + + message(STATUS "Installing ${TARGET_TRIPLET}-rel Python library files...") + file(GLOB LIBS + ${OUT_PATH_RELEASE}/lib/libpython${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.*) + if (NOT LIBS) + file(GLOB LIBS ${OUT_PATH_RELEASE}/lib64/*) + endif() + file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib + PATTERN "*.pyc" EXCLUDE + PATTERN "*__pycache__*" EXCLUDE + ) + + message(STATUS "Installing ${TARGET_TRIPLET}-rel done") + + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + ################ + # Debug build + ################ + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + set(OUT_PATH_DEBUG ${SOURCE_PATH_DEBUG}/../../make-build-${TARGET_TRIPLET}-debug) + file(MAKE_DIRECTORY ${OUT_PATH_DEBUG}) + + if(VCPKG_TARGET_IS_OSX) + vcpkg_execute_build_process( + COMMAND + "${SOURCE_PATH_DEBUG}/configure" + --with-pydebug + ${_ENABLED_SHARED} + --prefix=${OUT_PATH_DEBUG} + --with-openssl=${CURRENT_INSTALLED_DIR}/debug + "CPPFLAGS=-I${CURRENT_INSTALLED_DIR}/include -framework CoreFoundation" "LDFLAGS=-L${CURRENT_INSTALLED_DIR}/debug/lib" "LIBS=-liconv" + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME config-${TARGET_TRIPLET}-debug + ) + else() + vcpkg_execute_build_process( + COMMAND + "${SOURCE_PATH_DEBUG}/configure" + --with-pydebug + ${_ENABLED_SHARED} + --prefix=${OUT_PATH_DEBUG} + --with-openssl=${CURRENT_INSTALLED_DIR}/debug + "CPPFLAGS=-I${CURRENT_INSTALLED_DIR}/include" "LDFLAGS=-L${CURRENT_INSTALLED_DIR}/debug/lib" + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME config-${TARGET_TRIPLET}-debug + ) + endif() + + message(STATUS "Building ${TARGET_TRIPLET}-dbg") + vcpkg_execute_build_process( + COMMAND make install -j ${VCPKG_CONCURRENCY} + NO_PARALLEL_COMMAND make install + WORKING_DIRECTORY ${SOURCE_PATH_DEBUG} + LOGNAME make-build-${TARGET_TRIPLET}-debug + ) + + message(STATUS "Installing ${TARGET_TRIPLET}-dbg Python library files...") + file(GLOB LIBS + ${OUT_PATH_DEBUG}/lib/libpython${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}d.*) + if (NOT LIBS) + file(GLOB LIBS + ${OUT_PATH_DEBUG}/lib64/*) + endif() + file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + PATTERN "*.pyc" EXCLUDE + PATTERN "*__pycache__*" EXCLUDE + ) + + message(STATUS "Installing ${TARGET_TRIPLET}-dbg done") + + endif() + # Handle copyright + file(INSTALL ${SOURCE_PATH_RELEASE}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/python${PYTHON_VERSION_MAJOR} RENAME copyright) + +endif() diff --git a/vcpkg/ports/qca/0001-fix-path-for-vcpkg.patch b/vcpkg/ports/qca/0001-fix-path-for-vcpkg.patch new file mode 100644 index 0000000..9db22af --- /dev/null +++ b/vcpkg/ports/qca/0001-fix-path-for-vcpkg.patch @@ -0,0 +1,63 @@ +From a3a8d50f3bdcb4df630f7126718c21f23efd7832 Mon Sep 17 00:00:00 2001 +From: Alexander Kaspar +Date: Wed, 30 Nov 2016 15:45:12 +0100 +Subject: [PATCH] fix path for vcpkg + +--- + CMakeLists.txt | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 605621b..3b5a9be 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -277,7 +277,7 @@ if(DEVELOPER_MODE) + # To prefer plugins from build tree when run qca from build tree + file(WRITE ${CMAKE_BINARY_DIR}/bin/qt.conf + "[Paths] +-Plugins=${CMAKE_BINARY_DIR}/lib/${QCA_LIB_NAME} ++Plugins=${CMAKE_BINARY_DIR}/bin/${QCA_LIB_NAME} + ") + endif() + +@@ -320,7 +320,7 @@ else (qca_CERTSTORE) + set( qca_CERTSTORE "${CMAKE_CURRENT_SOURCE_DIR}/certs/rootcerts.pem") + # note that INSTALL_FILES targets are relative to the current installation prefix... + if(NOT DEVELOPER_MODE) +- install(FILES "${qca_CERTSTORE}" DESTINATION "${QCA_PREFIX_INSTALL_DIR}/certs") ++ install(FILES "${qca_CERTSTORE}" DESTINATION "${QCA_PREFIX_INSTALL_DIR}/share/qca/certs") + endif() + endif (qca_CERTSTORE) + message(STATUS "certstore path: " ${qca_CERTSTORE}) +@@ -401,10 +401,10 @@ endif(DOXYGEN_FOUND) + include(CMakePackageConfigHelpers) + configure_package_config_file( + "${CMAKE_CURRENT_SOURCE_DIR}/QcaConfig.cmake.in" +- "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}Config.cmake" +- INSTALL_DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/${QCA_CONFIG_NAME_BASE} ++ "${CMAKE_BINARY_DIR}/share/qca/cmake/${QCA_CONFIG_NAME_BASE}Config.cmake" ++ INSTALL_DESTINATION ${CMAKE_BINARY_DIR}/share/qca/cmake + ) +-write_basic_config_version_file("${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}ConfigVersion.cmake" VERSION ${QCA_LIB_VERSION_STRING} COMPATIBILITY AnyNewerVersion) ++write_basic_config_version_file("${CMAKE_BINARY_DIR}/share/qca/cmake/${QCA_CONFIG_NAME_BASE}ConfigVersion.cmake" VERSION ${QCA_LIB_VERSION_STRING} COMPATIBILITY AnyNewerVersion) + + if(NOT DEVELOPER_MODE) + +@@ -472,10 +472,10 @@ if(NOT DEVELOPER_MODE) + endif() + endif() + +- install(EXPORT ${QCA_CONFIG_NAME_BASE}Targets DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/${QCA_CONFIG_NAME_BASE} FILE ${QCA_CONFIG_NAME_BASE}Targets.cmake) ++ install(EXPORT ${QCA_CONFIG_NAME_BASE}Targets DESTINATION ${QCA_PREFIX_INSTALL_DIR}/share/qca/cmake FILE ${QCA_CONFIG_NAME_BASE}Targets.cmake) + install(FILES +- "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}Config.cmake" +- "${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/${QCA_CONFIG_NAME_BASE}/${QCA_CONFIG_NAME_BASE}ConfigVersion.cmake" +- DESTINATION ${QCA_LIBRARY_INSTALL_DIR}/cmake/${QCA_CONFIG_NAME_BASE} ++ "${CMAKE_BINARY_DIR}/share/qca/cmake/${QCA_CONFIG_NAME_BASE}Config.cmake" ++ "${CMAKE_BINARY_DIR}/share/qca/cmake/${QCA_CONFIG_NAME_BASE}ConfigVersion.cmake" ++ DESTINATION ${QCA_PREFIX_INSTALL_DIR}/share/qca/cmake + ) + endif() +-- +2.8.1.windows.1 + diff --git a/vcpkg/ports/qca/0002-fix-build-error.patch b/vcpkg/ports/qca/0002-fix-build-error.patch new file mode 100644 index 0000000..f4ddee3 --- /dev/null +++ b/vcpkg/ports/qca/0002-fix-build-error.patch @@ -0,0 +1,57 @@ +diff --git a/plugins/qca-gnupg/CMakeLists.txt b/plugins/qca-gnupg/CMakeLists.txt +index 1ed8e21..20890dd 100644 +--- a/plugins/qca-gnupg/CMakeLists.txt ++++ b/plugins/qca-gnupg/CMakeLists.txt +@@ -68,6 +68,4 @@ if(NOT DEVELOPER_MODE) + LIBRARY DESTINATION "${QCA_CRYPTO_INSTALL_DIR}" + ARCHIVE DESTINATION "${QCA_CRYPTO_INSTALL_DIR}" + RUNTIME DESTINATION "${QCA_CRYPTO_INSTALL_DIR}") +- +- install_pdb(qca-gnupg ${QCA_CRYPTO_INSTALL_DIR}) + endif() +diff --git a/plugins/qca-logger/CMakeLists.txt b/plugins/qca-logger/CMakeLists.txt +index ba6926e..45e1986 100644 +--- a/plugins/qca-logger/CMakeLists.txt ++++ b/plugins/qca-logger/CMakeLists.txt +@@ -20,6 +20,4 @@ if(NOT DEVELOPER_MODE) + LIBRARY DESTINATION "${QCA_CRYPTO_INSTALL_DIR}" + ARCHIVE DESTINATION "${QCA_CRYPTO_INSTALL_DIR}" + RUNTIME DESTINATION "${QCA_CRYPTO_INSTALL_DIR}") +- +- install_pdb(qca-logger ${QCA_CRYPTO_INSTALL_DIR}) + endif() +diff --git a/plugins/qca-ossl/CMakeLists.txt b/plugins/qca-ossl/CMakeLists.txt +index af3d756..c8480a3 100644 +--- a/plugins/qca-ossl/CMakeLists.txt ++++ b/plugins/qca-ossl/CMakeLists.txt +@@ -65,8 +65,6 @@ if(OPENSSL_FOUND) + LIBRARY DESTINATION "${QCA_CRYPTO_INSTALL_DIR}" + ARCHIVE DESTINATION "${QCA_CRYPTO_INSTALL_DIR}" + RUNTIME DESTINATION "${QCA_CRYPTO_INSTALL_DIR}") +- +- install_pdb(qca-ossl ${QCA_CRYPTO_INSTALL_DIR}) + endif() + + else(OPENSSL_FOUND) +diff --git a/plugins/qca-softstore/CMakeLists.txt b/plugins/qca-softstore/CMakeLists.txt +index d7af072..3c64870 100644 +--- a/plugins/qca-softstore/CMakeLists.txt ++++ b/plugins/qca-softstore/CMakeLists.txt +@@ -20,6 +20,4 @@ if(NOT DEVELOPER_MODE) + LIBRARY DESTINATION "${QCA_CRYPTO_INSTALL_DIR}" + ARCHIVE DESTINATION "${QCA_CRYPTO_INSTALL_DIR}" + RUNTIME DESTINATION "${QCA_CRYPTO_INSTALL_DIR}") +- +- install_pdb(qca-softstore ${QCA_CRYPTO_INSTALL_DIR}) + endif() +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 2e81974..907049c 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -184,6 +184,5 @@ if(NOT DEVELOPER_MODE) + FRAMEWORK DESTINATION "${QCA_LIBRARY_INSTALL_DIR}" + PUBLIC_HEADER DESTINATION "${QCA_FULL_INCLUDE_INSTALL_DIR}" INCLUDES DESTINATION "${QCA_FULL_INCLUDE_INSTALL_DIR}" + ) +- install_pdb(${QCA_LIB_NAME} ${QCA_BINARY_INSTALL_DIR}) + endif() + diff --git a/vcpkg/ports/qca/CONTROL b/vcpkg/ports/qca/CONTROL new file mode 100644 index 0000000..0eadcc1 --- /dev/null +++ b/vcpkg/ports/qca/CONTROL @@ -0,0 +1,5 @@ +Source: qca +Version: 2.2.1-1 +Description: Qt Cryptographic Architecture (QCA). +Homepage: https://cgit.kde.org/qca.git/ +Build-Depends: qt5-base[core] diff --git a/vcpkg/ports/qca/mk-ca-bundle.pl b/vcpkg/ports/qca/mk-ca-bundle.pl new file mode 100644 index 0000000..9574f1d --- /dev/null +++ b/vcpkg/ports/qca/mk-ca-bundle.pl @@ -0,0 +1,554 @@ +#!/usr/bin/perl -w +# *************************************************************************** +# * _ _ ____ _ +# * Project ___| | | | _ \| | +# * / __| | | | |_) | | +# * | (__| |_| | _ <| |___ +# * \___|\___/|_| \_\_____| +# * +# * Copyright (C) 1998 - 2016, Daniel Stenberg, , et al. +# * +# * This software is licensed as described in the file COPYING, which +# * you should have received as part of this distribution. The terms +# * are also available at https://curl.haxx.se/docs/copyright.html. +# * +# * You may opt to use, copy, modify, merge, publish, distribute and/or sell +# * copies of the Software, and permit persons to whom the Software is +# * furnished to do so, under the terms of the COPYING file. +# * +# * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# * KIND, either express or implied. +# * +# *************************************************************************** +# This Perl script creates a fresh ca-bundle.crt file for use with libcurl. +# It downloads certdata.txt from Mozilla's source tree (see URL below), +# then parses certdata.txt and extracts CA Root Certificates into PEM format. +# These are then processed with the OpenSSL commandline tool to produce the +# final ca-bundle.crt file. +# The script is based on the parse-certs script written by Roland Krikava. +# This Perl script works on almost any platform since its only external +# dependency is the OpenSSL commandline tool for optional text listing. +# Hacked by Guenter Knauf. +# +use Encode; +use Getopt::Std; +use MIME::Base64; +use strict; +use vars qw($opt_b $opt_d $opt_f $opt_h $opt_i $opt_k $opt_l $opt_m $opt_n $opt_p $opt_q $opt_s $opt_t $opt_u $opt_v $opt_w); +use List::Util; +use Text::Wrap; +my $MOD_SHA = "Digest::SHA"; +eval "require $MOD_SHA"; +if ($@) { + $MOD_SHA = "Digest::SHA::PurePerl"; + eval "require $MOD_SHA"; +} +eval "require LWP::UserAgent"; + +my %urls = ( + 'nss' => + 'https://hg.mozilla.org/projects/nss/raw-file/tip/lib/ckfw/builtins/certdata.txt', + 'central' => + 'https://hg.mozilla.org/mozilla-central/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', + 'aurora' => + 'https://hg.mozilla.org/releases/mozilla-aurora/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', + 'beta' => + 'https://hg.mozilla.org/releases/mozilla-beta/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', + 'release' => + 'https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt', +); + +$opt_d = 'release'; + +# If the OpenSSL commandline is not in search path you can configure it here! +my $openssl = 'openssl'; + +my $version = '1.27'; + +$opt_w = 76; # default base64 encoded lines length + +# default cert types to include in the output (default is to include CAs which may issue SSL server certs) +my $default_mozilla_trust_purposes = "SERVER_AUTH"; +my $default_mozilla_trust_levels = "TRUSTED_DELEGATOR"; +$opt_p = $default_mozilla_trust_purposes . ":" . $default_mozilla_trust_levels; + +my @valid_mozilla_trust_purposes = ( + "DIGITAL_SIGNATURE", + "NON_REPUDIATION", + "KEY_ENCIPHERMENT", + "DATA_ENCIPHERMENT", + "KEY_AGREEMENT", + "KEY_CERT_SIGN", + "CRL_SIGN", + "SERVER_AUTH", + "CLIENT_AUTH", + "CODE_SIGNING", + "EMAIL_PROTECTION", + "IPSEC_END_SYSTEM", + "IPSEC_TUNNEL", + "IPSEC_USER", + "TIME_STAMPING", + "STEP_UP_APPROVED" +); + +my @valid_mozilla_trust_levels = ( + "TRUSTED_DELEGATOR", # CAs + "NOT_TRUSTED", # Don't trust these certs. + "MUST_VERIFY_TRUST", # This explicitly tells us that it ISN'T a CA but is otherwise ok. In other words, this should tell the app to ignore any other sources that claim this is a CA. + "TRUSTED" # This cert is trusted, but only for itself and not for delegates (i.e. it is not a CA). +); + +my $default_signature_algorithms = $opt_s = "MD5"; + +my @valid_signature_algorithms = ( + "MD5", + "SHA1", + "SHA256", + "SHA384", + "SHA512" +); + +$0 =~ s@.*(/|\\)@@; +$Getopt::Std::STANDARD_HELP_VERSION = 1; +getopts('bd:fhiklmnp:qs:tuvw:'); + +if(!defined($opt_d)) { + # to make plain "-d" use not cause warnings, and actually still work + $opt_d = 'release'; +} + +# Use predefined URL or else custom URL specified on command line. +my $url; +if(defined($urls{$opt_d})) { + $url = $urls{$opt_d}; + if(!$opt_k && $url !~ /^https:\/\//i) { + die "The URL for '$opt_d' is not HTTPS. Use -k to override (insecure).\n"; + } +} +else { + $url = $opt_d; +} + +my $curl = `curl -V`; + +if ($opt_i) { + print ("=" x 78 . "\n"); + print "Script Version : $version\n"; + print "Perl Version : $]\n"; + print "Operating System Name : $^O\n"; + print "Getopt::Std.pm Version : ${Getopt::Std::VERSION}\n"; + print "MIME::Base64.pm Version : ${MIME::Base64::VERSION}\n"; + print "LWP::UserAgent.pm Version : ${LWP::UserAgent::VERSION}\n" if($LWP::UserAgent::VERSION); + print "LWP.pm Version : ${LWP::VERSION}\n" if($LWP::VERSION); + print "Digest::SHA.pm Version : ${Digest::SHA::VERSION}\n" if ($Digest::SHA::VERSION); + print "Digest::SHA::PurePerl.pm Version : ${Digest::SHA::PurePerl::VERSION}\n" if ($Digest::SHA::PurePerl::VERSION); + print ("=" x 78 . "\n"); +} + +sub warning_message() { + if ( $opt_d =~ m/^risk$/i ) { # Long Form Warning and Exit + print "Warning: Use of this script may pose some risk:\n"; + print "\n"; + print " 1) If you use HTTP URLs they are subject to a man in the middle attack\n"; + print " 2) Default to 'release', but more recent updates may be found in other trees\n"; + print " 3) certdata.txt file format may change, lag time to update this script\n"; + print " 4) Generally unwise to blindly trust CAs without manual review & verification\n"; + print " 5) Mozilla apps use additional security checks aren't represented in certdata\n"; + print " 6) Use of this script will make a security engineer grind his teeth and\n"; + print " swear at you. ;)\n"; + exit; + } else { # Short Form Warning + print "Warning: Use of this script may pose some risk, -d risk for more details.\n"; + } +} + +sub HELP_MESSAGE() { + print "Usage:\t${0} [-b] [-d] [-f] [-i] [-k] [-l] [-n] [-p] [-q] [-s] [-t] [-u] [-v] [-w] []\n"; + print "\t-b\tbackup an existing version of ca-bundle.crt\n"; + print "\t-d\tspecify Mozilla tree to pull certdata.txt or custom URL\n"; + print "\t\t Valid names are:\n"; + print "\t\t ", join( ", ", map { ( $_ =~ m/$opt_d/ ) ? "$_ (default)" : "$_" } sort keys %urls ), "\n"; + print "\t-f\tforce rebuild even if certdata.txt is current\n"; + print "\t-i\tprint version info about used modules\n"; + print "\t-k\tallow URLs other than HTTPS, enable HTTP fallback (insecure)\n"; + print "\t-l\tprint license info about certdata.txt\n"; + print "\t-m\tinclude meta data in output\n"; + print "\t-n\tno download of certdata.txt (to use existing)\n"; + print wrap("\t","\t\t", "-p\tlist of Mozilla trust purposes and levels for certificates to include in output. Takes the form of a comma separated list of purposes, a colon, and a comma separated list of levels. (default: $default_mozilla_trust_purposes:$default_mozilla_trust_levels)"), "\n"; + print "\t\t Valid purposes are:\n"; + print wrap("\t\t ","\t\t ", join( ", ", "ALL", @valid_mozilla_trust_purposes ) ), "\n"; + print "\t\t Valid levels are:\n"; + print wrap("\t\t ","\t\t ", join( ", ", "ALL", @valid_mozilla_trust_levels ) ), "\n"; + print "\t-q\tbe really quiet (no progress output at all)\n"; + print wrap("\t","\t\t", "-s\tcomma separated list of certificate signatures/hashes to output in plain text mode. (default: $default_signature_algorithms)\n"); + print "\t\t Valid signature algorithms are:\n"; + print wrap("\t\t ","\t\t ", join( ", ", "ALL", @valid_signature_algorithms ) ), "\n"; + print "\t-t\tinclude plain text listing of certificates\n"; + print "\t-u\tunlink (remove) certdata.txt after processing\n"; + print "\t-v\tbe verbose and print out processed CAs\n"; + print "\t-w \twrap base64 output lines after chars (default: ${opt_w})\n"; + exit; +} + +sub VERSION_MESSAGE() { + print "${0} version ${version} running Perl ${]} on ${^O}\n"; +} + +warning_message() unless ($opt_q || $url =~ m/^(ht|f)tps:/i ); +HELP_MESSAGE() if ($opt_h); + +sub report($@) { + my $output = shift; + + print STDERR $output . "\n" unless $opt_q; +} + +sub is_in_list($@) { + my $target = shift; + + return defined(List::Util::first { $target eq $_ } @_); +} + +# Parses $param_string as a case insensitive comma separated list with optional whitespace +# validates that only allowed parameters are supplied +sub parse_csv_param($$@) { + my $description = shift; + my $param_string = shift; + my @valid_values = @_; + + my @values = map { + s/^\s+//; # strip leading spaces + s/\s+$//; # strip trailing spaces + uc $_ # return the modified string as upper case + } split( ',', $param_string ); + + # Find all values which are not in the list of valid values or "ALL" + my @invalid = grep { !is_in_list($_,"ALL",@valid_values) } @values; + + if ( scalar(@invalid) > 0 ) { + # Tell the user which parameters were invalid and print the standard help message which will exit + print "Error: Invalid ", $description, scalar(@invalid) == 1 ? ": " : "s: ", join( ", ", map { "\"$_\"" } @invalid ), "\n"; + HELP_MESSAGE(); + } + + @values = @valid_values if ( is_in_list("ALL",@values) ); + + return @values; +} + +sub sha256 { + my $result; + if ($Digest::SHA::VERSION || $Digest::SHA::PurePerl::VERSION) { + open(FILE, $_[0]) or die "Can't open '$_[0]': $!"; + binmode(FILE); + $result = $MOD_SHA->new(256)->addfile(*FILE)->hexdigest; + close(FILE); + } else { + # Use OpenSSL command if Perl Digest::SHA modules not available + $result = `"$openssl" dgst -r -sha256 "$_[0]"`; + $result =~ s/^([0-9a-f]{64}) .+/$1/is; + } + return $result; +} + + +sub oldhash { + my $hash = ""; + open(C, "<$_[0]") || return 0; + while() { + chomp; + if($_ =~ /^\#\# SHA256: (.*)/) { + $hash = $1; + last; + } + } + close(C); + return $hash; +} + +if ( $opt_p !~ m/:/ ) { + print "Error: Mozilla trust identifier list must include both purposes and levels\n"; + HELP_MESSAGE(); +} + +(my $included_mozilla_trust_purposes_string, my $included_mozilla_trust_levels_string) = split( ':', $opt_p ); +my @included_mozilla_trust_purposes = parse_csv_param( "trust purpose", $included_mozilla_trust_purposes_string, @valid_mozilla_trust_purposes ); +my @included_mozilla_trust_levels = parse_csv_param( "trust level", $included_mozilla_trust_levels_string, @valid_mozilla_trust_levels ); + +my @included_signature_algorithms = parse_csv_param( "signature algorithm", $opt_s, @valid_signature_algorithms ); + +sub should_output_cert(%) { + my %trust_purposes_by_level = @_; + + foreach my $level (@included_mozilla_trust_levels) { + # for each level we want to output, see if any of our desired purposes are included + return 1 if ( defined( List::Util::first { is_in_list( $_, @included_mozilla_trust_purposes ) } @{$trust_purposes_by_level{$level}} ) ); + } + + return 0; +} + +my $crt = $ARGV[0] || 'ca-bundle.crt'; +(my $txt = $url) =~ s@(.*/|\?.*)@@g; + +my $stdout = $crt eq '-'; +my $resp; +my $fetched; + +my $oldhash = oldhash($crt); + +report "SHA256 of old file: $oldhash"; + +if(!$opt_n) { + report "Downloading $txt ..."; + + # If we have an HTTPS URL then use curl + if($url =~ /^https:\/\//i) { + if($curl) { + if($curl =~ /^Protocols:.* https( |$)/m) { + report "Get certdata with curl!"; + my $proto = !$opt_k ? "--proto =https" : ""; + my $quiet = $opt_q ? "-s" : ""; + my @out = `curl -w %{response_code} $proto $quiet -o "$txt" "$url"`; + if(@out && $out[0] == 200) { + $fetched = 1; + report "Downloaded $txt"; + } + else { + report "Failed downloading via HTTPS with curl"; + if(-e $txt && !unlink($txt)) { + report "Failed to remove '$txt': $!"; + } + } + } + else { + report "curl lacks https support"; + } + } + else { + report "curl not found"; + } + } + + # If nothing was fetched then use LWP + if(!$fetched) { + if($url =~ /^https:\/\//i) { + report "Falling back to HTTP"; + $url =~ s/^https:\/\//http:\/\//i; + } + if(!$opt_k) { + report "URLs other than HTTPS are disabled by default, to enable use -k"; + exit 1; + } + report "Get certdata with LWP!"; + if(!defined(${LWP::UserAgent::VERSION})) { + report "LWP is not available (LWP::UserAgent not found)"; + exit 1; + } + my $ua = new LWP::UserAgent(agent => "$0/$version"); + $ua->env_proxy(); + $resp = $ua->mirror($url, $txt); + if($resp && $resp->code eq '304') { + report "Not modified"; + exit 0 if -e $crt && !$opt_f; + } + else { + $fetched = 1; + report "Downloaded $txt"; + } + if(!$resp || $resp->code !~ /^(?:200|304)$/) { + report "Unable to download latest data: " + . ($resp? $resp->code . ' - ' . $resp->message : "LWP failed"); + exit 1 if -e $crt || ! -r $txt; + } + } +} + +my $filedate = $resp ? $resp->last_modified : (stat($txt))[9]; +my $datesrc = "as of"; +if(!$filedate) { + # mxr.mozilla.org gave us a time, hg.mozilla.org does not! + $filedate = time(); + $datesrc="downloaded on"; +} + +# get the hash from the download file +my $newhash= sha256($txt); + +if(!$opt_f && $oldhash eq $newhash) { + report "Downloaded file identical to previous run\'s source file. Exiting"; + exit; +} + +report "SHA256 of new file: $newhash"; + +my $currentdate = scalar gmtime($filedate); + +my $format = $opt_t ? "plain text and " : ""; +if( $stdout ) { + open(CRT, '> -') or die "Couldn't open STDOUT: $!\n"; +} else { + open(CRT,">$crt.~") or die "Couldn't open $crt.~: $!\n"; +} +print CRT <) { + if (/\*\*\*\*\* BEGIN LICENSE BLOCK \*\*\*\*\*/) { + print CRT; + print if ($opt_l); + while () { + print CRT; + print if ($opt_l); + last if (/\*\*\*\*\* END LICENSE BLOCK \*\*\*\*\*/); + } + } + elsif(/^# (Issuer|Serial Number|Subject|Not Valid Before|Not Valid After |Fingerprint \(MD5\)|Fingerprint \(SHA1\)):/) { + push @precert, $_; + next; + } + elsif(/^#|^\s*$/) { + undef @precert; + next; + } + chomp; + + # this is a match for the start of a certificate + if (/^CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE/) { + $start_of_cert = 1 + } + if ($start_of_cert && /^CKA_LABEL UTF8 \"(.*)\"/) { + $caname = $1; + } + my %trust_purposes_by_level; + if ($start_of_cert && /^CKA_VALUE MULTILINE_OCTAL/) { + my $data; + while () { + last if (/^END/); + chomp; + my @octets = split(/\\/); + shift @octets; + for (@octets) { + $data .= chr(oct); + } + } + # scan forwards until the trust part + while () { + last if (/^CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST/); + chomp; + } + # now scan the trust part to determine how we should trust this cert + while () { + last if (/^#/); + if (/^CKA_TRUST_([A-Z_]+)\s+CK_TRUST\s+CKT_NSS_([A-Z_]+)\s*$/) { + if ( !is_in_list($1,@valid_mozilla_trust_purposes) ) { + report "Warning: Unrecognized trust purpose for cert: $caname. Trust purpose: $1. Trust Level: $2"; + } elsif ( !is_in_list($2,@valid_mozilla_trust_levels) ) { + report "Warning: Unrecognized trust level for cert: $caname. Trust purpose: $1. Trust Level: $2"; + } else { + push @{$trust_purposes_by_level{$2}}, $1; + } + } + } + + if ( !should_output_cert(%trust_purposes_by_level) ) { + $skipnum ++; + } else { + my $encoded = MIME::Base64::encode_base64($data, ''); + $encoded =~ s/(.{1,${opt_w}})/$1\n/g; + my $pem = "-----BEGIN CERTIFICATE-----\n" + . $encoded + . "-----END CERTIFICATE-----\n"; + print CRT "\n$caname\n"; + print CRT @precert if($opt_m); + my $maxStringLength = length(decode('UTF-8', $caname, Encode::FB_CROAK)); + if ($opt_t) { + foreach my $key (keys %trust_purposes_by_level) { + my $string = $key . ": " . join(", ", @{$trust_purposes_by_level{$key}}); + $maxStringLength = List::Util::max( length($string), $maxStringLength ); + print CRT $string . "\n"; + } + } + print CRT ("=" x $maxStringLength . "\n"); + if (!$opt_t) { + print CRT $pem; + } else { + my $pipe = ""; + foreach my $hash (@included_signature_algorithms) { + $pipe = "|$openssl x509 -" . $hash . " -fingerprint -noout -inform PEM"; + if (!$stdout) { + $pipe .= " >> $crt.~"; + close(CRT) or die "Couldn't close $crt.~: $!"; + } + open(TMP, $pipe) or die "Couldn't open openssl pipe: $!"; + print TMP $pem; + close(TMP) or die "Couldn't close openssl pipe: $!"; + if (!$stdout) { + open(CRT, ">>$crt.~") or die "Couldn't open $crt.~: $!"; + } + } + $pipe = "|$openssl x509 -text -inform PEM"; + if (!$stdout) { + $pipe .= " >> $crt.~"; + close(CRT) or die "Couldn't close $crt.~: $!"; + } + open(TMP, $pipe) or die "Couldn't open openssl pipe: $!"; + print TMP $pem; + close(TMP) or die "Couldn't close openssl pipe: $!"; + if (!$stdout) { + open(CRT, ">>$crt.~") or die "Couldn't open $crt.~: $!"; + } + } + report "Parsing: $caname" if ($opt_v); + $certnum ++; + $start_of_cert = 0; + } + undef @precert; + } + +} +close(TXT) or die "Couldn't close $txt: $!\n"; +close(CRT) or die "Couldn't close $crt.~: $!\n"; +unless( $stdout ) { + if ($opt_b && -e $crt) { + my $bk = 1; + while (-e "$crt.~${bk}~") { + $bk++; + } + rename $crt, "$crt.~${bk}~" or die "Failed to create backup $crt.~$bk}~: $!\n"; + } elsif( -e $crt ) { + unlink( $crt ) or die "Failed to remove $crt: $!\n"; + } + rename "$crt.~", $crt or die "Failed to rename $crt.~ to $crt: $!\n"; +} +if($opt_u && -e $txt && !unlink($txt)) { + report "Failed to remove $txt: $!\n"; +} +report "Done ($certnum CA certs processed, $skipnum skipped)."; diff --git a/vcpkg/ports/qca/portfile.cmake b/vcpkg/ports/qca/portfile.cmake new file mode 100644 index 0000000..9b2b153 --- /dev/null +++ b/vcpkg/ports/qca/portfile.cmake @@ -0,0 +1,98 @@ +# This portfile adds the Qt Cryptographic Arcitecture +# Changes to the original build: +# No -qt5 suffix, which is recommended just for Linux +# Output directories according to vcpkg +# Updated certstore. See certstore.pem in the output dirs +# + +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_find_acquire_program(PERL) +get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) +vcpkg_add_to_path(${PERL_EXE_PATH}) + +if(EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git") + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KDE/qca + REF v2.2.1 + SHA512 6b10f9bbf9ebf136655d1c6464f3849c8581b3cd5ef07b0697ddd5f32611dce301af5148e8e6fe91e763301e68994957a62a278334ee7a78559101f411f27d49 + PATCHES + 0001-fix-path-for-vcpkg.patch + 0002-fix-build-error.patch +) + +# According to: +# https://www.openssl.org/docs/faq.html#USER16 +# it is up to developers or admins to maintain CAs. +# So we do it here: +message(STATUS "Importing certstore") +file(REMOVE ${SOURCE_PATH}/certs/rootcerts.pem) +# Using file(DOWNLOAD) to use https +file(DOWNLOAD https://raw.githubusercontent.com/mozilla/gecko-dev/master/security/nss/lib/ckfw/builtins/certdata.txt + ${CURRENT_BUILDTREES_DIR}/cert/certdata.txt + TLS_VERIFY ON +) +vcpkg_execute_required_process( + COMMAND ${PERL} ${CMAKE_CURRENT_LIST_DIR}/mk-ca-bundle.pl -n ${SOURCE_PATH}/certs/rootcerts.pem + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/cert + LOGNAME ca-bundle +) +message(STATUS "Importing certstore done") + +# Configure and build +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DUSE_RELATIVE_PATHS=ON + -DQT4_BUILD=OFF + -DBUILD_TESTS=OFF + -DBUILD_TOOLS=OFF + -DQCA_SUFFIX=OFF + -DQCA_FEATURE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/share/qca/mkspecs/features + OPTIONS_DEBUG + -DQCA_PLUGINS_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/bin/Qca + OPTIONS_RELEASE + -DQCA_PLUGINS_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/bin/Qca +) + +vcpkg_install_cmake() + +# Patch and copy cmake files +message(STATUS "Patching files") +file(READ + ${CURRENT_PACKAGES_DIR}/debug/share/qca/cmake/QcaTargets-debug.cmake + QCA_DEBUG_CONFIG +) +string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" QCA_DEBUG_CONFIG "${QCA_DEBUG_CONFIG}") +file(WRITE + ${CURRENT_PACKAGES_DIR}/share/qca/cmake/QcaTargets-debug.cmake + "${QCA_DEBUG_CONFIG}" +) + +file(READ ${CURRENT_PACKAGES_DIR}/share/qca/cmake/QcaTargets.cmake + QCA_TARGET_CONFIG +) +string(REPLACE "packages/qca_" "installed/" QCA_TARGET_CONFIG "${QCA_TARGET_CONFIG}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/qca/cmake/QcaTargets.cmake + "${QCA_TARGET_CONFIG}" +) + +# Remove unneeded dirs +file(REMOVE_RECURSE + ${CURRENT_BUILDTREES_DIR}/share/man + ${CURRENT_PACKAGES_DIR}/share/man + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) +message(STATUS "Patching files done") + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/qca) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/qca/COPYING ${CURRENT_PACKAGES_DIR}/share/qca/copyright) diff --git a/vcpkg/ports/qcustomplot/CONTROL b/vcpkg/ports/qcustomplot/CONTROL new file mode 100644 index 0000000..ec7dac0 --- /dev/null +++ b/vcpkg/ports/qcustomplot/CONTROL @@ -0,0 +1,4 @@ +Source: qcustomplot +Version: 2.0.1-4 +Description: QCustomPlot is a Qt C++ widget for plotting and data visualization. +Build-Depends: qt5-base[core] diff --git a/vcpkg/ports/qcustomplot/portfile.cmake b/vcpkg/ports/qcustomplot/portfile.cmake new file mode 100644 index 0000000..ba153e7 --- /dev/null +++ b/vcpkg/ports/qcustomplot/portfile.cmake @@ -0,0 +1,40 @@ +include(vcpkg_common_functions) + +set(QCP_VERSION 2.0.1) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.qcustomplot.com/release/${QCP_VERSION}/QCustomPlot.tar.gz" + FILENAME "QCustomPlot-${QCP_VERSION}.tar.gz" + SHA512 a15598718146ed3c6b5d38530a56661c16269e530fe0dedb71b4cb2722b5733a3b57689d668a75994b79c19c6e61dcc133dbcb9ed77b93a165f4ac826a5685b9 +) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${QCP_VERSION} +) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.qcustomplot.com/release/${QCP_VERSION}/QCustomPlot-sharedlib.tar.gz" + FILENAME "QCustomPlot-sharedlib-${QCP_VERSION}.tar.gz" + SHA512 ce90540fca7226eac37746327e1939a9c7af38fc2595f385ed04d6d1f49560da08fb5fae15d1b9d22b6ba578583f70de8f89ef26796770d41bf599c1b15c535d +) +vcpkg_extract_source_archive(${ARCHIVE} ${SOURCE_PATH}) + +vcpkg_configure_qmake(SOURCE_PATH + ${SOURCE_PATH}/qcustomplot-sharedlib/sharedlib-compilation/sharedlib-compilation.pro +) + +vcpkg_install_qmake( + RELEASE_TARGETS release-all + DEBUG_TARGETS debug-all +) + +# Install header file +file(INSTALL ${SOURCE_PATH}/qcustomplot.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include +) + +vcpkg_copy_pdbs() + +# Handle copyright +configure_file(${SOURCE_PATH}/GPL.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/qhull/CONTROL b/vcpkg/ports/qhull/CONTROL new file mode 100644 index 0000000..4390afe --- /dev/null +++ b/vcpkg/ports/qhull/CONTROL @@ -0,0 +1,4 @@ +Source: qhull +Version: 8.0.2 +Homepage: https://github.com/qhull/qhull +Description: computes the convex hull, Delaunay triangulation, Voronoi diagram diff --git a/vcpkg/ports/qhull/include-qhullcpp-shared.patch b/vcpkg/ports/qhull/include-qhullcpp-shared.patch new file mode 100644 index 0000000..cbf5eaa --- /dev/null +++ b/vcpkg/ports/qhull/include-qhullcpp-shared.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f50b187..30109b3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -344,7 +344,7 @@ set(qhull_SHAREDP qhull_p) # libqhull and qhull_p are deprecated, use qhull_r i + + set(qhull_TARGETS_APPLICATIONS qhull rbox qconvex qdelaunay qvoronoi qhalf) + set(qhull_TARGETS_STATIC ${qhull_CPP} ${qhull_STATIC} ${qhull_STATICR}) +-set(qhull_TARGETS_SHARED ${qhull_SHAREDR}) ++set(qhull_TARGETS_SHARED ${qhull_CPP} ${qhull_SHAREDR}) + + set( + qhull_TARGETS_TEST # Unused +@@ -474,7 +474,6 @@ set_target_properties(${qhull_CPP} PROPERTIES + if(NOT ${BUILD_STATIC_LIBS}) + set_target_properties(${qhull_STATIC} PROPERTIES EXCLUDE_FROM_ALL TRUE) + set_target_properties(${qhull_STATICR} PROPERTIES EXCLUDE_FROM_ALL TRUE) +- set_target_properties(${qhull_CPP} PROPERTIES EXCLUDE_FROM_ALL TRUE) + endif() + if(NOT ${BUILD_SHARED_LIBS}) + set_target_properties(${qhull_SHARED} PROPERTIES EXCLUDE_FROM_ALL TRUE) diff --git a/vcpkg/ports/qhull/portfile.cmake b/vcpkg/ports/qhull/portfile.cmake new file mode 100644 index 0000000..bf0230b --- /dev/null +++ b/vcpkg/ports/qhull/portfile.cmake @@ -0,0 +1,57 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO qhull/qhull + REF 613debeaea72ee66626dace9ba1a2eff11b5d37d + SHA512 5b8ff9665ba73621a9859a6e86717b980b67f8d79d6c78cbf5672bce66aed671f7d64fcbec457bca79eef2e17e105f136017afdf442bb430b9f4a059d7cb93c3 + HEAD_REF master + PATCHES include-qhullcpp-shared.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIBS) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/share/man + ${CURRENT_PACKAGES_DIR}/share/doc + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share/man + ${CURRENT_PACKAGES_DIR}/debug/share/doc +) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Qhull) +file(REMOVE + ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/qhullstatic.pc + ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/qhullstatic_d.pc +) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE + ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/qhull_r.pc + ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/qhull_rd.pc + ) +else() + file(REMOVE + ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/qhullstatic_r.pc + ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/qhullstatic_rd.pc + ) +endif() +vcpkg_fixup_pkgconfig() + +vcpkg_copy_tools(TOOL_NAMES + qconvex + qdelaunay + qhalf + qhull + qvoronoi + rbox + AUTO_CLEAN +) + +file(INSTALL ${SOURCE_PATH}/README.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/qpid-proton/CONTROL b/vcpkg/ports/qpid-proton/CONTROL new file mode 100644 index 0000000..ecaa812 --- /dev/null +++ b/vcpkg/ports/qpid-proton/CONTROL @@ -0,0 +1,5 @@ +Source: qpid-proton +Version: 0.30.0 +Build-Depends: openssl (!windows&!uwp), libuv (osx), jsoncpp +Homepage: https://github.com/apache/qpid-proton +Description: Qpid Proton is a high-performance, lightweight messaging library. \ No newline at end of file diff --git a/vcpkg/ports/qpid-proton/portfile.cmake b/vcpkg/ports/qpid-proton/portfile.cmake new file mode 100644 index 0000000..902c858 --- /dev/null +++ b/vcpkg/ports/qpid-proton/portfile.cmake @@ -0,0 +1,51 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_find_acquire_program(PYTHON3) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO apache/qpid-proton + REF 77947c047f24fc7d0ddd6ba41fa14d3e8ccb3f49 # 0.30.0 + SHA512 21711081ae6fe5f791039a6295f652370e1762587b16be4fa12f5a3b4a29f6b5aee62ff25e96303ac82ba360a0682c7e92aae4419e81f9a3cf14c98fcd34b489 + HEAD_REF next +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPYTHON_EXECUTABLE=${PYTHON3} + -DLIB_SUFFIX= + -DBUILD_GO=no + -DBUILD_RUBY=no + -DBUILD_PYTHON=no + -DENABLE_JSONCPP=ON + -DCMAKE_DISABLE_FIND_PACKAGE_CyrusSASL=ON +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(GLOB SHARE_DIR ${CURRENT_PACKAGES_DIR}/share/*) +file(RENAME ${SHARE_DIR} ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/cmake/tmp) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/tmp) +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/Proton ${CURRENT_PACKAGES_DIR}/lib/cmake/tmp/Proton) +file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/Proton ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/tmp/Proton) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/tmp/Proton TARGET_PATH share/proton) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/ProtonCpp TARGET_PATH share/protoncpp) + +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE.txt + ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +file(REMOVE ${CURRENT_PACKAGES_DIR}/share/qpid-proton/CMakeLists.txt) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/qpid-proton/tests) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/qpid-proton/examples) diff --git a/vcpkg/ports/qscintilla/CONTROL b/vcpkg/ports/qscintilla/CONTROL new file mode 100644 index 0000000..6f730f9 --- /dev/null +++ b/vcpkg/ports/qscintilla/CONTROL @@ -0,0 +1,5 @@ +Source: qscintilla +Version: 2.11.4-2 +Homepage: https://www.riverbankcomputing.com/software/qscintilla +Description: QScintilla is a port to Qt of the Scintilla editing component. Features syntax highlighting, code-completion and much more (Barebone build without python bindings (missing dependeny PyQt) and without QtDesigner plugin) +Build-Depends: qt5-base[core], qt5-macextras (osx), qt5-winextras (windows) \ No newline at end of file diff --git a/vcpkg/ports/qscintilla/fix-static.patch b/vcpkg/ports/qscintilla/fix-static.patch new file mode 100644 index 0000000..f3a4a61 --- /dev/null +++ b/vcpkg/ports/qscintilla/fix-static.patch @@ -0,0 +1,29 @@ +diff --git a/Qt4Qt5/qscintilla.pro b/Qt4Qt5/qscintilla.pro +index 075079c32..8ff8678b6 100644 +--- a/Qt4Qt5/qscintilla.pro ++++ b/Qt4Qt5/qscintilla.pro +@@ -37,13 +37,13 @@ CONFIG(debug, debug|release) { + TARGET = qscintilla2_qt$${QT_MAJOR_VERSION} + } + +-macx:!CONFIG(staticlib) { ++macx:!CONFIG(static) { + QMAKE_POST_LINK += install_name_tool -id @rpath/$(TARGET1) $(TARGET) + } + + INCLUDEPATH += . ../include ../lexlib ../src + +-!CONFIG(staticlib) { ++!CONFIG(static) { + DEFINES += QSCINTILLA_MAKE_DLL + } + DEFINES += SCINTILLA_QT SCI_LEXER INCLUDE_DEPRECATED_FEATURES +@@ -90,7 +90,7 @@ greaterThan(QT_MAJOR_VERSION, 4) { + } else { + features.path = $$[QT_INSTALL_DATA]/mkspecs/features + } +-CONFIG(staticlib) { ++CONFIG(static) { + features.files = $$PWD/features_staticlib/qscintilla2.prf + } else { + features.files = $$PWD/features/qscintilla2.prf diff --git a/vcpkg/ports/qscintilla/portfile.cmake b/vcpkg/ports/qscintilla/portfile.cmake new file mode 100644 index 0000000..8ef8972 --- /dev/null +++ b/vcpkg/ports/qscintilla/portfile.cmake @@ -0,0 +1,43 @@ +vcpkg_download_distfile(ARCHIVE + URLS "https://www.riverbankcomputing.com/static/Downloads/QScintilla/2.11.4/QScintilla-2.11.4.tar.gz" + FILENAME "QScintilla-2.11.4.tar.gz" + SHA512 90fc2427121ca9ae55e34cf636460099bbdadd844318d9ef05f86790a36e25fb64528264bb7bb99e46b7add96378eff0cc69bb692940c6a1bddfadf86a9abdbd +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + fix-static.patch +) + +vcpkg_find_acquire_program(PYTHON3) + +# Add python3 to path +get_filename_component(PYTHON3_PATH ${PYTHON3} DIRECTORY) +vcpkg_add_to_path(${PYTHON3_PATH}) + +vcpkg_configure_qmake( + SOURCE_PATH ${SOURCE_PATH}/Qt4Qt5 + OPTIONS + CONFIG+=build_all + CONFIG-=hide_symbols + DEFINES+=SCI_NAMESPACE +) + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_install_qmake( + RELEASE_TARGETS release + DEBUG_TARGETS debug + ) +else() + vcpkg_install_qmake() +endif() + +file(GLOB HEADER_FILES ${SOURCE_PATH}/Qt4Qt5/Qsci/*) +file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/Qsci) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/qt-advanced-docking-system/CONTROL b/vcpkg/ports/qt-advanced-docking-system/CONTROL new file mode 100644 index 0000000..75304a4 --- /dev/null +++ b/vcpkg/ports/qt-advanced-docking-system/CONTROL @@ -0,0 +1,5 @@ +Source: qt-advanced-docking-system +Version: 3.6.1 +Build-Depends: qt5-base[core], qt5-x11extras (!windows), zlib, bzip2 +Description: Create customizable layouts using an advanced window docking system similar to what is found in many popular IDEs such as Visual Studio +Homepage: https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System diff --git a/vcpkg/ports/qt-advanced-docking-system/config_changes.patch b/vcpkg/ports/qt-advanced-docking-system/config_changes.patch new file mode 100644 index 0000000..3ee543d --- /dev/null +++ b/vcpkg/ports/qt-advanced-docking-system/config_changes.patch @@ -0,0 +1,13 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 0bd721d..4848c5f 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -52,7 +52,7 @@ if (UNIX) + set(ads_SRCS linux/FloatingWidgetTitleBar.cpp ${ads_SRCS}) + set(ads_HEADERS linux/FloatingWidgetTitleBar.h ${ads_HEADERS}) + endif() +-if(BUILD_STATIC) ++if(NOT BUILD_SHARED_LIBS) + add_library(qtadvanceddocking STATIC ${ads_SRCS} ${ads_HEADERS}) + target_compile_definitions(qtadvanceddocking PUBLIC ADS_STATIC) + else() diff --git a/vcpkg/ports/qt-advanced-docking-system/hardcode_version.patch b/vcpkg/ports/qt-advanced-docking-system/hardcode_version.patch new file mode 100644 index 0000000..f5fc9ca --- /dev/null +++ b/vcpkg/ports/qt-advanced-docking-system/hardcode_version.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 94fdb8d..6febea2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,11 +1,6 @@ + cmake_minimum_required(VERSION 3.5) + set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH}) +-include(GetGitRevisionDescription) +-git_describe(GitTagVersion --tags) +-string(REGEX REPLACE "^([0-9]+)\\..*" "\\1" VERSION_MAJOR "${GitTagVersion}") +-string(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" VERSION_MINOR "${GitTagVersion}") +-string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" VERSION_PATCH "${GitTagVersion}") +-set(VERSION_SHORT "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}") ++ + project(QtADS LANGUAGES CXX VERSION ${VERSION_SHORT}) + option(BUILD_STATIC "Build the static library" OFF) + option(BUILD_EXAMPLES "Build the examples" ON) diff --git a/vcpkg/ports/qt-advanced-docking-system/portfile.cmake b/vcpkg/ports/qt-advanced-docking-system/portfile.cmake new file mode 100644 index 0000000..690f1ea --- /dev/null +++ b/vcpkg/ports/qt-advanced-docking-system/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO githubuser0xFFFF/Qt-Advanced-Docking-System + REF 6846c9614602f21c51057a32d759a51eba1fc4d9 + SHA512 1ea130bf5bf2a567ec5510f450c1de74abeaab36258cb28585539a266889326e40c4912bf52b66dfced47e54b6fe0947211b9f53789666fe55744da509328edd + HEAD_REF master + PATCHES + hardcode_version.patch + config_changes.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_EXAMPLES=OFF + -DVERSION_SHORT=3.6.1 +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/gnu-lgpl-v2.1.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/license) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/qtadvanceddocking TARGET_PATH share/qtadvanceddocking) diff --git a/vcpkg/ports/qt5-3d/CONTROL b/vcpkg/ports/qt5-3d/CONTROL new file mode 100644 index 0000000..179432b --- /dev/null +++ b/vcpkg/ports/qt5-3d/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-3d +Version: 5.15.0 +Description: Qt5 3d Module - Functionality for near-realtime simulation systems with support for 2D and 3D rendering +Build-Depends: qt5-base[core], qt5-declarative, qt5-imageformats, qt5-gamepad diff --git a/vcpkg/ports/qt5-3d/portfile.cmake b/vcpkg/ports/qt5-3d/portfile.cmake new file mode 100644 index 0000000..2147267 --- /dev/null +++ b/vcpkg/ports/qt5-3d/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-activeqt/CONTROL b/vcpkg/ports/qt5-activeqt/CONTROL new file mode 100644 index 0000000..dc7a4cd --- /dev/null +++ b/vcpkg/ports/qt5-activeqt/CONTROL @@ -0,0 +1,5 @@ +Source: qt5-activeqt +Version: 5.15.0 +Description: Qt5 ActiveQt Module - ActiveX components +Build-Depends: qt5-base[core], qt5-declarative +Supports: windows \ No newline at end of file diff --git a/vcpkg/ports/qt5-activeqt/portfile.cmake b/vcpkg/ports/qt5-activeqt/portfile.cmake new file mode 100644 index 0000000..a73a605 --- /dev/null +++ b/vcpkg/ports/qt5-activeqt/portfile.cmake @@ -0,0 +1,6 @@ +if (NOT VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "qt5-activeqt only support Windows.") +endif() + +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-androidextras/CONTROL b/vcpkg/ports/qt5-androidextras/CONTROL new file mode 100644 index 0000000..d10b89b --- /dev/null +++ b/vcpkg/ports/qt5-androidextras/CONTROL @@ -0,0 +1,5 @@ +Source: qt5-androidextras +Version: 5.15.0 +Description: Qt5 androidextras Module; +Build-Depends: qt5-base[core] +Supports: android \ No newline at end of file diff --git a/vcpkg/ports/qt5-androidextras/portfile.cmake b/vcpkg/ports/qt5-androidextras/portfile.cmake new file mode 100644 index 0000000..2147267 --- /dev/null +++ b/vcpkg/ports/qt5-androidextras/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-base/CONTROL b/vcpkg/ports/qt5-base/CONTROL new file mode 100644 index 0000000..8f4c07f --- /dev/null +++ b/vcpkg/ports/qt5-base/CONTROL @@ -0,0 +1,9 @@ +Source: qt5-base +Version: 5.15.0 +Port-Version: 3 +Homepage: https://www.qt.io/ +Description: Qt5 Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components. +Build-Depends: zlib, zstd, libjpeg-turbo, libpng, freetype, pcre2, harfbuzz, sqlite3, libpq, double-conversion, openssl, angle (!windows), egl-registry, icu (!uwp), fontconfig (!windows) + +Feature: latest +Description: Build latest qt version (5.15.0) instead of LTS (latest and LTS are currently the same) diff --git a/vcpkg/ports/qt5-base/cmake/configure_qt.cmake b/vcpkg/ports/qt5-base/cmake/configure_qt.cmake new file mode 100644 index 0000000..a6bf1dd --- /dev/null +++ b/vcpkg/ports/qt5-base/cmake/configure_qt.cmake @@ -0,0 +1,134 @@ +function(configure_qt) + cmake_parse_arguments(_csc "" "SOURCE_PATH;TARGET_PLATFORM;HOST_PLATFORM;HOST_TOOLS_ROOT" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN}) + + if(NOT _csc_TARGET_PLATFORM) + message(FATAL_ERROR "configure_qt requires a TARGET_PLATFORM argument.") + endif() + + if(DEFINED _csc_HOST_PLATFORM) + list(APPEND _csc_OPTIONS -platform ${_csc_HOST_PLATFORM}) + endif() + + if(DEFINED _csc_HOST_TOOLS_ROOT) + ## vcpkg internal file struture assumed here! + message(STATUS "Building Qt with prepared host tools from ${_csc_HOST_TOOLS_ROOT}!") + vcpkg_add_to_path("${_csc_HOST_TOOLS_ROOT}/bin") + vcpkg_add_to_path("${_csc_HOST_TOOLS_ROOT}") + set(EXT_BIN_DIR -external-hostbindir ${_csc_HOST_TOOLS_ROOT}/bin) # we only use release binaries for building + find_program(QMAKE_COMMAND NAMES qmake PATHS ${_csc_HOST_TOOLS_ROOT}/bin NO_DEFAULT_PATH) + set(INVOKE "${QMAKE_COMMAND}" ) + else() + if(CMAKE_HOST_WIN32) + set(CONFIGURE_BAT "configure.bat") + else() + set(CONFIGURE_BAT "configure") + endif() + set(INVOKE "${_csc_SOURCE_PATH}/${CONFIGURE_BAT}") + endif() + + #Cleanup previous build folders + file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg") + + #Find and ad Perl to PATH + vcpkg_find_acquire_program(PERL) + get_filename_component(PERL_EXE_PATH ${PERL} DIRECTORY) + vcpkg_add_to_path("${PERL_EXE_PATH}") + + if("${VCPKG_LIBRARY_LINKAGE}" STREQUAL "static") + list(APPEND _csc_OPTIONS -static) + else() + #list(APPEND _csc_OPTIONS_DEBUG -separate-debug-info) + endif() + + if(VCPKG_TARGET_IS_WINDOWS AND "${VCPKG_CRT_LINKAGE}" STREQUAL "static") + list(APPEND _csc_OPTIONS -static-runtime) + endif() + + list(APPEND _csc_OPTIONS_RELEASE -release) + list(APPEND _csc_OPTIONS_DEBUG -debug) + + #Replace with VCPKG variables if PR #7733 is merged + unset(BUILDTYPES) + if(NOT DEFINED VCPKG_BUILD_TYPE OR "${VCPKG_BUILD_TYPE}" STREQUAL "debug") + set(_buildname "DEBUG") + list(APPEND BUILDTYPES ${_buildname}) + set(_short_name_${_buildname} "dbg") + set(_path_suffix_${_buildname} "/debug") + set(_build_type_${_buildname} "debug") + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR "${VCPKG_BUILD_TYPE}" STREQUAL "release") + set(_buildname "RELEASE") + list(APPEND BUILDTYPES ${_buildname}) + set(_short_name_${_buildname} "rel") + set(_path_suffix_${_buildname} "") + set(_build_type_${_buildname} "release") + endif() + unset(_buildname) + + foreach(_buildname ${BUILDTYPES}) + set(_build_triplet ${TARGET_TRIPLET}-${_short_name_${_buildname}}) + message(STATUS "Configuring ${_build_triplet}") + set(_build_dir "${CURRENT_BUILDTREES_DIR}/${_build_triplet}") + file(MAKE_DIRECTORY ${_build_dir}) + # These paths get hardcoded into qmake. So point them into the CURRENT_INSTALLED_DIR instead of CURRENT_PACKAGES_DIR + # makefiles will be fixed to install into CURRENT_PACKAGES_DIR in install_qt + set(BUILD_OPTIONS ${_csc_OPTIONS} ${_csc_OPTIONS_${_buildname}} + -prefix ${CURRENT_INSTALLED_DIR} + -extprefix ${CURRENT_INSTALLED_DIR} + ${EXT_BIN_DIR} + -hostprefix ${CURRENT_INSTALLED_DIR}/tools/qt5${_path_suffix_${_buildname}} + #-hostprefix ${CURRENT_INSTALLED_DIR}/tools/qt5 + -hostlibdir ${CURRENT_INSTALLED_DIR}/tools/qt5${_path_suffix_${_buildname}}/lib # could probably be move to manual-link + -hostbindir ${CURRENT_INSTALLED_DIR}/tools/qt5${_path_suffix_${_buildname}}/bin + #-hostbindir ${CURRENT_INSTALLED_DIR}/tools/qt5/bin + # Qt VS Plugin requires a /bin subfolder with the executables in the root dir. But to use the wizard a correctly setup lib folder is also required + # So with the vcpkg layout there is no way to make it work unless all dll are are copied to tools/qt5/bin and all libs to tools/qt5/lib + -archdatadir ${CURRENT_INSTALLED_DIR}/tools/qt5${_path_suffix_${_buildname}} + -datadir ${CURRENT_INSTALLED_DIR}${_path_suffix}/share/qt5${_path_suffix_${_buildname}} + -plugindir ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/plugins + -qmldir ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/qml + -headerdir ${CURRENT_INSTALLED_DIR}/include + -libexecdir ${CURRENT_INSTALLED_DIR}/tools/qt5${_path_suffix_${_buildname}} + -bindir ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/bin + -libdir ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/lib + -I ${CURRENT_INSTALLED_DIR}/include + -L ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/lib + -L ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/lib/manual-link + -xplatform ${_csc_TARGET_PLATFORM} + ) + + if(DEFINED _csc_HOST_TOOLS_ROOT) #use qmake + if(WIN32) + set(INVOKE_OPTIONS "QMAKE_CXX.QMAKE_MSC_VER=1911" "QMAKE_MSC_VER=1911") + endif() + vcpkg_execute_required_process( + COMMAND ${INVOKE} "${_csc_SOURCE_PATH}" "${INVOKE_OPTIONS}" -- ${BUILD_OPTIONS} + WORKING_DIRECTORY ${_build_dir} + LOGNAME config-${_build_triplet} + ) + else()# call configure (builds qmake for triplet and calls it like above) + vcpkg_execute_required_process( + COMMAND "${INVOKE}" ${BUILD_OPTIONS} + WORKING_DIRECTORY ${_build_dir} + LOGNAME config-${_build_triplet} + ) + endif() + + # Note archdatadir and datadir are required to be prefixed with the hostprefix? + message(STATUS "Configuring ${_build_triplet} done") + + # Copy configuration dependent qt.conf + file(TO_CMAKE_PATH "${CURRENT_PACKAGES_DIR}" CMAKE_CURRENT_PACKAGES_DIR_PATH) + file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}" CMAKE_CURRENT_INSTALLED_DIR_PATH) + file(READ "${CURRENT_BUILDTREES_DIR}/${_build_triplet}/bin/qt.conf" _contents) + string(REPLACE "${CMAKE_CURRENT_PACKAGES_DIR_PATH}" "\${CURRENT_INSTALLED_DIR}" _contents ${_contents}) + string(REPLACE "${CMAKE_CURRENT_INSTALLED_DIR_PATH}" "\${CURRENT_INSTALLED_DIR}" _contents ${_contents}) + #string(REPLACE "HostPrefix=\${CURRENT_PACKAGES_DIR}" "HostPrefix=\${CURRENT_INSTALLED_DIR}" _contents ${_contents}) + string(REPLACE "[EffectivePaths]\nPrefix=..\n" "" _contents ${_contents}) + string(REPLACE "[EffectiveSourcePaths]\nPrefix=${_csc_SOURCE_PATH}\n" "" _contents ${_contents}) + string(REPLACE "Sysroot=\n" "" _contents ${_contents}) + string(REPLACE "SysrootifyPrefix=false\n" "" _contents ${_contents}) + file(WRITE "${CURRENT_PACKAGES_DIR}/tools/qt5/qt_${_build_type_${_buildname}}.conf" "${_contents}") + endforeach() + +endfunction() diff --git a/vcpkg/ports/qt5-base/cmake/find_qt_mkspec.cmake b/vcpkg/ports/qt5-base/cmake/find_qt_mkspec.cmake new file mode 100644 index 0000000..c9c06c8 --- /dev/null +++ b/vcpkg/ports/qt5-base/cmake/find_qt_mkspec.cmake @@ -0,0 +1,101 @@ +function(find_qt_mkspec TARGET_PLATFORM_MKSPEC_OUT HOST_PLATFORM_MKSPEC_OUT EXT_HOST_TOOLS_OUT) + ## Figure out QTs target mkspec + if(NOT DEFINED VCPKG_QT_TARGET_MKSPEC) + message(STATUS "Figuring out qt target mkspec. Target arch ${VCPKG_TARGET_ARCHITECTURE}") + if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_TARGET_IS_UWP) + if(VCPKG_PLATFORM_TOOLSET STREQUAL "v140") + set(msvc_year "2015") + elseif(VCPKG_PLATFORM_TOOLSET STREQUAL "v141") + set(msvc_year "2017") + elseif(VCPKG_PLATFORM_TOOLSET STREQUAL "v142") + set(msvc_year "2019") + else() + message(FATAL_ERROR "No target mkspec found!") + endif() + set(_tmp_targ_out "winrt-${VCPKG_TARGET_ARCHITECTURE}-msvc${msvc_year}") + else() + if("${VCPKG_TARGET_ARCHITECTURE}" MATCHES "arm64") + message(STATUS "Figuring out arm64") + set(_tmp_targ_out "win32-arm64-msvc2017") #mkspec does not have anything defined related to msvc2017 so this should work + else() + set(_tmp_targ_out "win32-msvc") + endif() + endif() + elseif(VCPKG_TARGET_IS_LINUX) + set(_tmp_targ_out "linux-g++" ) + elseif(VCPKG_TARGET_IS_OSX) + set(_tmp_targ_out "macx-clang") # switch to macx-g++ since vcpkg requires g++ to compile any way? + endif() + else() + set(_tmp_targ_out ${VCPKG_QT_TARGET_MKSPEC}) + endif() + message(STATUS "Target mkspec set to: ${_tmp_targ_out}") + set(${TARGET_PLATFORM_MKSPEC_OUT} ${_tmp_targ_out} PARENT_SCOPE) + + ## Figure out QTs host mkspec + if(NOT DEFINED VCPKG_QT_HOST_MKSPEC) + #if(WIN32) + # set(_tmp_host_out "win32-msvc") + #elseif("${CMAKE_HOST_SYSTEM}" STREQUAL "Linux") + # set(_tmp_host_out "linux-g++") + #elseif("${CMAKE_HOST_SYSTEM}" STREQUAL "Darwin") + # set(_tmp_host_out "macx-clang") + #endif() + if(DEFINED _tmp_host_out) + message(STATUS "Host mkspec set to: ${_tmp_host_out}") + else() + message(STATUS "Host mkspec not set. Qt's own buildsystem will try to figure out the host system") + endif() + else() + set(_tmp_host_out ${VCPKG_QT_HOST_MKSPEC}) + endif() + + if(DEFINED _tmp_host_out) + set(${HOST_PLATFORM_MKSPEC_OUT} ${_tmp_host_out} PARENT_SCOPE) + endif() + + ## Figure out VCPKG qt-tools directory for the port. + if(NOT DEFINED VCPKG_QT_HOST_TOOLS_ROOT AND DEFINED VCPKG_QT_HOST_PLATFORM) ## Root dir of the required host tools + if(NOT "${_tmp_host_out}" MATCHES "${_tmp_host_out}") + if(CMAKE_HOST_WIN32) + + if($ENV{PROCESSOR_ARCHITECTURE} MATCHES "[aA][rR][mM]64") + list(APPEND _test_triplets arm64-windows) + elseif($ENV{PROCESSOR_ARCHITECTURE} MATCHES "[aA][mM][dD]64") + list(APPEND _test_triplets x64-windows x64-windows-static) + list(APPEND _test_triplets x86-windows x86-windows-static) + elseif($ENV{PROCESSOR_ARCHITECTURE} MATCHES "x86") + list(APPEND _test_triplets x86-windows x86-windows-static) + else() + message(FATAL_ERROR "Unknown host processor! Host Processor $ENV{PROCESSOR_ARCHITECTURE}") + endif() + elseif(CMAKE_HOST_SYSTEM STREQUAL "Linux") + list(APPEND _test_triplets "x64-linux") + elseif(CMAKE_HOST_SYSTEM STREQUAL "Darwin") + list(APPEND _test_triplets "x64-osx") + else() + endif() + foreach(_triplet ${_test_triplets}) + find_program(QMAKE_PATH qmake PATHS ${VCPKG_INSTALLED_DIR}/${_triplet}/tools/qt5/bin NO_DEFAULT_PATHS) + message(STATUS "Checking: ${VCPKG_INSTALLED_DIR}/${_triplet}/tools/qt5/bin. ${QMAKE_PATH}") + if(QMAKE_PATH) + set(_tmp_host_root "${VCPKG_INSTALLED_DIR}/${_triplet}/tools/qt5") + set(_tmp_host_qmake ${QMAKE_PATH} PARENT_SCOPE) + message(STATUS "Qt host tools root dir within vcpkg: ${_tmp_host_root}") + break() + endif() + endforeach() + if(NOT DEFINED _tmp_host_root) + message(FATAL_ERROR "Unable to locate required host tools. Please define VCPKG_QT_HOST_TOOLS_ROOT to the required root dir of the host tools") + endif() + endif() + else() + set(_tmp_host_root ${VCPKG_QT_HOST_TOOLS_ROOT}) + endif() + + if(DEFINED _tmp_host_root) + set(${EXT_HOST_TOOLS_OUT} ${_tmp_host_root} PARENT_SCOPE) + endif() + +endfunction() diff --git a/vcpkg/ports/qt5-base/cmake/install_qt.cmake b/vcpkg/ports/qt5-base/cmake/install_qt.cmake new file mode 100644 index 0000000..97f2e71 --- /dev/null +++ b/vcpkg/ports/qt5-base/cmake/install_qt.cmake @@ -0,0 +1,94 @@ +include(qt_fix_makefile_install) + +function(install_qt) + if(CMAKE_HOST_WIN32) + vcpkg_find_acquire_program(JOM) + set(INVOKE "${JOM}" /J ${VCPKG_CONCURRENCY}) + set(INVOKE_SINGLE "${JOM}" /J 1) + else() + find_program(MAKE make) + set(INVOKE "${MAKE}" -j${VCPKG_CONCURRENCY}) + set(INVOKE_SINGLE "${MAKE}" -j1) + endif() + vcpkg_find_acquire_program(PYTHON3) + get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) + vcpkg_add_to_path(PREPEND "${PYTHON3_EXE_PATH}") + + if (CMAKE_HOST_WIN32) + # flex and bison for ANGLE library + vcpkg_find_acquire_program(FLEX) + get_filename_component(FLEX_EXE_PATH ${FLEX} DIRECTORY) + get_filename_component(FLEX_DIR ${FLEX_EXE_PATH} NAME) + + file(COPY ${FLEX_EXE_PATH} DESTINATION "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-tools" ) + set(FLEX_TEMP "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-tools/${FLEX_DIR}") + file(RENAME "${FLEX_TEMP}/win_bison.exe" "${FLEX_TEMP}/bison.exe") + file(RENAME "${FLEX_TEMP}/win_flex.exe" "${FLEX_TEMP}/flex.exe") + vcpkg_add_to_path("${FLEX_TEMP}") + endif() + + set(_path "$ENV{PATH}") + + #Replace with VCPKG variables if PR #7733 is merged + unset(BUILDTYPES) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + set(_buildname "DEBUG") + list(APPEND BUILDTYPES ${_buildname}) + set(_short_name_${_buildname} "dbg") + set(_path_suffix_${_buildname} "/debug") + set(_build_type_${_buildname} "debug") + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + set(_buildname "RELEASE") + list(APPEND BUILDTYPES ${_buildname}) + set(_short_name_${_buildname} "rel") + set(_path_suffix_${_buildname} "") + set(_build_type_${_buildname} "release") + endif() + unset(_buildname) + + foreach(_buildname ${BUILDTYPES}) + set(_build_triplet ${TARGET_TRIPLET}-${_short_name_${_buildname}}) + + vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/bin") + + if(VCPKG_TARGET_IS_OSX) + # For some reason there will be an error on MacOSX without this clean! + message(STATUS "Cleaning before build ${_build_triplet}") + vcpkg_execute_required_process( + COMMAND ${INVOKE_SINGLE} clean + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${_build_triplet} + LOGNAME cleaning-1-${_build_triplet} + ) + endif() + + message(STATUS "Building ${_build_triplet}") + vcpkg_execute_build_process( + COMMAND ${INVOKE} + NO_PARALLEL_COMMAND ${INVOKE_SINGLE} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${_build_triplet} + LOGNAME build-${_build_triplet} + ) + + if(VCPKG_TARGET_IS_OSX) + # For some reason there will be an error on MacOSX without this clean! + message(STATUS "Cleaning after build before install ${_build_triplet}") + vcpkg_execute_required_process( + COMMAND ${INVOKE_SINGLE} clean + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${_build_triplet} + LOGNAME cleaning-2-${_build_triplet} + ) + endif() + + message(STATUS "Fixing makefile installation path ${_build_triplet}") + qt_fix_makefile_install("${CURRENT_BUILDTREES_DIR}/${_build_triplet}") + message(STATUS "Installing ${_build_triplet}") + vcpkg_execute_required_process( + COMMAND ${INVOKE} install + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${_build_triplet} + LOGNAME package-${_build_triplet} + ) + message(STATUS "Package ${_build_triplet} done") + set(ENV{PATH} "${_path}") + endforeach() +endfunction() diff --git a/vcpkg/ports/qt5-base/cmake/qt_build_submodule.cmake b/vcpkg/ports/qt5-base/cmake/qt_build_submodule.cmake new file mode 100644 index 0000000..b30ef02 --- /dev/null +++ b/vcpkg/ports/qt5-base/cmake/qt_build_submodule.cmake @@ -0,0 +1,126 @@ + +function(qt_build_submodule SOURCE_PATH) + # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings + set(ENV{_CL_} "/utf-8") + + vcpkg_find_acquire_program(PYTHON2) + get_filename_component(PYTHON2_EXE_PATH ${PYTHON2} DIRECTORY) + vcpkg_add_to_path("${PYTHON2_EXE_PATH}") + + vcpkg_configure_qmake(SOURCE_PATH ${SOURCE_PATH} ${ARGV}) + + vcpkg_build_qmake(SKIP_MAKEFILES) + + #Fix the installation location within the makefiles + qt_fix_makefile_install("${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/") + qt_fix_makefile_install("${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/") + + #Install the module files + vcpkg_build_qmake(TARGETS install SKIP_MAKEFILES BUILD_LOGNAME install) + + qt_fix_cmake(${CURRENT_PACKAGES_DIR} ${PORT}) + + #Replace with VCPKG variables if PR #7733 is merged + unset(BUILDTYPES) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + set(_buildname "DEBUG") + list(APPEND BUILDTYPES ${_buildname}) + set(_short_name_${_buildname} "dbg") + set(_path_suffix_${_buildname} "/debug") + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + set(_buildname "RELEASE") + list(APPEND BUILDTYPES ${_buildname}) + set(_short_name_${_buildname} "rel") + set(_path_suffix_${_buildname} "") + endif() + unset(_buildname) + + foreach(_buildname ${BUILDTYPES}) + set(CURRENT_BUILD_PACKAGE_DIR "${CURRENT_PACKAGES_DIR}${_path_suffix_${_buildname}}") + #Fix PRL files + file(GLOB_RECURSE PRL_FILES "${CURRENT_BUILD_PACKAGE_DIR}/lib/*.prl" "${CURRENT_PACKAGES_DIR}/tools/qt5${_path_suffix_${_buildname}}/lib/*.prl" + "${CURRENT_PACKAGES_DIR}/tools/qt5${_path_suffix_${_buildname}}/mkspecs/*.pri") + qt_fix_prl("${CURRENT_BUILD_PACKAGE_DIR}" "${PRL_FILES}") + + # This makes it impossible to use the build tools in any meaningful way. qt5 assumes they are all in one folder! + # So does the Qt VS Plugin which even assumes all of the in a bin folder + #Move tools to the correct directory + #if(EXISTS ${CURRENT_BUILD_PACKAGE_DIR}/tools/qt5) + # file(RENAME ${CURRENT_BUILD_PACKAGE_DIR}/tools/qt5 ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + #endif() + + # Move executables in bin to tools + # This is ok since those are not build tools. + file(GLOB PACKAGE_EXE ${CURRENT_BUILD_PACKAGE_DIR}/bin/*.exe) + if(PACKAGE_EXE) + file(INSTALL ${PACKAGE_EXE} DESTINATION "${CURRENT_BUILD_PACKAGE_DIR}/tools/${PORT}") + file(REMOVE ${PACKAGE_EXE}) + foreach(_exe ${PACKAGE_EXE}) + string(REPLACE ".exe" ".pdb" _prb_file ${_exe}) + if(EXISTS ${_prb_file}) + file(INSTALL ${_prb_file} DESTINATION "${CURRENT_BUILD_PACKAGE_DIR}/tools/${PORT}") + file(REMOVE ${_prb_file}) + endif() + endforeach() + endif() + + #cleanup empty folders + file(GLOB PACKAGE_LIBS "${CURRENT_BUILD_PACKAGE_DIR}/lib/*") + if(NOT PACKAGE_LIBS) + file(REMOVE_RECURSE "${CURRENT_BUILD_PACKAGE_DIR}/lib") + endif() + + file(GLOB PACKAGE_BINS "${CURRENT_BUILD_PACKAGE_DIR}/bin/*") + if(NOT PACKAGE_BINS) + file(REMOVE_RECURSE "${CURRENT_BUILD_PACKAGE_DIR}/bin") + endif() + endforeach() + if(EXISTS "${CURRENT_PACKAGES_DIR}/tools/qt5/bin") + file(COPY "${CURRENT_PACKAGES_DIR}/tools/qt5/bin" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + + set(CURRENT_INSTALLED_DIR_BACKUP "${CURRENT_INSTALLED_DIR}") + set(CURRENT_INSTALLED_DIR "./../../.." ) # Making the qt.conf relative and not absolute + configure_file(${CURRENT_INSTALLED_DIR_BACKUP}/tools/qt5/qt_release.conf ${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/qt.conf) # This makes the tools at least useable for release + set(CURRENT_INSTALLED_DIR "${CURRENT_INSTALLED_DIR_BACKUP}") + + vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin") + if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(GLOB_RECURSE DLL_DEPS_AVAIL "${CURRENT_INSTALLED_DIR}/tools/qt5/bin/*.dll") + string(REPLACE "${CURRENT_INSTALLED_DIR}/tools/qt5/bin/" "" DLL_DEPS_AVAIL "${DLL_DEPS_AVAIL}") + file(GLOB_RECURSE DLL_DEPS_NEEDED "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/*.dll") + string(REPLACE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/" "" DLL_DEPS_NEEDED "${DLL_DEPS_NEEDED}") + if(DLL_DEPS_AVAIL AND DLL_DEPS_NEEDED) + list(REMOVE_ITEM DLL_DEPS_NEEDED ${DLL_DEPS_AVAIL}) + endif() + foreach(dll_dep ${DLL_DEPS_NEEDED}) + string(REGEX REPLACE "[^/]+$" "" dll_subpath "${dll_dep}") + file(COPY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/${dll_dep}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/qt5/bin/${dll_subpath}") + endforeach() + endif() + endif() + + #This should be removed if somehow possible + if(EXISTS "${CURRENT_PACKAGES_DIR}/tools/qt5/debug/bin") + set(CURRENT_INSTALLED_DIR_BACKUP "${CURRENT_INSTALLED_DIR}") + set(CURRENT_INSTALLED_DIR "./../../../.." ) # Making the qt.conf relative and not absolute + configure_file(${CURRENT_INSTALLED_DIR_BACKUP}/tools/qt5/qt_debug.conf ${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/qt.conf) # This makes the tools at least useable for release + set(CURRENT_INSTALLED_DIR "${CURRENT_INSTALLED_DIR_BACKUP}") + + vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin") + if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(GLOB_RECURSE DLL_DEPS_AVAIL "${CURRENT_INSTALLED_DIR}/tools/qt5/debug/bin/*.dll") + string(REPLACE "${CURRENT_INSTALLED_DIR}/tools/qt5/debug/bin/" "" DLL_DEPS_AVAIL "${DLL_DEPS_AVAIL}") + file(GLOB_RECURSE DLL_DEPS_NEEDED "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/*.dll") + string(REPLACE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/" "" DLL_DEPS_NEEDED "${DLL_DEPS_NEEDED}") + if(DLL_DEPS_AVAIL AND DLL_DEPS_NEEDED) + list(REMOVE_ITEM DLL_DEPS_NEEDED ${DLL_DEPS_AVAIL}) + endif() + foreach(dll_dep ${DLL_DEPS_NEEDED}) + string(REGEX REPLACE "[^/]+$" "" dll_subpath "${dll_dep}") + file(COPY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/${dll_dep}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/qt5/debug/bin/${dll_subpath}") + endforeach() + endif() + endif() + +endfunction() \ No newline at end of file diff --git a/vcpkg/ports/qt5-base/cmake/qt_download_submodule.cmake b/vcpkg/ports/qt5-base/cmake/qt_download_submodule.cmake new file mode 100644 index 0000000..8e03b00 --- /dev/null +++ b/vcpkg/ports/qt5-base/cmake/qt_download_submodule.cmake @@ -0,0 +1,41 @@ +function(qt_get_submodule_name OUT_NAME) + string(REPLACE "5-" "" _tmp_name ${PORT}) + set(${OUT_NAME} ${_tmp_name} PARENT_SCOPE) +endfunction() + +function(qt_download_submodule) + cmake_parse_arguments(_csc "" "OUT_SOURCE_PATH" "PATCHES" ${ARGN}) + + if(NOT DEFINED _csc_OUT_SOURCE_PATH) + message(FATAL_ERROR "qt_download_module requires parameter OUT_SOURCE_PATH to be set! Please correct the portfile!") + endif() + + vcpkg_buildpath_length_warning(37) + qt_get_submodule_name(NAME) + + set(FULL_VERSION "${QT_MAJOR_MINOR_VER}.${QT_PATCH_VER}") + set(ARCHIVE_NAME "${NAME}-everywhere-src-${FULL_VERSION}.tar.xz") + set(URLS "http://download.qt.io/official_releases/qt/${QT_MAJOR_MINOR_VER}/${FULL_VERSION}/submodules/${ARCHIVE_NAME}" + "http://mirrors.ocf.berkeley.edu/qt/official_releases/qt/${QT_MAJOR_MINOR_VER}/${FULL_VERSION}/submodules/${ARCHIVE_NAME}" + ) + vcpkg_download_distfile(ARCHIVE_FILE + URLS ${URLS} + FILENAME ${ARCHIVE_NAME} + SHA512 ${QT_HASH_${PORT}} + ) + + if(QT_UPDATE_VERSION) + file(SHA512 "${ARCHIVE_FILE}" ARCHIVE_HASH) + message(STATUS "${PORT} new hash is ${ARCHIVE_HASH}") + file(APPEND "${VCPKG_ROOT_DIR}/ports/qt5-base/cmake/qt_new_hashes.cmake" "set(QT_HASH_${PORT} ${ARCHIVE_HASH})\n") + else() + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE_FILE}" + REF ${FULL_VERSION} + PATCHES ${_csc_PATCHES} + ) + endif() + + set(${_csc_OUT_SOURCE_PATH} ${SOURCE_PATH} PARENT_SCOPE) +endfunction() \ No newline at end of file diff --git a/vcpkg/ports/qt5-base/cmake/qt_fix_cmake.cmake b/vcpkg/ports/qt5-base/cmake/qt_fix_cmake.cmake new file mode 100644 index 0000000..1b65227 --- /dev/null +++ b/vcpkg/ports/qt5-base/cmake/qt_fix_cmake.cmake @@ -0,0 +1,21 @@ +function(qt_fix_cmake PACKAGE_DIR_TO_FIX PORT_TO_FIX) + + file(GLOB_RECURSE cmakefiles ${PACKAGE_DIR_TO_FIX}/share/cmake/*.cmake ${PACKAGE_DIR_TO_FIX}/lib/cmake/*.cmake) + foreach(cmakefile ${cmakefiles}) + file(READ "${cmakefile}" _contents) + if(_contents MATCHES "_install_prefix}/tools/qt5/bin/([a-z0-9]+)") # there are only about 3 to 5 cmake files which require the fix in ports: qt5-tools qt5-xmlpattern at5-activeqt qt5-quick + string(REGEX REPLACE "_install_prefix}/tools/qt5/bin/([a-z0-9]+)" "_install_prefix}/tools/${PORT_TO_FIX}/bin/\\1" _contents "${_contents}") + file(WRITE "${cmakefile}" "${_contents}") + endif() + endforeach() + + #Install cmake files + if(EXISTS ${PACKAGE_DIR_TO_FIX}/lib/cmake) + file(MAKE_DIRECTORY ${PACKAGE_DIR_TO_FIX}/share) + file(RENAME ${PACKAGE_DIR_TO_FIX}/lib/cmake ${PACKAGE_DIR_TO_FIX}/share/cmake) + endif() + #Remove extra cmake files + if(EXISTS ${PACKAGE_DIR_TO_FIX}/debug/lib/cmake) + file(REMOVE_RECURSE ${PACKAGE_DIR_TO_FIX}/debug/lib/cmake) + endif() +endfunction() \ No newline at end of file diff --git a/vcpkg/ports/qt5-base/cmake/qt_fix_makefile_install.cmake b/vcpkg/ports/qt5-base/cmake/qt_fix_makefile_install.cmake new file mode 100644 index 0000000..95831d2 --- /dev/null +++ b/vcpkg/ports/qt5-base/cmake/qt_fix_makefile_install.cmake @@ -0,0 +1,26 @@ +#Could probably be a vcpkg_fix_makefile_install for other ports? +function(qt_fix_makefile_install BUILD_DIR) + #Fix the installation location + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR) + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR) + + if(WIN32) + string(SUBSTRING "${NATIVE_INSTALLED_DIR}" 2 -1 INSTALLED_DIR_WITHOUT_DRIVE) + string(SUBSTRING "${NATIVE_PACKAGES_DIR}" 2 -1 PACKAGES_DIR_WITHOUT_DRIVE) + else() + set(INSTALLED_DIR_WITHOUT_DRIVE ${NATIVE_INSTALLED_DIR}) + set(PACKAGES_DIR_WITHOUT_DRIVE ${NATIVE_PACKAGES_DIR}) + endif() + + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR) + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR) + + file(GLOB_RECURSE MAKEFILES "${BUILD_DIR}/*Makefile*") + + foreach(MAKEFILE ${MAKEFILES}) + file(READ "${MAKEFILE}" _contents) + #Set the correct install directory to packages + string(REPLACE "(INSTALL_ROOT)${INSTALLED_DIR_WITHOUT_DRIVE}" "(INSTALL_ROOT)${PACKAGES_DIR_WITHOUT_DRIVE}" _contents "${_contents}") + file(WRITE "${MAKEFILE}" "${_contents}") + endforeach() +endfunction() \ No newline at end of file diff --git a/vcpkg/ports/qt5-base/cmake/qt_fix_prl.cmake b/vcpkg/ports/qt5-base/cmake/qt_fix_prl.cmake new file mode 100644 index 0000000..7035534 --- /dev/null +++ b/vcpkg/ports/qt5-base/cmake/qt_fix_prl.cmake @@ -0,0 +1,13 @@ +function(qt_fix_prl PACKAGE_DIR PRL_FILES) + file(TO_CMAKE_PATH "${PACKAGE_DIR}/lib" CMAKE_LIB_PATH) + file(TO_CMAKE_PATH "${PACKAGE_DIR}/include" CMAKE_INCLUDE_PATH) + file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}" CMAKE_INSTALLED_PREFIX) + foreach(PRL_FILE IN LISTS PRL_FILES) + file(READ "${PRL_FILE}" _contents) + string(REPLACE "${CMAKE_LIB_PATH}" "\$\$[QT_INSTALL_LIBS]" _contents "${_contents}") + string(REPLACE "${CMAKE_INCLUDE_PATH}" "\$\$[QT_INSTALL_HEADERS]" _contents "${_contents}") + string(REPLACE "${CMAKE_INSTALLED_PREFIX}" "\$\$[QT_INSTALL_PREFIX]" _contents "${_contents}") + #Note: This only works without an extra if case since QT_INSTALL_PREFIX is the same for debug and release + file(WRITE "${PRL_FILE}" "${_contents}") + endforeach() +endfunction() \ No newline at end of file diff --git a/vcpkg/ports/qt5-base/cmake/qt_install_copyright.cmake b/vcpkg/ports/qt5-base/cmake/qt_install_copyright.cmake new file mode 100644 index 0000000..ba4d70c --- /dev/null +++ b/vcpkg/ports/qt5-base/cmake/qt_install_copyright.cmake @@ -0,0 +1,18 @@ +#Could probably be the beginning of a vcpkg_install_copyright? +function(qt_install_copyright SOURCE_PATH) + #Find the relevant license file and install it + if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT") + elseif(EXISTS "${SOURCE_PATH}/LICENSE.FDL") + set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.FDL") + endif() + file(INSTALL ${LICENSE_PATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +endfunction() \ No newline at end of file diff --git a/vcpkg/ports/qt5-base/cmake/qt_port_functions.cmake b/vcpkg/ports/qt5-base/cmake/qt_port_functions.cmake new file mode 100644 index 0000000..921f194 --- /dev/null +++ b/vcpkg/ports/qt5-base/cmake/qt_port_functions.cmake @@ -0,0 +1,19 @@ +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") + +#Basic setup +include(qt_port_hashes) +if(QT_BUILD_LATEST) # only set in qt5-base + include(qt_port_hashes_latest) +elseif(NOT PORT STREQUAL "qt5-base") + include(qt_port_hashes_latest OPTIONAL) # will only be available for the other qt ports if qt5-base was build with latest +endif() +#Fixup scripts +include(qt_fix_makefile_install) +include(qt_fix_cmake) +include(qt_fix_prl) +#Helper functions +include(qt_download_submodule) +include(qt_build_submodule) +include(qt_install_copyright) + +include(qt_submodule_installation) diff --git a/vcpkg/ports/qt5-base/cmake/qt_port_hashes.cmake b/vcpkg/ports/qt5-base/cmake/qt_port_hashes.cmake new file mode 100644 index 0000000..576ec28 --- /dev/null +++ b/vcpkg/ports/qt5-base/cmake/qt_port_hashes.cmake @@ -0,0 +1,67 @@ +#Every update requires an update of these hashes and the version within the control file of each of the 32 ports. +#So it is probably better to have a central location for these hashes and let the ports update via a script +set(QT_MAJOR_MINOR_VER 5.15) +set(QT_PATCH_VER 0) +set(QT_UPDATE_VERSION 0) # Switch to update qt and not build qt. Creates a file cmake/qt_new_hashes.cmake in qt5-base with the new hashes. + +set(QT_PORT_LIST base 3d activeqt charts connectivity datavis3d declarative gamepad graphicaleffects imageformats location macextras mqtt multimedia networkauth + purchasing quickcontrols quickcontrols2 remoteobjects script scxml sensors serialport speech svg tools virtualkeyboard webchannel websockets + webview winextras xmlpatterns doc x11extras androidextras translations serialbus webengine webglplugin wayland) + +set(QT_HASH_qt5-base c584d69e49f4959d9b8541f820f5ff1e6d1599697ad16976b47cbaaa902fc83e1ca4ae57d56d13574e42e5f602d4420245ad7fcfc13e224e10d4bbad6a537d1a) +set(QT_HASH_qt5-3d 0cc327438ec174bfc6b7b560b5957653d38cdcb1c94717e296c3f52f41750f1b95ad620e3c3777fdc9c63f885f8325b8c1d1befcc338a25fc65d3f62b2019185) +set(QT_HASH_qt5-activeqt de3c869fecb5692209d6c162ae925eafe34e1118f3074529388c99a825a7007c01f1a6e603f8e8f46b3e2ecd510e35ce4d0d74c4b57563ecc95bfcf0be9dc05c) +set(QT_HASH_qt5-charts 8046f280f460da4bd010c96503e07811fd672981940477855511c21e11734872cbfdac2ffb5da0a26dbeeaf931bda2605c57dccaa45ab3ebf61272b9e29fd183) +set(QT_HASH_qt5-connectivity 57f125d232d1b495e82dd0f52243b878c7f0d3ffd1c8f4a7ff92810167867e2a5e480f4e7a3d2f26bbebcf8693eacbced87504b54f79cc8d1c8caf5a8f2da8f2) +set(QT_HASH_qt5-datavis3d 074abcd90cea37c24728d6065ee04048efb3b056dcea4e3fe9af1d270abf6bccda984b7fd91abbbefc9f059af34f53b2b8b42c096ac35e4921214f5eb9c09a83) +set(QT_HASH_qt5-declarative 0ec3403286efea6d6ac975ea6bd4464ea656c031f5f27b852235fd69d316a627ac3ff2ea2c3cca0a5375ca278f592df3ecade4e98aa15ec92816a16927f56e5e) +set(QT_HASH_qt5-gamepad 8f81564804c96273a60738fc3bb115d5b6409dd7627420bbe329d0fb6b3e3616123fa28b7fdbdde7f928275a024d499a2b2b86aace3a55c66b7ab80f64a7b465) +set(QT_HASH_qt5-graphicaleffects 62b18a9032bc30468ad4dc95648b1234a71240467fe8ff34a76bc36ed4613eea279dfc6fe0bf8e7734143e8b6ec6442f5e2f92338c2233f4e396bd333e67bc0c) +set(QT_HASH_qt5-imageformats 3ac441915f2354ebe3eb2f6785a806ebe8bc2562a3a7d7bd0dc3380fd8842ce8a8dcdb7a767750b4da3d2d6b7881a7b54bb6c37f89c46e1468f27fc77396c304) +set(QT_HASH_qt5-location 36efb5a9a0eaaa6f2997c4d7a18307c69a80ae4caf901ab1d0efcc6cd6202dda6a10c8dac01baee44e84c14b8ab23204db1085445e1f3b42e9a0a21549eb624e) +set(QT_HASH_qt5-macextras f2551f6e61b100c9acfc624aca0b7fc329589c090f60cc271decff388dbca97f10fd68e7ad061a709754eb2eecc438fba4a2bff54db1f7b1524836fac7e612aa) +set(QT_HASH_qt5-mqtt 9946e5a481d4fcc9ce8438c86f06d0ee4c1d6393163e0762217ca820fc61909784b617b794ee35c8f3e0ee7049ac367d1c17eed62717b64912b3642bb4ddf03c) +set(QT_HASH_qt5-multimedia 120ff3be99c685fb5944da657d571d83c985e139a34b23f7527daf2a0fdde949a452d4c3691b41a86ed3f141decf1833f496b3b61fd87bc602b8164563cb79d6) +set(QT_HASH_qt5-networkauth d5d7e4522a4058775389fdbb048f71675f5c37add8bd634766fc1408ebed0f1ad2c230ceb2cdeb547bce73ee9386cf40585dfb9ca4182340f82a284f7b9b5ae3) +set(QT_HASH_qt5-purchasing 9d4ed2d7810fdb052da86a2830bab912aec7fed5f7a5878a7133a976a788f8ab59d226a63a79a0c2fd162c3d86bf67c254d184f7422b75d4b0271175c355c61a) +set(QT_HASH_qt5-quickcontrols bdfe850e13275ae074c257b75697141a9b8af5a334e114d3ac28f68a820e4b9f40ad936db96dd119dcc77ca12d6aff84cee16613b0695f594c862dcfbf942a48) +set(QT_HASH_qt5-quickcontrols2 560014b882ef9d274cb1532025cae79987eec3569541e111e91f047261fcd7f26fcb40689d8dd6921ae26fbf9cdee60a87d3a1c7212e547529ff4adf9c5cf136) +set(QT_HASH_qt5-remoteobjects 4e8cbb0cbc86de625e8d6b7deb80799bb2a040749ff065d8c826d5695660d5538287d80c4f5845555bc1d1f36b481a9a03ac2d837d98e3bfd8e887fe54d4e691) +set(QT_HASH_qt5-script 0f6b72b5b0a892ced4653e9184256040b12a804f796c922aad318fc03734e3bf8fbe175b0eb886e71899287082c09fc06a290dcd5ddb1967c65b0f72d4adea94) +set(QT_HASH_qt5-scxml 196ab4a8609695bc442a915e229183f3ece97ed03c93cdc7f93bf6c7b68ea89a8a6ad04e3e4909c9aa0780d8ebd366338ea6e8790ac4fae08806694e27c115fa) +set(QT_HASH_qt5-sensors b03e2b68d14bfa557fdbf742d26c70a960b92cf5a5884d499825743553da42c5044cced338b86682081f57fea41686fc00c0565f3f4561d945e099de5b8ebc9e) +set(QT_HASH_qt5-serialport 121837c0848c69414268332ac41538b9df1c1503ab81bcf281903b73e02f5adf34b615ebc1fca4f4e6bf0b7c8c1b3f2d4dcde20152e2eb913c965eb910e378e2) +set(QT_HASH_qt5-speech 9a63c5957663db0c4b9587751b90d9d84881bb60f911435cb92998898944f6ed4e7aa7c12e8196a6b0c7bdac1d2abba62145b99cd834fbab1d57e88e60ddb59c) +set(QT_HASH_qt5-svg 24e5b3000ee6657e6c579026d979322aafaa42b3081e07bae17cf6f276a45a9d830db6b23fb7d30d6ff4f32f63c88e258dc55e193c45de8e4069aad14cfda71b) +set(QT_HASH_qt5-tools ebcebbc828e6a34766f2f5eeb4775d29af7b60b6124549df5256902ed2bd683721084b45a869ba76d29b1b170fe3834291af0833ab17ee8d05407c509f03d3eb) +set(QT_HASH_qt5-virtualkeyboard fd850aa11e0dbd37f73e63517af1e311be480fc44ac05e74c25794a69fd26d06fd620a9ee3ffa3663ebeeedc0d2abe9520aa53c09b80363e8966ee7f24430869) +set(QT_HASH_qt5-webchannel ef4040b63ad3cca80be38b8e3336ea0e70d1a57289ff2441c182f848b837d7ef87c78472f42f14cbc7a77f7ef5d5c50c0f5533071aaa13734832fdf6019c0253) +set(QT_HASH_qt5-websockets 87d7cbce52562f6a5372106e46e15319d9647bab9ec5dbde132c017b9febbbc568ff2c182d3375165d87c1d4a88ae26d2e849baef53bce6e842d8d0d83f7ceb5) +set(QT_HASH_qt5-webview 58356c59945fb075e17587b634156b66c5569cdbcf02ba91eb9fcc1146f1a4341e0d4d6afa0a70a6050070d35f156aa92a7aec0102aff0b862b5050533c55a5e) +set(QT_HASH_qt5-winextras ece6ad8cb8f43a8e43ed0f47323eb293d5c6329f32ccdd310ee3d3811006f81e63f8711e9c1a4630198087055fd6fb38012b4bcf0b008ac3d8da7eea6a461067) +set(QT_HASH_qt5-xmlpatterns 180ccbab82b436702533ea7aaf445b399250555ed37eb3469889de64d13f218c0717489f270e29369119207441f85c05249923fe73daac5fcc2fdc7e970494c0) +##TODO +set(QT_HASH_qt5-doc 8842c7e2a5e8042b8c22f305a46d8191d7cfcccd4ead175431ed83b2fde707466ea1798f7819b56ab991af942cb94551d20eb2c13edbe9beaafb9e6bb86fba3e) +set(QT_HASH_qt5-x11extras 12fc870f94e546d6e343f2ece44d09a6fc725b3ce092e1494bd2ef334ec92b559db2a8fcf6da88fe0f73040ee41fa5bf5f84ff197e5d1a004dabca3274508a96) +set(QT_HASH_qt5-androidextras d1b4a88053bd6b771f392e843611bf8397d782cc263ee924440e0ed6f63cdc936a2c127d3eb5a1834c11ef0c6efc2c8468fb65a28ec7f7645286bdea1dad590c) +#set(QT_HASH_qt5-canvas3d 0) deprectaed +set(QT_HASH_qt5-translations 45302457e16e5dba674164dda7945110583f072d209d3984726324497efb367573475facc3534fd7cdfc61bc14295ebe4bf6588a37d45e87b676191d852f1c8a) +set(QT_HASH_qt5-serialbus 8a606fd407cb7a4a6a1f15f10daec952aa010684d6cfca7fa024f850b3db419b7cd67eecb58ba0c0dd283e10fd904a255ab42b279c38081e84fe06b7b22c4c49) +set(QT_HASH_qt5-webengine 11983470f0da9abfffba072406b2c67b475d8cf65412fdcfd925758e2a9449f509780e5b1001fb6868445c2c9540e5aa0e754954b70f1795b47335bad7c749b2) +set(QT_HASH_qt5-webglplugin cd8e63b8979601c3da37295148b7fe896863b97058d15fb9284a3eacca7fe62fae87dbd414285aee5df732ebadd67c96edd273ec9929ca005bf5282e4acb7cff) +set(QT_HASH_qt5-wayland e3d8fb79b7d3b10a94caccca1567c3a978b3517e13740aa6218d0a0b4cb180f6bdc3b533e113248908033f344ab5fcffd6fac751a1513c2d62834afe408ee714) + +if(QT_UPDATE_VERSION) + message(STATUS "Running Qt in automatic version port update mode!") + set(_VCPKG_INTERNAL_NO_HASH_CHECK 1) + if("${PORT}" MATCHES "qt5-base") + foreach(_current_qt_port ${QT_PORT_LIST}) + set(_current_control "${VCPKG_ROOT_DIR}/ports/qt5-${_current_qt_port}/CONTROL") + file(READ ${_current_control} _control_contents) + #message(STATUS "Before: \n${_control_contents}") + string(REGEX REPLACE "Version:[^0-9]+[0-9]\.[0-9]+\.[0-9]+[^\n]*\n" "Version: ${QT_MAJOR_MINOR_VER}.${QT_PATCH_VER}\n" _control_contents "${_control_contents}") + #message(STATUS "After: \n${_control_contents}") + file(WRITE ${_current_control} "${_control_contents}") + endforeach() + endif() +endif() \ No newline at end of file diff --git a/vcpkg/ports/qt5-base/cmake/qt_port_hashes_latest.cmake b/vcpkg/ports/qt5-base/cmake/qt_port_hashes_latest.cmake new file mode 100644 index 0000000..fd74151 --- /dev/null +++ b/vcpkg/ports/qt5-base/cmake/qt_port_hashes_latest.cmake @@ -0,0 +1,67 @@ +#Every update requires an update of these hashes and the version within the control file of each of the 32 ports. +#So it is probably better to have a central location for these hashes and let the ports update via a script +set(QT_MAJOR_MINOR_VER 5.15) +set(QT_PATCH_VER 0) +set(QT_UPDATE_VERSION 0) # Switch to update qt and not build qt. Creates a file cmake/qt_new_hashes.cmake in qt5-base with the new hashes. + +set(QT_PORT_LIST base 3d activeqt charts connectivity datavis3d declarative gamepad graphicaleffects imageformats location macextras mqtt multimedia networkauth + purchasing quickcontrols quickcontrols2 remoteobjects script scxml sensors serialport speech svg tools virtualkeyboard webchannel websockets + webview winextras xmlpatterns doc x11extras androidextras translations serialbus webengine webglplugin wayland) + +set(QT_HASH_qt5-base c584d69e49f4959d9b8541f820f5ff1e6d1599697ad16976b47cbaaa902fc83e1ca4ae57d56d13574e42e5f602d4420245ad7fcfc13e224e10d4bbad6a537d1a) +set(QT_HASH_qt5-3d 0cc327438ec174bfc6b7b560b5957653d38cdcb1c94717e296c3f52f41750f1b95ad620e3c3777fdc9c63f885f8325b8c1d1befcc338a25fc65d3f62b2019185) +set(QT_HASH_qt5-activeqt de3c869fecb5692209d6c162ae925eafe34e1118f3074529388c99a825a7007c01f1a6e603f8e8f46b3e2ecd510e35ce4d0d74c4b57563ecc95bfcf0be9dc05c) +set(QT_HASH_qt5-charts 8046f280f460da4bd010c96503e07811fd672981940477855511c21e11734872cbfdac2ffb5da0a26dbeeaf931bda2605c57dccaa45ab3ebf61272b9e29fd183) +set(QT_HASH_qt5-connectivity 57f125d232d1b495e82dd0f52243b878c7f0d3ffd1c8f4a7ff92810167867e2a5e480f4e7a3d2f26bbebcf8693eacbced87504b54f79cc8d1c8caf5a8f2da8f2) +set(QT_HASH_qt5-datavis3d 074abcd90cea37c24728d6065ee04048efb3b056dcea4e3fe9af1d270abf6bccda984b7fd91abbbefc9f059af34f53b2b8b42c096ac35e4921214f5eb9c09a83) +set(QT_HASH_qt5-declarative 0ec3403286efea6d6ac975ea6bd4464ea656c031f5f27b852235fd69d316a627ac3ff2ea2c3cca0a5375ca278f592df3ecade4e98aa15ec92816a16927f56e5e) +set(QT_HASH_qt5-gamepad 8f81564804c96273a60738fc3bb115d5b6409dd7627420bbe329d0fb6b3e3616123fa28b7fdbdde7f928275a024d499a2b2b86aace3a55c66b7ab80f64a7b465) +set(QT_HASH_qt5-graphicaleffects 62b18a9032bc30468ad4dc95648b1234a71240467fe8ff34a76bc36ed4613eea279dfc6fe0bf8e7734143e8b6ec6442f5e2f92338c2233f4e396bd333e67bc0c) +set(QT_HASH_qt5-imageformats 3ac441915f2354ebe3eb2f6785a806ebe8bc2562a3a7d7bd0dc3380fd8842ce8a8dcdb7a767750b4da3d2d6b7881a7b54bb6c37f89c46e1468f27fc77396c304) +set(QT_HASH_qt5-location 36efb5a9a0eaaa6f2997c4d7a18307c69a80ae4caf901ab1d0efcc6cd6202dda6a10c8dac01baee44e84c14b8ab23204db1085445e1f3b42e9a0a21549eb624e) +set(QT_HASH_qt5-macextras f2551f6e61b100c9acfc624aca0b7fc329589c090f60cc271decff388dbca97f10fd68e7ad061a709754eb2eecc438fba4a2bff54db1f7b1524836fac7e612aa) +set(QT_HASH_qt5-mqtt 9946e5a481d4fcc9ce8438c86f06d0ee4c1d6393163e0762217ca820fc61909784b617b794ee35c8f3e0ee7049ac367d1c17eed62717b64912b3642bb4ddf03c) +set(QT_HASH_qt5-multimedia 120ff3be99c685fb5944da657d571d83c985e139a34b23f7527daf2a0fdde949a452d4c3691b41a86ed3f141decf1833f496b3b61fd87bc602b8164563cb79d6) +set(QT_HASH_qt5-networkauth d5d7e4522a4058775389fdbb048f71675f5c37add8bd634766fc1408ebed0f1ad2c230ceb2cdeb547bce73ee9386cf40585dfb9ca4182340f82a284f7b9b5ae3) +set(QT_HASH_qt5-purchasing 9d4ed2d7810fdb052da86a2830bab912aec7fed5f7a5878a7133a976a788f8ab59d226a63a79a0c2fd162c3d86bf67c254d184f7422b75d4b0271175c355c61a) +set(QT_HASH_qt5-quickcontrols bdfe850e13275ae074c257b75697141a9b8af5a334e114d3ac28f68a820e4b9f40ad936db96dd119dcc77ca12d6aff84cee16613b0695f594c862dcfbf942a48) +set(QT_HASH_qt5-quickcontrols2 560014b882ef9d274cb1532025cae79987eec3569541e111e91f047261fcd7f26fcb40689d8dd6921ae26fbf9cdee60a87d3a1c7212e547529ff4adf9c5cf136) +set(QT_HASH_qt5-remoteobjects 4e8cbb0cbc86de625e8d6b7deb80799bb2a040749ff065d8c826d5695660d5538287d80c4f5845555bc1d1f36b481a9a03ac2d837d98e3bfd8e887fe54d4e691) +set(QT_HASH_qt5-script 0f6b72b5b0a892ced4653e9184256040b12a804f796c922aad318fc03734e3bf8fbe175b0eb886e71899287082c09fc06a290dcd5ddb1967c65b0f72d4adea94) +set(QT_HASH_qt5-scxml 196ab4a8609695bc442a915e229183f3ece97ed03c93cdc7f93bf6c7b68ea89a8a6ad04e3e4909c9aa0780d8ebd366338ea6e8790ac4fae08806694e27c115fa) +set(QT_HASH_qt5-sensors b03e2b68d14bfa557fdbf742d26c70a960b92cf5a5884d499825743553da42c5044cced338b86682081f57fea41686fc00c0565f3f4561d945e099de5b8ebc9e) +set(QT_HASH_qt5-serialport 121837c0848c69414268332ac41538b9df1c1503ab81bcf281903b73e02f5adf34b615ebc1fca4f4e6bf0b7c8c1b3f2d4dcde20152e2eb913c965eb910e378e2) +set(QT_HASH_qt5-speech 9a63c5957663db0c4b9587751b90d9d84881bb60f911435cb92998898944f6ed4e7aa7c12e8196a6b0c7bdac1d2abba62145b99cd834fbab1d57e88e60ddb59c) +set(QT_HASH_qt5-svg 24e5b3000ee6657e6c579026d979322aafaa42b3081e07bae17cf6f276a45a9d830db6b23fb7d30d6ff4f32f63c88e258dc55e193c45de8e4069aad14cfda71b) +set(QT_HASH_qt5-tools ebcebbc828e6a34766f2f5eeb4775d29af7b60b6124549df5256902ed2bd683721084b45a869ba76d29b1b170fe3834291af0833ab17ee8d05407c509f03d3eb) +set(QT_HASH_qt5-virtualkeyboard fd850aa11e0dbd37f73e63517af1e311be480fc44ac05e74c25794a69fd26d06fd620a9ee3ffa3663ebeeedc0d2abe9520aa53c09b80363e8966ee7f24430869) +set(QT_HASH_qt5-webchannel ef4040b63ad3cca80be38b8e3336ea0e70d1a57289ff2441c182f848b837d7ef87c78472f42f14cbc7a77f7ef5d5c50c0f5533071aaa13734832fdf6019c0253) +set(QT_HASH_qt5-websockets 87d7cbce52562f6a5372106e46e15319d9647bab9ec5dbde132c017b9febbbc568ff2c182d3375165d87c1d4a88ae26d2e849baef53bce6e842d8d0d83f7ceb5) +set(QT_HASH_qt5-webview 58356c59945fb075e17587b634156b66c5569cdbcf02ba91eb9fcc1146f1a4341e0d4d6afa0a70a6050070d35f156aa92a7aec0102aff0b862b5050533c55a5e) +set(QT_HASH_qt5-winextras ece6ad8cb8f43a8e43ed0f47323eb293d5c6329f32ccdd310ee3d3811006f81e63f8711e9c1a4630198087055fd6fb38012b4bcf0b008ac3d8da7eea6a461067) +set(QT_HASH_qt5-xmlpatterns 180ccbab82b436702533ea7aaf445b399250555ed37eb3469889de64d13f218c0717489f270e29369119207441f85c05249923fe73daac5fcc2fdc7e970494c0) +##TODO +set(QT_HASH_qt5-doc 8842c7e2a5e8042b8c22f305a46d8191d7cfcccd4ead175431ed83b2fde707466ea1798f7819b56ab991af942cb94551d20eb2c13edbe9beaafb9e6bb86fba3e) +set(QT_HASH_qt5-x11extras 12fc870f94e546d6e343f2ece44d09a6fc725b3ce092e1494bd2ef334ec92b559db2a8fcf6da88fe0f73040ee41fa5bf5f84ff197e5d1a004dabca3274508a96) +set(QT_HASH_qt5-androidextras d1b4a88053bd6b771f392e843611bf8397d782cc263ee924440e0ed6f63cdc936a2c127d3eb5a1834c11ef0c6efc2c8468fb65a28ec7f7645286bdea1dad590c) +#set(QT_HASH_qt5-canvas3d 0) deprecated +set(QT_HASH_qt5-translations 45302457e16e5dba674164dda7945110583f072d209d3984726324497efb367573475facc3534fd7cdfc61bc14295ebe4bf6588a37d45e87b676191d852f1c8a) +set(QT_HASH_qt5-serialbus 8a606fd407cb7a4a6a1f15f10daec952aa010684d6cfca7fa024f850b3db419b7cd67eecb58ba0c0dd283e10fd904a255ab42b279c38081e84fe06b7b22c4c49) +set(QT_HASH_qt5-webengine 11983470f0da9abfffba072406b2c67b475d8cf65412fdcfd925758e2a9449f509780e5b1001fb6868445c2c9540e5aa0e754954b70f1795b47335bad7c749b2) +set(QT_HASH_qt5-webglplugin cd8e63b8979601c3da37295148b7fe896863b97058d15fb9284a3eacca7fe62fae87dbd414285aee5df732ebadd67c96edd273ec9929ca005bf5282e4acb7cff) +set(QT_HASH_qt5-wayland e3d8fb79b7d3b10a94caccca1567c3a978b3517e13740aa6218d0a0b4cb180f6bdc3b533e113248908033f344ab5fcffd6fac751a1513c2d62834afe408ee714) + +if(QT_UPDATE_VERSION) + message(STATUS "Running Qt in automatic version port update mode!") + set(_VCPKG_INTERNAL_NO_HASH_CHECK 1) + if("${PORT}" MATCHES "qt5-base") + foreach(_current_qt_port ${QT_PORT_LIST}) + set(_current_control "${VCPKG_ROOT_DIR}/ports/qt5-${_current_qt_port}/CONTROL") + file(READ ${_current_control} _control_contents) + #message(STATUS "Before: \n${_control_contents}") + string(REGEX REPLACE "Version:[^0-9]+[0-9]\.[0-9]+\.[0-9]+[^\n]*\n" "Version: ${QT_MAJOR_MINOR_VER}.${QT_PATCH_VER}\n" _control_contents "${_control_contents}") + #message(STATUS "After: \n${_control_contents}") + file(WRITE ${_current_control} "${_control_contents}") + endforeach() + endif() +endif() \ No newline at end of file diff --git a/vcpkg/ports/qt5-base/cmake/qt_submodule_installation.cmake b/vcpkg/ports/qt5-base/cmake/qt_submodule_installation.cmake new file mode 100644 index 0000000..197c0ac --- /dev/null +++ b/vcpkg/ports/qt5-base/cmake/qt_submodule_installation.cmake @@ -0,0 +1,11 @@ + + +function(qt_submodule_installation) + qt_download_submodule(OUT_SOURCE_PATH TARGET_SOURCE_PATH ${ARGV}) + if(QT_UPDATE_VERSION) + SET(VCPKG_POLICY_EMPTY_PACKAGE enabled PARENT_SCOPE) + else() + qt_build_submodule(${TARGET_SOURCE_PATH} ${ARGV}) + qt_install_copyright(${TARGET_SOURCE_PATH}) + endif() +endfunction() \ No newline at end of file diff --git a/vcpkg/ports/qt5-base/patches/8c44d70.diff b/vcpkg/ports/qt5-base/patches/8c44d70.diff new file mode 100644 index 0000000..3b6e322 --- /dev/null +++ b/vcpkg/ports/qt5-base/patches/8c44d70.diff @@ -0,0 +1,28 @@ +diff --git a/src/corelib/tools/qarraydata.cpp b/src/corelib/tools/qarraydata.cpp +index 3879b48..c380893 100644 +--- a/src/corelib/tools/qarraydata.cpp ++++ b/src/corelib/tools/qarraydata.cpp +@@ -149,19 +149,16 @@ + + // End of qtools_p.h implementation + +-QT_WARNING_PUSH +-QT_WARNING_DISABLE_GCC("-Wmissing-field-initializers") +- + const QArrayData QArrayData::shared_null[2] = { + { Q_REFCOUNT_INITIALIZE_STATIC, 0, 0, 0, sizeof(QArrayData) }, // shared null +- /* zero initialized terminator */}; ++ { { Q_BASIC_ATOMIC_INITIALIZER(0) }, 0, 0, 0, 0 } /* zero initialized terminator */ ++}; + + static const QArrayData qt_array[3] = { + { Q_REFCOUNT_INITIALIZE_STATIC, 0, 0, 0, sizeof(QArrayData) }, // shared empty + { { Q_BASIC_ATOMIC_INITIALIZER(0) }, 0, 0, 0, sizeof(QArrayData) }, // unsharable empty +- /* zero initialized terminator */}; +- +-QT_WARNING_POP ++ { { Q_BASIC_ATOMIC_INITIALIZER(0) }, 0, 0, 0, 0 } /* zero initialized terminator */ ++}; + + static const QArrayData &qt_array_empty = qt_array[0]; + static const QArrayData &qt_array_unsharable_empty = qt_array[1]; diff --git a/vcpkg/ports/qt5-base/patches/Qt5BasicConfig.patch b/vcpkg/ports/qt5-base/patches/Qt5BasicConfig.patch new file mode 100644 index 0000000..4f5d1fa --- /dev/null +++ b/vcpkg/ports/qt5-base/patches/Qt5BasicConfig.patch @@ -0,0 +1,194 @@ +diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +index c72989288..a88234dca 100644 +--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in ++++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in +@@ -53,8 +53,12 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura + set(_lib_deps) + set(_link_flags) + +-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- set(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}\") ++!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) ++ if(\"${Configuration}\" STREQUAL \"DEBUG\") ++ set(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_LIB_DIR}\") ++ else() ++ set(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}\") ++ endif() + !!ELSE + set(_qt5_install_libs \"$${CMAKE_LIB_DIR}\") + !!ENDIF +@@ -125,6 +129,8 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura + elseif(EXISTS \"${_flag}\") + # The flag is an absolute path to an existing library + list(APPEND _lib_deps \"${_flag}\") ++ elseif(_flag MATCHES \"\\\\.lib$\") #Library name only. No -l. Probably missing some cases ++ list(APPEND _lib_deps \"${_flag}\") + elseif(_flag MATCHES \"^-L(.*)$\") + # Handle -Lfoo flags by putting their paths in the search path used by find_library above + list(APPEND _search_paths \"${CMAKE_MATCH_1}\") +@@ -147,7 +153,11 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) + + !!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\") ++ if(\"${Configuration}\" STREQUAL \"DEBUG\") # 1 ++ set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_DLL_DIR}${LIB_LOCATION}\") ++ else() ++ set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\") ++ endif() + !!ELSE + set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\") + !!ENDIF +@@ -174,21 +184,22 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI + ) + + !!IF !isEmpty(CMAKE_STATIC_TYPE) +- if(NOT "${IsDebugAndRelease}") +- set(_genex_condition \"1\") ++ #if(NOT "${IsDebugAndRelease}") ++ # set(_genex_condition \"1\") ++ #else() ++ if("${Configuration}" STREQUAL "DEBUG") ++ set(_genex_condition \"$\") + else() +- if("${Configuration}" STREQUAL "DEBUG") +- set(_genex_condition \"$\") +- else() +- set(_genex_condition \"$>\") +- endif() ++ set(_genex_condition \"$>\") + endif() ++ #endif() + + if(_static_deps) + set(_static_deps_genex \"$<${_genex_condition}:${_static_deps}>\") + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES + \"${_static_deps_genex}\" + ) ++ #message(STATUS \"Target Qt5::$${CMAKE_MODULE_NAME} static links: ${_static_dep} through ${_static_dep_genex}\") # Added for debugging + endif() + + set(_static_link_flags \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LINK_FLAGS}\") +@@ -205,13 +216,18 @@ macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATI + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES + \"${_static_link_flags_genex}\" + ) ++ #message(STATUS \"Target Qt5::$${CMAKE_MODULE_NAME} static link flags: ${_static_link_flags} through ${_static_link_flags_genex}\") + endif() + endif() + !!ENDIF + + !!IF !isEmpty(CMAKE_WINDOWS_BUILD) + !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") ++ if(\"${Configuration}\" STREQUAL \"DEBUG\") ++ set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") ++ else() ++ set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") ++ endif() + !!ELSE + set(imported_implib \"IMPORTED_IMPLIB_${Configuration}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\") + !!ENDIF +@@ -373,13 +389,14 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + + !!IF !isEmpty(CMAKE_STATIC_TYPE) + if(NOT Qt5_EXCLUDE_STATIC_DEPENDENCIES) +-!!IF !isEmpty(CMAKE_DEBUG_TYPE) + !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) ++ if(EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\") + _qt5_$${CMAKE_MODULE_NAME}_process_prl_file( +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG ++ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG + _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES + _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LINK_FLAGS + ) ++ endif() + !!ELSE + _qt5_$${CMAKE_MODULE_NAME}_process_prl_file( + \"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG +@@ -387,22 +404,21 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LINK_FLAGS + ) + !!ENDIF +-!!ENDIF + +-!!IF !isEmpty(CMAKE_RELEASE_TYPE) + !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) ++ if(EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\") + _qt5_$${CMAKE_MODULE_NAME}_process_prl_file( + \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE + _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES + _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LINK_FLAGS + ) ++ endif() + !!ELSE + _qt5_$${CMAKE_MODULE_NAME}_process_prl_file( + \"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE + _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES + _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LINK_FLAGS + ) +-!!ENDIF + !!ENDIF + endif() + +@@ -466,7 +482,7 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + !!IF isEmpty(CMAKE_DEBUG_TYPE) + !!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD) + !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) ++ if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) + !!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE + if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) + !!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE +@@ -474,13 +490,13 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + !!ELSE // CMAKE_STATIC_WINDOWS_BUILD + if (EXISTS + !!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE) +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" ++ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" + !!ELSE + \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" + !!ENDIF + AND EXISTS + !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) ++ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) + !!ELSE + \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" ) + !!ENDIF +@@ -543,7 +559,11 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration}) + + !!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE) +- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") ++ if(\"${Configuration}\" STREQUAL \"DEBUG\") ++ set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") ++ else() ++ set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") ++ endif() + !!ELSE + set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\") + !!ENDIF +@@ -557,15 +577,15 @@ if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME}) + ${_Qt5${Plugin}_STATIC_${Configuration}_LIB_DEPENDENCIES} + ) + +- if(NOT "${IsDebugAndRelease}") +- set(_genex_condition \"1\") ++ #if(NOT "${IsDebugAndRelease}") ++ # set(_genex_condition \"1\") ++ #else() ++ if("${Configuration}" STREQUAL "DEBUG") ++ set(_genex_condition \"$\") + else() +- if("${Configuration}" STREQUAL "DEBUG") +- set(_genex_condition \"$\") +- else() +- set(_genex_condition \"$>\") +- endif() ++ set(_genex_condition \"$>\") + endif() ++ #endif() + if(_static_deps) + set(_static_deps_genex \"$<${_genex_condition}:${_static_deps}>\") + set_property(TARGET Qt5::${Plugin} APPEND PROPERTY INTERFACE_LINK_LIBRARIES diff --git a/vcpkg/ports/qt5-base/patches/Qt5GuiConfigExtras.patch b/vcpkg/ports/qt5-base/patches/Qt5GuiConfigExtras.patch new file mode 100644 index 0000000..0029f2a --- /dev/null +++ b/vcpkg/ports/qt5-base/patches/Qt5GuiConfigExtras.patch @@ -0,0 +1,13 @@ +diff --git a/src/gui/Qt5GuiConfigExtras.cmake.in b/src/gui/Qt5GuiConfigExtras.cmake.in +index 84dbbfebd..accb86e3f 100644 +--- a/src/gui/Qt5GuiConfigExtras.cmake.in ++++ b/src/gui/Qt5GuiConfigExtras.cmake.in +@@ -148,6 +153,8 @@ macro(_qt5gui_find_extra_libs Name Libs LibDir IncDirs) + !!ENDIF + unset(Qt5Gui_${_cmake_lib_name}_LIBRARY CACHE) + ++ find_library(Qt5Gui_${_cmake_lib_name}_LIBRARY_DEBUG ${_lib}d ${_lib} NAMES_PER_DIR ++ PATHS \"${_qt5Gui_install_prefix}/debug/lib\" NO_DEFAULT_PATH) + find_library(Qt5Gui_${_cmake_lib_name}_LIBRARY_DEBUG ${_lib}d + PATHS \"${LibDir}\" + !!IF !mac diff --git a/vcpkg/ports/qt5-base/patches/Qt5PluginTarget.patch b/vcpkg/ports/qt5-base/patches/Qt5PluginTarget.patch new file mode 100644 index 0000000..a8377b5 --- /dev/null +++ b/vcpkg/ports/qt5-base/patches/Qt5PluginTarget.patch @@ -0,0 +1,74 @@ +diff --git a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in +index 5baf0fdb1..185abfffd 100644 +--- a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in ++++ b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in +@@ -15,13 +15,14 @@ foreach(_module_dep ${_Qt5$${CMAKE_PLUGIN_NAME}_MODULE_DEPENDENCIES}) + endif() + endforeach() + +-!!IF !isEmpty(CMAKE_RELEASE_TYPE) + !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +-_qt5_$${CMAKE_MODULE_NAME}_process_prl_file( +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE +- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES +- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LINK_FLAGS +-) ++if(EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\") ++ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file( ++ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE ++ _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES ++ _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LINK_FLAGS ++ ) ++endif() + !!ELSE + _qt5_$${CMAKE_MODULE_NAME}_process_prl_file( + \"$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE +@@ -29,15 +30,15 @@ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file( + _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LINK_FLAGS + ) + !!ENDIF +-!!ENDIF + +-!!IF !isEmpty(CMAKE_DEBUG_TYPE) + !!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE) +-_qt5_$${CMAKE_MODULE_NAME}_process_prl_file( +- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG +- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES +- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LINK_FLAGS +-) ++if(EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\") ++ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file( ++ \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG ++ _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES ++ _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LINK_FLAGS ++ ) ++endif() + !!ELSE + _qt5_$${CMAKE_MODULE_NAME}_process_prl_file( + \"$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG +@@ -45,19 +46,18 @@ _qt5_$${CMAKE_MODULE_NAME}_process_prl_file( + _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LINK_FLAGS + ) + !!ENDIF +-!!ENDIF + + set_property(TARGET Qt5::$$CMAKE_PLUGIN_NAME PROPERTY INTERFACE_SOURCES + \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_$${CMAKE_PLUGIN_NAME}_Import.cpp\" + ) + !!ENDIF + +-!!IF !isEmpty(CMAKE_RELEASE_TYPE) +-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE}) +-!!ENDIF +-!!IF !isEmpty(CMAKE_DEBUG_TYPE) +-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE}) +-!!ENDIF ++if(EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}$${CMAKE_PLUGIN_LOCATION_RELEASE}\") ++ _populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE}) ++endif() ++if(EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/debug/$${CMAKE_PLUGIN_DIR}$${CMAKE_PLUGIN_LOCATION_DEBUG}\") ++ _populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE}) ++endif() + + list(APPEND Qt5$${CMAKE_MODULE_NAME}_PLUGINS Qt5::$$CMAKE_PLUGIN_NAME) + set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY QT_ALL_PLUGINS_$${CMAKE_PLUGIN_TYPE_ESCAPED} Qt5::$${CMAKE_PLUGIN_NAME}) diff --git a/vcpkg/ports/qt5-base/patches/create_cmake.patch b/vcpkg/ports/qt5-base/patches/create_cmake.patch new file mode 100644 index 0000000..69bd39a --- /dev/null +++ b/vcpkg/ports/qt5-base/patches/create_cmake.patch @@ -0,0 +1,41 @@ +diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf +index 4aa5dad46..cee6d2882 100644 +--- a/mkspecs/features/create_cmake.prf ++++ b/mkspecs/features/create_cmake.prf +@@ -212,10 +212,10 @@ contains(CONFIG, plugin) { + CMAKE_PLUGIN_TYPE_ESCAPED = $$replace(PLUGIN_TYPE, [-/], _) + + win32 { +- !mingw|qtConfig(debug_and_release): debug_suffix="d" ++ debug_suffix="d" + + CMAKE_PRL_FILE_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.prl + CMAKE_PRL_FILE_LOCATION_DEBUG = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}$${debug_suffix}.prl + + isEmpty(CMAKE_STATIC_TYPE) { + CMAKE_PLUGIN_LOCATION_RELEASE = $$PLUGIN_TYPE/$${CMAKE_QT_STEM}.dll +@@ -295,6 +295,7 @@ CMAKE_INTERFACE_QT5_MODULE_DEPS = $$join(aux_lib_deps, ";") + equals(TEMPLATE, aux): CMAKE_FEATURE_PROPERTY_PREFIX = "INTERFACE_" + + mac { ++ CMAKE_FIND_OTHER_LIBRARY_BUILD = "true" + !isEmpty(CMAKE_STATIC_TYPE) { + CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}_debug.a + CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a +@@ -315,7 +316,7 @@ mac { + CMAKE_WINDOWS_BUILD = "true" + CMAKE_FIND_OTHER_LIBRARY_BUILD = "true" + +- !mingw|qtConfig(debug_and_release): debug_suffix="d" ++ debug_suffix="d" + + CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}$${debug_suffix}.dll + CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.dll +@@ -342,6 +342,7 @@ mac { + CMAKE_IMPLIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.lib + } + } else { ++ CMAKE_FIND_OTHER_LIBRARY_BUILD = "true" + !isEmpty(CMAKE_STATIC_TYPE) { + CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.a + CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a diff --git a/vcpkg/ports/qt5-base/patches/egl.patch b/vcpkg/ports/qt5-base/patches/egl.patch new file mode 100644 index 0000000..17f0a55 --- /dev/null +++ b/vcpkg/ports/qt5-base/patches/egl.patch @@ -0,0 +1,16 @@ +diff --git a/src/gui/configure.json b/src/gui/configure.json +index 5fceb1150..7702cb261 100644 +--- a/src/gui/configure.json ++++ b/src/gui/configure.json +@@ -220,7 +220,10 @@ + "headers": "EGL/egl.h", + "sources": [ + { "type": "pkgConfig", "args": "egl" }, +- { "type": "makeSpec", "spec": "EGL" } ++ { "type": "makeSpec", "spec": "EGL" }, ++ { "libs": "-lEGL -lGLESv2 -lGL -lANGLE -lGL -lX11 -ldl -lm -lpthread" }, ++ { "libs": "-DGL_GLES_PROTOTYPES=1 -DGL_GLEXT_PROTOTYPES -DEGL_EGL_PROTOTYPES=1 -DEGL_EGLEXT_PROTOTYPES -lEGL -lGLESv2 -lGL -lANGLE -lGL -lX11 -ldl -lm -lpthread" }, ++ { "libs": "-DANGLE_EXPORT -DANGLE_UTIL_EXPORT -DGL_API -DGL_APICALL -DEGLAPI -DGL_GLES_PROTOTYPES=1 -DGL_GLEXT_PROTOTYPES -DEGL_EGL_PROTOTYPES=1 -DEGL_EGLEXT_PROTOTYPES -lEGL -lGLESv2 -lGL -lANGLE -lGL -lX11 -ldl -lm -lpthread" } + ] + }, + "freetype": { diff --git a/vcpkg/ports/qt5-base/patches/gui_configure.patch b/vcpkg/ports/qt5-base/patches/gui_configure.patch new file mode 100644 index 0000000..7a283dc --- /dev/null +++ b/vcpkg/ports/qt5-base/patches/gui_configure.patch @@ -0,0 +1,29 @@ +diff --git a/src/gui/configure.json b/src/gui/configure.json +index c51e3ceee..7f7e206b6 100644 +--- a/src/gui/configure.json ++++ b/src/gui/configure.json +@@ -239,9 +239,9 @@ + "headers": "ft2build.h", + "sources": [ + { "type": "pkgConfig", "args": "freetype2" }, +- { "type": "freetype", "libs": "-lfreetype", "condition": "!config.wasm" }, ++ { "type": "freetype", "libs": "-lbreakfreetypeautofind", "condition": "!config.wasm" }, + { "libs": "-s USE_FREETYPE=1", "condition": "config.wasm" }, +- { "libs": "-lfreetype" } ++ { "libs": "-lbreakfreetypeautofind" } + ], + "use": [ + { "lib": "zlib", "condition": "features.system-zlib" } +@@ -262,7 +262,10 @@ + "headers": "fontconfig/fontconfig.h", + "sources": [ +- { "type": "pkgConfig", "args": "fontconfig" }, ++ { "type": "pkgConfig", "args": "breakfontconfig" }, +- { "type": "freetype", "libs": "-lfontconfig" } ++ { "type": "freetype", "libs": "-lbreakautofind" }, ++ { "libs": "-lfontconfig -lexpat" }, ++ { "libs": "-llibfontconfig -llibexpat" }, ++ "-lfontconfig" + ], + "use": "freetype" + }, diff --git a/vcpkg/ports/qt5-base/patches/icu.patch b/vcpkg/ports/qt5-base/patches/icu.patch new file mode 100644 index 0000000..16c13b0 --- /dev/null +++ b/vcpkg/ports/qt5-base/patches/icu.patch @@ -0,0 +1,24 @@ +diff --git a/src/corelib/configure.json b/src/corelib/configure.json +index de8d26a12..068b80c51 100644 +--- a/src/corelib/configure.json ++++ b/src/corelib/configure.json +@@ -106,13 +106,17 @@ + "headers": [ "unicode/utypes.h", "unicode/ucol.h", "unicode/ustring.h" ], + "sources": [ + { ++ "libs": "", + "builds": { +- "debug": "-lsicuind -lsicuucd -lsicudtd", +- "release": "-lsicuin -lsicuuc -lsicudt" ++ "debug": "-licuind -licuucd -licudtd", ++ "release": "-licuin -licuuc -licudt" + }, + "condition": "config.win32 && !features.shared" + }, ++ { "libs": "-licuind -licuucd -licudtd", "condition": "config.win32 && !features.shared"}, ++ { "libs": "-licuin -licuuc -licudt", "condition": "config.win32 && !features.shared"}, + { "libs": "-licuin -licuuc -licudt", "condition": "config.win32 && features.shared" }, ++ { "libs": "-licuind -licuucd -licudtd", "condition": "config.win32 && features.shared" }, + { "libs": "-licui18n -licuuc -licudata", "condition": "!config.win32" } + ], + "use": [ diff --git a/vcpkg/ports/qt5-base/patches/qt_app.patch b/vcpkg/ports/qt5-base/patches/qt_app.patch new file mode 100644 index 0000000..e04446b --- /dev/null +++ b/vcpkg/ports/qt5-base/patches/qt_app.patch @@ -0,0 +1,17 @@ +diff --git a/mkspecs/features/qt_app.prf b/mkspecs/features/qt_app.prf +index 8354f30e..8f24b72e 100644 +--- a/mkspecs/features/qt_app.prf ++++ b/mkspecs/features/qt_app.prf +@@ -27,10 +27,11 @@ host_build:force_bootstrap { + QT -= core core-private xml + QT += bootstrap-private + } + target.path = $$[QT_HOST_BINS] ++ CONFIG += relative_qt_rpath # Qt's tools and apps should be relocatable + } else { + !build_pass:qtConfig(debug_and_release): CONFIG += release +- target.path = $$[QT_INSTALL_BINS] ++ target.path = $$[QT_HOST_BINS] + CONFIG += relative_qt_rpath # Qt's tools and apps should be relocatable + } + INSTALLS += target diff --git a/vcpkg/ports/qt5-base/patches/static_opengl.patch b/vcpkg/ports/qt5-base/patches/static_opengl.patch new file mode 100644 index 0000000..51818b8 --- /dev/null +++ b/vcpkg/ports/qt5-base/patches/static_opengl.patch @@ -0,0 +1,62 @@ +diff --git a/mkspecs/features/win32/opengl.prf b/mkspecs/features/win32/opengl.prf +index f21848f94..202c49688 100644 +--- a/mkspecs/features/win32/opengl.prf ++++ b/mkspecs/features/win32/opengl.prf +@@ -30,7 +30,7 @@ qtConfig(opengles2) { + LIBS += $$QMAKE_LIBS_OPENGL_ES2 + QMAKE_LIBDIR += $$QMAKE_LIBDIR_OPENGL_ES2_RELEASE + } +- qtConfig(static): DEFINES += GL_APICALL= EGLAPI= ++ qtConfig(static): DEFINES += _GDI32_ GL_APICALL= EGLAPI= ANGLE_EXPORT= ANGLE_PLATFORM_EXPORT= + } else { + !qtConfig(dynamicgl) { + QMAKE_LIBS += $$QMAKE_LIBS_OPENGL +diff --git a/src/angle/src/common/gles_common.pri b/src/angle/src/common/gles_common.pri +index 70b65dd4c..1dcc96af5 100644 +--- a/src/angle/src/common/gles_common.pri ++++ b/src/angle/src/common/gles_common.pri +@@ -23,7 +23,8 @@ for(libname, STATICLIBS) { + PRE_TARGETDEPS += $$staticlib + } + +-DEFINES += LIBANGLE_IMPLEMENTATION LIBGLESV2_IMPLEMENTATION GL_APICALL= GL_GLEXT_PROTOTYPES= EGLAPI= ++!qtConfig(static): DEFINES += LIBANGLE_IMPLEMENTATION LIBGLESV2_IMPLEMENTATION ++qtConfig(static): DEFINES += GL_APICALL= EGLAPI= ANGLE_EXPORT= ANGLE_PLATFORM_EXPORT= + !winrt: DEFINES += ANGLE_ENABLE_D3D9 ANGLE_SKIP_DXGI_1_2_CHECK + + QT_FOR_CONFIG += gui-private +diff --git a/src/3rdparty/angle/include/platform/Platform.h b/src/3rdparty/angle/include/platform/Platform.h +index aa1221a86..a49ee4f6d 100644 +--- a/src/3rdparty/angle/include/platform/Platform.h ++++ b/src/3rdparty/angle/include/platform/Platform.h +@@ -12,7 +12,7 @@ + #include + #include + +-#if defined(_WIN32) ++#if defined(_WIN32) && !defined(ANGLE_PLATFORM_EXPORT) + # if !defined(LIBANGLE_IMPLEMENTATION) + # define ANGLE_PLATFORM_EXPORT __declspec(dllimport) + # else +diff --git a/src/3rdparty/angle/src/libGLESv2/entry_points_gles_2_0_ext.cpp b/src/3rdparty/angle/src/libGLESv2/entry_points_gles_2_0_ext.cpp +index d4459ec28..d1416041e 100644 +--- a/src/3rdparty/angle/src/libGLESv2/entry_points_gles_2_0_ext.cpp ++++ b/src/3rdparty/angle/src/libGLESv2/entry_points_gles_2_0_ext.cpp +@@ -3505,7 +3505,7 @@ ANGLE_EXPORT void GL_APIENTRY GetQueryObjectui64vRobustANGLE(GLuint id, + } + } + +-GL_APICALL void GL_APIENTRY FramebufferTextureMultiviewLayeredANGLE(GLenum target, ++ANGLE_EXPORT void GL_APIENTRY FramebufferTextureMultiviewLayeredANGLE(GLenum target, + GLenum attachment, + GLuint texture, + GLint level, +@@ -3530,7 +3530,7 @@ GL_APICALL void GL_APIENTRY FramebufferTextureMultiviewLayeredANGLE(GLenum targe + } + } + +-GL_APICALL void GL_APIENTRY FramebufferTextureMultiviewSideBySideANGLE(GLenum target, ++ANGLE_EXPORT void GL_APIENTRY FramebufferTextureMultiviewSideBySideANGLE(GLenum target, + GLenum attachment, + GLuint texture, + GLint level, diff --git a/vcpkg/ports/qt5-base/patches/windows_prf.patch b/vcpkg/ports/qt5-base/patches/windows_prf.patch new file mode 100644 index 0000000..6051daa --- /dev/null +++ b/vcpkg/ports/qt5-base/patches/windows_prf.patch @@ -0,0 +1,13 @@ +diff --git a/mkspecs/features/win32/windows.prf b/mkspecs/features/win32/windows.prf +index 272170d4..70b8ea2e 100644 +--- a/mkspecs/features/win32/windows.prf ++++ b/mkspecs/features/win32/windows.prf +@@ -6,7 +6,7 @@ contains(TEMPLATE, ".*app") { + + qt:for(entryLib, $$list($$unique(QMAKE_LIBS_QT_ENTRY))) { + isEqual(entryLib, -lqtmain) { +- lib = $$QT.core.libs/$${QMAKE_PREFIX_STATICLIB}qtmain$$QT_LIBINFIX$$qtPlatformTargetSuffix().$$QMAKE_EXTENSION_STATICLIB ++ lib = $$QT.core.libs/manual-link/$${QMAKE_PREFIX_STATICLIB}qtmain$$QT_LIBINFIX$$qtPlatformTargetSuffix().$$QMAKE_EXTENSION_STATICLIB + PRE_TARGETDEPS += $$lib + QMAKE_LIBS += $$lib + } else { diff --git a/vcpkg/ports/qt5-base/patches/winmain_pro.patch b/vcpkg/ports/qt5-base/patches/winmain_pro.patch new file mode 100644 index 0000000..66460cc --- /dev/null +++ b/vcpkg/ports/qt5-base/patches/winmain_pro.patch @@ -0,0 +1,27 @@ +diff --git a/src/winmain/winmain.pro b/src/winmain/winmain.pro +index 9cb6ab0c..52c7876e 100644 +--- a/src/winmain/winmain.pro ++++ b/src/winmain/winmain.pro +@@ -3,7 +3,7 @@ + + TEMPLATE = lib + TARGET = qtmain +-DESTDIR = $$QT.core.libs ++DESTDIR = $$QT.core.libs/manual-link + + CONFIG += static + QT = core +@@ -27,7 +27,12 @@ winrt { + } + + load(qt_installs) +- ++!qt_no_install_library { ++ host_build: \ ++ target.path = $$[QT_HOST_LIBS]/manual-link ++ else: \ ++ target.path = $$[QT_INSTALL_LIBS]/manual-link ++} + TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end + + load(qt_targets) diff --git a/vcpkg/ports/qt5-base/patches/xlib.patch b/vcpkg/ports/qt5-base/patches/xlib.patch new file mode 100644 index 0000000..07cba5b --- /dev/null +++ b/vcpkg/ports/qt5-base/patches/xlib.patch @@ -0,0 +1,39 @@ +diff --git a/src/gui/configure.json b/src/gui/configure.json +index 9a749516b..242f47504 100644 +--- a/src/gui/configure.json ++++ b/src/gui/configure.json +@@ -568,7 +568,9 @@ + }, + "headers": "X11/Xlib.h", + "sources": [ +- { "type": "makeSpec", "spec": "X11" } ++ { "type": "makeSpec", "spec": "X11" }, ++ { "type": "pkgConfig", "args": "x11" }, ++ { "type": "pkgConfig", "args": "x11 --static" } + ] + }, + "x11sm": { +@@ -590,6 +592,7 @@ + "headers": "xcb/xcb.h", + "sources": [ + { "type": "pkgConfig", "args": "xcb >= 1.11" }, ++ { "type": "pkgConfig", "args": "xcb >= 1.11 --static" }, + "-lxcb" + ] + }, +@@ -691,6 +694,7 @@ + "headers": "X11/Xlib-xcb.h", + "sources": [ + { "type": "pkgConfig", "args": "x11-xcb" }, ++ { "type": "pkgConfig", "args": "x11-xcb --static" }, + "-lX11-xcb" + ], + "use": "xcb xlib" +@@ -711,6 +715,7 @@ + "headers": "xcb/xkb.h", + "sources": [ + { "type": "pkgConfig", "args": "xcb-xkb" }, ++ { "type": "pkgConfig", "args": "xcb-xkb --static" }, + "-lxcb-xkb" + ], + "use": "xcb" diff --git a/vcpkg/ports/qt5-base/portfile.cmake b/vcpkg/ports/qt5-base/portfile.cmake new file mode 100644 index 0000000..1044df3 --- /dev/null +++ b/vcpkg/ports/qt5-base/portfile.cmake @@ -0,0 +1,447 @@ +vcpkg_buildpath_length_warning(37) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + option(QT_OPENSSL_LINK "Link against OpenSSL at compile-time." ON) +else() + option(QT_OPENSSL_LINK "Link against OpenSSL at compile-time." OFF) +endif() + +if (VCPKG_TARGET_IS_LINUX) + message(WARNING "${PORT} currently requires the following libraries from the system package manager:\n libx11-xcb-dev\n\nThese can be installed on Ubuntu systems via apt-get install libx11-xcb-dev.") + message(WARNING "${PORT} for qt5-x11extras requires the following libraries from the system package manager:\n libxkbcommon-x11-dev\n\nThese can be installed on Ubuntu systems via apt-get install libxkbcommon-x11-dev.") + # +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake) + +if("latest" IN_LIST FEATURES) # latest = core currently + set(QT_BUILD_LATEST ON) + set(PATCHES + patches/Qt5BasicConfig.patch + patches/Qt5PluginTarget.patch + patches/create_cmake.patch + ) +else() + set(PATCHES + patches/Qt5BasicConfig.patch + patches/Qt5PluginTarget.patch + patches/create_cmake.patch + ) +endif() + +include(qt_port_functions) +include(configure_qt) +include(install_qt) + + +######################### +## Find Host and Target mkspec name for configure +include(find_qt_mkspec) +find_qt_mkspec(TARGET_MKSPEC HOST_MKSPEC HOST_TOOLS) +set(QT_PLATFORM_CONFIGURE_OPTIONS TARGET_PLATFORM ${TARGET_MKSPEC}) +if(DEFINED HOST_MKSPEC) + list(APPEND QT_PLATFORM_CONFIGURE_OPTIONS HOST_PLATFORM ${HOST_MKSPEC}) +endif() +if(DEFINED HOST_TOOLS) + list(APPEND QT_PLATFORM_CONFIGURE_OPTIONS HOST_TOOLS_ROOT ${HOST_TOOLS}) +endif() + +######################### +## Downloading Qt5-Base + +qt_download_submodule( OUT_SOURCE_PATH SOURCE_PATH + PATCHES + patches/winmain_pro.patch #Moves qtmain to manual-link + patches/windows_prf.patch #fixes the qtmain dependency due to the above move + patches/qt_app.patch #Moves the target location of qt5 host apps to always install into the host dir. + patches/gui_configure.patch #Patches the gui configure.json to break freetype/fontconfig autodetection because it does not include its dependencies. + patches/icu.patch #Help configure find static icu builds in vcpkg on windows + patches/xlib.patch #Patches Xlib check to actually use Pkgconfig instead of makeSpec only + patches/egl.patch #Fix egl detection logic. + patches/8c44d70.diff #Upstream fix for MSVC 16.6.2. static init of std::atomic. + #patches/static_opengl.patch #Use this patch if you really want to statically link angle on windows (e.g. using -opengl es2 and -static). + #Be carefull since it requires definining _GDI32_ for all dependent projects due to redefinition errors in the + #the windows supplied gl.h header and the angle gl.h otherwise. + #CMake fixes + ${PATCHES} + patches/Qt5GuiConfigExtras.patch # Patches the library search behavior for EGL since angle is not build with Qt + ) + +# Remove vendored dependencies to ensure they are not picked up by the build +foreach(DEPENDENCY freetype zlib harfbuzz-ng libjpeg libpng double-conversion sqlite pcre2) + if(EXISTS ${SOURCE_PATH}/src/3rdparty/${DEPENDENCY}) + file(REMOVE_RECURSE ${SOURCE_PATH}/src/3rdparty/${DEPENDENCY}) + endif() +endforeach() +file(REMOVE_RECURSE ${SOURCE_PATH}/include/QtZlib) + +######################### +## Setup Configure options + +# This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings +set(ENV{_CL_} "/utf-8") + +set(CORE_OPTIONS + -confirm-license + -opensource + #-simulator_and_device + #-ltcg + #-combined-angle-lib + # ENV ANGLE_DIR to external angle source dir. (Will always be compiled with Qt) + #-optimized-tools + #-force-debug-info + -verbose +) + +## 3rd Party Libs +list(APPEND CORE_OPTIONS + -system-zlib + -system-libjpeg + -system-libpng + -system-freetype # static builds require to also link its dependent bzip! + -system-pcre + -system-doubleconversion + -system-sqlite + -system-harfbuzz + -icu + -no-angle) # Qt does not need to build angle. VCPKG will build angle! + +if(QT_OPENSSL_LINK) + list(APPEND CORE_OPTIONS -openssl-linked) +endif() + +find_library(ZLIB_RELEASE NAMES z zlib PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(ZLIB_DEBUG NAMES z zlib zd zlibd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(JPEG_RELEASE NAMES jpeg jpeg-static PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(JPEG_DEBUG NAMES jpeg jpeg-static jpegd jpeg-staticd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(LIBPNG_RELEASE NAMES png16 libpng16 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) #Depends on zlib +find_library(LIBPNG_DEBUG NAMES png16 png16d libpng16 libpng16d PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(PSQL_RELEASE NAMES pq libpq PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) # Depends on openssl and zlib(linux) +find_library(PSQL_DEBUG NAMES pq libpq pqd libpqd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(PCRE2_RELEASE NAMES pcre2-16 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(PCRE2_DEBUG NAMES pcre2-16 pcre2-16d PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(FREETYPE_RELEASE NAMES freetype PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) #zlib, bzip2, libpng +find_library(FREETYPE_DEBUG NAMES freetype freetyped PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(DOUBLECONVERSION_RELEASE NAMES double-conversion PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(DOUBLECONVERSION_DEBUG NAMES double-conversion PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(HARFBUZZ_RELEASE NAMES harfbuzz PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(HARFBUZZ_DEBUG NAMES harfbuzz PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(SQLITE_RELEASE NAMES sqlite3 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) # Depends on openssl and zlib(linux) +find_library(SQLITE_DEBUG NAMES sqlite3 sqlite3d PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + +find_library(BROTLI_COMMON_RELEASE NAMES brotlicommon brotlicommon-static PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(BROTLI_COMMON_DEBUG NAMES brotlicommon brotlicommon-static brotlicommond brotlicommon-staticd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(BROTLI_DEC_RELEASE NAMES brotlidec brotlidec-static PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(BROTLI_DEC_DEBUG NAMES brotlidec brotlidec-static brotlidecd brotlidec-staticd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(BROTLI_ENC_RELEASE NAMES brotlienc brotlienc-static PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(BROTLI_ENC_DEBUG NAMES brotlienc brotlienc-static brotliencd brotlienc-staticd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + +find_library(ICUUC_RELEASE NAMES icuuc libicuuc PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(ICUUC_DEBUG NAMES icuucd libicuucd icuuc libicuuc PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(ICUTU_RELEASE NAMES icutu libicutu PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(ICUTU_DEBUG NAMES icutud libicutud icutu libicutu PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + +# Was installed in WSL but not on CI machine +# find_library(ICULX_RELEASE NAMES iculx libiculx PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +# find_library(ICULX_DEBUG NAMES iculxd libiculxd iculx libiculx PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + +find_library(ICUIO_RELEASE NAMES icuio libicuio PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(ICUIO_DEBUG NAMES icuiod libicuiod icuio libicuio PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(ICUIN_RELEASE NAMES icui18n libicui18n icuin PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(ICUIN_DEBUG NAMES icui18nd libicui18nd icui18n libicui18n icuin icuind PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(ICUDATA_RELEASE NAMES icudata libicudata icudt PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(ICUDATA_DEBUG NAMES icudatad libicudatad icudata libicudata icudtd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +set(ICU_RELEASE "${ICUIN_RELEASE} ${ICUTU_RELEASE} ${ICULX_RELEASE} ${ICUUC_RELEASE} ${ICUIO_RELEASE} ${ICUDATA_RELEASE}") +set(ICU_DEBUG "${ICUIN_DEBUG} ${ICUTU_DEBUG} ${ICULX_DEBUG} ${ICUUC_DEBUG} ${ICUIO_DEBUG} ${ICUDATA_DEBUG}") +if(VCPKG_TARGET_IS_WINDOWS) + set(ICU_RELEASE "${ICU_RELEASE} Advapi32.lib") + set(ICU_DEBUG "${ICU_DEBUG} Advapi32.lib" ) +endif() + + +find_library(FONTCONFIG_RELEASE NAMES fontconfig PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(FONTCONFIG_DEBUG NAMES fontconfig PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(EXPAT_RELEASE NAMES expat PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(EXPAT_DEBUG NAMES expat PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + +#Dependent libraries +find_library(BZ2_RELEASE bz2 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(BZ2_DEBUG bz2 bz2d PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(SSL_RELEASE ssl ssleay32 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(SSL_DEBUG ssl ssleay32 ssld ssleay32d PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(EAY_RELEASE libeay32 crypto libcrypto PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(EAY_DEBUG libeay32 crypto libcrypto libeay32d cryptod libcryptod PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + +set(FREETYPE_RELEASE_ALL "${FREETYPE_RELEASE} ${BZ2_RELEASE} ${LIBPNG_RELEASE} ${ZLIB_RELEASE} ${BROTLI_ENC_RELEASE} ${BROTLI_DEC_RELEASE} ${BROTLI_COMMON_RELEASE}") +set(FREETYPE_DEBUG_ALL "${FREETYPE_DEBUG} ${BZ2_DEBUG} ${LIBPNG_DEBUG} ${ZLIB_DEBUG} ${BROTLI_ENC_DEBUG} ${BROTLI_DEC_DEBUG} ${BROTLI_COMMON_RELEASE}") + +# If HarfBuzz is built with GLib enabled, it must be statically link +set(GLIB_LIB_VERSION 2.0) +find_library(GLIB_RELEASE NAMES glib-${GLIB_LIB_VERSION} PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(GLIB_DEBUG NAMES glib-${GLIB_LIB_VERSION} PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +if(GLIB_RELEASE MATCHES "-NOTFOUND" OR GLIB_DEBUG MATCHES "-NOTFOUND") + set(GLIB_RELEASE "") + set(GLIB_DEBUG "") +endif() + +set(RELEASE_OPTIONS + "LIBJPEG_LIBS=${JPEG_RELEASE}" + "ZLIB_LIBS=${ZLIB_RELEASE}" + "LIBPNG_LIBS=${LIBPNG_RELEASE} ${ZLIB_RELEASE}" + "PCRE2_LIBS=${PCRE2_RELEASE}" + "FREETYPE_LIBS=${FREETYPE_RELEASE_ALL}" + "ICU_LIBS=${ICU_RELEASE}" + "QMAKE_LIBS_PRIVATE+=${BZ2_RELEASE}" + "QMAKE_LIBS_PRIVATE+=${LIBPNG_RELEASE}" + ) +set(DEBUG_OPTIONS + "LIBJPEG_LIBS=${JPEG_DEBUG}" + "ZLIB_LIBS=${ZLIB_DEBUG}" + "LIBPNG_LIBS=${LIBPNG_DEBUG} ${ZLIB_DEBUG}" + "PCRE2_LIBS=${PCRE2_DEBUG}" + "FREETYPE_LIBS=${FREETYPE_DEBUG_ALL}" + "ICU_LIBS=${ICU_DEBUG}" + "QMAKE_LIBS_PRIVATE+=${BZ2_DEBUG}" + "QMAKE_LIBS_PRIVATE+=${LIBPNG_DEBUG}" + ) + + +if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_TARGET_IS_UWP) + list(APPEND CORE_OPTIONS -appstore-compliant) + endif() + if(NOT ${VCPKG_LIBRARY_LINKAGE} STREQUAL "static") + list(APPEND CORE_OPTIONS -opengl dynamic) # other options are "-no-opengl", "-opengl angle", and "-opengl desktop" and "-opengel es2" + else() + list(APPEND CORE_OPTIONS -opengl dynamic) # other possible option without moving angle dlls: "-opengl desktop". "-opengel es2" only works with commented patch + endif() + list(APPEND RELEASE_OPTIONS + "PSQL_LIBS=${PSQL_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} ws2_32.lib secur32.lib advapi32.lib shell32.lib crypt32.lib user32.lib gdi32.lib" + "SQLITE_LIBS=${SQLITE_RELEASE}" + "HARFBUZZ_LIBS=${HARFBUZZ_RELEASE} ${FREETYPE_RELEASE_ALL}" + "OPENSSL_LIBS=${SSL_RELEASE} ${EAY_RELEASE} ws2_32.lib secur32.lib advapi32.lib shell32.lib crypt32.lib user32.lib gdi32.lib" + ) + + list(APPEND DEBUG_OPTIONS + "PSQL_LIBS=${PSQL_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} ws2_32.lib secur32.lib advapi32.lib shell32.lib crypt32.lib user32.lib gdi32.lib" + "SQLITE_LIBS=${SQLITE_DEBUG}" + "HARFBUZZ_LIBS=${HARFBUZZ_DEBUG} ${FREETYPE_DEBUG_ALL}" + "OPENSSL_LIBS=${SSL_DEBUG} ${EAY_DEBUG} ws2_32.lib secur32.lib advapi32.lib shell32.lib crypt32.lib user32.lib gdi32.lib" + ) +elseif(VCPKG_TARGET_IS_LINUX) + list(APPEND CORE_OPTIONS -fontconfig -xcb-xlib -xcb -linuxfb) + if (NOT EXISTS "/usr/include/GL/glu.h") + message(FATAL_ERROR "qt5 requires libgl1-mesa-dev and libglu1-mesa-dev, please use your distribution's package manager to install them.\nExample: \"apt-get install libgl1-mesa-dev libglu1-mesa-dev\"") + endif() + list(APPEND RELEASE_OPTIONS + "PSQL_LIBS=${PSQL_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread" + "SQLITE_LIBS=${SQLITE_RELEASE} -ldl -lpthread" + "HARFBUZZ_LIBS=${HARFBUZZ_RELEASE} ${FREETYPE_RELEASE_ALL} ${GLIB_RELEASE} -lpthread" + "OPENSSL_LIBS=${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread" + "FONTCONFIG_LIBS=${FONTCONFIG_RELEASE} ${FREETYPE_RELEASE} ${EXPAT_RELEASE}" + ) + list(APPEND DEBUG_OPTIONS + "PSQL_LIBS=${PSQL_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread" + "SQLITE_LIBS=${SQLITE_DEBUG} -ldl -lpthread" + "HARFBUZZ_LIBS=${HARFBUZZ_DEBUG} ${FREETYPE_DEBUG_ALL} ${GLIB_DEBUG} -lpthread" + "OPENSSL_LIBS=${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread" + "FONTCONFIG_LIBS=${FONTCONFIG_DEBUG} ${FREETYPE_DEBUG} ${EXPAT_DEBUG}" + ) +elseif(VCPKG_TARGET_IS_OSX) + list(APPEND CORE_OPTIONS -fontconfig) + if(DEFINED VCPKG_OSX_DEPLOYMENT_TARGET) + set(ENV{QMAKE_MACOSX_DEPLOYMENT_TARGET} ${VCPKG_OSX_DEPLOYMENT_TARGET}) + else() + execute_process(COMMAND xcrun --show-sdk-version + OUTPUT_FILE OSX_SDK_VER.txt + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}) + FILE(STRINGS "${CURRENT_BUILDTREES_DIR}/OSX_SDK_VER.txt" VCPKG_OSX_DEPLOYMENT_TARGET REGEX "^[0-9][0-9]\.[0-9][0-9]*") + message(STATUS "Detected OSX SDK Version: ${VCPKG_OSX_DEPLOYMENT_TARGET}") + string(REGEX MATCH "^[0-9][0-9]\.[0-9][0-9]*" VCPKG_OSX_DEPLOYMENT_TARGET ${VCPKG_OSX_DEPLOYMENT_TARGET}) + message(STATUS "Major.Minor OSX SDK Version: ${VCPKG_OSX_DEPLOYMENT_TARGET}") + set(ENV{QMAKE_MACOSX_DEPLOYMENT_TARGET} ${VCPKG_OSX_DEPLOYMENT_TARGET}) + if(${VCPKG_OSX_DEPLOYMENT_TARGET} GREATER "10.15") # Max Version supported by QT. This version is defined in mkspecs/common/macx.conf as QT_MAC_SDK_VERSION_MAX + message(STATUS "Qt ${QT_MAJOR_MINOR_VER}.${QT_PATCH_VER} only support OSX_DEPLOYMENT_TARGET up to 10.15") + set(VCPKG_OSX_DEPLOYMENT_TARGET "10.15") + endif() + set(ENV{QMAKE_MACOSX_DEPLOYMENT_TARGET} ${VCPKG_OSX_DEPLOYMENT_TARGET}) + message(STATUS "Enviromnent OSX SDK Version: $ENV{QMAKE_MACOSX_DEPLOYMENT_TARGET}") + FILE(READ "${SOURCE_PATH}/mkspecs/common/macx.conf" _tmp_contents) + string(REPLACE "QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.13" "QMAKE_MACOSX_DEPLOYMENT_TARGET = ${VCPKG_OSX_DEPLOYMENT_TARGET}" _tmp_contents ${_tmp_contents}) + FILE(WRITE "${SOURCE_PATH}/mkspecs/common/macx.conf" ${_tmp_contents}) + endif() + #list(APPEND QT_PLATFORM_CONFIGURE_OPTIONS HOST_PLATFORM ${TARGET_MKSPEC}) + list(APPEND RELEASE_OPTIONS + "PSQL_LIBS=${PSQL_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread" + "SQLITE_LIBS=${SQLITE_RELEASE} -ldl -lpthread" + "HARFBUZZ_LIBS=${HARFBUZZ_RELEASE} ${FREETYPE_RELEASE_ALL} -framework ApplicationServices" + "OPENSSL_LIBS=${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread" + "FONTCONFIG_LIBS=${FONTCONFIG_RELEASE} ${FREETYPE_RELEASE} ${EXPAT_RELEASE} -liconv" + ) + list(APPEND DEBUG_OPTIONS + "PSQL_LIBS=${PSQL_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread" + "SQLITE_LIBS=${SQLITE_DEBUG} -ldl -lpthread" + "HARFBUZZ_LIBS=${HARFBUZZ_DEBUG} ${FREETYPE_DEBUG_ALL} -framework ApplicationServices" + "OPENSSL_LIBS=${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread" + "FONTCONFIG_LIBS=${FONTCONFIG_DEBUG} ${FREETYPE_DEBUG} ${EXPAT_DEBUG} -liconv" + ) +endif() + +## Do not build tests or examples +list(APPEND CORE_OPTIONS + -nomake examples + -nomake tests) + +if(QT_UPDATE_VERSION) + SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) +else() + configure_qt( + SOURCE_PATH ${SOURCE_PATH} + ${QT_PLATFORM_CONFIGURE_OPTIONS} + OPTIONS ${CORE_OPTIONS} + OPTIONS_RELEASE ${RELEASE_OPTIONS} + OPTIONS_DEBUG ${DEBUG_OPTIONS} + ) + install_qt() + + ######################### + #TODO: Make this a function since it is also done by modular scripts! + # e.g. by patching mkspecs/features/qt_tools.prf somehow + file(GLOB_RECURSE PRL_FILES "${CURRENT_PACKAGES_DIR}/lib/*.prl" "${CURRENT_PACKAGES_DIR}/tools/qt5/lib/*.prl" "${CURRENT_PACKAGES_DIR}/tools/qt5/mkspecs/*.pri" + "${CURRENT_PACKAGES_DIR}/debug/lib/*.prl" "${CURRENT_PACKAGES_DIR}/tools/qt5/debug/lib/*.prl" "${CURRENT_PACKAGES_DIR}/tools/qt5/debug/mkspecs/*.pri") + + file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}/include" CMAKE_INCLUDE_PATH) + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + qt_fix_prl("${CURRENT_INSTALLED_DIR}" "${PRL_FILES}") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/plugins) + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + qt_fix_prl("${CURRENT_INSTALLED_DIR}/debug" "${PRL_FILES}") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/qtdeploy.ps1 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/plugins) + endif() + + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) # TODO: check if important debug information for cmake is lost + + #This needs a new VCPKG policy or a static angle build (ANGLE needs to be fixed in VCPKG!) + if(VCPKG_TARGET_IS_WINDOWS AND ${VCPKG_LIBRARY_LINKAGE} MATCHES "static") # Move angle dll libraries + if(EXISTS "${CURRENT_PACKAGES_DIR}/bin") + message(STATUS "Moving ANGLE dlls from /bin to /tools/qt5-angle/bin. In static builds dlls are not allowed in /bin") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/qt5-angle) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/tools/qt5-angle/bin) + if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/bin) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/qt5-angle/debug) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/tools/qt5-angle/debug/bin) + endif() + endif() + endif() + + ## Fix location of qtmain(d).lib. Has been moved into manual-link. Add debug version + set(cmakefile "${CURRENT_PACKAGES_DIR}/share/cmake/Qt5Core/Qt5CoreConfigExtras.cmake") + file(READ "${cmakefile}" _contents) + if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_BUILD_TYPE) + string(REPLACE "set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)" "set_property(TARGET Qt5::WinMain APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE DEBUG)" _contents "${_contents}") + string(REPLACE + [[set(imported_location "${_qt5Core_install_prefix}/lib/qtmain.lib")]] + [[set(imported_location_release "${_qt5Core_install_prefix}/lib/manual-link/qtmain.lib") + set(imported_location_debug "${_qt5Core_install_prefix}/debug/lib/manual-link/qtmaind.lib")]] + _contents "${_contents}") + string(REPLACE +[[ set_target_properties(Qt5::WinMain PROPERTIES + IMPORTED_LOCATION_RELEASE ${imported_location} + )]] +[[ set_target_properties(Qt5::WinMain PROPERTIES + IMPORTED_LOCATION_RELEASE ${imported_location_release} + IMPORTED_LOCATION_DEBUG ${imported_location_debug} + )]] + _contents "${_contents}") + else() # Single configuration build (either debug or release) + # Release case + string(REPLACE + [[set(imported_location "${_qt5Core_install_prefix}/lib/qtmain.lib")]] + [[set(imported_location "${_qt5Core_install_prefix}/lib/manual-link/qtmain.lib")]] + _contents "${_contents}") + # Debug case (whichever will match) + string(REPLACE + [[set(imported_location "${_qt5Core_install_prefix}/lib/qtmaind.lib")]] + [[set(imported_location "${_qt5Core_install_prefix}/debug/lib/manual-link/qtmaind.lib")]] + _contents "${_contents}") + string(REPLACE + [[set(imported_location "${_qt5Core_install_prefix}/debug/lib/qtmaind.lib")]] + [[set(imported_location "${_qt5Core_install_prefix}/debug/lib/manual-link/qtmaind.lib")]] + _contents "${_contents}") + endif() + file(WRITE "${cmakefile}" "${_contents}") + + if(EXISTS ${CURRENT_PACKAGES_DIR}/tools/qt5/bin) + file(COPY ${CURRENT_PACKAGES_DIR}/tools/qt5/bin DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/qt5/bin) + endif() + # This should be removed if possible! (Currently debug build of qt5-translations requires it.) + if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/tools/qt5/bin) + file(COPY ${CURRENT_PACKAGES_DIR}/tools/qt5/bin DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5/debug) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/qt5/debug/bin) + endif() + + if(EXISTS ${CURRENT_PACKAGES_DIR}/tools/qt5/bin/qt.conf) + file(REMOVE "${CURRENT_PACKAGES_DIR}/tools/qt5/bin/qt.conf") + endif() + set(CURRENT_INSTALLED_DIR_BACKUP "${CURRENT_INSTALLED_DIR}") + set(CURRENT_INSTALLED_DIR "./../../.." ) # Making the qt.conf relative and not absolute + configure_file(${CURRENT_PACKAGES_DIR}/tools/qt5/qt_release.conf ${CURRENT_PACKAGES_DIR}/tools/qt5/bin/qt.conf) # This makes the tools at least useable for release + set(CURRENT_INSTALLED_DIR "${CURRENT_INSTALLED_DIR_BACKUP}") + + qt_install_copyright(${SOURCE_PATH}) +endif() +#install scripts for other qt ports +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_port_hashes.cmake + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_port_functions.cmake + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_fix_makefile_install.cmake + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_fix_cmake.cmake + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_fix_prl.cmake + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_download_submodule.cmake + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_build_submodule.cmake + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_install_copyright.cmake + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_submodule_installation.cmake + DESTINATION + ${CURRENT_PACKAGES_DIR}/share/qt5 +) + +# Fix Qt5GuiConfigExtras EGL path +if(VCPKG_TARGET_IS_LINUX) + set(_file "${CURRENT_PACKAGES_DIR}/share/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake") + file(READ "${_file}" _contents) + string(REGEX REPLACE "_qt5gui_find_extra_libs\\\(EGL[^\\\n]+" "_qt5gui_find_extra_libs(EGL \"EGL\" \"\" \"\${_qt5Gui_install_prefix}/include\")\n" _contents "${_contents}") + file(WRITE "${_file}" "${_contents}") +endif() + +if(QT_BUILD_LATEST) + file(COPY + ${CMAKE_CURRENT_LIST_DIR}/cmake/qt_port_hashes_latest.cmake + DESTINATION + ${CURRENT_PACKAGES_DIR}/share/qt5 + ) +endif() + +# #Code to get generated CMake files from CI +# file(RENAME "${CURRENT_PACKAGES_DIR}/share/cmake/Qt5Core/Qt5CoreConfig.cmake" "${CURRENT_BUILDTREES_DIR}/Qt5CoreConfig.cmake.log") +# file(GLOB_RECURSE CMAKE_GUI_FILES "${CURRENT_PACKAGES_DIR}/share/cmake/Qt5Gui/*.cmake" ) +# foreach(cmake_file ${CMAKE_GUI_FILES}) + # get_filename_component(cmake_filename "${cmake_file}" NAME) + # file(COPY "${cmake_file}" DESTINATION "${CURRENT_BUILDTREES_DIR}") + # file(RENAME "${CURRENT_BUILDTREES_DIR}/${cmake_filename}" "${CURRENT_BUILDTREES_DIR}/${cmake_filename}.log") +# endforeach() +# #Copy config.log from buildtree/triplet to buildtree to get the log in CI in case of failure +# if(EXISTS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/config.log") + # file(RENAME "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/config.log" "${CURRENT_BUILDTREES_DIR}/config-rel.log") +# endif() +# if(EXISTS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/config.log") + # file(RENAME "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/config.log" "${CURRENT_BUILDTREES_DIR}/config-dbg.log") +# endif() +# message(FATAL_ERROR "Need Info from CI!") diff --git a/vcpkg/ports/qt5-base/qtdeploy.ps1 b/vcpkg/ports/qt5-base/qtdeploy.ps1 new file mode 100644 index 0000000..5b8e06e --- /dev/null +++ b/vcpkg/ports/qt5-base/qtdeploy.ps1 @@ -0,0 +1,104 @@ +# This script is based on the implementation of windeployqt for qt5.7.1 +# +# Qt's plugin deployment strategy is that each main Qt Module has a hardcoded +# set of plugin subdirectories. Each of these subdirectories is deployed in +# full if that Module is referenced. +# +# This hardcoded list is found inside qttools\src\windeployqt\main.cpp. For +# updating, inspect the symbols qtModuleEntries and qtModuleForPlugin. + +# Note: this function signature and behavior is depended upon by applocal.ps1 +function deployPluginsIfQt([string]$targetBinaryDir, [string]$QtPluginsDir, [string]$targetBinaryName) { + $baseDir = Split-Path $QtPluginsDir -parent + $binDir = "$baseDir\bin" + + function deployPlugins([string]$pluginSubdirName) { + if (Test-Path "$QtPluginsDir\$pluginSubdirName") { + Write-Verbose " Deploying plugins directory '$pluginSubdirName'" + New-Item "$targetBinaryDir\plugins\$pluginSubdirName" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null + Get-ChildItem "$QtPluginsDir\$pluginSubdirName\*.dll" | % { + deployBinary "$targetBinaryDir\plugins\$pluginSubdirName" "$QtPluginsDir\$pluginSubdirName" $_.Name + resolve "$targetBinaryDir\plugins\$pluginSubdirName\$($_.Name)" + } + } else { + Write-Verbose " Skipping plugins directory '$pluginSubdirName': doesn't exist" + } + } + + # We detect Qt modules in use via the DLLs themselves. See qtModuleEntries in Qt to find the mapping. + if ($targetBinaryName -match "Qt5Cored?.dll") { + if (!(Test-Path "$targetBinaryDir\qt.conf")) { + "[Paths]" | Out-File -encoding ascii "$targetBinaryDir\qt.conf" + } + } elseif ($targetBinaryName -match "Qt5Guid?.dll") { + Write-Verbose " Deploying platforms" + New-Item "$targetBinaryDir\plugins\platforms" -ItemType Directory -ErrorAction SilentlyContinue | Out-Null + Get-ChildItem "$QtPluginsDir\platforms\qwindows*.dll" | % { + deployBinary "$targetBinaryDir\plugins\platforms" "$QtPluginsDir\platforms" $_.Name + } + + deployPlugins "accessible" + deployPlugins "imageformats" + deployPlugins "iconengines" + deployPlugins "platforminputcontexts" + deployPlugins "styles" + } elseif ($targetBinaryName -match "Qt5Networkd?.dll") { + deployPlugins "bearer" + if (Test-Path "$binDir\libcrypto-1_1-x64.dll") + { + deployBinary "$targetBinaryDir" "$binDir" "libcrypto-1_1-x64.dll" + deployBinary "$targetBinaryDir" "$binDir" "libssl-1_1-x64.dll" + } + if (Test-Path "$binDir\libcrypto-1_1.dll") + { + deployBinary "$targetBinaryDir" "$binDir" "libcrypto-1_1.dll" + deployBinary "$targetBinaryDir" "$binDir" "libssl-1_1.dll" + } + } elseif ($targetBinaryName -match "Qt5Sqld?.dll") { + deployPlugins "sqldrivers" + } elseif ($targetBinaryName -match "Qt5Multimediad?.dll") { + deployPlugins "audio" + deployPlugins "mediaservice" + deployPlugins "playlistformats" + } elseif ($targetBinaryName -match "Qt5PrintSupportd?.dll") { + deployPlugins "printsupport" + } elseif ($targetBinaryName -match "Qt5Qmld?.dll") { + if(!(Test-Path "$targetBinaryDir\qml")) + { + if (Test-Path "$binDir\..\qml") { + cp -r "$binDir\..\qml" $targetBinaryDir + } elseif (Test-Path "$binDir\..\..\qml") { + cp -r "$binDir\..\..\qml" $targetBinaryDir + } else { + throw "FAILED" + } + } + } elseif ($targetBinaryName -match "Qt5Quickd?.dll") { + foreach ($a in @("Qt5QuickControls2", "Qt5QuickControls2d", "Qt5QuickShapes", "Qt5QuickShapesd", "Qt5QuickTemplates2", "Qt5QuickTemplates2d")) + { + if (Test-Path "$binDir\$a.dll") + { + deployBinary "$targetBinaryDir" "$binDir" "$a.dll" + } + } + deployPlugins "scenegraph" + deployPlugins "qmltooling" + } elseif ($targetBinaryName -like "Qt5Declarative*.dll") { + deployPlugins "qml1tooling" + } elseif ($targetBinaryName -like "Qt5Positioning*.dll") { + deployPlugins "position" + } elseif ($targetBinaryName -like "Qt5Location*.dll") { + deployPlugins "geoservices" + } elseif ($targetBinaryName -like "Qt5Sensors*.dll") { + deployPlugins "sensors" + deployPlugins "sensorgestures" + } elseif ($targetBinaryName -like "Qt5WebEngineCore*.dll") { + deployPlugins "qtwebengine" + } elseif ($targetBinaryName -like "Qt53DRenderer*.dll") { + deployPlugins "sceneparsers" + } elseif ($targetBinaryName -like "Qt5TextToSpeech*.dll") { + deployPlugins "texttospeech" + } elseif ($targetBinaryName -like "Qt5SerialBus*.dll") { + deployPlugins "canbus" + } +} diff --git a/vcpkg/ports/qt5-canvas3d/CONTROL b/vcpkg/ports/qt5-canvas3d/CONTROL new file mode 100644 index 0000000..2da0b47 --- /dev/null +++ b/vcpkg/ports/qt5-canvas3d/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-canvas3d +Version: 0 +Description: Qt5 Canvas 3d Module; +Build-Depends: qt5-base[core] diff --git a/vcpkg/ports/qt5-canvas3d/portfile.cmake b/vcpkg/ports/qt5-canvas3d/portfile.cmake new file mode 100644 index 0000000..14a8cbd --- /dev/null +++ b/vcpkg/ports/qt5-canvas3d/portfile.cmake @@ -0,0 +1,4 @@ +message(FATAL_ERROR "${PORT} has been deprecated and will be removed in the future from VCPKG") +#set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +#include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +#qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-charts/CONTROL b/vcpkg/ports/qt5-charts/CONTROL new file mode 100644 index 0000000..6e3ab62 --- /dev/null +++ b/vcpkg/ports/qt5-charts/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-charts +Version: 5.15.0 +Description: Qt5 Charts Module - UI components for displaying charts, driven by static or dynamic data models +Build-Depends: qt5-base[core], qt5-declarative, qt5-multimedia diff --git a/vcpkg/ports/qt5-charts/portfile.cmake b/vcpkg/ports/qt5-charts/portfile.cmake new file mode 100644 index 0000000..2147267 --- /dev/null +++ b/vcpkg/ports/qt5-charts/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-connectivity/CONTROL b/vcpkg/ports/qt5-connectivity/CONTROL new file mode 100644 index 0000000..aefaea8 --- /dev/null +++ b/vcpkg/ports/qt5-connectivity/CONTROL @@ -0,0 +1,5 @@ +Source: qt5-connectivity +Version: 5.15.0 +Port-Version: 1 +Description: Qt5 Connectivity module - Provides access to Bluetooth and NFC hardware +Build-Depends: qt5-base[core] diff --git a/vcpkg/ports/qt5-connectivity/portfile.cmake b/vcpkg/ports/qt5-connectivity/portfile.cmake new file mode 100644 index 0000000..2cd1cf4 --- /dev/null +++ b/vcpkg/ports/qt5-connectivity/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-datavis3d/CONTROL b/vcpkg/ports/qt5-datavis3d/CONTROL new file mode 100644 index 0000000..9d05c69 --- /dev/null +++ b/vcpkg/ports/qt5-datavis3d/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-datavis3d +Version: 5.15.0 +Description: Qt5 Data Visualization 3d Module - UI Components for creating 3D data visualizations +Build-Depends: qt5-base[core], qt5-declarative, qt5-multimedia diff --git a/vcpkg/ports/qt5-datavis3d/portfile.cmake b/vcpkg/ports/qt5-datavis3d/portfile.cmake new file mode 100644 index 0000000..2147267 --- /dev/null +++ b/vcpkg/ports/qt5-datavis3d/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-declarative/CONTROL b/vcpkg/ports/qt5-declarative/CONTROL new file mode 100644 index 0000000..37b14ec --- /dev/null +++ b/vcpkg/ports/qt5-declarative/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-declarative +Version: 5.15.0 +Description: Qt5 Declarative (Quick 2) Module. Includes QtQuick, QtQuickParticles, QtQuickWidgets, QtQml, and QtPacketProtocol. +Build-Depends: qt5-base[core], qt5-imageformats, qt5-svg diff --git a/vcpkg/ports/qt5-declarative/portfile.cmake b/vcpkg/ports/qt5-declarative/portfile.cmake new file mode 100644 index 0000000..2cd1cf4 --- /dev/null +++ b/vcpkg/ports/qt5-declarative/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-doc/CONTROL b/vcpkg/ports/qt5-doc/CONTROL new file mode 100644 index 0000000..6637877 --- /dev/null +++ b/vcpkg/ports/qt5-doc/CONTROL @@ -0,0 +1,5 @@ +Source: qt5-doc +Version: 5.15.0 +Description: Qt5 doc Module; +Build-Depends: qt5-base[core], qt5-declarative, qt5-quickcontrols2, qt5-tools +Supports: linux \ No newline at end of file diff --git a/vcpkg/ports/qt5-doc/portfile.cmake b/vcpkg/ports/qt5-doc/portfile.cmake new file mode 100644 index 0000000..4f6e684 --- /dev/null +++ b/vcpkg/ports/qt5-doc/portfile.cmake @@ -0,0 +1,7 @@ +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +if(VCPKG_TARGET_IS_WINDOWS) + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + message(STATUS "${PORT} will not build any artifacts on Windows!") +endif() +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-gamepad/CONTROL b/vcpkg/ports/qt5-gamepad/CONTROL new file mode 100644 index 0000000..cc844b3 --- /dev/null +++ b/vcpkg/ports/qt5-gamepad/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-gamepad +Version: 5.15.0 +Description: Qt5 Gamepad Module - Enables Qt applications to support the use of gamepad hardware +Build-Depends: qt5-base[core], qt5-declarative diff --git a/vcpkg/ports/qt5-gamepad/portfile.cmake b/vcpkg/ports/qt5-gamepad/portfile.cmake new file mode 100644 index 0000000..2147267 --- /dev/null +++ b/vcpkg/ports/qt5-gamepad/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-graphicaleffects/CONTROL b/vcpkg/ports/qt5-graphicaleffects/CONTROL new file mode 100644 index 0000000..9313123 --- /dev/null +++ b/vcpkg/ports/qt5-graphicaleffects/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-graphicaleffects +Version: 5.15.0 +Description: Qt5 GraphicalEffects Module. +Build-Depends: qt5-base[core], qt5-declarative diff --git a/vcpkg/ports/qt5-graphicaleffects/portfile.cmake b/vcpkg/ports/qt5-graphicaleffects/portfile.cmake new file mode 100644 index 0000000..d473c56 --- /dev/null +++ b/vcpkg/ports/qt5-graphicaleffects/portfile.cmake @@ -0,0 +1,3 @@ +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-imageformats/CONTROL b/vcpkg/ports/qt5-imageformats/CONTROL new file mode 100644 index 0000000..6cc1b86 --- /dev/null +++ b/vcpkg/ports/qt5-imageformats/CONTROL @@ -0,0 +1,5 @@ +Source: qt5-imageformats +Version: 5.15.0 +Port-Version: 1 +Description: Qt5 Image Formats Module - Plugins for additional image formats: TIFF, MNG, TGA, WBMP +Build-Depends: qt5-base[core], tiff, libwebp, jasper diff --git a/vcpkg/ports/qt5-imageformats/portfile.cmake b/vcpkg/ports/qt5-imageformats/portfile.cmake new file mode 100644 index 0000000..abd88a6 --- /dev/null +++ b/vcpkg/ports/qt5-imageformats/portfile.cmake @@ -0,0 +1,54 @@ +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) + + +list(APPEND CORE_OPTIONS + -system-tiff + -system-webp + -jasper + -no-mng # must be explicitly disabled to not automatically pick up mng + -verbose) + +find_library(TIFF_RELEASE NAMES tiff PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) # Depends on lzma +find_library(TIFF_DEBUG NAMES tiffd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(JPEG_RELEASE NAMES jpeg jpeg-static PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(JPEG_DEBUG NAMES jpeg jpeg-static jpegd jpeg-staticd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(ZLIB_RELEASE NAMES z zlib PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(ZLIB_DEBUG NAMES z zlib zd zlibd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + +find_library(JASPER_RELEASE NAMES jasper PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(JASPER_DEBUG NAMES jasperd jasper libjasperd libjasper PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +if(NOT VCPKG_TARGET_IS_OSX) + find_library(FREEGLUT_RELEASE NAMES freeglut glut PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) + find_library(FREEGLUT_DEBUG NAMES freeglutd freeglut glutd glut PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +endif() + +find_library(WEBP_RELEASE NAMES webp PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(WEBP_DEBUG NAMES webpd webp PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(WEBPDEMUX_RELEASE NAMES webpdemux PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(WEBPDEMUX_DEBUG NAMES webpdemuxd webpdemux PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(WEBPMUX_RELEASE NAMES webpmux libwebpmux PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(WEBPMUX_DEBUG NAMES webpmuxd webpmux libwebpmuxd libwebpmux PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +find_library(WEBPDECODER_RELEASE NAMES webpdecoder libwebpdecoder PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(WEBPDECODER_DEBUG NAMES webpdecoder libwebpdecoder webpdecoderd libwebpdecoderd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) +# Depends on opengl in default build but might depend on giflib, libjpeg-turbo, zlib, libpng, tiff, freeglut (!osx), sdl1 (windows) +# which would require extra libraries to be linked e.g. giflib freeglut sdl1 other ones are already linked + +#Dependent libraries +find_library(LZMA_RELEASE lzma PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) +find_library(LZMA_DEBUG lzmad lzma PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH) + +if(NOT VCPKG_TARGET_IS_WINDOWS) + string(APPEND WEBP_RELEASE " -pthread") + string(APPEND WEBP_DEBUG " -pthread") +endif() + +set(OPT_REL "TIFF_LIBS=${TIFF_RELEASE} ${LZMA_RELEASE} ${JPEG_RELEASE} ${ZLIB_RELEASE}" + "WEBP_LIBS=${WEBPDECODER_RELEASE} ${WEBPDEMUX_RELEASE} ${WEBPMUX_RELEASE} ${WEBP_RELEASE}" + "JASPER_LIBS=${JASPER_RELEASE} ${FREEGLUT_RELEASE} ${JPEG_RELEASE} ${ZLIB_RELEASE}") # This will still fail if LIBWEBP is installed with all available features due to the missing additional dependencies +set(OPT_DBG "TIFF_LIBS=${TIFF_DEBUG} ${LZMA_DEBUG} ${JPEG_DEBUG} ${ZLIB_DEBUG}" + "WEBP_LIBS=${WEBPDECODER_DEBUG} ${WEBPDEMUX_DEBUG} ${WEBPMUX_DEBUG} ${WEBP_DEBUG}" + "JASPER_LIBS=${JASPER_DEBUG} ${FREEGLUT_DEBUG} ${JPEG_DEBUG} ${ZLIB_DEBUG}") +list(APPEND CORE_OPTIONS "WEBP_INCDIR=${CURRENT_INSTALLED_DIR}/include") # Requires libwebp[all] + +qt_submodule_installation(BUILD_OPTIONS ${CORE_OPTIONS} BUILD_OPTIONS_RELEASE ${OPT_REL} BUILD_OPTIONS_DEBUG ${OPT_DBG}) \ No newline at end of file diff --git a/vcpkg/ports/qt5-location/CONTROL b/vcpkg/ports/qt5-location/CONTROL new file mode 100644 index 0000000..64f7035 --- /dev/null +++ b/vcpkg/ports/qt5-location/CONTROL @@ -0,0 +1,5 @@ +Source: qt5-location +Version: 5.15.0 +Port-Version: 2 +Description: Qt5 Location Module - Displays map, navigation, and place content in a QML application. +Build-Depends: qt5-base[core], qt5-declarative, qt5-quickcontrols, qt5-quickcontrols2, qt5-serialport diff --git a/vcpkg/ports/qt5-location/portfile.cmake b/vcpkg/ports/qt5-location/portfile.cmake new file mode 100644 index 0000000..e1be090 --- /dev/null +++ b/vcpkg/ports/qt5-location/portfile.cmake @@ -0,0 +1,10 @@ +vcpkg_download_distfile( + PATCH + URLS "https://codereview.qt-project.org/gitweb?p=qt%2Fqtlocation.git;a=commitdiff_plain;h=6b2cf7e9d150b7be709fcd688c5045949cedc3d9;hp=7769ea903f87efc4ad55530a2749f104eddff2e4" + SHA512 99d16fb0e88a2250de3896815abbb22ff5aa4d3920397610cf37be701fe03a7241e0586aae5b85755aeb958926183c96a0482a8837335d20a2171ebb2a66e640 + FILENAME qt5-location-rename-99d16fb0.patch +) + +message(STATUS "${PORT} has a spurious failure in which it is unable to create a parent directory! Just retry.") +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation(PATCHES "${PATCH}") diff --git a/vcpkg/ports/qt5-macextras/CONTROL b/vcpkg/ports/qt5-macextras/CONTROL new file mode 100644 index 0000000..1d7b4b2 --- /dev/null +++ b/vcpkg/ports/qt5-macextras/CONTROL @@ -0,0 +1,5 @@ +Source: qt5-macextras +Version: 5.15.0 +Description: Qt5 Mac Extras Module. Provides platform-specific APIs for mac. +Build-Depends: qt5-base[core] +Supports: osx \ No newline at end of file diff --git a/vcpkg/ports/qt5-macextras/portfile.cmake b/vcpkg/ports/qt5-macextras/portfile.cmake new file mode 100644 index 0000000..cc2391d --- /dev/null +++ b/vcpkg/ports/qt5-macextras/portfile.cmake @@ -0,0 +1,5 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +if (NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT QT_UPDATE_VERSION) + message(FATAL_ERROR "qt5-macextras only support OSX.") +endif() +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-modularscripts/CONTROL b/vcpkg/ports/qt5-modularscripts/CONTROL new file mode 100644 index 0000000..cff6939 --- /dev/null +++ b/vcpkg/ports/qt5-modularscripts/CONTROL @@ -0,0 +1,3 @@ +Source: qt5-modularscripts +Version: deprecated +Description: now part of qt5-base, formerly vcpkg helpers to package qt5 modules \ No newline at end of file diff --git a/vcpkg/ports/qt5-modularscripts/portfile.cmake b/vcpkg/ports/qt5-modularscripts/portfile.cmake new file mode 100644 index 0000000..0015715 --- /dev/null +++ b/vcpkg/ports/qt5-modularscripts/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) \ No newline at end of file diff --git a/vcpkg/ports/qt5-mqtt/CONTROL b/vcpkg/ports/qt5-mqtt/CONTROL new file mode 100644 index 0000000..c61bb4a --- /dev/null +++ b/vcpkg/ports/qt5-mqtt/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-mqtt +Version: 5.15.0 +Description: Qt5 MQTT module. +Build-Depends: qt5-base[core] diff --git a/vcpkg/ports/qt5-mqtt/portfile.cmake b/vcpkg/ports/qt5-mqtt/portfile.cmake new file mode 100644 index 0000000..571496f --- /dev/null +++ b/vcpkg/ports/qt5-mqtt/portfile.cmake @@ -0,0 +1,22 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +#qt_submodule_installation() No binary package for this port. +if(QT_UPDATE_VERSION) + set(QT_HASH_qt5-mqtt 1) # TO get an SHA512 error if the variable is set. +endif() +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO qt/qtmqtt + REF v${QT_MAJOR_MINOR_VER}.${QT_PATCH_VER} + SHA512 ${QT_HASH_${PORT}} +) + +# qt module builds from a git repository require a .git entry to invoke syncqt +file(WRITE "${SOURCE_PATH}/.git" "repocontent") + +# syncqt is a perl script +vcpkg_find_acquire_program(PERL) +get_filename_component(perl_exe_path ${PERL} DIRECTORY) +vcpkg_add_to_path("${perl_exe_path}") + +qt_build_submodule(${SOURCE_PATH}) +qt_install_copyright(${SOURCE_PATH}) diff --git a/vcpkg/ports/qt5-multimedia/CONTROL b/vcpkg/ports/qt5-multimedia/CONTROL new file mode 100644 index 0000000..be36efe --- /dev/null +++ b/vcpkg/ports/qt5-multimedia/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-multimedia +Version: 5.15.0 +Description: Qt5 Multimedia Module - Classes and widgets for audio, video, radio and camera functionality +Build-Depends: qt5-base[core], qt5-declarative diff --git a/vcpkg/ports/qt5-multimedia/portfile.cmake b/vcpkg/ports/qt5-multimedia/portfile.cmake new file mode 100644 index 0000000..2147267 --- /dev/null +++ b/vcpkg/ports/qt5-multimedia/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-networkauth/CONTROL b/vcpkg/ports/qt5-networkauth/CONTROL new file mode 100644 index 0000000..c97103f --- /dev/null +++ b/vcpkg/ports/qt5-networkauth/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-networkauth +Version: 5.15.0 +Description: Qt5 Network Authorization Module +Build-Depends: qt5-base[core] diff --git a/vcpkg/ports/qt5-networkauth/portfile.cmake b/vcpkg/ports/qt5-networkauth/portfile.cmake new file mode 100644 index 0000000..2147267 --- /dev/null +++ b/vcpkg/ports/qt5-networkauth/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-purchasing/CONTROL b/vcpkg/ports/qt5-purchasing/CONTROL new file mode 100644 index 0000000..e7e82d5 --- /dev/null +++ b/vcpkg/ports/qt5-purchasing/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-purchasing +Version: 5.15.0 +Description: Qt5 Purchasing Module - Enables in-app purchase of products in Qt applications. +Build-Depends: qt5-base[core], qt5-declarative diff --git a/vcpkg/ports/qt5-purchasing/portfile.cmake b/vcpkg/ports/qt5-purchasing/portfile.cmake new file mode 100644 index 0000000..2cd1cf4 --- /dev/null +++ b/vcpkg/ports/qt5-purchasing/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-quickcontrols/CONTROL b/vcpkg/ports/qt5-quickcontrols/CONTROL new file mode 100644 index 0000000..39ba15c --- /dev/null +++ b/vcpkg/ports/qt5-quickcontrols/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-quickcontrols +Version: 5.15.0 +Description: Qt5 QuickControls Module. +Build-Depends: qt5-base[core], qt5-declarative, qt5-graphicaleffects diff --git a/vcpkg/ports/qt5-quickcontrols/portfile.cmake b/vcpkg/ports/qt5-quickcontrols/portfile.cmake new file mode 100644 index 0000000..d473c56 --- /dev/null +++ b/vcpkg/ports/qt5-quickcontrols/portfile.cmake @@ -0,0 +1,3 @@ +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-quickcontrols2/CONTROL b/vcpkg/ports/qt5-quickcontrols2/CONTROL new file mode 100644 index 0000000..96a371e --- /dev/null +++ b/vcpkg/ports/qt5-quickcontrols2/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-quickcontrols2 +Version: 5.15.0 +Description: Qt5 QuickControls2 Module. +Build-Depends: qt5-base[core], qt5-declarative, qt5-imageformats diff --git a/vcpkg/ports/qt5-quickcontrols2/portfile.cmake b/vcpkg/ports/qt5-quickcontrols2/portfile.cmake new file mode 100644 index 0000000..2147267 --- /dev/null +++ b/vcpkg/ports/qt5-quickcontrols2/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-remoteobjects/CONTROL b/vcpkg/ports/qt5-remoteobjects/CONTROL new file mode 100644 index 0000000..bd7596d --- /dev/null +++ b/vcpkg/ports/qt5-remoteobjects/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-remoteobjects +Version: 5.15.0 +Description: Qt5 Remoteobjects module - Provides an easy to use mechanism for sharing a QObject's API (Properties/Signals/Slots) between processes or devices. +Build-Depends: qt5-base[core], qt5-declarative diff --git a/vcpkg/ports/qt5-remoteobjects/portfile.cmake b/vcpkg/ports/qt5-remoteobjects/portfile.cmake new file mode 100644 index 0000000..2cd1cf4 --- /dev/null +++ b/vcpkg/ports/qt5-remoteobjects/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-script/CONTROL b/vcpkg/ports/qt5-script/CONTROL new file mode 100644 index 0000000..318c6af --- /dev/null +++ b/vcpkg/ports/qt5-script/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-script +Version: 5.15.0 +Build-Depends: qt5-base[core], qt5-tools +Description:Qt5 Script Module. diff --git a/vcpkg/ports/qt5-script/portfile.cmake b/vcpkg/ports/qt5-script/portfile.cmake new file mode 100644 index 0000000..2cd1cf4 --- /dev/null +++ b/vcpkg/ports/qt5-script/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-scxml/CONTROL b/vcpkg/ports/qt5-scxml/CONTROL new file mode 100644 index 0000000..89c4fec --- /dev/null +++ b/vcpkg/ports/qt5-scxml/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-scxml +Version: 5.15.0 +Description: Qt5 SCXML Module - Provides classes and tools for creating state machines from SCXML files and embedding them in applications +Build-Depends: qt5-base[core], qt5-declarative diff --git a/vcpkg/ports/qt5-scxml/portfile.cmake b/vcpkg/ports/qt5-scxml/portfile.cmake new file mode 100644 index 0000000..2147267 --- /dev/null +++ b/vcpkg/ports/qt5-scxml/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-sensors/CONTROL b/vcpkg/ports/qt5-sensors/CONTROL new file mode 100644 index 0000000..c9238cd --- /dev/null +++ b/vcpkg/ports/qt5-sensors/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-sensors +Version: 5.15.0 +Description: Qt5 Sensors module - Provides access to sensor hardware and motion gesture recognition. +Build-Depends: qt5-base[core], qt5-declarative diff --git a/vcpkg/ports/qt5-sensors/portfile.cmake b/vcpkg/ports/qt5-sensors/portfile.cmake new file mode 100644 index 0000000..2cd1cf4 --- /dev/null +++ b/vcpkg/ports/qt5-sensors/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-serialbus/CONTROL b/vcpkg/ports/qt5-serialbus/CONTROL new file mode 100644 index 0000000..3fb0e6e --- /dev/null +++ b/vcpkg/ports/qt5-serialbus/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-serialbus +Version: 5.15.0 +Description: Qt5 Serialbus Module; +Build-Depends: qt5-base[core], qt5-serialport diff --git a/vcpkg/ports/qt5-serialbus/portfile.cmake b/vcpkg/ports/qt5-serialbus/portfile.cmake new file mode 100644 index 0000000..d4e611d --- /dev/null +++ b/vcpkg/ports/qt5-serialbus/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() diff --git a/vcpkg/ports/qt5-serialport/CONTROL b/vcpkg/ports/qt5-serialport/CONTROL new file mode 100644 index 0000000..59f2351 --- /dev/null +++ b/vcpkg/ports/qt5-serialport/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-serialport +Version: 5.15.0 +Description: Qt5 Serial Port - provides access to hardware and virtual serial ports +Build-Depends: qt5-base[core] diff --git a/vcpkg/ports/qt5-serialport/portfile.cmake b/vcpkg/ports/qt5-serialport/portfile.cmake new file mode 100644 index 0000000..2147267 --- /dev/null +++ b/vcpkg/ports/qt5-serialport/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-speech/CONTROL b/vcpkg/ports/qt5-speech/CONTROL new file mode 100644 index 0000000..68cf863 --- /dev/null +++ b/vcpkg/ports/qt5-speech/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-speech +Version: 5.15.0 +Description: Qt5 Speech Module +Build-Depends: qt5-base[core], atlmfc (windows), qt5-declarative, qt5-multimedia diff --git a/vcpkg/ports/qt5-speech/portfile.cmake b/vcpkg/ports/qt5-speech/portfile.cmake new file mode 100644 index 0000000..2147267 --- /dev/null +++ b/vcpkg/ports/qt5-speech/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-svg/CONTROL b/vcpkg/ports/qt5-svg/CONTROL new file mode 100644 index 0000000..e51ed4e --- /dev/null +++ b/vcpkg/ports/qt5-svg/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-svg +Version: 5.15.0 +Description: Qt5 SVG Module - provides classes for displaying the contents of SVG files +Build-Depends: qt5-base[core] diff --git a/vcpkg/ports/qt5-svg/portfile.cmake b/vcpkg/ports/qt5-svg/portfile.cmake new file mode 100644 index 0000000..2147267 --- /dev/null +++ b/vcpkg/ports/qt5-svg/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-tools/CONTROL b/vcpkg/ports/qt5-tools/CONTROL new file mode 100644 index 0000000..032db26 --- /dev/null +++ b/vcpkg/ports/qt5-tools/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-tools +Version: 5.15.0 +Description: Qt5 Tools Module; Includes deployment tools and helpers, Qt Designer, Assistant, and other applications +Build-Depends: qt5-base[core], qt5-declarative, qt5-activeqt (windows) diff --git a/vcpkg/ports/qt5-tools/portfile.cmake b/vcpkg/ports/qt5-tools/portfile.cmake new file mode 100644 index 0000000..dcb1216 --- /dev/null +++ b/vcpkg/ports/qt5-tools/portfile.cmake @@ -0,0 +1,7 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) + +qt_submodule_installation() + +if(EXISTS "${CURRENT_INSTALLED_DIR}/plugins/platforms/qminimal${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}") + file(INSTALL "${CURRENT_INSTALLED_DIR}/plugins/platforms/qminimal${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/plugins/platforms") +endif() \ No newline at end of file diff --git a/vcpkg/ports/qt5-translations/CONTROL b/vcpkg/ports/qt5-translations/CONTROL new file mode 100644 index 0000000..4df7420 --- /dev/null +++ b/vcpkg/ports/qt5-translations/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-translations +Version: 5.15.0 +Description: Qt5 translations module +Build-Depends: qt5-base[core], qt5-tools diff --git a/vcpkg/ports/qt5-translations/portfile.cmake b/vcpkg/ports/qt5-translations/portfile.cmake new file mode 100644 index 0000000..d473c56 --- /dev/null +++ b/vcpkg/ports/qt5-translations/portfile.cmake @@ -0,0 +1,3 @@ +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-virtualkeyboard/CONTROL b/vcpkg/ports/qt5-virtualkeyboard/CONTROL new file mode 100644 index 0000000..2a53531 --- /dev/null +++ b/vcpkg/ports/qt5-virtualkeyboard/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-virtualkeyboard +Version: 5.15.0 +Description: Qt5 Virtual Keyboard Module - A framework for implementing different input methods. Supports localized keyboard layouts and custom visual themes +Build-Depends: qt5-svg, qt5-quickcontrols, qt5-multimedia, qt5-quickcontrols diff --git a/vcpkg/ports/qt5-virtualkeyboard/portfile.cmake b/vcpkg/ports/qt5-virtualkeyboard/portfile.cmake new file mode 100644 index 0000000..2147267 --- /dev/null +++ b/vcpkg/ports/qt5-virtualkeyboard/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-wayland/CONTROL b/vcpkg/ports/qt5-wayland/CONTROL new file mode 100644 index 0000000..0063cac --- /dev/null +++ b/vcpkg/ports/qt5-wayland/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-wayland +Version: 5.15.0 +Description: Qt5 wayland Module; +Build-Depends: qt5-base[core] diff --git a/vcpkg/ports/qt5-wayland/portfile.cmake b/vcpkg/ports/qt5-wayland/portfile.cmake new file mode 100644 index 0000000..a9d1698 --- /dev/null +++ b/vcpkg/ports/qt5-wayland/portfile.cmake @@ -0,0 +1,6 @@ +#Will not build on Windows! +message(WARNING "This port is just a placeholder until the required wayland libraries have been added into VCPKG! \ + As such the build will most likely fail until your system has the required wayland libraries installed (untested)") + +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-webchannel/CONTROL b/vcpkg/ports/qt5-webchannel/CONTROL new file mode 100644 index 0000000..ee2bbd2 --- /dev/null +++ b/vcpkg/ports/qt5-webchannel/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-webchannel +Version: 5.15.0 +Description: Qt5 Web Channel module - Provides access to QObject or QML objects from HTML clients for seamless integration of Qt applications with HTML/JavaScript clients. +Build-Depends: qt5-base[core], qt5-declarative diff --git a/vcpkg/ports/qt5-webchannel/portfile.cmake b/vcpkg/ports/qt5-webchannel/portfile.cmake new file mode 100644 index 0000000..2cd1cf4 --- /dev/null +++ b/vcpkg/ports/qt5-webchannel/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-webengine/CONTROL b/vcpkg/ports/qt5-webengine/CONTROL new file mode 100644 index 0000000..a157652 --- /dev/null +++ b/vcpkg/ports/qt5-webengine/CONTROL @@ -0,0 +1,6 @@ +Source: qt5-webengine +Version: 5.15.0 +Port-Version: 1 +Description: Qt5 webengine Module; +Build-Depends: qt5-base[core], qt5-declarative, qt5-location, qt5-quickcontrols, qt5-quickcontrols2, qt5-tools, qt5-webchannel, atlmfc (windows), ffmpeg[core] (!windows) +Supports: !static diff --git a/vcpkg/ports/qt5-webengine/build.patch b/vcpkg/ports/qt5-webengine/build.patch new file mode 100644 index 0000000..ec13b2d --- /dev/null +++ b/vcpkg/ports/qt5-webengine/build.patch @@ -0,0 +1,12 @@ +diff --git a/src/3rdparty/chromium/net/cert/x509_certificate_net_log_param.h b/src/3rdparty/chromium/net/cert/x509_certificate_net_log_param.h +index 22dd9cc14..910149936 100644 +--- a/src/3rdparty/chromium/net/cert/x509_certificate_net_log_param.h ++++ b/src/3rdparty/chromium/net/cert/x509_certificate_net_log_param.h +@@ -6,6 +6,7 @@ + #define NET_CERT_X509_CERTIFICATE_NET_LOG_PARAM_H_ + + #include ++#include + + #include "net/base/net_export.h" + diff --git a/vcpkg/ports/qt5-webengine/common.pri.patch b/vcpkg/ports/qt5-webengine/common.pri.patch new file mode 100644 index 0000000..ad58ab9 --- /dev/null +++ b/vcpkg/ports/qt5-webengine/common.pri.patch @@ -0,0 +1,12 @@ +diff --git a/src/buildtools/config/common.pri b/src/buildtools/config/common.pri +#latest diff --git a/src/buildtools/config/common.pri b/src/buildtools/config/common.pri +index 97d39535c..dc09da43a 100644 +--- a/src/buildtools/config/common.pri ++++ b/src/buildtools/config/common.pri +@@ -57,5 +57,5 @@ + precompile_header { +- gn_args += enable_precompiled_headers=true ++ gn_args += enable_precompiled_headers=false + } else { + gn_args += enable_precompiled_headers=false + } diff --git a/vcpkg/ports/qt5-webengine/gl.patch b/vcpkg/ports/qt5-webengine/gl.patch new file mode 100644 index 0000000..a48ddf6 --- /dev/null +++ b/vcpkg/ports/qt5-webengine/gl.patch @@ -0,0 +1,13 @@ +diff --git a/src/3rdparty/chromium/ui/gl/gl_bindings_autogen_gl.h b/src/3rdparty/chromium/ui/gl/gl_bindings_autogen_gl.h +index d54583e8b..1921185f8 100644 +--- a/src/3rdparty/chromium/ui/gl/gl_bindings_autogen_gl.h ++++ b/src/3rdparty/chromium/ui/gl/gl_bindings_autogen_gl.h +@@ -16,7 +16,7 @@ + namespace gl { + + class GLContext; +- ++typedef void *GLeglImageOES; + typedef void(GL_BINDING_CALL* glActiveShaderProgramProc)(GLuint pipeline, + GLuint program); + typedef void(GL_BINDING_CALL* glActiveTextureProc)(GLenum texture); diff --git a/vcpkg/ports/qt5-webengine/portfile.cmake b/vcpkg/ports/qt5-webengine/portfile.cmake new file mode 100644 index 0000000..611a3c7 --- /dev/null +++ b/vcpkg/ports/qt5-webengine/portfile.cmake @@ -0,0 +1,48 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) +#set(VCPKG_BUILD_TYPE release) #You probably want to set this to reduce build type and space requirements +message(STATUS "${PORT} requires a lot of free disk space (>300GB), ram (>32 GB) and time (>4h per configuration) to be successfully build.\n\ +-- As such ${PORT} is not properly tested.\n\ +-- If ${PORT} fails post build validation please open up an issue. \n\ +-- If it fails due to post validation the successfully installed files can be found in ${CURRENT_PACKAGES_DIR} \n\ +-- and just need to be copied into ${CURRENT_INSTALLED_DIR}") +if(NOT VCPKG_TARGET_IS_WINDOWS) + message(STATUS "If ${PORT} directly fails ${PORT} might require additional prerequisites on Linux and OSX. Please check the configure logs.\n") +endif() +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) + +vcpkg_find_acquire_program(FLEX) +vcpkg_find_acquire_program(BISON) +vcpkg_find_acquire_program(GPERF) +vcpkg_find_acquire_program(PYTHON2) +vcpkg_find_acquire_program(NINJA) +get_filename_component(FLEX_DIR "${FLEX}" DIRECTORY ) +get_filename_component(BISON_DIR "${BISON}" DIRECTORY ) +get_filename_component(PYTHON2_DIR "${PYTHON2}" DIRECTORY ) +get_filename_component(GPERF_DIR "${GPERF}" DIRECTORY ) +get_filename_component(NINJA_DIR "${NINJA}" DIRECTORY ) + +if(WIN32) # WIN32 HOST probably has win_flex and win_bison! + if(NOT EXISTS "${FLEX_DIR}/flex${VCPKG_HOST_EXECUTABLE_SUFFIX}") + file(CREATE_LINK "${FLEX}" "${FLEX_DIR}/flex${VCPKG_HOST_EXECUTABLE_SUFFIX}") + endif() + if(NOT EXISTS "${BISON_DIR}/BISON${VCPKG_HOST_EXECUTABLE_SUFFIX}") + file(CREATE_LINK "${BISON}" "${BISON_DIR}/bison${VCPKG_HOST_EXECUTABLE_SUFFIX}") + endif() +endif() + +vcpkg_add_to_path(PREPEND "${FLEX_DIR}") +vcpkg_add_to_path(PREPEND "${BISON_DIR}") +vcpkg_add_to_path(PREPEND "${PYTHON2_DIR}") +vcpkg_add_to_path(PREPEND "${GPERF_DIR}") +vcpkg_add_to_path(PREPEND "${NINJA_DIR}") + +set(PATCHES common.pri.patch + gl.patch + build.patch + vs2017.patch) + +if(NOT VCPKG_TARGET_IS_WINDOWS) + list(APPEND CORE_OPTIONS "BUILD_OPTIONS" "-webengine-system-libwebp" "-webengine-system-ffmpeg" "-webengine-system-icu") +endif() + +qt_submodule_installation(${CORE_OPTIONS} PATCHES ${PATCHES}) diff --git a/vcpkg/ports/qt5-webengine/vs2017.patch b/vcpkg/ports/qt5-webengine/vs2017.patch new file mode 100644 index 0000000..07eb79e --- /dev/null +++ b/vcpkg/ports/qt5-webengine/vs2017.patch @@ -0,0 +1,12 @@ +diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/systrace/systrace_trace_parser.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/systrace/systrace_trace_parser.cc +index 33d5cb1f6f6..1ba53aee4b3 100644 +--- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/systrace/systrace_trace_parser.cc ++++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/systrace/systrace_trace_parser.cc +@@ -26,6 +26,7 @@ + #include "src/trace_processor/slice_tracker.h" + #include "src/trace_processor/track_tracker.h" + ++#include + #include + #include + #include diff --git a/vcpkg/ports/qt5-webglplugin/CONTROL b/vcpkg/ports/qt5-webglplugin/CONTROL new file mode 100644 index 0000000..a88cf34 --- /dev/null +++ b/vcpkg/ports/qt5-webglplugin/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-webglplugin +Version: 5.15.0 +Description: Qt5 webglplugin Module; +Build-Depends: qt5-base[core] diff --git a/vcpkg/ports/qt5-webglplugin/portfile.cmake b/vcpkg/ports/qt5-webglplugin/portfile.cmake new file mode 100644 index 0000000..d473c56 --- /dev/null +++ b/vcpkg/ports/qt5-webglplugin/portfile.cmake @@ -0,0 +1,3 @@ +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-websockets/CONTROL b/vcpkg/ports/qt5-websockets/CONTROL new file mode 100644 index 0000000..a3f54c4 --- /dev/null +++ b/vcpkg/ports/qt5-websockets/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-websockets +Version: 5.15.0 +Description: Qt5 Web Sockets Module - provides WebSocket communication compliant with RFC 6455 +Build-Depends: qt5-base[core], qt5-declarative diff --git a/vcpkg/ports/qt5-websockets/portfile.cmake b/vcpkg/ports/qt5-websockets/portfile.cmake new file mode 100644 index 0000000..2147267 --- /dev/null +++ b/vcpkg/ports/qt5-websockets/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-webview/CONTROL b/vcpkg/ports/qt5-webview/CONTROL new file mode 100644 index 0000000..bffc35c --- /dev/null +++ b/vcpkg/ports/qt5-webview/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-webview +Version: 5.15.0 +Description: Qt5 WebView module - Provides a way to display web content in a QML application without necessarily including a full web browser stack by using native APIs where it makes sense. +Build-Depends: qt5-declarative diff --git a/vcpkg/ports/qt5-webview/portfile.cmake b/vcpkg/ports/qt5-webview/portfile.cmake new file mode 100644 index 0000000..2cd1cf4 --- /dev/null +++ b/vcpkg/ports/qt5-webview/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-winextras/CONTROL b/vcpkg/ports/qt5-winextras/CONTROL new file mode 100644 index 0000000..ecf1113 --- /dev/null +++ b/vcpkg/ports/qt5-winextras/CONTROL @@ -0,0 +1,5 @@ +Source: qt5-winextras +Version: 5.15.0 +Description: Qt5 Windows Extras Module. Provides platform-specific APIs for Windows. +Build-Depends: qt5-base[core], atlmfc (windows), qt5-declarative, qt5-multimedia +Supports: windows diff --git a/vcpkg/ports/qt5-winextras/portfile.cmake b/vcpkg/ports/qt5-winextras/portfile.cmake new file mode 100644 index 0000000..69c3adb --- /dev/null +++ b/vcpkg/ports/qt5-winextras/portfile.cmake @@ -0,0 +1,5 @@ +if (NOT VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "qt5-winextras only support Windows.") +endif() +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() diff --git a/vcpkg/ports/qt5-x11extras/CONTROL b/vcpkg/ports/qt5-x11extras/CONTROL new file mode 100644 index 0000000..93ae3cd --- /dev/null +++ b/vcpkg/ports/qt5-x11extras/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-x11extras +Version: 5.15.0 +Description: Qt5 x11extras Module; +Build-Depends: qt5-base[core] diff --git a/vcpkg/ports/qt5-x11extras/portfile.cmake b/vcpkg/ports/qt5-x11extras/portfile.cmake new file mode 100644 index 0000000..2147267 --- /dev/null +++ b/vcpkg/ports/qt5-x11extras/portfile.cmake @@ -0,0 +1,2 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() \ No newline at end of file diff --git a/vcpkg/ports/qt5-xmlpatterns/CONTROL b/vcpkg/ports/qt5-xmlpatterns/CONTROL new file mode 100644 index 0000000..d894087 --- /dev/null +++ b/vcpkg/ports/qt5-xmlpatterns/CONTROL @@ -0,0 +1,4 @@ +Source: qt5-xmlpatterns +Version: 5.15.0 +Description: Qt5 XML Patterns Module - Support for XPath, XQuery, XSLT and XML schema validation +Build-Depends: qt5-base[core], qt5-declarative diff --git a/vcpkg/ports/qt5-xmlpatterns/portfile.cmake b/vcpkg/ports/qt5-xmlpatterns/portfile.cmake new file mode 100644 index 0000000..fdbfa8d --- /dev/null +++ b/vcpkg/ports/qt5-xmlpatterns/portfile.cmake @@ -0,0 +1,5 @@ +include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake) +qt_submodule_installation() +if(EXISTS "${CURRENT_INSTALLED_DIR}/plugins/platforms/qminimal${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}") + file(INSTALL "${CURRENT_INSTALLED_DIR}/plugins/platforms/qminimal${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/plugins/platforms") +endif() \ No newline at end of file diff --git a/vcpkg/ports/qt5/CONTROL b/vcpkg/ports/qt5/CONTROL new file mode 100644 index 0000000..928cc36 --- /dev/null +++ b/vcpkg/ports/qt5/CONTROL @@ -0,0 +1,163 @@ +Source: qt5 +Version: 5.15.0 +Port-Version: 2 +Homepage: https://www.qt.io/ +Description: Qt5 Application Framework +Build-Depends: qt5-base[core] +Default-Features: essentials + +Feature: essentials +Build-Depends: qt5[core, tools, networkauth, quickcontrols2, multimedia, imageformats, declarative, svg, activeqt] +Description: Build the essential qt modules + +Feature: latest +Build-Depends: qt5-base[core, latest] +Description: Build latest qt version (5.14.2) instead of LTS + +Feature: all +Build-Depends: qt5[3d, webchannel, websockets, extras, xmlpatterns, sensors, serialport, speech, svg, tools, virtualkeyboard, networkauth, purchasing, quickcontrols, quickcontrols2, script, scxml, activeqt, charts, datavis3d, declarative, gamepad, graphicaleffects, imageformats, location, multimedia, mqtt, webglplugin, webview, serialbus, translations, doc, remoteobjects, connectivity], qt5[core,webengine] (!static), qt5[core,wayland] (!windows) +Description: Install all Qt5 submodules (Warning: Could take a long time and fail...) + +Feature: extras +Build-Depends: qt5-winextras (windows), qt5-macextras (osx), qt5-x11extras (linux), qt5-androidextras (android) +Description: + +Feature: 3d +Build-Depends: qt5-3d +Description: + +Feature: webchannel +Build-Depends: qt5-webchannel +Description: + +Feature: websockets +Build-Depends: qt5-websockets +Description: + +Feature: xmlpatterns +Build-Depends: qt5-xmlpatterns +Description: (deprecated) + +Feature: sensors +Build-Depends: qt5-sensors +Description: + +Feature: serialport +Build-Depends: qt5-serialport +Description: + +Feature: speech +Build-Depends: qt5-speech +Description: + +Feature: svg +Build-Depends: qt5-svg +Description: + +Feature: tools +Build-Depends: qt5-tools +Description: + +Feature: virtualkeyboard +Build-Depends: qt5-virtualkeyboard +Description: + +Feature: networkauth +Build-Depends: qt5-networkauth +Description: + +Feature: purchasing +Build-Depends: qt5-purchasing +Description: + +Feature: quickcontrols +Build-Depends: qt5-quickcontrols +Description: (deprecated) + +Feature: quickcontrols2 +Build-Depends: qt5-quickcontrols2 +Description: + +Feature: script +Build-Depends: qt5-script +Description: (deprecated) + +Feature: scxml +Build-Depends: qt5-scxml +Description: + +Feature: activeqt +Build-Depends: qt5-activeqt (windows) +Description: Windows Only + +Feature: charts +Build-Depends: qt5-charts +Description: + +Feature: datavis3d +Build-Depends: qt5-datavis3d +Description: + +Feature: declarative +Build-Depends: qt5-declarative +Description: + +Feature: gamepad +Build-Depends: qt5-gamepad +Description: + +Feature: graphicaleffects +Build-Depends: qt5-graphicaleffects +Description: + +Feature: imageformats +Build-Depends: qt5-imageformats +Description: + +Feature: location +Build-Depends: qt5-location +Description: + +Feature: multimedia +Build-Depends: qt5-multimedia +Description: + +Feature: mqtt +Build-Depends: qt5-mqtt +Description: + +Feature: webglplugin +Build-Depends: qt5-webglplugin +Description: + +Feature: webview +Build-Depends: qt5-webview +Description: + +Feature: wayland +Build-Depends: qt5-wayland +Description: + +Feature: webengine +Build-Depends: qt5-webengine +Description: + +Feature: serialbus +Build-Depends: qt5-serialbus +Description: + +Feature: translations +Build-Depends: qt5-translations +Description: + +Feature: doc +Build-Depends: qt5-doc +Description: + +Feature: remoteobjects +Build-Depends: qt5-remoteobjects +Description: + +Feature: connectivity +Build-Depends: qt5-connectivity +Description: diff --git a/vcpkg/ports/qt5/portfile.cmake b/vcpkg/ports/qt5/portfile.cmake new file mode 100644 index 0000000..cc6e26f --- /dev/null +++ b/vcpkg/ports/qt5/portfile.cmake @@ -0,0 +1 @@ +SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/vcpkg/ports/qtkeychain/CONTROL b/vcpkg/ports/qtkeychain/CONTROL new file mode 100644 index 0000000..2e019cc --- /dev/null +++ b/vcpkg/ports/qtkeychain/CONTROL @@ -0,0 +1,4 @@ +Source: qtkeychain +Version: v0.9.1-1 +Description: qtkeychain - Platform-independent Qt API for storing passwords securely +Build-Depends: qt5-base[core], qt5-tools \ No newline at end of file diff --git a/vcpkg/ports/qtkeychain/portfile.cmake b/vcpkg/ports/qtkeychain/portfile.cmake new file mode 100644 index 0000000..5bbe14d --- /dev/null +++ b/vcpkg/ports/qtkeychain/portfile.cmake @@ -0,0 +1,43 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO frankosterfeld/qtkeychain + REF v0.9.1 + SHA512 c80bd25a5b72c175d0d4a985b952924c807bf67be33eeb89e2b83757727e642c10d8d737cea9744d2faad74c50c1b55d82b306135559c35c91a088c3b198b33a + HEAD_REF master +) + +list(APPEND QTKEYCHAIN_OPTIONS -DCMAKE_DEBUG_POSTFIX=d) +list(APPEND QTKEYCHAIN_OPTIONS -DBUILD_TEST_APPLICATION:BOOL=OFF) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + list(APPEND QTKEYCHAIN_OPTIONS -DQTKEYCHAIN_STATIC:BOOL=ON) +else() + list(APPEND QTKEYCHAIN_OPTIONS -DQTKEYCHAIN_STATIC:BOOL=OFF) +endif() + +if (CMAKE_HOST_WIN32) + list(APPEND QTKEYCHAIN_OPTIONS -DBUILD_TRANSLATIONS:BOOL=ON) +else() + list(APPEND QTKEYCHAIN_OPTIONS -DBUILD_TRANSLATIONS:BOOL=OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS ${QTKEYCHAIN_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +# Remove unneeded dirs +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/lib/cmake + ${CURRENT_PACKAGES_DIR}/lib/cmake +) + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/qtkeychain) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/qtkeychain/COPYING ${CURRENT_PACKAGES_DIR}/share/qtkeychain/copyright) diff --git a/vcpkg/ports/quadtree/CONTROL b/vcpkg/ports/quadtree/CONTROL new file mode 100644 index 0000000..320590b --- /dev/null +++ b/vcpkg/ports/quadtree/CONTROL @@ -0,0 +1,4 @@ +Source: quadtree +Version: 2020-04-13 +Description: A simple and modern C++ quadtree implementation +Homepage: https://github.com/pvigier/Quadtree \ No newline at end of file diff --git a/vcpkg/ports/quadtree/portfile.cmake b/vcpkg/ports/quadtree/portfile.cmake new file mode 100644 index 0000000..01e6b37 --- /dev/null +++ b/vcpkg/ports/quadtree/portfile.cmake @@ -0,0 +1,19 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO pvigier/Quadtree + REF fec2e1a011f656353ba12c58cefe33482e1a27b5 + SHA512 8291afb29b9ff5714125e411122f6f10e1c2e4c2109384e25afa834548dc1f63c90b2d09c7cfed213ad69a8c54cf32fc598783b3ff0882bc86562594895d5c35 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DCODE_COVERAGE=OFF + -DBUILD_BENCHMARKS=OFF + -DBUILD_TESTING=OFF + -DBUILD_EXAMPLES=OFF +) + +file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/quantlib/CONTROL b/vcpkg/ports/quantlib/CONTROL new file mode 100644 index 0000000..50c0063 --- /dev/null +++ b/vcpkg/ports/quantlib/CONTROL @@ -0,0 +1,5 @@ +Source: quantlib +Version: 2019-09-02 +Description: The QuantLib C++ library +Homepage: https://www.quantlib.org/ +Build-Depends: boost-accumulators, boost-algorithm, boost-any, boost-array, boost-assert, boost-assign, boost-atomic, boost-bind, boost-config, boost-core, boost-date-time, boost-dynamic-bitset, boost-format, boost-function, boost-functional, boost-iterator, boost-lexical-cast, boost-math, boost-multi-array, boost-multiprecision, boost-optional, boost-preprocessor, boost-random, boost-serialization, boost-signals2, boost-smart-ptr, boost-thread, boost-tuple, boost-type-traits, boost-ublas, boost-unordered, boost-utility diff --git a/vcpkg/ports/quantlib/disable-examples-tests.patch b/vcpkg/ports/quantlib/disable-examples-tests.patch new file mode 100644 index 0000000..b42e0bc --- /dev/null +++ b/vcpkg/ports/quantlib/disable-examples-tests.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d046251cc..d8201bf6a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -44,8 +44,6 @@ if (Boost_FOUND) + endif (Boost_FOUND) + + add_subdirectory(ql) +-add_subdirectory(Examples) +-add_subdirectory(test-suite) + + # + # Copy across the ANSI config file into the build directory. Users diff --git a/vcpkg/ports/quantlib/portfile.cmake b/vcpkg/ports/quantlib/portfile.cmake new file mode 100644 index 0000000..7894bbb --- /dev/null +++ b/vcpkg/ports/quantlib/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lballabio/QuantLib + REF f09141b5cce9134c0bcdbaf36e81359e6ba30705 + SHA512 d4b19d33594a7072a0d90b7eac3d74fb27c526269713a9223b84c0451b1e06a58f0c98350305d68a55086d1971260ff249049112aaadea59397ec195a3291490 + HEAD_REF master + PATCHES + disable-examples-tests.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" USE_BOOST_DYNAMIC_LIBRARIES) + +set(QL_MSVC_RUNTIME ${VCPKG_LIBRARY_LINKAGE}) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +# TODO: Fix it in the upstream +vcpkg_replace_string( + "${SOURCE_PATH}/ql/userconfig.hpp" + "//# define QL_USE_STD_UNIQUE_PTR" + "# define QL_USE_STD_UNIQUE_PTR" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DUSE_BOOST_DYNAMIC_LIBRARIES=${USE_BOOST_DYNAMIC_LIBRARIES} + -DMSVC_RUNTIME=${QL_MSVC_RUNTIME} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE.TXT ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/quaternions/CONTROL b/vcpkg/ports/quaternions/CONTROL new file mode 100644 index 0000000..cc5fd65 --- /dev/null +++ b/vcpkg/ports/quaternions/CONTROL @@ -0,0 +1,5 @@ +Source: quaternions +Version: 1.0.0 +Description: A C++11 library to work with quaternions, as a single header file. +Homepage: https://github.com/ferd36/quaternions +Build-Depends: boost-mpl diff --git a/vcpkg/ports/quaternions/portfile.cmake b/vcpkg/ports/quaternions/portfile.cmake new file mode 100644 index 0000000..2613abe --- /dev/null +++ b/vcpkg/ports/quaternions/portfile.cmake @@ -0,0 +1,12 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ferd36/quaternions + REF 68fc6c7fb392b1a920779d80bb75879263329ff5 + SHA512 b7b934a493645e9c9ec04d581d2e5af57298325086919c20fbaa13df264c16cb5a0e380042cf5a0cfddbf142c82e5da63b84e8f2bc90615b1eccad83a1c9df88 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/quazip/CONTROL b/vcpkg/ports/quazip/CONTROL new file mode 100644 index 0000000..853be24 --- /dev/null +++ b/vcpkg/ports/quazip/CONTROL @@ -0,0 +1,5 @@ +Source: quazip +Version: 0.9.1 +Homepage: https://stachenov.github.io/quazip/ +Description: Qt/C++ wrapper over minizip +Build-Depends: qt5-base, zlib diff --git a/vcpkg/ports/quazip/portfile.cmake b/vcpkg/ports/quazip/portfile.cmake new file mode 100644 index 0000000..4c8602b --- /dev/null +++ b/vcpkg/ports/quazip/portfile.cmake @@ -0,0 +1,20 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO stachenov/quazip + REF v0.9.1 + SHA512 db31f3c7e3d7e95c25090ceb8379643e0b49ed69ece009dd015bee120b2b60f42e73408f580caed3138fa19ca64dcd23a05f16435abb54e2b8df21105c7b42c0 + PATCHES + vcpkg_remove_extra_static.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/QuaZip5/) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/quazip/vcpkg_remove_extra_static.patch b/vcpkg/ports/quazip/vcpkg_remove_extra_static.patch new file mode 100644 index 0000000..e600424 --- /dev/null +++ b/vcpkg/ports/quazip/vcpkg_remove_extra_static.patch @@ -0,0 +1,30 @@ +diff --git a/quazip/CMakeLists.txt b/quazip/CMakeLists.txt +index 1efb5e2..2412b8a 100644 +--- a/quazip/CMakeLists.txt ++++ b/quazip/CMakeLists.txt +@@ -10,22 +10,13 @@ ADD_DEFINITIONS(-DQUAZIP_BUILD) + qt_wrap_cpp(MOC_SRCS ${PUBLIC_HEADERS}) + set(SRCS ${SRCS} ${MOC_SRCS}) + +-add_library(${QUAZIP_LIB_TARGET_NAME} SHARED ${SRCS}) +-add_library(quazip_static STATIC ${SRCS}) +- +-# Windows uses .lib extension for both static and shared library +-# *nix systems use different extensions for SHARED and STATIC library and by convention both libraries have the same name +-if (NOT WIN32) +- set_target_properties(quazip_static PROPERTIES OUTPUT_NAME quazip${QUAZIP_LIB_VERSION_SUFFIX}) +-endif () ++add_library(${QUAZIP_LIB_TARGET_NAME} ${SRCS}) + + target_include_directories(${QUAZIP_LIB_TARGET_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${ZLIB_INCLUDE_DIRS}) +-target_include_directories(quazip_static PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${ZLIB_INCLUDE_DIRS}) +-set_target_properties(${QUAZIP_LIB_TARGET_NAME} quazip_static PROPERTIES VERSION ${QUAZIP_LIB_VERSION} SOVERSION ${QUAZIP_LIB_SOVERSION} DEBUG_POSTFIX d) ++set_target_properties(${QUAZIP_LIB_TARGET_NAME} PROPERTIES VERSION ${QUAZIP_LIB_VERSION} SOVERSION ${QUAZIP_LIB_SOVERSION} DEBUG_POSTFIX d) + + # Link against ZLIB_LIBRARIES if needed (on Windows this variable is empty) + target_link_libraries(${QUAZIP_LIB_TARGET_NAME} ${QT_QTMAIN_LIBRARY} ${QTCORE_LIBRARIES} ${ZLIB_LIBRARIES}) +-target_link_libraries(quazip_static ${QT_QTMAIN_LIBRARY} ${QTCORE_LIBRARIES} ${ZLIB_LIBRARIES}) + + install(FILES ${PUBLIC_HEADERS} DESTINATION include/quazip${QUAZIP_LIB_VERSION_SUFFIX}) +-install(TARGETS ${QUAZIP_LIB_TARGET_NAME} quazip_static LIBRARY DESTINATION ${LIB_DESTINATION} ARCHIVE DESTINATION ${LIB_DESTINATION} RUNTIME DESTINATION ${LIB_DESTINATION}) ++install(TARGETS ${QUAZIP_LIB_TARGET_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) diff --git a/vcpkg/ports/quickfast/00001-fix-boost-asio.patch b/vcpkg/ports/quickfast/00001-fix-boost-asio.patch new file mode 100644 index 0000000..13a4cfa --- /dev/null +++ b/vcpkg/ports/quickfast/00001-fix-boost-asio.patch @@ -0,0 +1,39 @@ +diff --git a/src/Common/QuickFASTPch.h b/src/Common/QuickFASTPch.h +index 3574df8..c4ef4e1 100644 +--- a/src/Common/QuickFASTPch.h ++++ b/src/Common/QuickFASTPch.h +@@ -32,7 +32,7 @@ + #include + + // If building for .NET, must link boost threads dynamically +-#define BOOST_THREAD_USE_DLL ++// #define BOOST_THREAD_USE_DLL + // This reports at compile time which boost libraries will be used + // #define BOOST_LIB_DIAGNOSTIC + +diff --git a/src/Communication/AsioService.h b/src/Communication/AsioService.h +index 4f61915..96f2198 100644 +--- a/src/Communication/AsioService.h ++++ b/src/Communication/AsioService.h +@@ -99,6 +99,7 @@ namespace QuickFAST + { + return ioService_; + } ++ boost::asio::io_service::executor_type get_executor() BOOST_ASIO_NOEXCEPT { return ioService_.get_executor();} + + ///@brief Post a completion handler for later processing (usually in a different thread) + /// @param handler is the handler to be posted +diff --git a/src/Communication/AsioService_fwd.h b/src/Communication/AsioService_fwd.h +index dc2f235..6ad5e68 100644 +--- a/src/Communication/AsioService_fwd.h ++++ b/src/Communication/AsioService_fwd.h +@@ -17,7 +17,8 @@ namespace boost + { + namespace asio + { +- class io_service; ++ class io_context; ++ typedef io_context io_service; + } + } + diff --git a/vcpkg/ports/quickfast/CMakeLists.txt b/vcpkg/ports/quickfast/CMakeLists.txt new file mode 100644 index 0000000..2464b6a --- /dev/null +++ b/vcpkg/ports/quickfast/CMakeLists.txt @@ -0,0 +1,54 @@ +cmake_minimum_required(VERSION 3.13) +project(quickfast CXX) + +option(BUILD_SHARED_LIBS "Build shared instead of static library" ON) + +find_package(Boost REQUIRED COMPONENTS thread) +find_package(XercesC REQUIRED) + +file(GLOB SOURCES + quickfast/Application/*.cpp + quickfast/Common/*.cpp + quickfast/Codecs/*.cpp + quickfast/Communication/*.cpp + quickfast/Messages/*.cpp +) + +file(GLOB HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + quickfast/Application/*.h + quickfast/Common/*.h + quickfast/Codecs/*.h + quickfast/Communication/*.h + quickfast/Messages/*.h +) + +if(BUILD_SHARED_LIBS) + add_library(quickfast SHARED ${HEADERS} ${SOURCES}) + target_compile_definitions(quickfast PRIVATE -DQUICKFAST_BUILD_DLL) +else() + add_library(quickfast STATIC ${HEADERS} ${SOURCES}) + target_compile_definitions(quickfast PUBLIC -DQUICKFAST_HAS_DLL=0) +endif() + +target_include_directories(quickfast PUBLIC + $ + $ + $ +) + +target_link_libraries(quickfast PRIVATE + ${Boost_LIBRARIES} + XercesC::XercesC +) + +install(TARGETS quickfast EXPORT quickfast-config + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) +install(EXPORT quickfast-config DESTINATION share/cmake/quickfast) + +foreach (HEADER ${HEADERS} ) + get_filename_component(HEADER_DIR ${HEADER} DIRECTORY) + install(FILES ${HEADER} DESTINATION include/${HEADER_DIR}) +endforeach() diff --git a/vcpkg/ports/quickfast/CONTROL b/vcpkg/ports/quickfast/CONTROL new file mode 100644 index 0000000..6f0ff52 --- /dev/null +++ b/vcpkg/ports/quickfast/CONTROL @@ -0,0 +1,5 @@ +Source: quickfast +Version: 1.5 +Build-Depends: boost-asio, xerces-c +Homepage: https://github.com/objectcomputing/quickfast +Description: QuickFAST is an Open Source native C++ implementation of the FAST Protocol [SM]. diff --git a/vcpkg/ports/quickfast/portfile.cmake b/vcpkg/ports/quickfast/portfile.cmake new file mode 100644 index 0000000..7f3f6b8 --- /dev/null +++ b/vcpkg/ports/quickfast/portfile.cmake @@ -0,0 +1,50 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO objectcomputing/quickfast + REF V1_5 + SHA512 f224ffbe0ee1b84616b46d536d27da01346103cf9ed135a87543da51e8e979ec3735e08ece8525ee1316ea323d41dcacc4d44eabe2e033d68f93432ea43d1ce9 + HEAD_REF master + PATCHES 00001-fix-boost-asio.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +if(NOT EXISTS "${SOURCE_PATH}/quickfast") + file(RENAME ${SOURCE_PATH}/src ${SOURCE_PATH}/quickfast) +endif() + +file(GLOB_RECURSE SRC_FILES "${SOURCE_PATH}/quickfast/*.cpp" "${SOURCE_PATH}/quickfast/*.h") +foreach(SRC_FILE IN LISTS SRC_FILES) + file(READ "${SRC_FILE}" _contents) + string(REPLACE "#include ) + + set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${quickfix_VERSION} SOVERSION ${quickfix_VERSION_MAJOR} ) ++target_compile_definitions(${PROJECT_NAME} PUBLIC HAVE_STD_UNIQUE_PTR HAVE_STD_SHARED_PTR HAVE_SSL=1) + +-install(TARGETS ${PROJECT_NAME} DESTINATION lib) ++install(TARGETS ${PROJECT_NAME} EXPORT quickfix-config DESTINATION lib) + install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/C++/ DESTINATION include/quickfix + FILES_MATCHING PATTERN "*.h" + PATTERN double-conversion EXCLUDE + PATTERN test EXCLUDE) ++install(EXPORT quickfix-config DESTINATION share/cmake/quickfix) +diff --git a/src/C++/Utility.h b/src/C++/Utility.h +index 0aa2cd3e..2829e110 100644 +--- a/src/C++/Utility.h ++++ b/src/C++/Utility.h +@@ -242,4 +242,10 @@ using std::strtol; + using std::strerror; + #endif + ++#ifdef __cpp_noexcept_function_type ++#define QUICKFIX_THROW(...) noexcept(false) ++#else ++#define QUICKFIX_THROW(...) throw(__VA_ARGS__) ++#endif ++ + #endif +diff --git a/src/C++/UtilitySSL.cpp b/src/C++/UtilitySSL.cpp +index a01606ac..aee41bbf 100644 +--- a/src/C++/UtilitySSL.cpp ++++ b/src/C++/UtilitySSL.cpp +@@ -498,7 +498,11 @@ static void ssl_rand_seed(void) + /* + * seed in the current process id (usually just 4 bytes) + */ ++#ifdef _MSC_VER ++ pid = GetCurrentProcessId(); ++#else + pid = getpid(); ++#endif + l = sizeof(pid); + RAND_seed((unsigned char *)&pid, l); + /* +diff --git a/src/C++/double-conversion/utils.h b/src/C++/double-conversion/utils.h +index aef2f166..779b8ab7 100644 +--- a/src/C++/double-conversion/utils.h ++++ b/src/C++/double-conversion/utils.h +@@ -61,7 +61,7 @@ + // disabled.) + // On Linux,x86 89255e-22 != Div_double(89255.0/1e22) + #if defined(_M_X64) || defined(__x86_64__) || \ +- defined(__ARMEL__) || defined(__avr32__) || \ ++ defined(__ARMEL__) || defined(__avr32__) || defined(_M_ARM) || defined(_M_ARM64) || \ + defined(__hppa__) || defined(__ia64__) || \ + defined(__mips__) || \ + defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \ diff --git a/vcpkg/ports/quickfix/CONTROL b/vcpkg/ports/quickfix/CONTROL new file mode 100644 index 0000000..5a3fe30 --- /dev/null +++ b/vcpkg/ports/quickfix/CONTROL @@ -0,0 +1,5 @@ +Source: quickfix +Version: 1.15.1-4 +Build-Depends: openssl +Homepage: https://github.com/quickfix/quickfix +Description: QuickFIX is a free and open source implementation of the FIX protocol. diff --git a/vcpkg/ports/quickfix/fix_wsl_symlink_error.patch b/vcpkg/ports/quickfix/fix_wsl_symlink_error.patch new file mode 100644 index 0000000..ce6465a --- /dev/null +++ b/vcpkg/ports/quickfix/fix_wsl_symlink_error.patch @@ -0,0 +1,15 @@ +diff --git a/cmake/QuickfixPrebuildSetup.cmake b/cmake/QuickfixPrebuildSetup.cmake +index 9e53126ec..1c3368fcb 100644 +--- a/cmake/QuickfixPrebuildSetup.cmake ++++ b/cmake/QuickfixPrebuildSetup.cmake +@@ -3,8 +3,9 @@ + if (NOT WIN32) + add_custom_target(QUICKFIX_HEADERS_LINK ALL + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_SOURCE_DIR}/include/ +- COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SOURCE_DIR}/src/C++ ${CMAKE_SOURCE_DIR}/include/quickfix ++ #COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SOURCE_DIR}/src/C++ ${CMAKE_SOURCE_DIR}/include/quickfix + ) ++ include_directories(${CMAKE_SOURCE_DIR}/src/C++) + else() + add_custom_target(QUICKFIX_HEADERS_COPY ALL + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_SOURCE_DIR}/include/ diff --git a/vcpkg/ports/quickfix/portfile.cmake b/vcpkg/ports/quickfix/portfile.cmake new file mode 100644 index 0000000..d41a13c --- /dev/null +++ b/vcpkg/ports/quickfix/portfile.cmake @@ -0,0 +1,50 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO quickfix/quickfix + REF v1.15.1 + SHA512 6c3dc53f25932c9b7516ab9228f634511ae0f399719f87f0ec2b38c380c0a7d1c808f0f9a14a70a063e1956118550d1121222283a9139f23cd4f8f038f595f70 + HEAD_REF master + PATCHES + 00001-fix-build.patch + fix_wsl_symlink_error.patch +) + +file(GLOB_RECURSE SRC_FILES RELATIVE ${SOURCE_PATH} + "${SOURCE_PATH}/src/*.cpp" + "${SOURCE_PATH}/src/*.h" +) + +list(REMOVE_ITEM SRC_FILES "src/C++/Utility.h") +list(REMOVE_ITEM SRC_FILES "src/C++/pugixml.cpp") + +foreach(SRC_FILE IN LISTS SRC_FILES) + file(READ "${SOURCE_PATH}/${SRC_FILE}" _contents) + string(REPLACE "throw(" "QUICKFIX_THROW(" _contents "${_contents}") + string(REPLACE "throw (" "QUICKFIX_THROW(" _contents "${_contents}") + file(WRITE "${SOURCE_PATH}/${SRC_FILE}" "${_contents}") +endforeach() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DHAVE_EMX=OFF + -DHAVE_MYSQL=OFF + -DHAVE_POSTGRESQL=OFF + -DHAVE_PYTHON=OFF + -DHAVE_PYTHON2=OFF + -DHAVE_PYTHON3=OFF + -DHAVE_SSL=ON + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/quickfix) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/quickfix/usage b/vcpkg/ports/quickfix/usage new file mode 100644 index 0000000..2bed804 --- /dev/null +++ b/vcpkg/ports/quickfix/usage @@ -0,0 +1,4 @@ +The package quickfix provides CMake targets: + + find_package(quickfix CONFIG REQUIRED) + target_link_libraries(main PRIVATE quickfix) diff --git a/vcpkg/ports/quill/CONTROL b/vcpkg/ports/quill/CONTROL new file mode 100644 index 0000000..fc1938e --- /dev/null +++ b/vcpkg/ports/quill/CONTROL @@ -0,0 +1,7 @@ +Source: quill +Version: 1.4.0 +Homepage: https://github.com/odygrd/quill/ +Description: C++14 Asynchronous Low Latency Logging Library +Supports: !(arm|arm64|uwp|android) +Build-Depends: fmt + diff --git a/vcpkg/ports/quill/portfile.cmake b/vcpkg/ports/quill/portfile.cmake new file mode 100644 index 0000000..d9dc6ae --- /dev/null +++ b/vcpkg/ports/quill/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO odygrd/quill + REF 914a76122f4f1d781fbb09a1b1d8558c794c055a # v1.4.0 + SHA512 088824356c134292d9d698afcd6b8bdc6774af32e5b68217a49f13e966098eceaaa69f9a3ab6d01869f1c5ad483daedd5859496efe3d0e07f51af7e64861695c + HEAD_REF master +) + +# remove bundled fmt +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/quill/quill/include/quill/bundled/fmt) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/quill/quill/src/bundled/fmt) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DQUILL_FMT_EXTERNAL=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/quill) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/quirc/CMakeLists.txt b/vcpkg/ports/quirc/CMakeLists.txt new file mode 100644 index 0000000..a3400c7 --- /dev/null +++ b/vcpkg/ports/quirc/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 2.8) + +project(quirc C) + +add_library(quirc + lib/decode.c + lib/identify.c + lib/quirc.c + lib/version_db.c +) + +install(TARGETS quirc + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +install(FILES ${PROJECT_SOURCE_DIR}/lib/quirc.h DESTINATION include) diff --git a/vcpkg/ports/quirc/CONTROL b/vcpkg/ports/quirc/CONTROL new file mode 100644 index 0000000..0392690 --- /dev/null +++ b/vcpkg/ports/quirc/CONTROL @@ -0,0 +1,3 @@ +Source: quirc +Version: 1.0-4 +Description: quirc is one of the C library available for scanning QR Codes diff --git a/vcpkg/ports/quirc/patch-for-msvc.patch b/vcpkg/ports/quirc/patch-for-msvc.patch new file mode 100644 index 0000000..c755d04 --- /dev/null +++ b/vcpkg/ports/quirc/patch-for-msvc.patch @@ -0,0 +1,36 @@ +From 1c1ceecb70ad76751f0b573937380525d7643a87 Mon Sep 17 00:00:00 2001 +From: reyzal +Date: Sun, 4 Mar 2018 12:09:34 +0800 +Subject: [PATCH] for msvc + +--- + lib/identify.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/lib/identify.c b/lib/identify.c +index bf7bd94..cd16b0a 100644 +--- a/lib/identify.c ++++ b/lib/identify.c +@@ -196,9 +196,9 @@ static void threshold(struct quirc *q) + threshold_s = THRESHOLD_S_MIN; + + for (y = 0; y < q->h; y++) { +- int row_average[q->w]; ++ int *row_average = malloc(q->w * sizeof(int)); + +- memset(row_average, 0, sizeof(row_average)); ++ memset(row_average, 0, q->w * sizeof(int)); + + for (x = 0; x < q->w; x++) { + int w, u; +@@ -229,6 +229,7 @@ static void threshold(struct quirc *q) + } + + row += q->w; ++ free(row_average); + } + } + +-- +2.7.3.windows.1 + diff --git a/vcpkg/ports/quirc/portfile.cmake b/vcpkg/ports/quirc/portfile.cmake new file mode 100644 index 0000000..5305f08 --- /dev/null +++ b/vcpkg/ports/quirc/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dlbeer/quirc + REF v1.0 + SHA512 a556b08f2e2c710648b342fd06a855aa577b2b8c047c45a1c47cf54cde9963faf612978afba80bfd60a6f4f63156566f549ea303f09ed6e5348c1c30f5d77c13 + HEAD_REF master + PATCHES + patch-for-msvc.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/quirc) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/quirc/license ${CURRENT_PACKAGES_DIR}/share/quirc/copyright) diff --git a/vcpkg/ports/qwt/CONTROL b/vcpkg/ports/qwt/CONTROL new file mode 100644 index 0000000..22e6ed9 --- /dev/null +++ b/vcpkg/ports/qwt/CONTROL @@ -0,0 +1,5 @@ +Source: qwt +Version: 6.1.5 +Homepage: https://sourceforge.net/projects/qwt +Description: Qt widgets library for technical applications +Build-Depends: qt5-base[core], qt5-svg, qt5-tools diff --git a/vcpkg/ports/qwt/portfile.cmake b/vcpkg/ports/qwt/portfile.cmake new file mode 100644 index 0000000..1752a25 --- /dev/null +++ b/vcpkg/ports/qwt/portfile.cmake @@ -0,0 +1,36 @@ +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO qwt/qwt + REF 6.1.5 + FILENAME "qwt-6.1.5.zip" + SHA512 249634d2032ccc8083e26f1d151b301d6ccfcc3140a2c2c469d77d3d8973bc296872a1cff96e002944c40fa558a9896ca2a0f1a0531169c3c8d0fe2240610266 +) + +vcpkg_configure_qmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + CONFIG+=${VCPKG_LIBRARY_LINKAGE} +) + +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_install_qmake( + RELEASE_TARGETS sub-src-release_ordered + DEBUG_TARGETS sub-src-debug_ordered + ) +else () + vcpkg_install_qmake( + RELEASE_TARGETS sub-src-all-ordered + DEBUG_TARGETS sub-src-all-ordered + ) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +#Install the header files +file(GLOB HEADER_FILES ${SOURCE_PATH}/src/*.h) +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/qwtw/CONTROL b/vcpkg/ports/qwtw/CONTROL new file mode 100644 index 0000000..6b60796 --- /dev/null +++ b/vcpkg/ports/qwtw/CONTROL @@ -0,0 +1,6 @@ +Source: qwtw +Version: 3.1.0 +Homepage: https://github.com/ig-or/qwtw +Description: qwt-based 2D plotting library +Supports: windows & x64 & !static +Build-Depends: qt5-base, qt5-svg, qt5-networkauth, qwt, marble, boost-system, boost-filesystem, boost-date-time, boost-chrono, boost-regex, boost-thread, boost-circular-buffer, boost-asio diff --git a/vcpkg/ports/qwtw/portfile.cmake b/vcpkg/ports/qwtw/portfile.cmake new file mode 100644 index 0000000..27dd917 --- /dev/null +++ b/vcpkg/ports/qwtw/portfile.cmake @@ -0,0 +1,18 @@ +vcpkg_fail_port_install(ON_TARGET "LINUX" "OSX" "UWP" "ANDROID" ON_ARCH "arm" "x86" ON_LIBRARY_LINKAGE "static") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ig-or/qwtw + REF 7d6e7c95437cbc7d5d123fc1ccf0d6a3c4e419e6 # v3.1.0 + SHA512 de5abf26d0975b9f0ed88e10cd4d5b4d12e25cce8c87ab6a18d8e7064697de6fc8da83e118b5a4e2819c09e2dbbfd20daeecc6a42748c019c6699666276d075a + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/rabit/CONTROL b/vcpkg/ports/rabit/CONTROL new file mode 100644 index 0000000..64dd8ea --- /dev/null +++ b/vcpkg/ports/rabit/CONTROL @@ -0,0 +1,6 @@ +Source: rabit +Version: 0.1-2 +Homepage: https://github.com/dmlc/rabit +Description: rabit is a light weight library that provides a fault tolerant interface of Allreduce and Broadcast. It is designed to support easy implementations of distributed machine learning programs, many of which fall naturally under the Allreduce abstraction. +Build-Depends: dmlc +Supports: !uwp diff --git a/vcpkg/ports/rabit/fix-file-conflict.patch b/vcpkg/ports/rabit/fix-file-conflict.patch new file mode 100644 index 0000000..6656953 --- /dev/null +++ b/vcpkg/ports/rabit/fix-file-conflict.patch @@ -0,0 +1,52 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 08330d9..a58d669 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,10 +5,16 @@ project(rabit VERSION 0.0.0) + option(RABIT_BUILD_TESTS "Build rabit tests" OFF) + option(RABIT_BUILD_MPI "Build MPI" OFF) + ++find_package(dmlc CONFIG REQUIRED) ++ + add_library(rabit src/allreduce_base.cc src/allreduce_robust.cc src/engine.cc src/c_api.cc) + add_library(rabit_base src/allreduce_base.cc src/engine_base.cc src/c_api.cc) + add_library(rabit_empty src/engine_empty.cc src/c_api.cc) + ++target_link_libraries(rabit dmlc::dmlc) ++target_link_libraries(rabit_base dmlc::dmlc) ++target_link_libraries(rabit_empty dmlc::dmlc) ++ + set(rabit_libs rabit rabit_base rabit_empty) + if(RABIT_BUILD_MPI) + find_package(MPI REQUIRED) +@@ -22,7 +28,6 @@ if(RABIT_BUILD_TESTS) + add_library(rabit_mock STATIC src/allreduce_base.cc src/allreduce_robust.cc src/engine_mock.cc src/c_api.cc) + list(APPEND rabit_libs rabit_mock) # add to list to apply build settings, then remove + endif() +- + foreach(lib ${rabit_libs}) + #include "./internal/utils.h" + target_include_directories(${lib} PUBLIC +@@ -42,7 +47,8 @@ if(RABIT_BUILD_TESTS) + if(RABIT_BUILD_MPI) + add_executable(speed_test_mpi test/speed_test.cc) + target_link_libraries(speed_test_mpi rabit_mpi) +- install(TARGETS speed_test_mpi DESTINATION bin) ++ install(TARGETS speed_test_mpi DESTINATION bin) ++ message("IN MPI ") + endif() + endif() + +diff --git a/include/rabit/serializable.h b/include/rabit/serializable.h +index 4a3c2a1..0fd4154 100644 +--- a/include/rabit/serializable.h ++++ b/include/rabit/serializable.h +@@ -9,7 +9,7 @@ + #include + #include + #include "./internal/utils.h" +-#include "../dmlc/io.h" ++#include + + namespace rabit { + /*! diff --git a/vcpkg/ports/rabit/portfile.cmake b/vcpkg/ports/rabit/portfile.cmake new file mode 100644 index 0000000..80ad055 --- /dev/null +++ b/vcpkg/ports/rabit/portfile.cmake @@ -0,0 +1,36 @@ +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP.") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dmlc/rabit + REF v0.1 + SHA512 145fd839898cb95eaab9a88ad3301a0ccac0c8b672419ee2b8eb6ba273cc9a26e069e5ecbc37a3078e46dc64d11efb3e5ab10e5f8fed714e7add85b9e6ac2ec7 + HEAD_REF master + PATCHES fix-file-conflict.patch +) + +file(REMOVE_RECURSE ${SOURCE_PATH}/include/dmlc) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DRABIT_BUILD_TESTS=OFF + -DRABIT_BUILD_MPI=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +vcpkg_copy_pdbs() + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/vcpkg/ports/ragel/0001-remove-unistd-h.patch b/vcpkg/ports/ragel/0001-remove-unistd-h.patch new file mode 100644 index 0000000..fba598e --- /dev/null +++ b/vcpkg/ports/ragel/0001-remove-unistd-h.patch @@ -0,0 +1,14 @@ +diff --git a/ragel/main.cpp b/ragel/main.cpp +index f5fbd7b..947b1c8 100644 +--- a/ragel/main.cpp ++++ b/ragel/main.cpp +@@ -24,9 +24,7 @@ + #include + #include + #include +-#include + #include +-#include + #include + #include + #include diff --git a/vcpkg/ports/ragel/CMakeLists.txt b/vcpkg/ports/ragel/CMakeLists.txt new file mode 100644 index 0000000..2f5d1dc --- /dev/null +++ b/vcpkg/ports/ragel/CMakeLists.txt @@ -0,0 +1,128 @@ +cmake_minimum_required(VERSION 3.0) +project(ragel) + +file(GLOB HEADERS + ragel/buffer.h + ragel/cdgoto.h + ragel/cscodegen.h + ragel/csipgoto.h + ragel/inputdata.h + ragel/rbxgoto.h + ragel/rubyflat.h + ragel/cdcodegen.h + ragel/cdipgoto.h + ragel/csfflat.h + ragel/cssplit.h + ragel/javacodegen.h + ragel/redfsm.h + ragel/rubyftable.h + ragel/cdfflat.h + ragel/cdsplit.h + ragel/csfgoto.h + ragel/cstable.h + ragel/parsedata.h + ragel/rlparse.h + ragel/rubytable.h + ragel/cdfgoto.h + ragel/cdtable.h + ragel/csflat.h + ragel/dotcodegen.h + ragel/parsetree.h + ragel/rlscan.h + ragel/version.h + ragel/cdflat.h + ragel/common.h + ragel/csftable.h + ragel/fsmgraph.h + ragel/pcheck.h + ragel/rubycodegen.h + ragel/xmlcodegen.h + ragel/cdftable.h + ragel/csgoto.h + ragel/gendata.h + ragel/ragel.h + ragel/rubyfflat.h + ragel/gocodegen.h + ragel/gotable.h + ragel/goftable.h + ragel/goflat.h + ragel/gofflat.h + ragel/gogoto.h + ragel/gofgoto.h + ragel/goipgoto.h + ragel/gotablish.h + ragel/mlcodegen.h + ragel/mltable.h + ragel/mlftable.h + ragel/mlflat.h + ragel/mlfflat.h + ragel/mlgoto.h + ragel/mlfgoto.h +) + +file(GLOB SRC + ragel/main.cpp + ragel/parsetree.cpp + ragel/parsedata.cpp + ragel/fsmstate.cpp + ragel/fsmbase.cpp + ragel/fsmattach.cpp + ragel/fsmmin.cpp + ragel/fsmgraph.cpp + ragel/fsmap.cpp + ragel/rlscan.cpp + ragel/rlparse.cpp + ragel/inputdata.cpp + ragel/common.cpp + ragel/redfsm.cpp + ragel/gendata.cpp + ragel/cdcodegen.cpp + ragel/cdtable.cpp + ragel/cdftable.cpp + ragel/cdflat.cpp + ragel/cdfflat.cpp + ragel/cdgoto.cpp + ragel/cdfgoto.cpp + ragel/cdipgoto.cpp + ragel/cdsplit.cpp + ragel/javacodegen.cpp + ragel/rubycodegen.cpp + ragel/rubytable.cpp + ragel/rubyftable.cpp + ragel/rubyflat.cpp + ragel/rubyfflat.cpp + ragel/rbxgoto.cpp + ragel/cscodegen.cpp + ragel/cstable.cpp + ragel/csftable.cpp + ragel/csflat.cpp + ragel/csfflat.cpp + ragel/csgoto.cpp + ragel/csfgoto.cpp + ragel/csipgoto.cpp + ragel/cssplit.cpp + ragel/dotcodegen.cpp + ragel/xmlcodegen.cpp + ragel/gocodegen.cpp + ragel/gotable.cpp + ragel/goftable.cpp + ragel/goflat.cpp + ragel/gofflat.cpp + ragel/gogoto.cpp + ragel/gofgoto.cpp + ragel/goipgoto.cpp + ragel/gotablish.cpp + ragel/mlcodegen.cpp + ragel/mltable.cpp + ragel/mlftable.cpp + ragel/mlflat.cpp + ragel/mlfflat.cpp + ragel/mlgoto.cpp + ragel/mlfgoto.cpp +) + +include_directories(aapl) + +add_executable(ragel ${SRC}) + +install(TARGETS ragel DESTINATION tools CONFIGURATIONS Release) diff --git a/vcpkg/ports/ragel/CONTROL b/vcpkg/ports/ragel/CONTROL new file mode 100644 index 0000000..abec9f4 --- /dev/null +++ b/vcpkg/ports/ragel/CONTROL @@ -0,0 +1,4 @@ +Source: ragel +Version: 6.10-3 +Homepage: https://www.colm.net/files/ragel +Description: Ragel State Machine Compiler diff --git a/vcpkg/ports/ragel/config.h b/vcpkg/ports/ragel/config.h new file mode 100644 index 0000000..dbcd06d --- /dev/null +++ b/vcpkg/ports/ragel/config.h @@ -0,0 +1,26 @@ +/* ragel/config.h. Generated from config.h.in by configure. */ +/* ragel/config.h.in. Generated from configure.in by autoheader. */ + +/* Name of package */ +#define PACKAGE "ragel" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "ragel" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "ragel 6.9" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "ragel" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "6.9" + +/* Version number of package */ +#define VERSION "6.9" diff --git a/vcpkg/ports/ragel/portfile.cmake b/vcpkg/ports/ragel/portfile.cmake new file mode 100644 index 0000000..037f342 --- /dev/null +++ b/vcpkg/ports/ragel/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "http://www.colm.net/files/ragel/ragel-6.10.tar.gz" + FILENAME "ragel-6.10.tar.gz" + SHA512 6c1fe4f6fa8546ae28b92ccfbae94355ff0d3cea346b9ae8ce4cf6c2bdbeb823e0ccd355332643ea72d3befd533a8b3030ddbf82be7ffa811c2c58cbb01aaa38 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + 0001-remove-unistd-h.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}/ragel) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +# Allow empty include directory +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ragel) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/ragel/COPYING ${CURRENT_PACKAGES_DIR}/share/ragel/copyright) diff --git a/vcpkg/ports/rang/CMakeLists.txt b/vcpkg/ports/rang/CMakeLists.txt new file mode 100644 index 0000000..6cf64a0 --- /dev/null +++ b/vcpkg/ports/rang/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required (VERSION 2.8) +project (rang) + +include_directories(include) +install(FILES ${PROJECT_SOURCE_DIR}/include/rang.hpp DESTINATION include) \ No newline at end of file diff --git a/vcpkg/ports/rang/CONTROL b/vcpkg/ports/rang/CONTROL new file mode 100644 index 0000000..629bee4 --- /dev/null +++ b/vcpkg/ports/rang/CONTROL @@ -0,0 +1,3 @@ +Source: rang +Version: 3.1.0 +Description: Colors for your Terminal. \ No newline at end of file diff --git a/vcpkg/ports/rang/portfile.cmake b/vcpkg/ports/rang/portfile.cmake new file mode 100644 index 0000000..4c332a8 --- /dev/null +++ b/vcpkg/ports/rang/portfile.cmake @@ -0,0 +1,21 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO agauniyal/rang + REF v3.1.0 + SHA512 3419c9d8b8177320d4254a3e317790b0ca17bb08940025a16cb6a468a5f4c6e6a8bae391441fbb61b46e94cbe760aef1cb7f31fb8a1e958312e9dcb568b04470 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) \ No newline at end of file diff --git a/vcpkg/ports/range-v3-vs2015/CONTROL b/vcpkg/ports/range-v3-vs2015/CONTROL new file mode 100644 index 0000000..34ce349 --- /dev/null +++ b/vcpkg/ports/range-v3-vs2015/CONTROL @@ -0,0 +1,4 @@ +Source: range-v3-vs2015 +Version: 20151130-vcpkg5 +Homepage: https://github.com/Microsoft/Range-V3-VS2015 +Description: Range library for C++11/14/17. diff --git a/vcpkg/ports/range-v3-vs2015/portfile.cmake b/vcpkg/ports/range-v3-vs2015/portfile.cmake new file mode 100644 index 0000000..bc7153a --- /dev/null +++ b/vcpkg/ports/range-v3-vs2015/portfile.cmake @@ -0,0 +1,14 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/Range-V3-VS2015 + REF 423bcae5cf18948591361329784d3b12ef41711b + SHA512 c6756bc6b5131c4c0ffb96550fb40decf734fc8c30e3d51c5c2bf03aae4d7426de36e896a1abf0a200a49a3906d4b60c1cf52f43504554b64d89c91de3e92746 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/range-v3-vs2015) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/range-v3-vs2015/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/range-v3-vs2015/copyright) +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.hpp") +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/range-v3/CONTROL b/vcpkg/ports/range-v3/CONTROL new file mode 100644 index 0000000..cf5c574 --- /dev/null +++ b/vcpkg/ports/range-v3/CONTROL @@ -0,0 +1,4 @@ +Source: range-v3 +Version: 0.11.0 +Homepage: https://github.com/ericniebler/range-v3 +Description: Range library for C++11/14/17. diff --git a/vcpkg/ports/range-v3/portfile.cmake b/vcpkg/ports/range-v3/portfile.cmake new file mode 100644 index 0000000..5cf2401 --- /dev/null +++ b/vcpkg/ports/range-v3/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ericniebler/range-v3 + REF 4989f3e9ff2efee1852942bb9328ef121369ba02 #v0.11.0 + SHA512 da571feff60d20a42e1e0593f132d4ab095f3ffbecaf0c020f295a2ec8b75c6934abb1974679e55ce8b7b16d105e0cbf3929210677c3b1b90cb349e583854fd4 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DRANGE_V3_TESTS=OFF + -DRANGE_V3_EXAMPLES=OFF + -DRANGE_V3_PERF=OFF + -DRANGE_V3_HEADER_CHECKS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/range-v3) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/rapidcheck/CONTROL b/vcpkg/ports/rapidcheck/CONTROL new file mode 100644 index 0000000..5f46ed7 --- /dev/null +++ b/vcpkg/ports/rapidcheck/CONTROL @@ -0,0 +1,4 @@ +Source: rapidcheck +Version: 2020-08-25 +Homepage: https://github.com/emil-e/rapidcheck +Description: A property-based testing library for C++ (a la QuickCheck) with the goal of being simple to use with as little boilerplate as possible. diff --git a/vcpkg/ports/rapidcheck/portfile.cmake b/vcpkg/ports/rapidcheck/portfile.cmake new file mode 100644 index 0000000..544319c --- /dev/null +++ b/vcpkg/ports/rapidcheck/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO emil-e/rapidcheck + REF 7bc7d302191a4f3d0bf005692677126136e02f60 + SHA512 8631f1034a0a24293d61a91cbb8f8b69c70acde02d60377d0a68d045e4d57acb878aafbea76907574c0cc6cdac3a16d207d310b49d7c48ee7edbede3236ed15b + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DRC_INSTALL_ALL_EXTRAS=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/${PORT}/cmake) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/rapidjson/CONTROL b/vcpkg/ports/rapidjson/CONTROL new file mode 100644 index 0000000..d5b9791 --- /dev/null +++ b/vcpkg/ports/rapidjson/CONTROL @@ -0,0 +1,4 @@ +Source: rapidjson +Version: 2020-02-08 +Description: A fast JSON parser/generator for C++ with both SAX/DOM style API +Homepage: http://rapidjson.org/ \ No newline at end of file diff --git a/vcpkg/ports/rapidjson/portfile.cmake b/vcpkg/ports/rapidjson/portfile.cmake new file mode 100644 index 0000000..ed29ddd --- /dev/null +++ b/vcpkg/ports/rapidjson/portfile.cmake @@ -0,0 +1,34 @@ +#header-only library +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Tencent/rapidjson + REF 3b638e67150783303aebf1fc0789d6c44a026b53 + SHA512 743ff74448c1ac31d1d03c90aa50cd6119b9e1723e618d0ca1f6021ec8a5282b34e1fc13b8577d7cf9eee064b6d9f809b0c92fdc09581c96dfd69cf7b7805223 + HEAD_REF master +) + +# Use RapidJSON's own build process, skipping examples and tests +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DRAPIDJSON_BUILD_DOC:BOOL=OFF + -DRAPIDJSON_BUILD_EXAMPLES:BOOL=OFF + -DRAPIDJSON_BUILD_TESTS:BOOL=OFF + -DCMAKE_INSTALL_DIR:STRING=cmake +) +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/share/doc) + +file(READ "${CURRENT_PACKAGES_DIR}/share/rapidjson/RapidJSONConfig.cmake" _contents) +string(REPLACE "\${RapidJSON_SOURCE_DIR}" "\${RapidJSON_CMAKE_DIR}/../.." _contents "${_contents}") +file(WRITE "${CURRENT_PACKAGES_DIR}/share/rapidjson/RapidJSONConfig.cmake" "${_contents}\nset(RAPIDJSON_INCLUDE_DIRS \"\${RapidJSON_INCLUDE_DIRS}\")\n") + +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + diff --git a/vcpkg/ports/rapidjson/usage b/vcpkg/ports/rapidjson/usage new file mode 100644 index 0000000..b72b8e3 --- /dev/null +++ b/vcpkg/ports/rapidjson/usage @@ -0,0 +1,4 @@ +The package rapidjson provides CMake integration: + + find_package(RapidJSON CONFIG REQUIRED) + target_include_directories(main PRIVATE ${RAPIDJSON_INCLUDE_DIRS}) diff --git a/vcpkg/ports/rapidxml-ns/CONTROL b/vcpkg/ports/rapidxml-ns/CONTROL new file mode 100644 index 0000000..f932481 --- /dev/null +++ b/vcpkg/ports/rapidxml-ns/CONTROL @@ -0,0 +1,3 @@ +Source: rapidxml-ns +Version: 1.13.2 +Description: RapidXML with added XML namespaces support. diff --git a/vcpkg/ports/rapidxml-ns/portfile.cmake b/vcpkg/ports/rapidxml-ns/portfile.cmake new file mode 100644 index 0000000..d51fa03 --- /dev/null +++ b/vcpkg/ports/rapidxml-ns/portfile.cmake @@ -0,0 +1,22 @@ +#header-only library +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO svgpp/rapidxml_ns + REF v1.13.2 + SHA512 72cdd7e728471e8903ce64470f5172abe7f2300d4d115b3a27b4d4ffb3c20e59aefb9b23c535e37baa3f53c9125aa2932d6fa9ba24e658151e1c9b12f959523a + HEAD_REF master +) + +# Handle copyright +file(COPY ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/rapidxml-ns) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/rapidxml-ns/license.txt ${CURRENT_PACKAGES_DIR}/share/rapidxml-ns/copyright) + +# Copy the header files +file(INSTALL + ${SOURCE_PATH}/rapidxml_ns.hpp + ${SOURCE_PATH}/rapidxml_ns_print.hpp + ${SOURCE_PATH}/rapidxml_ns_utils.hpp + DESTINATION + ${CURRENT_PACKAGES_DIR}/include/rapidxml-ns) diff --git a/vcpkg/ports/rapidxml/CONTROL b/vcpkg/ports/rapidxml/CONTROL new file mode 100644 index 0000000..7e119fb --- /dev/null +++ b/vcpkg/ports/rapidxml/CONTROL @@ -0,0 +1,4 @@ +Source: rapidxml +Version: 1.13-4 +Homepage: https://sourceforge.net/projects/rapidxml +Description: RapidXml is an attempt to create the fastest XML parser possible, while retaining useability, portability and reasonable W3C compatibility. diff --git a/vcpkg/ports/rapidxml/portfile.cmake b/vcpkg/ports/rapidxml/portfile.cmake new file mode 100644 index 0000000..b13d1a2 --- /dev/null +++ b/vcpkg/ports/rapidxml/portfile.cmake @@ -0,0 +1,15 @@ +#header-only library +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO rapidxml/rapidxml + REF rapidxml%201.13 + FILENAME "rapidxml-1.13.zip" + SHA512 6c10583e6631ccdb0217d0a5381172cb4c1046226de6ef1acf398d85e81d145228e14c3016aefcd7b70a1db8631505b048d8b4f5d4b0dbf1811d2482eefdd265 +) + +# Handle copyright +file(COPY ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/rapidxml) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/rapidxml/license.txt ${CURRENT_PACKAGES_DIR}/share/rapidxml/copyright) + +# Copy the header files +file(INSTALL ${SOURCE_PATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/rapidxml FILES_MATCHING PATTERN "*.hpp") diff --git a/vcpkg/ports/rappture/CMakeLists.txt b/vcpkg/ports/rappture/CMakeLists.txt new file mode 100644 index 0000000..57d7739 --- /dev/null +++ b/vcpkg/ports/rappture/CMakeLists.txt @@ -0,0 +1,110 @@ +cmake_minimum_required(VERSION 3.11) +cmake_policy(VERSION 3.11) + +project (rappture) + +set(SRC_RAPPTURE_CORE + src/core/scew_extras.c + src/core/RpBindingsDict.cc + src/core/RpBuffer.cc + src/core/RpBufferCInterface.cc + src/core/RpDXWriter.cc + src/core/RpDXWriterFInterface.cc + src/core/RpEncode.cc + src/core/RpEntityRef.cc + src/core/RpFortranCommon.cc + src/core/RpLibrary.cc + src/core/RpLibraryCInterface.cc + src/core/RpLibraryFInterface.cc + src/core/RpOutcome.cc + src/core/RpOutcomeCInterface.cc + src/core/RpPtr.cc + src/core/RpResult.cc + src/core/RpUnits.cc + src/core/RpUnitsCInterface.cc + src/core/RpUnitsFInterface.cc + src/core/RpUnitsStd.cc + src/core/RpUtils.cc + src/core/RpUtilsCInterface.cc + src/core/RpUtilsFInterface.cc + src/core/b64/cdecode.c + src/core/b64/cencode.c + src/core/scew/attribute.c + src/core/scew/element.c + src/core/scew/error.c + src/core/scew/parser.c + src/core/scew/str.c + src/core/scew/tree.c + src/core/scew/writer.c + src/core/scew/xattribute.c + src/core/scew/xerror.c + src/core/scew/xhandler.c + src/core/scew/xparser.c + src/core/scew/xprint.c +) + +set(HEADERS + src/core/rappture.h + src/core/RpBindingsDict.h + src/core/RpBuffer.h + src/core/RpBufferCHelper.h + src/core/RpBufferCInterface.h + src/core/RpDict.h + src/core/RpDXWriter.h + src/core/RpDXWriterFInterface.h + src/core/RpDXWriterFStubs.h + src/core/RpEncode.h + src/core/RpEntityRef.h + src/core/RpFortranCommon.h + src/core/RpLibrary.h + src/core/RpLibraryCInterface.h + src/core/RpLibraryFInterface.h + src/core/RpLibraryFStubs.h + src/core/RpOutcome.h + src/core/RpOutcomeCHelper.h + src/core/RpOutcomeCInterface.h + src/core/RpPtr.h + src/core/RpSimpleBuffer.h + src/core/RpUnits.h + src/core/RpUnitsCInterface.h + src/core/RpUnitsFInterface.h + src/core/RpUnitsFStubs.h + src/core/RpUnitsStd.h + src/core/RpUtils.h + src/core/RpUtilsCInterface.h + src/core/RpUtilsFInterface.h + src/core/RpUtilsFStubs.h + src/core/scew_extras.h + +) + +add_library(rappture ${SRC_RAPPTURE_CORE} ${HEADERS}) + +target_include_directories(rappture PUBLIC + $ + $ +) + +find_package(expat CONFIG REQUIRED) +find_package(ZLIB REQUIRED) + +target_compile_definitions(rappture PUBLIC + -D_CRT_SECURE_NO_WARNINGS + -DRAPPTURE_VERSION=1.9 + -DSVN_VERSION=6713 + -D_USE_MATH_DEFINES +) + +target_link_libraries(rappture PRIVATE + expat::expat + ZLIB::ZLIB +) + +install(TARGETS rappture EXPORT rappture-config + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + ) + +install(FILES ${HEADERS} DESTINATION include/rappture) +install(EXPORT rappture-config NAMESPACE unofficial::rappture:: DESTINATION share/rappture) diff --git a/vcpkg/ports/rappture/CONTROL b/vcpkg/ports/rappture/CONTROL new file mode 100644 index 0000000..611bda7 --- /dev/null +++ b/vcpkg/ports/rappture/CONTROL @@ -0,0 +1,4 @@ +Source: rappture +Version: 1.9 +Description: Rappture is a toolkit supporting Rapid application infrastructure, making it quick and easy to develop powerful scientific applications. +Build-Depends: expat, zlib diff --git a/vcpkg/ports/rappture/portfile.cmake b/vcpkg/ports/rappture/portfile.cmake new file mode 100644 index 0000000..00bde7d --- /dev/null +++ b/vcpkg/ports/rappture/portfile.cmake @@ -0,0 +1,36 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "https://nanohub.org/app/site/downloads/rappture/rappture-src-20130903.tar.gz" + FILENAME "rappture-src-20130903.tar.gz" + SHA512 3b42569d056c5e80762eada3aff23d230d4ba8f6f0078de44d8571a713dde91e31e66fe3c37ceb66e934a1410b338fb481aeb5a29ef56b53da4ad2e8a2a2ae59 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + "${CMAKE_CURRENT_LIST_DIR}/rappture.patch" +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file( + INSTALL ${SOURCE_PATH}/license.terms + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) diff --git a/vcpkg/ports/rappture/rappture.patch b/vcpkg/ports/rappture/rappture.patch new file mode 100644 index 0000000..d8c7ff6 --- /dev/null +++ b/vcpkg/ports/rappture/rappture.patch @@ -0,0 +1,89 @@ +diff --git a/src/core/RpBuffer.cc b/src/core/RpBuffer.cc +index 6d439fe..ec45405 100644 +--- a/src/core/RpBuffer.cc ++++ b/src/core/RpBuffer.cc +@@ -16,7 +16,6 @@ + #include + #include + #include +-#include + #include + #include + #include "b64/encode.h" +@@ -24,6 +23,11 @@ + #include "RpBuffer.h" + #include "RpEncode.h" + ++#if defined(_MSC_VER) ++#include ++typedef SSIZE_T ssize_t; ++#endif ++ + namespace Rappture { + + /** +@@ -109,6 +113,9 @@ Buffer::operator+=(const Buffer& b) + Buffer::~Buffer() + {} + ++#ifndef _WIN32 ++# define _fileno fileno ++#endif + + bool + Buffer::load (Outcome &status, const char *path) +@@ -123,7 +130,7 @@ Buffer::load (Outcome &status, const char *path) + } + + struct stat stat; +- if (fstat(fileno(f), &stat) < 0) { ++ if (fstat(_fileno(f), &stat) < 0) { + status.addError("can't stat \"%s\": %s", path, strerror(errno)); + return false; + } +diff --git a/src/core/RpDXWriter.cc b/src/core/RpDXWriter.cc +index e4748b3..8990c0f 100644 +--- a/src/core/RpDXWriter.cc ++++ b/src/core/RpDXWriter.cc +@@ -18,6 +18,12 @@ + #include + #include + #include ++ ++#if defined(_MSC_VER) ++#include ++typedef SSIZE_T ssize_t; ++#endif ++ + using namespace Rappture; + + DXWriter::DXWriter() : +diff --git a/src/core/RpLibrary.cc b/src/core/RpLibrary.cc +index 2b9a540..4da787b 100644 +--- a/src/core/RpLibrary.cc ++++ b/src/core/RpLibrary.cc +@@ -11,7 +11,6 @@ + * ====================================================================== + */ + +-#include "config.h" + #include "scew/scew.h" + #include "scew_extras.h" + #include "RpLibrary.h" +diff --git a/src/core/scew/scew.h b/src/core/scew/scew.h +index 9741ed5..e335c2d 100644 +--- a/src/core/scew/scew.h ++++ b/src/core/scew/scew.h +@@ -61,12 +61,6 @@ + # define SCEW_LIB_D + # endif /* _DEBUG */ + +-# if defined(SCEW_LIB_U) || defined(SCEW_LIB_S) || defined(SCEW_LIB_D) +-# pragma comment( lib, "scew_" SCEW_LIB_U SCEW_LIB_S SCEW_LIB_D ".lib" ) +-# else +-# pragma comment( lib, "scew.lib" ) +-# endif +- + #endif /* _WIN32 */ + + #endif /* SCEW_H_ALEIX0211250134 */ diff --git a/vcpkg/ports/raylib/CONTROL b/vcpkg/ports/raylib/CONTROL new file mode 100644 index 0000000..7308a4e --- /dev/null +++ b/vcpkg/ports/raylib/CONTROL @@ -0,0 +1,13 @@ +Source: raylib +Version: 3.0.0 +Port-Version: 3 +Description: A simple and easy-to-use library to enjoy videogames programming +Homepage: https://github.com/raysan5/raylib +Supports: !(arm|uwp) +Default-Features: use-audio + +Feature: hidpi +Description: Support high-DPI displays + +Feature: use-audio +Description: Build raylib with audio module diff --git a/vcpkg/ports/raylib/portfile.cmake b/vcpkg/ports/raylib/portfile.cmake new file mode 100644 index 0000000..ba63fff --- /dev/null +++ b/vcpkg/ports/raylib/portfile.cmake @@ -0,0 +1,73 @@ +# https://github.com/raysan5/raylib/issues/388 +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") + +if(VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_LINUX) + message( + "raylib currently requires the following libraries from the system package manager: + libgl1-mesa-dev + libx11-dev + libxcursor-dev + libxinerama-dev + libxrandr-dev +These can be installed on Ubuntu systems via sudo apt install libgl1-mesa-dev libx11-dev libxcursor-dev libxinerama-dev libxrandr-dev" + ) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO raysan5/raylib + REF 7ef114d1da2c34a70bba5442497103441647d8f3 # 3.0.0 + SHA512 e15df6f0f95d9580d6211459815f174496b1385c9797a682d372a03b1175c9eb38e51b3b27077346d5e1a2d6ee2d5c636e03e8fd3ca9a73a7fa2a67afd255bd2 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SHARED) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATIC) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + hidpi SUPPORT_HIGH_DPI + use-audio USE_AUDIO +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_EXAMPLES=OFF + -DBUILD_GAMES=OFF + -DSHARED=${SHARED} + -DSTATIC=${STATIC} + -DUSE_EXTERNAL_GLFW=OFF # externl glfw3 causes build errors on Windows + ${FEATURE_OPTIONS} + OPTIONS_DEBUG + -DENABLE_ASAN=ON + -DENABLE_UBSAN=ON + -DENABLE_MSAN=OFF + OPTIONS_RELEASE + -DENABLE_ASAN=OFF + -DENABLE_UBSAN=OFF + -DENABLE_MSAN=OFF +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/include/raylib.h + "defined(USE_LIBTYPE_SHARED)" + "1 // defined(USE_LIBTYPE_SHARED)" + ) +endif() + +configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY) +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/raylib/usage b/vcpkg/ports/raylib/usage new file mode 100644 index 0000000..94ce109 --- /dev/null +++ b/vcpkg/ports/raylib/usage @@ -0,0 +1,5 @@ +The package @PORT@:@TARGET_TRIPLET@ provides CMake targets: + + find_package(@PORT@ CONFIG REQUIRED) + target_include_directories(main PRIVATE ${RAYLIB_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${RAYLIB_LIBRARIES}) diff --git a/vcpkg/ports/raylib/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/raylib/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..34484ea --- /dev/null +++ b/vcpkg/ports/raylib/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,11 @@ +include(SelectLibraryConfigurations) + +find_path(RAYLIB_INCLUDE_DIR raylib.h) + +find_library(RAYLIB_LIBRARY_DEBUG NAMES raylib libraylib NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" NO_DEFAULT_PATH REQUIRED) +find_library(RAYLIB_LIBRARY_RELEASE NAMES raylib libraylib NAMES_PER_DIR PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" NO_DEFAULT_PATH REQUIRED) + +select_library_configurations(RAYLIB) + +set(RAYLIB_INCLUDE_DIRS ${RAYLIB_INCLUDE_DIR}) +set(RAYLIB_LIBRARIES ${RAYLIB_LIBRARY}) diff --git a/vcpkg/ports/re2/CONTROL b/vcpkg/ports/re2/CONTROL new file mode 100644 index 0000000..39deaf4 --- /dev/null +++ b/vcpkg/ports/re2/CONTROL @@ -0,0 +1,4 @@ +Source: re2 +Version: 2020-06-01 +Homepage: https://github.com/google/re2 +Description: RE2 is a fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python. It is a C++ library. diff --git a/vcpkg/ports/re2/portfile.cmake b/vcpkg/ports/re2/portfile.cmake new file mode 100644 index 0000000..fac44a1 --- /dev/null +++ b/vcpkg/ports/re2/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/re2 + REF 2020-06-01 + SHA512 8592a5409cb087c3188023746a4121bd58972a7a21bae98022af587f6191b3096bbb5d379e622ea853ff3373c76972fb61f331354550715c9a7e77d08fba6f3c + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DRE2_BUILD_TESTING=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/re2) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/re2 RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/vcpkg/ports/readerwriterqueue/CONTROL b/vcpkg/ports/readerwriterqueue/CONTROL new file mode 100644 index 0000000..d4e7b7a --- /dev/null +++ b/vcpkg/ports/readerwriterqueue/CONTROL @@ -0,0 +1,4 @@ +Source: readerwriterqueue +Version: 1.0.3 +Homepage: https://github.com/cameron314/readerwriterqueue +Description: A single-producer, single-consumer lock-free queue diff --git a/vcpkg/ports/readerwriterqueue/portfile.cmake b/vcpkg/ports/readerwriterqueue/portfile.cmake new file mode 100644 index 0000000..42b7d12 --- /dev/null +++ b/vcpkg/ports/readerwriterqueue/portfile.cmake @@ -0,0 +1,13 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cameron314/readerwriterqueue + REF v1.0.3 + SHA512 79e1e3370afa9ba420371304a7159ecba301ce41a384e97e2cf8af0b5c938c15da2aabb624bbbef0832ca3a76036c6769529ce3115b67ee571b7ee5a53cbb137 + HEAD_REF master +) + +file(GLOB HEADER_FILES ${SOURCE_PATH}/*.h) +file(INSTALL ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/readline-win32/CMakeLists.txt b/vcpkg/ports/readline-win32/CMakeLists.txt new file mode 100644 index 0000000..ac062d0 --- /dev/null +++ b/vcpkg/ports/readline-win32/CMakeLists.txt @@ -0,0 +1,56 @@ +cmake_minimum_required(VERSION 3.0) +project(readline C) + +add_definitions(-DREADLINE_LIBRARY) +add_definitions(-DHAVE_CONFIG_H) +add_definitions(-D_CRT_SECURE_NO_WARNINGS) + +if(BUILD_SHARED_LIBS) + add_definitions(-DBUILD_READLINE_DLL) +else() + add_definitions(-DREADLINE_STATIC) +endif() + +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} # thats where the config.h is located +) + +add_library(readline + readline.c + funmap.c + keymaps.c + vi_mode.c + parens.c + rltty.c + complete.c + bind.c + isearch.c + display.c + signals.c + util.c + kill.c + undo.c + macro.c + input.c + callback.c + terminal.c + xmalloc.c + history.c + histsearch.c + histexpand.c + histfile.c + nls.c + search.c + shell.c + savestring.c + tilde.c + text.c + misc.c + compat.c + mbutil.c + support/wcwidth.c) + +install(TARGETS readline + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) diff --git a/vcpkg/ports/readline-win32/CONTROL b/vcpkg/ports/readline-win32/CONTROL new file mode 100644 index 0000000..f8beab3 --- /dev/null +++ b/vcpkg/ports/readline-win32/CONTROL @@ -0,0 +1,4 @@ +Source: readline-win32 +Version: 5.0-2 +Description: Implementation of readline for Windows Desktop +Homepage: https://github.com/lltcggie \ No newline at end of file diff --git a/vcpkg/ports/readline-win32/config.h b/vcpkg/ports/readline-win32/config.h new file mode 100644 index 0000000..de0a352 --- /dev/null +++ b/vcpkg/ports/readline-win32/config.h @@ -0,0 +1,58 @@ +#define RETSIGTYPE void +#define VOID_SIGHANDLER 1 +#define PROTOTYPES 1 +#define HAVE_ISASCII 1 +#define HAVE_ISXDIGIT 1 +#define HAVE_MBRLEN 1 +#define HAVE_MBRTOWC 1 +#define HAVE_MBRTOWC 1 +#define HAVE_MBSRTOWCS 1 +#define HAVE_MEMMOVE 1 +#define HAVE_PUTENV 1 +#define HAVE_SETENV 1 +#define HAVE_SETLOCALE 1 +#define HAVE_STRCOLL 1 +#define STRCOLL_BROKEN 1 +#define HAVE_STRPBRK 1 +#define HAVE_TCGETATTR 1 +#define HAVE_VSNPRINTF 1 +#define HAVE_WCTOMB 1 +#define HAVE_WCWIDTH 1 +#define STDC_HEADERS 1 +#define HAVE_LANGINFO_H 1 +#define HAVE_LIMITS_H 1 +#define HAVE_LOCALE_H 1 +#define HAVE_MEMORY_H 1 +#define HAVE_STDARG_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRING_H 1 +#define HAVE_TERMIOS_H 1 +#define HAVE_WCHAR_H 1 +#define HAVE_WCTYPE_H 1 +#define HAVE_MBSTATE_T 1 +#define HAVE_LANGINFO_CODESET 1 +#define VOID_SIGHANDLER 1 +#define STRUCT_WINSIZE_IN_SYS_IOCTL 1 +#define HAVE_GETPW_DECLS 1 +#define MUST_REINSTALL_SIGHANDLERS 1 +#define CTYPE_NON_ASCII 1 + +/* Ultrix botches type-ahead when switching from canonical to + non-canonical mode, at least through version 4.3 */ +#if !defined (HAVE_TERMIOS_H) || !defined (HAVE_TCGETATTR) || defined (ultrix) +# define TERMIOS_MISSING +#endif + +#if defined (STRCOLL_BROKEN) +# define HAVE_STRCOLL 1 +#endif + +#if defined (__STDC__) && defined (HAVE_STDARG_H) +# define PREFER_STDARG +# define USE_VARARGS +#else +# if defined (HAVE_VARARGS_H) +# define PREFER_VARARGS +# define USE_VARARGS +# endif +#endif diff --git a/vcpkg/ports/readline-win32/portfile.cmake b/vcpkg/ports/readline-win32/portfile.cmake new file mode 100644 index 0000000..b7c60e0 --- /dev/null +++ b/vcpkg/ports/readline-win32/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lltcggie/readline + REF ea414b4e98475e3976198738061824e8a8379a50 + SHA512 82d54ab3e19fb2673fe97eff07117d36704791669baa283ec737c704635f872e4c7cd30485a6648d445cb2912e4364286e664e9425444f456a4c862b9e4de843 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/src/readline/5.0/readline-5.0-src) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h DESTINATION ${SOURCE_PATH}/src/readline/5.0/readline-5.0-src) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/src/readline/5.0/readline-5.0-src + PREFER_NINJA +) + +vcpkg_install_cmake() + +# Copy headers +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include/readline) +file(GLOB headers "${SOURCE_PATH}/src/readline/5.0/readline-5.0-src/*.h") +file(COPY ${headers} DESTINATION ${CURRENT_PACKAGES_DIR}/include/readline) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/src/readline/5.0/readline-5.0-src/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/readline/CONTROL b/vcpkg/ports/readline/CONTROL new file mode 100644 index 0000000..c487f38 --- /dev/null +++ b/vcpkg/ports/readline/CONTROL @@ -0,0 +1,5 @@ +Source: readline +Version: 0 +Description: GNU readline and history libraries +Build-Depends: readline-win32 (windows) +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/readline/portfile.cmake b/vcpkg/ports/readline/portfile.cmake new file mode 100644 index 0000000..45db4f3 --- /dev/null +++ b/vcpkg/ports/readline/portfile.cmake @@ -0,0 +1,5 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "No implementation of readline is currently available for UWP targets") +endif() + +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/vcpkg/ports/readosm/CONTROL b/vcpkg/ports/readosm/CONTROL new file mode 100644 index 0000000..7a2d817 --- /dev/null +++ b/vcpkg/ports/readosm/CONTROL @@ -0,0 +1,7 @@ +Source: readosm +Version: 1.1.0 +Port-Version: 3 +Homepage: https://www.gaia-gis.it/gaia-sins/readosm-sources +Description: ReadOSM is an open source library to extract valid data from within an Open Street Map input file (.osm or .osm.pbf) +Build-Depends: expat, zlib +Supports: !(linux|osx|uwp) diff --git a/vcpkg/ports/readosm/fix-makefiles.patch b/vcpkg/ports/readosm/fix-makefiles.patch new file mode 100644 index 0000000..3904b51 --- /dev/null +++ b/vcpkg/ports/readosm/fix-makefiles.patch @@ -0,0 +1,49 @@ +diff --git a/makefile.vc b/makefile.vc +index 791aedf..d294548 100644 +--- a/makefile.vc ++++ b/makefile.vc +@@ -8,7 +8,7 @@ LIBOBJ = src\readosm.obj src\osmxml.obj \ + src\protobuf.obj src\osm_objects.obj + READOSM_DLL = readosm$(VERSION).dll + +-CFLAGS = /nologo -IC:\OSGeo4W\include -Iheaders $(OPTFLAGS) ++CFLAGS = /nologo -I$(INSTALLED_ROOT)\include -Iheaders $(OPTFLAGS) + + default: all + +@@ -21,9 +21,9 @@ readosm.lib: $(LIBOBJ) + $(READOSM_DLL): readosm_i.lib + + readosm_i.lib: $(LIBOBJ) +- link /debug /dll /out:$(READOSM_DLL) \ ++ link $(LINK_FLAGS) /dll /out:$(READOSM_DLL) \ + /implib:readosm_i.lib $(LIBOBJ) \ +- C:\OSGeo4w\lib\libexpat.lib C:\OSGeo4w\lib\zlib.lib ++ $(LIBS_ALL) + if exist $(READOSM_DLL).manifest mt -manifest \ + $(READOSM_DLL).manifest -outputresource:$(READOSM_DLL);2 + +@@ -35,7 +35,7 @@ clean: + del *.exp + del *.manifest + del *.lib +- del *.obj ++ del src\*.obj + del *.pdb + + install: all +diff --git a/nmake.opt b/nmake.opt +index 5e45c0e..61c44f9 100644 +--- a/nmake.opt ++++ b/nmake.opt +@@ -1,8 +1,8 @@ + # Directory tree where ReadOSM will be installed. +-INSTDIR=C:\OSGeo4W ++INSTDIR=$(INST_DIR) + + # Uncomment the first for an optimized build, or the second for debug. +-OPTFLAGS= /nologo /Ox /fp:precise /W3 /MD /D_CRT_SECURE_NO_WARNINGS \ ++OPTFLAGS= /nologo /fp:precise /W3 $(CL_FLAGS) /D_CRT_SECURE_NO_WARNINGS \ + /DDLL_EXPORT + #OPTFLAGS= /nologo /Zi /MD /Fdreadosm.pdb /DDLL_EXPORT + diff --git a/vcpkg/ports/readosm/fix-version-macro.patch b/vcpkg/ports/readosm/fix-version-macro.patch new file mode 100644 index 0000000..b091b33 --- /dev/null +++ b/vcpkg/ports/readosm/fix-version-macro.patch @@ -0,0 +1,13 @@ +diff --git a/src/readosm.c b/src/readosm.c +index e1dda27..7977339 100644 +--- a/src/readosm.c ++++ b/src/readosm.c +@@ -50,7 +50,7 @@ + + #if defined(_WIN32) && !defined(__MINGW32__) + /* MSVC: avoiding to include at all config.h */ +-#define VERSION 1.1.0 ++#define VERSION "1.1.0" + #else + #include "config.h" + #endif diff --git a/vcpkg/ports/readosm/portfile.cmake b/vcpkg/ports/readosm/portfile.cmake new file mode 100644 index 0000000..522e6fd --- /dev/null +++ b/vcpkg/ports/readosm/portfile.cmake @@ -0,0 +1,88 @@ +vcpkg_fail_port_install(ON_TARGET "Linux" "OSX" "UWP") + +vcpkg_download_distfile(ARCHIVE + URLS "http://www.gaia-gis.it/gaia-sins/readosm-sources/readosm-1.1.0.tar.gz" + FILENAME "readosm-1.1.0.tar.gz" + SHA512 d3581f564c4461c6a1a3d5fd7d18a262c884b2ac935530064bfaebd6c05d692fb92cc600fb40e87e03f7160ebf0eeeb05f51a0e257935d056b233fe28fc01a11 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + fix-makefiles.patch + fix-version-macro.patch +) + +find_program(NMAKE nmake) + +if(VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(LIBS_ALL_DBG "\"${CURRENT_INSTALLED_DIR}/debug/lib/libexpatd.lib\" \"${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib\"") + set(LIBS_ALL_REL "\"${CURRENT_INSTALLED_DIR}/lib/libexpat.lib\" \"${CURRENT_INSTALLED_DIR}/lib/zlib.lib\"") + set(CL_FLAGS_DBG "/MDd /Zi") + set(CL_FLAGS_REL "/MD /Ox") +else() + set(LIBS_ALL_DBG "\"${CURRENT_INSTALLED_DIR}/debug/lib/libexpatdMD.lib\" \"${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib\"") + set(LIBS_ALL_REL "\"${CURRENT_INSTALLED_DIR}/lib/libexpatMD.lib\" \"${CURRENT_INSTALLED_DIR}/lib/zlib.lib\"") + set(CL_FLAGS_DBG "/MTd /Zi") + set(CL_FLAGS_REL "/MT /Ox") +endif() + +################ +# Debug build +################ +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Building ${TARGET_TRIPLET}-dbg") + + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}/debug" INST_DIR_DBG) + + vcpkg_execute_required_process( + COMMAND ${NMAKE} -f makefile.vc clean install + INST_DIR="${INST_DIR_DBG}" INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" "LINK_FLAGS=/debug" "CL_FLAGS=${CL_FLAGS_DBG}" + "LIBS_ALL=${LIBS_ALL_DBG}" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME nmake-build-${TARGET_TRIPLET}-debug + ) + vcpkg_copy_pdbs() + message(STATUS "Building ${TARGET_TRIPLET}-dbg done") +endif() + +################ +# Release build +################ +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Building ${TARGET_TRIPLET}-rel") + + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL) + vcpkg_execute_required_process( + COMMAND ${NMAKE} -f makefile.vc clean install + INST_DIR="${INST_DIR_REL}" INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}" "LINK_FLAGS=" "CL_FLAGS=${CL_FLAGS_REL}" + "LIBS_ALL=${LIBS_ALL_REL}" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME nmake-build-${TARGET_TRIPLET}-release + ) + message(STATUS "Building ${TARGET_TRIPLET}-rel done") +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/readosm_i.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/readosm_i.lib) +else() + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/readosm.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/readosm.lib) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/readosm_i.lib ${CURRENT_PACKAGES_DIR}/lib/readosm.lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/readosm_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/readosm.lib) + endif() +endif() + +message(STATUS "Packaging ${TARGET_TRIPLET} done") + +#Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/realsense2/CONTROL b/vcpkg/ports/realsense2/CONTROL new file mode 100644 index 0000000..bd0e05a --- /dev/null +++ b/vcpkg/ports/realsense2/CONTROL @@ -0,0 +1,16 @@ +Source: realsense2 +Version: 2.38.1 +Homepage: https://github.com/IntelRealSense/librealsense +Description: Intel® RealSense™ SDK 2.0 is a cross-platform library for Intel® RealSense™ depth cameras (D400 series and the SR300). +Build-Depends: libusb(linux) + +Feature: tools +Build-Depends: opengl, glfw3 +Description: Build Intel® RealSense™ examples and tools + +Feature: openni2 +Build-Depends: openni2 +Description: Build Intel® RealSense™ OpenNI2 driver + +Feature: tm2 +Description: Build Intel® RealSense™ T265 device diff --git a/vcpkg/ports/realsense2/fix-dependency-glfw3.patch b/vcpkg/ports/realsense2/fix-dependency-glfw3.patch new file mode 100644 index 0000000..c11a5cd --- /dev/null +++ b/vcpkg/ports/realsense2/fix-dependency-glfw3.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 16ced1b..ef1b158 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -69,7 +69,7 @@ include(CMake/install_config.cmake) + add_subdirectory(wrappers) + + if (BUILD_EXAMPLES AND BUILD_GLSL_EXTENSIONS) +- find_package(glfw3 3.3 QUIET) ++ find_package(glfw3 CONFIG REQUIRED) + if(NOT TARGET glfw) + message(STATUS "GLFW 3.3 not found; using internal version") + set(GLFW_INSTALL ON CACHE BOOL "" FORCE) diff --git a/vcpkg/ports/realsense2/fix_openni2.patch b/vcpkg/ports/realsense2/fix_openni2.patch new file mode 100644 index 0000000..541f837 --- /dev/null +++ b/vcpkg/ports/realsense2/fix_openni2.patch @@ -0,0 +1,18 @@ +diff --git a/wrappers/openni2/CMakeLists.txt b/wrappers/openni2/CMakeLists.txt +index 0eee84c2..769e67ff 100755 +--- a/wrappers/openni2/CMakeLists.txt ++++ b/wrappers/openni2/CMakeLists.txt +@@ -6,12 +6,7 @@ set(OPENNI2_DIR "c:/Program Files/OpenNI2" CACHE FILEPATH "OpenNI2 SDK directory + set(REALSENSE2_DIR "c:/Program Files (x86)/Intel RealSense SDK 2.0" CACHE FILEPATH "RealSense2 SDK directory") + + # INCLUDE DIR +-if (UNIX) +- include_directories (${OPENNI2_DIR}) +-else () +- include_directories (${OPENNI2_DIR}/Include) +-endif () +- ++include_directories (${OPENNI2_DIR}) + include_directories (${REALSENSE2_DIR}/include) + include_directories (src) + diff --git a/vcpkg/ports/realsense2/portfile.cmake b/vcpkg/ports/realsense2/portfile.cmake new file mode 100644 index 0000000..2a64e8e --- /dev/null +++ b/vcpkg/ports/realsense2/portfile.cmake @@ -0,0 +1,87 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO IntelRealSense/librealsense + REF 0adceb9dc6fce63c348346e1aef1b63c052a1db9 #v2.38.1 + SHA512 bbbbf1afd4227d7cd46cb47c5cd71bc430c439ee1d8a54b3d1732017e2d34d9d696ced12c4d2449ce153b3deed422f6b3d2f561b44ca373ec9c69d5d3a766090 + HEAD_REF master + PATCHES + fix_openni2.patch + fix-dependency-glfw3.patch +) + +file(COPY ${SOURCE_PATH}/src/win7/drivers/IntelRealSense_D400_series_win7.inf DESTINATION ${SOURCE_PATH}) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" BUILD_CRT_LINKAGE) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tm2 BUILD_WITH_TM2 +) + +set(BUILD_TOOLS OFF) +if("tools" IN_LIST FEATURES) + set(BUILD_TOOLS ON) +endif() + +set(BUILD_OPENNI2_BINDINGS OFF) +if(("openni2" IN_LIST FEATURES) AND (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")) + set(BUILD_OPENNI2_BINDINGS ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DENFORCE_METADATA=ON + -DBUILD_WITH_OPENMP=OFF + -DBUILD_UNIT_TESTS=OFF + -DBUILD_WITH_STATIC_CRT=${BUILD_CRT_LINKAGE} + -DBUILD_OPENNI2_BINDINGS=${BUILD_OPENNI2_BINDINGS} + -DOPENNI2_DIR=${CURRENT_INSTALLED_DIR}/include/openni2 + OPTIONS_RELEASE + -DBUILD_EXAMPLES=${BUILD_TOOLS} + -DBUILD_GRAPHICAL_EXAMPLES=${BUILD_TOOLS} + OPTIONS_DEBUG + -DBUILD_EXAMPLES=OFF + -DBUILD_GRAPHICAL_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/realsense2) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +if(BUILD_TOOLS) + file(GLOB EXEFILES_RELEASE + ${CURRENT_PACKAGES_DIR}/bin/rs-* + ${CURRENT_PACKAGES_DIR}/bin/realsense-* + ) + + if (EXEFILES_RELEASE) + file(COPY ${EXEFILES_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/realsense2) + file(REMOVE ${EXEFILES_RELEASE}) + endif() + + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/realsense2) + + file(GLOB BINS ${CURRENT_PACKAGES_DIR}/bin/*) + if(NOT BINS) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() + + # Issue#7109, remove mismatched dlls and libs when build with tools, this workaround should be removed when the post-build checks related feature implemented. + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/realsense2-gl.lib) + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/realsense2-gl.dll) + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/realsense2-gl.pdb) +endif() + +if(BUILD_OPENNI2_BINDINGS) + file(GLOB RS2DRIVER ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/_out/rs2driver*) + if(RS2DRIVER) + file(COPY ${RS2DRIVER} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/openni2/OpenNI2/Drivers) + endif() +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/recast/CMakeLists.txt b/vcpkg/ports/recast/CMakeLists.txt new file mode 100644 index 0000000..5b54f6e --- /dev/null +++ b/vcpkg/ports/recast/CMakeLists.txt @@ -0,0 +1,57 @@ +cmake_minimum_required(VERSION 3.8) +project(recast) + +include_directories( + DebugUtils/Include + Detour/Include + DetourCrowd/Include + DetourTileCache/Include + Recast/Include +) + +set(SRC + DebugUtils/Source/DebugDraw.cpp + DebugUtils/Source/DetourDebugDraw.cpp + DebugUtils/Source/RecastDebugDraw.cpp + DebugUtils/Source/RecastDump.cpp + Detour/Source/DetourAlloc.cpp + Detour/Source/DetourCommon.cpp + Detour/Source/DetourNavMesh.cpp + Detour/Source/DetourNavMeshBuilder.cpp + Detour/Source/DetourNavMeshQuery.cpp + Detour/Source/DetourNode.cpp + DetourCrowd/Source/DetourCrowd.cpp + DetourCrowd/Source/DetourLocalBoundary.cpp + DetourCrowd/Source/DetourObstacleAvoidance.cpp + DetourCrowd/Source/DetourPathCorridor.cpp + DetourCrowd/Source/DetourPathQueue.cpp + DetourCrowd/Source/DetourProximityGrid.cpp + DetourTileCache/Source/DetourTileCache.cpp + DetourTileCache/Source/DetourTileCacheBuilder.cpp + Recast/Source/Recast.cpp + Recast/Source/RecastAlloc.cpp + Recast/Source/RecastArea.cpp + Recast/Source/RecastContour.cpp + Recast/Source/RecastFilter.cpp + Recast/Source/RecastLayers.cpp + Recast/Source/RecastMesh.cpp + Recast/Source/RecastMeshDetail.cpp + Recast/Source/RecastRasterization.cpp + Recast/Source/RecastRegion.cpp +) + +add_library(recast ${SRC}) + +install( + TARGETS recast + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY DebugUtils/Include/ DESTINATION include/recast/DebugUtils) + install(DIRECTORY Detour/Include/ DESTINATION include/recast/Detour) + install(DIRECTORY DetourCrowd/Include/ DESTINATION include/recast/DetourCrowd) + install(DIRECTORY DetourTileCache/Include/ DESTINATION include/recast/DetourTileCache) + install(DIRECTORY Recast/Include/ DESTINATION include/recast/Recast) +endif() diff --git a/vcpkg/ports/recast/CONTROL b/vcpkg/ports/recast/CONTROL new file mode 100644 index 0000000..3726b99 --- /dev/null +++ b/vcpkg/ports/recast/CONTROL @@ -0,0 +1,4 @@ +Source: recast +Version: 1.5.1-3 +Homepage: https://github.com/recastnavigation/recastnavigation +Description: Navigation-mesh Toolset for Games diff --git a/vcpkg/ports/recast/portfile.cmake b/vcpkg/ports/recast/portfile.cmake new file mode 100644 index 0000000..a84d06e --- /dev/null +++ b/vcpkg/ports/recast/portfile.cmake @@ -0,0 +1,25 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO recastnavigation/recastnavigation + REF 1.5.1 + SHA512 09900d8893e0c633a79e6188d15e68d1047040a0f2bceb2542f486dded64e69b918eaae159def81416a014fae26a46502783a2a712462bee4be2a3edf7bef47f + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/recast RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/redis-plus-plus/CONTROL b/vcpkg/ports/redis-plus-plus/CONTROL new file mode 100644 index 0000000..77a355f --- /dev/null +++ b/vcpkg/ports/redis-plus-plus/CONTROL @@ -0,0 +1,5 @@ +Source: redis-plus-plus +Version: 1.1.2 +Homepage: https://github.com/sewenew/redis-plus-plus +Description: This is a C++ client for Redis. It's based on hiredis, and written in C++ 11. +Build-Depends: hiredis \ No newline at end of file diff --git a/vcpkg/ports/redis-plus-plus/portfile.cmake b/vcpkg/ports/redis-plus-plus/portfile.cmake new file mode 100644 index 0000000..5878671 --- /dev/null +++ b/vcpkg/ports/redis-plus-plus/portfile.cmake @@ -0,0 +1,26 @@ +#Blocked by ninja: error: build.ninja:348: multiple rules generate lib/redis++.lib [-w dupbuild=err] +vcpkg_fail_port_install(ON_TARGET "Windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sewenew/redis-plus-plus + REF b08b36a9a91de00636e583307610f49af7876f50 # 1.1.2 + SHA512 6dcead9fca9e7082ace28dcd72a1b325e229297080eea3e5a28ef5e6b9e4a7d1bcb3568997a5e7a031d7937a025a017ed92d7869db5829ba6113783c84bc5a68 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DREDIS_PLUS_PLUS_BUILD_TEST=OFF +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright ) \ No newline at end of file diff --git a/vcpkg/ports/refl-cpp/CONTROL b/vcpkg/ports/refl-cpp/CONTROL new file mode 100644 index 0000000..bb75e1e --- /dev/null +++ b/vcpkg/ports/refl-cpp/CONTROL @@ -0,0 +1,4 @@ +Source: refl-cpp +Version: 0.9.1 +Description: A compile-time reflection library for modern C++ with support for overloads, templates, attributes and proxies +Homepage: https://github.com/veselink1/refl-cpp diff --git a/vcpkg/ports/refl-cpp/portfile.cmake b/vcpkg/ports/refl-cpp/portfile.cmake new file mode 100644 index 0000000..999dd1c --- /dev/null +++ b/vcpkg/ports/refl-cpp/portfile.cmake @@ -0,0 +1,13 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO veselink1/refl-cpp + REF v0.9.1 + SHA512 ddb48d7f75cf7757031af28b53d07a104cb64e279c8fc23575639c3839f1501b346e40963d358629b612e4f64aba6f86ffc5a592dd6cd8febf872a8cd1466171 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/refl.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/refprop-headers/CONTROL b/vcpkg/ports/refprop-headers/CONTROL new file mode 100644 index 0000000..4ec002c --- /dev/null +++ b/vcpkg/ports/refprop-headers/CONTROL @@ -0,0 +1,4 @@ +Source: refprop-headers +Version: 2019-04-14 +Homepage: https://github.com/CoolProp/REFPROP-headers +Description: The REFPROP Headers diff --git a/vcpkg/ports/refprop-headers/portfile.cmake b/vcpkg/ports/refprop-headers/portfile.cmake new file mode 100644 index 0000000..befb018 --- /dev/null +++ b/vcpkg/ports/refprop-headers/portfile.cmake @@ -0,0 +1,16 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO CoolProp/REFPROP-headers + REF 8df35c7cb557d385bb66431e92e836104a63a33c + SHA512 4424d036c3cd6c9028fffbeda0919d38f4b0a290fb141c6d1ff26c70cd416d9a0d2e1584c51b6ad2e989e84a8a71660f62dadaa88bb22428972165ba01131cb2 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/REFPROP_lib.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +file( + INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/refprop-headers + RENAME copyright +) diff --git a/vcpkg/ports/replxx/CONTROL b/vcpkg/ports/replxx/CONTROL new file mode 100644 index 0000000..efc7b33 --- /dev/null +++ b/vcpkg/ports/replxx/CONTROL @@ -0,0 +1,5 @@ +Source: replxx +Version: 0.0.2-2 +Homepage: https://github.com/AmokHuginnsson/replxx +Description: A small, portable GNU readline replacement for Linux, Windows and MacOS which is capable of handling UTF-8 characters. +Supports: !uwp diff --git a/vcpkg/ports/replxx/add-stdexcept.patch b/vcpkg/ports/replxx/add-stdexcept.patch new file mode 100644 index 0000000..51fe014 --- /dev/null +++ b/vcpkg/ports/replxx/add-stdexcept.patch @@ -0,0 +1,17 @@ +diff --git a/src/io.cxx b/src/io.cxx +index a098867..6159e4b 100644 +--- a/src/io.cxx ++++ b/src/io.cxx +@@ -2,6 +2,7 @@ + #include + #include + #include ++#include + #include + + #ifdef _WIN32 +@@ -671,4 +672,3 @@ int Terminal::read_verbatim( char32_t* buffer_, int size_ ) { + #endif + + } +- diff --git a/vcpkg/ports/replxx/portfile.cmake b/vcpkg/ports/replxx/portfile.cmake new file mode 100644 index 0000000..cbf2c64 --- /dev/null +++ b/vcpkg/ports/replxx/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO AmokHuginnsson/replxx + REF 45696c250ce39ab21dedeea962b94d7827007a8c + SHA512 7beec508fa3049fe5a736a487728506d646d26d7194ef7453fc07bceade1982430808fab0a10ca9b1c43a8b87bf3a973f5cfe4aa22ed06927647c9a7244167fd + HEAD_REF master + PATCHES + add-stdexcept.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/replxxConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/replxx/replxxConfig.cmake b/vcpkg/ports/replxx/replxxConfig.cmake new file mode 100644 index 0000000..680ffc3 --- /dev/null +++ b/vcpkg/ports/replxx/replxxConfig.cmake @@ -0,0 +1,20 @@ +function(set_library_target NAMESPACE LIB_NAME DEBUG_LIB_FILE_NAME RELEASE_LIB_FILE_NAME INCLUDE_DIR) + add_library(${NAMESPACE}::${LIB_NAME} STATIC IMPORTED) + set_target_properties(${NAMESPACE}::${LIB_NAME} PROPERTIES + IMPORTED_CONFIGURATIONS "RELEASE;DEBUG" + IMPORTED_LOCATION_RELEASE "${RELEASE_LIB_FILE_NAME}" + IMPORTED_LOCATION_DEBUG "${DEBUG_LIB_FILE_NAME}" + INTERFACE_INCLUDE_DIRECTORIES "${INCLUDE_DIR}" + ) + set(${NAMESPACE}_${LIB_NAME}_FOUND 1) +endfunction() + +get_filename_component(ROOT "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(ROOT "${ROOT}" PATH) +get_filename_component(ROOT "${ROOT}" PATH) + +if (CMAKE_HOST_WIN32) + set_library_target("REPLXX" "replxx" "${ROOT}/debug/lib/replxx-d.lib" "${ROOT}/lib/replxx.lib" "${ROOT}/include/") +else () + set_library_target("REPLXX" "replxx" "${ROOT}/debug/lib/libreplxx-d.a" "${ROOT}/lib/libreplxx.a" "${ROOT}/include/") +endif () diff --git a/vcpkg/ports/replxx/usage b/vcpkg/ports/replxx/usage new file mode 100644 index 0000000..5be6488 --- /dev/null +++ b/vcpkg/ports/replxx/usage @@ -0,0 +1,4 @@ +The package replxx is compatible with built-in CMake targets: + + FIND_PACKAGE(replxx REQUIRED) + TARGET_LINK_LIBRARIES(main PRIVATE REPLXX::replxx) diff --git a/vcpkg/ports/reproc/CONTROL b/vcpkg/ports/reproc/CONTROL new file mode 100644 index 0000000..36dee10 --- /dev/null +++ b/vcpkg/ports/reproc/CONTROL @@ -0,0 +1,4 @@ +Source: reproc +Version: 12.0.0 +Description: Cross-platform (C99/C++11) process library +Homepage: https://github.com/DaanDeMeyer/reproc diff --git a/vcpkg/ports/reproc/portfile.cmake b/vcpkg/ports/reproc/portfile.cmake new file mode 100644 index 0000000..09989d8 --- /dev/null +++ b/vcpkg/ports/reproc/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO DaanDeMeyer/reproc + REF 8a46b552d28b15ef584f9a6153c2c866754f7b94 # v12.0.0 + SHA512 df5b9b2024a2f8e0ed3ac3d0f8df4b251601a91c037b0a81825fd7a0b034ed2e3fbd1d107fa307b00b828b15ac74fccd85df58686a7ab74de82640a889c680b2 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DREPROC++=ON + -DREPROC_INSTALL_PKGCONFIG=OFF + -DREPROC_INSTALL_CMAKECONFIGDIR=share +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +foreach(TARGET reproc reproc++) + vcpkg_fixup_cmake_targets( + CONFIG_PATH share/${TARGET} + TARGET_PATH share/${TARGET} + ) +endforeach() + +file( + INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) diff --git a/vcpkg/ports/rest-rpc/CONTROL b/vcpkg/ports/rest-rpc/CONTROL new file mode 100644 index 0000000..ed7023b --- /dev/null +++ b/vcpkg/ports/rest-rpc/CONTROL @@ -0,0 +1,6 @@ +Source: rest-rpc +Version: 0.07 +Port-Version: 1 +Homepage: https://github.com/qicosmos/rest_rpc +Description: c++11, high performance, cross platform, easy to use rpc framework +Build-Depends: asio diff --git a/vcpkg/ports/rest-rpc/portfile.cmake b/vcpkg/ports/rest-rpc/portfile.cmake new file mode 100644 index 0000000..551ff14 --- /dev/null +++ b/vcpkg/ports/rest-rpc/portfile.cmake @@ -0,0 +1,28 @@ +if (EXISTS ${CURRENT_INSTALLED_DIR}/include/msgpack/pack.h) + message(FATAL_ERROR "Cannot install ${PORT} when msgpack is already installed, please remove msgpack using \"./vcpkg remove msgpack:${TARGET_TRIPLET}\"") +endif() + +# header-only library +set(RESTRPC_VERSION V0.07) +set(RESTRPC_HASH 148152776c8c4f16e404c62ab3f46618e1817c0b4b186dbcc399c859efd110ed5a207bf56e961c312f80844f696f597068e0abc00e426409d50a2889d30c6d8e) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/rest-rpc-${RESTRPC_VERSION}) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO qicosmos/rest_rpc + REF ${RESTRPC_VERSION} + SHA512 ${RESTRPC_HASH} + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/third/msgpack/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +vcpkg_replace_string( + "${CURRENT_PACKAGES_DIR}/include/rest_rpc.hpp" + "#include \"rest_rpc/rpc_server.h\"" + "#define ASIO_STANDALONE\n#include \"rest_rpc/rpc_server.h\"" +) + +# # Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/restbed/CONTROL b/vcpkg/ports/restbed/CONTROL new file mode 100644 index 0000000..7259f92 --- /dev/null +++ b/vcpkg/ports/restbed/CONTROL @@ -0,0 +1,8 @@ +Source: restbed +Version: 4.16-07-28-2018-2 +Description: Corvusoft's Restbed framework brings asynchronous RESTful functionality to C++11 applications. +Build-Depends: asio + +Feature: openssl +Build-Depends: openssl +Description: Secure over the wire communication allowing you to transmit private data online. diff --git a/vcpkg/ports/restbed/add_openssl_support.patch b/vcpkg/ports/restbed/add_openssl_support.patch new file mode 100644 index 0000000..72d4dc4 --- /dev/null +++ b/vcpkg/ports/restbed/add_openssl_support.patch @@ -0,0 +1,37 @@ +diff --git a/cmake/Findopenssl.cmake b/cmake/Findopenssl.cmake +index 8db9799..626ff55 100644 +--- a/cmake/Findopenssl.cmake ++++ b/cmake/Findopenssl.cmake +@@ -1,24 +1,7 @@ +-find_library( ssl_LIBRARY_STATIC libssl.a ssleay32.lib HINTS "${PROJECT_SOURCE_DIR}/dependency/openssl/out32dll" "${PROJECT_SOURCE_DIR}/dependency/openssl" "/usr/local/opt/openssl/lib" "/usr/lib" "/usr/local/lib" "/opt/local/lib" ) +-find_library( crypto_LIBRARY_STATIC libcrypto.a libeay32.lib HINTS "${PROJECT_SOURCE_DIR}/dependency/openssl/out32dll" "${PROJECT_SOURCE_DIR}/dependency/openssl" "/usr/local/opt/openssl/lib" "/usr/lib" "/usr/local/lib" "/opt/local/lib" ) +- +-find_library( ssl_LIBRARY_SHARED libssl.so libssl.dylib ssleay32.dll HINTS "${PROJECT_SOURCE_DIR}/dependency/openssl/out32dll" "${PROJECT_SOURCE_DIR}/dependency/openssl" "/usr/local/opt/openssl/lib" "/usr/lib" "/usr/local/lib" "/opt/local/lib" ) +-find_library( crypto_LIBRARY_SHARED libcrypto.so libcrypto.dylib libeay32.dll HINTS "${PROJECT_SOURCE_DIR}/dependency/openssl/out32dll" "${PROJECT_SOURCE_DIR}/dependency/openssl" "/usr/local/opt/openssl/lib" "/usr/lib" "/usr/local/lib" "/opt/local/lib" ) +- +-find_path( ssl_INCLUDE openssl/ssl.h HINTS "${PROJECT_SOURCE_DIR}/dependency/openssl/inc32" "${PROJECT_SOURCE_DIR}/dependency/openssl/include" "/usr/local/opt/openssl/include" "/usr/include" "/usr/local/include" "/opt/local/include" ) +- +-if ( ssl_LIBRARY_STATIC AND ssl_LIBRARY_SHARED AND crypto_LIBRARY_STATIC AND crypto_LIBRARY_SHARED ) +- set( OPENSSL_FOUND TRUE ) +- add_definitions( -DBUILD_SSL=TRUE ) +- +- if ( APPLE AND BUILD_SSL ) +- set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations" ) +- endif( ) +- +- message( STATUS "Found OpenSSL include at: ${ssl_INCLUDE}" ) +- message( STATUS "Found OpenSSL library at: ${ssl_LIBRARY_STATIC}" ) +- message( STATUS "Found OpenSSL library at: ${ssl_LIBRARY_SHARED}" ) +- message( STATUS "Found Crypto library at: ${crypto_LIBRARY_STATIC}" ) +- message( STATUS "Found Crypto library at: ${crypto_LIBRARY_SHARED}" ) +-else ( ) +- message( FATAL_ERROR "Failed to locate OpenSSL dependency. see restbed/dependency/openssl; ./config shared; make all" ) +-endif ( ) ++if (BUILD_SSL) ++ set( OPENSSL_FOUND TRUE ) ++ add_definitions( -DBUILD_SSL=TRUE ) ++ if ( APPLE AND BUILD_SSL ) ++ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations" ) ++ endif( ) ++endif() +\ No newline at end of file diff --git a/vcpkg/ports/restbed/cmake.patch b/vcpkg/ports/restbed/cmake.patch new file mode 100644 index 0000000..5d73409 --- /dev/null +++ b/vcpkg/ports/restbed/cmake.patch @@ -0,0 +1,59 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b66143e..85c5315 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -42,7 +42,9 @@ endif ( ) + set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake" ) + + find_package( asio REQUIRED ) ++if(NOT DISABLE_TESTS) + find_package( catch REQUIRED ) ++endif() + if ( BUILD_SSL ) + find_package( openssl REQUIRED ) + endif ( ) +@@ -54,6 +56,7 @@ include_directories( ${INCLUDE_DIR} SYSTEM ${asio_INCLUDE} ${kashmir_INCLUDE} ${ + # + file( GLOB_RECURSE MANIFEST "${SOURCE_DIR}/*.cpp" ) + ++if(NOT BUILD_SHARED_LIBS) + set( STATIC_LIBRARY_NAME "${PROJECT_NAME}-static" ) + add_library( ${STATIC_LIBRARY_NAME} STATIC ${MANIFEST} ) + set_property( TARGET ${STATIC_LIBRARY_NAME} PROPERTY CXX_STANDARD 11 ) +@@ -64,7 +67,9 @@ if ( BUILD_SSL ) + else ( ) + target_link_libraries( ${STATIC_LIBRARY_NAME} ) + endif ( ) ++endif() + ++if(BUILD_SHARED_LIBS) + set( SHARED_LIBRARY_NAME "${PROJECT_NAME}-shared" ) + add_library( ${SHARED_LIBRARY_NAME} SHARED ${MANIFEST} ) + set_property( TARGET ${SHARED_LIBRARY_NAME} PROPERTY CXX_STANDARD 11 ) +@@ -76,12 +81,15 @@ if ( BUILD_SSL ) + else ( ) + target_link_libraries( ${SHARED_LIBRARY_NAME} ) + endif ( ) ++endif() + ++if(NOT DISABLE_TESTS) + enable_testing( ) + add_subdirectory( "${PROJECT_SOURCE_DIR}/test/unit" ) + add_subdirectory( "${PROJECT_SOURCE_DIR}/test/feature" ) + add_subdirectory( "${PROJECT_SOURCE_DIR}/test/regression" ) + add_subdirectory( "${PROJECT_SOURCE_DIR}/test/integration" ) ++endif() + + # + # Install +@@ -90,5 +98,8 @@ file( GLOB ARTIFACTS "${SOURCE_DIR}/*.hpp" ) + + install( FILES "${INCLUDE_DIR}/${PROJECT_NAME}" DESTINATION "${CMAKE_INSTALL_PREFIX}/include" ) + install( FILES ${ARTIFACTS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include/corvusoft/${PROJECT_NAME}" ) +-install( TARGETS ${STATIC_LIBRARY_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library ) +-install( TARGETS ${SHARED_LIBRARY_NAME} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library ) ++if(NOT BUILD_SHARED_LIBS) ++install( TARGETS ${STATIC_LIBRARY_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library ) ++else() ++install( TARGETS ${SHARED_LIBRARY_NAME} RUNTIME DESTINATION bin LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library ) ++endif() diff --git a/vcpkg/ports/restbed/portfile.cmake b/vcpkg/ports/restbed/portfile.cmake new file mode 100644 index 0000000..5c653bd --- /dev/null +++ b/vcpkg/ports/restbed/portfile.cmake @@ -0,0 +1,36 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +set(USE_OPENSSL OFF) +if("openssl" IN_LIST FEATURES) + set(ADDITIONAL_PATCH "add_openssl_support.patch") + set(USE_OPENSSL ON) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Corvusoft/restbed + REF 0f8af8d8ed183a88e208adeb22da0080d5d74d1e + SHA512 f0175a10c88f1ad4f16c8e4cff7ceea7b80c56b0724b59791c23e91f1ecf146dfdbda9e9238d31a35f21d8cdcc413b586cc633725dd0ba87de6b599a7087916f + HEAD_REF master + PATCHES + cmake.patch + ${ADDITIONAL_PATCH} +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_SSL=${USE_OPENSSL} + -DDISABLE_TESTS=ON +) + +vcpkg_install_cmake() + +#Remove include debug files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/restbed/copyright COPYONLY) diff --git a/vcpkg/ports/restclient-cpp/CONTROL b/vcpkg/ports/restclient-cpp/CONTROL new file mode 100644 index 0000000..df8faa7 --- /dev/null +++ b/vcpkg/ports/restclient-cpp/CONTROL @@ -0,0 +1,5 @@ +Source: restclient-cpp +Version: 0.5.2 +Build-Depends: curl +Homepage: https://code.mrtazz.com/restclient-cpp/ +Description: Simple REST client for C++. It wraps libcurl for HTTP requests. diff --git a/vcpkg/ports/restclient-cpp/portfile.cmake b/vcpkg/ports/restclient-cpp/portfile.cmake new file mode 100644 index 0000000..c2ea8fa --- /dev/null +++ b/vcpkg/ports/restclient-cpp/portfile.cmake @@ -0,0 +1,31 @@ +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mrtazz/restclient-cpp + REF 0.5.2 + SHA512 f6acc6a3d5cb852d6e507463d94d2f6192a941f0c26fef7c674e9ff7753cf5474522052a2065774050d01af5c6d2a3b86398f43cd2e4f5d03abcaac9a21ef4b7 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_DISABLE_FIND_PACKAGE_GTest=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_jsoncpp=TRUE +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/restclient-cpp) + +vcpkg_copy_pdbs() + +# Remove includes in debug +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/restinio/CONTROL b/vcpkg/ports/restinio/CONTROL new file mode 100644 index 0000000..290e167 --- /dev/null +++ b/vcpkg/ports/restinio/CONTROL @@ -0,0 +1,6 @@ +Source: restinio +Version: 0.6.10 +Description: A header-only C++14 library that gives you an embedded HTTP/Websocket server targeted primarily for asynchronous processing of HTTP-requests. +Build-Depends: asio, fmt, http-parser +Homepage: https://github.com/stiffstream/restinio + diff --git a/vcpkg/ports/restinio/portfile.cmake b/vcpkg/ports/restinio/portfile.cmake new file mode 100644 index 0000000..9a1995f --- /dev/null +++ b/vcpkg/ports/restinio/portfile.cmake @@ -0,0 +1,18 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO stiffstream/restinio + REF bac11ec9cd08e3d1ebe663a9be17f0808e74d7af # v.0.6.10 + SHA512 c41f71c13346ca07b78ec8d451c2a591e819eb7459386b24d527d349564562be582969e969dc18cbaf45e9689203c6f7d43e69245dd7af0f82d38afdcb8cd804 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/vcpkg + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/restinio) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug) +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/rhash/CMakeLists.txt b/vcpkg/ports/rhash/CMakeLists.txt new file mode 100644 index 0000000..b395b5c --- /dev/null +++ b/vcpkg/ports/rhash/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 3.5) +project(rhash C) + +file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/Makefile RHASH_SOURCES REGEX "^SOURCES = .*$") +string(REPLACE "SOURCES = " "" RHASH_SOURCES "${RHASH_SOURCES}") +string(REPLACE " " ";" RHASH_SOURCES "${RHASH_SOURCES}") + +add_library(rhash ${RHASH_SOURCES}) +set_target_properties(rhash PROPERTIES COMPILE_DEFINITIONS "IN_RHASH" DEFINE_SYMBOL "RHASH_EXPORTS") + +install(TARGETS rhash RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) + +if(NOT RHASH_SKIP_HEADERS) + install(FILES rhash.h rhash_torrent.h DESTINATION include) +endif() diff --git a/vcpkg/ports/rhash/CONTROL b/vcpkg/ports/rhash/CONTROL new file mode 100644 index 0000000..8e6aaa5 --- /dev/null +++ b/vcpkg/ports/rhash/CONTROL @@ -0,0 +1,5 @@ +Source: rhash +Version: 1.3.9 +Homepage: https://github.com/rhash/RHash +Description: C library for computing a wide variety of hash sums +Supports: !uwp diff --git a/vcpkg/ports/rhash/portfile.cmake b/vcpkg/ports/rhash/portfile.cmake new file mode 100644 index 0000000..91ed839 --- /dev/null +++ b/vcpkg/ports/rhash/portfile.cmake @@ -0,0 +1,25 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "UWP builds not supported") +endif() + +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rhash/RHash + REF 75716b45c21416c98c0ab2e3c2735b150e7afb03 # v1.3.9 + SHA512 dfadd7878aa88959f058b677ef96c9837e7efd851f45f2fbc93198c7ae1beadccbe1112b0e6c5822565eba102948d762b65b9cc46e43eeae97a9cd1f362c1554 + HEAD_REF master) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/librhash) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/librhash + PREFER_NINJA + OPTIONS_DEBUG + -DRHASH_SKIP_HEADERS=ON) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/rhash) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/rhash/COPYING ${CURRENT_PACKAGES_DIR}/share/rhash/copyright) diff --git a/vcpkg/ports/riffcpp/CONTROL b/vcpkg/ports/riffcpp/CONTROL new file mode 100644 index 0000000..2a872fa --- /dev/null +++ b/vcpkg/ports/riffcpp/CONTROL @@ -0,0 +1,4 @@ +Source: riffcpp +Version: 2.2.4 +Homepage: https://github.com/libdmusic/riffcpp +Description: Simple library for reading RIFF files diff --git a/vcpkg/ports/riffcpp/portfile.cmake b/vcpkg/ports/riffcpp/portfile.cmake new file mode 100644 index 0000000..057fe20 --- /dev/null +++ b/vcpkg/ports/riffcpp/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libdmusic/riffcpp + REF v2.2.4 + SHA512 abceba02441305267c444ed724ca769fa08369302eb74b7729b700883b9354f3db95d8c68ee15f25844a75f1609edd2bcf7482fc639b9e2d3ee3b8caf5e9585f + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DRIFFCPP_INSTALL_EXAMPLE=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/riffcpp) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/riffcpp/LICENSE ${CURRENT_PACKAGES_DIR}/share/riffcpp/copyright) +vcpkg_test_cmake(PACKAGE_NAME riffcpp) \ No newline at end of file diff --git a/vcpkg/ports/ring-span-lite/CONTROL b/vcpkg/ports/ring-span-lite/CONTROL new file mode 100644 index 0000000..9d620b7 --- /dev/null +++ b/vcpkg/ports/ring-span-lite/CONTROL @@ -0,0 +1,3 @@ +Source: ring-span-lite +Version: 0.3.0 +Description: A C++yy-like ring_span type for C++98, C++11 and later in a single-file header-only library diff --git a/vcpkg/ports/ring-span-lite/portfile.cmake b/vcpkg/ports/ring-span-lite/portfile.cmake new file mode 100644 index 0000000..b9b9930 --- /dev/null +++ b/vcpkg/ports/ring-span-lite/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO martinmoene/ring-span-lite + REF v0.3.0 + SHA512 5ecbfc63b4a09cc382edc2acae41a45946c9c6a18aa48e855201366b7696df7cbf46c2de1b5aa5296ae2dde4360d5abd8efdc3e3a1c3d427fbbddadab7dcfe79 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DRING_SPAN_LITE_OPT_BUILD_TESTS=OFF + -DRING_SPAN_LITE_OPT_BUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets( + CONFIG_PATH lib/cmake/${PORT} +) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/lib +) + +file(INSTALL + ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright +) diff --git a/vcpkg/ports/roaring/CONTROL b/vcpkg/ports/roaring/CONTROL new file mode 100644 index 0000000..0b1327d --- /dev/null +++ b/vcpkg/ports/roaring/CONTROL @@ -0,0 +1,3 @@ +Source: roaring +Version: 2019-03-05-2 +Description: A better compressed bitset in C (and C++) diff --git a/vcpkg/ports/roaring/portfile.cmake b/vcpkg/ports/roaring/portfile.cmake new file mode 100644 index 0000000..937fd07 --- /dev/null +++ b/vcpkg/ports/roaring/portfile.cmake @@ -0,0 +1,38 @@ +include(vcpkg_common_functions) + +if (TARGET_TRIPLET MATCHES "^x86") + message(WARNING "The CRoaring authors recommend users of this lib against using a 32-bit build.") +endif () + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO RoaringBitmap/CRoaring + REF ac3eaf56af8691374b63e53e842feff0322169f0 + SHA512 db10331559df1503bcd25f7f5cab1fdf6b29984634dbfd54289cd7750032a1dd25cd0b57b490cac3d0d3fd5bc785730617536a7162c6e59f66fadb77f972b1c4 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ROARING_BUILD_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DROARING_BUILD_STATIC=${ROARING_BUILD_STATIC} + -DENABLE_ROARING_TESTS=OFF +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/vcpkg/ports/robin-hood-hashing/CONTROL b/vcpkg/ports/robin-hood-hashing/CONTROL new file mode 100644 index 0000000..6aa499d --- /dev/null +++ b/vcpkg/ports/robin-hood-hashing/CONTROL @@ -0,0 +1,4 @@ +Source: robin-hood-hashing +Version: 3.8.0 +Homepage: https://github.com/martinus/robin-hood-hashing +Description: Fast & memory efficient hashtable based on robin hood hashing for C++11/14/17/20 diff --git a/vcpkg/ports/robin-hood-hashing/portfile.cmake b/vcpkg/ports/robin-hood-hashing/portfile.cmake new file mode 100644 index 0000000..4169c32 --- /dev/null +++ b/vcpkg/ports/robin-hood-hashing/portfile.cmake @@ -0,0 +1,12 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO martinus/robin-hood-hashing + REF 3.8.0 + SHA512 f64635a2fc3ebd975d40dc4fd3e3df81a6bed11e8bb9df1d6d100e408c2c81da2679e9836313444e573c6bfb160eeecd7fde68988e9d0246601c8993ecc42085 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/src/include/robin_hood.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/robin-map/CONTROL b/vcpkg/ports/robin-map/CONTROL new file mode 100644 index 0000000..5d84a48 --- /dev/null +++ b/vcpkg/ports/robin-map/CONTROL @@ -0,0 +1,3 @@ +Source: robin-map +Version: 0.6.2 +Description: A C++ implementation of a fast hash map and hash set using robin hood hashing diff --git a/vcpkg/ports/robin-map/portfile.cmake b/vcpkg/ports/robin-map/portfile.cmake new file mode 100644 index 0000000..291d79a --- /dev/null +++ b/vcpkg/ports/robin-map/portfile.cmake @@ -0,0 +1,17 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Tessil/robin-map + REF 908ccf9f039a0e50813544c0444ca664ca292d7c # v0.6.2 + SHA512 cad7508bf902c763dc7fd53b13bfb82933b174bf8cd1a77686b1763e72692b8f211e3a5e8ae87d7796d3a4dd121b077231bd01bd61a609c1a4c8f456a8161174 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/include/tsl DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/robin-map + RENAME copyright +) diff --git a/vcpkg/ports/rocksdb/0001-disable-gtest.patch b/vcpkg/ports/rocksdb/0001-disable-gtest.patch new file mode 100644 index 0000000..b3aa2d6 --- /dev/null +++ b/vcpkg/ports/rocksdb/0001-disable-gtest.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index eebda35e9..c00e6b702 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -888,7 +888,7 @@ option(WITH_TESTS "build with tests" ON) + # For test libraries, utilities, and exes that are build iff WITH_TESTS=ON and + # in Debug mode. Add test only code that is not #ifdefed for Release here. + if(WITH_TESTS AND CMAKE_BUILD_TYPE STREQUAL "Debug") +- add_subdirectory(third-party/gtest-1.8.1/fused-src/gtest) ++ #add_subdirectory(third-party/gtest-1.8.1/fused-src/gtest) + set(TESTS + cache/cache_test.cc + cache/lru_cache_test.cc diff --git a/vcpkg/ports/rocksdb/0002-only-build-one-flavor.patch b/vcpkg/ports/rocksdb/0002-only-build-one-flavor.patch new file mode 100644 index 0000000..668a36c --- /dev/null +++ b/vcpkg/ports/rocksdb/0002-only-build-one-flavor.patch @@ -0,0 +1,52 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index eebda35e9..abaf2fd00 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -850,23 +850,30 @@ if(NOT WIN32 OR ROCKSDB_INSTALL_ON_WINDOWS) + + install(DIRECTORY include/rocksdb COMPONENT devel DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + +- install( +- TARGETS ${ROCKSDB_STATIC_LIB} +- EXPORT RocksDBTargets +- COMPONENT devel +- ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" +- INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" +- ) +- +- install( +- TARGETS ${ROCKSDB_SHARED_LIB} +- EXPORT RocksDBTargets +- COMPONENT runtime +- ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" +- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" +- LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" +- INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" +- ) ++ if(NOT ROCKSDB_DISABLE_INSTALL_STATIC_LIB) ++ install( ++ TARGETS ${ROCKSDB_STATIC_LIB} ++ EXPORT RocksDBTargets ++ COMPONENT devel ++ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" ++ INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ++ ) ++ else() ++ set_target_properties(${ROCKSDB_STATIC_LIB} PROPERTIES EXCLUDE_FROM_ALL TRUE) ++ endif() ++ if(NOT ROCKSDB_DISABLE_INSTALL_SHARED_LIB) ++ install( ++ TARGETS ${ROCKSDB_SHARED_LIB} ++ EXPORT RocksDBTargets ++ COMPONENT runtime ++ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" ++ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ++ INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ++ ) ++ else() ++ set_target_properties(${ROCKSDB_SHARED_LIB} PROPERTIES EXCLUDE_FROM_ALL TRUE) ++ endif() + + install( + EXPORT RocksDBTargets diff --git a/vcpkg/ports/rocksdb/0003-use-find-package.patch b/vcpkg/ports/rocksdb/0003-use-find-package.patch new file mode 100644 index 0000000..5fa21da --- /dev/null +++ b/vcpkg/ports/rocksdb/0003-use-find-package.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index eebda35e9..cf48c7ad5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -67,7 +67,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "Windows") + else() + option(WITH_FOLLY_DISTRIBUTED_MUTEX "build with folly::DistributedMutex" OFF) + endif() +-if(MSVC) ++if(MSVC AND NOT VCPKG_TOOLCHAIN) + # Defaults currently different for GFLAGS. + # We will address find_package work a little later + option(WITH_GFLAGS "build with GFlags" OFF) diff --git a/vcpkg/ports/rocksdb/0004-static-linking-in-linux.patch b/vcpkg/ports/rocksdb/0004-static-linking-in-linux.patch new file mode 100644 index 0000000..afa4fd3 --- /dev/null +++ b/vcpkg/ports/rocksdb/0004-static-linking-in-linux.patch @@ -0,0 +1,18 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index eebda35e9..53ec5fced 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -781,7 +781,12 @@ if(WIN32) + set(LIBS ${ROCKSDB_STATIC_LIB} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) + else() + set(SYSTEM_LIBS ${CMAKE_THREAD_LIBS_INIT}) +- set(LIBS ${ROCKSDB_SHARED_LIB} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) ++ ++ if(ROCKSDB_DISABLE_INSTALL_SHARED_LIB) ++ set(LIBS ${ROCKSDB_STATIC_LIB} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) ++ else() ++ set(LIBS ${ROCKSDB_SHARED_LIB} ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) ++ endif() + + add_library(${ROCKSDB_SHARED_LIB} SHARED ${SOURCES}) + target_link_libraries(${ROCKSDB_SHARED_LIB} diff --git a/vcpkg/ports/rocksdb/0005-add-config-to-findpackage.patch b/vcpkg/ports/rocksdb/0005-add-config-to-findpackage.patch new file mode 100644 index 0000000..47cc222 --- /dev/null +++ b/vcpkg/ports/rocksdb/0005-add-config-to-findpackage.patch @@ -0,0 +1,34 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index eebda35e9..20bafd659 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -98,9 +98,9 @@ else() + endif() + + if(WITH_SNAPPY) +- find_package(snappy REQUIRED) ++ find_package(Snappy CONFIG REQUIRED) + add_definitions(-DSNAPPY) +- list(APPEND THIRDPARTY_LIBS snappy::snappy) ++ list(APPEND THIRDPARTY_LIBS Snappy::snappy) + endif() + + if(WITH_ZLIB) +@@ -122,7 +122,7 @@ else() + endif() + + if(WITH_LZ4) +- find_package(lz4 REQUIRED) ++ find_package(lz4 CONFIG REQUIRED) + add_definitions(-DLZ4) + list(APPEND THIRDPARTY_LIBS lz4::lz4) + endif() +@@ -131,7 +131,7 @@ else() + find_package(zstd REQUIRED) + add_definitions(-DZSTD) + include_directories(${ZSTD_INCLUDE_DIR}) +- list(APPEND THIRDPARTY_LIBS zstd::zstd) ++ list(APPEND THIRDPARTY_LIBS ${ZSTD_LIBRARY}) + endif() + endif() + diff --git a/vcpkg/ports/rocksdb/CONTROL b/vcpkg/ports/rocksdb/CONTROL new file mode 100644 index 0000000..8e78cfc --- /dev/null +++ b/vcpkg/ports/rocksdb/CONTROL @@ -0,0 +1,25 @@ +Source: rocksdb +Version: 6.6.4-1 +Homepage: https://github.com/facebook/rocksdb +Description: A library that provides an embeddable, persistent key-value store for fast storage +Default-Features: zlib + +Feature: lz4 +Build-Depends: lz4 +Description: lz4 support in rocksdb + +Feature: snappy +Build-Depends: snappy +Description: snappy support in rocksdb + +Feature: zlib +Build-Depends: zlib +Description: zlib support in rocksdb + +Feature: tbb +Build-Depends: tbb +Description: tbb support in rocksdb + +Feature: zstd +Build-Depends: zstd +Description: zstd support in rocksdb diff --git a/vcpkg/ports/rocksdb/Findlz4.cmake b/vcpkg/ports/rocksdb/Findlz4.cmake new file mode 100644 index 0000000..f80962c --- /dev/null +++ b/vcpkg/ports/rocksdb/Findlz4.cmake @@ -0,0 +1,13 @@ +find_path(LZ4_INCLUDE_DIR lz4.h) + +find_library(LZ4_LIBRARY_DEBUG NAMES lz4d) +find_library(LZ4_LIBRARY_RELEASE NAMES lz4) + +include(SelectLibraryConfigurations) +select_library_configurations(LZ4) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS( + LZ4 DEFAULT_MSG + LZ4_LIBRARY LZ4_INCLUDE_DIR +) diff --git a/vcpkg/ports/rocksdb/Findsnappy.cmake b/vcpkg/ports/rocksdb/Findsnappy.cmake new file mode 100644 index 0000000..253d0d8 --- /dev/null +++ b/vcpkg/ports/rocksdb/Findsnappy.cmake @@ -0,0 +1,13 @@ +find_path(SNAPPY_INCLUDE_DIR snappy.h) + +find_library(SNAPPY_LIBRARY_DEBUG NAMES snappyd) +find_library(SNAPPY_LIBRARY_RELEASE NAMES snappy) + +include(SelectLibraryConfigurations) +select_library_configurations(SNAPPY) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS( + SNAPPY DEFAULT_MSG + SNAPPY_LIBRARY SNAPPY_INCLUDE_DIR +) diff --git a/vcpkg/ports/rocksdb/Findzstd.cmake b/vcpkg/ports/rocksdb/Findzstd.cmake new file mode 100644 index 0000000..627e4d3 --- /dev/null +++ b/vcpkg/ports/rocksdb/Findzstd.cmake @@ -0,0 +1,13 @@ +find_path(ZSTD_INCLUDE_DIR zstd.h) + +find_library(ZSTD_LIBRARY_DEBUG NAMES zstdd zstd_staticd) +find_library(ZSTD_LIBRARY_RELEASE NAMES zstd zstd_static) + +include(SelectLibraryConfigurations) +select_library_configurations(ZSTD) + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS( + ZSTD DEFAULT_MSG + ZSTD_LIBRARY ZSTD_INCLUDE_DIR +) diff --git a/vcpkg/ports/rocksdb/portfile.cmake b/vcpkg/ports/rocksdb/portfile.cmake new file mode 100644 index 0000000..56afc1c --- /dev/null +++ b/vcpkg/ports/rocksdb/portfile.cmake @@ -0,0 +1,69 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO facebook/rocksdb + REF v6.6.4 + SHA512 22f5105244c55ca7030cc8d7ee06cb87f4afdfc85b3f44f7512a9c9c41c037c3b70fd291ec1b0df2553a93b770e11abc4ae2d7f984b2a0f1addd26d424c09539 + HEAD_REF master + PATCHES + 0001-disable-gtest.patch + 0002-only-build-one-flavor.patch + 0003-use-find-package.patch + 0004-static-linking-in-linux.patch + 0005-add-config-to-findpackage.patch +) + +file(REMOVE "${SOURCE_PATH}/cmake/modules/Findzlib.cmake") +file(COPY + "${CMAKE_CURRENT_LIST_DIR}/Findlz4.cmake" + "${CMAKE_CURRENT_LIST_DIR}/Findsnappy.cmake" + "${CMAKE_CURRENT_LIST_DIR}/Findzstd.cmake" + DESTINATION "${SOURCE_PATH}/cmake/modules" +) + +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" WITH_MD_LIBRARY) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ROCKSDB_DISABLE_INSTALL_SHARED_LIB) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ROCKSDB_DISABLE_INSTALL_STATIC_LIB) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + "lz4" WITH_LZ4 + "snappy" WITH_SNAPPY + "zlib" WITH_ZLIB + "zstd" WITH_ZSTD + "tbb" WITH_TBB + INVERTED_FEATURES + "tbb" CMAKE_DISABLE_FIND_PACKAGE_TBB +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DWITH_GFLAGS=0 + -DWITH_TESTS=OFF + -DUSE_RTTI=1 + -DROCKSDB_INSTALL_ON_WINDOWS=ON + -DFAIL_ON_WARNINGS=OFF + -DWITH_MD_LIBRARY=${WITH_MD_LIBRARY} + -DPORTABLE=ON + -DCMAKE_DEBUG_POSTFIX=d + -DROCKSDB_DISABLE_INSTALL_SHARED_LIB=${ROCKSDB_DISABLE_INSTALL_SHARED_LIB} + -DROCKSDB_DISABLE_INSTALL_STATIC_LIB=${ROCKSDB_DISABLE_INSTALL_STATIC_LIB} + -DCMAKE_DISABLE_FIND_PACKAGE_NUMA=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_gtest=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_Git=TRUE + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/rocksdb) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE.Apache DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake ${SOURCE_PATH}/LICENSE.leveldb DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/rocksdb/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/rocksdb/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..455facf --- /dev/null +++ b/vcpkg/ports/rocksdb/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,9 @@ +_find_package(${ARGS}) +if(NOT TARGET RocksDB::rocksdb AND TARGET RocksDB::rocksdb-shared) + add_library(RocksDB::rocksdb INTERFACE IMPORTED) + set_target_properties(RocksDB::rocksdb PROPERTIES INTERFACE_LINK_LIBRARIES "RocksDB::rocksdb-shared") +endif() +if(TARGET RocksDB::rocksdb AND NOT TARGET RocksDB::rocksdb-shared) + add_library(RocksDB::rocksdb-shared INTERFACE IMPORTED) + set_target_properties(RocksDB::rocksdb-shared PROPERTIES INTERFACE_LINK_LIBRARIES "RocksDB::rocksdb") +endif() diff --git a/vcpkg/ports/rpclib/CONTROL b/vcpkg/ports/rpclib/CONTROL new file mode 100644 index 0000000..44d2878 --- /dev/null +++ b/vcpkg/ports/rpclib/CONTROL @@ -0,0 +1,5 @@ +Source: rpclib +Version: 2.2.1 +Port-Version: 2 +Homepage: https://github.com/rpclib/rpclib +Description: a RPC library for C++, providing both a client and server implementation. It is built using modern C++14. diff --git a/vcpkg/ports/rpclib/portfile.cmake b/vcpkg/ports/rpclib/portfile.cmake new file mode 100644 index 0000000..eb42ebe --- /dev/null +++ b/vcpkg/ports/rpclib/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rpclib/rpclib + REF v2.2.1 + SHA512 a63c6d09a411fb6b87d0df7c4f75a189f775ff0208f5f1c67333a85030a47efe60d5518e5939e98abc683a6063afb6cfed51f118f594a2a08be32330a9691051 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/rpclib) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/rply/CMakeLists.txt b/vcpkg/ports/rply/CMakeLists.txt new file mode 100644 index 0000000..8885a79 --- /dev/null +++ b/vcpkg/ports/rply/CMakeLists.txt @@ -0,0 +1,59 @@ +cmake_minimum_required (VERSION 3.14) +project ("rply") +set (target_name ${CMAKE_PROJECT_NAME}) +set (target_include_prefix "rply") + +option (BUILD_SHARED_LIBS "Create ${target_name} as a shared library" ON) + +set (CMAKE_DEBUG_POSTFIX "d" CACHE STRING "postfix for debug lib") + +include (GNUInstallDirs) + +file (GLOB target_headers "*.h") +file (GLOB target_srcs "*.c" ) + +if (MSVC) + set(sources_msvc "rply.def") +endif() + +add_library (${target_name} ${target_srcs} ${target_headers} ${sources_msvc}) + +target_include_directories (${target_name} + PUBLIC $ +) + +set_target_properties(${target_name} PROPERTIES + C_STANDARD 11 +) + +if (MSVC) + target_compile_definitions(${target_name} PRIVATE _CRT_SECURE_NO_WARNINGS) + set_target_properties(${target_name} PROPERTIES + VS_DEBUGGER_WORKING_DIRECTORY $ + ) + set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${target_name}) +endif() + +install (TARGETS ${target_name} EXPORT ${target_name}-targets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) + +install (FILES ${target_headers} + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${target_name}" + CONFIGURATIONS Release +) + +install (EXPORT ${target_name}-targets + FILE ${target_name}-targets.cmake + NAMESPACE ${target_name}:: + DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${target_name}" +) + +configure_file(${target_name}-config.cmake.in "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${target_name}-config.cmake" @ONLY) + +install(FILES + "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${target_name}-config.cmake" + DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${target_name}" +) diff --git a/vcpkg/ports/rply/CONTROL b/vcpkg/ports/rply/CONTROL new file mode 100644 index 0000000..0caedad --- /dev/null +++ b/vcpkg/ports/rply/CONTROL @@ -0,0 +1,4 @@ +Source: rply +Version: 1.1.4 +Homepage: http://w3.impa.br/~diego/software/rply +Description: ANSI C Library for PLY file format input and output diff --git a/vcpkg/ports/rply/fix-uninitialized-local-variable.patch b/vcpkg/ports/rply/fix-uninitialized-local-variable.patch new file mode 100644 index 0000000..f23ad84 --- /dev/null +++ b/vcpkg/ports/rply/fix-uninitialized-local-variable.patch @@ -0,0 +1,22 @@ +diff --git a/rply.c b/rply.c +index c4105ef..7c7e72a 100644 +--- a/rply.c ++++ b/rply.c +@@ -372,7 +372,7 @@ p_ply ply_open(const char *name, p_ply_error_cb error_cb, + + p_ply ply_open_from_file(FILE *fp, p_ply_error_cb error_cb, + long idata, void *pdata) { +- p_ply ply; ++ p_ply ply = NULL; + if (error_cb == NULL) error_cb = ply_error_cb; + assert(fp); + if (!ply_type_check()) { +@@ -475,7 +475,7 @@ p_ply ply_create(const char *name, e_ply_storage_mode storage_mode, + + p_ply ply_create_to_file(FILE *fp, e_ply_storage_mode storage_mode, + p_ply_error_cb error_cb, long idata, void *pdata) { +- p_ply ply; ++ p_ply ply = NULL; + assert(fp && storage_mode <= PLY_DEFAULT); + if (!ply_type_check()) { + error_cb(ply, "Incompatible type system"); diff --git a/vcpkg/ports/rply/portfile.cmake b/vcpkg/ports/rply/portfile.cmake new file mode 100644 index 0000000..665b9e3 --- /dev/null +++ b/vcpkg/ports/rply/portfile.cmake @@ -0,0 +1,33 @@ + +set(VERSION 1.1.4) + +vcpkg_download_distfile(ARCHIVE + URLS "http://w3.impa.br/~diego/software/rply/rply-${VERSION}.tar.gz" + FILENAME "rply-${VERSION}.tar.gz" + SHA512 be389780b8ca74658433f271682d91e89709ced588c4012c152ccf4014557692a1afd37b1bd5e567cedf9c412d42721eb0412ff3331f38717e527bd5d29c27a7 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${VERSION} + PATCHES + fix-uninitialized-local-variable.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/rply.def DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/rply-config.cmake.in DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/rply RENAME copyright) + diff --git a/vcpkg/ports/rply/rply-config.cmake.in b/vcpkg/ports/rply/rply-config.cmake.in new file mode 100644 index 0000000..3030342 --- /dev/null +++ b/vcpkg/ports/rply/rply-config.cmake.in @@ -0,0 +1,8 @@ +get_filename_component(_RPLY_PREFIX_DIR "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY) +set (_TARGET_NAME "rply") + +# IMPORTED targets +include("${_RPLY_PREFIX_DIR}/${_TARGET_NAME}-targets.cmake") + +set(_RPLY_PREFIX_DIR) +set(_TARGET_NAME) diff --git a/vcpkg/ports/rply/rply.def b/vcpkg/ports/rply/rply.def new file mode 100644 index 0000000..8662c24 --- /dev/null +++ b/vcpkg/ports/rply/rply.def @@ -0,0 +1,28 @@ +EXPORTS + ply_get_ply_user_data + ply_open + ply_read_header + ply_set_read_cb + ply_get_argument_element + ply_get_argument_property + ply_get_argument_user_data + ply_get_argument_value + ply_read + ply_get_next_element + ply_get_next_comment + ply_get_next_obj_info + ply_get_element_info + ply_get_next_property + ply_get_property_info + ply_create + ply_add_element + ply_add_property + ply_add_list_property + ply_add_scalar_property + ply_add_comment + ply_add_obj_info + ply_write_header + ply_write + ply_close + ply_open_from_file + ply_create_to_file diff --git a/vcpkg/ports/rs-core-lib/CONTROL b/vcpkg/ports/rs-core-lib/CONTROL new file mode 100644 index 0000000..c633c0b --- /dev/null +++ b/vcpkg/ports/rs-core-lib/CONTROL @@ -0,0 +1,5 @@ +Source: rs-core-lib +Version: 2019-07-11 +Homepage: https://github.com/CaptainCrowbar/rs-core-lib +Description: Minimal common utilities by Ross Smith + diff --git a/vcpkg/ports/rs-core-lib/portfile.cmake b/vcpkg/ports/rs-core-lib/portfile.cmake new file mode 100644 index 0000000..718b996 --- /dev/null +++ b/vcpkg/ports/rs-core-lib/portfile.cmake @@ -0,0 +1,14 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO CaptainCrowbar/rs-core-lib + REF fda88535dff2193e75bb9d306e4aa38a957b2c91 + SHA512 e1842e2d92b5e935a8d867797d26f998cec628b3030077b8694cc3932546efeac81634e7f6d14189248a945fceb329e24aa39cf830384c04c0d67d2aa6255e57 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/rs-core DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.hpp") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/rs-core-lib RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/rsocket/CONTROL b/vcpkg/ports/rsocket/CONTROL new file mode 100644 index 0000000..333fe0d --- /dev/null +++ b/vcpkg/ports/rsocket/CONTROL @@ -0,0 +1,6 @@ +Source: rsocket +Version: 2020.05.04.00-1 +Homepage: https://github.com/rsocket/rsocket-cpp +Description: C++ implementation of RSocket http://rsocket.io +Build-Depends: folly, double-conversion, openssl, gflags, glog, fmt, boost-system, boost-thread, boost-filesystem, boost-regex, boost-context, boost-program-options, zlib +Supports: !(windows&x64) diff --git a/vcpkg/ports/rsocket/fix-cmake-config.patch b/vcpkg/ports/rsocket/fix-cmake-config.patch new file mode 100644 index 0000000..d3bf7b8 --- /dev/null +++ b/vcpkg/ports/rsocket/fix-cmake-config.patch @@ -0,0 +1,26 @@ +diff --git a/cmake/rsocket-config.cmake.in b/cmake/rsocket-config.cmake.in +index d5579a85..ea12752a 100644 +--- a/cmake/rsocket-config.cmake.in ++++ b/cmake/rsocket-config.cmake.in +@@ -4,7 +4,7 @@ + @PACKAGE_INIT@ + + if(NOT TARGET rsocket::ReactiveSocket) +- include("${PACKAGE_PREFIX_DIR}/lib/cmake/rsocket/rsocket-exports.cmake") ++ include("${CMAKE_CURRENT_LIST_DIR}/rsocket-exports.cmake") + endif() + + if (NOT rsocket_FIND_QUIETLY) +diff --git a/yarpl/cmake/yarpl-config.cmake.in b/yarpl/cmake/yarpl-config.cmake.in +index d557b213..1b83fffc 100644 +--- a/yarpl/cmake/yarpl-config.cmake.in ++++ b/yarpl/cmake/yarpl-config.cmake.in +@@ -4,7 +4,7 @@ + @PACKAGE_INIT@ + + if(NOT TARGET yarpl::yarpl) +- include("${PACKAGE_PREFIX_DIR}/lib/cmake/yarpl/yarpl-exports.cmake") ++ include("${CMAKE_CURRENT_LIST_DIR}/yarpl-exports.cmake") + endif() + + set(YARPL_LIBRARIES yarpl::yarpl) diff --git a/vcpkg/ports/rsocket/fix-find-dependencies.patch b/vcpkg/ports/rsocket/fix-find-dependencies.patch new file mode 100644 index 0000000..287a6fa --- /dev/null +++ b/vcpkg/ports/rsocket/fix-find-dependencies.patch @@ -0,0 +1,94 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f69e907..22570b5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -124,7 +124,7 @@ option(BUILD_BENCHMARKS "Build benchmarks" ON) + option(BUILD_EXAMPLES "Build examples" ON) + option(BUILD_TESTS "Build tests" ON) + +-enable_testing() ++#enable_testing() + + include(ExternalProject) + include(CTest) +@@ -172,7 +172,9 @@ endif() + + if("${BUILD_TYPE_LOWER}" MATCHES "debug") + message("debug mode was set") ++ if (NOT WIN32) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unreachable-code") ++ endif() + else() + message("release mode was set") + endif() +@@ -181,18 +183,25 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") + set(TEST_CXX_FLAGS ${TEST_CXX_FLAGS} -Wno-inconsistent-missing-override) + endif() + +-find_library(DOUBLE-CONVERSION double-conversion) ++find_package(double-conversion CONFIG REQUIRED) + + find_package(OpenSSL REQUIRED) + +-find_package(Gflags REQUIRED) ++find_package(gflags CONFIG REQUIRED) + +-# find glog::glog to satisfy the folly dep. +-find_package(Glog REQUIRED) ++find_package(ZLIB REQUIRED) + +-find_package(fmt CONFIG REQUIRED) ++if (BUILD_SHARED_LIBS) ++ set(gflags gflags_shared) ++else() ++ set(gflags gflags_static) ++endif() + +-include_directories(SYSTEM ${OPENSSL_INCLUDE_DIR}) ++# find glog::glog to satisfy the folly dep. ++find_package(folly CONFIG REQUIRED) ++#find_package(glog CONFIG REQUIRED) ++# ++#find_package(fmt CONFIG REQUIRED) + + include_directories(SYSTEM ${GFLAGS_INCLUDE_DIR}) + +@@ -327,7 +336,7 @@ target_compile_options( + ReactiveSocket + PRIVATE ${EXTRA_CXX_FLAGS}) + +-enable_testing() ++#enable_testing() + + install(TARGETS ReactiveSocket EXPORT rsocket-exports DESTINATION lib) + install(DIRECTORY rsocket DESTINATION include FILES_MATCHING PATTERN "*.h") +@@ -470,7 +479,7 @@ if(BUILD_TESTS) + ${GMOCK_LIBS} # This also needs the preceding `add_dependencies` + glog::glog + gflags +- ${DOUBLE-CONVERSION}) ++ double-conversion::double-conversion) + + # Download the latest TCK drivers JAR. + set(TCK_DRIVERS_JAR rsocket-tck-drivers-0.9.10.jar) +diff --git a/yarpl/CMakeLists.txt b/yarpl/CMakeLists.txt +index f4159b8..8c01ffb 100644 +--- a/yarpl/CMakeLists.txt ++++ b/yarpl/CMakeLists.txt +@@ -53,8 +53,14 @@ endif() + # Using NDEBUG in Release builds. + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG") + +-find_package(Gflags REQUIRED) +-find_package(Glog REQUIRED) ++find_package(gflags CONFIG REQUIRED) ++if (BUILD_SHARED_LIBS) ++ set(gflags gflags_shared) ++else() ++ set(gflags gflags_static) ++endif() ++ ++find_package(glog CONFIG REQUIRED) + find_package(fmt CONFIG REQUIRED) + + IF(NOT FOLLY_VERSION) diff --git a/vcpkg/ports/rsocket/portfile.cmake b/vcpkg/ports/rsocket/portfile.cmake new file mode 100644 index 0000000..4ae31c1 --- /dev/null +++ b/vcpkg/ports/rsocket/portfile.cmake @@ -0,0 +1,44 @@ +# yarpl only support static build in Windows +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_fail_port_install(ON_ARCH "x64") + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rsocket/rsocket-cpp #v2020.05.04.00 + REF 8038d05e741c3d3ecd6adb069b4a1b3daa230e14 + SHA512 d7bc93af7b6130d73fa0823f534ad57a531dfa7d7aa990a2a1a1b72b6761db7eeb60573d0d38f55daa991554e3ab4ac507047f8051a4390b3343cd708a48efbb + HEAD_REF master + PATCHES + fix-cmake-config.patch + fix-find-dependencies.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_EXAMPLES=OFF + -DBUILD_TESTS=OFF + -DBUILD_BENCHMARKS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/include/yarpl/perf + ${CURRENT_PACKAGES_DIR}/include/yarpl/cmake + ${CURRENT_PACKAGES_DIR}/include/yarpl/test + ${CURRENT_PACKAGES_DIR}/include/rsocket/examples + ${CURRENT_PACKAGES_DIR}/include/rsocket/test +) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/rtlsdr/CONTROL b/vcpkg/ports/rtlsdr/CONTROL new file mode 100644 index 0000000..cbd10d6 --- /dev/null +++ b/vcpkg/ports/rtlsdr/CONTROL @@ -0,0 +1,6 @@ +Source: rtlsdr +Version: 2020-04-16-1 +Homepage: https://osmocom.org/projects/rtl-sdr +Description: rtl-sdr is a library that turns your Realtek RTL2832 based DVB dongle into a SDR receiver +Build-Depends: libusb, pthreads (windows) +Supports: windows&(x86|x64) diff --git a/vcpkg/ports/rtlsdr/Compile-with-msvc.patch b/vcpkg/ports/rtlsdr/Compile-with-msvc.patch new file mode 100644 index 0000000..5374ed4 --- /dev/null +++ b/vcpkg/ports/rtlsdr/Compile-with-msvc.patch @@ -0,0 +1,88 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2def354..674ff2d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -66,6 +66,12 @@ endif() + ######################################################################## + # Find build dependencies + ######################################################################## ++if(MSVC) ++find_package(pthreads) ++find_package(libusb) ++include_directories(${PThreads4W_INCLUDE_DIR}) ++include_directories(${LIBUSB_INCLUDE_DIRS}) ++else() + if(WIN32 AND NOT MINGW) + set(THREADS_USE_PTHREADS_WIN32 true) + endif() +@@ -79,6 +85,7 @@ endif() + if(NOT THREADS_FOUND) + message(FATAL_ERROR "pthreads(-win32) required to compile rtl-sdr") + endif() ++endif() + + ######################################################################## + # Create uninstall target +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 33faee7..fda4612 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -20,7 +20,11 @@ + ######################################################################## + add_library(rtlsdr SHARED librtlsdr.c + tuner_e4k.c tuner_fc0012.c tuner_fc0013.c tuner_fc2580.c tuner_r82xx.c) ++if(MSVC) ++target_link_libraries(rtlsdr ${LIBUSB_LIBRARIES}) ++else() + target_link_libraries(rtlsdr PkgConfig::LIBUSB) ++endif() + target_include_directories(rtlsdr PUBLIC + $ + $ # /include +@@ -36,7 +40,11 @@ generate_export_header(rtlsdr) + ######################################################################## + add_library(rtlsdr_static STATIC librtlsdr.c + tuner_e4k.c tuner_fc0012.c tuner_fc0013.c tuner_fc2580.c tuner_r82xx.c) ++if(MSVC) ++target_link_libraries(rtlsdr_static ${LIBUSB_LIBRARIES}) ++else() + target_link_libraries(rtlsdr_static PkgConfig::LIBUSB) ++endif() + target_include_directories(rtlsdr_static PUBLIC + $ + $ # /include +@@ -58,8 +66,8 @@ IF(MSVC) + ${CMAKE_CURRENT_SOURCE_DIR}/rtlsdr.rc.in + ${CMAKE_CURRENT_BINARY_DIR}/rtlsdr.rc + @ONLY) +- target_sources(rtlsdr ${CMAKE_CURRENT_BINARY_DIR}/rtlsdr.rc) +- target_sources(rtlsdr_static ${CMAKE_CURRENT_BINARY_DIR}/rtlsdr.rc) ++ target_sources(rtlsdr PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/rtlsdr.rc) ++ target_sources(rtlsdr_static PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/rtlsdr.rc) + ENDIF(MSVC) + + ######################################################################## +@@ -77,6 +85,11 @@ add_library(libgetopt_static STATIC + target_link_libraries(convenience_static + rtlsdr + ) ++if(MSVC) ++target_link_libraries(convenience_static ++ ${PThreads4W_LIBRARY} ++) ++endif() + endif() + + ######################################################################## +diff --git a/src/rtl_tcp.c b/src/rtl_tcp.c +index 562198f..b4bfa51 100644 +--- a/src/rtl_tcp.c ++++ b/src/rtl_tcp.c +@@ -35,6 +35,7 @@ + #include + #else + #include ++#include + #include "getopt/getopt.h" + #endif + diff --git a/vcpkg/ports/rtlsdr/Findlibusb.cmake b/vcpkg/ports/rtlsdr/Findlibusb.cmake new file mode 100644 index 0000000..052ae21 --- /dev/null +++ b/vcpkg/ports/rtlsdr/Findlibusb.cmake @@ -0,0 +1,17 @@ +find_path( + LIBUSB_INCLUDE_DIRS + NAMES libusb.h + PATH_SUFFIXES libusb-1.0 +) + +find_library( + LIBUSB_LIBRARIES + NAMES libusb-1.0 +) + +include(FindPackageHandleStandardArgs) + +find_package_handle_standard_args( + LIBUSB + REQUIRED_VARS LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIRS +) diff --git a/vcpkg/ports/rtlsdr/fix-version.patch b/vcpkg/ports/rtlsdr/fix-version.patch new file mode 100644 index 0000000..854a054 --- /dev/null +++ b/vcpkg/ports/rtlsdr/fix-version.patch @@ -0,0 +1,15 @@ +diff --git a/cmake/modules/Version.cmake b/cmake/modules/Version.cmake +index 2d4e76d..6acffe2 100644 +--- a/cmake/modules/Version.cmake ++++ b/cmake/modules/Version.cmake +@@ -39,7 +39,9 @@ if(GIT_FOUND) + OUTPUT_VARIABLE GIT_DESCRIBE OUTPUT_STRIP_TRAILING_WHITESPACE + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + ) +-else() ++endif() ++ ++if ("${GIT_DESCRIBE}" STREQUAL "") + set(GIT_DESCRIBE "v${MAJOR_VERSION}.${MINOR_VERSION}.x-xxx-xunknown") + endif() + diff --git a/vcpkg/ports/rtlsdr/portfile.cmake b/vcpkg/ports/rtlsdr/portfile.cmake new file mode 100644 index 0000000..fdf4842 --- /dev/null +++ b/vcpkg/ports/rtlsdr/portfile.cmake @@ -0,0 +1,50 @@ +vcpkg_fail_port_install( + ON_TARGET "uwp" "linux" "osx" "android" "freebsd" + ON_ARCH "arm" "arm64" +) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO osmocom/rtl-sdr + REF d794155ba65796a76cd0a436f9709f4601509320 + SHA512 21fe10f1dbecca651650f03d1008560930fac439d220c33b4a23acce98d78d8476ff200765eed8cfa6cddde761d45f7ba36c8b5bc3662aa85819172830ea4938 + HEAD_REF master + PATCHES + Compile-with-msvc.patch + fix-version.patch +) + +file( + COPY ${CMAKE_CURRENT_LIST_DIR}/Findlibusb.cmake + DESTINATION ${SOURCE_PATH}/cmake/Modules +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/rtlsdr) +vcpkg_copy_pdbs() + +file( + INSTALL ${SOURCE_PATH}/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/rtlsdr + RENAME copyright +) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +else() + file(GLOB DEBUG_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") + file(GLOB RELEASE_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe") + file( + INSTALL ${RELEASE_TOOLS} + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT} + ) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(REMOVE ${DEBUG_TOOLS} ${RELEASE_TOOLS}) +endif() diff --git a/vcpkg/ports/rtmidi/CONTROL b/vcpkg/ports/rtmidi/CONTROL new file mode 100644 index 0000000..7c2c39f --- /dev/null +++ b/vcpkg/ports/rtmidi/CONTROL @@ -0,0 +1,6 @@ +Source: rtmidi +Version: 4.0.0 +Port-Version: 2 +Homepage: https://github.com/thestk/rtmidi +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) +Supports: !uwp diff --git a/vcpkg/ports/rtmidi/fix-POSIXname.patch b/vcpkg/ports/rtmidi/fix-POSIXname.patch new file mode 100644 index 0000000..a2a5b0e --- /dev/null +++ b/vcpkg/ports/rtmidi/fix-POSIXname.patch @@ -0,0 +1,17 @@ +diff --git a/rtmidi_c.cpp b/rtmidi_c.cpp +index 248c9e5..ec1dd38 100644 +--- a/rtmidi_c.cpp ++++ b/rtmidi_c.cpp +@@ -136,7 +136,11 @@ const char* rtmidi_get_port_name (RtMidiPtr device, unsigned int portNumber) + { + try { + std::string name = ((RtMidi*) device->ptr)->getPortName (portNumber); +- return strdup (name.c_str ()); ++#if defined(_WIN) || defined(WINAPI_FAMILY) //Windows platform ++ return _strdup (name.c_str ()); ++#else // Unix platform ++ return strdup (name.c_str ()); ++#endif + + } catch (const RtMidiError & err) { + device->ok = false; diff --git a/vcpkg/ports/rtmidi/portfile.cmake b/vcpkg/ports/rtmidi/portfile.cmake new file mode 100644 index 0000000..4a9fccb --- /dev/null +++ b/vcpkg/ports/rtmidi/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +# Upstream uses CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS, which causes issues +# https://github.com/thestk/rtmidi/blob/4.0.0/CMakeLists.txt#L20 +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO thestk/rtmidi + REF dda792c5394375769466ab1c1d7773e741bbd950 # 4.0.0 + SHA512 cb1ded29c0b22cf7f38719131a9572a4daba7071fd8cf8b5b8d7306560a218bb0ef42150bf341b76f4ddee0ae087da975116c3b153e7bb908f2a674ecacb9d7a + HEAD_REF master + PATCHES + fix-POSIXname.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON + OPTIONS -DRTMIDI_API_ALSA=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/rttr/CONTROL b/vcpkg/ports/rttr/CONTROL new file mode 100644 index 0000000..60a2a1a --- /dev/null +++ b/vcpkg/ports/rttr/CONTROL @@ -0,0 +1,5 @@ +Source: rttr +Version: 0.9.6-2 +Homepage: https://github.com/rttrorg/rttr +Description: an easy and intuitive way to use reflection in C++ +Build-Depends: rapidjson diff --git a/vcpkg/ports/rttr/Fix-depends.patch b/vcpkg/ports/rttr/Fix-depends.patch new file mode 100644 index 0000000..8357a47 --- /dev/null +++ b/vcpkg/ports/rttr/Fix-depends.patch @@ -0,0 +1,14 @@ +diff --git a/CMake/3rd_party_libs.cmake b/CMake/3rd_party_libs.cmake +index dca5071..4dd4471 100644 +--- a/CMake/3rd_party_libs.cmake ++++ b/CMake/3rd_party_libs.cmake +@@ -51,7 +51,8 @@ if (BUILD_BENCHMARKS) + find_package(Threads REQUIRED) + endif() + +-set(RAPID_JSON_DIR ${RTTR_3RD_PARTY_DIR}/rapidjson-1.1.0) ++find_package(RapidJSON CONFIG REQUIRED) ++set(RAPID_JSON_DIR ${RAPIDJSON_INCLUDE_DIRS}) + set(NONIUS_DIR ${RTTR_3RD_PARTY_DIR}/nonius-1.1.2) + + # Prepare "Catch" library for other executables diff --git a/vcpkg/ports/rttr/fix-directory-output.patch b/vcpkg/ports/rttr/fix-directory-output.patch new file mode 100644 index 0000000..97e47f3 --- /dev/null +++ b/vcpkg/ports/rttr/fix-directory-output.patch @@ -0,0 +1,13 @@ +diff --git a/CMake/config.cmake b/CMake/config.cmake +index a718199..eab64c2 100644 +--- a/CMake/config.cmake ++++ b/CMake/config.cmake +@@ -47,7 +47,7 @@ set(CMAKE_EXECUTABLE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin") + + # here we specify the installation directory + if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) +- set(CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}/install" CACHE PATH "RTTR install prefix" FORCE) ++ #set(CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}/install" CACHE PATH "RTTR install prefix") + endif() + + # in order to group in visual studio the targets into solution filters diff --git a/vcpkg/ports/rttr/portfile.cmake b/vcpkg/ports/rttr/portfile.cmake new file mode 100644 index 0000000..5670076 --- /dev/null +++ b/vcpkg/ports/rttr/portfile.cmake @@ -0,0 +1,53 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rttrorg/rttr + REF v0.9.6 + SHA512 5c94f037b319568d351ee6d25f1404adce00b40598dce4a331789d5357c059e50aae3894f90e60d37307b7e96f4672ae09d3798bbe47f796ef2044f1ac6f9e50 + HEAD_REF master + PATCHES + fix-directory-output.patch + Fix-depends.patch + remove-owner-read-perms.patch +) + +#Handle static lib +set(BUILD_STATIC_LIB OFF) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(BUILD_STATIC_LIB ON) +else() + set(BUILD_STATIC_LIB OFF) +endif() +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_BENCHMARKS=OFF + -DBUILD_UNIT_TESTS=OFF + -DBUILD_STATIC=${BUILD_STATIC_LIB} +) + +vcpkg_install_cmake() + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") + vcpkg_fixup_cmake_targets(CONFIG_PATH share/rttr/cmake) +elseif(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +else() + message(FATAL_ERROR "RTTR does not support this platform") +endif() + +#Handle static lib +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +#Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/debug/README.md + ${CURRENT_PACKAGES_DIR}/debug/LICENSE.txt + ${CURRENT_PACKAGES_DIR}/LICENSE.txt + ${CURRENT_PACKAGES_DIR}/README.md +) diff --git a/vcpkg/ports/rttr/remove-owner-read-perms.patch b/vcpkg/ports/rttr/remove-owner-read-perms.patch new file mode 100644 index 0000000..3fc9842 --- /dev/null +++ b/vcpkg/ports/rttr/remove-owner-read-perms.patch @@ -0,0 +1,44 @@ +diff --git a/CMake/config.cmake b/CMake/config.cmake +index 4483900..dfef016 100644 +--- a/CMake/config.cmake ++++ b/CMake/config.cmake +@@ -171,6 +171,5 @@ if (BUILD_INSTALLER) + COMPONENT Devel) + + install(FILES "${LICENSE_FILE}" "${README_FILE}" +- DESTINATION ${RTTR_ADDITIONAL_FILES_INSTALL_DIR} +- PERMISSIONS OWNER_READ) ++ DESTINATION ${RTTR_ADDITIONAL_FILES_INSTALL_DIR}) + endif() +diff --git a/CMake/utility.cmake b/CMake/utility.cmake +index 7e1f677..a3932ae 100644 +--- a/CMake/utility.cmake ++++ b/CMake/utility.cmake +@@ -165,7 +165,7 @@ function(loadFolder FOLDER _HEADER_FILES _SOURCE_FILES) + getNameOfDir(CMAKE_CURRENT_SOURCE_DIR DIRNAME) + if (${shouldInstall}) + if (NOT ${FULL_HEADER_PATH} MATCHES ".*_p.h$") # we don't want to install header files which are marked as private +- install(FILES ${FULL_HEADER_PATH} DESTINATION "include/${DIRNAME}/${REL_PATH}" PERMISSIONS OWNER_READ) ++ install(FILES ${FULL_HEADER_PATH} DESTINATION "include/${DIRNAME}/${REL_PATH}") + endif() + endif() + endforeach() +diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt +index bacb280..a92d642 100644 +--- a/doc/CMakeLists.txt ++++ b/doc/CMakeLists.txt +@@ -132,12 +132,10 @@ set_target_properties(doc PROPERTIES FOLDER "Documentation") + + install(DIRECTORY "${DOXYGEN_OUTPUT_DIRECTORY}/${DOXYGEN_CUSTOM_HTML_DIR}" + DESTINATION "${DOXYGEN_DOC_INSTALL_DIR}" +- PATTERN "*.*" +- PERMISSIONS OWNER_READ) ++ PATTERN "*.*") + + install(FILES "${DOXYGEN_OUTPUT_DIRECTORY}/${DOXYGEN_INDEX_FILE}" +- DESTINATION "${DOXYGEN_DOC_INSTALL_DIR}" +- PERMISSIONS OWNER_READ) ++ DESTINATION "${DOXYGEN_DOC_INSTALL_DIR}") + + ######################################################################################### + diff --git a/vcpkg/ports/rxcpp/CONTROL b/vcpkg/ports/rxcpp/CONTROL new file mode 100644 index 0000000..b34395f --- /dev/null +++ b/vcpkg/ports/rxcpp/CONTROL @@ -0,0 +1,4 @@ +Source: rxcpp +Version: 4.1.0-1 +Homepage: https://github.com/Reactive-Extensions/RxCpp +Description: Reactive Extensions for C++ diff --git a/vcpkg/ports/rxcpp/portfile.cmake b/vcpkg/ports/rxcpp/portfile.cmake new file mode 100644 index 0000000..b987011 --- /dev/null +++ b/vcpkg/ports/rxcpp/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ReactiveX/RxCpp + REF v4.1.0 + SHA512 a92e817ecbdf6f235cae724ada2615af9fa0c243249625d0f2c2f09ff5dd7f53fdabd03a0278fe2995fe27528c5511d71f87b7a6b3d54f73b49b65aef56e32fd + HEAD_REF master + PATCHES support_find_package.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTS=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/${PORT}/cmake/) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(COPY ${SOURCE_PATH}/license.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/license.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/vcpkg/ports/rxcpp/support_find_package.patch b/vcpkg/ports/rxcpp/support_find_package.patch new file mode 100644 index 0000000..bb1da2d --- /dev/null +++ b/vcpkg/ports/rxcpp/support_find_package.patch @@ -0,0 +1,32 @@ +diff --git a/projects/CMake/CMakeLists.txt b/projects/CMake/CMakeLists.txt +index 3d0744740..293f187c5 100644 +--- a/projects/CMake/CMakeLists.txt ++++ b/projects/CMake/CMakeLists.txt +@@ -146,3 +146,27 @@ set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY TRUE CACHE BOOL "Don't require all project + + install(DIRECTORY ${RXCPP_DIR}/Rx/v2/src/rxcpp/ DESTINATION include/rxcpp + FILES_MATCHING PATTERN "*.hpp") ++ ++# Here we are exporting TARGETS so that other projects can import rxcpp ++# just with find_package(rxcpp CONFIG) after rxcpp is installed into system by "make install". ++add_library(rxcpp INTERFACE) ++ ++target_include_directories(rxcpp INTERFACE ++ $ ++ $ ++) ++ ++install(TARGETS rxcpp EXPORT rxcppConfig) ++install(EXPORT rxcppConfig DESTINATION share/rxcpp/cmake) ++ ++# When find_package(rxcpp SOME_VERSION REQUIRED) will be used in third party project ++# where SOME_VERSION is any version incompatible with ${PROJECT_VERSION} then cmake will generate the error. ++# It means you don't need track versions manually. ++include(CMakePackageConfigHelpers) ++write_basic_package_version_file("${PROJECT_BINARY_DIR}/rxcppConfigVersion.cmake" ++ VERSION ++ ${PROJECT_VERSION} ++ COMPATIBILITY ++ AnyNewerVersion ++) ++install(FILES "${PROJECT_BINARY_DIR}/rxcppConfigVersion.cmake" DESTINATION share/rxcpp/cmake) diff --git a/vcpkg/ports/rxqt/CONTROL b/vcpkg/ports/rxqt/CONTROL new file mode 100644 index 0000000..eeaab09 --- /dev/null +++ b/vcpkg/ports/rxqt/CONTROL @@ -0,0 +1,5 @@ +Source: rxqt +Version: bb2138c +Description: The Reactive Extensions for Qt. +Homepage: https://github.com/tetsurom/rxqt +Build-Depends: rxcpp \ No newline at end of file diff --git a/vcpkg/ports/rxqt/portfile.cmake b/vcpkg/ports/rxqt/portfile.cmake new file mode 100644 index 0000000..f84bf7c --- /dev/null +++ b/vcpkg/ports/rxqt/portfile.cmake @@ -0,0 +1,20 @@ +#header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tetsurom/rxqt + REF bb2138c835ef96a53bb79c47fb318237564f9a0c + SHA512 df39f05b0b4fcd950dd39f40b32e20097352a935778af1be077a08644b3562d07dcc77ab658bc45437454372be955a40013570124e86943bb32493c66cdce439 + HEAD_REF master +) + +file(INSTALL + ${SOURCE_PATH}/include + DESTINATION ${CURRENT_PACKAGES_DIR} +) + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/rxqt RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/rxspencer/CONTROL b/vcpkg/ports/rxspencer/CONTROL new file mode 100644 index 0000000..c310d2c --- /dev/null +++ b/vcpkg/ports/rxspencer/CONTROL @@ -0,0 +1,4 @@ +Source: rxspencer +Version: 2020-01-12 +Homepage: https://garyhouston.github.io/regex/ +Description: Henry Spencer's BSD regular expression library. diff --git a/vcpkg/ports/rxspencer/portfile.cmake b/vcpkg/ports/rxspencer/portfile.cmake new file mode 100644 index 0000000..fea3e68 --- /dev/null +++ b/vcpkg/ports/rxspencer/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO garyhouston/rxspencer + REF e42b6a667f1385aedf49b533b9fbba58e5a26934 + SHA512 2842e1c78c3ebbbd03d15fb85e55f861740bb446aa57157f3fc90876d931d9f865242f5eaefc94f31c8d78e0d531a008d4c579e9b4f9c7179f5c7a95a98359fd + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DCMAKE_CONFIG_DEST=share/rxspencer +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "share/rxspencer") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/regex) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/ryml/CONTROL b/vcpkg/ports/ryml/CONTROL new file mode 100644 index 0000000..b6efa45 --- /dev/null +++ b/vcpkg/ports/ryml/CONTROL @@ -0,0 +1,6 @@ +Source: ryml +Version: 2020-04-12 +Homepage: https://github.com/biojppm/rapidyaml +Description: Rapid YAML library +Build-Depends: c4core[core] +Supports: !(arm|arm64|osx) \ No newline at end of file diff --git a/vcpkg/ports/ryml/cmake-fix.patch b/vcpkg/ports/ryml/cmake-fix.patch new file mode 100644 index 0000000..f2ee817 --- /dev/null +++ b/vcpkg/ports/ryml/cmake-fix.patch @@ -0,0 +1,34 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3e4eb23..115b8aa 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,5 @@ + cmake_minimum_required(VERSION 3.9) ++ + project(ryml) + + include(./ext/c4core/cmake/c4Project.cmake) +@@ -19,8 +20,7 @@ option(RYML_BUILD_API "Enable API generation (python, etc)" OFF) + + #------------------------------------------------------- + +-c4_require_subproject(c4core INCORPORATE +- SUBDIRECTORY ${RYML_EXT_DIR}/c4core) ++find_package(c4core CONFIG REQUIRED) + + c4_add_library(ryml + SOURCES +@@ -46,10 +46,10 @@ c4_add_library(ryml + ryml.natvis + SOURCE_ROOT ${RYML_SRC_DIR} + INC_DIRS ++ $ + $ + $ +- LIBS c4core +- INCORPORATE c4core ++ LIBS c4core::c4core + ) + + if(NOT RYML_DEFAULT_CALLBACKS) + diff --git a/vcpkg/ports/ryml/portfile.cmake b/vcpkg/ports/ryml/portfile.cmake new file mode 100644 index 0000000..ed7953f --- /dev/null +++ b/vcpkg/ports/ryml/portfile.cmake @@ -0,0 +1,70 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_fail_port_install( + ON_ARCH "arm" "arm64" + ON_TARGET "OSX" +) + +# Get rapidyaml src +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO biojppm/rapidyaml + REF ec23e87007ccc39c6132345c154b267de9381706 + SHA512 7d349c0dd58da814dad02de88a5c54394ef8d77e7db3014fb5fb684d519e35604d45f5d16db5ed6ed8ccb52b1ed4a4dbc91e717a091b54b04dc18901800e12c1 + HEAD_REF master + PATCHES cmake-fix.patch +) + +set(COMMIT_HASH a0f0c17bfc9a9a91cc72891539b513c129c6d122) + +# Get cmake scripts for rapidyaml +vcpkg_download_distfile(CMAKE_ARCHIVE + URLS "https://github.com/biojppm/cmake/archive/${COMMIT_HASH}.zip" + FILENAME "cmake-${COMMIT_HASH}.zip" + SHA512 4fbc711f3120501fa40733c3b66e34cd6a7e1b598b1378fbb59d1a87c88290a03d021f5176634089da41682fd918d7e27c6c146052dec54d7e956be15f12744f +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH_CMAKE + ARCHIVE ${CMAKE_ARCHIVE} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src/deps" +) + +file(REMOVE_RECURSE "${SOURCE_PATH}/ext/c4core/cmake") +file(RENAME ${SOURCE_PATH_CMAKE} "${SOURCE_PATH}/ext/c4core/cmake") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +elseif(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/ryml) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/ryml) +endif() + +# Move headers and natvis to own dir +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/include/ryml") +file(RENAME "${CURRENT_PACKAGES_DIR}/include/ryml.hpp" "${CURRENT_PACKAGES_DIR}/include/ryml/ryml.hpp") +file(RENAME "${CURRENT_PACKAGES_DIR}/include/ryml_std.hpp" "${CURRENT_PACKAGES_DIR}/include/ryml/ryml_std.hpp") +file(RENAME "${CURRENT_PACKAGES_DIR}/include/ryml.natvis" "${CURRENT_PACKAGES_DIR}/include/ryml/ryml.natvis") + +# Fix paths in headers file +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/ryml/ryml.hpp" "./c4" "../c4") +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/ryml/ryml_std.hpp" "./c4" "../c4") + +# Fix paths in config file +file(READ "${CURRENT_PACKAGES_DIR}/share/ryml/rymlConfig.cmake" _contents) +string(REGEX REPLACE [[[ \t\r\n]*"\${PACKAGE_PREFIX_DIR}[\./\\]*"]] [["${PACKAGE_PREFIX_DIR}/../.."]] _contents "${_contents}") +file(WRITE "${CURRENT_PACKAGES_DIR}/share/ryml/rymlConfig.cmake" "${_contents}") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL + "${SOURCE_PATH}/LICENSE.txt" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/ryml" RENAME copyright) diff --git a/vcpkg/ports/ryu/CONTROL b/vcpkg/ports/ryu/CONTROL new file mode 100644 index 0000000..916d6e8 --- /dev/null +++ b/vcpkg/ports/ryu/CONTROL @@ -0,0 +1,5 @@ +Source: ryu +Version: 2.0-2 +Homepage: https://github.com/ulfjack/ryu +Description: Ryu generates the shortest decimal representation of a floating point number that maintains round-trip safety. +Supports: !(uwp|arm|x86) diff --git a/vcpkg/ports/ryu/portfile.cmake b/vcpkg/ports/ryu/portfile.cmake new file mode 100644 index 0000000..f26b01b --- /dev/null +++ b/vcpkg/ports/ryu/portfile.cmake @@ -0,0 +1,38 @@ +vcpkg_fail_port_install(ON_ARCH "x86" "arm" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ulfjack/ryu + REF v2.0 + SHA512 88a0cca74a4889e8e579987abdc75a6ac87c1cdae557e5a15c29dbfd65733f9e591d6569e97a9374444918475099087f8056e696a97c9be24e38eb737e2304c2 + HEAD_REF master +) + +vcpkg_find_acquire_program(BAZEL) +get_filename_component(BAZEL_DIR "${BAZEL}" DIRECTORY) +vcpkg_add_to_path(PREPEND ${BAZEL_DIR}) +set(ENV{BAZEL_BIN_PATH} "${BAZEL}") + +if (CMAKE_HOST_WIN32) + set(ENV{BAZEL_VS} $ENV{VSInstallDir}) + set(ENV{BAZEL_VC} $ENV{VCInstallDir}) +endif () + +vcpkg_execute_build_process( + COMMAND ${BAZEL} build --verbose_failures --strategy=CppCompile=standalone //ryu + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET}-rel + ) + +if (CMAKE_HOST_WIN32) + file(INSTALL ${SOURCE_PATH}/bazel-bin/ryu/ryu.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) + file(INSTALL ${SOURCE_PATH}/bazel-bin/ryu/ryu.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) +else() + file(INSTALL ${SOURCE_PATH}/bazel-bin/ryu/libryu.a DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) + file(INSTALL ${SOURCE_PATH}/bazel-bin/ryu/libryu.a DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE-Boost DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/ryu/ryu.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/ryu/) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/ryuConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + diff --git a/vcpkg/ports/ryu/ryuConfig.cmake b/vcpkg/ports/ryu/ryuConfig.cmake new file mode 100644 index 0000000..ae5e08c --- /dev/null +++ b/vcpkg/ports/ryu/ryuConfig.cmake @@ -0,0 +1,20 @@ +function(set_library_target NAMESPACE LIB_NAME DEBUG_LIB_FILE_NAME RELEASE_LIB_FILE_NAME INCLUDE_DIR) + add_library(${NAMESPACE}::${LIB_NAME} STATIC IMPORTED) + set_target_properties(${NAMESPACE}::${LIB_NAME} PROPERTIES + IMPORTED_CONFIGURATIONS "RELEASE;DEBUG" + IMPORTED_LOCATION_RELEASE "${RELEASE_LIB_FILE_NAME}" + IMPORTED_LOCATION_DEBUG "${DEBUG_LIB_FILE_NAME}" + INTERFACE_INCLUDE_DIRECTORIES "${INCLUDE_DIR}" + ) + set(${NAMESPACE}_${LIB_NAME}_FOUND 1) +endfunction() + +get_filename_component(ROOT "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(ROOT "${ROOT}" PATH) +get_filename_component(ROOT "${ROOT}" PATH) + +if (CMAKE_HOST_WIN32) +set_library_target("RYU" "ryu" "${ROOT}/debug/lib/ryu.lib" "${ROOT}/lib/ryu.lib" "${ROOT}/include/") +else() +set_library_target("RYU" "ryu" "${ROOT}/debug/lib/libryu.a" "${ROOT}/lib/libryu.a" "${ROOT}/include/") +endif() \ No newline at end of file diff --git a/vcpkg/ports/safeint/CONTROL b/vcpkg/ports/safeint/CONTROL new file mode 100644 index 0000000..a15905a --- /dev/null +++ b/vcpkg/ports/safeint/CONTROL @@ -0,0 +1,4 @@ +Source: safeint +Version: 3.24 +Homepage: https://github.com/dcleblanc/SafeInt +Description: SafeInt is a class library for C++ that manages integer overflows diff --git a/vcpkg/ports/safeint/portfile.cmake b/vcpkg/ports/safeint/portfile.cmake new file mode 100644 index 0000000..6db0fdf --- /dev/null +++ b/vcpkg/ports/safeint/portfile.cmake @@ -0,0 +1,11 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dcleblanc/SafeInt + REF 34a1b2191deb89eca9db4e5e1cfe5e72e70eb472 # 3.24 + SHA512 c76a973a9f0fc7d464f63ca8e5946f357832cd9688894b8f93573da75b238b08fff06ecbac44a3dbf4f2c7c472b038b44b774823a6ec3359c06becd645c924a7 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/SafeInt.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/sais/CONTROL b/vcpkg/ports/sais/CONTROL new file mode 100644 index 0000000..a889a82 --- /dev/null +++ b/vcpkg/ports/sais/CONTROL @@ -0,0 +1,3 @@ +Source: sais +Version: 2.4.1-1 +Description: An implementation of the induced sorting algorithm diff --git a/vcpkg/ports/sais/portfile.cmake b/vcpkg/ports/sais/portfile.cmake new file mode 100644 index 0000000..0e68fcc --- /dev/null +++ b/vcpkg/ports/sais/portfile.cmake @@ -0,0 +1,27 @@ + +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "https://sites.google.com/site/yuta256/sais-2.4.1.zip" + FILENAME "sais-2.4.1.zip" + SHA512 6f6dd11f842f680bebc1d9b7f6b75752c9589c600fdd5e6373bb7290a686f1de35d4cc3226347e717f89a295363f7fee0ae8b1aa05ad341f4c2ea056fb5b1425 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_SAIS64=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/sajson/CMakeLists.txt b/vcpkg/ports/sajson/CMakeLists.txt new file mode 100644 index 0000000..da83270 --- /dev/null +++ b/vcpkg/ports/sajson/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.8) + +project(sajson) + +add_library(sajson INTERFACE) + +target_compile_features(sajson INTERFACE cxx_std_11) + +target_include_directories(sajson INTERFACE + $ + $) + +install(DIRECTORY include/ + DESTINATION include + USE_SOURCE_PERMISSIONS + FILES_MATCHING PATTERN "*.h" + ) + +install(TARGETS sajson EXPORT unofficial-sajson-config) + +install(EXPORT unofficial-sajson-config + FILE unofficial-sajson-config.cmake + NAMESPACE unofficial::sajson:: + DESTINATION share/cmake/unofficial-sajson + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) diff --git a/vcpkg/ports/sajson/CONTROL b/vcpkg/ports/sajson/CONTROL new file mode 100644 index 0000000..c990cd3 --- /dev/null +++ b/vcpkg/ports/sajson/CONTROL @@ -0,0 +1,3 @@ +Source: sajson +Version: 2018-09-21 +Description: Lightweight, extremely high-performance JSON parser for C++11 diff --git a/vcpkg/ports/sajson/portfile.cmake b/vcpkg/ports/sajson/portfile.cmake new file mode 100644 index 0000000..662ab01 --- /dev/null +++ b/vcpkg/ports/sajson/portfile.cmake @@ -0,0 +1,27 @@ +# Header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO chadaustin/sajson + REF 2dcfd350586375f9910f74821d4f07d67ae455ba + SHA512 6029a640f8bd6c7cefc507819a18a708f6d7e9ce84fdd2998506cea26d597b999d2776a7307908f5df02994bc53c3c9bdf6a73344ab70ee6a5c775b54351e7d2 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/unofficial-sajson TARGET_PATH share/unofficial-sajson) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/sajson/copyright COPYONLY) diff --git a/vcpkg/ports/scintilla/0001-static-lib.patch b/vcpkg/ports/scintilla/0001-static-lib.patch new file mode 100644 index 0000000..2661b0f --- /dev/null +++ b/vcpkg/ports/scintilla/0001-static-lib.patch @@ -0,0 +1,14 @@ +diff --git a/win32/SciLexer.vcxproj b/win32/SciLexer.vcxproj +index b2e993c..c8774f1 100644 +--- a/win32/SciLexer.vcxproj ++++ b/win32/SciLexer.vcxproj +@@ -33,7 +33,7 @@ + + + +- DynamicLibrary ++ StaticLibrary + Unicode + v141 + +-- diff --git a/vcpkg/ports/scintilla/0002-static-crt.patch b/vcpkg/ports/scintilla/0002-static-crt.patch new file mode 100644 index 0000000..20268d7 --- /dev/null +++ b/vcpkg/ports/scintilla/0002-static-crt.patch @@ -0,0 +1,37 @@ +diff --git a/win32/SciLexer.vcxproj b/win32/SciLexer.vcxproj +index b2e993c..c8774f1 100644 +--- a/win32/SciLexer.vcxproj ++++ b/win32/SciLexer.vcxproj +@@ -88,6 +88,7 @@ + + _DEBUG;%(PreprocessorDefinitions) + stdcpp17 ++ MultiThreadedDebug + + + Default +@@ -97,6 +98,7 @@ + + _DEBUG;%(PreprocessorDefinitions) + stdcpp17 ++ MultiThreadedDebug + + + Default +@@ -117,6 +119,7 @@ + true + NDEBUG;%(PreprocessorDefinitions) + stdcpp17 ++ MultiThreaded + + + true +@@ -129,6 +132,7 @@ + true + NDEBUG;%(PreprocessorDefinitions) + stdcpp17 ++ MultiThreaded + + + true +-- diff --git a/vcpkg/ports/scintilla/CONTROL b/vcpkg/ports/scintilla/CONTROL new file mode 100644 index 0000000..290fb45 --- /dev/null +++ b/vcpkg/ports/scintilla/CONTROL @@ -0,0 +1,5 @@ +Source: scintilla +Version: 4.4.5 +Homepage: https://www.scintilla.org/ +Description: A free source code editing component for Win32, GTK+, and OS X +Supports: !(uwp|linux|osx) diff --git a/vcpkg/ports/scintilla/portfile.cmake b/vcpkg/ports/scintilla/portfile.cmake new file mode 100644 index 0000000..8823621 --- /dev/null +++ b/vcpkg/ports/scintilla/portfile.cmake @@ -0,0 +1,30 @@ +vcpkg_fail_port_install(ON_TARGET "Linux" "OSX" "UWP") + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.scintilla.org/scintilla445.zip" + FILENAME "scintilla445.zip" + SHA512 bac25ee6e9b1ab3602a6fbf2f28f046f6da5c45dfd6e882df250760a254517ee9b05d95b816234b5145553f0a8da92016d7839a50624543c52fde7539ea08259 +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + list(APPEND PATCHES 0001-static-lib.patch) +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL "static") + list(APPEND PATCHES 0002-static-crt.patch) +endif() + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF 4.4.5 + PATCHES ${PATCHES} +) + +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH Win32/SciLexer.vcxproj + INCLUDES_SUBPATH include + LICENSE_SUBPATH License.txt + ALLOW_ROOT_INCLUDES +) diff --git a/vcpkg/ports/sciter/CONTROL b/vcpkg/ports/sciter/CONTROL new file mode 100644 index 0000000..5b0b743 --- /dev/null +++ b/vcpkg/ports/sciter/CONTROL @@ -0,0 +1,8 @@ +Source: sciter +Version: 4.4.3.20 +Homepage: https://github.com/c-smile/sciter-sdk +Description: Sciter is an embeddable HTML/CSS/scripting engine. +Supports: !uwp + +Feature: windowless +Description: Uses Sciter.Lite builds diff --git a/vcpkg/ports/sciter/portfile.cmake b/vcpkg/ports/sciter/portfile.cmake new file mode 100644 index 0000000..4c9d7f6 --- /dev/null +++ b/vcpkg/ports/sciter/portfile.cmake @@ -0,0 +1,107 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "Sciter only supports Windows Desktop") +endif() + +# header-only library +set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) + +set(SCITER_REVISION 63c9328e88c1877deea721cbe060b19c4fce7cb6) +set(SCITER_SHA 151ae3f74980e76fa04e0d5ef54ed56efcee312b4654c906a04b017384073ddf9ae353c29d9f0a12f681fd83d42e57b9ed3b563c641979406ddad0b3cc26d49c) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + set(SCITER_ARCH x64) +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + set(SCITER_ARCH x32) +endif() + +# check out the `https://github.com/c-smile/sciter-sdk/archive/${SCITER_REVISION}.tar.gz` +# hash checksum can be obtained with `curl -L -o tmp.tgz ${URL} && vcpkg hash tmp.tgz` +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO c-smile/sciter-sdk + REF ${SCITER_REVISION} + SHA512 ${SCITER_SHA} +) + +# install include directory +file(INSTALL ${SOURCE_PATH}/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/sciter + FILES_MATCHING + PATTERN "*.cpp" + PATTERN "*.mm" + PATTERN "*.h" + PATTERN "*.hpp" +) + +set(SCITER_SHARE ${CURRENT_PACKAGES_DIR}/share/sciter) +set(SCITER_TOOLS ${CURRENT_PACKAGES_DIR}/tools/sciter) +set(TOOL_PERMS FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + +# license +file(COPY ${SOURCE_PATH}/logfile.htm DESTINATION ${SCITER_SHARE}) +file(INSTALL ${SOURCE_PATH}/license.htm DESTINATION ${SCITER_SHARE} RENAME copyright) + +# samples & widgets +file(COPY ${SOURCE_PATH}/samples DESTINATION ${SCITER_SHARE}) +file(COPY ${SOURCE_PATH}/widgets DESTINATION ${SCITER_SHARE}) + +# tools +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Linux AND VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + set(SCITER_BIN ${SOURCE_PATH}/bin.lnx/x64) + + file(INSTALL ${SOURCE_PATH}/bin.lnx/packfolder DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS}) + file(INSTALL ${SOURCE_PATH}/bin.lnx/tiscript DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS}) + + file(INSTALL ${SCITER_BIN}/usciter DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS}) + file(INSTALL ${SCITER_BIN}/inspector DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS}) + file(INSTALL ${SCITER_BIN}/libsciter-gtk.so DESTINATION ${SCITER_TOOLS}) + + if ("windowless" IN_LIST FEATURES) + set(SCITER_BIN ${SOURCE_PATH}/bin.lnx/x64lite) + endif() + + file(INSTALL ${SCITER_BIN}/libsciter-gtk.so DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${SCITER_BIN}/libsciter-gtk.so DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL Darwin) + set(SCITER_BIN ${SOURCE_PATH}/bin.osx) + + file(INSTALL ${SCITER_BIN}/packfolder DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS}) + file(INSTALL ${SCITER_BIN}/tiscript DESTINATION ${SCITER_TOOLS} ${TOOL_PERMS}) + + file(INSTALL ${SCITER_BIN}/inspector.app DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SCITER_BIN}/sciter.app DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SCITER_BIN}/sciter-osx-64.dylib DESTINATION ${SCITER_TOOLS}) + + # not sure whether there is a better way to do this, because + # `file(INSTALL sciter.app FILE_PERMISSIONS EXECUTE)` + # would mark everything as executable which is no go. + execute_process(COMMAND sh -c "chmod +x sciter.app/Contents/MacOS/sciter" WORKING_DIRECTORY ${SCITER_TOOLS}) + execute_process(COMMAND sh -c "chmod +x inspector.app/Contents/MacOS/inspector" WORKING_DIRECTORY ${SCITER_TOOLS}) + + file(INSTALL ${SCITER_BIN}/sciter-osx-64.dylib DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${SCITER_BIN}/sciter-osx-64.dylib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + +else() + set(SCITER_BIN ${SOURCE_PATH}/bin.win/${SCITER_ARCH}) + set(SCITER_BIN32 ${SOURCE_PATH}/bin.win/x32) + + file(INSTALL ${SOURCE_PATH}/bin.win/packfolder.exe DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SOURCE_PATH}/bin.win/tiscript.exe DESTINATION ${SCITER_TOOLS}) + + file(INSTALL ${SCITER_BIN32}/wsciter.exe DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SCITER_BIN32}/inspector.exe DESTINATION ${SCITER_TOOLS}) + file(INSTALL ${SCITER_BIN32}/sciter.dll DESTINATION ${SCITER_TOOLS}) + + if ("windowless" IN_LIST FEATURES) + set(SCITER_BIN ${SOURCE_PATH}/bin.win/${SCITER_ARCH}lite) + endif() + + file(INSTALL ${SCITER_BIN}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(INSTALL ${SCITER_BIN}/sciter.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +message(STATUS "Warning: Sciter requires manual deployment of the correct DLL files.") diff --git a/vcpkg/ports/scnlib/CONTROL b/vcpkg/ports/scnlib/CONTROL new file mode 100644 index 0000000..cccdd55 --- /dev/null +++ b/vcpkg/ports/scnlib/CONTROL @@ -0,0 +1,4 @@ +Source: scnlib +Version: 0.3 +Description: scnlib is a modern C++ library for replacing scanf and std::istream +Homepage: https://scnlib.dev/ diff --git a/vcpkg/ports/scnlib/portfile.cmake b/vcpkg/ports/scnlib/portfile.cmake new file mode 100644 index 0000000..ae7777a --- /dev/null +++ b/vcpkg/ports/scnlib/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO eliaskosunen/scnlib + REF v0.3 + SHA512 91ab0ff5d7d2e4a4924bfa00cafc49c3b0d88b87f4adbdce786be0f51913e3c61c6948c27da6af1e020646e610540dc63323fbf7b59f9210266f1ba79bf95adc + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSCN_TESTS=OFF + -DSCN_EXAMPLES=OFF + -DSCN_BENCHMARKS=OFF + -DSCN_DOCS=OFF + -DSCN_RANGES=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/scn) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/share/scn) + +file(INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright) + +vcpkg_test_cmake(PACKAGE_NAME scn) diff --git a/vcpkg/ports/scylla-wrapper/CMakeLists.txt b/vcpkg/ports/scylla-wrapper/CMakeLists.txt new file mode 100644 index 0000000..b906d15 --- /dev/null +++ b/vcpkg/ports/scylla-wrapper/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required(VERSION 3.8.0) +project(scylla_wrapper CXX) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 /DUNICODE /D_UNICODE -D_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS -D_CRT_SECURE_NO_WARNINGS -DNOMINMAX) +endif() + +find_library(DISTORM_LIBRARY distorm) +find_path(DISTORM_INCLUDE_DIR distorm.h) + +include_directories(scylla_wrapper ${DISTORM_INCLUDE_DIR}) + +file(GLOB scylla_wrapper_srcs "scylla_wrapper/*.cpp") + +add_library(scylla_wrapper ${scylla_wrapper_srcs}) + +if(BUILD_SHARED_LIBS) + target_compile_definitions(scylla_wrapper PRIVATE -DSCYLLA_WRAPPER_EXPORTS) +endif() + +target_link_libraries(scylla_wrapper PRIVATE ${DISTORM_LIBRARY}) + +install( + TARGETS scylla_wrapper + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES scylla_wrapper/scylla_wrapper.h DESTINATION include) +endif() diff --git a/vcpkg/ports/scylla-wrapper/CONTROL b/vcpkg/ports/scylla-wrapper/CONTROL new file mode 100644 index 0000000..bbe37c1 --- /dev/null +++ b/vcpkg/ports/scylla-wrapper/CONTROL @@ -0,0 +1,4 @@ +Source: scylla-wrapper +Version: 2018-08-26-16e6f435 +Build-Depends: distorm +Description: This is a wrapper around Scylla. It exports functions for IAT fixing, dumping and PE rebuilding. based on https://github.com/NtQuery/Scylla commit 0f6b7198be (v0.9.6b). \ No newline at end of file diff --git a/vcpkg/ports/scylla-wrapper/portfile.cmake b/vcpkg/ports/scylla-wrapper/portfile.cmake new file mode 100644 index 0000000..69e28b6 --- /dev/null +++ b/vcpkg/ports/scylla-wrapper/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +# scylla_wrapper_dll supplies a DllMain +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_bitbucket( + OUT_SOURCE_PATH SOURCE_PATH + REPO cypherpunk/scylla_wrapper_dll + REF 4ad953ec04108269f1d80a91b2723b3e22d1b4d2 + SHA512 d7cb72e097e86e96cf0a8f463c0f839c9608fa4276bc1e2e984290984bcfe8a5b2257b1511259cb78802819fadf2c1001dc3011ee2c6dc9dfcbdb561d34e0c35 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(REMOVE + ${SOURCE_PATH}/scylla_wrapper_dll/distorm.h + ${SOURCE_PATH}/scylla_wrapper_dll/distorm_x64.lib + ${SOURCE_PATH}/scylla_wrapper_dll/distorm_x86.lib +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/scylla-wrapper RENAME copyright) diff --git a/vcpkg/ports/sdformat6/CONTROL b/vcpkg/ports/sdformat6/CONTROL new file mode 100644 index 0000000..8f1e5ed --- /dev/null +++ b/vcpkg/ports/sdformat6/CONTROL @@ -0,0 +1,6 @@ +Source: sdformat6 +Version: 6.2.0-1 +Homepage: http://sdformat.org/ +Build-Depends: boost-any, boost-variant, ignition-math4, urdfdom, tinyxml +Description: Simulation Description Format (SDF) parser and description files. +Supports: !(arm|uwp) \ No newline at end of file diff --git a/vcpkg/ports/sdformat6/portfile.cmake b/vcpkg/ports/sdformat6/portfile.cmake new file mode 100644 index 0000000..e5e1c04 --- /dev/null +++ b/vcpkg/ports/sdformat6/portfile.cmake @@ -0,0 +1,52 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO osrf/sdformat + REF sdformat6_6.2.0 + SHA512 3d139ec4b4c9fbfd547ed8bfca0adb5cdca92c1b7cc4d4b554a7c51ccf755b9079c26a006ebfedc5bc5b1ba5e16ad950bb38c47ea97bf97e59a2fd7d12d60620 + HEAD_REF sdf6 +) + +# Ruby is required by the sdformat build process +vcpkg_find_acquire_program(RUBY) +get_filename_component(RUBY_PATH ${RUBY} DIRECTORY) +set(_path $ENV{PATH}) +vcpkg_add_to_path(${RUBY_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DBUILD_TESTING=OFF + -DUSE_EXTERNAL_URDF=ON + -DUSE_EXTERNAL_TINYXML=ON +) + +vcpkg_install_cmake() + +# Restore original path +set(ENV{PATH} ${_path}) + +# Move location of sdformat.dll from lib to bin +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/sdformat.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/sdformat.dll + ${CURRENT_PACKAGES_DIR}/bin/sdformat.dll) +endif() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/sdformat.dll) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/sdformat.dll + ${CURRENT_PACKAGES_DIR}/debug/bin/sdformat.dll) +endif() + +# Fix cmake targets location +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/sdformat") + +# Remove debug files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/lib/cmake + ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/sdformat9/CONTROL b/vcpkg/ports/sdformat9/CONTROL new file mode 100644 index 0000000..d9fba0d --- /dev/null +++ b/vcpkg/ports/sdformat9/CONTROL @@ -0,0 +1,6 @@ +Source: sdformat9 +Version: 9.2.0-1 +Homepage: http://sdformat.org/ +Build-Depends: ignition-math6, urdfdom, tinyxml +Description: Simulation Description Format (SDF) parser and description files. +Supports: !(linux|uwp) \ No newline at end of file diff --git a/vcpkg/ports/sdformat9/fix-dependency-urdfdom.patch b/vcpkg/ports/sdformat9/fix-dependency-urdfdom.patch new file mode 100644 index 0000000..d2b1a59 --- /dev/null +++ b/vcpkg/ports/sdformat9/fix-dependency-urdfdom.patch @@ -0,0 +1,17 @@ +diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake +index 965f1ec..cf2acf4 100644 +--- a/cmake/SearchForStuff.cmake ++++ b/cmake/SearchForStuff.cmake +@@ -53,10 +53,9 @@ if (NOT PKG_CONFIG_FOUND) + endif() + + if (NOT DEFINED USE_INTERNAL_URDF OR NOT USE_INTERNAL_URDF) +- # check for urdfdom with pkg-config +- pkg_check_modules(URDF urdfdom>=1.0) ++ find_package(urdfdom CONFIG REQUIRED) + +- if (NOT URDF_FOUND) ++ if (NOT urdfdom_FOUND) + if (NOT DEFINED USE_INTERNAL_URDF) + message(STATUS "Couldn't find urdfdom >= 1.0, using internal copy") + set(USE_INTERNAL_URDF true) diff --git a/vcpkg/ports/sdformat9/portfile.cmake b/vcpkg/ports/sdformat9/portfile.cmake new file mode 100644 index 0000000..c1567ef --- /dev/null +++ b/vcpkg/ports/sdformat9/portfile.cmake @@ -0,0 +1,44 @@ +vcpkg_fail_port_install(ON_TARGET "linux" "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO osrf/sdformat + REF sdformat9_9.2.0 + SHA512 6fc7d0ce46d9a7d1cae4fd905ebe6a07bb4ba98faa267be92a32b3409d6d82a99d5082485008a15484f7b5be2c347b5b24bc472fb1a4be5eb8b678b105cae6af + HEAD_REF sdf9 + PATCHES + respect-build-testing.patch # Backport of https://github.com/osrf/sdformat/pull/269 + fix-dependency-urdfdom.patch +) + +# Ruby is required by the sdformat build process +vcpkg_find_acquire_program(RUBY) +get_filename_component(RUBY_PATH ${RUBY} DIRECTORY) +set(_path $ENV{PATH}) +vcpkg_add_to_path(${RUBY_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF + -DUSE_EXTERNAL_URDF=ON + -DUSE_EXTERNAL_TINYXML=ON +) + +vcpkg_install_cmake() + +# Restore original path +set(ENV{PATH} ${_path}) + +# Fix cmake targets and pkg-config file location +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/sdformat9") +vcpkg_fixup_pkgconfig() + +# Remove debug files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/lib/cmake + ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/sdformat9/respect-build-testing.patch b/vcpkg/ports/sdformat9/respect-build-testing.patch new file mode 100644 index 0000000..8509b91 --- /dev/null +++ b/vcpkg/ports/sdformat9/respect-build-testing.patch @@ -0,0 +1,182 @@ +From f31b1d65e0cc550d37ff9f67a01af055534282d0 Mon Sep 17 00:00:00 2001 +From: Silvio +Date: Sat, 2 May 2020 12:39:02 +0200 +Subject: [PATCH] If defined observe the CMake variable BUILD_TESTING + +For backward compatibility if it is not defined compile the tests + +Signed-off-by: Silvio +--- + CMakeLists.txt | 10 +++- + src/CMakeLists.txt | 136 +++++++++++++++++++++++---------------------- + 2 files changed, 78 insertions(+), 68 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c0b934f9..38a71649 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -265,7 +265,15 @@ else (build_errors) + + link_directories(${PROJECT_BINARY_DIR}/src) + +- add_subdirectory(test) ++ if (NOT DEFINED BUILD_TESTING OR BUILD_TESTING) ++ set(BUILD_SDF_TEST TRUE) ++ else() ++ set(BUILD_SDF_TEST FALSE) ++ endif() ++ ++ if (BUILD_SDF_TEST) ++ add_subdirectory(test) ++ endif() + add_subdirectory(src) + add_subdirectory(include/sdf) + add_subdirectory(sdf) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 7dbb9536..c283a00a 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -91,74 +91,76 @@ else() + include_directories(${URDF_INCLUDE_DIRS}) + endif() + +-set (gtest_sources +- Actor_TEST.cc +- AirPressure_TEST.cc +- Altimeter_TEST.cc +- Atmosphere_TEST.cc +- Box_TEST.cc +- Camera_TEST.cc +- Collision_TEST.cc +- Console_TEST.cc +- Cylinder_TEST.cc +- Element_TEST.cc +- Error_TEST.cc +- Exception_TEST.cc +- Frame_TEST.cc +- Filesystem_TEST.cc +- Geometry_TEST.cc +- Gui_TEST.cc +- Imu_TEST.cc +- Joint_TEST.cc +- JointAxis_TEST.cc +- Lidar_TEST.cc +- Light_TEST.cc +- Link_TEST.cc +- Magnetometer_TEST.cc +- Material_TEST.cc +- Mesh_TEST.cc +- Model_TEST.cc +- Noise_TEST.cc +- parser_urdf_TEST.cc +- Param_TEST.cc +- parser_TEST.cc +- Pbr_TEST.cc +- Physics_TEST.cc +- Plane_TEST.cc +- Root_TEST.cc +- Scene_TEST.cc +- SemanticPose_TEST.cc +- SDF_TEST.cc +- Sensor_TEST.cc +- Sphere_TEST.cc +- Surface_TEST.cc +- Types_TEST.cc +- Visual_TEST.cc +- World_TEST.cc +-) +- +-# Build this test file only if Ignition Tools is installed. +-if (IGNITION-TOOLS_BINARY_DIRS) +- set (gtest_sources ${gtest_sources} +- ign_TEST.cc ++if (BUILD_SDF_TEST) ++ set (gtest_sources ++ Actor_TEST.cc ++ AirPressure_TEST.cc ++ Altimeter_TEST.cc ++ Atmosphere_TEST.cc ++ Box_TEST.cc ++ Camera_TEST.cc ++ Collision_TEST.cc ++ Console_TEST.cc ++ Cylinder_TEST.cc ++ Element_TEST.cc ++ Error_TEST.cc ++ Exception_TEST.cc ++ Frame_TEST.cc ++ Filesystem_TEST.cc ++ Geometry_TEST.cc ++ Gui_TEST.cc ++ Imu_TEST.cc ++ Joint_TEST.cc ++ JointAxis_TEST.cc ++ Lidar_TEST.cc ++ Light_TEST.cc ++ Link_TEST.cc ++ Magnetometer_TEST.cc ++ Material_TEST.cc ++ Mesh_TEST.cc ++ Model_TEST.cc ++ Noise_TEST.cc ++ parser_urdf_TEST.cc ++ Param_TEST.cc ++ parser_TEST.cc ++ Pbr_TEST.cc ++ Physics_TEST.cc ++ Plane_TEST.cc ++ Root_TEST.cc ++ Scene_TEST.cc ++ SemanticPose_TEST.cc ++ SDF_TEST.cc ++ Sensor_TEST.cc ++ Sphere_TEST.cc ++ Surface_TEST.cc ++ Types_TEST.cc ++ Visual_TEST.cc ++ World_TEST.cc + ) +-endif() +- +-sdf_build_tests(${gtest_sources}) +- +-if (NOT WIN32) +- set(SDF_BUILD_TESTS_EXTRA_EXE_SRCS Utils.cc) +- sdf_build_tests(Utils_TEST.cc) +-endif() +- +-if (NOT WIN32) +- set(SDF_BUILD_TESTS_EXTRA_EXE_SRCS FrameSemantics.cc) +- sdf_build_tests(FrameSemantics_TEST.cc) +-endif() +- +-if (NOT WIN32) +- set(SDF_BUILD_TESTS_EXTRA_EXE_SRCS Converter.cc) +- sdf_build_tests(Converter_TEST.cc) ++ ++ # Build this test file only if Ignition Tools is installed. ++ if (IGNITION-TOOLS_BINARY_DIRS) ++ set (gtest_sources ${gtest_sources} ++ ign_TEST.cc ++ ) ++ endif() ++ ++ sdf_build_tests(${gtest_sources}) ++ ++ if (NOT WIN32) ++ set(SDF_BUILD_TESTS_EXTRA_EXE_SRCS Utils.cc) ++ sdf_build_tests(Utils_TEST.cc) ++ endif() ++ ++ if (NOT WIN32) ++ set(SDF_BUILD_TESTS_EXTRA_EXE_SRCS FrameSemantics.cc) ++ sdf_build_tests(FrameSemantics_TEST.cc) ++ endif() ++ ++ if (NOT WIN32) ++ set(SDF_BUILD_TESTS_EXTRA_EXE_SRCS Converter.cc) ++ sdf_build_tests(Converter_TEST.cc) ++ endif() + endif() + + sdf_add_library(${sdf_target} ${sources}) diff --git a/vcpkg/ports/sdl1-net/CMakeLists.txt b/vcpkg/ports/sdl1-net/CMakeLists.txt new file mode 100644 index 0000000..1e1f951 --- /dev/null +++ b/vcpkg/ports/sdl1-net/CMakeLists.txt @@ -0,0 +1,27 @@ +cmake_minimum_required(VERSION 3.0) +project(SDL1_NET C) + +if (MSVC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4244 /wd4996") +endif() + +find_package(SDL) + +add_library(SDL_net SDLnet.c SDLnetselect.c SDLnetTCP.c SDLnetUDP.c version.rc) + +set_target_properties(SDL_net PROPERTIES DEFINE_SYMBOL SDL1_EXPORTS) +target_compile_definitions(SDL_net PRIVATE _WINSOCK_DEPRECATED_NO_WARNINGS) +target_include_directories(SDL_net PRIVATE ${SDL_INCLUDE_DIR}) +target_link_libraries(SDL_net ${SDL_LIBRARY} ws2_32 iphlpapi) + +install(TARGETS SDL_net + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +if(NOT DEFINED SDL_NET_SKIP_HEADERS) + install(FILES SDL_net.h DESTINATION include) +endif() + +message(STATUS "Link-time dependencies:") +message(STATUS " " ${SDL_LIBRARY}) diff --git a/vcpkg/ports/sdl1-net/CONTROL b/vcpkg/ports/sdl1-net/CONTROL new file mode 100644 index 0000000..61544ab --- /dev/null +++ b/vcpkg/ports/sdl1-net/CONTROL @@ -0,0 +1,4 @@ +Source: sdl1-net +Version: 1.2.8-3 +Description: Networking library for SDL +Build-Depends: sdl1 diff --git a/vcpkg/ports/sdl1-net/portfile.cmake b/vcpkg/ports/sdl1-net/portfile.cmake new file mode 100644 index 0000000..0c1d0e1 --- /dev/null +++ b/vcpkg/ports/sdl1-net/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.libsdl.org/projects/SDL_net/release/SDL_net-1.2.8.tar.gz" + FILENAME "SDL_net-1.2.8.tar.gz" + SHA512 2766ca55343127c619958ab3a3ae3052a27a676839f10a158f7dfc071b8db38c2f1fc853e8add32b9fef94ab07eaa986f46a68e264e8087b57c990af30ea9a0b +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DSDL_NET_SKIP_HEADERS=ON) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl1-net) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/sdl1-net/COPYING ${CURRENT_PACKAGES_DIR}/share/sdl1-net/copyright) diff --git a/vcpkg/ports/sdl1/CONTROL b/vcpkg/ports/sdl1/CONTROL new file mode 100644 index 0000000..87bb7b2 --- /dev/null +++ b/vcpkg/ports/sdl1/CONTROL @@ -0,0 +1,5 @@ +Source: sdl1 +Version: 1.2.15 +Port-Version: 12 +Homepage: https://www.libsdl.org +Description: Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. diff --git a/vcpkg/ports/sdl1/SDL1_2017.sln b/vcpkg/ports/sdl1/SDL1_2017.sln new file mode 100644 index 0000000..ff6de08 --- /dev/null +++ b/vcpkg/ports/sdl1/SDL1_2017.sln @@ -0,0 +1,65 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2003 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDL", "SDL\SDL.vcxproj", "{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDLmain", "SDLmain\SDLmain.vcxproj", "{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM64 = Debug|ARM64 + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release_NoSTDIO|ARM64 = Release_NoSTDIO|ARM64 + Release_NoSTDIO|Win32 = Release_NoSTDIO|Win32 + Release_NoSTDIO|x64 = Release_NoSTDIO|x64 + Release|ARM64 = Release|ARM64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|ARM64.Build.0 = Debug|ARM64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.ActiveCfg = Debug|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.Build.0 = Debug|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.ActiveCfg = Debug|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.Build.0 = Debug|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|ARM64.ActiveCfg = Release|ARM64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|ARM64.Build.0 = Release|ARM64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|Win32.ActiveCfg = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|Win32.Build.0 = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|x64.ActiveCfg = Release|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release_NoSTDIO|x64.Build.0 = Release|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|ARM64.ActiveCfg = Release|ARM64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|ARM64.Build.0 = Release|ARM64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.ActiveCfg = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.Build.0 = Release|Win32 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.ActiveCfg = Release|x64 + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.Build.0 = Release|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|ARM64.Build.0 = Debug|ARM64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.ActiveCfg = Debug|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.Build.0 = Debug|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.ActiveCfg = Debug|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.Build.0 = Debug|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|ARM64.ActiveCfg = Release_NoSTDIO|ARM64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|ARM64.Build.0 = Release_NoSTDIO|ARM64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|Win32.ActiveCfg = Release_NoSTDIO|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|Win32.Build.0 = Release_NoSTDIO|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|x64.ActiveCfg = Release_NoSTDIO|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release_NoSTDIO|x64.Build.0 = Release_NoSTDIO|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|ARM64.ActiveCfg = Release|ARM64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|ARM64.Build.0 = Release|ARM64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.ActiveCfg = Release|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.Build.0 = Release|Win32 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.ActiveCfg = Release|x64 + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {D0FB7C52-B8AE-4A23-A002-2F7DEF5F6BD6} + EndGlobalSection +EndGlobal diff --git a/vcpkg/ports/sdl1/SDL_dynamic.vcxproj b/vcpkg/ports/sdl1/SDL_dynamic.vcxproj new file mode 100644 index 0000000..f6c3873 --- /dev/null +++ b/vcpkg/ports/sdl1/SDL_dynamic.vcxproj @@ -0,0 +1,462 @@ + + + + + Debug + ARM64 + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM64 + + + Release + Win32 + + + Release + x64 + + + + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} + SDL + + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + DynamicLibrary + v141 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>15.0.27924.0 + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/SDL.tlb + + + Disabled + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + MultiThreadedDLL + false + + .\Debug/SDL.pch + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Debug/SDL.dll + true + false + true + .\Debug/SDL.pdb + Windows + false + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Debug/SDL.tlb + + + Disabled + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + MultiThreadedDLL + false + + .\Debug/SDL.pch + Level3 + true + ProgramDatabase + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Debug/SDL.dll + true + false + true + .\Debug/SDL.pdb + Windows + MachineX64 + false + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + .\Debug/SDL.tlb + + + Disabled + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + MultiThreadedDLL + false + + + .\Debug/SDL.pch + Level3 + true + ProgramDatabase + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Debug/SDL.dll + true + false + true + .\Debug/SDL.pdb + Windows + false + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/SDL.tlb + + + OnlyExplicitInline + false + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + + .\Release/SDL.pch + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Release/SDL.dll + true + false + .\Release/SDL.pdb + Windows + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Release/SDL.tlb + + + OnlyExplicitInline + false + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + + .\Release/SDL.pch + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Release/SDL.dll + true + false + .\Release/SDL.pdb + Windows + MachineX64 + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + .\Release/SDL.tlb + + + OnlyExplicitInline + false + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + + + .\Release/SDL.pch + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Release/SDL.dll + true + false + .\Release/SDL.pdb + Windows + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vcpkg/ports/sdl1/SDL_static.vcxproj b/vcpkg/ports/sdl1/SDL_static.vcxproj new file mode 100644 index 0000000..dfe46bb --- /dev/null +++ b/vcpkg/ports/sdl1/SDL_static.vcxproj @@ -0,0 +1,354 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} + SDL + + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>15.0.27924.0 + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + true + + + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + + + $(SolutionDir)$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + false + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/SDL.tlb + + + Disabled + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + MultiThreadedDebug + false + + .\Debug/SDL.pch + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Debug/SDL.dll + true + false + true + .\Debug/SDL.pdb + Windows + false + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Debug/SDL.tlb + + + Disabled + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + MultiThreadedDebug + false + + .\Debug/SDL.pch + Level3 + true + ProgramDatabase + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Debug/SDL.dll + true + false + true + .\Debug/SDL.pdb + Windows + MachineX64 + false + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/SDL.tlb + + + OnlyExplicitInline + false + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + true + MultiThreaded + false + true + + .\Release/SDL.pch + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MACHINE:I386 %(AdditionalOptions) + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Release/SDL.dll + true + false + .\Release/SDL.pdb + Windows + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Release/SDL.tlb + + + OnlyExplicitInline + false + $(ProjectDir)\..\..\include;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;WINDOWS_IGNORE_PACKING_MISMATCH;%(PreprocessorDefinitions) + true + MultiThreaded + false + true + + .\Release/SDL.pch + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + winmm.lib;dxguid.lib;%(AdditionalDependencies) + .\Release/SDL.dll + true + false + .\Release/SDL.pdb + Windows + MachineX64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vcpkg/ports/sdl1/SDLmain_dynamic.vcxproj b/vcpkg/ports/sdl1/SDLmain_dynamic.vcxproj new file mode 100644 index 0000000..dd4c89a --- /dev/null +++ b/vcpkg/ports/sdl1/SDLmain_dynamic.vcxproj @@ -0,0 +1,313 @@ + + + + + Debug + ARM64 + + + Debug + Win32 + + + Debug + x64 + + + Release_NoSTDIO + ARM64 + + + Release_NoSTDIO + Win32 + + + Release_NoSTDIO + x64 + + + Release + ARM64 + + + Release + Win32 + + + Release + x64 + + + + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} + + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>15.0.27924.0 + + + .\Release\ + .\Release\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + .\Release_NOSTDIO\ + .\Release_NOSTDIO\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + .\Debug\ + .\Debug\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + .\Release/SDLmain.pch + Level3 + Default + + + + + X64 + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + .\Release/SDLmain.pch + Level3 + Default + + + + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release/SDLmain.pch + Level3 + Default + + + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + .\Release_NOSTDIO/SDLmain.pch + Level3 + Default + + + + + X64 + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + .\Release_NOSTDIO/SDLmain.pch + Level3 + Default + + + + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release_NOSTDIO/SDLmain.pch + Level3 + Default + + + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + .\Debug/SDLmain.pch + Level3 + OldStyle + Default + + + + + X64 + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + .\Debug/SDLmain.pch + Level3 + OldStyle + Default + + + + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + .\Debug/SDLmain.pch + Level3 + OldStyle + Default + + + + + + + + + \ No newline at end of file diff --git a/vcpkg/ports/sdl1/SDLmain_static.vcxproj b/vcpkg/ports/sdl1/SDLmain_static.vcxproj new file mode 100644 index 0000000..3f3b6ca --- /dev/null +++ b/vcpkg/ports/sdl1/SDLmain_static.vcxproj @@ -0,0 +1,215 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release_NoSTDIO + Win32 + + + Release_NoSTDIO + x64 + + + Release + Win32 + + + Release + x64 + + + + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} + + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + StaticLibrary + v141 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>15.0.27924.0 + + + .\Release\ + .\Release\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + .\Release_NOSTDIO\ + .\Release_NOSTDIO\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + .\Debug\ + .\Debug\ + + + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreaded + true + + .\Release/SDLmain.pch + Level3 + Default + + + + + X64 + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreaded + true + + .\Release/SDLmain.pch + Level3 + Default + + + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) + true + MultiThreaded + true + + .\Release_NOSTDIO/SDLmain.pch + Level3 + Default + + + + + X64 + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) + true + MultiThreaded + true + + .\Release_NOSTDIO/SDLmain.pch + Level3 + Default + + + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDebug + + .\Debug/SDLmain.pch + Level3 + OldStyle + Default + + + + + X64 + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDebug + + .\Debug/SDLmain.pch + Level3 + OldStyle + Default + + + + + + + + + \ No newline at end of file diff --git a/vcpkg/ports/sdl1/export-symbols-only-in-shared-build.patch b/vcpkg/ports/sdl1/export-symbols-only-in-shared-build.patch new file mode 100644 index 0000000..c1ea96d --- /dev/null +++ b/vcpkg/ports/sdl1/export-symbols-only-in-shared-build.patch @@ -0,0 +1,15 @@ +diff -r 8df7a59b5528 -r 46ec9baae30c include/begin_code.h +--- a/include/begin_code.h Fri Sep 22 11:25:52 2017 -0700 ++++ b/include/begin_code.h Sun Sep 24 14:32:30 2017 +0300 +@@ -54,8 +54,10 @@ + # else + # define DECLSPEC __declspec(dllimport) + # endif ++# elif defined(_DLL) ++# define DECLSPEC __declspec(dllexport) + # else +-# define DECLSPEC __declspec(dllexport) ++# define DECLSPEC + # endif + # elif defined(__OS2__) + # ifdef __WATCOMC__ diff --git a/vcpkg/ports/sdl1/fix-linux-build.patch b/vcpkg/ports/sdl1/fix-linux-build.patch new file mode 100644 index 0000000..f6ad36c --- /dev/null +++ b/vcpkg/ports/sdl1/fix-linux-build.patch @@ -0,0 +1,13 @@ +diff --git a/src/video/x11/SDL_x11sym.h b/src/video/x11/SDL_x11sym.h +index 4875b98..10bf365 100644 +--- a/src/video/x11/SDL_x11sym.h ++++ b/src/video/x11/SDL_x11sym.h +@@ -165,7 +165,7 @@ SDL_X11_SYM(Bool,XShmQueryExtension,(Display* a),(a),return) + */ + #ifdef LONG64 + SDL_X11_MODULE(IO_32BIT) +-SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return) ++SDL_X11_SYM(int,_XData32,(Display *dpy,_Xconst register long *data,unsigned len),(dpy,data,len),return) + SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data,len),) + #endif + diff --git a/vcpkg/ports/sdl1/portfile.cmake b/vcpkg/ports/sdl1/portfile.cmake new file mode 100644 index 0000000..6dd7da6 --- /dev/null +++ b/vcpkg/ports/sdl1/portfile.cmake @@ -0,0 +1,74 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO SDL-Mirror/SDL + REF release-1.2.15 + SHA512 38b94a650ec205377ae1503d0ec8a5254ef6d50ed0acac8d985b57b64bc16ea042cfa41e19e5ef8317980c4afb83186829f5bc3da9433d0a649dfd10554801b5 + HEAD_REF master + PATCHES + export-symbols-only-in-shared-build.patch + fix-linux-build.patch +) + +configure_file(${SOURCE_PATH}/include/SDL_config.h.default ${SOURCE_PATH}/include/SDL_config.h COPYONLY) + + +if (VCPKG_TARGET_IS_WINDOWS) + file(COPY ${CMAKE_CURRENT_LIST_DIR}/SDL1_2017.sln DESTINATION ${SOURCE_PATH}/VisualC/ ) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + configure_file(${CMAKE_CURRENT_LIST_DIR}/SDL_static.vcxproj ${SOURCE_PATH}/VisualC/SDL/SDL.vcxproj COPYONLY) + configure_file(${CMAKE_CURRENT_LIST_DIR}/SDLmain_static.vcxproj ${SOURCE_PATH}/VisualC/SDLmain/SDLmain.vcxproj COPYONLY) + else() + configure_file(${CMAKE_CURRENT_LIST_DIR}/SDL_dynamic.vcxproj ${SOURCE_PATH}/VisualC/SDL/SDL.vcxproj COPYONLY) + configure_file(${CMAKE_CURRENT_LIST_DIR}/SDLmain_dynamic.vcxproj ${SOURCE_PATH}/VisualC/SDLmain/SDLmain.vcxproj COPYONLY) + endif() + + # This text file gets copied as a library, and included as one in the package + file(REMOVE_RECURSE ${SOURCE_PATH}/src/hermes/COPYING.LIB) + + vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH VisualC/SDL1_2017.sln + INCLUDES_SUBPATH include + LICENSE_SUBPATH COPYING + ALLOW_ROOT_INCLUDES + ) + + #Take all the fils into include/SDL to sovle conflict with SDL2 port + file(GLOB files ${CURRENT_PACKAGES_DIR}/include/*) + foreach(file ${files}) + file(COPY ${file} DESTINATION ${CURRENT_PACKAGES_DIR}/include/SDL) + file(REMOVE ${file}) + endforeach() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/SDL/doxyfile) + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/SDLmain.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/SDLmain.lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/SDLmain.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/SDLmaind.lib) + endif() +else() + message("libgles2-mesa-dev must be installed before sdl1 can build. Install it with \"apt install libgles2-mesa-dev\".") + + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + ) + + vcpkg_install_make() + vcpkg_fixup_pkgconfig(IGNORE_FLAGS -Wl,-rpath,${CURRENT_PACKAGES_DIR}/lib/pkgconfig/../../lib + -Wl,-rpath,${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/../../lib + SYSTEM_LIBRARIES pthread) + + file(GLOB SDL1_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*") + foreach (SDL1_TOOL ${SDL1_TOOLS}) + file(COPY ${SDL1_TOOL} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + file(REMOVE ${SDL1_TOOL}) + endforeach() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + + file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +endif() \ No newline at end of file diff --git a/vcpkg/ports/sdl2-gfx/001-lrint-arm64.patch b/vcpkg/ports/sdl2-gfx/001-lrint-arm64.patch new file mode 100644 index 0000000..50de179 --- /dev/null +++ b/vcpkg/ports/sdl2-gfx/001-lrint-arm64.patch @@ -0,0 +1,26 @@ +diff --git a/SDL2_gfxPrimitives.c b/SDL2_gfxPrimitives.c +index f81e6da..91817fd 100755 +--- a/SDL2_gfxPrimitives.c ++++ b/SDL2_gfxPrimitives.c +@@ -1771,8 +1771,20 @@ __declspec(naked) long int + __emit(0xE12FFF1E); // bx lr + } + #pragma warning(pop) ++#elif defined(_M_ARM64) ++#include ++#pragma warning(push) ++#pragma warning(disable: 4716) ++__declspec(naked) long ++ lrint (double f) ++{ ++ __emit(0x1e674000); // frintx d0, d0 ++ __emit(0x9e780000); // fcvtzs x0, d0 ++ __emit(0xd65f03c0); // ret ++} ++#pragma warning(pop) + #else +-#error lrint needed for MSVC on non X86/AMD64/ARM targets. ++#error lrint needed for MSVC on non X86/AMD64/ARM/ARM64 targets. + #endif + #endif + diff --git a/vcpkg/ports/sdl2-gfx/CMakeLists.txt b/vcpkg/ports/sdl2-gfx/CMakeLists.txt new file mode 100644 index 0000000..9c94b9b --- /dev/null +++ b/vcpkg/ports/sdl2-gfx/CMakeLists.txt @@ -0,0 +1,53 @@ +cmake_minimum_required(VERSION 3.0) +project(SDL2_gfx VERSION 1.0.4 LANGUAGES C) + +set(CONFIG_NAME "sdl2-gfx") + +find_path(SDL_INCLUDE_DIR SDL2/SDL.h) +find_package(SDL2 CONFIG REQUIRED) + +# builtin formats +set(SDL_GFX_DEFINES WIN32) +if(BUILD_SHARED_LIBS) + list(APPEND SDL_GFX_DEFINES DLL_EXPORT) +endif() + +add_library(${PROJECT_NAME} + SDL2_framerate.c + SDL2_gfxPrimitives.c + SDL2_imageFilter.c + SDL2_rotozoom.c) + +target_include_directories(${PROJECT_NAME} PUBLIC + $ + $ + $ +) + +if(WIN32) + add_compile_definitions(${SDL_GFX_DEFINES}) +endif() +target_include_directories(${PROJECT_NAME} PRIVATE ${SDL_INCLUDE_DIR}/SDL2) +target_link_libraries(${PROJECT_NAME} PRIVATE SDL2::SDL2) + +install(TARGETS ${PROJECT_NAME} + EXPORT ${PROJECT_NAME} + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +install(EXPORT ${PROJECT_NAME} + FILE ${CONFIG_NAME}-targets.cmake + NAMESPACE SDL2:: + DESTINATION share/${CONFIG_NAME}/ +) +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}-config.cmake +"include(CMakeFindDependencyMacro) +find_dependency(SDL2 CONFIG) +include(\${CMAKE_CURRENT_LIST_DIR}/${CONFIG_NAME}-targets.cmake)" +) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}-config.cmake DESTINATION share/${CONFIG_NAME}) + +if(NOT SDL_GFX_SKIP_HEADERS) + install(FILES SDL2_framerate.h SDL2_gfxPrimitives.h SDL2_imageFilter.h SDL2_rotozoom.h SDL2_gfxPrimitives_font.h DESTINATION include/SDL2) +endif() diff --git a/vcpkg/ports/sdl2-gfx/CONTROL b/vcpkg/ports/sdl2-gfx/CONTROL new file mode 100644 index 0000000..9a69a45 --- /dev/null +++ b/vcpkg/ports/sdl2-gfx/CONTROL @@ -0,0 +1,4 @@ +Source: sdl2-gfx +Version: 1.0.4-6 +Build-Depends: sdl2 +Description: Graphics primitives (line, circle, rectangle etc.) with AA support, rotozoomer and other drawing related support functions wrapped up in a C based add-on library for the Simple Direct Media (SDL) cross-platform API layer. \ No newline at end of file diff --git a/vcpkg/ports/sdl2-gfx/portfile.cmake b/vcpkg/ports/sdl2-gfx/portfile.cmake new file mode 100644 index 0000000..3831920 --- /dev/null +++ b/vcpkg/ports/sdl2-gfx/portfile.cmake @@ -0,0 +1,31 @@ +set(VERSION 1.0.4) + +vcpkg_download_distfile(ARCHIVE + URLS "http://www.ferzkopp.net/Software/SDL2_gfx/SDL2_gfx-${VERSION}.zip" + FILENAME "SDL2_gfx-${VERSION}.zip" + SHA512 213b481469ba2161bd8558a7a5427b129420193b1c3895923d515f69f87991ed2c99bbc44349c60b4bcbb7d7d2255c1f15ee8a3523c26502070cfaacccaa5242 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${VERSION} + PATCHES + 001-lrint-arm64.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DSDL_GFX_SKIP_HEADERS=1 +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() \ No newline at end of file diff --git a/vcpkg/ports/sdl2-image/CMakeLists.txt b/vcpkg/ports/sdl2-image/CMakeLists.txt new file mode 100644 index 0000000..9cc82de --- /dev/null +++ b/vcpkg/ports/sdl2-image/CMakeLists.txt @@ -0,0 +1,135 @@ +cmake_minimum_required(VERSION 2.6) +project(SDL2_image C) + +### configuration ### + +list(APPEND CMAKE_MODULE_PATH "${CURRENT_INSTALLED_DIR}/share/libwebp") +# enable all file formats which are supported natively +set(SUPPORTED_FORMATS BMP GIF LBM PCX PNM TGA XPM XCF XV SVG) + +# enable all file formats which are supported through external dependencies +# first try to load them statically (lib file in vcpkg installation) +# if this fails try to make them a dynamic dependency (dll will be loaded at runtime) if possible. vcpkg cannot resolve these dependencies! +# else do not support this file format at all + +# Can be explicitly enabled or disabled via USE_XYZ +set(DEPENDENCIES PNG JPEG TIFF WEBP) + +# patch library names for preprocessor flags +set(JPEG_FLAG JPG) +set(TIFF_FLAG TIF) + +# names of potentially dynamically loaded libraries +set(JPEG_DYNAMIC \"libjpeg-9.dll\") +set(PNG_DYNAMIC \"libpng16-16.dll\") +set(TIFF_DYNAMIC \"libtiff-5.dll\") +set(WEBP_DYNAMIC \"libwebp-4.dll\") + +### implementation ### + +add_library(SDL2_image + IMG.c + IMG_bmp.c + IMG_gif.c + IMG_jpg.c + IMG_lbm.c + IMG_pcx.c + IMG_png.c + IMG_pnm.c + IMG_svg.c + IMG_tga.c + IMG_tif.c + IMG_webp.c + IMG_xcf.c + IMG_xpm.c + IMG_xv.c + IMG_xxx.c + IMG_WIC.c + version.rc + ) + +if (APPLE) + target_sources(SDL2_image PRIVATE + IMG_ImageIO.m + ) + target_compile_options(SDL2_image BEFORE PRIVATE + "-x" "objective-c" + ) +endif() + +set_target_properties(SDL2_image PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS) + +foreach(FORMAT ${SUPPORTED_FORMATS}) + add_definitions(-DLOAD_${FORMAT}) +endforeach(FORMAT) + +# SDL +find_path(SDL_INCLUDE_DIR SDL2/SDL.h) +find_package(SDL2 CONFIG REQUIRED) + +include_directories(${SDL_INCLUDE_DIR}) +include_directories(${SDL_INCLUDE_DIR}/SDL2) +include_directories(${CMAKE_SOURCE_DIR}) + +target_link_libraries(SDL2_image SDL2::SDL2) + +# external dependencies +foreach(DEPENDENCY IN LISTS DEPENDENCIES) + if(NOT USE_${DEPENDENCY}) + continue() + endif() + find_package(${DEPENDENCY}) + + if(NOT DEFINED ${DEPENDENCY}_FLAG) + set(${DEPENDENCY}_FLAG ${DEPENDENCY}) + endif() + + add_definitions(-DLOAD_${${DEPENDENCY}_FLAG}) + if(${DEPENDENCY}_FOUND) + message(STATUS " --> linking statically.") + target_link_libraries(SDL2_image ${${DEPENDENCY}_LIBRARIES}) + elseif(DEFINED ${DEPENDENCY}_DYNAMIC) + message(STATUS " --> linking dynamically.") + add_definitions(-DLOAD_${${DEPENDENCY}_FLAG}_DYNAMIC=${${DEPENDENCY}_DYNAMIC}) + set(RUNTIME_DEPENDENCIES ON) + else() + message(STATUS " --> skipping.") + endif() +endforeach(DEPENDENCY) + +if(DEFINED RUNTIME_DEPENDENCIES) + include_directories(VisualC/external/include) +endif() + + +install(TARGETS SDL2_image + EXPORT SDL2_image + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +install(FILES SDL_image.h DESTINATION include/SDL2 CONFIGURATIONS Release) + +install(EXPORT SDL2_image + DESTINATION share/sdl2-image/ + FILE sdl2-image-config.cmake + NAMESPACE SDL2:: +) + + +message(STATUS "Link-time dependencies:") +message(STATUS " " SDL2::SDL2) +foreach(DEPENDENCY ${DEPENDENCIES}) + if(${DEPENDENCY}_FOUND) + message(STATUS " " ${DEPENDENCY}) + endif() +endforeach(DEPENDENCY) + +if(DEFINED RUNTIME_DEPENDENCIES) + message(STATUS "Run-time dependencies:") + foreach(DEPENDENCY ${DEPENDENCIES}) + if(NOT ${DEPENDENCY}_FOUND AND DEFINED ${DEPENDENCY}_DYNAMIC) + message(STATUS " " ${${DEPENDENCY}_DYNAMIC}) + endif() + endforeach(DEPENDENCY) +endif() diff --git a/vcpkg/ports/sdl2-image/CONTROL b/vcpkg/ports/sdl2-image/CONTROL new file mode 100644 index 0000000..19218ef --- /dev/null +++ b/vcpkg/ports/sdl2-image/CONTROL @@ -0,0 +1,17 @@ +Source: sdl2-image +Version: 2.0.5 +Build-Depends: sdl2, libpng +Homepage: https://www.libsdl.org/projects/SDL_image +Description: SDL_image is an image file loading library. It loads images as SDL surfaces and textures, and supports the following formats: BMP, GIF, JPEG, LBM, PCX, PNG, PNM, TGA, TIFF, WEBP, XCF, XPM, XV + +Feature: libjpeg-turbo +Description: Support for JPEG image format +Build-Depends: libjpeg-turbo + +Feature: tiff +Description: Support for TIFF image format +Build-Depends: tiff + +Feature: libwebp +Description: Support for WEBP image format. +Build-Depends: libwebp diff --git a/vcpkg/ports/sdl2-image/portfile.cmake b/vcpkg/ports/sdl2-image/portfile.cmake new file mode 100644 index 0000000..ea47441 --- /dev/null +++ b/vcpkg/ports/sdl2-image/portfile.cmake @@ -0,0 +1,54 @@ +include(vcpkg_common_functions) + +set(SDL2_IMAGE_VERSION "2.0.5") + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.libsdl.org/projects/SDL_image/release/SDL2_image-${SDL2_IMAGE_VERSION}.zip" + FILENAME "SDL2_image-${SDL2_IMAGE_VERSION}.zip" + SHA512 c10e28a0d50fb7a6c985ffe8904370ab4faeb9bbed6f2ffbc81536422e8f8bb66eddbf69b12423082216c2bcfcb617cba4c5970f63fe75bfacccd9f99f02a6a2 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${SDL2_IMAGE_VERSION} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +set(USE_JPEG OFF) +if("libjpeg-turbo" IN_LIST FEATURES) + set(USE_JPEG ON) +endif() + +set(USE_TIFF OFF) +if("tiff" IN_LIST FEATURES) + set(USE_TIFF ON) +endif() + +set(USE_WEBP OFF) +if("libwebp" IN_LIST FEATURES) + set(USE_WEBP ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + "-DCURRENT_INSTALLED_DIR=${CURRENT_INSTALLED_DIR}" + -DUSE_PNG=ON + -DUSE_JPEG=${USE_JPEG} + -DUSE_TIFF=${USE_TIFF} + -DUSE_WEBP=${USE_WEBP} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2-image) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/sdl2-image/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/sdl2-image/copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/sdl2-mixer/CMakeLists.txt b/vcpkg/ports/sdl2-mixer/CMakeLists.txt new file mode 100644 index 0000000..cc9816d --- /dev/null +++ b/vcpkg/ports/sdl2-mixer/CMakeLists.txt @@ -0,0 +1,129 @@ +cmake_minimum_required(VERSION 3.1) +project(SDL2_MIXER C) + +find_path(SDL_INCLUDE_DIR SDL.h PATH_SUFFIXES SDL2) +find_package(SDL2 CONFIG REQUIRED) +set(SDL_MIXER_INCLUDES ${SDL_INCLUDE_DIR}) + +set(SDL_MIXER_LIBRARIES SDL2::SDL2) + +# builtin formats +set(SDL_MIXER_DEFINES MUSIC_WAV) + +# MP3 support +if(SDL_MIXER_ENABLE_MP3) + find_path(MPG123_INCLUDE_DIR mpg123.h) + find_library(MPG123_LIBRARY NAMES libmpg123 mpg123) + list(APPEND SDL_MIXER_INCLUDES ${MPG123_INCLUDE_DIR}) + list(APPEND SDL_MIXER_DEFINES MUSIC_MP3_MPG123) + if (SDL_DYNAMIC_LOAD) + get_filename_component(MPG123_LIBRARY_NAME "${MPG123_LIBRARY}" NAME_WE) + list(APPEND SDL_MIXER_LOAD_DEFINES -DMPG123_DYNAMIC="${MPG123_LIBRARY_NAME}${LIBRARY_SUFFIX}") + endif() +endif() + +# FLAC support +if(SDL_MIXER_ENABLE_FLAC) + find_path(FLAC_INCLUDE_DIR FLAC/all.h) + find_library(FLAC_LIBRARY FLAC) + list(APPEND SDL_MIXER_INCLUDES ${FLAC_INCLUDE_DIR}) + list(APPEND SDL_MIXER_DEFINES MUSIC_FLAC) + if (SDL_DYNAMIC_LOAD) + get_filename_component(FLAC_LIBRARY_NAME "${FLAC_LIBRARY}" NAME_WE) + list(APPEND SDL_MIXER_LOAD_DEFINES -DFLAC_DYNAMIC="${FLAC_LIBRARY_NAME}${LIBRARY_SUFFIX}") + endif() +endif() + +# MOD support +if(SDL_MIXER_ENABLE_MOD) + find_path(MODPLUG_INCLUDE_DIR libmodplug/modplug.h) + find_library(MODPLUG_LIBRARY modplug) + list(APPEND SDL_MIXER_INCLUDES ${MODPLUG_INCLUDE_DIR}) + list(APPEND SDL_MIXER_DEFINES MUSIC_MOD_MODPLUG) + if (SDL_DYNAMIC_LOAD) + get_filename_component(MODPLUG_LIBRARY_NAME "${MODPLUG_LIBRARY}" NAME_WE) + list(APPEND SDL_MIXER_LOAD_DEFINES -DMODPLUG_DYNAMIC="${MODPLUG_LIBRARY_NAME}${LIBRARY_SUFFIX}") + endif() +endif() + +# Ogg-Vorbis support +if(SDL_MIXER_ENABLE_OGGVORBIS) + find_path(VORBIS_INCLUDE_DIR vorbis/codec.h) + find_library(VORBISFILE_LIBRARY vorbisfile) + list(APPEND SDL_MIXER_INCLUDES ${VORBIS_INCLUDE_DIR}) + list(APPEND SDL_MIXER_DEFINES MUSIC_OGG) + if (SDL_DYNAMIC_LOAD) + get_filename_component(VORBISFILE_LIBRARY_NAME "${VORBISFILE_LIBRARY}" NAME_WE) + list(APPEND SDL_MIXER_LOAD_DEFINES -DOGG_DYNAMIC="${VORBISFILE_LIBRARY_NAME}${LIBRARY_SUFFIX}") + endif() +endif() + +# Opus support +if(SDL_MIXER_ENABLE_OPUS) + find_path(OPUS_INCLUDE_DIR opus/opusfile.h) + find_library(OPUSFILE_LIBRARY opusfile) + list(APPEND SDL_MIXER_INCLUDES ${OPUS_INCLUDE_DIR}) + list(APPEND SDL_MIXER_DEFINES MUSIC_OPUS) + if (SDL_DYNAMIC_LOAD) + get_filename_component(OPUSFILE_LIBRARY_NAME "${OPUSFILE_LIBRARY}" NAME_WE) + list(APPEND SDL_MIXER_LOAD_DEFINES -DOPUS_DYNAMIC="${OPUSFILE_LIBRARY_NAME}${LIBRARY_SUFFIX}") + endif() +endif() + +add_library(SDL2_mixer + effect_position.c + effect_stereoreverse.c + effects_internal.c + load_aiff.c + load_voc.c + mixer.c + music.c + music_cmd.c + music_flac.c + music_fluidsynth.c + music_mad.c + music_mikmod.c + music_modplug.c + music_mpg123.c + music_ogg.c + music_opus.c + music_timidity.c + music_wav.c + version.rc) + +if((WIN32 OR APPLE) AND SDL_MIXER_ENABLE_NATIVEMIDI) + list(APPEND SDL_MIXER_DEFINES MUSIC_MID_NATIVE) + target_sources(SDL2_mixer PRIVATE music_nativemidi.c native_midi/native_midi_common.c) + target_link_libraries(SDL2_mixer ${SDL_MIXER_LIBRARIES}) + if(WIN32) + target_sources(SDL2_mixer PRIVATE native_midi/native_midi_win32.c) + target_link_libraries(SDL2_mixer Winmm) + elseif(APPLE) + target_sources(SDL2_mixer PRIVATE native_midi/native_midi_macosx.c) + endif() +endif() + +set_target_properties(SDL2_mixer PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS) +target_compile_definitions(SDL2_mixer PRIVATE ${SDL_MIXER_DEFINES} ${SDL_MIXER_LOAD_DEFINES}) +target_include_directories(SDL2_mixer PRIVATE ${SDL_MIXER_INCLUDES} ./native_midi) + +install(TARGETS SDL2_mixer + EXPORT SDL2_mixer + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +install(EXPORT SDL2_mixer + DESTINATION share/sdl2-mixer/ + FILE sdl2-mixer-config.cmake + NAMESPACE SDL2:: +) + +if(NOT SDL_MIXER_SKIP_HEADERS) + install(FILES SDL_mixer.h DESTINATION include/SDL2) +endif() + +message(STATUS "Link-time dependencies:") +foreach(LIBRARY ${SDL_MIXER_LIBRARIES}) + message(STATUS " " ${LIBRARY}) +endforeach() diff --git a/vcpkg/ports/sdl2-mixer/CONTROL b/vcpkg/ports/sdl2-mixer/CONTROL new file mode 100644 index 0000000..ef18e13 --- /dev/null +++ b/vcpkg/ports/sdl2-mixer/CONTROL @@ -0,0 +1,33 @@ +Source: sdl2-mixer +Version: 2.0.4 +Port-Version: 10 +Homepage: https://www.libsdl.org/projects/SDL_mixer +Description: Multi-channel audio mixer library for SDL. +Build-Depends: sdl2 +Default-Features: nativemidi + +Feature: dynamic-load +Description: Load plugins with dynamic call + +Feature: nativemidi +Description: Support for MIDI audio format on Windows and macOS. + +Feature: libflac +Description: Support for FLAC audio format. +Build-Depends: libflac + +Feature: mpg123 +Description: Support for MP3 audio format. +Build-Depends: mpg123 + +Feature: libmodplug +Description: Support for MOD audio format. +Build-Depends: libmodplug + +Feature: libvorbis +Description: Support for OGG Vorbis audio format. +Build-Depends: libvorbis + +Feature: opusfile +Description: Support for Opus audio format. +Build-Depends: opusfile diff --git a/vcpkg/ports/sdl2-mixer/portfile.cmake b/vcpkg/ports/sdl2-mixer/portfile.cmake new file mode 100644 index 0000000..16e45c5 --- /dev/null +++ b/vcpkg/ports/sdl2-mixer/portfile.cmake @@ -0,0 +1,56 @@ +set(SDL2_MIXER_VERSION 2.0.4) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-${SDL2_MIXER_VERSION}.zip" + FILENAME "SDL2_mixer-${SDL2_MIXER_VERSION}.zip" + SHA512 359b4f9877804f9c4b3cb608ca6082aab684f07a20a816ab71c8cdf85d26f76d67eeb5aee44daf52b7935d82aa3b45941f8f53f07ca3dd5150d6c58ed99e1492 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${SDL2_MIXER_VERSION} +) + +if ("dynamic-load" IN_LIST FEATURES) + if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + message("Building static library, disable dynamic loading") + elseif (NOT "mpg123" IN_LIST FEATURES + AND NOT "libflac" IN_LIST FEATURES + AND NOT "libmodplug" IN_LIST FEATURES + AND NOT "libvorbis" IN_LIST FEATURES + AND NOT "opusfile" IN_LIST FEATURES + ) + message("No features selected, dynamic loading will not be enabled") + endif() +endif() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + dynamic-load SDL_DYNAMIC_LOAD + mpg123 SDL_MIXER_ENABLE_MP3 + libflac SDL_MIXER_ENABLE_FLAC + libmodplug SDL_MIXER_ENABLE_MOD + libvorbis SDL_MIXER_ENABLE_OGGVORBIS + opusfile SDL_MIXER_ENABLE_OPUS + nativemidi SDL_MIXER_ENABLE_NATIVEMIDI +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DLIBRARY_SUFFIX=${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX} # It should always be dynamic suffix + OPTIONS_DEBUG + -DSDL_MIXER_SKIP_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/sdl2-net/CMakeLists.txt b/vcpkg/ports/sdl2-net/CMakeLists.txt new file mode 100644 index 0000000..0530936 --- /dev/null +++ b/vcpkg/ports/sdl2-net/CMakeLists.txt @@ -0,0 +1,38 @@ +cmake_minimum_required(VERSION 3.0) +project(SDL2_NET C) + +if (MSVC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4244 /wd4996") +endif() + +find_path(SDL_INCLUDE_DIR SDL2/SDL.h) +find_package(SDL2 CONFIG REQUIRED) + +add_library(SDL2_net SDLnet.c SDLnetselect.c SDLnetTCP.c SDLnetUDP.c version.rc) + +set_target_properties(SDL2_net PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS) +target_compile_definitions(SDL2_net PRIVATE _WINSOCK_DEPRECATED_NO_WARNINGS) +target_include_directories(SDL2_net PRIVATE ${SDL_INCLUDE_DIR}/SDL2) + +if (WIN32) + target_link_libraries(SDL2_net SDL2::SDL2 ws2_32 iphlpapi) +endif() + +install(TARGETS SDL2_net + EXPORT SDL2_net + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +install(EXPORT SDL2_net + DESTINATION "share/sdl2-net" + FILE sdl2-net-config.cmake + NAMESPACE SDL2:: +) + +if(NOT DEFINED SDL_NET_SKIP_HEADERS) + install(FILES SDL_net.h DESTINATION include/SDL2) +endif() + +message(STATUS "Link-time dependencies:") +message(STATUS " " SDL2::SDL2) diff --git a/vcpkg/ports/sdl2-net/CONTROL b/vcpkg/ports/sdl2-net/CONTROL new file mode 100644 index 0000000..6b4d33e --- /dev/null +++ b/vcpkg/ports/sdl2-net/CONTROL @@ -0,0 +1,5 @@ +Source: sdl2-net +Version: 2.0.1-8 +Homepage: https://www.libsdl.org/projects/SDL_net +Description: Networking library for SDL +Build-Depends: sdl2 diff --git a/vcpkg/ports/sdl2-net/portfile.cmake b/vcpkg/ports/sdl2-net/portfile.cmake new file mode 100644 index 0000000..70cea05 --- /dev/null +++ b/vcpkg/ports/sdl2-net/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.libsdl.org/projects/SDL_net/release/SDL2_net-2.0.1.tar.gz" + FILENAME "SDL2_net-2.0.1.tar.gz" + SHA512 d27faee3cddc3592dae38947e6c1df0cbaa95f82fde9c87db6d11f6312d868cea74f6830ad07ceeb3d0d75e9424cebf39e54fddf9a1147e8d9e664609de92b7a +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DSDL_NET_SKIP_HEADERS=ON) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/sdl2-ttf/CMakeLists.txt b/vcpkg/ports/sdl2-ttf/CMakeLists.txt new file mode 100644 index 0000000..8d34a41 --- /dev/null +++ b/vcpkg/ports/sdl2-ttf/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required(VERSION 3.0) +project(SDL2_TTF C) + +find_path(SDL_INCLUDE_DIR SDL2/SDL.h) +find_package(SDL2 CONFIG REQUIRED) +find_package(Freetype REQUIRED) + +add_library(SDL2_ttf SDL_ttf.c version.rc) + +set_target_properties(SDL2_ttf PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS) +target_include_directories(SDL2_ttf PRIVATE ${SDL_INCLUDE_DIR}/SDL2 ${FREETYPE_INCLUDE_DIRS}) +target_link_libraries(SDL2_ttf SDL2::SDL2 ${FREETYPE_LIBRARIES}) + +install(TARGETS SDL2_ttf + EXPORT SDL2_ttf + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +INSTALL(EXPORT SDL2_ttf + DESTINATION "share/sdl2-ttf" + FILE sdl2-ttf-config.cmake + NAMESPACE SDL2:: +) + +if(NOT DEFINED SDL_TTF_SKIP_HEADERS) + install(FILES SDL_ttf.h DESTINATION include/SDL2) +endif() + +message(STATUS "Link-time dependencies:") +message(STATUS " " SDL2::SDL2) +message(STATUS " " ${FREETYPE_LIBRARIES}) diff --git a/vcpkg/ports/sdl2-ttf/CONTROL b/vcpkg/ports/sdl2-ttf/CONTROL new file mode 100644 index 0000000..34d12ba --- /dev/null +++ b/vcpkg/ports/sdl2-ttf/CONTROL @@ -0,0 +1,5 @@ +Source: sdl2-ttf +Version: 2.0.15-3 +Homepage: https://www.libsdl.org/projects/SDL_ttf/ +Description: A library for rendering TrueType fonts with SDL +Build-Depends: sdl2, freetype diff --git a/vcpkg/ports/sdl2-ttf/portfile.cmake b/vcpkg/ports/sdl2-ttf/portfile.cmake new file mode 100644 index 0000000..eb623e1 --- /dev/null +++ b/vcpkg/ports/sdl2-ttf/portfile.cmake @@ -0,0 +1,32 @@ +include(vcpkg_common_functions) + +set(VERSION 2.0.15) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-${VERSION}.tar.gz" + FILENAME "SDL2_ttf-${VERSION}.tar.gz" + SHA512 30d685932c3dd6f2c94e2778357a5c502f0421374293d7102a64d92f9c7861229bf36bedf51c1a698b296a58c858ca442d97afb908b7df1592fc8d4f8ae8ddfd +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${VERSION} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DSDL_TTF_SKIP_HEADERS=ON) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(COPY ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sdl2-ttf) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/sdl2-ttf/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/sdl2-ttf/copyright) diff --git a/vcpkg/ports/sdl2/0006-sdl2-Enable-creation-of-pkg-cfg-file-on-windows.patch b/vcpkg/ports/sdl2/0006-sdl2-Enable-creation-of-pkg-cfg-file-on-windows.patch new file mode 100644 index 0000000..064885b --- /dev/null +++ b/vcpkg/ports/sdl2/0006-sdl2-Enable-creation-of-pkg-cfg-file-on-windows.patch @@ -0,0 +1,33 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7dfd35389..7944f401b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1916,9 +1916,10 @@ listtostr(EXTRA_CFLAGS _EXTRA_CFLAGS) + set(EXTRA_CFLAGS ${_EXTRA_CFLAGS}) + + # Compat helpers for the configuration files +-if(NOT WINDOWS OR CYGWIN) + # TODO: we need a Windows script, too ++ if(NOT WINDOWS OR CYGWIN) + execute_process(COMMAND sh ${SDL2_SOURCE_DIR}/build-scripts/updaterev.sh) ++ endif() + + set(prefix ${CMAKE_INSTALL_PREFIX}) + set(exec_prefix "\${prefix}") +@@ -1960,7 +1961,6 @@ if(NOT WINDOWS OR CYGWIN) + "${SDL2_BINARY_DIR}/sdl2-config" @ONLY) + configure_file("${SDL2_SOURCE_DIR}/SDL2.spec.in" + "${SDL2_BINARY_DIR}/SDL2.spec" @ONLY) +-endif() + + ##### Info output ##### + message(STATUS "") +@@ -2198,6 +2198,7 @@ if(NOT (WINDOWS OR CYGWIN)) + # TODO: what about the .spec file? Is it only needed for RPM creation? + install(FILES "${SDL2_SOURCE_DIR}/sdl2.m4" DESTINATION "${CMAKE_INSTALL_FULL_DATAROOTDIR}/aclocal") + endif() ++install(FILES ${SDL2_BINARY_DIR}/sdl2.pc DESTINATION "lib${LIB_SUFFIX}/pkgconfig") + + ##### Uninstall target ##### + + diff --git a/vcpkg/ports/sdl2/disable-hidapi-for-uwp.patch b/vcpkg/ports/sdl2/disable-hidapi-for-uwp.patch new file mode 100644 index 0000000..9a1b500 --- /dev/null +++ b/vcpkg/ports/sdl2/disable-hidapi-for-uwp.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -173,7 +173,7 @@ + # so we'll just use libusb when it's available. libusb does not support iOS, + # so we default to yes on iOS. + # TODO: Windows can support libusb, the hid.c file just depends on Unix APIs +-if(WINDOWS OR IOS OR TVOS OR ANDROID) ++if((WINDOWS AND NOT WINDOWS_STORE) OR IOS OR TVOS OR ANDROID) + set(HIDAPI_SKIP_LIBUSB TRUE) + else() + set(HIDAPI_SKIP_LIBUSB FALSE) diff --git a/vcpkg/ports/sdl2/disable-wcslcpy-and-wcslcat-for-windows.patch b/vcpkg/ports/sdl2/disable-wcslcpy-and-wcslcat-for-windows.patch new file mode 100644 index 0000000..894b24d --- /dev/null +++ b/vcpkg/ports/sdl2/disable-wcslcpy-and-wcslcat-for-windows.patch @@ -0,0 +1,12 @@ +diff -ur a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -772,7 +772,7 @@ + set(HAVE_SIGNAL_H 1) + foreach(_FN + malloc calloc realloc free qsort abs memset memcpy memmove memcmp +- wcslen wcslcpy wcslcat wcsdup wcsstr wcscmp wcsncmp ++ wcslen wcsdup wcsstr wcscmp wcsncmp + strlen _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa + _ultoa strtol strtoul strtoll strtod atoi atof strcmp strncmp + _stricmp _strnicmp strtok_s sscanf diff --git a/vcpkg/ports/sdl2/enable-winrt-cmake.patch b/vcpkg/ports/sdl2/enable-winrt-cmake.patch new file mode 100644 index 0000000..0e57084 --- /dev/null +++ b/vcpkg/ports/sdl2/enable-winrt-cmake.patch @@ -0,0 +1,175 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0128c7a..bd534e4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,6 +5,18 @@ + cmake_minimum_required(VERSION 2.8.11) + project(SDL2 C CXX) + ++if(WINDOWS_STORE) ++ enable_language(CXX) ++ cmake_minimum_required(VERSION 3.11) ++ add_definitions(-DSDL_BUILDING_WINRT=1 -ZW) ++ link_libraries( ++ -nodefaultlib:vccorlib$<$:d> ++ -nodefaultlib:msvcrt$<$:d> ++ vccorlib$<$:d>.lib ++ msvcrt$<$:d>.lib ++ ) ++endif() ++ + # !!! FIXME: this should probably do "MACOSX_RPATH ON" as a target property + # !!! FIXME: for the SDL2 shared library (so you get an + # !!! FIXME: install_name ("soname") of "@rpath/libSDL-whatever.dylib" +@@ -1297,6 +1309,11 @@ + file(GLOB CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/windows/*.c) + set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES}) + ++ if(WINDOWS_STORE) ++ file(GLOB WINRT_SOURCE_FILES ${SDL2_SOURCE_DIR}/src/core/winrt/*.c ${SDL2_SOURCE_DIR}/src/core/winrt/*.cpp) ++ list(APPEND SOURCE_FILES ${WINRT_SOURCE_FILES}) ++ endif() ++ + if(MSVC) + # Prevent codegen that would use the VC runtime libraries. + set_property(DIRECTORY . APPEND PROPERTY COMPILE_OPTIONS "/GS-") +@@ -1342,6 +1359,9 @@ + check_include_file(ddraw.h HAVE_DDRAW_H) + check_include_file(dsound.h HAVE_DSOUND_H) + check_include_file(dinput.h HAVE_DINPUT_H) ++ if(WINDOWS_STORE OR VCPKG_TARGET_TRIPLET MATCHES "arm-windows") ++ set(HAVE_DINPUT_H 0) ++ endif() + check_include_file(dxgi.h HAVE_DXGI_H) + if(HAVE_D3D_H OR HAVE_D3D11_H OR HAVE_DDRAW_H OR HAVE_DSOUND_H OR HAVE_DINPUT_H) + set(HAVE_DIRECTX TRUE) +@@ -1359,18 +1379,20 @@ + check_include_file(audioclient.h HAVE_AUDIOCLIENT_H) + + if(SDL_AUDIO) ++ if(NOT WINDOWS_STORE) + set(SDL_AUDIO_DRIVER_WINMM 1) + file(GLOB WINMM_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/winmm/*.c) + set(SOURCE_FILES ${SOURCE_FILES} ${WINMM_AUDIO_SOURCES}) ++ endif() + set(HAVE_SDL_AUDIO TRUE) + +- if(HAVE_DSOUND_H) ++ if(HAVE_DSOUND_H AND NOT WINDOWS_STORE) + set(SDL_AUDIO_DRIVER_DSOUND 1) + file(GLOB DSOUND_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/directsound/*.c) + set(SOURCE_FILES ${SOURCE_FILES} ${DSOUND_AUDIO_SOURCES}) + endif() + +- if(WASAPI AND HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H) ++ if(WASAPI AND HAVE_AUDIOCLIENT_H AND HAVE_MMDEVICEAPI_H AND NOT WINDOWS_STORE) + set(SDL_AUDIO_DRIVER_WASAPI 1) + file(GLOB WASAPI_AUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/wasapi/*.c) + set(SOURCE_FILES ${SOURCE_FILES} ${WASAPI_AUDIO_SOURCES}) +@@ -1382,11 +1404,20 @@ + if(NOT SDL_LOADSO) + message_error("SDL_VIDEO requires SDL_LOADSO, which is not enabled") + endif() ++ if(WINDOWS_STORE) ++ set(SDL_VIDEO_DRIVER_WINRT 1) ++ file(GLOB WIN_VIDEO_SOURCES ++ ${SDL2_SOURCE_DIR}/src/video/winrt/*.c ++ ${SDL2_SOURCE_DIR}/src/video/winrt/*.cpp ++ ${SDL2_SOURCE_DIR}/src/render/direct3d11/*.cpp ++ ) ++ else() + set(SDL_VIDEO_DRIVER_WINDOWS 1) + file(GLOB WIN_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/windows/*.c) ++ endif() + set(SOURCE_FILES ${SOURCE_FILES} ${WIN_VIDEO_SOURCES}) + +- if(RENDER_D3D AND HAVE_D3D_H) ++ if(RENDER_D3D AND HAVE_D3D_H AND NOT WINDOWS_STORE) + set(SDL_VIDEO_RENDER_D3D 1) + set(HAVE_RENDER_D3D TRUE) + endif() +@@ -1409,20 +1440,31 @@ + endif() + + if(SDL_POWER) ++ if(WINDOWS_STORE) ++ set(SDL_POWER_WINRT 1) ++ set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/power/winrt/SDL_syspower.cpp) ++ else() + set(SDL_POWER_WINDOWS 1) + set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/power/windows/SDL_syspower.c) ++ endif() + set(HAVE_SDL_POWER TRUE) + endif() + + if(SDL_FILESYSTEM) + set(SDL_FILESYSTEM_WINDOWS 1) ++ if(WINDOWS_STORE) ++ file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/winrt/*.cpp) ++ else() + file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/windows/*.c) ++ endif() + set(SOURCE_FILES ${SOURCE_FILES} ${FILESYSTEM_SOURCES}) + set(HAVE_SDL_FILESYSTEM TRUE) + endif() + + # Libraries for Win32 native and MinGW ++ if(NOT WINDOWS_STORE) + list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 setupapi shell32) ++ endif() + + # TODO: in configure.ac the check for timers is set on + # cygwin | mingw32* - does this include mingw32CE? +@@ -1444,7 +1486,7 @@ + set(SOURCE_FILES ${SOURCE_FILES} ${CORE_SOURCES}) + + if(SDL_VIDEO) +- if(VIDEO_OPENGL) ++ if(VIDEO_OPENGL AND NOT WINDOWS_STORE) + set(SDL_VIDEO_OPENGL 1) + set(SDL_VIDEO_OPENGL_WGL 1) + set(SDL_VIDEO_RENDER_OGL 1) +@@ -2027,12 +2069,14 @@ + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") + + # Always build SDLmain ++if(NOT WINDOWS_STORE) + add_library(SDL2main STATIC ${SDLMAIN_SOURCES}) + target_include_directories(SDL2main PUBLIC "$" $ $) + set(_INSTALL_LIBS "SDL2main") + if (NOT ANDROID) + set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}") + endif() ++endif() + + if (ANDROID AND HAVE_HIDAPI) + set(_INSTALL_LIBS ${_INSTALL_LIBS} "hidapi") +diff --git a/include/SDL_config.h.cmake b/include/SDL_config.h.cmake +index 48dd2d4..0c4fa28 100644 +--- a/include/SDL_config.h.cmake ++++ b/include/SDL_config.h.cmake +@@ -335,6 +326,7 @@ + #cmakedefine SDL_VIDEO_DRIVER_DUMMY @SDL_VIDEO_DRIVER_DUMMY@ + #cmakedefine SDL_VIDEO_DRIVER_OFFSCREEN @SDL_VIDEO_DRIVER_OFFSCREEN@ + #cmakedefine SDL_VIDEO_DRIVER_WINDOWS @SDL_VIDEO_DRIVER_WINDOWS@ ++#cmakedefine SDL_VIDEO_DRIVER_WINRT @SDL_VIDEO_DRIVER_WINRT@ + #cmakedefine SDL_VIDEO_DRIVER_WAYLAND @SDL_VIDEO_DRIVER_WAYLAND@ + #cmakedefine SDL_VIDEO_DRIVER_RPI @SDL_VIDEO_DRIVER_RPI@ + #cmakedefine SDL_VIDEO_DRIVER_VIVANTE @SDL_VIDEO_DRIVER_VIVANTE@ +@@ -403,6 +404,7 @@ + #cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@ + #cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@ + #cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@ ++#cmakedefine SDL_POWER_WINRT @SDL_POWER_WINRT@ + #cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@ + #cmakedefine SDL_POWER_UIKIT @SDL_POWER_UIKIT@ + #cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@ +@@ -428,7 +430,7 @@ + #cmakedefine SDL_IPHONE_KEYBOARD @SDL_IPHONE_KEYBOARD@ + #cmakedefine SDL_IPHONE_LAUNCHSCREEN @SDL_IPHONE_LAUNCHSCREEN@ + +-#if !defined(__WIN32__) ++#if !defined(__WIN32__) && !defined(__WINRT__) + # if !defined(_STDINT_H_) && !defined(_STDINT_H) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H) + typedef unsigned int size_t; + typedef signed char int8_t; diff --git a/vcpkg/ports/sdl2/export-symbols-only-in-shared-build.patch b/vcpkg/ports/sdl2/export-symbols-only-in-shared-build.patch new file mode 100644 index 0000000..7e6d503 --- /dev/null +++ b/vcpkg/ports/sdl2/export-symbols-only-in-shared-build.patch @@ -0,0 +1,24 @@ +# HG changeset patch +# User Mikhail Paulyshka +# Date 1506252750 -10800 +# Sun Sep 24 14:32:30 2017 +0300 +# Branch SDL2-WIN-SYMBOLS_LEACKAGE +# Node ID 46ec9baae30cd4e0c584de125cae4a3cce2864ad +# Parent 8df7a59b55283aa09889522369a2b32674c048de +win32: fix symbols leakage for static libraries + +diff -r 8df7a59b5528 -r 46ec9baae30c include/begin_code.h +--- a/include/begin_code.h Fri Sep 22 11:25:52 2017 -0700 ++++ b/include/begin_code.h Sun Sep 24 14:32:30 2017 +0300 +@@ -58,8 +58,10 @@ + # else + # define DECLSPEC __declspec(dllimport) + # endif ++# elif defined(_DLL) ++# define DECLSPEC __declspec(dllexport) + # else +-# define DECLSPEC __declspec(dllexport) ++# define DECLSPEC + # endif + # elif defined(__OS2__) + # ifdef BUILD_SDL diff --git a/vcpkg/ports/sdl2/fix-EventToken-header-reference.patch b/vcpkg/ports/sdl2/fix-EventToken-header-reference.patch new file mode 100644 index 0000000..5e34dc2 --- /dev/null +++ b/vcpkg/ports/sdl2/fix-EventToken-header-reference.patch @@ -0,0 +1,17 @@ + +diff -r 398b67c0a7d3 -r 7c2f418f701b src/video/winrt/SDL_winrtgamebar.cpp +--- a/src/video/winrt/SDL_winrtgamebar.cpp Wed Jun 10 09:36:10 2020 -0700 ++++ b/src/video/winrt/SDL_winrtgamebar.cpp Wed Jun 10 09:38:43 2020 -0700 +@@ -25,7 +25,7 @@ + /* Windows includes */ + #include + #include +-#include ++#include + + + /* SDL includes */ + + + + diff --git a/vcpkg/ports/sdl2/fix-space-in-path.patch b/vcpkg/ports/sdl2/fix-space-in-path.patch new file mode 100644 index 0000000..499161d --- /dev/null +++ b/vcpkg/ports/sdl2/fix-space-in-path.patch @@ -0,0 +1,24 @@ +diff -ur a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2019-07-23 21:41:00.000000000 +0200 ++++ b/CMakeLists.txt 2019-10-27 20:26:38.000000000 +0100 +@@ -278,7 +278,7 @@ + # General includes + include_directories(${SDL2_BINARY_DIR}/include ${SDL2_SOURCE_DIR}/include) + if(USE_GCC OR USE_CLANG) +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -idirafter ${SDL2_SOURCE_DIR}/src/video/khronos") ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -idirafter \"${SDL2_SOURCE_DIR}/src/video/khronos\"") + else() + include_directories(${SDL2_SOURCE_DIR}/src/video/khronos) + endif() +diff -ur a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake +--- a/cmake/sdlchecks.cmake 2019-07-23 21:41:00.000000000 +0200 ++++ b/cmake/sdlchecks.cmake 2019-10-27 20:27:10.000000000 +0100 +@@ -1088,7 +1088,7 @@ + set(HAVE_SDL_JOYSTICK TRUE) + file(GLOB HIDAPI_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/hidapi/*.c) + set(SOURCE_FILES ${SOURCE_FILES} ${HIDAPI_SOURCES}) +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBUSB_CFLAGS} -I${SDL2_SOURCE_DIR}/src/hidapi/hidapi") ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBUSB_CFLAGS} \"-I${SDL2_SOURCE_DIR}/src/hidapi/hidapi\"") + if(NOT HIDAPI_SKIP_LIBUSB) + if(HIDAPI_ONLY_LIBUSB) + set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/libusb/hid.c) diff --git a/vcpkg/ports/sdl2/portfile.cmake b/vcpkg/ports/sdl2/portfile.cmake new file mode 100644 index 0000000..57ef470 --- /dev/null +++ b/vcpkg/ports/sdl2/portfile.cmake @@ -0,0 +1,102 @@ +set(SDL2_VERSION 2.0.12) +vcpkg_download_distfile(ARCHIVE + URLS "https://www.libsdl.org/release/SDL2-2.0.12.tar.gz" + FILENAME "SDL2-${SDL2_VERSION}.tar.gz" + SHA512 3f1f04af0f3d9dda9c84a2e9274ae8d83ea0da3fc367970a820036cc4dc1dbf990cfc37e4975ae05f0b45a4ffa739c6c19e470c00bf3f2bce9b8b63717b8b317 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + export-symbols-only-in-shared-build.patch + enable-winrt-cmake.patch + disable-hidapi-for-uwp.patch + fix-space-in-path.patch + disable-wcslcpy-and-wcslcat-for-windows.patch + fix-EventToken-header-reference.patch + 0006-sdl2-Enable-creation-of-pkg-cfg-file-on-windows.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SDL_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SDL_SHARED) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" FORCE_STATIC_VCRT) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + vulkan VIDEO_VULKAN +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DSDL_STATIC=${SDL_STATIC} + -DSDL_SHARED=${SDL_SHARED} + -DFORCE_STATIC_VCRT=${FORCE_STATIC_VCRT} + -DLIBC=ON +) + +vcpkg_install_cmake() + +if(EXISTS "${CURRENT_PACKAGES_DIR}/cmake") + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +elseif(EXISTS "${CURRENT_PACKAGES_DIR}/lib/cmake/SDL2") + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SDL2) +elseif(EXISTS "${CURRENT_PACKAGES_DIR}/SDL2.framework/Resources") + vcpkg_fixup_cmake_targets(CONFIG_PATH SDL2.framework/Resources) +endif() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/bin/sdl2-config + ${CURRENT_PACKAGES_DIR}/debug/bin/sdl2-config + ${CURRENT_PACKAGES_DIR}/SDL2.framework + ${CURRENT_PACKAGES_DIR}/debug/SDL2.framework +) + +file(GLOB BINS ${CURRENT_PACKAGES_DIR}/debug/bin/* ${CURRENT_PACKAGES_DIR}/bin/*) +if(NOT BINS) + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/bin + ) +endif() + +if(NOT VCPKG_CMAKE_SYSTEM_NAME) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/SDL2main.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/SDL2main.lib) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/SDL2maind.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/SDL2maind.lib) + endif() + + file(GLOB SHARE_FILES ${CURRENT_PACKAGES_DIR}/share/sdl2/*.cmake) + foreach(SHARE_FILE ${SHARE_FILES}) + file(READ "${SHARE_FILE}" _contents) + string(REPLACE "lib/SDL2main" "lib/manual-link/SDL2main" _contents "${_contents}") + file(WRITE "${SHARE_FILE}" "${_contents}") + endforeach() +endif() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +configure_file(${SOURCE_PATH}/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) +vcpkg_copy_pdbs() + +set(DYLIB_COMPATIBILITY_VERSION_REGEX "set\\(DYLIB_COMPATIBILITY_VERSION (.+)\\)") +set(DYLIB_CURRENT_VERSION_REGEX "set\\(DYLIB_CURRENT_VERSION (.+)\\)") +file(STRINGS "${SOURCE_PATH}/CMakeLists.txt" DYLIB_COMPATIBILITY_VERSION REGEX ${DYLIB_COMPATIBILITY_VERSION_REGEX}) +file(STRINGS "${SOURCE_PATH}/CMakeLists.txt" DYLIB_CURRENT_VERSION REGEX ${DYLIB_CURRENT_VERSION_REGEX}) +string(REGEX REPLACE ${DYLIB_COMPATIBILITY_VERSION_REGEX} "\\1" DYLIB_COMPATIBILITY_VERSION "${DYLIB_COMPATIBILITY_VERSION}") +string(REGEX REPLACE ${DYLIB_CURRENT_VERSION_REGEX} "\\1" DYLIB_CURRENT_VERSION "${DYLIB_CURRENT_VERSION}") + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/sdl2.pc" "-lSDL2" "-lSDL2d") +endif() + +vcpkg_fixup_pkgconfig( + IGNORE_FLAGS "-Wl,-rpath,${CURRENT_PACKAGES_DIR}/lib/pkgconfig/../../lib" "-Wl,-rpath,${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/../../lib" "-Wl,--enable-new-dtags" "-Wl,--no-undefined" "-Wl,-undefined,error" "-Wl,-compatibility_version,${DYLIB_COMPATIBILITY_VERSION}" "-Wl,-current_version,${DYLIB_CURRENT_VERSION}" "-Wl,-weak_framework,Metal" "-Wl,-weak_framework,QuartzCore" + SYSTEM_LIBRARIES dbus-1 +) diff --git a/vcpkg/ports/sdl2/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/sdl2/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..c99178d --- /dev/null +++ b/vcpkg/ports/sdl2/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,8 @@ +_find_package(${ARGS}) +if(TARGET SDL2::SDL2 AND NOT TARGET SDL2::SDL2-static) + add_library( SDL2::SDL2-static INTERFACE IMPORTED) + set_target_properties(SDL2::SDL2-static PROPERTIES INTERFACE_LINK_LIBRARIES "SDL2::SDL2") +elseif(TARGET SDL2::SDL2-static AND NOT TARGET SDL2::SDL2) + add_library( SDL2::SDL2 INTERFACE IMPORTED) + set_target_properties(SDL2::SDL2 PROPERTIES INTERFACE_LINK_LIBRARIES "SDL2::SDL2-static") +endif() diff --git a/vcpkg/ports/sdl2/vcpkg.json b/vcpkg/ports/sdl2/vcpkg.json new file mode 100644 index 0000000..27b6933 --- /dev/null +++ b/vcpkg/ports/sdl2/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "sdl2", + "version-string": "2.0.12", + "port-version": 5, + "description": "Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D.", + "homepage": "https://www.libsdl.org/download-2.0.php", + "features": { + "vulkan": { + "description": "Vulkan functionality for SDL", + "dependencies": [ + "vulkan" + ] + } + } +} diff --git a/vcpkg/ports/sdl2pp/CONTROL b/vcpkg/ports/sdl2pp/CONTROL new file mode 100644 index 0000000..1121405 --- /dev/null +++ b/vcpkg/ports/sdl2pp/CONTROL @@ -0,0 +1,5 @@ +Source: sdl2pp +Version: 0.16.0-2 +Description: C++11 bindings/wrapper for SDL2 +Homepage: https://sdl2pp.amdmi3.ru +Build-Depends: sdl2, sdl2-mixer, sdl2-image, sdl2-ttf diff --git a/vcpkg/ports/sdl2pp/fix-dependencies.patch b/vcpkg/ports/sdl2pp/fix-dependencies.patch new file mode 100644 index 0000000..ba4f6b9 --- /dev/null +++ b/vcpkg/ports/sdl2pp/fix-dependencies.patch @@ -0,0 +1,82 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2a02376..ecd34d5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -27,11 +27,15 @@ ENDIF(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) + + # depends + FIND_PACKAGE(SDL2 REQUIRED) +-SET(SDL2_ALL_INCLUDE_DIRS ${SDL2_INCLUDE_DIR}) +-SET(SDL2_ALL_LIBRARIES ${SDL2_LIBRARY}) ++SET(SDL2_ALL_INCLUDE_DIRS ) ++IF (BUILD_SHARED_LIBS) ++ SET(SDL2_ALL_LIBRARIES SDL2::SDL2) ++ELSE() ++ SET(SDL2_ALL_LIBRARIES SDL2::SDL2-static) ++ENDIF() + SET(SDL2_ALL_PKGCONFIG_MODULES sdl2) +-SET(SDL2PP_EXTRA_LIBRARIES ${SDL2MAIN_LIBRARY}) +-SET(SDL2PP_EXTRA_PKGCONFIG_LIBRARIES ${SDL2MAIN_LIBRARY}) ++SET(SDL2PP_EXTRA_LIBRARIES SDL2::SDL2main) ++SET(SDL2PP_EXTRA_PKGCONFIG_LIBRARIES SDL2::SDL2main) + + IF(MINGW) + SET(MINGW32_LIBRARY "mingw32" CACHE STRING "mingw32 library") +@@ -40,27 +44,27 @@ IF(MINGW) + ENDIF(MINGW) + + IF(SDL2PP_WITH_IMAGE) +- FIND_PACKAGE(SDL2_image REQUIRED) +- SET(SDL2_ALL_INCLUDE_DIRS ${SDL2_ALL_INCLUDE_DIRS} ${SDL2_IMAGE_INCLUDE_DIR}) +- SET(SDL2_ALL_LIBRARIES ${SDL2_ALL_LIBRARIES} ${SDL2_IMAGE_LIBRARY}) ++ FIND_PACKAGE(sdl2-image CONFIG REQUIRED) ++ SET(SDL2_ALL_INCLUDE_DIRS ${SDL2_ALL_INCLUDE_DIRS}) ++ SET(SDL2_ALL_LIBRARIES ${SDL2_ALL_LIBRARIES} SDL2::SDL2_image) + SET(SDL2_ALL_PKGCONFIG_MODULES "${SDL2_ALL_PKGCONFIG_MODULES} SDL2_image") + ELSE(SDL2PP_WITH_IMAGE) + MESSAGE(STATUS "SDL2_image support disabled") + ENDIF(SDL2PP_WITH_IMAGE) + + IF(SDL2PP_WITH_TTF) +- FIND_PACKAGE(SDL2_ttf REQUIRED) +- SET(SDL2_ALL_INCLUDE_DIRS ${SDL2_ALL_INCLUDE_DIRS} ${SDL2_TTF_INCLUDE_DIR}) +- SET(SDL2_ALL_LIBRARIES ${SDL2_ALL_LIBRARIES} ${SDL2_TTF_LIBRARY}) ++ FIND_PACKAGE(sdl2-ttf CONFIG REQUIRED) ++ SET(SDL2_ALL_INCLUDE_DIRS ${SDL2_ALL_INCLUDE_DIRS}) ++ SET(SDL2_ALL_LIBRARIES ${SDL2_ALL_LIBRARIES} SDL2::SDL2_ttf) + SET(SDL2_ALL_PKGCONFIG_MODULES "${SDL2_ALL_PKGCONFIG_MODULES} SDL2_ttf") + ELSE(SDL2PP_WITH_TTF) + MESSAGE(STATUS "SDL2_ttf support disabled") + ENDIF(SDL2PP_WITH_TTF) + + IF(SDL2PP_WITH_MIXER) +- FIND_PACKAGE(SDL2_mixer REQUIRED) +- SET(SDL2_ALL_INCLUDE_DIRS ${SDL2_ALL_INCLUDE_DIRS} ${SDL2_MIXER_INCLUDE_DIR}) +- SET(SDL2_ALL_LIBRARIES ${SDL2_ALL_LIBRARIES} ${SDL2_MIXER_LIBRARY}) ++ FIND_PACKAGE(sdl2-mixer CONFIG REQUIRED) ++ SET(SDL2_ALL_INCLUDE_DIRS ${SDL2_ALL_INCLUDE_DIRS}) ++ SET(SDL2_ALL_LIBRARIES ${SDL2_ALL_LIBRARIES} SDL2::SDL2_mixer) + SET(SDL2_ALL_PKGCONFIG_MODULES "${SDL2_ALL_PKGCONFIG_MODULES} SDL2_mixer") + ELSE(SDL2PP_WITH_MIXER) + MESSAGE(STATUS "SDL2_mixer support disabled") +@@ -94,7 +98,6 @@ ELSE(MSVC) + #APPEND_CXX_FLAG_IF_SUPPORTED(-Wno-padded SDL2PP_WARNINGS) + ENDIF(MSVC) + +-LIST(REMOVE_DUPLICATES SDL2_ALL_INCLUDE_DIRS) + + INCLUDE_DIRECTORIES(BEFORE ${PROJECT_SOURCE_DIR}) + INCLUDE_DIRECTORIES(SYSTEM ${SDL2_ALL_INCLUDE_DIRS}) +@@ -217,10 +220,10 @@ IF(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) + OPTION(SDL2PP_STATIC "Build static library instead of shared one" OFF) + + # library +- IF(SDL2PP_STATIC) ++ IF(0) + ADD_LIBRARY(SDL2pp STATIC ${LIBRARY_SOURCES} ${LIBRARY_HEADERS}) + ELSE(SDL2PP_STATIC) +- ADD_LIBRARY(SDL2pp SHARED ${LIBRARY_SOURCES} ${LIBRARY_HEADERS}) ++ ADD_LIBRARY(SDL2pp ${LIBRARY_SOURCES} ${LIBRARY_HEADERS}) + TARGET_LINK_LIBRARIES(SDL2pp ${SDL2_ALL_LIBRARIES}) + SET_TARGET_PROPERTIES(SDL2pp PROPERTIES VERSION 8.3.0 SOVERSION 8) + ENDIF(SDL2PP_STATIC) diff --git a/vcpkg/ports/sdl2pp/portfile.cmake b/vcpkg/ports/sdl2pp/portfile.cmake new file mode 100644 index 0000000..3d843a6 --- /dev/null +++ b/vcpkg/ports/sdl2pp/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libSDL2pp/libSDL2pp + REF 0.16.0 + SHA512 36603a0b1c3ba9294fffa5368357866e5689ceed9743352ff52c096d8b0070cc3f8708a5e837c10c871b410b6bda3ed7e8e3b95cb9afc136d91afb035cde6361 + HEAD_REF master + PATCHES fix-dependencies.patch +) + +file(REMOVE ${SOURCE_PATH}/cmake/FindSDL2.cmake + ${SOURCE_PATH}/cmake/FindSDL2_image.cmake + ${SOURCE_PATH}/cmake/FindSDL2_mixer.cmake + ${SOURCE_PATH}/cmake/FindSDL2_ttf.cmake +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SDL2PP_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSDL2PP_WITH_EXAMPLES=OFF + -DSDL2PP_WITH_TESTS=OFF + -DSDL2PP_STATIC=${SDL2PP_STATIC} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/seal/CONTROL b/vcpkg/ports/seal/CONTROL new file mode 100644 index 0000000..3a23af0 --- /dev/null +++ b/vcpkg/ports/seal/CONTROL @@ -0,0 +1,7 @@ +Source: seal +Version: 3.5.9 +Homepage: https://github.com/microsoft/SEAL +Description: Microsoft SEAL is an easy-to-use and powerful homomorphic encryption library. + +Feature: zlib +Description: (Not currently implemented) Use zlib for compressed serialization diff --git a/vcpkg/ports/seal/no-source-writes.patch b/vcpkg/ports/seal/no-source-writes.patch new file mode 100644 index 0000000..e961686 --- /dev/null +++ b/vcpkg/ports/seal/no-source-writes.patch @@ -0,0 +1,79 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 92404c5..9867974 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -108,20 +108,20 @@ endif() + + # Required files and directories + include(GNUInstallDirs) +-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${SEAL_SOURCE_DIR}/${OUTLIB_PATH}) +-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${SEAL_SOURCE_DIR}/${OUTLIB_PATH}) +-set(CMAKE_LIBRARY_RUNTIME_DIRECTORY ${SEAL_SOURCE_DIR}/bin) +-set(SEAL_TARGETS_FILENAME ${SEAL_SOURCE_DIR}/cmake/SEALTargets.cmake) ++set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${OUTLIB_PATH}) ++set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${OUTLIB_PATH}) ++set(CMAKE_LIBRARY_RUNTIME_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) ++set(SEAL_TARGETS_FILENAME ${CMAKE_CURRENT_BINARY_DIR}/cmake/SEALTargets.cmake) + set(SEAL_CONFIG_IN_FILENAME ${SEAL_SOURCE_DIR}/cmake/SEALConfig.cmake.in) +-set(SEAL_CONFIG_FILENAME ${SEAL_SOURCE_DIR}/cmake/SEALConfig.cmake) ++set(SEAL_CONFIG_FILENAME ${CMAKE_CURRENT_BINARY_DIR}/cmake/SEALConfig.cmake) + set(SEAL_PKGCONFIG_IN_FILENAME ${SEAL_SOURCE_DIR}/seal.pc.in) +-set(SEAL_PKGCONFIG_FILENAME ${SEAL_SOURCE_DIR}/seal-${SEAL_VERSION_MAJOR}.${SEAL_VERSION_MINOR}.pc) +-set(SEAL_CONFIG_VERSION_FILENAME ${SEAL_SOURCE_DIR}/cmake/SEALConfigVersion.cmake) ++set(SEAL_PKGCONFIG_FILENAME ${CMAKE_CURRENT_BINARY_DIR}/seal-${SEAL_VERSION_MAJOR}.${SEAL_VERSION_MINOR}.pc) ++set(SEAL_CONFIG_VERSION_FILENAME ${CMAKE_CURRENT_BINARY_DIR}/cmake/SEALConfigVersion.cmake) + set(SEAL_CONFIG_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/SEAL-${SEAL_VERSION_MAJOR}.${SEAL_VERSION_MINOR}) + set(SEAL_PKGCONFIG_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + set(SEAL_INCLUDES_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR}/SEAL-${SEAL_VERSION_MAJOR}.${SEAL_VERSION_MINOR}) + set(SEAL_INCLUDES_BUILD_DIR ${SEAL_SOURCE_DIR}/native/src) +-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${SEAL_SOURCE_DIR}/bin) ++set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) + set(SEAL_THIRDPARTY_DIR ${SEAL_SOURCE_DIR}/thirdparty) + + # For extra modules we might have +@@ -830,7 +830,7 @@ unset(SEAL_MACOS_SEAL_C_PATH) + # Create SEALNet-multi.nuspec for a multi-platform NuGet package + configure_file( + ${SEAL_SOURCE_DIR}/dotnet/nuget/SEALNet-multi.nuspec.in +- ${SEAL_SOURCE_DIR}/dotnet/nuget/SEALNet-multi.nuspec ++ ${CMAKE_CURRENT_BINARY_DIR}/dotnet/nuget/SEALNet-multi.nuspec + @ONLY) + + set(SEAL_WINDOWS_SEAL_C_PATH "") +@@ -855,11 +855,11 @@ endif() + # Create SEALNet.nuspec for a local NuGet pack from SEALNet.nuspec.in + configure_file( + ${SEAL_SOURCE_DIR}/dotnet/nuget/SEALNet.nuspec.in +- ${SEAL_SOURCE_DIR}/dotnet/nuget/SEALNet.nuspec ++ ${CMAKE_CURRENT_BINARY_DIR}/dotnet/nuget/SEALNet.nuspec + @ONLY) + + # Create SEALNet.targets from SEALNet.targets.in + configure_file( + ${SEAL_SOURCE_DIR}/dotnet/nuget/SEALNet.targets.in +- ${SEAL_SOURCE_DIR}/dotnet/nuget/SEALNet.targets ++ ${CMAKE_CURRENT_BINARY_DIR}/dotnet/nuget/SEALNet.targets + @ONLY) +diff --git a/native/src/seal/util/CMakeLists.txt b/native/src/seal/util/CMakeLists.txt +index 3f2c7ba..a15e634 100644 +--- a/native/src/seal/util/CMakeLists.txt ++++ b/native/src/seal/util/CMakeLists.txt +@@ -28,7 +28,8 @@ target_sources(seal_obj PRIVATE + ) + + # Create the config file +-configure_file(${CMAKE_CURRENT_LIST_DIR}/config.h.in ${CMAKE_CURRENT_LIST_DIR}/config.h) ++configure_file(${CMAKE_CURRENT_LIST_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/seal/util/config.h) ++target_include_directories(seal_obj PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) + + # Add header files for installation + install( +@@ -38,7 +39,7 @@ install( + ${CMAKE_CURRENT_LIST_DIR}/clang.h + ${CMAKE_CURRENT_LIST_DIR}/clipnormal.h + ${CMAKE_CURRENT_LIST_DIR}/common.h +- ${CMAKE_CURRENT_LIST_DIR}/config.h ++ ${CMAKE_CURRENT_BINARY_DIR}/seal/util/config.h + ${CMAKE_CURRENT_LIST_DIR}/croots.h + ${CMAKE_CURRENT_LIST_DIR}/defines.h + ${CMAKE_CURRENT_LIST_DIR}/galois.h diff --git a/vcpkg/ports/seal/portfile.cmake b/vcpkg/ports/seal/portfile.cmake new file mode 100644 index 0000000..d680e10 --- /dev/null +++ b/vcpkg/ports/seal/portfile.cmake @@ -0,0 +1,43 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO microsoft/SEAL + REF e3ad13edf7e5b4dc8a59fd2cd6235ad9d7428cab + SHA512 9d52a51bd1d3141e45fd1f92134433a9eb7458e125140501952535c67ea49e0c66ccd4a80f7473c31db1963afcd7e690c716ea32d195cb07ba6fa60847168a91 + HEAD_REF master + PATCHES no-source-writes.patch +) + +if("zlib" IN_LIST FEATURES) + message("SEAL currently does not support non-vendored zlib -- ignoring feature 'zlib'") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DALLOW_COMMAND_LINE_BUILD=ON + -DSEAL_BUILD_EXAMPLES=OFF + -DSEAL_BUILD_TESTS=OFF + -DSEAL_BUILD_SEAL_C=OFF + -DSEAL_USE_MSGSL=OFF + -DSEAL_USE_ZLIB=OFF +) + +vcpkg_build_cmake(TARGET seal LOGFILE_ROOT build) +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(GLOB CONFIG_PATH RELATIVE "${CURRENT_PACKAGES_DIR}" "${CURRENT_PACKAGES_DIR}/lib/cmake/SEAL-*") +if(NOT CONFIG_PATH) + message(FATAL_ERROR "Could not find installed cmake config files.") +endif() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "${CONFIG_PATH}") +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/secp256k1/CMakeLists.txt b/vcpkg/ports/secp256k1/CMakeLists.txt new file mode 100644 index 0000000..a3af313 --- /dev/null +++ b/vcpkg/ports/secp256k1/CMakeLists.txt @@ -0,0 +1,35 @@ +cmake_minimum_required(VERSION 3.8) +project(secp256k1 C) + +option(INSTALL_HEADERS "Install header files" ON) + +add_definitions( + -DENABLE_MODULE_ECDH + -DENABLE_MODULE_RECOVERY + -DHAVE_CONFIG_H +) + +file(GLOB SOURCES src/secp256k1.c) +add_library(secp256k1 ${SOURCES}) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src) + +target_include_directories(secp256k1 PUBLIC $ $) + +if(INSTALL_HEADERS) + file(GLOB HEADERS include/*.h) + install(FILES ${HEADERS} DESTINATION include) +endif() + +install(TARGETS secp256k1 EXPORT unofficial-secp256k1-targets + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +install( + EXPORT unofficial-secp256k1-targets + FILE unofficial-secp256k1-targets.cmake + NAMESPACE unofficial:: + DESTINATION share/unofficial-secp256k1 +) \ No newline at end of file diff --git a/vcpkg/ports/secp256k1/CONTROL b/vcpkg/ports/secp256k1/CONTROL new file mode 100644 index 0000000..10d73e4 --- /dev/null +++ b/vcpkg/ports/secp256k1/CONTROL @@ -0,0 +1,5 @@ +Source: secp256k1 +Version: 2017-19-10 +Port-Version: 3 +Homepage: https://github.com/bitcoin-core/secp256k1 +Description: Optimized C library for EC operations on curve diff --git a/vcpkg/ports/secp256k1/libsecp256k1-config.h b/vcpkg/ports/secp256k1/libsecp256k1-config.h new file mode 100644 index 0000000..693d3ed --- /dev/null +++ b/vcpkg/ports/secp256k1/libsecp256k1-config.h @@ -0,0 +1,29 @@ +/********************************************************************** + * Copyright (c) 2013, 2014 Pieter Wuille * + * Distributed under the MIT software license, see the accompanying * + * file COPYING or http://www.opensource.org/licenses/mit-license.php.* + **********************************************************************/ + +#ifndef SECP256K1_BASIC_CONFIG_H +#define SECP256K1_BASIC_CONFIG_H + +#undef USE_ASM_X86_64 +#undef USE_ENDOMORPHISM +#undef USE_FIELD_10X26 +#undef USE_FIELD_5X52 +#undef USE_FIELD_INV_BUILTIN +#undef USE_FIELD_INV_NUM +#undef USE_NUM_GMP +#undef USE_NUM_NONE +#undef USE_SCALAR_4X64 +#undef USE_SCALAR_8X32 +#undef USE_SCALAR_INV_BUILTIN +#undef USE_SCALAR_INV_NUM + +#define USE_NUM_NONE 1 +#define USE_FIELD_INV_BUILTIN 1 +#define USE_SCALAR_INV_BUILTIN 1 +#define USE_FIELD_10X26 1 +#define USE_SCALAR_8X32 1 + +#endif /* SECP256K1_BASIC_CONFIG_H */ diff --git a/vcpkg/ports/secp256k1/portfile.cmake b/vcpkg/ports/secp256k1/portfile.cmake new file mode 100644 index 0000000..3bf1588 --- /dev/null +++ b/vcpkg/ports/secp256k1/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO "bitcoin-core/secp256k1" + REF "0b7024185045a49a1a6a4c5615bf31c94f63d9c4" + SHA512 54e0c446ae63105800dfaf23dc934734f196c91f275db0455e58a36926c29ecc51a13d9b1eb2e45bc86199120c3c472ec7b39086787a49ce388a4df462a870bc +) + +file(COPY ${CURRENT_PORT_DIR}/libsecp256k1-config.h DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +configure_file(${CMAKE_CURRENT_LIST_DIR}/secp256k1-config.cmake ${CURRENT_PACKAGES_DIR}/share/unofficial-${PORT}/unofficial-secp256k1-config.cmake @ONLY) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/secp256k1/secp256k1-config.cmake b/vcpkg/ports/secp256k1/secp256k1-config.cmake new file mode 100644 index 0000000..5cc40fe --- /dev/null +++ b/vcpkg/ports/secp256k1/secp256k1-config.cmake @@ -0,0 +1 @@ +include("${CMAKE_CURRENT_LIST_DIR}/unofficial-secp256k1-targets.cmake") diff --git a/vcpkg/ports/selene/CONTROL b/vcpkg/ports/selene/CONTROL new file mode 100644 index 0000000..0a1ef52 --- /dev/null +++ b/vcpkg/ports/selene/CONTROL @@ -0,0 +1,10 @@ +Source: selene +Version: 0.3.1 +Port-Version: 3 +Homepage: https://github.com/kmhofmann/selene +Description: A C++17 image representation, processing and I/O library. +Build-Depends: zlib, libpng, libjpeg-turbo, tiff + +Feature: opencv +Description: Enable using OpenCV +Build-Depends: opencv[core] diff --git a/vcpkg/ports/selene/disable_x86_intrinsics_on_arm.patch b/vcpkg/ports/selene/disable_x86_intrinsics_on_arm.patch new file mode 100644 index 0000000..79e38c5 --- /dev/null +++ b/vcpkg/ports/selene/disable_x86_intrinsics_on_arm.patch @@ -0,0 +1,13 @@ +diff --git a/selene/base/Bitcount.hpp b/selene/base/Bitcount.hpp +index a4d69e4..709f650 100755 +--- a/selene/base/Bitcount.hpp ++++ b/selene/base/Bitcount.hpp +@@ -69,7 +69,7 @@ inline std::size_t bit_count(unsigned long long x) + return static_cast(__builtin_popcountll(x)); + } + +-#elif defined(_MSC_VER) ++#elif defined(_MSC_VER) && !defined(_M_ARM) && !defined(_M_ARM64) + + /** \brief Performs a bit count on the supplied value. + * diff --git a/vcpkg/ports/selene/portfile.cmake b/vcpkg/ports/selene/portfile.cmake new file mode 100644 index 0000000..703c3d2 --- /dev/null +++ b/vcpkg/ports/selene/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kmhofmann/selene + REF v0.3.1 + SHA512 7bc57ebe9e2442da2716eb5c1af11f8d610b0b09fe96e3122d1028575732b6045a987c499bbf7de53003edd627b8809d86c80ea4975fc2264a1c61d5891a46c3 + HEAD_REF master + PATCHES + disable_x86_intrinsics_on_arm.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS "opencv" SELENE_USE_OPENCV) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/selene) +vcpkg_copy_pdbs() + +# Include files should not be duplicated into the /debug/include directory. +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/sentencepiece/CONTROL b/vcpkg/ports/sentencepiece/CONTROL new file mode 100644 index 0000000..41db3d5 --- /dev/null +++ b/vcpkg/ports/sentencepiece/CONTROL @@ -0,0 +1,3 @@ +Source: sentencepiece +Version: v0.1.82 +Description: SentencePiece is an unsupervised text tokenizer and detokenizer mainly for Neural Network-based text generation systems where the vocabulary size is predetermined prior to the neural model training \ No newline at end of file diff --git a/vcpkg/ports/sentencepiece/portfile.cmake b/vcpkg/ports/sentencepiece/portfile.cmake new file mode 100644 index 0000000..2623aca --- /dev/null +++ b/vcpkg/ports/sentencepiece/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +if(NOT VCPKG_CMAKE_SYSTEM_NAME) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_STATIC_CRT) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/sentencepiece + REF v0.1.82 + SHA512 669d6a1e86c44587d725b1e93f11b707e510a180dec08afb79268158f5de009cb20ffccc72c501c84f032360e52e53ae227504f3538f59978629433e0d6fcf65 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSPM_ENABLE_SHARED=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +if(NOT VCPKG_CMAKE_SYSTEM_NAME) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/sentencepiece.lib ${CURRENT_PACKAGES_DIR}/debug/lib/sentencepieced.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/sentencepiece_train.lib ${CURRENT_PACKAGES_DIR}/debug/lib/sentencepiece_traind.lib) +endif() + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +vcpkg_copy_pdbs() \ No newline at end of file diff --git a/vcpkg/ports/sentry-native/CONTROL b/vcpkg/ports/sentry-native/CONTROL new file mode 100644 index 0000000..a2f4a78 --- /dev/null +++ b/vcpkg/ports/sentry-native/CONTROL @@ -0,0 +1,7 @@ +Source: sentry-native +Version: 0.4.2 +Port-Version: 2 +Homepage: https://sentry.io/ +Description: Sentry SDK for C, C++ and native applications. +Build-Depends: curl (!windows) +Supports: !(arm|arm64|uwp) diff --git a/vcpkg/ports/sentry-native/portfile.cmake b/vcpkg/ports/sentry-native/portfile.cmake new file mode 100644 index 0000000..467ee67 --- /dev/null +++ b/vcpkg/ports/sentry-native/portfile.cmake @@ -0,0 +1,59 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP") + +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/getsentry/sentry-native/releases/download/0.4.2/sentry-native.zip" + FILENAME "sentry-native-0.4.2.zip" + SHA512 6353642ceba97b44466ee4854c44cd3649ddb3d1087ff6321848d502fd5dba809778f2f2495134cf0e7a00221e73f40cc2158e46b1604ff6e78403b852f601c5 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL +) + +if (NOT DEFINED SENTRY_BACKEND) + if(MSVC AND CMAKE_GENERATOR_TOOLSET MATCHES "_xp$") + set(SENTRY_BACKEND "breakpad") + elseif(APPLE OR WIN32) + set(SENTRY_BACKEND "crashpad") + elseif(LINUX) + set(SENTRY_BACKEND "breakpad") + else() + set(SENTRY_BACKEND "inproc") + endif() +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSENTRY_BUILD_TESTS=OFF + -DSENTRY_BUILD_EXAMPLES=OFF + -DSENTRY_BACKEND=${SENTRY_BACKEND} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sentry TARGET_PATH share/sentry) + +if (WIN32 AND SENTRY_BACKEND STREQUAL "crashpad") + vcpkg_copy_tools( + TOOL_NAMES crashpad_handler + AUTO_CLEAN + ) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +file( + INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) diff --git a/vcpkg/ports/septag-sx/CONTROL b/vcpkg/ports/septag-sx/CONTROL new file mode 100644 index 0000000..a41e214 --- /dev/null +++ b/vcpkg/ports/septag-sx/CONTROL @@ -0,0 +1,4 @@ +Source: septag-sx +Version: 2019-05-07-2 +Description: Portable base library for C programmers, designed for performance and simplicity. +Supports: !(uwp|arm) \ No newline at end of file diff --git a/vcpkg/ports/septag-sx/portfile.cmake b/vcpkg/ports/septag-sx/portfile.cmake new file mode 100644 index 0000000..4fb87a2 --- /dev/null +++ b/vcpkg/ports/septag-sx/portfile.cmake @@ -0,0 +1,44 @@ +include(vcpkg_common_functions) + +if(TARGET_TRIPLET MATCHES "(uwp|arm)") + message(FATAL_ERROR "septag-sx doesn't support ${TARGET_TRIPLET} currently.") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO septag/sx + REF b70567a52636f9ecfdb904c586a957a806efc990 + SHA512 8945476b428418d3c7845afd831503f43fd44672a9b3506576c5baf50f55739327275a8be97a323f3ae146f84b76bbe266ac7b5df1b85cb05a826ed5e30b9547 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SX_SHARED_LIB) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSX_BUILD_TESTS=OFF + -DSX_SHARED_LIB=${SX_SHARED_LIB} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sx TARGET_PATH share/sx) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/sx/config.h + "define SX_CONFIG_SHARED_LIB 0" + "define SX_CONFIG_SHARED_LIB 1" + ) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME sx) diff --git a/vcpkg/ports/seqan/CONTROL b/vcpkg/ports/seqan/CONTROL new file mode 100644 index 0000000..82b7aae --- /dev/null +++ b/vcpkg/ports/seqan/CONTROL @@ -0,0 +1,3 @@ +Source: seqan +Version: 2.4.0-1 +Description: SeqAn is an open source C++ library of efficient algorithms and data structures for the analysis of sequences with the focus on biological data. diff --git a/vcpkg/ports/seqan/portfile.cmake b/vcpkg/ports/seqan/portfile.cmake new file mode 100644 index 0000000..1fef42f --- /dev/null +++ b/vcpkg/ports/seqan/portfile.cmake @@ -0,0 +1,16 @@ +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "http://packages.seqan.de/seqan-library/seqan-library-2.4.0.zip" + FILENAME "seqan-library-2.4.0.zip" + SHA512 9a1b4fe9dff9ad49a8761798a6a6eaeebce683ccb5e2dd78ea4b8829093918606830a16ea458d67bf3f652531ddc55b550c12cb257be913bb187c8940d96a575 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.h") + +file(INSTALL ${SOURCE_PATH}/share/doc/seqan/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/seqan RENAME copyright) diff --git a/vcpkg/ports/serd/CMakeLists.txt b/vcpkg/ports/serd/CMakeLists.txt new file mode 100644 index 0000000..2f07119 --- /dev/null +++ b/vcpkg/ports/serd/CMakeLists.txt @@ -0,0 +1,46 @@ +cmake_minimum_required(VERSION 3.17) +project(serd C) + +add_library(serd + src/byte_source.c + src/env.c + src/n3.c + src/node.c + src/reader.c + src/string.c + src/uri.c + src/writer.c +) + +file(WRITE "${CMAKE_BINARY_DIR}/serd_config.h" "") + +target_include_directories(serd + PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" +) + +set_target_properties(serd PROPERTIES + C_STANDARD 99 + C_STANDARD_REQUIRED ON +) + +target_compile_definitions(serd PRIVATE SERD_INTERNAL _CRT_SECURE_NO_WARNINGS) + +if(BUILD_SHARED_LIBS) + target_compile_definitions(serd PUBLIC SERD_SHARED) +endif() + +install( + TARGETS serd + EXPORT serd-config + INCLUDES DESTINATION include +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY serd DESTINATION include) +endif() + +install( + EXPORT serd-config + NAMESPACE serd:: + DESTINATION "${CMAKE_INSTALL_PREFIX}/share/serd" +) diff --git a/vcpkg/ports/serd/portfile.cmake b/vcpkg/ports/serd/portfile.cmake new file mode 100644 index 0000000..6e6173c --- /dev/null +++ b/vcpkg/ports/serd/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.com + OUT_SOURCE_PATH SOURCE_PATH + REPO drobilla/serd + REF v0.30.4 + SHA512 59b4f67dfa8a2c01119b1c69609030d851339ba6d85c5c559b7c2454492ef40498ce710e5cf5f7a698a292db81e6bffacb86f9dafa5d7f3fe0c60d53d6e2281f + 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() +vcpkg_fixup_cmake_targets() +file( + INSTALL "${SOURCE_PATH}/COPYING" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright +) diff --git a/vcpkg/ports/serd/vcpkg.json b/vcpkg/ports/serd/vcpkg.json new file mode 100644 index 0000000..db40b57 --- /dev/null +++ b/vcpkg/ports/serd/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "serd", + "version-string": "0.30.4", + "description": "Serd is a lightweight C library for RDF syntax which supports reading and writing Turtle, TRiG, NTriples, and NQuads.", + "homepage": "https://drobilla.net/software/serd", + "license": "ISC" +} diff --git a/vcpkg/ports/sf2cute/CONTROL b/vcpkg/ports/sf2cute/CONTROL new file mode 100644 index 0000000..bdba56c --- /dev/null +++ b/vcpkg/ports/sf2cute/CONTROL @@ -0,0 +1,6 @@ +Source: sf2cute +Version: 0.2.0-1 +Description: C++14 Library for SoundFont 2 + +Feature: example +Description: Installs an example application diff --git a/vcpkg/ports/sf2cute/portfile.cmake b/vcpkg/ports/sf2cute/portfile.cmake new file mode 100644 index 0000000..e462223 --- /dev/null +++ b/vcpkg/ports/sf2cute/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO gocha/sf2cute + REF v0.2 + HEAD_REF master + SHA512 721762556c392a134500fa110ec849a60d1285a57e4e8d9cacb6281bed02f5658a14694efcccb8248719558b45db89da5ad53c56990bb9c263a9760fe0d99b8f +) + +set(BUILD_EXAMPLE OFF) + +if("example" IN_LIST FEATURES) + set(BUILD_EXAMPLE ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DSF2CUTE_EXAMPLES_INSTALL_DIR=tools/sf2cute + OPTIONS_RELEASE + -DSF2CUTE_INSTALL_EXAMPLES=${BUILD_EXAMPLE} + -DSF2CUTE_EXAMPLES_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/tools/sf2cute +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sf2cute RENAME copyright) + +if(BUILD_EXAMPLE) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/sf2cute) +endif() + +# Post-build test for cmake libraries +vcpkg_test_cmake(PACKAGE_NAME sf2cute) diff --git a/vcpkg/ports/sfgui/001-fix-corefoundation-link.patch b/vcpkg/ports/sfgui/001-fix-corefoundation-link.patch new file mode 100644 index 0000000..e3c80bc --- /dev/null +++ b/vcpkg/ports/sfgui/001-fix-corefoundation-link.patch @@ -0,0 +1,23 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c0af720..774e2d8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -107,16 +107,8 @@ if( WIN32 ) + set( LIB_PATH "lib" ) + elseif( APPLE ) + find_library( COREFOUNDATION_LIBRARY CoreFoundation ) +- mark_as_advanced( COREFOUNDATION_LIBRARY ) +- +- add_library( CoreFoundation SHARED IMPORTED ) +- set_target_properties( +- CoreFoundation PROPERTIES +- IMPORTED_LOCATION "${COREFOUNDATION_LIBRARY}" +- INTERFACE_INCLUDE_DIRECTORIES "/System/Library/Frameworks/CoreFoundation.framework/Headers" +- ) +- +- target_link_libraries( ${TARGET} PUBLIC CoreFoundation ) ++ ++ target_link_libraries( ${TARGET} PUBLIC ${COREFOUNDATION_LIBRARY} ) + set( SHARE_PATH "${CMAKE_INSTALL_PREFIX}/share/SFGUI" ) + set( LIB_PATH "lib" ) + elseif( "${CMAKE_SYSTEM_NAME}" MATCHES "Linux" ) diff --git a/vcpkg/ports/sfgui/CONTROL b/vcpkg/ports/sfgui/CONTROL new file mode 100644 index 0000000..b53bac2 --- /dev/null +++ b/vcpkg/ports/sfgui/CONTROL @@ -0,0 +1,5 @@ +Source: sfgui +Version: 0.4.0-3 +Homepage: https://github.com/TankOs/SFGUI +Description: simple and fast graphical user interface library +Build-Depends: sfml diff --git a/vcpkg/ports/sfgui/portfile.cmake b/vcpkg/ports/sfgui/portfile.cmake new file mode 100644 index 0000000..3e1fada --- /dev/null +++ b/vcpkg/ports/sfgui/portfile.cmake @@ -0,0 +1,40 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO TankOs/SFGUI + REF 0.4.0 + SHA512 15456c6080b7095bcdcec08489b2b91b5cfc36cdf3c0b645b305072e7e835837eb4f95b59371ff176630b2b7ae51da475d8ea0bde5ff7fc0ba74c463bf5f54cf + HEAD_REF master + PATCHES + "001-fix-corefoundation-link.patch" +) + +file(REMOVE ${SOURCE_PATH}/cmake/Modules/FindSFML.cmake) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SFGUI_BUILD_SHARED_LIBS) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSFGUI_BUILD_DOC=OFF + -DSFGUI_BUILD_EXAMPLES=OFF + -DSFGUI_BUILD_SHARED_LIBS=${SFGUI_BUILD_SHARED_LIBS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + file(GLOB_RECURSE SFGUI_DOC_RELEASE ${CURRENT_PACKAGES_DIR}/*.md) + file(GLOB_RECURSE SFGUI_DOC_DEBUG ${CURRENT_PACKAGES_DIR}/debug/*.md) + file(REMOVE ${SFGUI_DOC_RELEASE} ${SFGUI_DOC_DEBUG}) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH share/SFGUI/cmake) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/sfgui RENAME copyright) diff --git a/vcpkg/ports/sfml/CONTROL b/vcpkg/ports/sfml/CONTROL new file mode 100644 index 0000000..d126e39 --- /dev/null +++ b/vcpkg/ports/sfml/CONTROL @@ -0,0 +1,6 @@ +Source: sfml +Version: 2.5.1 +Port-Version: 9 +Homepage: https://github.com/sfml/sfml +Description: Simple and fast multimedia library +Build-Depends: freetype, libflac, libogg, libvorbis, openal-soft, stb diff --git a/vcpkg/ports/sfml/portfile.cmake b/vcpkg/ports/sfml/portfile.cmake new file mode 100644 index 0000000..0a028db --- /dev/null +++ b/vcpkg/ports/sfml/portfile.cmake @@ -0,0 +1,59 @@ +vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH + REPO SFML/SFML + REF 2.5.1 + HEAD_REF master + SHA512 7aed2fc29d1da98e6c4d598d5c86cf536cb4eb5c2079cdc23bb8e502288833c052579dadbe0ce13ad6461792d959bf6d9660229f54c54cf90a541c88c6b03d59 + PATCHES + use-system-freetype.patch + stb_include.patch +) + +file(REMOVE_RECURSE ${SOURCE_PATH}/extlibs) +# Without this, we get error: list sub-command REMOVE_DUPLICATES requires list to be present. +file(MAKE_DIRECTORY ${SOURCE_PATH}/extlibs/libs) +file(WRITE ${SOURCE_PATH}/extlibs/libs/x "") +# The embedded FindFreetype doesn't properly handle debug libraries +file(REMOVE_RECURSE ${SOURCE_PATH}/cmake/Modules/FindFreetype.cmake) + +if(VCPKG_TARGET_IS_LINUX) + message(STATUS "SFML currently requires the following libraries from the system package manager:\n libudev\n libx11\n libxrandr\n opengl\n\nThese can be installed on Ubuntu systems via apt-get install libx11-dev libxrandr-dev libxi-dev libudev-dev libgl1-mesa-dev") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSFML_BUILD_FRAMEWORKS=OFF + -DSFML_USE_SYSTEM_DEPS=ON + -DSFML_MISC_INSTALL_PREFIX=share/sfml + -DSFML_GENERATE_PDB=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SFML) +vcpkg_copy_pdbs() + +FILE(READ ${CURRENT_PACKAGES_DIR}/share/sfml/SFMLConfig.cmake SFML_CONFIG) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + FILE(WRITE ${CURRENT_PACKAGES_DIR}/share/sfml/SFMLConfig.cmake "set(SFML_STATIC_LIBRARIES true)\ninclude(CMakeFindDependencyMacro)\nfind_dependency(Freetype)\n${SFML_CONFIG}") +else() + FILE(WRITE ${CURRENT_PACKAGES_DIR}/share/sfml/SFMLConfig.cmake "set(SFML_STATIC_LIBRARIES false)\n${SFML_CONFIG}") +endif() + +# move sfml-main to manual link dir +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib) + file(COPY ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/sfml-main.lib) + file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/sfml-main-d.lib) + file(GLOB FILES "${CURRENT_PACKAGES_DIR}/share/sfml/SFML*Targets-*.cmake") + foreach(FILE ${FILES}) + file(READ "${FILE}" _contents) + string(REPLACE "/lib/sfml-main" "/lib/manual-link/sfml-main" _contents "${_contents}") + file(WRITE "${FILE}" "${_contents}") + endforeach() +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/license.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/sfml/stb_include.patch b/vcpkg/ports/sfml/stb_include.patch new file mode 100644 index 0000000..3519b1c --- /dev/null +++ b/vcpkg/ports/sfml/stb_include.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e821a49bc..c68264ef2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -188,6 +188,9 @@ if(SFML_USE_SYSTEM_DEPS) + endforeach() + + list(REMOVE_DUPLICATES CMAKE_IGNORE_PATH) ++ ++ find_path(STB_INCLUDE_DIR stb.h) ++ include_directories(${STB_INCLUDE_DIR}) + endif() + + # Visual C++: remove warnings regarding SL security and algorithms on pointers diff --git a/vcpkg/ports/sfml/usage b/vcpkg/ports/sfml/usage new file mode 100644 index 0000000..5b0f68d --- /dev/null +++ b/vcpkg/ports/sfml/usage @@ -0,0 +1,7 @@ +The package sfml provides CMake targets: + + find_package(SFML COMPONENTS system window graphics CONFIG REQUIRED) + # Windows + target_link_libraries(main PRIVATE FLAC OpenAL OpenGL Vorbis) + # Linux/MacOS + target_link_libraries(main PRIVATE X11 FLAC UDev OpenAL) diff --git a/vcpkg/ports/sfml/use-system-freetype.patch b/vcpkg/ports/sfml/use-system-freetype.patch new file mode 100644 index 0000000..4d895b7 --- /dev/null +++ b/vcpkg/ports/sfml/use-system-freetype.patch @@ -0,0 +1,11 @@ +--- a/src/SFML/Graphics/CMakeLists.txt ++++ b/src/SFML/Graphics/CMakeLists.txt +@@ -135,7 +135,7 @@ if(SFML_OS_ANDROID) + endif() + + sfml_find_package(Freetype INCLUDE "FREETYPE_INCLUDE_DIRS" LINK "FREETYPE_LIBRARY") +-target_link_libraries(sfml-graphics PRIVATE Freetype) ++target_link_libraries(sfml-graphics PRIVATE Freetype::Freetype) + + # add preprocessor symbols + target_compile_definitions(sfml-graphics PRIVATE "STBI_FAILURE_USERMSG") diff --git a/vcpkg/ports/sfsexp/CMakeLists.txt b/vcpkg/ports/sfsexp/CMakeLists.txt new file mode 100644 index 0000000..e770b9d --- /dev/null +++ b/vcpkg/ports/sfsexp/CMakeLists.txt @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 3.13) +project(sexp) + +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS) +endif() + +file(GLOB sources src/*.c src/*.h) +include_directories(src/) + +add_library(sexp ${sources}) + +set_target_properties(sexp PROPERTIES PUBLIC_HEADER "src/cstring.h;src/faststack.h;src/sexp.h;src/sexp_errors.h;src/sexp_memory.h;src/sexp_ops.h;src/sexp_vis.h") + +install(TARGETS sexp + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin + PUBLIC_HEADER DESTINATION include +) \ No newline at end of file diff --git a/vcpkg/ports/sfsexp/CONTROL b/vcpkg/ports/sfsexp/CONTROL new file mode 100644 index 0000000..bb6d25a --- /dev/null +++ b/vcpkg/ports/sfsexp/CONTROL @@ -0,0 +1,4 @@ +Source: sfsexp +Version: 1.3 +Homepage: https://github.com/mjsottile/sfsexp +Description: Small Fast S-Expression Library diff --git a/vcpkg/ports/sfsexp/portfile.cmake b/vcpkg/ports/sfsexp/portfile.cmake new file mode 100644 index 0000000..6bc6f2c --- /dev/null +++ b/vcpkg/ports/sfsexp/portfile.cmake @@ -0,0 +1,23 @@ +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mjsottile/sfsexp + REF ad589f9e6e0eca20345320e9c82a3aecc0a5c8aa #v1.3 + SHA512 cdd469e23de48a5d6cd633b7b97b394cbfcba330ac2c3ae549811d856f2eec0c8558f99313e56a9f1cc9d72d4f17077584b6cf15c87814b91fe44ddd76895a8c + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) \ No newline at end of file diff --git a/vcpkg/ports/shaderc/CMakeLists.txt b/vcpkg/ports/shaderc/CMakeLists.txt new file mode 100644 index 0000000..7ecdd03 --- /dev/null +++ b/vcpkg/ports/shaderc/CMakeLists.txt @@ -0,0 +1,31 @@ +option(SUFFIX_D "Add d Suffix to lib" ${SUFFIX_D}) +if(NOT SUFFIX_D) + find_library(GLSLANG glslang) + find_library(OSDEPENDENT OSDependent) + find_library(OGLCOMPILER OGLCompiler) + find_library(HLSLLIB HLSL) + find_library(SPIRVLIB SPIRV) +ELSE() + find_library(GLSLANG glslangd) + find_library(OSDEPENDENT OSDependentd) + find_library(OGLCOMPILER OGLCompilerd) + find_library(HLSLLIB HLSLd) + find_library(SPIRVLIB SPIRVd) +ENDIF() + +add_library(glslang STATIC IMPORTED GLOBAL) +set_property(TARGET glslang PROPERTY IMPORTED_LOCATION "${GLSLANG}") +find_path(glslang_SOURCE_DIR glslang/Include/Common) +set_property(TARGET glslang APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${glslang_SOURCE_DIR}") + +add_library(OSDependent STATIC IMPORTED GLOBAL) +set_property(TARGET OSDependent PROPERTY IMPORTED_LOCATION "${OSDEPENDENT}") + +add_library(OGLCompiler STATIC IMPORTED GLOBAL) +set_property(TARGET OGLCompiler PROPERTY IMPORTED_LOCATION "${OGLCOMPILER}") + +add_library(HLSL STATIC IMPORTED GLOBAL) +set_property(TARGET HLSL PROPERTY IMPORTED_LOCATION "${HLSLLIB}") + +add_library(SPIRV STATIC IMPORTED GLOBAL) +set_property(TARGET SPIRV PROPERTY IMPORTED_LOCATION "${SPIRVLIB}") diff --git a/vcpkg/ports/shaderc/CMakeLists_spirv.txt b/vcpkg/ports/shaderc/CMakeLists_spirv.txt new file mode 100644 index 0000000..d9e0136 --- /dev/null +++ b/vcpkg/ports/shaderc/CMakeLists_spirv.txt @@ -0,0 +1,8 @@ +find_library(SPIRVTOOLSOPT SPIRV-Tools-opt) +find_library(SPIRVTOOLS SPIRV-Tools) + +add_library(SPIRV-Tools-opt STATIC IMPORTED GLOBAL) +set_property(TARGET SPIRV-Tools-opt PROPERTY IMPORTED_LOCATION "${SPIRVTOOLSOPT}") + +add_library(SPIRV-Tools STATIC IMPORTED GLOBAL) +set_property(TARGET SPIRV-Tools PROPERTY IMPORTED_LOCATION "${SPIRVTOOLS}") diff --git a/vcpkg/ports/shaderc/CONTROL b/vcpkg/ports/shaderc/CONTROL new file mode 100644 index 0000000..0878b17 --- /dev/null +++ b/vcpkg/ports/shaderc/CONTROL @@ -0,0 +1,5 @@ +Source: shaderc +Version: 2019-06-26-1 +Homepage: https://github.com/google/shaderc +Description: A collection of tools, libraries and tests for shader compilation. +Build-Depends: glslang, spirv-tools \ No newline at end of file diff --git a/vcpkg/ports/shaderc/build-version.inc b/vcpkg/ports/shaderc/build-version.inc new file mode 100644 index 0000000..00c1405 --- /dev/null +++ b/vcpkg/ports/shaderc/build-version.inc @@ -0,0 +1,5 @@ +"shaderc v2019.0-dev unknown hash, 2019-05-08\n" +"spirv-tools v2019.3-dev unknown hash, 2019-04-03\n" +"glslang unknown hash, 2019-03-05\n" + + diff --git a/vcpkg/ports/shaderc/disable-update-version.patch b/vcpkg/ports/shaderc/disable-update-version.patch new file mode 100644 index 0000000..5ee016b --- /dev/null +++ b/vcpkg/ports/shaderc/disable-update-version.patch @@ -0,0 +1,41 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a4e779b..dc5f1a9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -81,12 +81,6 @@ add_subdirectory(libshaderc) + add_subdirectory(glslc) + add_subdirectory(examples) + +-add_custom_target(build-version +- ${PYTHON_EXECUTABLE} +- ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py +- ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR} +- COMMENT "Update build-version.inc in the Shaderc build directory (if necessary).") +- + function(define_pkg_config_file NAME LIBS) + add_custom_target(${NAME}-pkg-config ALL + COMMAND ${CMAKE_COMMAND} +diff --git a/glslc/CMakeLists.txt b/glslc/CMakeLists.txt +index acf6fb0..d0df7db 100644 +--- a/glslc/CMakeLists.txt ++++ b/glslc/CMakeLists.txt +@@ -26,7 +26,6 @@ shaderc_default_compile_options(glslc_exe) + target_include_directories(glslc_exe PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/.. ${spirv-tools_SOURCE_DIR}/include) + set_target_properties(glslc_exe PROPERTIES OUTPUT_NAME glslc) + target_link_libraries(glslc_exe PRIVATE glslc shaderc_util shaderc) +-add_dependencies(glslc_exe build-version) + + shaderc_add_tests( + TEST_PREFIX glslc +diff --git a/spvc/CMakeLists.txt b/spvc/CMakeLists.txt +index f465972..76f8c2e 100644 +--- a/spvc/CMakeLists.txt ++++ b/spvc/CMakeLists.txt +@@ -3,7 +3,6 @@ shaderc_default_compile_options(spvc_exe) + target_include_directories(spvc_exe PRIVATE ${shaderc_SOURCE_DIR}/libshaderc/include ${spirv-tools_SOURCE_DIR}/include) + set_target_properties(spvc_exe PROPERTIES OUTPUT_NAME spvc) + target_link_libraries(spvc_exe PRIVATE shaderc_spvc shaderc_util) +-add_dependencies(spvc_exe build-version) + + shaderc_add_asciidoc(spvc_doc_README README) + diff --git a/vcpkg/ports/shaderc/fix-install.patch b/vcpkg/ports/shaderc/fix-install.patch new file mode 100644 index 0000000..1857ed8 --- /dev/null +++ b/vcpkg/ports/shaderc/fix-install.patch @@ -0,0 +1,26 @@ +diff --git a/libshaderc/CMakeLists.txt b/libshaderc/CMakeLists.txt +index 9d07136..0ffa06f 100644 +--- a/libshaderc/CMakeLists.txt ++++ b/libshaderc/CMakeLists.txt +@@ -84,7 +84,7 @@ if(SHADERC_ENABLE_INSTALL) + # around this problem by manually substitution. + string(REPLACE "$(Configuration)" "\${CMAKE_INSTALL_CONFIG_NAME}" + install_location "${generated_location}") +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${install_location} DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install(FILES ${install_location} DESTINATION ${CMAKE_INSTALL_LIBDIR}) + else() + install(FILES ${generated_location} DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() +diff --git a/libshaderc_spvc/CMakeLists.txt b/libshaderc_spvc/CMakeLists.txt +index fae235e..b503e70 100644 +--- a/libshaderc_spvc/CMakeLists.txt ++++ b/libshaderc_spvc/CMakeLists.txt +@@ -84,7 +84,7 @@ if(SHADERC_ENABLE_INSTALL) + # around this problem by manually substitution. + string(REPLACE "$(Configuration)" "\${CMAKE_INSTALL_CONFIG_NAME}" + install_location "${generated_location}") +- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${install_location} DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ install(FILES ${install_location} DESTINATION ${CMAKE_INSTALL_LIBDIR}) + else() + install(FILES ${generated_location} DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() diff --git a/vcpkg/ports/shaderc/portfile.cmake b/vcpkg/ports/shaderc/portfile.cmake new file mode 100644 index 0000000..2978422 --- /dev/null +++ b/vcpkg/ports/shaderc/portfile.cmake @@ -0,0 +1,53 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/shaderc + REF 05c766a1f4615ee37d37d09271aaabca30ffd293 + SHA512 329697e8e23d619313440d57ef740a94c49d13533e1b8734fc8ff72fd5092c2addabb306f64cb69160fa5fee373a05ba39a5ee6d92d95e5e2e9c7ec96a51aadc + HEAD_REF master + PATCHES + "disable-update-version.patch" + "fix-install.patch" +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}/third_party/glslang) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists_spirv.txt DESTINATION ${SOURCE_PATH}/third_party/spirv-tools) +file(RENAME ${SOURCE_PATH}/third_party/spirv-tools/CMakeLists_spirv.txt ${SOURCE_PATH}/third_party/spirv-tools/CMakeLists.txt) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/build-version.inc DESTINATION ${SOURCE_PATH}/glslc/src) + +#Note: glslang and spir tools doesn't export symbol and need to be build as static lib for cmake to work +set(VCPKG_LIBRARY_LINKAGE "static") +set(OPTIONS) +if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + list(APPEND OPTIONS -DSHADERC_ENABLE_SHARED_CRT=ON) +endif() + +# shaderc uses python to manipulate copyright information +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_EXE_PATH ${PYTHON3} DIRECTORY) +vcpkg_add_to_path(PREPEND "${PYTHON3_EXE_PATH}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DSHADERC_SKIP_TESTS=true ${OPTIONS} -Dglslang_SOURCE_DIR=${CURRENT_INSTALLED_DIR}/include -Dspirv-tools_SOURCE_DIR=${CURRENT_INSTALLED_DIR}/include + OPTIONS_DEBUG -DSUFFIX_D=true + OPTIONS_RELEASE -DSUFFIX_D=false +) + +vcpkg_install_cmake() + +file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*${CMAKE_EXECUTABLE_SUFFIX}") +file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + +#Safe to remove as libs are static +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/shaderc) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/shaderc/LICENSE ${CURRENT_PACKAGES_DIR}/share/shaderc/copyright) diff --git a/vcpkg/ports/shapelib/CONTROL b/vcpkg/ports/shapelib/CONTROL new file mode 100644 index 0000000..e656682 --- /dev/null +++ b/vcpkg/ports/shapelib/CONTROL @@ -0,0 +1,4 @@ +Source: shapelib +Version: 1.5.0 +Homepage: https://download.osgeo.org/shapelib +Description: Shapefile C Library is simple C API for reading and writing ESRI Shapefiles diff --git a/vcpkg/ports/shapelib/option-build-test.patch b/vcpkg/ports/shapelib/option-build-test.patch new file mode 100644 index 0000000..c91410f --- /dev/null +++ b/vcpkg/ports/shapelib/option-build-test.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c3ef935..845ec06 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -148,7 +148,7 @@ set(executables + find_program(BASH_EXECUTABLE bash) + find_program(SED_EXECUTABLE sed) + if(BASH_EXECUTABLE AND SED_EXECUTABLE) +- set(BUILD_TEST ON) ++ option(BUILD_TEST "" ON) + else(BASH_EXECUTABLE AND SED_EXECUTABLE) + message(STATUS "WARNING: sed or bash not available so disabling testing") + endif(BASH_EXECUTABLE AND SED_EXECUTABLE) diff --git a/vcpkg/ports/shapelib/portfile.cmake b/vcpkg/ports/shapelib/portfile.cmake new file mode 100644 index 0000000..3aceff8 --- /dev/null +++ b/vcpkg/ports/shapelib/portfile.cmake @@ -0,0 +1,49 @@ +set(SHAPELIB_VERSION 1.5.0) +set(SHAPELIB_HASH 230939afb33aee042808a32b38ee9dfc7ec1f39432e5a4ebe3fda99c2f87bfbebc91830d4e21691c51aae3f4bb65d7e71e7061472bb08124dcd3402c46800d6c) + +vcpkg_download_distfile(ARCHIVE + URLS "http://download.osgeo.org/shapelib/shapelib-${SHAPELIB_VERSION}.zip" + FILENAME "shapelib-${SHAPELIB_VERSION}.zip" + SHA512 ${SHAPELIB_HASH} +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + option-build-test.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TEST=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*.exe") +if(EXES) + file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/shapelib) + file(REMOVE ${EXES}) +endif() + +file(GLOB DEBUG_EXES "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe") +if(DEBUG_EXES) + file(REMOVE ${DEBUG_EXES}) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/shapelib) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/shiva-sfml/CONTROL b/vcpkg/ports/shiva-sfml/CONTROL new file mode 100644 index 0000000..af5ad7b --- /dev/null +++ b/vcpkg/ports/shiva-sfml/CONTROL @@ -0,0 +1,4 @@ +Source: shiva-sfml +Version: 1.0-1 +Description: shiva-sfml plugins of shiva C++ engine +Build-Depends: sfml (windows), shiva diff --git a/vcpkg/ports/shiva-sfml/portfile.cmake b/vcpkg/ports/shiva-sfml/portfile.cmake new file mode 100644 index 0000000..ea6969d --- /dev/null +++ b/vcpkg/ports/shiva-sfml/portfile.cmake @@ -0,0 +1,144 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Milerius/shiva + REF 1.0 + SHA512 d1ce33e89b17fa8f82e21b51dfa1308e38c617fea52c34a20b7b6c8643318280df24c043238ddd73ba2dbc139c5b5de1c2cb3add1f5629a54694c78b415d73d1 + HEAD_REF master + ) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSHIVA_BUILD_TESTS=OFF -DSHIVA_USE_SFML_AS_RENDERER=ON -DSHIVA_INSTALL_PLUGINS=ON -DSHIVA_BUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + + +if (VCPKG_CMAKE_SYSTEM_NAME) + file(GLOB PLUGINS_RELEASE ${SOURCE_PATH}/bin/Release/systems/*) + file(GLOB PLUGINS_DEBUG ${SOURCE_PATH}/bin/Debug/systems/*) +else() + file(GLOB PLUGINS_RELEASE ${SOURCE_PATH}/bin/Release/systems/*.dll) + file(GLOB PLUGINS_DEBUG ${SOURCE_PATH}/bin/Debug/systems/*.dll) +endif() + +message(STATUS "PLUGINS_RELEASE -> ${PLUGINS_RELEASE}") +message(STATUS "PLUGINS_DEBUG -> ${PLUGINS_DEBUG}") +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/shiva-sfml) + + +if (VCPKG_CMAKE_SYSTEM_NAME) + set(SUFFIX_BINARY lib) +else() + set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) + set(SUFFIX_BINARY bin) +endif() + +##! Pre removing +if (VCPKG_CMAKE_SYSTEM_NAME) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) +endif() + +##! Include +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include/shiva-sfml) + +##! Release +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/${SUFFIX_BINARY}) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/${SUFFIX_BINARY}/shiva) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/${SUFFIX_BINARY}/shiva/plugins) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/${SUFFIX_BINARY}/shiva/plugins/shiva-sfml) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/${SUFFIX_BINARY}/shiva/plugins/shiva-sfml/Release) + +##! Debug +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/${SUFFIX_BINARY}) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/${SUFFIX_BINARY}/shiva) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/${SUFFIX_BINARY}/shiva/plugins) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/${SUFFIX_BINARY}/shiva/plugins/shiva-sfml) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/${SUFFIX_BINARY}/shiva/plugins/shiva-sfml/Debug) + +##! Copy Plugins +file(COPY ${PLUGINS_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/${SUFFIX_BINARY}/shiva/plugins/shiva-sfml/Release) +file(COPY ${PLUGINS_DEBUG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/${SUFFIX_BINARY}/shiva/plugins/shiva-sfml/Debug) + +if (NOT VCPKG_CMAKE_SYSTEM_NAME) + find_file(LUADLL lua.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(FMTDLL fmt.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(FLACDLL FLAC.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(FREETYPEDLL freetype.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(LIBBZ2DLL libbz2.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(LIBPNG16DLL libpng16.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(OGGDLL ogg.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(OPENAL32DLL OpenAL32.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(SFMLAUDIO2DLL sfml-audio-2.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(SFMLGRAPHICS2DLL sfml-graphics-2.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(SFMLSYSTEM2DLL sfml-system-2.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(SFMLWINDOW2DLL sfml-window-2.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(VORBISDLL vorbis.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(VORBISENCDLL vorbisenc.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(VORBISFILEDLL vorbisfile.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + find_file(ZLIB1DLL zlib1.dll PATHS ${CURRENT_INSTALLED_DIR}/bin) + set(DEPENDANCIES_RELEASE_DLL + ${LUADLL} + ${FMTDLL} + ${FLACDLL} + ${FREETYPEDLL} + ${LIBBZ2DLL} + ${LIBPNG16DLL} + ${OGGDLL} + ${OPENAL32DLL} + ${SFMLAUDIO2DLL} + ${SFMLGRAPHICS2DLL} + ${SFMLSYSTEM2DLL} + ${SFMLWINDOW2DLL} + ${VORBISDLL} + ${VORBISENCDLL} + ${VORBISFILEDLL} + ${ZLIB1DLL}) + + find_file(LUADLL_D lua.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(FMTDLL_D fmtd.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(FLACDLL_D FLAC.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(FREETYPEDLL_D freetyped.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(LIBBZ2DLL_D libbz2d.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(LIBPNG16DLL_D libpng16d.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(OGGDLL_D ogg.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(OPENAL32DLL_D OpenAL32.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(SFMLAUDIO2DLL_D sfml-audio-d-2.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(SFMLGRAPHICS2DLL_D sfml-graphics-d-2.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(SFMLSYSTEM2DLL_D sfml-system-d-2.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(SFMLWINDOW2DLL_D sfml-window-d-2.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(VORBISDLL_D vorbis.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(VORBISENCDLL_D vorbisenc.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(VORBISFILEDLL_D vorbisfile.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + find_file(ZLIB1DLL_D zlibd1.dll PATHS ${CURRENT_INSTALLED_DIR}/debug/bin) + set(DEPENDANCIES_DEBUG_DLL + ${LUADLL_D} + ${FMTDLL_D} + ${FLACDLL_D} + ${FREETYPEDLL_D} + ${LIBBZ2DLL_D} + ${LIBPNG16DLL_D} + ${OGGDLL_D} + ${OPENAL32DLL} + ${SFMLAUDIO2DLL_D} + ${SFMLGRAPHICS2DLL_D} + ${SFMLSYSTEM2DLL_D} + ${SFMLWINDOW2DLL_D} + ${VORBISDLL_D} + ${VORBISENCDLL_D} + ${VORBISFILEDLL_D} + ${ZLIB1DLL_D} + ) + + file(COPY ${DEPENDANCIES_RELEASE_DLL} DESTINATION ${CURRENT_PACKAGES_DIR}/${SUFFIX_BINARY}/shiva/plugins/shiva-sfml/Release) + file(COPY ${DEPENDANCIES_DEBUG_DLL} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/${SUFFIX_BINARY}/shiva/plugins/shiva-sfml/Debug) +endif() + +file(WRITE ${CURRENT_PACKAGES_DIR}/include/shiva-sfml/empty.h "") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/shiva-sfml/copyright "") diff --git a/vcpkg/ports/shiva/CONTROL b/vcpkg/ports/shiva/CONTROL new file mode 100644 index 0000000..2c235fd --- /dev/null +++ b/vcpkg/ports/shiva/CONTROL @@ -0,0 +1,5 @@ +Source: shiva +Version: 1.0-3 +Homepage: https://github.com/Milerius/shiva +Description: Modern C++ Game Engine +Build-Depends: boost-stacktrace, boost-filesystem, boost-dll, entt, lua, luafilesystem (windows), sol2, pybind11, spdlog, nlohmann-json diff --git a/vcpkg/ports/shiva/portfile.cmake b/vcpkg/ports/shiva/portfile.cmake new file mode 100644 index 0000000..72beec0 --- /dev/null +++ b/vcpkg/ports/shiva/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_find_acquire_program(PYTHON2) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Milerius/shiva + REF 1.0 + SHA512 d1ce33e89b17fa8f82e21b51dfa1308e38c617fea52c34a20b7b6c8643318280df24c043238ddd73ba2dbc139c5b5de1c2cb3add1f5629a54694c78b415d73d1 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSHIVA_BUILD_TESTS=OFF + -DPYTHON_EXECUTABLE=${PYTHON2} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/shiva) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/shiva) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/shiva/LICENSE ${CURRENT_PACKAGES_DIR}/share/shiva/copyright) diff --git a/vcpkg/ports/shogun/CONTROL b/vcpkg/ports/shogun/CONTROL new file mode 100644 index 0000000..e274c9d --- /dev/null +++ b/vcpkg/ports/shogun/CONTROL @@ -0,0 +1,6 @@ +Source: shogun +Version: 6.1.4 +Port-Version: 3 +Build-Depends: bzip2, eigen3, liblzma, libxml2, openblas, nlopt, rxcpp, snappy, zlib, protobuf, curl, lzo, dirent +Homepage: https://github.com/shogun-toolbox/shogun +Description: Unified and efficient Machine Learning \ No newline at end of file diff --git a/vcpkg/ports/shogun/cmake-config.in.patch b/vcpkg/ports/shogun/cmake-config.in.patch new file mode 100644 index 0000000..8ee2a13 --- /dev/null +++ b/vcpkg/ports/shogun/cmake-config.in.patch @@ -0,0 +1,11 @@ +diff --git a/cmake/ShogunConfig.cmake.in b/cmake/ShogunConfig.cmake.in +index e8e8035..a5097cb 100644 +--- a/cmake/ShogunConfig.cmake.in ++++ b/cmake/ShogunConfig.cmake.in +@@ -2,5 +2,5 @@ + + set_and_check(shogun_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") + +-include("@PACKAGE_CONFIG_PACKAGE_DIR@/ShogunTargets.cmake") ++include("@PACKAGE_CONFIG_PACKAGE_DIR@/../../../share/shogun/ShogunTargets.cmake") + check_required_components(shogun) diff --git a/vcpkg/ports/shogun/cmake.patch b/vcpkg/ports/shogun/cmake.patch new file mode 100644 index 0000000..16f1c3a --- /dev/null +++ b/vcpkg/ports/shogun/cmake.patch @@ -0,0 +1,73 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6c48bed..6f97c8b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -60,8 +60,8 @@ SET(SYSTEM_C_FLAGS "${CMAKE_C_FLAGS}") + SET(SYSTEM_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + STRING(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE_UC) + IF(NOT ("${BUILD_TYPE_UC}" STREQUAL "DISTRIBUTION")) +- SET(CMAKE_C_FLAGS "") +- SET(CMAKE_CXX_FLAGS "") ++# SET(CMAKE_C_FLAGS "") ++# SET(CMAKE_CXX_FLAGS "") + ENDIF(NOT ("${BUILD_TYPE_UC}" STREQUAL "DISTRIBUTION")) + + # CCACHE +@@ -184,12 +184,12 @@ SET(SWIG_CXX_COMPILER_FLAGS "-O0 -g") + SET(CMAKE_C_FLAGS "${COMPILER_WARNINGS} ${CMAKE_C_FLAGS}") + SET(CMAKE_CXX_FLAGS "${COMPILER_WARNINGS} ${CMAKE_CXX_FLAGS}") + IF(MSVC) +- SET(CMAKE_C_FLAGS_RELEASE "/O2 ${RELEASE_COMPILER_FLAGS}") +- SET(CMAKE_CXX_FLAGS_RELEASE "/O2 ${RELEASE_COMPILER_FLAGS}") +- SET(CMAKE_C_FLAGS_DISTRIBUTION "/Ot") +- SET(CMAKE_CXX_FLAGS_DISTRIBUTION "/Ot") +- SET(CMAKE_C_FLAGS_DEBUG "/DEBUG /Od /Zi") +- SET(CMAKE_CXX_FLAGS_DEBUG "/DEBUG /Od /Zi") ++ # SET(CMAKE_C_FLAGS_RELEASE "/O2 ${RELEASE_COMPILER_FLAGS}") ++ # SET(CMAKE_CXX_FLAGS_RELEASE "/O2 ${RELEASE_COMPILER_FLAGS}") ++ # SET(CMAKE_C_FLAGS_DISTRIBUTION "/Ot") ++ # SET(CMAKE_CXX_FLAGS_DISTRIBUTION "/Ot") ++ # SET(CMAKE_C_FLAGS_DEBUG "/DEBUG /Od /Zi") ++ # SET(CMAKE_CXX_FLAGS_DEBUG "/DEBUG /Od /Zi") + add_compile_options("/bigobj") + ELSE() + SET(CMAKE_C_FLAGS_RELEASE "-O3 ${RELEASE_COMPILER_FLAGS}") +diff --git a/cmake/version.cmake b/cmake/version.cmake +index fbca111..f6847f7 100644 +--- a/cmake/version.cmake ++++ b/cmake/version.cmake +@@ -5,7 +5,7 @@ SET(MAINVERSION ${VERSION}) + + SET(EXTRA "") + +-IF(EXISTS "${ROOT_DIR}/.git/") ++IF(EXISTS "${ROOT_DIR}/.git/" AND FALSE) + FIND_PACKAGE(Git QUIET) + IF (NOT GIT_FOUND) + MESSAGE(FATAL_ERROR "The source is checked out from a git repository, but cannot find git executable!") +diff --git a/src/shogun/CMakeLists.txt b/src/shogun/CMakeLists.txt +index 9e79786..fd76961 100644 +--- a/src/shogun/CMakeLists.txt ++++ b/src/shogun/CMakeLists.txt +@@ -145,7 +145,7 @@ endif() + # add target for static library if enabled + if (LIBSHOGUN_BUILD_STATIC) + add_library(shogun-static STATIC $ ${CMAKE_CURRENT_BINARY_DIR}/lib/config.h) +- set_property(TARGET shogun-static PROPERTY OUTPUT_NAME shogun) ++ set_property(TARGET shogun-static PROPERTY OUTPUT_NAME libshogun) + target_include_directories(shogun-static PUBLIC + $ + $ +@@ -492,10 +492,12 @@ ELSE() + ENDIF() + + # set the desidered targets to be installed ++if(NOT INSTALL_TARGETS) + set(INSTALL_TARGETS shogun) + if (LIBSHOGUN_BUILD_STATIC) + LIST(APPEND INSTALL_TARGETS shogun-static) + endif() ++endif() + + INSTALL( + TARGETS ${INSTALL_TARGETS} diff --git a/vcpkg/ports/shogun/fix-ASSERT-not-found.patch b/vcpkg/ports/shogun/fix-ASSERT-not-found.patch new file mode 100644 index 0000000..ae8889c --- /dev/null +++ b/vcpkg/ports/shogun/fix-ASSERT-not-found.patch @@ -0,0 +1,12 @@ +diff --git a/src/shogun/base/Parallel.cpp b/src/shogun/base/Parallel.cpp +index 78ba319..53ac6c0 100644 +--- a/src/shogun/base/Parallel.cpp ++++ b/src/shogun/base/Parallel.cpp +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + + #ifdef HAVE_CXX11 + #include diff --git a/vcpkg/ports/shogun/fix-dirent.patch b/vcpkg/ports/shogun/fix-dirent.patch new file mode 100644 index 0000000..f451023 --- /dev/null +++ b/vcpkg/ports/shogun/fix-dirent.patch @@ -0,0 +1,17 @@ +diff --git a/src/shogun/CMakeLists.txt b/src/shogun/CMakeLists.txt +index fd76961..396251c 100644 +--- a/src/shogun/CMakeLists.txt ++++ b/src/shogun/CMakeLists.txt +@@ -170,10 +170,10 @@ IF(MSVC) + ENDIF() + + # bundle dirent +- include(external/MSDirent) ++ find_path(MSDIRENT_INCLUDE_DIR NAMES dirent.h) + SHOGUN_INCLUDE_DIRS(SCOPE PUBLIC + $ +- $ ++ $ + ) + + target_link_libraries(shogun PUBLIC winmm) diff --git a/vcpkg/ports/shogun/portfile.cmake b/vcpkg/ports/shogun/portfile.cmake new file mode 100644 index 0000000..05ca61a --- /dev/null +++ b/vcpkg/ports/shogun/portfile.cmake @@ -0,0 +1,59 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO shogun-toolbox/shogun + REF ab274e7ab6bf24dd598c1daf1e626cb686d6e1cc + SHA512 fb90e5bf802c6fd59bf35ab7bbde5e8cfcdc5d46c69c52097140b30c6b29e28b8341dd1ece7f8a1f9d9123f4bc06d44d288584ce7dfddccf3d33fe05106884ae + HEAD_REF master + PATCHES + cmake.patch + cmake-config.in.patch + fix-dirent.patch + fix-ASSERT-not-found.patch +) + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) +vcpkg_add_to_path(${PYTHON3_DIR}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_META_EXAMPLES=OFF + -DBUILD_EXAMPLES=OFF + -DUSE_SVMLIGHT=OFF + -DENABLE_TESTING=OFF + -DLICENSE_GPL_SHOGUN=OFF + -DLIBSHOGUN_BUILD_STATIC=ON + -DCMAKE_DISABLE_FIND_PACKAGE_JSON=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_ViennaCL=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_TFLogger=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_GLPK=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_CPLEX=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_ARPACK=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_Mosek=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_LpSolve=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_ColPack=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_ARPREC=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_Ctags=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_CCache=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_CURL=TRUE + -DCMAKE_DISABLE_FIND_PACKAGE_OpenMP=TRUE + -DINSTALL_TARGETS=shogun-static +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/shogun) + +file(REMOVE_RECURSE + # This directory is empty given the settings above + ${CURRENT_PACKAGES_DIR}/include/shogun/mathematics/linalg/backend + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/signalrclient/0001_cmake.patch b/vcpkg/ports/signalrclient/0001_cmake.patch new file mode 100644 index 0000000..8002aea --- /dev/null +++ b/vcpkg/ports/signalrclient/0001_cmake.patch @@ -0,0 +1,75 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8c73730..4cd9074 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,7 +1,9 @@ + cmake_minimum_required (VERSION 2.8.11) + project (signalrclient) + ++if(NOT WIN32) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC -L -lcpprest") ++endif() + + set(CPPREST_INCLUDE_DIR "" CACHE FILEPATH "Path to casablanca include dir") + +@@ -16,4 +18,32 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) + + add_subdirectory(src/signalrclient) +-add_subdirectory(test) ++if(NOT DISABLE_TESTS) ++ add_subdirectory(test) ++endif() ++ ++if(BUILD_SHARED_LIBS) ++ install(FILES include/signalrclient/_exports.h DESTINATION include/signalrclient) ++else() ++ file(READ include/signalrclient/_exports.h EXPORTS_H) ++ string(REPLACE "#ifdef NO_SIGNALRCLIENT_EXPORTS" "#if 1" EXPORTS_H_2 ${EXPORTS_H}) ++ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/_exports.h "${EXPORTS_H_2}") ++ ++ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/_exports.h DESTINATION include/signalrclient) ++endif() ++ ++set(HEADERS ++ include/signalrclient/connection.h ++ include/signalrclient/connection_state.h ++ include/signalrclient/hub_connection.h ++ include/signalrclient/hub_exception.h ++ include/signalrclient/hub_proxy.h ++ include/signalrclient/log_writer.h ++ include/signalrclient/trace_level.h ++ include/signalrclient/transport_type.h ++ include/signalrclient/web_exception.h) ++ ++install( ++ FILES ${HEADERS} ++ DESTINATION "include/signalrclient" ++) +diff --git a/src/signalrclient/CMakeLists.txt b/src/signalrclient/CMakeLists.txt +index 76a5e1b..db141eb 100644 +--- a/src/signalrclient/CMakeLists.txt ++++ b/src/signalrclient/CMakeLists.txt +@@ -22,6 +22,21 @@ set (SOURCES + websocket_transport.cpp + ) + +-add_library (signalrclient SHARED ${SOURCES}) ++if(BUILD_SHARED_LIBS) ++ add_definitions(-DSIGNALRCLIENT_EXPORTS) ++else() ++ add_definitions(-DNO_SIGNALRCLIENT_EXPORTS) ++endif() ++ ++add_definitions(-DUNICODE -D_UNICODE) ++ ++add_library (signalrclient ${SOURCES}) + + target_link_libraries(signalrclient ${CPPREST_SO}) ++ ++install( ++ TARGETS signalrclient ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib ++ RUNTIME DESTINATION bin ++) diff --git a/vcpkg/ports/signalrclient/0002_fix-compile-error.patch b/vcpkg/ports/signalrclient/0002_fix-compile-error.patch new file mode 100644 index 0000000..e363137 --- /dev/null +++ b/vcpkg/ports/signalrclient/0002_fix-compile-error.patch @@ -0,0 +1,39 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 91c2300..2439fec 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,6 +5,8 @@ if(NOT WIN32) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fPIC -L -lcpprest") + endif() + ++find_package(OpenSSL REQUIRED) ++ + set(CPPREST_INCLUDE_DIR "" CACHE FILEPATH "Path to casablanca include dir") + + include_directories ( +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 506680d04..d8bd404a6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -13,7 +13,7 @@ include_directories ( + include + "${CPPREST_INCLUDE_DIR}") + +-find_library(CPPREST_SO NAMES "cpprest" PATHS ${CPPREST_LIB_DIR} REQUIRED) ++find_package(cpprestsdk REQUIRED) + + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin) +diff --git a/src/signalrclient/CMakeLists.txt b/src/signalrclient/CMakeLists.txt +index db141eb..c4306d8 100644 +--- a/src/signalrclient/CMakeLists.txt ++++ b/src/signalrclient/CMakeLists.txt +@@ -32,7 +32,7 @@ add_definitions(-DUNICODE -D_UNICODE) + + add_library (signalrclient ${SOURCES}) + +-target_link_libraries(signalrclient ${CPPREST_SO}) ++target_link_libraries(signalrclient cpprestsdk::cpprest OpenSSL::SSL OpenSSL::Crypto) + + install( + TARGETS signalrclient diff --git a/vcpkg/ports/signalrclient/CONTROL b/vcpkg/ports/signalrclient/CONTROL new file mode 100644 index 0000000..7b9d0bc --- /dev/null +++ b/vcpkg/ports/signalrclient/CONTROL @@ -0,0 +1,5 @@ +Source: signalrclient +Version: 1.0.0-beta1-9 +Build-Depends: cpprestsdk[default-features,websockets], openssl +Homepage: https://github.com/aspnet/SignalR-Client-Cpp +Description: C++ client for SignalR. diff --git a/vcpkg/ports/signalrclient/portfile.cmake b/vcpkg/ports/signalrclient/portfile.cmake new file mode 100644 index 0000000..39f1992 --- /dev/null +++ b/vcpkg/ports/signalrclient/portfile.cmake @@ -0,0 +1,32 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO SignalR/SignalR-Client-Cpp + REF 1.0.0-beta1 + SHA512 b38f6f946f1499080071949cbcf574405118f9acfb469441e5b5b0df3e5f0d277a83b30e0d613dc5e54732b9071e3273dac1ee65129f994d5a60eef0e45bdf6c + HEAD_REF master + PATCHES + 0001_cmake.patch + 0002_fix-compile-error.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DCPPREST_SO=${CURRENT_INSTALLED_DIR}/debug/lib/cpprest_2_10d.lib + OPTIONS_RELEASE + -DCPPREST_SO=${CURRENT_INSTALLED_DIR}/lib/cpprest_2_10.lib + OPTIONS + -DCPPREST_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include + -DDISABLE_TESTS=ON +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# copy license +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/signalrclient) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/signalrclient/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/signalrclient/copyright) diff --git a/vcpkg/ports/sigslot/CONTROL b/vcpkg/ports/sigslot/CONTROL new file mode 100644 index 0000000..e785404 --- /dev/null +++ b/vcpkg/ports/sigslot/CONTROL @@ -0,0 +1,3 @@ +Source: sigslot +Version: 1.0.0-3 +Description: Portable C++ type-safe, thread-safe signal/slot library for ISO C++, Unix/BSD/Linux and Win32. Sigslot allows C++ code to use the signal/slot paradigm made popular by, for example, Qt. diff --git a/vcpkg/ports/sigslot/LICENSE b/vcpkg/ports/sigslot/LICENSE new file mode 100644 index 0000000..d706712 --- /dev/null +++ b/vcpkg/ports/sigslot/LICENSE @@ -0,0 +1,8 @@ +License +The sigslot library has been placed in the public domain. This means that you are free to use it however you like. + +The author takes no responsibility or liability of any kind for any use that you may make of this library. + +If you screw up, it's your fault. + +If the library screws up, you got it for free, so you should have tested it better - it's still your responsibility. \ No newline at end of file diff --git a/vcpkg/ports/sigslot/portfile.cmake b/vcpkg/ports/sigslot/portfile.cmake new file mode 100644 index 0000000..d841668 --- /dev/null +++ b/vcpkg/ports/sigslot/portfile.cmake @@ -0,0 +1,11 @@ +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO sigslot/sigslot + REF 1.0.0 + FILENAME "sigslot-1-0-0.tar.gz" + SHA512 3f16f94a653e49934ec1d695eac02234d15b203f42e9fa88723ee582a84670a645a89e5b87afe2378fa7a9eaef054049255bf3bd531ab1d6825a042641ba8906 +) + +file(INSTALL ${SOURCE_PATH}/sigslot.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${CURRENT_PORT_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/simage/CONTROL b/vcpkg/ports/simage/CONTROL new file mode 100644 index 0000000..f88751b --- /dev/null +++ b/vcpkg/ports/simage/CONTROL @@ -0,0 +1,5 @@ +Source: simage +Version: 1.8.0 +Description: Image file format library abstraction layer +Build-Depends: giflib (linux|uwp), libjpeg-turbo (linux|uwp), libpng (linux|uwp), libsndfile (linux|uwp), tiff (linux|uwp), libvorbis (linux|uwp) +Homepage: https://github.com/coin3d/simage diff --git a/vcpkg/ports/simage/disable-cpackd.patch b/vcpkg/ports/simage/disable-cpackd.patch new file mode 100644 index 0000000..6fd227a --- /dev/null +++ b/vcpkg/ports/simage/disable-cpackd.patch @@ -0,0 +1,10 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 775037a..e3deb01 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -627,4 +627,4 @@ install(EXPORT ${PROJECT_NAME} + + # ############################################################################ + # New CPACK section, please see the README file inside cpack.d directory. +-add_subdirectory(cpack.d) ++#add_subdirectory(cpack.d) diff --git a/vcpkg/ports/simage/disable-examples.patch b/vcpkg/ports/simage/disable-examples.patch new file mode 100644 index 0000000..dc9236c --- /dev/null +++ b/vcpkg/ports/simage/disable-examples.patch @@ -0,0 +1,44 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 775037a..fbd81b2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -482,23 +489,23 @@ endif() + # Build examples + # ############################################################################ + +-set(SIMAGE_EXAMPLE_SOURCE +- ${CMAKE_CURRENT_SOURCE_DIR}/examples/audio2raw.c +- ${CMAKE_CURRENT_SOURCE_DIR}/examples/img2avi.c ++#set(SIMAGE_EXAMPLE_SOURCE ++# ${CMAKE_CURRENT_SOURCE_DIR}/examples/audio2raw.c ++# ${CMAKE_CURRENT_SOURCE_DIR}/examples/img2avi.c + # ${CMAKE_CURRENT_SOURCE_DIR}/examples/mpeg2enc.cpp # requires Coin to build +- ${CMAKE_CURRENT_SOURCE_DIR}/examples/simage-convert.c +- ${CMAKE_CURRENT_SOURCE_DIR}/examples/simage-read-line-test.c +-) +- +-foreach(_source ${SIMAGE_EXAMPLE_SOURCE}) +- get_filename_component(_example ${_source} NAME_WE) +- add_executable(${_example} ${_source}) +- target_compile_definitions(${_example} PRIVATE _CRT_NONSTDC_NO_DEPRECATE _CRT_SECURE_NO_DEPRECATE _CRT_SECURE_NO_WARNINGS _USE_MATH_DEFINES) +- target_link_libraries(${_example} simage) +- if(UNIX) +- target_link_libraries(${_example} m) +- endif() +-endforeach() ++# ${CMAKE_CURRENT_SOURCE_DIR}/examples/simage-convert.c ++# ${CMAKE_CURRENT_SOURCE_DIR}/examples/simage-read-line-test.c ++#) ++ ++#foreach(_source ${SIMAGE_EXAMPLE_SOURCE}) ++# get_filename_component(_example ${_source} NAME_WE) ++# add_executable(${_example} ${_source}) ++# target_compile_definitions(${_example} PRIVATE _CRT_NONSTDC_NO_DEPRECATE _CRT_SECURE_NO_DEPRECATE _CRT_SECURE_NO_WARNINGS _USE_MATH_DEFINES) ++# target_link_libraries(${_example} simage) ++# if(UNIX) ++# target_link_libraries(${_example} m) ++# endif() ++#endforeach() + + # ############################################################################ + # Build tests diff --git a/vcpkg/ports/simage/disable-tests.patch b/vcpkg/ports/simage/disable-tests.patch new file mode 100644 index 0000000..4679022 --- /dev/null +++ b/vcpkg/ports/simage/disable-tests.patch @@ -0,0 +1,49 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 775037a..b82734a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -504,25 +511,25 @@ endforeach() + # Build tests + # ############################################################################ + +-enable_testing() +- +-add_executable(loaders tests/loaders.c) +-target_link_libraries(loaders simage) +-target_compile_definitions(loaders PRIVATE _CRT_NONSTDC_NO_DEPRECATE _CRT_SECURE_NO_DEPRECATE _CRT_SECURE_NO_WARNINGS _USE_MATH_DEFINES) +-if(UNIX) +- target_link_libraries(loaders m) +-endif() +- +-add_test( +- loaders +- ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/loaders +- ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.gif +- ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.jpg +- ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.png +- ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.rgb +- ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.tga +- ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.tif +-) ++#enable_testing() ++ ++#add_executable(loaders tests/loaders.c) ++#target_link_libraries(loaders simage) ++#target_compile_definitions(loaders PRIVATE _CRT_NONSTDC_NO_DEPRECATE _CRT_SECURE_NO_DEPRECATE _CRT_SECURE_NO_WARNINGS _USE_MATH_DEFINES) ++#if(UNIX) ++# target_link_libraries(loaders m) ++#endif() ++ ++#add_test( ++# loaders ++# ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/loaders ++# ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.gif ++# ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.jpg ++# ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.png ++# ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.rgb ++# ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.tga ++# ${CMAKE_CURRENT_SOURCE_DIR}/tests/img.tif ++#) + + # Add a target to generate API documentation with Doxygen + if(SIMAGE_BUILD_DOCUMENTATION) diff --git a/vcpkg/ports/simage/link-flac-library.patch b/vcpkg/ports/simage/link-flac-library.patch new file mode 100644 index 0000000..7b8e35a --- /dev/null +++ b/vcpkg/ports/simage/link-flac-library.patch @@ -0,0 +1,60 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 775037a..2de9b9f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -108,6 +108,10 @@ find_package(Jasper) + find_package(OggVorbis) + find_package(Sndfile) + ++if(SNDFILE_FOUND) ++ find_package(FLAC) ++endif() ++ + if(APPLE AND SIMAGE_USE_CGIMAGE) + check_cxx_source_compiles(" + #include +@@ -467,6 +471,9 @@ endif() + if(SNDFILE_FOUND) + target_include_directories(simage PRIVATE ${SNDFILE_INCLUDE_DIRS}) + target_link_libraries(simage PRIVATE ${SNDFILE_LIBRARIES}) ++ if(FLAC_FOUND) ++ target_link_libraries(simage PRIVATE ${FLAC_LIBRARIES}) ++ endif() + endif() + + if(TIFF_FOUND) +diff --git a/FindFLAC.cmake b/FindFLAC.cmake +new file mode 100644 +index 0000000..ce40a11 +--- /dev/null ++++ b/FindFLAC.cmake +@@ -0,0 +1,29 @@ ++include(FindPackageHandleStandardArgs) ++ ++find_path(FLAC_INCLUDE_DIR FLAC/all.h) ++ ++mark_as_advanced(FLAC_INCLUDE_DIR) ++ ++set(FLAC_INCLUDE_DIRS ${FLAC_INCLUDE_DIR}) ++ ++find_library(FLAC_LIBRARY NAMES FLAC) ++ ++mark_as_advanced( ++ FLAC_INCLUDE_DIR ++ FLAC_LIBRARY ++) ++ ++set(FLAC_LIBRARIES ${FLAC_LIBRARY}) ++ ++find_package_handle_standard_args( ++ FLAC ++ DEFAULT_MSG ++ FLAC_INCLUDE_DIRS ++ FLAC_LIBRARIES ++) ++ ++if(FLAC_FOUND AND NOT TARGET FLAC::FLAC) ++ add_library(FLAC::FLAC UNKNOWN IMPORTED) ++ set_target_properties(FLAC::FLAC PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${FLAC_INCLUDE_DIR}") ++ set_property(TARGET FLAC::FLAC APPEND PROPERTY IMPORTED_LOCATION "${FLAC_LIBRARY}") ++endif() diff --git a/vcpkg/ports/simage/link-math-library.patch b/vcpkg/ports/simage/link-math-library.patch new file mode 100644 index 0000000..4ffe98b --- /dev/null +++ b/vcpkg/ports/simage/link-math-library.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4a978dd..e7abd57 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -454,6 +454,9 @@ endif() + if(PNG_FOUND) + target_include_directories(simage PRIVATE ${PNG_INCLUDE_DIR}) + target_link_libraries(simage PRIVATE ${PNG_LIBRARIES}) ++ if(UNIX) ++ target_link_libraries(simage PRIVATE m) ++ endif() + endif() + + if(SIMAGE_QIMAGE_SUPPORT) diff --git a/vcpkg/ports/simage/link-ogg-library.patch b/vcpkg/ports/simage/link-ogg-library.patch new file mode 100644 index 0000000..7527544 --- /dev/null +++ b/vcpkg/ports/simage/link-ogg-library.patch @@ -0,0 +1,16 @@ +diff --git a/FindOggVorbis.cmake b/FindOggVorbis.cmake +index a33e63e..7e2708b 100644 +--- a/FindOggVorbis.cmake ++++ b/FindOggVorbis.cmake +@@ -28,10 +28,10 @@ mark_as_advanced( + + set( + OGGVORBIS_LIBRARIES +- ${OGG_LIBRARY} + ${VORBIS_LIBRARY} + ${VORBISFILE_LIBRARY} + ${VORBISENC_LIBRARY} ++ ${OGG_LIBRARY} + ) + + find_package_handle_standard_args( diff --git a/vcpkg/ports/simage/portfile.cmake b/vcpkg/ports/simage/portfile.cmake new file mode 100644 index 0000000..59fbf45 --- /dev/null +++ b/vcpkg/ports/simage/portfile.cmake @@ -0,0 +1,48 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Coin3D/simage + REF simage-1.8.0 + SHA512 7070c845fc72094a97b1253d23a5f60f90e71dc6ed968c9c7da67e05660b05245a807fbdf0f592a1d459c7c3b725783c55f59f867182b11cb9ec40741d7ad58c + HEAD_REF master + PATCHES + disable-cpackd.patch + disable-examples.patch + disable-tests.patch + link-flac-library.patch + link-math-library.patch + link-ogg-library.patch + potentially-uninitialized-local-pointer-variable.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(SIMAGE_BUILD_SHARED_LIBS OFF) +else() + set(SIMAGE_BUILD_SHARED_LIBS ON) +endif() + +if(VCPKG_TARGET_IS_UWP) + set(SIMAGE_USE_AVIENC OFF) + set(SIMAGE_USE_GDIPLUS OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSIMAGE_BUILD_SHARED_LIBS=${SIMAGE_BUILD_SHARED_LIBS} + -DSIMAGE_USE_AVIENC=${SIMAGE_USE_AVIENC} + -DSIMAGE_USE_GDIPLUS=${SIMAGE_USE_GDIPLUS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/simage-1.8.0) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/vcpkg/ports/simage/potentially-uninitialized-local-pointer-variable.patch b/vcpkg/ports/simage/potentially-uninitialized-local-pointer-variable.patch new file mode 100644 index 0000000..1b74a2f --- /dev/null +++ b/vcpkg/ports/simage/potentially-uninitialized-local-pointer-variable.patch @@ -0,0 +1,26 @@ +diff --git a/examples/img2avi.c b/examples/img2avi.c +index 7a5ca96..d0ee057 100644 +--- a/examples/img2avi.c ++++ b/examples/img2avi.c +@@ -30,7 +30,7 @@ int main(int argc, char *argv[]) + int first; + int width; + int height; +- s_movie * movie; ++ s_movie * movie = NULL; + s_params * params; + s_image *image; + char formatbuf[20]; +diff --git a/mpeg2enc/putvlc.c b/mpeg2enc/putvlc.c +index 6a84fbd..b373fea 100644 +--- a/mpeg2enc/putvlc.c ++++ b/mpeg2enc/putvlc.c +@@ -103,7 +103,7 @@ void + simpeg_encode_putAC(simpeg_encode_context * context,int run, int signed_level, int vlcformat) + { + int level, len; +- VLCtable *ptab; ++ VLCtable *ptab = NULL; + + level = (signed_level<0) ? -signed_level : signed_level; /* abs(signed_level) */ + diff --git a/vcpkg/ports/simde/CONTROL b/vcpkg/ports/simde/CONTROL new file mode 100644 index 0000000..7f70f49 --- /dev/null +++ b/vcpkg/ports/simde/CONTROL @@ -0,0 +1,3 @@ +Source: simde +Version: 2019-06-05 +Description: Implementations of SIMD instruction sets for systems which don't natively support them diff --git a/vcpkg/ports/simde/portfile.cmake b/vcpkg/ports/simde/portfile.cmake new file mode 100644 index 0000000..e79594a --- /dev/null +++ b/vcpkg/ports/simde/portfile.cmake @@ -0,0 +1,16 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nemequ/simde + REF 6e3ba90605361069cf3422c44242c79171b87275 + SHA512 d62ff40882c2b3a17c900104b36ae77137cbb77917d409cba1c0693fdcf317a38ff3184deaaecca0ef31d88393bebf0102a8ab57a23ad5d0cee2d3e5fe799f6a + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/simde DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/simdjson/portfile.cmake b/vcpkg/ports/simdjson/portfile.cmake new file mode 100644 index 0000000..6770577 --- /dev/null +++ b/vcpkg/ports/simdjson/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO simdjson/simdjson + REF 5d355f1a8b584519ed39256c3be949ef7f8b0dbd # v0.5.0 + HEAD_REF master + SHA512 ad92e4bafa596baf878c0c4945828b00cdb431e719dd6aaa1752dcb4b12c9ce13061105a7ca206b160865b3d1c724d675cd3c347691c81972d64804846dfa2a9 +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SIMDJSON_BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_TARGET_ARCHITECTURE}" "arm64" SIMDJSON_IMPLEMENTATION_ARM64) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSIMDJSON_BUILD_STATIC=${SIMDJSON_BUILD_STATIC} + -DSIMDJSON_IMPLEMENTATION_ARM64=${SIMDJSON_IMPLEMENTATION_ARM64} + -DSIMDJSON_JUST_LIBRARY=ON + -DSIMDJSON_GOOGLE_BENCHMARKS=OFF + -DSIMDJSON_COMPETITION=OFF + -DSIMDJSON_SANITIZE=OFF # issue 10145, pr 11495 +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/simdjson/vcpkg.json b/vcpkg/ports/simdjson/vcpkg.json new file mode 100644 index 0000000..34f749a --- /dev/null +++ b/vcpkg/ports/simdjson/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "simdjson", + "version-string": "0.5.0", + "description": "A extremely fast JSON library that can parse gigabytes of JSON per second", + "homepage": "https://simdjson.org/", + "license": "Apache-2.0" +} diff --git a/vcpkg/ports/simple-fft/CONTROL b/vcpkg/ports/simple-fft/CONTROL new file mode 100644 index 0000000..6595558 --- /dev/null +++ b/vcpkg/ports/simple-fft/CONTROL @@ -0,0 +1,4 @@ +Source: simple-fft +Version: 2020-06-14 +Homepage: https://github.com/d1vanov/Simple-FFT +Description: Header-only C++ library implementing fast Fourier transform of 1D, 2D and 3D data diff --git a/vcpkg/ports/simple-fft/portfile.cmake b/vcpkg/ports/simple-fft/portfile.cmake new file mode 100644 index 0000000..81f33e0 --- /dev/null +++ b/vcpkg/ports/simple-fft/portfile.cmake @@ -0,0 +1,20 @@ +# Header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO d1vanov/Simple-FFT + REF a0cc843ff36d33ad09c08674b9503614742ad0b9 + SHA512 6fbbda1f172505f6627f97ae671d12ff282844ca50e6e6c8016f78ee333c32ce6d17763837c281e47f10cfc277cb1f67394169f6bbf137b09885c1a053d6d342 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/include/simple_fft/check_fft.hpp + ${SOURCE_PATH}/include/simple_fft/copy_array.hpp + ${SOURCE_PATH}/include/simple_fft/error_handling.hpp + ${SOURCE_PATH}/include/simple_fft/fft.h + ${SOURCE_PATH}/include/simple_fft/fft.hpp + ${SOURCE_PATH}/include/simple_fft/fft_impl.hpp + ${SOURCE_PATH}/include/simple_fft/fft_settings.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include/simple_fft +) + +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/simpleini/CONTROL b/vcpkg/ports/simpleini/CONTROL new file mode 100644 index 0000000..0b51f52 --- /dev/null +++ b/vcpkg/ports/simpleini/CONTROL @@ -0,0 +1,4 @@ +Source: simpleini +Version: 2018-08-31-4 +Homepage: https://github.com/brofield/simpleini +Description: Cross-platform C++ library providing a simple API to read and write INI-style configuration files diff --git a/vcpkg/ports/simpleini/portfile.cmake b/vcpkg/ports/simpleini/portfile.cmake new file mode 100644 index 0000000..46f1d25 --- /dev/null +++ b/vcpkg/ports/simpleini/portfile.cmake @@ -0,0 +1,20 @@ +# header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO brofield/simpleini + REF fe082fa81f4a55ddceb55056622136be616b3c6f + SHA512 9ba3fc0e5d4d426a7943a6783f3e66203d3b822a9ac6bc2b261e877f70e099495ad22e03fd6ad3dd7aab422192701b2b450ace750ebd3bc6b4e6266c6d15184d + HEAD_REF master +) + +# Install codes +set(SIMPLEINI_SOURCE ${SOURCE_PATH}/SimpleIni.h + ${SOURCE_PATH}/ConvertUTF.h + ${SOURCE_PATH}/ConvertUTF.c +) + +file(INSTALL ${SIMPLEINI_SOURCE} DESTINATION ${CURRENT_PACKAGES_DIR}/include) +# Install sample +file(INSTALL ${SOURCE_PATH}/snippets.cpp DESTINATION ${CURRENT_PACKAGES_DIR}/share/sample) + +file(INSTALL ${SOURCE_PATH}/LICENCE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/skia/CONTROL b/vcpkg/ports/skia/CONTROL new file mode 100644 index 0000000..e06605d --- /dev/null +++ b/vcpkg/ports/skia/CONTROL @@ -0,0 +1,12 @@ +Source: skia +Version: 2020-05-18 +Port-Version: 4 +Homepage: https://skia.org +Description: Skia is an open source 2D graphics library which provides common APIs that work across a variety of hardware and software platforms. + It serves as the graphics engine for Google Chrome and Chrome OS, Android, Mozilla Firefox and Firefox OS, and many other products. + Skia is sponsored and managed by Google, but is available for use by anyone under the BSD Free Software License. While engineering of the core components is done by the Skia development team, we consider contributions from any source. +Supports: x64 & (osx | windows) +Build-Depends: expat, freetype[core], icu, harfbuzz[icu], libjpeg-turbo, libpng, libwebp, zlib + +Feature: metal +Description: metal support for skia diff --git a/vcpkg/ports/skia/add-missing-tuple.patch b/vcpkg/ports/skia/add-missing-tuple.patch new file mode 100644 index 0000000..e33d44e --- /dev/null +++ b/vcpkg/ports/skia/add-missing-tuple.patch @@ -0,0 +1,12 @@ +diff --git a/include/private/SkPathRef.h b/include/private/SkPathRef.h +index 7afe4f9..502f83e 100644 +--- a/include/private/SkPathRef.h ++++ b/include/private/SkPathRef.h +@@ -21,6 +21,7 @@ + + #include + #include ++#include + + class SkRBuffer; + class SkWBuffer; diff --git a/vcpkg/ports/skia/expat.gn b/vcpkg/ports/skia/expat.gn new file mode 100644 index 0000000..7e0e09b --- /dev/null +++ b/vcpkg/ports/skia/expat.gn @@ -0,0 +1,10 @@ +import("../third_party.gni") + +system("expat") { + include_dirs = @_INCLUDES@ + if(is_debug) { + libs = @_LIBS_DBG@ + } else { + libs = @_LIBS_REL@ + } +} diff --git a/vcpkg/ports/skia/freetype2.gn b/vcpkg/ports/skia/freetype2.gn new file mode 100644 index 0000000..5ea73b7 --- /dev/null +++ b/vcpkg/ports/skia/freetype2.gn @@ -0,0 +1,10 @@ +import("../third_party.gni") + +system("freetype2") { + include_dirs = @_INCLUDES@ + if(is_debug) { + libs = @_LIBS_DBG@ + } else { + libs = @_LIBS_REL@ + } +} diff --git a/vcpkg/ports/skia/harfbuzz.gn b/vcpkg/ports/skia/harfbuzz.gn new file mode 100644 index 0000000..5095f6d --- /dev/null +++ b/vcpkg/ports/skia/harfbuzz.gn @@ -0,0 +1,10 @@ +import("../third_party.gni") + +system("harfbuzz") { + include_dirs = @_INCLUDES@ + if(is_debug) { + libs = @_LIBS_DBG@ + } else { + libs = @_LIBS_REL@ + } +} diff --git a/vcpkg/ports/skia/icu.gn b/vcpkg/ports/skia/icu.gn new file mode 100644 index 0000000..3da2479 --- /dev/null +++ b/vcpkg/ports/skia/icu.gn @@ -0,0 +1,11 @@ +import("../third_party.gni") + +system("icu") { + include_dirs = @_INCLUDES@ + if(is_debug) { + libs = @_LIBS_DBG@ + } else { + libs = @_LIBS_REL@ + } + defines = @_DEFINITIONS@ +} diff --git a/vcpkg/ports/skia/libjpeg-turbo.gn b/vcpkg/ports/skia/libjpeg-turbo.gn new file mode 100644 index 0000000..92669bb --- /dev/null +++ b/vcpkg/ports/skia/libjpeg-turbo.gn @@ -0,0 +1,10 @@ +import("../third_party.gni") + +system("libjpeg") { + include_dirs = @_INCLUDES@ + if(is_debug) { + libs = @_LIBS_DBG@ + } else { + libs = @_LIBS_REL@ + } +} diff --git a/vcpkg/ports/skia/libpng.gn b/vcpkg/ports/skia/libpng.gn new file mode 100644 index 0000000..0867ef8 --- /dev/null +++ b/vcpkg/ports/skia/libpng.gn @@ -0,0 +1,10 @@ +import("../third_party.gni") + +system("libpng") { + include_dirs = @_INCLUDES@ + if(is_debug) { + libs = @_LIBS_DBG@ + } else { + libs = @_LIBS_REL@ + } +} diff --git a/vcpkg/ports/skia/libwebp.gn b/vcpkg/ports/skia/libwebp.gn new file mode 100644 index 0000000..bdcaffe --- /dev/null +++ b/vcpkg/ports/skia/libwebp.gn @@ -0,0 +1,10 @@ +import("../third_party.gni") + +system("libwebp") { + include_dirs = @_INCLUDES@ + if(is_debug) { + libs = @_LIBS_DBG@ + } else { + libs = @_LIBS_REL@ + } +} diff --git a/vcpkg/ports/skia/piex.gn b/vcpkg/ports/skia/piex.gn new file mode 100644 index 0000000..1d5a237 --- /dev/null +++ b/vcpkg/ports/skia/piex.gn @@ -0,0 +1,10 @@ +import("../third_party.gni") + +system("piex") { + include_dirs = @_INCLUDES@ + if(is_debug) { + libs = @_LIBS_DBG@ + } else { + libs = @_LIBS_REL@ + } +} diff --git a/vcpkg/ports/skia/portfile.cmake b/vcpkg/ports/skia/portfile.cmake new file mode 100644 index 0000000..30feaf0 --- /dev/null +++ b/vcpkg/ports/skia/portfile.cmake @@ -0,0 +1,216 @@ +vcpkg_fail_port_install( + ON_ARCH "x86" "arm" "arm64" + ON_TARGET "UWP" "LINUX" "ANDROID" "FREEBSD") + +vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH + URL https://skia.googlesource.com/skia.git + REF fb0b35fed5580d49392df7ce9374551b348fffbf + PATCHES add-missing-tuple.patch +) + +function(checkout_in_path PATH URL REF) + if(EXISTS "${PATH}") + return() + endif() + + vcpkg_from_git( + OUT_SOURCE_PATH DEP_SOURCE_PATH + URL "${URL}" + REF "${REF}" + ) + file(RENAME "${DEP_SOURCE_PATH}" "${PATH}") + file(REMOVE_RECURSE "${DEP_SOURCE_PATH}") +endfunction() + +set(EXTERNALS "${SOURCE_PATH}/third_party/externals") +file(MAKE_DIRECTORY "${EXTERNALS}") + +# these following aren't available in vcpkg +checkout_in_path("${EXTERNALS}/sfntly" + "https://github.com/googlefonts/sfntly" + "b55ff303ea2f9e26702b514cf6a3196a2e3e2974" +) +checkout_in_path("${EXTERNALS}/dng_sdk" + "https://android.googlesource.com/platform/external/dng_sdk" + "c8d0c9b1d16bfda56f15165d39e0ffa360a11123" +) +checkout_in_path("${EXTERNALS}/libgifcodec" + "https://skia.googlesource.com/libgifcodec" + "d06d2a6d42baf6c0c91cacc28df2542a911d05fe" +) +checkout_in_path("${EXTERNALS}/piex" + "https://android.googlesource.com/platform/external/piex" + "bb217acdca1cc0c16b704669dd6f91a1b509c406" +) + +# turn a CMake list into a GN list of quoted items +# "a;b;c" -> ["a","b","c"] +function(cmake_to_gn_list OUTPUT_ INPUT_) + if(NOT INPUT_) + set(${OUTPUT_} "[]" PARENT_SCOPE) + else() + string(REPLACE ";" "\",\"" TEMP "${INPUT_}") + set(${OUTPUT_} "[\"${TEMP}\"]" PARENT_SCOPE) + endif() +endfunction() + +# multiple libraries with multiple names may be passed as +# "libA,libA2;libB,libB2,libB3;..." +function(find_libraries RESOLVED LIBRARY_NAMES PATHS) + set(_RESOLVED "") + foreach(_LIB_GROUP ${LIBRARY_NAMES}) + string(REPLACE "," ";" _LIB_GROUP_NAMES "${_LIB_GROUP}") + unset(_LIB CACHE) + find_library(_LIB NAMES ${_LIB_GROUP_NAMES} + PATHS "${PATHS}" + NO_DEFAULT_PATH) + + if(_LIB MATCHES "-NOTFOUND") + message(FATAL_ERROR "Could not find library with names: ${_LIB_GROUP_NAMES}") + endif() + + list(APPEND _RESOLVED "${_LIB}") + endforeach() + set(${RESOLVED} "${_RESOLVED}" PARENT_SCOPE) +endfunction() + +# For each .gn file in the current list directory, configure and install at +# the corresponding directory to replace Skia dependencies with ones from vcpkg. +function(replace_skia_dep NAME INCLUDES LIBS_DBG LIBS_REL DEFINITIONS) + list(TRANSFORM INCLUDES PREPEND "${CURRENT_INSTALLED_DIR}") + cmake_to_gn_list(_INCLUDES "${INCLUDES}") + + find_libraries(_LIBS_DBG "${LIBS_DBG}" "${CURRENT_INSTALLED_DIR}/debug/lib") + cmake_to_gn_list(_LIBS_DBG "${_LIBS_DBG}") + + find_libraries(_LIBS_REL "${LIBS_REL}" "${CURRENT_INSTALLED_DIR}/lib") + cmake_to_gn_list(_LIBS_REL "${_LIBS_REL}") + + cmake_to_gn_list(_DEFINITIONS "${DEFINITIONS}") + + set(OUT_FILE "${SOURCE_PATH}/third_party/${NAME}/BUILD.gn") + file(REMOVE "${OUT_FILE}") + configure_file("${CMAKE_CURRENT_LIST_DIR}/${NAME}.gn" "${OUT_FILE}" @ONLY) +endfunction() + +set(_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include") + +replace_skia_dep(expat "/include" "libexpat,libexpatd,libexpatdMD" "libexpat,libexpatMD" "") +replace_skia_dep(freetype2 "/include" "freetype,freetyped" "freetype" "") +replace_skia_dep(harfbuzz "/include/harfbuzz" "harfbuzz-icu" "harfbuzz-icu" "") +replace_skia_dep(icu "/include" "icuuc,icuucd" "icuuc" "U_USING_ICU_NAMESPACE=0") +replace_skia_dep(libjpeg-turbo "/include" "jpeg,jpegd;turbojpeg,turbojpegd" "jpeg;turbojpeg" "") +replace_skia_dep(libpng "/include" "libpng16,libpng16d" "libpng16" "") +replace_skia_dep(libwebp "/include" + "webp,webpd;webpdemux,webpdemuxd;webpdecoder,webpdecoderd;libwebpmux,libwebpmuxd" + "webp;webpdemux;webpdecoder;libwebpmux" "") +replace_skia_dep(zlib "/include" "z,zlib,zlibd" "z,zlib" "") + +set(OPTIONS "\ +skia_use_lua=false \ +skia_enable_tools=false \ +skia_enable_spirv_validation=false") + +# used for passing feature-specific definitions to the config file +set(SKIA_PUBLIC_DEFINITIONS "") + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(OPTIONS "${OPTIONS} is_component_build=true") +else() + set(OPTIONS "${OPTIONS} is_component_build=false") +endif() + +if("metal" IN_LIST FEATURES) + set(OPTIONS "${OPTIONS} skia_use_metal=true") + list(APPEND SKIA_PUBLIC_DEFINITIONS SK_METAL) +endif() + +set(OPTIONS_REL "${OPTIONS} is_official_build=true") +set(OPTIONS_DBG "${OPTIONS} is_debug=true") + +if(CMAKE_HOST_WIN32) + # Load toolchains + if(NOT VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/windows.cmake") + endif() + include("${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") + + # turn a space delimited string into a gn list: + # "a b c" -> ["a","b","c"] + function(to_gn_list OUTPUT_ INPUT_) + string(STRIP "${INPUT_}" TEMP) + string(REPLACE " " " " TEMP "${TEMP}") + string(REPLACE " " "\",\"" TEMP "${TEMP}") + set(${OUTPUT_} "[\"${TEMP}\"]" PARENT_SCOPE) + endfunction() + + to_gn_list(SKIA_C_FLAGS_DBG "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_DEBUG}") + to_gn_list(SKIA_C_FLAGS_REL "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}") + + to_gn_list(SKIA_CXX_FLAGS_DBG "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}") + to_gn_list(SKIA_CXX_FLAGS_REL "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}") + + set(OPTIONS_DBG "${OPTIONS_DBG} extra_cflags_c=${SKIA_C_FLAGS_DBG} \ + extra_cflags_cc=${SKIA_CXX_FLAGS_DBG}") + + set(OPTIONS_REL "${OPTIONS_REL} extra_cflags_c=${SKIA_C_FLAGS_REL} \ + extra_cflags_cc=${SKIA_CXX_FLAGS_REL}") + + set(WIN_VC "$ENV{VCINSTALLDIR}") + string(REPLACE "\\VC\\" "\\VC" WIN_VC "${WIN_VC}") + set(OPTIONS_DBG "${OPTIONS_DBG} win_vc=\"${WIN_VC}\"") + set(OPTIONS_REL "${OPTIONS_REL} win_vc=\"${WIN_VC}\"") + +endif() + +vcpkg_configure_gn( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS_DEBUG "${OPTIONS_DBG}" + OPTIONS_RELEASE "${OPTIONS_REL}" +) + +vcpkg_install_gn( + SOURCE_PATH "${SOURCE_PATH}" + TARGETS ":skia" +) + +message(STATUS "Installing: ${CURRENT_PACKAGES_DIR}/include/${PORT}") +file(COPY "${SOURCE_PATH}/include" + DESTINATION "${CURRENT_PACKAGES_DIR}/include") +file(RENAME "${CURRENT_PACKAGES_DIR}/include/include" + "${CURRENT_PACKAGES_DIR}/include/${PORT}") +file(GLOB_RECURSE SKIA_INCLUDE_FILES LIST_DIRECTORIES false + "${CURRENT_PACKAGES_DIR}/include/${PORT}/*") +foreach(file_ ${SKIA_INCLUDE_FILES}) + vcpkg_replace_string("${file_}" "#include \"include/" "#include \"${PORT}/") +endforeach() + +# get a list of library dependencies for TARGET +function(gn_desc_target_libs OUTPUT BUILD_DIR TARGET) + vcpkg_find_acquire_program(GN) + execute_process( + COMMAND ${GN} desc "${BUILD_DIR}" "${TARGET}" libs + WORKING_DIRECTORY "${SOURCE_PATH}" + OUTPUT_VARIABLE OUTPUT_ + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + string(REGEX REPLACE "\n|(\r\n)" ";" OUTPUT_ "${OUTPUT_}") + set(${OUTPUT} ${OUTPUT_} PARENT_SCOPE) +endfunction() + +# skiaConfig.cmake.in input variables +gn_desc_target_libs(SKIA_DEP_DBG + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + //:skia) +gn_desc_target_libs(SKIA_DEP_REL + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + //:skia) + +configure_file("${CMAKE_CURRENT_LIST_DIR}/skiaConfig.cmake.in" + "${CURRENT_PACKAGES_DIR}/share/skia/skiaConfig.cmake" @ONLY) + +vcpkg_copy_pdbs() +file(INSTALL "${SOURCE_PATH}/LICENSE" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright) diff --git a/vcpkg/ports/skia/skiaConfig.cmake.in b/vcpkg/ports/skia/skiaConfig.cmake.in new file mode 100644 index 0000000..8ce8c10 --- /dev/null +++ b/vcpkg/ports/skia/skiaConfig.cmake.in @@ -0,0 +1,85 @@ +add_library(skia INTERFACE) +add_library(skia::skia ALIAS skia) +set(SKIA_DEP_DBG @SKIA_DEP_DBG@) +set(SKIA_DEP_REL @SKIA_DEP_REL@) + +set(SKIA_LIBRARY_NAME_DBG @SKIA_LIBRARY_NAME_DBG@) +set(SKIA_LIBRARY_NAME_REL @SKIA_LIBRARY_NAME_REL@) +set(SKIA_LIBRARY_IMPLIB_DBG @SKIA_LIBRARY_IMPLIB_DBG@) +set(SKIA_LIBRARY_IMPLIB_REL @SKIA_LIBRARY_IMPLIB_REL@) + +set(SKIA_PUBLIC_DEFINITIONS @SKIA_PUBLIC_DEFINITIONS@) + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +find_library(SKIA_LIB NAMES skia skia.dll) +target_link_libraries(skia INTERFACE "${SKIA_LIB}") + +function(set_dependencies CONFIG LIBRARIES) + foreach(LIB ${LIBRARIES}) + if(LIB MATCHES "^/") + if(WIN32) + string(SUBSTRING "${LIB}" 1 -1 LIB) + endif() + target_link_libraries(skia INTERFACE + "$<$:${LIB}>") + else() + string(REGEX REPLACE "\\.framework" "" LIB ${LIB}) + string(REGEX REPLACE "[^a-zA-Z]" "_" LIB_NAME ${LIB}) + string(TOUPPER ${LIB_NAME} LIB_NAME) + set(LIB_NAME SKIA_${LIB_NAME}_LIBRARY) + find_library(${LIB_NAME} ${LIB}) + target_link_libraries(skia INTERFACE + "$<$:${${LIB_NAME}}>") + endif() + endforeach() +endfunction() + +set_dependencies(Debug "${SKIA_DEP_DBG}") +set_dependencies(Release "${SKIA_DEP_REL}") + +set(SKIA_DEFINITIONS_DBG + _CRT_SECURE_NO_WARNINGS + _HAS_EXCEPTIONS=0 + WIN32_LEAN_AND_MEAN + NOMINMAX + SK_GL + SK_ENABLE_DUMP_GPU + SK_SUPPORT_PDF + SK_HAS_JPEG_LIBRARY + SK_USE_LIBGIFCODEC + SK_HAS_HEIF_LIBRARY + SK_HAS_PNG_LIBRARY + SK_ENABLE_SKSL_INTERPRETER + SK_HAS_WEBP_LIBRARY + SK_XML + SKIA_DLL + SK_SUPPORT_ATLAS_TEXT=1) + +set(SKIA_DEFINITIONS_REL + _CRT_SECURE_NO_WARNINGS + _HAS_EXCEPTIONS=0 + WIN32_LEAN_AND_MEAN + NOMINMAX + NDEBUG + SK_GL + SK_SUPPORT_PDF + SK_HAS_JPEG_LIBRARY + SK_USE_LIBGIFCODEC + SK_HAS_PNG_LIBRARY + SK_HAS_WEBP_LIBRARY + SK_XML + SKIA_DLL) + +target_compile_definitions(skia INTERFACE + $<$:${SKIA_DEFINITIONS_DBG}> + $<$:${SKIA_DEFINITIONS_REL}>) + +target_include_directories(skia INTERFACE ${_IMPORT_PREFIX}/include) +target_compile_definitions(skia INTERFACE ${SKIA_PUBLIC_DEFINITIONS}) diff --git a/vcpkg/ports/skia/zlib.gn b/vcpkg/ports/skia/zlib.gn new file mode 100644 index 0000000..5c2bc8f --- /dev/null +++ b/vcpkg/ports/skia/zlib.gn @@ -0,0 +1,10 @@ +import("../third_party.gni") + +system("zlib") { + include_dirs = @_INCLUDES@ + if(is_debug) { + libs = @_LIBS_DBG@ + } else { + libs = @_LIBS_REL@ + } +} diff --git a/vcpkg/ports/skyr-url/CONTROL b/vcpkg/ports/skyr-url/CONTROL new file mode 100644 index 0000000..97ab09e --- /dev/null +++ b/vcpkg/ports/skyr-url/CONTROL @@ -0,0 +1,5 @@ +Source: skyr-url +Version: 1.13.0 +Build-Depends: tl-expected, range-v3, nlohmann-json +Homepage: https://github.com/cpp-netlib/url +Description: A C++ library that implements the WhatWG URL specification diff --git a/vcpkg/ports/skyr-url/portfile.cmake b/vcpkg/ports/skyr-url/portfile.cmake new file mode 100644 index 0000000..0bd2a40 --- /dev/null +++ b/vcpkg/ports/skyr-url/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cpp-netlib/url + REF v1.13.0 + SHA512 187898f5c0d2919095b293c7fbb6757d7b1391c9c79ccc3467ffc8b76a10685fd91faf9e9b8b0c0c21d0a9aecb3a50d52f2eab52823e770fc10ecd6ed874a748 + HEAD_REF main +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -Dskyr_BUILD_TESTS=OFF + -Dskyr_BUILD_DOCS=OFF + -Dskyr_BUILD_EXAMPLES=OFF + -Dskyr_WARNINGS_AS_ERRORS=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/slikenet/CONTROL b/vcpkg/ports/slikenet/CONTROL new file mode 100644 index 0000000..5753ce9 --- /dev/null +++ b/vcpkg/ports/slikenet/CONTROL @@ -0,0 +1,6 @@ +Source: slikenet +Version: 2019-10-22-2 +Homepage: https://github.com/SLikeSoft/SLikeNet +Description: SLikeNetT is an Open Source/Free Software cross-platform network engine written in C++ and specifially designed for games (and applications which have comparable requirements on a network engine like games) building upon the discontinued RakNet network engine which had more than 13 years of active development. +Build-Depends: openssl +Supports: !uwp diff --git a/vcpkg/ports/slikenet/fix-install.patch b/vcpkg/ports/slikenet/fix-install.patch new file mode 100644 index 0000000..008dd1e --- /dev/null +++ b/vcpkg/ports/slikenet/fix-install.patch @@ -0,0 +1,51 @@ +diff --git a/Lib/DLL/CMakeLists.txt b/Lib/DLL/CMakeLists.txt +index 7f6453d..48f9562 100644 +--- a/Lib/DLL/CMakeLists.txt ++++ b/Lib/DLL/CMakeLists.txt +@@ -50,6 +50,7 @@ ELSE(WIN32 AND NOT UNIX) + ENDIF(WIN32 AND NOT UNIX) + + target_link_libraries(SLikeNetDLL ${SLIKENET_LIBRARY_LIBS}) ++if(0) + IF(NOT WIN32 OR UNIX) + configure_file(../../slikenet-config-version.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/slikenet-config-version.cmake @ONLY) + +@@ -60,3 +61,12 @@ IF(NOT WIN32 OR UNIX) + INSTALL(FILES ../../slikenet-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/slikenet-config-version.cmake DESTINATION lib/slikenet-${SLikeNet_VERSION}) + INSTALL(EXPORT SLikeNetDLL DESTINATION lib/slikenet-${SLikeNet_VERSION}) + ENDIF(NOT WIN32 OR UNIX) ++endif() ++ ++install(TARGETS SLikeNetDLL ++ EXPORT SLikeNetDLL ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) ++INSTALL(FILES ${ALL_HEADER_SRCS} DESTINATION include/slikenet) ++install(EXPORT SLikeNetDLL FILE slikenetTargets.cmake DESTINATION share/slikenet) +diff --git a/Lib/LibStatic/CMakeLists.txt b/Lib/LibStatic/CMakeLists.txt +index f936fa5..a5dcc4f 100644 +--- a/Lib/LibStatic/CMakeLists.txt ++++ b/Lib/LibStatic/CMakeLists.txt +@@ -50,6 +50,8 @@ ELSE(WIN32 AND NOT UNIX) + ENDIF(WIN32 AND NOT UNIX) + + target_link_libraries(SLikeNetLibStatic ${SLIKENET_LIBRARY_LIBS}) ++ ++if(0) + IF(WIN32 AND NOT UNIX) + IF(NOT ${CMAKE_GENERATOR} STREQUAL "MSYS Makefiles") + set_target_properties(SLikeNetLibStatic PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB:\"LIBCD.lib LIBCMTD.lib MSVCRT.lib\"" ) +@@ -64,3 +66,12 @@ ELSE(WIN32 AND NOT UNIX) + INSTALL(FILES ../../slikenet-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/slikenet-config-version.cmake DESTINATION lib/slikenet-${SLikeNet_VERSION}) + INSTALL(EXPORT SLikeNetLibStatic FILE slikenet.cmake DESTINATION lib/slikenet-${SLikeNet_VERSION}) + ENDIF(WIN32 AND NOT UNIX) ++endif() ++ ++INSTALL(TARGETS SLikeNetLibStatic ++ EXPORT SLikeNetLibStatic ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) ++INSTALL(FILES ${ALL_HEADER_SRCS} DESTINATION include/slikenet) ++INSTALL(EXPORT SLikeNetLibStatic FILE slikenetTargets.cmake DESTINATION share/slikenet) diff --git a/vcpkg/ports/slikenet/portfile.cmake b/vcpkg/ports/slikenet/portfile.cmake new file mode 100644 index 0000000..c321f65 --- /dev/null +++ b/vcpkg/ports/slikenet/portfile.cmake @@ -0,0 +1,43 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO SLikeSoft/SLikeNet + REF cca394f05e9e9e3e315a85539e648f267d3f2fcc + SHA512 410954bda5a7be309eb71c3078f8ea67ff21aae2ce923f01db77b09265969f1350afb45b90194118bfad274f0a36a2d3bbc38d86a15507fdfc4bc8edc4a0204c + HEAD_REF master + PATCHES + fix-install.patch +) +#Uses an outdated OpenSSL version and is in an experimental namespace any way. As such we delete it here +file(REMOVE_RECURSE "${SOURCE_PATH}/Source/src/crypto" "${SOURCE_PATH}/Source/include/slikenet/crypto") + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(SLIKENET_ENABLE_STATIC TRUE) + set(SLIKENET_ENABLE_DLL FALSE) +else() + set(SLIKENET_ENABLE_STATIC FALSE) + set(SLIKENET_ENABLE_DLL TRUE) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSLIKENET_ENABLE_DLL=${SLIKENET_ENABLE_DLL} + -DSLIKENET_ENABLE_STATIC=${SLIKENET_ENABLE_STATIC} + -DSLIKENET_ENABLE_SAMPLES=FALSE +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/slikenet) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +configure_file("${CMAKE_CURRENT_LIST_DIR}/slikenet-config.cmake" "${CURRENT_PACKAGES_DIR}/share/slikenet/slikenet-config.cmake" COPYONLY) +configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/slikenet/vcpkg-cmake-wrapper.cmake" COPYONLY) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/slikenet/slikenet-config.cmake b/vcpkg/ports/slikenet/slikenet-config.cmake new file mode 100644 index 0000000..be47336 --- /dev/null +++ b/vcpkg/ports/slikenet/slikenet-config.cmake @@ -0,0 +1,4 @@ +include(CMakeFindDependencyMacro) +find_dependency(OpenSSL) +set(slikenet_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/../../include") +include(${CMAKE_CURRENT_LIST_DIR}/slikenetTargets.cmake) diff --git a/vcpkg/ports/slikenet/usage b/vcpkg/ports/slikenet/usage new file mode 100644 index 0000000..6f98ae5 --- /dev/null +++ b/vcpkg/ports/slikenet/usage @@ -0,0 +1,4 @@ +The package slikenet provides CMake targets: + + find_package(slikenet CONFIG REQUIRED) + target_link_libraries(main PRIVATE SLikeNet) \ No newline at end of file diff --git a/vcpkg/ports/slikenet/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/slikenet/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..237389f --- /dev/null +++ b/vcpkg/ports/slikenet/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,11 @@ +_find_package(${ARGS}) + +if(NOT TARGET SLikeNet AND TARGET SLikeNetDLL) +add_library(SLikeNet INTERFACE IMPORTED) +set_target_properties(SLikeNet PROPERTIES INTERFACE_LINK_LIBRARIES SLikeNetDLL) +endif() + +if(NOT TARGET SLikeNet AND TARGET SLikeNetLibStatic) +add_library(SLikeNet INTERFACE IMPORTED) +set_target_properties(SLikeNet PROPERTIES INTERFACE_LINK_LIBRARIES SLikeNetLibStatic) +endif() diff --git a/vcpkg/ports/smpeg2/001-correct-sdl-headers-dir.patch b/vcpkg/ports/smpeg2/001-correct-sdl-headers-dir.patch new file mode 100644 index 0000000..6cbcb6b --- /dev/null +++ b/vcpkg/ports/smpeg2/001-correct-sdl-headers-dir.patch @@ -0,0 +1,17 @@ +diff --git a/smpeg.h b/smpeg.h +index 6bc2dbd..d12c8f8 100644 +--- a/smpeg.h ++++ b/smpeg.h +@@ -22,9 +22,9 @@ + #ifndef _SMPEG_H_ + #define _SMPEG_H_ + +-#include "SDL.h" +-#include "SDL_mutex.h" +-#include "SDL_audio.h" ++#include "SDL2/SDL.h" ++#include "SDL2/SDL_mutex.h" ++#include "SDL2/SDL_audio.h" + #include "MPEGframe.h" + + #ifdef __cplusplus diff --git a/vcpkg/ports/smpeg2/002-use-SDL2-headers.patch b/vcpkg/ports/smpeg2/002-use-SDL2-headers.patch new file mode 100644 index 0000000..9737c6d --- /dev/null +++ b/vcpkg/ports/smpeg2/002-use-SDL2-headers.patch @@ -0,0 +1,229 @@ +diff --git a/MPEG.cpp b/MPEG.cpp +index 1645965..9d44166 100644 +--- a/MPEG.cpp ++++ b/MPEG.cpp +@@ -1,4 +1,4 @@ +-#include "SDL.h" ++#include "SDL2/SDL.h" + + #include "MPEG.h" + +diff --git a/MPEG.h b/MPEG.h +index ca04260..d0b0d55 100644 +--- a/MPEG.h ++++ b/MPEG.h +@@ -28,7 +28,7 @@ + #include + #include + +-#include "SDL.h" ++#include "SDL2/SDL.h" + + #include "MPEGerror.h" + #include "MPEGstream.h" +diff --git a/MPEGaction.h b/MPEGaction.h +index f9da3a3..ea0b94f 100644 +--- a/MPEGaction.h ++++ b/MPEGaction.h +@@ -24,7 +24,7 @@ + #ifndef _MPEGACTION_H_ + #define _MPEGACTION_H_ + +-#include "SDL.h" ++#include "SDL2/SDL.h" + #include "MPEGframe.h" + + typedef enum { +diff --git a/MPEGaudio.h b/MPEGaudio.h +index 3f315d2..2ec4377 100644 +--- a/MPEGaudio.h ++++ b/MPEGaudio.h +@@ -24,7 +24,7 @@ + #ifndef _MPEGAUDIO_H_ + #define _MPEGAUDIO_H_ + +-#include "SDL.h" ++#include "SDL2/SDL.h" + #include "MPEGerror.h" + #include "MPEGaction.h" + +diff --git a/MPEGlist.h b/MPEGlist.h +index 3a58a5f..fe0dbac 100644 +--- a/MPEGlist.h ++++ b/MPEGlist.h +@@ -6,7 +6,7 @@ + #ifndef _MPEGLIST_H_ + #define _MPEGLIST_H_ + +-#include "SDL.h" ++#include "SDL2/SDL.h" + + class MPEGlist { + public: +diff --git a/MPEGring.cpp b/MPEGring.cpp +index 6d9dabb..0350d54 100644 +--- a/MPEGring.cpp ++++ b/MPEGring.cpp +@@ -23,7 +23,7 @@ + #include + #include + +-#include "SDL_timer.h" ++#include "SDL2/SDL_timer.h" + + #include "MPEGring.h" + +diff --git a/MPEGring.h b/MPEGring.h +index 89172ac..550fbcc 100644 +--- a/MPEGring.h ++++ b/MPEGring.h +@@ -24,8 +24,8 @@ + #ifndef _MPEGRING_H + #define _MPEGRING_H + +-#include "SDL_types.h" +-#include "SDL_thread.h" ++#include "SDL2/SDL_types.h" ++#include "SDL2/SDL_thread.h" + + class MPEG_ring { + public: +diff --git a/MPEGstream.h b/MPEGstream.h +index b96c631..50e0c3a 100644 +--- a/MPEGstream.h ++++ b/MPEGstream.h +@@ -22,7 +22,7 @@ + #ifndef _MPEGSTREAM_H_ + #define _MPEGSTREAM_H_ + +-#include "SDL_types.h" ++#include "SDL2/SDL_types.h" + #include "MPEGerror.h" + #include "MPEGvideo.h" + #include "MPEGaudio.h" +diff --git a/MPEGsystem.h b/MPEGsystem.h +index 823b679..28454b3 100644 +--- a/MPEGsystem.h ++++ b/MPEGsystem.h +@@ -6,8 +6,8 @@ + #define _MPEGSYSTEM_H_ + #define USE_SYSTEM_TIMESTAMP + +-#include "SDL.h" +-#include "SDL_thread.h" ++#include "SDL2/SDL.h" ++#include "SDL2/SDL_thread.h" + #include "MPEGerror.h" + + class MPEGstream; +diff --git a/MPEGvideo.h b/MPEGvideo.h +index 12da092..9f1ed43 100644 +--- a/MPEGvideo.h ++++ b/MPEGvideo.h +@@ -24,8 +24,8 @@ + #ifndef _MPEGVIDEO_H_ + #define _MPEGVIDEO_H_ + +-#include "SDL.h" +-#include "SDL_thread.h" ++#include "SDL2/SDL.h" ++#include "SDL2/SDL_thread.h" + #include "MPEGerror.h" + #include "MPEGaction.h" + +diff --git a/README.SDL_mixer b/README.SDL_mixer +index c01b575..5cacc4f 100644 +--- a/README.SDL_mixer ++++ b/README.SDL_mixer +@@ -5,7 +5,7 @@ You can have the SDL mixer library mix audio from a movie by hooking into + the SDL mixer music hooks: + + #include "smpeg.h" +-#include "SDL_mixer.h" ++#include "SDL2/SDL_mixer.h" + + .. set up the mixer audio ... + +diff --git a/acinclude/sdl2.m4 b/acinclude/sdl2.m4 +index 93bc4b0..776ad42 100644 +--- a/acinclude/sdl2.m4 ++++ b/acinclude/sdl2.m4 +@@ -84,7 +84,7 @@ dnl + #include + #include + #include +-#include "SDL.h" ++#include "SDL2/SDL.h" + + char* + my_strdup (char *str) +@@ -167,7 +167,7 @@ int main (int argc, char *argv[]) + LIBS="$LIBS $SDL_LIBS" + AC_TRY_LINK([ + #include +-#include "SDL.h" ++#include "SDL2/SDL.h" + + int main(int argc, char *argv[]) + { return 0; } +diff --git a/configure b/configure +index 4ac7e60..ee1d934 100644 +--- a/configure ++++ b/configure +@@ -15270,7 +15270,7 @@ else + #include + #include + #include +-#include "SDL.h" ++#include "SDL2/SDL.h" + + char* + my_strdup (char *str) +@@ -15367,7 +15367,7 @@ $as_echo "no" >&6; } + /* end confdefs.h. */ + + #include +-#include "SDL.h" ++#include "SDL2/SDL.h" + + int main(int argc, char *argv[]) + { return 0; } +diff --git a/video/gdith.cpp b/video/gdith.cpp +index c56da96..53ba388 100644 +--- a/video/gdith.cpp ++++ b/video/gdith.cpp +@@ -52,7 +52,7 @@ + #include "video.h" + #include "proto.h" + #include "dither.h" +-#include "SDL_timer.h" ++#include "SDL2/SDL_timer.h" + + #ifdef __STDC__ + #include +diff --git a/video/readfile.cpp b/video/readfile.cpp +index eb71194..a19e66d 100644 +--- a/video/readfile.cpp ++++ b/video/readfile.cpp +@@ -56,7 +56,7 @@ + #include + #include + +-#include "SDL_endian.h" ++#include "SDL2/SDL_endian.h" + #include "video.h" + #include "proto.h" + #include "util.h" +diff --git a/video/video.h b/video/video.h +index 96de89b..a35095b 100644 +--- a/video/video.h ++++ b/video/video.h +@@ -400,7 +400,7 @@ extern unsigned int cacheMiss[8][8]; + #define __SCO__ 1 + #endif + +-#include "SDL_endian.h" ++#include "SDL2/SDL_endian.h" + #if SDL_BYTEORDER == SDL_BIG_ENDIAN + #ifdef LITTLE_ENDIAN_ARCHITECTURE + #undef LITTLE_ENDIAN_ARCHITECTURE diff --git a/vcpkg/ports/smpeg2/003-fix-double-ptr-to-int-comparison.patch b/vcpkg/ports/smpeg2/003-fix-double-ptr-to-int-comparison.patch new file mode 100644 index 0000000..31128a8 --- /dev/null +++ b/vcpkg/ports/smpeg2/003-fix-double-ptr-to-int-comparison.patch @@ -0,0 +1,13 @@ +diff --git a/audio/mpegtoraw.cpp b/audio/mpegtoraw.cpp +index 493c870..a4eabdc 100644 +--- a/audio/mpegtoraw.cpp ++++ b/audio/mpegtoraw.cpp +@@ -448,7 +448,7 @@ int Play_MPEGaudio(MPEGaudio *audio, Uint8 *stream, int len) + if (audio->timestamp[0] != -1){ + double timeshift = audio->Time() - audio->timestamp[0]; + double correction = 0; +- assert(audio->timestamp >= 0); ++ assert(audio->timestamp[0] >= 0); + if (fabs(timeshift) > 1.0){ + correction = -timeshift; + #ifdef DEBUG_TIMESTAMP_SYNC diff --git a/vcpkg/ports/smpeg2/CMakeLists.txt b/vcpkg/ports/smpeg2/CMakeLists.txt new file mode 100644 index 0000000..b0e284b --- /dev/null +++ b/vcpkg/ports/smpeg2/CMakeLists.txt @@ -0,0 +1,65 @@ +cmake_minimum_required(VERSION 2.6) +project(SMPEG2 CXX) + +find_path(SDL_INCLUDE_DIR SDL2/SDL.h) +find_package(SDL2 CONFIG REQUIRED) + +include_directories(${SDL_INCLUDE_DIR}) +include_directories(${SDL_INCLUDE_DIR}/SDL2) +include_directories(${CMAKE_SOURCE_DIR}) + +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) +endif() +add_definitions(-DNOCONTROLS -DTHREADED_AUDIO) + +# some c++ code just assumes memset is available +file(WRITE ${CMAKE_SOURCE_DIR}/declare_memset.h "#include \n") +add_definitions(-FIdeclare_memset.h) + +add_library(smpeg2 + audio/bitwindow.cpp + audio/filter.cpp + audio/filter_2.cpp + audio/hufftable.cpp + audio/mpeglayer1.cpp + audio/mpeglayer2.cpp + audio/mpeglayer3.cpp + audio/mpegtable.cpp + audio/mpegtoraw.cpp + audio/MPEGaudio.cpp + video/decoders.cpp + video/floatdct.cpp + video/gdith.cpp + video/jrevdct.cpp + video/motionvec.cpp + video/parseblock.cpp + video/readfile.cpp + video/util.cpp + video/video.cpp + video/MPEGvideo.cpp + MPEG.cpp + MPEGlist.cpp + MPEGring.cpp + MPEGstream.cpp + MPEGsystem.cpp + smpeg.cpp) + +set_target_properties(smpeg2 PROPERTIES DEFINE_SYMBOL SDL2_EXPORTS) +if(BUILD_SHARED_LIBS) + target_link_libraries(smpeg2 SDL2::SDL2) +else() + target_link_libraries(smpeg2 SDL2::SDL2-static) +endif() + +install(TARGETS smpeg2 + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + +if(NOT DEFINED SMPEG_SKIP_HEADERS) + install(FILES smpeg.h MPEGframe.h DESTINATION include) +endif() + +message(STATUS "Link-time dependencies:") +message(STATUS " " ${SDL_LIBRARY}) diff --git a/vcpkg/ports/smpeg2/CONTROL b/vcpkg/ports/smpeg2/CONTROL new file mode 100644 index 0000000..3a76128 --- /dev/null +++ b/vcpkg/ports/smpeg2/CONTROL @@ -0,0 +1,5 @@ +Source: smpeg2 +Version: 2.0.0-6 +Homepage: https://www.libsdl.org/projects/smpeg/ +Description: SDL MPEG Player Library +Build-Depends: sdl2 diff --git a/vcpkg/ports/smpeg2/portfile.cmake b/vcpkg/ports/smpeg2/portfile.cmake new file mode 100644 index 0000000..a7c6e9b --- /dev/null +++ b/vcpkg/ports/smpeg2/portfile.cmake @@ -0,0 +1,33 @@ + +include(vcpkg_common_functions) + +set(VERSION 2.0.0) +vcpkg_download_distfile(ARCHIVE + URLS "https://www.libsdl.org/projects/smpeg/release/smpeg2-${VERSION}.tar.gz" + FILENAME "smpeg2-${VERSION}.tar.gz" + SHA512 80a779d01e7aa76778ef6ceea8041537db9e4b354df413214c4413c875cb98551891cef98fa0f057cc6a3222e4983da9ae65b86bdad2f87f9e2a6751837e2baf +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${VERSION} + PATCHES + "001-correct-sdl-headers-dir.patch" + "002-use-SDL2-headers.patch" + "003-fix-double-ptr-to-int-comparison.patch" +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DSMPEG_SKIP_HEADERS=ON) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/smpeg2) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/smpeg2/COPYING ${CURRENT_PACKAGES_DIR}/share/smpeg2/copyright) diff --git a/vcpkg/ports/snappy/CONTROL b/vcpkg/ports/snappy/CONTROL new file mode 100644 index 0000000..add6e6c --- /dev/null +++ b/vcpkg/ports/snappy/CONTROL @@ -0,0 +1,4 @@ +Source: snappy +Version: 1.1.8 +Homepage: https://github.com/google/snappy +Description: A fast compressor/decompressor. diff --git a/vcpkg/ports/snappy/portfile.cmake b/vcpkg/ports/snappy/portfile.cmake new file mode 100644 index 0000000..0a9ea94 --- /dev/null +++ b/vcpkg/ports/snappy/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/snappy + REF 537f4ad6240e586970fe554614542e9717df7902 # 1.1.8 + SHA512 555d3b69a6759592736cbaae8f41654f0cf14e8be693b5dde37640191e53daec189f895872557b173e905d10681ef502f3e6ed8566811add963ffef96ce4016d + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSNAPPY_BUILD_TESTS=OFF + -DCMAKE_DEBUG_POSTFIX=d) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Snappy) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/snappy) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/snappy/COPYING ${CURRENT_PACKAGES_DIR}/share/snappy/copyright) diff --git a/vcpkg/ports/sndfile/CONTROL b/vcpkg/ports/sndfile/CONTROL new file mode 100644 index 0000000..fb01b64 --- /dev/null +++ b/vcpkg/ports/sndfile/CONTROL @@ -0,0 +1,9 @@ +Source: sndfile +Version: 0 +Description:x Library to read, write and manipulate many soundfile types. +Build-Depends: libsndfile +Default-Features: external-libs + +Feature: external-libs +Description: Support Ogg Vorbis and FLAC audio files +Build-Depends: libsndfile[external-libs] diff --git a/vcpkg/ports/sndfile/portfile.cmake b/vcpkg/ports/sndfile/portfile.cmake new file mode 100644 index 0000000..d3910bb --- /dev/null +++ b/vcpkg/ports/sndfile/portfile.cmake @@ -0,0 +1,3 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +message(WARNING "The sndfile port is deprecated, using libsndfile instead") diff --git a/vcpkg/ports/snowhouse/CONTROL b/vcpkg/ports/snowhouse/CONTROL new file mode 100644 index 0000000..c5535f8 --- /dev/null +++ b/vcpkg/ports/snowhouse/CONTROL @@ -0,0 +1,3 @@ +Source: snowhouse +Version: 4.0.0 +Description: An assertion library for C++ diff --git a/vcpkg/ports/snowhouse/portfile.cmake b/vcpkg/ports/snowhouse/portfile.cmake new file mode 100644 index 0000000..4823366 --- /dev/null +++ b/vcpkg/ports/snowhouse/portfile.cmake @@ -0,0 +1,14 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO banditcpp/snowhouse + REF cd0761b31a5bb2810a5a250a1951224257f596ce # v4.0.0 + SHA512 1038e786abe062bc58937980fea272992e9ab831f5b246ce959e7d335442e8b5b1bc614cdea2f08f7956b22d0b7ef52573bd4f216a1db0efa15b0fefad9b9cae + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/include/snowhouse DESTINATION ${CURRENT_PACKAGES_DIR}/include/ FILES_MATCHING PATTERN *.h) + +file(COPY ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/snowhouse) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/snowhouse/LICENSE_1_0.txt ${CURRENT_PACKAGES_DIR}/share/snowhouse/copyright) \ No newline at end of file diff --git a/vcpkg/ports/so5extra/CONTROL b/vcpkg/ports/so5extra/CONTROL new file mode 100644 index 0000000..db1624a --- /dev/null +++ b/vcpkg/ports/so5extra/CONTROL @@ -0,0 +1,5 @@ +Source: so5extra +Version: 1.4.1 +Homepage: https://github.com/Stiffstream/so5extra +Description: A set of additional tools for SObjectizer framework. +Build-Depends: sobjectizer diff --git a/vcpkg/ports/so5extra/portfile.cmake b/vcpkg/ports/so5extra/portfile.cmake new file mode 100644 index 0000000..c48ca98 --- /dev/null +++ b/vcpkg/ports/so5extra/portfile.cmake @@ -0,0 +1,21 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO stiffstream/so5extra + REF e03e025b08921c76a650656019a04cf7500620be # v.1.4.1 + SHA512 0ee7b98d713cf5c8789f3275f96e7e92b33cb8d3c44fd98752c11cab07914cb3b104ccaf346e714afd43e115ef854dccb4d04ea37d9063b20947aa0d514dac52 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/dev/so_5_extra + PREFER_NINJA + OPTIONS + -DSO5EXTRA_INSTALL=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/so5extra) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/so5extra RENAME copyright) + diff --git a/vcpkg/ports/sobjectizer/CONTROL b/vcpkg/ports/sobjectizer/CONTROL new file mode 100644 index 0000000..c6c54d8 --- /dev/null +++ b/vcpkg/ports/sobjectizer/CONTROL @@ -0,0 +1,4 @@ +Source: sobjectizer +Version: 5.7.1 +Homepage: https://github.com/Stiffstream/sobjectizer +Description: SObjectizer is a C++ in-process message dispatching framework with implementation of Actor Model, Publish-Subscribe Model and CSP-like channels. diff --git a/vcpkg/ports/sobjectizer/portfile.cmake b/vcpkg/ports/sobjectizer/portfile.cmake new file mode 100644 index 0000000..abda8a5 --- /dev/null +++ b/vcpkg/ports/sobjectizer/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO stiffstream/sobjectizer + REF 64e9c1062ef1bbbb67de44426f2eac55d4f5241c # v.5.7.1 + SHA512 aa8f1bc982f1212fd040bb68c52d824f518104f1e5ce6af884ec57ffb70334148765fd44c5f883458e7733cf28ace380c349e68d8dbe19564374ab0afb0b969a +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(SOBJECTIZER_BUILD_STATIC ON) + set(SOBJECTIZER_BUILD_SHARED OFF) +else() + set(SOBJECTIZER_BUILD_STATIC OFF) + set(SOBJECTIZER_BUILD_SHARED ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/dev + PREFER_NINJA + OPTIONS + -DSOBJECTIZER_BUILD_STATIC=${SOBJECTIZER_BUILD_STATIC} + -DSOBJECTIZER_BUILD_SHARED=${SOBJECTIZER_BUILD_SHARED} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sobjectizer) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + diff --git a/vcpkg/ports/soci/CONTROL b/vcpkg/ports/soci/CONTROL new file mode 100644 index 0000000..96c8f48 --- /dev/null +++ b/vcpkg/ports/soci/CONTROL @@ -0,0 +1,19 @@ +Source: soci +Version: 4.0.0-1 +Homepage: https://github.com/SOCI/soci +Description: SOCI database access library + +Feature: boost +Build-Depends: boost-date-time, boost-fusion, boost-optional, boost-preprocessor, boost-tuple +Description: Integration with Boost + +Feature: sqlite3 +Build-Depends: sqlite3 +Description: Build sqlite3 backend + +Feature: postgresql +Build-Depends: libpq +Description: Build postgresql backend + +Feature: odbc +Description: Build odbc backend diff --git a/vcpkg/ports/soci/portfile.cmake b/vcpkg/ports/soci/portfile.cmake new file mode 100644 index 0000000..3bfc519 --- /dev/null +++ b/vcpkg/ports/soci/portfile.cmake @@ -0,0 +1,54 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO SOCI/soci + REF 3742c894ab8ba5fd51b6a156980e8b34db0f3063 #version 4.0.0 commit on 2019.11.10 + SHA512 27950230d104bdc0ab8e439a69c59d1b157df373adc863a22c8332b8bb896c2a6e3028f8343bb36b42bf9ab2a2312375e20cbdeca7f497f0bb1424a4733f0c9c + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SOCI_DYNAMIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SOCI_STATIC) + +# Handle features +set(_COMPONENT_FLAGS "") +foreach(_feature IN LISTS ALL_FEATURES) + # Uppercase the feature name and replace "-" with "_" + string(TOUPPER "${_feature}" _FEATURE) + string(REPLACE "-" "_" _FEATURE "${_FEATURE}") + + # Turn "-DWITH_*=" ON or OFF depending on whether the feature + # is in the list. + if(_feature IN_LIST FEATURES) + list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=ON") + else() + list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=OFF") + endif() +endforeach() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSOCI_TESTS=OFF + -DSOCI_CXX11=ON + -DSOCI_LIBDIR:STRING=lib # This is to always have output in the lib folder and not lib64 for 64-bit builds + -DLIBDIR:STRING=lib + -DSOCI_STATIC=${SOCI_STATIC} + -DSOCI_SHARED=${SOCI_DYNAMIC} + ${_COMPONENT_FLAGS} + + -DWITH_MYSQL=OFF + -DWITH_ORACLE=OFF + -DWITH_FIREBIRD=OFF + -DWITH_DB2=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/SOCI) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/socket-io-client/CONTROL b/vcpkg/ports/socket-io-client/CONTROL new file mode 100644 index 0000000..bd7b036 --- /dev/null +++ b/vcpkg/ports/socket-io-client/CONTROL @@ -0,0 +1,4 @@ +Source: socket-io-client +Version: 1.6.1-1 +Description: C++11 implementation of Socket.IO client +Build-Depends: boost, rapidjson, websocketpp diff --git a/vcpkg/ports/socket-io-client/fix-install.patch b/vcpkg/ports/socket-io-client/fix-install.patch new file mode 100644 index 0000000..2c9cc0e --- /dev/null +++ b/vcpkg/ports/socket-io-client/fix-install.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8c2fad3..3f322b2 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -72,13 +72,11 @@ list(APPEND TARGET_LIBRARIES sioclient_tls) + endif() + + install(FILES ${ALL_HEADERS} +- DESTINATION "${CMAKE_CURRENT_LIST_DIR}/build/include" ++ DESTINATION include + ) + + install(TARGETS ${TARGET_LIBRARIES} +- DESTINATION "${CMAKE_CURRENT_LIST_DIR}/build/lib/${CMAKE_BUILD_TYPE}" +-) +- +-install(FILES ${Boost_LIBRARIES} +- DESTINATION "${CMAKE_CURRENT_LIST_DIR}/build/lib/${CMAKE_BUILD_TYPE}" ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib + ) diff --git a/vcpkg/ports/socket-io-client/portfile.cmake b/vcpkg/ports/socket-io-client/portfile.cmake new file mode 100644 index 0000000..c7d33d2 --- /dev/null +++ b/vcpkg/ports/socket-io-client/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO socketio/socket.io-client-cpp + REF 1.6.1 + SHA512 01c9c172e58a16b25af07c6bde593507792726aca28a9b202ed9531d51cd7e77c7e7d536102e50265d66de96e9708616075902dfdcfc72983758755381bad707 + HEAD_REF master + PATCHES fix-install.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/socket-io-client/copyright COPYONLY) diff --git a/vcpkg/ports/sockpp/CONTROL b/vcpkg/ports/sockpp/CONTROL new file mode 100644 index 0000000..90ad9f7 --- /dev/null +++ b/vcpkg/ports/sockpp/CONTROL @@ -0,0 +1,5 @@ +Source: sockpp +Version: 0.7 +Homepage: https://github.com/fpagliughi/sockpp +Description: Simple, modern, C++ socket library. This is a fairly low-level C++ wrapper around the Berkeley sockets library using socket, acceptor, and connector classes that are familiar concepts from other languages. +Supports: !uwp diff --git a/vcpkg/ports/sockpp/portfile.cmake b/vcpkg/ports/sockpp/portfile.cmake new file mode 100644 index 0000000..19b4348 --- /dev/null +++ b/vcpkg/ports/sockpp/portfile.cmake @@ -0,0 +1,32 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fpagliughi/sockpp + REF d8c86c01db43542a06ad05424da037f6b9892253 + SHA512 9b7ae3fea08bfd4a0d6479d7fbcc24da9101476c4f8e4a684138c7d974827cdf374282a4641e58f03c08aeb83f2c1856fc3c5193e5847fb4b3d9182c1c396087 + HEAD_REF master +) + +vcpkg_replace_string(${SOURCE_PATH}/CMakeLists.txt "\${SOCKPP}-static" "\${SOCKPP}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSOCKPP_BUILD_SHARED=OFF + -DSOCKPP_BUILD_STATIC=ON + -DSOCKPP_BUILD_DOCUMENTATION=OFF + -DSOCKPP_BUILD_EXAMPLES=OFF + -DSOCKPP_BUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${CURRENT_PORT_DIR}/sockppConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/sockpp/sockppConfig.cmake b/vcpkg/ports/sockpp/sockppConfig.cmake new file mode 100644 index 0000000..840b96e --- /dev/null +++ b/vcpkg/ports/sockpp/sockppConfig.cmake @@ -0,0 +1,23 @@ +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE) +if(NOT SOCKPP_FIND_COMPONENTS) + set(SOCKPP_FIND_COMPONENTS sockpp) + if(SOCKPP_FIND_REQUIRED) + set(SOCKPP_FIND_REQUIRED_sockpp TRUE) + endif() + set(SOCKPP_FOUND TRUE) +endif() + +set(SOCKPP_INCLUDE_DIRS ${_DIR}/include) +set(SOCKPP_LIBRARIES) +if (EXISTS ${_DIR}/lib/libsockpp.a) + list(APPEND SOCKPP_LIBRARIES optimized ${_DIR}/lib/libsockpp.a) +endif() +if (EXISTS ${_DIR}/debug/lib/libsockpp.a) + list(APPEND SOCKPP_LIBRARIES debug ${_DIR}/debug/lib/libsockpp.a) +endif() +if (EXISTS ${_DIR}/lib/sockpp.lib) + list(APPEND SOCKPP_LIBRARIES optimized ${_DIR}/lib/sockpp.lib) +endif() +if (EXISTS ${_DIR}/debug/lib/sockpp.lib) + list(APPEND SOCKPP_LIBRARIES debug ${_DIR}/debug/lib/sockpp.lib) +endif() diff --git a/vcpkg/ports/sockpp/usage b/vcpkg/ports/sockpp/usage new file mode 100644 index 0000000..5cfb06d --- /dev/null +++ b/vcpkg/ports/sockpp/usage @@ -0,0 +1,5 @@ +The package sockpp provides CMake integration: + + find_package(sockpp CONFIG REQUIRED) + target_include_directories(main PRIVATE ${SOCKPP_INCLUDE_DIRS}) + target_link_libraries(main PRIVATE ${SOCKPP_LIBRARIES}) diff --git a/vcpkg/ports/soem/CONTROL b/vcpkg/ports/soem/CONTROL new file mode 100644 index 0000000..f3194a5 --- /dev/null +++ b/vcpkg/ports/soem/CONTROL @@ -0,0 +1,5 @@ +Source: soem +Version: 1.4.0 +Homepage: https://github.com/OpenEtherCATsociety/SOEM +Description: Simple Open Source EtherCAT Master +Build-Depends: winpcap (windows) diff --git a/vcpkg/ports/soem/portfile.cmake b/vcpkg/ports/soem/portfile.cmake new file mode 100644 index 0000000..3eccfeb --- /dev/null +++ b/vcpkg/ports/soem/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_fail_port_install(ON_TARGET "UWP") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OpenEtherCATsociety/SOEM + REF abbf0d42e38d6cfbaa4c1e9e8e07ace651c386fd #v1.4.0 + SHA512 2967775c6746bb63becea5eb12f136c184bbf874e1e5e8753374bfc212ec9cefbf1159350e79627b978af3562d261b61c50f38936a425c4d9c70598a1d136817 + HEAD_REF master + PATCHES + winpcap.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/bin + ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/soem/winpcap.patch b/vcpkg/ports/soem/winpcap.patch new file mode 100644 index 0000000..215226e --- /dev/null +++ b/vcpkg/ports/soem/winpcap.patch @@ -0,0 +1,23 @@ +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -13,15 +13,13 @@ + + if(WIN32) + set(OS "win32") +- include_directories(oshw/win32/wpcap/Include) +- if(CMAKE_SIZEOF_VOID_P EQUAL 8) +- link_directories(${CMAKE_SOURCE_DIR}/oshw/win32/wpcap/Lib/x64) +- elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) +- link_directories(${CMAKE_SOURCE_DIR}/oshw/win32/wpcap/Lib) +- endif() ++ find_path(winpcap_INCLUDE_DIRS NAMES pcap.h) ++ find_library(winpcap_LIBRARY NAMES wpcap) ++ find_library(packet_LIBRARY NAMES packet) ++ include_directories(${winpcap_INCLUDE_DIRS}) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CRT_SECURE_NO_WARNINGS") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX") +- set(OS_LIBS wpcap.lib Packet.lib Ws2_32.lib Winmm.lib) ++ set(OS_LIBS ${winpcap_LIBRARY} ${packet_LIBRARY} Ws2_32.lib Winmm.lib) + elseif(UNIX AND NOT APPLE) + set(OS "linux") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror") diff --git a/vcpkg/ports/soil/CMakeLists.txt b/vcpkg/ports/soil/CMakeLists.txt new file mode 100644 index 0000000..5cee52a --- /dev/null +++ b/vcpkg/ports/soil/CMakeLists.txt @@ -0,0 +1,50 @@ +cmake_minimum_required(VERSION 3.8) + +project(SOIL C) + +option(INSTALL_HEADERS "Install header files" ON) + +set(INSTALL_CMAKE_DIR share/soil) + +add_library(SOIL STATIC + src/image_helper.c + src/stb_image_aug.c + src/image_DXT.c + src/SOIL.c) + +target_include_directories(SOIL INTERFACE $) + +if(INSTALL_HEADERS) + install(TARGETS SOIL + EXPORT SOILTargets + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) + + install(FILES src/SOIL.h + DESTINATION include/SOIL/) + + # Prepare and install package files + set(SOIL_VERSION "2018.7.7") + + export(TARGETS SOIL FILE "${PROJECT_BINARY_DIR}/SOILTargets.cmake") + + export(PACKAGE SOIL) + + # Create the SOILConfig.cmake and SOILConfigVersion files + configure_file(SOILConfig.cmake.in "${PROJECT_BINARY_DIR}/SOILConfig.cmake" @ONLY) + configure_file(SOILConfigVersion.cmake.in "${PROJECT_BINARY_DIR}/SOILConfigVersion.cmake" @ONLY) + + # Install the SOILConfig.cmake and SOILConfigVersion.cmake + install(FILES + "${PROJECT_BINARY_DIR}/SOILConfig.cmake" + "${PROJECT_BINARY_DIR}/SOILConfigVersion.cmake" + DESTINATION "${INSTALL_CMAKE_DIR}") + + # Install the export set for use with the install-tree + install(EXPORT SOILTargets DESTINATION + "${INSTALL_CMAKE_DIR}") +else() + install(TARGETS SOIL + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib) +endif() diff --git a/vcpkg/ports/soil/CONTROL b/vcpkg/ports/soil/CONTROL new file mode 100644 index 0000000..156582b --- /dev/null +++ b/vcpkg/ports/soil/CONTROL @@ -0,0 +1,3 @@ +Source: soil +Version: 2008.07.07-2 +Description: Simple OpenGL Image Library diff --git a/vcpkg/ports/soil/LICENSE b/vcpkg/ports/soil/LICENSE new file mode 100644 index 0000000..22f05fd --- /dev/null +++ b/vcpkg/ports/soil/LICENSE @@ -0,0 +1,6 @@ +https://www.lonesock.net/soil.html + +Simple OpenGL Image Library + +License: +Public Domain diff --git a/vcpkg/ports/soil/SOILConfig.cmake.in b/vcpkg/ports/soil/SOILConfig.cmake.in new file mode 100644 index 0000000..730e887 --- /dev/null +++ b/vcpkg/ports/soil/SOILConfig.cmake.in @@ -0,0 +1,13 @@ +# - Config file for the SOIL package +# It defines the following variables +# SOIL_INCLUDE_DIRS - include directories for SOIL +# SOIL_LIBRARIES - libraries to link against + +# Load targets +get_filename_component(SOIL_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +include("${SOIL_CMAKE_DIR}/SOILTargets.cmake") + +# Set properties +get_target_property(SOIL_INCLUDE_DIRS SOIL INTERFACE_INCLUDE_DIRECTORIES) +set(SOIL_LIBRARIES SOIL) +mark_as_advanced(SOIL_INCLUDE_DIRS SOIL_LIBRARIES) diff --git a/vcpkg/ports/soil/SOILConfigVersion.cmake.in b/vcpkg/ports/soil/SOILConfigVersion.cmake.in new file mode 100644 index 0000000..1e3e049 --- /dev/null +++ b/vcpkg/ports/soil/SOILConfigVersion.cmake.in @@ -0,0 +1,11 @@ +set(PACKAGE_VERSION "@SOIL_VERSION@") + +# Check whether the requested PACKAGE_FIND_VERSION is compatible +if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") + set(PACKAGE_VERSION_EXACT TRUE) + endif() +endif() diff --git a/vcpkg/ports/soil/portfile.cmake b/vcpkg/ports/soil/portfile.cmake new file mode 100644 index 0000000..f97be52 --- /dev/null +++ b/vcpkg/ports/soil/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "http://www.lonesock.net/files/soil.zip" + FILENAME "soil-2008.07.07.zip" + SHA512 a575a84aa65b7556320779d635561341f5cf156418d0462473e5d1eb082829be3bcb30600b4887af75aeddd3715de16bdb3ca1668ebaa93eea62bacf22b79548 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_LIST_DIR}/SOILConfig.cmake.in + ${CMAKE_CURRENT_LIST_DIR}/SOILConfigVersion.cmake.in + ${CMAKE_CURRENT_LIST_DIR}/LICENSE + DESTINATION ${SOURCE_PATH} +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/soil2/CMakeLists.txt b/vcpkg/ports/soil2/CMakeLists.txt new file mode 100644 index 0000000..6b5368e --- /dev/null +++ b/vcpkg/ports/soil2/CMakeLists.txt @@ -0,0 +1,90 @@ +cmake_minimum_required(VERSION 3.9) + +# Create the soil2 project +project("soil2" LANGUAGES C) + +find_package(OpenGL) + +# Do we want to install the headers? +option(INSTALL_HEADERS "Install header files" ON) + +# Set the install dir +set(INSTALL_CMAKE_DIR share/soil2) + +# Set the source files to compile +set(SOIL2_SRC + src/SOIL2/etc1_utils.c + src/SOIL2/image_DXT.c + src/SOIL2/image_helper.c + src/SOIL2/SOIL2.c +) + +# Set the soil2 headers +set(SOIL2_HEADERS + src/SOIL2/SOIL2.h + src/SOIL2/etc1_utils.h + src/SOIL2/image_DXT.h + src/SOIL2/image_helper.h + src/SOIL2/jo_jpeg.h + src/SOIL2/pkm_helper.h + src/SOIL2/pvr_helper.h + src/SOIL2/stb_image.h + src/SOIL2/stb_image_write.h + src/SOIL2/stbi_DDS.h + src/SOIL2/stbi_ext.h + src/SOIL2/stbi_pkm.h + src/SOIL2/stbi_pvr.h +) + +# Add the library as a static linkage +add_library(soil2 STATIC ${SOIL2_SRC}) + +# The include dir +target_include_directories(soil2 INTERFACE $) + +# link opengl32 +target_link_libraries(soil2 PRIVATE ${OPENGL_gl_LIBRARY}) + +# If its msvc mute the secure warnings +if(MSVC) + target_compile_definitions(soil2 PRIVATE _CRT_SECURE_NO_WARNINGS) +endif(MSVC) + +if(INSTALL_HEADERS) + # Install the library object + install(TARGETS soil2 EXPORT soil2Targets + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + ) + + # Install the headers + install(FILES ${SOIL2_HEADERS} + DESTINATION include/SOIL2/) + + # Prepare for install package files + set(SOIL2_VERSION "release-1.11") + + # Export the stuff + export(TARGETS soil2 FILE "${PROJECT_BINARY_DIR}/soil2Targets.cmake") + export(PACKAGE soil2) + + # Create the soil2Config.cmake and soil2ConfigVersion.cmake + configure_file(soil2Config.cmake.in "${PROJECT_BINARY_DIR}/soil2Config.cmake" @ONLY) + configure_file(soil2ConfigVersion.cmake.in "${PROJECT_BINARY_DIR}/soil2ConfigVersion.cmake" @ONLY) + + # Install the soil2Config.cmake and soil2ConfigVersion.cmake + install(FILES + "${PROJECT_BINARY_DIR}/soil2Config.cmake" + "${PROJECT_BINARY_DIR}/soil2ConfigVersion.cmake" + DESTINATION "${INSTALL_CMAKE_DIR}" + ) + + # Install the export set for use with the install-tree + install(EXPORT soil2Targets DESTINATION "${INSTALL_CMAKE_DIR}") +else(INSTALL_HEADERS) + # Install the library object + install(TARGETS soil2 EXPORT soil2 + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + ) +endif(INSTALL_HEADERS) diff --git a/vcpkg/ports/soil2/CONTROL b/vcpkg/ports/soil2/CONTROL new file mode 100644 index 0000000..07cfde7 --- /dev/null +++ b/vcpkg/ports/soil2/CONTROL @@ -0,0 +1,3 @@ +Source: soil2 +Version: release-1.11-1 +Description: Simple OpenGL Image Library 2 \ No newline at end of file diff --git a/vcpkg/ports/soil2/LICENSE b/vcpkg/ports/soil2/LICENSE new file mode 100644 index 0000000..02c4106 --- /dev/null +++ b/vcpkg/ports/soil2/LICENSE @@ -0,0 +1,7 @@ +Copyright 2018 Matrin Lucas Golini + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/vcpkg/ports/soil2/portfile.cmake b/vcpkg/ports/soil2/portfile.cmake new file mode 100644 index 0000000..e468c07 --- /dev/null +++ b/vcpkg/ports/soil2/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO SpartanJ/soil2 + REF 7dc42acee2302780c1e100bf864aa2bdb2221a2b #release-1.11 + SHA512 13f1716a3766cb4fa8d5b90eae5f3795ed3c86fc4463ca1cd68f4fa6b7fd96c24ec5098673c1d7253c94bdd491854b9359f8ccb8bd5b5640eeff3605f52e17a5 + HEAD_REF master +) + +file( + COPY + ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_LIST_DIR}/LICENSE + ${CMAKE_CURRENT_LIST_DIR}/soil2Config.cmake.in + ${CMAKE_CURRENT_LIST_DIR}/soil2ConfigVersion.cmake.in + DESTINATION ${SOURCE_PATH} +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/soil2/soil2Config.cmake.in b/vcpkg/ports/soil2/soil2Config.cmake.in new file mode 100644 index 0000000..4d9d8b4 --- /dev/null +++ b/vcpkg/ports/soil2/soil2Config.cmake.in @@ -0,0 +1,13 @@ +# - Config file for the soil2 package +# It defines the following variables +# SOIL2_INCLUDE_DIRS - include directories for SOIL2 +# SOIL2_LIBRARIES - libraries to link against + +# Load targets +get_filename_component(SOIL2_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +include("${SOIL2_CMAKE_DIR}/soil2Targets.cmake") + +# Set properties +get_target_property(SOIL2_INCLUDE_DIRS soil2 INTERFACE_INCLUDE_DIRECTORIES) +set(SOIL2_LIBRARIES soil2) +mark_as_advanced(SOIL2_INCLUDE_DIRS SOIL2_LIBRARIES) diff --git a/vcpkg/ports/soil2/soil2ConfigVersion.cmake.in b/vcpkg/ports/soil2/soil2ConfigVersion.cmake.in new file mode 100644 index 0000000..a6ae96f --- /dev/null +++ b/vcpkg/ports/soil2/soil2ConfigVersion.cmake.in @@ -0,0 +1,11 @@ +set(PACKAGE_VERSION "@SOIL2_VERSION@") + +# Check whether the requested PACKAGE_FIND_VERSION is compatible +if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") + set(PACKAGE_VERSION_EXACT TRUE) + endif() +endif() diff --git a/vcpkg/ports/sokol/CONTROL b/vcpkg/ports/sokol/CONTROL new file mode 100644 index 0000000..4caa796 --- /dev/null +++ b/vcpkg/ports/sokol/CONTROL @@ -0,0 +1,4 @@ +Source: sokol +Version: 2019-09-09 +Description: Minimal cross-platform standalone C headers +Homepage: https://github.com/floooh/sokol diff --git a/vcpkg/ports/sokol/portfile.cmake b/vcpkg/ports/sokol/portfile.cmake new file mode 100644 index 0000000..92eee03 --- /dev/null +++ b/vcpkg/ports/sokol/portfile.cmake @@ -0,0 +1,20 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO floooh/sokol + REF 425e906d2af8c976c30f7e925a303fea9f0bf879 + SHA512 4606735b9466637f3b676402cc2d7ef96e4152836c901d7a84039c52951aec27922726de21a537e0fef2d2218f48e3a9a3c32c3bc67076c10d199f067f50dad9 + HEAD_REF master +) + +file(GLOB SOKOL_INCLUDE_FILES ${SOURCE_PATH}/*.h) +file(COPY ${SOKOL_INCLUDE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(GLOB SOKOL_UTIL_INCLUDE_FILES ${SOURCE_PATH}/util/*.h) +file(COPY ${SOKOL_UTIL_INCLUDE_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/util) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/sol2/CONTROL b/vcpkg/ports/sol2/CONTROL new file mode 100644 index 0000000..60490e9 --- /dev/null +++ b/vcpkg/ports/sol2/CONTROL @@ -0,0 +1,5 @@ +Source: sol2 +Version: 3.2.2 +Homepage: https://github.com/ThePhD/sol2 +Description: Sol v2.0 - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great +Build-Depends: lua (windows) diff --git a/vcpkg/ports/sol2/fix-namespace.patch b/vcpkg/ports/sol2/fix-namespace.patch new file mode 100644 index 0000000..bcce158 --- /dev/null +++ b/vcpkg/ports/sol2/fix-namespace.patch @@ -0,0 +1,19 @@ +diff --git a/cmake/sol2-config.cmake.in b/cmake/sol2-config.cmake.in +index 70c448d..7965bc6 100644 +--- a/cmake/sol2-config.cmake.in ++++ b/cmake/sol2-config.cmake.in +@@ -26,11 +26,11 @@ include("${CMAKE_CURRENT_LIST_DIR}/sol2-targets.cmake") + + MESSAGE(STATUS ${CMAKE_CURRENT_LIST_DIR}) + +-if (TARGET sol2) ++if (TARGET sol2::sol2) + get_target_property(SOL2_INCLUDE_DIRS +- sol2 INTERFACE_INCLUDE_DIRECTORIES) ++ sol2::sol2 INTERFACE_INCLUDE_DIRECTORIES) + set_and_check(SOL2_INCLUDE_DIRS "${SOL2_INCLUDE_DIRS}") +- set(SOL2_LIBRARIES sol2) ++ set(SOL2_LIBRARIES sol2::sol2) + endif() + + if(TARGET sol2_single) diff --git a/vcpkg/ports/sol2/portfile.cmake b/vcpkg/ports/sol2/portfile.cmake new file mode 100644 index 0000000..cf20001 --- /dev/null +++ b/vcpkg/ports/sol2/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ThePhD/sol2 + REF v3.2.2 + SHA512 e5a739b37aea7150f141f6a003c2689dd33155feed5bb3cf2569abbfe9f0062eacdaaf346be523d627f0e491b35e68822c80e1117fa09ece8c9d8d5af09fdbec + HEAD_REF develop + PATCHES fix-namespace.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sol2) + +file( + REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/include +) + +file(INSTALL ${SOURCE_PATH}/single/include/sol DESTINATION ${CURRENT_PACKAGES_DIR}/include/) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/solid3/CONTROL b/vcpkg/ports/solid3/CONTROL new file mode 100644 index 0000000..7dce173 --- /dev/null +++ b/vcpkg/ports/solid3/CONTROL @@ -0,0 +1,3 @@ +Source: solid3 +Version: 3.5.8 +Description: Software Library for Interference Detection diff --git a/vcpkg/ports/solid3/disable-examples.patch b/vcpkg/ports/solid3/disable-examples.patch new file mode 100644 index 0000000..5af3b26 --- /dev/null +++ b/vcpkg/ports/solid3/disable-examples.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0303a8f..be43838 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -97,7 +97,7 @@ if(UNIX) + endif(UNIX) + + add_subdirectory(src) +-add_subdirectory(examples) ++#add_subdirectory(examples) + #add_subdirectory(doc) + + include(CMakePackageConfigHelpers) diff --git a/vcpkg/ports/solid3/portfile.cmake b/vcpkg/ports/solid3/portfile.cmake new file mode 100644 index 0000000..dc61a56 --- /dev/null +++ b/vcpkg/ports/solid3/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dtecta/solid3 + REF c53f6bb1eaaafb1cfb305ef71b1c3a2edb4844e6 + SHA512 ae42ba75f5309fecba836e5786d4cb81eeb1240f6fd7c458c6d1329d8e1075021504b927ea0aedb66162deeb79ad674cacb0190385afe456420c0d9184596f1f + HEAD_REF master + PATCHES + disable-examples.patch + potentially-uninitialized-local-pointer-variable.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(DYNAMIC_SOLID OFF) +else() + set(DYNAMIC_SOLID ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DDYNAMIC_SOLID=${DYNAMIC_SOLID} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/solid3) + +file(COPY ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/solid3) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/solid3/README.md ${CURRENT_PACKAGES_DIR}/share/solid3/copyright) +file(COPY ${SOURCE_PATH}/LICENSE_GPL.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/solid3) +file(COPY ${SOURCE_PATH}/LICENSE_QPL.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/solid3) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/vcpkg/ports/solid3/potentially-uninitialized-local-pointer-variable.patch b/vcpkg/ports/solid3/potentially-uninitialized-local-pointer-variable.patch new file mode 100644 index 0000000..baec567 --- /dev/null +++ b/vcpkg/ports/solid3/potentially-uninitialized-local-pointer-variable.patch @@ -0,0 +1,26 @@ +diff --git a/src/qhull/geom2.c b/src/qhull/geom2.c +index bd58ce1..c4798d2 100644 +--- a/src/qhull/geom2.c ++++ b/src/qhull/geom2.c +@@ -2080,7 +2080,7 @@ boolT qh_sharpnewfacets () { + pointT *qh_voronoi_center (int dim, setT *points) { + pointT *point, **pointp, *point0; + pointT *center= (pointT*)qh_memalloc (qh center_size); +- setT *simplex; ++ setT *simplex= NULL; + int i, j, k, size= qh_setsize(points); + coordT *gmcoord; + realT *diffp, sum2, *sum2row, *sum2p, det, factor; +diff --git a/src/qhull/io.c b/src/qhull/io.c +index 79ca799..41c18bc 100644 +--- a/src/qhull/io.c ++++ b/src/qhull/io.c +@@ -3740,7 +3740,7 @@ coordT *qh_readpoints(int *numpoints, int *dimension, boolT *ismalloc) { + coordT *points, *coords, *infinity= NULL; + realT paraboloid, maxboloid= -REALmax, value; + realT *coordp= NULL, *offsetp= NULL, *normalp= NULL; +- char *s, *t, firstline[qh_MAXfirst+1]; ++ char *s= NULL, *t, firstline[qh_MAXfirst+1]; + int diminput=0, numinput=0, dimfeasible= 0, newnum, k, tempi; + int firsttext=0, firstshort=0, firstlong=0, firstpoint=0; + int tokcount= 0, linecount=0, maxcount, coordcount=0; diff --git a/vcpkg/ports/sophus/CONTROL b/vcpkg/ports/sophus/CONTROL new file mode 100644 index 0000000..d3c81de --- /dev/null +++ b/vcpkg/ports/sophus/CONTROL @@ -0,0 +1,5 @@ +Source: sophus +Version: 1.0.0-6 +Build-Depends: eigen3, ceres, suitesparse +Homepage: https://github.com/strasdat/Sophus +Description: Lie group library for C++ diff --git a/vcpkg/ports/sophus/fix_cmakelists.patch b/vcpkg/ports/sophus/fix_cmakelists.patch new file mode 100644 index 0000000..33916cf --- /dev/null +++ b/vcpkg/ports/sophus/fix_cmakelists.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fa51e2c..3e07396 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -39,6 +39,7 @@ SET( Sophus_INCLUDE_DIR ${PROJECT_SOURCE_DIR} ) + + ################################################################################ + FIND_PACKAGE( Eigen3 REQUIRED ) ++FIND_PACKAGE( suitesparse REQUIRED ) + LIST( APPEND Sophus_INCLUDE_DIR ${EIGEN3_INCLUDE_DIR} ) + + ################################################################################ diff --git a/vcpkg/ports/sophus/portfile.cmake b/vcpkg/ports/sophus/portfile.cmake new file mode 100644 index 0000000..c7480b9 --- /dev/null +++ b/vcpkg/ports/sophus/portfile.cmake @@ -0,0 +1,25 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO strasdat/Sophus + REF v1.0.0 + SHA512 569634a8be9237d2240cf30c01e2677ece75d55f1196030f1228baca62fa22460e8ceb2a63bd46afdf7f02d8eb79c59d6ed666228b852da78590de897b278fab + HEAD_REF master + PATCHES + fix_cmakelists.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Sophus) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/ RENAME copyright) diff --git a/vcpkg/ports/soqt/CONTROL b/vcpkg/ports/soqt/CONTROL new file mode 100644 index 0000000..2fbde41 --- /dev/null +++ b/vcpkg/ports/soqt/CONTROL @@ -0,0 +1,6 @@ +Source: soqt +Version: 1.6.0-1 +Description: A Qt Gui-toolkit binding for Coin +Build-Depends: coin, qt5-base[core] +Homepage: https://github.com/coin3d/soqt +Supports: !(arm|arm64|uwp) diff --git a/vcpkg/ports/soqt/disable-cpackd.patch b/vcpkg/ports/soqt/disable-cpackd.patch new file mode 100644 index 0000000..1450b2d --- /dev/null +++ b/vcpkg/ports/soqt/disable-cpackd.patch @@ -0,0 +1,10 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 802e512c..21cc23a9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -393,4 +393,4 @@ add_subdirectory(test-code) + + ############################################################################ + # New CPACK section, please see the README file inside cpack.d directory. +-add_subdirectory(cpack.d) ++#add_subdirectory(cpack.d) diff --git a/vcpkg/ports/soqt/disable-test-code.patch b/vcpkg/ports/soqt/disable-test-code.patch new file mode 100644 index 0000000..3e1216a --- /dev/null +++ b/vcpkg/ports/soqt/disable-test-code.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4b0815f2..236ffa8d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -390,7 +390,7 @@ set(PACKAGE_REQUIREMENTS "Coin, ${PACKAGE_ADDITIONAL_REQUIREMENTS}") + add_subdirectory(data) + add_subdirectory(src) + ##### small test programs (to be run interactively) +-add_subdirectory(test-code) ++#add_subdirectory(test-code) + + ############################################################################ + # New CPACK section, please see the README file inside cpack.d directory. diff --git a/vcpkg/ports/soqt/portfile.cmake b/vcpkg/ports/soqt/portfile.cmake new file mode 100644 index 0000000..8340753 --- /dev/null +++ b/vcpkg/ports/soqt/portfile.cmake @@ -0,0 +1,89 @@ +vcpkg_fail_port_install(ON_TARGET "UWP" ON_ARCH "arm" "arm64") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Coin3D/soqt + REF SoQt-1.6.0 + SHA512 204d49769dda1a9833093ff78bdb788df0c514e800ae0bc35d4ef832ece304c7c26fc7d893ee83db95c34d9457e27e04c74301bcd2029aa3a0f96ec2ecbb3984 + HEAD_REF master + PATCHES + disable-cpackd.patch + disable-test-code.patch +) + +if(VCPKG_HEAD_VERSION) + vcpkg_download_distfile( + SOANYDATA_ARCHIVE + URLS "https://github.com/coin3d/soanydata/archive/master.tar.gz" + FILENAME "Coin3D-soanydata-master.tar.gz" + SKIP_SHA512 + ) +else() + vcpkg_download_distfile( + SOANYDATA_ARCHIVE + URLS "https://github.com/coin3d/soanydata/archive/3ff6e9203fbb0cc08a2bdf209212b7ef4d78a1f2.tar.gz" + FILENAME "Coin3D-soanydata-3ff6e9203fbb0cc08a2bdf209212b7ef4d78a1f2.tar.gz" + SHA512 9e176feda43a12ccdf8756f7329517936357499771a7d0a58357d343bdea125c34f8734ff1cd16cda3eeee58090dc1680999849c50132c30940a23d3f81a5c66 + ) +endif() + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOANYDATA_SOURCE_PATH + ARCHIVE ${SOANYDATA_ARCHIVE} +) + +if(NOT EXISTS ${SOURCE_PATH}/data) + file(RENAME ${SOANYDATA_SOURCE_PATH} ${SOURCE_PATH}/data) +endif() + +if(VCPKG_HEAD_VERSION) + vcpkg_download_distfile( + SOGUI_ARCHIVE + URLS "https://github.com/coin3d/sogui/archive/master.tar.gz" + FILENAME "Coin3D-sogui-master.tar.gz" + SKIP_SHA512 + ) +else() + vcpkg_download_distfile( + SOGUI_ARCHIVE + URLS "https://github.com/coin3d/sogui/archive/fb79af47cff89f0f3657501601a7ea5c11968b17.tar.gz" + FILENAME "Coin3D-sogui-fb79af47cff89f0f3657501601a7ea5c11968b17.tar.gz" + SHA512 bcf4d2e04c3b6ac87a6425d90c6077ec655732bcc0f99bf181ff2dfce8d356509f52d71b884660fafddc135551ee8fbb139e02b6706d2a01be006193918d232b + ) +endif() + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOGUI_SOURCE_PATH + ARCHIVE ${SOGUI_ARCHIVE} +) + +if(NOT EXISTS ${SOURCE_PATH}/src/Inventor/Qt/common) + file(RENAME ${SOGUI_SOURCE_PATH} ${SOURCE_PATH}/src/Inventor/Qt/common) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(SOQT_BUILD_SHARED_LIBS OFF) +else() + set(SOQT_BUILD_SHARED_LIBS ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSOQT_BUILD_DOCUMENTATION=OFF + -DSOQT_BUILD_SHARED_LIBS=${SOQT_BUILD_SHARED_LIBS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SoQt-1.6.0) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/vcpkg/ports/sord/CMakeLists.txt b/vcpkg/ports/sord/CMakeLists.txt new file mode 100644 index 0000000..be83dc2 --- /dev/null +++ b/vcpkg/ports/sord/CMakeLists.txt @@ -0,0 +1,55 @@ +cmake_minimum_required(VERSION 3.17) +project(sord C) + +find_package(serd CONFIG REQUIRED) + +add_library(sord + src/sord.c + src/syntax.c +) + +file(WRITE "${CMAKE_BINARY_DIR}/sord_config.h" "") + +target_include_directories(sord + PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/src" "${CMAKE_BINARY_DIR}" +) + +target_link_libraries(sord PUBLIC serd::serd) + +set_target_properties(sord PROPERTIES + C_STANDARD 99 + C_STANDARD_REQUIRED ON +) + +target_compile_definitions(sord PRIVATE SORD_INTERNAL _CRT_SECURE_NO_WARNINGS) + +if(BUILD_SHARED_LIBS) + target_compile_definitions(sord PUBLIC SORD_SHARED) +endif() + +install( + TARGETS sord + EXPORT sord-targets + INCLUDES DESTINATION include +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY sord DESTINATION include) +endif() + +install( + EXPORT sord-targets + NAMESPACE sord:: + DESTINATION "${CMAKE_INSTALL_PREFIX}/share/sord" +) + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/sord-config.cmake" [[ +include(CMakeFindDependencyMacro) +find_dependency(serd CONFIG) +include("${CMAKE_CURRENT_LIST_DIR}/sord-targets.cmake") +]]) + +install( + FILES "${CMAKE_CURRENT_BINARY_DIR}/sord-config.cmake" + DESTINATION "${CMAKE_INSTALL_PREFIX}/share/sord" +) diff --git a/vcpkg/ports/sord/portfile.cmake b/vcpkg/ports/sord/portfile.cmake new file mode 100644 index 0000000..6725863 --- /dev/null +++ b/vcpkg/ports/sord/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.com + OUT_SOURCE_PATH SOURCE_PATH + REPO drobilla/sord + REF v0.16.4 + SHA512 cad8f8fd07afb5075938fce247d95f9d666f61f4d913ff0c3fde335384177de066a5c0f2620c76e098178aeded0412b3e76ef63a1ae65aba7eb99e3e8ce15896 + 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() +vcpkg_fixup_cmake_targets() +file( + INSTALL "${SOURCE_PATH}/COPYING" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright +) diff --git a/vcpkg/ports/sord/vcpkg.json b/vcpkg/ports/sord/vcpkg.json new file mode 100644 index 0000000..51dacf7 --- /dev/null +++ b/vcpkg/ports/sord/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "sord", + "version-string": "0.16.4", + "description": "Sord is a lightweight C library for storing RDF statements in memory.", + "homepage": "https://drobilla.net/software/sord", + "license": "ISC", + "dependencies": [ + "serd" + ] +} diff --git a/vcpkg/ports/soundtouch/CMakeLists.txt b/vcpkg/ports/soundtouch/CMakeLists.txt new file mode 100644 index 0000000..075c8ee --- /dev/null +++ b/vcpkg/ports/soundtouch/CMakeLists.txt @@ -0,0 +1,35 @@ +cmake_minimum_required(VERSION 3.5) +project(soundtouch CXX) + +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(ARCH_SUFFIX _x64) +else() + set(ARCH_SUFFIX) +endif() + +if(BUILD_SHARED_LIBS) + set(TYPE_SUFFIX Dll) +else() + set(TYPE_SUFFIX $<$:D>) +endif() + +configure_file("${CMAKE_CURRENT_LIST_DIR}/include/soundtouch_config.h.in" ${CMAKE_CURRENT_BINARY_DIR}/include/soundtouch_config.h) + +file(GLOB SOUNDTOUCH_SOURCES "${CMAKE_CURRENT_LIST_DIR}/source/SoundTouch/*.cpp") +add_library(libsoundtouch ${SOUNDTOUCH_SOURCES}) +target_include_directories(libsoundtouch PUBLIC "${CMAKE_CURRENT_LIST_DIR}/include") +target_include_directories(libsoundtouch PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/include") +set_target_properties(libsoundtouch PROPERTIES OUTPUT_NAME SoundTouch${TYPE_SUFFIX}${ARCH_SUFFIX}) +if(WIN32 AND BUILD_SHARED_LIBS) + target_compile_definitions(libsoundtouch PRIVATE -DDLL_EXPORTS) + target_sources(libsoundtouch PRIVATE + "${CMAKE_CURRENT_LIST_DIR}/source/SoundTouchDLL/SoundTouchDLL.cpp" + "${CMAKE_CURRENT_LIST_DIR}/source/SoundTouchDLL/SoundTouchDLL.rc" + ) +endif() + +install(TARGETS libsoundtouch + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) diff --git a/vcpkg/ports/soundtouch/CONTROL b/vcpkg/ports/soundtouch/CONTROL new file mode 100644 index 0000000..2d1757f --- /dev/null +++ b/vcpkg/ports/soundtouch/CONTROL @@ -0,0 +1,6 @@ +Source: soundtouch +Version: 2.0.0-6 +Homepage: https://www.surina.net/soundtouch +Description: SoundTouch is an open-source audio processing library for changing the Tempo, Pitch and Playback Rates of audio streams or audio files. +Build-Depends: atlmfc (windows) +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/soundtouch/portfile.cmake b/vcpkg/ports/soundtouch/portfile.cmake new file mode 100644 index 0000000..12cc0b0 --- /dev/null +++ b/vcpkg/ports/soundtouch/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "WindowsStore not supported") +endif() + +set(VERSION 2.0.0) + +vcpkg_download_distfile(ARCHIVE + URLS "https://www.surina.net/soundtouch/soundtouch-${VERSION}.zip" + FILENAME "soundtouch-${VERSION}.zip" + SHA512 50ef36b6cd21c16e235b908c5518e29b159b11f658a014c47fe767d3d8acebaefefec0ce253b4ed322cbd26387c69c0ed464ddace0c098e61d56d55c198117a5 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/source/SoundTouchDLL/SoundTouchDLL.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${SOURCE_PATH}/COPYING.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/soxr/001_initialize-resampler.patch b/vcpkg/ports/soxr/001_initialize-resampler.patch new file mode 100644 index 0000000..6be5f29 --- /dev/null +++ b/vcpkg/ports/soxr/001_initialize-resampler.patch @@ -0,0 +1,13 @@ +diff --git a/src/soxr.c b/src/soxr.c +index c2861ac..c95cfd4 100644 +--- a/src/soxr.c ++++ b/src/soxr.c +@@ -815,7 +815,7 @@ soxr_error_t soxr_oneshot( + soxr_quality_spec_t const * q_spec, + soxr_runtime_spec_t const * runtime_spec) + { +- soxr_t resampler; ++ soxr_t resampler = NULL; + soxr_error_t error = q_spec? q_spec->e : 0; + if (!error) { + soxr_quality_spec_t q_spec1; diff --git a/vcpkg/ports/soxr/002_disable_warning.patch b/vcpkg/ports/soxr/002_disable_warning.patch new file mode 100644 index 0000000..fc85501 --- /dev/null +++ b/vcpkg/ports/soxr/002_disable_warning.patch @@ -0,0 +1,12 @@ +diff --git a/src/pffft.c b/src/pffft.c +index 46c841e..0686bef 100644 +--- a/src/pffft.c ++++ b/src/pffft.c +@@ -182,7 +182,6 @@ typedef float32x4_t v4sf; + # define VALIGNED(ptr) ((((long)(ptr)) & 0x3) == 0) + #else + # if !defined(PFFFT_SIMD_DISABLE) +-# warning "building with simd disabled !\n"; + # define PFFFT_SIMD_DISABLE /* fallback to scalar code */ + # endif + #endif diff --git a/vcpkg/ports/soxr/003_detect_arm_on_windows.patch b/vcpkg/ports/soxr/003_detect_arm_on_windows.patch new file mode 100644 index 0000000..f1643fb --- /dev/null +++ b/vcpkg/ports/soxr/003_detect_arm_on_windows.patch @@ -0,0 +1,13 @@ +diff --git a/src/pffft.c b/src/pffft.c +index 0686bef..e4cb094 100644 +--- a/src/pffft.c ++++ b/src/pffft.c +@@ -157,7 +157,7 @@ typedef __m128 v4sf; + /* + ARM NEON support macros + */ +-#elif !defined(PFFFT_SIMD_DISABLE) && defined(__arm__) ++#elif !defined(PFFFT_SIMD_DISABLE) && (defined(__arm__) || defined(_M_ARM)) + # include + typedef float32x4_t v4sf; + # define SIMD_SZ 4 diff --git a/vcpkg/ports/soxr/CONTROL b/vcpkg/ports/soxr/CONTROL new file mode 100644 index 0000000..cc92047 --- /dev/null +++ b/vcpkg/ports/soxr/CONTROL @@ -0,0 +1,5 @@ +Source: soxr +Version: 0.1.3 +Port-Version: 3 +Homepage: https://sourceforge.net/projects/soxr/ +Description: High quality audio resampling diff --git a/vcpkg/ports/soxr/portfile.cmake b/vcpkg/ports/soxr/portfile.cmake new file mode 100644 index 0000000..193eaec --- /dev/null +++ b/vcpkg/ports/soxr/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO soxr + FILENAME "soxr-0.1.3-Source.tar.xz" + SHA512 f4883ed298d5650399283238aac3dbe78d605b988246bea51fa343d4a8ce5ce97c6e143f6c3f50a3ff81795d9c19e7a07217c586d4020f6ced102aceac46aaa8 + PATCHES + 001_initialize-resampler.patch + 002_disable_warning.patch + 003_detect_arm_on_windows.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTS=OFF + -DBUILD_EXAMPLES=OFF + -DWITH_OPENMP=OFF + -DWITH_LSR_BINDINGS=OFF +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/soxr RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/doc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc) diff --git a/vcpkg/ports/spaceland/CONTROL b/vcpkg/ports/spaceland/CONTROL new file mode 100644 index 0000000..183d939 --- /dev/null +++ b/vcpkg/ports/spaceland/CONTROL @@ -0,0 +1,4 @@ +Source: spaceland +Version: 7.8.2-4 +Description: Spaceland Lib (sl) is a suite for geometric computation, specifically adapted to OpenGL. +Build-Depends: zlib diff --git a/vcpkg/ports/spaceland/portfile.cmake b/vcpkg/ports/spaceland/portfile.cmake new file mode 100644 index 0000000..861af9d --- /dev/null +++ b/vcpkg/ports/spaceland/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "http://vic.crs4.it/vic/download/pkgs/sl-7.8.2-Source.tar.gz" + FILENAME "sl-7.8.2-Source.tar.gz" + SHA512 1391dac1474ddb47d0cf0eb7baeb7db68d6356c2116f732dd57b8a050739523282ded0643cc466640f2b22f25dd6bfced00ede4e041b7ff83754a99ae6725d7d +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DSL_TEST=OFF + -DSL_INSTALL_SLFIND_MODULE=OFF + OPTIONS_DEBUG + -DSL_TEST=OFF + -DSL_INSTALL_SLFIND_MODULE=OFF +) + +vcpkg_install_cmake() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/span-lite/CONTROL b/vcpkg/ports/span-lite/CONTROL new file mode 100644 index 0000000..b301e63 --- /dev/null +++ b/vcpkg/ports/span-lite/CONTROL @@ -0,0 +1,4 @@ +Source: span-lite +Version: 0.7.0 +Description: A C++20-like span for C++98, C++11 and later in a single-file header-only library +Homepage: https://github.com/martinmoene/span-lite diff --git a/vcpkg/ports/span-lite/portfile.cmake b/vcpkg/ports/span-lite/portfile.cmake new file mode 100644 index 0000000..aa76e74 --- /dev/null +++ b/vcpkg/ports/span-lite/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO martinmoene/span-lite + REF v0.7.0 + SHA512 af1a47e10a3c061e6476845e54fe22341a353c0326dbbc35922edc248dbd55c3e62e5e0d1de5b5509a391515d792a5b35c8265bc1bcbbfb39a2e60c30a2fabcf +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSPAN_LITE_OPT_BUILD_TESTS=OFF + -DSPAN_LITE_OPT_BUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets( + CONFIG_PATH lib/cmake/${PORT} +) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/lib +) + +file(INSTALL + ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright +) diff --git a/vcpkg/ports/sparsehash/00001-windows-use-std.patch b/vcpkg/ports/sparsehash/00001-windows-use-std.patch new file mode 100644 index 0000000..69d1966 --- /dev/null +++ b/vcpkg/ports/sparsehash/00001-windows-use-std.patch @@ -0,0 +1,17 @@ +diff --git a/src/windows/sparsehash/internal/sparseconfig.h b/src/windows/sparsehash/internal/sparseconfig.h +index 3091559..f96e08c 100644 +--- a/src/windows/sparsehash/internal/sparseconfig.h ++++ b/src/windows/sparsehash/internal/sparseconfig.h +@@ -7,10 +7,10 @@ + #define GOOGLE_NAMESPACE ::google + + /* the location of the header defining hash functions */ +-#define HASH_FUN_H ++#define HASH_FUN_H + + /* the namespace of the hash<> function */ +-#define HASH_NAMESPACE stdext ++#define HASH_NAMESPACE std + + /* Define to 1 if you have the header file. */ + #undef HAVE_INTTYPES_H diff --git a/vcpkg/ports/sparsehash/CONTROL b/vcpkg/ports/sparsehash/CONTROL new file mode 100644 index 0000000..04c1d75 --- /dev/null +++ b/vcpkg/ports/sparsehash/CONTROL @@ -0,0 +1,4 @@ +Source: sparsehash +Version: 2.0.3 +Homepage: https://github.com/sparsehash/sparsehash +Description: The sparsehash package consists of two hashtable implementations: sparse, which is designed to be very space efficient, and dense, which is designed to be very time efficient. diff --git a/vcpkg/ports/sparsehash/Config.cmake.in b/vcpkg/ports/sparsehash/Config.cmake.in new file mode 100644 index 0000000..07739dd --- /dev/null +++ b/vcpkg/ports/sparsehash/Config.cmake.in @@ -0,0 +1,10 @@ + +get_filename_component(_sparsehash_root "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_sparsehash_root "${_sparsehash_root}" PATH) +get_filename_component(_sparsehash_root "${_sparsehash_root}" PATH) + +add_library(sparsehash::sparsehash INTERFACE IMPORTED) +set_target_properties(sparsehash::sparsehash + PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${_sparsehash_root}/include") + +unset(_sparsehash_root) diff --git a/vcpkg/ports/sparsehash/portfile.cmake b/vcpkg/ports/sparsehash/portfile.cmake new file mode 100644 index 0000000..1dcccda --- /dev/null +++ b/vcpkg/ports/sparsehash/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sparsehash/sparsehash + REF sparsehash-2.0.3 + SHA512 bb00d0acb8eba65f7da8015ea4f6bebf8bba36ed6777881960ee215f22b7be17b069c59838d210551ce67a34baccfc7b2fed603677ec53c0c32714d8e76f5d6c + HEAD_REF master + PATCHES 00001-windows-use-std.patch +) + +if(VCPKG_TARGET_IS_WINDOWS) + + file(COPY ${SOURCE_PATH}/src/google DESTINATION ${CURRENT_PACKAGES_DIR}/include) + file(COPY ${SOURCE_PATH}/src/sparsehash DESTINATION ${CURRENT_PACKAGES_DIR}/include) + file(COPY ${SOURCE_PATH}/src/windows/sparsehash/internal/sparseconfig.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/sparsehash/internal) + +else() + + vcpkg_execute_required_process( + COMMAND ${SOURCE_PATH}/configure ${OPTIONS} --prefix=${CURRENT_PACKAGES_DIR} + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME configure-${TARGET_TRIPLET} + ) + + vcpkg_execute_required_process( + COMMAND make -j ${VCPKG_CONCURRENCY} install + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME install-${TARGET_TRIPLET} + ) + +endif() + +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in + ${CURRENT_PACKAGES_DIR}/share/sparsehash/sparsehash-config.cmake + @ONLY +) + +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/sparsehash/copyright COPYONLY) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/sparsehash) diff --git a/vcpkg/ports/sparsehash/usage b/vcpkg/ports/sparsehash/usage new file mode 100644 index 0000000..5222b24 --- /dev/null +++ b/vcpkg/ports/sparsehash/usage @@ -0,0 +1,4 @@ +The package sparsehash provides CMake targets: + + find_package(sparsehash CONFIG REQUIRED) + target_link_libraries(main PRIVATE sparsehash::sparsehash) diff --git a/vcpkg/ports/sparsepp/CMakeLists.txt b/vcpkg/ports/sparsepp/CMakeLists.txt new file mode 100644 index 0000000..36d304c --- /dev/null +++ b/vcpkg/ports/sparsepp/CMakeLists.txt @@ -0,0 +1,18 @@ +cmake_minimum_required (VERSION 3.9) +project (sparsepp) + +set(HEADERS + sparsepp/spp.h + sparsepp/spp_config.h + sparsepp/spp_dlalloc.h + sparsepp/spp_memory.h + sparsepp/spp_smartptr.h + sparsepp/spp_stdint.h + sparsepp/spp_timer.h + sparsepp/spp_traits.h + sparsepp/spp_utils.h + ) + +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES ${HEADERS} DESTINATION include/sparsepp) +endif() diff --git a/vcpkg/ports/sparsepp/CONTROL b/vcpkg/ports/sparsepp/CONTROL new file mode 100644 index 0000000..8655017 --- /dev/null +++ b/vcpkg/ports/sparsepp/CONTROL @@ -0,0 +1,3 @@ +Source: sparsepp +Version: 1.22-1 +Description: A fast, memory efficient hash map for C++ diff --git a/vcpkg/ports/sparsepp/portfile.cmake b/vcpkg/ports/sparsepp/portfile.cmake new file mode 100644 index 0000000..a98e1a6 --- /dev/null +++ b/vcpkg/ports/sparsepp/portfile.cmake @@ -0,0 +1,32 @@ + +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO greg7mdp/sparsepp + REF 1.22 + SHA512 b660cd7de48fcab50d4a0df4e4813226b0b0a8a3791aba4e4cc6a456af7bba0be6694bc44781a7d00b5582b32b1d85b9afa83095b7e5c0a26d1b0344ddc94b0f + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +# Note: we could add: OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON +# but it's an header only package, so there's no INSTALL target. So +# we remove the duplicate headers. + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sparsepp RENAME copyright) diff --git a/vcpkg/ports/spatialite-tools/CONTROL b/vcpkg/ports/spatialite-tools/CONTROL new file mode 100644 index 0000000..7ef2a32 --- /dev/null +++ b/vcpkg/ports/spatialite-tools/CONTROL @@ -0,0 +1,6 @@ +Source: spatialite-tools +Version: 4.3.0 +Port-Version: 4 +Homepage: https://www.gaia-gis.it/fossil/spatialite-tools/index +Description: Contains spatialite.exe and other command line tools to work with SpatiaLite databases (import, export, SQL queries) +Build-Depends: sqlite3, libspatialite, geos, readosm, proj4, zlib, libiconv, expat diff --git a/vcpkg/ports/spatialite-tools/fix-makefiles.patch b/vcpkg/ports/spatialite-tools/fix-makefiles.patch new file mode 100644 index 0000000..ff6e0ad --- /dev/null +++ b/vcpkg/ports/spatialite-tools/fix-makefiles.patch @@ -0,0 +1,128 @@ +diff --git a/makefile.vc b/makefile.vc +index 33c85d2..c811e7d 100644 +--- a/makefile.vc ++++ b/makefile.vc +@@ -15,7 +15,7 @@ SPATIALITE_OSM_RAW_EXE = spatialite_osm_raw.exe + SPATIALITE_OSM_FILTER_EXE = spatialite_osm_filter.exe + SPATIALITE_GML_EXE = spatialite_gml.exe + +-CFLAGS = /nologo -IC:\OSGeo4W\include $(OPTFLAGS) ++CFLAGS = /nologo -I$(INSTALLED_ROOT)\include $(OPTFLAGS) + + default: all + +@@ -26,89 +26,58 @@ all: $(SPATIALITE_EXE) $(SHP_DOCTOR_EXE) $(SPATIALITE_TOOL_EXE) \ + $(SPATIALITE_OSM_FILTER_EXE) + + $(SPATIALITE_EXE): shell.obj +- cl shell.obj C:\OSGeo4W\lib\proj_i.lib \ +- C:\OSGeo4W\lib\iconv.lib C:\OSGeo4W\lib\geos_c.lib \ +- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib \ +- /Fe$(SPATIALITE_EXE) ++ cl shell.obj $(LIBS_ALL) /Fe$(SPATIALITE_EXE) + if exist $(SPATIALITE_EXE).manifest mt -manifest \ + $(SPATIALITE_EXE).manifest -outputresource:$(SPATIALITE_EXE);1 + + $(EXIF_LOADER_EXE): exif_loader.obj +- cl exif_loader.obj C:\OSGeo4W\lib\proj_i.lib \ +- C:\OSGeo4W\lib\iconv.lib C:\OSGeo4W\lib\geos_c.lib \ +- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib ++ cl exif_loader.obj $(LIBS_ALL) + if exist $(EXIF_LOADER_EXE).manifest mt -manifest \ + $(EXIF_LOADER_EXE).manifest -outputresource:$(EXIF_LOADER_EXE);1 + + $(SHP_DOCTOR_EXE): shp_doctor.obj +- cl shp_doctor.obj C:\OSGeo4W\lib\proj_i.lib \ +- C:\OSGeo4W\lib\iconv.lib C:\OSGeo4W\lib\geos_c.lib \ +- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib ++ cl shp_doctor.obj $(LIBS_ALL) + if exist $(SHP_DOCTOR_EXE).manifest mt -manifest \ + $(SHP_DOCTOR_EXE).manifest -outputresource:$(SHP_DOCTOR_EXE);1 + + $(SPATIALITE_NETWORK_EXE): spatialite_network.obj +- cl spatialite_network.obj C:\OSGeo4W\lib\proj_i.lib \ +- C:\OSGeo4W\lib\iconv.lib \ +- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib ++ cl spatialite_network.obj $(LIBS_ALL) + if exist $(SPATIALITE_NETWORK_EXE).manifest mt -manifest \ + $(SPATIALITE_TOOL_EXE).manifest \ + -outputresource:$(SPATIALITE_TOOL_EXE);1 + + $(SPATIALITE_TOOL_EXE): spatialite_tool.obj +- cl spatialite_tool.obj C:\OSGeo4W\lib\proj_i.lib \ +- C:\OSGeo4W\lib\iconv.lib C:\OSGeo4W\lib\geos_c.lib \ +- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib ++ cl spatialite_tool.obj $(LIBS_ALL) + if exist $(SPATIALITE_TOOL_EXE).manifest mt -manifest \ + $(SPATIALITE_TOOL_EXE).manifest \ + -outputresource:$(SPATIALITE_TOOL_EXE);1 + + $(SPATIALITE_OSM_NET_EXE): spatialite_osm_net.obj +- cl spatialite_osm_net.obj C:\OSGeo4W\lib\proj_i.lib \ +- C:\OSGeo4W\lib\iconv.lib \ +- C:\OSGeo4W\lib\readosm_i.lib \ +- C:\OSGeo4W\lib\libexpat.lib \ +- C:\OSGeo4W\lib\zlib.lib \ +- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib ++ cl spatialite_osm_net.obj $(LIBS_ALL) + if exist $(SPATIALITE_OSM_EXE).manifest mt -manifest \ + $(SPATIALITE_OSM_EXE).manifest \ + -outputresource:$(SPATIALITE_OSM_NET_EXE);1 + + $(SPATIALITE_OSM_MAP_EXE): spatialite_osm_map.obj +- cl spatialite_osm_map.obj C:\OSGeo4W\lib\proj_i.lib \ +- C:\OSGeo4W\lib\iconv.lib \ +- C:\OSGeo4W\lib\readosm_i.lib \ +- C:\OSGeo4W\lib\libexpat.lib \ +- C:\OSGeo4W\lib\zlib.lib \ +- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib ++ cl spatialite_osm_map.obj $(LIBS_ALL) + if exist $(SPATIALITE_OSM_MAP_EXE).manifest mt -manifest \ + $(SPATIALITE_OSM_MAP_EXE).manifest \ + -outputresource:$(SPATIALITE_OSM_MAP_EXE);1 + + $(SPATIALITE_GML_EXE): spatialite_gml.obj +- cl spatialite_gml.obj C:\OSGeo4W\lib\proj_i.lib \ +- C:\OSGeo4W\lib\iconv.lib \ +- C:\OSGeo4W\lib\libexpat.lib \ +- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib ++ cl spatialite_gml.obj $(LIBS_ALL) + if exist $(SPATIALITE_GML_EXE).manifest mt -manifest \ + $(SPATIALITE_GML_EXE).manifest \ + -outputresource:$(SPATIALITE_GML_EXE);1 + + $(SPATIALITE_OSM_RAW_EXE): spatialite_osm_raw.obj +- cl spatialite_osm_raw.obj C:\OSGeo4W\lib\proj_i.lib \ +- C:\OSGeo4W\lib\iconv.lib \ +- C:\OSGeo4W\lib\readosm_i.lib \ +- C:\OSGeo4W\lib\libexpat.lib \ +- C:\OSGeo4W\lib\zlib.lib \ +- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib ++ cl spatialite_osm_raw.obj $(LIBS_ALL) + if exist $(SPATIALITE_OSM_RAW_EXE).manifest mt -manifest \ + $(SPATIALITE_OSM_RAW_EXE).manifest \ + -outputresource:$(SPATIALITE_OSM_RAW_EXE);1 + + $(SPATIALITE_OSM_FILTER_EXE): spatialite_osm_filter.obj +- cl spatialite_osm_filter.obj C:\OSGeo4W\lib\proj_i.lib \ +- C:\OSGeo4W\lib\iconv.lib \ +- C:\OSGeo4W\lib\spatialite_i.lib C:\OSGeo4W\lib\sqlite3_i.lib ++ cl spatialite_osm_filter.obj $(LIBS_ALL) + if exist $(SPATIALITE_OSM_FILTER_EXE).manifest mt -manifest \ + $(SPATIALITE_OSM_FILTER_EXE).manifest \ + -outputresource:$(SPATIALITE_OSM_FILTER_EXE);1 +diff --git a/nmake.opt b/nmake.opt +index 4f4a953..d9efecf 100644 +--- a/nmake.opt ++++ b/nmake.opt +@@ -1,8 +1,8 @@ + # Directory tree where SpatiaLite will be installed. +-INSTDIR=C:\OSGeo4W ++INSTDIR=$(INST_DIR) + + # Uncomment the first for an optimized build, or the second for debug. +-OPTFLAGS= /nologo /Ox /fp:precise /W3 /MD /D_CRT_SECURE_NO_WARNINGS \ ++OPTFLAGS= /nologo /fp:precise /W3 $(CL_FLAGS) /D_CRT_SECURE_NO_WARNINGS \ + /D_LARGE_FILE=1 /D_FILE_OFFSET_BITS=64 /D_LARGEFILE_SOURCE=1 + #OPTFLAGS= /nologo /Zi /MD /Fdspatialite.pdb + diff --git a/vcpkg/ports/spatialite-tools/portfile.cmake b/vcpkg/ports/spatialite-tools/portfile.cmake new file mode 100644 index 0000000..eacba0c --- /dev/null +++ b/vcpkg/ports/spatialite-tools/portfile.cmake @@ -0,0 +1,120 @@ +option(BUILD_DEBUG_TOOLS "Build debug version of tools" OFF) + +vcpkg_download_distfile(ARCHIVE + URLS "http://www.gaia-gis.it/gaia-sins/spatialite-tools-sources/spatialite-tools-4.3.0.tar.gz" + FILENAME "spatialite-tools-4.3.0.tar.gz" + SHA512 e1de27c1c65ff2ff0b08583113517bea74edf33fff59ad6e9c77492ea3ae87d9c0f17d7670ee6602b32eea73ad3678bb5410ef2c6fac6e213bf2e341a907db88 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + fix-makefiles.patch +) + +find_program(NMAKE nmake) + +set(LDIR "\"${CURRENT_INSTALLED_DIR}\"") + +if(VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(CL_FLAGS_DBG "/MDd /Zi /DACCEPT_USE_OF_DEPRECATED_PROJ_API_H") + set(CL_FLAGS_REL "/MD /Ox /DACCEPT_USE_OF_DEPRECATED_PROJ_API_H") + set(GEOS_LIBS_REL "${LDIR}/lib/geos_c.lib") + set(GEOS_LIBS_DBG "${LDIR}/debug/lib/geos_cd.lib") + set(LIBXML2_LIBS_REL "${LDIR}/lib/libxml2.lib") + set(LIBXML2_LIBS_DBG "${LDIR}/debug/lib/libxml2.lib") + set(SPATIALITE_LIBS_REL "${LDIR}/lib/spatialite.lib") + set(SPATIALITE_LIBS_DBG "${LDIR}/debug/lib/spatialite.lib") + set(ICONV_LIBS_REL "${LDIR}/lib/libiconv.lib") + set(ICONV_LIBS_DBG "${LDIR}/debug/lib/libiconv.lib") + set(EXPAT_LIBS_REL "${LDIR}/lib/libexpat.lib") + set(EXPAT_LIBS_DBG "${LDIR}/debug/lib/libexpatd.lib") +else() + set(CL_FLAGS_DBG "/MTd /Zi /DACCEPT_USE_OF_DEPRECATED_PROJ_API_H") + set(CL_FLAGS_REL "/MT /Ox /DACCEPT_USE_OF_DEPRECATED_PROJ_API_H") + set(GEOS_LIBS_REL "${LDIR}/lib/geos_c.lib ${LDIR}/lib/geos.lib") + set(GEOS_LIBS_DBG "${LDIR}/debug/lib/geos_cd.lib ${LDIR}/debug/lib/geosd.lib") + set(LIBXML2_LIBS_REL "${LDIR}/lib/libxml2.lib ${LDIR}/lib/lzma.lib ws2_32.lib") + set(LIBXML2_LIBS_DBG "${LDIR}/debug/lib/libxml2.lib ${LDIR}/debug/lib/lzmad.lib ws2_32.lib") + set(SPATIALITE_LIBS_REL "${LDIR}/lib/spatialite.lib ${LDIR}/lib/freexl.lib") + set(SPATIALITE_LIBS_DBG "${LDIR}/debug/lib/spatialite.lib ${LDIR}/debug/lib/freexl.lib") + set(ICONV_LIBS_REL "${LDIR}/lib/libiconv.lib ${LDIR}/lib/libcharset.lib") + set(ICONV_LIBS_DBG "${LDIR}/debug/lib/libiconv.lib ${LDIR}/debug/lib/libcharset.lib ") + set(EXPAT_LIBS_REL "${LDIR}/lib/libexpatMD.lib") + set(EXPAT_LIBS_DBG "${LDIR}/debug/lib/libexpatdMD.lib") +endif() + +set(LIBS_ALL_DBG + "${ICONV_LIBS_DBG} \ + ${LDIR}/debug/lib/sqlite3.lib \ + ${SPATIALITE_LIBS_DBG} \ + ${LIBXML2_LIBS_DBG} \ + ${GEOS_LIBS_DBG} \ + ${EXPAT_LIBS_DBG} \ + ${LDIR}/debug/lib/readosm.lib \ + ${LDIR}/debug/lib/zlibd.lib \ + ${LDIR}/debug/lib/proj_d.lib" + ) +set(LIBS_ALL_REL + "${ICONV_LIBS_REL} \ + ${LDIR}/lib/sqlite3.lib \ + ${SPATIALITE_LIBS_REL} \ + ${LIBXML2_LIBS_REL} \ + ${GEOS_LIBS_REL} \ + ${EXPAT_LIBS_REL} \ + ${LDIR}/lib/readosm.lib \ + ${LDIR}/lib/zlib.lib \ + ${LDIR}/lib/proj.lib" + ) + +if(BUILD_DEBUG_TOOLS) + ################ + # Debug build + ################ + message(STATUS "Building ${TARGET_TRIPLET}-dgb") + + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL) + vcpkg_execute_required_process( + COMMAND ${NMAKE} -f makefile.vc clean install + "INST_DIR=\"${INST_DIR_REL}\"" "INSTALLED_ROOT=${LDIR}" "CL_FLAGS=${CL_FLAGS_DBG}" "LIBS_ALL=${LIBS_ALL_DBG}" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME nmake-build-${TARGET_TRIPLET}-debug + ) + message(STATUS "Building ${TARGET_TRIPLET}-dbg done") + set(EXE_FOLDER ${CURRENT_PACKAGES_DIR}/bin/) +else() + ################ + # Release build + ################ + message(STATUS "Building ${TARGET_TRIPLET}-rel") + + file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" INST_DIR_REL) + vcpkg_execute_required_process( + COMMAND ${NMAKE} -f makefile.vc clean install + "INST_DIR=\"${INST_DIR_REL}\"" "INSTALLED_ROOT=${LDIR}" "CL_FLAGS=${CL_FLAGS_REL}" "LIBS_ALL=${LIBS_ALL_REL}" + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME nmake-build-${TARGET_TRIPLET}-release + ) + message(STATUS "Building ${TARGET_TRIPLET}-rel done") + set(EXE_FOLDER ${CURRENT_PACKAGES_DIR}/bin/) +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}/) +file(GLOB EXES "${EXE_FOLDER}/*.exe") +file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) +file(REMOVE ${EXES}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include) + +if(NOT BUILD_DEBUG_TOOLS AND VCPKG_CRT_LINKAGE STREQUAL dynamic) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) +endif() + +message(STATUS "Packaging ${TARGET_TRIPLET} done") + +# Allow empty include directory +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/vcpkg/ports/spdk-dpdk/CMakeLists.txt b/vcpkg/ports/spdk-dpdk/CMakeLists.txt new file mode 100644 index 0000000..1952227 --- /dev/null +++ b/vcpkg/ports/spdk-dpdk/CMakeLists.txt @@ -0,0 +1,63 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 3.9) +PROJECT(dpdk C) + +LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}") +LIST(APPEND CMAKE_PREFIX_PATH "${CMAKE_SOURCE_DIR}") + +INCLUDE(ProcessorCount) +PROCESSORCOUNT(PROCS) + +#ARCH can be: i686, x86_64, ppc_64, arm64 +#MACHINE can be: native, power8, armv8a +#EXECENV can be: linuxapp, bsdapp +#TOOLCHAIN can be: gcc, icc + +SET(ARCH x86_64) +SET(MACHINE native) +SET(EXECENV linuxapp) +SET(TOOLCHAIN gcc) + +IF (CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$") + SET(ARCH "i686") +ELSEIF (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm") + SET(MACHINE arm8a) +ELSEIF (CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64") + SET(MACHINE power8) + SET(ARCH ppc_64) +ENDIF () + +IF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + SET(EXECENV bsdapp) +ENDIF () + +FIND_PACKAGE(Numa REQUIRED) +FIND_PROGRAM(MAKE make) + +SET(DPDK_CFLAGS "-fPIC") +IF (CMAKE_BUILD_TYPE STREQUAL Debug) + STRING(APPEND ${DPDK_CFLAGS} "-O0 -g") +ENDIF () + +SET(DPDK_TARGET ${ARCH}-${MACHINE}-${EXECENV}-${TOOLCHAIN}) +#SET(DPDK_CONFIG O=${CMAKE_BUILD_TYPE}/build T=${DPDK_TARGET}) +SET(DPDK_CONFIG "T=${DPDK_TARGET}") + +IF (SOURCE_PATH) + SET(CMAKE_SOURCE_DIR ${SOURCE_PATH}) +ENDIF () + +ADD_CUSTOM_TARGET(dpdk-configure + COMMAND ${MAKE} config ${DPDK_CONFIG} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/ + VERBATIM + ) + +ADD_CUSTOM_TARGET(dpdk ALL + COMMAND ${MAKE} EXTRA_CFLAGS=\"${DPDK_CFLAGS}\" MAKEFLAGS=\"${DPDK_CONFIG} -j ${PROCS}\" + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/ + ) + +ADD_DEPENDENCIES(dpdk dpdk-configure) + +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/build/lib + DESTINATION ${CMAKE_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/) diff --git a/vcpkg/ports/spdk-dpdk/CONTROL b/vcpkg/ports/spdk-dpdk/CONTROL new file mode 100644 index 0000000..61d1415 --- /dev/null +++ b/vcpkg/ports/spdk-dpdk/CONTROL @@ -0,0 +1,4 @@ +Source: spdk-dpdk +Version: 20181124 +Description: SPDK mirror of DPDK. A set of libraries and drivers for fast packet processing +Supports: linux diff --git a/vcpkg/ports/spdk-dpdk/FindNuma.cmake b/vcpkg/ports/spdk-dpdk/FindNuma.cmake new file mode 100644 index 0000000..d5bb614 --- /dev/null +++ b/vcpkg/ports/spdk-dpdk/FindNuma.cmake @@ -0,0 +1,26 @@ +INCLUDE(FindPackageHandleStandardArgs) + +FIND_PATH(NUMA_ROOT_DIR + NAMES include/numa.h + PATHS ENV NUMA_ROOT + DOC "NUMA library root directory") + +FIND_PATH(NUMA_INCLUDE_DIR + NAMES numa.h + HINTS ${NUMA_ROOT_DIR} + PATH_SUFFIXES include + DOC "NUMA include directory") + +FIND_LIBRARY(NUMA_LIBRARY + NAMES numa + HINTS ${NUMA_ROOT_DIR} + DOC "NUMA library file") + +IF (NUMA_LIBRARY) + GET_FILENAME_COMPONENT(NUMA_LIBRARY_DIR ${NUMA_LIBRARY} PATH) + MARK_AS_ADVANCED(NUMA_INCLUDE_DIR NUMA_LIBRARY_DIR NUMA_LIBRARY) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(NUMA REQUIRED_VARS NUMA_ROOT_DIR NUMA_INCLUDE_DIR NUMA_LIBRARY) +ELSE () + SET(NUMA_FOUND FALSE) + MESSAGE(FATAL_ERROR "Numa library not found.\nTry: 'sudo yum install numactl numactl-devel' (or sudo apt-get install libnuma1 libnuma-dev)") +ENDIF () diff --git a/vcpkg/ports/spdk-dpdk/portfile.cmake b/vcpkg/ports/spdk-dpdk/portfile.cmake new file mode 100644 index 0000000..0a120e4 --- /dev/null +++ b/vcpkg/ports/spdk-dpdk/portfile.cmake @@ -0,0 +1,47 @@ +INCLUDE(vcpkg_common_functions) + +IF (NOT VCPKG_CMAKE_SYSTEM_NAME OR NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + MESSAGE(FATAL_ERROR "Intel dpdk currently only supports Linux/BSD platforms") +ENDIF () + +VCPKG_FROM_GITHUB( + OUT_SOURCE_PATH SOURCE_PATH + REPO spdk/dpdk + REF spdk-18.11 + SHA512 9c069bb0e445f8287ee056452fa32263746f78e27377e8fd75809b9ebf7f25c2395ee13ae4804d8c464e5bc7db7335692759ab3202748dd0c82243aad35e5e7c + HEAD_REF master +) + +FIND_PATH(NUMA_INCLUDE_DIR NAME numa.h + PATHS ENV NUMA_ROOT + HINTS $ENV{HOME}/local/include /opt/local/include /usr/local/include /usr/include + ) +IF (NOT NUMA_INCLUDE_DIR) + MESSAGE(FATAL_ERROR "Numa library not found.\nTry: 'sudo yum install numactl numactl-devel' (or sudo apt-get install libnuma1 libnuma-dev)") +ENDIF () + +VCPKG_CONFIGURE_CMAKE( + SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR} + PREFER_NINJA + OPTIONS + -DSOURCE_PATH=${SOURCE_PATH} +) + +VCPKG_INSTALL_CMAKE() + +# Headers are symbolic links here, gather all, resolve and copy real files +FILE(GLOB_RECURSE HEADERS FOLLOW_SYMLINKS "${SOURCE_PATH}/build/include/*") +SET(REAL_FILES "") +FOREACH (HEADER ${HEADERS}) + GET_FILENAME_COMPONENT(REAL_FILE "${HEADER}" REALPATH) + LIST(APPEND REAL_FILES "${REAL_FILE}") +ENDFOREACH () + +FILE(INSTALL ${SOURCE_PATH}/Release/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib/spdk) +FILE(INSTALL ${SOURCE_PATH}/Debug/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/spdk) +FILE(INSTALL ${REAL_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/spdk-dpdkConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +FILE(INSTALL ${SOURCE_PATH}/license/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +VCPKG_TEST_CMAKE(PACKAGE_NAME ${PORT}) diff --git a/vcpkg/ports/spdk-dpdk/spdk-dpdkConfig.cmake b/vcpkg/ports/spdk-dpdk/spdk-dpdkConfig.cmake new file mode 100644 index 0000000..85b8508 --- /dev/null +++ b/vcpkg/ports/spdk-dpdk/spdk-dpdkConfig.cmake @@ -0,0 +1,31 @@ + +FUNCTION(SET_LIBRARY_TARGET NAMESPACE LIB_NAME DEBUG_LIB_FILE_NAME RELEASE_LIB_FILE_NAME INCLUDE_DIR) + ADD_LIBRARY(${NAMESPACE}::${LIB_NAME} STATIC IMPORTED) + SET_TARGET_PROPERTIES(${NAMESPACE}::${LIB_NAME} PROPERTIES + IMPORTED_CONFIGURATIONS "RELEASE;DEBUG" + IMPORTED_LOCATION_RELEASE "${RELEASE_LIB_FILE_NAME}" + IMPORTED_LOCATION_DEBUG "${DEBUG_LIB_FILE_NAME}" + INTERFACE_INCLUDE_DIRECTORIES "${INCLUDE_DIR}" + ) + SET(${NAMESPACE}_${LIB_NAME}_FOUND 1) +ENDFUNCTION() + +GET_FILENAME_COMPONENT(DPDK_ROOT "${CMAKE_CURRENT_LIST_FILE}" PATH) +GET_FILENAME_COMPONENT(DPDK_ROOT "${DPDK_ROOT}" PATH) +GET_FILENAME_COMPONENT(DPDK_ROOT "${DPDK_ROOT}" PATH) + +SET_LIBRARY_TARGET("SPDK" "dpdk" "${DPDK_ROOT}/debug/lib/spdk/libdpdk.a" "${DPDK_ROOT}/lib/spdk/libdpdk.a" "${DPDK_ROOT}/include/spdk-dpdk") + +IF (CMAKE_BUILD_TYPE STREQUAL Debug) + LINK_DIRECTORIES(${DPDK_ROOT}/debug/lib/spdk) +ELSE () + LINK_DIRECTORIES(${DPDK_ROOT}/lib/spdk) +ENDIF () + +FILE(GLOB DPDK_LIBS ${DPDK_ROOT}/lib/spdk/librte*.*) +FOREACH (LIB_FILE_NAME ${DPDK_LIBS}) + GET_FILENAME_COMPONENT(LIB_NAME ${LIB_FILE_NAME} NAME_WE) + GET_FILENAME_COMPONENT(FULL_LIB_NAME ${LIB_FILE_NAME} NAME) + STRING(REPLACE "lib" "" LIB_NAME "${LIB_NAME}") + SET_LIBRARY_TARGET("SPDK" "${LIB_NAME}" "${DPDK_ROOT}/debug/lib/spdk/${FULL_LIB_NAME}" "${DPDK_ROOT}/lib/spdk/${FULL_LIB_NAME}" "${DPDK_ROOT}/include/spdk-dpdk") +ENDFOREACH () diff --git a/vcpkg/ports/spdk-dpdk/usage b/vcpkg/ports/spdk-dpdk/usage new file mode 100644 index 0000000..4fc9ddf --- /dev/null +++ b/vcpkg/ports/spdk-dpdk/usage @@ -0,0 +1 @@ +This package is a dependency of SPDK port. It is not intended for direct consumption by end-user. \ No newline at end of file diff --git a/vcpkg/ports/spdk-ipsec/CMakeLists.txt b/vcpkg/ports/spdk-ipsec/CMakeLists.txt new file mode 100644 index 0000000..fb02b16 --- /dev/null +++ b/vcpkg/ports/spdk-ipsec/CMakeLists.txt @@ -0,0 +1,57 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 3.9) +PROJECT(ipsec C) + +IF (SOURCE_PATH) + SET(CMAKE_SOURCE_DIR ${SOURCE_PATH}) +ENDIF () + +INCLUDE(ProcessorCount) +PROCESSORCOUNT(PROCS) + +FIND_PROGRAM(NASM nasm) +IF (NOT NASM) + MESSAGE(FATAL_ERROR "NASM not found") +ENDIF () + +FIND_PROGRAM(MAKE make) +IF (NOT MAKE) + MESSAGE(FATAL_ERROR "MAKE not found") +ENDIF () + +IF (EXEC_ENV STREQUAL "Windows") + FIND_PROGRAM(MAKE nmake) + IF (NOT MAKE) + MESSAGE(FATAL_ERROR "nmake not found") + ENDIF () +ENDIF () + +SET(MAKE_FLAGS) + +IF (EXEC_ENV STREQUAL "Windows") + LIST(APPEND MAKE_FLAGS /f win_x64.mak) +ENDIF () + +IF (CMAKE_BUILD_TYPE STREQUAL Debug) + LIST(APPEND MAKE_FLAGS DEBUG=y) +ENDIF () + +IF (NOT BUILD_SHARED_LIBS) + LIST(APPEND MAKE_FLAGS SHARED=n) +ENDIF () + +MESSAGE(STATUS "${MAKE_FLAGS}") +ADD_CUSTOM_TARGET(ipsec-mb ALL + COMMAND ${MAKE} -j ${MAKE_FLAGS} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/ +# VERBATIM + ) + +SET(LIB_PATH ${CMAKE_SOURCE_DIR}/) +IF(BUILD_SHARED_LIBS) + STRING(APPEND LIB_PATH libIPSec_MB.so) +ELSE () + STRING(APPEND LIB_PATH libIPSec_MB.a) +ENDIF () +INSTALL(FILES ${LIB_PATH} + DESTINATION ${CMAKE_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/lib/) +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/include DESTINATION ${CMAKE_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/) diff --git a/vcpkg/ports/spdk-ipsec/CONTROL b/vcpkg/ports/spdk-ipsec/CONTROL new file mode 100644 index 0000000..3b82594 --- /dev/null +++ b/vcpkg/ports/spdk-ipsec/CONTROL @@ -0,0 +1,4 @@ +Source: spdk-ipsec +Version: 20180711 +Description: SPDK mirror of ipsec. Intel(R) Multi-Buffer Crypto for IPsec Library +Supports: x64 & linux diff --git a/vcpkg/ports/spdk-ipsec/portfile.cmake b/vcpkg/ports/spdk-ipsec/portfile.cmake new file mode 100644 index 0000000..3ed53c2 --- /dev/null +++ b/vcpkg/ports/spdk-ipsec/portfile.cmake @@ -0,0 +1,58 @@ +IF (NOT VCPKG_CMAKE_SYSTEM_NAME) + SET(EXEC_ENV "Windows") +ELSE () + SET(EXEC_ENV "${VCPKG_CMAKE_SYSTEM_NAME}") +ENDIF () + +IF (NOT VCPKG_TARGET_IS_LINUX) + MESSAGE(FATAL_ERROR "Intel(R) Multi-Buffer Crypto for IPsec Library currently only supports Linux/Windows platforms") + MESSAGE(STATUS "Well, it is not true, but I didnt manage to get it working on Windows") +ENDIF () + +IF (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + MESSAGE(FATAL_ERROR "Intel(R) Multi-Buffer Crypto for IPsec Library currently only supports x64 architecture") +ELSEIF (NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + MESSAGE(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") +ENDIF () + +VCPKG_FROM_GITHUB( + OUT_SOURCE_PATH SOURCE_PATH + REPO spdk/intel-ipsec-mb + REF spdk + SHA512 037fc382d9aa87b6645309f29cb761a584ed855c583638c9e27b5b7200ceb2ae21ad5adcc7c92b2b1d1387186a7fd2b5ae22f337a8f52dea3f6c35d8f90b42bd + HEAD_REF master +) + +VCPKG_FIND_ACQUIRE_PROGRAM(NASM) + +execute_process( + COMMAND "${NASM}" -v + OUTPUT_VARIABLE NASM_OUTPUT + ERROR_VARIABLE NASM_OUTPUT +) +STRING(REGEX REPLACE "NASM version ([0-9]+\\.[0-9]+\\.[0-9]+).*" "\\1" NASM_VERSION "${NASM_OUTPUT}") +IF (NASM_VERSION VERSION_LESS 2.13.03) + MESSAGE(FATAL_ERROR "NASM version 2.13.03 (or newer) is required to build this package") +ENDIF () + +GET_FILENAME_COMPONENT(NASM_PATH ${NASM} DIRECTORY) +vcpkg_add_to_path("${NASM_PATH}") + +VCPKG_CONFIGURE_CMAKE( + SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR} + PREFER_NINJA + OPTIONS + -DSOURCE_PATH=${SOURCE_PATH} + -DEXEC_ENV=${VCPKG_CMAKE_SYSTEM_NAME} +) + +VCPKG_INSTALL_CMAKE() + +FILE(INSTALL ${SOURCE_PATH}/Release/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib/spdk) +FILE(INSTALL ${SOURCE_PATH}/Debug/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/spdk) +FILE(INSTALL ${SOURCE_PATH}/Release/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/spdk-ipsecConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +FILE(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +VCPKG_TEST_CMAKE(PACKAGE_NAME ${PORT}) diff --git a/vcpkg/ports/spdk-ipsec/spdk-ipsecConfig.cmake b/vcpkg/ports/spdk-ipsec/spdk-ipsecConfig.cmake new file mode 100644 index 0000000..60777b9 --- /dev/null +++ b/vcpkg/ports/spdk-ipsec/spdk-ipsecConfig.cmake @@ -0,0 +1,17 @@ + +FUNCTION(SET_LIBRARY_TARGET NAMESPACE LIB_NAME DEBUG_LIB_FILE_NAME RELEASE_LIB_FILE_NAME INCLUDE_DIR) + ADD_LIBRARY(${NAMESPACE}::${LIB_NAME} STATIC IMPORTED) + SET_TARGET_PROPERTIES(${NAMESPACE}::${LIB_NAME} PROPERTIES + IMPORTED_CONFIGURATIONS "RELEASE;DEBUG" + IMPORTED_LOCATION_RELEASE "${RELEASE_LIB_FILE_NAME}" + IMPORTED_LOCATION_DEBUG "${DEBUG_LIB_FILE_NAME}" + INTERFACE_INCLUDE_DIRECTORIES "${INCLUDE_DIR}" + ) + SET(${NAMESPACE}_${LIB_NAME}_FOUND 1) +ENDFUNCTION() + +GET_FILENAME_COMPONENT(ROOT "${CMAKE_CURRENT_LIST_FILE}" PATH) +GET_FILENAME_COMPONENT(ROOT "${ROOT}" PATH) +GET_FILENAME_COMPONENT(ROOT "${ROOT}" PATH) + +SET_LIBRARY_TARGET("SPDK" "ipsec" "${ROOT}/debug/lib/spdk/libIPSec_MB.a" "${ROOT}/lib/spdk/libIPSec_MB.a" "${ROOT}/include/spdk-ipsec") diff --git a/vcpkg/ports/spdk-ipsec/usage b/vcpkg/ports/spdk-ipsec/usage new file mode 100644 index 0000000..4fc9ddf --- /dev/null +++ b/vcpkg/ports/spdk-ipsec/usage @@ -0,0 +1 @@ +This package is a dependency of SPDK port. It is not intended for direct consumption by end-user. \ No newline at end of file diff --git a/vcpkg/ports/spdk-isal/CMakeLists.txt b/vcpkg/ports/spdk-isal/CMakeLists.txt new file mode 100644 index 0000000..c2623d3 --- /dev/null +++ b/vcpkg/ports/spdk-isal/CMakeLists.txt @@ -0,0 +1,56 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 3.9) +PROJECT(isal C) + +IF (SOURCE_PATH) + SET(CMAKE_SOURCE_DIR ${SOURCE_PATH}) +ENDIF () + +INCLUDE(ProcessorCount) +PROCESSORCOUNT(PROCS) + +FIND_PROGRAM(NASM nasm) +IF (NOT NASM) + MESSAGE(FATAL_ERROR "NASM not found") +ENDIF () + +FIND_PROGRAM(YASM yasm) +IF (NOT YASM) + MESSAGE(FATAL_ERROR "YASM not found") +ENDIF () + +IF (EXEC_ENV STREQUAL "Windows") + FIND_PROGRAM(MAKE nmake) + IF (NOT MAKE) + MESSAGE(FATAL_ERROR "nmake not found") + ENDIF () +ELSEIF(EXEC_ENV STREQUAL "Linux") + FIND_PROGRAM(MAKE make) + IF (NOT MAKE) + MESSAGE(FATAL_ERROR "MAKE not found") + ENDIF () +ENDIF() + +SET(MAKE_FLAGS "-f") + +IF (EXEC_ENV STREQUAL Windows) + STRING(APPEND MAKE_FLAGS " Makefile.nmake /E CC=cl AS=nasm") +ELSEIF (EXEC_ENV STREQUAL Linux) + STRING(APPEND MAKE_FLAGS "Makefile.unx") +ENDIF () + +ADD_CUSTOM_TARGET(isal ALL + COMMAND ${MAKE} ${MAKE_FLAGS} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/ + ) + +SET(LIB_PATH ${CMAKE_SOURCE_DIR}/bin/) +IF (LIBRARY_LINKAGE STREQUAL "dynamic") + STRING(APPEND LIB_PATH isal.so) +ELSEIF (LIBRARY_LINKAGE STREQUAL "static") + STRING(APPEND LIB_PATH isa-l.a) +ELSE () + MESSAGE(FATAL_ERROR "Unknown linkage type ${LIBRARY_LINKAGE}") +ENDIF () +INSTALL(FILES ${LIB_PATH} + DESTINATION ${CMAKE_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/lib/) +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/include DESTINATION ${CMAKE_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/) \ No newline at end of file diff --git a/vcpkg/ports/spdk-isal/CONTROL b/vcpkg/ports/spdk-isal/CONTROL new file mode 100644 index 0000000..1a134ae --- /dev/null +++ b/vcpkg/ports/spdk-isal/CONTROL @@ -0,0 +1,4 @@ +Source: spdk-isal +Version: 20181006 +Description: SPDK mirror of isa-l. Intel(R) Intelligent Storage Acceleration Library +Supports: x64 diff --git a/vcpkg/ports/spdk-isal/portfile.cmake b/vcpkg/ports/spdk-isal/portfile.cmake new file mode 100644 index 0000000..530d8da --- /dev/null +++ b/vcpkg/ports/spdk-isal/portfile.cmake @@ -0,0 +1,52 @@ +INCLUDE(vcpkg_common_functions) + +IF (NOT VCPKG_CMAKE_SYSTEM_NAME) + SET(EXEC_ENV "Windows") +ELSE () + SET(EXEC_ENV "${VCPKG_CMAKE_SYSTEM_NAME}") +ENDIF () + +IF (NOT EXEC_ENV STREQUAL "Linux") + MESSAGE(FATAL_ERROR "Intel(R) Intelligent Storage Acceleration Library currently only supports Linux platforms") + MESSAGE(STATUS "Well, it is not true, but I didnt manage to get it working on Windows") +ENDIF () + +IF (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + MESSAGE(FATAL_ERROR "Intel(R) Intelligent Storage Acceleration Library currently only supports x64 architecture") +ELSEIF (NOT VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + MESSAGE(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") +ENDIF () + +VCPKG_FROM_GITHUB( + OUT_SOURCE_PATH SOURCE_PATH + REPO spdk/isa-l + REF spdk + SHA512 1d170ed050fb612816c77b3586f1cdce9129eedc559e3fcefc983ede05b6c8e13a52e400ee6935f5da6ab045a899c97f6ed6be3a79691284e211ea8a6d697f7c + HEAD_REF master +) + +VCPKG_FIND_ACQUIRE_PROGRAM(NASM) +GET_FILENAME_COMPONENT(NASM_PATH ${NASM} DIRECTORY) +SET(ENV{PATH} "$ENV{PATH};${NASM_PATH}") + +VCPKG_FIND_ACQUIRE_PROGRAM(YASM) + +VCPKG_CONFIGURE_CMAKE( + SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR} + PREFER_NINJA + OPTIONS + -DSOURCE_PATH=${SOURCE_PATH} + -DEXEC_ENV:STRING=${EXEC_ENV} + -DLIBRARY_LINKAGE:STRING=${VCPKG_LIBRARY_LINKAGE} +) + +VCPKG_INSTALL_CMAKE() + +FILE(INSTALL ${SOURCE_PATH}/Release/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib/spdk) +FILE(INSTALL ${SOURCE_PATH}/Debug/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/spdk) +FILE(INSTALL ${SOURCE_PATH}/Release/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/spdk-isalConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +FILE(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +VCPKG_TEST_CMAKE(PACKAGE_NAME ${PORT}) diff --git a/vcpkg/ports/spdk-isal/spdk-isalConfig.cmake b/vcpkg/ports/spdk-isal/spdk-isalConfig.cmake new file mode 100644 index 0000000..f14282f --- /dev/null +++ b/vcpkg/ports/spdk-isal/spdk-isalConfig.cmake @@ -0,0 +1,17 @@ + +FUNCTION(SET_LIBRARY_TARGET NAMESPACE LIB_NAME DEBUG_LIB_FILE_NAME RELEASE_LIB_FILE_NAME INCLUDE_DIR) + ADD_LIBRARY(${NAMESPACE}::${LIB_NAME} STATIC IMPORTED) + SET_TARGET_PROPERTIES(${NAMESPACE}::${LIB_NAME} PROPERTIES + IMPORTED_CONFIGURATIONS "RELEASE;DEBUG" + IMPORTED_LOCATION_RELEASE "${RELEASE_LIB_FILE_NAME}" + IMPORTED_LOCATION_DEBUG "${DEBUG_LIB_FILE_NAME}" + INTERFACE_INCLUDE_DIRECTORIES "${INCLUDE_DIR}" + ) + SET(${NAMESPACE}_${LIB_NAME}_FOUND 1) +ENDFUNCTION() + +GET_FILENAME_COMPONENT(ROOT "${CMAKE_CURRENT_LIST_FILE}" PATH) +GET_FILENAME_COMPONENT(ROOT "${ROOT}" PATH) +GET_FILENAME_COMPONENT(ROOT "${ROOT}" PATH) + +SET_LIBRARY_TARGET("SPDK" "isal" "${ROOT}/debug/lib/spdk/isa-l.a" "${ROOT}/lib/spdk/isa-l.a" "${ROOT}/include/spdk-isal") diff --git a/vcpkg/ports/spdk-isal/usage b/vcpkg/ports/spdk-isal/usage new file mode 100644 index 0000000..4fc9ddf --- /dev/null +++ b/vcpkg/ports/spdk-isal/usage @@ -0,0 +1 @@ +This package is a dependency of SPDK port. It is not intended for direct consumption by end-user. \ No newline at end of file diff --git a/vcpkg/ports/spdk/CMakeLists.txt b/vcpkg/ports/spdk/CMakeLists.txt new file mode 100644 index 0000000..dabc61c --- /dev/null +++ b/vcpkg/ports/spdk/CMakeLists.txt @@ -0,0 +1,45 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 3.9) +PROJECT(spdk C) + +LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}") +LIST(APPEND CMAKE_PREFIX_PATH "${CMAKE_SOURCE_DIR}") + +FIND_PACKAGE(Numa REQUIRED) +FIND_PACKAGE(uuid REQUIRED) +FIND_PACKAGE(ibverbs REQUIRED) +FIND_PACKAGE(RDMA REQUIRED) +FIND_PACKAGE(OpenSSL REQUIRED) +FIND_PACKAGE(Python COMPONENTS Interpreter REQUIRED) + +FIND_PROGRAM(MAKE make) + +IF (SOURCE_PATH) + SET(CMAKE_SOURCE_DIR ${SOURCE_PATH}) +ENDIF () + +SET(SPDK_CONFIG --disable-tests --with-rdma --without-isal --with-dpdk=${CMAKE_SOURCE_DIR}/../../../spdk-dpdk/src/spdk-18.11-411c51fb97/build) +# No option to define path for isa-l (--with-isal=${CMAKE_SOURCE_DIR}/../../../spdk-isal/src/spdk-d34ebb51cd) +IF (CMAKE_BUILD_TYPE STREQUAL Debug) + LIST(APPEND ${SPDK_CONFIG} --enable-debug) +ENDIF () + +SET(DPDK_CONFIG "-fPIC") +IF (CMAKE_BUILD_TYPE STREQUAL Debug) + STRING(APPEND ${DPDK_CONFIG} "-O0 -g") +ENDIF () + +ADD_CUSTOM_TARGET(spdk-configure + COMMAND ./configure ${SPDK_CONFIG} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/ + VERBATIM + ) + +ADD_CUSTOM_TARGET(spdk ALL + COMMAND ${MAKE} -j DPDK_CFLAGS=${DPDK_CONFIG} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/ + ) + +ADD_DEPENDENCIES(spdk spdk-configure) + +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/build/lib + DESTINATION ${CMAKE_SOURCE_DIR}/${CMAKE_BUILD_TYPE}/) diff --git a/vcpkg/ports/spdk/CONTROL b/vcpkg/ports/spdk/CONTROL new file mode 100644 index 0000000..a127290 --- /dev/null +++ b/vcpkg/ports/spdk/CONTROL @@ -0,0 +1,6 @@ +Source: spdk +Version: 19.01.1 +Port-Version: 1 +Description: Storage Performance Development Kit +Build-Depends: spdk-dpdk, spdk-ipsec, spdk-isal +Supports: linux diff --git a/vcpkg/ports/spdk/FindNuma.cmake b/vcpkg/ports/spdk/FindNuma.cmake new file mode 100644 index 0000000..d5bb614 --- /dev/null +++ b/vcpkg/ports/spdk/FindNuma.cmake @@ -0,0 +1,26 @@ +INCLUDE(FindPackageHandleStandardArgs) + +FIND_PATH(NUMA_ROOT_DIR + NAMES include/numa.h + PATHS ENV NUMA_ROOT + DOC "NUMA library root directory") + +FIND_PATH(NUMA_INCLUDE_DIR + NAMES numa.h + HINTS ${NUMA_ROOT_DIR} + PATH_SUFFIXES include + DOC "NUMA include directory") + +FIND_LIBRARY(NUMA_LIBRARY + NAMES numa + HINTS ${NUMA_ROOT_DIR} + DOC "NUMA library file") + +IF (NUMA_LIBRARY) + GET_FILENAME_COMPONENT(NUMA_LIBRARY_DIR ${NUMA_LIBRARY} PATH) + MARK_AS_ADVANCED(NUMA_INCLUDE_DIR NUMA_LIBRARY_DIR NUMA_LIBRARY) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(NUMA REQUIRED_VARS NUMA_ROOT_DIR NUMA_INCLUDE_DIR NUMA_LIBRARY) +ELSE () + SET(NUMA_FOUND FALSE) + MESSAGE(FATAL_ERROR "Numa library not found.\nTry: 'sudo yum install numactl numactl-devel' (or sudo apt-get install libnuma1 libnuma-dev)") +ENDIF () diff --git a/vcpkg/ports/spdk/FindRDMA.cmake b/vcpkg/ports/spdk/FindRDMA.cmake new file mode 100644 index 0000000..b84ec12 --- /dev/null +++ b/vcpkg/ports/spdk/FindRDMA.cmake @@ -0,0 +1,32 @@ +FIND_PATH(RDMA_INCLUDE_DIR rdma/rdma_cma.h + /usr/include + /usr/include/linux + /usr/local/include + ) + +FIND_LIBRARY(RDMA_LIBRARY NAMES rdmacm + PATHS + /usr/lib + /usr/local/lib + /usr/lib64 + /usr/local/lib64 + /lib/i386-linux-gnu + /lib/x86_64-linux-gnu + /usr/lib/x86_64-linux-gnu + ) + +INCLUDE(FindPackageHandleStandardArgs) +IF (APPLE) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(RDMA DEFAULT_MSG + RDMA_INCLUDE_DIR) +ELSE () + FIND_PACKAGE_HANDLE_STANDARD_ARGS(RDMA DEFAULT_MSG + RDMA_LIBRARY RDMA_INCLUDE_DIR) +ENDIF () + +MARK_AS_ADVANCED(RDMA_INCLUDE_DIR RDMA_LIBRARY) + +IF (NOT RDMA_LIBRARY) + SET(RDMA_FOUND FALSE) + MESSAGE(FATAL_ERROR "RDMA library not found.\nTry: 'sudo yum install librdmacm-devel librdmacm' (or sudo apt-get install librdmacm-dev librdmacm1)") +ENDIF () diff --git a/vcpkg/ports/spdk/Findibverbs.cmake b/vcpkg/ports/spdk/Findibverbs.cmake new file mode 100644 index 0000000..c018df1 --- /dev/null +++ b/vcpkg/ports/spdk/Findibverbs.cmake @@ -0,0 +1,34 @@ +# Find the ibverbs libraries +# +# The following variables are optionally searched for defaults +# IBVERBS_ROOT_DIR: Base directory where all ibverbs components are found +# IBVERBS_INCLUDE_DIR: Directory where ibverbs headers are found +# IBVERBS_LIB_DIR: Directory where ibverbs libraries are found + +# The following are set after configuration is done: +# IBVERBS_FOUND +# IBVERBS_INCLUDE_DIRS +# IBVERBS_LIBRARIES + +FIND_PATH(IBVERBS_INCLUDE_DIRS + NAMES infiniband/verbs.h + HINTS + ${IBVERBS_INCLUDE_DIR} + ${IBVERBS_ROOT_DIR} + ${IBVERBS_ROOT_DIR}/include) + +FIND_LIBRARY(IBVERBS_LIBRARIES + NAMES ibverbs + HINTS + ${IBVERBS_LIB_DIR} + ${IBVERBS_ROOT_DIR} + ${IBVERBS_ROOT_DIR}/lib) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(ibverbs DEFAULT_MSG IBVERBS_INCLUDE_DIRS IBVERBS_LIBRARIES) +MARK_AS_ADVANCED(IBVERBS_INCLUDE_DIR IBVERBS_LIBRARIES) + +IF (NOT IBVERBS_LIBRARIES) + SET(IBVERBS_FOUND FALSE) + MESSAGE(FATAL_ERROR "ibverbs library not found.\nTry: 'sudo yum install libibverbs-devel libibverbs' (or sudo apt-get install libibverbs-dev libibverbs1)") +ENDIF () diff --git a/vcpkg/ports/spdk/Finduuid.cmake b/vcpkg/ports/spdk/Finduuid.cmake new file mode 100644 index 0000000..2bd54af --- /dev/null +++ b/vcpkg/ports/spdk/Finduuid.cmake @@ -0,0 +1,49 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +FIND_PATH(UUID_INCLUDE_DIR uuid/uuid.h + /usr/include + /usr/include/linux + /usr/local/include + ) + +FIND_LIBRARY(UUID_LIBRARY NAMES uuid + PATHS + /usr/lib + /usr/local/lib + /usr/lib64 + /usr/local/lib64 + /lib/i386-linux-gnu + /lib/x86_64-linux-gnu + /usr/lib/x86_64-linux-gnu + ) + +INCLUDE(FindPackageHandleStandardArgs) +IF (APPLE) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(UUID DEFAULT_MSG + UUID_INCLUDE_DIR) +ELSE () + FIND_PACKAGE_HANDLE_STANDARD_ARGS(UUID DEFAULT_MSG + UUID_LIBRARY UUID_INCLUDE_DIR) +ENDIF () + +MARK_AS_ADVANCED(UUID_INCLUDE_DIR UUID_LIBRARY) + +IF (NOT UUID_LIBRARY) + SET(UUID_FOUND FALSE) + MESSAGE(FATAL_ERROR "UUID library not found.\nTry: 'sudo yum install libuuid uuid-devel' (or sudo apt-get install libuuid1 uuid-dev)") +ENDIF () diff --git a/vcpkg/ports/spdk/portfile.cmake b/vcpkg/ports/spdk/portfile.cmake new file mode 100644 index 0000000..cc5e829 --- /dev/null +++ b/vcpkg/ports/spdk/portfile.cmake @@ -0,0 +1,42 @@ +INCLUDE(vcpkg_common_functions) + +IF (NOT VCPKG_CMAKE_SYSTEM_NAME OR NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + MESSAGE(FATAL_ERROR "Intel spdk currently only supports Linux/BSD platforms") +ENDIF () + +VCPKG_FROM_GITHUB( + OUT_SOURCE_PATH SOURCE_PATH + REPO spdk/spdk + REF v19.01.1 + SHA512 cb2c085e1a5d370df60599aaeb6302f8252626342a9e0644018df8c769f406304591680f905572848390c3139e640496f96e3b4fc67469c56eb9a5329aee4b24 + HEAD_REF master +) + +FIND_PATH(NUMA_INCLUDE_DIR NAME numa.h + PATHS ENV NUMA_ROOT + HINTS $ENV{HOME}/local/include /opt/local/include /usr/local/include /usr/include + ) +IF (NOT NUMA_INCLUDE_DIR) + MESSAGE(FATAL_ERROR "Numa library not found.\nTry: 'sudo yum install numactl numactl-devel' (or sudo apt-get install libnuma1 libnuma-dev)") +ENDIF () + +VCPKG_CONFIGURE_CMAKE( + SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR} + PREFER_NINJA + OPTIONS + -DSOURCE_PATH=${SOURCE_PATH} +) + +VCPKG_INSTALL_CMAKE() + +FILE(INSTALL ${SOURCE_PATH}/Release/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +FILE(INSTALL ${SOURCE_PATH}/Debug/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +FILE(INSTALL ${SOURCE_PATH}/include/spdk DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) +FILE(INSTALL ${SOURCE_PATH}/scripts/setup.sh DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/scripts) +FILE(INSTALL ${SOURCE_PATH}/scripts/common.sh DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/scripts) +FILE(INSTALL ${SOURCE_PATH}/include/spdk/pci_ids.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}/include/spdk) +FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/spdkConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +FILE(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +FILE(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +VCPKG_TEST_CMAKE(PACKAGE_NAME ${PORT}) diff --git a/vcpkg/ports/spdk/spdkConfig.cmake b/vcpkg/ports/spdk/spdkConfig.cmake new file mode 100644 index 0000000..7db4138 --- /dev/null +++ b/vcpkg/ports/spdk/spdkConfig.cmake @@ -0,0 +1,29 @@ + +FUNCTION(SET_LIBRARY_TARGET NAMESPACE LIB_NAME DEBUG_LIB_FILE_NAME RELEASE_LIB_FILE_NAME INCLUDE_DIR) + ADD_LIBRARY(${NAMESPACE}::${LIB_NAME} STATIC IMPORTED) + SET_TARGET_PROPERTIES(${NAMESPACE}::${LIB_NAME} PROPERTIES + IMPORTED_CONFIGURATIONS "RELEASE;DEBUG" + IMPORTED_LOCATION_RELEASE "${RELEASE_LIB_FILE_NAME}" + IMPORTED_LOCATION_DEBUG "${DEBUG_LIB_FILE_NAME}" + INTERFACE_INCLUDE_DIRECTORIES "${INCLUDE_DIR}" + ) + SET(${NAMESPACE}_${LIB_NAME}_FOUND 1) +ENDFUNCTION() + +GET_FILENAME_COMPONENT(SPDK_ROOT "${CMAKE_CURRENT_LIST_FILE}" PATH) +GET_FILENAME_COMPONENT(SPDK_ROOT "${SPDK_ROOT}" PATH) +GET_FILENAME_COMPONENT(SPDK_ROOT "${SPDK_ROOT}" PATH) + +IF (CMAKE_BUILD_TYPE STREQUAL Debug) + LINK_DIRECTORIES(${SPDK_ROOT}/debug/lib/) +ELSE () + LINK_DIRECTORIES(${SPDK_ROOT}/lib/) +ENDIF () + +FILE(GLOB SPDK_LIBS ${SPDK_ROOT}/lib/libspdk*.*) +FOREACH (LIB_FILE_NAME ${SPDK_LIBS}) + GET_FILENAME_COMPONENT(LIB_NAME ${LIB_FILE_NAME} NAME_WE) + GET_FILENAME_COMPONENT(FULL_LIB_NAME ${LIB_FILE_NAME} NAME) + STRING(REPLACE "lib" "" LIB_NAME "${LIB_NAME}") + SET_LIBRARY_TARGET("SPDK" "${LIB_NAME}" "${SPDK_ROOT}/debug/lib/${FULL_LIB_NAME}" "${SPDK_ROOT}/lib/${FULL_LIB_NAME}" "${SPDK_ROOT}/include/spdk") +ENDFOREACH () diff --git a/vcpkg/ports/spdk/usage b/vcpkg/ports/spdk/usage new file mode 100644 index 0000000..f26b416 --- /dev/null +++ b/vcpkg/ports/spdk/usage @@ -0,0 +1,44 @@ +The package spdk is compatible with built-in CMake targets: + +Add following to build examples/nvme/perf/perf.c + + FIND_PACKAGE(spdk CONFIG REQUIRED) + FIND_PACKAGE(spdk-dpdk CONFIG REQUIRED) + + ADD_EXECUTABLE(SPDKTest perf.c) + + TARGET_LINK_DIRECTORIES(SPDKTest PRIVATE ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/spdk) + TARGET_LINK_LIBRARIES(SPDKTest PRIVATE + SPDK::spdk_app_rpc + SPDK::spdk_bdev + SPDK::spdk_bdev_null + SPDK::spdk_bdev_rpc + SPDK::spdk_conf + SPDK::spdk_copy + SPDK::spdk_thread + SPDK::spdk_event + SPDK::spdk_event_bdev + SPDK::spdk_event_copy + SPDK::spdk_event_net + SPDK::spdk_net + SPDK::spdk_nvmf + SPDK::spdk_nvme + SPDK::spdk_sock_posix + SPDK::spdk_sock + SPDK::spdk_rpc + SPDK::spdk_jsonrpc + SPDK::spdk_json + SPDK::spdk_trace + SPDK::spdk_util + SPDK::spdk_log + SPDK::spdk_env_dpdk + SPDK::dpdk + numa + rdmacm + uuid + ibverbs + pthread + dl + ) + +Configuration script can be found at: ${CURRENT_PACKAGES_DIR}/share/${PORT}/scripts diff --git a/vcpkg/ports/spdlog/CONTROL b/vcpkg/ports/spdlog/CONTROL new file mode 100644 index 0000000..8636d8b --- /dev/null +++ b/vcpkg/ports/spdlog/CONTROL @@ -0,0 +1,9 @@ +Source: spdlog +Version: 1.7.0 +Homepage: https://github.com/gabime/spdlog +Description: Very fast, header only, C++ logging library +Build-Depends: fmt + +Feature: benchmark +Description: Use google benchmark +Build-Depends: benchmark diff --git a/vcpkg/ports/spdlog/portfile.cmake b/vcpkg/ports/spdlog/portfile.cmake new file mode 100644 index 0000000..844575c --- /dev/null +++ b/vcpkg/ports/spdlog/portfile.cmake @@ -0,0 +1,50 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO gabime/spdlog + REF 616caa5d30172b65cc3a06800894c575d70cb8e6 #v1.7.0 + SHA512 47411e8a607a339bffe2d5e13b4568b825ee8a07d88e69cf32096b08b76cdb60cbd64003620506e9c5748d3f66d8df76fa8880bb1a092923b7b405fedd18ad0c + HEAD_REF v1.x +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + benchmark SPDLOG_BUILD_BENCH +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DSPDLOG_FMT_EXTERNAL=ON + -DSPDLOG_INSTALL=ON +) + +vcpkg_install_cmake() + +if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/cmake/${PORT}") + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +elseif(EXISTS "${CURRENT_PACKAGES_DIR}/lib/${PORT}/cmake") + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/${PORT}/cmake) +endif() + +vcpkg_copy_pdbs() + +# use vcpkg-provided fmt library (see also option SPDLOG_FMT_EXTERNAL above) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/spdlog/fmt/bundled) + +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/spdlog/fmt/fmt.h + "#if !defined(SPDLOG_FMT_EXTERNAL)" + "#if 0 // !defined(SPDLOG_FMT_EXTERNAL)" +) + +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/spdlog/fmt/ostr.h + "#if !defined(SPDLOG_FMT_EXTERNAL)" + "#if 0 // !defined(SPDLOG_FMT_EXTERNAL)" +) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/spdlog + ${CURRENT_PACKAGES_DIR}/debug/lib/spdlog + ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/spectra/CONTROL b/vcpkg/ports/spectra/CONTROL new file mode 100644 index 0000000..ce5656b --- /dev/null +++ b/vcpkg/ports/spectra/CONTROL @@ -0,0 +1,5 @@ +Source: spectra +Version: 0.8.1 +Description: A header-only C++ library for large scale eigenvalue problems +Homepage: https://spectralib.org +Build-Depends: eigen3 diff --git a/vcpkg/ports/spectra/portfile.cmake b/vcpkg/ports/spectra/portfile.cmake new file mode 100644 index 0000000..4af8133 --- /dev/null +++ b/vcpkg/ports/spectra/portfile.cmake @@ -0,0 +1,12 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO yixuan/spectra + REF v0.8.1 + SHA512 7cd2699234f7b15216e616323ef298124a7333b6efe4185299f8b326856ae515f904a47eeee5631292037567e5c1559b83e17aae503fccd94225c3947db3e90d + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/spectra RENAME copyright) diff --git a/vcpkg/ports/speex/0001-make-pkg-config-lib-name-configurable.patch b/vcpkg/ports/speex/0001-make-pkg-config-lib-name-configurable.patch new file mode 100644 index 0000000..72b61f4 --- /dev/null +++ b/vcpkg/ports/speex/0001-make-pkg-config-lib-name-configurable.patch @@ -0,0 +1,13 @@ +diff --git a/speex.pc.in b/speex.pc.in +index 97bba4f..52a1d3c 100644 +--- a/speex.pc.in ++++ b/speex.pc.in +@@ -10,6 +10,6 @@ Description: Speex is an audio codec tuned for speech + Version: @SPEEX_VERSION@ + Requires: + Conflicts: +-Libs: -L${libdir} -lspeex ++Libs: -L${libdir} -l@SPEEXLIB@ + Libs.private: @LIBM@ + Cflags: -I${includedir} + diff --git a/vcpkg/ports/speex/CMakeLists.txt b/vcpkg/ports/speex/CMakeLists.txt new file mode 100644 index 0000000..b151b24 --- /dev/null +++ b/vcpkg/ports/speex/CMakeLists.txt @@ -0,0 +1,111 @@ +cmake_minimum_required (VERSION 3.8.0) +project (libspeex C) + +include(GNUInstallDirs) +include(CheckLibraryExists) + +option(USE_SSE "USE_SSE used Note: USE_SSE and FIXED_POINT are mutually exclusive." ON) +if(MSVC) + add_definitions(-DHAVE_CONFIG_H) + if(USE_SSE) + add_definitions(-DUSE_SSE -DFLOATING_POINT) + else() + add_definitions(-DFIXED_POINT) + endif() +endif() + +include_directories(win32 include) + +set(CMAKE_DEBUG_POSTFIX d) + +file(READ "win32/libspeex.def" _contents) +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + string(REPLACE "LIBRARY libspeex" "LIBRARY libspeexd" _contents "${_contents}") +endif() +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/libspeex.def" + "${_contents}\n" + "speex_nb_mode\n" + "speex_wb_mode\n" + "speex_uwb_mode\n" + "speex_mode_list\n" + "speex_header_free\n" +) + +file(STRINGS "configure.ac" + _speex_version_defines REGEX "SPEEX_(MAJOR|MINOR|MICRO)_VERSION=([0-9]+)$") +foreach(ver ${_speex_version_defines}) + if(ver MATCHES "SPEEX_(MAJOR|MINOR|MICRO)_VERSION=([0-9]+)$") + set(SPEEX_${CMAKE_MATCH_1}_VERSION "${CMAKE_MATCH_2}" CACHE INTERNAL "") + endif() +endforeach() +set(SPEEX_VERSION ${SPEEX_MAJOR_VERSION}.${SPEEX_MINOR_VERSION}.${SPEEX_MICRO_VERSION}) + +set(SRC + "libspeex/bits.c" + "libspeex/cb_search.c" + "libspeex/exc_10_16_table.c" + "libspeex/exc_10_32_table.c" + "libspeex/exc_20_32_table.c" + "libspeex/exc_5_256_table.c" + "libspeex/exc_5_64_table.c" + "libspeex/exc_8_128_table.c" + "libspeex/fftwrap.c" + "libspeex/filters.c" + "libspeex/gain_table.c" + "libspeex/gain_table_lbr.c" + "libspeex/hexc_10_32_table.c" + "libspeex/hexc_table.c" + "libspeex/high_lsp_tables.c" + "libspeex/kiss_fft.c" + "libspeex/kiss_fftr.c" + "libspeex/lpc.c" + "libspeex/lsp.c" + "libspeex/lsp_tables_nb.c" + "libspeex/ltp.c" + "libspeex/modes.c" + "libspeex/modes_wb.c" + "libspeex/nb_celp.c" + "libspeex/quant_lsp.c" + "libspeex/sb_celp.c" + "libspeex/smallft.c" + "libspeex/speex.c" + "libspeex/speex_callbacks.c" + "libspeex/speex_header.c" + "libspeex/stereo.c" + "libspeex/vbr.c" + "libspeex/vq.c" + "libspeex/window.c" + "${CMAKE_CURRENT_BINARY_DIR}/libspeex.def" +) + +add_library(libspeex ${SRC}) + +install( + TARGETS libspeex + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY include/ DESTINATION include FILES_MATCHING PATTERN "*.h") +endif() + +# pkgconfig file +set(prefix ${CMAKE_INSTALL_PREFIX}) +set(exec_prefix ${CMAKE_INSTALL_PREFIX}) +set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) +set(includedir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}) +set(LIBM ) +check_library_exists(m ceil "" LIBMEXIST) +if(LIBMEXIST) + list(APPEND LIBM -lm) +endif() +set(SPEEXLIB "${CMAKE_PROJECT_NAME}") +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + set(SPEEXLIB "${CMAKE_PROJECT_NAME}d") +endif() +configure_file(speex.pc.in speex.pc @ONLY) +install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/speex.pc + DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) diff --git a/vcpkg/ports/speex/CONTROL b/vcpkg/ports/speex/CONTROL new file mode 100644 index 0000000..0185b9b --- /dev/null +++ b/vcpkg/ports/speex/CONTROL @@ -0,0 +1,6 @@ +Source: speex +Version: 1.2.0 +Port-Version: 7 +Homepage: https://github.com/xiph/speex +Description: Speex is an Open Source/Free Software patent-free audio compression format designed for speech. +Supports: !(linux | osx) \ No newline at end of file diff --git a/vcpkg/ports/speex/portfile.cmake b/vcpkg/ports/speex/portfile.cmake new file mode 100644 index 0000000..a8431db --- /dev/null +++ b/vcpkg/ports/speex/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_fail_port_install(ON_TARGET "OSX" "Linux") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiph/speex + REF Speex-1.2.0 + SHA512 612dfd67a9089f929b7f2a613ed3a1d2fda3d3ec0a4adafe27e2c1f4542de1870b42b8042f0dcb16d52e08313d686cc35b76940776419c775417f5bad18b448f + HEAD_REF master + PATCHES + 0001-make-pkg-config-lib-name-configurable.patch +) + +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() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(READ "${CURRENT_PACKAGES_DIR}/include/speex/speex.h" _contents) + string(REPLACE "extern const SpeexMode" "__declspec(dllimport) extern const SpeexMode" _contents "${_contents}") + file(WRITE "${CURRENT_PACKAGES_DIR}/include/speex/speex.h" "${_contents}") +endif() + +vcpkg_fixup_pkgconfig() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/speexdsp/CMakeLists.txt b/vcpkg/ports/speexdsp/CMakeLists.txt new file mode 100644 index 0000000..a1dec7f --- /dev/null +++ b/vcpkg/ports/speexdsp/CMakeLists.txt @@ -0,0 +1,32 @@ +cmake_minimum_required(VERSION 3.1) +option(USE_SSE "Use SSE" ON) +project (libspeexdsp) + +file(GLOB_RECURSE LIBSPEEXDSP_SOURCES "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/*.c") +list(FILTER LIBSPEEXDSP_SOURCES EXCLUDE REGEX "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/test.*\\.c") +file(GLOB_RECURSE LIBSPEEXDSP_HEADERS "${CMAKE_CURRENT_LIST_DIR}/libspeexdsp/*.h") +file(GLOB_RECURSE LIBSPEEXDSP_HEADERS_PUBLIC "${CMAKE_CURRENT_LIST_DIR}/include/**/*.h") + +if (BUILD_SHARED_LIBS) + add_definitions(-D_WINDOWS -D_USRDLL) + list(APPEND LIBSPEEXDSP_SOURCES "${CMAKE_CURRENT_LIST_DIR}/win32/libspeexdsp.def") +else () + add_definitions(-D_LIB) +endif () + +add_definitions(-DHAVE_CONFIG_H -D_WIN32) + +if (USE_SSE) + add_definitions(-D_USE_SSE -D_USE_SSE2) +endif() + +include_directories("${CMAKE_CURRENT_LIST_DIR}/include" + "${CMAKE_CURRENT_LIST_DIR}/win32") +add_library(libspeexdsp ${LIBSPEEXDSP_SOURCES} ${LIBSPEEXDSP_HEADERS}) + +set_target_properties(libspeexdsp PROPERTIES PUBLIC_HEADER "${LIBSPEEXDSP_HEADERS_PUBLIC}") + +install(TARGETS libspeexdsp + ARCHIVE DESTINATION "lib" + RUNTIME DESTINATION "bin" + PUBLIC_HEADER DESTINATION "include/speex") diff --git a/vcpkg/ports/speexdsp/CONTROL b/vcpkg/ports/speexdsp/CONTROL new file mode 100644 index 0000000..4edbf5f --- /dev/null +++ b/vcpkg/ports/speexdsp/CONTROL @@ -0,0 +1,5 @@ +Source: speexdsp +Version: 1.2.0-2 +Homepage: https://speex.org/ +Description: A patent-free, Open Source/Free Software DSP library. +Build-Depends: diff --git a/vcpkg/ports/speexdsp/portfile.cmake b/vcpkg/ports/speexdsp/portfile.cmake new file mode 100644 index 0000000..3ed1063 --- /dev/null +++ b/vcpkg/ports/speexdsp/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiph/speexdsp + REF 64cbfa9bca7479a758351aa02bb4abdd76baa9e7 #1.2.0 + SHA512 b92488e1efd4d763cd2d438b88a1b708d2a9d8f804dc2b016bfb29c4f7366624d3cf86a23645067393274e100c1bd6467def0eb98575f04ffcaf49b20f1f1105 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +set(USE_SSE OFF) +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(USE_SSE ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DUSE_SSE=${USE_SSE} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright") diff --git a/vcpkg/ports/spirit-po/CONTROL b/vcpkg/ports/spirit-po/CONTROL new file mode 100644 index 0000000..e31bdcb --- /dev/null +++ b/vcpkg/ports/spirit-po/CONTROL @@ -0,0 +1,5 @@ +Source: spirit-po +Version: 1.1.2-1 +Homepage: https://github.com/cbeck88/spirit-po +Description: A header-only C++ library for localization using GNU gettext po files, based on Boost.Spirit. +Build-Depends: boost diff --git a/vcpkg/ports/spirit-po/portfile.cmake b/vcpkg/ports/spirit-po/portfile.cmake new file mode 100644 index 0000000..d961ce2 --- /dev/null +++ b/vcpkg/ports/spirit-po/portfile.cmake @@ -0,0 +1,17 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cbeck88/spirit-po + REF v1.1.2 + SHA512 990e26e041607fe81cc2df673bd9e5e2647537d7e121b2300e631874dcd4ccdb084159fa4f635b128c39143c9423d67c494af05206b665541124a0447b8f4a3f + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/include/spirit_po + DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# spirit-po is header-only, so no vcpkg_{configure,install}_cmake + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/spirit-po RENAME copyright) diff --git a/vcpkg/ports/spirv-cross/CONTROL b/vcpkg/ports/spirv-cross/CONTROL new file mode 100644 index 0000000..e7c397b --- /dev/null +++ b/vcpkg/ports/spirv-cross/CONTROL @@ -0,0 +1,4 @@ +Source: spirv-cross +Version: 2020-02-26 +Homepage: https://github.com/KhronosGroup/SPIRV-Cross +Description: SPIRV-Cross is a practical tool and library for performing reflection on SPIR-V and disassembling SPIR-V back to high level languages. diff --git a/vcpkg/ports/spirv-cross/portfile.cmake b/vcpkg/ports/spirv-cross/portfile.cmake new file mode 100644 index 0000000..eb0652a --- /dev/null +++ b/vcpkg/ports/spirv-cross/portfile.cmake @@ -0,0 +1,32 @@ + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KhronosGroup/SPIRV-Cross + REF 2020-02-26 + SHA512 96e4c7d8bf8603d061d1a7afac34db044842dede65f2d9328da1d99a3c8aed9f6fd64fd611e8d1618bd937b682b377d87304a4fcc9068bcffed3d275cb4dfe2c + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DSPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +foreach(COMPONENT core cpp glsl hlsl msl reflect util) + vcpkg_fixup_cmake_targets(CONFIG_PATH share/spirv_cross_${COMPONENT}/cmake TARGET_PATH share/spirv_cross_${COMPONENT}) +endforeach() + +file(GLOB EXES "${CURRENT_PACKAGES_DIR}/bin/*") +file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + +# cleanup +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/spirv-cross/copyright COPYONLY) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) diff --git a/vcpkg/ports/spirv-headers/CONTROL b/vcpkg/ports/spirv-headers/CONTROL new file mode 100644 index 0000000..8a6051d --- /dev/null +++ b/vcpkg/ports/spirv-headers/CONTROL @@ -0,0 +1,4 @@ +Source: spirv-headers +Version: 1.5.1 +Homepage: https://github.com/KhronosGroup/SPIRV-Headers +Description: Machine-readable files for the SPIR-V Registry diff --git a/vcpkg/ports/spirv-headers/portfile.cmake b/vcpkg/ports/spirv-headers/portfile.cmake new file mode 100644 index 0000000..d94e164 --- /dev/null +++ b/vcpkg/ports/spirv-headers/portfile.cmake @@ -0,0 +1,14 @@ + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KhronosGroup/SPIRV-Headers + REF 1.5.1.corrected + SHA512 92447b1b1eca6f0253265f36d67b00c0c79e93f6a707e27bd8239bd2f693c468a92b7f7c3bb3fde6bb091383baaff42d3b0bbfeb9ff5f952d8a0b9626b03848e + HEAD_REF master +) + +# This must be spirv as other spirv packages expect it there. +file(COPY "${SOURCE_PATH}/include/spirv/" DESTINATION "${CURRENT_PACKAGES_DIR}/include/spirv") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/vcpkg/ports/spirv-tools/CONTROL b/vcpkg/ports/spirv-tools/CONTROL new file mode 100644 index 0000000..3acb8e4 --- /dev/null +++ b/vcpkg/ports/spirv-tools/CONTROL @@ -0,0 +1,5 @@ +Source: spirv-tools +Version: 2020.1-1 +Homepage: https://github.com/KhronosGroup/SPIRV-Tools +Description: API and commands for processing SPIR-V modules +Build-Depends: spirv-headers \ No newline at end of file diff --git a/vcpkg/ports/spirv-tools/cmake-install.patch b/vcpkg/ports/spirv-tools/cmake-install.patch new file mode 100644 index 0000000..ce5992c --- /dev/null +++ b/vcpkg/ports/spirv-tools/cmake-install.patch @@ -0,0 +1,36 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6ed56a8..66d1e66 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -210,15 +210,9 @@ else() + endif() + + if(ENABLE_SPIRV_TOOLS_INSTALL) +- if(WIN32) +- macro(spvtools_config_package_dir TARGET PATH) +- set(${PATH} ${TARGET}/cmake) +- endmacro() +- else() +- macro(spvtools_config_package_dir TARGET PATH) +- set(${PATH} ${CMAKE_INSTALL_LIBDIR}/cmake/${TARGET}) +- endmacro() +- endif() ++ macro(spvtools_config_package_dir TARGET PATH) ++ set(${PATH} ${CMAKE_INSTALL_DATADIR}/${TARGET}) ++ endmacro() + + macro(spvtools_generate_config_file TARGET) + file(WRITE ${CMAKE_BINARY_DIR}/${TARGET}Config.cmake +diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt +index 4e7e10c..278e439 100644 +--- a/source/CMakeLists.txt ++++ b/source/CMakeLists.txt +@@ -387,7 +387,7 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") + endif() + + if(ENABLE_SPIRV_TOOLS_INSTALL) +- install(TARGETS ${SPIRV_TOOLS} ${SPIRV_TOOLS}-shared EXPORT ${SPIRV_TOOLS}Targets ++ install(TARGETS ${SPIRV_TOOLS} EXPORT ${SPIRV_TOOLS}Targets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/vcpkg/ports/spirv-tools/comment-distutils.patch b/vcpkg/ports/spirv-tools/comment-distutils.patch new file mode 100644 index 0000000..1ec4e9d --- /dev/null +++ b/vcpkg/ports/spirv-tools/comment-distutils.patch @@ -0,0 +1,22 @@ +diff --git a/utils/generate_registry_tables.py b/utils/generate_registry_tables.py +index e662ba9..49f2718 100644 +--- a/utils/generate_registry_tables.py ++++ b/utils/generate_registry_tables.py +@@ -14,7 +14,7 @@ + # limitations under the License. + """Generates the vendor tool table from the SPIR-V XML registry.""" + +-import distutils.dir_util ++#import distutils.dir_util + import os.path + import xml.etree.ElementTree + +@@ -62,7 +62,7 @@ def main(): + with open(args.xml) as xml_in: + registry = xml.etree.ElementTree.fromstring(xml_in.read()) + +- distutils.dir_util.mkpath(os.path.dirname(args.generator_output)) ++ #distutils.dir_util.mkpath(os.path.dirname(args.generator_output)) + with open(args.generator_output, 'w') as f: + f.write(generate_vendor_table(registry)) + diff --git a/vcpkg/ports/spirv-tools/install-config-typo.patch b/vcpkg/ports/spirv-tools/install-config-typo.patch new file mode 100644 index 0000000..c356f4b --- /dev/null +++ b/vcpkg/ports/spirv-tools/install-config-typo.patch @@ -0,0 +1,17 @@ +diff --git a/source/reduce/CMakeLists.txt b/source/reduce/CMakeLists.txt +index 51e9b1d..90b1cb7 100644 +--- a/source/reduce/CMakeLists.txt ++++ b/source/reduce/CMakeLists.txt +@@ -96,10 +96,10 @@ if(ENABLE_SPIRV_TOOLS_INSTALL) + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +- export(EXPORT SPIRV-Tools-reduceTargets FILE SPIRV-Tools-reduceTarget.cmake) ++ export(EXPORT SPIRV-Tools-reduceTargets FILE SPIRV-Tools-reduceTargets.cmake) + + spvtools_config_package_dir(SPIRV-Tools-reduce PACKAGE_DIR) +- install(EXPORT SPIRV-Tools-reduceTargets FILE SPIRV-Tools-reduceTarget.cmake ++ install(EXPORT SPIRV-Tools-reduceTargets FILE SPIRV-Tools-reduceTargets.cmake + DESTINATION ${PACKAGE_DIR}) + + spvtools_generate_config_file(SPIRV-Tools-reduce) diff --git a/vcpkg/ports/spirv-tools/portfile.cmake b/vcpkg/ports/spirv-tools/portfile.cmake new file mode 100644 index 0000000..305a3fd --- /dev/null +++ b/vcpkg/ports/spirv-tools/portfile.cmake @@ -0,0 +1,40 @@ + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KhronosGroup/SPIRV-Tools + REF v2020.1 + SHA512 edd434e06cba44c402900684b8fea16c394f80951ff993b3962617a21630d2d8ff9be9a5203bc8eb9b402e9cafe8c68f13099cbc1eaf66a546df08cb43668c46 + PATCHES + comment-distutils.patch + cmake-install.patch + install-config-typo.patch +) + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) +vcpkg_add_to_path("${PYTHON3_DIR}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSPIRV-Headers_SOURCE_DIR=${CURRENT_INSTALLED_DIR} + -DSPIRV_WERROR=OFF + -DENABLE_SPIRV_TOOLS_INSTALL=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/SPIRV-Tools TARGET_PATH share/SPIRV-Tools) # the directory name is capitalized as opposed to the package name +vcpkg_fixup_cmake_targets(CONFIG_PATH share/SPIRV-Tools-link TARGET_PATH share/SPIRV-Tools-link) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/SPIRV-Tools-opt TARGET_PATH share/SPIRV-Tools-opt) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/SPIRV-Tools-reduce TARGET_PATH share/SPIRV-Tools-reduce) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin") # only static linkage, i.e. no need to preserve .dll/.so files +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools") +file(RENAME "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/vcpkg/ports/sprout/CONTROL b/vcpkg/ports/sprout/CONTROL new file mode 100644 index 0000000..67240a5 --- /dev/null +++ b/vcpkg/ports/sprout/CONTROL @@ -0,0 +1,5 @@ +Source: sprout +Version: 2019-06-20 +Homepage: https://github.com/bolero-MURAKAMI/Sprout +Description: C++11/14 constexpr based Containers, Algorithms, Random numbers, Parsing, Ray tracing, Synthesizer, and others +Build-Depends: boost-array, boost-mpl diff --git a/vcpkg/ports/sprout/portfile.cmake b/vcpkg/ports/sprout/portfile.cmake new file mode 100644 index 0000000..7be1c19 --- /dev/null +++ b/vcpkg/ports/sprout/portfile.cmake @@ -0,0 +1,16 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO bolero-MURAKAMI/Sprout + REF 6b5addba9face0a6403e66e7db2aa94d87387f61 + SHA512 b81c299842c48626a7fbedb5b70932623ddb128bd5c71115269253b2c82a331d4f5d5adeab24529be2c886d293de96c15c9641280b4eb31bd60379b284556900 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/sprout DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE_1_0.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/spscqueue/CONTROL b/vcpkg/ports/spscqueue/CONTROL new file mode 100644 index 0000000..f29c84e --- /dev/null +++ b/vcpkg/ports/spscqueue/CONTROL @@ -0,0 +1,4 @@ +Source: spscqueue +Version: 1.0 +Description: A bounded single-producer single-consumer wait-free and lock-free queue written in C++11 +Homepage: https://github.com/rigtorp/SPSCQueue diff --git a/vcpkg/ports/spscqueue/portfile.cmake b/vcpkg/ports/spscqueue/portfile.cmake new file mode 100644 index 0000000..c0b9c48 --- /dev/null +++ b/vcpkg/ports/spscqueue/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rigtorp/SPSCQueue + REF v1.0 + SHA512 8776b49070d549b1df155b0a1ad876a4145d75e004269b3573e8f9963329ad05350d323d87bae229c793cbaf1f2421e35fa7e923e68cc4dcd9cfb6698e8cd80e + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SPSCQueue) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/sqlite-modern-cpp/CONTROL b/vcpkg/ports/sqlite-modern-cpp/CONTROL new file mode 100644 index 0000000..c8e3ccb --- /dev/null +++ b/vcpkg/ports/sqlite-modern-cpp/CONTROL @@ -0,0 +1,5 @@ +Source: sqlite-modern-cpp +Version: 3.2-936cd0c8 +Build-Depends: sqlite3 +Homepage: https://github.com/aminroosta/sqlite_modern_cpp +Description: The C++14 wrapper around sqlite library diff --git a/vcpkg/ports/sqlite-modern-cpp/portfile.cmake b/vcpkg/ports/sqlite-modern-cpp/portfile.cmake new file mode 100644 index 0000000..35b364d --- /dev/null +++ b/vcpkg/ports/sqlite-modern-cpp/portfile.cmake @@ -0,0 +1,15 @@ +# header only +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO SqliteModernCpp/sqlite_modern_cpp + REF 936cd0c86aacac87a3dab32906397944ae5f6c3d + SHA512 8ce1b7593fe77dcab297ab4cae0158b43d55b33c1823b2dc5bf22e5545d9781d675ba5ac82b81782f502b34d2335eee2c26167726746a61a0ad566b657d2faf0 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/hdr/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/sqlite-modern-cpp) +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/sqlite-modern-cpp RENAME copyright) diff --git a/vcpkg/ports/sqlite-orm/CONTROL b/vcpkg/ports/sqlite-orm/CONTROL new file mode 100644 index 0000000..e5f4bcc --- /dev/null +++ b/vcpkg/ports/sqlite-orm/CONTROL @@ -0,0 +1,13 @@ +Source: sqlite-orm +Version: 1.5 +Port-Version: 2 +Homepage: https://github.com/fnc12/sqlite_orm +Build-Depends: sqlite3 +Description: SQLite ORM light header only library for modern C++ + +Feature: test +Description: Build sqlite_orm unit tests +Build-Depends: catch2 + +Feature: example +Description: Build examples diff --git a/vcpkg/ports/sqlite-orm/fix-build-error.patch b/vcpkg/ports/sqlite-orm/fix-build-error.patch new file mode 100644 index 0000000..ca4e005 --- /dev/null +++ b/vcpkg/ports/sqlite-orm/fix-build-error.patch @@ -0,0 +1,24 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5ffbdf3..6debae6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -39,6 +39,9 @@ set(ProjectName "SqliteOrm") + + option(SqliteOrm_BuildTests "Build sqlite_orm unit tests" ON) + ++find_package(unofficial-sqlite3 CONFIG REQUIRED) ++link_libraries(unofficial::sqlite3::sqlite3) ++ + set(SqliteOrm_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/include") + add_library(sqlite_orm INTERFACE) + +@@ -75,7 +78,9 @@ if(SqliteOrm_BuildTests AND BUILD_TESTING) + add_subdirectory(tests) + endif() + ++if(BUILD_EXAMPLES) + add_subdirectory(examples) ++endif() + + install(TARGETS sqlite_orm EXPORT "${ProjectName}Targets" + INCLUDES DESTINATION "${INCLUDE_INSTALL_DIR}" COMPONENT Development diff --git a/vcpkg/ports/sqlite-orm/fix-example-feature.patch b/vcpkg/ports/sqlite-orm/fix-example-feature.patch new file mode 100644 index 0000000..ad68dad --- /dev/null +++ b/vcpkg/ports/sqlite-orm/fix-example-feature.patch @@ -0,0 +1,11 @@ +diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt +index 2857b65..3ee46e6 100644 +--- a/examples/CMakeLists.txt ++++ b/examples/CMakeLists.txt +@@ -4,5 +4,5 @@ file(GLOB files "*.cpp") + foreach(file ${files}) + get_filename_component(file_basename ${file} NAME_WE) + add_executable(${file_basename} ${file}) +- target_link_libraries(${file_basename} PRIVATE sqlite_orm sqlite3) ++ target_link_libraries(${file_basename} PRIVATE sqlite_orm) + endforeach() diff --git a/vcpkg/ports/sqlite-orm/fix-test-feature.patch b/vcpkg/ports/sqlite-orm/fix-test-feature.patch new file mode 100644 index 0000000..2f82593 --- /dev/null +++ b/vcpkg/ports/sqlite-orm/fix-test-feature.patch @@ -0,0 +1,30 @@ +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 578cbed..c1c6d56 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -4,11 +4,11 @@ option(SQLITE_ORM_OMITS_CODECVT "Omits codec testing" OFF) + + option(SqliteOrm_SysSqlite "Use system version of sqlite library" OFF) + +-if(SqliteOrm_SysSqlite) +- message(FATAL_ERROR "WIP: please, disable the SqliteOrm_SysSqlite option.") +-else() +- add_subdirectory(third_party/sqlite) +-endif() ++#if(SqliteOrm_SysSqlite) ++# message(FATAL_ERROR "WIP: please, disable the SqliteOrm_SysSqlite option.") ++#else() ++# add_subdirectory(third_party/sqlite) ++#endif() + + add_executable(unit_tests tests.cpp tests2.cpp tests3.cpp tests4.cpp tests4.cpp private_getters_tests.cpp pragma_tests.cpp explicit_columns.cpp core_functions_tests.cpp composite_key.cpp static_tests.cpp operators.cpp operators/like.cpp operators/glob.cpp operators/in.cpp operators/cast.cpp operators/is_null.cpp dynamic_order_by.cpp prepared_statement_tests/select.cpp prepared_statement_tests/get_all.cpp prepared_statement_tests/get_all_pointer.cpp prepared_statement_tests/get_all_optional.cpp prepared_statement_tests/update_all.cpp prepared_statement_tests/remove_all.cpp prepared_statement_tests/get.cpp prepared_statement_tests/get_pointer.cpp prepared_statement_tests/get_optional.cpp prepared_statement_tests/update.cpp prepared_statement_tests/remove.cpp prepared_statement_tests/insert.cpp prepared_statement_tests/replace.cpp prepared_statement_tests/insert_range.cpp prepared_statement_tests/replace_range.cpp prepared_statement_tests/insert_explicit.cpp pragma_tests.cpp simple_query.cpp static_tests/is_bindable.cpp static_tests/arithmetic_operators_result_type.cpp static_tests/tuple_conc.cpp static_tests/node_tuple.cpp static_tests/bindable_filter.cpp static_tests/count_tuple.cpp constraints/default.cpp constraints/foreign_key.cpp) + +@@ -19,7 +19,7 @@ if(SQLITE_ORM_OMITS_CODECVT) + endif() + + find_package(Catch2 REQUIRED) +-target_link_libraries(unit_tests PRIVATE sqlite_orm sqlite3 Catch2::Catch2) ++target_link_libraries(unit_tests PRIVATE sqlite_orm Catch2::Catch2) + + enable_testing() + diff --git a/vcpkg/ports/sqlite-orm/fix-usage.patch b/vcpkg/ports/sqlite-orm/fix-usage.patch new file mode 100644 index 0000000..7e90b0e --- /dev/null +++ b/vcpkg/ports/sqlite-orm/fix-usage.patch @@ -0,0 +1,59 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6debae6..facdc1e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -47,7 +47,7 @@ add_library(sqlite_orm INTERFACE) + + target_sources(sqlite_orm INTERFACE + $ +- $) ++ $) + + target_include_directories(sqlite_orm INTERFACE + $ +@@ -83,11 +83,11 @@ add_subdirectory(examples) + endif() + + install(TARGETS sqlite_orm EXPORT "${ProjectName}Targets" +- INCLUDES DESTINATION "${INCLUDE_INSTALL_DIR}" COMPONENT Development +- PUBLIC_HEADER DESTINATION "${INCLUDE_INSTALL_DIR}" COMPONENT Development) ++ INCLUDES DESTINATION "${INCLUDE_INSTALL_DIR}" ++ PUBLIC_HEADER DESTINATION "${INCLUDE_INSTALL_DIR}") + + install(FILES "include/sqlite_orm/sqlite_orm.h" +- DESTINATION "${INCLUDE_INSTALL_DIR}" COMPONENT Development) ++ DESTINATION "${INCLUDE_INSTALL_DIR}") + + export(EXPORT "${ProjectName}Targets" + FILE "${CMAKE_CURRENT_BINARY_DIR}/${ProjectName}/${ProjectName}Targets.cmake" +diff --git a/build/cmake/GenerateConfigModule.cmake b/build/cmake/GenerateConfigModule.cmake +index 3c5143d..a49f76a 100644 +--- a/build/cmake/GenerateConfigModule.cmake ++++ b/build/cmake/GenerateConfigModule.cmake +@@ -1,7 +1,7 @@ + include(CMakePackageConfigHelpers) + +-set(PACKAGE_INCLUDE_INSTALL_DIR "${includedir}/sqlite_orm") +-set(PACKAGE_CMAKE_INSTALL_DIR "${cmakedir}/sqlite_orm") ++set(PACKAGE_INCLUDE_INSTALL_DIR "${includedir}") ++set(PACKAGE_CMAKE_INSTALL_DIR "${cmakedir}") + + # In CYGWIN enviroment below commands does not work properly + if (NOT CYGWIN) +diff --git a/build/cmake/SqliteOrmConfig.cmake.in b/build/cmake/SqliteOrmConfig.cmake.in +index a6b6f20..7411aa1 100644 +--- a/build/cmake/SqliteOrmConfig.cmake.in ++++ b/build/cmake/SqliteOrmConfig.cmake.in +@@ -3,10 +3,10 @@ set(SQLITE_ORM_VERSION ${sqlite_orm_VERSION}) + @PACKAGE_INIT@ + + set_and_check(SQLITE_ORM_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") +-set_and_check(SQLITE_ORM_CMAKE_DIR "@PACKAGE_CMAKE_INSTALL_DIR@") ++set_and_check(SQLITE_ORM_CMAKE_DIR "@PACKAGE_CMAKE_INSTALL_DIR@/../../") + + if (NOT TARGET sqlite_orm::sqlite_orm) +- include("${SQLITE_ORM_CMAKE_DIR}/SqliteOrmTargets.cmake") ++ include("${SQLITE_ORM_CMAKE_DIR}/share/SqliteOrm/SqliteOrmTargets.cmake") + endif() + + set(SQLITE_ORM_LIBRARIES sqlite_orm::sqlite_orm) diff --git a/vcpkg/ports/sqlite-orm/portfile.cmake b/vcpkg/ports/sqlite-orm/portfile.cmake new file mode 100644 index 0000000..140ab42 --- /dev/null +++ b/vcpkg/ports/sqlite-orm/portfile.cmake @@ -0,0 +1,44 @@ +# header-only library + +set(FEATURE_PATCHES) + +if(test IN_LIST FEATURES) + list(APPEND FEATURE_PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-test-feature.patch) +endif() + +if(example IN_LIST FEATURES) + list(APPEND FEATURE_PATCHES ${CMAKE_CURRENT_LIST_DIR}/fix-example-feature.patch) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fnc12/sqlite_orm + REF b30ddc6a50dc582c93cd49d8d0cf8f5025ba1d2b # 1.5 + SHA512 faeeef88aef11e89e9565850c23087925fb4d75ef48a16434055f18831db8e230d044c81574d840dacca406d7095cb83a113afc326996e289ab11a02d8caa2f4 + HEAD_REF master + PATCHES + fix-build-error.patch + fix-usage.patch + ${FEATURE_PATCHES} +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + test SqliteOrm_BuildTests + example BUILD_EXAMPLES +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DSQLITE_ORM_ENABLE_CXX_17=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/sqlite_orm TARGET_PATH share/SqliteOrm) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/sqlite3/CMakeLists.txt b/vcpkg/ports/sqlite3/CMakeLists.txt new file mode 100644 index 0000000..6250eb7 --- /dev/null +++ b/vcpkg/ports/sqlite3/CMakeLists.txt @@ -0,0 +1,65 @@ +cmake_minimum_required(VERSION 3.10) +project(sqlite3 C) + +include_directories(.) +if(BUILD_SHARED_LIBS) + if(UNIX) + set(API "-DSQLITE_API=__attribute__((visibility(\"default\")))") + elseif(CMAKE_SYSTEM_NAME MATCHES "Windows") + set(API "-DSQLITE_API=__declspec(dllexport)") + else() + message(FATAL_ERROR "Unsupported platform: ${CMAKE_SYSTEM_NAME}") + endif() +else() + set(API "-DSQLITE_API=extern") +endif() +add_library(sqlite3 sqlite3.c) + +target_compile_definitions( + sqlite3 + PRIVATE + $<$:SQLITE_DEBUG> + ${API} + -DSQLITE_ENABLE_RTREE + -DSQLITE_ENABLE_UNLOCK_NOTIFY + -DSQLITE_ENABLE_COLUMN_METADATA +) + +if(WITH_GEOPOLY) + add_compile_definitions(SQLITE_ENABLE_GEOPOLY) +endif() + +if(WITH_JSON1) + add_compile_definitions(SQLITE_ENABLE_JSON1) +endif() + +target_include_directories(sqlite3 INTERFACE $) +if(NOT WIN32) + find_package(Threads REQUIRED) + target_link_libraries(sqlite3 PRIVATE Threads::Threads ${CMAKE_DL_LIBS}) +endif() + +if(CMAKE_SYSTEM_NAME MATCHES "WindowsStore") + target_compile_definitions(sqlite3 PRIVATE -DSQLITE_OS_WINRT=1) +endif() + +if(NOT SQLITE3_SKIP_TOOLS) + add_executable(sqlite3-bin shell.c) + target_link_libraries(sqlite3-bin PRIVATE sqlite3) + install(TARGETS sqlite3-bin sqlite3 + RUNTIME DESTINATION tools + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + ) +endif() + +install( + TARGETS sqlite3 + EXPORT unofficial-sqlite3-targets + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install(FILES sqlite3.h sqlite3ext.h DESTINATION include CONFIGURATIONS Release) +install(EXPORT unofficial-sqlite3-targets NAMESPACE unofficial::sqlite3:: FILE unofficial-sqlite3-targets.cmake DESTINATION share/unofficial-sqlite3) diff --git a/vcpkg/ports/sqlite3/CONTROL b/vcpkg/ports/sqlite3/CONTROL new file mode 100644 index 0000000..e90a64f --- /dev/null +++ b/vcpkg/ports/sqlite3/CONTROL @@ -0,0 +1,13 @@ +Source: sqlite3 +Version: 3.33.0 +Homepage: https://sqlite.org/ +Description: SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. + +Feature: tool +Description: sqlite3 executable + +Feature: geopoly +Description: enable geopoly functionality for sqlite3 + +Feature: json1 +Description: enable JSON functionality for sqlite3 diff --git a/vcpkg/ports/sqlite3/fix-arm-uwp.patch b/vcpkg/ports/sqlite3/fix-arm-uwp.patch new file mode 100644 index 0000000..03e0929 --- /dev/null +++ b/vcpkg/ports/sqlite3/fix-arm-uwp.patch @@ -0,0 +1,33 @@ +diff --git a/shell.c b/shell.c +index 10d8cc1..99f37a5 100644 +--- a/shell.c ++++ b/shell.c +@@ -316,7 +316,11 @@ static int hasTimer(void){ + */ + hProcess = GetCurrentProcess(); + if( hProcess ){ ++#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) + HINSTANCE hinstLib = LoadLibrary(TEXT("Kernel32.dll")); ++#else ++ HINSTANCE hinstLib = LoadPackagedLibrary(TEXT("Kernel32.dll"), 0); ++#endif + if( NULL != hinstLib ){ + getProcessTimesAddr = + (GETPROCTIMES) GetProcAddress(hinstLib, "GetProcessTimes"); +@@ -2437,10 +2441,16 @@ static int writeFile( + if( zUnicodeName==0 ){ + return 1; + } ++#if !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) + hFile = CreateFileW( + zUnicodeName, FILE_WRITE_ATTRIBUTES, 0, NULL, OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS, NULL + ); ++#else ++ hFile = CreateFile2( ++ zUnicodeName, FILE_WRITE_ATTRIBUTES, 0, OPEN_EXISTING, NULL ++ ); ++#endif + sqlite3_free(zUnicodeName); + if( hFile!=INVALID_HANDLE_VALUE ){ + BOOL bResult = SetFileTime(hFile, NULL, &lastAccess, &lastWrite); diff --git a/vcpkg/ports/sqlite3/portfile.cmake b/vcpkg/ports/sqlite3/portfile.cmake new file mode 100644 index 0000000..ac61e22 --- /dev/null +++ b/vcpkg/ports/sqlite3/portfile.cmake @@ -0,0 +1,51 @@ +set(SQLITE_VERSION 3330000) +set(SQLITE_HASH a9cb038c82dcafe1b5aa410f60bff21066b3e3456161bc91829a1a3b3b6591e0595209f45d4a6b10b0ad08e88df3f1b2062d4b075205e32d34780da7dea3e07b) + +vcpkg_download_distfile(ARCHIVE + URLS "https://sqlite.org/2020/sqlite-amalgamation-${SQLITE_VERSION}.zip" + FILENAME "sqlite-amalgamation-${SQLITE_VERSION}.zip" + SHA512 ${SQLITE_HASH} +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${SQLITE_VERSION} + PATCHES fix-arm-uwp.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + geopoly WITH_GEOPOLY + json1 WITH_JSON1 + INVERTED_FEATURES + tool SQLITE3_SKIP_TOOLS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + OPTIONS_DEBUG + -DSQLITE3_SKIP_TOOLS=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +if(NOT SQLITE3_SKIP_TOOLS AND EXISTS ${CURRENT_PACKAGES_DIR}/tools/sqlite3-bin${VCPKG_HOST_EXECUTABLE_SUFFIX}) + file(RENAME ${CURRENT_PACKAGES_DIR}/tools/sqlite3-bin${VCPKG_HOST_EXECUTABLE_SUFFIX} ${CURRENT_PACKAGES_DIR}/tools/sqlite3${VCPKG_HOST_EXECUTABLE_SUFFIX}) +endif() + +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/sqlite3-config.in.cmake + ${CURRENT_PACKAGES_DIR}/share/unofficial-${PORT}/unofficial-sqlite3-config.cmake + @ONLY +) + +file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "SQLite is in the Public Domain.\nhttp://www.sqlite.org/copyright.html\n") +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/sqlite3/sqlite3-config.in.cmake b/vcpkg/ports/sqlite3/sqlite3-config.in.cmake new file mode 100644 index 0000000..e7e26bf --- /dev/null +++ b/vcpkg/ports/sqlite3/sqlite3-config.in.cmake @@ -0,0 +1,7 @@ + +if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static" AND NOT WIN32) + include(CMakeFindDependencyMacro) + find_dependency(Threads) +endif() + +include(${CMAKE_CURRENT_LIST_DIR}/unofficial-sqlite3-targets.cmake) diff --git a/vcpkg/ports/sqlitecpp/0001-Find-external-sqlite3.patch b/vcpkg/ports/sqlitecpp/0001-Find-external-sqlite3.patch new file mode 100644 index 0000000..5914dc1 --- /dev/null +++ b/vcpkg/ports/sqlitecpp/0001-Find-external-sqlite3.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9363c0d..0f47f0f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -227,9 +227,9 @@ if (SQLITECPP_INTERNAL_SQLITE) + add_subdirectory(sqlite3) + target_link_libraries(SQLiteCpp PUBLIC sqlite3) + else (SQLITECPP_INTERNAL_SQLITE) +- find_package (SQLite3 REQUIRED) ++ find_package(unofficial-sqlite3 CONFIG) + message(STATUS "Link to sqlite3 system library") +- target_link_libraries(SQLiteCpp PUBLIC SQLite::SQLite3) ++ target_link_libraries(SQLiteCpp PRIVATE unofficial::sqlite3::sqlite3) + if(SQLite3_VERSION VERSION_LESS "3.19") + set_target_properties(SQLiteCpp PROPERTIES COMPILE_FLAGS "-DSQLITECPP_HAS_MEM_STRUCT") + endif() diff --git a/vcpkg/ports/sqlitecpp/CONTROL b/vcpkg/ports/sqlitecpp/CONTROL new file mode 100644 index 0000000..a0566c0 --- /dev/null +++ b/vcpkg/ports/sqlitecpp/CONTROL @@ -0,0 +1,5 @@ +Source: sqlitecpp +Version: 3.1.1 +Build-Depends: sqlite3 +Homepage: https://github.com/SRombauts/SQLiteCpp +Description: SQLiteC++ (SQLiteCpp) is a smart and easy to use C++ SQLite3 wrapper. diff --git a/vcpkg/ports/sqlitecpp/fix_dependency.patch b/vcpkg/ports/sqlitecpp/fix_dependency.patch new file mode 100644 index 0000000..a55c94c --- /dev/null +++ b/vcpkg/ports/sqlitecpp/fix_dependency.patch @@ -0,0 +1,11 @@ +diff --git a/cmake/SQLiteCppConfig.cmake.in b/cmake/SQLiteCppConfig.cmake.in +index 568922f..01196db 100644 +--- a/cmake/SQLiteCppConfig.cmake.in ++++ b/cmake/SQLiteCppConfig.cmake.in +@@ -1,5 +1,5 @@ + include(CMakeFindDependencyMacro) +-find_dependency(SQLite3 REQUIRED) ++find_dependency(unofficial-sqlite3 REQUIRED) + if(@UNIX@) + set(THREADS_PREFER_PTHREAD_FLAG @THREADS_PREFER_PTHREAD_FLAG@) + find_dependency(Threads REQUIRED) diff --git a/vcpkg/ports/sqlitecpp/portfile.cmake b/vcpkg/ports/sqlitecpp/portfile.cmake new file mode 100644 index 0000000..85e4e81 --- /dev/null +++ b/vcpkg/ports/sqlitecpp/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH + REPO "SRombauts/SQLiteCpp" + REF 3.1.1 + HEAD_REF master + SHA512 9030b5249c149db8a5b2fe350f71613e4ee91061765a771640ed3ffa7c24aada4000ba884ef91790fdc0f13dc4519038c1edeba64b85b85ac09c3e955a7988a1 + PATCHES + 0001-Find-external-sqlite3.patch + fix_dependency.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSQLITECPP_RUN_CPPLINT=OFF + -DSQLITECPP_RUN_CPPCHECK=OFF + -DSQLITECPP_INTERNAL_SQLITE=OFF + -DSQLITE_ENABLE_COLUMN_METADATA=OFF + -DSQLITECPP_INTERNAL_SQLITE=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SQLiteCpp) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/sqlpp11-connector-mysql/CONTROL b/vcpkg/ports/sqlpp11-connector-mysql/CONTROL new file mode 100644 index 0000000..cfed369 --- /dev/null +++ b/vcpkg/ports/sqlpp11-connector-mysql/CONTROL @@ -0,0 +1,14 @@ +Source: sqlpp11-connector-mysql +Version: 0.29-1 +Homepage: https://github.com/rbock/sqlpp11-connector-mysql +Description: A C++ wrapper for MySQL meant to be used in combination with sqlpp11. +Build-Depends: date, sqlpp11 +Default-Features: mariadb + +Feature: mariadb +Description: Use MariaDB connector +Build-Depends: libmariadb + +Feature: mysql +Description: Use MySQL connector +Build-Depends: libmysql diff --git a/vcpkg/ports/sqlpp11-connector-mysql/portfile.cmake b/vcpkg/ports/sqlpp11-connector-mysql/portfile.cmake new file mode 100644 index 0000000..2dd953f --- /dev/null +++ b/vcpkg/ports/sqlpp11-connector-mysql/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rbock/sqlpp11-connector-mysql + REF 0.29 + SHA512 0c71d2ea94933be3bbaa8d6afaac7059660bdb0af5ba905844d95facb5e73a122c3ccd723a48a7fd8db0c028309ac6dc8b91c6838dfbfe530727161d62a1481f + HEAD_REF master +) + +# Use sqlpp11-connector-mysql's own build process, skipping tests +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DENABLE_TESTS:BOOL=OFF + -DDATE_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include + -DSQLPP11_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include + -DMYSQL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/mysql +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sqlpp11-connector-mysql RENAME copyright) diff --git a/vcpkg/ports/sqlpp11-connector-sqlite3/CONTROL b/vcpkg/ports/sqlpp11-connector-sqlite3/CONTROL new file mode 100644 index 0000000..564a9a9 --- /dev/null +++ b/vcpkg/ports/sqlpp11-connector-sqlite3/CONTROL @@ -0,0 +1,4 @@ +Source: sqlpp11-connector-sqlite3 +Version: 0.29-2 +Description: A C++ wrapper for sqlite3 meant to be used in combination with sqlpp11. +Build-Depends: date, sqlite3, sqlpp11 diff --git a/vcpkg/ports/sqlpp11-connector-sqlite3/portfile.cmake b/vcpkg/ports/sqlpp11-connector-sqlite3/portfile.cmake new file mode 100644 index 0000000..6587df3 --- /dev/null +++ b/vcpkg/ports/sqlpp11-connector-sqlite3/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rbock/sqlpp11-connector-sqlite3 + REF 0.29 + SHA512 99d1b36209dc879b12b99ed0809f1d21f760c62c25aa32d8f83b571d0819e35783ad20be0754288da9cd5fcb81cbb672031928d159ff9a64c3635dcbc4bda8fa + HEAD_REF master +) + +# Use sqlpp11-connector-sqlite3's own build process, skipping tests +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DENABLE_TESTS:BOOL=OFF + -DSQLPP11_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/sqlpp11-connector-sqlite3 RENAME copyright) diff --git a/vcpkg/ports/sqlpp11/CONTROL b/vcpkg/ports/sqlpp11/CONTROL new file mode 100644 index 0000000..d6b6ad8 --- /dev/null +++ b/vcpkg/ports/sqlpp11/CONTROL @@ -0,0 +1,5 @@ +Source: sqlpp11 +Version: 0.60 +Homepage: https://github.com/rbock/sqlpp11 +Description: A type safe embedded domain specific language for SQL queries and results in C++. +Build-Depends: date diff --git a/vcpkg/ports/sqlpp11/ddl2cpp_path.patch b/vcpkg/ports/sqlpp11/ddl2cpp_path.patch new file mode 100644 index 0000000..bc828e8 --- /dev/null +++ b/vcpkg/ports/sqlpp11/ddl2cpp_path.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/Sqlpp11Config.cmake b/cmake/Sqlpp11Config.cmake +index 18ea9b1..730bce1 100644 +--- a/cmake/Sqlpp11Config.cmake ++++ b/cmake/Sqlpp11Config.cmake +@@ -32,7 +32,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/Sqlpp11Targets.cmake") + + # Import "ddl2cpp" script + if(NOT TARGET sqlpp11::ddl2cpp) +- get_filename_component(sqlpp11_ddl2cpp_location "${CMAKE_CURRENT_LIST_DIR}/../../../bin/sqlpp11-ddl2cpp" REALPATH) ++ get_filename_component(sqlpp11_ddl2cpp_location "${CMAKE_CURRENT_LIST_DIR}/../../scripts/sqlpp11-ddl2cpp" REALPATH) + if(NOT EXISTS "${sqlpp11_ddl2cpp_location}") + message(FATAL_ERROR "The imported target sqlpp11::ddl2cpp references the file '${sqlpp11_ddl2cpp_location}' but this file does not exists.") + endif() diff --git a/vcpkg/ports/sqlpp11/fix-dependency.patch b/vcpkg/ports/sqlpp11/fix-dependency.patch new file mode 100644 index 0000000..d43e10b --- /dev/null +++ b/vcpkg/ports/sqlpp11/fix-dependency.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b8de9fa..82dd632 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -32,14 +32,11 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/") + + include(CTest) + +- +-### Dependencies +-add_subdirectory(dependencies) +- + ### Main targets + add_library(sqlpp11 INTERFACE) + add_library(sqlpp11::sqlpp11 ALIAS sqlpp11) + ++find_package(date CONFIG REQUIRED) + target_link_libraries(sqlpp11 INTERFACE date::date) + + target_include_directories(sqlpp11 INTERFACE diff --git a/vcpkg/ports/sqlpp11/portfile.cmake b/vcpkg/ports/sqlpp11/portfile.cmake new file mode 100644 index 0000000..312c16d --- /dev/null +++ b/vcpkg/ports/sqlpp11/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rbock/sqlpp11 + REF 085713d4d301aeb58e7d14f44cfac6ce35fe2e77 # 0.60 + SHA512 835536482def61c9978cda58507a7f5983b99765f69e7865cf5597b06075dc3e7ad4a3be0b2de2e44e4a4c3a6998115bf567ff586fb656cf5d95a0a7465fb2fe + HEAD_REF master + PATCHES + ddl2cpp_path.patch + fix-dependency.patch +) + +# Use sqlpp11's own build process, skipping tests +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DENABLE_TESTS:BOOL=OFF +) + +vcpkg_install_cmake() + +# Move CMake config files to the right place +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Sqlpp11 TARGET_PATH share/${PORT}) + +# Delete redundant and unnecessary directories +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/cmake ${CURRENT_PACKAGES_DIR}/include/date) + +# Move python script from bin directory +file(COPY ${CURRENT_PACKAGES_DIR}/bin/sqlpp11-ddl2cpp DESTINATION ${CURRENT_PACKAGES_DIR}/scripts) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin/) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/status-value-lite/CONTROL b/vcpkg/ports/status-value-lite/CONTROL new file mode 100644 index 0000000..bc7fa02 --- /dev/null +++ b/vcpkg/ports/status-value-lite/CONTROL @@ -0,0 +1,7 @@ +Source: status-value-lite +Version: 1.1.0 +Homepage: https://github.com/martinmoene/status-value-lite +Description: status_value is a single-file header-only library for objects that represent a status and an optional value. It is intended for use with C++11 and later. + +Feature: test +Description: Build with test diff --git a/vcpkg/ports/status-value-lite/portfile.cmake b/vcpkg/ports/status-value-lite/portfile.cmake new file mode 100644 index 0000000..d3b1dc8 --- /dev/null +++ b/vcpkg/ports/status-value-lite/portfile.cmake @@ -0,0 +1,32 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO martinmoene/status-value-lite + REF v1.1.0 + SHA512 09cad9f40f2b1592316b374e0d1a206e3a79a1c560a2ae3be3bdae9045fa026435cc29f1eee08e26e29a5499f8dc60e485adc50517a827977678d3a5a6e220d2 + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + test BUILD_TESTS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DNSSV_OPT_BUILD_TESTS=${BUILD_TESTS} + -DNSSV_OPT_BUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/status_value-lite) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/vcpkg/ports/stb/CONTROL b/vcpkg/ports/stb/CONTROL new file mode 100644 index 0000000..b048cb8 --- /dev/null +++ b/vcpkg/ports/stb/CONTROL @@ -0,0 +1,4 @@ +Source: stb +Version: 2020-02-08-1 +Homepage: https://github.com/nothings/stb +Description: public domain header-only libraries diff --git a/vcpkg/ports/stb/FindStb.cmake b/vcpkg/ports/stb/FindStb.cmake new file mode 100644 index 0000000..4ffa8b1 --- /dev/null +++ b/vcpkg/ports/stb/FindStb.cmake @@ -0,0 +1,29 @@ +# Distributed under the OSI-approved BSD 3-Clause License. + +#.rst: +# FindStb +# ------------ +# +# Find the Stb include headers. +# +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# This module defines the following variables: +# +# ``Stb_FOUND`` +# True if Stb library found +# +# ``Stb_INCLUDE_DIR`` +# Location of Stb headers +# + +include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) +include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) + +if(NOT Stb_INCLUDE_DIR) + find_path(Stb_INCLUDE_DIR NAMES stb_image.h PATHS ${Stb_DIR} PATH_SUFFIXES include) +endif() + +find_package_handle_standard_args(Stb DEFAULT_MSG Stb_INCLUDE_DIR) +mark_as_advanced(Stb_INCLUDE_DIR) diff --git a/vcpkg/ports/stb/portfile.cmake b/vcpkg/ports/stb/portfile.cmake new file mode 100644 index 0000000..9ac3bd0 --- /dev/null +++ b/vcpkg/ports/stb/portfile.cmake @@ -0,0 +1,14 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nothings/stb + REF c72a95d766b8cbf5514e68d3ddbf6437ac9425b1 + SHA512 2be9b2d7848fca133d5733ebb0fdd1f357195f38a2f2b471af3657468f00a75cc94f029ace6127e748da80e0f86933c16a554593a21d8a9057b7691d39facf4b + HEAD_REF master +) + +file(GLOB HEADER_FILES ${SOURCE_PATH}/*.h) +file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/FindStb.cmake" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/stb/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/stb/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..e787d29 --- /dev/null +++ b/vcpkg/ports/stb/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,6 @@ +set(STB_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${STB_PREV_MODULE_PATH}) diff --git a/vcpkg/ports/stlab/CONTROL b/vcpkg/ports/stlab/CONTROL new file mode 100644 index 0000000..72521a9 --- /dev/null +++ b/vcpkg/ports/stlab/CONTROL @@ -0,0 +1,6 @@ +Source: stlab +Version: 1.5.2-1 +Description: + stlab is the ongoing work of what was Adobe Software Technology Lab. + The Concurrency library provides futures and channels, high level constructs for implementing algorithms that eases the use of multiple CPU cores while minimizing contention. This library solves several problems of the C++11 and C++17 TS futures. +Build-Depends: boost-variant (osx) \ No newline at end of file diff --git a/vcpkg/ports/stlab/portfile.cmake b/vcpkg/ports/stlab/portfile.cmake new file mode 100644 index 0000000..8fb73df --- /dev/null +++ b/vcpkg/ports/stlab/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO stlab/libraries + REF 2e411dd5c8b7eb096e9eb04c46b569c775b126c6 # V1.5.2 + SHA512 c0e3f8b7b44a6da9734b44e5693d28b84e75a9d4844e30d26dbc65cbd6673fe7e7a45f329aadf5ac3d1e7ec9b939230d179ed150bcf4c3f3e96a3a96ed04fadb + HEAD_REF develop +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/stlab) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/share/cmake) + +file(READ ${CURRENT_PACKAGES_DIR}/share/${PORT}/stlabConfig.cmake STLAB_CONFIG) +string(REPLACE "find_dependency(Boost 1.60.0)" "if(APPLE)\nfind_dependency(Boost)\nendif()" STLAB_CONFIG ${STLAB_CONFIG}) + +file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/stlabConfig.cmake "${STLAB_CONFIG}") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/stormlib/CMakeLists.txt b/vcpkg/ports/stormlib/CMakeLists.txt new file mode 100644 index 0000000..e8bf793 --- /dev/null +++ b/vcpkg/ports/stormlib/CMakeLists.txt @@ -0,0 +1,286 @@ +cmake_minimum_required(VERSION 3.9) +project(stormlib) + +set(SRC_FILES + stormlib_dll/StormLib.def + src/adpcm/adpcm.cpp + src/huffman/huff.cpp + src/jenkins/lookup3.c + src/lzma/C/LzFind.c + src/lzma/C/LzmaDec.c + src/lzma/C/LzmaEnc.c + src/pklib/explode.c + src/pklib/implode.c + src/sparse/sparse.cpp + src/FileStream.cpp + src/SBaseCommon.cpp + src/SBaseDumpData.cpp + src/SBaseFileTable.cpp + src/SBaseSubTypes.cpp + src/SCompression.cpp + src/SFileAddFile.cpp + src/SFileAttributes.cpp + src/SFileCompactArchive.cpp + src/SFileCreateArchive.cpp + src/SFileExtractFile.cpp + src/SFileFindFile.cpp + src/SFileGetFileInfo.cpp + src/SFileListFile.cpp + src/SFileOpenArchive.cpp + src/SFileOpenFileEx.cpp + src/SFilePatchArchives.cpp + src/SFileReadFile.cpp + src/SFileVerify.cpp + src/libtomcrypt/src/pk/rsa/rsa_verify_simple.c + src/libtomcrypt/src/misc/crypt_libc.c +) + +if(MSVC) + # This file is used to create a DLL on windows + # Use BUILD_SHARED_LIBS to create StormLib.dll + set(STORM_DEF_FILES + stormlib_dll/StormLib.def + ) +endif() + +set(TOMCRYPT_FILES + src/libtomcrypt/src/hashes/hash_memory.c + src/libtomcrypt/src/hashes/md5.c + src/libtomcrypt/src/hashes/sha1.c + src/libtomcrypt/src/math/ltm_desc.c + src/libtomcrypt/src/math/multi.c + src/libtomcrypt/src/math/rand_prime.c + src/libtomcrypt/src/misc/base64_decode.c + src/libtomcrypt/src/misc/crypt_argchk.c + src/libtomcrypt/src/misc/crypt_find_hash.c + src/libtomcrypt/src/misc/crypt_find_prng.c + src/libtomcrypt/src/misc/crypt_hash_descriptor.c + src/libtomcrypt/src/misc/crypt_hash_is_valid.c + src/libtomcrypt/src/misc/crypt_ltc_mp_descriptor.c + src/libtomcrypt/src/misc/crypt_prng_descriptor.c + src/libtomcrypt/src/misc/crypt_prng_is_valid.c + src/libtomcrypt/src/misc/crypt_register_hash.c + src/libtomcrypt/src/misc/crypt_register_prng.c + src/libtomcrypt/src/misc/zeromem.c + src/libtomcrypt/src/pk/asn1/der_decode_bit_string.c + src/libtomcrypt/src/pk/asn1/der_decode_boolean.c + src/libtomcrypt/src/pk/asn1/der_decode_choice.c + src/libtomcrypt/src/pk/asn1/der_decode_ia5_string.c + src/libtomcrypt/src/pk/asn1/der_decode_integer.c + src/libtomcrypt/src/pk/asn1/der_decode_object_identifier.c + src/libtomcrypt/src/pk/asn1/der_decode_octet_string.c + src/libtomcrypt/src/pk/asn1/der_decode_printable_string.c + src/libtomcrypt/src/pk/asn1/der_decode_sequence_ex.c + src/libtomcrypt/src/pk/asn1/der_decode_sequence_flexi.c + src/libtomcrypt/src/pk/asn1/der_decode_sequence_multi.c + src/libtomcrypt/src/pk/asn1/der_decode_short_integer.c + src/libtomcrypt/src/pk/asn1/der_decode_utctime.c + src/libtomcrypt/src/pk/asn1/der_decode_utf8_string.c + src/libtomcrypt/src/pk/asn1/der_encode_bit_string.c + src/libtomcrypt/src/pk/asn1/der_encode_boolean.c + src/libtomcrypt/src/pk/asn1/der_encode_ia5_string.c + src/libtomcrypt/src/pk/asn1/der_encode_integer.c + src/libtomcrypt/src/pk/asn1/der_encode_object_identifier.c + src/libtomcrypt/src/pk/asn1/der_encode_octet_string.c + src/libtomcrypt/src/pk/asn1/der_encode_printable_string.c + src/libtomcrypt/src/pk/asn1/der_encode_sequence_ex.c + src/libtomcrypt/src/pk/asn1/der_encode_sequence_multi.c + src/libtomcrypt/src/pk/asn1/der_encode_set.c + src/libtomcrypt/src/pk/asn1/der_encode_setof.c + src/libtomcrypt/src/pk/asn1/der_encode_short_integer.c + src/libtomcrypt/src/pk/asn1/der_encode_utctime.c + src/libtomcrypt/src/pk/asn1/der_encode_utf8_string.c + src/libtomcrypt/src/pk/asn1/der_length_bit_string.c + src/libtomcrypt/src/pk/asn1/der_length_boolean.c + src/libtomcrypt/src/pk/asn1/der_length_ia5_string.c + src/libtomcrypt/src/pk/asn1/der_length_integer.c + src/libtomcrypt/src/pk/asn1/der_length_object_identifier.c + src/libtomcrypt/src/pk/asn1/der_length_octet_string.c + src/libtomcrypt/src/pk/asn1/der_length_printable_string.c + src/libtomcrypt/src/pk/asn1/der_length_sequence.c + src/libtomcrypt/src/pk/asn1/der_length_utctime.c + src/libtomcrypt/src/pk/asn1/der_sequence_free.c + src/libtomcrypt/src/pk/asn1/der_length_utf8_string.c + src/libtomcrypt/src/pk/asn1/der_length_short_integer.c + src/libtomcrypt/src/pk/ecc/ltc_ecc_map.c + src/libtomcrypt/src/pk/ecc/ltc_ecc_mul2add.c + src/libtomcrypt/src/pk/ecc/ltc_ecc_mulmod.c + src/libtomcrypt/src/pk/ecc/ltc_ecc_points.c + src/libtomcrypt/src/pk/ecc/ltc_ecc_projective_add_point.c + src/libtomcrypt/src/pk/ecc/ltc_ecc_projective_dbl_point.c + src/libtomcrypt/src/pk/pkcs1/pkcs_1_mgf1.c + src/libtomcrypt/src/pk/pkcs1/pkcs_1_oaep_decode.c + src/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_decode.c + src/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_encode.c + src/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_decode.c + src/libtomcrypt/src/pk/pkcs1/pkcs_1_v1_5_encode.c + src/libtomcrypt/src/pk/rsa/rsa_exptmod.c + src/libtomcrypt/src/pk/rsa/rsa_free.c + src/libtomcrypt/src/pk/rsa/rsa_import.c + src/libtomcrypt/src/pk/rsa/rsa_make_key.c + src/libtomcrypt/src/pk/rsa/rsa_sign_hash.c + src/libtomcrypt/src/pk/rsa/rsa_verify_hash.c +) + +set(TOMMATH_FILES + src/libtommath/bncore.c + src/libtommath/bn_fast_mp_invmod.c + src/libtommath/bn_fast_mp_montgomery_reduce.c + src/libtommath/bn_fast_s_mp_mul_digs.c + src/libtommath/bn_fast_s_mp_mul_high_digs.c + src/libtommath/bn_fast_s_mp_sqr.c + src/libtommath/bn_mp_2expt.c + src/libtommath/bn_mp_abs.c + src/libtommath/bn_mp_add.c + src/libtommath/bn_mp_addmod.c + src/libtommath/bn_mp_add_d.c + src/libtommath/bn_mp_and.c + src/libtommath/bn_mp_clamp.c + src/libtommath/bn_mp_clear.c + src/libtommath/bn_mp_clear_multi.c + src/libtommath/bn_mp_cmp.c + src/libtommath/bn_mp_cmp_d.c + src/libtommath/bn_mp_cmp_mag.c + src/libtommath/bn_mp_cnt_lsb.c + src/libtommath/bn_mp_copy.c + src/libtommath/bn_mp_count_bits.c + src/libtommath/bn_mp_div.c + src/libtommath/bn_mp_div_2.c + src/libtommath/bn_mp_div_2d.c + src/libtommath/bn_mp_div_3.c + src/libtommath/bn_mp_div_d.c + src/libtommath/bn_mp_dr_is_modulus.c + src/libtommath/bn_mp_dr_reduce.c + src/libtommath/bn_mp_dr_setup.c + src/libtommath/bn_mp_exch.c + src/libtommath/bn_mp_exptmod.c + src/libtommath/bn_mp_exptmod_fast.c + src/libtommath/bn_mp_expt_d.c + src/libtommath/bn_mp_exteuclid.c + src/libtommath/bn_mp_fread.c + src/libtommath/bn_mp_fwrite.c + src/libtommath/bn_mp_gcd.c + src/libtommath/bn_mp_get_int.c + src/libtommath/bn_mp_grow.c + src/libtommath/bn_mp_init.c + src/libtommath/bn_mp_init_copy.c + src/libtommath/bn_mp_init_multi.c + src/libtommath/bn_mp_init_set.c + src/libtommath/bn_mp_init_set_int.c + src/libtommath/bn_mp_init_size.c + src/libtommath/bn_mp_invmod.c + src/libtommath/bn_mp_invmod_slow.c + src/libtommath/bn_mp_is_square.c + src/libtommath/bn_mp_jacobi.c + src/libtommath/bn_mp_karatsuba_mul.c + src/libtommath/bn_mp_karatsuba_sqr.c + src/libtommath/bn_mp_lcm.c + src/libtommath/bn_mp_lshd.c + src/libtommath/bn_mp_mod.c + src/libtommath/bn_mp_mod_2d.c + src/libtommath/bn_mp_mod_d.c + src/libtommath/bn_mp_montgomery_calc_normalization.c + src/libtommath/bn_mp_montgomery_reduce.c + src/libtommath/bn_mp_montgomery_setup.c + src/libtommath/bn_mp_mul.c + src/libtommath/bn_mp_mulmod.c + src/libtommath/bn_mp_mul_2.c + src/libtommath/bn_mp_mul_2d.c + src/libtommath/bn_mp_mul_d.c + src/libtommath/bn_mp_neg.c + src/libtommath/bn_mp_n_root.c + src/libtommath/bn_mp_or.c + src/libtommath/bn_mp_prime_fermat.c + src/libtommath/bn_mp_prime_is_divisible.c + src/libtommath/bn_mp_prime_is_prime.c + src/libtommath/bn_mp_prime_miller_rabin.c + src/libtommath/bn_mp_prime_next_prime.c + src/libtommath/bn_mp_prime_rabin_miller_trials.c + src/libtommath/bn_mp_prime_random_ex.c + src/libtommath/bn_mp_radix_size.c + src/libtommath/bn_mp_radix_smap.c + src/libtommath/bn_mp_rand.c + src/libtommath/bn_mp_read_radix.c + src/libtommath/bn_mp_read_signed_bin.c + src/libtommath/bn_mp_read_unsigned_bin.c + src/libtommath/bn_mp_reduce.c + src/libtommath/bn_mp_reduce_2k.c + src/libtommath/bn_mp_reduce_2k_l.c + src/libtommath/bn_mp_reduce_2k_setup.c + src/libtommath/bn_mp_reduce_2k_setup_l.c + src/libtommath/bn_mp_reduce_is_2k.c + src/libtommath/bn_mp_reduce_is_2k_l.c + src/libtommath/bn_mp_reduce_setup.c + src/libtommath/bn_mp_rshd.c + src/libtommath/bn_mp_set.c + src/libtommath/bn_mp_set_int.c + src/libtommath/bn_mp_shrink.c + src/libtommath/bn_mp_signed_bin_size.c + src/libtommath/bn_mp_sqr.c + src/libtommath/bn_mp_sqrmod.c + src/libtommath/bn_mp_sqrt.c + src/libtommath/bn_mp_sub.c + src/libtommath/bn_mp_submod.c + src/libtommath/bn_mp_sub_d.c + src/libtommath/bn_mp_toom_mul.c + src/libtommath/bn_mp_toom_sqr.c + src/libtommath/bn_mp_toradix.c + src/libtommath/bn_mp_toradix_n.c + src/libtommath/bn_mp_to_signed_bin.c + src/libtommath/bn_mp_to_signed_bin_n.c + src/libtommath/bn_mp_to_unsigned_bin.c + src/libtommath/bn_mp_to_unsigned_bin_n.c + src/libtommath/bn_mp_unsigned_bin_size.c + src/libtommath/bn_mp_xor.c + src/libtommath/bn_mp_zero.c + src/libtommath/bn_prime_tab.c + src/libtommath/bn_reverse.c + src/libtommath/bn_s_mp_add.c + src/libtommath/bn_s_mp_exptmod.c + src/libtommath/bn_s_mp_mul_digs.c + src/libtommath/bn_s_mp_mul_high_digs.c + src/libtommath/bn_s_mp_sqr.c + src/libtommath/bn_s_mp_sub.c +) + +find_package(ZLIB REQUIRED) +find_package(BZip2 REQUIRED) + +if(WIN32) + set(LINK_LIBS wininet) +endif() + +list(APPEND LINK_LIBS ZLIB::ZLIB BZip2::BZip2) + +if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + message(STATUS "Using FreeBSD port") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DO_LARGEFILE=0 -Dstat64=stat -Dlstat64=lstat -Dlseek64=lseek -Doff64_t=off_t -Dfstat64=fstat -Dftruncate64=ftruncate") +endif() + +add_library(stormlib ${LIB_TYPE} ${SRC_FILES} ${TOMCRYPT_FILES} ${TOMMATH_FILES} ${STORM_DEF_FILES}) +add_definitions(-D__SYS_ZLIB -D__SYS_BZLIB) + +target_link_libraries(stormlib PRIVATE ${LINK_LIBS}) + +target_compile_definitions(stormlib PRIVATE _7ZIP_ST BZ_STRICT_ANSI) + +if(WIN32) + target_compile_definitions(stormlib PRIVATE UNICODE _UNICODE) +endif() + +if(NOT MSVC) + # don't error on implicit declarations, which are invalid in C99 but commonly used + target_compile_options(stormlib PRIVATE -Wno-error=implicit-function-declaration) +endif() + + +set_target_properties(stormlib PROPERTIES PUBLIC_HEADER "src/StormLib.h;src/StormPort.h") + +install(TARGETS stormlib EXPORT stormlibConfig + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + PUBLIC_HEADER DESTINATION include +) + +install(EXPORT stormlibConfig NAMESPACE stormlib:: DESTINATION share/stormlib) diff --git a/vcpkg/ports/stormlib/CONTROL b/vcpkg/ports/stormlib/CONTROL new file mode 100644 index 0000000..4a38c9f --- /dev/null +++ b/vcpkg/ports/stormlib/CONTROL @@ -0,0 +1,5 @@ +Source: stormlib +Version: 2019-05-10 +Port-Version: 2 +Build-Depends: zlib, bzip2 +Description: StormLib is a library for opening and manipulating Blizzard MPQ files diff --git a/vcpkg/ports/stormlib/portfile.cmake b/vcpkg/ports/stormlib/portfile.cmake new file mode 100644 index 0000000..d0e9e36 --- /dev/null +++ b/vcpkg/ports/stormlib/portfile.cmake @@ -0,0 +1,25 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ladislav-zezula/StormLib + REF 2f0e0e69e6b3739d7c450ac3d38816aee45ac3c2 + SHA512 54cbe4270963944edf3d75b845047add2b004e0d95b20b75a4c4790c2a12a41bf19cc4f55aaeaec697a0a913827e11cfabde2123b2b13730556310dd89eef1e9 + HEAD_REF master +) + +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt + DESTINATION ${SOURCE_PATH} +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/stormlib RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +vcpkg_fixup_cmake_targets() \ No newline at end of file diff --git a/vcpkg/ports/strict-variant/CONTROL b/vcpkg/ports/strict-variant/CONTROL new file mode 100644 index 0000000..598dd37 --- /dev/null +++ b/vcpkg/ports/strict-variant/CONTROL @@ -0,0 +1,3 @@ +Source: strict-variant +Version: 0.5 +Description: Tagged union implementation that will never throw an exception or make a dynamic allocation in the effort of supporting types that have throwing moves. diff --git a/vcpkg/ports/strict-variant/portfile.cmake b/vcpkg/ports/strict-variant/portfile.cmake new file mode 100644 index 0000000..98108b9 --- /dev/null +++ b/vcpkg/ports/strict-variant/portfile.cmake @@ -0,0 +1,17 @@ +# header-only +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cbeck88/strict-variant + REF 6378755e3c612cd870c2720232db1e5423dbbe73 + SHA512 45432caab51d42b86839f5ed194e79630ee5cbedd6e41eaadc10d28788ceb8c4629c0432ce888a5729266585e03cf4e6206c8ec66d1b1bc3d7d60220b3909f1d + HEAD_REF master +) + +# Copy header files +file(COPY ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.hpp") + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/strict-variant) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/strict-variant/LICENSE ${CURRENT_PACKAGES_DIR}/share/strict-variant/copyright) diff --git a/vcpkg/ports/string-theory/CONTROL b/vcpkg/ports/string-theory/CONTROL new file mode 100644 index 0000000..9627976 --- /dev/null +++ b/vcpkg/ports/string-theory/CONTROL @@ -0,0 +1,4 @@ +Source: string-theory +Version: 3.3 +Homepage: https://github.com/zrax/string_theory +Description: Flexible modern C++ string library with type-safe formatting. diff --git a/vcpkg/ports/string-theory/portfile.cmake b/vcpkg/ports/string-theory/portfile.cmake new file mode 100644 index 0000000..864dc57 --- /dev/null +++ b/vcpkg/ports/string-theory/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zrax/string_theory + REF 3.3 + SHA512 86209333dce341078c3b973084bd9f3b8ff2ccac0e07a5e6acf5973bd1cfa420897b531b2d1bd6aba9f5ccc8927f85d91f06796ac0e62ec8a735564a0387d2f4 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/string_theory) + +file(RENAME ${CURRENT_PACKAGES_DIR}/share/string-theory ${CURRENT_PACKAGES_DIR}/share/string_theory) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/string-theory) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/string-theory/LICENSE ${CURRENT_PACKAGES_DIR}/share/string-theory/copyright) +file(COPY ${CURRENT_PACKAGES_DIR}/share/string-theory/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/string_theory/copyright) diff --git a/vcpkg/ports/string-view-lite/CONTROL b/vcpkg/ports/string-view-lite/CONTROL new file mode 100644 index 0000000..f14d36c --- /dev/null +++ b/vcpkg/ports/string-view-lite/CONTROL @@ -0,0 +1,3 @@ +Source: string-view-lite +Version: 1.3.0 +Description: A C++17-like string_view for C++98, C++11 and later in a single-file header-only library diff --git a/vcpkg/ports/string-view-lite/portfile.cmake b/vcpkg/ports/string-view-lite/portfile.cmake new file mode 100644 index 0000000..068b16c --- /dev/null +++ b/vcpkg/ports/string-view-lite/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO martinmoene/string-view-lite + REF v1.3.0 + SHA512 52fb76198249ade5352d95af4a4e305b3e22b464a5d0a702e4b2228b1ca30df98b90bb01d5bfd16ae6ebb7bab5aecac5bd4a867898c362e82e57c2aaf938e07a +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSTRING_VIEW_LITE_OPT_BUILD_TESTS=OFF + -DSTRING_VIEW_LITE_OPT_BUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets( + CONFIG_PATH lib/cmake/${PORT} +) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/lib +) + +file(INSTALL + ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright +) diff --git a/vcpkg/ports/strtk/CONTROL b/vcpkg/ports/strtk/CONTROL new file mode 100644 index 0000000..0effa1b --- /dev/null +++ b/vcpkg/ports/strtk/CONTROL @@ -0,0 +1,5 @@ +Source: strtk +Version: 2019-01-09 +Homepage: https://github.com/ArashPartow/strtk +Description: robust, optimized and portable string processing algorithms for the C++ language +Build-Depends: boost diff --git a/vcpkg/ports/strtk/copyright b/vcpkg/ports/strtk/copyright new file mode 100644 index 0000000..e732a0a --- /dev/null +++ b/vcpkg/ports/strtk/copyright @@ -0,0 +1,8 @@ +Copyright 2002-2018 Arash Partow +http://www.partow.net/programming/strtk/index.html + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vcpkg/ports/strtk/portfile.cmake b/vcpkg/ports/strtk/portfile.cmake new file mode 100644 index 0000000..6790325 --- /dev/null +++ b/vcpkg/ports/strtk/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ArashPartow/strtk + REF c6168dda1deed942b2fbfde9d80f53049fa79f20 + SHA512 7595f412838e86d4b7cf0ca3da4dc8aebe40011fb29058e1ee42e23923fbbadeb9a2d0fceac3362b2d0a228ff86c111457f9204b533edb8e0379f3022976906e +) + +file(COPY ${SOURCE_PATH}/strtk.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/strtk) diff --git a/vcpkg/ports/stx/CMakeLists.patch b/vcpkg/ports/stx/CMakeLists.patch new file mode 100644 index 0000000..70aaccb --- /dev/null +++ b/vcpkg/ports/stx/CMakeLists.patch @@ -0,0 +1,71 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e4ed99e..b0d2b15 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -204,12 +204,7 @@ endif() + # =============================================== + + if(STX_ENABLE_BACKTRACE) +- if(NOT EXISTS third_party/abseil) +- execute_process( +- COMMAND git submodule update --init --recursive third_party/abseil +- WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) +- endif() +- add_subdirectory(third_party/abseil) ++ find_package(absl CONFIG REQUIRED) + endif() + + # the atomics library doesn't automatically link on my Android phone +@@ -246,13 +241,17 @@ else() + add_library(stx STATIC ${STX_SRCS}) + endif() + +-target_include_directories(stx PUBLIC include) ++target_include_directories(stx PUBLIC ++ $ ++ $ ++) ++ + target_compile_options(stx PRIVATE ${STX_FLAGS} ${STX_WARNING_FLAGS}) + target_compile_definitions(stx PUBLIC ${STX_COMPILER_DEFS}) + target_link_libraries(stx ${STX_LIB_DEPENDENCIES}) + + if(STX_ENABLE_BACKTRACE) +- target_link_libraries(stx absl::stacktrace absl::symbolize) ++ target_link_libraries(stx PUBLIC absl::stacktrace absl::symbolize) + endif() + + if(ANDROID) +@@ -288,6 +287,7 @@ endif() + # + # =============================================== + ++ + if(STX_BUILD_BENCHMARKS) + + if(NOT EXISTS third_party/benchmark) +@@ -433,3 +433,24 @@ if(STX_BUILD_DOCS) + DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/docs/html/assets) + + endif() ++ ++install( ++ TARGETS stx ++ EXPORT stx ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib ++ RUNTIME DESTINATION bin ++) ++ ++install( ++ DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ ++ DESTINATION include ++ FILES_MATCHING PATTERN "*.h*") ++ ++install( ++ EXPORT stx ++ DESTINATION share/stx ++ FILE stxConfig.cmake ++ NAMESPACE stx:: ++) ++ diff --git a/vcpkg/ports/stx/CONTROL b/vcpkg/ports/stx/CONTROL new file mode 100644 index 0000000..cd68869 --- /dev/null +++ b/vcpkg/ports/stx/CONTROL @@ -0,0 +1,8 @@ +Source: stx +Version: 1.0.1 +Homepage: https://github.com/lamarrr/STX +Description: C++17 & C++ 20 error-handling and utility extensions + +Feature: backtrace +Description: stacktrace support for STX +Build-Depends: abseil diff --git a/vcpkg/ports/stx/portfile.cmake b/vcpkg/ports/stx/portfile.cmake new file mode 100644 index 0000000..ebfca54 --- /dev/null +++ b/vcpkg/ports/stx/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lamarrr/STX + REF v1.0.1 + SHA512 544ca32f07cd863082fa9688f5d56e2715b0129ff90d2a8533cc24a92c943e5848c4b2b06a71f54c12668f6e89e9e3c649f595f9eb886f671a5fa18d343f794b + HEAD_REF master + PATCHES + "CMakeLists.patch" +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + backtrace STX_ENABLE_BACKTRACE +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DSTX_BUILD_DOCS=OFF + -DSTX_BUILD_BENCHMARKS=OFF + -DSTX_BUILD_SHARED=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/stx) +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" +) diff --git a/vcpkg/ports/stxxl/0001-fix-visual-studio.patch b/vcpkg/ports/stxxl/0001-fix-visual-studio.patch new file mode 100644 index 0000000..3506c51 --- /dev/null +++ b/vcpkg/ports/stxxl/0001-fix-visual-studio.patch @@ -0,0 +1,272 @@ +diff --git a/include/stxxl/bits/algo/ksort.h b/include/stxxl/bits/algo/ksort.h +index 33ec8cf..4079a57 100644 +--- a/include/stxxl/bits/algo/ksort.h ++++ b/include/stxxl/bits/algo/ksort.h +@@ -299,11 +299,7 @@ create_runs( + template +-struct run_cursor2_cmp : public std::binary_function< +- run_cursor2, +- run_cursor2, +- bool +- > ++struct run_cursor2_cmp + { + typedef run_cursor2 cursor_type; + KeyExtractor keyobj; +@@ -327,7 +323,7 @@ private: + }; + + template +-class key_comparison : public std::binary_function ++class key_comparison + { + KeyExtractor ke; + +diff --git a/include/stxxl/bits/algo/sort_helper.h b/include/stxxl/bits/algo/sort_helper.h +index 524e40d..69234c4 100644 +--- a/include/stxxl/bits/algo/sort_helper.h ++++ b/include/stxxl/bits/algo/sort_helper.h +@@ -51,7 +51,6 @@ struct trigger_entry + + template + struct trigger_entry_cmp +- : public std::binary_function + { + typedef TriggerEntryType trigger_entry_type; + ValueCmp cmp; +@@ -67,11 +66,6 @@ template + struct run_cursor2_cmp +- : public std::binary_function< +- run_cursor2, +- run_cursor2, +- bool +- > + { + typedef BlockType block_type; + typedef PrefetcherType prefetcher_type; +diff --git a/include/stxxl/bits/compat/unique_ptr.h b/include/stxxl/bits/compat/unique_ptr.h +index 9df12ff..7110246 100644 +--- a/include/stxxl/bits/compat/unique_ptr.h ++++ b/include/stxxl/bits/compat/unique_ptr.h +@@ -22,12 +22,7 @@ STXXL_BEGIN_NAMESPACE + + template + struct compat_unique_ptr { +-#if __cplusplus >= 201103L && ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100) >= 40400) + typedef std::unique_ptr result; +-#else +- // auto_ptr is inherently broken and is deprecated by unique_ptr in c++0x +- typedef std::auto_ptr result; +-#endif + }; + + STXXL_END_NAMESPACE +diff --git a/include/stxxl/bits/containers/btree/leaf.h b/include/stxxl/bits/containers/btree/leaf.h +index d7c619f..c6b2fcc 100644 +--- a/include/stxxl/bits/containers/btree/leaf.h ++++ b/include/stxxl/bits/containers/btree/leaf.h +@@ -66,7 +66,7 @@ public: + typedef node_cache leaf_cache_type; + + public: +- struct value_compare : public std::binary_function ++ struct value_compare + { + key_compare comp; + +diff --git a/include/stxxl/bits/containers/btree/node.h b/include/stxxl/bits/containers/btree/node.h +index 13dec7b..a4c47d8 100644 +--- a/include/stxxl/bits/containers/btree/node.h ++++ b/include/stxxl/bits/containers/btree/node.h +@@ -71,7 +71,7 @@ public: + typedef node_cache node_cache_type; + + private: +- struct value_compare : public std::binary_function ++ struct value_compare + { + key_compare comp; + +diff --git a/include/stxxl/bits/containers/hash_map/hash_map.h b/include/stxxl/bits/containers/hash_map/hash_map.h +index 0759bd2..ecf19cd 100644 +--- a/include/stxxl/bits/containers/hash_map/hash_map.h ++++ b/include/stxxl/bits/containers/hash_map/hash_map.h +@@ -1258,10 +1258,7 @@ protected: + * lexicographically by Note: the hash-value has already + * been computed. + */ +- struct Cmp : public std::binary_function< +- std::pair, +- std::pair, bool +- > ++ struct Cmp + { + self_type& map_; + Cmp(self_type& map) : map_(map) { } +@@ -1520,7 +1517,7 @@ protected: + + public: + //! Construct an equality predicate from the comparison operator +- struct equal_to : public std::binary_function ++ struct equal_to + { + //! reference to hash_map + const self_type& m_map; +diff --git a/include/stxxl/bits/io/wbtl_file.h b/include/stxxl/bits/io/wbtl_file.h +index 933a216..30828a0 100644 +--- a/include/stxxl/bits/io/wbtl_file.h ++++ b/include/stxxl/bits/io/wbtl_file.h +@@ -65,7 +65,7 @@ class wbtl_file : public disk_queued_file + size_type curpos; + request_ptr backend_request; + +- struct FirstFit : public std::binary_function ++ struct FirstFit + { + bool operator () ( + const place& entry, +diff --git a/include/stxxl/bits/mng/block_alloc.h b/include/stxxl/bits/mng/block_alloc.h +index 19ade8b..887f0e6 100644 +--- a/include/stxxl/bits/mng/block_alloc.h ++++ b/include/stxxl/bits/mng/block_alloc.h +@@ -138,7 +138,7 @@ private: + perm[i] = i; + + stxxl::random_number rnd; +- std::random_shuffle(perm.begin(), perm.end(), rnd _STXXL_FORCE_SEQUENTIAL); ++ std::shuffle(perm.begin(), perm.end(), std::mt19937(std::random_device()())); + } + + public: +diff --git a/include/stxxl/bits/mng/block_alloc_interleaved.h b/include/stxxl/bits/mng/block_alloc_interleaved.h +index a82ee34..5aba23a 100644 +--- a/include/stxxl/bits/mng/block_alloc_interleaved.h ++++ b/include/stxxl/bits/mng/block_alloc_interleaved.h +@@ -93,7 +93,7 @@ struct interleaved_RC : public interleaved_striping + perms[i][j] = j; + + random_number rnd; +- std::random_shuffle(perms[i].begin(), perms[i].end(), rnd _STXXL_FORCE_SEQUENTIAL); ++ std::shuffle(perms[i].begin(), perms[i].end(), std::mt19937(std::random_device()())); + } + } + +diff --git a/include/stxxl/bits/mng/disk_allocator.h b/include/stxxl/bits/mng/disk_allocator.h +index 59ad085..c1e0f83 100644 +--- a/include/stxxl/bits/mng/disk_allocator.h ++++ b/include/stxxl/bits/mng/disk_allocator.h +@@ -44,7 +44,7 @@ class disk_allocator : private noncopyable + { + typedef std::pair place; + +- struct first_fit : public std::binary_function ++ struct first_fit + { + bool operator () ( + const place& entry, +@@ -189,7 +189,7 @@ void disk_allocator::new_blocks(BID* begin, BID* end) + + sortseq::iterator space; + space = std::find_if(free_space.begin(), free_space.end(), +- bind2nd(first_fit(), requested_size) _STXXL_FORCE_SEQUENTIAL); ++ std::bind(first_fit(), std::placeholders::_1, requested_size) _STXXL_FORCE_SEQUENTIAL); + + if (space == free_space.end() && requested_size == BlockSize) + { +@@ -207,7 +207,7 @@ void disk_allocator::new_blocks(BID* begin, BID* end) + grow_file(BlockSize); + + space = std::find_if(free_space.begin(), free_space.end(), +- bind2nd(first_fit(), requested_size) _STXXL_FORCE_SEQUENTIAL); ++ std::bind(first_fit(), std::placeholders::_1, requested_size) _STXXL_FORCE_SEQUENTIAL); + } + + if (space != free_space.end()) +diff --git a/include/stxxl/bits/parallel.h b/include/stxxl/bits/parallel.h +index d973861..c858d87 100644 +--- a/include/stxxl/bits/parallel.h ++++ b/include/stxxl/bits/parallel.h +@@ -121,7 +121,6 @@ using __gnu_parallel::random_shuffle; + #elif STXXL_PARALLEL + + using std::sort; +-using std::random_shuffle; + + #else + +diff --git a/include/stxxl/bits/parallel/base.h b/include/stxxl/bits/parallel/base.h +index 141d515..7dae74f 100644 +--- a/include/stxxl/bits/parallel/base.h ++++ b/include/stxxl/bits/parallel/base.h +@@ -33,7 +33,6 @@ namespace parallel { + */ + template + class binary_negate +- : public std::binary_function + { + protected: + Predicate pred; +@@ -80,7 +79,7 @@ static inline void decode2(lcas_t x, int& a, int& b) + * Constructs predicate for equality from strict weak ordering predicate + */ + template +-class equal_from_less : public std::binary_function ++class equal_from_less + { + private: + Comparator& comp; +@@ -126,7 +125,7 @@ median_of_three_iterators(RandomAccessIterator a, RandomAccessIterator b, + + /** Similar to std::equal_to, but allows two different types. */ + template +-struct equal_to : std::binary_function ++struct equal_to + { + bool operator () (const T1& t1, const T2& t2) const + { +@@ -136,7 +135,7 @@ struct equal_to : std::binary_function + + /** Similar to std::less, but allows two different types. */ + template +-struct less : std::binary_function ++struct less + { + bool operator () (const T1& t1, const T2& t2) const + { +diff --git a/include/stxxl/bits/parallel/multiseq_selection.h b/include/stxxl/bits/parallel/multiseq_selection.h +index 57e7599..f41d9aa 100644 +--- a/include/stxxl/bits/parallel/multiseq_selection.h ++++ b/include/stxxl/bits/parallel/multiseq_selection.h +@@ -35,7 +35,6 @@ namespace parallel { + //! Compare a pair of types lexcigraphically, ascending. + template + class lexicographic +- : public std::binary_function, std::pair, bool> + { + protected: + Comparator& m_comp; +@@ -60,7 +59,6 @@ public: + //! Compare a pair of types lexcigraphically, descending. + template + class lexicographic_rev +- : public std::binary_function, std::pair, bool> + { + protected: + Comparator& m_comp; +diff --git a/lib/io/wbtl_file.cpp b/lib/io/wbtl_file.cpp +index 310d76a..6d52e2e 100644 +--- a/lib/io/wbtl_file.cpp ++++ b/lib/io/wbtl_file.cpp +@@ -304,7 +304,7 @@ wbtl_file::offset_type wbtl_file::get_next_write_block() + // mapping_lock has to be aquired by caller + sortseq::iterator space = + std::find_if(free_space.begin(), free_space.end(), +- bind2nd(FirstFit(), write_block_size) _STXXL_FORCE_SEQUENTIAL); ++ std::bind(FirstFit(), std::placeholders::_1, write_block_size) _STXXL_FORCE_SEQUENTIAL); + + if (space != free_space.end()) + { diff --git a/vcpkg/ports/stxxl/CONTROL b/vcpkg/ports/stxxl/CONTROL new file mode 100644 index 0000000..42609d3 --- /dev/null +++ b/vcpkg/ports/stxxl/CONTROL @@ -0,0 +1,3 @@ +Source: stxxl +Version: 2018-11-15-2 +Description: Standard Template Library for Extra Large Data Sets diff --git a/vcpkg/ports/stxxl/fix-include-dir.patch b/vcpkg/ports/stxxl/fix-include-dir.patch new file mode 100644 index 0000000..043252f --- /dev/null +++ b/vcpkg/ports/stxxl/fix-include-dir.patch @@ -0,0 +1,31 @@ +diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt +index 06f9e50a..281e1f04 100644 +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -94,6 +94,8 @@ if(BUILD_SHARED_LIBS) + add_library(stxxl SHARED ${LIBSTXXL_SOURCES}) + set_target_properties(stxxl PROPERTIES OUTPUT_NAME "${STXXL_LIBNAME}") + set_target_properties(stxxl PROPERTIES VERSION "${STXXL_VERSION_STRING}") ++ target_include_directories(stxxl PUBLIC $) ++ + install(TARGETS stxxl + EXPORT stxxl-targets + ARCHIVE DESTINATION ${INSTALL_LIB_DIR} +@@ -104,6 +106,8 @@ if(BUILD_SHARED_LIBS) + add_library(stxxl_static STATIC ${LIBSTXXL_SOURCES}) + set_target_properties(stxxl_static PROPERTIES OUTPUT_NAME "${STXXL_LIBNAME}") + set_target_properties(stxxl_static PROPERTIES VERSION "${STXXL_VERSION_STRING}") ++ target_include_directories(stxxl_static PUBLIC $) ++ + install(TARGETS stxxl_static + EXPORT stxxl-targets + ARCHIVE DESTINATION ${INSTALL_LIB_DIR}) +@@ -122,6 +126,8 @@ else() + add_library(stxxl STATIC ${LIBSTXXL_SOURCES}) + set_target_properties(stxxl PROPERTIES OUTPUT_NAME "${STXXL_LIBNAME}") + set_target_properties(stxxl PROPERTIES VERSION "${STXXL_VERSION_STRING}") ++ target_include_directories(stxxl PUBLIC $) ++ + install(TARGETS stxxl + EXPORT stxxl-targets + ARCHIVE DESTINATION ${INSTALL_LIB_DIR} diff --git a/vcpkg/ports/stxxl/portfile.cmake b/vcpkg/ports/stxxl/portfile.cmake new file mode 100644 index 0000000..01d072d --- /dev/null +++ b/vcpkg/ports/stxxl/portfile.cmake @@ -0,0 +1,74 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO stxxl/stxxl + REF b9e44f0ecba7d7111fbb33f3330c3e53f2b75236 + SHA512 800a8fb95b52b21256cecb848f95645c54851f4dc070e0cd64fb5009f7663c0c962a24ca3f246e54d6d45e81a5c734309268d7ea6f0b0987336a50a3dcb99616 + HEAD_REF master + PATCHES + # This patch can be removed when stxxl/stxxl/#95 is accepted + fix-include-dir.patch + 0001-fix-visual-studio.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_STATIC_LIBS=ON + -DBUILD_EXAMPLES=OFF + -DBUILD_TESTS=OFF + -DBUILD_EXTRAS=OFF + -DUSE_BOOST=OFF + -DTRY_COMPILE_HEADERS=OFF + -DUSE_STD_THREADS=ON + -DNO_CXX11=OFF + -DUSE_VALGRIND=OFF + -DUSE_MALLOC_COUNT=OFF + -DUSE_GCOV=OFF + -DUSE_TPIE=OFF + OPTIONS_DEBUG + -DSTXXL_DEBUG_ASSERTIONS=ON + OPTIONS_RELEASE + -DSTXXL_DEBUG_ASSERTIONS=OFF +) + +vcpkg_install_cmake() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/${PORT}) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +endif() + +vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/share/${PORT}/stxxl-config.cmake + "\${STXXL_CMAKE_DIR}/../include" + "\${STXXL_CMAKE_DIR}/../../include" +) + +if(CMAKE_HOST_WIN32) + set(EXECUTABLE_SUFFIX ".exe") +else() + set(EXECUTABLE_SUFFIX "") +endif() + +file(INSTALL ${CURRENT_PACKAGES_DIR}/bin/stxxl_tool${EXECUTABLE_SUFFIX} + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/bin + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/bin +) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE_1_0.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/suitesparse/CONTROL b/vcpkg/ports/suitesparse/CONTROL new file mode 100644 index 0000000..832306d --- /dev/null +++ b/vcpkg/ports/suitesparse/CONTROL @@ -0,0 +1,5 @@ +Source: suitesparse +Version: 5.8.0 +Build-Depends: lapack, metis +Homepage: http://suitesparse.com +Description: algebra library diff --git a/vcpkg/ports/suitesparse/FindCXSparse.cmake b/vcpkg/ports/suitesparse/FindCXSparse.cmake new file mode 100644 index 0000000..94ba41e --- /dev/null +++ b/vcpkg/ports/suitesparse/FindCXSparse.cmake @@ -0,0 +1,75 @@ +# Distributed under the OSI-approved BSD 3-Clause License. +# +#.rst: +# FindCXSparse +# -------- +# +# Find the CXSparse library +# +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# The following variables will be defined: +# +# ``CXSparse_FOUND`` +# True if CXSparse found on the local system +# +# ``CXSPARSE_FOUND`` +# True if CXSparse found on the local system +# +# ``CXSparse_INCLUDE_DIRS`` +# Location of CXSparse header files +# +# ``CXSPARSE_INCLUDE_DIRS`` +# Location of CXSparse header files +# +# ``CXSparse_LIBRARIES`` +# List of the CXSparse libraries found +# +# ``CXSPARSE_LIBRARIES`` +# List of the CXSparse libraries found +# +# + +include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) +include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) +include(${CMAKE_ROOT}/Modules/CMakeFindDependencyMacro.cmake) + +find_path(CXSPARSE_INCLUDE_DIR NAMES cs.h) + +find_library(CXSPARSE_LIBRARY_RELEASE NAMES cxsparse libcxsparse) +find_library(CXSPARSE_LIBRARY_DEBUG NAMES cxsparsed libcxsparsed) +select_library_configurations(CXSPARSE) + +if(CXSPARSE_INCLUDE_DIR) + set(CXSPARSE_VERSION_FILE ${CXSPARSE_INCLUDE_DIR}/cs.h) + file(READ ${CXSPARSE_INCLUDE_DIR}/cs.h CXSPARSE_VERSION_FILE_CONTENTS) + + string(REGEX MATCH "#define CS_VER [0-9]+" + CXSPARSE_MAIN_VERSION "${CXSPARSE_VERSION_FILE_CONTENTS}") + string(REGEX REPLACE "#define CS_VER ([0-9]+)" "\\1" + CXSPARSE_MAIN_VERSION "${CXSPARSE_MAIN_VERSION}") + + string(REGEX MATCH "#define CS_SUBVER [0-9]+" + CXSPARSE_SUB_VERSION "${CXSPARSE_VERSION_FILE_CONTENTS}") + string(REGEX REPLACE "#define CS_SUBVER ([0-9]+)" "\\1" + CXSPARSE_SUB_VERSION "${CXSPARSE_SUB_VERSION}") + + string(REGEX MATCH "#define CS_SUBSUB [0-9]+" + CXSPARSE_SUBSUB_VERSION "${CXSPARSE_VERSION_FILE_CONTENTS}") + string(REGEX REPLACE "#define CS_SUBSUB ([0-9]+)" "\\1" + CXSPARSE_SUBSUB_VERSION "${CXSPARSE_SUBSUB_VERSION}") + + set(CXSPARSE_VERSION "${CXSPARSE_MAIN_VERSION}.${CXSPARSE_SUB_VERSION}.${CXSPARSE_SUBSUB_VERSION}") +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(CXSparse + REQUIRED_VARS CXSPARSE_INCLUDE_DIRS CXSPARSE_LIBRARIES + VERSION_VAR CXSPARSE_VERSION) + +set(CXSPARSE_FOUND ${CXSparse_FOUND}) +set(CXSPARSE_INCLUDE_DIRS ${CXSPARSE_INCLUDE_DIR}) +set(CXSPARSE_LIBRARIES ${CXSPARSE_LIBRARY}) +set(CXSparse_INCLUDE_DIRS ${CXSPARSE_INCLUDE_DIR}) +set(CXSparse_LIBRARIES ${CXSPARSE_LIBRARY}) diff --git a/vcpkg/ports/suitesparse/build_fixes.patch b/vcpkg/ports/suitesparse/build_fixes.patch new file mode 100644 index 0000000..2734bb0 --- /dev/null +++ b/vcpkg/ports/suitesparse/build_fixes.patch @@ -0,0 +1,281 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9602cce..dafb434 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,14 +5,6 @@ + # Updated by jesnault (jerome.esnault@inria.fr) 2014-01-21 + # ----------------------------------------------------------------- + +-option(HUNTER_ENABLED "Enable Hunter package manager support" OFF) +-include(cmake/HunterGate.cmake) +- +-HunterGate( +- URL "https://github.com/ruslo/hunter/archive/v0.23.214.tar.gz" +- SHA1 "e14bc153a7f16d6a5eeec845fb0283c8fad8c358" +-) +- + PROJECT(SuiteSparseProject) + + cmake_minimum_required(VERSION 3.1) +@@ -47,29 +39,9 @@ else() + message(STATUS "Using user defined CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}") + endif() + +-# Fix GKlib path: +-IF(NOT WIN32) +- SET(GKLIB_PATH "${${PROJECT_NAME}_SOURCE_DIR}/SuiteSparse/metis-5.1.0/GKlib" CACHE INTERNAL "Path to GKlib (for METIS)" FORCE) +-ENDIF() +- +-# allow creating DLLs in Windows without touching the source code: +-IF(NOT ${CMAKE_VERSION} VERSION_LESS "3.4.0" AND WIN32) +- set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) +-ENDIF() +- + ## get CMAKE_INSTALL_BINDIR and CMAKE_INSTALL_LIBDIR + include(GNUInstallDirs) + +-if(CMAKE_SIZEOF_VOID_P MATCHES "8") +- set(SUITESPARSE_LIB_POSTFIX "64") +-else() +- set(SUITESPARSE_LIB_POSTFIX "") +-endif() +- +-## get POSTFIX for lib install dir +-set(LIB_POSTFIX "${SUITESPARSE_LIB_POSTFIX}" CACHE STRING "suffix for 32/64 inst dir placement") +-mark_as_advanced(LIB_POSTFIX) +- + # We want libraries to be named "libXXX" and "libXXXd" in all compilers: + # ------------------------------------------------------------------------ + set(CMAKE_DEBUG_POSTFIX "d") +@@ -77,59 +49,6 @@ IF(MSVC) + set(SP_LIB_PREFIX "lib") # Libs are: "libXXX" + ENDIF(MSVC) + +-## check if we can build metis +-SET(BUILD_METIS_DEFAULT ON) +-if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/SuiteSparse/metis-5.1.0/CMakeLists.txt") +- SET(BUILD_METIS_DEFAULT OFF) +-endif() +- +-SET(WITH_CUDA OFF CACHE BOOL "Build with CUDA support") +- +-SET(BUILD_METIS ${BUILD_METIS_DEFAULT} CACHE BOOL "Build METIS for partitioning?") +-SET(METIS_DIR ${${PROJECT_NAME}_SOURCE_DIR}/SuiteSparse/metis-5.1.0 CACHE PATH "Source directory of METIS") +- +-if(BUILD_METIS) +- ## prepare the installation : +- ## using metis target here is not possible because this target is added in another branch of the CMake structure +- ## TRICK: need to dynamically modify the metis CMakeLists.txt file before it going to parsed... +- ## (very ugly/poor for a metis project get from SCM (git/svn/cvs) but it's works ;) and it doesn't matter if metis was get from .zip) +- if(EXISTS "${METIS_DIR}/libmetis/CMakeLists.txt") +- file(READ "${METIS_DIR}/libmetis/CMakeLists.txt" contentFile) +- string(REGEX MATCH "EXPORT SuiteSparseTargets" alreadyModified ${contentFile}) ## use a string pattern to check if we have to do the modif +- if(NOT alreadyModified) +- file(APPEND "${METIS_DIR}/libmetis/CMakeLists.txt" +- " +- set_target_properties(metis PROPERTIES PUBLIC_HEADER \"../include/metis.h\") +- install(TARGETS metis ## this line is also the string pattern to check if the modification had already done +- EXPORT SuiteSparseTargets +- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +- PUBLIC_HEADER DESTINATION include +- ) +- " +- ) +- endif() +- endif() +- add_subdirectory(SuiteSparse/metis-5.1.0) ## important part for building metis from its src files +-endif(BUILD_METIS) +- +- +-## For EXPORT only : +-## Previous version of cmake (>2.8.12) doesn't auto take into account external lib (here I mean blas and lapack) we need to link to for our current target we want to export. +-## Or at least we need to investigate how to do with previous version. +-## This may cause some trouble in case you want to build in static mode and then use it into another custom project. +-## You will need to manually link your target into your custom project to the correct dependencies link interfaces. +-if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" GREATER 2.8.11) ## (policies introduced both in 2.8.12) +- set(EXPORT_USE_INTERFACE_LINK_LIBRARIES ON CACHE BOOL "") +- mark_as_advanced(EXPORT_USE_INTERFACE_LINK_LIBRARIES) +- if(EXPORT_USE_INTERFACE_LINK_LIBRARIES) +- cmake_policy(SET CMP0023 NEW) ## just for respecting the new target_link_libraries(...) signature procedure +- cmake_policy(SET CMP0022 NEW) ## use INTERFACE_LINK_LIBRARIES property for in-build targets and ignore old properties (IMPORTED_)?LINK_INTERFACE_LIBRARIES(_)? +- ## Here, next version of cmake 2.8.12 auto take into account the link interface dependencies (see generated cmake/SuiteSparse-config*.cmake into your install dir) +- endif() +-endif() +- + ## install_suitesparse_project(targetName headersList) + ## factorise the way we will install all projects (part of the suitesparse project) + ## is the target of the current project you build +@@ -176,16 +95,16 @@ macro(declare_suitesparse_library targetName srcsList headersList) + set(dsl_TARGET_PUBLIC_LINK "") + endif() + if(WITH_CUDA) +- find_package(CUDA) ++ find_package(CUDA REQUIRED) + endif() +- IF(${CUDA_FOUND}) ++ IF(CUDA_FOUND) + INCLUDE_DIRECTORIES(${CUDA_INCLUDE_DIRS}) + INCLUDE_DIRECTORIES(${SuiteSparse_GPUQREngine_INCLUDE}) + INCLUDE_DIRECTORIES(${SuiteSparse_GPURuntime_INCLUDE}) + CUDA_ADD_LIBRARY(${targetName} ${srcsList} ${headersList}) +- ELSE(${CUDA_FOUND}) ++ ELSE() + ADD_LIBRARY(${targetName} ${srcsList} ${headersList}) +- ENDIF(${CUDA_FOUND}) ++ ENDIF() + SET_TARGET_PROPERTIES(${targetName} PROPERTIES + OUTPUT_NAME ${SP_LIB_PREFIX}${targetName} + ) +@@ -211,44 +130,30 @@ MACRO(REMOVE_MATCHING_FILES_FROM_LIST match_expr lst_files) + ENDMACRO(REMOVE_MATCHING_FILES_FROM_LIST) + + if(WITH_CUDA) +- FIND_PACKAGE(cuda) +- IF(${CUDA_FOUND}) ++ FIND_PACKAGE(CUDA REQUIRED) ++ IF(CUDA_FOUND) + ADD_DEFINITIONS(-DGPU_BLAS) +- ENDIF(${CUDA_FOUND}) ++ ENDIF() + endif() + +-hunter_add_package(LAPACK) # only in effect if HUNTER_ENABLED is set +-# prefer LAPACK config file +-find_package(LAPACK CONFIG) +-if (LAPACK_FOUND AND TARGET blas AND TARGET lapack) +- message(STATUS "found lapack and blas config file. Linking targets lapack and blas") +- message(STATUS "- LAPACK_CONFIG: ${LAPACK_CONFIG}") +- set(SuiteSparse_LINKER_LAPACK_BLAS_LIBS lapack blas) +- # for suitesparse-config file set method used to find LAPACK (and BLAS) +- set(SuiteSparse_LAPACK_used_CONFIG YES) +-else() +- # missing config file or targets, try BLAS and LAPACK +- find_package(BLAS) +- find_package(LAPACK) +- if (BLAS_FOUND AND LAPACK_FOUND) ++ find_package(BLAS REQUIRED) ++ find_package(LAPACK REQUIRED) + message(STATUS "found lapack and blas config file. Linking targets lapack and blas") + message(STATUS "- LAPACK_LIBRARIES: ${LAPACK_LIBRARIES}") + message(STATUS "- BLAS_LIBRARIES: ${BLAS_LIBRARIES}") + set(SuiteSparse_LINKER_LAPACK_BLAS_LIBS ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) + # for suitesparse-config file set method used to find LAPACK (and BLAS) + set(SuiteSparse_LAPACK_used_CONFIG NO) +- else () # LAPACK is not found +- message(FATAL_ERROR "lapack not found") +- endif() +-endif() + +-IF(BUILD_METIS) ++IF(USE_VCPKG_METIS) ++ find_package(metis REQUIRED) + set(SuiteSparse_LINKER_METIS_LIBS "metis") +- ## namespaced library target for config +- set(SuiteSparse_EXPORTED_METIS_LIBS "SuiteSparse::metis") ++ set(SuiteSparse_EXPORTED_METIS_LIBS "metis") ++ set(SuiteSparse_FIND_DEPENDENCY_METIS "find_dependency(metis REQUIRED)") + else() + set(SuiteSparse_LINKER_METIS_LIBS "") + set(SuiteSparse_EXPORTED_METIS_LIBS "") ++ set(SuiteSparse_FIND_PACKAGE_METIS "") + ENDIF() + + add_subdirectory(SuiteSparse) +@@ -287,7 +192,7 @@ endmacro() + # get SuiteSparse version + get_SuiteSparse_Version() + +-set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/suitesparse-${SuiteSparse_VERSION}) ++set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/suitesparse) + ## create targets file + export(EXPORT SuiteSparseTargets + FILE "${CMAKE_CURRENT_BINARY_DIR}/suitesparse/suitesparse-targets.cmake" +@@ -301,7 +206,7 @@ configure_file(cmake/SuiteSparse-config-install.cmake.in + ## do the EXPORT for allowing other project to easily use suitesparse with cmake + install(EXPORT SuiteSparseTargets + FILE +- SuiteSparse-targets.cmake ++ suitesparse-targets.cmake + NAMESPACE + SuiteSparse:: + DESTINATION +diff --git a/SuiteSparse/CMakeLists.txt b/SuiteSparse/CMakeLists.txt +index c6e2834..6fdfb01 100644 +--- a/SuiteSparse/CMakeLists.txt ++++ b/SuiteSparse/CMakeLists.txt +@@ -1,23 +1,5 @@ + PROJECT(SuiteSparse) + +-# Set optimized building: +-IF(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_BUILD_TYPE MATCHES "Debug") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3") +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3") +- # only optimize for native processer when NOT cross compiling +- if(NOT CMAKE_CROSSCOMPILING) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mtune=native") +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mtune=native") +- endif(NOT CMAKE_CROSSCOMPILING) +-ENDIF(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_BUILD_TYPE MATCHES "Debug") +- +-# Global flags: +-IF (BUILD_METIS) +- INCLUDE_DIRECTORIES("${METIS_SOURCE_DIR}/include") +-ELSE (BUILD_METIS) +- ADD_DEFINITIONS(-DNPARTITION) +-ENDIF ( BUILD_METIS) +- + # Disable COMPLEX numbers: disable it by default, since it causes problems in some platforms. + SET(HAVE_COMPLEX OFF CACHE BOOL "Enables building SuiteSparse with complex numbers (disabled by default to avoid problems in some platforms)") + IF (NOT HAVE_COMPLEX) +@@ -38,12 +20,12 @@ if(WITH_CUDA) + set(SUBPROJECTS_TO_ADD + ${SUBPROJECTS_TO_ADD} + SuiteSparse_GPURuntime +- GPUQREngine ++ GPUQREngine + ) + endif() + + set(SUBPROJECTS_TO_ADD +- ${SUBPROJECTS_TO_ADD} ++ ${SUBPROJECTS_TO_ADD} + SuiteSparse_config + AMD + BTF +diff --git a/cmake/SuiteSparse-config-install.cmake.in b/cmake/SuiteSparse-config-install.cmake.in +index 1e587d1..fd8f3a7 100644 +--- a/cmake/SuiteSparse-config-install.cmake.in ++++ b/cmake/SuiteSparse-config-install.cmake.in +@@ -2,20 +2,14 @@ + get_filename_component(_SuiteSparse_SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) + get_filename_component(_SuiteSparse_PREFIX "${_SuiteSparse_SELF_DIR}" PATH) + get_filename_component(_SuiteSparse_PREFIX "${_SuiteSparse_PREFIX}" PATH) +-get_filename_component(_SuiteSparse_PREFIX "${_SuiteSparse_PREFIX}" PATH) + + include(CMakeFindDependencyMacro) +-if (@SuiteSparse_LAPACK_used_CONFIG@) # SuiteSparse_LAPACK_used_CONFIG +- # use config file which provides LAPACK (and BLAS) for us +- find_dependency(LAPACK CONFIG) +-else() +- # try to find BLAS and LAPACK with modules + find_dependency(BLAS) + find_dependency(LAPACK) +-endif () ++ @SuiteSparse_FIND_DEPENDENCY_METIS@ + + # Load targets from the install tree. +-include(${_SuiteSparse_SELF_DIR}/SuiteSparse-targets.cmake) ++include(${_SuiteSparse_SELF_DIR}/suitesparse-targets.cmake) + + # Report SuiteSparse header search locations. + set(SuiteSparse_INCLUDE_DIRS ${_SuiteSparse_PREFIX}/include) +@@ -39,3 +33,7 @@ set(SuiteSparse_LIBRARIES + + unset(_SuiteSparse_PREFIX) + unset(_SuiteSparse_SELF_DIR) ++set(SUITESPARSE_FOUND TRUE) ++set(SuiteSparse_FOUND TRUE) ++set(SUITESPARSE_LIBRARIES ${SuiteSparse_LIBRARIES}) ++set(SUITESPARSE_INCLUDE_DIRS ${SuiteSparse_INCLUDE_DIRS}) diff --git a/vcpkg/ports/suitesparse/portfile.cmake b/vcpkg/ports/suitesparse/portfile.cmake new file mode 100644 index 0000000..44dfa8c --- /dev/null +++ b/vcpkg/ports/suitesparse/portfile.cmake @@ -0,0 +1,56 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO DrTimothyAldenDavis/SuiteSparse + REF 71e330ca2bc0a2f12f416c461d23dbca21db4d8f + SHA512 06c75927c924cfd5511b07504e826714f504586243d6f3449d67408a33f3ecea824a7f2de7a165171791b9bda4fc09c0d7093125970895c2ed8d4d37ca1d5a3d + HEAD_REF master +) + +vcpkg_from_github( + OUT_SOURCE_PATH SUITESPARSEWIN_SOURCE_PATH + REPO jlblancoc/suitesparse-metis-for-windows + REF c11e8dd7a2ef7d0d93af4c16f75374dd8ca029e2 + SHA512 fbd2a9e6f7df47eeb5d890c7b286bef7fc4c8bcb22783ce800723bacaf2cfe902177828ce5b9e1c2ed9fb5c54591c5fb046a8667e7d354d452a4baac693e47d2 + HEAD_REF master + PATCHES + build_fixes.patch +) + +# Copy suitesparse sources. +message(STATUS "Overwriting SuiteSparseWin source files with SuiteSparse source files...") +# Should probably remove everything but CMakeLists.txt files? +file(GLOB SUITESPARSE_SOURCE_FILES ${SOURCE_PATH}/*) +foreach(SOURCE_FILE ${SUITESPARSE_SOURCE_FILES}) + file(COPY ${SOURCE_FILE} DESTINATION "${SUITESPARSEWIN_SOURCE_PATH}/SuiteSparse") +endforeach() +message(STATUS "Overwriting SuiteSparseWin source files with SuiteSparse source files... done") +message(STATUS "Removing integrated lapack and metis lib...") +file(REMOVE_RECURSE ${SUITESPARSEWIN_SOURCE_PATH}/lapack_windows) +file(REMOVE_RECURSE ${SUITESPARSEWIN_SOURCE_PATH}/SuiteSparse/metis-5.1.0) +message(STATUS "Removing integrated lapack and metis lib... done") + +vcpkg_configure_cmake( + SOURCE_PATH ${SUITESPARSEWIN_SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_METIS=OFF + -DUSE_VCPKG_METIS=ON + "-DMETIS_SOURCE_DIR=${CURRENT_INSTALLED_DIR}" + OPTIONS_DEBUG + -DSUITESPARSE_INSTALL_PREFIX="${CURRENT_PACKAGES_DIR}/debug" + OPTIONS_RELEASE + -DSUITESPARSE_INSTALL_PREFIX="${CURRENT_PACKAGES_DIR}" +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/suitesparse) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SUITESPARSEWIN_SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright_suitesparse-metis-for-windows) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/cxsparse) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper_cxsparse.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/cxsparse RENAME vcpkg-cmake-wrapper.cmake) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindCXSparse.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/cxsparse) diff --git a/vcpkg/ports/suitesparse/vcpkg-cmake-wrapper_cxsparse.cmake b/vcpkg/ports/suitesparse/vcpkg-cmake-wrapper_cxsparse.cmake new file mode 100644 index 0000000..67d87e8 --- /dev/null +++ b/vcpkg/ports/suitesparse/vcpkg-cmake-wrapper_cxsparse.cmake @@ -0,0 +1,10 @@ +set(CXSPARSE_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +list(REMOVE_ITEM ARGS "NO_MODULE") +list(REMOVE_ITEM ARGS "CONFIG") +list(REMOVE_ITEM ARGS "MODULE") + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${CXSPARSE_PREV_MODULE_PATH}) diff --git a/vcpkg/ports/sundials/CONTROL b/vcpkg/ports/sundials/CONTROL new file mode 100644 index 0000000..ae45b9d --- /dev/null +++ b/vcpkg/ports/sundials/CONTROL @@ -0,0 +1,4 @@ +Source: sundials +Version: 3.1.1-2 +Homepage: https://computation.llnl.gov/projects/sundials +Description: SUNDIALS (SUite of Nonlinear and DIfferential/ALgebraic equation Solvers) diff --git a/vcpkg/ports/sundials/portfile.cmake b/vcpkg/ports/sundials/portfile.cmake new file mode 100644 index 0000000..a767286 --- /dev/null +++ b/vcpkg/ports/sundials/portfile.cmake @@ -0,0 +1,57 @@ +include(vcpkg_common_functions) + +set(ARCHIVE_NAME "sundials-3.1.1") + +vcpkg_download_distfile(ARCHIVE + URLS "https://computation.llnl.gov/projects/sundials/download/${ARCHIVE_NAME}.tar.gz" + FILENAME "${ARCHIVE_NAME}.tar.gz" + SHA512 3e8fc7183c5503943f1ba00c73b04c1614a48b6e6cb90559ec5481f9acffaa19acd97bd961611b251ebdc032f1a13f0919b0ab0cdfe9d9b4ddc99d40bef5719f +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + uwp-c4703-warning.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DEXAMPLES_ENABLE=OFF +) + +vcpkg_install_cmake(DISABLE_PARALLEL) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(GLOB REMOVE_DLLS + "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll" + "${CURRENT_PACKAGES_DIR}/lib/*.dll" +) + +file(GLOB DEBUG_DLLS + "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll" +) + +file(GLOB DLLS + "${CURRENT_PACKAGES_DIR}/lib/*.dll" +) + +if(DLLS) + file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +endif() + +if(DEBUG_DLLS) + file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE "${CURRENT_PACKAGES_DIR}/LICENSE") +file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/LICENSE") + +if(REMOVE_DLLS) + file(REMOVE ${REMOVE_DLLS}) +endif() + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/sundials/uwp-c4703-warning.patch b/vcpkg/ports/sundials/uwp-c4703-warning.patch new file mode 100644 index 0000000..3718753 --- /dev/null +++ b/vcpkg/ports/sundials/uwp-c4703-warning.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4030f4d..afef556 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -602,6 +602,7 @@ MARK_AS_ADVANCED(FORCE SUNDIALS_DEVTESTS) + + IF(WIN32) + ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS) ++ ADD_COMPILE_OPTIONS(/wd4703) # Needed for uwp + ENDIF(WIN32) + + IF(APPLE) diff --git a/vcpkg/ports/superlu/CONTROL b/vcpkg/ports/superlu/CONTROL new file mode 100644 index 0000000..11b27ea --- /dev/null +++ b/vcpkg/ports/superlu/CONTROL @@ -0,0 +1,7 @@ +Source: superlu +Version: 2020-01-07 +Port-Version: 2 +Build-Depends: openblas +Description: Supernodal sparse direct solver. +Homepage: https://github.com/xiaoyeli/superlu +Supports: !(uwp|arm) \ No newline at end of file diff --git a/vcpkg/ports/superlu/fix-libm.patch b/vcpkg/ports/superlu/fix-libm.patch new file mode 100644 index 0000000..a356bbd --- /dev/null +++ b/vcpkg/ports/superlu/fix-libm.patch @@ -0,0 +1,17 @@ +diff --git a/SRC/CMakeLists.txt b/SRC/CMakeLists.txt +index e627f06..9aa8949 100644 +--- a/SRC/CMakeLists.txt ++++ b/SRC/CMakeLists.txt +@@ -232,7 +232,11 @@ if(enable_complex16) + endif() + + add_library(superlu ${sources} ${HEADERS}) +-target_link_libraries(superlu PUBLIC ${BLAS_LIB} m) ++if(CMAKE_SYSTEM_NAME STREQUAL "Windows") ++ target_link_libraries(superlu PUBLIC ${BLAS_LIB}) ++else() ++ target_link_libraries(superlu PUBLIC ${BLAS_LIB} m) ++endif() + target_include_directories(superlu PUBLIC + $ + $ diff --git a/vcpkg/ports/superlu/portfile.cmake b/vcpkg/ports/superlu/portfile.cmake new file mode 100644 index 0000000..807981f --- /dev/null +++ b/vcpkg/ports/superlu/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xiaoyeli/superlu + REF a3d5233770f0caad4bc4578b46d3b26af99e9c19 + SHA512 c07e64be51ddef7774a367e1309ef4e596e93571531ec58a0c7b9db60a3db8b3a4a8b1262d66fcd512ad467db5df59a3726db342b259e392a08f56f5dd67c6ef + HEAD_REF master + PATCHES + fix-libm.patch + remove-make.inc.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DXSDK_ENABLE_Fortran=OFF + -Denable_tests=OFF + -Denable_blaslib=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/superlu/remove-make.inc.patch b/vcpkg/ports/superlu/remove-make.inc.patch new file mode 100644 index 0000000..8f7716a --- /dev/null +++ b/vcpkg/ports/superlu/remove-make.inc.patch @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b414f5f..22f29ce 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -155,7 +155,6 @@ endif() + # file(WRITE "make.defs" "# can be exposed to users" + # ${CMAKE_C_COMPILER} ) + # configure_file(${CMAKE_SOURCE_DIR}/make.inc.in ${CMAKE_SOURCE_DIR}/make.inc) +-configure_file(${SuperLU_SOURCE_DIR}/make.inc.in ${SuperLU_SOURCE_DIR}/make.inc) + + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/superlu.pc.in ${CMAKE_CURRENT_BINARY_DIR}/superlu.pc @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/superlu.pc diff --git a/vcpkg/ports/symengine/CONTROL b/vcpkg/ports/symengine/CONTROL new file mode 100644 index 0000000..4e829ba --- /dev/null +++ b/vcpkg/ports/symengine/CONTROL @@ -0,0 +1,30 @@ +Source: symengine +Version: 2020-05-25 +Description: SymEngine is a fast symbolic manipulation library +Homepage: https://github.com/symengine/symengine +Build-Depends: boost-math, boost-random +Default-Features: integer-class-boostmp + +Feature: arb +Description: Build with arb +Build-Depends: arb + +Feature: flint +Description: Build with flint +Build-Depends: flint + +Feature: mpfr +Description: Build with mpfr +Build-Depends: mpfr + +Feature: integer-class-boostmp +Description: Use Boost.multiprecision integer class +Build-Depends: boost-multiprecision + +Feature: integer-class-flint +Description: Use flint integer class +Build-Depends: flint, gmp + +Feature: tcmalloc +Description: Build with tcmalloc +Build-Depends: gperftools diff --git a/vcpkg/ports/symengine/portfile.cmake b/vcpkg/ports/symengine/portfile.cmake new file mode 100644 index 0000000..d61271d --- /dev/null +++ b/vcpkg/ports/symengine/portfile.cmake @@ -0,0 +1,61 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO symengine/symengine + REF 4f669d5954977e86f4da0f53cb5110d2eb6320b6 + SHA512 091ebc83240d3823fb73e0f65f80732d2a85e55f19c8e1a3d1435f05cfa0d1b95d893e8a3c432e1698953a35c56a6af78044ee59db04f03706cf33e0798a02c7 + HEAD_REF master +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + arb WITH_ARB + flint WITH_FLINT + mpfr WITH_MPFR + tcmalloc WITH_TCMALLOC +) + +if(integer-class-boostmp IN_LIST FEATURES) + set(INTEGER_CLASS boostmp) + + if(integer-class-flint IN_LIST FEATURES) + message(WARNING "Both boostmp and flint are given for integer class, will use boostmp only.") + endif() +elseif(integer-class-flint IN_LIST FEATURES) + set(INTEGER_CLASS flint) +endif() + +if(VCPKG_TARGET_IS_UWP) + set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE") + set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE") +endif() + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" MSVC_USE_MT) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DINTEGER_CLASS=${INTEGER_CLASS} + -DBUILD_BENCHMARKS=no + -DBUILD_TESTS=no + -DMSVC_WARNING_LEVEL=3 + -DMSVC_USE_MT=${MSVC_USE_MT} + -DWITH_SYMENGINE_RCP=yes + -DWITH_SYMENGINE_TEUCHOS=no + -DINTEGER_CLASS=${INTEGER_CLASS} + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +elseif(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/${PORT}) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +endif() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/systemc/CONTROL b/vcpkg/ports/systemc/CONTROL new file mode 100644 index 0000000..c62d20c --- /dev/null +++ b/vcpkg/ports/systemc/CONTROL @@ -0,0 +1,3 @@ +Source: systemc +Version: 2.3.3-4 +Description: A set of C++ classes and macros which provide an event-driven simulation kernel in C++ diff --git a/vcpkg/ports/systemc/install.patch b/vcpkg/ports/systemc/install.patch new file mode 100644 index 0000000..ef133a1 --- /dev/null +++ b/vcpkg/ports/systemc/install.patch @@ -0,0 +1,31 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b7815ae..86d79d1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -555,7 +555,7 @@ if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + endif (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + + # Set the installation paths for headers, libraries, and documentation. +-set (CMAKE_INSTALL_DOCDIR "share/doc/systemc" CACHE PATH ++set (CMAKE_INSTALL_DOCDIR "share/systemc/doc" CACHE PATH + "Documentation installation directory") # otherwise mixed-case + if (INSTALL_TO_LIB_BUILD_TYPE_DIR) + # Install libraries to lib-${CMAKE_BUILD_TYPE} so that different build variants +@@ -584,14 +584,14 @@ if (INSTALL_LIB_TARGET_ARCH_SYMLINK AND CMAKE_HOST_UNIX) + endif (INSTALL_LIB_TARGET_ARCH_SYMLINK AND CMAKE_HOST_UNIX) + + if (INSTALL_TO_LIB_BUILD_TYPE_DIR OR INSTALL_TO_LIB_TARGET_ARCH_DIR) +- set (SystemCLanguage_INSTALL_CMAKEDIR share/cmake/SystemCLanguage CACHE PATH ++ set (SystemCLanguage_INSTALL_CMAKEDIR lib/cmake/SystemCLanguage CACHE PATH + "CMake package configuration installation directory" FORCE) + set (SystemCTLM_INSTALL_CMAKEDIR share/cmake/SystemCTLM CACHE PATH + "CMake package configuration installation directory" FORCE) + else (INSTALL_TO_LIB_BUILD_TYPE_DIR OR INSTALL_TO_LIB_TARGET_ARCH_DIR) +- set (SystemCLanguage_INSTALL_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/SystemCLanguage CACHE PATH ++ set (SystemCLanguage_INSTALL_CMAKEDIR lib/cmake/SystemCLanguage CACHE PATH + "CMake package configuration installation directory for the SystemCLanguage package.") +- set (SystemCTLM_INSTALL_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/SystemCTLM CACHE PATH ++ set (SystemCTLM_INSTALL_CMAKEDIR share/cmake/SystemCTLM CACHE PATH + "CMake package configuration installation directory for the SystemCTLM package.") + endif (INSTALL_TO_LIB_BUILD_TYPE_DIR OR INSTALL_TO_LIB_TARGET_ARCH_DIR) + mark_as_advanced(SystemCLanguage_INSTALL_CMAKEDIR SystemCTLM_INSTALL_CMAKEDIR) diff --git a/vcpkg/ports/systemc/portfile.cmake b/vcpkg/ports/systemc/portfile.cmake new file mode 100644 index 0000000..b7fb57b --- /dev/null +++ b/vcpkg/ports/systemc/portfile.cmake @@ -0,0 +1,35 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +set(SYSTEMC_VERSION 2.3.3) +vcpkg_download_distfile(ARCHIVE + URLS "https://www.accellera.org/images/downloads/standards/systemc/systemc-${SYSTEMC_VERSION}.zip" + FILENAME "systemc-${SYSTEMC_VERSION}.zip" + SHA512 f4df172addf816a1928d411dcab42c1679dc4c9d772f406c10d798a2c174d89cdac7a83947fa8beea1e3aff93da522d2d2daf61a4841ec456af7b7446c5c4a14 +) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${SYSTEMC_VERSION} + PATCHES + install.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_CXX_STANDARD=17 + -DDISABLE_COPYRIGHT_MESSAGE=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SystemCLanguage TARGET_PATH share/systemclanguage) +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/SystemCTLM TARGET_PATH share/systemctlm) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/sysc/packages/qt/time) + +file(INSTALL ${SOURCE_PATH}/NOTICE DESTINATION ${CURRENT_PACKAGES_DIR}/share/systemc RENAME copyright) diff --git a/vcpkg/ports/systemc/tlm_correct_dependency.patch b/vcpkg/ports/systemc/tlm_correct_dependency.patch new file mode 100644 index 0000000..56a4a46 --- /dev/null +++ b/vcpkg/ports/systemc/tlm_correct_dependency.patch @@ -0,0 +1,8 @@ +--- cmake\SystemCTLMConfig.cmake.in Sat Oct 13 00:19:07 2018 ++++ cmake\SystemCTLMConfig.cmake.in.fixed Mon Jan 28 15:23:44 2019 +@@ -2,4 +2,4 @@ + + # TLM is part of the SystemC language library. + include(CMakeFindDependencyMacro) +-find_dependency (SystemC @SystemCLanguage_VERSION_MAJOR@.@SystemCLanguage_VERSION_MINOR@.@SystemCLanguage_VERSION_PATCH@.@SystemCLanguage_VERSION_RELEASE_DATE@ EXACT) ++find_dependency (SystemCLanguage @SystemCLanguage_VERSION_MAJOR@.@SystemCLanguage_VERSION_MINOR@.@SystemCLanguage_VERSION_PATCH@.@SystemCLanguage_VERSION_RELEASE_DATE@ EXACT) diff --git a/vcpkg/ports/szip/CONTROL b/vcpkg/ports/szip/CONTROL new file mode 100644 index 0000000..54ebf9b --- /dev/null +++ b/vcpkg/ports/szip/CONTROL @@ -0,0 +1,4 @@ +Source: szip +Version: 2.1.1-6 +Homepage: https://support.hdfgroup.org/ftp/lib-external/szip +Description: Szip compression software, providing lossless compression of scientific data diff --git a/vcpkg/ports/szip/fix-szip-config-to-set-szip-found.patch b/vcpkg/ports/szip/fix-szip-config-to-set-szip-found.patch new file mode 100644 index 0000000..f662916 --- /dev/null +++ b/vcpkg/ports/szip/fix-szip-config-to-set-szip-found.patch @@ -0,0 +1,11 @@ +diff -urN szip-2.1.1-a/config/cmake/szip-config.cmake.in szip-2.1.1-b/config/cmake/szip-config.cmake.in +--- szip-2.1.1-a/config/cmake/szip-config.cmake.in 2018-02-10 11:06:46.890685077 +0900 ++++ szip-2.1.1-b/config/cmake/szip-config.cmake.in 2018-02-10 11:11:25.369274127 +0900 +@@ -51,6 +51,7 @@ + set (${SZIP_PACKAGE_NAME}_${comp}_FOUND 0) + else () + set (${SZIP_PACKAGE_NAME}_${comp}_FOUND 1) ++ set (${SZIP_PACKAGE_NAME}_FOUND 1) + string(TOUPPER ${SZIP_PACKAGE_NAME}_${comp}_LIBRARY COMP_LIBRARY) + set (${COMP_LIBRARY} ${${COMP_LIBRARY}} @SZIP_LIB_CORENAME@-${comp}) + endif () diff --git a/vcpkg/ports/szip/portfile.cmake b/vcpkg/ports/szip/portfile.cmake new file mode 100644 index 0000000..ab669ce --- /dev/null +++ b/vcpkg/ports/szip/portfile.cmake @@ -0,0 +1,32 @@ +include(vcpkg_common_functions) + +vcpkg_download_distfile(ARCHIVE + URLS "https://support.hdfgroup.org/ftp/lib-external/szip/2.1.1/src/szip-2.1.1.tar.gz" + FILENAME "szip-2.1.1.tar.gz" + SHA512 ada6406efb096cd8a2daf8f9217fe9111a96dcae87e29d1c31f58ddd2ad2aa7bac03f23c7205dc9360f3b62d259461759330c7189ef0c2fe559704b1ea9d40dd +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF szip-2.1.1 + PATCHES + fix-szip-config-to-set-szip-found.patch # This patch is required for linux on osx; It does not matter for windows +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSZIP_INSTALL_DATA_DIR=share/szip/data + -DSZIP_INSTALL_CMAKE_DIR=share/szip +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() + +file(RENAME ${CURRENT_PACKAGES_DIR}/share/szip/data/COPYING ${CURRENT_PACKAGES_DIR}/share/szip/copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/vcpkg/ports/tabulate/CONTROL b/vcpkg/ports/tabulate/CONTROL new file mode 100644 index 0000000..85dc7ad --- /dev/null +++ b/vcpkg/ports/tabulate/CONTROL @@ -0,0 +1,4 @@ +Source: tabulate +Version: 2019-01-06 +Description: Table maker for modern C++ +Homepage: https://github.com/p-ranav/tabulate diff --git a/vcpkg/ports/tabulate/portfile.cmake b/vcpkg/ports/tabulate/portfile.cmake new file mode 100644 index 0000000..284dc21 --- /dev/null +++ b/vcpkg/ports/tabulate/portfile.cmake @@ -0,0 +1,26 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO p-ranav/tabulate + REF 8f7a31b58806384b755858fe5e69593f9f216ed0 + SHA512 33a51617d363f9e8eed2153f60c5a087ed84edaeb21a0bc779d0af6228d4d7deb211e03c1eb7c8d56ac538de6a1cc0b641d219b4ff95d277f3daa7762f64a8f6 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -Dtabulate_BUILD_TESTS=OFF + -DSAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/LICENSE.termcolor DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/tacopie/CONTROL b/vcpkg/ports/tacopie/CONTROL new file mode 100644 index 0000000..1707cc9 --- /dev/null +++ b/vcpkg/ports/tacopie/CONTROL @@ -0,0 +1,4 @@ +Source: tacopie +Version: 3.2.0-2 +Homepage: https://github.com/cpp-redis/tacopie +Description: Tacopie is a TCP Client & Server C++11 library diff --git a/vcpkg/ports/tacopie/fix-cmakelists.patch b/vcpkg/ports/tacopie/fix-cmakelists.patch new file mode 100644 index 0000000..48ba317 --- /dev/null +++ b/vcpkg/ports/tacopie/fix-cmakelists.patch @@ -0,0 +1,27 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -26,6 +26,7 @@ + cmake_minimum_required(VERSION 2.8.7) + set(CMAKE_MACOSX_RPATH 1) + include(${CMAKE_ROOT}/Modules/ExternalProject.cmake) ++include(${CMAKE_ROOT}/Modules/GenerateExportHeader.cmake) + + + ### +@@ -153,6 +154,8 @@ IF (SELECT_TIMEOUT) + set_target_properties(${PROJECT} PROPERTIES COMPILE_DEFINITIONS "__TACOPIE_TIMEOUT=${SELECT_TIMEOUT}") + ENDIF(SELECT_TIMEOUT) + ++generate_export_header(${PROJECT} EXPORT_FILE_NAME ${CMAKE_BINARY_DIR}/tacopie/utils/${PROJECT}_export.hpp) ++target_include_directories(${PROJECT} PUBLIC ${CMAKE_BINARY_DIR}) + + ### + # install +@@ -164,6 +167,7 @@ install(DIRECTORY DESTINATION ${CMAKE_BINARY_DIR}/bin/) + install (DIRECTORY ${CMAKE_BINARY_DIR}/lib/ DESTINATION lib USE_SOURCE_PERMISSIONS) + install (DIRECTORY ${CMAKE_BINARY_DIR}/bin/ DESTINATION bin USE_SOURCE_PERMISSIONS) + install (DIRECTORY ${TACOPIE_INCLUDES}/ DESTINATION include USE_SOURCE_PERMISSIONS) ++install (FILES ${CMAKE_BINARY_DIR}/tacopie/utils/${PROJECT}_export.hpp DESTINATION include/tacopie/utils) + + + ### diff --git a/vcpkg/ports/tacopie/fix-export.patch b/vcpkg/ports/tacopie/fix-export.patch new file mode 100644 index 0000000..d971b83 --- /dev/null +++ b/vcpkg/ports/tacopie/fix-export.patch @@ -0,0 +1,20 @@ +--- a/includes/tacopie/utils/logger.hpp ++++ b/includes/tacopie/utils/logger.hpp +@@ -26,6 +26,8 @@ + #include + #include + ++#include ++ + namespace tacopie { + + //! +@@ -161,7 +163,7 @@ private: + //! variable containing the current logger + //! by default, not set (no logs) + //! +-extern std::unique_ptr active_logger; ++extern TACOPIE_EXPORT std::unique_ptr active_logger; + + //! + //! debug logging diff --git a/vcpkg/ports/tacopie/portfile.cmake b/vcpkg/ports/tacopie/portfile.cmake new file mode 100644 index 0000000..25ba4cf --- /dev/null +++ b/vcpkg/ports/tacopie/portfile.cmake @@ -0,0 +1,45 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cpp-redis/tacopie + REF 3.2.0 + SHA512 079b294b537aaffe3bcf43a485c3be5b15f633c3f7c70140032d60cb010d35b76e76ef4ddd7596f6bfaf3f7edca7cb086c67552efffbf65846e725d7be54ce72 + HEAD_REF master + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/fix-cmakelists.patch + ${CMAKE_CURRENT_LIST_DIR}/fix-export.patch +) + +if(VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(MSVC_RUNTIME_LIBRARY_CONFIG "/MD") +else() + set(MSVC_RUNTIME_LIBRARY_CONFIG "/MT") +endif() + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR NOT VCPKG_CMAKE_SYSTEM_NAME) + # tacopie forcibly removes "/RTC1" in its cmake file. Because this is an ABI-sensitive flag, we need to re-add it in a form that won't be detected. + set(VCPKG_CXX_FLAGS_DEBUG "${VCPKG_CXX_FLAGS_DEBUG} -RTC1") + set(VCPKG_C_FLAGS_DEBUG "${VCPKG_C_FLAGS_DEBUG} -RTC1") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DMSVC_RUNTIME_LIBRARY_CONFIG=${MSVC_RUNTIME_LIBRARY_CONFIG} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/taglib/CONTROL b/vcpkg/ports/taglib/CONTROL new file mode 100644 index 0000000..9756e8e --- /dev/null +++ b/vcpkg/ports/taglib/CONTROL @@ -0,0 +1,5 @@ +Source: taglib +Version: 1.11.1-20190531 +Description: TagLib Audio Meta-Data Library +Homepage: https://github.com/taglib/taglib +Build-Depends: zlib diff --git a/vcpkg/ports/taglib/portfile.cmake b/vcpkg/ports/taglib/portfile.cmake new file mode 100644 index 0000000..4ccb6a9 --- /dev/null +++ b/vcpkg/ports/taglib/portfile.cmake @@ -0,0 +1,36 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO taglib/taglib + REF ba7adc2bc261ed634c2a964185bcffb9365ad2f4 + SHA512 faf516f40f12031a37414ce9246ec409e64e570faebe2d604afdefbb7d665e0a0c9c68bec0e6dcb1c5ceb8fa8e1c3477f5ac75029f17beedd679fa3ea735ce6d + HEAD_REF master +) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(WINRT_OPTIONS -DHAVE_VSNPRINTF=1 -DPLATFORM_WINRT=1) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${WINRT_OPTIONS} +) + +vcpkg_install_cmake() + +# remove the debug/include files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# copyright file +file(COPY ${SOURCE_PATH}/COPYING.LGPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/taglib) +file(COPY ${SOURCE_PATH}/COPYING.MPL DESTINATION ${CURRENT_PACKAGES_DIR}/share/taglib) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/taglib/COPYING.LGPL ${CURRENT_PACKAGES_DIR}/share/taglib/copyright) + +# remove bin directory for static builds (taglib creates a cmake batch file there) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_copy_pdbs() \ No newline at end of file diff --git a/vcpkg/ports/taocpp-json/CONTROL b/vcpkg/ports/taocpp-json/CONTROL new file mode 100644 index 0000000..267dfa0 --- /dev/null +++ b/vcpkg/ports/taocpp-json/CONTROL @@ -0,0 +1,3 @@ +Source: taocpp-json +Version: 2019-07-11 +Description: C++ header-only JSON library diff --git a/vcpkg/ports/taocpp-json/portfile.cmake b/vcpkg/ports/taocpp-json/portfile.cmake new file mode 100644 index 0000000..1050b41 --- /dev/null +++ b/vcpkg/ports/taocpp-json/portfile.cmake @@ -0,0 +1,38 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO taocpp/json + REF 2ce7f742f8c47e8871f3052c56f13b237b68b18d + SHA512 22492cf87a008ae37fb46490ed5b688b195099a932c2dffaca029927fd9f9dff813ad21135edadf3c11bb0af75f78d00cfb92d875fe5579966e76d2039085eae + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE + PREFER_NINJA + OPTIONS + -DTAOCPP_JSON_BUILD_TESTS=OFF + -DTAOCPP_JSON_BUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/taocpp-json/cmake) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/share/doc +) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) +file(COPY ${SOURCE_PATH}/LICENSE.double-conversion DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(COPY ${SOURCE_PATH}/LICENSE.itoa DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(COPY ${SOURCE_PATH}/LICENSE.ryu DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/vcpkg/ports/tap-windows6/CONTROL b/vcpkg/ports/tap-windows6/CONTROL new file mode 100644 index 0000000..744247c --- /dev/null +++ b/vcpkg/ports/tap-windows6/CONTROL @@ -0,0 +1,3 @@ +Source: tap-windows6 +Version: 9.21.2-0e30f5c +Description: an NDIS 6 implementation of the TAP-Windows driver, used by OpenVPN and other apps. Note: This package only contains the headers for the driver. \ No newline at end of file diff --git a/vcpkg/ports/tap-windows6/portfile.cmake b/vcpkg/ports/tap-windows6/portfile.cmake new file mode 100644 index 0000000..4e2725d --- /dev/null +++ b/vcpkg/ports/tap-windows6/portfile.cmake @@ -0,0 +1,15 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO OpenVPN/tap-windows6 + REF 0e30f5c13b3c7b0bdd60da915350f653e4c14d92 + SHA512 88edecccd4818091f7d70b66f3dfa07146f010a064829dc971abdd0c180ce1f72db9d8f3a1c9f5b4fb3f31e7afe3eadbd7d6f7d711f698e723441d30beaf9e30 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/src/tap-windows.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/) + +file(INSTALL + ${SOURCE_PATH}/COPYRIGHT.MIT + DESTINATION ${CURRENT_PACKAGES_DIR}/share/tap-windows6 RENAME copyright) diff --git a/vcpkg/ports/taskflow/CONTROL b/vcpkg/ports/taskflow/CONTROL new file mode 100644 index 0000000..6bdca9e --- /dev/null +++ b/vcpkg/ports/taskflow/CONTROL @@ -0,0 +1,4 @@ +Source: taskflow +Version: 2.6.0 +Description: Fast Parallel Tasking Programming Library using Modern C++. +Homepage: https://github.com/taskflow/taskflow diff --git a/vcpkg/ports/taskflow/portfile.cmake b/vcpkg/ports/taskflow/portfile.cmake new file mode 100644 index 0000000..1e87d0b --- /dev/null +++ b/vcpkg/ports/taskflow/portfile.cmake @@ -0,0 +1,29 @@ +# header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO taskflow/taskflow + REF v2.6.0 + SHA512 43b023c7d744ae1e0baf6f504f32da481e950ec5cc34fe5511e4bbb8905203e4726917ee103b1c02544a75c6216c2ca481034be810b61a35511a3d7a2b278133 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DTF_BUILD_BENCHMARKS=OFF + -DTF_BUILD_CUDA=OFF + -DTF_BUILD_TESTS=OFF + -DTF_BUILD_EXAMPLES=OFF + -DBUILD_TESTING=OFF + -DCMAKE_CUDA_COMPILER=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Taskflow) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/tbb/CMakeLists.txt b/vcpkg/ports/tbb/CMakeLists.txt new file mode 100644 index 0000000..6d41b15 --- /dev/null +++ b/vcpkg/ports/tbb/CMakeLists.txt @@ -0,0 +1,25 @@ +project(tbb CXX) + +file(GLOB SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*) +file(COPY ${SOURCES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/src) + +include(${CMAKE_CURRENT_BINARY_DIR}/src/cmake/TBBBuild.cmake REQUIRED) +if(NOT BUILD_SHARED_LIBS) + set(TBB_STATIC_INCLUDE extra_inc=big_iron.inc) +endif() +if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(FORWARD_SDK_ROOT "SDKROOT=${CMAKE_OSX_SYSROOT}") +endif() + +tbb_build(TBB_ROOT ${CMAKE_CURRENT_BINARY_DIR}/src MAKE_ARGS ${TBB_STATIC_INCLUDE} ${FORWARD_SDK_ROOT}) + +set(SUBDIR ${CMAKE_CURRENT_BINARY_DIR}/tbb_cmake_build/tbb_cmake_build_subdir) +if(CMAKE_BUILD_TYPE STREQUAL "Release") + set(SUBDIR "${SUBDIR}_release") +else() + set(SUBDIR "${SUBDIR}_debug") +endif() + +file(GLOB OUTPUTS ${SUBDIR}/*.so.* ${SUBDIR}/*.so ${SUBDIR}/*.a ${SUBDIR}/*.dylib ${SUBDIR}/*.dylib.*) + +install(FILES ${OUTPUTS} DESTINATION lib) diff --git a/vcpkg/ports/tbb/CONTROL b/vcpkg/ports/tbb/CONTROL new file mode 100644 index 0000000..57ca689 --- /dev/null +++ b/vcpkg/ports/tbb/CONTROL @@ -0,0 +1,5 @@ +Source: tbb +Version: 2020_U1-1 +Homepage: https://github.com/01org/tbb +Description: Intel's Threading Building Blocks. +Supports: !(uwp|arm|arm64) \ No newline at end of file diff --git a/vcpkg/ports/tbb/fix-static-build.patch b/vcpkg/ports/tbb/fix-static-build.patch new file mode 100644 index 0000000..18f3e2b --- /dev/null +++ b/vcpkg/ports/tbb/fix-static-build.patch @@ -0,0 +1,13 @@ +diff --git a/src/tbb/cilk-tbb-interop.h b/src/tbb/cilk-tbb-interop.h +index 295734b..f35531e 100644 +--- a/src/tbb/cilk-tbb-interop.h ++++ b/src/tbb/cilk-tbb-interop.h +@@ -29,6 +29,8 @@ + #else + #ifdef IN_CILK_RUNTIME + #define CILK_EXPORT __declspec(dllexport) ++#elif defined(IN_CILK_STATIC) ++#define CILK_EXPORT /* nothing */ + #else + #define CILK_EXPORT __declspec(dllimport) + #endif // IN_CILK_RUNTIME diff --git a/vcpkg/ports/tbb/portfile.cmake b/vcpkg/ports/tbb/portfile.cmake new file mode 100644 index 0000000..c5f8b05 --- /dev/null +++ b/vcpkg/ports/tbb/portfile.cmake @@ -0,0 +1,122 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO oneapi-src/oneTBB + REF 427c252e0bb9e191767a62d8a744b21950c343f6 # 2020_U1 + SHA512 01307b689680c8d796357a65258257b0c54336aa2a5dc75746d65e169988b8cb353537ad480cc4b8970b32667ab7f965bfedee4a15186f2a3159c9f130667f26 + HEAD_REF tbb_2019 + PATCHES + fix-static-build.patch + terminate-when-buildtool-notfound.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +if (NOT VCPKG_TARGET_IS_WINDOWS) + vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + ) + + vcpkg_install_cmake() + + # Settings for TBBConfigInternal.cmake.in + set(TBB_LIB_EXT a) + set(TBB_LIB_PREFIX lib) +else() + if (VCPKG_CRT_LINKAGE STREQUAL static) + set(RELEASE_CONFIGURATION Release-MT) + set(DEBUG_CONFIGURATION Debug-MT) + else() + set(RELEASE_CONFIGURATION Release) + set(DEBUG_CONFIGURATION Debug) + endif() + + macro(CONFIGURE_PROJ_FILE arg) + set(CONFIGURE_FILE_NAME ${arg}) + set(CONFIGURE_BAK_FILE_NAME ${arg}.bak) + if (NOT EXISTS ${CONFIGURE_BAK_FILE_NAME}) + configure_file(${CONFIGURE_FILE_NAME} ${CONFIGURE_BAK_FILE_NAME} COPYONLY) + endif() + configure_file(${CONFIGURE_BAK_FILE_NAME} ${CONFIGURE_FILE_NAME} COPYONLY) + if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(READ ${CONFIGURE_FILE_NAME} SLN_CONFIGURE) + string(REPLACE "DynamicLibrary<\/ConfigurationType>" + "StaticLibrary<\/ConfigurationType>" SLN_CONFIGURE "${SLN_CONFIGURE}") + string(REPLACE "\/D_CRT_SECURE_NO_DEPRECATE" + "\/D_CRT_SECURE_NO_DEPRECATE \/DIN_CILK_STATIC" SLN_CONFIGURE "${SLN_CONFIGURE}") + file(WRITE ${CONFIGURE_FILE_NAME} "${SLN_CONFIGURE}") + else() + file(READ ${CONFIGURE_FILE_NAME} SLN_CONFIGURE) + string(REPLACE "\/D_CRT_SECURE_NO_DEPRECATE" + "\/D_CRT_SECURE_NO_DEPRECATE \/DIN_CILK_RUNTIME" SLN_CONFIGURE "${SLN_CONFIGURE}") + file(WRITE ${CONFIGURE_FILE_NAME} "${SLN_CONFIGURE}") + endif() + endmacro() + + CONFIGURE_PROJ_FILE(${SOURCE_PATH}/build/vs2013/tbb.vcxproj) + CONFIGURE_PROJ_FILE(${SOURCE_PATH}/build/vs2013/tbbmalloc.vcxproj) + CONFIGURE_PROJ_FILE(${SOURCE_PATH}/build/vs2013/tbbmalloc_proxy.vcxproj) + + vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH build/vs2013/makefile.sln + RELEASE_CONFIGURATION ${RELEASE_CONFIGURATION} + DEBUG_CONFIGURATION ${DEBUG_CONFIGURATION} + ) + # Settings for TBBConfigInternal.cmake.in + set(TBB_LIB_EXT lib) + set(TBB_LIB_PREFIX) +endif() + +file(COPY + ${SOURCE_PATH}/include/tbb + ${SOURCE_PATH}/include/serial + DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Settings for TBBConfigInternal.cmake.in +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(TBB_DEFAULT_COMPONENTS tbb tbbmalloc) +else() + set(TBB_DEFAULT_COMPONENTS tbb tbbmalloc tbbmalloc_proxy) +endif() + +file(READ "${SOURCE_PATH}/include/tbb/tbb_stddef.h" _tbb_stddef) +string(REGEX REPLACE ".*#define TBB_VERSION_MAJOR ([0-9]+).*" "\\1" _tbb_ver_major "${_tbb_stddef}") +string(REGEX REPLACE ".*#define TBB_VERSION_MINOR ([0-9]+).*" "\\1" _tbb_ver_minor "${_tbb_stddef}") +string(REGEX REPLACE ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1" TBB_INTERFACE_VERSION "${_tbb_stddef}") +set(TBB_VERSION "${_tbb_ver_major}.${_tbb_ver_minor}") +set(TBB_RELEASE_DIR "\${_tbb_root}/lib") +set(TBB_DEBUG_DIR "\${_tbb_root}/debug/lib") + +configure_file( + ${SOURCE_PATH}/cmake/templates/TBBConfigInternal.cmake.in + ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake + @ONLY +) +file(READ ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake _contents) +string(REPLACE + "get_filename_component(_tbb_root \"\${_tbb_root}\" PATH)" + "get_filename_component(_tbb_root \"\${_tbb_root}\" PATH)\nget_filename_component(_tbb_root \"\${_tbb_root}\" PATH)" + _contents + "${_contents}" +) +string(REPLACE + "set(_tbb_release_lib \"/${TBB_LIB_PREFIX}" + "set(_tbb_release_lib \"\${_tbb_root}/lib/${TBB_LIB_PREFIX}" + _contents + "${_contents}" +) +string(REPLACE + "set(_tbb_debug_lib \"/${TBB_LIB_PREFIX}" + "set(_tbb_debug_lib \"\${_tbb_root}/debug/lib/${TBB_LIB_PREFIX}" + _contents + "${_contents}" +) +string(REPLACE "SHARED IMPORTED)" "UNKNOWN IMPORTED)" _contents "${_contents}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake "${_contents}") + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/tbb) +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/tbb/terminate-when-buildtool-notfound.patch b/vcpkg/ports/tbb/terminate-when-buildtool-notfound.patch new file mode 100644 index 0000000..9599b48 --- /dev/null +++ b/vcpkg/ports/tbb/terminate-when-buildtool-notfound.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/TBBBuild.cmake b/cmake/TBBBuild.cmake +index a2222e3..756d85c 100644 +--- a/cmake/TBBBuild.cmake ++++ b/cmake/TBBBuild.cmake +@@ -158,7 +158,7 @@ function(tbb_build) + mark_as_advanced(TBB_MAKE_TOOL) + + if (NOT TBB_MAKE_TOOL) +- message(STATUS "Intel TBB can not be built: required make-tool (${make_tool_name}) was not found") ++ message(FATAL_ERROR "Intel TBB can not be built: required make-tool (${make_tool_name}) was not found") + set(${tbb_build_CONFIG_DIR} ${tbb_build_CONFIG_DIR}-NOTFOUND PARENT_SCOPE) + return() + endif() diff --git a/vcpkg/ports/tbb/usage b/vcpkg/ports/tbb/usage new file mode 100644 index 0000000..ecea983 --- /dev/null +++ b/vcpkg/ports/tbb/usage @@ -0,0 +1,4 @@ +The package tbb provides CMake targets: + + find_package(TBB CONFIG REQUIRED) + target_link_libraries(main PRIVATE TBB::tbb) diff --git a/vcpkg/ports/tcl/CONTROL b/vcpkg/ports/tcl/CONTROL new file mode 100644 index 0000000..0d451b0 --- /dev/null +++ b/vcpkg/ports/tcl/CONTROL @@ -0,0 +1,17 @@ +Source: tcl +Version: core-9-0-a1 +Port-Version: 1 +Homepage: https://github.com/tcltk/tcl +Description: Tcl provides a powerful platform for creating integration applications that tie together diverse applications, protocols, devices, and frameworks. When paired with the Tk toolkit, Tcl provides the fastest and most powerful way to create GUI applications that run on PCs, Unix, and Mac OS X. Tcl can also be used for a variety of web-related tasks and for creating powerful command languages for applications. + +Feature: thrdalloc +Description: Use the thread allocator (shared global free pool). + +Feature: profile +Description: Adds profiling hooks. Map file is assumed. + +Feature: unchecked +Description: Allows a symbols build to not use the debug enabled runtime (msvcrt.dll not msvcrtd.dll or libcmt.lib not libcmtd.lib). + +Feature: utfmax +Description: Forces Tcl_UniChar to be a 32-bit quantity in stead of 16-bits diff --git a/vcpkg/ports/tcl/force-shell-install.patch b/vcpkg/ports/tcl/force-shell-install.patch new file mode 100644 index 0000000..0725945 --- /dev/null +++ b/vcpkg/ports/tcl/force-shell-install.patch @@ -0,0 +1,27 @@ +From 85842ba83b70d99f90ee3fff8c956e82d17759f2 Mon Sep 17 00:00:00 2001 +From: Marek Roszko +Date: Tue, 18 Aug 2020 23:11:27 -0400 +Subject: [PATCH] Remove broken exist check for shell install + +--- + win/makefile.vc | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/win/makefile.vc b/win/makefile.vc +index f5d2f4a..6bffe32 100644 +--- a/win/makefile.vc ++++ b/win/makefile.vc +@@ -869,10 +869,8 @@ install-binaries: + @$(CPY) "$(TCLLIB)" "$(BIN_INSTALL_DIR)\" + !endif + @$(CPY) "$(TCLIMPLIB)" "$(LIB_INSTALL_DIR)\" +-!if exist($(TCLSH)) + @echo Installing $(TCLSHNAME) + @$(CPY) "$(TCLSH)" "$(BIN_INSTALL_DIR)\" +-!endif + @echo Installing $(TCLSTUBLIBNAME) + @$(CPY) "$(TCLSTUBLIB)" "$(LIB_INSTALL_DIR)\" + +-- +2.28.0.windows.1 + diff --git a/vcpkg/ports/tcl/portfile.cmake b/vcpkg/ports/tcl/portfile.cmake new file mode 100644 index 0000000..7dbfe7b --- /dev/null +++ b/vcpkg/ports/tcl/portfile.cmake @@ -0,0 +1,139 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tcltk/tcl + REF 0fa6a4e5aad821a5c34fdfa070c37c3f1ffc8c8e + SHA512 9d7f35309fe8b1a7c116639aaea50cc01699787c7afb432389bee2b9ad56a67034c45d90c9585ef1ccf15bdabf0951cbef86257c0c6aedbd2591bbfae3e93b76 + PATCHES force-shell-install.patch +) + +if (VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_TARGET_ARCHITECTURE MATCHES "x64") + set(TCL_BUILD_MACHINE_STR MACHINE=AMD64) + else() + set(TCL_BUILD_MACHINE_STR MACHINE=IX86) + endif() + + # Handle features + set(TCL_BUILD_OPTS OPTS=pdbs) + set(TCL_BUILD_STATS STATS=none) + set(TCL_BUILD_CHECKS CHECKS=none) + if (VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(TCL_BUILD_OPTS ${TCL_BUILD_OPTS},static,staticpkg) + endif() + if (VCPKG_CRT_LINKAGE STREQUAL dynamic) + set(TCL_BUILD_OPTS ${TCL_BUILD_OPTS},msvcrt) + endif() + + if ("thrdalloc" IN_LIST FEATURES) + set(TCL_BUILD_OPTS ${TCL_BUILD_OPTS},thrdalloc) + endif() + if ("profile" IN_LIST FEATURES) + set(TCL_BUILD_OPTS ${TCL_BUILD_OPTS},profile) + endif() + if ("unchecked" IN_LIST FEATURES) + set(TCL_BUILD_OPTS ${TCL_BUILD_OPTS},unchecked) + endif() + if ("utfmax" IN_LIST FEATURES) + set(TCL_BUILD_OPTS ${TCL_BUILD_OPTS},time64bit) + endif() + + vcpkg_install_nmake( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH win + OPTIONS + ${TCL_BUILD_MACHINE_STR} + ${TCL_BUILD_STATS} + ${TCL_BUILD_CHECKS} + OPTIONS_DEBUG + ${TCL_BUILD_OPTS},symbols + INSTALLDIR=${CURRENT_PACKAGES_DIR}/debug + SCRIPT_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/tools/tcl/debug/lib/tcl9.0 + OPTIONS_RELEASE + release + ${TCL_BUILD_OPTS} + INSTALLDIR=${CURRENT_PACKAGES_DIR} + SCRIPT_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/tools/tcl/lib/tcl9.0 + ) + + + # Install + # Note: tcl shell requires it to be in a folder adjacent to the /lib/ folder, i.e. in a /bin/ folder + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release) + file(GLOB_RECURSE TOOL_BIN + ${CURRENT_PACKAGES_DIR}/bin/*.exe + ${CURRENT_PACKAGES_DIR}/bin/*.dll + ) + file(COPY ${TOOL_BIN} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/tcl/bin/) + + # Remove .exes only after copying + file(GLOB_RECURSE TOOL_EXES + ${CURRENT_PACKAGES_DIR}/bin/*.exe + ) + file(REMOVE ${TOOL_EXES}) + + file(GLOB_RECURSE TOOLS + ${CURRENT_PACKAGES_DIR}/lib/dde1.4/* + ${CURRENT_PACKAGES_DIR}/lib/nmake/* + ${CURRENT_PACKAGES_DIR}/lib/reg1.3/* + ${CURRENT_PACKAGES_DIR}/lib/tcl8/* + ${CURRENT_PACKAGES_DIR}/lib/tcl8.6/* + ${CURRENT_PACKAGES_DIR}/lib/tdbcsqlite31.1.0/* + ) + + foreach(TOOL ${TOOLS}) + get_filename_component(DST_DIR ${TOOL} PATH) + file(COPY ${TOOL} DESTINATION ${DST_DIR}) + endforeach() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/dde1.4 + ${CURRENT_PACKAGES_DIR}/lib/nmake + ${CURRENT_PACKAGES_DIR}/lib/reg1.3 + ${CURRENT_PACKAGES_DIR}/lib/tcl8 + ${CURRENT_PACKAGES_DIR}/lib/tcl8.6 + ${CURRENT_PACKAGES_DIR}/lib/tdbcsqlite31.1.0 + ) + endif() + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug) + file(GLOB_RECURSE TOOL_BIN + ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe + ${CURRENT_PACKAGES_DIR}/debug/bin/*.dll + ) + file(COPY ${TOOL_BIN} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/tcl/debug/bin/) + + # Remove .exes only after copying + file(GLOB_RECURSE EXES + ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe + ) + file(REMOVE ${EXES}) + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/dde1.4 + ${CURRENT_PACKAGES_DIR}/debug/lib/nmake + ${CURRENT_PACKAGES_DIR}/debug/lib/reg1.3 + ${CURRENT_PACKAGES_DIR}/debug/lib/tcl8 + ${CURRENT_PACKAGES_DIR}/debug/lib/tcl8.6 + ${CURRENT_PACKAGES_DIR}/debug/lib/tdbcsqlite31.1.0 + ) + endif() + + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() + + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +else() + file(REMOVE "${SOURCE_PATH}/unix/configure") + vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH unix + ) + + vcpkg_install_make() + vcpkg_fixup_pkgconfig() + + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +endif() + +file(INSTALL ${SOURCE_PATH}/license.terms DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/tclap/CONTROL b/vcpkg/ports/tclap/CONTROL new file mode 100644 index 0000000..277e26b --- /dev/null +++ b/vcpkg/ports/tclap/CONTROL @@ -0,0 +1,4 @@ +Source: tclap +Version: 1.2.2-3 +Homepage: https://sourceforge.net/projects/tclap/ +Description: Templatized command-line argument parser for C++ diff --git a/vcpkg/ports/tclap/portfile.cmake b/vcpkg/ports/tclap/portfile.cmake new file mode 100644 index 0000000..d23ae53 --- /dev/null +++ b/vcpkg/ports/tclap/portfile.cmake @@ -0,0 +1,10 @@ +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO tclap + FILENAME "tclap-1.2.2.tar.gz" + SHA512 516ec17f82a61277922bc8c0ed66973300bf42a738847fbbd2912c6405c34f94a13e47dc964854a5b26a9a9f1f518cce682ca54e769d6016851656c647866107 +) + +file(COPY "${SOURCE_PATH}/include/tclap" DESTINATION "${CURRENT_PACKAGES_DIR}/include" FILES_MATCHING PATTERN "*.h") + +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/vcpkg/ports/teemo/CONTROL b/vcpkg/ports/teemo/CONTROL new file mode 100644 index 0000000..843f68e --- /dev/null +++ b/vcpkg/ports/teemo/CONTROL @@ -0,0 +1,5 @@ +Source: teemo +Version: 2.1 +Build-Depends: curl[non-http] +Description: C++ File Download Library, support Multithreading, Breakpoint Transmission, Speed Limit, Real-time Speed. +Homepage: https://github.com/winsoft666/teemo \ No newline at end of file diff --git a/vcpkg/ports/teemo/portfile.cmake b/vcpkg/ports/teemo/portfile.cmake new file mode 100644 index 0000000..55afaf4 --- /dev/null +++ b/vcpkg/ports/teemo/portfile.cmake @@ -0,0 +1,41 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "UWP" "osx") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO winsoft666/teemo + REF 99b012f827ba126fe43986e6c9266f656120edd6 + SHA512 b6fcbba897b370154965a5e884a6dbd13aa1dab1ec25f404125b62f3857752b5c8e791a90014ef058e839c21f1deae8b88df2d9a8084a9e48f7f676561aa9dc9 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" TEEMO_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DTEEMO_STATIC:BOOL=${TEEMO_STATIC} + -DBUILD_TESTS:BOOL=OFF +) + +vcpkg_install_cmake() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/teemo) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/teemo) +elseif(EXISTS ${CURRENT_PACKAGES_DIR}/share/teemo) + vcpkg_fixup_cmake_targets(CONFIG_PATH share/teemo) +endif() + +file(READ ${CURRENT_PACKAGES_DIR}/include/teemo/teemo.h TEEMO_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + string(REPLACE "#ifdef TEEMO_STATIC" "#if 1" TEEMO_H "${TEEMO_H}") +else() + string(REPLACE "#ifdef TEEMO_STATIC" "#if 0" TEEMO_H "${TEEMO_H}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/teemo/teemo.h "${TEEMO_H}") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +vcpkg_copy_pdbs() \ No newline at end of file diff --git a/vcpkg/ports/telnetpp/CONTROL b/vcpkg/ports/telnetpp/CONTROL new file mode 100644 index 0000000..3118d13 --- /dev/null +++ b/vcpkg/ports/telnetpp/CONTROL @@ -0,0 +1,11 @@ +Source: telnetpp +Version: 2.0-4 +Homepage: https://github.com/KazDragon/telnetpp +Description: Telnet++ is an implementation of the Telnet Session Layer protocol using C++14 +Build-Depends: boost-container, boost-signals2, boost-variant, gsl-lite, boost-exception +Default-Features: zlib +Supports: !uwp + +Feature: zlib +Description: Zlib support +Build-Depends: zlib diff --git a/vcpkg/ports/telnetpp/fix-build-error.patch b/vcpkg/ports/telnetpp/fix-build-error.patch new file mode 100644 index 0000000..d72ced0 --- /dev/null +++ b/vcpkg/ports/telnetpp/fix-build-error.patch @@ -0,0 +1,120 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 09b4f9b..6f72c41 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -22,8 +22,8 @@ message("Building Telnet++ with zlib: ${TELNETPP_WITH_ZLIB}") + message("Building Telnet++ with code coverage: ${TELNETPP_COVERAGE}") + message("Building Telnet++ with sanitizers: ${TELNETPP_SANITIZE}") + +-include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +-conan_basic_setup(TARGETS NO_OUTPUT_DIRS) ++find_package(gsl-lite REQUIRED) ++find_package(Boost REQUIRED COMPONENTS container) + + # The required C++ Standard for Telnet++ is C++14. + set(CMAKE_CXX_STANDARD 14) +@@ -154,18 +154,24 @@ add_library(telnetpp + ${TELNETPP_PRIVATE_INCLUDE_FILES} + ) + ++if (BUILD_SHARED_LIBS) ++ add_definitions(-Dtelnetpp_EXPORTS) ++else() ++ add_definitions(-DTELNETPP_STATIC_DEFINE) ++endif() ++ + target_link_libraries(telnetpp + PUBLIC +- CONAN_PKG::gsl-lite +- CONAN_PKG::boost_container +- CONAN_PKG::boost_signals2 +- CONAN_PKG::boost_variant ++ gsl::gsl-lite ++ Boost::boost ++ Boost::container + ) + + if (TELNETPP_WITH_ZLIB) ++ find_package(ZLIB REQUIRED) + target_link_libraries(telnetpp + PRIVATE +- CONAN_PKG::zlib ++ ZLIB::ZLIB + ) + endif() + +@@ -179,8 +185,7 @@ set_target_properties(telnetpp + target_include_directories(telnetpp + PUBLIC + $ +- $ +- "${Boost_INCLUDE_DIRS}" ++ $ + ) + + generate_export_header(telnetpp +@@ -197,17 +202,19 @@ install( + telnetpp + EXPORT + telnetpp-config ++ RUNTIME DESTINATION ++ bin + ARCHIVE DESTINATION +- lib/telnetpp-${TELNETPP_VERSION} ++ lib + LIBRARY DESTINATION +- lib/telnetpp-${TELNETPP_VERSION} ++ lib + ) + + install( + DIRECTORY + include/ + DESTINATION +- include/telnetpp-${TELNETPP_VERSION} ++ include + ) + + export( +@@ -221,7 +228,7 @@ install( + EXPORT + telnetpp-config + DESTINATION +- lib/telnetpp-${TELNETPP_VERSION} ++ share/telnetpp + ) + + include(CMakePackageConfigHelpers) +@@ -236,7 +243,7 @@ install( + FILES + "${CMAKE_CURRENT_BINARY_DIR}/telnetpp-config-version.cmake" + DESTINATION +- lib/telnetpp-${TELNETPP_VERSION} ++ share/telnetpp + ) + + if (TELNETPP_WITH_TESTS) +diff --git a/include/telnetpp/core.hpp b/include/telnetpp/core.hpp +index 2362fac..8710d36 100644 +--- a/include/telnetpp/core.hpp ++++ b/include/telnetpp/core.hpp +@@ -1,7 +1,7 @@ + #pragma once + + #include "telnetpp/detail/export.hpp" +-#include ++#include + #include + #include + +diff --git a/src/options/msdp/detail/decoder.cpp b/src/options/msdp/detail/decoder.cpp +index c0b7906..e725693 100644 +--- a/src/options/msdp/detail/decoder.cpp ++++ b/src/options/msdp/detail/decoder.cpp +@@ -1,5 +1,6 @@ + #include "telnetpp/options/msdp/detail/decoder.hpp" + #include "telnetpp/options/msdp/detail/protocol.hpp" ++#include + #include + #include + diff --git a/vcpkg/ports/telnetpp/github-215.patch b/vcpkg/ports/telnetpp/github-215.patch new file mode 100644 index 0000000..57461b9 --- /dev/null +++ b/vcpkg/ports/telnetpp/github-215.patch @@ -0,0 +1,47 @@ + +--- + include/telnetpp/options/msdp/variable.hpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/telnetpp/options/msdp/variable.hpp b/include/telnetpp/options/msdp/variable.hpp +index 16dae0c..d74a6da 100644 +--- a/include/telnetpp/options/msdp/variable.hpp ++++ b/include/telnetpp/options/msdp/variable.hpp +@@ -5,6 +5,7 @@ + #include + #include + #include ++#include + + namespace telnetpp { namespace options { namespace msdp { + + + +--- + include/telnetpp/options/msdp/variable.hpp | 1 - + src/options/msdp/variable.cpp | 1 + + 2 files changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/telnetpp/options/msdp/variable.hpp b/include/telnetpp/options/msdp/variable.hpp +index d74a6da..16dae0c 100644 +--- a/include/telnetpp/options/msdp/variable.hpp ++++ b/include/telnetpp/options/msdp/variable.hpp +@@ -5,7 +5,6 @@ + #include + #include + #include +-#include + + namespace telnetpp { namespace options { namespace msdp { + +diff --git a/src/options/msdp/variable.cpp b/src/options/msdp/variable.cpp +index dc779ea..82549e9 100644 +--- a/src/options/msdp/variable.cpp ++++ b/src/options/msdp/variable.cpp +@@ -1,5 +1,6 @@ + #include "telnetpp/options/msdp/variable.hpp" + #include "telnetpp/detail/lambda_visitor.hpp" ++#include + + namespace telnetpp { namespace options { namespace msdp { + diff --git a/vcpkg/ports/telnetpp/portfile.cmake b/vcpkg/ports/telnetpp/portfile.cmake new file mode 100644 index 0000000..26154cf --- /dev/null +++ b/vcpkg/ports/telnetpp/portfile.cmake @@ -0,0 +1,41 @@ +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KazDragon/telnetpp + REF 8dc780579293153ad2ae9ad6943815c050d4c659 + SHA512 280a8e6c0392f5822b05968520d176d1510f00c12a2502f6039f4f1f78a558e61f825a231fb70b7de6fd21a18b24734eea3ba36a24b29f2a7e9856b1f4de5217 + HEAD_REF master + PATCHES + fix-build-error.patch + github-215.patch +) + +set(USE_ZLIB OFF) +if("zlib" IN_LIST FEATURES) + set(USE_ZLIB ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE + PREFER_NINJA + OPTIONS + -DGSL_INCLUDE_PATH=${CURRENT_INSTALLED_DIR}/include + -DTELNETPP_WITH_ZLIB=${USE_ZLIB} + -DTELNETPP_WITH_TESTS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/telnetpp) + +vcpkg_copy_pdbs() + +# Remove duplicate header files and CMake input file +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE ${CURRENT_PACKAGES_DIR}/include/telnetpp/version.hpp.in) +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/telnetpp RENAME copyright) diff --git a/vcpkg/ports/tensorflow-cc/CONTROL b/vcpkg/ports/tensorflow-cc/CONTROL new file mode 100644 index 0000000..2d0ff50 --- /dev/null +++ b/vcpkg/ports/tensorflow-cc/CONTROL @@ -0,0 +1,6 @@ +Source: tensorflow-cc +Version: 1.14 +Port-Version: 5 +Description: Library for computation using data flow graphs for scalable machine learning +Build-Depends: c-ares +Supports: !x86 diff --git a/vcpkg/ports/tensorflow-cc/TensorflowCCConfig.cmake b/vcpkg/ports/tensorflow-cc/TensorflowCCConfig.cmake new file mode 100644 index 0000000..db12811 --- /dev/null +++ b/vcpkg/ports/tensorflow-cc/TensorflowCCConfig.cmake @@ -0,0 +1,28 @@ +set(tensorflow_cc_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/../../include") + +message(WARNING "Tensorflow has vendored dependencies. You may need to manually include files from tensorflow-external") +set(tensorflow_cc_INCLUDE_DIRS + ${tensorflow_cc_INCLUDE_DIR} + ${tensorflow_cc_INCLUDE_DIR}/tensorflow-external/ + ${tensorflow_cc_INCLUDE_DIR}/tensorflow-external/tensorflow/ + ${tensorflow_cc_INCLUDE_DIR}/tensorflow-external/external/com_google_absl + ${tensorflow_cc_INCLUDE_DIR}/tensorflow-external/bazel-out/k8-opt/bin/ + ${tensorflow_cc_INCLUDE_DIR}/tensorflow-external/external/protobuf_archive/src/ +) + +add_library(tensorflow_cc::tensorflow_framework SHARED IMPORTED) +set_target_properties(tensorflow_cc::tensorflow_framework + PROPERTIES + IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/../../lib/libtensorflow_framework.so.1.14.0 + INTERFACE_INCLUDE_DIRECTORIES "${tensorflow_cc_INCLUDE_DIRS}" +) + +add_library(tensorflow_cc::tensorflow_cc SHARED IMPORTED) +set_target_properties(tensorflow_cc::tensorflow_cc + PROPERTIES + IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/../../lib/libtensorflow_cc.so.1.14.0 + INTERFACE_INCLUDE_DIRECTORIES "${tensorflow_cc_INCLUDE_DIRS}" +) + +set(tensorflow_cc_FOUND TRUE) +set(tensorflow_framework_FOUND TRUE) \ No newline at end of file diff --git a/vcpkg/ports/tensorflow-cc/file-exists.patch b/vcpkg/ports/tensorflow-cc/file-exists.patch new file mode 100644 index 0000000..8cefb48 --- /dev/null +++ b/vcpkg/ports/tensorflow-cc/file-exists.patch @@ -0,0 +1,13 @@ +diff --git a/configure.py b/configure.py +index 43af22d..7989b1f 100644 +--- a/configure.py ++++ b/configure.py +@@ -183,7 +183,7 @@ def get_python_path(environ_cp, python_bin_path): + + paths = [] + for path in all_paths: +- if os.path.isdir(path): ++ if os.path.isdir(path) or True: + paths.append(path) + return paths + diff --git a/vcpkg/ports/tensorflow-cc/fix-build-error.patch b/vcpkg/ports/tensorflow-cc/fix-build-error.patch new file mode 100644 index 0000000..89a15f1 --- /dev/null +++ b/vcpkg/ports/tensorflow-cc/fix-build-error.patch @@ -0,0 +1,22 @@ +diff --git a/tensorflow/core/platform/default/logging.h b/tensorflow/core/platform/default/logging.h +index 99dd6de..3cbe8ed 100644 +--- a/tensorflow/core/platform/default/logging.h ++++ b/tensorflow/core/platform/default/logging.h +@@ -82,13 +82,13 @@ class LogMessageFatal : public LogMessage { + }; + + #define _TF_LOG_INFO \ +- ::tensorflow::internal::LogMessage(__FILE__, __LINE__, ::tensorflow::INFO) ++ tensorflow::internal::LogMessage(__FILE__, __LINE__, tensorflow::INFO) + #define _TF_LOG_WARNING \ +- ::tensorflow::internal::LogMessage(__FILE__, __LINE__, ::tensorflow::WARNING) ++ tensorflow::internal::LogMessage(__FILE__, __LINE__, tensorflow::WARNING) + #define _TF_LOG_ERROR \ +- ::tensorflow::internal::LogMessage(__FILE__, __LINE__, ::tensorflow::ERROR) ++ tensorflow::internal::LogMessage(__FILE__, __LINE__, tensorflow::ERROR) + #define _TF_LOG_FATAL \ +- ::tensorflow::internal::LogMessageFatal(__FILE__, __LINE__) ++ tensorflow::internal::LogMessageFatal(__FILE__, __LINE__) + + #define _TF_LOG_QFATAL _TF_LOG_FATAL + diff --git a/vcpkg/ports/tensorflow-cc/portfile.cmake b/vcpkg/ports/tensorflow-cc/portfile.cmake new file mode 100644 index 0000000..0aa53e7 --- /dev/null +++ b/vcpkg/ports/tensorflow-cc/portfile.cmake @@ -0,0 +1,125 @@ +message(WARNING "This tensorflow port currently is experimental on Windows and Linux platforms.") + +if (VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + message(FATAL_ERROR "TensorFlow does not support 32bit systems.") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tensorflow/tensorflow + REF v1.14.0 + SHA512 ac9ea5a2d1c761aaafbdc335259e29c128127b8d069ec5b206067935180490aa95e93c7e13de57f7f54ce4ba4f34a822face22b4a028f60185edb380e5cd4787 + HEAD_REF master + PATCHES + file-exists.patch # required or otherwise it cant find python lib path on windows + fix-build-error.patch # Fix namespace error +) + +# due to https://github.com/bazelbuild/bazel/issues/8028, bazel must be version 25.0 or higher +vcpkg_find_acquire_program(BAZEL) +get_filename_component(BAZEL_DIR "${BAZEL}" DIRECTORY) +vcpkg_add_to_path(PREPEND ${BAZEL_DIR}) +set(ENV{BAZEL_BIN_PATH} "${BAZEL}") + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY) +vcpkg_add_to_path(PREPEND ${PYTHON3_DIR}) +set(ENV{PYTHON_BIN_PATH} "${PYTHON3}") + +vcpkg_find_acquire_program(GIT) +get_filename_component(GIT_DIR "${GIT}" DIRECTORY) +vcpkg_add_to_path(PREPEND ${GIT_DIR}) + +function(tensorflow_try_remove_recurse_wait PATH_TO_REMOVE) + file(REMOVE_RECURSE ${PATH_TO_REMOVE}) + if (EXISTS "${PATH_TO_REMOVE}") + _execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 5) + file(REMOVE_RECURSE ${PATH_TO_REMOVE}) + endif() +endfunction() + +if(CMAKE_HOST_WIN32) + vcpkg_acquire_msys(MSYS_ROOT PACKAGES bash unzip patch diffutils libintl gzip coreutils) + vcpkg_add_to_path(${MSYS_ROOT}/usr/bin) + set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) + set(ENV{BAZEL_SH} ${MSYS_ROOT}/usr/bin/bash.exe) + + set(ENV{BAZEL_VS} $ENV{VSInstallDir}) + set(ENV{BAZEL_VC} $ENV{VCInstallDir}) + set(ENV{BAZEL_VC_FULL_VERSION} $ENV{VCToolsVersion}) +endif() + +# we currently only support the release version +tensorflow_try_remove_recurse_wait(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) +file(RENAME ${SOURCE_PATH} ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) +set(SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel") + +# tensorflow has long file names, which will not work on windows +set(ENV{TEST_TMPDIR} ${CURRENT_BUILDTREES_DIR}/../.bzl) + +set(ENV{USE_DEFAULT_PYTHON_LIB_PATH} 1) +set(ENV{TF_NEED_KAFKA} 0) +set(ENV{TF_NEED_OPENCL_SYCL} 0) +set(ENV{TF_NEED_AWS} 0) +set(ENV{TF_NEED_GCP} 0) +set(ENV{TF_NEED_HDFS} 0) +set(ENV{TF_NEED_S3} 0) +set(ENV{TF_ENABLE_XLA} 0) +set(ENV{TF_NEED_GDR} 0) +set(ENV{TF_NEED_VERBS} 0) +set(ENV{TF_NEED_OPENCL} 0) +set(ENV{TF_NEED_MPI} 0) +set(ENV{TF_NEED_TENSORRT} 0) +set(ENV{TF_NEED_NGRAPH} 0) +set(ENV{TF_NEED_IGNITE} 0) +set(ENV{TF_NEED_ROCM} 0) +set(ENV{TF_SET_ANDROID_WORKSPACE} 0) +set(ENV{TF_DOWNLOAD_CLANG} 0) +set(ENV{TF_NCCL_VERSION} 2.3) +set(ENV{NCCL_INSTALL_PATH} "") +set(ENV{CC_OPT_FLAGS} "/arch:AVX") +set(ENV{TF_NEED_CUDA} 0) +set(ENV{TF_CONFIGURE_IOS} 0) + +message(STATUS "Configuring TensorFlow") + +vcpkg_execute_required_process( + COMMAND ${PYTHON3} ${SOURCE_PATH}/configure.py --workspace "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME config-${TARGET_TRIPLET}-rel +) +message(STATUS "Warning: Building TensorFlow can take an hour or more.") + +if(CMAKE_HOST_WIN32) + vcpkg_execute_build_process( + COMMAND ${BASH} --noprofile --norc -c "${BAZEL} build --verbose_failures -c opt --python_path=${PYTHON3} --incompatible_disable_deprecated_attr_params=false --define=no_tensorflow_py_deps=true ///tensorflow:libtensorflow_cc.so ///tensorflow:install_headers" + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME build-${TARGET_TRIPLET}-rel + ) +else() + vcpkg_execute_build_process( + COMMAND ${BAZEL} build --verbose_failures -c opt --python_path=${PYTHON3} --incompatible_disable_deprecated_attr_params=false --define=no_tensorflow_py_deps=true //tensorflow:libtensorflow_cc.so //tensorflow:install_headers + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME build-${TARGET_TRIPLET}-rel + ) +endif() + +file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bazel-genfiles/tensorflow/include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/tensorflow-external) + +if(CMAKE_HOST_WIN32) + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bazel-bin/tensorflow/libtensorflow_cc.so.1.14.0 DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bazel-bin/tensorflow/libtensorflow_cc.so.1.14.0.if.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bazel-bin/tensorflow/libtensorflow_cc.so.1.14.0 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bazel-bin/tensorflow/libtensorflow_cc.so.1.14.0.if.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +else() + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bazel-bin/tensorflow/libtensorflow_cc.so.1.14.0 DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bazel-bin/tensorflow/libtensorflow_framework.so.1.14.0 DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bazel-bin/tensorflow/libtensorflow_cc.so.1.14.0 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/bazel-bin/tensorflow/libtensorflow_framework.so.1.14.0 DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +endif() + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/tensorflow-cc) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/tensorflow-cc/LICENSE ${CURRENT_PACKAGES_DIR}/share/tensorflow-cc/copyright) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/TensorflowCCConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/unofficial-tensorflow-cc) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/unofficial-tensorflow-cc/TensorflowCCConfig.cmake ${CURRENT_PACKAGES_DIR}/share/unofficial-tensorflow-cc/unofficial-tensorflow-cc-config.cmake) diff --git a/vcpkg/ports/tesseract/CONTROL b/vcpkg/ports/tesseract/CONTROL new file mode 100644 index 0000000..7f646fd --- /dev/null +++ b/vcpkg/ports/tesseract/CONTROL @@ -0,0 +1,13 @@ +Source: tesseract +Version: 4.1.1 +Port-Version: 1 +Homepage: https://github.com/tesseract-ocr/tesseract +Description: An OCR Engine that was developed at HP Labs between 1985 and 1995... and now at Google. +Build-Depends: leptonica + +Feature: training-tools +Description: build training tools +Build-Depends: icu, pango, cairo, fontconfig + +Feature: cpu-independed +Description: build on any cpu extension commands support diff --git a/vcpkg/ports/tesseract/fix-text2image.patch b/vcpkg/ports/tesseract/fix-text2image.patch new file mode 100644 index 0000000..8a9c6ca --- /dev/null +++ b/vcpkg/ports/tesseract/fix-text2image.patch @@ -0,0 +1,105 @@ +diff --git a/src/training/CMakeLists.txt b/src/training/CMakeLists.txt +index 8fd96a9..186341e 100644 +--- a/src/training/CMakeLists.txt ++++ b/src/training/CMakeLists.txt +@@ -52,7 +52,7 @@ endif() + # experimental + + if (NOT CPPAN_BUILD AND NOT SW_BUILD) +- find_package(ICU 52.1 COMPONENTS uc i18n) ++ find_package(ICU 52.1 REQUIRED COMPONENTS i18n uc) + endif() + + ######################################## +@@ -187,6 +187,9 @@ set(unicharset_training_src + + ) + add_library (unicharset_training ${unicharset_training_src}) ++if(UNIX) ++ list(APPEND ICU_LIBRARIES ${CMAKE_DL_LIBS}) ++endif() + if (CPPAN_BUILD) + target_link_libraries (unicharset_training common_training pvt.cppan.demo.unicode.icu.i18n) + elseif (SW_BUILD) +@@ -253,16 +256,27 @@ if (NOT CPPAN_BUILD AND NOT SW_BUILD) + find_package(PkgConfig) + endif() + +-if (PKG_CONFIG_FOUND OR CPPAN_BUILD OR SW_BUILD) +- +-if (PKG_CONFIG_FOUND) +-pkg_check_modules(Pango REQUIRED pango>=1.22.0) +-pkg_check_modules(Cairo REQUIRED cairo) +-pkg_check_modules(PangoFt2 REQUIRED pangoft2) +-pkg_check_modules(PangoCairo REQUIRED pangocairo) +-pkg_check_modules(FontConfig REQUIRED fontconfig) ++find_package(unofficial-cairo CONFIG REQUIRED) ++find_package(unofficial-glib CONFIG REQUIRED) ++find_package(unofficial-gettext CONFIG REQUIRED) ++find_package(unofficial-fontconfig CONFIG REQUIRED) ++find_package(Freetype REQUIRED) ++if(UNIX OR BUILD_SHARED_LIBS) ++ find_package(harfbuzz CONFIG REQUIRED) + endif() + ++find_library(Pango_LIBRARY_RELEASE NAMES pango-1.0) ++find_library(Pango_LIBRARY_DEBUG NAMES pango-1.0) ++select_library_configurations(Pango) ++ ++find_library(PangoFt2_LIBRARY_RELEASE NAMES pangoft2-1.0) ++find_library(PangoFt2_LIBRARY_DEBUG NAMES pangoft2-1.0) ++select_library_configurations(PangoFt2) ++ ++find_library(PangoCairo_LIBRARY_RELEASE NAMES pangocairo-1.0) ++find_library(PangoCairo_LIBRARY_DEBUG NAMES pangocairo-1.0) ++select_library_configurations(PangoCairo) ++ + set(text2image_src + text2image.cpp + boxchar.cpp +@@ -285,16 +299,34 @@ set(text2image_src + + add_executable (text2image ${text2image_src}) + target_link_libraries (text2image unicharset_training) +-if (PKG_CONFIG_FOUND) ++ + target_include_directories (text2image BEFORE PRIVATE ${Cairo_INCLUDE_DIRS} ${Pango_INCLUDE_DIRS}) + target_compile_definitions (text2image PRIVATE -DPANGO_ENABLE_ENGINE) +-target_link_libraries (text2image ++if(UNIX OR BUILD_SHARED_LIBS) ++ target_link_libraries (text2image ++ ${PangoCairo_LIBRARIES} ++ ${PangoFt2_LIBRARIES} + ${Pango_LIBRARIES} + ${Cairo_LIBRARIES} ++ harfbuzz::harfbuzz ++ Freetype::Freetype ++ unofficial::glib::gio unofficial::glib::glib unofficial::glib::gmodule unofficial::glib::gobject ++ unofficial::cairo::cairo unofficial::cairo::cairo-gobject ++ unofficial::gettext::libintl ++ unofficial::fontconfig::fontconfig ++) ++else() ++ target_link_libraries (text2image + ${PangoCairo_LIBRARIES} + ${PangoFt2_LIBRARIES} + ${FontConfig_LIBRARIES} +-) ++ ${Pango_LIBRARIES} ++ Freetype::Freetype ++ unofficial::glib::gio unofficial::glib::glib unofficial::glib::gmodule unofficial::glib::gobject ++ unofficial::cairo::cairo unofficial::cairo::cairo-gobject ++ unofficial::gettext::libintl ++ unofficial::fontconfig::fontconfig ++ ) + endif() + if (CPPAN_BUILD) + target_link_libraries (text2image pvt.cppan.demo.gnome.pango.pangocairo) +@@ -302,7 +334,6 @@ endif() + project_group (text2image "Training Tools") + install (TARGETS text2image RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) + +-endif() + endif(ICU_FOUND) + + ############################################################################### diff --git a/vcpkg/ports/tesseract/fix-tiff-linkage.patch b/vcpkg/ports/tesseract/fix-tiff-linkage.patch new file mode 100644 index 0000000..f4720c0 --- /dev/null +++ b/vcpkg/ports/tesseract/fix-tiff-linkage.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f154663..c07b827 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -431,7 +431,7 @@ endif() + add_executable (tesseract ${tesseractmain_src} ${tesseractmain_rsc}) + target_link_libraries (tesseract libtesseract) + if (HAVE_TIFFIO_H) +- target_link_libraries(tesseract tiff) ++ target_link_libraries(tesseract TIFF::TIFF) + endif() + + if (OPENMP_BUILD AND UNIX) diff --git a/vcpkg/ports/tesseract/portfile.cmake b/vcpkg/ports/tesseract/portfile.cmake new file mode 100644 index 0000000..925b19a --- /dev/null +++ b/vcpkg/ports/tesseract/portfile.cmake @@ -0,0 +1,85 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tesseract-ocr/tesseract + REF 4.1.1 + SHA512 017723a2268be789fe98978eed02fd294968cc8050dde376dee026f56f2b99df42db935049ae5e72c4519a920e263b40af1a6a40d9942e66608145b3131a71a2 + PATCHES + fix-tiff-linkage.patch + fix-text2image.patch +) + +# The built-in cmake FindICU is better +file(REMOVE ${SOURCE_PATH}/cmake/FindICU.cmake) + +# Handle Static Library Output +if(VCPKG_LIBRARY_LINKAGE EQUAL "static") + list(APPEND OPTIONS_LIST -DSTATIC=ON) +endif() + +# Handle CONTROL +if("training-tools" IN_LIST FEATURES) + list(APPEND OPTIONS_LIST -DBUILD_TRAINING_TOOLS=ON) +else() + list(APPEND OPTIONS_LIST -DBUILD_TRAINING_TOOLS=OFF) +endif() +if("cpu-independed" IN_LIST FEATURES) + list(APPEND OPTIONS_LIST -DTARGET_ARCHITECTURE=none) +else() + list(APPEND OPTIONS_LIST -DTARGET_ARCHITECTURE=auto) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSTATIC=ON + -DUSE_SYSTEM_ICU=True + -DCMAKE_DISABLE_FIND_PACKAGE_LibArchive=ON + -DCMAKE_DISABLE_FIND_PACKAGE_OpenCL=ON + -DLeptonica_DIR=YES + ${OPTIONS_LIST} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + +# Install tool +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/tesseract) +set(EXTENSION) +if(WIN32) + set(EXTENSION ".exe") +endif() + +# copy training tools +set(TRAINING_TOOLS_DIR ${CURRENT_PACKAGES_DIR}/tools/tesseract/training) +if("training_tools" IN_LIST FEATURES) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/ambiguous_words${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/classifier_tester${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/combine_tessdata${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/cntraining${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/dawg2wordlist${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/mftraining${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/shapeclustering${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/wordlist2dawg${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/combine_lang_model${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/lstmeval${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/lstmtraining${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/set_unicharset_properties${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/unicharset_extractor${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/text2image${EXTENSION} DESTINATION ${TRAINING_TOOLS_DIR}) +endif() + +file(COPY ${CURRENT_PACKAGES_DIR}/bin/tesseract${EXTENSION} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/tesseract) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/tesseract) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/tfhe/CONTROL b/vcpkg/ports/tfhe/CONTROL new file mode 100644 index 0000000..514e5fb --- /dev/null +++ b/vcpkg/ports/tfhe/CONTROL @@ -0,0 +1,4 @@ +Source: tfhe +Version: 1.0.1-1 +Homepage: https://github.com/tfhe/tfhe +Description: TFHE is open-source software distributed under the terms of the Apache 2.0 license. diff --git a/vcpkg/ports/tfhe/mac-fix.patch b/vcpkg/ports/tfhe/mac-fix.patch new file mode 100644 index 0000000..20161fe --- /dev/null +++ b/vcpkg/ports/tfhe/mac-fix.patch @@ -0,0 +1,13 @@ +diff --git a/src/libtfhe/fft_processors/nayuki/fft_processor_nayuki.cpp b/src/libtfhe/fft_processors/nayuki/fft_processor_nayuki.cpp +index 26de3f0..422c7f6 100644 +--- a/src/libtfhe/fft_processors/nayuki/fft_processor_nayuki.cpp ++++ b/src/libtfhe/fft_processors/nayuki/fft_processor_nayuki.cpp +@@ -12,7 +12,7 @@ FFT_Processor_nayuki::FFT_Processor_nayuki(const int N): _2N(2*N),N(N),Ns2(N/2) + tables_reverse = fft_init_reverse(_2N); + omegaxminus1 = (cplx*) malloc(sizeof(cplx) * _2N); + for (int x=0; x<_2N; x++) { +- omegaxminus1[x]=cos(x*M_PI/N)-1. + sin(x*M_PI/N) * 1i; ++ omegaxminus1[x]=cplx(cos(x*M_PI/N)-1., sin(x*M_PI/N)); // instead of cos(x*M_PI/N)-1. + sin(x*M_PI/N) * 1i + //exp(i.x.pi/N)-1 + } + } diff --git a/vcpkg/ports/tfhe/portfile.cmake b/vcpkg/ports/tfhe/portfile.cmake new file mode 100644 index 0000000..aa98703 --- /dev/null +++ b/vcpkg/ports/tfhe/portfile.cmake @@ -0,0 +1,23 @@ +vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports Unix" ON_TARGET "Windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tfhe/tfhe + REF v1.0.1 + SHA512 1d625eb00bf6a36fd86cfad8e1763d7030dd73d68f2422d1678f51352708e9275f0ce69c23fb0d9fec30fba00e1ca4a3df29fb4fc6dfe3b7f16e0d350aa7f170 + HEAD_REF master + PATCHES + mac-fix.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/src + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/tgbot-cpp/CONTROL b/vcpkg/ports/tgbot-cpp/CONTROL new file mode 100644 index 0000000..3c83987 --- /dev/null +++ b/vcpkg/ports/tgbot-cpp/CONTROL @@ -0,0 +1,5 @@ +Source: tgbot-cpp +Version: 1.2.1 +Homepage: https://github.com/reo7sp/tgbot-cpp +Description: C++14 library for Telegram bot API. +Build-Depends: boost-algorithm, boost-asio, boost-lexical-cast, boost-property-tree, boost-system, boost-test, boost-variant, curl, openssl, zlib diff --git a/vcpkg/ports/tgbot-cpp/portfile.cmake b/vcpkg/ports/tgbot-cpp/portfile.cmake new file mode 100644 index 0000000..859b5d0 --- /dev/null +++ b/vcpkg/ports/tgbot-cpp/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO reo7sp/tgbot-cpp + REF v1.2.1 + SHA512 b094f9c80dd15b7930b7d7250169b3199d9c84b84826adececa8237111f5ba384ec790dbe969999f362ca2fb35b93950d053777ce5f167007e33c3e4eb133453 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/tgc/CMakeLists.txt b/vcpkg/ports/tgc/CMakeLists.txt new file mode 100644 index 0000000..20f5f0a --- /dev/null +++ b/vcpkg/ports/tgc/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.14) + +project(tgc LANGUAGES C) + +include(GNUInstallDirs) + +add_library(tgc tgc.c) + +target_include_directories( + tgc + PUBLIC + $ + $ +) + +set_target_properties(tgc PROPERTIES PUBLIC_HEADER tgc.h) + +install(TARGETS tgc EXPORT unofficial-tgc-config) + +install( + EXPORT unofficial-tgc-config + NAMESPACE unofficial::tgc:: + DESTINATION share/unofficial-tgc + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) diff --git a/vcpkg/ports/tgc/CONTROL b/vcpkg/ports/tgc/CONTROL new file mode 100644 index 0000000..7961312 --- /dev/null +++ b/vcpkg/ports/tgc/CONTROL @@ -0,0 +1,4 @@ +Source: tgc +Version: 2019-08-11-1 +Description: A tiny garbage collector for C +Homepage: https://github.com/orangeduck/tgc diff --git a/vcpkg/ports/tgc/portfile.cmake b/vcpkg/ports/tgc/portfile.cmake new file mode 100644 index 0000000..4efe63c --- /dev/null +++ b/vcpkg/ports/tgc/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO orangeduck/tgc + REF 35207051557c79ea25942c021fb18856c72af8e3 + SHA512 d56153cfb00ad4941c7c88e6cc54b54812466e95b61581e9f71e41b6200746e2143344f0d292032e92f7c90eaa60d0df91120b36e3aad0e354836df6d28e2c35 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +vcpkg_test_cmake(PACKAGE_NAME unofficial-${PORT}) diff --git a/vcpkg/ports/tgui/CONTROL b/vcpkg/ports/tgui/CONTROL new file mode 100644 index 0000000..1332120 --- /dev/null +++ b/vcpkg/ports/tgui/CONTROL @@ -0,0 +1,7 @@ +Source: tgui +Version: 0.8.7 +Description: TGUI is an easy to use, cross-platform, C++ GUI for SFML. +Build-Depends: sfml + +Feature: tool +Description: Build GUI builder diff --git a/vcpkg/ports/tgui/portfile.cmake b/vcpkg/ports/tgui/portfile.cmake new file mode 100644 index 0000000..9d9e90b --- /dev/null +++ b/vcpkg/ports/tgui/portfile.cmake @@ -0,0 +1,60 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO texus/TGUI + REF 5ee202f93a280744a2bbf92c12f693510f69dbcf # v0.8.7 + SHA512 cc1e360add00fa6b6a2b44b83b82715dcbfa3f47768dd465acbd7df9fac1fc5283d63468cdf60557360448c07fb6ba36eb24c53f53883b04495f478c62b80718 + HEAD_REF 0.8 +) + +set(TGUI_SHARE_PATH ${CURRENT_PACKAGES_DIR}/share/tgui) +set(TGUI_TOOLS_PATH ${CURRENT_PACKAGES_DIR}/tools/tgui) + +# Enable static build +file(REMOVE "${SOURCE_PATH}/cmake/Modules/FindSFML.cmake") +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" TGUI_SHARED_LIBS) + +# gui-builder +set(BUILD_GUI_BUILDER OFF) +if("tool" IN_LIST FEATURES) + set(BUILD_GUI_BUILDER ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + DISABLE_PARALLEL_CONFIGURE + PREFER_NINJA + OPTIONS + -DTGUI_BUILD_GUI_BUILDER=${BUILD_GUI_BUILDER} + -DTGUI_MISC_INSTALL_PREFIX=${TGUI_SHARE_PATH} + -DTGUI_SHARED_LIBS=${TGUI_SHARED_LIBS} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/TGUI) +vcpkg_copy_pdbs() + +if(BUILD_GUI_BUILDER) + set(EXECUTABLE_SUFFIX "") + if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(EXECUTABLE_SUFFIX ".exe") + endif() + + message(STATUS "Check for: ${TGUI_SHARE_PATH}/gui-builder/gui-builder${EXECUTABLE_SUFFIX}") + if(EXISTS "${TGUI_SHARE_PATH}/gui-builder/gui-builder${EXECUTABLE_SUFFIX}") + file(MAKE_DIRECTORY "${TGUI_TOOLS_PATH}") + file(RENAME + "${TGUI_SHARE_PATH}/gui-builder/gui-builder${EXECUTABLE_SUFFIX}" + "${TGUI_TOOLS_PATH}/gui-builder${EXECUTABLE_SUFFIX}") + # Need to copy `resources` and `themes` directories + file(COPY "${TGUI_SHARE_PATH}/gui-builder/resources" DESTINATION "${TGUI_TOOLS_PATH}") + file(COPY "${TGUI_SHARE_PATH}/gui-builder/themes" DESTINATION "${TGUI_TOOLS_PATH}") + file(REMOVE_RECURSE "${TGUI_SHARE_PATH}/gui-builder") + vcpkg_copy_tool_dependencies("${TGUI_TOOLS_PATH}") + endif() +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/TGUI/nanosvg") + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/license.txt" DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/theia/CONTROL b/vcpkg/ports/theia/CONTROL new file mode 100644 index 0000000..5214680 --- /dev/null +++ b/vcpkg/ports/theia/CONTROL @@ -0,0 +1,6 @@ +Source: theia +Version: 0.8 +Port-Version: 3 +Build-Depends: flann, cereal, ceres[suitesparse], openimageio, glew, freeglut (!osx) +Homepage: https://github.com/sweeneychris/TheiaSfM +Description: An open source library for multiview geometry and structure from motion diff --git a/vcpkg/ports/theia/fix-external-dependencies.patch b/vcpkg/ports/theia/fix-external-dependencies.patch new file mode 100644 index 0000000..fc6e540 --- /dev/null +++ b/vcpkg/ports/theia/fix-external-dependencies.patch @@ -0,0 +1,458 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9c1b150..1adbfed 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -105,10 +105,10 @@ add_definitions(-DTHEIA_DATA_DIR="${CMAKE_SOURCE_DIR}/data") + + # Eigen + set(MIN_EIGEN_VERSION 3.2.0) +-find_package(Eigen ${MIN_EIGEN_VERSION} REQUIRED) +-if (EIGEN_FOUND) +- message("-- Found Eigen version ${EIGEN_VERSION}: ${EIGEN_INCLUDE_DIRS}") +-endif (EIGEN_FOUND) ++find_package(Eigen3 ${MIN_EIGEN_VERSION} REQUIRED) ++if (EIGEN3_FOUND) ++ message("-- Found Eigen version ${EIGEN3_VERSION}: ${EIGEN3_INCLUDE_DIRS}") ++endif (EIGEN3_FOUND) + + # Use a larger inlining threshold for Clang, since it hobbles Eigen, + # resulting in an unreasonably slow version of the blas routines. The +@@ -129,70 +129,27 @@ endif () + + # GFlags. The namespace patch is borrow from Ceres Solver (see license in + # FindGflags.cmake) ++message("-- Check for Google Flags") + find_package(Gflags REQUIRED) +-if (GFLAGS_FOUND) +- message("-- Found Google Flags: ${GFLAGS_INCLUDE_DIRS} in namespace: ${GFLAGS_NAMESPACE}") +- add_definitions(-DTHEIA_GFLAGS_NAMESPACE=${GFLAGS_NAMESPACE}) +-else (GFLAGS_FOUND) +- message(FATAL_ERROR "Can't find Google FLAGS.") +-endif (GFLAGS_FOUND) + + # Google Logging + message("-- Check for Google Log") + find_package(Glog REQUIRED) +-if (GLOG_FOUND) +- message("-- Found Google Logging: ${GLOG_INCLUDE_DIRS}") +-else (GLOG_FOUND) +- message(FATAL_ERROR "Can't find Google Logging. Please set GLOG_INCLUDE_DIR & " +- "GLOG_LIBRARY") +-endif (GLOG_FOUND) ++ ++# Flann ++message("-- Check for Flann") ++find_package(Flann REQUIRED) + + # Ceres + message("-- Check for Ceres") + find_package(Ceres REQUIRED SuiteSparse) +-if (CERES_FOUND) +- message("-- Found Ceres: ${CERES_INCLUDE_DIRS}") +-else (CERES_FOUND) +- message(FATAL_ERROR "Can't find Ceres. Please set CERES_INCLUDE_DIR & " +- "CERES_LIBRARY") +-endif (CERES_FOUND) + + # OpenImageIO + message("-- Check for OpenImageIO") + find_package(OpenImageIO REQUIRED) +-if (OPENIMAGEIO_FOUND) +- message("-- Found OpenImageIO: ${OPENIMAGEIO_INCLUDE_DIRS}") +-else (OPENIMAGEIO_FOUND) +- message(FATAL_ERROR "Can't find OpenImageIO. Please set OPENIMAGEIO_INCLUDE_DIR & " +- "OPENIMAGEIO_LIBRARY") +-endif (OPENIMAGEIO_FOUND) + + # Suitesparse + find_package(SuiteSparse REQUIRED) +-if (SUITESPARSE_FOUND) +- # On Ubuntu the system install of SuiteSparse (v3.4.0) up to at least +- # Ubuntu 13.10 cannot be used to link shared libraries. +- if (BUILD_SHARED_LIBS AND +- SUITESPARSE_IS_BROKEN_SHARED_LINKING_UBUNTU_SYSTEM_VERSION) +- message(FATAL_ERROR "You are attempting to build Theia as a shared " +- "library on Ubuntu using a system package install of SuiteSparse " +- "3.4.0. This package is broken and does not support the " +- "construction of shared libraries (you can still build Theia as " +- "a static library). If you wish to build a shared version of Theia " +- "you should uninstall the system install of SuiteSparse " +- "(libsuitesparse-dev) and perform a source install of SuiteSparse " +- "(we recommend that you use the latest version), " +- "see http://theia-solver.org/building.html for more information.") +- endif (BUILD_SHARED_LIBS AND +- SUITESPARSE_IS_BROKEN_SHARED_LINKING_UBUNTU_SYSTEM_VERSION) +- message("-- Found SuiteSparse ${SUITESPARSE_VERSION}") +- add_definitions(-DTHEIA_SUITESPARSE_VERSION="${SUITESPARSE_VERSION}") +-else (SUITESPARSE_FOUND) +- # Disable use of SuiteSparse if it cannot be found and continue. +- message(FATAL ERROR "Can't find SuiteSparse. This library is required " +- "for bundle adjustment and for solving convex optimization problems. " +- "Please set SUITESPARSE_INCLUDE_DIR & SUITESPARSE_LIBRARY") +-endif (SUITESPARSE_FOUND) + + include_directories( + include +@@ -225,24 +182,19 @@ include_directories( + libraries/spectra + ${akaze_SOURCE_DIR} + ${akaze_INCLUDE_DIR} +- ${cereal_SOURCE_DIR} +- ${cereal_SOURCE_DIR}/include +- ${flann_SOURCE_DIR} +- ${flann_SOURCE_DIR}/src/cpp +- ${gtest_SOURCE_DIR}/include +- ${gtest_SOURCE_DIR} + ${optimo_SOURCE_DIR} + ${statx_SOURCE_DIR} + ${stlplus3_SOURCE_DIR} + ${vlfeat_SOURCE_DIR} +- ${visual_sfm_SOURCE_DIR}) ++ ${visual_sfm_SOURCE_DIR} ++) + + list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") + include(OptimizeTheiaCompilerFlags) + optimizetheiacompilerflags() + + add_subdirectory(src/theia) +-add_subdirectory(applications) ++#add_subdirectory(applications) + + if (BUILD_DOCUMENTATION) + message("-- Documentation building is enabled") +@@ -260,7 +212,13 @@ install(FILES ${THEIA_HDRS} DESTINATION include/theia) + file(GLOB_RECURSE THEIA_INTERNAL_HDRS ${CMAKE_SOURCE_DIR}/src/theia/*.h) + install(DIRECTORY src/theia/ DESTINATION include/theia FILES_MATCHING PATTERN "*.h") + +-install(DIRECTORY libraries/ DESTINATION include/theia/libraries FILES_MATCHING PATTERN "*.h*") ++install(DIRECTORY libraries/akaze/ DESTINATION include/theia/libraries/akaze FILES_MATCHING PATTERN "*.h*") ++install(DIRECTORY libraries/optimo/ DESTINATION include/theia/libraries/optimo FILES_MATCHING PATTERN "*.h*") ++install(DIRECTORY libraries/spectra/ DESTINATION include/theia/libraries/spectra FILES_MATCHING PATTERN "*.h*") ++install(DIRECTORY libraries/statx/ DESTINATION include/theia/libraries/statx FILES_MATCHING PATTERN "*.h*") ++install(DIRECTORY libraries/stlplus3/ DESTINATION include/theia/libraries/stlplus3 FILES_MATCHING PATTERN "*.h*") ++install(DIRECTORY libraries/visual_sfm/ DESTINATION include/theia/libraries/visual_sfm FILES_MATCHING PATTERN "*.h*") ++install(DIRECTORY libraries/vlfeat/ DESTINATION include/theia/libraries/vlfeat FILES_MATCHING PATTERN "*.h*") + + # Add an uninstall target to remove all installed files. + configure_file("${CMAKE_SOURCE_DIR}/cmake/uninstall.cmake.in" +@@ -272,17 +230,10 @@ add_custom_target(uninstall + + # Set up install directories. INCLUDE_INSTALL_DIR, LIB_INSTALL_DIR and + # CMAKECONFIG_INSTALL_DIR must not be absolute paths. +-if (WIN32) +- set(INCLUDE_INSTALL_DIR Include) +- set(LIB_INSTALL_DIR Lib) +- set(CMAKECONFIG_INSTALL_DIR CMake) +- set(RELATIVE_CMAKECONFIG_INSTALL_DIR CMake) +-else () +- set(INCLUDE_INSTALL_DIR include) +- set(LIB_INSTALL_DIR lib) +- set(CMAKECONFIG_INSTALL_DIR share/Theia) +- set(RELATIVE_CMAKECONFIG_INSTALL_DIR share/Theia) +-endif () ++set(INCLUDE_INSTALL_DIR include) ++set(LIB_INSTALL_DIR lib) ++set(CMAKECONFIG_INSTALL_DIR share/theia) ++set(RELATIVE_CMAKECONFIG_INSTALL_DIR share/theia) + + # This "exports" all targets which have been put into the export set + # "TheiaExport". This means that CMake generates a file with the given +@@ -319,9 +270,5 @@ configure_file("${CMAKE_SOURCE_DIR}/cmake/TheiaConfigVersion.cmake.in" + # in the public API of Theia and should thus be present in THEIA_INCLUDE_DIRS. + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/TheiaConfig.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/TheiaConfigVersion.cmake" +- "${CMAKE_SOURCE_DIR}/cmake/FindEigen.cmake" +- "${CMAKE_SOURCE_DIR}/cmake/FindGlog.cmake" +- "${CMAKE_SOURCE_DIR}/cmake/FindGflags.cmake" +- "${CMAKE_SOURCE_DIR}/cmake/FindOpenImageIO.cmake" +- "${CMAKE_SOURCE_DIR}/cmake/FindSuiteSparse.cmake" ++ "${CMAKE_SOURCE_DIR}/cmake/FindOpenImageIO.cmake" + DESTINATION ${CMAKECONFIG_INSTALL_DIR}) +diff --git a/cmake/TheiaConfig.cmake.in b/cmake/TheiaConfig.cmake.in +index a3ea187..7e9d912 100644 +--- a/cmake/TheiaConfig.cmake.in ++++ b/cmake/TheiaConfig.cmake.in +@@ -124,14 +124,7 @@ list(APPEND CERES_INCLUDE_DIR_HINTS @CERES_INCLUDE_DIR@) + get_filename_component(THEIA_BUILD_CERES_LIBRARY_DIR @CERES_LIBRARIES@ PATH) + list(APPEND CERES_LIBRARY_DIR_HINTS ${THEIA_BUILD_CERES_LIBRARY_DIR}) + # Search quietly s/t we control the timing of the error message if not found. +-find_package(Ceres QUIET) +-if (CERES_FOUND) +- message(STATUS "Found required Theia dependency: " +- "Ceres in ${CERES_INCLUDE_DIRS}") +-else (CERES_FOUND) +- theia_report_not_found("Missing required Theia " +- "dependency: Ceres, please set CERES_INCLUDE_DIR.") +-endif (CERES_FOUND) ++find_package(Ceres REQUIRED) + list(APPEND THEIA_INCLUDE_DIRS ${CERES_INCLUDE_DIRS}) + + # Glog. +@@ -140,64 +133,19 @@ list(APPEND GLOG_INCLUDE_DIR_HINTS @GLOG_INCLUDE_DIR@) + get_filename_component(THEIA_BUILD_GLOG_LIBRARY_DIR @GLOG_LIBRARY@ PATH) + list(APPEND GLOG_LIBRARY_DIR_HINTS ${THEIA_BUILD_GLOG_LIBRARY_DIR}) + # Search quietly s/t we control the timing of the error message if not found. +-find_package(Glog QUIET) +-if (GLOG_FOUND) +- message(STATUS "Found required Theia dependency: " +- "Glog in ${GLOG_INCLUDE_DIRS}") +-else (GLOG_FOUND) +- theia_report_not_found("Missing required Theia " +- "dependency: Glog, please set GLOG_INCLUDE_DIR.") +-endif (GLOG_FOUND) ++find_package(Glog REQUIRED) + list(APPEND THEIA_INCLUDE_DIRS ${GLOG_INCLUDE_DIRS}) + + # GFlags. The namespace patch is borrow from Ceres Solver (see license in + # FindGflags.cmake) +-find_package(Gflags QUIET) +-if (GFLAGS_FOUND) +- message(STATUS "Found required Theia dependency: Google Flags in " +- "${GFLAGS_INCLUDE_DIRS} in namespace: ${GFLAGS_NAMESPACE}") +- add_definitions(-DTHEIA_GFLAGS_NAMESPACE=${GFLAGS_NAMESPACE}) +-else (GFLAGS_FOUND) +- theia_report_not_found("Missing required Theia dependency: Google Flags, please set " +- "GFLAGS_INCLUDE_DIR.") +-endif (GFLAGS_FOUND) ++find_package(Gflags REQUIRED) + list(APPEND THEIA_INCLUDE_DIRS ${GFLAGS_INCLUDE_DIRS}) + + # OpenImageIO +-find_package(OpenImageIO QUIET) +-if (OPENIMAGEIO_FOUND) +- message(STATUS "Found Theia dependency: OpenImageIO in ${OPENIMAGEIO_INCLUDE_DIRS}") +-else (OPENIMAGEIO_FOUND) +- theia_report_not_found("Missing required Theia dependency: OpenImageIO. Please set " +- "OPENIMAGEIO_INCLUDE_DIR & OPENIMAGEIO_LIBRARY") +-endif (OPENIMAGEIO_FOUND) ++find_package(OpenImageIO REQUIRED) + list(APPEND THEIA_INCLUDE_DIRS ${OPENIMAGEIO_INCLUDE_DIRS}) + +-find_package(SuiteSparse QUIET) +-if (SUITESPARSE_FOUND) +- # On Ubuntu the system install of SuiteSparse (v3.4.0) up to at least +- # Ubuntu 13.10 cannot be used to link shared libraries. +- if (BUILD_SHARED_LIBS AND +- SUITESPARSE_IS_BROKEN_SHARED_LINKING_UBUNTU_SYSTEM_VERSION) +- theia_report_not_found("You are attempting to build Theia as a shared " +- "library on Ubuntu using a system package install of SuiteSparse " +- "3.4.0. This package is broken and does not support the " +- "construction of shared libraries (you can still build Theia as " +- "a static library). If you wish to build a shared version of Theia " +- "you should uninstall the system install of SuiteSparse " +- "(libsuitesparse-dev) and perform a source install of SuiteSparse " +- "(we recommend that you use the latest version), " +- "see http://theia-solver.org/building.html for more information.") +- endif (BUILD_SHARED_LIBS AND +- SUITESPARSE_IS_BROKEN_SHARED_LINKING_UBUNTU_SYSTEM_VERSION) +- message("-- Found SuiteSparse ${SUITESPARSE_VERSION}") +- add_definitions(-DTHEIA_SUITESPARSE_VERSION="${SUITESPARSE_VERSION}") +-else (SUITESPARSE_FOUND) +- # Disable use of SuiteSparse if it cannot be found and continue. +- theia_report_not_found("Can't find SuiteSparse. This library is required " +- "for bundle adjustment and for solving convex optimization problems. " +- "Please set SUITESPARSE_INCLUDE_DIR & SUITESPARSE_LIBRARY") +-endif (SUITESPARSE_FOUND) ++find_package(SuiteSparse REQUIRED) + list(APPEND THEIA_INCLUDE_DIRS ${SUITESPARSE_INCLUDE_DIRS}) + + # Import exported Theia targets. +@@ -207,22 +155,24 @@ endif (NOT TARGET theia AND NOT Theia_BINARY_DIR) + # Set the expected XX_LIBRARIES variable for FindPackage(). + set(THEIA_LIBRARIES theia) + ++find_package(cereal REQUIRED) ++list(APPEND THEIA_LIBRARIES cereal) ++ ++find_package(Flann REQUIRED) ++list(APPEND THEIA_INCLUDE_DIRS ${FLANN_INCLUDE_DIR}) ++list(APPEND THEIA_LIBRARIES ${FLANN_LIBRARY}) ++ + # Add the libraries included with the distribution. + set(THEIA_INTERNAL_LIB_PREFIX ${THEIA_INCLUDE_DIR}/theia/libraries) + set(THEIA_INTERNAL_LIBS_INCLUDES + ${THEIA_INTERNAL_LIB_PREFIX} + ${THEIA_INTERNAL_LIB_PREFIX}/akaze +- ${THEIA_INTERNAL_LIB_PREFIX}/cereal +- ${THEIA_INTERNAL_LIB_PREFIX}/cereal/include +- ${THEIA_INTERNAL_LIB_PREFIX}/flann +- ${THEIA_INTERNAL_LIB_PREFIX}/gtest +- ${THEIA_INTERNAL_LIB_PREFIX}/gtest/include + ${THEIA_INTERNAL_LIB_PREFIX}/optimo + ${THEIA_INTERNAL_LIB_PREFIX}/spectra + ${THEIA_INTERNAL_LIB_PREFIX}/statx + ${THEIA_INTERNAL_LIB_PREFIX}/stlplus3 +- ${THEIA_INTERNAL_LIB_PREFIX}/vlfeat +- ${THEIA_INTERNAL_LIB_PREFIX}/visual_sfm) ++ ${THEIA_INTERNAL_LIB_PREFIX}/visual_sfm ++ ${THEIA_INTERNAL_LIB_PREFIX}/vlfeat) + + list(APPEND THEIA_INCLUDE_DIRS ${THEIA_INTERNAL_LIBS_INCLUDES}) + +diff --git a/libraries/CMakeLists.txt b/libraries/CMakeLists.txt +index 84f3829..f88d75a 100644 +--- a/libraries/CMakeLists.txt ++++ b/libraries/CMakeLists.txt +@@ -5,12 +5,6 @@ endif (${BUILD_TESTING}) + # AKAZE feature extractor. + add_subdirectory(akaze) + +-# Cereal for portable IO. +-add_subdirectory(cereal) +- +-# Flann for fast approximate nearest neighbor searches. +-add_subdirectory(flann) +- + # Add Optimo. + add_subdirectory(optimo) + +@@ -24,4 +18,4 @@ add_subdirectory(stlplus3) + add_subdirectory(vlfeat) + + # Add VisualSfM files. +-add_subdirectory(visual_sfm) +\ No newline at end of file ++add_subdirectory(visual_sfm) +diff --git a/libraries/optimo/CMakeLists.txt b/libraries/optimo/CMakeLists.txt +index 80f5e5f..ea57f1b 100644 +--- a/libraries/optimo/CMakeLists.txt ++++ b/libraries/optimo/CMakeLists.txt +@@ -67,11 +67,11 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) + + # Locations to search for Eigen + # Eigen +-find_package(Eigen REQUIRED) +-if (EIGEN_FOUND) +- message("-- Found Eigen version ${EIGEN_VERSION}: ${EIGEN_INCLUDE_DIRS}") +-endif (EIGEN_FOUND) +-include_directories(${EIGEN_INCLUDE_DIRS}) ++find_package(Eigen3 REQUIRED) ++if (EIGEN3_FOUND) ++ message("-- Found Eigen version ${EIGEN3_VERSION_STRING}: ${EIGEN3_INCLUDE_DIRS}") ++endif (EIGEN3_FOUND) ++include_directories(${EIGEN3_INCLUDE_DIRS}) + + # Setting CXX FLAGS appropriately. The code below was inspired from + # Google CERES and modified for this library. +diff --git a/libraries/statx/CMakeLists.txt b/libraries/statx/CMakeLists.txt +index 23b9e49..c58a550 100644 +--- a/libraries/statx/CMakeLists.txt ++++ b/libraries/statx/CMakeLists.txt +@@ -72,11 +72,11 @@ message("-- Default Install prefix: ${CMAKE_INSTALL_PREFIX}") + option(STATX_WITH_CERES "Enables GEV parameter estimation using Ceres" ON) + + # Eigen +-find_package(Eigen REQUIRED) +-if (EIGEN_FOUND) +- message("-- Found Eigen version ${EIGEN_VERSION}: ${EIGEN_INCLUDE_DIRS}") +-endif (EIGEN_FOUND) +-include_directories(${EIGEN_INCLUDE_DIRS}) ++find_package(Eigen3 REQUIRED) ++if (EIGEN3_FOUND) ++ message("-- Found Eigen version ${EIGEN3_VERSION_STRING}: ${EIGEN3_INCLUDE_DIRS}") ++endif (EIGEN3_FOUND) ++include_directories(${EIGEN3_INCLUDE_DIRS}) + + # Google Flags + find_package(Gflags REQUIRED) +@@ -103,7 +103,11 @@ if(STATX_WITH_CERES) + endif(CERES_FOUND) + + # BLAS +- find_package(BLAS REQUIRED) ++ if(UNIX AND NOT APPLE) ++ find_package(OpenBLAS REQUIRED) ++ else() ++ find_package(BLAS REQUIRED) ++ endif() + + # LAPACK + find_package(LAPACK REQUIRED) +@@ -129,7 +133,6 @@ set(XGAMMA_FILES ${XGAMMA_FUNCS}/asa121.cpp ${XGAMMA_FUNCS}/asa103.cpp) + + # Setting CXX FLAGS appropriately. The code below was inspired from + # Google CERES and modified for this library. +-set (CMAKE_BUILD_TYPE Release) + set (STATX_CXX_FLAGS) + + if (CMAKE_BUILD_TYPE STREQUAL "Release") +diff --git a/libraries/vlfeat/CMakeLists.txt b/libraries/vlfeat/CMakeLists.txt +index 7f4ffc7..15bca12 100644 +--- a/libraries/vlfeat/CMakeLists.txt ++++ b/libraries/vlfeat/CMakeLists.txt +@@ -18,14 +18,19 @@ set(vl_sources + vl/random.c + vl/sift.c + vl/vlad.c) ++ + set_source_files_properties(${vl_sources} PROPERTIES LANGUAGE C) + ++add_library(vlfeat ${vl_sources}) ++ + if (MSVC) +- add_definitions(-DVL_BUILD_DLL) +- add_definitions(-DVL_DISABLE_SSE2) ++ if(BUILD_SHARED_LIBS) ++ target_compile_definitions(vlfeat PRIVATE VL_BUILD_DLL) ++ target_compile_definitions(vlfeat INTERFACE BUILD_DLL) ++ endif() ++ target_compile_definitions(vlfeat PUBLIC VL_DISABLE_SSE2) + endif (MSVC) + +-add_library(vlfeat SHARED ${vl_sources}) + install(TARGETS vlfeat + EXPORT TheiaExport + RUNTIME DESTINATION bin +diff --git a/libraries/vlfeat/vl/host.h b/libraries/vlfeat/vl/host.h +index 293fe1f..0ea3d42 100644 +--- a/libraries/vlfeat/vl/host.h ++++ b/libraries/vlfeat/vl/host.h +@@ -312,27 +312,31 @@ defined(__DOXYGEN__) + #if defined(VL_COMPILER_MSC) & ! defined(__DOXYGEN__) + # define VL_UNUSED + # define VL_INLINE static __inline +-# define snprintf _snprintf + # define isnan _isnan +-# ifdef VL_BUILD_DLL ++# if defined(VL_BUILD_DLL) + # ifdef __cplusplus + # define VL_EXPORT extern "C" __declspec(dllexport) + # else + # define VL_EXPORT extern __declspec(dllexport) + # endif +-# else ++# elif defined(VL_DLL) + # ifdef __cplusplus + # define VL_EXPORT extern "C" __declspec(dllimport) + # else + # define VL_EXPORT extern __declspec(dllimport) + # endif ++# else ++# ifdef __cplusplus ++# define VL_EXPORT extern "C" ++# else ++# define VL_EXPORT extern ++# endif + # endif + #endif + + #if defined(VL_COMPILER_LCC) & ! defined(__DOXYGEN__) + # define VL_UNUSED + # define VL_INLINE static __inline +-# define snprintf _snprintf + # define isnan _isnan + VL_INLINE float fabsf(float x) { return (float) fabs((double) x) ; } + # ifdef VL_BUILD_DLL +diff --git a/src/theia/CMakeLists.txt b/src/theia/CMakeLists.txt +index 6830f71..768586d 100644 +--- a/src/theia/CMakeLists.txt ++++ b/src/theia/CMakeLists.txt +@@ -209,7 +209,6 @@ set(THEIA_LIBRARY_DEPENDENCIES + ${SUITESPARSE_LIBRARIES} + ${OPENIMAGEIO_LIBRARIES} + akaze +- flann_cpp + statx + stlplus3 + vlfeat diff --git a/vcpkg/ports/theia/portfile.cmake b/vcpkg/ports/theia/portfile.cmake new file mode 100644 index 0000000..77b4c11 --- /dev/null +++ b/vcpkg/ports/theia/portfile.cmake @@ -0,0 +1,43 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sweeneychris/TheiaSfM + REF v0.8 + SHA512 2f620389c415badec36f4b44be0378fc62761dd6b2ee4cd7033b13573c372f098e248553575fb2cceb757b1ca00e86a11c67e03b6077e0a4b0f8797065746312 + HEAD_REF master + PATCHES + fix-external-dependencies.patch +) + +file(REMOVE ${SOURCE_PATH}/cmake/FindSuiteSparse.cmake) +file(REMOVE ${SOURCE_PATH}/cmake/FindGflags.cmake) +file(REMOVE ${SOURCE_PATH}/cmake/FindGlog.cmake) +file(REMOVE ${SOURCE_PATH}/cmake/FindEigen.cmake) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF + -DTHEIA_USE_EXTERNAL_CEREAL=ON + -DTHEIA_USE_EXTERNAL_FLANN=ON +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() +vcpkg_copy_pdbs() + +# Clean +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/optimo) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/optimo) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/theia/libraries/akaze/cimg/cmake-modules) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/theia/libraries/akaze/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/theia/libraries/akaze/datasets) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/theia/libraries/spectra/doxygen) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(COPY ${SOURCE_PATH}/data/camera_sensor_database_license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/think-cell-range/CONTROL b/vcpkg/ports/think-cell-range/CONTROL new file mode 100644 index 0000000..907280c --- /dev/null +++ b/vcpkg/ports/think-cell-range/CONTROL @@ -0,0 +1,5 @@ +Source: think-cell-range +Version: 498839d-1 +Description: think-cell's range library +Homepage: https://github.com/think-cell/range +Build-Depends: boost diff --git a/vcpkg/ports/think-cell-range/portfile.cmake b/vcpkg/ports/think-cell-range/portfile.cmake new file mode 100644 index 0000000..d1acc2c --- /dev/null +++ b/vcpkg/ports/think-cell-range/portfile.cmake @@ -0,0 +1,17 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO think-cell/range + REF 498839d41519d38bb81089f7d0f517026bd042cc + SHA512 1292ba4dd994aab2cb620c24ebd03437a47e426368ed803579dad13a3fa52762cefe42c77c9921d5c4bcbd6592775714191de63097c230e50f9b59b9498005e5 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/range DESTINATION ${CURRENT_PACKAGES_DIR}/include/think-cell FILES_MATCHING PATTERN "*.h") + +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/think-cell-range) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/think-cell-range/COPYING ${CURRENT_PACKAGES_DIR}/share/think-cell-range/copyright) +file(COPY ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/think-cell-range) + +file(COPY ${SOURCE_PATH}/range/range.example.cpp DESTINATION ${CURRENT_PACKAGES_DIR}/share/think-cell-range) diff --git a/vcpkg/ports/thor/CONTROL b/vcpkg/ports/thor/CONTROL new file mode 100644 index 0000000..5391f5d --- /dev/null +++ b/vcpkg/ports/thor/CONTROL @@ -0,0 +1,4 @@ +Source: thor +Version: 2.0-3 +Description: Extends the multimedia library SFML with higher-level features +Build-Depends: sfml, aurora diff --git a/vcpkg/ports/thor/portfile.cmake b/vcpkg/ports/thor/portfile.cmake new file mode 100644 index 0000000..19f65f8 --- /dev/null +++ b/vcpkg/ports/thor/portfile.cmake @@ -0,0 +1,58 @@ +include(vcpkg_common_functions) + +vcpkg_from_github(ARCHIVE + OUT_SOURCE_PATH SOURCE_PATH + REPO Bromeon/Thor + REF v2.0 + SHA512 634fa5286405d9a8a837c082ace98bbb02e609521418935855b9e2fcad57003dbe35088bd771cf6a9292e55d3787f7e463d7a4cca0d0f007509de2520d9a8cf9 + HEAD_REF master + PATCHES "${CMAKE_CURRENT_LIST_DIR}/sfml-no-depend-libjpeg.patch" +) + +file(REMOVE_RECURSE ${SOURCE_PATH}/extlibs) +file(COPY ${CURRENT_INSTALLED_DIR}/include/Aurora DESTINATION ${SOURCE_PATH}/extlibs/aurora/include) +file(WRITE "${SOURCE_PATH}/extlibs/aurora/License.txt") + +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" THOR_STATIC_STD_LIBS) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" THOR_SHARED_LIBS) + +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_install_cmake() + +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" +) + +if(LICENSE) + file(REMOVE ${LICENSE}) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/Aurora) +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +endif() + +file(INSTALL ${SOURCE_PATH}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/thor RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/thor/sfml-no-depend-libjpeg.patch b/vcpkg/ports/thor/sfml-no-depend-libjpeg.patch new file mode 100644 index 0000000..7fcf73f --- /dev/null +++ b/vcpkg/ports/thor/sfml-no-depend-libjpeg.patch @@ -0,0 +1,16 @@ +diff --git a/cmake/Modules/FindSFML.cmake b/cmake/Modules/FindSFML.cmake +index 48873ef..a1834f6 100644 +--- a/cmake/Modules/FindSFML.cmake ++++ b/cmake/Modules/FindSFML.cmake +@@ -312,10 +312,9 @@ if(SFML_STATIC_LIBRARIES) + + # find libraries + find_sfml_dependency(FREETYPE_LIBRARY "FreeType" freetype) +- find_sfml_dependency(JPEG_LIBRARY "libjpeg" jpeg) + + # update the list +- set(SFML_GRAPHICS_DEPENDENCIES ${FREETYPE_LIBRARY} ${JPEG_LIBRARY}) ++ set(SFML_GRAPHICS_DEPENDENCIES ${FREETYPE_LIBRARY}) + set(SFML_DEPENDENCIES ${SFML_GRAPHICS_DEPENDENCIES} ${SFML_DEPENDENCIES}) + endif() + diff --git a/vcpkg/ports/threadpool/CONTROL b/vcpkg/ports/threadpool/CONTROL new file mode 100644 index 0000000..df98da8 --- /dev/null +++ b/vcpkg/ports/threadpool/CONTROL @@ -0,0 +1,6 @@ +Source: threadpool +Version: 0.2.5 +Port-Version: 1 +Homepage: http://threadpool.sourceforge.net/ +Description: threadpool is a cross-platform C++ thread pool library. It provides a convenient way for dispatching asynchronous tasks and can be easily customized. threadpool is based on the high-quality Boost source libraries. +Build-Depends: boost-thread diff --git a/vcpkg/ports/threadpool/portfile.cmake b/vcpkg/ports/threadpool/portfile.cmake new file mode 100644 index 0000000..05d47be --- /dev/null +++ b/vcpkg/ports/threadpool/portfile.cmake @@ -0,0 +1,14 @@ +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO threadpool/threadpool + REF "0.2.5 (Stable)" + SHA512 961576b619e5227098fa37a3c8d903128b3c2a9cf1e55c057c6f9126062bcccfa6fe2510b4e8ee5d1a0e3d0425f0077c50eccad2120a423f69e2705460780e7c + FILENAME "threadpool-0_2_5-src.zip" +) + +file(INSTALL ${SOURCE_PATH}/threadpool/boost + DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${SOURCE_PATH}/threadpool/COPYING + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright) diff --git a/vcpkg/ports/thrift/CONTROL b/vcpkg/ports/thrift/CONTROL new file mode 100644 index 0000000..2916e3e --- /dev/null +++ b/vcpkg/ports/thrift/CONTROL @@ -0,0 +1,5 @@ +Source: thrift +Version: 0.13.0 +Build-Depends: zlib, libevent, openssl, boost-range, boost-smart-ptr, boost-date-time, boost-locale, boost-scope-exit +Homepage: https://github.com/apache/thrift +Description: Apache Thrift is a software project spanning a variety of programming languages and use cases. Our goal is to make reliable, performant communication and data serialization across languages as efficient and seamless as possible. diff --git a/vcpkg/ports/thrift/correct-paths.patch b/vcpkg/ports/thrift/correct-paths.patch new file mode 100644 index 0000000..26c21dd --- /dev/null +++ b/vcpkg/ports/thrift/correct-paths.patch @@ -0,0 +1,15 @@ +diff --git a/build/cmake/GenerateConfigModule.cmake b/build/cmake/GenerateConfigModule.cmake +index 9533c82..d074a1b 100644 +--- a/build/cmake/GenerateConfigModule.cmake ++++ b/build/cmake/GenerateConfigModule.cmake +@@ -19,8 +19,8 @@ + + include(CMakePackageConfigHelpers) + set(PACKAGE_INCLUDE_INSTALL_DIR "${includedir}/thrift") +-set(PACKAGE_CMAKE_INSTALL_DIR "${cmakedir}/thrift") +-set(PACKAGE_BIN_INSTALL_DIR "${exec_prefix}") ++set(PACKAGE_CMAKE_INSTALL_DIR "${prefix}/share/thrift") ++set(PACKAGE_BIN_INSTALL_DIR "${prefix}/tools/thrift") + + # In CYGWIN enviroment below commands does not work properly + if (NOT CYGWIN) diff --git a/vcpkg/ports/thrift/portfile.cmake b/vcpkg/ports/thrift/portfile.cmake new file mode 100644 index 0000000..f39ba11 --- /dev/null +++ b/vcpkg/ports/thrift/portfile.cmake @@ -0,0 +1,73 @@ +# We currently insist on static only because: +# - Thrift doesn't yet support building as a DLL on Windows, +# - x64-linux only builds static anyway. +# From https://github.com/apache/thrift/blob/master/CHANGES.md +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_find_acquire_program(FLEX) +vcpkg_find_acquire_program(BISON) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO apache/thrift + REF cecee50308fc7e6f77f55b3fd906c1c6c471fa2f #0.13.0 + SHA512 4097fd7951a4d47f2fadc520a54fd1b91b10769d65e899c6bab490dd7ac459e12bb2aa335df8fdfc61a32095033bfac928a54660abb1ee54ca14a144216c3339 + HEAD_REF master + PATCHES + "correct-paths.patch" +) + +if (VCPKG_TARGET_IS_OSX) + message(WARNING "${PORT} requires bison version greater than 2.5,\n\ +please use command \`brew install bison\` to install bison") +endif() + +# note we specify values for WITH_STATIC_LIB and WITH_SHARED_LIB because even though +# they're marked as deprecated, Thrift incorrectly hard-codes a value for BUILD_SHARED_LIBS. +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + NO_CHARSET_FLAG + OPTIONS + -DWITH_SHARED_LIB=off + -DWITH_STATIC_LIB=on + -DWITH_STDTHREADS=ON + -DBUILD_TESTING=off + -DBUILD_JAVA=off + -DBUILD_C_GLIB=off + -DBUILD_PYTHON=off + -DBUILD_CPP=on + -DBUILD_HASKELL=off + -DBUILD_TUTORIALS=off + -DFLEX_EXECUTABLE=${FLEX} + -DCMAKE_DISABLE_FIND_PACKAGE_Qt5=TRUE + -DBISON_EXECUTABLE=${BISON} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +# Move CMake config files to the right place +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/thrift) + +file(GLOB COMPILER "${CURRENT_PACKAGES_DIR}/bin/thrift" "${CURRENT_PACKAGES_DIR}/bin/thrift.exe") +if(COMPILER) + file(COPY ${COMPILER} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/thrift) + file(REMOVE ${COMPILER}) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/thrift) +endif() + +file(GLOB COMPILERD "${CURRENT_PACKAGES_DIR}/debug/bin/thrift" "${CURRENT_PACKAGES_DIR}/debug/bin/thrift.exe") +if(COMPILERD) + file(REMOVE ${COMPILERD}) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if ("${VCPKG_LIBRARY_LINKAGE}" STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +endif() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/tidy-html5/CONTROL b/vcpkg/ports/tidy-html5/CONTROL new file mode 100644 index 0000000..b7ad75a --- /dev/null +++ b/vcpkg/ports/tidy-html5/CONTROL @@ -0,0 +1,4 @@ +Source: tidy-html5 +Version: 5.7.28-2 +Homepage: https://github.com/htacg/tidy-html5 +Description: Tidy tidies HTML and XML. It can tidy your documents by itself, and developers can easily integrate its features into even more powerful tools. diff --git a/vcpkg/ports/tidy-html5/portfile.cmake b/vcpkg/ports/tidy-html5/portfile.cmake new file mode 100644 index 0000000..ddf60c6 --- /dev/null +++ b/vcpkg/ports/tidy-html5/portfile.cmake @@ -0,0 +1,40 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO htacg/tidy-html5 + REF d1b906991a7587688d384b648c55731f9be52506 + SHA512 ac1229f95db9ab6367d7650e27b87e76a0874e01c9d404e8c5fb75ba2761318218b658a4f7522188fda8008974393a333a8a5fbed8e3a472c98445f13e459ad5 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + NO_CHARSET_FLAG + OPTIONS + -DBUILD_SHARED_LIB=OFF + -DTIDY_CONSOLE_SHARED=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/tidyd.exe) +file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/tidyd) +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/tidy-html5) + +if(VCPKG_TARGET_IS_WINDOWS) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/tidy.exe ${CURRENT_PACKAGES_DIR}/tools/tidy-html5/tidy.exe) +else() + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/tidy ${CURRENT_PACKAGES_DIR}/tools/tidy-html5/tidy) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +file(INSTALL ${SOURCE_PATH}/README/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/tidy-html5 RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) diff --git a/vcpkg/ports/tiff/CONTROL b/vcpkg/ports/tiff/CONTROL new file mode 100644 index 0000000..f370497 --- /dev/null +++ b/vcpkg/ports/tiff/CONTROL @@ -0,0 +1,8 @@ +Source: tiff +Version: 4.1.0 +Build-Depends: zlib, libjpeg-turbo, liblzma +Homepage: https://download.osgeo.org/libtiff +Description: A library that supports the manipulation of TIFF image files + +Feature: tool +Description: Build tools diff --git a/vcpkg/ports/tiff/cmakelists.patch b/vcpkg/ports/tiff/cmakelists.patch new file mode 100644 index 0000000..a82de04 --- /dev/null +++ b/vcpkg/ports/tiff/cmakelists.patch @@ -0,0 +1,84 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 845ddf0..9ccb9b3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -181,9 +181,7 @@ foreach(flag ${test_flags}) + endif (${test_c_flag}) + endforeach(flag ${test_flags}) + +-if(MSVC) +- set(CMAKE_DEBUG_POSTFIX "d") +-endif() ++set(CMAKE_DEBUG_POSTFIX "d") + + option(ld-version-script "Enable linker version script" ON) + # Check if LD supports linker scripts. +@@ -601,12 +599,15 @@ check_include_file(OpenGL/gl.h HAVE_OPENGL_GL_H) + check_include_file(OpenGL/glu.h HAVE_OPENGL_GLU_H) + + # Win32 IO +-set(win32_io FALSE) +-if(WIN32) +- set(win32_io TRUE) ++set(USE_WIN32_FILEIO FALSE CACHE BOOL "") ++if(MSVC) ++ if (NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") #on UWP we use the unix I/O api ++ set(USE_WIN32_FILEIO TRUE CACHE BOOL "" FORCE) ++ add_definitions(-DUSE_WIN32_FILEIO) ++ endif() ++ add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS /wd4996) + endif() + +-set(USE_WIN32_FILEIO ${win32_io}) + + # Orthogonal features + +@@ -708,16 +709,28 @@ endif() + + #report_values(TIFF_INCLUDES TIFF_LIBRARY_DEPS) + ++option(BUILD_TOOLS "Build tool executables" ON) ++option(BUILD_DOCS "Build docs" ON) ++option(BUILD_CONTRIB "Build contributed executables" ON) ++option(BUILD_TESTS "Build tests" ON) ++ + # Process subdirectories + add_subdirectory(port) + add_subdirectory(libtiff) +-add_subdirectory(tools) +-add_subdirectory(test) +-add_subdirectory(contrib) +-add_subdirectory(build) +-add_subdirectory(man) +-add_subdirectory(html) +- ++if(BUILD_TOOLS) ++ add_subdirectory(tools) ++endif() ++if(BUILD_TESTS) ++ add_subdirectory(test) ++endif() ++if(BUILD_CONTRIB) ++ add_subdirectory(contrib) ++endif() ++if(BUILD_DOCS) ++ add_subdirectory(build) ++ add_subdirectory(man) ++ add_subdirectory(html) ++endif() + #message(STATUS "EXTRA_DIST: ${EXTRA_DIST}") + + message(STATUS "") +diff --git a/libtiff/CMakeLists.txt b/libtiff/CMakeLists.txt +index 1cf1b75..4ee29f6 100644 +--- a/libtiff/CMakeLists.txt ++++ b/libtiff/CMakeLists.txt +@@ -143,7 +143,7 @@ install(FILES ${tiff_HEADERS} ${nodist_tiff_HEADERS} + DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}") + + if(CXX_SUPPORT) +- add_library(tiffxx ${tiffxx_SOURCES} ${tiffxx_HEADERS}) ++ add_library(tiffxx STATIC ${tiffxx_SOURCES} ${tiffxx_HEADERS}) + target_link_libraries(tiffxx tiff) + set_target_properties(tiffxx PROPERTIES SOVERSION ${SO_COMPATVERSION}) + if(NOT CYGWIN) diff --git a/vcpkg/ports/tiff/fix-stddef.patch b/vcpkg/ports/tiff/fix-stddef.patch new file mode 100644 index 0000000..a9c2ddf --- /dev/null +++ b/vcpkg/ports/tiff/fix-stddef.patch @@ -0,0 +1,13 @@ +diff --git a/port/lfind.c port/lfind.c +index 087dfa9..20fa8b4 100644 +--- a/port/lfind.c ++++ b/port/lfind.c +@@ -38,7 +38,7 @@ + #ifdef _WIN32_WCE + # include + #else +-# include ++# include + #endif + + #ifndef NULL diff --git a/vcpkg/ports/tiff/portfile.cmake b/vcpkg/ports/tiff/portfile.cmake new file mode 100644 index 0000000..ab610d3 --- /dev/null +++ b/vcpkg/ports/tiff/portfile.cmake @@ -0,0 +1,68 @@ +set(LIBTIFF_VERSION 4.1.0) + +vcpkg_download_distfile(ARCHIVE + URLS "http://download.osgeo.org/libtiff/tiff-${LIBTIFF_VERSION}.tar.gz" + FILENAME "tiff-${LIBTIFF_VERSION}.tar.gz" + SHA512 fd541dcb11e3d5afaa1ec2f073c9497099727a52f626b338ef87dc93ca2e23ca5f47634015a4beac616d4e8f05acf7b7cd5797fb218758cc2ad31b390491c5a6 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${LIBTIFF_VERSION} + PATCHES + fix-stddef.patch + cmakelists.patch +) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set (TIFF_CXX_TARGET -Dcxx=OFF) +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tool BUILD_TOOLS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DBUILD_DOCS=OFF + -DBUILD_CONTRIB=OFF + -DBUILD_TESTS=OFF + -Djbig=OFF # This is disabled by default due to GPL/Proprietary licensing. + -Djpeg12=OFF + -Dwebp=OFF + -Dzstd=OFF + -DCMAKE_DISABLE_FIND_PACKAGE_OpenGL=ON + -DCMAKE_DISABLE_FIND_PACKAGE_GLUT=ON + ${TIFF_CXX_TARGET} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/share +) + + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +if ("tool" IN_LIST FEATURES) + file(GLOB TIFF_TOOLS ${CURRENT_PACKAGES_DIR}/bin/*.exe) + file(INSTALL ${TIFF_TOOLS} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + file(REMOVE ${TIFF_TOOLS}) + file(GLOB TIFF_TOOLS ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + file(REMOVE ${TIFF_TOOLS}) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() +endif() + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/tiff/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/tiff/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..a35dece --- /dev/null +++ b/vcpkg/ports/tiff/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,23 @@ +_find_package(${ARGS}) + +find_package(LibLZMA CONFIG) +find_package(JPEG) +find_package(ZLIB) +if(TARGET TIFF::TIFF) + set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES LibLZMA::LibLZMA JPEG::JPEG ZLIB::ZLIB) + if(UNIX) + set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES m) + endif() +endif() +if(TIFF_LIBRARIES) + list(APPEND TIFF_LIBRARIES ${LZMA_LIBRARIES} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES}) + if(UNIX) + list(APPEND TIFF_LIBRARIES m) + endif() +endif() +if(TIFF_LIBRARY) + list(APPEND TIFF_LIBRARY ${LZMA_LIBRARIES} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES}) + if(UNIX) + list(APPEND TIFF_LIBRARY m) + endif() +endif() diff --git a/vcpkg/ports/tinkerforge/CMakeLists.txt b/vcpkg/ports/tinkerforge/CMakeLists.txt new file mode 100644 index 0000000..3cd9916 --- /dev/null +++ b/vcpkg/ports/tinkerforge/CMakeLists.txt @@ -0,0 +1,68 @@ +cmake_minimum_required (VERSION 3.13 FATAL_ERROR) +include(GNUInstallDirs) + +if(WIN32) + set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}") +endif() + +project(tinkerforge LANGUAGES C VERSION 2.1.25) + +if(NOT CONFIG_INSTALL_DIR) + set(CONFIG_INSTALL_DIR "share/${PROJECT_NAME}/") +endif() +if(NOT INCLUDE_INSTALL_DIR) + set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}") +endif() +if(NOT TARGET_INSTALL_DIR) + set(TARGET_INSTALL_DIR "share/${PROJECT_NAME}") +endif() + + +file(GLOB CPP_FILES source/*.c) +file(GLOB H_FILES source/*.h) +file(GLOB DEF_FILE source/*.def) + +add_library(${PROJECT_NAME} ${CPP_FILES} ${H_FILES} ${DEF_FILE}) +target_include_directories(${PROJECT_NAME} PUBLIC + $ + $) + +find_package(Threads) +target_link_libraries(${PROJECT_NAME} PUBLIC Threads::Threads) + +if("${CMAKE_SYSTEM_NAME}" MATCHES "Windows") + target_link_libraries(${PROJECT_NAME} PUBLIC Ws2_32 advapi32) +endif() +##---------------------------------------------------------------------------------------## +##----- Package definition. +##---------------------------------------------------------------------------------------## +include(CMakePackageConfigHelpers) + +#Export as Package +set_target_properties (${PROJECT_NAME} PROPERTIES EXPORT_NAME ${PROJECT_NAME}) +export(TARGETS ${PROJECT_NAME} NAMESPACE ${PROJECT_NAME}:: FILE cmake/${PROJECT_NAME}Targets.cmake) +export(PACKAGE ${PROJECT_NAME}) + +#Config files for find_package +configure_package_config_file( + ${PROJECT_NAME}Config.cmake.in cmake/${PROJECT_NAME}Config.cmake + INSTALL_DESTINATION "${CONFIG_INSTALL_DIR}/${PROJECT_NAME}Config.cmake" + PATH_VARS TARGET_INSTALL_DIR INCLUDE_INSTALL_DIR +) +write_basic_package_version_file(cmake/${PROJECT_NAME}ConfigVersion.cmake COMPATIBILITY SameMinorVersion) + +#Install the target and all it build outputs. +install (TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Targets + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT Runtime + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT Development + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT Runtime + PUBLIC_HEADER DESTINATION "${INCLUDE_INSTALL_DIR}" COMPONENT Development + BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT Runtime) +#Install public headers +install(FILES ${H_FILES} DESTINATION "${INCLUDE_INSTALL_DIR}/${PROJECT_NAME}") +#Install the config files for find_package +install(FILES "${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}ConfigVersion.cmake" + "${PROJECT_BINARY_DIR}/cmake/${PROJECT_NAME}Config.cmake" + DESTINATION "${CONFIG_INSTALL_DIR}") +#install the targets file included by the config +install(EXPORT ${PROJECT_NAME}Targets NAMESPACE ${PROJECT_NAME}:: DESTINATION "${TARGET_INSTALL_DIR}") \ No newline at end of file diff --git a/vcpkg/ports/tinkerforge/CONTROL b/vcpkg/ports/tinkerforge/CONTROL new file mode 100644 index 0000000..da38ec3 --- /dev/null +++ b/vcpkg/ports/tinkerforge/CONTROL @@ -0,0 +1,4 @@ +Source: tinkerforge +Version: 2.1.25 +Description: Tinkerforge C API bindings for bricks and bricklets +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/tinkerforge/portfile.cmake b/vcpkg/ports/tinkerforge/portfile.cmake new file mode 100644 index 0000000..cfc5c39 --- /dev/null +++ b/vcpkg/ports/tinkerforge/portfile.cmake @@ -0,0 +1,36 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +set(VERSION 2_1_25) + +vcpkg_download_distfile(ARCHIVE + URLS "http://download.tinkerforge.com/bindings/c/tinkerforge_c_bindings_${VERSION}.zip" + FILENAME "tinkerforge-${VERSION}.zip" + SHA512 c02b789bd466803d60aeb39a544b0aa17af811377b065a0b273bcfc15c5844f8cfe981d8143743e32bd05470c2c6af297df50924da0d2895a4cdf4bc9e9bd0b8 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF tinker-${VERSION} + NO_REMOVE_ONE_LEVEL +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION ${SOURCE_PATH}) +file(COPY "${CMAKE_CURRENT_LIST_DIR}/tinkerforgeConfig.cmake.in" DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/tinkerforge/tinkerforgeConfig.cmake.in b/vcpkg/ports/tinkerforge/tinkerforgeConfig.cmake.in new file mode 100644 index 0000000..07b771c --- /dev/null +++ b/vcpkg/ports/tinkerforge/tinkerforgeConfig.cmake.in @@ -0,0 +1,5 @@ +@PACKAGE_INIT@ + +include ("@PACKAGE_TARGET_INSTALL_DIR@/@PROJECT_NAME@Targets.cmake") +set_and_check(TINKERFORGE_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") +check_required_components("@PROJECT_NAME@") diff --git a/vcpkg/ports/tiny-aes-c/CMakeLists.txt b/vcpkg/ports/tiny-aes-c/CMakeLists.txt new file mode 100644 index 0000000..6e32225 --- /dev/null +++ b/vcpkg/ports/tiny-aes-c/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.14) + +project(tiny-aes-c LANGUAGES C ASM) + +include(GNUInstallDirs) + +add_library(tiny-aes-c aes.c) + +target_include_directories( + tiny-aes-c + PUBLIC + $ +) + +install(FILES aes.h aes.hpp DESTINATION include) + +install(TARGETS tiny-aes-c EXPORT unofficial-tiny-aes-c-config) + +install( + EXPORT unofficial-tiny-aes-c-config + NAMESPACE unofficial::tiny-aes-c:: + DESTINATION share/unofficial-tiny-aes-c + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) diff --git a/vcpkg/ports/tiny-aes-c/CONTROL b/vcpkg/ports/tiny-aes-c/CONTROL new file mode 100644 index 0000000..e874990 --- /dev/null +++ b/vcpkg/ports/tiny-aes-c/CONTROL @@ -0,0 +1,4 @@ +Source: tiny-aes-c +Version: 2019-07-31 +Description: Small portable AES128/192/256 in C +Homepage: https://github.com/kokke/tiny-AES-c diff --git a/vcpkg/ports/tiny-aes-c/portfile.cmake b/vcpkg/ports/tiny-aes-c/portfile.cmake new file mode 100644 index 0000000..e1bb5cb --- /dev/null +++ b/vcpkg/ports/tiny-aes-c/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kokke/tiny-AES-c + REF ca85e00de963102d3999ea5fa865c0deff6370d3 + SHA512 538d5d9cee8cecbf801d3553f2425f8a1331b59c652c11ee56c6e46a23450c1e9a59e3e1833f4384b7a4d992a93f30635855a47e2414b9293e0d27c426b6a4f3 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/unlicense.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME unofficial-${PORT}) diff --git a/vcpkg/ports/tiny-bignum-c/CMakeLists.txt b/vcpkg/ports/tiny-bignum-c/CMakeLists.txt new file mode 100644 index 0000000..8891356 --- /dev/null +++ b/vcpkg/ports/tiny-bignum-c/CMakeLists.txt @@ -0,0 +1,28 @@ +cmake_minimum_required(VERSION 3.14) + +project(tiny-bignum-c LANGUAGES C) + +include(GNUInstallDirs) + +add_library(tiny-bignum-c bn.c) + +target_include_directories( + tiny-bignum-c + PUBLIC + $ +) +target_compile_definitions( + tiny-bignum-c + PRIVATE + $<$:_CRT_SECURE_NO_WARNINGS> +) +set_target_properties(tiny-bignum-c PROPERTIES PUBLIC_HEADER bn.h) + +install(TARGETS tiny-bignum-c EXPORT unofficial-tiny-bignum-c-config) + +install( + EXPORT unofficial-tiny-bignum-c-config + NAMESPACE unofficial::tiny-bignum-c:: + DESTINATION share/unofficial-tiny-bignum-c + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) diff --git a/vcpkg/ports/tiny-bignum-c/CONTROL b/vcpkg/ports/tiny-bignum-c/CONTROL new file mode 100644 index 0000000..5015bc2 --- /dev/null +++ b/vcpkg/ports/tiny-bignum-c/CONTROL @@ -0,0 +1,4 @@ +Source: tiny-bignum-c +Version: 2019-07-31 +Description: Small portable multiple-precision unsigned integer arithmetic in C +Homepage: https://github.com/kokke/tiny-bignum-c diff --git a/vcpkg/ports/tiny-bignum-c/portfile.cmake b/vcpkg/ports/tiny-bignum-c/portfile.cmake new file mode 100644 index 0000000..7322712 --- /dev/null +++ b/vcpkg/ports/tiny-bignum-c/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kokke/tiny-bignum-c + REF e814d2b6b522ecaa67701453c492811a8adbc555 + SHA512 2cea21588d018bd74fb9a128576764feecd87364d157acee21bd37cd8890c0776b228e25580de88a0c6d723a7b8e88cb8120c8c66b3999661c707b04dffc3f5b + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME unofficial-${PORT}) diff --git a/vcpkg/ports/tiny-dnn/CONTROL b/vcpkg/ports/tiny-dnn/CONTROL new file mode 100644 index 0000000..2a31c83 --- /dev/null +++ b/vcpkg/ports/tiny-dnn/CONTROL @@ -0,0 +1,4 @@ +Source: tiny-dnn +Version: 2018-10-25 +Homepage: https://github.com/tiny-dnn/tiny-dnn +Description: A C++14 implementation of deep learning. It is suitable for deep learning on limited computational resource. diff --git a/vcpkg/ports/tiny-dnn/portfile.cmake b/vcpkg/ports/tiny-dnn/portfile.cmake new file mode 100644 index 0000000..500a429 --- /dev/null +++ b/vcpkg/ports/tiny-dnn/portfile.cmake @@ -0,0 +1,14 @@ +#header-only library +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tiny-dnn/tiny-dnn + REF c0f576f5cb7b35893f62127cb7aec18f77a3bcc5 + SHA512 f2bdf8a39781e0b2e3383d9e7a4a92daa28ee32e6f390c3fb21e9b24a597a50a8ccc4b5be345c433943db4db70fd2df8922ce3f13a792a4e73cd1fdd35842acf + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/tiny_dnn DESTINATION ${CURRENT_PACKAGES_DIR}/include/) + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiny-dnn) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/tiny-dnn/LICENSE ${CURRENT_PACKAGES_DIR}/share/tiny-dnn/copyright) diff --git a/vcpkg/ports/tiny-process-library/CONTROL b/vcpkg/ports/tiny-process-library/CONTROL new file mode 100644 index 0000000..938277a --- /dev/null +++ b/vcpkg/ports/tiny-process-library/CONTROL @@ -0,0 +1,3 @@ +Source: tiny-process-library +Version: 2018-12-06 +Description: A small platform independent library diff --git a/vcpkg/ports/tiny-process-library/fix-cmake.patch b/vcpkg/ports/tiny-process-library/fix-cmake.patch new file mode 100644 index 0000000..c8a2646 --- /dev/null +++ b/vcpkg/ports/tiny-process-library/fix-cmake.patch @@ -0,0 +1,40 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ace2879..15c7f44 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 2.8) + project(tiny-process-library) + + if(MSVC) ++ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) + add_definitions(/D_CRT_SECURE_NO_WARNINGS) + else() + add_compile_options(-std=c++11 -Wall -Wextra) +@@ -23,7 +24,7 @@ endif() + find_package(Threads REQUIRED) + + target_link_libraries(tiny-process-library ${CMAKE_THREAD_LIBS_INIT}) +-target_include_directories(tiny-process-library PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) ++target_include_directories(tiny-process-library PUBLIC $) + + option(BUILD_TESTING OFF) + +@@ -34,7 +35,17 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") + + set(BUILD_TESTING ON) + +- install(TARGETS tiny-process-library DESTINATION lib) ++ install(TARGETS tiny-process-library ++ EXPORT ${PROJECT_NAME}-config ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ ) ++ install(EXPORT ${PROJECT_NAME}-config ++ FILE unofficial-${PROJECT_NAME}-config.cmake ++ NAMESPACE unofficial::${PROJECT_NAME}:: ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/unofficial-${PROJECT_NAME} ++ ) + install(FILES process.hpp DESTINATION include) + endif() + diff --git a/vcpkg/ports/tiny-process-library/portfile.cmake b/vcpkg/ports/tiny-process-library/portfile.cmake new file mode 100644 index 0000000..bcab0c4 --- /dev/null +++ b/vcpkg/ports/tiny-process-library/portfile.cmake @@ -0,0 +1,39 @@ +include(vcpkg_common_functions) + +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.com + OUT_SOURCE_PATH SOURCE_PATH + REPO eidheim/tiny-process-library + REF 273270d0f9d0cf4a8282fadd589060a7b0eab425 + SHA512 f99e586ee6fa9b7c0a3633b59e0e099becba48e2ef375268eeecd9099a233e3b528ba373edc74983d49934ff10f99884fdeb594ff546054fc91d1341d0e86c0a + HEAD_REF master + PATCHES + fix-cmake.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets( + CONFIG_PATH lib/cmake/unofficial-${PORT} + TARGET_PATH share/unofficial-${PORT} +) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +#vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/vcpkg/ports/tiny-regex-c/CMakeLists.txt b/vcpkg/ports/tiny-regex-c/CMakeLists.txt new file mode 100644 index 0000000..44c7ad7 --- /dev/null +++ b/vcpkg/ports/tiny-regex-c/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.14) + +project(tiny-regex-c LANGUAGES C) + +include(GNUInstallDirs) + +add_library(tiny-regex-c re.c) + +target_include_directories( + tiny-regex-c + PUBLIC + $ +) + +set_target_properties(tiny-regex-c PROPERTIES PUBLIC_HEADER re.h) + +install(TARGETS tiny-regex-c EXPORT unofficial-tiny-regex-c-config) + +install( + EXPORT unofficial-tiny-regex-c-config + NAMESPACE unofficial::tiny-regex-c:: + DESTINATION share/unofficial-tiny-regex-c + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) diff --git a/vcpkg/ports/tiny-regex-c/CONTROL b/vcpkg/ports/tiny-regex-c/CONTROL new file mode 100644 index 0000000..12b5ea0 --- /dev/null +++ b/vcpkg/ports/tiny-regex-c/CONTROL @@ -0,0 +1,4 @@ +Source: tiny-regex-c +Version: 2019-07-31 +Description: A small regex implementation in C +Homepage: https://github.com/kokke/tiny-regex-c diff --git a/vcpkg/ports/tiny-regex-c/portfile.cmake b/vcpkg/ports/tiny-regex-c/portfile.cmake new file mode 100644 index 0000000..2e21fb4 --- /dev/null +++ b/vcpkg/ports/tiny-regex-c/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kokke/tiny-regex-c + REF d3058f271f7a06ff298dff0a6a9a1e0753a5fa17 + SHA512 bd524c63850b08f02fa5f7725fcde85cbd9c9c6ec8a804f2570df0e04518961a758c017cdb33ebaf72df1abca42ba3b82681655404bc26e6142b5a52a0534ab4 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME unofficial-${PORT}) diff --git a/vcpkg/ports/tinycthread/CONTROL b/vcpkg/ports/tinycthread/CONTROL new file mode 100644 index 0000000..da87db1 --- /dev/null +++ b/vcpkg/ports/tinycthread/CONTROL @@ -0,0 +1,4 @@ +Source: tinycthread +Version: 2019-08-06 +Description: Small, portable implementation of the C11 threads API +Homepage: https://tinycthread.github.io/ diff --git a/vcpkg/ports/tinycthread/portfile.cmake b/vcpkg/ports/tinycthread/portfile.cmake new file mode 100644 index 0000000..e521ffb --- /dev/null +++ b/vcpkg/ports/tinycthread/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tinycthread/tinycthread + REF 6957fc8383d6c7db25b60b8c849b29caab1caaee + SHA512 d8b1ad73676f90b236bef06464cfd34996e7b6676ef28cf011cfff86d63e9d6322f7b00ca15290b3f87ed40e704d5325f676440d0223a7f8716d3392a5d1345d + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DTINYCTHREAD_DISABLE_TESTS=OFF + -DTINYCTHREAD_INSTALL=ON +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(STRINGS ${SOURCE_PATH}/README.txt SOURCE_LINES) +list(SUBLIST SOURCE_LINES 70 120 SOURCE_LINES) +list(JOIN SOURCE_LINES "\n" _contents) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "${_contents}") diff --git a/vcpkg/ports/tinydir/CONTROL b/vcpkg/ports/tinydir/CONTROL new file mode 100644 index 0000000..04a6b7b --- /dev/null +++ b/vcpkg/ports/tinydir/CONTROL @@ -0,0 +1,4 @@ +Source: tinydir +Version: 1.2.4 +Homepage: https://github.com/cxong/tinydir +Description: Lightweight, portable and easy to integrate C directory and file reader diff --git a/vcpkg/ports/tinydir/portfile.cmake b/vcpkg/ports/tinydir/portfile.cmake new file mode 100644 index 0000000..223b7d7 --- /dev/null +++ b/vcpkg/ports/tinydir/portfile.cmake @@ -0,0 +1,11 @@ +include(vcpkg_common_functions) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cxong/tinydir + REF 1.2.4 + SHA512 476b81a089d378152c2ab644b88fe860f4a6dba9594ef5c2ae138487cb54b8f6da5538c114463619043f694b992e2de5fec925bd746f8e7fd341ebcdcaac98c0 + HEAD_REF master +) +file(INSTALL ${SOURCE_PATH}/tinydir.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinydir RENAME copyright) +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/tinyexif/CONTROL b/vcpkg/ports/tinyexif/CONTROL new file mode 100644 index 0000000..7d2da6d --- /dev/null +++ b/vcpkg/ports/tinyexif/CONTROL @@ -0,0 +1,5 @@ +Source: tinyexif +Version: 1.0.2-6 +Build-Depends: tinyxml2 +Homepage: https://github.com/cdcseacave/TinyEXIF +Description: tiny ISO-compliant C++ EXIF and XMP parsing library for JPEG images diff --git a/vcpkg/ports/tinyexif/portfile.cmake b/vcpkg/ports/tinyexif/portfile.cmake new file mode 100644 index 0000000..b1940ad --- /dev/null +++ b/vcpkg/ports/tinyexif/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cdcseacave/TinyEXIF + REF c57a5fec1a847ec0e7b482b2da72e1f04fc2e147 + SHA512 a968e79b4b7a6f5f189328a8dc493da5c0d568526b5dca46b9bfc0cf85295fb348bd0b38828fedbb7b6e4467fc8932d0d7b435b4acbfe662e954cbed1d0ea914 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIBS) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS} + -DBUILD_DEMO=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/TinyEXIF) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyexif RENAME copyright) diff --git a/vcpkg/ports/tinyexpr/CMakeLists.txt b/vcpkg/ports/tinyexpr/CMakeLists.txt new file mode 100644 index 0000000..60f3834 --- /dev/null +++ b/vcpkg/ports/tinyexpr/CMakeLists.txt @@ -0,0 +1,48 @@ +cmake_minimum_required(VERSION 3.14) + +project(tinyexpr LANGUAGES C) + +include(CheckSymbolExists) +include(GNUInstallDirs) + +if(WIN32 AND BUILD_SHARED_LIBS) + add_library(tinyexpr tinyexpr.c exports.def) +else() + add_library(tinyexpr tinyexpr.c) +endif() + +target_include_directories( + tinyexpr + PUBLIC + $ +) + +# https://stackoverflow.com/questions/32816646/can-cmake-detect-if-i-need-to-link-to-libm-when-using-pow-in-c +if(NOT POW_FUNCTION_EXISTS AND NOT NEED_LINKING_AGAINST_LIBM) + check_symbol_exists(pow "math.h" POW_FUNCTION_EXISTS) + if(NOT POW_FUNCTION_EXISTS) + unset(POW_FUNCTION_EXISTS CACHE) + list(APPEND CMAKE_REQUIRED_LIBRARIES m) + check_symbol_exists(pow "math.h" POW_FUNCTION_EXISTS) + if(POW_FUNCTION_EXISTS) + set(NEED_LINKING_AGAINST_LIBM True CACHE BOOL "" FORCE) + else() + message(FATAL_ERROR "Failed making the pow() function available") + endif() + endif() +endif() + +if(NEED_LINKING_AGAINST_LIBM) + target_link_libraries(tinyexpr PUBLIC m) +endif() + +set_target_properties(tinyexpr PROPERTIES PUBLIC_HEADER tinyexpr.h) + +install(TARGETS tinyexpr EXPORT unofficial-tinyexpr-config) + +install( + EXPORT unofficial-tinyexpr-config + NAMESPACE unofficial::tinyexpr:: + DESTINATION share/unofficial-tinyexpr + PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ +) diff --git a/vcpkg/ports/tinyexpr/exports.def b/vcpkg/ports/tinyexpr/exports.def new file mode 100644 index 0000000..a43f437 --- /dev/null +++ b/vcpkg/ports/tinyexpr/exports.def @@ -0,0 +1,6 @@ +EXPORTS + te_compile + te_eval + te_free + te_interp + te_print diff --git a/vcpkg/ports/tinyexpr/fix-issue-34.patch b/vcpkg/ports/tinyexpr/fix-issue-34.patch new file mode 100644 index 0000000..000fea0 --- /dev/null +++ b/vcpkg/ports/tinyexpr/fix-issue-34.patch @@ -0,0 +1,16 @@ +diff --git a/tinyexpr.c b/tinyexpr.c +index 90ed8fc..570f2fd 100755 +--- a/tinyexpr.c ++++ b/tinyexpr.c +@@ -49,6 +49,11 @@ For log = natural log uncomment the next line. */ + #define INFINITY (1.0/0.0) + #endif + ++/* https://github.com/codeplea/tinyexpr/issues/34 */ ++#ifdef _MSC_VER ++#pragma function(ceil) ++#pragma function(floor) ++#endif + + typedef double (*te_fun2)(double, double); + diff --git a/vcpkg/ports/tinyexpr/portfile.cmake b/vcpkg/ports/tinyexpr/portfile.cmake new file mode 100644 index 0000000..480c67a --- /dev/null +++ b/vcpkg/ports/tinyexpr/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO codeplea/tinyexpr + REF ffb0d41b13e5f8d318db95feb071c220c134fe70 + SHA512 fe4975f8b444a50d7ba8135450a42007a81f1545eebd7775f92307b87b72bc9abee4591e56ddeb76ec9e5aa41f0852ba98c99881d671f47a58caca8bd1ca9999 + HEAD_REF master + PATCHES + fix-issue-34.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/exports.def DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/tinyexpr/vcpkg.json b/vcpkg/ports/tinyexpr/vcpkg.json new file mode 100644 index 0000000..6ed72b4 --- /dev/null +++ b/vcpkg/ports/tinyexpr/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "tinyexpr", + "version-string": "2020-09-25", + "description": "Tiny recursive descent parser and evaluation engine in C", + "homepage": "https://codeplea.com/tinyexpr", + "license": "Zlib" +} diff --git a/vcpkg/ports/tinyexr/CONTROL b/vcpkg/ports/tinyexr/CONTROL new file mode 100644 index 0000000..bd3f25f --- /dev/null +++ b/vcpkg/ports/tinyexr/CONTROL @@ -0,0 +1,4 @@ +Source: tinyexr +Version: 2020-03-15 +Homepage: https://github.com/syoyo/tinyexr +Description: Library to load and save OpenEXR(.exr) images diff --git a/vcpkg/ports/tinyexr/copyright b/vcpkg/ports/tinyexr/copyright new file mode 100644 index 0000000..975a807 --- /dev/null +++ b/vcpkg/ports/tinyexr/copyright @@ -0,0 +1,5 @@ +3-clause BSD + +tinyexr uses miniz, which is developed by Rich Geldreich richgel99@gmail.com, and licensed under public domain. + +tinyexr tools uses stb, which is licensed under public domain: https://github.com/nothings/stb tinyexr uses some code from OpenEXR, which is licensed under 3-clause BSD license. \ No newline at end of file diff --git a/vcpkg/ports/tinyexr/portfile.cmake b/vcpkg/ports/tinyexr/portfile.cmake new file mode 100644 index 0000000..e8cfaf1 --- /dev/null +++ b/vcpkg/ports/tinyexr/portfile.cmake @@ -0,0 +1,12 @@ + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO syoyo/tinyexr + REF fdaeecbbc1bac1a417c6af2f4dab43d3840ed036 + SHA512 0d875e197bc82dd5addb8e08e9ba1a9a02e108cc9dd14e5ea17de032cda5ad599f6d10d6c7959d545e05ab30d6daa34f98061f23faeb1c15caf96b6cb76483a3 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/tinyexr.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyexr) diff --git a/vcpkg/ports/tinyfiledialogs/CMakeLists.txt b/vcpkg/ports/tinyfiledialogs/CMakeLists.txt new file mode 100644 index 0000000..34940b7 --- /dev/null +++ b/vcpkg/ports/tinyfiledialogs/CMakeLists.txt @@ -0,0 +1,27 @@ +cmake_minimum_required(VERSION 3.4) +project(tinyfiledialogs C) + +add_library(tinyfiledialogs tinyfiledialogs.c) + +install( + TARGETS tinyfiledialogs + EXPORT tinyfiledialogsConfig + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" +) +install( + FILES tinyfiledialogs.h + DESTINATION "${CMAKE_INSTALL_PREFIX}/include/tinyfiledialogs" +) + +export( + TARGETS tinyfiledialogs + NAMESPACE tinyfiledialogs:: + FILE "${CMAKE_CURRENT_BINARY_DIR}/tinyfiledialogsConfig.cmake" +) +install( + EXPORT tinyfiledialogsConfig + NAMESPACE tinyfiledialogs:: + DESTINATION "${CMAKE_INSTALL_PREFIX}/share/tinyfiledialogs" +) diff --git a/vcpkg/ports/tinyfiledialogs/CONTROL b/vcpkg/ports/tinyfiledialogs/CONTROL new file mode 100644 index 0000000..6e5b062 --- /dev/null +++ b/vcpkg/ports/tinyfiledialogs/CONTROL @@ -0,0 +1,5 @@ +Source: tinyfiledialogs +Version: 3.6.3 +Description: Highly portable and cross-platform dialogs for native inputbox, passwordbox, colorpicker and more +Homepage: https://sourceforge.net/projects/tinyfiledialogs/ +Supports: !uwp diff --git a/vcpkg/ports/tinyfiledialogs/portfile.cmake b/vcpkg/ports/tinyfiledialogs/portfile.cmake new file mode 100644 index 0000000..7077d6b --- /dev/null +++ b/vcpkg/ports/tinyfiledialogs/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO tinyfiledialogs + FILENAME "frozen_versions/tinyfiledialogs-3.6.3.zip" + SHA512 42c3bd34b0287cf2477f9ede049bea29a9306304e8fab7740065957d3737f4041899f26f29a0693e801cb0a7b63844509f86441262303ff0a4030a431ffac648 +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(READ ${CURRENT_PACKAGES_DIR}/include/tinyfiledialogs/tinyfiledialogs.h _contents) +string(SUBSTRING "${_contents}" 0 1024 _contents) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "${_contents}") diff --git a/vcpkg/ports/tinygltf/CONTROL b/vcpkg/ports/tinygltf/CONTROL new file mode 100644 index 0000000..ceba5f9 --- /dev/null +++ b/vcpkg/ports/tinygltf/CONTROL @@ -0,0 +1,5 @@ +Source: tinygltf +Version: 2020-07-28 +Homepage: https://github.com/syoyo/tinygltf +Description: A header only C++11 glTF 2.0 library. +Build-Depends: stb, nlohmann-json \ No newline at end of file diff --git a/vcpkg/ports/tinygltf/portfile.cmake b/vcpkg/ports/tinygltf/portfile.cmake new file mode 100644 index 0000000..ef26304 --- /dev/null +++ b/vcpkg/ports/tinygltf/portfile.cmake @@ -0,0 +1,15 @@ +# Header-only library +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO syoyo/tinygltf + REF 91da29972987bb4d715a09d94ecd2cefd3a487d4 #v2.4.2 + SHA512 bede1f995b8f6cdab04140ab284576444ddb5baa8894150ac697e53bafbe03c339c274a2b9559572751a9408b33750d86105d8d24ebccbdfbc98555e7b3a1efd + HEAD_REF master +) + +# Put the licence file where vcpkg expects it +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinygltf/LICENSE) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/tinygltf/LICENSE ${CURRENT_PACKAGES_DIR}/share/tinygltf/copyright) + +# Copy the tinygltf header files +file(COPY ${SOURCE_PATH}/tiny_gltf.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) diff --git a/vcpkg/ports/tinynpy/CONTROL b/vcpkg/ports/tinynpy/CONTROL new file mode 100644 index 0000000..cf05ef3 --- /dev/null +++ b/vcpkg/ports/tinynpy/CONTROL @@ -0,0 +1,4 @@ +Source: tinynpy +Version: 1.0.0-3 +Build-Depends: zlib +Description: tiny C++ loader/exporter of python numpy array NPY/NPZ files diff --git a/vcpkg/ports/tinynpy/portfile.cmake b/vcpkg/ports/tinynpy/portfile.cmake new file mode 100644 index 0000000..69e31ed --- /dev/null +++ b/vcpkg/ports/tinynpy/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cdcseacave/TinyNPY + REF 0a11001009cc3e8f3c95c61b92c0ce1bd52d5383 + SHA512 a5fe962e433896a5c7363808e87fca1297c98496cf6b6fd98154f4f4bc113ea213e281ebcdbceadf47fc573b6d707097f3a06cc58bf26351ebf7f935954d79c0 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIBS) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS} + -DBUILD_DEMO=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/TinyNPY") + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinynpy RENAME copyright) diff --git a/vcpkg/ports/tinyobjloader/CONTROL b/vcpkg/ports/tinyobjloader/CONTROL new file mode 100644 index 0000000..8785e86 --- /dev/null +++ b/vcpkg/ports/tinyobjloader/CONTROL @@ -0,0 +1,7 @@ +Source: tinyobjloader +Version: 2.0.0-rc2 +Description: Tiny but powerful single file wavefront obj loader + +Feature: double +Description: enable double(64bit) precision + diff --git a/vcpkg/ports/tinyobjloader/portfile.cmake b/vcpkg/ports/tinyobjloader/portfile.cmake new file mode 100644 index 0000000..87b6069 --- /dev/null +++ b/vcpkg/ports/tinyobjloader/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO syoyo/tinyobjloader + REF v2.0.0-rc2 + SHA512 936f7897a87fe00d474231ad5f69816da127f14296c3591144c26c6058bd11ea1490c2db6b8c4a8adf629ae148423705d0c4020f4ed034921f0f2f711498f3bb + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + double TINYOBJLOADER_USE_DOUBLE +) + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}" + PREFER_NINJA + OPTIONS + -DCMAKE_INSTALL_DOCDIR:STRING=share/tinyobjloader + # FEATURES + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/tinyobjloader/cmake) + +file( + REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/lib/tinyobjloader + ${CURRENT_PACKAGES_DIR}/debug/lib/tinyobjloader +) + +vcpkg_copy_pdbs() + +# Put the licence file where vcpkg expects it +file(RENAME ${CURRENT_PACKAGES_DIR}/share/tinyobjloader/LICENSE ${CURRENT_PACKAGES_DIR}/share/tinyobjloader/copyright) diff --git a/vcpkg/ports/tinyply/CONTROL b/vcpkg/ports/tinyply/CONTROL new file mode 100644 index 0000000..a75e1fb --- /dev/null +++ b/vcpkg/ports/tinyply/CONTROL @@ -0,0 +1,4 @@ +Source: tinyply +Version: 2020-05-22 +Description: C++11 ply 3d mesh format importer & exporter +Homepage: https://github.com/ddiakopoulos/tinyply diff --git a/vcpkg/ports/tinyply/fix-cmake.patch b/vcpkg/ports/tinyply/fix-cmake.patch new file mode 100644 index 0000000..681e30f --- /dev/null +++ b/vcpkg/ports/tinyply/fix-cmake.patch @@ -0,0 +1,27 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2bd9563..4d4d9fe 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -50,6 +50,8 @@ set(project_config "${generated_dir}/${PROJECT_NAME}Config.cmake") + set(targets_export_name "${PROJECT_NAME}Targets") + set(namespace "") + ++include(GNUInstallDirs) ++ + write_basic_package_version_file( + "${version_config}" + VERSION ${PROJECT_VERSION} +@@ -63,9 +65,10 @@ configure_package_config_file( + + # Install + install(TARGETS tinyply EXPORT ${targets_export_name} +- RUNTIME DESTINATION bin +- ARCHIVE DESTINATION lib +- LIBRARY DESTINATION lib) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + install(FILES source/tinyply.h + DESTINATION include) + diff --git a/vcpkg/ports/tinyply/portfile.cmake b/vcpkg/ports/tinyply/portfile.cmake new file mode 100644 index 0000000..a5e9353 --- /dev/null +++ b/vcpkg/ports/tinyply/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ddiakopoulos/tinyply + REF ca7b279fb6c9af931ffdaed96a3b11ca3ccd79ea + SHA512 d3adfe7cce849a14fd473cfd67baef0163d4e45ff32724516270d5893a18086f7ac17d87bda5c33381442766849b41516bd2c7757e97038c95af0c70d5f0edde + HEAD_REF master + PATCHES + # TODO: Remove this patch if https://github.com/ddiakopoulos/tinyply/pull/41 was accepted. + fix-cmake.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SHARED_LIB) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSHARED_LIB=${SHARED_LIB} + -DBUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# License +file(READ "${SOURCE_PATH}/readme.md" readme_contents) +string(FIND "${readme_contents}" "License" license_line_pos) +string(SUBSTRING "${readme_contents}" ${license_line_pos} -1 license_contents) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "${license_contents}") diff --git a/vcpkg/ports/tinyspline/001-do-not-treat-warnings-as-errors.patch b/vcpkg/ports/tinyspline/001-do-not-treat-warnings-as-errors.patch new file mode 100644 index 0000000..5761748 --- /dev/null +++ b/vcpkg/ports/tinyspline/001-do-not-treat-warnings-as-errors.patch @@ -0,0 +1,18 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 02dfb83..52f5125 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -386,11 +386,11 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + + # TINYSPLINE_LIBRARY_C_FLAGS + set(TINYSPLINE_LIBRARY_C_FLAGS "${TINYSPLINE_LIBRARY_C_FLAGS} /Wall") +- set(TINYSPLINE_LIBRARY_C_FLAGS "${TINYSPLINE_LIBRARY_C_FLAGS} /WX") ++ # set(TINYSPLINE_LIBRARY_C_FLAGS "${TINYSPLINE_LIBRARY_C_FLAGS} /WX") + + # TINYSPLINE_LIBRARY_CXX_FLAGS + set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /Wall") +- set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /WX") ++ # set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /WX") + set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd4514") + set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd4710") + set(TINYSPLINE_LIBRARY_CXX_FLAGS "${TINYSPLINE_LIBRARY_CXX_FLAGS} /wd4350") diff --git a/vcpkg/ports/tinyspline/CONTROL b/vcpkg/ports/tinyspline/CONTROL new file mode 100644 index 0000000..f1f4739 --- /dev/null +++ b/vcpkg/ports/tinyspline/CONTROL @@ -0,0 +1,3 @@ +Source: tinyspline +Version: 0.2.0-3 +Description: Library for NURBS, B-Splines, and B?zier curves, allowing you to handle splines with ease diff --git a/vcpkg/ports/tinyspline/portfile.cmake b/vcpkg/ports/tinyspline/portfile.cmake new file mode 100644 index 0000000..5d202b7 --- /dev/null +++ b/vcpkg/ports/tinyspline/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO msteinbeck/tinyspline + REF 0.2.0 + SHA512 50cf4927b311eeca6de7954f1b8d585cbf71355f5e5b0aac2f92f5f4ba37986df16eb3251f94a2304d27dab27d4f6b838b410f53e30de28bab53facf194eb640 + HEAD_REF master + PATCHES + "001-do-not-treat-warnings-as-errors.patch" +) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/src + PREFER_NINJA +) + +vcpkg_install_cmake() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/tinyspline/copyright COPYONLY) diff --git a/vcpkg/ports/tinythread/CMakeLists.txt b/vcpkg/ports/tinythread/CMakeLists.txt new file mode 100644 index 0000000..57e9721 --- /dev/null +++ b/vcpkg/ports/tinythread/CMakeLists.txt @@ -0,0 +1,21 @@ +cmake_minimum_required(VERSION 3.8.0) + +project(tinythread) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +include_directories(source) + +add_library(tinythread source/tinythread.cpp) + +install( + TARGETS tinythread + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) +if(NOT DISABLE_INSTALL_HEADERS) + install(FILES source/tinythread.h source/fast_mutex.h DESTINATION include) +endif() diff --git a/vcpkg/ports/tinythread/CONTROL b/vcpkg/ports/tinythread/CONTROL new file mode 100644 index 0000000..d7c8112 --- /dev/null +++ b/vcpkg/ports/tinythread/CONTROL @@ -0,0 +1,4 @@ +Source: tinythread +Version: 1.1-3 +Homepage: https://tinythreadpp.bitsnbites.eu/ +Description: Implements a fairly compatible subset of the C++11 thread management classes diff --git a/vcpkg/ports/tinythread/portfile.cmake b/vcpkg/ports/tinythread/portfile.cmake new file mode 100644 index 0000000..94a1801 --- /dev/null +++ b/vcpkg/ports/tinythread/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "http://tinythreadpp.bitsnbites.eu/files/TinyThread%2B%2B-1.1-src.tar.bz2" + FILENAME "TinyThread++-1.1.tar.bz2" + SHA512 407f54fcf3f68dd7fec25e9e0749a1803dffa5d52d606905155714d29f519b5eae64ff654b11768fecc32c0123a78c48be37c47993e0caf157a63349a2f869c6 +) + +vcpkg_extract_source_archive_ex( + ARCHIVE ${ARCHIVE} + OUT_SOURCE_PATH SOURCE_PATH +) + +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.txt" DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinythread RENAME copyright) diff --git a/vcpkg/ports/tinytoml/CONTROL b/vcpkg/ports/tinytoml/CONTROL new file mode 100644 index 0000000..ba26292 --- /dev/null +++ b/vcpkg/ports/tinytoml/CONTROL @@ -0,0 +1,4 @@ +Source: tinytoml +Version: 20180219-1 +Homepage: https://github.com/mayah/tinytoml +Description: A header only C++11 library for parsing TOML. diff --git a/vcpkg/ports/tinytoml/portfile.cmake b/vcpkg/ports/tinytoml/portfile.cmake new file mode 100644 index 0000000..9d7275c --- /dev/null +++ b/vcpkg/ports/tinytoml/portfile.cmake @@ -0,0 +1,16 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mayah/tinytoml + + REF 8fe890978b3390de1fc1f26c2d6bf1711c700c5a + SHA512 c7302950c94001b5376009a08181589c7fb040d7c23343e3dbbdcf37caa0ce8f4319adb1899d946ecee3bfb7079dbe46689d6016d94fc08b610ed56fb1113b81 + + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.h") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinytoml RENAME copyright) diff --git a/vcpkg/ports/tinyutf8/CONTROL b/vcpkg/ports/tinyutf8/CONTROL new file mode 100644 index 0000000..77002cb --- /dev/null +++ b/vcpkg/ports/tinyutf8/CONTROL @@ -0,0 +1,3 @@ +Source: tinyutf8 +Version: 4.0.2 +Description: TINYUTF8 is a library for extremely easy integration of Unicode into an arbitrary C++11 project. diff --git a/vcpkg/ports/tinyutf8/fixbuild.patch b/vcpkg/ports/tinyutf8/fixbuild.patch new file mode 100644 index 0000000..a200808 --- /dev/null +++ b/vcpkg/ports/tinyutf8/fixbuild.patch @@ -0,0 +1,43 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index eef0c41..5d2c0d1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,7 +1,7 @@ + cmake_minimum_required(VERSION 3.1) + project(tinyutf8) + +-set(CMAKE_CXX_STANDARD 11) ++set(CMAKE_CXX_STANDARD 17) + + option(TINYUTF8_BUILD_STATIC "Build as static library" On) + +@@ -12,3 +12,14 @@ else() + endif() + + add_library(tinyutf8 ${LIB_BUILD_TYPE} tinyutf8.cpp) ++ ++if(MSVC) ++ ADD_DEFINITIONS(-D_UNICODE) ++endif() ++ ++install(TARGETS tinyutf8 ++ RUNTIME DESTINATION bin ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib) ++ ++install(FILES tinyutf8.h DESTINATION include) +diff --git a/tinyutf8.cpp b/tinyutf8.cpp +index ca07b1e..502312f 100644 +--- a/tinyutf8.cpp ++++ b/tinyutf8.cpp +@@ -1,6 +1,6 @@ + #include "tinyutf8.h" + + // Explicit template instantiations for utf8_string +-template struct tiny_utf8::basic_utf8_string<>; +-template extern std::ostream& operator<<( std::ostream& stream , const tiny_utf8::basic_utf8_string<>& str ); +-template extern std::istream& operator>>( std::istream& stream , tiny_utf8::basic_utf8_string<>& str ); +\ No newline at end of file ++template class tiny_utf8::basic_utf8_string<>; ++extern template std::ostream& operator<<( std::ostream& stream , const tiny_utf8::basic_utf8_string<>& str ); ++extern template std::istream& operator>>( std::istream& stream , tiny_utf8::basic_utf8_string<>& str ); diff --git a/vcpkg/ports/tinyutf8/portfile.cmake b/vcpkg/ports/tinyutf8/portfile.cmake new file mode 100644 index 0000000..26b5fb9 --- /dev/null +++ b/vcpkg/ports/tinyutf8/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO DuffsDevice/tinyutf8 + REF 68eaf247a3761c324b1a3806a954d773dfe9106b + SHA512 e8bd51ea66a84d236be7c2028b6f3a67b5b01f0fac758729f3152542c8a6a859ddb3f72d6c5abb058c909bf84862ed816e2235cfde6bfa7edaa8026a4f7f4b2a + HEAD_REF master + PATCHES fixbuild.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" TINYUTF8_BUILD_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DTINYUTF8_BUILD_STATIC=${TINYUTF8_BUILD_STATIC} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENCE ${CURRENT_PACKAGES_DIR}/share/tinyutf8/copyright COPYONLY) + +# remove unneeded files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/vcpkg/ports/tinyxml/0001_use_stl.patch b/vcpkg/ports/tinyxml/0001_use_stl.patch new file mode 100644 index 0000000..a36f930 --- /dev/null +++ b/vcpkg/ports/tinyxml/0001_use_stl.patch @@ -0,0 +1,27 @@ +From 5ca492fee93015411a0f10e0b2f1d3503bf962a1 Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka +Date: Sun, 3 Sep 2017 21:43:36 +0300 +Subject: [PATCH] enforce STL usage + +--- + tinyxml.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/tinyxml.h b/tinyxml.h +index a3589e5..7195033 100644 +--- a/tinyxml.h ++++ b/tinyxml.h +@@ -43,6 +43,10 @@ distribution. + #define DEBUG + #endif + ++#ifndef TIXML_USE_STL ++#define TIXML_USE_STL ++#endif ++ + #ifdef TIXML_USE_STL + #include + #include +-- +2.12.2.windows.2 + diff --git a/vcpkg/ports/tinyxml/0002_export_tinyxml.patch b/vcpkg/ports/tinyxml/0002_export_tinyxml.patch new file mode 100644 index 0000000..7f09a6e --- /dev/null +++ b/vcpkg/ports/tinyxml/0002_export_tinyxml.patch @@ -0,0 +1,26 @@ +# User Francisco Dias +# Date 1545049386 7200 +# Mon Dec 17 10:23:06 2018 -0200 +Export tinyXML. + +diff --git a/tinyxml.h b/tinyxml.h +--- a/tinyxml.h ++++ b/tinyxml.h +@@ -38,6 +38,8 @@ + #include + #include + ++#include "tinyxml_export.h" ++ + // Help out windows: + #if defined( _DEBUG ) && !defined( DEBUG ) + #define DEBUG +@@ -414,7 +416,7 @@ + + }; + static Entity entity[ NUM_ENTITY ]; +- static bool condenseWhiteSpace; ++ static TINYXML_EXPORT bool condenseWhiteSpace; + }; + + diff --git a/vcpkg/ports/tinyxml/CMakeLists.txt b/vcpkg/ports/tinyxml/CMakeLists.txt new file mode 100644 index 0000000..2004da4 --- /dev/null +++ b/vcpkg/ports/tinyxml/CMakeLists.txt @@ -0,0 +1,40 @@ +cmake_minimum_required(VERSION 3.4) +project(tinyxml) + +set(HEADERS "tinyxml.h") + +set(SOURCES "tinyxml.cpp" + "tinyxmlerror.cpp" + "tinyxmlparser.cpp" +) + +option(BUILD_SHARED_LIBS "Build shared libs" OFF) + +add_library(unofficial-tinyxml ${SOURCES}) +target_compile_definitions(unofficial-tinyxml PRIVATE "-DTIXML_USE_STL") +set_target_properties(unofficial-tinyxml PROPERTIES OUTPUT_NAME tinyxml) + +include(GenerateExportHeader) +generate_export_header(unofficial-tinyxml BASE_NAME tinyxml) + +target_include_directories(unofficial-tinyxml + PUBLIC + $ + $ +) +install(TARGETS unofficial-tinyxml + EXPORT tinyxml-export + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin +) +install(EXPORT tinyxml-export +FILE + tinyxmlTargets.cmake +NAMESPACE + unofficial-tinyxml:: +DESTINATION + share/tinyxml +) +install(FILES ${HEADERS} + ${CMAKE_CURRENT_BINARY_DIR}/tinyxml_export.h DESTINATION include) diff --git a/vcpkg/ports/tinyxml/CONTROL b/vcpkg/ports/tinyxml/CONTROL new file mode 100644 index 0000000..3a83e41 --- /dev/null +++ b/vcpkg/ports/tinyxml/CONTROL @@ -0,0 +1,4 @@ +Source: tinyxml +Version: 2.6.2-7 +Homepage: https://sourceforge.net/projects/tinyxml +Description: A simple, small, minimal, C++ XML parser that can be easily integrating into other programs. diff --git a/vcpkg/ports/tinyxml/License.txt b/vcpkg/ports/tinyxml/License.txt new file mode 100644 index 0000000..2987cf7 --- /dev/null +++ b/vcpkg/ports/tinyxml/License.txt @@ -0,0 +1,20 @@ +TinyXML is released under the zlib license: + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. \ No newline at end of file diff --git a/vcpkg/ports/tinyxml/portfile.cmake b/vcpkg/ports/tinyxml/portfile.cmake new file mode 100644 index 0000000..1f42e4d --- /dev/null +++ b/vcpkg/ports/tinyxml/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO tinyxml/tinyxml + REF 2.6.2 + FILENAME "tinyxml_2_6_2.tar.gz" + SHA512 133b5db06131a90ad0c2b39b0063f1c8e65e67288a7e5d67e1f7d9ba32af10dc5dfa0462f9723985ee27debe8f09a10a25d4b5a5aaff2ede979b1cebe8e59d56 + PATCHES + 0001_use_stl.patch + 0002_export_tinyxml.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/License.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyxml RENAME copyright) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/tinyxml-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/tinyxml) diff --git a/vcpkg/ports/tinyxml/tinyxml-config.cmake b/vcpkg/ports/tinyxml/tinyxml-config.cmake new file mode 100644 index 0000000..15ad7bd --- /dev/null +++ b/vcpkg/ports/tinyxml/tinyxml-config.cmake @@ -0,0 +1,8 @@ +if (tinyxml_CONFIG_INCLUDED) + return() +endif() +set(tinyxml_CONFIG_INCLUDED TRUE) + +include(${CMAKE_CURRENT_LIST_DIR}/tinyxmlTargets.cmake) +set(tinyxml_LIBRARIES unofficial-tinyxml::unofficial-tinyxml) +get_target_property(tinyxml_INCLUDE_DIRS unofficial-tinyxml::unofficial-tinyxml INTERFACE_INCLUDE_DIRECTORIES) \ No newline at end of file diff --git a/vcpkg/ports/tinyxml2/CONTROL b/vcpkg/ports/tinyxml2/CONTROL new file mode 100644 index 0000000..3be0a85 --- /dev/null +++ b/vcpkg/ports/tinyxml2/CONTROL @@ -0,0 +1,4 @@ +Source: tinyxml2 +Version: 8.0.0-1 +Homepage: https://github.com/leethomason/tinyxml2 +Description: A simple, small, efficient, C++ XML parser diff --git a/vcpkg/ports/tinyxml2/fix-debug-postfix.patch b/vcpkg/ports/tinyxml2/fix-debug-postfix.patch new file mode 100644 index 0000000..8021e0f --- /dev/null +++ b/vcpkg/ports/tinyxml2/fix-debug-postfix.patch @@ -0,0 +1,43 @@ +From 1e384d50313a08dd36a43df1925588741dc33301 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Wolfgang=20St=C3=B6ggl?= +Date: Wed, 17 Jun 2020 06:17:06 +0200 +Subject: [PATCH] Fix debug postfix in pkgconfig file + +CMakeLists.txt uses set(CMAKE_DEBUG_POSTFIX "d") to distinguish +between debug and release lib. Use this postfix also in the +generated tinyxml2.pc file in case of a CMake Debug build. +This results in the following contents of tinyxml2.pc +- Release: + Libs: -L${libdir} -ltinyxml2 +- Debug: + Libs: -L${libdir} -ltinyxml2d +--- + CMakeLists.txt | 3 +++ + tinyxml2.pc.in | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9f9ab07..7085276 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -106,6 +106,9 @@ endif() + + install(FILES tinyxml2.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT tinyxml2_headers) + ++if(CMAKE_BUILD_TYPE MATCHES Debug) ++ set(LIB_POSTFIX ${CMAKE_DEBUG_POSTFIX}) ++endif() + configure_file(tinyxml2.pc.in tinyxml2.pc @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/tinyxml2.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig COMPONENT tinyxml2_config) + +diff --git a/tinyxml2.pc.in b/tinyxml2.pc.in +index b040b0e..b100f60 100644 +--- a/tinyxml2.pc.in ++++ b/tinyxml2.pc.in +@@ -6,5 +6,5 @@ includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ + Name: TinyXML2 + Description: simple, small, C++ XML parser + Version: @GENERIC_LIB_VERSION@ +-Libs: -L${libdir} -ltinyxml2 ++Libs: -L${libdir} -ltinyxml2@LIB_POSTFIX@ + Cflags: -I${includedir} diff --git a/vcpkg/ports/tinyxml2/fix-symbol-exports.patch b/vcpkg/ports/tinyxml2/fix-symbol-exports.patch new file mode 100644 index 0000000..7108d05 --- /dev/null +++ b/vcpkg/ports/tinyxml2/fix-symbol-exports.patch @@ -0,0 +1,36 @@ +From f8b048656b9937252ce5fb4ebea9e5df5b203bdb Mon Sep 17 00:00:00 2001 +From: Owen Rudge +Date: Wed, 27 May 2020 09:40:59 +0100 +Subject: [PATCH] cmake: Don't export symbols if building static library + +--- + CMakeLists.txt | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9f9ab07..67b4f33 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -50,10 +50,16 @@ set(CMAKE_DEBUG_POSTFIX "d") + + add_library(tinyxml2 tinyxml2.cpp tinyxml2.h) + +-set_target_properties(tinyxml2 PROPERTIES ++if(BUILD_SHARED_LIBS) ++ set_target_properties(tinyxml2 PROPERTIES + COMPILE_DEFINITIONS "TINYXML2_EXPORT" +- VERSION "${GENERIC_LIB_VERSION}" +- SOVERSION "${GENERIC_LIB_SOVERSION}") ++ VERSION "${GENERIC_LIB_VERSION}" ++ SOVERSION "${GENERIC_LIB_SOVERSION}") ++else() ++ set_target_properties(tinyxml2 PROPERTIES ++ VERSION "${GENERIC_LIB_VERSION}" ++ SOVERSION "${GENERIC_LIB_SOVERSION}") ++endif() + + target_compile_definitions(tinyxml2 PUBLIC $<$:TINYXML2_DEBUG>) + +-- +2.25.1.windows.1 + diff --git a/vcpkg/ports/tinyxml2/portfile.cmake b/vcpkg/ports/tinyxml2/portfile.cmake new file mode 100644 index 0000000..d4fb1c3 --- /dev/null +++ b/vcpkg/ports/tinyxml2/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO leethomason/tinyxml2 + REF 8.0.0 + SHA512 bcbb065c2af34ea681ec556377fd22e720b6f5d4caa73f432b1e34e08603a96f2233763f0ec5ae86b9ee71ddbe3062f58d3794cd3a162ce6903435530de0bba6 + HEAD_REF master + PATCHES + fix-symbol-exports.patch + fix-debug-postfix.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/tinyxml2) +vcpkg_fixup_pkgconfig() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/readme.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/tl-expected/CONTROL b/vcpkg/ports/tl-expected/CONTROL new file mode 100644 index 0000000..b074795 --- /dev/null +++ b/vcpkg/ports/tl-expected/CONTROL @@ -0,0 +1,3 @@ +Source: tl-expected +Version: 1.0.0-1 +Description: C++11/14/17 std::expected implementation with functional-style extensions diff --git a/vcpkg/ports/tl-expected/portfile.cmake b/vcpkg/ports/tl-expected/portfile.cmake new file mode 100644 index 0000000..80ec7e8 --- /dev/null +++ b/vcpkg/ports/tl-expected/portfile.cmake @@ -0,0 +1,33 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO TartanLlama/expected + REF v1.0.0 + SHA512 747ea34b5540dfcf595896332851f10c52a823ab8ba3fc8152478b0a9e8ca01f0f26827348407249827f4106ff577bd6e697ea6f749c1f21bd1f0913a621075d + HEAD_REF master +) + +vcpkg_from_github( + OUT_SOURCE_PATH TL_CMAKE_SOURCE_DIR + REPO TartanLlama/tl-cmake + REF 284c6a3f0f61823cc3871b0f193e8df699e2c4ce + SHA512 f611326d75d6e87e58cb05e91f9506b1d83e6fd3b214fe311c4c15604feabfb7a18bbf9c4b4c389a39d615eb468b1f4b15802ab9f44f334a12310cb183fa77a7 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFETCHCONTENT_FULLY_DISCONNECTED=ON + -DFETCHCONTENT_SOURCE_DIR_TL_CMAKE=${TL_CMAKE_SOURCE_DIR} + -DEXPECTED_ENABLE_TESTS=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/tl-expected RENAME copyright) diff --git a/vcpkg/ports/tl-function-ref/CONTROL b/vcpkg/ports/tl-function-ref/CONTROL new file mode 100644 index 0000000..be89f77 --- /dev/null +++ b/vcpkg/ports/tl-function-ref/CONTROL @@ -0,0 +1,3 @@ +Source: tl-function-ref +Version: 1.0.0-1 +Description: A lightweight, non-owning reference to a callable. \ No newline at end of file diff --git a/vcpkg/ports/tl-function-ref/portfile.cmake b/vcpkg/ports/tl-function-ref/portfile.cmake new file mode 100644 index 0000000..07df6a0 --- /dev/null +++ b/vcpkg/ports/tl-function-ref/portfile.cmake @@ -0,0 +1,33 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO TartanLlama/function_ref + REF v1.0.0 + SHA512 64324049021548361caa667a5ad61a8c0acc787d3966e5b132520da99af709970e37b5a5cb71f69523b6254c9d0d8bab441356e7a25880fe53a6998067c587bd + HEAD_REF master +) + +vcpkg_from_github( + OUT_SOURCE_PATH TL_CMAKE_SOURCE_DIR + REPO TartanLlama/tl-cmake + REF 284c6a3f0f61823cc3871b0f193e8df699e2c4ce + SHA512 f611326d75d6e87e58cb05e91f9506b1d83e6fd3b214fe311c4c15604feabfb7a18bbf9c4b4c389a39d615eb468b1f4b15802ab9f44f334a12310cb183fa77a7 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFETCHCONTENT_FULLY_DISCONNECTED=ON + -DFETCHCONTENT_SOURCE_DIR_TL_CMAKE=${TL_CMAKE_SOURCE_DIR} + -DFUNCTION_REF_ENABLE_TESTS=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/tl-function-ref RENAME copyright) diff --git a/vcpkg/ports/tl-optional/CONTROL b/vcpkg/ports/tl-optional/CONTROL new file mode 100644 index 0000000..5464d80 --- /dev/null +++ b/vcpkg/ports/tl-optional/CONTROL @@ -0,0 +1,3 @@ +Source: tl-optional +Version: 1.0.0-1 +Description: C++11/14/17 std::optional implementation with functional-style extensions diff --git a/vcpkg/ports/tl-optional/portfile.cmake b/vcpkg/ports/tl-optional/portfile.cmake new file mode 100644 index 0000000..3c3085c --- /dev/null +++ b/vcpkg/ports/tl-optional/portfile.cmake @@ -0,0 +1,33 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO TartanLlama/optional + REF v1.0.0 + SHA512 6e5020808650ec312f5cdf4bc92be9067dc214c2e02d635511e99b325d34c360ce360cf93e67287dba4b9c0d674f3cbae96a75b83b13374fbb1291d2bb0f078a + HEAD_REF master +) + +vcpkg_from_github( + OUT_SOURCE_PATH TL_CMAKE_SOURCE_DIR + REPO TartanLlama/tl-cmake + REF 284c6a3f0f61823cc3871b0f193e8df699e2c4ce + SHA512 f611326d75d6e87e58cb05e91f9506b1d83e6fd3b214fe311c4c15604feabfb7a18bbf9c4b4c389a39d615eb468b1f4b15802ab9f44f334a12310cb183fa77a7 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DFETCHCONTENT_FULLY_DISCONNECTED=ON + -DFETCHCONTENT_SOURCE_DIR_TL_CMAKE=${TL_CMAKE_SOURCE_DIR} + -DOPTIONAL_ENABLE_TESTS=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/tl-optional RENAME copyright) diff --git a/vcpkg/ports/tlx/CONTROL b/vcpkg/ports/tlx/CONTROL new file mode 100644 index 0000000..b65af72 --- /dev/null +++ b/vcpkg/ports/tlx/CONTROL @@ -0,0 +1,4 @@ +Source: tlx +Version: 0.5.20191212 +Homepage: https://github.com/tlx/tlx +Description: tlx is a collection of C++ helpers and extensions universally needed, but not found in the STL diff --git a/vcpkg/ports/tlx/portfile.cmake b/vcpkg/ports/tlx/portfile.cmake new file mode 100644 index 0000000..525894d --- /dev/null +++ b/vcpkg/ports/tlx/portfile.cmake @@ -0,0 +1,38 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +# TODO: Fix .dlls not producing .lib files + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tlx/tlx + REF 903b9b35df8731496a90d8d74f8bedbad2517d9b + SHA512 17087973f2f4751538c589e9f80d2b5ea872d2e7d90659769ae3350d441bda0b64aec9a4150d01a7cf5323ce327ebd104cdca7b4a3bc4eebdf574e71e013ba6e + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DVERBOSE=1 + -DTLX_BUILD_TESTS=off + -DTLX_USE_GCOV=off + -DTLX_TRY_COMPILE_HEADERS=off + -DTLX_MORE_TESTS=off + -DTLX_BUILD_STATIC_LIBS=${BUILD_STATIC} + -DTLX_BUILD_SHARED_LIBS=${BUILD_SHARED} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH "CMake/") +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/tlx") +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/tmx/CONTROL b/vcpkg/ports/tmx/CONTROL new file mode 100644 index 0000000..970b433 --- /dev/null +++ b/vcpkg/ports/tmx/CONTROL @@ -0,0 +1,5 @@ +Source: tmx +Version: 1.0.0 +Port-Version: 2 +Description: A portable C library to load tiled maps in your games. +Build-Depends: zlib, libxml2 diff --git a/vcpkg/ports/tmx/fix-build-error.patch b/vcpkg/ports/tmx/fix-build-error.patch new file mode 100644 index 0000000..654fb4d --- /dev/null +++ b/vcpkg/ports/tmx/fix-build-error.patch @@ -0,0 +1,26 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b29edce..48d0553 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -66,8 +66,9 @@ write_basic_package_version_file("tmxConfigVersion.cmake" COMPATIBILITY SameMajo + # Build + #-----------# + +-list(APPEND targets tmx) ++set(targets tmx) + ++if (NOT BUILD_SHARED_LIBS) + add_library(tmx STATIC ${SOURCES}) + set_target_properties(tmx PROPERTIES VERSION ${BUILD_VERSION}) + +@@ -75,8 +76,8 @@ set_property(TARGET tmx + APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES + $) + +-if(BUILD_SHARED_LIBS) +- list(APPEND targets tmx_shared) ++else() ++ set(targets tmx_shared) + + add_library(tmx_shared SHARED ${SOURCES}) + target_link_libraries(tmx_shared PRIVATE ${libs}) diff --git a/vcpkg/ports/tmx/portfile.cmake b/vcpkg/ports/tmx/portfile.cmake new file mode 100644 index 0000000..c2231f4 --- /dev/null +++ b/vcpkg/ports/tmx/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO baylej/tmx + REF tmx_1.0.0 + HEAD_REF master + SHA512 d045c45efd03f91a81dae471cb9ddc80d222b3ac52e13b729deeaf3e07d0a03b8e0956b30336ef410c72ddbbf33bea6811da5454b88d44b1db75683ef2a9383a + PATCHES fix-build-error.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/tmx/tmxExports.cmake ${CURRENT_PACKAGES_DIR}/lib/cmake/tmx/tmxTargets.cmake) +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/tmx) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/tmx/tmxTargets.cmake ${CURRENT_PACKAGES_DIR}/share/tmx/tmxExports.cmake) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +# Handle copyright +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/tmx/copyright COPYONLY) diff --git a/vcpkg/ports/tmxlite/CONTROL b/vcpkg/ports/tmxlite/CONTROL new file mode 100644 index 0000000..eb3cfdd --- /dev/null +++ b/vcpkg/ports/tmxlite/CONTROL @@ -0,0 +1,3 @@ +Source: tmxlite +Version: 2019-03-05 +Description: A lightweight C++14 parsing library for tmx map files created with the Tiled map editor. \ No newline at end of file diff --git a/vcpkg/ports/tmxlite/portfile.cmake b/vcpkg/ports/tmxlite/portfile.cmake new file mode 100644 index 0000000..14f1234 --- /dev/null +++ b/vcpkg/ports/tmxlite/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO fallahn/tmxlite + REF 591dd0371dceb2c43abeceac11cd9e8077880cca + HEAD_REF master + SHA512 a857aea3ec99c686e97d25ecb2bdd8d2f2f14dcb8419e14535ace8794bfbc21fe825cffc60e589df7291ae35076fb6734f7047c985a6ea6d0c55c861c07ba784 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/tmxlite + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +configure_file(${SOURCE_PATH}/readme.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) \ No newline at end of file diff --git a/vcpkg/ports/tmxparser/CONTROL b/vcpkg/ports/tmxparser/CONTROL new file mode 100644 index 0000000..52288b2 --- /dev/null +++ b/vcpkg/ports/tmxparser/CONTROL @@ -0,0 +1,4 @@ +Source: tmxparser +Version: 2.1.0-4 +Description: C++11 library for parsing the maps generated by the Map Editor called Tiled. +Build-Depends: zlib, tinyxml2 diff --git a/vcpkg/ports/tmxparser/fix_include_paths.patch b/vcpkg/ports/tmxparser/fix_include_paths.patch new file mode 100644 index 0000000..fedcb43 --- /dev/null +++ b/vcpkg/ports/tmxparser/fix_include_paths.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9d06cb4..593bbfd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -43,6 +43,8 @@ endif (NOT USE_MINIZ) + + set(EXAMPLE_CFLAGS "-std=c++11 -pedantic -Werror -Wall -g") + #include_directories("${PROJECT_SOURCE_DIR}/include") ++include_directories("${PROJECT_BINARY_DIR}") ++include_directories("${PROJECT_SOURCE_DIR}/src") + + add_library(tmxparser_static STATIC ${SOURCES} ${HEADERS}) + set_target_properties(tmxparser_static PROPERTIES +@@ -67,8 +69,6 @@ add_executable(run_tests test/test.cpp) + set_target_properties(run_tests PROPERTIES + COMPILE_FLAGS ${EXAMPLE_CFLAGS}) + target_link_libraries(run_tests tmxparser ${TINYXML2_LIBRARIES}) +-include_directories("${PROJECT_BINARY_DIR}") +-include_directories("${PROJECT_SOURCE_DIR}/src") + + install(FILES ${HEADERS} DESTINATION include/tmxparser) + install(TARGETS tmxparser tmxparser_static DESTINATION lib) diff --git a/vcpkg/ports/tmxparser/portfile.cmake b/vcpkg/ports/tmxparser/portfile.cmake new file mode 100644 index 0000000..1f1b9e2 --- /dev/null +++ b/vcpkg/ports/tmxparser/portfile.cmake @@ -0,0 +1,37 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sainteos/tmxparser + REF v2.1.0 + HEAD_REF master + SHA512 011cce3bb98057f8e2a0a82863fedb7c4b9e41324d5cfa6daade4d000c3f6c8c157da7b153f7f2564ecdefe8019fc8446c9b1b8a675be04329b04a0891ee1c27 + PATCHES + fix_include_paths.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(GLOB LIBS ${CURRENT_PACKAGES_DIR}/lib/*.so* ${CURRENT_PACKAGES_DIR}/debug/lib/*.so*) + if(LIBS) + file(REMOVE ${LIBS}) + endif() +else() + file(GLOB LIBS ${CURRENT_PACKAGES_DIR}/lib/*.a ${CURRENT_PACKAGES_DIR}/debug/lib/*.a) + if(LIBS) + file(REMOVE ${LIBS}) + endif() +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/toml11/CONTROL b/vcpkg/ports/toml11/CONTROL new file mode 100644 index 0000000..2dc5746 --- /dev/null +++ b/vcpkg/ports/toml11/CONTROL @@ -0,0 +1,4 @@ +Source: toml11 +Version: 3.5.0 +Homepage: https://github.com/ToruNiina/toml11 +Description: A C++11 header-only toml parser/encoder depending only on C++ standard library. diff --git a/vcpkg/ports/toml11/portfile.cmake b/vcpkg/ports/toml11/portfile.cmake new file mode 100644 index 0000000..bb35b3d --- /dev/null +++ b/vcpkg/ports/toml11/portfile.cmake @@ -0,0 +1,13 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ToruNiina/toml11 + REF v3.5.0 + SHA512 19c6ee42aa1e186689062e5d2be05f375c8ae4be40be4b6a8e803a642f37214270d5600ccec3d06b4e69aec6896d823e3a8faea29a41643279922d1fe9fae70a + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/toml.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL ${SOURCE_PATH}/toml DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.hpp") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/tomlplusplus/CONTROL b/vcpkg/ports/tomlplusplus/CONTROL new file mode 100644 index 0000000..5cba84a --- /dev/null +++ b/vcpkg/ports/tomlplusplus/CONTROL @@ -0,0 +1,5 @@ +Source: tomlplusplus +Version: 2.1.0 +Homepage: https://marzer.github.io/tomlplusplus/ +Description: Header-only TOML config file parser and serializer for modern C++. +Supports: !(arm|uwp|linux|osx) diff --git a/vcpkg/ports/tomlplusplus/portfile.cmake b/vcpkg/ports/tomlplusplus/portfile.cmake new file mode 100644 index 0000000..26b8f81 --- /dev/null +++ b/vcpkg/ports/tomlplusplus/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64" ON_TARGET "linux" "osx" "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO marzer/tomlplusplus + REF v2.1.0 + SHA512 7bd0ea4ecfc90946487acd545bc8635a85353506c90553f4a6f8e3d83c30f85ac12e1ce82c10e03a4ea335c1b622e64ea0753efca9b2829907996e3a6d28867a + HEAD_REF master +) + +vcpkg_configure_meson( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DGENERATE_CMAKE_CONFIG=enabled + -DBUILD_TESTS=disabled + -DBUILD_EXAMPLES=disabled +) + +vcpkg_install_meson() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/tool-meson/CONTROL b/vcpkg/ports/tool-meson/CONTROL new file mode 100644 index 0000000..2d387c9 --- /dev/null +++ b/vcpkg/ports/tool-meson/CONTROL @@ -0,0 +1,4 @@ +Source: tool-meson +Version: 0.55.3 +Homepage: https://github.com/mesonbuild/meson +Description: Meson build system diff --git a/vcpkg/ports/tool-meson/portfile.cmake b/vcpkg/ports/tool-meson/portfile.cmake new file mode 100644 index 0000000..c39e614 --- /dev/null +++ b/vcpkg/ports/tool-meson/portfile.cmake @@ -0,0 +1,7 @@ +# This port represents a dependency on the Meson build system. +# In the future, it is expected that this port acquires and installs Meson. +# Currently is used in ports that call vcpkg_find_acquire_program(MESON) in order to force rebuilds. + +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +vcpkg_find_acquire_program(MESON) +message(STATUS "Using meson: ${MESON}") \ No newline at end of file diff --git a/vcpkg/ports/torch-th/CONTROL b/vcpkg/ports/torch-th/CONTROL new file mode 100644 index 0000000..906734f --- /dev/null +++ b/vcpkg/ports/torch-th/CONTROL @@ -0,0 +1,4 @@ +Source: torch-th +Version: 2019-04-19-2 +Homepage: https://github.com/torch/torch7 +Description: Torch's TH library diff --git a/vcpkg/ports/torch-th/debug.patch b/vcpkg/ports/torch-th/debug.patch new file mode 100644 index 0000000..2a15e84 --- /dev/null +++ b/vcpkg/ports/torch-th/debug.patch @@ -0,0 +1,52 @@ +diff --git a/lib/TH/CMakeLists.txt b/lib/TH/CMakeLists.txt +index 803dfe1..7db876b 100644 +--- a/lib/TH/CMakeLists.txt ++++ b/lib/TH/CMakeLists.txt +@@ -221,7 +221,13 @@ ENDIF(C_AVX2_FOUND OR C_AVX_FOUND OR C_SSE4_2_FOUND OR C_SSE4_1_FOUND) + IF(C_SSE4_1_FOUND AND C_SSE4_2_FOUND) + SET(CMAKE_C_FLAGS "${C_SSE4_1_FLAGS} -DUSE_SSE4_1 ${C_SSE4_2_FLAGS} -DUSE_SSE4_2 ${CMAKE_C_FLAGS}") + IF(MSVC) +- SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_sse.c PROPERTIES COMPILE_FLAGS "/Ox /fp:fast") ++ IF(CMAKE_BUILD_TYPE STREQUAL Release) ++ SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_sse.c PROPERTIES COMPILE_FLAGS "/Ox /fp:fast") ++ MESSAGE(STATUS "Release mode. Found SSE4_1 and SSE4_2.") ++ ELSE() ++ SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_sse.c PROPERTIES COMPILE_FLAGS "/fp:fast") ++ MESSAGE(STATUS "Non-release mode. Found SSE4_1 and SSE4_2.") ++ ENDIF() + ELSE(MSVC) + SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_sse.c PROPERTIES COMPILE_FLAGS "-O3 -ffast-math") + ENDIF(MSVC) +@@ -231,8 +237,15 @@ ENDIF(C_SSE4_1_FOUND AND C_SSE4_2_FOUND) + # IF AVX FOUND + IF(C_AVX_FOUND) + IF(MSVC) +- SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_avx.c PROPERTIES COMPILE_FLAGS "/Ox /fp:fast ${C_AVX_FLAGS}") +- SET_SOURCE_FILES_PROPERTIES(vector/AVX.c PROPERTIES COMPILE_FLAGS "/Ox /arch:AVX ${C_AVX_FLAGS}") ++ IF(CMAKE_BUILD_TYPE STREQUAL Release) ++ SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_avx.c PROPERTIES COMPILE_FLAGS "/Ox /fp:fast ${C_AVX_FLAGS}") ++ SET_SOURCE_FILES_PROPERTIES(vector/AVX.c PROPERTIES COMPILE_FLAGS "/Ox /arch:AVX ${C_AVX_FLAGS}") ++ MESSAGE(STATUS "Release mode. Found AVX.") ++ ELSE() ++ SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_avx.c PROPERTIES COMPILE_FLAGS "/fp:fast ${C_AVX_FLAGS}") ++ SET_SOURCE_FILES_PROPERTIES(vector/AVX.c PROPERTIES COMPILE_FLAGS "/arch:AVX ${C_AVX_FLAGS}") ++ MESSAGE(STATUS "Non-release mode. Found AVX.") ++ ENDIF() + ELSE(MSVC) + SET_SOURCE_FILES_PROPERTIES(generic/simd/convolve5x5_avx.c PROPERTIES COMPILE_FLAGS "-O3 -ffast-math ${C_AVX_FLAGS}") + SET_SOURCE_FILES_PROPERTIES(vector/AVX.c PROPERTIES COMPILE_FLAGS "-O3 ${C_AVX_FLAGS}") +@@ -242,7 +255,13 @@ ENDIF(C_AVX_FOUND) + + IF(C_AVX2_FOUND) + IF(MSVC) +- SET_SOURCE_FILES_PROPERTIES(vector/AVX2.c PROPERTIES COMPILE_FLAGS "/Ox /arch:AVX2 ${C_AVX2_FLAGS}") ++ IF(CMAKE_BUILD_TYPE STREQUAL Release) ++ SET_SOURCE_FILES_PROPERTIES(vector/AVX2.c PROPERTIES COMPILE_FLAGS "/Ox /arch:AVX2 ${C_AVX2_FLAGS}") ++ MESSAGE(STATUS "Release mode. Found AVX2.") ++ ELSE() ++ SET_SOURCE_FILES_PROPERTIES(vector/AVX2.c PROPERTIES COMPILE_FLAGS "/arch:AVX2 ${C_AVX2_FLAGS}") ++ MESSAGE(STATUS "Non-release mode. Found AVX2.") ++ ENDIF() + ELSE(MSVC) + SET_SOURCE_FILES_PROPERTIES(vector/AVX2.c PROPERTIES COMPILE_FLAGS "-O3 ${C_AVX2_FLAGS}") + ENDIF(MSVC) diff --git a/vcpkg/ports/torch-th/portfile.cmake b/vcpkg/ports/torch-th/portfile.cmake new file mode 100644 index 0000000..0d72246 --- /dev/null +++ b/vcpkg/ports/torch-th/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO torch/torch7 + REF dde9e56fb61eee040d7f3dba2331c6d6c095aee8 + SHA512 ef813e6f583f26019da362be1e5d9886ecf3306a2b41e5f7a73d432872eacd2745e0cf26bfcc691452f87611e02e302c54f07b2f3a3288744535e57d154a73db + HEAD_REF master + PATCHES + debug.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/lib/TH + PREFER_NINJA + OPTIONS + -DWITH_OPENMP=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYRIGHT.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/torch-th RENAME copyright) diff --git a/vcpkg/ports/trantor/CONTROL b/vcpkg/ports/trantor/CONTROL new file mode 100644 index 0000000..3644408 --- /dev/null +++ b/vcpkg/ports/trantor/CONTROL @@ -0,0 +1,5 @@ +Source: trantor +Version: 1.0.0 +Homepage: https://github.com/an-tao/trantor +Description: A non-blocking I/O cross-platform TCP network library, using C++14. +Build-Depends: openssl, c-ares diff --git a/vcpkg/ports/trantor/portfile.cmake b/vcpkg/ports/trantor/portfile.cmake new file mode 100644 index 0000000..0e6df2e --- /dev/null +++ b/vcpkg/ports/trantor/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO an-tao/trantor + REF v1.0.0 + SHA512 bf78bad777f91f7504e7cf726557b50c349b4b0324a8091cd5294cff8c87444ed268302bf3a2ef1f9c7b1057c2f76b323dfaed687f41cd7f6255c078608c22db + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +# Fix CMake files +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Trantor) + +# # Remove includes in debug +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +# Handle copyright +file(INSTALL ${SOURCE_PATH}/License DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# Copy pdb files +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/tre/CMakeLists.txt b/vcpkg/ports/tre/CMakeLists.txt new file mode 100644 index 0000000..09113fc --- /dev/null +++ b/vcpkg/ports/tre/CMakeLists.txt @@ -0,0 +1,37 @@ +cmake_minimum_required (VERSION 3.9) +project (tre) + +set (HEADERS + lib/regex.h + include/tre/tre.h + include/tre/tre-config.h +) + +set (SRCS + lib/regcomp.c + lib/regerror.c + lib/regexec.c + lib/tre-ast.c + lib/tre-compile.c + lib/tre-match-approx.c + lib/tre-match-backtrack.c + lib/tre-match-parallel.c + lib/tre-mem.c + lib/tre-parse.c + lib/tre-stack.c + lib/xmalloc.c + win32/tre.def +) + +include_directories(win32 include/tre) +add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -DHAVE_CONFIG_H) +add_library(tre ${SRCS}) + +install( + TARGETS tre + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install(FILES ${HEADERS} DESTINATION include/tre) diff --git a/vcpkg/ports/tre/CONTROL b/vcpkg/ports/tre/CONTROL new file mode 100644 index 0000000..70a5ce0 --- /dev/null +++ b/vcpkg/ports/tre/CONTROL @@ -0,0 +1,4 @@ +Source: tre +Version: 0.8.0-1 +Homepage: https://github.com/laurikari/tre +Description: TRE is a lightweight, robust, and efficient POSIX compliant regexp matching library with some exciting features such as approximate (fuzzy) matching. diff --git a/vcpkg/ports/tre/portfile.cmake b/vcpkg/ports/tre/portfile.cmake new file mode 100644 index 0000000..0cf9930 --- /dev/null +++ b/vcpkg/ports/tre/portfile.cmake @@ -0,0 +1,26 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO laurikari/tre + REF 6fb7206b935b35814c5078c20046dbe065435363 + SHA512 f1d664719eab23b665d71e34ca3d11f8ba49da23ff20dc28f46d4ce30fe155c12208ba7fd212dbeb20a7037e069909f0c2120ce1fc01074656399805e3289a90 + HEAD_REF master +) + +file(READ ${SOURCE_PATH}/win32/config.h CONFIG_H) +string(REPLACE "#define snprintf sprintf_s" "" CONFIG_H ${CONFIG_H}) +file(WRITE ${SOURCE_PATH}/win32/config.h "${CONFIG_H}") + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/tre RENAME copyright) diff --git a/vcpkg/ports/treehopper/CONTROL b/vcpkg/ports/treehopper/CONTROL new file mode 100644 index 0000000..b54e10d --- /dev/null +++ b/vcpkg/ports/treehopper/CONTROL @@ -0,0 +1,5 @@ +Source: treehopper +Version: 1.11.3-4 +Description: Treehopper connects the physical world to your computer, tablet, or smartphone. +Homepage: https://treehopper.io +Build-Depends: libusb diff --git a/vcpkg/ports/treehopper/portfile.cmake b/vcpkg/ports/treehopper/portfile.cmake new file mode 100644 index 0000000..c9e9855 --- /dev/null +++ b/vcpkg/ports/treehopper/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY ONLY_DYNAMIC_CRT) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO treehopper-electronics/treehopper-sdk + REF 1.11.3 + SHA512 65b748375b798787c8b59f9657151f340920c939c3f079105b9b78f4e3b775125598106c6dfa4feba111a64d30f007003a70110ac767802a7dd1127a25c9fb14 + HEAD_REF master) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/C++/API/ + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/C++/API/inc/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/Treehopper/) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + diff --git a/vcpkg/ports/triangle/CMakeLists.txt b/vcpkg/ports/triangle/CMakeLists.txt new file mode 100644 index 0000000..6157c00 --- /dev/null +++ b/vcpkg/ports/triangle/CMakeLists.txt @@ -0,0 +1,45 @@ +cmake_minimum_required(VERSION 2.8.12) +project(triangle) + +include(GNUInstallDirs) + +add_library(triangleLib triangle.c exports.def) +add_executable(triangle triangle.c) + +target_compile_definitions(triangleLib PRIVATE -DTRILIBRARY -DANSI_DECLARATORS) +target_compile_definitions(triangle PRIVATE -DANSI_DECLARATORS) +if(WIN32) + target_compile_definitions(triangleLib PRIVATE -DNO_TIMER) + target_compile_definitions(triangle PRIVATE -DNO_TIMER) +endif() + +if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") + target_link_libraries(triangle m) +endif() + +target_include_directories(triangleLib PUBLIC + $ +) + +set_target_properties(triangleLib PROPERTIES POSITION_INDEPENDENT_CODE ON) + +set_target_properties(triangleLib PROPERTIES PUBLIC_HEADER + "${CMAKE_SOURCE_DIR}/triangle.h" +) + +set_target_properties(triangleLib PROPERTIES OUTPUT_NAME "triangle") + +install(TARGETS triangleLib EXPORT triangleTargets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +) + +install(TARGETS triangle DESTINATION tools/triangle) + +install(EXPORT triangleTargets + FILE triangleConfig.cmake + NAMESPACE triangle:: + DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/triangle" +) diff --git a/vcpkg/ports/triangle/CONTROL b/vcpkg/ports/triangle/CONTROL new file mode 100644 index 0000000..fd7ec2d --- /dev/null +++ b/vcpkg/ports/triangle/CONTROL @@ -0,0 +1,5 @@ +Source: triangle +Version: 1.6 +Homepage: http://www.cs.cmu.edu/~quake/triangle.html +Description: A Two-Dimensional Quality Mesh Generator and Delaunay Triangulator. +Supports: !uwp diff --git a/vcpkg/ports/triangle/enable_64bit_architecture.patch b/vcpkg/ports/triangle/enable_64bit_architecture.patch new file mode 100644 index 0000000..9ad7b80 --- /dev/null +++ b/vcpkg/ports/triangle/enable_64bit_architecture.patch @@ -0,0 +1,418 @@ + triangle.c | 116 ++++++++++++++++++++++++++----------------------------------- + triangle.h | 29 +++++++++------- + 2 files changed, 66 insertions(+), 79 deletions(-) + +diff --git a/triangle.c b/triangle.c +index f7a5700..084902e 100644 +--- a/triangle.c ++++ b/triangle.c +@@ -194,27 +194,8 @@ + /* */ + /*****************************************************************************/ + +-/* For single precision (which will save some memory and reduce paging), */ +-/* define the symbol SINGLE by using the -DSINGLE compiler switch or by */ +-/* writing "#define SINGLE" below. */ +-/* */ +-/* For double precision (which will allow you to refine meshes to a smaller */ +-/* edge length), leave SINGLE undefined. */ +-/* */ +-/* Double precision uses more memory, but improves the resolution of the */ +-/* meshes you can generate with Triangle. It also reduces the likelihood */ +-/* of a floating exception due to overflow. Finally, it is much faster */ +-/* than single precision on 64-bit architectures like the DEC Alpha. I */ +-/* recommend double precision unless you want to generate a mesh for which */ +-/* you do not have enough memory. */ +- +-/* #define SINGLE */ +- +-#ifdef SINGLE +-#define REAL float +-#else /* not SINGLE */ + #define REAL double +-#endif /* not SINGLE */ ++#define VOID void + + /* If yours is not a Unix system, define the NO_TIMER compiler switch to */ + /* remove the Unix-specific timing code. */ +@@ -308,12 +289,6 @@ + #define DEADVERTEX -32768 + #define UNDEADVERTEX -32767 + +-/* The next line is used to outsmart some very stupid compilers. If your */ +-/* compiler is smarter, feel free to replace the "int" with "void". */ +-/* Not that it matters. */ +- +-#define VOID int +- + /* Two constants for algorithms based on random sampling. Both constants */ + /* have been chosen empirically to optimize their respective algorithms. */ + +@@ -340,6 +315,7 @@ + + #define ONETHIRD 0.333333333333333333333333333333333333333333333333333333333333 + ++#include + #include + #include + #include +@@ -938,16 +914,16 @@ int minus1mod3[3] = {2, 0, 1}; + /* extracted from the two least significant bits of the pointer. */ + + #define decode(ptr, otri) \ +- (otri).orient = (int) ((unsigned long) (ptr) & (unsigned long) 3l); \ ++ (otri).orient = (int) ((uintptr_t) (ptr) & (uintptr_t) 3l); \ + (otri).tri = (triangle *) \ +- ((unsigned long) (ptr) ^ (unsigned long) (otri).orient) ++ ((uintptr_t) (ptr) ^ (uintptr_t) (otri).orient) + + /* encode() compresses an oriented triangle into a single pointer. It */ + /* relies on the assumption that all triangles are aligned to four-byte */ + /* boundaries, so the two least significant bits of (otri).tri are zero. */ + + #define encode(otri) \ +- (triangle) ((unsigned long) (otri).tri | (unsigned long) (otri).orient) ++ (triangle) ((uintptr_t) (otri).tri | (uintptr_t) (otri).orient) + + /* The following handle manipulation primitives are all described by Guibas */ + /* and Stolfi. However, Guibas and Stolfi use an edge-based data */ +@@ -1111,16 +1087,16 @@ int minus1mod3[3] = {2, 0, 1}; + + #define infect(otri) \ + (otri).tri[6] = (triangle) \ +- ((unsigned long) (otri).tri[6] | (unsigned long) 2l) ++ ((uintptr_t) (otri).tri[6] | (uintptr_t) 2l) + + #define uninfect(otri) \ + (otri).tri[6] = (triangle) \ +- ((unsigned long) (otri).tri[6] & ~ (unsigned long) 2l) ++ ((uintptr_t) (otri).tri[6] & ~ (uintptr_t) 2l) + + /* Test a triangle for viral infection. */ + + #define infected(otri) \ +- (((unsigned long) (otri).tri[6] & (unsigned long) 2l) != 0l) ++ (((uintptr_t) (otri).tri[6] & (uintptr_t) 2l) != 0l) + + /* Check or set a triangle's attributes. */ + +@@ -1158,16 +1134,16 @@ int minus1mod3[3] = {2, 0, 1}; + /* are masked out to produce the real pointer. */ + + #define sdecode(sptr, osub) \ +- (osub).ssorient = (int) ((unsigned long) (sptr) & (unsigned long) 1l); \ ++ (osub).ssorient = (int) ((uintptr_t) (sptr) & (uintptr_t) 1l); \ + (osub).ss = (subseg *) \ +- ((unsigned long) (sptr) & ~ (unsigned long) 3l) ++ ((uintptr_t) (sptr) & ~ (uintptr_t) 3l) + + /* sencode() compresses an oriented subsegment into a single pointer. It */ + /* relies on the assumption that all subsegments are aligned to two-byte */ + /* boundaries, so the least significant bit of (osub).ss is zero. */ + + #define sencode(osub) \ +- (subseg) ((unsigned long) (osub).ss | (unsigned long) (osub).ssorient) ++ (subseg) ((uintptr_t) (osub).ss | (uintptr_t) (osub).ssorient) + + /* ssym() toggles the orientation of a subsegment. */ + +@@ -3891,7 +3867,7 @@ struct memorypool *pool; + #endif /* not ANSI_DECLARATORS */ + + { +- unsigned long alignptr; ++ uintptr_t alignptr = 0; + + pool->items = 0; + pool->maxitems = 0; +@@ -3899,11 +3875,11 @@ struct memorypool *pool; + /* Set the currently active block. */ + pool->nowblock = pool->firstblock; + /* Find the first item in the pool. Increment by the size of (VOID *). */ +- alignptr = (unsigned long) (pool->nowblock + 1); ++ alignptr = (uintptr_t) (pool->nowblock + 1); + /* Align the item on an `alignbytes'-byte boundary. */ + pool->nextitem = (VOID *) +- (alignptr + (unsigned long) pool->alignbytes - +- (alignptr % (unsigned long) pool->alignbytes)); ++ (alignptr + (uintptr_t) pool->alignbytes - ++ (alignptr % (uintptr_t) pool->alignbytes)); + /* There are lots of unallocated items left in this block. */ + pool->unallocateditems = pool->itemsfirstblock; + /* The stack of deallocated items is empty. */ +@@ -4008,7 +3984,7 @@ struct memorypool *pool; + { + VOID *newitem; + VOID **newblock; +- unsigned long alignptr; ++ uintptr_t alignptr = 0; + + /* First check the linked list of dead items. If the list is not */ + /* empty, allocate an item from the list rather than a fresh one. */ +@@ -4033,11 +4009,11 @@ struct memorypool *pool; + pool->nowblock = (VOID **) *(pool->nowblock); + /* Find the first item in the block. */ + /* Increment by the size of (VOID *). */ +- alignptr = (unsigned long) (pool->nowblock + 1); ++ alignptr = (uintptr_t) (pool->nowblock + 1); + /* Align the item on an `alignbytes'-byte boundary. */ + pool->nextitem = (VOID *) +- (alignptr + (unsigned long) pool->alignbytes - +- (alignptr % (unsigned long) pool->alignbytes)); ++ (alignptr + (uintptr_t) pool->alignbytes - ++ (alignptr % (uintptr_t) pool->alignbytes)); + /* There are lots of unallocated items left in this block. */ + pool->unallocateditems = pool->itemsperblock; + } +@@ -4092,16 +4068,16 @@ struct memorypool *pool; + #endif /* not ANSI_DECLARATORS */ + + { +- unsigned long alignptr; ++ uintptr_t alignptr = 0; + + /* Begin the traversal in the first block. */ + pool->pathblock = pool->firstblock; + /* Find the first item in the block. Increment by the size of (VOID *). */ +- alignptr = (unsigned long) (pool->pathblock + 1); ++ alignptr = (uintptr_t) (pool->pathblock + 1); + /* Align with item on an `alignbytes'-byte boundary. */ + pool->pathitem = (VOID *) +- (alignptr + (unsigned long) pool->alignbytes - +- (alignptr % (unsigned long) pool->alignbytes)); ++ (alignptr + (uintptr_t) pool->alignbytes - ++ (alignptr % (uintptr_t) pool->alignbytes)); + /* Set the number of items left in the current block. */ + pool->pathitemsleft = pool->itemsfirstblock; + } +@@ -4129,7 +4105,7 @@ struct memorypool *pool; + + { + VOID *newitem; +- unsigned long alignptr; ++ uintptr_t alignptr = 0; + + /* Stop upon exhausting the list of items. */ + if (pool->pathitem == pool->nextitem) { +@@ -4141,11 +4117,11 @@ struct memorypool *pool; + /* Find the next block. */ + pool->pathblock = (VOID **) *(pool->pathblock); + /* Find the first item in the block. Increment by the size of (VOID *). */ +- alignptr = (unsigned long) (pool->pathblock + 1); ++ alignptr = (uintptr_t) (pool->pathblock + 1); + /* Align with item on an `alignbytes'-byte boundary. */ + pool->pathitem = (VOID *) +- (alignptr + (unsigned long) pool->alignbytes - +- (alignptr % (unsigned long) pool->alignbytes)); ++ (alignptr + (uintptr_t) pool->alignbytes - ++ (alignptr % (uintptr_t) pool->alignbytes)); + /* Set the number of items left in the current block. */ + pool->pathitemsleft = pool->itemsperblock; + } +@@ -4197,16 +4173,16 @@ int subsegbytes; + #endif /* not ANSI_DECLARATORS */ + + { +- unsigned long alignptr; ++ uintptr_t alignptr = 0; + + /* Set up `dummytri', the `triangle' that occupies "outer space." */ + m->dummytribase = (triangle *) trimalloc(trianglebytes + + m->triangles.alignbytes); + /* Align `dummytri' on a `triangles.alignbytes'-byte boundary. */ +- alignptr = (unsigned long) m->dummytribase; ++ alignptr = (uintptr_t) m->dummytribase; + m->dummytri = (triangle *) +- (alignptr + (unsigned long) m->triangles.alignbytes - +- (alignptr % (unsigned long) m->triangles.alignbytes)); ++ (alignptr + (uintptr_t) m->triangles.alignbytes - ++ (alignptr % (uintptr_t) m->triangles.alignbytes)); + /* Initialize the three adjoining triangles to be "outer space." These */ + /* will eventually be changed by various bonding operations, but their */ + /* values don't really matter, as long as they can legally be */ +@@ -4226,10 +4202,10 @@ int subsegbytes; + m->dummysubbase = (subseg *) trimalloc(subsegbytes + + m->subsegs.alignbytes); + /* Align `dummysub' on a `subsegs.alignbytes'-byte boundary. */ +- alignptr = (unsigned long) m->dummysubbase; ++ alignptr = (uintptr_t) m->dummysubbase; + m->dummysub = (subseg *) +- (alignptr + (unsigned long) m->subsegs.alignbytes - +- (alignptr % (unsigned long) m->subsegs.alignbytes)); ++ (alignptr + (uintptr_t) m->subsegs.alignbytes - ++ (alignptr % (uintptr_t) m->subsegs.alignbytes)); + /* Initialize the two adjoining subsegments to be the omnipresent */ + /* subsegment. These will eventually be changed by various bonding */ + /* operations, but their values don't really matter, as long as they */ +@@ -4586,7 +4562,7 @@ int number; + { + VOID **getblock; + char *foundvertex; +- unsigned long alignptr; ++ uintptr_t alignptr = 0; + int current; + + getblock = m->vertices.firstblock; +@@ -4603,9 +4579,9 @@ int number; + } + + /* Now find the right vertex. */ +- alignptr = (unsigned long) (getblock + 1); +- foundvertex = (char *) (alignptr + (unsigned long) m->vertices.alignbytes - +- (alignptr % (unsigned long) m->vertices.alignbytes)); ++ alignptr = (uintptr_t) (getblock + 1); ++ foundvertex = (char *) (alignptr + (uintptr_t) m->vertices.alignbytes - ++ (alignptr % (uintptr_t) m->vertices.alignbytes)); + return (vertex) (foundvertex + m->vertices.itembytes * (number - current)); + } + +@@ -4883,6 +4859,7 @@ struct osub *newsubseg; + /* */ + /*****************************************************************************/ + ++static + void exactinit() + { + REAL half; +@@ -4956,6 +4933,7 @@ void exactinit() + /* */ + /*****************************************************************************/ + ++static + #ifdef ANSI_DECLARATORS + int fast_expansion_sum_zeroelim(int elen, REAL *e, int flen, REAL *f, REAL *h) + #else /* not ANSI_DECLARATORS */ +@@ -5050,6 +5028,7 @@ REAL *h; + /* */ + /*****************************************************************************/ + ++static + #ifdef ANSI_DECLARATORS + int scale_expansion_zeroelim(int elen, REAL *e, REAL b, REAL *h) + #else /* not ANSI_DECLARATORS */ +@@ -5106,6 +5085,7 @@ REAL *h; + /* */ + /*****************************************************************************/ + ++static + #ifdef ANSI_DECLARATORS + REAL estimate(int elen, REAL *e) + #else /* not ANSI_DECLARATORS */ +@@ -5303,6 +5283,7 @@ vertex pc; + /* */ + /*****************************************************************************/ + ++static + #ifdef ANSI_DECLARATORS + REAL incircleadapt(vertex pa, vertex pb, vertex pc, vertex pd, REAL permanent) + #else /* not ANSI_DECLARATORS */ +@@ -5882,6 +5863,7 @@ REAL permanent; + return finnow[finlength - 1]; + } + ++static + #ifdef ANSI_DECLARATORS + REAL incircle(struct mesh *m, struct behavior *b, + vertex pa, vertex pb, vertex pc, vertex pd) +@@ -5964,6 +5946,7 @@ vertex pd; + /* */ + /*****************************************************************************/ + ++static + #ifdef ANSI_DECLARATORS + REAL orient3dadapt(vertex pa, vertex pb, vertex pc, vertex pd, + REAL aheight, REAL bheight, REAL cheight, REAL dheight, +@@ -6389,6 +6372,7 @@ REAL permanent; + return finnow[finlength - 1]; + } + ++static + #ifdef ANSI_DECLARATORS + REAL orient3d(struct mesh *m, struct behavior *b, + vertex pa, vertex pb, vertex pc, vertex pd, +@@ -7649,7 +7633,7 @@ struct otri *searchtri; + char *firsttri; + struct otri sampletri; + vertex torg, tdest; +- unsigned long alignptr; ++ uintptr_t alignptr = 0; + REAL searchdist, dist; + REAL ahead; + long samplesperblock, totalsamplesleft, samplesleft; +@@ -7721,11 +7705,11 @@ struct otri *searchtri; + population = totalpopulation; + } + /* Find a pointer to the first triangle in the block. */ +- alignptr = (unsigned long) (sampleblock + 1); ++ alignptr = (uintptr_t) (sampleblock + 1); + firsttri = (char *) (alignptr + +- (unsigned long) m->triangles.alignbytes - ++ (uintptr_t) m->triangles.alignbytes - + (alignptr % +- (unsigned long) m->triangles.alignbytes)); ++ (uintptr_t) m->triangles.alignbytes)); + + /* Choose `samplesleft' randomly sampled triangles in this block. */ + do { +diff --git a/triangle.h b/triangle.h +index 9df1f39..8d9c754 100644 +--- a/triangle.h ++++ b/triangle.h +@@ -248,16 +248,20 @@ + /* */ + /*****************************************************************************/ + ++#ifdef __cplusplus ++extern "C" { ++#endif ++ + struct triangulateio { +- REAL *pointlist; /* In / out */ +- REAL *pointattributelist; /* In / out */ ++ double *pointlist; /* In / out */ ++ double *pointattributelist; /* In / out */ + int *pointmarkerlist; /* In / out */ + int numberofpoints; /* In / out */ + int numberofpointattributes; /* In / out */ + + int *trianglelist; /* In / out */ +- REAL *triangleattributelist; /* In / out */ +- REAL *trianglearealist; /* In only */ ++ double *triangleattributelist; /* In / out */ ++ double *trianglearealist; /* In only */ + int *neighborlist; /* Out only */ + int numberoftriangles; /* In / out */ + int numberofcorners; /* In / out */ +@@ -267,23 +271,22 @@ struct triangulateio { + int *segmentmarkerlist; /* In / out */ + int numberofsegments; /* In / out */ + +- REAL *holelist; /* In / pointer to array copied out */ ++ double *holelist; /* In / pointer to array copied out */ + int numberofholes; /* In / copied out */ + +- REAL *regionlist; /* In / pointer to array copied out */ ++ double *regionlist; /* In / pointer to array copied out */ + int numberofregions; /* In / copied out */ + + int *edgelist; /* Out only */ + int *edgemarkerlist; /* Not used with Voronoi diagram; out only */ +- REAL *normlist; /* Used only with Voronoi diagram; out only */ ++ double *normlist; /* Used only with Voronoi diagram; out only */ + int numberofedges; /* Out only */ + }; + +-#ifdef ANSI_DECLARATORS + void triangulate(char *, struct triangulateio *, struct triangulateio *, + struct triangulateio *); +-void trifree(VOID *memptr); +-#else /* not ANSI_DECLARATORS */ +-void triangulate(); +-void trifree(); +-#endif /* not ANSI_DECLARATORS */ ++void trifree(void *memptr); ++ ++#ifdef __cplusplus ++} ++#endif +\ No newline at end of file diff --git a/vcpkg/ports/triangle/exports.def b/vcpkg/ports/triangle/exports.def new file mode 100644 index 0000000..5c4ba32 --- /dev/null +++ b/vcpkg/ports/triangle/exports.def @@ -0,0 +1,3 @@ +EXPORTS + triangulate + trifree \ No newline at end of file diff --git a/vcpkg/ports/triangle/portfile.cmake b/vcpkg/ports/triangle/portfile.cmake new file mode 100644 index 0000000..38b0279 --- /dev/null +++ b/vcpkg/ports/triangle/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://www.netlib.org/voronoi/triangle.zip" + FILENAME "triangle.zip" + SHA512 c9c1ac527c4bf836ed877b1c5495abf9fd2c453741f4c9698777e23cde939ebf0dd73c84cec64f35a93ca01bff4b86ce32ec559da33e570a0744a764e46d2186 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + NO_REMOVE_ONE_LEVEL + ARCHIVE ${ARCHIVE_FILE} + PATCHES + "enable_64bit_architecture.patch" +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/exports.def DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/tools") + +file(INSTALL ${SOURCE_PATH}/README DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/vcpkg/ports/trompeloeil/CONTROL b/vcpkg/ports/trompeloeil/CONTROL new file mode 100644 index 0000000..b41cb44 --- /dev/null +++ b/vcpkg/ports/trompeloeil/CONTROL @@ -0,0 +1,4 @@ +Source: trompeloeil +Version: 36 +Description: A thread-safe header-only mocking framework for C++11/14 using the Boost Software License 1.0 +Homepage: https://github.com/rollbear/trompeloeil diff --git a/vcpkg/ports/trompeloeil/disable_master_project.patch b/vcpkg/ports/trompeloeil/disable_master_project.patch new file mode 100644 index 0000000..155363d --- /dev/null +++ b/vcpkg/ports/trompeloeil/disable_master_project.patch @@ -0,0 +1,14 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6e59ab8..615a6cb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -34,9 +34,6 @@ target_include_directories( + ) + + set(MASTER_PROJECT OFF) +-if (${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR}) +- set(MASTER_PROJECT ON) +-endif() + + if (MASTER_PROJECT AND CMAKE_BUILD_TYPE MATCHES Debug) + diff --git a/vcpkg/ports/trompeloeil/portfile.cmake b/vcpkg/ports/trompeloeil/portfile.cmake new file mode 100644 index 0000000..e0e8ecf --- /dev/null +++ b/vcpkg/ports/trompeloeil/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rollbear/trompeloeil + REF 873a4f949578d0c77df5fce5c66aa836dbedd3ca # v36 + SHA512 12c2b4df79a6b46fadf589771a47c0bf206c7d6e0eb6b1481d822075785711d424a4644ad8ba9f57be8b0b0f445f616bdab8f8decc2c38e5b731047e5e1a5960 + HEAD_REF master + PATCHES disable_master_project.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/trompeloeil) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include/trompeloeil.hpp) + message(FATAL_ERROR "Main includes have moved. Please update the forwarder.") +endif() + +configure_file(${SOURCE_PATH}/LICENSE_1_0.txt ${CURRENT_PACKAGES_DIR}/share/trompeloeil/copyright COPYONLY) diff --git a/vcpkg/ports/tsl-hopscotch-map/CONTROL b/vcpkg/ports/tsl-hopscotch-map/CONTROL new file mode 100644 index 0000000..0f2b82e --- /dev/null +++ b/vcpkg/ports/tsl-hopscotch-map/CONTROL @@ -0,0 +1,3 @@ +Source: tsl-hopscotch-map +Version: 2.2.1-1 +Description: C++ implementation of a fast hash map and hash set using hopscotch hashing diff --git a/vcpkg/ports/tsl-hopscotch-map/portfile.cmake b/vcpkg/ports/tsl-hopscotch-map/portfile.cmake new file mode 100644 index 0000000..0099833 --- /dev/null +++ b/vcpkg/ports/tsl-hopscotch-map/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Tessil/hopscotch-map + REF v2.2.1 + SHA512 389fb09b6e47d8005d4a1b6c0db0c5f03de67686e9d4b97e473bf88f0c398d3118be0dcfdc5d509c082fd53f52f5d779d04c3d9bafe65c5eba11d03c62b60ddc +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +file(INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) diff --git a/vcpkg/ports/tsl-ordered-map/CONTROL b/vcpkg/ports/tsl-ordered-map/CONTROL new file mode 100644 index 0000000..2170432 --- /dev/null +++ b/vcpkg/ports/tsl-ordered-map/CONTROL @@ -0,0 +1,3 @@ +Source: tsl-ordered-map +Version: 0.8.1-1 +Description: C++ hash map and hash set which preserve the order of insertion diff --git a/vcpkg/ports/tsl-ordered-map/portfile.cmake b/vcpkg/ports/tsl-ordered-map/portfile.cmake new file mode 100644 index 0000000..9f4fe99 --- /dev/null +++ b/vcpkg/ports/tsl-ordered-map/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Tessil/ordered-map + REF v0.8.1 + SHA512 c776fc82c971ec507f12fa071c5831bbbf94a0351f7ae936f60b73b91be2a264737b606a6be7bae0cc6b971f01c619a78dad3072ac603b26a2a13836184a8f3a +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +file(INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) diff --git a/vcpkg/ports/tsl-sparse-map/CONTROL b/vcpkg/ports/tsl-sparse-map/CONTROL new file mode 100644 index 0000000..2eea4f5 --- /dev/null +++ b/vcpkg/ports/tsl-sparse-map/CONTROL @@ -0,0 +1,3 @@ +Source: tsl-sparse-map +Version: 0.6.2 +Description: C++ implementation of a memory efficient hash map and hash set diff --git a/vcpkg/ports/tsl-sparse-map/portfile.cmake b/vcpkg/ports/tsl-sparse-map/portfile.cmake new file mode 100644 index 0000000..55c4ab8 --- /dev/null +++ b/vcpkg/ports/tsl-sparse-map/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Tessil/sparse-map + REF d71e6fd75f4970f07f4f1fe67438055be70d0945 # v0.6.2 + SHA512 ad270be66b3d5f96cb0305f0e086807aee1c909dd022c19ca99e5f7a72d5116f2ecb4b67fcb80e8bdb4f98925387d95bdc0bcc450a10b97c61f9b92c681f95b5 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +file(INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) diff --git a/vcpkg/ports/turbobase64/CMakeLists.txt b/vcpkg/ports/turbobase64/CMakeLists.txt new file mode 100644 index 0000000..c4fcebc --- /dev/null +++ b/vcpkg/ports/turbobase64/CMakeLists.txt @@ -0,0 +1,70 @@ +cmake_minimum_required(VERSION 3.14) + +project(turbobase64 C) +if (SOURCE_PATH) + set(CMAKE_SOURCE_DIR ${SOURCE_PATH}) +endif () + +#Copyright 2016-2020 Yandex LLC +# https://github.com/ClickHouse/ClickHouse/blob/master/contrib/base64-cmake/CMakeLists.txt +# +#Apache License +#Version 2.0, January 2004 +#http://www.apache.org/licenses/ +#Yandex code starts + +SET(LIBRARY_DIR ${CMAKE_SOURCE_DIR}) + +add_library(base64_scalar OBJECT ${LIBRARY_DIR}/turbob64c.c ${LIBRARY_DIR}/turbob64d.c) +add_library(base64_ssse3 OBJECT ${LIBRARY_DIR}/turbob64sse.c) # This file also contains code for ARM NEON + +if (ARCH_AMD64) + add_library(base64_avx OBJECT ${LIBRARY_DIR}/turbob64sse.c) # This is not a mistake. One file is compiled twice. + add_library(base64_avx2 OBJECT ${LIBRARY_DIR}/turbob64avx2.c) +endif () + +target_compile_options(base64_scalar PRIVATE -falign-loops) + +if (ARCH_AMD64) + target_compile_options(base64_ssse3 PRIVATE -mssse3 -falign-loops) + target_compile_options(base64_avx PRIVATE -falign-loops -mavx) + target_compile_options(base64_avx2 PRIVATE -falign-loops -mavx2) +else () + target_compile_options(base64_ssse3 PRIVATE -falign-loops) +endif () + +if (ARCH_AMD64) + add_library(base64 + $ + $ + $ + $) +else () + add_library(base64 + $ + $) +endif () + +# End of Yandex code + +target_include_directories(base64 SYSTEM PUBLIC $) +set_target_properties(base64 PROPERTIES PUBLIC_HEADER "${CMAKE_SOURCE_DIR}/turbob64.h") + +install(TARGETS base64 + EXPORT base64Config + RUNTIME DESTINATION "bin" + LIBRARY DESTINATION "lib" + ARCHIVE DESTINATION "lib" + PUBLIC_HEADER DESTINATION "include" + COMPONENT dev + ) + +export(TARGETS base64 + NAMESPACE TURBO:: + FILE "share/base64/base64Config.cmake" + ) + +install(EXPORT base64Config + DESTINATION "share/base64" + NAMESPACE TURBO:: + ) \ No newline at end of file diff --git a/vcpkg/ports/turbobase64/CONTROL b/vcpkg/ports/turbobase64/CONTROL new file mode 100644 index 0000000..2709230 --- /dev/null +++ b/vcpkg/ports/turbobase64/CONTROL @@ -0,0 +1,4 @@ +Source: turbobase64 +Version: 2020-01-12 +Description: Fastest Base64 SIMD/Neon library +Homepage: https://github.com/powturbo/Turbo-Base64 \ No newline at end of file diff --git a/vcpkg/ports/turbobase64/portfile.cmake b/vcpkg/ports/turbobase64/portfile.cmake new file mode 100644 index 0000000..0c4e89e --- /dev/null +++ b/vcpkg/ports/turbobase64/portfile.cmake @@ -0,0 +1,21 @@ +vcpkg_fail_port_install(ON_TARGET "UWP" "Windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO powturbo/Turbo-Base64 + REF 95ba56a9b041f9933f5cd2bbb2ee4e083468c20a + SHA512 bacab8ede5e20974207e01c13a93e6d8afc8d08bc84f1da2b6efa1b4d17408cef6cea085e209a8b7d3b2e2a7223a785f8c76aa954c3c787e9b8d891880b63606 + HEAD_REF master +) + +configure_file(${CURRENT_PORT_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/tweeny/CONTROL b/vcpkg/ports/tweeny/CONTROL new file mode 100644 index 0000000..19773fc --- /dev/null +++ b/vcpkg/ports/tweeny/CONTROL @@ -0,0 +1,4 @@ +Source: tweeny +Version: 3.0 +Description: A modern C++ tweening library +Homepage: https://github.com/mobius3/tweeny \ No newline at end of file diff --git a/vcpkg/ports/tweeny/portfile.cmake b/vcpkg/ports/tweeny/portfile.cmake new file mode 100644 index 0000000..016c3be --- /dev/null +++ b/vcpkg/ports/tweeny/portfile.cmake @@ -0,0 +1,23 @@ + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mobius3/tweeny + REF v3 + SHA512 41f2562a0e55b0fd2c219fab384bf46f70432abb47953b5ac768a29b2ea7b790c6aa56fd44c1fef583f6fa2011010d7dd7e637bcd2d8a9be5c9638a7f2ce7436 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + + +vcpkg_fixup_cmake_targets(CONFIG_PATH "/lib/cmake/Tweeny/") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake/Tweeny) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/tweeny RENAME copyright) diff --git a/vcpkg/ports/type-lite/CONTROL b/vcpkg/ports/type-lite/CONTROL new file mode 100644 index 0000000..79f1e9f --- /dev/null +++ b/vcpkg/ports/type-lite/CONTROL @@ -0,0 +1,9 @@ +Source: type-lite +Version: 0.1.0 +Homepage: https://github.com/martinmoene/type-lite +Description: Strong types for C++98, C++11 and later in a single-file header-only library. + +Feature: test +Description: Build with test + + diff --git a/vcpkg/ports/type-lite/portfile.cmake b/vcpkg/ports/type-lite/portfile.cmake new file mode 100644 index 0000000..27cec8a --- /dev/null +++ b/vcpkg/ports/type-lite/portfile.cmake @@ -0,0 +1,32 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO martinmoene/type-lite + REF v0.1.0 + SHA512 5a5ea623890af9c88c7f82869278af743e08b3dbda3c48c4523737244a7da76d2509501b4502efc2226aaef5df72b6ff69cd6b5b36c8cfc282b8c8406525016b + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + test BUILD_TESTS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DTYPE_LITE_OPT_BUILD_TESTS=${BUILD_TESTS} + -DTYPE_LITE_OPT_BUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/vcpkg/ports/uchardet/CONTROL b/vcpkg/ports/uchardet/CONTROL new file mode 100644 index 0000000..587f25d --- /dev/null +++ b/vcpkg/ports/uchardet/CONTROL @@ -0,0 +1,8 @@ +Source: uchardet +Version: 2020-04-26 +Description: An encoding detector library ported from Mozilla +Homepage: https://cgit.freedesktop.org/uchardet/uchardet/ + +Feature: tool +Description: Build uchardet CLI tool +Build-Depends: getopt diff --git a/vcpkg/ports/uchardet/portfile.cmake b/vcpkg/ports/uchardet/portfile.cmake new file mode 100644 index 0000000..281dec7 --- /dev/null +++ b/vcpkg/ports/uchardet/portfile.cmake @@ -0,0 +1,56 @@ +vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH + URL https://gitlab.freedesktop.org/uchardet/uchardet + REF 8681fc060ea07f646434cd2d324e4a5aa7c495c4 +) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + tool BUILD_BINARY +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) + +if(VCPKG_TARGET_IS_UWP) + # uchardet calls `fopen` and `strdup`, which makes UWP unhappy. + set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE") + set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DBUILD_BINARY=OFF + OPTIONS_RELEASE + ${FEATURE_OPTIONS} + OPTIONS + -DBUILD_STATIC=${BUILD_STATIC} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +if(tool IN_LIST FEATURES) + file(COPY + ${CURRENT_PACKAGES_DIR}/bin/uchardet${VCPKG_TARGET_EXECUTABLE_SUFFIX} + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT} + ) + + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +else() + file(REMOVE ${CURRENT_PACKAGES_DIR}/bin/uchardet${VCPKG_TARGET_EXECUTABLE_SUFFIX}) +endif() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share + ${CURRENT_PACKAGES_DIR}/share/man +) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/umock-c/CONTROL b/vcpkg/ports/umock-c/CONTROL new file mode 100644 index 0000000..44d5842 --- /dev/null +++ b/vcpkg/ports/umock-c/CONTROL @@ -0,0 +1,9 @@ +Source: umock-c +Version: 2020-06-17-1 +Description: A pure C mocking library +Homepage: https://github.com/Azure/umock-c +Build-Depends: azure-macro-utils-c + +Feature: public-preview +Description: A pure C mocking library (public-preview) +Build-Depends: azure-macro-utils-c[public-preview] diff --git a/vcpkg/ports/umock-c/portfile.cmake b/vcpkg/ports/umock-c/portfile.cmake new file mode 100644 index 0000000..71fb57c --- /dev/null +++ b/vcpkg/ports/umock-c/portfile.cmake @@ -0,0 +1,40 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +if("public-preview" IN_LIST FEATURES) + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/umock-c + REF 87d2214384c886a1e2406ac0756a0b3786add8da + SHA512 230b6c79a8346727bbc124d1aefaa14da8ecd82b2a56d68b3d2511b8efa5931872da440137a5d266835ba8c5193b83b4bc5ee85abb5242d07904a0706727926c + HEAD_REF master + ) +else() + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Azure/umock-c + REF 504193e65d1c2f6eb50c15357167600a296df7ff + SHA512 68d5d986314dbd46d20de2a9b9454154c11675c25d1b5a5b1cfecdd0c0945d9dc68d0348ec1dbb00b5d1a6a1f0356121ba561d7c8fffb97ab37864edade5a85b + HEAD_REF master + ) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -Drun_unittests=OFF + -Drun_int_tests=OFF + -Duse_installed_dependencies=ON +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/umock_c) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +configure_file(${SOURCE_PATH}/readme.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +vcpkg_copy_pdbs() + + diff --git a/vcpkg/ports/unicorn-lib/CMakeLists.txt b/vcpkg/ports/unicorn-lib/CMakeLists.txt new file mode 100644 index 0000000..9a9c582 --- /dev/null +++ b/vcpkg/ports/unicorn-lib/CMakeLists.txt @@ -0,0 +1,41 @@ +cmake_minimum_required(VERSION 3.10) + +project(Unicorn_Lib LANGUAGES CXX DESCRIPTION "Unicode library for C++ by Ross Smith") +set(CMAKE_CXX_STANDARD 17) +option(UNICORN_LIB_SKIP_HEADERS "If the headers installation is skipped or not." OFF) + +find_path(RS_CORE_LIB_INCLUDE_DIR rs-core/common.hpp) +#find_library(RW_UTILITIES_LIBRARY NAMES rw_utilities) +find_package(ZLIB REQUIRED) +find_library(PCRE2_LIBRARY_DEBUG NAMES pcre2-8d HINTS ${INSTALLED_LIB_PATH}) +find_library(PCRE2_LIBRARY_RELEASE NAMES pcre2-8 HINTS ${INSTALLED_LIB_PATH}) +select_library_configurations(PCRE2) + +file(GLOB_RECURSE UNICORN_LIB_SOURCES ${PROJECT_SOURCE_DIR}/unicorn/*.cpp) +foreach(ITR ${UNICORN_LIB_SOURCES}) + if(ITR MATCHES "(.*)-test.cpp(.*)") + list(REMOVE_ITEM UNICORN_LIB_SOURCES ${ITR}) + endif() +endforeach() +add_library(unicorn-lib ${UNICORN_LIB_SOURCES}) +target_include_directories( + unicorn-lib + PUBLIC ${PROJECT_SOURCE_DIR} + PUBLIC ${RS_CORE_LIB_INCLUDE_DIR} +) +target_compile_definitions( + unicorn-lib + PRIVATE -DUNICODE -D_UNICODE _CRT_SECURE_NO_WARNINGS +) + +target_link_libraries(unicorn-lib PUBLIC ${PCRE2_LIBRARY}) +target_link_libraries(unicorn-lib PUBLIC ZLIB::ZLIB) + +if(NOT UNICORN_LIB_SKIP_HEADERS) + install(DIRECTORY ${PROJECT_SOURCE_DIR}/unicorn DESTINATION include FILES_MATCHING PATTERN "*.hpp") +endif() +install(TARGETS unicorn-lib + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + ) \ No newline at end of file diff --git a/vcpkg/ports/unicorn-lib/CONTROL b/vcpkg/ports/unicorn-lib/CONTROL new file mode 100644 index 0000000..d186705 --- /dev/null +++ b/vcpkg/ports/unicorn-lib/CONTROL @@ -0,0 +1,5 @@ +Source: unicorn-lib +Version: 2020-03-02 +Homepage: https://github.com/CaptainCrowbar/unicorn-lib +Description: Unicode library for C++ by Ross Smith +Build-Depends: rs-core-lib, pcre2, zlib, libiconv diff --git a/vcpkg/ports/unicorn-lib/portfile.cmake b/vcpkg/ports/unicorn-lib/portfile.cmake new file mode 100644 index 0000000..dfdc82b --- /dev/null +++ b/vcpkg/ports/unicorn-lib/portfile.cmake @@ -0,0 +1,29 @@ +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + message("unicorn-lib is a static library, now build with static.") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO CaptainCrowbar/unicorn-lib + REF 01cc7fcd2d60dbc083767d448477638e5ec8b92a # 2020-03-02 + SHA512 d8ffb80c589b34d850a507570d7d8ec707a6a23b469d484f47c80566883bd4883da23a4701434f361231a7615065ff5f1e42e40c028975f43f198c307353ec9d + HEAD_REF master +) + +file(COPY ${CURRENT_PORT_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_DEBUG + -DUNICORN_LIB_SKIP_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/unicorn/CONTROL b/vcpkg/ports/unicorn/CONTROL new file mode 100644 index 0000000..6dbc5f1 --- /dev/null +++ b/vcpkg/ports/unicorn/CONTROL @@ -0,0 +1,5 @@ +Source: unicorn +Version: 2019-07-11 +Homepage: https://github.com/unicorn-engine/unicorn +Description: Unicorn is a lightweight multi-platform, multi-architecture CPU emulator framework +Supports: !uwp diff --git a/vcpkg/ports/unicorn/portfile.cmake b/vcpkg/ports/unicorn/portfile.cmake new file mode 100644 index 0000000..f00f565 --- /dev/null +++ b/vcpkg/ports/unicorn/portfile.cmake @@ -0,0 +1,58 @@ +include(vcpkg_common_functions) + +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "WindowsStore not supported") +endif() + +if(VCPKG_CRT_LINKAGE STREQUAL "dynamic" AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message(FATAL_ERROR "unicorn can currently only be built with /MT or /MTd (static CRT linkage)") +endif() + +# Note: this is safe because unicorn is a C library and takes steps to avoid memory allocate/free across the DLL boundary. +set(VCPKG_CRT_LINKAGE "static") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO unicorn-engine/unicorn + REF 24f55a7973278f20f0de21b904851d99d4716263 + SHA512 5ef71bbab8480783cba01bc58c6444ee933dbdca86ad452a70ccc0991d9cc2466e4e89f1818589d20199d9ce14b7fe9018b4e8331c26f14ceaa9185cfe9cd5fc + HEAD_REF master +) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(UNICORN_PLATFORM "Win32") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(UNICORN_PLATFORM "x64") +else() + message(FATAL_ERROR "Unsupported architecture") +endif() + +vcpkg_build_msbuild( + PROJECT_PATH "${SOURCE_PATH}/msvc/unicorn.sln" + PLATFORM "${UNICORN_PLATFORM}" +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Release/unicorn.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib") + file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Release/unicorn.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/bin") + file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Debug/unicorn.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") + file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Debug/unicorn.dll" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin") +else() + file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Release/unicorn_static.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/lib") + file(INSTALL "${SOURCE_PATH}/msvc/${UNICORN_PLATFORM}/Debug/unicorn_static.lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib") +endif() + +file( + INSTALL "${SOURCE_PATH}/msvc/distro/include/unicorn" + DESTINATION "${CURRENT_PACKAGES_DIR}/include" + RENAME "unicorn" +) +file( + INSTALL "${SOURCE_PATH}/COPYING" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/unicorn" + RENAME "copyright" +) +file( + INSTALL "${SOURCE_PATH}/COPYING_GLIB" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/unicorn" +) diff --git a/vcpkg/ports/units/CONTROL b/vcpkg/ports/units/CONTROL new file mode 100644 index 0000000..b8d75b2 --- /dev/null +++ b/vcpkg/ports/units/CONTROL @@ -0,0 +1,4 @@ +Source: units +Version: 2.3.1 +Homepage: https://github.com/nholthaus/units +Description: A compile-time, header-only, dimensional analysis and unit conversion library built on c++14 with no dependencies. diff --git a/vcpkg/ports/units/portfile.cmake b/vcpkg/ports/units/portfile.cmake new file mode 100644 index 0000000..4d1d281 --- /dev/null +++ b/vcpkg/ports/units/portfile.cmake @@ -0,0 +1,22 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nholthaus/units + REF v2.3.1 + SHA512 1ec9e4d7d60f073ad82a02116f16b9dda57406a3b22a5b06d34f9e5a4df8fd20cc28fc7acfd8fc33054718e0efca3973df0424563f7e1833687a6c1696b9c340 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS -DBUILD_TESTS=OFF +) + +vcpkg_install_cmake() + +# Handle copyright/readme/package files +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +# remove uneeded directories +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) \ No newline at end of file diff --git a/vcpkg/ports/unittest-cpp/CONTROL b/vcpkg/ports/unittest-cpp/CONTROL new file mode 100644 index 0000000..195b41f --- /dev/null +++ b/vcpkg/ports/unittest-cpp/CONTROL @@ -0,0 +1,4 @@ +Source: unittest-cpp +Version: 2.0.0-1 +Homepage: https://github.com/unittest-cpp/unittest-cpp +Description: A lightweight unit testing framework for C++ diff --git a/vcpkg/ports/unittest-cpp/portfile.cmake b/vcpkg/ports/unittest-cpp/portfile.cmake new file mode 100644 index 0000000..597444d --- /dev/null +++ b/vcpkg/ports/unittest-cpp/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO unittest-cpp/unittest-cpp + REF v2.0.0 + SHA512 39318f4ed31534c116679a3257bf1438a6c4b3bef1894dfd40aea934950c6c8197af6a7f61539b8e9ddc67327c9388d7e8a6f8a3e0e966ad26c07554e2429cab + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/UnitTest++) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/unittest-cpp ${CURRENT_PACKAGES_DIR}/share/unittest++) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/unittest-cpp RENAME copyright) + +# Remove duplicate includes +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/vcpkg/ports/unixodbc/CONTROL b/vcpkg/ports/unixodbc/CONTROL new file mode 100644 index 0000000..6b33505 --- /dev/null +++ b/vcpkg/ports/unixodbc/CONTROL @@ -0,0 +1,6 @@ +Source: unixodbc +Version: 2.3.7 +Port-Version: 2 +Homepage: https://github.com/lurcher/unixODBC +Description: unixODBC is an Open Source ODBC sub-system and an ODBC SDK for Linux, Mac OSX, and UNIX +Supports: (osx|linux) diff --git a/vcpkg/ports/unixodbc/portfile.cmake b/vcpkg/ports/unixodbc/portfile.cmake new file mode 100644 index 0000000..f544881 --- /dev/null +++ b/vcpkg/ports/unixodbc/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_fail_port_install(ON_TARGET "UWP" "Windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lurcher/unixODBC + REF 2.3.7 + SHA512 94e95730304990fc5ed4f76ebfb283d8327a59a3329badaba752a502a2d705549013fd95f0c92704828c301eae54081c8704acffb412fd1e1a71f4722314cec0 + HEAD_REF master +) + +set(ENV{CFLAGS} "$ENV{CFLAGS} -Wno-error=implicit-function-declaration") +vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + AUTOCONFIG + COPY_SOURCE +) + +vcpkg_install_make() + +vcpkg_copy_pdbs() + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif () + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/debug/etc" + "${CURRENT_PACKAGES_DIR}/etc" + "${CURRENT_PACKAGES_DIR}/share/man" + ) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/unixodbcConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/unixodbc/unixodbcConfig.cmake b/vcpkg/ports/unixodbc/unixodbcConfig.cmake new file mode 100644 index 0000000..c0bd259 --- /dev/null +++ b/vcpkg/ports/unixodbc/unixodbcConfig.cmake @@ -0,0 +1,16 @@ +function(set_library_target NAMESPACE LIB_NAME DEBUG_LIB_FILE_NAME RELEASE_LIB_FILE_NAME INCLUDE_DIR) + add_library(${NAMESPACE}::${LIB_NAME} STATIC IMPORTED) + set_target_properties(${NAMESPACE}::${LIB_NAME} PROPERTIES + IMPORTED_CONFIGURATIONS "RELEASE;DEBUG" + IMPORTED_LOCATION_RELEASE "${RELEASE_LIB_FILE_NAME}" + IMPORTED_LOCATION_DEBUG "${DEBUG_LIB_FILE_NAME}" + INTERFACE_INCLUDE_DIRECTORIES "${INCLUDE_DIR}" + ) + set(${NAMESPACE}_${LIB_NAME}_FOUND 1) +endfunction() + +get_filename_component(ROOT "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(ROOT "${ROOT}" PATH) +get_filename_component(ROOT "${ROOT}" PATH) + +set_library_target("UNIX" "odbc" "${ROOT}/debug/lib/libodbc.so" "${ROOT}/lib/libodbc.so" "${ROOT}/include/") \ No newline at end of file diff --git a/vcpkg/ports/unixodbc/usage b/vcpkg/ports/unixodbc/usage new file mode 100644 index 0000000..7901a3e --- /dev/null +++ b/vcpkg/ports/unixodbc/usage @@ -0,0 +1,4 @@ +The package unixodbc is compatible with built-in CMake targets: + + FIND_PACKAGE(unixodbc REQUIRED) + TARGET_LINK_LIBRARIES(main PRIVATE UNIX::odbc) for linkage diff --git a/vcpkg/ports/unqlite/portfile.cmake b/vcpkg/ports/unqlite/portfile.cmake new file mode 100644 index 0000000..a976c30 --- /dev/null +++ b/vcpkg/ports/unqlite/portfile.cmake @@ -0,0 +1,20 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO symisc/unqlite + REF ddb1687036d207bbfc67b98cb470fe52ddf22f62 # 1.1.9 + SHA512 eaabaf5f35662a6ea734c18878f55f5e6e956cd151bb941321f97247bbe0b7f402ceca39c191d31e87db1c04188ca0eaf69c9b202848babfe23d5ffee48df9a7 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/unqlite/vcpkg.json b/vcpkg/ports/unqlite/vcpkg.json new file mode 100644 index 0000000..4efa6c6 --- /dev/null +++ b/vcpkg/ports/unqlite/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "unqlite", + "version-string": "1.1.9", + "description": "An embedded NoSQL, transactional database engine", + "homepage": "https://unqlite.org/", + "license": "BSD-2-Clause" +} diff --git a/vcpkg/ports/unrar/CONTROL b/vcpkg/ports/unrar/CONTROL new file mode 100644 index 0000000..26a52bd --- /dev/null +++ b/vcpkg/ports/unrar/CONTROL @@ -0,0 +1,4 @@ +Source: unrar +Version: 5.8.1 +Homepage: https://www.rarlab.com +Description: rarlab's unrar libary diff --git a/vcpkg/ports/unrar/msbuild-use-default-sma.patch b/vcpkg/ports/unrar/msbuild-use-default-sma.patch new file mode 100644 index 0000000..928f5a3 --- /dev/null +++ b/vcpkg/ports/unrar/msbuild-use-default-sma.patch @@ -0,0 +1,52 @@ +diff --git a/UnRARDll.vcxproj b/UnRARDll.vcxproj +index ec5c17b00..7d3d91bc6 100644 +--- a/UnRARDll.vcxproj ++++ b/UnRARDll.vcxproj +@@ -138,7 +138,6 @@ + Sync + EnableFastChecks + MultiThreadedDebug +- 4Bytes + false + Use + rar.hpp +@@ -168,7 +167,6 @@ + Sync + EnableFastChecks + MultiThreadedDebug +- 4Bytes + false + Use + rar.hpp +@@ -198,7 +196,6 @@ + false + Sync + MultiThreaded +- 4Bytes + true + true + NoExtensions +@@ -239,7 +236,6 @@ + false + Sync + MultiThreaded +- 4Bytes + true + true + false +@@ -274,7 +270,6 @@ + false + Sync + MultiThreaded +- 4Bytes + true + true + NoExtensions +@@ -315,7 +310,6 @@ + false + Sync + MultiThreaded +- 4Bytes + true + true + false diff --git a/vcpkg/ports/unrar/portfile.cmake b/vcpkg/ports/unrar/portfile.cmake new file mode 100644 index 0000000..4665794 --- /dev/null +++ b/vcpkg/ports/unrar/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions) +set(UNRAR_VERSION "5.8.1") +set(UNRAR_SHA512 31303df575e8a5ed9fc03e20d0482306536c3496894a39788052c5c9dfde61eb7f5ca29b8c48354581622a020aa446f108af956ab43024a48731a12233155612) +set(UNRAR_FILENAME unrarsrc-${UNRAR_VERSION}.tar.gz) +set(UNRAR_URL https://www.rarlab.com/rar/${UNRAR_FILENAME}) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +#SRC +vcpkg_download_distfile(ARCHIVE + URLS ${UNRAR_URL} + FILENAME ${UNRAR_FILENAME} + SHA512 ${UNRAR_SHA512} +) +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${UNRAR_VERSION} + PATCHES msbuild-use-default-sma.patch +) + +vcpkg_build_msbuild( + PROJECT_PATH "${SOURCE_PATH}/UnRARDll.vcxproj" + OPTIONS_DEBUG /p:OutDir=../../${TARGET_TRIPLET}-dbg/ + OPTIONS_RELEASE /p:OutDir=../../${TARGET_TRIPLET}-rel/ + OPTIONS /VERBOSITY:Diagnostic /DETAILEDSUMMARY +) + +#INCLUDE (named dll.hpp in source, and unrar.h in all rarlabs distributions) +file(INSTALL ${SOURCE_PATH}/dll.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include RENAME unrar.h) + +#DLL & LIB +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/unrar.dll DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/unrar.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/unrar.dll DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) +file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/unrar.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + +vcpkg_copy_pdbs() + +#COPYRIGHT +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/unrar RENAME copyright) diff --git a/vcpkg/ports/upb/CONTROL b/vcpkg/ports/upb/CONTROL new file mode 100644 index 0000000..a24ac31 --- /dev/null +++ b/vcpkg/ports/upb/CONTROL @@ -0,0 +1,4 @@ +Source: upb +Version: 2020-08-19 +Homepage: https://github.com/protocolbuffers/upb/ +Description: μpb (often written 'upb') is a small protobuf implementation written in C. diff --git a/vcpkg/ports/upb/add-cmake-install.patch b/vcpkg/ports/upb/add-cmake-install.patch new file mode 100644 index 0000000..cdda034 --- /dev/null +++ b/vcpkg/ports/upb/add-cmake-install.patch @@ -0,0 +1,59 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4dd6454..eda6a72 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -8,7 +8,7 @@ else() + cmake_policy(VERSION 3.12) + endif() + +-cmake_minimum_required (VERSION 3.0) ++cmake_minimum_required (VERSION 3.14) + cmake_policy(SET CMP0048 NEW) + + project(upb) +@@ -62,6 +62,7 @@ enable_testing() + + add_library(port + upb/port.c) ++add_library(descriptor_upbproto INTERFACE) + add_library(upb + upb/decode.c + upb/encode.c +@@ -154,6 +155,7 @@ target_link_libraries(upb_cc_bindings INTERFACE + handlers + port + upb) ++if(ENABLE_TESTING) + add_library(upb_test + tests/testmain.cc + tests/test_util.h +@@ -162,5 +164,28 @@ target_link_libraries(upb_test + handlers + port + upb) ++endif() + +- ++install( ++ DIRECTORY upb ++ DESTINATION include ++ FILES_MATCHING ++ PATTERN "*.h" ++ PATTERN "*.hpp" ++ PATTERN "*.inc" ++ PATTERN "*.int.h" ++) ++target_include_directories(upb PUBLIC $) ++install(TARGETS ++ upb ++ upb_cc_bindings ++ upb_json ++ upb_pb ++ port ++ table ++ descriptor_upbproto ++ handlers ++ reflection ++ EXPORT upb-config ++) ++install(EXPORT upb-config NAMESPACE upb:: DESTINATION share/upb) diff --git a/vcpkg/ports/upb/fix-uwp.patch b/vcpkg/ports/upb/fix-uwp.patch new file mode 100644 index 0000000..bbc8e25 --- /dev/null +++ b/vcpkg/ports/upb/fix-uwp.patch @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index eda6a72..386966f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -58,6 +58,10 @@ elseif(UNIX) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--build-id") + endif() + ++if (MSVC) ++ add_compile_options(/wd4146 -D_CRT_SECURE_NO_WARNINGS) ++endif() ++ + enable_testing() + + add_library(port +diff --git a/upb/json_decode.c b/upb/json_decode.c +index 953d238..5185ffd 100644 +--- a/upb/json_decode.c ++++ b/upb/json_decode.c +@@ -1138,7 +1138,7 @@ static void jsondec_struct(jsondec *d, upb_msg *msg, const upb_msgdef *m) { + static void jsondec_wellknownvalue(jsondec *d, upb_msg *msg, + const upb_msgdef *m) { + upb_msgval val; +- const upb_fielddef *f; ++ const upb_fielddef *f = NULL; + upb_msg *submsg; + + switch (jsondec_peek(d)) { diff --git a/vcpkg/ports/upb/portfile.cmake b/vcpkg/ports/upb/portfile.cmake new file mode 100644 index 0000000..fdb5944 --- /dev/null +++ b/vcpkg/ports/upb/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO protocolbuffers/upb + REF 7338facddb8ce405fe7a0a52a6061a1e7c823279 + SHA512 a2ece65612ca7c3cdc7b79994aa488623e5ce4227988611ab60724fae5dc7ba9311363bf5c73f6c74910a6b91392e0a231c28f0b2f4c8cc2c4d4328ed33bc265 + HEAD_REF master + PATCHES + add-cmake-install.patch + fix-uwp.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + # empty folder + ${CURRENT_PACKAGES_DIR}/include/upb/bindings/lua/upb +) + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/vcpkg/ports/urdfdom-headers/CONTROL b/vcpkg/ports/urdfdom-headers/CONTROL new file mode 100644 index 0000000..d239964 --- /dev/null +++ b/vcpkg/ports/urdfdom-headers/CONTROL @@ -0,0 +1,4 @@ +Source: urdfdom-headers +Version: 1.0.4-1 +Homepage: https://github.com/ros/urdfdom_headers +Description: The URDF (U-Robot Description Format) headers provides core data structure headers for URDF. diff --git a/vcpkg/ports/urdfdom-headers/portfile.cmake b/vcpkg/ports/urdfdom-headers/portfile.cmake new file mode 100644 index 0000000..5f7430f --- /dev/null +++ b/vcpkg/ports/urdfdom-headers/portfile.cmake @@ -0,0 +1,33 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ros/urdfdom_headers + REF 00c1c9c231e46b2300d04073ad696521758fa45c + SHA512 8622cfad074454ae34be3e77c37b201adeb0e348df251e1c2fd57f35ae24817bbd2880a9c465056976eb8815fda041ba2fbd70ccb7cac6efc5ed3d7a082e80ef + HEAD_REF master + ) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake TARGET_PATH share/urdfdom_headers) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/urdfdom_headers/cmake TARGET_PATH share/urdfdom_headers) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/urdfdom_headers) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/urdfdom_headers) +endif() + +# The config files for this project use underscore +if(EXISTS ${CURRENT_PACKAGES_DIR}/share/urdfdom-headers) + file(RENAME ${CURRENT_PACKAGES_DIR}/share/urdfdom-headers ${CURRENT_PACKAGES_DIR}/share/urdfdom_headers) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/urdfdom-headers RENAME copyright) diff --git a/vcpkg/ports/urdfdom/0001_use_math_defines.patch b/vcpkg/ports/urdfdom/0001_use_math_defines.patch new file mode 100644 index 0000000..b791533 --- /dev/null +++ b/vcpkg/ports/urdfdom/0001_use_math_defines.patch @@ -0,0 +1,26 @@ +From a374a5b04db27fde58a11cc2ba5ea10a0d0a7dad Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka +Date: Sun, 3 Sep 2017 23:24:55 +0300 +Subject: [PATCH] define _USE_MATH_DEFINES + +--- + urdf_parser/CMakeLists.txt | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/urdf_parser/CMakeLists.txt b/urdf_parser/CMakeLists.txt +index 333226e..2158965 100644 +--- a/urdf_parser/CMakeLists.txt ++++ b/urdf_parser/CMakeLists.txt +@@ -1,5 +1,9 @@ + include_directories(include) + ++if(MSVC) ++add_definitions(-D_USE_MATH_DEFINES) ++endif() ++ + add_library(urdfdom_world SHARED src/pose.cpp src/model.cpp src/link.cpp src/joint.cpp src/world.cpp) + target_link_libraries(urdfdom_world ${TinyXML_LIBRARIES} ${console_bridge_LIBRARIES}) + set_target_properties(urdfdom_world PROPERTIES SOVERSION ${URDF_MAJOR_MINOR_VERSION}) +-- +2.12.2.windows.2 + diff --git a/vcpkg/ports/urdfdom/0002_fix_exports.patch b/vcpkg/ports/urdfdom/0002_fix_exports.patch new file mode 100644 index 0000000..727883f --- /dev/null +++ b/vcpkg/ports/urdfdom/0002_fix_exports.patch @@ -0,0 +1,29 @@ +From 06aa5a06ee543102bf1a4057601adba3490dad60 Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka +Date: Sun, 3 Sep 2017 23:55:11 +0300 +Subject: [PATCH] fix exports + +--- + urdf_parser/CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/urdf_parser/CMakeLists.txt b/urdf_parser/CMakeLists.txt +index 2158965..c209228 100644 +--- a/urdf_parser/CMakeLists.txt ++++ b/urdf_parser/CMakeLists.txt +@@ -15,10 +15,12 @@ set_target_properties(urdfdom_model PROPERTIES SOVERSION ${URDF_MAJOR_MINOR_VERS + add_library(urdfdom_sensor SHARED src/urdf_sensor.cpp) + target_link_libraries(urdfdom_sensor urdfdom_model ${TinyXML_LIBRARIES} ${console_bridge_LIBRARIES}) + set_target_properties(urdfdom_sensor PROPERTIES SOVERSION ${URDF_MAJOR_MINOR_VERSION}) ++set_target_properties(urdfdom_sensor PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) + + add_library(urdfdom_model_state SHARED src/urdf_model_state.cpp src/twist.cpp) + target_link_libraries(urdfdom_model_state ${TinyXML_LIBRARIES} ${console_bridge_LIBRARIES}) + set_target_properties(urdfdom_model_state PROPERTIES SOVERSION ${URDF_MAJOR_MINOR_VERSION}) ++set_target_properties(urdfdom_model_state PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) + + # -------------------------------- + +-- +2.12.2.windows.2 + diff --git a/vcpkg/ports/urdfdom/0003_import_prefix.patch b/vcpkg/ports/urdfdom/0003_import_prefix.patch new file mode 100644 index 0000000..3353774 --- /dev/null +++ b/vcpkg/ports/urdfdom/0003_import_prefix.patch @@ -0,0 +1,15 @@ +diff --git a/cmake/urdfdom-config.cmake.in b/cmake/urdfdom-config.cmake.in +index fb81b47..3ccad51 100644 +--- a/cmake/urdfdom-config.cmake.in ++++ b/cmake/urdfdom-config.cmake.in +@@ -3,6 +3,10 @@ if (@PKG_NAME@_CONFIG_INCLUDED) + endif() + set(@PKG_NAME@_CONFIG_INCLUDED TRUE) + ++# Vcpkg fix-ups ++get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) ++get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) ++ + set(@PKG_NAME@_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include" "@TinyXML_INCLUDE_DIRS@") + + foreach(lib @PKG_LIBRARIES@) diff --git a/vcpkg/ports/urdfdom/CONTROL b/vcpkg/ports/urdfdom/CONTROL new file mode 100644 index 0000000..0775ddd --- /dev/null +++ b/vcpkg/ports/urdfdom/CONTROL @@ -0,0 +1,5 @@ +Source: urdfdom +Version: 1.0.4-1 +Homepage: https://github.com/ros/urdfdom +Description: Provides core data structures and a simple XML parsers for populating the class data structures from an URDF file. +Build-Depends: console-bridge, tinyxml, urdfdom-headers diff --git a/vcpkg/ports/urdfdom/portfile.cmake b/vcpkg/ports/urdfdom/portfile.cmake new file mode 100644 index 0000000..2c45455 --- /dev/null +++ b/vcpkg/ports/urdfdom/portfile.cmake @@ -0,0 +1,51 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ros/urdfdom + REF 0da4b20675cdbe14b532d484a1c17df85b4e1584 # 1.0.4 + SHA512 cad59307fef466e2bbe3769a4123571d48223ea25a80dde76cb25c9f6dfc961570090d188ddaf8fc93f41f355ffa240eb00abe20cdea4a5ee3e49f56d1258686 + HEAD_REF master + PATCHES + 0001_use_math_defines.patch + 0002_fix_exports.patch + 0003_import_prefix.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/urdfdom/cmake) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/urdfdom) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/urdfdom) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/ ${CURRENT_PACKAGES_DIR}/tools/urdfdom/) + +file(GLOB URDFDOM_DLLS_DEBUG ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) +foreach(URDFDOM_DLL_DEBUG ${URDFDOM_DLLS_DEBUG}) + file(COPY ${URDFDOM_DLL_DEBUG} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(REMOVE ${URDFDOM_DLL_DEBUG}) +endforeach() + +file(GLOB URDFDOM_DLLS_RELEASE ${CURRENT_PACKAGES_DIR}/lib/*.dll) +foreach(URDFDOM_DLL_RELEASE ${URDFDOM_DLLS_RELEASE}) + file(COPY ${URDFDOM_DLL_RELEASE} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE ${URDFDOM_DLL_RELEASE}) +endforeach() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/urdfdom RENAME copyright) diff --git a/vcpkg/ports/uriparser/CONTROL b/vcpkg/ports/uriparser/CONTROL new file mode 100644 index 0000000..c863133 --- /dev/null +++ b/vcpkg/ports/uriparser/CONTROL @@ -0,0 +1,7 @@ +Source: uriparser +Version: 0.9.3-5 +Homepage: https://github.com/uriparser/uriparser +Description: uriparser is a strictly RFC 3986 compliant URI parsing and handling library written in C89 ("ANSI C"). uriparser is cross-platform, fast, supports Unicode, and is licensed under the New BSD license. + +Feature: tool +Description: Builds tools (e.g. CLI "uriparse") diff --git a/vcpkg/ports/uriparser/portfile.cmake b/vcpkg/ports/uriparser/portfile.cmake new file mode 100644 index 0000000..5082d7e --- /dev/null +++ b/vcpkg/ports/uriparser/portfile.cmake @@ -0,0 +1,64 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO uriparser/uriparser + REF uriparser-0.9.3 + SHA512 5740e2405566c17c4467a677d83596d86398b64778ad2b5234e9390d8ab817d1b5231988d120b1d19b099788e38814825a438beed991e49b242b8a5de8c51d03 + HEAD_REF master +) + +if("tool" IN_LIST FEATURES) + set(URIPARSER_BUILD_TOOLS ON) +else() + set(URIPARSER_BUILD_TOOLS OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DURIPARSER_BUILD_DOCS=OFF + -DURIPARSER_BUILD_TESTS=OFF + OPTIONS_DEBUG + -DURIPARSER_BUILD_TOOLS=OFF + OPTIONS_RELEASE + -DURIPARSER_BUILD_TOOLS=${URIPARSER_BUILD_TOOLS} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +if(URIPARSER_BUILD_TOOLS) + vcpkg_copy_tools( + TOOL_NAMES uriparse + AUTO_CLEAN + ) +endif() + +set(_package_version_re "#define[ ]+PACKAGE_VERSION[ ]+\"([0-9]+.[0-9]+.[0-9]+)\"") +file(STRINGS + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/config.h" + _package_version_define REGEX "${_package_version_re}" +) +string(REGEX REPLACE "${_package_version_re}" "\\1" _package_version ${_package_version_define}) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}-${_package_version}) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/include/uriparser/UriBase.h + "defined(URI_STATIC_BUILD)" + "1 // defined(URI_STATIC_BUILD)" + ) +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/uriparser RENAME copyright) + +# Remove duplicate info +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/vcpkg/ports/usbmuxd/CONTROL b/vcpkg/ports/usbmuxd/CONTROL new file mode 100644 index 0000000..0dee4ed --- /dev/null +++ b/vcpkg/ports/usbmuxd/CONTROL @@ -0,0 +1,5 @@ +Source: usbmuxd +Version: 1.2.76-1 +Homepage: http://www.libimobiledevice.org +Description: A socket daemon to multiplex connections from and to iOS devices +Build-Depends: libimobiledevice, libusb, libusb-win32, pthreads diff --git a/vcpkg/ports/usbmuxd/fix-dependence-libimobiledevice.patch b/vcpkg/ports/usbmuxd/fix-dependence-libimobiledevice.patch new file mode 100644 index 0000000..7730834 --- /dev/null +++ b/vcpkg/ports/usbmuxd/fix-dependence-libimobiledevice.patch @@ -0,0 +1,14 @@ +diff --git a/src/preflight.c b/src/preflight.c +index aca193e..f012286 100644 +--- a/src/preflight.c ++++ b/src/preflight.c +@@ -54,9 +54,6 @@ + #include "log.h" + + #ifdef HAVE_LIBIMOBILEDEVICE +-enum connection_type { +- CONNECTION_USBMUXD = 1 +-}; + + struct idevice_private { + char *udid; diff --git a/vcpkg/ports/usbmuxd/fix-dependence-pthreads.patch b/vcpkg/ports/usbmuxd/fix-dependence-pthreads.patch new file mode 100644 index 0000000..5ff4d84 --- /dev/null +++ b/vcpkg/ports/usbmuxd/fix-dependence-pthreads.patch @@ -0,0 +1,40 @@ +diff --git a/usbmuxd.vcxproj b/usbmuxd.vcxproj +index d1d8a4d..086e8a4 100644 +--- a/usbmuxd.vcxproj ++++ b/usbmuxd.vcxproj +@@ -135,7 +135,7 @@ + + Console + true +- ws2_32.lib;libusb-1.0.lib;libusb0.lib;pthreadsVC2d.lib;%(AdditionalDependencies) ++ ws2_32.lib;libusb-1.0.lib;libusb0.lib;pthreadVC3d.lib;%(AdditionalDependencies) + + + +@@ -149,7 +149,7 @@ + + Console + true +- ws2_32.lib;libusb-1.0.lib;libusb0.lib;pthreadsVC2d.lib;%(AdditionalDependencies) ++ ws2_32.lib;libusb-1.0.lib;libusb0.lib;pthreadVC3d.lib;%(AdditionalDependencies) + + + +@@ -168,7 +168,7 @@ + true + true + true +- ws2_32.lib;libusb-1.0.lib;libusb0.lib;pthreadsVC2.lib;%(AdditionalDependencies) ++ ws2_32.lib;libusb-1.0.lib;libusb0.lib;pthreadVC3.lib;%(AdditionalDependencies) + + + +@@ -186,7 +186,7 @@ + true + true + true +- ws2_32.lib;libusb-1.0.lib;libusb0.lib;pthreadsVC2.lib;%(AdditionalDependencies) ++ ws2_32.lib;libusb-1.0.lib;libusb0.lib;pthreadVC3.lib;%(AdditionalDependencies) + + + diff --git a/vcpkg/ports/usbmuxd/portfile.cmake b/vcpkg/ports/usbmuxd/portfile.cmake new file mode 100644 index 0000000..be0a1d8 --- /dev/null +++ b/vcpkg/ports/usbmuxd/portfile.cmake @@ -0,0 +1,20 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libimobiledevice-win32/usbmuxd + REF v1.2.76 + SHA512 b1bb479bf4ba0a71d7b70f55db4d01b68e024fe559265947e096d85cd736e4cc23c9ddbe07360641b63a5e1276c243e7fe2aa557323d1f5d22058c9a45de4f1a + HEAD_REF master-msvc + PATCHES + fix-dependence-pthreads.patch + fix-dependence-libimobiledevice.patch +) + +vcpkg_install_msbuild( + SOURCE_PATH ${SOURCE_PATH} + PROJECT_SUBPATH usbmuxd.vcxproj + LICENSE_SUBPATH COPYING.GPLv2 + USE_VCPKG_INTEGRATION +) + +# No headers +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/vcpkg/ports/usd/CONTROL b/vcpkg/ports/usd/CONTROL new file mode 100644 index 0000000..59df24e --- /dev/null +++ b/vcpkg/ports/usd/CONTROL @@ -0,0 +1,5 @@ +Source: usd +Version: 20.02-1 +Build-Depends: boost-assign, boost-crc, boost-date-time, boost-filesystem, boost-format, boost-multi-index, boost-program-options, boost-regex, boost-system, boost-vmd, tbb, zlib +Description: Universal Scene Description (USD) is an efficient, scalable system for authoring, reading, and streaming time-sampled scene description for interchange between graphics applications. +Supports: !x86 diff --git a/vcpkg/ports/usd/fix-build-error.patch b/vcpkg/ports/usd/fix-build-error.patch new file mode 100644 index 0000000..b13fa69 --- /dev/null +++ b/vcpkg/ports/usd/fix-build-error.patch @@ -0,0 +1,13 @@ +diff --git a/pxr/usd/ar/packageUtils.cpp b/pxr/usd/ar/packageUtils.cpp +index d497587..ed3df29 100644 +--- a/pxr/usd/ar/packageUtils.cpp ++++ b/pxr/usd/ar/packageUtils.cpp +@@ -29,6 +29,8 @@ + #include "pxr/base/tf/pathUtils.h" + #include "pxr/base/tf/stringUtils.h" + ++#include ++ + PXR_NAMESPACE_OPEN_SCOPE + + namespace diff --git a/vcpkg/ports/usd/portfile.cmake b/vcpkg/ports/usd/portfile.cmake new file mode 100644 index 0000000..e6cbfab --- /dev/null +++ b/vcpkg/ports/usd/portfile.cmake @@ -0,0 +1,59 @@ +vcpkg_fail_port_install(ON_ARCH "x86") + +# Don't file if the bin folder exists. We need exe and custom files. +SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO PixarAnimationStudios/USD + REF be1a80f8cb91133ac75e1fc2a2e1832cd10d91c8 # v20.02 + SHA512 12c7cf7e5320b168ddde870b1a68b482515b33bd29206c4f6cbb248b9071b866c47353bf496890e01950abb5f725157eca576f9dc403e15020474f9a653b43fe + HEAD_REF master + PATCHES + fix-build-error.patch +) + +vcpkg_find_acquire_program(PYTHON2) +get_filename_component(PYTHON2_DIR "${PYTHON2}" DIRECTORY) +vcpkg_add_to_path("${PYTHON2_DIR}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPXR_BUILD_ALEMBIC_PLUGIN:BOOL=OFF + -DPXR_BUILD_EMBREE_PLUGIN:BOOL=OFF + -DPXR_BUILD_IMAGING:BOOL=OFF + -DPXR_BUILD_MAYA_PLUGIN:BOOL=OFF + -DPXR_BUILD_MONOLITHIC:BOOL=OFF + -DPXR_BUILD_TESTS:BOOL=OFF + -DPXR_BUILD_USD_IMAGING:BOOL=OFF + -DPXR_ENABLE_PYTHON_SUPPORT:BOOL=OFF +) + +vcpkg_install_cmake() + +file( + RENAME + "${CURRENT_PACKAGES_DIR}/pxrConfig.cmake" + "${CURRENT_PACKAGES_DIR}/cmake/pxrConfig.cmake") + +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) + +vcpkg_copy_pdbs() + +# Remove duplicates in debug folder +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file( + COPY ${SOURCE_PATH}/LICENSE.txt + DESTINATION ${CURRENT_PACKAGES_DIR}/share/usd/copyright) + +# Move all dlls to bin +file(GLOB RELEASE_DLL ${CURRENT_PACKAGES_DIR}/lib/*.dll) +file(GLOB DEBUG_DLL ${CURRENT_PACKAGES_DIR}/debug/lib/*.dll) +foreach(CURRENT_FROM ${RELEASE_DLL} ${DEBUG_DLL}) + string(REPLACE "/lib/" "/bin/" CURRENT_TO ${CURRENT_FROM}) + file(RENAME ${CURRENT_FROM} ${CURRENT_TO}) +endforeach() diff --git a/vcpkg/ports/usockets/CMakeLists.txt b/vcpkg/ports/usockets/CMakeLists.txt new file mode 100644 index 0000000..0a5fd0d --- /dev/null +++ b/vcpkg/ports/usockets/CMakeLists.txt @@ -0,0 +1,65 @@ +cmake_minimum_required(VERSION 3.13) +project(uSockets C CXX) + +option(INSTALL_HEADERS "Install header files" ON) + +# To enable this feature, OpenSSL 1.1+ is required and is currently disabled due to issue 4267 +if (CMAKE_USE_OPENSSL) + find_package(OpenSSL REQUIRED) + set(USE_OPENSSL "-DUSE_OPENSSL -DLIBUS_USE_OPENSSL") + #set(OPENSSL_LIB "OpenSSL::SSL OpenSSL::Crypto") + list(APPEND CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) +else() + set(NOT_USE_OPENSSL "-DLIBUS_NO_SSL") +endif() + +find_package(unofficial-libuv CONFIG REQUIRED) +find_path(LIBUV_INCLUDE_DIR uv.h) +find_library(LIBUV_LIBRARY NAMES libuv) +include_directories(APPEND "${CMAKE_CURRENT_LIST_DIR}/src") + +file(GLOB SOURCES src/*.c src/eventing/*.c) + +set(USOCKETS_EXT_INCLUDE_DIR ) +set(USOCKETS_EXT_LIBS ) + +if (CMAKE_USE_OPENSSL) + find_package(OpenSSL REQUIRED) + file(GLOB SSL_SOURCES src/crypto/*.c) + list(APPEND SOURCES ${SSL_SOURCES}) + list(APPEND USOCKETS_EXT_LIBS OpenSSL::SSL OpenSSL::Crypto) +endif() + +if (CMAKE_USE_EVENT) + file(GLOB SSL_SOURCES src/eventing/*.c) + list(APPEND SOURCES ${SSL_SOURCES}) + list(APPEND USOCKETS_EXT_INCLUDE_DIR src/internal/eventing) +endif() + +if (CMAKE_USE_NETWORK) + list(APPEND USOCKETS_EXT_INCLUDE_DIR src/internal/networking) + list(APPEND USOCKETS_EXT_LIBS Ws2_32) +endif() + +add_library(uSockets ${SOURCES}) + +if (${LIBUS_USE_LIBUV}) + target_compile_definitions(uSockets PRIVATE -DLIBUS_USE_LIBUV) +endif() + +target_compile_definitions(uSockets PRIVATE ${NOT_USE_OPENSSL} ${USE_OPENSSL}) +target_include_directories(uSockets PUBLIC ${OPENSSL_INCLUDE_DIR} ${LIBUV_INCLUDE_DIR} ${USOCKETS_EXT_INCLUDE_DIR}) +target_link_libraries(uSockets PUBLIC ${OPENSSL_LIBRARIES} ${LIBUV_LIBRARY} ${USOCKETS_EXT_LIBS}) + +install(TARGETS uSockets + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +if(INSTALL_HEADERS) + file(GLOB HEADERS src/*.h) + install(FILES ${HEADERS} DESTINATION include) + file(GLOB HEADERS src/interfaces/*.h) + install(FILES ${HEADERS} DESTINATION include/interfaces) +endif() diff --git a/vcpkg/ports/usockets/CONTROL b/vcpkg/ports/usockets/CONTROL new file mode 100644 index 0000000..9c8143f --- /dev/null +++ b/vcpkg/ports/usockets/CONTROL @@ -0,0 +1,15 @@ +Source: usockets +Version: 0.3.5-1 +Build-Depends:libuv +Description: Miniscule cross-platform eventing, networking & crypto for async applications + +Feature: ssl +Build-Depends: openssl +Description: Build usockets with openssl support + +Feature: event +Description: Build usockets with epoll support + +Feature: network +Build-Depends: winsock2 +Description: Build usockets with winsock support \ No newline at end of file diff --git a/vcpkg/ports/usockets/portfile.cmake b/vcpkg/ports/usockets/portfile.cmake new file mode 100644 index 0000000..9fdd15b --- /dev/null +++ b/vcpkg/ports/usockets/portfile.cmake @@ -0,0 +1,38 @@ +IF (NOT VCPKG_TARGET_IS_LINUX) + set(USE_LIBUV ON) +EndIF () + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO uNetworking/uSockets + REF 929242ce5223115093e83683524cb4d7384c7868 # v0.3.5 + SHA512 3de7e11223bc0a47de1ec9aea7822a5753d65eda0a4ff8f9893c5e4b103a3c7e48ab159ecce23bea5a0ee7dbba1a5975e32ccb7f7ca7cddff120b3020159aef9 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +if ("network" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "Feature network only support Windows") +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + ssl CMAKE_USE_OPENSSL + event CMAKE_USE_EVENT + network CMAKE_USE_NETWORK +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DLIBUS_USE_LIBUV=${USE_LIBUV} + OPTIONS_DEBUG + -DINSTALL_HEADERS=OFF +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() \ No newline at end of file diff --git a/vcpkg/ports/usrsctp/CONTROL b/vcpkg/ports/usrsctp/CONTROL new file mode 100644 index 0000000..4269947 --- /dev/null +++ b/vcpkg/ports/usrsctp/CONTROL @@ -0,0 +1,3 @@ +Source: usrsctp +Version: 35c1d97020a-2 +Description: This is a userland SCTP stack supporting FreeBSD, Linux, Mac OS X and Windows. diff --git a/vcpkg/ports/usrsctp/portfile.cmake b/vcpkg/ports/usrsctp/portfile.cmake new file mode 100644 index 0000000..416cdc6 --- /dev/null +++ b/vcpkg/ports/usrsctp/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sctplab/usrsctp + REF 35c1d97020a20014b989bba4f20225fd9429c4f4 + SHA512 18786825ec2c8c8aeb6b0bcab97deeac40420f7a9bdb427c891b26633ff759266409381ae2545c5572a740322ae1a56f80da1a784d71e50fce97177c343d27ce + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -Dsctp_werror=OFF -Dsctp_build_programs=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/lib/usrsctp.dll + ${CURRENT_PACKAGES_DIR}/lib/usrsctp.dll +) + +configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/usrsctp/copyright COPYONLY) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/utf8h/CONTROL b/vcpkg/ports/utf8h/CONTROL new file mode 100644 index 0000000..31b21a8 --- /dev/null +++ b/vcpkg/ports/utf8h/CONTROL @@ -0,0 +1,4 @@ +Source: utf8h +Version: 2020-06-14 +Homepage: https://github.com/sheredom/utf8.h +Description: Single header utf8 string functions for C and C++ diff --git a/vcpkg/ports/utf8h/portfile.cmake b/vcpkg/ports/utf8h/portfile.cmake new file mode 100644 index 0000000..e8167fe --- /dev/null +++ b/vcpkg/ports/utf8h/portfile.cmake @@ -0,0 +1,11 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO sheredom/utf8.h + REF 817789676b1c3ac9b117a0f9e04378d3e33a79be + SHA512 3e8455cbc03fa02b1f6f87832c89104510012e8dda968fd56ad5661ffb1c40498e59ea7b65f41f551233f28ee526974086efad3dd767bf944844a3ffede04e1d + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/utf8.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/utf8h) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/utf8proc/CONTROL b/vcpkg/ports/utf8proc/CONTROL new file mode 100644 index 0000000..56a348e --- /dev/null +++ b/vcpkg/ports/utf8proc/CONTROL @@ -0,0 +1,4 @@ +Source: utf8proc +Version: 2.4.0-1 +Homepage: https://github.com/JuliaLang/utf8proc +Description: Clean C library for processing UTF-8 Unicode data. diff --git a/vcpkg/ports/utf8proc/portfile.cmake b/vcpkg/ports/utf8proc/portfile.cmake new file mode 100644 index 0000000..b4dd9f5 --- /dev/null +++ b/vcpkg/ports/utf8proc/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO JuliaLang/utf8proc + REF v2.4.0 + SHA512 2bbd056b488cd30faca26618389d8af84edc39ade9b705e147b676bf39eee65b40239d01c32c46dfc2a289d79e869ed1bb3c347365603dcaab2f69e34427441a +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(READ ${CURRENT_PACKAGES_DIR}/include/utf8proc.h UTF8PROC_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + string(REPLACE "defined UTF8PROC_SHARED" "0" UTF8PROC_H "${UTF8PROC_H}") +else() + string(REPLACE "defined UTF8PROC_SHARED" "1" UTF8PROC_H "${UTF8PROC_H}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/utf8proc.h "${UTF8PROC_H}") + +file(COPY ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/utf8proc) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/utf8proc/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/utf8proc/copyright) diff --git a/vcpkg/ports/utfcpp/CONTROL b/vcpkg/ports/utfcpp/CONTROL new file mode 100644 index 0000000..88cdd69 --- /dev/null +++ b/vcpkg/ports/utfcpp/CONTROL @@ -0,0 +1,4 @@ +Source: utfcpp +Version: 3.1.2 +Homepage: https://github.com/nemtrif/utfcpp +Description: UTF-8 with C++ in a Portable Way diff --git a/vcpkg/ports/utfcpp/portfile.cmake b/vcpkg/ports/utfcpp/portfile.cmake new file mode 100644 index 0000000..a392837 --- /dev/null +++ b/vcpkg/ports/utfcpp/portfile.cmake @@ -0,0 +1,11 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nemtrif/utfcpp + REF v3.1.2 + SHA512 d43df19d9e8652291f1301a326ec0d592bad43d6ecf9086947037f0ae0c1e70c2d96082c48066639e2b7c57c0ea0e4782d6b215d017cf96a4c73ff3a15feec75 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/source/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${SOURCE_PATH}/source/utf8.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/utfz/CONTROL b/vcpkg/ports/utfz/CONTROL new file mode 100644 index 0000000..1212c4d --- /dev/null +++ b/vcpkg/ports/utfz/CONTROL @@ -0,0 +1,4 @@ +Source: utfz +Version: 1.2-1 +Homepage: https://github.com/IMQS/utfz +Description: A tiny C++ library for parsing and encoding utf-8 diff --git a/vcpkg/ports/utfz/portfile.cmake b/vcpkg/ports/utfz/portfile.cmake new file mode 100644 index 0000000..27b5d17 --- /dev/null +++ b/vcpkg/ports/utfz/portfile.cmake @@ -0,0 +1,23 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO IMQS/utfz + REF v1.2 + SHA512 286a7a79fe860df8c5a4e1fc75f56460026fe9fbcd2f0ea3e70ecf78e4c5de73442a008339a90c2bd4ef94d5a89c0ed2fb537b91927f11aaa1aa5876d36a628b + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +# Copy the include file +file(COPY ${SOURCE_PATH}/utfz.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/license DESTINATION ${CURRENT_PACKAGES_DIR}/share/utfz) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/utfz/license ${CURRENT_PACKAGES_DIR}/share/utfz/copyright) diff --git a/vcpkg/ports/uthenticode/CONTROL b/vcpkg/ports/uthenticode/CONTROL new file mode 100644 index 0000000..eeb4edf --- /dev/null +++ b/vcpkg/ports/uthenticode/CONTROL @@ -0,0 +1,6 @@ +Source: uthenticode +Version: 1.0.4 +Description: A cross-platform library for verifying Authenticode signatures +Homepage: https://github.com/trailofbits/uthenticode +Supports: !uwp +Build-Depends: pe-parse, openssl diff --git a/vcpkg/ports/uthenticode/portfile.cmake b/vcpkg/ports/uthenticode/portfile.cmake new file mode 100644 index 0000000..236d72b --- /dev/null +++ b/vcpkg/ports/uthenticode/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO trailofbits/uthenticode + REF v1.0.4 + SHA512 82d5ff61071adefec886a140d253b733cb2318ccf34e831087973b05f7e274b207031e606303f65269a5ed1b45c3c599d79e217cf6229d60c8cc2396e842f32e + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/uthenticode TARGET_PATH share/uthenticode) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file( + INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) diff --git a/vcpkg/ports/uvatlas/CONTROL b/vcpkg/ports/uvatlas/CONTROL new file mode 100644 index 0000000..3e7faa9 --- /dev/null +++ b/vcpkg/ports/uvatlas/CONTROL @@ -0,0 +1,5 @@ +Source: uvatlas +Version: aug2020 +Homepage: https://github.com/Microsoft/UVAtlas +Description: UVAtlas isochart texture atlas +Supports: windows \ No newline at end of file diff --git a/vcpkg/ports/uvatlas/portfile.cmake b/vcpkg/ports/uvatlas/portfile.cmake new file mode 100644 index 0000000..28367c0 --- /dev/null +++ b/vcpkg/ports/uvatlas/portfile.cmake @@ -0,0 +1,61 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY ONLY_DYNAMIC_CRT) + +vcpkg_fail_port_install(ON_TARGET "OSX" "Linux") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/UVAtlas + REF 60e2f2d5175f3a9fa6987516c4b44a4f0de3e1fa # aug2020 + SHA512 6ff99148d8d26345d3e935840d43536558a8174346492d794a4583f50b89a0648bfba3c5a9a433d803fcfd6092716b2f482ff5d1bad896fc4933971dc8107d6d + HEAD_REF master +) + +if(VCPKG_PLATFORM_TOOLSET MATCHES "v142") + set(SOLUTION_TYPE 2019) + set(OCILIB_ARCH_X86 x86) + set(OCILIB_ARCH_X64 x64) +else() + set(SOLUTION_TYPE 2017) + set(OCILIB_ARCH_X86 x86) + set(OCILIB_ARCH_X64 x64) +endif() + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(PLATFORM ${OCILIB_ARCH_X86}) + SET(BUILD_ARCH "Win32") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(PLATFORM ${OCILIB_ARCH_X64}) + SET(BUILD_ARCH ${OCILIB_ARCH_X64}) +else() + set(PLATFORM ${TRIPLET_SYSTEM_ARCH}) +endif() + +vcpkg_build_msbuild( + PROJECT_PATH ${SOURCE_PATH}/UVAtlas_Windows10_${SOLUTION_TYPE}.sln + PLATFORM ${PLATFORM} +) + +file(INSTALL + ${SOURCE_PATH}/UVAtlas/inc/ + DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(INSTALL + ${SOURCE_PATH}/UVAtlas/Bin/Windows10_${SOLUTION_TYPE}/${BUILD_ARCH}/Release/UVAtlas.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(INSTALL + ${SOURCE_PATH}/UVAtlas/Bin/Windows10_${SOLUTION_TYPE}/${BUILD_ARCH}/Debug/UVAtlas.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + +vcpkg_download_distfile(uvatlastool + URLS "https://github.com/Microsoft/UVAtlas/releases/download/sept2016/uvatlastool.exe" + FILENAME "uvatlastool.exe" + SHA512 2583ba8179d0a58fb85d871368b17571e36242436b5a5dbaf6f99ec2f2ee09f4e11e8f922b29563da3cb3b5bacdb771036c84d5b94f405c7988bfe5f2881c3df +) + +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/uvatlas/") + +file(INSTALL + ${DOWNLOADS}/uvatlastool.exe + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/uvatlas/) + + # Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/uvw/CMakeLists.txt b/vcpkg/ports/uvw/CMakeLists.txt new file mode 100644 index 0000000..f359b73 --- /dev/null +++ b/vcpkg/ports/uvw/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.8) +project(uvw) + +find_package(unofficial-libuv CONFIG REQUIRED) + +add_library(uvw INTERFACE) +target_link_libraries(uvw INTERFACE unofficial::libuv::libuv) + +install(TARGETS uvw + EXPORT uvw + INCLUDES DESTINATION include/) + +install(EXPORT uvw + DESTINATION "share/uvw" + FILE uvw-targets.cmake + NAMESPACE uvw::) + +install(DIRECTORY + src/uvw/ + DESTINATION include/uvw/) + +install(FILES + src/uvw.hpp + DESTINATION include/ +) diff --git a/vcpkg/ports/uvw/CONTROL b/vcpkg/ports/uvw/CONTROL new file mode 100644 index 0000000..f95812f --- /dev/null +++ b/vcpkg/ports/uvw/CONTROL @@ -0,0 +1,5 @@ +Source: uvw +Version: 2.3.1 +Description: Header-only, event based, tiny and easy to use libuv wrapper in modern C++. +Homepage: https://github.com/skypjack/uvw +Build-Depends: libuv diff --git a/vcpkg/ports/uvw/portfile.cmake b/vcpkg/ports/uvw/portfile.cmake new file mode 100644 index 0000000..640ea3b --- /dev/null +++ b/vcpkg/ports/uvw/portfile.cmake @@ -0,0 +1,25 @@ +#header-only library +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO skypjack/uvw + REF da3b5f00f574df447dc0ff69af280a9eadc95333 # v2.3.1_libuv-v1.34 + SHA512 a1a00838b909ef41157911851e48581b70a9a06da8507357567208d205e709f50f891246708f33683aca2aaf7fde8b36147539152727c782604442e385b4e080 +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/uvw-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/uvw/) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright/readme/package files +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/uvw RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/uvw) diff --git a/vcpkg/ports/uvw/uvw-config.cmake b/vcpkg/ports/uvw/uvw-config.cmake new file mode 100644 index 0000000..1fdc98f --- /dev/null +++ b/vcpkg/ports/uvw/uvw-config.cmake @@ -0,0 +1,2 @@ +find_package(unofficial-libuv CONFIG REQUIRED) +include ("${CMAKE_CURRENT_LIST_DIR}/uvw-targets.cmake") diff --git a/vcpkg/ports/uwebsockets/CONTROL b/vcpkg/ports/uwebsockets/CONTROL new file mode 100644 index 0000000..a839725 --- /dev/null +++ b/vcpkg/ports/uwebsockets/CONTROL @@ -0,0 +1,5 @@ +Source: uwebsockets +Version: 18.1.0 +Build-Depends: zlib, usockets +Homepage: https://github.com/uWebSockets/uWebSockets +Description: Simple, secure & standards compliant web I/O for the most demanding of applications diff --git a/vcpkg/ports/uwebsockets/portfile.cmake b/vcpkg/ports/uwebsockets/portfile.cmake new file mode 100644 index 0000000..af5542f --- /dev/null +++ b/vcpkg/ports/uwebsockets/portfile.cmake @@ -0,0 +1,12 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO uNetworking/uWebSockets + REF 025415d1a0174cf581b481fd2b3f155241a1265b # v18.1.0 + SHA512 e094f1c8b3d0361c5a36c9a911e8431f19567d42db0c520ef1888db1d5f12e0103c7a554d7f7117648ed9b7bc1ceb104cd2f7ce7867153e220d2c4bf9cba7907 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/src DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(RENAME ${CURRENT_PACKAGES_DIR}/include/src ${CURRENT_PACKAGES_DIR}/include/uwebsockets/) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/v-hacd/CMakeLists.txt b/vcpkg/ports/v-hacd/CMakeLists.txt new file mode 100644 index 0000000..f4451ec --- /dev/null +++ b/vcpkg/ports/v-hacd/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.10.0 FATAL_ERROR) + +project(VHACD) + +# Determine if VHACD is built as a subproject (using add_subdirectory) +# or if it is the master project. +set(MASTER_PROJECT OFF) +if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) + set(MASTER_PROJECT ON) + message(STATUS "CMake version: ${CMAKE_VERSION}") +endif () + +option(NO_OPENCL "NO_OPENCL" OFF) +option(NO_OPENMP "NO_OPENMP" OFF) + +message("NO_OPENCL " ${NO_OPENCL}) +message("NO_OPENMP " ${NO_OPENMP}) + +add_subdirectory(src) \ No newline at end of file diff --git a/vcpkg/ports/v-hacd/CONTROL b/vcpkg/ports/v-hacd/CONTROL new file mode 100644 index 0000000..c642eae --- /dev/null +++ b/vcpkg/ports/v-hacd/CONTROL @@ -0,0 +1,13 @@ +Source: v-hacd +Version: 3.2.0 +Port-Version: 1 +Homepage: https://github.com/kmammou/v-hacd +Description: The V-HACD library decomposes a 3D surface into a set of "near" convex parts. +Supports: !arm + +Feature: opencl +Description: Builds opencl enabled lib +Build-Depends: opencl + +Feature: openmp +Description: Builds openmp enabled lib diff --git a/vcpkg/ports/v-hacd/fix-cmake.patch b/vcpkg/ports/v-hacd/fix-cmake.patch new file mode 100644 index 0000000..46c53da --- /dev/null +++ b/vcpkg/ports/v-hacd/fix-cmake.patch @@ -0,0 +1,140 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 2bbb283..2f7eb52 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1,12 +1 @@ +-cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR) +-project(VHACD) +-option(NO_OPENCL "NO_OPENCL" OFF) +-option(NO_OPENMP "NO_OPENMP" OFF) +- +-message("NO_OPENCL " ${NO_OPENCL}) +-message("NO_OPENMP " ${NO_OPENMP}) +- +-#set(CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}/output" CACHE PATH "project install prefix" FORCE) +-set(CMAKE_COMMON_INC "${CMAKE_SOURCE_DIR}/../scripts/cmake_common.cmake") +-add_subdirectory ("${CMAKE_SOURCE_DIR}/VHACD_Lib") +-add_subdirectory ("${CMAKE_SOURCE_DIR}/test") ++add_subdirectory ("${CMAKE_CURRENT_SOURCE_DIR}/VHACD_Lib") +\ No newline at end of file +diff --git a/src/VHACD_Lib/CMakeLists.txt b/src/VHACD_Lib/CMakeLists.txt +index 46fc1b1..2260fdc 100644 +--- a/src/VHACD_Lib/CMakeLists.txt ++++ b/src/VHACD_Lib/CMakeLists.txt +@@ -1,77 +1,79 @@ ++cmake_minimum_required(VERSION 3.10.0) ++ + project(VHACD_LIB CXX C) +-include(${CMAKE_COMMON_INC}) ++include("${CMAKE_CURRENT_SOURCE_DIR}/../../scripts/cmake_common.cmake") ++ ++set(CMAKE_CXX_STANDARD 11) + +-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") ++set(LIB_TYPE "STATIC" CACHE STRING "STATIC, SHARED or MODULE?") ++message("[VHACD] \t LIB_TYPE " ${LIB_TYPE}) ++add_library(vhacd ${LIB_TYPE} ${PROJECT_CPP_FILES} ${PROJECT_C_FILES} ${PROJECT_INC_FILES} ${PROJECT_INL_FILES} ${PROJECT_CL_FILES}) + + if (NOT NO_OPENCL) + #include(FindOpenCL OPTIONAL) +- find_package(OpenCL) ++ find_package(OpenCL REQUIRED) + endif() + if (NOT NO_OPENMP) + #include(FindOpenMP OPTIONAL) +- find_package(OpenMP) ++ find_package(OpenMP REQUIRED) + endif() + if(OPENMP_FOUND) +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}") +- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}") ++ target_link_libraries(vhacd PRIVATE OpenMP::OpenMP_CXX) + endif() +-set(LIB_TYPE "STATIC" CACHE STRING "STATIC, SHARED or MODULE?") +-message("[VHACD] \t LIB_TYPE " ${LIB_TYPE}) +-add_library(vhacd ${LIB_TYPE} ${PROJECT_CPP_FILES} ${PROJECT_C_FILES} ${PROJECT_INC_FILES} ${PROJECT_INL_FILES} ${PROJECT_CL_FILES}) + + if (OpenCL_FOUND) +- target_include_directories(vhacd PRIVATE "${OpenCL_INCLUDE_DIR}") +- target_link_libraries(vhacd PRIVATE "${OpenCL_LIBRARY}") ++ target_link_libraries(vhacd PRIVATE OpenCL::OpenCL) + target_compile_definitions(vhacd PRIVATE -DOPENCL_FOUND=1 ) + target_compile_definitions(vhacd PRIVATE -DOPENCL_CL_FILES="${PROJECT_CL_FILES}" ) + endif() + +- + target_include_directories(vhacd PUBLIC ++ $ ++ $) ++ ++target_include_directories(vhacd PRIVATE + $ +- $ # /include/mylib + ) + + + message("[VHACD] \t -> CMAKE_INSTALL_PREFIX " ${CMAKE_INSTALL_PREFIX}) + install(TARGETS vhacd EXPORT vhacd-targets DESTINATION lib) +-install(FILES ${PROJECT_INC_FILES} DESTINATION include) +-install(FILES ${PROJECT_INL_FILES} DESTINATION include) ++install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/public/VHACD.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include/) ++ + + + set(VHACD_LIB_VERSION 3.2.0) + include(CMakePackageConfigHelpers) + write_basic_package_version_file( +- "${CMAKE_CURRENT_BINARY_DIR}/vhacd/vhacd-config-version.cmake" ++ "${CMAKE_CURRENT_BINARY_DIR}/vhacd/v-hacd-config-version.cmake" + VERSION ${VHACD_LIB_VERSION} + COMPATIBILITY AnyNewerVersion + ) + +-export(EXPORT vhacd-targets NAMESPACE :: +- FILE "${CMAKE_CURRENT_BINARY_DIR}/vhacd/vhacd-targets.cmake" ++export(EXPORT vhacd-targets NAMESPACE vhacd:: ++ FILE "${CMAKE_CURRENT_BINARY_DIR}/vhacd/v-hacd-targets.cmake" + ) + + configure_file(cmake/vhacd-config.cmake +- "${CMAKE_CURRENT_BINARY_DIR}/vhacd/vhacd-config.cmake" ++ "${CMAKE_CURRENT_BINARY_DIR}/vhacd/v-hacd-config.cmake" + COPYONLY + ) + + set(ConfigPackageLocation lib/cmake/vhacd) + install(EXPORT vhacd-targets + FILE +- vhacd-targets.cmake ++ v-hacd-targets.cmake + DESTINATION + ${ConfigPackageLocation} +- NAMESPACE :: ++ NAMESPACE vhacd:: + ) + install( + FILES +- "${CMAKE_CURRENT_BINARY_DIR}/vhacd/vhacd-config.cmake" +- "${CMAKE_CURRENT_BINARY_DIR}/vhacd/vhacd-config-version.cmake" ++ "${CMAKE_CURRENT_BINARY_DIR}/vhacd/v-hacd-config.cmake" ++ "${CMAKE_CURRENT_BINARY_DIR}/vhacd/v-hacd-config-version.cmake" + DESTINATION + ${ConfigPackageLocation} + COMPONENT + Devel + ) + + +diff --git a/src/VHACD_Lib/cmake/vhacd-config.cmake b/src/VHACD_Lib/cmake/vhacd-config.cmake +index 8fc5c58..7677f58 100644 +--- a/src/VHACD_Lib/cmake/vhacd-config.cmake ++++ b/src/VHACD_Lib/cmake/vhacd-config.cmake +@@ -1,4 +1,4 @@ + + find_package(OpenCL) + find_package(OpenMP) +-include("${CMAKE_CURRENT_LIST_DIR}/vhacd-targets.cmake") +\ No newline at end of file ++include("${CMAKE_CURRENT_LIST_DIR}/v-hacd-targets.cmake") +\ No newline at end of file diff --git a/vcpkg/ports/v-hacd/portfile.cmake b/vcpkg/ports/v-hacd/portfile.cmake new file mode 100644 index 0000000..3e4cdef --- /dev/null +++ b/vcpkg/ports/v-hacd/portfile.cmake @@ -0,0 +1,47 @@ +vcpkg_fail_port_install(ON_ARCH "arm") + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO kmammou/v-hacd + REF 1a49edf29c69039df15286181f2f27e17ceb9aef + SHA512 14157e5fd9cbfeb44735dc2952d7b4f43337ea2243f3b690125dda27e3bb8328cc38050415c7150cf11fbd85c5258c3aaa8899f306ce118f78a4d5e6139ef0f0 + HEAD_REF master + PATCHES + fix-cmake.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(LIB_TYPE "SHARED") +else() + set(LIB_TYPE "STATIC") +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES + openmp NO_OPENMP + opencl NO_OPENCL +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${FEATURE_OPTIONS} + -DLIB_TYPE=${LIB_TYPE} +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/vhacd) + +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/v8/3f8dc4b.patch b/vcpkg/ports/v8/3f8dc4b.patch new file mode 100644 index 0000000..6360a1d --- /dev/null +++ b/vcpkg/ports/v8/3f8dc4b.patch @@ -0,0 +1,155 @@ +diff --git a/src/objects/js-number-format.cc b/src/objects/js-number-format.cc +index ad831c5..bcd4403 100644 +--- a/src/objects/js-number-format.cc ++++ b/src/objects/js-number-format.cc +@@ -1241,44 +1241,33 @@ + } + + namespace { +-Maybe IcuFormatNumber( ++Maybe IcuFormatNumber( + Isolate* isolate, + const icu::number::LocalizedNumberFormatter& number_format, +- Handle numeric_obj, icu::FieldPositionIterator* fp_iter) { ++ Handle numeric_obj, icu::number::FormattedNumber* formatted) { + // If it is BigInt, handle it differently. + UErrorCode status = U_ZERO_ERROR; +- icu::number::FormattedNumber formatted; + if (numeric_obj->IsBigInt()) { + Handle big_int = Handle::cast(numeric_obj); + Handle big_int_string; + ASSIGN_RETURN_ON_EXCEPTION_VALUE(isolate, big_int_string, + BigInt::ToString(isolate, big_int), +- Nothing()); +- formatted = number_format.formatDecimal( ++ Nothing()); ++ *formatted = number_format.formatDecimal( + {big_int_string->ToCString().get(), big_int_string->length()}, status); + } else { + double number = numeric_obj->IsNaN() + ? std::numeric_limits::quiet_NaN() + : numeric_obj->Number(); +- formatted = number_format.formatDouble(number, status); ++ *formatted = number_format.formatDouble(number, status); + } + if (U_FAILURE(status)) { + // This happen because of icu data trimming trim out "unit". + // See https://bugs.chromium.org/p/v8/issues/detail?id=8641 +- THROW_NEW_ERROR_RETURN_VALUE(isolate, +- NewTypeError(MessageTemplate::kIcuError), +- Nothing()); ++ THROW_NEW_ERROR_RETURN_VALUE( ++ isolate, NewTypeError(MessageTemplate::kIcuError), Nothing()); + } +- if (fp_iter) { +- formatted.getAllFieldPositions(*fp_iter, status); +- } +- icu::UnicodeString result = formatted.toString(status); +- if (U_FAILURE(status)) { +- THROW_NEW_ERROR_RETURN_VALUE(isolate, +- NewTypeError(MessageTemplate::kIcuError), +- Nothing()); +- } +- return Just(result); ++ return Just(true); + } + + } // namespace +@@ -1289,10 +1278,16 @@ + Handle numeric_obj) { + DCHECK(numeric_obj->IsNumeric()); + +- Maybe maybe_format = +- IcuFormatNumber(isolate, number_format, numeric_obj, nullptr); ++ icu::number::FormattedNumber formatted; ++ Maybe maybe_format = ++ IcuFormatNumber(isolate, number_format, numeric_obj, &formatted); + MAYBE_RETURN(maybe_format, Handle()); +- return Intl::ToString(isolate, maybe_format.FromJust()); ++ UErrorCode status = U_ZERO_ERROR; ++ icu::UnicodeString result = formatted.toString(status); ++ if (U_FAILURE(status)) { ++ THROW_NEW_ERROR(isolate, NewTypeError(MessageTemplate::kIcuError), String); ++ } ++ return Intl::ToString(isolate, result); + } + + namespace { +@@ -1405,12 +1400,18 @@ + } + + namespace { +-Maybe ConstructParts(Isolate* isolate, const icu::UnicodeString& formatted, +- icu::FieldPositionIterator* fp_iter, ++Maybe ConstructParts(Isolate* isolate, ++ icu::number::FormattedNumber* formatted, + Handle result, int start_index, + Handle numeric_obj, bool style_is_unit) { ++ UErrorCode status = U_ZERO_ERROR; ++ icu::UnicodeString formatted_text = formatted->toString(status); ++ if (U_FAILURE(status)) { ++ THROW_NEW_ERROR_RETURN_VALUE( ++ isolate, NewTypeError(MessageTemplate::kIcuError), Nothing()); ++ } + DCHECK(numeric_obj->IsNumeric()); +- int32_t length = formatted.length(); ++ int32_t length = formatted_text.length(); + int index = start_index; + if (length == 0) return Just(index); + +@@ -1419,13 +1420,14 @@ + // other region covers some part of the formatted string. It's possible + // there's another field with exactly the same begin and end as this backdrop, + // in which case the backdrop's field_id of -1 will give it lower priority. +- regions.push_back(NumberFormatSpan(-1, 0, formatted.length())); ++ regions.push_back(NumberFormatSpan(-1, 0, formatted_text.length())); + + { +- icu::FieldPosition fp; +- while (fp_iter->next(fp)) { +- regions.push_back(NumberFormatSpan(fp.getField(), fp.getBeginIndex(), +- fp.getEndIndex())); ++ icu::ConstrainedFieldPosition cfp; ++ cfp.constrainCategory(UFIELD_CATEGORY_NUMBER); ++ while (formatted->nextPosition(cfp, status)) { ++ regions.push_back( ++ NumberFormatSpan(cfp.getField(), cfp.getStart(), cfp.getLimit())); + } + } + +@@ -1447,7 +1449,7 @@ + Handle substring; + ASSIGN_RETURN_ON_EXCEPTION_VALUE( + isolate, substring, +- Intl::ToString(isolate, formatted, part.begin_pos, part.end_pos), ++ Intl::ToString(isolate, formatted_text, part.begin_pos, part.end_pos), + Nothing()); + Intl::AddElement(isolate, result, index, field_type_string, substring); + ++index; +@@ -1467,20 +1469,19 @@ + number_format->icu_number_formatter().raw(); + CHECK_NOT_NULL(fmt); + +- icu::FieldPositionIterator fp_iter; +- Maybe maybe_format = +- IcuFormatNumber(isolate, *fmt, numeric_obj, &fp_iter); ++ icu::number::FormattedNumber formatted; ++ Maybe maybe_format = ++ IcuFormatNumber(isolate, *fmt, numeric_obj, &formatted); + MAYBE_RETURN(maybe_format, Handle()); +- + UErrorCode status = U_ZERO_ERROR; ++ + bool style_is_unit = + Style::UNIT == StyleFromSkeleton(fmt->toSkeleton(status)); + CHECK(U_SUCCESS(status)); + + Handle result = factory->NewJSArray(0); +- Maybe maybe_format_to_parts = +- ConstructParts(isolate, maybe_format.FromJust(), &fp_iter, result, 0, +- numeric_obj, style_is_unit); ++ Maybe maybe_format_to_parts = ConstructParts( ++ isolate, &formatted, result, 0, numeric_obj, style_is_unit); + MAYBE_RETURN(maybe_format_to_parts, Handle()); + + return result; diff --git a/vcpkg/ports/v8/CONTROL b/vcpkg/ports/v8/CONTROL new file mode 100644 index 0000000..6048217 --- /dev/null +++ b/vcpkg/ports/v8/CONTROL @@ -0,0 +1,6 @@ +Source: v8 +Version: 8.3.110.13 +Homepage: https://v8.dev +Description: Google Chrome's JavaScript engine +Build-Depends: icu, zlib, glib (linux), pthread (linux) +Supports: !(arm|arm64|uwp|osx) diff --git a/vcpkg/ports/v8/build.patch b/vcpkg/ports/v8/build.patch new file mode 100644 index 0000000..7394c65 --- /dev/null +++ b/vcpkg/ports/v8/build.patch @@ -0,0 +1,179 @@ +diff --git a/config/compiler/BUILD.gn b/config/compiler/BUILD.gn +index 5a0984f54..4f301517b 100644 +--- a/config/compiler/BUILD.gn ++++ b/config/compiler/BUILD.gn +@@ -1473,6 +1473,8 @@ config("default_warnings") { + # Disables. + "-Wno-missing-field-initializers", # "struct foo f = {0};" + "-Wno-unused-parameter", # Unused function parameters. ++ "-Wno-invalid-offsetof", # Use of "conditionally-supported" offsetof in c++17 ++ "-Wno-range-loop-construct", + ] + } + +@@ -1887,11 +1889,21 @@ config("no_incompatible_pointer_warnings") { + # Shared settings for both "optimize" and "optimize_max" configs. + # IMPORTANT: On Windows "/O1" and "/O2" must go before the common flags. + if (is_win) { +- common_optimize_on_cflags = [ ++ common_optimize_on_cflags = [] ++ if(is_clang) { ++ common_optimize_on_cflags += [ + "/Ob2", # Both explicit and auto inlining. ++ ] ++ } else { ++ common_optimize_on_cflags += [ ++ "/Ob3", # Both explicit and auto inlining. ++ ] ++ } ++ common_optimize_on_cflags += [ + "/Oy-", # Disable omitting frame pointers, must be after /O2. + "/Zc:inline", # Remove unreferenced COMDAT (faster links). + ] ++ + if (!is_asan) { + common_optimize_on_cflags += [ + # Put data in separate COMDATs. This allows the linker +diff --git a/config/linux/pkg-config.py b/config/linux/pkg-config.py +index 5adf70cc3..1438c365b 100644 +--- a/config/linux/pkg-config.py ++++ b/config/linux/pkg-config.py +@@ -41,7 +41,11 @@ from optparse import OptionParser + # Additionally, you can specify the option --atleast-version. This will skip + # the normal outputting of a dictionary and instead print true or false, + # depending on the return value of pkg-config for the given package. +- ++# ++# --pkg_config_libdir= allows direct override ++# of the PKG_CONFIG_LIBDIR environment library. ++# ++# --full-path-libs causes lib names to include their full path. + + def SetConfigPath(options): + """Set the PKG_CONFIG_LIBDIR environment variable. +@@ -105,11 +109,29 @@ def RewritePath(path, strip_prefix, sysroot): + return path + + ++flag_regex = re.compile("(-.)(.+)") ++ ++def FlagReplace(matchobj): ++ if matchobj.group(1) == '-I': ++ return matchobj.group(1) + subprocess.check_output([u'cygpath',u'-w',matchobj.group(2)]).strip().decode("utf-8") ++ if matchobj.group(1) == '-L': ++ return matchobj.group(1) + subprocess.check_output([u'cygpath',u'-w',matchobj.group(2)]).strip().decode("utf-8") ++ if matchobj.group(1) == '-l': ++ return matchobj.group(1) + matchobj.group(2) + '.lib' ++ return matchobj.group(0) ++ ++def ConvertGCCToMSVC(flags): ++ """Rewrites GCC flags into MSVC flags.""" ++ if 'win32' not in sys.platform: ++ return flags ++ return [ flag_regex.sub(FlagReplace,flag) for flag in flags] ++ ++ + def main(): + # If this is run on non-Linux platforms, just return nothing and indicate + # success. This allows us to "kind of emulate" a Linux build from other + # platforms. +- if "linux" not in sys.platform: ++ if "linux" not in sys.platform and 'win32' not in sys.platform: + print("[[],[],[],[],[]]") + return 0 + +@@ -122,12 +144,15 @@ def main(): + parser.add_option('-a', action='store', dest='arch', type='string') + parser.add_option('--system_libdir', action='store', dest='system_libdir', + type='string', default='lib') ++ parser.add_option('--pkg_config_libdir', action='store', dest='pkg_config_libdir', ++ type='string') + parser.add_option('--atleast-version', action='store', + dest='atleast_version', type='string') + parser.add_option('--libdir', action='store_true', dest='libdir') + parser.add_option('--dridriverdir', action='store_true', dest='dridriverdir') + parser.add_option('--version-as-components', action='store_true', + dest='version_as_components') ++ parser.add_option('--full-path-libs', action='store_true', dest='full_path_libs') + (options, args) = parser.parse_args() + + # Make a list of regular expressions to strip out. +@@ -144,6 +169,10 @@ def main(): + else: + prefix = '' + ++ # Override PKG_CONFIG_LIBDIR ++ if options.pkg_config_libdir: ++ os.environ['PKG_CONFIG_LIBDIR'] = options.pkg_config_libdir ++ + if options.atleast_version: + # When asking for the return value, just run pkg-config and print the return + # value, no need to do other work. +@@ -203,7 +232,7 @@ def main(): + # For now just split on spaces to get the args out. This will break if + # pkgconfig returns quoted things with spaces in them, but that doesn't seem + # to happen in practice. +- all_flags = flag_string.strip().split(' ') ++ all_flags = ConvertGCCToMSVC(flag_string.strip().split(' ')) + + + sysroot = options.sysroot +@@ -220,7 +249,10 @@ def main(): + continue; + + if flag[:2] == '-l': +- libs.append(RewritePath(flag[2:], prefix, sysroot)) ++ library = RewritePath(flag[2:], prefix, sysroot) ++ # Skip math library on MSVC ++ if library != 'm.lib': ++ libs.append(library) + elif flag[:2] == '-L': + lib_dirs.append(RewritePath(flag[2:], prefix, sysroot)) + elif flag[:2] == '-I': +@@ -237,6 +269,14 @@ def main(): + else: + cflags.append(flag) + ++ if options.full_path_libs: ++ full_path_libs = [] ++ for lib_dir in lib_dirs: ++ for lib in libs: ++ if os.path.isfile(lib_dir+"/"+lib): ++ full_path_libs.append(lib_dir+"/"+lib) ++ libs = full_path_libs ++ + # Output a GN array, the first one is the cflags, the second are the libs. The + # JSON formatter prints GN compatible lists when everything is a list of + # strings. +diff --git a/config/linux/pkg_config.gni b/config/linux/pkg_config.gni +index 428e44ac0..a0d2175ee 100644 +--- a/config/linux/pkg_config.gni ++++ b/config/linux/pkg_config.gni +@@ -45,6 +45,9 @@ declare_args() { + # in similar fashion by setting the `system_libdir` variable in the build's + # args.gn file to 'lib' or 'lib64' as appropriate for the target architecture. + system_libdir = "lib" ++ ++ # Allow directly overriding the PKG_CONFIG_LIBDIR enviroment variable ++ pkg_config_libdir = "" + } + + pkg_config_script = "//build/config/linux/pkg-config.py" +@@ -87,6 +90,17 @@ if (host_pkg_config != "") { + host_pkg_config_args = pkg_config_args + } + ++if (pkg_config_libdir != "") { ++ pkg_config_args += [ ++ "--pkg_config_libdir", ++ pkg_config_libdir, ++ ] ++ host_pkg_config_args += [ ++ "--pkg_config_libdir", ++ pkg_config_libdir, ++ ] ++} ++ + template("pkg_config") { + assert(defined(invoker.packages), + "Variable |packages| must be defined to be a list in pkg_config.") diff --git a/vcpkg/ports/v8/icu.gn b/vcpkg/ports/v8/icu.gn new file mode 100644 index 0000000..60dc6b8 --- /dev/null +++ b/vcpkg/ports/v8/icu.gn @@ -0,0 +1,71 @@ +import("//build/config/linux/pkg_config.gni") + +declare_args() { + # Tells icu to load an external data file rather than rely on the icudata + # being linked directly into the binary. + icu_use_data_file = true + # If true, compile icu into a standalone static library. Currently this is + # only useful on Chrome OS. + icu_disable_thin_archive = false +} + +pkg_config("system_icui18n") { + packages = [ "icu-i18n" ] + if (is_win) { + extra_args = ["--full-path-libs"] # Workaround the WinSDK having an older version of ICU + } +} + +pkg_config("system_icuuc") { + packages = [ "icu-uc" ] + if (is_win) { + extra_args = ["--full-path-libs"] # Workaround the WinSDK having an older version of ICU + } +} + +group("icu") { + public_deps = [ + ":icui18n", + ":icuuc", + ] +} + +config("icu_config") { + defines = [ + "USING_SYSTEM_ICU=1", + ] + if(is_win){ + if(!is_component_build) { + ldflags = ["/ignore:4099"] # needed on CI builds + } + defines += [ "UCHAR_TYPE=wchar_t" ] + } + else{ + defines += [ "UCHAR_TYPE=uint16_t" ] + } + if (icu_use_data_file) { + defines += [ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE" ] + } else { + defines += [ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC" ] + } +} + +source_set("icui18n") { + public_configs = [ + ":icu_config", + ":system_icui18n" + ] +} + +source_set("icuuc") { + public_configs = [ + ":icu_config", + ":system_icuuc" + ] +} + +source_set("icudata") { + public_configs = [ + ":icu_config", + ] +} diff --git a/vcpkg/ports/v8/portfile.cmake b/vcpkg/ports/v8/portfile.cmake new file mode 100644 index 0000000..e2bb45d --- /dev/null +++ b/vcpkg/ports/v8/portfile.cmake @@ -0,0 +1,186 @@ + +set(pkgver "8.3.110.13") + +set(ENV{DEPOT_TOOLS_WIN_TOOLCHAIN} 0) + +get_filename_component(GIT_PATH ${GIT} DIRECTORY) +vcpkg_find_acquire_program(PYTHON2) +get_filename_component(PYTHON2_PATH ${PYTHON2} DIRECTORY) +vcpkg_find_acquire_program(GN) +get_filename_component(GN_PATH ${GN} DIRECTORY) +vcpkg_find_acquire_program(NINJA) +get_filename_component(NINJA_PATH ${NINJA} DIRECTORY) + +vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/bin") +vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/debug/bin") +vcpkg_add_to_path(PREPEND "${GIT_PATH}") +vcpkg_add_to_path(PREPEND "${PYTHON2_PATH}") +vcpkg_add_to_path(PREPEND "${GN_PATH}") +vcpkg_add_to_path(PREPEND "${NINJA_PATH}") +if(WIN32) + vcpkg_acquire_msys(MSYS_ROOT PACKAGES pkg-config) + vcpkg_add_to_path("${MSYS_ROOT}/usr/bin") +endif() + +set(VCPKG_KEEP_ENV_VARS PATH;DEPOT_TOOLS_WIN_TOOLCHAIN) + +function(v8_fetch) + set(oneValueArgs DESTINATION URL REF SOURCE) + set(multipleValuesArgs PATCHES) + cmake_parse_arguments(V8 "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) + + if(NOT DEFINED V8_DESTINATION) + message(FATAL_ERROR "DESTINATION must be specified.") + endif() + + if(NOT DEFINED V8_URL) + message(FATAL_ERROR "The git url must be specified") + endif() + + if(NOT DEFINED V8_REF) + message(FATAL_ERROR "The git ref must be specified.") + endif() + + if(EXISTS ${V8_SOURCE}/${V8_DESTINATION}) + vcpkg_execute_required_process( + COMMAND ${GIT} reset --hard + WORKING_DIRECTORY ${V8_SOURCE}/${V8_DESTINATION} + LOGNAME build-${TARGET_TRIPLET}) + else() + vcpkg_execute_required_process( + COMMAND ${GIT} clone --depth 1 ${V8_URL} ${V8_DESTINATION} + WORKING_DIRECTORY ${V8_SOURCE} + LOGNAME build-${TARGET_TRIPLET}) + vcpkg_execute_required_process( + COMMAND ${GIT} fetch --depth 1 origin ${V8_REF} + WORKING_DIRECTORY ${V8_SOURCE}/${V8_DESTINATION} + LOGNAME build-${TARGET_TRIPLET}) + vcpkg_execute_required_process( + COMMAND ${GIT} checkout FETCH_HEAD + WORKING_DIRECTORY ${V8_SOURCE}/${V8_DESTINATION} + LOGNAME build-${TARGET_TRIPLET}) + endif() + foreach(PATCH ${V8_PATCHES}) + vcpkg_execute_required_process( + COMMAND ${GIT} apply ${PATCH} + WORKING_DIRECTORY ${V8_SOURCE}/${V8_DESTINATION} + LOGNAME build-${TARGET_TRIPLET}) + endforeach() +endfunction() + +vcpkg_from_git( + OUT_SOURCE_PATH SOURCE_PATH + URL https://chromium.googlesource.com/v8/v8.git + REF 90904eb48b16b32f7edbf1f8a92ece561d05e738 + PATCHES ${CURRENT_PORT_DIR}/v8.patch ${CURRENT_PORT_DIR}/3f8dc4b.patch +) + +message(STATUS "Fetching submodules") +v8_fetch( + DESTINATION build + URL https://chromium.googlesource.com/chromium/src/build.git + REF 26e9d485d01d6e0eb9dadd21df767a63494c8fea + SOURCE ${SOURCE_PATH} + PATCHES ${CURRENT_PORT_DIR}/build.patch) +v8_fetch( + DESTINATION third_party/zlib + URL https://chromium.googlesource.com/chromium/src/third_party/zlib.git + REF 156be8c52f80cde343088b4a69a80579101b6e67 + SOURCE ${SOURCE_PATH}) +v8_fetch( + DESTINATION base/trace_event/common + URL https://chromium.googlesource.com/chromium/src/base/trace_event/common.git + REF dab187b372fc17e51f5b9fad8201813d0aed5129 + SOURCE ${SOURCE_PATH}) +v8_fetch( + DESTINATION third_party/googletest/src + URL https://chromium.googlesource.com/external/github.com/google/googletest.git + REF 10b1902d893ea8cc43c69541d70868f91af3646b + SOURCE ${SOURCE_PATH}) +v8_fetch( + DESTINATION third_party/jinja2 + URL https://chromium.googlesource.com/chromium/src/third_party/jinja2.git + REF b41863e42637544c2941b574c7877d3e1f663e25 + SOURCE ${SOURCE_PATH}) +v8_fetch( + DESTINATION third_party/markupsafe + URL https://chromium.googlesource.com/chromium/src/third_party/markupsafe.git + REF 8f45f5cfa0009d2a70589bcda0349b8cb2b72783 + SOURCE ${SOURCE_PATH}) + +vcpkg_execute_required_process( + COMMAND ${PYTHON2} build/util/lastchange.py -o build/util/LASTCHANGE + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME build-${TARGET_TRIPLET} +) + +file(MAKE_DIRECTORY "${SOURCE_PATH}/third_party/icu") +configure_file(${CURRENT_PORT_DIR}/zlib.gn ${SOURCE_PATH}/third_party/zlib/BUILD.gn COPYONLY) +configure_file(${CURRENT_PORT_DIR}/icu.gn ${SOURCE_PATH}/third_party/icu/BUILD.gn COPYONLY) + +if(UNIX) + set(UNIX_CURRENT_INSTALLED_DIR ${CURRENT_INSTALLED_DIR}) + set(LIBS "-ldl -lpthread") + set(REQUIRES ", gmodule-2.0, gobject-2.0, gthread-2.0") +elseif(WIN32) + execute_process(COMMAND cygpath "${CURRENT_INSTALLED_DIR}" OUTPUT_VARIABLE UNIX_CURRENT_INSTALLED_DIR) + string(STRIP ${UNIX_CURRENT_INSTALLED_DIR} UNIX_CURRENT_INSTALLED_DIR) + set(LIBS "-lWinmm -lDbgHelp") +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(is_component_build true) + set(v8_monolithic false) + set(v8_use_external_startup_data true) + set(targets :v8_libbase :v8_libplatform :v8) +else() + set(is_component_build false) + set(v8_monolithic true) + set(v8_use_external_startup_data false) + set(targets :v8_monolith) +endif() + +message(STATUS "Generating v8 build files. Please wait...") + +vcpkg_configure_gn( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS "is_component_build=${is_component_build} target_cpu=\"${VCPKG_TARGET_ARCHITECTURE}\" v8_monolithic=${v8_monolithic} v8_use_external_startup_data=${v8_use_external_startup_data} use_sysroot=false is_clang=false use_custom_libcxx=false v8_enable_verify_heap=false icu_use_data_file=false" + OPTIONS_DEBUG "is_debug=true enable_iterator_debugging=true pkg_config_libdir=\"${UNIX_CURRENT_INSTALLED_DIR}/debug/lib/pkgconfig\"" + OPTIONS_RELEASE "is_debug=false enable_iterator_debugging=false pkg_config_libdir=\"${UNIX_CURRENT_INSTALLED_DIR}/lib/pkgconfig\"" +) + +message(STATUS "Building v8. Please wait...") + +vcpkg_install_gn( + SOURCE_PATH ${SOURCE_PATH} + TARGETS ${targets} +) + +set(CFLAGS "-DV8_COMPRESS_POINTERS") +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(CFLAGS "${CFLAGS} -DV8_31BIT_SMIS_ON_64BIT_ARCH") +endif() +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.h") +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(PREFIX ${CURRENT_PACKAGES_DIR}) + configure_file(${CURRENT_PORT_DIR}/v8.pc.in ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/v8.pc @ONLY) + configure_file(${CURRENT_PORT_DIR}/v8_libbase.pc.in ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/v8_libbase.pc @ONLY) + configure_file(${CURRENT_PORT_DIR}/v8_libplatform.pc.in ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/v8_libplatform.pc @ONLY) + set(PREFIX ${CURRENT_PACKAGES_DIR}/debug) + configure_file(${CURRENT_PORT_DIR}/v8.pc.in ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/v8.pc @ONLY) + configure_file(${CURRENT_PORT_DIR}/v8_libbase.pc.in ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/v8_libbase.pc @ONLY) + configure_file(${CURRENT_PORT_DIR}/v8_libplatform.pc.in ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/v8_libplatform.pc @ONLY) +else() + set(PREFIX ${CURRENT_PACKAGES_DIR}) + configure_file(${CURRENT_PORT_DIR}/v8_monolith.pc.in ${CURRENT_PACKAGES_DIR}/lib/pkgconfig/v8_monolith.pc @ONLY) + set(PREFIX ${CURRENT_PACKAGES_DIR}/debug) + configure_file(${CURRENT_PORT_DIR}/v8_monolith.pc.in ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/v8_monolith.pc @ONLY) +endif() + +vcpkg_copy_pdbs() + +# v8 libraries are listed as SYSTEM_LIBRARIES because the pc files reference each other. +vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m dl pthread Winmm DbgHelp v8_libbase v8_libplatform v8) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/v8/v8.patch b/vcpkg/ports/v8/v8.patch new file mode 100644 index 0000000..8a58a50 --- /dev/null +++ b/vcpkg/ports/v8/v8.patch @@ -0,0 +1,89 @@ +diff --git a/src/compiler/node-cache.h b/src/compiler/node-cache.h +index 935e5778e3..d5dae22512 100644 +--- a/src/compiler/node-cache.h ++++ b/src/compiler/node-cache.h +@@ -29,7 +29,7 @@ class Node; + // nodes such as constants, parameters, etc. + template , + typename Pred = std::equal_to > +-class EXPORT_TEMPLATE_DECLARE(V8_EXPORT_PRIVATE) NodeCache final { ++class V8_EXPORT_PRIVATE NodeCache final { + public: + explicit NodeCache(Zone* zone) : map_(zone) {} + ~NodeCache() = default; +diff --git a/src/objects/feedback-vector.cc b/src/objects/feedback-vector.cc +index 929b312f22..7beff3395d 100644 +--- a/src/objects/feedback-vector.cc ++++ b/src/objects/feedback-vector.cc +@@ -114,9 +114,9 @@ Handle FeedbackMetadata::New(LocalIsolate* isolate, + return metadata; + } + +-template Handle FeedbackMetadata::New( ++template V8_EXPORT Handle FeedbackMetadata::New( + Isolate* isolate, const FeedbackVectorSpec* spec); +-template Handle FeedbackMetadata::New( ++template V8_EXPORT Handle FeedbackMetadata::New( + OffThreadIsolate* isolate, const FeedbackVectorSpec* spec); + + bool FeedbackMetadata::SpecDiffersFrom( +diff --git a/src/objects/ordered-hash-table.h b/src/objects/ordered-hash-table.h +index b587960432..e80b5757e4 100644 +--- a/src/objects/ordered-hash-table.h ++++ b/src/objects/ordered-hash-table.h +@@ -7,7 +7,11 @@ + + #include "src/base/export-template.h" + #include "src/common/globals.h" ++#if defined(_M_IX86) && defined(_MSC_VER) ++#include "src/objects/fixed-array-inl.h" ++#else + #include "src/objects/fixed-array.h" ++#endif + #include "src/objects/js-objects.h" + #include "src/objects/smi.h" + #include "src/roots/roots.h" +diff --git a/src/snapshot/serializer-common.cc b/src/snapshot/serializer-common.cc +index 9218d4eaa9..7b226de2f9 100644 +--- a/src/snapshot/serializer-common.cc ++++ b/src/snapshot/serializer-common.cc +@@ -8,7 +8,7 @@ + #include "src/objects/foreign-inl.h" + #include "src/objects/objects-inl.h" + #include "src/objects/slots.h" +-#include "third_party/zlib/zlib.h" ++#include "zlib.h" + + namespace v8 { + namespace internal { +diff --git a/test/cctest/BUILD.gn b/test/cctest/BUILD.gn +index 89fe36f65b..588950228b 100644 +--- a/test/cctest/BUILD.gn ++++ b/test/cctest/BUILD.gn +@@ -421,6 +421,9 @@ v8_source_set("cctest_sources") { + # C4309: 'static_cast': truncation of constant value + cflags += [ "/wd4309" ] + ++ # Buffer overrun warning... intended? ++ cflags += [ "/wd4789" ] ++ + # MSVS wants this for gay-{precision,shortest}.cc. + cflags += [ "/bigobj" ] + +diff --git a/tools/v8windbg/BUILD.gn b/tools/v8windbg/BUILD.gn +index 10d06a127f..a269b81136 100644 +--- a/tools/v8windbg/BUILD.gn ++++ b/tools/v8windbg/BUILD.gn +@@ -8,6 +8,12 @@ config("v8windbg_config") { + # Required for successful compilation of SDK header file DbgModel.h. + cflags_cc = [ "/Zc:twoPhase-" ] + ++ if(is_win && !is_clang){ ++ # Avoid "The contents of are available only with C++17 or later." ++ # warning from MSVC ++ cflags_cc += [ "/std:c++latest" ] ++ } ++ + include_dirs = [ "../.." ] + } + diff --git a/vcpkg/ports/v8/v8.pc.in b/vcpkg/ports/v8/v8.pc.in new file mode 100644 index 0000000..5f57217 --- /dev/null +++ b/vcpkg/ports/v8/v8.pc.in @@ -0,0 +1,11 @@ +prefix=@PREFIX@ +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: v8 +Description: V8 JavaScript Engine +Version: @pkgver@ +Requires: zlib, icu-uc, icu-i18n, v8_libbase = @pkgver@ +Libs: -L${libdir} -lv8 +Cflags: -I${includedir} @CFLAGS@ diff --git a/vcpkg/ports/v8/v8_libbase.pc.in b/vcpkg/ports/v8/v8_libbase.pc.in new file mode 100644 index 0000000..ad472ab --- /dev/null +++ b/vcpkg/ports/v8/v8_libbase.pc.in @@ -0,0 +1,10 @@ +prefix=@PREFIX@ +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: v8 +Description: V8 JavaScript Engine - Base library +Version: @pkgver@ +Libs: -L${libdir} -lv8_libbase +Cflags: -I${includedir} @CFLAGS@ diff --git a/vcpkg/ports/v8/v8_libplatform.pc.in b/vcpkg/ports/v8/v8_libplatform.pc.in new file mode 100644 index 0000000..19c54ba --- /dev/null +++ b/vcpkg/ports/v8/v8_libplatform.pc.in @@ -0,0 +1,10 @@ +prefix=@PREFIX@ +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: v8 +Description: V8 JavaScript Engine - Platform library +Version: @pkgver@ +Libs: -L${libdir} -lv8_libplatform +Cflags: -I${includedir} @CFLAGS@ diff --git a/vcpkg/ports/v8/v8_monolith.pc.in b/vcpkg/ports/v8/v8_monolith.pc.in new file mode 100644 index 0000000..b23c661 --- /dev/null +++ b/vcpkg/ports/v8/v8_monolith.pc.in @@ -0,0 +1,11 @@ +prefix=@PREFIX@ +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: v8 +Description: V8 JavaScript Engine +Version: @pkgver@ +Requires: zlib, icu-uc, icu-i18n @REQUIRES@ +Libs: -L${libdir} -lv8_monolith @LIBS@ +Cflags: -I${includedir} @CFLAGS@ diff --git a/vcpkg/ports/v8/zlib.gn b/vcpkg/ports/v8/zlib.gn new file mode 100644 index 0000000..570d0e2 --- /dev/null +++ b/vcpkg/ports/v8/zlib.gn @@ -0,0 +1,21 @@ +import("//build/config/linux/pkg_config.gni") + +pkg_config("system_zlib") { + packages = [ "zlib" ] + defines = [ "USE_SYSTEM_ZLIB=1" ] +} + +config("zlib_config") { + if(is_win && !is_component_build) { + ldflags = ["/ignore:4099"] # needed on VCPKG CI builds + } + configs = [ + ":system_zlib", + ] +} + +source_set("zlib") { + public_configs = [ + ":system_zlib", + ] +} diff --git a/vcpkg/ports/valijson/CONTROL b/vcpkg/ports/valijson/CONTROL new file mode 100644 index 0000000..c5394a4 --- /dev/null +++ b/vcpkg/ports/valijson/CONTROL @@ -0,0 +1,3 @@ +Source: valijson +Version: 2018-11-17-1 +Description: Header-only C++ library for JSON Schema validation diff --git a/vcpkg/ports/valijson/fix-nlohmann-json.patch b/vcpkg/ports/valijson/fix-nlohmann-json.patch new file mode 100644 index 0000000..7465837 --- /dev/null +++ b/vcpkg/ports/valijson/fix-nlohmann-json.patch @@ -0,0 +1,26 @@ +diff --git a/include/valijson/adapters/nlohmann_json_adapter.hpp b/include/valijson/adapters/nlohmann_json_adapter.hpp +index f77a2bf..3f6fb5f 100644 +--- a/include/valijson/adapters/nlohmann_json_adapter.hpp ++++ b/include/valijson/adapters/nlohmann_json_adapter.hpp +@@ -28,7 +28,7 @@ + #define __VALIJSON_ADAPTERS_NLOHMANN_JSON_ADAPTER_HPP + + #include +-#include ++#include + + #include + #include +diff --git a/include/valijson/utils/nlohmann_json_utils.hpp b/include/valijson/utils/nlohmann_json_utils.hpp +index 01838d8..4a5b5e4 100644 +--- a/include/valijson/utils/nlohmann_json_utils.hpp ++++ b/include/valijson/utils/nlohmann_json_utils.hpp +@@ -4,7 +4,7 @@ + + #include + +-#include ++#include + #include + + namespace valijson { diff --git a/vcpkg/ports/valijson/fix-optional.patch b/vcpkg/ports/valijson/fix-optional.patch new file mode 100644 index 0000000..5ce7584 --- /dev/null +++ b/vcpkg/ports/valijson/fix-optional.patch @@ -0,0 +1,13 @@ +diff --git a/include/valijson/internal/optional.hpp b/include/valijson/internal/optional.hpp +index 8ff285c..84e9fd6 100644 +--- a/include/valijson/internal/optional.hpp ++++ b/include/valijson/internal/optional.hpp +@@ -11,7 +11,7 @@ namespace opt = std; + # endif + # endif + #else +-# include ++# include + namespace opt = std::experimental; + #endif + diff --git a/vcpkg/ports/valijson/fix-picojson.patch b/vcpkg/ports/valijson/fix-picojson.patch new file mode 100644 index 0000000..bb1b4d5 --- /dev/null +++ b/vcpkg/ports/valijson/fix-picojson.patch @@ -0,0 +1,26 @@ +diff --git a/include/valijson/adapters/picojson_adapter.hpp b/include/valijson/adapters/picojson_adapter.hpp +index b6d17c9..6d04c52 100644 +--- a/include/valijson/adapters/picojson_adapter.hpp ++++ b/include/valijson/adapters/picojson_adapter.hpp +@@ -29,7 +29,7 @@ + + #include + +-#include ++#include + + #include + #include +diff --git a/include/valijson/utils/picojson_utils.hpp b/include/valijson/utils/picojson_utils.hpp +index 2ca4d46..b983648 100644 +--- a/include/valijson/utils/picojson_utils.hpp ++++ b/include/valijson/utils/picojson_utils.hpp +@@ -4,7 +4,7 @@ + + #include + +-#include ++#include + + #include + diff --git a/vcpkg/ports/valijson/portfile.cmake b/vcpkg/ports/valijson/portfile.cmake new file mode 100644 index 0000000..aeb7399 --- /dev/null +++ b/vcpkg/ports/valijson/portfile.cmake @@ -0,0 +1,27 @@ +#header-only library +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tristanpenman/valijson + REF dd084d747448bb56ddfeab5946b4f2f4617b99c4 + SHA512 ee241eefc816360608f86792a4c25abadea79cbffc94d7e31a2dbd0a483ed4d7a303b6d2410b99ab7694e58a3d299f0df0baa52fa16f89e9233d90b190a4d799 + HEAD_REF master + PATCHES fix-nlohmann-json.patch + fix-picojson.patch + fix-optional.patch +) + +# Copy the header files +file(GLOB HEADER_FILES ${SOURCE_PATH}/include/valijson/*) +file(COPY ${HEADER_FILES} + DESTINATION ${CURRENT_PACKAGES_DIR}/include/valijson + REGEX "\.(gitattributes|gitignore)$" EXCLUDE) + +file(COPY ${SOURCE_PATH}/include/compat/optional.hpp + DESTINATION ${CURRENT_PACKAGES_DIR}/include/valijson/compat) + +# Put the licence file where vcpkg expects it +file(COPY ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/valijson) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/valijson/LICENSE ${CURRENT_PACKAGES_DIR}/share/valijson/copyright) diff --git a/vcpkg/ports/value-ptr-lite/CONTROL b/vcpkg/ports/value-ptr-lite/CONTROL new file mode 100644 index 0000000..0891d31 --- /dev/null +++ b/vcpkg/ports/value-ptr-lite/CONTROL @@ -0,0 +1,7 @@ +Source: value-ptr-lite +Version: 0.2.1 +Homepage: https://github.com/martinmoene/value-ptr-lite +Description: A C++ smart-pointer with value semantics for C++98, C++11 and later in a single-file header-only library. + +Feature: test +Description: Build with test \ No newline at end of file diff --git a/vcpkg/ports/value-ptr-lite/portfile.cmake b/vcpkg/ports/value-ptr-lite/portfile.cmake new file mode 100644 index 0000000..a0e429b --- /dev/null +++ b/vcpkg/ports/value-ptr-lite/portfile.cmake @@ -0,0 +1,32 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO martinmoene/value-ptr-lite + REF v0.2.1 + SHA512 96bea32310b3b3f91d19706d8ae9bdfa9a6ba485f529562e3b7cf89311d1e9b99fd24c0c6f23d169c5a7c84ebd9bd7b8ace972ee279b38c4c1caa398a3dd1590 + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + test BUILD_TESTS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DVALUE_PTR_LITE_OPT_BUILD_TESTS=${BUILD_TESTS} + -DVALUE_PTR_LITE_OPT_BUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/value_ptr-lite) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/vcpkg/ports/variant-lite/CONTROL b/vcpkg/ports/variant-lite/CONTROL new file mode 100644 index 0000000..8654b8a --- /dev/null +++ b/vcpkg/ports/variant-lite/CONTROL @@ -0,0 +1,3 @@ +Source: variant-lite +Version: 1.2.2 +Description: A C++17-like variant, a type-safe union for C++98, C++11 and later in a single-file header-only library diff --git a/vcpkg/ports/variant-lite/portfile.cmake b/vcpkg/ports/variant-lite/portfile.cmake new file mode 100644 index 0000000..764fd74 --- /dev/null +++ b/vcpkg/ports/variant-lite/portfile.cmake @@ -0,0 +1,31 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO martinmoene/variant-lite + REF v1.2.2 + SHA512 f0a0760b858d5fdd3cbd6be29e64fdca69222c4e3f6f4f856fa99e7352ede817648c6d698ebde25dec10bf99fc304b1b5ce232c5ffd4fab12aaf444b68c04f02 +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DVARIANT_LITE_OPT_BUILD_TESTS=OFF + -DVARIANT_LITE_OPT_BUILD_EXAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets( + CONFIG_PATH lib/cmake/${PORT} +) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug + ${CURRENT_PACKAGES_DIR}/lib +) + +file(INSTALL + ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright +) diff --git a/vcpkg/ports/vc/CONTROL b/vcpkg/ports/vc/CONTROL new file mode 100644 index 0000000..e56fda2 --- /dev/null +++ b/vcpkg/ports/vc/CONTROL @@ -0,0 +1,5 @@ +Source: vc +Version: 1.4.1 +Homepage: https://github.com/VcDevel/Vc +Description: SIMD Vector Classes for C++ . +Supports: !arm64 diff --git a/vcpkg/ports/vc/correct_cmake_config_path.patch b/vcpkg/ports/vc/correct_cmake_config_path.patch new file mode 100644 index 0000000..bb1d543 --- /dev/null +++ b/vcpkg/ports/vc/correct_cmake_config_path.patch @@ -0,0 +1,22 @@ +diff --git a/cmake/VcConfig.cmake.in b/cmake/VcConfig.cmake.in +index 36de476..5cb0e5b 100644 +--- a/cmake/VcConfig.cmake.in ++++ b/cmake/VcConfig.cmake.in +@@ -4,7 +4,7 @@ + set_and_check(@PROJECT_NAME@_INSTALL_DIR @PACKAGE_CMAKE_INSTALL_PREFIX@) + set_and_check(@PROJECT_NAME@_INCLUDE_DIR @PACKAGE_CMAKE_INSTALL_PREFIX@/include) + set_and_check(@PROJECT_NAME@_LIB_DIR @PACKAGE_CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@) +-set_and_check(@PROJECT_NAME@_CMAKE_MODULES_DIR ${@PROJECT_NAME@_LIB_DIR}/cmake/Vc) ++set_and_check(@PROJECT_NAME@_CMAKE_MODULES_DIR @PACKAGE_CMAKE_INSTALL_PREFIX@/share/vc) + set(@PROJECT_NAME@_VERSION_STRING "@PROJECT_VERSION@") + + ### Setup @PROJECT_NAME@ defaults +@@ -20,7 +20,7 @@ list(APPEND @PROJECT_NAME@_ALL_FLAGS ${@PROJECT_NAME@_COMPILE_FLAGS}) + list(APPEND @PROJECT_NAME@_ALL_FLAGS ${@PROJECT_NAME@_ARCHITECTURE_FLAGS}) + + ### Import targets +-include("@PACKAGE_CMAKE_INSTALL_PREFIX@/@PACKAGE_INSTALL_DESTINATION@/@PROJECT_NAME@Targets.cmake") ++include(${@PROJECT_NAME@_CMAKE_MODULES_DIR}/@PROJECT_NAME@Targets.cmake) + + ### Define @PROJECT_NAME@_LIBRARIES for backwards compatibility + get_target_property(vc_lib_location @PROJECT_NAME@::Vc INTERFACE_LOCATION) diff --git a/vcpkg/ports/vc/portfile.cmake b/vcpkg/ports/vc/portfile.cmake new file mode 100644 index 0000000..b5b0da5 --- /dev/null +++ b/vcpkg/ports/vc/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_fail_port_install(ON_ARCH "arm64") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO VcDevel/Vc + REF 1.4.1 + SHA512 dd17e214099796c41d70416d365ea038c00c5fda285b05e48d7ee4fe03f4db2671d2be006ca7b98b0d4133bfcb57faf04cecfe35c29c3b006cd91c9a185cc04a + HEAD_REF master + PATCHES + "correct_cmake_config_path.patch" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + -DBUILD_TESTING=OFF + -DBUILD_EXAMPLES=OFF +) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Vc/) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/vcglib/CONTROL b/vcpkg/ports/vcglib/CONTROL new file mode 100644 index 0000000..7f52548 --- /dev/null +++ b/vcpkg/ports/vcglib/CONTROL @@ -0,0 +1,4 @@ +Source: vcglib +Version: 1.0.1 +Description: library for manipulation, processing, cleaning, simplifying triangle meshes. +Build-Depends: eigen3 \ No newline at end of file diff --git a/vcpkg/ports/vcglib/consume-vcpkg-eigen3.patch b/vcpkg/ports/vcglib/consume-vcpkg-eigen3.patch new file mode 100644 index 0000000..35e9f55 --- /dev/null +++ b/vcpkg/ports/vcglib/consume-vcpkg-eigen3.patch @@ -0,0 +1,225 @@ +diff --git a/vcg/complex/algorithms/curve_on_manifold.h b/vcg/complex/algorithms/curve_on_manifold.h +index 5b9d858..f091b4b 100644 +--- a/vcg/complex/algorithms/curve_on_manifold.h ++++ b/vcg/complex/algorithms/curve_on_manifold.h +@@ -36,7 +36,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + +diff --git a/vcg/complex/algorithms/harmonic.h b/vcg/complex/algorithms/harmonic.h +index d004d7b..13d5167 100644 +--- a/vcg/complex/algorithms/harmonic.h ++++ b/vcg/complex/algorithms/harmonic.h +@@ -24,7 +24,7 @@ + #define __VCGLIB_HARMONIC_FIELD + + #include +-#include ++#include + + namespace vcg { + namespace tri { +diff --git a/vcg/complex/algorithms/implicit_smooth.h b/vcg/complex/algorithms/implicit_smooth.h +index 2e1e24f..76311e2 100644 +--- a/vcg/complex/algorithms/implicit_smooth.h ++++ b/vcg/complex/algorithms/implicit_smooth.h +@@ -23,7 +23,7 @@ + #ifndef __VCG_IMPLICIT_SMOOTHER + #define __VCG_IMPLICIT_SMOOTHER + +-#include ++#include + #include + #include + #include +diff --git a/vcg/complex/algorithms/inertia.h b/vcg/complex/algorithms/inertia.h +index 41b5a29..f25d6f9 100644 +--- a/vcg/complex/algorithms/inertia.h ++++ b/vcg/complex/algorithms/inertia.h +@@ -24,8 +24,8 @@ + #define _VCG_INERTIA_ + + +-#include +-#include ++#include ++#include + #include + + namespace vcg +diff --git a/vcg/complex/algorithms/parametrization/poisson_solver.h b/vcg/complex/algorithms/parametrization/poisson_solver.h +index cf5c36d..3b8f1a5 100644 +--- a/vcg/complex/algorithms/parametrization/poisson_solver.h ++++ b/vcg/complex/algorithms/parametrization/poisson_solver.h +@@ -24,7 +24,7 @@ + #ifndef VCG_POISSON_SOLVER + #define VCG_POISSON_SOLVER + +-#include ++#include + + #include + #include +diff --git a/vcg/complex/algorithms/update/curvature.h b/vcg/complex/algorithms/update/curvature.h +index 441121b..0a96146 100644 +--- a/vcg/complex/algorithms/update/curvature.h ++++ b/vcg/complex/algorithms/update/curvature.h +@@ -32,7 +32,7 @@ + #include + #include + #include +-#include ++#include + + namespace vcg { + namespace tri { +diff --git a/vcg/complex/algorithms/update/curvature_fitting.h b/vcg/complex/algorithms/update/curvature_fitting.h +index b2b8c63..ab04b6b 100644 +--- a/vcg/complex/algorithms/update/curvature_fitting.h ++++ b/vcg/complex/algorithms/update/curvature_fitting.h +@@ -38,11 +38,11 @@ + #include + #include + +-#include +-#include +-#include +-#include +-#include ++#include ++#include ++#include ++#include ++#include + + + namespace vcg { +diff --git a/vcg/complex/algorithms/update/fitmaps.h b/vcg/complex/algorithms/update/fitmaps.h +index bd2c94f..fd837d7 100644 +--- a/vcg/complex/algorithms/update/fitmaps.h ++++ b/vcg/complex/algorithms/update/fitmaps.h +@@ -34,10 +34,10 @@ + #include + #include "vcg/complex/algorithms/update/curvature_fitting.h" + +-#include +-#include +-#include +-#include ++#include ++#include ++#include ++#include + + #include + +diff --git a/vcg/math/eigen.h b/vcg/math/eigen.h +index 5cae402..81f32ff 100644 +--- a/vcg/math/eigen.h ++++ b/vcg/math/eigen.h +@@ -53,10 +53,10 @@ struct ei_to_vcgtype; + } + + #include "base.h" +-#include "../../eigenlib/Eigen/LU" +-#include "../../eigenlib/Eigen/Geometry" +-#include "../../eigenlib/Eigen/Array" +-#include "../../eigenlib/Eigen/Core" ++#include "../../eigen3/Eigen/LU" ++#include "../../eigen3/Eigen/Geometry" ++#include "../../eigen3/Eigen/Array" ++#include "../../eigen3/Eigen/Core" + + // add support for unsigned char and short int + namespace Eigen { +diff --git a/vcg/math/matrix44.h b/vcg/math/matrix44.h +index a138e57..5291e0e 100644 +--- a/vcg/math/matrix44.h ++++ b/vcg/math/matrix44.h +@@ -30,8 +30,8 @@ + #include + #include + #include +-#include +-#include ++#include ++#include + + namespace vcg { + +diff --git a/vcg/math/polar_decomposition.h b/vcg/math/polar_decomposition.h +index deabf86..bd725d1 100644 +--- a/vcg/math/polar_decomposition.h ++++ b/vcg/math/polar_decomposition.h +@@ -26,8 +26,8 @@ + + #include + #include +-#include +-#include ++#include ++#include + + namespace vcg{ + +diff --git a/vcg/math/quadric.h b/vcg/math/quadric.h +index 8522056..99a9de1 100644 +--- a/vcg/math/quadric.h ++++ b/vcg/math/quadric.h +@@ -26,7 +26,7 @@ + #include + #include + #include +-#include ++#include + + namespace vcg { + namespace math { +diff --git a/vcg/space/fitting3.h b/vcg/space/fitting3.h +index e9e238a..6861969 100644 +--- a/vcg/space/fitting3.h ++++ b/vcg/space/fitting3.h +@@ -29,8 +29,8 @@ + #include + #include + +-#include +-#include ++#include ++#include + + namespace vcg { + +diff --git a/vcg/space/point_matching.h b/vcg/space/point_matching.h +index e9ac0ff..c6ff376 100644 +--- a/vcg/space/point_matching.h ++++ b/vcg/space/point_matching.h +@@ -27,8 +27,8 @@ + #include + #include + +-#include +-#include ++#include ++#include + #include + + namespace vcg +diff --git a/wrap/igl/smooth_field.h b/wrap/igl/smooth_field.h +index e1208cf..a403d54 100644 +--- a/wrap/igl/smooth_field.h ++++ b/wrap/igl/smooth_field.h +@@ -25,7 +25,7 @@ + #define SMOOTHER_FIELD_H + + //eigen stuff +-#include ++#include + + //vcg stuff + #include diff --git a/vcpkg/ports/vcglib/portfile.cmake b/vcpkg/ports/vcglib/portfile.cmake new file mode 100644 index 0000000..5389a69 --- /dev/null +++ b/vcpkg/ports/vcglib/portfile.cmake @@ -0,0 +1,15 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cnr-isti-vclab/vcglib + REF v1.0.1 + SHA512 55d1854054744abae2d41e7b5041df89253bae108df5fc1cfe777013de7192dce04bc474475cb11a1d0343ebcab1ea61b381d9d9c36c452528043e85e75bc211 + PATCHES consume-vcpkg-eigen3.patch + ) + +configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/vcglib/copyright COPYONLY) + +file(COPY ${SOURCE_PATH}/vcg/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/vcg) +file(COPY ${SOURCE_PATH}/wrap/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/wrap) +file(COPY ${SOURCE_PATH}/img/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/img) diff --git a/vcpkg/ports/vcpkg-gfortran/CONTROL b/vcpkg/ports/vcpkg-gfortran/CONTROL new file mode 100644 index 0000000..24bf1ce --- /dev/null +++ b/vcpkg/ports/vcpkg-gfortran/CONTROL @@ -0,0 +1,4 @@ +Source: vcpkg-gfortran +Version: 3 +Description: Metaport to install gfortran dependencies from msys if VCPKG_USE_EXTERNAL_Fortran is false +Supports: windows & !arm \ No newline at end of file diff --git a/vcpkg/ports/vcpkg-gfortran/portfile.cmake b/vcpkg/ports/vcpkg-gfortran/portfile.cmake new file mode 100644 index 0000000..7939c76 --- /dev/null +++ b/vcpkg/ports/vcpkg-gfortran/portfile.cmake @@ -0,0 +1,52 @@ +vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "linux" "osx") +include(vcpkg_find_fortran) +vcpkg_find_fortran(FORTRAN_CMAKE) +if(VCPKG_USE_INTERNAL_Fortran) + set(VCPKG_CRT_LINKAGE dynamic) # Will always be dynamic no way to overwrite internal CRT linkage here + vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) + set(HOST_ARCH $ENV{PROCESSOR_ARCHITEW6432}) + else() + set(HOST_ARCH $ENV{PROCESSOR_ARCHITECTURE}) + endif() + + if(HOST_ARCH MATCHES "(amd|AMD)64") + set(MINGW_W w64) + set(MSYS_HOST x86_64) + elseif(HOST_ARCH MATCHES "(x|X)86") + set(MINGW_W w32) + set(MSYS_HOST i686) + else() + message(FATAL_ERROR "Unsupported host architecture ${HOST_ARCH}!" ) + endif() + + if(VCPKG_TARGET_ARCHITECTURE MATCHES "(x|X)64") + set(MSYS_TARGET x86_64) + set(MINGW_W_TARGET 64) + set(GCC_LIB_SUFFIX s_seh-1) + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "(x|X)86") + set(MSYS_TARGET i686) + set(MINGW_W_TARGET 32) + set(GCC_LIB_SUFFIX s_dw2-1) + else() + message(FATAL_ERROR "Unsupported target architecture ${VCPKG_TARGET_ARCHITECTURE}!" ) + endif() + + set(MINGW_BIN "${vcpkg_find_fortran_MSYS_ROOT}/mingw${MINGW_W_TARGET}/bin/") + set(MINGW_Fortran_DLLS + "${MINGW_BIN}/libgfortran-5.dll" + "${MINGW_BIN}/libquadmath-0.dll" + "${MINGW_BIN}/libwinpthread-1.dll" + "${MINGW_BIN}/libgcc_${GCC_LIB_SUFFIX}.dll" + ) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(COPY ${MINGW_Fortran_DLLS} DESTINATION "${CURRENT_PACKAGES_DIR}/bin") + file(COPY ${MINGW_Fortran_DLLS} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin") + file(COPY "${vcpkg_find_fortran_MSYS_ROOT}/mingw${MINGW_W_TARGET}/share/licenses" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") + file(INSTALL "${vcpkg_find_fortran_MSYS_ROOT}/mingw${MINGW_W_TARGET}/share/licenses/crt/COPYING.MinGW-w64-runtime.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + set(VCPKG_POLICY_SKIP_DUMPBIN_CHECKS enabled) # due to outdated msvcrt + set(VCPKG_POLICY_DLLS_WITHOUT_LIBS enabled) + set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +else() + set(VCPKG_POLICY_EMPTY_PACKAGE enabled) +endif() \ No newline at end of file diff --git a/vcpkg/ports/vectorclass/CMakeLists.txt b/vcpkg/ports/vectorclass/CMakeLists.txt new file mode 100644 index 0000000..54b83b2 --- /dev/null +++ b/vcpkg/ports/vectorclass/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.8.0) +project(vectorclass VERSION 2.00.01 LANGUAGES CXX) + +add_library(${PROJECT_NAME} STATIC instrset_detect.cpp) + +target_include_directories(${PROJECT_NAME} INTERFACE + $ + $) + +target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_17) + +include(CMakePackageConfigHelpers) +write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake" + VERSION ${${PROJECT_NAME}_VERSION} + COMPATIBILITY SameMajorVersion) + +install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}-config) +install( + EXPORT ${PROJECT_NAME}-config DESTINATION lib/cmake/${PROJECT_NAME} + NAMESPACE ${PROJECT_NAME}::) +install( + FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake" + DESTINATION lib/cmake/${PROJECT_NAME}) +install(DIRECTORY . DESTINATION include/${PROJECT_NAME} FILES_MATCHING PATTERN *.h) \ No newline at end of file diff --git a/vcpkg/ports/vectorclass/CONTROL b/vcpkg/ports/vectorclass/CONTROL new file mode 100644 index 0000000..a5110d9 --- /dev/null +++ b/vcpkg/ports/vectorclass/CONTROL @@ -0,0 +1,5 @@ +Source: vectorclass +Version: 2.00.01 +Homepage: https://github.com/vectorclass/version2 +Description: C++ class library for using the Single Instruction Multiple Data (SIMD) instructions in modern Microprocessors +Supports: !(arm|arm64) \ No newline at end of file diff --git a/vcpkg/ports/vectorclass/portfile.cmake b/vcpkg/ports/vectorclass/portfile.cmake new file mode 100644 index 0000000..2ec2732 --- /dev/null +++ b/vcpkg/ports/vectorclass/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO vectorclass/version2 + REF v2.00.01 + SHA512 2e1f714cf0e23cf7986f0e78b4c1eeab4da6434ac92449b81990931e19ae189df6fbbef50f11e9532a41dc6eaff0a4fea840349a3747621ff537bbd7519f2c3d + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake TARGET_PATH share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Put the licence file where vcpkg expects it +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) diff --git a/vcpkg/ports/visit-struct/CMakeLists.txt b/vcpkg/ports/visit-struct/CMakeLists.txt new file mode 100644 index 0000000..df4fa28 --- /dev/null +++ b/vcpkg/ports/visit-struct/CMakeLists.txt @@ -0,0 +1,17 @@ +cmake_minimum_required(VERSION 3.11) +project(visit_struct) + +add_library(visit_struct INTERFACE) + +install(TARGETS visit_struct + EXPORT visit_struct-targets + INCLUDES DESTINATION include) + +install(EXPORT visit_struct-targets + FILE visit_struct-config.cmake + NAMESPACE visit_struct:: + DESTINATION share/visit_struct) + +install(DIRECTORY + include/visit_struct + DESTINATION include) diff --git a/vcpkg/ports/visit-struct/CONTROL b/vcpkg/ports/visit-struct/CONTROL new file mode 100644 index 0000000..bf89534 --- /dev/null +++ b/vcpkg/ports/visit-struct/CONTROL @@ -0,0 +1,3 @@ +Source: visit-struct +Version: 1.0-1 +Description: A header-only library providing structure visitors for C++11 and C++14 diff --git a/vcpkg/ports/visit-struct/portfile.cmake b/vcpkg/ports/visit-struct/portfile.cmake new file mode 100644 index 0000000..8a87471 --- /dev/null +++ b/vcpkg/ports/visit-struct/portfile.cmake @@ -0,0 +1,27 @@ +#header-only library +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO cbeck88/visit_struct + REF v1.0 + SHA512 1396d0d4c4d37f48434361d1e0ab4cb02c397aff1134678b26de713a27a4fcfa1c352890845502be645ba01e20314bf67731893fc6410b93e4521c1261d63c06 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/visit_struct TARGET_PATH share/visit_struct) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +file(INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright) +file(INSTALL ${SOURCE_PATH}/README.md + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/vlfeat/CMakeLists.txt b/vcpkg/ports/vlfeat/CMakeLists.txt new file mode 100644 index 0000000..39ecfbc --- /dev/null +++ b/vcpkg/ports/vlfeat/CMakeLists.txt @@ -0,0 +1,159 @@ +cmake_minimum_required (VERSION 3.10) +project (vlfeat) + +set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed") +set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed") +set(INSTALL_INCLUDE_DIR "include/vlfeat" CACHE PATH "Path where headers will be installed") +set(INSTALL_CMAKE_DIR "share/vlfeat" CACHE PATH "Path where cmake configs will be installed") + +# Make relative paths absolute (needed later on) +set(RELATIVE_INSTALL_INCLUDE_DIR ${INSTALL_INCLUDE_DIR}) +foreach(p LIB BIN INCLUDE CMAKE) + set(var INSTALL_${p}_DIR) + if(NOT IS_ABSOLUTE "${${var}}") + set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}") + endif() +endforeach() + +# make sure that the default is a RELEASE +set(default_build_type "Release") +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + message(STATUS "Setting build type to '${default_build_type}' as none was specified.") + set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE + STRING "Choose the type of build." FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Release" "MinSizeRel" "RelWithDebInfo") +endif() + +if(ENABLE_OPENMP) + find_package(OpenMP REQUIRED) + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") +endif() + +if(MSVC) + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D__LITTLE_ENDIAN__) + add_definitions(/Zp8) + add_definitions(/wd4146) + if(CMAKE_C_FLAGS MATCHES "/W[0-4]") + string(REGEX REPLACE "/W[0-4]" "/W1" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") + endif() +endif() + +if(CMAKE_COMPILER_IS_GNUCC) + add_definitions(-std=c99) + add_definitions(-Wno-unused-function) + add_definitions(-Wno-long-long) + add_definitions(-Wno-variadic-macros) +endif() + +if(USE_SSE) + add_definitions(-D__SSE2__) + set(SSE2_VL_C_FILES "vl/mathop_sse2.c" "vl/imopv_sse2.c") + set(SSE2_VL_H_FILES "vl/mathop_sse2.h" "vl/imopv_sse2.h") +else() + add_definitions(-DVL_DISABLE_SSE2) +endif() + +if(USE_AVX) + set(AVX_VL_C_FILES "vl/mathop_avx.c") + set(AVX_VL_H_FILES "vl/mathop_avx.h") +else() + add_definitions(-DVL_DISABLE_AVX) +endif() + + +set (C_SOURCES + vl/aib.c + vl/array.c + vl/covdet.c + vl/dsift.c + vl/fisher.c + vl/generic.c + vl/getopt_long.c + vl/gmm.c + vl/hikmeans.c + vl/hog.c + vl/homkermap.c + vl/host.c + vl/ikmeans.c + vl/imopv.c + vl/kdtree.c + vl/kmeans.c + vl/lbp.c + vl/liop.c + vl/mathop.c + ${AVX_VL_C_FILES} + ${SSE2_VL_C_FILES} + vl/mser.c + vl/pgm.c + vl/quickshift.c + vl/random.c + vl/rodrigues.c + vl/scalespace.c + vl/sift.c + vl/slic.c + vl/stringop.c + vl/svm.c + vl/svmdataset.c + vl/vlad.c +) + +set (H_SOURCES + vl/aib.h + vl/array.h + vl/covdet.h + vl/dsift.h + vl/fisher.h + vl/generic.h + vl/getopt_long.h + vl/gmm.h + vl/heap-def.h + vl/hikmeans.h + vl/hog.h + vl/homkermap.h + vl/host.h + vl/ikmeans.h + vl/imopv.h + vl/kdtree.h + vl/kmeans.h + vl/lbp.h + vl/liop.h + vl/mathop.h + ${AVX_VL_H_FILES} + ${SSE2_VL_H_FILES} + vl/mser.h + vl/pgm.h + vl/qsort-def.h + vl/quickshift.h + vl/random.h + vl/rodrigues.h + vl/scalespace.h + vl/shuffle-def.h + vl/sift.h + vl/slic.h + vl/stringop.h + vl/svm.h + vl/svmdataset.h + vl/vlad.h +) + +add_library(vl ${C_SOURCES} ${H_SOURCES}) +set_property(TARGET vl PROPERTY POSITION_INDEPENDENT_CODE ON) +target_compile_definitions(vl PRIVATE -DVL_BUILD_DLL) +target_include_directories(vl PUBLIC $ $) +set_target_properties(vl PROPERTIES PUBLIC_HEADER "${H_SOURCES}") + +install(TARGETS vl EXPORT vlfeatTargets + RUNTIME DESTINATION "${INSTALL_BIN_DIR}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + PUBLIC_HEADER DESTINATION "${INSTALL_INCLUDE_DIR}" + COMPONENT dev +) + +install(EXPORT vlfeatTargets + FILE vlfeatConfig.cmake + NAMESPACE unofficial::vlfeat:: + DESTINATION "${INSTALL_CMAKE_DIR}" +) diff --git a/vcpkg/ports/vlfeat/CONTROL b/vcpkg/ports/vlfeat/CONTROL new file mode 100644 index 0000000..d700ed8 --- /dev/null +++ b/vcpkg/ports/vlfeat/CONTROL @@ -0,0 +1,4 @@ +Source: vlfeat +Version: 2020-07-10 +Homepage: https://www.vlfeat.org +Description: An open library of computer vision algorithms diff --git a/vcpkg/ports/vlfeat/expose_missing_symbols.patch b/vcpkg/ports/vlfeat/expose_missing_symbols.patch new file mode 100644 index 0000000..02e9ce0 --- /dev/null +++ b/vcpkg/ports/vlfeat/expose_missing_symbols.patch @@ -0,0 +1,79 @@ +diff --git a/vl/generic.c b/vl/generic.c +index c6f84a9..8617ed2 100644 +--- a/vl/generic.c ++++ b/vl/generic.c +@@ -1513,13 +1513,13 @@ vl_thread_specific_state_delete (VlThreadState * self) + */ + + #if (defined(VL_OS_LINUX) || defined(VL_OS_MACOSX)) && defined(VL_COMPILER_GNUC) +-static void vl_constructor () __attribute__ ((constructor)) ; +-static void vl_destructor () __attribute__ ((destructor)) ; ++//static void vl_constructor () __attribute__ ((constructor)) ; ++//static void vl_destructor () __attribute__ ((destructor)) ; + #endif + + #if defined(VL_OS_WIN) +-static void vl_constructor () ; +-static void vl_destructor () ; ++//static void vl_constructor () ; ++//static void vl_destructor () ; + + BOOL WINAPI DllMain( + HINSTANCE hinstDLL, // handle to DLL module +@@ -1563,7 +1563,7 @@ BOOL WINAPI DllMain( + /* ---------------------------------------------------------------- */ + + /** @internal @brief Initialize VLFeat state */ +-static void ++void + vl_constructor (void) + { + VlState * state ; +@@ -1637,7 +1637,7 @@ vl_constructor (void) + } + + /** @internal @brief Destruct VLFeat */ +-static void ++void + vl_destructor () + { + VlState * state ; +diff --git a/vl/generic.h b/vl/generic.h +index 4ef87f2..30a974e 100644 +--- a/vl/generic.h ++++ b/vl/generic.h +@@ -206,5 +206,7 @@ VL_EXPORT double vl_toc (void) ; + VL_EXPORT double vl_get_cpu_time (void) ; + /** @} */ + ++VL_EXPORT void vl_constructor(); ++VL_EXPORT void vl_destructor(); + /* VL_GENERIC_H */ + #endif +diff --git a/vl/sift.c b/vl/sift.c +index 03963fe..6477a81 100644 +--- a/vl/sift.c ++++ b/vl/sift.c +@@ -1443,7 +1443,7 @@ vl_sift_detect (VlSiftFilt * f) + ** @remark The minimum octave size is 2x2xS. + **/ + +-static void ++void + update_gradient (VlSiftFilt *f) + { + int s_min = f->s_min ; +diff --git a/vl/sift.h b/vl/sift.h +index 50e03f4..f9558ad 100644 +--- a/vl/sift.h ++++ b/vl/sift.h +@@ -138,7 +138,8 @@ void vl_sift_keypoint_init (VlSiftFilt const *f, + double y, + double sigma) ; + /** @} */ +- ++VL_EXPORT ++void update_gradient(VlSiftFilt* f); + /** @name Retrieve data and parameters + ** @{ + **/ diff --git a/vcpkg/ports/vlfeat/portfile.cmake b/vcpkg/ports/vlfeat/portfile.cmake new file mode 100644 index 0000000..a075bde --- /dev/null +++ b/vcpkg/ports/vlfeat/portfile.cmake @@ -0,0 +1,33 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO vlfeat/vlfeat + REF 1b9075fc42fe54b42f0e937f8b9a230d8e2c7701 + SHA512 6d317a1a9496ccac80244553d555fe060b150ccc7ee397a353b64f3a8451f24d1f03d8c00ed04cd9fc2dc066a5c5089b03695c614cb43ffa09be363660278255 + PATCHES + expose_missing_symbols.patch +) + +set(USE_SSE ON) +set(USE_AVX OFF) # feature is broken, so it's always off anyway + +if(VCPKG_TARGET_ARCHITECTURE MATCHES "arm") + set(USE_SSE OFF) + set(USE_AVX OFF) +endif() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DUSE_SSE=${USE_SSE} + -DUSE_AVX=${USE_AVX} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/vlpp/CMakeLists.txt b/vcpkg/ports/vlpp/CMakeLists.txt new file mode 100644 index 0000000..f8df1b3 --- /dev/null +++ b/vcpkg/ports/vlpp/CMakeLists.txt @@ -0,0 +1,42 @@ +cmake_minimum_required(VERSION 3.3.0) + +project(Vlpp VERSION 0.10.0.0 LANGUAGES CXX) + +# Sources +set(SRCS + Import/Vlpp.cpp + Import/VlppWorkflowLibrary.cpp + Import/VlppWorkflowCompiler.cpp + Import/VlppWorkflowRuntime.cpp) + +if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") +endif() + +# Create and configure the target +add_library(Vlpp ${SRCS}) + +# target_compile_definitions +target_compile_definitions(Vlpp PRIVATE UNICODE) +target_compile_definitions(Vlpp PRIVATE _UNICODE) + +target_include_directories(Vlpp PRIVATE ${PROJECT_SOURCE_DIR}/Import) + +# Install +install( + TARGETS Vlpp + RUNTIME DESTINATION "bin" + LIBRARY DESTINATION "lib" + ARCHIVE DESTINATION "lib" + ) + +if (NOT DEFINED SKIP_HEADERS) + install( + FILES + Import/Vlpp.h + Import/VlppWorkflowLibrary.h + Import/VlppWorkflowCompiler.h + Import/VlppWorkflowRuntime.h + DESTINATION "include" + ) +endif() diff --git a/vcpkg/ports/vlpp/CONTROL b/vcpkg/ports/vlpp/CONTROL new file mode 100644 index 0000000..6f14fe0 --- /dev/null +++ b/vcpkg/ports/vlpp/CONTROL @@ -0,0 +1,4 @@ +Source: vlpp +Version: 0.11.0.0 +Homepage: https://github.com/vczh-libraries/Release +Description: Common C++ construction, including string operation / generic container / linq / General-LR parser generator / multithreading / reflection for C++ / etc diff --git a/vcpkg/ports/vlpp/portfile.cmake b/vcpkg/ports/vlpp/portfile.cmake new file mode 100644 index 0000000..bc5f441 --- /dev/null +++ b/vcpkg/ports/vlpp/portfile.cmake @@ -0,0 +1,29 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO vczh-libraries/Release + REF 5dfe25c4f4997da2d7a23bdc80c2438e72d9813a # 0.11.0.0 + SHA512 5d585e561246385b074c625a3644b79defa22328dab0ab14112c846cb917f384abb617a5f400971ca29e4ee5ac391b88b17ee65d594caf9ebf279806db669a4a + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Tools +file(INSTALL ${SOURCE_PATH}/Tools/CppMerge.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/vlpp RENAME copyright) diff --git a/vcpkg/ports/volk/CONTROL b/vcpkg/ports/volk/CONTROL new file mode 100644 index 0000000..13101ee --- /dev/null +++ b/vcpkg/ports/volk/CONTROL @@ -0,0 +1,7 @@ +Source: volk +Version: 2019-09-26 +Description: Meta loader for Vulkan API. + Note that the static library target volk::volk is built without platform-specific defines. + Use the header-only target volk::volk_headers if you require platform-specific extensions. +Homepage: https://github.com/zeux/volk +Build-Depends: vulkan \ No newline at end of file diff --git a/vcpkg/ports/volk/portfile.cmake b/vcpkg/ports/volk/portfile.cmake new file mode 100644 index 0000000..4171293 --- /dev/null +++ b/vcpkg/ports/volk/portfile.cmake @@ -0,0 +1,27 @@ +include(vcpkg_common_functions) + +# volk is not prepared to be a DLL. +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zeux/volk + REF 5a605f5d6997bd929b666700a36ca3d9bd1d7a47 + SHA512 ed6faf13828f3e47c4f12f8d19952c94589420539e98405bf2a4b7959518357dcc2f210746f3683d3862ac8c80821f3c863d49f4625e2dac85d2a680567e4f00 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DVOLK_INSTALL=ON +) +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/volk) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Put the file containing the license where vcpkg expects it +file(COPY ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/volk/) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/volk/README.md ${CURRENT_PACKAGES_DIR}/share/volk/copyright) diff --git a/vcpkg/ports/vs-yasm/CONTROL b/vcpkg/ports/vs-yasm/CONTROL new file mode 100644 index 0000000..68f7328 --- /dev/null +++ b/vcpkg/ports/vs-yasm/CONTROL @@ -0,0 +1,5 @@ +Source: vs-yasm +Version: 0.5.0 +Homepage: https://github.com/ShiftMediaProject/VSYASM +Description: Provides Visual Studio integration for the YASM assembler. +Supports: windows & !arm \ No newline at end of file diff --git a/vcpkg/ports/vs-yasm/portfile.cmake b/vcpkg/ports/vs-yasm/portfile.cmake new file mode 100644 index 0000000..341f66c --- /dev/null +++ b/vcpkg/ports/vs-yasm/portfile.cmake @@ -0,0 +1,19 @@ +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO ShiftMediaProject/VSYASM + REF deb50d9f18e8461538468339d508cdf240e64897 #v0.5 + SHA512 04627546020d33e5ea91f74b09c5ce3b817dce5f6ae4548c3b4148daa82fbd837c81675ac8730d3ca1cdf91fefa8bb23eec76d1bcd02c03dda1203d0c261178d + HEAD_REF master +) + +set(_files yasm.props yasm.targets yasm.xml) +foreach(_file ${_files}) + file(INSTALL "${SOURCE_PATH}/${_file}" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/") +endforeach() +set(_file "${CURRENT_PACKAGES_DIR}/share/${PORT}/yasm.props") +file(READ "${_file}" _contents) +string(REPLACE "$(VCInstallDir)" "" _contents "${_contents}") +file(WRITE "${_file}" "${_contents}") + +configure_file("${SOURCE_PATH}/COPYING" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY) \ No newline at end of file diff --git a/vcpkg/ports/vtk-dicom/CONTROL b/vcpkg/ports/vtk-dicom/CONTROL new file mode 100644 index 0000000..e8e3494 --- /dev/null +++ b/vcpkg/ports/vtk-dicom/CONTROL @@ -0,0 +1,9 @@ +Source: vtk-dicom +Version: 0.8.12-1 +Description: DICOM for VTK +Homepage: https://github.com/dgobbi/vtk-dicom +Build-Depends: vtk[core], zlib + +Feature: gdcm +Description: Use gdcm for decompressing DICOM files. +Build-Depends: gdcm diff --git a/vcpkg/ports/vtk-dicom/portfile.cmake b/vcpkg/ports/vtk-dicom/portfile.cmake new file mode 100644 index 0000000..171a046 --- /dev/null +++ b/vcpkg/ports/vtk-dicom/portfile.cmake @@ -0,0 +1,42 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dgobbi/vtk-dicom + REF 5034c68450de857b70fbe4a4b9f8dddb62badef3 # v0.8.12 + SHA512 bad1ed6a4a412402a2cd69e5f85b2b73f1ee7ea46a6bbcac31c5f66d07ae006679ffbd9a3c70f9baa1b05b1af0a2d4ca0efc34ec0a85a92f5116b900e81635cd + HEAD_REF master + PATCHES std.patch # similar patch is already in master +) + +if ("gdcm" IN_LIST FEATURES) + set(USE_GDCM ON ) +else() + set(USE_GDCM OFF ) +endif() + + +if(USE_GDCM) + list(APPEND ADDITIONAL_OPTIONS + -DUSE_GDCM=ON + -DUSE_DCMTK=OFF + ) +endif() +vcpkg_find_acquire_program(PYTHON3) +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_PROGRAMS=OFF + -DBUILD_EXAMPLES=OFF + "-DPython3_EXECUTABLE=${PYTHON3}" + ${ADDITIONAL_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/vtk-dicom/std.patch b/vcpkg/ports/vtk-dicom/std.patch new file mode 100644 index 0000000..59160f0 --- /dev/null +++ b/vcpkg/ports/vtk-dicom/std.patch @@ -0,0 +1,74 @@ +diff --git a/Source/vtkScancoCTReader.cxx b/Source/vtkScancoCTReader.cxx +index a71f2e46e..afe202ffc 100644 +--- a/Source/vtkScancoCTReader.cxx ++++ b/Source/vtkScancoCTReader.cxx +@@ -176,7 +176,7 @@ int vtkScancoCTReader::CheckVersion(const char header[16]) + //---------------------------------------------------------------------------- + int vtkScancoCTReader::CanReadFile(const char *filename) + { +- ifstream infile(filename, ios::in | ios::binary); ++ std::ifstream infile(filename, ios::in | ios::binary); + + bool canRead = false; + if (infile.good()) +@@ -409,7 +409,7 @@ void vtkScancoCTReader::StripString(char *dest, const char *cp, size_t l) + } + + //---------------------------------------------------------------------------- +-int vtkScancoCTReader::ReadISQHeader(ifstream *file, unsigned long bytesRead) ++int vtkScancoCTReader::ReadISQHeader(std::ifstream *file, unsigned long bytesRead) + { + if (bytesRead < 512) + { +@@ -620,7 +620,7 @@ int vtkScancoCTReader::ReadISQHeader(ifstream *file, unsigned long bytesRead) + } + + //---------------------------------------------------------------------------- +-int vtkScancoCTReader::ReadAIMHeader(ifstream *file, unsigned long bytesRead) ++int vtkScancoCTReader::ReadAIMHeader(std::ifstream *file, unsigned long bytesRead) + { + if (bytesRead < 160) + { +@@ -987,7 +987,7 @@ int vtkScancoCTReader::RequestInformation( + const char *ufilename = filename; + #endif + +- ifstream infile(ufilename, ios::in | ios::binary); ++ std::ifstream infile(ufilename, ios::in | ios::binary); + if (!infile.good()) + { + vtkErrorMacro("Cannot open file " << filename); +@@ -1115,7 +1115,7 @@ int vtkScancoCTReader::RequestData( + static_cast(data->GetScalarPointer()); + + // open the file +- ifstream infile(filename, ios::in | ios::binary); ++ std::ifstream infile(filename, ios::in | ios::binary); + if (!infile.good()) + { + vtkErrorMacro("Cannot open file " << filename); +diff --git a/Source/vtkScancoCTReader.h b/Source/vtkScancoCTReader.h +index ca31d7572..240d532f2 100644 +--- a/Source/vtkScancoCTReader.h ++++ b/Source/vtkScancoCTReader.h +@@ -34,6 +34,7 @@ + #ifndef vtkScancoCTReader_h + #define vtkScancoCTReader_h + ++#include + #include "vtkImageReader2.h" + #include "vtkDICOMModule.h" // For export macro + #include "vtkDICOMConfig.h" // For configuration details +@@ -185,10 +186,10 @@ protected: + void InitializeHeader(); + + //! Read an ISQ header. +- int ReadISQHeader(ifstream *file, unsigned long bytesRead); ++ int ReadISQHeader(std::ifstream *file, unsigned long bytesRead); + + //! Read AIM header. +- int ReadAIMHeader(ifstream *file, unsigned long bytesRead); ++ int ReadAIMHeader(std::ifstream *file, unsigned long bytesRead); + + //! Check the file header to see what type of file it is. + /*! diff --git a/vcpkg/ports/vtk-m/CONTROL b/vcpkg/ports/vtk-m/CONTROL new file mode 100644 index 0000000..6fe2933 --- /dev/null +++ b/vcpkg/ports/vtk-m/CONTROL @@ -0,0 +1,23 @@ +Source: vtk-m +Version: 1.5.0 +Homepage: https://gitlab.kitware.com/vtk/vtk-m/ +Description: VTK-m is a toolkit of scientific visualization algorithms for emerging processor architectures. +Supports: x64 & !uwp + +Feature: cuda +Description: Use the NVIDIA CUDA device adapter. +Build-Depends: cuda + +Feature: omp +Description: Use the OpenMP device adapter. + +Feature: tbb +Description: Use the Intel TBB device adapter. +Build-Depends: tbb + +Feature: mpi +Description: Use the MPI controller. +Build-Depends: mpi + +Feature: double +Description: Use double precision in floating point calculations diff --git a/vcpkg/ports/vtk-m/portfile.cmake b/vcpkg/ports/vtk-m/portfile.cmake new file mode 100644 index 0000000..658a12d --- /dev/null +++ b/vcpkg/ports/vtk-m/portfile.cmake @@ -0,0 +1,61 @@ +# VENDORED DEPENDENCIES! +# TODO: Should be replaced in the future with VCPKG internal versions +# add_subdirectory(thirdparty/diy) +# add_subdirectory(thirdparty/lodepng) +# if(VTKm_ENABLE_LOGGING) + # add_subdirectory(thirdparty/loguru) +# endif() +# add_subdirectory(thirdparty/optionparser) +# add_subdirectory(thirdparty/taotuple) +# add_subdirectory(thirdparty/lcl) + +vcpkg_check_features (OUT_FEATURE_OPTIONS OPTIONS + FEATURES + cuda VTKm_ENABLE_CUDA + omp VTKm_ENABLE_OPENMP + tbb VTKm_ENABLE_TBB + mpi VTKm_ENABLE_MPI + double VTKm_USE_DOUBLE_PRECISION + ) + +if("cuda" IN_LIST FEATURES AND NOT ENV{CUDACXX}) + set(ENV{CUDACXX} "$ENV{CUDA_PATH}/bin/nvcc") + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message(STATUS "Feature CUDA forces static build!") + endif() + set(VCPKG_LIBRARY_LINKAGE "static") # CUDA forces static build. +endif() + +list(APPEND OPTIONS -DVTKm_ENABLE_RENDERING=ON) +list(APPEND OPTIONS -DVTKm_ENABLE_DEVELOPER_FLAGS=OFF) +list(APPEND OPTIONS -DVTKm_ENABLE_CPACK=OFF) +list(APPEND OPTIONS -DVTKm_USE_DEFAULT_TYPES_FOR_VTK=ON) +# For port customizations on unix systems. +# Please feel free to make these port features if it makes any sense +#list(APPEND OPTIONS -DVTKm_ENABLE_GL_CONTEXT=ON) # or +#list(APPEND OPTIONS -DVTKm_ENABLE_EGL_CONTEXT=ON) # or +#list(APPEND OPTIONS -DVTKm_ENABLE_OSMESA_CONTEXT=ON) +list(APPEND OPTIONS -DBUILD_TESTING=OFF) + +vcpkg_from_gitlab(GITLAB_URL "https://gitlab.kitware.com" + OUT_SOURCE_PATH SOURCE_PATH + REPO vtk/vtk-m + REF f2aa6ad5be1a97e3fb41ef4680ee2c76c3434ac0 # v1.5.0 Version is strongly locked to VTK 9.0. Upgrading will most likly brake the VTK build + SHA512 2f2a273f74d9a583df9e25a4792440d8d89652fa14b3153f2ea5afbd329b50970e7b9bd68e0ccd036baf5c1f3ad7a8302d95c01dbb30d9a46c045987eebf5370) + # For people only wanting vtk-m and not VTK + #REF 74ffad9bd0679d061bc87e544a728f1c3c926269 # v1.5.1 + #SHA512 c9e1c18432b6c11ae086445255acf9477fe4c888122a2b2a9713dc63a40d2e4c2375742157526b5f0869f14c62a4ad66d81ee58d6cc75a1d53a1d615525a03c9) +vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${OPTIONS}) +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/vtkm-1.5 TARGET_PATH share/vtkm) + +file(READ ${CURRENT_PACKAGES_DIR}/share/vtkm/VTKmConfig.cmake _contents) +string(REPLACE [[set_and_check(VTKm_CONFIG_DIR "${PACKAGE_PREFIX_DIR}/lib/cmake/vtkm-1.5")]] [[set_and_check(VTKm_CONFIG_DIR "${PACKAGE_PREFIX_DIR}/share/vtkm")]] _contents ${_contents}) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/vtkm/VTKmConfig.cmake ${_contents}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/vtk/6811.patch b/vcpkg/ports/vtk/6811.patch new file mode 100644 index 0000000..86dca7e --- /dev/null +++ b/vcpkg/ports/vtk/6811.patch @@ -0,0 +1,26 @@ +From 34b9d59acb1688f4a9f38908760d5756a0e05ee4 Mon Sep 17 00:00:00 2001 +From: Julien Schueller +Date: Fri, 24 Apr 2020 08:28:23 -0400 +Subject: [PATCH] vtk_hdf5: Stick to 1.10.x API + +Closes #17866 +--- + ThirdParty/hdf5/vtk_hdf5.h.in | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/ThirdParty/hdf5/vtk_hdf5.h.in b/ThirdParty/hdf5/vtk_hdf5.h.in +index 1d802937ba..c4738b2cbf 100644 +--- a/ThirdParty/hdf5/vtk_hdf5.h.in ++++ b/ThirdParty/hdf5/vtk_hdf5.h.in +@@ -18,6 +18,8 @@ + /* Use the hdf5 library configured for VTK. */ + #cmakedefine01 VTK_MODULE_USE_EXTERNAL_vtkhdf5 + ++#define H5_USE_110_API ++ + #if VTK_MODULE_USE_EXTERNAL_vtkhdf5 + #cmakedefine01 vtkhdf5_is_parallel + #if vtkhdf5_is_parallel +-- +GitLab + diff --git a/vcpkg/ports/vtk/CONTROL b/vcpkg/ports/vtk/CONTROL new file mode 100644 index 0000000..edbe3cc --- /dev/null +++ b/vcpkg/ports/vtk/CONTROL @@ -0,0 +1,46 @@ +Source: vtk +Version: 9.0.1 +Port-Version: 2 +Description: Software system for 3D computer graphics, image processing, and visualization +Homepage: https://github.com/Kitware/VTK +Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5[core], libjpeg-turbo, proj4, lz4, liblzma, libtheora, eigen3, double-conversion, pugixml, libharu[notiffsymbols], sqlite3, netcdf-c, utfcpp, libogg, pegtl-2 + +Feature: vtkm +Description: Build with vtk-m accelerator and module. +Build-Depends: vtk-m[core] + +Feature: openvr +Description: OpenVR functionality for VTK +Build-Depends: sdl2, openvr + +Feature: qt +Description: Qt functionality for VTK +Build-Depends: qt5-xmlpatterns, qt5-tools, qt5-imageformats, qt5-x11extras (linux) + +Feature: mpi +Description: MPI functionality for VTK +Build-Depends: mpi, hdf5[core, parallel], vtk-m[core,mpi] + +Feature: python +Description: Python functionality for VTK +Build-Depends: python3 + +Feature: atlmfc +Description: Mfc functionality for vtk on Windows +Build-Depends: atlmfc (windows) + +Feature: paraview +Description: Build vtk modules required by paraview +Build-Depends: vtk[core, qt], vtk[core, atlmfc] (windows) + +Feature: cuda +Description: Support CUDA compilation +Build-Depends: cuda + +Feature: opengl +Description: All opengl related modules +Build-Depends: vtk[core] + +Feature: all +Description: Build all vtk modules +Build-Depends: libmysql, ffmpeg, gdal, vtk[core, qt, python, mpi], vtk[core, atlmfc] (windows) \ No newline at end of file diff --git a/vcpkg/ports/vtk/FindExpat.patch b/vcpkg/ports/vtk/FindExpat.patch new file mode 100644 index 0000000..a9fdc46 --- /dev/null +++ b/vcpkg/ports/vtk/FindExpat.patch @@ -0,0 +1,48 @@ +diff --git a/CMake/FindEXPAT.cmake b/CMake/FindEXPAT.cmake +index 45d923764..0ebcd3c83 100644 +--- a/CMake/FindEXPAT.cmake ++++ b/CMake/FindEXPAT.cmake +@@ -73,15 +73,37 @@ if(EXPAT_FOUND) + + if(NOT TARGET EXPAT::EXPAT) + include(vtkDetectLibraryType) +- vtk_detect_library_type(expat_library_type +- PATH "${EXPAT_LIBRARY}") ++ if(EXPAT_LIBRARY_RELEASE) ++ vtk_detect_library_type(expat_library_type ++ PATH "${EXPAT_LIBRARY_RELEASE}") ++ elseif(EXPAT_LIBRARY_DEBUG) ++ vtk_detect_library_type(expat_library_type ++ PATH "${EXPAT_LIBRARY_RELEASE}") ++ else() ++ vtk_detect_library_type(expat_library_type ++ PATH "${EXPAT_LIBRARY}") ++ endif() ++ + add_library(EXPAT::EXPAT "${expat_library_type}" IMPORTED) + unset(expat_library_type) + set_target_properties(EXPAT::EXPAT PROPERTIES +- IMPORTED_LINK_INTERFACE_LANGUAGES "C" +- IMPORTED_LOCATION "${EXPAT_LIBRARY}" +- IMPORTED_IMPLIB "${EXPAT_LIBRARY}" +- INTERFACE_INCLUDE_DIRECTORIES "${EXPAT_INCLUDE_DIRS}") ++ IMPORTED_LINK_INTERFACE_LANGUAGES "C" ++ INTERFACE_INCLUDE_DIRECTORIES "${EXPAT_INCLUDE_DIRS}") ++ if(EXPAT_LIBRARY_RELEASE) ++ set_target_properties(EXPAT::EXPAT PROPERTIES ++ IMPORTED_LOCATION_RELEASE "${EXPAT_LIBRARY_RELEASE}" ++ IMPORTED_IMPLIB_RELEASE "${EXPAT_LIBRARY_RELEASE}") ++ endif() ++ if(EXPAT_LIBRARY_DEBUG) ++ set_target_properties(EXPAT::EXPAT PROPERTIES ++ IMPORTED_LOCATION_DEBUG "${EXPAT_LIBRARY_DEBUG}" ++ IMPORTED_IMPLIB_DEBUG "${EXPAT_LIBRARY_DEBUG}") ++ endif() ++ if(EXPAT_LIBRARY_RELEASE OR EXPAT_LIBRARY_DEBUG AND NOT (EXPAT_LIBRARY_RELEASE AND EXPAT_LIBRARY_DEBUG)) ++ set_target_properties(EXPAT::EXPAT PROPERTIES ++ IMPORTED_LOCATION "${EXPAT_LIBRARY}" ++ IMPORTED_IMPLIB "${EXPAT_LIBRARY}") ++ endif() + endif() + endif() + diff --git a/vcpkg/ports/vtk/FindHDF5.cmake b/vcpkg/ports/vtk/FindHDF5.cmake new file mode 100644 index 0000000..1be1573 --- /dev/null +++ b/vcpkg/ports/vtk/FindHDF5.cmake @@ -0,0 +1,23 @@ +#The original VTK file is overdoing it and still prdouces errors that the target hdf5::hdf5_hl-shared cannot be found in dynamic builds +find_package(hdf5 QUIET NO_MODULE) +if(TARGET hdf5::hdf5-shared) + set_target_properties(hdf5::hdf5-shared PROPERTIES IMPORTED_GLOBAL TRUE) + add_library(hdf5::hdf5 ALIAS hdf5::hdf5-shared) +elseif(TARGET hdf5::hdf5-static) + set_target_properties(hdf5::hdf5-static PROPERTIES IMPORTED_GLOBAL TRUE) + add_library(hdf5::hdf5 ALIAS hdf5::hdf5-static) +else() + message(FATAL_ERROR "HDF5 target not found") +endif() +if(TARGET hdf5::hdf5_hl-shared) + set_target_properties(hdf5::hdf5_hl-shared PROPERTIES IMPORTED_GLOBAL TRUE) + add_library(hdf5::hdf5_hl ALIAS hdf5::hdf5_hl-shared) +elseif(TARGET hdf5::hdf5_hl-static) + set_target_properties(hdf5::hdf5_hl-static PROPERTIES IMPORTED_GLOBAL TRUE) + add_library(hdf5::hdf5_hl ALIAS hdf5::hdf5_hl-static) +else() + message(FATAL_ERROR "HDF5 HL target not found") +endif() +set(HDF5_IS_PARALLEL ${HDF5_ENABLE_PARALLEL} CACHE BOOL "" FORCE) +set(HDF5_FOUND ON CACHE BOOL "" FORCE) +set(hdf5_FOUND ON CACHE BOOL "" FORCE) diff --git a/vcpkg/ports/vtk/FindLZ4.patch b/vcpkg/ports/vtk/FindLZ4.patch new file mode 100644 index 0000000..dced8bf --- /dev/null +++ b/vcpkg/ports/vtk/FindLZ4.patch @@ -0,0 +1,47 @@ +diff --git a/CMake/FindLZ4.cmake b/CMake/FindLZ4.cmake +index 8c94e3bcd..ade3f9451 100644 +--- a/CMake/FindLZ4.cmake ++++ b/CMake/FindLZ4.cmake +@@ -1,38 +1,3 @@ +-find_path(LZ4_INCLUDE_DIR +- NAMES lz4.h +- DOC "lz4 include directory") +-mark_as_advanced(LZ4_INCLUDE_DIR) +-find_library(LZ4_LIBRARY +- NAMES lz4 liblz4 +- DOC "lz4 library") +-mark_as_advanced(LZ4_LIBRARY) +- +-if (LZ4_INCLUDE_DIR) +- file(STRINGS "${LZ4_INCLUDE_DIR}/lz4.h" _lz4_version_lines +- REGEX "#define[ \t]+LZ4_VERSION_(MAJOR|MINOR|RELEASE)") +- string(REGEX REPLACE ".*LZ4_VERSION_MAJOR *\([0-9]*\).*" "\\1" _lz4_version_major "${_lz4_version_lines}") +- string(REGEX REPLACE ".*LZ4_VERSION_MINOR *\([0-9]*\).*" "\\1" _lz4_version_minor "${_lz4_version_lines}") +- string(REGEX REPLACE ".*LZ4_VERSION_RELEASE *\([0-9]*\).*" "\\1" _lz4_version_release "${_lz4_version_lines}") +- set(LZ4_VERSION "${_lz4_version_major}.${_lz4_version_minor}.${_lz4_version_release}") +- unset(_lz4_version_major) +- unset(_lz4_version_minor) +- unset(_lz4_version_release) +- unset(_lz4_version_lines) +-endif () +- +-include(FindPackageHandleStandardArgs) +-find_package_handle_standard_args(LZ4 +- REQUIRED_VARS LZ4_LIBRARY LZ4_INCLUDE_DIR +- VERSION_VAR LZ4_VERSION) +- +-if (LZ4_FOUND) +- set(LZ4_INCLUDE_DIRS "${LZ4_INCLUDE_DIR}") +- set(LZ4_LIBRARIES "${LZ4_LIBRARY}") +- +- if (NOT TARGET LZ4::LZ4) +- add_library(LZ4::LZ4 UNKNOWN IMPORTED) +- set_target_properties(LZ4::LZ4 PROPERTIES +- IMPORTED_LOCATION "${LZ4_LIBRARY}" +- INTERFACE_INCLUDE_DIRECTORIES "${LZ4_INCLUDE_DIR}") +- endif () +-endif () ++find_package(LZ4 CONFIG REQUIRED) ++set_target_properties(lz4::lz4 PROPERTIES IMPORTED_GLOBAL TRUE) ++add_library(LZ4::LZ4 ALIAS lz4::lz4) +\ No newline at end of file diff --git a/vcpkg/ports/vtk/FindLZMA.patch b/vcpkg/ports/vtk/FindLZMA.patch new file mode 100644 index 0000000..cb7f809 --- /dev/null +++ b/vcpkg/ports/vtk/FindLZMA.patch @@ -0,0 +1,86 @@ +diff --git a/CMake/FindLZMA.cmake b/CMake/FindLZMA.cmake +index 0c8c7943c..d60669484 100644 +--- a/CMake/FindLZMA.cmake ++++ b/CMake/FindLZMA.cmake +@@ -1,9 +1,17 @@ + find_path(LZMA_INCLUDE_DIR + NAMES lzma.h + DOC "lzma include directory") +-find_library(LZMA_LIBRARY ++# Note LZMA_LIBRARY is set somewhere else. Maybe one of the configs/wrappers installed by VCPKG defines it. ++# The original FindLZMA chokes on it since it contains optimized/debug keywords ++# VTK should probably switch to FindLibLZMA from CMake ++find_library(LZMA_LIBRARY_RELEASE + NAMES lzma + DOC "lzma library") ++find_library(LZMA_LIBRARY_DEBUG ++ NAMES lzmad lzma NAMES_PER_DIR ++ DOC "lzma library") ++ include(SelectLibraryConfigurations) ++ select_library_configurations( LZMA ) + + if (LZMA_INCLUDE_DIR) + file(STRINGS "${LZMA_INCLUDE_DIR}/lzma/version.h" _lzma_version_lines +@@ -20,22 +26,50 @@ endif () + + include(FindPackageHandleStandardArgs) + find_package_handle_standard_args(LZMA +- REQUIRED_VARS LZMA_LIBRARY LZMA_INCLUDE_DIR ++ REQUIRED_VARS LZMA_LIBRARY LZMA_LIBRARY_RELEASE LZMA_LIBRARY_DEBUG LZMA_INCLUDE_DIR + VERSION_VAR LZMA_VERSION) + + if (LZMA_FOUND) + set(LZMA_LIBRARIES "${LZMA_LIBRARY}") + set(LZMA_INCLUDE_DIRS "${LZMA_INCLUDE_DIR}") +- ++ + if (NOT TARGET LZMA::LZMA) + include(vtkDetectLibraryType) +- vtk_detect_library_type(lzma_library_type +- PATH "${LZMA_LIBRARY}") +- add_library(LZMA::LZMA "${lzma_library_type}" IMPORTED) +- unset(lzma_library_type) +- set_target_properties(LZMA::LZMA PROPERTIES +- IMPORTED_LOCATION "${LZMA_LIBRARY}" +- IMPORTED_IMPLIB "${LZMA_LIBRARY}" +- INTERFACE_INCLUDE_DIRECTORIES "${LZMA_INCLUDE_DIR}") +- endif () ++ if(LZMA_LIBRARY_RELEASE) ++ vtk_detect_library_type(lzma_library_type ++ PATH "${LZMA_LIBRARY_RELEASE}") ++ elseif(LZMA_LIBRARY_DEBUG) ++ vtk_detect_library_type(lzma_library_type ++ PATH "${LZMA_LIBRARY_DEBUG}") ++ else() ++ vtk_detect_library_type(lzma_library_type ++ PATH "${LZMA_LIBRARY}") ++ endif() ++ ++ add_library(LZMA::LZMA "${lzma_library_type}" IMPORTED) ++ set_target_properties(LZMA::LZMA PROPERTIES ++ INTERFACE_INCLUDE_DIRECTORIES "${LZMA_INCLUDE_DIR}") ++ if(LZMA_LIBRARY_RELEASE) ++ set_target_properties(LZMA::LZMA PROPERTIES ++ IMPORTED_LOCATION_RELEASE "${LZMA_LIBRARY_RELEASE}" ++ IMPORTED_IMPLIB_RELEASE "${LZMA_LIBRARY_RELEASE}") ++ endif() ++ if(LZMA_LIBRARY_DEBUG) ++ set_target_properties(LZMA::LZMA PROPERTIES ++ IMPORTED_LOCATION_DEBUG "${LZMA_LIBRARY_DEBUG}" ++ IMPORTED_IMPLIB_DEBUG "${LZMA_LIBRARY_DEBUG}") ++ endif() ++ ++ # Guard against possible stupidity of depending projects reading only LOCATION without configuration ++ if(CMAKE_BUILD_TYPE MATCHES "Debug") ++ set_target_properties(LZMA::LZMA PROPERTIES ++ IMPORTED_LOCATION "${LZMA_LIBRARY_DEBUG}" ++ IMPORTED_IMPLIB "${LZMA_LIBRARY_DEBUG}") ++ else() ++ set_target_properties(LZMA::LZMA PROPERTIES ++ IMPORTED_LOCATION "${LZMA_LIBRARY_RELEASE}" ++ IMPORTED_IMPLIB "${LZMA_LIBRARY_RELEASE}") ++ endif() ++ endif() ++ #set_target_properties(LZMA::LZMA PROPERTIES IMPORTED_GLOBAL TRUE) + endif () + \ No newline at end of file diff --git a/vcpkg/ports/vtk/FindPostgreSQL.cmake b/vcpkg/ports/vtk/FindPostgreSQL.cmake new file mode 100644 index 0000000..913c8b9 --- /dev/null +++ b/vcpkg/ports/vtk/FindPostgreSQL.cmake @@ -0,0 +1,269 @@ +# Distributed under the OSI-approved BSD 3-Clause License. See accompanying +# file Copyright.txt or https://cmake.org/licensing for details. + +#[=======================================================================[.rst: +FindPostgreSQL +-------------- + +Find the PostgreSQL installation. + +IMPORTED Targets +^^^^^^^^^^^^^^^^ + +This module defines :prop_tgt:`IMPORTED` target ``PostgreSQL::PostgreSQL`` +if PostgreSQL has been found. + +Result Variables +^^^^^^^^^^^^^^^^ + +This module will set the following variables in your project: + +``PostgreSQL_FOUND`` + True if PostgreSQL is found. +``PostgreSQL_LIBRARIES`` + the PostgreSQL libraries needed for linking +``PostgreSQL_INCLUDE_DIRS`` + the directories of the PostgreSQL headers +``PostgreSQL_LIBRARY_DIRS`` + the link directories for PostgreSQL libraries +``PostgreSQL_VERSION_STRING`` + the version of PostgreSQL found +#]=======================================================================] + +# ---------------------------------------------------------------------------- +# History: +# This module is derived from the module originally found in the VTK source tree. +# +# ---------------------------------------------------------------------------- +# Note: +# PostgreSQL_ADDITIONAL_VERSIONS is a variable that can be used to set the +# version number of the implementation of PostgreSQL. +# In Windows the default installation of PostgreSQL uses that as part of the path. +# E.g C:\Program Files\PostgreSQL\8.4. +# Currently, the following version numbers are known to this module: +# "11" "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0" +# +# To use this variable just do something like this: +# set(PostgreSQL_ADDITIONAL_VERSIONS "9.2" "8.4.4") +# before calling find_package(PostgreSQL) in your CMakeLists.txt file. +# This will mean that the versions you set here will be found first in the order +# specified before the default ones are searched. +# +# ---------------------------------------------------------------------------- +# You may need to manually set: +# PostgreSQL_INCLUDE_DIR - the path to where the PostgreSQL include files are. +# PostgreSQL_LIBRARY_DIR - The path to where the PostgreSQL library files are. +# If FindPostgreSQL.cmake cannot find the include files or the library files. +# +# ---------------------------------------------------------------------------- +# The following variables are set if PostgreSQL is found: +# PostgreSQL_FOUND - Set to true when PostgreSQL is found. +# PostgreSQL_INCLUDE_DIRS - Include directories for PostgreSQL +# PostgreSQL_LIBRARY_DIRS - Link directories for PostgreSQL libraries +# PostgreSQL_LIBRARIES - The PostgreSQL libraries. +# +# The ``PostgreSQL::PostgreSQL`` imported target is also created. +# +# ---------------------------------------------------------------------------- +# If you have installed PostgreSQL in a non-standard location. +# (Please note that in the following comments, it is assumed that +# points to the root directory of the include directory of PostgreSQL.) +# Then you have three options. +# 1) After CMake runs, set PostgreSQL_INCLUDE_DIR to /include and +# PostgreSQL_LIBRARY_DIR to wherever the library pq (or libpq in windows) is +# 2) Use CMAKE_INCLUDE_PATH to set a path to /PostgreSQL<-version>. This will allow find_path() +# to locate PostgreSQL_INCLUDE_DIR by utilizing the PATH_SUFFIXES option. e.g. In your CMakeLists.txt file +# set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "/include") +# 3) Set an environment variable called ${PostgreSQL_ROOT} that points to the root of where you have +# installed PostgreSQL, e.g. . +# +# ---------------------------------------------------------------------------- + +set(PostgreSQL_INCLUDE_PATH_DESCRIPTION "top-level directory containing the PostgreSQL include directories. E.g /usr/local/include/PostgreSQL/8.4 or C:/Program Files/PostgreSQL/8.4/include") +set(PostgreSQL_INCLUDE_DIR_MESSAGE "Set the PostgreSQL_INCLUDE_DIR cmake cache entry to the ${PostgreSQL_INCLUDE_PATH_DESCRIPTION}") +set(PostgreSQL_LIBRARY_PATH_DESCRIPTION "top-level directory containing the PostgreSQL libraries.") +set(PostgreSQL_LIBRARY_DIR_MESSAGE "Set the PostgreSQL_LIBRARY_DIR cmake cache entry to the ${PostgreSQL_LIBRARY_PATH_DESCRIPTION}") +set(PostgreSQL_ROOT_DIR_MESSAGE "Set the PostgreSQL_ROOT system variable to where PostgreSQL is found on the machine E.g C:/Program Files/PostgreSQL/8.4") + + +set(PostgreSQL_KNOWN_VERSIONS ${PostgreSQL_ADDITIONAL_VERSIONS} + "11" "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0") + +# Define additional search paths for root directories. +set( PostgreSQL_ROOT_DIRECTORIES + ENV PostgreSQL_ROOT + ${PostgreSQL_ROOT} +) +foreach(suffix ${PostgreSQL_KNOWN_VERSIONS}) + if(WIN32) + list(APPEND PostgreSQL_LIBRARY_ADDITIONAL_SEARCH_SUFFIXES + "PostgreSQL/${suffix}/lib") + list(APPEND PostgreSQL_INCLUDE_ADDITIONAL_SEARCH_SUFFIXES + "PostgreSQL/${suffix}/include") + list(APPEND PostgreSQL_TYPE_ADDITIONAL_SEARCH_SUFFIXES + "PostgreSQL/${suffix}/include/server") + endif() + if(UNIX) + list(APPEND PostgreSQL_LIBRARY_ADDITIONAL_SEARCH_SUFFIXES + "pgsql-${suffix}/lib") + list(APPEND PostgreSQL_INCLUDE_ADDITIONAL_SEARCH_SUFFIXES + "pgsql-${suffix}/include") + list(APPEND PostgreSQL_TYPE_ADDITIONAL_SEARCH_SUFFIXES + "postgresql/${suffix}/server" + "pgsql-${suffix}/include/server") + endif() +endforeach() + +# +# Look for an installation. +# +find_path(PostgreSQL_INCLUDE_DIR + NAMES libpq-fe.h + PATHS + # Look in other places. + ${PostgreSQL_ROOT_DIRECTORIES} + PATH_SUFFIXES + pgsql + postgresql + include + ${PostgreSQL_INCLUDE_ADDITIONAL_SEARCH_SUFFIXES} + # Help the user find it if we cannot. + DOC "The ${PostgreSQL_INCLUDE_DIR_MESSAGE}" +) + +find_path(PostgreSQL_TYPE_INCLUDE_DIR + NAMES catalog/pg_type.h + PATHS + # Look in other places. + ${PostgreSQL_ROOT_DIRECTORIES} + PATH_SUFFIXES + postgresql + pgsql/server + postgresql/server + include/server + ${PostgreSQL_TYPE_ADDITIONAL_SEARCH_SUFFIXES} + # Help the user find it if we cannot. + DOC "The ${PostgreSQL_INCLUDE_DIR_MESSAGE}" +) + +# The PostgreSQL library. +set (PostgreSQL_LIBRARY_TO_FIND pq) +# Setting some more prefixes for the library +set (PostgreSQL_LIB_PREFIX "") +if ( WIN32 ) + set (PostgreSQL_LIB_PREFIX ${PostgreSQL_LIB_PREFIX} "lib") + set (PostgreSQL_LIBRARY_TO_FIND ${PostgreSQL_LIB_PREFIX}${PostgreSQL_LIBRARY_TO_FIND}) +endif() + +function(__postgresql_find_library _name) + find_library(${_name} + NAMES ${ARGN} + PATHS + ${PostgreSQL_ROOT_DIRECTORIES} + PATH_SUFFIXES + lib + ${PostgreSQL_LIBRARY_ADDITIONAL_SEARCH_SUFFIXES} + # Help the user find it if we cannot. + DOC "The ${PostgreSQL_LIBRARY_DIR_MESSAGE}" + ) +endfunction() + +# For compatibility with versions prior to this multi-config search, honor +# any PostgreSQL_LIBRARY that is already specified and skip the search. +if(PostgreSQL_LIBRARY) + set(PostgreSQL_LIBRARIES "${PostgreSQL_LIBRARY}") + get_filename_component(PostgreSQL_LIBRARY_DIR "${PostgreSQL_LIBRARY}" PATH) +else() + __postgresql_find_library(PostgreSQL_LIBRARY_RELEASE ${PostgreSQL_LIBRARY_TO_FIND}) + __postgresql_find_library(PostgreSQL_LIBRARY_DEBUG ${PostgreSQL_LIBRARY_TO_FIND}d) + include(SelectLibraryConfigurations) + select_library_configurations(PostgreSQL) + mark_as_advanced(PostgreSQL_LIBRARY_RELEASE PostgreSQL_LIBRARY_DEBUG) + if(PostgreSQL_LIBRARY_RELEASE) + get_filename_component(PostgreSQL_LIBRARY_DIR "${PostgreSQL_LIBRARY_RELEASE}" PATH) + elseif(PostgreSQL_LIBRARY_DEBUG) + get_filename_component(PostgreSQL_LIBRARY_DIR "${PostgreSQL_LIBRARY_DEBUG}" PATH) + else() + set(PostgreSQL_LIBRARY_DIR "") + endif() +endif() + +if (PostgreSQL_INCLUDE_DIR) + # Some platforms include multiple pg_config.hs for multi-lib configurations + # This is a temporary workaround. A better solution would be to compile + # a dummy c file and extract the value of the symbol. + file(GLOB _PG_CONFIG_HEADERS "${PostgreSQL_INCLUDE_DIR}/pg_config*.h") + foreach(_PG_CONFIG_HEADER ${_PG_CONFIG_HEADERS}) + if(EXISTS "${_PG_CONFIG_HEADER}") + file(STRINGS "${_PG_CONFIG_HEADER}" pgsql_version_str + REGEX "^#define[\t ]+PG_VERSION_NUM[\t ]+.*") + if(pgsql_version_str) + string(REGEX REPLACE "^#define[\t ]+PG_VERSION_NUM[\t ]+([0-9]*).*" + "\\1" _PostgreSQL_VERSION_NUM "${pgsql_version_str}") + break() + endif() + endif() + endforeach() + if (_PostgreSQL_VERSION_NUM) + math(EXPR _PostgreSQL_major_version "${_PostgreSQL_VERSION_NUM} / 10000") + math(EXPR _PostgreSQL_minor_version "${_PostgreSQL_VERSION_NUM} % 10000") + set(PostgreSQL_VERSION_STRING "${_PostgreSQL_major_version}.${_PostgreSQL_minor_version}") + unset(_PostgreSQL_major_version) + unset(_PostgreSQL_minor_version) + else () + foreach(_PG_CONFIG_HEADER ${_PG_CONFIG_HEADERS}) + if(EXISTS "${_PG_CONFIG_HEADER}") + file(STRINGS "${_PG_CONFIG_HEADER}" pgsql_version_str + REGEX "^#define[\t ]+PG_VERSION[\t ]+\".*\"") + if(pgsql_version_str) + string(REGEX REPLACE "^#define[\t ]+PG_VERSION[\t ]+\"([^\"]*)\".*" + "\\1" PostgreSQL_VERSION_STRING "${pgsql_version_str}") + break() + endif() + endif() + endforeach() + endif () + unset(_PostgreSQL_VERSION_NUM) + unset(pgsql_version_str) +endif() + +# Did we find anything? +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(PostgreSQL + REQUIRED_VARS PostgreSQL_LIBRARY PostgreSQL_INCLUDE_DIR PostgreSQL_TYPE_INCLUDE_DIR + VERSION_VAR PostgreSQL_VERSION_STRING) +set(PostgreSQL_FOUND ${POSTGRESQL_FOUND}) + +function(__postgresql_import_library _target _var _config) + if(_config) + set(_config_suffix "_${_config}") + else() + set(_config_suffix "") + endif() + + set(_lib "${${_var}${_config_suffix}}") + if(EXISTS "${_lib}") + if(_config) + set_property(TARGET ${_target} APPEND PROPERTY + IMPORTED_CONFIGURATIONS ${_config}) + endif() + set_target_properties(${_target} PROPERTIES + IMPORTED_LOCATION${_config_suffix} "${_lib}") + endif() +endfunction() + +# Now try to get the include and library path. +if(PostgreSQL_FOUND) + if (NOT TARGET PostgreSQL::PostgreSQL) + add_library(PostgreSQL::PostgreSQL UNKNOWN IMPORTED) + set_target_properties(PostgreSQL::PostgreSQL PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${PostgreSQL_INCLUDE_DIR};${PostgreSQL_TYPE_INCLUDE_DIR}") + __postgresql_import_library(PostgreSQL::PostgreSQL PostgreSQL_LIBRARY "") + __postgresql_import_library(PostgreSQL::PostgreSQL PostgreSQL_LIBRARY "RELEASE") + __postgresql_import_library(PostgreSQL::PostgreSQL PostgreSQL_LIBRARY "DEBUG") + endif () + set(PostgreSQL_INCLUDE_DIRS ${PostgreSQL_INCLUDE_DIR} ${PostgreSQL_TYPE_INCLUDE_DIR} ) + set(PostgreSQL_LIBRARY_DIRS ${PostgreSQL_LIBRARY_DIR} ) +endif() + +mark_as_advanced(PostgreSQL_INCLUDE_DIR PostgreSQL_TYPE_INCLUDE_DIR) diff --git a/vcpkg/ports/vtk/Findproj.patch b/vcpkg/ports/vtk/Findproj.patch new file mode 100644 index 0000000..d83b0f4 --- /dev/null +++ b/vcpkg/ports/vtk/Findproj.patch @@ -0,0 +1,13 @@ +diff --git a/CMake/FindLibPROJ.cmake b/CMake/FindLibPROJ.cmake +index e2344bb17..bac4c747e 100644 +--- a/CMake/FindLibPROJ.cmake ++++ b/CMake/FindLibPROJ.cmake +@@ -9,7 +9,7 @@ find_library(LibPROJ_LIBRARY_RELEASE + mark_as_advanced(LibPROJ_LIBRARY_RELEASE) + + find_library(LibPROJ_LIBRARY_DEBUG +- NAMES projd ++ NAMES projd proj_d proj NAMES_PER_DIR + DOC "libproj debug library") + mark_as_advanced(LibPROJ_LIBRARY_DEBUG) + diff --git a/vcpkg/ports/vtk/NoUndefDebug.patch b/vcpkg/ports/vtk/NoUndefDebug.patch new file mode 100644 index 0000000..a7bb750 --- /dev/null +++ b/vcpkg/ports/vtk/NoUndefDebug.patch @@ -0,0 +1,13 @@ +diff --git a/Utilities/Python/vtkPython.h b/Utilities/Python/vtkPython.h +index 166f24104..79ae1d371 100644 +--- a/Utilities/Python/vtkPython.h ++++ b/Utilities/Python/vtkPython.h +@@ -53,7 +53,7 @@ + #include + #include + #include +-#undef _DEBUG ++ + #if defined(_MSC_VER) + #define _CRT_NOFORCE_MANIFEST 1 + #endif diff --git a/vcpkg/ports/vtk/fix-using-hdf5.patch b/vcpkg/ports/vtk/fix-using-hdf5.patch new file mode 100644 index 0000000..834ab15 --- /dev/null +++ b/vcpkg/ports/vtk/fix-using-hdf5.patch @@ -0,0 +1,22 @@ +diff --git a/ThirdParty/h5part/vtkh5part/src/H5Part.c b/ThirdParty/h5part/vtkh5part/src/H5Part.c +index 228d246..41af04d 100644 +--- a/ThirdParty/h5part/vtkh5part/src/H5Part.c ++++ b/ThirdParty/h5part/vtkh5part/src/H5Part.c +@@ -2092,7 +2092,7 @@ _H5Part_iteration_operator2 ( + case H5L_TYPE_HARD: { + + H5O_info_t objinfo; +- if( H5Oget_info_by_name( group_id, member_name, &objinfo, H5P_DEFAULT ) < 0 ) { ++ if( H5Oget_info_by_name1( group_id, member_name, &objinfo, H5P_DEFAULT ) < 0 ) { + return (herr_t)HANDLE_H5G_GET_OBJINFO_ERR ( member_name ); + } + +@@ -2142,7 +2142,7 @@ _H5Part_iteration_operator2 ( + if ( obj_id < 0 ) { + return (herr_t)HANDLE_H5G_OPEN_ERR ( member_name ); + } +- else if ( H5Oget_info ( obj_id, &objinfo ) < 0 ) { ++ else if ( H5Oget_info1 ( obj_id, &objinfo ) < 0 ) { + return (herr_t)HANDLE_H5G_GET_OBJINFO_ERR ( member_name ); + } + else { diff --git a/vcpkg/ports/vtk/pegtl.patch b/vcpkg/ports/vtk/pegtl.patch new file mode 100644 index 0000000..6374bb3 --- /dev/null +++ b/vcpkg/ports/vtk/pegtl.patch @@ -0,0 +1,71 @@ +diff --git a/CMake/FindPEGTL.cmake b/CMake/FindPEGTL.cmake +index 73eee02f7..22d8bc159 100644 +--- a/CMake/FindPEGTL.cmake ++++ b/CMake/FindPEGTL.cmake +@@ -19,31 +19,40 @@ + # Copyright (c) 2009 Benoit Jacob + # Redistribution and use is allowed according to the terms of the 2-clause BSD license. + +-find_path(PEGTL_INCLUDE_DIR +- NAMES pegtl/version.hpp +- PATH_SUFFIXES tao +- DOC "Path to PEGTL headers") +-mark_as_advanced(PEGTL_INCLUDE_DIR) ++message(STATUS "Searching for PEGTL") ++find_package(PEGTL CONFIG NAMES PEGTL-2) ++if(TARGET taocpp::pegtl) ++ message(STATUS "Searching for PEGTL - found target taocpp::pegtl") ++ set_target_properties(taocpp::pegtl PROPERTIES IMPORTED_GLOBAL TRUE) ++ add_library(PEGTL::PEGTL ALIAS taocpp::pegtl) ++else() ++ find_path(PEGTL_INCLUDE_DIR ++ NAMES pegtl/version.hpp ++ PATH_SUFFIXES tao ++ DOC "Path to PEGTL headers") ++ mark_as_advanced(PEGTL_INCLUDE_DIR) + +-if (PEGTL_INCLUDE_DIR) +- file(STRINGS "${PEGTL_INCLUDE_DIR}/pegtl/version.hpp" _pegtl_version_header +- REGEX "TAO_PEGTL_VERSION") +- string(REGEX MATCH "define[ \t]+TAO_PEGTL_VERSION[ \t]+\"([0-9.]+)\"" _pegtl_version_match "${_pegtl_version_header}") +- set(PEGTL_VERSION "${CMAKE_MATCH_1}") +- unset(_pegtl_version_header) +- unset(_pegtl_version_match) +-endif () ++ if (PEGTL_INCLUDE_DIR) ++ file(STRINGS "${PEGTL_INCLUDE_DIR}/pegtl/version.hpp" _pegtl_version_header ++ REGEX "TAO_PEGTL_VERSION") ++ string(REGEX MATCH "define[ \t]+TAO_PEGTL_VERSION[ \t]+\"([0-9.]+)\"" _pegtl_version_match "${_pegtl_version_header}") ++ set(PEGTL_VERSION "${CMAKE_MATCH_1}") ++ unset(_pegtl_version_header) ++ unset(_pegtl_version_match) ++ endif () + +-include(FindPackageHandleStandardArgs) +-find_package_handle_standard_args(PEGTL +- REQUIRED_VARS PEGTL_INCLUDE_DIR +- VERSION_VAR PEGTL_VERSION) ++ include(FindPackageHandleStandardArgs) ++ find_package_handle_standard_args(PEGTL ++ REQUIRED_VARS PEGTL_INCLUDE_DIR ++ VERSION_VAR PEGTL_VERSION) + +-if (PEGTL_FOUND) +- set(PEGTL_INCLUDE_DIRS "${PEGTL_INCLUDE_DIR}") +- if (NOT TARGET PEGTL::PEGTL) +- add_library(PEGTL::PEGTL INTERFACE IMPORTED) +- set_target_properties(PEGTL::PEGTL PROPERTIES +- INTERFACE_INCLUDE_DIRECTORIES "${PEGTL_INCLUDE_DIR}") +- endif () +-endif () ++ if (PEGTL_FOUND) ++ set(PEGTL_INCLUDE_DIRS "${PEGTL_INCLUDE_DIR}") ++ if (NOT TARGET PEGTL::PEGTL) ++ add_library(PEGTL::PEGTL INTERFACE IMPORTED) ++ set_target_properties(PEGTL::PEGTL PROPERTIES ++ INTERFACE_INCLUDE_DIRECTORIES "${PEGTL_INCLUDE_DIR}") ++ endif () ++ message(STATUS "Searching for PEGTL - found") ++ endif () ++endif () +\ No newline at end of file diff --git a/vcpkg/ports/vtk/portfile.cmake b/vcpkg/ports/vtk/portfile.cmake new file mode 100644 index 0000000..d2dc3e2 --- /dev/null +++ b/vcpkg/ports/vtk/portfile.cmake @@ -0,0 +1,323 @@ +if(NOT VCPKG_TARGET_IS_WINDOWS) + message(WARNING "You will need to install Xorg dependencies to build vtk:\napt-get install libxt-dev\n") +endif() + +# TODO: +# - add loguru as a dependency requires #8682 + +# ============================================================================= +# Options: +# Collect CMake options for optional components +if("qt" IN_LIST FEATURES) + list(APPEND ADDITIONAL_OPTIONS + -DVTK_GROUP_ENABLE_Qt=YES + -DVTK_MODULE_ENABLE_VTK_GUISupportQt=YES + -DVTK_MODULE_ENABLE_VTK_GUISupportQtSQL=YES + -DVTK_MODULE_ENABLE_VTK_RenderingQt=YES + -DVTK_MODULE_ENABLE_VTK_ViewsQt=YES + ) + +endif() +if("atlmfc" IN_LIST FEATURES) + list(APPEND ADDITIONAL_OPTIONS + -DVTK_MODULE_ENABLE_VTK_GUISupportMFC=YES + ) +endif() +if("vtkm" IN_LIST FEATURES) + list(APPEND ADDITIONAL_OPTIONS + -DVTK_MODULE_ENABLE_VTK_AcceleratorsVTKm=YES + -DVTK_MODULE_ENABLE_VTK_vtkm=YES + ) +endif() + +if("python" IN_LIST FEATURES) + vcpkg_find_acquire_program(PYTHON3) + list(APPEND ADDITIONAL_OPTIONS + -DVTK_WRAP_PYTHON=ON + -DVTK_PYTHON_VERSION=3 + -DPython3_FIND_REGISTRY=NEVER + "-DPython3_EXECUTABLE:PATH=${PYTHON3}" + ) + + #VTK_PYTHON_SITE_PACKAGES_SUFFIX should be set to the install dir of the site-packages +endif() + +if("paraview" IN_LIST FEATURES) + list(APPEND ADDITIONAL_OPTIONS + -DVTK_MODULE_ENABLE_VTK_FiltersParallelStatistics=YES + -DVTK_MODULE_ENABLE_VTK_IOParallelExodus=YES + -DVTK_MODULE_ENABLE_VTK_RenderingContextOpenGL2=YES + -DVTK_MODULE_ENABLE_VTK_RenderingParallel=YES + -DVTK_MODULE_ENABLE_VTK_RenderingVolumeAMR=YES + -DVTK_MODULE_ENABLE_VTK_IOXdmf2=YES + -DVTK_MODULE_ENABLE_VTK_IOH5part=YES + -DVTK_MODULE_ENABLE_VTK_IOParallelLSDyna=YES + -DVTK_MODULE_ENABLE_VTK_IOTRUCHAS=YES + -DVTK_MODULE_ENABLE_VTK_IOVPIC=YES + -DVTK_MODULE_ENABLE_VTK_RenderingLICOpenGL2=YES + -DVTK_MODULE_ENABLE_VTK_RenderingAnnotation=YES + -DVTK_MODULE_ENABLE_VTK_DomainsChemistryOpenGL2=YES + ) + if("python" IN_LIST FEATURES) + list(APPEND ADDITIONAL_OPTIONS + -DVTK_MODULE_ENABLE_VTK_RenderingMatplotlib=YES + ) + endif() +endif() + +if("mpi" IN_LIST FEATURES) + list(APPEND ADDITIONAL_OPTIONS + -DVTK_GROUP_ENABLE_MPI=YES + -DVTK_USE_MPI=YES + ) +endif() + +if("mpi" IN_LIST FEATURES AND "python" IN_LIST FEATURES) + list(APPEND ADDITIONAL_OPTIONS + -DVTK_MODULE_USE_EXTERNAL_VTK_mpi4py=OFF + ) +endif() + +if("opengl" IN_LIST FEATURES) + list(APPEND ADDITIONAL_OPTIONS + -DVTK_MODULE_ENABLE_VTK_DomainsChemestryOpenGL2=YES + -DVTK_MODULE_ENABLE_VTK_ImagingOpenGL2=YES + -DVTK_MODULE_ENABLE_VTK_RenderingContextOpenGL2=YES + -DVTK_MODULE_ENABLE_VTK_RenderingGL2PSOpenGL2=YES + -DVTK_MODULE_ENABLE_VTK_RenderingLICOpenGL2=YES + -DVTK_MODULE_ENABLE_VTK_RenderingOpenGL2=YES + -DVTK_MODULE_ENABLE_VTK_RenderingVolumeOpenGL2=YES + -DVTK_MODULE_ENABLE_VTK_opengl=YES + ) +endif() + +if("cuda" IN_LIST FEATURES AND CMAKE_HOST_WIN32) + vcpkg_add_to_path("$ENV{CUDA_PATH}/bin") +endif() + +if("all" IN_LIST FEATURES) + list(APPEND ADDITIONAL_OPTIONS + -DVTK_USE_TK=OFF # TCL/TK currently not included in vcpkg + ) +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + "cuda" VTK_USE_CUDA + "all" VTK_BUILD_ALL_MODULES +) + + +# ============================================================================= +# Clone & patch +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Kitware/VTK + REF 96e6fa9b3ff245e4d51d49f23d40e9ad8774e85e # v9.0.1 + SHA512 0efb1845053b6143e5ee7fa081b8be98f6825262c59051e88b2be02497e23362055067b2f811eff82e93eb194e5a9afd2a12e3878a252eb4011a5dab95127a6f + HEAD_REF master + PATCHES + 6811.patch + FindLZMA.patch # Will be fixed in 9.1? + FindLZ4.patch + Findproj.patch + vtkm.patch # To include an external VTKm build (v.1.5 required) + pegtl.patch + pythonwrapper.patch # Required by ParaView to Wrap required classes + NoUndefDebug.patch # Required to link against correct Python library depending on build type. + python_debug.patch + fix-using-hdf5.patch + # Last patch TODO: Patch out internal loguru + FindExpat.patch # The find_library calls are taken care of by vcpkg-cmake-wrapper.cmake of expat +) + +# ============================================================================= +#Overwrite outdated modules if they have not been patched: +file(COPY "${CURRENT_PORT_DIR}/FindPostgreSQL.cmake" DESTINATION "${SOURCE_PATH}/CMake") # will be backported from CMake in VTK in a future release +file(COPY "${CURRENT_PORT_DIR}/FindHDF5.cmake" DESTINATION "${SOURCE_PATH}/CMake/patches/99") # due to usage of targets in netcdf-c +# ============================================================================= + +# ============================================================================= +# Configure & Install + +# We set all libraries to "system" and explicitly list the ones that should use embedded copies +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DBUILD_TESTING=OFF + -DVTK_BUILD_TESTING=OFF + -DVTK_BUILD_EXAMPLES=OFF + -DVTK_INSTALL_INCLUDE_DIR=include + -DVTK_INSTALL_DATA_DIR=share/vtk/data + -DVTK_INSTALL_DOC_DIR=share/vtk/doc + -DVTK_INSTALL_PACKAGE_DIR=share/vtk + -DVTK_INSTALL_RUNTIME_DIR=bin + -DVTK_FORBID_DOWNLOADS=ON + -DVTK_ENABLE_REMOTE_MODULES=OFF + # VTK groups to enable + -DVTK_GROUP_ENABLE_StandAlone=YES + -DVTK_GROUP_ENABLE_Rendering=YES + -DVTK_GROUP_ENABLE_Views=YES + # Disable deps not in VCPKG + -DVTK_USE_TK=OFF # TCL/TK currently not included in vcpkg + # Select modules / groups to install + -DVTK_USE_EXTERNAL:BOOL=ON + -DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps:BOOL=OFF # Not yet in VCPKG + ${ADDITIONAL_OPTIONS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# ============================================================================= +# Fixup target files +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/vtk-9.0) + +# TODO: Check if the following is still required +# For some reason the references to the XDMF libraries in the target files do not end up +# correctly, so we fix them here. +# if(VTK_WITH_ALL_MODULES) + # file(READ ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-release.cmake VTK_TARGETS_RELEASE_CONTENT) + # string(REPLACE "lib/../XdmfCore.lib" "lib/XdmfCore.lib" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}") + # string(REPLACE "bin/../XdmfCore.dll" "bin/XdmfCore.dll" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}") + # string(REPLACE "lib/../vtkxdmf3.lib" "lib/vtkxdmf3.lib" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}") + # string(REPLACE "bin/../vtkxdmf3.dll" "bin/vtkxdmf3.dll" VTK_TARGETS_RELEASE_CONTENT "${VTK_TARGETS_RELEASE_CONTENT}") + # file(WRITE ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-release.cmake "${VTK_TARGETS_RELEASE_CONTENT}") + + # file(READ ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-debug.cmake VTK_TARGETS_DEBUG_CONTENT) + # string(REPLACE "lib/../XdmfCore.lib" "lib/XdmfCore.lib" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}") + # string(REPLACE "bin/../XdmfCore.dll" "bin/XdmfCore.dll" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}") + # string(REPLACE "lib/../vtkxdmf3.lib" "lib/vtkxdmf3.lib" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}") + # string(REPLACE "bin/../vtkxdmf3.dll" "bin/vtkxdmf3.dll" VTK_TARGETS_DEBUG_CONTENT "${VTK_TARGETS_DEBUG_CONTENT}") + # file(WRITE ${CURRENT_PACKAGES_DIR}/share/vtk/VTKTargets-debug.cmake "${VTK_TARGETS_DEBUG_CONTENT}") +# endif() +# ============================================================================= +# Remove other files and directories that are not valid for vcpkg +# if(VTK_WITH_ALL_MODULES) + # file(REMOVE ${CURRENT_PACKAGES_DIR}/XdmfConfig.cmake) + # file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/XdmfConfig.cmake) +# endif() + +# ============================================================================= +# Clean-up other directories + + +# Delete the debug binary TOOL_NAME that is not required +function(_vtk_remove_debug_tool TOOL_NAME) + set(filename ${CURRENT_PACKAGES_DIR}/debug/bin/${TOOL_NAME}${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + if(EXISTS ${filename}) + file(REMOVE ${filename}) + endif() + set(filename ${CURRENT_PACKAGES_DIR}/debug/bin/${TOOL_NAME}d${VCPKG_TARGET_EXECUTABLE_SUFFIX}) + if(EXISTS ${filename}) + file(REMOVE ${filename}) + endif() + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug) + # we also have to bend the lines referencing the tools in VTKTargets-debug.cmake + # to make them point to the release version of the tools + file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTK-targets-debug.cmake" VTK_TARGETS_CONTENT_DEBUG) + string(REPLACE "debug/bin/${TOOL_NAME}" "tools/vtk/${TOOL_NAME}" VTK_TARGETS_CONTENT_DEBUG "${VTK_TARGETS_CONTENT_DEBUG}") + string(REPLACE "tools/vtk/${TOOL_NAME}d" "tools/vtk/${TOOL_NAME}" VTK_TARGETS_CONTENT_DEBUG "${VTK_TARGETS_CONTENT_DEBUG}") + file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTK-targets-debug.cmake" "${VTK_TARGETS_CONTENT_DEBUG}") + endif() +endfunction() + +# Move the release binary TOOL_NAME from bin to tools +function(_vtk_move_release_tool TOOL_NAME) + set(old_filename "${CURRENT_PACKAGES_DIR}/bin/${TOOL_NAME}${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + if(EXISTS ${old_filename}) + file(INSTALL ${old_filename} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/vtk" USE_SOURCE_PERMISSIONS) + file(REMOVE ${old_filename}) + endif() + + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release) + # we also have to bend the lines referencing the tools in VTKTargets-release.cmake + # to make them point to the tool folder + file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/VTK-targets-release.cmake" VTK_TARGETS_CONTENT_RELEASE) + string(REPLACE "bin/${TOOL_NAME}" "tools/vtk/${TOOL_NAME}" VTK_TARGETS_CONTENT_RELEASE "${VTK_TARGETS_CONTENT_RELEASE}") + file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/VTK-targets-release.cmake" "${VTK_TARGETS_CONTENT_RELEASE}") + endif() +endfunction() + +set(VTK_SHORT_VERSION 9.0) +set(VTK_TOOLS + vtkEncodeString-${VTK_SHORT_VERSION} + vtkHashSource-${VTK_SHORT_VERSION} + vtkWrapTclInit-${VTK_SHORT_VERSION} + vtkWrapTcl-${VTK_SHORT_VERSION} + vtkWrapPythonInit-${VTK_SHORT_VERSION} + vtkWrapPython-${VTK_SHORT_VERSION} + vtkWrapJava-${VTK_SHORT_VERSION} + vtkWrapHierarchy-${VTK_SHORT_VERSION} + vtkParseJava-${VTK_SHORT_VERSION} + vtkParseOGLExt-${VTK_SHORT_VERSION} + vtkProbeOpenGLVersion-${VTK_SHORT_VERSION} + vtkTestOpenGLVersion-${VTK_SHORT_VERSION} + vtkpython + pvtkpython +) +# TODO: Replace with vcpkg_copy_tools if known which tools are built with which feature +# or add and option to vcpkg_copy_tools which does not require the tool to be present +foreach(TOOL_NAME IN LISTS VTK_TOOLS) + _vtk_remove_debug_tool("${TOOL_NAME}") + _vtk_move_release_tool("${TOOL_NAME}") +endforeach() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +# ============================================================================= +# Handle copyright +file(INSTALL ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/vtk") + +## Files Modules needed by ParaView +if("paraview" IN_LIST FEATURES) + set(VTK_CMAKE_NEEDED vtkCompilerChecks vtkCompilerPlatformFlags vtkCompilerExtraFlags vtkInitializeBuildType + vtkSupportMacros vtkDirectories vtkVersion FindPythonModules vtkModuleDebugging vtkExternalData) + foreach(module ${VTK_CMAKE_NEEDED}) + file(INSTALL "${SOURCE_PATH}/CMake/${module}.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/vtk") + endforeach() + + ## Check List on UPDATE !! + file(INSTALL "${SOURCE_PATH}/CMake/vtkRequireLargeFilesSupport.cxx" DESTINATION "${CURRENT_PACKAGES_DIR}/share/vtk") + + file(INSTALL "${SOURCE_PATH}/GUISupport/Qt/QVTKOpenGLWidget.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") # Legacy header + + file(INSTALL "${SOURCE_PATH}/Common/Core/vtkRange.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") # this should get installed by VTK + file(INSTALL "${SOURCE_PATH}/Common/Core/vtkRangeIterableTraits.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") # this should get installed by VTK + file(INSTALL "${SOURCE_PATH}/Common/DataModel/vtkCompositeDataSetNodeReference.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") # this should get installed by VTK + #ParaView requires some internal headers + file(INSTALL "${SOURCE_PATH}/Rendering/Annotation/vtkScalarBarActorInternal.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") + file(INSTALL "${SOURCE_PATH}/Filters/Statistics/vtkStatisticsAlgorithmPrivate.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") + file(INSTALL "${SOURCE_PATH}/Rendering/OpenGL2/vtkCompositePolyDataMapper2Internal.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") + file(INSTALL "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Rendering/OpenGL2/vtkTextureObjectVS.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}") +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + if(EXISTS ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/CMakeFiles/vtkpythonmodules/static_python) #python headers + file(GLOB_RECURSE STATIC_PYTHON_FILES "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/CMakeFiles/*/static_python/*.h") + file(INSTALL ${STATIC_PYTHON_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/vtk-${VTK_SHORT_VERSION}) + endif() +endif() + +#remove one get_filename_component(_vtk_module_import_prefix "${_vtk_module_import_prefix}" DIRECTORY) from vtk-prefix.cmake and VTK-vtk-module-properties and vtk-python.cmake +set(filenames_fix_prefix vtk-prefix VTK-vtk-module-properties vtk-python) +foreach(name IN LISTS filenames_fix_prefix) +if(EXISTS "${CURRENT_PACKAGES_DIR}/share/vtk/${name}.cmake") + file(READ "${CURRENT_PACKAGES_DIR}/share/vtk/${name}.cmake" _contents) + string(REPLACE +[[set(_vtk_module_import_prefix "${CMAKE_CURRENT_LIST_DIR}") +get_filename_component(_vtk_module_import_prefix "${_vtk_module_import_prefix}" DIRECTORY)]] +[[set(_vtk_module_import_prefix "${CMAKE_CURRENT_LIST_DIR}")]] _contents "${_contents}") + file(WRITE "${CURRENT_PACKAGES_DIR}/share/vtk/${name}.cmake" "${_contents}") +else() + debug_message("FILE:${CURRENT_PACKAGES_DIR}/share/vtk/${name}.cmake does not exist! No prefix correction!") +endif() +endforeach() diff --git a/vcpkg/ports/vtk/python_debug.patch b/vcpkg/ports/vtk/python_debug.patch new file mode 100644 index 0000000..6b69d80 --- /dev/null +++ b/vcpkg/ports/vtk/python_debug.patch @@ -0,0 +1,13 @@ +diff --git a/CMake/patches/3.18/FindPython/Support.cmake b/CMake/patches/3.18/FindPython/Support.cmake +index 0879537ed..122e7228d 100644 +--- a/CMake/patches/3.18/FindPython/Support.cmake ++++ b/CMake/patches/3.18/FindPython/Support.cmake +@@ -2253,7 +2257,7 @@ if (("Development.Module" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS + NAMES ${_${_PYTHON_PREFIX}_LIB_NAMES_DEBUG} + NAMES_PER_DIR + HINTS "${_${_PYTHON_PREFIX}_PATH}" ${_${_PYTHON_PREFIX}_HINTS} +- NO_DEFAULT_PATH) ++ ) + endif() + + # retrieve runtime libraries diff --git a/vcpkg/ports/vtk/pythonwrapper.patch b/vcpkg/ports/vtk/pythonwrapper.patch new file mode 100644 index 0000000..6cdd416 --- /dev/null +++ b/vcpkg/ports/vtk/pythonwrapper.patch @@ -0,0 +1,19 @@ +diff --git a/CMake/vtkModuleWrapPython.cmake b/CMake/vtkModuleWrapPython.cmake +index 5d2c2e1bf..e33a16d68 100644 +--- a/CMake/vtkModuleWrapPython.cmake ++++ b/CMake/vtkModuleWrapPython.cmake +@@ -152,11 +152,14 @@ function (_vtk_module_wrap_python_sources module sources classes) + set(_vtk_python_genex_compile_definitions + "$") + set(_vtk_python_genex_include_directories + "$") ++ set(_vtk_python_genex_interface_include_directories ++ "$") + file(GENERATE + OUTPUT "${_vtk_python_args_file}" + CONTENT "$<$:\n-D\'$\'>\n + $<$:\n-I\'$\'>\n ++$<$:\n-I\'$\'>\n + $<$:\n--types \'$\'>\n") + + set(_vtk_python_sources) diff --git a/vcpkg/ports/vtk/vtkm.patch b/vcpkg/ports/vtk/vtkm.patch new file mode 100644 index 0000000..27b7f40 --- /dev/null +++ b/vcpkg/ports/vtk/vtkm.patch @@ -0,0 +1,141 @@ +diff --git a/Accelerators/Vtkm/CMakeLists.txt b/Accelerators/Vtkm/CMakeLists.txt +index 4297575bd..643df6fd5 100644 +--- a/Accelerators/Vtkm/CMakeLists.txt ++++ b/Accelerators/Vtkm/CMakeLists.txt +@@ -14,8 +14,10 @@ + ## + ##============================================================================= + +-list(INSERT 0 CMAKE_MODULE_PATH +- "${VTK_SOURCE_DIR}/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake") ++find_package(VTKm CONFIG REQUIRED) ++ ++#list(INSERT 0 CMAKE_MODULE_PATH ++# "${VTK_SOURCE_DIR}/ThirdParty/vtkm/vtkvtkm/vtk-m/CMake") + + set(sources + vtkmlib/ArrayConvertersReal.cxx +diff --git a/Accelerators/Vtkm/CMakeLists.txt b/Accelerators/Vtkm/CMakeLists.txt +index a01a6bda3..889c87ebb 100644 +--- a/Accelerators/Vtkm/CMakeLists.txt ++++ b/Accelerators/Vtkm/CMakeLists.txt +@@ -126,9 +126,9 @@ vtkm_add_target_information(${vtkm_accel_target} + MODIFY_CUDA_FLAGS + DEVICE_SOURCES ${sources}) + +-vtk_module_set_property(VTK::AcceleratorsVTKm +- PROPERTY JOB_POOL_COMPILE +- VALUE vtkm_pool) ++#vtk_module_set_property(VTK::AcceleratorsVTKm ++# PROPERTY JOB_POOL_COMPILE ++# VALUE vtkm_pool) + vtk_module_link(VTK::AcceleratorsVTKm + PRIVATE + vtkm_worklet +diff --git a/CMake/FindVTKm.cmake b/CMake/FindVTKm.cmake +new file mode 100644 +index 000000000..c0fe00c0e +--- /dev/null ++++ b/CMake/FindVTKm.cmake +@@ -0,0 +1 @@ ++find_package(VTKm CONFIG REQUIRED) +\ No newline at end of file +diff --git a/CMake/vtkCompilerPlatformFlags.cmake b/CMake/vtkCompilerPlatformFlags.cmake +index b0bdba1e6..69c570a25 100644 +--- a/CMake/vtkCompilerPlatformFlags.cmake ++++ b/CMake/vtkCompilerPlatformFlags.cmake +@@ -107,7 +107,7 @@ if(MSVC) + if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]") + STRING(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + else() +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /bigobj") + endif() + endif() + +diff --git a/ThirdParty/vtkm/CMakeLists.txt b/ThirdParty/vtkm/CMakeLists.txt +index 5817d42f8..bc5a33d93 100644 +--- a/ThirdParty/vtkm/CMakeLists.txt ++++ b/ThirdParty/vtkm/CMakeLists.txt +@@ -1,6 +1,47 @@ +-vtk_module_third_party_internal( +- LICENSE_FILES "vtkvtkm/vtk-m/LICENSE.txt" +- VERSION "master" +- SUBDIRECTORY vtkvtkm +- STANDARD_INCLUDE_DIRS +- INTERFACE) ++#vtk_module_third_party_internal( ++# LICENSE_FILES "vtkvtkm/vtk-m/LICENSE.txt" ++# VERSION "master" ++# SUBDIRECTORY vtkvtkm ++# STANDARD_INCLUDE_DIRS ++# INTERFACE) ++ ++message(STATUS "VTK_MODULE_USE_EXTERNAL_VTK_vtkm: ${VTK_MODULE_USE_EXTERNAL_VTK_vtkm}") ++if(TRUE) ++ message(STATUS "Searching for external VTKm") ++ find_package(VTKm CONFIG REQUIRED) ++ if(TARGET vtkm_compiler_flags) ++ get_target_property(VTKm_INCLUDE_DIRS vtkm_compiler_flags INTERFACE_INCLUDE_DIRECTORIES) ++ message(STATUS "INCLUDE: ${VTKm_INCLUDE_DIRS}") ++ get_target_property(VTKm_DIY_INCLUDE_DIRS vtkm_diy INTERFACE_INCLUDE_DIRECTORIES) ++ get_target_property(VTKm_OPTION_INCLUDE_DIRS vtkm_optionparser INTERFACE_INCLUDE_DIRECTORIES) ++ get_target_property(VTKm_TAO_INCLUDE_DIRS vtkm_taotuple INTERFACE_INCLUDE_DIRECTORIES) ++ if(MSVC) ++ set(VTKm_DEFINITIONS /bigobj) ++ endif() ++ else() ++ message(FATAL_ERROR "VTKM target missing") ++ endif() ++ if(VTKM_FOUND) ++ message(STATUS "Found VTKm") ++ endif() ++endif() ++ ++vtk_module_third_party( ++ INTERNAL ++ HEADER_ONLY ++ LICENSE_FILES "vtkvtkm/vtk-m/LICENSE.txt" ++ VERSION "master" ++ SUBDIRECTORY vtkvtkm ++ STANDARD_INCLUDE_DIRS ++ INTERFACE ++ EXTERNAL ++ PACKAGE VTKm ++ TARGETS vtkm_cont vtkm_filter vtkm_diy vtkm_optionparser vtkm_taotuple ++ #LIBRARIES vtkm_cont vtkm_filter vtkm_diy vtkm_optionparser vtkm_taotuple ++ INCLUDE_DIRS VTKm_INCLUDE_DIRS VTKm_DIY_INCLUDE_DIRS VTKm_OPTION_INCLUDE_DIRS VTKm_TAO_INCLUDE_DIRS) ++# configure_file( ++ # "${CMAKE_CURRENT_SOURCE_DIR}/vtk_utf8.h.in" ++ # "${CMAKE_CURRENT_BINARY_DIR}/vtk_utf8.h") ++ ++# vtk_module_install_headers( ++ # FILES "${CMAKE_CURRENT_BINARY_DIR}/vtk_utf8.h") +diff --git a/ThirdParty/vtkm/vtk.module b/ThirdParty/vtkm/vtk.module +index a8e4dad0f..c7bbbf0e8 100644 +--- a/ThirdParty/vtkm/vtk.module ++++ b/ThirdParty/vtkm/vtk.module +@@ -3,5 +3,7 @@ NAME + PRIVATE_DEPENDS + # While not needed to satisfy symbols, this is necessary to guarantee that + # VTK_SMP_IMPLEMENTATION_TYPE is available when configuring vtk-m. +- VTK::CommonCore ++ # VTK::CommonCore ++LIBRARY_NAME ++ VTKm + THIRD_PARTY +diff --git a/CMake/vtk-config.cmake.in b/CMake/vtk-config.cmake.in +index 1ecfde326..ae5576e66 100644 +--- a/CMake/vtk-config.cmake.in ++++ b/CMake/vtk-config.cmake.in +@@ -114,9 +114,7 @@ set("${CMAKE_FIND_PACKAGE_NAME}_AVAILABLE_COMPONENTS" "@vtk_all_components@") + unset("${CMAKE_FIND_PACKAGE_NAME}_FOUND") + set("${CMAKE_FIND_PACKAGE_NAME}_HAS_VTKm" "@vtk_has_vtkm@") + if (${CMAKE_FIND_PACKAGE_NAME}_HAS_VTKm) +- find_package(VTKm +- PATHS "${CMAKE_CURRENT_LIST_DIR}/vtkm" +- NO_DEFAULT_PATH) ++ find_package(VTKm CONFIG REQUIRED) + if (NOT VTKm_FOUND) + set("${CMAKE_FIND_PACKAGE_NAME}_FOUND" 0) + endif () diff --git a/vcpkg/ports/vulkan-hpp/CONTROL b/vcpkg/ports/vulkan-hpp/CONTROL new file mode 100644 index 0000000..2449918 --- /dev/null +++ b/vcpkg/ports/vulkan-hpp/CONTROL @@ -0,0 +1,4 @@ +Source: vulkan-hpp +Version: 2019-05-11-1 +Description: Header only C++ bindings for the Vulkan C API +Build-Depends: vulkan diff --git a/vcpkg/ports/vulkan-hpp/portfile.cmake b/vcpkg/ports/vulkan-hpp/portfile.cmake new file mode 100644 index 0000000..809b814 --- /dev/null +++ b/vcpkg/ports/vulkan-hpp/portfile.cmake @@ -0,0 +1,16 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO KhronosGroup/Vulkan-Hpp + REF 5ce8ae7fd0d9c0543d02f33cfa8a66e6a43e2150 + SHA512 dc58332f5075f0b4d001abd4e78664be099509b8cee525a211aa33599f2351bf5e200fef37dccc84895d8f7a056f075ae3cf404f9aac7281970ff903e4a67a96 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/vulkan/vulkan.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include/vulkan) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/vulkan-memory-allocator/CONTROL b/vcpkg/ports/vulkan-memory-allocator/CONTROL new file mode 100644 index 0000000..85976c0 --- /dev/null +++ b/vcpkg/ports/vulkan-memory-allocator/CONTROL @@ -0,0 +1,3 @@ +Source: vulkan-memory-allocator +Version: 2.3.0 +Description: Easy to integrate Vulkan memory allocation library from GPUOpen diff --git a/vcpkg/ports/vulkan-memory-allocator/portfile.cmake b/vcpkg/ports/vulkan-memory-allocator/portfile.cmake new file mode 100644 index 0000000..3444181 --- /dev/null +++ b/vcpkg/ports/vulkan-memory-allocator/portfile.cmake @@ -0,0 +1,15 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator + REF v2.3.0+vs2017 + SHA512 57113c52dcccc4df79ebf36f091f1232f68ee45c48934a5b91c2d87b5599d8c176ca7a47e285ddf146ec0b3c83db5808c2e6c3f6e1b453e20a8525f73211bf8d + HEAD_REF master +) + +file(COPY "${SOURCE_PATH}/src/vk_mem_alloc.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include") + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/unofficial-vulkan-memory-allocator-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/unofficial-vulkan-memory-allocator) + +configure_file(${SOURCE_PATH}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/vulkan-memory-allocator/copyright COPYONLY) diff --git a/vcpkg/ports/vulkan-memory-allocator/unofficial-vulkan-memory-allocator-config.cmake b/vcpkg/ports/vulkan-memory-allocator/unofficial-vulkan-memory-allocator-config.cmake new file mode 100644 index 0000000..fc9f625 --- /dev/null +++ b/vcpkg/ports/vulkan-memory-allocator/unofficial-vulkan-memory-allocator-config.cmake @@ -0,0 +1,8 @@ + +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) + +add_library(unofficial::vulkan-memory-allocator::vulkan-memory-allocator INTERFACE IMPORTED) +set_target_properties(unofficial::vulkan-memory-allocator::vulkan-memory-allocator PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include") +set(_IMPORT_PREFIX) diff --git a/vcpkg/ports/vulkan/CONTROL b/vcpkg/ports/vulkan/CONTROL new file mode 100644 index 0000000..2d4947d --- /dev/null +++ b/vcpkg/ports/vulkan/CONTROL @@ -0,0 +1,3 @@ +Source: vulkan +Version: 1.1.82.1-1 +Description: A graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs on a wide variety of devices. \ No newline at end of file diff --git a/vcpkg/ports/vulkan/LICENSE.txt b/vcpkg/ports/vulkan/LICENSE.txt new file mode 100644 index 0000000..af642b9 --- /dev/null +++ b/vcpkg/ports/vulkan/LICENSE.txt @@ -0,0 +1,726 @@ +/* +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of this License; and +You must cause any modified files to carry prominent notices stating that You changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. +You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +=============================================================================================================================================== + +/Copyright (C) 2012 LunarG, Inc. +//All rights reserved. +// +//Redistribution and use in source and binary forms, with or without +//modification, are permitted provided that the following conditions +//are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// +// Neither the name of LunarG Inc. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +//POSSIBILITY OF SUCH DAMAGE. + +=============================================================================================================================================== + +#============================================================================= +# Copyright 2007-2009 Kitware, Inc. +# Copyright 2007-2008 Miguel A. Figueroa-Villanueva +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright_cmake.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distributed this file outside of CMake, substitute the full +# License text for the above reference.) + + +============================================================================================================================================== + +// +// Copyright (C) 2015-2018 Google, Inc. +// Copyright (C) +// +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following +// disclaimer in the documentation and/or other materials provided +// with the distribution. +// +// Neither the name of 3Dlabs Inc. Ltd. nor the names of its +// contributors may be used to endorse or promote products derived +// from this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// + +========================================================================================================================================== + +Note: This license has also been called the "New BSD License" or "Modified BSD License". See also the 2-clause BSD License. +Copyright +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +========================================================================================================================================== + +/* +* xxHash - Fast Hash algorithm +* Copyright (C) 2012-2016, Yann Collet +* +* BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are +* met: +* +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above +* copyright notice, this list of conditions and the following disclaimer +* in the documentation and/or other materials provided with the +* distribution. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +* You can contact the author at : +* - xxHash homepage: http://www.xxhash.com +* - xxHash source repository : https://github.com/Cyan4973/xxHash +*/ + + +=========================================================================================================================================== + +# Copyright (C) 2018 Google, Inc. +# +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# +# Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +========================================================================================================================================== + +/* A Bison parser, made by GNU Bison 3.0.4. */ + +/* Bison implementation for Yacc-like parsers in C +Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains +part or all of the Bison parser skeleton and distribute that work +under terms of your choice, so long as that work isn't itself a +parser generator using the skeleton or a modified version thereof +as a parser skeleton. Alternatively, if you modify or redistribute +the parser skeleton itself, you may (at your option) remove this +special exception, which will cause the skeleton and the resulting +Bison output files to be licensed under the GNU General Public +License without this special exception. +This special exception was added by the Free Software Foundation in +version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by +simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid +infringing on user name space. This should be done even for local +variables, as they might otherwise be expanded by user macros. +There are some unavoidable exceptions within include files to +define necessary library symbols; they are noted "INFRINGES ON +USER NAME SPACE" below. */ + +============================================================================================================================================== + +copyright : [ +Copyright (c) 2017 The Khronos Group Inc., +, +Permission is hereby granted, free of charge, to any person obtaining a copy, +of this software and/or associated documentation files (the \Materials\"),", +to deal in the Materials without restriction, including without limitation, +the rights to use, copy, modify, merge, publish, distribute, sublicense,, +and/or sell copies of the Materials, and to permit persons to whom the, +Materials are furnished to do so, subject to the following conditions:, +, +The above copyright notice and this permission notice shall be included in, +all copies or substantial portions of the Materials., +, +MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS, +STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND, +HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ , +, +THE MATERIALS ARE PROVIDED \AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS", +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL, +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER, +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING, +FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS, +IN THE MATERIALS. + +============================================================================================================================================= + +CMake - Cross Platform Makefile Generator +Copyright 2000-2009 Kitware, Inc., Insight Software Consortium +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +* Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +* Neither the names of Kitware, Inc., the Insight Software Consortium, +nor the names of their contributors may be used to endorse or promote +products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +------------------------------------------------------------------------------ + +The above copyright and license notice applies to distributions of +CMake in source and binary form. Some source files contain additional +notices of original copyright by their contributors; see each source +for details. Third-party software packages supplied with CMake under +compatible licenses provide their own copyright notices documented in +corresponding subdirectories. + +------------------------------------------------------------------------------ + +CMake was initially developed by Kitware with the following sponsorship: + +* National Library of Medicine at the National Institutes of Health +as part of the Insight Segmentation and Registration Toolkit (ITK). + +* US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel +Visualization Initiative. + +* National Alliance for Medical Image Computing (NAMIC) is funded by the +National Institutes of Health through the NIH Roadmap for Medical Research, +Grant U54 EB005149. + +* Kitware, Inc. + +======================================================================================================================================== + +The authors of this software are Rob Pike and Ken Thompson. +* Copyright (c) 2002 by Lucent Technologies. +* Permission to use, copy, modify, and distribute this software for any +* purpose without fee is hereby granted, provided that this entire notice +* is included in all copies of any software which is or includes a copy +* or modification of this software and in all copies of the supporting +* documentation for such software. +* THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED +* WARRANTY. IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES MAKE ANY +* REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY +* OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. + + +======================================================================================================================================== + +Copyright (c) 2015-2018 Baldur Karlsson + +Copyright (c) 2014 Crytek + +Copyright (c) 1998-2018 Third party code and tools + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +========================================================================================================================================= + +/* +Copyright (c) 2009 Dave Gamble +Copyright (c) 2015-2016 The Khronos Group Inc. +Copyright (c) 2015-2016 Valve Corporation +Copyright (c) 2015-2016 LunarG, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ + +=========================================================================================================================================== + +Copyright (c) 2005 - 2017 G-Truc Creation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + + +========================================================================================================================================== + +/* +The JsonCpp library's source code, including accompanying documentation, +tests and demonstration applications, are licensed under the following +conditions... +The author (Baptiste Lepilleur) explicitly disclaims copyright in all +jurisdictions which recognize such a disclaimer. In such jurisdictions, +this software is released into the Public Domain. +In jurisdictions which do not recognize Public Domain property (e.g. Germany as of +2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is +released under the terms of the MIT License (see below). +In jurisdictions which recognize Public Domain property, the user of this +software may choose to accept it either as 1) Public Domain, 2) under the +conditions of the MIT License (see below), or 3) under the terms of dual +Public Domain/MIT License conditions described here, as they choose. +The MIT License is about as close to Public Domain as a license can get, and is +described in clear, concise terms at: +http://en.wikipedia.org/wiki/MIT_License + +The full text of the MIT License follows: + +Copyright (c) 2007-2010 Baptiste Lepilleur +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +========================================================================================================================================== + +/** +* `murmurhash.h' - murmurhash +* +* copyright (c) 2014 joseph werle +* Copyright (c) 2015-2016 The Khronos Group Inc. +* Copyright (c) 2015-2016 Valve Corporation +* Copyright (c) 2015-2016 LunarG, Inc. +* +* Permission is hereby granted, free of charge, to any person obtaining a copy +* of this software and/or associated documentation files (the "Materials"), to +* deal in the Materials without restriction, including without limitation the +* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +* sell copies of the Materials, and to permit persons to whom the Materials are +* furnished to do so, subject to the following conditions: +* +* The above copyright notice(s) and this permission notice shall be included in +* all copies or substantial portions of the Materials. +* +* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +* +* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE +* USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +========================================================================================================================================= + +Licenced as X11: http://www.kryogenix.org/code/browser/licence.html +This basically means: do what you want with it. + +========================================================================================================================================= + +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/common.hpp +/// @date 2013-12-24 / 2013-12-24 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + + +========================================================================================================================================== + +// LICENSE +// +// This software is in the public domain. Where that dedication is not +// recognized, you are granted a perpetual, irrevocable license to copy, +// distribute, and modify this file as you see fit. +// + +========================================================================================================================================== + +Simple DirectMedia Layer +Copyright (C) 1997-2018 Sam Lantinga + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not +claim that you wrote the original software. If you use this software +in a product, an acknowledgment in the product documentation would be +appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be +misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + +========================================================================================================================================= + +/****************************************************************************\ +Copyright (c) 2002, NVIDIA Corporation. + +NVIDIA Corporation("NVIDIA") supplies this software to you in +consideration of your agreement to the following terms, and your use, +installation, modification or redistribution of this NVIDIA software +constitutes acceptance of these terms. If you do not agree with these +terms, please do not use, install, modify or redistribute this NVIDIA +software. + +In consideration of your agreement to abide by the following terms, and +subject to these terms, NVIDIA grants you a personal, non-exclusive +license, under NVIDIA's copyrights in this original NVIDIA software (the +NVIDIA Software), to use, reproduce, modify and redistribute the +NVIDIA Software, with or without modifications, in source and/or binary +forms; provided that if you redistribute the NVIDIA Software, you must +retain the copyright notice of NVIDIA, this notice and the following +text and disclaimers in all such redistributions of the NVIDIA Software. +Neither the name, trademarks, service marks nor logos of NVIDIA +Corporation may be used to endorse or promote products derived from the +NVIDIA Software without specific prior written permission from NVIDIA. +Except as expressly stated in this notice, no other rights or licenses +express or implied, are granted by NVIDIA herein, including but not +limited to any patent rights that may be infringed by your derivative +works or by other works in which the NVIDIA Software may be +incorporated. No hardware is licensed hereunder. + +THE NVIDIA SOFTWARE IS BEING PROVIDED ON AN "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, +INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR +ITS USE AND OPERATION EITHER ALONE OR IN COMBINATION WITH OTHER +PRODUCTS. + +IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, +INCIDENTAL, EXEMPLARY, CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +TO, LOST PROFITS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) OR ARISING IN ANY WAY +OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE +NVIDIA SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, +TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF +NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +\****************************************************************************/ + +================================================================================================================================================== + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. + + +================================================================================================================================================== + +GNU LESSER GENERAL PUBLIC LICENSE +Version 3, 29 June 2007 + +Copyright (C) 2007 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. + +0. Additional Definitions. + +As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. + +"The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. + +An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. + +A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". + +The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. + +The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. + +1. Exception to Section 3 of the GNU GPL. + +You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. + +2. Conveying Modified Versions. + +If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: + +a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or +b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. +3. Object Code Incorporating Material from Library Header Files. + +The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: + +a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. +b) Accompany the object code with a copy of the GNU GPL and this license document. +4. Combined Works. + +You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: + +a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. +b) Accompany the Combined Work with a copy of the GNU GPL and this license document. +c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. +d) Do one of the following: +0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. +1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. +e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) +5. Combined Libraries. + +You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: + +a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. +b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. +6. Revised Versions of the GNU Lesser General Public License. + +The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. + +If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. diff --git a/vcpkg/ports/vulkan/portfile.cmake b/vcpkg/ports/vulkan/portfile.cmake new file mode 100644 index 0000000..5035acd --- /dev/null +++ b/vcpkg/ports/vulkan/portfile.cmake @@ -0,0 +1,44 @@ +# Due to the complexity involved, this package doesn't install the Vulkan SDK. +# It instead verifies that Vulkan is installed. +# Other packages can depend on this package to declare a dependency on Vulkan. +include(vcpkg_common_functions) + +message(STATUS "Querying VULKAN_SDK Enviroment variable") +file(TO_CMAKE_PATH "$ENV{VULKAN_SDK}" VULKAN_DIR) +set(VULKAN_INCLUDE "${VULKAN_DIR}/include/vulkan/") +set(VULKAN_ERROR_DL "Before continuing, please download and install Vulkan from:\n https://vulkan.lunarg.com/sdk/home\nIf you have already downloaded it, make sure the VULKAN_SDK environment variable is set to vulkan's installation root.") + +if(NOT DEFINED ENV{VULKAN_SDK}) + message(FATAL_ERROR "Could not find Vulkan SDK. ${VULKAN_ERROR_DL}") +endif() + +message(STATUS "Searching " ${VULKAN_INCLUDE} " for vulkan.h") +if(NOT EXISTS "${VULKAN_INCLUDE}/vulkan.h") + message(FATAL_ERROR "Could not find vulkan.h. ${VULKAN_ERROR_DL}") +endif() +message(STATUS "Found vulkan.h") + +# Check if the user left the version in the installation directory e.g. c:/vulkanSDK/1.1.82.1/ +if(VULKAN_DIR MATCHES "(([0-9]+)\\.([0-9]+)\\.([0-9]+)\\.([0-9]+))") + set(VULKAN_VERSION "${CMAKE_MATCH_1}") + set(VULKAN_MAJOR "${CMAKE_MATCH_2}") + set(VULKAN_MINOR "${CMAKE_MATCH_3}") + set(VULKAN_PATCH "${CMAKE_MATCH_4}") + message(STATUS "Found Vulkan SDK version ${VULKAN_VERSION}") + + set(VULKAN_REQUIRED_VERSION "1.1.82.1") + if (VULKAN_MAJOR LESS 1 OR VULKAN_MINOR LESS 1 OR VULKAN_PATCH LESS 82) + message(FATAL_ERROR "Vulkan ${VULKAN_VERSION} but ${VULKAN_REQUIRED_VERSION} is required. Please download and install a more recent version from:" + "\n https://vulkan.lunarg.com/sdk/home\n") + endif() +endif() + +if (EXISTS ${VULKAN_DIR}/../LICENSE.txt) + configure_file(${VULKAN_DIR}/../LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/vulkan/copyright COPYONLY) +elseif(EXISTS ${VULKAN_DIR}/LICENSE.txt) + configure_file(${VULKAN_DIR}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/vulkan/copyright COPYONLY) +else() + configure_file(${CURRENT_PORT_DIR}/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/vulkan/copyright COPYONLY) +endif() + +SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/vcpkg/ports/vulkan/usage b/vcpkg/ports/vulkan/usage new file mode 100644 index 0000000..62130b8 --- /dev/null +++ b/vcpkg/ports/vulkan/usage @@ -0,0 +1,9 @@ +The package vulkan does not provide cmake or visual studio integration directly. +However, it can still easily be used. + + Visual Studio: + Include $(VULKAN_SDK)/include to your include path. + + CMake: + find_package(Vulkan REQUIRED) + target_link_libraries(main PRIVATE Vulkan::Vulkan) diff --git a/vcpkg/ports/vxl/CONTROL b/vcpkg/ports/vxl/CONTROL new file mode 100644 index 0000000..4e6ba9d --- /dev/null +++ b/vcpkg/ports/vxl/CONTROL @@ -0,0 +1,8 @@ +Source: vxl +Version: 2.0.2 +Port-Version: 2 +Build-Depends: bzip2, expat, libgeotiff, libjpeg-turbo, libpng, shapelib, tiff, zlib +Description: A multi-platform collection of C++ software libraries for Computer Vision and Image Understanding. + +Feature: core-imaging +Description: core-imaging support for vxl diff --git a/vcpkg/ports/vxl/fix_dependency.patch b/vcpkg/ports/vxl/fix_dependency.patch new file mode 100644 index 0000000..88cecfd --- /dev/null +++ b/vcpkg/ports/vxl/fix_dependency.patch @@ -0,0 +1,13 @@ +diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt +index 3483f9c..57e149b 100644 +--- a/core/CMakeLists.txt ++++ b/core/CMakeLists.txt +@@ -100,7 +100,7 @@ endif() + + + # coordinate systems +-if(VXL_BUILD_CORE_GEOMETRY AND VXL_BUILD_CORE_NUMERICS) ++if(VXL_BUILD_CORE_GEOMETRY AND VXL_BUILD_CORE_NUMERICS AND VXL_BUILD_CORE_IMAGING) + add_subdirectory(vcsl) + add_subdirectory(vpgl) + endif() diff --git a/vcpkg/ports/vxl/portfile.cmake b/vcpkg/ports/vxl/portfile.cmake new file mode 100644 index 0000000..c3124ce --- /dev/null +++ b/vcpkg/ports/vxl/portfile.cmake @@ -0,0 +1,56 @@ +set(VXL_BUILD_CORE_IMAGING OFF) +if("core-imaging" IN_LIST FEATURES) + set(VXL_BUILD_CORE_IMAGING ON) + if(EXISTS "${CURRENT_INSTALLED_DIR}/include/openjpeg.h") + set(VXL_BUILD_CORE_IMAGING OFF) + message(WARNING "Can't build VXL CORE_IMAGING features with non built-in OpenJpeg. Please remove OpenJpeg, and try install VXL again if you need them.") + endif() +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO vxl/vxl + REF dac1c7ed8e183e9c6de8b928c8b0294a7bd1d8ee # v2.0.2 + SHA512 4c6f6dcd793a50cbbc9c7f61c561ed4a747ded67e3dceb09792998c0f0d4294445a441fed668d59297560f196274b1c25593ce67b0aa7597cbb773328e8612c0 + HEAD_REF master + PATCHES + fix_dependency.patch +) + +set(USE_WIN_WCHAR_T OFF) +if(VCPKG_TARGET_IS_WINDOWS) + set(USE_WIN_WCHAR_T ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DVXL_BUILD_EXAMPLES=OFF + -DBUILD_TESTING=OFF + -DVXL_BUILD_CORE_IMAGING=${VXL_BUILD_CORE_IMAGING} + -DVXL_FORCE_V3P_BZLIB2=OFF + -DVXL_USING_NATIVE_BZLIB2=TRUE # for disable build built-in bzip2 (v3p/bzlib/CMakeLists.txt#L10-L26) + -DVXL_FORCE_V3P_CLIPPER=ON # TODO : need add clipper port to turn off + -DVXL_FORCE_V3P_DCMTK=OFF + -DVXL_FORCE_V3P_GEOTIFF=OFF + -DVXL_FORCE_V3P_J2K=OFF + -DVXL_FORCE_V3P_JPEG=OFF + -DVXL_FORCE_V3P_OPENJPEG2=ON # TODO : need fix compile error when using openjpeg port to turn off + -DVXL_FORCE_V3P_PNG=OFF + -DVXL_FORCE_V3P_TIFF=OFF + -DVXL_FORCE_V3P_ZLIB=OFF + -DVXL_USE_DCMTK=OFF # TODO : need fix dcmtk support to turn on + -DVXL_USE_GEOTIFF=ON + -DVXL_USE_WIN_WCHAR_T=${USE_WIN_WCHAR_T} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH share/vxl/cmake) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/core/vxl_copyright.h DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/wampcc/CONTROL b/vcpkg/ports/wampcc/CONTROL new file mode 100644 index 0000000..5231107 --- /dev/null +++ b/vcpkg/ports/wampcc/CONTROL @@ -0,0 +1,10 @@ +Source: wampcc +Build-Depends: openssl, libuv, jansson +Version: 2019-09-04 +Description: Wampcc is C++ library that implements the Web Application Messaging Protocol (WAMP) protocol. + +Feature: utils +Description: Build utility apps + +Feature: examples +Description: Build example apps \ No newline at end of file diff --git a/vcpkg/ports/wampcc/portfile.cmake b/vcpkg/ports/wampcc/portfile.cmake new file mode 100644 index 0000000..b9e4e1d --- /dev/null +++ b/vcpkg/ports/wampcc/portfile.cmake @@ -0,0 +1,53 @@ +include(vcpkg_common_functions) + +if (VCPKG_TARGET_IS_WINDOWS) + message("Shared build is broken under Windows. See https://github.com/darrenjs/wampcc/issues/57") + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(BUILD_ARCH "Win32") +elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(BUILD_ARCH "x64") +elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(BUILD_ARCH "ARM") +else() + message(FATAL_ERROR "Unsupported architecture: ${VCPKG_TARGET_ARCHITECTURE}") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO darrenjs/wampcc + REF 43d10a7ccf37ec1b895742712dd4a05577b73ff1 + SHA512 e830d26de00e8f5f378145f06691cb16121c40d3bd2cd663fad9a97db37251a11b56053178b619e3a2627f0cd518b6290a8381b26e517a9f16f0246d2f91958e + HEAD_REF master +) + +# Utils build is broken under Windows +if ("utils" IN_LIST FEATURES) + if (VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "'utils' build is broken under Windows") + endif() + + set(ENABLE_UTILS ON) +else() + set(ENABLE_UTILS OFF) +endif() + +if ("examples" IN_LIST FEATURES) + set(ENABLE_EXAMPLES ON) +else() + set(ENABLE_EXAMPLES OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DBUILD_UTILS:BOOL=${ENABLE_UTILS} + -DBUILD_EXAMPLES:BOOL=${ENABLE_EXAMPLES} + -DBUILD_TESTS:BOOL=OFF # Tests build is broken +) +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/wampcc RENAME copyright) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) diff --git a/vcpkg/ports/wangle/CONTROL b/vcpkg/ports/wangle/CONTROL new file mode 100644 index 0000000..f550428 --- /dev/null +++ b/vcpkg/ports/wangle/CONTROL @@ -0,0 +1,4 @@ +Source: wangle +Version: 2020.02.03.00 +Build-Depends: fizz, folly, openssl, glog, libevent, double-conversion, boost-system, boost-thread, boost-filesystem, boost-regex, boost-context +Description: Wangle is a framework providing a set of common client/server abstractions for building services in a consistent, modular, and composable way. diff --git a/vcpkg/ports/wangle/build.patch b/vcpkg/ports/wangle/build.patch new file mode 100644 index 0000000..13b85b0 --- /dev/null +++ b/vcpkg/ports/wangle/build.patch @@ -0,0 +1,12 @@ +diff --git a/wangle/CMakeLists.txt b/wangle/CMakeLists.txt +index 15dc8b6..ed8c79b 100644 +--- a/wangle/CMakeLists.txt ++++ b/wangle/CMakeLists.txt +@@ -123,6 +123,7 @@ target_include_directories( + PUBLIC + $ + $ ++ PRIVATE + ${FIZZ_INCLUDE_DIR} + ${FOLLY_INCLUDE_DIR} + ${Boost_INCLUDE_DIR} diff --git a/vcpkg/ports/wangle/fix-config-cmake.patch b/vcpkg/ports/wangle/fix-config-cmake.patch new file mode 100644 index 0000000..6685747 --- /dev/null +++ b/vcpkg/ports/wangle/fix-config-cmake.patch @@ -0,0 +1,19 @@ +diff --git a/wangle/cmake/wangle-config.cmake.in b/wangle/cmake/wangle-config.cmake.in +index e50af54..a16cdbb 100644 +--- a/wangle/cmake/wangle-config.cmake.in ++++ b/wangle/cmake/wangle-config.cmake.in +@@ -12,7 +12,13 @@ + @PACKAGE_INIT@ + + set_and_check(WANGLE_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") +-set_and_check(WANGLE_CMAKE_DIR "@PACKAGE_CMAKE_INSTALL_DIR@") ++set_and_check(WANGLE_CMAKE_DIR "${PACKAGE_PREFIX_DIR}/share/wangle") ++ ++find_package(folly CONFIG REQUIRED) ++find_package(fizz CONFIG REQUIRED) ++find_package(glog REQUIRED) ++find_package(Threads REQUIRED) ++find_package(Libevent CONFIG REQUIRED) + + if (NOT TARGET wangle::wangle) + include("${WANGLE_CMAKE_DIR}/wangle-targets.cmake") diff --git a/vcpkg/ports/wangle/portfile.cmake b/vcpkg/ports/wangle/portfile.cmake new file mode 100644 index 0000000..add21e2 --- /dev/null +++ b/vcpkg/ports/wangle/portfile.cmake @@ -0,0 +1,46 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO facebook/wangle + REF 95f14ac0f628cea685bf39eaf511816320696ba1 # v2020.02.03.00 + SHA512 3894839b7be1aa0d845f1e461b0a303e09a9d75f3d1fb470bd5304022da7e9060d9e941cdc9d4e5878ab0ae8099477aeceae92d4d4eb80a7de264f81ac8ebf32 + HEAD_REF master + PATCHES + build.patch + fix-config-cmake.patch +) +# message(FATAL_ERROR "patch") + +vcpkg_configure_cmake( + SOURCE_PATH "${SOURCE_PATH}/wangle" + PREFER_NINJA + OPTIONS + -DBUILD_TESTS=OFF + -DBUILD_EXAMPLES=OFF + -DINCLUDE_INSTALL_DIR:STRING=include +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/wangle) + +file(READ ${CURRENT_PACKAGES_DIR}/share/wangle/wangle-targets.cmake _contents) +STRING(REPLACE "\${_IMPORT_PREFIX}/lib/" "\${_IMPORT_PREFIX}/\$<\$:debug/>lib/" _contents "${_contents}") +STRING(REPLACE "\${_IMPORT_PREFIX}/debug/lib/" "\${_IMPORT_PREFIX}/\$<\$:debug/>lib/" _contents "${_contents}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/wangle/wangle-targets.cmake "${_contents}") + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/include/wangle/util/test + ${CURRENT_PACKAGES_DIR}/include/wangle/ssl/test/certs + ${CURRENT_PACKAGES_DIR}/include/wangle/service/test + ${CURRENT_PACKAGES_DIR}/include/wangle/deprecated/rx/test +) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/wangle RENAME copyright) +file(INSTALL ${CURRENT_PORT_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/wangle) diff --git a/vcpkg/ports/wangle/usage b/vcpkg/ports/wangle/usage new file mode 100644 index 0000000..50903e7 --- /dev/null +++ b/vcpkg/ports/wangle/usage @@ -0,0 +1,4 @@ +The package wangle is compatible with built-in CMake targets: + + find_package(wangle REQUIRED) + target_link_libraries(main PRIVATE wangle::wangle) diff --git a/vcpkg/ports/wavelib/CONTROL b/vcpkg/ports/wavelib/CONTROL new file mode 100644 index 0000000..78c1068 --- /dev/null +++ b/vcpkg/ports/wavelib/CONTROL @@ -0,0 +1,4 @@ +Source: wavelib +Version: 2020-05-29 +Description: C implementation of wavelet transform (DWT,SWT and MODWT) +Homepage: https://github.com/rafat/wavelib diff --git a/vcpkg/ports/wavelib/portfile.cmake b/vcpkg/ports/wavelib/portfile.cmake new file mode 100644 index 0000000..2f4b6aa --- /dev/null +++ b/vcpkg/ports/wavelib/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO rafat/wavelib + REF c7c9ba8b1091610a678b2091ae4edba740fe83a7 + SHA512 16f24288e410732cd7a2744e0039f93ddb435c6aaa59fde169f117e5536e5f452f0e78edc75ad725b18f9e16b34870c3a100c32c84399a004eb443ba0030f758 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + DISABLE_PARALLEL_CONFIGURE + PREFER_NINJA + OPTIONS + -DBUILD_UT=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/wavpack/CONTROL b/vcpkg/ports/wavpack/CONTROL new file mode 100644 index 0000000..9f09dda --- /dev/null +++ b/vcpkg/ports/wavpack/CONTROL @@ -0,0 +1,6 @@ +Source: wavpack +Version: 5.2.0 +Port-Version: 3 +Homepage: https://github.com/dbry/WavPack +Description: WavPack encode/decode library, command-line programs, and several plugins +Supports: !(arm|arm64) \ No newline at end of file diff --git a/vcpkg/ports/wavpack/OpenSSL.patch b/vcpkg/ports/wavpack/OpenSSL.patch new file mode 100644 index 0000000..6d8e956 --- /dev/null +++ b/vcpkg/ports/wavpack/OpenSSL.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 70e1043f..d8cb8b10 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -208,7 +208,7 @@ target_include_directories(wavpack + target_link_libraries(wavpack + PRIVATE + $<$:m> +- $<$:${OPENSSL_CRYPTO_LIBRARY}> ++ $<$:OpenSSL::Crypto> + ) + target_compile_definitions(wavpack + PRIVATE diff --git a/vcpkg/ports/wavpack/portfile.cmake b/vcpkg/ports/wavpack/portfile.cmake new file mode 100644 index 0000000..a44e807 --- /dev/null +++ b/vcpkg/ports/wavpack/portfile.cmake @@ -0,0 +1,49 @@ +vcpkg_fail_port_install(ON_ARCH "arm" "arm64") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO dbry/WavPack + REF e158df5353b57ac7002d5cac4b3a040eba4c0c9f # 5.2.0 + SHA512 a144c6a05ddef0c6f4c436b5e45fe1d56893587d983eda49067fbe93059ed7d910d98b82ee5fc8e4a935904bc2ff5596cbee59ed6a5fe81be4717e53cdfc44c0 + HEAD_REF master + PATCHES + OpenSSL.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DWAVPACK_INSTALL_DOCS=OFF + -DWAVPACK_BUILD_PROGRAMS=OFF + -DWAVPACK_BUILD_COOLEDIT_PLUGIN=OFF + -DWAVPACK_BUILD_WINAMP_PLUGIN=OFF + -DBUILD_TESTING=OFF + -DWAVPACK_BUILD_DOCS=OFF +) + +vcpkg_install_cmake() + +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/WavPack) +endif() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +if(WIN32 AND (NOT MINGW)) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/wavpack.pc" "-lwavpack" "-lwavpackdll") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/wavpack.pc" "-lwavpack" "-lwavpackdll") + endif() +endif() + +vcpkg_fixup_pkgconfig() + +# Post-build test for cmake libraries +# vcpkg_test_cmake(PACKAGE_NAME wavpack) diff --git a/vcpkg/ports/websocketpp/CONTROL b/vcpkg/ports/websocketpp/CONTROL new file mode 100644 index 0000000..fee55c6 --- /dev/null +++ b/vcpkg/ports/websocketpp/CONTROL @@ -0,0 +1,5 @@ +Source: websocketpp +Version: 0.8.2 +Build-Depends: zlib, openssl, boost-asio +Homepage: https://github.com/zaphoyd/websocketpp +Description: Library that implements RFC6455 The WebSocket Protocol \ No newline at end of file diff --git a/vcpkg/ports/websocketpp/portfile.cmake b/vcpkg/ports/websocketpp/portfile.cmake new file mode 100644 index 0000000..8feb3bd --- /dev/null +++ b/vcpkg/ports/websocketpp/portfile.cmake @@ -0,0 +1,24 @@ +#header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zaphoyd/websocketpp + REF 56123c87598f8b1dd471be83ca841ceae07f95ba # 0.8.2 + SHA512 f185a66e5a7c783254352a6ef87e2e559f681032b7368765d08393ed12bcae76825abed7dcaea73de09df644320409dad46279701f5f469520542a2c9b6a6163 + HEAD_REF master +) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +# Copy the header files +file(COPY "${SOURCE_PATH}/websocketpp" DESTINATION "${CURRENT_PACKAGES_DIR}/include" FILES_MATCHING PATTERN "*.hpp") + +set(PACKAGE_INSTALL_INCLUDE_DIR "\${CMAKE_CURRENT_LIST_DIR}/../../include") +set(WEBSOCKETPP_VERSION 0.8.2) +set(PACKAGE_INIT " +macro(set_and_check) + set(\${ARGV}) +endmacro() +") +configure_file(${SOURCE_PATH}/websocketpp-config.cmake.in "${CURRENT_PACKAGES_DIR}/share/${PORT}/websocketpp-config.cmake" @ONLY) +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/wepoll/CMakeLists.txt b/vcpkg/ports/wepoll/CMakeLists.txt new file mode 100644 index 0000000..cd8d29a --- /dev/null +++ b/vcpkg/ports/wepoll/CMakeLists.txt @@ -0,0 +1,40 @@ +cmake_minimum_required(VERSION 3.14) + +project(wepoll C) + +add_library(wepoll wepoll.c) + +if (MSVC) + if (BUILD_SHARED_LIBS) + target_compile_definitions( + wepoll + PRIVATE + "-DWEPOLL_EXPORT=__declspec(dllexport)" + ) + endif () + + target_compile_options(wepoll PRIVATE /Wall /wd4127 /wd4201 /wd4242 /wd4710 /wd4711 /wd4820) + + if (MSVC_VERSION GREATER_EQUAL 1900) + target_compile_options(wepoll PRIVATE /wd5045) + endif () +else () + target_compile_definitions( + wepoll + PRIVATE + "-DWEPOLL_EXPORT=__attribute__((visibility(\"default\")))" + ) + + target_compile_options(wepoll PRIVATE -Wall -Wextra -Werror -fvisibility=hidden) +endif () + +target_link_libraries(wepoll PUBLIC ws2_32) + +set_target_properties( + wepoll + PROPERTIES + OUTPUT_NAME wepoll + PUBLIC_HEADER wepoll.h +) + +install(TARGETS wepoll) diff --git a/vcpkg/ports/wepoll/CONTROL b/vcpkg/ports/wepoll/CONTROL new file mode 100644 index 0000000..003405e --- /dev/null +++ b/vcpkg/ports/wepoll/CONTROL @@ -0,0 +1,4 @@ +Source: wepoll +Version: 1.5.5 +Description: Fast epoll for windows +Homepage: https://github.com/piscisaureus/wepoll diff --git a/vcpkg/ports/wepoll/portfile.cmake b/vcpkg/ports/wepoll/portfile.cmake new file mode 100644 index 0000000..53f1ca1 --- /dev/null +++ b/vcpkg/ports/wepoll/portfile.cmake @@ -0,0 +1,32 @@ +include(vcpkg_common_functions) + +if(NOT VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "${PORT} only supports Windows.") +endif() + +# We use `dist` branch instead of `master` branch here, +# as suggested by the library author. +# https://github.com/microsoft/vcpkg/pull/8280 +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO piscisaureus/wepoll + REF v1.5.5 + SHA512 af4507e864b0345a5842c71f4a036488ed51e53a310c7b76e7caef89f29c3a53bf7ccfea8ac4aaea386de1d1e589425004fc16bc31b2900a0ba730f0a54cb357 + HEAD_REF dist +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/wg21-sg14/CONTROL b/vcpkg/ports/wg21-sg14/CONTROL new file mode 100644 index 0000000..e096972 --- /dev/null +++ b/vcpkg/ports/wg21-sg14/CONTROL @@ -0,0 +1,4 @@ +Source: wg21-sg14 +Version: 2019-08-13 +Description: A library for Study Group 14 of Working Group 21 (C++) +Homepage: https://github.com/WG21-SG14/SG14 diff --git a/vcpkg/ports/wg21-sg14/portfile.cmake b/vcpkg/ports/wg21-sg14/portfile.cmake new file mode 100644 index 0000000..d72be28 --- /dev/null +++ b/vcpkg/ports/wg21-sg14/portfile.cmake @@ -0,0 +1,21 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO WG21-SG14/SG14 + REF 836e4d202249a86ba5ff56139c35e0afa60e7a1c + SHA512 002a6b83ecfb41bde978e912feda77639460ff376ad634e1cd0a908e2be35863489132db579d399bb6e5087fcb0355a222e611eae58eb0c2d8372bdd25f60e07 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/SG14 DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright + +file(STRINGS "${SOURCE_PATH}/SG14/flat_map.h" SOURCE_LINES) +list(SUBLIST SOURCE_LINES 0 26 SOURCE_LINES) +list(JOIN SOURCE_LINES "\n" _contents) + +file(READ "${SOURCE_PATH}/Docs/plf_licensing.txt" plf_licensing_contents) + +file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "${_contents}\n${plf_licensing_contents}") diff --git a/vcpkg/ports/wil/CONTROL b/vcpkg/ports/wil/CONTROL new file mode 100644 index 0000000..00b29b2 --- /dev/null +++ b/vcpkg/ports/wil/CONTROL @@ -0,0 +1,3 @@ +Source: wil +Version: 2020-05-19 +Description: The Windows Implementation Libraries (WIL) is a header-only C++ library created to make life easier for developers on Windows through readable type-safe C++ interfaces for common Windows coding patterns. \ No newline at end of file diff --git a/vcpkg/ports/wil/portfile.cmake b/vcpkg/ports/wil/portfile.cmake new file mode 100644 index 0000000..b6bbe80 --- /dev/null +++ b/vcpkg/ports/wil/portfile.cmake @@ -0,0 +1,13 @@ +#header-only library +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/wil + REF 3c00e7f1d8cf9930bbb8e5be3ef0df65c84e8928 + SHA512 c9c3b4a41f7523a6da6378def4a6b868e9f66438998d04ae8489b9784db91664af7af3ab6ef73c104b9ac100c0dc5ae6a13e9cb9f679ba428a4abc07b32a7dce + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR}) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/wil RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/wildmidi/0001-add-install-target.patch b/vcpkg/ports/wildmidi/0001-add-install-target.patch new file mode 100644 index 0000000..8270cd9 --- /dev/null +++ b/vcpkg/ports/wildmidi/0001-add-install-target.patch @@ -0,0 +1,30 @@ +--- a/src/CMakeLists.txt 2017-10-02 14:06:57.163881000 +0000 ++++ b/src/CMakeLists.txt 2017-10-02 14:08:52.815977600 +0000 +@@ -313,6 +313,27 @@ + ENDIF (WIN32 AND CMAKE_COMPILER_IS_MINGW) + + IF (WIN32 AND MSVC) ++ # install our libraries ++ IF (WANT_STATIC) ++ INSTALL(TARGETS libwildmidi_static DESTINATION ${WILDMIDILIB_INSTALLDIR}) ++ IF (WANT_PLAYERSTATIC) ++ INSTALL(TARGETS wildmidi-static DESTINATION bin) ++ ENDIF () ++ ENDIF (WANT_STATIC) ++ ++ IF (BUILD_SHARED_LIBS) ++ INSTALL(TARGETS libwildmidi_dynamic ++ ARCHIVE DESTINATION ${WILDMIDILIB_INSTALLDIR} ++ LIBRARY DESTINATION ${WILDMIDILIB_INSTALLDIR} ++ RUNTIME DESTINATION ${WILDMIDIDLL_INSTALLDIR} ++ ) ++ IF (WANT_PLAYER) ++ INSTALL(TARGETS wildmidi DESTINATION bin) ++ ENDIF () ++ ENDIF () ++ ++ INSTALL(FILES ${CMAKE_SOURCE_DIR}/include/wildmidi_lib.h DESTINATION include) ++ + IF (WANT_MP_BUILD) + SET(MT_BUILD "/MP") + ENDIF () diff --git a/vcpkg/ports/wildmidi/CONTROL b/vcpkg/ports/wildmidi/CONTROL new file mode 100644 index 0000000..0c6b401 --- /dev/null +++ b/vcpkg/ports/wildmidi/CONTROL @@ -0,0 +1,4 @@ +Source: wildmidi +Version: 0.4.3-1 +Homepage: https://github.com/Mindwerks/wildmidi +Description: MIDI software synthesizer library. diff --git a/vcpkg/ports/wildmidi/portfile.cmake b/vcpkg/ports/wildmidi/portfile.cmake new file mode 100644 index 0000000..ac872c1 --- /dev/null +++ b/vcpkg/ports/wildmidi/portfile.cmake @@ -0,0 +1,48 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Mindwerks/wildmidi + REF wildmidi-0.4.3 + SHA512 7e86e998ee97cdf57328e4cf5ef52a64926fd01999879c0eae5b6c823be4e6d116f7026230bd15d209e6616fbc7ba1c29ebd1f3be04735e341ce5c83298f956f + HEAD_REF master + PATCHES + 0001-add-install-target.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(WANT_STATIC "OFF") +else() + set(WANT_STATIC "ON") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DWANT_PLAYER=OFF + -DWANT_STATIC=${WANT_STATIC} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Rename library to get rid of _dynamic and _static suffix +if(NOT VCPKG_CMAKE_SYSTEM_NAME) + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/wildmidi_dynamic.lib ${CURRENT_PACKAGES_DIR}/lib/wildmidi.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/wildmidi_dynamic.lib ${CURRENT_PACKAGES_DIR}/debug/lib/wildmidi.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/bin/wildmidi_dynamic.dll ${CURRENT_PACKAGES_DIR}/bin/wildmidi.dll) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/bin/wildmidi_dynamic.dll ${CURRENT_PACKAGES_DIR}/debug/bin/wildmidi.dll) + else() + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/wildmidi_static.lib ${CURRENT_PACKAGES_DIR}/lib/wildmidi.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/wildmidi_static.lib ${CURRENT_PACKAGES_DIR}/debug/lib/wildmidi.lib) + endif() +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/docs/license/LGPLv3.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/wildmidi RENAME copyright) diff --git a/vcpkg/ports/wincrypt/CONTROL b/vcpkg/ports/wincrypt/CONTROL new file mode 100644 index 0000000..615d2c3 --- /dev/null +++ b/vcpkg/ports/wincrypt/CONTROL @@ -0,0 +1,3 @@ +Source: wincrypt +Version: 0.0-2 +Description: Windows Cryptography. \ No newline at end of file diff --git a/vcpkg/ports/wincrypt/portfile.cmake b/vcpkg/ports/wincrypt/portfile.cmake new file mode 100644 index 0000000..9eaedf3 --- /dev/null +++ b/vcpkg/ports/wincrypt/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_get_windows_sdk(WINDOWS_SDK) + +if (WINDOWS_SDK MATCHES "10.") + set(LIBFILEPATH "$ENV{WindowsSdkDir}Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\Crypt32.Lib") + set(HEADERSPATH "$ENV{WindowsSdkDir}Include\\${WINDOWS_SDK}\\um") +elseif(WINDOWS_SDK MATCHES "8.") + set(LIBFILEPATH "$ENV{WindowsSdkDir}Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\Crypt32.Lib") + set(HEADERSPATH "$ENV{WindowsSdkDir}Include\\um") +else() + message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}") +endif() + +if (NOT EXISTS "${LIBFILEPATH}") + message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBFILEPATH}") +endif() + +file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + +if (WINDOWS_SDK MATCHES "10.") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/wincrypt/copyright "See https://developer.microsoft.com/windows/downloads/windows-10-sdk for the Windows 10 SDK license") +elseif(WINDOWS_SDK MATCHES "8.") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/wincrypt/copyright "See https://developer.microsoft.com/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license") +endif() + +# Allow empty include directory +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/vcpkg/ports/winpcap/CONTROL b/vcpkg/ports/winpcap/CONTROL new file mode 100644 index 0000000..c745c2d --- /dev/null +++ b/vcpkg/ports/winpcap/CONTROL @@ -0,0 +1,5 @@ +Source: winpcap +Version: 4.1.3 +Port-Version: 4 +Homepage: https://www.winpcap.org +Description: WinPcap is the industry-standard tool for link-layer network access in Windows environments. diff --git a/vcpkg/ports/winpcap/Packet.vcxproj b/vcpkg/ports/winpcap/Packet.vcxproj new file mode 100644 index 0000000..71e190c --- /dev/null +++ b/vcpkg/ports/winpcap/Packet.vcxproj @@ -0,0 +1,768 @@ + + + + + Debug No NetMon + Win32 + + + Debug No NetMon + x64 + + + Debug NT4 + Win32 + + + Debug NT4 + x64 + + + Debug + Win32 + + + Debug + x64 + + + Release LOG_TO_FILE + Win32 + + + Release LOG_TO_FILE + x64 + + + Release No NetMon LOG_TO_FILE + Win32 + + + Release No NetMon LOG_TO_FILE + x64 + + + Release No NetMon + Win32 + + + Release No NetMon + x64 + + + Release NT4 LOG_TO_FILE + Win32 + + + Release NT4 LOG_TO_FILE + x64 + + + Release NT4 + Win32 + + + Release NT4 + x64 + + + Release + Win32 + + + Release + x64 + + + + {17D62EEB-EABF-4D94-B1FF-BCDAAFA7DA52} + Packet + Win32Proj + + + + StaticLibrary + v141 + Unicode + true + + + StaticLibrary + v141 + Unicode + true + + + StaticLibrary + v141 + Unicode + true + + + StaticLibrary + v141 + Unicode + true + + + StaticLibrary + v141 + Unicode + + + StaticLibrary + v141 + Unicode + true + + + StaticLibrary + v141 + Unicode + + + StaticLibrary + v141 + Unicode + true + + + StaticLibrary + v141 + Unicode + + + StaticLibrary + v141 + Unicode + true + + + StaticLibrary + v141 + Unicode + true + + + StaticLibrary + v141 + Unicode + true + + + StaticLibrary + v141 + Unicode + true + + + StaticLibrary + v141 + Unicode + + + StaticLibrary + v141 + Unicode + true + + + StaticLibrary + v141 + Unicode + + + StaticLibrary + v141 + Unicode + true + + + StaticLibrary + v141 + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>15.0.28127.55 + + + $(ProjectDir)\$(Configuration)\x86\ + $(ProjectDir)\$(Configuration)\x86\ + true + + + $(ProjectDir)\$(Configuration)\x64\ + $(ProjectDir)\$(Configuration)\x64\ + true + + + $(ProjectDir)\$(Configuration)\x86\ + $(ProjectDir)\$(Configuration)\x86\ + false + + + $(ProjectDir)\$(Configuration)\x64\ + $(ProjectDir)\$(Configuration)\x64\ + false + + + $(ProjectDir)\$(Configuration)\x86\ + $(ProjectDir)\$(Configuration)\x86\ + true + + + $(ProjectDir)\$(Configuration)\x64\ + $(ProjectDir)\$(Configuration)\x64\ + true + + + $(ProjectDir)\$(Configuration)\x86\ + $(ProjectDir)\$(Configuration)\x86\ + false + + + $(ProjectDir)\$(Configuration)\x64\ + $(ProjectDir)\$(Configuration)\x64\ + false + + + $(ProjectDir)\$(Configuration)\x86\ + $(ProjectDir)\$(Configuration)\x86\ + true + + + $(ProjectDir)\$(Configuration)\x64\ + $(ProjectDir)\$(Configuration)\x64\ + true + + + $(ProjectDir)\$(Configuration)\x86\ + $(ProjectDir)\$(Configuration)\x86\ + false + + + $(ProjectDir)\$(Configuration)\x64\ + $(ProjectDir)\$(Configuration)\x64\ + false + + + $(ProjectDir)\$(Configuration)\x86\ + $(ProjectDir)\$(Configuration)\x86\ + false + + + $(ProjectDir)\$(Configuration)\x64\ + $(ProjectDir)\$(Configuration)\x64\ + false + + + $(ProjectDir)\$(Configuration)\x86\ + $(ProjectDir)\$(Configuration)\x86\ + false + + + $(ProjectDir)\$(Configuration)\x64\ + $(ProjectDir)\$(Configuration)\x64\ + false + + + $(ProjectDir)\$(Configuration)\x86\ + $(ProjectDir)\$(Configuration)\x86\ + false + + + $(ProjectDir)\$(Configuration)\x64\ + $(ProjectDir)\$(Configuration)\x64\ + false + + + + Disabled + ..\..\..\Common;..\..\driver;..\..\..\..\AirPcap_devpack\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;HAVE_IPHELPER_API;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + Level4 + EditAndContinue + + + version.lib;setupapi.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + ..\packet.def + true + Windows + MachineX86 + + + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\Common;..\..\driver;..\..\..\..\AirPcap_devpack\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;HAVE_IPHELPER_API;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + Level4 + ProgramDatabase + + + version.lib;setupapi.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + ..\packet.def + true + Windows + MachineX64 + + + + + ..\..\..\Common;..\..\driver;..\..\..\..\AirPcap_devpack\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;HAVE_IPHELPER_API;%(PreprocessorDefinitions) + MultiThreaded + + Level4 + ProgramDatabase + + + version.lib;setupapi.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + ..\packet.def + true + Windows + true + true + MachineX86 + + + MachineX86 + + + + + X64 + + + ..\..\..\Common;..\..\driver;..\..\..\..\AirPcap_devpack\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS; ;HAVE_IPHELPER_API;%(PreprocessorDefinitions) + MultiThreaded + + Level4 + ProgramDatabase + + + version.lib;setupapi.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + ..\packet.def + true + Windows + true + true + MachineX64 + + + + + Disabled + ..\..\..\Common;..\..\driver;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS; _WINNT4;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + Level4 + EditAndContinue + + + _UNICODE;UNICODE;_WINNT4;%(PreprocessorDefinitions) + + + version.lib;%(AdditionalDependencies) + ..\packet.def + true + Windows + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\Common;..\..\driver;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;_USRDLL;PACKET_EXPORTS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + Level4 + ProgramDatabase + + + version.lib;%(AdditionalDependencies) + ..\packet.def + true + Windows + MachineX64 + + + + + ..\..\..\Common;..\..\driver;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS; _WINNT4;%(PreprocessorDefinitions) + MultiThreaded + + Level4 + ProgramDatabase + + + _UNICODE;UNICODE;_WINNT4;%(PreprocessorDefinitions) + + + version.lib;%(AdditionalDependencies) + ..\packet.def + true + Windows + true + true + MachineX86 + + + + + X64 + + + ..\..\..\Common;..\..\driver;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PACKET_EXPORTS;%(PreprocessorDefinitions) + MultiThreaded + + Level4 + ProgramDatabase + + + version.lib;%(AdditionalDependencies) + ..\packet.def + true + Windows + true + true + MachineX64 + + + + + Disabled + ..\..\..\Common;..\..\driver;..\..\..\..\AirPcap_devpack\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;HAVE_IPHELPER_API;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + Level4 + EditAndContinue + + + _UNICODE;UNICODE;_WINVISTA;%(PreprocessorDefinitions) + + + version.lib;setupapi.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + ..\packet.def + true + Windows + MachineX86 + + + + + X64 + + + Disabled + ..\..\..\Common;..\..\driver;..\..\..\..\AirPcap_devpack\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;HAVE_IPHELPER_API;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + Level4 + ProgramDatabase + + + _UNICODE;UNICODE;_WINVISTA;%(PreprocessorDefinitions) + + + version.lib;setupapi.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + ..\packet.def + true + Windows + MachineX64 + + + + + ..\..\..\Common;..\..\driver;..\..\..\..\AirPcap_devpack\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;HAVE_IPHELPER_API;%(PreprocessorDefinitions) + MultiThreaded + + Level4 + ProgramDatabase + + + _UNICODE;UNICODE;_WINVISTA;%(PreprocessorDefinitions) + + + version.lib;setupapi.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + ..\packet.def + true + Windows + true + true + MachineX86 + + + + + X64 + + + ..\..\..\Common;..\..\driver;..\..\..\..\AirPcap_devpack\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS; ;HAVE_IPHELPER_API;%(PreprocessorDefinitions) + MultiThreaded + + Level4 + ProgramDatabase + + + _UNICODE;UNICODE;_WINVISTA;%(PreprocessorDefinitions) + + + version.lib;setupapi.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + ..\packet.def + true + Windows + true + true + MachineX64 + + + + + ..\..\..\Common;..\..\driver;..\..\..\..\AirPcap_devpack\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;HAVE_IPHELPER_API;_DEBUG_TO_FILE;%(PreprocessorDefinitions) + MultiThreaded + + Level4 + ProgramDatabase + + + version.lib;setupapi.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + ..\packet.def + true + Windows + true + true + MachineX86 + + + + + X64 + + + ..\..\..\Common;..\..\driver;..\..\..\..\AirPcap_devpack\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS; ;HAVE_IPHELPER_API;_DEBUG_TO_FILE;%(PreprocessorDefinitions) + MultiThreaded + + Level4 + ProgramDatabase + + + version.lib;setupapi.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + ..\packet.def + true + Windows + true + true + MachineX64 + + + + + ..\..\..\Common;..\..\driver;..\..\..\..\AirPcap_devpack\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;HAVE_IPHELPER_API;_DEBUG_TO_FILE;%(PreprocessorDefinitions) + MultiThreaded + + Level4 + ProgramDatabase + + + _UNICODE;UNICODE;_WINVISTA;%(PreprocessorDefinitions) + + + version.lib;setupapi.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + ..\packet.def + true + Windows + true + true + MachineX86 + + + + + X64 + + + ..\..\..\Common;..\..\driver;..\..\..\..\AirPcap_devpack\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS; ;HAVE_IPHELPER_API;_DEBUG_TO_FILE;%(PreprocessorDefinitions) + MultiThreaded + + Level4 + ProgramDatabase + + + _UNICODE;UNICODE;_WINVISTA;%(PreprocessorDefinitions) + + + version.lib;setupapi.lib;ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) + ..\packet.def + true + Windows + true + true + MachineX64 + + + + + ..\..\..\Common;..\..\driver;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS; _WINNT4;_DEBUG_TO_FILE;%(PreprocessorDefinitions) + MultiThreaded + + Level4 + ProgramDatabase + + + _UNICODE;UNICODE;_WINNT4;%(PreprocessorDefinitions) + + + version.lib;%(AdditionalDependencies) + ..\packet.def + true + Windows + true + true + MachineX86 + + + + + X64 + + + ..\..\..\Common;..\..\driver;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_USRDLL;PACKET_EXPORTS;%(PreprocessorDefinitions) + MultiThreaded + + Level4 + ProgramDatabase + + + version.lib;%(AdditionalDependencies) + ..\packet.def + true + Windows + true + true + MachineX64 + + + + + true + true + true + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vcpkg/ports/winpcap/create_bin.bat b/vcpkg/ports/winpcap/create_bin.bat new file mode 100644 index 0000000..aa9e7f1 --- /dev/null +++ b/vcpkg/ports/winpcap/create_bin.bat @@ -0,0 +1,20 @@ +@echo off + +IF "%2"=="" (set WPDPACKDESTDIR=.\WpdPack\) ELSE (set WPDPACKDESTDIR=%2) + +IF ""=="%1" (set WINPCAPSOURCEDIR=.\) ELSE (set WINPCAPSOURCEDIR=%1) + +echo Creating \Lib folder +mkdir %WPDPACKDESTDIR% >nul 2>nul +mkdir %WPDPACKDESTDIR%\Bin >nul 2>nul +mkdir %WPDPACKDESTDIR%\Bin\x64 >nul 2>nul + +xcopy /v /Y "%WINPCAPSOURCEDIR%\wpcap\PRJ\Release No AirPcap\x86\wpcap.dll" %WPDPACKDESTDIR%\Bin\ >nul +xcopy /v /Y "%WINPCAPSOURCEDIR%\wpcap\PRJ\Release No AirPcap\x64\wpcap.dll" %WPDPACKDESTDIR%\Bin\x64 >nul +xcopy /v /Y %WINPCAPSOURCEDIR%\packetNtx\Dll\Project\Release\x86\packet.dll %WPDPACKDESTDIR%\Bin\ >nul +xcopy /v /Y %WINPCAPSOURCEDIR%\packetNtx\Dll\Project\Release\x64\packet.dll %WPDPACKDESTDIR%\Bin\x64 >nul + +echo Folder \Bin created successfully + +set WPDPACKDESTDIR= +set WINPCAPSOURCEDIR= \ No newline at end of file diff --git a/vcpkg/ports/winpcap/create_lib.patch b/vcpkg/ports/winpcap/create_lib.patch new file mode 100644 index 0000000..8e144fa --- /dev/null +++ b/vcpkg/ports/winpcap/create_lib.patch @@ -0,0 +1,19 @@ +diff --git a/create_lib.bat b/create_lib.bat +index dbe511c..d431b88 100644 +--- a/create_lib.bat ++++ b/create_lib.bat +@@ -9,12 +9,10 @@ mkdir %WPDPACKDESTDIR% >nul 2>nul + mkdir %WPDPACKDESTDIR%\Lib >nul 2>nul + mkdir %WPDPACKDESTDIR%\Lib\x64 >nul 2>nul + +-xcopy /v /Y %WINPCAPSOURCEDIR%\wpcap\PRJ\Release\x86\wpcap.lib %WPDPACKDESTDIR%\Lib\ >nul +-xcopy /v /Y %WINPCAPSOURCEDIR%\wpcap\PRJ\Release\x64\wpcap.lib %WPDPACKDESTDIR%\Lib\x64 >nul ++xcopy /v /Y "%WINPCAPSOURCEDIR%\wpcap\PRJ\Release No AirPcap\x86\wpcap.lib" %WPDPACKDESTDIR%\Lib\ >nul ++xcopy /v /Y "%WINPCAPSOURCEDIR%\wpcap\PRJ\Release No AirPcap\x64\wpcap.lib" %WPDPACKDESTDIR%\Lib\x64 >nul + xcopy /v /Y %WINPCAPSOURCEDIR%\packetNtx\Dll\Project\Release\x86\packet.lib %WPDPACKDESTDIR%\Lib\ >nul + xcopy /v /Y %WINPCAPSOURCEDIR%\packetNtx\Dll\Project\Release\x64\packet.lib %WPDPACKDESTDIR%\Lib\x64 >nul +-xcopy /v /Y %WINPCAPSOURCEDIR%\packetNtx\Dll\Project\libpacket.a %WPDPACKDESTDIR%\Lib\ >nul +-xcopy /v /Y %WINPCAPSOURCEDIR%\wpcap\LIB\libwpcap.a %WPDPACKDESTDIR%\Lib\ >nul + + echo Folder \Lib created successfully + diff --git a/vcpkg/ports/winpcap/fix-create-lib-batch.patch b/vcpkg/ports/winpcap/fix-create-lib-batch.patch new file mode 100644 index 0000000..0a1d901 --- /dev/null +++ b/vcpkg/ports/winpcap/fix-create-lib-batch.patch @@ -0,0 +1,23 @@ +diff --git a/create_lib.bat b/create_lib.bat +index c70a179..4690d9e 100644 +--- a/create_lib.bat ++++ b/create_lib.bat +@@ -7,10 +7,16 @@ IF ""=="%1" (set WINPCAPSOURCEDIR=.\) ELSE (set WINPCAPSOURCEDIR=%1) + echo Creating \Lib folder + mkdir %WPDPACKDESTDIR% >nul 2>nul + mkdir %WPDPACKDESTDIR%\Lib >nul 2>nul ++mkdir %WPDPACKDESTDIR%\Lib\debug\ >nul 2>nul + mkdir %WPDPACKDESTDIR%\Lib\x64 >nul 2>nul ++mkdir %WPDPACKDESTDIR%\Lib\x64\debug >nul 2>nul + +-xcopy /v /Y "%WINPCAPSOURCEDIR%\wpcap\PRJ\Release No AirPcap\x86\wpcap.lib" %WPDPACKDESTDIR%\Lib\ >nul +-xcopy /v /Y "%WINPCAPSOURCEDIR%\wpcap\PRJ\Release No AirPcap\x64\wpcap.lib" %WPDPACKDESTDIR%\Lib\x64 >nul ++xcopy /v /Y "%WINPCAPSOURCEDIR%\wpcap\PRJ\Debug No AirPcap\x86\wpcap.lib" %WPDPACKDESTDIR%\Lib\debug\ >nul ++xcopy /v /Y "%WINPCAPSOURCEDIR%\wpcap\PRJ\Debug No AirPcap\x64\wpcap.lib" %WPDPACKDESTDIR%\Lib\x64\debug\ >nul ++xcopy /v /Y "%WINPCAPSOURCEDIR%\wpcap\PRJ\Release No AirPcap\x86\wpcap.lib" %WPDPACKDESTDIR%\Lib\ >nul ++xcopy /v /Y "%WINPCAPSOURCEDIR%\wpcap\PRJ\Release No AirPcap\x64\wpcap.lib" %WPDPACKDESTDIR%\Lib\x64 >nul ++xcopy /v /Y %WINPCAPSOURCEDIR%\packetNtx\Dll\Project\Debug\x86\packet.lib %WPDPACKDESTDIR%\Lib\debug\ >nul ++xcopy /v /Y %WINPCAPSOURCEDIR%\packetNtx\Dll\Project\Debug\x64\packet.lib %WPDPACKDESTDIR%\Lib\x64\debug\ >nul + xcopy /v /Y %WINPCAPSOURCEDIR%\packetNtx\Dll\Project\Release\x86\packet.lib %WPDPACKDESTDIR%\Lib\ >nul + xcopy /v /Y %WINPCAPSOURCEDIR%\packetNtx\Dll\Project\Release\x64\packet.lib %WPDPACKDESTDIR%\Lib\x64 >nul + diff --git a/vcpkg/ports/winpcap/packetNtx.patch.in b/vcpkg/ports/winpcap/packetNtx.patch.in new file mode 100644 index 0000000..c19056a --- /dev/null +++ b/vcpkg/ports/winpcap/packetNtx.patch.in @@ -0,0 +1,725 @@ +diff --git a/packetNtx/Dll/Project/Packet.dsp b/packetNtx/Dll/Project/Packet.dsp +index 6e69440..fc520ce 100644 +--- a/packetNtx/Dll/Project/Packet.dsp ++++ b/packetNtx/Dll/Project/Packet.dsp +@@ -55,8 +55,8 @@ RSC=rc.exe + # PROP Intermediate_Dir "Release" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_WANPACKET_API" /YX /FD /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c ++# ADD CPP /nologo /@CRT_LINKAGE@ /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -87,8 +87,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "Debug" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_WANPACKET_API" /YX /FD /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c ++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +@@ -120,8 +120,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "NT4_Debug" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../common" /D "WIN32" /D "_WINDOWS" /YX /FD /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../../common" /D "WIN32" /D "_WINDOWS" /YX /FD /c ++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "_DEBUG" /D "_WINNT4" /mktyplib203 /o "NUL" /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +@@ -154,8 +154,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "NT4_Release" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../../../common" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /I "../../../common" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c ++# ADD CPP /nologo /@CRT_LINKAGE@ /W3 /GX /Zi /O2 /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "NDEBUG" /D "_WINNT4" /mktyplib203 /o "NUL" /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -187,8 +187,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "Debug_LOG_TO_FILE" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../common" /I "../../../dag/include" /I "../../../dag/drv/windows" /D "WIN32" /D "_WINDOWS" /D "HAVE_DAG_API" /YX /FD /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "HAVE_AIRPCAP_API" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /FR /YX /FD /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../../common" /I "../../../dag/include" /I "../../../dag/drv/windows" /D "WIN32" /D "_WINDOWS" /D "HAVE_DAG_API" /YX /FD /c ++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /FR /YX /FD /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +@@ -221,8 +221,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "Release_LOG_TO_FILE" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../../../common" /I "../../../dag/include" /I "../../../dag/drv/windows" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_DAG_API" /YX /FD /c +-# ADD CPP /nologo /MT /W4 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /FR /YX /FD /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /I "../../../common" /I "../../../dag/include" /I "../../../dag/drv/windows" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_DAG_API" /YX /FD /c ++# ADD CPP /nologo /@CRT_LINKAGE@ /W4 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /FR /YX /FD /c + # SUBTRACT CPP /u + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +@@ -255,8 +255,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "NT4_Debug_LOG_TO_FILE" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../common" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /D "_DEBUG_TO_FILE" /YX /FD /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../../common" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c ++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /D "_DEBUG_TO_FILE" /YX /FD /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "_DEBUG" /D "_WINNT4" /mktyplib203 /o "NUL" /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +@@ -289,8 +289,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "NT4_Release_LOG_TO_FILE" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../../../common" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /D "_DEBUG_TO_FILE" /YX /FD /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /I "../../../common" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /YX /FD /c ++# ADD CPP /nologo /@CRT_LINKAGE@ /W3 /GX /Zi /O2 /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINNT4" /D "_DEBUG_TO_FILE" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "NDEBUG" /D "_WINNT4" /mktyplib203 /o "NUL" /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -323,8 +323,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "Debug_No_AirPcap" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../z1211u/airpcap/" /D "WIN32" /D "_WINDOWS" /D "HAVE_AIRPCAP_API" /YX /FD /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /YX /FD /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../z1211u/airpcap/" /D "WIN32" /D "_WINDOWS" /YX /FD /c ++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +@@ -357,8 +357,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "Release_No_AirPcap" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../z1211u/airpcap/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_AIRPCAP_API" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /YX /FD /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../z1211u/airpcap/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /YX /FD /c ++# ADD CPP /nologo /@CRT_LINKAGE@ /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -390,8 +390,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "Debug_No_NpfIm" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /D "_DBG" /YX /FD /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /I "../../../../NpfIm_DevPack" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /D "_DBG" /YX /FD /c ++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /I "../../../../NpfIm_DevPack" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +@@ -424,8 +424,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "Release_No_NpfIm" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /I "../../../../NpfIm_DevPack" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c ++# ADD CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /I "../../../../NpfIm_DevPack" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -457,8 +457,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "Debug_Vista" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c ++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +@@ -491,8 +491,8 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "Release_Vista" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /YX /FD /c ++# ADD CPP /nologo /@CRT_LINKAGE@ /W3 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -525,9 +525,9 @@ PostBuild_Cmds=copy $(OutDir)\packet.lib . + # PROP Intermediate_Dir "Release_Vista_LOG_TO_FILE" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W4 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_WANPACKET_API" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /FR /YX /FD /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W4 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /D "HAVE_NPFIM_API" /FR /YX /FD /c + # SUBTRACT BASE CPP /u +-# ADD CPP /nologo /MT /W4 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "HAVE_AIRPCAP_API" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /FR /YX /FD /c ++# ADD CPP /nologo /@CRT_LINKAGE@ /W4 /GX /Zi /O2 /I "../../../dag/include" /I "../../../dag/drv/windows" /I "../../../common" /I "../../../../Airpcap_Devpack/include/" /D "NDEBUG" /D "_DEBUG_TO_FILE" /D "WIN32" /D "_WINDOWS" /D "HAVE_IPHELPER_API" /FR /YX /FD /c + # SUBTRACT CPP /u + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 +diff --git a/packetNtx/Dll/Project/Packet.vcproj b/packetNtx/Dll/Project/Packet.vcproj +index 8be719e..e16afe2 100644 +--- a/packetNtx/Dll/Project/Packet.vcproj ++++ b/packetNtx/Dll/Project/Packet.vcproj +@@ -22,7 +22,7 @@ + Name="Debug|Win32" + OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x86" + IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x86" +- ConfigurationType="2" ++ ConfigurationType="@LIBRARY_LINKAGE@" + CharacterSet="1" + > + + + + +@@ -201,7 +201,7 @@ + + +@@ -280,7 +280,7 @@ + + + + + +@@ -573,7 +573,7 @@ + Name="Release NT4|x64" + OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x64" + IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x64" +- ConfigurationType="2" ++ ConfigurationType="@LIBRARY_LINKAGE@" + CharacterSet="1" + WholeProgramOptimization="1" + > +@@ -614,7 +614,7 @@ + /> + + + +@@ -833,7 +833,7 @@ + +@@ -913,7 +913,7 @@ + + +@@ -992,7 +992,7 @@ + + +@@ -1071,7 +1071,7 @@ + + +@@ -1149,7 +1149,7 @@ + +@@ -1229,7 +1229,7 @@ + + +@@ -1365,7 +1365,7 @@ + Name="Release NT4 LOG_TO_FILE|x64" + OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x64" + IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x64" +- ConfigurationType="2" ++ ConfigurationType="@LIBRARY_LINKAGE@" + CharacterSet="1" + WholeProgramOptimization="1" + > +@@ -1406,7 +1406,7 @@ + /> + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- + nul copy + # PROP Intermediate_Dir "Debug_REMOTE_DAG" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D "HAVE_ADDRINFO" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "_DEBUG" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D "HAVE_ADDRINFO" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "_DEBUG" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c ++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /FR /YX /FD /GZ /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +@@ -173,8 +173,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy + # PROP Intermediate_Dir "Release_REMOTE" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c ++# ADD CPP /nologo /@CRT_LINKAGE@ /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -208,8 +208,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy + # PROP Intermediate_Dir "Release_REMOTE_DAG" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /D HAVE_ADDRINFO=1 /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "NDEBUG" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_REMOTE" /YX /FD /c ++# ADD CPP /nologo /@CRT_LINKAGE@ /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /D "HAVE_AIRPCAP_API" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -243,8 +243,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy + # PROP Intermediate_Dir "Release_REMOTE_NO_AIRPCAP" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c +-# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@ /W3 /GX /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c ++# ADD CPP /nologo /@CRT_LINKAGE@ /W3 /GX /Zi /O2 /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D HAVE_ADDRINFO=1 /D "NDEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /YX /FD /c + # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "NDEBUG" +@@ -278,8 +278,8 @@ PostBuild_Cmds=mkdir $(OutDir)\..\..\LIB > nul copy + # PROP Intermediate_Dir "Debug_REMOTE_NO_AIRPCAP" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c +-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c ++# ADD BASE CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c ++# ADD CPP /nologo /@CRT_LINKAGE@d /W3 /Gm /GX /ZI /Od /I "../libpcap/" /I "../libpcap/bpf" /I "../libpcap/lbl" /I "../libpcap/Win32/Include" /I "../../common" /I "../Win32-Extensions" /I "../../../Airpcap_Devpack/include" /D "HAVE_ADDRINFO" /D "_DEBUG" /D "HAVE_REMOTE" /D "YY_NEVER_INTERACTIVE" /D yylval=pcap_lval /D "_USRDLL" /D "LIBPCAP_EXPORTS" /D "HAVE_STRERROR" /D "__STDC__" /D "INET6" /D "_WINDOWS" /D SIZEOF_CHAR=1 /D SIZEOF_SHORT=2 /D SIZEOF_INT=4 /D "WPCAP" /D "HAVE_VSNPRINTF" /D "WIN32" /D "_MBCS" /FR /YX /FD /GZ /c + # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 + # ADD BASE RSC /l 0x410 /d "_DEBUG" +diff --git a/wpcap/PRJ/wpcap.vcproj b/wpcap/PRJ/wpcap.vcproj +index c1d56b4..40a8ce1 100644 +--- a/wpcap/PRJ/wpcap.vcproj ++++ b/wpcap/PRJ/wpcap.vcproj +@@ -22,7 +22,7 @@ + Name="Debug|Win32" + OutputDirectory="$(ProjectDir)\$(ConfigurationName)\x86" + IntermediateDirectory="$(ProjectDir)\$(ConfigurationName)\x86" +- ConfigurationType="2" ++ ConfigurationType="@LIBRARY_LINKAGE@" + CharacterSet="2" + > + + +@@ -205,7 +205,7 @@ + +@@ -285,7 +285,7 @@ + + + +@@ -525,7 +525,7 @@ + +@@ -605,7 +605,7 @@ + + + #if !defined(HAVE_SNPRINTF) +-#define snprintf pcap_snprintf +-extern int snprintf (char *, size_t, const char *, ...); ++#define snprintf _snprintf ++//#define snprintf pcap_snprintf ++//extern int snprintf (char *, size_t, const char *, ...); + #endif + + #if !defined(HAVE_VSNPRINTF) +diff --git a/wpcap/libpcap/rpcapd/rpcapd.dsp b/wpcap/libpcap/rpcapd/rpcapd.dsp +index f7c00af..1cd823e 100644 +--- a/wpcap/libpcap/rpcapd/rpcapd.dsp ++++ b/wpcap/libpcap/rpcapd/rpcapd.dsp +@@ -44,8 +44,8 @@ RSC=rc.exe + # PROP Intermediate_Dir "Debug_REMOTE" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c +-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c ++# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c ++# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c + # ADD BASE RSC /l 0x409 /d "_DEBUG" + # ADD RSC /l 0x409 /d "_DEBUG" + BSC32=bscmake.exe +@@ -69,8 +69,8 @@ LINK32=link.exe + # PROP Intermediate_Dir "Debug_REMOTE_DAG" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c +-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /FR /YX /FD /GZ /c ++# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /FR /YX /FD /GZ /c ++# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "_DEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /FR /YX /FD /GZ /c + # ADD BASE RSC /l 0x409 /d "_DEBUG" + # ADD RSC /l 0x409 /d "_DEBUG" + BSC32=bscmake.exe +@@ -94,8 +94,8 @@ LINK32=link.exe + # PROP Intermediate_Dir "Release_REMOTE" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c +-# ADD CPP /nologo /W3 /GX /Zi /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c ++# ADD BASE CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c ++# ADD CPP /nologo /W3 /GX /Zi /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c + # ADD BASE RSC /l 0x409 /d "NDEBUG" + # ADD RSC /l 0x409 /d "NDEBUG" + BSC32=bscmake.exe +@@ -120,8 +120,8 @@ LINK32=link.exe + # PROP Intermediate_Dir "Release_REMOTE_DAG" + # PROP Ignore_Export_Lib 0 + # PROP Target_Dir "" +-# ADD BASE CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c +-# ADD CPP /nologo /W3 /GX /Zi /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_SNPRINTF" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /YX /FD /c ++# ADD BASE CPP /nologo /W3 /GX /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /YX /FD /c ++# ADD CPP /nologo /W3 /GX /Zi /O2 /I "../" /I "../bpf/" /I "../Win32/Include" /I "../../../Common/" /I "win32-pthreads" /D "NDEBUG" /D "_CONSOLE" /D "WIN32" /D "_MBCS" /D "HAVE_VSNPRINTF" /D "HAVE_REMOTE" /D "HAVE_DAG_API" /YX /FD /c + # ADD BASE RSC /l 0x409 /d "NDEBUG" + # ADD RSC /l 0x409 /d "NDEBUG" + BSC32=bscmake.exe +diff --git a/wpcap/libpcap/rpcapd/rpcapd.vcproj b/wpcap/libpcap/rpcapd/rpcapd.vcproj +index 882fbac..b89f1f9 100644 +--- a/wpcap/libpcap/rpcapd/rpcapd.vcproj ++++ b/wpcap/libpcap/rpcapd/rpcapd.vcproj +@@ -41,7 +41,7 @@ + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="..\;..\Win32\include;..\..\..\Common;.\Win32-pthreads;..\..\Win32-Extensions" +- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_SNPRINTF;HAVE_VSNPRINTF;HAVE_REMOTE;WPCAP;_CRT_SECURE_NO_DEPRECATE;HAVE_TC_API" ++ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_VSNPRINTF;HAVE_REMOTE;WPCAP;_CRT_SECURE_NO_DEPRECATE;HAVE_TC_API" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="1" +@@ -119,7 +119,7 @@ + + + + + Debug No AirPcap + Win32 + + + Debug No AirPcap + x64 + + + Debug + Win32 + + + Debug + x64 + + + Release No AirPcap + Win32 + + + Release No AirPcap + x64 + + + Release + Win32 + + + Release + x64 + + + + {20B438DA-CBEC-4AFF-B11C-67B301D14AD5} + wpcap + Win32Proj + + + + StaticLibrary + v141 + MultiByte + true + + + StaticLibrary + v141 + MultiByte + + + StaticLibrary + v141 + MultiByte + true + + + StaticLibrary + v141 + MultiByte + + + StaticLibrary + v141 + MultiByte + true + + + StaticLibrary + v141 + MultiByte + + + StaticLibrary + v141 + MultiByte + true + + + StaticLibrary + v141 + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>15.0.28127.55 + + + $(ProjectDir)\$(Configuration)\x86\ + $(ProjectDir)\$(Configuration)\x86\ + true + + + $(ProjectDir)\$(Configuration)\x64\ + $(ProjectDir)\$(Configuration)\x64\ + true + + + $(ProjectDir)\$(Configuration)\x86\ + $(ProjectDir)\$(Configuration)\x86\ + false + + + $(ProjectDir)\$(Configuration)\x64\ + $(ProjectDir)\$(Configuration)\x64\ + false + + + $(ProjectDir)\$(Configuration)\x86\ + $(ProjectDir)\$(Configuration)\x86\ + true + + + $(ProjectDir)\$(Configuration)\x64\ + $(ProjectDir)\$(Configuration)\x64\ + true + + + $(ProjectDir)\$(Configuration)\x86\ + $(ProjectDir)\$(Configuration)\x86\ + false + + + $(ProjectDir)\$(Configuration)\x64\ + $(ProjectDir)\$(Configuration)\x64\ + false + + + + Disabled + ..\libpcap;..\libpcap\lbl;..\libpcap\bpf\;..\..\common;..\libpcap\win32\include;..\Win32-Extensions;..\..\..\AirPcap_DevPack\include;%(AdditionalIncludeDirectories) + LIBPCAP_EXPORTS;WIN32;_DEBUG;_WINDOWS;HAVE_ADDRINFO;YY_NEVER_INTERACTIVE;yylval=pcap_lval;HAVE_STRERROR;__STDC__;INET6;SIZEOF_CHAR=1;SIZEOF_SHORT=2;SIZEOF_INT=4;WPCAP;HAVE_VSNPRINTF;HAVE_REMOTE;HAVE_AIRPCAP_API;_U_=;_CRT_SECURE_NO_WARNINGS;YY_NO_UNISTD_H;HAVE_TC_API;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + Level3 + EditAndContinue + + + ws2_32.lib;packet.lib;%(AdditionalDependencies) + ..\..\packetNtx\Dll\Project\Debug\x86;%(AdditionalLibraryDirectories) + false + wpcap.def + true + Windows + MachineX86 + + + + + X64 + + + Disabled + ..\libpcap;..\libpcap\lbl;..\libpcap\bpf\;..\..\common;..\libpcap\win32\include;..\Win32-Extensions;..\..\..\AirPcap_DevPack\include;%(AdditionalIncludeDirectories) + LIBPCAP_EXPORTS;WIN32;_DEBUG;_WINDOWS;HAVE_ADDRINFO;YY_NEVER_INTERACTIVE;yylval=pcap_lval;HAVE_STRERROR;__STDC__;INET6;SIZEOF_CHAR=1;SIZEOF_SHORT=2;SIZEOF_INT=4;WPCAP;HAVE_VSNPRINTF;HAVE_REMOTE;HAVE_AIRPCAP_API;_U_=;_CRT_SECURE_NO_WARNINGS;YY_NO_UNISTD_H;HAVE_TC_API;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + Level3 + ProgramDatabase + + + ws2_32.lib;packet.lib;%(AdditionalDependencies) + ..\..\packetNtx\Dll\Project\Debug\x64;%(AdditionalLibraryDirectories) + false + wpcap.def + true + Windows + MachineX64 + + + + + ..\libpcap;..\libpcap\lbl;..\libpcap\bpf\;..\..\common;..\libpcap\win32\include;..\Win32-Extensions;..\..\..\AirPcap_DevPack\include;%(AdditionalIncludeDirectories) + LIBPCAP_EXPORTS;WIN32;NDEBUG;_WINDOWS;HAVE_ADDRINFO;YY_NEVER_INTERACTIVE;yylval=pcap_lval;HAVE_STRERROR;__STDC__;INET6;SIZEOF_CHAR=1;SIZEOF_SHORT=2;SIZEOF_INT=4;WPCAP;HAVE_VSNPRINTF;HAVE_REMOTE;HAVE_AIRPCAP_API;_U_=;_CRT_SECURE_NO_WARNINGS;YY_NO_UNISTD_H;HAVE_TC_API;%(PreprocessorDefinitions) + MultiThreaded + + Level3 + ProgramDatabase + + + ws2_32.lib;packet.lib;%(AdditionalDependencies) + ..\..\packetNtx\Dll\Project\Release\x86;%(AdditionalLibraryDirectories) + wpcap.def + true + Windows + true + true + MachineX86 + + + + + X64 + + + ..\libpcap;..\libpcap\lbl;..\libpcap\bpf\;..\..\common;..\libpcap\win32\include;..\Win32-Extensions;..\..\..\AirPcap_DevPack\include;%(AdditionalIncludeDirectories) + LIBPCAP_EXPORTS;WIN32;NDEBUG;_WINDOWS;HAVE_ADDRINFO;YY_NEVER_INTERACTIVE;yylval=pcap_lval;HAVE_STRERROR;__STDC__;INET6;SIZEOF_CHAR=1;SIZEOF_SHORT=2;SIZEOF_INT=4;WPCAP;HAVE_VSNPRINTF;HAVE_REMOTE;HAVE_AIRPCAP_API;_U_=;_CRT_SECURE_NO_WARNINGS;YY_NO_UNISTD_H;HAVE_TC_API;%(PreprocessorDefinitions) + MultiThreaded + + Level3 + ProgramDatabase + + + ws2_32.lib;packet.lib;%(AdditionalDependencies) + ..\..\packetNtx\Dll\Project\Release\x64;%(AdditionalLibraryDirectories) + wpcap.def + true + Windows + true + true + MachineX64 + + + + + Disabled + ..\libpcap;..\libpcap\lbl;..\libpcap\bpf\;..\..\common;..\libpcap\win32\include;..\Win32-Extensions;%(AdditionalIncludeDirectories) + LIBPCAP_EXPORTS;WIN32;_DEBUG;_WINDOWS;HAVE_ADDRINFO;YY_NEVER_INTERACTIVE;yylval=pcap_lval;HAVE_STRERROR;__STDC__;INET6;SIZEOF_CHAR=1;SIZEOF_SHORT=2;SIZEOF_INT=4;WPCAP;HAVE_VSNPRINTF;HAVE_REMOTE;_U_=;_CRT_SECURE_NO_WARNINGS;YY_NO_UNISTD_H;HAVE_TC_API;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + Level3 + EditAndContinue + + + ws2_32.lib;packet.lib;%(AdditionalDependencies) + ..\..\packetNtx\Dll\Project\Debug\x86;%(AdditionalLibraryDirectories) + false + wpcap.def + true + Windows + MachineX86 + + + MachineX86 + + + + + X64 + + + Disabled + ..\libpcap;..\libpcap\lbl;..\libpcap\bpf\;..\..\common;..\libpcap\win32\include;..\Win32-Extensions;%(AdditionalIncludeDirectories) + LIBPCAP_EXPORTS;WIN32;_DEBUG;_WINDOWS;HAVE_ADDRINFO;YY_NEVER_INTERACTIVE;yylval=pcap_lval;HAVE_STRERROR;__STDC__;INET6;SIZEOF_CHAR=1;SIZEOF_SHORT=2;SIZEOF_INT=4;WPCAP;HAVE_VSNPRINTF;HAVE_REMOTE;_U_=;_CRT_SECURE_NO_WARNINGS;YY_NO_UNISTD_H;HAVE_TC_API;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + Level3 + ProgramDatabase + + + ws2_32.lib;packet.lib;%(AdditionalDependencies) + ..\..\packetNtx\Dll\Project\Debug\x64;%(AdditionalLibraryDirectories) + false + wpcap.def + true + Windows + MachineX64 + + + + + ..\libpcap;..\libpcap\lbl;..\libpcap\bpf\;..\..\common;..\libpcap\win32\include;..\Win32-Extensions;%(AdditionalIncludeDirectories) + LIBPCAP_EXPORTS;WIN32;NDEBUG;_WINDOWS;HAVE_ADDRINFO;YY_NEVER_INTERACTIVE;yylval=pcap_lval;HAVE_STRERROR;__STDC__;INET6;SIZEOF_CHAR=1;SIZEOF_SHORT=2;SIZEOF_INT=4;WPCAP;HAVE_VSNPRINTF;HAVE_REMOTE;_U_=;_CRT_SECURE_NO_WARNINGS;YY_NO_UNISTD_H;HAVE_TC_API;%(PreprocessorDefinitions) + MultiThreaded + + Level3 + ProgramDatabase + + + ws2_32.lib;packet.lib;%(AdditionalDependencies) + ..\..\packetNtx\Dll\Project\Release\x86;%(AdditionalLibraryDirectories) + wpcap.def + true + Windows + true + true + MachineX86 + + + MachineX86 + + + + + X64 + + + ..\libpcap;..\libpcap\lbl;..\libpcap\bpf\;..\..\common;..\libpcap\win32\include;..\Win32-Extensions;%(AdditionalIncludeDirectories) + LIBPCAP_EXPORTS;WIN32;NDEBUG;_WINDOWS;HAVE_ADDRINFO;YY_NEVER_INTERACTIVE;yylval=pcap_lval;HAVE_STRERROR;__STDC__;INET6;SIZEOF_CHAR=1;SIZEOF_SHORT=2;SIZEOF_INT=4;WPCAP;HAVE_VSNPRINTF;HAVE_REMOTE;_U_=;_CRT_SECURE_NO_WARNINGS;YY_NO_UNISTD_H;HAVE_TC_API;%(PreprocessorDefinitions) + MultiThreaded + + Level3 + ProgramDatabase + + + ws2_32.lib;packet.lib;%(AdditionalDependencies) + ..\..\packetNtx\Dll\Project\Release\x64;%(AdditionalLibraryDirectories) + wpcap.def + true + Windows + true + true + MachineX64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/vcpkg/ports/winreg/CONTROL b/vcpkg/ports/winreg/CONTROL new file mode 100644 index 0000000..64f131c --- /dev/null +++ b/vcpkg/ports/winreg/CONTROL @@ -0,0 +1,5 @@ +Source: winreg +Version: 3.1.0 +Homepage: https://github.com/GiovanniDicanio/WinReg +Description: High-level C++ wrapper around the Windows Registry C API. +Supports: windows|uwp \ No newline at end of file diff --git a/vcpkg/ports/winreg/portfile.cmake b/vcpkg/ports/winreg/portfile.cmake new file mode 100644 index 0000000..4293dc2 --- /dev/null +++ b/vcpkg/ports/winreg/portfile.cmake @@ -0,0 +1,16 @@ +# WinReg - Header-only library +vcpkg_fail_port_install(ON_TARGET "linux" "osx") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO GiovanniDicanio/WinReg + REF d59fd46431f0c7ca5e3339918455b831c63bba25 #v3.1.0 + SHA512 98dea669415dcb4e577c92506050a9defab5ac5f70e9d783d0b379297d84e0e2b56afc230b86ff190421a0d54b283e7abe72bb3cf53ecfe3fbe90f29c335e08c + HEAD_REF master +) + +# Copy the single reusable library header +file(COPY ${SOURCE_PATH}/WinReg/WinReg.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/winsock2/CONTROL b/vcpkg/ports/winsock2/CONTROL new file mode 100644 index 0000000..1f8aff4 --- /dev/null +++ b/vcpkg/ports/winsock2/CONTROL @@ -0,0 +1,3 @@ +Source: winsock2 +Version: 0.0-2 +Description: Windows Sockets. \ No newline at end of file diff --git a/vcpkg/ports/winsock2/portfile.cmake b/vcpkg/ports/winsock2/portfile.cmake new file mode 100644 index 0000000..b684c2f --- /dev/null +++ b/vcpkg/ports/winsock2/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_get_windows_sdk(WINDOWS_SDK) + +if (WINDOWS_SDK MATCHES "10.") + set(LIBFILEPATH "$ENV{WindowsSdkDir}Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\Ws2_32.Lib") + set(HEADERSPATH "$ENV{WindowsSdkDir}Include\\${WINDOWS_SDK}\\um") +elseif(WINDOWS_SDK MATCHES "8.") + set(LIBFILEPATH "$ENV{WindowsSdkDir}Lib\\winv6.3\\um\\${TRIPLET_SYSTEM_ARCH}\\Ws2_32.Lib") + set(HEADERSPATH "$ENV{WindowsSdkDir}Include\\um") +else() + message(FATAL_ERROR "Portfile not yet configured for Windows SDK with version: ${WINDOWS_SDK}") +endif() + +if (NOT EXISTS "${LIBFILEPATH}") + message(FATAL_ERROR "Cannot find Windows ${WINDOWS_SDK} SDK. File does not exist: ${LIBFILEPATH}") +endif() + +file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +file(COPY ${LIBFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + +if (WINDOWS_SDK MATCHES "10.") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/winsock2/copyright "See https://developer.microsoft.com/windows/downloads/windows-10-sdk for the Windows 10 SDK license") +elseif(WINDOWS_SDK MATCHES "8.") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/winsock2/copyright "See https://developer.microsoft.com/windows/downloads/windows-8-1-sdk for the Windows 8.1 SDK license") +endif() + +# Allow empty include directory +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) diff --git a/vcpkg/ports/wintoast/CMakeLists.txt b/vcpkg/ports/wintoast/CMakeLists.txt new file mode 100644 index 0000000..eb70fb9 --- /dev/null +++ b/vcpkg/ports/wintoast/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.11) +project(wintoast) + +set(SRC_FILES +src/wintoastlib.cpp +) + +add_library(wintoast ${SRC_FILES}) + +target_include_directories(wintoast PUBLIC + $ + $ +) + +# Install targets +install(TARGETS wintoast + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +# Install headers +if (INSTALL_HEADERS) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/wintoastlib.h DESTINATION include/wintoast) +endif() \ No newline at end of file diff --git a/vcpkg/ports/wintoast/CONTROL b/vcpkg/ports/wintoast/CONTROL new file mode 100644 index 0000000..033a5ab --- /dev/null +++ b/vcpkg/ports/wintoast/CONTROL @@ -0,0 +1,4 @@ +Source: wintoast +Version: 1.2.0 +Description: WinToast is a lightly library written in C++ which brings a complete integration of the modern toast notifications of Windows 8 & Windows 10. +Supports: !uwp \ No newline at end of file diff --git a/vcpkg/ports/wintoast/portfile.cmake b/vcpkg/ports/wintoast/portfile.cmake new file mode 100644 index 0000000..c7f2f89 --- /dev/null +++ b/vcpkg/ports/wintoast/portfile.cmake @@ -0,0 +1,32 @@ +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + message(FATAL_ERROR "${PORT} does not currently support UWP") +endif() + +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mohabouje/WinToast + REF v1.2.0 + SHA512 d8bd44439100772929eb8a4eb4aebfd66fa54562c838eb4c081a382dc1d73c545faa6d9675e320864d9b533e4a0c4a673e44058c7f643ccd56ec90830cdfaf45 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS_RELEASE -DINSTALL_HEADERS=ON + OPTIONS_DEBUG -DINSTALL_HEADERS=OFF + +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Install license +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/woff2/CONTROL b/vcpkg/ports/woff2/CONTROL new file mode 100644 index 0000000..e4e6511 --- /dev/null +++ b/vcpkg/ports/woff2/CONTROL @@ -0,0 +1,4 @@ +Source: woff2 +Version: 1.0.2 +Build-Depends: brotli +Description: font compression reference code diff --git a/vcpkg/ports/woff2/portfile.cmake b/vcpkg/ports/woff2/portfile.cmake new file mode 100644 index 0000000..41efbba --- /dev/null +++ b/vcpkg/ports/woff2/portfile.cmake @@ -0,0 +1,32 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage( + ONLY_STATIC_LIBRARY +) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/woff2 + REF v1.0.2 + SHA512 c788bba1530aec463e755e901f9342f4b599e3a07f54645fef1dc388ab5d5c30625535e5dd38e9e792e04a640574baa50eeefb6b7338ab403755f4a4e0c3044d + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +file(COPY ${CURRENT_PACKAGES_DIR}/bin/ DESTINATION ${CURRENT_PACKAGES_DIR}/tools/woff2) +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/bin + ${CURRENT_PACKAGES_DIR}/debug/include +) + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/woff2) +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/woff2 RENAME copyright) diff --git a/vcpkg/ports/wordnet/CMakeLists.txt b/vcpkg/ports/wordnet/CMakeLists.txt new file mode 100644 index 0000000..78a16c1 --- /dev/null +++ b/vcpkg/ports/wordnet/CMakeLists.txt @@ -0,0 +1,69 @@ +cmake_minimum_required (VERSION 3.14) +project ("wordnet") +set (target_name ${CMAKE_PROJECT_NAME}) # CMAKE_PROJECT_NAME for the top-level project() call + +option (BUILD_SHARED_LIBS "Create ${target_name} as a shared library" OFF) +set (CMAKE_DEBUG_POSTFIX "d" CACHE STRING "postfix for debug lib") + +set (INCLUDE_DIR_BUILD "${CMAKE_CURRENT_LIST_DIR}/include") + +include (GNUInstallDirs) + +file (GLOB wordnet_headers ${INCLUDE_DIR_BUILD}/wn.h) +file (GLOB wordnet_srcs "lib/*.c") + +add_library (${target_name} ${wordnet_srcs} ${wordnet_headers}) + +target_include_directories (${target_name} + PRIVATE ${INCLUDE_DIR_BUILD} + PUBLIC $ +) + +set_target_properties(${target_name} PROPERTIES + C_STANDARD 11 +) + +target_compile_definitions(${PROJECT_NAME} PUBLIC DEFAULTPATH="${WORDNET_DICT_PATH}") + +if (MSVC) + set_target_properties(${target_name} PROPERTIES + VS_DEBUGGER_WORKING_DIRECTORY $ + COMPILE_FLAGS "/wd4996 /wd4267 /wd4244 /wd4047" + ) + target_compile_definitions(${PROJECT_NAME} PRIVATE _CRT_SECURE_NO_WARNINGS) + set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${target_name}) +endif() + +install (TARGETS ${target_name} EXPORT ${target_name}-targets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +) + +install(FILES + ${wordnet_headers} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${target_name} + CONFIGURATIONS Release +) + +install (EXPORT ${target_name}-targets + FILE ${target_name}-targets.cmake + NAMESPACE ${target_name}:: + DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${target_name}" +) + +configure_file(${target_name}-config.cmake.in "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${target_name}-config.cmake" @ONLY) + +install(FILES + "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${target_name}-config.cmake" + DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/${target_name}" +) + +install(DIRECTORY + dict/ DESTINATION ${WORDNET_DICT_PATH} + CONFIGURATIONS Release +) +install(DIRECTORY + doc/ DESTINATION ${CMAKE_INSTALL_DOCDIR} + CONFIGURATIONS Release +) diff --git a/vcpkg/ports/wordnet/CONTROL b/vcpkg/ports/wordnet/CONTROL new file mode 100644 index 0000000..59aca0b --- /dev/null +++ b/vcpkg/ports/wordnet/CONTROL @@ -0,0 +1,6 @@ +Source: wordnet +Version: 3.0 +Description: WordNet is a large lexical database of English + +Feature: dbfiles +Description: WordNet 3.1 database files diff --git a/vcpkg/ports/wordnet/fix_gobal_vars_uninit_local_ptr.patch b/vcpkg/ports/wordnet/fix_gobal_vars_uninit_local_ptr.patch new file mode 100644 index 0000000..8686779 --- /dev/null +++ b/vcpkg/ports/wordnet/fix_gobal_vars_uninit_local_ptr.patch @@ -0,0 +1,78 @@ +diff --git a/include/wn.h b/include/wn.h +index d3ffa08..8452377 100644 +--- a/include/wn.h ++++ b/include/wn.h +@@ -151,14 +151,6 @@ + #define PREDICATIVE PADJ + #define IMMED_POSTNOMINAL IPADJ + +-extern char *wnrelease; /* WordNet release/version number */ +- +-extern char *lexfiles[]; /* names of lexicographer files */ +-extern char *ptrtyp[]; /* pointer characters */ +-extern char *partnames[]; /* POS strings */ +-extern char partchars[]; /* single chars for each POS */ +-extern char *adjclass[]; /* adjective class strings */ +-extern char *frametext[]; /* text of verb frames */ + + /* Data structures used by search code functions. */ + +@@ -236,6 +228,21 @@ typedef struct { + + typedef SearchResults *SearchResultsPtr; + ++/* Make all the functions compatible with c++ files */ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++extern char* wnrelease; /* WordNet release/version number */ ++ ++extern char* lexfiles[]; /* names of lexicographer files */ ++extern char* ptrtyp[]; /* pointer characters */ ++extern char* partnames[]; /* POS strings */ ++extern char partchars[]; /* single chars for each POS */ ++extern char* adjclass[]; /* adjective class strings */ ++extern char* frametext[]; /* text of verb frames */ ++ ++ + /* Global variables and flags */ + + extern SearchResults wnresults; /* structure containing results of search */ +@@ -271,11 +278,6 @@ extern int default_display_message(char *); + extern int (*display_message)(char *); + + +-/* Make all the functions compatible with c++ files */ +-#ifdef __cplusplus +-extern "C" { +-#endif +- + /* External library function prototypes */ + + /*** Search and database functions (search.c) ***/ +diff --git a/lib/search.c b/lib/search.c +index 1cdedc3..72c4bb5 100644 +--- a/lib/search.c ++++ b/lib/search.c +@@ -1256,7 +1256,7 @@ static void add_relatives(int pos, IndexPtr idx, int rel1, int rel2) + { + int i; + struct relgrp *rel, *last, *r; +- ++ last = NULL; + /* If either of the new relatives are already in a relative group, + then add the other to the existing group (transitivity). + Otherwise create a new group and add these 2 senses to it. */ +@@ -1281,8 +1281,9 @@ static void add_relatives(int pos, IndexPtr idx, int rel1, int rel2) + rel->senses[rel1] = rel->senses[rel2] = 1; + if (rellist == NULL) + rellist = rel; +- else +- last->next = rel; ++ else if (last) { ++ last->next = rel; ++ } + } + + static struct relgrp *mkrellist(void) diff --git a/vcpkg/ports/wordnet/portfile.cmake b/vcpkg/ports/wordnet/portfile.cmake new file mode 100644 index 0000000..1f31931 --- /dev/null +++ b/vcpkg/ports/wordnet/portfile.cmake @@ -0,0 +1,54 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +set(VERSION 3.0) + +vcpkg_download_distfile(ARCHIVE + URLS "http://wordnetcode.princeton.edu/${VERSION}/WordNet-${VERSION}.tar.gz" + FILENAME "wordnet-${VERSION}.tar.gz" + SHA512 9539bc016d710f31d65072bbf5068edffcd735978d8cc6f1b361b19428b97546ef6c7e246e1b6f2ff4557a0885a8305341e35173a6723f0740dda18d097ca248 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + REF ${VERSION} + PATCHES + fix_gobal_vars_uninit_local_ptr.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY ${CMAKE_CURRENT_LIST_DIR}/wordnet-config.cmake.in DESTINATION ${SOURCE_PATH}) + +if("dbfiles" IN_LIST FEATURES) + vcpkg_download_distfile(WORDNET_DICT_DBFILES + URLS "http://wordnetcode.princeton.edu/wn3.1.dict.tar.gz" + FILENAME "wordnet-cache/wn3.1.dict.tar.gz" + SHA512 16dca17a87026d8a0b7b4758219cd21a869c3ef3da23ce7875924546f2eacac4c2f376cb271b798b2c458fe8c078fb43d681356e3d9beef40f4bd88d3579394f + ) + file(REMOVE_RECURSE "${SOURCE_PATH}/dict/") + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH WORDNET_DICT_DBFILES_EX + ARCHIVE ${WORDNET_DICT_DBFILES} + REF 3.1 + WORKING_DIRECTORY ${SOURCE_PATH} + ) + file(RENAME ${WORDNET_DICT_DBFILES_EX} "${SOURCE_PATH}/dict") +endif() + +set (WORDNET_DICT_PATH "${CURRENT_PACKAGES_DIR}/tools/${PORT}/dict") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DWORDNET_DICT_PATH=${WORDNET_DICT_PATH} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/wordnet RENAME copyright) + diff --git a/vcpkg/ports/wordnet/wordnet-config.cmake.in b/vcpkg/ports/wordnet/wordnet-config.cmake.in new file mode 100644 index 0000000..1de99b5 --- /dev/null +++ b/vcpkg/ports/wordnet/wordnet-config.cmake.in @@ -0,0 +1,14 @@ +# Config file for the wordnet package + +get_filename_component(_WORDNET_PREFIX_DIR "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY) + +set (_TARGET_NAME "wordnet") + +set (WORDNET_DICT_PATH @WORDNET_DICT_PATH@) +message (STATUS "WORDNET_DICT_PATH: @WORDNET_DICT_PATH@") + +# IMPORTED targets for wordnet +include("${_WORDNET_PREFIX_DIR}/${_TARGET_NAME}-targets.cmake") + +set(_WORDNET_PREFIX_DIR) +set(_TARGET_NAME) diff --git a/vcpkg/ports/wpilib/CONTROL b/vcpkg/ports/wpilib/CONTROL new file mode 100644 index 0000000..9135215 --- /dev/null +++ b/vcpkg/ports/wpilib/CONTROL @@ -0,0 +1,14 @@ +Source: wpilib +Version: 2020.3.2 +Homepage: https://github.com/wpilibsuite/allwpilib +Build-Depends: eigen3, libuv +Description: WPILib is the software library package for the FIRST Robotics Competition. The core install includes wpiutil, a common utilies library, and ntcore, the base NetworkTables library. +Supports: !osx + +Feature: cameraserver +Build-Depends: opencv +Description: Enables the CameraServer and CSCore libraries for manipulating USB Cameras and HTTP Camera Streams + +Feature: allwpilib +Build-Depends: wpilib[cameraserver], opencv +Description: Enables the simulation HAL, and the high level wpilibc library. diff --git a/vcpkg/ports/wpilib/portfile.cmake b/vcpkg/ports/wpilib/portfile.cmake new file mode 100644 index 0000000..cbe4051 --- /dev/null +++ b/vcpkg/ports/wpilib/portfile.cmake @@ -0,0 +1,62 @@ +vcpkg_fail_port_install(ON_TARGET "OSX") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO wpilibsuite/allwpilib + REF 35eb90c135eba994a2ca2cbd50a68c367910f4b6 + SHA512 55bc608632ab67c097f3cce7c5ad9790b2b123a633c93bf5b4008f90bf79538cc142c911850d5f49b75e3a12f43ffad9f6f5f9bcdf1351cce7513ecc4b04e439 +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + INVERTED_FEATURES + cameraserver WITHOUT_CSCORE + allwpilib WITHOUT_ALLWPILIB +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + + OPTIONS + -DWITHOUT_JAVA=ON + ${FEATURE_OPTIONS} + -DUSE_VCPKG_LIBUV=ON + -DUSE_VCPKG_EIGEN=ON + -DFLAT_INSTALL_WPILIB=ON +) +vcpkg_install_cmake() + +file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/include/ntcore/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/include/wpiutil/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +if ("allwpilib" IN_LIST FEATURES) + file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/include/wpilibc/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) + file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/include/hal/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/gen) +endif() + +if ("cameraserver" IN_LIST FEATURES) + file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/include/cameraserver/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) + file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/include/cscore/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) +endif() + +if(NOT VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/bin FILES_MATCHING PATTERN "*.dll") + file(COPY ${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin FILES_MATCHING PATTERN "*.dll") + + file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/bin FILES_MATCHING PATTERN "*.so") + file(COPY ${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin FILES_MATCHING PATTERN "*.so") + + file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/bin FILES_MATCHING PATTERN "*.dylib") + file(COPY ${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin FILES_MATCHING PATTERN "*.dylib") +endif() + +file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib FILES_MATCHING PATTERN "*.lib") +file(COPY ${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib FILES_MATCHING PATTERN "*.lib") + +file(COPY ${CURRENT_PACKAGES_DIR}/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib FILES_MATCHING PATTERN "*.a") +file(COPY ${CURRENT_PACKAGES_DIR}/debug/wpilib/lib/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib FILES_MATCHING PATTERN "*.a") + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/wren/CMakeLists.txt b/vcpkg/ports/wren/CMakeLists.txt new file mode 100644 index 0000000..b57a6a9 --- /dev/null +++ b/vcpkg/ports/wren/CMakeLists.txt @@ -0,0 +1,50 @@ +# CMake taken from https://github.com/walterschell/wren/blob/cmake/CMakeLists.txt + +# Need transitive dependencies introduced in 2.8.12 +cmake_minimum_required(VERSION 2.8.12) + +project(Wren LANGUAGES "C") + +set(wren_warning_flags "-Wall" "-Wextra" "-Werror" "-Wno-unused-parameter") + +IF (WIN32) + ADD_DEFINITIONS (-D_CRT_SECURE_NO_WARNINGS ) +ENDIF () + +set(opt_DIR "src/optional") +set(vm_DIR "src/vm") + +# TODO: Don't glob +file(GLOB opt_SRCS ${opt_DIR}/*.c) +file(GLOB vm_SRCS ${vm_DIR}/*.c) + +set(wren_SRCS ${vm_SRCS} ${opt_SRCS}) + +add_library(wren ${wren_SRCS}) + +target_include_directories(wren PUBLIC src/include PRIVATE src/vm src/optional) + +target_link_libraries(wren INTERFACE m) + +target_compile_options(wren PRIVATE "-Wall") + +if (CMAKE_BUILD_TYPE STREQUAL "Debug") + target_compile_options(wren PUBLIC -DDEBUG) +endif() + + +INSTALL (TARGETS wren + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib +) + + +IF (NOT DEFINED SKIP_INSTALL_HEADERS) + INSTALL( + FILES + src/include/wren.h + src/include/wren.hpp + DESTINATION include + ) +ENDIF () diff --git a/vcpkg/ports/wren/CONTROL b/vcpkg/ports/wren/CONTROL new file mode 100644 index 0000000..7ea85e1 --- /dev/null +++ b/vcpkg/ports/wren/CONTROL @@ -0,0 +1,4 @@ +Source: wren +Version: 2019-07-01 +Homepage: https://github.com/wren-lang/wren +Description: Wren is a small, fast, class-based concurrent scripting language. diff --git a/vcpkg/ports/wren/portfile.cmake b/vcpkg/ports/wren/portfile.cmake new file mode 100644 index 0000000..dbd71b8 --- /dev/null +++ b/vcpkg/ports/wren/portfile.cmake @@ -0,0 +1,27 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO wren-lang/wren + REF d1a0d0682ac072fa20f2dcca356dac06565e93a1 + SHA512 d6b7555da10ea209d04308467563ec401f699a22ca8524e4ae65fd050b0403c5e70430047dbb6a883b8021ab50525c17bb63d76543e7c59dfe4b521cfde6c413 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCOMPILE_AS_CPP=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/wt/0002-link-glew.patch b/vcpkg/ports/wt/0002-link-glew.patch new file mode 100644 index 0000000..af441e8 --- /dev/null +++ b/vcpkg/ports/wt/0002-link-glew.patch @@ -0,0 +1,23 @@ +From 6301c4ccaf8d3b6982898fed84e691ab8ddd7a4f Mon Sep 17 00:00:00 2001 +From: Robert Schumacher +Date: Fri, 23 Feb 2018 03:12:45 -0800 +Subject: [PATCH 2/3] link glew + + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 80734fb..70e755b 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -556,7 +556,8 @@ ENDIF("${WT_WRASTERIMAGE_IMPLEMENTATION}" STREQUAL "GraphicsMagick") + IF(HAVE_GL) + INCLUDE_DIRECTORIES(${GL_INCLUDE_DIRS}) + IF(USE_SYSTEM_GLEW) +- TARGET_LINK_LIBRARIES(wt PRIVATE GLEW) ++ find_package(glew REQUIRED) ++ TARGET_LINK_LIBRARIES(wt PRIVATE GLEW::GLEW) + ENDIF(USE_SYSTEM_GLEW) + TARGET_LINK_LIBRARIES(wt PRIVATE ${GL_LIBRARIES}) + ELSE(HAVE_GL) +-- +2.16.2.windows.1 + diff --git a/vcpkg/ports/wt/0005-XML_file_path.patch b/vcpkg/ports/wt/0005-XML_file_path.patch new file mode 100644 index 0000000..b2be62c --- /dev/null +++ b/vcpkg/ports/wt/0005-XML_file_path.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ca19b30..4765632 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -197,7 +197,11 @@ SET(CMAKE_INSTALL_DIR "${LIB_INSTALL_DIR}/cmake" CACHE STRING + + IF(WIN32) + +- SET(RUNDIR "c:/witty") # Does not apply to win32 ++ if (NOT INSTALL_CONFIG_FILE_PATH) ++ SET(RUNDIR "c:/witty") # Does not apply to win32 ++ else() ++ SET(RUNDIR ${INSTALL_CONFIG_FILE_PATH}) # Does not apply to win32 ++ endif() + + IF(NOT DEFINED CONFIGDIR) + SET(CONFIGDIR ${RUNDIR} CACHE STRING "Path for the configuration files") diff --git a/vcpkg/ports/wt/0006-GraphicsMagick.patch b/vcpkg/ports/wt/0006-GraphicsMagick.patch new file mode 100644 index 0000000..2f1b50a --- /dev/null +++ b/vcpkg/ports/wt/0006-GraphicsMagick.patch @@ -0,0 +1,29 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5012cfd1b..95f812685 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -338,7 +338,7 @@ ELSE (CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION LESS 8) + ENDIF (CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION LESS 8) + + IF (${WT_WRASTERIMAGE_IMPLEMENTATION} STREQUAL "GraphicsMagick") +- IF (NOT GM_FOUND) ++ IF (0) + MESSAGE(FATAL_ERROR "WT_WRASTERIMAGE_IMPLEMENTATION set to GraphicsMagick but GM is not found. Indicate the location of your graphicsmagick library using -DGM_PREFIX=...") + ENDIF (NOT GM_FOUND) + SET(WT_HAS_WRASTERIMAGE true) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 78d82ee53..01ac5f42a 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -595,8 +595,9 @@ ELSE(HAVE_HARU) + ENDIF(HAVE_HARU) + + IF("${WT_WRASTERIMAGE_IMPLEMENTATION}" STREQUAL "GraphicsMagick") +- TARGET_LINK_LIBRARIES(wt PRIVATE ${GM_LIBRARIES}) +- INCLUDE_DIRECTORIES(${GM_INCLUDE_DIRS}) ++ find_package(unofficial-graphicsmagick REQUIRED) ++ TARGET_LINK_LIBRARIES(wt PRIVATE unofficial::graphicsmagick::graphicsmagick) ++ # INCLUDE_DIRECTORIES(${GM_INCLUDE_DIRS}) + ADD_DEFINITIONS(-DHAVE_GRAPHICSMAGICK) + ELSEIF("${WT_WRASTERIMAGE_IMPLEMENTATION}" STREQUAL "skia") + TARGET_LINK_LIBRARIES(wt PRIVATE ${SKIA_LIBRARIES}) diff --git a/vcpkg/ports/wt/CONTROL b/vcpkg/ports/wt/CONTROL new file mode 100644 index 0000000..c8ea4d0 --- /dev/null +++ b/vcpkg/ports/wt/CONTROL @@ -0,0 +1,29 @@ +Source: wt +Version: 4.4.0 +Homepage: https://github.com/emweb/wt +Description: Wt is a C++ library for developing web applications +Build-Depends: zlib, libpng, pango (!windows), harfbuzz (!windows), libharu, glew, boost-algorithm, boost-array, boost-asio, boost-bind, boost-config, boost-container-hash, boost-filesystem, boost-fusion, boost-interprocess, boost-lexical-cast, boost-logic, boost-math, boost-multi-index, boost-optional, boost-phoenix, boost-pool, boost-program-options, boost-range, boost-serialization, boost-smart-ptr, boost-spirit, boost-system, boost-thread, boost-tokenizer, boost-tuple, boost-ublas, boost-variant +Default-Features: openssl + +Feature: dbo +Description: Wt::Dbo + +Feature: postgresql +Description: Wt::Dbo PostgreSQL backend +Build-Depends: libpq, wt[dbo] + +Feature: sqlite3 +Description: Wt::Dbo Sqlite 3 backend +Build-Depends: sqlite3, wt[dbo] + +Feature: sqlserver +Description: Wt::Dbo MS SQL Server backend +Build-Depends: unixodbc (!windows), wt[dbo] + +Feature: openssl +Description: TLS support +Build-Depends: openssl + +Feature: graphicsmagick +Description: WRasterImage support on non-Windows based on GraphicsMagick +Build-Depends: graphicsmagick diff --git a/vcpkg/ports/wt/portfile.cmake b/vcpkg/ports/wt/portfile.cmake new file mode 100644 index 0000000..f324772 --- /dev/null +++ b/vcpkg/ports/wt/portfile.cmake @@ -0,0 +1,83 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO emweb/wt + REF 9c6b7807b4fdaefe659ff9ab8ff4ba3937e62b2f # 4.4.0 + SHA512 d9947180bb82750f9fa81212d343e8a719e6085e4c41327fd178ce0f93c5ef0f5a11e64d066871ac339abc973081cbd9580042fb8625f3cf3738a722439ba1e3 + HEAD_REF master + PATCHES + 0002-link-glew.patch + 0005-XML_file_path.patch + 0006-GraphicsMagick.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SHARED_LIBS) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + dbo ENABLE_LIBWTDBO + postgresql ENABLE_POSTGRES + sqlite3 ENABLE_SQLITE + sqlserver ENABLE_MSSQLSERVER + openssl ENABLE_SSL +) + +if(VCPKG_TARGET_IS_WINDOWS) + set(WT_PLATFORM_SPECIFIC_OPTIONS + -DWT_WRASTERIMAGE_IMPLEMENTATION=Direct2D + -DCONNECTOR_ISAPI=ON + -DENABLE_PANGO=OFF) +else() + set(WT_PLATFORM_SPECIFIC_OPTIONS + -DCONNECTOR_FCGI=OFF + -DENABLE_PANGO=ON + -DHARFBUZZ_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/harfbuzz) + + if ("graphicsmagick" IN_LIST FEATURES) + list(APPEND WT_PLATFORM_SPECIFIC_OPTIONS + -DWT_WRASTERIMAGE_IMPLEMENTATION=GraphicsMagick) + else() + list(APPEND WT_PLATFORM_SPECIFIC_OPTIONS + -DWT_WRASTERIMAGE_IMPLEMENTATION=none) + endif() +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DINSTALL_CONFIG_FILE_PATH="${DOWNLOADS}/wt" + -DSHARED_LIBS=${SHARED_LIBS} + -DBOOST_DYNAMIC=${SHARED_LIBS} + -DDISABLE_BOOST_AUTOLINK=ON + -DBUILD_EXAMPLES=OFF + -DBUILD_TESTS=OFF + + -DCONNECTOR_HTTP=ON + -DENABLE_HARU=ON + -DHARU_DYNAMIC=${SHARED_LIBS} + -DENABLE_MYSQL=OFF + -DENABLE_FIREBIRD=OFF + -DENABLE_QT4=OFF + -DENABLE_QT5=OFF + -DENABLE_LIBWTTEST=ON + -DENABLE_OPENGL=ON + + ${FEATURE_OPTIONS} + ${WT_PLATFORM_SPECIFIC_OPTIONS} + + -DUSE_SYSTEM_SQLITE3=ON + -DUSE_SYSTEM_GLEW=ON + + -DCMAKE_INSTALL_DIR=share +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +# There is no way to suppress installation of the headers and resource files in debug build. +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/var) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/var) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/wtl/CONTROL b/vcpkg/ports/wtl/CONTROL new file mode 100644 index 0000000..db55ce5 --- /dev/null +++ b/vcpkg/ports/wtl/CONTROL @@ -0,0 +1,4 @@ +Source: wtl +Version: 10.0.10077 +Homepage: https://sourceforge.net/projects/wtl/ +Description: Windows Template Library (WTL) is a C++ library for developing Windows applications and UI components. diff --git a/vcpkg/ports/wtl/portfile.cmake b/vcpkg/ports/wtl/portfile.cmake new file mode 100644 index 0000000..0f8d189 --- /dev/null +++ b/vcpkg/ports/wtl/portfile.cmake @@ -0,0 +1,14 @@ +vcpkg_from_sourceforge( + OUT_SOURCE_PATH SOURCE_PATH + REPO wtl/WTL%2010 + REF WTL%2010.0.10077 + FILENAME "WTL10_1077..zip" + NO_REMOVE_ONE_LEVEL + SHA512 5a49283196caf5b2ad8a3fb3cfa5d09cd555d59d4d5871408bf6a5b850cf4546cc6ece4e0bf79d152a4d2589fae3749f0f3e73ab6a3a7bc0cb373efa1474b98b +) + +file(INSTALL ${SOURCE_PATH}/Include/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT} FILES_MATCHING PATTERN "*.h") +file(COPY ${SOURCE_PATH}/Samples DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(COPY ${SOURCE_PATH}/AppWizard DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +file(INSTALL ${SOURCE_PATH}/MS-PL.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/wxchartdir/CMakeLists.txt b/vcpkg/ports/wxchartdir/CMakeLists.txt new file mode 100644 index 0000000..3ad4389 --- /dev/null +++ b/vcpkg/ports/wxchartdir/CMakeLists.txt @@ -0,0 +1,33 @@ +cmake_minimum_required(VERSION 3.13) +project(wxchartdir CXX) + +set(wxWidgets_EXCLUDE_COMMON_LIBRARIES TRUE) +find_package(wxWidgets REQUIRED COMPONENTS core base) +include(${wxWidgets_USE_FILE}) + +find_package(chartdir CONFIG REQUIRED) + +add_library(wxchartdir STATIC wxdemo/common/wxchartviewer.cpp) + +target_include_directories(wxchartdir PUBLIC + $ +) + +target_link_libraries(wxchartdir + PRIVATE ${wxWidgets_LIBRARIES} + PRIVATE chartdir +) + +install(TARGETS wxchartdir EXPORT wxchartdir-config + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +install(EXPORT wxchartdir-config DESTINATION share/cmake/wxchartdir) + +install(FILES wxdemo/common/mondrian.xpm DESTINATION include/wxchartdir) +install(FILES wxdemo/common/wxchartviewer.h DESTINATION include/wxchartdir) +install(FILES wxdemo/common/wxchartviewer_defs.h DESTINATION include/wxchartdir) +install(FILES wxdemo/common/wxchartviewer_version.h DESTINATION include/wxchartdir) +install(FILES wxdemo/common/wxchartviewer_version.rc DESTINATION include/wxchartdir) diff --git a/vcpkg/ports/wxchartdir/CONTROL b/vcpkg/ports/wxchartdir/CONTROL new file mode 100644 index 0000000..22a7419 --- /dev/null +++ b/vcpkg/ports/wxchartdir/CONTROL @@ -0,0 +1,5 @@ +Source: wxchartdir +Version: 1.0.0 +Build-Depends: chartdir, wxwidgets +Homepage: https://github.com/utelle/wxchartdir +Description: wxChartDir provides components for the integration and use of the commercial C++ library ChartDirector, a universal chart component developed by Advanced Software Engineering Ltd, in wxWidgets based applications. diff --git a/vcpkg/ports/wxchartdir/portfile.cmake b/vcpkg/ports/wxchartdir/portfile.cmake new file mode 100644 index 0000000..51506f1 --- /dev/null +++ b/vcpkg/ports/wxchartdir/portfile.cmake @@ -0,0 +1,48 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO utelle/wxchartdir + REF v1.0.0 + SHA512 018e588a4bcff594e0049c64597d55b680e58ae239822fcc20d415a1efd8a6b3c0c7c6c836969f01a378209307b9720b938e3826a31e18c843d52897b44b4818 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_from_github( + OUT_SOURCE_PATH VCPKG_WX_FIND_SOURCE_PATH + REPO CaeruleusAqua/vcpkg-wx-find + REF 17993e942f677799b488a06ca659a8e46ff272c9 + SHA512 0fe07d3669f115c9b6a761abd7743f87e67f24d1eae3f3abee4715fa4d6b76af0d1ea3a4bd82dbdbed430ae50295e1722615ce0ee7d46182125f5048185ee153 + HEAD_REF master +) + +file(COPY ${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake DESTINATION ${VCPKG_WX_FIND_SOURCE_PATH}) +file(COPY ${CMAKE_ROOT}/Modules/FindPackageMessage.cmake DESTINATION ${VCPKG_WX_FIND_SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCMAKE_MODULE_PATH=${VCPKG_WX_FIND_SOURCE_PATH} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/wxchartdir) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +configure_file(${SOURCE_PATH}/COPYING.txt ${CURRENT_PACKAGES_DIR}/share/wxchartdir/copyright COPYONLY) + +file(COPY ${SOURCE_PATH}/CHARTDIRECTOR-LICENSE.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/wxchartdir) +file(COPY ${SOURCE_PATH}/CHARTDIRECTOR-README.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/wxchartdir) +file(COPY ${SOURCE_PATH}/GPL-3.0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/wxchartdir) +file(COPY ${SOURCE_PATH}/LGPL-3.0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/wxchartdir) +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/wxchartdir) +file(COPY ${SOURCE_PATH}/LICENSE.spdx DESTINATION ${CURRENT_PACKAGES_DIR}/share/wxchartdir) +file(COPY ${SOURCE_PATH}/WxWindows-exception-3.1.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/wxchartdir) diff --git a/vcpkg/ports/wxwidgets/CONTROL b/vcpkg/ports/wxwidgets/CONTROL new file mode 100644 index 0000000..35d3b46 --- /dev/null +++ b/vcpkg/ports/wxwidgets/CONTROL @@ -0,0 +1,7 @@ +Source: wxwidgets +Version: 3.1.4 +Port-Version: 3 +Homepage: https://github.com/wxWidgets/wxWidgets +Description: wxWidgets is a widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications. +Build-Depends: zlib, libpng, tiff, expat +Supports: !uwp diff --git a/vcpkg/ports/wxwidgets/disable-platform-lib-dir.patch b/vcpkg/ports/wxwidgets/disable-platform-lib-dir.patch new file mode 100644 index 0000000..930477c --- /dev/null +++ b/vcpkg/ports/wxwidgets/disable-platform-lib-dir.patch @@ -0,0 +1,13 @@ +diff --git a/build/cmake/init.cmake b/build/cmake/init.cmake +index d013e92..c03135d 100644 +--- a/build/cmake/init.cmake ++++ b/build/cmake/init.cmake +@@ -149,7 +149,7 @@ else() + set(wxCOMPILER_PREFIX) + endif() + +-if(MSVC) ++if(MSVC AND NOT wxBUILD_DISABLE_PLATFORM_LIB_DIR) + if(wxBUILD_SHARED) + set(lib_suffix "dll") + else() diff --git a/vcpkg/ports/wxwidgets/fix-stl-build-vs2019-16.6.patch b/vcpkg/ports/wxwidgets/fix-stl-build-vs2019-16.6.patch new file mode 100644 index 0000000..e028112 --- /dev/null +++ b/vcpkg/ports/wxwidgets/fix-stl-build-vs2019-16.6.patch @@ -0,0 +1,202 @@ +From 590e32c60b1dfb32b34632f3d1b0b5cf7c8e4b84 Mon Sep 17 00:00:00 2001 +From: Maarten Bent +Date: Sat, 1 Aug 2020 11:54:26 +0200 +Subject: [PATCH] Fix building with wxUSE_STL enabled in VS2019 16.6 + +Exporting standard C++ library types is not allowed any more, see + +https://developercommunity.visualstudio.com/content/problem/1042081/142628801includexhash201332-error-c2338-this-funct.html + +so don't use DLL export declarations for wxHash{Map,Set} classes, which +derive from std::{map,set}. + +Since the classes are header-only, this should have no direct +consequences. Only classes that extend wxHashMap or wxHashSet, like +wxImageHistogram, have to be made header only as well. + +Remove the wxLogError message in wxImageHistogram::FindFirstUnusedColour, so +log.h and translation.h do not have to be included in the header. + +Closes https://github.com/wxWidgets/wxWidgets/pull/2009 +--- + include/wx/hashmap.h | 9 ++++++--- + include/wx/hashset.h | 6 ++++-- + include/wx/image.h | 42 ++++++++++++++++++++++++++++++++++++++---- + src/common/image.cpp | 43 ------------------------------------------- + 4 files changed, 48 insertions(+), 52 deletions(-) + +diff --git a/include/wx/hashmap.h b/include/wx/hashmap.h +index df9092a3823..86700f40ca9 100644 +--- a/include/wx/hashmap.h ++++ b/include/wx/hashmap.h +@@ -678,24 +678,27 @@ public: \ + + // and these do exactly the same thing but should be used inside the + // library ++// note: DECL is not used since the class is inline + #define WX_DECLARE_HASH_MAP_WITH_DECL( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, CLASSNAME, DECL) \ +- _WX_DECLARE_HASH_MAP( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, CLASSNAME, DECL ) ++ _WX_DECLARE_HASH_MAP( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, CLASSNAME, class ) + + #define WX_DECLARE_EXPORTED_HASH_MAP( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, CLASSNAME) \ + WX_DECLARE_HASH_MAP_WITH_DECL( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, \ + CLASSNAME, class WXDLLIMPEXP_CORE ) + ++// note: DECL is not used since the class is inline + #define WX_DECLARE_STRING_HASH_MAP_WITH_DECL( VALUE_T, CLASSNAME, DECL ) \ + _WX_DECLARE_HASH_MAP( wxString, VALUE_T, wxStringHash, wxStringEqual, \ +- CLASSNAME, DECL ) ++ CLASSNAME, class ) + + #define WX_DECLARE_EXPORTED_STRING_HASH_MAP( VALUE_T, CLASSNAME ) \ + WX_DECLARE_STRING_HASH_MAP_WITH_DECL( VALUE_T, CLASSNAME, \ + class WXDLLIMPEXP_CORE ) + ++// note: DECL is not used since the class is inline + #define WX_DECLARE_VOIDPTR_HASH_MAP_WITH_DECL( VALUE_T, CLASSNAME, DECL ) \ + _WX_DECLARE_HASH_MAP( void*, VALUE_T, wxPointerHash, wxPointerEqual, \ +- CLASSNAME, DECL ) ++ CLASSNAME, class ) + + #define WX_DECLARE_EXPORTED_VOIDPTR_HASH_MAP( VALUE_T, CLASSNAME ) \ + WX_DECLARE_VOIDPTR_HASH_MAP_WITH_DECL( VALUE_T, CLASSNAME, \ +diff --git a/include/wx/hashset.h b/include/wx/hashset.h +index bb713b87f4f..311aeca9a6e 100644 +--- a/include/wx/hashset.h ++++ b/include/wx/hashset.h +@@ -159,8 +159,9 @@ public: \ + + // and these do exactly the same thing but should be used inside the + // library ++// note: DECL is not used since the class is inline + #define WX_DECLARE_HASH_SET_WITH_DECL( KEY_T, HASH_T, KEY_EQ_T, CLASSNAME, DECL) \ +- _WX_DECLARE_HASH_SET( KEY_T, HASH_T, KEY_EQ_T, wxPTROP_NORMAL, CLASSNAME, DECL ) ++ _WX_DECLARE_HASH_SET( KEY_T, HASH_T, KEY_EQ_T, wxPTROP_NORMAL, CLASSNAME, class ) + + #define WX_DECLARE_EXPORTED_HASH_SET( KEY_T, HASH_T, KEY_EQ_T, CLASSNAME) \ + WX_DECLARE_HASH_SET_WITH_DECL( KEY_T, HASH_T, KEY_EQ_T, \ +@@ -173,8 +174,9 @@ public: \ + // common compilers (notably Sun CC). + #define WX_DECLARE_HASH_SET_PTR( KEY_T, HASH_T, KEY_EQ_T, CLASSNAME) \ + _WX_DECLARE_HASH_SET( KEY_T, HASH_T, KEY_EQ_T, wxPTROP_NOP, CLASSNAME, class ) ++// note: DECL is not used since the class is inline + #define WX_DECLARE_HASH_SET_WITH_DECL_PTR( KEY_T, HASH_T, KEY_EQ_T, CLASSNAME, DECL) \ +- _WX_DECLARE_HASH_SET( KEY_T, HASH_T, KEY_EQ_T, wxPTROP_NOP, CLASSNAME, DECL ) ++ _WX_DECLARE_HASH_SET( KEY_T, HASH_T, KEY_EQ_T, wxPTROP_NOP, CLASSNAME, class ) + + // delete all hash elements + // +diff --git a/include/wx/image.h b/include/wx/image.h +index f2b5866d2d7..d53ff0b1165 100644 +--- a/include/wx/image.h ++++ b/include/wx/image.h +@@ -190,7 +190,7 @@ WX_DECLARE_EXPORTED_HASH_MAP(unsigned long, wxImageHistogramEntry, + wxIntegerHash, wxIntegerEqual, + wxImageHistogramBase); + +-class WXDLLIMPEXP_CORE wxImageHistogram : public wxImageHistogramBase ++class wxImageHistogram : public wxImageHistogramBase + { + public: + wxImageHistogram() : wxImageHistogramBase(256) { } +@@ -211,9 +211,43 @@ class WXDLLIMPEXP_CORE wxImageHistogram : public wxImageHistogramBase + bool FindFirstUnusedColour(unsigned char *r, + unsigned char *g, + unsigned char *b, +- unsigned char startR = 1, +- unsigned char startG = 0, +- unsigned char startB = 0 ) const; ++ unsigned char r2 = 1, ++ unsigned char g2 = 0, ++ unsigned char b2 = 0 ) const ++ { ++ unsigned long key = MakeKey(r2, g2, b2); ++ ++ while ( find(key) != end() ) ++ { ++ // color already used ++ r2++; ++ if ( r2 >= 255 ) ++ { ++ r2 = 0; ++ g2++; ++ if ( g2 >= 255 ) ++ { ++ g2 = 0; ++ b2++; ++ if ( b2 >= 255 ) ++ { ++ return false; ++ } ++ } ++ } ++ ++ key = MakeKey(r2, g2, b2); ++ } ++ ++ if ( r ) ++ *r = r2; ++ if ( g ) ++ *g = g2; ++ if ( b ) ++ *b = b2; ++ ++ return true; ++ } + }; + + //----------------------------------------------------------------------------- +diff --git a/src/common/image.cpp b/src/common/image.cpp +index 096f823f0c1..880c1c4ea74 100644 +--- a/src/common/image.cpp ++++ b/src/common/image.cpp +@@ -3381,49 +3381,6 @@ wxImageHandler::GetResolutionFromOptions(const wxImage& image, int *x, int *y) + // image histogram stuff + // ---------------------------------------------------------------------------- + +-bool +-wxImageHistogram::FindFirstUnusedColour(unsigned char *r, +- unsigned char *g, +- unsigned char *b, +- unsigned char r2, +- unsigned char g2, +- unsigned char b2) const +-{ +- unsigned long key = MakeKey(r2, g2, b2); +- +- while ( find(key) != end() ) +- { +- // color already used +- r2++; +- if ( r2 >= 255 ) +- { +- r2 = 0; +- g2++; +- if ( g2 >= 255 ) +- { +- g2 = 0; +- b2++; +- if ( b2 >= 255 ) +- { +- wxLogError(_("No unused colour in image.") ); +- return false; +- } +- } +- } +- +- key = MakeKey(r2, g2, b2); +- } +- +- if ( r ) +- *r = r2; +- if ( g ) +- *g = g2; +- if ( b ) +- *b = b2; +- +- return true; +-} +- + bool + wxImage::FindFirstUnusedColour(unsigned char *r, + unsigned char *g, diff --git a/vcpkg/ports/wxwidgets/portfile.cmake b/vcpkg/ports/wxwidgets/portfile.cmake new file mode 100644 index 0000000..13bbc9c --- /dev/null +++ b/vcpkg/ports/wxwidgets/portfile.cmake @@ -0,0 +1,76 @@ +vcpkg_fail_port_install(ON_TARGET "uwp") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO wxWidgets/wxWidgets + REF v3.1.4 + SHA512 108e35220de10afbfc58762498ada9ece0b3166f56a6d11e11836d51bfbaed1de3033c32ed4109992da901fecddcf84ce8a1ba47303f728c159c638dac77d148 + HEAD_REF master + PATCHES + disable-platform-lib-dir.patch + fix-stl-build-vs2019-16.6.patch +) + +set(OPTIONS) +if(VCPKG_TARGET_IS_OSX) + set(OPTIONS -DCOTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES=9999) +endif() + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64 OR VCPKG_TARGET_ARCHITECTURE STREQUAL arm) + set(OPTIONS + -DwxUSE_OPENGL=OFF + -DwxUSE_STACKWALKER=OFF + ) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DwxUSE_REGEX=builtin + -DwxUSE_ZLIB=sys + -DwxUSE_EXPAT=sys + -DwxUSE_LIBJPEG=sys + -DwxUSE_LIBPNG=sys + -DwxUSE_LIBTIFF=sys + -DwxUSE_STL=ON + -DwxBUILD_DISABLE_PLATFORM_LIB_DIR=ON + ${OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_copy_tools(TOOL_NAMES wxrc AUTO_CLEAN) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + +file(GLOB DLLS "${CURRENT_PACKAGES_DIR}/lib/*.dll") +if(DLLS) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + foreach(DLL ${DLLS}) + get_filename_component(N "${DLL}" NAME) + file(RENAME ${DLL} ${CURRENT_PACKAGES_DIR}/bin/${N}) + endforeach() +endif() +file(GLOB DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll") +if(DLLS) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + foreach(DLL ${DLLS}) + get_filename_component(N "${DLL}" NAME) + file(RENAME ${DLL} ${CURRENT_PACKAGES_DIR}/debug/bin/${N}) + endforeach() +endif() + +# do the copy pdbs now after the dlls got moved to the expected /bin folder above +vcpkg_copy_pdbs() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/mswu/wx/setup.h) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/mswu/wx/setup.h ${CURRENT_PACKAGES_DIR}/include/wx/setup.h) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/mswu) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/mswud) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/msvc) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/docs/licence.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/x-plane/CONTROL b/vcpkg/ports/x-plane/CONTROL new file mode 100644 index 0000000..de1217a --- /dev/null +++ b/vcpkg/ports/x-plane/CONTROL @@ -0,0 +1,4 @@ +Source: x-plane +Version: 3.0.1-1 +Description: The X-Plane Plugin SDK. +Supports: !x86 \ No newline at end of file diff --git a/vcpkg/ports/x-plane/portfile.cmake b/vcpkg/ports/x-plane/portfile.cmake new file mode 100644 index 0000000..78a8b42 --- /dev/null +++ b/vcpkg/ports/x-plane/portfile.cmake @@ -0,0 +1,39 @@ +include(vcpkg_common_functions) + +if (VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + message(FATAL_ERROR "the x-plane SDK cannot be built for the x86 architecture") +endif() + +vcpkg_download_distfile(ARCHIVE + URLS http://developer.x-plane.com/wp-content/plugins/code-sample-generation/sample_templates/XPSDK301.zip + FILENAME XPSDK301.zip + SHA512 3044d606039be8230f35a5992d322d4c009b4056f8fb17e929a9f5c2204c084e2c83ddad10801b21727645ec957c8942b83938f81256ec3778dbe75df525e62a +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(MAKE_DIRECTORY + ${CURRENT_PACKAGES_DIR}/lib + ${CURRENT_PACKAGES_DIR}/debug/lib +) + +file(COPY ${SOURCE_PATH}/CHeaders/Widgets/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/CHeaders/Wrappers/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) +file(COPY ${SOURCE_PATH}/CHeaders/XPLM/ DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + file(COPY ${SOURCE_PATH}/Libraries/Win/XPLM_64.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) + file(COPY ${SOURCE_PATH}/Libraries/Win/XPWidgets_64.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) + file(COPY ${SOURCE_PATH}/Libraries/Win/XPLM_64.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) + file(COPY ${SOURCE_PATH}/Libraries/Win/XPWidgets_64.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) +elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") + file(COPY ${SOURCE_PATH}/Libraries/Mac/XPLM.framework/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) + file(COPY ${SOURCE_PATH}/Libraries/Mac/XPWidgets.framework/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib/) + file(COPY ${SOURCE_PATH}/Libraries/Mac/XPLM.framework/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) + file(COPY ${SOURCE_PATH}/Libraries/Mac/XPWidgets.framework/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/) +endif() + +file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/x-plane/ RENAME copyright) diff --git a/vcpkg/ports/x264/CONTROL b/vcpkg/ports/x264/CONTROL new file mode 100644 index 0000000..ce64f5f --- /dev/null +++ b/vcpkg/ports/x264/CONTROL @@ -0,0 +1,6 @@ +Source: x264 +Version: 157-303c484ec828ed0 +Port-Version: 12 +Homepage: https://github.com/mirror/x264 +Description: x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 AVC compression format +Build-Depends: pthread (linux&osx) diff --git a/vcpkg/ports/x264/portfile.cmake b/vcpkg/ports/x264/portfile.cmake new file mode 100644 index 0000000..d208497 --- /dev/null +++ b/vcpkg/ports/x264/portfile.cmake @@ -0,0 +1,87 @@ +set(X264_VERSION 157) + +vcpkg_fail_port_install(ON_TARGET "OSX") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mirror/x264 + REF 303c484ec828ed0d8bfe743500e70314d026c3bd + SHA512 faf210a3f9543028ed882c8348b243dd7ae6638e7b3ef43bec1326b717f23370f57c13d0ddb5e1ae94411088a2e33031a137b68ae9f64c18f8f33f601a0da54d + HEAD_REF master + PATCHES + "uwp-cflags.patch" +) + +vcpkg_find_acquire_program(NASM) +get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) +set(ENV{PATH} "$ENV{PATH};${NASM_EXE_PATH}") + +if(VCPKG_TARGET_IS_WINDOWS) + _vcpkg_determine_autotools_host_cpu(BUILD_ARCH) + _vcpkg_determine_autotools_target_cpu(HOST_ARCH) + list(APPEND OPTIONS --build=${BUILD_ARCH}-pc-mingw32) + list(APPEND OPTIONS --host=${HOST_ARCH}-pc-mingw32) +endif() + +if(VCPKG_TARGET_IS_UWP) + list(APPEND OPTIONS --extra-cflags=-DWINAPI_FAMILY=WINAPI_FAMILY_APP --extra-cflags=-D_WIN32_WINNT=0x0A00) + list(APPEND OPTIONS --extra-ldflags=-APPCONTAINER --extra-ldflags=WindowsApp.lib) + list(APPEND OPTIONS --disable-asm) +endif() + +if(VCPKG_TARGET_IS_LINUX) + list(APPEND OPTIONS --enable-pic) +endif() + +vcpkg_configure_make( + SOURCE_PATH ${SOURCE_PATH} + NO_ADDITIONAL_PATHS + OPTIONS + ${OPTIONS} + --enable-strip + --disable-lavf + --disable-swscale + --disable-avs + --disable-ffms + --disable-gpac + --disable-lsmash + --enable-debug + +) + +vcpkg_install_make() +vcpkg_copy_tools(TOOL_NAMES x264 AUTO_CLEAN) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_TARGET_IS_WINDOWS) + set(pcfile "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/x264.pc") + if(EXISTS "${pcfile}") + vcpkg_replace_string("${pcfile}" "-lx264" "-llibx264") + endif() + set(pcfile "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/x264.pc") + if(EXISTS "${pcfile}") + vcpkg_replace_string("${pcfile}" "-lx264" "-llibx264") + endif() +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND VCPKG_TARGET_IS_WINDOWS) + file(RENAME ${CURRENT_PACKAGES_DIR}/lib/libx264.dll.lib ${CURRENT_PACKAGES_DIR}/lib/libx264.lib) + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libx264.dll.lib ${CURRENT_PACKAGES_DIR}/debug/lib/libx264.lib) +elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + # force U_STATIC_IMPLEMENTATION macro + file(READ ${CURRENT_PACKAGES_DIR}/include/x264.h HEADER_CONTENTS) + string(REPLACE "defined(U_STATIC_IMPLEMENTATION)" "1" HEADER_CONTENTS "${HEADER_CONTENTS}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/x264.h "${HEADER_CONTENTS}") + + file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/bin + ${CURRENT_PACKAGES_DIR}/debug/bin + ) +endif() + +vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES -lpthread -lm -ldl) + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/x264/uwp-cflags.patch b/vcpkg/ports/x264/uwp-cflags.patch new file mode 100644 index 0000000..792e999 --- /dev/null +++ b/vcpkg/ports/x264/uwp-cflags.patch @@ -0,0 +1,12 @@ +diff --git a/configure b/configure +index f7b14d9..2c92b2a 100644 +--- a/configure ++++ b/configure +@@ -821,7 +821,6 @@ if [ $SYS = WINDOWS ]; then + if cpp_check "winapifamily.h" "" "!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)" ; then + [ $compiler = CL ] || die "WinRT requires MSVC" + define HAVE_WINRT +- CFLAGS="$CFLAGS -MD" + LDFLAGS="$LDFLAGS -appcontainer" + if ! cpp_check "" "" "defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0603" ; then + die "_WIN32_WINNT must be defined to at least 0x0603 (Windows 8.1) for WinRT" diff --git a/vcpkg/ports/x265/CONTROL b/vcpkg/ports/x265/CONTROL new file mode 100644 index 0000000..e9d704c --- /dev/null +++ b/vcpkg/ports/x265/CONTROL @@ -0,0 +1,4 @@ +Source: x265 +Version: 3.4 +Homepage: https://github.com/videolan/x265 +Description: x265 is a H.265 / HEVC video encoder application library, designed to encode video or images into an H.265 / HEVC encoded bitstream. diff --git a/vcpkg/ports/x265/disable-install-pdb.patch b/vcpkg/ports/x265/disable-install-pdb.patch new file mode 100644 index 0000000..6826fe8 --- /dev/null +++ b/vcpkg/ports/x265/disable-install-pdb.patch @@ -0,0 +1,22 @@ +diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt +index 33b6523..06e3193 100644 +--- a/source/CMakeLists.txt ++++ b/source/CMakeLists.txt +@@ -580,13 +580,13 @@ endif() + install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include) + if((WIN32 AND ENABLE_CLI) OR (WIN32 AND ENABLE_SHARED)) + if(MSVC_IDE) +- install(FILES "${PROJECT_BINARY_DIR}/Debug/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS Debug) +- install(FILES "${PROJECT_BINARY_DIR}/RelWithDebInfo/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS RelWithDebInfo) ++ #install(FILES "${PROJECT_BINARY_DIR}/Debug/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS Debug) ++ #install(FILES "${PROJECT_BINARY_DIR}/RelWithDebInfo/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS RelWithDebInfo) + install(FILES "${PROJECT_BINARY_DIR}/Debug/libx265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS Debug OPTIONAL NAMELINK_ONLY) + install(FILES "${PROJECT_BINARY_DIR}/RelWithDebInfo/libx265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS RelWithDebInfo OPTIONAL NAMELINK_ONLY) + else() +- install(FILES "${PROJECT_BINARY_DIR}/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS Debug) +- install(FILES "${PROJECT_BINARY_DIR}/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS RelWithDebInfo) ++ #install(FILES "${PROJECT_BINARY_DIR}/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS Debug) ++ #install(FILES "${PROJECT_BINARY_DIR}/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS RelWithDebInfo) + install(FILES "${PROJECT_BINARY_DIR}/libx265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS Debug OPTIONAL NAMELINK_ONLY) + install(FILES "${PROJECT_BINARY_DIR}/libx265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS RelWithDebInfo OPTIONAL NAMELINK_ONLY) + endif() diff --git a/vcpkg/ports/x265/portfile.cmake b/vcpkg/ports/x265/portfile.cmake new file mode 100644 index 0000000..3b3ecbb --- /dev/null +++ b/vcpkg/ports/x265/portfile.cmake @@ -0,0 +1,57 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO videolan/x265 + REF 07295ba7ab551bb9c1580fdaee3200f1b45711b7 #v3.4 + SHA512 21a4ef8733a9011eec8b336106c835fbe04689e3a1b820acb11205e35d2baba8c786d9d8cf5f395e78277f921857e4eb8622cf2ef3597bce952d374f7fe9ec29 + HEAD_REF master + PATCHES + disable-install-pdb.patch +) + +set(ENABLE_ASSEMBLY OFF) +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_find_acquire_program(NASM) + get_filename_component(NASM_EXE_PATH ${NASM} DIRECTORY) + set(ENV{PATH} "$ENV{PATH};${NASM_EXE_PATH}") + set(ENABLE_ASSEMBLY ON) +endif () + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ENABLE_SHARED) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/source + PREFER_NINJA + OPTIONS + -DENABLE_ASSEMBLY=${ENABLE_ASSEMBLY} + -DENABLE_SHARED=${ENABLE_SHARED} + OPTIONS_DEBUG + -DENABLE_CLI=OFF +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# remove duplicated include files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_copy_tools(TOOL_NAMES x265 AUTO_CLEAN) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR VCPKG_TARGET_IS_LINUX) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +endif() + +if(WIN32 AND (NOT MINGW)) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/x265.pc" "-lx265" "-lx265-static") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/x265.pc" "-lx265" "-lx265-static") + endif() +endif() + +if(UNIX) + vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES numa) +else() + vcpkg_fixup_pkgconfig() +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/xalan-c/CONTROL b/vcpkg/ports/xalan-c/CONTROL new file mode 100644 index 0000000..f14ca7a --- /dev/null +++ b/vcpkg/ports/xalan-c/CONTROL @@ -0,0 +1,5 @@ +Source: xalan-c +Version: 1.11-12 +Homepage: https://github.com/apache/xalan-c +Description: Xalan is an XSLT processor for transforming XML documents into HTML, text, or other XML document types +Build-Depends: xerces-c diff --git a/vcpkg/ports/xalan-c/fix-linux-no-bin.patch b/vcpkg/ports/xalan-c/fix-linux-no-bin.patch new file mode 100644 index 0000000..3d468a1 --- /dev/null +++ b/vcpkg/ports/xalan-c/fix-linux-no-bin.patch @@ -0,0 +1,20 @@ +diff --git a/src/xalanc/Utils/CMakeLists.txt b/src/xalanc/Utils/CMakeLists.txt +index 2d78685..72b611b 100644 +--- a/src/xalanc/Utils/CMakeLists.txt ++++ b/src/xalanc/Utils/CMakeLists.txt +@@ -41,11 +41,15 @@ add_custom_target(locale ALL) + set_target_properties(locale PROPERTIES FOLDER "Message Library") + + # workaround for case of missing xerces-c dll ++if(CMAKE_HOST_WIN32) + if(EXISTS ${XercesC_INCLUDE_DIR}/../bin) + set(MsgCreator_WD $/../bin) + else() + set(MsgCreator_WD "${XSL_NLS_GEN_DIR}") + endif() ++else() ++ set(MsgCreator_WD "${PROJECT_BINARY_DIR}") ++endif() + + if(msgloader STREQUAL "inmemory") + add_custom_command( diff --git a/vcpkg/ports/xalan-c/fix-missing-dll-error.patch b/vcpkg/ports/xalan-c/fix-missing-dll-error.patch new file mode 100644 index 0000000..db49a2b --- /dev/null +++ b/vcpkg/ports/xalan-c/fix-missing-dll-error.patch @@ -0,0 +1,48 @@ +diff --git a/src/xalanc/Utils/CMakeLists.txt b/src/xalanc/Utils/CMakeLists.txt +index dc39ad0..2d78685 100644 +--- a/src/xalanc/Utils/CMakeLists.txt ++++ b/src/xalanc/Utils/CMakeLists.txt +@@ -40,6 +40,13 @@ set(SUPPORTMSGINDEX "${GEN_SUPPORTDIR}/LocalMsgIndex.hpp") + add_custom_target(locale ALL) + set_target_properties(locale PROPERTIES FOLDER "Message Library") + ++# workaround for case of missing xerces-c dll ++if(EXISTS ${XercesC_INCLUDE_DIR}/../bin) ++ set(MsgCreator_WD $/../bin) ++else() ++ set(MsgCreator_WD "${XSL_NLS_GEN_DIR}") ++endif() ++ + if(msgloader STREQUAL "inmemory") + add_custom_command( + OUTPUT "${GENMSGINDEX}" +@@ -48,7 +55,8 @@ if(msgloader STREQUAL "inmemory") + "${XLIFF_FILE_NAME}" + -TYPE inmem + -LOCALE ${LOCALE} +- WORKING_DIRECTORY "${XSL_NLS_GEN_DIR}" ++ -OUTDIR "${XSL_NLS_GEN_DIR}" ++ WORKING_DIRECTORY "${MsgCreator_WD}" + COMMENT "Generating inmemory locale message data" + DEPENDS MsgCreator "${XLIFF_FILE_NAME}") + +@@ -92,7 +100,8 @@ if(msgloader STREQUAL "icu") + "${XLIFF_FILE_NAME}" + -TYPE icu + -LOCALE ${LOCALE} +- WORKING_DIRECTORY "${XSL_NLS_GEN_DIR}" ++ -OUTDIR "${XSL_NLS_GEN_DIR}" ++ WORKING_DIRECTORY "${MsgCreator_WD}" + COMMENT "Generating ICU locale message data" + DEPENDS MsgCreator "${XLIFF_FILE_NAME}") + +@@ -141,7 +150,8 @@ if(msgloader STREQUAL "nls") + "${XLIFF_FILE_NAME}" + -TYPE nls + -LOCALE ${LOCALE} +- WORKING_DIRECTORY "${XSL_NLS_GEN_DIR}" ++ -OUTDIR "${XSL_NLS_GEN_DIR}" ++ WORKING_DIRECTORY "${MsgCreator_WD}" + COMMENT "Generating nls locale message data" + DEPENDS MsgCreator "${XLIFF_FILE_NAME}") + diff --git a/vcpkg/ports/xalan-c/fix-win-deprecated-err.patch b/vcpkg/ports/xalan-c/fix-win-deprecated-err.patch new file mode 100644 index 0000000..1484f4e --- /dev/null +++ b/vcpkg/ports/xalan-c/fix-win-deprecated-err.patch @@ -0,0 +1,15 @@ +diff --git a/src/xalanc/Utils/MsgCreator/CMakeLists.txt b/src/xalanc/Utils/MsgCreator/CMakeLists.txt +index 20215d4..dc74c1b 100644 +--- a/src/xalanc/Utils/MsgCreator/CMakeLists.txt ++++ b/src/xalanc/Utils/MsgCreator/CMakeLists.txt +@@ -37,6 +37,10 @@ set(msgcreator_headers + NLSHandler.hpp + SAX2Handler.hpp) + ++if(MSVC) ++ add_definitions(-D_CRT_SECURE_NO_WARNINGS=1) ++endif() ++ + add_executable(MsgCreator ${msgcreator_sources} ${msgcreator_headers}) + target_include_directories(MsgCreator PUBLIC + $ diff --git a/vcpkg/ports/xalan-c/portfile.cmake b/vcpkg/ports/xalan-c/portfile.cmake new file mode 100644 index 0000000..6fe1c4b --- /dev/null +++ b/vcpkg/ports/xalan-c/portfile.cmake @@ -0,0 +1,38 @@ +vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO apache/xalan-c + REF 177da75646a80fae2c22a315c0d987a5eadba143 + SHA512 e0f095b7031394c39c8e0fdca1f820c4222466f8c6e9df7bc40a21f9ca0e9291b7b6cdfb0a2d67db275ae97d7a7cdd447637102639e74716f0fb23a946b30ebe + PATCHES + fix-win-deprecated-err.patch + fix-missing-dll-error.patch + fix-linux-no-bin.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_ICU=ON +) + +vcpkg_install_cmake() +vcpkg_copy_tools(TOOL_NAMES Xalan AUTO_CLEAN) + +if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/xalanc) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/XalanC TARGET_PATH share/xalanc) +endif() + +# cleanup +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/xbyak/portfile.cmake b/vcpkg/ports/xbyak/portfile.cmake new file mode 100644 index 0000000..08584fe --- /dev/null +++ b/vcpkg/ports/xbyak/portfile.cmake @@ -0,0 +1,14 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO herumi/xbyak + REF v5.97 + SHA512 813d5363063b9bd8f3645652826cbbf9c0fdfc7775974bd257b9635ce7d1edbd6a7099216a8e7ec6252cb6e56aa4b6c6f9b0fd84b5748fa79c04abb799731cde + HEAD_REF master +) + +# handle license file +file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# copy headers +file(GLOB HEADER_FILES ${SOURCE_PATH}/xbyak/*.h) +file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/xbyak) diff --git a/vcpkg/ports/xbyak/vcpkg.json b/vcpkg/ports/xbyak/vcpkg.json new file mode 100644 index 0000000..7c42b5c --- /dev/null +++ b/vcpkg/ports/xbyak/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "xbyak", + "version-string": "5.97", + "description": "Xbyak is a JIT assembler for x86(IA-32)/x64(AMD64, x86-64).", + "homepage": "https://github.com/herumi/xbyak", + "supports": "!(arm | uwp)" +} diff --git a/vcpkg/ports/xerces-c/CONTROL b/vcpkg/ports/xerces-c/CONTROL new file mode 100644 index 0000000..54032ce --- /dev/null +++ b/vcpkg/ports/xerces-c/CONTROL @@ -0,0 +1,12 @@ +Source: xerces-c +Version: 3.2.3-1 +Homepage: https://github.com/apache/xerces-c +Description: Xerces-C++ is a XML parser, for parsing, generating, manipulating, and validating XML documents using the DOM, SAX, and SAX2 APIs. + +Feature: icu +Description: ICU support +Build-Depends: icu + +Feature: xmlch-wchar +Description: XMLCh type uses wchar_t + diff --git a/vcpkg/ports/xerces-c/disable-tests.patch b/vcpkg/ports/xerces-c/disable-tests.patch new file mode 100644 index 0000000..843b022 --- /dev/null +++ b/vcpkg/ports/xerces-c/disable-tests.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4254f89..aa08565 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -175,10 +175,16 @@ install( + COMPONENT "development") + + # Process subdirectories ++if(NOT DISABLE_DOC) + add_subdirectory(doc) ++endif() + add_subdirectory(src) ++if(NOT DISABLE_TESTS) + add_subdirectory(tests) ++endif() ++if(NOT DISABLE_SAMPLES) + add_subdirectory(samples) ++endif() + + # Display configuration summary + message(STATUS "") diff --git a/vcpkg/ports/xerces-c/portfile.cmake b/vcpkg/ports/xerces-c/portfile.cmake new file mode 100644 index 0000000..18a2989 --- /dev/null +++ b/vcpkg/ports/xerces-c/portfile.cmake @@ -0,0 +1,66 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO apache/xerces-c + REF v3.2.3 + SHA512 aaafe2de4ea156d94e71e3631c79bd66660badf17bf2a19587a0ca34011f70bd1584a0beef909409a3ff05eecea9d37ffee6dbb267625f59217fd86705d2cd28 + HEAD_REF master + PATCHES + disable-tests.patch + remove-dll-export-macro.patch +) + +set(DISABLE_ICU ON) +if("icu" IN_LIST FEATURES) + set(DISABLE_ICU OFF) +endif() +if ("xmlch-wchar" IN_LIST FEATURES) + set(XMLCHTYPE -Dxmlch-type=wchar_t) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DDISABLE_TESTS=ON + -DDISABLE_DOC=ON + -DDISABLE_SAMPLES=ON + -DCMAKE_DISABLE_FIND_PACKAGE_ICU=${DISABLE_ICU} + -DCMAKE_DISABLE_FIND_PACKAGE_CURL=ON + ${XMLCHTYPE} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/cmake) + vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/xercesc) +else() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/XercesC TARGET_PATH share/xercesc) +endif() + +file(READ ${CURRENT_PACKAGES_DIR}/share/xercesc/XercesCConfigInternal.cmake _contents) +string(REPLACE + "get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" + "get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" + _contents + "${_contents}" +) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/xercesc/XercesCConfigInternal.cmake "${_contents}") + +file(READ ${CURRENT_PACKAGES_DIR}/share/xercesc/XercesCConfig.cmake _contents) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/xercesc/XercesCConfig.cmake "include(CMakeFindDependencyMacro)\nfind_dependency(Threads)\n${_contents}") + +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake + ${CURRENT_PACKAGES_DIR}/share/xercesc + @ONLY +) + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" +) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/xerces-c/remove-dll-export-macro.patch b/vcpkg/ports/xerces-c/remove-dll-export-macro.patch new file mode 100644 index 0000000..f6f0e69 --- /dev/null +++ b/vcpkg/ports/xerces-c/remove-dll-export-macro.patch @@ -0,0 +1,27 @@ +diff --git a/src/xercesc/util/XercesDefs.hpp b/src/xercesc/util/XercesDefs.hpp +index 8071260..cd6bd68 100644 +--- a/src/xercesc/util/XercesDefs.hpp ++++ b/src/xercesc/util/XercesDefs.hpp +@@ -133,7 +133,7 @@ typedef XMLUInt32 UCS4Ch; + // The DLL_EXPORT flag should be defined on the command line during the build of a DLL + // configure conspires to make this happen. + +-#if defined(DLL_EXPORT) ++#if defined(XERCES_DLL_EXPORT) + #if defined(XERCES_BUILDING_LIBRARY) + #define XMLUTIL_EXPORT XERCES_PLATFORM_EXPORT + #define XMLPARSER_EXPORT XERCES_PLATFORM_EXPORT +diff --git a/src/xercesc/util/Xerces_autoconf_config.hpp.cmake.in b/src/xercesc/util/Xerces_autoconf_config.hpp.cmake.in +index e849e08..69fe3bf 100644 +--- a/src/xercesc/util/Xerces_autoconf_config.hpp.cmake.in ++++ b/src/xercesc/util/Xerces_autoconf_config.hpp.cmake.in +@@ -85,9 +85,6 @@ + #define XERCES_PLATFORM_EXPORT @XERCES_PLATFORM_EXPORT@ + #define XERCES_PLATFORM_IMPORT @XERCES_PLATFORM_IMPORT@ + #define XERCES_TEMPLATE_EXTERN @XERCES_TEMPLATE_EXTERN@ +-#ifdef XERCES_DLL_EXPORT +-# define DLL_EXPORT +-#endif + + // --------------------------------------------------------------------------- + // Include standard headers, if available, that we may rely on below. diff --git a/vcpkg/ports/xerces-c/usage b/vcpkg/ports/xerces-c/usage new file mode 100644 index 0000000..70333bf --- /dev/null +++ b/vcpkg/ports/xerces-c/usage @@ -0,0 +1,4 @@ +The package xerces-c is compatible with built-in CMake targets: + + find_package(XercesC REQUIRED) + target_link_libraries(main PRIVATE XercesC::XercesC) diff --git a/vcpkg/ports/xerces-c/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/xerces-c/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..6704b83 --- /dev/null +++ b/vcpkg/ports/xerces-c/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,8 @@ +_find_package(${ARGS}) + +if (APPLE) + if (TARGET XercesC::XercesC) + set_property(TARGET XercesC::XercesC APPEND PROPERTY INTERFACE_LINK_LIBRARIES "-framework CoreServices" "-framework CoreFoundation" curl) + list(APPEND XercesC_LIBRARIES "-framework CoreServices" "-framework CoreFoundation" curl) + endif() +endif() diff --git a/vcpkg/ports/xeus/CONTROL b/vcpkg/ports/xeus/CONTROL new file mode 100644 index 0000000..20ad500 --- /dev/null +++ b/vcpkg/ports/xeus/CONTROL @@ -0,0 +1,5 @@ +Source: xeus +Version: 0.24.1 +Homepage: https://github.com/jupyter-xeus/xeus +Description: C++ implementation of the Jupyter kernel protocol +Build-Depends: cppzmq, libuuid (linux), nlohmann-json, openssl, xtl, zeromq diff --git a/vcpkg/ports/xeus/Fix-Compile-nlohmann-json.patch b/vcpkg/ports/xeus/Fix-Compile-nlohmann-json.patch new file mode 100644 index 0000000..463c091 --- /dev/null +++ b/vcpkg/ports/xeus/Fix-Compile-nlohmann-json.patch @@ -0,0 +1,12 @@ +diff --git a/src/xmessage.cpp b/src/xmessage.cpp +index 1ab9544..5a14ba0 100644 +--- a/src/xmessage.cpp ++++ b/src/xmessage.cpp +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + #include "nlohmann/json.hpp" + diff --git a/vcpkg/ports/xeus/Fix-static-build.patch b/vcpkg/ports/xeus/Fix-static-build.patch new file mode 100644 index 0000000..4caf013 --- /dev/null +++ b/vcpkg/ports/xeus/Fix-static-build.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d02b5d6..6484131 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -244,7 +244,10 @@ macro(xeus_create_target target_name linkage output_name) + PUBLIC xtl + ) + +- target_link_libraries(${target_name} PUBLIC OpenSSL::Crypto) ++ if (MSVC) ++ target_link_libraries(OpenSSL::Crypto INTERFACE crypt32) ++ endif () ++ target_link_libraries(${target_name} PUBLIC OpenSSL::Crypto) + + if (NOT MSVC) + if (APPLE) diff --git a/vcpkg/ports/xeus/portfile.cmake b/vcpkg/ports/xeus/portfile.cmake new file mode 100644 index 0000000..e68b872 --- /dev/null +++ b/vcpkg/ports/xeus/portfile.cmake @@ -0,0 +1,53 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO QuantStack/xeus + REF 424b7cd177886906a59eee535b7de59088461910 # 0.24.1 + SHA512 877ca45bf649b567a9921d3e8f0adb0299dbe956978bd6e217d0c06617cf3466d08d90d607fd33e129089472e1a96ecec78b1fc21346bc13ba268168a5a6b068 + HEAD_REF master + PATCHES + Fix-Compile-nlohmann-json.patch + Fix-static-build.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIBS) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_EXAMPLES=OFF + -DBUILD_STATIC_LIBS=${BUILD_STATIC_LIBS} + -DBUILD_TESTS=OFF + -DDOWNLOAD_GTEST=OFF + -DDISABLE_ARCH_NATIVE=OFF +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} +) + +file(REMOVE_RECURSE + ${CURRENT_PACKAGES_DIR}/debug/include + ${CURRENT_PACKAGES_DIR}/debug/share +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/xeus/xeus.hpp + "#ifdef XEUS_STATIC_LIB" + "#if 1 // #ifdef XEUS_STATIC_LIB" + ) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin") +endif() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +# Install usage +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/vcpkg/ports/xeus/usage b/vcpkg/ports/xeus/usage new file mode 100644 index 0000000..1f95980 --- /dev/null +++ b/vcpkg/ports/xeus/usage @@ -0,0 +1,4 @@ +The package xeus provides CMake targets: + + find_package(xeus CONFIG REQUIRED) + target_link_libraries(main PRIVATE xeus xeus_static) diff --git a/vcpkg/ports/xeus/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/xeus/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..62a3cc7 --- /dev/null +++ b/vcpkg/ports/xeus/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,9 @@ +_find_package(${ARGS}) + +if(TARGET xeus AND NOT TARGET xeus_static) + add_library(xeus_static INTERFACE IMPORTED) + set_target_properties(xeus_static PROPERTIES INTERFACE_LINK_LIBRARIES xeus) +elseif(TARGET xeus_static AND NOT TARGET xeus) + add_library(xeus INTERFACE IMPORTED) + set_target_properties(xeus PROPERTIES INTERFACE_LINK_LIBRARIES xeus_static) +endif() diff --git a/vcpkg/ports/xframe/CONTROL b/vcpkg/ports/xframe/CONTROL new file mode 100644 index 0000000..a9b7721 --- /dev/null +++ b/vcpkg/ports/xframe/CONTROL @@ -0,0 +1,5 @@ +Source: xframe +Version: 0.3.0 +Description: xframe is a dataframe for C++, based on xtensor and xtl. +Homepage: https://github.com/xtensor-stack/xframe +Build-Depends: xtensor, xtl diff --git a/vcpkg/ports/xframe/portfile.cmake b/vcpkg/ports/xframe/portfile.cmake new file mode 100644 index 0000000..cb3111b --- /dev/null +++ b/vcpkg/ports/xframe/portfile.cmake @@ -0,0 +1,22 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xtensor-stack/xframe + REF 0.3.0 + SHA512 880fe8ca00bd189a197cc71e5f32539562db69433fdfa03db5f0db8211230db36eb96757a5ca3c667ae1d4edc96eae38393718e7a1e3f7c1827130cf21579b07 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/xframe) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/xlnt/CONTROL b/vcpkg/ports/xlnt/CONTROL new file mode 100644 index 0000000..3e03a5a --- /dev/null +++ b/vcpkg/ports/xlnt/CONTROL @@ -0,0 +1,4 @@ +Source: xlnt +Version: 1.5.0 +Homepage: https://github.com/tfussell/xlnt +Description: Cross-platform user-friendly xlsx library for C++14 diff --git a/vcpkg/ports/xlnt/fix-not-found-include.patch b/vcpkg/ports/xlnt/fix-not-found-include.patch new file mode 100644 index 0000000..a3068b1 --- /dev/null +++ b/vcpkg/ports/xlnt/fix-not-found-include.patch @@ -0,0 +1,12 @@ +diff --git a/cmake/XlntConfig.cmake.in b/cmake/XlntConfig.cmake.in +index 01fe4981..9cefa6e0 100644 +--- a/cmake/XlntConfig.cmake.in ++++ b/cmake/XlntConfig.cmake.in +@@ -7,7 +7,6 @@ + get_filename_component(XLNT_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) + +-set_and_check(XLNT_INCLUDE_DIR "@XLNT_INCLUDE_INSTALL_DIR@") + + check_required_components(xlnt) + + if(NOT TARGET xlnt::xlnt) diff --git a/vcpkg/ports/xlnt/portfile.cmake b/vcpkg/ports/xlnt/portfile.cmake new file mode 100644 index 0000000..eb4147f --- /dev/null +++ b/vcpkg/ports/xlnt/portfile.cmake @@ -0,0 +1,39 @@ +if(VCPKG_TARGET_IS_WINDOWS) + if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(win_patch "static-linking-for-windows.patch") + endif() +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tfussell/xlnt + REF 568ac85346bc37757b0cd16464e7e1ea7656df91 # v1.5.0 + SHA512 414d691b372934326dc0da134eb7752c27c3223b6e92b433494d0758ca657f43b66894ad54ac97a8410387a2531a573c81572daa6a0434fa023e8e29ca74331c + HEAD_REF master + PATCHES + "fix-not-found-include.patch" + ${win_patch} +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(STATIC OFF) +else() + set(STATIC ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DTESTS=OFF -DSAMPLES=OFF -DBENCHMARKS=OFF -DSTATIC=${STATIC} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/xlnt) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/man) +file(INSTALL ${SOURCE_PATH}/LICENSE.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/xlnt/static-linking-for-windows.patch b/vcpkg/ports/xlnt/static-linking-for-windows.patch new file mode 100644 index 0000000..9f27197 --- /dev/null +++ b/vcpkg/ports/xlnt/static-linking-for-windows.patch @@ -0,0 +1,13 @@ +diff --git a/include/xlnt/xlnt.hpp b/include/xlnt/xlnt.hpp +index 01fe4981..9cefa6e0 100644 +--- a/include/xlnt/xlnt.hpp ++++ b/include/xlnt/xlnt.hpp +@@ -22,7 +22,7 @@ + // @author: see AUTHORS file + + #pragma once +- ++#define XLNT_STATIC + #include + + // cell diff --git a/vcpkg/ports/xmlsec/0001-uwp-fix.patch b/vcpkg/ports/xmlsec/0001-uwp-fix.patch new file mode 100644 index 0000000..f48cbf5 --- /dev/null +++ b/vcpkg/ports/xmlsec/0001-uwp-fix.patch @@ -0,0 +1,20 @@ +diff --git a/src/dl.c b/src/dl.c +index b13f9d4..4a1b0c1 100644 +--- a/src/dl.c ++++ b/src/dl.c +@@ -148,7 +148,14 @@ xmlSecCryptoDLLibraryCreate(const xmlChar* name) { + #endif /* XMLSEC_DL_LIBLTDL */ + + #ifdef XMLSEC_DL_WIN32 +- lib->handle = LoadLibraryA((char*)lib->filename); ++#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP ++ lib->handle = LoadLibraryA((char*)lib->filename); ++#else ++ LPTSTR wcLib = NULL; ++ wcLib = xmlSecWin32ConvertUtf8ToTstr((char*)lib->filename); ++ if (wcLib) ++ lib->handle = LoadPackagedLibrary(wcLib, 0); ++#endif + if(lib->handle == NULL) { + xmlSecIOError("LoadLibraryA", lib->filename, NULL); + xmlSecCryptoDLLibraryDestroy(lib); diff --git a/vcpkg/ports/xmlsec/CMakeLists.txt b/vcpkg/ports/xmlsec/CMakeLists.txt new file mode 100644 index 0000000..4805839 --- /dev/null +++ b/vcpkg/ports/xmlsec/CMakeLists.txt @@ -0,0 +1,157 @@ +cmake_minimum_required (VERSION 3.8) +project (xmlsec C) + +option(INSTALL_HEADERS_TOOLS "Install public header files and tools" ON) + +set(CMAKE_SHARED_LIBRARY_PREFIX) +set(CMAKE_STATIC_LIBRARY_PREFIX) + +find_package(LibXml2 REQUIRED) +find_package(OpenSSL REQUIRED) +find_package(unofficial-iconv REQUIRED) + +FILE(GLOB SOURCESXMLSEC + src/*.c +) + +FILE(GLOB SOURCESXMLSECOPENSSL + src/openssl/*.c + src/strings.c +) + +# Generate xmlexports with fixed definition of XMLSEC_STATIC +file(READ include/xmlsec/exports.h EXPORTS_H) +if(BUILD_SHARED_LIBS) + string(REPLACE "!defined(XMLSEC_STATIC)" "1" EXPORTS_H "${EXPORTS_H}") +else() + string(REPLACE "!defined(XMLSEC_STATIC)" "0" EXPORTS_H "${EXPORTS_H}") +endif() +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/exports.h "${EXPORTS_H}") + +message(STATUS "Reading version info from configure.ac") + +file(STRINGS "configure.ac" + _xmlsec_version_defines REGEX "XMLSEC_VERSION_(MAJOR|MINOR|SUBMINOR)=([0-9]+)$") + +foreach(ver ${_xmlsec_version_defines}) + if(ver MATCHES "XMLSEC_VERSION_(MAJOR|MINOR|SUBMINOR)=([0-9]+)$") + set(XMLSEC_VERSION_${CMAKE_MATCH_1} "${CMAKE_MATCH_2}" CACHE INTERNAL "") + endif() +endforeach() + +set(XMLSEC_VERSION ${XMLSEC_VERSION_MAJOR}.${XMLSEC_VERSION_MINOR}.${XMLSEC_VERSION_SUBMINOR}) +math(EXPR XMLSEC_VERSION_INFO_NUMBER + "${XMLSEC_VERSION_MAJOR} + ${XMLSEC_VERSION_MINOR}") +set(XMLSEC_VERSION_INFO ${XMLSEC_VERSION_INFO_NUMBER}:${XMLSEC_VERSION_SUBMINOR}:${XMLSEC_VERSION_MINOR}) + +message(STATUS "XMLSEC_VERSION: ${XMLSEC_VERSION}") +message(STATUS "XMLSEC_VERSION_MAJOR: ${XMLSEC_VERSION_MAJOR}") +message(STATUS "XMLSEC_VERSION_MINOR: ${XMLSEC_VERSION_MINOR}") +message(STATUS "XMLSEC_VERSION_SUBMINOR: ${XMLSEC_VERSION_SUBMINOR}") +message(STATUS "XMLSEC_VERSION_INFO: ${XMLSEC_VERSION_INFO}") + +message(STATUS "Generating version.h") + +configure_file(include/xmlsec/version.h.in include/xmlsec/version.h) + +if(MSVC) + add_compile_options(/wd4130 /wd4127 /wd4152) +endif() + +add_library(libxmlsec ${SOURCESXMLSEC}) +add_library(libxmlsec-openssl ${SOURCESXMLSECOPENSSL}) + +include_directories(${CMAKE_CURRENT_BINARY_DIR}/include include ${LIBXML2_INCLUDE_DIRS}) + +target_link_libraries(libxmlsec PRIVATE + ${LIBXML2_LIBRARIES} OpenSSL::SSL +) +target_link_libraries(libxmlsec-openssl PRIVATE + ${LIBXML2_LIBRARIES} OpenSSL::SSL libxmlsec +) + +add_compile_definitions(inline=__inline) +add_compile_definitions(PACKAGE="xmlsec") +add_compile_definitions(XMLSEC_MSCRYPTO_NT4=1) +add_compile_definitions(HAVE_STDIO_H) +add_compile_definitions(HAVE_STDLIB_H) +add_compile_definitions(HAVE_STRING_H) +add_compile_definitions(HAVE_CTYPE_H) +add_compile_definitions(HAVE_MALLOC_H) +add_compile_definitions(HAVE_MEMORY_H) +add_compile_definitions(XMLSEC_NO_XSLT=1) +add_compile_definitions(XMLSEC_DEFAULT_CRYPTO="openssl") +add_compile_definitions(XMLSEC_NO_GOST) +add_compile_definitions(XMLSEC_NO_GOST2012) +add_compile_definitions(XMLSEC_NO_SIZE_T) +add_compile_definitions(UNICODE) +add_compile_definitions(_UNICODE) +add_compile_definitions(_MBCS) +add_compile_definitions(_REENTRANT) + +target_compile_definitions(libxmlsec-openssl PRIVATE + -DXMLSEC_CRYPTO_OPENSSL +) + +set_target_properties(libxmlsec PROPERTIES VERSION ${XMLSEC_VERSION_MAJOR}.${XMLSEC_VERSION_MINOR}) +set_target_properties(libxmlsec-openssl PROPERTIES VERSION ${XMLSEC_VERSION_MAJOR}.${XMLSEC_VERSION_MINOR}) + +if(NOT BUILD_SHARED_LIBS) + target_compile_definitions(libxmlsec PRIVATE -DLIBXML_STATIC -DLIBXSLT_STATIC -DXMLSEC_STATIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING) + target_compile_definitions(libxmlsec-openssl PRIVATE -DLIBXML_STATIC -DLIBXSLT_STATIC -DXMLSEC_STATIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING) +else() + target_compile_definitions(libxmlsec PRIVATE -DXMLSEC_DL_WIN32) + target_compile_definitions(libxmlsec-openssl PRIVATE -DXMLSEC_DL_WIN32) +endif() + +install(TARGETS libxmlsec libxmlsec-openssl + EXPORT xmlsecExport + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +install(EXPORT xmlsecExport FILE xmlsec-config.cmake DESTINATION share/xmlsec) + +if(INSTALL_HEADERS_TOOLS) + file(GLOB PUBLIC_HEADERS + include/xmlsec/*.h + include/xmlsec/openssl/*.h) + list(FILTER PUBLIC_HEADERS EXCLUDE REGEX "exports\\.h$") + + foreach(file IN LISTS PUBLIC_HEADERS) + get_filename_component(dir ${file} DIRECTORY) + file(RELATIVE_PATH rel_dir ${CMAKE_SOURCE_DIR}/xmlsec/${LIB} ${dir}) + install(FILES ${file} DESTINATION "include/${rel_dir}") + endforeach() + + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/include/xmlsec/version.h DESTINATION "include/xmlsec") + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/exports.h DESTINATION "include/xmlsec") + + # xmlsec application + add_executable(xmlsec + apps/crypto.c + apps/cmdline.c + apps/xmlsec.c) + + if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + target_link_libraries(xmlsec PRIVATE crypt32.lib) + endif() + + target_link_libraries(xmlsec PRIVATE + ${LIBXML2_LIBRARIES} OpenSSL::SSL libxmlsec libxmlsec-openssl unofficial::iconv::libiconv + ) + + target_compile_definitions(xmlsec PRIVATE + -DXMLSEC_CRYPTO_OPENSSL + ) + + if(BUILD_SHARED_LIBS) + target_compile_definitions(xmlsec PRIVATE -DXMLSEC_CRYPTO_DYNAMIC_LOADING) + else() + find_package(Threads REQUIRED) + target_compile_definitions(xmlsec PRIVATE -DLIBXML_STATIC -DLIBXSLT_STATIC -DXMLSEC_STATIC) + target_link_libraries(xmlsec PUBLIC Threads::Threads) + endif() + install(TARGETS xmlsec DESTINATION tools/xmlsec) +endif() diff --git a/vcpkg/ports/xmlsec/CONTROL b/vcpkg/ports/xmlsec/CONTROL new file mode 100644 index 0000000..1f3750e --- /dev/null +++ b/vcpkg/ports/xmlsec/CONTROL @@ -0,0 +1,5 @@ +Source: xmlsec +Version: 1.2.30 +Homepage: https://www.aleksey.com/xmlsec/ +Description: XML Security Library is a C library based on LibXML2. The library supports major XML security standards. +Build-Depends: libxml2, openssl diff --git a/vcpkg/ports/xmlsec/portfile.cmake b/vcpkg/ports/xmlsec/portfile.cmake new file mode 100644 index 0000000..0c47010 --- /dev/null +++ b/vcpkg/ports/xmlsec/portfile.cmake @@ -0,0 +1,26 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lsh123/xmlsec + REF xmlsec-1_2_30 + SHA512 e631e7b132b39bb53f2713fe34880f8b4e81fd759fd206e8872c066236a8a64713842ba5e0ba9ad2f345f9f6d1da304acbeb61411b52cfa79d2934fc9e260ce9 + HEAD_REF master + PATCHES + 0001-uwp-fix.patch +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS -DPORT_DIR=${CMAKE_CURRENT_LIST_DIR} + OPTIONS_DEBUG -DINSTALL_HEADERS_TOOLS=OFF +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets() + +file(INSTALL ${SOURCE_PATH}/Copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/xmsh/CONTROL b/vcpkg/ports/xmsh/CONTROL new file mode 100644 index 0000000..758a54b --- /dev/null +++ b/vcpkg/ports/xmsh/CONTROL @@ -0,0 +1,5 @@ +Source: xmsh +Version: 0.5.2-1 +Description: Reference Implementation of XMSH Library +Build-Depends: tl-expected, nlohmann-json +Homepage: https://gitlab.com/libxmsh/xmsh \ No newline at end of file diff --git a/vcpkg/ports/xmsh/portfile.cmake b/vcpkg/ports/xmsh/portfile.cmake new file mode 100644 index 0000000..7d74e7d --- /dev/null +++ b/vcpkg/ports/xmsh/portfile.cmake @@ -0,0 +1,37 @@ +vcpkg_find_acquire_program(PYTHON3) + +vcpkg_fail_port_install(ON_TARGET "Windows") +message("Building with a gcc version less than 7.1.0 is not supported.") + +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.com + OUT_SOURCE_PATH SOURCE_PATH + REPO libxmsh/xmsh + REF e1900845b796ef977db70519b2ac08eebd788236 + SHA512 643c6c94956de9b6fae635b6528e8ba756f4a2bc38de71613c2dd8d47f4a043aee7b6e7fec1870b306be3bea9f5c0c81d1d343bfc27883b3fba986fbc5b15406 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DPYTHON3_EXECUTABLE=${PYTHON3} +) + +vcpkg_find_acquire_program(PYTHON3) +get_filename_component(PYPATH ${PYTHON3} PATH) +set(ENV{PATH} "$ENV{PATH};${PYPATH}") + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(INSTALL ${SOURCE_PATH}/copyright.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/xorstr/CONTROL b/vcpkg/ports/xorstr/CONTROL new file mode 100644 index 0000000..fe40c1c --- /dev/null +++ b/vcpkg/ports/xorstr/CONTROL @@ -0,0 +1,4 @@ +Source: xorstr +Version: 2020-02-11 +Description: Heavily vectorized c++17 compile time string encryption +Homepage: https://github.com/JustasMasiulis/xorstr diff --git a/vcpkg/ports/xorstr/portfile.cmake b/vcpkg/ports/xorstr/portfile.cmake new file mode 100644 index 0000000..5fa39e9 --- /dev/null +++ b/vcpkg/ports/xorstr/portfile.cmake @@ -0,0 +1,16 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO JustasMasiulis/xorstr + REF a774b984f5b5f15d39ba0a8623cd3c70c05d6007 + SHA512 339fe945e39d27dfc9a9f42bbf4ef008405934668784ee4b661ee9dd04ab0a0bea442c07e7315d1746edd047a6bb7aca7d382314a48fc593633d811cf67bdb2d + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/include/xorstr.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/xproperty/CONTROL b/vcpkg/ports/xproperty/CONTROL new file mode 100644 index 0000000..ba2ed12 --- /dev/null +++ b/vcpkg/ports/xproperty/CONTROL @@ -0,0 +1,4 @@ +Source: xproperty +Version: 0.8.1 +Build-Depends: xtl +Description: Traitlets-like C++ properties and implementation of the observer pattern diff --git a/vcpkg/ports/xproperty/fix-target.patch b/vcpkg/ports/xproperty/fix-target.patch new file mode 100644 index 0000000..a838b29 --- /dev/null +++ b/vcpkg/ports/xproperty/fix-target.patch @@ -0,0 +1,44 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5dcddc2..9d99227 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -7,7 +7,7 @@ + ############################################################################ + + cmake_minimum_required(VERSION 3.1) +-project(xproperty) ++project(xproperty CXX) + + set(XPROPERTY_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include) + +@@ -28,7 +28,8 @@ message(STATUS "xproperty v${${PROJECT_NAME}_VERSION}") + # Dependencies + # ============ + +-find_package(xtl 0.5.3 REQUIRED) ++set(xtl_REQUIRED_VERSION 0.5.3) ++find_package(xtl ${xtl_REQUIRED_VERSION} REQUIRED) + message(STATUS "Found xtl: ${xtl_INCLUDE_DIRS}/xtl") + + # Build +diff --git a/xpropertyConfig.cmake.in b/xpropertyConfig.cmake.in +index 192c04f..38b305a 100644 +--- a/xpropertyConfig.cmake.in ++++ b/xpropertyConfig.cmake.in +@@ -15,7 +15,12 @@ + + @PACKAGE_INIT@ + +-set(PN xproperty) +-set_and_check(${PN}_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_INCLUDEDIR@") +-set(${PN}_LIBRARY "") +-check_required_components(${PN}) ++include(CMakeFindDependencyMacro) ++find_dependency(xtl @xtl_REQUIRED_VERSION@) ++ ++if(NOT TARGET @PROJECT_NAME@) ++ include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") ++ get_target_property(@PROJECT_NAME@_INCLUDE_DIR @PROJECT_NAME@ INTERFACE_INCLUDE_DIRECTORIES) ++endif() ++ ++set(@PROJECT_NAME@_LIBRARY "") diff --git a/vcpkg/ports/xproperty/portfile.cmake b/vcpkg/ports/xproperty/portfile.cmake new file mode 100644 index 0000000..8a415f2 --- /dev/null +++ b/vcpkg/ports/xproperty/portfile.cmake @@ -0,0 +1,30 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO QuantStack/xproperty + REF 0.8.1 + SHA512 70fcce3a3cc84be98d844aa59c14686945907db3c8fa1c9a916f0bab811ef96512464031e53f00d29cba7db750a0032f4b59d6ca524f52bc7cfe8de5cebad5e5 + HEAD_REF master + PATCHES + fix-target.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTS=OFF + -DDOWNLOAD_GTEST=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/xsimd/CONTROL b/vcpkg/ports/xsimd/CONTROL new file mode 100644 index 0000000..a640245 --- /dev/null +++ b/vcpkg/ports/xsimd/CONTROL @@ -0,0 +1,8 @@ +Source: xsimd +Version: 7.4.6 +Description: Modern, portable C++ wrappers for SIMD intrinsics +Homepage: https://github.com/xtensor-stack/xsimd + +Feature: xcomplex +Description: xtl complex support +Build-Depends: xtl diff --git a/vcpkg/ports/xsimd/portfile.cmake b/vcpkg/ports/xsimd/portfile.cmake new file mode 100644 index 0000000..b776d7d --- /dev/null +++ b/vcpkg/ports/xsimd/portfile.cmake @@ -0,0 +1,31 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xtensor-stack/xsimd + REF 81af3b629097dd257b74f31f4152e3d5cda73c9b # 7.4.6 + SHA512 2d72af93a8166bca04203ec305a1bafb918efb12fb39cd518f7c9fd89b6c1512157ea06f5ef94a08ee4a09066425100c77c4a61f1940b5bf22ac18d6a034cb56 + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + xcomplex ENABLE_XTL_COMPLEX +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DENABLE_FALLBACK=OFF + -DBUILD_TESTS=OFF + -DDOWNLOAD_GTEST=OFF + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/xtensor-blas/CONTROL b/vcpkg/ports/xtensor-blas/CONTROL new file mode 100644 index 0000000..6020152 --- /dev/null +++ b/vcpkg/ports/xtensor-blas/CONTROL @@ -0,0 +1,5 @@ +Source: xtensor-blas +Version: 0.17.1 +Description: BLAS extension to xtensor +Homepage: https://github.com/xtensor-stack/xtensor-blas +Build-Depends: xtensor diff --git a/vcpkg/ports/xtensor-blas/portfile.cmake b/vcpkg/ports/xtensor-blas/portfile.cmake new file mode 100644 index 0000000..6db2e38 --- /dev/null +++ b/vcpkg/ports/xtensor-blas/portfile.cmake @@ -0,0 +1,32 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xtensor-stack/xtensor-blas + REF 0b23657413bb4380014b82c4dd45821f04a4adad # 0.17.1 + SHA512 d155d9fdad2e2d1851657953544e9ef3e3c1b203a1cb4e092d0f5bab8bad27bcf3a21a0ae3be0c06a7b8a3fa8b41f244da45690d39ee6c9794ac4fcabc4de35f + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS_RELEASE -DCXXBLAS_DEBUG=OFF + OPTIONS_DEBUG -DCXXBLAS_DEBUG=ON + OPTIONS + -DXTENSOR_USE_FLENS_BLAS=OFF + -DBUILD_TESTS=OFF + -DBUILD_BENCHMARK=OFF + -DDOWNLOAD_GTEST=OFF + -DDOWNLOAD_GBENCHMARK=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/xflens/cxxblas/netlib) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/xtensor-fftw/CONTROL b/vcpkg/ports/xtensor-fftw/CONTROL new file mode 100644 index 0000000..c757db6 --- /dev/null +++ b/vcpkg/ports/xtensor-fftw/CONTROL @@ -0,0 +1,5 @@ +Source: xtensor-fftw +Version: 2019-11-30 +Description: FFTW bindings for the xtensor C++14 multi-dimensional array library +Homepage: https://github.com/xtensor-stack/xtensor-fftw +Build-Depends: fftw3, xtensor diff --git a/vcpkg/ports/xtensor-fftw/portfile.cmake b/vcpkg/ports/xtensor-fftw/portfile.cmake new file mode 100644 index 0000000..e22efc2 --- /dev/null +++ b/vcpkg/ports/xtensor-fftw/portfile.cmake @@ -0,0 +1,31 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xtensor-stack/xtensor-fftw + REF 29f0442c98f1a219e970c96e99d7be8a42954a0b + SHA512 09b02fe6b906cde2a7f9071673a140c994316d50aaf639eb402706aaa52b66e73bc77fa1beb683d3740914ff5157283891634a806809c03f12c1def85b49595a + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DCOMPILE_WARNINGS=OFF + -DBUILD_TESTS=OFF + -DDOWNLOAD_GTEST=OFF + -DBUILD_BENCHMARK=OFF + -DDOWNLOAD_GBENCHMARK=OFF + -DBENCHMARK_ENABLE_TESTING=OFF + -DDEFAULT_COLUMN_MAJOR=OFF + -DCOVERAGE=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/xtensor-io/CONTROL b/vcpkg/ports/xtensor-io/CONTROL new file mode 100644 index 0000000..d426f09 --- /dev/null +++ b/vcpkg/ports/xtensor-io/CONTROL @@ -0,0 +1,7 @@ +Source: xtensor-io +Version: 0.9.0 +Port-Version: 1 +Description: xtensor plugin to read and write images, audio files, numpy (compressed) npz and HDF5 +Homepage: https://github.com/xtensor-stack/xtensor-io +Build-Depends: xtensor, xtl + diff --git a/vcpkg/ports/xtensor-io/disable-highfive.patch b/vcpkg/ports/xtensor-io/disable-highfive.patch new file mode 100644 index 0000000..e0733b0 --- /dev/null +++ b/vcpkg/ports/xtensor-io/disable-highfive.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c3595a1..d38dc21 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -136,6 +136,7 @@ else() + message(WARNING "ZLIB not found - install zlib for xnpz file support") + endif() + ++if (0) + message(STATUS "Trying to find HighFive for npz file support") + find_package(HighFive) + find_package(HDF5) +@@ -154,6 +155,7 @@ if (${HighFive_FOUND} AND ${HDF5_FOUND}) + else() + message(WARNING "HighFive and/or HDF5 not found - install HighFive and HDF5 for HDF5 file support") + endif() ++endif() + + if(DOWNLOAD_GTEST OR GTEST_SRC_DIR) + set(BUILD_TESTS ON) diff --git a/vcpkg/ports/xtensor-io/portfile.cmake b/vcpkg/ports/xtensor-io/portfile.cmake new file mode 100644 index 0000000..992aaeb --- /dev/null +++ b/vcpkg/ports/xtensor-io/portfile.cmake @@ -0,0 +1,29 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xtensor-stack/xtensor-io + REF 863dd7dad6010038568c169f20e3d3e87bd3b37a # 0.9.0 + SHA512 f6190c5c2c487a8170e5af1ddfd2e921c414274762dac6c8f9519d579d5eb5dd3683678e7b4f589b7ced8a42f648742755acb42e2122960d6ca7fc1a82b0723e + HEAD_REF master + PATCHES + disable-highfive.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DBUILD_TESTS=OFF + -DDOWNLOAD_GTEST=OFF + -DDOWNLOAD_GBENCHMARK=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/xtensor/CONTROL b/vcpkg/ports/xtensor/CONTROL new file mode 100644 index 0000000..59edea8 --- /dev/null +++ b/vcpkg/ports/xtensor/CONTROL @@ -0,0 +1,13 @@ +Source: xtensor +Version: 0.21.3 +Description: C++ tensors with broadcasting and lazy computing +Homepage: https://github.com/xtensor-stack/xtensor +Build-Depends: nlohmann-json, xtl + +Feature: xsimd +Description: xtensor with xsimd support +Build-Depends: xsimd + +Feature: tbb +Description: xtensor with tbb support +Build-Depends: tbb diff --git a/vcpkg/ports/xtensor/portfile.cmake b/vcpkg/ports/xtensor/portfile.cmake new file mode 100644 index 0000000..c217bc7 --- /dev/null +++ b/vcpkg/ports/xtensor/portfile.cmake @@ -0,0 +1,37 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xtensor-stack/xtensor + REF 31acec1e90bbea6d4bc17af0710a123bd5da6689 # 0.21.3 + SHA512 007059e20e6feddc281f322a6907279e9a2935f5e28b7c50dc1b0f1d80ad303e84abf9759d9c50ab0916fdf75a5861b4bfc5dac8dd21de751808c420a161d0ef + HEAD_REF master +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + xsimd XTENSOR_USE_XSIMD + tbb XTENSOR_USE_TBB +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DXTENSOR_ENABLE_ASSERT=OFF + -DXTENSOR_CHECK_DIMENSION=OFF + -DBUILD_TESTS=OFF + -DBUILD_BENCHMARK=OFF + -DDOWNLOAD_GTEST=OFF + -DDOWNLOAD_GBENCHMARK=OFF + -DDEFAULT_COLUMN_MAJOR=OFF + -DDISABLE_VS2017=OFF + ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/xtl/CONTROL b/vcpkg/ports/xtl/CONTROL new file mode 100644 index 0000000..41fa4e1 --- /dev/null +++ b/vcpkg/ports/xtl/CONTROL @@ -0,0 +1,5 @@ +Source: xtl +Version: 0.6.11 +Build-Depends: nlohmann-json +Description: The x template library. +Homepage: https://github.com/xtensor-stack/xtl diff --git a/vcpkg/ports/xtl/portfile.cmake b/vcpkg/ports/xtl/portfile.cmake new file mode 100644 index 0000000..64da52f --- /dev/null +++ b/vcpkg/ports/xtl/portfile.cmake @@ -0,0 +1,25 @@ +# header-only library + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO xtensor-stack/xtl + REF be592a531e89f0e4eb3d384b00fec43451f3e734 # 0.6.11 + SHA512 101bbb0430171499a1167ef39458e908ccf5b39c2037860c2a334642f3d2323f4b8766fe78973967e9cc731956a9c358882165a3713c490fd6513905c3173629 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTS=OFF + -DDOWNLOAD_GTEST=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/xxhash/CONTROL b/vcpkg/ports/xxhash/CONTROL new file mode 100644 index 0000000..e641b22 --- /dev/null +++ b/vcpkg/ports/xxhash/CONTROL @@ -0,0 +1,4 @@ +Source: xxhash +Version: 0.8.0 +Homepage: https://github.com/Cyan4973/xxHash +Description: Extremely fast hash algorithm diff --git a/vcpkg/ports/xxhash/portfile.cmake b/vcpkg/ports/xxhash/portfile.cmake new file mode 100644 index 0000000..95a9c3c --- /dev/null +++ b/vcpkg/ports/xxhash/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Cyan4973/xxHash + REF 94e5f23e736f2bb67ebdf90727353e65344f9fc0 # v0.8.0 + SHA512 367c82b37fd188890574446a7c237294a4a9ba038aff9a19a5d5d119058df74c089c682e9abad3281d5e14020c08834666343b2ea18378f400c8a0ee640098b8 + HEAD_REF dev +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/cmake_unofficial + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/xxHash TARGET_PATH share/${PORT}) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/yajl/CONTROL b/vcpkg/ports/yajl/CONTROL new file mode 100644 index 0000000..6811dc8 --- /dev/null +++ b/vcpkg/ports/yajl/CONTROL @@ -0,0 +1,3 @@ +Source: yajl +Version: 2.1.0-1 +Description: Yet Another JSON Library diff --git a/vcpkg/ports/yajl/cmake.patch b/vcpkg/ports/yajl/cmake.patch new file mode 100644 index 0000000..c631ead --- /dev/null +++ b/vcpkg/ports/yajl/cmake.patch @@ -0,0 +1,36 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4c0a9be..cbec22f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -28,7 +28,7 @@ ENDIF (NOT CMAKE_BUILD_TYPE) + + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") + +-IF (WIN32) ++IF (WIN32 AND FALSE) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4") + ADD_DEFINITIONS(-DWIN32) + SET(linkFlags "/PDB:NONE /INCREMENTAL:NO /OPT:NOREF /OPT:NOICF") +@@ -46,7 +46,8 @@ IF (WIN32) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996 /wd4255 /wd4130 /wd4100 /wd4711") + SET(CMAKE_C_FLAGS_DEBUG "/D DEBUG /Od /Z7") + SET(CMAKE_C_FLAGS_RELEASE "/D NDEBUG /O2") +-ELSE (WIN32) ++endif() ++if (NOT WIN32) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") + IF(CMAKE_COMPILER_IS_GNUCC) + INCLUDE(CheckCCompilerFlag) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 99cf9e9..454482a 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -78,7 +78,7 @@ INCLUDE_DIRECTORIES(${incDir}/..) + # at build time you may specify the cmake variable LIB_SUFFIX to handle + # 64-bit systems which use 'lib64' + INSTALL(TARGETS yajl +- RUNTIME DESTINATION lib${LIB_SUFFIX} ++ RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX}) + INSTALL(TARGETS yajl_s ARCHIVE DESTINATION lib${LIB_SUFFIX}) diff --git a/vcpkg/ports/yajl/portfile.cmake b/vcpkg/ports/yajl/portfile.cmake new file mode 100644 index 0000000..92742e0 --- /dev/null +++ b/vcpkg/ports/yajl/portfile.cmake @@ -0,0 +1,34 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO lloyd/yajl + REF 2.1.0 + SHA512 9e786d080803df80ec03a9c2f447501e6e8e433a6baf636824bc1d50ecf4f5f80d7dfb1d47958aeb0a30fe459bd0ef033d41bc6a79e1dc6e6b5eade930b19b02 + HEAD_REF master + PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmake.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/yajl RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/pkgconfig) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) + file(GLOB SHAREDOBJECTS ${CURRENT_PACKAGES_DIR}/lib/libyajl.so* ${CURRENT_PACKAGES_DIR}/debug/lib/libyajl.so*) + file(REMOVE_RECURSE ${SHAREDOBJECTS} ${CURRENT_PACKAGES_DIR}/lib/yajl.lib ${CURRENT_PACKAGES_DIR}/debug/lib/yajl.lib) +else() + file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) + file(REMOVE_RECURSE + ${EXES} + ${CURRENT_PACKAGES_DIR}/lib/yajl_s.lib ${CURRENT_PACKAGES_DIR}/debug/lib/yajl_s.lib + ${CURRENT_PACKAGES_DIR}/lib/libyajl_s.a ${CURRENT_PACKAGES_DIR}/debug/lib/libyajl_s.a + ) +endif() diff --git a/vcpkg/ports/yaml-cpp/CONTROL b/vcpkg/ports/yaml-cpp/CONTROL new file mode 100644 index 0000000..bbd8056 --- /dev/null +++ b/vcpkg/ports/yaml-cpp/CONTROL @@ -0,0 +1,4 @@ +Source: yaml-cpp +Version: 0.6.3 +Homepage: https://github.com/jbeder/yaml-cpp +Description: yaml-cpp is a YAML parser and emitter in C++ matching the YAML 1.2 spec. diff --git a/vcpkg/ports/yaml-cpp/fix-include-path.patch b/vcpkg/ports/yaml-cpp/fix-include-path.patch new file mode 100644 index 0000000..9a7e9ff --- /dev/null +++ b/vcpkg/ports/yaml-cpp/fix-include-path.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4732a45..3de71cc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -324,7 +324,7 @@ else() + endif() + + +-file(RELATIVE_PATH REL_INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/${INSTALL_CMAKE_DIR}" "${CMAKE_INSTALL_PREFIX}/${INCLUDE_INSTALL_ROOT_DIR}") ++set(REL_INCLUDE_DIR "../../include") + set(CONFIG_INCLUDE_DIRS "\${YAML_CPP_CMAKE_DIR}/${REL_INCLUDE_DIR}") + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp-config.cmake.in + "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/yaml-cpp-config.cmake" @ONLY) diff --git a/vcpkg/ports/yaml-cpp/portfile.cmake b/vcpkg/ports/yaml-cpp/portfile.cmake new file mode 100644 index 0000000..718bb50 --- /dev/null +++ b/vcpkg/ports/yaml-cpp/portfile.cmake @@ -0,0 +1,47 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jbeder/yaml-cpp + REF 9a3624205e8774953ef18f57067b3426c1c5ada6 #v0.6.3 + SHA512 9bd0f05b882beed748eddb5d615bf356b7d1f31c4e3a4bbf80a6bdeb30b33fa1e0ccf596161a489169e6a111a3112e371d8d00514a0bfd02e6a6a11513904bed + HEAD_REF master + PATCHES + fix-include-path.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(YAML_BUILD_SHARED_LIBS ON) +else() + set(YAML_BUILD_SHARED_LIBS OFF) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DYAML_CPP_BUILD_TOOLS=OFF + -DYAML_CPP_BUILD_TESTS=OFF + -DYAML_BUILD_SHARED_LIBS=${YAML_BUILD_SHARED_LIBS} +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/yaml-cpp) + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/yaml-cpp) +endif() + +# Remove debug include files +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(READ ${CURRENT_PACKAGES_DIR}/include/yaml-cpp/dll.h DLL_H) +if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + string(REPLACE "#ifdef YAML_CPP_DLL" "#if 1" DLL_H "${DLL_H}") +else() + string(REPLACE "#ifdef YAML_CPP_DLL" "#if 0" DLL_H "${DLL_H}") +endif() +file(WRITE ${CURRENT_PACKAGES_DIR}/include/yaml-cpp/dll.h "${DLL_H}") + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/yara/CMakeLists.txt b/vcpkg/ports/yara/CMakeLists.txt new file mode 100644 index 0000000..5b01e1c --- /dev/null +++ b/vcpkg/ports/yara/CMakeLists.txt @@ -0,0 +1,147 @@ +cmake_minimum_required(VERSION 3.8) +project(yara C) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + + +find_package(OpenSSL REQUIRED) +find_path(JANSSON_INCLUDE_DIR NAMES jansson.h) +find_library(JANSSON_LIBRARY NAMES jansson) + + +include_directories( + . + libyara + libyara/include +) + +set(PROC_PLATFORM_SOURCE "libyara/proc/none.c") +set(PROC_PLATFORM_INTERFACE "USE_NO_PROC") + +if(APPLE AND CMAKE_SYSTEM_NAME MATCHES "Darwin") + set(PROC_PLATFORM_SOURCE "libyara/proc/mach.c") + set(PROC_PLATFORM_INTERFACE "USE_MACH_PROC") +elseif(WIN32 OR MINGW OR CYGWIN) + set(PROC_PLATFORM_SOURCE "libyara/proc/windows.c") + set(PROC_PLATFORM_INTERFACE "USE_WINDOWS_PROC") +elseif(UNIX AND CMAKE_SYSTEM_NAME MATCHES "Linux") + set(THREADS_PREFER_PTHREAD_FLAG TRUE) + set(PROC_PLATFORM_SOURCE "libyara/proc/linux.c") + set(PROC_PLATFORM_INTERFACE "USE_LINUX_PROC") +endif() + +set( + libyara_sources + libyara/ahocorasick.c + libyara/arena.c + libyara/atoms.c + libyara/bitmask.c + libyara/compiler.c + libyara/endian.c + libyara/exec.c + libyara/exefiles.c + libyara/filemap.c + libyara/grammar.c + libyara/hash.c + libyara/hex_grammar.c + libyara/hex_lexer.c + libyara/lexer.c + libyara/libyara.c + libyara/mem.c + libyara/modules.c + libyara/modules/cuckoo.c + libyara/modules/dotnet.c + libyara/modules/elf.c + libyara/modules/hash.c + libyara/modules/math.c + libyara/modules/macho.c + libyara/modules/pe.c + libyara/modules/pe_utils.c + libyara/modules/tests.c + libyara/modules/time.c + libyara/object.c + libyara/parser.c + libyara/proc.c + ${PROC_PLATFORM_SOURCE} + libyara/re.c + libyara/re_grammar.c + libyara/re_lexer.c + libyara/rules.c + libyara/scan.c + libyara/scanner.c + libyara/sizedstr.c + libyara/stack.c + libyara/stopwatch.c + libyara/stream.c + libyara/strutils.c + libyara/threading.c +) + +set( + yara_sources + args.c + threading.c + yara.c +) +set( yarac_sources + args.c + yarac.c +) + + +find_package(Threads REQUIRED) + +set( + libyara_dependencies + OpenSSL::SSL + OpenSSL::Crypto + Threads::Threads + ${JANSSON_LIBRARY} +) + +IF(CMAKE_SYSTEM_NAME MATCHES "Windows") +list(APPEND libyara_dependencies Crypt32.lib Ws2_32.lib) +endif() +if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") + list(APPEND libyara_dependencies m) +endif() + +set( + libyara_definitions + -DHAVE_LIBCRYPTO + -D${PROC_PLATFORM_INTERFACE} + -DCUCKOO_MODULE + -DHASH_MODULE + -DDOTNET_MODULE +) + +add_library(libyara ${libyara_sources}) +target_link_libraries(libyara PRIVATE ${libyara_dependencies}) +target_compile_definitions(libyara PRIVATE ${libyara_definitions}) + + +add_executable(yara ${yara_sources}) +add_executable(yarac ${yarac_sources}) + +target_link_libraries(yarac PRIVATE libyara ${libyara_dependencies}) +target_link_libraries(yara PRIVATE libyara ${libyara_dependencies}) + +install( + TARGETS libyara + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_TOOLS) + install ( + TARGETS yarac yara + RUNTIME DESTINATION tools/yara + ) +endif() + +if(NOT DISABLE_INSTALL_HEADERS) + install(DIRECTORY libyara/include/ DESTINATION include) +endif() diff --git a/vcpkg/ports/yara/CONTROL b/vcpkg/ports/yara/CONTROL new file mode 100644 index 0000000..1509594 --- /dev/null +++ b/vcpkg/ports/yara/CONTROL @@ -0,0 +1,5 @@ +Source: yara +Version: 3.10.0-1 +Homepage: https://github.com/VirusTotal/yara +Description: The pattern matching swiss knife +Build-Depends: openssl, jansson diff --git a/vcpkg/ports/yara/portfile.cmake b/vcpkg/ports/yara/portfile.cmake new file mode 100644 index 0000000..d606f0b --- /dev/null +++ b/vcpkg/ports/yara/portfile.cmake @@ -0,0 +1,24 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO VirusTotal/yara + REF v3.10.0 + SHA512 034658e835d59a42f03c062e99b40e96906c5a7de4285037c835d211f53062f8e439ade45e3400c4c35ef64502112e8d3b8d4c575e3265c69286cff2ad919ed9 + HEAD_REF dev +) + +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 -DDISABLE_INSTALL_TOOLS=ON +) + +vcpkg_install_cmake() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/yara RENAME copyright) diff --git a/vcpkg/ports/yas/CONTROL b/vcpkg/ports/yas/CONTROL new file mode 100644 index 0000000..46baf2f --- /dev/null +++ b/vcpkg/ports/yas/CONTROL @@ -0,0 +1,4 @@ +Source: yas +Version: 7.0.4 +Homepage: https://github.com/niXman/yas +Description: Yet Another Serialization is a header only serialization library diff --git a/vcpkg/ports/yas/portfile.cmake b/vcpkg/ports/yas/portfile.cmake new file mode 100644 index 0000000..45ef71d --- /dev/null +++ b/vcpkg/ports/yas/portfile.cmake @@ -0,0 +1,11 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO niXman/yas + REF 572d6b4c405ce2c808c06a5bb88a66b0b98b85a5 + SHA512 3cc9df7b5d286c7c08350737677b71e255fdd60af52e56b975289ce8ad857cca374a907c5eea83da0240fbf2a92c960af26648df9fa11da7106ea630b8ddc10f + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/include/yas DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +file(INSTALL ${SOURCE_PATH}/include/yas/version.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/yasm/CONTROL b/vcpkg/ports/yasm/CONTROL new file mode 100644 index 0000000..bdcaaea --- /dev/null +++ b/vcpkg/ports/yasm/CONTROL @@ -0,0 +1,5 @@ +Source: yasm +Version: 1.3.0 +Homepage: https://github.com/yasm/yasm +Description: Yasm is a complete rewrite of the NASM assembler under the “new†BSD License. +Supports: windows & !uwp & !arm \ No newline at end of file diff --git a/vcpkg/ports/yasm/portfile.cmake b/vcpkg/ports/yasm/portfile.cmake new file mode 100644 index 0000000..5dfe2a5 --- /dev/null +++ b/vcpkg/ports/yasm/portfile.cmake @@ -0,0 +1,51 @@ +include(vcpkg_common_functions) + +if (NOT VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "${PORT} only supports windows") +elseif (TRIPLET_SYSTEM_ARCH MATCHES "arm") + message(FATAL_ERROR "ARM is currently not supported.") +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL WindowsStore) + message(FATAL_ERROR "Error: UWP builds are currently not supported.") +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO yasm/yasm + REF v1.3.0 + SHA512 f5053e2012e0d2ce88cc1cc06e3bdb501054aed5d1f78fae40bb3e676fe2eb9843d335a612d7614d99a2b9e49dca998d57f61b0b89fac8225afa4ae60ae848f1 + HEAD_REF master +) + +vcpkg_find_acquire_program(PYTHON2) +get_filename_component(PYTHON_PATH ${PYTHON2} DIRECTORY) +vcpkg_add_to_path("${PYTHON_PATH}") + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE + ${CURRENT_PACKAGES_DIR}/debug/bin/vsyasm.exe + ${CURRENT_PACKAGES_DIR}/debug/bin/yasm.exe + ${CURRENT_PACKAGES_DIR}/debug/bin/ytasm.exe +) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/vsyasm.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/vsyasm.exe) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/yasm.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/yasm.exe) +file(RENAME ${CURRENT_PACKAGES_DIR}/bin/ytasm.exe ${CURRENT_PACKAGES_DIR}/tools/${PORT}/ytasm.exe) + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING ${SOURCE_PATH}/README DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright) \ No newline at end of file diff --git a/vcpkg/ports/yato/CONTROL b/vcpkg/ports/yato/CONTROL new file mode 100644 index 0000000..6554649 --- /dev/null +++ b/vcpkg/ports/yato/CONTROL @@ -0,0 +1,3 @@ +Source: yato +Version: 1.0-2 +Description: Modern C++14 containers and utilities, actors system, typesafe config diff --git a/vcpkg/ports/yato/portfile.cmake b/vcpkg/ports/yato/portfile.cmake new file mode 100644 index 0000000..76a54ee --- /dev/null +++ b/vcpkg/ports/yato/portfile.cmake @@ -0,0 +1,42 @@ +include(vcpkg_common_functions) + +vcpkg_from_bitbucket( + OUT_SOURCE_PATH SOURCE_PATH + REPO alexey_gruzdev/yato + REF v1.0 + SHA512 631b870fd2704a03d9d66ef244f4e50968ae63da4fda0c7cd1f6ce2cea2b1e8b4506b0148cd1af1e133a70fd5d9cdc9d8c054edac6141118ee3c9427e186b270 + HEAD_REF master +) + +# Copy all header files +file(COPY "${SOURCE_PATH}/include/yato" + DESTINATION "${CURRENT_PACKAGES_DIR}/include" +) +file(COPY "${SOURCE_PATH}/modules/actors/yato" + DESTINATION "${CURRENT_PACKAGES_DIR}/include" +) +file(COPY "${SOURCE_PATH}/modules/config/yato" + DESTINATION "${CURRENT_PACKAGES_DIR}/include" +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DYATO_BUILD_TESTS:BOOL=OFF + -DYATO_BUILD_ACTORS:BOOL=ON + -DYATO_BUILD_CONFIG:BOOL=ON + -DYATO_CONFIG_MANUAL:BOOL=ON + -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG:PATH=${CURRENT_PACKAGES_DIR}/debug/lib/ + -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG:PATH=${CURRENT_PACKAGES_DIR}/debug/lib/ + -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG:PATH=${CURRENT_PACKAGES_DIR}/debug/lib/ + -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE:PATH=${CURRENT_PACKAGES_DIR}/lib/ + -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE:PATH=${CURRENT_PACKAGES_DIR}/lib/ + -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE:PATH=${CURRENT_PACKAGES_DIR}/lib/ +) + +vcpkg_build_cmake() + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/yato) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/yato/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/yato/copyright) diff --git a/vcpkg/ports/yoga/CONTROL b/vcpkg/ports/yoga/CONTROL new file mode 100644 index 0000000..5237aee --- /dev/null +++ b/vcpkg/ports/yoga/CONTROL @@ -0,0 +1,5 @@ +Source: yoga +Version: 1.18.0-1 +Homepage: https://github.com/facebook/yoga +Description: Yoga is a cross-platform layout engine which implements Flexbox +Supports: !uwp diff --git a/vcpkg/ports/yoga/add-project-declaration.patch b/vcpkg/ports/yoga/add-project-declaration.patch new file mode 100644 index 0000000..b3052a1 --- /dev/null +++ b/vcpkg/ports/yoga/add-project-declaration.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -7,6 +7,8 @@ + + set(CMAKE_VERBOSE_MAKEFILE on) + ++project(yogacore CXX) ++ + add_compile_options( + -fno-omit-frame-pointer + -fexceptions diff --git a/vcpkg/ports/yoga/portfile.cmake b/vcpkg/ports/yoga/portfile.cmake new file mode 100644 index 0000000..a0b9372 --- /dev/null +++ b/vcpkg/ports/yoga/portfile.cmake @@ -0,0 +1,44 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO facebook/yoga + REF 1.18.0 + SHA512 dba75bff0fd3b72a3c17a6856253bd14d8af7fbb2832b432118c6ee509f9fe234874969a9cfb56690ec5a2649637a6bf090da5c5f5e8907c1e1e9c09f05977e2 + HEAD_REF master + PATCHES add-project-declaration.patch +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} +) + +vcpkg_build_cmake() +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/yoga DESTINATION ${CURRENT_PACKAGES_DIR}/include FILES_MATCHING PATTERN "*.h") + +set(YOGA_LIB_PREFFIX ) +if (NOT VCPKG_TARGET_IS_WINDOWS) + set(YOGA_LIB_PREFFIX lib) +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + set(YOGA_BINARY_PATH ) + if (VCPKG_TARGET_IS_WINDOWS) + set(YOGA_BINARY_PATH Release/) + endif() + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${YOGA_BINARY_PATH}${YOGA_LIB_PREFFIX}yogacore${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + set(YOGA_BINARY_PATH ) + if (VCPKG_TARGET_IS_WINDOWS) + set(YOGA_BINARY_PATH Debug/) + endif() + file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/${YOGA_BINARY_PATH}${YOGA_LIB_PREFFIX}yogacore${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) +endif() + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/z3/CONTROL b/vcpkg/ports/z3/CONTROL new file mode 100644 index 0000000..5f314a6 --- /dev/null +++ b/vcpkg/ports/z3/CONTROL @@ -0,0 +1,5 @@ +Source: z3 +Version: 4.8.8 +Homepage: https://github.com/Z3Prover/z3 +Description: Z3 is a theorem prover from Microsoft Research. +Supports: !arm64 && !uwp diff --git a/vcpkg/ports/z3/LICENSE b/vcpkg/ports/z3/LICENSE new file mode 100644 index 0000000..cc90bed --- /dev/null +++ b/vcpkg/ports/z3/LICENSE @@ -0,0 +1,10 @@ +Z3 +Copyright (c) Microsoft Corporation +All rights reserved. +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/vcpkg/ports/z3/fix-install-path.patch b/vcpkg/ports/z3/fix-install-path.patch new file mode 100644 index 0000000..cb21e13 --- /dev/null +++ b/vcpkg/ports/z3/fix-install-path.patch @@ -0,0 +1,23 @@ +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index e8de0c7e4..064c18eab 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -173,6 +173,7 @@ install(TARGETS libz3 + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" # On Windows this installs ``libz3.lib`` which CMake calls the "corresponding import library". Do we want this installed? + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" # For Windows. DLLs are runtime targets for CMake ++ BUNDLE DESTINATION "${CMAKE_INSTALL_BINDIR}" # For MACOSX. + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" + ) + +diff --git a/src/shell/CMakeLists.txt b/src/shell/CMakeLists.txt +index 278246341..b6cd2f1c1 100644 +--- a/src/shell/CMakeLists.txt ++++ b/src/shell/CMakeLists.txt +@@ -44,5 +44,5 @@ target_link_libraries(shell PRIVATE ${Z3_DEPENDENT_LIBS}) + z3_add_component_dependencies_to_target(shell ${shell_expanded_deps}) + z3_append_linker_flag_list_to_target(shell ${Z3_DEPENDENT_EXTRA_CXX_LINK_FLAGS}) + install(TARGETS shell +- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ RUNTIME DESTINATION tools/z3 + ) diff --git a/vcpkg/ports/z3/portfile.cmake b/vcpkg/ports/z3/portfile.cmake new file mode 100644 index 0000000..a7b0297 --- /dev/null +++ b/vcpkg/ports/z3/portfile.cmake @@ -0,0 +1,34 @@ +vcpkg_fail_port_install(ON_TARGET "UWP" ON_ARCH "arm64") + +vcpkg_find_acquire_program(PYTHON2) +get_filename_component(PYTHON2_DIR "${PYTHON2}" DIRECTORY) +vcpkg_add_to_path("${PYTHON2_DIR}") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Z3Prover/z3 + REF ad55a1f1c617a7f0c3dd735c0780fc758424c7f1 # z3-4.8.8 + SHA512 e9ee645e0a70e1884c3c7745c3c95445d009557f2f06d018a0368274758dedfd94960093b9ee9332212eb29d05aca76137e8ac61365ae0deb5c12fefbe2feee1 + HEAD_REF master + PATCHES + fix-install-path.patch +) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(BUILD_STATIC "-DZ3_BUILD_LIBZ3_SHARED=OFF") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + ${BUILD_STATIC} +) + +vcpkg_install_cmake() +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/z3 TARGET_PATH share/Z3) +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/z85/CONTROL b/vcpkg/ports/z85/CONTROL new file mode 100644 index 0000000..24fc160 --- /dev/null +++ b/vcpkg/ports/z85/CONTROL @@ -0,0 +1,3 @@ +Source: z85 +Version: 1.0 +Description: Z85 is a binary-to-text encoding library. It implements ZeroMQ Base-85 Encoding Algorithm and provides custom padding. \ No newline at end of file diff --git a/vcpkg/ports/z85/portfile.cmake b/vcpkg/ports/z85/portfile.cmake new file mode 100644 index 0000000..578b46b --- /dev/null +++ b/vcpkg/ports/z85/portfile.cmake @@ -0,0 +1,19 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO artemkin/z85 + REF v1.0 + SHA512 6b205524b8388c5709ca664a595a4db8fdd24148c5f87ef7ef16d6d6eb60d2c51db0b4ab768fe9ac3e5acf5e3fe1b46ef5b9f5e7f69a53fe40a7e8d25b098479 + HEAD_REF master +) + +# Install source files +file(INSTALL ${SOURCE_PATH}/src/z85.h + ${SOURCE_PATH}/src/z85.c + ${SOURCE_PATH}/src/z85.hpp + ${SOURCE_PATH}/src/z85_impl.cpp + DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) + +# Install license +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/zeromq/CONTROL b/vcpkg/ports/zeromq/CONTROL new file mode 100644 index 0000000..a3df524 --- /dev/null +++ b/vcpkg/ports/zeromq/CONTROL @@ -0,0 +1,12 @@ +Source: zeromq +Version: 2019-09-20 +Port-Version: 1 +Homepage: https://github.com/zeromq/libzmq +Description: The ZeroMQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products + +Feature: sodium +Description: Using libsodium for CURVE security +Build-Depends: libsodium + +Feature: websockets-sha1 +Description: Enable WebSocket transport through builtin sha1 (libzmq#3676) diff --git a/vcpkg/ports/zeromq/portfile.cmake b/vcpkg/ports/zeromq/portfile.cmake new file mode 100644 index 0000000..657b150 --- /dev/null +++ b/vcpkg/ports/zeromq/portfile.cmake @@ -0,0 +1,77 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zeromq/libzmq + REF 8d34332ff2301607df0fc9971a2fbe903c0feb7c + SHA512 8b3a9b6c4e5236353672b6deb64c94ac79deb116962405f01fe36e2fd8ddc48ec65d88ffc06746ce2e13c93eaeb04e4ba73de8f9d6f2a57a73111765d5ba8ad7 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED) + +vcpkg_check_features( + OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + sodium WITH_LIBSODIUM + INVERTED_FEATURES + websockets-sha1 DISABLE_WS +) + +set(PLATFORM_OPTIONS) +if(VCPKG_TARGET_IS_MINGW) + set(PLATFORM_OPTIONS "-DCMAKE_SYSTEM_VERSION=6.0") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DZMQ_BUILD_TESTS=OFF + -DPOLLER=select + -DBUILD_STATIC=${BUILD_STATIC} + -DBUILD_SHARED=${BUILD_SHARED} + -DWITH_PERF_TOOL=OFF + -DWITH_DOCS=OFF + -DWITH_NSS=OFF + ${FEATURE_OPTIONS} + ${PLATFORM_OPTIONS} + OPTIONS_DEBUG + "-DCMAKE_PDB_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +endif() +if(EXISTS ${CURRENT_PACKAGES_DIR}/share/cmake/ZeroMQ) + vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/ZeroMQ) +endif() + +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/zmq.h + "defined ZMQ_STATIC" + "1 //defined ZMQ_STATIC" + ) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +# Handle copyright +file(RENAME ${CURRENT_PACKAGES_DIR}/share/zmq/COPYING.LESSER.txt ${CURRENT_PACKAGES_DIR}/share/zeromq/copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/share/zmq) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME ZeroMQ) diff --git a/vcpkg/ports/zeromq/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/zeromq/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..38b05d7 --- /dev/null +++ b/vcpkg/ports/zeromq/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,9 @@ +_find_package(${ARGS}) + +if(TARGET libzmq AND NOT TARGET libzmq-static) + add_library(libzmq-static INTERFACE IMPORTED) + set_target_properties(libzmq-static PROPERTIES INTERFACE_LINK_LIBRARIES libzmq) +elseif(TARGET libzmq-static AND NOT TARGET libzmq) + add_library(libzmq INTERFACE IMPORTED) + set_target_properties(libzmq PROPERTIES INTERFACE_LINK_LIBRARIES libzmq-static) +endif() diff --git a/vcpkg/ports/zfp/CONTROL b/vcpkg/ports/zfp/CONTROL new file mode 100644 index 0000000..164bade --- /dev/null +++ b/vcpkg/ports/zfp/CONTROL @@ -0,0 +1,19 @@ +Source: zfp +Version: 0.5.5-2 +Homepage: https://github.com/LLNL/zfp +Description: Zfp is an open source C/C++ library for compressed numerical arrays that support high throughput read and write random access. zfp also supports streaming compression of integer and floating-point data, e.g., for applications that read and write large data sets to and from disk. zfp is primarily written in C and C++ but also includes Python and Fortran bindings. + +Feature: all +Description: Build all components + +Feature: cfp +Description: cfp support for cfp + +Feature: test +Description: Build test + +Feature: example +Description: Build example + +Feature: utility +Description: Build utility \ No newline at end of file diff --git a/vcpkg/ports/zfp/fix-build-error.patch b/vcpkg/ports/zfp/fix-build-error.patch new file mode 100644 index 0000000..0c1e157 --- /dev/null +++ b/vcpkg/ports/zfp/fix-build-error.patch @@ -0,0 +1,11 @@ +diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt +index a960d2c..e6a492d 100644 +--- a/utils/CMakeLists.txt ++++ b/utils/CMakeLists.txt +@@ -1,5 +1,5 @@ + add_executable(zfpcmd zfp.c) +-set_property(TARGET zfpcmd PROPERTY OUTPUT_NAME zfp) ++#set_property(TARGET zfpcmd PROPERTY OUTPUT_NAME zfp) + target_link_libraries(zfpcmd zfp) + if(HAVE_LIBM_MATH) + target_link_libraries(zfpcmd m) diff --git a/vcpkg/ports/zfp/fix-install-tools.patch b/vcpkg/ports/zfp/fix-install-tools.patch new file mode 100644 index 0000000..49a511d --- /dev/null +++ b/vcpkg/ports/zfp/fix-install-tools.patch @@ -0,0 +1,72 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 47179fd..96add54 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -220,8 +220,8 @@ add_subdirectory(src) + option(BUILD_ALL "Build all subdirectories" OFF) + if(BUILD_ALL) + set(BUILD_CFP ON CACHE BOOL "Build CFP arrays library" FORCE) +- set(BUILD_ZFORP ON CACHE BOOL "Build Fortran library" FORCE) +- set(BUILD_ZFPY ON CACHE BOOL "Build python bindings for zfp" FORCE) ++ set(BUILD_ZFORP OFF CACHE BOOL "Build Fortran library" FORCE) ++ set(BUILD_ZFPY OFF CACHE BOOL "Build python bindings for zfp" FORCE) + set(BUILD_UTILITIES ON CACHE BOOL "Build command line utilities for zfp" FORCE) + set(BUILD_EXAMPLES ON CACHE BOOL "Build Examples" FORCE) + endif() +diff --git a/cfp/src/CMakeLists.txt b/cfp/src/CMakeLists.txt +index 386698c..ecba525 100644 +--- a/cfp/src/CMakeLists.txt ++++ b/cfp/src/CMakeLists.txt +@@ -36,3 +36,5 @@ install(TARGETS cfp EXPORT cfp-targets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ ++install(DIRECTORY ${ZFP_SOURCE_DIR}/cfp/include DESTINATION include) +diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt +index 7cc7606..6ca1034 100644 +--- a/examples/CMakeLists.txt ++++ b/examples/CMakeLists.txt +@@ -34,3 +34,20 @@ if(HAVE_LIBM_MATH) + target_link_libraries(pgm m) + target_link_libraries(simple m) + endif() ++ ++install(TARGETS diffusion ++ RUNTIME DESTINATION tools) ++ if(BUILD_CFP) ++ install(TARGETS diffusionC ++ RUNTIME DESTINATION tools) ++ endif() ++install(TARGETS inplace ++ RUNTIME DESTINATION tools) ++install(TARGETS iterator ++ RUNTIME DESTINATION tools) ++install(TARGETS pgm ++ RUNTIME DESTINATION tools) ++install(TARGETS simple ++ RUNTIME DESTINATION tools) ++install(TARGETS speed ++ RUNTIME DESTINATION tools) +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index d15246e..7a6c6cb 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -19,3 +19,6 @@ if(ZFP_BUILD_TESTING_LARGE) + endforeach() + endforeach() + endif() ++ ++install(TARGETS testzfp ++ RUNTIME DESTINATION tools) +diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt +index a960d2c..5fcbf87 100644 +--- a/utils/CMakeLists.txt ++++ b/utils/CMakeLists.txt +@@ -4,3 +4,6 @@ target_link_libraries(zfpcmd zfp) + if(HAVE_LIBM_MATH) + target_link_libraries(zfpcmd m) + endif() ++ ++install(TARGETS zfpcmd ++ RUNTIME DESTINATION tools) diff --git a/vcpkg/ports/zfp/portfile.cmake b/vcpkg/ports/zfp/portfile.cmake new file mode 100644 index 0000000..d189762 --- /dev/null +++ b/vcpkg/ports/zfp/portfile.cmake @@ -0,0 +1,46 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO LLNL/zfp + REF 0.5.5 + SHA512 c043cee73f6e972e047452552ab2ceb9247a6747fdb7e5f863aeab3a05208737c0bcabbe29f3c10e5c1aba961ec47aa6a0abdb395486fa0d5fb16a4ad45733c4 + HEAD_REF master + PATCHES + fix-build-error.patch + fix-install-tools.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + all BUILD_ALL + cfp BUILD_CFP + test BUILD_TESTING + example BUILD_EXAMPLES + utility BUILD_UTILITIES +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} + -DBUILD_ZFPY=OFF + -DBUILD_ZFORP=OFF +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT}) + +# Rename problematic root include "bitstream.h"; conflicts with x265's private headers +file(RENAME ${CURRENT_PACKAGES_DIR}/include/bitstream.h ${CURRENT_PACKAGES_DIR}/include/zfp/bitstream.h) +vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/zfp.h "\"bitstream.h\"" "\"zfp/bitstream.h\"") + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) \ No newline at end of file diff --git a/vcpkg/ports/zkpp/CMakeLists.txt b/vcpkg/ports/zkpp/CMakeLists.txt new file mode 100644 index 0000000..9705c58 --- /dev/null +++ b/vcpkg/ports/zkpp/CMakeLists.txt @@ -0,0 +1,111 @@ +# +# This file is based on https://github.com/tgockel/zookeeper-cpp/blob/a8d5f905e01893256299d5532b1836f64c89b5b9/CMakeLists.txt +# Which is licensed under Apache License 2.0 +# http://www.apache.org/licenses/LICENSE-2.0 +# + +cmake_minimum_required(VERSION 3.5) + +file(READ src/zk/config.hpp CONFIG_HPP_STR) +string(REGEX REPLACE ".*# *define +ZKPP_VERSION_MAJOR +([0-9]+).*" "\\1" ZKPP_VERSION_MAJOR "${CONFIG_HPP_STR}") +string(REGEX REPLACE ".*# *define +ZKPP_VERSION_MINOR +([0-9]+).*" "\\1" ZKPP_VERSION_MINOR "${CONFIG_HPP_STR}") +string(REGEX REPLACE ".*# *define +ZKPP_VERSION_PATCH +([0-9]+).*" "\\1" ZKPP_VERSION_PATCH "${CONFIG_HPP_STR}") + +set(ZKPP_VERSION "${ZKPP_VERSION_MAJOR}.${ZKPP_VERSION_MINOR}.${ZKPP_VERSION_PATCH}") +project(zookeeper-cpp + LANGUAGES CXX + VERSION "${ZKPP_VERSION}" + ) +set(PROJECT_SO_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}") +message(STATUS "Software Version: ${ZKPP_VERSION}") + +################################################################################ +# CMake # +################################################################################ + +cmake_policy(VERSION 3.5) +cmake_policy(SET CMP0037 OLD) # allow generation of "test" target +set(CMAKE_REQUIRED_QUIET YES) # tell check_include_file_cxx to keep quiet + +list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/") + +include(BuildFunctions) +include(CheckIncludeFileCXX) +include(ConfigurationSetting) +include(ListSplit) +include(GNUInstallDirs) + +################################################################################ +# Build Configuration # +################################################################################ + +find_package(Threads REQUIRED) + +if (NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Debug") + message(STATUS "No build type selected, default to ${CMAKE_BUILD_TYPE}") +endif() + +set(VALID_BUILD_TYPES Debug Release) +if(NOT ${CMAKE_BUILD_TYPE} IN_LIST VALID_BUILD_TYPES) + message(FATAL_ERROR "Invalid CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}\nValid build types are: ${VALID_BUILD_TYPES}") +endif() +message(STATUS "Configuration: ${CMAKE_BUILD_TYPE}") + +message(STATUS "Features:") +build_option(NAME CODE_COVERAGE + DOC "Enable code coverage (turns on the test-coverage target)" + DEFAULT OFF + CONFIGS_ON Debug + ) + +configuration_setting(NAME BUFFER + DOC "Type to use for zk::buffer" + DEFAULT STD_VECTOR + OPTIONS + STD_VECTOR + CUSTOM + ) + +configuration_setting(NAME FUTURE + DOC "Type to use for zk::future and zk::promise" + DEFAULT STD + OPTIONS + STD + STD_EXPERIMENTAL + CUSTOM + ) + +set(CXX_STANDARD c++17 + CACHE STRING "The language standard to target for C++." + ) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=${CXX_STANDARD}") +set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DZKPP_DEBUG=1") +set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3") + +################################################################################ +# External Libraries # +################################################################################ + +find_package(zookeeper REQUIRED) + + +build_module(NAME zkpp + PATH src/zk + NO_RECURSE + ) + +target_include_directories(zkpp PUBLIC $ $) +target_link_libraries(zkpp PRIVATE zookeeper::zookeeper) + +install(TARGETS zkpp + EXPORT zkpp + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +install(FILES ${zkpp_LIBRARY_HEADERS} DESTINATION include/zk/) + +install(EXPORT zkpp DESTINATION share/zkpp/ FILE zkppConfig.cmake) diff --git a/vcpkg/ports/zkpp/CONTROL b/vcpkg/ports/zkpp/CONTROL new file mode 100644 index 0000000..5b8aab4 --- /dev/null +++ b/vcpkg/ports/zkpp/CONTROL @@ -0,0 +1,5 @@ +Source: zkpp +Version: 0.2.3 +Homepage: https://github.com/tgockel/zookeeper-cpp +Description: A ZooKeeper client for C++. +Build-Depends: zookeeper diff --git a/vcpkg/ports/zkpp/portfile.cmake b/vcpkg/ports/zkpp/portfile.cmake new file mode 100644 index 0000000..5ec1e78 --- /dev/null +++ b/vcpkg/ports/zkpp/portfile.cmake @@ -0,0 +1,28 @@ +vcpkg_fail_port_install(ON_TARGET "Windows") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO tgockel/zookeeper-cpp + REF v0.2.3 + SHA512 086f31d4ca53f5a585fd8640caf9f2f21c90cf46d9cfe6c0e8e5b8c620e73265bb8aebec62ea4328f3f098a9b3000280582569966c0d3401627ab8c3edc31ca8 + HEAD_REF master +) + +file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") +file(GLOB_RECURSE test_files LIST_DIRECTORIES false "${SOURCE_PATH}/src/zk/*_tests.cpp") +if (NOT "${test_files}" STREQUAL "") + file(REMOVE ${test_files}) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_fixup_cmake_targets() +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/zlib/0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch b/vcpkg/ports/zlib/0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch new file mode 100644 index 0000000..8fe2b2f --- /dev/null +++ b/vcpkg/ports/zlib/0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch @@ -0,0 +1,53 @@ +diff --git a/zconf.h.cmakein b/zconf.h.cmakein +index a7f24cc..a1b359b 100644 +--- a/zconf.h.cmakein ++++ b/zconf.h.cmakein +@@ -434,11 +434,19 @@ typedef uLong FAR uLongf; + #endif + + #ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ +-# define Z_HAVE_UNISTD_H ++# if ~(~HAVE_UNISTD_H + 0) == 0 && ~(~HAVE_UNISTD_H + 1) == 1 ++# define Z_HAVE_UNISTD_H ++# elif HAVE_UNISTD_H != 0 ++# define Z_HAVE_UNISTD_H ++# endif + #endif + + #ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ +-# define Z_HAVE_STDARG_H ++# if ~(~HAVE_STDARG_H + 0) == 0 && ~(~HAVE_STDARG_H + 1) == 1 ++# define Z_HAVE_STDARG_H ++# elif HAVE_STDARG_H != 0 ++# define Z_HAVE_STDARG_H ++# endif + #endif + + #ifdef STDC +diff --git a/zconf.h.in b/zconf.h.in +index 5e1d68a..32f53c8 100644 +--- a/zconf.h.in ++++ b/zconf.h.in +@@ -432,11 +432,19 @@ typedef uLong FAR uLongf; + #endif + + #ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ +-# define Z_HAVE_UNISTD_H ++# if ~(~HAVE_UNISTD_H + 0) == 0 && ~(~HAVE_UNISTD_H + 1) == 1 ++# define Z_HAVE_UNISTD_H ++# elif HAVE_UNISTD_H != 0 ++# define Z_HAVE_UNISTD_H ++# endif + #endif + + #ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ +-# define Z_HAVE_STDARG_H ++# if ~(~HAVE_STDARG_H + 0) == 0 && ~(~HAVE_STDARG_H + 1) == 1 ++# define Z_HAVE_STDARG_H ++# elif HAVE_STDARG_H != 0 ++# define Z_HAVE_STDARG_H ++# endif + #endif + + #ifdef STDC + diff --git a/vcpkg/ports/zlib/CONTROL b/vcpkg/ports/zlib/CONTROL new file mode 100644 index 0000000..9a79b2e --- /dev/null +++ b/vcpkg/ports/zlib/CONTROL @@ -0,0 +1,5 @@ +Source: zlib +Version: 1.2.11 +Port-Version: 9 +Homepage: https://www.zlib.net/ +Description: A compression library diff --git a/vcpkg/ports/zlib/LICENSE b/vcpkg/ports/zlib/LICENSE new file mode 100644 index 0000000..ca5fddf --- /dev/null +++ b/vcpkg/ports/zlib/LICENSE @@ -0,0 +1,20 @@ + Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu \ No newline at end of file diff --git a/vcpkg/ports/zlib/add_debug_postfix_on_mingw.patch b/vcpkg/ports/zlib/add_debug_postfix_on_mingw.patch new file mode 100644 index 0000000..22172cc --- /dev/null +++ b/vcpkg/ports/zlib/add_debug_postfix_on_mingw.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0fe939d..e4fc213 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -59,7 +59,7 @@ endif() + # + check_include_file(unistd.h Z_HAVE_UNISTD_H) + +-if(MSVC) ++if(WIN32) + set(CMAKE_DEBUG_POSTFIX "d") + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) diff --git a/vcpkg/ports/zlib/cmake_dont_build_more_than_needed.patch b/vcpkg/ports/zlib/cmake_dont_build_more_than_needed.patch new file mode 100644 index 0000000..a374f76 --- /dev/null +++ b/vcpkg/ports/zlib/cmake_dont_build_more_than_needed.patch @@ -0,0 +1,74 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0fe939d..a1291d5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -7,6 +7,7 @@ set(VERSION "1.2.11") + + option(ASM686 "Enable building i686 assembly implementation") + option(AMD64 "Enable building amd64 assembly implementation") ++option(SKIP_BUILD_EXAMPLES "Skip build of the examples" OFF) + + set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables") + set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries") +@@ -124,9 +125,11 @@ set(ZLIB_SRCS + ) + + if(NOT MINGW) +- set(ZLIB_DLL_SRCS +- win32/zlib1.rc # If present will override custom build rule below. +- ) ++ if(BUILD_SHARED_LIBS) ++ set(ZLIB_DLL_SRCS ++ win32/zlib1.rc # If present will override custom build rule below. ++ ) ++ endif() + endif() + + if(CMAKE_COMPILER_IS_GNUCC) +@@ -180,11 +183,12 @@ if(MINGW) + -I ${CMAKE_CURRENT_BINARY_DIR} + -o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj + -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc) +- set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) ++ if(BUILD_SHARED_LIBS) ++ set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) ++ endif() + endif(MINGW) + +-add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) +-add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) ++add_library(zlib ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) + set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) + set_target_properties(zlib PROPERTIES SOVERSION 1) + +@@ -201,7 +205,7 @@ endif() + + if(UNIX) + # On unix-like platforms the library is almost always called libz +- set_target_properties(zlib zlibstatic PROPERTIES OUTPUT_NAME z) ++ set_target_properties(zlib PROPERTIES OUTPUT_NAME z) + if(NOT APPLE) + set_target_properties(zlib PROPERTIES LINK_FLAGS "-Wl,--version-script,\"${CMAKE_CURRENT_SOURCE_DIR}/zlib.map\"") + endif() +@@ -211,7 +215,7 @@ elseif(BUILD_SHARED_LIBS AND WIN32) + endif() + + if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) +- install(TARGETS zlib zlibstatic ++ install(TARGETS zlib + RUNTIME DESTINATION "${INSTALL_BIN_DIR}" + ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" + LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ) +@@ -230,6 +234,7 @@ endif() + # Example binaries + #============================================================================ + ++if (NOT SKIP_BUILD_EXAMPLES) + add_executable(example test/example.c) + target_link_libraries(example zlib) + add_test(example example) +@@ -247,3 +252,4 @@ if(HAVE_OFF64_T) + target_link_libraries(minigzip64 zlib) + set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") + endif() ++endif() diff --git a/vcpkg/ports/zlib/portfile.cmake b/vcpkg/ports/zlib/portfile.cmake new file mode 100644 index 0000000..6277d5b --- /dev/null +++ b/vcpkg/ports/zlib/portfile.cmake @@ -0,0 +1,56 @@ +set(VERSION 1.2.11) + +vcpkg_download_distfile(ARCHIVE_FILE + URLS "http://www.zlib.net/zlib-${VERSION}.tar.gz" "https://downloads.sourceforge.net/project/libpng/zlib/${VERSION}/zlib-${VERSION}.tar.gz" + FILENAME "zlib1211.tar.gz" + SHA512 73fd3fff4adeccd4894084c15ddac89890cd10ef105dd5e1835e1e9bbb6a49ff229713bd197d203edfa17c2727700fce65a2a235f07568212d820dca88b528ae +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE_FILE} + REF ${VERSION} + PATCHES + "cmake_dont_build_more_than_needed.patch" + "0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch" + "add_debug_postfix_on_mingw.patch" +) + +# This is generated during the cmake build +file(REMOVE ${SOURCE_PATH}/zconf.h) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DSKIP_INSTALL_FILES=ON + -DSKIP_BUILD_EXAMPLES=ON + OPTIONS_DEBUG + -DSKIP_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() + +# Install the pkgconfig file +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/zlib.pc "-lz" "-lzlib") + endif() + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/zlib.pc DESTINATION ${CURRENT_PACKAGES_DIR}/lib/pkgconfig) +endif() +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_replace_string(${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/zlib.pc "-lz" "-lzlibd") + endif() + file(COPY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/zlib.pc DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig) +endif() + +vcpkg_fixup_pkgconfig() + +file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + +vcpkg_copy_pdbs() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) + +# vcpkg_test_cmake(PACKAGE_NAME ZLIB MODULE) diff --git a/vcpkg/ports/zlib/usage b/vcpkg/ports/zlib/usage new file mode 100644 index 0000000..39d8618 --- /dev/null +++ b/vcpkg/ports/zlib/usage @@ -0,0 +1,4 @@ +The package zlib is compatible with built-in CMake targets: + + find_package(ZLIB REQUIRED) + target_link_libraries(main PRIVATE ZLIB::ZLIB) diff --git a/vcpkg/ports/zookeeper/CONTROL b/vcpkg/ports/zookeeper/CONTROL new file mode 100644 index 0000000..43c5407 --- /dev/null +++ b/vcpkg/ports/zookeeper/CONTROL @@ -0,0 +1,7 @@ +Source: zookeeper +Version: 3.5.5-1 +Description: ZooKeeper C bindings +Default-Features: sync + +Feature: sync +Description: ZooKeeper with the sync API \ No newline at end of file diff --git a/vcpkg/ports/zookeeper/cmake.patch b/vcpkg/ports/zookeeper/cmake.patch new file mode 100644 index 0000000..f47d469 --- /dev/null +++ b/vcpkg/ports/zookeeper/cmake.patch @@ -0,0 +1,74 @@ +diff --git a/zookeeper-client/zookeeper-client-c/CMakeLists.txt b/zookeeper-client/zookeeper-client-c/CMakeLists.txt +index 24a5a1b..40fa67e 100644 +--- a/zookeeper-client/zookeeper-client-c/CMakeLists.txt ++++ b/zookeeper-client/zookeeper-client-c/CMakeLists.txt +@@ -147,13 +147,15 @@ endforeach() + include(CheckStructHasMember) + check_struct_has_member("struct sockaddr_in6" sin6_addr "netinet/in.h" ZOO_IPV6_ENABLED) + ++include(GNUInstallDirs) ++ + # configure + configure_file(cmake_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/include/config.h) + + # hashtable library + set(hashtable_sources src/hashtable/hashtable_itr.c src/hashtable/hashtable.c) + add_library(hashtable STATIC ${hashtable_sources}) +-target_include_directories(hashtable PUBLIC include) ++target_include_directories(hashtable PUBLIC $ $) + target_link_libraries(hashtable PUBLIC $<$,$>:m>) + + # zookeeper library +@@ -176,11 +178,16 @@ if(WIN32) + endif() + + add_library(zookeeper STATIC ${zookeeper_sources}) +-target_include_directories(zookeeper PUBLIC include ${CMAKE_CURRENT_BINARY_DIR}/include generated) ++target_include_directories(zookeeper PUBLIC ++ $ ++ $ ++ $ ++ $) ++ + target_link_libraries(zookeeper PUBLIC +- hashtable + $<$:rt> # clock_gettime +- $<$:ws2_32>) # Winsock 2.0 ++ $<$:ws2_32> # Winsock 2.0 ++ PRIVATE hashtable) + + if(WANT_SYNCAPI AND NOT WIN32) + find_package(Threads REQUIRED) +@@ -189,7 +196,7 @@ endif() + + # cli executable + add_executable(cli src/cli.c) +-target_link_libraries(cli zookeeper) ++target_link_libraries(cli PRIVATE zookeeper) + + # load_gen executable + if(WANT_SYNCAPI AND NOT WIN32) +@@ -247,3 +254,23 @@ if(WANT_CPPUNIT) + "ZKROOT=${CMAKE_CURRENT_SOURCE_DIR}/../.." + "CLASSPATH=$CLASSPATH:$CLOVER_HOME/lib/clover*.jar") + endif() ++ ++ ++target_compile_definitions(zookeeper PRIVATE _CRT_SECURE_NO_WARNINGS _WINSOCK_DEPRECATED_NO_WARNINGS _CRT_NONSTDC_NO_DEPRECATE) ++target_compile_definitions(cli PRIVATE _CRT_SECURE_NO_WARNINGS) ++ ++file(GLOB ZOOKEEPER_HEADERS include/*.h) ++ ++install(FILES ${ZOOKEEPER_HEADERS} generated/zookeeper.jute.h DESTINATION include/zookeeper) ++ ++install(TARGETS zookeeper hashtable ++ EXPORT zookeeperConfig ++ RUNTIME DESTINATION bin ++ ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib ++) ++install(EXPORT zookeeperConfig ++ FILE zookeeperConfig.cmake ++ NAMESPACE zookeeper:: ++ DESTINATION "${CMAKE_INSTALL_PREFIX}/share/zookeeper" ++) diff --git a/vcpkg/ports/zookeeper/portfile.cmake b/vcpkg/ports/zookeeper/portfile.cmake new file mode 100644 index 0000000..8fee148 --- /dev/null +++ b/vcpkg/ports/zookeeper/portfile.cmake @@ -0,0 +1,41 @@ +include(vcpkg_common_functions) + +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_download_distfile(ARCHIVE + URLS "https://archive.apache.org/dist/zookeeper/zookeeper-3.5.5/apache-zookeeper-3.5.5.tar.gz" + FILENAME "zookeeper-3.5.5.tar.gz" + SHA512 4e22df899a83ca3cc15f6d94daadb1a8631fb4108e67b4f56d1f4fcf95f10f89c8ff1fb8a7c84799a3856d8803a8db1e1f2f3fe1b7dc0d6cedf485ef90fd212d +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + cmake.patch + win32.patch +) + +set(WANT_SYNCAPI OFF) +if("sync" IN_LIST FEATURES) + set(WANT_SYNCAPI ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/zookeeper-client/zookeeper-client-c + DISABLE_PARALLEL_CONFIGURE + PREFER_NINJA + OPTIONS + -DWANT_CPPUNIT=OFF + -DWANT_SYNCAPI=${WANT_SYNCAPI} +) + +vcpkg_install_cmake() + +file(INSTALL ${SOURCE_PATH}/zookeeper-client/zookeeper-client-c/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/zookeeper RENAME copyright) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +vcpkg_fixup_cmake_targets() + +vcpkg_copy_pdbs() diff --git a/vcpkg/ports/zookeeper/win32.patch b/vcpkg/ports/zookeeper/win32.patch new file mode 100644 index 0000000..b55f067 --- /dev/null +++ b/vcpkg/ports/zookeeper/win32.patch @@ -0,0 +1,29 @@ +diff --git a/zookeeper-client/zookeeper-client-c/src/zk_log.c b/zookeeper-client/zookeeper-client-c/src/zk_log.c +index 436485e..1902b09 100644 +--- a/zookeeper-client/zookeeper-client-c/src/zk_log.c ++++ b/zookeeper-client/zookeeper-client-c/src/zk_log.c +@@ -108,8 +108,11 @@ static const char* time_now(char* now_str){ + gettimeofday(&tv,0); + + now = tv.tv_sec; ++#ifdef WIN32 ++ localtime_s(<, &now); ++#else + localtime_r(&now, <); +- ++#endif + // clone the format used by log4j ISO8601DateFormat + // specifically: "yyyy-MM-dd HH:mm:ss,SSS" + +diff --git a/zookeeper-client/zookeeper-client-c/src/zookeeper.c b/zookeeper-client/zookeeper-client-c/src/zookeeper.c +index 25baa9c..96ed379 100644 +--- a/zookeeper-client/zookeeper-client-c/src/zookeeper.c ++++ b/zookeeper-client/zookeeper-client-c/src/zookeeper.c +@@ -90,6 +90,7 @@ + #define EAI_ADDRFAMILY WSAEINVAL /* is this still needed? */ + #define EHOSTDOWN EPIPE + #define ESTALE ENODEV ++#define strtok_r strtok_s + #endif + + #define IF_DEBUG(x) if(logLevel==ZOO_LOG_LEVEL_DEBUG) {x;} diff --git a/vcpkg/ports/zopfli/CONTROL b/vcpkg/ports/zopfli/CONTROL new file mode 100644 index 0000000..97261af --- /dev/null +++ b/vcpkg/ports/zopfli/CONTROL @@ -0,0 +1,4 @@ +Source: zopfli +Version: 1.0.3 +Homepage: https://github.com/google/zopfli +Description: Zopfli Compression Algorithm compression library programmed in C diff --git a/vcpkg/ports/zopfli/portfile.cmake b/vcpkg/ports/zopfli/portfile.cmake new file mode 100644 index 0000000..7ce1dfe --- /dev/null +++ b/vcpkg/ports/zopfli/portfile.cmake @@ -0,0 +1,69 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO google/zopfli + REF bd64b2f0553d4f1ef4e6627647c5d9fc8c71ffc0 # zopfli-1.0.3 + SHA512 3c99a4cdf3b2f0b619944bf2173ded8e10a89271fc4b2c713378b85d976a8580d15a473d5b0e6229f2911908fb1cc7397e516d618e61831c3becd65623214d94 + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DZOPFLI_BUILD_INSTALL=ON +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(EXECUTABLE_SUFFIX ".exe") +else() + set(EXECUTABLE_SUFFIX "") +endif() + +# Install tools +file(COPY ${CURRENT_PACKAGES_DIR}/bin/zopfli${EXECUTABLE_SUFFIX} + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) +file(COPY ${CURRENT_PACKAGES_DIR}/bin/zopflipng${EXECUTABLE_SUFFIX} + DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +else() + file(REMOVE + ${CURRENT_PACKAGES_DIR}/bin/zopfli${EXECUTABLE_SUFFIX} + ${CURRENT_PACKAGES_DIR}/bin/zopflipng${EXECUTABLE_SUFFIX} + ${CURRENT_PACKAGES_DIR}/debug/bin/zopfli${EXECUTABLE_SUFFIX} + ${CURRENT_PACKAGES_DIR}/debug/bin/zopflipng${EXECUTABLE_SUFFIX} + ) +endif() + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/Zopfli) + +# vcpkg_fixup_cmake_targets can not handles this on UNIX currently. +if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR + VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/zopfli/ZopfliConfig-debug.cmake + "\"\${_IMPORT_PREFIX}/debug/bin/zopfli\"" + "\"\${_IMPORT_PREFIX}/tools/zopfli/zopfli\"" + ) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/zopfli/ZopfliConfig-debug.cmake + "\"\${_IMPORT_PREFIX}/debug/bin/zopflipng\"" + "\"\${_IMPORT_PREFIX}/tools/zopfli/zopflipng\"" + ) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/zopfli/ZopfliConfig-release.cmake + "\"\${_IMPORT_PREFIX}/bin/zopfli\"" + "\"\${_IMPORT_PREFIX}/tools/zopfli/zopfli\"" + ) + vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/zopfli/ZopfliConfig-release.cmake + "\"\${_IMPORT_PREFIX}/bin/zopflipng\"" + "\"\${_IMPORT_PREFIX}/tools/zopfli/zopflipng\"" + ) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/zserge-webview/CONTROL b/vcpkg/ports/zserge-webview/CONTROL new file mode 100644 index 0000000..a595bee --- /dev/null +++ b/vcpkg/ports/zserge-webview/CONTROL @@ -0,0 +1,3 @@ +Source: zserge-webview +Version: 2019-04-27-2 +Description: Tiny cross-platform webview library for C/C++/Golang. diff --git a/vcpkg/ports/zserge-webview/portfile.cmake b/vcpkg/ports/zserge-webview/portfile.cmake new file mode 100644 index 0000000..7f0603d --- /dev/null +++ b/vcpkg/ports/zserge-webview/portfile.cmake @@ -0,0 +1,56 @@ +# header-only library + +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zserge/webview + REF 16c93bcaeaeb6aa7bb5a1432de3bef0b9ecc44f3 + SHA512 153824bd444eafe6cc5ae00800422b41d4047dc85a164c465990c3be06d82003b532e1e869bb40e3a77cbe4789ff970fcda50ef00ac7b3e2f22ef3f566340026 + HEAD_REF master +) + +file(COPY ${SOURCE_PATH}/webview.h DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +set(WEBVIEW_GTK "0") +set(WEBVIEW_WINAPI "0") +set(WEBVIEW_COCOA "0") + +if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(WEBVIEW_WINAPI "1") +elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(WEBVIEW_COCOA "1") +elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(WEBVIEW_GTK "1") +endif() + +file(READ ${CURRENT_PACKAGES_DIR}/include/webview.h _contents) +string(REPLACE + "#ifdef WEBVIEW_STATIC" + "#if 1 // #ifdef WEBVIEW_STATIC" + _contents "${_contents}" +) +string(REPLACE + "#ifdef WEBVIEW_IMPLEMENTATION" + "#if 1 // #ifdef WEBVIEW_IMPLEMENTATION" + _contents "${_contents}" +) +string(REPLACE + "defined(WEBVIEW_GTK)" + "${WEBVIEW_GTK} // defined(WEBVIEW_GTK)" + _contents "${_contents}" +) +string(REPLACE + "defined(WEBVIEW_WINAPI)" + "${WEBVIEW_WINAPI} // defined(WEBVIEW_WINAPI)" + _contents "${_contents}" +) +string(REPLACE + "defined(WEBVIEW_COCOA)" + "${WEBVIEW_COCOA} // defined(WEBVIEW_COCOA)" + _contents "${_contents}" +) +file(WRITE ${CURRENT_PACKAGES_DIR}/include/webview.h "${_contents}") + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/ports/zstd/0001-export-zstd-config.patch b/vcpkg/ports/zstd/0001-export-zstd-config.patch new file mode 100644 index 0000000..43b39d4 --- /dev/null +++ b/vcpkg/ports/zstd/0001-export-zstd-config.patch @@ -0,0 +1,93 @@ +diff --git a/build/cmake/lib/CMakeLists.txt b/build/cmake/lib/CMakeLists.txt +index 7adca875..8835d1c6 100644 +--- a/build/cmake/lib/CMakeLists.txt ++++ b/build/cmake/lib/CMakeLists.txt +@@ -78,20 +78,20 @@ endif () + + # Split project to static and shared libraries build + if (ZSTD_BUILD_SHARED) +- add_library(libzstd_shared SHARED ${Sources} ${Headers} ${PlatformDependResources}) ++ add_library(libzstd SHARED ${Sources} ${Headers} ${PlatformDependResources}) + if (ZSTD_MULTITHREAD_SUPPORT) +- set_property(TARGET libzstd_shared APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_MULTITHREAD") ++ set_property(TARGET libzstd APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_MULTITHREAD") + if (UNIX) +- target_link_libraries(libzstd_shared ${THREADS_LIBS}) ++ target_link_libraries(libzstd ${THREADS_LIBS}) + endif () + endif() + endif () + if (ZSTD_BUILD_STATIC) +- add_library(libzstd_static STATIC ${Sources} ${Headers}) ++ add_library(libzstd STATIC ${Sources} ${Headers}) + if (ZSTD_MULTITHREAD_SUPPORT) +- set_property(TARGET libzstd_static APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_MULTITHREAD") ++ set_property(TARGET libzstd APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_MULTITHREAD") + if (UNIX) +- target_link_libraries(libzstd_static ${THREADS_LIBS}) ++ target_link_libraries(libzstd ${THREADS_LIBS}) + endif () + endif () + endif () +@@ -99,16 +99,16 @@ endif () + # Add specific compile definitions for MSVC project + if (MSVC) + if (ZSTD_BUILD_SHARED) +- set_property(TARGET libzstd_shared APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_DLL_EXPORT=1;ZSTD_HEAPMODE=0;_CONSOLE;_CRT_SECURE_NO_WARNINGS") ++ set_property(TARGET libzstd APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_DLL_EXPORT=1;ZSTD_HEAPMODE=0;_CONSOLE;_CRT_SECURE_NO_WARNINGS") + endif () + if (ZSTD_BUILD_STATIC) +- set_property(TARGET libzstd_static APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_HEAPMODE=0;_CRT_SECURE_NO_WARNINGS") ++ set_property(TARGET libzstd APPEND PROPERTY COMPILE_DEFINITIONS "ZSTD_HEAPMODE=0;_CRT_SECURE_NO_WARNINGS") + endif () + endif () + + # With MSVC static library needs to be renamed to avoid conflict with import library + if (MSVC) +- set(STATIC_LIBRARY_BASE_NAME zstd_static) ++ set(STATIC_LIBRARY_BASE_NAME zstd) + else () + set(STATIC_LIBRARY_BASE_NAME zstd) + endif () +@@ -116,7 +116,7 @@ endif () + # Define static and shared library names + if (ZSTD_BUILD_SHARED) + set_target_properties( +- libzstd_shared ++ libzstd + PROPERTIES + OUTPUT_NAME zstd + VERSION ${zstd_VERSION_MAJOR}.${zstd_VERSION_MINOR}.${zstd_VERSION_PATCH} +@@ -125,7 +125,7 @@ endif () + + if (ZSTD_BUILD_STATIC) + set_target_properties( +- libzstd_static ++ libzstd + PROPERTIES + OUTPUT_NAME ${STATIC_LIBRARY_BASE_NAME}) + endif () +@@ -154,12 +154,14 @@ install(FILES + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") + + if (ZSTD_BUILD_SHARED) +- install(TARGETS libzstd_shared RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ install(TARGETS libzstd EXPORT zstd-config ++ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") + endif() + if (ZSTD_BUILD_STATIC) +- install(TARGETS libzstd_static ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") ++ install(TARGETS libzstd EXPORT zstd-config ++ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") + endif () + + # uninstall target +@@ -172,3 +174,6 @@ if (NOT TARGET uninstall) + add_custom_target(uninstall + COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) + endif () ++ ++target_include_directories(libzstd PUBLIC $) ++install(EXPORT zstd-config DESTINATION share/cmake/zstd) diff --git a/vcpkg/ports/zstd/CONTROL b/vcpkg/ports/zstd/CONTROL new file mode 100644 index 0000000..63ca909 --- /dev/null +++ b/vcpkg/ports/zstd/CONTROL @@ -0,0 +1,5 @@ +Source: zstd +Version: 1.4.4 +Port-Version: 2 +Description: Zstandard - Fast real-time compression algorithm +Homepage: https://facebook.github.io/zstd/ diff --git a/vcpkg/ports/zstd/portfile.cmake b/vcpkg/ports/zstd/portfile.cmake new file mode 100644 index 0000000..8ed5f36 --- /dev/null +++ b/vcpkg/ports/zstd/portfile.cmake @@ -0,0 +1,59 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO facebook/zstd + REF 10f0e6993f9d2f682da6d04aa2385b7d53cbb4ee # v1.4.4 + SHA512 869eb031d2f8cfd9d93502835a373f6f2ec39dc1f41dd5fd0463d3d442c153915987d00bc862ae66bded5c5697e1803a1e68491803bd1a7b358397e6eba58f64 + HEAD_REF dev + PATCHES + 0001-export-zstd-config.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(ZSTD_STATIC 1) + set(ZSTD_SHARED 0) +else() + set(ZSTD_STATIC 0) + set(ZSTD_SHARED 1) +endif() + +if(VCPKG_TARGET_IS_WINDOWS) + # Enable multithreaded mode. CMake build doesn't provide a multithreaded + # library target, but it is the default in Makefile and VS projects. + set(VCPKG_C_FLAGS "${VCPKG_C_FLAGS} -DZSTD_MULTITHREAD") + set(VCPKG_CXX_FLAGS "${VCPKG_CXX_FLAGS}") +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/build/cmake + PREFER_NINJA + OPTIONS + -DZSTD_BUILD_SHARED=${ZSTD_SHARED} + -DZSTD_BUILD_STATIC=${ZSTD_STATIC} + -DZSTD_LEGACY_SUPPORT=1 + -DZSTD_BUILD_PROGRAMS=0 + -DZSTD_BUILD_TESTS=0 + -DZSTD_BUILD_CONTRIB=0 + OPTIONS_DEBUG + -DCMAKE_DEBUG_POSTFIX=d) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() +vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/zstd) +if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libzstd.pc") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libzstd.pc" "-lzstd" "-lzstdd") +endif() +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) + +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + foreach(HEADER zdict.h zstd.h zstd_errors.h) + file(READ ${CURRENT_PACKAGES_DIR}/include/${HEADER} HEADER_CONTENTS) + string(REPLACE "defined(ZSTD_DLL_IMPORT) && (ZSTD_DLL_IMPORT==1)" "1" HEADER_CONTENTS "${HEADER_CONTENTS}") + file(WRITE ${CURRENT_PACKAGES_DIR}/include/${HEADER} "${HEADER_CONTENTS}") + endforeach() +endif() + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) +file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright "ZSTD is dual licensed - see LICENSE and COPYING files\n") diff --git a/vcpkg/ports/zstr/CONTROL b/vcpkg/ports/zstr/CONTROL new file mode 100644 index 0000000..fe7e50c --- /dev/null +++ b/vcpkg/ports/zstr/CONTROL @@ -0,0 +1,3 @@ +Source: zstr +Version: 1.0.1 +Description: This C++ header-only library enables the use of C++ standard iostreams to access ZLib-compressed streams. \ No newline at end of file diff --git a/vcpkg/ports/zstr/portfile.cmake b/vcpkg/ports/zstr/portfile.cmake new file mode 100644 index 0000000..61244eb --- /dev/null +++ b/vcpkg/ports/zstr/portfile.cmake @@ -0,0 +1,17 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mateidavid/zstr + REF v1.0.1 + SHA512 616df2394c41038bc8512748a6a699cb45310ff518e75f591c7f957d6ab3da66a384755a6015c3eb588b576940cbff429ff9798985c452b6eda6e22f94dfb264 + HEAD_REF master +) + +# Install source files +file(INSTALL ${SOURCE_PATH}/src/strict_fstream.hpp + ${SOURCE_PATH}/src/zstr.hpp + DESTINATION ${CURRENT_PACKAGES_DIR}/include/${PORT}) + +# Install license +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/zxing-cpp/0001-opencv4-compat.patch b/vcpkg/ports/zxing-cpp/0001-opencv4-compat.patch new file mode 100644 index 0000000..76ad1f4 --- /dev/null +++ b/vcpkg/ports/zxing-cpp/0001-opencv4-compat.patch @@ -0,0 +1,43 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ccb2ba9..5ade734 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,7 +1,7 @@ + cmake_minimum_required(VERSION 3.0) + + project(zxing) +- ++set(CMAKE_CXX_STANDARD 11) + option(BUILD_TESTING "Enable generation of test targets" OFF) + + set(CMAKE_LIBRARY_PATH /opt/local/lib ${CMAKE_LIBRARY_PATH}) +diff --git a/opencv-cli/src/main.cpp b/opencv-cli/src/main.cpp +index 63b6fd3..5900c4f 100644 +--- a/opencv-cli/src/main.cpp ++++ b/opencv-cli/src/main.cpp +@@ -135,14 +135,14 @@ int main(int argc, char** argv) { + + } + +- if (!videoCapture.set(CV_CAP_PROP_FRAME_WIDTH, captureWidth)) { ++ if (!videoCapture.set(cv::CAP_PROP_FRAME_WIDTH, captureWidth)) { + + // Log + cerr << "Failed to set frame width: " << captureWidth << " (ignoring)" << endl; + + } + +- if (!videoCapture.set(CV_CAP_PROP_FRAME_HEIGHT, captureHeight)) { ++ if (!videoCapture.set(cv::CAP_PROP_FRAME_HEIGHT, captureHeight)) { + + // Log + cerr << "Failed to set frame height: " << captureHeight << " (ignoring)" << endl; +@@ -166,7 +166,7 @@ int main(int argc, char** argv) { + if (result) { + + // Convert to grayscale +- cvtColor(image, grey, CV_BGR2GRAY); ++ cvtColor(image, grey, cv::COLOR_BGR2GRAY); + + try { + diff --git a/vcpkg/ports/zxing-cpp/0002-improve-features.patch b/vcpkg/ports/zxing-cpp/0002-improve-features.patch new file mode 100644 index 0000000..5776c36 --- /dev/null +++ b/vcpkg/ports/zxing-cpp/0002-improve-features.patch @@ -0,0 +1,39 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5ade734..54071bd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3,6 +3,8 @@ cmake_minimum_required(VERSION 3.0) + project(zxing) + set(CMAKE_CXX_STANDARD 11) + option(BUILD_TESTING "Enable generation of test targets" OFF) ++option(WITH_OPENCV "Build with opencv" OFF) ++option(WITH_ICONV "Build with iconv" OFF) + + set(CMAKE_LIBRARY_PATH /opt/local/lib ${CMAKE_LIBRARY_PATH}) + +@@ -43,8 +45,8 @@ if(WIN32) + endif() + + # OpenCV classes +-find_package(OpenCV) +-if(OpenCV_FOUND) ++if(WITH_OPENCV) ++ find_package(OpenCV REQUIRED) + list(APPEND LIBZXING_FILES + opencv/src/zxing/MatSource.cpp + opencv/src/zxing/MatSource.h +@@ -58,10 +60,10 @@ include_directories(core/src) + add_library(libzxing ${LIBZXING_FILES}) + set_target_properties(libzxing PROPERTIES PREFIX "") + +-find_package(Iconv) +-if(ICONV_FOUND) +- include_directories(${ICONV_INCLUDE_DIR}) +- target_link_libraries(libzxing ${ICONV_LIBRARIES}) ++if(WITH_ICONV) ++ find_package(Iconv REQUIRED) ++ include_directories(${Iconv_INCLUDE_DIRS}) ++ target_link_libraries(libzxing ${Iconv_LIBRARIES}) + else() + add_definitions(-DNO_ICONV=1) + endif() diff --git a/vcpkg/ports/zxing-cpp/0003-fix-dependency-bigint.patch b/vcpkg/ports/zxing-cpp/0003-fix-dependency-bigint.patch new file mode 100644 index 0000000..eff577f --- /dev/null +++ b/vcpkg/ports/zxing-cpp/0003-fix-dependency-bigint.patch @@ -0,0 +1,49 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 54071bd..0edd0e9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -44,6 +44,11 @@ if(WIN32) + set(CMAKE_DEBUG_POSTFIX -debug) + endif() + ++# Bigint ++find_package(bigint CONFIG REQUIRED) ++ ++link_libraries(bigint::bigint) ++ + # OpenCV classes + if(WITH_OPENCV) + find_package(OpenCV REQUIRED) +diff --git a/source_files.cmake b/source_files.cmake +index db3d8d4..39abe82 100644 +--- a/source_files.cmake ++++ b/source_files.cmake +@@ -1,28 +1,4 @@ + set(LIBZXING_FILES +- core/src/bigint/BigInteger.cc +- core/src/bigint/BigInteger.cc +- core/src/bigint/BigInteger.hh +- core/src/bigint/BigInteger.hh +- core/src/bigint/BigIntegerAlgorithms.cc +- core/src/bigint/BigIntegerAlgorithms.cc +- core/src/bigint/BigIntegerAlgorithms.hh +- core/src/bigint/BigIntegerAlgorithms.hh +- core/src/bigint/BigIntegerLibrary.hh +- core/src/bigint/BigIntegerLibrary.hh +- core/src/bigint/BigIntegerUtils.cc +- core/src/bigint/BigIntegerUtils.cc +- core/src/bigint/BigIntegerUtils.hh +- core/src/bigint/BigIntegerUtils.hh +- core/src/bigint/BigUnsigned.cc +- core/src/bigint/BigUnsigned.cc +- core/src/bigint/BigUnsigned.hh +- core/src/bigint/BigUnsigned.hh +- core/src/bigint/BigUnsignedInABase.cc +- core/src/bigint/BigUnsignedInABase.cc +- core/src/bigint/BigUnsignedInABase.hh +- core/src/bigint/BigUnsignedInABase.hh +- core/src/bigint/NumberlikeArray.hh +- core/src/bigint/NumberlikeArray.hh + core/src/zxing/aztec/AztecDetectorResult.cpp + core/src/zxing/aztec/AztecDetectorResult.h + core/src/zxing/aztec/AztecReader.cpp diff --git a/vcpkg/ports/zxing-cpp/CONTROL b/vcpkg/ports/zxing-cpp/CONTROL new file mode 100644 index 0000000..4f661dd --- /dev/null +++ b/vcpkg/ports/zxing-cpp/CONTROL @@ -0,0 +1,15 @@ +Source: zxing-cpp +Version: 3.3.3 +Port-Version: 8 +Homepage: https://github.com/glassechidna/zxing-cpp +Description: Barcode detection and decoding library. +Build-Depends: bigint +Default-Features: opencv, iconv + +Feature: opencv +Build-Depends: opencv +Description: Build with opencv + +Feature: iconv +Build-Depends: libiconv +Description: Build with libiconv \ No newline at end of file diff --git a/vcpkg/ports/zxing-cpp/portfile.cmake b/vcpkg/ports/zxing-cpp/portfile.cmake new file mode 100644 index 0000000..9211ef3 --- /dev/null +++ b/vcpkg/ports/zxing-cpp/portfile.cmake @@ -0,0 +1,53 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO glassechidna/zxing-cpp + REF 5aad4744a3763d814df98a18886979893e638274 + SHA512 a079ad47171224de4469e76bf0779b6ebc9c6dfb3604bd5dbf5e6e5f321d9e6255f689daa749855f8400023602f1773214013c006442e9b32dd4b8146c888c02 + HEAD_REF master + PATCHES + 0001-opencv4-compat.patch + 0002-improve-features.patch + 0003-fix-dependency-bigint.patch +) + +file(REMOVE ${SOURCE_PATH}/cmake/FindModules/FindIconv.cmake) +# Depends on port bigint +file(REMOVE_RECURSE ${SOURCE_PATH}/core/src/bigint) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + opencv WITH_OPENCV + iconv WITH_ICONV +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS ${FEATURE_OPTIONS} +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + +vcpkg_fixup_cmake_targets(CONFIG_PATH lib/zxing/cmake TARGET_PATH share/zxing) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/${PORT}) +if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + file(COPY ${CURRENT_PACKAGES_DIR}/bin/zxing.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) +else() + file(COPY ${CURRENT_PACKAGES_DIR}/bin/zxing DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/zxing) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/zxing) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/zydis/CONTROL b/vcpkg/ports/zydis/CONTROL new file mode 100644 index 0000000..4bb8dd7 --- /dev/null +++ b/vcpkg/ports/zydis/CONTROL @@ -0,0 +1,4 @@ +Source: zydis +Version: 3.1.0-1 +Homepage: https://zydis.re +Description: Fast and lightweight x86/x86-64 disassembler library. diff --git a/vcpkg/ports/zydis/portfile.cmake b/vcpkg/ports/zydis/portfile.cmake new file mode 100644 index 0000000..eea63d5 --- /dev/null +++ b/vcpkg/ports/zydis/portfile.cmake @@ -0,0 +1,52 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zyantific/zydis + REF bfee99f49274a0eec3ffea16ede3a5bda9cda88f + SHA512 de47c4a22d22e753b3d06cb6210a9df2f944b0828e49d573cadb9b0c37d590a44db74542e07eced4b0188a97b825f4990943bab1b14edfd58d80368de4299759 + HEAD_REF master +) + +vcpkg_from_github( + OUT_SOURCE_PATH ZYCORE_SOURCE_PATH + REPO zyantific/zycore-c + REF 3435866ecaa837376807ce934d2088ae46aa3fa3 + SHA512 7e25254a0c17158789a3eca417cea8abe6a938cdc91cb395bd0ce1d791c8bd6b4ee0c994ca6c8372e17c03abfb3653c9053c5d56e0a4641d765c8474fae771d2 + HEAD_REF master +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(ZYDIS_BUILD_SHARED_LIB OFF) +else() + set(ZYDIS_BUILD_SHARED_LIB ON) +endif() + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + "-DZYDIS_BUILD_SHARED_LIB=${ZYDIS_BUILD_SHARED_LIB}" + "-DZYDIS_ZYCORE_PATH=${ZYCORE_SOURCE_PATH}" +) + +vcpkg_install_cmake() + +vcpkg_configure_cmake( + SOURCE_PATH ${ZYCORE_SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe) +if(EXES) + file(REMOVE ${EXES}) +endif() + +if(VCPKG_LIBRARY_LINKAGE STREQUAL static) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) +endif() + +vcpkg_copy_pdbs() + +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/vcpkg/ports/zyre/CONTROL b/vcpkg/ports/zyre/CONTROL new file mode 100644 index 0000000..5351afb --- /dev/null +++ b/vcpkg/ports/zyre/CONTROL @@ -0,0 +1,5 @@ +Source: zyre +Version: 2019-07-07-1 +Build-Depends: czmq +Description: An open-source framework for proximity-based peer-to-peer applications +Homepage: https://github.com/zeromq/zyre diff --git a/vcpkg/ports/zyre/Config.cmake.in b/vcpkg/ports/zyre/Config.cmake.in new file mode 100644 index 0000000..2170887 --- /dev/null +++ b/vcpkg/ports/zyre/Config.cmake.in @@ -0,0 +1,9 @@ +@PACKAGE_INIT@ + +include(CMakeFindDependencyMacro) + +find_dependency(ZeroMQ) +find_dependency(czmq) + +include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") +check_required_components("@PROJECT_NAME@") diff --git a/vcpkg/ports/zyre/Findczmq.cmake b/vcpkg/ports/zyre/Findczmq.cmake new file mode 100644 index 0000000..8f6d37b --- /dev/null +++ b/vcpkg/ports/zyre/Findczmq.cmake @@ -0,0 +1,10 @@ +find_path(CZMQ_INCLUDE_DIRS NAMES czmq.h) + +find_package(czmq CONFIG REQUIRED) +set(CZMQ_LIBRARIES czmq czmq-static) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + CZMQ + REQUIRED_VARS CZMQ_INCLUDE_DIRS CZMQ_LIBRARIES +) diff --git a/vcpkg/ports/zyre/Findlibzmq.cmake b/vcpkg/ports/zyre/Findlibzmq.cmake new file mode 100644 index 0000000..706f063 --- /dev/null +++ b/vcpkg/ports/zyre/Findlibzmq.cmake @@ -0,0 +1,10 @@ +find_package(ZeroMQ CONFIG REQUIRED) + +set(LIBZMQ_INCLUDE_DIRS ${ZeroMQ_INCLUDE_DIR}) +set(LIBZMQ_LIBRARIES libzmq libzmq-static) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + LIBZMQ + REQUIRED_VARS LIBZMQ_LIBRARIES LIBZMQ_INCLUDE_DIRS +) diff --git a/vcpkg/ports/zyre/portfile.cmake b/vcpkg/ports/zyre/portfile.cmake new file mode 100644 index 0000000..de44b4b --- /dev/null +++ b/vcpkg/ports/zyre/portfile.cmake @@ -0,0 +1,69 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO zeromq/zyre + REF 2648b7eb806a2494d6eb4177f0941232d83c5294 + SHA512 8940e82ccdc427734711d63dc01c81fe86c4ca6b7e97a69df979f4d48a4711df1ccaee6a3b6aa394f9ef91d719cb95851c4eb87dfa9ed6426e2577b95e0fb464 + HEAD_REF master +) + +configure_file( + ${CMAKE_CURRENT_LIST_DIR}/Config.cmake.in + ${SOURCE_PATH}/builds/cmake/Config.cmake.in + COPYONLY +) + +foreach(_cmake_module Findczmq.cmake Findlibzmq.cmake) + configure_file( + ${CMAKE_CURRENT_LIST_DIR}/${_cmake_module} + ${SOURCE_PATH}/${_cmake_module} + COPYONLY + ) +endforeach() + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ZYRE_BUILD_SHARED) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ZYRE_BUILD_STATIC) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DZYRE_BUILD_SHARED=${ZYRE_BUILD_SHARED} + -DZYRE_BUILD_STATIC=${ZYRE_BUILD_STATIC} + -DENABLE_DRAFTS=OFF +) + +vcpkg_install_cmake() + +vcpkg_copy_pdbs() + +if(EXISTS ${CURRENT_PACKAGES_DIR}/CMake) + vcpkg_fixup_cmake_targets(CONFIG_PATH CMake) +elseif(EXISTS ${CURRENT_PACKAGES_DIR}/share/cmake/${PORT}) + vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/${PORT}) +endif() + +file(COPY + ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} +) + +vcpkg_copy_tools(TOOL_NAMES zpinger AUTO_CLEAN) + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +if(ZYRE_BUILD_STATIC) + vcpkg_replace_string( + ${CURRENT_PACKAGES_DIR}/include/zyre_library.h + "if defined ZYRE_STATIC" + "if 1 //if defined ZYRE_STATIC" + ) +endif() + +# Handle copyright +configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) + +# CMake integration test +vcpkg_test_cmake(PACKAGE_NAME ${PORT}) diff --git a/vcpkg/ports/zyre/vcpkg-cmake-wrapper.cmake b/vcpkg/ports/zyre/vcpkg-cmake-wrapper.cmake new file mode 100644 index 0000000..4100382 --- /dev/null +++ b/vcpkg/ports/zyre/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,9 @@ +_find_package(${ARGS}) + +if(TARGET zyre AND NOT TARGET zyre-static) + add_library(zyre-static INTERFACE IMPORTED) + set_target_properties(zyre-static PROPERTIES INTERFACE_LINK_LIBRARIES zyre) +elseif(TARGET zyre-static AND NOT TARGET zyre) + add_library(zyre INTERFACE IMPORTED) + set_target_properties(zyre PROPERTIES INTERFACE_LINK_LIBRARIES zyre-static) +endif() diff --git a/vcpkg/ports/zziplib/CMakeLists.txt b/vcpkg/ports/zziplib/CMakeLists.txt new file mode 100644 index 0000000..634bc5e --- /dev/null +++ b/vcpkg/ports/zziplib/CMakeLists.txt @@ -0,0 +1,89 @@ +cmake_minimum_required(VERSION 3.0) + +include(GNUInstallDirs) + +project(zziplib C) + +find_package(zlib) + +include_directories(${ZLIB_INCLUDE_DIRS}) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) + +if(MSVC) + set(CMAKE_DEBUG_POSTFIX "d") + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) +endif() + +if(UNIX) + # Find autotools output + set(ZZLIB_AUTOOLS_INCLUDE_DIRS) + file(GLOB CHILDREN RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_CURRENT_SOURCE_DIR}/*") + foreach(CHILD ${CHILDREN}) + string(REGEX MATCH "x86_64*" ZZLIB_AUTOOLS_OUTPUT_FOLDER "${CHILD}") + if (ZZLIB_AUTOOLS_OUTPUT_FOLDER) + set(ZZLIB_AUTOOLS_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/${CHILD}) + include_directories(${ZZLIB_AUTOOLS_INCLUDE_DIRS}) + include_directories(${ZZLIB_AUTOOLS_INCLUDE_DIRS}/zzip) + endif() + endforeach() +endif() + +configure_file("${CMAKE_CURRENT_LIST_DIR}/config.h.in" "${CMAKE_CURRENT_LIST_DIR}/zzip/config.h") +# List the header files +set(HEADERS zzip/__debug.h + zzip/__dirent.h + zzip/__fnmatch.h + zzip/__hints.h + zzip/__mmap.h + zzip/config.h + zzip/_msvc.h + zzip/autoconf.h + zzip/conf.h + zzip/fetch.h + zzip/file.h + zzip/format.h + zzip/fseeko.h + zzip/info.h + zzip/lib.h + zzip/memdisk.h + zzip/mmapped.h + zzip/plugin.h + zzip/stdint.h + zzip/types.h + zzip/write.h + zzip/zzip.h +) +if(UNIX) + file(GLOB OTHER_HEADERS ${ZZLIB_AUTOOLS_INCLUDE_DIRS}/zzip/*.h) + list(APPEND HEADERS ${OTHER_HEADERS}) +else() + list(APPEND HEADERS zzip/_msvc.h) +endif() + +# List the source files +set(SRCS zzip/dir.c + zzip/err.c + zzip/fetch.c + zzip/file.c + zzip/info.c + zzip/plugin.c + zzip/stat.c + zzip/zip.c +) + +add_library(zziplib ${SRCS} ${HEADERS}) + +if(BUILD_SHARED_LIBS) + target_compile_definitions(zziplib PRIVATE -DZZIPLIB_EXPORTS) +endif() + +target_link_libraries(zziplib ${ZLIB_LIBRARIES}) + +install(TARGETS zziplib + COMPONENT runtime + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib) + +install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/zzip) diff --git a/vcpkg/ports/zziplib/CONTROL b/vcpkg/ports/zziplib/CONTROL new file mode 100644 index 0000000..cd879d0 --- /dev/null +++ b/vcpkg/ports/zziplib/CONTROL @@ -0,0 +1,5 @@ +Source: zziplib +Version: 0.13.69-4 +Build-Depends: zlib +Homepage: https://github.com/gdraheim/zziplib +Description: library providing read access on ZIP-archives diff --git a/vcpkg/ports/zziplib/portfile.cmake b/vcpkg/ports/zziplib/portfile.cmake new file mode 100644 index 0000000..7ca3ca2 --- /dev/null +++ b/vcpkg/ports/zziplib/portfile.cmake @@ -0,0 +1,35 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO gdraheim/zziplib + REF v0.13.69 + SHA512 ade026289737f43ca92a8746818d87dd7618d473dbce159546ce9071c9e4cbe164a6b1c9efff16efb7aa0327b2ec6b34f3256c6bda19cd6e325703fffc810ef0 +) + +# Run configure +if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") + message(STATUS "Configuring zziplib") + vcpkg_execute_required_process( + COMMAND "./configure" --prefix=${CURRENT_INSTALLED_DIR} --with-zlib + WORKING_DIRECTORY "${SOURCE_PATH}" + LOGNAME "autotools-config-${TARGET_TRIPLET}" + ) +endif() + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + DISABLE_PARALLEL_CONFIGURE + OPTIONS -DZLIB_INCLUDE_DIRS=${CURRENT_INSTALLED_DIR}/include +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) + +# Handle copyright +file(COPY ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/zziplib) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/zziplib/COPYING.LIB ${CURRENT_PACKAGES_DIR}/share/zziplib/copyright) diff --git a/vcpkg/scripts/Generate-SpdxLicenseList.ps1 b/vcpkg/scripts/Generate-SpdxLicenseList.ps1 new file mode 100644 index 0000000..8af5fd4 --- /dev/null +++ b/vcpkg/scripts/Generate-SpdxLicenseList.ps1 @@ -0,0 +1,63 @@ +<# +#> +[CmdletBinding(PositionalBinding=$False)] +Param( + [Parameter(Mandatory=$True)] + [string]$Commit, + + [Parameter()] + [string]$GithubRepository = "spdx/license-list-data", + + [Parameter()] + [string]$LicensesOutFile = "$PSScriptRoot/../toolsrc/src/vcpkg/spdx-licenses.inc", + + [Parameter()] + [string]$ExceptionsOutFile = "$PSScriptRoot/../toolsrc/src/vcpkg/spdx-exceptions.inc" +) + +function Transform-JsonFile { + [CmdletBinding()] + Param( + [string]$Uri, + [string]$OutFile, + [string]$OuterName, + [string]$Id + ) + + $req = Invoke-WebRequest -Uri $Uri + + if ($req.StatusCode -ne 200) + { + Write-Error "Failed to GET $Uri" + throw + } + + $json = $req.Content | ConvertFrom-Json -Depth 10 + Write-Verbose "Writing output to $OutFile" + + $fileContent = @( + "// Data downloaded from $Uri", + "// Generated by scripts/Generate-SpdxLicenseList.ps1", + "{") + $json.$OuterName | ForEach-Object { + $fileContent += " `"$($_.$Id)`"," + } + $fileContent += "}" + + $fileContent -join "`n" | Out-File -FilePath $OutFile -Encoding 'utf8' +} + +$baseUrl = "https://raw.githubusercontent.com/$GithubRepository/$Commit/json" +Write-Verbose "Getting json files from $baseUrl" + +Transform-JsonFile ` + -Uri "$baseUrl/licenses.json" ` + -OutFile $LicensesOutFile ` + -OuterName 'licenses' ` + -Id 'licenseId' + +Transform-JsonFile ` + -Uri "$baseUrl/exceptions.json" ` + -OutFile $ExceptionsOutFile ` + -OuterName 'exceptions' ` + -Id 'licenseExceptionId' diff --git a/vcpkg/scripts/addPoshVcpkgToPowershellProfile.ps1 b/vcpkg/scripts/addPoshVcpkgToPowershellProfile.ps1 new file mode 100644 index 0000000..1dd27aa --- /dev/null +++ b/vcpkg/scripts/addPoshVcpkgToPowershellProfile.ps1 @@ -0,0 +1,56 @@ +[CmdletBinding()] +param() + +function findExistingImportModuleDirectives([Parameter(Mandatory=$true)][string]$path) +{ + if (!(Test-Path $path)) + { + return + } + + $fileContents = Get-Content $path + $fileContents -match 'Import-Module.+?(?=posh-vcpkg)' + return +} + +$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition + +$profileEntry = "Import-Module '$scriptsDir\posh-vcpkg'" +$profilePath = $PROFILE # Implicit powershell variable +$profileDir = Split-Path $profilePath -Parent +if (!(Test-Path $profileDir)) +{ + New-Item -ItemType Directory -Path $profileDir | Out-Null +} + +Write-Host "`nAdding the following line to ${profilePath}:" +Write-Host " $profileEntry" + +# @() Needed to force Array in PowerShell 2.0 +[Array]$existingImports = @(findExistingImportModuleDirectives $profilePath) +if ($existingImports.Count -gt 0) +{ + $existingImportsOut = $existingImports -join "`n " + Write-Host "`nposh-vcpkg is already imported to your PowerShell profile. The following entries were found:" + Write-Host " $existingImportsOut" + Write-Host "`nPlease make sure you have started a new Powershell window for the changes to take effect." + return +} + +# Modifying the profile will invalidate any signatures. +# Posh-git does the following check, so we should too. +# https://github.com/dahlbyk/posh-git/blob/master/src/Utils.ps1 +# If the profile script exists and is signed, then we should not modify it +if (Test-Path $profilePath) +{ + $sig = Get-AuthenticodeSignature $profilePath + if ($null -ne $sig.SignerCertificate) + { + Write-Warning "Skipping add of posh-vcpkg import to profile; '$profilePath' appears to be signed." + Write-Warning "Please manually add the line '$profileEntry' to your profile and resign it." + return + } +} + +Add-Content $profilePath -Value "`n$profileEntry" -Encoding UTF8 +Write-Host "`nSuccessfully added posh-vcpkg to your PowerShell profile. Please start a new Powershell window for the changes to take effect." diff --git a/vcpkg/scripts/azure-pipelines/analyze-test-results.ps1 b/vcpkg/scripts/azure-pipelines/analyze-test-results.ps1 new file mode 100644 index 0000000..5bebe98 --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/analyze-test-results.ps1 @@ -0,0 +1,440 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# + +<# +.SYNOPSIS +Analyze the test results as output by the CI system. + +.DESCRIPTION +Takes the set of port test results from $logDir, +and the baseline from $baselineFile, and makes certain that the set +of failures we expected are exactly the set of failures we got. +Then, uploads the logs from any unexpected failures. + +.PARAMETER logDir +Directory of xml test logs to analyze. + +.PARAMETER allResults +Include tests that have no change from the baseline in the output. + +.PARAMETER triplet +The triplet to analyze. + +.PARAMETER baselineFile +The path to the ci.baseline.txt file in the vcpkg repository. +#> +[CmdletBinding()] +Param( + [Parameter(Mandatory = $true)] + [string]$logDir, + [switch]$allResults, + [Parameter(Mandatory = $true)] + [string]$triplet, + [Parameter(Mandatory = $true)] + [string]$baselineFile +) + +$ErrorActionPreference = 'Stop' + +if ( -not (Test-Path $logDir) ) { + [System.Console]::Error.WriteLine("Log directory does not exist: $logDir") + exit +} + +<# +.SYNOPSIS +Creates an object the represents the test run. + +.DESCRIPTION +build_test_results takes an XML file of results from the CI run, +and constructs an object based on that XML file for further +processing. + +.OUTPUTS +An object with the following elements: + assemblyName: + assemblyStartDate: + assemblyStartTime: + assemblyTime: + collectionName: + collectionTime: + allTests: A hashtable with an entry for each port tested + The key is the name of the port + The value is an object with the following elements: + name: Name of the port (Does not include the triplet name) + result: Pass/Fail/Skip result from xunit + time: Test time in seconds + originalResult: Result as defined by Build.h in vcpkg source code + abi_tag: The port hash + features: The features installed + +.PARAMETER xmlFilename +The path to the XML file to parse. +#> +function build_test_results { + [CmdletBinding()] + Param + ( + [string]$xmlFilename + ) + if ( ($xmlFilename.Length -eq 0) -or ( -not( Test-Path $xmlFilename))) { + #write-error "Missing file: $xmlFilename" + return $null + } + + Write-Verbose "building test hash for $xmlFilename" + + [xml]$xmlContents = Get-Content $xmlFilename + + # This currently only supports one collection per assembly, which is the way + # the vcpkg tests are designed to run in the pipeline. + $xmlAssembly = $xmlContents.assemblies.assembly + $assemblyName = $xmlAssembly.name + $assemblyStartDate = $xmlAssembly."run-date" + $assemblyStartTime = $xmlAssembly."run-time" + $assemblyTime = $xmlAssembly.time + $xmlCollection = $xmlAssembly.collection + $collectionName = $xmlCollection.name + $collectionTime = $xmlCollection.time + + $allTestResults = @{ } + foreach ( $test in $xmlCollection.test) { + $name = ($test.name -replace ":.*$") + + # Reconstruct the original BuildResult enumeration (defined in Build.h) + # failure.message - why the test failed (valid only on test failure) + # reason - why the test was skipped (valid only when the test is skipped) + # case BuildResult::POST_BUILD_CHECKS_FAILED: + # case BuildResult::FILE_CONFLICTS: + # case BuildResult::BUILD_FAILED: + # case BuildResult::EXCLUDED: + # case BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES: + $originalResult = "NULLVALUE" + switch ($test.result) { + "Skip" { + $originalResult = $test.reason.InnerText + } + "Fail" { + $originalResult = $test.failure.message.InnerText + } + "Pass" { + $originalResult = "SUCCEEDED" + } + } + + $abi_tag = "" + $features = "" + foreach ( $trait in $test.traits.trait) { + switch ( $trait.name ) { + "abi_tag" { $abi_tag = $trait.value } + "features" { $features = $trait.value } + } + } + + # If additional fields get saved in the XML, then they should be added to this hash + # also consider using a PSCustomObject here instead of a hash + $testHash = @{ name = $name; result = $test.result; time = $test.time; originalResult = $originalResult; abi_tag = $abi_tag; features = $features } + $allTestResults[$name] = $testHash + } + + return @{ + assemblyName = $assemblyName; + assemblyStartDate = $assemblyStartDate; + assemblyStartTime = $assemblyStartTime; + assemblyTime = $assemblyTime; + collectionName = $collectionName; + collectionTime = $collectionTime; + allTests = $allTestResults + } +} + +<# +.SYNOPSIS +Creates an object that represents the baseline expectations. + +.DESCRIPTION +build_baseline_results converts the baseline file to an object representing +the expectations set up by the baseline file. It records four states: + 1) fail + 2) skip + 3) ignore + 4) pass -- this is represented by not being recorded +In other words, if a port is not contained in the object returned by this +cmdlet, expect it to pass. + +.OUTPUTS +An object containing the following fields: + collectionName: the triplet + fail: ports marked as fail + skip: ports marked as skipped + ignore: ports marked as ignore + +.PARAMETER baselineFile +The path to vcpkg's ci.baseline.txt. + +.PARAMETER triplet +The triplet to create the result object for. +#> +function build_baseline_results { + [CmdletBinding()] + Param( + $baselineFile, + $triplet + ) + #read in the file, strip out comments and blank lines and spaces, leave only the current triplet + #remove comments, remove empty lines, remove whitespace, then keep only those lines for $triplet + $baseline_list_raw = Get-Content -Path $baselineFile ` + | Where-Object { -not ($_ -match "\s*#") } ` + | Where-Object { -not ( $_ -match "^\s*$") } ` + | ForEach-Object { $_ -replace "\s" } ` + | Where-Object { $_ -match ":$triplet=" } + + #filter to skipped and trim the triplet + $skip_hash = @{ } + foreach ( $port in $baseline_list_raw | ? { $_ -match "=skip$" } | % { $_ -replace ":.*$" }) { + if ($skip_hash[$port] -ne $null) { + [System.Console]::Error.WriteLine("$($port):$($triplet) has multiple definitions in $baselineFile") + } + $skip_hash[$port] = $true + } + $fail_hash = @{ } + $baseline_list_raw | ? { $_ -match "=fail$" } | % { $_ -replace ":.*$" } | ? { $fail_hash[$_] = $true } | Out-Null + $ignore_hash = @{ } + $baseline_list_raw | ? { $_ -match "=ignore$" } | % { $_ -replace ":.*$" } | ? { $ignore_hash[$_] = $true } | Out-Null + + return @{ + collectionName = $triplet; + skip = $skip_hash; + fail = $fail_hash; + ignore = $ignore_hash + } +} + +<# +.SYNOPSIS +Analyzes the results of the current run against the baseline. + +.DESCRIPTION +combine_results compares the results to the baselie, and generates the results +for the CI -- whether it should pass or fail. + +.OUTPUTS +An object containing the following: +(Note that this is not the same data structure as build_test_results) + assemblyName: + assemblyStartDate: + assemblyStartTime: + assemblyTime: + collectionName: + collectionTime: + allTests: A hashtable of each port with a different status from the baseline + The key is the name of the port + The value is an object with the following data members: + name: The name of the port + result: xunit test result Pass/Fail/Skip + message: Human readable message describing the test result + time: time the current test results took to run. + baselineResult: + currentResult: + features: + ignored: list of ignored tests + +.PARAMETER baseline +The baseline object to use from build_baseline_results. + +.PARAMETER current +The results object to use from build_test_results. +#> +function combine_results { + [CmdletBinding()] + Param + ( + $baseline, + $current + ) + + if ($baseline.collectionName -ne $current.collectionName) { + Write-Warning "Comparing mismatched collections $($baseline.collectionName) and $($current.collectionName)" + } + + $currentTests = $current.allTests + + # lookup table with the results of all of the tests + $allTestResults = @{ } + + $ignoredList = @() + + Write-Verbose "analyzing $($currentTests.count) tests" + + foreach ($key in $currentTests.keys) { + Write-Verbose "analyzing $key" + + $message = $null + $result = $null + $time = $null + $currentResult = $null + $features = $currentTest.features + + $baselineResult = "Pass" + if ($baseline.fail[$key] -ne $null) { + Write-Verbose "$key is failing" + $baselineResult = "Fail" + } + elseif ( $baseline.skip[$key] -ne $null) { + Write-Verbose "$key is skipped" + $baselineResult = "Skip" + } + elseif ( $baseline.ignore[$key] -ne $null) { + $baselineResult = "ignore" + } + + $currentTest = $currentTests[$key] + + if ( $currentTest.result -eq $baselineResult) { + Write-Verbose "$key has no change from baseline" + $currentResult = $currentTest.result + if ($allResults) { + # Only marking regressions as failures but keep the skipped status + if ($currentResult -eq "Skip") { + $result = "Skip" + } + else { + $result = "Pass" + } + $message = "No change from baseline" + $time = $currentTest.time + } + } + elseif ( $baselineResult -eq "ignore") { + if ( $currentTest.result -eq "Fail" ) { + Write-Verbose "ignoring failure on $key" + $ignoredList += $key + } + } + else { + Write-Verbose "$key had a change from the baseline" + + $currentResult = $currentTest.result + # Test exists in both test runs but does not match. Determine if this is a regression + # Pass -> Fail = Fail (Regression) + # Pass -> Skip = Skip + # Fail -> Pass = Fail (need to update baseline) + # Fail -> Skip = Skip + # Skip -> Fail = Fail (Should not happen) + # Skip -> Pass = Fail (should not happen) + + $lookupTable = @{ + 'Pass' = @{ + 'Fail' = @('Fail', "Test passes in baseline but fails in current run. If expected update ci.baseline.txt with '$($key):$($current.collectionName)=fail'"); + 'Skip' = @($null, 'Test was skipped due to missing dependencies') + }; + 'Fail' = @{ + 'Pass' = @('Fail', "Test fails in baseline but now passes. Update ci.baseline.txt with '$($key):$($current.collectionName)=pass'"); + 'Skip' = @($null, 'Test fails in baseline but is skipped in current run') + }; + 'Skip' = @{ + 'Fail' = @('Skip', "Test is skipped in baseline but fails in current run. Results are ignored") + 'Pass' = @('Skip', "Test is skipped in baseline but passes in current run. Results are ignored") + } + } + $resultList = $lookupTable[$baselineResult][$currentResult] + $result = $resultList[0] + $message = $resultList[1] + $time = $currentTest.time + Write-Verbose ">$key $message" + } + + if ($result -ne $null) { + Write-Verbose "Adding $key to result list" + $allTestResults[$key] = @{ name = $key; result = $result; message = $message; time = $time; abi_tag = $currentTest.abi_tag; baselineResult = $baselineResult; currentResult = $currentResult; features = $features } + } + } + + return @{ + assemblyName = $current.assemblyName; + assemblyStartDate = $current.assemblyStartDate; + assemblyStartTime = $current.assemblyStartTime; + assemblyTime = $current.assemblyTime; + collectionName = $current.collectionName; + collectionTime = $current.collectionTime; + allTests = $allTestResults; + ignored = $ignoredList + } +} + +<# +.SYNOPSIS +Writes short errors to the CI logs. + +.DESCRIPTION +write_errors_for_summary takes a hashtable from triplets to combine_results +objects, and writes short errors to the CI logs. + +.PARAMETER complete_results +A hashtable from triplets to combine_results objects. +#> +function write_errors_for_summary { + [CmdletBinding()] + Param( + $complete_results + ) + + $failure_found = $false + + Write-Verbose "preparing error output for Azure Devops" + + foreach ($triplet in $complete_results.Keys) { + $triplet_results = $complete_results[$triplet] + + Write-Verbose "searching $triplet triplet" + + # add each port results + foreach ($testName in $triplet_results.allTests.Keys) { + $test = $triplet_results.allTests[$testName] + + Write-Verbose "checking $($testName):$triplet $($test.result)" + + if ($test.result -eq 'Fail') { + $failure_found = $true + if ($test.currentResult -eq "pass") { + [System.Console]::Error.WriteLine( ` + "PASSING, REMOVE FROM FAIL LIST: $($test.name):$triplet ($baselineFile)" ` + ) + } + else { + [System.Console]::Error.WriteLine( ` + "REGRESSION: $($test.name):$triplet. If expected, add $($test.name):$triplet=fail to $baselineFile." ` + ) + } + } + } + } +} + + +$complete_results = @{ } +Write-Verbose "looking for $triplet logs" + +# The standard name for logs is: +# .xml +# for example: +# x64-linux.xml + +$current_test_hash = build_test_results( Convert-Path "$logDir\$($triplet).xml" ) +$baseline_results = build_baseline_results -baselineFile $baselineFile -triplet $triplet + +if ($current_test_hash -eq $null) { + [System.Console]::Error.WriteLine("Missing $triplet test results in current test run") + $missing_triplets[$triplet] = "test" +} +else { + Write-Verbose "combining results..." + $complete_results[$triplet] = combine_results -baseline $baseline_results -current $current_test_hash +} + +Write-Verbose "done analyzing results" + +# emit error last. Unlike the table output this is going to be seen in the "status" section of the pipeline +# and needs to be formatted for a single line. +write_errors_for_summary -complete_results $complete_results diff --git a/vcpkg/scripts/azure-pipelines/azure-pipelines.yml b/vcpkg/scripts/azure-pipelines/azure-pipelines.yml new file mode 100644 index 0000000..1a2852c --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/azure-pipelines.yml @@ -0,0 +1,90 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# +variables: + windows-pool: 'PrWin-2020-08-12' + linux-pool: 'PrLin-2020-08-12' + osx-pool: 'PrOsx-2020-09-28' + +stages: +- stage: check_cxx_formatting + displayName: 'Check the formatting of the C++' + pool: $(windows-pool) + jobs: + - job: + workspace: + clean: resources + steps: + - task: Powershell@2 + displayName: 'Check C++ Formatting' + inputs: + filePath: 'scripts/azure-pipelines/windows/Check-CxxFormatting.ps1' + arguments: '-Root .' + pwsh: true +- stage: check_manifest_formatting + displayName: Check the formatting of port manifests + pool: $(windows-pool) + dependsOn: [] + variables: + - name: VCPKG_DOWNLOADS + value: D:\downloads + jobs: + - job: + workspace: + clean: resources + steps: + - task: Powershell@2 + displayName: 'Check port manifest Formatting' + inputs: + filePath: 'scripts/azure-pipelines/windows/Check-ManifestFormatting.ps1' + arguments: '-Root .' + pwsh: true +- stage: run_port_ci + displayName: 'Run the Port CI' + dependsOn: + - check_cxx_formatting + - check_manifest_formatting + jobs: + - template: windows/azure-pipelines.yml + parameters: + triplet: x86-windows + jobName: x86_windows + poolName: $(windows-pool) + + - template: windows/azure-pipelines.yml + parameters: + triplet: x64-windows + jobName: x64_windows + poolName: $(windows-pool) + + - template: windows/azure-pipelines.yml + parameters: + triplet: x64-windows-static + jobName: x64_windows_static + poolName: $(windows-pool) + + - template: windows/azure-pipelines.yml + parameters: + triplet: x64-uwp + jobName: x64_uwp + poolName: $(windows-pool) + + - template: windows/azure-pipelines.yml + parameters: + triplet: arm64-windows + jobName: arm64_windows + poolName: $(windows-pool) + + - template: windows/azure-pipelines.yml + parameters: + triplet: arm-uwp + jobName: arm_uwp + poolName: $(windows-pool) + + - template: osx/azure-pipelines.yml + parameters: + poolName: $(osx-pool) + + - template: linux/azure-pipelines.yml + parameters: + poolName: $(linux-pool) diff --git a/vcpkg/scripts/azure-pipelines/create-vmss-helpers.psm1 b/vcpkg/scripts/azure-pipelines/create-vmss-helpers.psm1 new file mode 100644 index 0000000..1e83100 --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/create-vmss-helpers.psm1 @@ -0,0 +1,166 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT + +<# +.SYNOPSIS +Returns whether there's a name collision in the resource group. + +.DESCRIPTION +Find-ResourceGroupNameCollision takes a list of resources, and checks if $Test +collides names with any of the resources. + +.PARAMETER Test +The name to test. + +.PARAMETER Resources +The list of resources. +#> +function Find-ResourceGroupNameCollision { + [CmdletBinding()] + Param([string]$Test, $Resources) + + foreach ($resource in $Resources) { + if ($resource.ResourceGroupName -eq $Test) { + return $true + } + } + + return $false +} + +<# +.SYNOPSIS +Attempts to find a name that does not collide with any resources in the resource group. + +.DESCRIPTION +Find-ResourceGroupName takes a set of resources from Get-AzResourceGroup, and finds the +first name in {$Prefix, $Prefix-1, $Prefix-2, ...} such that the name doesn't collide with +any of the resources in the resource group. + +.PARAMETER Prefix +The prefix of the final name; the returned name will be of the form "$Prefix(-[1-9][0-9]*)?" +#> +function Find-ResourceGroupName { + [CmdletBinding()] + Param([string] $Prefix) + + $resources = Get-AzResourceGroup + $result = $Prefix + $suffix = 0 + while (Find-ResourceGroupNameCollision -Test $result -Resources $resources) { + $suffix++ + $result = "$Prefix-$suffix" + } + + return $result +} + +<# +.SYNOPSIS +Generates a random password. + +.DESCRIPTION +New-Password generates a password, randomly, of length $Length, containing +only alphanumeric characters, underscore, and dash. + +.PARAMETER Length +The length of the returned password. +#> +function New-Password { + Param ([int] $Length = 32) + + # This 64-character alphabet generates 6 bits of entropy per character. + # The power-of-2 alphabet size allows us to select a character by masking a random Byte with bitwise-AND. + $alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-" + $mask = 63 + if ($alphabet.Length -ne 64) { + throw 'Bad alphabet length' + } + + [Byte[]]$randomData = [Byte[]]::new($Length) + $rng = $null + try { + $rng = [System.Security.Cryptography.RandomNumberGenerator]::Create() + $rng.GetBytes($randomData) + } + finally { + if ($null -ne $rng) { + $rng.Dispose() + } + } + + $result = '' + for ($idx = 0; $idx -lt $Length; $idx++) { + $result += $alphabet[$randomData[$idx] -band $mask] + } + + return $result +} + +<# +.SYNOPSIS +Waits for the shutdown of the specified resource. + +.DESCRIPTION +Wait-Shutdown takes a VM, and checks if there's a 'PowerState/stopped' +code; if there is, it returns. If there isn't, it waits ten seconds and +tries again. + +.PARAMETER ResourceGroupName +The name of the resource group to look up the VM in. + +.PARAMETER Name +The name of the virtual machine to wait on. +#> +function Wait-Shutdown { + [CmdletBinding()] + Param([string]$ResourceGroupName, [string]$Name) + + Write-Host "Waiting for $Name to stop..." + while ($true) { + $Vm = Get-AzVM -ResourceGroupName $ResourceGroupName -Name $Name -Status + $highestStatus = $Vm.Statuses.Count + for ($idx = 0; $idx -lt $highestStatus; $idx++) { + if ($Vm.Statuses[$idx].Code -eq 'PowerState/stopped') { + return + } + } + + Write-Host "... not stopped yet, sleeping for 10 seconds" + Start-Sleep -Seconds 10 + } +} + +<# +.SYNOPSIS +Sanitizes a name to be used in a storage account. + +.DESCRIPTION +Sanitize-Name takes a string, and removes all of the '-'s and +lowercases the string, since storage account names must have no +'-'s and must be completely lowercase alphanumeric. It then makes +certain that the length of the string is not greater than 24, +since that is invalid. + +.PARAMETER RawName +The name to sanitize. +#> +function Sanitize-Name { + [CmdletBinding()] + Param( + [string]$RawName + ) + + $result = $RawName.Replace('-', '').ToLowerInvariant() + if ($result.Length -gt 24) { + Write-Error 'Sanitized name for storage account $result was too long.' + throw + } + + return $result +} + +Export-ModuleMember -Function Find-ResourceGroupName +Export-ModuleMember -Function New-Password +Export-ModuleMember -Function Wait-Shutdown +Export-ModuleMember -Function Sanitize-Name diff --git a/vcpkg/scripts/azure-pipelines/end-to-end-tests.ps1 b/vcpkg/scripts/azure-pipelines/end-to-end-tests.ps1 new file mode 100644 index 0000000..50e7f6a --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/end-to-end-tests.ps1 @@ -0,0 +1,214 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# +<# +.SYNOPSIS +End-to-End tests for the vcpkg executable. + +.DESCRIPTION +These tests cover the command line interface and broad functions of vcpkg, including `install`, `remove` and certain +binary caching scenarios. They use the vcpkg executable in the current directory. + +.PARAMETER Triplet +The triplet to use for testing purposes. + +.PARAMETER WorkingRoot +The location used as scratch space for testing. + +#> + +[CmdletBinding()] +Param( + [Parameter(Mandatory = $true)] + [ValidateNotNullOrEmpty()] + [string]$Triplet, + [Parameter(Mandatory = $true)] + [ValidateNotNullOrEmpty()] + [string]$WorkingRoot +) + +$ErrorActionPreference = "Stop" + +$TestingRoot = Join-Path $WorkingRoot 'testing' +$buildtreesRoot = Join-Path $TestingRoot 'buildtrees' +$installRoot = Join-Path $TestingRoot 'installed' +$packagesRoot = Join-Path $TestingRoot 'packages' +$NuGetRoot = Join-Path $TestingRoot 'nuget' +$NuGetRoot2 = Join-Path $TestingRoot 'nuget2' +$ArchiveRoot = Join-Path $TestingRoot 'archives' +$commonArgs = @( + "--triplet", + $Triplet, + "--x-buildtrees-root=$buildtreesRoot", + "--x-install-root=$installRoot", + "--x-packages-root=$packagesRoot" +) +$CurrentTest = 'unassigned' + +function Refresh-TestRoot { + Remove-Item -Recurse -Force $TestingRoot -ErrorAction SilentlyContinue + mkdir $TestingRoot + mkdir $NuGetRoot +} + +function Require-FileExists { + [CmdletBinding()] + Param( + [string]$File + ) + if (-Not (Test-Path $File)) { + throw "'$CurrentTest' failed to create file '$File'" + } +} + +function Require-FileNotExists { + [CmdletBinding()] + Param( + [string]$File + ) + if (Test-Path $File) { + throw "'$CurrentTest' should not have created file '$File'" + } +} + +function Throw-IfFailed { + if ($LASTEXITCODE -ne 0) { + throw "'$CurrentTest' had a step with a nonzero exit code" + } +} + +function Throw-IfNotFailed { + if ($LASTEXITCODE -eq 0) { + throw "'$CurrentTest' had a step with an unexpectedly zero exit code" + } +} + +function Run-Vcpkg { + param([string[]]$TestArgs) + $CurrentTest = "./vcpkg $($testArgs -join ' ')" + Write-Host $CurrentTest + ./vcpkg @testArgs +} + +if (-not $IsLinux -and -not $IsMacOS) { + Refresh-TestRoot + # Test msbuild props and targets + $CurrentTest = "zlib:x86-windows-static msbuild scripts\testing\integrate-install\..." + Write-Host $CurrentTest + ./vcpkg $commonArgs install zlib:x86-windows-static --x-binarysource=clear + Throw-IfFailed + foreach ($project in @("VcpkgTriplet", "VcpkgTriplet2", "VcpkgUseStatic", "VcpkgUseStatic2")) { + $CurrentTest = "msbuild scripts\testing\integrate-install\$project.vcxproj" + ./vcpkg $commonArgs env "msbuild scripts\testing\integrate-install\$project.vcxproj /p:VcpkgRoot=$TestingRoot /p:IntDir=$TestingRoot\int\ /p:OutDir=$TestingRoot\out\ " + Throw-IfFailed + Remove-Item -Recurse -Force $TestingRoot\int + Remove-Item -Recurse -Force $TestingRoot\out + } + $CurrentTest = "zlib:x86-windows msbuild scripts\testing\integrate-install\..." + Write-Host $CurrentTest + ./vcpkg $commonArgs install zlib:x86-windows --x-binarysource=clear + Throw-IfFailed + foreach ($project in @("Project1", "NoProps")) { + $CurrentTest = "msbuild scripts\testing\integrate-install\$project.vcxproj" + Write-Host $CurrentTest + ./vcpkg $commonArgs env "msbuild scripts\testing\integrate-install\$project.vcxproj /p:VcpkgRoot=$TestingRoot /p:IntDir=$TestingRoot\int\ /p:OutDir=$TestingRoot\out\ " + Throw-IfFailed + Remove-Item -Recurse -Force $TestingRoot\int + Remove-Item -Recurse -Force $TestingRoot\out + } +} + +Refresh-TestRoot + +# Test simple installation +Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson", "--binarycaching", "--x-binarysource=clear;files,$ArchiveRoot,write;nuget,$NuGetRoot,readwrite")) +Throw-IfFailed +Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h" + +# Test simple removal +Run-Vcpkg -TestArgs ($commonArgs + @("remove", "rapidjson")) +Throw-IfFailed +Require-FileNotExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h" + +# Test restoring from files archive +Remove-Item -Recurse -Force $installRoot +Remove-Item -Recurse -Force $buildtreesRoot +Run-Vcpkg -TestArgs ($commonArgs + @("install","rapidjson","--binarycaching","--x-binarysource=clear;files,$ArchiveRoot,read")) +Throw-IfFailed +Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h" +Require-FileNotExists "$buildtreesRoot/rapidjson/src" +Require-FileExists "$buildtreesRoot/detect_compiler" + +# Test --no-binarycaching +Remove-Item -Recurse -Force $installRoot +Remove-Item -Recurse -Force $buildtreesRoot +Run-Vcpkg -TestArgs ($commonArgs + @("install","rapidjson","--no-binarycaching","--x-binarysource=clear;files,$ArchiveRoot,read")) +Throw-IfFailed +Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h" +Require-FileExists "$buildtreesRoot/rapidjson/src" +Require-FileExists "$buildtreesRoot/detect_compiler" + +# Test --editable +Remove-Item -Recurse -Force $installRoot +Remove-Item -Recurse -Force $buildtreesRoot +Run-Vcpkg -TestArgs ($commonArgs + @("install","rapidjson","--editable","--x-binarysource=clear;files,$ArchiveRoot,read")) +Throw-IfFailed +Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h" +Require-FileExists "$buildtreesRoot/rapidjson/src" +Require-FileNotExists "$buildtreesRoot/detect_compiler" + +# Test restoring from nuget +Remove-Item -Recurse -Force $installRoot +Remove-Item -Recurse -Force $buildtreesRoot +Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson", "--binarycaching", "--x-binarysource=clear;nuget,$NuGetRoot")) +Throw-IfFailed +Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h" +Require-FileNotExists "$buildtreesRoot/rapidjson/src" + +# Test four-phase flow +Remove-Item -Recurse -Force $installRoot -ErrorAction SilentlyContinue +Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson", "--dry-run", "--x-write-nuget-packages-config=$TestingRoot/packages.config")) +Throw-IfFailed +Require-FileNotExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h" +Require-FileNotExists "$buildtreesRoot/rapidjson/src" +Require-FileExists "$TestingRoot/packages.config" +if ($IsLinux -or $IsMacOS) { + mono $(./vcpkg fetch nuget) restore $TestingRoot/packages.config -OutputDirectory "$NuGetRoot2" -Source "$NuGetRoot" +} else { + & $(./vcpkg fetch nuget) restore $TestingRoot/packages.config -OutputDirectory "$NuGetRoot2" -Source "$NuGetRoot" +} +Throw-IfFailed +Remove-Item -Recurse -Force $NuGetRoot -ErrorAction SilentlyContinue +mkdir $NuGetRoot +Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson", "tinyxml", "--binarycaching", "--x-binarysource=clear;nuget,$NuGetRoot2;nuget,$NuGetRoot,write")) +Throw-IfFailed +Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h" +Require-FileExists "$installRoot/$Triplet/include/tinyxml.h" +Require-FileNotExists "$buildtreesRoot/rapidjson/src" +Require-FileExists "$buildtreesRoot/tinyxml/src" +if ((Get-ChildItem $NuGetRoot -Filter '*.nupkg' | Measure-Object).Count -ne 1) { + throw "In '$CurrentTest': did not create exactly 1 NuGet package" +} + +# Test export +$CurrentTest = 'Prepare for export test' +Write-Host $CurrentTest +Require-FileNotExists "$TestingRoot/vcpkg-export-output" +Require-FileNotExists "$TestingRoot/vcpkg-export.1.0.0.nupkg" +Require-FileNotExists "$TestingRoot/vcpkg-export-output.zip" +Run-Vcpkg -TestArgs ($commonArgs + @("export", "rapidjson", "tinyxml", "--nuget", "--nuget-id=vcpkg-export", "--nuget-version=1.0.0", "--output=vcpkg-export-output", "--raw", "--zip", "--output-dir=$TestingRoot")) +Require-FileExists "$TestingRoot/vcpkg-export-output" +Require-FileExists "$TestingRoot/vcpkg-export.1.0.0.nupkg" +Require-FileExists "$TestingRoot/vcpkg-export-output.zip" + +# Test bad command lines +Run-Vcpkg -TestArgs ($commonArgs + @("install", "zlib", "--vcpkg-rootttttt", "C:\")) +Throw-IfNotFailed + +Run-Vcpkg -TestArgs ($commonArgs + @("install", "zlib", "--vcpkg-rootttttt=C:\")) +Throw-IfNotFailed + +Run-Vcpkg -TestArgs ($commonArgs + @("install", "zlib", "--fast")) # NB: --fast is not a switch +Throw-IfNotFailed + +$LASTEXITCODE = 0 diff --git a/vcpkg/scripts/azure-pipelines/generate-skip-list.ps1 b/vcpkg/scripts/azure-pipelines/generate-skip-list.ps1 new file mode 100644 index 0000000..84b78b3 --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/generate-skip-list.ps1 @@ -0,0 +1,83 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# + +<# +.SYNOPSIS +Generates a list of ports to skip in the CI. + +.DESCRIPTION +generate-skip-list takes a triplet, and the path to the ci.baseline.txt +file, and generates a skip list string to pass to vcpkg. + +.PARAMETER Triplet +The triplet to find skipped ports for. + +.PARAMETER BaselineFile +The path to the ci.baseline.txt file. +#> +[CmdletBinding()] +Param( + [string]$Triplet, + [string]$BaselineFile, + [switch]$SkipFailures = $false +) + +$ErrorActionPreference = 'Stop' + +if (-not (Test-Path -Path $BaselineFile)) { + Write-Error "Unable to find baseline file $BaselineFile" + throw +} + +#read in the file, strip out comments and blank lines and spaces +$baselineListRaw = Get-Content -Path $BaselineFile ` + | Where-Object { -not ($_ -match "\s*#") } ` + | Where-Object { -not ( $_ -match "^\s*$") } ` + | ForEach-Object { $_ -replace "\s" } + +############################################################### +# This script is running at the beginning of the CI test, so do a little extra +# checking so things can fail early. + +#verify everything has a valid value +$missingValues = $baselineListRaw | Where-Object { -not ($_ -match "=\w") } + +if ($missingValues) { + Write-Error "The following are missing values: $missingValues" + throw +} + +$invalidValues = $baselineListRaw ` + | Where-Object { -not ($_ -match "=(skip|pass|fail|ignore)$") } + +if ($invalidValues) { + Write-Error "The following have invalid values: $invalidValues" + throw +} + +$baselineForTriplet = $baselineListRaw ` + | Where-Object { $_ -match ":$Triplet=" } + +# Verify there are no duplicates (redefinitions are not allowed) +$file_map = @{ } +foreach ($port in $baselineForTriplet | ForEach-Object { $_ -replace ":.*$" }) { + if ($null -ne $file_map[$port]) { + Write-Error ` + "$($port):$($Triplet) has multiple definitions in $baselineFile" + throw + } + $file_map[$port] = $true +} + +# Format the skip list for the command line +if ($SkipFailures) { + $targetRegex = "=(?:skip|fail)$" +} else { + $targetRegex = "=skip$" +} + +$skip_list = $baselineForTriplet ` + | Where-Object { $_ -match $targetRegex } ` + | ForEach-Object { $_ -replace ":.*$" } +[string]::Join(",", $skip_list) diff --git a/vcpkg/scripts/azure-pipelines/linux/azure-pipelines.yml b/vcpkg/scripts/azure-pipelines/linux/azure-pipelines.yml new file mode 100644 index 0000000..36b28f0 --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/linux/azure-pipelines.yml @@ -0,0 +1,64 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# + +jobs: +- job: x64_linux + pool: + name: ${{ parameters.poolName }} + workspace: + clean: resources + timeoutInMinutes: 1440 # 1 day + variables: + - name: WORKING_ROOT + value: /mnt/vcpkg-ci + - name: VCPKG_DOWNLOADS + value: /mnt/vcpkg-ci/downloads + + steps: + - bash: df -h + displayName: 'Report on Disk Space' + - bash: | + sudo mkdir /home/agent -m=777 + sudo chown `id -u` /home/agent + exit 0 + displayName: 'Create /home/agent' + # Note: /mnt is the Azure machines' temporary disk. + - bash: | + sudo mkdir ${{ variables.WORKING_ROOT }} -m=777 + sudo mkdir ${{ variables.VCPKG_DOWNLOADS }} -m=777 + exit 0 + displayName: 'Create ${{ variables.VCPKG_DOWNLOADS }}' + - task: Bash@3 + displayName: 'Build vcpkg' + inputs: + filePath: bootstrap-vcpkg.sh + arguments: '-buildTests' + - bash: toolsrc/build.rel/vcpkg-test + displayName: 'Run vcpkg tests' + - task: PowerShell@2 + displayName: '*** Test Modified Ports and Prepare Test Logs ***' + inputs: + failOnStderr: true + filePath: 'scripts/azure-pipelines/test-modified-ports.ps1' + arguments: '-Triplet x64-linux -BuildReason $(Build.Reason) -ArchivesRoot /archives -WorkingRoot ${{ variables.WORKING_ROOT }} -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory)' + - bash: | + df -h + displayName: 'Report on Disk Space After Build' + condition: always() + - task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact: failure logs for x64-linux' + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)/failure-logs' + ArtifactName: 'failure logs for x64-linux' + condition: failed() + - bash: | + python3 scripts/file_script.py /mnt/vcpkg-ci/installed/vcpkg/info/ + displayName: 'Build a file list for all packages' + condition: always() + - task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact: file lists for x64-linux' + condition: always() + inputs: + PathtoPublish: scripts/list_files + ArtifactName: 'file lists for x64-linux' diff --git a/vcpkg/scripts/azure-pipelines/linux/create-vmss.ps1 b/vcpkg/scripts/azure-pipelines/linux/create-vmss.ps1 new file mode 100644 index 0000000..169a80f --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/linux/create-vmss.ps1 @@ -0,0 +1,326 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# + +<# +.SYNOPSIS +Creates a Linux virtual machine scale set, set up for vcpkg's CI. + +.DESCRIPTION +create-vmss.ps1 creates an Azure Linux VM scale set, set up for vcpkg's CI +system. See https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/overview +for more information. + +This script assumes you have installed Azure tools into PowerShell by following the instructions +at https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-3.6.1 +or are running from Azure Cloud Shell. + +This script assumes you have installed the OpenSSH Client optional Windows component. +#> + +$Location = 'westus2' +$Prefix = 'PrLin-' + (Get-Date -Format 'yyyy-MM-dd') +$VMSize = 'Standard_D16a_v4' +$ProtoVMName = 'PROTOTYPE' +$LiveVMPrefix = 'BUILD' +$ErrorActionPreference = 'Stop' + +$ProgressActivity = 'Creating Scale Set' +$TotalProgress = 11 +$CurrentProgress = 1 + +Import-Module "$PSScriptRoot/../create-vmss-helpers.psm1" -DisableNameChecking + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Creating SSH key' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +$sshDir = [System.IO.Path]::GetTempPath() + [System.IO.Path]::GetRandomFileName() +mkdir $sshDir +try { + ssh-keygen.exe -q -b 2048 -t rsa -f "$sshDir/key" -P [string]::Empty + $sshPublicKey = Get-Content "$sshDir/key.pub" +} finally { + Remove-Item $sshDir -Recurse -Force +} + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Creating resource group' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +$ResourceGroupName = Find-ResourceGroupName $Prefix +$AdminPW = New-Password +New-AzResourceGroup -Name $ResourceGroupName -Location $Location +$AdminPWSecure = ConvertTo-SecureString $AdminPW -AsPlainText -Force +$Credential = New-Object System.Management.Automation.PSCredential ("AdminUser", $AdminPWSecure) + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Creating virtual network' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +$allowHttp = New-AzNetworkSecurityRuleConfig ` + -Name AllowHTTP ` + -Description 'Allow HTTP(S)' ` + -Access Allow ` + -Protocol Tcp ` + -Direction Outbound ` + -Priority 1008 ` + -SourceAddressPrefix * ` + -SourcePortRange * ` + -DestinationAddressPrefix * ` + -DestinationPortRange @(80, 443) + +$allowDns = New-AzNetworkSecurityRuleConfig ` + -Name AllowDNS ` + -Description 'Allow DNS' ` + -Access Allow ` + -Protocol * ` + -Direction Outbound ` + -Priority 1009 ` + -SourceAddressPrefix * ` + -SourcePortRange * ` + -DestinationAddressPrefix * ` + -DestinationPortRange 53 + +$allowGit = New-AzNetworkSecurityRuleConfig ` + -Name AllowGit ` + -Description 'Allow git' ` + -Access Allow ` + -Protocol Tcp ` + -Direction Outbound ` + -Priority 1010 ` + -SourceAddressPrefix * ` + -SourcePortRange * ` + -DestinationAddressPrefix * ` + -DestinationPortRange 9418 + +$allowStorage = New-AzNetworkSecurityRuleConfig ` + -Name AllowStorage ` + -Description 'Allow Storage' ` + -Access Allow ` + -Protocol * ` + -Direction Outbound ` + -Priority 1011 ` + -SourceAddressPrefix VirtualNetwork ` + -SourcePortRange * ` + -DestinationAddressPrefix Storage ` + -DestinationPortRange * + +$denyEverythingElse = New-AzNetworkSecurityRuleConfig ` + -Name DenyElse ` + -Description 'Deny everything else' ` + -Access Deny ` + -Protocol * ` + -Direction Outbound ` + -Priority 1012 ` + -SourceAddressPrefix * ` + -SourcePortRange * ` + -DestinationAddressPrefix * ` + -DestinationPortRange * + +$NetworkSecurityGroupName = $ResourceGroupName + 'NetworkSecurity' +$NetworkSecurityGroup = New-AzNetworkSecurityGroup ` + -Name $NetworkSecurityGroupName ` + -ResourceGroupName $ResourceGroupName ` + -Location $Location ` + -SecurityRules @($allowHttp, $allowDns, $allowGit, $allowStorage, $denyEverythingElse) + +$SubnetName = $ResourceGroupName + 'Subnet' +$Subnet = New-AzVirtualNetworkSubnetConfig ` + -Name $SubnetName ` + -AddressPrefix "10.0.0.0/16" ` + -NetworkSecurityGroup $NetworkSecurityGroup + +$VirtualNetworkName = $ResourceGroupName + 'Network' +$VirtualNetwork = New-AzVirtualNetwork ` + -Name $VirtualNetworkName ` + -ResourceGroupName $ResourceGroupName ` + -Location $Location ` + -AddressPrefix "10.0.0.0/16" ` + -Subnet $Subnet + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Creating archives storage account' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +$StorageAccountName = Sanitize-Name $ResourceGroupName + +New-AzStorageAccount ` + -ResourceGroupName $ResourceGroupName ` + -Location $Location ` + -Name $StorageAccountName ` + -SkuName 'Standard_LRS' ` + -Kind StorageV2 + +$StorageAccountKeys = Get-AzStorageAccountKey ` + -ResourceGroupName $ResourceGroupName ` + -Name $StorageAccountName + +$StorageAccountKey = $StorageAccountKeys[0].Value + +$StorageContext = New-AzStorageContext ` + -StorageAccountName $StorageAccountName ` + -StorageAccountKey $StorageAccountKey + +New-AzStorageShare -Name 'archives' -Context $StorageContext +Set-AzStorageShareQuota -ShareName 'archives' -Context $StorageContext -Quota 1024 + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Creating prototype VM' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +$NicName = $ResourceGroupName + 'NIC' +$Nic = New-AzNetworkInterface ` + -Name $NicName ` + -ResourceGroupName $ResourceGroupName ` + -Location $Location ` + -Subnet $VirtualNetwork.Subnets[0] + +$VM = New-AzVMConfig -Name $ProtoVMName -VMSize $VMSize -Priority 'Spot' -MaxPrice -1 +$VM = Set-AzVMOperatingSystem ` + -VM $VM ` + -Linux ` + -ComputerName $ProtoVMName ` + -Credential $Credential ` + -DisablePasswordAuthentication + +$VM = Add-AzVMNetworkInterface -VM $VM -Id $Nic.Id +$VM = Set-AzVMSourceImage ` + -VM $VM ` + -PublisherName 'Canonical' ` + -Offer 'UbuntuServer' ` + -Skus '18.04-LTS' ` + -Version latest + +$VM = Set-AzVMBootDiagnostic -VM $VM -Disable + +$VM = Add-AzVMSshPublicKey ` + -VM $VM ` + -KeyData $sshPublicKey ` + -Path "/home/AdminUser/.ssh/authorized_keys" + +New-AzVm ` + -ResourceGroupName $ResourceGroupName ` + -Location $Location ` + -VM $VM + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Running provisioning script provision-image.sh in VM' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +$ProvisionImageResult = Invoke-AzVMRunCommand ` + -ResourceGroupName $ResourceGroupName ` + -VMName $ProtoVMName ` + -CommandId 'RunShellScript' ` + -ScriptPath "$PSScriptRoot\provision-image.sh" ` + -Parameter @{StorageAccountName=$StorageAccountName; ` + StorageAccountKey=$StorageAccountKey;} + +Write-Host "provision-image.sh output: $($ProvisionImageResult.value.Message)" + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Restarting VM' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +Restart-AzVM -ResourceGroupName $ResourceGroupName -Name $ProtoVMName + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Converting VM to Image' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +Stop-AzVM ` + -ResourceGroupName $ResourceGroupName ` + -Name $ProtoVMName ` + -Force + +Set-AzVM ` + -ResourceGroupName $ResourceGroupName ` + -Name $ProtoVMName ` + -Generalized + +$VM = Get-AzVM -ResourceGroupName $ResourceGroupName -Name $ProtoVMName +$PrototypeOSDiskName = $VM.StorageProfile.OsDisk.Name +$ImageConfig = New-AzImageConfig -Location $Location -SourceVirtualMachineId $VM.ID +$Image = New-AzImage -Image $ImageConfig -ImageName $ProtoVMName -ResourceGroupName $ResourceGroupName + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Deleting unused VM and disk' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +Remove-AzVM -Id $VM.ID -Force +Remove-AzDisk -ResourceGroupName $ResourceGroupName -DiskName $PrototypeOSDiskName -Force + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Creating scale set' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +$VmssIpConfigName = $ResourceGroupName + 'VmssIpConfig' +$VmssIpConfig = New-AzVmssIpConfig -SubnetId $Nic.IpConfigurations[0].Subnet.Id -Primary -Name $VmssIpConfigName +$VmssName = $ResourceGroupName + 'Vmss' +$Vmss = New-AzVmssConfig ` + -Location $Location ` + -SkuCapacity 0 ` + -SkuName $VMSize ` + -SkuTier 'Standard' ` + -Overprovision $false ` + -UpgradePolicyMode Manual ` + -EvictionPolicy Delete ` + -Priority Spot ` + -MaxPrice -1 + +$Vmss = Add-AzVmssNetworkInterfaceConfiguration ` + -VirtualMachineScaleSet $Vmss ` + -Primary $true ` + -IpConfiguration $VmssIpConfig ` + -NetworkSecurityGroupId $NetworkSecurityGroup.Id ` + -Name $NicName + +$VmssPublicKey = New-Object -TypeName 'Microsoft.Azure.Management.Compute.Models.SshPublicKey' ` + -ArgumentList @('/home/AdminUser/.ssh/authorized_keys', $sshPublicKey) + +$Vmss = Set-AzVmssOsProfile ` + -VirtualMachineScaleSet $Vmss ` + -ComputerNamePrefix $LiveVMPrefix ` + -AdminUsername AdminUser ` + -AdminPassword $AdminPW ` + -LinuxConfigurationDisablePasswordAuthentication $true ` + -PublicKey @($VmssPublicKey) + +$Vmss = Set-AzVmssStorageProfile ` + -VirtualMachineScaleSet $Vmss ` + -OsDiskCreateOption 'FromImage' ` + -OsDiskCaching ReadWrite ` + -ImageReferenceId $Image.Id + +New-AzVmss ` + -ResourceGroupName $ResourceGroupName ` + -Name $VmssName ` + -VirtualMachineScaleSet $Vmss + +#################################################################################################### +Write-Progress -Activity $ProgressActivity -Completed +Write-Host "Location: $Location" +Write-Host "Resource group name: $ResourceGroupName" +Write-Host "User name: AdminUser" +Write-Host "Using generated password: $AdminPW" +Write-Host 'Finished!' diff --git a/vcpkg/scripts/azure-pipelines/linux/provision-image.sh b/vcpkg/scripts/azure-pipelines/linux/provision-image.sh new file mode 100644 index 0000000..4936cf7 --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/linux/provision-image.sh @@ -0,0 +1,93 @@ +#!/bin/bash +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# + +sudo apt -y update +sudo apt -y dist-upgrade +# Install common build dependencies +APT_PACKAGES="at curl unzip tar libxt-dev gperf libxaw7-dev cifs-utils \ + build-essential g++ gfortran zip libx11-dev libxkbcommon-x11-dev libxi-dev \ + libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev libxinerama-dev \ + libxcursor-dev yasm libnuma1 libnuma-dev python-six python3-six python-yaml \ + flex libbison-dev autoconf libudev-dev libncurses5-dev libtool libxrandr-dev \ + xutils-dev dh-autoreconf libgles2-mesa-dev ruby-full pkg-config" + +# Additionally required by qt5-base +APT_PACKAGES="$APT_PACKAGES libxext-dev libxfixes-dev libxrender-dev \ + libxcb1-dev libx11-xcb-dev libxcb-glx0-dev" + +# Additionally required by qt5-base for qt5-x11extras +APT_PACKAGES="$APT_PACKAGES libxkbcommon-dev libxcb-keysyms1-dev \ + libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev \ + libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev \ + libxcb-render-util0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev" + +# Additionally required by libhdfs3 +APT_PACKAGES="$APT_PACKAGES libkrb5-dev" + +# Additionally required by mesa +APT_PACKAGES="$APT_PACKAGES python3-setuptools python3-mako" + +# Additionally required by some packages to install additional python packages +APT_PACKAGES="$APT_PACKAGES python3-pip" + +# Additionally required/installed by Azure DevOps Scale Set Agents +APT_PACKAGES="$APT_PACKAGES liblttng-ust0 libkrb5-3 zlib1g libicu60" + +sudo apt -y install $APT_PACKAGES + +# Delete /etc/debian_version to prevent Azure Pipelines Scale Set Agents from +# removing some of the above +sudo apt-mark hold libcurl4 +sudo apt-mark hold liblttng-ust0 +sudo apt-mark hold libkrb5-3 +sudo apt-mark hold zlib1g +sudo apt-mark hold libicu60 + +# Install newer version of nasm than the apt package, required by intel-ipsec +mkdir /tmp/nasm +cd /tmp/nasm +curl -O https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/nasm-2.14.02.tar.gz +tar -xf nasm-2.14.02.tar.gz +cd nasm-2.14.02/ +./configure --prefix=/usr && make -j +sudo make install +cd ~ + +# Install the latest Haskell stack +curl -sSL https://get.haskellstack.org/ | sudo sh + +# Install CUDA +wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.2.89-1_amd64.deb +sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub +sudo dpkg -i cuda-repo-ubuntu1804_10.2.89-1_amd64.deb +wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb +sudo dpkg -i nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb +sudo apt -y update +sudo apt install -y --no-install-recommends cuda-compiler-10-2 cuda-libraries-dev-10-2 cuda-driver-dev-10-2 cuda-cudart-dev-10-2 libcublas10 cuda-curand-dev-10-2 +sudo apt install -y --no-install-recommends libcudnn7-dev + +# Install PowerShell +wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb +sudo dpkg -i packages-microsoft-prod.deb +sudo apt update +sudo add-apt-repository universe +sudo apt install -y powershell + +if [ -z "$StorageAccountName" ]; then +echo "No storage account supplied, skipping." +else +echo "Mapping storage account" + +# Write SMB credentials +sudo mkdir /etc/smbcredentials +smbCredentialFile=/etc/smbcredentials/$StorageAccountName.cred +echo "username=$StorageAccountName" | sudo tee $smbCredentialFile > /dev/null +echo "password=$StorageAccountKey" | sudo tee -a $smbCredentialFile > /dev/null +sudo chmod 600 $smbCredentialFile + +# Mount the archives SMB share to /archives +sudo mkdir /archives -m=777 +echo "//$StorageAccountName.file.core.windows.net/archives /archives cifs nofail,vers=3.0,credentials=$smbCredentialFile,serverino,dir_mode=0777,file_mode=0777 0 0" | sudo tee -a /etc/fstab +fi diff --git a/vcpkg/scripts/azure-pipelines/osx/Get-InternalBaseBox.ps1 b/vcpkg/scripts/azure-pipelines/osx/Get-InternalBaseBox.ps1 new file mode 100644 index 0000000..2660ba9 --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/osx/Get-InternalBaseBox.ps1 @@ -0,0 +1,61 @@ +#!pwsh +#Requires -Version 6.0 + +<# +.SYNOPSIS +Installs the base box at the specified version from the share. + +.PARAMETER FileshareMachine +The machine which is acting as a fileshare + +.PARAMETER BoxVersion +The version of the box to add. Defaults to latest if nothing is passed. +#> +[CmdletBinding()] +Param( + [Parameter(Mandatory=$True)] + [String]$FileshareMachine, + + [Parameter()] + [String]$BoxVersion +) + +Set-StrictMode -Version 2 + +if (-not $IsMacOS) { + throw 'This script should only be run on a macOS host' +} + +$mountPoint = '/Users/vcpkg/vagrant/share' + +if (mount | grep "on $mountPoint (") { + umount $mountPoint + if (-not $?) { + Write-Error "umount $mountPoint failed with return code $LASTEXITCODE." + throw + } +} + +sshfs "fileshare@${FileshareMachine}:/Users/fileshare/share" $mountPoint +if ($LASTEXITCODE -eq 1) { + Write-Error 'sshfs returned 1. +This means that the osxfuse kernel extension was not allowed to load. +Please open System Preferences > Security & Privacy > General, +and allow the kernel extension to load. +Then, rerun this script. + +If you''ve already done this, you probably need to add your ssh keys to the fileshare machine.' + throw +} elseif (-not $?) { + Write-Error "sshfs failed with return code $LASTEXITCODE." + throw +} + +if (-not [String]::IsNullOrEmpty($BoxVersion)) { + $versionArgs = @("--box-version", $BoxVersion) +} else { + $versionArgs = @() +} + +vagrant box add "$mountPoint/vcpkg-boxes/macos-ci.json" @versionArgs + diff --git a/vcpkg/scripts/azure-pipelines/osx/Install-Prerequisites.ps1 b/vcpkg/scripts/azure-pipelines/osx/Install-Prerequisites.ps1 new file mode 100644 index 0000000..5463675 --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/osx/Install-Prerequisites.ps1 @@ -0,0 +1,94 @@ +#!pwsh +#Requires -Version 6.0 + +<# +.SYNOPSIS +Installs the set of prerequisites for the macOS CI hosts. + +.DESCRIPTION +Install-Prerequisites.ps1 installs all of the necessary prerequisites +to run the vcpkg macOS CI in a vagrant virtual machine, +skipping all prerequisites that are already installed. + +.PARAMETER Force +Don't skip the prerequisites that are already installed. + +.INPUTS +None + +.OUTPUTS +None +#> +[CmdletBinding()] +Param( + [Parameter()] + [Switch]$Force +) + +Set-StrictMode -Version 2 + +if (-not $IsMacOS) { + Write-Error 'This script should only be run on a macOS host' + throw +} + +Import-Module "$PSScriptRoot/Utilities.psm1" + +$Installables = Get-Content "$PSScriptRoot/configuration/installables.json" | ConvertFrom-Json + +$Installables.Applications | ForEach-Object { + if (-not (Get-CommandExists $_.TestCommand)) { + Write-Host "$($_.Name) not installed; installing now" + } elseif ($Force) { + Write-Host "$($_.Name) found; attempting to upgrade or re-install" + } else { + Write-Host "$($_.Name) already installed" + return + } + + $pathToDmg = "~/Downloads/$($_.Name).dmg" + Get-RemoteFile -OutFile $pathToDmg -Uri $_.DmgUrl -Sha256 $_.Sha256 + + hdiutil attach $pathToDmg -mountpoint /Volumes/setup-installer + sudo installer -pkg "/Volumes/setup-installer/$($_.InstallerPath)" -target / + hdiutil detach /Volumes/setup-installer +} + +$Installables.Brew | ForEach-Object { + $installable = $_ + if ($null -eq (Get-Member -InputObject $installable -Name 'Kind')) { + brew install $installable.Name + } else { + switch ($installable.Kind) { + 'cask' { brew cask install $installable.Name } + default { + Write-Error "Invalid kind: $_. Expected either empty, or 'cask'." + } + } + } +} + +# Install plugins +$installedExtensionPacks = Get-InstalledVirtualBoxExtensionPacks + +$Installables.VBoxExtensions | ForEach-Object { + $extension = $_ + $installedExts = $installedExtensionPacks | Where-Object { $_.Pack -eq $extension.FullName -and $_.Usable -eq 'true' } + + if ($null -eq $installedExts) { + Write-Host "VBox extension: $($extension.Name) not installed; installing now" + } elseif ($Force) { + Write-Host "VBox extension: $($extension.Name) found; attempting to upgrade or re-install" + } else { + Write-Host "VBox extension: $($extension.Name) already installed" + return + } + + $pathToExt = "~/Downloads/$($extension.FullName -replace ' ','_').vbox-extpack" + + Get-RemoteFile -OutFile $pathToExt -Uri $extension.Url -Sha256 $extension.Sha256 | Out-Null + + Write-Host 'Attempting to install extension with sudo; you may need to enter your password' + sudo VBoxManage extpack install --replace $pathToExt + sudo VBoxManage extpack cleanup +} diff --git a/vcpkg/scripts/azure-pipelines/osx/README.md b/vcpkg/scripts/azure-pipelines/osx/README.md new file mode 100644 index 0000000..111b17f --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/osx/README.md @@ -0,0 +1,211 @@ +# `vcpkg-eg-mac` VMs + +## Table of Contents + +- [`vcpkg-eg-mac` VMs](#vcpkg-eg-mac-vms) + - [Table of Contents](#table-of-contents) + - [Basic Usage](#basic-usage) + - [Setting up a new macOS machine](#setting-up-a-new-macos-machine) + +## Basic Usage + +The simplest usage, and one which should be used for when spinning up +new VMs, and when restarting old ones, is a simple: + +``` +$ cd ~/vagrant/vcpkg-eg-mac +$ vagrant up +``` + +Any modifications to the machines should be made in `configuration/Vagrantfile` +and `Setup-VagrantMachines.ps1`, and make sure to push any changes! + +## Setting up a new macOS machine + +Before anything else, one must download `brew` and `powershell`. + +```sh +$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" +$ brew cask install powershell +``` + +Then, we need to download the `vcpkg` repository: + +```sh +$ git clone https://github.com/microsoft/vcpkg +``` + +Then, we need to mint an SSH key: + +```sh +$ ssh-keygen +$ cat .ssh/id_rsa.pub +``` + +Add that SSH key to `authorized_keys` on the file share machine with the base box. + +Next, install prerequisites and grab the current base box with: +```sh +$ cd vcpkg/scripts/azure-pipelines/osx +$ ./Install-Prerequisites.ps1 -Force +$ ./Get-InternalBaseBox.ps1 -FileshareMachine vcpkgmm-01.guest.corp.microsoft.com +``` + +Getting the base box will fail due to missing kernel modules for sshfs and VirtualBox. Log in to the +machine, open System Preferences > Security & Privacy > General, and allow the kernel extensions for +VirtualBox and sshfs to load. Then, again: + +```sh +$ ./Get-InternalBaseBox.ps1 -FileshareMachine vcpkgmm-01.guest.corp.microsoft.com +``` + +Replace `XX` with the number of +the virtual machine. Generally, that should be the same as the number +for the physical machine; i.e., vcpkgmm-04 would use 04. + +```sh + # NOTE: you may get an error about CoreCLR; see the following paragraph if you do +$ ./Setup-VagrantMachines.ps1 \ + -MachineId XX \ + -DevopsPat '' \ + -Date \ + -ArchivesMachine 'vcpkgmm-01.guest.corp.microsoft.com' +$ cd ~/vagrant/vcpkg-eg-mac +$ vagrant up +``` + +If you see the following error: + +``` +Failed to initialize CoreCLR, HRESULT: 0x8007001F +``` + +You have to reboot the machine; run + +```sh +$ sudo shutdown -r now +``` + +and wait for the machine to start back up. Then, start again from where the error was emitted. + +## Creating a new Vagrant box + +Whenever we want to install updated versions of the command line tools, +or of macOS, we need to create a new vagrant box. +This is pretty easy, but the results of the creation are not public, +since we're concerned about licensing. +However, if you're sure you're following Apple's licensing, +you can set up your own vagrant boxes that are the same as ours by doing the following: + +You'll need some prerequisites: + +- macinbox - installable via `sudo gem install macinbox` +- vagrant - found at +- VirtualBox - found at +- A macOS installer application - you can get this from the App Store (although I believe only the latest is available) +- An Xcode Command Line Tools installer - you can get this from Apple's developer website, + although you'll need to sign in first: + +First, you'll need to create a base box; +this is where you determine what version of macOS is installed. + +``` +> sudo macinbox \ + --box-format virtualbox \ + --name macos-ci-base \ + --installer \ + --no-gui +``` + +Once you've done that, create a Vagrantfile that looks like the following: + +```rb +Vagrant.configure('2') do |config| + config.vm.box = 'macos-ci-base' + config.vm.boot_timeout = 600 + config.vm.synced_folder ".", "/vagrant", disabled: true +end +``` + +then, run the following in that vagrant directory: + +```sh +$ vagrant up +$ vagrant scp :clt.dmg +$ vagrant ssh -c 'hdiutil attach clt.dmg -mountpoint /Volumes/setup-installer' +$ vagrant ssh -c 'sudo installer -pkg "/Volumes/setup-installer/Command Line Tools.pkg" -target /' +$ vagrant ssh -c 'hdiutil detach /Volumes/setup-installer' +$ vagrant ssh -c 'rm clt.dmg' +$ vagrant ssh -c '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"' +$ vagrant ssh -c 'ssh-keygen -t rsa -b 4096 -c "Fileshare Key: " -N "" -f "~/.ssh/id_rsa"' +$ vagrant ssh -c 'cat ~/.ssh/id_rsa.pub' +$ vagrant ssh -c 'brew cask install osxfuse && brew install sshfs' +$ vagrant reload +``` + +After this, you should add the printed ssh public key to the archives share's `.ssh/authorized_keys` file. +Then, we also now need to make sure that osxfuse is set up correctly; +macOS requires the user to accept that this signed binary is "okay to be loaded" by the kernel. +We can get `sshfs` to try to start the `osxfuse` kernel module by attempting to start it: + +```sh +$ vagrant ssh -c 'mkdir testmnt && sshfs :/Users/fileshare/share testmnt' +``` + +Then, you'll need to open the VM in VirtualBox, go to System Preferences, +go to Security & Privacy, General, unlock the settings, +and allow system extensions from the osxfuse developer to run. + +Then, retry the above, and see if it works: + +```sh +$ vagrant ssh -c 'sshfs :/Users/fileshare/share testmnt' +``` + +if that works, you can now package the box: + +```sh +$ vagrant ssh -c 'umount testmnt && rmdir testmnt' +$ vagrant package +``` + +This will create a `package.box`, which is the box file for the base VM. +Then, you can `vagrant box add --name `, +and you'll have the base vcpkg box added for purposes of `Setup-VagrantMachines.ps1`! + +Once you've created the base box, if you're making it the new base box for the CI, +upload it to the fileshare, under `share/vcpkg-boxes`. +Then, add the metadata about the box (the name and version) to the JSON file there. +Once you've done that, add the software versions under [VM Software Versions](#vm-software-versions). + +### VM Software Versions + +* 2020-09-28: + * macOS: 10.15.6 + * Xcode CLTs: 12 + +### (Internal) Accessing the macOS fileshare + +The fileshare is located on `vcpkgmm-01`, under the `fileshare` user, in the `share` directory. +In order to get `sshfs` working on the physical machine, +you'll need to do the same thing one needs to do for building the base box. +You can run `Install-Prerequisites.ps1` to grab the right software, then either: + +```sh +$ mkdir vagrant/share +$ sshfs fileshare@:/Users/fileshare/share vagrant/share +``` + +or you can just run + +```sh +$ ./Get-InternalBaseBox.ps1 +``` + +which will do the thing automatically. + +If you get an error, that means that gatekeeper has prevented the kernel extension from loading, +so you'll need to access the GUI of the machine, go to System Preferences, +Security & Privacy, General, unlock the settings, +and allow system extensions from the osxfuse developer to run. +Then, you'll be able to add the fileshare as an sshfs. diff --git a/vcpkg/scripts/azure-pipelines/osx/Setup-VagrantMachines.ps1 b/vcpkg/scripts/azure-pipelines/osx/Setup-VagrantMachines.ps1 new file mode 100644 index 0000000..d29ef59 --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/osx/Setup-VagrantMachines.ps1 @@ -0,0 +1,149 @@ +#!pwsh +#Requires -Version 6.0 + +<# +.SYNOPSIS +Sets up the configuration for the vagrant virtual machines. + +.DESCRIPTION +Setup-VagrantMachines.ps1 sets up the virtual machines for +vcpkg's macOS CI. It puts the VagrantFile and necessary +configuration JSON file into ~/vagrant/vcpkg-eg-mac. + +.PARAMETER MachineId +The number to give the machine; should match [0-9]{2}. + +.PARAMETER DevopsPat +The personal access token which has Read & Manage permissions on the ADO pool. + +.PARAMETER Date +The date on which this pool is being created. Sets the default values for BoxVersion and AgentPool. + +.PARAMETER BoxVersion +The version of the box to use. If -Date is passed, uses that as the version. + +.PARAMETER AgentPool +The agent pool to add the machine to. If -Date is passed, uses "PrOsx-$Date" as the pool. + +.PARAMETER DevopsUrl +The URL of the ADO instance; defaults to vcpkg's, which is https://dev.azure.com/vcpkg. + +.PARAMETER ArchivesMachine +The machine where the archives are located; a URN. + +.PARAMETER ArchivesPath +The path to where the archives are located on the machine. If -Date is passed, +uses "/Users/${ArchivesUsername}/share/archives/${Date}". + +.PARAMETER ArchivesUsername +The user to log in to on the archives machine. Defaults to 'fileshare'. + +.PARAMETER BaseName +The base name for the vagrant VM; the machine name is $BaseName-$MachineId. +Defaults to 'vcpkg-eg-mac'. + +.PARAMETER BoxName +The name of the box to use. Defaults to 'vcpkg/macos-ci', +which is only available internally. + +.PARAMETER Force +Delete any existing vagrant/vcpkg-eg-mac directory. + +.PARAMETER DiskSize +The size to make the temporary disks in gigabytes. Defaults to 350. + +.INPUTS +None + +.OUTPUTS +None +#> +[CmdletBinding(PositionalBinding=$False, DefaultParameterSetName='DefineDate')] +Param( + [Parameter(Mandatory=$True)] + [String]$MachineId, + + [Parameter(Mandatory=$True)] + [String]$DevopsPat, + + [Parameter(Mandatory=$True, ParameterSetName='DefineDate')] + [String]$Date, + + [Parameter(Mandatory=$True, ParameterSetName='DefineVersionAndAgentPool')] + [String]$BoxVersion, + + [Parameter(Mandatory=$True, ParameterSetName='DefineVersionAndAgentPool')] + [String]$AgentPool, + + [Parameter(Mandatory=$False)] + [String]$DevopsUrl = 'https://dev.azure.com/vcpkg', + + [Parameter(Mandatory=$True)] + [String]$ArchivesMachine, + + [Parameter(Mandatory=$True, ParameterSetName='DefineVersionAndAgentPool')] + [String]$ArchivesPath, + + [Parameter(Mandatory=$False)] + [String]$ArchivesUsername = 'archivesshare', + + [Parameter()] + [String]$BaseName = 'vcpkg-eg-mac', + + [Parameter()] + [String]$BoxName = 'vcpkg/macos-ci', + + [Parameter()] + [Int]$DiskSize = 350, + + [Parameter()] + [Switch]$Force +) + +Set-StrictMode -Version 2 + +if (-not $IsMacOS) { + throw 'This script should only be run on a macOS host' +} + +if (-not [String]::IsNullOrEmpty($Date)) { + $BoxVersion = $Date + $AgentPool = "PrOsx-$Date" + $ArchivesPath = "/Users/${ArchivesUsername}/share/archives/${Date}" +} + +if (Test-Path '~/vagrant/vcpkg-eg-mac') { + if ($Force) { + Write-Host 'Deleting existing directories' + Remove-Item -Recurse -Force -Path '~/vagrant/vcpkg-eg-mac' | Out-Null + } else { + throw '~/vagrant/vcpkg-eg-mac already exists; try re-running with -Force' + } +} + +Write-Host 'Creating new directories' +if (-not (Test-Path -Path '~/vagrant')) { + New-Item -ItemType 'Directory' -Path '~/vagrant' | Out-Null +} +New-Item -ItemType 'Directory' -Path '~/vagrant/vcpkg-eg-mac' | Out-Null + +Copy-Item ` + -Path "$PSScriptRoot/configuration/Vagrantfile" ` + -Destination '~/vagrant/vcpkg-eg-mac/Vagrantfile' + +$configuration = @{ + pat = $DevopsPat; + agent_pool = $AgentPool; + devops_url = $DevopsUrl; + machine_name = "${BaseName}-${MachineId}"; + box_name = $BoxName; + box_version = $BoxVersion; + disk_size = $DiskSize; + archives = @{ + username = $ArchivesUsername; + urn = $ArchivesMachine; + path = $ArchivesPath; + }; +} +ConvertTo-Json -InputObject $configuration -Depth 5 ` + | Set-Content -Path '~/vagrant/vcpkg-eg-mac/vagrant-configuration.json' diff --git a/vcpkg/scripts/azure-pipelines/osx/Utilities.psm1 b/vcpkg/scripts/azure-pipelines/osx/Utilities.psm1 new file mode 100644 index 0000000..b7ad489 --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/osx/Utilities.psm1 @@ -0,0 +1,151 @@ +#Requires -Version 6.0 +Set-StrictMode -Version 2 + +<# +.SYNOPSIS +Returns whether the specified command exists in the current environment. + +.DESCRIPTION +Get-CommandExists takes a string as a parameter, +and returns whether it exists in the current environment; +either a function, alias, or an executable in the path. +It's somewhat equivalent to `which`. + +.PARAMETER Name +Specifies the name of the command which may or may not exist. + +.INPUTS +System.String + The name of the command. + +.OUTPUTS +System.Boolean + Whether the command exists. +#> +function Get-CommandExists +{ + [CmdletBinding()] + [OutputType([Boolean])] + Param( + [Parameter(ValueFromPipeline)] + [String]$Name + ) + + $null -ne (Get-Command -Name $Name -ErrorAction SilentlyContinue) +} + +<# +.SYNOPSIS +Downloads a file and checks its hash. + +.DESCRIPTION +Get-RemoteFile takes a URI and a hash, +downloads the file at that URI to OutFile, +and checks that the hash of the downloaded file. +It then returns a FileInfo object corresponding to the downloaded file. + +.PARAMETER OutFile +Specifies the file path to download to. + +.PARAMETER Uri +The URI to download from. + +.PARAMETER Sha256 +The expected SHA256 of the downloaded file. + +.INPUTS +None + +.OUTPUTS +System.IO.FileInfo + The FileInfo for the downloaded file. +#> +function Get-RemoteFile +{ + [CmdletBinding(PositionalBinding=$False)] + [OutputType([System.IO.FileInfo])] + Param( + [Parameter(Mandatory=$True)] + [String]$OutFile, + [Parameter(Mandatory=$True)] + [String]$Uri, + [Parameter(Mandatory=$True)] + [String]$Sha256 + ) + + Invoke-WebRequest -OutFile $OutFile -Uri $Uri + $actualHash = Get-FileHash -Algorithm SHA256 -Path $OutFile + + if ($actualHash.Hash -ne $Sha256) { + throw @" +Invalid hash for file $OutFile; + expected: $Hash + found: $($actualHash.Hash) +Please make sure that the hash in the powershell file is correct. +"@ + } + + Get-Item $OutFile +} + +<# +.SYNOPSIS +Gets the list of installed extensions as powershell objects. + +.DESCRIPTION +Get-InstalledVirtualBoxExtensionPacks gets the installed extensions, +returning objects that look like: + +{ + Pack = 'Oracle VM VirtualBox Extension Pack'; + Version = '6.1.10'; + ... +} + +.INPUTS +None + +.OUTPUTS +PSCustomObject + The list of VBox Extension objects that are installed. +#> +function Get-InstalledVirtualBoxExtensionPacks +{ + [CmdletBinding()] + [OutputType([PSCustomObject])] + Param() + + $lines = VBoxManage list extpacks + + $result = @() + + $currentObject = $null + $currentKey = "" + $currentString = "" + + $lines | ForEach-Object { + $Line = $_ + if ($Line[0] -eq ' ') { + $currentString += "`n$($Line.Trim())" + } else { + if ($null -ne $currentObject) { + $currentObject.$currentKey = $currentString + } + $currentKey, $currentString = $Line -Split ':' + $currentString = $currentString.Trim() + + if ($currentKey.StartsWith('Pack no')) { + $currentKey = 'Pack' + if ($null -ne $currentObject) { + Write-Output ([PSCustomObject]$currentObject) + } + $currentObject = @{} + } + } + } + + if ($null -ne $currentObject) { + $currentObject.$currentKey = $currentString + Write-Output ([PSCustomObject]$currentObject) + } +} diff --git a/vcpkg/scripts/azure-pipelines/osx/azure-pipelines.yml b/vcpkg/scripts/azure-pipelines/osx/azure-pipelines.yml new file mode 100644 index 0000000..d3229f8 --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/osx/azure-pipelines.yml @@ -0,0 +1,63 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# + +jobs: +- job: x64_osx + pool: + name: ${{ parameters.poolName }} + workspace: + clean: resources + timeoutInMinutes: 1440 # 1 day + variables: + - name: WORKING_ROOT + value: /Users/vagrant/Data + - name: VCPKG_DOWNLOADS + value: /Users/vagrant/Data/downloads + + steps: + - bash: df -h + displayName: 'Report on Disk Space' + - bash: | + sudo mkdir ${{ variables.VCPKG_DOWNLOADS }} || 0 + sudo chmod 777 ${{ variables.VCPKG_DOWNLOADS }} || 0 + exit 0 + displayName: 'Create ${{ variables.VCPKG_DOWNLOADS }}' + - task: Bash@3 + displayName: 'Build vcpkg' + inputs: + filePath: bootstrap-vcpkg.sh + arguments: '-buildTests' + - bash: toolsrc/build.rel/vcpkg-test + displayName: 'Run vcpkg tests' + - task: PowerShell@2 + displayName: 'Run vcpkg end-to-end tests' + inputs: + filePath: 'scripts/azure-pipelines/end-to-end-tests.ps1' + arguments: '-Triplet x64-osx -WorkingRoot ${{ variables.WORKING_ROOT }}' + - task: PowerShell@2 + displayName: '*** Test Modified Ports and Prepare Test Logs ***' + inputs: + failOnStderr: true + filePath: 'scripts/azure-pipelines/test-modified-ports.ps1' + arguments: '-Triplet x64-osx -BuildReason $(Build.Reason) -ArchivesRoot ${{ variables.WORKING_ROOT }}/archives -WorkingRoot ${{ variables.WORKING_ROOT }} -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory)' + - bash: | + df -h + displayName: 'Report on Disk Space After Build' + condition: always() + - task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact: failure logs for x64-osx' + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)/failure-logs' + ArtifactName: 'failure logs for x64-osx' + condition: failed() + - bash: | + python3 scripts/file_script.py /Users/vagrant/Data/installed/vcpkg/info/ + displayName: 'Build a file list for all packages' + condition: always() + - task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact: file lists for x64-osx' + condition: always() + inputs: + PathtoPublish: scripts/list_files + ArtifactName: 'file lists for x64-osx' diff --git a/vcpkg/scripts/azure-pipelines/osx/configuration/Vagrantfile b/vcpkg/scripts/azure-pipelines/osx/configuration/Vagrantfile new file mode 100644 index 0000000..c087037 --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/osx/configuration/Vagrantfile @@ -0,0 +1,131 @@ +require 'json' + +require "erb" +include ERB::Util + +configuration = JSON.parse(File.read("#{__dir__}/vagrant-configuration.json")) + +server = { + :hostname => configuration['machine_name'], + :box => configuration['box_name'], + :box_version => configuration['box_version'], + :disk_size => configuration['disk_size'], + :ram => 12000, + :cpu => 5 +} + +brew_formulas = [ + 'autoconf', + 'automake', + 'bison', + 'libtool', + 'mono', + 'pkg-config', + 'yasm' ] + +brew_cask_formulas = [ + 'powershell', + 'gfortran' ] + +azure_agent_url = 'https://vstsagentpackage.azureedge.net/agent/2.171.1/vsts-agent-osx-x64-2.171.1.tar.gz' +devops_url = configuration['devops_url'] +agent_pool = configuration['agent_pool'] +pat = configuration['pat'] +archives = configuration['archives'] +archives_username = archives['username'] +archives_urn = archives['urn'] +archives_path = archives['path'] + +Vagrant.configure('2') do |config| + # give them extra time to boot up + config.vm.boot_timeout = 600 + + config.vm.box = server[:box] + config.vm.box_version = server[:box_version] + config.vm.hostname = server[:hostname] + config.vm.synced_folder '.', '/vagrant', disabled: true + + diskname = "#{server[:hostname]}-data.vmdk" + + # I don't like this, but as far as I can tell, it's the only way + # to do this. When vagrant finishes the `disk` feature, switch + # over to that -- Nicole Mazzuca + if (not File.exists? diskname) then + system "VBoxManage createmedium --filename #{diskname} --size #{1024 * server[:disk_size]}" + end + + config.vm.provider 'virtualbox' do |vb| + vb.memory = server[:ram] + vb.cpus = server[:cpu] + vb.customize ['modifyvm', :id, '--ioapic', 'on'] + vb.customize ['storageattach', :id, + '--storagectl', 'SATA Controller', + '--port', '1', '--device', '0', '--type', 'hdd', + '--medium', "#{diskname}" + ] + end + + config.vm.provision 'shell', + run: 'once', + name: 'Format and mount the data filesystem', + inline: 'diskutil partitionDisk /dev/disk0 1 GPT jhfs+ data 0', + privileged: true + + config.vm.provision 'shell', + run: 'once', + name: 'Link the data filesystem to the home directory', + inline: "ln -s /Volumes/data ~/Data", + privileged: false + + config.vm.provision 'shell', + run: 'once', + name: 'Download azure agent', + inline: "curl -s -o ~/Downloads/azure-agent.tar.gz #{azure_agent_url}", + privileged: false + + config.vm.provision 'shell', + run: 'once', + name: 'Unpack azure agent', + inline: 'mkdir myagent; cd myagent; tar xf ~/Downloads/azure-agent.tar.gz', + privileged: false + + config.vm.provision 'shell', + run: 'once', + name: 'Install brew applications', + inline: "brew install #{brew_formulas.join(' ')} && brew cask install #{brew_cask_formulas.join(' ')}", + privileged: false + + config.vm.provision 'shell', + run: 'once', + name: 'Create archives mountpoint', + inline: 'mkdir ~/Data/archives', + privileged: false + + config.vm.provision "shell", + run: 'once', + name: 'Mount archives directory', + inline: "sshfs #{archives_username}@#{archives_urn}:#{archives_path} ~/Data/archives", + privileged: false + + config.vm.provision 'shell', + run: 'once', + name: 'Add VM to azure agent pool', + inline: "cd ~/myagent;\ + ./config.sh --unattended \ + --url #{devops_url} \ + --work ~/Data/work \ + --auth pat --token #{pat} \ + --pool #{agent_pool} \ + --agent `hostname` \ + --replace \ + --acceptTeeEula", + privileged: false + + # Start listening for jobs + config.vm.provision 'shell', + run: 'always', + name: 'Start running azure pipelines', + inline: 'cd /Users/vagrant/myagent;\ + nohup ./run.sh&', + privileged: false +end diff --git a/vcpkg/scripts/azure-pipelines/osx/configuration/installables.json b/vcpkg/scripts/azure-pipelines/osx/configuration/installables.json new file mode 100644 index 0000000..28e24e6 --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/osx/configuration/installables.json @@ -0,0 +1,37 @@ +{ + "$schema": "./installables.schema.json", + + "Applications": [ + { + "Name": "VirtualBox", + "TestCommand": "VBoxManage", + "DmgUrl": "https://download.virtualbox.org/virtualbox/6.1.10/VirtualBox-6.1.10-138449-OSX.dmg", + "Sha256": "EF0CA4924922514B6AD71469998821F2CF7C596B4B8B59736C3699759E0F1DF8", + "InstallerPath": "VirtualBox.pkg" + }, + { + "Name": "vagrant", + "TestCommand": "vagrant", + "DmgUrl": "https://releases.hashicorp.com/vagrant/2.2.9/vagrant_2.2.9_x86_64.dmg", + "Sha256": "529CDE2A78E6DF38EC906B65C70B36A087E2601EAB42E25856E35B20CCB027C0", + "InstallerPath": "vagrant.pkg" + } + ], + "Brew": [ + { + "Name": "osxfuse", + "Kind": "cask" + }, + { + "Name": "sshfs" + } + ], + "VBoxExtensions": [ + { + "Name": "Extension Pack", + "FullName": "Oracle VM VirtualBox Extension Pack", + "Url": "https://download.virtualbox.org/virtualbox/6.1.10/Oracle_VM_VirtualBox_Extension_Pack-6.1.10.vbox-extpack", + "Sha256": "03067F27F4DA07C5D0FDAFC56D27E3EA23A60682B333B2A1010FB74EF9A40C28" + } + ] +} diff --git a/vcpkg/scripts/azure-pipelines/osx/configuration/installables.schema.json b/vcpkg/scripts/azure-pipelines/osx/configuration/installables.schema.json new file mode 100644 index 0000000..13476e7 --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/osx/configuration/installables.schema.json @@ -0,0 +1,78 @@ +{ + "$schema": "https://json-schema.org/draft-07/schema", + "type": "object", + "definitions": { + "sha256": { + "type": "string", + "pattern": "[A-Z0-9]{64}" + } + }, + "required": [ + "Applications", + "Brew", + "VBoxExtensions" + ], + "properties": { + "Applications": { + "type": "array", + "items": { + "type": "object", + "properties": { + "Name": { + "type": "string" + }, + "TestCommand": { + "type": "string" + }, + "DmgUrl": { + "type": "string", + "format": "uri" + }, + "Sha256": { + "$ref": "#/definitions/sha256" + }, + "InstallerPath": { + "type": "string" + } + } + } + }, + "Brew": { + "type": "array", + "items": { + "type": "object", + "required": [ "Name" ], + "properties": { + "Name": { + "type": "string" + }, + "Kind": { + "type": "string", + "enum": [ "cask" ] + } + } + } + }, + "VBoxExtensions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "Name": { + "type": "string" + }, + "FullName": { + "type": "string" + }, + "Url": { + "type": "string", + "format": "uri" + }, + "Sha256": { + "$ref": "#/definitions/sha256" + } + } + } + } + } +} diff --git a/vcpkg/scripts/azure-pipelines/osx/configuration/vagrant-configuration.schema.json b/vcpkg/scripts/azure-pipelines/osx/configuration/vagrant-configuration.schema.json new file mode 100644 index 0000000..0b1ed2f --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/osx/configuration/vagrant-configuration.schema.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://json-schema.org/draft/2019-09/schema", + + "type": "object", + + "required": [ + "pat", + "base_name", + "disk_size", + "machine_identifiers", + "archives" + ], + + "properties": { + "pat": { + "type": "string" + }, + "agent_pool": { + "type": "string" + }, + "devops_url": { + "type": "string" + }, + "machine_name": { + "type": "string" + }, + "box_name": { + "type": "string" + }, + "box_version": { + "type": "string" + }, + "disk_size": { + "type": "integer" + }, + "archives": { + "type": "object", + "required": [ + "username", + "urn", + "path" + ], + "properties": { + "username": { "type": "string" }, + "urn": { "type": "string" }, + "path": { "type": "string" } + } + } + } +} diff --git a/vcpkg/scripts/azure-pipelines/signing.yml b/vcpkg/scripts/azure-pipelines/signing.yml new file mode 100644 index 0000000..2d8e006 --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/signing.yml @@ -0,0 +1,109 @@ +# This script is used internally to produce signed vcpkg builds. +# It uses machines / tasks that are not exposed here on GitHub, as +# the hardware on which we allow signing is restricted. + +trigger: none + +variables: + TeamName: vcpkg +jobs: + - job: windows + displayName: "Windows" + dependsOn: + pool: + name: 'VSEng-MicroBuildVS2019' + demands: + - CMAKE + steps: + - task: PoliCheck@1 + inputs: + inputType: 'Basic' + targetType: 'F' + targetArgument: '$(Build.SourcesDirectory)' + result: 'PoliCheck.xml' + - task: CmdLine@2 + displayName: "Build vcpkg with CMake" + inputs: + failOnStderr: true + script: | + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x86 -host_arch=x86 + cmake.exe -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -B "$(Build.StagingDirectory)" -S toolsrc + ninja.exe -C "$(Build.StagingDirectory)" + - task: MicroBuildSigningPlugin@2 + inputs: + signType: 'real' + feedSource: 'https://devdiv.pkgs.visualstudio.com/DefaultCollection/_packaging/MicroBuildToolset/nuget/v3/index.json' + - task: NuGetToolInstaller@1 + inputs: + versionSpec: 5.7 + - task: NuGetCommand@2 + displayName: 'NuGet Restore MicroBuild Signing Extension' + inputs: + command: 'restore' + restoreSolution: 'scripts/azure-pipelines/windows/signing.signproj' + feedsToUse: 'config' + restoreDirectory: '$(Build.SourcesDirectory)\scripts\azure-pipelines\packages' + - task: MSBuild@1 + displayName: 'Sign vcpkg.exe' + inputs: + solution: 'scripts\azure-pipelines\windows\signing.signproj' + msbuildArguments: '/p:OutDir=$(Build.ArtifactStagingDirectory)\ /p:IntermediateOutputPath=$(Build.StagingDirectory)\' + - task: BinSkim@3 + inputs: + InputType: 'CommandLine' + arguments: 'analyze "$(Build.StagingDirectory)\vcpkg.exe"' + - task: PublishBuildArtifacts@1 + displayName: 'Publish vcpkg.exe' + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\vcpkg.exe' + ArtifactName: 'Windows' + publishLocation: 'Container' + - task: PublishBuildArtifacts@1 + displayName: 'Publish vcpkg.pdb' + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\vcpkg.pdb' + ArtifactName: 'Windows' + publishLocation: 'Container' + - task: MicroBuildCleanup@1 + condition: succeededOrFailed() + displayName: MicroBuild Cleanup + - job: macos_build + displayName: 'MacOS Build' + pool: + vmImage: macOS-10.15 + steps: + - task: CmdLine@2 + displayName: "Build vcpkg with CMake" + inputs: + failOnStderr: true + script: | + cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -B "$(Build.StagingDirectory)" -S toolsrc + make -j 8 -C "$(Build.StagingDirectory)" + zip "$(Build.StagingDirectory)/vcpkg.zip" "$(Build.StagingDirectory)/vcpkg" + - task: PublishBuildArtifacts@1 + displayName: "Publish Unsigned MacOS Binary" + inputs: + PathtoPublish: '$(Build.StagingDirectory)/vcpkg.zip' + ArtifactName: 'staging' + publishLocation: 'Container' + - job: macos_sign + displayName: 'MacOS Sign' + dependsOn: macos_build + pool: + name: VSEng-MicroBuildVS2019 + steps: + - checkout: none + - task: DownloadBuildArtifacts@0 + displayName: 'Download Unsigned Binary' + inputs: + artifactName: staging + - task: ms-vseng.MicroBuildTasks.7973a23b-33e3-4b00-a7d9-c06d90f8297f.MicroBuildSignMacFiles@1 + displayName: 'Sign Mac Files' + inputs: + SigningTarget: '$(Build.ArtifactStagingDirectory)\staging\vcpkg.zip' + SigningCert: 8003 + - task: PublishBuildArtifacts@1 + displayName: 'Publish Signed Binary' + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\staging\vcpkg.zip' + ArtifactName: 'MacOS' diff --git a/vcpkg/scripts/azure-pipelines/test-modified-ports.ps1 b/vcpkg/scripts/azure-pipelines/test-modified-ports.ps1 new file mode 100644 index 0000000..15cb813 --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/test-modified-ports.ps1 @@ -0,0 +1,117 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# + +<# +.SYNOPSIS +Runs the 'Test Modified Ports' part of the vcpkg CI system for all platforms. + +.PARAMETER Triplet +The triplet to test. + +.PARAMETER WorkingRoot +The location used as scratch space for 'installed', 'packages', and 'buildtrees' vcpkg directories. + +.PARAMETER ArtifactStagingDirectory +The Azure Pipelines artifacts directory. If not supplied, defaults to the current directory. + +.PARAMETER ArchivesRoot +The location where the binary caching archives are stored. Shared across runs of this script. If +this parameter is not set, binary caching will not be used. + +.PARAMETER BuildReason +The reason Azure Pipelines is running this script (controls in which mode Binary Caching is used). +If ArchivesRoot is not set, this parameter has no effect. If ArchivesRoot is set and this is not, +binary caching will default to read-write mode. +#> + +[CmdletBinding()] +Param( + [Parameter(Mandatory = $true)] + [ValidateNotNullOrEmpty()] + [string]$Triplet, + [Parameter(Mandatory = $true)] + [ValidateNotNullOrEmpty()] + $WorkingRoot, + [ValidateNotNullOrEmpty()] + $ArtifactStagingDirectory = '.', + $ArchivesRoot = $null, + $BuildReason = $null +) + +if (-Not (Test-Path "triplets/$Triplet.cmake")) { + Write-Error "Incorrect triplet '$Triplet', please supply a valid triplet." + throw +} + +$env:VCPKG_DOWNLOADS = Join-Path $WorkingRoot 'downloads' +$buildtreesRoot = Join-Path $WorkingRoot 'buildtrees' +$installRoot = Join-Path $WorkingRoot 'installed' +$packagesRoot = Join-Path $WorkingRoot 'packages' + +$usingBinaryCaching = -Not ([string]::IsNullOrWhiteSpace($ArchivesRoot)) +$commonArgs = @() +if ($usingBinaryCaching) { + $commonArgs += @('--binarycaching') +} else { + $commonArgs += @('--no-binarycaching') +} + +$commonArgs += @( + "--x-buildtrees-root=$buildtreesRoot", + "--x-install-root=$installRoot", + "--x-packages-root=$packagesRoot", + "--overlay-ports=scripts/test_ports" +) + +$skipFailures = $false +if ($usingBinaryCaching) { + $binaryCachingMode = 'readwrite' + if ([string]::IsNullOrWhiteSpace($BuildReason)) { + Write-Host 'Build reason not specified, defaulting to using binary caching in read write mode.' + } + elseif ($BuildReason -eq 'PullRequest') { + Write-Host 'Build reason was Pull Request, using binary caching in read write mode, skipping failures.' + $skipFailures = $true + } + else { + Write-Host "Build reason was $BuildReason, using binary caching in write only mode." + $binaryCachingMode = 'write' + } + + $commonArgs += @("--x-binarysource=clear;files,$ArchivesRoot,$binaryCachingMode") +} + +if ($Triplet -eq 'x64-linux') { + $env:HOME = '/home/agent' + $executableExtension = [string]::Empty +} +elseif ($Triplet -eq 'x64-osx') { + $executableExtension = [string]::Empty +} +else { + $executableExtension = '.exe' +} + +$xmlResults = Join-Path $ArtifactStagingDirectory 'xml-results' +mkdir $xmlResults +$xmlFile = Join-Path $xmlResults "$Triplet.xml" + +$failureLogs = Join-Path $ArtifactStagingDirectory 'failure-logs' + +& "./vcpkg$executableExtension" x-ci-clean @commonArgs +$skipList = . "$PSScriptRoot/generate-skip-list.ps1" ` + -Triplet $Triplet ` + -BaselineFile "$PSScriptRoot/../ci.baseline.txt" ` + -SkipFailures:$skipFailures + +# WORKAROUND: the x86-windows flavors of these are needed for all cross-compilation, but they are not auto-installed. +# Install them so the CI succeeds: +if ($Triplet -in @('x64-uwp', 'arm64-windows', 'arm-uwp')) { + .\vcpkg.exe install protobuf:x86-windows boost-build:x86-windows sqlite3:x86-windows @commonArgs +} + +& "./vcpkg$executableExtension" ci $Triplet --x-xunit=$xmlFile --exclude=$skipList --failure-logs=$failureLogs @commonArgs +& "$PSScriptRoot/analyze-test-results.ps1" -logDir $xmlResults ` + -triplet $Triplet ` + -baselineFile .\scripts\ci.baseline.txt diff --git a/vcpkg/scripts/azure-pipelines/windows-unstable/README.md b/vcpkg/scripts/azure-pipelines/windows-unstable/README.md new file mode 100644 index 0000000..d603672 --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/windows-unstable/README.md @@ -0,0 +1,4 @@ +The "unstable" build is used internally by Microsoft to test prerelease versions +of our C++ compiler; not seeing results from these build definitions in the +GitHub portal is normal as these builds depend on acquisition of private +compiler bits that aren't yet shipping. diff --git a/vcpkg/scripts/azure-pipelines/windows-unstable/azure-pipelines.yml b/vcpkg/scripts/azure-pipelines/windows-unstable/azure-pipelines.yml new file mode 100644 index 0000000..189ab31 --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/windows-unstable/azure-pipelines.yml @@ -0,0 +1,11 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# +variables: + unstable-pool: 'VcpkgUnstable-2020-09-01' + +jobs: +- template: job.yml + parameters: + triplet: x64-windows + jobName: x64_windows diff --git a/vcpkg/scripts/azure-pipelines/windows-unstable/job.yml b/vcpkg/scripts/azure-pipelines/windows-unstable/job.yml new file mode 100644 index 0000000..c2eced1 --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/windows-unstable/job.yml @@ -0,0 +1,90 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# + +jobs: +- job: ${{ parameters.jobName }} + pool: + name: $(unstable-pool) + workspace: + clean: resources + timeoutInMinutes: 1440 # 1 day + variables: + - name: WORKING_ROOT + value: D:\ + - name: VCPKG_DOWNLOADS + value: D:\downloads + + steps: + - task: DownloadBuildArtifacts@0 + displayName: 'Download DropBuildNumber if not specified' + inputs: + buildType: specific + project: '0bdbc590-a062-4c3f-b0f6-9383f67865ee' + pipeline: 8136 + buildVersionToDownload: latestFromBranch + branchName: 'refs/heads/$(MSVCBranchName)' + artifactName: BuildNumber + downloadPath: 'D:\msvc-drops' + condition: eq(variables['DropBuildNumber'], '') + - task: PowerShell@2 + displayName: 'Set DropBuildNumber if not specified' + inputs: + targetType: inline + script: | + $DropBuildNumber = Get-Content -Path D:\msvc-drops\BuildNumber\Build.BuildNumber.txt + Write-Host "##vso[task.setvariable variable=DropBuildNumber]$DropBuildNumber" + Write-Host "Build Number set to: $DropBuildNumber" + pwsh: true + condition: eq(variables['DropBuildNumber'], '') + - task: ms-vscs-artifact.build-tasks.artifactDropDownloadTask-1.artifactDropDownloadTask@0 + displayName: 'Download msvc x86 ret' + inputs: + dropServiceURI: 'https://devdiv.artifacts.visualstudio.com/DefaultCollection' + buildNumber: 'msvc/builds/$(DropBuildNumber)/x86ret' + destinationPath: 'D:\msvc-drops\$(DropBuildNumber)\binaries.x86ret' + - task: ms-vscs-artifact.build-tasks.artifactDropDownloadTask-1.artifactDropDownloadTask@0 + displayName: 'Download msvc amd64 ret' + inputs: + dropServiceURI: 'https://devdiv.artifacts.visualstudio.com/DefaultCollection' + buildNumber: 'msvc/builds/$(DropBuildNumber)/amd64ret' + destinationPath: 'D:\msvc-drops\$(DropBuildNumber)\binaries.amd64ret' + - task: PowerShell@2 + displayName: 'Rearrange MSVC Drop Layout' + inputs: + targetType: filePath + filePath: 'scripts/azure-pipelines/windows-unstable/rearrange-msvc-drop-layout.ps1' + arguments: '-DropRoot "D:\msvc-drops\$(DropBuildNumber)" -BuildType ret' + pwsh: true + - task: PowerShell@2 + displayName: 'Initialize Environment' + inputs: + filePath: 'scripts/azure-pipelines/windows/initialize-environment.ps1' + pwsh: true + - task: PowerShell@2 + displayName: 'Report on Disk Space' + condition: always() + inputs: + filePath: 'scripts/azure-pipelines/windows/disk-space.ps1' + pwsh: true + - script: .\bootstrap-vcpkg.bat + displayName: 'Build vcpkg' + - task: PowerShell@2 + displayName: '*** Test Modified Ports and Prepare Test Logs ***' + inputs: + failOnStderr: true + filePath: 'scripts/azure-pipelines/test-modified-ports.ps1' + arguments: '-Triplet ${{ parameters.triplet }} -BuildReason $(Build.Reason) -WorkingRoot ${{ variables.WORKING_ROOT }} -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory)' + pwsh: true + - task: PowerShell@2 + displayName: 'Report on Disk Space After Build' + condition: always() + inputs: + filePath: 'scripts/azure-pipelines/windows/disk-space.ps1' + pwsh: true + - task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact: failure logs for ${{ parameters.triplet }}' + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\failure-logs' + ArtifactName: 'failure logs for ${{ parameters.triplet }}' + condition: failed() diff --git a/vcpkg/scripts/azure-pipelines/windows-unstable/rearrange-msvc-drop-layout.ps1 b/vcpkg/scripts/azure-pipelines/windows-unstable/rearrange-msvc-drop-layout.ps1 new file mode 100644 index 0000000..d409bc2 --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/windows-unstable/rearrange-msvc-drop-layout.ps1 @@ -0,0 +1,75 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# +<# +.SYNOPSIS +Moves files from an MSVC compiler drop to the locations where they are installed in a Visual Studio installation. + +.PARAMETER DropRoot +The location where the MSVC compiler drop has been downloaded. + +.PARAMETER BuildType +The MSVC drop build type set with /p:_BuildType when MSVC was built. Defaults to 'ret'. + +#> +[CmdletBinding()] +param( + [Parameter(Mandatory = $true)][string]$DropRoot, + [Parameter(Mandatory = $false)][ValidateSet('ret', 'chk')][string]$BuildType = 'ret' +) + +Set-StrictMode -Version Latest + +$MSVCRoot = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC" + +$ErrorActionPreference = "Stop" + +$tempRoot = "$DropRoot\readytodeploy" + +New-Item -ItemType Directory -Path $tempRoot | Out-Null + +Write-Host "Rearranging x86$BuildType" +New-Item -ItemType Directory -Path "$tempRoot\bin\HostX86" | Out-Null +Move-Item "$DropRoot\binaries.x86$BuildType\bin\i386" "$tempRoot\bin\HostX86\x86" +Move-Item "$DropRoot\binaries.x86$BuildType\bin\x86_amd64" "$tempRoot\bin\HostX86\x64" +Move-Item "$DropRoot\binaries.x86$BuildType\bin\x86_arm" "$tempRoot\bin\HostX86\arm" + +Write-Host "Rearranging amd64$BuildType" +New-Item -ItemType Directory -Path "$tempRoot\bin\HostX64" | Out-Null +Move-Item "$DropRoot\binaries.amd64$BuildType\bin\amd64" "$tempRoot\bin\HostX64\x64" +Move-Item "$DropRoot\binaries.amd64$BuildType\bin\amd64_x86" "$tempRoot\bin\HostX64\x86" +Move-Item "$DropRoot\binaries.amd64$BuildType\bin\amd64_arm" "$tempRoot\bin\HostX64\arm" + +# Only copy files and directories that already exist in the VS installation. +Write-Host "Rearranging inc, lib" +New-Item -ItemType Directory -Path "$tempRoot\lib" | Out-Null +Move-Item "$DropRoot\binaries.x86$BuildType\inc" "$tempRoot\include" +Move-Item "$DropRoot\binaries.x86$BuildType\lib\i386" "$tempRoot\lib\x86" +Move-Item "$DropRoot\binaries.amd64$BuildType\lib\amd64" "$tempRoot\lib\x64" + +Write-Host "Rearranging atlmfc" +New-Item -ItemType Directory -Path "$tempRoot\atlmfc" | Out-Null +New-Item -ItemType Directory -Path "$tempRoot\atlmfc\lib" | Out-Null +Move-Item "$DropRoot\binaries.x86$BuildType\atlmfc\include" "$tempRoot\atlmfc\include" +Move-Item "$DropRoot\binaries.x86$BuildType\atlmfc\lib\i386" "$tempRoot\atlmfc\lib\x86" +Move-Item "$DropRoot\binaries.amd64$BuildType\atlmfc\lib\amd64" "$tempRoot\atlmfc\lib\x64" + +$toolsets = Get-ChildItem -Path $MSVCRoot -Directory | Sort-Object -Descending +if ($toolsets.Length -eq 0) { + throw "Could not find Visual Studio toolset!" +} + +Write-Host "Found toolsets:`n$($toolsets -join `"`n`")`n" +$selectedToolset = $toolsets[0] +Write-Host "Using toolset: $selectedToolset" +for ($idx = 1; $idx -lt $toolsets.Length; $idx++) { + $badToolset = $toolsets[$idx] + Write-Host "Deleting toolset: $badToolset" + Remove-Item $badToolset -Recurse -Force +} + +Write-Host "Deploying $tempRoot => $selectedToolset" +Copy-Item "$tempRoot\*" $selectedToolset -Recurse -Force +Write-Host "Deleting $DropRoot..." +Remove-Item $DropRoot -Recurse -Force +Write-Host "Done!" diff --git a/vcpkg/scripts/azure-pipelines/windows/Check-CxxFormatting.ps1 b/vcpkg/scripts/azure-pipelines/windows/Check-CxxFormatting.ps1 new file mode 100644 index 0000000..eaa9e69 --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/windows/Check-CxxFormatting.ps1 @@ -0,0 +1,55 @@ +[CmdletBinding()] +Param( + [Parameter(Mandatory=$True)] + [string]$Root, + [Parameter()] + [switch]$IgnoreErrors # allows one to just format +) + +$clangFormat = 'C:\Program Files\LLVM\bin\clang-format.exe' +if (-not (Test-Path $clangFormat)) +{ + $clangFormat = 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\Llvm\x64\bin\clang-format.exe' + if (-not (Test-Path $clangFormat)) + { + Write-Error 'clang-format not found; is it installed in the CI machines?' + throw + } +} + +$toolsrc = Get-Item "$Root/toolsrc" +Push-Location $toolsrc + +try +{ + $files = Get-ChildItem -Recurse -LiteralPath "$toolsrc/src" -Filter '*.cpp' + $files += Get-ChildItem -Recurse -LiteralPath "$toolsrc/include/vcpkg" -Filter '*.h' + $files += Get-ChildItem -Recurse -LiteralPath "$toolsrc/include/vcpkg-test" -Filter '*.h' + $files += Get-Item "$toolsrc/include/pch.h" + $fileNames = $files.FullName + + & $clangFormat -style=file -i @fileNames + + $changedFiles = & "$PSScriptRoot/Get-ChangedFiles.ps1" -Directory $toolsrc + if (-not $IgnoreErrors -and $null -ne $changedFiles) + { + $msg = @( + "", + "The formatting of the C++ files didn't match our expectation.", + "See github.com/microsoft/vcpkg/blob/master/docs/maintainers/maintainer-guide.md#vcpkg-internal-code for solution." + ) + $msg += "File list:" + $msg += " $changedFiles" + $msg += "" + + $msg += "clang-format should produce the following diff:" + $msg += git diff $toolsrc + + Write-Error ($msg -join "`n") + throw + } +} +finally +{ + Pop-Location +} diff --git a/vcpkg/scripts/azure-pipelines/windows/Check-ManifestFormatting.ps1 b/vcpkg/scripts/azure-pipelines/windows/Check-ManifestFormatting.ps1 new file mode 100644 index 0000000..75924c2 --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/windows/Check-ManifestFormatting.ps1 @@ -0,0 +1,49 @@ +[CmdletBinding()] +Param( + [Parameter(Mandatory=$True)] + [string]$Root, + [Parameter()] + [switch]$IgnoreErrors # allows one to just format +) + +$portsTree = Get-Item "$Root/ports" + +if (-not (Test-Path "$Root/.vcpkg-root")) +{ + Write-Error "The vcpkg root was not at $Root" + throw +} + +if (-not (Test-Path "$Root/vcpkg.exe")) +{ + & "$Root/bootstrap-vcpkg.bat" + if (-not $?) + { + Write-Error "Bootstrapping vcpkg failed" + throw + } +} + +& "$Root/vcpkg.exe" 'format-manifest' '--all' +if (-not $?) +{ + Write-Error "Failed formatting manifests; are they well-formed?" + throw +} + +$changedFiles = & "$PSScriptRoot/Get-ChangedFiles.ps1" -Directory $portsTree +if (-not $IgnoreErrors -and $null -ne $changedFiles) +{ + $msg = @( + "", + "The formatting of the manifest files didn't match our expectation.", + "See github.com/microsoft/vcpkg/blob/master/docs/maintainers/maintainer-guide.md#manifest for solution." + ) + $msg += "" + + $msg += "vcpkg should produce the following diff:" + $msg += git diff $portsTree + + Write-Error ($msg -join "`n") + throw +} diff --git a/vcpkg/scripts/azure-pipelines/windows/Get-ChangedFiles.ps1 b/vcpkg/scripts/azure-pipelines/windows/Get-ChangedFiles.ps1 new file mode 100644 index 0000000..e299369 --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/windows/Get-ChangedFiles.ps1 @@ -0,0 +1,9 @@ +[CmdletBinding()] +Param( + [Parameter(Mandatory=$True)] + [string]$Directory +) + +git status --porcelain $Directory | ForEach-Object { + (-split $_)[1] +} diff --git a/vcpkg/scripts/azure-pipelines/windows/azure-pipelines.yml b/vcpkg/scripts/azure-pipelines/windows/azure-pipelines.yml new file mode 100644 index 0000000..512e03a --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/windows/azure-pipelines.yml @@ -0,0 +1,88 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# + +jobs: +- job: ${{ parameters.jobName }} + pool: + name: ${{ parameters.poolName }} + workspace: + clean: resources + timeoutInMinutes: 1440 # 1 day + variables: + - name: WORKING_ROOT + value: D:\ + - name: VCPKG_DOWNLOADS + value: D:\downloads + + steps: + - task: PowerShell@2 + displayName: 'Initialize Environment' + inputs: + filePath: 'scripts/azure-pipelines/windows/initialize-environment.ps1' + pwsh: true + - task: PowerShell@2 + displayName: 'Report on Disk Space' + condition: always() + inputs: + filePath: 'scripts/azure-pipelines/windows/disk-space.ps1' + pwsh: true + # Note: D: is the Azure machines' temporary disk. + - script: .\bootstrap-vcpkg.bat + displayName: 'Build vcpkg' + - task: CmdLine@2 + displayName: "Build vcpkg with CMake and Run Tests" + condition: eq('${{ parameters.triplet }}', 'x86-windows') + inputs: + script: | + :: TRANSITION, get these tools on the VMs next time we roll them + .\vcpkg.exe fetch cmake + .\vcpkg.exe fetch ninja + set PATH=${{ variables.VCPKG_DOWNLOADS }}\tools\cmake-3.17.2-windows\cmake-3.17.2-win32-x86\bin;${{ variables.VCPKG_DOWNLOADS }}\tools\ninja-1.10.1-windows;%PATH% + call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x86 -host_arch=x86 + rmdir /s /q build.x86.debug > nul 2> nul + cmake.exe -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=ON -B build.x86.debug -S toolsrc + ninja.exe -C build.x86.debug + build.x86.debug\vcpkg-test.exe + failOnStderr: true + - task: PowerShell@2 + displayName: 'Run vcpkg end-to-end tests' + condition: eq('${{ parameters.triplet }}', 'x86-windows') + inputs: + filePath: 'scripts/azure-pipelines/end-to-end-tests.ps1' + arguments: '-Triplet ${{ parameters.triplet }} -WorkingRoot ${{ variables.WORKING_ROOT }}' + pwsh: true + - task: PowerShell@2 + displayName: '*** Test Modified Ports and Prepare Test Logs ***' + inputs: + failOnStderr: true + filePath: 'scripts/azure-pipelines/test-modified-ports.ps1' + arguments: '-Triplet ${{ parameters.triplet }} -BuildReason $(Build.Reason) -ArchivesRoot W:\ -WorkingRoot ${{ variables.WORKING_ROOT }} -ArtifactStagingDirectory $(Build.ArtifactStagingDirectory)' + pwsh: true + - task: PowerShell@2 + displayName: 'Report on Disk Space After Build' + condition: always() + inputs: + filePath: 'scripts/azure-pipelines/windows/disk-space.ps1' + pwsh: true + - task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact: failure logs for ${{ parameters.triplet }}' + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)\failure-logs' + ArtifactName: 'failure logs for ${{ parameters.triplet }}' + condition: failed() + - task: PowerShell@2 + displayName: 'Build a file list for all packages' + condition: always() + inputs: + targetType: inline + script: | + ./vcpkg.exe fetch python3 + & $(.\vcpkg fetch python3) .\scripts\file_script.py D:\installed\vcpkg\info\ + pwsh: true + - task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact: file lists for ${{ parameters.triplet }}' + condition: always() + inputs: + PathtoPublish: scripts/list_files + ArtifactName: 'file lists for ${{ parameters.triplet }}' diff --git a/vcpkg/scripts/azure-pipelines/windows/create-vmss.ps1 b/vcpkg/scripts/azure-pipelines/windows/create-vmss.ps1 new file mode 100644 index 0000000..1fcec50 --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/windows/create-vmss.ps1 @@ -0,0 +1,361 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# + +<# +.SYNOPSIS +Creates a Windows virtual machine scale set, set up for vcpkg's CI. + +.DESCRIPTION +create-vmss.ps1 creates an Azure Windows VM scale set, set up for vcpkg's CI +system. See https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/overview +for more information. + +This script assumes you have installed Azure tools into PowerShell by following the instructions +at https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-3.6.1 +or are running from Azure Cloud Shell. + +.PARAMETER Unstable +If this parameter is set, the machine is configured for use in the "unstable" pool used for testing +the compiler rather than for testing vcpkg. Differences: +* The machine prefix is changed to VcpkgUnstable instead of PrWin. +* No storage account or "archives" share is provisioned. +* The firewall is not opened to allow communication with Azure Storage. +#> + +[CmdLetBinding()] +Param( + [switch]$Unstable = $false +) + +$Location = 'westus2' +if ($Unstable) { + $Prefix = 'VcpkgUnstable-' +} else { + $Prefix = 'PrWin-' +} + +$Prefix += (Get-Date -Format 'yyyy-MM-dd') +$VMSize = 'Standard_D16a_v4' +$ProtoVMName = 'PROTOTYPE' +$LiveVMPrefix = 'BUILD' +$WindowsServerSku = '2019-Datacenter' +$ErrorActionPreference = 'Stop' + +$ProgressActivity = 'Creating Scale Set' +$TotalProgress = 12 +if ($Unstable) { + $TotalProgress -= 1 # skipping the archives share part +} + +$CurrentProgress = 1 + +Import-Module "$PSScriptRoot/../create-vmss-helpers.psm1" -DisableNameChecking + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Creating resource group' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +$ResourceGroupName = Find-ResourceGroupName $Prefix +$AdminPW = New-Password +New-AzResourceGroup -Name $ResourceGroupName -Location $Location +$AdminPWSecure = ConvertTo-SecureString $AdminPW -AsPlainText -Force +$Credential = New-Object System.Management.Automation.PSCredential ("AdminUser", $AdminPWSecure) + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Creating virtual network' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +$allowHttp = New-AzNetworkSecurityRuleConfig ` + -Name AllowHTTP ` + -Description 'Allow HTTP(S)' ` + -Access Allow ` + -Protocol Tcp ` + -Direction Outbound ` + -Priority 1008 ` + -SourceAddressPrefix * ` + -SourcePortRange * ` + -DestinationAddressPrefix * ` + -DestinationPortRange @(80, 443) + +$allowDns = New-AzNetworkSecurityRuleConfig ` + -Name AllowDNS ` + -Description 'Allow DNS' ` + -Access Allow ` + -Protocol * ` + -Direction Outbound ` + -Priority 1009 ` + -SourceAddressPrefix * ` + -SourcePortRange * ` + -DestinationAddressPrefix * ` + -DestinationPortRange 53 + +$allowGit = New-AzNetworkSecurityRuleConfig ` + -Name AllowGit ` + -Description 'Allow git' ` + -Access Allow ` + -Protocol Tcp ` + -Direction Outbound ` + -Priority 1010 ` + -SourceAddressPrefix * ` + -SourcePortRange * ` + -DestinationAddressPrefix * ` + -DestinationPortRange 9418 + +if (-Not $Unstable) { + $allowStorage = New-AzNetworkSecurityRuleConfig ` + -Name AllowStorage ` + -Description 'Allow Storage' ` + -Access Allow ` + -Protocol * ` + -Direction Outbound ` + -Priority 1011 ` + -SourceAddressPrefix VirtualNetwork ` + -SourcePortRange * ` + -DestinationAddressPrefix Storage ` + -DestinationPortRange * +} + +$denyEverythingElse = New-AzNetworkSecurityRuleConfig ` + -Name DenyElse ` + -Description 'Deny everything else' ` + -Access Deny ` + -Protocol * ` + -Direction Outbound ` + -Priority 1012 ` + -SourceAddressPrefix * ` + -SourcePortRange * ` + -DestinationAddressPrefix * ` + -DestinationPortRange * + +$NetworkSecurityGroupName = $ResourceGroupName + 'NetworkSecurity' +$securityRules = @($allowHttp, $allowDns, $allowGit); +if (-Not $Unstable) { + $securityRules += @($allowStorage) +} + +$securityRules += @($denyEverythingElse) + +$NetworkSecurityGroup = New-AzNetworkSecurityGroup ` + -Name $NetworkSecurityGroupName ` + -ResourceGroupName $ResourceGroupName ` + -Location $Location ` + -SecurityRules $securityRules + +$SubnetName = $ResourceGroupName + 'Subnet' +$Subnet = New-AzVirtualNetworkSubnetConfig ` + -Name $SubnetName ` + -AddressPrefix "10.0.0.0/16" ` + -NetworkSecurityGroup $NetworkSecurityGroup + +$VirtualNetworkName = $ResourceGroupName + 'Network' +$VirtualNetwork = New-AzVirtualNetwork ` + -Name $VirtualNetworkName ` + -ResourceGroupName $ResourceGroupName ` + -Location $Location ` + -AddressPrefix "10.0.0.0/16" ` + -Subnet $Subnet + +#################################################################################################### +if (-Not $Unstable) { + Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Creating archives storage account' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + + $StorageAccountName = Sanitize-Name $ResourceGroupName + + New-AzStorageAccount ` + -ResourceGroupName $ResourceGroupName ` + -Location $Location ` + -Name $StorageAccountName ` + -SkuName 'Standard_LRS' ` + -Kind StorageV2 + + $StorageAccountKeys = Get-AzStorageAccountKey ` + -ResourceGroupName $ResourceGroupName ` + -Name $StorageAccountName + + $StorageAccountKey = $StorageAccountKeys[0].Value + + $StorageContext = New-AzStorageContext ` + -StorageAccountName $StorageAccountName ` + -StorageAccountKey $StorageAccountKey + + New-AzStorageShare -Name 'archives' -Context $StorageContext + Set-AzStorageShareQuota -ShareName 'archives' -Context $StorageContext -Quota 2048 +} + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Creating prototype VM' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +$NicName = $ResourceGroupName + 'NIC' +$Nic = New-AzNetworkInterface ` + -Name $NicName ` + -ResourceGroupName $ResourceGroupName ` + -Location $Location ` + -Subnet $VirtualNetwork.Subnets[0] + +$VM = New-AzVMConfig -Name $ProtoVMName -VMSize $VMSize -Priority 'Spot' -MaxPrice -1 +$VM = Set-AzVMOperatingSystem ` + -VM $VM ` + -Windows ` + -ComputerName $ProtoVMName ` + -Credential $Credential ` + -ProvisionVMAgent + +$VM = Add-AzVMNetworkInterface -VM $VM -Id $Nic.Id +$VM = Set-AzVMSourceImage ` + -VM $VM ` + -PublisherName 'MicrosoftWindowsServer' ` + -Offer 'WindowsServer' ` + -Skus $WindowsServerSku ` + -Version latest + +$VM = Set-AzVMBootDiagnostic -VM $VM -Disable +New-AzVm ` + -ResourceGroupName $ResourceGroupName ` + -Location $Location ` + -VM $VM + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Running provisioning script provision-image.txt (as a .ps1) in VM' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +$provisionParameters = @{AdminUserPassword = $AdminPW;} +if (-Not $Unstable) { + $provisionParameters['StorageAccountName'] = $StorageAccountName + $provisionParameters['StorageAccountKey'] = $StorageAccountKey +} + +$ProvisionImageResult = Invoke-AzVMRunCommand ` + -ResourceGroupName $ResourceGroupName ` + -VMName $ProtoVMName ` + -CommandId 'RunPowerShellScript' ` + -ScriptPath "$PSScriptRoot\provision-image.txt" ` + -Parameter $provisionParameters + +Write-Host "provision-image.ps1 output: $($ProvisionImageResult.value.Message)" + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Restarting VM' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +Restart-AzVM -ResourceGroupName $ResourceGroupName -Name $ProtoVMName + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Running provisioning script sysprep.ps1 in VM' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +$SysprepResult = Invoke-AzVMRunCommand ` + -ResourceGroupName $ResourceGroupName ` + -VMName $ProtoVMName ` + -CommandId 'RunPowerShellScript' ` + -ScriptPath "$PSScriptRoot\sysprep.ps1" + +Write-Host "sysprep.ps1 output: $($SysprepResult.value.Message)" + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Waiting for VM to shut down' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +Wait-Shutdown -ResourceGroupName $ResourceGroupName -Name $ProtoVMName + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Converting VM to Image' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +Stop-AzVM ` + -ResourceGroupName $ResourceGroupName ` + -Name $ProtoVMName ` + -Force + +Set-AzVM ` + -ResourceGroupName $ResourceGroupName ` + -Name $ProtoVMName ` + -Generalized + +$VM = Get-AzVM -ResourceGroupName $ResourceGroupName -Name $ProtoVMName +$PrototypeOSDiskName = $VM.StorageProfile.OsDisk.Name +$ImageConfig = New-AzImageConfig -Location $Location -SourceVirtualMachineId $VM.ID +$Image = New-AzImage -Image $ImageConfig -ImageName $ProtoVMName -ResourceGroupName $ResourceGroupName + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Deleting unused VM and disk' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +Remove-AzVM -Id $VM.ID -Force +Remove-AzDisk -ResourceGroupName $ResourceGroupName -DiskName $PrototypeOSDiskName -Force + +#################################################################################################### +Write-Progress ` + -Activity $ProgressActivity ` + -Status 'Creating scale set' ` + -PercentComplete (100 / $TotalProgress * $CurrentProgress++) + +$VmssIpConfigName = $ResourceGroupName + 'VmssIpConfig' +$VmssIpConfig = New-AzVmssIpConfig -SubnetId $Nic.IpConfigurations[0].Subnet.Id -Primary -Name $VmssIpConfigName +$VmssName = $ResourceGroupName + 'Vmss' +$Vmss = New-AzVmssConfig ` + -Location $Location ` + -SkuCapacity 0 ` + -SkuName $VMSize ` + -SkuTier 'Standard' ` + -Overprovision $false ` + -UpgradePolicyMode Manual ` + -EvictionPolicy Delete ` + -Priority Spot ` + -MaxPrice -1 + +$Vmss = Add-AzVmssNetworkInterfaceConfiguration ` + -VirtualMachineScaleSet $Vmss ` + -Primary $true ` + -IpConfiguration $VmssIpConfig ` + -NetworkSecurityGroupId $NetworkSecurityGroup.Id ` + -Name $NicName + +$Vmss = Set-AzVmssOsProfile ` + -VirtualMachineScaleSet $Vmss ` + -ComputerNamePrefix $LiveVMPrefix ` + -AdminUsername 'AdminUser' ` + -AdminPassword $AdminPW ` + -WindowsConfigurationProvisionVMAgent $true ` + -WindowsConfigurationEnableAutomaticUpdate $true + +$Vmss = Set-AzVmssStorageProfile ` + -VirtualMachineScaleSet $Vmss ` + -OsDiskCreateOption 'FromImage' ` + -OsDiskCaching ReadWrite ` + -ImageReferenceId $Image.Id + +New-AzVmss ` + -ResourceGroupName $ResourceGroupName ` + -Name $VmssName ` + -VirtualMachineScaleSet $Vmss + +#################################################################################################### +Write-Progress -Activity $ProgressActivity -Completed +Write-Host "Location: $Location" +Write-Host "Resource group name: $ResourceGroupName" +Write-Host "User name: AdminUser" +Write-Host "Using generated password: $AdminPW" +Write-Host 'Finished!' diff --git a/vcpkg/scripts/azure-pipelines/windows/disk-space.ps1 b/vcpkg/scripts/azure-pipelines/windows/disk-space.ps1 new file mode 100644 index 0000000..8680d77 --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/windows/disk-space.ps1 @@ -0,0 +1,35 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# + +<# +.SYNOPSIS +Prints total and free disk space for each disk on the system +#> + +Function Format-Size { + [CmdletBinding()] + Param([long]$Size) + + if ($Size -lt 1024) { + $Size = [int]$Size + return "$Size B" + } + + $Size = $Size / 1024 + if ($Size -lt 1024) { + $Size = [int]$Size + return "$Size KiB" + } + + $Size = $Size / 1024 + if ($Size -lt 1024) { + $Size = [int]$Size + return "$Size MiB" + } + + $Size = [int]($Size / 1024) + return "$Size GiB" +} + +Get-CimInstance -ClassName Win32_LogicalDisk | Format-Table -Property @{Label="Disk"; Expression={ $_.DeviceID }},@{Label="Label"; Expression={ $_.VolumeName }},@{Label="Size"; Expression={ Format-Size($_.Size) }},@{Label="Free Space"; Expression={ Format-Size($_.FreeSpace) }} diff --git a/vcpkg/scripts/azure-pipelines/windows/initialize-environment.ps1 b/vcpkg/scripts/azure-pipelines/windows/initialize-environment.ps1 new file mode 100644 index 0000000..2452080 --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/windows/initialize-environment.ps1 @@ -0,0 +1,42 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# +<# +.SYNOPSIS +Sets up the environment to run other vcpkg CI steps in an Azure Pipelines job. + +.DESCRIPTION +This script maps network drives from infrastructure and cleans out anything that +might have been leftover from a previous run. +#> + +if ([string]::IsNullOrWhiteSpace($env:StorageAccountName) -or [string]::IsNullOrWhiteSpace($env:StorageAccountKey)) { + Write-Host 'No storage account and/or key set, skipping mount of W:\' +} else { + $StorageAccountName = $env:StorageAccountName + $StorageAccountKey = $env:StorageAccountKey + + Write-Host 'Setting up archives mount' + if (-Not (Test-Path W:)) { + net use W: "\\$StorageAccountName.file.core.windows.net\archives" /u:"AZURE\$StorageAccountName" $StorageAccountKey + } +} + +Write-Host 'Creating downloads directory' +mkdir D:\downloads -ErrorAction SilentlyContinue + +# Delete entries in the downloads folder, except: +# those in the 'tools' folder +# those last accessed in the last 30 days +Get-ChildItem -Path D:\downloads -Exclude "tools" ` + | Where-Object{ $_.LastAccessTime -lt (get-Date).AddDays(-30) } ` + | ForEach-Object{Remove-Item -Path $_ -Recurse -Force} + +# Msys sometimes leaves a database lock file laying around, especially if there was a failed job +# which causes unrelated failures in jobs that run later on the machine. +# work around this by just removing the vcpkg installed msys2 if it exists +if( Test-Path D:\downloads\tools\msys2 ) +{ + Write-Host "removing previously installed msys2" + Remove-Item D:\downloads\tools\msys2 -Recurse -Force +} diff --git a/vcpkg/scripts/azure-pipelines/windows/packages.config b/vcpkg/scripts/azure-pipelines/windows/packages.config new file mode 100644 index 0000000..d48977f --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/windows/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/vcpkg/scripts/azure-pipelines/windows/provision-image.txt b/vcpkg/scripts/azure-pipelines/windows/provision-image.txt new file mode 100644 index 0000000..b43b1bf --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/windows/provision-image.txt @@ -0,0 +1,490 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT + +<# +.SYNOPSIS +Sets up a machine to be an image for a scale set. + +.DESCRIPTION +provision-image.ps1 runs on an existing, freshly provisioned virtual machine, +and sets up that virtual machine as a build machine. After this is done, +(outside of this script), we take that machine and make it an image to be copied +for setting up new VMs in the scale set. + +This script must either be run as admin, or one must pass AdminUserPassword; +if the script is run with AdminUserPassword, it runs itself again as an +administrator. + +.PARAMETER AdminUserPassword +The administrator user's password; if this is $null, or not passed, then the +script assumes it's running on an administrator account. + +.PARAMETER StorageAccountName +The name of the storage account. Stored in the environment variable %StorageAccountName%. +Used by the CI system to access the global storage. + +.PARAMETER StorageAccountKey +The key of the storage account. Stored in the environment variable %StorageAccountKey%. +Used by the CI system to access the global storage. +#> +param( + [string]$AdminUserPassword = $null, + [string]$StorageAccountName = $null, + [string]$StorageAccountKey = $null +) + +$ErrorActionPreference = 'Stop' + +<# +.SYNOPSIS +Gets a random file path in the temp directory. + +.DESCRIPTION +Get-TempFilePath takes an extension, and returns a path with a random +filename component in the temporary directory with that extension. + +.PARAMETER Extension +The extension to use for the path. +#> +Function Get-TempFilePath { + Param( + [String]$Extension + ) + + if ([String]::IsNullOrWhiteSpace($Extension)) { + throw 'Missing Extension' + } + + $tempPath = [System.IO.Path]::GetTempPath() + $tempName = [System.IO.Path]::GetRandomFileName() + '.' + $Extension + return Join-Path $tempPath $tempName +} + +$TranscriptPath = 'C:\provision-image-transcript.txt' + +if ([string]::IsNullOrEmpty($AdminUserPassword)) { + Start-Transcript -Path $TranscriptPath +} else { + Write-Host 'AdminUser password supplied; switching to AdminUser.' + $PsExecPath = Get-TempFilePath -Extension 'exe' + Write-Host "Downloading psexec to: $PsExecPath" + & curl.exe -L -o $PsExecPath -s -S https://live.sysinternals.com/PsExec64.exe + $PsExecArgs = @( + '-u', + 'AdminUser', + '-p', + $AdminUserPassword, + '-accepteula', + '-h', + 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe', + '-ExecutionPolicy', + 'Unrestricted', + '-File', + $PSCommandPath + ) + + if (-Not ([string]::IsNullOrWhiteSpace($StorageAccountName))) { + $PsExecArgs += '-StorageAccountName' + $PsExecArgs += $StorageAccountName + } + + if (-Not ([string]::IsNullOrWhiteSpace($StorageAccountKey))) { + $PsExecArgs += '-StorageAccountKey' + $PsExecArgs += $StorageAccountKey + } + + Write-Host "Executing: $PsExecPath $PsExecArgs" + + $proc = Start-Process -FilePath $PsExecPath -ArgumentList $PsExecArgs -Wait -PassThru + Write-Host 'Reading transcript...' + Get-Content -Path $TranscriptPath + Write-Host 'Cleaning up...' + Remove-Item $PsExecPath + exit $proc.ExitCode +} + +$VisualStudioBootstrapperUrl = 'https://aka.ms/vs/16/release/vs_enterprise.exe' +$Workloads = @( + 'Microsoft.VisualStudio.Workload.NativeDesktop', + 'Microsoft.VisualStudio.Workload.Universal', + 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64', + 'Microsoft.VisualStudio.Component.VC.Tools.ARM', + 'Microsoft.VisualStudio.Component.VC.Tools.ARM64', + 'Microsoft.VisualStudio.Component.VC.ATL', + 'Microsoft.VisualStudio.Component.VC.ATLMFC', + 'Microsoft.VisualStudio.Component.VC.v141.x86.x64.Spectre', + 'Microsoft.VisualStudio.Component.Windows10SDK.18362', + 'Microsoft.Net.Component.4.8.SDK', + 'Microsoft.Component.NetFX.Native', + 'Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset', + 'Microsoft.VisualStudio.Component.VC.Llvm.Clang' +) + +$WindowsSDKUrl = 'https://download.microsoft.com/download/1/c/3/1c3d5161-d9e9-4e4b-9b43-b70fe8be268c/windowssdk/winsdksetup.exe' + +$WindowsWDKUrl = 'https://download.microsoft.com/download/1/a/7/1a730121-7aa7-46f7-8978-7db729aa413d/wdk/wdksetup.exe' + +$MpiUrl = 'https://download.microsoft.com/download/a/5/2/a5207ca5-1203-491a-8fb8-906fd68ae623/msmpisetup.exe' + +$CudaUrl = 'https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_426.00_win10.exe' +$CudaFeatures = 'nvcc_10.1 cuobjdump_10.1 nvprune_10.1 cupti_10.1 gpu_library_advisor_10.1 memcheck_10.1 ' + ` + 'nvdisasm_10.1 nvprof_10.1 visual_profiler_10.1 visual_studio_integration_10.1 cublas_10.1 cublas_dev_10.1 ' + ` + 'cudart_10.1 cufft_10.1 cufft_dev_10.1 curand_10.1 curand_dev_10.1 cusolver_10.1 cusolver_dev_10.1 cusparse_10.1 ' + ` + 'cusparse_dev_10.1 nvgraph_10.1 nvgraph_dev_10.1 npp_10.1 npp_dev_10.1 nvrtc_10.1 nvrtc_dev_10.1 nvml_dev_10.1 ' + ` + 'occupancy_calculator_10.1 fortran_examples_10.1' + +$PwshUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.0.3/PowerShell-7.0.3-win-x64.msi' + +$ErrorActionPreference = 'Stop' +$ProgressPreference = 'SilentlyContinue' + +<# +.SYNOPSIS +Writes a message to the screen depending on ExitCode. + +.DESCRIPTION +Since msiexec can return either 0 or 3010 successfully, in both cases +we write that installation succeeded, and which exit code it exited with. +If msiexec returns anything else, we write an error. + +.PARAMETER ExitCode +The exit code that msiexec returned. +#> +Function PrintMsiExitCodeMessage { + Param( + $ExitCode + ) + + # 3010 is probably ERROR_SUCCESS_REBOOT_REQUIRED + if ($ExitCode -eq 0 -or $ExitCode -eq 3010) { + Write-Host "Installation successful! Exited with $ExitCode." + } + else { + Write-Error "Installation failed! Exited with $ExitCode." + throw + } +} + +<# +.SYNOPSIS +Install Visual Studio. + +.DESCRIPTION +InstallVisualStudio takes the $Workloads array, and installs it with the +installer that's pointed at by $BootstrapperUrl. + +.PARAMETER Workloads +The set of VS workloads to install. + +.PARAMETER BootstrapperUrl +The URL of the Visual Studio installer, i.e. one of vs_*.exe. + +.PARAMETER InstallPath +The path to install Visual Studio at. + +.PARAMETER Nickname +The nickname to give the installation. +#> +Function InstallVisualStudio { + Param( + [String[]]$Workloads, + [String]$BootstrapperUrl, + [String]$InstallPath = $null, + [String]$Nickname = $null + ) + + try { + Write-Host 'Downloading Visual Studio...' + [string]$bootstrapperExe = Get-TempFilePath -Extension 'exe' + curl.exe -L -o $bootstrapperExe -s -S $BootstrapperUrl + Write-Host 'Installing Visual Studio...' + $args = @('/c', $bootstrapperExe, '--quiet', '--norestart', '--wait', '--nocache') + foreach ($workload in $Workloads) { + $args += '--add' + $args += $workload + } + + if (-not ([String]::IsNullOrWhiteSpace($InstallPath))) { + $args += '--installpath' + $args += $InstallPath + } + + if (-not ([String]::IsNullOrWhiteSpace($Nickname))) { + $args += '--nickname' + $args += $Nickname + } + + $proc = Start-Process -FilePath cmd.exe -ArgumentList $args -Wait -PassThru + PrintMsiExitCodeMessage $proc.ExitCode + } + catch { + Write-Error "Failed to install Visual Studio! $($_.Exception.Message)" + throw + } +} + +<# +.SYNOPSIS +Install a .msi file. + +.DESCRIPTION +InstallMSI takes a url where an .msi lives, and installs that .msi to the system. + +.PARAMETER Name +The name of the thing to install. + +.PARAMETER Url +The URL at which the .msi lives. +#> +Function InstallMSI { + Param( + [String]$Name, + [String]$Url + ) + + try { + Write-Host "Downloading $Name..." + [string]$msiPath = Get-TempFilePath -Extension 'msi' + curl.exe -L -o $msiPath -s -S $Url + Write-Host "Installing $Name..." + $args = @('/i', $msiPath, '/norestart', '/quiet', '/qn') + $proc = Start-Process -FilePath 'msiexec.exe' -ArgumentList $args -Wait -PassThru + PrintMsiExitCodeMessage $proc.ExitCode + } + catch { + Write-Error "Failed to install $Name! $($_.Exception.Message)" + throw + } +} + +<# +.SYNOPSIS +Unpacks a zip file to $Dir. + +.DESCRIPTION +InstallZip takes a URL of a zip file, and unpacks the zip file to the directory +$Dir. + +.PARAMETER Name +The name of the tool being installed. + +.PARAMETER Url +The URL of the zip file to unpack. + +.PARAMETER Dir +The directory to unpack the zip file to. +#> +Function InstallZip { + Param( + [String]$Name, + [String]$Url, + [String]$Dir + ) + + try { + Write-Host "Downloading $Name..." + [string]$zipPath = Get-TempFilePath -Extension 'zip' + curl.exe -L -o $zipPath -s -S $Url + Write-Host "Installing $Name..." + Expand-Archive -Path $zipPath -DestinationPath $Dir -Force + } + catch { + Write-Error "Failed to install $Name! $($_.Exception.Message)" + throw + } +} + +<# +.SYNOPSIS +Installs Windows SDK version 2004 + +.DESCRIPTION +Downloads the Windows SDK installer located at $Url, and installs it with the +correct flags. + +.PARAMETER Url +The URL of the installer. +#> +Function InstallWindowsSDK { + Param( + [String]$Url + ) + + try { + Write-Host 'Downloading Windows SDK...' + [string]$installerPath = Get-TempFilePath -Extension 'exe' + curl.exe -L -o $installerPath -s -S $Url + Write-Host 'Installing Windows SDK...' + $proc = Start-Process -FilePath $installerPath -ArgumentList @('/features', '+', '/q') -Wait -PassThru + $exitCode = $proc.ExitCode + if ($exitCode -eq 0) { + Write-Host 'Installation successful!' + } + else { + Write-Error "Installation failed! Exited with $exitCode." + throw + } + } + catch { + Write-Error "Failed to install Windows SDK! $($_.Exception.Message)" + throw + } +} + +<# +.SYNOPSIS +Installs Windows WDK version 2004 + +.DESCRIPTION +Downloads the Windows WDK installer located at $Url, and installs it with the +correct flags. + +.PARAMETER Url +The URL of the installer. +#> +Function InstallWindowsWDK { + Param( + [String]$Url + ) + + try { + Write-Host 'Downloading Windows WDK...' + [string]$installerPath = Get-TempFilePath -Extension 'exe' + curl.exe -L -o $installerPath -s -S $Url + Write-Host 'Installing Windows WDK...' + $proc = Start-Process -FilePath $installerPath -ArgumentList @('/features', '+', '/q') -Wait -PassThru + $exitCode = $proc.ExitCode + if ($exitCode -eq 0) { + Write-Host 'Installation successful!' + } + else { + Write-Error "Installation failed! Exited with $exitCode." + throw + } + } + catch { + Write-Error "Failed to install Windows WDK! $($_.Exception.Message)" + throw + } +} + +<# +.SYNOPSIS +Installs MPI + +.DESCRIPTION +Downloads the MPI installer located at $Url, and installs it with the +correct flags. + +.PARAMETER Url +The URL of the installer. +#> +Function InstallMpi { + Param( + [String]$Url + ) + + try { + Write-Host 'Downloading MPI...' + [string]$installerPath = Get-TempFilePath -Extension 'exe' + curl.exe -L -o $installerPath -s -S $Url + Write-Host 'Installing MPI...' + $proc = Start-Process -FilePath $installerPath -ArgumentList @('-force', '-unattend') -Wait -PassThru + $exitCode = $proc.ExitCode + if ($exitCode -eq 0) { + Write-Host 'Installation successful!' + } + else { + Write-Error "Installation failed! Exited with $exitCode." + throw + } + } + catch { + Write-Error "Failed to install MPI! $($_.Exception.Message)" + throw + } +} + +<# +.SYNOPSIS +Installs NVIDIA's CUDA Toolkit. + +.DESCRIPTION +InstallCuda installs the CUDA Toolkit with the features specified as a +space-separated list of strings in $Features. + +.PARAMETER Url +The URL of the CUDA installer. + +.PARAMETER Features +A space-separated list of features to install. +#> +Function InstallCuda { + Param( + [String]$Url, + [String]$Features + ) + + try { + Write-Host 'Downloading CUDA...' + [string]$installerPath = Get-TempFilePath -Extension 'exe' + curl.exe -L -o $installerPath -s -S $Url + Write-Host 'Installing CUDA...' + $proc = Start-Process -FilePath $installerPath -ArgumentList @('-s ' + $Features) -Wait -PassThru + $exitCode = $proc.ExitCode + if ($exitCode -eq 0) { + Write-Host 'Installation successful!' + } + else { + Write-Error "Installation failed! Exited with $exitCode." + throw + } + } + catch { + Write-Error "Failed to install CUDA! $($_.Exception.Message)" + throw + } +} + +Write-Host "AdminUser password not supplied; assuming already running as AdminUser" + +Write-Host 'Disabling pagefile...' +wmic computersystem set AutomaticManagedPagefile=False +wmic pagefileset delete + +$av = Get-Command Add-MPPreference -ErrorAction SilentlyContinue +if ($null -eq $av) { + Write-Host 'AntiVirus not installed, skipping exclusions.' +} else { + Write-Host 'Configuring AntiVirus exclusions...' + Add-MpPreference -ExclusionPath C:\agent + Add-MPPreference -ExclusionPath D:\ + Add-MPPreference -ExclusionProcess ninja.exe + Add-MPPreference -ExclusionProcess clang-cl.exe + Add-MPPreference -ExclusionProcess cl.exe + Add-MPPreference -ExclusionProcess link.exe + Add-MPPreference -ExclusionProcess python.exe +} + +InstallVisualStudio -Workloads $Workloads -BootstrapperUrl $VisualStudioBootstrapperUrl -Nickname 'Stable' +InstallWindowsSDK -Url $WindowsSDKUrl +InstallWindowsWDK -Url $WindowsWDKUrl +InstallMpi -Url $MpiUrl +InstallCuda -Url $CudaUrl -Features $CudaFeatures +InstallMSI -Url $PwshUrl -Name 'PowerShell Core' +if ([string]::IsNullOrWhiteSpace($StorageAccountName)) { + Write-Host 'No storage account name configured.' +} else { + Write-Host 'Storing storage account name to environment' + Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' ` + -Name StorageAccountName ` + -Value $StorageAccountName +} +if ([string]::IsNullOrWhiteSpace($StorageAccountKey)) { + Write-Host 'No storage account key configured.' +} else { + Write-Host 'Storing storage account key to environment' + Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' ` + -Name StorageAccountKey ` + -Value $StorageAccountKey +} diff --git a/vcpkg/scripts/azure-pipelines/windows/signing.signproj b/vcpkg/scripts/azure-pipelines/windows/signing.signproj new file mode 100644 index 0000000..2ded02c --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/windows/signing.signproj @@ -0,0 +1,36 @@ + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + Microsoft400 + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + + + + diff --git a/vcpkg/scripts/azure-pipelines/windows/sysprep.ps1 b/vcpkg/scripts/azure-pipelines/windows/sysprep.ps1 new file mode 100644 index 0000000..a299500 --- /dev/null +++ b/vcpkg/scripts/azure-pipelines/windows/sysprep.ps1 @@ -0,0 +1,17 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: MIT +# + +<# +.SYNOPSIS +Prepares the virtual machine for imaging. + +.DESCRIPTION +Runs the `sysprep` utility to prepare the system for imaging. +See https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/sysprep--system-preparation--overview +for more information. +#> + +$ErrorActionPreference = 'Stop' +Write-Host 'Running sysprep' +& C:\Windows\system32\sysprep\sysprep.exe /oobe /generalize /mode:vm /shutdown diff --git a/vcpkg/scripts/boost/.gitignore b/vcpkg/scripts/boost/.gitignore new file mode 100644 index 0000000..f8e3128 --- /dev/null +++ b/vcpkg/scripts/boost/.gitignore @@ -0,0 +1,3 @@ +/boost +/downloads +/libs \ No newline at end of file diff --git a/vcpkg/scripts/boost/generate-ports.ps1 b/vcpkg/scripts/boost/generate-ports.ps1 new file mode 100644 index 0000000..8136a97 --- /dev/null +++ b/vcpkg/scripts/boost/generate-ports.ps1 @@ -0,0 +1,439 @@ +[CmdletBinding()] +param ( + $libraries = @(), + $version = "1.73.0", + $portsDir = $null +) + +$scriptsDir = split-path -parent $MyInvocation.MyCommand.Definition +if ($null -eq $portsDir) +{ + $portsDir = "$scriptsDir/../../ports" +} + +# Optionally clear this array when moving to a new boost version +$port_versions = @{ + "asio" = 1; + "context" = 1; + "coroutine" = 1; + "fiber" = 1; + "filesystem" = 1; + "graph-parallel" = 1; + "iostreams" = 1; + "locale" = 1; + "log" = 1; + "mpi" = 1; + "parameter-python" = 1; + "poly-collection" = 1; + "python" = 1; + "safe-numerics" = 1; + "stacktrace" = 1; + "test" = 1; + "wave" = 1; + "boost" = 1 +} + +$per_port_data = @{ + "fiber" = @{ "supports" = "windows&!uwp&!arm" }; + "filesystem" = @{ "supports" = "!uwp" }; + "iostreams" = @{ "supports" = "!uwp" }; + "context" = @{ "supports" = "!uwp" }; + "stacktrace" = @{ "supports" = "!uwp" }; + "coroutine" = @{ "supports" = "!arm&!uwp" }; + "test" = @{ "supports" = "!uwp" }; + "wave" = @{ "supports" = "!uwp" }; + "log" = @{ "supports" = "!uwp" }; + "locale" = @{ + "supports" = "!uwp"; + "features" = @( + "Feature: icu" + "Build-Depends: icu" + "Description: ICU backend for Boost.Locale" + )}; + "python" = @{ + "supports" = "!uwp&!(arm&windows)"; + "features" = @( + "Feature: python2" + "Build-Depends: python2 (windows)" + "Description: Build with Python2 support" + )}; + "regex" = @{ "features" = @( + "Feature: icu" + "Build-Depends: icu" + "Description: ICU backend for Boost.Regex" + )} +} + +function TransformReference() +{ + param ( + [string]$library + ) + + if ($per_port_data[$library].supports) + { + "$library ($($per_port_data[$library].supports))" + } + else + { + "$library" + } +} + +function Generate() +{ + param ( + [string]$Name, + [string]$PortName, + [string]$Hash, + [bool]$NeedsBuild, + $Depends = @() + ) + + $controlDeps = ($Depends | sort) -join ", " + + mkdir "$portsDir/boost-$PortName" -erroraction SilentlyContinue | out-null + $controlLines = @( + "# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1" + "Source: boost-$PortName" + "Version: $version" + ) + if ($port_versions[$PortName]) + { + $controlLines += @("Port-Version: $($port_versions[$PortName])") + } + $controlLines += @( + "Build-Depends: $controlDeps" + "Homepage: https://github.com/boostorg/$Name" + "Description: Boost $Name module" + ) + if ($per_port_data[$PortName].supports) + { + $controlLines += @("Supports: $($per_port_data[$PortName].supports)") + } + if ($per_port_data[$PortName].features) + { + $controlLines += @("") + $per_port_data[$PortName].features + } + $controlLines | out-file -enc ascii "$portsDir/boost-$PortName/CONTROL" + + $portfileLines = @( + "# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1" + "" + ) + + if ($PortName -eq "system") + { + $portfileLines += @( + "vcpkg_buildpath_length_warning(37)" + "" + ) + } + + $portfileLines += @( + "vcpkg_from_github(" + " OUT_SOURCE_PATH SOURCE_PATH" + " REPO boostorg/$Name" + " REF boost-$version" + " SHA512 $Hash" + " HEAD_REF master" + ) + $patches = ls $portsDir/boost-$PortName/*.patch + if ($patches.Count -eq 0) + { + } + elseif ($patches.Count -eq 1) + { + $portfileLines += @(" PATCHES $($patches.name)") + } + else + { + $portfileLines += @(" PATCHES") + foreach ($patch in $patches) + { + $portfileLines += @(" $($patches.name)") + } + } + $portfileLines += @( + ")" + "" + ) + + if (Test-Path "$scriptsDir/post-source-stubs/$PortName.cmake") + { + $portfileLines += @(get-content "$scriptsDir/post-source-stubs/$PortName.cmake") + } + + if ($NeedsBuild) + { + $portfileLines += @( + "include(`${CURRENT_INSTALLED_DIR}/share/boost-build/boost-modular-build.cmake)" + ) + # b2-options.cmake contains port-specific build options + if (Test-Path "$portsDir/boost-$PortName/b2-options.cmake") + { + $portfileLines += @( + "boost_modular_build(" + " SOURCE_PATH `${SOURCE_PATH}" + " BOOST_CMAKE_FRAGMENT `"`${CMAKE_CURRENT_LIST_DIR}/b2-options.cmake`"" + ")" + ) + } + else + { + $portfileLines += @( + "boost_modular_build(SOURCE_PATH `${SOURCE_PATH})" + ) + } + } + + $portfileLines += @( + "include(`${CURRENT_INSTALLED_DIR}/share/boost-vcpkg-helpers/boost-modular-headers.cmake)" + "boost_modular_headers(SOURCE_PATH `${SOURCE_PATH})" + ) + + if (Test-Path "$scriptsDir/post-build-stubs/$PortName.cmake") + { + $portfileLines += @(get-content "$scriptsDir/post-build-stubs/$PortName.cmake") + } + + $portfileLines | out-file -enc ascii "$portsDir/boost-$PortName/portfile.cmake" +} + +if (!(Test-Path "$scriptsDir/boost")) +{ + "Cloning boost..." + pushd $scriptsDir + try + { + git clone https://github.com/boostorg/boost --branch boost-$version + } + finally + { + popd + } +} +else +{ + pushd $scriptsDir/boost + try + { + git fetch + git checkout -f boost-$version + } + finally + { + popd + } +} + +$libraries_found = ls $scriptsDir/boost/libs -directory | % name | % { + if ($_ -match "numeric") + { + "numeric_conversion" + "interval" + "odeint" + "ublas" + "safe_numerics" + } + elseif ($_ -eq "headers") + { + } + else + { + $_ + } +} + +mkdir $scriptsDir/downloads -erroraction SilentlyContinue | out-null + +if ($libraries.Length -eq 0) +{ + $libraries = $libraries_found +} + +$libraries_in_boost_port = @() + +foreach ($library in $libraries) +{ + "Handling boost/$library..." + $archive = "$scriptsDir/downloads/$library-boost-$version.tar.gz" + if (!(Test-Path $archive)) + { + "Downloading boost/$library..." + & @(vcpkg fetch aria2)[-1] "https://github.com/boostorg/$library/archive/boost-$version.tar.gz" -d "$scriptsDir/downloads" -o "$library-boost-$version.tar.gz" + } + $hash = vcpkg hash $archive + $unpacked = "$scriptsDir/libs/$library-boost-$version" + if (!(Test-Path $unpacked)) + { + "Unpacking boost/$library..." + mkdir $scriptsDir/libs -erroraction SilentlyContinue | out-null + pushd $scriptsDir/libs + try + { + cmake -E tar xf $archive + } + finally + { + popd + } + } + pushd $unpacked + try + { + $groups = $( + findstr /si /C:"include ).*", "`$1" ` + -replace "/|\.hp?p?| ","" } | group | % name | % { + # mappings + Write-Verbose "${library}: $_" + if ($_ -match "aligned_storage") { "type_traits" } + elseif ($_ -match "noncopyable|ref|swap|get_pointer|checked_delete|visit_each") { "core" } + elseif ($_ -eq "type") { "core" } + elseif ($_ -eq "concept") { "concept_check" } + elseif ($_ -match "unordered_") { "unordered" } + elseif ($_ -match "cstdint|integer_fwd|integer_traits") { "integer" } + elseif ($_ -match "call_traits|operators|current_function|cstdlib|next_prior|compressed_pair") { "utility" } + elseif ($_ -match "^version|^workaround") { "config" } + elseif ($_ -match "enable_shared_from_this|shared_ptr|make_shared|make_unique|intrusive_ptr|scoped_ptr|pointer_cast|pointer_to_other|weak_ptr|shared_array|scoped_array") { "smart_ptr" } + elseif ($_ -match "iterator_adaptors|generator_iterator|pointee") { "iterator" } + elseif ($_ -eq "regex_fwd") { "regex" } + elseif ($_ -eq "make_default") { "convert" } + elseif ($_ -eq "foreach_fwd") { "foreach" } + elseif ($_ -eq "cerrno") { "system" } + elseif ($_ -eq "circular_buffer_fwd") { "circular_buffer" } + elseif ($_ -eq "archive") { "serialization" } + elseif ($_ -match "none|none_t") { "optional" } + elseif ($_ -eq "limits") { "compatibility" } + elseif ($_ -match "cstdfloat|math_fwd") { "math" } + elseif ($_ -eq "cast") { "conversion"; "numeric_conversion" } # DEPRECATED header file, includes and + elseif ($_ -match "polymorphic_cast|implicit_cast") { "conversion" } + elseif ($_ -eq "nondet_random") { "random" } + elseif ($_ -eq "memory_order") { "atomic" } + elseif ($_ -match "blank|blank_fwd|numeric_traits") { "detail" } + elseif ($_ -match "is_placeholder|mem_fn") { "bind" } + elseif ($_ -eq "exception_ptr") { "exception" } + elseif ($_ -match "multi_index_container|multi_index_container_fwd") { "multi_index" } + elseif ($_ -eq "lexical_cast") { "lexical_cast"; "math" } + elseif ($_ -match "token_iterator|token_functions") { "tokenizer" } + elseif ($_ -eq "numeric" -and $library -notmatch "numeric_conversion|interval|odeint|ublas") { "numeric_conversion"; "interval"; "odeint"; "ublas" } + elseif ($_ -eq "io_fwd") { "io" } + else { $_ } + } | group | % name | ? { $_ -ne $library } + + #"`nFor ${library}:" + " [known] " + $($groups | ? { $libraries_found -contains $_ }) + " [unknown] " + $($groups | ? { $libraries_found -notcontains $_ }) + + $deps = @($groups | ? { $libraries_found -contains $_ }) + + $deps = @($deps | ? { + # Boost contains cycles, so remove a few dependencies to break the loop. + (($library -notmatch "core|assert|mpl|detail|throw_exception|type_traits|^exception") -or ($_ -notmatch "utility")) ` + -and ` + (($library -notmatch "assert") -or ($_ -notmatch "integer"))` + -and ` + (($library -notmatch "range") -or ($_ -notmatch "algorithm"))` + -and ` + (($library -ne "config") -or ($_ -notmatch "integer"))` + -and ` + (($library -notmatch "multiprecision") -or ($_ -notmatch "random|math"))` + -and ` + (($library -notmatch "lexical_cast") -or ($_ -notmatch "math"))` + -and ` + (($library -notmatch "functional") -or ($_ -notmatch "function"))` + -and ` + (($library -notmatch "detail") -or ($_ -notmatch "static_assert|integer|mpl|type_traits"))` + -and ` + ($_ -notmatch "mpi")` + -and ` + (($library -notmatch "spirit") -or ($_ -notmatch "serialization"))` + -and ` + (($library -notmatch "throw_exception") -or ($_ -notmatch "^exception"))` + -and ` + (($library -notmatch "iostreams") -or ($_ -notmatch "random"))` + -and ` + (($library -notmatch "utility|concept_check") -or ($_ -notmatch "iterator")) + } | % { $_ -replace "_","-" } | % { + "boost-" + (TransformReference $_) + }) + + $deps += @("boost-vcpkg-helpers") + + $needsBuild = $false + if ((Test-Path $unpacked/build/Jamfile.v2) -and $library -ne "metaparse" -and $library -ne "graph_parallel") + { + $deps += @("boost-build", "boost-modular-build-helper") + $needsBuild = $true + } + + if ($library -eq "python") + { + $deps += @("python3") + $needsBuild = $true + } + elseif ($library -eq "iostreams") + { + $deps += @("zlib", "bzip2", "liblzma", "zstd") + } + elseif ($library -eq "locale") + { + $deps += @("libiconv (!uwp&!windows)", "boost-system") + } + elseif ($library -eq "asio") + { + $deps += @("openssl") + } + elseif ($library -eq "mpi") + { + $deps += @("mpi") + } + + $portName = $library -replace "_","-" + + Generate ` + -Name $library ` + -PortName $portName ` + -Hash $hash ` + -Depends $deps ` + -NeedsBuild $needsBuild + + $libraries_in_boost_port += @(TransformReference $portName) + } + finally + { + popd + } +} + +if ($libraries_in_boost_port.length -gt 1) { + # Generate master boost control file which depends on each individual library + # mpi is excluded due to it having a dependency on msmpi/openmpi + $boostDependsList = @($libraries_in_boost_port | % { "boost-$_" } | ? { $_ -notmatch "boost-mpi" }) -join ", " + + @( + "# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1" + "Source: boost" + "Version: $version" + "Port-Version: $($port_versions.boost)" + "Homepage: https://boost.org" + "Description: Peer-reviewed portable C++ source libraries" + "Build-Depends: $boostDependsList" + "" + "Feature: mpi" + "Description: Build with MPI support" + "Build-Depends: boost-mpi" + ) | out-file -enc ascii $portsDir/boost/CONTROL + + "set(VCPKG_POLICY_EMPTY_PACKAGE enabled)`n" | out-file -enc ascii $portsDir/boost/portfile.cmake +} + +return diff --git a/vcpkg/scripts/boost/post-build-stubs/config.cmake b/vcpkg/scripts/boost/post-build-stubs/config.cmake new file mode 100644 index 0000000..b09ea20 --- /dev/null +++ b/vcpkg/scripts/boost/post-build-stubs/config.cmake @@ -0,0 +1,7 @@ +file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp "\n#ifndef BOOST_ALL_NO_LIB\n#define BOOST_ALL_NO_LIB\n#endif\n") +file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp "\n#undef BOOST_ALL_DYN_LINK\n") + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(APPEND ${CURRENT_PACKAGES_DIR}/include/boost/config/user.hpp "\n#define BOOST_ALL_DYN_LINK\n") +endif() +file(COPY ${SOURCE_PATH}/checks DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-config) diff --git a/vcpkg/scripts/boost/post-build-stubs/context.cmake b/vcpkg/scripts/boost/post-build-stubs/context.cmake new file mode 100644 index 0000000..a88f844 --- /dev/null +++ b/vcpkg/scripts/boost/post-build-stubs/context.cmake @@ -0,0 +1,6 @@ + +# boost-context removed all.hpp, which is used by FindBoost to determine that context is installed +if(NOT EXISTS ${CURRENT_PACKAGES_DIR}/include/boost/context/all.hpp) + file(WRITE ${CURRENT_PACKAGES_DIR}/include/boost/context/all.hpp + "#error \"#include is no longer supported by boost_context.\"") +endif() diff --git a/vcpkg/scripts/boost/post-build-stubs/exception.cmake b/vcpkg/scripts/boost/post-build-stubs/exception.cmake new file mode 100644 index 0000000..43594a0 --- /dev/null +++ b/vcpkg/scripts/boost/post-build-stubs/exception.cmake @@ -0,0 +1,3 @@ + +set(VCPKG_LIBRARY_LINKAGE static) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) diff --git a/vcpkg/scripts/boost/post-build-stubs/predef.cmake b/vcpkg/scripts/boost/post-build-stubs/predef.cmake new file mode 100644 index 0000000..b960fcd --- /dev/null +++ b/vcpkg/scripts/boost/post-build-stubs/predef.cmake @@ -0,0 +1,2 @@ + +file(COPY ${SOURCE_PATH}/tools/check DESTINATION ${CURRENT_PACKAGES_DIR}/share/boost-predef) diff --git a/vcpkg/scripts/boost/post-build-stubs/test.cmake b/vcpkg/scripts/boost/post-build-stubs/test.cmake new file mode 100644 index 0000000..c6d07db --- /dev/null +++ b/vcpkg/scripts/boost/post-build-stubs/test.cmake @@ -0,0 +1,14 @@ +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(GLOB MONITOR_LIBS ${CURRENT_PACKAGES_DIR}/lib/*_exec_monitor*) + file(COPY ${MONITOR_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib/manual-link) + file(REMOVE ${MONITOR_LIBS}) +endif() + +if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(GLOB DEBUG_MONITOR_LIBS ${CURRENT_PACKAGES_DIR}/debug/lib/*_exec_monitor*) + file(COPY ${DEBUG_MONITOR_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link) + file(REMOVE ${DEBUG_MONITOR_LIBS}) +endif() + diff --git a/vcpkg/scripts/boost/post-source-stubs/context.cmake b/vcpkg/scripts/boost/post-source-stubs/context.cmake new file mode 100644 index 0000000..9ccf342 --- /dev/null +++ b/vcpkg/scripts/boost/post-source-stubs/context.cmake @@ -0,0 +1,5 @@ +file(READ "${SOURCE_PATH}/build/Jamfile.v2" _contents) +string(REPLACE "import ../../config/checks/config" "import config/checks/config" _contents "${_contents}") +file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") + diff --git a/vcpkg/scripts/boost/post-source-stubs/fiber.cmake b/vcpkg/scripts/boost/post-source-stubs/fiber.cmake new file mode 100644 index 0000000..9ccf342 --- /dev/null +++ b/vcpkg/scripts/boost/post-source-stubs/fiber.cmake @@ -0,0 +1,5 @@ +file(READ "${SOURCE_PATH}/build/Jamfile.v2" _contents) +string(REPLACE "import ../../config/checks/config" "import config/checks/config" _contents "${_contents}") +file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") + diff --git a/vcpkg/scripts/boost/post-source-stubs/log.cmake b/vcpkg/scripts/boost/post-source-stubs/log.cmake new file mode 100644 index 0000000..78500dd --- /dev/null +++ b/vcpkg/scripts/boost/post-source-stubs/log.cmake @@ -0,0 +1,13 @@ +file(READ "${SOURCE_PATH}/build/Jamfile.v2" _contents) +string(REPLACE "import ../../config/checks/config" "import config/checks/config" _contents "${_contents}") +string(REPLACE " @select-arch-specific-sources" "#@select-arch-specific-sources" _contents "${_contents}") +file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-config/checks" DESTINATION "${SOURCE_PATH}/build/config") + +file(READ ${SOURCE_PATH}/build/log-architecture.jam _contents) +string(REPLACE + "\nproject.load [ path.join [ path.make $(here:D) ] ../../config/checks/architecture ] ;" + "\nproject.load [ path.join [ path.make $(here:D) ] config/checks/architecture ] ;" + _contents "${_contents}") +file(WRITE ${SOURCE_PATH}/build/log-architecture.jam "${_contents}") + diff --git a/vcpkg/scripts/boost/post-source-stubs/test.cmake b/vcpkg/scripts/boost/post-source-stubs/test.cmake new file mode 100644 index 0000000..b287233 --- /dev/null +++ b/vcpkg/scripts/boost/post-source-stubs/test.cmake @@ -0,0 +1,5 @@ +file(READ "${SOURCE_PATH}/build/Jamfile.v2" _contents) +string(REPLACE "import ../../predef/check/predef" "import predef/check/predef" _contents "${_contents}") +file(WRITE "${SOURCE_PATH}/build/Jamfile.v2" "${_contents}") +file(COPY "${CURRENT_INSTALLED_DIR}/share/boost-predef/check" DESTINATION "${SOURCE_PATH}/build/predef") + diff --git a/vcpkg/scripts/bootstrap.ps1 b/vcpkg/scripts/bootstrap.ps1 new file mode 100644 index 0000000..5e750df --- /dev/null +++ b/vcpkg/scripts/bootstrap.ps1 @@ -0,0 +1,435 @@ +[CmdletBinding()] +param( + $badParam, + [Parameter(Mandatory=$False)][switch]$disableMetrics = $false, + [Parameter(Mandatory=$False)][switch]$win64 = $false, + [Parameter(Mandatory=$False)][string]$withVSPath = "", + [Parameter(Mandatory=$False)][string]$withWinSDK = "" +) +Set-StrictMode -Version Latest +# Powershell2-compatible way of forcing named-parameters +if ($badParam) +{ + if ($disableMetrics -and $badParam -eq "1") + { + Write-Warning "'disableMetrics 1' is deprecated, please change to 'disableMetrics' (without '1')" + } + else + { + throw "Only named parameters are allowed" + } +} + +$scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition +$withVSPath = $withVSPath -replace "\\$" # Remove potential trailing backslash + +function vcpkgHasProperty([Parameter(Mandatory=$true)][AllowNull()]$object, [Parameter(Mandatory=$true)]$propertyName) +{ + if ($null -eq $object) + { + return $false + } + + return [bool]($object.psobject.Properties | Where-Object { $_.Name -eq "$propertyName"}) +} + +function getProgramFiles32bit() +{ + $out = ${env:PROGRAMFILES(X86)} + if ($null -eq $out) + { + $out = ${env:PROGRAMFILES} + } + + if ($null -eq $out) + { + throw "Could not find [Program Files 32-bit]" + } + + return $out +} + +$vcpkgRootDir = $scriptsDir +while (!($vcpkgRootDir -eq "") -and !(Test-Path "$vcpkgRootDir\.vcpkg-root")) +{ + Write-Verbose "Examining $vcpkgRootDir for .vcpkg-root" + $vcpkgRootDir = Split-path $vcpkgRootDir -Parent +} +Write-Verbose "Examining $vcpkgRootDir for .vcpkg-root - Found" + +$vcpkgBootstrapPath = "$vcpkgRootDir\toolsrc\windows-bootstrap" + +if (-not (Test-Path $vcpkgBootstrapPath)) +{ + Write-Error "Unable to determine vcpkg build directory. '$vcpkgBootstrapPath' does not exist." + throw +} + +function getVisualStudioInstances() +{ + $programFiles = getProgramFiles32bit + $results = New-Object System.Collections.ArrayList + $vswhereExe = "$programFiles\Microsoft Visual Studio\Installer\vswhere.exe" + if (Test-Path $vswhereExe) + { + $output = & $vswhereExe -prerelease -legacy -products * -format xml + [xml]$asXml = $output + + foreach ($instance in $asXml.instances.instance) + { + $installationPath = $instance.InstallationPath -replace "\\$" # Remove potential trailing backslash + $installationVersion = $instance.InstallationVersion + + $isPrerelease = -7 + if (vcpkgHasProperty -object $instance -propertyName "isPrerelease") + { + $isPrerelease = $instance.isPrerelease + } + + if ($isPrerelease -eq 0) + { + $releaseType = "PreferenceWeight3::StableRelease" + } + elseif ($isPrerelease -eq 1) + { + $releaseType = "PreferenceWeight2::PreRelease" + } + else + { + $releaseType = "PreferenceWeight1::Legacy" + } + + # Placed like that for easy sorting according to preference + $results.Add("${releaseType}::${installationVersion}::${installationPath}") > $null + } + } + else + { + Write-Verbose "Could not locate vswhere at $vswhereExe" + } + + if ("$env:vs140comntools" -ne "") + { + $installationPath = Split-Path -Parent $(Split-Path -Parent "$env:vs140comntools") + $clExe = "$installationPath\VC\bin\cl.exe" + $vcvarsallbat = "$installationPath\VC\vcvarsall.bat" + + if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) + { + $results.Add("PreferenceWeight1::Legacy::14.0::$installationPath") > $null + } + } + + $installationPath = "$programFiles\Microsoft Visual Studio 14.0" + $clExe = "$installationPath\VC\bin\cl.exe" + $vcvarsallbat = "$installationPath\VC\vcvarsall.bat" + + if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) + { + $results.Add("PreferenceWeight1::Legacy::14.0::$installationPath") > $null + } + + $results.Sort() + $results.Reverse() + + return $results +} + +function findAnyMSBuildWithCppPlatformToolset([string]$withVSPath) +{ + $VisualStudioInstances = getVisualStudioInstances + if ($null -eq $VisualStudioInstances) + { + throw "Could not find Visual Studio. VS2015, VS2017, or VS2019 (with C++) needs to be installed." + } + + Write-Verbose "VS Candidates:`n`r$([system.String]::Join([Environment]::NewLine, $VisualStudioInstances))" + foreach ($instanceCandidate in $VisualStudioInstances) + { + Write-Verbose "Inspecting: $instanceCandidate" + $split = $instanceCandidate -split "::" + # $preferenceWeight = $split[0] + # $releaseType = $split[1] + $version = $split[2] + $path = $split[3] + + if ($withVSPath -ne "" -and $withVSPath -ne $path) + { + Write-Verbose "Skipping: $instanceCandidate" + continue + } + + $majorVersion = $version.Substring(0,2); + if ($majorVersion -eq "16") + { + $VCFolder= "$path\VC\Tools\MSVC\" + if (Test-Path $VCFolder) + { + Write-Verbose "Picking: $instanceCandidate" + return "$path\MSBuild\Current\Bin\MSBuild.exe", "v142" + } + } + + if ($majorVersion -eq "15") + { + $VCFolder= "$path\VC\Tools\MSVC\" + if (Test-Path $VCFolder) + { + Write-Verbose "Picking: $instanceCandidate" + return "$path\MSBuild\15.0\Bin\MSBuild.exe", "v141" + } + } + + if ($majorVersion -eq "14") + { + $clExe= "$path\VC\bin\cl.exe" + if (Test-Path $clExe) + { + Write-Verbose "Picking: $instanceCandidate" + $programFilesPath = getProgramFiles32bit + return "$programFilesPath\MSBuild\14.0\Bin\MSBuild.exe", "v140" + } + } + } + + throw "Could not find MSBuild version with C++ support. VS2015, VS2017, or VS2019 (with C++) needs to be installed." +} +function getWindowsSDK( [Parameter(Mandatory=$False)][switch]$DisableWin10SDK = $False, + [Parameter(Mandatory=$False)][switch]$DisableWin81SDK = $False, + [Parameter(Mandatory=$False)][string]$withWinSDK) +{ + if ($DisableWin10SDK -and $DisableWin81SDK) + { + throw "Both Win10SDK and Win81SDK were disabled." + } + + Write-Verbose "Finding WinSDK" + + $validInstances = New-Object System.Collections.ArrayList + + # Windows 10 SDK + function CheckWindows10SDK($path) + { + if ($null -eq $path) + { + return + } + + $folder = (Join-Path $path "Include") + if (!(Test-Path $folder)) + { + Write-Verbose "$folder - Not Found" + return + } + + Write-Verbose "$folder - Found" + $win10sdkVersions = @(Get-ChildItem $folder | Where-Object {$_.Name -match "^10"} | Sort-Object) + [array]::Reverse($win10sdkVersions) # Newest SDK first + + foreach ($win10sdk in $win10sdkVersions) + { + $win10sdkV = $win10sdk.Name + $windowsheader = "$folder\$win10sdkV\um\windows.h" + if (!(Test-Path $windowsheader)) + { + Write-Verbose "$windowsheader - Not Found" + continue + } + Write-Verbose "$windowsheader - Found" + + $ddkheader = "$folder\$win10sdkV\shared\sdkddkver.h" + if (!(Test-Path $ddkheader)) + { + Write-Verbose "$ddkheader - Not Found" + continue + } + + Write-Verbose "$ddkheader - Found" + $win10sdkVersionString = $win10sdkV.ToString() + Write-Verbose "Found $win10sdkVersionString" + $validInstances.Add($win10sdkVersionString) > $null + } + } + + Write-Verbose "`n" + Write-Verbose "Looking for Windows 10 SDK" + $regkey10 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot10' -ErrorAction SilentlyContinue + $regkey10Wow6432 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot10' -ErrorAction SilentlyContinue + if (vcpkgHasProperty -object $regkey10 "KitsRoot10") { CheckWindows10SDK($regkey10.KitsRoot10) } + if (vcpkgHasProperty -object $regkey10Wow6432 "KitsRoot10") { CheckWindows10SDK($regkey10Wow6432.KitsRoot10) } + CheckWindows10SDK("$env:ProgramFiles\Windows Kits\10") + CheckWindows10SDK("${env:ProgramFiles(x86)}\Windows Kits\10") + + # Windows 8.1 SDK + function CheckWindows81SDK($path) + { + if ($null -eq $path) + { + return + } + + $folder = "$path\Include" + if (!(Test-Path $folder)) + { + Write-Verbose "$folder - Not Found" + return + } + + Write-Verbose "$folder - Found" + $win81sdkVersionString = "8.1" + Write-Verbose "Found $win81sdkVersionString" + $validInstances.Add($win81sdkVersionString) > $null + } + + Write-Verbose "`n" + Write-Verbose "Looking for Windows 8.1 SDK" + $regkey81 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot81' -ErrorAction SilentlyContinue + $regkey81Wow6432 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot81' -ErrorAction SilentlyContinue + if (vcpkgHasProperty -object $regkey81 "KitsRoot81") { CheckWindows81SDK($regkey81.KitsRoot81) } + if (vcpkgHasProperty -object $regkey81Wow6432 "KitsRoot81") { CheckWindows81SDK($regkey81Wow6432.KitsRoot81) } + CheckWindows81SDK("$env:ProgramFiles\Windows Kits\8.1") + CheckWindows81SDK("${env:ProgramFiles(x86)}\Windows Kits\8.1") + + Write-Verbose "`n`n`n" + Write-Verbose "The following Windows SDKs were found:" + foreach ($instance in $validInstances) + { + Write-Verbose $instance + } + + # Selecting + if ($withWinSDK -ne "") + { + foreach ($instance in $validInstances) + { + if ($instance -eq $withWinSDK) + { + return $instance + } + } + + throw "Could not find the requested Windows SDK version: $withWinSDK" + } + + foreach ($instance in $validInstances) + { + if (!$DisableWin10SDK -and $instance -match "10.") + { + return $instance + } + + if (!$DisableWin81SDK -and $instance -match "8.1") + { + return $instance + } + } + + throw "Could not detect a Windows SDK / TargetPlatformVersion" +} + +$msbuildExeWithPlatformToolset = findAnyMSBuildWithCppPlatformToolset $withVSPath +$msbuildExe = $msbuildExeWithPlatformToolset[0] +$platformToolset = $msbuildExeWithPlatformToolset[1] +$windowsSDK = getWindowsSDK -withWinSDK $withWinSDK + +$disableMetricsValue = "0" +if ($disableMetrics) +{ + $disableMetricsValue = "1" +} + +$platform = "x86" +$vcpkgReleaseDir = "$vcpkgBootstrapPath\msbuild.x86.release" +if($PSVersionTable.PSVersion.Major -le 2) +{ + $architecture=(Get-WmiObject win32_operatingsystem | Select-Object osarchitecture).osarchitecture +} +else +{ + $architecture=(Get-CimInstance win32_operatingsystem | Select-Object osarchitecture).osarchitecture +} +if ($win64) +{ + if (-not $architecture -like "*64*") + { + throw "Cannot build 64-bit on non-64-bit system" + } + + $platform = "x64" + $vcpkgReleaseDir = "$vcpkgBootstrapPath\msbuild.x64.release" +} + +if ($architecture -like "*64*") +{ + $PreferredToolArchitecture = "x64" +} +else +{ + $PreferredToolArchitecture = "x86" +} + +$arguments = ( +"`"/p:VCPKG_VERSION=-nohash`"", +"`"/p:DISABLE_METRICS=$disableMetricsValue`"", +"/p:Configuration=Release", +"/p:Platform=$platform", +"/p:PlatformToolset=$platformToolset", +"/p:TargetPlatformVersion=$windowsSDK", +"/p:PreferredToolArchitecture=$PreferredToolArchitecture", +"/verbosity:minimal", +"/m", +"/nologo", +"`"$vcpkgBootstrapPath\vcpkg.vcxproj`"") -join " " + +function vcpkgInvokeCommandClean() +{ + param ( [Parameter(Mandatory=$true)][string]$executable, + [string]$arguments = "") + + Write-Verbose "Clean-Executing: ${executable} ${arguments}" + $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition + $cleanEnvScript = "$scriptsDir\cleanEnvironmentHelper.ps1" + $tripleQuotes = "`"`"`"" + $argumentsWithEscapedQuotes = $arguments -replace "`"", $tripleQuotes + $command = ". $tripleQuotes$cleanEnvScript$tripleQuotes; & $tripleQuotes$executable$tripleQuotes $argumentsWithEscapedQuotes" + $arg = "-NoProfile", "-ExecutionPolicy Bypass", "-command $command" + + $process = Start-Process -FilePath powershell.exe -ArgumentList $arg -PassThru -NoNewWindow + Wait-Process -InputObject $process + $ec = $process.ExitCode + Write-Verbose "Execution terminated with exit code $ec." + return $ec +} + +# vcpkgInvokeCommandClean cmd "/c echo %PATH%" +Write-Host "`nBuilding vcpkg.exe ...`n" +$ec = vcpkgInvokeCommandClean $msbuildExe $arguments + +if ($ec -ne 0) +{ + Write-Error "Building vcpkg.exe failed. Please ensure you have installed Visual Studio with the Desktop C++ workload and the Windows SDK for Desktop C++." + throw +} + +Write-Host "`nBuilding vcpkg.exe... done.`n" + +if (-not $disableMetrics) +{ + Write-Host @" +Telemetry +--------- +vcpkg collects usage data in order to help us improve your experience. +The data collected by Microsoft is anonymous. +You can opt-out of telemetry by re-running the bootstrap-vcpkg script with -disableMetrics, +passing --disable-metrics to vcpkg on the command line, +or by setting the VCPKG_DISABLE_METRICS environment variable. + +Read more about vcpkg telemetry at docs/about/privacy.md +"@ +} + +Write-Verbose "Placing vcpkg.exe in the correct location" + +Copy-Item "$vcpkgReleaseDir\vcpkg.exe" "$vcpkgRootDir\vcpkg.exe" + +Remove-Item "$vcpkgReleaseDir" -Force -Recurse -ErrorAction SilentlyContinue diff --git a/vcpkg/scripts/bootstrap.sh b/vcpkg/scripts/bootstrap.sh new file mode 100644 index 0000000..969d1aa --- /dev/null +++ b/vcpkg/scripts/bootstrap.sh @@ -0,0 +1,290 @@ +#!/bin/sh + +# Find .vcpkg-root, which indicates the root of this repo +vcpkgRootDir=$(X= cd -- "$(dirname -- "$0")" && pwd -P) +while [ "$vcpkgRootDir" != "/" ] && ! [ -e "$vcpkgRootDir/.vcpkg-root" ]; do + vcpkgRootDir="$(dirname "$vcpkgRootDir")" +done + +# Argument parsing +vcpkgDisableMetrics="OFF" +vcpkgUseSystem=false +vcpkgAllowAppleClang=false +vcpkgBuildTests="OFF" +for var in "$@" +do + if [ "$var" = "-disableMetrics" -o "$var" = "--disableMetrics" ]; then + vcpkgDisableMetrics="ON" + elif [ "$var" = "-useSystemBinaries" -o "$var" = "--useSystemBinaries" ]; then + vcpkgUseSystem=true + elif [ "$var" = "-allowAppleClang" -o "$var" = "--allowAppleClang" ]; then + vcpkgAllowAppleClang=true + elif [ "$var" = "-buildTests" ]; then + vcpkgBuildTests="ON" + elif [ "$var" = "-help" -o "$var" = "--help" ]; then + echo "Usage: ./bootstrap-vcpkg.sh [options]" + echo + echo "Options:" + echo " -help Display usage help" + echo " -disableMetrics Do not build metrics reporting into the executable" + echo " -useSystemBinaries Force use of the system utilities for building vcpkg" + echo " -allowAppleClang Set VCPKG_ALLOW_APPLE_CLANG to build vcpkg in apple with clang anyway" + exit 1 + else + echo "Unknown argument $var. Use '-help' for help." + exit 1 + fi +done + +# Enable using this entry point on windows from git bash by redirecting to the .bat file. +unixName=$(uname -s | sed 's/MINGW.*_NT.*/MINGW_NT/') +if [ "$unixName" = "MINGW_NT" ]; then + if [ "$vcpkgDisableMetrics" = "ON" ]; then + args="-disableMetrics" + else + args="" + fi + + vcpkgRootDir=$(cygpath -aw "$vcpkgRootDir") + cmd "/C $vcpkgRootDir\\bootstrap-vcpkg.bat $args" || exit 1 + exit 0 +fi + +if [ -z ${VCPKG_DOWNLOADS+x} ]; then + downloadsDir="$vcpkgRootDir/downloads" +else + downloadsDir="$VCPKG_DOWNLOADS" + if [ ! -d "$VCPKG_DOWNLOADS" ]; then + echo "VCPKG_DOWNLOADS was set to '$VCPKG_DOWNLOADS', but that was not a directory." + exit 1 + fi + +fi + +extractStringBetweenDelimiters() +{ + input=$1;leftDelim=$2;rightDelim=$3 + output="${input##*$leftDelim}" + output="${output%%$rightDelim*}" + echo "$output" +} + +vcpkgCheckRepoTool() +{ + __tool=$1 + if ! command -v "$__tool" >/dev/null 2>&1 ; then + echo "Could not find $__tool. Please install it (and other dependencies) with:" + echo "sudo apt-get install curl unzip tar" + exit 1 + fi +} + +vcpkgCheckBuildTool() +{ + __tool=$1 + if ! command -v "$__tool" >/dev/null 2>&1 ; then + echo "Could not find $__tool. Please install it (and other dependencies) with:" + echo "sudo apt-get install cmake ninja-build" + exit 1 + fi +} + +vcpkgCheckEqualFileHash() +{ + url=$1; filePath=$2; expectedHash=$3 + + if command -v "sha512sum" >/dev/null 2>&1 ; then + actualHash=$(sha512sum "$filePath") + else + # sha512sum is not available by default on osx + # shasum is not available by default on Fedora + actualHash=$(shasum -a 512 "$filePath") + fi + + actualHash="${actualHash%% *}" # shasum returns [hash filename], so get the first word + + if ! [ "$expectedHash" = "$actualHash" ]; then + echo "" + echo "File does not have expected hash:" + echo " url: [ $url ]" + echo " File path: [ $downloadPath ]" + echo " Expected hash: [ $sha512 ]" + echo " Actual hash: [ $actualHash ]" + exit 1 + fi +} + +vcpkgDownloadFile() +{ + url=$1; downloadPath=$2 sha512=$3 + vcpkgCheckRepoTool "curl" + rm -rf "$downloadPath.part" + curl -L $url --tlsv1.2 --create-dirs --retry 3 --output "$downloadPath.part" || exit 1 + + vcpkgCheckEqualFileHash $url "$downloadPath.part" $sha512 + mv "$downloadPath.part" "$downloadPath" +} + +vcpkgExtractArchive() +{ + archive=$1; toPath=$2 + rm -rf "$toPath" "$toPath.partial" + mkdir -p "$toPath.partial" + + archiveType="${archive##*.}" + if [ "$archiveType" = "zip" ]; then + vcpkgCheckRepoTool "unzip" + $(cd "$toPath.partial" && unzip -qqo "$archive") + else + vcpkgCheckRepoTool "tar" + $(cd "$toPath.partial" && tar xzf "$archive") + fi + mv "$toPath.partial" "$toPath" +} + +fetchTool() +{ + tool=$1; UNAME=$2; __output=$3 + + if [ "$tool" = "" ]; then + echo "No tool name provided" + return 1 + fi + + if [ "$UNAME" = "Linux" ]; then + os="linux" + elif [ "$UNAME" = "Darwin" ]; then + os="osx" + elif [ "$UNAME" = "FreeBSD" ]; then + os="freebsd" + else + echo "Unknown uname: $UNAME" + return 1 + fi + + xmlFileAsString=`cat "$vcpkgRootDir/scripts/vcpkgTools.xml"` + toolRegexStart="" + toolData="$(extractStringBetweenDelimiters "$xmlFileAsString" "$toolRegexStart" "")" + if [ "$toolData" = "" ]; then + echo "Unknown tool: $tool" + return 1 + fi + + version="$(extractStringBetweenDelimiters "$toolData" "" "")" + + toolPath="$downloadsDir/tools/$tool-$version-$os" + + exeRelativePath="$(extractStringBetweenDelimiters "$toolData" "" "")" + exePath="$toolPath/$exeRelativePath" + + if [ -e "$exePath" ]; then + eval $__output="'$exePath'" + return 0 + fi + + isArchive=true + if [ $isArchive = true ]; then + archiveName="$(extractStringBetweenDelimiters "$toolData" "" "")" + downloadPath="$downloadsDir/$archiveName" + else + echo "Non-archives not supported yet" + return 1 + fi + + url="$(extractStringBetweenDelimiters "$toolData" "" "")" + sha512="$(extractStringBetweenDelimiters "$toolData" "" "")" + if ! [ -e "$downloadPath" ]; then + echo "Downloading $tool..." + vcpkgDownloadFile $url "$downloadPath" $sha512 + echo "Downloading $tool... done." + else + vcpkgCheckEqualFileHash $url "$downloadPath" $sha512 + fi + + if [ $isArchive = true ]; then + echo "Extracting $tool..." + vcpkgExtractArchive "$downloadPath" "$toolPath" + echo "Extracting $tool... done." + fi + + if ! [ -e "$exePath" ]; then + echo "Could not detect or download $tool" + return 1 + fi + + eval $__output="'$exePath'" + return 0 +} + +selectCXX() +{ + if [ "x$CXX" = "x" ]; then + if which g++-10 >/dev/null 2>&1; then + CXX=g++-10 + elif which g++-9 >/dev/null 2>&1; then + CXX=g++-9 + elif which g++-8 >/dev/null 2>&1; then + CXX=g++-8 + elif which g++-7 >/dev/null 2>&1; then + CXX=g++-7 + elif which g++-6 >/dev/null 2>&1; then + CXX=g++-6 + elif which g++ >/dev/null 2>&1; then + CXX=g++ + fi + # If we can't find g++, allow CMake to do the look-up + fi +} + +# Preparation +UNAME="$(uname)" +ARCH="$(uname -m)" + +# Force using system utilities for building vcpkg if host arch is arm, arm64, or s390x. +if [ "$ARCH" = "armv7l" -o "$ARCH" = "aarch64" -o "$ARCH" = "s390x" ]; then + vcpkgUseSystem=true +fi + +if $vcpkgUseSystem; then + cmakeExe="cmake" + ninjaExe="ninja" + vcpkgCheckBuildTool "$cmakeExe" + vcpkgCheckBuildTool "$ninjaExe" +else + fetchTool "cmake" "$UNAME" cmakeExe || exit 1 + fetchTool "ninja" "$UNAME" ninjaExe || exit 1 +fi +if [ "$os" = "osx" ]; then + if [ "$vcpkgAllowAppleClang" = "true" ] ; then + CXX=clang++ + else + selectCXX + fi +else + selectCXX +fi + +# Do the build +buildDir="$vcpkgRootDir/toolsrc/build.rel" +rm -rf "$buildDir" +mkdir -p "$buildDir" + +(cd "$buildDir" && CXX="$CXX" "$cmakeExe" .. -DCMAKE_BUILD_TYPE=Release -G "Ninja" "-DCMAKE_MAKE_PROGRAM=$ninjaExe" "-DBUILD_TESTING=$vcpkgBuildTests" "-DVCPKG_DEVELOPMENT_WARNINGS=OFF" "-DVCPKG_DISABLE_METRICS=$vcpkgDisableMetrics" "-DVCPKG_ALLOW_APPLE_CLANG=$vcpkgAllowAppleClang") || exit 1 +(cd "$buildDir" && "$cmakeExe" --build .) || exit 1 + +rm -rf "$vcpkgRootDir/vcpkg" +cp "$buildDir/vcpkg" "$vcpkgRootDir/" + +if ! [ "$vcpkgDisableMetrics" = "ON" ]; then + cat < + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vcpkg/scripts/buildsystems/msbuild/vcpkg.props b/vcpkg/scripts/buildsystems/msbuild/vcpkg.props new file mode 100644 index 0000000..f9db4fc --- /dev/null +++ b/vcpkg/scripts/buildsystems/msbuild/vcpkg.props @@ -0,0 +1,41 @@ + + + true + true + true + false + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), .vcpkg-root)) + $(Configuration) + $(VcpkgRoot)\scripts\buildsystems\msbuild\vcpkg-general.xml + + + + + uwp + + + windows + + + + + x86 + + + $(Platform) + + + + + false + true + $([MSbuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), vcpkg.json)) + + + + + $(VcpkgPlatformTarget)-$(VcpkgOSTarget) + $(VcpkgUserTriplet) + $(VcpkgRoot)\scripts\buildsystems\msbuild\vcpkg-general.xml + + diff --git a/vcpkg/scripts/buildsystems/msbuild/vcpkg.targets b/vcpkg/scripts/buildsystems/msbuild/vcpkg.targets new file mode 100644 index 0000000..a9c3395 --- /dev/null +++ b/vcpkg/scripts/buildsystems/msbuild/vcpkg.targets @@ -0,0 +1,121 @@ + + + + true + true + false + $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), .vcpkg-root)) + $(Configuration) + $(VcpkgRoot)\scripts\buildsystems\msbuild\vcpkg-general.xml + false + true + $([MSbuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), vcpkg.json)) + + + + + uwp + + + windows + + + + + x86 + + + $(Platform) + + + + + $(VcpkgPlatformTarget)-$(VcpkgOSTarget) + $(VcpkgUserTriplet) + $(VcpkgRoot)\installed\$(VcpkgTriplet)\ + + + + + + Project + + + + + + $(VcpkgManifestRoot)\vcpkg_installed\ + + + $(VcpkgRoot)\installed\ + + + + + $(VcpkgUserTriplet)-static + + + + $(VcpkgInstalledDir)$(VcpkgTriplet) + + + + Debug + Release + debug\ + $(VcpkgRoot)\ + $(VcpkgCurrentInstalledDir)\ + $(VcpkgManifestRoot)\ + true + + false + + + + + %(AdditionalDependencies);$(VcpkgCurrentInstalledDir)$(VcpkgConfigSubdir)lib\*.lib + %(AdditionalLibraryDirectories);$(VcpkgCurrentInstalledDir)$(VcpkgConfigSubdir)lib;$(VcpkgCurrentInstalledDir)$(VcpkgConfigSubdir)lib\manual-link + + + %(AdditionalIncludeDirectories);$(VcpkgCurrentInstalledDir)include + + + %(AdditionalIncludeDirectories);$(VcpkgCurrentInstalledDir)include + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vcpkg/scripts/buildsystems/osx/applocal.py b/vcpkg/scripts/buildsystems/osx/applocal.py new file mode 100644 index 0000000..e01223c --- /dev/null +++ b/vcpkg/scripts/buildsystems/osx/applocal.py @@ -0,0 +1,420 @@ +#!/usr/bin/env python2 +# -*- coding: utf-8 -*- +""" +finish the job started by macdeployqtfix +from: https://github.com/arl/macdeployqtfix + +The MIT License (MIT) + +Copyright (c) 2015 Aurelien Rainone + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +""" + +from subprocess import Popen, PIPE +from string import Template +import os +import sys +import logging +import argparse +import re +from collections import namedtuple + + +QTLIB_NAME_REGEX = r'^(?:@executable_path)?/.*/(Qt[a-zA-Z]*).framework/(?:Versions/\d/)?\1$' +QTLIB_NORMALIZED = r'$prefix/Frameworks/$qtlib.framework/Versions/$qtversion/$qtlib' + +QTPLUGIN_NAME_REGEX = r'^(?:@executable_path)?/.*/[pP]lug[iI]ns/(.*)/(.*).dylib$' +QTPLUGIN_NORMALIZED = r'$prefix/PlugIns/$plugintype/$pluginname.dylib' + +LOADERPATH_REGEX = r'^@[a-z_]+path/(.*)' +LOADERPATH_NORMALIZED = r'$prefix/Frameworks/$loaderpathlib' + + +class GlobalConfig(object): + logger = None + qtpath = None + exepath = None + + +def run_and_get_output(popen_args): + """Run process and get all output""" + process_output = namedtuple('ProcessOutput', ['stdout', 'stderr', 'retcode']) + try: + GlobalConfig.logger.debug('run_and_get_output({0})'.format(repr(popen_args))) + + proc = Popen(popen_args, stdin=PIPE, stdout=PIPE, stderr=PIPE) + stdout, stderr = proc.communicate(b'') + proc_out = process_output(stdout, stderr, proc.returncode) + + GlobalConfig.logger.debug('\tprocess_output: {0}'.format(proc_out)) + return proc_out + except Exception as exc: + GlobalConfig.logger.error('\texception: {0}'.format(exc)) + return process_output('', exc.message, -1) + + +def get_dependencies(filename): + """ + input: filename must be an absolute path + Should call `otool` and returns the list of dependencies, unsorted, + unmodified, just the raw list so then we could eventually re-use in other + more specialized functions + """ + GlobalConfig.logger.debug('get_dependencies({0})'.format(filename)) + popen_args = ['otool', '-L', filename] + proc_out = run_and_get_output(popen_args) + deps = [] + if proc_out.retcode == 0: + # some string splitting + deps = [s.strip().split(b' ')[0].decode('utf-8') for s in proc_out.stdout.splitlines()[1:] if s] + # prevent infinite recursion when a binary depends on itself (seen with QtWidgets)... + deps = [s for s in deps if os.path.basename(filename) not in s] + return deps + + +def is_qt_plugin(filename): + """ + Checks if a given file is a qt plugin. + Accepts absolute path as well as path containing @executable_path + """ + qtlib_name_rgx = re.compile(QTPLUGIN_NAME_REGEX) + return qtlib_name_rgx.match(filename) is not None + + +def is_qt_lib(filename): + """ + Checks if a given file is a qt library. + Accepts absolute path as well as path containing @executable_path + """ + qtlib_name_rgx = re.compile(QTLIB_NAME_REGEX) + return qtlib_name_rgx.match(filename) is not None + + +def is_loader_path_lib(filename): + """ + Checks if a given file is loaded via @loader_path or @rpath + """ + qtlib_name_rgx = re.compile(LOADERPATH_REGEX) + return qtlib_name_rgx.match(filename) is not None + + +def normalize_qtplugin_name(filename): + """ + input: a path to a qt plugin, as returned by otool, that can have this form : + - an absolute path /../plugins/PLUGINTYPE/PLUGINNAME.dylib + - @executable_path/../plugins/PLUGINTYPE/PLUGINNAME.dylib + output: + a tuple (qtlib, abspath, rpath) where: + - qtname is the name of the plugin (libqcocoa.dylib, etc.) + - abspath is the absolute path of the qt lib inside the app bundle of exepath + - relpath is the correct rpath to a qt lib inside the app bundle + """ + + GlobalConfig.logger.debug('normalize_plugin_name({0})'.format(filename)) + + qtplugin_name_rgx = re.compile(QTPLUGIN_NAME_REGEX) + rgxret = qtplugin_name_rgx.match(filename) + if not rgxret: + msg = 'couldn\'t normalize a non-qt plugin filename: {0}'.format(filename) + GlobalConfig.logger.critical(msg) + raise Exception(msg) + + # qtplugin normalization settings + qtplugintype = rgxret.groups()[0] + qtpluginname = rgxret.groups()[1] + + templ = Template(QTPLUGIN_NORMALIZED) + + # from qtlib, forge 2 path : + # - absolute path of qt lib in bundle, + abspath = os.path.normpath(templ.safe_substitute( + prefix=os.path.dirname(GlobalConfig.exepath) + '/..', + plugintype=qtplugintype, + pluginname=qtpluginname)) + + # - and rpath containing @executable_path, relative to exepath + rpath = templ.safe_substitute( + prefix='@executable_path/..', + plugintype=qtplugintype, + pluginname=qtpluginname) + + GlobalConfig.logger.debug('\treturns({0})'.format((qtpluginname, abspath, rpath))) + return qtpluginname, abspath, rpath + + +def normalize_qtlib_name(filename): + """ + input: a path to a qt library, as returned by otool, that can have this form : + - an absolute path /lib/xxx/yyy + - @executable_path/../Frameworks/QtSerialPort.framework/Versions/5/QtSerialPort + output: + a tuple (qtlib, abspath, rpath) where: + - qtlib is the name of the qtlib (QtCore, QtWidgets, etc.) + - abspath is the absolute path of the qt lib inside the app bundle of exepath + - relpath is the correct rpath to a qt lib inside the app bundle + """ + GlobalConfig.logger.debug('normalize_qtlib_name({0})'.format(filename)) + + qtlib_name_rgx = re.compile(QTLIB_NAME_REGEX) + rgxret = qtlib_name_rgx.match(filename) + if not rgxret: + msg = 'couldn\'t normalize a non-qt lib filename: {0}'.format(filename) + GlobalConfig.logger.critical(msg) + raise Exception(msg) + + # qtlib normalization settings + qtlib = rgxret.groups()[0] + qtversion = 5 + + templ = Template(QTLIB_NORMALIZED) + + # from qtlib, forge 2 path : + # - absolute path of qt lib in bundle, + abspath = os.path.normpath(templ.safe_substitute( + prefix=os.path.dirname(GlobalConfig.exepath) + '/..', + qtlib=qtlib, + qtversion=qtversion)) + + # - and rpath containing @executable_path, relative to exepath + rpath = templ.safe_substitute( + prefix='@executable_path/..', + qtlib=qtlib, + qtversion=qtversion) + + GlobalConfig.logger.debug('\treturns({0})'.format((qtlib, abspath, rpath))) + return qtlib, abspath, rpath + + +def normalize_loaderpath_name(filename): + """ + input: a path to a loaderpath library, as returned by otool, that can have this form : + - an relative path @loaderpath/yyy + output: + a tuple (loaderpathlib, abspath, rpath) where: + - loaderpathlib is the name of the loaderpath lib + - abspath is the absolute path of the qt lib inside the app bundle of exepath + - relpath is the correct rpath to a qt lib inside the app bundle + """ + GlobalConfig.logger.debug('normalize_loaderpath_name({0})'.format(filename)) + + loaderpath_name_rgx = re.compile(LOADERPATH_REGEX) + rgxret = loaderpath_name_rgx.match(filename) + if not rgxret: + msg = 'couldn\'t normalize a loaderpath lib filename: {0}'.format(filename) + GlobalConfig.logger.critical(msg) + raise Exception(msg) + + # loaderpath normalization settings + loaderpathlib = rgxret.groups()[0] + templ = Template(LOADERPATH_NORMALIZED) + + # from loaderpath, forge 2 path : + # - absolute path of qt lib in bundle, + abspath = os.path.normpath(templ.safe_substitute( + prefix=os.path.dirname(GlobalConfig.exepath) + '/..', + loaderpathlib=loaderpathlib)) + + # - and rpath containing @executable_path, relative to exepath + rpath = templ.safe_substitute( + prefix='@executable_path/..', + loaderpathlib=loaderpathlib) + + GlobalConfig.logger.debug('\treturns({0})'.format((loaderpathlib, abspath, rpath))) + return loaderpathlib, abspath, rpath + + +def fix_dependency(binary, dep): + """ + fix 'dep' dependency of 'binary'. 'dep' is a qt library + """ + if is_qt_lib(dep): + qtname, dep_abspath, dep_rpath = normalize_qtlib_name(dep) + qtnamesrc = os.path.join(GlobalConfig.qtpath, 'lib', '{0}.framework'. + format(qtname), qtname) + elif is_qt_plugin(dep): + qtname, dep_abspath, dep_rpath = normalize_qtplugin_name(dep) + qtnamesrc = os.path.join(GlobalConfig.qtpath, 'lib', '{0}.framework'. + format(qtname), qtname) + elif is_loader_path_lib(dep): + qtname, dep_abspath, dep_rpath = normalize_loaderpath_name(dep) + qtnamesrc = os.path.join(GlobalConfig.qtpath + '/lib', qtname) + else: + return True + + dep_ok = True + # check that rpath of 'dep' inside binary has been correctly set + # (ie: relative to exepath using '@executable_path' syntax) + if dep != dep_rpath: + # dep rpath is not ok + GlobalConfig.logger.info('changing rpath \'{0}\' in binary {1}'.format(dep, binary)) + + # call install_name_tool -change on binary + popen_args = ['install_name_tool', '-change', dep, dep_rpath, binary] + proc_out = run_and_get_output(popen_args) + if proc_out.retcode != 0: + GlobalConfig.logger.error(proc_out.stderr) + dep_ok = False + else: + # call install_name_tool -id on binary + popen_args = ['install_name_tool', '-id', dep_rpath, binary] + proc_out = run_and_get_output(popen_args) + if proc_out.retcode != 0: + GlobalConfig.logger.error(proc_out.stderr) + dep_ok = False + + # now ensure that 'dep' exists at the specified path, relative to bundle + if dep_ok and not os.path.exists(dep_abspath): + + # ensure destination directory exists + GlobalConfig.logger.info('ensuring directory \'{0}\' exists: {0}'. + format(os.path.dirname(dep_abspath))) + popen_args = ['mkdir', '-p', os.path.dirname(dep_abspath)] + proc_out = run_and_get_output(popen_args) + if proc_out.retcode != 0: + GlobalConfig.logger.info(proc_out.stderr) + dep_ok = False + else: + # copy missing dependency into bundle + GlobalConfig.logger.info('copying missing dependency in bundle: {0}'. + format(qtname)) + popen_args = ['cp', qtnamesrc, dep_abspath] + proc_out = run_and_get_output(popen_args) + if proc_out.retcode != 0: + GlobalConfig.logger.info(proc_out.stderr) + dep_ok = False + else: + # ensure permissions are correct if we ever have to change its rpath + GlobalConfig.logger.info('ensuring 755 perm to {0}'.format(dep_abspath)) + popen_args = ['chmod', '755', dep_abspath] + proc_out = run_and_get_output(popen_args) + if proc_out.retcode != 0: + GlobalConfig.logger.info(proc_out.stderr) + dep_ok = False + else: + GlobalConfig.logger.debug('{0} is at correct location in bundle'.format(qtname)) + + if dep_ok: + return fix_binary(dep_abspath) + return False + + +def fix_binary(binary): + """ + input: + binary: relative or absolute path (no @executable_path syntax) + process: + - first fix the rpath for the qt libs on which 'binary' depend + - copy into the bundle of exepath the eventual libraries that are missing + - (create the soft links) needed ? + - do the same for all qt dependencies of binary (recursive) + """ + GlobalConfig.logger.debug('fix_binary({0})'.format(binary)) + + # loop on 'binary' dependencies + for dep in get_dependencies(binary): + if not fix_dependency(binary, dep): + GlobalConfig.logger.error('quitting early: couldn\'t fix dependency {0} of {1}'.format(dep, binary)) + return False + return True + + +def fix_main_binaries(): + """ + list the main binaries of the app bundle and fix them + """ + # deduce bundle path + bundlepath = os.path.sep.join(GlobalConfig.exepath.split(os.path.sep)[0:-3]) + + # fix main binary + GlobalConfig.logger.info('fixing executable \'{0}\''.format(GlobalConfig.exepath)) + if fix_binary(GlobalConfig.exepath): + GlobalConfig.logger.info('fixing plugins') + for root, dummy, files in os.walk(bundlepath): + for name in [f for f in files if os.path.splitext(f)[1] == '.dylib']: + GlobalConfig.logger.info('fixing plugin {0}'.format(name)) + if not fix_binary(os.path.join(root, name)): + return False + return True + + +def main(): + descr = """finish the job started by macdeployqt! + - find dependencies/rpaths with otool + - copy missed dependencies with cp and mkdir + - fix missed rpaths with install_name_tool + + exit codes: + - 0 : success + - 1 : error + """ + + parser = argparse.ArgumentParser(description=descr, + formatter_class=argparse.RawTextHelpFormatter) + parser.add_argument('exepath', + help='path to the binary depending on Qt') + parser.add_argument('qtpath', + help='path of Qt libraries used to build the Qt application') + parser.add_argument('-q', '--quiet', action='store_true', default=False, + help='do not create log on standard output') + parser.add_argument('-nl', '--no-log-file', action='store_true', default=False, + help='do not create log file \'./macdeployqtfix.log\'') + parser.add_argument('-v', '--verbose', action='store_true', default=False, + help='produce more log messages(debug log)') + args = parser.parse_args() + + # globals + GlobalConfig.qtpath = os.path.normpath(args.qtpath) + GlobalConfig.exepath = args.exepath + GlobalConfig.logger = logging.getLogger() + + # configure logging + ################### + + # create formatter + formatter = logging.Formatter('%(levelname)s | %(message)s') + # create console GlobalConfig.logger + if not args.quiet: + chdlr = logging.StreamHandler(sys.stdout) + chdlr.setFormatter(formatter) + GlobalConfig.logger.addHandler(chdlr) + + # create file GlobalConfig.logger + if not args.no_log_file: + fhdlr = logging.FileHandler('./macdeployqtfix.log', mode='w') + fhdlr.setFormatter(formatter) + GlobalConfig.logger.addHandler(fhdlr) + + if args.no_log_file and args.quiet: + GlobalConfig.logger.addHandler(logging.NullHandler()) + else: + GlobalConfig.logger.setLevel(logging.DEBUG if args.verbose else logging.INFO) + + if fix_main_binaries(): + GlobalConfig.logger.info('macdeployqtfix terminated with success') + ret = 0 + else: + GlobalConfig.logger.error('macdeployqtfix terminated with error') + ret = 1 + sys.exit(ret) + + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/vcpkg/scripts/buildsystems/vcpkg.cmake b/vcpkg/scripts/buildsystems/vcpkg.cmake new file mode 100644 index 0000000..1b5bbb6 --- /dev/null +++ b/vcpkg/scripts/buildsystems/vcpkg.cmake @@ -0,0 +1,531 @@ +# Mark variables as used so cmake doesn't complain about them +mark_as_advanced(CMAKE_TOOLCHAIN_FILE) + +# VCPKG toolchain options. +option(VCPKG_VERBOSE "Enables messages from the VCPKG toolchain for debugging purposes." OFF) +mark_as_advanced(VCPKG_VERBOSE) + +include(CMakeDependentOption) + +function(_vcpkg_get_directory_name_of_file_above OUT DIRECTORY FILENAME) + set(_vcpkg_get_dir_candidate ${DIRECTORY}) + while(IS_DIRECTORY ${_vcpkg_get_dir_candidate} AND NOT DEFINED _vcpkg_get_dir_out) + if(EXISTS ${_vcpkg_get_dir_candidate}/${FILENAME}) + set(_vcpkg_get_dir_out ${_vcpkg_get_dir_candidate}) + else() + get_filename_component(_vcpkg_get_dir_candidate_tmp ${_vcpkg_get_dir_candidate} DIRECTORY) + if(_vcpkg_get_dir_candidate STREQUAL _vcpkg_get_dir_candidate_tmp) # we've reached the root + set(_vcpkg_get_dir_out "${OUT}-NOTFOUND") + else() + set(_vcpkg_get_dir_candidate ${_vcpkg_get_dir_candidate_tmp}) + endif() + endif() + endwhile() + + set(${OUT} ${_vcpkg_get_dir_out} CACHE INTERNAL "_vcpkg_get_directory_name_of_file_above: ${OUT}") +endfunction() + +if(NOT DEFINED VCPKG_MANIFEST_DIR) + if(EXISTS "${CMAKE_SOURCE_DIR}/vcpkg.json") + set(_VCPKG_MANIFEST_DIR "${CMAKE_SOURCE_DIR}") + endif() +else() + set(_VCPKG_MANIFEST_DIR ${VCPKG_MANIFEST_DIR}) +endif() +if(NOT DEFINED VCPKG_MANIFEST_MODE) + if(_VCPKG_MANIFEST_DIR) + set(VCPKG_MANIFEST_MODE ON) + else() + set(VCPKG_MANIFEST_MODE OFF) + endif() +elseif(VCPKG_MANIFEST_MODE AND NOT _VCPKG_MANIFEST_DIR) + message(FATAL_ERROR + "vcpkg manifest mode was enabled, but we couldn't find a manifest file (vcpkg.json) " + "in any directories above ${CMAKE_CURRENT_SOURCE_DIR}. Please add a manifest, or " + "disable manifests by turning off VCPKG_MANIFEST_MODE.") +endif() + +if(NOT DEFINED _INTERNAL_CHECK_VCPKG_MANIFEST_MODE) + set(_INTERNAL_CHECK_VCPKG_MANIFEST_MODE "${VCPKG_MANIFEST_MODE}" + CACHE INTERNAL "Making sure VCPKG_MANIFEST_MODE doesn't change") +endif() + +if(NOT VCPKG_MANIFEST_MODE STREQUAL _INTERNAL_CHECK_VCPKG_MANIFEST_MODE) + message(FATAL_ERROR [[ +vcpkg manifest mode was enabled for a build directory where it was initially disabled. +This is not supported. Please delete the build directory and reconfigure. +]]) +endif() + +CMAKE_DEPENDENT_OPTION(VCPKG_MANIFEST_INSTALL [[ +Install the dependencies listed in your manifest: + If this is off, you will have to manually install your dependencies. + See https://github.com/microsoft/vcpkg/tree/master/docs/specifications/manifests.md for more info. +]] + ON + "VCPKG_MANIFEST_MODE" + OFF) + +# Determine whether the toolchain is loaded during a try-compile configuration +get_property(_CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE) + +if (${CMAKE_VERSION} VERSION_LESS "3.6.0") + set(_CMAKE_EMULATE_TRY_COMPILE_PLATFORM_VARIABLES ON) +else() + set(_CMAKE_EMULATE_TRY_COMPILE_PLATFORM_VARIABLES OFF) +endif() + +if(_CMAKE_IN_TRY_COMPILE AND _CMAKE_EMULATE_TRY_COMPILE_PLATFORM_VARIABLES) + include("${CMAKE_CURRENT_SOURCE_DIR}/../vcpkg.config.cmake" OPTIONAL) +endif() + +if(VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + include("${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") +endif() + +if(VCPKG_TOOLCHAIN) + return() +endif() + +#If CMake does not have a mapping for MinSizeRel and RelWithDebInfo in imported targets +#it will map those configuration to the first valid configuration in CMAKE_CONFIGURATION_TYPES or the targets IMPORTED_CONFIGURATIONS. +#In most cases this is the debug configuration which is wrong. +if(NOT DEFINED CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL) + set(CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL "MinSizeRel;Release;") + if(VCPKG_VERBOSE) + message(STATUS "VCPKG-Info: CMAKE_MAP_IMPORTED_CONFIG_MINSIZEREL set to MinSizeRel;Release;") + endif() +endif() +if(NOT DEFINED CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO) + set(CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO "RelWithDebInfo;Release;") + if(VCPKG_VERBOSE) + message(STATUS "VCPKG-Info: CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO set to RelWithDebInfo;Release;") + endif() +endif() + +if(VCPKG_TARGET_TRIPLET) +elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Ww][Ii][Nn]32$") + set(_VCPKG_TARGET_TRIPLET_ARCH x86) +elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Xx]64$") + set(_VCPKG_TARGET_TRIPLET_ARCH x64) +elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]$") + set(_VCPKG_TARGET_TRIPLET_ARCH arm) +elseif(CMAKE_GENERATOR_PLATFORM MATCHES "^[Aa][Rr][Mm]64$") + set(_VCPKG_TARGET_TRIPLET_ARCH arm64) +else() + if(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 Win64$") + set(_VCPKG_TARGET_TRIPLET_ARCH x64) + elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015 ARM$") + set(_VCPKG_TARGET_TRIPLET_ARCH arm) + elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 14 2015$") + set(_VCPKG_TARGET_TRIPLET_ARCH x86) + elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 Win64$") + set(_VCPKG_TARGET_TRIPLET_ARCH x64) + elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017 ARM$") + set(_VCPKG_TARGET_TRIPLET_ARCH arm) + elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 15 2017$") + set(_VCPKG_TARGET_TRIPLET_ARCH x86) + elseif(CMAKE_GENERATOR MATCHES "^Visual Studio 16 2019$") + set(_VCPKG_TARGET_TRIPLET_ARCH x64) + else() + find_program(_VCPKG_CL cl) + if(_VCPKG_CL MATCHES "amd64/cl.exe$" OR _VCPKG_CL MATCHES "x64/cl.exe$") + set(_VCPKG_TARGET_TRIPLET_ARCH x64) + elseif(_VCPKG_CL MATCHES "arm/cl.exe$") + set(_VCPKG_TARGET_TRIPLET_ARCH arm) + elseif(_VCPKG_CL MATCHES "arm64/cl.exe$") + set(_VCPKG_TARGET_TRIPLET_ARCH arm64) + elseif(_VCPKG_CL MATCHES "bin/cl.exe$" OR _VCPKG_CL MATCHES "x86/cl.exe$") + set(_VCPKG_TARGET_TRIPLET_ARCH x86) + elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin" AND DEFINED CMAKE_SYSTEM_NAME AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin") + list(LENGTH CMAKE_OSX_ARCHITECTURES arch_count) + if(arch_count EQUAL 0) + message(WARNING "Unable to determine target architecture. " + "Consider providing a value for the CMAKE_OSX_ARCHITECTURES cache variable. " + "Continuing without vcpkg.") + set(VCPKG_TOOLCHAIN ON) + return() + else() + if(arch_count GREATER 1) + message(WARNING "Detected more than one target architecture. Using the first one.") + endif() + list(GET CMAKE_OSX_ARCHITECTURES 0 target_arch) + if(target_arch STREQUAL arm64) + set(_VCPKG_TARGET_TRIPLET_ARCH arm64) + elseif(target_arch STREQUAL arm64s) + set(_VCPKG_TARGET_TRIPLET_ARCH arm64s) + elseif(target_arch STREQUAL armv7s) + set(_VCPKG_TARGET_TRIPLET_ARCH armv7s) + elseif(target_arch STREQUAL armv7) + set(_VCPKG_TARGET_TRIPLET_ARCH arm) + elseif(target_arch STREQUAL x86_64) + set(_VCPKG_TARGET_TRIPLET_ARCH x64) + elseif(target_arch STREQUAL i386) + set(_VCPKG_TARGET_TRIPLET_ARCH x86) + else() + message(WARNING "Unable to determine target architecture, continuing without vcpkg.") + set(VCPKG_TOOLCHAIN ON) + return() + endif() + endif() + elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "AMD64") + set(_VCPKG_TARGET_TRIPLET_ARCH x64) + elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "s390x") + set(_VCPKG_TARGET_TRIPLET_ARCH s390x) + elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "armv7l") + set(_VCPKG_TARGET_TRIPLET_ARCH arm) + elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "aarch64") + set(_VCPKG_TARGET_TRIPLET_ARCH arm64) + else() + if( _CMAKE_IN_TRY_COMPILE ) + message(STATUS "Unable to determine target architecture, continuing without vcpkg.") + else() + message(WARNING "Unable to determine target architecture, continuing without vcpkg.") + endif() + set(VCPKG_TOOLCHAIN ON) + return() + endif() + endif() +endif() + +if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" OR CMAKE_SYSTEM_NAME STREQUAL "WindowsPhone") + set(_VCPKG_TARGET_TRIPLET_PLAT uwp) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR (NOT CMAKE_SYSTEM_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")) + set(_VCPKG_TARGET_TRIPLET_PLAT linux) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin" OR (NOT CMAKE_SYSTEM_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")) + set(_VCPKG_TARGET_TRIPLET_PLAT osx) +elseif(CMAKE_SYSTEM_NAME STREQUAL "iOS") + set(_VCPKG_TARGET_TRIPLET_PLAT ios) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR (NOT CMAKE_SYSTEM_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")) + set(_VCPKG_TARGET_TRIPLET_PLAT windows) +elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR (NOT CMAKE_SYSTEM_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD")) + set(_VCPKG_TARGET_TRIPLET_PLAT freebsd) +endif() + +set(VCPKG_TARGET_TRIPLET ${_VCPKG_TARGET_TRIPLET_ARCH}-${_VCPKG_TARGET_TRIPLET_PLAT} CACHE STRING "Vcpkg target triplet (ex. x86-windows)") +set(_VCPKG_TOOLCHAIN_DIR ${CMAKE_CURRENT_LIST_DIR}) + +if(NOT DEFINED _VCPKG_ROOT_DIR) + # Detect .vcpkg-root to figure VCPKG_ROOT_DIR + set(_VCPKG_ROOT_DIR_CANDIDATE ${CMAKE_CURRENT_LIST_DIR}) + while(IS_DIRECTORY ${_VCPKG_ROOT_DIR_CANDIDATE} AND NOT EXISTS "${_VCPKG_ROOT_DIR_CANDIDATE}/.vcpkg-root") + get_filename_component(_VCPKG_ROOT_DIR_TEMP ${_VCPKG_ROOT_DIR_CANDIDATE} DIRECTORY) + if (_VCPKG_ROOT_DIR_TEMP STREQUAL _VCPKG_ROOT_DIR_CANDIDATE) # If unchanged, we have reached the root of the drive + else() + SET(_VCPKG_ROOT_DIR_CANDIDATE ${_VCPKG_ROOT_DIR_TEMP}) + endif() + endwhile() + set(_VCPKG_ROOT_DIR ${_VCPKG_ROOT_DIR_CANDIDATE} CACHE INTERNAL "Vcpkg root directory") +endif() + +_vcpkg_get_directory_name_of_file_above(_VCPKG_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR} ".vcpkg-root") +if(NOT _VCPKG_ROOT_DIR) + message(FATAL_ERROR "Could not find .vcpkg-root") +endif() + +if (NOT DEFINED _VCPKG_INSTALLED_DIR) + if(_VCPKG_MANIFEST_DIR) + set(_VCPKG_INSTALLED_DIR ${CMAKE_BINARY_DIR}/vcpkg_installed) + else() + set(_VCPKG_INSTALLED_DIR ${_VCPKG_ROOT_DIR}/installed) + endif() + + set(_VCPKG_INSTALLED_DIR ${_VCPKG_INSTALLED_DIR} + CACHE PATH + "The directory which contains the installed libraries for each triplet") +endif() + +if(CMAKE_BUILD_TYPE MATCHES "^[Dd][Ee][Bb][Uu][Gg]$" OR NOT DEFINED CMAKE_BUILD_TYPE) #Debug build: Put Debug paths before Release paths. + list(APPEND CMAKE_PREFIX_PATH + ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} + ) + list(APPEND CMAKE_LIBRARY_PATH + ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link + ) + list(APPEND CMAKE_FIND_ROOT_PATH + ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} + ) +else() #Release build: Put Release paths before Debug paths. Debug Paths are required so that CMake generates correct info in autogenerated target files. + list(APPEND CMAKE_PREFIX_PATH + ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug + ) + list(APPEND CMAKE_LIBRARY_PATH + ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link + ) + list(APPEND CMAKE_FIND_ROOT_PATH + ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug + ) +endif() + +# If one CMAKE_FIND_ROOT_PATH_MODE_* variables is set to ONLY, to make sure that ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} +# and ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug are searched, it is not sufficient to just add them to CMAKE_FIND_ROOT_PATH, +# as CMAKE_FIND_ROOT_PATH specify "one or more directories to be prepended to all other search directories", so to make sure that +# the libraries are searched as they are, it is necessary to add "/" to the CMAKE_PREFIX_PATH +if(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE STREQUAL "ONLY" OR + CMAKE_FIND_ROOT_PATH_MODE_LIBRARY STREQUAL "ONLY" OR + CMAKE_FIND_ROOT_PATH_MODE_PACKAGE STREQUAL "ONLY") + list(APPEND CMAKE_PREFIX_PATH "/") +endif() + +set(VCPKG_CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH}) + +file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles) +set(_PROGRAMFILESX86 "PROGRAMFILES(x86)") +file(TO_CMAKE_PATH "$ENV{${_PROGRAMFILESX86}}" _programfiles_x86) +set(CMAKE_SYSTEM_IGNORE_PATH + "${_programfiles}/OpenSSL" + "${_programfiles}/OpenSSL-Win32" + "${_programfiles}/OpenSSL-Win64" + "${_programfiles}/OpenSSL-Win32/lib/VC" + "${_programfiles}/OpenSSL-Win64/lib/VC" + "${_programfiles}/OpenSSL-Win32/lib/VC/static" + "${_programfiles}/OpenSSL-Win64/lib/VC/static" + "${_programfiles_x86}/OpenSSL" + "${_programfiles_x86}/OpenSSL-Win32" + "${_programfiles_x86}/OpenSSL-Win64" + "${_programfiles_x86}/OpenSSL-Win32/lib/VC" + "${_programfiles_x86}/OpenSSL-Win64/lib/VC" + "${_programfiles_x86}/OpenSSL-Win32/lib/VC/static" + "${_programfiles_x86}/OpenSSL-Win64/lib/VC/static" + "C:/OpenSSL/" + "C:/OpenSSL-Win32/" + "C:/OpenSSL-Win64/" + "C:/OpenSSL-Win32/lib/VC" + "C:/OpenSSL-Win64/lib/VC" + "C:/OpenSSL-Win32/lib/VC/static" + "C:/OpenSSL-Win64/lib/VC/static" +) + +list(APPEND CMAKE_PROGRAM_PATH ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools) +file(GLOB _VCPKG_TOOLS_DIRS ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools/*) +foreach(_VCPKG_TOOLS_DIR ${_VCPKG_TOOLS_DIRS}) + if(IS_DIRECTORY ${_VCPKG_TOOLS_DIR}) + list(APPEND CMAKE_PROGRAM_PATH ${_VCPKG_TOOLS_DIR}) + endif() +endforeach() + + +# CMAKE_EXECUTABLE_SUFFIX is not yet defined +if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") + set(_VCPKG_EXECUTABLE "${_VCPKG_ROOT_DIR}/vcpkg.exe") + set(_VCPKG_BOOTSTRAP_SCRIPT "${_VCPKG_ROOT_DIR}/bootstrap-vcpkg.bat") +else() + set(_VCPKG_EXECUTABLE "${_VCPKG_ROOT_DIR}/vcpkg") + set(_VCPKG_BOOTSTRAP_SCRIPT "${_VCPKG_ROOT_DIR}/bootstrap-vcpkg.sh") +endif() + +if(VCPKG_MANIFEST_MODE AND VCPKG_MANIFEST_INSTALL AND NOT _CMAKE_IN_TRY_COMPILE) + if(NOT EXISTS "${_VCPKG_EXECUTABLE}") + message(STATUS "Bootstrapping vcpkg before install") + + execute_process( + COMMAND "${_VCPKG_BOOTSTRAP_SCRIPT}" + RESULT_VARIABLE _VCPKG_BOOTSTRAP_RESULT) + + if (NOT _VCPKG_BOOTSTRAP_RESULT EQUAL 0) + message(FATAL_ERROR "Bootstrapping vcpkg before install - failed") + endif() + + message(STATUS "Bootstrapping vcpkg before install - done") + endif() + + set(VCPKG_OVERLAY_PORTS "" CACHE STRING "Overlay ports to use for vcpkg install in manifest mode") + mark_as_advanced(VCPKG_OVERLAY_PORTS) + set(VCPKG_OVERLAY_TRIPLETS "" CACHE STRING "Overlay triplets to use for vcpkg install in manifest mode") + mark_as_advanced(VCPKG_OVERLAY_TRIPLETS) + + message(STATUS "Running vcpkg install") + + set(_VCPKG_ADDITIONAL_MANIFEST_PARAMS) + if(VCPKG_OVERLAY_PORTS) + foreach(_overlay_port IN LISTS VCPKG_OVERLAY_PORTS) + list(APPEND _VCPKG_ADDITIONAL_MANIFEST_PARAMS "--overlay-ports=${_overlay_port}") + endforeach() + endif() + if(VCPKG_OVERLAY_TRIPLETS) + foreach(_overlay_triplet IN LISTS VCPKG_OVERLAY_TRIPLETS) + list(APPEND _VCPKG_ADDITIONAL_MANIFEST_PARAMS "--overlay-triplets=${_overlay_triplet}") + endforeach() + endif() + + foreach(feature ${VCPKG_MANIFEST_FEATURES}) + list(APPEND _VCPKG_ADDITIONAL_MANIFEST_PARAMS "--x-feature=${feature}") + endforeach() + + if(VCPKG_MANIFEST_NO_DEFAULT_FEATURES) + list(APPEND _VCPKG_ADDITIONAL_MANIFEST_PARAMS "--x-no-default-features") + endif() + + execute_process( + COMMAND "${_VCPKG_EXECUTABLE}" install + --triplet "${VCPKG_TARGET_TRIPLET}" + --vcpkg-root "${_VCPKG_ROOT_DIR}" + "--x-manifest-root=${_VCPKG_MANIFEST_DIR}" + "--x-install-root=${_VCPKG_INSTALLED_DIR}" + ${_VCPKG_ADDITIONAL_MANIFEST_PARAMS} + OUTPUT_FILE "${CMAKE_BINARY_DIR}/vcpkg-manifest-install-out.log" + ERROR_FILE "${CMAKE_BINARY_DIR}/vcpkg-manifest-install-err.log" + RESULT_VARIABLE _VCPKG_INSTALL_RESULT + ) + + if (NOT _VCPKG_INSTALL_RESULT EQUAL 0) + message(FATAL_ERROR "Running vcpkg install - failed") + endif() + + message(STATUS "Running vcpkg install - done") + + set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS + "${_VCPKG_MANIFEST_DIR}/vcpkg.json" + "${_VCPKG_INSTALLED_DIR}/vcpkg/status") +endif() + +option(VCPKG_APPLOCAL_DEPS "Automatically copy dependencies into the output directory for executables." ON) +function(add_executable name) + _add_executable(${ARGV}) + list(FIND ARGV "IMPORTED" IMPORTED_IDX) + list(FIND ARGV "ALIAS" ALIAS_IDX) + list(FIND ARGV "MACOSX_BUNDLE" MACOSX_BUNDLE_IDX) + if(IMPORTED_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1) + if(VCPKG_APPLOCAL_DEPS) + if(_VCPKG_TARGET_TRIPLET_PLAT MATCHES "windows|uwp") + add_custom_command(TARGET ${name} POST_BUILD + COMMAND powershell -noprofile -executionpolicy Bypass -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1 + -targetBinary $ + -installedDir "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$:/debug>/bin" + -OutVariable out + ) + elseif(_VCPKG_TARGET_TRIPLET_PLAT MATCHES "osx") + if (NOT MACOSX_BUNDLE_IDX EQUAL -1) + add_custom_command(TARGET ${name} POST_BUILD + COMMAND python ${_VCPKG_TOOLCHAIN_DIR}/osx/applocal.py + $ + "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$:/debug>" + ) + endif() + endif() + endif() + set_target_properties(${name} PROPERTIES VS_USER_PROPS do_not_import_user.props) + set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false) + endif() +endfunction() + +function(add_library name) + _add_library(${ARGV}) + list(FIND ARGV "IMPORTED" IMPORTED_IDX) + list(FIND ARGV "INTERFACE" INTERFACE_IDX) + list(FIND ARGV "ALIAS" ALIAS_IDX) + if(IMPORTED_IDX EQUAL -1 AND INTERFACE_IDX EQUAL -1 AND ALIAS_IDX EQUAL -1) + get_target_property(IS_LIBRARY_SHARED ${name} TYPE) + if(VCPKG_APPLOCAL_DEPS AND _VCPKG_TARGET_TRIPLET_PLAT MATCHES "windows|uwp" AND (IS_LIBRARY_SHARED STREQUAL "SHARED_LIBRARY" OR IS_LIBRARY_SHARED STREQUAL "MODULE_LIBRARY")) + add_custom_command(TARGET ${name} POST_BUILD + COMMAND powershell -noprofile -executionpolicy Bypass -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1 + -targetBinary $ + -installedDir "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}$<$:/debug>/bin" + -OutVariable out + ) + endif() + set_target_properties(${name} PROPERTIES VS_USER_PROPS do_not_import_user.props) + set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false) + endif() +endfunction() + +if(NOT DEFINED VCPKG_OVERRIDE_FIND_PACKAGE_NAME) + set(VCPKG_OVERRIDE_FIND_PACKAGE_NAME find_package) +endif() +macro(${VCPKG_OVERRIDE_FIND_PACKAGE_NAME} name) + # Workaround to set the ROOT_PATH until upstream CMake stops overriding + # the ROOT_PATH at apple OS initialization phase. + # See https://gitlab.kitware.com/cmake/cmake/merge_requests/3273 + if(CMAKE_SYSTEM_NAME STREQUAL iOS) + set(BACKUP_CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH}) + list(APPEND CMAKE_FIND_ROOT_PATH ${VCPKG_CMAKE_FIND_ROOT_PATH}) + endif() + string(TOLOWER "${name}" _vcpkg_lowercase_name) + + if(EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/${_vcpkg_lowercase_name}/vcpkg-cmake-wrapper.cmake") + set(ARGS "${ARGV}") + include(${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/${_vcpkg_lowercase_name}/vcpkg-cmake-wrapper.cmake) + elseif("${name}" STREQUAL "Boost" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/boost") + # Checking for the boost headers disables this wrapper unless the user has installed at least one boost library + set(Boost_USE_STATIC_LIBS OFF) + set(Boost_USE_MULTITHREADED ON) + unset(Boost_USE_STATIC_RUNTIME) + set(Boost_NO_BOOST_CMAKE ON) + unset(Boost_USE_STATIC_RUNTIME CACHE) + if("${CMAKE_VS_PLATFORM_TOOLSET}" STREQUAL "v120") + set(Boost_COMPILER "-vc120") + else() + set(Boost_COMPILER "-vc140") + endif() + _find_package(${ARGV}) + elseif("${name}" STREQUAL "ICU" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/unicode/utf.h") + function(_vcpkg_find_in_list) + list(FIND ARGV "COMPONENTS" COMPONENTS_IDX) + set(COMPONENTS_IDX ${COMPONENTS_IDX} PARENT_SCOPE) + endfunction() + _vcpkg_find_in_list(${ARGV}) + if(NOT COMPONENTS_IDX EQUAL -1) + _find_package(${ARGV} COMPONENTS data) + else() + _find_package(${ARGV}) + endif() + elseif("${name}" STREQUAL "GSL" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/gsl") + _find_package(${ARGV}) + if(GSL_FOUND AND TARGET GSL::gsl) + set_property( TARGET GSL::gslcblas APPEND PROPERTY IMPORTED_CONFIGURATIONS Release ) + set_property( TARGET GSL::gsl APPEND PROPERTY IMPORTED_CONFIGURATIONS Release ) + if( EXISTS "${GSL_LIBRARY_DEBUG}" AND EXISTS "${GSL_CBLAS_LIBRARY_DEBUG}") + set_property( TARGET GSL::gsl APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug ) + set_target_properties( GSL::gsl PROPERTIES IMPORTED_LOCATION_DEBUG "${GSL_LIBRARY_DEBUG}" ) + set_property( TARGET GSL::gslcblas APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug ) + set_target_properties( GSL::gslcblas PROPERTIES IMPORTED_LOCATION_DEBUG "${GSL_CBLAS_LIBRARY_DEBUG}" ) + endif() + endif() + elseif("${name}" STREQUAL "CURL" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/curl") + _find_package(${ARGV}) + if(CURL_FOUND) + if(EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/nghttp2.lib") + list(APPEND CURL_LIBRARIES + "debug" "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/nghttp2.lib" + "optimized" "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/nghttp2.lib") + endif() + endif() + elseif("${_vcpkg_lowercase_name}" STREQUAL "grpc" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/grpc") + _find_package(gRPC ${ARGN}) + else() + _find_package(${ARGV}) + endif() + if(CMAKE_SYSTEM_NAME STREQUAL iOS) + set(CMAKE_FIND_ROOT_PATH "${BACKUP_CMAKE_FIND_ROOT_PATH}") + endif() +endmacro() + +set(VCPKG_TOOLCHAIN ON) +set(_UNUSED ${CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION}) +set(_UNUSED ${CMAKE_EXPORT_NO_PACKAGE_REGISTRY}) +set(_UNUSED ${CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY}) +set(_UNUSED ${CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY}) +set(_UNUSED ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP}) + +# Propogate these values to try-compile configurations so the triplet and toolchain load +if(NOT _CMAKE_IN_TRY_COMPILE) + if(_CMAKE_EMULATE_TRY_COMPILE_PLATFORM_VARIABLES) + file(TO_CMAKE_PATH "${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}" _chainload_file) + file(TO_CMAKE_PATH "${_VCPKG_ROOT_DIR}" _root_dir) + file(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/vcpkg.config.cmake" + "set(VCPKG_TARGET_TRIPLET \"${VCPKG_TARGET_TRIPLET}\" CACHE STRING \"\")\n" + "set(VCPKG_TARGET_ARCHITECTURE \"${VCPKG_TARGET_ARCHITECTURE}\" CACHE STRING \"\")\n" + "set(VCPKG_APPLOCAL_DEPS \"${VCPKG_APPLOCAL_DEPS}\" CACHE STRING \"\")\n" + "set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE \"${_chainload_file}\" CACHE STRING \"\")\n" + "set(_VCPKG_ROOT_DIR \"${_root_dir}\" CACHE STRING \"\")\n" + ) + else() + list(APPEND CMAKE_TRY_COMPILE_PLATFORM_VARIABLES + VCPKG_TARGET_TRIPLET + VCPKG_TARGET_ARCHITECTURE + VCPKG_APPLOCAL_DEPS + VCPKG_CHAINLOAD_TOOLCHAIN_FILE + _VCPKG_ROOT_DIR + ) + endif() +endif() diff --git a/vcpkg/scripts/ci.baseline.txt b/vcpkg/scripts/ci.baseline.txt new file mode 100644 index 0000000..e467247 --- /dev/null +++ b/vcpkg/scripts/ci.baseline.txt @@ -0,0 +1,1859 @@ +########################################################################### +## This file defines the current expected build state of ports in CI. +## +## States +## pass - (default) the port builds in the CI system. If a port is +## missing from this file then it is assumed to build. +## fail - the port does not build in the CI system. +## This is not necessarily the same as if a port is expected to build +## on a developers machine because it may fail due to the machine +## configuration. When set to fail the CI system will still attempt +## to build the port and will report a CI failure until this file is updated. +## skip - Do not build this port in the CI system. +## This is added to ports that may be flaky or conflict with other +## ports. Please comment for why a port is skipped so it can be +## removed when the issue is resolved. +## +## +## CI tested triplets: +## arm64-windows +## arm-uwp +## x64-linux +## x64-osx +## x64-uwp +## x64-windows +## x64-windows-static +## x86-windows +## + + +# Add new items alphabetically + +3fd:arm64-windows=fail +3fd:arm-uwp=fail +3fd:x64-linux=fail +3fd:x64-osx=fail +3fd:x64-windows=fail +3fd:x64-windows-static=fail +3fd:x86-windows=fail +activemq-cpp:x64-linux=fail +activemq-cpp:x64-osx=fail +akali:x64-uwp=fail +akali:arm-uwp=fail +akali:arm64-windows=fail +alac:arm-uwp=fail +alac:x64-uwp=fail +aliyun-oss-c-sdk:x64-linux=fail +aliyun-oss-c-sdk:x64-osx=fail +ampl-mp:arm64-windows=fail +ampl-mp:arm-uwp=fail +ampl-mp:x64-uwp=fail +amqpcpp:arm-uwp=fail +amqpcpp:x64-uwp=fail +angelscript:arm64-windows=fail +angelscript:arm-uwp=fail +antlr4:arm-uwp=fail +antlr4:x64-uwp=fail +apr:arm-uwp=fail +apr:x64-uwp=fail +# Cross compiling CI machine cannot run gen_test_char to generate apr_escape_test_char.h +apr:arm64-windows=fail +argtable2:arm-uwp=fail +argtable2:x64-uwp=fail +arrow:arm64-windows=fail +arrow:x86-windows=fail +asiosdk:x64-linux=fail +asiosdk:x64-osx=fail +asiosdk:x64-uwp=fail +asiosdk:arm64-windows=fail +asiosdk:arm-uwp=fail +asyncplusplus:arm-uwp=fail +asyncplusplus:x64-uwp=fail +atk:x64-osx=fail +atk:arm64-windows=fail +atlmfc:x64-linux=fail +atlmfc:x64-osx=fail +aubio:x64-linux=fail +aubio:x64-osx=fail +avro-c:arm-uwp=fail +avro-c:x64-osx=fail +avro-c:x64-uwp=fail +avro-cpp:x64-windows-static=fail +aws-c-common:arm64-windows=fail +aws-c-common:arm-uwp=fail +aws-c-common:x64-uwp=fail +aws-checksums:arm64-windows=fail +aws-lambda-cpp:arm64-windows=fail +aws-lambda-cpp:arm-uwp=fail +aws-lambda-cpp:x64-uwp=fail +aws-lambda-cpp:x64-windows=fail +aws-lambda-cpp:x64-windows-static=fail +aws-lambda-cpp:x86-windows=fail +aws-lambda-cpp:x64-osx=fail +azure-c-shared-utility:arm-uwp=fail +azure-c-shared-utility:x64-uwp=fail +azure-kinect-sensor-sdk:x64-linux=fail +azure-kinect-sensor-sdk:x64-osx=fail +# Requires ATL for ARM64 to be installed in CI +azure-storage-cpp:arm64-windows=fail +bde:arm64-windows=fail +bde:arm-uwp=fail +bde:x64-uwp=fail +bde:x64-windows=fail +bde:x64-windows-static=fail +bde:x86-windows=fail +benchmark:arm64-windows=fail +benchmark:arm-uwp=fail +benchmark:x64-uwp=fail +berkeleydb:arm-uwp=fail +berkeleydb:x64-linux=fail +berkeleydb:x64-osx=fail +berkeleydb:x64-uwp=fail +bitserializer-rapidyaml:arm-uwp=skip +bitserializer-rapidyaml:arm64-windows=skip +bitserializer-rapidyaml:x64-osx=skip +bitserializer:arm-uwp=skip +bitserializer:arm64-windows=skip +bitserializer:x64-osx=skip +blend2d:arm64-windows=fail +blend2d:arm-uwp=fail +blend2d:x64-uwp=fail +blitz:x64-uwp=fail +blitz:arm64-windows=fail +blitz:arm-uwp=fail +blosc:arm64-windows=fail +blosc:arm-uwp=fail +blosc:x64-uwp=fail +bond:arm-uwp=fail +bond:x64-osx=fail +bond:x64-uwp=fail +botan:arm64-windows=fail +botan:arm-uwp=fail +botan:x64-uwp=fail +breakpad:arm64-windows=fail +bullet3:arm64-windows=fail +bullet3:arm-uwp=fail +bullet3:x64-uwp=fail +caf:arm-uwp=fail +caf:arm64-windows=fail +caf:x64-uwp=fail +caffe2:x86-windows=fail +caffe2:arm64-windows=fail +cairomm:x64-linux=fail +# capnproto currently triggers an ICE +capnproto:x86-windows=fail +capnproto:x64-windows=fail +capnproto:x64-windows-static=fail +# capnproto doesn't support arm, arm64, or UWP +capnproto:arm64-windows=fail +capnproto:arm-uwp=fail +capnproto:x64-uwp=fail +c-ares:arm-uwp=fail +c-ares:x64-uwp=fail +cartographer:x64-osx=fail +casclib:arm-uwp=fail +casclib:x64-uwp=fail +catch-classic:arm64-windows = skip +catch-classic:arm-uwp = skip +catch-classic:x64-linux = skip +catch-classic:x64-osx = skip +catch-classic:x64-uwp = skip +catch-classic:x64-windows = skip +catch-classic:x64-windows-static = skip +catch-classic:x86-windows = skip +ccd:arm-uwp=fail +ccd:x64-uwp=fail +cello:arm-uwp=fail +cello:x64-uwp=fail +cfitsio:arm-uwp=fail +cfitsio:x64-uwp=fail +cgicc:arm-uwp=fail +cgicc:x64-uwp=fail +chakracore:arm64-windows=fail +chakracore:arm-uwp=fail +chakracore:x64-linux=fail +chakracore:x64-osx=fail +chakracore:x64-uwp=fail +chakracore:x64-windows-static=fail +# DCMTK currently has a vendored copy of libcharls.a, which causes conflicts with charls (TODO: use charls' copy) +charls:arm64-windows=skip +charls:arm-uwp=skip +charls:x64-linux=skip +charls:x64-osx=skip +charls:x64-uwp=skip +charls:x64-windows=skip +charls:x64-windows-static=skip +charls:x86-windows=skip +chartdir:arm64-windows=fail +chartdir:arm-uwp=fail +chartdir:x64-uwp=fail +chartdir:x64-windows-static=fail +chipmunk:arm64-windows=fail +chipmunk:arm-uwp=fail +chipmunk:x64-linux=fail +chipmunk:x64-osx=fail +chipmunk:x64-uwp=fail +chmlib:arm-uwp=fail +chmlib:x64-uwp=fail +# Chromium Base requires a recent version of Clang to be installed. +chromium-base:x64-linux=skip +civetweb:arm64-windows = skip +civetweb:arm-uwp = skip +civetweb:x64-uwp = skip +clblas:arm64-windows=fail +clblast:x64-linux=fail +clblast:x64-windows-static=fail +clockutils:x64-linux=fail +clockutils:x64-osx=fail +cmark:x64-windows-static=fail +cmcstl2:arm64-windows = skip +cmcstl2:arm-uwp = skip +cmcstl2:x64-linux = skip +cmcstl2:x64-osx = skip +cmcstl2:x64-uwp = skip +cmcstl2:x64-windows = skip +cmcstl2:x64-windows-static = skip +cmcstl2:x86-windows = skip +coin:arm64-windows=fail +coin:arm-uwp=fail +coin:x64-uwp=fail +collada-dom:x64-windows-static=fail +constexpr-contracts:x64-linux=fail +coolprop:arm-uwp=fail +coolprop:x64-linux=fail +coolprop:x64-osx=fail +coolprop:x64-uwp=fail +coroutine:arm-uwp=fail +coroutine:x64-linux=fail +coroutine:x64-uwp=fail +corrade:arm-uwp=fail +corrade:x64-uwp=fail +cppcms:x64-linux=fail +cppcms:x64-osx=fail +cppcms:x64-windows-static=fail +cppfs:arm-uwp=fail +cppfs:x64-uwp=fail +cppmicroservices:arm64-windows=fail +cppmicroservices:arm-uwp=fail +cppmicroservices:x64-uwp=fail +cpp-netlib:arm-uwp=fail +cpp-netlib:x64-uwp=fail +cppcoro:x64-linux=fail +cppcoro:arm-uwp=fail +cppcoro:x64-uwp=fail +cppunit:arm64-windows=fail +cppunit:arm-uwp=fail +cppunit:x64-linux=fail +cppunit:x64-osx=fail +cppunit:x64-uwp=fail +cpuinfo:arm64-windows=fail +crashpad:arm64-windows=fail +crashpad:arm-uwp=fail +crashpad:x64-linux=fail +crashpad:x64-uwp=fail +crashpad:x86-windows=fail +crfsuite:arm-uwp=fail +crfsuite:x64-uwp=fail +crossguid:x64-osx=fail +ctemplate:arm64-windows=fail +ctemplate:arm-uwp=fail +ctemplate:x64-linux=fail +ctemplate:x64-osx=fail +cuda:x64-osx=fail +cudnn:arm64-windows=fail +cudnn:arm-uwp=fail +cudnn:x64-uwp=fail +cudnn:x64-windows-static=fail +cudnn:x86-windows=fail +# Since pipeline cannot automatically install dbghelp dependency, skip this detection +dbghelp:arm-uwp=skip +dbghelp:arm64-windows=skip +dbghelp:x64-linux=fail +dbghelp:x64-osx=fail +dbghelp:x64-uwp=skip +dbghelp:x64-windows-static=skip +dbghelp:x64-windows=skip +dbghelp:x86-windows=skip +dcmtk:arm-uwp=fail +dcmtk:arm64-windows=fail +dcmtk:x64-uwp=fail +detours:x64-linux=fail +detours:x64-osx=fail +devicenameresolver:arm-uwp=fail +devicenameresolver:x64-linux=fail +devicenameresolver:x64-osx=fail +devicenameresolver:x64-uwp=fail +devicenameresolver:x64-windows-static=fail +dimcli:arm-uwp=fail +dimcli:x64-osx=fail +dimcli:x64-uwp=fail +directxmesh:x64-linux=fail +directxmesh:x64-osx=fail +directxmesh:x64-windows-static=fail +directxtex:x64-linux=fail +directxtex:x64-osx=fail +directxtex:x64-windows-static=fail +directxtk:x64-linux=fail +directxtk:x64-osx=fail +directxtk:x64-windows-static=fail +directxtk12:x64-linux=fail +directxtk12:x64-osx=fail +directxtk12:x64-windows-static=fail +discord-game-sdk:x64-windows-static=fail +discord-rpc:arm-uwp=fail +discord-rpc:x64-uwp=fail +dlfcn-win32:arm-uwp=fail +dlfcn-win32:x64-linux=fail +dlfcn-win32:x64-osx=fail +dlfcn-win32:x64-uwp=fail +dmlc:arm-uwp=fail +dmlc:x64-uwp=fail +dpdk:arm-uwp=fail +dpdk:arm64-windows=fail +dpdk:x64-linux=fail +dpdk:x64-osx=fail +dpdk:x64-uwp=fail +dpdk:x64-windows-static=fail +dpdk:x64-windows=fail +dpdk:x86-windows=fail +duckx:arm64-windows = skip +duckx:arm-uwp = skip +duckx:x64-linux = skip +duckx:x64-osx = skip +duckx:x64-uwp = skip +duckx:x64-windows = skip +duckx:x64-windows-static = skip +duckx:x86-windows = skip +duilib:arm-uwp=fail +duilib:x64-linux=fail +duilib:x64-osx=fail +duilib:x64-uwp=fail + +# requires python@2 from brew, but that no longer exists +# python2 EOL yay! +duktape:x64-osx=skip + +dxut:arm64-windows=fail +dxut:arm-uwp=fail +dxut:x64-linux=fail +dxut:x64-osx=fail +dxut:x64-windows-static=fail +eastl:arm-uwp=fail +easyhook:arm64-windows=fail +easyhook:arm-uwp=fail +easyhook:x64-linux=fail +easyhook:x64-osx=fail +easyhook:x64-uwp=fail +easyhook:x64-windows-static=fail +easyloggingpp:arm-uwp=fail +easyloggingpp:x64-uwp=fail +eathread:arm64-windows=fail +eathread:arm-uwp=fail +eathread:x64-uwp=fail +eathread:x86-windows=fail +ebml:arm-uwp=fail +ebml:x64-uwp=fail +ecm:arm64-windows = skip +ecm:arm-uwp = skip +ecm:x64-linux = skip +ecm:x64-osx = skip +ecm:x64-uwp = skip +ecm:x64-windows = skip +ecm:x64-windows-static = skip +ecm:x86-windows = skip +ecsutil:arm64-windows=fail +ecsutil:arm-uwp=fail +ecsutil:x64-linux=fail +ecsutil:x64-osx=fail +ecsutil:x64-uwp=fail +embree2:x64-linux=fail +embree2:x64-osx=fail +embree2:x64-windows-static=fail +enet:arm-uwp=fail +enet:x64-uwp=fail +epsilon:x64-windows-static=fail +epsilon:arm-uwp=fail +epsilon:x64-linux=fail +epsilon:x64-osx=fail +epsilon:x64-uwp=fail +faad2:x64-linux=fail +faad2:x64-osx=fail +fann:arm-uwp=fail +fann:x64-linux=fail +fann:x64-osx=fail +fann:x64-uwp=fail +fann:x64-windows-static=fail +farmhash:arm64-windows=fail +farmhash:arm-uwp=fail +farmhash:x64-uwp=fail +farmhash:x64-windows=fail +farmhash:x64-windows-static=fail +farmhash:x86-windows=fail +fastrtps:arm-uwp=fail +fastrtps:x64-linux=fail +fastrtps:x64-osx=fail +fastrtps:x64-uwp=fail +fastrtps:x64-windows-static=fail +fdk-aac:arm64-windows=fail +fdk-aac:arm-uwp=fail +fdk-aac:x64-uwp=fail +fdlibm:arm-uwp=fail +fdlibm:x64-uwp=fail +fftw3:arm-uwp=fail +fftw3:x64-uwp=fail +flint:x64-linux=fail +flint:x64-osx=fail +fltk:arm-uwp=fail +fltk:x64-uwp=fail +fluidsynth:x64-osx=fail +# fluidlite conflicts with fluidsynth; we test fluidsynth rather than fluidlite because +# fluidlite has no dependencies and thus is less likely to be broken by another package. +fluidlite:arm-uwp=skip +fluidlite:arm64-windows=skip +fluidlite:x64-linux=skip +fluidlite:x64-osx=skip +fluidlite:x64-uwp=skip +fluidlite:x64-windows-static=skip +fluidlite:x64-windows=skip +fluidlite:x86-windows=skip +fmem:arm-uwp=fail +fmem:x64-uwp=fail +fmi4cpp:arm-uwp=fail +fmi4cpp:x64-uwp=fail +fmilib:arm64-windows=fail +fmilib:arm-uwp=fail +fmilib:x64-linux=fail +fmilib:x64-uwp=fail +foonathan-memory:arm64-windows=fail +foonathan-memory:arm-uwp=fail +foonathan-memory:x64-uwp=fail +forge:x86-windows=fail +freeglut:arm64-windows=fail +freeglut:arm-uwp=fail +freeglut:x64-uwp=fail +freeglut:x64-osx=fail +# Needs /bigobj +freeopcua:arm64-windows=fail +freetds:arm-uwp=fail +freetds:x64-linux=fail +freetds:x64-osx=fail +freetds:x64-uwp=fail +freetype-gl:x64-uwp=fail +freexl:arm-uwp=fail +freexl:x64-uwp=fail +fribidi:arm64-windows=fail +fribidi:arm-uwp=fail +fribidi:x64-uwp=fail +ftgl:x64-uwp=fail +fuzzylite:arm-uwp=fail +fuzzylite:x64-linux=fail +fuzzylite:x64-osx=fail +fuzzylite:x64-uwp=fail +g3log:arm64-windows=fail +g3log:arm-uwp=fail +g3log:x64-uwp=fail +gainput:arm-uwp=fail +gainput:x64-linux=fail +gainput:x64-uwp=fail +gamma:x64-linux=fail +gamma:x64-osx=fail +gasol:arm64-windows=fail +gasol:arm-uwp=fail +gasol:x64-uwp=fail +gdcm:arm64-windows=fail +gdcm:x64-linux = skip +geos:arm-uwp=fail +geos:x64-uwp=fail +getopt:arm-uwp=fail +getopt:x64-uwp=fail +getopt-win32:arm64-windows=fail +getopt-win32:arm-uwp=fail +getopt-win32:x64-linux=fail +getopt-win32:x64-osx=fail +getopt-win32:x64-uwp=fail +getopt-win32:x64-windows-static=fail +gflags:arm-uwp=fail +gflags:x64-uwp=fail + +# Conflicts with libevent +gherkin-c:arm64-windows = skip +gherkin-c:arm-uwp = skip +gherkin-c:x64-linux=fail +gherkin-c:x64-osx=fail +gherkin-c:x64-uwp = skip +gherkin-c:x64-windows = skip +gherkin-c:x64-windows-static = skip +gherkin-c:x86-windows = skip +gl3w:arm64-windows=fail +gl3w:arm-uwp=fail +glew:arm64-windows=fail +glew:arm-uwp=fail +glfw3:arm-uwp=fail +glfw3:x64-uwp=fail +glib:x64-uwp=fail +glib:x64-windows-static=fail +glib:x64-osx=fail +gmmlib:arm64-windows=fail +gmmlib:arm-uwp=fail +gmmlib:x64-osx=fail +gmmlib:x64-uwp=fail +gmmlib:x64-windows=fail +gmmlib:x64-windows-static=fail +gmmlib:x86-windows=fail +# VS 2019 16.7 broke gmp UWP https://github.com/microsoft/vcpkg/issues/13172 +gmp:x64-uwp=fail +google-cloud-cpp:arm64-windows=fail +google-cloud-cpp:arm-uwp=fail +google-cloud-cpp:x64-uwp=fail +gppanel:x64-osx=fail +gperf:x64-uwp=fail +gperf:arm-uwp=fail +gperftools:arm64-windows=fail +gperftools:x64-uwp=fail +gperftools:arm-uwp=fail +graphicsmagick:arm-uwp=fail +graphicsmagick:x64-uwp=fail +graphite2:arm-uwp=fail +graphite2:x64-uwp=fail +graphqlparser:arm-uwp=fail +graphqlparser:x64-uwp=fail +gsl:arm-uwp=fail +gsl:x64-uwp=fail +# https://github.com/microsoft/vcpkg/pull/11048 +gtk:x64-linux=fail +guetzli:x64-osx=fail +h3:arm64-windows=fail +h3:arm-uwp=fail +h3:x64-uwp=fail +halide:x64-windows-static=fail +hdf5:arm64-windows=fail +hdf5:arm-uwp=fail +hdf5:x64-uwp=fail +healpix:x86-windows=fail +healpix:x64-windows=fail +healpix:x64-windows-static=fail +healpix:x64-uwp=fail +healpix:arm64-windows=fail +healpix:arm-uwp=fail +healpix:x64-osx=fail +hidapi:arm64-windows=fail +hidapi:arm-uwp=fail +hidapi:x64-linux=fail +hidapi:x64-osx=fail +hidapi:x64-uwp=fail +hiredis:arm-uwp=fail +hiredis:x64-uwp=fail +hpx:x64-windows-static=fail +hpx:x64-linux=fail +libhsplasma:x64-windows-static=fail +icu:arm64-windows=fail +icu:arm-uwp=fail +icu:x64-uwp=fail +idevicerestore:x64-linux=fail +idevicerestore:x64-osx=fail +ignition-common1:x64-linux=fail +ignition-msgs1:arm64-windows=fail +ignition-msgs1:arm-uwp=fail +ignition-msgs1:x64-uwp=fail +ignition-msgs5:x64-linux=fail +ignition-msgs5:arm64-windows=fail +ignition-msgs5:arm-uwp=fail +ignition-msgs5:x64-uwp=fail +ignition-msgs5:x64-osx=skip +intel-ipsec:arm64-windows=fail +intel-ipsec:arm-uwp=fail +intel-ipsec:x64-osx=fail +intel-ipsec:x64-uwp=fail +intel-ipsec:x64-windows=fail +intel-ipsec:x64-windows-static=fail +intel-ipsec:x86-windows=fail +intel-mkl:arm64-windows=fail +intel-mkl:arm-uwp=fail +intel-mkl:x64-linux=fail +intel-mkl:x64-osx=fail +intel-mkl:x64-uwp=fail +intel-mkl:x64-windows=fail +intel-mkl:x64-windows-static=fail +intel-mkl:x86-windows=fail +intelrdfpmathlib:arm-uwp=fail +intelrdfpmathlib:x64-linux=fail +intelrdfpmathlib:x64-uwp=fail +irrlicht:arm64-windows=fail +irrlicht:arm-uwp=fail +irrlicht:x64-osx=fail +irrlicht:x64-uwp=fail +isal:arm64-windows=fail +isal:arm-uwp=fail +isal:x64-osx=fail +isal:x64-uwp=fail +isal:x64-windows=fail +isal:x64-windows-static=fail +isal:x86-windows=fail +jaeger-client-cpp:arm64-windows=fail +jbig2dec:arm-uwp=fail +jbig2dec:x64-uwp=fail +jemalloc:arm64-windows=fail +jemalloc:arm-uwp=fail +jemalloc:x64-linux=fail +jemalloc:x64-osx=fail +jemalloc:x64-uwp=fail +jemalloc:x64-windows-static=fail +jinja2cpplight:arm-uwp=fail +jinja2cpplight:x64-uwp=fail +keystone:arm-uwp=fail +keystone:x64-uwp=fail +kfr:arm64-windows=fail +kfr:arm-uwp=fail +kfr:x64-linux=fail +kinectsdk1:arm64-windows=fail +kinectsdk1:arm-uwp=fail +kinectsdk1:x64-linux=fail +kinectsdk1:x64-osx=fail +kinectsdk2:arm64-windows=fail +kinectsdk2:arm-uwp=fail +kinectsdk2:x64-linux=fail +kinectsdk2:x64-osx=fail +lastools:arm-uwp=fail +lastools:x64-uwp=fail +laszip:arm-uwp=fail +laszip:x64-uwp=fail +lcm:x64-linux=fail +lcm:x64-osx=fail +leptonica:x64-uwp=fail +leptonica:arm-uwp=fail +leveldb:arm-uwp=fail +leveldb:x64-uwp=fail +libaiff:x64-linux=fail +libarchive:arm-uwp=fail +libbf:arm64-windows=fail +libbf:arm-uwp=fail +libbf:x64-uwp=fail +libbf:x64-windows=fail +libbf:x64-windows-static=fail +libbf:x86-windows=fail +libbson:arm-uwp=fail +libbson:x64-uwp=fail +libcds:arm64-windows=fail +libcds:arm-uwp=fail +libcds:x64-uwp=fail +libconfig:x64-osx=fail +libcopp:arm64-windows=fail +libcopp:arm-uwp=fail +libcrafter:x86-windows=fail +libcrafter:x64-windows=fail +cpuid:arm-uwp=fail +cpuid:x64-uwp=fail +cpuid:arm64-windows=fail +libdatrie:x64-linux=fail +libdatrie:x64-osx=fail +libdisasm:arm-uwp=fail +libdisasm:x64-uwp=fail +libdshowcapture:arm-uwp=fail +libdshowcapture:x64-linux=fail +libdshowcapture:x64-osx=fail +libdshowcapture:x64-uwp=fail +libepoxy:arm64-windows=fail +libepoxy:arm-uwp=fail +libepoxy:x64-uwp=fail +libepoxy:x64-windows-static=fail +libevent:arm-uwp=fail +libevent:x64-uwp=fail +libevhtp:x86-windows=fail +libevhtp:x64-windows=fail +libevhtp:x64-windows-static=fail +libevhtp:x64-uwp=fail +libevhtp:arm64-windows=fail +libevhtp:arm-uwp=fail +libexif:arm-uwp=fail +libexif:x64-uwp=fail +libfabric:arm-uwp=fail +libfabric:x64-linux=fail +libfabric:x64-osx=fail +libfabric:x64-uwp=fail +libfabric:x64-windows-static=fail +libfreenect2:arm64-windows=fail +libfreenect2:x64-linux=fail +libfreenect2:x64-osx=fail +libgit2:arm-uwp=fail +libgit2:x64-uwp=fail +libgo:arm-uwp=fail +libgo:x64-uwp=fail +libgo:arm64-windows=fail +libgo:x64-windows=fail +libgo:x86-windows=fail +libgpod:arm64-windows=fail +libgpod:arm-uwp=fail +libgpod:x64-uwp=fail +libgpod:x64-windows=fail +libgpod:x64-windows-static=fail +libgpod:x86-windows=fail +libhdfs3:arm64-windows=fail +libhdfs3:arm-uwp=fail +libhdfs3:x64-uwp=fail +libhdfs3:x64-windows=fail +libhdfs3:x64-windows-static=fail +libhdfs3:x86-windows=fail +libhdfs3:x64-linux=fail +libhydrogen:arm64-windows=fail +libics:arm-uwp=fail +libics:x64-uwp=fail +libigl:arm64-windows=fail +libigl:arm-uwp=fail +libigl:x64-uwp=fail +liblemon:arm-uwp=fail +liblemon:x64-uwp=fail +liblo:arm-uwp=fail +liblo:x64-linux=fail +liblo:x64-osx=fail +liblo:x64-uwp=fail +liblsl:arm64-windows=fail +liblsl:arm-uwp=fail +liblsl:x64-linux=fail +liblsl:x64-osx=fail +liblsl:x64-uwp=fail +libmad:arm-uwp=fail +libmad:x64-uwp=fail +libmagic:x86-windows=fail +libmagic:x64-windows=fail +libmagic:x64-windows-static=fail +libmagic:x64-uwp=fail +libmagic:arm64-windows=fail +libmagic:arm-uwp=fail +libmariadb:arm64-windows = skip +libmariadb:arm-uwp = skip +libmariadb:x64-linux = skip +libmariadb:x64-osx = skip +libmariadb:x64-uwp = skip +libmariadb:x64-windows = skip +libmariadb:x64-windows-static = skip +libmariadb:x86-windows = skip +# libmesh installs tons of problematic files that conflict with other ports (boost, eigen, etc) +libmesh:arm64-windows=skip +libmesh:arm-uwp=skip +libmesh:x64-uwp=skip +libmesh:x64-windows=skip +libmesh:x64-windows-static=skip +libmesh:x86-windows=skip +libmesh:x64-osx=skip +libmesh:x64-linux=skip +libmodman:arm-uwp=fail +libmodman:x64-uwp=fail +libmodman:x64-windows-static=fail +libmodplug:arm-uwp=fail +libmodplug:x64-uwp=fail +libmpeg2:arm-uwp=fail +libmpeg2:x64-linux=fail +libmpeg2:x64-osx=fail +libmpeg2:x64-uwp=fail +libmupdf:x64-osx=fail +libmysql:x86-windows=fail +libnice:x64-linux=fail +libnice:x64-osx=fail +libopenmpt:x64-linux=fail +libopenmpt:x64-osx=fail +libopusenc:arm-uwp=fail +libopusenc:x64-linux=fail +libopusenc:x64-osx=fail +libopusenc:x64-uwp=fail +libosip2:arm64-windows=fail +libosip2:arm-uwp=fail +libosip2:x64-uwp=fail +libosip2:x64-windows=fail +libosip2:x64-windows-static=fail +libosip2:x86-windows=fail +libp7-baical:arm64-windows = skip +libp7-baical:arm-uwp = skip +libp7-baical:x64-linux = skip +libp7-baical:x64-osx = skip +libp7-baical:x64-uwp = skip +libp7-baical:x64-windows = skip +libp7-baical:x64-windows-static = skip +libp7-baical:x86-windows = skip +libp7client:arm64-windows=fail +libp7client:arm-uwp=fail +libp7client:x64-linux=fail +libp7client:x64-osx=fail +libp7client:x64-uwp=fail +libpcap:arm64-windows=fail +libpcap:arm-uwp=fail +libpcap:x64-osx=fail +libpcap:x64-uwp=fail +libpcap:x64-windows-static=fail +libpff:arm-uwp=fail +libpff:x64-linux=fail +libpff:x64-osx=fail +libpff:x64-uwp=fail +libpff:x64-windows-static=fail +libplist:x64-windows-static=fail +libpng-apng:arm64-windows = skip +libpng-apng:arm-uwp = skip +libpng-apng:x64-linux = skip +libpng-apng:x64-osx = skip +libpng-apng:x64-uwp = skip +libpng-apng:x64-windows = skip +libpng-apng:x64-windows-static = skip +libpng-apng:x86-windows = skip +libpq:arm-uwp=fail +libpq:x64-uwp=fail +# The developer of libqcow does not offer stable release archives +libqcow:arm-uwp=skip +libqcow:x64-uwp=skip +libqcow:x64-windows-static=skip +libqcow:x64-osx=skip +libqcow:x64-windows=skip +libqcow:x64-linux=skip +libqcow:x86-windows=skip +libqcow:arm64-windows=skip + +libraqm:x64-windows-static=fail +librdkafka:arm-uwp=fail +librdkafka:x64-uwp=fail + +# Conflicts with openssl +boringssl:arm64-windows = skip +boringssl:arm-uwp = skip +boringssl:x64-linux = skip +boringssl:x64-osx = skip +boringssl:x64-uwp = skip +boringssl:x64-windows = skip +boringssl:x64-windows-static = skip +boringssl:x86-windows = skip +libressl:arm64-windows = skip +libressl:arm-uwp = skip +libressl:x64-linux = skip +libressl:x64-osx = skip +libressl:x64-uwp = skip +libressl:x64-windows = skip +libressl:x64-windows-static = skip +libressl:x86-windows = skip +libsamplerate:arm64-windows=fail +libsamplerate:arm-uwp=fail +libsamplerate:x64-osx=fail +libsoundio:arm64-windows=fail +libsoundio:arm-uwp=fail +libsoundio:x64-uwp=fail +libsrt:arm-uwp=fail +libsrt:x64-uwp=fail +libssh:arm64-windows=fail +libssh:arm-uwp=fail +libssh:x64-uwp=fail +libstk:arm-uwp=fail +libstk:x64-uwp=fail +libtins:arm-uwp=fail +libtins:x64-uwp=fail +libtomcrypt:arm64-windows=fail +libtomcrypt:arm-uwp=fail +libudis86:arm-uwp=fail +libudis86:x64-linux=fail +libudis86:x64-osx=fail +libudis86:x64-uwp=fail +libudns:arm64-windows=fail +libudns:arm-uwp=fail +libudns:x64-uwp=fail +libudns:x64-windows=fail +libudns:x64-windows-static=fail +libudns:x86-windows=fail +libudns:x64-osx=fail +libui:arm-uwp=fail +libui:x64-linux=fail +libui:x64-uwp=fail +libusb:arm-uwp=fail +libusb:x64-uwp=fail +libusbmuxd:arm-uwp=fail +libusbmuxd:x64-uwp=fail +libusbmuxd:x64-linux=fail +libusbmuxd:x64-osx=fail +libusb-win32:arm-uwp=fail +libusb-win32:x64-linux=fail +libusb-win32:x64-osx=fail +libusb-win32:x64-uwp=fail +libuuid:arm64-windows=fail +libuuid:arm-uwp=fail + +# Causes build failures in vxl and podofo on osx +# Conflicts with Darwin kernel sdk uuid.h (has missing definitions) +libuuid:x64-osx = skip +libuuid:x64-uwp=fail +libuuid:x64-windows=fail +libuuid:x64-windows-static=fail +libuuid:x86-windows=fail +libuv:arm-uwp=fail +libuv:x64-uwp=fail +libvmdk:arm-uwp=fail +libvmdk:x64-uwp=fail +#Skip detection to avoid upstream remove older releases +libvmdk:x86-windows=skip +libvmdk:x64-windows=skip +libvmdk:x64-windows-static=skip +libvmdk:arm64=skip +libvmdk:x64-linux=skip +libvmdk:x64-osx=skip +libwandio:x86-windows=fail +libwandio:x64-windows=fail +libwandio:x64-windows-static=fail +libwandio:x64-uwp=fail +libwandio:arm64-windows=fail +libwandio:arm-uwp=fail +libxmp-lite:x64-linux=fail +libxmp-lite:x64-osx=fail +libxslt:arm-uwp=fail +libxslt:x64-osx=fail +libxslt:x64-uwp=fail +libyuv:arm-uwp=fail +libyuv:x64-uwp=fail +licensepp:arm-uwp=fail +licensepp:x64-uwp=fail +linenoise-ng:arm-uwp=fail +linenoise-ng:x64-uwp=fail +live555:arm64-windows=fail +live555:arm-uwp=fail +live555:x64-linux=fail +live555:x64-osx=fail +live555:x64-uwp=fail +live555:x64-windows=fail +live555:x64-windows-static=fail +live555:x86-windows=fail +llgl:arm-uwp=fail +llgl:x64-uwp=fail +llvm:arm-uwp=fail +llvm:arm64-windows=fail +llvm:x64-uwp=fail +lmdb:arm-uwp=fail +lmdb:x64-uwp=fail +log4cplus:arm-uwp=fail +log4cplus:x64-uwp=fail +log4cxx:arm-uwp=fail +log4cxx:x64-uwp=fail +lua:arm-uwp=fail +lua:x64-uwp=fail +luajit:arm64-windows = skip +luajit:arm-uwp = skip +luajit:x64-linux = skip +luajit:x64-osx = skip +luajit:x64-uwp = skip +luajit:x64-windows = skip +luajit:x64-windows-static = skip +luajit:x86-windows = skip +luasocket:x64-linux=fail +luasocket:x64-osx=fail +lzfse:arm-uwp=fail +magnum:arm64-windows=skip +marble:x64-windows-static=fail +marble:arm64-windows=fail +marble:arm-uwp=fail +marble:x64-linux=fail +marble:x64-osx=fail +marble:x86-windows=fail +marl:arm-uwp=fail +marl:x64-uwp=fail +mathgl:x64-osx=fail +mathgl:x64-uwp=fail +matio:x64-linux=fail +matio:x64-osx=fail +mdnsresponder:arm64-windows=fail +mdnsresponder:arm-uwp=fail +mdnsresponder:x64-linux=fail +mdnsresponder:x64-osx=fail +mdnsresponder:x64-uwp=fail +mecab:arm64-windows = skip +mecab:arm-uwp = skip +mecab:x64-linux = skip +mecab:x64-uwp = skip +mecab:x64-windows = skip +mecab:x64-windows-static = skip +mecab:x86-windows = skip +memorymodule:arm-uwp=fail +memorymodule:x64-linux=fail +memorymodule:x64-osx=fail +memorymodule:x64-uwp=fail +meschach:arm-uwp=fail +meschach:x64-linux=fail +meschach:x64-osx=fail +meschach:x64-uwp=fail +metis:arm-uwp=fail +metis:x64-uwp=fail +metrohash:arm-uwp=fail +metrohash:x64-uwp=fail +metrohash:x86-windows=fail +metrohash:arm64-windows=fail +mhook:arm64-windows=fail +mhook:arm-uwp=fail +mhook:x64-linux=fail +mhook:x64-osx=fail +mhook:x64-uwp=fail +milerius-sfml-imgui:x64-osx=fail +milerius-sfml-imgui:x64-windows-static=fail +minhook:arm64-windows=fail +minhook:arm-uwp=fail +minhook:x64-linux=fail +minhook:x64-osx=fail +minhook:x64-uwp=fail +minifb:arm-uwp=fail +minifb:x64-uwp=fail +minisat-master-keying:arm-uwp=fail +minisat-master-keying:x64-uwp=fail +miniupnpc:arm-uwp=fail +miniupnpc:x64-uwp=fail +minizip:arm-uwp=fail +minizip:x64-uwp=fail +# Conflicts with signalrclient +microsoft-signalr:arm64-windows=skip +microsoft-signalr:arm-uwp=skip +microsoft-signalr:x64-linux=skip +microsoft-signalr:x64-osx=skip +microsoft-signalr:x64-uwp=skip +microsoft-signalr:x64-windows=skip +microsoft-signalr:x64-windows-static=skip +microsoft-signalr:x86-windows=skip +mman:x64-linux=fail +mman:x64-osx=fail +mmloader:arm64-windows=fail +mmloader:arm-uwp=fail +mmloader:x64-linux=fail +mmloader:x64-osx=fail +mmloader:x64-uwp=fail +mmloader:x64-windows=fail +mmloader:x86-windows=fail +# mmx installs many problematic headers, such as `json.h` and `sched.h` +mmx:x64-windows=skip +mmx:x64-windows-static=skip +mmx:x86-windows=skip +mmx:x64-linux=skip +mmx:x64-osx=skip +mmx:arm-uwp=skip +mmx:x64-uwp=skip +mmx:arm64-windows=skip +# Flaky strange linker error +mongo-c-driver:x64-osx=skip +mongoose:arm-uwp=fail +mongoose:x64-uwp=fail +monkeys-audio:arm64-windows=fail +monkeys-audio:arm-uwp=fail +monkeys-audio:x64-linux=fail +monkeys-audio:x64-osx=fail +monkeys-audio:x64-uwp=fail +monkeys-audio:x64-windows-static=fail +moos-core:arm-uwp=fail +moos-core:x64-uwp=fail +moos-core:x64-windows-static=fail +moos-essential:arm64-windows=fail +moos-essential:x64-windows=fail +moos-essential:x86-windows=fail +# Conflicts with libjpeg-turbo +mozjpeg:arm64-windows = skip +mozjpeg:arm-uwp = skip +mozjpeg:x64-linux = skip +mozjpeg:x64-osx = skip +mozjpeg:x64-uwp = skip +mozjpeg:x64-windows = skip +mozjpeg:x64-windows-static = skip +mozjpeg:x86-windows = skip +# mpir conflicts with gmp +# see https://github.com/microsoft/vcpkg/issues/11756 +mpir:x86-windows=skip +mpir:x64-windows=skip +mpir:x64-windows-static=skip +mpir:arm64-windows=skip +mpir:x64-osx=skip +mpir:x64-linux=skip +msix:x64-linux=fail +msix:x64-osx=fail +msix:x64-windows-static=fail +msmpi:arm64-windows=fail +msmpi:arm-uwp=fail +msmpi:x64-linux=fail +msmpi:x64-osx=fail +msmpi:x64-uwp=fail +munit:arm-uwp=fail +munit:arm64-windows=fail +munit:x64-uwp=fail +murmurhash:arm-uwp=fail +murmurhash:x64-uwp=fail +murmurhash:arm64-windows=fail +nana:arm-uwp=fail +nana:x64-linux=fail +nana:x64-osx=fail +nana:x64-uwp=fail +nanodbc:arm-uwp=fail +nanodbc:x64-osx=fail +nanodbc:x64-uwp=fail +nanodbc:x64-linux=skip +nanogui:arm64-windows=fail +nanorange:arm64-windows=fail +nanorange:arm-uwp=fail +nanorange:x64-linux=fail +nanorange:x64-osx=fail +nanorange:x64-uwp=fail +nanorange:x64-windows=fail +nanorange:x64-windows-static=fail +nanorange:x86-windows=fail +nanovg:arm-uwp=fail +nanovg:x64-uwp=fail +nativefiledialog:arm-uwp=fail +nativefiledialog:x64-uwp=fail +nethost:x64-uwp=fail +nethost:arm-uwp=fail +nettle:x64-windows-static=skip +nettle:x64-windows=skip +nettle:x64-osx=fail +networkdirect-sdk:arm64-windows=fail +networkdirect-sdk:arm-uwp=fail +networkdirect-sdk:x64-linux=fail +networkdirect-sdk:x64-osx=fail +networkdirect-sdk:x64-uwp=fail +networkdirect-sdk:x86-windows=fail +ngspice:x64-windows-static=fail +nng:arm-uwp=fail +nng:x64-uwp=fail +nrf-ble-driver:arm-uwp=fail +nrf-ble-driver:x64-uwp=fail +numactl:arm64-windows=fail +numactl:arm-uwp=fail +numactl:x64-osx=fail +numactl:x64-uwp=fail +numactl:x64-windows=fail +numactl:x64-windows-static=fail +numactl:x86-windows=fail +nvtt:arm64-windows=fail +nvtt:arm-uwp=fail +nvtt:x64-uwp=fail +ocilib:arm64-windows=fail +ocilib:arm-uwp=fail +ocilib:x64-uwp=fail +ocilib:x64-windows-static=fail +octomap:arm-uwp=fail +octomap:x64-uwp=fail +ode:arm64-windows=fail +ode:arm-uwp=fail +ode:x64-uwp=fail +offscale-libetcd-cpp:arm64-windows=fail +offscale-libetcd-cpp:arm-uwp=fail +offscale-libetcd-cpp:x64-uwp=fail +ogdf:arm64-windows = skip +ogdf:arm-uwp = skip +ogdf:x64-osx=fail +ogdf:x64-uwp = skip +ogdf:x64-windows = skip +ogdf:x64-windows-static = skip +ogdf:x86-windows = skip +ogre:x64-osx=fail +# Conflicts with ogre +ogre-next:arm64-windows = skip +ogre-next:arm-uwp = skip +ogre-next:x64-osx = skip +ogre-next:x64-linux = skip +ogre-next:x64-uwp = skip +ogre-next:x64-windows = skip +ogre-next:x64-windows-static = skip +ogre-next:x86-windows = skip +ois:arm64-windows=fail +ois:arm-uwp=fail +ois:x64-uwp=fail +# ompl is vulnerable to some form of race in its dependent ports, and adding 'ode' as a dependency +# does not resolve the issue +# src/ompl/CMakeFiles/ompl.dir/extensions/ode/src/OpenDEStateValidityChecker.cpp.o +# -L/mnt/vcpkg-ci/packages/flann_x64-linux/debug/lib -L/mnt/vcpkg-ci/packages/ode_x64-linux/debug/lib +# -Wl,-rpath,/mnt/vcpkg-ci/packages/flann_x64-linux/debug/lib:/mnt/vcpkg-ci/packages/ode_x64-linux/debug/lib:::::::::::::::::::::::::::::::::::::::::::::::: +# -lode /mnt/vcpkg-ci/installed/x64-linux/debug/lib/libboost_serialization.a +# /mnt/vcpkg-ci/installed/x64-linux/debug/lib/libboost_filesystem.a +# /mnt/vcpkg-ci/installed/x64-linux/debug/lib/libboost_system.a -lpthread && : +# /usr/bin/ld: cannot find -lode +ompl:x64-osx=fail +ompl:x64-linux=fail +open62541:arm-uwp=fail +open62541:x64-uwp=fail +openal-soft:arm-uwp=fail +openal-soft:x64-uwp=fail +openblas:arm64-windows=fail +openblas:arm-uwp=fail +# opencc/deps/rapidjson-1.1.0/rapidjson.h: Unknown machine endianess detected +opencc:arm64-windows=fail +# opencc/deps/marisa-0.2.5/lib/marisa/grimoire/io/mapper.cc currently doesn't support UWP. +opencc:arm-uwp=fail +opencc:x64-uwp=fail +opencensus-cpp:arm64-windows=fail +opencensus-cpp:x64-windows=fail +opencensus-cpp:x64-windows-static=fail +opencensus-cpp:x86-windows=fail +opencensus-cpp:x64-uwp=fail +opencl:arm-uwp=fail +opencl:x64-uwp=fail +opencsg:x64-uwp=fail +opencv2:arm64-windows = skip +opencv2:arm-uwp = skip +opencv2:x64-linux = skip +opencv2:x64-osx = skip +opencv2:x64-uwp = skip +opencv2:x64-windows = skip +opencv2:x64-windows-static = skip +opencv2:x86-windows = skip +opencv3:arm64-windows = skip +opencv3:arm-uwp = skip +opencv3:x64-linux = skip +opencv3:x64-osx = skip +opencv3:x64-uwp = skip +opencv3:x64-windows = skip +opencv3:x64-windows-static = skip +opencv3:x86-windows = skip +opendnp3:x64-uwp=fail +opendnp3:arm-uwp=fail +openexr:arm64-windows=fail +openexr:arm-uwp=fail +openexr:x64-uwp=fail +opengl:arm64-windows=fail +opengl:arm-uwp=fail +openmesh:arm64-windows=fail +openmesh:arm-uwp=fail +openmesh:x64-uwp=fail +openmpi:arm64-windows=fail +openmpi:arm-uwp=fail +openmpi:x64-uwp=fail +openmpi:x64-windows=fail +openmpi:x64-windows-static=fail +openmpi:x86-windows=fail +openni2:x64-uwp=fail +openni2:x64-windows-static=fail +openscap:x64-linux=fail +openssl-unix:arm64-windows=fail +openssl-unix:arm-uwp=fail +openssl-unix:x64-uwp=fail +openssl-unix:x64-windows=fail +openssl-unix:x64-windows-static=fail +openssl-unix:x86-windows=fail +openssl-uwp:arm64-windows=fail +openssl-uwp:x64-linux=fail +openssl-uwp:x64-osx=fail +openssl-uwp:x64-windows=fail +openssl-uwp:x64-windows-static=fail +openssl-uwp:x86-windows=fail +openssl-windows:arm-uwp=fail +openssl-windows:x64-linux=fail +openssl-windows:x64-osx=fail +openssl-windows:x64-uwp=fail +opentracing:arm-uwp=fail +opentracing:x64-uwp=fail +openvdb:x64-osx=fail +#openvdb:x64-windows-static=fail # https://github.com/microsoft/vcpkg/pull/10816#issuecomment-613784827 +openvpn3:x64-osx=fail +openvr:arm64-windows=fail +openvr:arm-uwp=fail +openvr:x64-osx=fail +openvr:x64-uwp=fail +openvr:x64-windows-static=fail +openxr-loader:arm64-windows=fail +openxr-loader:arm-uwp=fail +openxr-loader:x64-osx=fail +openxr-loader:x64-uwp=fail +optional-bare:arm64-windows = skip +optional-bare:arm-uwp = skip +optional-bare:x64-linux = skip +optional-bare:x64-osx = skip +optional-bare:x64-uwp = skip +optional-bare:x64-windows = skip +optional-bare:x64-windows-static = skip +optional-bare:x86-windows = skip +opusfile:arm-uwp=fail +opusfile:x64-uwp=fail +orocos-kdl:arm-uwp=fail +orocos-kdl:x64-uwp=fail +osgearth:x64-osx=fail +osgearth:x64-linux=fail +osgearth:x64-windows-static=fail +osg-qt:x64-windows-static=fail +paho-mqtt:arm-uwp=fail +paho-mqtt:x64-uwp=fail +pangomm:x64-osx=fail +pangomm:arm64-windows=fail +parmetis:x64-linux=fail +parmetis:x64-osx=fail +pdal:x64-linux=fail +pdal:x64-osx=fail +pdal-c:x64-windows-static=fail +pdcurses:arm-uwp=fail +pdcurses:x64-linux=fail +pdcurses:x64-osx=fail +pdcurses:x64-uwp=fail +pdcurses:x64-windows-static=fail +pfring:arm64-windows=fail +pfring:arm-uwp=fail +pfring:x64-uwp=fail +pfring:x64-windows=fail +pfring:x64-windows-static=fail +pfring:x86-windows=fail +pfring:x64-osx=fail +# pfring on Linux currently fails because its build scripts enable warnings as +# errors, and warnings trigger with the Linux kernel headers in the Azure images. +pfring:x64-linux=fail +physfs:arm64-windows=fail +physx:arm64-windows=fail +physx:x64-linux=fail +physx:x64-osx=fail +piex:x64-osx=fail +pistache:arm64-windows=fail +pistache:arm-uwp=fail +pistache:x64-osx=fail +pistache:x64-uwp=fail +pistache:x64-windows=fail +pistache:x64-windows-static=fail +pistache:x86-windows=fail +pixel:x64-uwp=fail +pixel:x64-windows=fail +pixel:x64-windows-static=fail +pixel:x86-windows=fail +platform-folders:arm-uwp=fail +platform-folders:x64-uwp=fail +plib:arm-uwp=fail +plib:x64-osx=fail +plib:x64-uwp=fail +plibsys:arm-uwp=fail +plibsys:x64-uwp=fail +plplot:arm64-windows=fail +plplot:arm-uwp=fail +plplot:x64-uwp=fail +pmdk:arm-uwp=fail +pmdk:arm64-windows=fail +pmdk:x64-linux=fail +pmdk:x64-osx=fail +pmdk:x64-uwp=fail +pmdk:x64-windows-static=fail +pmdk:x86-windows=fail +pngwriter:arm-uwp=fail +pngwriter:x64-uwp=fail +portable-snippets:arm-uwp=fail +# Portaudio was broken by Ninja 1.9.0 https://github.com/ninja-build/ninja/pull/1406 +portaudio:arm-uwp=fail +portaudio:arm64-windows=fail +portaudio:x64-uwp=fail +portaudio:x64-windows-static=fail +portaudio:x64-windows=fail +portaudio:x86-windows=fail +pqp:arm-uwp=fail +pqp:x64-uwp=fail +proj4:arm64-windows=fail +proj4:arm-uwp=fail +proj4:x64-uwp=fail +protobuf-c:x86-windows=fail +protobuf-c:x64-windows=fail +protobuf-c:x64-windows-static=fail +protobuf-c:x64-uwp=fail +protobuf-c:arm64-windows=fail +protobuf-c:arm-uwp=fail +# proxygen fails with "Target 'Windows' not supported by proxygen!" +proxygen:x64-windows=fail +proxygen:x64-windows-static=fail +ptex:arm-uwp=fail +ptex:x64-linux=fail +ptex:x64-osx=fail +ptex:x64-uwp=fail +pthreads:arm64-windows=fail +pthreads:arm-uwp=fail +pthreads:x64-uwp=fail +python2:arm64-windows=fail +python2:arm-uwp=fail +python2:x64-linux=fail +python2:x64-osx=fail +python2:x64-uwp=fail +python3:arm64-windows=fail +python3:arm-uwp=fail +python3:x64-uwp=fail +qca:x64-linux=fail +qca:x64-osx=fail +qca:x64-windows-static=fail +qhull:x64-uwp=fail +qhull:arm-uwp=fail +qpid-proton:arm-uwp=fail +qpid-proton:x64-uwp=fail +qpid-proton:x64-windows-static=fail +qt5-activeqt:x64-linux=fail +qt5-activeqt:x64-osx=fail +# Skip deprecated Qt module +# (remnove after 1 year or longer due to vcpkg upgrade not handling removed ports correctly) +qt5-canvas3d:x64-linux=skip +qt5-canvas3d:x64-osx=skip +qt5-canvas3d:x64-windows=skip +qt5-canvas3d:x64-windows-static=skip +qt5-canvas3d:x86-windows=skip +qt5-macextras:x64-linux=fail +qt5-macextras:x64-windows=fail +qt5-macextras:x64-windows-static=fail +qt5-macextras:x86-windows=fail +# Missing system libraries +qt5-wayland:x64-osx=fail +# Missing libraries +qt5-wayland:x86-windows=fail +qt5-wayland:x64-windows=fail +qt5-wayland:x64-windows-static=fail +qt5-winextras:x64-linux=fail +qt5-winextras:x64-osx=fail +# Missing prerequisites for CI success +qt5-webengine:x64-linux=fail +qt5-webengine:x64-osx=fail +# Fail due to outdated protoc headers. +# D:\buildtrees\qt5-webengine\x64-windows-dbg\src\core\debug\gen\net/third_party/quiche/src/quic/core/proto/cached_network_parameters.pb.h(17): +# fatal error C1189: #error: This file was generated by an older version of protoc which is +# Succesful built requires protobuf to be installed after qt5-webengine not before. Otherwise the build picks up the wrong headers from inside vcpkg. +qt5-webengine:x64-windows=skip +qt5-webengine:x86-windows=skip +# Static builds of qt5-webengine are not supported by the port itself +qt5-webengine:x64-windows-static=skip +# Missing system libraries +qt5-x11extras:x64-osx=fail +# Missing libraries +qt5-x11extras:x86-windows=fail +qt5-x11extras:x64-windows=fail +qt5-x11extras:x64-windows-static=fail +quickfix:arm-uwp=fail +quickfix:arm64-windows=fail +quickfix:x64-uwp=fail +quickfix:x64-windows-static=fail +quickfix:x64-windows=fail +quickfix:x86-windows=fail +quirc:arm64-windows = skip +quirc:arm-uwp = skip +quirc:x64-linux = skip +quirc:x64-osx = skip +quirc:x64-uwp = skip +quirc:x64-windows = skip +quirc:x64-windows-static = skip +quirc:x86-windows = skip +qwt:x64-osx=fail +rabit:x64-osx=fail +ragel:arm-uwp=fail +ragel:x64-uwp=fail +range-v3-vs2015:arm64-windows = skip +range-v3-vs2015:arm-uwp = skip +range-v3-vs2015:x64-linux = skip +range-v3-vs2015:x64-osx = skip +range-v3-vs2015:x64-uwp = skip +range-v3-vs2015:x64-windows = skip +range-v3-vs2015:x64-windows-static = skip +range-v3-vs2015:x86-windows = skip +rapidstring:arm64-windows=fail +rapidstring:arm-uwp=fail +rapidstring:x64-linux=fail +rapidstring:x64-uwp=fail +rapidstring:x64-windows=fail +rapidstring:x64-windows-static=fail +rapidstring:x86-windows=fail +raylib:arm64-windows=fail +raylib:arm-uwp=fail +raylib:x64-uwp=fail +readline:arm-uwp=fail +readline:x64-uwp=fail +readline-win32:arm-uwp=fail +readline-win32:x64-linux=fail +readline-win32:x64-osx=fail +readline-win32:x64-uwp=fail +realsense2:arm64-windows=fail +realsense2:arm-uwp=fail +realsense2:x64-uwp=fail +redis-plus-plus:x86-windows=fail +redis-plus-plus:x64-windows=fail +redis-plus-plus:x64-windows-static=fail +redis-plus-plus:arm64-windows=fail +replxx:arm-uwp=fail +replxx:x64-uwp=fail +reproc:arm-uwp=fail +reproc:x64-uwp=fail +restbed:arm-uwp=fail +restbed:x64-uwp=fail +# file conflicts with msgpack +rest-rpc:x86-windows=skip +rest-rpc:x64-windows=skip +rest-rpc:x64-windows-static=skip +rest-rpc:x64-uwp=skip +rest-rpc:arm-uwp=skip +rest-rpc:arm64-windows=skip +rest-rpc:x64-linux=skip +rest-rpc:x64-osx=skip +rhash:arm64-windows=fail +rhash:arm-uwp=fail +rhash:x64-uwp=fail +rocksdb:arm-uwp=fail +rocksdb:x64-uwp=fail +rpclib:arm64-windows=fail +rpclib:arm-uwp=fail +rpclib:x64-uwp=fail +rsocket:x64-windows=fail +rsocket:x64-windows-static=fail +rtlsdr:x64-uwp=fail +rtlsdr:arm64-windows=fail +rtlsdr:arm-uwp=fail +rtlsdr:x64-linux=fail +rtlsdr:x64-osx=fail +rttr:arm-uwp=fail +rttr:x64-uwp=fail +rxspencer:x64-uwp=fail +rxspencer:arm-uwp=fail +ryml:arm-uwp=fail +ryml:arm64-windows=fail +ryml:x64-osx=fail +ryu:arm-uwp=fail +ryu:x64-uwp=fail +ryu:x64-windows-static=fail +ryu:x86-windows=fail +ryu::arm64-windows=fail +sciter:arm64-windows=fail +sciter:arm-uwp=fail +sciter:x64-uwp=fail +sciter:x64-windows-static=fail +scnlib:arm-uwp=fail +scnlib:x64-uwp=fail +scylla-wrapper:arm-uwp=fail +scylla-wrapper:x64-linux=fail +scylla-wrapper:x64-osx=fail +scylla-wrapper:x64-uwp=fail +scylla-wrapper:x64-windows-static=fail +sdformat6:arm64-windows=fail +sdformat6:arm-uwp=fail +sdformat6:x64-uwp=fail +sdformat9:x64-linux=fail +sdformat9:arm-uwp=fail +sdformat9:x64-uwp=fail +sdl1:arm-uwp=fail +sdl1:x64-uwp=fail +sdl1:x64-osx=fail +sdl2-image:arm-uwp=fail +sdl2-image:x64-uwp=fail +sdl2-mixer:arm-uwp=fail +sdl2-mixer:x64-uwp=fail +sdl2-net:arm-uwp=fail +sdl2-net:x64-uwp=fail +# https://github.com/microsoft/vcpkg/issues/10918 +seal:arm-uwp=fail +seal:x64-uwp=fail +sentencepiece:arm64-windows=fail +sentencepiece:arm-uwp=fail +sentencepiece:x64-uwp=fail +sentencepiece:x64-windows=fail +sentencepiece:x86-windows=fail +septag-sx:arm64-windows=fail +septag-sx:arm-uwp=fail +septag-sx:x64-uwp=fail +sfml:arm64-windows=fail +shapelib:arm-uwp=fail +shapelib:x64-uwp=fail +shiva:x64-windows-static=fail +shiva-sfml:x64-linux=fail +shiva-sfml:x64-osx=fail +shiva-sfml:x86-windows=fail +shiva-sfml:x64-windows=fail +shogun:arm64-windows = skip +shogun:arm-uwp = skip +shogun:x64-osx = skip +shogun:x64-uwp = skip +shogun:x64-windows = skip +shogun:x64-windows-static = skip +shogun:x86-windows = skip +signalrclient:x64-uwp=fail +signalrclient:arm-uwp=fail +skia:arm64-windows=fail +skia:arm-uwp=fail +skia:x64-linux=fail +skia:x64-uwp=fail +skia:x86-windows=fail +slikenet:arm-uwp=fail +slikenet:x64-uwp=fail +smpeg2:arm-uwp=fail +smpeg2:x64-linux=fail +smpeg2:x64-uwp=fail +soci:arm-uwp=fail +soci:x64-uwp=fail +sockpp:arm-uwp=fail +sockpp:x64-uwp=fail +soem:x64-uwp=fail +soem:arm-uwp=fail +# soil upstream is gone; if we do not have another source before 2021-03-01 we will remove the port +soil:arm-uwp=skip +soil:x64-uwp=skip +soil:arm64-windows=skip +soil:x64-windows=skip +soil:x86-windows=skip +soil:x64-windows-static=skip +soil:x64-linux=skip +soil:x64-osx=skip +soil2:arm-uwp=fail +soil2:x64-uwp=fail +soqt:arm64-windows=fail +soqt:arm-uwp=fail +soqt:x64-uwp=fail +soundtouch:arm-uwp=fail +soundtouch:x64-uwp=fail +soundtouch:x64-windows-static=fail +spaceland:arm64-windows=fail +spaceland:arm-uwp=fail +spaceland:x64-uwp=fail +spdk:x64-linux=fail +spdk-dpdk:arm64-windows=fail +spdk-dpdk:arm-uwp=fail +spdk-dpdk:x64-osx=fail +spdk-dpdk:x64-uwp=fail +spdk-dpdk:x64-windows=fail +spdk-dpdk:x64-windows-static=fail +spdk-dpdk:x86-windows=fail +spdk-ipsec:arm64-windows=fail +spdk-ipsec:arm-uwp=fail +spdk-ipsec:x64-osx=fail +spdk-ipsec:x64-uwp=fail +spdk-ipsec:x64-windows=fail +spdk-ipsec:x64-windows-static=fail +spdk-ipsec:x86-windows=fail +spdk-isal:arm64-windows=fail +spdk-isal:arm-uwp=fail +spdk-isal:x64-osx=fail +spdk-isal:x64-uwp=fail +spdk-isal:x64-windows=fail +spdk-isal:x64-windows-static=fail +spdk-isal:x86-windows=fail +speexdsp:x64-linux=fail +speexdsp:x64-osx=fail +spirv-tools:arm-uwp=fail +spirv-tools:x64-uwp=fail +stormlib:arm-uwp=fail +stormlib:x64-uwp=fail +stxxl:arm-uwp=fail +stxxl:x64-uwp=fail +# Sundials was broken by Ninja 1.9.0 https://github.com/ninja-build/ninja/pull/1406 +sundials:arm64-windows=fail +sundials:x64-windows=fail +sundials:x86-windows=fail +systemc:arm64-windows=fail +systemc:arm-uwp=fail +systemc:x64-uwp=fail +tbb:arm64-windows=fail +tbb:arm-uwp=fail +tbb:x64-uwp=fail +tcl:arm-uwp=fail +tcl:arm64-windows=fail +tcl:x64-uwp=fail +tcl:x64-osx=fail +teemo:x64-uwp=fail +teemo:arm-uwp=fail +teemo:arm64-windows=fail +teemo:x64-osx=fail +telnetpp:arm-uwp=fail +telnetpp:x64-uwp=fail +tensorflow-cc:arm64-windows=fail +tensorflow-cc:x64-linux=skip +tensorflow-cc:x64-osx=skip +tensorflow-cc:x64-windows=fail +tensorflow-cc:x64-windows-static=fail +tensorflow-cc:x86-windows=fail +tesseract:x64-windows=fail +tesseract:x64-windows-static=fail +tesseract:x86-windows=fail +tesseract:arm64-windows=fail +tfhe:x86-windows=fail +tfhe:x64-windows=fail +tfhe:x64-windows-static=fail +tfhe:x64-uwp=fail +tfhe:arm64-windows=fail +tfhe:arm-uwp=fail +theia:arm64-windows = skip +theia:arm-uwp = skip +theia:x64-uwp = skip +theia:x64-windows = skip +theia:x64-windows-static = skip +theia:x86-windows = skip +thor:x64-linux=fail +thor:x64-osx=fail +tidy-html5:arm-uwp=fail +tidy-html5:x64-uwp=fail +tinkerforge:arm-uwp=fail +tinkerforge:x64-uwp=fail +tinyexif:arm-uwp=fail +tinyexif:x64-uwp=fail +tinyfiledialogs:arm-uwp=fail +tinyfiledialogs:x64-uwp=fail +tiny-process-library:arm-uwp=fail +tiny-process-library:x64-uwp=fail +tmxlite:arm-uwp=fail +tmxlite:x64-uwp=fail +tmxparser:arm64-windows=fail +tmxparser:arm-uwp=fail +tmxparser:x64-uwp=fail +tmxparser:x64-windows=fail +tmxparser:x64-windows-static=fail +tmxparser:x86-windows=fail +torch-th:arm64-windows=fail +torch-th:arm-uwp=fail +torch-th:x64-uwp=fail +torch-th:x64-windows-static=fail +tre:x64-osx=fail +treehopper:x64-windows-static=fail +treehopper:x64-linux=fail +turbobase64:arm64-windows=fail +turbobase64:arm-uwp=fail +turbobase64:x64-uwp=fail +turbobase64:x64-windows=fail +turbobase64:x64-windows-static=fail +turbobase64:x86-windows=fail +unicorn:arm64-windows=fail +unicorn:arm-uwp=fail +unicorn:x64-linux=fail +unicorn:x64-osx=fail +unicorn:x64-uwp=fail +unicorn-lib:arm-uwp=fail +unicorn-lib:x64-uwp=fail +unittest-cpp:arm64-windows=fail +unittest-cpp:arm-uwp=fail +unittest-cpp:x64-uwp=fail +unixodbc:arm64-windows=fail +unixodbc:arm-uwp=fail +unixodbc:x64-uwp=fail +unixodbc:x64-windows=fail +unixodbc:x64-windows-static=fail +unixodbc:x86-windows=fail +unrar:arm64-windows=fail +unrar:arm-uwp=fail +unrar:x64-linux=fail +unrar:x64-osx=fail +unrar:x64-uwp=fail +unrar:x64-windows-static=fail +urdfdom:x64-windows-static=fail +usd:x86-windows=fail +usrsctp:arm-uwp=fail +usrsctp:x64-uwp=fail +uthenticode:arm-uwp=fail +uthenticode:x64-uwp=fail +uvatlas:arm64-windows=fail +uvatlas:arm-uwp=fail +uvatlas:x64-linux=fail +uvatlas:x64-osx=fail +uvatlas:x64-windows-static=fail +v8:arm64-windows=fail +v8:arm-uwp=fail +v8:x64-osx=fail +v8:x64-uwp=fail +vectorclass:arm64-windows=fail +vectorclass:arm-uwp=fail +vlpp:x64-osx=fail +vulkan:arm64-windows=fail +vulkan:arm-uwp=fail +vulkan:x64-linux=fail +vulkan:x64-osx=fail +vulkan:x64-uwp=fail +vulkan:x64-windows=fail +vulkan:x64-windows-static=fail +vulkan:x86-windows=fail +# Conflicts with latest openjpeg port (vxl ships with an old version of openjpeg) +# conflicts with qt5-location +vxl:arm64-windows = skip +vxl:arm-uwp = skip +vxl:x64-linux = skip +vxl:x64-osx = skip +vxl:x64-uwp = skip +vxl:x64-windows = skip +vxl:x64-windows-static = skip +vxl:x86-windows = skip +wampcc:arm64-windows=fail +wepoll:arm-uwp=fail +wepoll:x64-uwp=fail +wepoll:x64-linux=fail +wepoll:x64-osx=fail +wildmidi:x64-osx=fail +wincrypt:x64-linux=fail +wincrypt:x64-osx=fail +winpcap:arm64-windows = skip +winpcap:arm-uwp = skip +winpcap:x64-linux=fail +winpcap:x64-osx=fail +winpcap:x64-uwp = skip +winpcap:x64-windows = skip +winpcap:x64-windows-static = skip +winpcap:x86-windows = skip +winreg:x64-linux=fail +winreg:x64-osx=fail +winsock2:x64-linux=fail +winsock2:x64-osx=fail +wintoast:arm-uwp=fail +wintoast:x64-linux=fail +wintoast:x64-osx=fail +wintoast:x64-uwp=fail +woff2:x64-linux=fail +woff2:x64-osx=fail +woff2:x64-windows-static=fail +wpilib:arm64-windows=fail +wpilib:x64-osx=fail +wxchartdir:x64-osx=fail +wxwidgets:x64-linux=fail +x264:arm64-windows=fail +x264:arm-uwp=fail +x264:x64-uwp=fail +x264:x64-osx=fail +x265:arm64-windows=fail +x265:arm-uwp=fail +x265:x64-uwp=fail +xalan-c:x64-windows-static=fail +xalan-c:arm64-windows=fail +xbyak:arm64-windows=fail +xbyak:arm-uwp=fail +xbyak:x64-uwp=fail +xerces-c:arm-uwp=fail +xerces-c:x64-uwp=fail +xmlsec:arm-uwp=fail +xmlsec:x64-uwp=fail +# The xmsh upstream repository is gone, if we find no replacement before +# 2021-01-01 we will remove the port outright. +xmsh:arm-uwp=skip +xmsh:arm64-windows=skip +xmsh:x64-linux=skip +xmsh:x64-osx=skip +xmsh:x64-uwp=skip +xmsh:x64-windows-static=skip +xmsh:x64-windows=skip +xmsh:x86-windows=skip +x-plane:arm64-windows=fail +x-plane:arm-uwp=fail +x-plane:x64-linux=fail +x-plane:x86-windows=fail +yajl:arm-uwp=fail +yajl:x64-uwp=fail +yara:arm-uwp=fail +yara:x64-uwp=fail +yasm:arm64-windows=fail +yasm:arm-uwp=fail +yasm:x64-linux=fail +yasm:x64-osx=fail +yasm:x64-uwp=fail +yato:arm64-windows=fail +yato:arm-uwp=fail +yato:x64-uwp=fail +z3:arm64-windows=fail +z3:arm-uwp=fail +z3:x64-uwp=fail +zeromq:arm64-windows=fail +zeromq:arm-uwp=fail +zeromq:x64-uwp=fail +zkpp:x86-windows=fail +zkpp:x64-windows=fail +zkpp:x64-windows-static=fail +zkpp:arm64-windows=fail +zkpp:x64-uwp=fail +zkpp:arm-uwp=fail +c4core:arm-uwp=fail +c4core:arm64-windows=fail +c4core:x64-osx=fail + +# Official downloading server of CTP library is only guaranteed to be available during trading hours of China futures market +# Skip CI to avoid random failures +ctp:arm64-windows=skip +ctp:arm-uwp=skip +ctp:x64-linux=skip +ctp:x64-osx=skip +ctp:x64-uwp=skip +ctp:x64-windows=skip +ctp:x64-windows-static=skip +ctp:x86-windows=skip +protozero:arm-uwp=fail +protozero:x64-uwp=fail + +# clapack is replaced by lapack-reference on the platforms lapack-reference supports +clapack:x64-linux=skip +clapack:x64-osx=skip +clapack:x64-windows-static=skip +clapack:x64-windows=skip +clapack:x86-windows=skip +clapack:x64-uwp=skip +lapack-reference:arm64-windows=skip +lapack-reference:arm-uwp=skip diff --git a/vcpkg/scripts/cleanEnvironmentHelper.ps1 b/vcpkg/scripts/cleanEnvironmentHelper.ps1 new file mode 100644 index 0000000..fa5fe86 --- /dev/null +++ b/vcpkg/scripts/cleanEnvironmentHelper.ps1 @@ -0,0 +1,52 @@ +# Capture environment variables for the System and User. Also add some special/built-in variables. +# These will be used to synthesize a clean environment +$specialEnvironmentMap = @{ "SystemDrive"=$env:SystemDrive; "SystemRoot"=$env:SystemRoot; "UserProfile"=$env:UserProfile; "TMP"=$env:TMP } # These are built-in and not set in the registry +$machineEnvironmentMap = [Environment]::GetEnvironmentVariables('Machine') # HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment +$userEnvironmentMap = [Environment]::GetEnvironmentVariables('User') # HKEY_CURRENT_USER\Environment + +# Identify the keySet of environment variable names +$nameSet = ($specialEnvironmentMap.Keys + $machineEnvironmentMap.Keys + $userEnvironmentMap.Keys) | Sort-Object | Select-Object -Unique + +# Any environment variable in the $nameSet should be restored to its original value +foreach ($name in $nameSet) +{ + if ($specialEnvironmentMap.ContainsKey($name)) + { + [Environment]::SetEnvironmentVariable($name, $specialEnvironmentMap[$name], 'Process') + continue; + } + + # PATH needs to be concatenated as it has values in both machine and user environment. Any other values should be set. + if ($name -eq 'path') + { + $pathValuePartial = @() + # Machine values before user values + $pathValuePartial += $machineEnvironmentMap[$name] -split ';' + $pathValuePartial += $userEnvironmentMap[$name] -split ';' + $pathValue = $pathValuePartial -join ';' + [Environment]::SetEnvironmentVariable($name, $pathValue, 'Process') + continue; + } + + if ($userEnvironmentMap.ContainsKey($name)) + { + [Environment]::SetEnvironmentVariable($name, $userEnvironmentMap[$name], 'Process') + continue; + } + + if ($machineEnvironmentMap.ContainsKey($name)) + { + [Environment]::SetEnvironmentVariable($name, $machineEnvironmentMap[$name], 'Process') + continue; + } + + throw "Unreachable: Unknown variable $name" +} + +# Any environment variable NOT in the $nameSet should be removed +$processEnvironmentMap = [Environment]::GetEnvironmentVariables('Process') +$variablesForRemoval = $processEnvironmentMap.Keys | Where-Object {$nameSet -notcontains $_} +foreach ($name in $variablesForRemoval) +{ + [Environment]::SetEnvironmentVariable($name, $null, 'Process') +} diff --git a/vcpkg/scripts/cmake/execute_process.cmake b/vcpkg/scripts/cmake/execute_process.cmake new file mode 100644 index 0000000..97af4ee --- /dev/null +++ b/vcpkg/scripts/cmake/execute_process.cmake @@ -0,0 +1,20 @@ +## # execute_process +## +## Intercepts all calls to execute_process() inside portfiles and fails when Download Mode +## is enabled. +## +## In order to execute a process in Download Mode call `_execute_process()` instead. +## +if (NOT DEFINED OVERRIDEN_EXECUTE_PROCESS) + set(OVERRIDEN_EXECUTE_PROCESS ON) + + if (DEFINED VCPKG_DOWNLOAD_MODE) + macro(execute_process) + message(FATAL_ERROR "This command cannot be executed in Download Mode.\nHalting portfile execution.\n") + endmacro() + else() + macro(_execute_process) + execute_process(${ARGV}) + endmacro() + endif() +endif() \ No newline at end of file diff --git a/vcpkg/scripts/cmake/vcpkg_acquire_msys.cmake b/vcpkg/scripts/cmake/vcpkg_acquire_msys.cmake new file mode 100644 index 0000000..64f0e66 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_acquire_msys.cmake @@ -0,0 +1,330 @@ +## # vcpkg_acquire_msys +## +## Download and prepare an MSYS2 instance. +## +## ## Usage +## ```cmake +## vcpkg_acquire_msys( +## PACKAGES ... +## [NO_DEFAULT_PACKAGES] +## [DIRECT_PACKAGES ...] +## ) +## ``` +## +## ## Parameters +## ### MSYS_ROOT_VAR +## An out-variable that will be set to the path to MSYS2. +## +## ### PACKAGES +## A list of packages to acquire in msys. +## +## To ensure a package is available: `vcpkg_acquire_msys(MSYS_ROOT PACKAGES make automake1.16)` +## +## ### NO_DEFAULT_PACKAGES +## Exclude the normal base packages. +## +## The list of base packages includes: bash, coreutils, sed, grep, gawk, diffutils, make, and pkg-config +## +## ### DIRECT_PACKAGES +## A list of URL/SHA512 pairs to acquire in msys. +## +## This parameter can be used by a port to privately extend the list of msys packages to be acquired. +## The URLs can be found on the msys2 website[1] and should be a direct archive link: +## +## https://repo.msys2.org/mingw/i686/mingw-w64-i686-gettext-0.19.8.1-9-any.pkg.tar.zst +## +## [1] https://packages.msys2.org/search +## +## ## Notes +## A call to `vcpkg_acquire_msys` will usually be followed by a call to `bash.exe`: +## ```cmake +## vcpkg_acquire_msys(MSYS_ROOT) +## set(BASH ${MSYS_ROOT}/usr/bin/bash.exe) +## +## vcpkg_execute_required_process( +## COMMAND ${BASH} --noprofile --norc "${CMAKE_CURRENT_LIST_DIR}\\build.sh" +## WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel +## LOGNAME build-${TARGET_TRIPLET}-rel +## ) +## ``` +## +## ## Examples +## +## * [ffmpeg](https://github.com/Microsoft/vcpkg/blob/master/ports/ffmpeg/portfile.cmake) +## * [icu](https://github.com/Microsoft/vcpkg/blob/master/ports/icu/portfile.cmake) +## * [libvpx](https://github.com/Microsoft/vcpkg/blob/master/ports/libvpx/portfile.cmake) + +function(vcpkg_acquire_msys PATH_TO_ROOT_OUT) + cmake_parse_arguments(_am "NO_DEFAULT_PACKAGES" "" "PACKAGES;DIRECT_PACKAGES" ${ARGN}) + + set(TOTAL_HASH 0) + set(ARCHIVES) + + set(PACKAGES ${_am_PACKAGES}) + + if(NOT _am_NO_DEFAULT_PACKAGES) + list(APPEND PACKAGES bash coreutils sed grep gawk diffutils make pkg-config) + endif() + + macro(msys_package_download URL SHA FILENAME) + set(URLS "${URL}") + # Mirror list from https://github.com/msys2/MSYS2-packages/blob/master/pacman-mirrors/mirrorlist.msys + # Sourceforge is not used because it does not keep older package versions + set(MIRRORS + "https://www2.futureware.at/~nickoe/msys2-mirror/" + "https://mirror.yandex.ru/mirrors/msys2/" + "https://mirrors.tuna.tsinghua.edu.cn/msys2/" + "https://mirrors.ustc.edu.cn/msys2/" + "https://mirror.bit.edu.cn/msys2/" + "https://mirror.selfnet.de/msys2/" + "https://mirrors.sjtug.sjtu.edu.cn/msys2/" + ) + + foreach(MIRROR IN LISTS MIRRORS) + string(REPLACE "https://repo.msys2.org/" "${MIRROR}" MIRROR_URL "${URL}") + list(APPEND URLS "${MIRROR_URL}") + endforeach() + vcpkg_download_distfile(MSYS_ARCHIVE + URLS ${URLS} + SHA512 "${SHA}" + FILENAME "msys-${FILENAME}" + QUIET + ) + string(APPEND TOTAL_HASH "${SHA}") + list(APPEND ARCHIVES "${MSYS_ARCHIVE}") + endmacro() + + macro(msys_package) + cmake_parse_arguments(p "ZST;ANY" "URL;NAME;SHA512;VERSION;REPO" "DEPS" ${ARGN}) + if(p_URL AND NOT p_NAME) + if(NOT p_URL MATCHES "^https://repo\\.msys2\\.org/.*/(([^-]+(-[^0-9][^-]*)*)-.+\\.pkg\\.tar\\.(xz|zst))\$") + message(FATAL_ERROR "Regex does not match supplied URL to vcpkg_acquire_msys: ${p_URL}") + endif() + set(FILENAME "${CMAKE_MATCH_1}") + set(p_NAME "${CMAKE_MATCH_2}") + else() + if(p_ZST) + set(EXT zst) + else() + set(EXT xz) + endif() + if(p_ANY) + set(ARCH any) + else() + set(ARCH x86_64) + endif() + if(NOT p_REPO) + set(p_REPO msys/x86_64) + endif() + set(FILENAME "${p_NAME}-${p_VERSION}-${ARCH}.pkg.tar.${EXT}") + set(p_URL "https://repo.msys2.org/${p_REPO}/${FILENAME}") + endif() + if("${p_NAME}" IN_LIST PACKAGES) + list(REMOVE_ITEM PACKAGES "${p_NAME}") + list(APPEND PACKAGES ${p_DEPS}) + msys_package_download("${p_URL}" "${p_SHA512}" "${FILENAME}") + endif() + endmacro() + + unset(N) + foreach(P IN LISTS _am_DIRECT_PACKAGES) + if(NOT DEFINED N) + set(N "${P}") + else() + get_filename_component(FILENAME "${N}" NAME) + msys_package_download("${N}" "${P}" "${FILENAME}") + unset(N) + endif() + endforeach() + if(DEFINED N) + message(FATAL_ERROR "vcpkg_acquire_msys(... DIRECT_PACKAGES ...) requires exactly pairs of URL/SHA512") + endif() + + # To add new entries, use https://packages.msys2.org/package/$PACKAGE?repo=msys + msys_package( + URL "https://repo.msys2.org/msys/x86_64/unzip-6.0-2-x86_64.pkg.tar.xz" + SHA512 b8a1e0ce6deff26939cb46267f80ada0a623b7d782e80873cea3d388b4dc3a1053b14d7565b31f70bc904bf66f66ab58ccc1cd6bfa677065de1f279dd331afb9 + DEPS libbz2 + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/libbz2-1.0.8-2-x86_64.pkg.tar.xz" + SHA512 d128bd1792d0f5750e6a63a24db86a791e7ee457db8c0bef68d217099be4a6eef27c85caf6ad09b0bcd5b3cdac6fc0a2b9842cc58d381a4035505906cc4803ec + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/patch-2.7.6-1-x86_64.pkg.tar.xz" + SHA512 04d06b9d5479f129f56e8290e0afe25217ffa457ec7bed3e576df08d4a85effd80d6e0ad82bd7541043100799b608a64da3c8f535f8ea173d326da6194902e8c + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/gzip-1.10-1-x86_64.pkg.tar.xz" + SHA512 2d0a60f2c384e3b9e2bed2212867c85333545e51ee0f583a33914e488e43c265ed0017cd4430a6e3dafdca99c0414b3756a4b9cc92a6f04d5566eff8b68def75 + DEPS msys2-runtime + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/bash-4.4.023-2-x86_64.pkg.tar.xz" + SHA512 1cf2a07022113010e00e150e7004732013a793d49e7a6ac7c2be27a0b2c0ce3366150584b9974e30df042f8876a84d6a77c1a46f0607e38ebe18f8a25f51c32d + DEPS msys2-runtime + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/autoconf-2.69-5-any.pkg.tar.xz" + SHA512 66b9c97bd3d1dfe2a2ab576235b6b8c204a9e4c099ba14cf5d0139e564bba1e735e3b1083354b4cac8c6c42233cbdd5e1e277e32cadfe24017b94d2fbdeb5617 + DEPS m4 + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/diffutils-3.7-1-x86_64.pkg.tar.xz" + SHA512 0c39837a26b2111bb6310cdfe0bc14656e3d57456ad8023f59c9386634a8f1f236915c79a57348b64c508897c73ed88d8abce2b9ac512a427e9a3956939f2040 + DEPS msys2-runtime + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/binutils-2.34-4-x86_64.pkg.tar.zst" + SHA512 5271288d11489879082bc1f2298bb8bedbcfcf6ee19f8a9b3b552b6a4395543d9385bb833e3c32b1560bff1b411d2be503e2c12a7201bf37b85cfacc5f5baba3 + DEPS libiconv libintl + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/libtool-2.4.6-9-x86_64.pkg.tar.xz" + SHA512 b309799e5a9d248ef66eaf11a0bd21bf4e8b9bd5c677c627ec83fa760ce9f0b54ddf1b62cbb436e641fbbde71e3b61cb71ff541d866f8ca7717a3a0dbeb00ebf + DEPS grep sed coreutils + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/coreutils-8.32-1-x86_64.pkg.tar.xz" + SHA512 1a2ae4f296954421ce36f764b9b1c77ca72fc8583c46060b817677d0ad6adc7d7e3c2bbe1ae0179afd116a3d62f28e59eae2f7c84c1c8ffb7d22d2f2b40c0cdc + DEPS libiconv libintl gmp + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/grep-3.0-2-x86_64.pkg.tar.xz" + SHA512 c784d5f8a929ae251f2ffaccf7ab0b3936ae9f012041e8f074826dd6077ad0a859abba19feade1e71b3289cc640626dfe827afe91c272b38a1808f228f2fdd00 + DEPS libiconv libintl libpcre + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/sed-4.8-1-x86_64.pkg.tar.xz" + SHA512 b6e7ed0af9e04aba4992ee26d8616f7ac675c8137bb28558c049d50709afb571b33695ce21d01e5b7fe8e188c008dd2e8cbafc72a7e2a919c2d678506095132b + DEPS libintl + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/libpcre-8.44-1-x86_64.pkg.tar.xz" + SHA512 e9e56386fc5cca0f3c36cee21eda91300d9a13a962ec2f52eeea00f131915daea1cfeb0e1b30704bf3cc4357d941d356e0d72192bab3006c2548e18cd96dad77 + DEPS gcc-libs + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/m4-1.4.18-2-x86_64.pkg.tar.xz" + SHA512 061e9243c1e013aa093546e3872984ad47b7fc9d64d4c39dcce62e750ed632645df00be3fe382a2f55f3bf623dd0d649e2092be23e8f22f921f582e41893e36a + DEPS msys2-runtime + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/automake-wrapper-11-1-any.pkg.tar.xz" + SHA512 0fcfc80c31fd0bda5a46c55e9100a86d2fc788a92c7e2ca4fd281e551375c62eb5b9cc9ad9338bb44a815bf0b1d1b60b882c8e68ca3ea529b442f2d03d1d3e1f + DEPS gawk + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/gawk-5.1.0-1-x86_64.pkg.tar.xz" + SHA512 4e2be747b184f27945df6fb37d52d56fd8117d2fe4b289370bcdb5b15a4cf90cbeaea98cf9e64bcbfa2c13db50d8bd14cbd719c5f31b420842da903006dbc959 + DEPS libintl libreadline mpfr + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/mpfr-4.1.0-1-x86_64.pkg.tar.zst" + SHA512 d64fa60e188124591d41fc097d7eb51d7ea4940bac05cdcf5eafde951ed1eaa174468f5ede03e61106e1633e3428964b34c96de76321ed8853b398fbe8c4d072 + DEPS gmp gcc-libs + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/gmp-6.2.0-1-x86_64.pkg.tar.xz" + SHA512 1389a443e775bb255d905665dd577bef7ed71d51a8c24d118097f8119c08c4dfe67505e88ddd1e9a3764dd1d50ed8b84fa34abefa797d257e90586f0cbf54de8 + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/libreadline-8.0.004-1-x86_64.pkg.tar.xz" + SHA512 42760bddedccc8d93507c1e3a7a81595dc6392b5e4319d24a85275eb04c30eb79078e4247eb2cdd00ff3884d932639130c89bf1b559310a17fa4858062491f97 + DEPS ncurses + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/ncurses-6.2-1-x86_64.pkg.tar.xz" + SHA512 d4dc566d3dbd32e7646e328cb350689ede7eaa7008c8ed971072f8869a2986fe3935e7df1700851b52716af7ef20c49f9e6628d3163a5e9208a8872b5014eaea + DEPS msys2-runtime + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/automake1.16-1.16.2-1-any.pkg.tar.zst" + SHA512 568d1250a31a53452e029d1c236da66d67fffa786a8713128027d33a6a9408cda6e493e9c1555a816efee6245b05a1ef8f9ce3482c39de71356c2e983d926bf7 + DEPS perl + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/automake1.15-1.15.1-1-any.pkg.tar.xz" + SHA512 d5bb245ab1bb6b57c40ef97755bfb0919dcceb0eccc33e848809922bf6b032f9e4eb36d89aedf41542051277d92238bd48a74115867db0bbc1e1db1c975cc72c + DEPS perl + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/perl-5.32.0-1-x86_64.pkg.tar.zst" + SHA512 8acc6c4901bd2e24faf1951084d70029847f05e870826e07b8d9a5d90144f4aa0ab6e568e77c28c36650f016ee75ce78b0356c75673b212c992401f7f1543dd8 + DEPS libcrypt + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/libcrypt-2.1-2-x86_64.pkg.tar.xz" + SHA512 59a13f79f560934f880d68209a58a3c39ee4a1d24500035bde90d7a6f6ab0d4f72fe14edea6f19a8eb54d4d53b0b6ad4589b388f1521a07ab24a0f8307619cab + DEPS gcc-libs + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/pkg-config-0.29.2-1-x86_64.pkg.tar.xz" + SHA512 f1d70f0b4ebcfeb3fa2156a7a4f7b0b404795853e05361de14054dc6658a6154915bb982626cbfe76bef0828325f993f30da6817361ca8d7ea440a40023fa864 + DEPS libiconv + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/make-4.3-1-x86_64.pkg.tar.xz" + SHA512 7306dec7859edc27d70a24ab4b396728481484a426c5aa2f7e9fed2635b3b25548b05b7d37a161a86a8edaa5922948bee8c99b1e8a078606e69ca48a433fe321 + DEPS libintl msys2-runtime + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/gettext-0.19.8.1-1-x86_64.pkg.tar.xz" + SHA512 c8c42d084c297746548963f7ec7a7df46241886f3e637e779811ee4a8fee6058f892082bb2658f6777cbffba2de4bcdfd68e846ba63c6a6552c9efb0c8c1de50 + DEPS libintl libgettextpo libasprintf + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/libgettextpo-0.19.8.1-1-x86_64.pkg.tar.xz" + SHA512 480b782a79b0ce71ed9939ae3a6821fc2f5a63358733965c62cee027d0e6c88e255df1d62379ee47f5a7f8ffe163e554e318dba22c67dc67469b10aa3248edf7 + DEPS gcc-libs + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/libasprintf-0.19.8.1-1-x86_64.pkg.tar.xz" + SHA512 a2e8027b9bbee20f8cf60851130ca2af436641b1fb66054f8deba118da7ebecb1cd188224dcf08e4c5b7cde85b412efab058afef2358e843c9de8eb128ca448c + DEPS gcc-libs + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/libintl-0.19.8.1-1-x86_64.pkg.tar.xz" + SHA512 4e54c252b828c862f376d8f5a2410ee623a43d70cbb07d0b8ac20c25096f59fb3ae8dcd011d1792bec76f0b0b9411d0e184ee23707995761dc50eb76f9fc6b92 + DEPS libiconv + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/libiconv-1.16-1-x86_64.pkg.tar.xz" + SHA512 6f9b778d449410273a50cdd1af737cdcb8890a5536d78211477eed7382340253c7aadfb04977f1038ae4f4cef5a641f1acfda26fd06323d0b196a3e6da7fd425 + DEPS gcc-libs + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/gcc-libs-9.3.0-1-x86_64.pkg.tar.xz" + SHA512 2816afbf45aa0ff47f94a623ad083d9421bca5284dc55683c2f1bc09ea0eadfe720afb75aafef60c2ff6384d051c4fbe2a744bb16a20acf34c04dc59b17c3d8c + DEPS msys2-runtime + ) + msys_package( + URL "https://repo.msys2.org/msys/x86_64/msys2-runtime-3.1.6-3-x86_64.pkg.tar.xz" + SHA512 f094a7f4926195ef7ba015f0c5c56587b1faa94d85530f07aaaa5557a1494c3bd75257d4687c8401cbf1328d23e5586a92b05f0a872caebb1a7e941a07829776 + ) + + if(PACKAGES) + message(FATAL_ERROR "Unknown packages were required for vcpkg_acquire_msys(${_am_PACKAGES}): ${PACKAGES}\nThis can be resolved by explicitly passing URL/SHA pairs to DIRECT_PACKAGES.") + endif() + + string(SHA512 TOTAL_HASH "${TOTAL_HASH}") + string(SUBSTRING "${TOTAL_HASH}" 0 16 TOTAL_HASH) + set(PATH_TO_ROOT ${DOWNLOADS}/tools/msys2/${TOTAL_HASH}) + if(NOT EXISTS "${PATH_TO_ROOT}") + file(REMOVE_RECURSE ${PATH_TO_ROOT}.tmp) + file(MAKE_DIRECTORY ${PATH_TO_ROOT}.tmp/tmp) + set(I 0) + foreach(ARCHIVE IN LISTS ARCHIVES) + vcpkg_execute_required_process( + ALLOW_IN_DOWNLOAD_MODE + COMMAND ${CMAKE_COMMAND} -E tar xzf ${ARCHIVE} + LOGNAME msys-${TARGET_TRIPLET}-${I} + WORKING_DIRECTORY ${PATH_TO_ROOT}.tmp + ) + math(EXPR I "${I} + 1") + endforeach() + file(RENAME ${PATH_TO_ROOT}.tmp ${PATH_TO_ROOT}) + endif() + message(STATUS "Using msys root at ${DOWNLOADS}/tools/msys2/${TOTAL_HASH}") + set(${PATH_TO_ROOT_OUT} ${PATH_TO_ROOT} PARENT_SCOPE) +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_add_to_path.cmake b/vcpkg/scripts/cmake/vcpkg_add_to_path.cmake new file mode 100644 index 0000000..05763b2 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_add_to_path.cmake @@ -0,0 +1,39 @@ +## # vcpkg_add_to_path +## +## Add a directory to the PATH environment variable +## +## ## Usage +## ```cmake +## vcpkg_add_to_path([PREPEND] <${PYTHON3_DIR}>) +## ``` +## +## ## Parameters +## ### +## The directory to add +## +## ### PREPEND +## Prepends the directory. +## +## The default is to append. +## +## ## Examples: +## * [curl](https://github.com/Microsoft/vcpkg/blob/master/ports/curl/portfile.cmake#L75) +## * [folly](https://github.com/Microsoft/vcpkg/blob/master/ports/folly/portfile.cmake#L15) +## * [z3](https://github.com/Microsoft/vcpkg/blob/master/ports/z3/portfile.cmake#L13) +## +function(vcpkg_add_to_path) + if(NOT "${ARGC}" STREQUAL "1" AND NOT "${ARGC}" STREQUAL "2") + message(FATAL_ERROR "vcpkg_add_to_path() only accepts 1 or 2 arguments.") + endif() + if("${ARGV0}" STREQUAL "PREPEND") + if(NOT "${ARGC}" STREQUAL "2") + message(FATAL_ERROR "Expected second argument.") + endif() + set(ENV{PATH} "${ARGV1}${VCPKG_HOST_PATH_SEPARATOR}$ENV{PATH}") + else() + if(NOT "${ARGC}" STREQUAL "1") + message(FATAL_ERROR "Unexpected second argument: ${ARGV1}") + endif() + set(ENV{PATH} "$ENV{PATH}${VCPKG_HOST_PATH_SEPARATOR}${ARGV0}") + endif() +endfunction() \ No newline at end of file diff --git a/vcpkg/scripts/cmake/vcpkg_apply_patches.cmake b/vcpkg/scripts/cmake/vcpkg_apply_patches.cmake new file mode 100644 index 0000000..8ad5469 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_apply_patches.cmake @@ -0,0 +1,59 @@ +## # vcpkg_apply_patches +## +## Apply a set of patches to a source tree. This function is deprecated in favor of the `PATCHES` argument to `vcpkg_from_github()` et al. +## +## ## Usage +## ```cmake +## vcpkg_apply_patches( +## SOURCE_PATH <${SOURCE_PATH}> +## [QUIET] +## PATCHES ... +## ) +## ``` +## +## ## Parameters +## ### SOURCE_PATH +## The source path in which apply the patches. By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. +## +## ### PATCHES +## A list of patches that are applied to the source tree. +## +## Generally, these take the form of `${CMAKE_CURRENT_LIST_DIR}/some.patch` to select patches in the `port\\` directory. +## +## ### QUIET +## Disables the warning message upon failure. +## +## This should only be used for edge cases, such as patches that are known to fail even on a clean source tree. +## +## ## Examples +## +## * [libbson](https://github.com/Microsoft/vcpkg/blob/master/ports/libbson/portfile.cmake) +## * [gdal](https://github.com/Microsoft/vcpkg/blob/master/ports/gdal/portfile.cmake) + +include(vcpkg_execute_in_download_mode) + +function(vcpkg_apply_patches) + cmake_parse_arguments(_ap "QUIET" "SOURCE_PATH" "PATCHES" ${ARGN}) + + find_program(GIT NAMES git git.cmd) + set(PATCHNUM 0) + foreach(PATCH ${_ap_PATCHES}) + get_filename_component(ABSOLUTE_PATCH "${PATCH}" ABSOLUTE BASE_DIR "${CURRENT_PORT_DIR}") + message(STATUS "Applying patch ${PATCH}") + set(LOGNAME patch-${TARGET_TRIPLET}-${PATCHNUM}) + vcpkg_execute_in_download_mode( + COMMAND ${GIT} --work-tree=. --git-dir=.git apply "${ABSOLUTE_PATCH}" --ignore-whitespace --whitespace=nowarn --verbose + OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/${LOGNAME}-out.log + ERROR_VARIABLE error + WORKING_DIRECTORY ${_ap_SOURCE_PATH} + RESULT_VARIABLE error_code + ) + file(WRITE "${CURRENT_BUILDTREES_DIR}/${LOGNAME}-err.log" "${error}") + + if(error_code AND NOT _ap_QUIET) + message(FATAL_ERROR "Applying patch failed. ${error}") + endif() + + math(EXPR PATCHNUM "${PATCHNUM}+1") + endforeach() +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_build_cmake.cmake b/vcpkg/scripts/cmake/vcpkg_build_cmake.cmake new file mode 100644 index 0000000..f5867a1 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_build_cmake.cmake @@ -0,0 +1,105 @@ +## # vcpkg_build_cmake +## +## Build a cmake project. +## +## ## Usage: +## ```cmake +## vcpkg_build_cmake([DISABLE_PARALLEL] [TARGET ]) +## ``` +## +## ## Parameters: +## ### DISABLE_PARALLEL +## The underlying buildsystem will be instructed to not parallelize +## +## ### TARGET +## The target passed to the cmake build command (`cmake --build . --target `). If not specified, no target will +## be passed. +## +## ### ADD_BIN_TO_PATH +## Adds the appropriate Release and Debug `bin\` directories to the path during the build such that executables can run against the in-tree DLLs. +## +## ## Notes: +## This command should be preceeded by a call to [`vcpkg_configure_cmake()`](vcpkg_configure_cmake.md). +## You can use the alias [`vcpkg_install_cmake()`](vcpkg_configure_cmake.md) function if your CMake script supports the +## "install" target +## +## ## Examples: +## +## * [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) +## * [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) +## * [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake) +## * [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake) +function(vcpkg_build_cmake) + cmake_parse_arguments(_bc "DISABLE_PARALLEL;ADD_BIN_TO_PATH" "TARGET;LOGFILE_ROOT" "" ${ARGN}) + + if(NOT _bc_LOGFILE_ROOT) + set(_bc_LOGFILE_ROOT "build") + endif() + + set(PARALLEL_ARG) + set(NO_PARALLEL_ARG) + + if(_VCPKG_CMAKE_GENERATOR MATCHES "Ninja") + set(BUILD_ARGS "-v") # verbose output + set(PARALLEL_ARG "-j${VCPKG_CONCURRENCY}") + set(NO_PARALLEL_ARG "-j1") + elseif(_VCPKG_CMAKE_GENERATOR MATCHES "Visual Studio") + set(BUILD_ARGS + "/p:VCPkgLocalAppDataDisabled=true" + "/p:UseIntelMKL=No" + ) + set(PARALLEL_ARG "/m") + elseif(_VCPKG_CMAKE_GENERATOR MATCHES "NMake") + # No options are currently added for nmake builds + else() + message(FATAL_ERROR "Unrecognized GENERATOR setting from vcpkg_configure_cmake(). Valid generators are: Ninja, Visual Studio, and NMake Makefiles") + endif() + + if(_bc_TARGET) + set(TARGET_PARAM "--target" ${_bc_TARGET}) + else() + set(TARGET_PARAM) + endif() + + foreach(BUILDTYPE "debug" "release") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL BUILDTYPE) + if(BUILDTYPE STREQUAL "debug") + set(SHORT_BUILDTYPE "dbg") + set(CONFIG "Debug") + else() + set(SHORT_BUILDTYPE "rel") + set(CONFIG "Release") + endif() + + message(STATUS "Building ${TARGET_TRIPLET}-${SHORT_BUILDTYPE}") + + if(_bc_ADD_BIN_TO_PATH) + set(_BACKUP_ENV_PATH "$ENV{PATH}") + if(BUILDTYPE STREQUAL "debug") + vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/debug/bin") + else() + vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}/bin") + endif() + endif() + + if (_bc_DISABLE_PARALLEL) + vcpkg_execute_build_process( + COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} ${NO_PARALLEL_ARG} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE} + LOGNAME "${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}-${SHORT_BUILDTYPE}" + ) + else() + vcpkg_execute_build_process( + COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} ${PARALLEL_ARG} + NO_PARALLEL_COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG} ${TARGET_PARAM} -- ${BUILD_ARGS} ${NO_PARALLEL_ARG} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE} + LOGNAME "${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}-${SHORT_BUILDTYPE}" + ) + endif() + + if(_bc_ADD_BIN_TO_PATH) + set(ENV{PATH} "${_BACKUP_ENV_PATH}") + endif() + endif() + endforeach() +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_build_gn.cmake b/vcpkg/scripts/cmake/vcpkg_build_gn.cmake new file mode 100644 index 0000000..cf0ea89 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_build_gn.cmake @@ -0,0 +1,18 @@ +## # vcpkg_build_gn +## +## Build a GN project +## +## ## Usage: +## ```cmake +## vcpkg_build_gn( +## [TARGETS ...] +## ) +## ``` +## +## ## Parameters: +## ### TARGETS +## Only build the specified targets. + +function(vcpkg_build_gn) + vcpkg_build_ninja(${ARGN}) +endfunction() \ No newline at end of file diff --git a/vcpkg/scripts/cmake/vcpkg_build_make.cmake b/vcpkg/scripts/cmake/vcpkg_build_make.cmake new file mode 100644 index 0000000..7a3c211 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_build_make.cmake @@ -0,0 +1,200 @@ +## # vcpkg_build_make +## +## Build a linux makefile project. +## +## ## Usage: +## ```cmake +## vcpkg_build_make([BUILD_TARGET ] +## [ADD_BIN_TO_PATH] +## [ENABLE_INSTALL]) +## [LOGFILE_ROOT ]) +## ``` +## +## ### BUILD_TARGET +## The target passed to the make build command (`./make `). If not specified, the 'all' target will +## be passed. +## +## ### ADD_BIN_TO_PATH +## Adds the appropriate Release and Debug `bin\` directories to the path during the build such that executables can run against the in-tree DLLs. +## +## ### ENABLE_INSTALL +## IF the port supports the install target use vcpkg_install_make() instead of vcpkg_build_make() +## +## ### BUILD_TARGET +## The target passed to the make build command (`./make `). If not specified, the 'all' target will +## be passed. +## +## ### DISABLE_PARALLEL +## The underlying buildsystem will be instructed to not parallelize +## +## ## Notes: +## This command should be preceeded by a call to [`vcpkg_configure_make()`](vcpkg_configure_make.md). +## You can use the alias [`vcpkg_install_make()`](vcpkg_configure_make.md) function if your CMake script supports the +## "install" target +## +## ## Examples +## +## * [x264](https://github.com/Microsoft/vcpkg/blob/master/ports/x264/portfile.cmake) +## * [tcl](https://github.com/Microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake) +## * [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake) +## * [libosip2](https://github.com/Microsoft/vcpkg/blob/master/ports/libosip2/portfile.cmake) +function(vcpkg_build_make) + cmake_parse_arguments(_bc "ADD_BIN_TO_PATH;ENABLE_INSTALL;DISABLE_PARALLEL" "LOGFILE_ROOT;BUILD_TARGET" "" ${ARGN}) + + if(NOT _bc_LOGFILE_ROOT) + set(_bc_LOGFILE_ROOT "build") + endif() + + if(NOT _bc_BUILD_TARGET) + set(_bc_BUILD_TARGET "all") + endif() + + if(WIN32) + set(_VCPKG_PREFIX ${CURRENT_PACKAGES_DIR}) + set(_VCPKG_INSTALLED ${CURRENT_INSTALLED_DIR}) + else() + string(REPLACE " " "\ " _VCPKG_PREFIX "${CURRENT_PACKAGES_DIR}") + string(REPLACE " " "\ " _VCPKG_INSTALLED "${CURRENT_INSTALLED_DIR}") + endif() + + set(MAKE ) + set(MAKE_OPTS ) + set(INSTALL_OPTS ) + if (CMAKE_HOST_WIN32) + set(PATH_GLOBAL "$ENV{PATH}") + vcpkg_add_to_path(PREPEND "${SCRIPTS}/buildsystems/make_wrapper") + vcpkg_acquire_msys(MSYS_ROOT) + find_program(MAKE make REQUIRED) + set(MAKE_COMMAND "${MAKE}") + set(MAKE_OPTS ${_bc_MAKE_OPTIONS} -j ${VCPKG_CONCURRENCY} --trace -f Makefile ${_bc_BUILD_TARGET}) + set(NO_PARALLEL_MAKE_OPTS ${_bc_MAKE_OPTIONS} -j 1 --trace -f Makefile ${_bc_BUILD_TARGET}) + + string(REPLACE " " "\\\ " _VCPKG_PACKAGE_PREFIX ${CURRENT_PACKAGES_DIR}) + # Don't know why '/cygdrive' is suddenly a requirement here. (at least for x264) + string(REGEX REPLACE "([a-zA-Z]):/" "/cygdrive/\\1/" _VCPKG_PACKAGE_PREFIX "${_VCPKG_PACKAGE_PREFIX}") + set(INSTALL_OPTS -j ${VCPKG_CONCURRENCY} --trace -f Makefile install DESTDIR=${_VCPKG_PACKAGE_PREFIX}) + #TODO: optimize for install-data (release) and install-exec (release/debug) + else() + # Compiler requriements + find_program(MAKE make REQUIRED) + set(MAKE_COMMAND "${MAKE}") + # Set make command and install command + set(MAKE_OPTS ${_bc_MAKE_OPTIONS} V=1 -j ${VCPKG_CONCURRENCY} -f Makefile ${_bc_BUILD_TARGET}) + set(NO_PARALLEL_MAKE_OPTS ${_bc_MAKE_OPTIONS} V=1 -j 1 -f Makefile ${_bc_BUILD_TARGET}) + set(INSTALL_OPTS -j ${VCPKG_CONCURRENCY} -f Makefile install DESTDIR=${CURRENT_PACKAGES_DIR}) + endif() + + # Since includes are buildtype independent those are setup by vcpkg_configure_make + _vcpkg_backup_env_variables(LIB LIBPATH LIBRARY_PATH LD_LIBRARY_PATH) + + foreach(BUILDTYPE "debug" "release") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL BUILDTYPE) + if(BUILDTYPE STREQUAL "debug") + # Skip debug generate + if (_VCPKG_NO_DEBUG) + continue() + endif() + set(SHORT_BUILDTYPE "-dbg") + set(CMAKE_BUILDTYPE "DEBUG") + set(PATH_SUFFIX "/debug") + else() + # In NO_DEBUG mode, we only use ${TARGET_TRIPLET} directory. + if (_VCPKG_NO_DEBUG) + set(SHORT_BUILDTYPE "") + else() + set(SHORT_BUILDTYPE "-rel") + endif() + set(CMAKE_BUILDTYPE "RELEASE") + set(PATH_SUFFIX "") + endif() + + set(WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}${SHORT_BUILDTYPE}") + + message(STATUS "Building ${TARGET_TRIPLET}${SHORT_BUILDTYPE}") + + set(ENV{LIB} "${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link/${LIB_PATHLIKE_CONCAT}") + set(ENV{LIBPATH} "${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link/${LIBPATH_PATHLIKE_CONCAT}") + set(ENV{LIBRARY_PATH} "${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX}/lib/manual-link/${LIBRARY_PATH_PATHLIKE_CONCAT}") + #set(ENV{LD_LIBRARY_PATH} "${_VCPKG_INSTALLED}${PATH_SUFFIX_${BUILDTYPE}}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX_${BUILDTYPE}}/lib/manual-link/${LD_LIBRARY_PATH_PATHLIKE_CONCAT}") + + if(_bc_ADD_BIN_TO_PATH) + set(_BACKUP_ENV_PATH "$ENV{PATH}") + vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}${PATH_SUFFIX}/bin") + endif() + + if(MAKE_BASH) + set(MAKE_CMD_LINE "${MAKE_COMMAND} ${MAKE_OPTS}") + set(NO_PARALLEL_MAKE_CMD_LINE "${MAKE_COMMAND} ${NO_PARALLEL_MAKE_OPTS}") + else() + set(MAKE_CMD_LINE ${MAKE_COMMAND} ${MAKE_OPTS}) + set(NO_PARALLEL_MAKE_CMD_LINE ${MAKE_COMMAND} ${NO_PARALLEL_MAKE_OPTS}) + endif() + if (_bc_DISABLE_PARALLEL) + vcpkg_execute_build_process( + COMMAND ${MAKE_BASH} ${MAKE_CMD_LINE} + WORKING_DIRECTORY "${WORKING_DIRECTORY}" + LOGNAME "${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}${SHORT_BUILDTYPE}" + ) + else() + vcpkg_execute_build_process( + COMMAND ${MAKE_BASH} ${MAKE_CMD_LINE} + NO_PARALLEL_COMMAND ${MAKE_BASH} ${NO_PARALLEL_MAKE_CMD_LINE} + WORKING_DIRECTORY "${WORKING_DIRECTORY}" + LOGNAME "${_bc_LOGFILE_ROOT}-${TARGET_TRIPLET}${SHORT_BUILDTYPE}" + ) + endif() + + if(_bc_ADD_BIN_TO_PATH) + set(ENV{PATH} "${_BACKUP_ENV_PATH}") + endif() + endif() + endforeach() + + if (_bc_ENABLE_INSTALL) + foreach(BUILDTYPE "debug" "release") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL BUILDTYPE) + if(BUILDTYPE STREQUAL "debug") + # Skip debug generate + if (_VCPKG_NO_DEBUG) + continue() + endif() + set(SHORT_BUILDTYPE "-dbg") + else() + # In NO_DEBUG mode, we only use ${TARGET_TRIPLET} directory. + if (_VCPKG_NO_DEBUG) + set(SHORT_BUILDTYPE "") + else() + set(SHORT_BUILDTYPE "-rel") + endif() + endif() + + message(STATUS "Installing ${TARGET_TRIPLET}${SHORT_BUILDTYPE}") + + if(MAKE_BASH) + set(MAKE_CMD_LINE "${MAKE_COMMAND} ${INSTALL_OPTS}") + else() + set(MAKE_CMD_LINE ${MAKE_COMMAND} ${INSTALL_OPTS}) + endif() + + set(WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}${SHORT_BUILDTYPE}") + vcpkg_execute_build_process( + COMMAND ${MAKE_BASH} ${MAKE_CMD_LINE} + WORKING_DIRECTORY "${WORKING_DIRECTORY}" + LOGNAME "install-${TARGET_TRIPLET}${SHORT_BUILDTYPE}" + ) + + endif() + endforeach() + string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_INSTALL_PREFIX "${CURRENT_INSTALLED_DIR}") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}_tmp") + file(RENAME "${CURRENT_PACKAGES_DIR}" "${CURRENT_PACKAGES_DIR}_tmp") + file(RENAME "${CURRENT_PACKAGES_DIR}_tmp${_VCPKG_INSTALL_PREFIX}/" "${CURRENT_PACKAGES_DIR}") + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}_tmp") + endif() + + if (CMAKE_HOST_WIN32) + set(ENV{PATH} "${PATH_GLOBAL}") + endif() + + _vcpkg_restore_env_variables(LIB LIBPATH LIBRARY_PATH LD_LIBRARY_PATH) +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_build_msbuild.cmake b/vcpkg/scripts/cmake/vcpkg_build_msbuild.cmake new file mode 100644 index 0000000..bc118b4 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_build_msbuild.cmake @@ -0,0 +1,143 @@ +## # vcpkg_build_msbuild +## +## Build a msbuild-based project. Deprecated in favor of `vcpkg_install_msbuild()`. +## +## ## Usage +## ```cmake +## vcpkg_build_msbuild( +## PROJECT_PATH <${SOURCE_PATH}/port.sln> +## [RELEASE_CONFIGURATION ] +## [DEBUG_CONFIGURATION ] +## [TARGET ] +## [TARGET_PLATFORM_VERSION <10.0.15063.0>] +## [PLATFORM <${TRIPLET_SYSTEM_ARCH}>] +## [PLATFORM_TOOLSET <${VCPKG_PLATFORM_TOOLSET}>] +## [OPTIONS ...] +## [OPTIONS_RELEASE ...] +## [OPTIONS_DEBUG ...] +## [USE_VCPKG_INTEGRATION] +## ) +## ``` +## +## ## Parameters +## ### USE_VCPKG_INTEGRATION +## Apply the normal `integrate install` integration for building the project. +## +## By default, projects built with this command will not automatically link libraries or have header paths set. +## +## ### PROJECT_PATH +## The path to the solution (`.sln`) or project (`.vcxproj`) file. +## +## ### RELEASE_CONFIGURATION +## The configuration (``/p:Configuration`` msbuild parameter) used for Release builds. +## +## ### DEBUG_CONFIGURATION +## The configuration (``/p:Configuration`` msbuild parameter) +## used for Debug builds. +## +## ### TARGET_PLATFORM_VERSION +## The WindowsTargetPlatformVersion (``/p:WindowsTargetPlatformVersion`` msbuild parameter) +## +## ### TARGET +## The MSBuild target to build. (``/t:``) +## +## ### PLATFORM +## The platform (``/p:Platform`` msbuild parameter) used for the build. +## +## ### PLATFORM_TOOLSET +## The platform toolset (``/p:PlatformToolset`` msbuild parameter) used for the build. +## +## ### OPTIONS +## Additional options passed to msbuild for all builds. +## +## ### OPTIONS_RELEASE +## Additional options passed to msbuild for Release builds. These are in addition to `OPTIONS`. +## +## ### OPTIONS_DEBUG +## Additional options passed to msbuild for Debug builds. These are in addition to `OPTIONS`. +## +## ## Examples +## +## * [chakracore](https://github.com/Microsoft/vcpkg/blob/master/ports/chakracore/portfile.cmake) +## * [cppunit](https://github.com/Microsoft/vcpkg/blob/master/ports/cppunit/portfile.cmake) + +function(vcpkg_build_msbuild) + cmake_parse_arguments( + _csc + "USE_VCPKG_INTEGRATION" + "PROJECT_PATH;RELEASE_CONFIGURATION;DEBUG_CONFIGURATION;PLATFORM;PLATFORM_TOOLSET;TARGET_PLATFORM_VERSION;TARGET" + "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG" + ${ARGN} + ) + + if(NOT DEFINED _csc_RELEASE_CONFIGURATION) + set(_csc_RELEASE_CONFIGURATION Release) + endif() + if(NOT DEFINED _csc_DEBUG_CONFIGURATION) + set(_csc_DEBUG_CONFIGURATION Debug) + endif() + if(NOT DEFINED _csc_PLATFORM) + set(_csc_PLATFORM ${TRIPLET_SYSTEM_ARCH}) + endif() + if(NOT DEFINED _csc_PLATFORM_TOOLSET) + set(_csc_PLATFORM_TOOLSET ${VCPKG_PLATFORM_TOOLSET}) + endif() + if(NOT DEFINED _csc_TARGET_PLATFORM_VERSION) + vcpkg_get_windows_sdk(_csc_TARGET_PLATFORM_VERSION) + endif() + if(NOT DEFINED _csc_TARGET) + set(_csc_TARGET Rebuild) + endif() + + list(APPEND _csc_OPTIONS + /t:${_csc_TARGET} + /p:Platform=${_csc_PLATFORM} + /p:PlatformToolset=${_csc_PLATFORM_TOOLSET} + /p:VCPkgLocalAppDataDisabled=true + /p:UseIntelMKL=No + /p:WindowsTargetPlatformVersion=${_csc_TARGET_PLATFORM_VERSION} + /p:VcpkgManifestInstall=false + /m + ) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + # Disable LTCG for static libraries because this setting introduces ABI incompatibility between minor compiler versions + # TODO: Add a way for the user to override this if they want to opt-in to incompatibility + list(APPEND _csc_OPTIONS /p:WholeProgramOptimization=false) + endif() + + if(_csc_USE_VCPKG_INTEGRATION) + list( + APPEND _csc_OPTIONS + /p:ForceImportBeforeCppTargets=${SCRIPTS}/buildsystems/msbuild/vcpkg.targets + "/p:VcpkgTriplet=${TARGET_TRIPLET}" + "/p:VcpkgCurrentInstalledDir=${CURRENT_INSTALLED_DIR}" + ) + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Building ${_csc_PROJECT_PATH} for Release") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + vcpkg_execute_required_process( + COMMAND msbuild ${_csc_PROJECT_PATH} + /p:Configuration=${_csc_RELEASE_CONFIGURATION} + ${_csc_OPTIONS} + ${_csc_OPTIONS_RELEASE} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME build-${TARGET_TRIPLET}-rel + ) + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Building ${_csc_PROJECT_PATH} for Debug") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + vcpkg_execute_required_process( + COMMAND msbuild ${_csc_PROJECT_PATH} + /p:Configuration=${_csc_DEBUG_CONFIGURATION} + ${_csc_OPTIONS} + ${_csc_OPTIONS_DEBUG} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + endif() +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_build_ninja.cmake b/vcpkg/scripts/cmake/vcpkg_build_ninja.cmake new file mode 100644 index 0000000..3eb05c9 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_build_ninja.cmake @@ -0,0 +1,37 @@ +## # vcpkg_build_ninja +## +## Build a ninja project +## +## ## Usage: +## ```cmake +## vcpkg_build_ninja( +## [TARGETS ...] +## ) +## ``` +## +## ## Parameters: +## ### TARGETS +## Only build the specified targets. + +function(vcpkg_build_ninja) + cmake_parse_arguments(_vbn "" "" "TARGETS" ${ARGN}) + + vcpkg_find_acquire_program(NINJA) + + function(build CONFIG) + message(STATUS "Building (${CONFIG})...") + vcpkg_execute_build_process( + COMMAND "${NINJA}" -C "${CURRENT_BUILDTREES_DIR}/${CONFIG}" ${_vbn_TARGETS} + WORKING_DIRECTORY "${SOURCE_PATH}" + LOGNAME build-${CONFIG} + ) + endfunction() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + build(${TARGET_TRIPLET}-dbg) + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + build(${TARGET_TRIPLET}-rel) + endif() +endfunction() \ No newline at end of file diff --git a/vcpkg/scripts/cmake/vcpkg_build_nmake.cmake b/vcpkg/scripts/cmake/vcpkg_build_nmake.cmake new file mode 100644 index 0000000..8cf0747 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_build_nmake.cmake @@ -0,0 +1,222 @@ +## # vcpkg_build_nmake +## +## Build a msvc makefile project. +## +## ## Usage: +## ```cmake +## vcpkg_build_nmake( +## SOURCE_PATH <${SOURCE_PATH}> +## [NO_DEBUG] +## [PROJECT_SUBPATH <${SUBPATH}>] +## [PROJECT_NAME <${MAKEFILE_NAME}>] +## [PRERUN_SHELL <${SHELL_PATH}>] +## [PRERUN_SHELL_DEBUG <${SHELL_PATH}>] +## [PRERUN_SHELL_RELEASE <${SHELL_PATH}>] +## [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] +## [OPTIONS_RELEASE <-DOPTIMIZE=1>...] +## [OPTIONS_DEBUG <-DDEBUGGABLE=1>...] +## [TARGET ]) +## ``` +## +## ## Parameters +## ### SOURCE_PATH +## Specifies the directory containing the source files. +## By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. +## +## ### PROJECT_SUBPATH +## Specifies the sub directory containing the `makefile.vc`/`makefile.mak`/`makefile.msvc` or other msvc makefile. +## +## ### PROJECT_NAME +## Specifies the name of msvc makefile name. +## Default is `makefile.vc` +## +## ### NO_DEBUG +## This port doesn't support debug mode. +## +## ### ENABLE_INSTALL +## Install binaries after build. +## +## ### PRERUN_SHELL +## Script that needs to be called before build +## +## ### PRERUN_SHELL_DEBUG +## Script that needs to be called before debug build +## +## ### PRERUN_SHELL_RELEASE +## Script that needs to be called before release build +## +## ### OPTIONS +## Additional options passed to generate during the generation. +## +## ### OPTIONS_RELEASE +## Additional options passed to generate during the Release generation. These are in addition to `OPTIONS`. +## +## ### OPTIONS_DEBUG +## Additional options passed to generate during the Debug generation. These are in addition to `OPTIONS`. +## +## ### TARGET +## The target passed to the nmake build command (`nmake/nmake install`). If not specified, no target will +## be passed. +## +## ### ADD_BIN_TO_PATH +## Adds the appropriate Release and Debug `bin\` directories to the path during the build such that executables can run against the in-tree DLLs. +## +## ## Notes: +## This command should be preceeded by a call to [`vcpkg_configure_nmake()`](vcpkg_configure_nmake.md). +## You can use the alias [`vcpkg_install_nmake()`](vcpkg_configure_nmake.md) function if your CMake script supports the +## "install" target +## +## ## Examples +## +## * [tcl](https://github.com/Microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake) +## * [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake) +function(vcpkg_build_nmake) + cmake_parse_arguments(_bn + "ADD_BIN_TO_PATH;ENABLE_INSTALL;NO_DEBUG" + "SOURCE_PATH;PROJECT_SUBPATH;PROJECT_NAME;LOGFILE_ROOT" + "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG;PRERUN_SHELL;PRERUN_SHELL_DEBUG;PRERUN_SHELL_RELEASE" + ${ARGN} + ) + + if (NOT CMAKE_HOST_WIN32) + message(FATAL_ERROR "vcpkg_build_nmake only support windows.") + endif() + + if (_bn_OPTIONS_DEBUG STREQUAL _bn_OPTIONS_RELEASE) + message(FATAL_ERROR "Detected debug configuration is equal to release configuration, please use NO_DEBUG for vcpkg_build_nmake/vcpkg_install_nmake") + endif() + + if(NOT _bn_LOGFILE_ROOT) + set(_bn_LOGFILE_ROOT "build") + endif() + + if (NOT _bn_PROJECT_NAME) + set(MAKEFILE_NAME makefile.vc) + else() + set(MAKEFILE_NAME ${_bn_PROJECT_NAME}) + endif() + + set(MAKE ) + set(MAKE_OPTS_BASE ) + set(INSTALL_OPTS_BASE ) + + find_program(NMAKE nmake REQUIRED) + get_filename_component(NMAKE_EXE_PATH ${NMAKE} DIRECTORY) + # Load toolchains + if(NOT VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/windows.cmake") + endif() + include("${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") + # Set needed env + set(ENV{PATH} "$ENV{PATH};${NMAKE_EXE_PATH}") + set(ENV{INCLUDE} "${CURRENT_INSTALLED_DIR}/include;$ENV{INCLUDE}") + # Set make command and install command + set(MAKE ${NMAKE} /NOLOGO /G /U) + set(MAKE_OPTS_BASE -f ${MAKEFILE_NAME} all) + set(INSTALL_OPTS_BASE install) + # Add subpath to work directory + if (_bn_PROJECT_SUBPATH) + set(_bn_PROJECT_SUBPATH /${_bn_PROJECT_SUBPATH}) + else() + set(_bn_PROJECT_SUBPATH ) + endif() + + foreach(BUILDTYPE "debug" "release") + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL BUILDTYPE) + if(BUILDTYPE STREQUAL "debug") + # Skip debug generate + if (_bn_NO_DEBUG) + continue() + endif() + # Generate obj dir suffix + set(SHORT_BUILDTYPE "-dbg") + set(CONFIG "Debug") + # Add install command and arguments + set(MAKE_OPTS ${MAKE_OPTS_BASE}) + if (_bn_ENABLE_INSTALL) + set(INSTALL_OPTS ${INSTALL_OPTS_BASE} INSTALLDIR=${CURRENT_PACKAGES_DIR}/debug) + set(MAKE_OPTS ${MAKE_OPTS} ${INSTALL_OPTS}) + endif() + set(MAKE_OPTS ${MAKE_OPTS} ${_bn_OPTIONS} ${_bn_OPTIONS_DEBUG}) + + unset(ENV{CL}) + set(TMP_CL_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}") + string(REPLACE "/" "-" TMP_CL_FLAGS "${TMP_CL_FLAGS}") + set(ENV{CL} "$ENV{CL} ${TMP_CL_FLAGS}") + else() + # In NO_DEBUG mode, we only use ${TARGET_TRIPLET} directory. + if (_bn_NO_DEBUG) + set(SHORT_BUILDTYPE "") + else() + set(SHORT_BUILDTYPE "-rel") + endif() + set(CONFIG "Release") + # Add install command and arguments + set(MAKE_OPTS ${MAKE_OPTS_BASE}) + if (_bn_ENABLE_INSTALL) + set(INSTALL_OPTS ${INSTALL_OPTS_BASE} INSTALLDIR=${CURRENT_PACKAGES_DIR}) + set(MAKE_OPTS ${MAKE_OPTS} ${INSTALL_OPTS}) + endif() + set(MAKE_OPTS ${MAKE_OPTS} ${_bn_OPTIONS} ${_bn_OPTIONS_RELEASE}) + + unset(ENV{CL}) + set(TMP_CL_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}") + string(REPLACE "/" "-" TMP_CL_FLAGS "${TMP_CL_FLAGS}") + set(ENV{CL} "$ENV{CL} ${TMP_CL_FLAGS}") + endif() + + set(CURRENT_TRIPLET_NAME ${TARGET_TRIPLET}${SHORT_BUILDTYPE}) + set(OBJ_DIR ${CURRENT_BUILDTREES_DIR}/${CURRENT_TRIPLET_NAME}) + + file(REMOVE_RECURSE ${OBJ_DIR}) + file(MAKE_DIRECTORY ${OBJ_DIR}) + file(GLOB_RECURSE SOURCE_FILES ${_bn_SOURCE_PATH}/*) + foreach(ONE_SOUCRCE_FILE ${SOURCE_FILES}) + get_filename_component(DST_DIR ${ONE_SOUCRCE_FILE} PATH) + string(REPLACE "${_bn_SOURCE_PATH}" "${OBJ_DIR}" DST_DIR "${DST_DIR}") + file(COPY ${ONE_SOUCRCE_FILE} DESTINATION ${DST_DIR}) + endforeach() + + if (_bn_PRERUN_SHELL) + message(STATUS "Prerunning ${CURRENT_TRIPLET_NAME}") + vcpkg_execute_required_process( + COMMAND ${_bn_PRERUN_SHELL} + WORKING_DIRECTORY ${OBJ_DIR}${_bn_PROJECT_SUBPATH} + LOGNAME "$prerun-${CURRENT_TRIPLET_NAME}" + ) + endif() + if (BUILDTYPE STREQUAL "debug" AND _bn_PRERUN_SHELL_DEBUG) + message(STATUS "Prerunning ${CURRENT_TRIPLET_NAME}") + vcpkg_execute_required_process( + COMMAND "${_bn_PRERUN_SHELL_DEBUG}" + WORKING_DIRECTORY ${OBJ_DIR}${_bn_PROJECT_SUBPATH} + LOGNAME "prerun-${CURRENT_TRIPLET_NAME}-dbg" + ) + endif() + if (BUILDTYPE STREQUAL "release" AND _bn_PRERUN_SHELL_RELEASE) + message(STATUS "Prerunning ${CURRENT_TRIPLET_NAME}") + vcpkg_execute_required_process( + COMMAND ${_bn_PRERUN_SHELL_RELEASE} + WORKING_DIRECTORY ${OBJ_DIR}${_bn_PROJECT_SUBPATH} + LOGNAME "prerun-${CURRENT_TRIPLET_NAME}-rel" + ) + endif() + + if (NOT _bn_ENABLE_INSTALL) + message(STATUS "Building ${CURRENT_TRIPLET_NAME}") + else() + message(STATUS "Building and installing ${CURRENT_TRIPLET_NAME}") + endif() + + vcpkg_execute_build_process( + COMMAND ${MAKE} ${MAKE_OPTS} + WORKING_DIRECTORY ${OBJ_DIR}${_bn_PROJECT_SUBPATH} + LOGNAME "${_bn_LOGFILE_ROOT}-${CURRENT_TRIPLET_NAME}" + ) + + if(_bn_ADD_BIN_TO_PATH) + set(ENV{PATH} "${_BACKUP_ENV_PATH}") + endif() + endif() + endforeach() +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_build_qmake.cmake b/vcpkg/scripts/cmake/vcpkg_build_qmake.cmake new file mode 100644 index 0000000..deecf4f --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_build_qmake.cmake @@ -0,0 +1,74 @@ +#.rst: +# .. command:: vcpkg_build_qmake +# +# Build a qmake-based project, previously configured using vcpkg_configure_qmake. +# +# :: +# vcpkg_build_qmake() +# +function(vcpkg_build_qmake) + cmake_parse_arguments(_csc "SKIP_MAKEFILES" "BUILD_LOGNAME" "TARGETS;RELEASE_TARGETS;DEBUG_TARGETS" ${ARGN}) + + if(CMAKE_HOST_WIN32) + vcpkg_find_acquire_program(JOM) + set(INVOKE "${JOM}") + else() + find_program(MAKE make) + set(INVOKE "${MAKE}") + endif() + + # Make sure that the linker finds the libraries used + set(ENV_PATH_BACKUP "$ENV{PATH}") + + file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR) + + if(NOT _csc_BUILD_LOGNAME) + set(_csc_BUILD_LOGNAME build) + endif() + + function(run_jom TARGETS LOG_PREFIX LOG_SUFFIX) + message(STATUS "Package ${LOG_PREFIX}-${TARGET_TRIPLET}-${LOG_SUFFIX}") + vcpkg_execute_build_process( + COMMAND ${INVOKE} -j ${VCPKG_CONCURRENCY} ${TARGETS} + NO_PARALLEL_COMMAND ${INVOKE} -j 1 ${TARGETS} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${LOG_SUFFIX} + LOGNAME package-${LOG_PREFIX}-${TARGET_TRIPLET}-${LOG_SUFFIX} + ) + endfunction() + + # This fixes issues on machines with default codepages that are not ASCII compatible, such as some CJK encodings + set(ENV_CL_BACKUP "$ENV{_CL_}") + set(ENV{_CL_} "/utf-8") + + #Replace with VCPKG variables if PR #7733 is merged + unset(BUILDTYPES) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + set(_buildname "DEBUG") + list(APPEND BUILDTYPES ${_buildname}) + set(_short_name_${_buildname} "dbg") + set(_path_suffix_${_buildname} "/debug") + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + set(_buildname "RELEASE") + list(APPEND BUILDTYPES ${_buildname}) + set(_short_name_${_buildname} "rel") + set(_path_suffix_${_buildname} "") + endif() + unset(_buildname) + + foreach(_buildname ${BUILDTYPES}) + set(_BUILD_PREFIX "${_path_suffix_${_buildname}}") + vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}${_BUILD_PREFIX}/bin") + vcpkg_add_to_path(PREPEND "${CURRENT_INSTALLED_DIR}${_BUILD_PREFIX}/lib") + list(APPEND _csc_${_buildname}_TARGETS ${_csc_TARGETS}) + if(NOT _csc_SKIP_MAKEFILES) + run_jom(qmake_all makefiles ${_short_name_${_buildname}}) + endif() + run_jom("${_csc_${_buildname}_TARGETS}" ${_csc_BUILD_LOGNAME} ${_short_name_${_buildname}}) + unset(_BUILD_PREFIX) + endforeach() + + # Restore the original value of ENV{PATH} + set(ENV{PATH} "${ENV_PATH_BACKUP}") + set(ENV{_CL_} "${ENV_CL_BACKUP}") +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_buildpath_length_warning.cmake b/vcpkg/scripts/cmake/vcpkg_buildpath_length_warning.cmake new file mode 100644 index 0000000..b7ef10b --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_buildpath_length_warning.cmake @@ -0,0 +1,8 @@ +function(vcpkg_buildpath_length_warning WARNING_LENGTH) + string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH) + if(BUILDTREES_PATH_LENGTH GREATER ${WARNING_LENGTH} AND CMAKE_HOST_WIN32) + message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" + "We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command." + ) + endif() +endfunction() \ No newline at end of file diff --git a/vcpkg/scripts/cmake/vcpkg_check_features.cmake b/vcpkg/scripts/cmake/vcpkg_check_features.cmake new file mode 100644 index 0000000..81ebc23 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_check_features.cmake @@ -0,0 +1,191 @@ +## # vcpkg_check_features +## Check if one or more features are a part of a package installation. +## +## ## Usage +## ```cmake +## vcpkg_check_features( +## OUT_FEATURE_OPTIONS +## [FEATURES +## +## [ ] +## ...] +## [INVERTED_FEATURES +## +## [ ] +## ...] +## ) +## ``` +## `vcpkg_check_features()` accepts these parameters: +## +## * `OUT_FEATURE_OPTIONS`: +## An output variable, the function will clear the variable passed to `OUT_FEATURE_OPTIONS` +## and then set it to contain a list of option definitions (`-D=ON|OFF`). +## +## This should be set to `FEATURE_OPTIONS` by convention. +## +## * `FEATURES`: +## A list of (`FEATURE_NAME`, `OPTION_NAME`) pairs. +## For each `FEATURE_NAME` a definition is added to `OUT_FEATURE_OPTIONS` in the form of: +## +## * `-D=ON`, if a feature is specified for installation, +## * `-D=OFF`, otherwise. +## +## * `INVERTED_FEATURES`: +## A list of (`FEATURE_NAME`, `OPTION_NAME`) pairs, uses reversed logic from `FEATURES`. +## For each `FEATURE_NAME` a definition is added to `OUT_FEATURE_OPTIONS` in the form of: +## +## * `-D=OFF`, if a feature is specified for installation, +## * `-D=ON`, otherwise. +## +## +## ## Notes +## +## The `FEATURES` name parameter can be omitted if no `INVERTED_FEATURES` are used. +## +## At least one (`FEATURE_NAME`, `OPTION_NAME`) pair must be passed to the function call. +## +## Arguments passed to `FEATURES` and `INVERTED_FEATURES` are not validated to prevent duplication. +## If the same (`FEATURE_NAME`, `OPTION_NAME`) pair is passed to both lists, +## two conflicting definitions are added to `OUT_FEATURE_OPTIONS`. +## +## +## ## Examples +## +## ### Example 1: Regular features +## +## ```cmake +## $ ./vcpkg install mimalloc[asm,secure] +## +## # ports/mimalloc/portfile.cmake +## vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS +## # Keyword FEATURES is optional if INVERTED_FEATURES are not used +## asm MI_SEE_ASM +## override MI_OVERRIDE +## secure MI_SECURE +## ) +## +## vcpkg_configure_cmake( +## SOURCE_PATH ${SOURCE_PATH} +## PREFER_NINJA +## OPTIONS +## # Expands to "-DMI_SEE_ASM=ON; -DMI_OVERRIDE=OFF; -DMI_SECURE=ON" +## ${FEATURE_OPTIONS} +## ) +## ``` +## +## ### Example 2: Inverted features +## +## ```cmake +## $ ./vcpkg install cpprestsdk[websockets] +## +## # ports/cpprestsdk/portfile.cmake +## vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS +## INVERTED_FEATURES # <- Keyword INVERTED_FEATURES required +## brotli CPPREST_EXCLUDE_BROTLI +## websockets CPPREST_EXCLUDE_WEBSOCKETS +## ) +## +## vcpkg_configure_cmake( +## SOURCE_PATH ${SOURCE_PATH} +## PREFER_NINJA +## OPTIONS +## # Expands to "-DCPPREST_EXCLUDE_BROTLI=ON; -DCPPREST_EXCLUDE_WEBSOCKETS=OFF" +## ${FEATURE_OPTIONS} +## ) +## ``` +## +## ### Example 3: Set multiple options for same feature +## +## ```cmake +## $ ./vcpkg install pcl[cuda] +## +## # ports/pcl/portfile.cmake +## vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS +## cuda WITH_CUDA +## cuda BUILD_CUDA +## cuda BUILD_GPU +## ) +## +## vcpkg_configure_cmake( +## SOURCE_PATH ${SOURCE_PATH} +## PREFER_NINJA +## OPTIONS +## # Expands to "-DWITH_CUDA=ON; -DBUILD_CUDA=ON; -DBUILD_GPU=ON" +## ${FEATURE_OPTIONS} +## ) +## ``` +## +## ### Example 4: Use regular and inverted features +## +## ```cmake +## $ ./vcpkg install rocksdb[tbb] +## +## # ports/rocksdb/portfile.cmake +## vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS +## FEATURES # <- Keyword FEATURES is required because INVERTED_FEATURES are being used +## tbb WITH_TBB +## INVERTED_FEATURES +## tbb ROCKSDB_IGNORE_PACKAGE_TBB +## ) +## +## vcpkg_configure_cmake( +## SOURCE_PATH ${SOURCE_PATH} +## PREFER_NINJA +## OPTIONS +## # Expands to "-DWITH_TBB=ON; -DROCKSDB_IGNORE_PACKAGE_TBB=OFF" +## ${FEATURE_OPTIONS} +## ) +## ``` +## +## ## Examples in portfiles +## +## * [cpprestsdk](https://github.com/microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) +## * [pcl](https://github.com/microsoft/vcpkg/blob/master/ports/pcl/portfile.cmake) +## * [rocksdb](https://github.com/microsoft/vcpkg/blob/master/ports/rocksdb/portfile.cmake) +## +function(vcpkg_check_features) + cmake_parse_arguments(_vcf "" "OUT_FEATURE_OPTIONS" "FEATURES;INVERTED_FEATURES" ${ARGN}) + + if (NOT DEFINED _vcf_OUT_FEATURE_OPTIONS) + message(FATAL_ERROR "OUT_FEATURE_OPTIONS must be specified.") + endif() + + macro(_check_features _vcf_ARGUMENT _set_if _set_else) + list(LENGTH ${_vcf_ARGUMENT} FEATURES_SET_LEN) + math(EXPR _vcf_INCORRECT_ARGN "${FEATURES_SET_LEN} % 2") + if(_vcf_INCORRECT_ARGN) + message(FATAL_ERROR "Called with incorrect number of arguments.") + endif() + + set(_vcf_IS_FEATURE_NAME_ARG ON) + foreach(_vcf_ARG ${${_vcf_ARGUMENT}}) + if(_vcf_IS_FEATURE_NAME_ARG) + set(_vcf_FEATURE_NAME ${_vcf_ARG}) + if(NOT ${_vcf_FEATURE_NAME} IN_LIST ALL_FEATURES) + message(FATAL_ERROR "Unknown feature: ${_vcf_FEATURE_NAME}") + endif() + set(_vcf_IS_FEATURE_NAME_ARG OFF) + else() + set(_vcf_FEATURE_VARIABLE ${_vcf_ARG}) + if(${_vcf_FEATURE_NAME} IN_LIST FEATURES) + list(APPEND _vcf_FEATURE_OPTIONS "-D${_vcf_FEATURE_VARIABLE}=${_set_if}") + else() + list(APPEND _vcf_FEATURE_OPTIONS "-D${_vcf_FEATURE_VARIABLE}=${_set_else}") + endif() + set(_vcf_IS_FEATURE_NAME_ARG ON) + endif() + endforeach() + endmacro() + + set(_vcf_FEATURE_OPTIONS) + + if (DEFINED _vcf_FEATURES OR DEFINED _vcf_INVERTED_FEATURES) + _check_features(_vcf_FEATURES ON OFF) + _check_features(_vcf_INVERTED_FEATURES OFF ON) + else() + # Skip arguments that correspond to OUT_FEATURE_OPTIONS and its value. + list(SUBLIST ARGN 2 -1 _vcf_ARGN) + _check_features(_vcf_ARGN ON OFF) + endif() + set(${_vcf_OUT_FEATURE_OPTIONS} "${_vcf_FEATURE_OPTIONS}" PARENT_SCOPE) +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_check_linkage.cmake b/vcpkg/scripts/cmake/vcpkg_check_linkage.cmake new file mode 100644 index 0000000..101adc4 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_check_linkage.cmake @@ -0,0 +1,53 @@ +## # vcpkg_check_linkage +## +## Asserts the available library and CRT linkage options for the port. +## +## ## Usage +## ```cmake +## vcpkg_check_linkage( +## [ONLY_STATIC_LIBRARY | ONLY_DYNAMIC_LIBRARY] +## [ONLY_STATIC_CRT | ONLY_DYNAMIC_CRT] +## ) +## ``` +## +## ## Parameters +## ### ONLY_STATIC_LIBRARY +## Indicates that this port can only be built with static library linkage. +## +## ### ONLY_DYNAMIC_LIBRARY +## Indicates that this port can only be built with dynamic/shared library linkage. +## +## ### ONLY_STATIC_CRT +## Indicates that this port can only be built with static CRT linkage. +## +## ### ONLY_DYNAMIC_CRT +## Indicates that this port can only be built with dynamic/shared CRT linkage. +## +## ## Notes +## This command will either alter the settings for `VCPKG_LIBRARY_LINKAGE` or fail, depending on what was requested by the user versus what the library supports. +## +## ## Examples +## +## * [libimobiledevice](https://github.com/Microsoft/vcpkg/blob/master/ports/libimobiledevice/portfile.cmake) +function(vcpkg_check_linkage) + cmake_parse_arguments(_csc "ONLY_STATIC_LIBRARY;ONLY_DYNAMIC_LIBRARY;ONLY_DYNAMIC_CRT;ONLY_STATIC_CRT" "" "" ${ARGN}) + + if(_csc_ONLY_STATIC_LIBRARY AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message(STATUS "Note: ${PORT} only supports static library linkage. Building static library.") + set(VCPKG_LIBRARY_LINKAGE static PARENT_SCOPE) + endif() + if(_csc_ONLY_DYNAMIC_LIBRARY AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") + message(STATUS "Note: ${PORT} only supports dynamic library linkage. Building dynamic library.") + if(VCPKG_CRT_LINKAGE STREQUAL "static") + message(FATAL_ERROR "Refusing to build unexpected dynamic library against the static CRT. If this is desired, please configure your triplet to directly request this configuration.") + endif() + set(VCPKG_LIBRARY_LINKAGE dynamic PARENT_SCOPE) + endif() + + if(_csc_ONLY_DYNAMIC_CRT AND VCPKG_CRT_LINKAGE STREQUAL "static") + message(FATAL_ERROR "${PORT} only supports dynamic crt linkage") + endif() + if(_csc_ONLY_STATIC_CRT AND VCPKG_CRT_LINKAGE STREQUAL "dynamic") + message(FATAL_ERROR "${PORT} only supports static crt linkage") + endif() +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_clean_executables_in_bin.cmake b/vcpkg/scripts/cmake/vcpkg_clean_executables_in_bin.cmake new file mode 100644 index 0000000..5321e05 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_clean_executables_in_bin.cmake @@ -0,0 +1,58 @@ +## # vcpkg_clean_executables_in_bin +## +## Remove specified executables found in `${CURRENT_PACKAGES_DIR}/bin` and `${CURRENT_PACKAGES_DIR}/debug/bin`. If, after all specified executables have been removed, and the `bin` and `debug/bin` directories are empty, then also delete `bin` and `debug/bin` directories. +## +## ## Usage +## ```cmake +## vcpkg_clean_executables_in_bin( +## FILE_NAMES ... +## ) +## ``` +## +## ## Parameters +## ### FILE_NAMES +## A list of executable filenames without extension. +## +## ## Notes +## Generally, there is no need to call this function manually. Instead, pass an extra `AUTO_CLEAN` argument when calling `vcpkg_copy_tools`. +## +## ## Examples +## * [czmq](https://github.com/microsoft/vcpkg/blob/master/ports/czmq/portfile.cmake) +function(vcpkg_clean_executables_in_bin) + cmake_parse_arguments(_vct "" "" "FILE_NAMES" ${ARGN}) + + if(NOT DEFINED _vct_FILE_NAMES) + message(FATAL_ERROR "FILE_NAMES must be specified.") + endif() + + foreach(file_name ${_vct_FILE_NAMES}) + file(REMOVE + "${CURRENT_PACKAGES_DIR}/bin/${file_name}${VCPKG_TARGET_EXECUTABLE_SUFFIX}" + "${CURRENT_PACKAGES_DIR}/debug/bin/${file_name}${VCPKG_TARGET_EXECUTABLE_SUFFIX}" + ) + endforeach() + + function(try_remove_empty_directory directory) + if(NOT EXISTS "${directory}") + return() + endif() + + if(NOT IS_DIRECTORY "${directory}") + message(FATAL_ERROR "${directory} is supposed to be an existing directory.") + endif() + + # TODO: + # For an empty directory, + # file(GLOB items "${directory}" "${directory}/*") + # will return a list with one item. + file(GLOB items "${directory}/" "${directory}/*") + list(LENGTH items items_count) + + if(${items_count} EQUAL 0) + file(REMOVE_RECURSE "${directory}") + endif() + endfunction() + + try_remove_empty_directory("${CURRENT_PACKAGES_DIR}/bin") + try_remove_empty_directory("${CURRENT_PACKAGES_DIR}/debug/bin") +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_clean_msbuild.cmake b/vcpkg/scripts/cmake/vcpkg_clean_msbuild.cmake new file mode 100644 index 0000000..b0d77df --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_clean_msbuild.cmake @@ -0,0 +1,19 @@ +## # vcpkg_clean_msbuild +## +## Clean intermediate files generated by `vcpkg_install_msbuild()`. +## +## ## Usage +## ```cmake +## vcpkg_clean_msbuild() +## ``` +## +## ## Examples +## +## * [xalan-c](https://github.com/Microsoft/vcpkg/blob/master/ports/xalan-c/portfile.cmake) + +function(vcpkg_clean_msbuild) + file(REMOVE_RECURSE + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + ) +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_common_definitions.cmake b/vcpkg/scripts/cmake/vcpkg_common_definitions.cmake new file mode 100644 index 0000000..8d36803 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_common_definitions.cmake @@ -0,0 +1,184 @@ +## # vcpkg_common_definitions +## +## File contains helpful variabls for portfiles which are commonly needed or used. +## +## ## The following variables are available: +## ```cmake +## VCPKG_TARGET_IS_ with being one of the following: WINDOWS, UWP, LINUX, OSX, ANDROID, FREEBSD. only defined if +## VCPKG_HOST_PATH_SEPARATOR Host specific path separator (USAGE: "${VCPKG_HOST_PATH_SEPARATOR}"; only use and pass variables with VCPKG_HOST_PATH_SEPARATOR within "") +## VCPKG_HOST_EXECUTABLE_SUFFIX executable suffix of the host +## VCPKG_TARGET_EXECUTABLE_SUFFIX executable suffix of the target +## VCPKG_TARGET_STATIC_LIBRARY_PREFIX static library prefix for target (same as CMAKE_STATIC_LIBRARY_PREFIX) +## VCPKG_TARGET_STATIC_LIBRARY_SUFFIX static library suffix for target (same as CMAKE_STATIC_LIBRARY_SUFFIX) +## VCPKG_TARGET_SHARED_LIBRARY_PREFIX shared library prefix for target (same as CMAKE_SHARED_LIBRARY_PREFIX) +## VCPKG_TARGET_SHARED_LIBRARY_SUFFIX shared library suffix for target (same as CMAKE_SHARED_LIBRARY_SUFFIX) +## VCPKG_TARGET_IMPORT_LIBRARY_PREFIX import library prefix for target (same as CMAKE_IMPORT_LIBRARY_PREFIX) +## VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX import library suffix for target (same as CMAKE_IMPORT_LIBRARY_SUFFIX) +## VCPKG_FIND_LIBRARY_PREFIXES target dependent prefixes used for find_library calls in portfiles +## VCPKG_FIND_LIBRARY_SUFFIXES target dependent suffixes used for find_library calls in portfiles +## VCPKG_SYSTEM_LIBRARIES list of libraries are provide by the toolchain and are not managed by vcpkg +## ``` +## +## CMAKE_STATIC_LIBRARY_(PREFIX|SUFFIX), CMAKE_SHARED_LIBRARY_(PREFIX|SUFFIX) and CMAKE_IMPORT_LIBRARY_(PREFIX|SUFFIX) are defined for the target +## Furthermore the variables CMAKE_FIND_LIBRARY_(PREFIXES|SUFFIXES) are also defined for the target so that +## portfiles are able to use find_library calls to discover dependent libraries within the current triplet for ports. +## + +#Helper variable to identify the Target system. VCPKG_TARGET_IS_ +if (NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(VCPKG_TARGET_IS_WINDOWS 1) + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(VCPKG_TARGET_IS_UWP 1) + endif() +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(VCPKG_TARGET_IS_OSX 1) +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "iOS") + set(VCPKG_TARGET_IS_IOS 1) +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(VCPKG_TARGET_IS_LINUX 1) +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Android") + set(VCPKG_TARGET_IS_ANDROID 1) +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + set(VCPKG_TARGET_IS_FREEBSD 1) +elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "MinGW") + set(VCPKG_TARGET_IS_WINDOWS 1) + set(VCPKG_TARGET_IS_MINGW 1) +endif() + +#Helper variable to identify the host path separator. +if(CMAKE_HOST_WIN32) + set(VCPKG_HOST_PATH_SEPARATOR ";") +elseif(CMAKE_HOST_UNIX) + set(VCPKG_HOST_PATH_SEPARATOR ":") +endif() + +#Helper variables to identify executables on host/target +if(CMAKE_HOST_WIN32) + set(VCPKG_HOST_EXECUTABLE_SUFFIX ".exe") +else() + set(VCPKG_HOST_EXECUTABLE_SUFFIX "") +endif() +#set(CMAKE_EXECUTABLE_SUFFIX ${VCPKG_HOST_EXECUTABLE_SUFFIX}) not required by find_program + +if(VCPKG_TARGET_IS_WINDOWS) + set(VCPKG_TARGET_EXECUTABLE_SUFFIX ".exe") +else() + set(VCPKG_TARGET_EXECUTABLE_SUFFIX "") +endif() + +#Helper variables for libraries +if(VCPKG_TARGET_IS_MINGW) + set(VCPKG_TARGET_STATIC_LIBRARY_SUFFIX ".a") + set(VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX ".dll.a") + set(VCPKG_TARGET_SHARED_LIBRARY_SUFFIX ".dll") + set(VCPKG_TARGET_STATIC_LIBRARY_PREFIX "lib") + set(VCPKG_TARGET_SHARED_LIBRARY_PREFIX "lib") + set(VCPKG_TARGET_IMPORT_LIBRARY_PREFIX "lib") + set(VCPKG_FIND_LIBRARY_SUFFIXES ".dll" ".dll.a" ".a" ".lib") + set(VCPKG_FIND_LIBRARY_PREFIXES "lib" "") +elseif(VCPKG_TARGET_IS_WINDOWS) + set(VCPKG_TARGET_STATIC_LIBRARY_SUFFIX ".lib") + set(VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX ".lib") + set(VCPKG_TARGET_SHARED_LIBRARY_SUFFIX ".dll") + set(VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX ".lib") + set(VCPKG_TARGET_STATIC_LIBRARY_PREFIX "") + set(VCPKG_TARGET_SHARED_LIBRARY_PREFIX "") + set(VCPKG_TARGET_IMPORT_LIBRARY_PREFIX "") + set(VCPKG_FIND_LIBRARY_SUFFIXES ".lib" ".dll") #This is a slight modification to CMakes value which does not include ".dll". + set(VCPKG_FIND_LIBRARY_PREFIXES "" "lib") #This is a slight modification to CMakes value which does not include "lib". +elseif(VCPKG_TARGET_IS_OSX) + set(VCPKG_TARGET_STATIC_LIBRARY_SUFFIX ".a") + set(VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX "") + set(VCPKG_TARGET_SHARED_LIBRARY_SUFFIX ".dylib") + set(VCPKG_TARGET_STATIC_LIBRARY_PREFIX "lib") + set(VCPKG_TARGET_SHARED_LIBRARY_PREFIX "lib") + set(VCPKG_FIND_LIBRARY_SUFFIXES ".tbd" ".dylib" ".so" ".a") + set(VCPKG_FIND_LIBRARY_PREFIXES "lib" "") +else() + set(VCPKG_TARGET_STATIC_LIBRARY_SUFFIX ".a") + set(VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX "") + set(VCPKG_TARGET_SHARED_LIBRARY_SUFFIX ".so") + set(VCPKG_TARGET_STATIC_LIBRARY_PREFIX "lib") + set(VCPKG_TARGET_SHARED_LIBRARY_PREFIX "lib") + set(VCPKG_FIND_LIBRARY_SUFFIXES ".so" ".a") + set(VCPKG_FIND_LIBRARY_PREFIXES "lib" "") +endif() +#Setting these variables allows find_library to work in script mode and thus in portfiles! +#This allows us scale down on hardcoded target dependent paths in portfiles +set(CMAKE_STATIC_LIBRARY_SUFFIX "${VCPKG_TARGET_STATIC_LIBRARY_SUFFIX}") +set(CMAKE_SHARED_LIBRARY_SUFFIX "${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}") +set(CMAKE_IMPORT_LIBRARY_SUFFIX "${VCPKG_TARGET_IMPORT_LIBRARY_PREFIX}") +set(CMAKE_STATIC_LIBRARY_PREFIX "${VCPKG_TARGET_STATIC_LIBRARY_PREFIX}") +set(CMAKE_SHARED_LIBRARY_PREFIX "${VCPKG_TARGET_SHARED_LIBRARY_PREFIX}") +set(CMAKE_IMPORT_LIBRARY_PREFIX "${VCPKG_TARGET_IMPORT_LIBRARY_SUFFIX}") + +set(CMAKE_FIND_LIBRARY_SUFFIXES "${VCPKG_FIND_LIBRARY_SUFFIXES}" CACHE INTERNAL "") # Required by find_library +set(CMAKE_FIND_LIBRARY_PREFIXES "${VCPKG_FIND_LIBRARY_PREFIXES}" CACHE INTERNAL "") # Required by find_library + +# Append platform libraries to VCPKG_SYSTEM_LIBRARIES +# The variable are just appended to permit to custom triplets define the variable + +# Platforms with libdl +if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_ANDROID OR VCPKG_TARGET_IS_OSX) + list(APPEND VCPKG_SYSTEM_LIBRARIES dl) +endif() + +# Platforms with libm +if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_ANDROID OR VCPKG_TARGET_IS_FREEBSD OR VCPKG_TARGET_IS_OSX) + list(APPEND VCPKG_SYSTEM_LIBRARIES m) +endif() + +# Platforms with pthread +if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_ANDROID OR VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_FREEBSD OR VCPKG_TARGET_IS_MINGW) + list(APPEND VCPKG_SYSTEM_LIBRARIES pthread) +endif() + +# Platforms with libstdc++ +if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_ANDROID OR VCPKG_TARGET_IS_FREEBSD OR VCPKG_TARGET_IS_MINGW) + list(APPEND VCPKG_SYSTEM_LIBRARIES [=[stdc\+\+]=]) +endif() + +# Platforms with libc++ +if(VCPKG_TARGET_IS_OSX) + list(APPEND VCPKG_SYSTEM_LIBRARIES [=[c\+\+]=]) +endif() + +# Platforms with librt +if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_ANDROID OR VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_FREEBSD OR VCPKG_TARGET_IS_MINGW) + list(APPEND VCPKG_SYSTEM_LIBRARIES rt) +endif() + +# Platforms with GCC libs +if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_ANDROID OR VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_FREEBSD OR VCPKG_TARGET_IS_MINGW) + list(APPEND VCPKG_SYSTEM_LIBRARIES gcc) + list(APPEND VCPKG_SYSTEM_LIBRARIES gcc_s) +endif() + +# Platforms with system iconv +if(VCPKG_TARGET_IS_OSX) + list(APPEND VCPKG_SYSTEM_LIBRARIES iconv) +endif() + +# Windows system libs +if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND VCPKG_SYSTEM_LIBRARIES advapi32) + list(APPEND VCPKG_SYSTEM_LIBRARIES bcrypt) + list(APPEND VCPKG_SYSTEM_LIBRARIES dinput8) + list(APPEND VCPKG_SYSTEM_LIBRARIES gdi32) + list(APPEND VCPKG_SYSTEM_LIBRARIES imm32) + list(APPEND VCPKG_SYSTEM_LIBRARIES oleaut32) + list(APPEND VCPKG_SYSTEM_LIBRARIES ole32) + list(APPEND VCPKG_SYSTEM_LIBRARIES psapi) + list(APPEND VCPKG_SYSTEM_LIBRARIES secur32) + list(APPEND VCPKG_SYSTEM_LIBRARIES setupapi) + list(APPEND VCPKG_SYSTEM_LIBRARIES shell32) + list(APPEND VCPKG_SYSTEM_LIBRARIES shlwapi) + list(APPEND VCPKG_SYSTEM_LIBRARIES strmiids) + list(APPEND VCPKG_SYSTEM_LIBRARIES user32) + list(APPEND VCPKG_SYSTEM_LIBRARIES uuid) + list(APPEND VCPKG_SYSTEM_LIBRARIES version) + list(APPEND VCPKG_SYSTEM_LIBRARIES vfw32) + list(APPEND VCPKG_SYSTEM_LIBRARIES winmm) + list(APPEND VCPKG_SYSTEM_LIBRARIES wsock32) + list(APPEND VCPKG_SYSTEM_LIBRARIES Ws2_32) +endif() diff --git a/vcpkg/scripts/cmake/vcpkg_common_functions.cmake b/vcpkg/scripts/cmake/vcpkg_common_functions.cmake new file mode 100644 index 0000000..2fad7f0 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_common_functions.cmake @@ -0,0 +1,51 @@ +include(execute_process) +include(vcpkg_acquire_msys) +include(vcpkg_add_to_path) +include(vcpkg_check_features) +include(vcpkg_check_linkage) +include(vcpkg_clean_executables_in_bin) +include(vcpkg_clean_msbuild) +include(vcpkg_download_distfile) +include(vcpkg_extract_source_archive) +include(vcpkg_extract_source_archive_ex) +include(vcpkg_execute_required_process) +include(vcpkg_execute_required_process_repeat) +include(vcpkg_execute_build_process) +include(vcpkg_fail_port_install) +include(vcpkg_find_acquire_program) +include(vcpkg_fixup_cmake_targets) +include(vcpkg_fixup_pkgconfig) +include(vcpkg_from_github) +include(vcpkg_from_gitlab) +include(vcpkg_from_bitbucket) +include(vcpkg_from_sourceforge) +include(vcpkg_build_cmake) +include(vcpkg_build_gn) +include(vcpkg_build_msbuild) +include(vcpkg_build_qmake) +include(vcpkg_build_make) +include(vcpkg_build_ninja) +include(vcpkg_build_nmake) +include(vcpkg_install_cmake) +include(vcpkg_install_gn) +include(vcpkg_install_meson) +include(vcpkg_install_msbuild) +include(vcpkg_install_make) +include(vcpkg_install_nmake) +include(vcpkg_install_qmake) +include(vcpkg_configure_cmake) +include(vcpkg_configure_gn) +include(vcpkg_configure_meson) +include(vcpkg_configure_qmake) +include(vcpkg_configure_make) +include(vcpkg_apply_patches) +include(vcpkg_copy_pdbs) +include(vcpkg_copy_tool_dependencies) +include(vcpkg_copy_tools) +include(vcpkg_get_program_files_platform_bitness) +include(vcpkg_get_windows_sdk) +include(vcpkg_replace_string) +include(vcpkg_from_git) +include(vcpkg_test_cmake) +include(vcpkg_prettify_command) +include(vcpkg_buildpath_length_warning) diff --git a/vcpkg/scripts/cmake/vcpkg_configure_cmake.cmake b/vcpkg/scripts/cmake/vcpkg_configure_cmake.cmake new file mode 100644 index 0000000..63d7f87 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_configure_cmake.cmake @@ -0,0 +1,333 @@ +## # vcpkg_configure_cmake +## +## Configure CMake for Debug and Release builds of a project. +## +## ## Usage +## ```cmake +## vcpkg_configure_cmake( +## SOURCE_PATH <${SOURCE_PATH}> +## [PREFER_NINJA] +## [DISABLE_PARALLEL_CONFIGURE] +## [NO_CHARSET_FLAG] +## [GENERATOR <"NMake Makefiles">] +## [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] +## [OPTIONS_RELEASE <-DOPTIMIZE=1>...] +## [OPTIONS_DEBUG <-DDEBUGGABLE=1>...] +## ) +## ``` +## +## ## Parameters +## ### SOURCE_PATH +## Specifies the directory containing the `CMakeLists.txt`. +## By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. +## +## ### PREFER_NINJA +## Indicates that, when available, Vcpkg should use Ninja to perform the build. +## This should be specified unless the port is known to not work under Ninja. +## +## ### DISABLE_PARALLEL_CONFIGURE +## Disables running the CMake configure step in parallel. +## This is needed for libraries which write back into their source directory during configure. +## +## This also disables CMAKE_DISABLE_SOURCE_CHANGES. +## +## ### NO_CHARSET_FLAG +## Disables passing `utf-8` as the default character set to `CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS`. +## +## This is needed for libraries that set their own source code's character set. +## +## ### GENERATOR +## Specifies the precise generator to use. +## +## This is useful if some project-specific buildsystem has been wrapped in a cmake script that won't perform an actual build. +## If used for this purpose, it should be set to `"NMake Makefiles"`. +## +## ### OPTIONS +## Additional options passed to CMake during the configuration. +## +## ### OPTIONS_RELEASE +## Additional options passed to CMake during the Release configuration. These are in addition to `OPTIONS`. +## +## ### OPTIONS_DEBUG +## Additional options passed to CMake during the Debug configuration. These are in addition to `OPTIONS`. +## +## ## Notes +## This command supplies many common arguments to CMake. To see the full list, examine the source. +## +## ## Examples +## +## * [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) +## * [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) +## * [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake) +## * [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake) +function(vcpkg_configure_cmake) + # parse parameters such that semicolons in arguments to OPTIONS don't get erased + cmake_parse_arguments(PARSE_ARGV 0 _csc + "PREFER_NINJA;DISABLE_PARALLEL_CONFIGURE;NO_CHARSET_FLAG" + "SOURCE_PATH;GENERATOR" + "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" + ) + + if(NOT VCPKG_PLATFORM_TOOLSET) + message(FATAL_ERROR "Vcpkg has been updated with VS2017 support; " + "however, vcpkg.exe must be rebuilt by re-running bootstrap-vcpkg.bat\n") + endif() + + if(CMAKE_HOST_WIN32) + if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) + set(_csc_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITEW6432}) + else() + set(_csc_HOST_ARCHITECTURE $ENV{PROCESSOR_ARCHITECTURE}) + endif() + endif() + + set(NINJA_CAN_BE_USED ON) # Ninja as generator + set(NINJA_HOST ON) # Ninja as parallel configurator + + if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") + set(_TARGETTING_UWP 1) + endif() + + if(_csc_HOST_ARCHITECTURE STREQUAL "x86") + # Prebuilt ninja binaries are only provided for x64 hosts + set(NINJA_CAN_BE_USED OFF) + set(NINJA_HOST OFF) + elseif(_TARGETTING_UWP) + # Ninja and MSBuild have many differences when targetting UWP, so use MSBuild to maximize existing compatibility + set(NINJA_CAN_BE_USED OFF) + endif() + + if(_csc_GENERATOR) + set(GENERATOR ${_csc_GENERATOR}) + elseif(_csc_PREFER_NINJA AND NINJA_CAN_BE_USED) + set(GENERATOR "Ninja") + elseif(VCPKG_CHAINLOAD_TOOLCHAIN_FILE OR (VCPKG_CMAKE_SYSTEM_NAME AND NOT _TARGETTING_UWP)) + set(GENERATOR "Ninja") + + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v120") + set(GENERATOR "Visual Studio 12 2013") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v120") + set(GENERATOR "Visual Studio 12 2013 Win64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v120") + set(GENERATOR "Visual Studio 12 2013 ARM") + + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v140") + set(GENERATOR "Visual Studio 14 2015") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v140") + set(GENERATOR "Visual Studio 14 2015 Win64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v140") + set(GENERATOR "Visual Studio 14 2015 ARM") + + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v141") + set(GENERATOR "Visual Studio 15 2017") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v141") + set(GENERATOR "Visual Studio 15 2017 Win64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v141") + set(GENERATOR "Visual Studio 15 2017 ARM") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v141") + set(GENERATOR "Visual Studio 15 2017") + set(ARCH "ARM64") + + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v142") + set(GENERATOR "Visual Studio 16 2019") + set(ARCH "Win32") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v142") + set(GENERATOR "Visual Studio 16 2019") + set(ARCH "x64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v142") + set(GENERATOR "Visual Studio 16 2019") + set(ARCH "ARM") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" AND VCPKG_PLATFORM_TOOLSET STREQUAL "v142") + set(GENERATOR "Visual Studio 16 2019") + set(ARCH "ARM64") + + else() + if(NOT VCPKG_CMAKE_SYSTEM_NAME) + set(VCPKG_CMAKE_SYSTEM_NAME Windows) + endif() + message(FATAL_ERROR "Unable to determine appropriate generator for: " + "${VCPKG_CMAKE_SYSTEM_NAME}-${VCPKG_TARGET_ARCHITECTURE}-${VCPKG_PLATFORM_TOOLSET}") + endif() + + # If we use Ninja, make sure it's on PATH + if(GENERATOR STREQUAL "Ninja" AND NOT DEFINED ENV{VCPKG_FORCE_SYSTEM_BINARIES}) + vcpkg_find_acquire_program(NINJA) + get_filename_component(NINJA_PATH ${NINJA} DIRECTORY) + vcpkg_add_to_path("${NINJA_PATH}") + list(APPEND _csc_OPTIONS "-DCMAKE_MAKE_PROGRAM=${NINJA}") + endif() + + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + + if(DEFINED VCPKG_CMAKE_SYSTEM_NAME) + list(APPEND _csc_OPTIONS "-DCMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME}") + if(_TARGETTING_UWP AND NOT DEFINED VCPKG_CMAKE_SYSTEM_VERSION) + set(VCPKG_CMAKE_SYSTEM_VERSION 10.0) + endif() + endif() + + if(DEFINED VCPKG_CMAKE_SYSTEM_VERSION) + list(APPEND _csc_OPTIONS "-DCMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION}") + endif() + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + list(APPEND _csc_OPTIONS -DBUILD_SHARED_LIBS=ON) + elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + list(APPEND _csc_OPTIONS -DBUILD_SHARED_LIBS=OFF) + else() + message(FATAL_ERROR + "Invalid setting for VCPKG_LIBRARY_LINKAGE: \"${VCPKG_LIBRARY_LINKAGE}\". " + "It must be \"static\" or \"dynamic\"") + endif() + + macro(check_both_vars_are_set var1 var2) + if((NOT DEFINED ${var1} OR NOT DEFINED ${var2}) AND (DEFINED ${var1} OR DEFINED ${var2})) + message(FATAL_ERROR "Both ${var1} and ${var2} must be set.") + endif() + endmacro() + + check_both_vars_are_set(VCPKG_CXX_FLAGS_DEBUG VCPKG_C_FLAGS_DEBUG) + check_both_vars_are_set(VCPKG_CXX_FLAGS_RELEASE VCPKG_C_FLAGS_RELEASE) + check_both_vars_are_set(VCPKG_CXX_FLAGS VCPKG_C_FLAGS) + + set(VCPKG_SET_CHARSET_FLAG ON) + if(_csc_NO_CHARSET_FLAG) + set(VCPKG_SET_CHARSET_FLAG OFF) + endif() + + if(NOT VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + if(NOT DEFINED VCPKG_CMAKE_SYSTEM_NAME OR _TARGETTING_UWP) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/windows.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/linux.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Android") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/android.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/osx.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "iOS") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/ios.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/freebsd.cmake") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "MinGW") + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/mingw.cmake") + endif() + endif() + + + list(APPEND _csc_OPTIONS + "-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}" + "-DVCPKG_TARGET_TRIPLET=${TARGET_TRIPLET}" + "-DVCPKG_SET_CHARSET_FLAG=${VCPKG_SET_CHARSET_FLAG}" + "-DVCPKG_PLATFORM_TOOLSET=${VCPKG_PLATFORM_TOOLSET}" + "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" + "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" + "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" + "-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE" + "-DCMAKE_VERBOSE_MAKEFILE=ON" + "-DVCPKG_APPLOCAL_DEPS=OFF" + "-DCMAKE_TOOLCHAIN_FILE=${SCRIPTS}/buildsystems/vcpkg.cmake" + "-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON" + "-DVCPKG_CXX_FLAGS=${VCPKG_CXX_FLAGS}" + "-DVCPKG_CXX_FLAGS_RELEASE=${VCPKG_CXX_FLAGS_RELEASE}" + "-DVCPKG_CXX_FLAGS_DEBUG=${VCPKG_CXX_FLAGS_DEBUG}" + "-DVCPKG_C_FLAGS=${VCPKG_C_FLAGS}" + "-DVCPKG_C_FLAGS_RELEASE=${VCPKG_C_FLAGS_RELEASE}" + "-DVCPKG_C_FLAGS_DEBUG=${VCPKG_C_FLAGS_DEBUG}" + "-DVCPKG_CRT_LINKAGE=${VCPKG_CRT_LINKAGE}" + "-DVCPKG_LINKER_FLAGS=${VCPKG_LINKER_FLAGS}" + "-DVCPKG_LINKER_FLAGS_RELEASE=${VCPKG_LINKER_FLAGS_RELEASE}" + "-DVCPKG_LINKER_FLAGS_DEBUG=${VCPKG_LINKER_FLAGS_DEBUG}" + "-DVCPKG_TARGET_ARCHITECTURE=${VCPKG_TARGET_ARCHITECTURE}" + "-DCMAKE_INSTALL_LIBDIR:STRING=lib" + "-DCMAKE_INSTALL_BINDIR:STRING=bin" + "-D_VCPKG_ROOT_DIR=${VCPKG_ROOT_DIR}" + "-D_VCPKG_INSTALLED_DIR=${_VCPKG_INSTALLED_DIR}" + "-DVCPKG_MANIFEST_INSTALL=OFF" + ) + + if(DEFINED ARCH) + list(APPEND _csc_OPTIONS + "-A${ARCH}" + ) + endif() + + # Sets configuration variables for macOS builds + foreach(config_var INSTALL_NAME_DIR OSX_DEPLOYMENT_TARGET OSX_SYSROOT OSX_ARCHITECTURES) + if(DEFINED VCPKG_${config_var}) + list(APPEND _csc_OPTIONS "-DCMAKE_${config_var}=${VCPKG_${config_var}}") + endif() + endforeach() + + set(rel_command + ${CMAKE_COMMAND} ${_csc_SOURCE_PATH} "${_csc_OPTIONS}" "${_csc_OPTIONS_RELEASE}" + -G ${GENERATOR} + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}) + set(dbg_command + ${CMAKE_COMMAND} ${_csc_SOURCE_PATH} "${_csc_OPTIONS}" "${_csc_OPTIONS_DEBUG}" + -G ${GENERATOR} + -DCMAKE_BUILD_TYPE=Debug + -DCMAKE_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug) + + if(NINJA_HOST AND CMAKE_HOST_WIN32 AND NOT _csc_DISABLE_PARALLEL_CONFIGURE) + list(APPEND _csc_OPTIONS "-DCMAKE_DISABLE_SOURCE_CHANGES=ON") + + vcpkg_find_acquire_program(NINJA) + get_filename_component(NINJA_PATH ${NINJA} DIRECTORY) + vcpkg_add_to_path("${NINJA_PATH}") + + #parallelize the configure step + set(_contents + "rule CreateProcess\n command = $process\n\n" + ) + + macro(_build_cmakecache whereat build_type) + set(${build_type}_line "build ${whereat}/CMakeCache.txt: CreateProcess\n process = cmd /c \"cd ${whereat} &&") + foreach(arg ${${build_type}_command}) + set(${build_type}_line "${${build_type}_line} \"${arg}\"") + endforeach() + set(_contents "${_contents}${${build_type}_line}\"\n\n") + endmacro() + + if(NOT DEFINED VCPKG_BUILD_TYPE) + _build_cmakecache(".." "rel") + _build_cmakecache("../../${TARGET_TRIPLET}-dbg" "dbg") + elseif(VCPKG_BUILD_TYPE STREQUAL "release") + _build_cmakecache(".." "rel") + elseif(VCPKG_BUILD_TYPE STREQUAL "debug") + _build_cmakecache("../../${TARGET_TRIPLET}-dbg" "dbg") + endif() + + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/vcpkg-parallel-configure) + file(WRITE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/vcpkg-parallel-configure/build.ninja "${_contents}") + + message(STATUS "Configuring ${TARGET_TRIPLET}") + vcpkg_execute_required_process( + COMMAND ninja -v + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/vcpkg-parallel-configure + LOGNAME config-${TARGET_TRIPLET} + ) + else() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + vcpkg_execute_required_process( + COMMAND ${dbg_command} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME config-${TARGET_TRIPLET}-dbg + ) + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + vcpkg_execute_required_process( + COMMAND ${rel_command} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME config-${TARGET_TRIPLET}-rel + ) + endif() + endif() + + set(_VCPKG_CMAKE_GENERATOR "${GENERATOR}" PARENT_SCOPE) +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_configure_gn.cmake b/vcpkg/scripts/cmake/vcpkg_configure_gn.cmake new file mode 100644 index 0000000..3ae14b8 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_configure_gn.cmake @@ -0,0 +1,58 @@ +## # vcpkg_configure_gn +## +## Generate Ninja (GN) targets +## +## ## Usage: +## ```cmake +## vcpkg_configure_gn( +## SOURCE_PATH +## [OPTIONS ] +## [OPTIONS_DEBUG ] +## [OPTIONS_RELEASE ] +## ) +## ``` +## +## ## Parameters: +## ### SOURCE_PATH (required) +## The path to the GN project. +## +## ### OPTIONS +## Options to be passed to both the debug and release targets. +## Note: Must be provided as a space-separated string. +## +## ### OPTIONS_DEBUG (space-separated string) +## Options to be passed to the debug target. +## +## ### OPTIONS_RELEASE (space-separated string) +## Options to be passed to the release target. + +function(vcpkg_configure_gn) + cmake_parse_arguments(_vcg "" "SOURCE_PATH;OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" "" ${ARGN}) + + if(NOT DEFINED _vcg_SOURCE_PATH) + message(FATAL_ERROR "SOURCE_PATH must be specified.") + endif() + + vcpkg_find_acquire_program(PYTHON2) + get_filename_component(PYTHON2_DIR "${PYTHON2}" DIRECTORY) + vcpkg_add_to_path(PREPEND "${PYTHON2_DIR}") + + vcpkg_find_acquire_program(GN) + + function(generate CONFIG ARGS) + message(STATUS "Generating build (${CONFIG})...") + vcpkg_execute_required_process( + COMMAND "${GN}" gen "${CURRENT_BUILDTREES_DIR}/${CONFIG}" "${ARGS}" + WORKING_DIRECTORY "${SOURCE_PATH}" + LOGNAME generate-${CONFIG} + ) + endfunction() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + generate(${TARGET_TRIPLET}-dbg "--args=${_vcg_OPTIONS} ${_vcg_OPTIONS_DEBUG}") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + generate(${TARGET_TRIPLET}-rel "--args=${_vcg_OPTIONS} ${_vcg_OPTIONS_RELEASE}") + endif() +endfunction() \ No newline at end of file diff --git a/vcpkg/scripts/cmake/vcpkg_configure_make.cmake b/vcpkg/scripts/cmake/vcpkg_configure_make.cmake new file mode 100644 index 0000000..6683167 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_configure_make.cmake @@ -0,0 +1,585 @@ +## # vcpkg_configure_make +## +## Configure configure for Debug and Release builds of a project. +## +## ## Usage +## ```cmake +## vcpkg_configure_make( +## SOURCE_PATH <${SOURCE_PATH}> +## [AUTOCONFIG] +## [BUILD_TRIPLET "--host=x64 --build=i686-unknown-pc"] +## [NO_ADDITIONAL_PATHS] +## [CONFIG_DEPENDENT_ENVIRONMENT ...] +## [CONFIGURE_ENVIRONMENT_VARIABLES ...] +## [ADD_BIN_TO_PATH] +## [NO_DEBUG] +## [SKIP_CONFIGURE] +## [PROJECT_SUBPATH <${PROJ_SUBPATH}>] +## [PRERUN_SHELL <${SHELL_PATH}>] +## [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] +## [OPTIONS_RELEASE <-DOPTIMIZE=1>...] +## [OPTIONS_DEBUG <-DDEBUGGABLE=1>...] +## ) +## ``` +## +## ## Parameters +## ### SOURCE_PATH +## Specifies the directory containing the `configure`/`configure.ac`. +## By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. +## +## ### PROJECT_SUBPATH +## Specifies the directory containing the ``configure`/`configure.ac`. +## By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. +## +## ### SKIP_CONFIGURE +## Skip configure process +## +## ### BUILD_TRIPLET +## Used to pass custom --build/--target/--host to configure. Can be globally overwritten by VCPKG_MAKE_BUILD_TRIPLET +## +## ### NO_ADDITIONAL_PATHS +## Don't pass any additional paths except for --prefix to the configure call +## +## ### AUTOCONFIG +## Need to use autoconfig to generate configure file. +## +## ### PRERUN_SHELL +## Script that needs to be called before configuration (do not use for batch files which simply call autoconf or configure) +## +## ### ADD_BIN_TO_PATH +## Adds the appropriate Release and Debug `bin\` directories to the path during configure such that executables can run against the in-tree DLLs. +## +## ## DISABLE_VERBOSE_FLAGS +## do not pass '--disable-silent-rules --verbose' to configure +## +## ### OPTIONS +## Additional options passed to configure during the configuration. +## +## ### OPTIONS_RELEASE +## Additional options passed to configure during the Release configuration. These are in addition to `OPTIONS`. +## +## ### OPTIONS_DEBUG +## Additional options passed to configure during the Debug configuration. These are in addition to `OPTIONS`. +## +## ### CONFIG_DEPENDENT_ENVIRONMENT +## List of additional configuration dependent environment variables to set. +## Pass SOMEVAR to set the environment and have SOMEVAR_(DEBUG|RELEASE) set in the portfile to the appropriate values +## General environment variables can be set from within the portfile itself. +## +## ### CONFIGURE_ENVIRONMENT_VARIABLES +## List of additional environment variables to pass via the configure call. +## +## ## Notes +## This command supplies many common arguments to configure. To see the full list, examine the source. +## +## ## Examples +## +## * [x264](https://github.com/Microsoft/vcpkg/blob/master/ports/x264/portfile.cmake) +## * [tcl](https://github.com/Microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake) +## * [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake) +## * [libosip2](https://github.com/Microsoft/vcpkg/blob/master/ports/libosip2/portfile.cmake) +macro(_vcpkg_determine_host_mingw out_var) + if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) + set(HOST_ARCH $ENV{PROCESSOR_ARCHITEW6432}) + else() + set(HOST_ARCH $ENV{PROCESSOR_ARCHITECTURE}) + endif() + if(HOST_ARCH MATCHES "(amd|AMD)64") + set(${out_var} mingw64) + elseif(HOST_ARCH MATCHES "(x|X)86") + set(${out_var} mingw32) + else() + message(FATAL_ERROR "Unsupported mingw architecture ${HOST_ARCH} in _vcpkg_determine_autotools_host_cpu!" ) + endif() + unset(HOST_ARCH) +endmacro() + +macro(_vcpkg_determine_autotools_host_cpu out_var) + if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) + set(HOST_ARCH $ENV{PROCESSOR_ARCHITEW6432}) + else() + set(HOST_ARCH $ENV{PROCESSOR_ARCHITECTURE}) + endif() + if(HOST_ARCH MATCHES "(amd|AMD)64") + set(${out_var} x86_64) + elseif(HOST_ARCH MATCHES "(x|X)86") + set(${out_var} i686) + elseif(HOST_ARCH MATCHES "^(ARM|arm)64$") + set(${out_var} aarch64) + elseif(HOST_ARCH MATCHES "^(ARM|arm)$") + set(${out_var} arm) + else() + message(FATAL_ERROR "Unsupported host architecture ${HOST_ARCH} in _vcpkg_determine_autotools_host_cpu!" ) + endif() + unset(HOST_ARCH) +endmacro() + +macro(_vcpkg_determine_autotools_target_cpu out_var) + if(VCPKG_TARGET_ARCHITECTURE MATCHES "(x|X)64") + set(${out_var} x86_64) + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "(x|X)86") + set(${out_var} i686) + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "^(ARM|arm)64$") + set(${out_var} aarch64) + elseif(VCPKG_TARGET_ARCHITECTURE MATCHES "^(ARM|arm)$") + set(${out_var} arm) + else() + message(FATAL_ERROR "Unsupported VCPKG_TARGET_ARCHITECTURE architecture ${VCPKG_TARGET_ARCHITECTURE} in _vcpkg_determine_autotools_target_cpu!" ) + endif() +endmacro() + +macro(_vcpkg_backup_env_variable envvar) + if(DEFINED ENV{${envvar}}) + set(${envvar}_BACKUP "$ENV{${envvar}}") + set(${envvar}_PATHLIKE_CONCAT "${VCPKG_HOST_PATH_SEPARATOR}$ENV{${envvar}}") + else() + set(${envvar}_BACKUP) + set(${envvar}_PATHLIKE_CONCAT) + endif() +endmacro() + +macro(_vcpkg_backup_env_variables) + foreach(_var ${ARGV}) + _vcpkg_backup_env_variable(${_var}) + endforeach() +endmacro() + +macro(_vcpkg_restore_env_variable envvar) + if(${envvar}_BACKUP) + set(ENV{${envvar}} "${${envvar}_BACKUP}") + else() + unset(ENV{${envvar}}) + endif() +endmacro() + +macro(_vcpkg_restore_env_variables) + foreach(_var ${ARGV}) + _vcpkg_restore_env_variable(${_var}) + endforeach() +endmacro() + +function(vcpkg_configure_make) + cmake_parse_arguments(_csc + "AUTOCONFIG;SKIP_CONFIGURE;COPY_SOURCE;DISABLE_VERBOSE_FLAGS;NO_ADDITIONAL_PATHS;ADD_BIN_TO_PATH" + "SOURCE_PATH;PROJECT_SUBPATH;PRERUN_SHELL;BUILD_TRIPLET" + "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;CONFIGURE_ENVIRONMENT_VARIABLES;CONFIG_DEPENDENT_ENVIRONMENT" + ${ARGN} + ) + if(DEFINED VCPKG_MAKE_BUILD_TRIPLET) + set(_csc_BUILD_TRIPLET ${VCPKG_MAKE_BUILD_TRIPLET}) # Triplet overwrite for crosscompiling + endif() + + set(SRC_DIR "${_csc_SOURCE_PATH}/${_csc_PROJECT_SUBPATH}") + + set(REQUIRES_AUTOGEN FALSE) # use autogen.sh + set(REQUIRES_AUTOCONFIG FALSE) # use autotools and configure.ac + if(EXISTS "${SRC_DIR}/configure" AND "${SRC_DIR}/configure.ac") # remove configure; rerun autoconf + if(NOT VCPKG_MAINTAINER_SKIP_AUTOCONFIG) # If fixing bugs skipping autoconfig saves a lot of time + set(REQUIRES_AUTOCONFIG TRUE) + file(REMOVE "${SRC_DIR}/configure") # remove possible autodated configure scripts + set(_csc_AUTOCONFIG ON) + endif() + elseif(EXISTS "${SRC_DIR}/configure" AND NOT _csc_SKIP_CONFIGURE) # run normally; no autoconf or autgen required + elseif(EXISTS "${SRC_DIR}/configure.ac") # Run autoconfig + set(REQUIRES_AUTOCONFIG TRUE) + set(_csc_AUTOCONFIG ON) + elseif(EXISTS "${SRC_DIR}/autogen.sh") # Run autogen + set(REQUIRES_AUTOGEN TRUE) + else() + message(FATAL_ERROR "Could not determine method to configure make") + endif() + + debug_message("REQUIRES_AUTOGEN:${REQUIRES_AUTOGEN}") + debug_message("REQUIRES_AUTOCONFIG:${REQUIRES_AUTOCONFIG}") + # Backup environment variables + # CCAS CC C CPP CXX FC FF GC LD LF LIBTOOL OBJC OBJCXX R UPC Y + set(FLAGPREFIXES CCAS CC C CPP CXX FC FF GC LD LF LIBTOOL OBJC OBJXX R UPC Y) + foreach(_prefix IN LISTS FLAGPREFIXES) + _vcpkg_backup_env_variable(${prefix}FLAGS) + endforeach() + + # FC fotran compiler | FF Fortran 77 compiler + # LDFLAGS -> pass -L flags + # LIBS -> pass -l flags + + #Used by gcc/linux + _vcpkg_backup_env_variables(C_INCLUDE_PATH CPLUS_INCLUDE_PATH LIBRARY_PATH LD_LIBRARY_PATH) + + #Used by cl + _vcpkg_backup_env_variables(INCLUDE LIB LIBPATH) + + if(CURRENT_PACKAGES_DIR MATCHES " " OR CURRENT_INSTALLED_DIR MATCHES " ") + # Don't bother with whitespace. The tools will probably fail and I tried very hard trying to make it work (no success so far)! + message(WARNING "Detected whitespace in root directory. Please move the path to one without whitespaces! The required tools do not handle whitespaces correctly and the build will most likely fail") + endif() + + # Pre-processing windows configure requirements + if (CMAKE_HOST_WIN32) + _vcpkg_determine_autotools_host_cpu(BUILD_ARCH) # VCPKG_HOST => machine you are building on => --build= + + list(APPEND MSYS_REQUIRE_PACKAGES binutils libtool autoconf automake-wrapper automake1.16 m4) + vcpkg_acquire_msys(MSYS_ROOT PACKAGES ${MSYS_REQUIRE_PACKAGES}) + # This inserts msys before system32 (which masks sort.exe and find.exe) but after MSVC (which avoids masking link.exe) + set(APPEND_ENV) + if (_csc_AUTOCONFIG) + # --build: the machine you are building on + # --host: the machine you are building for + # --target: the machine that CC will produce binaries for + # https://stackoverflow.com/questions/21990021/how-to-determine-host-value-for-configure-when-using-cross-compiler + # Only for ports using autotools so we can assume that they follow the common conventions for build/target/host + if(NOT _csc_BUILD_TRIPLET) + set(_csc_BUILD_TRIPLET "--build=${BUILD_ARCH}-pc-mingw32") # This is required since we are running in a msys + # shell which will be otherwise identified as ${BUILD_ARCH}-pc-msys + _vcpkg_determine_autotools_target_cpu(TARGET_ARCH) + if(NOT TARGET_ARCH MATCHES "${BUILD_ARCH}") # we do not need to specify the additional flags if we build nativly. + string(APPEND _csc_BUILD_TRIPLET " --host=${TARGET_ARCH}-pc-mingw32") # (Host activates crosscompilation; The name given here is just the prefix of the host tools for the target) + endif() + if(VCPKG_TARGET_IS_UWP AND NOT _csc_BUILD_TRIPLET MATCHES "--host") + # Needs to be different from --build to enable cross builds. + string(APPEND _csc_BUILD_TRIPLET " --host=${TARGET_ARCH}-unknown-mingw32") + endif() + endif() + debug_message("Using make triplet: ${_csc_BUILD_TRIPLET}") + set(APPEND_ENV ";${MSYS_ROOT}/usr/share/automake-1.16") + endif() + + string(REPLACE ";$ENV{SystemRoot}\\System32;" "${APPEND_ENV};${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\System32;" NEWPATH "$ENV{PATH}") + string(REPLACE ";$ENV{SystemRoot}\\system32;" "${APPEND_ENV};${MSYS_ROOT}/usr/bin;$ENV{SystemRoot}\\system32;" NEWPATH "$ENV{PATH}") + set(ENV{PATH} "${NEWPATH}") + set(BASH "${MSYS_ROOT}/usr/bin/bash.exe") + + macro(_vcpkg_append_to_configure_environment inoutstring var defaultval) + # Allows to overwrite settings in custom triplets via the environment + if(DEFINED ENV{${var}}) + string(APPEND ${inoutstring} " ${var}='$ENV{${var}}'") + else() + string(APPEND ${inoutstring} " ${var}='${defaultval}'") + endif() + endmacro() + + set(CONFIGURE_ENV "V=1") + if (_csc_AUTOCONFIG) # without autotools we assume a custom configure script which correctly handles cl and lib. Otherwise the port needs to set CC|CXX|AR and probably CPP + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CPP "compile cl.exe -nologo -E") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC "compile cl.exe -nologo") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CXX "compile cl.exe -nologo") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV AR "ar-lib lib.exe -verbose") + else() + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CPP "cl.exe -nologo -E") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CC "cl.exe -nologo") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CXX "cl.exe -nologo") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV AR "lib.exe -verbose") + endif() + _vcpkg_append_to_configure_environment(CONFIGURE_ENV LD "link.exe -verbose") + _vcpkg_append_to_configure_environment(CONFIGURE_ENV RANLIB ":") # Trick to ignore the RANLIB call + #_vcpkg_append_to_configure_environment(CONFIGURE_ENV OBJDUMP ":") ' Objdump is required to make shared libraries. Otherwise define lt_cv_deplibs_check_method=pass_all + _vcpkg_append_to_configure_environment(CONFIGURE_ENV CCAS ":") # If required set the ENV variable CCAS in the portfile correctly + _vcpkg_append_to_configure_environment(CONFIGURE_ENV STRIP ":") # If required set the ENV variable STRIP in the portfile correctly + _vcpkg_append_to_configure_environment(CONFIGURE_ENV NM "dumpbin.exe -symbols -headers") + # Would be better to have a true nm here! Some symbols (mainly exported variables) get not properly imported with dumpbin as nm + # and require __declspec(dllimport) for some reason (same problem CMake has with WINDOWS_EXPORT_ALL_SYMBOLS) + _vcpkg_append_to_configure_environment(CONFIGURE_ENV DLLTOOL "link.exe -verbose -dll") + + foreach(_env IN LISTS _csc_CONFIGURE_ENVIRONMENT_VARIABLES) + _vcpkg_append_to_configure_environment(CONFIGURE_ENV ${_env} "${${_env}}") + endforeach() + # Other maybe interesting variables to control + # COMPILE This is the command used to actually compile a C source file. The file name is appended to form the complete command line. + # LINK This is the command used to actually link a C program. + # CXXCOMPILE The command used to actually compile a C++ source file. The file name is appended to form the complete command line. + # CXXLINK The command used to actually link a C++ program. + + #Some PATH handling for dealing with spaces....some tools will still fail with that! + string(REPLACE " " "\\\ " _VCPKG_PREFIX ${CURRENT_INSTALLED_DIR}) + string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_PREFIX "${_VCPKG_PREFIX}") + set(_VCPKG_INSTALLED ${CURRENT_INSTALLED_DIR}) + string(REPLACE " " "\ " _VCPKG_INSTALLED_PKGCONF ${CURRENT_INSTALLED_DIR}) + string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_INSTALLED_PKGCONF ${_VCPKG_INSTALLED_PKGCONF}) + string(REPLACE "\\" "/" _VCPKG_INSTALLED_PKGCONF ${_VCPKG_INSTALLED_PKGCONF}) + set(prefix_var "'\${prefix}'") # Windows needs extra quotes or else the variable gets expanded in the makefile! + else() + string(REPLACE " " "\ " _VCPKG_PREFIX ${CURRENT_INSTALLED_DIR}) + string(REPLACE " " "\ " _VCPKG_INSTALLED ${CURRENT_INSTALLED_DIR}) + set(_VCPKG_INSTALLED_PKGCONF ${CURRENT_INSTALLED_DIR}) + set(EXTRA_QUOTES) + set(prefix_var "\${prefix}") + endif() + + # Cleanup previous build dirs + file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" + "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}") + + # Set configure paths + set(_csc_OPTIONS_RELEASE ${_csc_OPTIONS_RELEASE} "--prefix=${EXTRA_QUOTES}${_VCPKG_PREFIX}${EXTRA_QUOTES}") + set(_csc_OPTIONS_DEBUG ${_csc_OPTIONS_DEBUG} "--prefix=${EXTRA_QUOTES}${_VCPKG_PREFIX}/debug${EXTRA_QUOTES}") + if(NOT _csc_NO_ADDITIONAL_PATHS) + set(_csc_OPTIONS_RELEASE ${_csc_OPTIONS_RELEASE} + # Important: These should all be relative to prefix! + "--bindir=${prefix_var}/tools/${PORT}/bin" + "--sbindir=${prefix_var}/tools/${PORT}/sbin" + #"--libdir='\${prefix}'/lib" # already the default! + #"--includedir='\${prefix}'/include" # already the default! + "--mandir=${prefix_var}/share/${PORT}" + "--docdir=${prefix_var}/share/${PORT}" + "--datarootdir=${prefix_var}/share/${PORT}") + set(_csc_OPTIONS_DEBUG ${_csc_OPTIONS_DEBUG} + # Important: These should all be relative to prefix! + "--bindir=${prefix_var}/../tools/${PORT}/debug/bin" + "--sbindir=${prefix_var}/../tools/${PORT}/debug/sbin" + #"--libdir='\${prefix}'/lib" # already the default! + "--includedir=${prefix_var}/../include" + "--datarootdir=${prefix_var}/share/${PORT}") + endif() + # Setup common options + if(NOT DISABLE_VERBOSE_FLAGS) + list(APPEND _csc_OPTIONS --disable-silent-rules --verbose) + endif() + + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + list(APPEND _csc_OPTIONS --enable-shared --disable-static) + else() + list(APPEND _csc_OPTIONS --disable-shared --enable-static) + endif() + + file(RELATIVE_PATH RELATIVE_BUILD_PATH "${CURRENT_BUILDTREES_DIR}" "${_csc_SOURCE_PATH}/${_csc_PROJECT_SUBPATH}") + + set(base_cmd) + if(CMAKE_HOST_WIN32) + set(base_cmd ${BASH} --noprofile --norc --debug) + # Load toolchains + if(NOT VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/windows.cmake") + endif() + include("${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") + #Join the options list as a string with spaces between options + list(JOIN _csc_OPTIONS " " _csc_OPTIONS) + list(JOIN _csc_OPTIONS_RELEASE " " _csc_OPTIONS_RELEASE) + list(JOIN _csc_OPTIONS_DEBUG " " _csc_OPTIONS_DEBUG) + endif() + + # Setup include environment (since these are buildtype independent restoring them is unnecessary) + # Used by CL + set(ENV{INCLUDE} "${_VCPKG_INSTALLED}/include${VCPKG_HOST_PATH_SEPARATOR}${INCLUDE_BACKUP}") + # Used by GCC + set(ENV{C_INCLUDE_PATH} "${_VCPKG_INSTALLED}/include${VCPKG_HOST_PATH_SEPARATOR}${C_INCLUDE_PATH_BACKUP}") + set(ENV{CPLUS_INCLUDE_PATH} "${_VCPKG_INSTALLED}/include${VCPKG_HOST_PATH_SEPARATOR}${CPLUS_INCLUDE_PATH_BACKUP}") + + # Setup global flags -> TODO: Further improve with toolchain file in mind! + set(CPP_FLAGS_GLOBAL "$ENV{CPPFLAGS} -I${_VCPKG_INSTALLED}/include") + set(C_FLAGS_GLOBAL "$ENV{CFLAGS} ${VCPKG_C_FLAGS}") + set(CXX_FLAGS_GLOBAL "$ENV{CXXFLAGS} ${VCPKG_CXX_FLAGS}") + set(LD_FLAGS_GLOBAL "$ENV{LDFLAGS} ${VCPKG_LINKER_FLAGS}") + # Flags should be set in the toolchain instead (Setting this up correctly requires a function named vcpkg_determined_cmake_compiler_flags which can also be used to setup CC and CXX etc.) + if(NOT VCPKG_TARGET_IS_WINDOWS) + string(APPEND C_FLAGS_GLOBAL " -fPIC") + string(APPEND CXX_FLAGS_GLOBAL " -fPIC") + else() + # TODO: Should be CPP flags instead -> rewrite when vcpkg_determined_cmake_compiler_flags defined + string(APPEND CPP_FLAGS_GLOBAL " /D_WIN32_WINNT=0x0601 /DWIN32_LEAN_AND_MEAN /DWIN32 /D_WINDOWS") + if(VCPKG_TARGET_IS_UWP) + # Be aware that configure thinks it is crosscompiling due to: + # error while loading shared libraries: VCRUNTIME140D_APP.dll: + # cannot open shared object file: No such file or directory + # IMPORTANT: The only way to pass linker flags through libtool AND the compile wrapper + # is to use the CL and LINK environment variables !!! + # (This is due to libtool and compiler wrapper using the same set of options to pass those variables around) + string(REPLACE "\\" "/" VCToolsInstallDir "$ENV{VCToolsInstallDir}") + set(ENV{_CL_} "$ENV{_CL_} /DWINAPI_FAMILY=WINAPI_FAMILY_APP /D__WRL_NO_DEFAULT_LIB_ -FU\"${VCToolsInstallDir}/lib/x86/store/references/platform.winmd\"") + set(ENV{_LINK_} "$ENV{_LINK_} /MANIFEST /DYNAMICBASE WindowsApp.lib /WINMD:NO /APPCONTAINER") + endif() + if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + set(ENV{_LINK_} "$ENV{_LINK_} -MACHINE:x64") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + set(ENV{_LINK_} "$ENV{_LINK_} -MACHINE:x86") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL arm) + set(ENV{_LINK_} "$ENV{_LINK_} -MACHINE:ARM") + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64) + set(ENV{_LINK_} "$ENV{_LINK_} -MACHINE:ARM64") + endif() + endif() + + vcpkg_find_acquire_program(PKGCONFIG) + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" AND NOT PKGCONFIG STREQUAL "--static") + set(PKGCONFIG "${PKGCONFIG} --static") + endif() + # Run autoconf if necessary + set(_GENERATED_CONFIGURE FALSE) + if (_csc_AUTOCONFIG OR REQUIRES_AUTOCONFIG) + find_program(AUTORECONF autoreconf) + if(NOT AUTORECONF) + message(FATAL_ERROR "${PORT} requires autoconf from the system package manager (example: \"sudo apt-get install autoconf\")") + endif() + message(STATUS "Generating configure for ${TARGET_TRIPLET}") + if (CMAKE_HOST_WIN32) + vcpkg_execute_required_process( + COMMAND ${base_cmd} -c "autoreconf -vfi" + WORKING_DIRECTORY "${SRC_DIR}" + LOGNAME autoconf-${TARGET_TRIPLET} + ) + else() + vcpkg_execute_required_process( + COMMAND ${AUTORECONF} -vfi + WORKING_DIRECTORY "${SRC_DIR}" + LOGNAME autoconf-${TARGET_TRIPLET} + ) + endif() + message(STATUS "Finished generating configure for ${TARGET_TRIPLET}") + endif() + if(REQUIRES_AUTOGEN) + message(STATUS "Generating configure for ${TARGET_TRIPLET} via autogen.sh") + if (CMAKE_HOST_WIN32) + vcpkg_execute_required_process( + COMMAND ${base_cmd} -c "./autogen.sh" + WORKING_DIRECTORY "${SRC_DIR}" + LOGNAME autoconf-${TARGET_TRIPLET} + ) + else() + vcpkg_execute_required_process( + COMMAND "./autogen.sh" + WORKING_DIRECTORY "${SRC_DIR}" + LOGNAME autoconf-${TARGET_TRIPLET} + ) + endif() + message(STATUS "Finished generating configure for ${TARGET_TRIPLET}") + endif() + + if (_csc_PRERUN_SHELL) + message(STATUS "Prerun shell with ${TARGET_TRIPLET}") + vcpkg_execute_required_process( + COMMAND ${base_cmd} -c "${_csc_PRERUN_SHELL}" + WORKING_DIRECTORY "${SRC_DIR}" + LOGNAME prerun-${TARGET_TRIPLET} + ) + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug" AND NOT _csc_NO_DEBUG) + set(_VAR_SUFFIX DEBUG) + set(PATH_SUFFIX_${_VAR_SUFFIX} "/debug") + set(SHORT_NAME_${_VAR_SUFFIX} "dbg") + list(APPEND _buildtypes ${_VAR_SUFFIX}) + if (CMAKE_HOST_WIN32) # Flags should be set in the toolchain instead + string(REGEX REPLACE "[ \t]+/" " -" CPPFLAGS_${_VAR_SUFFIX} "${CPP_FLAGS_GLOBAL}") + string(REGEX REPLACE "[ \t]+/" " -" CFLAGS_${_VAR_SUFFIX} "${C_FLAGS_GLOBAL} ${VCPKG_CRT_LINK_FLAG_PREFIX}d /D_DEBUG /Ob0 /Od ${VCPKG_C_FLAGS_${_VAR_SUFFIX}}") + string(REGEX REPLACE "[ \t]+/" " -" CXXFLAGS_${_VAR_SUFFIX} "${CXX_FLAGS_GLOBAL} ${VCPKG_CRT_LINK_FLAG_PREFIX}d /D_DEBUG /Ob0 /Od ${VCPKG_CXX_FLAGS_${_VAR_SUFFIX}}") + string(REGEX REPLACE "[ \t]+/" " -" LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib ${LD_FLAGS_GLOBAL} ${VCPKG_LINKER_FLAGS_${_VAR_SUFFIX}}") + else() + set(CPPFLAGS_${_VAR_SUFFIX} "${CPP_FLAGS_GLOBAL}") + set(CFLAGS_${_VAR_SUFFIX} "${C_FLAGS_GLOBAL} ${VCPKG_C_FLAGS_DEBUG}") + set(CXXFLAGS_${_VAR_SUFFIX} "${CXX_FLAGS_GLOBAL} ${VCPKG_CXX_FLAGS_DEBUG}") + set(LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/ -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link/ ${LD_FLAGS_GLOBAL} ${VCPKG_LINKER_FLAGS_${_VAR_SUFFIX}}") + endif() + unset(_VAR_SUFFIX) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + set(_VAR_SUFFIX RELEASE) + set(PATH_SUFFIX_${_VAR_SUFFIX} "") + set(SHORT_NAME_${_VAR_SUFFIX} "rel") + list(APPEND _buildtypes ${_VAR_SUFFIX}) + if (CMAKE_HOST_WIN32) # Flags should be set in the toolchain + string(REGEX REPLACE "[ \t]+/" " -" CPPFLAGS_${_VAR_SUFFIX} "${CPP_FLAGS_GLOBAL}") + string(REGEX REPLACE "[ \t]+/" " -" CFLAGS_${_VAR_SUFFIX} "${C_FLAGS_GLOBAL} ${VCPKG_CRT_LINK_FLAG_PREFIX} /O2 /Oi /Gy /DNDEBUG ${VCPKG_C_FLAGS_${_VAR_SUFFIX}}") + string(REGEX REPLACE "[ \t]+/" " -" CXXFLAGS_${_VAR_SUFFIX} "${CXX_FLAGS_GLOBAL} ${VCPKG_CRT_LINK_FLAG_PREFIX} /O2 /Oi /Gy /DNDEBUG ${VCPKG_CXX_FLAGS_${_VAR_SUFFIX}}") + string(REGEX REPLACE "[ \t]+/" " -" LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib ${LD_FLAGS_GLOBAL} ${VCPKG_LINKER_FLAGS_${_VAR_SUFFIX}}") + else() + set(CPPFLAGS_${_VAR_SUFFIX} "${CPP_FLAGS_GLOBAL}") + set(CFLAGS_${_VAR_SUFFIX} "${C_FLAGS_GLOBAL} ${VCPKG_C_FLAGS_DEBUG}") + set(CXXFLAGS_${_VAR_SUFFIX} "${CXX_FLAGS_GLOBAL} ${VCPKG_CXX_FLAGS_DEBUG}") + set(LDFLAGS_${_VAR_SUFFIX} "-L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/ -L${_VCPKG_INSTALLED}${PATH_SUFFIX_${_VAR_SUFFIX}}/lib/manual-link/ ${LD_FLAGS_GLOBAL} ${VCPKG_LINKER_FLAGS_${_VAR_SUFFIX}}") + endif() + unset(_VAR_SUFFIX) + endif() + + foreach(_buildtype IN LISTS _buildtypes) + foreach(ENV_VAR ${_csc_CONFIG_DEPENDENT_ENVIRONMENT}) + if(DEFINED ENV{${ENV_VAR}}) + set(BACKUP_CONFIG_${ENV_VAR} "$ENV{${ENV_VAR}}") + endif() + set(ENV{${ENV_VAR}} "${${ENV_VAR}_${_buildtype}}") + endforeach() + + set(TAR_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_NAME_${_buildtype}}") + file(MAKE_DIRECTORY "${TAR_DIR}") + file(RELATIVE_PATH RELATIVE_BUILD_PATH "${TAR_DIR}" "${SRC_DIR}") + + if(_csc_COPY_SOURCE) + file(COPY "${SRC_DIR}/" DESTINATION "${TAR_DIR}") + set(RELATIVE_BUILD_PATH .) + endif() + + set(PKGCONFIG_INSTALLED_DIR "${_VCPKG_INSTALLED_PKGCONF}${PATH_SUFFIX_${_buildtype}}/lib/pkgconfig") + set(PKGCONFIG_INSTALLED_SHARE_DIR "${_VCPKG_INSTALLED_PKGCONF}/share/pkgconfig") + + if(ENV{PKG_CONFIG_PATH}) + set(BACKUP_ENV_PKG_CONFIG_PATH_${_buildtype} $ENV{PKG_CONFIG_PATH}) + set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}:${PKGCONFIG_INSTALLED_SHARE_DIR}:$ENV{PKG_CONFIG_PATH}") + else() + set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}:${PKGCONFIG_INSTALLED_SHARE_DIR}") + endif() + + # Setup environment + set(ENV{CPPFLAGS} ${CPPFLAGS_${_buildtype}}) + set(ENV{CFLAGS} ${CFLAGS_${_buildtype}}) + set(ENV{CXXFLAGS} ${CXXFLAGS_${_buildtype}}) + set(ENV{LDFLAGS} ${LDFLAGS_${_buildtype}}) + set(ENV{PKG_CONFIG} "${PKGCONFIG} --define-variable=prefix=${_VCPKG_INSTALLED}${PATH_SUFFIX_${_buildtype}}") + + set(ENV{LIB} "${_VCPKG_INSTALLED}${PATH_SUFFIX_${_buildtype}}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX_${_buildtype}}/lib/manual-link/${LIB_PATHLIKE_CONCAT}") + set(ENV{LIBPATH} "${_VCPKG_INSTALLED}${PATH_SUFFIX_${_buildtype}}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX_${_buildtype}}/lib/manual-link/${LIBPATH_PATHLIKE_CONCAT}") + set(ENV{LIBRARY_PATH} "${_VCPKG_INSTALLED}${PATH_SUFFIX_${_buildtype}}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX_${_buildtype}}/lib/manual-link/${LIBRARY_PATH_PATHLIKE_CONCAT}") + set(ENV{LD_LIBRARY_PATH} "${_VCPKG_INSTALLED}${PATH_SUFFIX_${_buildtype}}/lib/${VCPKG_HOST_PATH_SEPARATOR}${_VCPKG_INSTALLED}${PATH_SUFFIX_${_buildtype}}/lib/manual-link/${LD_LIBRARY_PATH_PATHLIKE_CONCAT}") + + if (CMAKE_HOST_WIN32) + set(command ${base_cmd} -c "${CONFIGURE_ENV} ./${RELATIVE_BUILD_PATH}/configure ${_csc_BUILD_TRIPLET} ${_csc_OPTIONS} ${_csc_OPTIONS_${_buildtype}}") + else() + set(command /bin/bash "./${RELATIVE_BUILD_PATH}/configure" ${_csc_BUILD_TRIPLET} ${_csc_OPTIONS} ${_csc_OPTIONS_${_buildtype}}) + endif() + if(_csc_ADD_BIN_TO_PATH) + set(PATH_BACKUP $ENV{PATH}) + vcpkg_add_to_path("${CURRENT_INSTALLED_DIR}${PATH_SUFFIX_${_buildtype}}/bin") + endif() + debug_message("Configure command:'${command}'") + if (NOT _csc_SKIP_CONFIGURE) + message(STATUS "Configuring ${TARGET_TRIPLET}-${SHORT_NAME_${_buildtype}}") + vcpkg_execute_required_process( + COMMAND ${command} + WORKING_DIRECTORY "${TAR_DIR}" + LOGNAME config-${TARGET_TRIPLET}-${SHORT_NAME_${_buildtype}} + ) + if(EXISTS "${TAR_DIR}/libtool" AND VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(_file "${TAR_DIR}/libtool") + file(READ "${_file}" _contents) + string(REPLACE ".dll.lib" ".lib" _contents "${_contents}") + file(WRITE "${_file}" "${_contents}") + endif() + endif() + + if(BACKUP_ENV_PKG_CONFIG_PATH_${_buildtype}) + set(ENV{PKG_CONFIG_PATH} "${BACKUP_ENV_PKG_CONFIG_PATH_${_buildtype}}") + else() + unset(ENV{PKG_CONFIG_PATH}) + endif() + unset(BACKUP_ENV_PKG_CONFIG_PATH_${_buildtype}) + + if(_csc_ADD_BIN_TO_PATH) + set(ENV{PATH} "${PATH_BACKUP}") + endif() + # Restore environment (config dependent) + foreach(ENV_VAR ${_csc_CONFIG_DEPENDENT_ENVIRONMENT}) + if(BACKUP_CONFIG_${ENV_VAR}) + set(ENV{${ENV_VAR}} "${BACKUP_CONFIG_${ENV_VAR}}") + else() + unset(ENV{${ENV_VAR}}) + endif() + endforeach() + endforeach() + + # Restore environment + foreach(_prefix IN LISTS FLAGPREFIXES) + _vcpkg_restore_env_variable(${prefix}FLAGS) + endforeach() + + _vcpkg_restore_env_variables(LIB LIBPATH LIBRARY_PATH LD_LIBRARY_PATH) + + SET(_VCPKG_PROJECT_SOURCE_PATH ${_csc_SOURCE_PATH} PARENT_SCOPE) + set(_VCPKG_PROJECT_SUBPATH ${_csc_PROJECT_SUBPATH} PARENT_SCOPE) +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_configure_meson.cmake b/vcpkg/scripts/cmake/vcpkg_configure_meson.cmake new file mode 100644 index 0000000..86a6e55 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_configure_meson.cmake @@ -0,0 +1,232 @@ +## # vcpkg_configure_meson +## +## Configure Meson for Debug and Release builds of a project. +## +## ## Usage +## ```cmake +## vcpkg_configure_meson( +## SOURCE_PATH <${SOURCE_PATH}> +## [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] +## [OPTIONS_RELEASE <-DOPTIMIZE=1>...] +## [OPTIONS_DEBUG <-DDEBUGGABLE=1>...] +## ) +## ``` +## +## ## Parameters +## ### SOURCE_PATH +## Specifies the directory containing the `meson.build`. +## By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. +## +## ### OPTIONS +## Additional options passed to Meson during the configuration. +## +## ### OPTIONS_RELEASE +## Additional options passed to Meson during the Release configuration. These are in addition to `OPTIONS`. +## +## ### OPTIONS_DEBUG +## Additional options passed to Meson during the Debug configuration. These are in addition to `OPTIONS`. +## +## ## Notes +## This command supplies many common arguments to Meson. To see the full list, examine the source. +## +## ## Examples +## +## * [fribidi](https://github.com/Microsoft/vcpkg/blob/master/ports/fribidi/portfile.cmake) +## * [libepoxy](https://github.com/Microsoft/vcpkg/blob/master/ports/libepoxy/portfile.cmake) +function(vcpkg_configure_meson) + cmake_parse_arguments(_vcm "" "SOURCE_PATH" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN}) + + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + + #Extract compiler flags + if(NOT VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + set(MESON_CMAKE_FLAG_SUFFIX "_INIT") + if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/windows.cmake") + set(MESON_CMAKE_FLAG_SUFFIX "") + elseif(VCPKG_TARGET_IS_LINUX) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/linux.cmake") + elseif(VCPKG_TARGET_IS_ANDROID) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/android.cmake") + elseif(VCPKG_TARGET_IS_OSX) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/osx.cmake") + elseif(VVCPKG_TARGET_IS_FREEBSD) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/freebsd.cmake") + elseif(VCPKG_TARGET_IS_MINGW) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/mingw.cmake") + endif() + endif() + + include("${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}") + + string(APPEND MESON_COMMON_CFLAGS " ${CMAKE_C_FLAGS${MESON_CMAKE_FLAG_SUFFIX}}") + string(APPEND MESON_COMMON_CXXFLAGS " ${CMAKE_CXX_FLAGS${MESON_CMAKE_FLAG_SUFFIX}}") + + string(APPEND MESON_DEBUG_CFLAGS " ${CMAKE_C_FLAGS_DEBUG${MESON_CMAKE_FLAG_SUFFIX}}") + string(APPEND MESON_DEBUG_CXXFLAGS " ${CMAKE_CXX_FLAGS_DEBUG${MESON_CMAKE_FLAG_SUFFIX}}") + + string(APPEND MESON_RELEASE_CFLAGS " ${CMAKE_C_FLAGS_RELEASE${MESON_CMAKE_FLAG_SUFFIX}}") + string(APPEND MESON_RELEASE_CXXFLAGS " ${CMAKE_CXX_FLAGS_RELEASE${MESON_CMAKE_FLAG_SUFFIX}}") + + string(APPEND MESON_COMMON_LDFLAGS " ${CMAKE_SHARED_LINKER_FLAGS${MESON_CMAKE_FLAG_SUFFIX}}") + string(APPEND MESON_DEBUG_LDFLAGS " ${CMAKE_SHARED_LINKER_FLAGS_DEBUG${MESON_CMAKE_FLAG_SUFFIX}}") + string(APPEND MESON_RELEASE_LDFLAGS " ${CMAKE_SHARED_LINKER_FLAGS_RELEASE${MESON_CMAKE_FLAG_SUFFIX}}") + + # select meson cmd-line options + if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND _vcm_OPTIONS "-Dcmake_prefix_path=['${CURRENT_INSTALLED_DIR}','${CURRENT_INSTALLED_DIR}/share']") + else() + list(APPEND _vcm_OPTIONS "-Dcmake_prefix_path=['${CURRENT_INSTALLED_DIR}']") + endif() + list(APPEND _vcm_OPTIONS --buildtype plain --backend ninja --wrap-mode nodownload) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + list(APPEND _vcm_OPTIONS --default-library shared) + else() + list(APPEND _vcm_OPTIONS --default-library static) + endif() + + list(APPEND _vcm_OPTIONS --libdir lib) # else meson install into an architecture describing folder + list(APPEND _vcm_OPTIONS_DEBUG --prefix ${CURRENT_PACKAGES_DIR}/debug --includedir ../include) + list(APPEND _vcm_OPTIONS_RELEASE --prefix ${CURRENT_PACKAGES_DIR}) + + vcpkg_find_acquire_program(MESON) + + get_filename_component(CMAKE_PATH ${CMAKE_COMMAND} DIRECTORY) + vcpkg_add_to_path("${CMAKE_PATH}") # Make CMake invokeable for Meson + + vcpkg_find_acquire_program(NINJA) + get_filename_component(NINJA_PATH ${NINJA} DIRECTORY) + vcpkg_add_to_path("${NINJA_PATH}") + + vcpkg_find_acquire_program(PKGCONFIG) + get_filename_component(PKGCONFIG_PATH ${PKGCONFIG} DIRECTORY) + vcpkg_add_to_path("${PKGCONFIG_PATH}") + set(PKGCONFIG_SHARE_DIR "${CURRENT_INSTALLED_DIR}/share/pkgconfig/") + # configure debug + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + + #setting up PKGCONFIG + if(NOT PKGCONFIG MATCHES "--define-variable=prefix") + set(PKGCONFIG_PREFIX "${CURRENT_INSTALLED_DIR}/debug") + set(ENV{PKG_CONFIG} "${PKGCONFIG} --define-variable=prefix=${PKGCONFIG_PREFIX}") + endif() + set(PKGCONFIG_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}/debug/lib/pkgconfig/") + if(ENV{PKG_CONFIG_PATH}) + set(BACKUP_ENV_PKG_CONFIG_PATH_DEBUG $ENV{PKG_CONFIG_PATH}) + set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}$ENV{PKG_CONFIG_PATH}") + else() + set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_SHARE_DIR}") + endif() + + set(CFLAGS "-Dc_args=[${MESON_COMMON_CFLAGS} ${MESON_DEBUG_CFLAGS}]") + string(REGEX REPLACE " +(/|-)" "','\\1" CFLAGS ${CFLAGS}) # Seperate compiler arguments with comma and enclose in ' + string(REGEX REPLACE " *\\\]" "']" CFLAGS ${CFLAGS}) # Add trailing ' at end + string(REGEX REPLACE "\\\['," "[" CFLAGS ${CFLAGS}) # Remove prepended ', introduced in #1 + string(REGEX REPLACE "\\\['\\\]" "[]" CFLAGS ${CFLAGS}) # Remove trailing ' introduced in #2 if no elements + + set(CXXFLAGS "-Dcpp_args=[${MESON_COMMON_CXXFLAGS} ${MESON_DEBUG_CXXFLAGS}]") + string(REGEX REPLACE " +(/|-)" "','\\1" CXXFLAGS ${CXXFLAGS}) + string(REGEX REPLACE " *\\\]" "']" CXXFLAGS ${CXXFLAGS}) + string(REGEX REPLACE "\\\['," "[" CXXFLAGS ${CXXFLAGS}) + string(REGEX REPLACE "\\\['\\\]" "[]" CXXFLAGS ${CXXFLAGS}) + + set(LDFLAGS "[${MESON_COMMON_LDFLAGS} ${MESON_DEBUG_LDFLAGS}]") + string(REGEX REPLACE " +(/|-)" "','\\1" LDFLAGS ${LDFLAGS}) + string(REGEX REPLACE " *\\\]" "']" LDFLAGS ${LDFLAGS}) + string(REGEX REPLACE "\\\['," "[" LDFLAGS ${LDFLAGS}) + string(REGEX REPLACE "\\\['\\\]" "[]" LDFLAGS ${LDFLAGS}) + set(CLDFLAGS "-Dc_link_args=${LDFLAGS}") + set(CXXLDFLAGS "-Dcpp_link_args=${LDFLAGS}") + vcpkg_execute_required_process( + COMMAND ${MESON} ${_vcm_OPTIONS} ${_vcm_OPTIONS_DEBUG} ${_vcm_SOURCE_PATH} ${CFLAGS} ${CXXFLAGS} ${CLDFLAGS} ${CXXLDFLAGS} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME config-${TARGET_TRIPLET}-dbg + ) + + #Copy meson log files into buildtree for CI + if(EXISTS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/meson-logs/meson-log.txt") + file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/meson-logs/meson-log.txt" DESTINATION "${CURRENT_BUILDTREES_DIR}") + file(RENAME "${CURRENT_BUILDTREES_DIR}/meson-log.txt" "${CURRENT_BUILDTREES_DIR}/meson-log-dbg.txt") + endif() + if(EXISTS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/meson-logs/install-log.txt") + file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/meson-logs/install-log.txt" DESTINATION "${CURRENT_BUILDTREES_DIR}") + file(RENAME "${CURRENT_BUILDTREES_DIR}/install-log.txt" "${CURRENT_BUILDTREES_DIR}/install-log-dbg.txt") + endif() + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") + + #Restore PKG_CONFIG_PATH + if(BACKUP_ENV_PKG_CONFIG_PATH_DEBUG) + set(ENV{PKG_CONFIG_PATH} "${BACKUP_ENV_PKG_CONFIG_PATH_DEBUG}") + unset(BACKUP_ENV_PKG_CONFIG_PATH_DEBUG) + else() + unset(ENV{PKG_CONFIG_PATH}) + endif() + endif() + + # configure release + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + #setting up PKGCONFIG + if(NOT PKGCONFIG MATCHES "--define-variable=prefix") + set(PKGCONFIG_PREFIX "${CURRENT_INSTALLED_DIR}") + set(ENV{PKG_CONFIG} "${PKGCONFIG} --define-variable=prefix=${PKGCONFIG_PREFIX}") + endif() + set(PKGCONFIG_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}/lib/pkgconfig/") + if(ENV{PKG_CONFIG_PATH}) + set(BACKUP_ENV_PKG_CONFIG_PATH_RELEASE $ENV{PKG_CONFIG_PATH}) + set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}$ENV{PKG_CONFIG_PATH}") + else() + set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_SHARE_DIR}") + endif() + + # Normalize flags for meson (i.e. " /string /with /flags " -> ['/string', '/with', '/flags']) + set(CFLAGS "-Dc_args=[${MESON_COMMON_CFLAGS} ${MESON_RELEASE_CFLAGS}]") + string(REGEX REPLACE " +(/|-)" "','\\1" CFLAGS ${CFLAGS}) # Seperate compiler arguments with comma and enclose in ' + string(REGEX REPLACE " *\\\]" "']" CFLAGS ${CFLAGS}) # Add trailing ' at end + string(REGEX REPLACE "\\\['," "[" CFLAGS ${CFLAGS}) # Remove prepended ', introduced in #1 + string(REGEX REPLACE "\\\['\\\]" "[]" CFLAGS ${CFLAGS}) # Remove trailing ' introduced in #2 if no elements + set(CXXFLAGS "-Dcpp_args=[${MESON_COMMON_CXXFLAGS} ${MESON_RELEASE_CXXFLAGS}]") + string(REGEX REPLACE " +(/|-)" "','\\1" CXXFLAGS ${CXXFLAGS}) + string(REGEX REPLACE " *\\\]" "']" CXXFLAGS ${CXXFLAGS}) + string(REGEX REPLACE "\\\['," "[" CXXFLAGS ${CXXFLAGS}) + string(REGEX REPLACE "\\\['\\\]" "[]" CXXFLAGS ${CXXFLAGS}) + set(LDFLAGS "[${MESON_COMMON_LDFLAGS} ${MESON_RELEASE_LDFLAGS}]") + string(REGEX REPLACE " +(/|-)" "','\\1" LDFLAGS ${LDFLAGS}) + string(REGEX REPLACE " *\\\]" "']" LDFLAGS ${LDFLAGS}) + string(REGEX REPLACE "\\\['," "[" LDFLAGS ${LDFLAGS}) + string(REGEX REPLACE "\\\['\\\]" "[]" LDFLAGS ${LDFLAGS}) + set(CLDFLAGS "-Dc_link_args=${LDFLAGS}") + set(CXXLDFLAGS "-Dcpp_link_args=${LDFLAGS}") + + vcpkg_execute_required_process( + COMMAND ${MESON} ${_vcm_OPTIONS} ${_vcm_OPTIONS_RELEASE} ${_vcm_SOURCE_PATH} ${CFLAGS} ${CXXFLAGS} ${CLDFLAGS} ${CXXLDFLAGS} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME config-${TARGET_TRIPLET}-rel + ) + #Copy meson log files into buildtree for CI + if(EXISTS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/meson-logs/meson-log.txt") + file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/meson-logs/meson-log.txt" DESTINATION "${CURRENT_BUILDTREES_DIR}") + file(RENAME "${CURRENT_BUILDTREES_DIR}/meson-log.txt" "${CURRENT_BUILDTREES_DIR}/meson-log-rel.txt") + endif() + if(EXISTS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/meson-logs/install-log.txt") + file(COPY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/meson-logs/install-log.txt" DESTINATION "${CURRENT_BUILDTREES_DIR}") + file(RENAME "${CURRENT_BUILDTREES_DIR}/install-log.txt" "${CURRENT_BUILDTREES_DIR}/install-log-rel.txt") + endif() + message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") + + #Restore PKG_CONFIG_PATH + if(BACKUP_ENV_PKG_CONFIG_PATH_RELEASE) + set(ENV{PKG_CONFIG_PATH} "${BACKUP_ENV_PKG_CONFIG_PATH_RELEASE}") + unset(BACKUP_ENV_PKG_CONFIG_PATH_RELEASE) + else() + unset(ENV{PKG_CONFIG_PATH}) + endif() + + endif() + +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_configure_qmake.cmake b/vcpkg/scripts/cmake/vcpkg_configure_qmake.cmake new file mode 100644 index 0000000..44230a7 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_configure_qmake.cmake @@ -0,0 +1,91 @@ +#.rst: +# .. command:: vcpkg_configure_qmake +# +# Configure a qmake-based project. +# +# :: +# vcpkg_configure_qmake(SOURCE_PATH +# [OPTIONS arg1 [arg2 ...]] +# [OPTIONS_RELEASE arg1 [arg2 ...]] +# [OPTIONS_DEBUG arg1 [arg2 ...]] +# ) +# +# ``SOURCE_PATH`` +# The path to the *.pro qmake project file. +# ``OPTIONS[_RELEASE|_DEBUG]`` +# The options passed to qmake. + +function(vcpkg_configure_qmake) + cmake_parse_arguments(_csc "" "SOURCE_PATH" "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG;BUILD_OPTIONS;BUILD_OPTIONS_RELEASE;BUILD_OPTIONS_DEBUG" ${ARGN}) + + # Find qmake executable + set(_triplet_hostbindir ${CURRENT_INSTALLED_DIR}/tools/qt5/bin) + if(DEFINED VCPKG_QT_HOST_TOOLS_ROOT_DIR) + find_program(QMAKE_COMMAND NAMES qmake PATHS ${VCPKG_QT_HOST_TOOLS_ROOT_DIR}/bin ${_triplet_hostbindir} NO_DEFAULT_PATH) + else() + find_program(QMAKE_COMMAND NAMES qmake PATHS ${_triplet_hostbindir} NO_DEFAULT_PATH) + endif() + + if(NOT QMAKE_COMMAND) + message(FATAL_ERROR "vcpkg_configure_qmake: unable to find qmake.") + endif() + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + list(APPEND _csc_OPTIONS "CONFIG-=shared") + list(APPEND _csc_OPTIONS "CONFIG*=static") + else() + list(APPEND _csc_OPTIONS "CONFIG-=static") + list(APPEND _csc_OPTIONS "CONFIG*=shared") + list(APPEND _csc_OPTIONS_DEBUG "CONFIG*=separate_debug_info") + endif() + + if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_CRT_LINKAGE STREQUAL "static") + list(APPEND _csc_OPTIONS "CONFIG*=static-runtime") + endif() + + # Cleanup build directories + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + + if(DEFINED VCPKG_OSX_DEPLOYMENT_TARGET) + set(ENV{QMAKE_MACOSX_DEPLOYMENT_TARGET} ${VCPKG_OSX_DEPLOYMENT_TARGET}) + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + configure_file(${CURRENT_INSTALLED_DIR}/tools/qt5/qt_release.conf ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf) + + message(STATUS "Configuring ${TARGET_TRIPLET}-rel") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + if(DEFINED _csc_BUILD_OPTIONS OR DEFINED _csc_BUILD_OPTIONS_RELEASE) + set(BUILD_OPT -- ${_csc_BUILD_OPTIONS} ${_csc_BUILD_OPTIONS_RELEASE}) + endif() + vcpkg_execute_required_process( + COMMAND ${QMAKE_COMMAND} CONFIG-=debug CONFIG+=release + ${_csc_OPTIONS} ${_csc_OPTIONS_RELEASE} ${_csc_SOURCE_PATH} + -qtconf "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/qt.conf" + ${BUILD_OPT} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME config-${TARGET_TRIPLET}-rel + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-rel done") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + configure_file(${CURRENT_INSTALLED_DIR}/tools/qt5/qt_debug.conf ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/qt.conf) + + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + if(DEFINED _csc_BUILD_OPTIONS OR DEFINED _csc_BUILD_OPTIONS_DEBUG) + set(BUILD_OPT -- ${_csc_BUILD_OPTIONS} ${_csc_BUILD_OPTIONS_DEBUG}) + endif() + vcpkg_execute_required_process( + COMMAND ${QMAKE_COMMAND} CONFIG-=release CONFIG+=debug + ${_csc_OPTIONS} ${_csc_OPTIONS_DEBUG} ${_csc_SOURCE_PATH} + -qtconf "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/qt.conf" + ${BUILD_OPT} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME config-${TARGET_TRIPLET}-dbg + ) + message(STATUS "Configuring ${TARGET_TRIPLET}-dbg done") + endif() + +endfunction() \ No newline at end of file diff --git a/vcpkg/scripts/cmake/vcpkg_copy_pdbs.cmake b/vcpkg/scripts/cmake/vcpkg_copy_pdbs.cmake new file mode 100644 index 0000000..12154d9 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_copy_pdbs.cmake @@ -0,0 +1,77 @@ +## # vcpkg_copy_pdbs +## +## Automatically locate pdbs in the build tree and copy them adjacent to all DLLs. +## +## ## Usage +## ```cmake +## vcpkg_copy_pdbs([BUILD_PATHS <${CURRENT_PACKAGES_DIR}/bin/*.dll> ...]) +## ``` +## +## ## Notes +## This command should always be called by portfiles after they have finished rearranging the binary output. +## +## ## Parameters +## ### BUILD_PATHS +## Path patterns passed to `file(GLOB_RECURSE)` for locating dlls. +## +## Defaults to `${CURRENT_PACKAGES_DIR}/bin/*.dll` and `${CURRENT_PACKAGES_DIR}/debug/bin/*.dll`. +## +## ## Examples +## +## * [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) +## * [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) +function(vcpkg_copy_pdbs) + cmake_parse_arguments(_vcp "" "" "BUILD_PATHS" ${ARGN}) + + if(NOT _vcp_BUILD_PATHS) + set( + _vcp_BUILD_PATHS + ${CURRENT_PACKAGES_DIR}/bin/*.dll + ${CURRENT_PACKAGES_DIR}/debug/bin/*.dll + ) + endif() + + function(merge_filelist OUTVAR INVAR) + set(MSG "") + foreach(VAR ${${INVAR}}) + set(MSG "${MSG} ${VAR}\n") + endforeach() + set(${OUTVAR} ${MSG} PARENT_SCOPE) + endfunction() + + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic AND NOT VCPKG_TARGET_IS_MINGW) + file(GLOB_RECURSE DLLS ${_vcp_BUILD_PATHS}) + + set(DLLS_WITHOUT_MATCHING_PDBS) + + set(PREVIOUS_VSLANG $ENV{VSLANG}) + set(ENV{VSLANG} 1033) + + foreach(DLL ${DLLS}) + execute_process(COMMAND dumpbin /PDBPATH ${DLL} + COMMAND findstr PDB + OUTPUT_VARIABLE PDB_LINE + ERROR_QUIET + RESULT_VARIABLE error_code + ) + + if(NOT error_code AND PDB_LINE MATCHES "PDB file found at") + string(REGEX MATCH '.*' PDB_PATH ${PDB_LINE}) # Extract the path which is in single quotes + string(REPLACE ' "" PDB_PATH ${PDB_PATH}) # Remove single quotes + get_filename_component(DLL_DIR ${DLL} DIRECTORY) + file(COPY ${PDB_PATH} DESTINATION ${DLL_DIR}) + else() + list(APPEND DLLS_WITHOUT_MATCHING_PDBS ${DLL}) + endif() + endforeach() + + set(ENV{VSLANG} ${PREVIOUS_VSLANG}) + + list(LENGTH DLLS_WITHOUT_MATCHING_PDBS UNMATCHED_DLLS_LENGTH) + if(UNMATCHED_DLLS_LENGTH GREATER 0) + merge_filelist(MSG DLLS_WITHOUT_MATCHING_PDBS) + message(STATUS "Warning: Could not find a matching pdb file for:\n${MSG}") + endif() + endif() + +endfunction() \ No newline at end of file diff --git a/vcpkg/scripts/cmake/vcpkg_copy_tool_dependencies.cmake b/vcpkg/scripts/cmake/vcpkg_copy_tool_dependencies.cmake new file mode 100644 index 0000000..1784a4d --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_copy_tool_dependencies.cmake @@ -0,0 +1,39 @@ +## # vcpkg_copy_tool_dependencies +## +## Copy all DLL dependencies of built tools into the tool folder. +## +## ## Usage +## ```cmake +## vcpkg_copy_tool_dependencies(<${CURRENT_PACKAGES_DIR}/tools/${PORT}>) +## ``` +## ## Parameters +## The path to the directory containing the tools. +## +## ## Notes +## This command should always be called by portfiles after they have finished rearranging the binary output, if they have any tools. +## +## ## Examples +## +## * [glib](https://github.com/Microsoft/vcpkg/blob/master/ports/glib/portfile.cmake) +## * [fltk](https://github.com/Microsoft/vcpkg/blob/master/ports/fltk/portfile.cmake) +function(vcpkg_copy_tool_dependencies TOOL_DIR) + find_program(PS_EXE powershell PATHS ${DOWNLOADS}/tool) + if (PS_EXE-NOTFOUND) + message(FATAL_ERROR "Could not find powershell in vcpkg tools, please open an issue to report this.") + endif() + macro(search_for_dependencies PATH_TO_SEARCH) + file(GLOB TOOLS ${TOOL_DIR}/*.exe ${TOOL_DIR}/*.dll) + foreach(TOOL ${TOOLS}) + vcpkg_execute_required_process( + COMMAND ${PS_EXE} -noprofile -executionpolicy Bypass -nologo + -file ${SCRIPTS}/buildsystems/msbuild/applocal.ps1 + -targetBinary ${TOOL} + -installedDir ${PATH_TO_SEARCH} + WORKING_DIRECTORY ${VCPKG_ROOT_DIR} + LOGNAME copy-tool-dependencies + ) + endforeach() + endmacro() + search_for_dependencies(${CURRENT_PACKAGES_DIR}/bin) + search_for_dependencies(${CURRENT_INSTALLED_DIR}/bin) +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_copy_tools.cmake b/vcpkg/scripts/cmake/vcpkg_copy_tools.cmake new file mode 100644 index 0000000..9651b53 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_copy_tools.cmake @@ -0,0 +1,56 @@ +## # vcpkg_copy_tools +## +## Copy tools and all their DLL dependencies into the `tools` folder. +## +## ## Usage +## ```cmake +## vcpkg_copy_tools( +## TOOL_NAMES ... +## [SEARCH_DIR <${CURRENT_PACKAGES_DIR}/bin>] +## [AUTO_CLEAN] +## ) +## ``` +## ## Parameters +## ### TOOL_NAMES +## A list of tool filenames without extension. +## +## ### SEARCH_DIR +## The path to the directory containing the tools. This will be set to `${CURRENT_PACKAGES_DIR}/bin` if ommited. +## +## ### AUTO_CLEAN +## Auto clean executables in `${CURRENT_PACKAGES_DIR}/bin` and `${CURRENT_PACKAGES_DIR}/debug/bin`. +## +## ## Examples +## +## * [cpuinfo](https://github.com/microsoft/vcpkg/blob/master/ports/cpuinfo/portfile.cmake) +## * [nanomsg](https://github.com/microsoft/vcpkg/blob/master/ports/nanomsg/portfile.cmake) +## * [uriparser](https://github.com/microsoft/vcpkg/blob/master/ports/uriparser/portfile.cmake) +function(vcpkg_copy_tools) + cmake_parse_arguments(_vct "AUTO_CLEAN" "SEARCH_DIR" "TOOL_NAMES" ${ARGN}) + + if(NOT DEFINED _vct_TOOL_NAMES) + message(FATAL_ERROR "TOOL_NAMES must be specified.") + endif() + + if(NOT DEFINED _vct_SEARCH_DIR) + set(_vct_SEARCH_DIR ${CURRENT_PACKAGES_DIR}/bin) + elseif(NOT IS_DIRECTORY ${_vct_SEARCH_DIR}) + message(FATAL_ERROR "SEARCH_DIR ${_vct_SEARCH_DIR} is supposed to be a directory.") + endif() + + foreach(tool_name ${_vct_TOOL_NAMES}) + set(tool_path "${_vct_SEARCH_DIR}/${tool_name}${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + + if(EXISTS ${tool_path}) + file(COPY ${tool_path} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + else() + message(FATAL_ERROR "Couldn't find this tool: ${tool_path}.") + endif() + endforeach() + + if(_vct_AUTO_CLEAN) + vcpkg_clean_executables_in_bin(FILE_NAMES ${_vct_TOOL_NAMES}) + endif() + + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_download_distfile.cmake b/vcpkg/scripts/cmake/vcpkg_download_distfile.cmake new file mode 100644 index 0000000..a767bff --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_download_distfile.cmake @@ -0,0 +1,207 @@ +## # vcpkg_download_distfile +## +## Download and cache a file needed for this port. +## +## This helper should always be used instead of CMake's built-in `file(DOWNLOAD)` command. +## +## ## Usage +## ```cmake +## vcpkg_download_distfile( +## +## URLS ... +## FILENAME +## SHA512 <5981de...> +## ) +## ``` +## ## Parameters +## ### OUT_VARIABLE +## This variable will be set to the full path to the downloaded file. This can then immediately be passed in to [`vcpkg_extract_source_archive`](vcpkg_extract_source_archive.md) for sources. +## +## ### URLS +## A list of URLs to be consulted. They will be tried in order until one of the downloaded files successfully matches the SHA512 given. +## +## ### FILENAME +## The local name for the file. Files are shared between ports, so the file may need to be renamed to make it clearly attributed to this port and avoid conflicts. +## +## ### SHA512 +## The expected hash for the file. +## +## If this doesn't match the downloaded version, the build will be terminated with a message describing the mismatch. +## +## ### QUIET +## Suppress output on cache hit +## +## ### SKIP_SHA512 +## Skip SHA512 hash check for file. +## +## This switch is only valid when building with the `--head` command line flag. +## +## ### HEADERS +## A list of headers to append to the download request. This can be used for authentication during a download. +## +## Headers should be specified as ": ". +## +## ## Notes +## The helper [`vcpkg_from_github`](vcpkg_from_github.md) should be used for downloading from GitHub projects. +## +## ## Examples +## +## * [apr](https://github.com/Microsoft/vcpkg/blob/master/ports/apr/portfile.cmake) +## * [fontconfig](https://github.com/Microsoft/vcpkg/blob/master/ports/fontconfig/portfile.cmake) +## * [freetype](https://github.com/Microsoft/vcpkg/blob/master/ports/freetype/portfile.cmake) + +include(vcpkg_execute_in_download_mode) + +function(vcpkg_download_distfile VAR) + set(options SKIP_SHA512 SILENT_EXIT QUIET) + set(oneValueArgs FILENAME SHA512) + set(multipleValuesArgs URLS HEADERS) + cmake_parse_arguments(PARSE_ARGV 1 vcpkg_download_distfile "${options}" "${oneValueArgs}" "${multipleValuesArgs}") + + if(NOT DEFINED vcpkg_download_distfile_URLS) + message(FATAL_ERROR "vcpkg_download_distfile requires a URLS argument.") + endif() + if(NOT DEFINED vcpkg_download_distfile_FILENAME) + message(FATAL_ERROR "vcpkg_download_distfile requires a FILENAME argument.") + endif() + if(NOT _VCPKG_INTERNAL_NO_HASH_CHECK) + if(NOT vcpkg_download_distfile_SKIP_SHA512 AND NOT DEFINED vcpkg_download_distfile_SHA512) + message(FATAL_ERROR "vcpkg_download_distfile requires a SHA512 argument. If you do not know the SHA512, add it as 'SHA512 0' and re-run this command.") + endif() + if(vcpkg_download_distfile_SKIP_SHA512 AND DEFINED vcpkg_download_distfile_SHA512) + message(FATAL_ERROR "vcpkg_download_distfile must not be passed both SHA512 and SKIP_SHA512.") + endif() + endif() + + set(downloaded_file_path ${DOWNLOADS}/${vcpkg_download_distfile_FILENAME}) + set(download_file_path_part "${DOWNLOADS}/temp/${vcpkg_download_distfile_FILENAME}") + + # Works around issue #3399 + if(IS_DIRECTORY "${DOWNLOADS}/temp") + # Delete "temp0" directory created by the old version of vcpkg + file(REMOVE_RECURSE "${DOWNLOADS}/temp0") + + file(GLOB temp_files "${DOWNLOADS}/temp") + file(REMOVE_RECURSE ${temp_files}) + else() + file(MAKE_DIRECTORY "${DOWNLOADS}/temp") + endif() + + function(test_hash FILE_PATH FILE_KIND CUSTOM_ERROR_ADVICE) + if(_VCPKG_INTERNAL_NO_HASH_CHECK) + # When using the internal hash skip, do not output an explicit message. + return() + endif() + if(vcpkg_download_distfile_SKIP_SHA512) + message(STATUS "Skipping hash check for ${FILE_PATH}.") + return() + endif() + + file(SHA512 ${FILE_PATH} FILE_HASH) + if(NOT FILE_HASH STREQUAL vcpkg_download_distfile_SHA512) + message(FATAL_ERROR + "\nFile does not have expected hash:\n" + " File path: [ ${FILE_PATH} ]\n" + " Expected hash: [ ${vcpkg_download_distfile_SHA512} ]\n" + " Actual hash: [ ${FILE_HASH} ]\n" + "${CUSTOM_ERROR_ADVICE}\n") + endif() + endfunction() + + if(EXISTS "${downloaded_file_path}") + if(NOT vcpkg_download_distfile_QUIET) + message(STATUS "Using cached ${downloaded_file_path}") + endif() + test_hash("${downloaded_file_path}" "cached file" "Please delete the file and retry if this file should be downloaded again.") + else() + if(_VCPKG_NO_DOWNLOADS) + message(FATAL_ERROR "Downloads are disabled, but '${downloaded_file_path}' does not exist.") + endif() + + # Tries to download the file. + list(GET vcpkg_download_distfile_URLS 0 SAMPLE_URL) + if(_VCPKG_DOWNLOAD_TOOL STREQUAL "ARIA2" AND NOT SAMPLE_URL MATCHES "aria2") + vcpkg_find_acquire_program("ARIA2") + message(STATUS "Downloading ${vcpkg_download_distfile_FILENAME}...") + if(vcpkg_download_distfile_HEADERS) + foreach(header ${vcpkg_download_distfile_HEADERS}) + list(APPEND request_headers "--header=${header}") + endforeach() + endif() + vcpkg_execute_in_download_mode( + COMMAND ${ARIA2} ${vcpkg_download_distfile_URLS} + -o temp/${vcpkg_download_distfile_FILENAME} + -l download-${vcpkg_download_distfile_FILENAME}-detailed.log + ${request_headers} + OUTPUT_FILE download-${vcpkg_download_distfile_FILENAME}-out.log + ERROR_FILE download-${vcpkg_download_distfile_FILENAME}-err.log + RESULT_VARIABLE error_code + WORKING_DIRECTORY ${DOWNLOADS} + ) + if (NOT "${error_code}" STREQUAL "0") + message(STATUS + "Downloading ${vcpkg_download_distfile_FILENAME}... Failed.\n" + " Exit Code: ${error_code}\n" + " See logs for more information:\n" + " ${DOWNLOADS}/download-${vcpkg_download_distfile_FILENAME}-out.log\n" + " ${DOWNLOADS}/download-${vcpkg_download_distfile_FILENAME}-err.log\n" + " ${DOWNLOADS}/download-${vcpkg_download_distfile_FILENAME}-detailed.log\n" + ) + set(download_success 0) + else() + file(REMOVE + ${DOWNLOADS}/download-${vcpkg_download_distfile_FILENAME}-out.log + ${DOWNLOADS}/download-${vcpkg_download_distfile_FILENAME}-err.log + ${DOWNLOADS}/download-${vcpkg_download_distfile_FILENAME}-detailed.log + ) + set(download_success 1) + endif() + else() + foreach(url IN LISTS vcpkg_download_distfile_URLS) + message(STATUS "Downloading ${url}...") + if(vcpkg_download_distfile_HEADERS) + foreach(header ${vcpkg_download_distfile_HEADERS}) + list(APPEND request_headers HTTPHEADER ${header}) + endforeach() + endif() + file(DOWNLOAD "${url}" "${download_file_path_part}" STATUS download_status ${request_headers}) + list(GET download_status 0 status_code) + if (NOT "${status_code}" STREQUAL "0") + message(STATUS "Downloading ${url}... Failed. Status: ${download_status}") + set(download_success 0) + else() + set(download_success 1) + break() + endif() + endforeach(url) + endif() + + if (NOT vcpkg_download_distfile_SILENT_EXIT) + if (NOT download_success) + message(FATAL_ERROR + " \n" + " Failed to download file.\n" + " If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment\n" + " variables to \"https://user:password@your-proxy-ip-address:port/\".\n" + " Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/issues\n") + else() + test_hash("${download_file_path_part}" "downloaded file" "The file may have been corrupted in transit. This can be caused by proxies. If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment variables to \"https://user:password@your-proxy-ip-address:port/\".\n") + get_filename_component(downloaded_file_dir "${downloaded_file_path}" DIRECTORY) + file(MAKE_DIRECTORY "${downloaded_file_dir}") + file(RENAME ${download_file_path_part} ${downloaded_file_path}) + endif() + else() + if (NOT download_success) + message(WARNING + " \n" + " Failed to download file.\n") + else() + test_hash("${download_file_path_part}" "downloaded file" "The file may have been corrupted in transit. This can be caused by proxies. If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment variables to \"https://user:password@your-proxy-ip-address:port/\".\n") + get_filename_component(downloaded_file_dir "${downloaded_file_path}" DIRECTORY) + file(MAKE_DIRECTORY "${downloaded_file_dir}") + file(RENAME ${download_file_path_part} ${downloaded_file_path}) + endif() + endif() + endif() + set(${VAR} ${downloaded_file_path} PARENT_SCOPE) +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_escape_regex_control_characters.cmake b/vcpkg/scripts/cmake/vcpkg_escape_regex_control_characters.cmake new file mode 100644 index 0000000..3d9d92b --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_escape_regex_control_characters.cmake @@ -0,0 +1,4 @@ +function(vcpkg_escape_regex_control_characters out_var string_with_regex_characters) + string(REGEX REPLACE "[][+.*()^\\$?|]" "\\\\\\0" _escaped_content "${string_with_regex_characters}") + set(${out_var} "${_escaped_content}" PARENT_SCOPE) +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_execute_build_process.cmake b/vcpkg/scripts/cmake/vcpkg_execute_build_process.cmake new file mode 100644 index 0000000..98e3648 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_execute_build_process.cmake @@ -0,0 +1,148 @@ +## # vcpkg_execute_build_process +## +## Execute a required build process +## +## ## Usage +## ```cmake +## vcpkg_execute_build_process( +## COMMAND [...] +## [NO_PARALLEL_COMMAND [...]] +## WORKING_DIRECTORY +## LOGNAME ) +## ) +## ``` +## ## Parameters +## ### COMMAND +## The command to be executed, along with its arguments. +## +## ### NO_PARALLEL_COMMAND +## Optional parameter which specifies a non-parallel command to attempt if a +## failure potentially due to parallelism is detected. +## +## ### WORKING_DIRECTORY +## The directory to execute the command in. +## +## ### LOGNAME +## The prefix to use for the log files. +## +## This should be a unique name for different triplets so that the logs don't +## conflict when building multiple at once. +## +## ## Examples +## +## * [icu](https://github.com/Microsoft/vcpkg/blob/master/ports/icu/portfile.cmake) +include(vcpkg_prettify_command) +function(vcpkg_execute_build_process) + cmake_parse_arguments(_ebp "" "WORKING_DIRECTORY;LOGNAME" "COMMAND;NO_PARALLEL_COMMAND" ${ARGN}) + + set(LOG_OUT "${CURRENT_BUILDTREES_DIR}/${_ebp_LOGNAME}-out.log") + set(LOG_ERR "${CURRENT_BUILDTREES_DIR}/${_ebp_LOGNAME}-err.log") + + execute_process( + COMMAND ${_ebp_COMMAND} + WORKING_DIRECTORY ${_ebp_WORKING_DIRECTORY} + OUTPUT_FILE ${LOG_OUT} + ERROR_FILE ${LOG_ERR} + RESULT_VARIABLE error_code + ) + + if(error_code) + file(READ ${LOG_OUT} out_contents) + file(READ ${LOG_ERR} err_contents) + + if(out_contents) + list(APPEND LOGS ${LOG_OUT}) + endif() + if(err_contents) + list(APPEND LOGS ${LOG_ERR}) + endif() + + if(out_contents MATCHES "LINK : fatal error LNK1102:" OR out_contents MATCHES " fatal error C1060: " + OR err_contents MATCHES "LINK : fatal error LNK1102:" OR err_contents MATCHES " fatal error C1060: " + OR out_contents MATCHES "LINK : fatal error LNK1318: Unexpected PDB error; ACCESS_DENIED" + OR out_contents MATCHES "LINK : fatal error LNK1104:" + OR out_contents MATCHES "LINK : fatal error LNK1201:" + # The linker ran out of memory during execution. We will try continuing once more, with parallelism disabled. + OR err_contents MATCHES "Cannot create parent directory" OR err_contents MATCHES "Cannot write file" + # Multiple threads using the same directory at the same time cause conflicts, will try again. + OR err_contents MATCHES "Can't open" + # Multiple threads caused the wrong order of creating folders and creating files in folders + ) + message(STATUS "Restarting Build without parallelism because memory exceeded") + set(LOG_OUT "${CURRENT_BUILDTREES_DIR}/${_ebp_LOGNAME}-out-1.log") + set(LOG_ERR "${CURRENT_BUILDTREES_DIR}/${_ebp_LOGNAME}-err-1.log") + + if(_ebp_NO_PARALLEL_COMMAND) + execute_process( + COMMAND ${_ebp_NO_PARALLEL_COMMAND} + WORKING_DIRECTORY ${_ebp_WORKING_DIRECTORY} + OUTPUT_FILE ${LOG_OUT} + ERROR_FILE ${LOG_ERR} + RESULT_VARIABLE error_code + ) + else() + execute_process( + COMMAND ${_ebp_COMMAND} + WORKING_DIRECTORY ${_ebp_WORKING_DIRECTORY} + OUTPUT_FILE ${LOG_OUT} + ERROR_FILE ${LOG_ERR} + RESULT_VARIABLE error_code + ) + endif() + + if(error_code) + file(READ ${LOG_OUT} out_contents) + file(READ ${LOG_ERR} err_contents) + + if(out_contents) + list(APPEND LOGS ${LOG_OUT}) + endif() + if(err_contents) + list(APPEND LOGS ${LOG_ERR}) + endif() + endif() + elseif(out_contents MATCHES "mt : general error c101008d: " OR out_contents MATCHES "mt.exe : general error c101008d: ") + # Antivirus workaround - occasionally files are locked and cause mt.exe to fail + message(STATUS "mt.exe has failed. This may be the result of anti-virus. Disabling anti-virus on the buildtree folder may improve build speed") + set(ITERATION 0) + while (ITERATION LESS 3 AND (out_contents MATCHES "mt : general error c101008d: " OR out_contents MATCHES "mt.exe : general error c101008d: ")) + MATH(EXPR ITERATION "${ITERATION}+1") + message(STATUS "Restarting Build ${TARGET_TRIPLET}-${SHORT_BUILDTYPE} because of mt.exe file locking issue. Iteration: ${ITERATION}") + execute_process( + COMMAND ${_ebp_COMMAND} + OUTPUT_FILE "${LOGPREFIX}-out-${ITERATION}.log" + ERROR_FILE "${LOGPREFIX}-err-${ITERATION}.log" + RESULT_VARIABLE error_code + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${SHORT_BUILDTYPE}) + + if(error_code) + file(READ "${LOGPREFIX}-out-${ITERATION}.log" out_contents) + file(READ "${LOGPREFIX}-err-${ITERATION}.log" err_contents) + + if(out_contents) + list(APPEND LOGS "${LOGPREFIX}-out-${ITERATION}.log") + endif() + if(err_contents) + list(APPEND LOGS "${LOGPREFIX}-err-${ITERATION}.log") + endif() + else() + break() + endif() + endwhile() + endif() + + if(error_code) + set(STRINGIFIED_LOGS) + foreach(LOG ${LOGS}) + file(TO_NATIVE_PATH "${LOG}" NATIVE_LOG) + list(APPEND STRINGIFIED_LOGS " ${NATIVE_LOG}\n") + endforeach() + vcpkg_prettify_command(_ebp_COMMAND _ebp_COMMAND_PRETTY) + message(FATAL_ERROR + " Command failed: ${_ebp_COMMAND_PRETTY}\n" + " Working Directory: ${_ebp_WORKING_DIRECTORY}\n" + " See logs for more information:\n" + ${STRINGIFIED_LOGS}) + endif(error_code) + endif(error_code) +endfunction(vcpkg_execute_build_process) diff --git a/vcpkg/scripts/cmake/vcpkg_execute_in_download_mode.cmake b/vcpkg/scripts/cmake/vcpkg_execute_in_download_mode.cmake new file mode 100644 index 0000000..752ef40 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_execute_in_download_mode.cmake @@ -0,0 +1,59 @@ +## # vcpkg_execute_in_download_mode +## +## Execute a process even in download mode. +## +## ## Usage +## ```cmake +## vcpkg_execute_in_download_mode( +## COMMAND [...] +## OUTPUT_QUIET ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE +## WORKING_DIRECTORY +## TIMEOUT +## RESULT_VARIABLE +## OUTPUT_VARIABLE +## ERROR_VARIABLE +## INPUT_FILE +## OUTPUT_FILE +## ERROR_FILE +## ENCODING +## ) +## ``` +## +## The signature of this function is identical with `execute_process()` except that +## it only accepts one COMMAND argument, i.e., does not support chaining multiple +## commands with pipes. +## +## See `execute_process()` for a detailed description of the parameters. +function(vcpkg_execute_in_download_mode) + # parse parameters such that semicolons in options arguments to COMMAND don't get erased + cmake_parse_arguments(PARSE_ARGV 0 vcpkg_execute_in_download_mode + "OUTPUT_QUIET;ERROR_QUIET;OUTPUT_STRIP_TRAILING_WHITESPACE;ERROR_STRIP_TRAILING_WHITESPACE" + "WORKING_DIRECTORY;TIMEOUT;RESULT_VARIABLE;RESULTS_VARIABLE;OUTPUT_VARIABLE;ERROR_VARIABLE;INPUT_FILE;OUTPUT_FILE;ERROR_FILE;ENCODING" + "COMMAND") + + # collect all other present parameters + set(other_args "") + foreach(arg OUTPUT_QUIET ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE) + if(vcpkg_execute_in_download_mode_${arg}) + list(APPEND other_args ${arg}) + endif() + endforeach() + foreach(arg WORKING_DIRECTORY TIMEOUT RESULT_VARIABLE RESULTS_VARIABLE OUTPUT_VARIABLE ERROR_VARIABLE INPUT_FILE OUTPUT_FILE ERROR_FILE ENCODING) + if(vcpkg_execute_in_download_mode_${arg}) + list(APPEND other_args ${arg} ${vcpkg_execute_in_download_mode_${arg}}) + endif() + endforeach() + + if (DEFINED VCPKG_DOWNLOAD_MODE) + _execute_process(COMMAND ${vcpkg_execute_in_download_mode_COMMAND} ${other_args}) + else() + execute_process(COMMAND ${vcpkg_execute_in_download_mode_COMMAND} ${other_args}) + endif() + + # pass output parameters back to caller's scope + foreach(arg RESULT_VARIABLE RESULTS_VARIABLE OUTPUT_VARIABLE ERROR_VARIABLE) + if(vcpkg_execute_in_download_mode_${arg}) + set(${vcpkg_execute_in_download_mode_${arg}} ${${vcpkg_execute_in_download_mode_${arg}}} PARENT_SCOPE) + endif() + endforeach() +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_execute_required_process.cmake b/vcpkg/scripts/cmake/vcpkg_execute_required_process.cmake new file mode 100644 index 0000000..b59675c --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_execute_required_process.cmake @@ -0,0 +1,93 @@ +## # vcpkg_execute_required_process +## +## Execute a process with logging and fail the build if the command fails. +## +## ## Usage +## ```cmake +## vcpkg_execute_required_process( +## COMMAND <${PERL}> [...] +## WORKING_DIRECTORY <${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg> +## LOGNAME +## [TIMEOUT ] +## ) +## ``` +## ## Parameters +## ### ALLOW_IN_DOWNLOAD_MODE +## Allows the command to execute in Download Mode. +## [See execute_process() override](../../scripts/cmake/execute_process.cmake). +## +## ### COMMAND +## The command to be executed, along with its arguments. +## +## ### WORKING_DIRECTORY +## The directory to execute the command in. +## +## ### LOGNAME +## The prefix to use for the log files. +## +## ### TIMEOUT +## Optional timeout after which to terminate the command. +## +## This should be a unique name for different triplets so that the logs don't conflict when building multiple at once. +## +## ## Examples +## +## * [ffmpeg](https://github.com/Microsoft/vcpkg/blob/master/ports/ffmpeg/portfile.cmake) +## * [openssl](https://github.com/Microsoft/vcpkg/blob/master/ports/openssl/portfile.cmake) +## * [boost](https://github.com/Microsoft/vcpkg/blob/master/ports/boost/portfile.cmake) +## * [qt5](https://github.com/Microsoft/vcpkg/blob/master/ports/qt5/portfile.cmake) + +include(vcpkg_prettify_command) +include(vcpkg_execute_in_download_mode) + +function(vcpkg_execute_required_process) + cmake_parse_arguments(vcpkg_execute_required_process "ALLOW_IN_DOWNLOAD_MODE" "WORKING_DIRECTORY;LOGNAME;TIMEOUT" "COMMAND" ${ARGN}) + set(LOG_OUT "${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_LOGNAME}-out.log") + set(LOG_ERR "${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_LOGNAME}-err.log") + + if(vcpkg_execute_required_process_TIMEOUT) + set(TIMEOUT_PARAM "TIMEOUT;${vcpkg_execute_required_process_TIMEOUT}") + else() + set(TIMEOUT_PARAM "") + endif() + + if (DEFINED VCPKG_DOWNLOAD_MODE AND NOT vcpkg_execute_required_process_ALLOW_IN_DOWNLOAD_MODE) + message(FATAL_ERROR +[[ +This command cannot be executed in Download Mode. +Halting portfile execution. +]]) + endif() + + vcpkg_execute_in_download_mode( + COMMAND ${vcpkg_execute_required_process_COMMAND} + OUTPUT_FILE ${LOG_OUT} + ERROR_FILE ${LOG_ERR} + RESULT_VARIABLE error_code + WORKING_DIRECTORY ${vcpkg_execute_required_process_WORKING_DIRECTORY} + ${TIMEOUT_PARAM}) + if(error_code) + set(LOGS) + file(READ "${LOG_OUT}" out_contents) + file(READ "${LOG_ERR}" err_contents) + if(out_contents) + list(APPEND LOGS "${LOG_OUT}") + endif() + if(err_contents) + list(APPEND LOGS "${LOG_ERR}") + endif() + set(STRINGIFIED_LOGS) + foreach(LOG ${LOGS}) + file(TO_NATIVE_PATH "${LOG}" NATIVE_LOG) + list(APPEND STRINGIFIED_LOGS " ${NATIVE_LOG}\n") + endforeach() + vcpkg_prettify_command(vcpkg_execute_required_process_COMMAND vcpkg_execute_required_process_COMMAND_PRETTY) + message(FATAL_ERROR + " Command failed: ${vcpkg_execute_required_process_COMMAND_PRETTY}\n" + " Working Directory: ${vcpkg_execute_required_process_WORKING_DIRECTORY}\n" + " Error code: ${error_code}\n" + " See logs for more information:\n" + ${STRINGIFIED_LOGS} + ) + endif() +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_execute_required_process_repeat.cmake b/vcpkg/scripts/cmake/vcpkg_execute_required_process_repeat.cmake new file mode 100644 index 0000000..ca11e8e --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_execute_required_process_repeat.cmake @@ -0,0 +1,31 @@ +# Usage: vcpkg_execute_required_process_repeat(COUNT COMMAND [...] WORKING_DIRECTORY LOGNAME ) +include(vcpkg_prettify_command) +function(vcpkg_execute_required_process_repeat) + cmake_parse_arguments(vcpkg_execute_required_process_repeat "" "COUNT;WORKING_DIRECTORY;LOGNAME" "COMMAND" ${ARGN}) + #debug_message("vcpkg_execute_required_process_repeat(${vcpkg_execute_required_process_repeat_COMMAND})") + set(SUCCESSFUL_EXECUTION FALSE) + foreach(loop_count RANGE ${vcpkg_execute_required_process_repeat_COUNT}) + execute_process( + COMMAND ${vcpkg_execute_required_process_repeat_COMMAND} + OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_repeat_LOGNAME}-out-${loop_count}.log + ERROR_FILE ${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_repeat_LOGNAME}-err-${loop_count}.log + RESULT_VARIABLE error_code + WORKING_DIRECTORY ${vcpkg_execute_required_process_repeat_WORKING_DIRECTORY}) + #debug_message("error_code=${error_code}") + file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}" NATIVE_BUILDTREES_DIR) + if(NOT error_code) + set(SUCCESSFUL_EXECUTION TRUE) + break() + endif() + endforeach(loop_count) + if (NOT SUCCESSFUL_EXECUTION) + vcpkg_prettify_command(vcpkg_execute_required_process_repeat_COMMAND vcpkg_execute_required_process_repeat_COMMAND_PRETTY) + message(FATAL_ERROR + " Command failed: ${vcpkg_execute_required_process_repeat_COMMAND_PRETTY}\n" + " Working Directory: ${vcpkg_execute_required_process_repeat_WORKING_DIRECTORY}\n" + " See logs for more information:\n" + " ${NATIVE_BUILDTREES_DIR}\\${vcpkg_execute_required_process_repeat_LOGNAME}-out.log\n" + " ${NATIVE_BUILDTREES_DIR}\\${vcpkg_execute_required_process_repeat_LOGNAME}-err.log\n" + ) + endif() +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_extract_source_archive.cmake b/vcpkg/scripts/cmake/vcpkg_extract_source_archive.cmake new file mode 100644 index 0000000..fbae94b --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_extract_source_archive.cmake @@ -0,0 +1,51 @@ +## # vcpkg_extract_source_archive +## +## Extract an archive into the source directory. Deprecated in favor of [`vcpkg_extract_source_archive_ex`](vcpkg_extract_source_archive_ex.md). +## +## ## Usage +## ```cmake +## vcpkg_extract_source_archive( +## <${ARCHIVE}> [<${TARGET_DIRECTORY}>] +## ) +## ``` +## ## Parameters +## ### ARCHIVE +## The full path to the archive to be extracted. +## +## This is usually obtained from calling [`vcpkg_download_distfile`](vcpkg_download_distfile.md). +## +## ### TARGET_DIRECTORY +## If specified, the archive will be extracted into the target directory instead of `${CURRENT_BUILDTREES_DIR}\src\`. +## +## This can be used to mimic git submodules, by extracting into a subdirectory of another archive. +## +## ## Notes +## This command will also create a tracking file named .extracted in the TARGET_DIRECTORY. This file, when present, will suppress the extraction of the archive. +## +## ## Examples +## +## * [libraw](https://github.com/Microsoft/vcpkg/blob/master/ports/libraw/portfile.cmake) +## * [protobuf](https://github.com/Microsoft/vcpkg/blob/master/ports/protobuf/portfile.cmake) +## * [msgpack](https://github.com/Microsoft/vcpkg/blob/master/ports/msgpack/portfile.cmake) +include(vcpkg_execute_required_process) + +function(vcpkg_extract_source_archive ARCHIVE) + if(NOT ARGC EQUAL 2) + set(WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src") + else() + set(WORKING_DIRECTORY ${ARGV1}) + endif() + + get_filename_component(ARCHIVE_FILENAME "${ARCHIVE}" NAME) + if(NOT EXISTS ${WORKING_DIRECTORY}/${ARCHIVE_FILENAME}.extracted) + message(STATUS "Extracting source ${ARCHIVE}") + file(MAKE_DIRECTORY ${WORKING_DIRECTORY}) + vcpkg_execute_required_process( + ALLOW_IN_DOWNLOAD_MODE + COMMAND ${CMAKE_COMMAND} -E tar xjf ${ARCHIVE} + WORKING_DIRECTORY ${WORKING_DIRECTORY} + LOGNAME extract + ) + file(WRITE ${WORKING_DIRECTORY}/${ARCHIVE_FILENAME}.extracted) + endif() +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_extract_source_archive_ex.cmake b/vcpkg/scripts/cmake/vcpkg_extract_source_archive_ex.cmake new file mode 100644 index 0000000..9ce5047 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_extract_source_archive_ex.cmake @@ -0,0 +1,154 @@ +## # vcpkg_extract_source_archive_ex +## +## Extract an archive into the source directory. Replaces [`vcpkg_extract_source_archive`](vcpkg_extract_source_archive.md). +## +## ## Usage +## ```cmake +## vcpkg_extract_source_archive_ex( +## SKIP_PATCH_CHECK +## OUT_SOURCE_PATH +## ARCHIVE <${ARCHIVE}> +## [REF <1.0.0>] +## [NO_REMOVE_ONE_LEVEL] +## [WORKING_DIRECTORY <${CURRENT_BUILDTREES_DIR}/src>] +## [PATCHES ...] +## ) +## ``` +## ## Parameters +## ### SKIP_PATCH_CHECK +## If this option is set the failure to apply a patch is ignored. +## +## ### OUT_SOURCE_PATH +## Specifies the out-variable that will contain the extracted location. +## +## This should be set to `SOURCE_PATH` by convention. +## +## ### ARCHIVE +## The full path to the archive to be extracted. +## +## This is usually obtained from calling [`vcpkg_download_distfile`](vcpkg_download_distfile.md). +## +## ### REF +## A friendly name that will be used instead of the filename of the archive. If more than 10 characters it will be truncated. +## +## By convention, this is set to the version number or tag fetched +## +## ### WORKING_DIRECTORY +## If specified, the archive will be extracted into the working directory instead of `${CURRENT_BUILDTREES_DIR}/src/`. +## +## Note that the archive will still be extracted into a subfolder underneath that directory (`${WORKING_DIRECTORY}/${REF}-${HASH}/`). +## +## ### PATCHES +## A list of patches to be applied to the extracted sources. +## +## Relative paths are based on the port directory. +## +## ### NO_REMOVE_ONE_LEVEL +## Specifies that the default removal of the top level folder should not occur. +## +## ## Examples +## +## * [bzip2](https://github.com/Microsoft/vcpkg/blob/master/ports/bzip2/portfile.cmake) +## * [sqlite3](https://github.com/Microsoft/vcpkg/blob/master/ports/sqlite3/portfile.cmake) +## * [cairo](https://github.com/Microsoft/vcpkg/blob/master/ports/cairo/portfile.cmake) +include(vcpkg_apply_patches) +include(vcpkg_extract_source_archive) + +function(vcpkg_extract_source_archive_ex) + cmake_parse_arguments( + _vesae + "NO_REMOVE_ONE_LEVEL;SKIP_PATCH_CHECK" + "OUT_SOURCE_PATH;ARCHIVE;REF;WORKING_DIRECTORY" + "PATCHES" + ${ARGN} + ) + + if(NOT _vesae_ARCHIVE) + message(FATAL_ERROR "Must specify ARCHIVE parameter to vcpkg_extract_source_archive_ex()") + endif() + + if(NOT DEFINED _vesae_OUT_SOURCE_PATH) + message(FATAL_ERROR "Must specify OUT_SOURCE_PATH parameter to vcpkg_extract_source_archive_ex()") + endif() + + if(NOT DEFINED _vesae_WORKING_DIRECTORY) + set(_vesae_WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src) + endif() + + if(NOT DEFINED _vesae_REF) + get_filename_component(_vesae_REF ${_vesae_ARCHIVE} NAME_WE) + endif() + + string(REPLACE "/" "-" SANITIZED_REF "${_vesae_REF}") + + # Take the last 10 chars of the REF + set(REF_MAX_LENGTH 10) + string(LENGTH ${SANITIZED_REF} REF_LENGTH) + math(EXPR FROM_REF ${REF_LENGTH}-${REF_MAX_LENGTH}) + if(FROM_REF LESS 0) + set(FROM_REF 0) + endif() + string(SUBSTRING ${SANITIZED_REF} ${FROM_REF} ${REF_LENGTH} SHORTENED_SANITIZED_REF) + + # Hash the archive hash along with the patches. Take the first 10 chars of the hash + file(SHA512 ${_vesae_ARCHIVE} PATCHSET_HASH) + foreach(PATCH IN LISTS _vesae_PATCHES) + get_filename_component(ABSOLUTE_PATCH "${PATCH}" ABSOLUTE BASE_DIR "${CURRENT_PORT_DIR}") + file(SHA512 ${ABSOLUTE_PATCH} CURRENT_HASH) + string(APPEND PATCHSET_HASH ${CURRENT_HASH}) + endforeach() + + string(SHA512 PATCHSET_HASH ${PATCHSET_HASH}) + string(SUBSTRING ${PATCHSET_HASH} 0 10 PATCHSET_HASH) + set(SOURCE_PATH "${_vesae_WORKING_DIRECTORY}/${SHORTENED_SANITIZED_REF}-${PATCHSET_HASH}") + if (NOT _VCPKG_EDITABLE) + string(APPEND SOURCE_PATH ".clean") + if(EXISTS ${SOURCE_PATH}) + message(STATUS "Cleaning sources at ${SOURCE_PATH}. Use --editable to skip cleaning for the packages you specify.") + file(REMOVE_RECURSE ${SOURCE_PATH}) + endif() + endif() + + if(NOT EXISTS ${SOURCE_PATH}) + set(TEMP_DIR "${_vesae_WORKING_DIRECTORY}/${SHORTENED_SANITIZED_REF}-${PATCHSET_HASH}.tmp") + file(REMOVE_RECURSE ${TEMP_DIR}) + vcpkg_extract_source_archive("${_vesae_ARCHIVE}" "${TEMP_DIR}") + + if(_vesae_NO_REMOVE_ONE_LEVEL) + set(TEMP_SOURCE_PATH ${TEMP_DIR}) + else() + file(GLOB _ARCHIVE_FILES "${TEMP_DIR}/*") + list(LENGTH _ARCHIVE_FILES _NUM_ARCHIVE_FILES) + set(TEMP_SOURCE_PATH) + foreach(dir IN LISTS _ARCHIVE_FILES) + if (IS_DIRECTORY ${dir}) + set(TEMP_SOURCE_PATH "${dir}") + break() + endif() + endforeach() + + if(NOT _NUM_ARCHIVE_FILES EQUAL 2 OR NOT TEMP_SOURCE_PATH) + message(FATAL_ERROR "Could not unwrap top level directory from archive. Pass NO_REMOVE_ONE_LEVEL to disable this.") + endif() + endif() + + if (_vesae_SKIP_PATCH_CHECK) + set (QUIET QUIET) + else() + set (QUIET) + endif() + + vcpkg_apply_patches( + ${QUIET} + SOURCE_PATH ${TEMP_SOURCE_PATH} + PATCHES ${_vesae_PATCHES} + ) + + file(RENAME ${TEMP_SOURCE_PATH} ${SOURCE_PATH}) + file(REMOVE_RECURSE ${TEMP_DIR}) + endif() + + set(${_vesae_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) + message(STATUS "Using source at ${SOURCE_PATH}") + return() +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_fail_port_install.cmake b/vcpkg/scripts/cmake/vcpkg_fail_port_install.cmake new file mode 100644 index 0000000..cf87775 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_fail_port_install.cmake @@ -0,0 +1,95 @@ +## # vcpkg_fail_port_install +## +## Checks common requirements and fails the current portfile with a (default) error message +## +## ## Usage +## ```cmake +## vcpkg_fail_port_install( +## [ALWAYS] +## [MESSAGE <"Reason for failure">] +## [ON_TARGET [ ...]] +## [ON_ARCH [ ...]] +## [ON_CRT_LINKAGE [ ...]]) +## [ON_LIBRARY_LINKAGE [ ...]] +## ) +## ``` +## +## ## Parameters +## ### MESSAGE +## Additional failure message. If none is given, a default message will be displayed depending on the failure condition. +## +## ### ALWAYS +## Will always fail early +## +## ### ON_TARGET +## Targets for which the build should fail early. Valid targets are `` from `VCPKG_IS_TARGET_` (see `vcpkg_common_definitions.cmake`). +## +## ### ON_ARCH +## Architecture for which the build should fail early. +## +## ### ON_CRT_LINKAGE +## CRT linkage for which the build should fail early. +## +## ### ON_LIBRARY_LINKAGE +## Library linkage for which the build should fail early. +## +## ## Examples +## +## * [aws-lambda-cpp](https://github.com/Microsoft/vcpkg/blob/master/ports/aws-lambda-cpp/portfile.cmake) +function(vcpkg_fail_port_install) + cmake_parse_arguments(PARSE_ARGV 0 _csc "ALWAYS" "MESSAGE" "ON_TARGET;ON_ARCH;ON_CRT_LINKAGE;ON_LIBRARY_LINKAGE") + if(DEFINED _csc_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "Unknown arguments passed to vcpkg_fail_port_install. Please correct the portfile!") + endif() + if(DEFINED _csc_MESSAGE) + set(_csc_MESSAGE "${_csc_MESSAGE}\n") + else() + set(_csc_MESSAGE "") + endif() + + unset(_fail_port) + #Target fail check + if(DEFINED _csc_ON_TARGET) + foreach(_target ${_csc_ON_TARGET}) + string(TOUPPER ${_target} _target_upper) + if(VCPKG_TARGET_IS_${_target_upper}) + set(_fail_port TRUE) + set(_csc_MESSAGE "${_csc_MESSAGE}Target '${_target}' not supported by ${PORT}!\n") + endif() + endforeach() + endif() + + #Architecture fail check + if(DEFINED _csc_ON_ARCH) + foreach(_arch ${_csc_ON_ARCH}) + if(${VCPKG_TARGET_ARCHITECTURE} MATCHES ${_arch}) + set(_fail_port TRUE) + set(_csc_MESSAGE "${_csc_MESSAGE}Architecture '${_arch}' not supported by ${PORT}!\n") + endif() + endforeach() + endif() + + #CRT linkage fail check + if(DEFINED _csc_ON_CRT_LINKAGE) + foreach(_crt_link ${_csc_ON_CRT_LINKAGE}) + if("${VCPKG_CRT_LINKAGE}" MATCHES "${_crt_link}") + set(_fail_port TRUE) + set(_csc_MESSAGE "${_csc_MESSAGE}CRT linkage '${VCPKG_CRT_LINKAGE}' not supported by ${PORT}!\n") + endif() + endforeach() + endif() + + #Library linkage fail check + if(DEFINED _csc_ON_LIBRARY_LINKAGE) + foreach(_lib_link ${_csc_ON_LIBRARY_LINKAGE}) + if("${VCPKG_LIBRARY_LINKAGE}" MATCHES "${_lib_link}") + set(_fail_port TRUE) + set(_csc_MESSAGE "${_csc_MESSAGE}Library linkage '${VCPKG_LIBRARY_LINKAGE}' not supported by ${PORT}!\n") + endif() + endforeach() + endif() + + if(_fail_port OR _csc_ALWAYS) + message(FATAL_ERROR ${_csc_MESSAGE}) + endif() +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_find_acquire_program.cmake b/vcpkg/scripts/cmake/vcpkg_find_acquire_program.cmake new file mode 100644 index 0000000..ea5b0d6 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -0,0 +1,588 @@ +## # vcpkg_find_acquire_program +## +## Download or find a well-known tool. +## +## ## Usage +## ```cmake +## vcpkg_find_acquire_program() +## ``` +## ## Parameters +## ### VAR +## This variable specifies both the program to be acquired as well as the out parameter that will be set to the path of the program executable. +## +## ## Notes +## The current list of programs includes: +## +## - 7Z +## - ARIA2 (Downloader) +## - BISON +## - CLANG +## - DARK +## - DOXYGEN +## - FLEX +## - GASPREPROCESSOR +## - GPERF +## - PERL +## - PYTHON2 +## - PYTHON3 +## - GIT +## - GN +## - GO +## - JOM +## - MESON +## - NASM +## - NINJA +## - NUGET +## - SCONS +## - SWIG +## - YASM +## +## Note that msys2 has a dedicated helper function: [`vcpkg_acquire_msys`](vcpkg_acquire_msys.md). +## +## ## Examples +## +## * [ffmpeg](https://github.com/Microsoft/vcpkg/blob/master/ports/ffmpeg/portfile.cmake) +## * [openssl](https://github.com/Microsoft/vcpkg/blob/master/ports/openssl/portfile.cmake) +## * [qt5](https://github.com/Microsoft/vcpkg/blob/master/ports/qt5/portfile.cmake) + +include(vcpkg_execute_in_download_mode) + +function(vcpkg_find_acquire_program VAR) + set(EXPANDED_VAR ${${VAR}}) + if(EXPANDED_VAR) + return() + endif() + + unset(NOEXTRACT) + unset(_vfa_RENAME) + unset(SUBDIR) + unset(PROG_PATH_SUBDIR) + unset(REQUIRED_INTERPRETER) + unset(_vfa_SUPPORTED) + unset(POST_INSTALL_COMMAND) + unset(PATHS) + + if(VAR MATCHES "PERL") + set(PROGNAME perl) + set(PERL_VERSION 5.30.0.1) + set(SUBDIR ${PERL_VERSION}) + set(PATHS ${DOWNLOADS}/tools/perl/${SUBDIR}/perl/bin) + set(BREW_PACKAGE_NAME "perl") + set(APT_PACKAGE_NAME "perl") + set(URL + "https://strawberry.perl.bot/download/${PERL_VERSION}/strawberry-perl-${PERL_VERSION}-32bit.zip" + "http://strawberryperl.com/download/${PERL_VERSION}/strawberry-perl-${PERL_VERSION}-32bit.zip" + ) + set(ARCHIVE "strawberry-perl-${PERL_VERSION}-32bit.zip") + set(HASH d353d3dc743ebdc6d1e9f6f2b7a6db3c387c1ce6c890bae8adc8ae5deae8404f4c5e3cf249d1e151e7256d4c5ee9cd317e6c41f3b6f244340de18a24b938e0c4) + elseif(VAR MATCHES "NASM") + set(PROGNAME nasm) + set(NASM_VERSION 2.14.02) + set(PATHS ${DOWNLOADS}/tools/nasm/nasm-${NASM_VERSION}) + set(BREW_PACKAGE_NAME "nasm") + set(APT_PACKAGE_NAME "nasm") + set(URL + "https://www.nasm.us/pub/nasm/releasebuilds/${NASM_VERSION}/win32/nasm-${NASM_VERSION}-win32.zip" + "https://fossies.org/windows/misc/nasm-${NASM_VERSION}-win32.zip" + ) + set(ARCHIVE "nasm-${NASM_VERSION}-win32.zip") + set(HASH a0f16a9f3b668b086e3c4e23a33ff725998e120f2e3ccac8c28293fd4faeae6fc59398919e1b89eed7461685d2730de02f2eb83e321f73609f35bf6b17a23d1e) + elseif(VAR MATCHES "YASM") + set(PROGNAME yasm) + set(YASM_VERSION 1.3.0.6.g1962) + set(SUBDIR 1.3.0.6) + set(BREW_PACKAGE_NAME "yasm") + set(APT_PACKAGE_NAME "yasm") + set(URL "https://www.tortall.net/projects/yasm/snapshots/v${YASM_VERSION}/yasm-${YASM_VERSION}.exe") + set(ARCHIVE "yasm-${YASM_VERSION}.exe") + set(_vfa_RENAME "yasm.exe") + set(NOEXTRACT ON) + set(HASH c1945669d983b632a10c5ff31e86d6ecbff143c3d8b2c433c0d3d18f84356d2b351f71ac05fd44e5403651b00c31db0d14615d7f9a6ecce5750438d37105c55b) + elseif(VAR MATCHES "GIT") + set(PROGNAME git) + if(CMAKE_HOST_WIN32) + set(GIT_VERSION 2.26.2) + set(SUBDIR "git-${GIT_VERSION}-1-windows") + set(URL "https://github.com/git-for-windows/git/releases/download/v${GIT_VERSION}.windows.1/PortableGit-${GIT_VERSION}-32-bit.7z.exe") + set(ARCHIVE "PortableGit-${GIT_VERSION}-32-bit.7z.exe") + set(HASH d3cb60d62ca7b5d05ab7fbed0fa7567bec951984568a6c1646842a798c4aaff74bf534cf79414a6275c1927081a11b541d09931c017bf304579746e24fe57b36) + set(PATHS + "${DOWNLOADS}/tools/${SUBDIR}/mingw32/bin" + "${DOWNLOADS}/tools/git/${SUBDIR}/mingw32/bin") + else() + set(BREW_PACKAGE_NAME "git") + set(APT_PACKAGE_NAME "git") + endif() + elseif(VAR MATCHES "GN") + set(PROGNAME gn) + set(_vfa_RENAME "gn") + set(CIPD_DOWNLOAD_GN "https://chrome-infra-packages.appspot.com/dl/gn/gn") + if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") + set(_vfa_SUPPORTED ON) + set(GN_VERSION "xus7xtaPhpv5vCmKFOnsBVoB-PKmhZvRsSTjbQAuF0MC") + set(GN_PLATFORM "linux-amd64") + set(HASH "871e75d7f3597b74fb99e36bb41fe5a9f8ce8a4d9f167f4729fc6e444807a59f35ec8aca70c2274a99c79d70a1108272be1ad991678a8ceb39e30f77abb13135") + elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") + set(_vfa_SUPPORTED ON) + set(GN_VERSION "qhxILDNcJ2H44HfHmfiU-XIY3E_SIXvFqLd2wvbIgOoC") + set(GN_PLATFORM "mac-amd64") + set(HASH "03ee64cb15bae7fceb412900d470601090bce147cfd45eb9b46683ac1a5dca848465a5d74c55a47df7f0e334d708151249a6d37bb021de74dd48b97ed4a07937") + else() + set(GN_VERSION "qUkAhy9J0P7c5racy-9wB6AHNK_btS18im8S06_ehhwC") + set(GN_PLATFORM "windows-amd64") + set(HASH "263e02bd79eee0cb7b664831b7898565c5656a046328d8f187ef7ae2a4d766991d477b190c9b425fcc960ab76f381cd3e396afb85cba7408ca9e74eb32c175db") + endif() + set(SUBDIR "${GN_VERSION}") + set(URL "${CIPD_DOWNLOAD_GN}/${GN_PLATFORM}/+/${GN_VERSION}") + set(ARCHIVE "gn-${GN_PLATFORM}.zip") + elseif(VAR MATCHES "GO") + set(PROGNAME go) + set(SUBDIR 1.13.1.windows-386) + set(PATHS ${DOWNLOADS}/tools/go/${SUBDIR}/go/bin) + set(BREW_PACKAGE_NAME "go") + set(APT_PACKAGE_NAME "golang-go") + set(URL "https://dl.google.com/go/go${SUBDIR}.zip") + set(ARCHIVE "go${SUBDIR}.zip") + set(HASH 2ab0f07e876ad98d592351a8808c2de42351ab387217e088bc4c5fa51d6a835694c501e2350802323b55a27dc0157f8b70045597f789f9e50f5ceae50dea3027) + elseif(VAR MATCHES "PYTHON3") + if(CMAKE_HOST_WIN32) + set(PROGNAME python) + set(PYTHON_VERSION 3.8.3) + if (VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + set(SUBDIR "python-${PYTHON_VERSION}-x86") + set(URL "https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-embed-win32.zip") + set(ARCHIVE "python-${PYTHON_VERSION}-embed-win32.zip") + set(HASH 8c9078f55b1b5d694e0e809eee6ccf8a6e15810dd4649e8ae1209bff30e102d49546ce970a5d519349ca7759d93146f459c316dc440737171f018600255dcd0a) + else() + set(SUBDIR "python-${PYTHON_VERSION}-x64") + set(URL "https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-embed-amd64.zip") + set(ARCHIVE "python-${PYTHON_VERSION}-embed-amd64.zip") + set(HASH a322fc925167edb1897764297cf47e294ad3f52c109a05f8911412807eb83e104f780e9fe783b17fe0d9b18b7838797c15e9b0805dab759829f77a9bc0159424) + endif() + set(PATHS ${DOWNLOADS}/tools/python/${SUBDIR}) + set(POST_INSTALL_COMMAND ${CMAKE_COMMAND} -E remove python38._pth) + else() + set(PROGNAME python3) + set(BREW_PACKAGE_NAME "python") + set(APT_PACKAGE_NAME "python3") + endif() + elseif(VAR MATCHES "PYTHON2") + if(CMAKE_HOST_WIN32) + set(PROGNAME python) + set(PYTHON_VERSION 2.7.16) + if (VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + set(SUBDIR "python-${PYTHON_VERSION}-x86") + set(URL "https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}.msi") + set(ARCHIVE "python-${PYTHON_VERSION}.msi") + set(HASH c34a6fa2438682104dccb53650a2bdb79eac7996deff075201a0f71bb835d60d3ed866652a1931f15a29510fe8e1009ac04e423b285122d2e5747fefc4c10254) + else() + set(SUBDIR "python-${PYTHON_VERSION}-x64") + set(URL "https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}.amd64.msi") + set(ARCHIVE "python-${PYTHON_VERSION}.amd64.msi") + set(HASH 47c1518d1da939e3ba6722c54747778b93a44c525bcb358b253c23b2510374a49a43739c8d0454cedade858f54efa6319763ba33316fdc721305bc457efe4ffb) + endif() + set(PATHS ${DOWNLOADS}/tools/python/${SUBDIR}) + else() + set(PROGNAME python2) + set(BREW_PACKAGE_NAME "python2") + set(APT_PACKAGE_NAME "python") + endif() + elseif(VAR MATCHES "RUBY") + set(PROGNAME "ruby") + set(PATHS ${DOWNLOADS}/tools/ruby/rubyinstaller-2.6.3-1-x86/bin) + set(URL https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.3-1/rubyinstaller-2.6.3-1-x86.7z) + set(ARCHIVE rubyinstaller-2.6.3-1-x86.7z) + set(HASH 4322317dd02ce13527bf09d6e6a7787ca3814ea04337107d28af1ac360bd272504b32e20ed3ea84eb5b21dae7b23bfe5eb0e529b6b0aa21a1a2bbb0a542d7aec) + elseif(VAR MATCHES "JOM") + set(PROGNAME jom) + set(SUBDIR "jom-1.1.3") + set(PATHS ${DOWNLOADS}/tools/jom/${SUBDIR}) + set(URL + "https://download.qt.io/official_releases/jom/jom_1_1_3.zip" + "https://mirrors.ocf.berkeley.edu/qt/official_releases/jom/jom_1_1_3.zip" + ) + set(ARCHIVE "jom_1_1_3.zip") + set(HASH 5b158ead86be4eb3a6780928d9163f8562372f30bde051d8c281d81027b766119a6e9241166b91de0aa6146836cea77e5121290e62e31b7a959407840fc57b33) + elseif(VAR MATCHES "7Z") + set(PROGNAME 7z) + set(PATHS "${DOWNLOADS}/tools/7z/Files/7-Zip") + set(URL "https://7-zip.org/a/7z1900.msi") + set(ARCHIVE "7z1900.msi") + set(HASH f73b04e2d9f29d4393fde572dcf3c3f0f6fa27e747e5df292294ab7536ae24c239bf917689d71eb10cc49f6b9a4ace26d7c122ee887d93cc935f268c404e9067) + elseif(VAR MATCHES "NINJA") + set(PROGNAME ninja) + set(NINJA_VERSION 1.10.1) + set(_vfa_SUPPORTED ON) + if(CMAKE_HOST_WIN32) + set(ARCHIVE "ninja-win-${NINJA_VERSION}.zip") + set(SUBDIR "${NINJA_VERSION}-windows") + set(URL "https://github.com/ninja-build/ninja/releases/download/v${NINJA_VERSION}/ninja-win.zip") + set(HASH 0120054f0fea6eea4035866201f69fba1c039f681f680cfcbbefcaee97419815d092a6e2f3823ea6c3928ad296395f36029e337127ee977270000b35df5f9c40) + elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") + set(ARCHIVE "ninja-mac-${NINJA_VERSION}.zip") + set(URL "https://github.com/ninja-build/ninja/releases/download/v${NINJA_VERSION}/ninja-mac.zip") + set(SUBDIR "${NINJA_VERSION}-osx") + set(PATHS "${DOWNLOADS}/tools/ninja-${NINJA_VERSION}-osx") + set(HASH 99f5ccca2461a4d340f4528a8eef6d81180757da78313f1f9412ed13a7bbaf6df537a342536fd053db00524bcb734d205af5f6fde419a1eb2e6f77ee8b7860fe) + elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD") + set(PATHS "${DOWNLOADS}/tools/${SUBDIR}-freebsd") + set(_vfa_SUPPORTED OFF) + else() + set(ARCHIVE "ninja-linux-${NINJA_VERSION}.zip") + set(URL "https://github.com/ninja-build/ninja/releases/download/v${NINJA_VERSION}/ninja-linux.zip") + set(SUBDIR "${NINJA_VERSION}-linux") + set(PATHS "${DOWNLOADS}/tools/ninja-${NINJA_VERSION}-linux") + set(HASH 9820c76fde6fac398743766e7ea0fe8a7d6e4191a77512a2d2f51c2ddcc947fcd91ac08522742281a285418c114e760b0158a968305f8dc854bb9693883b7f1e) + endif() + set(VERSION_CMD --version) + elseif(VAR MATCHES "NUGET") + set(PROGNAME nuget) + set(SUBDIR "5.5.1") + set(PATHS "${DOWNLOADS}/tools/nuget-${SUBDIR}-windows") + set(BREW_PACKAGE_NAME "nuget") + set(URL "https://dist.nuget.org/win-x86-commandline/v5.5.1/nuget.exe") + set(_vfa_RENAME "nuget.exe") + set(ARCHIVE "nuget.5.5.1.exe") + set(NOEXTRACT ON) + set(HASH 22ea847d8017cd977664d0b13c889cfb13c89143212899a511be217345a4e243d4d8d4099700114a11d26a087e83eb1a3e2b03bdb5e0db48f10403184cd26619) + elseif(VAR MATCHES "MESON") + set(MESON_VERSION 0.55.3) + set(PROGNAME meson) + set(REQUIRED_INTERPRETER PYTHON3) + set(APT_PACKAGE_NAME "meson") + set(BREW_PACKAGE_NAME "meson") + set(SCRIPTNAME meson meson.py) + set(PATHS ${DOWNLOADS}/tools/meson/meson-${MESON_VERSION}) + set(URL "https://github.com/mesonbuild/meson/releases/download/${MESON_VERSION}/meson-${MESON_VERSION}.tar.gz") + set(ARCHIVE "meson-${MESON_VERSION}.tar.gz") + set(HASH afb0bb25b367e681131d920995124df4b06f6d144ae1a95ebec27be13e06fefbd95840e0287cd1d84bdbb8d9c115b589a833d847c60926f55e0f15749cf66bae) + set(_vfa_SUPPORTED ON) + set(VERSION_CMD --version) + elseif(VAR MATCHES "FLEX" OR VAR MATCHES "BISON") + if(CMAKE_HOST_WIN32) + set(SOURCEFORGE_ARGS + REPO winflexbison + FILENAME winflexbison-2.5.16.zip + SHA512 0a14154bff5d998feb23903c46961528f8ccb4464375d5384db8c4a7d230c0c599da9b68e7a32f3217a0a0735742242eaf3769cb4f03e00931af8640250e9123 + NO_REMOVE_ONE_LEVEL + WORKING_DIRECTORY "${DOWNLOADS}/tools/winflexbison" + ) + if(VAR MATCHES "FLEX") + set(PROGNAME win_flex) + else() + set(PROGNAME win_bison) + endif() + set(PATHS ${DOWNLOADS}/tools/winflexbison/0a14154bff-a8cf65db07) + if(NOT EXISTS "${PATHS}/data/m4sugar/m4sugar.m4") + file(REMOVE_RECURSE "${PATHS}") + endif() + elseif(VAR MATCHES "FLEX") + set(PROGNAME flex) + set(APT_PACKAGE_NAME flex) + set(BREW_PACKAGE_NAME flex) + else() + set(PROGNAME bison) + set(APT_PACKAGE_NAME bison) + set(BREW_PACKAGE_NAME bison) + if (APPLE) + set(PATHS /usr/local/opt/bison/bin) + endif() + endif() + elseif(VAR MATCHES "CLANG") + set(PROGNAME clang) + set(SUBDIR "clang-10.0.0") + if(CMAKE_HOST_WIN32) + set(PATHS + # Support LLVM in Visual Studio 2019 + "$ENV{LLVMInstallDir}/x64/bin" + "$ENV{LLVMInstallDir}/bin" + "$ENV{VCINSTALLDIR}/Tools/Llvm/x64/bin" + "$ENV{VCINSTALLDIR}/Tools/Llvm/bin" + "${DOWNLOADS}/tools/${SUBDIR}-windows/bin" + "${DOWNLOADS}/tools/clang/${SUBDIR}/bin") + + if(DEFINED ENV{PROCESSOR_ARCHITEW6432}) + set(HOST_ARCH_ $ENV{PROCESSOR_ARCHITEW6432}) + else() + set(HOST_ARCH_ $ENV{PROCESSOR_ARCHITECTURE}) + endif() + + if(HOST_ARCH_ MATCHES "64") + set(URL "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/LLVM-10.0.0-win64.exe") + set(ARCHIVE "LLVM-10.0.0-win64.7z.exe") + set(HASH 3603a4be3548dabc7dda94f3ed4384daf8a94337e44ee62c0d54776c79f802b0cb98fc106e902409942e841c39bc672cc6d61153737ad1cc386b609ef25db71c) + else() + set(URL "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/LLVM-10.0.0-win32.exe") + set(ARCHIVE "LLVM-10.0.0-win32.7z.exe") + set(HASH 8494922b744ca0dc8d075a1d3a35a0db5a9287544afd5c4984fa328bc26f291209f6030175896b4895019126f5832045e06d8ad48072b549916df29a2228348b) + endif() + endif() + set(BREW_PACKAGE_NAME "llvm") + set(APT_PACKAGE_NAME "clang") + elseif(VAR MATCHES "GPERF") + set(PROGNAME gperf) + set(GPERF_VERSION 3.0.1) + set(PATHS ${DOWNLOADS}/tools/gperf/bin) + set(URL "https://sourceforge.net/projects/gnuwin32/files/gperf/${GPERF_VERSION}/gperf-${GPERF_VERSION}-bin.zip/download") + set(ARCHIVE "gperf-${GPERF_VERSION}-bin.zip") + set(HASH 3f2d3418304390ecd729b85f65240a9e4d204b218345f82ea466ca3d7467789f43d0d2129fcffc18eaad3513f49963e79775b10cc223979540fa2e502fe7d4d9) + elseif(VAR MATCHES "GASPREPROCESSOR") + set(NOEXTRACT true) + set(PROGNAME gas-preprocessor) + set(SUBDIR "b5ea3a50") + set(REQUIRED_INTERPRETER PERL) + set(SCRIPTNAME "gas-preprocessor.pl") + set(PATHS ${DOWNLOADS}/tools/gas-preprocessor/${SUBDIR}) + set(_vfa_RENAME "gas-preprocessor.pl") + set(URL "https://raw.githubusercontent.com/FFmpeg/gas-preprocessor/b5ea3a50ed991e6a3218e89402a8162c73f59cb2/gas-preprocessor.pl") + set(ARCHIVE "gas-preprocessor-${SUBDIR}.pl") + set(HASH 3a42a90dee09f3c8653d043d848057287f7460806a08f9471131d0c546ba541bdfa4efa3019e7ffc57a6c20538f1034f7a53b30ecaad9db5add7c71d8de35db9) + elseif(VAR MATCHES "DARK") + set(PROGNAME dark) + set(SUBDIR "wix311-binaries") + set(PATHS ${DOWNLOADS}/tools/dark/${SUBDIR}) + set(URL "https://github.com/wixtoolset/wix3/releases/download/wix311rtm/wix311-binaries.zip") + set(ARCHIVE "wix311-binaries.zip") + set(HASH 74f0fa29b5991ca655e34a9d1000d47d4272e071113fada86727ee943d913177ae96dc3d435eaf494d2158f37560cd4c2c5274176946ebdb17bf2354ced1c516) + elseif(VAR MATCHES "SCONS") + set(PROGNAME scons) + set(SCONS_VERSION 3.0.1) + set(SUBDIR ${SCONS_VERSION}) + set(REQUIRED_INTERPRETER PYTHON2) + set(SCRIPTNAME "scons.py") + set(URL "https://sourceforge.net/projects/scons/files/scons-local-${SCONS_VERSION}.zip/download") + set(ARCHIVE "scons-local-${SCONS_VERSION}.zip") + set(HASH fe121b67b979a4e9580c7f62cfdbe0c243eba62a05b560d6d513ac7f35816d439b26d92fc2d7b7d7241c9ce2a49ea7949455a17587ef53c04a5f5125ac635727) + elseif(VAR MATCHES "SWIG") + set(VERSION 4.0.2) + set(PROGNAME swig) + if(CMAKE_HOST_WIN32) + #set(URL "https://sourceforge.net/projects/swig/files/swigwin/swigwin-${VERSION}/swigwin-${VERSION}.zip/download") + set(ARCHIVE "swigwin-${VERSION}.zip") + set(HASH b8f105f9b9db6acc1f6e3741990915b533cd1bc206eb9645fd6836457fd30789b7229d2e3219d8e35f2390605ade0fbca493ae162ec3b4bc4e428b57155db03d) + set(SUBDIR b8f105f9b9-f0518bc3b7/swigwin-${VERSION}) + #set(SUBDIR "swigwin-${VERSION}") + #set(PATHS "${DOWNLOADS}/tools/swig/swigwin-${VERSION}") + else() + #Not used + set(_vfa_SUPPORTED TRUE) + set(URL https://sourceforge.net/projects/swig/files/swig/swig-${VERSION}/swig-${VERSION}.tar.gz/download) + set(ARCHIVE "swig-${VERSION}.tar.gz") + set(HASH 05e7da70ce6d9a733b96c0bcfa3c1b82765bd859f48c74759bbf4bb1467acb1809caa310cba5e2b3280cd704fca249eaa0624821dffae1d2a75097c7f55d14ed) + set(SUBDIR "swig-${VERSION}") + set(PATHS "${DOWNLOADS}/tools/swig/${SUBDIR}") + endif() + set(SOURCEFORGE_ARGS + REPO swig/swigwin + REF swigwin-${VERSION} + FILENAME "${ARCHIVE}" + SHA512 "${HASH}" + NO_REMOVE_ONE_LEVEL + WORKING_DIRECTORY "${DOWNLOADS}/tools/swig" + ) + elseif(VAR MATCHES "DOXYGEN") + set(PROGNAME doxygen) + set(DOXYGEN_VERSION 1.8.17) + set(SOURCEFORGE_ARGS + REPO doxygen + REF rel-${DOXYGEN_VERSION} + FILENAME "doxygen-${DOXYGEN_VERSION}.windows.bin.zip" + SHA512 6bac47ec552486783a70cc73b44cf86b4ceda12aba6b52835c2221712bd0a6c845cecec178c9ddaa88237f5a781f797add528f47e4ed017c7888eb1dd2bc0b4b + NO_REMOVE_ONE_LEVEL + WORKING_DIRECTORY "${DOWNLOADS}/tools/doxygen" + ) + set(SUBDIR 6bac47ec55-25c819fd77) + elseif(VAR MATCHES "BAZEL") + set(PROGNAME bazel) + set(BAZEL_VERSION 0.25.2) + set(_vfa_RENAME "bazel") + if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") + set(_vfa_SUPPORTED ON) + set(SUBDIR ${BAZEL_VERSION}-linux) + set(URL "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${SUBDIR}-x86_64") + set(ARCHIVE "bazel-${SUBDIR}-x86_64") + set(NOEXTRACT ON) + set(HASH db4a583cf2996aeb29fd008261b12fe39a4a5faf0fbf96f7124e6d3ffeccf6d9655d391378e68dd0915bc91c9e146a51fd9661963743857ca25179547feceab1) + elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") + set(_vfa_SUPPORTED ON) + set(SUBDIR ${BAZEL_VERSION}-darwin) + set(URL "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${SUBDIR}-x86_64") + set(ARCHIVE "bazel-${SUBDIR}-x86_64") + set(NOEXTRACT ON) + set(HASH 420a37081e6ee76441b0d92ff26d1715ce647737ce888877980d0665197b5a619d6afe6102f2e7edfb5062c9b40630a10b2539585e35479b780074ada978d23c) + else() + set(SUBDIR ${BAZEL_VERSION}-windows) + set(URL "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${SUBDIR}-x86_64.zip") + set(ARCHIVE "bazel-${SUBDIR}-x86_64.zip") + set(HASH 6482f99a0896f55ef65739e7b53452fd9c0adf597b599d0022a5e0c5fa4374f4a958d46f98e8ba25af4b065adacc578bfedced483d8c169ea5cb1777a99eea53) + endif() + elseif(VAR MATCHES "ARIA2") + set(PROGNAME aria2c) + set(ARIA2_VERSION 1.34.0) + set(PATHS ${DOWNLOADS}/tools/aria2c/aria2-${ARIA2_VERSION}-win-32bit-build1) + set(URL "https://github.com/aria2/aria2/releases/download/release-${ARIA2_VERSION}/aria2-${ARIA2_VERSION}-win-32bit-build1.zip") + set(ARCHIVE "aria2-${ARIA2_VERSION}-win-32bit-build1.zip") + set(HASH 2a5480d503ac6e8203040c7e516a3395028520da05d0ebf3a2d56d5d24ba5d17630e8f318dd4e3cc2094cc4668b90108fb58e8b986b1ffebd429995058063c27) + elseif(VAR MATCHES "PKGCONFIG") + set(PROGNAME pkg-config) + if(ENV{PKG_CONFIG}) + debug_message(STATUS "PKG_CONFIG found in ENV! Using $ENV{PKG_CONFIG}") + set(PKGCONFIG $ENV{PKG_CONFIG} PARENT_SCOPE) + return() + elseif(CMAKE_HOST_WIN32) + if(NOT EXISTS "${PKGCONFIG}") + set(VERSION 0.29.2-1) + set(LIBWINPTHREAD_VERSION git-8.0.0.5906.c9a21571-1) + vcpkg_acquire_msys( + PKGCONFIG_ROOT + NO_DEFAULT_PACKAGES + DIRECT_PACKAGES + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-pkg-config-${VERSION}-any.pkg.tar.xz" + 3b1b706a24d9aef7bbdf3ce4427aaa813ba6fbd292ed9dda181b4300e117c3d59a159ddcca8b013fd01ce76da2d95d590314ff9628c0d68a6966bac4842540f0 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-${LIBWINPTHREAD_VERSION}-any.pkg.tar.zst" + 2c3d9e6b2eee6a4c16fd69ddfadb6e2dc7f31156627d85845c523ac85e5c585d4cfa978659b1fe2ec823d44ef57bc2b92a6127618ff1a8d7505458b794f3f01c + ) + endif() + set(${VAR} "${PKGCONFIG_ROOT}/mingw32/bin/pkg-config.exe" PARENT_SCOPE) + return() + else() + set(BREW_PACKAGE_NAME pkg-config) + set(APT_PACKAGE_NAME pkg-config) + set(PATHS "/bin" "/usr/bin" "/usr/local/bin") + endif() + else() + message(FATAL "unknown tool ${VAR} -- unable to acquire.") + endif() + + macro(do_version_check) + if(VERSION_CMD) + _execute_process( + COMMAND ${${VAR}} ${VERSION_CMD} + WORKING_DIRECTORY ${DOWNLOADS} + OUTPUT_VARIABLE ${VAR}_VERSION_OUTPUT + ) + string(STRIP "${${VAR}_VERSION_OUTPUT}" ${VAR}_VERSION_OUTPUT) + #TODO: REGEX MATCH case for more complex cases! + if(NOT ${VAR}_VERSION_OUTPUT VERSION_GREATER_EQUAL ${VAR}_VERSION) + message(STATUS "Found ${PROGNAME}('${${VAR}_VERSION_OUTPUT}') but at least version ${${VAR}_VERSION} is required! Trying to use internal version if possible!") + set(${VAR} "${VAR}-NOTFOUND" CACHE INTERNAL "") + else() + message(STATUS "Found external ${PROGNAME}('${${VAR}_VERSION_OUTPUT}').") + endif() + endif() + endmacro() + + macro(do_find) + if(NOT DEFINED REQUIRED_INTERPRETER) + find_program(${VAR} ${PROGNAME} PATHS ${PATHS} NO_DEFAULT_PATH) + if(NOT ${VAR}) + find_program(${VAR} ${PROGNAME}) + if(${VAR} AND NOT ${VAR}_VERSION_CHECKED) + do_version_check() + set(${VAR}_VERSION_CHECKED ON) + elseif(${VAR}_VERSION_CHECKED) + message(FATAL_ERROR "Unable to find ${PROGNAME} with min version of ${${VAR}_VERSION}") + endif() + endif() + else() + vcpkg_find_acquire_program(${REQUIRED_INTERPRETER}) + find_file(SCRIPT_${VAR} NAMES ${SCRIPTNAME} PATHS ${PATHS} NO_DEFAULT_PATH) + if(NOT SCRIPT_${VAR}) + find_file(SCRIPT_${VAR} NAMES ${SCRIPTNAME}) + if(SCRIPT_${VAR} AND NOT ${VAR}_VERSION_CHECKED) + set(${VAR} ${${REQUIRED_INTERPRETER}} ${SCRIPT_${VAR}}) + do_version_check() + set(${VAR}_VERSION_CHECKED ON) + if(NOT ${VAR}) + unset(SCRIPT_${VAR} CACHE) + endif() + elseif(${VAR}_VERSION_CHECKED) + message(FATAL_ERROR "Unable to find ${PROGNAME} with min version of ${${VAR}_VERSION}") + endif() + endif() + if(SCRIPT_${VAR}) + set(${VAR} ${${REQUIRED_INTERPRETER}} ${SCRIPT_${VAR}}) + endif() + endif() + endmacro() + + if(NOT DEFINED PROG_PATH_SUBDIR) + set(PROG_PATH_SUBDIR "${DOWNLOADS}/tools/${PROGNAME}/${SUBDIR}") + endif() + if(DEFINED SUBDIR) + list(APPEND PATHS ${PROG_PATH_SUBDIR}) + endif() + + do_find() + if(NOT ${VAR}) + if(NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows" AND NOT _vfa_SUPPORTED) + set(EXAMPLE ".") + if(DEFINED BREW_PACKAGE_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") + set(EXAMPLE ":\n brew install ${BREW_PACKAGE_NAME}") + elseif(DEFINED APT_PACKAGE_NAME AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") + set(EXAMPLE ":\n sudo apt-get install ${APT_PACKAGE_NAME}") + endif() + message(FATAL_ERROR "Could not find ${PROGNAME}. Please install it via your package manager${EXAMPLE}") + endif() + + if(DEFINED SOURCEFORGE_ARGS) + # Locally change editable to suppress re-extraction each time + set(_VCPKG_EDITABLE 1) + vcpkg_from_sourceforge(OUT_SOURCE_PATH SFPATH ${SOURCEFORGE_ARGS}) + unset(_VCPKG_EDITABLE) + else() + vcpkg_download_distfile(ARCHIVE_PATH + URLS ${URL} + SHA512 ${HASH} + FILENAME ${ARCHIVE} + ) + + file(MAKE_DIRECTORY ${PROG_PATH_SUBDIR}) + if(DEFINED NOEXTRACT) + if(DEFINED _vfa_RENAME) + file(INSTALL ${ARCHIVE_PATH} DESTINATION ${PROG_PATH_SUBDIR} RENAME ${_vfa_RENAME} FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + else() + file(COPY ${ARCHIVE_PATH} DESTINATION ${PROG_PATH_SUBDIR} FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + endif() + else() + get_filename_component(ARCHIVE_EXTENSION ${ARCHIVE} LAST_EXT) + string(TOLOWER "${ARCHIVE_EXTENSION}" ARCHIVE_EXTENSION) + if(ARCHIVE_EXTENSION STREQUAL ".msi") + file(TO_NATIVE_PATH "${ARCHIVE_PATH}" ARCHIVE_NATIVE_PATH) + file(TO_NATIVE_PATH "${PROG_PATH_SUBDIR}" DESTINATION_NATIVE_PATH) + vcpkg_execute_in_download_mode( + COMMAND msiexec /a ${ARCHIVE_NATIVE_PATH} /qn TARGETDIR=${DESTINATION_NATIVE_PATH} + WORKING_DIRECTORY ${DOWNLOADS} + ) + elseif("${ARCHIVE_PATH}" MATCHES ".7z.exe$") + vcpkg_find_acquire_program(7Z) + vcpkg_execute_in_download_mode( + COMMAND ${7Z} x "${ARCHIVE_PATH}" "-o${PROG_PATH_SUBDIR}" -y -bso0 -bsp0 + WORKING_DIRECTORY ${PROG_PATH_SUBDIR} + ) + else() + vcpkg_execute_in_download_mode( + COMMAND ${CMAKE_COMMAND} -E tar xzf ${ARCHIVE_PATH} + WORKING_DIRECTORY ${PROG_PATH_SUBDIR} + ) + endif() + endif() + endif() + + if(DEFINED POST_INSTALL_COMMAND) + vcpkg_execute_required_process( + ALLOW_IN_DOWNLOAD_MODE + COMMAND ${POST_INSTALL_COMMAND} + WORKING_DIRECTORY ${PROG_PATH_SUBDIR} + LOGNAME ${VAR}-tool-post-install + ) + endif() + unset(${VAR} CACHE) + do_find() + if(NOT ${VAR}) + message(FATAL_ERROR "Unable to find ${VAR}") + endif() + endif() + + set(${VAR} "${${VAR}}" PARENT_SCOPE) +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_find_fortran.cmake b/vcpkg/scripts/cmake/vcpkg_find_fortran.cmake new file mode 100644 index 0000000..c517fa5 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_find_fortran.cmake @@ -0,0 +1,130 @@ +## # vcpkg_find_fortran +## +## Checks if a Fortran compiler can be found. +## Windows(x86/x64) Only: If not it will switch/enable MinGW gfortran +## and return required cmake args for building. +## +## ## Usage +## ```cmake +## vcpkg_find_fortran( +## ) +## ``` + +function(vcpkg_find_fortran additional_cmake_args_out) + set(ARGS_OUT) + set(CMAKE_BINARY_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}") + set(CMAKE_CURRENT_BINARY_DIR "${CMAKE_BINARY_DIR}") + set(CMAKE_PLATFORM_INFO_DIR "${CMAKE_BINARY_DIR}/Platform") + include(CMakeDetermineFortranCompiler) + if(NOT CMAKE_Fortran_COMPILER AND NOT VCPKG_CHAINLOAD_TOOLCHAIN_FILE) + # This intentionally breaks users with a custom toolchain which do not have a Fortran compiler setup + # because they either need to use a port-overlay (for e.g. lapack), remove the toolchain for the port using fortran + # or setup fortran in their VCPKG_CHAINLOAD_TOOLCHAIN_FILE themselfs! + if(WIN32) + message(STATUS "No Fortran compiler found on the PATH. Using MinGW gfortran!") + # If no Fortran compiler is on the path we switch to use gfortan from MinGW within vcpkg + if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(MINGW_PATH mingw32) + set(MACHINE_FLAG -m32) + vcpkg_acquire_msys(MSYS_ROOT + DIRECT_PACKAGES + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-gcc-fortran-10.2.0-1-any.pkg.tar.zst" + ddbdaf9ea865181e16a0931b2ec88c2dcef8add34628e479c7b9de4fa2ccb22e09c7239442e58702e0acd3adabc920565e976984f2bcd90a3668bf7f48a245f1 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-gcc-libgfortran-10.2.0-1-any.pkg.tar.zst" + 150f355085fcf4c54e8bce8f7f08b90fea9ca7e1f32cff0a2e495faa63cf7723f4bf935f0f4ec77c8dd2ba710ceaed88694cb3da71def5e2088dd65e13c9b002 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-gcc-libs-10.2.0-1-any.pkg.tar.zst" + 113d8b3b155ea537be8b99688d454f781d70c67c810c2643bc02b83b332d99bfbf3a7fcada6b927fda67ef02cf968d4fdf930466c5909c4338bda64f1f3f483e + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-gmp-6.2.0-1-any.pkg.tar.xz" + 37747f3f373ebff1a493f5dec099f8cd6d5abdc2254d9cd68a103ad7ba44a81a9a97ccaba76eaee427b4d67b2becb655ee2c379c2e563c8051b6708431e3c588 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-8.0.0.5906.c9a21571-1-any.pkg.tar.zst" + 2c3d9e6b2eee6a4c16fd69ddfadb6e2dc7f31156627d85845c523ac85e5c585d4cfa978659b1fe2ec823d44ef57bc2b92a6127618ff1a8d7505458b794f3f01c + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-winpthreads-git-8.0.0.5906.c9a21571-1-any.pkg.tar.zst" + e87ad4f4071c6b5bba3b13a85abf6657bb494b73c57ebe65bc5a92e2cef1d9de354e6858d1338ee72809e3dc742ba69ce090aaad4560ae1d3479a61dbebf03c6 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-mpc-1.1.0-1-any.pkg.tar.xz" + d236b815ec3cf569d24d96a386eca9f69a2b1e8af18e96c3f1e5a4d68a3598d32768c7fb3c92207ecffe531259822c1a421350949f2ffabd8ee813654f1af864 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-mpfr-4.1.0-2-any.pkg.tar.zst" + caac5cb73395082b479597a73c7398bf83009dbc0051755ef15157dc34996e156d4ed7881ef703f9e92861cfcad000888c4c32e4bf38b2596c415a19aafcf893 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-gcc-10.2.0-1-any.pkg.tar.zst" + 3085e744e716301ba8e4c8a391ab09c2d51e587e0a2df5dab49f83b403a32160f8d713cf1a42c1d962885b4c6ee3b6ed36ef40de15c4be2b69dbc3f12f974c3c + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-binutils-2.34-3-any.pkg.tar.zst" + ff06b2adebe6e9b278b63ca5638ff704750a346faad1cdc40089431b0a308edb6f2a131815e0577673a19878ec1bd8d5a4fa592aa227de769496c1fd3aedbc85 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-crt-git-8.0.0.5966.f5da805f-1-any.pkg.tar.zst" + 120c943ce173719e48400fa18299f3458bc9db4cf18bb5a4dda8a91cc3f816510b337a92f7388077c65b50bbbeae9078793891ceaad631d780b10fde19ad3649 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-headers-git-8.0.0.5966.f5da805f-1-any.pkg.tar.zst" + dbb9f8258da306a3441f9882faa472c3665a67b2ea68657f3e8a1402dcfacf9787a886a3daf0eefe4946f04557bc166eb15b21c1093ad85c909002daadba1923 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-libiconv-1.16-1-any.pkg.tar.xz" + ba236e1efc990cb91d459f938be6ca6fc2211be95e888d73f8de301bce55d586f9d2b6be55dacb975ec1afa7952b510906284eff70210238919e341dffbdbeb8 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-windows-default-manifest-6.4-3-any.pkg.tar.xz" + 5b99abc55eaa74cf85ca64a9c91542554cb5c1098bc71effba9bd36242694cfd348503fcd3507fb9ba97486108c092c925e2f38cd744493386b3dc9ab28bc526 + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-zlib-1.2.11-7-any.pkg.tar.xz" + 459850a8c42b1d497268736629ef713beee70cd0d3161d02c7a9fad08aca4560f4e17ba02d5cabda8a19d7c614f7e0ef5a6ec13afd91dd3004057139a5469c8f + "https://repo.msys2.org/mingw/i686/mingw-w64-i686-zstd-1.4.5-1-any.pkg.tar.zst" + 68f431073717b59549ab0fd26be8df8afcb43f3dd85be2ffcbc7d1a629999eed924656a7fc3f50937b2e6605a5067542d016181106b7bc3408b89b268ced5d23 + ) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(MINGW_PATH mingw64) + set(MACHINE_FLAG -m64) + vcpkg_acquire_msys(MSYS_ROOT + DIRECT_PACKAGES + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-fortran-10.2.0-1-any.pkg.tar.zst" + 0de02db791e978ae21577e675ee9676f741336c9a5ceb5614dbdfc793e2c1c4749b394f41362af7b069e970302fddf8c6772ebd8445fe1c360861606b1784b4d + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-libgfortran-10.2.0-1-any.pkg.tar.zst" + c2dee2957356fa51aae39d907d0cc07f966028b418f74a1ea7ea551ff001c175d86781f980c0cf994207794322dcd369fa122ab78b6c6d0f0ab01e39a754e780 + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-libs-10.2.0-1-any.pkg.tar.zst" + d17eff08c83d08ef020d999a2ead0d25036ada1c1bf6ed7c02bad9b56840ee5a3304acd790d86f52b83b09c1e788f0cecdf7254dc6760c3c7e478f65882cd32d + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gmp-6.2.0-1-any.pkg.tar.xz" + 0b22b7363e27cec706eb79ee0c45b5fe7088a5ca69e0868e7366481ed2ea9b3f6623d340cebba0b5ed3d79e4dfc7cf15f53530eb260c6d4057bfc3d92eb8c7bc + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libwinpthread-git-8.0.0.5906.c9a21571-1-any.pkg.tar.zst" + a6969a5db1c55ba458c1a047d0a2a9d2db6cc24266ea47f740598b149a601995d2de734a0984ac5e57ee611d5982cbc03fd6fc0f498435e8d6401bf15724caad + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-winpthreads-git-8.0.0.5906.c9a21571-1-any.pkg.tar.zst" + 87ae090a8de855de5580f158f4007f88d6dad341429620685dc736be55b1f060487552040327a76003618e214a11c1f8e5105ca2c7abe164908121627449d679 + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-mpc-1.1.0-1-any.pkg.tar.xz" + db075a1406690935db5780af293660385f56699881a1b2cd25ab252183643d71d646b0dadf1e34174df8f0744d51ce8b56dccd719e049efcaf9b7e08e80a7ef6 + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-mpfr-4.1.0-2-any.pkg.tar.zst" + 14739667242b8852f0d26547eb3297899a51fd1edafc7101b4e7489273e1efb9cb8422fc067361e3c3694c2afcc6c49fc89537f9f811ad5b9b595873112ee890 + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-10.2.0-1-any.pkg.tar.zst" + 7a08c7923f688ca8f06d55e1e91b9059a933ee56e27075ea073e6e58ae220310fb5f79869886a61b6987ab08993c9f962a4bfc50b6ea80473e933ce5551f3930 + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-binutils-2.34-3-any.pkg.tar.zst" + 4efd5586c344802110ea0061867469a23571df88529d66a943f86add1287f85ef53b6a9a9b16af2cb67bd09e0760a6f290c3b04ba70c0d5861d8a9f79f0ac209 + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-crt-git-8.0.0.5966.f5da805f-1-any.pkg.tar.zst" + 0142e4a44c59d17380a4fc7b101a2152486781621d5f9f930045b8f9c4bb2c93ea88211e7d8f8f233e0ae09595c6c8bc948ae80b9673f231e715b0d04c8a1e54 + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-headers-git-8.0.0.5966.f5da805f-1-any.pkg.tar.zst" + b547091a45ea7df8182b627edc9a7c91a23f01c0d4e02634a590c02f24311741cad92ceb67b7e4432ffbe4266f135a5289eb3560cc90ffa5c57612c8537a1588 + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libiconv-1.16-1-any.pkg.tar.xz" + c8e2fda532c753e0b1004596bf737c3669355f32af9b45d96c23fcef14994ba21ddf4f75138bdecc94cbf8a8c449eff530d24b74a0da47793e24ce92d154f411 + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-windows-default-manifest-6.4-3-any.pkg.tar.xz" + 77d02121416e42ff32a702e21266ce9031b4d8fc9ecdb5dc049d92570b658b3099b65d167ca156367d17a76e53e172ca52d468e440c2cdfd14701da210ffea37 + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-zlib-1.2.11-7-any.pkg.tar.xz" + bbd4a549efc2a5f4b1e9f1be00331e8726d80401a9c6117afa9d5dd92f4ac42a06cf2ce491a988e5c6ed7a6e536f8f1746081f4944bc6d473ccd16390fea27fe + "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-zstd-1.4.5-1-any.pkg.tar.zst" + dc2c7289fb206966829c98f6bf4389b423784415532ca3d627a22ae9d756a4fe2faf9844994b3093d814d129d20b2b79897e702aa9569978f58431ea66b55feb + ) + else() + message(FATAL_ERROR "Unknown architecture '${VCPKG_TARGET_ARCHITECTURE}' for MinGW Fortran build!") + endif() + + set(MINGW_BIN "${MSYS_ROOT}/${MINGW_PATH}/bin") + vcpkg_add_to_path(PREPEND "${MINGW_BIN}") + list(APPEND ARGS_OUT -DCMAKE_GNUtoMS=ON + "-DCMAKE_Fortran_COMPILER=${MINGW_BIN}/gfortran.exe" + "-DCMAKE_C_COMPILER=${MINGW_BIN}/gcc.exe" + "-DCMAKE_Fortran_FLAGS_INIT:STRING= -mabi=ms ${MACHINE_FLAG} ${VCPKG_Fortran_FLAGS}") + # This is for private use by vcpkg-gfortran + set(vcpkg_find_fortran_MSYS_ROOT "${MSYS_ROOT}" PARENT_SCOPE) + set(VCPKG_USE_INTERNAL_Fortran TRUE PARENT_SCOPE) + set(VCPKG_POLICY_SKIP_DUMPBIN_CHECKS enabled PARENT_SCOPE) + set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${SCRIPTS}/toolchains/mingw.cmake" PARENT_SCOPE) # Switching to MinGW toolchain for Fortran + if(VCPKG_CRT_LINKAGE STREQUAL "static") + set(VCPKG_CRT_LINKAGE dynamic PARENT_SCOPE) + message(STATUS "VCPKG_CRT_LINKAGE linkage for ${PORT} using vcpkg's internal gfortran cannot be static due to linking against MinGW libraries. Forcing dynamic CRT linkage") + endif() + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + set(VCPKG_LIBRARY_LINKAGE dynamic PARENT_SCOPE) + message(STATUS "VCPKG_LIBRARY_LINKAGE linkage for ${PORT} using vcpkg's internal gfortran cannot be static due to linking against MinGW libraries. Forcing dynamic library linkage") + endif() + else() + message(FATAL_ERROR "Unable to find a Fortran compiler using 'CMakeDetermineFortranCompiler'. Please install one (e.g. gfortran) and make it available on the PATH!") + endif() + endif() + set(${additional_cmake_args_out} ${ARGS_OUT} PARENT_SCOPE) +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/vcpkg/scripts/cmake/vcpkg_fixup_cmake_targets.cmake new file mode 100644 index 0000000..0be2dfc --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -0,0 +1,203 @@ +## # vcpkg_fixup_cmake_targets +## +## Merge release and debug CMake targets and configs to support multiconfig generators. +## +## Additionally corrects common issues with targets, such as absolute paths and incorrectly placed binaries. +## +## ## Usage +## ```cmake +## vcpkg_fixup_cmake_targets([CONFIG_PATH ] [TARGET_PATH ] [DO_NOT_DELETE_PARENT_CONFIG_PATH]) +## ``` +## +## ## Parameters +## +## ### CONFIG_PATH +## Subpath currently containing `*.cmake` files subdirectory (like `lib/cmake/${PORT}`). Should be relative to `${CURRENT_PACKAGES_DIR}`. +## +## Defaults to `share/${PORT}`. +## +## ### TARGET_PATH +## Subpath to which the above `*.cmake` files should be moved. Should be relative to `${CURRENT_PACKAGES_DIR}`. +## This needs to be specified if the port name differs from the `find_package()` name. +## +## Defaults to `share/${PORT}`. +## +## ### DO_NOT_DELETE_PARENT_CONFIG_PATH +## By default the parent directory of CONFIG_PATH is removed if it is named "cmake". +## Passing this option disable such behavior, as it is convenient for ports that install +## more than one CMake package configuration file. +## +## ## Notes +## Transform all `/debug//*targets-debug.cmake` files and move them to `/`. +## Removes all `/debug//*targets.cmake` and `/debug//*config.cmake`. +## +## Transform all references matching `/bin/*.exe` to `/tools//*.exe` on Windows. +## Transform all references matching `/bin/*` to `/tools//*` on other platforms. +## +## Fix `${_IMPORT_PREFIX}` in auto generated targets to be one folder deeper. +## Replace `${CURRENT_INSTALLED_DIR}` with `${_IMPORT_PREFIX}` in configs and targets. +## +## ## Examples +## +## * [concurrentqueue](https://github.com/Microsoft/vcpkg/blob/master/ports/concurrentqueue/portfile.cmake) +## * [curl](https://github.com/Microsoft/vcpkg/blob/master/ports/curl/portfile.cmake) +## * [nlohmann-json](https://github.com/Microsoft/vcpkg/blob/master/ports/nlohmann-json/portfile.cmake) +function(vcpkg_fixup_cmake_targets) + cmake_parse_arguments(_vfct "DO_NOT_DELETE_PARENT_CONFIG_PATH" "CONFIG_PATH;TARGET_PATH" "" ${ARGN}) + + if(_vfct_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "vcpkg_fixup_cmake_targets was passed extra arguments: ${_vfct_UNPARSED_ARGUMENTS}") + endif() + + if(NOT _vfct_TARGET_PATH) + set(_vfct_TARGET_PATH share/${PORT}) + endif() + + string(REPLACE "." "\\." EXECUTABLE_SUFFIX "${VCPKG_TARGET_EXECUTABLE_SUFFIX}") + + set(DEBUG_SHARE ${CURRENT_PACKAGES_DIR}/debug/${_vfct_TARGET_PATH}) + set(RELEASE_SHARE ${CURRENT_PACKAGES_DIR}/${_vfct_TARGET_PATH}) + + if(_vfct_CONFIG_PATH AND NOT RELEASE_SHARE STREQUAL "${CURRENT_PACKAGES_DIR}/${_vfct_CONFIG_PATH}") + if(_vfct_CONFIG_PATH STREQUAL "share") + file(RENAME ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/debug/share2) + file(RENAME ${CURRENT_PACKAGES_DIR}/share ${CURRENT_PACKAGES_DIR}/share2) + set(_vfct_CONFIG_PATH share2) + endif() + + set(DEBUG_CONFIG ${CURRENT_PACKAGES_DIR}/debug/${_vfct_CONFIG_PATH}) + set(RELEASE_CONFIG ${CURRENT_PACKAGES_DIR}/${_vfct_CONFIG_PATH}) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + if(NOT EXISTS ${DEBUG_CONFIG}) + message(FATAL_ERROR "'${DEBUG_CONFIG}' does not exist.") + endif() + + # This roundabout handling enables CONFIG_PATH share + file(MAKE_DIRECTORY ${DEBUG_SHARE}) + file(GLOB FILES ${DEBUG_CONFIG}/*) + file(COPY ${FILES} DESTINATION ${DEBUG_SHARE}) + file(REMOVE_RECURSE ${DEBUG_CONFIG}) + endif() + + file(GLOB FILES ${RELEASE_CONFIG}/*) + file(COPY ${FILES} DESTINATION ${RELEASE_SHARE}) + file(REMOVE_RECURSE ${RELEASE_CONFIG}) + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + get_filename_component(DEBUG_CONFIG_DIR_NAME ${DEBUG_CONFIG} NAME) + string(TOLOWER "${DEBUG_CONFIG_DIR_NAME}" DEBUG_CONFIG_DIR_NAME) + if(DEBUG_CONFIG_DIR_NAME STREQUAL "cmake" AND NOT _vfct_DO_NOT_DELETE_PARENT_CONFIG_PATH) + file(REMOVE_RECURSE ${DEBUG_CONFIG}) + else() + get_filename_component(DEBUG_CONFIG_PARENT_DIR ${DEBUG_CONFIG} DIRECTORY) + get_filename_component(DEBUG_CONFIG_DIR_NAME ${DEBUG_CONFIG_PARENT_DIR} NAME) + string(TOLOWER "${DEBUG_CONFIG_DIR_NAME}" DEBUG_CONFIG_DIR_NAME) + if(DEBUG_CONFIG_DIR_NAME STREQUAL "cmake" AND NOT _vfct_DO_NOT_DELETE_PARENT_CONFIG_PATH) + file(REMOVE_RECURSE ${DEBUG_CONFIG_PARENT_DIR}) + endif() + endif() + endif() + + get_filename_component(RELEASE_CONFIG_DIR_NAME ${RELEASE_CONFIG} NAME) + string(TOLOWER "${RELEASE_CONFIG_DIR_NAME}" RELEASE_CONFIG_DIR_NAME) + if(RELEASE_CONFIG_DIR_NAME STREQUAL "cmake" AND NOT _vfct_DO_NOT_DELETE_PARENT_CONFIG_PATH) + file(REMOVE_RECURSE ${RELEASE_CONFIG}) + else() + get_filename_component(RELEASE_CONFIG_PARENT_DIR ${RELEASE_CONFIG} DIRECTORY) + get_filename_component(RELEASE_CONFIG_DIR_NAME ${RELEASE_CONFIG_PARENT_DIR} NAME) + string(TOLOWER "${RELEASE_CONFIG_DIR_NAME}" RELEASE_CONFIG_DIR_NAME) + if(RELEASE_CONFIG_DIR_NAME STREQUAL "cmake" AND NOT _vfct_DO_NOT_DELETE_PARENT_CONFIG_PATH) + file(REMOVE_RECURSE ${RELEASE_CONFIG_PARENT_DIR}) + endif() + endif() + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + if(NOT EXISTS "${DEBUG_SHARE}") + message(FATAL_ERROR "'${DEBUG_SHARE}' does not exist.") + endif() + endif() + + file(GLOB_RECURSE UNUSED_FILES + "${DEBUG_SHARE}/*[Tt]argets.cmake" + "${DEBUG_SHARE}/*[Cc]onfig.cmake" + "${DEBUG_SHARE}/*[Cc]onfigVersion.cmake" + "${DEBUG_SHARE}/*[Cc]onfig-version.cmake" + ) + if(UNUSED_FILES) + file(REMOVE ${UNUSED_FILES}) + endif() + + file(GLOB_RECURSE RELEASE_TARGETS + "${RELEASE_SHARE}/*-release.cmake" + ) + foreach(RELEASE_TARGET IN LISTS RELEASE_TARGETS) + file(READ ${RELEASE_TARGET} _contents) + string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" _contents "${_contents}") + string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \"]+${EXECUTABLE_SUFFIX})" "\${_IMPORT_PREFIX}/tools/${PORT}/\\1" _contents "${_contents}") + file(WRITE ${RELEASE_TARGET} "${_contents}") + endforeach() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(GLOB_RECURSE DEBUG_TARGETS + "${DEBUG_SHARE}/*-debug.cmake" + ) + foreach(DEBUG_TARGET IN LISTS DEBUG_TARGETS) + file(RELATIVE_PATH DEBUG_TARGET_REL "${DEBUG_SHARE}" "${DEBUG_TARGET}") + + file(READ ${DEBUG_TARGET} _contents) + string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${_IMPORT_PREFIX}" _contents "${_contents}") + string(REGEX REPLACE "\\\${_IMPORT_PREFIX}/bin/([^ \";]+${EXECUTABLE_SUFFIX})" "\${_IMPORT_PREFIX}/tools/${PORT}/\\1" _contents "${_contents}") + string(REPLACE "\${_IMPORT_PREFIX}/lib" "\${_IMPORT_PREFIX}/debug/lib" _contents "${_contents}") + string(REPLACE "\${_IMPORT_PREFIX}/bin" "\${_IMPORT_PREFIX}/debug/bin" _contents "${_contents}") + file(WRITE ${RELEASE_SHARE}/${DEBUG_TARGET_REL} "${_contents}") + + file(REMOVE ${DEBUG_TARGET}) + endforeach() + endif() + + #Fix ${_IMPORT_PREFIX} in cmake generated targets and configs; + #Since those can be renamed we have to check in every *.cmake + file(GLOB_RECURSE MAIN_CMAKES "${RELEASE_SHARE}/*.cmake") + foreach(MAIN_CMAKE IN LISTS MAIN_CMAKES) + file(READ ${MAIN_CMAKE} _contents) + string(REGEX REPLACE + "get_filename_component\\(_IMPORT_PREFIX \"\\\${CMAKE_CURRENT_LIST_FILE}\" PATH\\)(\nget_filename_component\\(_IMPORT_PREFIX \"\\\${_IMPORT_PREFIX}\" PATH\\))*" + "get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)" + _contents "${_contents}") # see #1044 for details why this replacement is necessary. See #4782 why it must be a regex. + string(REGEX REPLACE + "get_filename_component\\(PACKAGE_PREFIX_DIR \"\\\${CMAKE_CURRENT_LIST_DIR}/\\.\\./(\\.\\./)*\" ABSOLUTE\\)" + "get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/../../\" ABSOLUTE)" + _contents "${_contents}") + string(REGEX REPLACE + "get_filename_component\\(PACKAGE_PREFIX_DIR \"\\\${CMAKE_CURRENT_LIST_DIR}/\\.\\.((\\\\|/)\\.\\.)*\" ABSOLUTE\\)" + "get_filename_component(PACKAGE_PREFIX_DIR \"\${CMAKE_CURRENT_LIST_DIR}/../../\" ABSOLUTE)" + _contents "${_contents}") # This is a meson-related workaround, see https://github.com/mesonbuild/meson/issues/6955 + #Fix wrongly absolute paths to install dir with the correct dir using ${_IMPORT_PREFIX} + string(REPLACE "${CURRENT_INSTALLED_DIR}" [[${_IMPORT_PREFIX}]] _contents "${_contents}") + file(WRITE ${MAIN_CMAKE} "${_contents}") + endforeach() + + # Remove /debug// if it's empty. + file(GLOB_RECURSE REMAINING_FILES "${DEBUG_SHARE}/*") + if(NOT REMAINING_FILES) + file(REMOVE_RECURSE ${DEBUG_SHARE}) + endif() + + # Remove /debug/share/ if it's empty. + file(GLOB_RECURSE REMAINING_FILES "${CURRENT_PACKAGES_DIR}/debug/share/*") + if(NOT REMAINING_FILES) + file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + endif() + + # Patch out any remaining absolute references + file(TO_CMAKE_PATH "${CURRENT_PACKAGES_DIR}" CMAKE_CURRENT_PACKAGES_DIR) + file(GLOB CMAKE_FILES ${RELEASE_SHARE}/*.cmake) + foreach(CMAKE_FILE IN LISTS CMAKE_FILES) + file(READ ${CMAKE_FILE} _contents) + string(REPLACE "${CMAKE_CURRENT_PACKAGES_DIR}" "\${CMAKE_CURRENT_LIST_DIR}/../.." _contents "${_contents}") + file(WRITE ${CMAKE_FILE} "${_contents}") + endforeach() +endfunction() + + diff --git a/vcpkg/scripts/cmake/vcpkg_fixup_pkgconfig.cmake b/vcpkg/scripts/cmake/vcpkg_fixup_pkgconfig.cmake new file mode 100644 index 0000000..c39b1fb --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_fixup_pkgconfig.cmake @@ -0,0 +1,349 @@ +## # vcpkg_fixup_pkgconfig +## +## Fix common paths in *.pc files and make everything relativ to $(prefix) +## +## ## Usage +## ```cmake +## vcpkg_fixup_pkgconfig( +## [RELEASE_FILES ...] +## [DEBUG_FILES ...] +## [SYSTEM_LIBRARIES ...] +## [IGNORE_FLAGS ] +## [SKIP_CHECK] +## ) +## ``` +## +## ## Parameters +## ### RELEASE_FILES +## Specifies a list of files to apply the fixes for release paths. +## Defaults to every *.pc file in the folder ${CURRENT_PACKAGES_DIR} without ${CURRENT_PACKAGES_DIR}/debug/ +## +## ### DEBUG_FILES +## Specifies a list of files to apply the fixes for debug paths. +## Defaults to every *.pc file in the folder ${CURRENT_PACKAGES_DIR}/debug/ +## +## ### SYSTEM_LIBRARIES +## If the *.pc file contains system libraries outside vcpkg these need to be listed here. +## VCPKG checks every -l flag for the existence of the required library within vcpkg. +## +## ### IGNORE_FLAGS +## If the *.pc file contains flags in the lib field which are not libraries. These can be listed here +## +## ### SKIP_CHECK +## Skips the library checks in vcpkg_fixup_pkgconfig. Only use if the script itself has unhandled cases. +## +## ## Notes +## Still work in progress. If there are more cases which can be handled here feel free to add them +## +## ## Examples +## Just call vcpkg_fixup_pkgconfig() after any install step which installs *.pc files. + +include(vcpkg_escape_regex_control_characters) +function(vcpkg_fixup_pkgconfig_check_files pkg_cfg_cmd _file _config _system_libs _ignore_flags) + # Setup pkg-config paths + set(_VCPKG_INSTALLED_PKGCONF "${CURRENT_INSTALLED_DIR}") + set(_VCPKG_PACKAGES_PKGCONF "${CURRENT_PACKAGES_DIR}") + + set(PATH_SUFFIX_DEBUG /debug) + set(PKGCONFIG_INSTALLED_DIR "${_VCPKG_INSTALLED_PKGCONF}${PATH_SUFFIX_${_config}}/lib/pkgconfig") + set(PKGCONFIG_INSTALLED_SHARE_DIR "${_VCPKG_INSTALLED_PKGCONF}/share/pkgconfig") + set(PKGCONFIG_PACKAGES_DIR "${_VCPKG_PACKAGES_PKGCONF}${PATH_SUFFIX_${_config}}/lib/pkgconfig") + set(PKGCONFIG_PACKAGES_SHARE_DIR "${_VCPKG_PACKAGES_PKGCONF}/share/pkgconfig") + + if(ENV{PKG_CONFIG_PATH}) + set(BACKUP_ENV_PKG_CONFIG_PATH_${_config} $ENV{PKG_CONFIG_PATH}) + set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_INSTALLED_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}$ENV{PKG_CONFIG_PATH}") + else() + set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_INSTALLED_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_SHARE_DIR}") + endif() + + # First make sure everything is ok with the package and its deps + get_filename_component(_package_name "${_file}" NAME_WLE) + debug_message("Checking package (${_config}): ${_package_name}") + execute_process(COMMAND "${pkg_cfg_cmd}" --print-errors --exists ${_package_name} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}" + RESULT_VARIABLE _pkg_error_var + OUTPUT_VARIABLE _pkg_output + ERROR_VARIABLE _pkg_error_out + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE + ) + if(NOT _pkg_error_var EQUAL 0) + message(STATUS "pkg_cfg_cmd call with:${pkg_cfg_cmd} --exists ${_package_name} failed") + message(STATUS "ENV{PKG_CONFIG_PATH}:$ENV{PKG_CONFIG_PATH}") + message(STATUS "pkg-config call failed with error code:${_pkg_error_var}") + message(STATUS "pkg-config output:${_pkg_output}") + message(FATAL_ERROR "pkg-config error output:${_pkg_error_out}") + else() + debug_message("pkg-config returned:${_pkg_error_var}") + debug_message("pkg-config output:${_pkg_output}") + debug_message("pkg-config error output:${_pkg_error_out}") + endif() + + # Get all required libs. --static means we get all libraries required for static linkage + # which is the worst case and includes the case without --static + # This retests already tested *.pc files since pkg-config will recursivly search for + # required packages and add there link flags to the one being tested + # as such NOT_STATIC_PKGCONFIG might be used to deactivate the --static arg to pkg-config + + execute_process(COMMAND "${pkg_cfg_cmd}" --print-errors ${PKGCONFIG_STATIC} --libs ${_package_name} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}" + RESULT_VARIABLE _pkg_error_var + OUTPUT_VARIABLE _pkg_libs_output + ERROR_VARIABLE _pkg_error_out + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE + ) + if(NOT _pkg_error_var EQUAL 0) + message(STATUS "pkg_cfg_cmd call with:${pkg_cfg_cmd} --libs ${_package_name} failed") + message(STATUS "pkg-config call failed with error code:${_pkg_error_var}") + message(STATUS "pkg-config output:${_pkg_libs_output}") + message(FATAL_ERROR "pkg-config error output:${_pkg_error_out}") + else() + debug_message("pkg-config returned:${_pkg_error_var}") + debug_message("pkg-config output:${_pkg_libs_output}") + debug_message("pkg-config error output:${_pkg_error_out}") + endif() + + execute_process(COMMAND "${pkg_cfg_cmd}" --print-errors --static --libs-only-L ${_package_name} + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}" + RESULT_VARIABLE _pkg_error_var + OUTPUT_VARIABLE _pkg_lib_paths_output + ERROR_VARIABLE _pkg_error_out + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE + ) + + if(NOT _pkg_error_var EQUAL 0) + message(STATUS "pkg_cfg_cmd call with:${pkg_cfg_cmd} --libs-only-L ${_package_name} failed") + message(STATUS "pkg-config call failed with error code:${_pkg_error_var}") + message(STATUS "pkg-config output:${_pkg_lib_paths_output}") + message(FATAL_ERROR "pkg-config error output:${_pkg_error_out}") + else() + debug_message("pkg-config returned:${_pkg_error_var}") + debug_message("pkg-config output:${_pkg_lib_paths_output}") + debug_message("pkg-config error output:${_pkg_error_out}") + endif() + + string(REPLACE "\\ " "##" _pkg_lib_paths_output "${_pkg_lib_paths_output}") # Whitespace path protection + string(REGEX REPLACE "(^[\t ]*|[\t ]+)-L" ";" _pkg_lib_paths_output "${_pkg_lib_paths_output}") + debug_message("-L LIST TRANSFORMATION:'${_pkg_lib_paths_output}'") + string(REGEX REPLACE "^[\t ]*;" "" _pkg_lib_paths_output "${_pkg_lib_paths_output}") + string(REPLACE "##" "\\ " _pkg_lib_paths_output "${_pkg_lib_paths_output}") + + list(REMOVE_DUPLICATES _pkg_lib_paths_output) # We don't care about linker order and repeats + ## Remove search paths from LIBS + foreach(_search_path IN LISTS _pkg_lib_paths_output) + debug_message("REMOVING:'${_search_path}'") + debug_message("FROM:'${_pkg_libs_output}'") + vcpkg_escape_regex_control_characters(_search_path "${_search_path}") + string(REGEX REPLACE "(^[\t ]*|[\t ]+|;[\t ]*)-L${_search_path}([\t ]+|[\t ]*$)" ";" _pkg_libs_output "${_pkg_libs_output}") # Remove search paths from libs + endforeach() + debug_message("LIBS AFTER -L REMOVAL:'${_pkg_libs_output}'") + + #Make the remaining libs a proper CMake List + string(REPLACE "\\ " "##" _pkg_libs_output "${_pkg_libs_output}") # Whitespace path protection + string(REGEX REPLACE "(^[\t ]*|[\t ]+)-l" ";-l" _pkg_libs_output "${_pkg_libs_output}") + string(REGEX REPLACE "[\t ]*(-pthreads?)" ";\\1" _pkg_libs_output "${_pkg_libs_output}") # handle pthread without -l here (makes a lot of problems otherwise) + string(REGEX REPLACE "^[\t ]*;[\t ]*" "" _pkg_libs_output "${_pkg_libs_output}") + string(REPLACE "##" "\\ " _pkg_libs_output "${_pkg_libs_output}") + + #Windows path transformations + if(CMAKE_HOST_WIN32) + string(REGEX REPLACE "(^|;)/([a-zA-Z])/" "\\1\\2:/" _pkg_lib_paths_output "${_pkg_lib_paths_output}") + string(REGEX REPLACE " /([a-zA-Z])/" ";\\1:/" _pkg_libs_output "${_pkg_libs_output}") + string(REGEX REPLACE "-l/([a-zA-Z])/" "-l\\1:/" _pkg_libs_output "${_pkg_libs_output}") + debug_message("pkg-config output lib paths after replacement (cmake style):${_pkg_lib_paths_output}") + debug_message("pkg-config output lib after replacement (cmake style):${_pkg_libs_output}") + endif() + + if("${_config}" STREQUAL "DEBUG") + set(lib_suffixes d _d _debug -s -sd _s _sd -static -staticd _static _staticd) + elseif("${_config}" STREQUAL "RELEASE") + set(lib_suffixes -s _s -static _static) + else() + message(FATAL_ERROR "Unknown configuration in vcpkg_fixup_pkgconfig_check_libraries!") + endif() + + debug_message("IGNORED FLAGS:'${_ignore_flags}'") + debug_message("BEFORE IGNORE FLAGS REMOVAL: ${_pkg_libs_output}") + foreach(_ignore IN LISTS _ignore_flags) # Remove ignore with whitespace + debug_message("REMOVING FLAG:'${_ignore}'") + string(REGEX REPLACE "(^[\t ]*|;[\t ]*|[\t ]+)${_ignore}([\t ]+|[\t ]*;|[\t ]*$)" "\\2" _pkg_libs_output "${_pkg_libs_output}") + debug_message("AFTER REMOVAL: ${_pkg_libs_output}") + endforeach() + + string(REGEX REPLACE ";?[\t ]*;[\t ]*" ";" _pkg_libs_output "${_pkg_libs_output}") # Double ;; and Whitespace before/after ; removal + + debug_message("SYSTEM LIBRARIES:'${_system_libs}'") + debug_message("LIBRARIES in PC:'${_pkg_libs_output}'") + foreach(_system_lib IN LISTS _system_libs) # Remove system libs with whitespace + debug_message("REMOVING:'${_system_lib}'") + debug_message("FROM:'${_pkg_libs_output}'") + string(REGEX REPLACE "(^[\t ]*|;[\t ]*|[\t ]+)(-l?)${_system_lib}([\t ]+|[\t ]*;|[\t ]*$)" "\\3" _pkg_libs_output "${_pkg_libs_output}") + string(REGEX REPLACE "(^[\t ]*|;[\t ]*|[\t ]+)${_system_lib}([\t ]+|[\t ]*;|[\t ]*$)" "\\2" _pkg_libs_output "${_pkg_libs_output}") + string(TOLOWER "${_system_lib}" _system_lib_lower) + string(REGEX REPLACE "(^[\t ]*|;[\t ]*|[\t ]+)(-l?)${_system_lib_lower}([\t ]+|[\t ]*;|[\t ]*$)" "\\3" _pkg_libs_output "${_pkg_libs_output}") + string(REGEX REPLACE "(^[\t ]*|;[\t ]*|[\t ]+)${_system_lib_lower}([\t ]+|[\t ]*;|[\t ]*$)" "\\2" _pkg_libs_output "${_pkg_libs_output}") + debug_message("AFTER REMOVAL:'${_pkg_libs_output}'") + endforeach() + list(REMOVE_DUPLICATES _pkg_libs_output) # We don't care about linker order and repeats + + string(REGEX REPLACE ";?[\t ]*;[\t ]*" ";" _pkg_libs_output "${_pkg_libs_output}") # Double ;; and Whitespace before/after ; removal + + debug_message("Library search paths:${_pkg_lib_paths_output}") + debug_message("Libraries to search:${_pkg_libs_output}") + set(CMAKE_FIND_LIBRARY_SUFFIXES_BACKUP ${CMAKE_FIND_LIBRARY_SUFFIXES}) + list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES .lib .dll.a .a) + foreach(_lib IN LISTS _pkg_libs_output) + if(EXISTS "${_lib}" OR "x${_lib}x" STREQUAL "xx" ) # eat; all ok _lib is a fullpath to a library or empty + continue() + elseif (_lib MATCHES "^-l(.+)$") + debug_message("Library match: CMAKE_MATCH_1:${CMAKE_MATCH_1}") + set(_libname "${CMAKE_MATCH_1}") + if(EXISTS "${_libname}") + debug_message("${_libname} detected as an existing full path!") + continue() # fullpath in -l argument and exists; all ok + endif() + debug_message("CHECK_LIB_${_libname}_${_config} before: ${CHECK_LIB_${_libname}_${_config}}") + find_library(CHECK_LIB_${_libname}_${_config} NAMES ${_libname} PATHS ${_pkg_lib_paths_output} "${CURRENT_INSTALLED_DIR}${PATH_SUFFIX_${_config}}/lib" NO_DEFAULT_PATH) + debug_message("CHECK_LIB_${_libname}_${_config} after: ${CHECK_LIB_${_libname}_${_config}}") + if(CHECK_LIB_${_libname}_${_config}) + unset(CHECK_LIB_${_libname}_${_config} CACHE) # need to unset or else other configurations will not check correctly + debug_message("CHECK_LIB_${_libname}_${_config} after unset: ${CHECK_LIB_${_libname}_${_config}}") + continue() # found library; all ok + endif() + debug_message("Searching with additional suffixes: '${lib_suffixes}'") + foreach(_lib_suffix IN LISTS lib_suffixes) + string(REPLACE ".dll.a|.a|.lib|.so" "" _name_without_extension "${_libname}") + set(search_name ${_name_without_extension}${_lib_suffix}) + debug_message("Search name: '${search_name}'") + debug_message("CHECK_LIB_${search_name}_${_config} before: ${CHECK_LIB_${search_name}_${_config}}") + debug_message("Search paths:'${_pkg_lib_paths_output}' '${CURRENT_INSTALLED_DIR}${PATH_SUFFIX_${_config}}/lib'") + find_library(CHECK_LIB_${search_name}_${_config} NAMES ${search_name} PATHS ${_pkg_lib_paths_output} "${CURRENT_INSTALLED_DIR}${PATH_SUFFIX_${_config}}/lib" NO_DEFAULT_PATH) + debug_message("CHECK_LIB_${search_name}_${_config} after: ${CHECK_LIB_${search_name}_${_config}}") + if(CHECK_LIB_${search_name}_${_config}) + message(FATAL_ERROR "Found ${CHECK_LIB_${search_name}_${_config}} with additional '${_lib_suffix}' suffix! Please correct the *.pc file!") + unset(CHECK_LIB_${search_name}_${_config} CACHE) # need to unset or else other configurations will not check correctly + endif() + endforeach() + # Reaching here means error! + message(STATUS "CHECK_LIB_${_libname}_${_config}:${CHECK_LIB_${_libname}_${_config}}") + message(FATAL_ERROR "Library \"${_libname}\" was not found! If it is a system library use the SYSTEM_LIBRARIES parameter for the vcpkg_fixup_pkgconfig call! Otherwise, correct the *.pc file") + else () + message(FATAL_ERROR "Unhandled string \"${_lib}\" was found! If it is a system library use the SYSTEM_LIBRARIES parameter for the vcpkg_fixup_pkgconfig call! Otherwise, correct the *.pc file or add the case to vcpkg_fixup_pkgconfig") + endif() + endforeach() + + set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_BACKUP}) +endfunction() + +function(vcpkg_fixup_pkgconfig) + cmake_parse_arguments(_vfpkg "SKIP_CHECK;NOT_STATIC_PKGCONFIG" "" "RELEASE_FILES;DEBUG_FILES;SYSTEM_LIBRARIES;SYSTEM_PACKAGES;IGNORE_FLAGS" ${ARGN}) + + # Note about SYSTEM_PACKAGES: pkg-config requires all packages mentioned in pc files to exists. Otherwise pkg-config will fail to find the pkg. + # As such naming any SYSTEM_PACKAGES is damned to fail which is why it is not mentioned in the docs at the beginning. + if(VCPKG_SYSTEM_LIBRARIES) + list(APPEND _vfpkg_SYSTEM_LIBRARIES ${VCPKG_SYSTEM_LIBRARIES}) + endif() + + if(_vfpkg_NOT_STATIC_PKGCONFIG) + set(PKGCONFIG_STATIC) + else() + set(PKGCONFIG_STATIC --static) + endif() + + if(_vfpkg_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "vcpkg_fixup_pkgconfig was passed extra arguments: ${_vfct_UNPARSED_ARGUMENTS}") + endif() + + vcpkg_escape_regex_control_characters(_vfpkg_ESCAPED_CURRENT_PACKAGES_DIR "${CURRENT_PACKAGES_DIR}") + if(NOT _vfpkg_RELEASE_FILES) + file(GLOB_RECURSE _vfpkg_RELEASE_FILES "${CURRENT_PACKAGES_DIR}/**/*.pc") + list(FILTER _vfpkg_RELEASE_FILES EXCLUDE REGEX "${_vfpkg_ESCAPED_CURRENT_PACKAGES_DIR}/debug/") + endif() + + if(NOT _vfpkg_DEBUG_FILES) + file(GLOB_RECURSE _vfpkg_DEBUG_FILES "${CURRENT_PACKAGES_DIR}/debug/**/*.pc") + endif() + + vcpkg_find_acquire_program(PKGCONFIG) + debug_message("Using pkg-config from: ${PKGCONFIG}") + + #Absolute Unix like paths + string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_PACKAGES_DIR "${CURRENT_PACKAGES_DIR}") + string(REGEX REPLACE "([a-zA-Z]):/" "/\\1/" _VCPKG_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}") + + debug_message("Release Files: ${_vfpkg_RELEASE_FILES}") + foreach(_file ${_vfpkg_RELEASE_FILES}) + message(STATUS "Fixing pkgconfig file: ${_file}") + get_filename_component(PKG_LIB_SEARCH_PATH "${_file}" DIRECTORY) + file(RELATIVE_PATH RELATIVE_PC_PATH "${PKG_LIB_SEARCH_PATH}" "${CURRENT_PACKAGES_DIR}") + string(REGEX REPLACE "/$" "" RELATIVE_PC_PATH "${RELATIVE_PC_PATH}") + #Correct *.pc file + file(READ "${_file}" _contents) + string(REPLACE "${CURRENT_PACKAGES_DIR}" "\${prefix}" _contents "${_contents}") + string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${prefix}" _contents "${_contents}") + string(REPLACE "${_VCPKG_PACKAGES_DIR}" "\${prefix}" _contents "${_contents}") + string(REPLACE "${_VCPKG_INSTALLED_DIR}" "\${prefix}" _contents "${_contents}") + string(REGEX REPLACE "^prefix[\t ]*=[^\n]*" "" _contents "${_contents}") + string(REGEX REPLACE "[\n]prefix[\t ]*=[^\n]*" "" _contents "${_contents}") + file(WRITE "${_file}" "prefix=\${pcfiledir}/${RELATIVE_PC_PATH}\n${_contents}") + unset(PKG_LIB_SEARCH_PATH) + endforeach() + + if(NOT _vfpkg_SKIP_CHECK) # The check can only run after all files have been corrected! + foreach(_file ${_vfpkg_RELEASE_FILES}) + vcpkg_fixup_pkgconfig_check_files("${PKGCONFIG}" "${_file}" "RELEASE" "${_vfpkg_SYSTEM_LIBRARIES}" "${_vfpkg_IGNORE_FLAGS}") + endforeach() + endif() + + debug_message("Debug Files: ${_vfpkg_DEBUG_FILES}") + foreach(_file ${_vfpkg_DEBUG_FILES}) + message(STATUS "Fixing pkgconfig file: ${_file}") + get_filename_component(PKG_LIB_SEARCH_PATH "${_file}" DIRECTORY) + file(RELATIVE_PATH RELATIVE_PC_PATH "${PKG_LIB_SEARCH_PATH}" "${CURRENT_PACKAGES_DIR}/debug/") + string(REGEX REPLACE "/$" "" RELATIVE_PC_PATH "${RELATIVE_PC_PATH}") + string(REGEX REPLACE "/pkgconfig/?" "" PKG_LIB_SEARCH_PATH "${PKG_LIB_SEARCH_PATH}") + #Correct *.pc file + file(READ "${_file}" _contents) + string(REPLACE "${CURRENT_PACKAGES_DIR}" "\${prefix}" _contents "${_contents}") + string(REPLACE "${CURRENT_INSTALLED_DIR}" "\${prefix}" _contents "${_contents}") + string(REPLACE "${_VCPKG_PACKAGES_DIR}" "\${prefix}" _contents "${_contents}") + string(REPLACE "${_VCPKG_INSTALLED_DIR}" "\${prefix}" _contents "${_contents}") + string(REPLACE "debug/include" "../include" _contents "${_contents}") + string(REPLACE "\${prefix}/include" "\${prefix}/../include" _contents "${_contents}") + string(REPLACE "debug/share" "../share" _contents "${_contents}") + string(REPLACE "\${prefix}/share" "\${prefix}/../share" _contents "${_contents}") + string(REPLACE "debug/lib" "lib" _contents "${_contents}") # the prefix will contain the debug keyword + string(REGEX REPLACE "^prefix[\t ]*=[^\n]*" "" _contents "${_contents}") # make pc file relocatable + string(REGEX REPLACE "[\n]prefix[\t ]*=[^\n]*" "" _contents "${_contents}") # make pc file relocatable + string(REPLACE "\${prefix}/debug" "\${prefix}" _contents "${_contents}") # replace remaining debug paths if they exist. + file(WRITE "${_file}" "prefix=\${pcfiledir}/${RELATIVE_PC_PATH}\n${_contents}") + unset(PKG_LIB_SEARCH_PATH) + endforeach() + + if(NOT _vfpkg_SKIP_CHECK) # The check can only run after all files have been corrected! + foreach(_file ${_vfpkg_DEBUG_FILES}) + vcpkg_fixup_pkgconfig_check_files("${PKGCONFIG}" "${_file}" "DEBUG" "${_vfpkg_SYSTEM_LIBRARIES}" "${_vfpkg_IGNORE_FLAGS}") + endforeach() + endif() + debug_message("Fixing pkgconfig --- finished") + + set(VCPKG_FIXUP_PKGCONFIG_CALLED TRUE CACHE INTERNAL "See below" FORCE) + # Variable to check if this function has been called! + # Theoreotically vcpkg could look for *.pc files and automatically call this function + # or check if this function has been called if *.pc files are detected. + # The same is true for vcpkg_fixup_cmake_targets +endfunction() + + + # script to test the function locally without running vcpkg. Uncomment fix filepaths and use cmake -P vcpkg_fixup_pkgconfig + # set(_file "G:\\xlinux\\packages\\xlib_x64-windows\\lib\\pkgconfig\\x11.pc") + # include(${CMAKE_CURRENT_LIST_DIR}/vcpkg_common_definitions.cmake) + # file(READ "${_file}" _contents) + # set(CURRENT_INSTALLED_DIR "G:/xlinux/installed/x64-windows") + # set(CURRENT_PACKAGES_DIR "G:/xlinux/packages/xlib_x64-windows") + # set(_vfpkg_SYSTEM_LIBRARIES "blu\\ ub") + # set(_vfpkg_SYSTEM_PACKAGES "szip") + # vcpkg_fixup_pkgconfig_check_libraries("RELEASE" _contents "${_vfpkg_SYSTEM_LIBRARIES}" "${_vfpkg_SYSTEM_PACKAGES}") diff --git a/vcpkg/scripts/cmake/vcpkg_from_bitbucket.cmake b/vcpkg/scripts/cmake/vcpkg_from_bitbucket.cmake new file mode 100644 index 0000000..5f23714 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_from_bitbucket.cmake @@ -0,0 +1,197 @@ +## # vcpkg_from_bitbucket +## +## Download and extract a project from Bitbucket. +## Enables support for installing HEAD `vcpkg.exe install --head `. +## +## ## Usage: +## ```cmake +## vcpkg_from_bitbucket( +## OUT_SOURCE_PATH +## REPO +## [REF ] +## [SHA512 <45d0d7f8cc350...>] +## [HEAD_REF ] +## [PATCHES ...] +## ) +## ``` +## +## ## Parameters: +## ### OUT_SOURCE_PATH +## Specifies the out-variable that will contain the extracted location. +## +## This should be set to `SOURCE_PATH` by convention. +## +## ### REPO +## The organization or user and repository on GitHub. +## +## ### REF +## A stable git commit-ish (ideally a tag) that will not change contents. **This should not be a branch.** +## +## For repositories without official releases, this can be set to the full commit id of the current latest master. +## +## If `REF` is specified, `SHA512` must also be specified. +## +## ### SHA512 +## The SHA512 hash that should match the archive (https://bitbucket.com/${REPO}/get/${REF}.tar.gz). +## +## This is most easily determined by first setting it to `1`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile. +## +## ### HEAD_REF +## The unstable git commit-ish (ideally a branch) to pull for `--head` builds. +## +## For most projects, this should be `master`. The chosen branch should be one that is expected to be always buildable on all supported platforms. +## +## ### PATCHES +## A list of patches to be applied to the extracted sources. +## +## Relative paths are based on the port directory. +## +## ## Notes: +## At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present. +## +## This exports the `VCPKG_HEAD_VERSION` variable during head builds. +## +## ## Examples: +## +## * [blaze](https://github.com/Microsoft/vcpkg/blob/master/ports/blaze/portfile.cmake) +function(vcpkg_from_bitbucket) + set(oneValueArgs OUT_SOURCE_PATH REPO REF SHA512 HEAD_REF) + set(multipleValuesArgs PATCHES) + cmake_parse_arguments(_vdud "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) + + if(NOT _vdud_OUT_SOURCE_PATH) + message(FATAL_ERROR "OUT_SOURCE_PATH must be specified.") + endif() + + if((_vdud_REF AND NOT _vdud_SHA512) OR (NOT _vdud_REF AND _vdud_SHA512)) + message(FATAL_ERROR "SHA512 must be specified if REF is specified.") + endif() + + if(NOT _vdud_REPO) + message(FATAL_ERROR "The Bitbucket repository must be specified.") + endif() + + if(NOT _vdud_REF AND NOT _vdud_HEAD_REF) + message(FATAL_ERROR "At least one of REF and HEAD_REF must be specified.") + endif() + + string(REGEX REPLACE ".*/" "" REPO_NAME ${_vdud_REPO}) + string(REGEX REPLACE "/.*" "" ORG_NAME ${_vdud_REPO}) + + macro(set_SOURCE_PATH BASE BASEREF) + set(SOURCE_PATH "${BASE}/${ORG_NAME}-${REPO_NAME}-${BASEREF}") + if(EXISTS ${SOURCE_PATH}) + set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) + else() + # Sometimes GitHub strips a leading 'v' off the REF. + string(REGEX REPLACE "^v" "" REF ${BASEREF}) + set(SOURCE_PATH "${BASE}/${ORG_NAME}-${REPO_NAME}-${REF}") + if(EXISTS ${SOURCE_PATH}) + set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) + else() + message(FATAL_ERROR "Could not determine source path: '${BASE}/${ORG_NAME}-${REPO_NAME}-${BASEREF}' does not exist") + endif() + endif() + endmacro() + + if(VCPKG_USE_HEAD_VERSION AND NOT _vdud_HEAD_REF) + message(STATUS "Package does not specify HEAD_REF. Falling back to non-HEAD version.") + set(VCPKG_USE_HEAD_VERSION OFF) + endif() + + # Handle --no-head scenarios + if(NOT VCPKG_USE_HEAD_VERSION) + if(NOT _vdud_REF) + message(FATAL_ERROR "Package does not specify REF. It must built using --head.") + endif() + + set(URL "https://bitbucket.com/${ORG_NAME}/${REPO_NAME}/get/${_vdud_REF}.tar.gz") + set(downloaded_file_path "${DOWNLOADS}/${ORG_NAME}-${REPO_NAME}-${_vdud_REF}.tar.gz") + + file(DOWNLOAD "https://api.bitbucket.com/2.0/repositories/${ORG_NAME}/${REPO_NAME}/refs/tags/${_vdud_REF}" + ${downloaded_file_path}.version + STATUS download_status + ) + list(GET download_status 0 status_code) + if ("${status_code}" STREQUAL "0") + # Parse the github refs response with regex. + # TODO: use some JSON swiss-army-knife utility instead. + file(READ "${downloaded_file_path}.version" _contents) + string(REGEX MATCH "\"hash\": \"[a-f0-9]+\"" x "${_contents}") + string(REGEX REPLACE "\"hash\": \"([a-f0-9]+)\"" "\\1" _version ${x}) + string(SUBSTRING ${_version} 0 12 _version) # Get the 12 first numbers from commit hash + else() + string(SUBSTRING ${_vdud_REF} 0 12 _version) # Get the 12 first numbers from commit hash + endif() + + vcpkg_download_distfile(ARCHIVE + URLS "https://bitbucket.com/${ORG_NAME}/${REPO_NAME}/get/${_vdud_REF}.tar.gz" + SHA512 "${_vdud_SHA512}" + FILENAME "${ORG_NAME}-${REPO_NAME}-${_vdud_REF}.tar.gz" + ) + + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE}" + REF "${_vdud_REF}" + PATCHES ${_vdud_PATCHES} + ) + set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) + return() + endif() + + # The following is for --head scenarios + set(URL "https://bitbucket.com/${ORG_NAME}/${REPO_NAME}/get/${_vdud_HEAD_REF}.tar.gz") + set(downloaded_file_name "${ORG_NAME}-${REPO_NAME}-${_vdud_HEAD_REF}.tar.gz") + set(downloaded_file_path "${DOWNLOADS}/${downloaded_file_name}") + + if(_VCPKG_NO_DOWNLOADS) + if(NOT EXISTS ${downloaded_file_path} OR NOT EXISTS ${downloaded_file_path}.version) + message(FATAL_ERROR "Downloads are disabled, but '${downloaded_file_path}' does not exist.") + endif() + message(STATUS "Using cached ${downloaded_file_path}") + else() + if(EXISTS ${downloaded_file_path}) + message(STATUS "Purging cached ${downloaded_file_path} to fetch latest (use --no-downloads to suppress)") + file(REMOVE ${downloaded_file_path}) + endif() + if(EXISTS ${downloaded_file_path}.version) + file(REMOVE ${downloaded_file_path}.version) + endif() + if(EXISTS ${CURRENT_BUILDTREES_DIR}/src/head) + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src/head) + endif() + + # Try to download the file and version information from bitbucket. + vcpkg_download_distfile(ARCHIVE_VERSION + URLS "https://api.bitbucket.com/2.0/repositories/${ORG_NAME}/${REPO_NAME}/refs/branches/${_vdud_HEAD_REF}" + FILENAME "${downloaded_file_name}.version" + SKIP_SHA512 + ) + + vcpkg_download_distfile(ARCHIVE + URLS "${URL}" + FILENAME "${downloaded_file_name}" + SKIP_SHA512 + ) + endif() + + # Parse the github refs response with regex. + # TODO: use some JSON swiss-army-knife utility instead. + file(READ "${ARCHIVE_VERSION}" _contents) + string(REGEX MATCH "\"hash\": \"[a-f0-9]+\"" x "${_contents}") + string(REGEX REPLACE "\"hash\": \"([a-f0-9]+)\"" "\\1" _version ${x}) + string(SUBSTRING ${_version} 0 12 _vdud_HEAD_REF) # Get the 12 first numbers from commit hash + + # exports VCPKG_HEAD_VERSION to the caller. This will get picked up by ports.cmake after the build. + set(VCPKG_HEAD_VERSION ${_version} PARENT_SCOPE) + + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${downloaded_file_path}" + REF "${_vdud_HEAD_REF}" + WORKING_DIRECTORY "${CURRENT_BUILDTREES_DIR}/src/head" + PATCHES ${_vdud_PATCHES} + ) + set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_from_git.cmake b/vcpkg/scripts/cmake/vcpkg_from_git.cmake new file mode 100644 index 0000000..860e314 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_from_git.cmake @@ -0,0 +1,122 @@ +## # vcpkg_from_git +## +## Download and extract a project from git +## +## ## Usage: +## ```cmake +## vcpkg_from_git( +## OUT_SOURCE_PATH +## URL +## REF <59f7335e4d...> +## [PATCHES ...] +## ) +## ``` +## +## ## Parameters: +## ### OUT_SOURCE_PATH +## Specifies the out-variable that will contain the extracted location. +## +## This should be set to `SOURCE_PATH` by convention. +## +## ### URL +## The url of the git repository. +## +## ### REF +## The git sha of the commit to download. +## +## ### PATCHES +## A list of patches to be applied to the extracted sources. +## +## Relative paths are based on the port directory. +## +## ## Notes: +## `OUT_SOURCE_PATH`, `REF`, and `URL` must be specified. +## +## ## Examples: +## +## * [fdlibm](https://github.com/Microsoft/vcpkg/blob/master/ports/fdlibm/portfile.cmake) + +include(vcpkg_execute_in_download_mode) + +function(vcpkg_from_git) + set(oneValueArgs OUT_SOURCE_PATH URL REF) + set(multipleValuesArgs PATCHES) + cmake_parse_arguments(_vdud "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) + + if(NOT DEFINED _vdud_OUT_SOURCE_PATH) + message(FATAL_ERROR "OUT_SOURCE_PATH must be specified.") + endif() + + if(NOT DEFINED _vdud_URL) + message(FATAL_ERROR "The git url must be specified") + endif() + + if(NOT DEFINED _vdud_REF) + message(FATAL_ERROR "The git ref must be specified.") + endif() + + # using .tar.gz instead of .zip because the hash of the latter is affected by timezone. + string(REPLACE "/" "-" SANITIZED_REF "${_vdud_REF}") + set(TEMP_ARCHIVE "${DOWNLOADS}/temp/${PORT}-${SANITIZED_REF}.tar.gz") + set(ARCHIVE "${DOWNLOADS}/${PORT}-${SANITIZED_REF}.tar.gz") + set(TEMP_SOURCE_PATH "${CURRENT_BUILDTREES_DIR}/src/${SANITIZED_REF}") + + if(NOT EXISTS "${ARCHIVE}") + if(_VCPKG_NO_DOWNLOADS) + message(FATAL_ERROR "Downloads are disabled, but '${ARCHIVE}' does not exist.") + endif() + message(STATUS "Fetching ${_vdud_URL}...") + find_program(GIT NAMES git git.cmd) + # Note: git init is safe to run multiple times + vcpkg_execute_required_process( + ALLOW_IN_DOWNLOAD_MODE + COMMAND ${GIT} init git-tmp + WORKING_DIRECTORY ${DOWNLOADS} + LOGNAME git-init-${TARGET_TRIPLET} + ) + vcpkg_execute_required_process( + ALLOW_IN_DOWNLOAD_MODE + COMMAND ${GIT} fetch ${_vdud_URL} ${_vdud_REF} --depth 1 -n + WORKING_DIRECTORY ${DOWNLOADS}/git-tmp + LOGNAME git-fetch-${TARGET_TRIPLET} + ) + vcpkg_execute_in_download_mode( + COMMAND ${GIT} rev-parse FETCH_HEAD + OUTPUT_VARIABLE REV_PARSE_HEAD + ERROR_VARIABLE REV_PARSE_HEAD + RESULT_VARIABLE error_code + WORKING_DIRECTORY ${DOWNLOADS}/git-tmp + ) + if(error_code) + message(FATAL_ERROR "unable to determine FETCH_HEAD after fetching git repository") + endif() + string(REGEX REPLACE "\n$" "" REV_PARSE_HEAD "${REV_PARSE_HEAD}") + if(NOT REV_PARSE_HEAD STREQUAL _vdud_REF) + message(FATAL_ERROR "REF (${_vdud_REF}) does not match FETCH_HEAD (${REV_PARSE_HEAD})") + endif() + + file(MAKE_DIRECTORY "${DOWNLOADS}/temp") + vcpkg_execute_required_process( + ALLOW_IN_DOWNLOAD_MODE + COMMAND ${GIT} archive FETCH_HEAD -o "${TEMP_ARCHIVE}" + WORKING_DIRECTORY ${DOWNLOADS}/git-tmp + LOGNAME git-archive + ) + + get_filename_component(downloaded_file_dir "${ARCHIVE}" DIRECTORY) + file(MAKE_DIRECTORY "${downloaded_file_dir}") + file(RENAME "${TEMP_ARCHIVE}" "${ARCHIVE}") + else() + message(STATUS "Using cached ${ARCHIVE}") + endif() + + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE}" + REF "${SANITIZED_REF}" + PATCHES ${_vdud_PATCHES} + NO_REMOVE_ONE_LEVEL + ) + + set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_from_github.cmake b/vcpkg/scripts/cmake/vcpkg_from_github.cmake new file mode 100644 index 0000000..c871099 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_from_github.cmake @@ -0,0 +1,210 @@ +## # vcpkg_from_github +## +## Download and extract a project from GitHub. Enables support for `install --head`. +## +## ## Usage: +## ```cmake +## vcpkg_from_github( +## OUT_SOURCE_PATH +## REPO +## [REF ] +## [SHA512 <45d0d7f8cc350...>] +## [HEAD_REF ] +## [PATCHES ...] +## [GITHUB_HOST ] +## [AUTHORIZATION_TOKEN <${SECRET_FROM_FILE}>] +## ) +## ``` +## +## ## Parameters: +## ### OUT_SOURCE_PATH +## Specifies the out-variable that will contain the extracted location. +## +## This should be set to `SOURCE_PATH` by convention. +## +## ### REPO +## The organization or user and repository on GitHub. +## +## ### REF +## A stable git commit-ish (ideally a tag or commit) that will not change contents. **This should not be a branch.** +## +## For repositories without official releases, this can be set to the full commit id of the current latest master. +## +## If `REF` is specified, `SHA512` must also be specified. +## +## ### SHA512 +## The SHA512 hash that should match the archive (https://github.com/${REPO}/archive/${REF}.tar.gz). +## +## This is most easily determined by first setting it to `1`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile. +## +## ### HEAD_REF +## The unstable git commit-ish (ideally a branch) to pull for `--head` builds. +## +## For most projects, this should be `master`. The chosen branch should be one that is expected to be always buildable on all supported platforms. +## +## ### PATCHES +## A list of patches to be applied to the extracted sources. +## +## Relative paths are based on the port directory. +## +## ### GITHUB_HOST +## A replacement host for enterprise GitHub instances. +## +## This field should contain the scheme, host, and port of the desired URL without a trailing slash. +## +## ### AUTHORIZATION_TOKEN +## A token to be passed via the Authorization HTTP header as "token ${AUTHORIZATION_TOKEN}". +## +## ## Notes: +## At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present. +## +## This exports the `VCPKG_HEAD_VERSION` variable during head builds. +## +## ## Examples: +## +## * [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) +## * [ms-gsl](https://github.com/Microsoft/vcpkg/blob/master/ports/ms-gsl/portfile.cmake) +## * [beast](https://github.com/Microsoft/vcpkg/blob/master/ports/beast/portfile.cmake) +function(vcpkg_from_github) + set(oneValueArgs OUT_SOURCE_PATH REPO REF SHA512 HEAD_REF GITHUB_HOST AUTHORIZATION_TOKEN) + set(multipleValuesArgs PATCHES) + cmake_parse_arguments(_vdud "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) + + if(NOT DEFINED _vdud_OUT_SOURCE_PATH) + message(FATAL_ERROR "OUT_SOURCE_PATH must be specified.") + endif() + + if((DEFINED _vdud_REF AND NOT DEFINED _vdud_SHA512) OR (NOT DEFINED _vdud_REF AND DEFINED _vdud_SHA512)) + message(FATAL_ERROR "SHA512 must be specified if REF is specified.") + endif() + + if(NOT DEFINED _vdud_REPO) + message(FATAL_ERROR "The GitHub repository must be specified.") + endif() + + if(NOT DEFINED _vdud_REF AND NOT DEFINED _vdud_HEAD_REF) + message(FATAL_ERROR "At least one of REF and HEAD_REF must be specified.") + endif() + + if(NOT DEFINED _vdud_GITHUB_HOST) + set(GITHUB_HOST https://github.com) + set(GITHUB_API_URL https://api.github.com) + else() + set(GITHUB_HOST ${_vdud_GITHUB_HOST}) + set(GITHUB_API_URL ${_vdud_GITHUB_HOST}/api/v3) + endif() + + if(DEFINED _vdud_AUTHORIZATION_TOKEN) + set(HEADERS "HEADERS" "Authorization: token ${_vdud_AUTHORIZATION_TOKEN}") + else() + set(HEADERS) + endif() + + string(REGEX REPLACE ".*/" "" REPO_NAME ${_vdud_REPO}) + string(REGEX REPLACE "/.*" "" ORG_NAME ${_vdud_REPO}) + + macro(set_TEMP_SOURCE_PATH BASE BASEREF) + set(TEMP_SOURCE_PATH "${BASE}/${REPO_NAME}-${BASEREF}") + if(NOT EXISTS ${TEMP_SOURCE_PATH}) + # Sometimes GitHub strips a leading 'v' off the REF. + string(REGEX REPLACE "^v" "" REF ${BASEREF}) + string(REPLACE "/" "-" REF ${REF}) + set(TEMP_SOURCE_PATH "${BASE}/${REPO_NAME}-${REF}") + if(NOT EXISTS ${TEMP_SOURCE_PATH}) + message(FATAL_ERROR "Could not determine source path: '${BASE}/${REPO_NAME}-${BASEREF}' does not exist") + endif() + endif() + endmacro() + + if(VCPKG_USE_HEAD_VERSION AND NOT DEFINED _vdud_HEAD_REF) + message(STATUS "Package does not specify HEAD_REF. Falling back to non-HEAD version.") + set(VCPKG_USE_HEAD_VERSION OFF) + endif() + + # Handle --no-head scenarios + if(NOT VCPKG_USE_HEAD_VERSION) + if(NOT _vdud_REF) + message(FATAL_ERROR "Package does not specify REF. It must built using --head.") + endif() + + string(REPLACE "/" "-" SANITIZED_REF "${_vdud_REF}") + + vcpkg_download_distfile(ARCHIVE + URLS "${GITHUB_HOST}/${ORG_NAME}/${REPO_NAME}/archive/${_vdud_REF}.tar.gz" + SHA512 "${_vdud_SHA512}" + FILENAME "${ORG_NAME}-${REPO_NAME}-${SANITIZED_REF}.tar.gz" + ${HEADERS} + ) + + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE}" + REF "${SANITIZED_REF}" + PATCHES ${_vdud_PATCHES} + ) + + set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) + return() + endif() + + # The following is for --head scenarios + set(URL "${GITHUB_HOST}/${ORG_NAME}/${REPO_NAME}/archive/${_vdud_HEAD_REF}.tar.gz") + string(REPLACE "/" "-" SANITIZED_HEAD_REF "${_vdud_HEAD_REF}") + set(downloaded_file_name "${ORG_NAME}-${REPO_NAME}-${SANITIZED_HEAD_REF}.tar.gz") + set(downloaded_file_path "${DOWNLOADS}/${downloaded_file_name}") + + if(_VCPKG_NO_DOWNLOADS) + if(NOT EXISTS ${downloaded_file_path} OR NOT EXISTS ${downloaded_file_path}.version) + message(FATAL_ERROR "Downloads are disabled, but '${downloaded_file_path}' does not exist.") + endif() + message(STATUS "Using cached ${downloaded_file_path}") + else() + if(EXISTS ${downloaded_file_path}) + message(STATUS "Purging cached ${downloaded_file_path} to fetch latest (use --no-downloads to suppress)") + file(REMOVE ${downloaded_file_path}) + endif() + if(EXISTS ${downloaded_file_path}.version) + file(REMOVE ${downloaded_file_path}.version) + endif() + if(EXISTS ${CURRENT_BUILDTREES_DIR}/src/head) + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src/head) + endif() + + # Try to download the file and version information from github. + vcpkg_download_distfile(ARCHIVE_VERSION + URLS "${GITHUB_API_URL}/repos/${ORG_NAME}/${REPO_NAME}/git/refs/heads/${_vdud_HEAD_REF}" + FILENAME ${downloaded_file_name}.version + SKIP_SHA512 + ${HEADERS} + ) + + vcpkg_download_distfile(ARCHIVE + URLS ${URL} + FILENAME ${downloaded_file_name} + SKIP_SHA512 + ${HEADERS} + ) + endif() + + # Parse the github refs response with regex. + # TODO: use some JSON swiss-army-knife utility instead. + file(READ "${downloaded_file_path}.version" _contents) + string(REGEX MATCH "\"sha\": \"[a-f0-9]+\"" x "${_contents}") + string(REGEX REPLACE "\"sha\": \"([a-f0-9]+)\"" "\\1" _version ${x}) + + # exports VCPKG_HEAD_VERSION to the caller. This will get picked up by ports.cmake after the build. + # When multiple vcpkg_from_github's are used after each other, only use the version from the first (hopefully the primary one). + if(NOT DEFINED VCPKG_HEAD_VERSION) + set(VCPKG_HEAD_VERSION ${_version} PARENT_SCOPE) + endif() + + vcpkg_extract_source_archive_ex( + SKIP_PATCH_CHECK + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${downloaded_file_path}" + REF "${SANITIZED_HEAD_REF}" + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src/head + PATCHES ${_vdud_PATCHES} + ) + set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_from_gitlab.cmake b/vcpkg/scripts/cmake/vcpkg_from_gitlab.cmake new file mode 100644 index 0000000..bb908e4 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_from_gitlab.cmake @@ -0,0 +1,189 @@ +## # vcpkg_from_gitlab +## +## Download and extract a project from Gitlab instances. Enables support for `install --head`. +## +## ## Usage: +## ```cmake +## vcpkg_from_gitlab( +## GITLAB_URL +## OUT_SOURCE_PATH +## REPO +## [REF ] +## [SHA512 <45d0d7f8cc350...>] +## [HEAD_REF ] +## [PATCHES ...] +## ) +## ``` +## +## ## Parameters: +## +## ### GITLAB_URL +## The URL of the Gitlab instance to use. +## +## ### OUT_SOURCE_PATH +## Specifies the out-variable that will contain the extracted location. +## +## This should be set to `SOURCE_PATH` by convention. +## +## ### REPO +## The organization or user plus the repository name on the Gitlab instance. +## +## ### REF +## A stable git commit-ish (ideally a tag) that will not change contents. **This should not be a branch.** +## +## For repositories without official releases, this can be set to the full commit id of the current latest master. +## +## If `REF` is specified, `SHA512` must also be specified. +## +## ### SHA512 +## The SHA512 hash that should match the archive (${GITLAB_URL}/${REPO}/-/archive/${REF}/${REPO_NAME}-${REF}.tar.gz). +## The REPO_NAME variable is parsed from the value of REPO. +## +## This is most easily determined by first setting it to `1`, then trying to build the port. The error message will contain the full hash, which can be copied back into the portfile. +## +## ### HEAD_REF +## The unstable git commit-ish (ideally a branch) to pull for `--head` builds. +## +## For most projects, this should be `master`. The chosen branch should be one that is expected to be always buildable on all supported platforms. +## +## ### PATCHES +## A list of patches to be applied to the extracted sources. +## +## Relative paths are based on the port directory. +## +## ## Notes: +## At least one of `REF` and `HEAD_REF` must be specified, however it is preferable for both to be present. +## +## This exports the `VCPKG_HEAD_VERSION` variable during head builds. +## +## ## Examples: +## * [curl][https://github.com/Microsoft/vcpkg/blob/master/ports/curl/portfile.cmake#L75] +## * [folly](https://github.com/Microsoft/vcpkg/blob/master/ports/folly/portfile.cmake#L15) +## * [z3](https://github.com/Microsoft/vcpkg/blob/master/ports/z3/portfile.cmake#L13) +## + +include(vcpkg_execute_in_download_mode) + +function(vcpkg_from_gitlab) + set(oneValueArgs OUT_SOURCE_PATH GITLAB_URL USER REPO REF SHA512 HEAD_REF) + set(multipleValuesArgs PATCHES) + cmake_parse_arguments(_vdud "" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) + + if(NOT DEFINED _vdud_GITLAB_URL) + message(FATAL_ERROR "GITLAB_URL must be specified.") + endif() + + if(NOT DEFINED _vdud_OUT_SOURCE_PATH) + message(FATAL_ERROR "OUT_SOURCE_PATH must be specified.") + endif() + + if((DEFINED _vdud_REF AND NOT DEFINED _vdud_SHA512) OR (NOT DEFINED _vdud_REF AND DEFINED _vdud_SHA512)) + message(FATAL_ERROR "SHA512 must be specified if REF is specified.") + endif() + + if(NOT DEFINED _vdud_REPO) + message(FATAL_ERROR "REPO must be specified.") + endif() + + if(NOT DEFINED _vdud_REF AND NOT DEFINED _vdud_HEAD_REF) + message(FATAL_ERROR "At least one of REF and HEAD_REF must be specified.") + endif() + + if(VCPKG_USE_HEAD_VERSION AND NOT DEFINED _vdud_HEAD_REF) + message(STATUS "Package does not specify HEAD_REF. Falling back to non-HEAD version.") + set(VCPKG_USE_HEAD_VERSION OFF) + endif() + + string(REPLACE "/" ";" GITLAB_REPO_LINK ${_vdud_REPO}) + + list(LENGTH GITLAB_REPO_LINK len) + if(${len} EQUAL "2") + list(GET GITLAB_REPO_LINK 0 ORG_NAME) + list(GET GITLAB_REPO_LINK 1 REPO_NAME) + set(GITLAB_LINK ${_vdud_GITLAB_URL}/${ORG_NAME}/${REPO_NAME}) + endif() + + if(${len} EQUAL "3") + list(GET GITLAB_REPO_LINK 0 ORG_NAME) + list(GET GITLAB_REPO_LINK 1 GROUP_NAME) + list(GET GITLAB_REPO_LINK 2 REPO_NAME) + set(GITLAB_LINK ${_vdud_GITLAB_URL}/${ORG_NAME}/${GROUP_NAME}/${REPO_NAME}) + endif() + + # Handle --no-head scenarios + if(NOT VCPKG_USE_HEAD_VERSION) + if(NOT _vdud_REF) + message(FATAL_ERROR "Package does not specify REF. It must built using --head.") + endif() + + string(REPLACE "/" "-" SANITIZED_REF "${_vdud_REF}") + + vcpkg_download_distfile(ARCHIVE + URLS "${GITLAB_LINK}/-/archive/${_vdud_REF}/${REPO_NAME}-${_vdud_REF}.tar.gz" + SHA512 "${_vdud_SHA512}" + FILENAME "${ORG_NAME}-${REPO_NAME}-${SANITIZED_REF}.tar.gz" + ) + + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE}" + REF "${SANITIZED_REF}" + PATCHES ${_vdud_PATCHES} + ) + + set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) + return() + endif() + + # The following is for --head scenarios + set(URL "${GITLAB_LINK}/-/archive/${_vdud_HEAD_REF}/${_vdud_HEAD_REF}.tar.gz") + string(REPLACE "/" "-" SANITIZED_HEAD_REF "${_vdud_HEAD_REF}") + set(downloaded_file_name "${ORG_NAME}-${REPO_NAME}-${SANITIZED_HEAD_REF}.tar.gz") + set(downloaded_file_path "${DOWNLOADS}/${downloaded_file_name}") + + if(_VCPKG_NO_DOWNLOADS) + if(NOT EXISTS ${downloaded_file_path} OR NOT EXISTS ${downloaded_file_path}.version) + message(FATAL_ERROR "Downloads are disabled, but '${downloaded_file_path}' does not exist.") + endif() + message(STATUS "Using cached ${downloaded_file_path}") + else() + if(EXISTS ${downloaded_file_path}) + message(STATUS "Purging cached ${downloaded_file_path} to fetch latest (use --no-downloads to suppress)") + file(REMOVE ${downloaded_file_path}) + endif() + if(EXISTS ${downloaded_file_path}.version) + file(REMOVE ${downloaded_file_path}.version) + endif() + if(EXISTS ${CURRENT_BUILDTREES_DIR}/src/head) + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src/head) + endif() + + vcpkg_download_distfile(ARCHIVE + URLS ${URL} + FILENAME ${downloaded_file_name} + SKIP_SHA512 + ) + endif() + + # There are issues with the Gitlab API project paths being URL-escaped, so we use git here to get the head revision + vcpkg_execute_in_download_mode(COMMAND ${GIT} ls-remote + "${GITLAB_LINK}.git" "${_vdud_HEAD_REF}" + RESULT_VARIABLE _git_result + OUTPUT_VARIABLE _git_output + ) + string(REGEX MATCH "[a-f0-9]+" _version "${_git_output}") + # exports VCPKG_HEAD_VERSION to the caller. This will get picked up by ports.cmake after the build. + # When multiple vcpkg_from_gitlab's are used after each other, only use the version from the first (hopefully the primary one). + if(NOT DEFINED VCPKG_HEAD_VERSION) + set(VCPKG_HEAD_VERSION ${_version} PARENT_SCOPE) + endif() + + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${downloaded_file_path}" + REF "${SANITIZED_HEAD_REF}" + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src/head + PATCHES ${_vdud_PATCHES} + ) + set(${_vdud_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_from_sourceforge.cmake b/vcpkg/scripts/cmake/vcpkg_from_sourceforge.cmake new file mode 100644 index 0000000..10dc8b6 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_from_sourceforge.cmake @@ -0,0 +1,236 @@ +## # vcpkg_from_sourceforge +## +## Download and extract a project from sourceforge. +## +## ## Usage: +## ```cmake +## vcpkg_from_sourceforge( +## OUT_SOURCE_PATH SOURCE_PATH +## REPO +## [REF <2.1-3>] +## SHA512 <547b417109332...> +## FILENAME +## [DISABLE_SSL] +## [NO_REMOVE_ONE_LEVEL] +## [PATCHES ...] +## ) +## ``` +## +## ## Parameters: +## ### OUT_SOURCE_PATH +## Specifies the out-variable that will contain the extracted location. +## +## This should be set to `SOURCE_PATH` by convention. +## +## ### REPO +## The organization or user and repository (optional) on sourceforge. +## +## ### REF +## A stable version number that will not change contents. +## +## ### FILENAME +## The local name for the file. Files are shared between ports, so the file may need to be renamed to make it clearly attributed to this port and avoid conflicts. +## +## For example, we can get the download link: +## https://sourceforge.net/settings/mirror_choices?projectname=mad&filename=libmad/0.15.1b/libmad-0.15.1b.tar.gz&selected=nchc +## So the REPO is `mad/libmad`, the REF is `0.15.1b`, and the FILENAME is `libmad-0.15.1b.tar.gz` +## +## For some special links: +## https://sourceforge.net/settings/mirror_choices?projectname=soxr&filename=soxr-0.1.3-Source.tar.xz&selected=nchc +## The REPO is `soxr`, REF is not exist, and the FILENAME is `soxr-0.1.3-Source.tar.xz` +## +## ### SHA512 +## The SHA512 hash that should match the archive. +## +## ### WORKING_DIRECTORY +## If specified, the archive will be extracted into the working directory instead of `${CURRENT_BUILDTREES_DIR}/src/`. +## +## Note that the archive will still be extracted into a subfolder underneath that directory (`${WORKING_DIRECTORY}/${REF}-${HASH}/`). +## +## ### PATCHES +## A list of patches to be applied to the extracted sources. +## +## Relative paths are based on the port directory. +## +## ### DISABLE_SSL +## Disable ssl when downloading source. +## +## ### NO_REMOVE_ONE_LEVEL +## Specifies that the default removal of the top level folder should not occur. +## +## ## Examples: +## +## * [cunit](https://github.com/Microsoft/vcpkg/blob/master/ports/cunit/portfile.cmake) +## * [polyclipping](https://github.com/Microsoft/vcpkg/blob/master/ports/polyclipping/portfile.cmake) +## * [tinyfiledialogs](https://github.com/Microsoft/vcpkg/blob/master/ports/tinyfiledialogs/portfile.cmake) + +function(vcpkg_from_sourceforge) + macro(check_file_content) + if (EXISTS ${ARCHIVE}) + file(SIZE ${ARCHIVE} DOWNLOAD_FILE_SIZE) + if (DOWNLOAD_FILE_SIZE LESS_EQUAL 1024) + file(READ ${ARCHIVE} _FILE_CONTENT_) + string(FIND "${_FILE_CONTENT_}" "the Sourceforge site is currently in Disaster Recovery mode." OUT_CONTENT) + message("OUT_CONTENT: ${OUT_CONTENT}") + if (OUT_CONTENT EQUAL -1) + set(download_success 1) + else() + file(REMOVE ${ARCHIVE}) + endif() + endif() + endif() + endmacro() + + macro(check_file_sha512) + file(SHA512 ${ARCHIVE} FILE_HASH) + if(NOT FILE_HASH STREQUAL _vdus_SHA512) + message(FATAL_ERROR + "\nFile does not have expected hash:\n" + " File path: [ ${ARCHIVE} ]\n" + " Expected hash: [ ${_vdus_SHA512} ]\n" + " Actual hash: [ ${FILE_HASH} ]\n" + "${CUSTOM_ERROR_ADVICE}\n") + endif() + endmacro() + + set(booleanValueArgs DISABLE_SSL NO_REMOVE_ONE_LEVEL) + set(oneValueArgs OUT_SOURCE_PATH REPO REF SHA512 FILENAME WORKING_DIRECTORY) + set(multipleValuesArgs PATCHES) + cmake_parse_arguments(_vdus "${booleanValueArgs}" "${oneValueArgs}" "${multipleValuesArgs}" ${ARGN}) + + if(NOT DEFINED _vdus_OUT_SOURCE_PATH) + message(FATAL_ERROR "OUT_SOURCE_PATH must be specified.") + endif() + + if(NOT DEFINED _vdus_SHA512) + message(FATAL_ERROR "SHA512 must be specified.") + endif() + + if(NOT DEFINED _vdus_REPO) + message(FATAL_ERROR "The sourceforge repository must be specified.") + endif() + + if(DEFINED _vdus_WORKING_DIRECTORY) + set(WORKING_DIRECTORY WORKING_DIRECTORY "${_vdus_WORKING_DIRECTORY}") + else() + set(WORKING_DIRECTORY) + endif() + + if (_vdus_DISABLE_SSL) + set(URL_PROTOCOL http:) + else() + set(URL_PROTOCOL https:) + endif() + + set(SOURCEFORGE_HOST ${URL_PROTOCOL}//sourceforge.net/projects) + + string(FIND ${_vdus_REPO} "/" FOUND_ORG) + if (NOT FOUND_ORG EQUAL -1) + string(SUBSTRING "${_vdus_REPO}" 0 ${FOUND_ORG} ORG_NAME) + math(EXPR FOUND_ORG "${FOUND_ORG} + 1") # skip the slash + string(SUBSTRING "${_vdus_REPO}" ${FOUND_ORG} -1 REPO_NAME) + if (REPO_NAME MATCHES "/") + message(FATAL_ERROR "REPO should contain at most one slash (found ${_vdus_REPO}).") + endif() + set(ORG_NAME ${ORG_NAME}/) + else() + set(ORG_NAME ${_vdus_REPO}/) + set(REPO_NAME ) + endif() + + if (DEFINED _vdus_REF) + set(URL "${SOURCEFORGE_HOST}/${ORG_NAME}files/${REPO_NAME}/${_vdus_REF}/${_vdus_FILENAME}") + else() + set(URL "${SOURCEFORGE_HOST}/${ORG_NAME}${REPO_NAME}/files/${_vdus_FILENAME}") + endif() + + set(NO_REMOVE_ONE_LEVEL ) + if (_vdus_NO_REMOVE_ONE_LEVEL) + set(NO_REMOVE_ONE_LEVEL "NO_REMOVE_ONE_LEVEL") + endif() + + string(SUBSTRING "${_vdus_SHA512}" 0 10 SANITIZED_REF) + + list(APPEND SOURCEFORGE_MIRRORS + cfhcable # United States + pilotfiber # New York, NY + gigenet # Chicago, IL + versaweb # Las Vegas, NV + ayera # Modesto, CA + netactuate # Durham, NC + phoenixnap # Tempe, AZ + astuteinternet # Vancouver, BC + freefr # Paris, France + netcologne # Cologne, Germany + deac-riga # Latvia + excellmedia # Hyderabad, India + iweb # Montreal, QC + jaist # Nomi, Japan + jztkft # Mezotur, Hungary + managedway # Detroit, MI + nchc # Taipei, Taiwan + netix # Bulgaria + ufpr # Curitiba, Brazil + tenet # Wynberg, South Africa + ) + + # Try to use auto-select first + set(DOWNLOAD_URL ${URL}/download) + message(STATUS "Trying auto-select mirror...") + vcpkg_download_distfile(ARCHIVE + URLS "${DOWNLOAD_URL}" + SKIP_SHA512 + FILENAME "${_vdus_FILENAME}" + SILENT_EXIT + ) + check_file_content() + if (download_success) + check_file_sha512() + else() + message(STATUS "The default mirror is in Disaster Recovery mode, trying other mirrors...") + endif() + + if (NOT download_success EQUAL 1) + foreach(SOURCEFORGE_MIRROR ${SOURCEFORGE_MIRRORS}) + set(DOWNLOAD_URL ${URL}/download?use_mirror=${SOURCEFORGE_MIRROR}) + message(STATUS "Trying mirror ${SOURCEFORGE_MIRROR}...") + vcpkg_download_distfile(ARCHIVE + URLS "${DOWNLOAD_URL}" + SKIP_SHA512 + FILENAME "${_vdus_FILENAME}" + SILENT_EXIT + ) + + if (EXISTS ${ARCHIVE}) + set(download_success 1) + check_file_content() + if (download_success) + check_file_sha512() + else() + message(STATUS "Mirror ${SOURCEFORGE_MIRROR} is in Disaster Recovery mode, trying other mirrors...") + endif() + break() + endif() + endforeach() + endif() + + if (NOT download_success) + message(FATAL_ERROR [[ + Couldn't download source from any of the sourceforge mirrors, please check your network. + If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment + variables to "http[s]://user:password@your-proxy-ip-address:port/". + Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/issues + ]]) + endif() + + vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE}" + REF "${SANITIZED_REF}" + ${NO_REMOVE_ONE_LEVEL} + ${WORKING_DIRECTORY} + PATCHES ${_vdus_PATCHES} + ) + + set(${_vdus_OUT_SOURCE_PATH} "${SOURCE_PATH}" PARENT_SCOPE) +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_get_program_files_platform_bitness.cmake b/vcpkg/scripts/cmake/vcpkg_get_program_files_platform_bitness.cmake new file mode 100644 index 0000000..ed51b74 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_get_program_files_platform_bitness.cmake @@ -0,0 +1,10 @@ +function(vcpkg_get_program_files_platform_bitness ret) + + set(ret_temp $ENV{ProgramW6432}) + if (NOT DEFINED ret_temp) + set(ret_temp $ENV{PROGRAMFILES}) + endif() + + set(${ret} ${ret_temp} PARENT_SCOPE) + +endfunction() \ No newline at end of file diff --git a/vcpkg/scripts/cmake/vcpkg_get_windows_sdk.cmake b/vcpkg/scripts/cmake/vcpkg_get_windows_sdk.cmake new file mode 100644 index 0000000..e7d72a1 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_get_windows_sdk.cmake @@ -0,0 +1,6 @@ +# Returns Windows SDK number via out variable "ret" +function(vcpkg_get_windows_sdk ret) + set(WINDOWS_SDK $ENV{WindowsSDKVersion}) + string(REPLACE "\\" "" WINDOWS_SDK "${WINDOWS_SDK}") + set(${ret} ${WINDOWS_SDK} PARENT_SCOPE) +endfunction() \ No newline at end of file diff --git a/vcpkg/scripts/cmake/vcpkg_install_cmake.cmake b/vcpkg/scripts/cmake/vcpkg_install_cmake.cmake new file mode 100644 index 0000000..ab72d05 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_install_cmake.cmake @@ -0,0 +1,25 @@ +## # vcpkg_install_cmake +## +## Build and install a cmake project. +## +## ## Usage: +## ```cmake +## vcpkg_install_cmake(...) +## ``` +## +## ## Parameters: +## See [`vcpkg_build_cmake()`](vcpkg_build_cmake.md). +## +## ## Notes: +## This command transparently forwards to [`vcpkg_build_cmake()`](vcpkg_build_cmake.md), adding a `TARGET install` +## parameter. +## +## ## Examples: +## +## * [zlib](https://github.com/Microsoft/vcpkg/blob/master/ports/zlib/portfile.cmake) +## * [cpprestsdk](https://github.com/Microsoft/vcpkg/blob/master/ports/cpprestsdk/portfile.cmake) +## * [poco](https://github.com/Microsoft/vcpkg/blob/master/ports/poco/portfile.cmake) +## * [opencv](https://github.com/Microsoft/vcpkg/blob/master/ports/opencv/portfile.cmake) +function(vcpkg_install_cmake) + vcpkg_build_cmake(LOGFILE_ROOT install TARGET install ${ARGN}) +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_install_gn.cmake b/vcpkg/scripts/cmake/vcpkg_install_gn.cmake new file mode 100644 index 0000000..29a87a6 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_install_gn.cmake @@ -0,0 +1,97 @@ +## # vcpkg_install_gn +## +## Installs a GN project +## +## ## Usage: +## ```cmake +## vcpkg_install_gn( +## SOURCE_PATH +## [TARGETS ...] +## ) +## ``` +## +## ## Parameters: +## ### SOURCE_PATH +## The path to the source directory +## +## ### TARGETS +## Only install the specified targets. +## +## Note: includes must be handled separately + +function(vcpkg_install_gn) + cmake_parse_arguments(_vig "" "SOURCE_PATH" "TARGETS" ${ARGN}) + + if(NOT DEFINED _vig_SOURCE_PATH) + message(FATAL_ERROR "SOURCE_PATH must be specified.") + endif() + + vcpkg_build_ninja(TARGETS ${_vig_TARGETS}) + + vcpkg_find_acquire_program(GN) + + function(gn_get_target_type OUT_VAR BUILD_DIR TARGET) + execute_process( + COMMAND ${GN} desc "${BUILD_DIR}" "${TARGET}" + WORKING_DIRECTORY "${_vig_SOURCE_PATH}" + OUTPUT_VARIABLE OUTPUT_ + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + string(REGEX MATCH "type: ([A-Za-z0-9_]+)" OUTPUT_ "${OUTPUT_}") + set(${OUT_VAR} ${CMAKE_MATCH_1} PARENT_SCOPE) + endfunction() + + function(gn_desc OUT_VAR BUILD_DIR TARGET WHAT_TO_DISPLAY) + execute_process( + COMMAND ${GN} desc "${BUILD_DIR}" "${TARGET}" "${WHAT_TO_DISPLAY}" + WORKING_DIRECTORY "${_vig_SOURCE_PATH}" + OUTPUT_VARIABLE OUTPUT_ + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + string(REGEX REPLACE "\n|(\r\n)" ";" OUTPUT_ "${OUTPUT_}") + set(${OUT_VAR} ${OUTPUT_} PARENT_SCOPE) + endfunction() + + function(install_ BUILD_DIR INSTALL_DIR) + if(_vig_TARGETS) + foreach(TARGET ${_vig_TARGETS}) + # GN targets must start with a // + gn_desc(OUTPUTS "${BUILD_DIR}" "//${TARGET}" outputs) + gn_get_target_type(TARGET_TYPE "${BUILD_DIR}" "//${TARGET}") + foreach(OUTPUT ${OUTPUTS}) + if(NOT EXISTS "${OUTPUT}") + if(OUTPUT MATCHES "^//") + # relative path (e.g. //out/Release/target.lib) + string(REGEX REPLACE "^//" "${_vig_SOURCE_PATH}/" OUTPUT "${OUTPUT}") + elseif(OUTPUT MATCHES "^/" AND CMAKE_HOST_WIN32) + # absolute path (e.g. /C:/path/to/target.lib) + string(REGEX REPLACE "^/" "" OUTPUT "${OUTPUT}") + endif() + endif() + + if(NOT EXISTS "${OUTPUT}") + message(STATUS "Output for target, ${TARGET} doesn't exist: ${OUTPUT}.") + continue() + endif() + + if(TARGET_TYPE STREQUAL "executable") + file(INSTALL "${OUTPUT}" DESTINATION "${INSTALL_DIR}/tools") + elseif("${OUTPUT}" MATCHES "(\\.dll|\\.pdb)$") + file(INSTALL "${OUTPUT}" DESTINATION "${INSTALL_DIR}/bin") + else() + file(INSTALL "${OUTPUT}" DESTINATION "${INSTALL_DIR}/lib") + endif() + endforeach() + endforeach() + endif() + endfunction() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + install_("${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg" "${CURRENT_PACKAGES_DIR}/debug") + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + install_("${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel" "${CURRENT_PACKAGES_DIR}") + endif() + +endfunction() \ No newline at end of file diff --git a/vcpkg/scripts/cmake/vcpkg_install_make.cmake b/vcpkg/scripts/cmake/vcpkg_install_make.cmake new file mode 100644 index 0000000..4246894 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_install_make.cmake @@ -0,0 +1,25 @@ +## # vcpkg_install_make +## +## Build and install a make project. +## +## ## Usage: +## ```cmake +## vcpkg_install_make(...) +## ``` +## +## ## Parameters: +## See [`vcpkg_build_make()`](vcpkg_build_make.md). +## +## ## Notes: +## This command transparently forwards to [`vcpkg_build_make()`](vcpkg_build_make.md), adding `ENABLE_INSTALL` +## +## ## Examples +## +## * [x264](https://github.com/Microsoft/vcpkg/blob/master/ports/x264/portfile.cmake) +## * [tcl](https://github.com/Microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake) +## * [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake) +## * [libosip2](https://github.com/Microsoft/vcpkg/blob/master/ports/libosip2/portfile.cmake) + +function(vcpkg_install_make) + vcpkg_build_make(${ARGN} LOGFILE_ROOT ENABLE_INSTALL) +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_install_meson.cmake b/vcpkg/scripts/cmake/vcpkg_install_meson.cmake new file mode 100644 index 0000000..edc6c73 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_install_meson.cmake @@ -0,0 +1,31 @@ +## # vcpkg_install_meson +## +## Builds a meson project previously configured with `vcpkg_configure_meson()`. +## +## ## Usage +## ```cmake +## vcpkg_install_meson() +## ``` +## +## ## Examples +## +## * [fribidi](https://github.com/Microsoft/vcpkg/blob/master/ports/fribidi/portfile.cmake) +## * [libepoxy](https://github.com/Microsoft/vcpkg/blob/master/ports/libepoxy/portfile.cmake) +function(vcpkg_install_meson) + vcpkg_find_acquire_program(NINJA) + unset(ENV{DESTDIR}) # installation directory was already specified with '--prefix' option + + message(STATUS "Package ${TARGET_TRIPLET}-rel") + vcpkg_execute_required_process( + COMMAND ${NINJA} install -v + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel + LOGNAME package-${TARGET_TRIPLET}-rel + ) + + message(STATUS "Package ${TARGET_TRIPLET}-dbg") + vcpkg_execute_required_process( + COMMAND ${NINJA} install -v + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg + LOGNAME package-${TARGET_TRIPLET}-dbg + ) +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_install_msbuild.cmake b/vcpkg/scripts/cmake/vcpkg_install_msbuild.cmake new file mode 100644 index 0000000..1a0d951 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_install_msbuild.cmake @@ -0,0 +1,231 @@ +## # vcpkg_install_msbuild +## +## Build and install a msbuild-based project. This replaces `vcpkg_build_msbuild()`. +## +## ## Usage +## ```cmake +## vcpkg_install_msbuild( +## SOURCE_PATH <${SOURCE_PATH}> +## PROJECT_SUBPATH +## [INCLUDES_SUBPATH ] +## [LICENSE_SUBPATH ] +## [RELEASE_CONFIGURATION ] +## [DEBUG_CONFIGURATION ] +## [TARGET ] +## [TARGET_PLATFORM_VERSION <10.0.15063.0>] +## [PLATFORM <${TRIPLET_SYSTEM_ARCH}>] +## [PLATFORM_TOOLSET <${VCPKG_PLATFORM_TOOLSET}>] +## [OPTIONS ...] +## [OPTIONS_RELEASE ...] +## [OPTIONS_DEBUG ...] +## [USE_VCPKG_INTEGRATION] +## [ALLOW_ROOT_INCLUDES | REMOVE_ROOT_INCLUDES] +## ) +## ``` +## +## ## Parameters +## ### SOURCE_PATH +## The path to the root of the source tree. +## +## Because MSBuild uses in-source builds, the source tree will be copied into a temporary location for the build. This +## parameter is the base for that copy and forms the base for all XYZ_SUBPATH options. +## +## ### USE_VCPKG_INTEGRATION +## Apply the normal `integrate install` integration for building the project. +## +## By default, projects built with this command will not automatically link libraries or have header paths set. +## +## ### PROJECT_SUBPATH +## The subpath to the solution (`.sln`) or project (`.vcxproj`) file relative to `SOURCE_PATH`. +## +## ### LICENSE_SUBPATH +## The subpath to the license file relative to `SOURCE_PATH`. +## +## ### INCLUDES_SUBPATH +## The subpath to the includes directory relative to `SOURCE_PATH`. +## +## This parameter should be a directory and should not end in a trailing slash. +## +## ### ALLOW_ROOT_INCLUDES +## Indicates that top-level include files (e.g. `include/zlib.h`) should be allowed. +## +## ### REMOVE_ROOT_INCLUDES +## Indicates that top-level include files (e.g. `include/Makefile.am`) should be removed. +## +## ### SKIP_CLEAN +## Indicates that the intermediate files should not be removed. +## +## Ports using this option should later call [`vcpkg_clean_msbuild()`](vcpkg_clean_msbuild.md) to manually clean up. +## +## ### RELEASE_CONFIGURATION +## The configuration (``/p:Configuration`` msbuild parameter) used for Release builds. +## +## ### DEBUG_CONFIGURATION +## The configuration (``/p:Configuration`` msbuild parameter) used for Debug builds. +## +## ### TARGET_PLATFORM_VERSION +## The WindowsTargetPlatformVersion (``/p:WindowsTargetPlatformVersion`` msbuild parameter) +## +## ### TARGET +## The MSBuild target to build. (``/t:``) +## +## ### PLATFORM +## The platform (``/p:Platform`` msbuild parameter) used for the build. +## +## ### PLATFORM_TOOLSET +## The platform toolset (``/p:PlatformToolset`` msbuild parameter) used for the build. +## +## ### OPTIONS +## Additional options passed to msbuild for all builds. +## +## ### OPTIONS_RELEASE +## Additional options passed to msbuild for Release builds. These are in addition to `OPTIONS`. +## +## ### OPTIONS_DEBUG +## Additional options passed to msbuild for Debug builds. These are in addition to `OPTIONS`. +## +## ## Examples +## +## * [xalan-c](https://github.com/Microsoft/vcpkg/blob/master/ports/xalan-c/portfile.cmake) +## * [libimobiledevice](https://github.com/Microsoft/vcpkg/blob/master/ports/libimobiledevice/portfile.cmake) + +include(vcpkg_clean_msbuild) + +function(vcpkg_install_msbuild) + cmake_parse_arguments( + _csc + "USE_VCPKG_INTEGRATION;ALLOW_ROOT_INCLUDES;REMOVE_ROOT_INCLUDES;SKIP_CLEAN" + "SOURCE_PATH;PROJECT_SUBPATH;INCLUDES_SUBPATH;LICENSE_SUBPATH;RELEASE_CONFIGURATION;DEBUG_CONFIGURATION;PLATFORM;PLATFORM_TOOLSET;TARGET_PLATFORM_VERSION;TARGET" + "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG" + ${ARGN} + ) + + if(NOT DEFINED _csc_RELEASE_CONFIGURATION) + set(_csc_RELEASE_CONFIGURATION Release) + endif() + if(NOT DEFINED _csc_DEBUG_CONFIGURATION) + set(_csc_DEBUG_CONFIGURATION Debug) + endif() + if(NOT DEFINED _csc_PLATFORM) + if(VCPKG_TARGET_ARCHITECTURE STREQUAL x64) + set(_csc_PLATFORM x64) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL x86) + set(_csc_PLATFORM Win32) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL ARM) + set(_csc_PLATFORM ARM) + elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL arm64) + set(_csc_PLATFORM arm64) + else() + message(FATAL_ERROR "Unsupported target architecture") + endif() + endif() + if(NOT DEFINED _csc_PLATFORM_TOOLSET) + set(_csc_PLATFORM_TOOLSET ${VCPKG_PLATFORM_TOOLSET}) + endif() + if(NOT DEFINED _csc_TARGET_PLATFORM_VERSION) + vcpkg_get_windows_sdk(_csc_TARGET_PLATFORM_VERSION) + endif() + if(NOT DEFINED _csc_TARGET) + set(_csc_TARGET Rebuild) + endif() + + list(APPEND _csc_OPTIONS + /t:${_csc_TARGET} + /p:Platform=${_csc_PLATFORM} + /p:PlatformToolset=${_csc_PLATFORM_TOOLSET} + /p:VCPkgLocalAppDataDisabled=true + /p:UseIntelMKL=No + /p:WindowsTargetPlatformVersion=${_csc_TARGET_PLATFORM_VERSION} + /p:VcpkgTriplet=${TARGET_TRIPLET} + "/p:VcpkgCurrentInstalledDir=${CURRENT_INSTALLED_DIR}" + /p:VcpkgManifestInstall=false + /m + ) + + if(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + # Disable LTCG for static libraries because this setting introduces ABI incompatibility between minor compiler versions + # TODO: Add a way for the user to override this if they want to opt-in to incompatibility + list(APPEND _csc_OPTIONS /p:WholeProgramOptimization=false) + endif() + + if(_csc_USE_VCPKG_INTEGRATION) + list(APPEND _csc_OPTIONS /p:ForceImportBeforeCppTargets=${SCRIPTS}/buildsystems/msbuild/vcpkg.targets /p:VcpkgApplocalDeps=false) + endif() + + get_filename_component(SOURCE_PATH_SUFFIX "${_csc_SOURCE_PATH}" NAME) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + message(STATUS "Building ${_csc_PROJECT_SUBPATH} for Release") + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + file(COPY ${_csc_SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel) + set(SOURCE_COPY_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/${SOURCE_PATH_SUFFIX}) + vcpkg_execute_required_process( + COMMAND msbuild ${SOURCE_COPY_PATH}/${_csc_PROJECT_SUBPATH} + /p:Configuration=${_csc_RELEASE_CONFIGURATION} + ${_csc_OPTIONS} + ${_csc_OPTIONS_RELEASE} + WORKING_DIRECTORY ${SOURCE_COPY_PATH} + LOGNAME build-${TARGET_TRIPLET}-rel + ) + file(GLOB_RECURSE LIBS ${SOURCE_COPY_PATH}/*.lib) + file(GLOB_RECURSE DLLS ${SOURCE_COPY_PATH}/*.dll) + file(GLOB_RECURSE EXES ${SOURCE_COPY_PATH}/*.exe) + if(LIBS) + file(COPY ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + endif() + if(DLLS) + file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + endif() + if(EXES) + file(COPY ${EXES} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/${PORT}) + vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT}) + endif() + endif() + + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + message(STATUS "Building ${_csc_PROJECT_SUBPATH} for Debug") + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + file(COPY ${_csc_SOURCE_PATH} DESTINATION ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) + set(SOURCE_COPY_PATH ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/${SOURCE_PATH_SUFFIX}) + vcpkg_execute_required_process( + COMMAND msbuild ${SOURCE_COPY_PATH}/${_csc_PROJECT_SUBPATH} + /p:Configuration=${_csc_DEBUG_CONFIGURATION} + ${_csc_OPTIONS} + ${_csc_OPTIONS_DEBUG} + WORKING_DIRECTORY ${SOURCE_COPY_PATH} + LOGNAME build-${TARGET_TRIPLET}-dbg + ) + file(GLOB_RECURSE LIBS ${SOURCE_COPY_PATH}/*.lib) + file(GLOB_RECURSE DLLS ${SOURCE_COPY_PATH}/*.dll) + if(LIBS) + file(COPY ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() + if(DLLS) + file(COPY ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() + endif() + + vcpkg_copy_pdbs() + + if(NOT _csc_SKIP_CLEAN) + vcpkg_clean_msbuild() + endif() + + if(DEFINED _csc_INCLUDES_SUBPATH) + file(COPY ${_csc_SOURCE_PATH}/${_csc_INCLUDES_SUBPATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/) + file(GLOB ROOT_INCLUDES LIST_DIRECTORIES false ${CURRENT_PACKAGES_DIR}/include/*) + if(ROOT_INCLUDES) + if(_csc_REMOVE_ROOT_INCLUDES) + file(REMOVE ${ROOT_INCLUDES}) + elseif(_csc_ALLOW_ROOT_INCLUDES) + else() + message(FATAL_ERROR "Top-level files were found in ${CURRENT_PACKAGES_DIR}/include; this may indicate a problem with the call to `vcpkg_install_msbuild()`.\nTo avoid conflicts with other libraries, it is recommended to not put includes into the root `include/` directory.\nPass either ALLOW_ROOT_INCLUDES or REMOVE_ROOT_INCLUDES to handle these files.\n") + endif() + endif() + endif() + + if(DEFINED _csc_LICENSE_SUBPATH) + file(INSTALL ${_csc_SOURCE_PATH}/${_csc_LICENSE_SUBPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) + endif() +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_install_nmake.cmake b/vcpkg/scripts/cmake/vcpkg_install_nmake.cmake new file mode 100644 index 0000000..a819775 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_install_nmake.cmake @@ -0,0 +1,86 @@ +## # vcpkg_install_nmake +## +## Build and install a msvc makefile project. +## +## ## Usage: +## ```cmake +## vcpkg_install_nmake( +## SOURCE_PATH <${SOURCE_PATH}> +## [NO_DEBUG] +## PROJECT_SUBPATH <${SUBPATH}> +## PROJECT_NAME <${MAKEFILE_NAME}> +## [PRERUN_SHELL <${SHELL_PATH}>] +## [PRERUN_SHELL_DEBUG <${SHELL_PATH}>] +## [PRERUN_SHELL_RELEASE <${SHELL_PATH}>] +## [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] +## [OPTIONS_RELEASE <-DOPTIMIZE=1>...] +## [OPTIONS_DEBUG <-DDEBUGGABLE=1>...] +## ``` +## +## ## Parameters +## ### SOURCE_PATH +## Specifies the directory containing the source files. +## By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. +## +## ### PROJECT_SUBPATH +## Specifies the sub directory containing the `makefile.vc`/`makefile.mak`/`makefile.msvc` or other msvc makefile. +## +## ### PROJECT_NAME +## Specifies the name of msvc makefile name. +## Default is makefile.vc +## +## ### NO_DEBUG +## This port doesn't support debug mode. +## +## ### PRERUN_SHELL +## Script that needs to be called before build +## +## ### PRERUN_SHELL_DEBUG +## Script that needs to be called before debug build +## +## ### PRERUN_SHELL_RELEASE +## Script that needs to be called before release build +## +## ### OPTIONS +## Additional options passed to generate during the generation. +## +## ### OPTIONS_RELEASE +## Additional options passed to generate during the Release generation. These are in addition to `OPTIONS`. +## +## ### OPTIONS_DEBUG +## Additional options passed to generate during the Debug generation. These are in addition to `OPTIONS`. +## +## ## Parameters: +## See [`vcpkg_build_nmake()`](vcpkg_build_nmake.md). +## +## ## Notes: +## This command transparently forwards to [`vcpkg_build_nmake()`](vcpkg_build_nmake.md), adding `ENABLE_INSTALL` +## +## ## Examples +## +## * [tcl](https://github.com/Microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake) +## * [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake) + +function(vcpkg_install_nmake) + cmake_parse_arguments(_in + "NO_DEBUG" + "SOURCE_PATH;PROJECT_SUBPATH;PROJECT_NAME" + "OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG;PRERUN_SHELL;PRERUN_SHELL_DEBUG;PRERUN_SHELL_RELEASE" + ${ARGN} + ) + + if (NOT CMAKE_HOST_WIN32) + message(FATAL_ERROR "vcpkg_install_nmake only support windows.") + endif() + + if (_in_NO_DEBUG) + set(NO_DEBUG NO_DEBUG) + endif() + + vcpkg_build_nmake(LOGFILE_ROOT ENABLE_INSTALL + ${NO_DEBUG} + SOURCE_PATH ${_in_SOURCE_PATH} PROJECT_SUBPATH ${_in_PROJECT_SUBPATH} PROJECT_NAME ${_in_PROJECT_NAME} + PRERUN_SHELL ${_in_PRERUN_SHELL} PRERUN_SHELL_DEBUG ${_in_PRERUN_SHELL_DEBUG} PRERUN_SHELL_RELEASE ${_in_PRERUN_SHELL_RELEASE} + OPTIONS ${_in_OPTIONS} OPTIONS_RELEASE ${_in_OPTIONS_RELEASE} OPTIONS_DEBUG ${_in_OPTIONS_DEBUG} + ) +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_install_qmake.cmake b/vcpkg/scripts/cmake/vcpkg_install_qmake.cmake new file mode 100644 index 0000000..571b55a --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_install_qmake.cmake @@ -0,0 +1,64 @@ +## # vcpkg_install_qmake +## +## Build and install a qmake project. +## +## ## Usage: +## ```cmake +## vcpkg_install_qmake(...) +## ``` +## +## ## Parameters: +## See [`vcpkg_build_qmake()`](vcpkg_build_qmake.md). +## +## ## Notes: +## This command transparently forwards to [`vcpkg_build_qmake()`](vcpkg_build_qmake.md). +## +## Additionally, this command will copy produced .libs/.dlls/.as/.dylibs/.sos to the appropriate +## staging directories. +## +## ## Examples +## +## * [libqglviewer](https://github.com/Microsoft/vcpkg/blob/master/ports/libqglviewer/portfile.cmake) + +function(vcpkg_install_qmake) + vcpkg_build_qmake(${ARGN}) + file(GLOB_RECURSE RELEASE_LIBS + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.a + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.so + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.so.* + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dylib + ) + file(GLOB_RECURSE RELEASE_BINS + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll + ) + file(GLOB_RECURSE DEBUG_LIBS + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.a + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.so + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.so.* + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dylib + ) + file(GLOB_RECURSE DEBUG_BINS + ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll + ) + if(NOT RELEASE_LIBS AND NOT DEBUG_LIBS) + message(FATAL_ERROR "Build did not appear to produce any libraries. If this is intended, use `vcpkg_build_qmake()` directly.") + endif() + if(RELEASE_LIBS) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib) + file(COPY ${RELEASE_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + endif() + if(DEBUG_LIBS) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib) + file(COPY ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + endif() + if(RELEASE_BINS) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin) + file(COPY ${RELEASE_BINS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin) + endif() + if(DEBUG_BINS) + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin) + file(COPY ${DEBUG_BINS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + endif() +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_prettify_command.cmake b/vcpkg/scripts/cmake/vcpkg_prettify_command.cmake new file mode 100644 index 0000000..c12332b --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_prettify_command.cmake @@ -0,0 +1,26 @@ +## # vcpkg_prettify_command +## +## Turns list of command arguments into a formatted string. +## +## ## Usage +## ```cmake +## vcpkg_prettify_command( ) +## ``` +## +## ## Examples +## +## * `scripts/cmake/vcpkg_execute_build_process.cmake` +## * `scripts/cmake/vcpkg_execute_required_process.cmake` +## * `scripts/cmake/vcpkg_execute_required_process_repeat.cmake` + +macro(vcpkg_prettify_command INPUT_VAR OUTPUT_VAR) + set(${OUTPUT_VAR} "") + foreach(v ${${INPUT_VAR}}) + if(v MATCHES "( )") + list(APPEND ${OUTPUT_VAR} "\"${v}\"") + else() + list(APPEND ${OUTPUT_VAR} "${v}") + endif() + endforeach() + list(JOIN ${OUTPUT_VAR} " " ${OUTPUT_VAR}) +endmacro() diff --git a/vcpkg/scripts/cmake/vcpkg_replace_string.cmake b/vcpkg/scripts/cmake/vcpkg_replace_string.cmake new file mode 100644 index 0000000..3eb18d0 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_replace_string.cmake @@ -0,0 +1,14 @@ +#.rst: +# .. command:: vcpkg_replace_string +# +# Replace a string in a file. +# +# :: +# vcpkg_replace_string(filename match_string replace_string) +# +# +function(vcpkg_replace_string filename match_string replace_string) + file(READ ${filename} _contents) + string(REPLACE "${match_string}" "${replace_string}" _contents "${_contents}") + file(WRITE ${filename} "${_contents}") +endfunction() diff --git a/vcpkg/scripts/cmake/vcpkg_test_cmake.cmake b/vcpkg/scripts/cmake/vcpkg_test_cmake.cmake new file mode 100644 index 0000000..eeb2786 --- /dev/null +++ b/vcpkg/scripts/cmake/vcpkg_test_cmake.cmake @@ -0,0 +1,24 @@ +## # vcpkg_test_cmake +## +## Tests a built package for CMake `find_package()` integration. +## +## ## Usage: +## ```cmake +## vcpkg_test_cmake(PACKAGE_NAME [MODULE]) +## ``` +## +## ## Parameters: +## +## ### PACKAGE_NAME +## The expected name to find with `find_package()`. +## +## ### MODULE +## Indicates that the library expects to be found via built-in CMake targets. +## +function(vcpkg_test_cmake) + # The following issues need to be addressed before re-enabling this function. + # 1. Use the actual vcpkg toolchain file. + # 2. Select a generator in the same method as vcpkg_configure_cmake() as though the PREFER_NINJA flag was always passed. + # 3. Fully emulate the toolchain file for the just-built package (just adding it to CMAKE_PREFIX_PATH is not enough). + return() +endfunction() diff --git a/vcpkg/scripts/detect_compiler/CMakeLists.txt b/vcpkg/scripts/detect_compiler/CMakeLists.txt new file mode 100644 index 0000000..da45c98 --- /dev/null +++ b/vcpkg/scripts/detect_compiler/CMakeLists.txt @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 3.10) +project(detect_compiler NONE) + +if(CMAKE_GENERATOR STREQUAL "Ninja" AND CMAKE_SYSTEM_NAME STREQUAL "Windows") + set(CMAKE_C_COMPILER_WORKS 1) + set(CMAKE_C_COMPILER_FORCED 1) + set(CMAKE_CXX_COMPILER_WORKS 1) + set(CMAKE_CXX_COMPILER_FORCED 1) +endif() + +enable_language(C) +enable_language(CXX) + +file(SHA1 "${CMAKE_CXX_COMPILER}" CXX_HASH) +file(SHA1 "${CMAKE_C_COMPILER}" C_HASH) +string(SHA1 COMPILER_HASH "${C_HASH}${CXX_HASH}") + +message("#COMPILER_HASH#${COMPILER_HASH}") +message("#COMPILER_CXX_VERSION#${CMAKE_CXX_COMPILER_VERSION}") +message("#COMPILER_CXX_ID#${CMAKE_CXX_COMPILER_ID}") diff --git a/vcpkg/scripts/detect_compiler/CONTROL b/vcpkg/scripts/detect_compiler/CONTROL new file mode 100644 index 0000000..d76f041 --- /dev/null +++ b/vcpkg/scripts/detect_compiler/CONTROL @@ -0,0 +1,3 @@ +Source: detect-compiler +Version: 0 +Description: None diff --git a/vcpkg/scripts/detect_compiler/portfile.cmake b/vcpkg/scripts/detect_compiler/portfile.cmake new file mode 100644 index 0000000..4f68fae --- /dev/null +++ b/vcpkg/scripts/detect_compiler/portfile.cmake @@ -0,0 +1,28 @@ +set(LOGS + ${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-out.log + ${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-rel-out.log + ${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-dbg-out.log + ${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-rel-err.log + ${CURRENT_BUILDTREES_DIR}/config-${TARGET_TRIPLET}-dbg-err.log +) + +foreach(LOG IN LISTS LOGS) + file(REMOVE ${LOG}) + if(EXISTS ${LOG}) + message(FATAL_ERROR "Could not remove ${LOG}") + endif() +endforeach() + +set(VCPKG_BUILD_TYPE release) + +vcpkg_configure_cmake( + SOURCE_PATH "${CMAKE_CURRENT_LIST_DIR}" + PREFER_NINJA +) + +foreach(LOG IN LISTS LOGS) + if(EXISTS ${LOG}) + file(READ "${LOG}" _contents) + message("${_contents}") + endif() +endforeach() diff --git a/vcpkg/scripts/file_script.py b/vcpkg/scripts/file_script.py new file mode 100644 index 0000000..de57f27 --- /dev/null +++ b/vcpkg/scripts/file_script.py @@ -0,0 +1,42 @@ +import os +import os.path +import sys + + +keyword = "include/" + +def getFiles(path): + files = os.listdir(path) + return list(filter(lambda x: x[0] != '.', files)) + +def gen_all_file_strings(path, files, headers, output): + for file in files: + package = file[:file.find("_")] + f = open(path + file) + for line in f: + idx = line.strip().find(keyword) + if idx >= 0 and line.strip()[-1] != "/": + headers.write(package + ":" + line[idx + len(keyword):]) + output.write(package + ":" + line[idx-1:]) + elif line.strip()[-1] != "/": + output.write(package + ":" + line[line.find("/"):]) + f.close() + +def main(path): + try: + os.mkdir("scripts/list_files") + except FileExistsError: + print("Path already exists, continuing...") + + try: + headers = open("scripts/list_files/VCPKGHeadersDatabase.txt", mode='w') + output = open("scripts/list_files/VCPKGDatabase.txt", mode='w') + gen_all_file_strings(path, getFiles(path), headers, output) + headers.close() + output.close() + except e: + print("Failed to generate file lists") + +if __name__ == "__main__": + main(sys.argv[1]) + diff --git a/vcpkg/scripts/ifw/maintenance.qs b/vcpkg/scripts/ifw/maintenance.qs new file mode 100644 index 0000000..5cdad72 --- /dev/null +++ b/vcpkg/scripts/ifw/maintenance.qs @@ -0,0 +1,46 @@ +// constructor +function Component() +{ + installer.installationStarted.connect(this, Component.prototype.onInstallationStarted); +} + +Component.prototype.onInstallationStarted = function() +{ + if (component.updateRequested() || component.installationRequested()) { + if (installer.value("os") == "win") + component.installerbaseBinaryPath = "@TargetDir@/tempmaintenancetool.exe"; + installer.setInstallerBaseBinary(component.installerbaseBinaryPath); + } +} + +Component.prototype.createOperations = function() +{ + // call the base createOperations + component.createOperations(); + + // only for windows online installer + if ( installer.value("os") == "win" && !installer.isOfflineOnly() ) + { + // shortcut to add or remove packages + component.addOperation( "CreateShortcut", + "@TargetDir@/maintenancetool.exe", + "@StartMenuDir@/Manage vcpkg.lnk", + " --manage-packages"); + // shortcut to update packages + component.addOperation( "CreateShortcut", + "@TargetDir@/maintenancetool.exe", + "@StartMenuDir@/Update vcpkg.lnk", + " --updater"); + } + + // create uninstall link only for windows + if (installer.value("os") == "win") + { + // shortcut to uninstaller + component.addOperation( "CreateShortcut", + "@TargetDir@/maintenancetool.exe", + "@StartMenuDir@/Uninstall vcpkg.lnk", + " --uninstall"); + } +} + diff --git a/vcpkg/scripts/ports.cmake b/vcpkg/scripts/ports.cmake new file mode 100644 index 0000000..5e21e3d --- /dev/null +++ b/vcpkg/scripts/ports.cmake @@ -0,0 +1,126 @@ +cmake_minimum_required(VERSION 3.5) + +macro(debug_message) + if(DEFINED PORT_DEBUG AND PORT_DEBUG) + message(STATUS "[DEBUG] ${ARGN}") + endif() +endmacro() + +if((NOT DEFINED VCPKG_ROOT_DIR) + OR (NOT DEFINED DOWNLOADS) + OR (NOT DEFINED _VCPKG_INSTALLED_DIR) + OR (NOT DEFINED PACKAGES_DIR) + OR (NOT DEFINED BUILDTREES_DIR)) + message(FATAL_ERROR [[ + Your vcpkg executable is outdated and is not compatible with the current CMake scripts. + Please re-build vcpkg by running bootstrap-vcpkg. + ]]) +endif() + +file(TO_CMAKE_PATH ${BUILDTREES_DIR} BUILDTREES_DIR) +file(TO_CMAKE_PATH ${PACKAGES_DIR} PACKAGES_DIR) + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake) +set(CURRENT_INSTALLED_DIR ${_VCPKG_INSTALLED_DIR}/${TARGET_TRIPLET} CACHE PATH "Location to install final packages") +set(SCRIPTS ${CMAKE_CURRENT_LIST_DIR} CACHE PATH "Location to stored scripts") + +if(PORT) + set(CURRENT_BUILDTREES_DIR ${BUILDTREES_DIR}/${PORT}) + set(CURRENT_PACKAGES_DIR ${PACKAGES_DIR}/${PORT}_${TARGET_TRIPLET}) +endif() + + +if(CMD MATCHES "^BUILD$") + set(CMAKE_TRIPLET_FILE ${TARGET_TRIPLET_FILE}) + if(NOT EXISTS ${CMAKE_TRIPLET_FILE}) + message(FATAL_ERROR "Unsupported target triplet. Triplet file does not exist: ${CMAKE_TRIPLET_FILE}") + endif() + + if(NOT DEFINED CURRENT_PORT_DIR) + message(FATAL_ERROR "CURRENT_PORT_DIR was not defined") + endif() + set(TO_CMAKE_PATH "${CURRENT_PORT_DIR}" CURRENT_PORT_DIR) + if(NOT EXISTS ${CURRENT_PORT_DIR}) + message(FATAL_ERROR "Cannot find port: ${PORT}\n Directory does not exist: ${CURRENT_PORT_DIR}") + endif() + if(NOT EXISTS ${CURRENT_PORT_DIR}/portfile.cmake) + message(FATAL_ERROR "Port is missing portfile: ${CURRENT_PORT_DIR}/portfile.cmake") + endif() + if(NOT EXISTS ${CURRENT_PORT_DIR}/CONTROL AND NOT EXISTS ${CURRENT_PORT_DIR}/vcpkg.json) + message(FATAL_ERROR "Port is missing control or manifest file: ${CURRENT_PORT_DIR}/{CONTROL,vcpkg.json}") + endif() + + unset(PACKAGES_DIR) + unset(BUILDTREES_DIR) + + if(EXISTS ${CURRENT_PACKAGES_DIR}) + file(GLOB FILES_IN_CURRENT_PACKAGES_DIR "${CURRENT_PACKAGES_DIR}/*") + if(FILES_IN_CURRENT_PACKAGES_DIR) + file(REMOVE_RECURSE ${FILES_IN_CURRENT_PACKAGES_DIR}) + file(GLOB FILES_IN_CURRENT_PACKAGES_DIR "${CURRENT_PACKAGES_DIR}/*") + if(FILES_IN_CURRENT_PACKAGES_DIR) + message(FATAL_ERROR "Unable to empty directory: ${CURRENT_PACKAGES_DIR}\n Files are likely in use.") + endif() + endif() + endif() + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR} ${CURRENT_PACKAGES_DIR}) + + include(${CMAKE_TRIPLET_FILE}) + + if (DEFINED VCPKG_PORT_CONFIGS) + foreach(VCPKG_PORT_CONFIG ${VCPKG_PORT_CONFIGS}) + include(${VCPKG_PORT_CONFIG}) + endforeach() + endif() + + set(TRIPLET_SYSTEM_ARCH ${VCPKG_TARGET_ARCHITECTURE}) + include(${SCRIPTS}/cmake/vcpkg_common_definitions.cmake) + include(${SCRIPTS}/cmake/vcpkg_common_functions.cmake) + include(${CURRENT_PORT_DIR}/portfile.cmake) + if(DEFINED PORT) + include(${SCRIPTS}/build_info.cmake) + endif() +elseif(CMD MATCHES "^CREATE$") + file(TO_NATIVE_PATH ${VCPKG_ROOT_DIR} NATIVE_VCPKG_ROOT_DIR) + file(TO_NATIVE_PATH ${DOWNLOADS} NATIVE_DOWNLOADS) + set(PORT_PATH "${VCPKG_ROOT_DIR}/ports/${PORT}") + file(TO_NATIVE_PATH ${PORT_PATH} NATIVE_PORT_PATH) + set(PORTFILE_PATH "${PORT_PATH}/portfile.cmake") + file(TO_NATIVE_PATH ${PORTFILE_PATH} NATIVE_PORTFILE_PATH) + set(MANIFEST_PATH "${PORT_PATH}/vcpkg.json") + file(TO_NATIVE_PATH ${MANIFEST_PATH} NATIVE_MANIFEST_PATH) + + if(EXISTS "${PORTFILE_PATH}") + message(FATAL_ERROR "Portfile already exists: '${NATIVE_PORTFILE_PATH}'") + endif() + if(NOT FILENAME) + get_filename_component(FILENAME "${URL}" NAME) + endif() + string(REGEX REPLACE "(\\.(zip|gz|tar|tgz|bz2))+\$" "" ROOT_NAME ${FILENAME}) + + set(DOWNLOAD_PATH "${DOWNLOADS}/${FILENAME}") + file(TO_NATIVE_PATH ${DOWNLOAD_PATH} NATIVE_DOWNLOAD_PATH) + + if(EXISTS "${DOWNLOAD_PATH}") + message(STATUS "Using pre-downloaded: ${NATIVE_DOWNLOAD_PATH}") + message(STATUS "If this is not desired, delete the file and ${NATIVE_PORT_PATH}") + else() + include(vcpkg_download_distfile) + set(_VCPKG_INTERNAL_NO_HASH_CHECK ON) + vcpkg_download_distfile(ARCHIVE + URLS ${URL} + FILENAME ${FILENAME} + ) + set(_VCPKG_INTERNAL_NO_HASH_CHECK OFF) + endif() + file(SHA512 ${DOWNLOAD_PATH} SHA512) + + file(MAKE_DIRECTORY ${PORT_PATH}) + configure_file(${SCRIPTS}/templates/portfile.in.cmake ${PORTFILE_PATH} @ONLY) + configure_file(${SCRIPTS}/templates/vcpkg.json.in ${MANIFEST_PATH} @ONLY) + + message(STATUS "Generated portfile: ${NATIVE_PORTFILE_PATH}") + message(STATUS "Generated manifest: ${NATIVE_MANIFEST_PATH}") + message(STATUS "To launch an editor for these new files, run") + message(STATUS " .\\vcpkg edit ${PORT}") +endif() diff --git a/vcpkg/scripts/posh-vcpkg/0.0.1/posh-vcpkg.psd1 b/vcpkg/scripts/posh-vcpkg/0.0.1/posh-vcpkg.psd1 new file mode 100644 index 0000000..3fb94fe --- /dev/null +++ b/vcpkg/scripts/posh-vcpkg/0.0.1/posh-vcpkg.psd1 @@ -0,0 +1,31 @@ +@{ + +# Script module or binary module file associated with this manifest. +ModuleToProcess = 'posh-vcpkg.psm1' + +# Version number of this module. +ModuleVersion = '0.0.1' + +# ID used to uniquely identify this module +GUID = '948f02ab-fc99-4a53-8335-b6556eef129b' + +# Minimum version of the Windows PowerShell engine required by this module +PowerShellVersion = '5.0' + +FunctionsToExport = @('TabExpansion') +CmdletsToExport = @() +VariablesToExport = @() +AliasesToExport = @() + +# Private data to pass to the module specified in RootModule/ModuleToProcess. +# This may also contain a PSData hashtable with additional module metadata used by PowerShell. +PrivateData = +@{ + PSData = + @{ + # Tags applied to this module. These help with module discovery in online galleries. + Tags = @('vcpkg', 'tab', 'tab-completion', 'tab-expansion', 'tabexpansion') + } +} + +} diff --git a/vcpkg/scripts/posh-vcpkg/0.0.1/posh-vcpkg.psm1 b/vcpkg/scripts/posh-vcpkg/0.0.1/posh-vcpkg.psm1 new file mode 100644 index 0000000..25ef996 --- /dev/null +++ b/vcpkg/scripts/posh-vcpkg/0.0.1/posh-vcpkg.psm1 @@ -0,0 +1,39 @@ +param() + +if (Get-Module posh-vcpkg) { return } + +if ($PSVersionTable.PSVersion.Major -lt 5) { + Write-Warning ("posh-vcpkg does not support PowerShell versions before 5.0.") + return +} + +if (Test-Path Function:\TabExpansion) { + Rename-Item Function:\TabExpansion VcpkgTabExpansionBackup +} + +function TabExpansion($line, $lastWord) { + $lastBlock = [regex]::Split($line, '[|;]')[-1].TrimStart() + + switch -regex ($lastBlock) { + "^(?(\./|\.\\|)vcpkg(\.exe|)) (?.*)$" + { + & $matches['vcpkgexe'] autocomplete $matches['remaining'] + return + } + + # Fall back on existing tab expansion + default { + if (Test-Path Function:\VcpkgTabExpansionBackup) { + VcpkgTabExpansionBackup $line $lastWord + } + } + } +} + +$exportModuleMemberParams = @{ + Function = @( + 'TabExpansion' + ) +} + +Export-ModuleMember @exportModuleMemberParams diff --git a/vcpkg/scripts/templates/portfile.in.cmake b/vcpkg/scripts/templates/portfile.in.cmake new file mode 100644 index 0000000..7ddf662 --- /dev/null +++ b/vcpkg/scripts/templates/portfile.in.cmake @@ -0,0 +1,80 @@ +# 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_INSTALLED_DIR = ${VCPKG_ROOT_DIR}\installed\${TRIPLET} +# DOWNLOADS = ${VCPKG_ROOT_DIR}\downloads +# 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) +# VCPKG_TOOLCHAIN = ON OFF +# TRIPLET_SYSTEM_ARCH = arm x86 x64 +# BUILD_ARCH = "Win32" "x64" "ARM" +# MSBUILD_PLATFORM = "Win32"/"x64"/${TRIPLET_SYSTEM_ARCH} +# DEBUG_CONFIG = "Debug Static" "Debug Dll" +# RELEASE_CONFIG = "Release Static"" "Release DLL" +# VCPKG_TARGET_IS_WINDOWS +# VCPKG_TARGET_IS_UWP +# VCPKG_TARGET_IS_LINUX +# VCPKG_TARGET_IS_OSX +# VCPKG_TARGET_IS_FREEBSD +# VCPKG_TARGET_IS_ANDROID +# VCPKG_TARGET_IS_MINGW +# VCPKG_TARGET_EXECUTABLE_SUFFIX +# VCPKG_TARGET_STATIC_LIBRARY_SUFFIX +# VCPKG_TARGET_SHARED_LIBRARY_SUFFIX +# +# See additional helpful variables in /docs/maintainers/vcpkg_common_definitions.md + +# # Specifies if the port install should fail immediately given a condition +# vcpkg_fail_port_install(MESSAGE "@PORT@ currently only supports Linux and Mac platforms" ON_TARGET "Windows") + +vcpkg_download_distfile(ARCHIVE + URLS "@URL@" + FILENAME "@FILENAME@" + SHA512 @SHA512@ +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + # (Optional) A friendly name to use instead of the filename of the archive (e.g.: a version number or tag). + # REF 1.0.0 + # (Optional) Read the docs for how to generate patches at: + # https://github.com/Microsoft/vcpkg/blob/master/docs/examples/patching.md + # PATCHES + # 001_port_fixes.patch + # 002_more_port_fixes.patch +) + +# # Check if one or more features are a part of a package installation. +# # See /docs/maintainers/vcpkg_check_features.md for more details +# vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS +# FEATURES # <- Keyword FEATURES is required because INVERTED_FEATURES are being used +# tbb WITH_TBB +# INVERTED_FEATURES +# tbb ROCKSDB_IGNORE_PACKAGE_TBB +# ) + +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() + +# # Moves all .cmake files from /debug/share/@PORT@/ to /share/@PORT@/ +# # See /docs/maintainers/vcpkg_fixup_cmake_targets.md for more details +# vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/@PORT@) + +# # Handle copyright +# file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/@PORT@ RENAME copyright) + +# # Post-build test for cmake libraries +# vcpkg_test_cmake(PACKAGE_NAME @PORT@) diff --git a/vcpkg/scripts/templates/vcpkg.json.in b/vcpkg/scripts/templates/vcpkg.json.in new file mode 100644 index 0000000..2e21738 --- /dev/null +++ b/vcpkg/scripts/templates/vcpkg.json.in @@ -0,0 +1,16 @@ +{ + "name": "@PORT@", + "version-string": "", + "homepage": "", + "description": "", + "dependencies": [], + + "default-features": [], + "features": [ + { + "name": "", + "description": "", + "dependencies": [] + } + ] +} diff --git a/vcpkg/scripts/test_ports/cmake/CONTROL b/vcpkg/scripts/test_ports/cmake/CONTROL new file mode 100644 index 0000000..8eb6a66 --- /dev/null +++ b/vcpkg/scripts/test_ports/cmake/CONTROL @@ -0,0 +1,5 @@ +Source: cmake +Version: 3.18.1 +Build-Depends: qt5-base, qt5-winextras (windows), bzip2, expat, jsoncpp, liblzma, zlib, zstd, libarchive, curl, libuv, nghttp2 +Homepage: https://cmake.org/ +Description: CMake is an open-source, cross-platform family of tools designed to build, test and package software. diff --git a/vcpkg/scripts/test_ports/cmake/portfile.cmake b/vcpkg/scripts/test_ports/cmake/portfile.cmake new file mode 100644 index 0000000..932e1fe --- /dev/null +++ b/vcpkg/scripts/test_ports/cmake/portfile.cmake @@ -0,0 +1,55 @@ +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) +vcpkg_from_gitlab( + GITLAB_URL https://gitlab.kitware.com/ + OUT_SOURCE_PATH SOURCE_PATH + REPO cmake/cmake + REF + 63a65baf4c343c73b2142078ef0045d3711dea1d + SHA512 + 7874b26adb739649ea3a8c2d8701b44ea348d5d6387e0e2a3dd87494dfeae62084593f88f46d53a161ac24c46a7712489621213b61315593df4dc2ccc728084b + HEAD_REF master +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA + OPTIONS + -DBUILD_TESTING=OFF + #-DCMAKE_USE_SYSTEM_LIBRARIES=ON + -DCMAKE_USE_SYSTEM_LIBARCHIVE=ON + -DCMAKE_USE_SYSTEM_CURL=ON + -DCMAKE_USE_SYSTEM_EXPAT=OFF # CMake is not compatible with expat 2.2.9 + -DCMAKE_USE_SYSTEM_ZLIB=ON + -DCMAKE_USE_SYSTEM_BZIP2=ON + -DCMAKE_USE_SYSTEM_ZSTD=ON + -DCMAKE_USE_SYSTEM_FORM=ON + -DCMAKE_USE_SYSTEM_JSONCPP=ON + -DCMAKE_USE_SYSTEM_LIBRHASH=OFF # not yet in VCPKG + -DCMAKE_USE_SYSTEM_LIBUV=ON + -DBUILD_QtDialog=ON # Just to test Qt with CMake +) + +vcpkg_install_cmake(ADD_BIN_TO_PATH) +vcpkg_copy_pdbs() + +if(NOT VCPKG_TARGET_IS_OSX) + set(_tools cmake cmake-gui ctest cpack) + if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND _tools cmcldeps) + endif() + vcpkg_copy_tools(TOOL_NAMES ${_tools} AUTO_CLEAN) +else() + # On OSX everything is within a CMake.app folder + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools) + file(RENAME "${CURRENT_PACKAGES_DIR}/CMake.app" "${CURRENT_PACKAGES_DIR}/tools/CMake.app") + if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/CMake.app") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/tools/debug) + file(RENAME "${CURRENT_PACKAGES_DIR}/debug/CMake.app" "${CURRENT_PACKAGES_DIR}/tools/debug/CMake.app") + endif() +endif() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +configure_file(${SOURCE_PATH}/Copyright.txt ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY) diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-paraview/CONTROL b/vcpkg/scripts/test_ports/vcpkg-ci-paraview/CONTROL new file mode 100644 index 0000000..d4816db --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-paraview/CONTROL @@ -0,0 +1,6 @@ +Source: vcpkg-ci-paraview +Version: 1 +Port-Version: 1 +Homepage: https://github.com/microsoft/vcpkg +Description: Port to force features of certain ports within CI +Build-Depends: paraview[vtkm, tools] diff --git a/vcpkg/scripts/test_ports/vcpkg-ci-paraview/portfile.cmake b/vcpkg/scripts/test_ports/vcpkg-ci-paraview/portfile.cmake new file mode 100644 index 0000000..0015715 --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-ci-paraview/portfile.cmake @@ -0,0 +1 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) \ No newline at end of file diff --git a/vcpkg/scripts/test_ports/vcpkg-find-acquire-program/CONTROL b/vcpkg/scripts/test_ports/vcpkg-find-acquire-program/CONTROL new file mode 100644 index 0000000..6f248be --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-find-acquire-program/CONTROL @@ -0,0 +1,4 @@ +Source: vcpkg-find-acquire-program +Version: 0 +Description: Test port to exercise vcpkg_find_acquire_program +Supports: windows diff --git a/vcpkg/scripts/test_ports/vcpkg-find-acquire-program/portfile.cmake b/vcpkg/scripts/test_ports/vcpkg-find-acquire-program/portfile.cmake new file mode 100644 index 0000000..88a4856 --- /dev/null +++ b/vcpkg/scripts/test_ports/vcpkg-find-acquire-program/portfile.cmake @@ -0,0 +1,21 @@ +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) + +if(CMAKE_HOST_WIN32) + foreach(PROG GO JOM NASM PERL YASM GIT PYTHON3 PYTHON2 RUBY 7Z NUGET FLEX BISON GPERF GASPREPROCESSOR DARK SCONS SWIG DOXYGEN ARIA2 PKGCONFIG) + vcpkg_find_acquire_program(${PROG}) + foreach(SUBPROG IN LISTS ${PROG}) + if(NOT EXISTS "${SUBPROG}") + message(FATAL_ERROR "Program ${SUBPROG} did not exist.") + endif() + endforeach() + endforeach() +endif() + +foreach(PROG GN NINJA MESON BAZEL) + vcpkg_find_acquire_program(${PROG}) + foreach(SUBPROG IN LISTS ${PROG}) + if(NOT EXISTS "${SUBPROG}") + message(FATAL_ERROR "Program ${SUBPROG} did not exist.") + endif() + endforeach() +endforeach() diff --git a/vcpkg/scripts/testing/integrate-install/NoProps.vcxproj b/vcpkg/scripts/testing/integrate-install/NoProps.vcxproj new file mode 100644 index 0000000..5b75d09 --- /dev/null +++ b/vcpkg/scripts/testing/integrate-install/NoProps.vcxproj @@ -0,0 +1,145 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + {5AFB7AF5-D8FC-4A86-B0D2-3BBD039ED03A} + Project1 + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + \ No newline at end of file diff --git a/vcpkg/scripts/testing/integrate-install/Project1.vcxproj b/vcpkg/scripts/testing/integrate-install/Project1.vcxproj new file mode 100644 index 0000000..a8896fe --- /dev/null +++ b/vcpkg/scripts/testing/integrate-install/Project1.vcxproj @@ -0,0 +1,146 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + {5AFB7AF5-D8FC-4A86-B0D2-3BBD039ED03A} + Project1 + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + \ No newline at end of file diff --git a/vcpkg/scripts/testing/integrate-install/Source.cpp b/vcpkg/scripts/testing/integrate-install/Source.cpp new file mode 100644 index 0000000..24a84e4 --- /dev/null +++ b/vcpkg/scripts/testing/integrate-install/Source.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + zlibVersion(); + return 0; +} \ No newline at end of file diff --git a/vcpkg/scripts/testing/integrate-install/VcpkgTriplet.vcxproj b/vcpkg/scripts/testing/integrate-install/VcpkgTriplet.vcxproj new file mode 100644 index 0000000..883fc8e --- /dev/null +++ b/vcpkg/scripts/testing/integrate-install/VcpkgTriplet.vcxproj @@ -0,0 +1,151 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + {5AFB7AF5-D8FC-4A86-B0D2-3BBD039ED03A} + VcpkgUseStatic + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + x86-windows-static + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + + + Console + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + + + Console + true + true + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + \ No newline at end of file diff --git a/vcpkg/scripts/testing/integrate-install/VcpkgTriplet2.vcxproj b/vcpkg/scripts/testing/integrate-install/VcpkgTriplet2.vcxproj new file mode 100644 index 0000000..d3352e1 --- /dev/null +++ b/vcpkg/scripts/testing/integrate-install/VcpkgTriplet2.vcxproj @@ -0,0 +1,149 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + {5AFB7AF5-D8FC-4A86-B0D2-3BBD039ED03A} + VcpkgUseStatic + 10.0 + x86-windows-static + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + + + Console + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + + + Console + true + true + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + \ No newline at end of file diff --git a/vcpkg/scripts/testing/integrate-install/VcpkgUseStatic.vcxproj b/vcpkg/scripts/testing/integrate-install/VcpkgUseStatic.vcxproj new file mode 100644 index 0000000..28c4fc7 --- /dev/null +++ b/vcpkg/scripts/testing/integrate-install/VcpkgUseStatic.vcxproj @@ -0,0 +1,151 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + {5AFB7AF5-D8FC-4A86-B0D2-3BBD039ED03A} + VcpkgUseStatic + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + true + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + + + Console + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + + + Console + true + true + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + \ No newline at end of file diff --git a/vcpkg/scripts/testing/integrate-install/VcpkgUseStatic2.vcxproj b/vcpkg/scripts/testing/integrate-install/VcpkgUseStatic2.vcxproj new file mode 100644 index 0000000..98beaee --- /dev/null +++ b/vcpkg/scripts/testing/integrate-install/VcpkgUseStatic2.vcxproj @@ -0,0 +1,149 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + {5AFB7AF5-D8FC-4A86-B0D2-3BBD039ED03A} + VcpkgUseStatic + 10.0 + true + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreadedDebug + + + Console + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + MultiThreaded + + + Console + true + true + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + + + \ No newline at end of file diff --git a/vcpkg/scripts/toolchains/android.cmake b/vcpkg/scripts/toolchains/android.cmake new file mode 100644 index 0000000..6f6c985 --- /dev/null +++ b/vcpkg/scripts/toolchains/android.cmake @@ -0,0 +1,60 @@ + +set(ANDROID_CPP_FEATURES "rtti exceptions" CACHE STRING "") +set(CMAKE_SYSTEM_NAME Android CACHE STRING "") +set(ANDROID_TOOLCHAIN clang CACHE STRING "") +set(ANDROID_NATIVE_API_LEVEL 21 CACHE STRING "") +set(CMAKE_ANDROID_NDK_TOOLCHAIN_VERSION clang CACHE STRING "") + +if (VCPKG_TARGET_TRIPLET MATCHES "^arm64-android") + set(ANDROID_ABI arm64-v8a CACHE STRING "") +elseif(VCPKG_TARGET_TRIPLET MATCHES "^arm-android") + set(ANDROID_ABI armeabi-v7a CACHE STRING "") +elseif(VCPKG_TARGET_TRIPLET MATCHES "^x64-android") + set(ANDROID_ABI x86_64 CACHE STRING "") +elseif(VCPKG_TARGET_TRIPLET MATCHES "^x86-android") + set(ANDROID_ABI x86 CACHE STRING "") +else() + message(FATAL_ERROR "Unknown ABI for target triplet ${VCPKG_TARGET_TRIPLET}") +endif() + +if (VCPKG_CRT_LINKAGE STREQUAL "dynamic") + set(ANDROID_STL c++_shared CACHE STRING "") +else() + set(ANDROID_STL c++_static CACHE STRING "") +endif() + +if(DEFINED ENV{ANDROID_NDK_HOME}) + set(ANDROID_NDK_HOME $ENV{ANDROID_NDK_HOME}) +else() + set(ANDROID_NDK_HOME "$ENV{ProgramData}/Microsoft/AndroidNDK64/android-ndk-r13b/") + if(NOT EXISTS "${ANDROID_NDK_HOME}") + # Use Xamarin default installation folder + set(ANDROID_NDK_HOME "$ENV{ProgramFiles\(x86\)}/Android/android-sdk/ndk-bundle") + endif() +endif() + +if(NOT EXISTS "${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake") + message(FATAL_ERROR "Could not find android ndk. Searched at ${ANDROID_NDK_HOME}") +endif() + +include("${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake") + +if(NOT _VCPKG_ANDROID_TOOLCHAIN) +set(_VCPKG_ANDROID_TOOLCHAIN 1) +get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) +if(NOT _CMAKE_IN_TRY_COMPILE) + string(APPEND CMAKE_C_FLAGS " -fPIC ${VCPKG_C_FLAGS} ") + string(APPEND CMAKE_CXX_FLAGS " -fPIC ${VCPKG_CXX_FLAGS} ") + string(APPEND CMAKE_C_FLAGS_DEBUG " ${VCPKG_C_FLAGS_DEBUG} ") + string(APPEND CMAKE_CXX_FLAGS_DEBUG " ${VCPKG_CXX_FLAGS_DEBUG} ") + string(APPEND CMAKE_C_FLAGS_RELEASE " ${VCPKG_C_FLAGS_RELEASE} ") + string(APPEND CMAKE_CXX_FLAGS_RELEASE " ${VCPKG_CXX_FLAGS_RELEASE} ") + + string(APPEND CMAKE_SHARED_LINKER_FLAGS " ${VCPKG_LINKER_FLAGS} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS " ${VCPKG_LINKER_FLAGS} ") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_DEBUG " ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG " ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_RELEASE " ${VCPKG_LINKER_FLAGS_RELEASE} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_RELEASE " ${VCPKG_LINKER_FLAGS_RELEASE} ") +endif() +endif() diff --git a/vcpkg/scripts/toolchains/freebsd.cmake b/vcpkg/scripts/toolchains/freebsd.cmake new file mode 100644 index 0000000..4b1cc3e --- /dev/null +++ b/vcpkg/scripts/toolchains/freebsd.cmake @@ -0,0 +1,24 @@ +if(NOT _VCPKG_FREEBSD_TOOLCHAIN) +set(_VCPKG_FREEBSD_TOOLCHAIN 1) +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD") + set(CMAKE_CROSSCOMPILING OFF CACHE BOOL "") +endif() +set(CMAKE_SYSTEM_NAME FreeBSD CACHE STRING "") + +get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) +if(NOT _CMAKE_IN_TRY_COMPILE) + string(APPEND CMAKE_C_FLAGS_INIT " -fPIC ${VCPKG_C_FLAGS} ") + string(APPEND CMAKE_CXX_FLAGS_INIT " -fPIC ${VCPKG_CXX_FLAGS} ") + string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " ${VCPKG_C_FLAGS_DEBUG} ") + string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " ${VCPKG_CXX_FLAGS_DEBUG} ") + string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " ${VCPKG_C_FLAGS_RELEASE} ") + string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " ${VCPKG_CXX_FLAGS_RELEASE} ") + + string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT " ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT " ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT " ${VCPKG_LINKER_FLAGS_RELEASE} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT " ${VCPKG_LINKER_FLAGS_RELEASE} ") +endif() +endif() diff --git a/vcpkg/scripts/toolchains/ios.cmake b/vcpkg/scripts/toolchains/ios.cmake new file mode 100644 index 0000000..f173662 --- /dev/null +++ b/vcpkg/scripts/toolchains/ios.cmake @@ -0,0 +1,60 @@ +if(NOT _VCPKG_IOS_TOOLCHAIN) + set(_VCPKG_IOS_TOOLCHAIN 1) + + # Set the CMAKE_SYSTEM_NAME for try_compile calls. + set(CMAKE_SYSTEM_NAME iOS CACHE STRING "") + + macro(_vcpkg_setup_ios_arch arch) + unset(_vcpkg_ios_system_processor) + unset(_vcpkg_ios_sysroot) + unset(_vcpkg_ios_target_architecture) + + if ("${arch}" STREQUAL "arm64") + set(_vcpkg_ios_system_processor "aarch64") + set(_vcpkg_ios_target_architecture "arm64") + elseif("${arch}" STREQUAL "arm") + set(_vcpkg_ios_system_processor "arm") + set(_vcpkg_ios_target_architecture "armv7") + elseif("${arch}" STREQUAL "x64") + set(_vcpkg_ios_system_processor "x86_64") + set(_vcpkg_ios_sysroot "iphonesimulator") + set(_vcpkg_ios_target_architecture "x86_64") + elseif("${arch}" STREQUAL "x86") + set(_vcpkg_ios_system_processor "i386") + set(_vcpkg_ios_sysroot "iphonesimulator") + set(_vcpkg_ios_target_architecture "i386") + else() + message(FATAL_ERROR + "Unknown VCPKG_TARGET_ARCHITECTURE value provided for triplet ${VCPKG_TARGET_TRIPLET}: ${arch}") + endif() + endmacro() + + _vcpkg_setup_ios_arch("${VCPKG_TARGET_ARCHITECTURE}") + if(_vcpkg_ios_system_processor AND NOT CMAKE_SYSTEM_PROCESSOR) + set(CMAKE_SYSTEM_PROCESSOR ${_vcpkg_ios_system_processor}) + endif() + + # If VCPKG_OSX_ARCHITECTURES or VCPKG_OSX_SYSROOT is set in the triplet, they will take priority, + # so the following will be no-ops. + set(CMAKE_OSX_ARCHITECTURES "${_vcpkg_ios_target_architecture}" CACHE STRING "Build architectures for iOS") + if(_vcpkg_ios_sysroot) + set(CMAKE_OSX_SYSROOT ${_vcpkg_ios_sysroot} CACHE STRING "iOS sysroot") + endif() + + get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) + if(NOT _CMAKE_IN_TRY_COMPILE) + string(APPEND CMAKE_C_FLAGS_INIT " -fPIC ${VCPKG_C_FLAGS} ") + string(APPEND CMAKE_CXX_FLAGS_INIT " -fPIC ${VCPKG_CXX_FLAGS} ") + string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " ${VCPKG_C_FLAGS_DEBUG} ") + string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " ${VCPKG_CXX_FLAGS_DEBUG} ") + string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " ${VCPKG_C_FLAGS_RELEASE} ") + string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " ${VCPKG_CXX_FLAGS_RELEASE} ") + + string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT " ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT " ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT " ${VCPKG_LINKER_FLAGS_RELEASE} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT " ${VCPKG_LINKER_FLAGS_RELEASE} ") + endif() +endif() diff --git a/vcpkg/scripts/toolchains/linux.cmake b/vcpkg/scripts/toolchains/linux.cmake new file mode 100644 index 0000000..f0fd6df --- /dev/null +++ b/vcpkg/scripts/toolchains/linux.cmake @@ -0,0 +1,35 @@ +if(NOT _VCPKG_LINUX_TOOLCHAIN) +set(_VCPKG_LINUX_TOOLCHAIN 1) +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux") + set(CMAKE_CROSSCOMPILING OFF CACHE BOOL "") +endif() +set(CMAKE_SYSTEM_NAME Linux CACHE STRING "") +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(CMAKE_SYSTEM_PROCESSOR x86_64 CACHE STRING "") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(CMAKE_SYSTEM_PROCESSOR x86 CACHE STRING "") + string(APPEND VCPKG_C_FLAGS " -m32") + string(APPEND VCPKG_CXX_FLAGS " -m32") +endif() + +get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) +if(NOT _CMAKE_IN_TRY_COMPILE) + string(APPEND CMAKE_C_FLAGS_INIT " -fPIC ${VCPKG_C_FLAGS} ") + string(APPEND CMAKE_CXX_FLAGS_INIT " -fPIC ${VCPKG_CXX_FLAGS} ") + string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " ${VCPKG_C_FLAGS_DEBUG} ") + string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " ${VCPKG_CXX_FLAGS_DEBUG} ") + string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " ${VCPKG_C_FLAGS_RELEASE} ") + string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " ${VCPKG_CXX_FLAGS_RELEASE} ") + + string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") + if(VCPKG_CRT_LINKAGE STREQUAL "static") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT "-static ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT "-static ") + endif() + string(APPEND CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT " ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT " ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT " ${VCPKG_LINKER_FLAGS_RELEASE} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT " ${VCPKG_LINKER_FLAGS_RELEASE} ") +endif() +endif() diff --git a/vcpkg/scripts/toolchains/mingw.cmake b/vcpkg/scripts/toolchains/mingw.cmake new file mode 100644 index 0000000..e61527d --- /dev/null +++ b/vcpkg/scripts/toolchains/mingw.cmake @@ -0,0 +1,44 @@ +if(NOT _VCPKG_MINGW_TOOLCHAIN) +set(_VCPKG_MINGW_TOOLCHAIN 1) +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") + set(CMAKE_CROSSCOMPILING OFF CACHE BOOL "") +endif() + +# Need to override MinGW from VCPKG_CMAKE_SYSTEM_NAME +set(CMAKE_SYSTEM_NAME Windows CACHE STRING "" FORCE) + +if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set(CMAKE_SYSTEM_PROCESSOR i686 CACHE STRING "") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + set(CMAKE_SYSTEM_PROCESSOR x86_64 CACHE STRING "") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set(CMAKE_SYSTEM_PROCESSOR armv7 CACHE STRING "") +elseif(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set(CMAKE_SYSTEM_PROCESSOR aarch64 CACHE STRING "") +endif() + +foreach(lang C CXX) + set(CMAKE_${lang}_COMPILER_TARGET "${CMAKE_SYSTEM_PROCESSOR}-windows-gnu" CACHE STRING "") +endforeach() + +get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) +if(NOT _CMAKE_IN_TRY_COMPILE) + string(APPEND CMAKE_C_FLAGS_INIT " ${VCPKG_C_FLAGS} ") + string(APPEND CMAKE_CXX_FLAGS_INIT " ${VCPKG_CXX_FLAGS} ") + string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " ${VCPKG_C_FLAGS_DEBUG} ") + string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " ${VCPKG_CXX_FLAGS_DEBUG} ") + string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " ${VCPKG_C_FLAGS_RELEASE} ") + string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " ${VCPKG_CXX_FLAGS_RELEASE} ") + + string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") + if(VCPKG_CRT_LINKAGE STREQUAL "static") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT "-static ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT "-static ") + endif() + string(APPEND CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT " ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT " ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT " ${VCPKG_LINKER_FLAGS_RELEASE} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT " ${VCPKG_LINKER_FLAGS_RELEASE} ") +endif() +endif() diff --git a/vcpkg/scripts/toolchains/osx.cmake b/vcpkg/scripts/toolchains/osx.cmake new file mode 100644 index 0000000..1ab3da5 --- /dev/null +++ b/vcpkg/scripts/toolchains/osx.cmake @@ -0,0 +1,32 @@ +if(NOT _VCPKG_OSX_TOOLCHAIN) +set(_VCPKG_OSX_TOOLCHAIN 1) +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") + set(CMAKE_CROSSCOMPILING OFF CACHE BOOL "") + + set(CMAKE_SYSTEM_VERSION "${CMAKE_HOST_SYSTEM_VERSION}" CACHE STRING "") + set(CMAKE_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}" CACHE STRING "") +else() + set(CMAKE_SYSTEM_VERSION "17.0.0" CACHE STRING "") + set(CMAKE_SYSTEM_PROCESSOR "x86_64" CACHE STRING "") +endif() +set(CMAKE_SYSTEM_NAME Darwin CACHE STRING "") + +set(CMAKE_MACOSX_RPATH ON CACHE BOOL "") + +get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) +if(NOT _CMAKE_IN_TRY_COMPILE) + string(APPEND CMAKE_C_FLAGS_INIT " -fPIC ${VCPKG_C_FLAGS} ") + string(APPEND CMAKE_CXX_FLAGS_INIT " -fPIC ${VCPKG_CXX_FLAGS} ") + string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " ${VCPKG_C_FLAGS_DEBUG} ") + string(APPEND CMAKE_CXX_FLAGS_DEBUG_INIT " ${VCPKG_CXX_FLAGS_DEBUG} ") + string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " ${VCPKG_C_FLAGS_RELEASE} ") + string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " ${VCPKG_CXX_FLAGS_RELEASE} ") + + string(APPEND CMAKE_SHARED_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_INIT " ${VCPKG_LINKER_FLAGS} ") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT " ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT " ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT " ${VCPKG_LINKER_FLAGS_RELEASE} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT " ${VCPKG_LINKER_FLAGS_RELEASE} ") +endif() +endif() diff --git a/vcpkg/scripts/toolchains/windows.cmake b/vcpkg/scripts/toolchains/windows.cmake new file mode 100644 index 0000000..954f955 --- /dev/null +++ b/vcpkg/scripts/toolchains/windows.cmake @@ -0,0 +1,41 @@ +if(NOT _VCPKG_WINDOWS_TOOLCHAIN) +set(_VCPKG_WINDOWS_TOOLCHAIN 1) +set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>$<$:DLL>" CACHE STRING "") + +get_property( _CMAKE_IN_TRY_COMPILE GLOBAL PROPERTY IN_TRY_COMPILE ) +if(NOT _CMAKE_IN_TRY_COMPILE) + + if(VCPKG_CRT_LINKAGE STREQUAL "dynamic") + set(VCPKG_CRT_LINK_FLAG_PREFIX "/MD") + elseif(VCPKG_CRT_LINKAGE STREQUAL "static") + set(VCPKG_CRT_LINK_FLAG_PREFIX "/MT") + else() + message(FATAL_ERROR "Invalid setting for VCPKG_CRT_LINKAGE: \"${VCPKG_CRT_LINKAGE}\". It must be \"static\" or \"dynamic\"") + endif() + + set(CHARSET_FLAG "/utf-8") + if (NOT VCPKG_SET_CHARSET_FLAG OR VCPKG_PLATFORM_TOOLSET MATCHES "v120") + # VS 2013 does not support /utf-8 + set(CHARSET_FLAG) + endif() + + set(CMAKE_CXX_FLAGS " /nologo /DWIN32 /D_WINDOWS /W3 ${CHARSET_FLAG} /GR /EHsc /MP ${VCPKG_CXX_FLAGS}" CACHE STRING "") + set(CMAKE_C_FLAGS " /nologo /DWIN32 /D_WINDOWS /W3 ${CHARSET_FLAG} /MP ${VCPKG_C_FLAGS}" CACHE STRING "") + set(CMAKE_RC_FLAGS "-c65001 /DWIN32" CACHE STRING "") + + unset(CHARSET_FLAG) + + set(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG ${VCPKG_CRT_LINK_FLAG_PREFIX}d /Z7 /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}" CACHE STRING "") + set(CMAKE_C_FLAGS_DEBUG "/D_DEBUG ${VCPKG_CRT_LINK_FLAG_PREFIX}d /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" CACHE STRING "") + set(CMAKE_CXX_FLAGS_RELEASE "${VCPKG_CRT_LINK_FLAG_PREFIX} /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}" CACHE STRING "") + set(CMAKE_C_FLAGS_RELEASE "${VCPKG_CRT_LINK_FLAG_PREFIX} /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}" CACHE STRING "") + + string(APPEND CMAKE_STATIC_LINKER_FLAGS_RELEASE_INIT " /nologo ") + set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "/nologo /DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS} ${VCPKG_LINKER_FLAGS_RELEASE}" CACHE STRING "") + set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/nologo /DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS} ${VCPKG_LINKER_FLAGS_RELEASE}" CACHE STRING "") + + string(APPEND CMAKE_STATIC_LINKER_FLAGS_DEBUG_INIT " /nologo ") + string(APPEND CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT " /nologo ${VCPKG_LINKER_FLAGS} ${VCPKG_LINKER_FLAGS_DEBUG} ") + string(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT " /nologo ${VCPKG_LINKER_FLAGS} ${VCPKG_LINKER_FLAGS_DEBUG} ") +endif() +endif() diff --git a/vcpkg/scripts/vcpkg.schema.json b/vcpkg/scripts/vcpkg.schema.json new file mode 100644 index 0000000..ae20ad6 --- /dev/null +++ b/vcpkg/scripts/vcpkg.schema.json @@ -0,0 +1,206 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json", + "title": "Vcpkg manifest", + "description": "Vcpkg manifest file. See https://github.com/microsoft/vcpkg/blob/master/docs/specifications/manifests.md.", + "definitions": { + "identifier": { + "description": "Identifiers used for feature names.", + "allOf": [ + { + "description": "Identifier are lowercase with digits and dashes.", + "type": "string", + "pattern": "[a-z0-9]+(-[a-z0-9]+)*" + }, + { + "not": { + "description": "Identifiers must not be a Windows filesystem or vcpkg reserved name.", + "type": "string", + "pattern": "^prn|aux|nul|con|lpt[1-9]|com[1-9]|core|default$" + } + } + ] + }, + "package-name": { + "description": "Name of a package.", + "allOf": [ + { + "description": "Package name must be a dot-separated list of valid identifiers", + "type": "string", + "pattern": "^[a-z0-9]+(-[a-z0-9]+)*(\\.[a-z0-9]+(-[a-z0-9]+)*)*$" + }, + { + "not": { + "description": "Identifiers must not be a Windows filesystem or vcpkg reserved name.", + "type": "string", + "pattern": "(^|\\.)(prn|aux|nul|con|lpt[1-9]|com[1-9]|core|default)(\\.|$)" + } + } + ] + }, + "description-field": { + "description": "A string or array of strings containing the description of a package or feature.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "dependency-object": { + "description": "Expanded form of a dependency with explicit features and platform.", + "type": "object", + "properties": { + "name": { + "$ref": "#/definitions/package-name" + }, + "features": { + "type": "array", + "items": { + "$ref": "#/definitions/identifier" + } + }, + "default-features": { + "type": "boolean", + "default": true + }, + "platform": { + "$ref": "#/definitions/platform-expression" + } + }, + "patternProperties": { + "^\\$": {} + }, + "required": [ + "name" + ], + "additionalProperties": false + }, + "dependency": { + "description": "A dependency fetchable by Vcpkg.", + "oneOf": [ + { + "$ref": "#/definitions/package-name" + }, + { + "$ref": "#/definitions/dependency-object" + } + ] + }, + "platform-expression": { + "description": "A specification of a set of platforms. See https://github.com/microsoft/vcpkg/blob/master/docs/specifications/manifests.md#definitions.", + "type": "string" + }, + "feature": { + "description": "A package feature that can be activated by consumers.", + "type": "object", + "properties": { + "name": { + "$ref": "#/definitions/identifier" + }, + "description": { + "$ref": "#/definitions/description-field" + }, + "dependencies": { + "description": "Dependencies used by this feature.", + "type": "array", + "items": { + "$ref": "#/definitions/dependency" + } + } + }, + "patternProperties": { + "^\\$": {} + }, + "required": [ + "name", + "description" + ], + "additionalProperties": false + } + }, + "type": "object", + "properties": { + "name": { + "$ref": "#/definitions/package-name" + }, + "version-string": { + "description": "A string without semantic meaning, equivalent to `CONTROL`'s `Version` field.", + "type": "string" + }, + "port-version": { + "description": "A non-negative integer. If this field doesn't exist, it's assumed to be `0`.", + "type": "integer", + "minimum": 0, + "default": 0 + }, + "maintainers": { + "description": "An array of strings which contain the authors of a package", + "type": "array", + "items": { + "type": "string" + } + }, + "description": { + "$ref": "#/definitions/description-field" + }, + "homepage": { + "description": "A url which points to the homepage of a package.", + "type": "string", + "format": "uri" + }, + "documentation": { + "description": "A url which points to the documentation of a package.", + "type": "string", + "format": "uri" + }, + "license": { + "description": "An SPDX license expression at version 3.9.", + "type": "string" + }, + "dependencies": { + "description": "Dependencies that are always required.", + "type": "array", + "items": { + "$ref": "#/definitions/dependency" + } + }, + "dev-dependencies": { + "description": "Dependencies only required for developers (testing and the like).", + "type": "array", + "items": { + "$ref": "#/definitions/dependency" + } + }, + "features": { + "description": "An array of features supported by the package", + "type": "array", + "items": { + "$ref": "#/definitions/feature" + } + }, + "default-features": { + "description": "Features enabled by default with the package.", + "type": "array", + "items": { + "$ref": "#/definitions/identifier" + } + }, + "supports": { + "$ref": "#/definitions/platform-expression" + } + }, + "patternProperties": { + "^\\$": {} + }, + "required": [ + "name", + "version-string" + ], + "additionalProperties": false +} diff --git a/vcpkg/scripts/vcpkgTools.xml b/vcpkg/scripts/vcpkgTools.xml new file mode 100644 index 0000000..3d3f899 --- /dev/null +++ b/vcpkg/scripts/vcpkgTools.xml @@ -0,0 +1,143 @@ + + + + 3.8.3 + python.exe + https://www.python.org/ftp/python/3.8.3/python-3.8.3-embed-win32.zip + 8c9078f55b1b5d694e0e809eee6ccf8a6e15810dd4649e8ae1209bff30e102d49546ce970a5d519349ca7759d93146f459c316dc440737171f018600255dcd0a + python-3.8.3-embed-win32.zip + + + 3.17.2 + cmake-3.17.2-win32-x86\bin\cmake.exe + https://github.com/Kitware/CMake/releases/download/v3.17.2/cmake-3.17.2-win32-x86.zip + 63bb3dc5a8683ed193025450620a70b8dd675eccba4a83882c96f21eda8994dd5b21854036a0c17f978bf31f67d1d1b33b416c7f6ffb0470c9f48c2e495d44c1 + cmake-3.17.2-win32-x86.zip + + + 3.17.2 + cmake-3.17.2-Darwin-x86_64/CMake.app/Contents/bin/cmake + https://github.com/Kitware/CMake/releases/download/v3.17.2/cmake-3.17.2-Darwin-x86_64.tar.gz + 804b06439c05b9cf36a988223b7dc47b06b8613cb4653989eff52aad5ab0fa312b8da1ac0c760ad101e74b2c9edaf5b119bd48617a5efb57dff9380ca74e54a9 + cmake-3.17.2-Darwin-x86_64.tar.gz + + + 3.17.2 + cmake-3.17.2-Linux-x86_64/bin/cmake + https://github.com/Kitware/CMake/releases/download/v3.17.2/cmake-3.17.2-Linux-x86_64.tar.gz + 2afc023363c40b110d97d871fb9a8917643bba308ca0c029ee8fe1164db1c168e32b2c9d7647475d84efa290c1242357f7cf260ea4d1f92f5a829cf418955490 + cmake-3.17.2-Linux-x86_64.tar.gz + + + 3.12.4 + cmake-3.12.4-FreeBSD-x86_64/bin/cmake + https://github.com/ivysnow/CMake/releases/download/v3.12.4/cmake-3.12.4-FreeBSD-x86_64.tar.gz + b5aeb2de36f3c29757c9404e33756da88580ddfa07f29079c7f275ae0d6d018fdfe3f55d54d1403f38e359865cf93436e084c6b1ea91f26c88bc01dde3793479 + cmake-3.12.4-FreeBSD-x86_64.tar.gz + + + 2.26.2-1 + mingw32\bin\git.exe + https://github.com/git-for-windows/git/releases/download/v2.26.2.windows.1/PortableGit-2.26.2-32-bit.7z.exe + d3cb60d62ca7b5d05ab7fbed0fa7567bec951984568a6c1646842a798c4aaff74bf534cf79414a6275c1927081a11b541d09931c017bf304579746e24fe57b36 + PortableGit-2.26.2-32-bit.7z.exe + + + 2.7.4 + + + + + + 2.7.4 + + + + + + 2.7.4 + + + + + + 2.4.1 + vswhere.exe + https://github.com/Microsoft/vswhere/releases/download/2.4.1/vswhere.exe + f477842d0cebefcd6bf9c6d536ab8ea20ec5b0aa967ee963ab6a101aeff9df8742ca600d35f39e2e7158d76d8231f1ed2bef6104dce84d2bf8d6b07d17d706a1 + + + 5.5.1 + nuget.exe + https://dist.nuget.org/win-x86-commandline/v5.5.1/nuget.exe + 22ea847d8017cd977664d0b13c889cfb13c89143212899a511be217345a4e243d4d8d4099700114a11d26a087e83eb1a3e2b03bdb5e0db48f10403184cd26619 + + + 5.5.1 + nuget.exe + https://dist.nuget.org/win-x86-commandline/v5.5.1/nuget.exe + 22ea847d8017cd977664d0b13c889cfb13c89143212899a511be217345a4e243d4d8d4099700114a11d26a087e83eb1a3e2b03bdb5e0db48f10403184cd26619 + + + 5.5.1 + nuget.exe + https://dist.nuget.org/win-x86-commandline/v5.5.1/nuget.exe + 22ea847d8017cd977664d0b13c889cfb13c89143212899a511be217345a4e243d4d8d4099700114a11d26a087e83eb1a3e2b03bdb5e0db48f10403184cd26619 + + + 3.1.81 + QtInstallerFramework-win-x86\bin\installerbase.exe + https://github.com/podsvirov/installer-framework/releases/download/cr203958-9/QtInstallerFramework-win-x86.zip + 1f3e593270d7c2a4e271fdb49c637a2de462351310ef66bba298d30f6ca23365ec6aecf2e57799a00c873267cd3f92060ecac03eb291d42903d0e0869cd17c73 + QtInstallerFramework-win-x86.zip + + + 18.1.0 + 7-Zip.CommandLine.18.1.0\tools\7za.exe + https://www.nuget.org/api/v2/package/7-Zip.CommandLine/18.1.0 + 8c75314102e68d2b2347d592f8e3eb05812e1ebb525decbac472231633753f1d4ca31c8e6881a36144a8da26b2571305b3ae3f4e2b85fc4a290aeda63d1a13b8 + 7-zip.commandline.18.1.0.nupkg + + + 18.01.0 + aria2-1.34.0-win-32bit-build1\aria2c.exe + https://github.com/aria2/aria2/releases/download/release-1.34.0/aria2-1.34.0-win-32bit-build1.zip + 2a5480d503ac6e8203040c7e516a3395028520da05d0ebf3a2d56d5d24ba5d17630e8f318dd4e3cc2094cc4668b90108fb58e8b986b1ffebd429995058063c27 + aria2-1.33.1-win-32bit-build1.zip + + + 1.10.1 + ninja.exe + https://github.com/ninja-build/ninja/releases/download/v1.10.1/ninja-win.zip + 0120054f0fea6eea4035866201f69fba1c039f681f680cfcbbefcaee97419815d092a6e2f3823ea6c3928ad296395f36029e337127ee977270000b35df5f9c40 + ninja-win-1.10.1.zip + + + 1.10.1 + ninja + https://github.com/ninja-build/ninja/releases/download/v1.10.1/ninja-linux.zip + 9820c76fde6fac398743766e7ea0fe8a7d6e4191a77512a2d2f51c2ddcc947fcd91ac08522742281a285418c114e760b0158a968305f8dc854bb9693883b7f1e + ninja-linux-1.10.1.zip + + + 1.10.1 + ninja + https://github.com/ninja-build/ninja/releases/download/v1.10.1/ninja-mac.zip + 99f5ccca2461a4d340f4528a8eef6d81180757da78313f1f9412ed13a7bbaf6df537a342536fd053db00524bcb734d205af5f6fde419a1eb2e6f77ee8b7860fe + ninja-mac-1.10.1.zip + + + 1.8.2 + ninja + https://github.com/ivysnow/ninja/releases/download/v1.8.2/ninja-freebsd.zip + 56a55ae9a6b5dfad4f28f9fe9b8114f1475c999d2f07fff7efa7375f987e74b498e9b63c41fc6c577756f15f3a1459c6d5d367902de3bedebdf9a9fd49089a86 + ninja-freebsd-1.8.2.zip + + + 7.0.3 + pwsh.exe + https://github.com/PowerShell/PowerShell/releases/download/v7.0.3/PowerShell-7.0.3-win-x86.zip + 2e410fc5e429fc6ad478976eff3efcffe9d53a0620c7c31c2b8bfe1f0976cade74632fc202bf58959cec111f03b824ba42ad4d74c8a66d67ec21bbfe9b9c626d + PowerShell-7.0.3-win-x86.zip + + diff --git a/vcpkg/scripts/vcpkg_completion.bash b/vcpkg/scripts/vcpkg_completion.bash new file mode 100644 index 0000000..804507d --- /dev/null +++ b/vcpkg/scripts/vcpkg_completion.bash @@ -0,0 +1,17 @@ +#/usr/bin/env bash + +_vcpkg_completions() +{ + local vcpkg_executable=${COMP_WORDS[0]} + local remaining_command_line=${COMP_LINE:(${#vcpkg_executable}+1)} + COMPREPLY=($(${vcpkg_executable} autocomplete "${remaining_command_line}" -- 2>/dev/null)) + + # Colon is treated as a delimiter in bash. The following workaround + # allows triplet completion to work correctly in the syntax: + # zlib:x64-windows + local cur + _get_comp_words_by_ref -n : cur + __ltrim_colon_completions "$cur" +} + +complete -F _vcpkg_completions vcpkg diff --git a/vcpkg/scripts/vcpkg_get_dep_info.cmake b/vcpkg/scripts/vcpkg_get_dep_info.cmake new file mode 100644 index 0000000..92212b8 --- /dev/null +++ b/vcpkg/scripts/vcpkg_get_dep_info.cmake @@ -0,0 +1,19 @@ +function(vcpkg_get_dep_info PORT VCPKG_TRIPLET_ID) + message("d8187afd-ea4a-4fc3-9aa4-a6782e1ed9af") + vcpkg_triplet_file(${VCPKG_TRIPLET_ID}) + + # GUID used as a flag - "cut here line" + message("c35112b6-d1ba-415b-aa5d-81de856ef8eb +VCPKG_TARGET_ARCHITECTURE=${VCPKG_TARGET_ARCHITECTURE} +VCPKG_CMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME} +VCPKG_CMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION} +VCPKG_LIBRARY_LINKAGE=${VCPKG_LIBRARY_LINKAGE} +VCPKG_CRT_LINKAGE=${VCPKG_CRT_LINKAGE} +VCPKG_DEP_INFO_OVERRIDE_VARS=${VCPKG_DEP_INFO_OVERRIDE_VARS} +CMAKE_HOST_SYSTEM_NAME=${CMAKE_HOST_SYSTEM_NAME} +CMAKE_HOST_SYSTEM_PROCESSOR=${CMAKE_HOST_SYSTEM_PROCESSOR} +CMAKE_HOST_SYSTEM_VERSION=${CMAKE_HOST_SYSTEM_VERSION} +CMAKE_HOST_SYSTEM=${CMAKE_HOST_SYSTEM} +e1e74b5c-18cb-4474-a6bd-5c1c8bc81f3f +8c504940-be29-4cba-9f8f-6cd83e9d87b7") +endfunction() diff --git a/vcpkg/scripts/vcpkg_get_tags.cmake b/vcpkg/scripts/vcpkg_get_tags.cmake new file mode 100644 index 0000000..bec5d93 --- /dev/null +++ b/vcpkg/scripts/vcpkg_get_tags.cmake @@ -0,0 +1,30 @@ +function(vcpkg_get_tags PORT FEATURES VCPKG_TRIPLET_ID VCPKG_ABI_SETTINGS_FILE) + message("d8187afd-ea4a-4fc3-9aa4-a6782e1ed9af") + vcpkg_triplet_file(${VCPKG_TRIPLET_ID}) + + # GUID used as a flag - "cut here line" + message("c35112b6-d1ba-415b-aa5d-81de856ef8eb +VCPKG_TARGET_ARCHITECTURE=${VCPKG_TARGET_ARCHITECTURE} +VCPKG_CMAKE_SYSTEM_NAME=${VCPKG_CMAKE_SYSTEM_NAME} +VCPKG_CMAKE_SYSTEM_VERSION=${VCPKG_CMAKE_SYSTEM_VERSION} +VCPKG_PLATFORM_TOOLSET=${VCPKG_PLATFORM_TOOLSET} +VCPKG_VISUAL_STUDIO_PATH=${VCPKG_VISUAL_STUDIO_PATH} +VCPKG_CHAINLOAD_TOOLCHAIN_FILE=${VCPKG_CHAINLOAD_TOOLCHAIN_FILE} +VCPKG_BUILD_TYPE=${VCPKG_BUILD_TYPE} +VCPKG_LIBRARY_LINKAGE=${VCPKG_LIBRARY_LINKAGE} +e1e74b5c-18cb-4474-a6bd-5c1c8bc81f3f") + + # Just to enforce the user didn't set it in the triplet file + if (DEFINED VCPKG_PUBLIC_ABI_OVERRIDE) + set(VCPKG_PUBLIC_ABI_OVERRIDE) + message(WARNING "VCPKG_PUBLIC_ABI_OVERRIDE set in the triplet will be ignored.") + endif() + include("${VCPKG_ABI_SETTINGS_FILE}" OPTIONAL) + + message("c35112b6-d1ba-415b-aa5d-81de856ef8eb +VCPKG_PUBLIC_ABI_OVERRIDE=${VCPKG_PUBLIC_ABI_OVERRIDE} +VCPKG_ENV_PASSTHROUGH=${VCPKG_ENV_PASSTHROUGH} +VCPKG_LOAD_VCVARS_ENV=${VCPKG_LOAD_VCVARS_ENV} +e1e74b5c-18cb-4474-a6bd-5c1c8bc81f3f +8c504940-be29-4cba-9f8f-6cd83e9d87b7") +endfunction() diff --git a/vcpkg/toolsrc/.clang-format b/vcpkg/toolsrc/.clang-format new file mode 100644 index 0000000..374a423 --- /dev/null +++ b/vcpkg/toolsrc/.clang-format @@ -0,0 +1,54 @@ +BasedOnStyle: WebKit +Language: Cpp +Standard: Cpp11 + +UseTab: Never +IndentWidth: 4 +ColumnLimit: 120 +PointerAlignment: Left + +BreakBeforeBraces: Allman + +AllowShortBlocksOnASingleLine: false +AllowShortCaseLabelsOnASingleLine: true +AllowShortFunctionsOnASingleLine: All +AllowShortIfStatementsOnASingleLine: true +AllowShortLoopsOnASingleLine: false +AlwaysBreakTemplateDeclarations: true +AlignAfterOpenBracket: true +AlignOperands: true +AlignTrailingComments: true +BinPackArguments: false +BinPackParameters: false +BreakBeforeBinaryOperators: None +BreakConstructorInitializersBeforeComma: true +ConstructorInitializerAllOnOneLineOrOnePerLine: true +Cpp11BracedListStyle: true +IndentCaseLabels: true +KeepEmptyLinesAtTheStartOfBlocks: false +NamespaceIndentation: All +ForEachMacros: [TEST_CASE, SECTION] +PenaltyReturnTypeOnItsOwnLine: 1000 +SpaceAfterTemplateKeyword: false +SpaceBeforeCpp11BracedList: false +DeriveLineEnding: false +UseCRLF: false + +IncludeBlocks: Regroup +IncludeCategories: + - Regex: '^(|"pch\.h")$' + Priority: -1 + - Regex: '^$' + Priority: 1 + - Regex: '^$' + Priority: 2 + - Regex: '^$' + Priority: 3 + - Regex: '^$' + Priority: 4 + - Regex: '^$' + Priority: 5 + - Regex: '^<[a-z0-9_]*\.h>$' + Priority: 6 + - Regex: '^<[a-z0-9_]*>$' # C++ standard library + Priority: 7 diff --git a/vcpkg/toolsrc/CMakeLists.txt b/vcpkg/toolsrc/CMakeLists.txt new file mode 100644 index 0000000..89c3b3b --- /dev/null +++ b/vcpkg/toolsrc/CMakeLists.txt @@ -0,0 +1,173 @@ +cmake_minimum_required(VERSION 3.14) + +project(vcpkg CXX) +include(cmake/utilities.cmake) + +# =============== +# === Options === +# =============== + +include(CMakeDependentOption) + +option(BUILD_TESTING "Option for enabling testing" ON) +option(VCPKG_DISABLE_METRICS "Option for disabling metrics" OFF) +option(VCPKG_ALLOW_APPLE_CLANG "Option for allowing apple clang, even versions that we don't know will work" OFF) +option(VCPKG_DEVELOPMENT_WARNINGS "Option for turning on all warnings" ON) +option(VCPKG_WARNINGS_AS_ERRORS "Set warnings to be errors" ${VCPKG_DEVELOPMENT_WARNINGS}) +option(VCPKG_BUILD_FUZZING "Option for enabling vcpkg-fuzz support" OFF) + +CMAKE_DEPENDENT_OPTION(VCPKG_BUILD_BENCHMARKING "Option for enabling benchmarking" OFF + "BUILD_TESTING" OFF) + +if(WERROR) + message(DEPRECATION "-DWERROR is no longer a supported flag. It doesn't do anything.") +endif() +if(DEFINE_DISABLE_METRICS) + message(DEPRECATION "DEFINE_DISABLE_METRICS is now called VCPKG_DISABLE_METRICS.") + set(VCPKG_DISABLE_METRICS ${DEFINE_DISABLE_METRICS} CACHE BOOL "Option for disabling metrics" FORCE) +endif() + +# ============= +# === Files === +# ============= + +file(GLOB VCPKGLIB_SOURCES CONFIGURE_DEPENDS src/vcpkg/*.cpp) +file(GLOB VCPKGLIB_BASE_SOURCES CONFIGURE_DEPENDS src/vcpkg/base/*.cpp) +file(GLOB VCPKGLIB_INCLUDES CONFIGURE_DEPENDS include/vcpkg/*.h include/vcpkg/fwd/*.h) +file(GLOB VCPKGLIB_BASE_INCLUDES CONFIGURE_DEPENDS include/vcpkg/base/*.h include/vcpkg/base/fwd/*.h) + +set(VCPKG_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/vcpkg.cpp) + +file(GLOB VCPKG_TEST_SOURCES CONFIGURE_DEPENDS src/vcpkg-test/*.cpp) +file(GLOB VCPKG_TEST_INCLUDES CONFIGURE_DEPENDS include/vcpkg-test/*.h) + +file(GLOB VCPKG_FUZZ_SOURCES CONFIGURE_DEPENDS src/vcpkg-fuzz/*.cpp) + +# ======================== +# === System detection === +# ======================== + +vcpkg_detect_compiler() +vcpkg_detect_standard_library() +vcpkg_detect_std_filesystem() + +set(CMAKE_CXX_EXTENSIONS OFF) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_STANDARD 17) +if(MSVC) + string(REGEX REPLACE "[-/]W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + if (CMAKE_BUILD_TYPE STREQUAL "Release") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zi /guard:cf") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG /debugtype:cv,fixup /guard:cf") + endif() +endif() + +if(APPLE) + SET(CMAKE_C_ARCHIVE_CREATE " Scr ") + SET(CMAKE_CXX_ARCHIVE_CREATE " Scr ") + SET(CMAKE_C_ARCHIVE_FINISH " -no_warning_for_no_symbols -c ") + SET(CMAKE_CXX_ARCHIVE_FINISH " -no_warning_for_no_symbols -c ") +endif() + +# =============== +# === Targets === +# =============== + +# === Target: vcpkglib === + +add_library(vcpkglib + ${VCPKGLIB_BASE_SOURCES} + ${VCPKGLIB_SOURCES} + ${VCPKGLIB_BASE_INCLUDES} + ${VCPKGLIB_INCLUDES}) +target_include_directories(vcpkglib PUBLIC include) + +vcpkg_target_add_warning_options(vcpkglib) +target_compile_definitions(vcpkglib PUBLIC + VCPKG_USE_STD_FILESYSTEM=$) + +set(THREADS_PREFER_PTHREAD_FLAG ON) +find_package(Threads REQUIRED) +target_link_libraries(vcpkglib PRIVATE Threads::Threads) + +if(VCPKG_CXXFS_LIBRARY) + target_link_libraries(vcpkglib PRIVATE ${VCPKG_CXXFS_LIBRARY}) +endif() + +if(MSVC) + get_target_property(_srcs vcpkglib SOURCES) + + if(NOT CMAKE_GENERATOR MATCHES "Visual Studio .*") + set_property(SOURCE src/pch.cpp APPEND PROPERTY OBJECT_OUTPUTS "${CMAKE_CURRENT_BINARY_DIR}/pch.pch") + set_property(SOURCE ${_srcs} APPEND PROPERTY OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pch.pch") + endif() + + set_source_files_properties(src/pch.cpp PROPERTIES COMPILE_FLAGS "/Ycpch.h") + target_sources(vcpkglib PRIVATE src/pch.cpp) + target_compile_options(vcpkglib PRIVATE /Yupch.h /FIpch.h /Zm200) +else() + target_compile_options(vcpkglib PRIVATE -include "${CMAKE_CURRENT_SOURCE_DIR}/include/pch.h") +endif() + +if (MINGW) + target_compile_definitions(vcpkglib + PUBLIC + UNICODE + _WIN32_WINNT=0x0601 + WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY=4 + __fastfail=exit) + target_link_libraries(vcpkglib PUBLIC winhttp bcrypt version ole32 uuid) +endif() + +# === Target: vcpkg === + +add_executable(vcpkg ${VCPKG_SOURCES}) +target_link_libraries(vcpkg PRIVATE vcpkglib) +vcpkg_target_add_warning_options(vcpkg) + +# === Target: vcpkg-test === + +if (BUILD_TESTING) + enable_testing() + + add_executable(vcpkg-test + ${VCPKG_TEST_SOURCES} + ${VCPKG_TEST_INCLUDES}) + target_link_libraries(vcpkg-test PRIVATE vcpkglib) + vcpkg_target_add_warning_options(vcpkg-test) + + add_test(NAME default COMMAND vcpkg-test --order rand --rng-seed time) + + if (VCPKG_BUILD_BENCHMARKING) + target_compile_options(vcpkg-test PRIVATE -DCATCH_CONFIG_ENABLE_BENCHMARKING) + endif() +endif() + +# === Target: vcpkg-fuzz === + +if(VCPKG_BUILD_FUZZING) + add_executable(vcpkg-fuzz ${VCPKG_FUZZ_SOURCES}) + target_link_libraries(vcpkg-fuzz PRIVATE vcpkglib) + vcpkg_target_add_warning_options(vcpkg-fuzz) +endif() + +# === Target: format === + +find_program(CLANG_FORMAT clang-format) +if(CLANG_FORMAT) + # doing all of these formats in one line has a tendency to overflow the command line length + add_custom_target(format + COMMAND ${CLANG_FORMAT} -i -verbose ${CMAKE_CURRENT_SOURCE_DIR}/src/pch.cpp + COMMAND ${CLANG_FORMAT} -i -verbose ${VCPKGLIB_BASE_SOURCES} + COMMAND ${CLANG_FORMAT} -i -verbose ${VCPKGLIB_SOURCES} + COMMAND ${CLANG_FORMAT} -i -verbose ${CMAKE_CURRENT_SOURCE_DIR}/include/pch.h + COMMAND ${CLANG_FORMAT} -i -verbose ${VCPKGLIB_BASE_INCLUDES} + COMMAND ${CLANG_FORMAT} -i -verbose ${VCPKGLIB_INCLUDES} + + COMMAND ${CLANG_FORMAT} -i -verbose ${VCPKG_SOURCES} + + COMMAND ${CLANG_FORMAT} -i -verbose ${VCPKG_TEST_SOURCES} + COMMAND ${CLANG_FORMAT} -i -verbose ${VCPKG_TEST_INCLUDES} + + COMMAND ${CLANG_FORMAT} -i -verbose ${VCPKG_FUZZ_SOURCES}) +endif() diff --git a/vcpkg/toolsrc/VERSION.txt b/vcpkg/toolsrc/VERSION.txt new file mode 100644 index 0000000..86c0faf --- /dev/null +++ b/vcpkg/toolsrc/VERSION.txt @@ -0,0 +1 @@ +"2020.06.15" diff --git a/vcpkg/toolsrc/cmake/utilities.cmake b/vcpkg/toolsrc/cmake/utilities.cmake new file mode 100644 index 0000000..429a86f --- /dev/null +++ b/vcpkg/toolsrc/cmake/utilities.cmake @@ -0,0 +1,233 @@ +# Outputs to Cache: VCPKG_COMPILER +function(vcpkg_detect_compiler) + if(NOT DEFINED CACHE{VCPKG_COMPILER}) + message(STATUS "Detecting the C++ compiler in use") + if(CMAKE_COMPILER_IS_GNUXX OR CMAKE_CXX_COMPILER_ID MATCHES "GNU") + if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0) + message(FATAL_ERROR [[ +The g++ version picked up is too old; please install a newer compiler such as g++-7. +On Ubuntu try the following: + sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y + sudo apt-get update -y + sudo apt-get install g++-7 -y +On CentOS try the following: + sudo yum install centos-release-scl + sudo yum install devtoolset-7 + scl enable devtoolset-7 bash +]]) + endif() + + set(COMPILER "gcc") + elseif(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang") + #[[ + Note: CMAKE_SYSTEM_VERSION uses darwin versions + - Darwin 19.0.0 = macOS 10.15, iOS 13 + - Darwin 18.0.0 = macOS 10.14, iOS 12 + - Darwin 17.0.0 = macOS 10.13, iOS 11 + - Darwin 16.0.0 = macOS 10.12, iOS 10 + ]] + if(CMAKE_SYSTEM_VERSION VERSION_LESS "19.0.0" AND NOT VCPKG_ALLOW_APPLE_CLANG) + message(FATAL_ERROR [[ +Building the vcpkg tool requires support for the C++ Filesystem TS. +macOS versions below 10.15 do not have support for it with Apple Clang. +Please install gcc6 or newer from homebrew (brew install gcc). +If you would like to try anyway, pass --allowAppleClang to bootstrap.sh. +]]) + endif() + set(COMPILER "clang") + elseif(CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang") + set(COMPILER "clang") + elseif(MSVC) + set(COMPILER "msvc") + else() + message(FATAL_ERROR "Unknown compiler: ${CMAKE_CXX_COMPILER_ID}") + endif() + + set(VCPKG_COMPILER ${COMPILER} + CACHE STRING + "The compiler in use; one of gcc, clang, msvc") + message(STATUS "Detecting the C++ compiler in use - ${VCPKG_COMPILER}") + endif() +endfunction() + +# Outputs to Cache: VCPKG_STANDARD_LIBRARY +function(vcpkg_detect_standard_library) + if(NOT DEFINED CACHE{VCPKG_STANDARD_LIBRARY}) + include(CheckCXXSourceCompiles) + + message(STATUS "Detecting the C++ standard library") + + # note: since is the smallest header, generally it's used to get the standard library version + set(CMAKE_REQUIRED_QUIET ON) + check_cxx_source_compiles([[ +#include +#if !defined(__GLIBCXX__) +#error "not libstdc++" +#endif +int main() {} +]] + _VCPKG_STANDARD_LIBRARY_LIBSTDCXX) + check_cxx_source_compiles([[ +#include +#if !defined(_LIBCPP_VERSION) +#error "not libc++" +#endif +int main() {} +]] + _VCPKG_STANDARD_LIBRARY_LIBCXX) + check_cxx_source_compiles([[ +#include +#if !defined(_MSVC_STL_VERSION) && !(defined(_MSC_VER) && _MSC_VER <= 1900) +#error "not MSVC stl" +#endif +int main() {} +]] + _VCPKG_STANDARD_LIBRARY_MSVC_STL) + if(_VCPKG_STANDARD_LIBRARY_LIBSTDCXX) + set(STANDARD_LIBRARY "libstdc++") + elseif(_VCPKG_STANDARD_LIBRARY_LIBCXX) + set(STANDARD_LIBRARY "libc++") + elseif(_VCPKG_STANDARD_LIBRARY_MSVC_STL) + set(STANDARD_LIBRARY "msvc-stl") + else() + message(FATAL_ERROR "Can't find which C++ runtime is in use") + endif() + + set(VCPKG_STANDARD_LIBRARY ${STANDARD_LIBRARY} + CACHE STRING + "The C++ standard library in use; one of libstdc++, libc++, msvc-stl") + + message(STATUS "Detecting the C++ standard library - ${VCPKG_STANDARD_LIBRARY}") + endif() +endfunction() + +# Outputs to Cache: VCPKG_USE_STD_FILESYSTEM, VCPKG_CXXFS_LIBRARY +function(vcpkg_detect_std_filesystem) + vcpkg_detect_standard_library() + + if(NOT DEFINED CACHE{VCPKG_USE_STD_FILESYSTEM}) + include(CheckCXXSourceCompiles) + + message(STATUS "Detecting how to use the C++ filesystem library") + + set(CMAKE_REQUIRED_QUIET ON) + if(VCPKG_STANDARD_LIBRARY STREQUAL "libstdc++") + check_cxx_source_compiles([[ +#include +#if defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE >= 9 +#error "libstdc++ after version 9 does not require -lstdc++fs" +#endif +int main() {} +]] + _VCPKG_REQUIRE_LINK_CXXFS) + + check_cxx_source_compiles([[ +#include +#if !defined(_GLIBCXX_RELEASE) || _GLIBCXX_RELEASE < 8 +#error "libstdc++ before version 8 does not support " +#endif +int main() {} +]] + _VCPKG_USE_STD_FILESYSTEM) + + if(_VCPKG_REQUIRE_LINK_CXXFS) + set(_VCPKG_CXXFS_LIBRARY "stdc++fs") + endif() + elseif(VCPKG_STANDARD_LIBRARY STREQUAL "libc++") + if(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang") + # AppleClang never requires (or allows) -lc++fs, even with libc++ version 8.0.0 + set(_VCPKG_CXXFS_LIBRARY OFF) + else() + check_cxx_source_compiles([[ +#include +#if _LIBCPP_VERSION >= 9000 +#error "libc++ after version 9 does not require -lc++fs" +#endif +int main() {} +]] + _VCPKG_REQUIRE_LINK_CXXFS) + + if(_VCPKG_REQUIRE_LINK_CXXFS) + set(_VCPKG_CXXFS_LIBRARY "c++fs") + endif() + endif() + + # We don't support versions of libc++ < 7.0.0, and libc++ 7.0.0 has + set(_VCPKG_USE_STD_FILESYSTEM ON) + elseif(VCPKG_STANDARD_LIBRARY STREQUAL "msvc-stl") + check_cxx_source_compiles( + "#include + #if !defined(_MSVC_STL_UPDATE) || _MSVC_STL_UPDATE < 201803 + #error \"MSVC STL before 15.7 does not support \" + #endif + int main() {}" + _VCPKG_USE_STD_FILESYSTEM) + + set(_VCPKG_CXXFS_LIBRARY OFF) + endif() + + set(VCPKG_USE_STD_FILESYSTEM ${_VCPKG_USE_STD_FILESYSTEM} + CACHE BOOL + "Whether to use , as opposed to " + FORCE) + set(VCPKG_CXXFS_LIBRARY ${_VCPKG_CXXFS_LIBRARY} + CACHE STRING + "Library to link (if any) in order to use " + FORCE) + + if(VCPKG_USE_STD_FILESYSTEM) + set(msg "") + else() + set(msg "") + endif() + if(VCPKG_CXXFS_LIBRARY) + set(msg "${msg} with -l${VCPKG_CXXFS_LIBRARY}") + endif() + + message(STATUS "Detecting how to use the C++ filesystem library - ${msg}") + endif() +endfunction() + +function(vcpkg_target_add_warning_options TARGET) + if(MSVC) + # either MSVC, or clang-cl + target_compile_options(${TARGET} PRIVATE -FC) + + if (MSVC_VERSION GREATER 1900) + # Visual Studio 2017 or later + target_compile_options(${TARGET} PRIVATE -permissive- -utf-8) + endif() + + if(VCPKG_DEVELOPMENT_WARNINGS) + target_compile_options(${TARGET} PRIVATE -W4) + if(VCPKG_COMPILER STREQUAL "clang") + target_compile_options(${TARGET} PRIVATE -Wmissing-prototypes -Wno-missing-field-initializers) + else() + target_compile_options(${TARGET} PRIVATE -analyze) + endif() + else() + target_compile_options(${TARGET} PRIVATE -W3) + endif() + + if(VCPKG_WARNINGS_AS_ERRORS) + target_compile_options(${TARGET} PRIVATE -WX) + endif() + else() + if(VCPKG_DEVELOPMENT_WARNINGS) + target_compile_options(${TARGET} PRIVATE + -Wall -Wextra -Wpedantic + -Wno-unknown-pragmas -Wno-missing-field-initializers -Wno-redundant-move) + + # GCC and clang have different names for the same warning + if(VCPKG_COMPILER STREQUAL "gcc") + target_compile_options(${TARGET} PRIVATE -Wmissing-declarations) + elseif(VCPKG_COMPILER STREQUAL "clang") + target_compile_options(${TARGET} PRIVATE -Wmissing-prototypes) + endif() + endif() + + if(VCPKG_WARNINGS_AS_ERRORS) + target_compile_options(${TARGET} PRIVATE -Werror) + endif() + endif() +endfunction() diff --git a/vcpkg/toolsrc/include/catch2/catch.hpp b/vcpkg/toolsrc/include/catch2/catch.hpp new file mode 100644 index 0000000..f471a2e --- /dev/null +++ b/vcpkg/toolsrc/include/catch2/catch.hpp @@ -0,0 +1,16865 @@ +/* + * Catch v2.9.1 + * Generated: 2019-06-17 11:59:24.363643 + * ---------------------------------------------------------- + * This file has been merged from multiple headers. Please don't edit it directly + * Copyright (c) 2019 Two Blue Cubes Ltd. All rights reserved. + * + * Distributed under the Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + */ +#ifndef TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED +#define TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED +// start catch.hpp + + +#define CATCH_VERSION_MAJOR 2 +#define CATCH_VERSION_MINOR 9 +#define CATCH_VERSION_PATCH 1 + +#ifdef __clang__ +# pragma clang system_header +#elif defined __GNUC__ +# pragma GCC system_header +#endif + +// start catch_suppress_warnings.h + +#ifdef __clang__ +# ifdef __ICC // icpc defines the __clang__ macro +# pragma warning(push) +# pragma warning(disable: 161 1682) +# else // __ICC +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wpadded" +# pragma clang diagnostic ignored "-Wswitch-enum" +# pragma clang diagnostic ignored "-Wcovered-switch-default" +# endif +#elif defined __GNUC__ + // Because REQUIREs trigger GCC's -Wparentheses, and because still + // supported version of g++ have only buggy support for _Pragmas, + // Wparentheses have to be suppressed globally. +# pragma GCC diagnostic ignored "-Wparentheses" // See #674 for details + +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-variable" +# pragma GCC diagnostic ignored "-Wpadded" +#endif +// end catch_suppress_warnings.h +#if defined(CATCH_CONFIG_MAIN) || defined(CATCH_CONFIG_RUNNER) +# define CATCH_IMPL +# define CATCH_CONFIG_ALL_PARTS +#endif + +// In the impl file, we want to have access to all parts of the headers +// Can also be used to sanely support PCHs +#if defined(CATCH_CONFIG_ALL_PARTS) +# define CATCH_CONFIG_EXTERNAL_INTERFACES +# if defined(CATCH_CONFIG_DISABLE_MATCHERS) +# undef CATCH_CONFIG_DISABLE_MATCHERS +# endif +# if !defined(CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER) +# define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER +# endif +#endif + +#if !defined(CATCH_CONFIG_IMPL_ONLY) +// start catch_platform.h + +#ifdef __APPLE__ +# include +# if TARGET_OS_OSX == 1 +# define CATCH_PLATFORM_MAC +# elif TARGET_OS_IPHONE == 1 +# define CATCH_PLATFORM_IPHONE +# endif + +#elif defined(linux) || defined(__linux) || defined(__linux__) +# define CATCH_PLATFORM_LINUX + +#elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) || defined(__MINGW32__) +# define CATCH_PLATFORM_WINDOWS +#endif + +// end catch_platform.h + +#ifdef CATCH_IMPL +# ifndef CLARA_CONFIG_MAIN +# define CLARA_CONFIG_MAIN_NOT_DEFINED +# define CLARA_CONFIG_MAIN +# endif +#endif + +// start catch_user_interfaces.h + +namespace Catch { + unsigned int rngSeed(); +} + +// end catch_user_interfaces.h +// start catch_tag_alias_autoregistrar.h + +// start catch_common.h + +// start catch_compiler_capabilities.h + +// Detect a number of compiler features - by compiler +// The following features are defined: +// +// CATCH_CONFIG_COUNTER : is the __COUNTER__ macro supported? +// CATCH_CONFIG_WINDOWS_SEH : is Windows SEH supported? +// CATCH_CONFIG_POSIX_SIGNALS : are POSIX signals supported? +// CATCH_CONFIG_DISABLE_EXCEPTIONS : Are exceptions enabled? +// **************** +// Note to maintainers: if new toggles are added please document them +// in configuration.md, too +// **************** + +// In general each macro has a _NO_ form +// (e.g. CATCH_CONFIG_NO_POSIX_SIGNALS) which disables the feature. +// Many features, at point of detection, define an _INTERNAL_ macro, so they +// can be combined, en-mass, with the _NO_ forms later. + +#ifdef __cplusplus + +# if (__cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L) +# define CATCH_CPP14_OR_GREATER +# endif + +# if (__cplusplus >= 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) +# define CATCH_CPP17_OR_GREATER +# endif + +#endif + +#if defined(CATCH_CPP17_OR_GREATER) +# define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS +#endif + +#ifdef __clang__ + +# define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + _Pragma( "clang diagnostic push" ) \ + _Pragma( "clang diagnostic ignored \"-Wexit-time-destructors\"" ) \ + _Pragma( "clang diagnostic ignored \"-Wglobal-constructors\"") +# define CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \ + _Pragma( "clang diagnostic pop" ) + +# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \ + _Pragma( "clang diagnostic push" ) \ + _Pragma( "clang diagnostic ignored \"-Wparentheses\"" ) +# define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS \ + _Pragma( "clang diagnostic pop" ) + +# define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \ + _Pragma( "clang diagnostic push" ) \ + _Pragma( "clang diagnostic ignored \"-Wunused-variable\"" ) +# define CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS \ + _Pragma( "clang diagnostic pop" ) + +# define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \ + _Pragma( "clang diagnostic push" ) \ + _Pragma( "clang diagnostic ignored \"-Wgnu-zero-variadic-macro-arguments\"" ) +# define CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS \ + _Pragma( "clang diagnostic pop" ) + +#endif // __clang__ + +//////////////////////////////////////////////////////////////////////////////// +// Assume that non-Windows platforms support posix signals by default +#if !defined(CATCH_PLATFORM_WINDOWS) + #define CATCH_INTERNAL_CONFIG_POSIX_SIGNALS +#endif + +//////////////////////////////////////////////////////////////////////////////// +// We know some environments not to support full POSIX signals +#if defined(__CYGWIN__) || defined(__QNX__) || defined(__EMSCRIPTEN__) || defined(__DJGPP__) + #define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS +#endif + +#ifdef __OS400__ +# define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS +# define CATCH_CONFIG_COLOUR_NONE +#endif + +//////////////////////////////////////////////////////////////////////////////// +// Android somehow still does not support std::to_string +#if defined(__ANDROID__) +# define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING +#endif + +//////////////////////////////////////////////////////////////////////////////// +// Not all Windows environments support SEH properly +#if defined(__MINGW32__) +# define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH +#endif + +//////////////////////////////////////////////////////////////////////////////// +// PS4 +#if defined(__ORBIS__) +# define CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE +#endif + +//////////////////////////////////////////////////////////////////////////////// +// Cygwin +#ifdef __CYGWIN__ + +// Required for some versions of Cygwin to declare gettimeofday +// see: http://stackoverflow.com/questions/36901803/gettimeofday-not-declared-in-this-scope-cygwin +# define _BSD_SOURCE +// some versions of cygwin (most) do not support std::to_string. Use the libstd check. +// https://gcc.gnu.org/onlinedocs/gcc-4.8.2/libstdc++/api/a01053_source.html line 2812-2813 +# if !((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \ + && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF)) + +# define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING + +# endif +#endif // __CYGWIN__ + +//////////////////////////////////////////////////////////////////////////////// +// Visual C++ +#ifdef _MSC_VER + +# if _MSC_VER >= 1900 // Visual Studio 2015 or newer +# define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS +# endif + +// Universal Windows platform does not support SEH +// Or console colours (or console at all...) +# if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) +# define CATCH_CONFIG_COLOUR_NONE +# else +# define CATCH_INTERNAL_CONFIG_WINDOWS_SEH +# endif + +// MSVC traditional preprocessor needs some workaround for __VA_ARGS__ +// _MSVC_TRADITIONAL == 0 means new conformant preprocessor +// _MSVC_TRADITIONAL == 1 means old traditional non-conformant preprocessor +# if !defined(_MSVC_TRADITIONAL) || (defined(_MSVC_TRADITIONAL) && _MSVC_TRADITIONAL) +# define CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR +# endif +#endif // _MSC_VER + +#if defined(_REENTRANT) || defined(_MSC_VER) +// Enable async processing, as -pthread is specified or no additional linking is required +# define CATCH_INTERNAL_CONFIG_USE_ASYNC +#endif // _MSC_VER + +//////////////////////////////////////////////////////////////////////////////// +// Check if we are compiled with -fno-exceptions or equivalent +#if defined(__EXCEPTIONS) || defined(__cpp_exceptions) || defined(_CPPUNWIND) +# define CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED +#endif + +//////////////////////////////////////////////////////////////////////////////// +// DJGPP +#ifdef __DJGPP__ +# define CATCH_INTERNAL_CONFIG_NO_WCHAR +#endif // __DJGPP__ + +//////////////////////////////////////////////////////////////////////////////// +// Embarcadero C++Build +#if defined(__BORLANDC__) + #define CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN +#endif + +//////////////////////////////////////////////////////////////////////////////// + +// Use of __COUNTER__ is suppressed during code analysis in +// CLion/AppCode 2017.2.x and former, because __COUNTER__ is not properly +// handled by it. +// Otherwise all supported compilers support COUNTER macro, +// but user still might want to turn it off +#if ( !defined(__JETBRAINS_IDE__) || __JETBRAINS_IDE__ >= 20170300L ) + #define CATCH_INTERNAL_CONFIG_COUNTER +#endif + +//////////////////////////////////////////////////////////////////////////////// +// Check if string_view is available and usable +// The check is split apart to work around v140 (VS2015) preprocessor issue... +#if defined(__has_include) +#if __has_include() && defined(CATCH_CPP17_OR_GREATER) +# define CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW +#endif +#endif + +//////////////////////////////////////////////////////////////////////////////// +// Check if optional is available and usable +#if defined(__has_include) +# if __has_include() && defined(CATCH_CPP17_OR_GREATER) +# define CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL +# endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) +#endif // __has_include + +//////////////////////////////////////////////////////////////////////////////// +// Check if variant is available and usable +#if defined(__has_include) +# if __has_include() && defined(CATCH_CPP17_OR_GREATER) +# if defined(__clang__) && (__clang_major__ < 8) + // work around clang bug with libstdc++ https://bugs.llvm.org/show_bug.cgi?id=31852 + // fix should be in clang 8, workaround in libstdc++ 8.2 +# include +# if defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9) +# define CATCH_CONFIG_NO_CPP17_VARIANT +# else +# define CATCH_INTERNAL_CONFIG_CPP17_VARIANT +# endif // defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9) +# else +# define CATCH_INTERNAL_CONFIG_CPP17_VARIANT +# endif // defined(__clang__) && (__clang_major__ < 8) +# endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) +#endif // __has_include + +#if defined(CATCH_INTERNAL_CONFIG_COUNTER) && !defined(CATCH_CONFIG_NO_COUNTER) && !defined(CATCH_CONFIG_COUNTER) +# define CATCH_CONFIG_COUNTER +#endif +#if defined(CATCH_INTERNAL_CONFIG_WINDOWS_SEH) && !defined(CATCH_CONFIG_NO_WINDOWS_SEH) && !defined(CATCH_CONFIG_WINDOWS_SEH) && !defined(CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH) +# define CATCH_CONFIG_WINDOWS_SEH +#endif +// This is set by default, because we assume that unix compilers are posix-signal-compatible by default. +#if defined(CATCH_INTERNAL_CONFIG_POSIX_SIGNALS) && !defined(CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_POSIX_SIGNALS) +# define CATCH_CONFIG_POSIX_SIGNALS +#endif +// This is set by default, because we assume that compilers with no wchar_t support are just rare exceptions. +#if !defined(CATCH_INTERNAL_CONFIG_NO_WCHAR) && !defined(CATCH_CONFIG_NO_WCHAR) && !defined(CATCH_CONFIG_WCHAR) +# define CATCH_CONFIG_WCHAR +#endif + +#if !defined(CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_CPP11_TO_STRING) +# define CATCH_CONFIG_CPP11_TO_STRING +#endif + +#if defined(CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_NO_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_CPP17_OPTIONAL) +# define CATCH_CONFIG_CPP17_OPTIONAL +#endif + +#if defined(CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) && !defined(CATCH_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS) && !defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) +# define CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS +#endif + +#if defined(CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_NO_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_CPP17_STRING_VIEW) +# define CATCH_CONFIG_CPP17_STRING_VIEW +#endif + +#if defined(CATCH_INTERNAL_CONFIG_CPP17_VARIANT) && !defined(CATCH_CONFIG_NO_CPP17_VARIANT) && !defined(CATCH_CONFIG_CPP17_VARIANT) +# define CATCH_CONFIG_CPP17_VARIANT +#endif + +#if defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT) +# define CATCH_INTERNAL_CONFIG_NEW_CAPTURE +#endif + +#if defined(CATCH_INTERNAL_CONFIG_NEW_CAPTURE) && !defined(CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NEW_CAPTURE) +# define CATCH_CONFIG_NEW_CAPTURE +#endif + +#if !defined(CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED) && !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) +# define CATCH_CONFIG_DISABLE_EXCEPTIONS +#endif + +#if defined(CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_NO_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_POLYFILL_ISNAN) +# define CATCH_CONFIG_POLYFILL_ISNAN +#endif + +#if defined(CATCH_INTERNAL_CONFIG_USE_ASYNC) && !defined(CATCH_CONFIG_NO_USE_ASYNC) && !defined(CATCH_CONFIG_USE_ASYNC) +# define CATCH_CONFIG_USE_ASYNC +#endif + +#if !defined(CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS) +# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS +# define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS +#endif +#if !defined(CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS) +# define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS +# define CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS +#endif +#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS) +# define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS +# define CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS +#endif +#if !defined(CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS) +# define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS +# define CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS +#endif + +#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) +#define CATCH_TRY if ((true)) +#define CATCH_CATCH_ALL if ((false)) +#define CATCH_CATCH_ANON(type) if ((false)) +#else +#define CATCH_TRY try +#define CATCH_CATCH_ALL catch (...) +#define CATCH_CATCH_ANON(type) catch (type) +#endif + +#if defined(CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_NO_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR) +#define CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR +#endif + +// end catch_compiler_capabilities.h +#define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line +#define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) +#ifdef CATCH_CONFIG_COUNTER +# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ ) +#else +# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __LINE__ ) +#endif + +#include +#include +#include + +// We need a dummy global operator<< so we can bring it into Catch namespace later +struct Catch_global_namespace_dummy {}; +std::ostream& operator<<(std::ostream&, Catch_global_namespace_dummy); + +namespace Catch { + + struct CaseSensitive { enum Choice { + Yes, + No + }; }; + + class NonCopyable { + NonCopyable( NonCopyable const& ) = delete; + NonCopyable( NonCopyable && ) = delete; + NonCopyable& operator = ( NonCopyable const& ) = delete; + NonCopyable& operator = ( NonCopyable && ) = delete; + + protected: + NonCopyable(); + virtual ~NonCopyable(); + }; + + struct SourceLineInfo { + + SourceLineInfo() = delete; + SourceLineInfo( char const* _file, std::size_t _line ) noexcept + : file( _file ), + line( _line ) + {} + + SourceLineInfo( SourceLineInfo const& other ) = default; + SourceLineInfo& operator = ( SourceLineInfo const& ) = default; + SourceLineInfo( SourceLineInfo&& ) noexcept = default; + SourceLineInfo& operator = ( SourceLineInfo&& ) noexcept = default; + + bool empty() const noexcept; + bool operator == ( SourceLineInfo const& other ) const noexcept; + bool operator < ( SourceLineInfo const& other ) const noexcept; + + char const* file; + std::size_t line; + }; + + std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ); + + // Bring in operator<< from global namespace into Catch namespace + // This is necessary because the overload of operator<< above makes + // lookup stop at namespace Catch + using ::operator<<; + + // Use this in variadic streaming macros to allow + // >> +StreamEndStop + // as well as + // >> stuff +StreamEndStop + struct StreamEndStop { + std::string operator+() const; + }; + template + T const& operator + ( T const& value, StreamEndStop ) { + return value; + } +} + +#define CATCH_INTERNAL_LINEINFO \ + ::Catch::SourceLineInfo( __FILE__, static_cast( __LINE__ ) ) + +// end catch_common.h +namespace Catch { + + struct RegistrarForTagAliases { + RegistrarForTagAliases( char const* alias, char const* tag, SourceLineInfo const& lineInfo ); + }; + +} // end namespace Catch + +#define CATCH_REGISTER_TAG_ALIAS( alias, spec ) \ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + namespace{ Catch::RegistrarForTagAliases INTERNAL_CATCH_UNIQUE_NAME( AutoRegisterTagAlias )( alias, spec, CATCH_INTERNAL_LINEINFO ); } \ + CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS + +// end catch_tag_alias_autoregistrar.h +// start catch_test_registry.h + +// start catch_interfaces_testcase.h + +#include + +namespace Catch { + + class TestSpec; + + struct ITestInvoker { + virtual void invoke () const = 0; + virtual ~ITestInvoker(); + }; + + class TestCase; + struct IConfig; + + struct ITestCaseRegistry { + virtual ~ITestCaseRegistry(); + virtual std::vector const& getAllTests() const = 0; + virtual std::vector const& getAllTestsSorted( IConfig const& config ) const = 0; + }; + + bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config ); + std::vector filterTests( std::vector const& testCases, TestSpec const& testSpec, IConfig const& config ); + std::vector const& getAllTestCasesSorted( IConfig const& config ); + +} + +// end catch_interfaces_testcase.h +// start catch_stringref.h + +#include +#include +#include + +namespace Catch { + + /// A non-owning string class (similar to the forthcoming std::string_view) + /// Note that, because a StringRef may be a substring of another string, + /// it may not be null terminated. c_str() must return a null terminated + /// string, however, and so the StringRef will internally take ownership + /// (taking a copy), if necessary. In theory this ownership is not externally + /// visible - but it does mean (substring) StringRefs should not be shared between + /// threads. + class StringRef { + public: + using size_type = std::size_t; + + private: + friend struct StringRefTestAccess; + + char const* m_start; + size_type m_size; + + char* m_data = nullptr; + + void takeOwnership(); + + static constexpr char const* const s_empty = ""; + + public: // construction/ assignment + StringRef() noexcept + : StringRef( s_empty, 0 ) + {} + + StringRef( StringRef const& other ) noexcept + : m_start( other.m_start ), + m_size( other.m_size ) + {} + + StringRef( StringRef&& other ) noexcept + : m_start( other.m_start ), + m_size( other.m_size ), + m_data( other.m_data ) + { + other.m_data = nullptr; + } + + StringRef( char const* rawChars ) noexcept; + + StringRef( char const* rawChars, size_type size ) noexcept + : m_start( rawChars ), + m_size( size ) + {} + + StringRef( std::string const& stdString ) noexcept + : m_start( stdString.c_str() ), + m_size( stdString.size() ) + {} + + ~StringRef() noexcept { + delete[] m_data; + } + + auto operator = ( StringRef const &other ) noexcept -> StringRef& { + delete[] m_data; + m_data = nullptr; + m_start = other.m_start; + m_size = other.m_size; + return *this; + } + + operator std::string() const; + + void swap( StringRef& other ) noexcept; + + public: // operators + auto operator == ( StringRef const& other ) const noexcept -> bool; + auto operator != ( StringRef const& other ) const noexcept -> bool; + + auto operator[] ( size_type index ) const noexcept -> char; + + public: // named queries + auto empty() const noexcept -> bool { + return m_size == 0; + } + auto size() const noexcept -> size_type { + return m_size; + } + + auto numberOfCharacters() const noexcept -> size_type; + auto c_str() const -> char const*; + + public: // substrings and searches + auto substr( size_type start, size_type size ) const noexcept -> StringRef; + + // Returns the current start pointer. + // Note that the pointer can change when if the StringRef is a substring + auto currentData() const noexcept -> char const*; + + private: // ownership queries - may not be consistent between calls + auto isOwned() const noexcept -> bool; + auto isSubstring() const noexcept -> bool; + }; + + auto operator + ( StringRef const& lhs, StringRef const& rhs ) -> std::string; + auto operator + ( StringRef const& lhs, char const* rhs ) -> std::string; + auto operator + ( char const* lhs, StringRef const& rhs ) -> std::string; + + auto operator += ( std::string& lhs, StringRef const& sr ) -> std::string&; + auto operator << ( std::ostream& os, StringRef const& sr ) -> std::ostream&; + + inline auto operator "" _sr( char const* rawChars, std::size_t size ) noexcept -> StringRef { + return StringRef( rawChars, size ); + } + +} // namespace Catch + +inline auto operator "" _catch_sr( char const* rawChars, std::size_t size ) noexcept -> Catch::StringRef { + return Catch::StringRef( rawChars, size ); +} + +// end catch_stringref.h +// start catch_type_traits.hpp + + +#include + +namespace Catch{ + +#ifdef CATCH_CPP17_OR_GREATER + template + inline constexpr auto is_unique = std::true_type{}; + + template + inline constexpr auto is_unique = std::bool_constant< + (!std::is_same_v && ...) && is_unique + >{}; +#else + +template +struct is_unique : std::true_type{}; + +template +struct is_unique : std::integral_constant +::value + && is_unique::value + && is_unique::value +>{}; + +#endif +} + +// end catch_type_traits.hpp +// start catch_preprocessor.hpp + + +#define CATCH_RECURSION_LEVEL0(...) __VA_ARGS__ +#define CATCH_RECURSION_LEVEL1(...) CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(__VA_ARGS__))) +#define CATCH_RECURSION_LEVEL2(...) CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(__VA_ARGS__))) +#define CATCH_RECURSION_LEVEL3(...) CATCH_RECURSION_LEVEL2(CATCH_RECURSION_LEVEL2(CATCH_RECURSION_LEVEL2(__VA_ARGS__))) +#define CATCH_RECURSION_LEVEL4(...) CATCH_RECURSION_LEVEL3(CATCH_RECURSION_LEVEL3(CATCH_RECURSION_LEVEL3(__VA_ARGS__))) +#define CATCH_RECURSION_LEVEL5(...) CATCH_RECURSION_LEVEL4(CATCH_RECURSION_LEVEL4(CATCH_RECURSION_LEVEL4(__VA_ARGS__))) + +#ifdef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR +#define INTERNAL_CATCH_EXPAND_VARGS(...) __VA_ARGS__ +// MSVC needs more evaluations +#define CATCH_RECURSION_LEVEL6(...) CATCH_RECURSION_LEVEL5(CATCH_RECURSION_LEVEL5(CATCH_RECURSION_LEVEL5(__VA_ARGS__))) +#define CATCH_RECURSE(...) CATCH_RECURSION_LEVEL6(CATCH_RECURSION_LEVEL6(__VA_ARGS__)) +#else +#define CATCH_RECURSE(...) CATCH_RECURSION_LEVEL5(__VA_ARGS__) +#endif + +#define CATCH_REC_END(...) +#define CATCH_REC_OUT + +#define CATCH_EMPTY() +#define CATCH_DEFER(id) id CATCH_EMPTY() + +#define CATCH_REC_GET_END2() 0, CATCH_REC_END +#define CATCH_REC_GET_END1(...) CATCH_REC_GET_END2 +#define CATCH_REC_GET_END(...) CATCH_REC_GET_END1 +#define CATCH_REC_NEXT0(test, next, ...) next CATCH_REC_OUT +#define CATCH_REC_NEXT1(test, next) CATCH_DEFER ( CATCH_REC_NEXT0 ) ( test, next, 0) +#define CATCH_REC_NEXT(test, next) CATCH_REC_NEXT1(CATCH_REC_GET_END test, next) + +#define CATCH_REC_LIST0(f, x, peek, ...) , f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ ) +#define CATCH_REC_LIST1(f, x, peek, ...) , f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0) ) ( f, peek, __VA_ARGS__ ) +#define CATCH_REC_LIST2(f, x, peek, ...) f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ ) + +#define CATCH_REC_LIST0_UD(f, userdata, x, peek, ...) , f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ ) +#define CATCH_REC_LIST1_UD(f, userdata, x, peek, ...) , f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0_UD) ) ( f, userdata, peek, __VA_ARGS__ ) +#define CATCH_REC_LIST2_UD(f, userdata, x, peek, ...) f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ ) + +// Applies the function macro `f` to each of the remaining parameters, inserts commas between the results, +// and passes userdata as the first parameter to each invocation, +// e.g. CATCH_REC_LIST_UD(f, x, a, b, c) evaluates to f(x, a), f(x, b), f(x, c) +#define CATCH_REC_LIST_UD(f, userdata, ...) CATCH_RECURSE(CATCH_REC_LIST2_UD(f, userdata, __VA_ARGS__, ()()(), ()()(), ()()(), 0)) + +#define CATCH_REC_LIST(f, ...) CATCH_RECURSE(CATCH_REC_LIST2(f, __VA_ARGS__, ()()(), ()()(), ()()(), 0)) + +#define INTERNAL_CATCH_EXPAND1(param) INTERNAL_CATCH_EXPAND2(param) +#define INTERNAL_CATCH_EXPAND2(...) INTERNAL_CATCH_NO## __VA_ARGS__ +#define INTERNAL_CATCH_DEF(...) INTERNAL_CATCH_DEF __VA_ARGS__ +#define INTERNAL_CATCH_NOINTERNAL_CATCH_DEF +#define INTERNAL_CATCH_STRINGIZE(...) INTERNAL_CATCH_STRINGIZE2(__VA_ARGS__) +#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR +#define INTERNAL_CATCH_STRINGIZE2(...) #__VA_ARGS__ +#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param)) +#else +// MSVC is adding extra space and needs another indirection to expand INTERNAL_CATCH_NOINTERNAL_CATCH_DEF +#define INTERNAL_CATCH_STRINGIZE2(...) INTERNAL_CATCH_STRINGIZE3(__VA_ARGS__) +#define INTERNAL_CATCH_STRINGIZE3(...) #__VA_ARGS__ +#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) (INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param)) + 1) +#endif + +#define INTERNAL_CATCH_MAKE_NAMESPACE2(...) ns_##__VA_ARGS__ +#define INTERNAL_CATCH_MAKE_NAMESPACE(name) INTERNAL_CATCH_MAKE_NAMESPACE2(name) + +#define INTERNAL_CATCH_REMOVE_PARENS(...) INTERNAL_CATCH_EXPAND1(INTERNAL_CATCH_DEF __VA_ARGS__) + +#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR +#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) decltype(get_wrapper()) +#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__)) +#else +#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) INTERNAL_CATCH_EXPAND_VARGS(decltype(get_wrapper())) +#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__))) +#endif + +#define INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(...)\ + CATCH_REC_LIST(INTERNAL_CATCH_MAKE_TYPE_LIST,__VA_ARGS__) + +#define INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_0) INTERNAL_CATCH_REMOVE_PARENS(_0) +#define INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_0, _1) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_1) +#define INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_0, _1, _2) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_1, _2) +#define INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_0, _1, _2, _3) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_1, _2, _3) +#define INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_0, _1, _2, _3, _4) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_1, _2, _3, _4) +#define INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_0, _1, _2, _3, _4, _5) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_1, _2, _3, _4, _5) +#define INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_0, _1, _2, _3, _4, _5, _6) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_1, _2, _4, _5, _6) +#define INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_0, _1, _2, _3, _4, _5, _6, _7) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_1, _2, _3, _4, _5, _6, _7) +#define INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_1, _2, _3, _4, _5, _6, _7, _8) +#define INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9) +#define INTERNAL_CATCH_REMOVE_PARENS_11_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10) + +#define INTERNAL_CATCH_VA_NARGS_IMPL(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N + +#define INTERNAL_CATCH_TYPE_GEN\ + template struct TypeList {};\ + template\ + constexpr auto get_wrapper() noexcept -> TypeList { return {}; }\ + \ + template class L1, typename...E1, template class L2, typename...E2> \ + constexpr auto append(L1, L2) noexcept -> L1 { return {}; }\ + template< template class L1, typename...E1, template class L2, typename...E2, typename...Rest>\ + constexpr auto append(L1, L2, Rest...) noexcept -> decltype(append(L1{}, Rest{}...)) { return {}; }\ + template< template class L1, typename...E1, typename...Rest>\ + constexpr auto append(L1, TypeList, Rest...) noexcept -> L1 { return {}; }\ + \ + template< template class Container, template class List, typename...elems>\ + constexpr auto rewrap(List) noexcept -> TypeList> { return {}; }\ + template< template class Container, template class List, class...Elems, typename...Elements>\ + constexpr auto rewrap(List,Elements...) noexcept -> decltype(append(TypeList>{}, rewrap(Elements{}...))) { return {}; }\ + \ + template