Skip to content
Permalink
main
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 78 lines (56 sloc) 1.39 KB
#!/bin/bash
{
set -x
set -e
set -u
. build.profile
. ${PREFIX}/${BUILD_libjpegturbo}/profile
. ${PREFIX}/${BUILD_ffmpeg}/profile
. ${PREFIX}/${BUILD_libtiff}/profile
. ${PREFIX}/${BUILD_libwebp}/profile
function B_IMAGEMAGICK {
SRCURL="${BUILD_imagemagick_SRCURL}"
BUILD_PKG="${BUILD_imagemagick}"
PREFIX=${PREFIX}/${BUILD_PKG}
if [[ -e "${BUILD_PKG}".tar ]]; then
tar -xf "${BUILD_PKG}".tar
fi
if [[ ! -d ${BUILD_PKG} ]]; then
git clone "${SRCURL}" --branch ${BUILD_PKG##imagemagick-} --single-branch "${BUILD_PKG}"
fi
# check version
pushd "${BUILD_PKG}"
GITVER=imagemagick-$(git describe --tags)
popd
if [ "${GITVER}" != "${BUILD_PKG}" ]; then
echo "newer version than ${BUILD_PKG} found. please update to ${GITVER}"
exit 1
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
)
local _conf=(
--prefix "${PREFIX}"
--disable-docs
--without-x
)
LDFLAGS=" $(PKG_CONFIG_PATH=${PKG_CONFIG_PATH} pkg-config --libs libjpeg)" \
PKG_CONFIG_PATH=${PKG_CONFIG_PATH:-} ./configure "${_conf[@]}"
make install
popd
}
pushd "${BUILD_DIR}"
B_IMAGEMAGICK
popd
}