# make aMSN and other tcl/tk apps use anti-aliased fonts

## SuperSheep

I love aMSN and its simplicity but I hate tcl/tk apps, generally because the versions of tcl and tk that are in portage don't build support for nice anti-aliased fonts.  Hence, they look ugly and clunky.

1) Unmerge tcl, tk, and optionally, any tcl/tk apps (eg. aMSN)

```
emerge -C tcl tk amsn
```

2) Go here to grab a copy of  CVS snapshots of tcl and tk.  Save them in your home.

3) Go to your home, and untar the packages.

```
tar xvzf tcl-<date> && tar xvzf tk-<date>
```

4) Become root, and initialise your environment:

```
su

source /etc/profile
```

5) Compile and install tcl:

```
cd tcl/unix

./configure --prefix=/usr
```

make

make install[/code]

6) Compile and install tk with Xft support:

```
cd tk/unix

./configure --prefix=/usr --enable-xft

make

make install
```

7) Inject stubs of these packages into the world file so portage won't overwrite them with the old versions if you call in a tcl/tk app.

```
emerge -i dev-lang/tcl-8.3.4

emerge -i dev-lang/tk-8.3.4-r1
```

 :Cool:  Make a few symbolic links:

```
cd /usr/bin

ln -s wish8.5 wish

ln -s tclsh8.5 tclsh

cd /usr/lib

ln -s tcl8.5 tcl

ln -s tk8.5 tk

ln -s libtk8.5.so libtk.so

ln -s libtcl8.5.so libtcl.so

ln -s libtclstub8.5.a libtclstub.a

ln -s libtkstub8.5.a libtkstub.a

ldconfig
```

9) Re-emerge aMSN or another tcl/tk app.  In aMSN, go into the preferences menu and select a nice anti-aliased font (you might want to search http://packages.gentoo.org for some font packages).  Restart aMSN, and bingo! 

Thanks to Bamboe for his instructions.

----------

## vdboor

If all you need to change is a ./configure option, why wouldn't you suggest a patch for the ebuild?  :Confused: 

----------

## SuperSheep

As far as I know, this option only exists in the CVS versions of tcl/tk.  I haven't looked into it, but now I will.  Thanks.

----------

## pagal

any updates on this? any chances of an ebuild?

thanks.

----------

## SuperSheep

I was going to get started on it, then <laughs> my hard drive died on me.  I've spent the last few weeks trying to get my system back into working order.  Your post has reminded me about it though.

----------

## lokojones

something about the inject... when a new version of tcl or tk apperas in the portage and we do a emerge -uD world, portage will download it.. can we do something for this?

----------

## FGA

 *lokojones wrote:*   

> something about the inject... when a new version of tcl or tk apperas in the portage and we do a emerge -uD world, portage will download it.. can we do something for this?

 

Yes, you can add this to /etc/portage/package.mask (create the dir if it not exists)

```
# echo "<>dev-lang/tcl-8.3.4" >> /etc/portage/package.mask

# echo "<>dev-lang/tk-8.3.4-r1" >> /etc/portage/package.mask
```

The versions are the same than when we did emerge -i (the 7th)

Then, when you do an emerge -u world, versions smaller than and bigger than those will be masked and portage won't upgrade them.

Sorry my english  :Rolling Eyes: 

----------

## lokojones

Don't worry for your english.. yo tb soy español xDD

Umh, I removed tcl/tk cvs from my computer, because I got some problems in aMsn.. for example, it didnt autoscroll for me  :Sad: 

Is there any way to do this with unstable ebuild of them?

----------

## Bamboe

Hello all,

I just wanted to point out that the instructions above (which are derived from the ones I posted originally in another thread) are certainly not the easiest!

The trick with the symbolic links and the insertion of stub ebuilds is not needed if you make a little change to the main amsn tcl script.

So here are some new instructions to get it working:

1) Go here and grab a copy of CVS snapshots of tcl and tk. Save them in your home. 

2) Go to your home, and untar the packages. 

```

tar xvzf tcl-<date> && tar xvzf tk-<date>

```

3) Become root, and initialise your environment: 

```

su

source /etc/profile

```

4) Compile and install tcl:

```

cd tcl/unix

./configure --prefix=/usr && make && make install

```

5) Compile and install tk with Xft support:

```

cd ../../tk/unix 

./configure --prefix=/usr --enable-xft && make && make install

```

6) Run ldconfig:

```

ldconfig

```

6) Edit your amsn main script (/usr/bin/amsn I guess, don't know for sure when gentoo puts this by default), and change the first line from

```

#!/usr/bin/env wish

```

to

```

#!/usr/bin/env wish8.5

```

That's it, the main advantage is that you don't have to do anything with your old tcl/tk installation and that both the old stable as the new unstable tcl/tk can happily coexist on the same machine. This means that there will be no problems when a new stable build of the 8.4 branch shows up in portage, you can safely update it without affecting the cvs version (which is the 8.5 development branch).

So other tcl/tk apps (like the linux 2.4.x xconfig dialog) keep using the stable tcl/tk version while amsn can use the unstable version with truetype anti-aliased fonts. 

The only disadvantage is that you have to edit the amsn script each time a new version of amsn comes out.Last edited by Bamboe on Wed Sep 29, 2004 11:30 am; edited 2 times in total

----------

## lokojones

Hey, you made some mistakes writing the commands.. its ./configure --prefix=/usr and &&, not &  :Razz: 

----------

## Bamboe

You are right, I fixed it, thanks!

----------

## lokojones

this is much better than overwriting old tcl/tk.. but still one problem Why doesnt amsn autoscroll work in conversations? it not very nice to scroll down every word :p 

How did u fix it?

----------

## FGA

lokojones, the autoscrolling bug is now fixed in cvs, you can download the cvs tarball: http://amsn.sf.net/amsn_cvs.tar.gz, or you can wait the next version 0.94, wich probably will be released this weekend.

(Español) Que te puedes bajar la versión cvs, que ya está arreglado, o esperarte a la 0.94 que está previsto que salga este fin de semana según se está hablando en la lista de correo.

----------

## khud

Wow, my amsn now looks sooooo neat   :Cool: 

Thank's for this thread people. By the way, if there is a cvs binary distributed on their web, why not an ebuild? maybe amsn-bin-cvs?   :Confused: 

----------

## Kaydo

Thanks  :Very Happy: 

Could this be added to the gentoo-wiki?

----------

## vash-stampeed

Hi there!

I'd like to know how can I remove the cvs version of tcl and tk from my system? cuz for what I can percieve, it just made my fonts to look quite ugly, at least more ogly than before.

Anyway, thanks in advance for whoever replay.

Vash

PD. I use KDE 3.3.2

----------

## DarkMind

when i open a chat windows appear a progress bar (for each image, a progress bar = to somebody is sending a file)  :Confused: 

why?  :Confused: 

----------

## trINItr0n_

hi,

i tried to make ebuilds for this, the amsn-cvs and tcl work for me but tk doesnt..

if anyone with some more experience could take a loot at it, that would be nice,

tnx

http://www.defloo.be/stuff/amsn-cvs-3000.ebuild

http://www.defloo.be/stuff/tcl-8.5.0.ebuild

http://www.defloo.be/stuff/tk-8.5.0.ebuild   <--

----------

## trINItr0n_

I didnt succeed to install the cvs-amsn version with tcl and tk 8.5 either (installed manually with instructions above).

Emerge stops with this error message:

 *Quote:*   

> gcc -pipe -shared -fPIC webcamsn.o -L./ -lmimic -L/usr/lib/tcl8.4 -ltclstub8.4 -L/usr/lib/tk8.4 -ltkstub8.4 -o webcamsn.so && cp webcamsn.so ../
> 
> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130/../../../../i686-pc-linux-gnu/bin/ld: cannot find -ltclstub8.4
> 
> collect2: ld returned 1 exit status
> ...

 

Note that the linker still tries to inlcude 8.4 libs, i uninstalled all 8.4 versions though .. 

I guess ill go back to 8.4 then :s

Hope someone can make that tk8.5 ebuild work .. or better .. maybe a qt-amsn might emerge, from amsn.sf.net :

 *Quote:*   

>  .. A gui and protocol abstaction that will allow the possibility of having more than one gui and multiprotocol ...

 

----------

## Da Fox

Just a little tip: if after following Bamboe's guide you just go to /usr/bin and remove the symlink 'wish' to wish8.4 and make one that points to wish8.5 all apps that use wish will use the new version + you don't have to edit aMSN files  :Smile: 

----------

## j_c_p

You can look at the following topic thread too : https://forums.gentoo.org/viewtopic-p-2642329.html#2642329

----------

## ashrobo

I was using the cvs-amsn version with tcl8.4 and tk8.4, and decided to try out tk8.5 and tcl8.5 just to get AA working. I did a successful install of the two libraries but after changing "exec wish $0" in /usr/share/amsn/amsn to "exec wish8.5 $0", I got a segmentation fault from running it. Reason being I've configured the cvs-amsn to use tcl8.4 and tk8.4.

Just want to put a note here in case someone has the same problem.

Get the cvs-amsn version if you haven't, unzip it and 

```
./configure --with-tcl=/usr/lib --with-tk=/usr/lib && make
```

Be sure to change "exec wish $0" in /usr/share/amsn/amsn (or wherever you installed it) to "exec wish8.5 $0"

----------

## bushwakko

still no ebuilds? should be made! why not contact the maintainer of the regular tcl and tk ebuilds and have him make one of the alpha's with the -* keyword of hardmasked or something?

----------

## Nephren-Ka

 *bushwakko wrote:*   

> still no ebuilds? should be made! why not contact the maintainer of the regular tcl and tk ebuilds and have him make one of the alpha's with the -* keyword of hardmasked or something?

 

Taken care of, see here https://forums.gentoo.org/viewtopic-t-417673-highlight-amsn.html

----------

## HTS

Only the very first method with the stubs worked for me.

The ebuilds fail because of the 3.1 bash and I don't want to downgrade to 3.0...   :Razz: 

A few updates though,

The link for the nightly CVS has changed and is now ftp://ftp.tcl.tk/pub/tcl/nightly-cvs/

Also, the use of stubs is deprecated and is no longer done by emerge -i <whatever>

The post should be updated with the following method:

add the stubs in /etc/make.profile/package.provided

Write what follows in the file /etc/make.profile/package.provided

```
dev-lang/tcl-8.4.9

dev-lang/tk-8.4.9
```

Cheers, 

HTS

Edit: huh... aMSN lauches correctly and can use the AA fonts, however, it can't locate the TLS Module... and no matter what I do to set the path in the options I can't connect. I switched back to the Ugly fonts with tcl and tk 8.4   :Shocked: 

----------

## Hum

 *HTS wrote:*   

> Only the very first method with the stubs worked for me.
> 
> The ebuilds fail because of the 3.1 bash and I don't want to downgrade to 3.0...  
> 
> A few updates though,
> ...

 

https://forums.gentoo.org/viewtopic-t-417673-start-0.html

----------

## HTS

Yes thanks for the link but as I said above, you need to downgrade to bash 3.1 to make this work... well I guess I'll downgrade then... Or maybe there's a patch to make the ebuilds work with the new bash?

----------

## HTS

Ok I modified the ebuilds to make them work with bash 3.1   :Razz: 

Here are the ebuilds:

tcl-8.5.0.ebuild

tk-8.5.0.ebuild

Give me some feedback please!

----------

## Alejandro Nova

HTS, it seems that you forgot to write --enable-xft in your TK configure flags  :Wink: 

TK 8.5.0 ebuild:

Says:

```
        econf \

                --with-tcl=/usr/$(get_libdir) \

                ${local_config_use} || die

```

Must say:

```
        econf \

                --with-tcl=/usr/$(get_libdir) \

                --enable-xft ${local_config_use} || die

```

----------

## truc

No he didn't  :Wink: 

Since the tip, propose to run: 

```
EXTRA_ECONF="--enable-xft" emerge -av tcl tk amsn 
```

(and then you have the choice of enabling or not..)

If you want to add this 'flag' automaticely, then you might be interested in this post(second part)

----------

## saffsd

Why not have xft as a use flag in the ebuild? Pinning EXTRA_ECONF to the front seems a bit of a hack...

----------

