diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1abc10a --- /dev/null +++ b/.gitattributes @@ -0,0 +1,25 @@ +# This is a good default: files that are auto-detected by git to be text are +# converted to the platform-native line ending (LF on Unix, CRLF on Windows) +# in the working tree and to LF in the repository. +# +* text=auto + +# Use `eol=crlf` for files that should have the CRLF line ending both in the +# working tree (even on Unix) and in the repository. +# +#*.bat text eol=crlf + +# Use `eol=lf` for files that should have the LF line ending both in the +# working tree (even on Windows) and in the repository. +# +#*.sh text eol=lf + +# Use `binary` to make sure certain files are never auto-detected as text. +# +#*.png binary + +fmt/fmt/include symlink=dir +fmt/fmt/src symlink=dir +fmt/doc symlink=dir +fmt-tests/basics/test symlink=dir +fmt-tests/test-main/test symlink=dir diff --git a/.gitignore b/.gitignore index 10d90d1..6d7a9f8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .bdep/ +.vs/ # Local default options files. # diff --git a/README.md b/README.md deleted file mode 100644 index 3910761..0000000 --- a/README.md +++ /dev/null @@ -1,17 +0,0 @@ -`{fmt}` library - Build2 package -================================ - -See [`{fmt}` documentation](https://fmt.dev/) for usage and details. - - - `{fmt}` : https://github.com/fmtlib/fmt/ - - Build2 : https://build2.org - -Note: This is the source code for the build2 package of the `{fmt}` C++ library, -the actual library sources snapshot can be found in the `./upstream/` submodule. - -## Configuration Options: - - - `config.fmt.enable_modules` : Set to `true` to build and provide the `fmt` C++ modules. If the compiler and C++ version don't support C++ modules (which is C++ > 20), this will result in a compilation failure. Set to `true` if `$cxx.features.modules == true` which means the configuration is set to enable C++ modules, `false` otherwise. - - - diff --git a/build/config-options.build2 b/build/config-options.build2 deleted file mode 100644 index 6ea1f08..0000000 --- a/build/config-options.build2 +++ /dev/null @@ -1,7 +0,0 @@ - -############################## -# Project-specific options: - -# Set to true to build and provide the `fmt` C++ module. -config [bool] config.fmt.enable_modules ?= $cxx.features.modules # $($cxx.features.modules == true) - diff --git a/buildfile b/buildfile index 146d18d..c3c8909 100644 --- a/buildfile +++ b/buildfile @@ -1,5 +1,6 @@ -./: {*/ -build/ -upstream/ -doc/} manifest doc{README.md} doc/doc{**} - -# Don't install tests. +# Glue buildfile that "pulls" all the packages in the project. # -tests/: install = false +import pkgs = [dir_paths] $process.run_regex(\ + cat $src_root/packages.manifest, '\s*location\s*:\s*(\S+)\s*', '\1') + +./: $pkgs diff --git a/doc b/doc deleted file mode 120000 index 112f1c2..0000000 --- a/doc +++ /dev/null @@ -1 +0,0 @@ -upstream/doc \ No newline at end of file diff --git a/fmt-tests/.gitignore b/fmt-tests/.gitignore new file mode 100644 index 0000000..1c363a0 --- /dev/null +++ b/fmt-tests/.gitignore @@ -0,0 +1,25 @@ +# Compiler/linker output. +# +*.d +*.t +*.i +*.i.* +*.ii +*.ii.* +*.o +*.obj +*.gcm +*.pcm +*.ifc +*.so +*.dylib +*.dll +*.a +*.lib +*.exp +*.pdb +*.ilk +*.exe +*.exe.dlls/ +*.exe.manifest +*.pc diff --git a/fmt-tests/basics/.gitignore b/fmt-tests/basics/.gitignore new file mode 100644 index 0000000..8521b07 --- /dev/null +++ b/fmt-tests/basics/.gitignore @@ -0,0 +1,5 @@ +basics + +# Testscript output directory (can be symlink). +# +test-basics diff --git a/fmt-tests/basics/buildfile b/fmt-tests/basics/buildfile new file mode 100644 index 0000000..58fcb5b --- /dev/null +++ b/fmt-tests/basics/buildfile @@ -0,0 +1,45 @@ +include ../test-main/ + +#test_names = +# args-test \ +# assert-test \ +# base-test +gtest_test_names = args-test assert-test base-test chrono-test color-test compile-fp-test compile-test format-test gtest-extra-test noexception-test os-test ostream-test printf-test std-test unicode-test xchar-test + +# header-only-test <- header only mode seemingly not supported by this build2 package? +# scan-test <- some linker issues +# posix-mock-test <- needs posix-mock.h, and has some msvc/runtime conditional logic going on + +standalone_test_names = enforce-checks-test # some way to pair these? -DFMT_ENFORCE_COMPILE_STRING + +for test_name : $gtest_test_names +{ + ./: exe{$test_name} : test/cxx{$test_name} + exe{$test_name}: ../test-main/liba{test-main}: + { + bin.whole = true + } +} + +./: exe{ranges-test} : test/cxx{ranges-test ranges-odr-test} +exe{ranges-test}: ../test-main/liba{test-main}: +{ + bin.whole = true +} + +# linker issues. +#./: exe{scan-test} : test/cxx{scan-test} ../test-main/liba{test-main} + +# @todo: cmake adds this test conditionally on NOT ( msvc AND fmt-shared ) +# in build2, i guess it's a bit different in that we can potentially build both shared and static variants within a single config? +# also not clear how fmt_shared/fmt_header_only is being configured, looks like the package doesn't do anything there. using defaults only? +# if $cxx. != msvc +#./: exe{format-impl-test} : test/cxx{format-impl-test header-only-test} ../test-main/liba{test-main} + + +import fmt = fmt%lib{fmt} + +for test_name : $standalone_test_names +{ + ./: exe{$test_name} : test/cxx{$test_name} $fmt +} diff --git a/fmt-tests/basics/test b/fmt-tests/basics/test new file mode 120000 index 0000000..18e4790 --- /dev/null +++ b/fmt-tests/basics/test @@ -0,0 +1 @@ +../../upstream/test \ No newline at end of file diff --git a/fmt-tests/build/.gitignore b/fmt-tests/build/.gitignore new file mode 100644 index 0000000..974e01d --- /dev/null +++ b/fmt-tests/build/.gitignore @@ -0,0 +1,4 @@ +/config.build +/root/ +/bootstrap/ +build/ diff --git a/fmt-tests/build/bootstrap.build b/fmt-tests/build/bootstrap.build new file mode 100644 index 0000000..fbb1605 --- /dev/null +++ b/fmt-tests/build/bootstrap.build @@ -0,0 +1,6 @@ +project = fmt-tests + +using version +using config +using test +using dist diff --git a/build/root.build b/fmt-tests/build/root.build similarity index 56% rename from build/root.build rename to fmt-tests/build/root.build index 3c1a988..b269653 100644 --- a/build/root.build +++ b/fmt-tests/build/root.build @@ -1,13 +1,19 @@ +# Uncomment to suppress warnings coming from external libraries. +# +#cxx.internal.scope = current + cxx.std = latest using cxx hxx{*}: extension = h -cxx{*}: extension = cc mxx{*}: extension = cc +cxx{*}: extension = cc + +# All executables are tests +# +exe{*}: test = true # The test target for cross-testing (running tests under Wine, etc). # test.target = $cxx.target - -include $src_root/build/config-options.build2 diff --git a/fmt-tests/buildfile b/fmt-tests/buildfile new file mode 100644 index 0000000..bca55a2 --- /dev/null +++ b/fmt-tests/buildfile @@ -0,0 +1 @@ +./: {*/ -build/} manifest diff --git a/fmt-tests/manifest b/fmt-tests/manifest new file mode 100644 index 0000000..2b6b7fa --- /dev/null +++ b/fmt-tests/manifest @@ -0,0 +1,13 @@ +: 1 +name: fmt-tests +version: 11.0.1-a.0.z +project: fmt +summary: Tests package for fmt upstream tests +license: MIT +url: https://github.com/fmtlib/fmt/ + +depends: * build2 >= 0.17.0 +depends: * bpkg >= 0.17.0 + +depends: gtest ^1.11.0 +depends: gmock ^1.11.0 diff --git a/fmt-tests/test-main/buildfile b/fmt-tests/test-main/buildfile new file mode 100644 index 0000000..30b42fa --- /dev/null +++ b/fmt-tests/test-main/buildfile @@ -0,0 +1,14 @@ + +libs = +import libs += fmt%lib{fmt} +import libs += gtest%lib{gtest} gmock%lib{gmock} + +liba{test-main}: test/cxx{test-main gtest-extra util} test/hxx{gtest-extra mock-allocator test-assert util} $libs + +# Export options. +# +liba{test-main}: +{ + cxx.export.poptions += "-I$src_base/test" + cxx.export.libs = $libs +} diff --git a/fmt-tests/test-main/test b/fmt-tests/test-main/test new file mode 120000 index 0000000..18e4790 --- /dev/null +++ b/fmt-tests/test-main/test @@ -0,0 +1 @@ +../../upstream/test \ No newline at end of file diff --git a/fmt/README.md b/fmt/README.md new file mode 100644 index 0000000..f921b95 --- /dev/null +++ b/fmt/README.md @@ -0,0 +1,26 @@ +`{fmt}` library - Build2 package +================================ + +See [`{fmt}` documentation](https://fmt.dev/) for usage and details. + + - `{fmt}` : https://github.com/fmtlib/fmt/ + - Build2 : https://build2.org + +Note: This is the source code for the build2 package of the `{fmt}` C++ library, +the actual library sources snapshot can be found in the `./upstream/` submodule. + +## Configuration Options + +### Experimental C++20 modules support + +Modules support is WIP, both in the `build2` package and also in `fmt` upstream. Latest versions of MSVC or Clang are recommended, and the most up-to-date version of the package with regards to modules compatibility can be used via git and the [modules branch](https://github.com/build2-packaging/fmt/tree/modules). For example, in project `repositories.manifest`: +``` +: +role: prerequisite +location: https://github.com/build2-packaging/fmt.git#modules +``` + +Enable with `config.cxx.features.modules=true`. When enabled, by default dual mode is used meaning that the library can be consumed either through `import` or via `#include`. To enable this safely, all entities are attached to the global module (extern "C++"). See `modules_only` option for the alternative. + - `config.fmt.enable_import_std` : Set to `true` to consume the standard library as a module when building the `fmt` module. Support dependent on compiler and std lib. Defaults to `false`. + - `config.fmt.modules_only` : Set to `true` to enable modules-only mode for the package. In this mode, `fmt` entities are fully encapsulated in the `fmt` module meaning `#include`-based consumption cannot be mixed, and the package will not export headers. Defaults to `false`. + diff --git a/build/.gitignore b/fmt/build/.gitignore similarity index 100% rename from build/.gitignore rename to fmt/build/.gitignore diff --git a/build/bootstrap.build b/fmt/build/bootstrap.build similarity index 100% rename from build/bootstrap.build rename to fmt/build/bootstrap.build diff --git a/build/export.build b/fmt/build/export.build similarity index 100% rename from build/export.build rename to fmt/build/export.build diff --git a/fmt/build/root.build b/fmt/build/root.build new file mode 100644 index 0000000..499fa36 --- /dev/null +++ b/fmt/build/root.build @@ -0,0 +1,18 @@ +cxx.std = latest + +using cxx + +hxx{*}: extension = h +cxx{*}: extension = cc +mxx{*}: extension = cc + +# The test target for cross-testing (running tests under Wine, etc). +# +test.target = $cxx.target + + +############################## +# Project-specific options: + +config [bool] config.fmt.enable_import_std ?= false +config [bool] config.fmt.modules_only ?= false diff --git a/fmt/buildfile b/fmt/buildfile index 800a6cf..146d18d 100644 --- a/fmt/buildfile +++ b/fmt/buildfile @@ -1,57 +1,5 @@ -int_libs = # Interface dependencies. -imp_libs = # Implementation dependencies. -#import imp_libs += libhello%lib{hello} +./: {*/ -build/ -upstream/ -doc/} manifest doc{README.md} doc/doc{**} -./ : lib{fmt} - -lib{fmt}: include/hxx{**} hxx{version} $imp_libs $int_libs -lib{fmt}: src/mxx{fmt} : include = ($config.fmt.enable_modules == true) -lib{fmt}: src/cxx{** -fmt} : include = ($config.fmt.enable_modules == false) - -# Include the generated version header into the distribution (so that we don't -# pick up an installed one) and don't remove it when cleaning in src (so that -# clean results in a state identical to distributed). -# -hxx{version} : in{version} $src_root/manifest -{ - dist = true - clean = ($src_root != $out_root) - install = include/fmt -} - -# Build options. -# -cxx.poptions =+ "-I$src_base/include" "-I$out_root" "-I$src_root" -objs{*}: cxx.poptions += -DFMT_EXPORT -DFMT_SHARED - -# Export options. -# -lib{fmt}: -{ - cxx.export.poptions = "-I$src_base/include" "-I$out_root" "-I$src_root" - cxx.export.libs = $int_libs -} - -libs{fmt}: cxx.export.poptions += -DFMT_SHARED - - -# For pre-releases use the complete version to make sure they cannot be used -# in place of another pre-release or the final version. See the version module -# for details on the version.* variable values. -# -if $version.pre_release - lib{fmt}: bin.lib.version = @"-$version.project_id" -else - lib{fmt}: bin.lib.version = @"-$version.major.$version.minor" - -# Install into the fmt/ subdirectory of, say, /usr/include/ -# recreating subdirectories. +# Don't install tests. # -include/ -{ - {hxx ixx txx}{*}: - { - install = include/ - install.subdirs = true - } -} +tests/: install = false diff --git a/fmt/doc b/fmt/doc new file mode 120000 index 0000000..f54573b --- /dev/null +++ b/fmt/doc @@ -0,0 +1 @@ +../upstream/doc \ No newline at end of file diff --git a/fmt/.gitignore b/fmt/fmt/.gitignore similarity index 100% rename from fmt/.gitignore rename to fmt/fmt/.gitignore diff --git a/fmt/fmt/buildfile b/fmt/fmt/buildfile new file mode 100644 index 0000000..98b1876 --- /dev/null +++ b/fmt/fmt/buildfile @@ -0,0 +1,87 @@ +int_libs = # Interface dependencies. +imp_libs = # Implementation dependencies. +#import imp_libs += libhello%lib{hello} + +./ : lib{fmt} + +lib{fmt}: include/hxx{**} hxx{version} $imp_libs $int_libs + +# Automatically build as module if the feature is enabled +build_fmt_module = $cxx.features.modules +allow_header_usage = ($build_fmt_module == false || $config.fmt.modules_only == false) + +if($build_fmt_module && $allow_header_usage) + info "Building fmt with dual module/header mode enabled" + +# Workaround for MSVC bug: https://developercommunity.visualstudio.com/t/Separate-preprocessing-with-P-fails-wit/10707183 +if($build_fmt_module && $cxx.class == 'msvc') + cc.reprocess = true + +lib{fmt}: src/mxx{fmt} : include = ($build_fmt_module) # `fmt` C++ module only +lib{fmt}: src/cxx{** -fmt} : include = (!$build_fmt_module) # no modules only + +# Meta data for users +lib{fmt}: +{ + export.metadata = 1 fmt + fmt.has_header = [bool] $allow_header_usage + fmt.has_module = [bool] $build_fmt_module +} + +# Include the generated version header into the distribution (so that we don't +# pick up an installed one) and don't remove it when cleaning in src (so that +# clean results in a state identical to distributed). +# +hxx{version} : in{version} $src_root/manifest +{ + dist = true + clean = ($src_root != $out_root) + install = include/fmt +} + + +# Build options. +# +cxx.poptions =+ "-I$src_base/include" "-I$out_root" "-I$src_root" +{objs bmis}{*}: cxx.poptions += -DFMT_LIB_EXPORT + +# If building fmt module, also enable attaching to the global module in order to allow concurrent #include and import. +if($build_fmt_module) +{ + cxx.poptions =+ -DFMT_MODULE + if($allow_header_usage) + # Support mixing consuming as both modules and headers within a single build + cxx.poptions =+ -DFMT_ATTACH_TO_GLOBAL_MODULE + if($config.fmt.enable_import_std) + cxx.poptions =+ -DFMT_IMPORT_STD +} + +# Export options. +# +lib{fmt}: cxx.export.libs = $int_libs +if($allow_header_usage) # Note: exported poptions only relevant for header consumption +{ + lib{fmt}: cxx.export.poptions = "-I$src_base/include" "-I$out_root" "-I$src_root" + libs{fmt}: cxx.export.poptions += -DFMT_SHARED +} + +# For pre-releases use the complete version to make sure they cannot be used +# in place of another pre-release or the final version. See the version module +# for details on the version.* variable values. +# +if $version.pre_release + lib{fmt}: bin.lib.version = @"-$version.project_id" +else + lib{fmt}: bin.lib.version = @"-$version.major.$version.minor" + +# Install into the fmt/ subdirectory of, say, /usr/include/ +# recreating subdirectories. +# +include/ +{ + {hxx ixx txx}{*}: + { + install = include/ + install.subdirs = true + } +} diff --git a/fmt/fmt/include b/fmt/fmt/include new file mode 120000 index 0000000..01fbb48 --- /dev/null +++ b/fmt/fmt/include @@ -0,0 +1 @@ +../../upstream/include \ No newline at end of file diff --git a/fmt/fmt/src b/fmt/fmt/src new file mode 120000 index 0000000..ff7dce8 --- /dev/null +++ b/fmt/fmt/src @@ -0,0 +1 @@ +../../upstream/src \ No newline at end of file diff --git a/fmt/version.h.in b/fmt/fmt/version.h.in similarity index 100% rename from fmt/version.h.in rename to fmt/fmt/version.h.in diff --git a/fmt/include b/fmt/include deleted file mode 120000 index ebe355d..0000000 --- a/fmt/include +++ /dev/null @@ -1 +0,0 @@ -../upstream/include \ No newline at end of file diff --git a/fmt/manifest b/fmt/manifest new file mode 100644 index 0000000..a425587 --- /dev/null +++ b/fmt/manifest @@ -0,0 +1,26 @@ +: 1 +name: fmt +version: 11.0.1-a.0.z +summary: "{fmt} is an open-source formatting library for C++. It can be used as a safe and fast alternative to (s)printf and iostreams." +license: MIT +description-file: README.md +doc-url: https://fmt.dev/ +url: https://github.com/fmtlib/fmt/ +package-url: https://github.com/build2-packaging/fmt/ +package-email: mjklaim@gmail.com + +tests: fmt-tests == $ + +depends: * build2 >= 0.17.0 +depends: * bpkg >= 0.17.0 + +builds: default +builds: -freebsd ; fmt tests failing, fixed on upstream master, pending removal next package release after 11.0.2 +build-exclude: linux_debian_12-clang_17 ; clang-17 bug with libstdc++ std::tuple (https://github.com/llvm/llvm-project/issues/61415) +build-exclude: **/x86_64-w64-mingw32 ; unknown error building installed tests 'error: unable to stat path D:\a\msys64\mingw64\lib\x86_64-w64-mingw32\14.1.0\pkgconfig\: the device is not ready' + +# Modules support still not sufficient to enable on CI +#modules-builds: latest : &( +clang-18+ +msvc ) ; Modules builds only supported for latest Clang and MSVC +#modules-build-config: config.cxx.features.modules=true ; Enable c++20 modules +#modules-only-builds: latest : &( +clang-18+ +msvc ) ; Modules builds only supported for latest Clang and MSVC +#modules-only-build-config: config.cxx.features.modules=true config.fmt.modules_only=true ; Enable c++20 modules and disable header usage diff --git a/fmt/src b/fmt/src deleted file mode 120000 index 8b4e399..0000000 --- a/fmt/src +++ /dev/null @@ -1 +0,0 @@ -../upstream/src \ No newline at end of file diff --git a/tests/.gitignore b/fmt/tests/.gitignore similarity index 100% rename from tests/.gitignore rename to fmt/tests/.gitignore diff --git a/fmt/tests/basics/buildfile b/fmt/tests/basics/buildfile new file mode 100644 index 0000000..1756471 --- /dev/null +++ b/fmt/tests/basics/buildfile @@ -0,0 +1,13 @@ +import! [metadata, rule_hint=cxx.link] libs = fmt%lib{fmt} + +./ : + +./ : exe{driver} : include = $($libs: fmt.has_header) +./ : exe{driver-modules} : include = $($libs: fmt.has_module) + +exe{driver} : {cxx}{driver} hxx{tests.inl} $libs testscript{**} + +# For purposes of verifying that fmt headers are not made available for include when in modules-only mode +cxx.poptions =+ "-DFMT_BUILD2_HAS_HEADER=($($libs: fmt.has_header) ? 1 : 0)" + +exe{driver-modules} : {cxx}{driver-modules} hxx{tests.inl} $libs testscript{**} diff --git a/fmt/tests/basics/driver-modules.cxx b/fmt/tests/basics/driver-modules.cxx new file mode 100644 index 0000000..4d90052 --- /dev/null +++ b/fmt/tests/basics/driver-modules.cxx @@ -0,0 +1,14 @@ + +// Verify that fmt headers are not available if config.fmt.modules_only is true +#if __has_include() != FMT_BUILD2_HAS_HEADER +#error fmt headers should be available for include iff config.fmt.modules_only == false +#endif + +#include +#include +#include +#include + +import fmt; + +#include "tests.inl" diff --git a/tests/basics/driver.cxx b/fmt/tests/basics/driver.cxx similarity index 83% rename from tests/basics/driver.cxx rename to fmt/tests/basics/driver.cxx index 408215f..cff192d 100644 --- a/tests/basics/driver.cxx +++ b/fmt/tests/basics/driver.cxx @@ -1,7 +1,9 @@ #include +#include #include #include +#include #include #include #include diff --git a/tests/basics/tests.inl b/fmt/tests/basics/tests.inl similarity index 65% rename from tests/basics/tests.inl rename to fmt/tests/basics/tests.inl index 28c0d60..b5de3e8 100644 --- a/tests/basics/tests.inl +++ b/fmt/tests/basics/tests.inl @@ -21,17 +21,17 @@ int main () { fmt::print(fg(fmt::color::crimson) | fmt::emphasis::bold, - "Hello, {}!\n", "world"); + "Hello, {}!\n", "world"); fmt::print(fg(fmt::color::floral_white) | bg(fmt::color::slate_gray) | - fmt::emphasis::underline, "Hello, {}!\n", "мир"); + fmt::emphasis::underline, "Olá, {}!\n", "Mundo"); fmt::print(fg(fmt::color::steel_blue) | fmt::emphasis::italic, - "Hello, {}!\n", "世界"); + "你好{}!\n", "世界"); } { - using namespace std::literals::chrono_literals; - fmt::print("Default format: {} {}\n", 42s, 100ms); - fmt::print("strftime-like format: {:%H:%M:%S}\n", 3h + 15min + 30s); + auto now = std::chrono::system_clock::now(); + fmt::print("Date and time: {}\n", now); + fmt::print("Time: {:%H:%M}\n", now); } { @@ -51,11 +51,13 @@ struct date { template <> struct fmt::formatter { - constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } + template + constexpr auto parse(ParseContext& ctx) const { return ctx.begin(); } template - auto format(const date& d, FormatContext& ctx) { - return format_to(ctx.out(), "{}-{}-{}", d.year, d.month, d.day); + constexpr auto format(const date& d, FormatContext& ctx) const { + // Namespace-qualify to avoid ambiguity with std::format_to. + return fmt::format_to(ctx.out(), "{}-{}-{}", d.year, d.month, d.day); } }; diff --git a/tests/build/.gitignore b/fmt/tests/build/.gitignore similarity index 100% rename from tests/build/.gitignore rename to fmt/tests/build/.gitignore diff --git a/tests/build/bootstrap.build b/fmt/tests/build/bootstrap.build similarity index 100% rename from tests/build/bootstrap.build rename to fmt/tests/build/bootstrap.build diff --git a/tests/build/root.build b/fmt/tests/build/root.build similarity index 73% rename from tests/build/root.build rename to fmt/tests/build/root.build index 643050a..9c1f6bd 100644 --- a/tests/build/root.build +++ b/fmt/tests/build/root.build @@ -6,6 +6,7 @@ hxx{*}: extension = hxx ixx{*}: extension = ixx txx{*}: extension = txx cxx{*}: extension = cxx +mxx{*}: extension = cc # Every exe{} in this subproject is by default a test. # @@ -15,9 +16,3 @@ exe{*}: test = true # test.target = $cxx.target -include $src_root/build/config-options.build2 - -if($config.fmt.enable_modules) -{ - mxx{*}: extension = cc -} \ No newline at end of file diff --git a/tests/buildfile b/fmt/tests/buildfile similarity index 100% rename from tests/buildfile rename to fmt/tests/buildfile diff --git a/manifest b/manifest deleted file mode 100644 index b3c4349..0000000 --- a/manifest +++ /dev/null @@ -1,14 +0,0 @@ -: 1 -name: fmt -version: 8.1.1 -summary: "{fmt} is an open-source formatting library for C++. It can be used as a safe and fast alternative to (s)printf and iostreams." -license: MIT -description-file: README.md -doc-url: https://fmt.dev/ -url: https://github.com/fmtlib/fmt/ -package-url: https://github.com/build2-packaging/fmt/ -package-email: mjklaim@gmail.com - -depends: * build2 >= 0.13.0 -depends: * bpkg >= 0.13.0 - diff --git a/packages.manifest b/packages.manifest new file mode 100644 index 0000000..ccd3e1e --- /dev/null +++ b/packages.manifest @@ -0,0 +1,4 @@ +: 1 +location: fmt/ +: +location: fmt-tests/ diff --git a/repositories.manifest b/repositories.manifest index fedfa2e..230f8c0 100644 --- a/repositories.manifest +++ b/repositories.manifest @@ -1,11 +1,6 @@ : 1 -summary: fmt-build2 project repository +summary: fmt project repository -#: -#role: prerequisite -#location: https://pkg.cppget.org/1/stable -#trust: ... - -#: -#role: prerequisite -#location: https://git.build2.org/hello/libhello.git +: +role: prerequisite +location: https://pkg.cppget.org/1/stable diff --git a/tests/basics/buildfile b/tests/basics/buildfile deleted file mode 100644 index 78dfc81..0000000 --- a/tests/basics/buildfile +++ /dev/null @@ -1,13 +0,0 @@ -import libs = fmt%lib{fmt} - - - -if($config.fmt.enable_modules) -{ - ./ : exe{driver-modules} : {cxx}{driver-modules} hxx{tests.inl} $libs testscript{**} -} -else -{ - ./ : exe{driver} : {cxx}{driver} hxx{tests.inl} $libs testscript{**} -} - diff --git a/tests/basics/driver-modules.cxx b/tests/basics/driver-modules.cxx deleted file mode 100644 index b5e15f3..0000000 --- a/tests/basics/driver-modules.cxx +++ /dev/null @@ -1,10 +0,0 @@ - -#include -import ; -import ; - -import fmt; - -#include "tests.inl" - - diff --git a/tests/build/config-options.build2 b/tests/build/config-options.build2 deleted file mode 120000 index ad26fed..0000000 --- a/tests/build/config-options.build2 +++ /dev/null @@ -1 +0,0 @@ -../../build/config-options.build2 \ No newline at end of file diff --git a/upstream b/upstream index b6f4cea..0c9fce2 160000 --- a/upstream +++ b/upstream @@ -1 +1 @@ -Subproject commit b6f4ceaed0a0a24ccf575fab6c56dd50ccf6f1a9 +Subproject commit 0c9fce2ffefecfdce794e1859584e25877b7b592