Mercurial > mplayer.hg
annotate debian/mplayer.preinst @ 36650:8b2c68d6fd89
Enable specifying a font file in the GUI preferences.
This has been broken since the introduction of Fontconfig.
Since Fontconfig is selecting fonts by font patterns and the GUI does so
by selecting a font file, it is necessary to temporarily disable
fontconfig font handling if there is a directory separator character
found in the name (or pattern) of the font to be used, i.e. assume the
font name to be a pattern if and only if it doesn't contain a directory
separator character.
Thus set option 'fontconfig' depending on font_name. Set it in guiInit()
for the font possibly given in a configuration file or on the command
line, and set it in mplayerLoadFont() whenever it is affected by GUI
preferences settings.
(Although the font selection dialog only allows files to be selected,
it is possible to simply enter a fontconfig font pattern in the
preferences' text entry field - or to enter it directly into the GUI
configuration file or to specify on the command line, both of which
always is possible.)
author | ib |
---|---|
date | Sun, 26 Jan 2014 16:40:49 +0000 |
parents | c9f9a077d760 |
children |
rev | line source |
---|---|
31833
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
1 #!/bin/sh |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
2 # preinst script |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
3 # |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
4 |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
5 set -e |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
6 |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
7 # summary of how this script can be called: |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
8 # * <new-preinst> `install' |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
9 # * <new-preinst> `install' <old-version> |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
10 # * <new-preinst> `upgrade' <old-version> |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
11 # * <old-preinst> `abort-upgrade' <new-version> |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
12 # for details, see http://www.debian.org/doc/debian-policy/ or |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
13 # the debian-policy package |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
14 |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
15 case "$1" in |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
16 install) |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
17 ;; |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
18 upgrade) |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
19 if dpkg --compare-versions "$2" le "1.0~rc3+svn20090405-1"; then |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
20 md5=`md5sum /etc/mplayer/mplayer.conf | cut -d' ' -f1` |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
21 case "$md5" in |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
22 9bdac8eb1184daa188d4829575ceafe8|\ |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
23 46f52a60c07ed788500056dd7ffd27b9) |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
24 echo "removing obsolete /etc/mplayer/mplayer.conf" |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
25 rm -f /etc/mplayer/mplayer.conf |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
26 esac |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
27 fi |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
28 |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
29 ;; |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
30 abort-upgrade) |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
31 ;; |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
32 |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
33 *) |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
34 echo "preinst called with unknown argument \`$1'" >&2 |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
35 exit 1 |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
36 ;; |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
37 esac |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
38 |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
39 # dh_installdeb will replace this with shell code automatically |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
40 # generated by other debhelper scripts. |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
41 |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
42 #DEBHELPER# |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
43 |
c9f9a077d760
Add new debian packaging based on official distro packages
siretart
parents:
diff
changeset
|
44 exit 0 |