# terminal-only version of /usr/ports



## antolap (Jul 12, 2012)

Hi
I would like to have smaller version of /usr/ports
This includes all programs; I would remove all programs that need GUI (eg xorg, gnome, kde, gedit, openoffice, gimp, etc etc), and remain only the programs that run from the command line

Any ideas?


----------



## SirDice (Jul 12, 2012)

Set WITHOUT_X11 in /etc/make.conf. 

Any port you build will be build without X support. Prime example of this is editors/vim.


----------



## antolap (Jul 12, 2012)

yes, but I would like to remove sub-directories from /usr/ports so that it's easier to search/browse in.


----------



## SirDice (Jul 12, 2012)

Install ports-mgmt/psearch or

`# cd /usr/ports && make search key=<searchkey>`
`# cd /usr/ports && make search name=<portname>`

psearch(1) however is a lot easier to use.


----------



## antolap (Jul 12, 2012)

I have tried to move /usr/ports/x11* outside /usr/ports/, but when I search, x11* still appears in results.

I've tried this command [CMD=""]make index[/CMD], but I get a lot of errors (missing x11 directories...)


----------



## SirDice (Jul 12, 2012)

antolap said:
			
		

> I've tried this command [CMD=""]make index[/CMD], but I get a lot of errors (missing x11 directories...)



Yes, you are now missing all sorts of dependencies for applications in the other categories. Not all graphical programs are in x11, they are scattered all over the categories. It will be difficult to figure out which ones do and which don't use X. Also keep in mind that some applications can be build both ways (editors/vim for example).


----------



## antolap (Jul 12, 2012)

Ok, and how could I match and delete all applications which require x11?

For example, if editors/vim requires x11, it must be deleted, so it will remain only editors/vim-lite that doesn't require it.


----------



## SirDice (Jul 12, 2012)

antolap said:
			
		

> Ok, and how could I match and delete all applications which require x11?


You don't.



> For example, if editors/vim requires x11, it must to be deleted, so it will remain only editors/vim-lite that doesn't require it.


And that's where it all falls down. editors/vim doesn't _require_ X, it can be build without.


----------



## AASoft (Aug 5, 2012)

*Difference between vim and vim-lite?*



			
				SirDice said:
			
		

> editors/vim doesn't _require_ X, it can be build without.



I couldn't find any info on the differences between the editors/vim and editors/vim-lite ports, and their descriptions are exactly the same, too.

Where could one read more about the differences between the two ports?


----------



## kpa (Aug 5, 2012)

editors/vim-lite is just editors/vim compiled with LITE variable defined, read the Makefile of editors/vim.


----------



## phoenix (Aug 6, 2012)

There's a reason there's only 1 ports tree. Just like the rest of FreeBSD, it's designed as a whole, it's developed as a whole, and it's meant to be used as a whole. Leave /usr/ports alone. Don't try to hack it up into pieces.

If you don't want certain features built, then set the appropriate *WITH_/WITHOUT_* variables in /etc/make.conf. That is one of the main purposes of that file.


----------



## UNIXgod (Aug 6, 2012)

Look at /usr/share/examples/cvsup/ports-supfile

As others have mentioned it's not a good idea to not have the whole tree in place. You will run into issues.


----------

