1
0

Accepting request 259868 from devel:languages:haskell

1

OBS-URL: https://build.opensuse.org/request/show/259868
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ghc-rpm-macros?expand=0&rev=16
This commit is contained in:
Stephan Kulow 2014-11-06 15:50:29 +00:00 committed by Git OBS Bridge
commit b3c88875e5
11 changed files with 73 additions and 83 deletions

View File

@ -1,8 +1,8 @@
Index: ghc-rpm-macros-48199c851a2c672494e295b3cbfc4eded20c3a11/ghc-rpm-macros.ghc-extra Index: ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7/macros.ghc-extra
=================================================================== ===================================================================
--- ghc-rpm-macros-48199c851a2c672494e295b3cbfc4eded20c3a11.orig/ghc-rpm-macros.ghc-extra --- ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7.orig/macros.ghc-extra
+++ ghc-rpm-macros-48199c851a2c672494e295b3cbfc4eded20c3a11/ghc-rpm-macros.ghc-extra +++ ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7/macros.ghc-extra
@@ -9,6 +9,7 @@ @@ -8,6 +8,7 @@
%define basepkg ghc-%{pkgname}\ %define basepkg ghc-%{pkgname}\
%package -n %{basepkg}\ %package -n %{basepkg}\
Summary: Haskell %{pkgname} library\ Summary: Haskell %{pkgname} library\
@ -10,7 +10,7 @@ Index: ghc-rpm-macros-48199c851a2c672494e295b3cbfc4eded20c3a11/ghc-rpm-macros.gh
%{?1:Version: %{pkgver}}\ %{?1:Version: %{pkgver}}\
%{-l:License: %{-l*}}\ %{-l:License: %{-l*}}\
Url: http://hackage.haskell.org/package/%{pkgname}\ Url: http://hackage.haskell.org/package/%{pkgname}\
@@ -19,6 +20,7 @@ This package provides the Haskell %{pkgn @@ -18,6 +19,7 @@ This package provides the Haskell %{pkgn
\ \
%package -n %{basepkg}-devel\ %package -n %{basepkg}-devel\
Summary: Haskell %{pkgname} library development files\ Summary: Haskell %{pkgname} library development files\

View File

@ -1,20 +0,0 @@
Index: ghc-rpm-macros-48199c851a2c672494e295b3cbfc4eded20c3a11/ghc-rpm-macros.ghc
===================================================================
--- ghc-rpm-macros-48199c851a2c672494e295b3cbfc4eded20c3a11.orig/ghc-rpm-macros.ghc
+++ ghc-rpm-macros-48199c851a2c672494e295b3cbfc4eded20c3a11/ghc-rpm-macros.ghc
@@ -130,7 +130,6 @@ fi
%global __find_requires %{_rpmconfigdir}/ghc-deps.sh --requires %{buildroot}%{ghclibdir}\
%cabal_install\
%{!?1:%ghc_strip_dynlinked}\
-%{!?1:%ghc_clear_execstack}\
%{nil}
# ghc_lib_install [name] [version]
@@ -142,7 +141,6 @@ fi
%cabal_pkg_conf\
%ghc_gen_filelists\
%{!?1:%ghc_strip_dynlinked}\
-%{!?1:%ghc_clear_execstack}\
%{nil}
# ghc_fix_dynamic_rpath prog ...

View File

@ -1,8 +1,8 @@
Index: ghc-rpm-macros-48199c851a2c672494e295b3cbfc4eded20c3a11/ghc-rpm-macros.ghc-extra Index: ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7/macros.ghc-extra
=================================================================== ===================================================================
--- ghc-rpm-macros-48199c851a2c672494e295b3cbfc4eded20c3a11.orig/ghc-rpm-macros.ghc-extra --- ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7.orig/macros.ghc-extra
+++ ghc-rpm-macros-48199c851a2c672494e295b3cbfc4eded20c3a11/ghc-rpm-macros.ghc-extra +++ ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7/macros.ghc-extra
@@ -40,8 +40,10 @@ This package provides the Haskell %{pkgn @@ -39,8 +39,10 @@ This package provides the Haskell %{pkgn
%ghc_pkg_recache\ %ghc_pkg_recache\
\ \
%files -n %{basepkg} -f %{basepkg}.files\ %files -n %{basepkg} -f %{basepkg}.files\

View File

@ -1,7 +1,7 @@
Index: ghc-rpm-macros-master/ghc-rpm-macros.ghc Index: ghc-rpm-macros-master/macros.ghc
=================================================================== ===================================================================
--- ghc-rpm-macros-master.orig/ghc-rpm-macros.ghc --- ghc-rpm-macros-master.orig/macros.ghc
+++ ghc-rpm-macros-master/ghc-rpm-macros.ghc +++ ghc-rpm-macros-master/macros.ghc
@@ -48,7 +48,7 @@ fi @@ -48,7 +48,7 @@ fi
%define docdir %{ghclibdocdir}/%{pkgname}\ %define docdir %{ghclibdocdir}/%{pkgname}\
rm -f %{basepkg}.files %{basepkg}-devel.files\ rm -f %{basepkg}.files %{basepkg}-devel.files\

13
fix-runpath.patch Normal file
View File

@ -0,0 +1,13 @@
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")\

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b5413cfb813942151578e7acc4ef45cb38cd3bf8e13fc4a7c1edf0a6ef513ec4
size 22600

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5dcdd3d5176f5b3315f3c781118eaa8e0af82259962ee26d2eb3b9b752b87d3e
size 22268

View File

@ -1,3 +1,24 @@
-------------------------------------------------------------------
Tue Oct 21 15:05:27 UTC 2014 - peter.trommler@ohm-hochschule.de
- update to 1.3.6
* remove execstack workaround and prelink requirement
* improve ghc_fix_dynamic_rpath macro
* do not use -O2 optimization (out of memory failures on OBS)
- refresh patches:
* add-group.patch
* files-defattr.patch
* fix-gen-filelists.patch
* suse-disable-debug-packages.patch
* suse-docdir.patch
-drop patch disable-execstack.patch
* fixed in ghc 7.8
- add fix-runpath.patch
* starting with ghc 7.8 shared objects with RUNPATH work
* support RUNPATH as well as RPATH
- enable shared libraries and dynamic linking on ppc64 and ppc64le
* shared libraries for ppc still disabled (see haskell trac #8024)
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Sep 12 13:11:17 UTC 2014 - dmueller@suse.com Fri Sep 12 13:11:17 UTC 2014 - dmueller@suse.com

View File

@ -16,14 +16,14 @@
# #
%global git_hash 48199c851a2c672494e295b3cbfc4eded20c3a11 %global git_hash 2da26f9db56515862de9839f12a17be5f2ed2eb7
%global macros_dir %{_sysconfdir}/rpm %global macros_dir %{_sysconfdir}/rpm
%global without_hscolour 1 %global without_hscolour 1
Name: ghc-rpm-macros Name: ghc-rpm-macros
Version: 1.2.7 Version: 1.3.6
Release: 0 Release: 0
Summary: RPM Macros for building packages for GHC Summary: RPM Macros for building packages for GHC
License: GPL-3.0+ License: GPL-3.0+
@ -43,17 +43,12 @@ Patch3: files-defattr.patch
Patch4: suse-docdir.patch Patch4: suse-docdir.patch
# PATCH-FIX_UPSTREAM fix-gen-filelists.patch # PATCH-FIX_UPSTREAM fix-gen-filelists.patch
Patch5: fix-gen-filelists.patch Patch5: fix-gen-filelists.patch
# PATCH-FIX-OPENSUSE disable-execstack.patch peter.trommler@ohm-hochschule.de -- disable execstack workaround # 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.
Patch6: disable-execstack.patch Patch7: fix-runpath.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 # 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 Patch100: sle-sp1-rpmdeps.patch
BuildRequires: xz BuildRequires: xz
Requires: ghc-srpm-macros = %{version}-%{release}
%ifnarch ppc64le aarch64 %arm
# for execstack
Requires: prelink
%endif
Requires: rpm Requires: rpm
%if %{undefined without_hscolour} %if %{undefined without_hscolour}
Requires: hscolour Requires: hscolour
@ -99,10 +94,7 @@ Macros used when generating source Haskell rpm packages.
%patch3 -p1 %patch3 -p1
%patch4 -p1 %patch4 -p1
%patch5 -p1 %patch5 -p1
# remove when prelink is available on any of those architectures %patch7 -p1
%ifarch ppc64le aarch64 %arm
%patch6 -p1
%endif
%if 0%{?sles_version} %if 0%{?sles_version}
%patch -P 100 -p1 %patch -P 100 -p1
%endif %endif
@ -111,16 +103,17 @@ Macros used when generating source Haskell rpm packages.
echo no build stage needed echo no build stage needed
%install %install
install -p -D -m 0644 ./ghc-rpm-macros.ghc %{buildroot}%{macros_dir}/macros.ghc install -p -D -m 0644 macros.ghc %{buildroot}%{macros_dir}/macros.ghc
install -p -D -m 0644 ./ghc-rpm-macros.ghc-extra %{buildroot}/%{macros_dir}/macros.ghc-extra 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 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 0755 cabal-tweak-dep-ver %{buildroot}/%{_bindir}/cabal-tweak-dep-ver 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 install -p -D -m 0755 cabal-tweak-flag %{buildroot}/%{_bindir}/cabal-tweak-flag
install -p -D -m 0644 ghc-rpm-macros.ghc-srpm %{buildroot}/%{macros_dir}/macros.ghc-srpm
# this is why this package is now arch-dependent: # this is why this package is (still) arch-dependent:
# turn off shared libs and dynamic linking on secondary archs # turn off shared libs and dynamic linking on ppc
%ifnarch %{ix86} x86_64 # See Haskell trac #8024
%ifarch ppc
cat >> %{buildroot}%{macros_dir}/macros.ghc <<EOF cat >> %{buildroot}%{macros_dir}/macros.ghc <<EOF
# shared libraries are only supported on primary intel archs # shared libraries are only supported on primary intel archs
@ -133,6 +126,7 @@ EOF
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc COPYING AUTHORS %doc COPYING AUTHORS
%config %{macros_dir}/macros.ghc %config %{macros_dir}/macros.ghc
%{_prefix}/lib/rpm/fileattrs/ghc.attr
%{_prefix}/lib/rpm/ghc-deps.sh %{_prefix}/lib/rpm/ghc-deps.sh
%{_bindir}/cabal-tweak-dep-ver %{_bindir}/cabal-tweak-dep-ver
%{_bindir}/cabal-tweak-flag %{_bindir}/cabal-tweak-flag
@ -141,8 +135,4 @@ EOF
%defattr(-,root,root,-) %defattr(-,root,root,-)
%config %{macros_dir}/macros.ghc-extra %config %{macros_dir}/macros.ghc-extra
%files -n ghc-srpm-macros
%defattr(-,root,root,-)
%config %{macros_dir}/macros.ghc-srpm
%changelog %changelog

View File

@ -1,11 +1,12 @@
Index: ghc-rpm-macros-master/ghc-rpm-macros.ghc Index: ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7/macros.ghc
=================================================================== ===================================================================
--- ghc-rpm-macros-master.orig/ghc-rpm-macros.ghc --- ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7.orig/macros.ghc
+++ ghc-rpm-macros-master/ghc-rpm-macros.ghc +++ ghc-rpm-macros-2da26f9db56515862de9839f12a17be5f2ed2eb7/macros.ghc
@@ -78,15 +78,25 @@ done\ @@ -150,3 +150,13 @@ done\
install -D --mode=0644 %{pkgnamever}.conf %{buildroot}%{ghclibdir}/package.conf.d/%{pkgnamever}.conf\ %global without_prof 1\
%{nil} %global without_haddock 1\
%global without_manual 1
+
+# ghc_suse_disable_debug_packages +# ghc_suse_disable_debug_packages
+%ghc_suse_disable_debug_packages\ +%ghc_suse_disable_debug_packages\
+%global debug_package %{nil}\ +%global debug_package %{nil}\
@ -15,18 +16,3 @@ Index: ghc-rpm-macros-master/ghc-rpm-macros.ghc
+mkdir -p %{buildroot}/usr/lib/debug\ +mkdir -p %{buildroot}/usr/lib/debug\
+echo "/usr/src/debug" > debugsources.list\ +echo "/usr/src/debug" > debugsources.list\
+mkdir -p %{buildroot}/usr/src/debug +mkdir -p %{buildroot}/usr/src/debug
+
# ghc_bin_build
%ghc_bin_build\
-%global debug_package %{nil}\
+%ghc_suse_disable_debug_packages\
%cabal_configure\
%cabal build
# ghc_lib_build_without_haddock [name] [version]
%ghc_lib_build_without_haddock()\
-%global debug_package %{nil}\
+%ghc_suse_disable_debug_packages\
%cabal_configure %{!?without_prof:-p} %{!?ghc_without_shared:--enable-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} --ghc-option=-O2\
%cabal build\
%{nil}

View File

@ -1,7 +1,7 @@
Index: ghc-rpm-macros-4d2eb25803c01c46ee84cd7f30f1bc5fb4efba52/ghc-rpm-macros.ghc Index: ghc-rpm-macros-4d2eb25803c01c46ee84cd7f30f1bc5fb4efba52/macros.ghc
=================================================================== ===================================================================
--- ghc-rpm-macros-4d2eb25803c01c46ee84cd7f30f1bc5fb4efba52.orig/ghc-rpm-macros.ghc --- ghc-rpm-macros-4d2eb25803c01c46ee84cd7f30f1bc5fb4efba52.orig/macros.ghc
+++ ghc-rpm-macros-4d2eb25803c01c46ee84cd7f30f1bc5fb4efba52/ghc-rpm-macros.ghc +++ ghc-rpm-macros-4d2eb25803c01c46ee84cd7f30f1bc5fb4efba52/macros.ghc
@@ -18,6 +18,9 @@ proceeding, to avoid dependency ABI brea @@ -18,6 +18,9 @@ proceeding, to avoid dependency ABI brea
%endif\ %endif\
fi fi