From owner-svn-ports-head@freebsd.org Sun Jan 21 02:24:24 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E875ED663A; Sun, 21 Jan 2018 02:24:24 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 09B1676761; Sun, 21 Jan 2018 02:24:24 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4B4FF251B2; Sun, 21 Jan 2018 02:24:23 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0L2ONQ7050666; Sun, 21 Jan 2018 02:24:23 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0L2ONHT050665; Sun, 21 Jan 2018 02:24:23 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201801210224.w0L2ONHT050665@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Sun, 21 Jan 2018 02:24:23 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r459570 - head/graphics/libprojectm/files X-SVN-Group: ports-head X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: head/graphics/libprojectm/files X-SVN-Commit-Revision: 459570 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jan 2018 02:24:24 -0000 Author: jbeich Date: Sun Jan 21 02:24:22 2018 New Revision: 459570 URL: https://svnweb.freebsd.org/changeset/ports/459570 Log: graphics/libprojectm: unbreak build with Clang 6 (C++14 by default) MilkdropPresetFactory/Parser.cpp:1408:10: error: invalid operands to binary expression ('std::istream' (aka 'basic_istream') and 'nullptr_t') if (fs == NULL) ~~ ^ ~~~~ Renderer/VideoEcho.cpp:77:30: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing] float pointsFlip[4][2] = {{-0.5*flipx, -0.5*flipy}, ^~~~~~~~~~ Renderer/VideoEcho.cpp:77:30: note: insert an explicit cast to silence this issue float pointsFlip[4][2] = {{-0.5*flipx, -0.5*flipy}, ^~~~~~~~~~ static_cast( ) Reported by: pkg-fallout Obtained from: upstream Added: head/graphics/libprojectm/files/patch-c++11 (contents, props changed) Added: head/graphics/libprojectm/files/patch-c++11 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/libprojectm/files/patch-c++11 Sun Jan 21 02:24:22 2018 (r459570) @@ -0,0 +1,87 @@ +https://github.com/projectM-visualizer/projectm/commit/92226e25192a + +with a fix not yet upstream for + +Renderer/VideoEcho.cpp:77:30: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing] + float pointsFlip[4][2] = {{-0.5*flipx, -0.5*flipy}, + ^~~~~~~~~~ +Renderer/VideoEcho.cpp:77:30: note: insert an explicit cast to silence this issue + float pointsFlip[4][2] = {{-0.5*flipx, -0.5*flipy}, + ^~~~~~~~~~ + static_cast( ) + +--- Common.hpp.orig 2009-12-06 01:42:51 UTC ++++ Common.hpp +@@ -55,7 +55,7 @@ extern FILE *fmemopen(void *buf, size_t len, const cha + + #ifdef LINUX + #include +-#define projectM_isnan isnan ++#define projectM_isnan std::isnan + + #endif + +--- MilkdropPresetFactory/Parser.cpp.orig 2009-12-06 01:42:51 UTC ++++ MilkdropPresetFactory/Parser.cpp +@@ -1405,7 +1405,7 @@ PerFrameEqn * Parser::parse_implicit_per_frame_eqn(std + PerFrameEqn * per_frame_eqn; + GenExpr * gen_expr; + +- if (fs == NULL) ++ if (fs.fail()) + return NULL; + if (param_string == NULL) + return NULL; +@@ -1560,7 +1560,7 @@ InitCond * Parser::parse_per_frame_init_eqn(std::istre + + if (preset == NULL) + return NULL; +- if (fs == NULL) ++ if (fs.fail()) + return NULL; + + if ((token = parseToken(fs, name)) != tEq) +@@ -1874,7 +1874,7 @@ int Parser::parse_shapecode(char * token, std::istream + /* Null argument checks */ + if (preset == NULL) + return PROJECTM_FAILURE; +- if (fs == NULL) ++ if (fs.fail()) + return PROJECTM_FAILURE; + if (token == NULL) + return PROJECTM_FAILURE; +@@ -2165,7 +2165,7 @@ int Parser::parse_wave(char * token, std::istream & f + + if (token == NULL) + return PROJECTM_FAILURE; +- if (fs == NULL) ++ if (fs.fail()) + return PROJECTM_FAILURE; + if (preset == NULL) + return PROJECTM_FAILURE; +@@ -2347,7 +2347,7 @@ int Parser::parse_shape(char * token, std::istream & + if (token == NULL) + + return PROJECTM_FAILURE; +- if (fs == NULL) ++ if (fs.fail()) + return PROJECTM_FAILURE; + if (preset == NULL) + return PROJECTM_FAILURE; +--- Renderer/VideoEcho.cpp.orig 2009-12-06 01:42:51 UTC ++++ Renderer/VideoEcho.cpp +@@ -74,10 +74,10 @@ void VideoEcho::Draw(RenderContext &context) + default: flipx=1;flipy=1; break; + } + +- float pointsFlip[4][2] = {{-0.5*flipx, -0.5*flipy}, +- {-0.5*flipx, 0.5*flipy}, +- { 0.5*flipx, 0.5*flipy}, +- { 0.5*flipx, -0.5*flipy}}; ++ float pointsFlip[4][2] = {{-0.5f*flipx, -0.5f*flipy}, ++ {-0.5f*flipx, 0.5f*flipy}, ++ { 0.5f*flipx, 0.5f*flipy}, ++ { 0.5f*flipx, -0.5f*flipy}}; + + glVertexPointer(2,GL_FLOAT,0,pointsFlip); + glDrawArrays(GL_TRIANGLE_FAN,0,4);