Skip to content
Permalink
Browse files

dragonegg-3.4: Obsolete port

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@macports.org>
  • Loading branch information
jeremyhu committed Mar 31, 2019
1 parent 0e7e06c commit fad84f38e16b20f8266b24631f2ce1a3a98b5887
@@ -1,161 +1,21 @@
# -*- 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

PortSystem 1.0
PortGroup select 1.0
PortGroup obsolete 1.0

set llvm_version 3.4
set llvm_version_no_dot 34
name dragonegg-${llvm_version}
version 3.4
name dragonegg-${version}

subport ${name}-gcc-4.5 {
revision 5
set gcc_version 4.5
set gcc_version_no_dot 45
}
subport ${name}-gcc-4.6 {
revision 7
set gcc_version 4.6
set gcc_version_no_dot 46
}
subport ${name}-gcc-4.7 {
revision 9
set gcc_version 4.7
set gcc_version_no_dot 47
}
subport ${name}-gcc-4.8 {
revision 12
set gcc_version 4.8
set gcc_version_no_dot 48
#Fixing issue with TARGET_CPU_DEFAULT_max.
#see http://llvm.org/bugs/show_bug.cgi?id=18548
patchfiles-append patch-CPU_DEFAULT.patch
}
epoch 2

subport ${name}-gcc-4.5 {}
subport ${name}-gcc-4.6 {}
subport ${name}-gcc-4.7 {}
subport ${name}-gcc-4.8 {}

dist_subdir llvm
categories lang
platforms darwin
maintainers {jeremyhu @jeremyhu} openmaintainer
license GPL-2

description DragonEgg is a LLVM plug-in for GCC
long_description DragonEgg replaces GCC optimizers and code generators \
by the LLVM optimizing infrastructure. It supersedes \
llvm-gcc.

homepage https://dragonegg.llvm.org/

if {${subport} eq ${name}} {
version ${llvm_version}
epoch 1
revision 1

distfiles

set gcc_version 4.6

depends_run port:${name}-gcc-${gcc_version}

use_configure no
build {}
destroot {
# For base
foreach binary {gcc cpp c++ g++ gcj gcov gfortran} {
ln -s dragonegg-${llvm_version}-${binary}-mp-${gcc_version} ${destroot}${prefix}/bin/dragonegg-${llvm_version}-${binary}
}
}

} else {

depends_lib port:llvm-${llvm_version} port:gcc${gcc_version_no_dot}
depends_run port:gcc_select

# gcc needs to match our arch, not the other way around
# We build +universal just fine in order to support whatever arch gcc is
depends_skip_archcheck-append gcc${gcc_version_no_dot}

#fetch.type svn
#svn.revision 198151
#version ${llvm_version}-r${svn.revision}
#worksrcdir trunk
#svn.url http://llvm.org/svn/llvm-project/dragonegg/trunk
#worksrcdir release_${llvm_version_no_dot}
#svn.url http://llvm.org/svn/llvm-project/dragonegg/branches/release_${llvm_version_no_dot}

version ${llvm_version}
epoch 1
master_sites https://releases.llvm.org/${version}/
extract.suffix .tar.gz
distname dragonegg-${version}.src
worksrcdir dragonegg-${version}
checksums sha1 afd845f591dc00dc058a3f901df6489e9b41102f \
rmd160 0b4ef9f855eb2739ee619da0dac150b904a0be3a \
sha256 34bf35c7d5f395fdc1e2a6b8ddbd83fc2e5027a895333efbe03cf8b5d767639c

pre-fetch {
ui_msg "Please remember to keep dragonegg and llvm in phase by updating llvm-${llvm_version} first."
}

use_configure no

select.group gcc
select.file ${worksrcpath}/dragonegg-${llvm_version}-gcc${gcc_version_no_dot}

build.target

# g++-4.0 fails to build some of the newer C++ for ppc
# Intel looks ok, but I prefer using gcc-4.2 for consistency
compiler.blacklist gcc-4.0

patchfiles-append missing-includes.patch

post-extract {
file copy ${filespath}/dragonegg-select ${select.file}
reinplace "s:LLVM_VERSION:${llvm_version}:" ${select.file}
reinplace "s:GCC_VERSION:${gcc_version}:" ${select.file}
}

variant universal {
post-patch {
reinplace "/-MD -MP/d" ${worksrcpath}/Makefile
}
}

set cxx_stdlibflags {}
if {[string match *clang* ${configure.cxx}]} {
set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
}
if {[vercmp [macports_version] 2.5.99] >= 0} {
build.env-append \
ENABLE_LLVM_PLUGINS=1 \
LLVM_CONFIG=${prefix}/bin/llvm-config-mp-${llvm_version} \
GCC=${prefix}/bin/gcc-mp-${gcc_version} \
"CC=${configure.cc} ${configure.cppflags} ${configure.cflags} [get_canonical_archflags cc]" \
"CXX=${configure.cxx} ${configure.cppflags} ${configure.cxxflags} ${cxx_stdlibflags} [get_canonical_archflags cxx]"
} else {
build.env-append \
ENABLE_LLVM_PLUGINS=1 \
LLVM_CONFIG=${prefix}/bin/llvm-config-mp-${llvm_version} \
GCC=${prefix}/bin/gcc-mp-${gcc_version} \
CC="${configure.cc} ${configure.cppflags} ${configure.cflags} [get_canonical_archflags cc]" \
CXX="${configure.cxx} ${configure.cppflags} ${configure.cxxflags} ${cxx_stdlibflags} [get_canonical_archflags cxx]"
}

destroot {
xinstall -m 755 -d ${destroot}${prefix}/libexec/dragonegg
xinstall -m 755 ${worksrcpath}/dragonegg.so ${destroot}${prefix}/libexec/dragonegg/llvm${llvm_version_no_dot}gcc${gcc_version_no_dot}.so
reinplace "s:dragonegg:llvm${llvm_version_no_dot}gcc${gcc_version_no_dot}:" ${worksrcpath}/integrated-as.specs
xinstall -m 644 ${worksrcpath}/integrated-as.specs ${destroot}${prefix}/libexec/dragonegg/llvm${llvm_version_no_dot}gcc${gcc_version_no_dot}-integrated-as.specs

foreach binary {gcc cpp c++ g++ gcj gcov gfortran} {
set path ${destroot}${prefix}/bin/dragonegg-${llvm_version}-${binary}-mp-${gcc_version}
xinstall -m 755 ${filespath}/dragonegg-gcc ${path}
reinplace "s:PLUGIN:${prefix}/libexec/dragonegg/llvm${llvm_version_no_dot}gcc${gcc_version_no_dot}.so:" ${path}
reinplace "s:PREFIX:${prefix}:" ${path}
reinplace "s:GCC_VERSION:${gcc_version}:" ${path}
reinplace "s:BINARY:${binary}:" ${path}
}
}

}

livecheck.type none

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit fad84f3

Please sign in to comment.
You can’t perform that action at this time.