Compare commits

...

21 Commits
f29 ... rawhide

Author SHA1 Message Date
Richard W.M. Jones 93913770dd Bump and rebuild for updated ocaml-findlib. 2021-03-15 15:45:45 +00:00
Richard W.M. Jones f54c212b3c Make ocaml-odoc dependency conditional. 2021-03-01 17:30:39 +00:00
Richard W.M. Jones ef6a09ed5a OCaml 4.12.0 build 2021-03-01 16:57:59 +00:00
Jerry James 3585e93217 Spec file cleanup.
- Add -emacs patch to adapt to Emacs 27.1.
- Build documentation with odoc.
- Fix non-Unicode man page.
- Generate autoloads for the Emacs interface.
- Byte compile the Emacs interface.
2021-02-23 12:07:54 -07:00
Jerry James 3fe10ae709 Rebuild for changed dynlink dependency. 2021-02-21 10:25:00 -07:00
Fedora Release Engineering 56397441a1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 22:02:22 +00:00
Richard W.M. Jones ae4ff4d737 OCaml 4.11.1 rebuild 2020-09-01 20:48:53 +01:00
Richard W.M. Jones 6791246c05 OCaml 4.11.0 rebuild 2020-08-21 12:45:50 +01:00
Robin Lee f3180e11af Update to 1.8.2 2020-08-10 09:13:25 +08:00
Fedora Release Engineering 645e76a9d8 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-08-01 06:40:11 +00:00
Fedora Release Engineering e46db14178 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 12:14:28 +00:00
Richard W.M. Jones aea2b1545b OCaml 4.11.0+dev2-2020-04-22 rebuild 2020-05-05 10:58:52 +01:00
Richard W.M. Jones 9242f8cb63 OCaml 4.11.0 pre-release attempt 2 2020-04-21 19:33:41 +01:00
Richard W.M. Jones 7f4b528488 Update all OCaml dependencies for RPM 4.16. 2020-04-03 13:38:18 +01:00
Richard W.M. Jones 029de0154f OCaml 4.10.0 final. 2020-02-26 16:40:18 +00:00
Fedora Release Engineering b200ca3737 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-29 19:40:56 +00:00
Richard W.M. Jones 9cc2e4ba36 - Use dune install --destdir option. 2020-01-19 21:06:20 +00:00
Richard W.M. Jones 7f759c0f36 OCaml 4.10.0+beta1 rebuild. 2020-01-19 20:04:16 +00:00
Richard W.M. Jones dbf51e959d OCaml 4.09.0 (final) rebuild. 2019-12-06 15:51:45 +00:00
Richard W.M. Jones aa0d8779d3 Bump release and rebuild. 2019-09-18 09:45:34 +01:00
Fedora Release Engineering fc6c0313c0 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-25 22:57:20 +00:00
4 changed files with 192 additions and 57 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/ocp-indent-1.7.0.tar.gz
/ocp-indent-1.8.2.tar.gz

View File

@ -0,0 +1,31 @@
--- a/tools/ocp-indent.el 2019-10-23 07:04:10.000000000 -0600
+++ b/tools/ocp-indent.el 2021-02-23 09:00:39.282453922 -0700
@@ -28,7 +28,7 @@
;;; Code:
-(require 'cl)
+(require 'cl-lib)
(defgroup ocp-indent nil
"ocp-indent OCaml indenter binding configuration"
@@ -76,8 +76,8 @@ are blanks."
(list "--numeric"
"--lines" (format "%d-%d" start-line end-line))
(if ocp-indent-config (list "--config" ocp-indent-config) nil)
- (reduce (lambda (acc syn) (list* "--syntax" syn acc))
- ocp-indent-syntax :initial-value nil)))
+ (cl-reduce #'(lambda (acc syn) (cl-list* "--syntax" syn acc))
+ ocp-indent-syntax :initial-value nil)))
(defun ocp-indent-file-to-string (file)
(replace-regexp-in-string
@@ -126,7 +126,7 @@ buffer."
(delete-file errfile))
(save-excursion
(goto-char start)
- (mapcar
+ (mapc
#'(lambda (indent) (indent-line-to indent) (forward-line))
indents))
(when (ocp-in-indentation-p) (back-to-indentation))))

View File

@ -1,44 +1,52 @@
Name: ocaml-ocp-indent
Version: 1.7.0
Release: 2%{?dist}
Summary: A simple tool to indent OCaml programs
%ifnarch %{ocaml_native_compiler}
%global debug_package %{nil}
%endif
%global libname %(echo %{name} | sed -e 's/^ocaml-//')
# Documentation adds a circular dependency, so by
# default we build without.
%bcond_with doc
%global srcname ocp-indent
Name: ocaml-%{srcname}
Version: 1.8.2
Release: 7%{?dist}
Summary: A simple tool to indent OCaml programs
# The entire source code is LGPLv2 with exceptions except
# src/approx_tokens.ml is QPL
License: (LGPLv2 with exceptions) and QPL
URL: https://github.com/OCamlPro/%{libname}
Source0: https://github.com/OCamlPro/%{libname}/archive/%{version}/%{libname}-%{version}.tar.gz
URL: https://www.typerex.org/ocp-indent.html
Source0: https://github.com/OCamlPro/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz
# Update the Emacs interface for Emacs 27.1
Patch0: %{name}-emacs.patch
BuildRequires: ocaml
BuildRequires: ocaml-dune
BuildRequires: ocaml-findlib-devel
BuildRequires: ocaml-cmdliner-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: emacs-tuareg
BuildRequires: ocaml
BuildRequires: ocaml-cmdliner-devel >= 1.0.0
BuildRequires: ocaml-dune >= 1.0
BuildRequires: ocaml-findlib-devel
%if %{with doc}
BuildRequires: ocaml-odoc
%endif
BuildRequires: vim-enhanced
Requires: emacs-filesystem >= %{_emacs_version}
Requires: vim-filesystem
%description
Ocp-indent is based on an approximate, tolerant OCaml parser and a simple stack
machine ; this is much faster and more reliable than using regexps. Presets and
configuration options available, with the possibility to set them project-wide.
Supports most common syntax extensions, and extensible for others.
Ocp-indent is a simple tool and library to indent OCaml code. It is
based on an approximate, tolerant OCaml parser and a simple stack
machine; this is much faster and more reliable than using regexps.
Presets and configuration options are available, with the possibility to
set them project-wide. Ocp-indent supports most common syntax
extensions, and is extensible for others.
Includes:
- An indentor program, callable from the command-line or from within editors
- An indentor program, callable from the command-line or from within
editors
- Bindings for popular editors
- A library that can be directly used by editor writers, or just for
fault-tolerant/approximate parsing.
@ -51,61 +59,156 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
The %{name}-devel package contains libraries and signature files for
developing applications that use %{name}.
%prep
%setup -q -n %{libname}-%{version}
%autosetup -n %{srcname}-%{version} -p1
%build
dune build %{?_smp_mflags} --profile=release
%if %{with doc}
dune build %{?_smp_mflags} @doc
%endif
%install
dune install --prefix=%{buildroot}%{_prefix} --libdir=%{buildroot}%{_libdir}/ocaml
dune install --destdir=%{buildroot}
chmod 755 %{buildroot}%{_libdir}/ocaml/%{libname}/*/*.cmxs
%if %{with doc}
# We do not want the dune markers
find _build/default/_doc/_html -name .dune-keep -delete
%endif
# 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
# The man page has A0 bytes for non-breaking spaces, but this is invalid UTF-8
sed -i 's/\xa0/\\ /g' %{buildroot}%{_mandir}/man1/ocp-indent.1
# 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
mkdir -p %{buildroot}%{_datadir}
mv %{buildroot}%{_prefix}/man %{buildroot}%{_datadir}
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/ocp-indent-autoloads.el\" backup-inhibited t) (update-directory-autoloads \".\"))"
mkdir -p %{buildroot}%{_emacs_sitestartdir}
mv ocp-indent-autoloads.el %{buildroot}%{_emacs_sitestartdir}
%_emacs_bytecompile ocp-indent.el
cd -
%check
#Tests only run on a git checkout
# ./tests/test.sh
%files
%doc README.md CHANGELOG
%license LICENSE
%{_bindir}/*
%{_libdir}/ocaml/%{libname}
%{_bindir}/ocp-indent
%dir %{_libdir}/ocaml/%{srcname}/
%dir %{_libdir}/ocaml/%{srcname}/dynlink/
%dir %{_libdir}/ocaml/%{srcname}/lexer/
%dir %{_libdir}/ocaml/%{srcname}/lib/
%dir %{_libdir}/ocaml/%{srcname}/utils/
%{_libdir}/ocaml/%{srcname}/META
%{_libdir}/ocaml/%{srcname}/*/*.cma
%{_libdir}/ocaml/%{srcname}/*/*.cmi
%ifarch %{ocaml_native_compiler}
%exclude %{_libdir}/ocaml/%{libname}/*/*.a
%exclude %{_libdir}/ocaml/%{libname}/*/*.cmxa
%exclude %{_libdir}/ocaml/%{libname}/*/*.cmx
%{_libdir}/ocaml/%{srcname}/*/*.cmxs
%endif
%exclude %{_libdir}/ocaml/%{libname}/*/*.mli
%exclude %{_libdir}/ocaml/%{libname}/*/*.ml
%{_emacs_sitelispdir}/*
%{vimfiles_root}/*/*
%{_mandir}/man1/%{libname}*
%{_emacs_sitelispdir}/ocp-indent.el{,c}
%{_emacs_sitestartdir}/ocp-indent-autoloads.el
%{vimfiles_root}/indent/ocaml.vim
%{_mandir}/man1/%{srcname}.1*
%files devel
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/%{libname}/*/*.a
%{_libdir}/ocaml/%{libname}/*/*.cmxa
%{_libdir}/ocaml/%{libname}/*/*.cmx
%if %{with doc}
%doc _build/default/_doc/*
%endif
%{_libdir}/ocaml/%{libname}/*/*.mli
%{_libdir}/ocaml/%{libname}/*/*.ml
%{_libdir}/ocaml/%{srcname}/dune-package
%{_libdir}/ocaml/%{srcname}/opam
%ifarch %{ocaml_native_compiler}
%{_libdir}/ocaml/%{srcname}/*/*.a
%{_libdir}/ocaml/%{srcname}/*/*.cmx
%{_libdir}/ocaml/%{srcname}/*/*.cmxa
%endif
%{_libdir}/ocaml/%{srcname}/*/*.cmt
%{_libdir}/ocaml/%{srcname}/*/*.cmti
%{_libdir}/ocaml/%{srcname}/*/*.mli
%changelog
* Mon Mar 15 2021 Richard W.M. Jones <rjones@redhat.com> - 1.8.2-7
- Bump and rebuild for updated ocaml-findlib.
* Mon Mar 1 16:57:58 GMT 2021 Richard W.M. Jones <rjones@redhat.com> - 1.8.2-6
- OCaml 4.12.0 build
- Make ocaml-odoc dependency conditional.
* Tue Feb 23 2021 Jerry James <loganjerry@gmail.com> - 1.8.2-5
- Spec file cleanup
- Add -emacs patch to adapt to Emacs 27.1
- Build documentation with odoc
- Fix non-Unicode man page
- Generate autoloads for the Emacs interface
- Byte compile the Emacs interface
* Sat Feb 20 2021 Jerry James <loganjerry@gmail.com> - 1.8.2-5
- Rebuild for changed dynlink dependency
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Sep 01 2020 Richard W.M. Jones <rjones@redhat.com> - 1.8.2-3
- OCaml 4.11.1 rebuild
* Fri Aug 21 2020 Richard W.M. Jones <rjones@redhat.com> - 1.8.2-2
- OCaml 4.11.0 rebuild
* Sun Aug 9 2020 Robin Lee <cheeselee@fedoraproject.org> - 1.8.2-1
- Update to 1.8.2
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-13
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue May 05 2020 Richard W.M. Jones <rjones@redhat.com> - 1.7.0-11
- OCaml 4.11.0+dev2-2020-04-22 rebuild
* Tue Apr 21 2020 Richard W.M. Jones <rjones@redhat.com> - 1.7.0-10
- OCaml 4.11.0 pre-release attempt 2
* Fri Apr 03 2020 Richard W.M. Jones <rjones@redhat.com> - 1.7.0-9
- Update all OCaml dependencies for RPM 4.16.
* Wed Feb 26 2020 Richard W.M. Jones <rjones@redhat.com> - 1.7.0-8
- OCaml 4.10.0 final.
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sun Jan 19 2020 Richard W.M. Jones <rjones@redhat.com> - 1.7.0-6
- OCaml 4.10.0+beta1 rebuild.
- Use dune install --destdir option.
* Fri Dec 06 2019 Richard W.M. Jones <rjones@redhat.com> - 1.7.0-5
- OCaml 4.09.0 (final) rebuild.
* Wed Sep 18 2019 Richard W.M. Jones <rjones@redhat.com> - 1.7.0-4
- Bump release and rebuild.
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat Apr 6 2019 Robin Lee <cheeselee@fedoraproject.org> - 1.7.0-2
- Make cmxs files executable to properly generate debuginfo

View File

@ -1 +1 @@
SHA512 (ocp-indent-1.7.0.tar.gz) = 5b28ae8695612c95cb0f5748de9b9f01d8ef4ad18b31340dc526ccae5fb1b6ee7e12024ff1beb817a43796183a83bca144222ca2d77d7750f2ff56108b5fa350
SHA512 (ocp-indent-1.8.2.tar.gz) = c5f8b63d6d3baabbadffba159d485f54f6e903eaa59a58b6df509e12e679b5b63a1cf7734d336d6b3456ea6ac74e42c58889199f2a3ed584566589d0c9bbfef5