Skip to content

Commit b3d4162

Browse files
authored
Merge pull request #175 from OpenBrickProtocolFoundation/update-fmt-to-11.0
Update fmt to 11.0.1
2 parents 1fdd9df + 4268781 commit b3d4162

File tree

8 files changed

+35
-73
lines changed

8 files changed

+35
-73
lines changed

platforms/android/app/jni/Android.mk

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,70 @@
11
LOCAL_PATH := $(call my-dir)
2-
BUILD_PATH=../../../../build-$(TARGET_ARCH_ABI)
2+
BUILD_PATH=$(LOCAL_PATH)/../../../../build-$(TARGET_ARCH_ABI)
33
SUBPROJECTS_PATH :=$(BUILD_PATH)/subprojects
44

5-
# TODO: don't hardcode the versions of the dependencies
6-
75
include $(CLEAR_VARS)
86
LOCAL_MODULE := SDL2
9-
LIB_PATH := $(SUBPROJECTS_PATH)/SDL2-2.30.3
10-
LOCAL_C_INCLUDES := $(LIB_PATH)/include
11-
LOCAL_SRC_FILES := $(LIB_PATH)/libsdl2.so
7+
LOCAL_SRC_FILES := $(shell find "${SUBPROJECTS_PATH}" -name libsdl2.so)
128
include $(PREBUILT_SHARED_LIBRARY)
139

1410

1511
include $(CLEAR_VARS)
1612
LOCAL_MODULE := freetype
17-
SO_PATH := $(SUBPROJECTS_PATH)/freetype-2.13.2
18-
LOCAL_SRC_FILES := $(SO_PATH)/libfreetype.so
13+
LOCAL_SRC_FILES := $(shell find "${SUBPROJECTS_PATH}" -name libfreetype.so)
1914
include $(PREBUILT_SHARED_LIBRARY)
2015

2116

2217
include $(CLEAR_VARS)
2318
LOCAL_MODULE := libpng
24-
SO_PATH := $(SUBPROJECTS_PATH)/libpng-1.6.43
25-
LOCAL_SRC_FILES := $(SO_PATH)/libpng16.so
19+
LOCAL_SRC_FILES := $(shell find "${SUBPROJECTS_PATH}" -name libpng16.so)
2620
include $(PREBUILT_SHARED_LIBRARY)
2721

2822

2923
include $(CLEAR_VARS)
3024
LOCAL_MODULE := SDL2_ttf
31-
LIB_PATH := $(SUBPROJECTS_PATH)/SDL2_ttf-2.20.1
32-
LOCAL_SRC_FILES := $(LIB_PATH)/libsdl2_ttf.so
25+
LOCAL_SRC_FILES := $(shell find "${SUBPROJECTS_PATH}" -name libsdl2_ttf.so)
3326
include $(PREBUILT_SHARED_LIBRARY)
3427

3528

3629
include $(CLEAR_VARS)
3730
LOCAL_MODULE := SDL2_mixer
38-
LIB_PATH := $(SUBPROJECTS_PATH)/SDL2_mixer-2.6.2
39-
LOCAL_SRC_FILES := $(LIB_PATH)/libsdl2mixer.so
31+
LOCAL_SRC_FILES := $(shell find "${SUBPROJECTS_PATH}" -name libsdl2mixer.so)
4032
include $(PREBUILT_SHARED_LIBRARY)
4133

4234

4335
include $(CLEAR_VARS)
4436
LOCAL_MODULE := libvorbis
45-
LIB_PATH := $(SUBPROJECTS_PATH)/libvorbis-1.3.7/lib
46-
LOCAL_SRC_FILES := $(LIB_PATH)/libvorbis.so
37+
LOCAL_SRC_FILES := $(shell find "${SUBPROJECTS_PATH}" -name libvorbis.so)
4738
include $(PREBUILT_SHARED_LIBRARY)
4839

4940

5041
include $(CLEAR_VARS)
5142
LOCAL_MODULE := libvorbisfile
52-
LIB_PATH := $(SUBPROJECTS_PATH)/libvorbis-1.3.7/lib
53-
LOCAL_SRC_FILES := $(LIB_PATH)/libvorbisfile.so
43+
LOCAL_SRC_FILES := $(shell find "${SUBPROJECTS_PATH}" -name libvorbisfile.so)
5444
include $(PREBUILT_SHARED_LIBRARY)
5545

5646

5747
include $(CLEAR_VARS)
5848
LOCAL_MODULE := libogg
59-
LIB_PATH := $(SUBPROJECTS_PATH)/libogg-1.3.5/src
60-
LOCAL_SRC_FILES := $(LIB_PATH)/libogg.so
49+
LOCAL_SRC_FILES := $(shell find "${SUBPROJECTS_PATH}" -name libogg.so)
6150
include $(PREBUILT_SHARED_LIBRARY)
6251

6352

6453
include $(CLEAR_VARS)
6554
LOCAL_MODULE := libflac
66-
LIB_PATH := $(SUBPROJECTS_PATH)/flac-1.4.3/src
67-
LOCAL_SRC_FILES := $(LIB_PATH)/libFLAC/libFLAC.so
55+
LOCAL_SRC_FILES := $(shell find "${SUBPROJECTS_PATH}" -name libFLAC.so)
6856
include $(PREBUILT_SHARED_LIBRARY)
6957

7058

7159
include $(CLEAR_VARS)
7260
LOCAL_MODULE := SDL2_image
73-
LIB_PATH := $(SUBPROJECTS_PATH)/SDL2_image-2.6.3
74-
LOCAL_SRC_FILES := $(LIB_PATH)/libsdl2image.so
61+
LOCAL_SRC_FILES := $(shell find "${SUBPROJECTS_PATH}" -name libsdl2image.so)
7562
include $(PREBUILT_SHARED_LIBRARY)
7663

7764

7865
include $(CLEAR_VARS)
7966
LOCAL_MODULE := libfmt
80-
LIB_PATH := $(SUBPROJECTS_PATH)/fmt-10.2.0
81-
LOCAL_SRC_FILES := $(LIB_PATH)/libfmt.so
67+
LOCAL_SRC_FILES := $(shell find "${SUBPROJECTS_PATH}" -name libfmt.so)
8268
include $(PREBUILT_SHARED_LIBRARY)
8369

8470

src/input/guid.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ namespace sdl {
4444

4545

4646
template<>
47-
struct fmt::formatter<sdl::GUID> : formatter<std::string> {
48-
auto format(const sdl::GUID& guid, format_context& ctx) {
47+
struct fmt::formatter<sdl::GUID> : fmt::formatter<std::string> {
48+
auto format(const sdl::GUID& guid, format_context& ctx) const {
4949
return formatter<std::string>::format(guid.to_string(), ctx);
5050
}
5151
};

src/input/input.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "manager/service_provider.hpp"
1414

1515

16+
#include <fmt/base.h>
1617
#include <fmt/format.h>
1718
#include <memory>
1819
#include <vector>
@@ -116,6 +117,7 @@ namespace input {
116117
struct InputSettings {
117118

118119
template<typename T>
120+
requires fmt::formattable<T>
119121
[[nodiscard]] static helper::expected<void, std::string> has_unique_members(const std::vector<T>& to_check) {
120122
std::vector<T> already_bound{};
121123

src/manager/sdl_controller_key.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ namespace sdl {
2828
} // namespace sdl
2929

3030
template<>
31-
struct fmt::formatter<sdl::ControllerKey> : formatter<std::string> {
32-
auto format(const sdl::ControllerKey& key, format_context& ctx) {
31+
struct fmt::formatter<sdl::ControllerKey> : fmt::formatter<std::string> {
32+
auto format(const sdl::ControllerKey& key, format_context& ctx) const {
3333
return formatter<std::string>::format(key.to_string(), ctx);
3434
}
3535
};

src/manager/sdl_key.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ namespace sdl {
8686
} // namespace sdl
8787

8888
template<>
89-
struct fmt::formatter<sdl::Key> : formatter<std::string> {
90-
auto format(const sdl::Key& key, format_context& ctx) {
89+
struct fmt::formatter<sdl::Key> : fmt::formatter<std::string> {
90+
auto format(const sdl::Key& key, format_context& ctx) const {
9191
return formatter<std::string>::format(key.to_string(), ctx);
9292
}
9393
};

subprojects/fmt.wrap

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
[wrap-file]
2-
directory = fmt-10.2.0
3-
source_url = https://github.com/fmtlib/fmt/archive/10.2.0.tar.gz
4-
source_filename = fmt-10.2.0.tar.gz
5-
source_hash = 3ca91733a7313a8ad41c0885929415f8ec0a2a31d4dc7e27e9331412f4ca26ac
6-
patch_filename = fmt_10.2.0-2_patch.zip
7-
patch_url = https://wrapdb.mesonbuild.com/v2/fmt_10.2.0-2/get_patch
8-
patch_hash = 2428c3a386a8390c76378f81ef804a297f4edc3b789499dd56629b7902b8ddb7
9-
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/fmt_10.2.0-2/fmt-10.2.0.tar.gz
10-
wrapdb_version = 10.2.0-2
11-
# TODO: remove the second after a new release (it's fixed after > 120.2.1)
12-
diff_files = fmt_dependency_override.diff, fmt-10.2.0-gcc-bug.diff
2+
directory = fmt-11.0.1
3+
source_url = https://github.com/fmtlib/fmt/archive/11.0.1.tar.gz
4+
source_filename = fmt-11.0.1.tar.gz
5+
source_hash = 7d009f7f89ac84c0a83f79ed602463d092fbf66763766a907c97fd02b100f5e9
6+
patch_filename = fmt_11.0.1-1_patch.zip
7+
patch_url = https://wrapdb.mesonbuild.com/v2/fmt_11.0.1-1/get_patch
8+
patch_hash = 0a8b93d1ee6d84a82d3872a9bfb4c3977d8a53f7f484d42d1f7ed63ed496d549
9+
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/fmt_11.0.1-1/fmt-11.0.1.tar.gz
10+
wrapdb_version = 11.0.1-1
11+
diff_files = fmt_dependency_override.diff
1312

1413
[provide]
1514
fmt = fmt_dep

subprojects/packagefiles/fmt-10.2.0-gcc-bug.diff

Lines changed: 0 additions & 25 deletions
This file was deleted.

subprojects/sdl2.wrap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ directory = SDL2-2.30.3
33
source_url = https://github.com/libsdl-org/SDL/releases/download/release-2.30.3/SDL2-2.30.3.tar.gz
44
source_filename = SDL2-2.30.3.tar.gz
55
source_hash = 820440072f8f5b50188c1dae104f2ad25984de268785be40c41a099a510f0aec
6-
patch_filename = sdl2_2.30.3-2_patch.zip
7-
patch_url = https://wrapdb.mesonbuild.com/v2/sdl2_2.30.3-2/get_patch
8-
patch_hash = 2c08bde67b3896db88e01481c379322625ea6c928cdb68ead91d0e3749863bc2
9-
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/sdl2_2.30.3-2/SDL2-2.30.3.tar.gz
10-
wrapdb_version = 2.30.3-2
6+
patch_filename = sdl2_2.30.3-3_patch.zip
7+
patch_url = https://wrapdb.mesonbuild.com/v2/sdl2_2.30.3-3/get_patch
8+
patch_hash = 58db4d525787a2f0585cc5256b3cf3ef1150ff7a100bd2e8995b478c7ee55e5f
9+
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/sdl2_2.30.3-3/SDL2-2.30.3.tar.gz
10+
wrapdb_version = 2.30.3-3
1111
diff_files = SDL2-2.30.3_android.diff
1212

1313
[provide]

0 commit comments

Comments
 (0)