diff options
author | kris <kris@FreeBSD.org> | 2001-03-03 08:23:13 +0800 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2001-03-03 08:23:13 +0800 |
commit | 9078dd640a6d0bd13265ec5817a169477710d43a (patch) | |
tree | 56085cf19a1f32925fb6e5027ddec42f25bb7ad4 /audio | |
parent | 849d1dac70dcae3331ed39b6ca0b34d25d0a162e (diff) | |
download | freebsd-ports-gnome-9078dd640a6d0bd13265ec5817a169477710d43a.tar.gz freebsd-ports-gnome-9078dd640a6d0bd13265ec5817a169477710d43a.tar.zst freebsd-ports-gnome-9078dd640a6d0bd13265ec5817a169477710d43a.zip |
Switch the ASM selection code to use CPUTYPE on -current, and hence
automatically select the correct version without needing to set a
non-standard environment variable.
Use random() instead of rand() because I'm sick of getting the same songs
over and over in shuffle play.
Quell a format string warning with -Wnon-const-format
Bump PORTREVISION
Reviewed by: maintainer timeout
Diffstat (limited to 'audio')
-rw-r--r-- | audio/mpg123/Makefile | 26 | ||||
-rw-r--r-- | audio/mpg123/files/patch-ab | 31 | ||||
-rw-r--r-- | audio/mpg123/files/patch-ae | 11 |
3 files changed, 54 insertions, 14 deletions
diff --git a/audio/mpg123/Makefile b/audio/mpg123/Makefile index 91399a056e8b..50d528def241 100644 --- a/audio/mpg123/Makefile +++ b/audio/mpg123/Makefile @@ -7,7 +7,7 @@ PORTNAME= mpg123 PORTVERSION= 0.59r -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= audio ipv6 MASTER_SITES= http://www.mpg123.de/mpg123/ \ http://www-ti.informatik.uni-tuebingen.de/~hippm/mpg123/ \ @@ -57,22 +57,24 @@ pre-fetch: @${ECHO_MSG} .endif .if ${MACHINE_ARCH} == "i386" +.if ${OSVERSION} >= 500018 +.if ${MACHINE_CPU:Mk6} +OPT_ARCH= 3dnow +.elif ${MACHINE_CPU:Mi586} +OPT_ARCH= i586 +.elif ${MACHINE_CPU:Mi486} +OPT_ARCH= i486 +.endif +.else .if !defined(OPT_ARCH) || ((${OPT_ARCH} != "i486") && (${OPT_ARCH} != "i586") \ && (${OPT_ARCH} != "3dnow")) - @${ECHO_MSG} - @${ECHO_MSG} "Note: you can set OPT_ARCH to optimize for your hardware" + @${ECHO_MSG} "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" + @${ECHO_MSG} "Note: you can set OPT_ARCH to optimize for your hardware. @${ECHO_MSG} "(e.g. make OPT_ARCH=i486)." -.if ${PORTOBJFORMAT} == "elf" @${ECHO_MSG} "Valid values are: i486, i586, 3dnow" -.else - @${ECHO_MSG} "Valid values are: i486" -.endif - @${ECHO_MSG} -.endif -.if ${PORTOBJFORMAT} == "elf" + @${ECHO_MSG} "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" OPT_ARCH?= i586 -.else -OPT_ARCH?= i486 +.endif .endif .endif diff --git a/audio/mpg123/files/patch-ab b/audio/mpg123/files/patch-ab index 164299b25200..76b32c339984 100644 --- a/audio/mpg123/files/patch-ab +++ b/audio/mpg123/files/patch-ab @@ -1,5 +1,5 @@ ---- mpg123.c.orig Fri Jun 18 14:18:11 1999 -+++ mpg123.c Fri May 5 00:07:02 2000 +--- mpg123.c.orig Fri Jun 18 05:18:11 1999 ++++ mpg123.c Fri Mar 2 16:08:04 2001 @@ -27,6 +27,10 @@ #include <sched.h> #endif @@ -11,6 +11,33 @@ #include "mpg123.h" #include "getlopt.h" #include "buffer.h" +@@ -223,7 +227,7 @@ + { + int loop, rannum; + +- srand(time(NULL)); ++ srandomdev(); + if(shuffleord) + free(shuffleord); + shuffleord = (int *) malloc((numfiles + 1) * sizeof(int)); +@@ -239,7 +243,7 @@ + /* now shuffle them */ + if(numfiles >= 2) { + for (loop = 0; loop < numfiles; loop++) { +- rannum = (rand() % (numfiles * 4 - 4)) / 4; ++ rannum = (random() % (numfiles * 4 - 4)) / 4; + rannum += (rannum >= loop); + shuffleord[loop] ^= shuffleord[rannum]; + shuffleord[rannum] ^= shuffleord[loop]; +@@ -381,7 +385,7 @@ + curfile++; + } + else { +- newfile = shufflist[ rand() % shuffle_listsize ]; ++ newfile = shufflist[ random() % shuffle_listsize ]; + } + + return newfile; @@ -784,6 +788,10 @@ _wildcard(&argc,&argv); #endif diff --git a/audio/mpg123/files/patch-ae b/audio/mpg123/files/patch-ae new file mode 100644 index 000000000000..21c9bbcc9401 --- /dev/null +++ b/audio/mpg123/files/patch-ae @@ -0,0 +1,11 @@ +--- control_generic.c.orig Fri Mar 2 16:10:49 2001 ++++ control_generic.c Fri Mar 2 16:10:51 2001 +@@ -26,6 +26,8 @@ + extern int buffer_pid; + extern int tabsel_123[2][3][16]; + ++void generic_sendmsg (char *, ...) __printflike(1,2); ++ + void generic_sendmsg (char *fmt, ...) + { + va_list ap; |