source: trunk/dports/devel/elftoolchain/Portfile

Last change on this file was 107252, checked in by mfeiri@…, 4 years ago

archivers/libarchive: Update to version 3.1.2 and rev bump dependents (#35867, maintainer timeout)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.0 KB
Line 
1# $Id: Portfile 107252 2013-06-24 10:44:30Z ryandesign@macports.org $
2
3PortSystem      1.0
4
5name            elftoolchain
6version         0.6.1
7revision        1
8categories      devel
9platforms       darwin
10license         BSD
11maintainers     raimue
12description     Compilation tools and libraries for ELF
13long_description \
14    BSD-licensed compilation tools and libaries for handling the ELF file \
15    format. This includes implementations of libelf and libdwarf along with \
16    the tools nm, ar, as, elfdump and more.
17
18homepage        http://elftoolchain.sourceforge.net/
19master_sites    sourceforge
20use_bzip2 yes
21
22checksums       rmd160  4268371905cb6e1741371cfb957bf8a7cb04ce18 \
23                sha256  a3e0c11ed9b0fe2f40b687b11849e7d52cb6675ebc60745c85d37a3ae4272cab
24
25depends_build   port:bsdmake \
26                port:bison \
27                port:flex
28
29depends_lib     port:libarchive
30
31patchfiles      patch-mk.diff \
32                patch-libelf-config.diff \
33                patch-common-elftc.diff \
34                patch-byteorder-macros.diff
35
36post-patch {
37    reinplace "s:@PREFIX@:${prefix}:g" ${worksrcpath}/mk/elftoolchain.prog.mk
38}
39
40use_configure no
41
42build.type      bsd
43build.cmd       ${prefix}/bin/bsdmake
44build.args      CC=${configure.cc} \
45                CWARNFLAGS= \
46                prefix=${prefix} \
47                BINDIR=${prefix}/bin \
48                LIBDIR=${prefix}/lib/elftoolchain \
49                SHLIBDIR=${prefix}/lib/elftoolchain \
50                INCSDIR=${prefix}/include/elftoolchain
51
52# Exclude docs to avoid pulling in a full TeX distribution
53build.args-append MKTEX=no
54
55destroot.target install
56destroot.args   prefix=${prefix} \
57                BINDIR=${prefix}/bin \
58                LIBDIR=${prefix}/lib/elftoolchain \
59                SHLIBDIR=${prefix}/lib/elftoolchain \
60                INCSDIR=${prefix}/include/elftoolchain
61
62# Do not strip binaries as that leads to errors
63destroot.args-append STRIP=
64
65pre-destroot {
66    file mkdir ${destroot}${prefix}/lib/elftoolchain
67    file mkdir ${destroot}${prefix}/include/elftoolchain
68    file mkdir ${destroot}${prefix}/libexec/elftoolchain
69}
70
71# Add elftc- prefix to all binaries to avoid conflicts
72post-destroot {
73    foreach f [glob -tails -directory ${destroot}${prefix}/bin *] {
74        set nf elftc-$f
75        move ${destroot}${prefix}/bin/$f ${destroot}${prefix}/bin/$nf
76        ln -s ${prefix}/bin/$nf ${destroot}${prefix}/libexec/${name}/$f
77    }
78    foreach f [glob ${destroot}${prefix}/share/man/man{1,5}/*] {
79        move $f [file dirname $f]/elftc-[file tail $f]
80    }
81}
82
83notes "
84    The tools provided by elftoolchain are prefixed with the string 'elftc-' by\
85    default to distinguish them from the commands provided by your default\
86    toolchain. For example, nm becomes elftc-nm and size becomes elftc-size.
87
88    If you want to use the tools provided by elftoolchain by default, add this\
89    directory to the front of your PATH environment variable:
90        ${prefix}/libexec/elftoolchain
91"
92
93livecheck.type  regex
94livecheck.url   http://sourceforge.net/projects/elftoolchain/files/Sources/
95livecheck.regex ${name}-(\\d+(\\.\\d+)+)
Note: See TracBrowser for help on using the repository browser.