Ticket #24439: arm-rtems-gcc_Portfile.patch
File arm-rtems-gcc_Portfile.patch, 5.8 KB (added by jmgc, 15 years ago) |
---|
-
Portfile
old new 3 3 PortSystem 1.0 4 4 5 5 name arm-rtems-gcc 6 version 4. 2.36 version 4.3.2 7 7 8 8 # Parameters for this port. 9 9 set newlibversion 1.16.0 10 set crossgcc-target arm-rtems 10 set crossgcc-target arm-rtems4.9 11 11 set rtemsversion 4.9 12 set default-languages --enable-languages="c,c++ ,objc"12 set default-languages --enable-languages="c,c++" 13 13 14 14 description gcc cross-compilers for arm-rtems, with newlib runtime library. 15 15 long_description gnu compilers collection (c, c++, fortran and objc) for \ … … 25 25 freebsd::rtems 26 26 distfiles gcc-${version}.tar.bz2:gcc \ 27 27 newlib-${newlibversion}.tar.gz:newlib \ 28 gcc-core-${version}-rtems 4.9-20080205.diff:rtems \29 newlib-${newlibversion}-rtems 4.9-20080302.diff:rtems28 gcc-core-${version}-rtems${rtemsversion}-20090825.diff:rtems \ 29 newlib-${newlibversion}-rtems${rtemsversion}-20090324.diff:rtems 30 30 extract.only gcc-${version}.tar.gz newlib-${newlibversion}.tar.gz 31 31 worksrcdir gcc-${version} 32 32 checksums gcc-${version}.tar.bz2 \ 33 md5 ef2a4d9991b3644115456ea05b2b8163\34 sha1 80b0df13fc9e311868022a3e86e673177397a917 \35 rmd160 70b589b79b97967857f2ec70ff8b2017c84c464d \33 md5 5dfac5da961ecd5f227c3175859a486d \ 34 # sha1 80b0df13fc9e311868022a3e86e673177397a917 \ 35 # rmd160 70b589b79b97967857f2ec70ff8b2017c84c464d \ 36 36 newlib-${newlibversion}.tar.gz \ 37 37 md5 bf8f1f9e3ca83d732c00a79a6ef29bc4 \ 38 sha1 841edec33d19a9e549984982fb92445ee967e265 \39 rmd160 fa40ff43e858da3093c9f3b5b203724b9b327696 \40 gcc-core-${version}-rtems 4.9-20080205.diff \41 md5 d5a6a8c5973024476f0df6356b5e0424\42 sha1 20d0ada57ad44d9f060e60e26acee57e46137ad6 \43 rmd160 c87a5703959dc319fad8e8b4804b8d4803cddc99 \44 newlib-${newlibversion}-rtems 4.9-20080302.diff \45 md5 a227456d0850e24a839634096b879c30\46 sha1 4f8cd12ada4865b271eb4d4c7d80b520fb8d2bc6 \47 rmd160 81c76c584a6c76c9ea706bf9f0f2ba149303b28948 patchfiles patch-newlib-libc-configure.diff38 # sha1 841edec33d19a9e549984982fb92445ee967e265 \ 39 # rmd160 fa40ff43e858da3093c9f3b5b203724b9b327696 \ 40 gcc-core-${version}-rtems${rtemsversion}-20090825.diff \ 41 md5 305a3c502b2698fbf480d03d877e4956 \ 42 # sha1 20d0ada57ad44d9f060e60e26acee57e46137ad6 \ 43 # rmd160 c87a5703959dc319fad8e8b4804b8d4803cddc99 \ 44 newlib-${newlibversion}-rtems${rtemsversion}-20090324.diff \ 45 md5 f6b2d8558a77662f3ac4327cda84d10d \ 46 # sha1 4f8cd12ada4865b271eb4d4c7d80b520fb8d2bc6 \ 47 # rmd160 81c76c584a6c76c9ea706bf9f0f2ba149303b289 48 #patchfiles patch-newlib-libc-configure.diff 49 49 50 50 # All cross ports violate the mtree layout. 51 51 destroot.violate_mtree yes … … 58 58 bin:${crossgcc-target}-ld:${crossgcc-target}-binutils \ 59 59 bin:${crossgcc-target}-nm:${crossgcc-target}-binutils \ 60 60 bin:${crossgcc-target}-ranlib:${crossgcc-target}-binutils 61 depends_build bin:msgfmt:gettext 61 depends_build bin:msgfmt:gettext port:gmp port:mpfr 62 patchfiles Make-lang.in.diff 63 patch.dir ${workpath}/gcc-${version} 62 64 63 65 # gcc is .bz2, newlib is .gz. 64 66 # let's extract only gcc with MacPorts infrastructure, we'll do newlib manually. … … 68 70 # Extract newlib and create a symlink of newlib/newlib in gcc directory. 69 71 post-extract { 70 72 system "cd ${workpath} && gzip -dc ${distpath}/newlib-${newlibversion}.tar.gz | tar -xf -" 71 system "ln -s ${workpath}/newlib-${newlibversion}/newlib ${workpath}/gcc-${version}/"73 system "ln -sf ${workpath}/newlib-${newlibversion}/newlib ${workpath}/gcc-${version}/" 72 74 } 73 75 74 76 # Since we don't build gcc and binutils at the same time, gcc's Makefile will try to transform … … 95 97 --mandir='${prefix}/share/man' \ 96 98 --target=${crossgcc-target} \ 97 99 --program-prefix=${crossgcc-target}- \ 98 --program-suffix=-${version} \100 # --program-suffix=-${version} \ 99 101 --with-included-gettext \ 100 --enable-obsolete \102 # --enable-obsolete \ 101 103 --with-newlib \ 102 --with-gxx-include-dir=${prefix}/${crossgcc-target}/include/c++/${version}/ \ 104 --with-gnu-ld \ 105 --enable-threads \ 106 --disable-install-libiberty \ 107 # --with-gxx-include-dir=${prefix}/${crossgcc-target}/include/c++/${version}/ \ 103 108 ${default-languages} 104 109 110 if {$build_arch != ""} { 111 configure.cc_archflags 112 configure.cxx_archflags 113 configure.objc_archflags 114 if {${os.platform} == "darwin"} { 115 configure.args-append --build=${build_arch}-apple-darwin${os.major} 116 } 117 } 118 105 119 build.dir ${workpath}/build 106 120 107 121 build.args ${environment} … … 110 124 pre-patch { 111 125 # Additional patches for rtems. 112 126 system "cd ${workpath}/gcc-${version} && \ 113 patch -p1 < ${distpath}/gcc-core-${version}-rtems 4.9-20080205.diff"127 patch -p1 < ${distpath}/gcc-core-${version}-rtems${rtemsversion}-20090825.diff" 114 128 system "cd ${workpath}/newlib-${newlibversion} && \ 115 patch -p1 < ${distpath}/newlib-${newlibversion}-rtems 4.9-20080302.diff"129 patch -p1 < ${distpath}/newlib-${newlibversion}-rtems${rtemsversion}-20090324.diff" 116 130 } 117 131 118 132 post-patch { … … 247 261 248 262 # (host) libiberty 249 263 file delete "${destroot}/${prefix}/lib/libiberty.a" 264 file delete "${destroot}/${prefix}/lib/x86_64/libiberty.a" 265 file delete "${destroot}/${prefix}/lib/x86_64" 250 266 251 267 # aliases for charsets (should already be there) 252 268 file delete "${destroot}/${prefix}/lib/charset.alias"