* Added SDL, Simple DirectMedia Layer.

* Added NASM, the Netwide Assembler.
* Added Generator, an emulator for Sega Genesis / Mega Drive machines.
  Built with XVideo patch. Strangely it crashes with a GDK error when
  started in normal mode.  However, with the "-a" switch (arcade mode)
  it works, and subsequently switching back to windowed mode (Ctrl-F)
  also works.

svn path=/nixpkgs/trunk/; revision=1509
This commit is contained in:
Eelco Dolstra 2004-09-26 18:12:51 +00:00
parent 09e3335664
commit dc29a4ac48
7 changed files with 113 additions and 0 deletions

View File

@ -0,0 +1,6 @@
. $stdenv/setup
mkdir -p $out/bin
mkdir -p $out/man/man1
genericBuild

View File

@ -0,0 +1,10 @@
{stdenv, fetchurl}:
stdenv.mkDerivation {
name = "nasm-0.98.38";
builder = ./builder.sh;
src = fetchurl {
url = http://heanet.dl.sourceforge.net/sourceforge/nasm/nasm-0.98.38.tar.bz2;
md5 = "9f682490c132b070d54e395cb6ee145e";
};
}

View File

@ -0,0 +1,11 @@
{stdenv, fetchurl, x11}:
stdenv.mkDerivation {
name = "SDL-1.2.7";
src = fetchurl {
url = http://www.libsdl.org/release/SDL-1.2.7.tar.gz;
md5 = "d29b34b6ba3ed213893fc9d8d35e357a";
};
buildInputs = [x11];
patches = [./gcc-3.4.patch];
}

View File

@ -0,0 +1,37 @@
diff -rc SDL-orig/src/cpuinfo/SDL_cpuinfo.c SDL-1.2.7/src/cpuinfo/SDL_cpuinfo.c
*** SDL-orig/src/cpuinfo/SDL_cpuinfo.c 2004-02-10 16:31:35.000000000 +0100
--- SDL-1.2.7/src/cpuinfo/SDL_cpuinfo.c 2004-09-26 18:49:50.000000000 +0200
***************
*** 118,124 ****
" movl %%edi,%%ebx\n"
: "=m" (features)
:
! : "%eax", "%ebx", "%ecx", "%edx", "%edi"
);
#elif defined(_MSC_VER)
__asm {
--- 118,124 ----
" movl %%edi,%%ebx\n"
: "=m" (features)
:
! : "%eax", "%ecx", "%edx", "%edi"
);
#elif defined(_MSC_VER)
__asm {
***************
*** 153,159 ****
" movl %%edi,%%ebx\n"
: "=m" (features)
:
! : "%eax", "%ebx", "%ecx", "%edx", "%edi"
);
#elif defined(_MSC_VER)
__asm {
--- 153,159 ----
" movl %%edi,%%ebx\n"
: "=m" (features)
:
! : "%eax", "%ecx", "%edx", "%edi"
);
#elif defined(_MSC_VER)
__asm {

View File

@ -0,0 +1,13 @@
{stdenv, fetchurl, gtk, SDL, nasm}:
stdenv.mkDerivation {
name = "generator-0.35-cbiere";
src = fetchurl {
url = http://www.ghostwhitecrab.com/generator/generator-0.35-cbiere.tar.bz2;
md5 = "6ec4379d8c6c794ec59b9d61e73fb73d";
};
configureFlags = "--with-gtk --with-raze --with-sdl-audio";
buildInputs = [gtk SDL nasm];
# Only required when not using SDL audio.
# patches = [./soundcard.patch];
}

View File

@ -0,0 +1,20 @@
diff -rc generator-orig/main/gensoundp-unix.c generator-0.35-cbiere/main/gensoundp-unix.c
*** generator-orig/main/gensoundp-unix.c 2004-09-26 19:07:44.000000000 +0200
--- generator-0.35-cbiere/main/gensoundp-unix.c 2004-09-26 19:07:56.000000000 +0200
***************
*** 196,202 ****
#include <soundcard.h>
#else
! #ifdef HAVE_SOUNDCARD_H
#include <sys/soundcard.h>
#endif
--- 196,202 ----
#include <soundcard.h>
#else
! #ifdef HAVE_SYS_SOUNDCARD_H
#include <sys/soundcard.h>
#endif

View File

@ -159,6 +159,7 @@ rec {
inherit fetchurl stdenv;
};
### SHELLS
bash = (import ../shells/bash) {
@ -420,6 +421,10 @@ rec {
inherit fetchurl stdenv unzip ghc happy;
};
nasm = (import ../development/compilers/nasm) {
inherit fetchurl stdenv;
};
realPerl = (import ../development/interpreters/perl) {
inherit fetchurl stdenv;
};
@ -666,6 +671,10 @@ rec {
inherit fetchurl stdenv ncurses;
};
SDL = (import ../development/libraries/SDL) {
inherit fetchurl stdenv x11;
};
### SERVERS
@ -691,6 +700,7 @@ rec {
inherit fetchurl stdenv;
};
### OS-SPECIFIC
kernelHeaders = (import ../os-specific/linux/kernel-headers) {
@ -726,6 +736,7 @@ rec {
glibc = stdenv.gcc.glibc;
};
### DATA
docbook_xml_dtd_42 = (import ../data/sgml+xml/schemas/xml-dtd/docbook-4.2) {
@ -873,6 +884,11 @@ rec {
inherit fetchurl stdenv xlibs mesa;
};
generator = (import ../games/generator) {
inherit fetchurl stdenv SDL nasm;
inherit (gtkLibs1x) gtk;
};
### MISC