diff options
author | Mikhail Teterin <mi@FreeBSD.org> | 2005-10-10 19:49:34 +0000 |
---|---|---|
committer | Mikhail Teterin <mi@FreeBSD.org> | 2005-10-10 19:49:34 +0000 |
commit | 254a7b83962ef0bd46de52fee1f11b3c34754e5a (patch) | |
tree | 37ab43bfffd423d6e4c05eefe58d6b80cfdd2933 /audio/nas | |
parent | Update to 0.95.7 [1] (diff) |
Update from 1.7 to 1.7b. Add the following improvements:
1) Use proper CFLAGS to compiled libaudio's unshared/*.o --
previously only the shared objects were thus compiled.
2) Use -fPIC for shared objects only on sparc64 -- on other
platforms use -fpic.
3) Use the unshared/*.o to create the static libaudio.a --
previously the shared objects were used for both libraries.
4) Link with -lXt and -lXau -- the vendor's Imakefile does that
only on Linux, for some reason...
The first three of these points should really be handled by imake et al...
Notes
Notes:
svn path=/head/; revision=144861
Diffstat (limited to 'audio/nas')
-rw-r--r-- | audio/nas/Makefile | 29 | ||||
-rw-r--r-- | audio/nas/distinfo | 6 | ||||
-rw-r--r-- | audio/nas/files/patch-ae | 11 | ||||
-rw-r--r-- | audio/nas/files/patch-ag | 12 | ||||
-rw-r--r-- | audio/nas/files/patch-useXt | 8 | ||||
-rw-r--r-- | audio/nas/files/patch-warnings | 429 |
6 files changed, 461 insertions, 34 deletions
diff --git a/audio/nas/Makefile b/audio/nas/Makefile index cdfe6e7eeb89..f59acbc1d5eb 100644 --- a/audio/nas/Makefile +++ b/audio/nas/Makefile @@ -6,7 +6,7 @@ # PORTNAME= nas -PORTVERSION= 1.7 +PORTVERSION= 1.7b CATEGORIES= audio MASTER_SITES= http://nas.codebrilliance.com/nas/ EXTRACT_SUFX= .src.tar.gz @@ -16,17 +16,32 @@ COMMENT= Network Audio System USE_REINPLACE= yes USE_IMAKE= yes -ALL_TARGET= World -# no need to "xmkmf -a" and create the Makefiles twice -- see above -XMKMF= xmkmf INSTALLS_SHLIB= yes +CFLAGS+= -Werror +MAKE_ENV+= COMPRESS_CMD="${COMPRESS_CMD:S/c//}" post-patch: - @${FIND} ${WRKSRC} -name '*.[ch]' | ${XARGS} \ - ${REINPLACE_CMD} -e "s|<malloc.h>|<stdlib.h>|g" + @${FIND} ${WRKSRC} -name '*.c' | ${XARGS} ${GREP} -lF malloc.h \ + | ${XARGS} ${REINPLACE_CMD} -n -e "s|<malloc.h>||" -e t -e p + +post-configure: + cd ${WRKSRC} && ${MAKE} Makefiles clean includes depend + # Work around shortcomings of the Image.rules et. al: + ${REINPLACE_CMD} -e 's:-fPIC:${FPIC} -DPIC:g' \ + -e 's,-c \$$(CCOPTIONS),-c $$(CFLAGS),' \ + -e 's,\(\$$(AR) \$$@ \$$\)(OBJS),\1(OBJS:S|^|unshared/|),' \ + ${WRKSRC}/lib/audio/Makefile post-install: @${SED} -e 's:/usr/X11R6:${PREFIX}:g' ${PKGMESSAGE} .include "Makefile.man" -.include <bsd.port.mk> +.include <bsd.port.pre.mk> + +.if ${ARCH} == "sparc64" +FPIC= -fPIC +.else +FPIC= -fpic +.endif + +.include <bsd.port.post.mk> diff --git a/audio/nas/distinfo b/audio/nas/distinfo index b13a02757a9b..e5cf776c18af 100644 --- a/audio/nas/distinfo +++ b/audio/nas/distinfo @@ -1,4 +1,2 @@ -SHA1 (nas-1.7.src.tar.gz) = a41adef84d0bf4c8e02b14d77bec0d284e7c9317 -RMD160 (nas-1.7.src.tar.gz) = 227ddc4f5f9d264c97066dc461bad138776d1dfd -MD5 (nas-1.7.src.tar.gz) = c9918e9c9c95d587a95b455bbabe3b49 -SIZE (nas-1.7.src.tar.gz) = 1288569 +MD5 (nas-1.7b.src.tar.gz) = ab4fadedcbbf9ccd14b2025732360bd2 +SIZE (nas-1.7b.src.tar.gz) = 1290251 diff --git a/audio/nas/files/patch-ae b/audio/nas/files/patch-ae deleted file mode 100644 index edb04bb2207b..000000000000 --- a/audio/nas/files/patch-ae +++ /dev/null @@ -1,11 +0,0 @@ ---- lib/audio/Imakefile.orig Sun Sep 12 06:23:33 2004 -+++ lib/audio/Imakefile Mon Nov 15 21:42:49 2004 -@@ -60,7 +60,7 @@ - - XCOMM JET - hmmm. - #if (defined(FreeBSDArchitecture) || defined(BSDArchitecture)) && defined(HasBSD44Sockets) -- EXTRA_DEFINES = -DBSD44SOCKETS -+ EXTRA_DEFINES = -DBSD44SOCKETS - #endif - - XCOMM JET - see if we should avoid streams diff --git a/audio/nas/files/patch-ag b/audio/nas/files/patch-ag deleted file mode 100644 index 503f59526e40..000000000000 --- a/audio/nas/files/patch-ag +++ /dev/null @@ -1,12 +0,0 @@ ---- server/Imakefile.orig Sun Dec 2 15:57:38 2001 -+++ server/Imakefile Fri Dec 28 18:00:27 2001 -@@ -105,6 +105,9 @@ - # if defined(LinuxArchitecture) - RCMANDIR = $(FILEMANDIR) - RCMANSUFFIX = 5nas -+# elif defined(FreeBSDArchitecture) -+ RCMANDIR = $(FILEMANDIR) -+ RCMANSUFFIX = $(FILEMANSUFFIX) - # else - RCMANDIR = $(MANDIR) - RCMANSUFFIX = 5x diff --git a/audio/nas/files/patch-useXt b/audio/nas/files/patch-useXt new file mode 100644 index 000000000000..79db35a502e7 --- /dev/null +++ b/audio/nas/files/patch-useXt @@ -0,0 +1,8 @@ +--- lib/audio/Imakefile Sat Jun 4 16:08:54 2005 ++++ lib/audio/Imakefile Mon Oct 10 15:38:24 2005 +@@ -152,5 +152,3 @@ + +-#if defined(LinuxArchitecture) + REQUIREDLIBS = -L$(USRLIBDIR) -lXt $(XAULIB) -lm +-#endif + diff --git a/audio/nas/files/patch-warnings b/audio/nas/files/patch-warnings new file mode 100644 index 000000000000..7a989fc6e63e --- /dev/null +++ b/audio/nas/files/patch-warnings @@ -0,0 +1,429 @@ +--- server/dda/voxware/config.c Fri Jul 12 00:44:16 2002 ++++ server/dda/voxware/config.c Mon Oct 10 10:25:22 2005 +@@ -6,4 +6,5 @@ + + #include <fcntl.h> ++#include <stdint.h> + #include "nasconf.h" + #include "config.h" +@@ -27,5 +28,5 @@ + { + case CONF_SET_SECTION: +- num = (int) value; ++ num = (intptr_t) value; + + if (num == INPUTSECTION) +@@ -40,10 +41,10 @@ + + case FORCERATE : +- num = (int) value; ++ num = (intptr_t) value; + confStat->forceRate = num ; + break; + + case GAIN : +- num = (int) value; ++ num = (intptr_t) value; + /* the default is 50, so if it's just out of range, don't + reset it */ +@@ -56,10 +57,10 @@ + + case AUTOOPEN : +- num = (int) value; ++ num = (intptr_t) value; + confStat->autoOpen = num; + break; + + case READWRITE : +- num = (int) value; ++ num = (intptr_t) value; + if (confStat == &sndStatIn) { + confStat->howToOpen = (num ? O_RDWR : O_RDONLY); +@@ -85,5 +86,5 @@ + + case WORDSIZE: +- num = (int) value; ++ num = (intptr_t) value; + + if (num != 8 && num != 16) +@@ -97,5 +98,5 @@ + + case FRAGSIZE: +- num = (int) value; ++ num = (intptr_t) value; + + { +@@ -122,5 +123,5 @@ + + case MINFRAGS: +- num = (int) value; ++ num = (intptr_t) value; + + if (num < 2 || num > 32) +@@ -137,5 +138,5 @@ + + case MAXFRAGS: +- num = (int) value; ++ num = (intptr_t) value; + + if (num < 2 || num > 32) +@@ -152,5 +153,5 @@ + + case NUMCHANS: +- num = (int) value; ++ num = (intptr_t) value; + + if (num != 1 && num != 2) +@@ -164,5 +165,5 @@ + + case MAXRATE: +- num = (int) value; ++ num = (intptr_t) value; + + confStat->maxSampleRate = num; +@@ -170,5 +171,5 @@ + + case MINRATE: +- num = (int) value; ++ num = (intptr_t) value; + + confStat->minSampleRate = num; +@@ -176,5 +177,5 @@ + + case MIXERINIT: +- num = (int) value; ++ num = (intptr_t) value; + + VOXMixerInit = num; +--- server/dia/gram.y Mon Dec 22 21:00:04 2003 ++++ server/dia/gram.y Mon Oct 10 10:46:03 2005 +@@ -4,4 +4,5 @@ + + %{ ++#include <stdint.h> + #include <stdio.h> + #include <stdlib.h> +@@ -15,5 +16,5 @@ + + static char *ptr; +-static int parsebool(char *str); ++static intptr_t parsebool(const char *str); + extern int yylineno; + +@@ -22,5 +23,5 @@ + %union + { +- int num; ++ intptr_t num; + char *ptr; + }; +@@ -239,30 +240,21 @@ + } + +-static int parsebool(char *str) ++static intptr_t ++parsebool(const char *str) + { +- char *s; +- +- s = str; +- +- if (s == NULL) ++ if (str == NULL) + return(-1); + +- while(*s) +- { +- *s = (char)tolower(*s); +- s++; +- } +- +- if (((char *)strstr("false", str) != NULL) || +- ((char *)strstr("no", str) != NULL) || +- ((char *)strstr("0", str) != NULL) || +- ((char *)strstr("off", str) != NULL)) ++ if (((char *)strcasestr("false", str) != NULL) || ++ ((char *)strcasestr("no", str) != NULL) || ++ ((char *)strcasestr("0", str) != NULL) || ++ ((char *)strcasestr("off", str) != NULL)) + { + return(FALSE); + } +- else if (((char *)strstr("true", str) != NULL) || +- ((char *)strstr("yes", str) != NULL) || +- ((char *)strstr("1", str) != NULL) || +- ((char *)strstr("on", str) != NULL)) ++ else if (((char *)strcasestr("true", str) != NULL) || ++ ((char *)strcasestr("yes", str) != NULL) || ++ ((char *)strcasestr("1", str) != NULL) || ++ ((char *)strcasestr("on", str) != NULL)) + { + return(TRUE); +--- server/dia/lex.l Tue Jul 9 22:28:41 2002 ++++ server/dia/lex.l Mon Oct 10 10:47:16 2005 +@@ -3,4 +3,5 @@ + + %{ ++#include <stdint.h> + #include "auservertype.h" + #include "gram.h" ++++ clients/audio/widgets/Slider.c Mon Oct 10 11:04:41 2005 +@@ -32,4 +32,5 @@ + #include <X11/Xaw/Label.h> + #include <X11/Xaw/Scrollbar.h> ++#include <stdint.h> + #include <stdio.h> + #include "SliderP.h" +@@ -151,5 +152,5 @@ + (float) w->slider.value / w->slider.max, -1.0); + +- XtCallCallbacks((Widget) w, XtNcallback, (XtPointer) w->slider.value); ++ XtCallCallbacks((Widget) w, XtNcallback, (XtPointer)(intptr_t)w->slider.value); + } + } +@@ -162,5 +163,5 @@ + { + SliderWidget sw = (SliderWidget) swp; +- int position = (int) positionp; ++ intptr_t position = (intptr_t) positionp; + + setValue(sw, sw->slider.value + (position > 0 ? -1 : 1), True, False); +--- clients/audio/audemo/audemo.c Sun Jun 20 15:06:50 2004 ++++ clients/audio/audemo/audemo.c Mon Oct 10 11:12:15 2005 +@@ -29,4 +29,5 @@ + #include "config.h" + ++#include <stdint.h> + #include <stdio.h> + +@@ -973,5 +973,5 @@ + + /* retrieve the address of the globals from the first parameter */ +- globals = (GlobalDataPtr) atoi(params[0]); ++ globals = (GlobalDataPtr)(uintptr_t)strtoull(params[0], NULL, 0); + saveOk(w, globals, 0); + } +@@ -1296,5 +1296,5 @@ + { + GlobalDataPtr globals = (GlobalDataPtr) globalsp; +- int position = (int) positionp; ++ intptr_t position = (intptr_t) positionp; + int newVolume; + char buf[50]; +@@ -1363,5 +1363,5 @@ + { + GlobalDataPtr globals = (GlobalDataPtr) globalsp; +- int position = (int) positionp; ++ intptr_t position = (intptr_t) positionp; + int newGain; + char buf[50]; +@@ -1457,5 +1457,5 @@ + + /* pass the address of the globals as an argument to the action */ +- sprintf(tmp, "<Key>Return: ok(%u)", (unsigned int) g); ++ sprintf(tmp, "<Key>Return: ok(%p)", g); + XtOverrideTranslations(s->file, XtParseTranslationTable(tmp)); + +--- clients/audio/auedit/auedit.c Sun Jun 20 15:06:50 2004 ++++ clients/audio/auedit/auedit.c Mon Oct 10 11:16:16 2005 +@@ -28,4 +28,5 @@ + */ + ++#include <stdint.h> + #include <stdio.h> + +@@ -390,5 +390,5 @@ + { + GlobalDataPtr g = (GlobalDataPtr) gp; +- int p = (int) pp; ++ intptr_t p = (intptr_t) pp; + int n; + +@@ -406,5 +406,5 @@ + { + GlobalDataPtr g = (GlobalDataPtr) gp; +- int p = (int) pp; ++ intptr_t p = (intptr_t) pp; + int n; + +@@ -457,5 +457,5 @@ + { + GlobalDataPtr g = (GlobalDataPtr) gp; +- int gain = (int) gainp; ++ intptr_t gain = (intptr_t) gainp; + AuDeviceAttributes da; + +@@ -1844,5 +1844,5 @@ + { + GlobalDataPtr g = (GlobalDataPtr) gp; +- int value = (int) valuep; ++ intptr_t value = (intptr_t) valuep; + AuElementParameters *parms; + ElementListPtr p = ElementList; +--- clients/audio/auedit/Graph.c Sun Jun 20 15:01:41 2004 ++++ clients/audio/auedit/Graph.c Mon Oct 10 11:21:15 2005 +@@ -29,4 +29,5 @@ + + #include "config.h" ++#include <stdint.h> + + #if defined(HAVE_LIMITS_H) +@@ -453,5 +454,5 @@ + { + XtCallCallbacks((Widget) w, XtNleftProc, +- (XtPointer) w->graph.leftMarker); ++ (XtPointer)(intptr_t)w->graph.leftMarker); + redraw = TRUE; + } +@@ -460,5 +461,5 @@ + { + XtCallCallbacks((Widget) w, XtNrightProc, +- (XtPointer) w->graph.rightMarker); ++ (XtPointer)(intptr_t)w->graph.rightMarker); + redraw = TRUE; + } +@@ -540,8 +541,8 @@ + if (w->graph.marker == GraphLeftMarker) + XtCallCallbacks((Widget) w, XtNleftProc, +- (XtPointer) w->graph.leftMarker); ++ (XtPointer)(intptr_t)w->graph.leftMarker); + else + XtCallCallbacks((Widget) w, XtNrightProc, +- (XtPointer) w->graph.rightMarker); ++ (XtPointer)(intptr_t)w->graph.rightMarker); + } + +--- clients/audio/aupanel/aupanel.c Thu Apr 7 15:08:14 2005 ++++ clients/audio/aupanel/aupanel.c Mon Oct 10 11:23:01 2005 +@@ -29,4 +29,5 @@ + + #include <stdio.h> ++#include <stdint.h> + #include <stdlib.h> + #ifndef SYSV +@@ -262,5 +263,5 @@ + return; + +- AuDeviceInputMode(da) = (int) XawToggleGetCurrent(w) == 1 ++ AuDeviceInputMode(da) = (intptr_t) XawToggleGetCurrent(w) == 1 + ? AuDeviceInputModeLineIn : AuDeviceInputModeMicrophone; + +@@ -326,5 +327,5 @@ + GlobalDataPtr g = (GlobalDataPtr) gp; + AuDeviceAttributes *da = &g->da[g->deviceNum]; +- int value = (int) valuep; ++ intptr_t value = (intptr_t) valuep; + + AuDeviceGain(da) = AuFixedPointFromSum(value, 0); +--- clients/audio/autool/audiotool.c Sun Jun 20 19:27:08 2004 ++++ clients/audio/autool/audiotool.c Mon Oct 10 11:24:41 2005 +@@ -30,4 +30,5 @@ + #include "config.h" + ++#include <stdint.h> + #include <stdio.h> + +@@ -37,5 +38,5 @@ + + #if defined(HAVE_MALLOC_H) +-# include <malloc.h> ++# include <stdlib.h> + #endif + +@@ -387,5 +388,5 @@ + { + GlobalDataPtr globals = (GlobalDataPtr) data; +- int position = (int) cd; ++ intptr_t position = (intptr_t) cd; + int newVolume; + char buf[50]; +--- clients/audio/auwave/auwave.c Thu Apr 7 15:08:14 2005 ++++ clients/audio/auwave/auwave.c Mon Oct 10 11:26:40 2005 +@@ -28,4 +28,5 @@ + */ + ++#include <stdint.h> + #include <stdio.h> + #include <stdlib.h> +@@ -237,5 +238,5 @@ + { + GlobalDataPtr g = (GlobalDataPtr) gp; +- int value = (int) valuep; ++ intptr_t value = (intptr_t) valuep; + + AuElementParameters parms; +@@ -259,5 +260,5 @@ + { + GlobalDataPtr g = (GlobalDataPtr) gp; +- int value = (int) valuep; ++ intptr_t value = (intptr_t) valuep; + AuElementParameters parms; + char buf[10]; +@@ -284,5 +285,5 @@ + { + GlobalDataPtr g = (GlobalDataPtr) gp; +- int value = (int) valuep; ++ intptr_t value = (intptr_t) valuep; + AuDeviceAttributes da; + +--- clients/audio/auphone/auphone.c Sat Jul 20 21:13:30 2002 ++++ clients/audio/auphone/auphone.c Mon Oct 10 11:32:46 2005 +@@ -28,4 +28,5 @@ + */ + ++#include <stdint.h> + #include <stdio.h> + #include <stdlib.h> +@@ -218,7 +219,7 @@ + *busyData; + +-static int ++static intptr_t + fatalError(message, arg) +-char *message, ++const char *message, + *arg; + { +@@ -226,5 +227,4 @@ + fprintf(stderr, "\n"); + exit(1); +- return 0; + } + +@@ -240,5 +240,5 @@ + g->bufSize = e->num_bytes; + +- if (!(g->buf = (char *) malloc(g->bufSize))) ++ if (!(g->buf = malloc(g->bufSize))) + fatalError("malloc failed"); + } +@@ -252,6 +252,6 @@ + g->bufSize += e->num_bytes; + +- if (!(g->buf = (char *) realloc(g->buf, g->bufSize))) +- fatalError("malloc failed"); ++ if (!(g->buf = realloc(g->buf, g->bufSize))) ++ fatalError("realloc failed"); + } + +@@ -918,5 +918,5 @@ + { + GlobalDataPtr g = (GlobalDataPtr)gp; +- int vol = (int)volp; ++ intptr_t vol = (intptr_t)volp; + AuElementParameters parms; + +@@ -940,5 +940,5 @@ + { + GlobalDataPtr g = (GlobalDataPtr)gp; +- int gain = (int)gainp; ++ intptr_t gain = (intptr_t)gainp; + ServerPtr l = &g->local; + AuDeviceAttributes da; +@@ -1129,5 +1129,5 @@ + fatalError("Can't open ring %s", ring); + +- if (!(chunk = (char *) malloc(CHUNK_SIZE))) ++ if (!(chunk = malloc(CHUNK_SIZE))) + fatalError("malloc failed"); + |