# Need help to port creation



## SHRDLU (Jun 11, 2009)

The following is required:

It is necessary to check up before port installation, whether a certain application is installed.
If the application is not installed, it is necessary to interrupt port installation and type the message "You should install a <CERTAIN APPLICATION> first"

As it to make in port Makefile?

Thanks. Sorry for my English


----------



## SirDice (Jun 11, 2009)

Look into *_DEPENDS

http://www.freebsd.org/doc/en/books/porters-handbook/makefile-depend.html


----------



## SHRDLU (Jun 11, 2009)

SirDice said:
			
		

> Look into *_DEPENDS


No. I know about it.
*_DEPENDS - for automatically install all dependent applications, but I need a manually install one application


----------



## SirDice (Jun 11, 2009)

Why does it need to be installed manually? That defeats the purpose of a port.


----------



## SHRDLU (Jun 11, 2009)

My port is required a PostgreSQL server. I wish to give to the user independently to choose the PostgreSQL server version.


----------



## SirDice (Jun 11, 2009)

Look into OPTIONS

http://www.freebsd.org/doc/en/books/porters-handbook/makefile-options.html


----------



## SHRDLU (Jun 11, 2009)

Thanks, i'm try it.


----------



## SirDice (Jun 11, 2009)

If you do
`# find /usr/ports -type f -name 'Makefile' -exec grep -H PGSQL {} \;`

You'll get a list of other ports that use PostgreSQL, have a look how they do it.


----------



## SHRDLU (Jun 11, 2009)

Thanks, SirDice. I have found some ports where there is a similar solutions.


----------

