|
| 1 | +# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
| 2 | + |
| 3 | +PortSystem 1.0 |
| 4 | +PortGroup crossbinutils 1.0 |
| 5 | + |
| 6 | +name m68k-binutils |
| 7 | +version 2.46.0 |
| 8 | +revision 1 |
| 9 | +maintainers {@kamischi web.de:karl-michael.schindler} \ |
| 10 | + openmaintainer |
| 11 | + |
| 12 | +if {$subport eq $name} { |
| 13 | + # Download sources and install docs for all subports |
| 14 | + crossbinutils.setup m68k ${version} |
| 15 | + depends_build |
| 16 | + depends_lib |
| 17 | + platforms any |
| 18 | + supported_archs noarch |
| 19 | + use_configure no |
| 20 | + build {} |
| 21 | + destroot {} |
| 22 | +} |
| 23 | + |
| 24 | +# tried, but not working targets: amigaos atari openbsd |
| 25 | +# freepascal probably needs palm binutils from here: |
| 26 | +# https://github.com/chainq/prc-tools-remix |
| 27 | +foreach ostarget {linux freebsd netbsd} { |
| 28 | + subport m68k-${ostarget}-binutils { |
| 29 | + crossbinutils.setup m68k-${ostarget} ${version} |
| 30 | + # Depend on base package for installing the docs |
| 31 | + depends_lib-append port:$name |
| 32 | + configure.args-append --disable-werror |
| 33 | + if {${ostarget} eq "linux"} { |
| 34 | + depends_build-append port:bison |
| 35 | + } |
| 36 | + # Delete docs since already installed by the base package |
| 37 | + # Resolves clash about identical docs from each subport |
| 38 | + post-destroot { |
| 39 | + delete ${destroot}${prefix}/share/doc/m68k-binutils |
| 40 | + } |
| 41 | + } |
| 42 | +} |
| 43 | + |
| 44 | +subport m68k-embedded-binutils { |
| 45 | + crossbinutils.setup m68k-embedded ${version} |
| 46 | + depends_lib-append port:$name |
| 47 | + configure.args-append \ |
| 48 | + --target=m68k-unknown-elf \ |
| 49 | + --disable-werror |
| 50 | + |
| 51 | + post-destroot { |
| 52 | + # See comment above about deleting docs |
| 53 | + delete ${destroot}${prefix}/share/doc/m68k-binutils |
| 54 | + file rename ${destroot}${prefix}/m68k-unknown-elf/bin \ |
| 55 | + ${destroot}${prefix}/m68k-embedded |
| 56 | + file rename ${destroot}${prefix}/m68k-unknown-elf/lib \ |
| 57 | + ${destroot}${prefix}/m68k-embedded |
| 58 | + file delete ${destroot}${prefix}/m68k-unknown-elf |
| 59 | + } |
| 60 | +} |
0 commit comments