Changeset 107759


Ignore:
Timestamp:
Jul 5, 2013, 9:00:53 AM (7 years ago)
Author:
jeremyhu@…
Message:

dragonegg-3.[34]: Use subports to provide the plugin for multiple gcc versions, support gcc 4.6 as default based on upstream's comment that it is the best supported

Location:
trunk/dports/lang
Files:
2 added
2 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/lang/dragonegg-3.3/Portfile

    r107462 r107759  
    77set llvm_version        3.3
    88name                    dragonegg-${llvm_version}
    9 set gcc_version         47
    10 set gcc_version_dot     4.7
    11 revision                1
     9
     10subport                 ${name}-gcc-4.5 {
     11    revision            0
     12    set gcc_version     45
     13    set gcc_version_dot 4.5
     14}
     15subport                 ${name}-gcc-4.6 {
     16    revision            0
     17    set gcc_version     46
     18    set gcc_version_dot 4.6
     19}
     20subport                 ${name}-gcc-4.7 {
     21    revision            0
     22    set gcc_version     47
     23    set gcc_version_dot 4.7
     24}
     25subport                 ${name}-gcc-4.8 {
     26    revision            0
     27    set gcc_version     48
     28    set gcc_version_dot 4.8
     29}
     30
    1231dist_subdir             llvm
    1332categories              lang
     
    1635license                 GPL-2
    1736
    18 description             DragonEgg is a LLVM plug-in for GCC ${gcc_version_dot}
     37description             DragonEgg is a LLVM plug-in for GCC
    1938long_description        DragonEgg replaces GCC optimizers and code generators \
    2039                        by the LLVM optimizing infrastructure. It supersedes \
     
    2241
    2342homepage                http://dragonegg.llvm.org/
     43
     44if {${subport} == ${name}} {
     45version                 ${llvm_version}
     46epoch                   1
     47revision                2
     48
     49distfiles
     50
     51set gcc_version_dot     4.6
     52
     53depends_run             port:${name}-gcc-${gcc_version_dot}
     54
     55use_configure           no
     56build                   {}
     57destroot {
     58    # For base
     59    foreach binary {gcc cpp c++ g++ gcj gcov gfortran} {
     60        ln -s dragonegg-${llvm_version}-${binary}-mp-${gcc_version_dot} ${destroot}${prefix}/bin/dragonegg-${llvm_version}-${binary}
     61    }
     62}
     63
     64} else {
    2465
    2566depends_lib             port:llvm-${llvm_version} port:gcc${gcc_version}
     
    3172
    3273#fetch.type              svn
    33 #svn.revision            180025
     74#svn.revision            185261
    3475#version                 ${llvm_version}-r${svn.revision}
    3576#worksrcdir              trunk
    3677#svn.url                 http://llvm.org/svn/llvm-project/dragonegg/trunk
    37 #worksrcdir              release_33
    38 #svn.url                 http://llvm.org/svn/llvm-project/dragonegg/branches/release_33
     78#worksrcdir              release_34
     79#svn.url                 http://llvm.org/svn/llvm-project/dragonegg/branches/release_34
    3980
    4081version                 ${llvm_version}
     
    5495
    5596select.group    gcc
    56 select.file     ${filespath}/dragonegg-${llvm_version}-gcc${gcc_version}
     97select.file     ${worksrcpath}/dragonegg-${llvm_version}-gcc-${gcc_version_dot}
    5798
    5899build.target
     
    78119patchfiles missing-includes.patch
    79120
     121post-extract {
     122    file copy ${filespath}/dragonegg-select ${select.file}
     123    reinplace "s:LLVM_VERSION:${llvm_version}:" ${select.file}
     124    reinplace "s:GCC_VERSION:${gcc_version_dot}:" ${select.file}
     125}
     126
    80127variant universal {
    81128    post-patch {
     
    92139destroot {
    93140    xinstall -m 755 -d ${destroot}${prefix}/libexec/dragonegg
    94     xinstall -m 755 ${worksrcpath}/dragonegg.so ${destroot}${prefix}/libexec/dragonegg/llvm-${llvm_version}-gcc${gcc_version}.so
     141    xinstall -m 755 ${worksrcpath}/dragonegg.so ${destroot}${prefix}/libexec/dragonegg/llvm-${llvm_version}-gcc-${gcc_version_dot}.so
    95142
    96     xinstall -m 755 ${filespath}/dragonegg-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcc
    97     ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-cpp
    98     ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-c++
    99     ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-g++
    100     ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcj
    101     ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcov
    102     ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gfortran
     143    foreach binary {gcc cpp c++ g++ gcj gcov gfortran} {
     144        set path ${destroot}${prefix}/bin/dragonegg-${llvm_version}-${binary}-mp-${gcc_version_dot}
     145        xinstall -m 755 ${filespath}/dragonegg-gcc ${path}
     146        reinplace "s:PLUGIN:${prefix}/libexec/dragonegg/llvm-${llvm_version}-gcc-${gcc_version_dot}.so:" ${path}
     147        reinplace "s:PREFIX:${prefix}:" ${path}
     148        reinplace "s:GCC_VERSION:${gcc_version_dot}:" ${path}
     149        reinplace "s:BINARY:${binary}:" ${path}
     150       
     151    }
     152}
    103153
    104     reinplace "s:PLUGIN:${prefix}/libexec/dragonegg/llvm-${llvm_version}-gcc${gcc_version}.so:" ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcc
    105     reinplace "s:LLVM_VERSION:${llvm_version}:" ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcc
    106     reinplace "s:GCC_VERSION:${gcc_version_dot}:" ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcc
    107154}
    108155
  • trunk/dports/lang/dragonegg-3.3/files/dragonegg-gcc

    r99796 r107759  
    11#!/bin/bash
    22
    3 CMD=${0/dragonegg-LLVM_VERSION-/}
    4 
    5 exec ${CMD}-mp-GCC_VERSION -fplugin=PLUGIN "${@}"
     3exec PREFIX/bin/BINARY-mp-GCC_VERSION -fplugin=PLUGIN "${@}"
  • trunk/dports/lang/dragonegg-3.4/Portfile

    r107462 r107759  
    77set llvm_version        3.4
    88name                    dragonegg-${llvm_version}
    9 set gcc_version         48
    10 set gcc_version_dot     4.8
    11 revision                1
     9
     10subport                 ${name}-gcc-4.5 {
     11    revision            0
     12    set gcc_version     45
     13    set gcc_version_dot 4.5
     14}
     15subport                 ${name}-gcc-4.6 {
     16    revision            0
     17    set gcc_version     46
     18    set gcc_version_dot 4.6
     19}
     20subport                 ${name}-gcc-4.7 {
     21    revision            0
     22    set gcc_version     47
     23    set gcc_version_dot 4.7
     24}
     25subport                 ${name}-gcc-4.8 {
     26    revision            0
     27    set gcc_version     48
     28    set gcc_version_dot 4.8
     29}
     30subport                 ${name}-gcc-4.9 {
     31    revision            0
     32    set gcc_version     49
     33    set gcc_version_dot 4.9
     34}
     35
    1236dist_subdir             llvm
    1337categories              lang
     
    1640license                 GPL-2
    1741
    18 description             DragonEgg is a LLVM plug-in for GCC ${gcc_version_dot}
     42description             DragonEgg is a LLVM plug-in for GCC
    1943long_description        DragonEgg replaces GCC optimizers and code generators \
    2044                        by the LLVM optimizing infrastructure. It supersedes \
     
    2246
    2347homepage                http://dragonegg.llvm.org/
     48
     49if {${subport} == ${name}} {
     50version                 ${llvm_version}
     51epoch                   1
     52
     53distfiles
     54
     55set gcc_version_dot     4.6
     56
     57depends_run             port:${name}-gcc-${gcc_version_dot}
     58
     59use_configure           no
     60build                   {}
     61destroot {
     62    # For base
     63    foreach binary {gcc cpp c++ g++ gcj gcov gfortran} {
     64        ln -s dragonegg-${llvm_version}-${binary}-mp-${gcc_version_dot} ${destroot}${prefix}/bin/dragonegg-${llvm_version}-${binary}
     65    }
     66}
     67
     68} else {
    2469
    2570depends_lib             port:llvm-${llvm_version} port:gcc${gcc_version}
     
    4388#extract.suffix          .tar.gz
    4489#distname                dragonegg-${version}.src
    45 #checksums           sha1    9be8f055df814e56ea3585156da8c7e457f2cd7b \
    46 #                    rmd160  93aa8a463b6b5e1fb9cc1ee0a7c4d310a78ea64f \
    47 #                    sha256  72df1fd2e901b254ab8d1b5e7b93c7104751a613aca531f1483f9a637a5f6827
     90#checksums           sha1    aaab9d4c33e4bcad82027acb220453b5db61292a \
     91#                    rmd160  afee1287634ca3c926e5cdb93286e3f926f3f9ec \
     92#                    sha256  3153a827e9a3cef4212d0240ffc5ab7a2ce92dcf1283520d1eb0c3f295f4d9cd
    4893
    4994pre-fetch {
     
    5499
    55100select.group    gcc
    56 select.file     ${filespath}/dragonegg-${llvm_version}-gcc${gcc_version}
     101select.file     ${worksrcpath}/dragonegg-${llvm_version}-gcc-${gcc_version_dot}
    57102
    58103build.target
     
    78123patchfiles missing-includes.patch
    79124
     125post-extract {
     126    file copy ${filespath}/dragonegg-select ${select.file}
     127    reinplace "s:LLVM_VERSION:${llvm_version}:" ${select.file}
     128    reinplace "s:GCC_VERSION:${gcc_version_dot}:" ${select.file}
     129}
     130
    80131variant universal {
    81132    post-patch {
     
    92143destroot {
    93144    xinstall -m 755 -d ${destroot}${prefix}/libexec/dragonegg
    94     xinstall -m 755 ${worksrcpath}/dragonegg.so ${destroot}${prefix}/libexec/dragonegg/llvm-${llvm_version}-gcc${gcc_version}.so
     145    xinstall -m 755 ${worksrcpath}/dragonegg.so ${destroot}${prefix}/libexec/dragonegg/llvm-${llvm_version}-gcc-${gcc_version_dot}.so
    95146
    96     xinstall -m 755 ${filespath}/dragonegg-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcc
    97     ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-cpp
    98     ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-c++
    99     ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-g++
    100     ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcj
    101     ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcov
    102     ln -s dragonegg-${llvm_version}-gcc ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gfortran
     147    foreach binary {gcc cpp c++ g++ gcj gcov gfortran} {
     148        set path ${destroot}${prefix}/bin/dragonegg-${llvm_version}-${binary}-mp-${gcc_version_dot}
     149        xinstall -m 755 ${filespath}/dragonegg-gcc ${path}
     150        reinplace "s:PLUGIN:${prefix}/libexec/dragonegg/llvm-${llvm_version}-gcc-${gcc_version_dot}.so:" ${path}
     151        reinplace "s:PREFIX:${prefix}:" ${path}
     152        reinplace "s:GCC_VERSION:${gcc_version_dot}:" ${path}
     153        reinplace "s:BINARY:${binary}:" ${path}
     154       
     155    }
     156}
    103157
    104     reinplace "s:PLUGIN:${prefix}/libexec/dragonegg/llvm-${llvm_version}-gcc${gcc_version}.so:" ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcc
    105     reinplace "s:LLVM_VERSION:${llvm_version}:" ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcc
    106     reinplace "s:GCC_VERSION:${gcc_version_dot}:" ${destroot}${prefix}/bin/dragonegg-${llvm_version}-gcc
    107158}
    108159
  • trunk/dports/lang/dragonegg-3.4/files/dragonegg-gcc

    r107455 r107759  
    11#!/bin/bash
    22
    3 CMD=${0/dragonegg-LLVM_VERSION-/}
    4 
    5 exec ${CMD}-mp-GCC_VERSION -fplugin=PLUGIN "${@}"
     3exec ${0/dragonegg-LLVM_VERSION-/} -fplugin=PLUGIN "${@}"
  • trunk/dports/lang/gcc45/Portfile

    r103338 r107759  
    55PortGroup compiler_blacklist_versions 1.0
    66
     7# Whenever this port is bumped for version/revision, please revbump dragonegg-3.[34]-gcc-4.5
    78name                gcc45
    89epoch               1
  • trunk/dports/lang/gcc46/Portfile

    r107462 r107759  
    88epoch               1
    99
    10 # Whenever this port is bumped for version/revision, please revbump dragonegg-3.[012]
     10# Whenever this port is bumped for version/revision, please revbump dragonegg-3.[012] and dragonegg-3.[34]-gcc-4.6
    1111version             4.6.4
    1212revision            1
  • trunk/dports/lang/gcc47/Portfile

    r107462 r107759  
    99epoch               1
    1010
    11 # Whenever this port is bumped for version/revision, please revbump dragonegg-3.3
     11# Whenever this port is bumped for version/revision, please revbump dragonegg-3.[34]-gcc-4.7
    1212version             4.7.3
    1313revision            1
  • trunk/dports/lang/gcc48/Portfile

    r107462 r107759  
    88subport             libstdcxx {}
    99
    10 # Whenever this port is bumped for version/revision, please revbump dragonegg-3.4
     10# Whenever this port is bumped for version/revision, please revbump dragonegg-3.[34]-gcc-4.8
    1111epoch               2
    1212version             4.8.1
  • trunk/dports/lang/gcc49/Portfile

    r107536 r107759  
    88subport             libstdcxx-devel {}
    99
     10# Whenever this port is bumped for version/revision, please revbump dragonegg-3.4-gcc-4.9
    1011version             4.9-20130630
    1112revision            1
Note: See TracChangeset for help on using the changeset viewer.