diff --git a/.gitignore b/.gitignore index 7dc8d58..12892ff 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /apron-*.tar.xz +/apron-*.tar.gz diff --git a/apron-mpfr4.patch b/apron-mpfr4.patch index bb69434..e04eb18 100644 --- a/apron-mpfr4.patch +++ b/apron-mpfr4.patch @@ -1,5 +1,5 @@ ---- japron/gmp/gmp_Mpfr.c.orig 2013-07-05 16:16:16.000000000 -0600 -+++ japron/gmp/gmp_Mpfr.c 2019-07-17 16:02:33.642733801 -0600 +--- japron/gmp/gmp_Mpfr.c.orig 2019-11-10 07:33:31.000000000 -0700 ++++ japron/gmp/gmp_Mpfr.c 2020-01-17 09:08:16.852531901 -0700 @@ -824,10 +824,23 @@ JNIEXPORT jint JNICALL Java_gmp_Mpfr_cbr JNIEXPORT jint JNICALL Java_gmp_Mpfr_root (JNIEnv *env, jobject o1, jobject o2, jint i, jint p) @@ -24,73 +24,3 @@ } /* ---- num/numflt_mpfr.h.orig 2015-12-11 02:59:58.000000000 -0700 -+++ num/numflt_mpfr.h 2019-07-17 16:04:45.307464218 -0600 -@@ -123,8 +123,18 @@ static inline void numflt_root(numflt_t - { - assert(n > 0); - assert((n & 1) || (mpfr_sgn(b) >= 0)); -+#if MPFR_VERSION_MAJOR >= 4 -+ if (mpfr_zero_p(b)) { -+ mpfr_set_zero(up, mpfr_sgn(b)); -+ mpfr_set_zero(down, mpfr_sgn(b)); -+ } else { -+ mpfr_rootn_ui(up, b, n, GMP_RNDU); -+ mpfr_rootn_ui(down, b, n, GMP_RNDD); -+ } -+#else - mpfr_root(up, b, n, GMP_RNDU); - mpfr_root(down, b, n, GMP_RNDD); -+#endif - } - static inline void numflt_mul_2exp(numflt_t a, numflt_t b, int c) - { mpfr_mul_2si(a,b,c,GMP_RNDU); } ---- num/numflt_native.h.orig 2015-05-18 08:17:02.000000000 -0600 -+++ num/numflt_native.h 2019-07-17 16:04:02.792197087 -0600 -@@ -188,18 +188,46 @@ static inline void numflt_root(numflt_t - #if defined(NUMFLT_DOUBLE) - mpfr_init_set_d(arg, *b, GMP_RNDU); - mpfr_init(res); -+#if MPFR_VERSION_MAJOR >= 4 -+ if (mpfr_zero_p(arg)) -+ mpfr_set_zero(res, mpfr_sgn(arg)); -+ else -+ mpfr_rootn_ui(res, arg, n, GMP_RNDU); -+#else - mpfr_root(res, arg, n, GMP_RNDU); -+#endif - *up = mpfr_get_d(res, GMP_RNDU); - mpfr_set_d(arg, *b, GMP_RNDD); -+#if MPFR_VERSION_MAJOR >= 4 -+ if (mpfr_zero_p(arg)) -+ mpfr_set_zero(res, mpfr_sgn(arg)); -+ else -+ mpfr_rootn_ui(res, arg, n, GMP_RNDD); -+#else - mpfr_root(res, arg, n, GMP_RNDD); -+#endif - *down = mpfr_get_d(res, GMP_RNDD); - #else - mpfr_init_set_ld(arg, *b, GMP_RNDU); - mpfr_init(res); -+#if MPFR_VERSION_MAJOR >= 4 -+ if (mpfr_zero_p(arg)) -+ mpfr_set_zero(res, mpfr_sgn(arg)); -+ else -+ mpfr_rootn_ui(res, arg, n, GMP_RNDU); -+#else - mpfr_root(res, arg, n, GMP_RNDU); -+#endif - *up = mpfr_get_ld(res, GMP_RNDU); - mpfr_set_ld(arg, *b, GMP_RNDD); -+#if MPFR_VERSION_MAJOR >= 4 -+ if (mpfr_zero_p(arg)) -+ mpfr_set_zero(res, mpfr_sgn(arg)); -+ else -+ mpfr_rootn_ui(res, arg, n, GMP_RNDD); -+#else - mpfr_root(res, arg, n, GMP_RNDD); -+#endif - *down = mpfr_get_ld(res, GMP_RNDD); - #endif - mpfr_clear(arg); diff --git a/apron-texinfo.patch b/apron-texinfo.patch index c6366c2..e05b7e6 100644 --- a/apron-texinfo.patch +++ b/apron-texinfo.patch @@ -1,16 +1,6 @@ ---- apron/apron.texi.orig 2015-09-21 13:23:19.000000000 -0600 -+++ apron/apron.texi 2016-01-27 20:16:48.938507952 -0700 -@@ -16,7 +16,9 @@ - - @c Please read the COPYING file packaged in the distribution - -+@ifnottex - @setcontentsaftertitlepage -+@end ifnottex - - @tex - \global\parskip=0.5ex -@@ -69,6 +71,7 @@ numerical variables. +--- apron/apron.texi.orig 2019-11-10 07:33:31.000000000 -0700 ++++ apron/apron.texi 2020-01-17 09:04:07.152719196 -0700 +@@ -67,6 +67,7 @@ numerical variables. @contents @end ifnothtml @@ -18,7 +8,7 @@ @menu * Copying:: * Introduction to APRON:: -@@ -82,6 +85,7 @@ numerical variables. +@@ -80,6 +81,7 @@ numerical variables. * Examples:: * Appendices:: @end menu @@ -26,7 +16,7 @@ @c ******************************************************************* @node Copying, Introduction to APRON, Top, Top -@@ -2472,7 +2476,8 @@ Polynomial fraction with possibly interv +@@ -2470,7 +2472,8 @@ Polynomial fraction with possibly interv @end deftypefun @deftypefun bool ap_texpr1_is_scalar (ap_texpr1_t* @var{e}) @@ -36,9 +26,9 @@ @c ------------------------------------------------------------------- @node Operations on tree expressions of level 1, , Tests on tree expressions of level 1, Tree expressions of level 1 ---- apron/Makefile.orig 2016-01-25 10:41:11.000000000 -0700 -+++ apron/Makefile 2016-01-27 20:11:18.016455265 -0700 -@@ -103,15 +103,15 @@ newpolka.texi: ../newpolka/newpolka.texi +--- apron/Makefile.orig 2019-11-10 07:33:31.000000000 -0700 ++++ apron/Makefile 2020-01-17 09:04:07.152719196 -0700 +@@ -106,15 +106,15 @@ newpolka.texi: ../newpolka/newpolka.texi box.texi: ../box/box.texi ln -sf $< $@ @@ -57,10 +47,10 @@ cp -f ../octagons/oct_doc.html html #--------------------------------------- ---- configure.orig 2016-01-25 10:42:37.000000000 -0700 -+++ configure 2016-01-27 20:11:41.782530893 -0700 -@@ -599,8 +599,7 @@ OCAMLFIND = $ocamlfind - LATEX = latex +--- configure.orig 2019-11-10 07:33:31.000000000 -0700 ++++ configure 2020-01-17 09:04:07.152719196 -0700 +@@ -621,8 +621,7 @@ LATEX = latex + PDFLATEX = pdflatex DVIPDF = dvipdf MAKEINDEX = makeindex -TEXI2DVI = texi2dvi @@ -69,10 +59,10 @@ # OSX only: ABSOLUTE_DYLIB_INSTALL_NAMES = $absolute_dylib_install_names ---- Makefile.config.model.orig 2015-08-20 07:27:35.000000000 -0600 -+++ Makefile.config.model 2016-01-27 20:11:30.047481096 -0700 -@@ -177,7 +177,6 @@ CAMLIDL = camlidl - LATEX=latex +--- Makefile.config.model.orig 2019-11-10 07:33:31.000000000 -0700 ++++ Makefile.config.model 2020-01-17 09:04:07.153719179 -0700 +@@ -178,7 +178,6 @@ LATEX=latex + PDFLATEX=pdflatex DVIPDF=dvipdf MAKEINDEX=makeindex -TEXI2DVI=texi2dvi @@ -80,23 +70,3 @@ +TEXI2ANY=texi2any OCAMLPACK = $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))/ocamlpack ---- mlapronidl/Makefile.orig 2016-01-25 10:41:11.000000000 -0700 -+++ mlapronidl/Makefile 2016-01-27 21:47:15.529162480 -0700 -@@ -156,7 +156,7 @@ apron_ocamldoc.mli: introduction.odoc $( - mlapronidl.pdf: mlapronidl.dvi - $(DVIPDF) mlapronidl.dvi - --mlapronidl.dvi: mlapronidl.tex introduction.mli $(MLMODULES:%=%.mli) ../box/box.mli ../octagons/oct.mli ../newpolka/polka.mli ../ppl/ppl.mli ../products/polkaGrid.mli $(MLGMPIDL_LIB)/mpz.mli $(MLGMPIDL_LIB)/mpq.mli $(MLGMPIDL_LIB)/gmp_random.mli $(MLGMPIDL_LIB)/mpf.mli $(MLGMPIDL_LIB)/mpfr.mli $(MLGMPIDL_LIB)/mpzf.mli $(MLGMPIDL_LIB)/mpqf.mli $(MLGMPIDL_LIB)/mpfrf.mli -+mlapronidl.dvi: mlapronidl.tex introduction.mli $(MLMODULES:%=%.mli) ../box/box.mli ../octagons/oct.mli ../newpolka/polka.mli ../ppl/ppl.mli ../products/polkaGrid.mli - $(OCAMLDOC) $(OCAMLINC) -I ../newpolka -I ../ppl \ - -latextitle 1,chapter -latextitle 2,section -latextitle 3,subsection -latextitle 4,subsubsection -latextitle 5,paragraph -latextitle 6,subparagraph -noheader -notrailer -latex -sepfiles introduction.mli $(MLMODULES:%=%.mli) ../box/box.mli ../octagons/oct.mli ../newpolka/polka.mli ../ppl/ppl.mli ../products/polkaGrid.mli $(MLGMPIDL_LIB)/mpz.mli $(MLGMPIDL_LIB)/mpq.mli $(MLGMPIDL_LIB)/gmp_random.mli $(MLGMPIDL_LIB)/mpf.mli $(MLGMPIDL_LIB)/mpfr.mli $(MLGMPIDL_LIB)/mpzf.mli $(MLGMPIDL_LIB)/mpqf.mli $(MLGMPIDL_LIB)/mpfrf.mli - $(LATEX) mlapronidl -@@ -164,7 +164,7 @@ mlapronidl.dvi: mlapronidl.tex introduct - $(LATEX) mlapronidl - $(LATEX) mlapronidl - --html: mlapronidl.odoc introduction.mli $(IDLMODULES:%=%.mli) parser.mli $(MLMODULES:%=%.mli) ../box/box.mli ../octagons/oct.mli ../newpolka/polka.mli ../ppl/ppl.mli ../products/polkaGrid.mli $(MLGMPIDL_LIB)/mpz.mli $(MLGMPIDL_LIB)/mpq.mli $(MLGMPIDL_LIB)/gmp_random.mli $(MLGMPIDL_LIB)/mpf.mli $(MLGMPIDL_LIB)/mpfr.mli $(MLGMPIDL_LIB)/mpzf.mli $(MLGMPIDL_LIB)/mpqf.mli $(MLGMPIDL_LIB)/mpfrf.mli -+html: mlapronidl.odoc introduction.mli $(IDLMODULES:%=%.mli) parser.mli $(MLMODULES:%=%.mli) ../box/box.mli ../octagons/oct.mli ../newpolka/polka.mli ../ppl/ppl.mli ../products/polkaGrid.mli - mkdir -p html - $(OCAMLDOC) $(OCAMLINC) -I ../newpolka -I ../ppl \ - -html -d html -colorize-code -intro mlapronidl.odoc introduction.mli $(IDLMODULES:%=%.mli) parser.mli ../box/box.mli ../octagons/oct.mli ../newpolka/polka.mli ../ppl/ppl.mli ../products/polkaGrid.mli $(MLGMPIDL_LIB)/mpz.mli $(MLGMPIDL_LIB)/mpq.mli $(MLGMPIDL_LIB)/gmp_random.mli $(MLGMPIDL_LIB)/mpf.mli $(MLGMPIDL_LIB)/mpfr.mli $(MLGMPIDL_LIB)/mpzf.mli $(MLGMPIDL_LIB)/mpqf.mli $(MLGMPIDL_LIB)/mpfrf.mli diff --git a/apron.rpmlintrc b/apron.rpmlintrc new file mode 100644 index 0000000..a94a1c2 --- /dev/null +++ b/apron.rpmlintrc @@ -0,0 +1,11 @@ +# THIS FILE IS FOR WHITELISTING RPMLINT ERRORS AND WARNINGS IN TASKOTRON +# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Whitelisting_errors + +# The dictionary is missing some technical terms +addFilter(r'W: spelling-error .* invariants') + +# We use whatever version of jquery doxygen gives us +addFilter(r'W: unversioned-explicit-provides bundled\(jquery\)') + +# The configure script is not an autotools-generated script +addFilter(r'apron\.spec:[^:]*: W: configure-without-libdir-spec') diff --git a/apron.spec b/apron.spec index 9c7e374..957070f 100644 --- a/apron.spec +++ b/apron.spec @@ -1,23 +1,14 @@ -%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) -%global svndate 20180624 -%global svnrev 1104 - Name: apron -Version: 0.9.11 -Release: 33.%{svnrev}.svn%{svndate}%{?dist} +Version: 0.9.12 +Release: 1%{?dist} Summary: Numerical abstract domain library # The entire package is LGPLv2+ except newpolka/mf_qsort.c and ppl/*, all of # which are GPLv2+. This means that libpolkaMPQ.so.*, libpolkaRll.so.*, and # libap_ppl.so.* are GPLv2+, and the other libraries are all LGPLv2+. License: LGPLv2+ and GPLv2+ -URL: http://apron.cri.ensmp.fr/library/ -# Upstream has given up on making releases, so we pull from subversion now. -# Create the source tarball as follows: -# svn export -r %%{svnrev} svn://scm.gforge.inria.fr/svnroot/apron/apron/trunk \ -# apron-%%{version} -# tar cJf apron-%%{version}.tar apron-%%{version} -Source0: %{name}-%{version}.tar.xz +URL: https://antoinemine.github.io/Apron/doc/ +Source0: https://github.com/antoinemine/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz # This patch has not been sent upstream as it is GCC-specific. Certain # symbols are defined in both libpolkaMPQ and libpolkaRll, with different # implementations. This patch makes references to those symbols in @@ -32,6 +23,7 @@ Patch2: %{name}-mpfr4.patch BuildRequires: doxygen-latex BuildRequires: gcc-c++ BuildRequires: ghostscript-tools-dvipdf +BuildRequires: java-devel BuildRequires: javapackages-local BuildRequires: mpfr-devel BuildRequires: ppl-devel @@ -104,7 +96,7 @@ Java interface to the APRON library. %autosetup -p0 # Fix library path for 64-bit installs -if [ "%{_libdir}" = "%{_prefix}/lib64" ]; then +if [ "%{_lib}" = "lib64" ]; then sed -i 's,\${apron_prefix}/lib,&64,' configure sed -i 's,/lib,&64,' vars.mk fi @@ -121,28 +113,36 @@ iconv -f iso8859-1 -t utf-8 Changes > Changes.utf8 touch -r Changes Changes.utf8 mv -f Changes.utf8 Changes -# Preserve timestamps +# Preserve timestamps when copying sed -i 's/^\([[:blank:]]*cp[[:blank:]]\)/\1-p /' Makefile */Makefile +# Do not change -O2 to -O3 +sed -i 's/-O3/-O2/' configure Makefile.config.model + +# Link the OCaml objects with our LDFLAGS +sed -e "s|\$(OCAMLMKLIB) -L.*|& -g -ldopt '$RPM_LD_FLAGS'|" \ + -e "/CMXS/s|-linkall|-cclib '$RPM_LD_FLAGS' &|" \ + -i vars.mk + %build # This is NOT an autoconf-generated script. Do not use %%configure -CPPFLAGS="-D_GNU_SOURCE" \ -CFLAGS="%{optflags} -fsigned-char" \ -CXXFLAGS="%{optflags} -fsigned-char" \ -LDFLAGS="-Wl,--as-needed $RPM_LD_FLAGS" \ -java_home="%{_jvmdir}/java" \ +export CPPFLAGS="-D_GNU_SOURCE" +export CFLAGS="%{optflags} -fsigned-char" +export CXXFLAGS="%{optflags} -fsigned-char" +export LDFLAGS="$RPM_LD_FLAGS" +export JAVA_HOME="%{_jvmdir}/java" +export JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8" ./configure -prefix %{_prefix} -java-prefix %{_jvmdir}/java # Put back a flag that the configure script strips out sed -i 's/-Wp,-D_FORTIFY_SOURCE=2/-Werror=format-security &/' Makefile.config -# Building with JNI requires two include paths; configure only gives us one -sed -i 's,^JNIINC.*,& -I%{_jvmdir}/java/include/linux,' Makefile.config - -# FIXME: Cannot use %%{?_smp_mflags} due to missing Makefile dependencies -make +%make_build make doc +# for some reason this is no longer built in `make doc` +make -C mlapronidl mlapronidl.pdf + %install # Install the ocaml bits into the buildroot sed -i 's, install ,&-destdir %{buildroot}%{_libdir}/ocaml -ldconf ignore ,' \ @@ -193,16 +193,15 @@ make -C test APRON_INCLUDE=%{buildroot}%{_includedir}/%{name} \ CAMLIDL_PREFIX=%{buildroot}%{_libdir} test/ctest1 -%ldconfig_scriptlets - %files -%doc AUTHORS Changes README apron/apron.pdf +%doc AUTHORS Changes README.md apron/apron.pdf %license COPYING -%{_libdir}/*.so.* +%{_libdir}/lib*.so.0 +%{_libdir}/lib*.so.0.* %files devel %doc doc/apron doc/apronxx -%{_libdir}/*.so +%{_libdir}/lib*.so %{_includedir}/%{name}/ %files -n ocaml-%{name} @@ -216,7 +215,7 @@ test/ctest1 %files -n ocaml-%{name}-devel %doc mlapronidl/html/* -%if %opt +%ifarch %{ocaml_native_compiler} %{_libdir}/ocaml/%{name}/*.a %{_libdir}/ocaml/%{name}/*.cmxa %{_libdir}/ocaml/%{name}/*.cmx @@ -232,6 +231,9 @@ test/ctest1 %{_jnidir}/*.so %changelog +* Wed Jan 22 2020 Dan Čermák - 0.9.12-1 +- New upstream release 0.9.12 + * Sun Jan 19 2020 Richard W.M. Jones - 0.9.11-33.1104.svn20180624 - OCaml 4.10.0+beta1 rebuild. diff --git a/sources b/sources index 9bf835b..1fb9d94 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (apron-0.9.11.tar.xz) = f6b5332935b9ef4621328d69223bd41d08c5c440e2b228e6fbcf8cffd4b1c488ab9bee9f5cfc9b5b202a9a6340257e1f3b52e29f22e06c90f40081f1b27726c5 +SHA512 (apron-0.9.12.tar.gz) = c5c8c05f7bf04ecd2fb71c023a7a2537a366fcc68286f8319481b8274aa9c4bbd1883113ce10e5073232357cf0bbeb433e51339d504d14d656eccede98459742