[47759] trunk/dports/emulators

krischik at macports.org krischik at macports.org
Thu Mar 5 10:01:46 PST 2009


Revision: 47759
          http://trac.macports.org/changeset/47759
Author:   krischik at macports.org
Date:     2009-03-05 10:01:45 -0800 (Thu, 05 Mar 2009)
Log Message:
-----------
a high-fidelity simulator for calculators.

Modified Paths:
--------------
    trunk/dports/emulators/nonpareil/Portfile

Added Paths:
-----------
    trunk/dports/emulators/nonpareil/
    trunk/dports/emulators/nonpareil/files/HP-41CX.app/
    trunk/dports/emulators/nonpareil/files/HP-41CX.app/Contents/
    trunk/dports/emulators/nonpareil/files/HP-41CX.app/Contents/Info.plist
    trunk/dports/emulators/nonpareil/files/HP-41CX.app/Contents/MacOS/
    trunk/dports/emulators/nonpareil/files/HP-41CX.app/Contents/MacOS/HP-41CX.command
    trunk/dports/emulators/nonpareil/files/HP-41CX.app/Contents/Resources/
    trunk/dports/emulators/nonpareil/files/HP-41CX.app/Contents/Resources/HP-41CX.icns
    trunk/dports/emulators/nonpareil/files/patch-src-util.diff

Removed Paths:
-------------
    trunk/dports/emulators/nonpareil/files/Free42-Binary.app/
    trunk/dports/emulators/nonpareil/files/Free42-Decimal.app/


Property changes on: trunk/dports/emulators/nonpareil
___________________________________________________________________
Added: svn:ignore
   + .backups

Added: svn:mergeinfo
   + 

Modified: trunk/dports/emulators/nonpareil/Portfile
===================================================================
--- trunk/dports/emulators/free42/Portfile	2009-03-04 17:54:37 UTC (rev 47736)
+++ trunk/dports/emulators/nonpareil/Portfile	2009-03-05 18:01:45 UTC (rev 47759)
@@ -1,122 +1,84 @@
-# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4; -*-
+# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
 # $Id$
-# vim: set fileencoding=utf-8 tabstop=4 shiftwidth=4 softtabstop=4 noexpandtab filetype=tcl :
 
-PortSystem				1.0
+PortSystem 1.0
 
-name					free42
-version					1.4.44
-revision				2
-platforms				darwin
-categories				emulators
-maintainers				krischik:macports.org
-description				a HP-42s Simulator
-long_description		Free42 is a complete re-implementation of the HP-42S	\
-						calculator and the HP-82240 printer. Free42 was written \
-						from scratch, without using any HP code. You do not		\
-						need any ROM images in order to use it, yet it is fully \
-						HP-42S compatible.
+name				nonpareil	
+version				0.79
+#revision			4
+platforms			darwin
+categories			emulators
+maintainers			krischik at me.com
+description			a high-fidelity simulator for calculators.
+long_description	Nonpareil is a high-fidelity simulator for calculators. \
+					It currently supports many HP calculators models		\
+					introduced between 1972 and 1982. Simulation fidelity	\
+					is achieved through the use of the actual microcode of	\
+					the calculators, thus in most cases the simulation		\
+					behavior exactly matches that of the real calculator.	\
+					In particular, numerical results will be identical,		\
+					because the simulator is using the BCD arithmetic		\
+					algorithms from the calculator.
 
-homepage				http://free42.sourceforge.net/
-master_sites			sourceforge
+homepage			http://nonpareil.brouhaha.com/
+master_sites		http://nonpareil.brouhaha.com/download
 
-set prog				free42.${version}.tgz
-set skin				Free42Skins.zip
+set prog			nonpareil-${version}.tar.gz
 
-distfiles				${prog} \
-						${skin}
+distfiles			${prog}
 
-extract.only			${prog}
+checksums			${prog} sha1 83bc2f57e6ece9ce19e3449cce075ef246a9f4c2
 
-checksums				${prog} sha1 a116ab15c3d7faef0bfd9b1e59426964248b4242	\
-						${skin} sha1 db0c327224fa163423003e287bee58e7f906f7b8
+depends_lib			port:bison								\
+					port:flex								\
+					port:glib2								\
+					port:gtk2								\
+					port:libxml2							\
+					port:netpbm								\
+					port:pkgconfig							\
+					port:python23							\
+					port:scons								
 
-depends_lib				port:gtk2
+patchfiles          patch-src-util.diff
 
-worksrcdir				${name}
-use_configure			no
-use_parallel_build		no
-build.dir				${worksrcpath}/gtk
-build.target			free42bin
-build.env-delete		BCD_MATH
+worksrcdir			${name}-${version}
+use_parallel_build	yes
+use_configure		no
+build.cmd			"scons-local/scons.py"
+build.args			prefix=${prefix}
+build.target
 
+destroot.cmd		"scons-local/scons.py"
+build.args			prefix=${prefix} destdir=${destroot}
+
 post-extract {
-	system "unzip -q ${distpath}/${skin} -d ${workpath}/skin"
+	system "cd ${workpath}/${name}-${version}/scons-local; tar -xzf scons-local-0.96.90.tar.gz"
 }
 
-platform darwin {
-	build.env-append	LIBS="-lm -lXm -lXpm -lXp -lXmu -lXt -lX11"
-	post-patch {
-		reinplace "s|CXXFLAGS := |CXXFLAGS := -DNO_SINCOS |g" ${build.dir}/Makefile
-	}
-}
-
-post-build {
-	# The build phase builds the binary version.
-	# Now build again to get the decimal version.
-	build.target		clean free42dec
-	build.env-append 	BCD_MATH=1
-	command_exec build
-}
-
-destroot {
-	xinstall -m 775 -d ${destroot}${prefix}/share/free42
-	xinstall -m 775 -d ${destroot}${applications_dir}
-
-	eval xinstall -m 444								\
-		[glob ${workpath}/skin/*.gif]					\
-		[glob ${workpath}/skin/*.layout]				\
-		${workpath}/skin/README.txt						\
-		${destroot}${prefix}/share/free42
-
-	xinstall -m 775										\
-		-W ${build.dir}									\
-		free42bin										\
-		free42dec										\
-		${destroot}${prefix}/bin
-}
-
 platform macosx {
 	post-destroot {
 	xinstall -m 775 -d ${destroot}${applications_dir}
-	xinstall -m 755 -d ${destroot}${applications_dir}/Free42-Binary.app
-	xinstall -m 755 -d ${destroot}${applications_dir}/Free42-Binary.app/Contents
-	xinstall -m 755 -d ${destroot}${applications_dir}/Free42-Binary.app/Contents/MacOS
-	xinstall -m 755 -d ${destroot}${applications_dir}/Free42-Binary.app/Contents/Resources
+	xinstall -m 755 -d ${destroot}${applications_dir}/Nonpareil/HP-41CX.app
+	xinstall -m 755 -d ${destroot}${applications_dir}/Nonpareil/HP-41CX.app/Contents
+	xinstall -m 755 -d ${destroot}${applications_dir}/Nonpareil/HP-41CX.app/Contents/MacOS
+	xinstall -m 755 -d ${destroot}${applications_dir}/Nonpareil/HP-41CX.app/Contents/Resources
 
 	xinstall -m 644 -W ${filespath}																\
-		Free42-Binary.app/Contents/Info.plist													\
-		${destroot}${applications_dir}/Free42-Binary.app/Contents/Info.plist
+		HP-41CX.app/Contents/Info.plist													\
+		${destroot}${applications_dir}/Nonpareil/HP-41CX.app/Contents/Info.plist
 	xinstall -m 644 -W ${filespath}																\
-		Free42-Binary.app/Contents/Resources/Free42-Binary.icns									\
-		${destroot}${applications_dir}/Free42-Binary.app/Contents/Resources/Free42-Binary.icns
+		HP-41CX.app/Contents/Resources/HP-41CX.icns									\
+		${destroot}${applications_dir}/Nonpareil/HP-41CX.app/Contents/Resources/HP-41CX.icns
 	xinstall -m 755 -W ${filespath}																\
-		Free42-Binary.app/Contents/MacOS/Free42-Binary.command									\
-		${destroot}${applications_dir}/Free42-Binary.app/Contents/MacOS/Free42-Binary.command
+		HP-41CX.app/Contents/MacOS/HP-41CX.command									\
+		${destroot}${applications_dir}/Nonpareil/HP-41CX.app/Contents/MacOS/HP-41CX.command
 
 	reinplace																					\
 		s|@PREFIX@|${prefix}|g																	\
-		${destroot}${applications_dir}/Free42-Binary.app/Contents/MacOS/Free42-Binary.command
-
-	xinstall -m 775 -d ${destroot}${applications_dir}
-	xinstall -m 755 -d ${destroot}${applications_dir}/Free42-Decimal.app
-	xinstall -m 755 -d ${destroot}${applications_dir}/Free42-Decimal.app/Contents
-	xinstall -m 755 -d ${destroot}${applications_dir}/Free42-Decimal.app/Contents/MacOS
-	xinstall -m 755 -d ${destroot}${applications_dir}/Free42-Decimal.app/Contents/Resources
-
-	xinstall -m 644 -W ${filespath}																\
-		Free42-Decimal.app/Contents/Info.plist													\
-		${destroot}${applications_dir}/Free42-Decimal.app/Contents/Info.plist
-	xinstall -m 644 -W ${filespath}																\
-		Free42-Decimal.app/Contents/Resources/Free42-Decimal.icns								\
-		${destroot}${applications_dir}/Free42-Decimal.app/Contents/Resources/Free42-Decimal.icns
-	xinstall -m 755 -W ${filespath}																\
-		Free42-Decimal.app/Contents/MacOS/Free42-Decimal.command								\
-		${destroot}${applications_dir}/Free42-Decimal.app/Contents/MacOS/Free42-Decimal.command
-
-	reinplace																					\
-		s|@PREFIX@|${prefix}|g																	\
-		${destroot}${applications_dir}/Free42-Decimal.app/Contents/MacOS/Free42-Decimal.command
+		${destroot}${applications_dir}/Nonpareil/HP-41CX.app/Contents/MacOS/HP-41CX.command
 	}
 }
 
+############################################################ {{{1 ###########
+# vim: set nowrap tabstop=4 shiftwidth=4 softtabstop=4 noexpandtab :
+# vim: set textwidth=78 filetype=tcl foldmethod=marker nospell :


Property changes on: trunk/dports/emulators/nonpareil/files/HP-41CX.app/Contents
___________________________________________________________________
Added: svn:ignore
   + .backups


Copied: trunk/dports/emulators/nonpareil/files/HP-41CX.app/Contents/Info.plist (from rev 47736, trunk/dports/emulators/free42/files/Free42-Decimal.app/Contents/Info.plist)
===================================================================
--- trunk/dports/emulators/nonpareil/files/HP-41CX.app/Contents/Info.plist	                        (rev 0)
+++ trunk/dports/emulators/nonpareil/files/HP-41CX.app/Contents/Info.plist	2009-03-05 18:01:45 UTC (rev 47759)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleAllowMixedLocalizations</key>
+	<true/>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleDisplayName</key>
+	<string>HP-41CX</string>
+	<key>CFBundleExecutable</key>
+	<string>HP-41CX.command</string>
+	<key>CFBundleIconFile</key>
+	<string>HP-41CX.icns</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>nonpareil</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleSignature</key>
+	<string>hp41</string>
+	<key>LSRequiresCarbon</key>
+	<true/>
+</dict>
+</plist>


Property changes on: trunk/dports/emulators/nonpareil/files/HP-41CX.app/Contents/Info.plist
___________________________________________________________________
Added: svn:mime-type
   + text/xml
Added: svn:keywords
   + Author Date Id Revision HeadURL
Added: svn:mergeinfo
   + 
Added: svn:eol-style
   + LF


Property changes on: trunk/dports/emulators/nonpareil/files/HP-41CX.app/Contents/MacOS
___________________________________________________________________
Added: svn:ignore
   + .backups


Copied: trunk/dports/emulators/nonpareil/files/HP-41CX.app/Contents/MacOS/HP-41CX.command (from rev 47736, trunk/dports/emulators/free42/files/Free42-Decimal.app/Contents/MacOS/Free42-Decimal.command)
===================================================================
--- trunk/dports/emulators/nonpareil/files/HP-41CX.app/Contents/MacOS/HP-41CX.command	                        (rev 0)
+++ trunk/dports/emulators/nonpareil/files/HP-41CX.app/Contents/MacOS/HP-41CX.command	2009-03-05 18:01:45 UTC (rev 47759)
@@ -0,0 +1,13 @@
+#!/bin/zsh
+############################################################## {{{1 ##########
+#   $Author$
+#   $Revision$
+#   $Date$
+#   $HeadURL$
+############################################################## }}}1 ##########
+
+ at PREFIX@/bin/nonpareil @PREFIX@/lib/nonpareil/41cx.kml &
+
+############################################################ {{{1 ###########
+# vim: set nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab :
+# vim: set textwidth=0 filetype=zsh foldmethod=marker nospell :

Added: trunk/dports/emulators/nonpareil/files/HP-41CX.app/Contents/Resources/HP-41CX.icns
===================================================================
(Binary files differ)


Property changes on: trunk/dports/emulators/nonpareil/files/HP-41CX.app/Contents/Resources/HP-41CX.icns
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: trunk/dports/emulators/nonpareil/files/patch-src-util.diff
===================================================================
--- trunk/dports/emulators/nonpareil/files/patch-src-util.diff	                        (rev 0)
+++ trunk/dports/emulators/nonpareil/files/patch-src-util.diff	2009-03-05 18:01:45 UTC (rev 47759)
@@ -0,0 +1,34 @@
+diff -u -r src.orig/util.c src/util.c
+--- src.orig/util.c	2008-08-24 02:37:18.000000000 +0200
++++ src/util.c	2009-03-05 17:53:26.000000000 +0100
+@@ -133,12 +133,12 @@
+ // strlcpy will copy as much of src into dest as it can, up to one less than
+ // the maximum length of dest specified by the argument l.  Unlike strncpy(),
+ // strlcpy() will always leave dest NULL-terminated on return.
+-char *strlcpy (char *dest, const char *src, size_t l)
+-{
+-  strncpy (dest, src, l);
+-  dest [l - 1] = '\0';
+-  return dest;
+-}
++/*char *strlcpy (char *dest, const char *src, size_t l)*/
++/*{*/
++  /*strncpy (dest, src, l);*/
++  /*dest [l - 1] = '\0';*/
++  /*return dest;*/
++/*}*/
+ 
+ 
+ // strlncpy will copy up to n characters from src to dest, but not more than
+diff -u -r src.orig/util.h src/util.h
+--- src.orig/util.h	2008-08-24 02:37:18.000000000 +0200
++++ src/util.h	2009-03-05 17:53:37.000000000 +0100
+@@ -56,7 +56,7 @@
+ // strlcpy will copy as much of src into dest as it can, up to one less than
+ // the maximum length of dest specified by the argument l.  Unlike strncpy(),
+ // strlcpy() will always leave dest NULL-terminated on return.
+-char *strlcpy (char *dest, const char *src, size_t l);
++/*char *strlcpy (char *dest, const char *src, size_t l);*/
+ 
+ 
+ // strlncpy will copy up to n characters from src to dest, but not more than
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090305/7aba9496/attachment-0001.html>


More information about the macports-changes mailing list