summaryrefslogtreecommitdiff
path: root/multimedia/mplayerxp/files/install-user
blob: 0fd764316a5025d1fdd5043df6a78fd39d20db88 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#This perl script links the codec config file
#and the fonts dir to the user's home dir.
#V0.2 Last touched: 2001-10-12 riggs

if (-e "$ENV{HOME}/.mplayer/")
{
	print "Sorry, you should execute this target without having a .mplayer directory in your homedir.\n";
	exit 1;
}

#Determining location of fonts:

@pkg=`pkg_info -Lx mplayer-fonts`;
print "$prefix[3]";
$prefix=$pkg[3];
$prefix=~ s/(.+mplayer).*/$1/;
chop $prefix;

print "You may choose any of the available language sets:\n\n";
print "ISO-8859-1 Font : 1\n";
print "ISO-8859-2 Font : 2\n";
print "(old) Cyrillic fonts : c\n";
print "Russian fonts : r\n";

print "Your decision? ";
chomp ($lang=<STDIN>);
print "\n";

if ($lang eq "1" || $lang eq "2")
{
	print "The available sizes for this font are 14,18,24,28.\n";
	print "Please enter the wanted size: \n";
	chomp ($size=<STDIN>);
	if ($size ne "14" && $size ne "18" && $size ne "24" && $size ne "28") {$size=14;}
}


system "mkdir $ENV{HOME}/.mplayer";
if ($lang eq "c")
{
	system "ln -s $prefix/fonts/cyrillic/ $ENV{HOME}/.mplayer/font";
}
elsif ($lang eq "r")
{
	system "ln -s $prefix/fonts/koi8r-font/ $ENV{HOME}/.mplayer/font";
}
elsif ($lang eq "2")
{
	system "ln -s $prefix/fonts/iso-8859-2/arial-$size/ $ENV{HOME}/.mplayer/font";
}
else {system "ln -s $prefix/fonts/iso-8859-1/arial-$size/ $ENV{HOME}/.mplayer/font"};

system "ln -s $prefix/codecs.conf $ENV{HOME}/.mplayer/codecs.conf";