mirror of
https://github.com/openbsd/ports.git
synced 2026-06-17 23:13:55 +02:00
update to fmt-10.2.1, from Brad
fixes for a couple of ports to follow
This commit is contained in:
+5
-11
@@ -2,9 +2,9 @@ COMMENT= alternative formatting library for C and C++
|
||||
|
||||
GH_ACCOUNT= fmtlib
|
||||
GH_PROJECT= fmt
|
||||
GH_TAGNAME= 8.1.1
|
||||
GH_TAGNAME= 10.2.1
|
||||
|
||||
SHARED_LIBS= fmt 1.1
|
||||
SHARED_LIBS= fmt 2.0
|
||||
|
||||
CATEGORIES= devel
|
||||
|
||||
@@ -13,17 +13,11 @@ PERMIT_PACKAGE= Yes
|
||||
|
||||
# C++11
|
||||
COMPILER= base-clang ports-gcc
|
||||
MODULES= devel/cmake
|
||||
WANTLIB+= ${COMPILER_LIBCXX}
|
||||
|
||||
MODULES= devel/cmake
|
||||
|
||||
WANTLIB+= ${COMPILER_LIBCXX} m
|
||||
|
||||
CONFIGURE_ARGS+= -DBUILD_SHARED_LIBS=on
|
||||
|
||||
# Fix undefined references to pthread_* symbols on clang+ld.bfd archs by
|
||||
# disabling -Wl,--as-needed.
|
||||
.include <bsd.port.arch.mk>
|
||||
.if !${PROPERTIES:Mlld} && ${PROPERTIES:Mclang}
|
||||
CONFIGURE_ARGS+= -DAS_NEEDED=off
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
||||
+2
-2
@@ -1,2 +1,2 @@
|
||||
SHA256 (fmt-8.1.1.tar.gz) = PXlNPPZ2M7NLJ3Hrnwc73ofoRuDTldJU33shHvHsc0Y=
|
||||
SIZE (fmt-8.1.1.tar.gz) = 826254
|
||||
SHA256 (fmt-10.2.1.tar.gz) = ElDkzFi/Bu5jFWdSP0iEjcRZYTPhY/AmFcl/eLq2yBE=
|
||||
SIZE (fmt-10.2.1.tar.gz) = 854665
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
Allow linking without '-Wl,--as-needed', fix the build on clang+ld.bfd archs.
|
||||
It's needed to do it like this since target_link_libraries takes preference
|
||||
over LDFLAGS.
|
||||
|
||||
Index: CMakeLists.txt
|
||||
--- CMakeLists.txt.orig
|
||||
+++ CMakeLists.txt
|
||||
@@ -72,6 +72,7 @@ set_verbose(FMT_INC_DIR ${CMAKE_INSTALL_INCLUDEDIR} CA
|
||||
option(FMT_PEDANTIC "Enable extra warnings and expensive tests." OFF)
|
||||
option(FMT_WERROR "Halt the compilation with an error on compiler warnings."
|
||||
OFF)
|
||||
+option(AS_NEEDED "Use -Wl,--as-needed for linking." ON)
|
||||
|
||||
# Options that control generation of various targets.
|
||||
option(FMT_DOC "Generate the doc target." ${FMT_MASTER_PROJECT})
|
||||
@@ -286,7 +287,7 @@ endif ()
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
if (UNIX AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS" AND
|
||||
- NOT EMSCRIPTEN)
|
||||
+ NOT EMSCRIPTEN AND AS_NEEDED)
|
||||
# Fix rpmlint warning:
|
||||
# unused-direct-shlib-dependency /usr/lib/libformat.so.1.1.0 /lib/libm.so.6.
|
||||
target_link_libraries(fmt -Wl,--as-needed)
|
||||
@@ -0,0 +1,24 @@
|
||||
Fix handling of the fileno macro
|
||||
38881e5acfbac830bdf68ad1c101ae420ac5bc92
|
||||
|
||||
Index: src/os.cc
|
||||
--- src/os.cc.orig
|
||||
+++ src/os.cc
|
||||
@@ -182,12 +182,12 @@ void buffered_file::close() {
|
||||
}
|
||||
|
||||
int buffered_file::descriptor() const {
|
||||
-#if !defined(fileno)
|
||||
+#ifdef FMT_HAS_SYSTEM
|
||||
+ // fileno is a macro on OpenBSD.
|
||||
+# ifdef fileno
|
||||
+# undef fileno
|
||||
+# endif
|
||||
int fd = FMT_POSIX_CALL(fileno(file_));
|
||||
-#elif defined(FMT_HAS_SYSTEM)
|
||||
- // fileno is a macro on OpenBSD so we cannot use FMT_POSIX_CALL.
|
||||
-# define FMT_DISABLE_MACRO
|
||||
- int fd = FMT_SYSTEM(fileno FMT_DISABLE_MACRO(file_));
|
||||
#else
|
||||
int fd = fileno(file_);
|
||||
#endif
|
||||
@@ -1,7 +1,7 @@
|
||||
Index: test/gtest-extra-test.cc
|
||||
--- test/gtest-extra-test.cc.orig
|
||||
+++ test/gtest-extra-test.cc
|
||||
@@ -345,6 +345,10 @@ TEST(output_redirect_test, flush_error_in_ctor) {
|
||||
@@ -347,6 +347,10 @@ TEST(output_redirect_test, flush_error_in_ctor) {
|
||||
write_copy.dup2(write_fd); // "undo" close or dtor will fail
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ Index: test/gtest-extra-test.cc
|
||||
+// out for now while i work on figuring it out.
|
||||
TEST(output_redirect_test, dup_error_in_ctor) {
|
||||
buffered_file f = open_buffered_file();
|
||||
int fd = (f.fileno)();
|
||||
@@ -356,6 +360,7 @@ TEST(output_redirect_test, dup_error_in_ctor) {
|
||||
int fd = (f.descriptor)();
|
||||
@@ -358,6 +362,7 @@ TEST(output_redirect_test, dup_error_in_ctor) {
|
||||
fmt::format("cannot duplicate file descriptor {}", fd));
|
||||
copy.dup2(fd); // "undo" close or dtor will fail
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,11 +6,11 @@ include/fmt/compile.h
|
||||
include/fmt/core.h
|
||||
include/fmt/format-inl.h
|
||||
include/fmt/format.h
|
||||
include/fmt/locale.h
|
||||
include/fmt/os.h
|
||||
include/fmt/ostream.h
|
||||
include/fmt/printf.h
|
||||
include/fmt/ranges.h
|
||||
include/fmt/std.h
|
||||
include/fmt/xchar.h
|
||||
lib/cmake/
|
||||
lib/cmake/fmt/
|
||||
|
||||
Reference in New Issue
Block a user