Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[many ports] Include functional to fix error C2039 and C2504 #30946

Merged
merged 30 commits into from
Apr 27, 2023
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
80e70ab
[many ports] Include functional to fix error C2039 and C2504
LilyWangLL Apr 18, 2023
3183c48
update version
LilyWangLL Apr 18, 2023
e33dcf6
Apply suggestions
LilyWangLL Apr 18, 2023
8a80343
update version
LilyWangLL Apr 18, 2023
5ee82a4
update version
LilyWangLL Apr 18, 2023
f228735
Rename Include_functional.patch to include_functional.patch
LilyWangLL Apr 18, 2023
f9294c0
Rename Include_functional.patch to include_functional.patch
LilyWangLL Apr 18, 2023
4d53d95
Rename Include_functional.patch to include_functional.patch
LilyWangLL Apr 18, 2023
e0aee6c
Rename Include_functional.patch to include_functional.patch
LilyWangLL Apr 18, 2023
0468d34
Rename Include_functional.patch to include_functional.patch
LilyWangLL Apr 18, 2023
5c4cdaa
Rename Include_functional.patch to include_functional.patch
LilyWangLL Apr 18, 2023
d9df7d2
update version
LilyWangLL Apr 18, 2023
a020638
update libsbml to latest version
LilyWangLL Apr 18, 2023
f188bfb
update version
LilyWangLL Apr 18, 2023
71acefc
Update libsbml.json
LilyWangLL Apr 18, 2023
7be2834
fix libsbml build error
LilyWangLL Apr 19, 2023
02f776f
Merge branch 'dev/LilyWang/CI_Unstable_0417' of https://github.com/Li…
LilyWangLL Apr 19, 2023
39c4849
update version
LilyWangLL Apr 19, 2023
1101381
fix libsbml
LilyWangLL Apr 20, 2023
2d55180
update version
LilyWangLL Apr 20, 2023
9b06c41
update version
LilyWangLL Apr 20, 2023
0fbcbab
Merge branch 'master' into dev/LilyWang/CI_Unstable_0417
LilyWangLL Apr 24, 2023
013e812
fix conflicts
LilyWangLL Apr 24, 2023
96ce51b
update version
LilyWangLL Apr 24, 2023
d162a4d
revert changes of libsbml
LilyWangLL Apr 27, 2023
71ab595
update version
LilyWangLL Apr 27, 2023
eb74560
Update libsbml.json
LilyWangLL Apr 27, 2023
ac9f3b9
Merge branch 'master' into dev/LilyWang/CI_Unstable_0417
LilyWangLL Apr 27, 2023
a286866
resolve conflicts
LilyWangLL Apr 27, 2023
4621f50
update version
LilyWangLL Apr 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions ports/kenlm/include_functional.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/util/string_piece_hash.hh b/util/string_piece_hash.hh
index 6ff6f88..16808cd 100644
--- a/util/string_piece_hash.hh
+++ b/util/string_piece_hash.hh
@@ -1,6 +1,7 @@
#ifndef UTIL_STRING_PIECE_HASH_H
#define UTIL_STRING_PIECE_HASH_H

+#include <functional>
#include "util/have.hh"
#include "util/string_piece.hh"

18 changes: 8 additions & 10 deletions ports/kenlm/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,18 @@ vcpkg_from_github(
PATCHES
fix-boost.patch
fix-const-overloaded.patch
include_functional.patch
)

file(REMOVE ${SOURCE_PATH}/cmake/modules/FindEigen3.cmake)
file(REMOVE "${SOURCE_PATH}/cmake/modules/FindEigen3.cmake")

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES
interpolate ENABLE_INTERPOLATE
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
interpolate ENABLE_INTERPOLATE
)

if ("interpolate" IN_LIST FEATURES AND VCPKG_TARGET_IS_WINDOWS)
message(FATAL_ERROR "The interpolate feature does not support Windows.")
endif()

vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DFORCE_STATIC=OFF #already handled by vcpkg
Expand All @@ -45,5 +43,5 @@ vcpkg_copy_pdbs()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

# Copyright and License
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME license)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME license)
3 changes: 2 additions & 1 deletion ports/kenlm/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "kenlm",
"version": "20200924",
"port-version": 2,
"port-version": 3,
"description": "KenLM: Faster and Smaller Language Model Queries",
"supports": "!(arm64 & windows)",
"dependencies": [
Expand All @@ -26,6 +26,7 @@
"features": {
"interpolate": {
"description": "Build interpolation program",
"supports": "!windows",
LilyWangLL marked this conversation as resolved.
Show resolved Hide resolved
"dependencies": [
{
"name": "eigen3",
Expand Down
49 changes: 49 additions & 0 deletions ports/libsbml/fix-cmake.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
diff --git a/CMakeModules/FindLIBXML.cmake b/CMakeModules/FindLIBXML.cmake
LilyWangLL marked this conversation as resolved.
Show resolved Hide resolved
index 73e5f5a..f7ff0e7 100644
--- a/CMakeModules/FindLIBXML.cmake
+++ b/CMakeModules/FindLIBXML.cmake
@@ -66,7 +66,7 @@ if (EXISTS ${LIBICONV_LIBRARY})
set(ADDITIONAL_LIBS "${ADDITIONAL_LIBS}${LIBICONV_LIBRARY};")
endif()
find_package(ZLIB QUIET)
-if (EXISTS ${ZLIB_LIBRARY})
+if (ZLIB_FOUND)
set(ADDITIONAL_LIBS "${ADDITIONAL_LIBS}ZLIB::ZLIB;")
endif()
if (WIN32)
@@ -91,7 +91,7 @@ if(NOT TARGET LIBXML::LIBXML)
endif()

# figure out if we need XML_STATIC flag
-if (LIBXML_INCLUDE_DIR AND LIBXML_LIBRARY)
+if (0)

set(LIBXML_LIBXML_CODE
"
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 79301a6..b3deb41 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -536,18 +536,18 @@ if (${CMAKE_VERSION} VERSION_GREATER 2.8.7)

CONFIGURE_PACKAGE_CONFIG_FILE(
${CMAKE_CURRENT_LIST_DIR}/libsbml-static-config.cmake.in
- ${CMAKE_CURRENT_BINARY_DIR}/${LIBSBML_LIBRARY}-static-config.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/${LIBSBML_LIBRARY}-config.cmake
INSTALL_DESTINATION ${PACKAGE_CONFIG_DIR})

WRITE_BASIC_PACKAGE_VERSION_FILE(
- ${CMAKE_CURRENT_BINARY_DIR}/${LIBSBML_LIBRARY}-static-config-version.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/${LIBSBML_LIBRARY}-config-version.cmake
VERSION ${PROJECT_VERSION}
COMPATIBILITY AnyNewerVersion
)

INSTALL(FILES
- ${CMAKE_CURRENT_BINARY_DIR}/${LIBSBML_LIBRARY}-static-config-version.cmake
- ${CMAKE_CURRENT_BINARY_DIR}/${LIBSBML_LIBRARY}-static-config.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/${LIBSBML_LIBRARY}-config-version.cmake
LilyWangLL marked this conversation as resolved.
Show resolved Hide resolved
+ ${CMAKE_CURRENT_BINARY_DIR}/${LIBSBML_LIBRARY}-config.cmake
DESTINATION ${PACKAGE_CONFIG_DIR}
)
endif()
10 changes: 7 additions & 3 deletions ports/libsbml/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO sbmlteam/libsbml
REF 118ffbf11f1a5245cc544c1eac71019d979ecb20 #libSBML-5.19.0
SHA512 7fe8b4d594876c6408e01c646187cb1587d0b4e12707a43286150d4e4646841e547bde971de917de1cdfbbb9365172aeac43c8e02f7d354400f9166f0f1c2c3d
REF "v${VERSION}"
SHA512 c40f164ebd05a36f140ce2684dedb4bbccc51a2732383d3935fca1258738a9b9ba5bc1be2061f3b113b213e5cbb7fe22e9dca43ff78d91964c79cad093e55466
HEAD_REF development
PATCHES
fix-cmake.patch
)

string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_RUNTIME)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATIC_LIBRARY)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" DYNAMIC_LIBRARY)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
Expand Down Expand Up @@ -53,6 +56,7 @@ vcpkg_cmake_configure(
-DENABLE_L3V2EXTENDEDMATH:BOOL=ON
-DWITH_STATIC_RUNTIME=${STATIC_RUNTIME}
-DLIBSBML_SKIP_SHARED_LIBRARY=${STATIC_LIBRARY}
-DLIBSBML_SKIP_STATIC_LIBRARY=${DYNAMIC_LIBRARY}
)

vcpkg_cmake_install()
Expand Down Expand Up @@ -84,5 +88,5 @@ if(EXISTS "${CURRENT_PACKAGES_DIR}/README.md")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/README.md")
endif()

file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
vcpkg_fixup_pkgconfig()
5 changes: 3 additions & 2 deletions ports/libsbml/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "libsbml",
"version": "5.19.0",
"port-version": 2,
"version": "5.20.0",
"description": "A library for reading / writing SBML files",
"homepage": "https://github.com/sbmlteam/libsbml",
"license": "LGPL-2.1",
"supports": "!uwp",
"dependencies": [
{
Expand Down
12 changes: 12 additions & 0 deletions ports/mathgl/include_functional.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/src/prc/writePRC.h b/src/prc/writePRC.h
index d0b4e0e..3bc68ea 100644
--- a/src/prc/writePRC.h
+++ b/src/prc/writePRC.h
@@ -31,6 +31,7 @@
#include "PRC.h"
#include <float.h>
#include <math.h>
+#include <functional>

static const uint32_t m1=(uint32_t)-1;
static const double pi=acos(-1.0);
4 changes: 2 additions & 2 deletions ports/mathgl/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
vcpkg_minimum_required(VERSION 2022-10-12)
vcpkg_from_sourceforge(
OUT_SOURCE_PATH SOURCE_PATH
REPO mathgl/mathgl
Expand All @@ -15,6 +14,7 @@ vcpkg_from_sourceforge(
fix-format-specifiers.patch
fix-glut.patch
fix-mgllab.patch
include_functional.patch
)
file(REMOVE_RECURSE "${SOURCE_PATH}/addons/getopt")

Expand Down Expand Up @@ -104,4 +104,4 @@ vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/mgl2/config.h" "#define MG
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/mgl2/config.h" "#define MGL_FONT_PATH\t\"${CURRENT_PACKAGES_DIR}/share/mathgl/fonts\"" "")

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)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
1 change: 1 addition & 0 deletions ports/mathgl/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "mathgl",
"version": "8.0.1",
"port-version": 1,
"description": "MathGL is a free library of fast C++ routines for the plotting of the data varied in one or more dimensions",
"license": "GPL-3.0-only",
"supports": "!uwp",
Expand Down
12 changes: 12 additions & 0 deletions ports/moos-core/include_functional.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/Core/libMOOS/Utils/MOOSUtilityFunctions.cpp b/Core/libMOOS/Utils/MOOSUtilityFunctions.cpp
index 9d4473f..3f91018 100644
--- a/Core/libMOOS/Utils/MOOSUtilityFunctions.cpp
+++ b/Core/libMOOS/Utils/MOOSUtilityFunctions.cpp
@@ -47,6 +47,7 @@
#include <time.h>
#include <stdarg.h>
#include <math.h>
+#include <functional>

#ifndef _WIN32
#include <unistd.h>
7 changes: 3 additions & 4 deletions ports/moos-core/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@ 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
REF "v${VERSION}"
SHA512 8a82074bd219bbedbe56c2187afe74a55a252b0654a675c64d1f75e62353b0874e7b405d9f677fadb297e955d11aea50a07e8f5f3546be3c4ddab76fe356a51e
HEAD_REF master
PATCHES
cmake_fix.patch
include_functional.patch
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
OPTIONS
-DCMAKE_ENABLE_EXPORT=OFF
)

vcpkg_cmake_install()
Expand All @@ -26,4 +25,4 @@ 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")

file(INSTALL "${SOURCE_PATH}/Core/GPLCore.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/Core/GPLCore.txt")
4 changes: 2 additions & 2 deletions ports/moos-core/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "moos-core",
"version": "10.4.0",
"port-version": 7,
"port-version": 8,
"description": "A very light weight, easy to use middleware.",
"homepage": "https://sites.google.com/site/moossoftware/",
"license": null,
"license": "GPL-2.0-or-later",
"dependencies": [
{
"name": "vcpkg-cmake",
Expand Down
12 changes: 12 additions & 0 deletions ports/rappture/include_functional.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/src/core/RpUnits.h b/src/core/RpUnits.h
index a640205..e697424 100644
--- a/src/core/RpUnits.h
+++ b/src/core/RpUnits.h
@@ -59,6 +59,7 @@ enum RP_UNITS_CONSTS {
#include <stdlib.h>
#include <errno.h>
#include <math.h>
+#include <functional>

#include "RpDict.h"
#include "RpUnitsStd.h"
15 changes: 6 additions & 9 deletions ports/rappture/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ vcpkg_extract_source_archive(
SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES
"${CMAKE_CURRENT_LIST_DIR}/rappture.patch"
rappture.patch
include_functional.patch
)

file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")

vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
SOURCE_PATH "${SOURCE_PATH}"
)

vcpkg_cmake_install()
Expand All @@ -26,10 +27,6 @@ vcpkg_cmake_config_fixup()
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}/debug/share")

file(
INSTALL ${SOURCE_PATH}/license.terms
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}
RENAME copyright
)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/license.terms")
2 changes: 1 addition & 1 deletion ports/rappture/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "rappture",
"version": "1.9",
"port-version": 3,
"port-version": 4,
"description": "Rappture is a toolkit supporting Rapid application infrastructure, making it quick and easy to develop powerful scientific applications.",
"license": null,
"dependencies": [
Expand Down
24 changes: 24 additions & 0 deletions ports/spaceland/include_functional.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/src/sl/connectivity.hpp b/src/sl/connectivity.hpp
index 1942c6c..1b66b9d 100644
--- a/src/sl/connectivity.hpp
+++ b/src/sl/connectivity.hpp
@@ -26,6 +26,7 @@
#include <sl/operators.hpp>
#include <sl/hash.hpp>
#include <cassert>
+#include <functional>

namespace sl {

diff --git a/src/sl/hash.hpp b/src/sl/hash.hpp
index 3093a13..5f5b144 100644
--- a/src/sl/hash.hpp
+++ b/src/sl/hash.hpp
@@ -24,6 +24,7 @@
#define SL_HASH_HPP

#include <sl/utility.hpp>
+#include <functional>

namespace sl {

3 changes: 2 additions & 1 deletion ports/spaceland/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ vcpkg_download_distfile(ARCHIVE
vcpkg_extract_source_archive(
SOURCE_PATH
ARCHIVE "${ARCHIVE}"
PATCHES include_functional.patch
)

vcpkg_cmake_configure(
Expand All @@ -25,4 +26,4 @@ vcpkg_cmake_configure(
vcpkg_cmake_install()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
2 changes: 1 addition & 1 deletion ports/spaceland/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "spaceland",
"version": "7.8.2",
"port-version": 7,
"port-version": 8,
"description": "Spaceland Lib (sl) is a suite for geometric computation, specifically adapted to OpenGL.",
"dependencies": [
{
Expand Down
Loading