Skip to content

Commit 824f767

Browse files
Tobias-FischermbatcDerThorsten
authoredFeb 4, 2025··
Add packages needed for ROS2WASM (#1525)
* Add packages needed for ROS2WASM Co-authored-by: Michael Batchelor <[email protected]> * Update outdated pins for spdlog and fmt Co-authored-by: Michael Batchelor <[email protected]> * Updated match-spec for recent rattler-build * Add missing run_exports for fmt Co-authored-by: Michael Batchelor <[email protected]> * Update recipe-maintainers * Update maintainers for PCRE * Fixes for main branch * Undo activate-cross-python.sh changes --------- Co-authored-by: Michael Batchelor <[email protected]> Co-authored-by: Thorsten Beier <[email protected]>
1 parent 2fdc902 commit 824f767

32 files changed

+1084
-3
lines changed
 

‎conda_build_config.yaml

+7-2
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,9 @@ blas_impl:
231231
- mkl
232232
- blis
233233

234+
emscripten-abi:
235+
- '3.1.45'
236+
234237
abseil_cpp:
235238
- '20210324.2'
236239
alsa_lib:
@@ -307,6 +310,8 @@ davix:
307310
- '0.8'
308311
dbus:
309312
- 1
313+
emscripten_emscripten-wasm32:
314+
- 3.1.45
310315
exiv2:
311316
- 0.27
312317
expat:
@@ -318,7 +323,7 @@ fftw:
318323
flann:
319324
- 1.9.1
320325
fmt:
321-
- '8'
326+
- '11'
322327
fontconfig:
323328
- 2.13
324329
freetype:
@@ -617,7 +622,7 @@ soapysdr:
617622
sox:
618623
- 14.4.2
619624
spdlog:
620-
- 1.9
625+
- 1.15
621626
sqlite:
622627
- 3
623628
suitesparse:

‎pixi.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ platforms = ["osx-arm64", "osx-64", "linux-64"]
1212
############################################
1313
[feature.feature_rattler_build]
1414
[feature.feature_rattler_build.dependencies]
15-
rattler-build = ">=0.18.1"
15+
rattler-build = ">=0.34.1,<0.35"
1616
python = "3.11.*"
1717
typer = "*"
1818
curl = "*"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
set -e
4+
set -x
5+
6+
mkdir build
7+
pushd build
8+
9+
cmake ${CMAKE_ARGS} \
10+
-DCMAKE_BUILD_TYPE=release \
11+
-DCMAKE_INSTALL_PREFIX=$PREFIX \
12+
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
13+
-DTHREADS_PREFER_PTHREAD_FLAG=ON \
14+
-DBENCHMARK_ENABLE_TESTING=OFF \
15+
-DBENCHMARK_ENABLE_GTEST_TESTS=OFF \
16+
-DCMAKE_INSTALL_LIBDIR=lib \
17+
-DBUILD_SHARED_LIBS=ON \
18+
-DBENCHMARK_ENABLE_WERROR=OFF \
19+
-GNinja \
20+
..
21+
22+
ninja install
23+
24+
popd
25+
26+
# https://github.com/google/benchmark/issues/824
27+
if [[ `uname -s` == "Linux" ]]; then
28+
sed -i 's:INTERFACE_LINK_LIBRARIES "-pthread;.*:INTERFACE_LINK_LIBRARIES "-pthread":g' ${PREFIX}/lib/cmake/benchmark/benchmarkTargets.cmake
29+
fi
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
2+
index daf82fb13..d75695b97 100644
3+
--- a/src/CMakeLists.txt
4+
+++ b/src/CMakeLists.txt
5+
@@ -18,11 +18,13 @@ foreach(item ${BENCHMARK_MAIN})
6+
endforeach()
7+
8+
add_library(benchmark ${SOURCE_FILES})
9+
+
10+
add_library(benchmark::benchmark ALIAS benchmark)
11+
set_target_properties(benchmark PROPERTIES
12+
OUTPUT_NAME "benchmark"
13+
VERSION ${GENERIC_LIB_VERSION}
14+
SOVERSION ${GENERIC_LIB_SOVERSION}
15+
+ COMPILE_FLAGS "-s SIDE_MODULE=1"
16+
)
17+
target_include_directories(benchmark PUBLIC
18+
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
19+
@@ -71,6 +73,7 @@ set_target_properties(benchmark_main PROPERTIES
20+
VERSION ${GENERIC_LIB_VERSION}
21+
SOVERSION ${GENERIC_LIB_SOVERSION}
22+
DEFINE_SYMBOL benchmark_EXPORTS
23+
+ COMPILE_FLAGS "-s SIDE_MODULE=1"
24+
)
25+
target_link_libraries(benchmark_main PUBLIC benchmark::benchmark)
26+
27+
diff --git a/CMakeLists.txt b/CMakeLists.txt
28+
index 575728329..495b9bb3e 100644
29+
--- a/CMakeLists.txt
30+
+++ b/CMakeLists.txt
31+
@@ -10,6 +10,10 @@ option(BENCHMARK_USE_LIBCXX "Build and test using libc++ as the standard library
32+
option(BENCHMARK_ENABLE_WERROR "Build Release candidates with -Werror." ON)
33+
option(BENCHMARK_FORCE_WERROR "Build Release candidates with -Werror regardless of compiler issues." OFF)
34+
35+
+set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-s SIDE_MODULE=1")
36+
+set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-s SIDE_MODULE=1")
37+
+set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE)
38+
+
39+
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "PGI")
40+
# PGC++ maybe reporting false positives.
41+
set(BENCHMARK_ENABLE_WERROR OFF)
42+
@@ -214,9 +214,9 @@ else()
43+
# (because of deprecated overload)
44+
add_cxx_compiler_flag(-wd654)
45+
add_cxx_compiler_flag(-Wthread-safety)
46+
- if (HAVE_CXX_FLAG_WTHREAD_SAFETY)
47+
- cxx_feature_check(THREAD_SAFETY_ATTRIBUTES "-DINCLUDE_DIRECTORIES=${PROJECT_SOURCE_DIR}/include")
48+
- endif()
49+
+ # if (HAVE_CXX_FLAG_WTHREAD_SAFETY)
50+
+ # cxx_feature_check(THREAD_SAFETY_ATTRIBUTES "-DINCLUDE_DIRECTORIES=${PROJECT_SOURCE_DIR}/include")
51+
+ # endif()
52+
53+
# On most UNIX like platforms g++ and clang++ define _GNU_SOURCE as a
54+
# predefined macro, which turns on all of the wonderful libc extensions.
55+
@@ -305,7 +305,7 @@ if (NOT BENCHMARK_ENABLE_EXCEPTIONS AND HAVE_STD_REGEX
56+
message(WARNING "Using std::regex with exceptions disabled is not fully supported")
57+
endif()
58+
59+
-cxx_feature_check(STEADY_CLOCK)
60+
+# cxx_feature_check(STEADY_CLOCK)
61+
# Ensure we have pthreads
62+
set(THREADS_PREFER_PTHREAD_FLAG ON)
63+
find_package(Threads REQUIRED)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
context:
2+
version: "1.8.3"
3+
4+
package:
5+
name: "benchmark"
6+
version: ${{ version }}
7+
8+
source:
9+
url: https://github.com/google/benchmark/archive/v${{ version }}.tar.gz
10+
sha256: 6bc180a57d23d4d9515519f92b0c83d61b05b5bab188961f36ac7b06b0d9e9ce
11+
patches:
12+
- fix-build.patch
13+
14+
build:
15+
number: 3
16+
17+
requirements:
18+
build:
19+
- cmake
20+
- ninja
21+
- ${{ compiler("c") }}
22+
- ${{ compiler("cxx") }}
23+
24+
tests:
25+
- package_contents:
26+
include:
27+
- benchmark/benchmark.h
28+
lib:
29+
- libbenchmark.so
30+
- libbenchmark_main.so
31+
32+
about:
33+
homepage: https://github.com/google/benchmark
34+
license: Apache-2.0
35+
license_family: Apache
36+
license_file: LICENSE
37+
summary: A microbenchmark support library
38+
39+
extra:
40+
recipe-maintainers:
41+
- Tobias-Fischer
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
From a42b4e1d835548c284c1f57c93b4c51fa5083692 Mon Sep 17 00:00:00 2001
2+
From: Silvio Traversaro <silvio.traversaro@iit.it>
3+
Date: Sat, 2 Apr 2022 16:27:28 +0200
4+
Subject: [PATCH] Install pkg-config .pc file also on Windows/MSVC
5+
6+
Signed-off-by: Silvio <silvio@traversaro.it>
7+
---
8+
CMakeLists.txt | 14 ++++++--------
9+
1 file changed, 6 insertions(+), 8 deletions(-)
10+
11+
diff --git a/CMakeLists.txt b/CMakeLists.txt
12+
index 3f55509..0ba726a 100644
13+
--- a/CMakeLists.txt
14+
+++ b/CMakeLists.txt
15+
@@ -107,14 +107,12 @@ install(FILES
16+
"${CMAKE_BINARY_DIR}/${cmake_conf_version_file}"
17+
DESTINATION ${CMAKE_CONFIG_INSTALL_DIR} COMPONENT cmake)
18+
19+
-if (NOT MSVC)
20+
- set(PKG_DESC "Console Bridge")
21+
- set(PKG_CB_LIBS "-l${PROJECT_NAME}")
22+
- set(pkg_conf_file "console_bridge.pc")
23+
- configure_file("${pkg_conf_file}.in" "${CMAKE_BINARY_DIR}/${pkg_conf_file}" @ONLY)
24+
- install(FILES "${CMAKE_BINARY_DIR}/${pkg_conf_file}"
25+
- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/ COMPONENT pkgconfig)
26+
-endif()
27+
+set(PKG_DESC "Console Bridge")
28+
+set(PKG_CB_LIBS "-l${PROJECT_NAME}")
29+
+set(pkg_conf_file "console_bridge.pc")
30+
+configure_file("${pkg_conf_file}.in" "${CMAKE_BINARY_DIR}/${pkg_conf_file}" @ONLY)
31+
+install(FILES "${CMAKE_BINARY_DIR}/${pkg_conf_file}"
32+
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig/ COMPONENT pkgconfig)
33+
34+
SET_DIRECTORY_PROPERTIES(PROPERTIES
35+
ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_BINARY_DIR}/console_bridge-config.cmake
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
3+
mkdir build
4+
cd build
5+
6+
cmake ${CMAKE_ARGS} .. \
7+
-DCMAKE_BUILD_TYPE=Release \
8+
-DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_INSTALL_PREFIX=$PREFIX \
9+
-DCMAKE_INSTALL_LIBDIR=lib
10+
make
11+
make install
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
context:
2+
name: console_bridge
3+
version: 1.0.2
4+
5+
package:
6+
name: ${{ name }}
7+
version: ${{ version }}
8+
9+
source:
10+
url: https://github.com/ros/${{ name }}/archive/${{ version }}.tar.gz
11+
sha256: 303a619c01a9e14a3c82eb9762b8a428ef5311a6d46353872ab9a904358be4a4
12+
patches:
13+
- 96.patch
14+
15+
build:
16+
number: 0
17+
18+
requirements:
19+
build:
20+
- ${{ compiler("cxx") }}
21+
- cmake
22+
- make
23+
run_exports:
24+
- ${{ pin_subpackage(name, upper_bound='x.x') }}
25+
26+
about:
27+
homepage: http://github.com/ros/console_bridge
28+
license: BSD-3-Clause
29+
license_family: BSD
30+
license_file: LICENSE
31+
summary: A ROS-independent package for logging that seamlessly pipes into rosconsole/rosout for ROS-dependent packages.
32+
33+
extra:
34+
recipe-maintainers:
35+
- Tobias-Fischer
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
export CONDA_BUILD_CROSS_COMPILATION="1"
4+
5+
declare -a CMAKE_PLATFORM_FLAGS
6+
if [[ ${target_platform} == osx-64 ]]; then
7+
CMAKE_PLATFORM_FLAGS+=(-DCMAKE_OSX_SYSROOT="${CONDA_BUILD_SYSROOT}")
8+
fi
9+
10+
mkdir build && cd build
11+
cmake ${CMAKE_ARGS} \
12+
-DCMAKE_INSTALL_PREFIX=$PREFIX \
13+
-DCMAKE_BUILD_TYPE=Release \
14+
"${CMAKE_PLATFORM_FLAGS[@]}" \
15+
$SRC_DIR
16+
17+
make install -j ${CPU_COUNT}
18+
19+
cd ..
20+
cd htmlreport
21+
22+
$PYTHON setup.py install --single-version-externally-managed --record=record.txt
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
From ae0c9fcc591c30fa69d18a2241048020ef3c5bbd Mon Sep 17 00:00:00 2001
2+
From: Mick Batchelor <mickbatch98@gmail.com>
3+
Date: Thu, 10 Aug 2023 00:12:22 +1000
4+
Subject: [PATCH 2/2] fix wasm extension for dmake
5+
6+
---
7+
lib/smallvector.h | 15 ++-------------
8+
tools/CMakeLists.txt | 16 +++++++++++++---
9+
2 files changed, 15 insertions(+), 16 deletions(-)
10+
11+
diff --git a/lib/smallvector.h b/lib/smallvector.h
12+
index 42c45a173..00f2df7f1 100644
13+
--- a/lib/smallvector.h
14+
+++ b/lib/smallvector.h
15+
@@ -32,25 +32,14 @@ using SmallVector = boost::container::small_vector<T, N>;
16+
#include <utility>
17+
#include <vector>
18+
19+
-template<class T, std::size_t N>
20+
-struct TaggedAllocator : std::allocator<T>
21+
-{
22+
- template<class ... Ts>
23+
- // cppcheck-suppress noExplicitConstructor
24+
- // NOLINTNEXTLINE(google-explicit-constructor)
25+
- TaggedAllocator(Ts&&... ts)
26+
- : std::allocator<T>(std::forward<Ts>(ts)...)
27+
- {}
28+
-};
29+
-
30+
template<typename T, std::size_t N = DefaultSmallVectorSize>
31+
-class SmallVector : public std::vector<T, TaggedAllocator<T, N>>
32+
+class SmallVector : public std::vector<T>
33+
{
34+
public:
35+
template<class ... Ts>
36+
// NOLINTNEXTLINE(google-explicit-constructor)
37+
SmallVector(Ts&&... ts)
38+
- : std::vector<T, TaggedAllocator<T, N>>(std::forward<Ts>(ts)...)
39+
+ : std::vector<T>(std::forward<Ts>(ts)...)
40+
{
41+
this->reserve(N);
42+
}
43+
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
44+
index cbf3f8bcc..02ba65e62 100644
45+
--- a/tools/CMakeLists.txt
46+
+++ b/tools/CMakeLists.txt
47+
@@ -9,6 +9,10 @@ foreach(file ${srcs_lib})
48+
set(srcs_tools ${srcs_tools} ${src})
49+
endforeach()
50+
51+
+if (EMSCRIPTEN)
52+
+ set(CMAKE_EXECUTABLE_SUFFIX ".wasm")
53+
+endif()
54+
+
55+
add_executable(dmake EXCLUDE_FROM_ALL
56+
dmake.cpp
57+
${CMAKE_SOURCE_DIR}/cli/filelister.cpp
58+
@@ -25,6 +29,12 @@ if (WIN32 AND NOT BORLAND)
59+
endif()
60+
endif()
61+
62+
-add_custom_target(run-dmake $<TARGET_FILE:dmake>
63+
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
64+
- DEPENDS dmake)
65+
+if (NOT EMSCRIPTEN)
66+
+ add_custom_target(run-dmake $<TARGET_FILE:dmake>
67+
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
68+
+ DEPENDS dmake)
69+
+endif()
70+
+
71+
+if (EMSCRIPTEN)
72+
+ set(CMAKE_EXECUTABLE_SUFFIX ".wasm")
73+
+endif()
74+
--
75+
2.39.2.windows.1
76+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
From d8ecdabd1065d60d7fcab1d71fea359c652cee68 Mon Sep 17 00:00:00 2001
2+
From: Tim Snyder <snyder.tim@gmail.com>
3+
Date: Sat, 25 Feb 2023 00:00:34 +0000
4+
Subject: [PATCH] force prefix to c-strings for relocation
5+
6+
is update of fix for cppcheck-feedstock#8
7+
---
8+
cli/cppcheckexecutor.cpp | 5 +++--
9+
gui/helpdialog.cpp | 3 ++-
10+
gui/mainwindow.cpp | 3 ++-
11+
gui/projectfile.cpp | 6 +++---
12+
gui/projectfiledialog.cpp | 5 +++--
13+
lib/cppcheck.cpp | 9 +++++----
14+
lib/library.cpp | 3 ++-
15+
lib/platform.cpp | 2 +-
16+
lib/settings.cpp | 5 +++--
17+
9 files changed, 24 insertions(+), 17 deletions(-)
18+
19+
diff --git a/cli/cppcheckexecutor.cpp b/cli/cppcheckexecutor.cpp
20+
index 81202d54e..a0bda3afe 100644
21+
--- a/cli/cppcheckexecutor.cpp
22+
+++ b/cli/cppcheckexecutor.cpp
23+
@@ -283,9 +283,10 @@ int CppCheckExecutor::check_internal(CppCheck& cppcheck)
24+
const std::list<ErrorMessage::FileLocation> callstack;
25+
const std::string msg("Failed to load std.cfg. Your Cppcheck installation is broken, please re-install.");
26+
#ifdef FILESDIR
27+
+ const std::string filesdir(std::string(FILESDIR).c_str());
28+
const std::string details("The Cppcheck binary was compiled with FILESDIR set to \""
29+
- FILESDIR "\" and will therefore search for "
30+
- "std.cfg in " FILESDIR "/cfg.");
31+
+ + filesdir + "\" and will therefore search for "
32+
+ "std.cfg in " + filesdir + "/cfg.");
33+
#else
34+
const std::string cfgfolder(Path::fromNativeSeparators(Path::getPathFromFilename(settings.exename)) + "cfg");
35+
const std::string details("The Cppcheck binary was compiled without FILESDIR set. Either the "
36+
diff --git a/gui/helpdialog.cpp b/gui/helpdialog.cpp
37+
index e9aac0689..02de809ae 100644
38+
--- a/gui/helpdialog.cpp
39+
+++ b/gui/helpdialog.cpp
40+
@@ -56,7 +56,8 @@ static QString getHelpFile()
41+
<< (QApplication::applicationDirPath() + "/help")
42+
<< QApplication::applicationDirPath();
43+
#ifdef FILESDIR
44+
- const QString filesdir = FILESDIR;
45+
+ std::string stdfilesdir(std::string(FILESDIR).c_str());
46+
+ const QString filesdir = stdfilesdir;
47+
paths << (filesdir + "/help")
48+
<< filesdir;
49+
#endif
50+
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp
51+
index 9188ffe62..da0c16721 100644
52+
--- a/gui/mainwindow.cpp
53+
+++ b/gui/mainwindow.cpp
54+
@@ -803,7 +803,8 @@ Library::Error MainWindow::loadLibrary(Library *library, const QString &filename
55+
56+
#ifdef FILESDIR
57+
// Try to load the library from FILESDIR/cfg..
58+
- const QString filesdir = FILESDIR;
59+
+ std::string stdfilesdir(std::string(FILESDIR).c_str());
60+
+ const QString filesdir = stdfilesdir;
61+
if (!filesdir.isEmpty()) {
62+
ret = library->load(nullptr, (filesdir+"/cfg/"+filename).toLatin1());
63+
if (ret.errorcode != Library::ErrorCode::FILE_NOT_FOUND)
64+
diff --git a/gui/projectfile.cpp b/gui/projectfile.cpp
65+
index 03e02338a..5be61c867 100644
66+
--- a/gui/projectfile.cpp
67+
+++ b/gui/projectfile.cpp
68+
@@ -1101,11 +1101,11 @@ QString ProjectFile::getAddonFilePath(QString filesDir, const QString &addon)
69+
filesDir += "/";
70+
71+
QStringList searchPaths;
72+
- searchPaths << filesDir << (filesDir + "addons/") << (filesDir + "../addons/")
73+
+ searchPaths << filesDir << (filesDir + "addons/") << (filesDir + "../addons/");
74+
#ifdef FILESDIR
75+
- << (QLatin1String(FILESDIR) + "/addons/")
76+
+ std::string stdfilesdir(std::string(FILESDIR).c_str());
77+
+ searchPaths << (QLatin1String(stdfilesdir) + "/addons/");
78+
#endif
79+
- ;
80+
81+
for (const QString& path : searchPaths) {
82+
QString f = path + addon + ".py";
83+
diff --git a/gui/projectfiledialog.cpp b/gui/projectfiledialog.cpp
84+
index 2eca3c2a7..81e106c88 100644
85+
--- a/gui/projectfiledialog.cpp
86+
+++ b/gui/projectfiledialog.cpp
87+
@@ -108,8 +108,9 @@ ProjectFileDialog::ProjectFileDialog(ProjectFile *projectFile, bool premium, QWi
88+
QStringList searchPaths;
89+
searchPaths << appPath << appPath + "/cfg" << inf.canonicalPath();
90+
#ifdef FILESDIR
91+
- if (FILESDIR[0])
92+
- searchPaths << FILESDIR << FILESDIR "/cfg";
93+
+ std::string filesdir(std::string(FILESDIR).c_str());
94+
+ if (filesdir[0])
95+
+ searchPaths << filesdir << filesdir + "/cfg";
96+
#endif
97+
if (!datadir.isEmpty())
98+
searchPaths << datadir << datadir + "/cfg";
99+
diff --git a/lib/cppcheck.cpp b/lib/cppcheck.cpp
100+
index da577d71d..681650324 100644
101+
--- a/lib/cppcheck.cpp
102+
+++ b/lib/cppcheck.cpp
103+
@@ -103,10 +103,11 @@ namespace {
104+
return exepath + "addons/" + fileName;
105+
106+
#ifdef FILESDIR
107+
- if (Path::fileExists(FILESDIR + ("/" + fileName)))
108+
- return FILESDIR + ("/" + fileName);
109+
- if (Path::fileExists(FILESDIR + ("/addons/" + fileName)))
110+
- return FILESDIR + ("/addons/" + fileName);
111+
+ std::string filesdir(std::string(FILESDIR).c_str());
112+
+ if (Path::fileExists(filesdir + ("/" + fileName)))
113+
+ return filesdir + ("/" + fileName);
114+
+ if (Path::fileExists(filesdir + ("/addons/" + fileName)))
115+
+ return filesdir + ("/addons/" + fileName);
116+
#endif
117+
return "";
118+
}
119+
diff --git a/lib/library.cpp b/lib/library.cpp
120+
index 14f7aa4da..5acf5896d 100644
121+
--- a/lib/library.cpp
122+
+++ b/lib/library.cpp
123+
@@ -103,7 +103,8 @@ Library::Error Library::load(const char exename[], const char path[])
124+
125+
std::list<std::string> cfgfolders;
126+
#ifdef FILESDIR
127+
- cfgfolders.emplace_back(FILESDIR "/cfg");
128+
+ std::string filesdir(std::string(FILESDIR).c_str());
129+
+ cfgfolders.emplace_back(filesdir + "/cfg");
130+
#endif
131+
if (exename) {
132+
const std::string exepath(Path::fromNativeSeparators(Path::getPathFromFilename(exename)));
133+
diff --git a/lib/platform.cpp b/lib/platform.cpp
134+
index ade5f4541..4615dc0c8 100644
135+
--- a/lib/platform.cpp
136+
+++ b/lib/platform.cpp
137+
@@ -172,7 +172,7 @@ bool cppcheck::Platform::loadPlatformFile(const char exename[], const std::strin
138+
filenames.push_back(Path::getPathFromFilename(Path::fromNativeSeparators(exename)) + "platforms/" + filename + ".xml");
139+
}
140+
#ifdef FILESDIR
141+
- std::string filesdir = FILESDIR;
142+
+ std::string filesdir(std::string(FILESDIR).c_str());
143+
if (!filesdir.empty() && filesdir[filesdir.size()-1] != '/')
144+
filesdir += '/';
145+
filenames.push_back(filesdir + ("platforms/" + filename));
146+
diff --git a/lib/settings.cpp b/lib/settings.cpp
147+
index 94d455afb..5d06feca1 100644
148+
--- a/lib/settings.cpp
149+
+++ b/lib/settings.cpp
150+
@@ -82,8 +82,9 @@ void Settings::loadCppcheckCfg()
151+
{
152+
std::string fileName = Path::getPathFromFilename(exename) + "cppcheck.cfg";
153+
#ifdef FILESDIR
154+
- if (Path::fileExists(FILESDIR "/cppcheck.cfg"))
155+
- fileName = FILESDIR "/cppcheck.cfg";
156+
+ std::string filesdir(std::string(FILESDIR).c_str());
157+
+ if (Path::fileExists(filesdir + "/cppcheck.cfg"))
158+
+ fileName = filesdir + "/cppcheck.cfg";
159+
#endif
160+
161+
std::ifstream fin(fileName);
162+
--
163+
2.39.1
164+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
context:
2+
name: cppcheck
3+
version: 2.10.3
4+
5+
package:
6+
name: ${{ name }}
7+
version: ${{ version }}
8+
9+
source:
10+
url: https://github.com/danmar/cppcheck/archive/${{ version }}.tar.gz
11+
sha256: 8aae5e116daeaaf5d19f3efa61b91c06f161cb97412a1d1af6e1e20686e48967
12+
patches:
13+
- patch/fix-binary-relocation-issue-1.90.patch
14+
- patch/0001-fix-wasm-extension-for-dmake.patch
15+
16+
build:
17+
number: 0
18+
19+
requirements:
20+
build:
21+
- python
22+
- cross-python_emscripten-wasm32
23+
- ${{ compiler("c") }}
24+
- ${{ compiler("cxx") }}
25+
- make
26+
- cmake
27+
- pygments
28+
host:
29+
- python
30+
- setuptools
31+
- pcre
32+
run:
33+
- pcre
34+
- python
35+
- pygments
36+
37+
about:
38+
description: Cppcheck is a static analysis tool for C/C++ code. Unlike C/C++ compilers and many other analysis tools it does not detect syntax errors in the code. Cppcheck primarily detects the types of bugs that the compilers normally do not detect. The goal is to detect only real errors in the code (i.e. have zero false
39+
positives).
40+
homepage: http://cppcheck.sourceforge.net/
41+
license: GPL-3.0-or-later
42+
license_family: GPL
43+
license_file: COPYING
44+
summary: A static analysis tool for C/C++ code.
45+
46+
extra:
47+
recipe-maintainers:
48+
- Tobias-Fischer

‎recipes/recipes_emscripten/fmt/recipe.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ requirements:
1818
- ${{ compiler("cxx") }}
1919
- cmake
2020
- ninja
21+
run_exports:
22+
- ${{ pin_subpackage('fmt', upper_bound='x') }}
2123

2224
tests:
2325
- package_contents:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Patch by @mingwandroid
2+
3+
--- work/pcregrep.c.orig 2018-02-25 06:22:13.000000000 -0600
4+
+++ work/pcregrep.c 2018-04-11 17:29:35.172681800 -0500
5+
@@ -71,6 +71,12 @@
6+
7+
#include "pcre.h"
8+
9+
+#if defined(_MSC_VER)
10+
+#if (_MSC_VER < 1900)
11+
+#define snprintf(_o, _n, _f, ...) _snprintf_s(_o, _n, _n, _f, __VA_ARGS__)
12+
+#endif
13+
+#endif
14+
+
15+
#define FALSE 0
16+
#define TRUE 1
17+
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
# Get an updated config.sub and config.guess
3+
cp $BUILD_PREFIX/share/libtool/build-aux/config.* .
4+
5+
emconfigure ./configure --prefix="${PREFIX}" \
6+
--host="${HOST}" \
7+
--enable-utf \
8+
--enable-unicode-properties \
9+
--disable-shared
10+
emmake make -j${CPU_COUNT} ${VERBOSE_AT}
11+
emmake make install
12+
13+
# Delete man pages.
14+
rm -rf "${PREFIX}/share"
15+
16+
# We can remove this when we start using the new conda-build.
17+
find $PREFIX -name '*.la' -delete
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
context:
2+
name: pcre
3+
version: "8.45"
4+
5+
package:
6+
name: pcre
7+
version: ${{ version }}
8+
9+
source:
10+
url: https://ftp.exim.org/pub/pcre/pcre-${{ version }}.tar.gz
11+
sha256: 4e6ce03e0336e8b4a3d6c2b70b1c5e18590a5673a98186da90d4f33c23defc09
12+
patches:
13+
- 0001-Define-snprintf-for-old-VS.patch
14+
15+
build:
16+
number: 0
17+
18+
requirements:
19+
build:
20+
- ${{ compiler("c") }}
21+
- ${{ compiler("cxx") }}
22+
- libtool
23+
- pkg-config
24+
- libtool
25+
- make
26+
run_exports:
27+
- ${{ pin_subpackage('pcre', upper_bound='x') }}
28+
29+
about:
30+
homepage: http://www.pcre.org/
31+
license: BSD-3-Clause
32+
license_file: LICENCE
33+
summary: Regular expression pattern matching using the same syntax and semantics as Perl 5.
34+
35+
extra:
36+
recipe-maintainers:
37+
- Tobias-Fischer
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
From e693420a38b58d29a56b3ea921e15b175a5f2843 Mon Sep 17 00:00:00 2001
2+
From: Rui Chen <rui@chenrui.dev>
3+
Date: Wed, 25 Dec 2024 19:00:36 -0500
4+
Subject: [PATCH] fix: update to_string_view function for fmt 11.1
5+
6+
Signed-off-by: Rui Chen <rui@chenrui.dev>
7+
---
8+
include/spdlog/common.h | 7 +++++++
9+
1 file changed, 7 insertions(+)
10+
11+
diff --git a/include/spdlog/common.h b/include/spdlog/common.h
12+
index aca483c20..2d73f8300 100644
13+
--- a/include/spdlog/common.h
14+
+++ b/include/spdlog/common.h
15+
@@ -365,10 +365,17 @@ SPDLOG_CONSTEXPR_FUNC spdlog::wstring_view_t to_string_view(spdlog::wstring_view
16+
#endif
17+
18+
#ifndef SPDLOG_USE_STD_FORMAT
19+
+#if FMT_VERSION >= 110100
20+
+template <typename T, typename... Args>
21+
+inline fmt::basic_string_view<T> to_string_view(fmt::basic_format_arg<T> fmt) {
22+
+ return fmt;
23+
+}
24+
+#else
25+
template <typename T, typename... Args>
26+
inline fmt::basic_string_view<T> to_string_view(fmt::basic_format_string<T, Args...> fmt) {
27+
return fmt;
28+
}
29+
+#endif
30+
#elif __cpp_lib_format >= 202207L
31+
template <typename T, typename... Args>
32+
SPDLOG_CONSTEXPR_FUNC std::basic_string_view<T> to_string_view(
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
mkdir build
4+
cd build
5+
6+
echo "set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE)"> $SRC_DIR/shared_lib_patch.cmake
7+
echo "set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS \"-s SIDE_MODULE=1\")">> $SRC_DIR/shared_lib_patch.cmake
8+
echo "set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS \"-s SIDE_MODULE=1\")">> $SRC_DIR/shared_lib_patch.cmake
9+
echo "set(CMAKE_STRIP FALSE) # used by default in pybind11 on .so modules">> $SRC_DIR/shared_lib_patch.cmake
10+
11+
cmake ${CMAKE_ARGS} \
12+
-D CMAKE_BUILD_TYPE=Release \
13+
-D CMAKE_INSTALL_PREFIX=$PREFIX \
14+
-D SPDLOG_BUILD_TESTS=OFF \
15+
-D CMAKE_INSTALL_LIBDIR=lib \
16+
-D CMAKE_PROJECT_INCLUDE=$SRC_DIR/shared_lib_patch.cmake \
17+
-D SPDLOG_BUILD_SHARED=ON \
18+
-D SPDLOG_BUILD_EXAMPLE=OFF \
19+
-D SPDLOG_FMT_EXTERNAL=ON ..
20+
21+
make -j${CPU_COUNT}
22+
make install
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
diff --git a/include/spdlog/tweakme.h b/include/spdlog/tweakme.h
2+
index 5c118858..15b70e19 100644
3+
--- a/include/spdlog/tweakme.h
4+
+++ b/include/spdlog/tweakme.h
5+
@@ -78,7 +78,9 @@
6+
// In this case spdlog will try to include <fmt/format.h> so set your -I flag
7+
// accordingly.
8+
//
9+
-// #define SPDLOG_FMT_EXTERNAL
10+
+#ifndef SPDLOG_FMT_EXTERNAL
11+
+#define SPDLOG_FMT_EXTERNAL
12+
+#endif
13+
///////////////////////////////////////////////////////////////////////////////
14+
15+
///////////////////////////////////////////////////////////////////////////////
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
context:
2+
version: 1.15.0
3+
4+
package:
5+
name: spdlog
6+
version: ${{ version }}
7+
8+
source:
9+
url: https://github.com/gabime/spdlog/archive/v${{ version }}.tar.gz
10+
sha256: 9962648c9b4f1a7bbc76fd8d9172555bad1871fdb14ff4f842ef87949682caa5
11+
patches:
12+
- fix.patch
13+
- 3301.patch
14+
15+
build:
16+
number: 2
17+
18+
requirements:
19+
build:
20+
- cmake
21+
- ${{ compiler("cxx") }}
22+
- make
23+
host:
24+
- fmt
25+
run_exports:
26+
- ${{ pin_subpackage('spdlog', upper_bound='x.x') }}
27+
28+
tests:
29+
- package_contents:
30+
include:
31+
- spdlog/spdlog.h
32+
33+
about:
34+
homepage: https://github.com/gabime/spdlog
35+
license: MIT
36+
license_family: MIT
37+
license_file: LICENSE
38+
summary: Super fast C++ logging library.
39+
40+
description: |
41+
spdlog is a header only library for Super fast C++ logging
42+
to be used with a C++11 compiler.
43+
44+
extra:
45+
recipe-maintainers:
46+
- Tobias-Fischer
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
mkdir build
2+
cd build
3+
4+
unset -f cmake
5+
emcmake cmake ${CMAKE_ARGS} .. \
6+
-G "Ninja" \
7+
-DCMAKE_BUILD_TYPE=Release \
8+
-DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_INSTALL_PREFIX=$PREFIX \
9+
-DCMAKE_INSTALL_LIBDIR=lib \
10+
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=ON \
11+
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
12+
-DBUILD_SHARED_LIBS=ON
13+
14+
cmake --build . --config Release -- -j$CPU_COUNT
15+
cmake --build . --config Release --target install
16+
17+
rm -rf $PREFIX/man1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
context:
2+
name: uncrustify
3+
version: 0.74.0
4+
5+
package:
6+
name: ${{ name }}
7+
version: ${{ version }}
8+
9+
source:
10+
- url: https://github.com/uncrustify/uncrustify/archive/${{ name }}-${{ version }}.tar.gz
11+
sha256: b7d24e256e7f919aa96289ac8167ac98340df7faa2d34b60d2242dc54700caaa
12+
13+
build:
14+
number: 0
15+
16+
requirements:
17+
build:
18+
- ${{ compiler("cxx") }}
19+
- ${{ compiler("c") }}
20+
- ninja
21+
- cmake
22+
run_exports:
23+
- ${{ pin_subpackage('uncrustify', upper_bound='x.x') }}
24+
25+
about:
26+
homepage: http://uncrustify.sourceforge.net/
27+
license: GPL-2.0-only
28+
license_file: COPYING
29+
summary: |
30+
A source code beautifier for C, C++, C#, ObjectiveC, D, Java, Pawn and VALA
31+
32+
extra:
33+
recipe-maintainers:
34+
- Tobias-Fischer
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
mkdir build
4+
cd build
5+
6+
export CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_PROJECT_INCLUDE=${RECIPE_DIR}/overwriteProp.cmake"
7+
8+
# Configure step
9+
cmake $CMAKE_ARGS \
10+
-GNinja \
11+
-DYAML_BUILD_SHARED_LIBS=ON \
12+
-DYAML_CPP_BUILD_TOOLS=OFF \
13+
-DYAML_CPP_BUILD_TESTS=OFF \
14+
-DCMAKE_BUILD_TYPE=Release \
15+
-DCMAKE_PREFIX_PATH=$PREFIX \
16+
-DCMAKE_INSTALL_PREFIX=$PREFIX \
17+
$SRC_DIR
18+
19+
# Build step
20+
ninja install
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE) # does not need to be global :)
2+
set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-s SIDE_MODULE=1")
3+
set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-s SIDE_MODULE=1")
4+
set(CMAKE_STRIP FALSE) # used by default in pybind11 on .so modules # only for needed when using pybind11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
From df83a0b654b1b49cfd24455c36ee03d7ed6cfa6f Mon Sep 17 00:00:00 2001
2+
From: Mick Batchelor <mickbatch98@gmail.com>
3+
Date: Sat, 2 Sep 2023 14:10:50 +1000
4+
Subject: [PATCH 2/2] emscripten shared fix
5+
6+
---
7+
CMakeLists.txt | 4 ++++
8+
1 file changed, 4 insertions(+)
9+
10+
diff --git a/CMakeLists.txt b/CMakeLists.txt
11+
index b230b9e..d6ac211 100644
12+
--- a/CMakeLists.txt
13+
+++ b/CMakeLists.txt
14+
@@ -107,6 +107,10 @@ target_compile_options(yaml-cpp
15+
# http://msdn.microsoft.com/en-us/library/3c594ae3.aspx
16+
$<$<CXX_COMPILER_ID:MSVC>:/W3 /wd4127 /wd4355>)
17+
18+
+if (EMSCRIPTEN)
19+
+ target_compile_options(yaml-cpp PUBLIC -fPIC)
20+
+endif()
21+
+
22+
target_compile_definitions(yaml-cpp
23+
PRIVATE
24+
$<${build-windows-dll}:${PROJECT_NAME}_DLL>
25+
--
26+
2.39.2.windows.1
27+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index b230b9e6d..446a6eed3 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -127,6 +127,7 @@ set_target_properties(yaml-cpp PROPERTIES
6+
PROJECT_LABEL "yaml-cpp ${yaml-cpp-label-postfix}"
7+
DEBUG_POSTFIX "${CMAKE_DEBUG_POSTFIX}")
8+
9+
+set(EXPORT_TARGETS yaml-cpp)
10+
configure_package_config_file(
11+
"${PROJECT_SOURCE_DIR}/yaml-cpp-config.cmake.in"
12+
"${PROJECT_BINARY_DIR}/yaml-cpp-config.cmake"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index b230b9e..f65efef 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -31,11 +31,13 @@ cmake_dependent_option(YAML_MSVC_SHARED_RT
6+
"MSVC: Build yaml-cpp with shared runtime libs (/MD)" ON
7+
"MSVC" OFF)
8+
9+
-set(yaml-cpp-type STATIC)
10+
-set(yaml-cpp-label-postfix "static")
11+
if (YAML_BUILD_SHARED_LIBS)
12+
set(yaml-cpp-type SHARED)
13+
set(yaml-cpp-label-postfix "shared")
14+
+else()
15+
+ set(yaml-cpp-type STATIC)
16+
+ set(yaml-cpp-label-postfix "static")
17+
+ add_definitions(-DYAML_CPP_STATIC_DEFINE)
18+
endif()
19+
20+
set(build-shared $<BOOL:${YAML_BUILD_SHARED_LIBS}>)
21+
diff --git a/include/yaml-cpp/dll.h b/include/yaml-cpp/dll.h
22+
index a32c06b..eabdda1 100644
23+
--- a/include/yaml-cpp/dll.h
24+
+++ b/include/yaml-cpp/dll.h
25+
@@ -1,33 +1,61 @@
26+
#ifndef DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66
27+
#define DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66
28+
29+
-#if defined(_MSC_VER) || \
30+
- (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
31+
- (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
32+
-#pragma once
33+
+// Definition YAML_CPP_STATIC_DEFINE using to building YAML-CPP as static
34+
+// library (definition created by CMake or defined manually)
35+
+
36+
+// Definition yaml_cpp_EXPORTS using to building YAML-CPP as dll/so library
37+
+// (definition created by CMake or defined manually)
38+
+
39+
+#ifdef YAML_CPP_STATIC_DEFINE
40+
+# define YAML_CPP_API
41+
+# define YAML_CPP_NO_EXPORT
42+
+#else
43+
+# if defined(_MSC_VER) || defined(__MINGW32__) || defined(__MINGW64__)
44+
+# ifndef YAML_CPP_API
45+
+# ifdef yaml_cpp_EXPORTS
46+
+ /* We are building this library */
47+
+# pragma message( "Defining YAML_CPP_API for DLL export" )
48+
+# define YAML_CPP_API __declspec(dllexport)
49+
+# else
50+
+ /* We are using this library */
51+
+# pragma message( "Defining YAML_CPP_API for DLL import" )
52+
+# define YAML_CPP_API __declspec(dllimport)
53+
+# endif
54+
+# endif
55+
+# ifndef YAML_CPP_NO_EXPORT
56+
+# define YAML_CPP_NO_EXPORT
57+
+# endif
58+
+# else /* No _MSC_VER */
59+
+# ifndef YAML_CPP_API
60+
+# ifdef yaml_cpp_EXPORTS
61+
+ /* We are building this library */
62+
+# define YAML_CPP_API __attribute__((visibility("default")))
63+
+# else
64+
+ /* We are using this library */
65+
+# define YAML_CPP_API __attribute__((visibility("default")))
66+
+# endif
67+
+# endif
68+
+# ifndef YAML_CPP_NO_EXPORT
69+
+# define YAML_CPP_NO_EXPORT __attribute__((visibility("hidden")))
70+
+# endif
71+
+# endif /* _MSC_VER */
72+
+#endif /* YAML_CPP_STATIC_DEFINE */
73+
+
74+
+#ifndef YAML_CPP_DEPRECATED
75+
+# ifdef _MSC_VER
76+
+# define YAML_CPP_DEPRECATED __declspec(deprecated)
77+
+# else
78+
+# define YAML_CPP_DEPRECATED __attribute__ ((__deprecated__))
79+
+# endif
80+
#endif
81+
82+
-// The following ifdef block is the standard way of creating macros which make
83+
-// exporting from a DLL simpler. All files within this DLL are compiled with the
84+
-// yaml_cpp_EXPORTS symbol defined on the command line. This symbol should not
85+
-// be defined on any project that uses this DLL. This way any other project
86+
-// whose source files include this file see YAML_CPP_API functions as being
87+
-// imported from a DLL, whereas this DLL sees symbols defined with this macro as
88+
-// being exported.
89+
-#undef YAML_CPP_API
90+
+#ifndef YAML_CPP_DEPRECATED_EXPORT
91+
+# define YAML_CPP_DEPRECATED_EXPORT YAML_CPP_API YAML_CPP_DEPRECATED
92+
+#endif
93+
94+
-#ifdef YAML_CPP_DLL // Using or Building YAML-CPP DLL (definition defined
95+
- // manually)
96+
-#ifdef yaml_cpp_EXPORTS // Building YAML-CPP DLL (definition created by CMake
97+
- // or defined manually)
98+
-// #pragma message( "Defining YAML_CPP_API for DLL export" )
99+
-#define YAML_CPP_API __declspec(dllexport)
100+
-#else // yaml_cpp_EXPORTS
101+
-// #pragma message( "Defining YAML_CPP_API for DLL import" )
102+
-#define YAML_CPP_API __declspec(dllimport)
103+
-#endif // yaml_cpp_EXPORTS
104+
-#else // YAML_CPP_DLL
105+
-#define YAML_CPP_API
106+
-#endif // YAML_CPP_DLL
107+
+#ifndef YAML_CPP_DEPRECATED_NO_EXPORT
108+
+# define YAML_CPP_DEPRECATED_NO_EXPORT YAML_CPP_NO_EXPORT YAML_CPP_DEPRECATED
109+
+#endif
110+
111+
-#endif // DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66
112+
+#endif /* DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66 */
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
context:
2+
version: 0.7.0
3+
4+
package:
5+
name: yaml-cpp
6+
version: ${{ version }}
7+
8+
source:
9+
url: https://github.com/jbeder/yaml-cpp/archive/yaml-cpp-${{ version }}.tar.gz
10+
sha256: 43e6a9fcb146ad871515f0d0873947e5d497a1c9c60c58cb102a97b47208b7c3
11+
patches:
12+
- patches/pr_1064.patch
13+
- patches/fix_empty_cmake_variable.patch
14+
- patches/emscripten-shared-fix.patch
15+
16+
build:
17+
number: 0
18+
19+
requirements:
20+
build:
21+
- ${{ compiler("c") }}
22+
- ${{ compiler("cxx") }}
23+
- cmake
24+
- ninja
25+
26+
about:
27+
homepage: https://github.com/jbeder/yaml-cpp
28+
license: MIT
29+
license_family: MIT
30+
license_file: LICENSE
31+
summary: yaml-cpp is a YAML parser and emitter in C++ matching the YAML 1.2 spec.
32+
documentation: https://github.com/jbeder/yaml-cpp/wiki/Tutorial
33+
34+
extra:
35+
recipe-maintainers:
36+
- Tobias-Fischer
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
mkdir build && cd build
2+
3+
export CMAKE_ARGS="$CMAKE_ARGS -DCMAKE_PROJECT_INCLUDE=${RECIPE_DIR}/overwriteProp.cmake"
4+
5+
cmake $CMAKE_ARGS -DCMAKE_BUILD_TYPE=Release \
6+
-DCMAKE_PREFIX_PATH=$PREFIX \
7+
-DCMAKE_INSTALL_PREFIX=$PREFIX \
8+
-DBUILD_SHARED_LIBS=ON \
9+
-DCMAKE_INSTALL_LIBDIR=lib \
10+
$SRC_DIR
11+
12+
make VERBOSE=1 -j${CPU_COUNT}
13+
make install
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
diff --git a/CMakeLists.txt b/CMakeLists.txt
2+
index 4f81148..4f6a568 100644
3+
--- a/CMakeLists.txt
4+
+++ b/CMakeLists.txt
5+
@@ -98,10 +98,10 @@ install(
6+
#
7+
# Add tests
8+
#
9+
-include(CTest) # This module defines BUILD_TESTING option
10+
-if(BUILD_TESTING)
11+
- add_subdirectory(tests)
12+
-endif()
13+
+# include(CTest) # This module defines BUILD_TESTING option
14+
+# if(BUILD_TESTING)
15+
+# add_subdirectory(tests)
16+
+# endif()
17+
18+
#
19+
# Generate 'yamlConfig.cmake', 'yamlConfigVersion.cmake' and 'yamlTargets.cmake'
20+
diff --git a/yamlConfig.cmake.in b/yamlConfig.cmake.in
21+
new file mode 100644
22+
index 0000000..c5ecdf1
23+
--- /dev/null
24+
+++ b/yamlConfig.cmake.in
25+
@@ -0,0 +1,15 @@
26+
+# Config file for the yaml library.
27+
+#
28+
+# It defines the following variables:
29+
+# yaml_LIBRARIES - libraries to link against
30+
+
31+
+@PACKAGE_INIT@
32+
+
33+
+set_and_check(yaml_TARGETS "@PACKAGE_CONFIG_DIR_CONFIG@/yamlTargets.cmake")
34+
+
35+
+if(NOT yaml_TARGETS_IMPORTED)
36+
+ set(yaml_TARGETS_IMPORTED 1)
37+
+ include(${yaml_TARGETS})
38+
+endif()
39+
+
40+
+set(yaml_LIBRARIES yaml)
41+
diff --git a/cmake/config.h.in b/cmake/config.h.in
42+
new file mode 100644
43+
index 0000000..c92894b
44+
--- /dev/null
45+
+++ b/cmake/config.h.in
46+
@@ -0,0 +1,4 @@
47+
+#define YAML_VERSION_MAJOR @YAML_VERSION_MAJOR@
48+
+#define YAML_VERSION_MINOR @YAML_VERSION_MINOR@
49+
+#define YAML_VERSION_PATCH @YAML_VERSION_PATCH@
50+
+#define YAML_VERSION_STRING "@YAML_VERSION_STRING@"
51+
\ No newline at end of file
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE) # does not need to be global :)
2+
set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-s SIDE_MODULE=1")
3+
set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-s SIDE_MODULE=1")
4+
set(CMAKE_STRIP FALSE) # used by default in pybind11 on .so modules # only for needed when using pybind11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
context:
2+
version: 0.2.5
3+
4+
package:
5+
name: yaml
6+
version: ${{ version }}
7+
8+
source:
9+
url: https://github.com/yaml/libyaml/releases/download/${{ version }}/yaml-${{ version }}.tar.gz
10+
sha256: c642ae9b75fee120b2d96c712538bd2cf283228d2337df2cf2988e3c02678ef4
11+
patches:
12+
- fix_cmake.patch
13+
14+
build:
15+
number: 0
16+
17+
requirements:
18+
build:
19+
- ${{ compiler("c") }}
20+
- ${{ compiler("cxx") }}
21+
- cmake
22+
- ninja
23+
24+
about:
25+
homepage: https://github.com/yaml/libyaml
26+
license: MIT
27+
license_family: MIT
28+
license_file: License
29+
summary: LibYAML - A C library for parsing and emitting YAML.
30+
documentation: https://github.com/yaml/libyaml/wiki
31+
32+
extra:
33+
recipe-maintainers:
34+
- Tobias-Fischer

0 commit comments

Comments
 (0)
Please sign in to comment.