From c43e4d32e93ef47b12c3c663a55073b333f1b58c3a5378291e173c56d5cf39e5 Mon Sep 17 00:00:00 2001 From: Peter Trommler Date: Thu, 27 Aug 2015 16:00:57 +0000 Subject: [PATCH] Accepting request 327589 from devel:languages:haskell:lts - update to 1.4.93 - refreshed: add-group.patch files-defattr.patch fix-gen-filelists.patch fix-library-dir.patch suse-disable-debug-packages.patch suse-docdir.patch - dropped: version-docdirs.patch fix-runpath.patch ldflags.patch - added: remove-flags.patch - fix ghc-pkg path in ghc-deps.sh for ghc-7.10 - local pkgdir macro is redundant - use utf8 locale for cabal - add explicit --enable-shared again for arm64 - introduce ghc_pkgdocdir since no _pkgdocdir in RHEL 7 and earlier - allow overriding ghc- prefix with ghc_name (for ghc784 etc) - version ghc-pkg in ghc_pkg_recache - have to turn off hardening in cabal_configure: set _hardened_ldflags to nil - add cabal_test macro - only run cabal haddock for real libraries with modules - make sure basepkg.files is also created for meta packages - fix the R*PATH regexp - version ghcpkgdocdir - add new names ghc_html_dir, ghc_html_libraries_dir, and ghc_html_pkg_dir - correct cabal-tweak-flag error message for missing flag - update ghc_gen_filelists to use new keyed library filepaths OBS-URL: https://build.opensuse.org/request/show/327589 OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc-rpm-macros?expand=0&rev=49 --- add-group.patch | 14 +++++------ files-defattr.patch | 8 +++---- fix-gen-filelists.patch | 13 ++++++++++ fix-library-dir.patch | 10 ++++---- fix-runpath.patch | 13 ---------- ghc-rpm-macros-1.4.8.tar.xz | 3 --- ghc-rpm-macros-1.4.93.tar.xz | 3 +++ ghc-rpm-macros.changes | 37 +++++++++++++++++++++++++++++ ghc-rpm-macros.spec | 25 +++++++++---------- ldflags.patch => remove-flags.patch | 12 +++++----- suse-disable-debug-packages.patch | 9 +++---- suse-docdir.patch | 23 ++++++++++-------- version-docdirs.patch | 31 ------------------------ 13 files changed, 104 insertions(+), 97 deletions(-) create mode 100644 fix-gen-filelists.patch delete mode 100644 fix-runpath.patch delete mode 100644 ghc-rpm-macros-1.4.8.tar.xz create mode 100644 ghc-rpm-macros-1.4.93.tar.xz rename ldflags.patch => remove-flags.patch (56%) delete mode 100644 version-docdirs.patch diff --git a/add-group.patch b/add-group.patch index a3c5978..e1cba5b 100644 --- a/add-group.patch +++ b/add-group.patch @@ -1,20 +1,20 @@ -Index: ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7/macros.ghc-extra +Index: ghc-rpm-macros-1.4.93/macros.ghc-extra =================================================================== ---- ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7.orig/macros.ghc-extra -+++ ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7/macros.ghc-extra -@@ -8,6 +8,7 @@ - %define basepkg ghc-%{pkgname}\ +--- ghc-rpm-macros-1.4.93.orig/macros.ghc-extra ++++ ghc-rpm-macros-1.4.93/macros.ghc-extra +@@ -9,6 +9,7 @@ + %define basepkg %{ghc_prefix}-%{pkgname}\ %package -n %{basepkg}\ Summary: Haskell %{pkgname} library\ +Group: System/Libraries\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ Url: http://hackage.haskell.org/package/%{pkgname}\ -@@ -18,6 +19,7 @@ This package provides the Haskell %{pkgn +@@ -19,6 +20,7 @@ This package provides the Haskell %{pkgn \ %package -n %{basepkg}-devel\ Summary: Haskell %{pkgname} library development files\ +Group: Development/Languages/Other\ %{?1:Version: %{pkgver}}\ %{-l:License: %{-l*}}\ - Requires(post): ghc-compiler = %{ghc_version}\ + Requires(post): %{ghc_prefix}-compiler = %{ghc_version}\ diff --git a/files-defattr.patch b/files-defattr.patch index 58e31a2..c40abca 100644 --- a/files-defattr.patch +++ b/files-defattr.patch @@ -1,8 +1,8 @@ -Index: ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7/macros.ghc-extra +Index: ghc-rpm-macros-1.4.93/macros.ghc-extra =================================================================== ---- ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7.orig/macros.ghc-extra -+++ ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7/macros.ghc-extra -@@ -39,8 +39,10 @@ This package provides the Haskell %{pkgn +--- ghc-rpm-macros-1.4.93.orig/macros.ghc-extra ++++ ghc-rpm-macros-1.4.93/macros.ghc-extra +@@ -40,8 +40,10 @@ This package provides the Haskell %{pkgn %ghc_pkg_recache\ \ %files -n %{basepkg} -f %{basepkg}.files\ diff --git a/fix-gen-filelists.patch b/fix-gen-filelists.patch new file mode 100644 index 0000000..bcb4aca --- /dev/null +++ b/fix-gen-filelists.patch @@ -0,0 +1,13 @@ +Index: ghc-rpm-macros-1.4.93/macros.ghc +=================================================================== +--- ghc-rpm-macros-1.4.93.orig/macros.ghc ++++ ghc-rpm-macros-1.4.93/macros.ghc +@@ -77,7 +77,7 @@ fi\ + 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\ + %if %{undefined ghc_without_shared}\ + echo "%attr(755,root,root) ${pkgdir}/libHS*-ghc%{ghc_version}.so" >> %{basepkg}.files\ + %endif\ diff --git a/fix-library-dir.patch b/fix-library-dir.patch index 319fa5e..bc3c9b9 100644 --- a/fix-library-dir.patch +++ b/fix-library-dir.patch @@ -1,11 +1,11 @@ -Index: ghc-rpm-macros-1.3.91/macros.ghc +Index: ghc-rpm-macros-1.4.93/macros.ghc =================================================================== ---- ghc-rpm-macros-1.3.91.orig/macros.ghc -+++ ghc-rpm-macros-1.3.91/macros.ghc -@@ -24,7 +24,7 @@ fi - # configure +--- ghc-rpm-macros-1.4.93.orig/macros.ghc ++++ ghc-rpm-macros-1.4.93/macros.ghc +@@ -26,7 +26,7 @@ fi %cabal_configure\ %ghc_check_bootstrap\ + %global _hardened_ldflags %{nil}\ -%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 +%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?cabal_configure_options} $cabal_configure_extra_options diff --git a/fix-runpath.patch b/fix-runpath.patch deleted file mode 100644 index d605bd2..0000000 --- a/fix-runpath.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: ghc-rpm-macros-1.3.91/macros.ghc -=================================================================== ---- ghc-rpm-macros-1.3.91.orig/macros.ghc -+++ ghc-rpm-macros-1.3.91/macros.ghc -@@ -135,7 +135,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-1.4.8.tar.xz b/ghc-rpm-macros-1.4.8.tar.xz deleted file mode 100644 index f6725d0..0000000 --- a/ghc-rpm-macros-1.4.8.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bab7f3b690f7f67f5dffea486583eb9f99f3c83b39bae6ea50867f8744d4a1a1 -size 23144 diff --git a/ghc-rpm-macros-1.4.93.tar.xz b/ghc-rpm-macros-1.4.93.tar.xz new file mode 100644 index 0000000..c6a415c --- /dev/null +++ b/ghc-rpm-macros-1.4.93.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:73066538e9af8a33e3bc1e280db3fe12423d5e41b0ae70c1abfeef76a6bd6c4a +size 23044 diff --git a/ghc-rpm-macros.changes b/ghc-rpm-macros.changes index 6673482..37161e9 100644 --- a/ghc-rpm-macros.changes +++ b/ghc-rpm-macros.changes @@ -1,3 +1,40 @@ +------------------------------------------------------------------- +Thu Aug 27 08:45:19 UTC 2015 - mimi.vx@gmail.com + +- update to 1.4.93 +- refreshed: + add-group.patch + files-defattr.patch + fix-gen-filelists.patch + fix-library-dir.patch + suse-disable-debug-packages.patch + suse-docdir.patch +- dropped: + version-docdirs.patch + fix-runpath.patch + ldflags.patch +- added: + remove-flags.patch +- fix ghc-pkg path in ghc-deps.sh for ghc-7.10 +- local pkgdir macro is redundant +- use utf8 locale for cabal +- add explicit --enable-shared again for arm64 +- introduce ghc_pkgdocdir since no _pkgdocdir in RHEL 7 and earlier +- allow overriding ghc- prefix with ghc_name (for ghc784 etc) +- version ghc-pkg in ghc_pkg_recache +- have to turn off hardening in cabal_configure: set _hardened_ldflags to nil +- add cabal_test macro +- only run cabal haddock for real libraries with modules +- make sure basepkg.files is also created for meta packages +- fix the R*PATH regexp +- version ghcpkgdocdir +- add new names ghc_html_dir, ghc_html_libraries_dir, and ghc_html_pkg_dir +- correct cabal-tweak-flag error message for missing flag +- update ghc_gen_filelists to use new keyed library filepaths + and specify libHS*.so more loosely +- ghc-dep.sh now just makes versioned devel reqs +- rename ghc_lib.attr to ghc.attr and drop ghc_bin.attr + ------------------------------------------------------------------- Wed Aug 19 08:08:54 UTC 2015 - mimi.vx@gmail.com diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 51e65d9..7230fdc 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -21,7 +21,7 @@ %global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.4.8 +Version: 1.4.93 Release: 0 BuildArch: noarch Summary: RPM Macros for building packages for GHC @@ -30,6 +30,7 @@ Group: Development/Libraries/Other Url: https://fedoraproject.org/wiki/Haskell_SIG +# source prepared manually from github.com/fedora-haskell/ghc-rpm-macros Source0: %{name}-%{version}.tar.xz # PATCH-FIX-OPENSUSE suse-disable-debug-packages.patch peter.trommler@ohm-hochschule.de -- openSUSE way to disable debug packages Patch1: suse-disable-debug-packages.patch @@ -39,17 +40,15 @@ Patch2: add-group.patch Patch3: files-defattr.patch # PATCH-FIX-OPENSUSE suse-docdir.patch peter.trommler@ohm-hochschule.de -- fix location of docdir Patch4: suse-docdir.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 ldflags.patch peter.trommler@ohm-hochschule.de -- Remove LDFLAGS. TODO: Find the right openSUSE way to do this. -Patch8: ldflags.patch +# PATCH-FIX_UPSTREAM fix-gen-filelists.patch +Patch5: fix-gen-filelists.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-UPSTREAM fix-library-dir.patch peter.trommler@ohm-hochschule.de -- Fix ghc-rpm-macros and ghc build system installing into different library directories (package version vs package key). -Patch9: fix-library-dir.patch -# PATCH-FIX-UPSTREAM version-docdir.patch peter.trommler@ohm-hochschule.de -- Include version number in package documentation dir. -Patch10: version-docdirs.patch +Patch9: fix-library-dir.patch -Requires: rpm BuildRequires: xz +Requires: rpm %if %{undefined without_hscolour} Requires: hscolour %endif @@ -70,7 +69,6 @@ Requires: %{name} = %{version}-%{release} Extra macros used for subpackaging of Haskell libraries, for example in ghc and haskell-platform. - %package -n ghc-srpm-macros Summary: RPM macros for building Haskell source packages Group: Development/Libraries/Other @@ -82,15 +80,14 @@ BuildArch: noarch Macros used when generating source Haskell rpm packages. %prep -%setup -q +%setup -q -n %{name}-%{version} %patch1 -p1 -b .debug %patch2 -p1 %patch3 -p1 %patch4 -p1 -%patch7 -p1 +%patch5 -p1 %patch8 -p1 %patch9 -p1 -%patch10 -p1 %build echo no build stage needed @@ -111,8 +108,8 @@ install -p -D -m 0755 cabal-tweak-flag %{buildroot}/%{_bindir}/cabal-tweak-flag %dir %{_prefix}/lib/rpm %dir %{_prefix}/lib/rpm/fileattrs %endif -%{_prefix}/lib/rpm/fileattrs/ghc.attr %{_prefix}/lib/rpm/ghc-deps.sh +%{_prefix}/lib/rpm/fileattrs/ghc.attr %{_bindir}/cabal-tweak-dep-ver %{_bindir}/cabal-tweak-flag diff --git a/ldflags.patch b/remove-flags.patch similarity index 56% rename from ldflags.patch rename to remove-flags.patch index 8af41ac..17e8607 100644 --- a/ldflags.patch +++ b/remove-flags.patch @@ -1,14 +1,14 @@ -Index: ghc-rpm-macros-1.3.91/macros.ghc +Index: ghc-rpm-macros-1.4.93/macros.ghc =================================================================== ---- ghc-rpm-macros-1.3.91.orig/macros.ghc -+++ ghc-rpm-macros-1.3.91/macros.ghc -@@ -24,9 +24,7 @@ fi - # configure +--- ghc-rpm-macros-1.4.93.orig/macros.ghc ++++ ghc-rpm-macros-1.4.93/macros.ghc +@@ -26,9 +26,7 @@ fi %cabal_configure\ %ghc_check_bootstrap\ + %global _hardened_ldflags %{nil}\ -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=%{ghc_pkgdocdir} --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 diff --git a/suse-disable-debug-packages.patch b/suse-disable-debug-packages.patch index 5c8d47f..7ef9f02 100644 --- a/suse-disable-debug-packages.patch +++ b/suse-disable-debug-packages.patch @@ -1,7 +1,8 @@ -Index: ghc-rpm-macros-1.3.91/macros.ghc ---- ghc-rpm-macros-1.3.91.orig/macros.ghc -+++ ghc-rpm-macros-1.3.91/macros.ghc -@@ -157,3 +157,13 @@ done\ +Index: ghc-rpm-macros-1.4.93/macros.ghc +=================================================================== +--- ghc-rpm-macros-1.4.93.orig/macros.ghc ++++ ghc-rpm-macros-1.4.93/macros.ghc +@@ -186,3 +186,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 d96b867..dd65f79 100644 --- a/suse-docdir.patch +++ b/suse-docdir.patch @@ -1,8 +1,8 @@ -Index: ghc-rpm-macros-1.3.91/macros.ghc +Index: ghc-rpm-macros-1.4.93/macros.ghc =================================================================== ---- ghc-rpm-macros-1.3.91.orig/macros.ghc -+++ ghc-rpm-macros-1.3.91/macros.ghc -@@ -18,6 +18,9 @@ proceeding, to avoid dependency ABI brea +--- ghc-rpm-macros-1.4.93.orig/macros.ghc ++++ ghc-rpm-macros-1.4.93/macros.ghc +@@ -19,6 +19,9 @@ proceeding, to avoid dependency ABI brea %endif\ fi @@ -12,12 +12,15 @@ Index: ghc-rpm-macros-1.3.91/macros.ghc # configure %cabal_configure\ %ghc_check_bootstrap\ -@@ -29,7 +32,7 @@ LDFLAGS="${LDFLAGS:-%__global_ldflags}"; - %cabal_install %cabal copy --destdir=%{buildroot} -v +@@ -40,9 +43,9 @@ tests + %ghc_pkgdocdir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} - # 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 diff --git a/version-docdirs.patch b/version-docdirs.patch deleted file mode 100644 index 42f2ba7..0000000 --- a/version-docdirs.patch +++ /dev/null @@ -1,31 +0,0 @@ -Index: ghc-rpm-macros-1.3.91/macros.ghc -=================================================================== ---- ghc-rpm-macros-1.3.91.orig/macros.ghc -+++ ghc-rpm-macros-1.3.91/macros.ghc -@@ -34,7 +34,7 @@ fi - # libraries doc dir - %ghclibdocdir %{ghcdocbasedir}/libraries - # pkg doc dir --%ghcpkgdocdir %{ghcdocbasedir}/libraries/%{pkg_name} -+%ghcpkgdocdir %{ghcdocbasedir}/libraries/%{pkg_name}-%{version} - # top library dir - %ghclibdir %{_libdir}/ghc-%{ghc_version} - -@@ -50,7 +50,7 @@ else\ - keyname=$(echo %{pkgname} | sed -e "s/-//g" | cut -c 1-5)\ - pkgdir=$(ls -d %{buildroot}%{ghclibdir}/${keyname}_* | sed -e "s@^%{buildroot}@@")\ - fi\ --%define docdir %{ghclibdocdir}/%{pkgname}\ -+%define docdir %{ghclibdocdir}/%{pkgnamever}\ - rm -f %{basepkg}.files %{basepkg}-devel.files\ - if [ -d "%{buildroot}${pkgdir}" ]; then\ - echo "%dir ${pkgdir}" >> %{basepkg}.files\ -@@ -93,7 +93,7 @@ install -D --mode=0644 %{pkgnamever}.con - - # ghc_lib_build_without_haddock [name] [version] - %ghc_lib_build_without_haddock()\ --%cabal_configure %{!?without_prof:-p} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ -+%cabal_configure %{!?without_prof:-p} %{?ghc_without_shared:--disable-shared} %{?pkg_name:--htmldir=%{ghclibdocdir}/%{pkg_name}-%{version}} %{?1:--docdir=%{_docdir}/ghc-%1%{!?fedora:-%2} --htmldir=%{ghclibdocdir}/%1-%2} %{!?1:--global} %{?ghc_with_lib_for_ghci:--enable-library-for-ghci}\ - %cabal build\ - %{nil} -