diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f3adf9d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/plv8-2.1.0.tar.gz diff --git a/plv8-2.1.0-make-bug-1517657.patch b/plv8-2.1.0-make-bug-1517657.patch new file mode 100644 index 0000000..0b9d644 --- /dev/null +++ b/plv8-2.1.0-make-bug-1517657.patch @@ -0,0 +1,17 @@ +Work-around rhbz#1517657 v8 bug, we need to create the +libv8_libplatform.so link in CWD and pass the linker flags +down to gcc through $(SHLIB_LINK). + +diff --git a/Makefile b/Makefile +index f410301..2ed035b 100644 +--- a/Makefile ++++ b/Makefile +@@ -43,7 +43,7 @@ ifndef DISABLE_DIALECT + REGRESS += dialect + endif + +-SHLIB_LINK += -lv8 ++SHLIB_LINK += -lv8 $(RPM_HACK_LDFLAGS) + ifdef V8_OUTDIR + SHLIB_LINK += -L$(V8_OUTDIR) + else diff --git a/plv8-2.1.0-make-respects-CXXFLAGS.patch b/plv8-2.1.0-make-respects-CXXFLAGS.patch new file mode 100644 index 0000000..5536503 --- /dev/null +++ b/plv8-2.1.0-make-respects-CXXFLAGS.patch @@ -0,0 +1,26 @@ +From 5964c244b63d87f775e666157d1470ad91eb8e40 Mon Sep 17 00:00:00 2001 +From: Pavel Raiskup +Date: Fri, 15 Dec 2017 17:28:56 +0100 +Subject: Take the standard $CXXFLAGS into account. + +Proposed in https://github.com/plv8/plv8/pull/247 + +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 263d070..305999c 100644 +--- a/Makefile ++++ b/Makefile +@@ -60,7 +60,7 @@ endif + + OPTFLAGS = -O2 -std=c++11 -fno-rtti + +-CCFLAGS = -Wall $(OPTFLAGS) $(OPT_ENABLE_DEBUGGER_SUPPORT) ++CCFLAGS = -Wall $(CXXFLAGS) $(OPTFLAGS) $(OPT_ENABLE_DEBUGGER_SUPPORT) + + ifdef V8_SRCDIR + override CPPFLAGS += -I$(V8_SRCDIR) -I$(V8_SRCDIR)/include +-- +2.14.3 diff --git a/plv8-2.1.0-make.patch b/plv8-2.1.0-make.patch deleted file mode 100644 index 7bdf69e..0000000 --- a/plv8-2.1.0-make.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 5964c244b63d87f775e666157d1470ad91eb8e40 Mon Sep 17 00:00:00 2001 -From: Pavel Raiskup -Date: Fri, 15 Dec 2017 17:28:56 +0100 -Subject: [PATCH 2/2] Take the standard $CXXFLAGS into account. - ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 263d070..305999c 100644 ---- a/Makefile -+++ b/Makefile -@@ -60,7 +60,7 @@ endif - - OPTFLAGS = -O2 -std=c++11 -fno-rtti - --CCFLAGS = -Wall $(OPTFLAGS) $(OPT_ENABLE_DEBUGGER_SUPPORT) -+CCFLAGS = -Wall $(CXXFLAGS) $(OPTFLAGS) $(OPT_ENABLE_DEBUGGER_SUPPORT) - - ifdef V8_SRCDIR - override CPPFLAGS += -I$(V8_SRCDIR) -I$(V8_SRCDIR)/include --- -2.14.3 - -diff --git a/Makefile b/Makefile -index f410301..2ed035b 100644 ---- a/Makefile -+++ b/Makefile -@@ -43,7 +43,7 @@ ifndef DISABLE_DIALECT - REGRESS += dialect - endif - --SHLIB_LINK += -lv8 -+SHLIB_LINK += -lv8 $(RPM_HACK_LDFLAGS) - ifdef V8_OUTDIR - SHLIB_LINK += -L$(V8_OUTDIR) - else diff --git a/plv8.spec b/plv8.spec index 76df92b..821cc52 100644 --- a/plv8.spec +++ b/plv8.spec @@ -7,13 +7,14 @@ Summary: V8 Engine Javascript Procedural Language add-on for PostgreSQL Name: %{sname} Version: 2.1.0 -Release: 3%{?dist} +Release: 4%{?dist} License: BSD -Group: Applications/Databases -Source0: https://github.com/%{sname}/%{sname}/archive/v%{version}.tar.gz +Source0: https://github.com/%{sname}/%{sname}/archive/v%{version}/%{name}-%{version}.tar.gz -Patch0: plv8-2.1.0-make.patch -Patch1: plv8-2.1.0-make-test.patch +# Please self-document the patches inside. +Patch0: plv8-2.1.0-make-respects-CXXFLAGS.patch +Patch1: plv8-2.1.0-make-bug-1517657.patch +Patch2: plv8-2.1.0-make-test.patch URL: https://github.com/plv8/plv8 @@ -57,7 +58,10 @@ export LDFLAGS="$LDFLAGS -L$PWD" %check make test || { find -name '*.diffs' -exec cat {} + +# Known to fail on armv7hl architecture, reported in pull request #247. +%ifnarch %arm false +%endif } %endif @@ -80,6 +84,11 @@ make test || { %changelog +* Tue Dec 19 2017 Pavel Raiskup - 2.1.0-4 +- review fixes - per Robert-André Mauchin notes - better github source url, + drop Group tag, better format of patches (rhbz#1036130) +- ignore test failure on %%arm (reported upstream in PR#247) + * Mon Dec 18 2017 Pavel Raiskup - 2.1.0-3 - enable testsuite