Commit 60392a80 authored by Rye Mutt's avatar Rye Mutt 🍞
Browse files

Add linux build to script and package proper files

parent b044e280
......@@ -81,7 +81,12 @@
</map>
<key>manifest</key>
<array>
<string>lib/*</string>
<string>lib/debug/*.so*</string>
<string>lib/debug/*.a</string>
<string>lib/debug/pkgconfig/*</string>
<string>lib/release/*.so*</string>
<string>lib/release/*.a</string>
<string>lib/release/pkgconfig/*</string>
</array>
<key>name</key>
<string>linux</string>
......@@ -100,7 +105,8 @@
</map>
<key>manifest</key>
<array>
<string>lib/*</string>
<string>lib/debug/*</string>
<string>lib/release/*</string>
</array>
<key>name</key>
<string>windows</string>
......
......@@ -63,20 +63,88 @@ pushd "$LIBWEBP_SOURCE_DIR"
cp -a output/debug-static/$outarchdir/lib/*.pdb $stage/lib/debug/
cp -a output/release-static/$outarchdir/lib/*.lib $stage/lib/release/
cp -a src/webp/decode.h $stage/include/webp/
cp -a src/webp/encode.h $stage/include/webp/
cp -a src/webp/types.h $stage/include/webp/
;;
darwin*)
;;
linux*)
# Linux build environment at Linden comes pre-polluted with stuff that can
# seriously damage 3rd-party builds. Environmental garbage you can expect
# includes:
#
# DISTCC_POTENTIAL_HOSTS arch root CXXFLAGS
# DISTCC_LOCATION top branch CC
# DISTCC_HOSTS build_name suffix CXX
# LSDISTCC_ARGS repo prefix CFLAGS
# cxx_version AUTOBUILD SIGN CPPFLAGS
#
# So, clear out bits that shouldn't affect our configure-directed build
# but which do nonetheless.
#
# unset DISTCC_HOSTS CC CXX CFLAGS CPPFLAGS CXXFLAGS
# Default target per --address-size
opts="${TARGET_OPTS:--m$AUTOBUILD_ADDRSIZE}"
# Setup build flags
DEBUG_COMMON_FLAGS="$opts -Og -g -fPIC -DPIC"
RELEASE_COMMON_FLAGS="$opts -O3 -g -fPIC -DPIC -fstack-protector-strong -D_FORTIFY_SOURCE=2"
DEBUG_CFLAGS="$DEBUG_COMMON_FLAGS"
RELEASE_CFLAGS="$RELEASE_COMMON_FLAGS"
DEBUG_CXXFLAGS="$DEBUG_COMMON_FLAGS -std=c++17"
RELEASE_CXXFLAGS="$RELEASE_COMMON_FLAGS -std=c++17"
DEBUG_CPPFLAGS="-DPIC"
RELEASE_CPPFLAGS="-DPIC"
JOBS=`cat /proc/cpuinfo | grep processor | wc -l`
# Handle any deliberate platform targeting
if [ -z "${TARGET_CPPFLAGS:-}" ]; then
# Remove sysroot contamination from build environment
unset CPPFLAGS
else
# Incorporate special pre-processing flags
export CPPFLAGS="$TARGET_CPPFLAGS"
fi
# force regenerate autoconf
autoreconf -fvi
# debug configure and build
CFLAGS="$DEBUG_CFLAGS" CXXFLAGS="$DEBUG_CXXFLAGS" ./configure --enable-lib-only \
--prefix="\${AUTOBUILD_PACKAGES_DIR}" --includedir="\${prefix}/include" --libdir="\${prefix}/lib/debug"
make -j$JOBS
make check
make install DESTDIR="$stage"
# conditionally run unit tests
if [ "${DISABLE_UNIT_TESTS:-0}" = "0" ]; then
make check
fi
make distclean
# Release configure and build
CFLAGS="$RELEASE_CFLAGS" CXXFLAGS="$RELEASE_CXXFLAGS" ./configure --enable-lib-only \
--prefix="\${AUTOBUILD_PACKAGES_DIR}" --includedir="\${prefix}/include" --libdir="\${prefix}/lib/release"
make -j$JOBS
make check
make install DESTDIR="$stage"
# conditionally run unit tests
if [ "${DISABLE_UNIT_TESTS:-0}" = "0" ]; then
make check
fi
make distclean
;;
esac
cp -a src/webp/decode.h $stage/include/webp/
cp -a src/webp/encode.h $stage/include/webp/
cp -a src/webp/types.h $stage/include/webp/
mkdir -p "$stage/LICENSES"
cp COPYING "$stage/LICENSES/libwebp.txt"
popd
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment