Skip to content

Commit

Permalink
Adapt Portfiles to base *.env parsing changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jmroot committed Mar 23, 2019
1 parent 0e22d1b commit a560834
Show file tree
Hide file tree
Showing 354 changed files with 2,013 additions and 281 deletions.
12 changes: 6 additions & 6 deletions aqua/qt3-mac/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ variant mysql5 conflicts mysql4 description "add MySQL 5 support" {
}

configure.cmd "echo yes | ./configure"
configure.env DYLD_LIBRARY_PATH='' \
QMAKESPEC='' \
QTDIR=''
configure.env DYLD_LIBRARY_PATH= \
QMAKESPEC= \
QTDIR=
configure.args -v -prefix '${prefix}' \
-docdir '${prefix}/share/doc/${name}/html' \
-datadir '${prefix}/share/qt3' \
Expand All @@ -66,9 +66,9 @@ configure.args -v -prefix '${prefix}' \
'-I${prefix}/include' \
'-L${prefix}/lib'

build.env DYLD_LIBRARY_PATH="${worksrcpath}/lib" \
QMAKESPEC='' \
QTDIR=''
build.env DYLD_LIBRARY_PATH=${worksrcpath}/lib \
QMAKESPEC= \
QTDIR=
build.target symlinks src-qmake src-moc sub-src sub-tools

destroot.destdir INSTALL_ROOT='${destroot}'
Expand Down
2 changes: 1 addition & 1 deletion aqua/qt4-mac/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ pre-configure {

# set which stdlib to use; clang only
if {[string match *clang* ${configure.compiler}]} {
configure.env-append QMAKE_STDLIB="-stdlib=${configure.cxx_stdlib}"
configure.env-append QMAKE_STDLIB=-stdlib=${configure.cxx_stdlib}
configure.ldflags-append -stdlib=${configure.cxx_stdlib}
}
}
Expand Down
8 changes: 7 additions & 1 deletion archivers/arc/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,17 @@ patchfiles patch-gcc-warnings.diff \
use_configure no

variant universal {}

if {[vercmp [macports_version] 2.5.99] >= 0} {
build.env-append "CC=${configure.cc} [get_canonical_archflags cc]" \
"CFLAGS=${configure.cflags} [get_canonical_archflags cc]" \
"LDFLAGS=${configure.ldflags} [get_canonical_archflags ld]" \
PREFIX=${prefix}
} else {
build.env-append CC="${configure.cc} [get_canonical_archflags cc]" \
CFLAGS='${configure.cflags} [get_canonical_archflags cc]' \
LDFLAGS='${configure.ldflags} [get_canonical_archflags ld]' \
PREFIX='${prefix}'
}

destroot {
xinstall -W ${worksrcpath} ${name} m${name} ${destroot}${prefix}/bin
Expand Down
2 changes: 1 addition & 1 deletion archivers/libzzip/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ depends_lib port:zlib
set docdir ${prefix}/share/doc/${name}

configure.python ${prefix}/bin/python2.7
configure.env ac_cv_path_PAX=":"
configure.env ac_cv_path_PAX=:

post-configure {
set builddir [glob -dir ${worksrcpath} "*apple-darwin*"]
Expand Down
7 changes: 7 additions & 0 deletions archivers/pbzip2/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,17 @@ use_configure no
variant universal {}

pre-build {
if {[vercmp [macports_version] 2.5.99] >= 0} {
build.env-append \
CXX=${configure.cxx} \
"CXXFLAGS=${configure.cxxflags} [get_canonical_archflags cxx]" \
"LDFLAGS=${configure.ldflags} [get_canonical_archflags ld]"
} else {
build.env-append \
CXX="${configure.cxx}" \
CXXFLAGS="${configure.cxxflags} [get_canonical_archflags cxx]" \
LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]"
}
}

destroot.args PREFIX=${prefix}
Expand Down
6 changes: 6 additions & 0 deletions archivers/pigz/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,15 @@ use_configure no
variant universal {}

build.target
if {[vercmp [macports_version] 2.5.99] >= 0} {
build.env-append CC=${configure.cc} \
"CFLAGS=${configure.cflags} [get_canonical_archflags cc]" \
"LDFLAGS=${configure.ldflags} [get_canonical_archflags ld]"
} else {
build.env-append CC="${configure.cc}" \
CFLAGS="${configure.cflags} [get_canonical_archflags cc]" \
LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]"
}

destroot {
xinstall -m 644 ${worksrcpath}/${name}.1 ${destroot}${prefix}/share/man/man1
Expand Down
6 changes: 6 additions & 0 deletions archivers/upx/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,15 @@ post-configure {

variant universal {}

if {[vercmp [macports_version] 2.5.99] >= 0} {
build.env CXX=${configure.cxx} \
"CXXFLAGS_OPTIMIZE=${configure.cxxflags} [get_canonical_archflags cxx]" \
CXXFLAGS_WERROR=
} else {
build.env CXX="${configure.cxx}" \
CXXFLAGS_OPTIMIZE="${configure.cxxflags} [get_canonical_archflags cxx]" \
CXXFLAGS_WERROR=
}

destroot {
xinstall -m 755 ${worksrcpath}/src/upx.out ${destroot}${prefix}/bin/upx
Expand Down
9 changes: 9 additions & 0 deletions archivers/zstd/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,21 @@ variant universal {}

build.target allmost

if {[vercmp [macports_version] 2.5.99] >= 0} {
build.env-append CC=${configure.cc} \
"CFLAGS=${configure.cflags} [get_canonical_archflags cc]" \
CXX=${configure.cxx} \
"CXXFLAGS=${configure.cxxflags} [get_canonical_archflags cxx]" \
"LDFLAGS=${configure.ldflags} [get_canonical_archflags ld]" \
PREFIX=${prefix}
} else {
build.env-append CC="${configure.cc}" \
CFLAGS="${configure.cflags} [get_canonical_archflags cc]" \
CXX="${configure.cxx}" \
CXXFLAGS="${configure.cxxflags} [get_canonical_archflags cxx]" \
LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]" \
PREFIX="${prefix}"
}

test.run yes
test.env-append {*}${build.env}
Expand Down
5 changes: 5 additions & 0 deletions audio/mp3_check/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,13 @@ patch {
use_configure no

configure.cflags-append -std=gnu89
if {[vercmp [macports_version] 2.5.99] >= 0} {
build.env CC=${configure.cc} \
"CFLAGS=${configure.cflags} ${configure.cc_archflags}"
} else {
build.env CC="${configure.cc}" \
CFLAGS="${configure.cflags} ${configure.cc_archflags}"
}

destroot {
xinstall -m 755 ${worksrcpath}/mp3_check \
Expand Down
2 changes: 1 addition & 1 deletion audio/mp3unicode/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ checksums rmd160 bb31045c51ef7d789ffe22767cf721fc7bc3ec30 \
size 101593

configure.env-append \
ICONV_LIBS="-liconv"
ICONV_LIBS=-liconv

depends_build port:pkgconfig

Expand Down
7 changes: 6 additions & 1 deletion benchmarks/forkbomb/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,14 @@ patchfiles patch-Makefile.diff
use_configure no

variant universal {}

if {[vercmp [macports_version] 2.5.99] >= 0} {
build.env-append CC=${configure.cc} \
"CFLAGS=${configure.cflags} [get_canonical_archflags cc]" \
"LDFLAGS=${configure.ldflags} [get_canonical_archflags ld]"
} else {
build.env-append CC=${configure.cc} \
CFLAGS="${configure.cflags} [get_canonical_archflags cc]" \
LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]"
}

destroot.args-append PREFIX=${prefix}
4 changes: 4 additions & 0 deletions benchmarks/nbench-byte/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ post-install {
}

if {${build_arch} ne ""} {
if {[vercmp [macports_version] 2.5.99] >= 0} {
build.env-append CFLAGS=${configure.cc_archflags}
} else {
build.env-append CFLAGS="${configure.cc_archflags}"
}
}

livecheck.type regex
Expand Down
4 changes: 2 additions & 2 deletions cross/msp430-gdb-devel/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ configure.args --target=${name_target} \

patch.pre_args -p1

build.env-append CFLAGS="-I${prefix}/include"
configure.env-append CFLAGS="-I${prefix}/include"
build.env-append CFLAGS=-I${prefix}/include
configure.env-append CFLAGS=-I${prefix}/include

# TODO: Why? Ticket URL?
compiler.blacklist *clang*
Expand Down
4 changes: 2 additions & 2 deletions cross/msp430-gdb/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ configure.args --target=${name_target} \

patch.pre_args -p1

build.env-append CFLAGS="-I${prefix}/include"
configure.env-append CFLAGS="-I${prefix}/include"
build.env-append CFLAGS=-I${prefix}/include
configure.env-append CFLAGS=-I${prefix}/include

# TODO: Why? Ticket URL?
compiler.blacklist *clang*
Expand Down
22 changes: 19 additions & 3 deletions databases/leveldb/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,21 @@ if {[string match *clang* ${configure.cxx}]} {
configure.ldflags-append -stdlib=${configure.cxx_stdlib}
}

if {[vercmp [macports_version] 2.5.99] >= 0} {
if { [variant_isset universal] } {
foreach arch ${configure.universal_archs} {
lappend merger_build_env(${arch}) \
"CFLAGS=${configure.cflags} -arch ${arch}" \
"CXXFLAGS=${configure.cxxflags} -arch ${arch}" \
"LDFLAGS=${configure.ldflags} -arch ${arch}"
}
} else {
build.env-append \
"CFLAGS=${configure.cflags} [get_canonical_archflags cc]" \
"CXXFLAGS=${configure.cxxflags} [get_canonical_archflags cxx]" \
"LDFLAGS=${configure.ldflags} [get_canonical_archflags ld]"
}
} else {
if { [variant_isset universal] } {
foreach arch ${configure.universal_archs} {
lappend merger_build_env(${arch}) \
Expand All @@ -61,12 +76,13 @@ if { [variant_isset universal] } {
CXXFLAGS="${configure.cxxflags} [get_canonical_archflags cxx]" \
LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]"
}
}

build.env-append \
INSTALL_PATH=${prefix}/lib \
CC="${configure.cc}" \
CXX="${configure.cxx}" \
OPT="-DNDEBUG"
CC=${configure.cc} \
CXX=${configure.cxx} \
OPT=-DNDEBUG

destroot {
xinstall -d -m 0755 ${destroot}${prefix}/include/leveldb
Expand Down
18 changes: 18 additions & 0 deletions databases/rocksdb/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,24 @@ patchfiles-append patch-Makefile.diff
use_configure no

variant universal {}
if {[vercmp [macports_version] 2.5.99] >= 0} {
build.env CC=${configure.cc} \
CXX=${configure.cxx} \
CFLAGS=[get_canonical_archflags cc] \
CXXFLAGS=[get_canonical_archflags cxx] \
PORTABLE=1 \
DEBUG_LEVEL=0 \
OPT=${configure.optflags}

destroot.env-append CC=${configure.cc} \
CXX=${configure.cxx} \
CFLAGS=[get_canonical_archflags cc] \
CXXFLAGS=[get_canonical_archflags cxx] \
PORTABLE=1 \
DEBUG_LEVEL=0 \
OPT=${configure.optflags} \
INSTALL_PATH=${destroot}${prefix}
} else {
build.env CC="${configure.cc}" \
CXX="${configure.cxx}" \
CFLAGS="[get_canonical_archflags cc]" \
Expand All @@ -49,3 +66,4 @@ destroot.env-append CC="${configure.cc}" \
DEBUG_LEVEL=0 \
OPT="${configure.optflags}" \
INSTALL_PATH=${destroot}${prefix}
}
11 changes: 11 additions & 0 deletions databases/tokyocabinet-java/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ set javahome /System/Library/Frameworks/JavaVM.framework
patch.args -p1
patchfiles patch-Makefile.in.diff

if {[vercmp [macports_version] 2.5.99] >= 0} {
## configure ##
configure.env MYJAVAHOME=${javahome} \
"CFLAGS=-I${prefix}/include -I${javahome}/Headers" \
LDFLAGS=-L${prefix}/lib INCLUDEDIR=${javahome}/Headers

## build ##
build.env "CFLAGS=-I${prefix}/include -I${javahome}/Headers" \
LDFLAGS=-L${prefix}/lib
} else {
## configure ##
configure.env MYJAVAHOME=${javahome} \
CFLAGS="-I${prefix}/include -I${javahome}/Headers" \
Expand All @@ -33,6 +43,7 @@ configure.env MYJAVAHOME=${javahome} \
## build ##
build.env CFLAGS="-I${prefix}/include -I${javahome}/Headers" \
LDFLAGS=-L${prefix}/lib
}

post-destroot {
set jarfile tokyocabinet.jar
Expand Down
7 changes: 7 additions & 0 deletions devel/PIDA/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,18 @@ depends_lib port:py${python.version}-bpython \
port:py${python.version}-py \
port:libmagic \
port:dbus-python${python.version}
if {[vercmp [macports_version] 2.5.99] >= 0} {
build.env PKG_CONFIG_PATH=${python.prefix}/lib/pkgconfig \
PATH=${python.prefix}/bin:$env(PATH)

destroot.env PKG_CONFIG_PATH=${python.prefix}/lib/pkgconfig \
PATH=${python.prefix}/bin:$env(PATH)
} else {
build.env PKG_CONFIG_PATH="${python.prefix}/lib/pkgconfig" \
PATH="${python.prefix}/bin:$env(PATH)"

destroot.env PKG_CONFIG_PATH="${python.prefix}/lib/pkgconfig" \
PATH="${python.prefix}/bin:$env(PATH)"
}

livecheck.type none
10 changes: 9 additions & 1 deletion devel/afl/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,21 @@ checksums rmd160 b7c1174111cfc11d14a0982359ef903d5b8d1267 \
sha256 43614b4b91c014d39ef086c5cc84ff5f068010c264c2c05bf199df60898ce045

use_configure no

if {[vercmp [macports_version] 2.5.99] >= 0} {
build.env CC=${configure.cc} \
CXX=${configure.cxx} \
"CFLAGS=${configure.cflags} [get_canonical_archflags cc]" \
"CXXFLAGS=${configure.cxxflags} [get_canonical_archflags cxx]" \
"LDFLAGS=${configure.ldflags} [get_canonical_archflags ld]" \
PREFIX=${prefix}
} else {
build.env CC=${configure.cc} \
CXX="${configure.cxx}" \
CFLAGS="${configure.cflags} [get_canonical_archflags cc]" \
CXXFLAGS="${configure.cxxflags} [get_canonical_archflags cxx]" \
LDFLAGS="${configure.ldflags} [get_canonical_archflags ld]" \
PREFIX=${prefix}
}

destroot.env PREFIX=${prefix}

Expand Down
5 changes: 5 additions & 0 deletions devel/appstream-glib/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,13 @@ if {[variant_isset universal]} {
lappend merger_destroot_env(${arch}) CC='${configure.cc} -arch ${arch}'
}
} else {
if {[vercmp [macports_version] 2.5.99] >= 0} {
build.env-append "CC=${configure.cc} ${configure.cc_archflags}"
destroot.env-append "CC=${configure.cc} ${configure.cc_archflags}"
} else {
build.env-append CC="${configure.cc} ${configure.cc_archflags}"
destroot.env-append CC="${configure.cc} ${configure.cc_archflags}"
}
}

configure.args -Drpm=false
22 changes: 18 additions & 4 deletions devel/argon2/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,33 @@ checksums rmd160 0c92cfd56d82acf295465aeab29917bb8b92ab12 \
use_configure no

variant universal {}

if {[vercmp [macports_version] 2.5.99] >= 0} {
build.env-append CC=${configure.cc} \
"CFLAGS=${configure.cflags} [get_canonical_archflags cc]" \
"LDFLAGS=${configure.ldflags} [get_canonical_archflags ld]"
} else {
build.env-append CC=${configure.cc} \
CFLAGS='${configure.cflags} [get_canonical_archflags cc]' \
LDFLAGS='${configure.ldflags} [get_canonical_archflags ld]'

}
destroot.destdir PREFIX=${destroot}${prefix}
if {[vercmp [macports_version] 2.5.99] >= 0} {
destroot.env-append CC=${configure.cc} \
"CFLAGS=${configure.cflags} [get_canonical_archflags cc]" \
"LDFLAGS=${configure.ldflags} [get_canonical_archflags ld]"
} else {
destroot.env-append CC=${configure.cc} \
CFLAGS='${configure.cflags} [get_canonical_archflags cc]' \
LDFLAGS='${configure.ldflags} [get_canonical_archflags ld]'

}

test.run yes
if {[vercmp [macports_version] 2.5.99] >= 0} {
test.env-append CC=${configure.cc} \
"CFLAGS=${configure.cflags} [get_canonical_archflags cc]" \
"LDFLAGS=${configure.ldflags} [get_canonical_archflags ld]"
} else {
test.env-append CC=${configure.cc} \
CFLAGS='${configure.cflags} [get_canonical_archflags cc]' \
LDFLAGS='${configure.ldflags} [get_canonical_archflags ld]'

}
Loading

0 comments on commit a560834

Please sign in to comment.