diff --git a/common/shlibs b/common/shlibs index f96c93b5aa..5df47833aa 100644 --- a/common/shlibs +++ b/common/shlibs @@ -3316,3 +3316,4 @@ libcotp.so.12 libcotp-1.2.1_1 libunarr.so.1 libunarr-1.0.1_1 libretro-gtk-0.14.so.0 retro-gtk-0.16.0_1 libmanette-0.2.so.0 libmanette-0.2.1_1 +libfmt.so.5 fmt-5.2.1_1 diff --git a/srcpkgs/fmt-devel b/srcpkgs/fmt-devel new file mode 120000 index 0000000000..d256c0a121 --- /dev/null +++ b/srcpkgs/fmt-devel @@ -0,0 +1 @@ +fmt \ No newline at end of file diff --git a/srcpkgs/fmt/patches/add-pkg-config-file.patch b/srcpkgs/fmt/patches/add-pkg-config-file.patch new file mode 100644 index 0000000000..ada6766017 --- /dev/null +++ b/srcpkgs/fmt/patches/add-pkg-config-file.patch @@ -0,0 +1,68 @@ +From 57ae5189351665715c98b3b6ca8595b30d83033f Mon Sep 17 00:00:00 2001 +From: Cole Mickens +Date: Wed, 24 Oct 2018 01:33:22 -0700 +Subject: [PATCH] cmake: output share/fmt.pc + +--- + CMakeLists.txt | 9 +++++++++ + support/cmake/fmt.pc.in | 11 +++++++++++ + 3 files changed, 20 insertions(+) + create mode 100644 support/cmake/fmt.pc.in + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7cf74829..d1bc9558 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -202,6 +202,7 @@ if (FMT_INSTALL) + "Installation directory for cmake files, relative to ${CMAKE_INSTALL_PREFIX}.") + set(version_config ${PROJECT_BINARY_DIR}/fmt-config-version.cmake) + set(project_config ${PROJECT_BINARY_DIR}/fmt-config.cmake) ++ set(pkgconfig ${PROJECT_BINARY_DIR}/fmt.pc) + set(targets_export_name fmt-targets) + + set (INSTALL_TARGETS fmt) +@@ -215,11 +216,18 @@ if (FMT_INSTALL) + set(FMT_INC_DIR ${CMAKE_INSTALL_INCLUDEDIR}/fmt CACHE STRING + "Installation directory for include files, relative to ${CMAKE_INSTALL_PREFIX}.") + ++ set(FMT_PKGCONFIG_DIR "${CMAKE_INSTALL_PREFIX}/share/pkgconfig" CACHE PATH ++ "Installation directory for pkgconfig (.pc) files, relative to ${CMAKE_INSTALL_PREFIX}.") ++ + # Generate the version, config and target files into the build directory. + write_basic_package_version_file( + ${version_config} + VERSION ${FMT_VERSION} + COMPATIBILITY AnyNewerVersion) ++ configure_file( ++ "${PROJECT_SOURCE_DIR}/support/cmake/fmt.pc.in" ++ "${pkgconfig}" ++ @ONLY) + configure_package_config_file( + ${PROJECT_SOURCE_DIR}/support/cmake/fmt-config.cmake.in + ${project_config} +@@ -240,6 +248,7 @@ if (FMT_INSTALL) + install(TARGETS ${INSTALL_TARGETS} EXPORT ${targets_export_name} + DESTINATION ${FMT_LIB_DIR}) + install(FILES ${FMT_HEADERS} DESTINATION ${FMT_INC_DIR}) ++ install(FILES "${pkgconfig}" DESTINATION "${FMT_PKGCONFIG_DIR}") + endif () + + if (FMT_DOC) +diff --git a/support/cmake/fmt.pc.in b/support/cmake/fmt.pc.in +new file mode 100644 +index 00000000..4b82ddb0 +--- /dev/null ++++ support/cmake/fmt.pc.in +@@ -0,0 +1,11 @@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=@CMAKE_INSTALL_PREFIX@ ++libdir=@CMAKE_INSTALL_LIBDIR@ ++includedir=@CMAKE_INSTALL_INCLUDEDIR@ ++ ++Name: fmt ++Description: A modern formatting library ++Version: @FMT_VERSION@ ++Libs: -L${libdir} -lfmt ++Cflags: -I${includedir} ++ + diff --git a/srcpkgs/fmt/template b/srcpkgs/fmt/template new file mode 100644 index 0000000000..e6b4c1287b --- /dev/null +++ b/srcpkgs/fmt/template @@ -0,0 +1,27 @@ +# Template file for 'fmt' +pkgname=fmt +version=5.2.1 +revision=1 +build_style=cmake +configure_args="-DBUILD_SHARED_LIBS=ON" +short_desc="Modern formatting library" +maintainer="maxice8 " +license="BSD-2-Clause" +homepage="https://github.com/fmtlib/fmt" +distfiles="https://github.com/fmtlib/fmt/archive/${version}.tar.gz" +checksum=3c812a18e9f72a88631ab4732a97ce9ef5bcbefb3235e9fd465f059ba204359b + +post_install() { + vlicense LICENSE.rst +} + +fmt-devel_package() { + depends="fmt-${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove usr/share/pkgconfig + vmove usr/lib/cmake + vmove "usr/lib/*.so" + } +}