[erlang-meck] Fix FTBFS in Rawhide (F-19)
Peter Lemenkov
peter at fedoraproject.org
Sat Mar 2 14:20:49 UTC 2013
commit 4cbc987a72eec70624e58b11486b939443ed8fcb
Author: Peter Lemenkov <lemenkov at gmail.com>
Date: Sat Mar 2 18:20:37 2013 +0400
Fix FTBFS in Rawhide (F-19)
Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
...01-No-such-types-in-R12B-dict-and-boolean.patch | 77 --------------------
...meck-0001-Remove-parametrized-module-test.patch | 69 ++++++++++++++++++
...-No-such-function-in-R12B-lists-keyfind-3.patch | 26 -------
erlang-meck.spec | 22 +++----
4 files changed, 78 insertions(+), 116 deletions(-)
---
diff --git a/erlang-meck-0001-Remove-parametrized-module-test.patch b/erlang-meck-0001-Remove-parametrized-module-test.patch
new file mode 100644
index 0000000..d8578ae
--- /dev/null
+++ b/erlang-meck-0001-Remove-parametrized-module-test.patch
@@ -0,0 +1,69 @@
+From 0ff19e6586d7e7eaf847ba30506019009a064cd9 Mon Sep 17 00:00:00 2001
+From: Joseph Wayne Norton <norton at alum.mit.edu>
+Date: Sun, 27 Jan 2013 21:55:10 +0900
+Subject: [PATCH 1/1] Remove parametrized module test
+
+Erlang/OTP R16, coming soon, will do away with parameterized modules
+(see Issue 4 under http://www.erlang.org/news/35 for details).
+
+Conflicts:
+ test/meck_tests.erl
+---
+ test/meck_test_parametrized_module.erl | 7 -------
+ test/meck_tests.erl | 26 --------------------------
+ 2 files changed, 33 deletions(-)
+ delete mode 100644 test/meck_test_parametrized_module.erl
+
+diff --git a/test/meck_test_parametrized_module.erl b/test/meck_test_parametrized_module.erl
+deleted file mode 100644
+index 1912679..0000000
+--- a/test/meck_test_parametrized_module.erl
++++ /dev/null
+@@ -1,7 +0,0 @@
+--module(meck_test_parametrized_module, [Var1, Var2]).
+--export([which/0, var1/0, var2/0]).
+-
+-which() -> original.
+-
+-var1() -> {original, Var1}.
+-var2() -> {original, Var2}.
+diff --git a/test/meck_tests.erl b/test/meck_tests.erl
+index 9e01952..3cc22c9 100644
+--- a/test/meck_tests.erl
++++ b/test/meck_tests.erl
+@@ -851,32 +851,6 @@ cannot_expect_bif_or_autogenerated_test() ->
+ meck:expect(unicode, module_info, 0, doh)),
+ ?assertEqual(ok, meck:unload(unicode)).
+
+-meck_parametrized_module_test() ->
+- ?assertEqual(ok, meck:new(meck_test_parametrized_module)),
+- ?assertEqual(ok, meck:expect(meck_test_parametrized_module, new,
+- fun(V1, V2) ->
+- {meck_test_parametrized_module, V1, V2}
+- end)),
+- ?assertEqual(ok, meck:expect(meck_test_parametrized_module, which, 1, mecked)),
+- Object = meck_test_parametrized_module:new(var1, var2),
+- ?assertEqual(mecked, Object:which()),
+- ?assertEqual(ok, meck:unload(meck_test_parametrized_module)).
+-
+-meck_parametrized_module_passthrough_test() ->
+- ?assertEqual(ok, meck:new(meck_test_parametrized_module, [passthrough])),
+- ?assertEqual(ok, meck:expect(meck_test_parametrized_module, new,
+- fun(V1, V2) ->
+- {meck_test_parametrized_module, V1, V2}
+- end)),
+- ?assertEqual(ok, meck:expect(meck_test_parametrized_module, var2,
+- fun({_, _Var1, Var2} = _This) ->
+- {mecked, Var2}
+- end)),
+- Object = meck_test_parametrized_module:new(var1, var2),
+- ?assertEqual({original, var1}, Object:var1()),
+- ?assertEqual({mecked, var2}, Object:var2()),
+- ?assertEqual(ok, meck:unload(meck_test_parametrized_module)).
+-
+ %%==============================================================================
+ %% Internal Functions
+ %%==============================================================================
+--
+1.8.1.4
+
diff --git a/erlang-meck.spec b/erlang-meck.spec
index b37387a..4379d0c 100644
--- a/erlang-meck.spec
+++ b/erlang-meck.spec
@@ -8,16 +8,15 @@
Name: erlang-%{realname}
Version: 0.7.2
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A mocking library for Erlang
Group: Development/Libraries
License: ASL 2.0
URL: http://eproxus.github.com/meck/
# wget --content-disposition https://github.com/eproxus/meck/tarball/0.7.2
Source0: %{upstream}-%{realname}-%{version}-%{patchnumber}-g%{git_tag}.tar.gz
-Patch1: erlang-meck-0001-No-such-types-in-R12B-dict-and-boolean.patch
-Patch2: erlang-meck-0002-No-such-function-in-R12B-lists-keyfind-3.patch
-BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
+# Backported from upstream - https://github.com/eproxus/meck/pull/95
+Patch1: erlang-meck-0001-Remove-parametrized-module-test.patch
BuildRequires: erlang-rebar
Requires: erlang-compiler%{?_isa}
Requires: erlang-erts%{?_isa}
@@ -37,26 +36,19 @@ modules, such as making sure no function is called in a way it should not.
%prep
%setup -q -n %{upstream}-%{realname}-37715e6
-%if 0%{?el5}
-%patch1 -p1 -b .missing_types
-%patch2 -p1 -b .no_lists_keyfind_3
-%endif
+%patch1 -p1 -b .no_param_mods
%build
rebar compile -v
+
%install
-rm -rf %{buildroot}
mkdir -p %{buildroot}%{_libdir}/erlang/lib/meck-%{version}/ebin
install -m 644 ebin/meck.app %{buildroot}%{_libdir}/erlang/lib/meck-%{version}/ebin
install -m 644 ebin/*.beam %{buildroot}%{_libdir}/erlang/lib/meck-%{version}/ebin
-%clean
-rm -rf %{buildroot}
-
-
%check
rebar eunit -v
@@ -70,6 +62,10 @@ rebar eunit -v
%changelog
+* Sat Mar 02 2013 Peter Lemenkov <lemenkov at gmail.com> - 0.7.2-3
+- Remove tests parametrized modules - they are no longer supported
+- Drop support for EL5
+
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.7.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
More information about the scm-commits
mailing list