Changeset 81851
- Timestamp:
- 08/05/11 18:21:39 (4 years ago)
- File:
-
- 1 edited
-
trunk/dports/cross/arm-none-eabi-gcc/Portfile (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dports/cross/arm-none-eabi-gcc/Portfile
r81601 r81851 1 1 # $Id$ 2 2 3 PortSystem 1.0 3 PortSystem 1.0 4 PortGroup crossgcc 1.0 4 5 5 name arm-none-eabi-gcc 6 version 4.6.1 7 set branch [join [lrange [split ${version} .] 0 1] .] 6 crossgcc.setup arm-none-eabi 4.6.1 7 crossgcc.setup_libc newlib 1.19.0 8 8 9 categories cross devel 10 platforms darwin 11 license GPL-3 12 maintainers nomaintainer 13 description The GNU compiler collection for arm-none-eabi 14 long_description \ 15 The GNU compiler collection, including front ends for C, C++, Objective-C \ 16 and Objective-C++ for arm-none-eabi. 17 homepage http://gcc.gnu.org/ 18 19 set newlibversion 1.19.0 20 set crossgcc-target arm-none-eabi 21 22 set dcore gcc-core-${version}.tar.bz2 23 #set dfort gcc-fortran-${version}.tar.bz2 24 set dcxx gcc-g++-${version}.tar.bz2 25 #set djava gcc-java-${version}.tar.bz2 26 set dobjc gcc-objc-${version}.tar.bz2 27 #set ecj ecj-4.5.jar 28 set dnewlib newlib-${newlibversion}.tar.gz 29 30 master_sites gnu:gcc/gcc-${version}/:gcc \ 31 ftp://sources.redhat.com/pub/newlib/:newlib 32 distfiles ${dcore}:gcc \ 33 ${dcxx}:gcc \ 34 ${dobjc}:gcc \ 35 ${dnewlib}:newlib 36 dist_subdir gcc 37 checksums ${dcore} \ 9 checksums gcc-core-${version}.tar.bz2 \ 38 10 sha1 9b766705f051ffb7321de58f247688b0ae661b98 \ 39 11 rmd160 bbe0b5127e584ad92516aff79bfa74ec30db2be4 \ 40 ${dcxx}\12 gcc-g++-${version}.tar.bz2 \ 41 13 sha1 043aa427ede603196588c2a2737c22e0d241ceca \ 42 14 rmd160 857253c13eb4177512fc1bc6d797af28dde60eeb \ 43 ${dobjc}\15 gcc-objc-${version}.tar.bz2 \ 44 16 sha1 ed6f640b62465999eb1439a4db6dda3c35b6d19d \ 45 17 rmd160 728e7ea55a04f28c6c3556c56213b2d9f023a0be \ 46 ${dnewlib}\18 newlib-${crossgcc.libc_version}.tar.gz \ 47 19 sha1 b2269d30ce7b93b7c714b90ef2f40221c2df0fcd \ 48 20 rmd160 a28bd656ec895da0738dac3fb367851a2992d724 49 use_bzip2 yes50 worksrcdir build51 52 depends_lib port:${crossgcc-target}-binutils \53 port:gmp \54 port:mpfr \55 port:libiconv \56 port:libmpc57 58 extract.only ${dcore} ${dcxx} ${dobjc}59 post-extract {60 system -W ${workpath} "tar -xzf ${distpath}/newlib-${newlibversion}.tar.gz"61 ln -s ${workpath}/newlib-${newlibversion}/newlib ${workpath}/gcc-${version}/62 }63 64 post-patch {65 namespace eval crossgcc {}66 67 # Fix the info pages and related stuff.68 #69 # path: path to the doc directory (e.g. gas/doc/)70 # makefile: path to Makefile.in (e.g. gas/doc/Makefile.in)71 # name: name of the info page (e.g. as)72 # suffix: suffix of the source page (texinfo or texi)73 proc crossgcc::fixinfo { path makefile name suffix } {74 global crossgcc-target workpath version75 76 # Fix the source77 reinplace "s|setfilename ${name}.info|setfilename ${crossgcc-target}-${name}.info|g" \78 ${workpath}/gcc-${version}/${path}/${name}.${suffix}79 reinplace "s|(${name})|(${crossgcc-target}-${name})|g" \80 ${workpath}/gcc-${version}/${path}/${name}.${suffix}81 reinplace "s|@file{${name}}|@file{${crossgcc-target}-${name}}|g" \82 ${workpath}/gcc-${version}/${path}/${name}.${suffix}83 84 # Fix the Makefile85 reinplace "s| ${name}.info| ${crossgcc-target}-${name}.info|g" \86 ${workpath}/gcc-${version}/${makefile}87 reinplace "s|/${name}.info|/${crossgcc-target}-${name}.info|g" \88 ${workpath}/gcc-${version}/${makefile}89 reinplace "s|^${name}.info|${crossgcc-target}-${name}.info|g" \90 ${workpath}/gcc-${version}/${makefile}91 reinplace "s| ${name}.pod| ${crossgcc-target}-${name}.pod|g" \92 ${workpath}/gcc-${version}/${makefile}93 reinplace "s|/${name}.pod|/${crossgcc-target}-${name}.pod|g" \94 ${workpath}/gcc-${version}/${makefile}95 reinplace "s|^${name}.pod|${crossgcc-target}-${name}.pod|g" \96 ${workpath}/gcc-${version}/${makefile}97 reinplace "s| ${name}.${suffix}| ${crossgcc-target}-${name}.${suffix}|g" \98 ${workpath}/gcc-${version}/${makefile}99 reinplace "s|/${name}.${suffix}|/${crossgcc-target}-${name}.${suffix}|g" \100 ${workpath}/gcc-${version}/${makefile}101 reinplace "s|^${name}.${suffix}|${crossgcc-target}-${name}.${suffix}|g" \102 ${workpath}/gcc-${version}/${makefile}103 104 # Rename the source105 file rename ${workpath}/gcc-${version}/${path}/${name}.${suffix} \106 ${workpath}/gcc-${version}/${path}/${crossgcc-target}-${name}.${suffix}107 108 # Fix install-info's dir.109 # (note: this may be effectless if there was no info dir to be fixed)110 reinplace "s|--info-dir=\$(DESTDIR)\$(infodir)|--dir-file=\$(DESTDIR)\$(infodir)/${crossgcc-target}-gcc-dir|g" \111 ${workpath}/gcc-${version}/${makefile}112 }113 114 # gcc/doc/cpp.texi115 crossgcc::fixinfo gcc/doc/ gcc/Makefile.in cpp texi116 117 # gcc/doc/cppinternals.texi118 crossgcc::fixinfo gcc/doc/ gcc/Makefile.in cppinternals texi119 120 # gcc/doc/gcc.texi121 crossgcc::fixinfo gcc/doc/ gcc/Makefile.in gcc texi122 123 # gcc/doc/gccint.texi124 crossgcc::fixinfo gcc/doc/ gcc/Makefile.in gccint texi125 126 # # gcc/fortran/gfortran.texi127 # crossgcc::fixinfo gcc/fortran/ gcc/fortran/Make-lang.in gfortran texi128 129 # # gcc/java/gcj.texi130 # crossgcc::fixinfo gcc/java/ gcc/java/Make-lang.in gcj texi131 132 # gcc/doc/gccinstall.info133 crossgcc::fixinfo gcc/doc/ gcc/Makefile.in gccinstall info134 135 # libquadmath/libquadmath.info136 crossgcc::fixinfo libquadmath libquadmath/Makefile.in libquadmath info137 }138 139 # the generated compiler doesn't accept -arch140 configure.cc_archflags141 configure.cxx_archflags142 configure.objc_archflags143 configure.ld_archflags144 platform darwin {145 configure.args-append --build=${build_arch}-apple-darwin${os.major}146 }147 148 pre-configure {149 file mkdir ${worksrcpath}150 }151 152 configure.cmd ../gcc-${version}/configure153 configure.args --target=${crossgcc-target} \154 --enable-languages="c,objc,c++,obj-c++" \155 --infodir=${prefix}/share/info \156 --mandir=${prefix}/share/man \157 --datarootdir=${prefix}/share/${name} \158 --with-system-zlib \159 --disable-nls \160 --with-gmp=${prefix} \161 --with-mpfr=${prefix} \162 --with-mpc=${prefix} \163 --enable-stage1-checking \164 --enable-multilib165 21 166 22 # specific to ARM 167 configure.args-append \ 168 --enable-interwork 169 170 configure.env-append \ 171 AR_FOR_TARGET=${crossgcc-target}-ar \ 172 AS_FOR_TARGET=${crossgcc-target}-as \ 173 LD_FOR_TARGET=${crossgcc-target}-ld \ 174 NM_FOR_TARGET=${crossgcc-target}-nm \ 175 OBJDUMP_FOR_TARGET=${crossgcc-target}-objdump \ 176 RANLIB_FOR_TARGET=${crossgcc-target}-ranlib \ 177 STRIP_FOR_TARGET=${crossgcc-target}-strip 178 179 # http://trac.macports.org/ticket/29104 180 if {${configure.compiler} == "llvm-gcc-4.2"} { 181 configure.compiler clang 182 } 183 184 destroot.violate_mtree yes 185 186 pre-destroot { 187 # gcc needs the cross directory structure to be present 188 # in order to fill it during installation. 189 file mkdir "${destroot}/${prefix}/${crossgcc-target}/bin" 190 file mkdir "${destroot}/${prefix}/${crossgcc-target}/lib" 191 } 192 193 post-destroot { 194 # Stuff we don't want (either because they're in the system 195 # or because they would conflict with other FSF ports) 196 # (it's easier for maintainability purposes to fix things here) 197 198 # FSF propaganda (should already be there or would conflict) 199 file delete -force "${destroot}/${prefix}/share/man/man7" 200 201 # (host) libiberty 202 file delete "${destroot}/${prefix}/lib/${build_arch}/libiberty.a" 203 } 204 205 livecheck.type regex 206 livecheck.url http://gcc.gnu.org/releases.html 207 livecheck.regex {<tr><td><a href="gcc-.*/">GCC (.*)</a></td> <td>.*</td></tr>} 23 configure.args-append --enable-interwork
Note: See TracChangeset
for help on using the changeset viewer.

