File uae.spec of Package uae

# Packmangroup: Other
# Packmanpackagename: uae
# Packman: Manfred Tremmel
# Packmanpackagedesc: <p>This is a version of UAE, the Ubiquitous Amiga Emulator, with an emulation core based on WinUAE 0.8.27. It attempts to bring many of the great features of WinUAE to non-Windows platforms.</p>
# Packmanpackagedesc_de: <p>Dies ist eine Version von UAE, the Ubiquitous Amiga Emulator, basierend auf der Basis von WinUAE 0.8.27. Es versucht die vielen grossartigen Features der WinUAE-Version auch f&uuml;r nicht-Windows Plattformen zur Verf&uuml;gung zu stellen.</p>

#
# spec file for package uae (Version 0.8.29)
#

Name:           uae
Summary:        A Commodore Amiga emulator
Summary(de):    Ein Commodore Amiga Emulator
License:        GPL-2.0-only
Group:          System/Emulators/Other
URL:            http://www.rcdrummond.net/uae/
Version:        0.8.29
Release:        5.pm.5.5

Source0:        e-uae-0.8.29-20080820.tar.bz2
Source1:        uae
Source2:        uae.desktop
Source3:        uae_64x64.png

Source10:       picasso96.c
Source11:       picasso96.h
Source12:       p96_blit.c
Source13:       statusline.h

Patch0:         defaults.patch
Patch1:         bsdsocket.patch
Patch2:         e-uae-rpmlint.patch
Patch3:         fix_gtk_segfaults.diff
Patch4:         fix_build_with_glibc2.26.patch
# https://eab.abime.net/showthread.php?t=97263
Patch5:         e-uae-AGA_HAM6.patch
# https://gitlab.com/heikkiorsila/xdms/-/merge_requests/1
Patch6:         xdms-Patch-for-gcc-10.patch
Patch7:         fix-filesystime.patch
Patch8:         xxx.patch
#Vendor:         Packman
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  pkgconfig(atk)
BuildRequires:  fontconfig-devel
BuildRequires:  freetype2-devel
BuildRequires:  glib2-devel
BuildRequires:  glibc-devel
BuildRequires:  gtk2
BuildRequires:  gtk2-devel
BuildRequires:  libpng-devel
BuildRequires:  update-desktop-files
BuildRequires:  pango-devel
BuildRequires:  SDL-devel
#BuildRequires:  xorg-x11-libxkbfile-devel
BuildRequires:  libipf-devel
BuildRequires:  alsa-devel
Autoreqprov:    on

%description
This is a version of UAE, the Ubiquitous Amiga Emulator, with an
emulation core based on WinUAE 0.8.29. It attempts to bring many of
the great features of WinUAE to non-Windows platforms.

%description -l de
Dies ist eine Version von UAE, the Ubiquitous Amiga Emulator, basierend
auf der Basis von WinUAE 0.8.29. Es versucht die vielen grossartigen
Features der WinUAE-Version auch für nicht-Windows Plattformen zur
Verfügung zu stellen.

%prep
%setup -q -n e-uae-0.8.29-20080820
%patch0
%patch1
%patch2
%patch3 -p1
%if 0%{?suse_version} > 1320
%patch4 -p1
%endif
%patch5
%patch6 -p1
%patch7 -p1
cp %{S:1} docs/

sed -i '/init_extended_traps ();/i #ifdef PICASSO96\n#define RTAREA_RTG 0x3000\n	uaegfx_install_code (RTAREA_BASE + RTAREA_RTG);\n#endif\n' src/autoconf.c
cp %{S:10} src/
cp %{S:11} src/include/
cp %{S:12} src/
cp %{S:13} src/include/
%patch8 -p1
sed -i 's/picasso_refresh (1);/picasso_refresh ();/' src/drawing.c

%build
%define _lto_cflags %{nil}
CFLAGS="${RPM_OPT_FLAGS} -Wno-unused -fcommon -DPICASSO96" ./configure --prefix=/usr \
  --enable-cdtv --enable-cd32 --enable-scsi-device \
  --enable-bsdsock --with-sdl --with-alsa --with-sdl-gfx --with-sdl-gl
#%{__make} %{?jobs:-j%{jobs}} all
%{__make} -j1 all

%install
cd src
%{__install} -m 755 -d %{buildroot}%{_bindir}
%{__install} -m 755 -d %{buildroot}%{_libdir}/uae
%{__install} -m 755 -d %{buildroot}%{_datadir}/pixmaps
%{__install} -m 755 uae %{buildroot}%{_bindir}/
%{__install} -m 755 readdisk %{buildroot}%{_libdir}/uae
cd -

#
# for ROM images
%{__install} -d %{buildroot}%{_libdir}/ei
%{__install} -m 644 %{S:1} %{buildroot}%{_libdir}/ei/uae
#
# menu entry
%{__mkdir_p} %{buildroot}%{_datadir}/applications/
%{__install} -m 644 %{S:2} %{buildroot}%{_datadir}/applications/uae.desktop
%suse_update_desktop_file -i %name System Emulator
#
# Icons
rm -f %{buildroot}%{_datadir}/pixmaps/uae
%{__install} -m 644 %{S:3} %{buildroot}%{_datadir}/pixmaps/uae.png
#
# docs fixed
sed -i 's/\r//' amiga/source/uae-configuration.c
chmod 644 amiga/source/*

%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}

%files
%defattr(-, root, root)
%doc docs/* COPYING src/ChangeLog amiga
%{_libdir}/uae
%{_libdir}/ei
%{_datadir}/applications/*
%attr(755,root,root) %{_bindir}/uae
%{_datadir}/pixmaps/uae.png

%changelog
* Sun Jan 29 2023 Wolfgang Bauer <wbauer@tmo.at>
- Add fix-filesystime.patch to fix conversion between Amiga time and UNIX time
  when setting file dates on directory hard drives
* Thu Jan 19 2023 Wolfgang Bauer <wbauer@tmo.at>
- Replace atk-devel with pkgconfig(atk) to fix build on Tumbleweed
* Fri Oct 08 2020 Wolfgang Bauer <wbauer@tmo.at>
- Add xdms-Patch-for-gcc-10.patch and add "-fcommon" to the compiler flags
  to fix build with GCC10
* Sat May 04 2019 Wolfgang Bauer <wbauer@tmo.at>
- Add e-uae-AGA_HAM6.patch to fix color values in AGA HAM6
* Sat Sep 09 2017 Wolfgang Bauer <wbauer@tmo.at>
- Add fix_build_with_glibc2.26.patch to fix JIT build on Tumbleweed
* Fri Feb 03 2017 Wolfgang Bauer <wbauer@tmo.at>
- disable parallel build to hopefully fix random build errors on Tumbleweed
* Mon Oct 21 2013 Wolfgang Bauer <wbauer@tmo.at>
- add alsa-devel BuildRequires to fix build for 13.1
* Thu Oct 11 2012 Wolfgang Bauer <wbauer@tmo.at>
- fix gtk gui segfaults on 64bit systems
* Wed Apr 13 2011 Wolfgang Bauer <wbauer@tmo.at>
- use ALSA for sound
* Thu Apr 07 2011 Wolfgang Bauer <wbauer@tmo.at>
- enable ipf support
* Tue Apr 05 2011 Wolfgang Bauer <wbauer@tmo.at>
- update to test version from 20080820
- adapt patches
* Wed Sep 23 2009 Manfred Tremmel <Manfred.Tremmel@iiv.de> - 0.8.29-4.pm.2
- another little change for openSUSE 11.2
* Tue Sep 08 2009 Manfred Tremmel <Manfred.Tremmel@iiv.de> - 0.8.29-4.pm.1
- cleanups where rpmlint wasn't so happy
* Thu Sep 22 2005 Manfred Tremmel <Manfred.Tremmel@iiv.de>
- update to 0.8.28
* Sat Sep 10 2005 Manfred Tremmel <Manfred.Tremmel@iiv.de>
- update to 0.8.28 RC2
* Sat Jan 08 2005 Manfred Tremmel <Manfred.Tremmel@iiv.de>
- update to 0.8.27 final
- cleanups in the spec-file
* Wed Oct 27 2004 Manfred Tremmel <Manfred.Tremmel@iiv.de>
- update to 0.8.27rc2
* Mon Oct 18 2004 Manfred Tremmel <Manfred.Tremmel@iiv.de>
- Initial version
openSUSE Build Service is sponsored by