From ff7b13cb17e55679dbdf9b5ce54a1b86bfd4f3fe Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 3 Jun 2015 16:14:44 +0200 Subject: php-zetacomponents-graph: 1.5.2 - New Package --- Makefile | 4 ++ php-zetacomponents-graph-pr16.patch | 22 ++++++ php-zetacomponents-graph.spec | 131 ++++++++++++++++++++++++++++++++++++ 3 files changed, 157 insertions(+) create mode 100644 Makefile create mode 100644 php-zetacomponents-graph-pr16.patch create mode 100644 php-zetacomponents-graph.spec diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..13af741 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +SRCDIR := $(shell pwd) +NAME := $(shell basename $(SRCDIR)) +include ../../../common/Makefile + diff --git a/php-zetacomponents-graph-pr16.patch b/php-zetacomponents-graph-pr16.patch new file mode 100644 index 0000000..132fff9 --- /dev/null +++ b/php-zetacomponents-graph-pr16.patch @@ -0,0 +1,22 @@ +From eb8c71d063e3b45855b8454e1e75c45ab1e0c188 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Wed, 3 Jun 2015 15:13:30 +0200 +Subject: [PATCH] avoid float precision issue + +--- + tests/dataset_average_test.php | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/dataset_average_test.php b/tests/dataset_average_test.php +index ee5fc4e..23f209b 100644 +--- a/tests/dataset_average_test.php ++++ b/tests/dataset_average_test.php +@@ -334,7 +334,7 @@ public function testIterateOverAverageDataset2() + + foreach ( $averageDataSet as $key => $value ) + { +- $this->assertEquals( (string) ( $start += $stepSize ), $key, 'Wrong step.', .01 ); ++ $this->assertEquals( (string) ( round($start += $stepSize,12) ), $key, 'Wrong step.'); + } + } + diff --git a/php-zetacomponents-graph.spec b/php-zetacomponents-graph.spec new file mode 100644 index 0000000..2652618 --- /dev/null +++ b/php-zetacomponents-graph.spec @@ -0,0 +1,131 @@ +# remirepo/fedora spec file for php-zetacomponents-graph +# +# Copyright (c) 2015 Remi Collet +# License: CC-BY-SA +# http://creativecommons.org/licenses/by-sa/4.0/ +# +# Please, preserve the changelog entries +# + +%global gh_commit 7efda09f967b92fe38a1fbf0c2090fc4fedb0c73 +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_owner zetacomponents +%global gh_project Graph +%global cname graph +%global ezcdir %{_datadir}/php/ezc +%global with_tests %{?_without_tests:0}%{!?_without_tests:1} + +Name: php-%{gh_owner}-%{cname} +Version: 1.5.2 +Release: 1%{?dist} +Summary: Zeta Graph Component + +Group: Development/Libraries +License: ASL 2.0 +URL: http://zetacomponents.org/ +Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz + +# https://github.com/zetacomponents/Graph/pull/16 +Patch0: %{name}-pr16.patch + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch +BuildRequires: %{_bindir}/phpab +%if %{with_tests} +BuildRequires: %{_bindir}/phpunit +BuildRequires: php-gd +BuildRequires: php-composer(%{gh_owner}/base) >= 1.8 +BuildRequires: php-composer(%{gh_owner}/unit-test) +%endif + +# From composer.json, "require": { +# "zetacomponents/base": "~1.8" +Requires: php-composer(%{gh_owner}/base) >= 1.8 +Requires: php-composer(%{gh_owner}/base) < 2 +# From composer.json, "suggest": { +# "ext-gd": "Used by the GD driver, one of the choices for generating bitmap images." +Requires: php-gd +# From phpcompatinfo report for 1.5.2 +Requires: php(language) > 5.3 +Requires: php-date +Requires: php-dom +Requires: php-gd +Requires: php-pcre +Requires: php-simplexml +Requires: php-spl +Requires: php-xml + +Provides: php-composer(%{gh_owner}/%{cname}) = %{version} + + +%description +This is the base package of the eZ publish components, offering the basic +support that all Components need. In the first version this will be the +autoload support. + + +%prep +%setup -q -n %{gh_project}-%{gh_commit} + +%patch0 -p1 + + +%build +: Generate a simple autoloader +%{_bindir}/phpab \ + --output src/autoloader.php \ + src +cat < - 1.5.2-1 +- initial package +- open https://github.com/zetacomponents/Graph/pull/16 \ No newline at end of file -- cgit