source: trunk/dports/cross/arm-aout-binutils/Portfile @ 30687

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

All cross ports violate the layout

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