Changeset 128190


Ignore:
Timestamp:
Nov 16, 2014, 3:38:08 AM (3 years ago)
Author:
ryandesign@…
Message:

nu2: update to 2.1.1 (#45881)

Location:
trunk/dports/devel/nu2
Files:
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/dports/devel/nu2/Portfile

    r125020 r128190  
     1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
    12# $Id$
    23
    34PortSystem 1.0
     5PortGroup           github 1.0
    46
     7github.setup        timburks nu 2.1.1 v
    58name                nu2
    6 version             2.0.1
    7 revision            3
    89categories          devel
    910maintainers         nomaintainer
     
    2122
    2223homepage            http://programming.nu/
    23 master_sites        ${homepage}releases
    24 distname            Nu-${version}
    25 extract.suffix      .tgz
    2624
    2725platforms           darwin
    2826
    29 checksums           rmd160  b461b08fb7cf9e1a5569fbf85b411e62320f5cab \
    30                     sha256  bfaf9f17a2dbf0ef85cb3db267f2d773b14504aedd78e16580a61cfed676c4f4
     27checksums           rmd160  9dbc66a462d1116659f4538eeff1f19216700dc2 \
     28                    sha256  3254b3e4aa55086af7e0a28919358033cccbac6aec7d7addb3df62d1010445e2
    3129
    32 use_configure       no
     30# error: instance variables may not be placed in class extension
    3331universal_variant   no
    3432supported_archs     x86_64
     33
    3534depends_build       port:pkgconfig
     35
    3636depends_lib         port:libffi \
    37                     port:pcre \
    3837                    port:libedit
    3938
     
    4645}
    4746
    48 patchfiles          patch-tools_nuke.diff \
    49                     patch-Makefile.diff \
    50                     patch-Nukefile.diff
     47patchfiles          patch-Makefile.diff \
     48                    patch-Nukefile.diff \
     49                    patch-tools-nuke.diff
    5150
    5251post-patch {
    53     reinplace "s|\$(DEVROOT)/usr/bin/clang|${configure.cc}|"      ${worksrcpath}/Makefile
    54     reinplace "s|#{DEVROOT}/usr/bin/clang|${configure.cc}|"       ${worksrcpath}/Nukefile
    55     reinplace "s|{@destdir}/Library|{@destdir}${prefix}/Library|" ${worksrcpath}/Nukefile
     52    reinplace -W ${worksrcpath} "s|@ARCHS@|[join [get_canonical_archs] {" "}]|g" Nukefile
     53    reinplace -W ${worksrcpath} "s|@CC@|${configure.cc}|g" tools/nuke
     54    reinplace -W ${worksrcpath} "s|@FRAMEWORKS_DIR@|${frameworks_dir}|g" tools/nuke
    5655
    57     # replace placeholders in source files 
    58     reinplace "s|@ARCHS@|[join ${configure.build_arch} {" "}]|g" ${worksrcpath}/Nukefile
    59     reinplace "s|@CC@|${configure.cc}|g" ${worksrcpath}/Nukefile
    60     reinplace "s|@SDKROOT@|${configure.sdkroot}|g" ${worksrcpath}/Nukefile
     56    if {${configure.sdkroot} ne ""} {
     57        set sdk "-isysroot ${configure.sdkroot}"
     58    } else {
     59        set sdk ""
     60    }
     61    reinplace -W ${worksrcpath} "s|@SDK@|${sdk}|g" Makefile Nukefile
     62}
    6163
    62     if {[vercmp $xcodeversion 4.3] < 0} {
    63         set SDK ${developer_dir}/SDKs/MacOSX${macosx_deployment_target}.sdk
    64     } else {
    65         set SDK ${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${macosx_deployment_target}.sdk
    66     }
    67     reinplace "s|@SDKFLAGS@|-isysroot ${SDK}|g" ${worksrcpath}/Nukefile
     64use_configure       no
    6865
    69     reinplace "s|/Library/Frameworks|${frameworks_dir}|"          ${worksrcpath}/tools/nuke
     66pre-build {
     67    system -W ${worksrcpath} "${build.env} make -j${build.jobs}"
    7068}
     69
     70build.cmd           ./mininush tools/nuke
     71build.target
     72build.env           CC="${configure.cc}" \
     73                    PREFIX=${prefix}
    7174
    7275test.run            yes
    7376test.cmd            nuke
    7477
    75 livecheck.type      regex
    76 livecheck.url       http://programming.nu/downloads
    77 livecheck.regex     {Nu-([\d.]+).tgz}
    78 
    79 pre-build {
    80     system -W ${worksrcpath} "make PREFIX=${prefix} CC=${configure.cc}"
    81 }
    82 
    83 build.cmd           "./mininush tools/nuke"
    84 build.target
    85 build.env           PREFIX=${prefix}
    86 
    8778destroot.destdir
    88 destroot.env-append PREFIX=${prefix} \
    89                     DESTDIR=${destroot}
     79destroot.env-append DESTDIR=${destroot} \
     80                    PREFIX=${prefix} \
     81                    FRAMEWORKS_DIR=${frameworks_dir}
  • trunk/dports/devel/nu2/files/patch-Makefile.diff

    r84894 r128190  
    1 --- Makefile.orig       2011-10-04 08:05:53.000000000 +0200
    2 +++ Makefile    2011-10-04 08:11:23.000000000 +0200
    3 @@ -10,15 +10,17 @@
    4  
    5  DEVROOT = $(shell xcode-select -print-path)
     1--- Makefile.orig       2013-07-07 12:50:11.000000000 -0500
     2+++ Makefile    2014-11-15 19:46:41.000000000 -0600
     3@@ -11,23 +11,10 @@
     4 # TOOLCHAIN = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
     5 # SDKROOT   = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
    66 
    77-ifeq ($(shell test -e /usr/lib/libffi.dylib && echo yes), yes)
     
    1414-       FFI_INCLUDE = -I./libffi/include
    1515-endif
    16 +#ifeq ($(shell test -e /usr/lib/libffi.dylib && echo yes), yes)
    17 +#      # Use the libffi that ships with OS X.
    18 +#      FFI_LIB = -L/usr/lib -lffi
    19 +#      FFI_INCLUDE = -I/usr/include/ffi
    20 +#else
    21 +#      # Use the libffi that is distributed with Nu.
    22 +#      FFI_LIB = -L./libffi -lffi
    23 +#      FFI_INCLUDE = -I./libffi/include
    24 +#endif
     16-
     17-ifeq ($(shell test -e $(SDKROOT)/SDKs/MacOSX10.7.sdk && echo yes), yes)
     18-        LION_CFLAGS = -isysroot $(SDKROOT)/SDKs/MacOSX10.7.sdk
     19-else
     20-        LION_CFLAGS =
     21-endif
    2522+FFI_LIB := $(shell pkg-config libffi --libs)
    2623+FFI_INCLUDE := $(shell pkg-config libffi --cflags)
    2724 
    28  ifeq ($(shell test -e $(DEVROOT)/SDKs/MacOSX10.7.sdk && echo yes), yes)
    29          LION_CFLAGS = -isysroot $(DEVROOT)/SDKs/MacOSX10.7.sdk
     25-INCLUDES = $(FFI_INCLUDE) -I./include
     26+INCLUDES = -I./include $(FFI_INCLUDE)
     27 
     28 ifeq ($(shell test -d $(PREFIX)/include && echo yes), yes)
     29        INCLUDES += -I$(PREFIX)/include
     30@@ -43,17 +30,12 @@
     31 GCC_FILES = $(OBJC_FILES) $(C_FILES)
     32 GCC_OBJS = $(patsubst %.m, %.o, $(OBJC_FILES)) $(patsubst %.c, %.o, $(C_FILES))
     33 
     34-CC = gcc
     35+CC ?= cc
     36 CFLAGS = -g -Wall -DMININUSH
     37 MFLAGS = -fobjc-exceptions
     38 
     39 ifeq ($(SYSTEM), Darwin)
     40-       # as of around 10.7.3, clang becomes part of OS X
     41-       CC = /usr/bin/clang
     42-       ifneq ($(shell test -e $(CC) && echo yes), yes)
     43-               CC = $(TOOLCHAIN)/usr/bin/clang
     44-       endif
     45-       CFLAGS += -DMACOSX -DDARWIN $(LION_CFLAGS) 
     46+       CFLAGS += -DMACOSX -DDARWIN @SDK@
     47 else
     48 #      CFLAGS += -DLINUX
     49 #      MFLAGS += -fconstant-string-class=NSConstantString
  • trunk/dports/devel/nu2/files/patch-Nukefile.diff

    r89178 r128190  
    1 --- Nukefile.orig       2011-09-02 15:23:51.000000000 -0500
    2 +++ Nukefile    2012-01-15 02:34:31.000000000 -0600
    3 @@ -59,14 +59,6 @@
    4  (if (NSFileManager directoryExistsNamed:"#{@prefix}/include") (@inc_dirs addObject:"#{@prefix}/include"))
    5  (if (NSFileManager directoryExistsNamed:"#{@prefix}/lib") (@lib_dirs addObject:"#{@prefix}/lib"))
    6  
    7 -(ifDarwin
    8 -         (then (if (NSFileManager fileExistsNamed:"/usr/lib/libffi.dylib")
    9 -                   (then ;; Use the libffi that ships with OS X.
    10 -                         (@inc_dirs addObject:"/usr/include/ffi"))
    11 -                   (else ;; Use the libffi that is distributed with Nu.
    12 -                         (@inc_dirs addObject:"./libffi/include")
    13 -                         (@lib_dirs addObject:"./libffi")))))
    14 -
    15  ;; framework description
    16  (set @framework "Nu")
    17  (set @framework_identifier   "nu.programming.framework")
    18 @@ -78,23 +70,10 @@
    19  (set @dylib "libNu")
     1--- Nukefile.orig       2013-07-07 12:50:11.000000000 -0500
     2+++ Nukefile    2014-11-15 20:51:01.000000000 -0600
     3@@ -25,6 +25,9 @@
     4      (if (env objectForKey:"PREFIX")
     5          (then (set @prefix (env objectForKey:"PREFIX")))
     6          (else (set @prefix "/usr/local")))
     7+     (if (env objectForKey:"FRAMEWORKS_DIR")
     8+         (then (set @frameworks_dir (env objectForKey:"FRAMEWORKS_DIR")))
     9+         (else (set @frameworks_dir "/Library/Frameworks")))
     10      (if (env objectForKey:"DESTDIR")
     11          (then (set @destdir (env objectForKey:"DESTDIR")))
     12          (else (set @destdir ""))))
     13@@ -79,28 +82,13 @@
    2014 
    2115 ;; build configuration
    22 -(set @cc "gcc")
    23 -(set @cc "#{DEVROOT}/usr/bin/clang")
    24 -
     16 
    2517-(set @sdkflags "")
    2618-(set @sdk
    27 -     (cond ((NSFileManager directoryExistsNamed:"#{DEVROOT}/SDKs/MacOSX10.7.sdk")
    28 -            (set @sdkflags "-D__OBJC2__ -DSNOWLEOPARD")
     19-     (cond ((NSFileManager directoryExistsNamed:"#{DEVROOT}/SDKs/MacOSX10.8.sdk")
     20-            (set @sdkflags "-D__OBJC2__")
     21-            ("-isysroot #{DEVROOT}/SDKs/MacOSX10.8.sdk"))
     22-           ((NSFileManager directoryExistsNamed:"#{DEVROOT}/SDKs/MacOSX10.7.sdk")
     23-            (set @sdkflags "-D__OBJC2__")
    2924-            ("-isysroot #{DEVROOT}/SDKs/MacOSX10.7.sdk"))
    3025-           ((NSFileManager directoryExistsNamed:"#{DEVROOT}/SDKs/MacOSX10.6.sdk")
    31 -            (set @sdkflags "-D__OBJC2__ -DSNOWLEOPARD")
     26-            (set @sdkflags "-D__OBJC2__")
    3227-            ("-isysroot #{DEVROOT}/SDKs/MacOSX10.6.sdk"))
    3328-           ((NSFileManager directoryExistsNamed:"#{DEVROOT}/SDKs/MacOSX10.5.sdk")
     
    3732-            ("-isysroot #{DEVROOT}/SDKs/MacOSX10.4u.sdk"))
    3833-           (else "")))
    39 +(set @cc "@CC@")
    40 +(set @leopard "")
    41 +(set @sdk "@SDKROOT@")
    42 +(set @sdkflags "@SDKFLAGS@")
     34+(set @sdkflags "-D__OBJC2__")
     35+(set @sdk "@SDK@")
    4336 
    44  (set @cflags "-Wall -g -std=gnu99 -fPIC")
     37 (ifDarwin
     38          (then (set @cflags ( "-Wall -g -fPIC -O2 -DMACOSX #{@sdk} #{@sdkflags}"))
     39                (set @mflags_nogc "-fobjc-exceptions")
     40-               (set @mflags (+ @mflags_nogc " -fobjc-gc"))) ;; To use garbage collection, add this flag: "-fobjc-gc"
     41+               (set @mflags @mflags_nogc))
     42          (else (set @cflags "-Wall -g -std=gnu99 -fPIC")
     43                (set @mflags ((NSString stringWithShellCommand:"gnustep-config --objc-flags") chomp))))
    4544 
    46 @@ -113,10 +92,7 @@
     45@@ -112,10 +100,7 @@
    4746 (set @cflags (+ @cflags " -DHAVE_CONFIG_H"))
    4847 
     
    5251-(if (or isSnowLeopard isLion)
    5352-       (then (set @arch (append @arch '("x86_64")))))
    54 +         (then (set @arch '("@ARCHS@"))))
     53+       (then (set @arch '("@ARCHS@"))))
    5554 
    5655 (set @includes
    5756      ((@inc_dirs map: (do (inc) " -I#{inc}")) join))
     57@@ -193,7 +178,7 @@
     58 
     59 (task "default" => "nush")
     60 
     61-;; Except for the Nu.framework (installed in /Library/Frameworks),
     62+;; Except for the Nu.framework (installed in #{@frameworks_dir}),
     63 ;; all scripts and binaries are installed to #{@prefix}/bin
     64 
     65 (set @installprefix "#{@destdir}#{@prefix}")
     66@@ -201,25 +186,25 @@
     67 (task "install" => "nush" is
     68       ('("nuke" "nubile" "nutemplate" "nutest" "nudoc" "nubake" "nutmbundle") each:
     69         (do (program)
     70-            (SH "sudo cp tools/#{program} #{@installprefix}/bin")))
     71-      (SH "sudo cp nush #{@installprefix}/bin")
     72+            (SH "cp tools/#{program} #{@installprefix}/bin")))
     73+      (SH "cp nush #{@installprefix}/bin")
     74       (ifDarwin
     75                ;; install the framework
     76-               (SH "sudo rm -rf #{@destdir}/Library/Frameworks/#{@framework}.framework")
     77-               (SH "sudo ditto #{@framework}.framework #{@destdir}/Library/Frameworks/#{@framework}.framework"))
     78+               (SH "rm -rf #{@destdir}#{@frameworks_dir}/#{@framework}.framework")
     79+               (SH "ditto #{@framework}.framework #{@destdir}#{@frameworks_dir}/#{@framework}.framework"))
     80       (ifGNUstep
     81           ;; install the dynamic library
     82-          (SH "sudo cp #{@library_executable_name} #{@installprefix}/lib")
     83+          (SH "cp #{@library_executable_name} #{@installprefix}/lib")
     84           ;; copy the headers
     85-          (SH "sudo rm -rf #{@installprefix}/include/Nu")
     86-          (SH "sudo cp -rp include/Nu #{@installprefix}/include")
     87-          (SH "sudo cp -rp objc/*.h #{@installprefix}/include/Nu")
     88-         (SH "sudo cp -rp nu/ #{@installprefix}/share/libNu"))
     89-      (SH "sudo mkdir -p #{@installprefix}/share")
     90-      (SH "sudo rm -rf #{@installprefix}/share/nu")
     91-      (SH "sudo cp -rp share/nu #{@installprefix}/share/nu")
     92+          (SH "rm -rf #{@installprefix}/include/Nu")
     93+          (SH "cp -Rp include/Nu #{@installprefix}/include")
     94+          (SH "cp -Rp objc/*.h #{@installprefix}/include/Nu")
     95+          (SH "cp -Rp nu/ #{@installprefix}/share/libNu"))
     96+      (SH "mkdir -p #{@installprefix}/share")
     97+      (SH "rm -rf #{@installprefix}/share/nu")
     98+      (SH "cp -Rp share/nu #{@installprefix}/share/nu")
     99       (ifDarwin
     100-               (SH "sudo ditto examples #{@installprefix}/share/nu/examples")))
     101+               (SH "ditto examples #{@installprefix}/share/nu/examples")))
     102 
     103 ;; Build a disk image for distributing the framework.
     104 (task "framework_image" => "framework" is
  • trunk/dports/devel/nu2/files/patch-tools-nuke.diff

    r128186 r128190  
    1 --- tools/nuke.orig     2011-09-02 15:23:51.000000000 -0500
    2 +++ tools/nuke  2012-01-15 02:32:45.000000000 -0600
    3 @@ -579,6 +579,7 @@
     1--- tools/nuke.orig     2013-07-07 12:50:11.000000000 -0500
     2+++ tools/nuke  2014-11-15 20:51:47.000000000 -0600
     3@@ -271,17 +271,7 @@
     4      momc)
     5 
     6 (function select-compiler ()
     7-     (ifDarwin
     8-              ;; clang built-in to 10.7.3
     9-              (set clang "/usr/bin/clang")
     10-              (if (not (NSFileManager fileExistsNamed:clang))
     11-                  ;; use xcode-select to get from e.g. /Developer or Xcode.app
     12-                  (set DEVROOT (NSString stringWithShellCommand:"xcode-select -print-path"))
     13-                  (set clang "#{DEVROOT}/usr/bin/clang")
     14-                  (if (not (NSFileManager fileExistsNamed:clang))
     15-                      (set clang nil))))
     16-     ;; default to gcc
     17-     (if clang clang (else "gcc")))
     18+     "@CC@")
     19 
     20 ;; use this to create all the compilation tasks for the files in the @c_files and @m_files collections
     21 (macro compilation-tasks ()
     22@@ -552,7 +542,7 @@
     23                     (set @arch (list (NSString stringWithShellCommand:"arch"))))
     24             
     25             (ifDarwin
     26-                     (then (set FRAMEWORK_ROOT "/Library/Frameworks"))
     27+                     (then (set FRAMEWORK_ROOT "@FRAMEWORKS_DIR@"))
     28                      (else (set FRAMEWORK_ROOT "/usr/local/frameworks")))
     29             
     30             ;; framework directory tasks
     31@@ -579,6 +569,7 @@
    432             
    533             ;; framework architecture-specific executable
     
    937                    (do (architecture)
    1038                        (set framework_executable "build/#{architecture}/framework-#{@framework}")
     39@@ -707,7 +698,7 @@
     40                       (@framework_extra_install))
     41                   (SH "sudo mkdir -p #{FRAMEWORK_ROOT}")
     42                   (SH "sudo rm -rf #{FRAMEWORK_ROOT}/#{@framework}.framework")
     43-                  (SH "sudo cp -rp #{@framework}.framework #{FRAMEWORK_ROOT}/#{@framework}.framework"))
     44+                  (SH "sudo cp -Rp #{@framework}.framework #{FRAMEWORK_ROOT}/#{@framework}.framework"))
     45             
     46             (task "test" => "framework" is
     47                   (SH "nutest test/test_*.nu"))
Note: See TracChangeset for help on using the changeset viewer.