File pearpc.spec of Package pearpc
#
# spec file for package pearpc
#
# Copyright (c) 2022 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/
#
Name: pearpc
Version: 0.5
Release: 0
Summary: PowerPC platform emulator
License: GPL-2.0-only
Group: System/Emulators/Other
URL: https://pearpc.sourceforge.net/
Source: https://jztkft.dl.sourceforge.net/project/pearpc/pearpc/0.5.0/pearpc-0.5.tar.bz2
# PATCH-FIX-UPSTREAM pearpc-fix-no-return-in-nonvoid-function.patch sf#3405935 malcolmlewis@opensuse.org -- Fix no return build errors.
Patch0: pearpc-fix-no-return-in-nonvoid-function.patch
# PATCH-FIX-UPSTREAM pearpc-fix-ambiguates-old-declaration.patch sf#3406591 malcolmlewis@opensuse.org -- Fix ambiguates old declaration error.
Patch1: pearpc-fix-ambiguates-old-declaration.patch
BuildRequires: SDL-devel
BuildRequires: gcc-c++
%description
PearPC is an architecture-independent PowerPC platform emulator capable
of running most PowerPC operating systems.
%prep
%setup -q
%patch0
%patch1
%build
export CFLAGS="%{optflags} -fno-strict-aliasing -fPIE"
export CXXFLAGS="%{optflags} -fno-strict-aliasing -std=gnu++98 -fPIE"
# FIXME The binary declares the stack as executable.
# See https://sourceforge.net/tracker/?func=detail&aid=3405933&group_id=108675&atid=651195
export LDFLAGS="$LDFLAGS -Wl,-z -Wl,noexecstack,-pie"
%configure \
--prefix=%{_prefix} \
--enable-cpu=generic \
--enable-ui=sdl \
--mandir=%{_mandir}
%make_build
%install
%make_install
#FIXME Free Software Foundation address incorrect in COPYING
# See https://sourceforge.net/tracker/?func=detail&aid=3405932&group_id=108675&atid=651195
%files
%license COPYING
%doc video.x ppccfg.example AUTHORS ChangeLog README TODO
%{_bindir}/ppc
%{_mandir}/man1/*
%changelog