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=27a88....
Change:
-%ifarch %{ocaml_native_compiler}
Thanks.
Full change:
============
commit 27a885d9b9f5426fbfc9819d4fabd726cacac324
Author: Jerry James <loganjerry(a)gmail.com>
Date: Tue Apr 13 16:56:35 2021 -0600
Version 4.2.
- Drop upstreamed -iedit patch.
- Add -emacs patch to fix various Emacs issues.
- Add -textrel patch to fix FTBFS on i386.
diff --git a/.gitignore b/.gitignore
index c5db185..eb306fe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
/merlin-*.tar.gz
+/merlin-*.tbz
/v*.tar.gz
diff --git a/ocaml-merlin-emacs.patch b/ocaml-merlin-emacs.patch
new file mode 100644
index 0000000..68ed692
--- /dev/null
+++ b/ocaml-merlin-emacs.patch
@@ -0,0 +1,103 @@
+Fixes these warnings:
+
+In ac-merlin-locate:
+merlin-ac.el:142:8:Warning: merlin-locate called with 1 argument, but accepts
+ only 0
+
+In toplevel form:
+merlin-cap.el:30:1:Warning: Unused lexical argument `state'
+
+In merlin-company-backend:
+merlin-company.el:112:23:Warning: merlin-locate called with 1 argument, but
+ accepts only 0
+Iedit default key binding is C-;
+
+In toplevel form:
+merlin-iedit.el:49:1:Warning: Unused lexical argument `c'
+merlin-iedit.el:49:1:Warning: Unused lexical argument `b'
+
+In toplevel form:
+merlin-xref.el:16:1:Warning: Unused lexical argument `symbol'
+merlin-xref.el:24:1:Warning: Unused lexical argument `symbol'
+
+In end of data:
+merlin.el:1924:1:Warning: the following functions are not known to be defined:
+ first, rest
+
+--- a/emacs/merlin-ac.el 2021-04-13 02:53:39.000000000 -0600
++++ b/emacs/merlin-ac.el 2021-04-13 14:15:33.735325907 -0600
+@@ -139,7 +139,7 @@ wrong then recompute it."
+ (when (popup-hidden-p ac-menu)
+ (ac-show-menu))
+ (let ((merlin-locate-in-new-window 'always))
+- (merlin-locate (ac-selected-candidate)))
++ (merlin-locate-ident (ac-selected-candidate)))
+ (ac-show-menu)))
+
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+--- a/emacs/merlin-cap.el 2021-04-13 02:53:39.000000000 -0600
++++ b/emacs/merlin-cap.el 2021-04-13 14:18:43.383116394 -0600
+@@ -27,7 +27,7 @@ trigger useless merlin calls.")
+
+ ;; Internal functions
+
+-(defun merlin-cap--lookup (string state)
++(defun merlin-cap--lookup (string _state)
+ "Lookup the entry STRING inside the completion table."
+ (let ((ret (assoc string merlin-cap--table)))
+ (if ret (message "%s%s" (car ret) (cdr ret)))))
+--- a/emacs/merlin-company.el 2021-04-13 02:53:39.000000000 -0600
++++ b/emacs/merlin-company.el 2021-04-13 14:32:00.527211921 -0600
+@@ -109,7 +109,7 @@
+ (doc-buffer (merlin-company--doc-buffer arg))
+ (location
+ (ignore-errors
+- (let ((data (merlin-locate arg)))
++ (let ((data (merlin-locate-ident arg)))
+ (when (listp data)
+ (let ((filename (merlin-lookup 'file data (buffer-file-name)))
+ (linum (cdr (assoc 'line (assoc 'pos data)))))
+--- a/emacs/merlin.el 2021-04-13 02:53:39.000000000 -0600
++++ b/emacs/merlin.el 2021-04-13 14:11:50.200586231 -0600
+@@ -1267,8 +1267,8 @@ strictly within, or nil if there is no s
+ "Returns the first `hole` of the list such that
+ `(funcall comp hole current-point)`"
+ (when holes
+- (let* ((head (first holes))
+- (tail (rest holes))
++ (let* ((head (cl-first holes))
++ (tail (cl-rest holes))
+ (start (merlin-lookup 'start head))
+ (hole-point (merlin-make-point start)))
+ (if (funcall comp hole-point current-point)
+--- a/emacs/merlin-iedit.el 2021-04-13 02:53:39.000000000 -0600
++++ b/emacs/merlin-iedit.el 2021-04-13 14:19:18.000078147 -0600
+@@ -56,7 +56,7 @@
+ (if (listp r)
+ (cl-letf (((symbol-function 'iedit-printable)
#'merlin-iedit--printable)
+ ((symbol-function 'iedit-make-occurrences-overlays)
+- (lambda (a b c)
++ (lambda (a _b _c)
+ (merlin-iedit--make-occurrences-overlays a))))
+ (iedit-start r (point-min) (point-max)))
+ (message r))))))
+--- a/emacs/merlin-xref.el 2021-04-13 02:53:39.000000000 -0600
++++ b/emacs/merlin-xref.el 2021-04-13 14:19:51.431041212 -0600
+@@ -13,7 +13,7 @@
+ (goto-char loc)
+ (buffer-substring (line-beginning-position) (line-end-position))))
+
+-(cl-defmethod xref-backend-references ((_backend (eql merlin-xref)) symbol)
++(cl-defmethod xref-backend-references ((_backend (eql merlin-xref)) _symbol)
+ (mapcar
+ (lambda (loc)
+ (let ((pt (merlin-make-point (alist-get 'start loc))))
+@@ -21,7 +21,7 @@
+ (xref-make-buffer-location (current-buffer) pt))))
+ (merlin--occurrences)))
+
+-(cl-defmethod xref-backend-definitions ((_backend (eql merlin-xref)) symbol)
++(cl-defmethod xref-backend-definitions ((_backend (eql merlin-xref)) _symbol)
+ (let* ((loc (merlin-locate))
+ (file (alist-get 'file loc))
+ (pos (alist-get 'pos loc))
diff --git a/ocaml-merlin-fedora.patch b/ocaml-merlin-fedora.patch
index 24f6f5b..6145dcc 100644
--- a/ocaml-merlin-fedora.patch
+++ b/ocaml-merlin-fedora.patch
@@ -1,5 +1,5 @@
---- 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
+--- a/tests/test-dirs/locate/context-detection/cd-mod_constr.t/run.t 2021-04-13
03:01:00.000000000 -0600
++++ b/tests/test-dirs/locate/context-detection/cd-mod_constr.t/run.t 2021-04-13
16:44:48.503158388 -0600
@@ -3,9 +3,9 @@
{
"class": "return",
@@ -12,3 +12,14 @@
"col": 0
}
},
+--- a/tests/test-dirs/src-documentation.t/run.t 2021-04-13 03:01:00.000000000 -0600
++++ b/tests/test-dirs/src-documentation.t/run.t 2021-04-13 16:45:25.532147561 -0600
+@@ -40,7 +40,7 @@ documentation for the non-last defined v
+
+ $ $MERLIN single document -position 9:22 -filename doc.ml < doc.ml |
+ > jq '.value'
+- " List reversal. "
++ "Needed cmti file of module 'Stdlib' to locate 'List.rev' but it
is not present"
+
+ $ dune build --root=. ./doc.exe
+ $ cat >.merlin <<EOF
diff --git a/ocaml-merlin-iedit.patch b/ocaml-merlin-iedit.patch
deleted file mode 100644
index 1ddf2c6..0000000
--- a/ocaml-merlin-iedit.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- 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-textrel.patch b/ocaml-merlin-textrel.patch
new file mode 100644
index 0000000..26df200
--- /dev/null
+++ b/ocaml-merlin-textrel.patch
@@ -0,0 +1,12 @@
+--- a/tests/test-dirs/src-documentation.t/run.t 2021-04-13 16:45:25.532147561 -0600
++++ b/tests/test-dirs/src-documentation.t/run.t 2021-04-13 16:55:03.807988447 -0600
+@@ -43,6 +43,9 @@ documentation for the non-last defined v
+ "Needed cmti file of module 'Stdlib' to locate 'List.rev' but it
is not present"
+
+ $ dune build --root=. ./doc.exe
++ ocamlopt doc.exe
++ /usr/bin/ld: .doc.eobjs/native/doc.o: warning: relocation in read-only section
`.text'
++ /usr/bin/ld: warning: creating DT_TEXTREL in a PIE
+ $ cat >.merlin <<EOF
+ > B _build/default/.doc.eobjs/byte
+ > S .
diff --git a/ocaml-merlin.spec b/ocaml-merlin.spec
index 3238286..2c09d81 100644
--- a/ocaml-merlin.spec
+++ b/ocaml-merlin.spec
@@ -3,10 +3,11 @@
%endif
%global srcname merlin
+%global ocamlver 411
Name: ocaml-%{srcname}
-Version: 4.1
-Release: 2%{?dist}
+Version: 4.2
+Release: 1%{?dist}
Summary: Context sensitive completion for OCaml
# The entire source is MIT except:
@@ -20,14 +21,18 @@ 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/refs/tags/v%{version}-411.tar.gz
+Source0:
https://github.com/ocaml/%{srcname}/releases/download/v%{version}-%{ocaml...
# 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
+# Fix various issues in the Emacs interface
+Patch1: %{name}-emacs.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?
+# It passes with OCaml 4.12, and on non-Fedora systems ... because the ocaml
+# .cmti files are missing?
Patch2: %{name}-fedora.patch
+# On i386, we get extra output about text relocations
+# See
https://github.com/ocaml/ocaml/issues/9800
+Patch3: %{name}-textrel.patch
BuildRequires: emacs
BuildRequires: emacs-auto-complete
@@ -95,7 +100,13 @@ Requires: vim-filesystem
This package contains the Vim interface to merlin.
%prep
-%autosetup -n %{srcname}-%{version}-411 -p1
+%autosetup -n %{srcname}-v%{version}-%{ocamlver} -N
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%ifarch %{ix86}
+%patch3 -p1
+%endif
%build
dune build %{_smp_mflags}
@@ -113,11 +124,6 @@ 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}/%{srcname}/vim/* %{buildroot}%{vimfiles_root}
@@ -155,6 +161,12 @@ dune runtest
%{vimfiles_root}/*/*
%changelog
+* Tue Apr 13 2021 Jerry James <loganjerry(a)gmail.com> - 4.2-1
+- Version 4.2
+- Drop upstreamed -iedit patch
+- Add -emacs patch to fix various Emacs issues
+- Add -textrel patch to fix FTBFS on i386
+
* 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
diff --git a/sources b/sources
index f83faba..a40ff12 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (v4.1-411.tar.gz) =
b3a7a3b9a2629dd1eac8d5de03f92b48ec36c25ce12f8aaadf470f744dec78bf04bf9b69fc70032c3d3cab077dc8b28b2e936e42734b5aa6dfa9b5b0fbaa364f
+SHA512 (merlin-v4.2-411.tbz) =
4d456415e90f5e4ca0a228864fc9441c7428385d3d96f8c346d169f77640528f8444382c00fbc1c53a8beb0c97411261a9574048c885af60c51a934f1b2ba405