mildew pushed to json (epel7). "Imported new package"

notifications at fedoraproject.org notifications at fedoraproject.org
Fri Apr 17 08:12:51 UTC 2015


>From c4c2b000b7eab89a530665b9dfa1b99228ddbf6e Mon Sep 17 00:00:00 2001
From: Daniel Kopecek <dkopecek at redhat.com>
Date: Fri, 17 Apr 2015 10:12:39 +0200
Subject: Imported new package


diff --git a/.cvsignore b/.cvsignore
deleted file mode 100644
index e69de29..0000000
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..230495c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/nlohmann-json-d7d0509.tar.gz
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 071ef17..0000000
--- a/Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
-# Makefile for source rpm: json
-# $Id$
-NAME := json
-SPECFILE = $(firstword $(wildcard *.spec))
-
-define find-makefile-common
-for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
-endef
-
-MAKEFILE_COMMON := $(shell $(find-makefile-common))
-
-ifeq ($(MAKEFILE_COMMON),)
-# attept a checkout
-define checkout-makefile-common
-test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
-endef
-
-MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
-endif
-
-include $(MAKEFILE_COMMON)
diff --git a/json.spec b/json.spec
new file mode 100644
index 0000000..be648f4
--- /dev/null
+++ b/json.spec
@@ -0,0 +1,74 @@
+%global gitdate         20150410
+%global gittag          d7d05091617d8173923df14cf46bc74311dc176e
+%global shorttag        %(c=%{gittag}; echo ${c:0:7})
+%global user            nlohmann
+%global debug_package   %{nil}
+
+Name:           json
+Version:        0
+Release:        3.%{gitdate}git.%{shorttag}%{?dist}
+Summary:        JSON for Modern C++
+Group:          Development/Libraries
+License:        MIT
+## Not installed
+# test/catch.hpp: Boost Software License, Version 1.0
+URL:            https://github.com/%{user}/%{name}/
+Source0:        https://github.com/%{user}/%{name}/tarball/%{gittag}/%{user}-%{name}-%{shorttag}.tar.gz
+
+BuildRequires: cppcheck
+BuildRequires: /usr/bin/make
+BuildRequires: doxygen
+
+Patch0: nlohmann-json-d7d0509-gcc5fix.patch
+
+%description
+This is a packages version of the nlohmann/json header-only C++
+library available at Github.
+
+%package devel
+Summary:        Development files for %{name}
+Group:          Development/Libraries
+Provides:       %{name}-static = %{version}-%{release}
+Requires:       %{name} = %{version}-%{release}
+Requires:       libstdc++-devel
+
+%description devel
+The %{name}-devel package contains libraries and header files for
+developing applications that use %{name}.
+
+%prep
+%setup -q -n %{user}-%{name}-%{shorttag}
+%patch0 -p1
+
+%build
+doxygen Doxyfile
+
+%check
+make cppcheck
+make json_unit
+./json_unit
+
+%install
+mkdir -p %{buildroot}%{_includedir}
+install -p -m 0644 src/json.hpp %{buildroot}%{_includedir}/json.hpp
+
+%files
+%doc README.md
+%license LICENSE.MIT
+
+%files devel
+%doc html/
+%{_includedir}/json.hpp
+
+%changelog
+* Tue Apr 14 2015 Daniel Kopecek <dkopecek at redhat.com> - 0-3.20150410git.d7d0509
+- added patch to fix compilation of json_unit with gcc-5.x
+
+* Tue Apr 14 2015 Daniel Kopecek <dkopecek at redhat.com> - 0-2.20150410git.d7d0509
+- run json_unit target from the check section
+- document catch.hpp license
+- don't build the debuginfo subpackage
+- don't generate a distribution specific pkg-config file
+
+* Fri Apr 10 2015 Daniel Kopecek <dkopecek at redhat.com> - 0-1.20150410git.d7d0509
+- Initial package
diff --git a/nlohmann-json-d7d0509-gcc5fix.patch b/nlohmann-json-d7d0509-gcc5fix.patch
new file mode 100644
index 0000000..c20e536
--- /dev/null
+++ b/nlohmann-json-d7d0509-gcc5fix.patch
@@ -0,0 +1,45 @@
+diff -up nlohmann-json-d7d0509/Makefile.gcc5fix nlohmann-json-d7d0509/Makefile
+--- nlohmann-json-d7d0509/Makefile.gcc5fix	2015-04-14 15:47:27.740625005 +0200
++++ nlohmann-json-d7d0509/Makefile	2015-04-14 15:47:57.579337323 +0200
+@@ -3,7 +3,7 @@ RE2C = re2c
+ SED = gsed
+ 
+ # additional flags
+-FLAGS = -Wall -Wextra -pedantic -Weffc++ -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wmissing-declarations -Wmissing-include-dirs -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-overflow=5 -Wswitch -Wundef -Wno-unused -Wnon-virtual-dtor -Wreorder -Wdeprecated -Wfloat-equal
++FLAGS = -Wall -Wextra -pedantic -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wmissing-declarations -Wmissing-include-dirs -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-overflow=5 -Wswitch -Wundef -Wno-unused -Wnon-virtual-dtor -Wreorder -Wdeprecated -Wfloat-equal
+ 
+ all: json_unit
+ 
+@@ -13,7 +13,7 @@ clean:
+ 
+ # build unit tests
+ json_unit: test/unit.cpp src/json.hpp test/catch.hpp
+-	$(CXX) -std=c++11 $(CXXFLAGS) $(FLAGS) $(CPPFLAGS) -I src -I test -Dprivate=public $< $(LDFLAGS) -o $@
++	$(CXX) -std=c++11 $(CXXFLAGS) $(FLAGS) $(CPPFLAGS) -I src -I test $< $(LDFLAGS) -o $@
+ 
+ # create scanner with re2c
+ re2c: src/json.hpp.re2c
+diff -up nlohmann-json-d7d0509/test/unit.cpp.gcc5fix nlohmann-json-d7d0509/test/unit.cpp
+--- nlohmann-json-d7d0509/test/unit.cpp.gcc5fix	2015-04-14 15:47:36.726538369 +0200
++++ nlohmann-json-d7d0509/test/unit.cpp	2015-04-14 15:48:29.880025903 +0200
+@@ -10,9 +10,6 @@
+ #define CATCH_CONFIG_MAIN
+ #include "catch.hpp"
+ 
+-#include "json.hpp"
+-using nlohmann::json;
+-
+ #include <array>
+ #include <deque>
+ #include <forward_list>
+@@ -24,6 +21,10 @@ using nlohmann::json;
+ #include <unordered_set>
+ #include <vector>
+ 
++#define private public
++#include "json.hpp"
++using nlohmann::json;
++
+ TEST_CASE("constructors")
+ {
+     SECTION("create an empty value with a given type")
diff --git a/sources b/sources
index e69de29..f22633f 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+5e82819e92310869b3a344a858296bcb  nlohmann-json-d7d0509.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/json.git/commit/?h=epel7&id=c4c2b000b7eab89a530665b9dfa1b99228ddbf6e


More information about the scm-commits mailing list