From: Jakub Bogusz Date: Sun, 12 Sep 2021 19:07:52 +0000 (+0200) Subject: - added flags patch, pass cflags/ldflags via -ccopt/-cclib X-Git-Tag: auto/th/camlp5-8.00.02-1 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fcamlp5.git;a=commitdiff_plain;h=1ecd5f6 - added flags patch, pass cflags/ldflags via -ccopt/-cclib - debuginfo extractor cannot find sources though, so disable debugsource packages --- diff --git a/camlp5-flags.patch b/camlp5-flags.patch new file mode 100644 index 0000000..4163461 --- /dev/null +++ b/camlp5-flags.patch @@ -0,0 +1,52 @@ +--- camlp5-rel8.00.02/tools/ocamlc.sh.orig 2021-08-05 00:14:37.000000000 +0200 ++++ camlp5-rel8.00.02/tools/ocamlc.sh 2021-09-12 19:30:57.975775853 +0200 +@@ -1,5 +1,5 @@ + #!/bin/sh -e + + COMM=${OCAMLN}c$OPT +-echo $COMM $* +-$COMM $* ++echo $COMM "$@" ++$COMM "$@" +--- camlp5-rel8.00.02/tools/ocamlopt.sh.orig 2021-08-05 00:14:37.000000000 +0200 ++++ camlp5-rel8.00.02/tools/ocamlopt.sh 2021-09-12 19:31:14.806650407 +0200 +@@ -1,5 +1,5 @@ + #!/bin/sh -e + + COMM=${OCAMLN}opt$OPT +-echo $COMM $* +-$COMM $* ++echo $COMM "$@" ++$COMM "$@" +--- camlp5-rel8.00.02/ocaml_src/tools/ocamlc.sh.orig 2021-08-05 00:14:37.000000000 +0200 ++++ camlp5-rel8.00.02/ocaml_src/tools/ocamlc.sh 2021-09-12 19:31:44.258180744 +0200 +@@ -1,5 +1,5 @@ + #!/bin/sh -e + + COMM=${OCAMLN}c$OPT +-echo $COMM $* +-$COMM $* ++echo $COMM "$@" ++$COMM "$@" +--- camlp5-rel8.00.02/ocaml_src/tools/ocamlopt.sh.orig 2021-08-05 00:14:37.000000000 +0200 ++++ camlp5-rel8.00.02/ocaml_src/tools/ocamlopt.sh 2021-09-12 19:31:57.728880697 +0200 +@@ -1,5 +1,5 @@ + #!/bin/sh -e + + COMM=${OCAMLN}opt$OPT +-echo $COMM $* +-$COMM $* ++echo $COMM "$@" ++$COMM "$@" +--- camlp5-rel8.00.02/configure.orig 2021-09-12 19:35:45.520716664 +0200 ++++ camlp5-rel8.00.02/configure 2021-09-12 19:40:02.490734388 +0200 +@@ -262,7 +262,7 @@ echo EXT_LIB=$EXT_LIB + echo OVERSION=$STUFFVERSION + echo VERSION=$VERSION +-echo OCAMLC_W_Y=\"$OCAMLC_W_Y\" +-echo WARNERR=\"$WARNERR\" ++echo OCAMLC_W_Y=$OCAMLC_W_Y ++echo WARNERR=$WARNERR + echo NO_PR_DIR=$NO_PR_DIR + echo OLIBDIR=$OLIBDIR + echo OCLIBDIR=$OCLIBDIR diff --git a/camlp5.spec b/camlp5.spec index 13f4000..f0ff13a 100644 --- a/camlp5.spec +++ b/camlp5.spec @@ -10,6 +10,7 @@ %if %{without ocaml_opt} %define _enable_debug_packages 0 %endif +%define _debugsource_packages 0 Summary: Objective Caml Preprocessor Summary(pl.UTF-8): Preprocesor OCamla @@ -22,6 +23,7 @@ Group: Development/Languages Source0: https://github.com/camlp5/camlp5/archive/rel%{version}/%{name}-%{version}.tar.gz # Source0-md5: 096076be4b26034643508511e834ccc2 Patch0: no-warn-error.patch +Patch1: %{name}-flags.patch URL: https://camlp5.github.io/ BuildRequires: db-devel >= 4.1 BuildRequires: ocaml @@ -84,10 +86,13 @@ Preprocesor OCamla - dokumentacja w formacie PDF. %prep %setup -q -n %{name}-rel%{version} %patch0 -p1 +%patch1 -p1 %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+perl(\s|$),#!%{__perl}\1,' \ etc/mkcamlp5.pl +%{__sed} -i -e 's/DEBUG=/&-ccopt "%{rpmcflags}" -cclib "%{rpmldflags}"/' config/Makefile.tpl + %build ./configure \ -prefix %{_prefix} \ @@ -96,6 +101,7 @@ Preprocesor OCamla - dokumentacja w formacie PDF. -mandir %{_mandir}/man1 %{__make} -j1 world%{?with_ocaml_opt:.opt} + %{__make} -j1 -C doc/htmlp pdf %install