[128190] trunk/dports/devel/nu2
ryandesign at macports.org
ryandesign at macports.org
Sat Nov 15 19:38:08 PST 2014
Revision: 128190
https://trac.macports.org/changeset/128190
Author: ryandesign at macports.org
Date: 2014-11-15 19:38:08 -0800 (Sat, 15 Nov 2014)
Log Message:
-----------
nu2: update to 2.1.1 (#45881)
Modified Paths:
--------------
trunk/dports/devel/nu2/Portfile
trunk/dports/devel/nu2/files/patch-Makefile.diff
trunk/dports/devel/nu2/files/patch-Nukefile.diff
Added Paths:
-----------
trunk/dports/devel/nu2/files/patch-tools-nuke.diff
Removed Paths:
-------------
trunk/dports/devel/nu2/files/patch-tools_nuke.diff
Modified: trunk/dports/devel/nu2/Portfile
===================================================================
--- trunk/dports/devel/nu2/Portfile 2014-11-16 01:16:03 UTC (rev 128189)
+++ trunk/dports/devel/nu2/Portfile 2014-11-16 03:38:08 UTC (rev 128190)
@@ -1,10 +1,11 @@
+# -*- 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
# $Id$
PortSystem 1.0
+PortGroup github 1.0
+github.setup timburks nu 2.1.1 v
name nu2
-version 2.0.1
-revision 3
categories devel
maintainers nomaintainer
license Apache-2
@@ -20,21 +21,19 @@
are implemented in Objective-C or Nu.
homepage http://programming.nu/
-master_sites ${homepage}releases
-distname Nu-${version}
-extract.suffix .tgz
platforms darwin
-checksums rmd160 b461b08fb7cf9e1a5569fbf85b411e62320f5cab \
- sha256 bfaf9f17a2dbf0ef85cb3db267f2d773b14504aedd78e16580a61cfed676c4f4
+checksums rmd160 9dbc66a462d1116659f4538eeff1f19216700dc2 \
+ sha256 3254b3e4aa55086af7e0a28919358033cccbac6aec7d7addb3df62d1010445e2
-use_configure no
+# error: instance variables may not be placed in class extension
universal_variant no
supported_archs x86_64
+
depends_build port:pkgconfig
+
depends_lib port:libffi \
- port:pcre \
port:libedit
platform darwin {
@@ -45,45 +44,38 @@
}
}
-patchfiles patch-tools_nuke.diff \
- patch-Makefile.diff \
- patch-Nukefile.diff
+patchfiles patch-Makefile.diff \
+ patch-Nukefile.diff \
+ patch-tools-nuke.diff
post-patch {
- reinplace "s|\$(DEVROOT)/usr/bin/clang|${configure.cc}|" ${worksrcpath}/Makefile
- reinplace "s|#{DEVROOT}/usr/bin/clang|${configure.cc}|" ${worksrcpath}/Nukefile
- reinplace "s|{@destdir}/Library|{@destdir}${prefix}/Library|" ${worksrcpath}/Nukefile
+ reinplace -W ${worksrcpath} "s|@ARCHS@|[join [get_canonical_archs] {" "}]|g" Nukefile
+ reinplace -W ${worksrcpath} "s|@CC@|${configure.cc}|g" tools/nuke
+ reinplace -W ${worksrcpath} "s|@FRAMEWORKS_DIR@|${frameworks_dir}|g" tools/nuke
- # replace placeholders in source files
- reinplace "s|@ARCHS@|[join ${configure.build_arch} {" "}]|g" ${worksrcpath}/Nukefile
- reinplace "s|@CC@|${configure.cc}|g" ${worksrcpath}/Nukefile
- reinplace "s|@SDKROOT@|${configure.sdkroot}|g" ${worksrcpath}/Nukefile
-
- if {[vercmp $xcodeversion 4.3] < 0} {
- set SDK ${developer_dir}/SDKs/MacOSX${macosx_deployment_target}.sdk
+ if {${configure.sdkroot} ne ""} {
+ set sdk "-isysroot ${configure.sdkroot}"
} else {
- set SDK ${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${macosx_deployment_target}.sdk
- }
- reinplace "s|@SDKFLAGS@|-isysroot ${SDK}|g" ${worksrcpath}/Nukefile
-
- reinplace "s|/Library/Frameworks|${frameworks_dir}|" ${worksrcpath}/tools/nuke
+ set sdk ""
+ }
+ reinplace -W ${worksrcpath} "s|@SDK@|${sdk}|g" Makefile Nukefile
}
-test.run yes
-test.cmd nuke
+use_configure no
-livecheck.type regex
-livecheck.url http://programming.nu/downloads
-livecheck.regex {Nu-([\d.]+).tgz}
-
pre-build {
- system -W ${worksrcpath} "make PREFIX=${prefix} CC=${configure.cc}"
+ system -W ${worksrcpath} "${build.env} make -j${build.jobs}"
}
-build.cmd "./mininush tools/nuke"
+build.cmd ./mininush tools/nuke
build.target
-build.env PREFIX=${prefix}
+build.env CC="${configure.cc}" \
+ PREFIX=${prefix}
+test.run yes
+test.cmd nuke
+
destroot.destdir
-destroot.env-append PREFIX=${prefix} \
- DESTDIR=${destroot}
+destroot.env-append DESTDIR=${destroot} \
+ PREFIX=${prefix} \
+ FRAMEWORKS_DIR=${frameworks_dir}
Modified: trunk/dports/devel/nu2/files/patch-Makefile.diff
===================================================================
--- trunk/dports/devel/nu2/files/patch-Makefile.diff 2014-11-16 01:16:03 UTC (rev 128189)
+++ trunk/dports/devel/nu2/files/patch-Makefile.diff 2014-11-16 03:38:08 UTC (rev 128190)
@@ -1,9 +1,9 @@
---- Makefile.orig 2011-10-04 08:05:53.000000000 +0200
-+++ Makefile 2011-10-04 08:11:23.000000000 +0200
-@@ -10,15 +10,17 @@
+--- Makefile.orig 2013-07-07 12:50:11.000000000 -0500
++++ Makefile 2014-11-15 19:46:41.000000000 -0600
+@@ -11,23 +11,10 @@
+ # TOOLCHAIN = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
+ # SDKROOT = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer
- DEVROOT = $(shell xcode-select -print-path)
-
-ifeq ($(shell test -e /usr/lib/libffi.dylib && echo yes), yes)
- # Use the libffi that ships with OS X.
- FFI_LIB = -L/usr/lib -lffi
@@ -13,17 +13,37 @@
- FFI_LIB = -L./libffi -lffi
- FFI_INCLUDE = -I./libffi/include
-endif
-+#ifeq ($(shell test -e /usr/lib/libffi.dylib && echo yes), yes)
-+# # Use the libffi that ships with OS X.
-+# FFI_LIB = -L/usr/lib -lffi
-+# FFI_INCLUDE = -I/usr/include/ffi
-+#else
-+# # Use the libffi that is distributed with Nu.
-+# FFI_LIB = -L./libffi -lffi
-+# FFI_INCLUDE = -I./libffi/include
-+#endif
+-
+-ifeq ($(shell test -e $(SDKROOT)/SDKs/MacOSX10.7.sdk && echo yes), yes)
+- LION_CFLAGS = -isysroot $(SDKROOT)/SDKs/MacOSX10.7.sdk
+-else
+- LION_CFLAGS =
+-endif
+FFI_LIB := $(shell pkg-config libffi --libs)
+FFI_INCLUDE := $(shell pkg-config libffi --cflags)
- ifeq ($(shell test -e $(DEVROOT)/SDKs/MacOSX10.7.sdk && echo yes), yes)
- LION_CFLAGS = -isysroot $(DEVROOT)/SDKs/MacOSX10.7.sdk
+-INCLUDES = $(FFI_INCLUDE) -I./include
++INCLUDES = -I./include $(FFI_INCLUDE)
+
+ ifeq ($(shell test -d $(PREFIX)/include && echo yes), yes)
+ INCLUDES += -I$(PREFIX)/include
+@@ -43,17 +30,12 @@
+ GCC_FILES = $(OBJC_FILES) $(C_FILES)
+ GCC_OBJS = $(patsubst %.m, %.o, $(OBJC_FILES)) $(patsubst %.c, %.o, $(C_FILES))
+
+-CC = gcc
++CC ?= cc
+ CFLAGS = -g -Wall -DMININUSH
+ MFLAGS = -fobjc-exceptions
+
+ ifeq ($(SYSTEM), Darwin)
+- # as of around 10.7.3, clang becomes part of OS X
+- CC = /usr/bin/clang
+- ifneq ($(shell test -e $(CC) && echo yes), yes)
+- CC = $(TOOLCHAIN)/usr/bin/clang
+- endif
+- CFLAGS += -DMACOSX -DDARWIN $(LION_CFLAGS)
++ CFLAGS += -DMACOSX -DDARWIN @SDK@
+ else
+ # CFLAGS += -DLINUX
+ # MFLAGS += -fconstant-string-class=NSConstantString
Modified: trunk/dports/devel/nu2/files/patch-Nukefile.diff
===================================================================
--- trunk/dports/devel/nu2/files/patch-Nukefile.diff 2014-11-16 01:16:03 UTC (rev 128189)
+++ trunk/dports/devel/nu2/files/patch-Nukefile.diff 2014-11-16 03:38:08 UTC (rev 128190)
@@ -1,34 +1,29 @@
---- Nukefile.orig 2011-09-02 15:23:51.000000000 -0500
-+++ Nukefile 2012-01-15 02:34:31.000000000 -0600
-@@ -59,14 +59,6 @@
- (if (NSFileManager directoryExistsNamed:"#{@prefix}/include") (@inc_dirs addObject:"#{@prefix}/include"))
- (if (NSFileManager directoryExistsNamed:"#{@prefix}/lib") (@lib_dirs addObject:"#{@prefix}/lib"))
+--- Nukefile.orig 2013-07-07 12:50:11.000000000 -0500
++++ Nukefile 2014-11-15 20:51:01.000000000 -0600
+@@ -25,6 +25,9 @@
+ (if (env objectForKey:"PREFIX")
+ (then (set @prefix (env objectForKey:"PREFIX")))
+ (else (set @prefix "/usr/local")))
++ (if (env objectForKey:"FRAMEWORKS_DIR")
++ (then (set @frameworks_dir (env objectForKey:"FRAMEWORKS_DIR")))
++ (else (set @frameworks_dir "/Library/Frameworks")))
+ (if (env objectForKey:"DESTDIR")
+ (then (set @destdir (env objectForKey:"DESTDIR")))
+ (else (set @destdir ""))))
+@@ -79,28 +82,13 @@
--(ifDarwin
-- (then (if (NSFileManager fileExistsNamed:"/usr/lib/libffi.dylib")
-- (then ;; Use the libffi that ships with OS X.
-- (@inc_dirs addObject:"/usr/include/ffi"))
-- (else ;; Use the libffi that is distributed with Nu.
-- (@inc_dirs addObject:"./libffi/include")
-- (@lib_dirs addObject:"./libffi")))))
--
- ;; framework description
- (set @framework "Nu")
- (set @framework_identifier "nu.programming.framework")
-@@ -78,23 +70,10 @@
- (set @dylib "libNu")
+ ;; build configuration
- ;; build configuration
--(set @cc "gcc")
--(set @cc "#{DEVROOT}/usr/bin/clang")
--
-(set @sdkflags "")
-(set @sdk
-- (cond ((NSFileManager directoryExistsNamed:"#{DEVROOT}/SDKs/MacOSX10.7.sdk")
-- (set @sdkflags "-D__OBJC2__ -DSNOWLEOPARD")
+- (cond ((NSFileManager directoryExistsNamed:"#{DEVROOT}/SDKs/MacOSX10.8.sdk")
+- (set @sdkflags "-D__OBJC2__")
+- ("-isysroot #{DEVROOT}/SDKs/MacOSX10.8.sdk"))
+- ((NSFileManager directoryExistsNamed:"#{DEVROOT}/SDKs/MacOSX10.7.sdk")
+- (set @sdkflags "-D__OBJC2__")
- ("-isysroot #{DEVROOT}/SDKs/MacOSX10.7.sdk"))
- ((NSFileManager directoryExistsNamed:"#{DEVROOT}/SDKs/MacOSX10.6.sdk")
-- (set @sdkflags "-D__OBJC2__ -DSNOWLEOPARD")
+- (set @sdkflags "-D__OBJC2__")
- ("-isysroot #{DEVROOT}/SDKs/MacOSX10.6.sdk"))
- ((NSFileManager directoryExistsNamed:"#{DEVROOT}/SDKs/MacOSX10.5.sdk")
- (set @sdkflags "-D__OBJC2__")
@@ -36,14 +31,18 @@
- ((NSFileManager directoryExistsNamed:"#{DEVROOT}/SDKs/MacOSX10.4u.sdk")
- ("-isysroot #{DEVROOT}/SDKs/MacOSX10.4u.sdk"))
- (else "")))
-+(set @cc "@CC@")
-+(set @leopard "")
-+(set @sdk "@SDKROOT@")
-+(set @sdkflags "@SDKFLAGS@")
++(set @sdkflags "-D__OBJC2__")
++(set @sdk "@SDK@")
- (set @cflags "-Wall -g -std=gnu99 -fPIC")
+ (ifDarwin
+ (then (set @cflags ( "-Wall -g -fPIC -O2 -DMACOSX #{@sdk} #{@sdkflags}"))
+ (set @mflags_nogc "-fobjc-exceptions")
+- (set @mflags (+ @mflags_nogc " -fobjc-gc"))) ;; To use garbage collection, add this flag: "-fobjc-gc"
++ (set @mflags @mflags_nogc))
+ (else (set @cflags "-Wall -g -std=gnu99 -fPIC")
+ (set @mflags ((NSString stringWithShellCommand:"gnustep-config --objc-flags") chomp))))
-@@ -113,10 +92,7 @@
+@@ -112,10 +100,7 @@
(set @cflags (+ @cflags " -DHAVE_CONFIG_H"))
(ifDarwin
@@ -51,7 +50,55 @@
-
-(if (or isSnowLeopard isLion)
- (then (set @arch (append @arch '("x86_64")))))
-+ (then (set @arch '("@ARCHS@"))))
++ (then (set @arch '("@ARCHS@"))))
(set @includes
((@inc_dirs map: (do (inc) " -I#{inc}")) join))
+@@ -193,7 +178,7 @@
+
+ (task "default" => "nush")
+
+-;; Except for the Nu.framework (installed in /Library/Frameworks),
++;; Except for the Nu.framework (installed in #{@frameworks_dir}),
+ ;; all scripts and binaries are installed to #{@prefix}/bin
+
+ (set @installprefix "#{@destdir}#{@prefix}")
+@@ -201,25 +186,25 @@
+ (task "install" => "nush" is
+ ('("nuke" "nubile" "nutemplate" "nutest" "nudoc" "nubake" "nutmbundle") each:
+ (do (program)
+- (SH "sudo cp tools/#{program} #{@installprefix}/bin")))
+- (SH "sudo cp nush #{@installprefix}/bin")
++ (SH "cp tools/#{program} #{@installprefix}/bin")))
++ (SH "cp nush #{@installprefix}/bin")
+ (ifDarwin
+ ;; install the framework
+- (SH "sudo rm -rf #{@destdir}/Library/Frameworks/#{@framework}.framework")
+- (SH "sudo ditto #{@framework}.framework #{@destdir}/Library/Frameworks/#{@framework}.framework"))
++ (SH "rm -rf #{@destdir}#{@frameworks_dir}/#{@framework}.framework")
++ (SH "ditto #{@framework}.framework #{@destdir}#{@frameworks_dir}/#{@framework}.framework"))
+ (ifGNUstep
+ ;; install the dynamic library
+- (SH "sudo cp #{@library_executable_name} #{@installprefix}/lib")
++ (SH "cp #{@library_executable_name} #{@installprefix}/lib")
+ ;; copy the headers
+- (SH "sudo rm -rf #{@installprefix}/include/Nu")
+- (SH "sudo cp -rp include/Nu #{@installprefix}/include")
+- (SH "sudo cp -rp objc/*.h #{@installprefix}/include/Nu")
+- (SH "sudo cp -rp nu/ #{@installprefix}/share/libNu"))
+- (SH "sudo mkdir -p #{@installprefix}/share")
+- (SH "sudo rm -rf #{@installprefix}/share/nu")
+- (SH "sudo cp -rp share/nu #{@installprefix}/share/nu")
++ (SH "rm -rf #{@installprefix}/include/Nu")
++ (SH "cp -Rp include/Nu #{@installprefix}/include")
++ (SH "cp -Rp objc/*.h #{@installprefix}/include/Nu")
++ (SH "cp -Rp nu/ #{@installprefix}/share/libNu"))
++ (SH "mkdir -p #{@installprefix}/share")
++ (SH "rm -rf #{@installprefix}/share/nu")
++ (SH "cp -Rp share/nu #{@installprefix}/share/nu")
+ (ifDarwin
+- (SH "sudo ditto examples #{@installprefix}/share/nu/examples")))
++ (SH "ditto examples #{@installprefix}/share/nu/examples")))
+
+ ;; Build a disk image for distributing the framework.
+ (task "framework_image" => "framework" is
Copied: trunk/dports/devel/nu2/files/patch-tools-nuke.diff (from rev 128186, trunk/dports/devel/nu2/files/patch-tools_nuke.diff)
===================================================================
--- trunk/dports/devel/nu2/files/patch-tools-nuke.diff (rev 0)
+++ trunk/dports/devel/nu2/files/patch-tools-nuke.diff 2014-11-16 03:38:08 UTC (rev 128190)
@@ -0,0 +1,47 @@
+--- tools/nuke.orig 2013-07-07 12:50:11.000000000 -0500
++++ tools/nuke 2014-11-15 20:51:47.000000000 -0600
+@@ -271,17 +271,7 @@
+ momc)
+
+ (function select-compiler ()
+- (ifDarwin
+- ;; clang built-in to 10.7.3
+- (set clang "/usr/bin/clang")
+- (if (not (NSFileManager fileExistsNamed:clang))
+- ;; use xcode-select to get from e.g. /Developer or Xcode.app
+- (set DEVROOT (NSString stringWithShellCommand:"xcode-select -print-path"))
+- (set clang "#{DEVROOT}/usr/bin/clang")
+- (if (not (NSFileManager fileExistsNamed:clang))
+- (set clang nil))))
+- ;; default to gcc
+- (if clang clang (else "gcc")))
++ "@CC@")
+
+ ;; use this to create all the compilation tasks for the files in the @c_files and @m_files collections
+ (macro compilation-tasks ()
+@@ -552,7 +542,7 @@
+ (set @arch (list (NSString stringWithShellCommand:"arch"))))
+
+ (ifDarwin
+- (then (set FRAMEWORK_ROOT "/Library/Frameworks"))
++ (then (set FRAMEWORK_ROOT "@FRAMEWORKS_DIR@"))
+ (else (set FRAMEWORK_ROOT "/usr/local/frameworks")))
+
+ ;; framework directory tasks
+@@ -579,6 +569,7 @@
+
+ ;; framework architecture-specific executable
+ (set @framework_executables (NSMutableArray array))
++ (set @framework_install_path "#{FRAMEWORK_ROOT}")
+ (@arch each:
+ (do (architecture)
+ (set framework_executable "build/#{architecture}/framework-#{@framework}")
+@@ -707,7 +698,7 @@
+ (@framework_extra_install))
+ (SH "sudo mkdir -p #{FRAMEWORK_ROOT}")
+ (SH "sudo rm -rf #{FRAMEWORK_ROOT}/#{@framework}.framework")
+- (SH "sudo cp -rp #{@framework}.framework #{FRAMEWORK_ROOT}/#{@framework}.framework"))
++ (SH "sudo cp -Rp #{@framework}.framework #{FRAMEWORK_ROOT}/#{@framework}.framework"))
+
+ (task "test" => "framework" is
+ (SH "nutest test/test_*.nu"))
Deleted: trunk/dports/devel/nu2/files/patch-tools_nuke.diff
===================================================================
--- trunk/dports/devel/nu2/files/patch-tools_nuke.diff 2014-11-16 01:16:03 UTC (rev 128189)
+++ trunk/dports/devel/nu2/files/patch-tools_nuke.diff 2014-11-16 03:38:08 UTC (rev 128190)
@@ -1,10 +0,0 @@
---- tools/nuke.orig 2011-09-02 15:23:51.000000000 -0500
-+++ tools/nuke 2012-01-15 02:32:45.000000000 -0600
-@@ -579,6 +579,7 @@
-
- ;; framework architecture-specific executable
- (set @framework_executables (NSMutableArray array))
-+ (set @framework_install_path "#{FRAMEWORK_ROOT}")
- (@arch each:
- (do (architecture)
- (set framework_executable "build/#{architecture}/framework-#{@framework}")
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141115/f2ad2544/attachment-0001.html>
More information about the macports-changes
mailing list