diff --git a/_service b/_service index 16f73cb..6ecdabe 100644 --- a/_service +++ b/_service @@ -2,8 +2,8 @@ git://github.com/mjambon/cppo.git git - 1.5.0 - v1.5.0 + 1.6.1 + v1.6.1 ocaml-cppo diff --git a/ocaml-cppo-1.5.0.tar.xz b/ocaml-cppo-1.5.0.tar.xz deleted file mode 100644 index db233bd..0000000 --- a/ocaml-cppo-1.5.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0c51496820d56db2ccc815da3884592d4c5f9e7d4cbe4e307a8279583780b1da -size 23476 diff --git a/ocaml-cppo-1.6.1-install-args.patch b/ocaml-cppo-1.6.1-install-args.patch new file mode 100644 index 0000000..848b8cf --- /dev/null +++ b/ocaml-cppo-1.6.1-install-args.patch @@ -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 diff --git a/ocaml-cppo-1.6.1.tar.xz b/ocaml-cppo-1.6.1.tar.xz new file mode 100644 index 0000000..e255c60 --- /dev/null +++ b/ocaml-cppo-1.6.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7bebe817de6c19d00a25758f25dfd37607a2b477887ed5599a0c2f5cd5eb6355 +size 24668 diff --git a/ocaml-cppo.changes b/ocaml-cppo.changes index ef55068..1ecb97c 100644 --- a/ocaml-cppo.changes +++ b/ocaml-cppo.changes @@ -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 diff --git a/ocaml-cppo.spec b/ocaml-cppo.spec index fe4ba9d..7c4d7b3 100644 --- a/ocaml-cppo.spec +++ b/ocaml-cppo.spec @@ -1,7 +1,8 @@ # # 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. # # 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 -Version: 1.5.0 +Version: 1.6.1 Release: 0 %{?ocaml_preserve_bytecode} Summary: The C preprocessor written in OCaml @@ -26,15 +31,19 @@ License: BSD-3-Clause Group: Development/Languages/OCaml Url: https://github.com/mjambon/cppo 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-oasis +BuildRequires: ocaml-dune BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-rpm-macros >= 4.03 BuildRequires: ocamlfind(easy-format) BuildRequires: ocamlfind(ocamlbuild) BuildRequires: ocamlfind(str) BuildRequires: ocamlfind(unix) -BuildRoot: %{_tmppath}/%{name}-%{version}-build +%if %{with opam} +BuildRequires: opam +%endif %description Cppo is an equivalent of the C preprocessor targeted at the OCaml language and @@ -60,62 +69,30 @@ developing applications that use %{name}. %prep %setup -q +%patch -p1 %build -echo 'let cppo_version = "%{version}"' > cppo_version.ml -# 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 +make %{?_smp_mflags} %install -%ocaml_oasis_findlib_install - -%check -%ocaml_oasis_test +%if %{with opam} + install -d %{buildroot}%{_libdir}/ocaml + %make_install INSTALL_ARGS="--prefix=%{buildroot}%{_prefix} --libdir=%{buildroot}%{_libdir}/ocaml" + 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 %defattr(-,root,root) -%doc LICENSE README.md -%{_bindir}/* +%{_bindir}/cppo +%doc LICENSE.md README.md %dir %{_libdir}/ocaml %dir %{_libdir}/ocaml/* %if 0%{?ocaml_native_compiler} @@ -124,7 +101,6 @@ _EOF_ %files devel %defattr(-,root,root,-) -%{oasis_docdir_html} %dir %{_libdir}/ocaml %dir %{_libdir}/ocaml/* %if 0%{?ocaml_native_compiler} @@ -132,12 +108,12 @@ _EOF_ %{_libdir}/ocaml/*/*.cmx %{_libdir}/ocaml/*/*.cmxa %endif -%{_libdir}/ocaml/*/*.annot %{_libdir}/ocaml/*/*.cma %{_libdir}/ocaml/*/*.cmi %{_libdir}/ocaml/*/*.cmt %{_libdir}/ocaml/*/*.cmti %{_libdir}/ocaml/*/*.mli %{_libdir}/ocaml/*/META +%{_libdir}/ocaml/*/opam %changelog