source: trunk/dports/cross/mips-rtems-binutils/Portfile @ 24074

Last change on this file since 24074 was 24074, checked in by pguyot@…, 12 years ago

cross/mips-rtems-binutils: update to 2.17, add livecheck

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.1 KB
Line 
1# $Id: Portfile 24074 2007-04-16 05:06:15Z pguyot@kallisys.net $
2
3PortSystem                      1.0
4name                            mips-rtems-binutils
5version                         2.17
6
7# Parameters for this port.
8set crossgcc-target mips-rtems
9
10description                     FSF Binutils for mips-rtems cross development
11long_description        Free Software Foundation development toolchain ("binutils") for \
12                                        mips-rtems cross development (MIPS ISA Levels 1 and above for 32 \
13                                        and 64 bit CPU models)
14platforms                       darwin
15categories                      cross devel
16maintainers                     pguyot@kallisys.net
17homepage                        http://www.gnu.org/software/binutils/binutils.html
18master_sites            gnu:binutils
19distname                        binutils-${version}
20use_bzip2                       yes
21checksums                       md5 e26e2e06b6e4bf3acf1dc8688a94c0d1 \
22                                        sha1 a557686eef68362ea31a3aa41ce274e3eeae1ef0 \
23                                        rmd160 3995d7ed97f115e76ce55b4c1f5256d53559c84f
24
25# Download everything to binutils/
26dist_subdir                     binutils
27
28# Build in a different directory, as advised in the README file.
29pre-configure           { system "cd ${workpath} && mkdir -p build"}
30configure.dir           ${workpath}/build
31configure.cmd           ${worksrcpath}/configure
32configure.env           CC="cc -no-cpp-precomp"
33configure.args          --infodir='${prefix}/share/info' --target=${crossgcc-target} \
34                                        --program-prefix=${crossgcc-target}- --mandir='${prefix}/share/man'
35build.dir               ${workpath}/build
36
37# We don't want the etc module.
38post-extract {
39        system "rm -rf ${worksrcpath}/etc"
40}
41
42patch {
43        namespace eval crossgcc {}
44
45        # Fix the info pages and related stuff.
46        #       
47        # path: path to the doc directory (e.g. gas/doc/)
48        # makefile: path to Makefile.in (e.g. gas/doc/Makefile.in)
49        # name: name of the info page (e.g. as)
50        # suffix: suffix of the souce page (texinfo or texi)
51        proc crossgcc::fixinfo { path makefile name suffix } {
52                global crossgcc-target worksrcpath
53
54                # Fix the source
55                reinplace "s|setfilename ${name}.info|setfilename ${crossgcc-target}-${name}.info|g" \
56                        ${worksrcpath}/${path}/${name}.${suffix}
57                reinplace "s|(${name})|(${crossgcc-target}-${name})|g" \
58                        ${worksrcpath}/${path}/${name}.${suffix}
59                reinplace "s|@file{${name}}|@file{${crossgcc-target}-${name}}|g" \
60                        ${worksrcpath}/${path}/${name}.${suffix}
61               
62                # Fix the Makefile
63                reinplace "s|${name}.info|${crossgcc-target}-${name}.info|g" \
64                        ${worksrcpath}/${makefile}
65                reinplace "s|${name}.${suffix}|${crossgcc-target}-${name}.${suffix}|g" \
66                        ${worksrcpath}/${makefile}
67               
68                # Rename the source
69                file rename ${worksrcpath}/${path}/${name}.${suffix} \
70                        ${worksrcpath}/${path}/${crossgcc-target}-${name}.${suffix}
71               
72                # Fix install-info's dir.
73                # (note: this may be effectless if there was no info dir to be fixed)
74                reinplace "s|--info-dir=\$(DESTDIR)\$(infodir)|--dir-file=\$(DESTDIR)\$(infodir)/${crossgcc-target}-dir|g" \
75                        "${worksrcpath}/${makefile}"
76        }
77
78        # Fix the gettext files and related stuff.
79        #       
80        # module: name of the module (e.g. gas)
81        proc crossgcc::fixgettext { module } {
82                global crossgcc-target worksrcpath
83
84                if { [ file exists "${worksrcpath}/${module}/Makefile.in" ] } {
85                        reinplace "s|@PACKAGE@|${crossgcc-target}-@PACKAGE@|g" \
86                                "${worksrcpath}/${module}/Makefile.in"
87                }
88                if { [ file exists "${worksrcpath}/${module}/doc/Makefile.in" ] } {
89                        reinplace "s|@PACKAGE@|${crossgcc-target}-@PACKAGE@|g" \
90                                "${worksrcpath}/${module}/doc/Makefile.in"
91                }
92                if { [ file exists "${worksrcpath}/${module}/po/Make-in" ] } {
93                        reinplace "s|@PACKAGE@|${crossgcc-target}-@PACKAGE@|g" \
94                                "${worksrcpath}/${module}/po/Make-in"
95                }
96        }
97
98        # gas/doc/as.texinfo
99        crossgcc::fixinfo gas/doc/ gas/doc/Makefile.in as texinfo
100
101        # bfd/doc/bfd.texinfo
102        crossgcc::fixinfo bfd/doc/ bfd/doc/Makefile.in bfd texinfo
103
104        # binutils/doc/binutils.texi
105        crossgcc::fixinfo binutils/doc/ binutils/doc/Makefile.in binutils texi
106
107        # gprof/gprof.texi
108        crossgcc::fixinfo gprof/ gprof/Makefile.in gprof texi
109
110        # ld/ld.texinfo
111        crossgcc::fixinfo ld/ ld/Makefile.in ld texinfo
112       
113        # gettext stuff.
114        crossgcc::fixgettext bfd
115        crossgcc::fixgettext binutils
116        crossgcc::fixgettext gas
117        crossgcc::fixgettext gprof
118        crossgcc::fixgettext ld
119        crossgcc::fixgettext opcodes
120}
121
122post-destroot {
123        # Installing (host) libiberty was a mistake.
124        file delete "${destroot}/${prefix}/lib/libiberty.a"
125}
126
127livecheck.check freshmeat
128livecheck.name  binutils
Note: See TracBrowser for help on using the repository browser.