Skip to content

Commit

Permalink
Merge pull request #6023 from cms-sw/add-fmt-external
Browse files Browse the repository at this point in the history
Add fmt to externals
  • Loading branch information
smuzaffar committed Jul 6, 2020
2 parents 4606021 + b5e92fb commit 1be61db
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmssw-tool-conf.spec
Expand Up @@ -23,6 +23,7 @@ Requires: evtgen-toolfile
Requires: expat-toolfile
Requires: fakesystem
Requires: fastjet-toolfile
Requires: fmt-toolfile
Requires: gbl-toolfile
Requires: gcc-toolfile
Requires: gdbm-toolfile
Expand Down
23 changes: 23 additions & 0 deletions fmt-toolfile.spec
@@ -0,0 +1,23 @@
### RPM external fmt-toolfile 1.0
Requires: fmt
%prep

%build

%install

mkdir -p %{i}/etc/scram.d
cat << \EOF_TOOLFILE >%{i}/etc/scram.d/fmt.xml
<tool name="fmt" version="@TOOL_VERSION@">
<info url="https://github.com/fmtlib/fmt"/>
<lib name="fmt"/>
<client>
<environment name="FMT_BASE" default="@TOOL_ROOT@"/>
<environment name="LIBDIR" default="$FMT_BASE/lib"/>
<environment name="INCLUDE" default="$FMT_BASE/include"/>
</client>
<runtime name="ROOT_INCLUDE_PATH" value="$INCLUDE" type="path"/>
</tool>
EOF_TOOLFILE

## IMPORT scram-tools-post
25 changes: 25 additions & 0 deletions fmt.spec
@@ -0,0 +1,25 @@
### RPM external fmt 6.2.1

Source: https://github.com/fmtlib/fmt/archive/%{realversion}.tar.gz
BuildRequires: gmake cmake

%prep
%setup -n %{n}-%{realversion}

%build

cd %{_builddir}
rm -rf build && mkdir build && cd build

cmake ../%{n}-%{realversion} \
-DCMAKE_INSTALL_PREFIX:STRING=%{i} \
-DCMAKE_INSTALL_LIBDIR:STRING=lib \
-DBUILD_SHARED_LIBS=TRUE

make %{makeprocesses}

%install

cd %{_builddir}/build
make install

14 changes: 14 additions & 0 deletions fmt/doc.txt
@@ -0,0 +1,14 @@

- Requested, AddedBy:
@makortel
https://github.com/cms-sw/cmsdist/pull/6011

- PR:
https://github.com/cms-sw/cmsdist/pull/6023

- Description:
{fmt} is an open-source formatting library providing a fast and safe alternative to C stdio and C++ iostreams.
https://github.com/fmtlib/fmt

- Documentation
https://fmt.dev/latest/

0 comments on commit 1be61db

Please sign in to comment.