From 0f6cace9e1e0f00de60158734f3501abd45d13a4016af15c096c9b5158ddc79c Mon Sep 17 00:00:00 2001 From: Peter Trommler Date: Tue, 24 Feb 2015 07:57:44 +0000 Subject: [PATCH] Accepting request 287470 from home:ptrommler:branches:devel:languages:haskell update to 1.4.7 and remove ghc dependency workaround OBS-URL: https://build.opensuse.org/request/show/287470 OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc-rpm-macros?expand=0&rev=40 --- fix-gen-filelists.patch | 10 ++++---- fix-runpath.patch | 13 ---------- ...f9db56515862de9839f12a17be5f2ed2eb7.tar.xz | 3 --- ...e4857a866d19cc59b496846d127b9e8c381.tar.xz | 3 +++ ghc-rpm-macros.changes | 15 ++++++++++++ ghc-rpm-macros.spec | 24 ++++++++----------- remove-flags.patch | 15 ++++++++++++ suse-disable-debug-packages.patch | 8 +++---- suse-docdir.patch | 21 +++++++++------- 9 files changed, 64 insertions(+), 48 deletions(-) delete mode 100644 fix-runpath.patch delete mode 100644 ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7.tar.xz create mode 100644 ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381.tar.xz create mode 100644 remove-flags.patch diff --git a/fix-gen-filelists.patch b/fix-gen-filelists.patch index 193aaea..f407f0c 100644 --- a/fix-gen-filelists.patch +++ b/fix-gen-filelists.patch @@ -1,10 +1,10 @@ -Index: ghc-rpm-macros-master/macros.ghc +Index: ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/macros.ghc =================================================================== ---- ghc-rpm-macros-master.orig/macros.ghc -+++ ghc-rpm-macros-master/macros.ghc -@@ -48,7 +48,7 @@ fi - %define docdir %{ghclibdocdir}/%{pkgname}\ +--- ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381.orig/macros.ghc ++++ ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/macros.ghc +@@ -66,7 +66,7 @@ tests rm -f %{basepkg}.files %{basepkg}-devel.files\ + touch %{basepkg}.files %{basepkg}-devel.files\ if [ -d "%{buildroot}%{pkgdir}" ]; then\ -echo "%dir %{pkgdir}" >> %{basepkg}.files\ +echo "%%dir %{pkgdir}" >> %{basepkg}.files\ diff --git a/fix-runpath.patch b/fix-runpath.patch deleted file mode 100644 index 56a97c3..0000000 --- a/fix-runpath.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7/macros.ghc -=================================================================== ---- ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7.orig/macros.ghc -+++ ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7/macros.ghc -@@ -128,7 +128,7 @@ PDIR=$(pwd)\ - for i in %*; do\ - PROG=%{buildroot}%{_bindir}/$i\ - if [ -x "$PROG" ]; then\ -- RPATH=$(chrpath $PROG | sed -e "s@^$PROG: RPATH=@@")\ -+ RPATH=$(chrpath $PROG | sed -e "s@^$PROG: R\\(UN\\)\\?PATH=@@")\ - case $RPATH in\ - *$PDIR*)\ - NEWRPATH=$(echo $RPATH | sed -e "s@$PDIR/dist/build@%{ghclibdir}/%{pkg_name}-%{version}@g")\ diff --git a/ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7.tar.xz b/ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7.tar.xz deleted file mode 100644 index dba5f09..0000000 --- a/ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b5413cfb813942151578e7acc4ef45cb38cd3bf8e13fc4a7c1edf0a6ef513ec4 -size 22600 diff --git a/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381.tar.xz b/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381.tar.xz new file mode 100644 index 0000000..0e7f771 --- /dev/null +++ b/ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d126e6f0c09245d85df09e427e663ec4bb8f0bd0211aeba784fb1e45c9eb88e6 +size 23252 diff --git a/ghc-rpm-macros.changes b/ghc-rpm-macros.changes index cfc77e5..bd00532 100644 --- a/ghc-rpm-macros.changes +++ b/ghc-rpm-macros.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Mon Feb 23 16:38:21 UTC 2015 - peter.trommler@ohm-hochschule.de + +- update to 1.4.7 +- drop fix-runpath.patch + * fixed upstream +- refresh fix-gen-filelists.patch +- refresh suse-disable-debug-packages.patch +- refresh suse-docdir.patch +- add remove-flags.patch + * remove passing of CFLAGS and LDFLAGS to ghc + * no macro %__global_ldflags in openSUSE +- remove provides ghc() workaround + * fixed upstream + ------------------------------------------------------------------- Sun Dec 14 09:26:31 UTC 2014 - peter.trommler@ohm-hochschule.de diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 7abf006..56326c8 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -1,7 +1,7 @@ # # spec file for package ghc-rpm-macros # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,14 +16,14 @@ # -%global git_hash 2da26f9db56515862de9839f12a17be5f2ed2eb7 +%global git_hash 81726e4857a866d19cc59b496846d127b9e8c381 %global macros_dir %{_sysconfdir}/rpm %global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.3.6 +Version: 1.4.7 Release: 0 BuildArch: noarch Summary: RPM Macros for building packages for GHC @@ -43,8 +43,8 @@ Patch3: files-defattr.patch Patch4: suse-docdir.patch # PATCH-FIX_UPSTREAM fix-gen-filelists.patch Patch5: fix-gen-filelists.patch -# PATCH-FIX-UPSTREAM fix-runpath.patch peter.trommler@ohm-hochschule.de -- In openSUSE we patch binutils to default to the "new" RUNPATH dynamic tag and not the obsolete RPATH. This patch adds support for the former and still works for the latter. -Patch7: fix-runpath.patch +# PATCH-FIX-OPENSUSE remove-flags.patch peter.trommler@ohm-hochschule.de -- Do not pass CFLAGS and LDFLAGS to ghc. openSUSE is missing a RPM macro %%__global_ldflags. +Patch8: remove-flags.patch # PATCH-FIX-SLE sle-sp1-rpmdeps.patch peter.trommler@ohm-hochschule.de -- SLE's RPM is too old in 11 SP1 and SP2 and SP3 Patch100: sle-sp1-rpmdeps.patch @@ -53,12 +53,6 @@ Requires: rpm %if %{undefined without_hscolour} Requires: hscolour %endif -# This is a workaround for a bug in the automatic dependencies generator -# ghc-deps.sh generates this symbol for extra libraries installed with a -# dynamic ghc, currently only %%{ix86} and x86_64 -%ifarch %{ix86} x86_64 -Provides: ghc() -%endif BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -94,7 +88,7 @@ Macros used when generating source Haskell rpm packages. %patch3 -p1 %patch4 -p1 %patch5 -p1 -%patch7 -p1 +%patch8 -p1 %if 0%{?sles_version} %patch -P 100 -p1 %endif @@ -106,7 +100,8 @@ echo no build stage needed install -p -D -m 0644 macros.ghc %{buildroot}%{macros_dir}/macros.ghc install -p -D -m 0644 macros.ghc-extra %{buildroot}/%{macros_dir}/macros.ghc-extra install -p -D -m 0755 ghc-deps.sh %{buildroot}/%{_prefix}/lib/rpm/ghc-deps.sh -install -p -D -m 0644 ghc.attr %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc.attr +install -p -D -m 0644 ghc_bin.attr %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc_bin.attr +install -p -D -m 0644 ghc_lib.attr %{buildroot}/%{_prefix}/lib/rpm/fileattrs/ghc_lib.attr install -p -D -m 0755 cabal-tweak-dep-ver %{buildroot}/%{_bindir}/cabal-tweak-dep-ver install -p -D -m 0755 cabal-tweak-flag %{buildroot}/%{_bindir}/cabal-tweak-flag @@ -114,7 +109,8 @@ install -p -D -m 0755 cabal-tweak-flag %{buildroot}/%{_bindir}/cabal-tweak-flag %defattr(-,root,root,-) %doc COPYING AUTHORS %config %{macros_dir}/macros.ghc -%{_prefix}/lib/rpm/fileattrs/ghc.attr +%{_prefix}/lib/rpm/fileattrs/ghc_bin.attr +%{_prefix}/lib/rpm/fileattrs/ghc_lib.attr %{_prefix}/lib/rpm/ghc-deps.sh %{_bindir}/cabal-tweak-dep-ver %{_bindir}/cabal-tweak-flag diff --git a/remove-flags.patch b/remove-flags.patch new file mode 100644 index 0000000..0d0c47a --- /dev/null +++ b/remove-flags.patch @@ -0,0 +1,15 @@ +Index: ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/macros.ghc +=================================================================== +--- ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381.orig/macros.ghc ++++ ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/macros.ghc +@@ -24,9 +24,7 @@ fi + # configure + %cabal_configure\ + %ghc_check_bootstrap\ +-CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ +-LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS\ +-%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/ / -optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" %{?cabal_configure_options} $cabal_configure_extra_options ++%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?cabal_configure_options} $cabal_configure_extra_options + + # install + %cabal_install %cabal copy --destdir=%{buildroot} -v diff --git a/suse-disable-debug-packages.patch b/suse-disable-debug-packages.patch index 02c7079..3949f5e 100644 --- a/suse-disable-debug-packages.patch +++ b/suse-disable-debug-packages.patch @@ -1,8 +1,8 @@ -Index: ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7/macros.ghc +Index: ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/macros.ghc =================================================================== ---- ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7.orig/macros.ghc -+++ ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7/macros.ghc -@@ -150,3 +150,13 @@ done\ +--- ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381.orig/macros.ghc ++++ ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/macros.ghc +@@ -177,3 +177,13 @@ done\ %global without_prof 1\ %global without_haddock 1\ %global without_manual 1 diff --git a/suse-docdir.patch b/suse-docdir.patch index d754741..ce03854 100644 --- a/suse-docdir.patch +++ b/suse-docdir.patch @@ -1,7 +1,7 @@ -Index: ghc-rpm-macros-4d2eb25803c01c46ee84cd7f30f1bc5fb4efba52/macros.ghc +Index: ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/macros.ghc =================================================================== ---- ghc-rpm-macros-4d2eb25803c01c46ee84cd7f30f1bc5fb4efba52.orig/macros.ghc -+++ ghc-rpm-macros-4d2eb25803c01c46ee84cd7f30f1bc5fb4efba52/macros.ghc +--- ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381.orig/macros.ghc ++++ ghc-rpm-macros-81726e4857a866d19cc59b496846d127b9e8c381/macros.ghc @@ -18,6 +18,9 @@ proceeding, to avoid dependency ABI brea %endif\ fi @@ -12,12 +12,15 @@ Index: ghc-rpm-macros-4d2eb25803c01c46ee84cd7f30f1bc5fb4efba52/macros.ghc # configure %cabal_configure\ %ghc_check_bootstrap\ -@@ -27,7 +30,7 @@ fi - %cabal_install %cabal copy --destdir=%{buildroot} -v +@@ -35,9 +38,9 @@ tests + %endif - # root dir for ghc docs + # root dir for ghc docs (used by ghc.spec) +-%ghc_html_dir %{_docdir}/ghc/html ++%ghc_html_dir %{_datadir}/doc/ghc/html + # deprecates -%ghcdocbasedir %{_docdir}/ghc/html +%ghcdocbasedir %{_datadir}/doc/ghc/html - # libraries doc dir - %ghclibdocdir %{ghcdocbasedir}/libraries - # pkg doc dir + + # libraries doc dir (internal) + %ghc_html_libraries_dir %{ghc_html_dir}/libraries