Ticket #45881: patch-Nukefile.diff
File patch-Nukefile.diff, 4.2 KB (added by crossd@…, 10 years ago) |
---|
-
Nukefile
old new 100 100 (ifDarwin 101 101 (then (set @cflags ( "-Wall -g -fPIC -O2 -DMACOSX #{@sdk} #{@sdkflags}")) 102 102 (set @mflags_nogc "-fobjc-exceptions") 103 (set @mflags (+ @mflags_nogc " -fobjc-gc"))) ;; To use garbage collection, add this flag: "-fobjc-gc"103 (set @mflags @mflags_nogc)) ;; To use garbage collection, add this flag: "-fobjc-gc" 104 104 (else (set @cflags "-Wall -g -std=gnu99 -fPIC") 105 105 (set @mflags ((NSString stringWithShellCommand:"gnustep-config --objc-flags") chomp)))) 106 106 … … 112 112 (set @cflags (+ @cflags " -DHAVE_CONFIG_H")) 113 113 114 114 (ifDarwin 115 (then (set @arch '()))) ;; optionally add "ppc" or "ppc64" to the list 116 117 (if (or isSnowLeopard isLion) 118 (then (set @arch (append @arch '("x86_64"))))) 115 (then (set @arch '("x86_64")))) 119 116 120 117 (set @includes 121 118 ((@inc_dirs map: (do (inc) " -I#{inc}")) join)) … … 201 198 (task "install" => "nush" is 202 199 ('("nuke" "nubile" "nutemplate" "nutest" "nudoc" "nubake" "nutmbundle") each: 203 200 (do (program) 204 (SH " sudocp tools/#{program} #{@installprefix}/bin")))205 (SH " sudocp nush #{@installprefix}/bin")201 (SH "cp tools/#{program} #{@installprefix}/bin"))) 202 (SH "cp nush #{@installprefix}/bin") 206 203 (ifDarwin 207 204 ;; install the framework 208 (SH " sudorm -rf #{@destdir}/Library/Frameworks/#{@framework}.framework")209 (SH " sudoditto #{@framework}.framework #{@destdir}/Library/Frameworks/#{@framework}.framework"))205 (SH "rm -rf #{@destdir}/Library/Frameworks/#{@framework}.framework") 206 (SH "ditto #{@framework}.framework #{@destdir}/Library/Frameworks/#{@framework}.framework")) 210 207 (ifGNUstep 211 208 ;; install the dynamic library 212 (SH " sudocp #{@library_executable_name} #{@installprefix}/lib")209 (SH "cp #{@library_executable_name} #{@installprefix}/lib") 213 210 ;; copy the headers 214 (SH " sudorm -rf #{@installprefix}/include/Nu")215 (SH " sudocp -rp include/Nu #{@installprefix}/include")216 (SH " sudocp -rp objc/*.h #{@installprefix}/include/Nu")217 (SH " sudocp -rp nu/ #{@installprefix}/share/libNu"))218 (SH " sudomkdir -p #{@installprefix}/share")219 (SH " sudorm -rf #{@installprefix}/share/nu")220 (SH " sudocp -rp share/nu #{@installprefix}/share/nu")211 (SH "rm -rf #{@installprefix}/include/Nu") 212 (SH "cp -rp include/Nu #{@installprefix}/include") 213 (SH "cp -rp objc/*.h #{@installprefix}/include/Nu") 214 (SH "cp -rp nu/ #{@installprefix}/share/libNu")) 215 (SH "mkdir -p #{@installprefix}/share") 216 (SH "rm -rf #{@installprefix}/share/nu") 217 (SH "cp -rp share/nu #{@installprefix}/share/nu") 221 218 (ifDarwin 222 (SH " sudoditto examples #{@installprefix}/share/nu/examples")))219 (SH "ditto examples #{@installprefix}/share/nu/examples"))) 223 220 224 221 ;; Build a disk image for distributing the framework. 225 222 (task "framework_image" => "framework" is … … 234 231 235 232 ;; Build an installer and wrap it in a disk image. 236 233 (task "installer" => "framework" "nush" is 237 (SH " sudorm -rf package dmg Nu.dmg")234 (SH "rm -rf package dmg Nu.dmg") 238 235 (SH "mkdir -p package/Library/Frameworks") 239 236 (SH "mkdir -p package/usr/local/bin") 240 237 (SH "mkdir -p package/usr/local/share") … … 243 240 (SH "cp -pRfv examples package/usr/local/share/nu") 244 241 (SH "cp nush package/usr/local/bin") 245 242 (SH "cp tools/* package/usr/local/bin") 246 (SH " sudochown -R root package")247 (SH " sudochgrp -R admin package")243 (SH "chown -R root package") 244 (SH "chgrp -R admin package") 248 245 (SH "#{PACKAGEMAKER} -build -f package -p Nu.pkg -d pkg/Description.plist -i pkg/Info.plist") 249 246 (SH "mkdir dmg; mv Nu.pkg dmg") 250 247 (set imagefile "Nu-#{(VERSION first)}.#{(VERSION second)}.#{(VERSION third)}.dmg") 251 (SH " sudorm -f #{imagefile}")248 (SH "rm -f #{imagefile}") 252 249 (SH "hdiutil create -srcdir dmg #{imagefile} -volname Nu") 253 (SH " sudorm -rf dmg package"))250 (SH "rm -rf dmg package")) 254 251 255 252 ;; alias for installer task 256 253 (task "dmg" => "installer")