[packages/camlp5] - up to 8.00
baggins
baggins at pld-linux.org
Thu Mar 18 22:37:30 CET 2021
commit 7a1551a745658c4733aafc3c91159d67609aa5fd
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Thu Mar 18 22:37:05 2021 +0100
- up to 8.00
DESTDIR.patch | 36 ++++++++++++++++++++++++++++++++++++
camlp5.spec | 33 +++++++++++++++++----------------
no-warn-error.patch | 15 +++++++++++++++
3 files changed, 68 insertions(+), 16 deletions(-)
---
diff --git a/camlp5.spec b/camlp5.spec
index 8f164cb..228b70d 100644
--- a/camlp5.spec
+++ b/camlp5.spec
@@ -10,17 +10,15 @@
Summary: Objective Caml Preprocessor
Summary(pl.UTF-8): Preprocesor OCamla
Name: camlp5
-Version: 6.17
-%define gitver rel617
-Release: 2
+Version: 8.00
+Release: 1
License: distributable
Group: Development/Languages
-#Source0: http://camlp5.gforge.inria.fr/distrib/src/%{name}-%{version}.tgz
-Source0: https://github.com/camlp5/camlp5/archive/%{gitver}/%{name}-%{version}.tar.gz
-# Source0-md5: 572e0fa053715e40a40415ea3ca5d4ea
-Source1: http://camlp5.gforge.inria.fr/doc/pdf/%{name}-6.00.pdf
-# Source1-md5: b241eabfeb48f22b0fbd3e497198a76a
-URL: http://caml.inria.fr/
+Source0: https://github.com/camlp5/camlp5/archive/rel%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 477cdfa2be786ebc37c75e280d3ee504
+Patch0: no-warn-error.patch
+Patch1: DESTDIR.patch
+URL: https://camlp5.github.io/
BuildRequires: db-devel >= 4.1
BuildRequires: ocaml
BuildRequires: ocaml-ocamlbuild
@@ -80,19 +78,22 @@ Objective Caml Preprocessor - PDF documentation.
Preprocesor OCamla - dokumentacja w formacie PDF.
%prep
-%setup -q -n %{name}-%{gitver}
+%setup -q -n %{name}-rel%{version}
+%patch0 -p1
+%patch1 -p1
-cp %{SOURCE1} doc/camlp5.pdf
+%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+perl(\s|$),#!%{__perl}\1,' \
+ etc/mkcamlp5.pl
%build
./configure \
+ -prefix %{_prefix} \
-bindir %{_bindir} \
-libdir %{_libdir}/ocaml \
- -mandir %{_mandir}/man1 \
- -transitional
+ -mandir %{_mandir}/man1
%{__make} -j1 world%{?with_ocaml_opt:.opt}
-%{__make} -j1 -C doc/htmlp
+%{__make} -j1 -C doc/htmlp pdf
%install
rm -rf $RPM_BUILD_ROOT
@@ -114,7 +115,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc CHANGES DEVEL ICHANGES MODE README UPGRADING
+%doc CHANGES DEVEL ICHANGES MODE README.md UPGRADING
%attr(755,root,root) %{_bindir}/camlp5*
%attr(755,root,root) %{_bindir}/mkcamlp5*
%attr(755,root,root) %{_bindir}/ocpp5
@@ -129,4 +130,4 @@ rm -rf $RPM_BUILD_ROOT
%files doc-pdf
%defattr(644,root,root,755)
-%doc doc/camlp5.pdf
+%doc doc/htmlp/camlp5.pdf
diff --git a/DESTDIR.patch b/DESTDIR.patch
new file mode 100644
index 0000000..57b44ba
--- /dev/null
+++ b/DESTDIR.patch
@@ -0,0 +1,36 @@
+From 2865ecfe5e02f8895c555396993b49b3b08a3550 Mon Sep 17 00:00:00 2001
+From: Chet Murthy <chetsky at gmail.com>
+Date: Fri, 15 Jan 2021 12:35:50 -0800
+Subject: [PATCH] fix META file generation (DESTDIR) issue; Fix #75
+
+---
+ Makefile | 2 +-
+ etc/Makefile | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index c9adcc46..7748ddd6 100644
+--- a/Makefile
++++ b/Makefile
+@@ -51,7 +51,7 @@ depend:
+
+ local-install::
+ $(RM) -rf local-install && mkdir -p local-install/lib/ocaml
+- $(MAKE) DESTDIR=`pwd`/local-install/ LIBDIR=lib BINDIR=bin MANDIR=man install
++ $(MAKE) DESTDIR= LIBDIR=`pwd`/local-install/lib BINDIR=`pwd`/local-install/bin MANDIR=man install
+
+ install:
+ $(NOVERBOSE) if test -z "$(LIBDIR)"; then \
+diff --git a/etc/Makefile b/etc/Makefile
+index ef4593cc..f8913866 100644
+--- a/etc/Makefile
++++ b/etc/Makefile
+@@ -106,7 +106,7 @@ install:
+ -$(MKDIR) "$(DESTDIR)$(LIBDIR)/$(CAMLP5N)" "$(DESTDIR)$(BINDIR)"
+ $(RM) -f "$(DESTDIR)$(LIBDIR)/$(CAMLP5N)/pa_lex.cmo"
+ cp $(OBJS) $(INSTALL_CMI) "$(DESTDIR)$(LIBDIR)/$(CAMLP5N)/."
+- sed -e "s|@VERSION@|$(VERSION)|" -e "s|@CAMLP5DIR@|$(DESTDIR)$(LIBDIR)/$(CAMLP5N)|" META.tpl > META
++ sed -e "s|@VERSION@|$(VERSION)|" -e "s|@CAMLP5DIR@|$(LIBDIR)/$(CAMLP5N)|" META.tpl > META
+ cp META "$(DESTDIR)$(LIBDIR)/$(CAMLP5N)/."
+ cp lib.sml "$(DESTDIR)$(LIBDIR)/$(CAMLP5N)/."
+ cp $(CAMLP5N)o$(EXE) $(CAMLP5N)sch$(EXE) "$(DESTDIR)$(BINDIR)/."
diff --git a/no-warn-error.patch b/no-warn-error.patch
new file mode 100644
index 0000000..9511c65
--- /dev/null
+++ b/no-warn-error.patch
@@ -0,0 +1,15 @@
+--- camlp5-rel8.00.old/configure 2020-12-27 22:26:24.000000000 +0000
++++ camlp5-rel8.00/configure 2021-02-28 22:38:08.341646880 +0000
+@@ -243,11 +243,7 @@
+ OCAMLC_W_Y=""
+ fi
+
+-if [ "$($ocamlc -warn-error +A-11 2>&1)" = "" ]; then
+- WARNERR="-warn-error +A-11"
+-else
+- WARNERR=""
+-fi
++WARNERR=""
+
+ if make -f config/Makefile.check --no-print-directory >/dev/null 2>&1; then
+ NO_PR_DIR=--no-print-directory
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/camlp5.git/commitdiff/7a1551a745658c4733aafc3c91159d67609aa5fd
More information about the pld-cvs-commit
mailing list