Skip to content

Commit

Permalink
misc: Cleanup configure.cxx_stdlib related logic now that we can assu…
Browse files Browse the repository at this point in the history
…me base 2.3 or newer

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@121269 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
jeremyhu committed Jun 21, 2014
1 parent 435bc3b commit e98f8f6
Show file tree
Hide file tree
Showing 78 changed files with 98 additions and 669 deletions.
13 changes: 2 additions & 11 deletions aqua/qt4-mac/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -578,18 +578,9 @@ pre-configure {

configure.env-append PKG_CONFIG=${prefix}/bin/pkg-config

# set which stdlib to use; clang only; use configure.cxx_stdlib if
# that exists, and otherwise use libc++ on 10.9 or libstdc++ on
# 10.8 or earler.

# set which stdlib to use; clang only
if {[string match *clang* ${configure.compiler}]} {
if {[info exists configure.cxx_stdlib]} {
configure.env-append QMAKE_STDLIB="-stdlib=${configure.cxx_stdlib}"
} elseif {${MINOR} == 9} {
configure.env-append QMAKE_STDLIB="-stdlib=libc++"
} else {
configure.env-append QMAKE_STDLIB="-stdlib=libstdc++"
}
configure.env-append QMAKE_STDLIB="-stdlib=${configure.cxx_stdlib}"
}
}

Expand Down
3 changes: 1 addition & 2 deletions archivers/unrar/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ if {[tbool configure.ccache]} {
configure.cxx "ccache ${configure.cxx}"
}

# TODO: Simplify once MacPorts 2.3 is released
set cxx_stdlibflags {}
if {[info exists configure.cxx_stdlib] && ${configure.cxx_stdlib} ne {} && [string match *clang* ${configure.cxx}]} {
if {[string match *clang* ${configure.cxx}]} {
set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
}

Expand Down
26 changes: 5 additions & 21 deletions audio/faac/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,11 @@ checksums md5 80763728d392c7d789cde25614c878f6 \

patchfiles patch-configure.in.diff

# TODO: Check ${configure.cxx_stdlib} directly once MacPorts 2.3 is released
platform darwin {
set cxxstdlib {}

if {[info exists configure.cxx_stdlib] &&
${configure.cxx_stdlib} ne {} &&
[string match *clang* ${configure.cxx}]} {
set cxxstdlib ${configure.cxx_stdlib}
} elseif {[string match *clang* ${configure.cxx}] &&
${os.major} >= 13} {
set cxxstdlib libc++
} else {
set cxxstdlib libstdc++
}

post-patch {
if {${cxxstdlib} == "libc++"} {
reinplace "s:-lstdc\+\+:-lc++:" \
${worksrcpath}/frontend/Makefile.am \
${worksrcpath}/frontend/Makefile.in
}
post-patch {
if {[string match *clang* ${configure.cxx}] && ${configure.cxx_stdlib} == "libc++"} {
reinplace "s:-lstdc\+\+:-lc++:" \
${worksrcpath}/frontend/Makefile.am \
${worksrcpath}/frontend/Makefile.in
}
}

Expand Down
3 changes: 1 addition & 2 deletions audio/id3v2/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ pre-build {
system "cd ${worksrcpath} && make clean"
}

# TODO: Simplify once MacPorts 2.3 is released
set cxx_stdlibflags {}
if {[info exists configure.cxx_stdlib] && ${configure.cxx_stdlib} ne {} && [string match *clang* ${configure.cxx}]} {
if {[string match *clang* ${configure.cxx}]} {
set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
}

Expand Down
4 changes: 1 addition & 3 deletions cross/arm-elf-gcc/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,7 @@ if {${os.platform} eq "darwin" && (${build_arch} eq "x86_64" || ${build_arch} eq
}

# the bootstrap compiler doesn't accept -stdlib
if {[info exists configure.cxx_stdlib]} {
configure.cxx_stdlib
}
configure.cxx_stdlib

build.dir ${workpath}/build

Expand Down
3 changes: 1 addition & 2 deletions databases/db44/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@ configure.args --enable-cxx --enable-compat185 --enable-dump185 \
--includedir=\\\${prefix}/include/db${branch} \
--libdir=\\\${prefix}/lib/db${branch}

# TODO: Simplify once MacPorts 2.3 is released
set cxx_stdlibflags {}
if {[info exists configure.cxx_stdlib] && ${configure.cxx_stdlib} ne {} && [string match *clang* ${configure.cxx}]} {
if {[string match *clang* ${configure.cxx}]} {
set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
}
configure.cxx ${configure.cxx} ${cxx_stdlibflags}
Expand Down
3 changes: 1 addition & 2 deletions databases/db46/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@ configure.args --enable-cxx \
--libdir=\\\${prefix}/lib/db${branch} \
--enable-dump185

# TODO: Simplify once MacPorts 2.3 is released
set cxx_stdlibflags {}
if {[info exists configure.cxx_stdlib] && ${configure.cxx_stdlib} ne {} && [string match *clang* ${configure.cxx}]} {
if {[string match *clang* ${configure.cxx}]} {
set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
}
configure.cxx ${configure.cxx} ${cxx_stdlibflags}
Expand Down
3 changes: 1 addition & 2 deletions databases/db47/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,8 @@ configure.args --enable-cxx \
--includedir=\\\${prefix}/include/db${branch} \
--libdir=\\\${prefix}/lib/db${branch}

# TODO: Simplify once MacPorts 2.3 is released
set cxx_stdlibflags {}
if {[info exists configure.cxx_stdlib] && ${configure.cxx_stdlib} ne {} && [string match *clang* ${configure.cxx}]} {
if {[string match *clang* ${configure.cxx}]} {
set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
}
configure.cxx ${configure.cxx} ${cxx_stdlibflags}
Expand Down
3 changes: 1 addition & 2 deletions databases/db48/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ configure.args --enable-cxx \
--includedir=\\\${prefix}/include/db${branch} \
--libdir=\\\${prefix}/lib/db${branch}

# TODO: Simplify once MacPorts 2.3 is released
set cxx_stdlibflags {}
if {[info exists configure.cxx_stdlib] && ${configure.cxx_stdlib} ne {} && [string match *clang* ${configure.cxx}]} {
if {[string match *clang* ${configure.cxx}]} {
set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
}
configure.cxx ${configure.cxx} ${cxx_stdlibflags}
Expand Down
3 changes: 1 addition & 2 deletions databases/db51/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ configure.args --enable-cxx \
--includedir=\\\${prefix}/include/db${branch} \
--libdir=\\\${prefix}/lib/db${branch}

# TODO: Simplify once MacPorts 2.3 is released
set cxx_stdlibflags {}
if {[info exists configure.cxx_stdlib] && ${configure.cxx_stdlib} ne {} && [string match *clang* ${configure.cxx}]} {
if {[string match *clang* ${configure.cxx}]} {
set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
}
configure.cxx ${configure.cxx} ${cxx_stdlibflags}
Expand Down
3 changes: 1 addition & 2 deletions databases/db52/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ configure.args --enable-cxx \
--includedir=\\\${prefix}/include/db${branch} \
--libdir=\\\${prefix}/lib/db${branch}

# TODO: Simplify once MacPorts 2.3 is released
set cxx_stdlibflags {}
if {[info exists configure.cxx_stdlib] && ${configure.cxx_stdlib} ne {} && [string match *clang* ${configure.cxx}]} {
if {[string match *clang* ${configure.cxx}]} {
set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
}
configure.cxx ${configure.cxx} ${cxx_stdlibflags}
Expand Down
3 changes: 1 addition & 2 deletions databases/db53/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ configure.args --enable-cxx \
--includedir=\\\${prefix}/include/db${branch} \
--libdir=\\\${prefix}/lib/db${branch}

# TODO: Simplify once MacPorts 2.3 is released
set cxx_stdlibflags {}
if {[info exists configure.cxx_stdlib] && ${configure.cxx_stdlib} ne {} && [string match *clang* ${configure.cxx}]} {
if {[string match *clang* ${configure.cxx}]} {
set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
}
configure.cxx ${configure.cxx} ${cxx_stdlibflags}
Expand Down
4 changes: 1 addition & 3 deletions devel/boost/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,7 @@ post-configure {
}

set cxx_stdlibflags {}
if {[info exists configure.cxx_stdlib] &&
${configure.cxx_stdlib} ne {} &&
[string match *clang* ${configure.cxx}]} {
if {[string match *clang* ${configure.cxx}]} {
set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
}

Expand Down
4 changes: 1 addition & 3 deletions devel/cctools/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,7 @@ configure.cflags-append -std=gnu99
build.target all

set cxx_stdlibflags {}
if {[info exists configure.cxx_stdlib] &&
${configure.cxx_stdlib} ne {} &&
[string match *clang* ${configure.cxx}]} {
if {[string match *clang* ${configure.cxx}]} {
set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
}

Expand Down
6 changes: 2 additions & 4 deletions devel/gmp/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,8 @@ configure.universal_args-delete --disable-dependency-tracking
#
# On PowerPC machines, CFLAGS must be empty to get -force_cpusubtype_ALL.

if {[info exists configure.cxx_stdlib] &&
${configure.cxx_stdlib} ne {} &&
[string match *clang* ${configure.cxx}]
} then {
set cxx_stdlibflags {}
if {[string match *clang* ${configure.cxx}]} {
configure.cxx-append -stdlib=${configure.cxx_stdlib}
configure.cxx_stdlib
}
Expand Down
22 changes: 3 additions & 19 deletions devel/ld64/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -82,25 +82,9 @@ variant llvm35 conflicts llvm29 llvm30 llvm31 llvm32 llvm33 llvm34 description {

set makefile "Makefile-133"

# TODO: Check ${configure.cxx_stdlib} directly once MacPorts 2.3 is released
set cxx_stdlibflags {}
platform darwin {
set cxxstdlib {}

if {[info exists configure.cxx_stdlib] &&
${configure.cxx_stdlib} ne {} &&
[string match *clang* ${configure.cxx}]} {
set cxxstdlib ${configure.cxx_stdlib}
} elseif {[string match *clang* ${configure.cxx}] &&
${os.major} >= 13} {
set cxxstdlib libc++
} else {
set cxxstdlib libstdc++
}

if {[string match *clang* ${configure.cxx}]} {
set cxx_stdlibflags -stdlib=${cxxstdlib}
}
if {[string match *clang* ${configure.cxx}]} {
set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
}

if {${os.arch} eq "powerpc" || ${os.major} < 9} {
Expand Down Expand Up @@ -145,7 +129,7 @@ if {${os.arch} eq "powerpc" || ${os.major} < 9} {
# http://trac.macports.org/ticket/43737
compiler.blacklist-append *gcc*

if {${cxxstdlib} eq "libstdc++"} {
if {${configure.cxx_stdlib} eq "libstdc++"} {
patchfiles-append ld64-236-hash_set.patch
}
}
Expand Down
16 changes: 1 addition & 15 deletions devel/webkit-sharp/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,8 @@ depends_lib port:gtk-sharp2 \
# mono is not universal
universal_variant no

# TODO: Check ${configure.cxx_stdlib} directly once MacPorts 2.3 is released
platform darwin {
set cxxstdlib {}

if {[info exists configure.cxx_stdlib] &&
${configure.cxx_stdlib} ne {} &&
[string match *clang* ${configure.cxx}]} {
set cxxstdlib ${configure.cxx_stdlib}
} elseif {[string match *clang* ${configure.cxx}] &&
${os.major} >= 13} {
set cxxstdlib libc++
} else {
set cxxstdlib libstdc++
}

if {${cxxstdlib} eq "libstdc++"} {
if {${configure.cxx_stdlib} eq "libstdc++"} {
depends_lib-delete path:lib/pkgconfig/webkit-1.0.pc:webkit-gtk
depends_lib-append path:lib/pkgconfig/webkit-1.0.pc:webkit-gtk-2.0
}
Expand Down
16 changes: 1 addition & 15 deletions gnome/balsa/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,22 +68,8 @@ configure.args --with-gpgme \

configure.cflags-append -D_DARWIN_C_SOURCE

# TODO: Check ${configure.cxx_stdlib} directly once MacPorts 2.3 is released
platform darwin {
set cxxstdlib {}

if {[info exists configure.cxx_stdlib] &&
${configure.cxx_stdlib} ne {} &&
[string match *clang* ${configure.cxx}]} {
set cxxstdlib ${configure.cxx_stdlib}
} elseif {[string match *clang* ${configure.cxx}] &&
${os.major} >= 13} {
set cxxstdlib libc++
} else {
set cxxstdlib libstdc++
}

if {${cxxstdlib} eq "libstdc++"} {
if {${configure.cxx_stdlib} eq "libstdc++"} {
depends_lib-delete path:lib/pkgconfig/webkitgtk-3.0.pc:webkit-gtk3
depends_lib-append path:lib/pkgconfig/webkitgtk-3.0.pc:webkit-gtk3-2.0
}
Expand Down
16 changes: 1 addition & 15 deletions gnome/devhelp/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,8 @@ depends_lib port:desktop-file-utils \
port:gtk3 \
path:lib/pkgconfig/webkitgtk-3.0.pc:webkit-gtk3

# TODO: Check ${configure.cxx_stdlib} directly once MacPorts 2.3 is released
platform darwin {
set cxxstdlib {}

if {[info exists configure.cxx_stdlib] &&
${configure.cxx_stdlib} ne {} &&
[string match *clang* ${configure.cxx}]} {
set cxxstdlib ${configure.cxx_stdlib}
} elseif {[string match *clang* ${configure.cxx}] &&
${os.major} >= 13} {
set cxxstdlib libc++
} else {
set cxxstdlib libstdc++
}

if {${cxxstdlib} eq "libstdc++"} {
if {${configure.cxx_stdlib} eq "libstdc++"} {
depends_lib-delete path:lib/pkgconfig/webkitgtk-3.0.pc:webkit-gtk3
depends_lib-append path:lib/pkgconfig/webkitgtk-3.0.pc:webkit-gtk3-2.0
}
Expand Down
16 changes: 1 addition & 15 deletions gnome/empathy/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,8 @@ depends_run port:telepathy-mission-control \
port:gnome-settings-daemon \
port:yelp

# TODO: Check ${configure.cxx_stdlib} directly once MacPorts 2.3 is released
platform darwin {
set cxxstdlib {}

if {[info exists configure.cxx_stdlib] &&
${configure.cxx_stdlib} ne {} &&
[string match *clang* ${configure.cxx}]} {
set cxxstdlib ${configure.cxx_stdlib}
} elseif {[string match *clang* ${configure.cxx}] &&
${os.major} >= 13} {
set cxxstdlib libc++
} else {
set cxxstdlib libstdc++
}

if {${cxxstdlib} eq "libstdc++"} {
if {${configure.cxx_stdlib} eq "libstdc++"} {
depends_lib-delete path:lib/pkgconfig/webkitgtk-3.0.pc:webkit-gtk3
depends_lib-append path:lib/pkgconfig/webkitgtk-3.0.pc:webkit-gtk3-2.0
}
Expand Down
16 changes: 1 addition & 15 deletions gnome/gnome-online-accounts/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -120,22 +120,8 @@ configure.args --enable-introspection=yes \

}

# TODO: Check ${configure.cxx_stdlib} directly once MacPorts 2.3 is released
platform darwin {
set cxxstdlib {}

if {[info exists configure.cxx_stdlib] &&
${configure.cxx_stdlib} ne {} &&
[string match *clang* ${configure.cxx}]} {
set cxxstdlib ${configure.cxx_stdlib}
} elseif {[string match *clang* ${configure.cxx}] &&
${os.major} >= 13} {
set cxxstdlib libc++
} else {
set cxxstdlib libstdc++
}

if {${cxxstdlib} eq "libstdc++"} {
if {${configure.cxx_stdlib} eq "libstdc++"} {
depends_lib-delete path:lib/pkgconfig/webkitgtk-3.0.pc:webkit-gtk3
depends_lib-append path:lib/pkgconfig/webkitgtk-3.0.pc:webkit-gtk3-2.0
}
Expand Down
16 changes: 1 addition & 15 deletions gnome/gnucash-devel/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,8 @@ depends_lib port:gconf \
port:icu \
port:p5.12-finance-quote

# TODO: Check ${configure.cxx_stdlib} directly once MacPorts 2.3 is released
platform darwin {
set cxxstdlib {}

if {[info exists configure.cxx_stdlib] &&
${configure.cxx_stdlib} ne {} &&
[string match *clang* ${configure.cxx}]} {
set cxxstdlib ${configure.cxx_stdlib}
} elseif {[string match *clang* ${configure.cxx}] &&
${os.major} >= 13} {
set cxxstdlib libc++
} else {
set cxxstdlib libstdc++
}

if {${cxxstdlib} eq "libstdc++"} {
if {${configure.cxx_stdlib} eq "libstdc++"} {
depends_lib-delete path:lib/pkgconfig/webkit-1.0.pc:webkit-gtk
depends_lib-append path:lib/pkgconfig/webkit-1.0.pc:webkit-gtk-2.0
}
Expand Down
Loading

0 comments on commit e98f8f6

Please sign in to comment.