summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hdrhistogram-fpic.patch13
-rw-r--r--hdrhistogram-pr28.patch65
-rw-r--r--hdrhistogram-sover.patch26
-rw-r--r--hdrhistogram.spec23
4 files changed, 53 insertions, 74 deletions
diff --git a/hdrhistogram-fpic.patch b/hdrhistogram-fpic.patch
new file mode 100644
index 0000000..305bf81
--- /dev/null
+++ b/hdrhistogram-fpic.patch
@@ -0,0 +1,13 @@
+--- ./CMakeLists.txt.opts 2016-04-06 11:28:38.677132787 +0200
++++ ./CMakeLists.txt 2016-04-06 11:29:03.131245198 +0200
+@@ -24,9 +24,7 @@
+ ENABLE_TESTING()
+
+ if(UNIX)
+- set(CMAKE_C_FLAGS "-Wall -Wno-unknown-pragmas -Wextra -Wshadow -Winit-self -Wmissing-prototypes -D_GNU_SOURCE")
+- set(CMAKE_C_FLAGS_DEBUG "-O0 -g")
+- set(CMAKE_C_FLAGS_RELEASE "-O3 -g")
++ set(CMAKE_C_FLAGS "-fPIC -D_GNU_SOURCE")
+ endif()
+
+ if(WIN32)
diff --git a/hdrhistogram-pr28.patch b/hdrhistogram-pr28.patch
deleted file mode 100644
index f3f56ae..0000000
--- a/hdrhistogram-pr28.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-Adpated for 0.9.1 from
-
-From cfff41dc89f569deb1cd0c46c4e60a95ec8a2ce2 Mon Sep 17 00:00:00 2001
-From: Remi Collet <fedora@famillecollet.com>
-Date: Fri, 1 Jan 2016 09:56:12 +0100
-Subject: [PATCH 1/2] honours LIB_SUFFIX value
-
----
- src/CMakeLists.txt | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-From ccdfb385fe39144f7c092d5d677a50f3c992cd72 Mon Sep 17 00:00:00 2001
-From: Remi Collet <fedora@famillecollet.com>
-Date: Fri, 1 Jan 2016 09:56:40 +0100
-Subject: [PATCH 2/2] add soname version
-
----
- CMakeLists.txt | 15 +++++++++++++++
- src/CMakeLists.txt | 7 +++++++
- 2 files changed, 22 insertions(+)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 4dd745e..7aab9cf 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -6,6 +6,21 @@ endif()
-
- project("hdr_histogram")
-
-+# Follow all steps below in order to calculate new ABI version when updating the library
-+# NOTE: THIS IS UNRELATED to the actual project version
-+#
-+# 1. If the library source code has changed at all since the last update, then increment revision
-+# 2. If any interfaces have been added, removed, or changed since the last update, increment current and set revision to 0.
-+# 3. If any interfaces have been added since the last public release, then increment age.
-+# 4. If any interfaces have been removed since the last public release, then set age to 0.
-+
-+set(HDR_SOVERSION_CURRENT 1)
-+set(HDR_SOVERSION_REVISION 0)
-+set(HDR_SOVERSION_AGE 0)
-+
-+set(HDR_VERSION ${HDR_SOVERSION_CURRENT}.${HDR_SOVERSION_AGE}.${HDR_SOVERSION_REVISION})
-+set(HDR_SOVERSION ${HDR_SOVERSION_CURRENT})
-+
- ENABLE_TESTING()
-
- if(UNIX)
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
---- a/src/CMakeLists.txt.pr28 2016-01-01 10:03:49.583109992 +0100
-+++ a/src/CMakeLists.txt 2016-01-01 10:05:48.075702608 +0100
-@@ -6,6 +6,12 @@ add_library(hdr_histogram_static STATIC
- target_link_libraries(hdr_histogram m z)
- target_link_libraries(hdr_histogram_static m z)
-
--install(TARGETS hdr_histogram DESTINATION lib)
--install(TARGETS hdr_histogram_static DESTINATION lib)
-+if (WIN32)
-+ set_target_properties(hdr_histogram PROPERTIES VERSION ${HDR_VERSION})
-+else (WIN32)
-+ set_target_properties(hdr_histogram PROPERTIES VERSION ${HDR_VERSION} SOVERSION ${HDR_SOVERSION})
-+endif (WIN32)
-+
-+install(TARGETS hdr_histogram DESTINATION lib${LIB_SUFFIX})
-+install(TARGETS hdr_histogram_static DESTINATION lib${LIB_SUFFIX})
- install(FILES hdr_histogram.h hdr_histogram_log.h hdr_writer_reader_phaser.h hdr_interval_recorder.h DESTINATION include/hdr)
diff --git a/hdrhistogram-sover.patch b/hdrhistogram-sover.patch
new file mode 100644
index 0000000..e41037e
--- /dev/null
+++ b/hdrhistogram-sover.patch
@@ -0,0 +1,26 @@
+From e4395722611f6ace5f9f48a4b4a848c434cbd417 Mon Sep 17 00:00:00 2001
+From: Michael Barker <mikeb01@gmail.com>
+Date: Wed, 6 Apr 2016 20:56:42 +1200
+Subject: [PATCH] Fix #31
+
+---
+ CMakeLists.txt | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e16b0b3..24536a2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -14,9 +14,9 @@ project("hdr_histogram")
+ # 3. If any interfaces have been added since the last public release, then increment age.
+ # 4. If any interfaces have been removed since the last public release, then set age to 0.
+
+-set(HDR_SOVERSION_CURRENT 0)
+-set(HDR_SOVERSION_AGE 9)
+-set(HDR_SOVERSION_REVISION 3)
++set(HDR_SOVERSION_CURRENT 1)
++set(HDR_SOVERSION_AGE 0)
++set(HDR_SOVERSION_REVISION 0)
+
+ set(HDR_VERSION ${HDR_SOVERSION_CURRENT}.${HDR_SOVERSION_AGE}.${HDR_SOVERSION_REVISION})
+ set(HDR_SOVERSION ${HDR_SOVERSION_CURRENT})
diff --git a/hdrhistogram.spec b/hdrhistogram.spec
index dde060a..3963e08 100644
--- a/hdrhistogram.spec
+++ b/hdrhistogram.spec
@@ -7,7 +7,7 @@
# Please, preserve the changelog entries
#
-%global gh_commit eb371a12b9d42b9a9a8c2497841d5fa0d44f6ca4
+%global gh_commit 581014321c66a5607fa0911e60815490c2f64650
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner HdrHistogram
%global gh_project HdrHistogram_c
@@ -16,7 +16,7 @@
Name: hdrhistogram
Summary: A High Dynamic Range (HDR) Histogram
-Version: 0.9.1
+Version: 0.9.3
Release: 1%{?dist}
License: CC0 or BSD
Group: System Environment/Libraries
@@ -24,10 +24,11 @@ Group: System Environment/Libraries
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
-# See https://github.com/HdrHistogram/HdrHistogram_c/pull/28
-# honours LIB_SUFFIX option
-# set soname version
-Patch0: %{name}-pr28.patch
+# build with fPIC
+Patch0: %{name}-fpic.patch
+# See https://github.com/HdrHistogram/HdrHistogram_c/issues/31
+# fix soname version
+Patch1: %{name}-sover.patch
BuildRequires: cmake > 2.8
BuildRequires: zlib-devel
@@ -71,9 +72,10 @@ This package contains the %{libname} library.
mkdir docs
cp -pr examples docs/examples
-%patch0 -p1 -b .pr28
+%patch0 -p1 -b .fpic
+%patch1 -p1 -b .pr28
-sed -e '/CMAKE_C_FLAGS/d' -i CMakeLists.txt
+grep CMAKE_C_FLAGS CMakeLists.txt
%build
@@ -91,6 +93,9 @@ make %{_smp_mflags}
%install
make install DESTDIR="%{buildroot}"
+# https://github.com/HdrHistogram/HdrHistogram_c/issues/32
+install -p src/hdr_thread.h %{buildroot}%{_includedir}/hdr/hdr_thread.h
+
rm %{buildroot}/%{_libdir}/%{libname}_static.a
rm %{buildroot}/%{_bindir}/*test
@@ -124,4 +129,4 @@ make test
%changelog
* Fri Jan 1 2016 Remi Collet <remi@fedoraproject.org> - 0.9.1-1
-- initial package \ No newline at end of file
+- initial package