Skip to content
Permalink
836913c051
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 94 lines (69 sloc) 1.64 KB
#!/bin/bash
{
set -x
set -e
set -u
# https://www.libvips.org/install.html
. build.profile
. ${PREFIX}/${BUILD_python}/profile
. ${PREFIX}/${BUILD_openjpeg}/profile
. ${PREFIX}/${BUILD_libwebp}/profile
function B_LIBVIPS {
SRCURL="${BUILD_libvips_SRCURL}"
BUILD_PKG="${BUILD_libvips}"
PREFIX=${PREFIX}/${BUILD_PKG}
if [[ -e "${BUILD_PKG}".tar ]]; then
tar -xf "${BUILD_PKG}".tar
fi
if [[ ! -d ${BUILD_PKG} ]]; then
git clone "${SRCURL}" --single-branch "${BUILD_PKG}"
# check version
pushd "${BUILD_PKG}"
GITVER=$(git describe --tags)
if [ "${GITVER}" != "${BUILD_PKG#*-}" ]; then
echo "${BUILD_PKG#*-} should be updated to ${GITVER} update!"
read
git checkout ${BUILD_PKG#*-}
fi
popd
fi
if [[ ! -e ${BUILD_PKG}.tar ]]; then
tar cf "${BUILD_PKG}".tar "${BUILD_PKG}"
fi
mkdir -pv "${PREFIX}"
cat >"${PREFIX}"/profile <<-EOF
PATH=${PREFIX}/bin:\$PATH
PKG_CONFIG_PATH=${PROJECT}/${BUILD_PKG}/lib/pkgconfig\${PKG_CONFIG_PATH:+:}\${PKG_CONFIG_PATH:-}
EOF
pushd "${BUILD_PKG}"
local _cflags=(
-march=native
-Wno-discarded-qualifiers
-Wno-maybe-uninitialized
)
# heifsave
# ./build/libvips-v8.15.3-223-gb6428d89f/meson.build
# ./build/libvips-v8.15.3-223-gb6428d89f/meson_options.txt
local _conf=(
--prefix "${PREFIX}"
--buildtype=release
--backend=ninja
--pkg-config-path="${PKG_CONFIG_PATH}"
-Dintrospection=disabled
-Dexamples=false
-Ddeprecated=true
)
rm -rf builddir
# meson setup --wipe builddir
CFLAGS="${_cflags[*]}" meson setup "${_conf[@]}" builddir
pushd builddir
meson compile
meson test
meson install
popd
popd
}
pushd "${BUILD_DIR}"
B_LIBVIPS
popd
}