imagemagick: fix md5sum footprint and pre-install and change to bzip2 archive
This commit is contained in:
parent
7d88d2d41b
commit
5a408c3482
@ -188,8 +188,6 @@ drwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/
|
||||
-rwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/dpx.so
|
||||
-rwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/ept.la
|
||||
-rwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/ept.so
|
||||
-rwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/exr.la
|
||||
-rwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/exr.so
|
||||
-rwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/fax.la
|
||||
-rwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/fax.so
|
||||
-rwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/fits.la
|
||||
@ -212,8 +210,6 @@ drwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/
|
||||
-rwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/inline.so
|
||||
-rwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/ipl.la
|
||||
-rwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/ipl.so
|
||||
-rwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/jp2.la
|
||||
-rwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/jp2.so
|
||||
-rwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/jpeg.la
|
||||
-rwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/jpeg.so
|
||||
-rwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/label.la
|
||||
@ -334,8 +330,6 @@ drwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/
|
||||
-rwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/viff.so
|
||||
-rwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/wbmp.la
|
||||
-rwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/wbmp.so
|
||||
-rwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/wmf.la
|
||||
-rwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/wmf.so
|
||||
-rwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/wpg.la
|
||||
-rwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/wpg.so
|
||||
-rwxr-xr-x root/root usr/lib/ImageMagick-6.4.8/modules-Q16/coders/x.la
|
||||
@ -409,6 +403,8 @@ drwxr-xr-x root/root usr/man/man1/
|
||||
-rw-r--r-- root/root usr/man/man1/mogrify.1.gz
|
||||
-rw-r--r-- root/root usr/man/man1/montage.1.gz
|
||||
-rw-r--r-- root/root usr/man/man1/stream.1.gz
|
||||
drwxr-xr-x root/root usr/man/man3/
|
||||
-r--r--r-- root/root usr/man/man3/Image::Magick.3pm.gz
|
||||
drwxr-xr-x root/root usr/share/
|
||||
drwxr-xr-x root/root usr/share/ImageMagick-6.4.8/
|
||||
drwxr-xr-x root/root usr/share/ImageMagick-6.4.8/config/
|
||||
@ -419,6 +415,3 @@ drwxr-xr-x root/root usr/share/ImageMagick-6.4.8/config/
|
||||
-rw-r--r-- root/root usr/share/ImageMagick-6.4.8/config/mime.xml
|
||||
-rw-r--r-- root/root usr/share/ImageMagick-6.4.8/config/sRGB.icm
|
||||
-rw-r--r-- root/root usr/share/ImageMagick-6.4.8/config/thresholds.xml
|
||||
drwxr-xr-x root/root usr/share/man/
|
||||
drwxr-xr-x root/root usr/share/man/man3/
|
||||
-r--r--r-- root/root usr/share/man/man3/Image::Magick.3pm.gz
|
||||
|
@ -1 +1 @@
|
||||
4981ce95be4e6f142415288feb9aebc6 ImageMagick-6.4.8-5.tar.lzma
|
||||
650d740251161187301e87362489f94a ImageMagick-6.4.8-5.tar.bz2
|
||||
|
@ -2,21 +2,15 @@
|
||||
# Description: Image manipulation wizard.
|
||||
# Maintainer: Danny Rawlins, romster at shortcircuit dot net dot au
|
||||
# Packager: danm, maol, jaeger
|
||||
# Depends on: lzma ghostscript jasper lcms librsvg libungif openexr libwmf
|
||||
# Depends on: ghostscript jasper lcms librsvg libungif openexr libwmf
|
||||
|
||||
name=imagemagick
|
||||
sname=ImageMagick
|
||||
version=6.4.8-5
|
||||
release=1
|
||||
source=(ftp://ftp.imagemagick.net/pub/$sname/$sname-$version.tar.lzma)
|
||||
source=(ftp://ftp.imagemagick.net/pub/$sname/$sname-$version.tar.bz2)
|
||||
|
||||
build() {
|
||||
# temp fix untill/if pkgutils supports lzma
|
||||
if [ -e $SRC/$sname-$version.tar.lzma ]; then
|
||||
tar --use-compress-program=lzma -xf $sname-$version.tar.lzma
|
||||
rm $sname-$version.tar.lzma
|
||||
fi
|
||||
|
||||
cd $sname-$version
|
||||
|
||||
./configure \
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
#
|
||||
# pre-install
|
||||
#
|
||||
@ -159,11 +159,20 @@ is_installed() {
|
||||
|
||||
PACKAGE="${1}"
|
||||
|
||||
if [ -n "$(pkginfo -i | egrep '^$PACKAGE ')" ]; then
|
||||
if [ -z "$(pkginfo -i | egrep "^$PACKAGE ")" ]; then
|
||||
print_error "'$PACKAGE' is not installed, can not do a incremental update."
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_portcheck() {
|
||||
is_installed 'xdelta'
|
||||
is_installed 'coreutils'
|
||||
is_installed 'tar'
|
||||
is_installed 'sed'
|
||||
is_installed 'curl'
|
||||
is_installed 'bc' #FIXME could make it optional
|
||||
}
|
||||
|
||||
check_file_exists() {
|
||||
local FILE="${1}"
|
||||
|
||||
@ -196,10 +205,6 @@ check_file_missing() {
|
||||
#fi
|
||||
}
|
||||
|
||||
pkg_init() {
|
||||
PKG_COUNT='1'
|
||||
}
|
||||
|
||||
array() {
|
||||
printf "${2}" | tr --delete '\n' | sed \
|
||||
-e 's|[\t| ]\+| |g' \
|
||||
@ -234,13 +239,6 @@ pkg_checks() {
|
||||
exit 0
|
||||
fi
|
||||
|
||||
is_installed 'xdelta'
|
||||
is_installed 'coreutils'
|
||||
is_installed 'tar'
|
||||
is_installed 'sed'
|
||||
is_installed 'curl'
|
||||
is_installed 'bc' #FIXME could make it optional
|
||||
|
||||
case ${OLD_FILE_EXT} in
|
||||
.tar.gz) is_installed 'gzip' ;;
|
||||
.tar.bz2) is_installed 'bzip2' ;;
|
||||
@ -293,6 +291,10 @@ pkg_make_list() {
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "${HAS_VERSION}" ]; then
|
||||
print_error 'HAS_VERSION still empty in pkg_make_list()'
|
||||
fi
|
||||
|
||||
log_debug "Has version: ${HAS_VERSION}"
|
||||
}
|
||||
|
||||
@ -346,8 +348,8 @@ pkg_parse_local_list() {
|
||||
done
|
||||
|
||||
if [ -z "${HAS_VERSION}" ]; then
|
||||
print_warn 'No useable source archive'
|
||||
exit 0
|
||||
print_info 'No useable local patch files, proceed to download list.'
|
||||
pkg_parse_remote_list
|
||||
fi
|
||||
|
||||
log_debug "Has version: ${HAS_VERSION}"
|
||||
@ -380,11 +382,11 @@ pkg_download_delta_list() {
|
||||
#printf "Patching source files.\n"
|
||||
print_info "Retrieving delta list from '$URL'."
|
||||
|
||||
log_debug "curl --fail --silent --retry 3 --connect-timeout 15 "${URL}" | \
|
||||
log_debug "curl --fail --silent --retry 3 --connect-timeout 20 "${URL}" | \
|
||||
grep '.xdelta' | grep "${NEW_FILE_NAME}" | sed -e 's|.*[HREF|href]=\"||' -e 's|\".*||' | \
|
||||
sort --reverse | xargs"
|
||||
|
||||
XDELTA_FILES="$(curl --fail --silent --retry 3 --connect-timeout 15 "$URL" | \
|
||||
XDELTA_FILES="$(curl --fail --silent --retry 3 --connect-timeout 20 "$URL" | \
|
||||
grep '.xdelta' | grep "${NEW_FILE_NAME}" | sed -e 's|.*[HREF|href]=\"||' \
|
||||
-e 's|\".*||' | sort --reverse | xargs)"
|
||||
|
||||
@ -395,23 +397,31 @@ sort --reverse | xargs"
|
||||
}
|
||||
|
||||
pkg_parse_remote_list() {
|
||||
local FILE SOURCE_VERSION SOURCE_VERSIONS LOCAL_PATCH_FILES GET_VERSION ADD_DIFF \
|
||||
PATCH_NEW_VERSION PATCH_OLD_VERSION PATCH_OLD_VERSIONS
|
||||
local FILE SOURCE_VERSION SOURCE_VERSIONS LOCAL_PATCH_FILES \
|
||||
GET_VERSION ADD_DIFF PATCH_NEW_VERSION PATCH_OLD_VERSION \
|
||||
PATCH_OLD_VERSIONS
|
||||
|
||||
GET_VERSION='yes'
|
||||
ADD_DIFF='yes'
|
||||
|
||||
pkg_download_delta_list # returns $XDELTA_FILES
|
||||
|
||||
SOURCE_VERSIONS="$(ls --sort=version --reverse ${PKGMK_SOURCE_DIR}/${OLD_FILE_NAME}${OLD_FILE_PREFIX}*${OLD_FILE_SUFFIX}${OLD_FILE_EXT} | \
|
||||
sed -e "s|.*/${OLD_FILE_NAME}${OLD_FILE_PREFIX}\(.*\)${OLD_FILE_SUFFIX}${OLD_FILE_EXT}|\1|" | \
|
||||
xargs)"
|
||||
|
||||
# print source archive version list, newist to oldist sorted.
|
||||
log_debug "Local version list: ${SOURCE_VERSIONS}"
|
||||
|
||||
# print patch version list, oldist to newist sorted.
|
||||
if [ "${LOG_DEBUG}" = 'yes' ]; then
|
||||
for FILE in $XDELTA_FILES; do
|
||||
PATCH_OLD_VERSIONS="$(printf ${FILE} | \
|
||||
PATCH_OLD_VERSION="$(printf "${FILE}" | \
|
||||
sed -e "s|^${OLD_FILE_NAME}${OLD_FILE_PREFIX}\(.*\)${OLD_FILE_SUFFIX}.tar-${NEW_FILE_NAME}${NEW_FILE_PREFIX}.*|\1|")"
|
||||
PATCH_OLD_VERSIONS="${PATCH_OLD_VERSION} ${PATCH_OLD_VERSIONS}"
|
||||
done
|
||||
log_debug "Remote version list: ${PATCH_OLD_VERSIONS}"
|
||||
unset PATCH_OLD_VERSIONS
|
||||
unset PATCH_OLD_VERSION PATCH_OLD_VERSIONS
|
||||
fi
|
||||
|
||||
# find most recent source archive to use
|
||||
@ -434,31 +444,10 @@ pkg_parse_remote_list() {
|
||||
print_info 'No source archive matches any delta version, proceed to download source archive(s).'
|
||||
fi
|
||||
|
||||
# this check is not right
|
||||
# if [ "${PATCH_OLD_VERSION}" = "${HAS_VERSION}" ]; then
|
||||
# print_error "Did not find version '${HAS_VERSION}' patch to use."
|
||||
# fi
|
||||
|
||||
pkg_make_list
|
||||
pkg_download_diff
|
||||
pkg_parse_local_list # reparse list again
|
||||
|
||||
# find most recent source archive to use
|
||||
# for SOURCE_VERSION in $SOURCE_VERSIONS; do
|
||||
# for FILE in $XDELTA_FILES; do
|
||||
|
||||
# PATCH_OLD_VERSION="$(printf "${FILE}" | \
|
||||
# sed -e "s|^${OLD_FILE_NAME}${OLD_FILE_PREFIX}\(.*\)${OLD_FILE_SUFFIX}.tar-${NEW_FILE_NAME}${NEW_FILE_PREFIX}.*|\1|")"
|
||||
|
||||
# if [ "${GET_VERSION}" = 'yes' ]; then
|
||||
# if [ "${SOURCE_VERSION}" = "${PATCH_OLD_VERSION}" ]; then
|
||||
# HAS_VERSION="${SOURCE_VERSION}"
|
||||
# GET_VERSION='no'
|
||||
# fi
|
||||
# fi
|
||||
# done
|
||||
# done
|
||||
|
||||
log_debug "Using local archive '${PKGMK_SOURCE_DIR}/${OLD_FILE_NAME}${OLD_FILE_PREFIX}${HAS_VERSION}${OLD_FILE_SUFFIX}${OLD_FILE_EXT}'."
|
||||
log_debug "Using local version '${HAS_VERSION}'."
|
||||
}
|
||||
@ -598,16 +587,29 @@ pkg_save_new_source() {
|
||||
rmdir "$PKGMK_WORK_DIR"
|
||||
fi
|
||||
|
||||
pkgmk -um
|
||||
|
||||
# prevent a loop
|
||||
exit 0
|
||||
|
||||
#print_info 'Done'
|
||||
}
|
||||
|
||||
main() {
|
||||
pkg_portcheck
|
||||
|
||||
for FILE in ${source[@]}; do
|
||||
if [ -n "$(printf "${FILE}" | egrep '^.*://.*')" ]; then # don't try to patch local files
|
||||
#if [ -z "$(get_basename "${FILE}" | egrep '*.patch$')" ]; then
|
||||
explode_filename_new "${NEW_FILE_NAME}" "${NEW_FILE_VERSION}" "$(get_basename "${FILE}")"
|
||||
explode_filename_old "${OLD_FILE_NAME}" "${NEW_FILE_VERSION}" "$(get_basename "${FILE}")" #FIXME is set to new
|
||||
pkg_init
|
||||
|
||||
# don't try to patch local files
|
||||
if [ -n "$(printf "${FILE}" | egrep '^.*://.*')" ]; then
|
||||
|
||||
explode_filename_new "${NEW_FILE_NAME}" "${NEW_FILE_VERSION}" \
|
||||
"$(get_basename "${FILE}")"
|
||||
|
||||
explode_filename_old "${OLD_FILE_NAME}" "${NEW_FILE_VERSION}" \
|
||||
"$(get_basename "${FILE}")" #FIXME is set to new
|
||||
|
||||
PKG_COUNT='1'
|
||||
pkg_checks
|
||||
pkg_work_dir
|
||||
pkg_parse_local_list
|
||||
|
Loading…
Reference in New Issue
Block a user