added triggers calling ghc_pkg_recache macro on package.conf.d dir change [release 9.4.8-4mamba;Sat Dec 02 2023]

This commit is contained in:
Silvan Calarco 2024-01-05 22:42:53 +01:00
parent 2539b56c6d
commit 8db5cec1c6
2 changed files with 130 additions and 42 deletions

View File

@ -0,0 +1,26 @@
From 52d701b31dc4427b7e321a04be3f5f13a5fc271e Mon Sep 17 00:00:00 2001
From: "mimi.vx" <mimi.vx@gmail.com>
Date: Wed, 24 May 2023 12:42:15 +0000
Subject: [PATCH] Fix for Sphinx 7 removed style key
Fixes https://gitlab.haskell.org/ghc/ghc/-/issues/23444
---
docs/users_guide/rtd-theme/layout.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/users_guide/rtd-theme/layout.html b/docs/users_guide/rtd-theme/layout.html
index 2a61142514a..7ffeff7befc 100644
--- a/docs/users_guide/rtd-theme/layout.html
+++ b/docs/users_guide/rtd-theme/layout.html
@@ -64,7 +64,7 @@
{%- endif %}
{# CSS #}
- <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
+ <link rel="stylesheet" href="{{ pathto('_static/' + styles[-1], 1) }}" type="text/css" />
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
{%- for css in css_files %}
{%- if css|attr("rel") %}
--
GitLab

146
ghc.spec
View File

@ -1,73 +1,107 @@
%ifnarch %{ix86} %ifarch x86_64 i586 aarch64
%define bootstrap 1 %define bootstrap 1
%endif %endif
Name: ghc Name: ghc
Version: 7.6.3 Version: 9.4.8
Release: 1mamba Release: 4mamba
Summary: A compiler and interactive environment for the functional language Haskell. Summary: A compiler and interactive environment for the functional language Haskell.
Group: Applications/Development Group: Applications/Development
Vendor: openmamba Vendor: openmamba
Distribution: openmamba Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.haskell.org/ghc/ URL: https://www.haskell.org/ghc/
Source: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-src.tar.bz2 Source: https://downloads.haskell.org/ghc/%{version}/ghc-%{version}-src.tar.xz
Patch0: ghc-7.6.3-pkgdir.patch Patch0: ghc-7.6.3-pkgdir.patch
Patch1: ghc-9.4.8-sphinx-7.0.1.patch
License: BSD License: BSD
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: ghc-rpm-macros
BuildRequires: glibc-devel BuildRequires: glibc-devel
BuildRequires: libgcc BuildRequires: libffi-devel
BuildRequires: libgmp-devel BuildRequires: libgmp-devel
BuildRequires: libncurses-devel BuildRequires: libncurses-devel
BuildRequires: libnuma-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
%if "%{bootstrap}" == "1" %if "%{bootstrap}" == "1"
BuildRequires: ghc-bootstrap-compiler BuildRequires: ghc-bin
%else %else
BuildRequires: ghc BuildRequires: ghc
%endif %endif
Conflicts: ghc-bootstrap-compiler BuildRequires: alex
BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: happy
Provides: ghc-compiler
Requires: ghc-rpm-macros
Requires: %{name}-libs = %{version}-%{release}
%description %description
GHC is a state-of-the-art, open source, compiler and interactive environment for the functional language Haskell. GHC is a state-of-the-art, open source, compiler and interactive environment for the functional language Haskell.
%debug_package %package libs
Summary: Shared directories for Haskell documentation
Group: Documentation
%description libs
This package provides some common directories used for Haskell libraries documentation.
%package filesystem
Summary: Shared directories for Haskell documentation
Group: Documentation
%description filesystem
This package provides some common directories used for Haskell libraries documentation.
#% debug_package
# Don't clean build at the end
%global __spec_rmbuild_cmd /bin/true
%prep %prep
%setup -q %setup -q -D -T
#-D -T :<< _EOF
%patch0 -p1 %global __provides_exclude ^libffi.so.*$
%global __requires_exclude ^.*libHS.*|libtinfo.so.6*$
%define _use_internal_dependency_generator 0 #%patch0 -p1
%define __find_provides %{_builddir}/%{name}-%{version}/find_provides.sh %patch 1 -p1 -b .sphinx-7.0.1
cat > %{_builddir}/%{name}-%{version}/find_provides.sh <<_EOF
#! /bin/sh
%{_prefix}/lib/rpm/find-provides %{buildroot} %{_target_cpu} | \
grep -v "libffi.so"
exit 0
_EOF
chmod +x %{_builddir}/%{name}-%{version}/find_provides.sh
%define __find_requires %{_builddir}/%{name}-%{version}/find_requires.sh
cat > %{_builddir}/%{name}-%{version}/find_requires.sh <<_EOF
#! /bin/sh
%{_prefix}/lib/rpm/find-requires %{buildroot} %{_target_cpu} 2>/dev/null
exit 0
_EOF
chmod +x %{_builddir}/%{name}-%{version}/find_requires.sh
%build %build
#:<< __EOF #:<< _EOF
%if "%{bootstrap}" == "1"
export PATH="/opt/ghc/bin:$PATH"
%ifarch aarch64
# ghc-bin 9.0.2 for aarch64 requires llvm 13
export PATH="/var/autodist/clang+llvm-13.0.1-aarch64-linux-gnu/bin:$PATH"
%endif
%endif
./configure \ ./configure \
--prefix=%{_prefix} \ --prefix=%{_prefix} \
--libdir=%{_libdir} --libdir=%{_libdir}
%make # avoid "ghc: hGetContents: invalid argument (invalid byte sequence)"
#__EOF export LANG=C.utf8
%make -j1
%install %install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%if "%{bootstrap}" == "1"
export PATH="/opt/ghc/bin:$PATH"
%endif
%makeinstall %makeinstall
install -d -m0755 %{buildroot}%{ghc_html_libraries_dir}
# Triggers calling ghc-pkg recache
%transfiletriggerin -- %{ghcliblib}/package.conf.d
%ghc_pkg_recache
%end
%transfiletriggerpostun -- %{ghcliblib}/package.conf.d
%ghc_pkg_recache
%end
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@ -87,18 +121,46 @@ chmod +x %{_builddir}/%{name}-%{version}/find_requires.sh
%{_bindir}/runghc %{_bindir}/runghc
%{_bindir}/runghc-%{version} %{_bindir}/runghc-%{version}
%{_bindir}/runhaskell %{_bindir}/runhaskell
%dir %{_libdir}/ghc-%{version} %dir %{_datadir}/doc/ghc-%{version}
%{_libdir}/ghc-%{version}/* %dir %{_datadir}/doc/ghc-%{version}/html
%dir %{_datadir}/doc/ghc %{_datadir}/doc/ghc-%{version}/html/*
%dir %{_datadir}/doc/ghc/html #%{_datadir}/doc/ghc/haddock.pdf
%{_datadir}/doc/ghc/html/* #%{_datadir}/doc/ghc/haddock.ps
%{_datadir}/doc/ghc/haddock.pdf %{_datadir}/doc/ghc-%{version}/users_guide.pdf
%{_datadir}/doc/ghc/haddock.ps #%{_datadir}/doc/ghc/users_guide.ps
%{_datadir}/doc/ghc/users_guide.pdf
%{_datadir}/doc/ghc/users_guide.ps
%{_mandir}/man1/ghc.1* %{_mandir}/man1/ghc.1*
%doc LICENSE %doc LICENSE
%files libs
%defattr(-,root,root)
%dir %{_libdir}/ghc-%{version}
%{_libdir}/ghc-%{version}/*
%ghost %{ghcliblib}/package.conf.d/package.cache
%files filesystem
%defattr(-,root,root)
%dir %{_ghc_doc_dir}
%dir %{ghc_html_dir}
%dir %{ghc_html_libraries_dir}
%changelog %changelog
* Sat Dec 02 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 9.4.8-4mamba
- added triggers calling ghc_pkg_recache macro on package.conf.d dir change
* Tue Nov 14 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 9.4.8-3mamba
- added libs and filesystem subpackages; require ghc-rpm-macros and provide ghc-compiler
* Mon Nov 13 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 9.4.8-2mamba
- rebuilt with gch-rpm-marcos
* Sat Nov 11 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 9.4.8-1mamba
- update to 9.4.8
* Mon Jan 25 2016 Automatic Build System <autodist@mambasoft.it> 7.10.3-1mamba
- automatic version update by autodist
* Wed Jun 11 2014 Automatic Build System <autodist@mambasoft.it> 7.8.2-1mamba
- automatic version update by autodist
* Sat Sep 07 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 7.6.3-1mamba * Sat Sep 07 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 7.6.3-1mamba
- package created by silvan using the webbuild interface - package created by silvan using the webbuild interface