#2 New upstream version 1.2.14
Merged 2 years ago by jjames. Opened 2 years ago by jjames.
rpms/ jjames/ocaml-mlgmpidl rawhide  into  rawhide

file added
+8
@@ -0,0 +1,8 @@ 

+ # ocaml-mlgmpidl

+ 

+ [MLGMPIDL](https://github.com/nberth/mlgmpidl) is an OCaml interface to the

+ GMP and MPFR rational and real number math libraries.  Although there is

+ another such interface, this one is different in that it provides a more

+ imperative (rather than functional) interface to conserve memory and that this

+ one uses CAMLIDL to take care of the C/OCaml interface in a convenient and

+ modular way.

@@ -1,11 +0,0 @@ 

- --- a/mpfr.idl	2019-06-05 08:14:51.000000000 -0600

- +++ b/mpfr.idl	2019-07-17 15:24:31.943682738 -0600

- @@ -222,7 +222,7 @@ int mpfr_pow (mpfr_ptrm ROP, mpfr_ptr OP

-  int mpfr_neg (mpfr_ptrm ROP, mpfr_ptr OP, mpfr_rnd_t RND);

-  int mpfr_abs (mpfr_ptrm ROP, mpfr_ptr OP, mpfr_rnd_t RND);

-  int mpfr_cbrt (mpfr_ptrm ROP, mpfr_ptr OP, mpfr_rnd_t RND);

- -int mpfr_root (mpfr_ptrm ROP, mpfr_ptr OP1, unsigned long int OP2, mpfr_rnd_t RND);

- +int mpfr_rootn_ui (mpfr_ptrm ROP, mpfr_ptr OP1, unsigned long int OP2, mpfr_rnd_t RND);

-  

-  quote(MLMLI,"\n(** {2 Comparison Functions} *)")

-  quote(MLMLI,"(** {{:http://www.mpfr.org/mpfr-current/mpfr.html#Comparison-Functions}C documentation} *)\n")

file modified
+31 -52
@@ -1,8 +1,10 @@ 

  %global srcname mlgmpidl

+ %global ocaml_lib_dir %{_libdir}/ocaml

+ %global my_ocaml_lib_dir %{ocaml_lib_dir}/gmp

  

  Name:           ocaml-%{srcname}

- Version:        1.2.12

- Release:        14%{?dist}

+ Version:        1.2.14

+ Release:        1%{?dist}

  Summary:        OCaml interface to GMP and MPFR libraries

  # The license includes a linking exception

  License:        LGPLv2 with exceptions
@@ -12,17 +14,14 @@ 

  Source1:        mlgmpidl_test.ml

  Source2:        mlgmpidl_test_result

  

- # Adapt to mpfr 4

- Patch0:         %{name}-mpfr4.patch

- 

  # We cannot use LDFLAGS to pass RPM_LD_FLAGS into the Makefile, because it

  # passes them unmodified to both ocamlopt and ocamlmklib.  The latter needs

  # to have them guarded with -ldopt.  Therefore, we splice the flags into the

  # Makefile at strategic locations.

- Patch1:         %{name}-ldflags.patch

+ Patch0:         %{name}-ldflags.patch

  

- BuildRequires: make

  BuildRequires:  gcc

+ BuildRequires:  make

  BuildRequires:  ocaml

  BuildRequires:  ocaml-ocamldoc

  BuildRequires:  ocaml-findlib
@@ -74,60 +73,35 @@ 

  # Insert our linker flags; see patch1 above

  sed -i "s|@LDFLAGS@|$RPM_LD_FLAGS|" Makefile

  

+ # Build with debug information

+ sed -i 's/^OCAMLOPTFLAGS = -annot/& -g/' Makefile.config.in

  

- %build

- mv Makefile.config.model Makefile.config

+ # Do not force -O3

+ sed -i 's/ -O3//' configure

  

- # Look for ocaml tools in the right place and build with debug information

- sed -e 's,\$(CAML_PREFIX)/bin,%{_bindir},' \

-     -e 's/^OCAMLOPTFLAGS = -annot/& -g/' \

-     -i Makefile.config

  

- %ifarch %{ocaml_native_compiler}

- # Build a cmxs

- sed -i '/HAS_SHARED=1/a\\nHAS_NATIVE_PLUGINS=1' Makefile.config

+ %build

+ %set_build_flags

+ # This is not an autoconf-generated script.  Do NOT use %%configure.

+ ./configure \

+ %ifnarch %{ocaml_native_compiler}

+   -no-native-plugins \

  %endif

- 

- %ifarch %{ocaml_native_profiling}

- echo 'ENABLE_PROF = 1' >> Makefile.config

- %else

- echo 'ENABLE_PROF = 0' >> Makefile.config

+ %ifnarch %{ocaml_native_profiling}

+   -disable-profiling \

  %endif

- 

- %global ocaml_lib_dir %{_libdir}/ocaml

- %global my_ocaml_lib_dir %{ocaml_lib_dir}/gmp

+   -gmp-prefix %{_prefix} \

+   -mpfr-prefix %{_prefix} \

+   -prefix %{ocaml_lib_dir}

  

  # Upstream Makefile is NOT safe to be called in parallel.

- unset MAKEFLAGS

- 

- %global make1 \\\

- make MLGMPIDL_PREFIX=%{_prefix} GMP_PREFIX=%{_prefix} \\\

-      MFPR_PREFIX=%{_prefix} CAML_PREFIX=%{ocaml_lib_dir} \\\

-      CAMLIDL_PREFIX=%{ocaml_lib_dir}

  %ifarch %{ocaml_native_compiler}

- %global make \\\

- %make1 \\\

-      OCAMLC=ocamlc.opt OCAMLOPT=ocamlopt.opt \\\

-      OCAMLLEX=ocamllex.opt OCAMLDOC=ocamldoc.opt \\\

-      CFLAGS="%{optflags} -fPIC -DNDEBUG" \\\

-      CFLAGS_DEBUG="%{optflags} -fPIC -UNDEBUG" \\\

-      CFLAGS_PROF="%{optflags} -fPIC -DNDEBUG -pg"

+ make all

  %else

- %global make \\\

- %make1 \\\

-      OCAMLC=ocamlc HAS_OCAMLOPT= \\\

-      OCAMLLEX=ocamllex OCAMLDOC=ocamldoc \\\

-      CFLAGS="%{optflags} -DNDEBUG" \\\

-      CFLAGS_DEBUG="%{optflags} -UNDEBUG" \\\

-      CFLAGS_PROF="%{optflags} -DNDEBUG -pg"

+ make byte

  %endif

- %ifarch %{ocaml_native_compiler}

- %make all

- %else

- %make byte

- %endif

- %make mlgmpidl.pdf

- %make html

+ make mlgmpidl.pdf

+ make html

  

  

  %check
@@ -144,7 +118,7 @@ 

  # so that it works.

  export MLGMPIDL_PREFIX=$RPM_BUILD_ROOT%{_prefix}

  export DESTDIR=$RPM_BUILD_ROOT

- export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml

+ export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{ocaml_lib_dir}

  mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs

  

  %ifarch %{ocaml_native_compiler}
@@ -189,6 +163,11 @@ 

  

  

  %changelog

+ * Mon Dec 26 2021 Jerry James <loganjerry@gmail.com> - 1.2.14-1

+ - New upstream version 1.2.14

+ - Drop upstreamed mpfr4 patch

+ - Invoke the configure script and simplify the spec file accordingly

+ 

  * Mon Oct 04 2021 Richard W.M. Jones <rjones@redhat.com> - 1.2.12-14

  - OCaml 4.13.1 build

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (mlgmpidl-1.2.12.tar.gz) = 5c3b959afb56c6ddafab33096ed1168fe6bc264a5b6fd58bedac1ef1cb275c7cf461861912f85ea2fd48cafaa1670931848f1231822ade5b77ed2a63e20267f0

+ SHA512 (mlgmpidl-1.2.14.tar.gz) = cd1d937583914d999ecaf10279350918684d9b0a39c347b5641d9e0f9b3189cdf1fcaf1d9d8a74e4c09a3e88814aa3f95e325544d7c6fdb541c53ab90167d273

Also:
- Drop upstreamed mpfr4 patch
- Invoke the configure script and simplify the spec file accordingly

As noted on the OCaml mailing list recently, I would like to update some OCaml packages, including this one. If this pull request looks good to you, go ahead and merge it, but please do not start a build at this time. I will build all of the listed packages in a side tag to avoid Rawhide breakage. The affected packages can all be seen in a COPR repository.

Let me know if you want any changes to this pull request.

I am merging this. Let me know if you want any changes after the fact.

Pull-Request has been merged by jjames

2 years ago