summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-sound/playmidi
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-sound/playmidi')
-rw-r--r--media-sound/playmidi/Manifest1
-rw-r--r--media-sound/playmidi/files/CAN-2005-0020.patch69
-rw-r--r--media-sound/playmidi/files/playmidi-2.5-includes.patch66
-rw-r--r--media-sound/playmidi/files/playmidi-2.5.patch22
-rw-r--r--media-sound/playmidi/metadata.xml8
-rw-r--r--media-sound/playmidi/playmidi-2.5-r2.ebuild55
6 files changed, 221 insertions, 0 deletions
diff --git a/media-sound/playmidi/Manifest b/media-sound/playmidi/Manifest
new file mode 100644
index 000000000000..bf703f1dcd48
--- /dev/null
+++ b/media-sound/playmidi/Manifest
@@ -0,0 +1 @@
+DIST playmidi-2.5.tar.gz 147687 SHA256 a7ce37c2a2234fc875290e6ecc897ea2d405c63e95eda5244487c6a7053bfbdd
diff --git a/media-sound/playmidi/files/CAN-2005-0020.patch b/media-sound/playmidi/files/CAN-2005-0020.patch
new file mode 100644
index 000000000000..9cd120eddb59
--- /dev/null
+++ b/media-sound/playmidi/files/CAN-2005-0020.patch
@@ -0,0 +1,69 @@
+--- playmidi.c.orig 2005-01-17 17:43:20.578060936 -0500
++++ playmidi.c 2005-01-17 17:48:55.022217696 -0500
+@@ -22,6 +22,7 @@
+ #include <ctype.h>
+ #include <unistd.h>
+ #include <sys/stat.h>
++#include <errno.h>
+ #include "playmidi.h"
+
+ SEQ_DEFINEBUF(SEQUENCERBLOCKSIZE);
+@@ -186,6 +187,15 @@
+ struct stat info;
+ int piped = 0;
+
++ /* CPhipps 2000/02/04 - this might be splaymidi, in which case we're
++ * probably setuid root. Drop privs immediately.. io_svgalib.c can
++ * regain them */
++ if (getuid() != geteuid())
++ if (seteuid(getuid())) {
++ perror("seteuid");
++ exit(EPERM); /* Seems appropriate */
++ }
++
+ printf("%s Copyright (C) 1994-1997 Nathan I. Laredo,"
+ " AWE32 by Takashi Iwai\n"
+ "This is free software with ABSOLUTELY NO WARRANTY.\n"
+@@ -439,9 +449,9 @@
+ for (i = optind; i < argc;) {
+ filename = argv[i];
+ if (stat(filename, &info) == -1) {
+- if ((extra = malloc(strlen(filename) + 4)) == NULL)
++ if ((extra = malloc(strlen(filename) + 5)) == NULL)
+ close_show(-1);
+- sprintf(extra, "%s.mid", filename);
++ snprintf(extra, sizeof(extra), "%s.mid", filename);
+ if (stat(extra, &info) == -1)
+ close_show(-1);
+ if ((mfd = fopen(extra, "r")) == NULL)
+@@ -452,7 +462,7 @@
+ if (ext && strcmp(ext, ".gz") == 0) {
+ char temp[1024];
+ piped = 1;
+- sprintf(temp, "gzip -l %s", filename);
++ snprintf(temp, sizeof(temp), "gzip -l %s", filename);
+ if ((mfd = popen(temp, "r")) == NULL)
+ close_show(-1);
+ fgets(temp, sizeof(temp), mfd); /* skip 1st line */
+@@ -460,7 +470,7 @@
+ strtok(temp, " "); /* compressed size */
+ info.st_size = atoi(strtok(NULL, " ")); /* original size */
+ pclose(mfd);
+- sprintf(temp, "gzip -d -c %s", filename);
++ snprintf(temp, sizeof(temp), "gzip -d -c %s", filename);
+ if ((mfd = popen(temp, "r")) == NULL)
+ close_show(-1);
+ } else if ((mfd = fopen(filename, "r")) == NULL)
+--- io_svgalib.c.orig 2005-01-17 17:49:55.758984304 -0500
++++ io_svgalib.c 2005-01-17 17:49:59.310444400 -0500
+@@ -259,6 +259,10 @@
+ tcgetattr(mytty, &newtty);
+ newtty.c_lflag &= ~(ICANON | ECHO | ICRNL | ISIG);
+ tcsetattr(mytty, TCSANOW, &newtty);
++ /* CPhipps 2000/02/04 - restore euid root in order to start SVGALib.
++ * We don't have to worry about errors, or dropping priv's afterwards,
++ * SVGALib handles that safely for us. */
++ seteuid(0);
+ vga_init();
+ if ((vgamode = vga_getdefaultmode()) == -1)
+ vgamode = G640x480x256;
diff --git a/media-sound/playmidi/files/playmidi-2.5-includes.patch b/media-sound/playmidi/files/playmidi-2.5-includes.patch
new file mode 100644
index 000000000000..0a93c5930892
--- /dev/null
+++ b/media-sound/playmidi/files/playmidi-2.5-includes.patch
@@ -0,0 +1,66 @@
+diff -ur playmidi-2.4.orig/Makefile playmidi-2.4/Makefile
+--- playmidi-2.4.orig/Makefile 1998-10-01 05:39:18.000000000 +0300
++++ playmidi-2.4/Makefile 2007-07-25 16:22:23.000000000 +0300
+@@ -12,38 +12,38 @@
+
+ # ncurses usually /usr/lib, -L/usr/local/lib doesn't hurt
+ # unless there's more than one ncurses floating around on your system
+-LIBNC = -L/usr/local/lib -lncurses
++LIBNC = -L/usr/lib -lncurses
+
+ ######### NOTE: X11R6 or newer REQUIRED
+-LIBX11 = -L/usr/X11R6/lib -lXaw -lXmu -lXt -lX11 -lXext -lSM -lICE
+-LIBGTK = -L/usr/X11R6/lib -lgtk-1.1 -lgdk-1.1 -lglib-1.1 -lX11 -lXext -lm
+-LIBVGA = -L/usr/local/lib -lvgagl -lvga
++LIBX11 = -L/usr/lib -lXaw -lXmu -lXt -lX11 -lXext -lSM -lICE
++LIBGTK = -L/usr/lib -lgtk-1.1 -lgdk-1.1 -lglib-1.1 -lX11 -lXext -lm
++LIBVGA = -L/usr/lib -lvgagl -lvga
+
+ # ncurses is usually in /usr/include/ncurses, but you may need
+ # to use /usr/local/include/ncurses depending on your setup.
+ INCNC = -I/usr/include/ncurses
+
+ # just in case you keep your X includes in an odd location.
+-INCX11 = -I/usr/X11R6/include -DNARROWPROTO
++INCX11 = -I/usr/include -DNARROWPROTO
+
+ # stuff for sound blaster awe32
+ INCAWE = -DVOXWARE_CONTROLLER_7_WORKING
+ # awe_voice.h path
+-INCAWE += -I/usr/lib/oss/include/sys
++INCAWE += -I.
+
+ # usually in /usr/include, but -I/usr/local/include doesn't hurt
+ # unless there's more than one svgalib floating around your system.
+-INCVGA = -I/usr/local/include
++INCVGA = -I/usr/include
+
+ # Directory where application defaults files are stored for X11 version
+-XAPPDEFAULTS = /usr/X11R6/lib/X11/app-defaults
++XAPPDEFAULTS = /usr/share/X11/app-defaults
+
+ INCLUDES= $(INCNC) $(INCX11) $(INCVGA) $(INCAWE)
+ INSTALLDIR = /usr/bin
+ INSTALL = install -s
+
+ # if you are using the GUS Ultra driver module, add -DULTRA_DRIVER
+-CFLAGS = -Wall -pipe -fomit-frame-pointer -O2 -m486 $(INCAWE)
++CFLAGS = -Wall $(INCAWE)
+ LDFLAGS =
+
+ OBJECTS = playmidi.o readmidi.o playevents.o \
+diff -ur playmidi-2.4.orig/playmidi.h-dist playmidi-2.4/playmidi.h-dist
+--- playmidi-2.4.orig/playmidi.h-dist 1997-05-12 00:26:36.000000000 +0300
++++ playmidi-2.4/playmidi.h-dist 2007-07-25 16:22:44.000000000 +0300
+@@ -52,11 +52,7 @@
+ #include <stdlib.h>
+ #include <sys/soundcard.h>
+ #include <sys/ioctl.h>
+-#ifdef linux
+-#include <linux/awe_voice.h>
+-#else
+ #include <awe_voice.h>
+-#endif
+
+ struct chanstate {
+ int program;
diff --git a/media-sound/playmidi/files/playmidi-2.5.patch b/media-sound/playmidi/files/playmidi-2.5.patch
new file mode 100644
index 000000000000..317b5c8734b7
--- /dev/null
+++ b/media-sound/playmidi/files/playmidi-2.5.patch
@@ -0,0 +1,22 @@
+--- io_ncurses.c.orig 2003-11-30 19:23:34.000000000 -0800
++++ io_ncurses.c 2003-11-30 19:23:46.000000000 -0800
+@@ -14,11 +14,7 @@
+ Kelly Drive, Lackland AFB, TX 78236-5128, USA.
+ *************************************************************************/
+ #include "playmidi.h"
+-#ifdef linux
+-#include <ncurses/curses.h>
+-#else
+ #include <ncurses.h>
+-#endif
+ #include "gsvoices.h"
+ #include <sys/time.h>
+ #include <unistd.h>
+--- playmidi.h-dist.orig 2003-11-30 19:49:35.000000000 -0800
++++ playmidi.h-dist 2003-11-30 19:49:46.000000000 -0800
+@@ -1,4 +1,4 @@
+-#define RELEASE "Playmidi 2.4"
++#define RELEASE "Playmidi 2.5"
+ /************************************************************************
+ playmidi.h -- defines and structures for use by playmidi package
+
diff --git a/media-sound/playmidi/metadata.xml b/media-sound/playmidi/metadata.xml
new file mode 100644
index 000000000000..5084ba319789
--- /dev/null
+++ b/media-sound/playmidi/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sound</herd>
+ <upstream>
+ <remote-id type="sourceforge">playmidi</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-sound/playmidi/playmidi-2.5-r2.ebuild b/media-sound/playmidi/playmidi-2.5-r2.ebuild
new file mode 100644
index 000000000000..ad574babc76f
--- /dev/null
+++ b/media-sound/playmidi/playmidi-2.5-r2.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Command Line and GUI based MIDI Player"
+HOMEPAGE="http://sourceforge.net/projects/playmidi/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc sparc x86"
+IUSE="svga X"
+
+RDEPEND="sys-libs/ncurses
+ svga? ( media-libs/svgalib )
+ X? ( x11-libs/libX11
+ x11-libs/libSM
+ x11-libs/libXaw )"
+DEPEND="${RDEPEND}
+ X? ( x11-proto/xextproto )"
+
+S="${WORKDIR}/${P/2.5/2.4}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}.patch
+ epatch "${FILESDIR}"/CAN-2005-0020.patch
+ epatch "${FILESDIR}"/${P}-includes.patch
+}
+
+src_compile() {
+ local targets="playmidi"
+
+ use svga && targets="$targets splaymidi"
+ use X && targets="$targets xplaymidi"
+
+ echo "5" | ./Configure
+
+ emake -j1 CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \
+ depend clean || die "emake failed."
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} -I." LDFLAGS="${LDFLAGS}" ${targets} \
+ || die "emake failed."
+}
+
+src_install() {
+ dobin playmidi
+ use svga && dobin splaymidi
+ use X && dobin xplaymidi
+ dodoc BUGS QuickStart README.1ST
+ docinto techref
+ dodoc techref/*
+}