[29769] trunk/dports/devel/nu
source_changes at macosforge.org
source_changes at macosforge.org
Tue Oct 9 03:55:48 PDT 2007
Revision: 29769
http://trac.macosforge.org/projects/macports/changeset/29769
Author: eridius at macports.org
Date: 2007-10-09 03:55:47 -0700 (Tue, 09 Oct 2007)
Log Message:
-----------
Upgrade Nu to 0.1.3
Modified Paths:
--------------
trunk/dports/devel/nu/Portfile
trunk/dports/devel/nu/files/patch-Nukefile
trunk/dports/devel/nu/files/patch-Rakefile
Added Paths:
-----------
trunk/dports/devel/nu/files/patch-Nukefile-single-arch
trunk/dports/devel/nu/files/patch-libffi-single-arch
Removed Paths:
-------------
trunk/dports/devel/nu/files/patch-libffi-Rakefile
Modified: trunk/dports/devel/nu/Portfile
===================================================================
--- trunk/dports/devel/nu/Portfile 2007-10-09 10:44:24 UTC (rev 29768)
+++ trunk/dports/devel/nu/Portfile 2007-10-09 10:55:47 UTC (rev 29769)
@@ -3,7 +3,7 @@
PortSystem 1.0
name nu
-version 0.1.1
+version 0.1.3
categories devel
maintainers eridius
description Nu is an interpreted object-oriented language written in Objective-C.
@@ -20,38 +20,33 @@
master_sites http://programming.nu/releases/
extract.suffix .tgz
-checksums md5 8492dc39806073b99b0af3b0b300a8ac \
- sha1 eadd5e7b16f980d53fb4f67a167a2f1028c73896
+checksums md5 574a54495deeca21977f9a217c01052c \
+ sha1 9fd1b5bf97a02d81705735e90d34aefd57fc5061
-patchfiles patch-Rakefile patch-Nukefile patch-libffi-Rakefile
+patchfiles patch-Rakefile patch-Nukefile patch-Nukefile-single-arch patch-libffi-single-arch
depends_lib port:pcre
depends_build bin:rake:rb-rake
use_configure no
-universal_variant no
test.run yes
test.cmd nuke
+livecheck.check regex
+livecheck.url http://programming.nu/downloads
+livecheck.regex {Nu-([\d.]+).tgz}
+
platform darwin 8 {
# set up the variant for pre-build
}
+variant universal {
+ patchfiles-delete patch-Nukefile-single-arch patch-libffi-single-arch
+}
+
post-patch {
- # fix prefixes
- foreach file [list Rakefile Nukefile] {
- reinplace s|@@PREFIX@@|$prefix|g ${worksrcpath}/$file
- reinplace s|@@DESTROOT@@|$destroot|g ${worksrcpath}/$file
- }
+ reinplace s|@@PREFIX@@|$prefix|g ${worksrcpath}/Rakefile
- # 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 tools
foreach tool [list enu nubile nudoc nuke nutest] {
reinplace s|/usr/local|$prefix| ${worksrcpath}/tools/$tool
@@ -67,7 +62,7 @@
build {
system "cd ${worksrcpath} && rake"
- system "cd ${worksrcpath} && ./mininush tools/nuke"
+ system "cd ${worksrcpath} && PREFIX=${prefix} ./mininush tools/nuke"
}
pre-destroot {
@@ -76,3 +71,5 @@
destroot.cmd "./mininush tools/nuke"
destroot.destdir ""
+destroot.env-append PREFIX=${prefix}
+destroot.env-append DESTDIR=${destroot}
Modified: trunk/dports/devel/nu/files/patch-Nukefile
===================================================================
--- trunk/dports/devel/nu/files/patch-Nukefile 2007-10-09 10:44:24 UTC (rev 29768)
+++ trunk/dports/devel/nu/files/patch-Nukefile 2007-10-09 10:55:47 UTC (rev 29769)
@@ -1,55 +1,76 @@
---- 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"))
+--- ../Nu-0.1.3.old/Nukefile 2007-10-05 23:31:40.000000000 -0400
++++ Nukefile 2007-10-09 06:44:01.000000000 -0400
+@@ -16,6 +16,15 @@
+ END)
+ (version writeToFile:"objc/version.h" atomically:NO encoding:NSUTF8StringEncoding error:(set error (NuReference new))))
- ;; framework description
-@@ -35,7 +35,7 @@
++;; read environment for prefix and destroot
++(let ((env ((NSProcessInfo processInfo) environment)))
++ (if (env objectForKey:"PREFIX")
++ (then (set @prefix (env objectForKey:"PREFIX")))
++ (else (set @prefix "/usr/local")))
++ (if (env objectForKey:"DESTDIR")
++ (then (set @destdir (env objectForKey:"DESTDIR")))
++ (else (set @destdir ""))))
++
+ ;; source files
+ (set @c_files (filelist "^objc/.*\.c$"))
+ (set @m_files (filelist "^objc/.*\.m$"))
+@@ -28,13 +37,11 @@
+ (set @libs '("edit" "ffi" ))
- ;; 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"
+ (set @lib_dirs (NSMutableArray arrayWithObject:"/usr/lib"))
+-(if (NSFileManager directoryExistsNamed:"/usr/local/lib") (@lib_dirs addObject:"/usr/local/lib"))
+-(if (NSFileManager directoryExistsNamed:"/opt/local/lib") (@lib_dirs addObject:"/opt/local/lib"))
++(if (NSFileManager directoryExistsNamed:"#{@prefix}/lib") (@lib_dirs addObject:"#{@prefix}/lib"))
- (cond
-@@ -45,12 +45,11 @@
- (set @includes "-I ./libffi/include")
- (set @lib_dirs (append @lib_dirs '("./libffi")))))
+ ;; includes
+ (set @includes "")
+-(if (NSFileManager directoryExistsNamed:"/usr/local/include") (@includes appendString:" -I /usr/local/include"))
+-(if (NSFileManager directoryExistsNamed:"/opt/local/include") (@includes appendString:" -I /opt/local/include"))
++(if (NSFileManager directoryExistsNamed:"#{@prefix}/include") (@includes appendString:" -I #{@prefix}/include"))
--(set @arch '("ppc" "i386"))
-+(set @arch '(@@ARCH@@))
- ;(set @arch nil)
-
+ (if (NSFileManager fileExistsNamed:"/usr/lib/libffi.dylib")
+ (then ;; Use the libffi that ships with OS X.
+@@ -67,8 +74,7 @@
(set @ldflags
((list
-- "/usr/local/lib/libpcre.a" ;; statically link in pcre since most people won't have it..
+ (cond ;; statically link in pcre since most people won't have it..
+- ((NSFileManager fileExistsNamed:"/usr/local/lib/libpcre.a") ("/usr/local/lib/libpcre.a"))
+- ((NSFileManager fileExistsNamed:"/opt/local/lib/libpcre.a") ("/opt/local/lib/libpcre.a"))
++ ((NSFileManager fileExistsNamed:"#{@prefix}/lib/libpcre.a") ("#{@prefix}/lib/libpcre.a"))
+ (else (NSException raise:"NukeBuildError" format:"Can't find static pcre library (libpcre.a).")))
((@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 @@
+@@ -115,20 +121,21 @@
+ (task "default" => "nush")
;; Except for the Nu.framework (installed in /Library/Frameworks),
- ;; all scripts and binaries are installed to /usr/local/bin
+-;; all scripts and binaries are installed to /usr/local/bin
-(set @prefix "/usr/local")
-+(set @prefix "@@DESTROOT@@@@PREFIX@@")
++;; all scripts and binaries are installed to #{@prefix}/bin
++
++(set @installprefix "#{@destdir}#{@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 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")
+- (SH "sudo mkdir -p #{@prefix}/share")
+- (SH "sudo rm -rf #{@prefix}/share/nu")
+- (SH "sudo cp -pRfv share/nu #{@prefix}/share/nu")
+- (SH "sudo cp -pRfv examples #{@prefix}/share/nu/examples"))
++ (SH "sudo ditto tools/#{program} #{@installprefix}/bin")))
++ (SH "sudo ditto nush #{@installprefix}/bin")
++ (SH "sudo rm -rf #{@destdir}/Library/Frameworks/#{@framework}.framework")
++ (SH "ditto #{@framework}.framework #{@destdir}/Library/Frameworks/#{@framework}.framework")
++ (SH "sudo mkdir -p #{@installprefix}/share")
++ (SH "sudo rm -rf #{@installprefix}/share/nu")
++ (SH "sudo ditto share/nu #{@installprefix}/share/nu")
++ (SH "sudo ditto examples #{@installprefix}/share/nu/examples"))
+
+ ;; Build a disk image for distributing the framework.
+ (task "framework_image" => "framework" is
Added: trunk/dports/devel/nu/files/patch-Nukefile-single-arch
===================================================================
--- trunk/dports/devel/nu/files/patch-Nukefile-single-arch (rev 0)
+++ trunk/dports/devel/nu/files/patch-Nukefile-single-arch 2007-10-09 10:55:47 UTC (rev 29769)
@@ -0,0 +1,11 @@
+--- Nukefile.old 2007-10-09 06:50:38.000000000 -0400
++++ Nukefile 2007-10-09 06:50:48.000000000 -0400
+@@ -69,7 +69,7 @@
+ ;; use this to build a universal binary
+ (set @arch '("ppc" "i386"))
+ ;; or this to just build for your current platform
+-;(set @arch nil)
++(set @arch nil)
+
+ (set @ldflags
+ ((list
Modified: trunk/dports/devel/nu/files/patch-Rakefile
===================================================================
--- trunk/dports/devel/nu/files/patch-Rakefile 2007-10-09 10:44:24 UTC (rev 29768)
+++ trunk/dports/devel/nu/files/patch-Rakefile 2007-10-09 10:55:47 UTC (rev 29769)
@@ -1,20 +1,19 @@
---- 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 @@
+--- ../Nu-0.1.3.old/Rakefile 2007-10-05 23:31:40.000000000 -0400
++++ Rakefile 2007-10-09 06:48:40.000000000 -0400
+@@ -17,14 +17,12 @@
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
+ @includes = FFI_INCLUDE
+- at includes += " -I /usr/local/include" if File.exist? "/usr/local/include"
+- at includes += " -I /opt/local/include" if File.exist? "/opt/local/include"
++ at includes += " -I @@PREFIX@@/include" if File.exist? "@@PREFIX@@/include"
- task :default => "mininush"
+ @frameworks = %w{Cocoa}
+ @libs = %w{objc pcre readline}
+ @lib_dirs = []
+- at lib_dirs << "/usr/local/lib" if File.exist? "/usr/local/lib"
+- at lib_dirs << "/opt/local/lib" if File.exist? "/opt/local/lib"
++ at lib_dirs << "@@PREFIX@@/lib" if File.exist? "@@PREFIX@@/lib"
+
+ CLEAN.include("*/*.o")
+ CLOBBER.include("mininush")
Deleted: trunk/dports/devel/nu/files/patch-libffi-Rakefile
===================================================================
--- trunk/dports/devel/nu/files/patch-libffi-Rakefile 2007-10-09 10:44:24 UTC (rev 29768)
+++ trunk/dports/devel/nu/files/patch-libffi-Rakefile 2007-10-09 10:55:47 UTC (rev 29769)
@@ -1,11 +0,0 @@
---- 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"
-
Copied: trunk/dports/devel/nu/files/patch-libffi-single-arch (from rev 29767, trunk/dports/devel/nu/files/patch-libffi-Rakefile)
===================================================================
--- trunk/dports/devel/nu/files/patch-libffi-single-arch (rev 0)
+++ trunk/dports/devel/nu/files/patch-libffi-single-arch 2007-10-09 10:55:47 UTC (rev 29769)
@@ -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/20071009/77528b44/attachment.html
More information about the macports-changes
mailing list