[arch-commits] Commit in spdlog/trunk (PKGBUILD rm_bundled_fmt.patch)

Brett Cornwall ainola at archlinux.org
Mon Jul 15 14:53:49 UTC 2019


    Date: Monday, July 15, 2019 @ 14:53:49
  Author: ainola
Revision: 489875

spdlog: Patch out bundled fmt headers

Added:
  spdlog/trunk/rm_bundled_fmt.patch
Modified:
  spdlog/trunk/PKGBUILD

----------------------+
 PKGBUILD             |   19 +++++++++++++------
 rm_bundled_fmt.patch |   34 ++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-07-15 14:46:33 UTC (rev 489874)
+++ PKGBUILD	2019-07-15 14:53:49 UTC (rev 489875)
@@ -4,17 +4,25 @@
 
 pkgname=spdlog
 pkgver=1.3.1
-pkgrel=1
+pkgrel=2
 pkgdesc='Very fast, header-only/compiled, C++ logging library'
 arch=('any')
 url='https://github.com/gabime/spdlog'
 license=('MIT')
 makedepends=('cmake' 'fmt')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/gabime/spdlog/archive/v$pkgver.tar.gz")
-sha256sums=('160845266e94db1d4922ef755637f6901266731c4cb3b30b45bf41efa0e6ab70')
+source=(
+    "$pkgname-$pkgver.tar.gz::https://github.com/gabime/spdlog/archive/v$pkgver.tar.gz"
+    rm_bundled_fmt.patch
+)
+sha256sums=('160845266e94db1d4922ef755637f6901266731c4cb3b30b45bf41efa0e6ab70'
+            '2eee548ad3b12f48c1e6175a0af4f94d942244d4b2eb8351fccac6f53523b80c')
 
 prepare() {
     mkdir -p build
+
+    # Don't duplicate code from another project...
+    # https://github.com/gabime/spdlog/issues/1146
+    patch -d "$pkgname-$pkgver" -p1 < rm_bundled_fmt.patch
 }
 
 build() {
@@ -39,7 +47,6 @@
     make DESTDIR="$pkgdir" install
     install -Dm644 ../"$pkgname-$pkgver/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname/"
 
-    # Don't duplicate code from another project...
-    # https://github.com/gabime/spdlog/issues/1146
-    rm -r "$pkgdir/usr/include/spdlog/fmt/"
+    # Prevent usage of these bundled headers
+    rm -r "$pkgdir/usr/include/spdlog/fmt/bundled/"
 }

Added: rm_bundled_fmt.patch
===================================================================
--- rm_bundled_fmt.patch	                        (rev 0)
+++ rm_bundled_fmt.patch	2019-07-15 14:53:49 UTC (rev 489875)
@@ -0,0 +1,34 @@
+--- a/include/spdlog/fmt/fmt.h	2019-01-18 03:13:07.000000000 -0700
++++ b/include/spdlog/fmt/fmt.h	2019-07-15 08:26:04.026378588 -0600
+@@ -10,16 +10,5 @@
+ // By default spdlog include its own copy.
+ //
+ 
+-#if !defined(SPDLOG_FMT_EXTERNAL)
+-#ifndef FMT_HEADER_ONLY
+-#define FMT_HEADER_ONLY
+-#endif
+-#ifndef FMT_USE_WINDOWS_H
+-#define FMT_USE_WINDOWS_H 0
+-#endif
+-#include "bundled/core.h"
+-#include "bundled/format.h"
+-#else // external fmtlib
+ #include <fmt/core.h>
+ #include <fmt/format.h>
+-#endif
+--- a/include/spdlog/fmt/ostr.h	2019-01-18 03:13:07.000000000 -0700
++++ b/include/spdlog/fmt/ostr.h	2019-07-15 08:26:48.034108854 -0600
+@@ -7,12 +7,4 @@
+ //
+ // include bundled or external copy of fmtlib's ostream support
+ //
+-#if !defined(SPDLOG_FMT_EXTERNAL)
+-#ifndef FMT_HEADER_ONLY
+-#define FMT_HEADER_ONLY
+-#endif
+-#include "bundled/ostream.h"
+-#include "fmt.h"
+-#else
+ #include <fmt/ostream.h>
+-#endif



More information about the arch-commits mailing list