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 |
---|
2 | # $Id$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name avr-gcc-atmel |
---|
7 | categories cross |
---|
8 | version 4.8.1 |
---|
9 | maintainers gmail.com:bbandi86 |
---|
10 | |
---|
11 | description The GNU compiler collection for AVR with Atmel patches |
---|
12 | long_description \ |
---|
13 | The GNU compiler collection, including front ends for C, C++, Objective-C \ |
---|
14 | and Objective-C++ for cross development for AVR with Atmel patches. |
---|
15 | |
---|
16 | homepage http://www.atmel.com/tools/ATMELAVRTOOLCHAINFORWINDOWS.aspx |
---|
17 | |
---|
18 | platforms darwin |
---|
19 | |
---|
20 | license {GPL-3+ Permissive} |
---|
21 | |
---|
22 | variable gmpversion 5.0.2 |
---|
23 | variable mpfrversion 3.0.0 |
---|
24 | variable mpcversion 0.9 |
---|
25 | |
---|
26 | master_sites http://distribute.atmel.no/tools/opensource/Atmel-AVR-GNU-Toolchain/3.4.4/ \ |
---|
27 | https://ftp.gnu.org/gnu/gmp/ \ |
---|
28 | https://ftp.gnu.org/gnu/mpfr/ \ |
---|
29 | http://www.multiprecision.org/mpc/download/ |
---|
30 | |
---|
31 | distname avr-gcc-${version} |
---|
32 | use_bzip2 yes |
---|
33 | distfiles ${distname}${extract.suffix} \ |
---|
34 | gmp-${gmpversion}${extract.suffix} \ |
---|
35 | mpfr-${mpfrversion}${extract.suffix} \ |
---|
36 | mpc-${mpcversion}.tar.gz |
---|
37 | |
---|
38 | patchfiles patch-bugfix60486.diff |
---|
39 | |
---|
40 | worksrcdir gcc |
---|
41 | |
---|
42 | checksums avr-gcc-4.8.1.tar.bz2 \ |
---|
43 | rmd160 b2ee2a11f9cf1fdae4583a8eb042d8efaefb0d15 \ |
---|
44 | sha256 47b86f77f943679396ac2e8e03395d04e1d8d7c67647f1b2b8b7b6ed02ac793f \ |
---|
45 | gmp-5.0.2.tar.bz2 \ |
---|
46 | rmd160 fce06e3246f067301a54f3457960f1d6d71adfc2 \ |
---|
47 | sha256 dbc2db76fdd4e99f85d5e35aa378ed62c283e0d586b91bd8703aff75a7804c28 \ |
---|
48 | mpfr-3.0.0.tar.bz2 \ |
---|
49 | rmd160 6862412d09e1da3e1f4b023b8cfdee4d440d903e \ |
---|
50 | sha256 8f4e5f9c53536cb798a30455ac429b1f9fc75a0f8af32d6e0ac31ebf1024821f \ |
---|
51 | mpc-0.9.tar.gz \ |
---|
52 | rmd160 63d5fb8ab2725839e7565716c4d20187b606e2c8 \ |
---|
53 | sha256 fd3efe422f0d454592059e80f2c00d1a2e381bf2beda424c5094abd4deb049ac |
---|
54 | |
---|
55 | conflicts avr-gcc |
---|
56 | depends_lib port:avr-binutils-atmel |
---|
57 | |
---|
58 | extract.only-delete mpc-${mpcversion}.tar.gz |
---|
59 | post-extract { |
---|
60 | system " |
---|
61 | pushd ${workpath} |
---|
62 | gunzip -dc ${distpath}/mpc-${mpcversion}.tar.gz | tar -xf - |
---|
63 | popd |
---|
64 | " |
---|
65 | } |
---|
66 | post-patch { |
---|
67 | exec sed -i bak "s/ \\\[m4_fatal(\\\[Please use exactly Autoconf \\\]/ \\\[m4_errprintn(\\\[Please use exactly Autoconf \\\]/g" ${worksrcpath}/config/override.m4 |
---|
68 | } |
---|
69 | pre-configure { |
---|
70 | system " |
---|
71 | pushd ${worksrcpath} |
---|
72 | ln -s ../gmp-${gmpversion} gmp |
---|
73 | ln -s ../mpfr-${mpfrversion} mpfr |
---|
74 | ln -s ../mpc-${mpcversion} mpc |
---|
75 | popd |
---|
76 | " |
---|
77 | } |
---|
78 | |
---|
79 | # xgcc will fail with -arch |
---|
80 | configure.cc_archflags |
---|
81 | configure.cxx_archflags |
---|
82 | configure.objc_archflags |
---|
83 | configure.ld_archflags |
---|
84 | # the bootstrap compiler doesn't accept -stdlib |
---|
85 | configure.cxx_stdlib |
---|
86 | # We don't need system includes |
---|
87 | compiler.cpath |
---|
88 | universal_variant no |
---|
89 | |
---|
90 | configure.dir ${worksrcpath}/build |
---|
91 | configure.cmd ../configure |
---|
92 | configure.optflags "-Os -g0" |
---|
93 | |
---|
94 | |
---|
95 | configure.args --target=avr\ |
---|
96 | --prefix=${prefix}\ |
---|
97 | --libdir=${prefix}/lib\ |
---|
98 | --libexecdir=${prefix}/libexec\ |
---|
99 | --infodir=${prefix}/share/info\ |
---|
100 | --mandir=${prefix}/share/man\ |
---|
101 | --enable-languages="c,c++"\ |
---|
102 | --with-dwarf2\ |
---|
103 | --enable-doc\ |
---|
104 | --disable-libada\ |
---|
105 | --disable-libssp\ |
---|
106 | --disable-nls\ |
---|
107 | --with-ld=${prefix}/bin/avr-ld\ |
---|
108 | --with-as=${prefix}/bin/avr-as\ |
---|
109 | --with-avrlibc=yes |
---|
110 | |
---|
111 | |
---|
112 | build.dir ${configure.dir} |
---|
113 | |
---|
114 | post-destroot { |
---|
115 | system " |
---|
116 | rm -rf ${destroot}${prefix}/lib/x86_64 |
---|
117 | rm -rf ${destroot}${prefix}/lib/i386 |
---|
118 | rm -rf ${destroot}${prefix}/lib/ppc64 |
---|
119 | rm -rf ${destroot}${prefix}/lib/ppc |
---|
120 | rm -rf ${destroot}${prefix}/share/info |
---|
121 | rm -rf ${destroot}${prefix}/share/man/man7 |
---|
122 | pushd ${destroot}${prefix}/bin |
---|
123 | strip * |
---|
124 | popd |
---|
125 | pushd ${destroot}${prefix}/libexec/gcc/avr/${version}/ |
---|
126 | for binary in cc1 cc1plus collect2 lto-wrapper lto1 \"install-tools/fixincl\" |
---|
127 | do |
---|
128 | strip \$binary |
---|
129 | done |
---|
130 | popd |
---|
131 | " |
---|
132 | } |
---|
133 | |
---|