Ticket #45881: patch-Nukefile.diff

File patch-Nukefile.diff, 4.2 KB (added by crossd@…, 10 years ago)
  • Nukefile

    old new  
    100100(ifDarwin
    101101         (then (set @cflags ( "-Wall -g -fPIC -O2 -DMACOSX #{@sdk} #{@sdkflags}"))
    102102               (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"
    104104         (else (set @cflags "-Wall -g -std=gnu99 -fPIC")
    105105               (set @mflags ((NSString stringWithShellCommand:"gnustep-config --objc-flags") chomp))))
    106106
     
    112112(set @cflags (+ @cflags " -DHAVE_CONFIG_H"))
    113113
    114114(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"))))
    119116
    120117(set @includes
    121118     ((@inc_dirs map: (do (inc) " -I#{inc}")) join))
     
    201198(task "install" => "nush" is
    202199      ('("nuke" "nubile" "nutemplate" "nutest" "nudoc" "nubake" "nutmbundle") each:
    203200        (do (program)
    204             (SH "sudo cp tools/#{program} #{@installprefix}/bin")))
    205       (SH "sudo cp nush #{@installprefix}/bin")
     201            (SH "cp tools/#{program} #{@installprefix}/bin")))
     202      (SH "cp nush #{@installprefix}/bin")
    206203      (ifDarwin
    207204               ;; install the framework
    208                (SH "sudo rm -rf #{@destdir}/Library/Frameworks/#{@framework}.framework")
    209                (SH "sudo ditto #{@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"))
    210207      (ifGNUstep
    211208          ;; install the dynamic library
    212           (SH "sudo cp #{@library_executable_name} #{@installprefix}/lib")
     209          (SH "cp #{@library_executable_name} #{@installprefix}/lib")
    213210          ;; copy the headers
    214           (SH "sudo rm -rf #{@installprefix}/include/Nu")
    215           (SH "sudo cp -rp include/Nu #{@installprefix}/include")
    216           (SH "sudo cp -rp objc/*.h #{@installprefix}/include/Nu")
    217           (SH "sudo cp -rp nu/ #{@installprefix}/share/libNu"))
    218       (SH "sudo mkdir -p #{@installprefix}/share")
    219       (SH "sudo rm -rf #{@installprefix}/share/nu")
    220       (SH "sudo cp -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")
    221218      (ifDarwin
    222                (SH "sudo ditto examples #{@installprefix}/share/nu/examples")))
     219               (SH "ditto examples #{@installprefix}/share/nu/examples")))
    223220
    224221;; Build a disk image for distributing the framework.
    225222(task "framework_image" => "framework" is
     
    234231
    235232;; Build an installer and wrap it in a disk image.
    236233(task "installer" => "framework" "nush" is
    237       (SH "sudo rm -rf package dmg Nu.dmg")
     234      (SH "rm -rf package dmg Nu.dmg")
    238235      (SH "mkdir -p package/Library/Frameworks")
    239236      (SH "mkdir -p package/usr/local/bin")
    240237      (SH "mkdir -p package/usr/local/share")
     
    243240      (SH "cp -pRfv examples package/usr/local/share/nu")
    244241      (SH "cp nush package/usr/local/bin")
    245242      (SH "cp tools/* package/usr/local/bin")
    246       (SH "sudo chown -R root package")
    247       (SH "sudo chgrp -R admin package")
     243      (SH "chown -R root package")
     244      (SH "chgrp -R admin package")
    248245      (SH "#{PACKAGEMAKER} -build -f package -p Nu.pkg -d pkg/Description.plist -i pkg/Info.plist")
    249246      (SH "mkdir dmg; mv Nu.pkg dmg")
    250247      (set imagefile "Nu-#{(VERSION first)}.#{(VERSION second)}.#{(VERSION third)}.dmg")
    251       (SH "sudo rm -f #{imagefile}")
     248      (SH "rm -f #{imagefile}")
    252249      (SH "hdiutil create -srcdir dmg #{imagefile} -volname Nu")
    253       (SH "sudo rm -rf dmg package"))
     250      (SH "rm -rf dmg package"))
    254251
    255252;; alias for installer task
    256253(task "dmg" => "installer")