The package rpms/ocaml-merlin.git has added or updated architecture specific content in
its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/ocaml-merlin.git/commit/?id=88df2....
Change:
+%ifarch %{ocaml_native_compiler}
Thanks.
Full change:
============
commit d5c64a31067f183b5f953c4cfb76746bffe7a2fa
Author: Jerry James <loganjerry(a)gmail.com>
Date: Fri Mar 26 17:27:07 2021 -0600
Adapt a test that fails only on Fedora with OCaml 4.11.
diff --git a/.gitignore b/.gitignore
index 973c9f0..c5db185 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,2 @@
-/merlin-3.2.2.tar.gz
-/merlin-3.3.1.tar.gz
-/merlin-3.3.2.tar.gz
-/merlin-3.3.3.tar.gz
-/merlin-v3.3.4-preview1.tbz
-/merlin-v3.3.4.tbz
-/merlin-3.3.7-4.11-preview1.tar.gz
-/merlin-4.1.tar.gz
+/merlin-*.tar.gz
+/v*.tar.gz
diff --git a/ocaml-merlin-fedora.patch b/ocaml-merlin-fedora.patch
new file mode 100644
index 0000000..24f6f5b
--- /dev/null
+++ b/ocaml-merlin-fedora.patch
@@ -0,0 +1,14 @@
+--- a/tests/test-dirs/locate/context-detection/cd-mod_constr.t/run.t 2021-02-16
02:59:33.000000000 -0700
++++ b/tests/test-dirs/locate/context-detection/cd-mod_constr.t/run.t 2021-03-26
16:53:43.277270263 -0600
+@@ -3,9 +3,9 @@
+ {
+ "class": "return",
+ "value": {
+- "file": "lib/ocaml/string.ml",
++ "file": "lib/ocaml/stdlib.mli",
+ "pos": {
+- "line": 1,
++ "line": 1480,
+ "col": 0
+ }
+ },
diff --git a/ocaml-merlin.spec b/ocaml-merlin.spec
index ec2b173..3238286 100644
--- a/ocaml-merlin.spec
+++ b/ocaml-merlin.spec
@@ -20,11 +20,14 @@ Summary: Context sensitive completion for OCaml
# The final license is due to the linking exception on the LGPLv2 files.
License: MIT and QPL
URL:
https://ocaml.github.io/%{srcname}/
-Source0:
https://github.com/ocaml/%{srcname}/archive/v%{version}/%{srcname}-%{vers...
+Source0:
https://github.com/ocaml/%{srcname}/archive/refs/tags/v%{version}-411.tar.gz
# Fix the tests to work with /usr/lib64 as well as /usr/lib
Patch0: %{name}-test-lib64.patch
# Update the Emacs interface for recent changes to emacs-iedit
Patch1: %{name}-iedit.patch
+# Adapt a test that fails only on Fedora with OCaml 4.11.
+# It passes with OCaml 4.12, and on non-Fedora systems. Why?
+Patch2: %{name}-fedora.patch
BuildRequires: emacs
BuildRequires: emacs-auto-complete
@@ -92,7 +95,7 @@ Requires: vim-filesystem
This package contains the Vim interface to merlin.
%prep
-%autosetup -n %{srcname}-%{version} -p1
+%autosetup -n %{srcname}-%{version}-411 -p1
%build
dune build %{_smp_mflags}
diff --git a/sources b/sources
index b1cd0ce..f83faba 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (merlin-4.1.tar.gz) =
f0f3ada007f8214b97a8557bddca87eded48ee01a8bb88aba6476e52881ead52d9f47e2666a9292b5c6a490e4cfdc7d8bb322e8489f78eaac7b0f80b6d1e87bc
+SHA512 (v4.1-411.tar.gz) =
b3a7a3b9a2629dd1eac8d5de03f92b48ec36c25ce12f8aaadf470f744dec78bf04bf9b69fc70032c3d3cab077dc8b28b2e936e42734b5aa6dfa9b5b0fbaa364f
commit 88df21fcb3e8004456a280a547b2f1e2a96f0f4d
Author: Jerry James <loganjerry(a)gmail.com>
Date: Fri Mar 26 16:21:22 2021 -0600
Fix tests on 64-bit systems with the -test-lib64 patch.
- Add -emacs-iedit patch to adapt to recent iedit changes.
- Build with auto-complete, company-mode, and caml-mode support.
- Add subpackages: dot-merlin-reader, emacs-merlin, and vim-merlin.
- Generate autoloads for the Emacs interface.
diff --git a/ocaml-merlin-iedit.patch b/ocaml-merlin-iedit.patch
new file mode 100644
index 0000000..1ddf2c6
--- /dev/null
+++ b/ocaml-merlin-iedit.patch
@@ -0,0 +1,38 @@
+--- a/emacs/merlin-company.el 2021-02-16 03:29:29.000000000 -0700
++++ b/emacs/merlin-company.el 2021-03-09 16:53:30.948523612 -0700
+@@ -29,6 +29,7 @@
+
+ (defcustom merlin-company-everywhere t
+ "Non-nil to offer completions in comments and strings."
++ :group 'merlin
+ :type 'boolean)
+
+ ;; Internal functions
+--- a/emacs/merlin-iedit.el 2021-02-16 03:29:29.000000000 -0700
++++ b/emacs/merlin-iedit.el 2021-03-10 09:03:03.533151403 -0700
+@@ -32,8 +32,8 @@
+ iedit-read-only-occurrences-overlays)
+ (push (iedit-make-occurrence-overlay beginning ending)
+ iedit-occurrences-overlays))))
+- (when (and occurrences iedit-unmatched-lines-invisible)
+- (iedit-hide-unmatched-lines iedit-occurrence-context-lines))))
++ (when (and occurrences iedit-hiding)
++ (iedit-hide-context-lines iedit-occurrence-context-lines))))
+ (length occurrences))
+
+ (defun merlin-iedit-occurrences ()
+@@ -44,10 +44,10 @@
+ "-identifier-at" (merlin/unmake-point (point)))))
+ (when r
+ (if (listp r)
+- (flet ((iedit-printable (a)
+- (merlin-iedit--printable))
+- (iedit-make-occurrences-overlays (a b c)
+- (merlin-iedit--make-occurrences-overlays a)))
++ (cl-flet ((iedit-printable (a)
++ (merlin-iedit--printable))
++ (iedit-make-occurrences-overlays (a b c)
++ (merlin-iedit--make-occurrences-overlays a)))
+ (iedit-start r (point-min) (point-max)))
+ (message r))))))
+
diff --git a/ocaml-merlin-test-lib64.patch b/ocaml-merlin-test-lib64.patch
new file mode 100644
index 0000000..0d6a2d3
--- /dev/null
+++ b/ocaml-merlin-test-lib64.patch
@@ -0,0 +1,10 @@
+--- a/tests/merlin-wrapper 2021-02-16 02:59:33.000000000 -0700
++++ b/tests/merlin-wrapper 2021-02-23 15:54:14.988017568 -0700
+@@ -4,6 +4,6 @@ export PATH=$(dirname dot-merlin-reader)
+
+ touch .merlin && ocamlmerlin "$@" \
+ | jq 'del(.timing)' \
+- | sed -e 's:"[^"]*lib/ocaml:"lib/ocaml:g' \
++ | sed -re 's:"[^"]*lib(64)?/ocaml:"lib/ocaml:g' \
+ | sed -e 's:\\n:\
+ :g'
diff --git a/ocaml-merlin.spec b/ocaml-merlin.spec
index 54a4ccc..ec2b173 100644
--- a/ocaml-merlin.spec
+++ b/ocaml-merlin.spec
@@ -1,89 +1,164 @@
-Name: ocaml-merlin
-Version: 4.1
-Release: 1%{?dist}
-Summary: Context sensitive completion for OCaml in Vim and Emacs
+%ifnarch %{ocaml_native_compiler}
+%global debug_package %{nil}
+%endif
-%global libname %(echo %{name} | sed -e 's/^ocaml-//')
+%global srcname merlin
-# The entire source is MIT except src/ocaml are QPL
+Name: ocaml-%{srcname}
+Version: 4.1
+Release: 2%{?dist}
+Summary: Context sensitive completion for OCaml
+
+# The entire source is MIT except:
+# - QPL: src/ocaml/driver/pparse.ml{,i}
+# - QPL: src/ocaml/preprocess/lexer_ident.mll
+# - QPL: src/ocaml/preprocess/lexer_raw.ml{i,l}
+# - LGPLv2 with exceptions: src/ocaml/preprocess/parser_raw.mly
+# - LGPLv2 with exceptions: upstream/ocaml_411/parsing/parser.mly
+# - LGPLv2 with exceptions: upstream/ocaml_412/parsing/parser.mly
+#
+# The final license is due to the linking exception on the LGPLv2 files.
License: MIT and QPL
-URL:
https://github.com/ocaml/%{libname}
-Source0:
https://github.com/ocaml/%{libname}/archive/v%{version}.tar.gz#/%{libname...
+URL:
https://ocaml.github.io/%{srcname}/
+Source0:
https://github.com/ocaml/%{srcname}/archive/v%{version}/%{srcname}-%{vers...
+# Fix the tests to work with /usr/lib64 as well as /usr/lib
+Patch0: %{name}-test-lib64.patch
+# Update the Emacs interface for recent changes to emacs-iedit
+Patch1: %{name}-iedit.patch
-BuildRequires: ocaml
-BuildRequires: ocaml-dune >= 1.8
-BuildRequires: ocaml-findlib-devel
-BuildRequires: ocaml-yojson-devel
+BuildRequires: emacs
+BuildRequires: emacs-auto-complete
+BuildRequires: emacs-company-mode
+BuildRequires: emacs-iedit
+BuildRequires: emacs-tuareg
+BuildRequires: jq
+BuildRequires: ocaml >= 4.11.1
BuildRequires: ocaml-biniou-devel
+BuildRequires: ocaml-caml-mode
+BuildRequires: ocaml-csexp-devel >= 1.2.3
+BuildRequires: ocaml-dune >= 2.7.0
BuildRequires: ocaml-easy-format-devel
-BuildRequires: ocaml-csexp-devel
-BuildRequires: ocaml-result-devel
-
-# For merlin-lsp
-#BuildRequires: ocaml-yojson-devel >= 1.6.0
-#BuildRequires: ocaml-menhir-devel
-#BuildRequires: ocaml-ppx-deriving-devel
-#BuildRequires: ocaml-ppx-deriving-yojson-devel
-#BuildRequires: ocaml-ppx-tools-devel
-#BuildRequires: ocaml-ppx-derivers-devel
-#BuildRequires: ocaml-migrate-parsetree-devel
-#BuildRequires: ocaml-result-devel
-
-# Required for tests, not available in Fedora
-#BuildRequires: craml
-BuildRequires: emacs
-# For byte-compile elisp
-#BuildRequires: emacs-auto-complete
-#BuildRequires: emacs-tuareg
-# The following two are not yet available in Fedora.
-# So byte compilation is disabled
-#BuildRequires: emacs-company
-#BuildRequires: emacs-iedit
+BuildRequires: ocaml-findlib-devel >= 1.6.0
+BuildRequires: ocaml-menhir-devel
+BuildRequires: ocaml-odoc
+BuildRequires: ocaml-result-devel >= 1.5
+BuildRequires: ocaml-source
+BuildRequires: ocaml-yojson-devel >= 1.6.0
BuildRequires: vim-enhanced
-Requires: emacs-filesystem >= %{_emacs_version}
+
+Requires: dot-merlin-reader%{?_isa} = %{version}-%{release}
+
+%global _desc %{expand:
+Merlin is an assistant for editing OCaml code. It aims to provide the
+features available in modern IDEs: error reporting, auto completion,
+source browsing and much more.}
+
+%description %_desc
+
+You should also install a package that integrates with your editor of
+choice, such as emacs-merlin or vim-merlin.
+
+%package -n dot-merlin-reader
+Summary: Merlin configuration file reader
+
+%description -n dot-merlin-reader
+This package contains a helper process that reads .merlin files and gives
+the normalized content to merlin.
+
+%package -n emacs-merlin
+Summary: Context sensitive completion for OCaml in Emacs
+BuildArch: noarch
+Requires: ocaml-merlin = %{version}-%{release}
+Requires: emacs(bin) >= %{?_emacs_version}%{!?_emacs_version:0}
+Requires: emacs-caml-mode
+
+Recommends: emacs-auto-complete
+Recommends: emacs-company-mode
+Recommends: emacs-iedit
+Recommends: emacs-tuareg
+
+%description -n emacs-merlin %_desc
+
+This package contains the Emacs interface to merlin.
+
+%package -n vim-merlin
+Summary: Context sensitive completion for OCaml in Vim
+BuildArch: noarch
+Requires: ocaml-merlin = %{version}-%{release}
Requires: vim-filesystem
-%description
-Merlin is an assistant for editing OCaml code. It aims to provide the features
-available in modern IDEs: error reporting, auto completion, source browsing and
-much more.
+%description -n vim-merlin %_desc
+This package contains the Vim interface to merlin.
%prep
-%setup -q -n %{libname}-%{version}
-
+%autosetup -n %{srcname}-%{version} -p1
%build
-dune build %{_smp_mflags} --build-dir _build_%{libname} -p %{libname}
-#dune build --build-dir _build_%{libname}_lsp -p %{libname}-lsp
-
+dune build %{_smp_mflags}
+dune build %{_smp_mflags} @doc
%install
-dune install --build-dir _build_%{libname} --prefix=%{buildroot}%{_prefix}
--libdir=%{buildroot}%{_libdir}/ocaml %{libname}
-#dune install --build-dir _build_%{libname}_lsp --prefix=%{buildroot}%{_prefix}
--libdir=%{buildroot}%{_libdir}/ocaml %{libname}-lsp
+dune install --destdir=%{buildroot}
+
+# We do not want the dune markers
+find _build/default/_doc/_html -name .dune-keep -delete
+
+# We do not want the ml files
+find %{buildroot}%{_libdir}/ocaml -name \*.ml -delete
+
+# We install the documentation with the doc macro
+rm -fr %{buildroot}%{_prefix}/doc
+
+%ifarch %{ocaml_native_compiler}
+# Add missing executable bits
+find %{buildroot}%{_libdir}/ocaml -name \*.cmxs -exec chmod a+x {} \+
+%endif
# Reinstall vim files to Fedora default location
mkdir -p %{buildroot}%{vimfiles_root}
-mv %{buildroot}%{_datadir}/%{libname}/vim/* %{buildroot}%{vimfiles_root}
-rmdir %{buildroot}%{_datadir}/%{libname}/vim
-rmdir %{buildroot}%{_datadir}/%{libname}
-# Reinstall documents using %%doc later
-rm -fr %{buildroot}%{_prefix}/doc
+mv %{buildroot}%{_datadir}/%{srcname}/vim/* %{buildroot}%{vimfiles_root}
+rm -fr %{buildroot}%{_datadir}/%{srcname}
+
+# Generate the autoload file for the Emacs interface and byte compile
+cd %{buildroot}%{_emacs_sitelispdir}
+emacs -batch --no-init-file --no-site-file \
+ --eval "(progn (setq generated-autoload-file
\"$PWD/merlin-autoloads.el\" backup-inhibited t) (update-directory-autoloads
\".\"))"
+mkdir -p %{buildroot}%{_emacs_sitestartdir}
+mv merlin-autoloads.el %{buildroot}%{_emacs_sitestartdir}
+%_emacs_bytecompile *.el
+cd -
%check
-# Test requirement is not satisfied in Fedora
-
+dune runtest
%files
-%doc doc/* featuremap.* README.md CHANGES.md
+%doc featuremap.* CHANGES.md README.md
+%license LICENSE
+%{_bindir}/ocamlmerlin
+%{_bindir}/ocamlmerlin-server
+%{_libdir}/ocaml/%{srcname}/
+
+%files -n dot-merlin-reader
%license LICENSE
-%{_bindir}/*
-%{_libdir}/ocaml/%{libname}
-#%{_libdir}/ocaml/%{libname}-lsp
-%{_emacs_sitelispdir}/*
+%{_bindir}/dot-merlin-reader
+%{_libdir}/ocaml/dot-merlin-reader/
+
+%files -n emacs-merlin
+%{_emacs_sitelispdir}/merlin*
+%{_emacs_sitestartdir}/merlin-autoloads.el
+
+%files -n vim-merlin
%{vimfiles_root}/*/*
%changelog
+* Fri Mar 26 2021 Jerry James <loganjerry(a)gmail.com> - 4.1-2
+- Fix tests on 64-bit systems with the -test-lib64 patch
+- Add -emacs-iedit patch to adapt to recent iedit changes
+- Build with auto-complete, company-mode, and caml-mode support
+- Add subpackages: dot-merlin-reader, emacs-merlin, and vim-merlin
+- Generate autoloads for the Emacs interface
+
* Mon Mar 1 2021 Richard W.M. Jones <rjones(a)redhat.com> - 4.1-1
- New upstream version 4.1.
- OCaml 4.12.0 build
commit a44280fd07a1f26df83e5e836709bb81fe0ae67f
Author: Richard W.M. Jones <rjones(a)redhat.com>
Date: Mon Mar 1 18:44:12 2021 +0000
Add BR ocaml-result-devel
diff --git a/ocaml-merlin.spec b/ocaml-merlin.spec
index 43af296..54a4ccc 100644
--- a/ocaml-merlin.spec
+++ b/ocaml-merlin.spec
@@ -17,6 +17,7 @@ BuildRequires: ocaml-yojson-devel
BuildRequires: ocaml-biniou-devel
BuildRequires: ocaml-easy-format-devel
BuildRequires: ocaml-csexp-devel
+BuildRequires: ocaml-result-devel
# For merlin-lsp
#BuildRequires: ocaml-yojson-devel >= 1.6.0
commit 7fe5fb481090db451f95a361a4f4f964c6345073
Author: Richard W.M. Jones <rjones(a)redhat.com>
Date: Mon Mar 1 18:30:48 2021 +0000
Add BR ocaml-csexp-devel
diff --git a/ocaml-merlin.spec b/ocaml-merlin.spec
index 68acc3a..43af296 100644
--- a/ocaml-merlin.spec
+++ b/ocaml-merlin.spec
@@ -16,6 +16,7 @@ BuildRequires: ocaml-findlib-devel
BuildRequires: ocaml-yojson-devel
BuildRequires: ocaml-biniou-devel
BuildRequires: ocaml-easy-format-devel
+BuildRequires: ocaml-csexp-devel
# For merlin-lsp
#BuildRequires: ocaml-yojson-devel >= 1.6.0
commit 7cfe3614827023e7f532ca5bec4ca7dbc343223a
Author: Richard W.M. Jones <rjones(a)redhat.com>
Date: Mon Mar 1 18:22:36 2021 +0000
New upstream version 4.1.
diff --git a/.gitignore b/.gitignore
index 837a16f..973c9f0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
/merlin-v3.3.4-preview1.tbz
/merlin-v3.3.4.tbz
/merlin-3.3.7-4.11-preview1.tar.gz
+/merlin-4.1.tar.gz
diff --git a/ocaml-merlin.spec b/ocaml-merlin.spec
index 735560e..68acc3a 100644
--- a/ocaml-merlin.spec
+++ b/ocaml-merlin.spec
@@ -1,16 +1,14 @@
Name: ocaml-merlin
-Version: 3.3.7
-Release: 0.5.preview1%{?dist}
+Version: 4.1
+Release: 1%{?dist}
Summary: Context sensitive completion for OCaml in Vim and Emacs
%global libname %(echo %{name} | sed -e 's/^ocaml-//')
-%global upstream_version %{version}-4.11-preview1
-%global tag v%{upstream_version}
# The entire source is MIT except src/ocaml are QPL
License: MIT and QPL
URL:
https://github.com/ocaml/%{libname}
-Source0:
https://github.com/ocaml/%{libname}/archive/%{tag}.tar.gz#/%{libname}-%{u...
+Source0:
https://github.com/ocaml/%{libname}/archive/v%{version}.tar.gz#/%{libname...
BuildRequires: ocaml
BuildRequires: ocaml-dune >= 1.8
@@ -50,7 +48,7 @@ much more.
%prep
-%setup -q -n %{libname}-%{upstream_version}
+%setup -q -n %{libname}-%{version}
%build
@@ -84,7 +82,8 @@ rm -fr %{buildroot}%{_prefix}/doc
%{vimfiles_root}/*/*
%changelog
-* Mon Mar 1 17:25:37 GMT 2021 Richard W.M. Jones <rjones(a)redhat.com> -
3.3.7-0.5.preview1
+* Mon Mar 1 2021 Richard W.M. Jones <rjones(a)redhat.com> - 4.1-1
+- New upstream version 4.1.
- OCaml 4.12.0 build
* Tue Jan 26 2021 Fedora Release Engineering <releng(a)fedoraproject.org> -
3.3.7-0.4.preview1
diff --git a/sources b/sources
index 2e4ab57..b1cd0ce 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (merlin-3.3.7-4.11-preview1.tar.gz) =
4a5ba39e5353480b97e89ac9cd5c3f4bf66d2aa933920a86e695b9077d8238e4b043f4c406fc866da62839edc07a512ef2d636ddfe0a30e99f6133b74a48c629
+SHA512 (merlin-4.1.tar.gz) =
f0f3ada007f8214b97a8557bddca87eded48ee01a8bb88aba6476e52881ead52d9f47e2666a9292b5c6a490e4cfdc7d8bb322e8489f78eaac7b0f80b6d1e87bc
commit 0a7bfe8999c95eb1d723e3a081c35db2f3d08851
Author: Richard W.M. Jones <rjones(a)redhat.com>
Date: Mon Mar 1 17:25:38 2021 +0000
OCaml 4.12.0 build
diff --git a/ocaml-merlin.spec b/ocaml-merlin.spec
index e61bf09..735560e 100644
--- a/ocaml-merlin.spec
+++ b/ocaml-merlin.spec
@@ -1,6 +1,6 @@
Name: ocaml-merlin
Version: 3.3.7
-Release: 0.4.preview1%{?dist}
+Release: 0.5.preview1%{?dist}
Summary: Context sensitive completion for OCaml in Vim and Emacs
%global libname %(echo %{name} | sed -e 's/^ocaml-//')
@@ -84,6 +84,9 @@ rm -fr %{buildroot}%{_prefix}/doc
%{vimfiles_root}/*/*
%changelog
+* Mon Mar 1 17:25:37 GMT 2021 Richard W.M. Jones <rjones(a)redhat.com> -
3.3.7-0.5.preview1
+- OCaml 4.12.0 build
+
* Tue Jan 26 2021 Fedora Release Engineering <releng(a)fedoraproject.org> -
3.3.7-0.4.preview1
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild