Date: Fri, 20 Dec 2013 17:25:40 +0000 (UTC) From: Mathieu Arnold <mat@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r337046 - in branches/2014Q1/emulators/lisaem: . files Message-ID: <201312201725.rBKHPeUb055006@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mat Date: Fri Dec 20 17:25:40 2013 New Revision: 337046 URL: http://svnweb.freebsd.org/changeset/ports/337046 Log: MFH: r337039 - Fix build with clang - Add desktop entry file - Support staging PR: ports/184866 Submitted by: KATO Tsuguru <tkato432@yahoo.com> Approved by: portmgr (implicit) Added: branches/2014Q1/emulators/lisaem/files/patch-generator__cpu68k.c - copied unchanged from r337039, head/emulators/lisaem/files/patch-generator__cpu68k.c branches/2014Q1/emulators/lisaem/files/patch-generator__reg68k.c - copied unchanged from r337039, head/emulators/lisaem/files/patch-generator__reg68k.c Modified: branches/2014Q1/emulators/lisaem/Makefile (contents, props changed) branches/2014Q1/emulators/lisaem/files/patch-build.sh (contents, props changed) Directory Properties: branches/2014Q1/ (props changed) Modified: branches/2014Q1/emulators/lisaem/Makefile ============================================================================== --- branches/2014Q1/emulators/lisaem/Makefile Fri Dec 20 17:25:22 2013 (r337045) +++ branches/2014Q1/emulators/lisaem/Makefile Fri Dec 20 17:25:40 2013 (r337046) @@ -3,7 +3,7 @@ PORTNAME= lisaem DISTVERSION= 1.2.6 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= emulators MASTER_SITES= http://lisaem.sunder.net/downloads/ @@ -12,25 +12,26 @@ COMMENT= Apple Lisa 2 Emulator BUILD_DEPENDS= pngtopnm:${PORTSDIR}/graphics/netpbm -LICENSE= GPLv2 -LICENSE_FILE= ${WRKSRC}/COPYING +LICENSE= GPLv2 # (or later) USE_BZIP2= yes USE_WX= 2.8 -NO_STAGE= yes +DESKTOP_ENTRIES="LisaEm" "" "${DATADIR}/lisa2icon.xpm" "${PORTNAME}" "" "" + post-patch: - ${REINPLACE_CMD} -e "s|/usr/local|${PREFIX}|g" \ - -e "s|wx-config|${WX_CONFIG}|g" ${WRKSRC}/build.sh + @${REINPLACE_CMD} -e \ + 's|%%PREFIX%%|${PREFIX}|g ; \ + s|%%WX_CONFIG%%|${WX_CONFIG}|g' ${WRKSRC}/build.sh + do-build: - cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ./build.sh build + ${FIND} ${WRKSRC} -type l -delete + cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ./build.sh build do-install: - @# This file is a symlink to itself; result of mistyped command? - ${RM} -f ${WRKSRC}/resources/resources - ${INSTALL_PROGRAM} ${WRKSRC}/bin/lisaem ${PREFIX}/bin - ${MKDIR} ${PREFIX}/share/lisaem - ${INSTALL_DATA} ${WRKSRC}/resources/* ${PREFIX}/share/lisaem/ - ${LN} -sf ${PREFIX}/share/lisaem ${PREFIX}/share/LisaEm + (cd ${WRKSRC}/bin && ${INSTALL_PROGRAM} lisaem ${STAGEDIR}${PREFIX}/bin) + @${MKDIR} ${STAGEDIR}${DATADIR} + (cd ${WRKSRC}/resources && ${INSTALL_DATA} * ${STAGEDIR}${DATADIR}) + ${LN} -sf lisaem ${STAGEDIR}${PREFIX}/share/LisaEm .include <bsd.port.mk> Modified: branches/2014Q1/emulators/lisaem/files/patch-build.sh ============================================================================== --- branches/2014Q1/emulators/lisaem/files/patch-build.sh Fri Dec 20 17:25:22 2013 (r337045) +++ branches/2014Q1/emulators/lisaem/files/patch-build.sh Fri Dec 20 17:25:40 2013 (r337046) @@ -20,7 +20,7 @@ WXVER=0 -case "`wx-config --version`" in -+case "`/usr/local/bin/wxgtk2-2.8-config --version`" in ++case "`%%WX_CONFIG%% --version`" in 2.9*|3*) echo WARNING: wxWidgets versions higher than 2.8 have not been tested. echo It might work if they are compiled with backwards compatibility. @@ -28,7 +28,7 @@ 2.8*) ;; *) echo Could not find wxWidgets 2.8.0 or higher. - echo Please install it and ensure that wx-config is in the path -+ echo Please install it and ensure that /usr/local/bin/wxgtk2-2.8-config is in the path ++ echo Please install it and ensure that %%WX_CONFIG%% is in the path exit 1 ;; esac @@ -47,11 +47,22 @@ then - WXREL="`wx-config --release`" - if [ -n "`wx-config --list | grep $WXREL | grep unicode`" ] -+ WXREL="`/usr/local/bin/wxgtk2-2.8-config --release`" -+ if [ -n "`/usr/local/bin/wxgtk2-2.8-config --list | grep $WXREL | grep unicode`" ] ++ WXREL="`%%WX_CONFIG%% --release`" ++ if [ -n "`%%WX_CONFIG%% --list | grep $WXREL | grep unicode`" ] then WITHUNICODE="--unicode=yes" fi +@@ -210,8 +210,8 @@ + PREFIX="/cygdrive/c/Program Files/Sunder.NET/LisaEm" + PREFIXLIB="/cygdrive/c/Program Files/Sunder.NET/LisaEm" + else +- PREFIX="/usr/local/bin" +- PREFIXLIB="/usr/local/share/" ++ PREFIX="%%PREFIX%%/bin" ++ PREFIXLIB="%%PREFIX%%/share/" + fi + fi + fi @@ -230,11 +230,11 @@ # if the object is older than the source, it will return true. ############################################################################## @@ -72,8 +83,8 @@ (default for non-OS X) ---with-unicode Ask wx-config for a unicode build (might not yet work) ---without-unicode Ask wx-config for a non-unicode build (default) -+--with-unicode Ask /usr/local/bin/wxgtk2-2.8-config for a unicode build (might not yet work) -+--without-unicode Ask /usr/local/bin/wxgtk2-2.8-config for a non-unicode build (default) ++--with-unicode Ask %%WX_CONFIG%% for a unicode build (might not yet work) ++--without-unicode Ask %%WX_CONFIG%% for a non-unicode build (default) Environment Variables you can pass: @@ -82,13 +93,13 @@ # many thanks to David Cecchin for finding the unicode issues fixed below. - WXCONFIGFLAGS=`wx-config --cppflags $WITHUNICODE ` -+ WXCONFIGFLAGS=`/usr/local/bin/wxgtk2-2.8-config --cppflags $WITHUNICODE ` ++ WXCONFIGFLAGS=`%%WX_CONFIG%% --cppflags $WITHUNICODE ` if [ -z "$WXCONFIGFLAGS" ] then - echo wx-config has failed, or returned an error. Ensure that it exists in your path. - which wx-config -+ echo /usr/local/bin/wxgtk2-2.8-config has failed, or returned an error. Ensure that it exists in your path. -+ which /usr/local/bin/wxgtk2-2.8-config ++ echo %%WX_CONFIG%% has failed, or returned an error. Ensure that it exists in your path. ++ which %%WX_CONFIG%% exit 3 fi - CFLAGS="-I. -I../include -I../cpu68k -I../wxui $WXCONFIGFLAGS $WITHOPTIMIZE $WITHDEBUG" @@ -96,13 +107,13 @@ - LINKOPTS="`wx-config $STATIC $WITHUNICODE --libs --linkdeps --cppflags`" + CFLAGS="$CFLAGS -I. -I../include -I../cpu68k -I../wxui $WXCONFIGFLAGS" + CXXFLAGS="$CXXFLAGS -I. -I../include -I../cpu68k -I../wxui $WXCONFIGFLAGS" -+ LINKOPTS="`/usr/local/bin/wxgtk2-2.8-config $STATIC $WITHUNICODE --libs --linkdeps --cppflags`" ++ LINKOPTS="`%%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. - which wx-config -+ echo /usr/local/bin/wxgtk2-2.8-config has failed, or returned an error. Ensure that it exists in your path. -+ which /usr/local/bin/wxgtk2-2.8-config ++ echo %%WX_CONFIG%% has failed, or returned an error. Ensure that it exists in your path. ++ which %%WX_CONFIG%% exit 3 fi @@ -115,3 +126,14 @@ fi if [ -f ../bin/lisaem ] +@@ -960,8 +960,8 @@ + then + + echo "Freshly compiled `du -sh lisaem`" +- strip lisaem${EXT} +- echo "Stripped `du -sh lisaem`" ++# strip lisaem${EXT} ++# echo "Stripped `du -sh lisaem`" + + # compress it if upx exists. + if [ -z "$WITHOUTUPX" ]; then Copied: branches/2014Q1/emulators/lisaem/files/patch-generator__cpu68k.c (from r337039, head/emulators/lisaem/files/patch-generator__cpu68k.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2014Q1/emulators/lisaem/files/patch-generator__cpu68k.c Fri Dec 20 17:25:40 2013 (r337046, copy of r337039, head/emulators/lisaem/files/patch-generator__cpu68k.c) @@ -0,0 +1,161 @@ +--- generator/cpu68k.c.orig ++++ generator/cpu68k.c +@@ -259,7 +259,7 @@ + continue; + } + } +- if (cpu68k_iibtable[bitmap] != NULL) {EXIT(283,0,"CPU definition #%d conflicts (0x%x)", i, bitmap);} ++ if (cpu68k_iibtable[bitmap] != NULL) {EXITR(283,0,"CPU definition #%d conflicts (0x%x)", i, bitmap);} + + cpu68k_iibtable[bitmap] = iib; + /* set both flag and non-flag versions */ +@@ -285,7 +285,7 @@ + + if (j != cpu68k_totalinstr) + { +- EXIT(84,0,"Instruction count not verified (%d/%d)\n", ++ EXITR(84,0,"Instruction count not verified (%d/%d)\n", + cpu68k_totalinstr, i); + } + +@@ -904,19 +904,19 @@ + else /*---- Nope! We're out of IPCt's, allocate some more. ----*/ + { + +- if ( ipcts_free) { EXIT(3,0,"Bug! ipcts_free is %ld, but ipct_free_head is null",ipcts_free);} ++ if ( ipcts_free) { EXITR(3,0,"Bug! ipcts_free is %ld, but ipct_free_head is null",ipcts_free);} + + //check_iib(); + + /*--- Did we call Malloc too many times? ---*/ +- if ((iipct_mallocs++)>MAX_IPCT_MALLOCS) { EXIT(2,0,"Excessive mallocs of ipct's recompile with more!");} ++ if ((iipct_mallocs++)>MAX_IPCT_MALLOCS) { EXITR(2,0,"Excessive mallocs of ipct's recompile with more!");} + + size_to_get = (ipcts_allocated/IPCT_ALLOC_PERCENT)+1; // add a percentange of what we have, least 1 + if ( (ipct_mallocs[iipct_mallocs]=(t_ipc_table *)malloc(size_to_get * sizeof(t_ipc_table)+1) )==NULL) + { + DEBUG_LOG(0,"Out of memory getting more ipcs: %p was returned", ipct_mallocs[iipct_mallocs]); + DEBUG_LOG(0,"%d ipcts allocated so far, %d are free, %d used, %d mallocs done", ipcts_allocated, ipcts_free, ipcts_used, iipct_mallocs); +- EXIT(86,0,"Out of memory while allocating more ipct's"); ++ EXITR(86,0,"Out of memory while allocating more ipct's"); + } + + // DEBUG_LOG(0,"zzzzzzz ipct land allocated:: %p -to- %p", ipct_mallocs[iipct_mallocs], (void *)(ipct_mallocs[iipct_mallocs]+size_to_get * sizeof(t_ipc_table))); +@@ -1084,8 +1084,8 @@ + DEBUG_LOG(1000,"Nope - calling get_ipct()"); + mmu_trn->table=get_ipct(); // allocate an ipc table for this mmu_t + table=mmu_trn->table; +- if (!table) {EXIT(21,0,"Couldn't get IPC Table! Doh!");} +- if (pc&1) {EXIT(14,0,"odd pc!");} ++ if (!table) {EXITR(21,0,"Couldn't get IPC Table! Doh!");} ++ if (pc&1) {EXITR(14,0,"odd pc!");} + + //check_iib(); + +@@ -1094,11 +1094,11 @@ + // ipc points to the MMU translation table entry for this page. + ipc = &(table->ipc[((pc>>1) & 0xff)]); + DEBUG_LOG(200,"ipc is now %p at pc %06x max %06x",ipc,pc,xpc); +- if (!ipc) {EXIT(501,0,"cpu68k_makeipclist: But! ipc is null!"); } +- if (pc&1) {EXIT(501,0,"odd pc!");} ++ if (!ipc) {EXITR(501,0,"cpu68k_makeipclist: But! ipc is null!"); } ++ if (pc&1) {EXITR(501,0,"odd pc!");} + } + else +- {EXIT(502,0,"Let the bodies hit the floor!\nLet the bodies hit the floor!\nLet the bodies hit the floor!\n\n Either mmu_trn or table is null!");} ++ {EXITR(502,0,"Let the bodies hit the floor!\nLet the bodies hit the floor!\nLet the bodies hit the floor!\n\n Either mmu_trn or table is null!");} + } + + //check_iib(); +@@ -1106,7 +1106,7 @@ + + if ( !ipc) + { +- EXIT(17,0,"ipc=NULL\n1. Something's got to give 2. Something's got to give. 3. Something's got to give 4. Something's got to give.\nNOW!"); ++ EXITR(17,0,"ipc=NULL\n1. Something's got to give 2. Something's got to give. 3. Something's got to give 4. Something's got to give.\nNOW!"); + } + + //check_iib(); +@@ -1126,7 +1126,7 @@ + + if ( !ipc) + { +- EXIT(20,0,"ipc=NULL\n1. Something's got to give 2. Something's got to give. 3. Something's got to give 4. Something's got to give.\nNOW!"); ++ EXITR(20,0,"ipc=NULL\n1. Something's got to give 2. Something's got to give. 3. Something's got to give 4. Something's got to give.\nNOW!"); + } + + //check_iib(); +@@ -1236,8 +1236,8 @@ + // fflush(buglog); + // #endif + +- if (!iib) {EXIT(53,0,"There's no proper IIB for the possibly illegal instruction opcode %04x @ pc=%08x\n",opcode,pc);} +- if ( !ipc) {EXIT(54,0,"Have a cow man! ipc=NULL\n"); } ++ if (!iib) {EXITR(53,0,"There's no proper IIB for the possibly illegal instruction opcode %04x @ pc=%08x\n",opcode,pc);} ++ if ( !ipc) {EXITR(54,0,"Have a cow man! ipc=NULL\n"); } + + //DEBUG_LOG(200,"ipc is %s",(!ipc)?"null":"ok"); + +@@ -1283,7 +1283,7 @@ + // grow the list of ipcs if we need to. + if (instrs>=ipcs_to_get) + { +- EXIT(24,0,"Welcome to the realms of chaos! I'm dealing with over %d instructions, %d ipcs! %d/%d/%d pc=%d/%08x",instrs,ipcs_to_get,segment1,segment2,start,context,pc); ++ EXITR(24,0,"Welcome to the realms of chaos! I'm dealing with over %d instructions, %d ipcs! %d/%d/%d pc=%d/%08x",instrs,ipcs_to_get,segment1,segment2,start,context,pc); + pc24=pc; + } + +@@ -1308,7 +1308,7 @@ + table=mmu_trn->table; + + if (!table) { +- EXIT(99,0,"Couldnt get IPC Table! Doh!\n");} ++ EXITR(99,0,"Couldnt get IPC Table! Doh!\n");} + + //if (pc&1) {DEBUG_LOG(200,"odd pc!"); EXIT(26);} + } +@@ -1333,7 +1333,7 @@ + + // check_iib(); + +- if (!table) {EXIT(27,0,"Couldnt get IPC Table! Doh!");} ++ if (!table) {EXITR(27,0,"Couldnt get IPC Table! Doh!");} + //ipc = &(mmu_trn->table->ipc[((pc>>1) & 0xff)]); + //myiib=cpu68k_iibtable[opcode]; iib=myiib; // iib = myiib ? myiib : illegaliib; + //////cpu68k_ipc(pc, iib, ipc); +@@ -1370,7 +1370,7 @@ + if (instrs == 2) + { + +- if (pc&1) {EXIT(28,0,"odd pc!");} ++ if (pc&1) {EXITR(28,0,"odd pc!");} + DEBUG_LOG(200,"*~*~*~*~*~*~ in 2instrs ipc is now %p at pc %06x max %06x",ipc,pc,xpc); + ipc=ipcs[instrs-1-1]; //ipc-- + DEBUG_LOG(200,"ipc is now %p at pc %06x max %06x",ipc,pc,xpc); +@@ -1443,7 +1443,7 @@ + DEBUG_LOG(200,"ipc is now %p at pc %06x max %06x ix=%d",ipc,pc,xpc,ix); + if ( !ipc) + { +- EXIT(29,0,"Null ipc, bye"); ++ EXITR(29,0,"Null ipc, bye"); + } + + //check_iib(); +@@ -1460,7 +1460,7 @@ + + if (!ipc->function) + { +- EXIT(3,0,"Null IPC fn returned for opcode:%04x ix=%d of %d instrs",ipc->opcode,ix,instrs); ++ EXITR(3,0,"Null IPC fn returned for opcode:%04x ix=%d of %d instrs",ipc->opcode,ix,instrs); + // cpu68k_printipc(ipc); + } + +@@ -1479,7 +1479,7 @@ + { + // check_iib(); + ipc=ipcs[ix]; +- EXIT(6,0,"FATAL ipc with null fnction at index %d-> used:%d, set:%d, opcode %04x, len %02x, src %08x, dst %08x\n", ++ EXITR(6,0,"FATAL ipc with null fnction at index %d-> used:%d, set:%d, opcode %04x, len %02x, src %08x, dst %08x\n", + ix, ipc->used, ipc->set, ipc->opcode, ipc->wordlen, ipc->src, ipc->dst); + } + Copied: branches/2014Q1/emulators/lisaem/files/patch-generator__reg68k.c (from r337039, head/emulators/lisaem/files/patch-generator__reg68k.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2014Q1/emulators/lisaem/files/patch-generator__reg68k.c Fri Dec 20 17:25:40 2013 (r337046, copy of r337039, head/emulators/lisaem/files/patch-generator__reg68k.c) @@ -0,0 +1,19 @@ +--- generator/reg68k.c.orig ++++ generator/reg68k.c +@@ -1308,7 +1308,7 @@ + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +- if (abort_opcode==1) {EXIT(476,0,"MMU/BUS/Address exception occured on opcode fetch!\n");} ++ if (abort_opcode==1) {EXITR(476,0,"MMU/BUS/Address exception occured on opcode fetch!\n");} + abort_opcode=0; // clear any addr/bus errors/traps/etc that may have occured. + + InstructionRegister=ipc->opcode; +@@ -1397,7 +1397,7 @@ + InstructionRegister=ipc->opcode; + abort_opcode=0; + if (ipc->function) ipc->function(ipc); +- else { EXIT(277,0,"No ipc function at %d/%08x, even after attempting to get one!\n",context,pc24);} ++ else { EXITR(277,0,"No ipc function at %d/%08x, even after attempting to get one!\n",context,pc24);} + } + } // if we have it, execute, else loop is done. :)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312201725.rBKHPeUb055006>