diff --git a/trunk/dports/lang/chicken/Portfile b/trunk/dports/lang/chicken/Portfile
a
|
b
|
|
4 | 4 | PortSystem 1.0 |
5 | 5 | |
6 | 6 | name chicken |
7 | | version 4.7.0 |
8 | | revision 2 |
| 7 | version 4.8.0.1 |
9 | 8 | categories lang scheme |
10 | 9 | license BSD public-domain |
11 | 10 | maintainers gmail.com:arto.bendiken gmail.com:ivan.g.raikov |
… |
… |
|
17 | 16 | enhancements and extensions. |
18 | 17 | homepage http://www.call-with-current-continuation.org/ |
19 | 18 | platforms darwin |
20 | | master_sites http://code.call-cc.org/releases/${version} |
21 | 19 | |
22 | | checksums md5 9389388fdf04c3c64de29633aae12539 \ |
23 | | sha1 504036951eccda7680547dae63ad44e8960d3f72 \ |
24 | | rmd160 421f6e7383a666b836a7ad9d5ac342c8033bfff6 |
25 | | |
26 | | patchfiles patch-Makefile.macosx \ |
27 | | eval.c.patch \ |
28 | | clang.patch |
29 | | |
30 | | post-patch { |
31 | | # use full path with dlopen (#28617) |
32 | | # this is ugly because we can't edit the scheme source (we'd need to |
33 | | # already have the compiler) and the generated C uses an octal length |
34 | | # prefix for strings. |
35 | | set len [expr [string length ${prefix}] + [string length "/lib/libchicken"]] |
36 | | reinplace "s|031__PREFIX__|[format %03o $len]${prefix}|" ${worksrcpath}/eval.c |
| 20 | # Restrict universal variant to Tiger and Leopard because upstream only |
| 21 | # supports i386/ppc universal binaries. Define this up here, before |
| 22 | # get_canonical_archflags is called. |
| 23 | if {${os.platform} == "darwin" && ${os.major} < 10} { |
| 24 | variant universal {} |
37 | 25 | } |
38 | 26 | |
39 | | # https://trac.macports.org/ticket/32298 |
40 | | compiler.whitelist-append gcc-4.2 apple-gcc-4.2 gcc-4.0 |
| 27 | set branch [join [lrange [split ${version} .] 0 2] .] |
| 28 | master_sites http://code.call-cc.org/releases/${branch} |
41 | 29 | |
42 | | # TODO: base should do this: http://trac.macports.org/ticket/32542 |
43 | | if {[info exists portconfigure::compiler_name_map(${configure.compiler})]} { |
44 | | depends_build-append port:$portconfigure::compiler_name_map(${configure.compiler}) |
| 30 | checksums rmd160 8a784006e94ea8144664ce3740f88b7a0572619e \ |
| 31 | sha256 a60efa9d2a621ecb9e03b41ebdd03ae27ecb32c1292671fd969506c9baf88d0c |
45 | 32 | |
46 | | # base 2.1.x ignores the argument and just use ${configure.compiler} |
47 | | if {[portconfigure::arch_flag_supported ${configure.compiler}]} { |
48 | | depends_skip_archcheck-append $portconfigure::compiler_name_map(${configure.compiler}) |
49 | | } |
50 | | |
51 | | if {[string match macports-gcc* ${configure.compiler}]} { |
52 | | depends_lib-append port:$portconfigure::compiler_name_map(${configure.compiler}) |
53 | | } |
| 33 | # Use the correct architecture and SDK flags. |
| 34 | patchfiles patch-Makefile.macosx.diff \ |
| 35 | patch-rules.make.diff |
| 36 | post-patch { |
| 37 | reinplace "s/__MP_ARCH_CFLAGS__/[get_canonical_archflags cc]/" \ |
| 38 | Makefile.macosx rules.make |
| 39 | reinplace "s/__MP_ARCH_LDFLAGS__/[get_canonical_archflags ld]/" \ |
| 40 | Makefile.macosx |
| 41 | reinplace "s/__MP_SDK_CFLAGS__/-isysroot ${configure.sdkroot}/" \ |
| 42 | Makefile.macosx |
| 43 | reinplace "s/__MP_SDK_LDFLAGS__/-Wl,-syslibroot,${configure.sdkroot}/" \ |
| 44 | Makefile.macosx |
54 | 45 | } |
55 | 46 | |
56 | 47 | use_configure no |
57 | | use_parallel_build no |
58 | 48 | |
| 49 | # Upstream explicitly requires GNU make. |
| 50 | build.type gnu |
59 | 51 | build.args C_COMPILER=${configure.cc} \ |
| 52 | CXX_COMPILER=${configure.cxx} \ |
60 | 53 | PLATFORM=macosx \ |
61 | 54 | PREFIX=${prefix} |
| 55 | # Upstream does not support parallel builds. |
| 56 | use_parallel_build no |
62 | 57 | |
63 | | if {"x86_64" == ${configure.build_arch}} { |
64 | | build.args-append ARCH=x86-64 |
| 58 | # Force build system to respect build_arch; otherwise it chooses |
| 59 | # architecture using uname. |
| 60 | if {[variant_isset universal]} { |
| 61 | if {${os.major} == 9} { |
| 62 | macosx_deployment_target 10.4 |
| 63 | } |
| 64 | build.args-append ARCH=universal |
| 65 | } else { |
| 66 | switch -glob ${configure.build_arch} { |
| 67 | i386 { |
| 68 | build.args-append ARCH=x86 |
| 69 | } |
| 70 | x86_64 { |
| 71 | build.args-append ARCH=x86-64 |
| 72 | } |
| 73 | ppc* { |
| 74 | if {${os.platform} == "darwin"} { |
| 75 | build.args-append ARCH=ppc.darwin |
| 76 | } else { |
| 77 | build.args-append ARCH=ppc.sysv |
| 78 | } |
| 79 | } |
| 80 | } |
65 | 81 | } |
66 | 82 | |
67 | 83 | destroot.args ${build.args} |
diff --git a/trunk/dports/lang/chicken/files/clang.patch b/trunk/dports/lang/chicken/files/clang.patch
deleted file mode 10644
+
|
-
|
|
1 | | --- chicken.h.orig 2013-01-30 00:22:08.000000000 -0800 |
2 | | +++ chicken.h 2013-01-30 00:22:10.000000000 -0800 |
3 | | @@ -226,11 +226,7 @@ void *alloca (); |
4 | | # ifndef __cplusplus |
5 | | # define C_cblock ({ |
6 | | # define C_cblockend }) |
7 | | -# ifdef __clang__ |
8 | | -# define C_noret |
9 | | -# else |
10 | | -# define C_noret __attribute__ ((noreturn)) |
11 | | -# endif |
12 | | +# define C_noret __attribute__ ((noreturn)) |
13 | | # define C_noret_decl(name) |
14 | | # define C_aligned __attribute__ ((aligned)) |
15 | | # endif |
diff --git a/trunk/dports/lang/chicken/files/eval.c.patch b/trunk/dports/lang/chicken/files/eval.c.patch
deleted file mode 10644
+
|
-
|
|
1 | | --- eval.c.orig 2011-05-24 19:19:11.000000000 +1000 |
2 | | +++ eval.c 2012-02-16 13:48:39.000000000 +1100 |
3 | | @@ -3522,7 +3522,7 @@ |
4 | | lf[214]=C_h_intern(&lf[214],26,"\003sysload-library-extension"); |
5 | | lf[215]=C_h_intern(&lf[215],6,"cygwin"); |
6 | | lf[216]=C_decode_literal(C_heaptop,"\376\003\000\000\002\376B\000\000\014cygchicken-0\376\377\016"); |
7 | | -lf[217]=C_decode_literal(C_heaptop,"\376\003\000\000\002\376B\000\000\012libchicken\376\377\016"); |
8 | | +lf[217]=C_decode_literal(C_heaptop,"\376\003\000\000\002\376B\000\000\031__PREFIX__/lib/libchicken\376\377\016"); |
9 | | lf[218]=C_h_intern(&lf[218],34,"\003sysdefault-dynamic-load-libraries"); |
10 | | lf[219]=C_h_intern(&lf[219],22,"dynamic-load-libraries"); |
11 | | lf[220]=C_h_intern(&lf[220],13,"string-append"); |
diff --git a/trunk/dports/lang/chicken/files/patch-Makefile.macosx b/trunk/dports/lang/chicken/files/patch-Makefile.macosx
deleted file mode 10644
+
|
-
|
|
1 | | --- Makefile.macosx.orig 2011-10-08 22:44:42.000000000 -0400 |
2 | | +++ Makefile.macosx 2011-10-08 22:45:09.000000000 -0400 |
3 | | @@ -51,7 +51,7 @@ |
4 | | C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os -fomit-frame-pointer |
5 | | endif |
6 | | endif |
7 | | -LINKER_LINK_SHARED_LIBRARY_OPTIONS = -dynamiclib -compatibility_version 1 -current_version 1.0 -install_name $@ |
8 | | +LINKER_LINK_SHARED_LIBRARY_OPTIONS = -dynamiclib -compatibility_version 1 -current_version 1.0 -install_name ${LIBDIR}/$@ |
9 | | POSTINSTALL_PROGRAM_FLAGS = -change lib$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX)$(SO) $(LIBDIR)/lib$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX)$(SO) |
10 | | LIBRARIAN_OPTIONS = scru |
11 | | LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -bundle -L. |
diff --git a/trunk/dports/lang/chicken/files/patch-Makefile.macosx b/trunk/dports/lang/chicken/files/patch-Makefile.macosx.diff
copy from trunk/dports/lang/chicken/files/patch-Makefile.macosx
copy to trunk/dports/lang/chicken/files/patch-Makefile.macosx.diff
a
|
b
|
|
1 | | --- Makefile.macosx.orig 2011-10-08 22:44:42.000000000 -0400 |
2 | | +++ Makefile.macosx 2011-10-08 22:45:09.000000000 -0400 |
3 | | @@ -51,7 +51,7 @@ |
4 | | C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os -fomit-frame-pointer |
| 1 | --- Makefile.macosx.orig 2013-01-08 22:57:09.000000000 -0500 |
| 2 | +++ Makefile.macosx 2013-02-19 13:37:08.000000000 -0500 |
| 3 | @@ -69,16 +69,17 @@ |
| 4 | |
| 5 | # architectures |
| 6 | |
| 7 | +C_COMPILER_OPTIONS += __MP_ARCH_CFLAGS__ |
| 8 | +LINKER_OPTIONS += __MP_ARCH_LDFLAGS__ |
| 9 | + |
| 10 | ifeq ($(ARCH),x86-64) |
| 11 | -C_COMPILER_OPTIONS += -m64 |
| 12 | -LINKER_OPTIONS += -m64 |
| 13 | # Avoid bus error in install_name_tool |
| 14 | LINKER_LINK_SHARED_DLOADABLE_OPTIONS += -Wl,-headerpad -Wl,128 |
| 15 | else |
| 16 | |
| 17 | ifeq ($(ARCH),universal) |
| 18 | -C_COMPILER_OPTIONS += -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk |
| 19 | -LINKER_OPTIONS += -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk |
| 20 | +C_COMPILER_OPTIONS += __MP_SDK_CFLAGS__ |
| 21 | +LINKER_OPTIONS += __MP_SDK_LDFLAGS__ |
5 | 22 | endif |
| 23 | |
6 | 24 | endif |
7 | | -LINKER_LINK_SHARED_LIBRARY_OPTIONS = -dynamiclib -compatibility_version 1 -current_version 1.0 -install_name $@ |
8 | | +LINKER_LINK_SHARED_LIBRARY_OPTIONS = -dynamiclib -compatibility_version 1 -current_version 1.0 -install_name ${LIBDIR}/$@ |
9 | | POSTINSTALL_PROGRAM_FLAGS = -change lib$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX)$(SO) $(LIBDIR)/lib$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX)$(SO) |
10 | | LIBRARIAN_OPTIONS = scru |
11 | | LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -bundle -L. |
diff --git a/trunk/dports/lang/chicken/files/patch-rules.make.diff b/trunk/dports/lang/chicken/files/patch-rules.make.diff
new file mode 10644
-
|
+
|
|
| 1 | --- rules.make.orig 2013-01-08 22:57:09.000000000 -0500 |
| 2 | +++ rules.make 2013-02-19 13:49:24.000000000 -0500 |
| 3 | @@ -181,7 +181,7 @@ |
| 4 | |
| 5 | ifneq ($(HACKED_APPLY),) |
| 6 | $(APPLY_HACK_OBJECT): $(SRCDIR)apply-hack.$(ARCH)$(ASM) |
| 7 | - $(ASSEMBLER) $(ASSEMBLER_OPTIONS) $(ASSEMBLER_COMPILE_OPTION) $< $(ASSEMBLER_OUTPUT) |
| 8 | + $(ASSEMBLER) __MP_ARCH_CFLAGS__ $(ASSEMBLER_OPTIONS) $(ASSEMBLER_COMPILE_OPTION) $< $(ASSEMBLER_OUTPUT) |
| 9 | endif |
| 10 | |
| 11 | # program objects |