From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- media-sound/playmidi/Manifest | 8 +++ media-sound/playmidi/files/CAN-2005-0020.patch | 69 ++++++++++++++++++++++ .../playmidi/files/playmidi-2.5-includes.patch | 66 +++++++++++++++++++++ media-sound/playmidi/files/playmidi-2.5.patch | 22 +++++++ media-sound/playmidi/metadata.xml | 11 ++++ media-sound/playmidi/playmidi-2.5-r2.ebuild | 54 +++++++++++++++++ 6 files changed, 230 insertions(+) create mode 100644 media-sound/playmidi/Manifest create mode 100644 media-sound/playmidi/files/CAN-2005-0020.patch create mode 100644 media-sound/playmidi/files/playmidi-2.5-includes.patch create mode 100644 media-sound/playmidi/files/playmidi-2.5.patch create mode 100644 media-sound/playmidi/metadata.xml create mode 100644 media-sound/playmidi/playmidi-2.5-r2.ebuild (limited to 'media-sound/playmidi') diff --git a/media-sound/playmidi/Manifest b/media-sound/playmidi/Manifest new file mode 100644 index 000000000000..92df5946d6c5 --- /dev/null +++ b/media-sound/playmidi/Manifest @@ -0,0 +1,8 @@ +AUX CAN-2005-0020.patch 2512 SHA256 35b550aac776e7476de0c4711e41be74d4afc8b061ec69307bbba8df81ddf024 SHA512 8e878acb01ae570b7a2f39fd71569772b5d3a586ae2150c277691fe53265ad9c81880057294f9c8130fd3f25813a52c1a987c5e37bcfaafff360c76a435dc039 WHIRLPOOL 71f79ccbce8ac445e2f2d8432d1cb905ffc0b343545657201d9648d48c69ab38215eb5ae866604e19491715cdc830e8c051cfc398e8b178c22c4650cf4607f96 +AUX playmidi-2.5-includes.patch 2365 SHA256 9c8f01351fc221f1c5c6962fa216e23a9b2a244632bd3d43a759f82b65e84269 SHA512 d02a17ebda6b39ca938195bcebd385b63cea41e3a7448fcd8d7d9f547013d828f44dab4eb5fe1da08ddaa369b4b11faa2add22f76e0df3a646dd03fbbfbe7ed0 WHIRLPOOL 744da23e89219d76deeacaeb9e7dec086035757e15c5e2f65b80ebc33c1468ea7d875ae31985b93dfb773ffdbda32472359400774435b7db1c292eba679ade4b +AUX playmidi-2.5.patch 773 SHA256 5ccaa809ab46f64d82177ed34020028672bd67f5963802b77c10506502ea4f96 SHA512 72914298cc9a54f4c596a69031f5b02b0155f6b9c68c1ad214e81b478a973250a26c7697b714f9f6b8490784febfd688ea5a603d8175c381b5fa2d02e8fbd42d WHIRLPOOL 21eecab353e14b6475567dbbfd0f004eb38fb5791e775588961637a4d27e739006672ef12f386bc2f8f9eaea58c416fc5fcaa040f99b8bc3fcca4aa8397c5539 +DIST playmidi-2.5.tar.gz 147687 SHA256 a7ce37c2a2234fc875290e6ecc897ea2d405c63e95eda5244487c6a7053bfbdd SHA512 246885e17c89469ed10ded2ccf47ac8b89396458315faf26e312ec0bfc2613ebf97c3634e0ec220d87e3ddaefe7291d1fb4d16bd99e32f18a053d2dcdbe1629b WHIRLPOOL e5e5022597f038f8cc6e1553921af4fa5855d5ad9440e25792dc7d9e38a1a442ca71468eecb9fc9aaa531571ee86168882eeafbc0effd10ebbd12ec1e70f9eda +EBUILD playmidi-2.5-r2.ebuild 1246 SHA256 802200e70a9d992885f373d35429ccd2e3b9a1a5120aea51d5e338e9157251f7 SHA512 d6ade9f02bd621e4838a4f952372ea0ced7307aaead8b5d8a9e34b52ea7607f63ebb1e9ea24a28e35c6bacb7713d8482485718adda12971c44c876a07bd638f8 WHIRLPOOL 8f8b36b8125b4aaeade44c4c75848a1a0eabbe14184c6e9d14af4814e98da1b5fca83c9cd96f9b90a34f2d87bbd01c797344bc0ac46d11a8f6973a51f17c0cd5 +MISC ChangeLog 2642 SHA256 c3267ada996e889cb4dacd8a22a5f6dce439421f726dcc5aa6a58f4d8a50b873 SHA512 316440d2b1237bde6cd907a3131f9c9ed97ae3de19499792c1aac6e0e7c7b438b96e9ceee6d60dea9b140fa7bf54fc9b07b025d9da72eb4bd0d236ee3ad9f526 WHIRLPOOL 65821fb51d1063eb5d2dbe5b3338fe8f156101a999e796b39bed50ce9dd06dedd03c7e251e9a52f834b916f388d60390a1b88b9668e7f15d8ee904d2cae11b18 +MISC ChangeLog-2015 1952 SHA256 030e523ee1a309ecfbcd64bd2a970f48b6fad7a26055e53b21a01b75905b496a SHA512 7c9fb0f3c0e73812be00af0cf31450f913808a26fbb9fbb7280f80c6abcf2b6f6f8a6e2b6756b68ddfc86ab7faf6b2a17d6d9b4f08577c85666d660f3a9347ea WHIRLPOOL 356f940c328ff28ba2a18e0dc23be0103c4fc20d08faa873afee665fb3ac506d0cdea411dcd82290bc7a36e641ea0f61406594c112bc42a0ddfe88916bb17a3f +MISC metadata.xml 331 SHA256 7b5aa710843f402aab1dc9114b0e6424d4545acd91bdb65bb04e041aa8b422be SHA512 b3c5e539cd9a23bc7e5544d014f09f25eb7c68fb23df7b91a24215286c305c1289641d718fdb957197ee160df5d36997baa44e936f7268fe5a01d4c3cf2ca6db WHIRLPOOL 8b82c786517060163b50fa454bf3ce77123b8ebc92f6ad22012837326198ed05f293dfaa775eab298a777035158d6d04d6d611a41c42b2159b1ae623fd5ff03c 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 + #include + #include ++#include + #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 + #include + #include +-#ifdef linux +-#include +-#else + #include +-#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 +-#else + #include +-#endif + #include "gsvoices.h" + #include + #include +--- 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..8c84a6074c44 --- /dev/null +++ b/media-sound/playmidi/metadata.xml @@ -0,0 +1,11 @@ + + + + + sound@gentoo.org + Gentoo Sound project + + + playmidi + + 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..5dee5bf77bbb --- /dev/null +++ b/media-sound/playmidi/playmidi-2.5-r2.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +inherit eutils toolchain-funcs + +DESCRIPTION="Command Line and GUI based MIDI Player" +HOMEPAGE="https://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/* +} -- cgit v1.2.3