Date: Fri, 19 Jan 2018 01:22:11 +0000 (UTC) From: Diane Bruce <db@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r459386 - in head/audio/xanalyser: . files Message-ID: <201801190122.w0J1MBCS006172@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: db Date: Fri Jan 19 01:22:11 2018 New Revision: 459386 URL: https://svnweb.freebsd.org/changeset/ports/459386 Log: - Fix build under clang6 - replace pkg-plist with PLIST_FILES - add LICENSE Reported by: pkg-fallout Added: head/audio/xanalyser/files/patch-src_Analyser.cc (contents, props changed) head/audio/xanalyser/files/patch-src_Scope.cc (contents, props changed) head/audio/xanalyser/files/patch-src_control.cc (contents, props changed) Deleted: head/audio/xanalyser/pkg-plist Modified: head/audio/xanalyser/Makefile Modified: head/audio/xanalyser/Makefile ============================================================================== --- head/audio/xanalyser/Makefile Fri Jan 19 01:13:17 2018 (r459385) +++ head/audio/xanalyser/Makefile Fri Jan 19 01:22:11 2018 (r459386) @@ -11,8 +11,13 @@ MASTER_SITES= http://arvin.schnell-web.net/xanalyser/ MAINTAINER= db@FreeBSD.org COMMENT= Spectrum analyser +LICENSE= GPLv2+ +LICENSE_FILE= ${WRKSRC}/COPYING + USES= gmake libtool motif tar:bzip2 GNU_CONFIGURE= yes + +PLIST_FILES= bin/xanalyser lib/X11/app-defaults/XAnalyser man/man1/xanalyser.1.gz post-patch: @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ Added: head/audio/xanalyser/files/patch-src_Analyser.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/xanalyser/files/patch-src_Analyser.cc Fri Jan 19 01:22:11 2018 (r459386) @@ -0,0 +1,128 @@ +--- src/Analyser.cc.orig 2018-01-19 00:36:36 UTC ++++ src/Analyser.cc +@@ -146,7 +146,7 @@ Analyser::resize (bool redraw) + marker[1] = f2sx (f[1]); + + if (redraw) { +- XRectangle rect = { 0, 0, width, height }; ++ XRectangle rect = { 0, 0, static_cast<unsigned short>(width), static_cast<unsigned short>(height) }; + draw (rect); + } + } +@@ -169,7 +169,7 @@ Analyser::clear (bool drawit) + calcfoo (); + + if (drawit) { +- XRectangle rect = { 0, 0, width, height }; ++ XRectangle rect = { 0, 0, static_cast<unsigned short>(width), static_cast<unsigned short>(height) }; + draw (rect); + } + } +@@ -188,7 +188,7 @@ Analyser::drawpeaktext (bool showit) + + snprintf (peak_text, 10, "%i", (int) peak_f); + +- peak_sx = f2sx (peak_f) - (strlen (peak_text) * font_width) / 2; ++ peak_sx = f2sx (peak_f) - (strlen (peak_text) * font_width) / 2; + peak_sy = db2sy (peak_db) - 6; + + XSetForeground (display, gc, xanalyser.markercolor); +@@ -203,7 +203,7 @@ void + Analyser::drawpeakmarker () + { + for (int m = 0; m < 2; m++) { +- XRectangle rect = { marker[m], 0, 1, height }; ++ XRectangle rect = { static_cast<short>(marker[m]), 0, 1, static_cast<unsigned short>(height) }; + draw (rect); + } + } +@@ -251,13 +251,13 @@ Analyser::drawgrid (bool withtext) + else + XSetForeground (display, gc, xanalyser.minorgridcolor); + +- XDrawLine (display, window, gc, 0, sy, width - 1, sy); ++ XDrawLine (display, window, gc, 0, sy, static_cast<unsigned short>(width) - 1, sy); + + if (withtext) { + const int size = 10; + char buffer[size]; + snprintf (buffer, size, "%+d", db); +- XDrawString (display, window, gc, width - 2 - font_width * ++ XDrawString (display, window, gc, static_cast<unsigned short>(width) - 2 - font_width * + strlen (buffer), sy - 2, buffer, strlen (buffer)); + } + } +@@ -280,7 +280,7 @@ Analyser::draw (XRectangle rect, bool complete) + if (complete) { + + XSetForeground (display, gc, xanalyser.backgroundcolor); +- XFillRectangle (display, window, gc, 0, 0, width, height); ++ XFillRectangle (display, window, gc, 0, 0, static_cast<unsigned short>(width), height); + + XSetForeground (display, gc, xanalyser.datacolor); + for (int sx = first; sx <= last; sx++) { +@@ -344,7 +344,7 @@ Analyser::realize (Display* display, Window window) + + gc = XCreateGC (display, window, gc_mask, &gc_values); + +- // get width and height ++ // get static_cast<unsigned short>(width) and height + + myXGetDrawableSize (display, window, &width, &height); + +@@ -382,8 +382,8 @@ Analyser::realize (Display* display, Window window) + envelope (); + + marker[0] = 0; +- // note: it might be that width - 1 != num_fft - 1 +- marker[1] = width - 1; ++ // note: it might be that static_cast<unsigned short>(width) - 1 != num_fft - 1 ++ marker[1] = static_cast<unsigned short>(width) - 1; + + return true; + } +@@ -427,7 +427,7 @@ Analyser::shot (const int32_t* buffer, int channel, bo + analyse (buffer, channel); + + if (drawit) { +- XRectangle rect = { 0, 0, width, height }; ++ XRectangle rect = { 0, 0, static_cast<unsigned short>(width), static_cast<unsigned short>(height) }; + draw (rect, false); + } + +@@ -608,7 +608,7 @@ Analyser::set_search (bool search) + drawpeaktext (true); + + for (int m = 0; m < 2; m++) { +- XRectangle rect = { marker[m], 0, 1, height }; ++ XRectangle rect = { static_cast<short>(marker[m]), 0, 1, static_cast<unsigned short>(height) }; + draw (rect); + } + +@@ -618,7 +618,7 @@ Analyser::set_search (bool search) + drawpeaktext (false); + + for (int m = 0; m < 2; m++) { +- XRectangle rect = { marker[m], 0, 1, height }; ++ XRectangle rect = { static_cast<short>(marker[m]), 0, 1, static_cast<unsigned short>(height) }; + draw (rect); + } + +@@ -647,7 +647,7 @@ Analyser::set_marker (short sx) + + // remove old marker and text + +- XRectangle rect = { old, 0, 1, height }; ++ XRectangle rect = { old, 0, 1, static_cast<unsigned short>(height) }; + draw (rect); + + XSetClipMask (display, gc, None); +@@ -662,7 +662,7 @@ Analyser::set_marker (short sx) + peaksearch (true); + + for (int m = 0; m < 2; m++) { +- XRectangle rect = { marker[m], 0, 1, height }; ++ XRectangle rect = { static_cast<short>(marker[m]), 0, 1, static_cast<unsigned short>(height) }; + draw (rect); + } + Added: head/audio/xanalyser/files/patch-src_Scope.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/xanalyser/files/patch-src_Scope.cc Fri Jan 19 01:22:11 2018 (r459386) @@ -0,0 +1,29 @@ +--- src/Scope.cc.orig 2018-01-19 00:47:02 UTC ++++ src/Scope.cc +@@ -132,7 +132,7 @@ Scope::resize (bool redraw) + clearbuffer (); + + if (redraw) { +- XRectangle rect = { 0, 0, width, height }; ++ XRectangle rect = { 0, 0, static_cast<unsigned short>(width), static_cast<unsigned short>(height) }; + draw (rect); + } + } +@@ -193,7 +193,7 @@ Scope::clear (bool drawit) + clearbuffer (); + + if (drawit) { +- XRectangle rect = { 0, 0, width, height }; ++ XRectangle rect = { 0, 0, static_cast<unsigned short>(width), static_cast<unsigned short>(height) }; + draw (rect); + } + } +@@ -310,7 +310,7 @@ Scope::shot (const int32_t* buffer, bool drawit) + } + + if (drawit && sample.frame_count % num_count == num_count - 1) { +- XRectangle rect = { 0, 0, width, height }; ++ XRectangle rect = { 0, 0, static_cast<unsigned short>(width), static_cast<unsigned short>(height) }; + draw (rect); + } + Added: head/audio/xanalyser/files/patch-src_control.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/audio/xanalyser/files/patch-src_control.cc Fri Jan 19 01:22:11 2018 (r459386) @@ -0,0 +1,29 @@ +--- src/control.cc.orig 2018-01-19 00:48:36 UTC ++++ src/control.cc +@@ -566,7 +566,7 @@ analyser_callback (Widget, XtPointer client_data, XtPo + XtWindow (analyser_drawing_w[n])); + + XExposeEvent* e = (XExposeEvent*) c->event; +- XRectangle rect = { e->x, e->y, e->width, e->height }; ++ XRectangle rect = { static_cast<short>(e->x), static_cast<short>(e->y), static_cast<unsigned short>(e->width), static_cast<unsigned short>(e->height) }; + analyser[n].draw (rect); + + } break; +@@ -585,7 +585,7 @@ analyser_callback (Widget, XtPointer client_data, XtPo + case ButtonPress: + case MotionNotify: { + XButtonPressedEvent* e = (XButtonPressedEvent*) c->event; +- XPoint point = { e->x, e->y }; ++ XPoint point = { static_cast<short>(e->x),static_cast<short>(e->y) }; + + analyser[0].set_marker (point.x); + analyser[1].set_marker (point.x); +@@ -709,7 +709,7 @@ scope_callback (Widget, XtPointer, XtPointer call_data + scope.realize (XtDisplay (scope_drawing_w), XtWindow (scope_drawing_w)); + + XExposeEvent* e = (XExposeEvent*) c->event; +- XRectangle rect = { e->x, e->y, e->width, e->height }; ++ XRectangle rect = { static_cast<short>(e->x),static_cast<short>(e->y), static_cast<unsigned short>(e->width), static_cast<unsigned short>(e->height) }; + scope.draw (rect); + + } break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801190122.w0J1MBCS006172>