public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sergei Trofimovich" <slyfox@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: games-emulation/zsnes/, games-emulation/zsnes/files/
Date: Tue,  4 Feb 2020 21:38:03 +0000 (UTC)	[thread overview]
Message-ID: <1580852276.965d6c11b191c4729da99cdbb87ef07a67a9250a.slyfox@gentoo> (raw)

commit:     965d6c11b191c4729da99cdbb87ef07a67a9250a
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  4 21:35:54 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Feb  4 21:37:56 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=965d6c11

games-emulation/zsnes: refetch upstream tarball

Original tarball was repackaged and includes
archopt-july-23-update.patch patch.

Reported-by: Plüss Roland
Closes: https://bugs.gentoo.org/675926
Package-Manager: Portage-2.3.87, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 games-emulation/zsnes/Manifest                     |   1 +
 .../zsnes/files/zsnes-1.51-gcc43-20071031.patch    |  39 +++++++
 games-emulation/zsnes/zsnes-1.51-r8.ebuild         | 124 +++++++++++++++++++++
 3 files changed, 164 insertions(+)

diff --git a/games-emulation/zsnes/Manifest b/games-emulation/zsnes/Manifest
index 07968a9f42d..6846bebb8ae 100644
--- a/games-emulation/zsnes/Manifest
+++ b/games-emulation/zsnes/Manifest
@@ -1 +1,2 @@
+DIST zsnes-1.51-20071031.tar.bz2 1072340 BLAKE2B d67c92e382ca130d4138d21fbb2effc06539d1c7e3aabf0339c9b7e773521daf2d3cb0bcef75991e1a4453fcc86903d3dead48d90806489c8b4bf7677f8ebf3b SHA512 b10373cf81b201a33dc60c728431d4f69d36de31fcf6f137b623ea206a2998f722dcd6132daec1d0bf14a05ae52f3ee9ecee4334517039be554db85c9f7b8274
 DIST zsnes151src.tar.bz2 1071712 BLAKE2B e942c699bd227942563deb23b105339aa9ffd8a5623200ca142a777508b4ebaf47859170016490f53a3af2bfb15293c17a99a7658e1f3f0afd7df8cd63200b9a SHA512 2cec9ad7762fc7a257c6b1d3e190b0ed53565dbafe42e1dee9eb182644392b7dd2c57faa846f63cd30ac079e5c05354d26ce0612d20481a1f54d760d62d95353

diff --git a/games-emulation/zsnes/files/zsnes-1.51-gcc43-20071031.patch b/games-emulation/zsnes/files/zsnes-1.51-gcc43-20071031.patch
new file mode 100644
index 00000000000..59fbb8fdbf1
--- /dev/null
+++ b/games-emulation/zsnes/files/zsnes-1.51-gcc43-20071031.patch
@@ -0,0 +1,39 @@
+--- src/parsegen.cpp
++++ src/parsegen.cpp
+@@ -31,6 +31,7 @@
+ #include <sstream>
+ #include <set>
+ #include <stack>
++#include <cstring>
+ using namespace std;
+ 
+ #include <errno.h>
+--- src/tools/depbuild.cpp
++++ src/tools/depbuild.cpp
+@@ -24,6 +24,7 @@
+ #include <iostream>
+ #include <string>
+ #include <cstdio>
++#include <cstdlib>
+ using namespace std;
+ 
+ #include "fileutil.h"
+@@ -183,7 +184,7 @@
+   }
+ }
+ 
+-int main(size_t argc, const char *const *const argv)
++int main(int argc, const char *const *const argv)
+ {
+   if (argc < 5)
+   {
+--- src/tools/strutil.h
++++ src/tools/strutil.h
+@@ -25,6 +25,7 @@
+ #include <string>
+ #include <vector>
+ #include <cctype>
++#include <cstring>
+ 
+ struct ci_char_traits : public std::char_traits<char>
+ {

diff --git a/games-emulation/zsnes/zsnes-1.51-r8.ebuild b/games-emulation/zsnes/zsnes-1.51-r8.ebuild
new file mode 100644
index 00000000000..1139717f6e2
--- /dev/null
+++ b/games-emulation/zsnes/zsnes-1.51-r8.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools desktop flag-o-matic toolchain-funcs pax-utils
+
+DESCRIPTION="SNES (Super Nintendo) emulator that uses x86 assembly"
+HOMEPAGE="http://www.zsnes.com/ http://ipherswipsite.com/zsnes/"
+SRC_URI="mirror://sourceforge/zsnes/${PN}${PV//./}src.tar.bz2 -> ${P}-20071031.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="ao custom-cflags +debug opengl png"
+
+RDEPEND="
+	media-libs/libsdl[sound,video,abi_x86_32(-)]
+	>=sys-libs/zlib-1.2.3-r1[abi_x86_32(-)]
+	ao? ( media-libs/libao[abi_x86_32(-)] )
+	debug? ( sys-libs/ncurses:0=[abi_x86_32(-)] )
+	opengl? ( virtual/opengl[abi_x86_32(-)] )
+	png? ( media-libs/libpng:0=[abi_x86_32(-)] )
+"
+DEPEND="${RDEPEND}
+	dev-lang/nasm
+	debug? ( virtual/pkgconfig )
+"
+
+S="${WORKDIR}/${PN}_${PV//./_}/src"
+
+PATCHES=(
+	# Fixing compilation without libpng installed
+	"${FILESDIR}"/${P}-libpng.patch
+
+	# Fix bug #186111
+	# Fix bug #214697
+	# Fix bug #170108
+	# Fix bug #260247
+	"${FILESDIR}"/${P}-gcc43-20071031.patch
+	"${FILESDIR}"/${P}-libao-thread.patch
+	"${FILESDIR}"/${P}-depbuild.patch
+	"${FILESDIR}"/${P}-CC-quotes.patch
+
+	# Fix compability with libpng15 wrt #378735
+	"${FILESDIR}"/${P}-libpng15.patch
+
+	# Fix buffer overwrite #257963
+	"${FILESDIR}"/${P}-buffer.patch
+	# Fix gcc47 compile #419635
+	"${FILESDIR}"/${P}-gcc47.patch
+	# Fix stack alignment issue #503138
+	"${FILESDIR}"/${P}-stack-align-v2.patch
+
+	"${FILESDIR}"/${P}-cross-compile.patch
+	"${FILESDIR}"/${P}-arch.patch
+
+	"${FILESDIR}"/${P}-gcc-10.patch
+)
+
+src_prepare() {
+	default
+
+	# The sdl detection logic uses AC_PROG_PATH instead of
+	# AC_PROG_TOOL, so force the var to get set the way we
+	# need for things to work correctly.
+	tc-is-cross-compiler && export ac_cv_path_SDL_CONFIG=${CHOST}-sdl-config
+
+	sed -i -e '67i#define OF(x) x' zip/zunzip.h || die
+
+	# Remove hardcoded CFLAGS and LDFLAGS
+	sed -i \
+		-e '/^CFLAGS=.*local/s:-pipe.*:-Wall -I.":' \
+		-e '/^LDFLAGS=.*local/d' \
+		-e '/\w*CFLAGS=.*fomit/s:-O3.*$STRIP::' \
+		-e '/lncurses/s:-lncurses:`pkg-config ncurses --libs`:' \
+		-e '/lcurses/s:-lcurses:`pkg-config ncurses --libs`:' \
+		configure.in || die
+	sed -i \
+		-e 's/configure.in/configure.ac/' \
+		Makefile.in || die
+	mv configure.in configure.ac || die
+	eautoreconf
+}
+
+src_configure() {
+	tc-export CC
+	export BUILD_CXX=$(tc-getBUILD_CXX)
+	export NFLAGS=-O1
+	use amd64 && multilib_toolchain_setup x86
+	use custom-cflags || strip-flags
+
+	append-cppflags -U_FORTIFY_SOURCE	#257963
+
+	econf \
+		$(use_enable ao libao) \
+		$(use_enable debug debugger) \
+		$(use_enable png libpng) \
+		$(use_enable opengl) \
+		--disable-debug \
+		--disable-cpucheck
+}
+
+src_compile() {
+	emake makefile.dep
+	emake
+}
+
+src_install() {
+	# Uses pic-unfriendly assembly code, bug #427104
+	QA_TEXTRELS="usr/bin/zsnes"
+
+	dobin zsnes
+	pax-mark m "${ED}${GAMES_BINDIR}"/zsnes
+
+	newman linux/zsnes.1 zsnes.6
+
+	dodoc \
+		../docs/{readme.1st,authors.txt,srcinfo.txt,stdards.txt,support.txt,thanks.txt,todo.txt,README.LINUX} \
+		../docs/readme.txt/*
+	HTML_DOCS="../docs/readme.htm/*" einstalldocs
+
+	make_desktop_entry zsnes ZSNES
+	newicon icons/48x48x32.png ${PN}.png
+}


             reply	other threads:[~2020-02-04 21:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-04 21:38 Sergei Trofimovich [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-07-30  7:37 [gentoo-commits] repo/gentoo:master commit in: games-emulation/zsnes/, games-emulation/zsnes/files/ Sergei Trofimovich
2021-05-11 22:57 Sergei Trofimovich
2021-12-22 18:15 Ionen Wolkens
2021-12-22 18:15 Ionen Wolkens
2024-07-29 20:53 James Le Cuirot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1580852276.965d6c11b191c4729da99cdbb87ef07a67a9250a.slyfox@gentoo \
    --to=slyfox@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox