From owner-svn-ports-head@freebsd.org Fri Aug 3 17:36:24 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC7A8106F8B8; Fri, 3 Aug 2018 17:36:23 +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 A2ACE8DAFF; Fri, 3 Aug 2018 17:36:23 +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 84A3A238EA; Fri, 3 Aug 2018 17:36: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 w73HaNoT075732; Fri, 3 Aug 2018 17:36:23 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w73HaNok075730; Fri, 3 Aug 2018 17:36:23 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201808031736.w73HaNok075730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Fri, 3 Aug 2018 17:36:23 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r476312 - in head/games/freeorion: . files X-SVN-Group: ports-head X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: in head/games/freeorion: . files X-SVN-Commit-Revision: 476312 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.27 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: Fri, 03 Aug 2018 17:36:24 -0000 Author: jbeich Date: Fri Aug 3 17:36:22 2018 New Revision: 476312 URL: https://svnweb.freebsd.org/changeset/ports/476312 Log: games/freeorion: unbreak with boost 1.68 In file included from GG/src/GUI.cpp:44: GG/src/gilext/io/png_io.hpp:39:10: fatal error: 'boost/gil/extension/io/io_error.hpp' file not found #include ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ GG/src/gilext/io/png_io_private.hpp:46:37: error: use of undeclared identifier 'bits8' template <> struct png_is_supported {BOOST_STATIC_CONSTANT(bool,value=true);}; ^ In file included from GG/src/Texture.cpp:39: GG/src/gilext/io/png_dynamic_io.hpp:37:10: fatal error: 'boost/gil/extension/io/dynamic_io.hpp' file not found #include ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from GG/src/gilext/io/png_dynamic_io.hpp:43: In file included from GG/src/gilext/io/png_io.hpp:38: In file included from GG/src/gilext/io/png_io_private.hpp:30: GG/src/gilext/io/../typedefs.hpp:30:40: error: too few arguments provided to function-like macro invocation GIL_DEFINE_BASE_TYPEDEFS(8, gray_alpha) ^ /usr/local/include/boost/gil/typedefs.hpp:86:9: note: macro 'GIL_DEFINE_BASE_TYPEDEFS' defined here #define GIL_DEFINE_BASE_TYPEDEFS(B, CM, CS) \ ^ In file included from GG/src/GUI.cpp:44: In file included from GG/src/gilext/io/png_io.hpp:40: GG/src/gilext/io/png_io_private.hpp:167:27: error: expected class name class png_reader : public file_mgr { ^ PR: 229699 Obtained from: upstream Approved by: maintainer timeout (2 weeks) Added: head/games/freeorion/files/patch-boost168 (contents, props changed) Modified: head/games/freeorion/Makefile (contents, props changed) Modified: head/games/freeorion/Makefile ============================================================================== --- head/games/freeorion/Makefile Fri Aug 3 17:13:49 2018 (r476311) +++ head/games/freeorion/Makefile Fri Aug 3 17:36:22 2018 (r476312) @@ -4,6 +4,7 @@ PORTNAME= freeorion DISTVERSIONPREFIX= v DISTVERSION= 0.4.8-rc1 +PORTREVISION= 1 CATEGORIES= games MAINTAINER= amdmi3@FreeBSD.org Added: head/games/freeorion/files/patch-boost168 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/freeorion/files/patch-boost168 Fri Aug 3 17:36:22 2018 (r476312) @@ -0,0 +1,168 @@ +https://github.com/freeorion/freeorion/pull/2221 + +--- GG/CMakeLists.txt.orig 2018-06-14 14:12:09 UTC ++++ GG/CMakeLists.txt +@@ -144,6 +144,16 @@ if(USE_STATIC_LIBS) + ) + endif() + ++target_compile_definitions(GiGi ++ PRIVATE ++ ++ # Starting with boost 1.68 boost::gil integrates support for ++ # grayscale-alpha png images, so prefer their implementation ++ # instead of our hacky gilext code. ++ $<$:GIGI_CONFIG_USE_OLD_IMPLEMENTATION_OF_GIL_PNG_IO> ++ $<$:BOOST_GIL_IO_ENABLE_GRAY_ALPHA> ++) ++ + target_include_directories(GiGi SYSTEM + PRIVATE + ${Boost_INCLUDE_DIRS} +--- GG/src/GUI.cpp.orig 2018-06-14 14:12:09 UTC ++++ GG/src/GUI.cpp +@@ -37,14 +37,19 @@ + #include + + #if GG_HAVE_LIBPNG +-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 7) +-# pragma GCC diagnostic push +-# pragma GCC diagnostic ignored "-Wunused-local-typedefs" ++# if GIGI_CONFIG_USE_OLD_IMPLEMENTATION_OF_GIL_PNG_IO ++# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 7) ++# pragma GCC diagnostic push ++# pragma GCC diagnostic ignored "-Wunused-local-typedefs" ++# endif ++# include "gilext/io/png_io.hpp" ++# include "gilext/io/png_io_v2_compat.hpp" ++# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 7) ++# pragma GCC diagnostic pop ++# endif ++# else ++# include + # endif +-# include "gilext/io/png_io.hpp" +-# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 7) +-# pragma GCC diagnostic pop +-# endif + #endif + + #include +@@ -132,12 +137,15 @@ namespace { + glPopClientAttrib(); + + using namespace boost::gil; +- png_write_view(filename, +- flipped_up_down_view( +- interleaved_view(Value(size.x), +- Value(size.y), +- static_cast(static_cast(&bytes[0])), +- Value(size.x) * sizeof(rgba8_pixel_t)))); ++ write_view( ++ filename, ++ flipped_up_down_view( ++ interleaved_view( ++ Value(size.x), ++ Value(size.y), ++ static_cast(static_cast(&bytes[0])), ++ Value(size.x) * sizeof(rgba8_pixel_t))), ++ png_tag()); + #endif + } + } +--- GG/src/Texture.cpp.orig 2018-06-14 14:12:09 UTC ++++ GG/src/Texture.cpp +@@ -36,7 +36,12 @@ + #include + + #if GG_HAVE_LIBPNG +-# include "gilext/io/png_dynamic_io.hpp" ++# if GIGI_CONFIG_USE_OLD_IMPLEMENTATION_OF_GIL_PNG_IO ++# include "gilext/io/png_dynamic_io.hpp" ++# include "gilext/io/png_io_v2_compat.hpp" ++# else ++# include ++# endif + #endif + + #include +@@ -241,12 +246,12 @@ void Texture::Load(const boost::filesystem::path& path + // formats above. + #if GG_HAVE_LIBPNG + if (extension == ".png") +- gil::png_read_image(path, image); ++ gil::read_image(filename, image, gil::image_read_settings()); + else + #endif + #if GG_HAVE_LIBTIFF + if (extension == ".tif" || extension == ".tiff") +- gil::tiff_read_image(filename, image); ++ gil::read_image(filename, image, gil::image_read_settings()); + else + #endif + throw BadFile("Texture file \"" + filename + "\" does not have a supported file extension"); +@@ -256,14 +261,14 @@ void Texture::Load(const boost::filesystem::path& path + #if GG_HAVE_LIBPNG + if (extension == ".png") { + gil::rgba8_image_t rgba_image; +- gil::png_read_and_convert_image(path, rgba_image); ++ gil::read_and_convert_image(filename, rgba_image, gil::image_read_settings()); + image.move_in(rgba_image); + } + #endif + #if GG_HAVE_LIBTIFF + if (extension == ".tif" || extension == ".tiff") { + gil::rgba8_image_t rgba_image; +- gil::tiff_read_and_convert_image(filename, rgba_image); ++ gil::read_and_convert_image(filename, rgba_image, gil::image_read_settings()); + image.move_in(rgba_image); + } + #endif +--- GG/src/gilext/io/png_io_v2_compat.hpp.orig 2018-07-20 13:44:48 UTC ++++ GG/src/gilext/io/png_io_v2_compat.hpp +@@ -0,0 +1,45 @@ ++#ifndef GILEXT_PNG_IO_V2_COMPAT_H ++#define GILEXT_PNG_IO_V2_COMPAT_H ++ ++namespace boost { namespace gil { ++ ++struct png_tag {}; ++ ++template< typename Tag> ++struct image_read_settings {}; ++ ++template< typename String ++ , typename Image ++ , typename FormatTag ++ > ++inline ++void read_image( const String& file_name ++ , Image& image ++ , const FormatTag& tag ++ ) ++{ boost::gil::png_read_image(file_name, image); } ++ ++template< typename String ++ , typename Image ++ , typename FormatTag ++ > ++inline ++void read_and_convert_image( const String& file_name ++ , Image& image ++ , const FormatTag& tag ++ ) ++{ boost::gil::png_read_and_convert_image(file_name, image); } ++} } ++ ++template< typename String ++ , typename View ++ , typename FormatTag ++ > ++inline ++void write_view( const String& file_name ++ , const View& view ++ , const FormatTag& tag ++ ) ++{ boost::gil::png_write_view( file_name, view); } ++ ++#endif