From owner-svn-ports-all@FreeBSD.ORG Mon Apr 13 07:06:09 2015 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D9872AC; Mon, 13 Apr 2015 07:06:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88475A58; Mon, 13 Apr 2015 07:06:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3D769gx098410; Mon, 13 Apr 2015 07:06:09 GMT (envelope-from marino@FreeBSD.org) Received: (from marino@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3D769NS098408; Mon, 13 Apr 2015 07:06:09 GMT (envelope-from marino@FreeBSD.org) Message-Id: <201504130706.t3D769NS098408@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marino set sender to marino@FreeBSD.org using -f From: John Marino Date: Mon, 13 Apr 2015 07:06:09 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r383899 - in head/games/megaglest: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Apr 2015 07:06:09 -0000 Author: marino Date: Mon Apr 13 07:06:08 2015 New Revision: 383899 URL: https://svnweb.freebsd.org/changeset/ports/383899 Log: games/megaglest: Fix code to allow Clang to build it again Not only was the previous commit unsavory, it didn't work due to conflict between libc++ and libstdc++. The added patch from miniz upstream fixes the breakage. Suggested by: jbeich Added: head/games/megaglest/files/patch-source_shared__lib_sources_miniz_miniz.c (contents, props changed) Modified: head/games/megaglest/Makefile Modified: head/games/megaglest/Makefile ============================================================================== --- head/games/megaglest/Makefile Mon Apr 13 06:51:44 2015 (r383898) +++ head/games/megaglest/Makefile Mon Apr 13 07:06:08 2015 (r383899) @@ -3,7 +3,7 @@ PORTNAME= megaglest PORTVERSION= 3.9.0.4 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= games MASTER_SITES= SF/${PORTNAME}/${PORTNAME}_3.9.0/ DISTNAME= ${PORTNAME}-source-${PORTVERSION} @@ -23,11 +23,8 @@ RUN_DEPENDS= ${DATADIR}/tutorials/2_basi SUB_FILES= pkg-message -# Clang catches a c++11 violation that older GCC misses, so until the -# code is fixed, remove USES+=compiler:c++11-lib and set USE_GCC=yes -USES= cmake display:build dos2unix lua openal:al,alut pkgconfig \ - tar:xz -USE_GCC= yes +USES= cmake compiler:c++11-lib display:build dos2unix lua \ + openal:al,alut pkgconfig tar:xz USE_GL= glew gl glu USE_SDL= yes USE_WX= 3.0 Added: head/games/megaglest/files/patch-source_shared__lib_sources_miniz_miniz.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/megaglest/files/patch-source_shared__lib_sources_miniz_miniz.c Mon Apr 13 07:06:08 2015 (r383899) @@ -0,0 +1,19 @@ +--- source/shared_lib/sources/miniz/miniz.c.orig 2015-04-13 04:50:02 UTC ++++ source/shared_lib/sources/miniz/miniz.c +@@ -2765,6 +2765,7 @@ mz_uint tdefl_create_comp_flags_from_zip + // http://altdevblogaday.org/2011/04/06/a-smaller-jpg-encoder/. + void *tdefl_write_image_to_png_file_in_memory(const void *pImage, int w, int h, int num_chans, size_t *pLen_out) + { ++ static const mz_uint8 chans[] = {0x00, 0x00, 0x04, 0x02, 0x06}; + tdefl_compressor *pComp = (tdefl_compressor *)MZ_MALLOC(sizeof(tdefl_compressor)); tdefl_output_buffer out_buf; int i, bpl = w * num_chans, y, z; mz_uint32 c; *pLen_out = 0; + if (!pComp) return NULL; + MZ_CLEAR_OBJ(out_buf); out_buf.m_expandable = MZ_TRUE; out_buf.m_capacity = 57+MZ_MAX(64, (1+bpl)*h); if (NULL == (out_buf.m_pBuf = (mz_uint8*)MZ_MALLOC(out_buf.m_capacity))) { MZ_FREE(pComp); return NULL; } +@@ -2778,7 +2779,7 @@ void *tdefl_write_image_to_png_file_in_m + *pLen_out = out_buf.m_size-41; + { + mz_uint8 pnghdr[41]={0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,0x44,0x52, +- 0,0,(mz_uint8)(w>>8),(mz_uint8)w,0,0,(mz_uint8)(h>>8),(mz_uint8)h,8,"\0\0\04\02\06"[num_chans],0,0,0,0,0,0,0, ++ 0,0,(mz_uint8)(w>>8),(mz_uint8)w,0,0,(mz_uint8)(h>>8),(mz_uint8)h,8,chans[num_chans],0,0,0,0,0,0,0, + (mz_uint8)(*pLen_out>>24),(mz_uint8)(*pLen_out>>16),(mz_uint8)(*pLen_out>>8),(mz_uint8)*pLen_out,0x49,0x44,0x41,0x54}; + c=(mz_uint32)mz_crc32(MZ_CRC32_INIT,pnghdr+12,17); for (i=0; i<4; ++i, c<<=8) ((mz_uint8*)(pnghdr+29))[i]=(mz_uint8)(c>>24); + memcpy(out_buf.m_pBuf, pnghdr, 41);