Ondřej Súkup 2023-12-11 11:37:25 +00:00 committed by Git OBS Bridge
commit fc5783d651
12 changed files with 498 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

31
LICENSE Normal file
View File

@ -0,0 +1,31 @@
The Glasgow Haskell Compiler License
Copyright 2002, The University Court of the University of Glasgow.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
- Neither name of the University nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY COURT OF THE UNIVERSITY OF
GLASGOW AND THE CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
UNIVERSITY COURT OF THE UNIVERSITY OF GLASGOW OR THE CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

17
README.openSUSE Normal file
View File

@ -0,0 +1,17 @@
Generating binary distributions for ghc bootstrap in Factory
============================================================
1. Download source distribution from http://www.haskell.org/ghc/download
2. If necessary, apply patches for openSUSE
* https://build.opensuse.org/package/show/devel:languages:haskell:bootstrap/ghc-prepare-binary-distributions
3. Build binary distribution `make binary-dist`
4. Download rpms from:
* https://build.opensuse.org/package/binaries/devel:languages:haskell:bootstrap/ghc-prepare-binary-distributions?repository=openSUSE_Factory_PowerPC_standard
* https://build.opensuse.org/package/binaries/devel:languages:haskell:bootstrap/ghc-prepare-binary-distributions?repository=openSUSE_Factory_zSystems
5. Extract tarball `rpm2cpio ghc-prepare-binary-distributions*.rpm | cpio -idmv`
6. Copy tarball to project devel:languages:haskell:compiler/ghc-bootstrap
Note:
=====
The i386, and x86_64 tarballs were taken from upstream.
See: https://www.haskell.org/ghc/download_ghc_8_4_3.html

7
_constraints Normal file
View File

@ -0,0 +1,7 @@
<constraints>
<hardware>
<disk>
<size unit="G">8</size>
</disk>
</hardware>
</constraints>

View File

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

View File

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

View File

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

View File

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

View File

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

261
ghc-bootstrap.changes Normal file
View File

@ -0,0 +1,261 @@
-------------------------------------------------------------------
Mon Nov 13 12:17:42 UTC 2023 - Andreas Schwab <schwab@suse.de>
- Reduce memory constraints for riscv64
-------------------------------------------------------------------
Tue Nov 7 22:37:47 UTC 2023 - Ondřej Súkup <mimi.vx@gmail.com>
- Update bootsrap compiler to ghc-9.4.4
-------------------------------------------------------------------
Sat May 27 09:53:22 UTC 2023 - Andreas Schwab <schwab@suse.de>
- Update constraints for riscv64
-------------------------------------------------------------------
Mon Apr 24 11:06:22 UTC 2023 - Andreas Schwab <schwab@suse.de>
- Update riscv64 bootstrap compiler
-------------------------------------------------------------------
Mon Apr 3 09:13:52 UTC 2023 - Ondřej Súkup <mimi.vx@gmail.com>
- update bootstrap compiler to 9.2.3 using hadrian build
-------------------------------------------------------------------
Thu Feb 2 14:27:08 UTC 2023 - Peter Simons <psimons@suse.com>
- Update bootstrap compiler to ghc-8.10.7.
-------------------------------------------------------------------
Thu Jan 19 12:39:27 UTC 2023 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- Do not require unversionned llvm since ghc needs a specific
llvm version. [boo#1207265]
-------------------------------------------------------------------
Thu Dec 1 16:43:06 UTC 2022 - Peter Simons <psimons@suse.com>
- Explictly depend on libffi8 to make sure we're getting the
correct version of the libffi shared library. [jsc#PED-1151]
-------------------------------------------------------------------
Fri Jun 24 07:13:19 UTC 2022 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- Remove dependency on binutils-gold which have been removed from
Factory
- Allow a newer llvm to be used since llvm9 has been removed from
Factory
-------------------------------------------------------------------
Fri Feb 11 08:40:15 UTC 2022 - Peter Simons <psimons@suse.com>
- Keep the release attribute next to the version.
-------------------------------------------------------------------
Tue Aug 24 14:06:42 UTC 2021 - Dominique Leuenberger <dimstar@opensuse.org>
- Do not own /opt, only content thereof.
-------------------------------------------------------------------
Sat Dec 19 18:55:21 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com>
- drop 32bit intel
-------------------------------------------------------------------
Sat Oct 3 15:57:01 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com>
- update s390x bootstrap to 8.10.2
-------------------------------------------------------------------
Sun May 31 20:51:10 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com>
- update most archs to 8.10.1
- clean-up spec
-------------------------------------------------------------------
Thu May 21 11:48:31 UTC 2020 - Peter Trommler <ptrommler@icloud.com>
- Add numa-devel requirement
* fixes ghc-bootstrap-helpers builds on ppc64, ppc64le
-------------------------------------------------------------------
Sun May 17 11:26:43 UTC 2020 - Andreas Schwab <schwab@suse.de>
- ghc-8.6.5-riscv64-unknown-linux.tar.xz: rebuilt with current libffi
-------------------------------------------------------------------
Wed May 6 14:02:54 UTC 2020 - Peter Simons <psimons@suse.com>
- Drop duplicated ix86 case from list of conditionals.
-------------------------------------------------------------------
Tue Mar 10 20:33:07 UTC 2020 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- Fix previous commit, do not require llvm6 for Tumbleweed
since it has been dropped from Factory.
-------------------------------------------------------------------
Tue Feb 4 08:50:52 UTC 2020 - Peter Trommler <ptrommler@icloud.com>
- Relax LLVM requirement on ARM and Aarch64
-------------------------------------------------------------------
Mon Jan 27 15:04:30 UTC 2020 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- Drop llvm6-devel requirement for ARM
-------------------------------------------------------------------
Wed Jan 22 22:39:11 UTC 2020 - Andreas Schwab <schwab@suse.de>
- Add support for riscv64
-------------------------------------------------------------------
Fri Jan 17 19:00:28 UTC 2020 - Peter Trommler <ptrommler@icloud.com>
- Add requires tags
* needed for ghc-bootstrap-helpers
-------------------------------------------------------------------
Wed Jan 8 23:28:25 UTC 2020 - Andreas Schwab <schwab@suse.de>
- Enable build on riscv64
-------------------------------------------------------------------
Tue Nov 26 19:02:42 UTC 2019 - Peter Trommler <ptrommler@icloud.com>
- Add RISCV bindist taken from openSUSE:Factory:RISCV64
-------------------------------------------------------------------
Mon Nov 25 19:23:46 UTC 2019 - Peter Trommler <ptrommler@icloud.com>
- Update to version 8.6.5 for GHC 8.10 bootstrap
-------------------------------------------------------------------
Thu Apr 11 18:48:41 UTC 2019 - psimons@suse.com
- Wolfgang Engel (bigironman) has kindly re-built the following
ghc-bootstrap binary archives with glibc 2.26.x to ensure
compatibility with SLE-15-SP1:
* ghc-8.4.3-aarch64-unknown-linux.tar.xz [bsc#1124940]
* ghc-8.4.3-s390x-ibm-linux.tar.xz [bsc#1130868]
-------------------------------------------------------------------
Thu Jan 10 08:56:18 UTC 2019 - ptrommler@icloud.com
- Install binary distribution in /opt
* avoid conflicts with package ghc
* fixes an issue brought up in boo#1121052
-------------------------------------------------------------------
Mon Oct 29 16:39:18 UTC 2018 - Dominique Leuenberger <dimstar@opensuse.org>
- Add this-is-only-for-build-envs Requires: this package is only
intended to bootstrap ghc in the build system, and not for usage
on end-user systems. Using the same safeguard as with other
bootstrap packages.
-------------------------------------------------------------------
Mon Oct 8 08:33:08 UTC 2018 - ptrommler@icloud.com
- update bindists to 8.4.3 for GHC 8.6.1 bootstrap
-------------------------------------------------------------------
Wed Jul 18 14:26:16 UTC 2018 - psimons@suse.com
- Cosmetic: replace tabs with blanks, strip trailing white space,
and update copyright headers with spec-cleaner.
-------------------------------------------------------------------
Sun Mar 18 10:11:25 UTC 2018 - ptrommler@icloud.com
- update to 8.2.1 on all arches
* required to bootstrap ghc 8.2.1
* drop support for ppc and s390
* add support for arm7l
* add support for registerised LLVM backend on aarch64
- update instructions to produce bindists
- remove libgmp hack, upstream bindists link against new libgmp
-------------------------------------------------------------------
Thu Feb 8 10:51:10 UTC 2018 - ptrommler@icloud.com
- don't override debug packages handling
* fixes build for Leap 15
-------------------------------------------------------------------
Sun Mar 5 15:27:59 UTC 2017 - mimi.vx@gmail.com
- added ncurses also to requires
-------------------------------------------------------------------
Sun Feb 5 19:17:30 UTC 2017 - mimi.vx@gmail.com
- explicitly depends on ncurses
-------------------------------------------------------------------
Thu May 21 18:40:43 CEST 2015 - ro@suse.de
- add 7.8.4 tarball for aarch64
-------------------------------------------------------------------
Thu May 21 12:09:20 CEST 2015 - ro@suse.de
- add 7.8.4 tarball for s390 and s390x
-------------------------------------------------------------------
Fri May 1 17:06:42 UTC 2015 - peter.trommler@ohm-hochschule.de
- add conflicts for new ghc-*-devel packages in ghc 7.8
-------------------------------------------------------------------
Wed Apr 29 09:55:28 UTC 2015 - peter.trommler@ohm-hochschule.de
- update to 7.8.3
* provide ppc64le build now
- remove duplicate files
- provides tags for ghc subpackages are no longer needed
we require ghc-bootstrap in ghc.spec
- update README.suse with note on upstream tarballs
-------------------------------------------------------------------
Fri Apr 17 13:43:27 UTC 2015 - peter.trommler@ohm-hochschule.de
- add _constraints for ppc64le
* need more disk space
-------------------------------------------------------------------
Thu Mar 26 08:24:04 UTC 2015 - peter.trommler@ohm-hochschule.de
- use official tarballs for x86 and x86_64
* fixes build on openSUSE 11.4 and SLE 11
* bootstrap ghc is built against libgmp.so.3
-------------------------------------------------------------------
Mon Sep 22 10:01:46 UTC 2014 - peter.trommler@ohm-hochschule.de
- fix typo in description
-------------------------------------------------------------------
Mon Sep 22 07:43:07 UTC 2014 - peter.trommler@ohm-hochschule.de
- add LICENSE file
-------------------------------------------------------------------
Tue Sep 16 10:59:21 UTC 2014 - peter.trommler@ohm-hochschule.de
- add conflicts tags for ghc-*-devel packages provided by
package ghc
-------------------------------------------------------------------
Mon Sep 15 16:54:51 UTC 2014 - peter.trommler@ohm-hochschule.de
- consolidate all binary dists into one tar file
* required as there is only one srpm per package for all archs
* the tar file is quite the monstrosity :-)
-------------------------------------------------------------------
Sun Sep 14 17:31:00 UTC 2014 - peter.trommler@ohm-hochschule.de
- initial packaging (version 7.6.3)

143
ghc-bootstrap.spec Normal file
View File

@ -0,0 +1,143 @@
#
# spec file for package ghc-bootstrap
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global debug_package %{nil}
%global llvm_major 14
%ifarch ppc64le
%define longarch powerpc64le
# something weird on ghc arch detection
%define arch ppc64
%endif
%ifarch s390x
%define longarch s390x
%define sysname ibm
%define arch s390x
%endif
%ifarch aarch64
%define longarch aarch64
%define arch aarch64
%endif
%ifarch x86_64
%define longarch x86_64
%define sysname unknown
%define arch x86_64
%endif
%ifarch riscv64
%define longarch riscv64
%define arch riscv64
%endif
%ifarch ppc64le aarch64 riscv64
%define sysname unknown
%endif
Name: ghc-bootstrap
Summary: Binary distributions of The Glorious Glasgow Haskell Compiler
License: BSD-3-Clause
URL: https://build.opensuse.org/package/view_file/devel:languages:haskell:bootstrap
Source1: README.openSUSE
Source2: LICENSE
Source13: ghc-9.4.4-powerpc64le-unknown-linux.tar.xz
Source14: ghc-9.4.4-x86_64-unknown-linux.tar.xz
Source16: ghc-9.4.4-s390x-ibm-linux.tar.xz
Source17: ghc-9.4.4-aarch64-unknown-linux.tar.xz
Source19: ghc-9.4.4-riscv64-unknown-linux.tar.xz
BuildRequires: chrpath
BuildRequires: fdupes
BuildRequires: gcc-PIE
BuildRequires: gcc-c++
BuildRequires: gmp-devel
BuildRequires: gmp-devel
BuildRequires: libffi8 >= 3.4.4
BuildRequires: libncurses5
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libffi)
Requires: gmp-devel
Requires: libffi8 >= 3.4.4
Requires: libncurses5
Conflicts: ghc-base
# This package is not meant to be used outside OBS
Requires: this-is-only-for-build-envs
Requires: pkgconfig(libffi)
Provides: ghc-bootstrap-devel
ExclusiveArch: ppc64le x86_64 s390x aarch64 riscv64
AutoReq: off
Version: 9.4.4
Release: 0
%ifnarch s390x
BuildRequires: libnuma-devel
%endif
%ifarch s390x riscv64
Requires: clang%{llvm_major}
Requires: llvm%{llvm_major}
%endif
%ifnarch s390x
Requires: libffi-devel
Requires: libnuma-devel
%endif
%description
This package contains a binary distribution of "The Glorious Glasgow
Haskell Compilation System". See README.openSUSE on how the tarballs
were produced.
Do not install this package! Install 'ghc' instead.
%prep
cp %{SOURCE1} .
cp %{SOURCE2} .
cp %{SOURCE13} .
cp %{SOURCE14} .
cp %{SOURCE16} .
cp %{SOURCE17} .
cp %{SOURCE19} .
%build
tar Jxf ghc-%{version}-%{longarch}-%{sysname}-linux.tar.xz
cd ghc-%{version}-%{longarch}-%{sysname}-linux
# FIXME: you should use the %%configure macro
%install
cd ghc-%{version}-%{longarch}-%{sysname}-linux
./configure --prefix=/opt
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
echo "/opt/lib/ghc-%{version}/lib/%{arch}-linux-ghc-%{version}" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/ghc.conf
%make_install
%fdupes -s %{buildroot}
for i in $(find %{buildroot} -type f -executable -exec sh -c "file {} | grep -q 'dynamically linked'" \; -print); do
chrpath -d $i
done
rm %{buildroot}/opt/lib/ghc-%{version}/lib/package.conf.d/.stamp
(cd %{buildroot}/opt/lib/ghc-%{version}/lib/package.conf.d/
for i in *.conf; do
mv $i.copy $i
done
)
%post
/sbin/ldconfig
/opt/bin/ghc-pkg recache
%postun -p /sbin/ldconfig
%files
%doc README.openSUSE
%license LICENSE
/opt/*
%config %{_sysconfdir}/ld.so.conf.d/ghc.conf
%changelog