<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><blockquote type="cite"><div><font class="Apple-style-span" face="Monaco">Sounds like a jit variant which sets supported_archs may be in order then. That way users on x86_64 systems can decide whether they want to lose the JIT or rebuild all the dependencies with +universal.<br><br>- Josh<br></font></div></blockquote></div><font class="Apple-style-span" face="Monaco"><br></font><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><div><font class="Apple-style-span" face="Monaco">Hey! I feel a little better about my lack of knowledge now -- I think I might be (slowly) learning!</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco">Because that is exactly what I did.</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco">Ken<br></font></div></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco">So here's what I have so far, to see how this is going for a newbie, moving from hacking makefiles, to hacking portfiles, to actually writing portfiles.</font></div><div><font class="Apple-style-span" face="Monaco">I think I could have picked an easier one than BasiliskII for my first go 'round, but it works, and I'm into the fine tuning now...</font></div><div><font class="Apple-style-span" face="Monaco">compiler options, variants, active variant requirements ...&nbsp;</font></div><div><font class="Apple-style-span" face="Monaco">now I need to figure out how to customize the "make" to "make XYZ".</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco">I'm sure there are many ways this is not right.... there is a lot of information in the macports website for portfile writing to absorb..</font></div><div><font class="Apple-style-span" face="Monaco">-------------------------</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><div><font class="Apple-style-span" face="Monaco"># $Id: Portfile 135117 2015-04-15 19:51:30Z <a href="mailto:ryandesign@macports.org">ryandesign@macports.org</a> $</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco">PortSystem &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1.0</font></div><div><font class="Apple-style-span" face="Monaco">PortGroup<span class="Apple-tab-span" style="white-space:pre">                                </span>github 1.0</font></div><div><font class="Apple-style-span" face="Monaco">PortGroup<span class="Apple-tab-span" style="white-space:pre">                                </span>active_variants 1.1</font></div><div><font class="Apple-style-span" face="Monaco">github.setup<span class="Apple-tab-span" style="white-space:pre">                        </span>cebix macemu 1bf6f4d64023851e5de17c7d3090db99c7671c04</font></div><div><font class="Apple-style-span" face="Monaco">version &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre">        </span>20160829</font></div><div><font class="Apple-style-span" face="Monaco">name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;basiliskII</font></div><div><font class="Apple-style-span" face="Monaco">categories &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;emulators</font></div><div><font class="Apple-style-span" face="Monaco">license &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GPL-2+</font></div><div><font class="Apple-style-span" face="Monaco">platforms &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; darwin</font></div><div><font class="Apple-style-span" face="Monaco">maintainers &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gmail.com:ken-cunningham-webuse openmaintainer</font></div><div><font class="Apple-style-span" face="Monaco">description &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Opensource 68k Mac emulator.</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco">long_description \</font></div><div><font class="Apple-style-span" face="Monaco">&nbsp; &nbsp; Longstanding 68K Macintosh emulator. You will need an appropriate Macintosh ROM image and a copy of Mac OS (0.x thru 7.5 for Classic emulation, 7.x or 8.0/8.1 for Mac II emulation). &nbsp;The default "jit" variant enables the Just-In-Time compiler, which is 32bit only. This may be faster on your system. It will require the dependent libraries to be built universal. Slirp networking is also 32bit-only at present. You can try a build without JIT or slirp, and this will generate a native build for your system (usually 64bit).</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco">homepage &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://basilisk.cebix.net/">http://basilisk.cebix.net/</a></font></div><div><font class="Apple-style-span" face="Monaco">checksums &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; md5 f289deebce6e528bc913fad0375752df</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco"># ----------- DEPENDENCIES -------------</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco">depends_lib <span class="Apple-tab-span" style="white-space:pre">                        </span>port:libsdl<span class="Apple-tab-span" style="white-space:pre">        </span>\</font></div><div><font class="Apple-style-span" face="Monaco"><span class="Apple-tab-span" style="white-space:pre">                                </span>port:gtk1</font></div><div><span class="Apple-tab-span" style="white-space: pre; "><font class="Apple-style-span" face="Monaco">                                                </font></span></div><div><font class="Apple-style-span" face="Monaco">#consider how to find out if any other ports already installed are required by this port</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco"># ----------- AUTOCONF -------------</font></div><div><font class="Apple-style-span" face="Monaco">worksrcdir &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space:pre">        </span>${distname}/BasiliskII/src/Unix</font></div><div><font class="Apple-style-span" face="Monaco">use_autoconf<span class="Apple-tab-span" style="white-space:pre">                        </span>yes</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco">#this seems to be a funny command -- is there a more elegant way? this is a custom autogen.sh script</font></div><div><font class="Apple-style-span" face="Monaco">autoconf.cmd<span class="Apple-tab-span" style="white-space:pre">                        </span>NO_CONFIGURE=1 `port work BasiliskII`/${worksrcdir}/autogen.sh</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco"># ----------- COMPILER CHOICE -------------</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco"># a bit complicated</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco"># I confirmed &nbsp;build with clang-3.7 (x86_64 and i386) and gcc-4.0 (can build i386 only)</font></div><div><font class="Apple-style-span" face="Monaco"># should therefore build with macports apple-gcc40</font></div><div><font class="Apple-style-span" face="Monaco"># confirmed not to build correctly with gcc-42</font></div><div><font class="Apple-style-span" face="Monaco"># clang &lt; 500 means clang 3.3 or earlier</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco">#compiler.whitelist<span class="Apple-tab-span" style="white-space:pre">                        </span>macports-clang-3.7 gcc-4.0 apple-gcc40</font></div><div><font class="Apple-style-span" face="Monaco">#compiler.whitelist<span class="Apple-tab-span" style="white-space:pre">                        </span>{clang &gt; 500} gcc-4.0 apple-gcc40</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco">compiler.blacklist-append &nbsp; {clang &lt; 500} macports-clang-2.9 macports-clang-3.0 macports-clang-3.1 macports-clang-3.2 macports-clang-3.3</font></div><div><font class="Apple-style-span" face="Monaco">compiler.blacklist-append &nbsp; {*gcc-4.[1-9]} {*gcc-3*}</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco"># ----------- CONFIGURATION -------------</font></div><div><font class="Apple-style-span" face="Monaco"># no idea if this is the best optimization we can do -- direct from the gcc makefile</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco">configure.cppflags<span class="Apple-tab-span" style="white-space:pre">                </span>-g -O2</font></div><div><font class="Apple-style-span" face="Monaco">configure.cxxflags<span class="Apple-tab-span" style="white-space:pre">                </span>-g -O2</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco">configure.args<span class="Apple-tab-span" style="white-space:pre">        </span>--without-esd --enable-sdl-video --enable-sdl-audio --disable-vosf</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco"># ----------- VARIANTS -------------</font></div><div><font class="Apple-style-span" face="Monaco"># the default build builds the executable and installs it in ${prefix}/bin</font></div><div><font class="Apple-style-span" face="Monaco"># have to learn how to build the BasiliskII_App and move it into directory instead</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco"># ----------- VARIANTS -------------</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco">#building universal is not sensible for this port</font></div><div><font class="Apple-style-span" face="Monaco">universal_variant &nbsp; &nbsp; &nbsp; no</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco"># jit variant enables the JIT compiler and also slirp networking, but it could be slower than x86_64</font></div><div><font class="Apple-style-span" face="Monaco"># so allow people to turn it off if they want to&nbsp;</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco">default_variants +jit</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco">variant jit description {JIT compiler is supported on arch i386 only, and also allows slirp which is i386-only} {</font></div><div><font class="Apple-style-span" face="Monaco"><span class="Apple-tab-span" style="white-space:pre">        </span>supported_archs &nbsp; &nbsp; &nbsp; &nbsp; i386</font></div><div><font class="Apple-style-span" face="Monaco"><span class="Apple-tab-span" style="white-space:pre">        </span>configure.args-append<span class="Apple-tab-span" style="white-space:pre">        </span>--enable-jit-compiler</font></div><div><span class="Apple-tab-span" style="white-space: pre; "><font class="Apple-style-span" face="Monaco">        </font></span></div><div><font class="Apple-style-span" face="Monaco"><span class="Apple-tab-span" style="white-space:pre">        </span># make sure the dependent libraries are installed +universal, or this won't link</font></div><div><font class="Apple-style-span" face="Monaco"><span class="Apple-tab-span" style="white-space:pre">        </span># could be just require i386 if machine arch is i386, and universal on x86_64 -- but that's just too complicated</font></div><div><font class="Apple-style-span" face="Monaco"><span class="Apple-tab-span" style="white-space:pre">        </span># <a href="https://trac.macports.org/wiki/PortfileRecipes#gcc">https://trac.macports.org/wiki/PortfileRecipes#gcc</a></font></div><div><font class="Apple-style-span" face="Monaco"><span class="Apple-tab-span" style="white-space:pre">        </span>require_active_variants libsdl universal</font></div><div><font class="Apple-style-span" face="Monaco"><span class="Apple-tab-span" style="white-space:pre">        </span>require_active_variants gtk1 universal</font></div><div><font class="Apple-style-span" face="Monaco">}</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco">variant slirp description {Slirp networking is supported on arch i386 only. } {</font></div><div><font class="Apple-style-span" face="Monaco"><span class="Apple-tab-span" style="white-space:pre">        </span>supported_archs &nbsp; &nbsp; &nbsp; &nbsp; i386</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco"><span class="Apple-tab-span" style="white-space:pre">        </span>require_active_variants libsdl universal</font></div><div><font class="Apple-style-span" face="Monaco"><span class="Apple-tab-span" style="white-space:pre">        </span>require_active_variants gtk1 universal</font></div><div><font class="Apple-style-span" face="Monaco">}</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco">#if have libc++ set and using clang and on Mountain Lion or less, adjust to -stdlib=libc++</font></div><div><font class="Apple-style-span" face="Monaco">if { ${configure.cxx_stdlib} eq "libc++" &amp;&amp; [string match "*clang*" [option configure.cxx]] &amp;&amp; ${os.major} &lt;= 12 } {</font></div><div><font class="Apple-style-span" face="Monaco"><span class="Apple-tab-span" style="white-space:pre">                </span>configure.ldflags-append -stdlib=libc++</font></div><div><font class="Apple-style-span" face="Monaco">}</font></div><div><br></div></div></body></html>