mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-05 12:26:52 +02:00
parent
2a4bff9a06
commit
6eccd22bb9
49
x11/zsnes/APKBUILD
Normal file
49
x11/zsnes/APKBUILD
Normal file
@ -0,0 +1,49 @@
|
||||
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
||||
pkgname=zsnes
|
||||
pkgver=1.51
|
||||
pkgrel=0
|
||||
pkgdesc="Super Nintendo emulator"
|
||||
url="http://www.zsnes.com/"
|
||||
license="GPL"
|
||||
makedepends="sdl-dev libpng-dev ncurses-dev mesa-dev automake autoconf nasm"
|
||||
subpackages="$pkgname-doc"
|
||||
source="http://downloads.sourceforge.net/sourceforge/$pkgname/${pkgname}151src.tar.bz2
|
||||
$pkgname.desktop
|
||||
zsnes.patch
|
||||
zsnes-1.51-CC-quotes.patch
|
||||
zsnes-1.51-depbuild.patch
|
||||
zsnes_icon.png"
|
||||
|
||||
build ()
|
||||
{
|
||||
cd "$srcdir"/${pkgname}_${pkgver%.*}_${pkgver#*.}
|
||||
patch -p1 -i ../zsnes-1.51-CC-quotes.patch || return 1
|
||||
patch -p1 -i ../zsnes-1.51-depbuild.patch || return 1
|
||||
patch -p1 -i ../zsnes.patch || return 1
|
||||
cd "$srcdir"/${pkgname}_${pkgver%.*}_${pkgver#*.}/src
|
||||
aclocal && autoconf || return 1
|
||||
export GCC_SPECS=/usr/share/gcc/hardenednopie.specs
|
||||
./configure --prefix=/usr \
|
||||
--mandir=/usr/share/man \
|
||||
x_libraries=/usr/lib \
|
||||
force_arch=i486 \
|
||||
--enable-release || return 1
|
||||
make makefile.dep
|
||||
make || return 1
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir"/${pkgname}_${pkgver%.*}_${pkgver#*.}/src
|
||||
make DESTDIR="$pkgdir" install
|
||||
install -Dm644 "$srcdir"/zsnes.desktop \
|
||||
"$pkgdir"/usr/share/applications/zsnes.desktop
|
||||
install -Dm644 "$srcdir"/zsnes_icon.png \
|
||||
"$pkgdir"/usr/share/pixmaps/zsnes_icon.png
|
||||
mv "$pkgdir"/usr/man "$pkgdir"/usr/share
|
||||
}
|
||||
md5sums="7071186bf80632ae88a153239498d8c9 zsnes151src.tar.bz2
|
||||
b100b2aa342c551167d7c5dcdcde9dd4 zsnes.desktop
|
||||
4df831b3d87a35949bcf3fd5547decb1 zsnes.patch
|
||||
69ca17611c0d4a21529a95eb37e05c2f zsnes-1.51-CC-quotes.patch
|
||||
994af091cbb8f17f82d78c0ca89ac549 zsnes-1.51-depbuild.patch
|
||||
b5260c02adfc3b7ff725041214b00bfd zsnes_icon.png"
|
||||
20
x11/zsnes/zsnes-1.51-CC-quotes.patch
Normal file
20
x11/zsnes/zsnes-1.51-CC-quotes.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- a/src/Makefile.in.orig 2009-02-25 18:13:40.000000000 +0100
|
||||
+++ b/src/Makefile.in 2009-02-25 18:13:16.000000000 +0100
|
||||
@@ -95,7 +95,7 @@
|
||||
%.o: %.cpp
|
||||
@CXX@ @CXXFLAGS@ -o $@ -c $<
|
||||
%.o %.h: %.psr $(PSR)
|
||||
- ./$(PSR) @PSRFLAGS@ -gcc @CC@ -compile -flags "@CFLAGS@ -O1" -cheader $*.h -fname $* $*.o $<
|
||||
+ ./$(PSR) @PSRFLAGS@ -gcc "@CC@" -compile -flags "@CFLAGS@ -O1" -cheader $*.h -fname $* $*.o $<
|
||||
|
||||
default: main
|
||||
all: main tools--- zsnes_1_51/src/Makefile.in.orig 2009-02-25 18:02:07.000000000 +0100
|
||||
@@ -133,7 +133,7 @@
|
||||
|
||||
include makefile.dep
|
||||
makefile.dep: $(TOOL_D)/depbuild Makefile
|
||||
- $(TOOL_D)/depbuild @CC@ "@CFLAGS@" @NASMPATH@ "@NFLAGS@" $(Z_OBJS) > makefile.dep
|
||||
+ $(TOOL_D)/depbuild "@CC@" "@CFLAGS@" @NASMPATH@ "@NFLAGS@" $(Z_OBJS) > makefile.dep
|
||||
|
||||
Makefile: Makefile.in config.status
|
||||
./config.status
|
||||
34
x11/zsnes/zsnes-1.51-depbuild.patch
Normal file
34
x11/zsnes/zsnes-1.51-depbuild.patch
Normal file
@ -0,0 +1,34 @@
|
||||
--- a/src/tools/depbuild.cpp Fri Nov 13 18:41:24 2009
|
||||
+++ b/src/tools/depbuild.cpp Fri Nov 13 19:04:09 2009
|
||||
@@ -24,6 +24,9 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <cstdio>
|
||||
+#include <cstdlib>
|
||||
+#include <unistd.h>
|
||||
+
|
||||
using namespace std;
|
||||
|
||||
#include "fileutil.h"
|
||||
@@ -130,7 +133,20 @@
|
||||
void dependency_calculate_asm(const char *filename)
|
||||
{
|
||||
string command = nasm + " " + nflags + " -M " + filename;
|
||||
- system(command.c_str());
|
||||
+ FILE *fp = popen(command.c_str(), "r");
|
||||
+ if (fp)
|
||||
+ {
|
||||
+ char line[256];
|
||||
+ while (fgets(line, sizeof(line), fp)) //Process all lines of output
|
||||
+ {
|
||||
+ cout << line;
|
||||
+ }
|
||||
+ pclose(fp);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ cerr << "Failed on: " << filename << "\n";
|
||||
+ }
|
||||
}
|
||||
|
||||
void dependency_calculate_psr(const char *filename)
|
||||
9
x11/zsnes/zsnes.desktop
Normal file
9
x11/zsnes/zsnes.desktop
Normal file
@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Name=Zsnes
|
||||
Comment=Super Nintendo emulator
|
||||
Exec=/usr/bin/zsnes
|
||||
Icon=/usr/share/pixmaps/zsnes_icon.png
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Application;Game
|
||||
StartupNotify=false
|
||||
67
x11/zsnes/zsnes.patch
Normal file
67
x11/zsnes/zsnes.patch
Normal file
@ -0,0 +1,67 @@
|
||||
diff -cr zsnes_1_51/src/parsegen.cpp zsnes_1_51-patched/src/parsegen.cpp
|
||||
*** zsnes_1_51/src/parsegen.cpp 2007-10-31 01:30:26.000000000 -0300
|
||||
--- zsnes_1_51-patched/src/parsegen.cpp 2008-07-13 18:28:53.000000000 -0300
|
||||
***************
|
||||
*** 19,24 ****
|
||||
--- 19,27 ----
|
||||
Config file handler creator by Nach (C) 2005-2007
|
||||
*/
|
||||
|
||||
+ #include <cstring>
|
||||
+ #include <cstdlib>
|
||||
+
|
||||
#if !defined(__GNUC__) && !defined(_MSC_VER)
|
||||
#error You are using an unsupported compiler
|
||||
#endif
|
||||
***************
|
||||
*** 1822,1828 ****
|
||||
}
|
||||
}
|
||||
|
||||
! int main(size_t argc, const char *const *const argv)
|
||||
{
|
||||
const char *cheader_file = 0;
|
||||
bool compile = false;
|
||||
--- 1825,1831 ----
|
||||
}
|
||||
}
|
||||
|
||||
! int main(int argc, const char *const *const argv)
|
||||
{
|
||||
const char *cheader_file = 0;
|
||||
bool compile = false;
|
||||
diff -cr zsnes_1_51/src/tools/depbuild.cpp zsnes_1_51-patched/src/tools/depbuild.cpp
|
||||
*** zsnes_1_51/src/tools/depbuild.cpp 2006-12-27 08:04:05.000000000 -0300
|
||||
--- zsnes_1_51-patched/src/tools/depbuild.cpp 2008-07-13 18:30:46.000000000 -0300
|
||||
***************
|
||||
*** 183,189 ****
|
||||
}
|
||||
}
|
||||
|
||||
! int main(size_t argc, const char *const *const argv)
|
||||
{
|
||||
if (argc < 5)
|
||||
{
|
||||
--- 183,189 ----
|
||||
}
|
||||
}
|
||||
|
||||
! int main(int argc, const char *const *const argv)
|
||||
{
|
||||
if (argc < 5)
|
||||
{
|
||||
diff -cr zsnes_1_51/src/tools/strutil.h zsnes_1_51-patched/src/tools/strutil.h
|
||||
*** zsnes_1_51/src/tools/strutil.h 2006-12-27 08:04:05.000000000 -0300
|
||||
--- zsnes_1_51-patched/src/tools/strutil.h 2008-07-13 18:30:27.000000000 -0300
|
||||
***************
|
||||
*** 15,20 ****
|
||||
--- 15,23 ----
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
+ #include <cstring>
|
||||
+ #include <cstdlib>
|
||||
+
|
||||
/*
|
||||
This is part of a toolkit used to assist in ZSNES development
|
||||
*/
|
||||
BIN
x11/zsnes/zsnes_icon.png
Normal file
BIN
x11/zsnes/zsnes_icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.1 KiB |
Loading…
x
Reference in New Issue
Block a user