From 08350e9c6c25f066108cb5d68d124478b516e787 Mon Sep 17 00:00:00 2001 From: Steve Price Date: Mon, 11 Dec 2000 02:46:00 +0000 Subject: - Fix MASTER_SITES - Support CC properly - Change location of data files from lib/ to share/ - gets() -> fgets() PR: 23270 Submitted by: KATO Tsuguru --- audio/mpegaudio/Makefile | 6 +- audio/mpegaudio/files/patch-aa | 66 ++++++++++------------ audio/mpegaudio/files/patch-ab | 31 ++++------ audio/mpegaudio/files/patch-ac | 22 -------- audio/mpegaudio/files/patch-ad | 125 +++++++++++++++++++++++++++++++++++++++++ audio/mpegaudio/files/patch-ae | 47 ++++++++++++++++ audio/mpegaudio/pkg-plist | 46 +++++++-------- 7 files changed, 239 insertions(+), 104 deletions(-) delete mode 100644 audio/mpegaudio/files/patch-ac create mode 100644 audio/mpegaudio/files/patch-ad create mode 100644 audio/mpegaudio/files/patch-ae diff --git a/audio/mpegaudio/Makefile b/audio/mpegaudio/Makefile index 36fb161fd53c..6873b8c66eaa 100644 --- a/audio/mpegaudio/Makefile +++ b/audio/mpegaudio/Makefile @@ -8,7 +8,7 @@ PORTNAME= mpegaudio PORTVERSION= 3.9 CATEGORIES= audio -MASTER_SITES= ftp://ftp.iuma.com/audio_utils/converters/source/ +MASTER_SITES= http://www.iuma.com/IUMA/ftp/audio_utils/converters/source/ DISTNAME= ${PORTNAME} EXTRACT_SUFX= .tar.Z @@ -17,7 +17,7 @@ MAINTAINER= torstenb@FreeBSD.org MAN1= mpeg_musicin.1 mpeg_musicout.1 post-install: - ${INSTALL_MAN} ${FILESDIR}/mpeg_musicin.1 ${PREFIX}/man/man1 - ${INSTALL_MAN} ${FILESDIR}/mpeg_musicout.1 ${PREFIX}/man/man1 + ${INSTALL_MAN} ${FILESDIR}/mpeg_musicin.1 ${MANPREFIX}/man/man1 + ${INSTALL_MAN} ${FILESDIR}/mpeg_musicout.1 ${MANPREFIX}/man/man1 .include diff --git a/audio/mpegaudio/files/patch-aa b/audio/mpegaudio/files/patch-aa index 614f889250b1..7c224f10aec9 100644 --- a/audio/mpegaudio/files/patch-aa +++ b/audio/mpegaudio/files/patch-aa @@ -1,37 +1,29 @@ -*** Makefile.orig Wed Jan 5 02:47:50 1994 ---- Makefile Mon Jul 1 23:16:53 1996 -*************** -*** 1,10 **** - ALL : musicin musicout - -! CFLAGS = -O2 -! LDFLAGS= - - musicin: musicin.o common.o encode.o subs.o psy.o tonal.o -! cc $(LDFLAGS) -o musicin musicin.o common.o encode.o subs.o psy.o tonal.o -lm - - musicout: musicout.o common.o decode.o subs.o -! cc $(LDFLAGS) musicout.o common.o decode.o subs.o -o musicout -lm ---- 1,22 ---- - ALL : musicin musicout - -! CFLAGS += -DPREFIX=\"${PREFIX}\" -! -! all: musicin musicout - - musicin: musicin.o common.o encode.o subs.o psy.o tonal.o -! cc -o musicin musicin.o common.o encode.o subs.o psy.o tonal.o -lm - - musicout: musicout.o common.o decode.o subs.o -! cc musicout.o common.o decode.o subs.o -o musicout -lm -! -! clean: -! rm -f *.core *.o musicin musicout -! -! install: -! install -c -m 0755 -o bin -g bin musicin ${PREFIX}/bin/mpeg_musicin -! install -c -m 0755 -o bin -g bin musicout ${PREFIX}/bin/mpeg_musicout -! mkdir -m 0755 -p ${PREFIX}/lib/mpegaudio/tables -! install -c -m 0644 -o bin -g bin tables/* \ -! ${PREFIX}/lib/mpegaudio/tables/ -! +--- Makefile.orig Wed Jan 5 10:47:50 1994 ++++ Makefile Fri Aug 25 20:37:52 2000 +@@ -1,10 +1,23 @@ + ALL : musicin musicout + +-CFLAGS = -O2 ++CFLAGS += -DTABLES_PATH=\"${PREFIX}/share/mepgaudio/tables\" + LDFLAGS= + ++all: musicin musicout ++ + musicin: musicin.o common.o encode.o subs.o psy.o tonal.o +- cc $(LDFLAGS) -o musicin musicin.o common.o encode.o subs.o psy.o tonal.o -lm ++ $(CC) $(LDFLAGS) -o musicin musicin.o common.o encode.o subs.o psy.o tonal.o -lm + + musicout: musicout.o common.o decode.o subs.o +- cc $(LDFLAGS) musicout.o common.o decode.o subs.o -o musicout -lm ++ $(CC) $(LDFLAGS) musicout.o common.o decode.o subs.o -o musicout -lm ++ ++clean: ++ rm -f *.core *.o musicin musicout ++ ++install: ++ ${BSD_INSTALL_PROGRAM} musicin ${PREFIX}/bin/mpeg_musicin ++ ${BSD_INSTALL_PROGRAM} musicout ${PREFIX}/bin/mpeg_musicout ++ -mkdir -p ${PREFIX}/share/mpegaudio/tables ++ ${BSD_INSTALL_DATA} tables/* \ ++ ${PREFIX}/share/mpegaudio/tables/ ++ diff --git a/audio/mpegaudio/files/patch-ab b/audio/mpegaudio/files/patch-ab index 264c6329ac39..cf2993d0813a 100644 --- a/audio/mpegaudio/files/patch-ab +++ b/audio/mpegaudio/files/patch-ab @@ -1,19 +1,12 @@ -*** common.h.orig Mon Jul 1 23:00:51 1996 ---- common.h Mon Jul 1 23:04:47 1996 -*************** -*** 73,79 **** - #endif - - #ifdef UNIX -! #define TABLES_PATH "tables" /* to find data files */ - /* name of environment variable holding path of table files */ - #define MPEGTABENV "MPEGTABLES" - #define PATH_SEPARATOR "/" /* how to build paths */ ---- 73,79 ---- - #endif - - #ifdef UNIX -! #define TABLES_PATH PREFIX "/lib/mpegaudio/tables" /* to find data files */ - /* name of environment variable holding path of table files */ - #define MPEGTABENV "MPEGTABLES" - #define PATH_SEPARATOR "/" /* how to build paths */ +--- common.h.orig Wed Jan 5 10:42:00 1994 ++++ common.h Tue Aug 22 02:49:35 2000 +@@ -73,7 +73,9 @@ + #endif + + #ifdef UNIX ++#ifndef TABLES_PATH + #define TABLES_PATH "tables" /* to find data files */ ++#endif /* TABLES_PATH */ + /* name of environment variable holding path of table files */ + #define MPEGTABENV "MPEGTABLES" + #define PATH_SEPARATOR "/" /* how to build paths */ diff --git a/audio/mpegaudio/files/patch-ac b/audio/mpegaudio/files/patch-ac deleted file mode 100644 index c11166c5f1cc..000000000000 --- a/audio/mpegaudio/files/patch-ac +++ /dev/null @@ -1,22 +0,0 @@ ---- musicin.c~ Thu Aug 1 14:25:33 1996 -+++ musicin.c Thu Aug 1 14:26:03 1996 -@@ -101,6 +101,8 @@ - #include "common.h" - #include "encoder.h" - -+#include -+ - /* Global variable definitions for "musicin.c" */ - - FILE *musicin; ---- musicout.c~ Thu Aug 1 14:25:41 1996 -+++ musicout.c Thu Aug 1 14:26:13 1996 -@@ -58,6 +58,8 @@ - #include "common.h" - #include "decoder.h" - -+#include -+ - /******************************************************************** - /* - /* This part contains the MPEG I decoder for Layers I & II. diff --git a/audio/mpegaudio/files/patch-ad b/audio/mpegaudio/files/patch-ad new file mode 100644 index 000000000000..399dfa79ebcf --- /dev/null +++ b/audio/mpegaudio/files/patch-ad @@ -0,0 +1,125 @@ +--- musicin.c.orig Wed Jan 5 10:13:44 1994 ++++ musicin.c Tue Aug 22 02:40:40 2000 +@@ -101,6 +101,8 @@ + #include "common.h" + #include "encoder.h" + ++#include ++ + /* Global variable definitions for "musicin.c" */ + + FILE *musicin; +@@ -144,7 +146,7 @@ + + do { + printf("Enter PCM input file name : "); +- gets(original_file_name); ++ fgets(original_file_name,sizeof(original_file_name),stdin); + if (original_file_name[0] == NULL_CHAR) + printf("PCM input file name is required.\n"); + } while (original_file_name[0] == NULL_CHAR); +@@ -163,7 +165,7 @@ + original_file_name, DFLT_EXT); + #endif + +- gets(encoded_file_name); ++ fgets(encoded_file_name,sizeof(encoded_file_name),stdin); + if (encoded_file_name[0] == NULL_CHAR) { + #ifdef MS_DOS + /* replace old extension with new one, 92-08-19 shn */ +@@ -207,7 +209,7 @@ + else { /* Not using Audio IFF sound file headers. */ + + printf("What is the sampling frequency? <44100>[Hz]: "); +- gets(t); ++ fgets(t,sizeof(t),stdin); + freq = atol(t); + switch (freq) { + case 48000 : info->sampling_frequency = 1; +@@ -236,7 +238,7 @@ + + printf("Which layer do you want to use?\n"); + printf("Available: Layer (1), Layer (<2>): "); +- gets(t); ++ fgets(t,sizeof(t),stdin); + switch(*t){ + case '1': info->lay = 1; printf(">>> Using Layer %s\n",t); break; + case '2': info->lay = 2; printf(">>> Using Layer %s\n",t); break; +@@ -246,7 +248,7 @@ + printf("Which mode do you want?\n"); + printf("Available: ()tereo, (j)oint stereo, "); + printf("(d)ual channel, s(i)ngle Channel: "); +- gets(t); ++ fgets(t,sizeof(t),stdin); + switch(*t){ + case 's': + case 'S': +@@ -275,7 +277,7 @@ + } + + printf("Which psychoacoustic model do you want to use? <2>: "); +- gets(t); ++ fgets(t,sizeof(t),stdin); + model = atoi(t); + if (model > 2 || model < 1) { + printf(">>> Default model 2 selected\n"); +@@ -287,7 +289,7 @@ + } + + printf("What is the total bitrate? <%u>[kbps]: ", DFLT_BRT); +- gets(t); ++ fgets(t,sizeof(t),stdin); + brt = atoi(t); + if (brt == 0) brt = -10; + j=0; +@@ -310,7 +312,7 @@ + + printf("What type of de-emphasis should the decoder use?\n"); + printf("Available: ()one, (5)0/15 microseconds, (c)citt j.17: "); +- gets(t); ++ fgets(t,sizeof(t),stdin); + if (*t != 'n' && *t != '5' && *t != 'c') { + printf(">>> Using default no de-emphasis\n"); + info->emphasis = 0; +@@ -325,7 +327,7 @@ + /* Start 2. Part changes for CD Ver 3.2; jsp; 22-Aug-1991 */ + + printf("Do you want to set the private bit? (y/): "); +- gets(t); ++ fgets(t,sizeof(t),stdin); + if (*t == 'y' || *t == 'Y') info->extension = 1; + else info->extension = 0; + if(info->extension) printf(">>> Private bit set\n"); +@@ -334,28 +336,28 @@ + /* End changes for CD Ver 3.2; jsp; 22-Aug-1991 */ + + printf("Do you want error protection? (y/): "); +- gets(t); ++ fgets(t,sizeof(t),stdin); + if (*t == 'y' || *t == 'Y') info->error_protection = TRUE; + else info->error_protection = FALSE; + if(info->error_protection) printf(">>> Error protection used\n"); + else printf(">>> Error protection not used\n"); + + printf("Is the material copyrighted? (y/): "); +- gets(t); ++ fgets(t,sizeof(t),stdin); + if (*t == 'y' || *t == 'Y') info->copyright = 1; + else info->copyright = 0; + if(info->copyright) printf(">>> Copyrighted material\n"); + else printf(">>> Material not copyrighted\n"); + + printf("Is this the original? (y/): "); +- gets(t); ++ fgets(t,sizeof(t),stdin); + if (*t == 'y' || *t == 'Y') info->original = 1; + else info->original = 0; + if(info->original) printf(">>> Original material\n"); + else printf(">>> Material not original\n"); + + printf("Do you wish to exit (last chance before encoding)? (y/): "); +- gets(t); ++ fgets(t,sizeof(t),stdin); + if (*t == 'y' || *t == 'Y') exit(0); + } + diff --git a/audio/mpegaudio/files/patch-ae b/audio/mpegaudio/files/patch-ae new file mode 100644 index 000000000000..d7dc9e57a4bd --- /dev/null +++ b/audio/mpegaudio/files/patch-ae @@ -0,0 +1,47 @@ +--- musicout.c.orig Wed Jan 5 13:39:27 1994 ++++ musicout.c Tue Aug 22 02:37:30 2000 +@@ -58,6 +58,8 @@ + #include "common.h" + #include "decoder.h" + ++#include ++ + /******************************************************************** + /* + /* This part contains the MPEG I decoder for Layers I & II. +@@ -139,7 +141,7 @@ + if(argc==1) { /* no command line args -> interact */ + do { + printf ("Enter encoded file name : "); +- gets (encoded_file_name); ++ fgets (encoded_file_name,sizeof(encoded_file_name),stdin); + if (encoded_file_name[0] == NULL_CHAR) + printf ("Encoded file name is required. \n"); + } while (encoded_file_name[0] == NULL_CHAR); +@@ -151,7 +153,7 @@ + printf ("Enter MPEG decoded file name <%s%s>: ", encoded_file_name, + DFLT_OPEXT); + #endif +- gets (decoded_file_name); ++ fgets (decoded_file_name,sizeof(decoded_file_name),stdin); + if (decoded_file_name[0] == NULL_CHAR) { + #ifdef MS_DOS + /* replace old extension with new one, 92-08-19 shn */ +@@ -164,7 +166,7 @@ + + printf( + "Do you wish to write an AIFF compatible sound file ? (y/) : "); +- gets(t); ++ fgets(t,sizeof(t),stdin); + if (*t == 'y' || *t == 'Y') need_aiff = TRUE; + else need_aiff = FALSE; + if (need_aiff) +@@ -173,7 +175,7 @@ + + printf( + "Do you wish to exit (last chance before decoding) ? (y/) : "); +- gets(t); ++ fgets(t,sizeof(t),stdin); + if (*t == 'y' || *t == 'Y') exit(0); + } + else { /* interpret CL Args */ diff --git a/audio/mpegaudio/pkg-plist b/audio/mpegaudio/pkg-plist index 089fae486042..e6d8e8877d92 100644 --- a/audio/mpegaudio/pkg-plist +++ b/audio/mpegaudio/pkg-plist @@ -1,25 +1,25 @@ bin/mpeg_musicin bin/mpeg_musicout -lib/mpegaudio/tables/1cb0 -lib/mpegaudio/tables/1cb1 -lib/mpegaudio/tables/1cb2 -lib/mpegaudio/tables/1th0 -lib/mpegaudio/tables/1th1 -lib/mpegaudio/tables/1th2 -lib/mpegaudio/tables/2cb0 -lib/mpegaudio/tables/2cb1 -lib/mpegaudio/tables/2cb2 -lib/mpegaudio/tables/2th0 -lib/mpegaudio/tables/2th1 -lib/mpegaudio/tables/2th2 -lib/mpegaudio/tables/absthr_0 -lib/mpegaudio/tables/absthr_1 -lib/mpegaudio/tables/absthr_2 -lib/mpegaudio/tables/alloc_0 -lib/mpegaudio/tables/alloc_1 -lib/mpegaudio/tables/alloc_2 -lib/mpegaudio/tables/alloc_3 -lib/mpegaudio/tables/dewindow -lib/mpegaudio/tables/enwindow -@dirrm lib/mpegaudio/tables -@dirrm lib/mpegaudio +share/mpegaudio/tables/1cb0 +share/mpegaudio/tables/1cb1 +share/mpegaudio/tables/1cb2 +share/mpegaudio/tables/1th0 +share/mpegaudio/tables/1th1 +share/mpegaudio/tables/1th2 +share/mpegaudio/tables/2cb0 +share/mpegaudio/tables/2cb1 +share/mpegaudio/tables/2cb2 +share/mpegaudio/tables/2th0 +share/mpegaudio/tables/2th1 +share/mpegaudio/tables/2th2 +share/mpegaudio/tables/absthr_0 +share/mpegaudio/tables/absthr_1 +share/mpegaudio/tables/absthr_2 +share/mpegaudio/tables/alloc_0 +share/mpegaudio/tables/alloc_1 +share/mpegaudio/tables/alloc_2 +share/mpegaudio/tables/alloc_3 +share/mpegaudio/tables/dewindow +share/mpegaudio/tables/enwindow +@dirrm share/mpegaudio/tables +@dirrm share/mpegaudio -- cgit v1.2.3