From owner-svn-ports-all@freebsd.org Fri Aug 31 23:24:21 2018 Return-Path: Delivered-To: svn-ports-all@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 C96ABFCDB9E; Fri, 31 Aug 2018 23:24:21 +0000 (UTC) (envelope-from tobik@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 7CB408A83A; Fri, 31 Aug 2018 23:24:21 +0000 (UTC) (envelope-from tobik@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 544CA21EB3; Fri, 31 Aug 2018 23:24:21 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7VNOLw1011290; Fri, 31 Aug 2018 23:24:21 GMT (envelope-from tobik@FreeBSD.org) Received: (from tobik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7VNOK9U011285; Fri, 31 Aug 2018 23:24:20 GMT (envelope-from tobik@FreeBSD.org) Message-Id: <201808312324.w7VNOK9U011285@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tobik set sender to tobik@FreeBSD.org using -f From: Tobias Kortkamp Date: Fri, 31 Aug 2018 23:24:20 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r478622 - in head/emulators/lisaem: . files X-SVN-Group: ports-head X-SVN-Commit-Author: tobik X-SVN-Commit-Paths: in head/emulators/lisaem: . files X-SVN-Commit-Revision: 478622 X-SVN-Commit-Repository: ports 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.27 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: Fri, 31 Aug 2018 23:24:22 -0000 Author: tobik Date: Fri Aug 31 23:24:20 2018 New Revision: 478622 URL: https://svnweb.freebsd.org/changeset/ports/478622 Log: emulators/lisaem: Fix build with Clang 6 lisaem_static_resources.cpp:672:1: error: constant expression evaluates to 3735928559 which cannot be narrowed to type 'long' [-Wc++11-narrowing] 0xdeadbeef ^~~~~~~~~ http://beefy11.nyi.freebsd.org/data/head-i386-default/p478276_s338342/logs/errors/lisaem-1.2.6.2.log - Move build script patches to a static patch file and fix it to respect CXXFLAGS, CFLAGS, LDFLAGS set by the framework Added: head/emulators/lisaem/files/patch-build.sh (contents, props changed) Modified: head/emulators/lisaem/Makefile Modified: head/emulators/lisaem/Makefile ============================================================================== --- head/emulators/lisaem/Makefile Fri Aug 31 23:21:44 2018 (r478621) +++ head/emulators/lisaem/Makefile Fri Aug 31 23:24:20 2018 (r478622) @@ -14,16 +14,17 @@ BUILD_DEPENDS= pngtopnm:graphics/netpbm LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING -USES= tar:bzip2 +USES= compiler tar:bzip2 USE_WX= 2.8 +BINARY_ALIAS= wx-config=${WX_CONFIG} + +CXXFLAGS+= ${CXXFLAGS_${CHOSEN_COMPILER_TYPE}} +CXXFLAGS_clang= -Wno-c++11-narrowing + DESKTOP_ENTRIES="LisaEm" "" "lisaem" "lisaem" "" "" post-patch: - @${REINPLACE_CMD} -e 's|bash|sh|; s|==|=|; \ - s|wx-config|${WX_CONFIG:T}|; \ - s|/usr/local/|${PREFIX}/|; \ - s|^function ||; /[Ss]trip/d' ${WRKSRC}/build.sh @${REINPLACE_CMD} -e \ 's|^inline |static inline |' ${WRKSRC}/lisa/zilog8530.c @@ -40,6 +41,5 @@ do-install: (cd ${WRKDIR} && ${INSTALL_DATA} lisaem.png ${STAGEDIR}${PREFIX}/share/pixmaps) @${MKDIR} ${STAGEDIR}${DATADIR} (cd ${WRKSRC}/resources && ${INSTALL_DATA} * ${STAGEDIR}${DATADIR}) - ${LN} -sf lisaem ${STAGEDIR}${PREFIX}/share/LisaEm .include Added: head/emulators/lisaem/files/patch-build.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/emulators/lisaem/files/patch-build.sh Fri Aug 31 23:24:20 2018 (r478622) @@ -0,0 +1,134 @@ +--- build.sh.orig 2015-09-03 19:56:33 UTC ++++ build.sh +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + + #### Edit these options for your system + +@@ -46,7 +46,7 @@ done + + if [ -z "$CYGWIN" ]; + then +- [ "`uname`" == "CYGWIN_NT-5.0" ] && CYGWIN="`uname`" ++ [ "`uname`" = "CYGWIN_NT-5.0" ] && CYGWIN="`uname`" + fi + + +@@ -121,9 +121,9 @@ WITHBLITS="-DUSE_RAW_BITMAP_ACCESS" + export RCINCS="--include-dir=`cygpath -wp ${WXDEV}/include/common` " + export DEFINES="-D__WXMSW__ -D__GNUWIN32__ -D__WIN95__ -D __WIN32__" + export CXXINCS="-I. -I ..\include -I ..\cpu68k -I ..\\wxui -I `cygpath -wp ${MINGW}/include` -I `cygpath -wp ${MINGCPP}/backward` -I `cygpath -wp ${MINGCPP}/mingw32` -I `cygpath -wp ${MINGCPP}` -I `cygpath -wp ${WXDEV}/include` -I `cygpath -wp ${WXDEV}/` -I `cygpath -wp ${WXDEV}/include/common/wx/msw` -I `cygpath -wp ${WXDEV}/include/common/wx/generic` -I `cygpath -wp ${WXDEV}/include/common/wx/fl` -I `cygpath -wp ${WXDEV}/include/common/wx/gizmos` -I `cygpath -wp ${WXDEV}/include/common/wx/html` -I `cygpath -wp ${WXDEV}/include/common/wx/mmedia` -I `cygpath -wp ${WXDEV}/include/common/wx/net` -I `cygpath -wp ${WXDEV}/include/common/wx/ogl` -I `cygpath -wp ${WXDEV}/include/common/wx/plot` -I `cygpath -wp ${WXDEV}/include/common/wx/protocol` -I `cygpath -wp ${WXDEV}/include/common/wx/stc` -I `cygpath -wp ${WXDEV}/include/common/wx/svg` -I `cygpath -wp ${WXDEV}/include/common/wx/xml` -I `cygpath -wp ${WXDEV}/include/common/wx/xrc` -I `cygpath -wp ${WXDEV}/inclu de/common/wx` -I `cygpath -wp ${WXDEV}/include/common`" +- export CXXFLAGS="${CXXINCS} ${DEFINES}" ++ export CXXFLAGS="${CXXFLAGS} ${CXXINCS} ${DEFINES}" + export CXXFLAGS="-Wno-write-strings ${CXXINCS} ${DEFINES}" #2015.08.30 allow GCC 4.6.3 to ignore constant violation +- export CFLAGS="${INCS} ${DEFINES} -fno-exceptions -fno-pcc-struct-return -fstrict-aliasing $WARNINGS -Wno-format -Wno-unused -D__WXMSW__ -D__GNUWIN32__ -D__WIN95__ -fexpensive-optimizations -O3" ++ export CFLAGS="${CFLAGS} ${INCS} ${DEFINES} -fno-exceptions -fno-pcc-struct-return -fstrict-aliasing $WARNINGS -Wno-format -Wno-unused -D__WXMSW__ -D__GNUWIN32__ -D__WIN95__" + export GPROF=gprof.exe + export RM="rm -f" + export LINK=g++.exe +@@ -172,7 +172,7 @@ esac + + fi + #$CYGWIN is pre-set. Cache $DARWIN so we don't have to call uname over and over. +-[ "`uname`" == "Darwin" ] && DARWIN="Darwin" ++[ "`uname`" = "Darwin" ] && DARWIN="Darwin" + + + # not needed on OS X +@@ -234,11 +234,11 @@ fi + # if the object is older than the source, it will return true. + ############################################################################## + +-function NEEDED() ++NEEDED() + { + if [ -f $2 ] + then +- [ "`ls -tr $2 $1 2>/dev/null| tail -1`" == "$1" ] && return 0 ++ [ "`ls -tr $2 $1 2>/dev/null| tail -1`" = "$1" ] && return 0 + return 1 + fi + return 0 +@@ -399,7 +399,7 @@ exit 1 + fi + + # create built by info and license +-BUILTBY="\"Compiled on `date` by $LOGNAME@`uname -n` (`uname -v `)\n options:$WITHBLITS $WITHDEBUG $WITHTRACE $WITHUNICODE\"" ++BUILTBY="\"options:$WITHBLITS $WITHDEBUG $WITHTRACE $WITHUNICODE\"" + echo "#define BUILTBY $BUILTBY" >./include/built_by.h + echo -n "#define LICENSE " >>./include/built_by.h + cat LICENSE | sed 's/^/"/g' | sed 's/$/\\n" \\/g' >>./include/built_by.h +@@ -475,9 +475,9 @@ then + fi + #2015.08.31 + #CFLAGS="-Wwrite-strings -I. -I../include -I../cpu68k -I../wxui $WXCONFIGFLAGS $WITHOPTIMIZE $WITHDEBUG" +- CFLAGS="-Wno-write-strings -I. -I../include -I../cpu68k -I../wxui $WXCONFIGFLAGS $WITHOPTIMIZE $WITHDEBUG" +- CXXFLAGS="-Wno-write-strings -I. -I../include -I../cpu68k -I../wxui $WXCONFIGFLAGS $WITHOPTIMIZE $WITHDEBUG" +- LINKOPTS="`wx-config $STATIC $WITHUNICODE --libs --linkdeps --cppflags`" ++ CFLAGS="$CFLAGS -Wno-write-strings -I. -I../include -I../cpu68k -I../wxui $WXCONFIGFLAGS $WITHOPTIMIZE $WITHDEBUG" ++ CXXFLAGS="$CXXFLAGS -Wno-write-strings -I. -I../include -I../cpu68k -I../wxui $WXCONFIGFLAGS $WITHOPTIMIZE $WITHDEBUG" ++ LINKOPTS="$LDFLAGS `wx-config $STATIC $WITHUNICODE --libs --linkdeps --cppflags`" + if [ -z "$LINKOPTS" ] + then + echo wx-config has failed, or returned an error. Ensure that it exists in your path. +@@ -493,7 +493,7 @@ fi + ########################################################################### + + # Has the configuration changed since last time? if so we may need to do a clean build. +-[ -f .last-opts ] && source .last-opts ++[ -f .last-opts ] && . .last-opts + + needclean=0 + #debug and tracelog changes affect the whole project, so need to clean it all +@@ -663,7 +663,6 @@ then + $CC $CFLAGS $LDFLAGS -o ../bin/lisadiskinfo lisadiskinfo.c libdc42.o || exit 1 + if [ -z "$WITHDEBUG" ] + then +- strip ../bin/lisadiskinfo${EXT} + if [ -z "$WITHOUTUPX" ]; then + if [ -x "`which upx 2>/dev/null`" ]; then upx --best ../bin/lisadiskinfo${EXT} ; fi + fi +@@ -682,7 +681,6 @@ then + $CC $CFLAGS -o ../bin/lisafsh-tool lisafsh-tool.c libdc42.o || exit 1 + if [ -z "$WITHDEBUG" ] + then +- strip ../bin/lisafsh-tool${EXT} + if [ -z "$WITHOUTUPX" ]; then + if [ -x "`which upx 2>/dev/null`" ]; then upx --best ../bin/lisafsh-tool${EXT} ; fi + fi +@@ -737,7 +735,7 @@ if [ "$VSTATIC" -gt 0 ]; then DEPS=1; else DEPS=0; fi + if [ "$DEPS" -gt 0 ] + then + echo " Compiling lisaem_static_resources.cpp..." +- $CXX $CFLAGS -c lisaem_static_resources.cpp -o lisaem_static_resources.o || exit 1 ++ $CXX $CXXFLAGS -c lisaem_static_resources.cpp -o lisaem_static_resources.o || exit 1 + fi + LIST="$LIST lisaem_static_resources.o" + +@@ -803,7 +801,7 @@ do + if NEEDED ${i}.cpp ${i}.o + then + echo " Compiling ${i}.cpp..." +- $CXX -W $WARNINGS $WITHDEBUG $WITHTRACE $WITHBLITS $CFLAGS -c ${i}.cpp -o ${i}.o || exit 1 ++ $CXX -W $WARNINGS $WITHDEBUG $WITHTRACE $WITHBLITS $CXXFLAGS -c ${i}.cpp -o ${i}.o || exit 1 + fi + done + +@@ -908,7 +906,6 @@ then + done + cp $RESCPYLIST LisaEm.app/Contents/Resources/ || exit 1 + +- [ -z "$WITHDEBUG" ] && strip ./lisaem + chmod 755 lisaem + mv lisaem LisaEm + mv LisaEm LisaEm.app/Contents/MacOS/ +@@ -989,8 +986,6 @@ if [ -z "$WITHDEBUG" ] + then + + echo "Freshly compiled `du -sh lisaem`" +- strip lisaem${EXT} +- echo "Stripped `du -sh lisaem`" + + # compress it if upx exists. + if [ -z "$WITHOUTUPX" ]; then