From e40587d4d3eac66ec3b3c2a70673a9ab3aef8d43 Mon Sep 17 00:00:00 2001 From: Adam Weinberger Date: Sun, 27 Jul 2014 13:35:15 +0000 Subject: [PATCH] Fix build and clean up, mostly by renaming patches. Interestingly, the build failure and one of the sed commands in the post-patch target were both due to problems introduced by one of the patches. --- audio/maplay/Makefile | 9 ++------- audio/maplay/files/{patch-ab => patch-Makefile} | 0 audio/maplay/files/{patch-ap => patch-all.h} | 0 .../files/{patch-ad => patch-configuration.sh} | 4 ++-- audio/maplay/files/{patch-af => patch-header.h} | 0 audio/maplay/files/{patch-ah => patch-ibitstream.h} | 0 audio/maplay/files/patch-maplay.cc | 12 ++++++++---- audio/maplay/files/{patch-ak => patch-subband.h} | 0 .../files/{patch-am => patch-subband_layer_1.h} | 0 .../files/{patch-an => patch-subband_layer_2.cc} | 0 .../files/{patch-ao => patch-subband_layer_2.h} | 0 11 files changed, 12 insertions(+), 13 deletions(-) rename audio/maplay/files/{patch-ab => patch-Makefile} (100%) rename audio/maplay/files/{patch-ap => patch-all.h} (100%) rename audio/maplay/files/{patch-ad => patch-configuration.sh} (85%) rename audio/maplay/files/{patch-af => patch-header.h} (100%) rename audio/maplay/files/{patch-ah => patch-ibitstream.h} (100%) rename audio/maplay/files/{patch-ak => patch-subband.h} (100%) rename audio/maplay/files/{patch-am => patch-subband_layer_1.h} (100%) rename audio/maplay/files/{patch-an => patch-subband_layer_2.cc} (100%) rename audio/maplay/files/{patch-ao => patch-subband_layer_2.h} (100%) diff --git a/audio/maplay/Makefile b/audio/maplay/Makefile index 754626d3815f..6382b44aac98 100644 --- a/audio/maplay/Makefile +++ b/audio/maplay/Makefile @@ -6,7 +6,6 @@ PORTVERSION= 1.2 CATEGORIES= audio MASTER_SITES= ftp://ftp.tnt.uni-hannover.de/pub/MPEG/audio/other-servers/Maplay-Mirror/ DISTNAME= ${PORTNAME}${PORTVERSION:S/./_/} -EXTRACT_SUFX= .tar.Z MAINTAINER= ports@FreeBSD.org COMMENT= MPEG audio player/decoder decoding layer I and II MPEG audio streams @@ -14,20 +13,16 @@ COMMENT= MPEG audio player/decoder decoding layer I and II MPEG audio streams LICENSE= GPLv2 NO_WRKSUBDIR= yes +USES= tar:Z PLIST_FILES= bin/maplay PORTDOCS= README OPTIONS_DEFINE= DOCS -post-patch: - @${REINPLACE_CMD} -e 's,^main,int main,g' ${WRKSRC}/maplay.cc - @${REINPLACE_CMD} -e 's,machine/soundcard.h,sys/soundcard.h,' \ - ${WRKSRC}/configuration.sh - do-install: ${INSTALL_PROGRAM} ${WRKSRC}/maplay ${STAGEDIR}${PREFIX}/bin @${MKDIR} ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}/ + ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR} .include diff --git a/audio/maplay/files/patch-ab b/audio/maplay/files/patch-Makefile similarity index 100% rename from audio/maplay/files/patch-ab rename to audio/maplay/files/patch-Makefile diff --git a/audio/maplay/files/patch-ap b/audio/maplay/files/patch-all.h similarity index 100% rename from audio/maplay/files/patch-ap rename to audio/maplay/files/patch-all.h diff --git a/audio/maplay/files/patch-ad b/audio/maplay/files/patch-configuration.sh similarity index 85% rename from audio/maplay/files/patch-ad rename to audio/maplay/files/patch-configuration.sh index 3829d864a091..c60df37ab9b4 100644 --- a/audio/maplay/files/patch-ad +++ b/audio/maplay/files/patch-configuration.sh @@ -9,13 +9,13 @@ + FreeBSD*) + COMPILER='${CXX}' + if [ ${ARCH} = "i386" ]; then -+ COMPILERFLAGS='-m486 -DLINUX -DDAMN_INTEL_BYTE_ORDER' ++ COMPILERFLAGS='-DLINUX -DDAMN_INTEL_BYTE_ORDER' + else + COMPILERFLAGS='-DLINUX' + fi + INCLUDEDIRS= + LIBRARIES= -+ AUDIO_INCLUDES='#include ' ;; ++ AUDIO_INCLUDES='#include ' ;; Linux*) COMPILER=g++ COMPILERFLAGS='-O2 -m486 -funroll-loops -DLINUX -DDAMN_INTEL_BYTE_ORDER' diff --git a/audio/maplay/files/patch-af b/audio/maplay/files/patch-header.h similarity index 100% rename from audio/maplay/files/patch-af rename to audio/maplay/files/patch-header.h diff --git a/audio/maplay/files/patch-ah b/audio/maplay/files/patch-ibitstream.h similarity index 100% rename from audio/maplay/files/patch-ah rename to audio/maplay/files/patch-ibitstream.h diff --git a/audio/maplay/files/patch-maplay.cc b/audio/maplay/files/patch-maplay.cc index ac553386fb82..efc0b0d38535 100644 --- a/audio/maplay/files/patch-maplay.cc +++ b/audio/maplay/files/patch-maplay.cc @@ -1,5 +1,5 @@ ---- maplay.cc.orig Thu Jun 23 22:14:36 1994 -+++ maplay.cc Thu Nov 21 16:40:21 2002 +--- maplay.cc.orig 1994-06-23 08:14:36.000000000 -0400 ++++ maplay.cc 2014-07-27 09:22:27.000000000 -0400 @@ -39,8 +39,8 @@ #include #include @@ -34,8 +34,12 @@ static real scalefactor; // data extracted from header of first frame: -@@ -93,12 +92,12 @@ - main (int argc, char *argv[]) +@@ -90,15 +89,15 @@ + } + + +-main (int argc, char *argv[]) ++int main (int argc, char *argv[]) { int i; - bool read_ready = False, write_ready = False; diff --git a/audio/maplay/files/patch-ak b/audio/maplay/files/patch-subband.h similarity index 100% rename from audio/maplay/files/patch-ak rename to audio/maplay/files/patch-subband.h diff --git a/audio/maplay/files/patch-am b/audio/maplay/files/patch-subband_layer_1.h similarity index 100% rename from audio/maplay/files/patch-am rename to audio/maplay/files/patch-subband_layer_1.h diff --git a/audio/maplay/files/patch-an b/audio/maplay/files/patch-subband_layer_2.cc similarity index 100% rename from audio/maplay/files/patch-an rename to audio/maplay/files/patch-subband_layer_2.cc diff --git a/audio/maplay/files/patch-ao b/audio/maplay/files/patch-subband_layer_2.h similarity index 100% rename from audio/maplay/files/patch-ao rename to audio/maplay/files/patch-subband_layer_2.h