SHA256
1
0
forked from pool/ocaml-cppo

Accepting request 571573 from home:1Antoine1:branches:devel:languages:ocaml

- Update to 1.6.1:
  * Emit line directives always containing the file name, as
    mandated starting with ocaml 4.07.
- Update to 1.6.0:
  * BREAKING: cppo and cppo_ocamlbuild are now two distinct opam
    packages.
- Build with dune instead of oasis.

Needed by opam-2.0~rc

OBS-URL: https://build.opensuse.org/request/show/571573
OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-cppo?expand=0&rev=39
This commit is contained in:
Olaf Hering 2018-02-01 05:53:44 +00:00 committed by Git OBS Bridge
parent 9da45b40c4
commit d9f1b86b32
6 changed files with 59 additions and 60 deletions

View File

@ -2,8 +2,8 @@
<service name="tar_scm" mode="disabled"> <service name="tar_scm" mode="disabled">
<param name="url">git://github.com/mjambon/cppo.git</param> <param name="url">git://github.com/mjambon/cppo.git</param>
<param name="scm">git</param> <param name="scm">git</param>
<param name="versionformat">1.5.0</param> <param name="versionformat">1.6.1</param>
<param name="revision">v1.5.0</param> <param name="revision">v1.6.1</param>
<param name="filename">ocaml-cppo</param> <param name="filename">ocaml-cppo</param>
</service> </service>
<service name="recompress" mode="disabled"> <service name="recompress" mode="disabled">

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0c51496820d56db2ccc815da3884592d4c5f9e7d4cbe4e307a8279583780b1da
size 23476

View File

@ -0,0 +1,12 @@
diff -up ocaml-cppo-1.6.1/Makefile.orig ocaml-cppo-1.6.1/Makefile
--- ocaml-cppo-1.6.1/Makefile.orig 2018-01-31 23:28:37.944255913 +0100
+++ ocaml-cppo-1.6.1/Makefile 2018-01-31 23:28:49.284256383 +0100
@@ -5,7 +5,7 @@ test:
@jbuilder runtest
install:
- @jbuilder install
+ @jbuilder install $(INSTALL_ARGS)
uninstall:
@jbuilder uninstall

3
ocaml-cppo-1.6.1.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7bebe817de6c19d00a25758f25dfd37607a2b477887ed5599a0c2f5cd5eb6355
size 24668

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Wed Jan 31 21:45:59 UTC 2018 - antoine.belvire@opensuse.org
- Update to 1.6.1:
* Emit line directives always containing the file name, as
mandated starting with ocaml 4.07.
- Update to 1.6.0:
* BREAKING: cppo and cppo_ocamlbuild are now two distinct opam
packages.
- Build with dune instead of oasis.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jul 25 13:04:54 UTC 2017 - ohering@suse.de Tue Jul 25 13:04:54 UTC 2017 - ohering@suse.de

View File

@ -1,7 +1,8 @@
# #
# spec file for package ocaml-cppo # spec file for package ocaml-cppo
# #
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 The openSUSE Project.
# Copyright (c) 2015 LISA GmbH, Bingen, Germany. # Copyright (c) 2015 LISA GmbH, Bingen, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
@ -17,8 +18,12 @@
# #
# cppo may use opam-installer but opam requires cppo for its build.
# So here we don't use opam-installer by default.
# Build with "--with-opam" to use opam despite the circular dependency.
%bcond_with opam
Name: ocaml-cppo Name: ocaml-cppo
Version: 1.5.0 Version: 1.6.1
Release: 0 Release: 0
%{?ocaml_preserve_bytecode} %{?ocaml_preserve_bytecode}
Summary: The C preprocessor written in OCaml Summary: The C preprocessor written in OCaml
@ -26,15 +31,19 @@ License: BSD-3-Clause
Group: Development/Languages/OCaml Group: Development/Languages/OCaml
Url: https://github.com/mjambon/cppo Url: https://github.com/mjambon/cppo
Source: %{name}-%{version}.tar.xz Source: %{name}-%{version}.tar.xz
# PATCH-FIX-UPSTEAM ocaml-cppo-1.6.1-install-args.patch -- Allows to pass buildroot to opam-installer
Patch: ocaml-cppo-1.6.1-install-args.patch
BuildRequires: ocaml BuildRequires: ocaml
BuildRequires: ocaml-oasis BuildRequires: ocaml-dune
BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-ocamldoc
BuildRequires: ocaml-rpm-macros >= 4.03 BuildRequires: ocaml-rpm-macros >= 4.03
BuildRequires: ocamlfind(easy-format) BuildRequires: ocamlfind(easy-format)
BuildRequires: ocamlfind(ocamlbuild) BuildRequires: ocamlfind(ocamlbuild)
BuildRequires: ocamlfind(str) BuildRequires: ocamlfind(str)
BuildRequires: ocamlfind(unix) BuildRequires: ocamlfind(unix)
BuildRoot: %{_tmppath}/%{name}-%{version}-build %if %{with opam}
BuildRequires: opam
%endif
%description %description
Cppo is an equivalent of the C preprocessor targeted at the OCaml language and Cppo is an equivalent of the C preprocessor targeted at the OCaml language and
@ -60,62 +69,30 @@ developing applications that use %{name}.
%prep %prep
%setup -q %setup -q
%patch -p1
%build %build
echo 'let cppo_version = "%{version}"' > cppo_version.ml make %{?_smp_mflags}
# obs service changes every ^Version line ...
sh -c "sed 's/^Version.*/Version: %{version}/' | tee _oasis" <<_EOF_
OASISFormat: 0.4
Name: cppo
Version: 0
Synopsis: The C preprocessor written in OCaml
Authors: Martin Jambon
LicenseFile: LICENSE
License: %{license}
Plugins: META(`oasis version`)
BuildTools: ocamlbuild
Library ocamlbuild_cppo
Path: ocamlbuild_plugin
Modules: Ocamlbuild_cppo
Install: true
BuildDepends: ocamlbuild
Document ocamlbuild_cppo
Title: API reference for ocamlbuild_cppo
Type: ocamlbuild
BuildTools+: ocamldoc
InstallDir: \$htmldir
Install: true
XOCamlbuildPath: .
XOCamlbuildLibraries: ocamlbuild_cppo
Executable cppo
Path: .
MainIs: cppo_main.ml
CompiledObject: best
BuildDepends: unix, str
Test cppo
Type: Custom (0.0.1)
Command: ln -sfvbn \$cppo cppo ; make -C test all
Run: true
_EOF_
%oasis_setup
%ocaml_oasis_configure --enable-docs --enable-tests
%ocaml_oasis_build
%ocaml_oasis_doc
%install %install
%ocaml_oasis_findlib_install %if %{with opam}
install -d %{buildroot}%{_libdir}/ocaml
%check %make_install INSTALL_ARGS="--prefix=%{buildroot}%{_prefix} --libdir=%{buildroot}%{_libdir}/ocaml"
%ocaml_oasis_test rm -r %{buildroot}%{_prefix}/doc
%else
# By hand, not funny
cd _build/install/default
install -d %{buildroot}%{_libdir}/ocaml/cppo{,_ocamlbuild}
install -m0644 lib/cppo/* %{buildroot}%{_libdir}/ocaml/cppo/
install -m0644 lib/cppo_ocamlbuild/* %{buildroot}%{_libdir}/ocaml/cppo_ocamlbuild/
install -d %{buildroot}%{_bindir}
install -m0755 bin/cppo %{buildroot}%{_bindir}
%endif
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%doc LICENSE README.md %{_bindir}/cppo
%{_bindir}/* %doc LICENSE.md README.md
%dir %{_libdir}/ocaml %dir %{_libdir}/ocaml
%dir %{_libdir}/ocaml/* %dir %{_libdir}/ocaml/*
%if 0%{?ocaml_native_compiler} %if 0%{?ocaml_native_compiler}
@ -124,7 +101,6 @@ _EOF_
%files devel %files devel
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{oasis_docdir_html}
%dir %{_libdir}/ocaml %dir %{_libdir}/ocaml
%dir %{_libdir}/ocaml/* %dir %{_libdir}/ocaml/*
%if 0%{?ocaml_native_compiler} %if 0%{?ocaml_native_compiler}
@ -132,12 +108,12 @@ _EOF_
%{_libdir}/ocaml/*/*.cmx %{_libdir}/ocaml/*/*.cmx
%{_libdir}/ocaml/*/*.cmxa %{_libdir}/ocaml/*/*.cmxa
%endif %endif
%{_libdir}/ocaml/*/*.annot
%{_libdir}/ocaml/*/*.cma %{_libdir}/ocaml/*/*.cma
%{_libdir}/ocaml/*/*.cmi %{_libdir}/ocaml/*/*.cmi
%{_libdir}/ocaml/*/*.cmt %{_libdir}/ocaml/*/*.cmt
%{_libdir}/ocaml/*/*.cmti %{_libdir}/ocaml/*/*.cmti
%{_libdir}/ocaml/*/*.mli %{_libdir}/ocaml/*/*.mli
%{_libdir}/ocaml/*/META %{_libdir}/ocaml/*/META
%{_libdir}/ocaml/*/opam
%changelog %changelog