source: trunk/dports/cross/m68k-elf-binutils/Portfile

Last change on this file was 95199, checked in by jmr@…, 5 years ago

m68k-elf-binutils: license

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