Re: Prima & Debian

From: Serge Olkhowik <solo_at_isd.dp.ua>
Date: Mon, 24 Nov 2003 19:13:56 +0200
To: prima_at_prima.eu.org

On 24 Nov 2003 11:33:26 +0100
 Dmitry Karasik (Dmitry) wrote:

 Serge> There is no 1.13 at http://www.prima.eu.org/download/, just
 Serge> http://www.prima.eu.org/download/Prima.tar.gz and I don't know
 Serge> whether this is 1.13? So I tried CVS.

 Dmitry> True, in the section 'previous releases' there is no 1.13, since
 Dmitry> Prima.tar.gz is the latest, which for today is 1.13.
 Dmitry> A bit confusing.

And is there any binary packages for ActiveState of 1.13 version?

And one more question - is it possible to create ppm-ready packages for
ASP?

 Dmitry> Aha, I see now why MakeMaker uses INSTALLDIRS, so on debian one
 Dmitry> uses INSTALLDIRS=vendor - smart enough. I think that The Right
 Dmitry> Thing to do would be to teach Makefile.PL to understand
 Dmitry> INSTALLDIRS the way ExtUtils::MakeMaker does. If you'll come with
 Dmitry> a patch that would be grand.

Ok, I made some patch for 1.13:

===============================================================================
--- Makefile.PL.orig 2003-11-24 18:49:14.000000000 +0200
+++ Makefile.PL 2003-11-24 18:20:13.000000000 +0200
@@ -56,6 +56,7 @@
     $PLATFORM
     $COMPILER
     $PREFIX
+ $INSTALLDIRS
     $INSTALLSCRIPT
     $INSTALLSITEARCH
     $INSTALL_LIB
@@ -854,28 +855,28 @@
         $DEFINES{ $defname} = $defvalue;
     }
 
- # find common denominator with installsitearch and installscript
- my @a = split( '\\\\|\/', $Config{installscript});
- my @b = split( '\\\\|\/', $Config{installsitearch});
- my $i = 0;
- while ( defined $a[$i] && defined $b[$i]) {
- last if $a[$i] ne $b[$i];
- $i++;
- }
- my $prefix = qd(($i ? join( '/', @a[0..$i-1]) : ''));
- setvar( 'PREFIX', $prefix);
- setvar( 'INSTALLSCRIPT', $PREFIX . qd( '/' . join( '/', @a[$i .. $#a])));
- setvar( 'INSTALLSITEARCH', $PREFIX . qd( '/' . join( '/', @b[$i .. $#b])));
+ setvar( 'PREFIX', $Config{prefix});
+ my $prefix = $PREFIX;
+ my $prefix_len = length($Config{prefix});
+ setvar( 'INSTALLDIRS', 'site');
+ setvar( 'INSTALLSCRIPT', $prefix . substr($Config{installscript}, $prefix_len));
+ my $install;
+ if ($INSTALLDIRS eq 'perl') {
+ $install = 'install';
+ } elsif ($INSTALLDIRS eq 'site') {
+ $install = 'installsite';
+ } elsif ($INSTALLDIRS eq 'vendor') {
+ $install = 'installvendor';
+ } else {
+ die "Unknown INSTALLDIRS=$INSTALLDIRS\n";
+ }
+ setvar( 'INSTALLSITEARCH', $prefix . substr($Config{"${install}arch"}, $prefix_len));
+# setvar( 'INSTALL_LIB', $prefix . substr($Config{"${install}lib"}, $prefix_len));
     setvar( 'INSTALL_LIB', $INSTALLSITEARCH . qd( "/Prima"));
     setvar( 'INSTALL_DL', $INSTALLSITEARCH . qd( "/auto/Prima"));
     setvar( 'INSTALL_EXAMPLES', $INSTALLSITEARCH . qd( "/Prima/examples"));
- if ( exists $USER_VARS{PREFIX}) {
- setvar( 'INSTALL_MAN1', $INSTALLSITEARCH . qd( "/man/man1"));
- setvar( 'INSTALL_MAN3', $INSTALLSITEARCH . qd( "/man/man3"));
- } else {
- setvar( 'INSTALL_MAN1', $Config{installman1dir});
- setvar( 'INSTALL_MAN3', $Config{installman3dir});
- }
+ setvar( 'INSTALL_MAN1', $prefix . substr($Config{"${install}man1dir"}, $prefix_len));
+ setvar( 'INSTALL_MAN3', $prefix . substr($Config{"${install}man3dir"}, $prefix_len));
 
     setvar( 'MAKETYPE', lc ( $MAKE = $Config{ make}));
     # Note that Borland's make utility also named 'make'. But its
===============================================================================

 Serge> How can I check for xft?

 Dmitry> ldd Prima.so | grep Xft

This is strange - the output is empty but I have the following line when
creating Makefile:

,----
| Checking for presence of freetype/freetype.h... Checking for presence of
| fontconfig/fontconfig.h... yes
`----

 Dmitry> Prima never fully trusts the font names given from outside, this
 Dmitry> explains why the fonts CAN be different. To find out why these
 Dmitry> particular two are different, run it with --debug=mf .

Ok, I built 1.13 and I try --debug=mf on koi8-r script:

(with Prima*font: -*-arial-medium-r-*-*-14-*-*-*-*-*-*-* line at .Xresources)

,----
| init x11:1, debug:9, sync:0, display:(default)
| font: loading fixed
| font reqS:12.[1]{0}(0).Helvetica/
| font: #0: 693 (0): -adobe-helvetica-medium-r-narrow--0-0-0-0-p-0-iso8859-1
| font: pick:0.[0]{0}SV.helvetica
| font: loading -adobe-helvetica-medium-r-narrow--0-120-0-0-p-0-iso8859-1
| font cache add to :20.12.{0}.helvetica
| font reqH:13.[1]{0}(0).fixed/iso8859-1
| font: #0: 1040 (1): -misc-fixed-medium-r-semicondensed--13-100-100-100-c-60-iso8859-1
| font: pick:13.[10]{0}S.fixed
| font: loading -misc-fixed-medium-r-semicondensed--13-100-100-100-c-60-iso8859-1
| font: loading -misc-fixed-medium-r-semicondensed--13-100-100-100-c-60-iso8859-1
| font cache add to :13.10.{0}.fixed
| font: init
| font reqS:12.[1]{0}(0).arial/
| font: #0: 375 (0): -monotype-arial-medium-r-normal--0-0-0-0-p-0-koi8-r
| font: pick:0.[0]{0}SV.arial
| font: loading -monotype-arial-medium-r-normal--0-120-0-0-p-0-koi8-r
| font cache add to :24.12.{0}.arial
| font reqH:14.[1]{0}(0).arial/iso8859-1
| font: #0: 361 (0): -monotype-arial-medium-r-normal--0-0-0-0-p-0-iso8859-1
| font: pick:0.[0]{0}SV.arial
| font: loading -monotype-arial-medium-r-normal--0-140-0-0-p-0-iso8859-1
| font height pick: 1::14 => 27, advised 72
| font: loading -monotype-arial-medium-r-normal--0-72-0-0-p-0-iso8859-1
| font height pick: 2::14 => 15, advised 67
| font: loading -monotype-arial-medium-r-normal--0-67-0-0-p-0-iso8859-1
| font height pick: 3::14 => 13, advised 70
| font: loading -monotype-arial-medium-r-normal--0-70-0-0-p-0-iso8859-1
| font height pick: 4::14 => 15, advised 68
| font: loading -monotype-arial-medium-r-normal--0-68-0-0-p-0-iso8859-1
| font height pick: 4::14 => 13, advised 67
| font: loading -monotype-arial-medium-r-normal--0-67-0-0-p-0-iso8859-1
| font height pick: 4::14 => 13, advised -1
| font cache add to :14.6.{0}.arial
| default font: 14.[w=4,s=6].arial.iso8859-1
| menu font: 14.[w=4,s=6].arial.iso8859-1
| widget font: 14.[w=4,s=6].arial.iso8859-1
| msg font: 14.[w=4,s=6].arial.iso8859-1
| caption font: 14.[w=4,s=6].arial.iso8859-1
| font reqH:16.[1]{0}(0).Helv/
| font: #0: 693 (7050): -adobe-helvetica-medium-r-narrow--0-0-0-0-p-0-iso8859-1
| font: pick:0.[0]{0}V.helvetica
| font: loading -adobe-helvetica-medium-r-narrow--0-160-0-0-p-0-iso8859-1
| font height pick: 1::16 => 27, advised 94
| font: loading -adobe-helvetica-medium-r-narrow--0-94-0-0-p-0-iso8859-1
| font cache add to :16.9.{0}.helvetica
`----

As I understand this info - Prima can't find suitable font (and this is
currect)? But why it ignores line in .Xresources file?

And I tried --font=Tahoma-16:

,----
| font=Tahoma-16
| set default font: Tahoma-16
| ....
| font: loading -adobe-helvetica-medium-r-narrow--0-94-0-0-p-0-iso8859-1
| font cache add to :16.9.{0}.helvetica
`----

 Serge> I wrote simple example in koi8 and it worked. But it worked with
 Serge> .Xresources file only. I tried even --font=Tahoma-16 - none happens
 Serge> :(

 Dmitry> 1.13 only.

I tried CVS by 2003-11-21 and its HISTORY contains line about 1.13 version.

 Serge> So what I have to do?

 Dmitry> Try setting LANG to koi8 locale, otherwise Prima wouldn't know

But I already has ru_RU.KOI8-R.

 Dmitry> which encoding to use for -*-arial-medium-r-*-*-14-*-*-*-*-*-*-* .
 Dmitry> If you set a default unicode font with koi8 charset present, you
 Dmitry> can use both koi8 and utf8 simultaneously.

Yes, msttcorefonts has both encodings.

-- 
Serge Olkhowik <solo_at_isd.dp.ua>
ISD Configuration Management Team <cm_at_isd.dp.ua>
Received on Mon 24 Nov 2003 - 18:37:54 CET

This archive was generated by hypermail 2.2.0 : Sat 19 Mar 2011 - 18:35:05 CET