Merge pull request #9789 from wangp/gtk-immodules

xbps-triggers: conform to new gtk-immodules cache locations.
This commit is contained in:
Toyam Cox 2017-12-06 01:59:39 -05:00 committed by GitHub
commit bd30e8e4ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 13 deletions

View File

@ -17,7 +17,7 @@ UPDATE="$5"
export PATH="$PATH:/usr/local/bin" export PATH="$PATH:/usr/local/bin"
immodules_bin=usr/bin/gtk-query-immodules-2.0 immodules_bin=usr/bin/gtk-query-immodules-2.0
immodules_db=etc/gtk-2.0/gtk.immodules immodules_cache=usr/lib/gtk-2.0/2.10.0/immodules.cache
case "$ACTION" in case "$ACTION" in
targets) targets)
@ -25,17 +25,18 @@ targets)
;; ;;
run) run)
if [ "$TARGET" = "post-remove" -a "${PKGNAME}" = "gtk+" ]; then if [ "$TARGET" = "post-remove" -a "${PKGNAME}" = "gtk+" ]; then
[ -f ${immodules_db} ] && rm -f ${immodules_db} [ -f ${immodules_cache} ] && rm -f ${immodules_cache}
break break
fi fi
case "$TARGET" in case "$TARGET" in
post-*) post-*)
if [ -f etc/gtk-2.0/gtk.immodules ]; then
echo "Removing obsolete conf file: etc/gtk-2.0/gtk.immodules"
rm -f etc/gtk-2.0/gtk.immodules
fi
if [ -x ${immodules_bin} ]; then if [ -x ${immodules_bin} ]; then
echo "Updating GTK's immodules database..." echo "Updating GTK+ immodules cache..."
if [ ! -d $(dirname $immodules_db) ]; then ${immodules_bin} --update-cache
install -d $(dirname $immodules_db)
fi
${immodules_bin} > ${immodules_db}
fi fi
;; ;;
esac esac

View File

@ -17,7 +17,7 @@ UPDATE="$5"
export PATH="$PATH:/usr/local/bin" export PATH="$PATH:/usr/local/bin"
immodules_bin=usr/bin/gtk-query-immodules-3.0 immodules_bin=usr/bin/gtk-query-immodules-3.0
immodules_db=etc/gtk-3.0/gtk.immodules immodules_cache=usr/lib/gtk-3.0/3.0.0/immodules.cache
case "$ACTION" in case "$ACTION" in
targets) targets)
@ -25,14 +25,18 @@ targets)
;; ;;
run) run)
if [ "$TARGET" = "post-remove" -a "${PKGNAME}" = "gtk+3" ]; then if [ "$TARGET" = "post-remove" -a "${PKGNAME}" = "gtk+3" ]; then
[ -f ${immodules_db} ] && rm -f ${immodules_db} [ -f ${immodules_cache} ] && rm -f ${immodules_cache}
break break
fi fi
case "$TARGET" in case "$TARGET" in
post-*) post-*)
if [ -f etc/gtk-3.0/gtk.immodules ]; then
echo "Removing obsolete conf file: etc/gtk-3.0/gtk.immodules"
rm -f etc/gtk-3.0/gtk.immodules
fi
if [ -x ${immodules_bin} ]; then if [ -x ${immodules_bin} ]; then
echo "Updating GTK+'s immodules database..." echo "Updating GTK+3 immodules cache..."
${immodules_bin} > ${immodules_db} ${immodules_bin} --update-cache
fi fi
;; ;;
esac esac

View File

@ -1,7 +1,7 @@
# Template file for 'xbps-triggers' # Template file for 'xbps-triggers'
pkgname=xbps-triggers pkgname=xbps-triggers
version=0.102 version=0.103
revision=3 revision=1
noarch=yes noarch=yes
bootstrap=yes bootstrap=yes
short_desc="The XBPS triggers for Void Linux" short_desc="The XBPS triggers for Void Linux"