# Porting first timer - questions



## caesius (Jan 4, 2010)

I've installed the lastest version of KMess on my computer manually because the lastest version in ports is very old and I've emailed the maintainer but my emails get bounced back. So I thought I'd create a *new* port because, while current port used qt3, the latest version uses qt4. I have some questions.

1. kmess (kmess-1.5pre) already exists in ports, can I create a new port called kmess2 (kmess-2.0.2)? And if so, can the PORTNAME in the Makefile still be kmess even though there is already another one?

2. The configure from the kmess-2.0.2.tar.gz file uses bash, (i.e. #!/bin/bash), it was easy enough for ME to configure this manually on my system using bash, but how do I set the port so that i) bash is a dep, and ii) bash is used to configure the port?

I hope these questions are clear enough, thanks.


----------



## tkjacobsen (Jan 4, 2010)

1) This is what forefox does. See /usr/ports/www/firefox .../firefox3 .../firefox35

2) see BUILD_DEPENDS in porters handbook: http://www.freebsd.org/doc/en/books/porters-handbook/makefile-depend.html#AEN2089

For how to use bash for configure, I'm not sure I ynderstand this question. How did you do it manually. 
Maybe you can use REINPLACE_CMD (sed -i) to replace with /usr/local/bin/bash in pre-configure. A find | grep shows me that this is done in /usr/ports/devel/bouml.

Hope this helps


----------



## caesius (Jan 4, 2010)

tkjacobsen said:
			
		

> 1) This is what forefox does. See /usr/ports/www/firefox .../firefox3 .../firefox35
> 
> 2) see BUILD_DEPENDS in porters handbook: http://www.freebsd.org/doc/en/books/porters-handbook/makefile-depend.html#AEN2089
> 
> ...



How I did it manually? 
	
	



```
bash configure
```
But I need to know how to make the configure script get executed by bash instead of sh (why would someone create a configure script with anything but sh btw??)

Thanks for clearing up part 1 tho


----------



## tkjacobsen (Jan 4, 2010)

Well, if the first line in the script is:

```
#!/usr/local/bin/bash
```
and you run it with

```
./configure
```
it will be executed as a bash script...


----------



## tkjacobsen (Jan 4, 2010)

caesius said:
			
		

> (why would someone create a configure script with anything but sh btw??)



Looking in the configure script:


> #   Emulation script of GNU ./configure to make compiling of KDE 4 software more standard.


... so it's not really a configure script.

So your solution should be to use cmake and not this silly configure script. For an exampel se my own port databases/akonadi-googledata. Basically all that is needed is:

```
USE_CMAKE=  yes
USE_KDE4=   put right stuff here
```


Good luck porting , and don't hesitate to as more


----------



## tkjacobsen (Jan 5, 2010)

On another note: It seems like some other guy has a port already (just saw it in the mail list)

http://mail.kde.org/pipermail/kde-freebsd/2010-January/007462.html


----------



## phoenix (Jan 5, 2010)

And there's always Kopete, which is part of the standard KDE4 network port, net/kdenetwork4.  This includes support for MSN Messenger, along with a bunch of other chat protocols.

Personally, I find KMess to be archaic compared to Kopete.


----------

