[29586] trunk/dports/devel

source_changes at macosforge.org source_changes at macosforge.org
Mon Oct 1 04:20:50 PDT 2007


Revision: 29586
          http://trac.macosforge.org/projects/macports/changeset/29586
Author:   eridius at macports.org
Date:     2007-10-01 04:20:49 -0700 (Mon, 01 Oct 2007)

Log Message:
-----------
NEW: Nu 0.1.1

Added Paths:
-----------
    trunk/dports/devel/nu/
    trunk/dports/devel/nu/Portfile
    trunk/dports/devel/nu/files/
    trunk/dports/devel/nu/files/patch-Nukefile
    trunk/dports/devel/nu/files/patch-Rakefile
    trunk/dports/devel/nu/files/patch-libffi-Rakefile

Added: trunk/dports/devel/nu/Portfile
===================================================================
--- trunk/dports/devel/nu/Portfile	                        (rev 0)
+++ trunk/dports/devel/nu/Portfile	2007-10-01 11:20:49 UTC (rev 29586)
@@ -0,0 +1,78 @@
+# $Id$
+
+PortSystem 1.0
+
+name                nu
+version             0.1.1
+categories          devel
+maintainers         eridius
+description         Nu is an interpreted object-oriented language written in Objective-C.
+long_description    \
+    Nu is an interpreted object-oriented language. \
+    It uses a Lisp-style grammar, but is semantically closer to Ruby than to Lisp. \
+    Nu is written in Objective-C and is designed to take full advantange of \
+    the Objective-C runtime and the many mature class libraries written in Objective-C. \
+    Nu code can fully interoperate with code written in Objective-C\; \
+    messages can be sent to and from objects with no concern for whether those messages \
+    are implemented in Objective-C or Nu.
+homepage            http://programming.nu/
+platforms           darwin
+master_sites        http://programming.nu/releases/
+extract.suffix      .tgz
+
+checksums           md5 8492dc39806073b99b0af3b0b300a8ac \
+                    sha1 eadd5e7b16f980d53fb4f67a167a2f1028c73896
+
+patchfiles          patch-Rakefile patch-Nukefile patch-libffi-Rakefile
+
+depends_lib         port:pcre
+depends_build       bin:rake:rb-rake
+
+use_configure       no
+universal_variant   no
+test.run            yes
+test.cmd            nuke
+
+platform darwin 8 {
+    # set up the variant for pre-build
+}
+
+post-patch {
+    # fix prefixes
+    foreach file [list Rakefile Nukefile] {
+        reinplace s|@@PREFIX@@|$prefix|g ${worksrcpath}/$file
+        reinplace s|@@DESTROOT@@|$destroot|g ${worksrcpath}/$file
+    }
+    
+    # we're only interested in building one architecture right now
+    if {${os.arch} == "powerpc"} {
+        set arch "ppc"
+    } else {
+        set arch ${os.arch}
+    }
+    reinplace s|@@ARCH@@|"$arch"|g ${worksrcpath}/Nukefile
+    
+    # fix the shebangs of the tools
+    foreach tool [list enu nubile nudoc nuke nutest] {
+        reinplace s|#!/usr/local|#!$prefix| ${worksrcpath}/tools/$tool
+    }
+}
+
+pre-build {
+    if {[variant_isset darwin_8]} {
+        ui_info "$UI_PREFIX Building libffi"
+        system "cd ${worksrcpath}/libffi && rake"
+    }
+}
+
+build {
+    system "cd ${worksrcpath} && rake"
+    system "cd ${worksrcpath} && ./mininush tools/nuke"
+}
+
+pre-destroot {
+    file mkdir ${destroot}/Library/Frameworks
+}
+
+destroot.cmd        "./mininush tools/nuke"
+destroot.destdir    ""

Added: trunk/dports/devel/nu/files/patch-Nukefile
===================================================================
--- trunk/dports/devel/nu/files/patch-Nukefile	                        (rev 0)
+++ trunk/dports/devel/nu/files/patch-Nukefile	2007-10-01 11:20:49 UTC (rev 29586)
@@ -0,0 +1,55 @@
+--- Nukefile.old	2007-10-01 06:26:21.000000000 -0400
++++ Nukefile	2007-10-01 07:16:19.000000000 -0400
+@@ -22,8 +22,8 @@
+ (set @nu_files 	  (filelist "^nu/.*\.nu$"))
+ (set @icon_files  (filelist "^lib/.*\.icns$"))
+ (set @frameworks  '("Cocoa"))
+-(set @libs 	  '("edit" "ffi" ))
+-(set @lib_dirs	  '("/usr/lib" "/usr/local/lib"))
++(set @libs 	  '("edit" "ffi" "pcre" ))
++(set @lib_dirs	  '("/usr/lib" "/usr/local/lib" "@@PREFIX@@/lib"))
+ (set @nib_files   '("share/nu/resources/English.lproj/MainMenu.nib"))
+ 
+ ;; framework description
+@@ -35,7 +35,7 @@
+ 
+ ;; build configuration
+ (set @cc "gcc")
+-(set @cflags "-g -DMACOSX -I/usr/local/include -isysroot /Developer/SDKs/MacOSX10.4u.sdk")
++(set @cflags "-g -DMACOSX -I/usr/local/include -I/usr/include -I@@PREFIX@@/include")
+ (set @mflags "-fobjc-exceptions") ;; Want to try Apple's new GC? Add this: "-fobjc-gc"
+ 
+ (cond
+@@ -45,12 +45,11 @@
+        (set @includes "-I ./libffi/include")
+        (set @lib_dirs (append @lib_dirs '("./libffi")))))
+ 
+-(set @arch '("ppc" "i386"))
++(set @arch '(@@ARCH@@))
+ ;(set @arch nil)
+ 
+ (set @ldflags
+      ((list
+-           "/usr/local/lib/libpcre.a" ;; statically link in pcre since most people won't have it..
+            ((@frameworks map: (do (framework) " -framework #{framework}")) join)
+            ((@libs map: (do (lib) " -l#{lib}")) join)
+            ((@lib_dirs map: (do (libdir) " -L#{libdir}")) join))
+@@ -97,15 +96,15 @@
+ 
+ ;; Except for the Nu.framework (installed in /Library/Frameworks), 
+ ;; all scripts and binaries are installed to /usr/local/bin
+-(set @prefix "/usr/local")
++(set @prefix "@@DESTROOT@@@@PREFIX@@")
+ 
+ (task "install" => "nush" is
+       ('("nuke" "nubile" "enu" "nutest" "nudoc") each: 
+         (do (program)
+             (SH "sudo cp tools/#{program} #{@prefix}/bin")))
+       (SH "sudo cp nush #{@prefix}/bin")
+-      (SH "sudo rm -rf /Library/Frameworks/#{@framework}.framework")
+-      (SH "cp -pRfv #{@framework}.framework /Library/Frameworks/#{@framework}.framework")
++      (SH "sudo rm -rf @@DESTROOT@@/Library/Frameworks/#{@framework}.framework")
++      (SH "cp -pRfv #{@framework}.framework @@DESTROOT@@/Library/Frameworks/#{@framework}.framework")
+       (SH "sudo mkdir -p #{@prefix}/share")
+       (SH "sudo rm -rf #{@prefix}/share/nu")
+       (SH "sudo cp -pRfv share/nu #{@prefix}/share/nu")

Added: trunk/dports/devel/nu/files/patch-Rakefile
===================================================================
--- trunk/dports/devel/nu/files/patch-Rakefile	                        (rev 0)
+++ trunk/dports/devel/nu/files/patch-Rakefile	2007-10-01 11:20:49 UTC (rev 29586)
@@ -0,0 +1,20 @@
+--- Rakefile.old	2007-10-01 06:21:51.000000000 -0400
++++ Rakefile	2007-10-01 06:23:21.000000000 -0400
+@@ -27,7 +27,7 @@
+ @gcc_objects = @gcc_files.sub(/\.c$/, '.o').sub(/\.m$/, '.o')
+ 
+ @cc = "gcc"
+- at cflags = "-g -O2 -Wall #{FFI_INCLUDE} -DMACOSX"
++ at cflags = "-g -O2 -Wall #{FFI_INCLUDE} -DMACOSX -I@@PREFIX@@/include"
+ @mflags = "-fobjc-exceptions"
+ @arch = ""
+ 
+@@ -45,7 +45,7 @@
+ end
+ 
+ file "mininush" => @gcc_objects do
+-  sh "gcc #{@gcc_objects} #{@arch} -g -O2 -o mininush -L/usr/local/lib -lreadline -lpcre #{FFI_LIB} -framework Cocoa"
++  sh "gcc #{@gcc_objects} #{@arch} -g -O2 -o mininush -L/usr/local/lib -L@@PREFIX@@/lib -lreadline -lpcre #{FFI_LIB} -framework Cocoa"
+ end
+ 
+ task :default => "mininush"

Added: trunk/dports/devel/nu/files/patch-libffi-Rakefile
===================================================================
--- trunk/dports/devel/nu/files/patch-libffi-Rakefile	                        (rev 0)
+++ trunk/dports/devel/nu/files/patch-libffi-Rakefile	2007-10-01 11:20:49 UTC (rev 29586)
@@ -0,0 +1,11 @@
+--- libffi/Rakefile.old	2007-10-01 06:52:29.000000000 -0400
++++ libffi/Rakefile	2007-10-01 06:52:37.000000000 -0400
+@@ -16,7 +16,7 @@
+ 
+ @cc = "gcc"
+ 
+- at arch = "-arch i386 -arch ppc"
++ at arch = ""
+ 
+ @cflags = "-g -O3 -Wall -DMACOSX -Iinclude -I. -Isrc"
+ 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20071001/1048d41a/attachment.html


More information about the macports-changes mailing list