From 01fd8a36549b98d99475714b01c409bf16e80761 Mon Sep 17 00:00:00 2001 From: historic_bruno Date: Wed, 17 Jul 2019 14:20:40 +0000 Subject: [PATCH] Cleans up build-osx-libs.sh whitespace. Fixes #5486. For consistency, long argument lists have been broken into multiple lines after the first argument, with suitable indentation. This was SVN commit r22492. --- libraries/osx/build-osx-libs.sh | 255 +++++++++++++++++++++++++++++--- 1 file changed, 231 insertions(+), 24 deletions(-) diff --git a/libraries/osx/build-osx-libs.sh b/libraries/osx/build-osx-libs.sh index 9375c8d56a..5c92bdff18 100755 --- a/libraries/osx/build-osx-libs.sh +++ b/libraries/osx/build-osx-libs.sh @@ -170,7 +170,11 @@ then pushd $LIB_DIRECTORY # patch zlib's configure script to use our CFLAGS and LDFLAGS - (patch -Np0 -i ../../patches/zlib_flags.diff && CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" ./configure --prefix="$ZLIB_DIR" --static && make ${JOBS} && make install) || die "zlib build failed" + (patch -Np0 -i ../../patches/zlib_flags.diff \ + && CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \ + ./configure --prefix="$ZLIB_DIR" \ + --static \ + && make ${JOBS} && make install) || die "zlib build failed" popd touch .already-built else @@ -200,7 +204,34 @@ then tar -xf $LIB_ARCHIVE pushd $LIB_DIRECTORY - (./configure CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" --prefix="$INSTALL_DIR" --enable-ipv6 --with-darwinssl --without-gssapi --without-libmetalink --without-libpsl --without-librtmp --without-libssh2 --without-nghttp2 --without-nss --without-polarssl --without-ssl --without-gnutls --without-brotli --without-cyassl --without-winssl --without-mbedtls --without-wolfssl --without-spnego --disable-ares --disable-ldap --disable-ldaps --without-libidn2 --with-zlib="${ZLIB_DIR}" --enable-shared=no && make ${JOBS} && make install) || die "libcurl build failed" + (./configure CFLAGS="$CFLAGS" \ + LDFLAGS="$LDFLAGS" \ + --prefix="$INSTALL_DIR" \ + --enable-ipv6 \ + --with-darwinssl \ + --without-gssapi \ + --without-libmetalink \ + --without-libpsl \ + --without-librtmp \ + --without-libssh2 \ + --without-nghttp2 \ + --without-nss \ + --without-polarssl \ + --without-ssl \ + --without-gnutls \ + --without-brotli \ + --without-cyassl \ + --without-winssl \ + --without-mbedtls \ + --without-wolfssl \ + --without-spnego \ + --disable-ares \ + --disable-ldap \ + --disable-ldaps \ + --without-libidn2 \ + --with-zlib="${ZLIB_DIR}" \ + --enable-shared=no \ + && make ${JOBS} && make install) || die "libcurl build failed" popd touch .already-built else @@ -230,7 +261,14 @@ then tar -xf $LIB_ARCHIVE pushd $LIB_DIRECTORY - (./configure CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" --prefix="$ICONV_DIR" --without-libiconv-prefix --without-libintl-prefix --disable-nls --enable-shared=no && make ${JOBS} && make install) || die "libiconv build failed" + (./configure CFLAGS="$CFLAGS" \ + LDFLAGS="$LDFLAGS" \ + --prefix="$ICONV_DIR" \ + --without-libiconv-prefix \ + --without-libintl-prefix \ + --disable-nls \ + --enable-shared=no \ + && make ${JOBS} && make install) || die "libiconv build failed" popd touch .already-built else @@ -260,7 +298,15 @@ then tar -xf $LIB_ARCHIVE pushd $LIB_DIRECTORY - (./configure CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" --prefix="$INSTALL_DIR" --without-lzma --without-python --with-iconv="${ICONV_DIR}" --with-zlib="${ZLIB_DIR}" --enable-shared=no && make ${JOBS} && make install) || die "libxml2 build failed" + (./configure CFLAGS="$CFLAGS" \ + LDFLAGS="$LDFLAGS" \ + --prefix="$INSTALL_DIR" \ + --without-lzma \ + --without-python \ + --with-iconv="${ICONV_DIR}" \ + --with-zlib="${ZLIB_DIR}" \ + --enable-shared=no \ + && make ${JOBS} && make install) || die "libxml2 build failed" popd touch .already-built else @@ -293,7 +339,15 @@ then # We don't want SDL2 to pull in system iconv, force it to detect ours with flags. # Don't use X11 - we don't need it and Mountain Lion removed it - (./configure CPPFLAGS="-I${ICONV_DIR}/include" CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS -L${ICONV_DIR}/lib" --prefix="$INSTALL_DIR" --disable-video-x11 --without-x --enable-shared=no && make $JOBS && make install) || die "SDL2 build failed" + (./configure CPPFLAGS="-I${ICONV_DIR}/include" \ + CFLAGS="$CFLAGS" \ + CXXFLAGS="$CXXFLAGS" \ + LDFLAGS="$LDFLAGS -L${ICONV_DIR}/lib" \ + --prefix="$INSTALL_DIR" \ + --disable-video-x11 \ + --without-x \ + --enable-shared=no \ + && make $JOBS && make install) || die "SDL2 build failed" popd touch .already-built else @@ -324,7 +378,19 @@ then pushd $LIB_DIRECTORY # Can't use macosx-version, see above comment. -(./bootstrap.sh --with-libraries=filesystem,system --prefix=$INSTALL_DIR && ./b2 cflags="$CFLAGS" toolset=clang cxxflags="$CXXFLAGS" linkflags="$LDFLAGS" ${JOBS} -d2 --layout=tagged --debug-configuration link=static threading=multi variant=release,debug install) || die "Boost build failed" + (./bootstrap.sh --with-libraries=filesystem,system \ + --prefix=$INSTALL_DIR \ + && ./b2 cflags="$CFLAGS" \ + toolset=clang \ + cxxflags="$CXXFLAGS" \ + linkflags="$LDFLAGS" ${JOBS} \ + -d2 \ + --layout=tagged \ + --debug-configuration \ + link=static \ + threading=multi \ + variant=release,debug install \ + ) || die "Boost build failed" popd touch .already-built @@ -359,13 +425,33 @@ then mkdir -p build-release pushd build-release - CONF_OPTS="--prefix=$INSTALL_DIR --disable-shared --enable-macosx_arch=$ARCH --enable-unicode --with-cocoa --with-opengl --with-libiconv-prefix=${ICONV_DIR} --with-expat=builtin --with-libpng=builtin --without-libtiff --without-sdl --without-x --disable-webview --disable-webkit --disable-webviewwebkit --disable-webviewie --without-libjpeg" + CONF_OPTS="--prefix=$INSTALL_DIR + --disable-shared + --enable-macosx_arch=$ARCH + --enable-unicode + --with-cocoa + --with-opengl + --with-libiconv-prefix=${ICONV_DIR} + --with-expat=builtin + --with-libpng=builtin + --without-libtiff + --without-sdl + --without-x + --disable-webview + --disable-webkit + --disable-webviewwebkit + --disable-webviewie + --without-libjpeg" # wxWidgets configure now defaults to targeting 10.5, if not specified, # but that conflicts with our flags if [[ $MIN_OSX_VERSION && ${MIN_OSX_VERSION-_} ]]; then CONF_OPTS="$CONF_OPTS --with-macosx-version-min=$MIN_OSX_VERSION" fi - (../configure CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" CPPFLAGS="-stdlib=libc++ -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=1" LDFLAGS="$LDFLAGS" $CONF_OPTS && make ${JOBS} && make install) || die "wxWidgets build failed" + (../configure CFLAGS="$CFLAGS" \ + CXXFLAGS="$CXXFLAGS" \ + CPPFLAGS="-stdlib=libc++ -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=1" \ + LDFLAGS="$LDFLAGS" $CONF_OPTS \ + && make ${JOBS} && make install) || die "wxWidgets build failed" popd popd touch .already-built @@ -396,7 +482,11 @@ then tar -xf $LIB_ARCHIVE pushd $LIB_DIRECTORY - (./configure CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" --prefix=$INSTALL_DIR --enable-shared=no && make ${JOBS} && make install) || die "libpng build failed" + (./configure CFLAGS="$CFLAGS" \ + LDFLAGS="$LDFLAGS" \ + --prefix=$INSTALL_DIR \ + --enable-shared=no \ + && make ${JOBS} && make install) || die "libpng build failed" popd touch .already-built else @@ -429,7 +519,11 @@ then tar -xf $LIB_ARCHIVE pushd $LIB_DIRECTORY - (./configure CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" --prefix=$OGG_DIR --enable-shared=no && make ${JOBS} && make install) || die "libogg build failed" + (./configure CFLAGS="$CFLAGS" \ + LDFLAGS="$LDFLAGS" \ + --prefix=$OGG_DIR \ + --enable-shared=no \ + && make ${JOBS} && make install) || die "libogg build failed" popd touch .already-built else @@ -458,7 +552,12 @@ then tar -xf $LIB_ARCHIVE pushd $LIB_DIRECTORY - (./configure CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" --prefix="$INSTALL_DIR" --enable-shared=no --with-ogg="$OGG_DIR" && make ${JOBS} && make install) || die "libvorbis build failed" + (./configure CFLAGS="$CFLAGS" \ + LDFLAGS="$LDFLAGS" \ + --prefix="$INSTALL_DIR" \ + --enable-shared=no \ + --with-ogg="$OGG_DIR" \ + && make ${JOBS} && make install) || die "libvorbis build failed" popd touch .already-built else @@ -492,7 +591,14 @@ then # NOTE: enable-fat in this case allows building and running on different CPUS. # Otherwise CPU-specific instructions will be used with no fallback for older CPUs. - (./configure CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" --prefix="$INSTALL_DIR" --enable-fat --disable-shared --with-pic && make ${JOBS} && make install) || die "GMP build failed" + (./configure CFLAGS="$CFLAGS" \ + CXXFLAGS="$CXXFLAGS" \ + LDFLAGS="$LDFLAGS" \ + --prefix="$INSTALL_DIR" \ + --enable-fat \ + --disable-shared \ + --with-pic \ + && make ${JOBS} && make install) || die "GMP build failed" popd touch .already-built else @@ -526,7 +632,18 @@ then # NOTE: enable-fat in this case allows building and running on different CPUS. # Otherwise CPU-specific instructions will be used with no fallback for older CPUs. - (./configure CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" --with-include-path="${GMP_DIR}/include" --with-lib-path="${GMP_DIR}/lib" --prefix="$INSTALL_DIR" --enable-fat --disable-shared --disable-documentation --disable-openssl --disable-assembler && make ${JOBS} && make install) || die "Nettle build failed" + (./configure CFLAGS="$CFLAGS" \ + CXXFLAGS="$CXXFLAGS" \ + LDFLAGS="$LDFLAGS" \ + --with-include-path="${GMP_DIR}/include" \ + --with-lib-path="${GMP_DIR}/lib" \ + --prefix="$INSTALL_DIR" \ + --enable-fat \ + --disable-shared \ + --disable-documentation \ + --disable-openssl \ + --disable-assembler \ + && make ${JOBS} && make install) || die "Nettle build failed" popd touch .already-built else @@ -561,7 +678,25 @@ then # GnuTLS 3.6.8 added the TCP Fast Open feature, which requires connectx # but that's only available on OS X 10.11+ (GnuTLS doesn't support SDK based builds yet) # So we disable that functionality - (patch -Np0 -i ../../patches/gnutls-disable-tcpfastopen.diff && ./configure CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" LIBS="-L${GMP_DIR}/lib -lgmp" NETTLE_CFLAGS="-I${NETTLE_DIR}/include" NETTLE_LIBS="-L${NETTLE_DIR}/lib -lnettle" HOGWEED_CFLAGS="-I${NETTLE_DIR}/include" HOGWEED_LIBS="-L${NETTLE_DIR}/lib -lhogweed" GMP_CFLAGS="-I${GMP_DIR}/include" GMP_LIBS="-L${GMP_DIR}/lib -lgmp" --prefix="$INSTALL_DIR" --enable-shared=no --without-idn --with-included-unistring --with-included-libtasn1 --without-p11-kit --disable-tests && make ${JOBS} && make install) || die "GnuTLS build failed" + (patch -Np0 -i ../../patches/gnutls-disable-tcpfastopen.diff \ + && ./configure CFLAGS="$CFLAGS" \ + CXXFLAGS="$CXXFLAGS" \ + LDFLAGS="$LDFLAGS" \ + LIBS="-L${GMP_DIR}/lib -lgmp" \ + NETTLE_CFLAGS="-I${NETTLE_DIR}/include" \ + NETTLE_LIBS="-L${NETTLE_DIR}/lib -lnettle" \ + HOGWEED_CFLAGS="-I${NETTLE_DIR}/include" \ + HOGWEED_LIBS="-L${NETTLE_DIR}/lib -lhogweed" \ + GMP_CFLAGS="-I${GMP_DIR}/include" \ + GMP_LIBS="-L${GMP_DIR}/lib -lgmp" \ + --prefix="$INSTALL_DIR" \ + --enable-shared=no \ + --without-idn \ + --with-included-unistring \ + --with-included-libtasn1 \ + --without-p11-kit \ + --disable-tests \ + && make ${JOBS} && make install) || die "GnuTLS build failed" popd touch .already-built else @@ -592,7 +727,21 @@ then pushd $LIB_DIRECTORY # TODO: pulls in libresolv dependency from /usr/lib - (./configure CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" --prefix="$INSTALL_DIR" GNUTLS_CFLAGS="-I${GNUTLS_DIR}/include" GNUTLS_LIBS="-L${GNUTLS_DIR}/lib -lgnutls" --enable-shared=no --with-zlib="${ZLIB_DIR}" --without-libidn --with-gnutls="yes" --without-openssl --without-tests --without-examples --disable-getaddrinfo && make ${JOBS} && make install) || die "gloox build failed" + (./configure CFLAGS="$CFLAGS" \ + CXXFLAGS="$CXXFLAGS" \ + LDFLAGS="$LDFLAGS" \ + --prefix="$INSTALL_DIR" \ + GNUTLS_CFLAGS="-I${GNUTLS_DIR}/include" \ + GNUTLS_LIBS="-L${GNUTLS_DIR}/lib -lgnutls" \ + --enable-shared=no \ + --with-zlib="${ZLIB_DIR}" \ + --without-libidn \ + --with-gnutls="yes" \ + --without-openssl \ + --without-tests \ + --without-examples \ + --disable-getaddrinfo \ + && make ${JOBS} && make install) || die "gloox build failed" popd touch .already-built else @@ -622,7 +771,10 @@ then tar -xf $LIB_ARCHIVE pushd $LIB_DIRECTORY/nspr - (CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" ./configure --prefix="$NSPR_DIR" --enable-64bit && make ${JOBS} && make install) || die "NSPR build failed" + (CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" \ + ./configure --prefix="$NSPR_DIR" \ + --enable-64bit \ + && make ${JOBS} && make install) || die "NSPR build failed" popd # TODO: how can we not build the dylibs? rm -f lib/*.dylib @@ -657,7 +809,16 @@ then mkdir -p source/build pushd source/build -(CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" ../runConfigureICU MacOSX --prefix=$INSTALL_DIR --disable-shared --enable-static --disable-samples --enable-extras --enable-icuio --enable-tools && make ${JOBS} && make install) || die "ICU build failed" + (CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" \ + ../runConfigureICU MacOSX \ + --prefix=$INSTALL_DIR \ + --disable-shared \ + --enable-static \ + --disable-samples \ + --enable-extras \ + --enable-icuio \ + --enable-tools \ + && make ${JOBS} && make install) || die "ICU build failed" popd popd touch .already-built @@ -688,7 +849,11 @@ then tar -xf $LIB_ARCHIVE pushd $LIB_DIRECTORY - (./configure CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" --prefix=${INSTALL_DIR} --enable-shared=no && make clean && make ${JOBS} && make install) || die "ENet build failed" + (./configure CFLAGS="$CFLAGS" \ + LDFLAGS="$LDFLAGS" \ + --prefix=${INSTALL_DIR} \ + --enable-shared=no \ + && make clean && make ${JOBS} && make install) || die "ENet build failed" popd touch .already-built else @@ -718,7 +883,10 @@ then tar -xf $LIB_ARCHIVE pushd $LIB_DIRECTORY - (make clean && CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS make ${JOBS} && INSTALLPREFIX="$INSTALL_DIR" make install) || die "MiniUPnPc build failed" + (make clean \ + && CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS make ${JOBS} \ + && INSTALLPREFIX="$INSTALL_DIR" make install \ + ) || die "MiniUPnPc build failed" popd # TODO: how can we not build the dylibs? rm -f lib/*.dylib @@ -750,7 +918,15 @@ then tar -xf $LIB_ARCHIVE pushd $LIB_DIRECTORY - (./configure CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" --prefix=${INSTALL_DIR} --enable-shared=no && make clean && CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS make ${JOBS} && make check && INSTALLPREFIX="$INSTALL_DIR" make install) || die "libsodium build failed" + (./configure CFLAGS="$CFLAGS" \ + LDFLAGS="$LDFLAGS" \ + --prefix=${INSTALL_DIR} \ + --enable-shared=no \ + && make clean \ + && CFLAGS=$CFLAGS LDFLAGS=$LDFLAGS make ${JOBS} \ + && make check \ + && INSTALLPREFIX="$INSTALL_DIR" make install \ + ) || die "libsodium build failed" popd touch .already-built else @@ -789,7 +965,13 @@ then # We want separate debug/release versions of the library, so change their install name in the Makefile perl -i.bak -pe 's/(^STATIC_LIBRARY_NAME\s+=).*/$1'\''mozjs38-ps-debug'\''/' moz.build - CONF_OPTS="--target=$ARCH-apple-darwin --prefix=${INSTALL_DIR} --with-system-nspr --with-nspr-prefix=${NSPR_DIR} --with-system-zlib=${ZLIB_DIR} --disable-tests --disable-shared-js" + CONF_OPTS="--target=$ARCH-apple-darwin + --prefix=${INSTALL_DIR} + --with-system-nspr + --with-nspr-prefix=${NSPR_DIR} + --with-system-zlib=${ZLIB_DIR} + --disable-tests + --disable-shared-js" # Change the default location where the tracelogger should store its output, which is /tmp/ on OSX. TLCXXFLAGS='-DTRACE_LOG_DIR="\"../../source/tools/tracelogger/\""' # Uncomment this line for 32-bit 10.5 cross compile: @@ -803,7 +985,13 @@ then mkdir -p build-debug pushd build-debug - (CC="clang" CXX="clang++" CXXFLAGS="${TLCXXFLAGS}" AR=ar CROSS_COMPILE=1 ../configure $CONF_OPTS --enable-debug --disable-optimize --enable-js-diagnostics --enable-gczeal && make ${JOBS}) || die "Spidermonkey build failed" + (CC="clang" CXX="clang++" CXXFLAGS="${TLCXXFLAGS}" AR=ar CROSS_COMPILE=1 \ + ../configure $CONF_OPTS \ + --enable-debug \ + --disable-optimize \ + --enable-js-diagnostics \ + --enable-gczeal \ + && make ${JOBS}) || die "Spidermonkey build failed" # js-config.h is different for debug and release builds, so we need different include directories for both mkdir -p $INCLUDE_DIR_DEBUG cp -R -L dist/include/* $INCLUDE_DIR_DEBUG/ @@ -814,7 +1002,10 @@ then perl -i.bak -pe 's/(^STATIC_LIBRARY_NAME\s+=).*/$1'\''mozjs38-ps-release'\''/' moz.build mkdir -p build-release pushd build-release - (CC="clang" CXX="clang++" CXXFLAGS="${TLCXXFLAGS}" AR=ar CROSS_COMPILE=1 ../configure $CONF_OPTS --enable-optimize && make ${JOBS}) || die "Spidermonkey build failed" + (CC="clang" CXX="clang++" CXXFLAGS="${TLCXXFLAGS}" AR=ar CROSS_COMPILE=1 \ + ../configure $CONF_OPTS \ + --enable-optimize \ + && make ${JOBS}) || die "Spidermonkey build failed" # js-config.h is different for debug and release builds, so we need different include directories for both mkdir -p $INCLUDE_DIR_RELEASE cp -R -L dist/include/* $INCLUDE_DIR_RELEASE/ @@ -848,7 +1039,23 @@ then # Could use CMAKE_OSX_DEPLOYMENT_TARGET and CMAKE_OSX_SYSROOT # but they're not as flexible for cross-compiling # Disable optional libs that we don't need (avoids some conflicts with MacPorts) - (cmake .. -DCMAKE_LINK_FLAGS="$LDFLAGS" -DCMAKE_C_FLAGS="$CFLAGS" -DCMAKE_CXX_FLAGS="$CXXFLAGS" -DCMAKE_BUILD_TYPE=Release -DBINDIR=bin -DLIBDIR=lib -DGLUT=0 -DGLEW=0 -DCG=0 -DCUDA=0 -DOPENEXR=0 -DJPEG=0 -DPNG=0 -DTIFF=0 -G "Unix Makefiles" && make clean && make nvtt ${JOBS}) || die "NVTT build failed" + (cmake .. \ + -DCMAKE_LINK_FLAGS="$LDFLAGS" \ + -DCMAKE_C_FLAGS="$CFLAGS" \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ + -DCMAKE_BUILD_TYPE=Release \ + -DBINDIR=bin \ + -DLIBDIR=lib \ + -DGLUT=0 \ + -DGLEW=0 \ + -DCG=0 \ + -DCUDA=0 \ + -DOPENEXR=0 \ + -DJPEG=0 \ + -DPNG=0 \ + -DTIFF=0 \ + -G "Unix Makefiles" \ + && make clean && make nvtt ${JOBS}) || die "NVTT build failed" popd mkdir -p ../lib