# disable language/locale support for make



## Beeblebrox (Dec 3, 2010)

I have several small problems about the make process but they are sufficiently annoying to ask some help.

1. The make command builds complete language support for all the packages (AX to ZH).  A considerable amount of time in the compile process goes to the language support modules.  I would like to completely disable this and just build for en_US.

2. Make obviously pulls in the "depends" packages specified in the Makefile during the build.  Is there a global way to set an option to use package "A" in the place of "B" for all ports asking for "B"?  The specific case is I would like to use Lighttpd instead of Apache for the web browser, as I understand it is more lightweight.  Could this be done by telling pkgdb to substitute Lighttpd in the place of Apache?

3. My /usr/ports + /usr/src directories are on a separate zfs pool, under (arch/cvsup) with symlinks pointing there.  The whole pool is a compressed one, so the build process is slowed to some extent.  The disk is large enough, therefore I could specify a different build directory to speed things up - but a global setting is preferable to giving this to make for each port.


----------



## SirDice (Dec 3, 2010)

1. The make command is completely oblivious to the language used within the source it's compiling. There's no 'global' switch that turns languages on or off. This completely depends on the specific port.

2. Try setting *APACHE_PORT=www/lighttpd* in make.conf

3 set WRKDIRPREFIX to a directory with lots of space. It's this directory where the port will be extracted and build from.


----------



## Beeblebrox (Dec 3, 2010)

Thanks SirD.  Can you please clarify:

1. Logic says that I should be able to instruct the system that there will be no Spanish, Chinese or Icelandic users accessing it and that it should therefore skip the support for these locales??

3. WRKDIRPREFIX is also in make.conf?


----------



## SirDice (Dec 3, 2010)

Beeblebrox said:
			
		

> 1. Logic says that I should be able to instruct the system that there will be no Spanish, Chinese or Icelandic users accessing it and that it should therefore skip the support for these locales??


As I said, that depends entirely on the port's Makefile.



> 3. WRKDIRPREFIX is also in make.conf?


I've never tried that. It's just a shell variable. I've set mine in my ~/.cshrc.


----------



## graudeejs (Dec 3, 2010)

Yes, *WRKDIRPREFIX* should be set in /etc/make.conf
I use it quite a lot


----------



## Beeblebrox (Dec 3, 2010)

*part of whishlist*

If I may, I'd like to suggest this for the pipeline then,
in /etc/make.conf if we could have something like:

```
CONFIGURE_ARGS=--disable-locales
```


----------



## graudeejs (Dec 3, 2010)

Think out of the box.
/etc/make.conf

```
WITHOUT_NLS=YES
```
This will work for most ports that don't use options... for others you will have to manually deselect NLS support (when you *make config*)

There can't be one single good switch to turn off NLS for all packages, as any coder can set different names for keys for their app configure scripts....

P.S.
/usr/ports/KNOBS


----------



## SirDice (Dec 3, 2010)

Note that NLS only adds support for other language codes. It doesn't add/remove the translations themselves.


----------



## Beeblebrox (Dec 4, 2010)

About port substitution:  Is there a list / web page with port names in the format acceptable to make.conf (like APACHE_PORT)?  I tried setting several other options similar to this but did not get the desired result - therefore I have incorrectly specified the PORT name.

Separately; Is it possible to run a batch process which will make config for all packages being built, so that all configs are set at the beginning of the process and the make install is not interrupted for user feedback during build?  I assume the answer is no or "pretty complicated", but just checking...


----------



## graudeejs (Dec 4, 2010)

`# make config-recursive`
for more info read ports(7)


----------



## DutchDaemon (Dec 4, 2010)

Or see the .mk files in /usr/ports/Mk/ for (additional) port-specific Make targets.


----------



## Beeblebrox (Dec 7, 2010)

OK, thank you all for the answers / suggestions.  I could not however, solve one of the issues I had partially mentioned here so I have to ask again...

Each build process uses its own depends in the Makefile and as a result, I now have on my system:

```
db4-4.0.14_1
db41-4.1.25_4
sqlite3-3.7.3_1
sqlite-2.8.17_1
mysql-client-5.1.53
```
and god knows what else. I would prefer to have all ports depend on one db, that being mysql55.  In my /etc/make.conf I had placed (as previously advised):

```
SQLITE_PORT=databases/mysql55-server
MYSQL_PORT=databases/mysql55-server
MYSQLCLIENT_PORT=databases/mysql55-client
SQLITECLIENT_PORT=databases/mysql55-client
DB4_PORT=databases/mysql55-server
DB41_PORT=databases/mysql55-server
```
Then I looked at the USE and WITH arguments / KNOBS but I now think that these are not really what I am looking for because as I understand, this:

```
WITH_MYSQL_VER=55
```
will tell config that it should prefer the mysql option if and when it is available. As I understand, this command does not re-direct or substitute this port for, say DB4.

The end result now is I am not getting the make process in other ports re-directing to mysql55.

@DD I really tried, but could not figure out how to use MK/bsd.database.mk


----------



## SirDice (Dec 7, 2010)

Beeblebrox said:
			
		

> I would prefer to have all ports depend on one db, that being mysql55.


That's simply never going to work and that's not the port system's fault. If I create an application that _only_ supports DB for instance, how are you going to force it to use MySQL? Without a rewrite of the entire application it'll never support MySQL. The various database engines are not drop-in-replacements, you simply cannot replace one with another and expect it to work.



> Then I looked at the USE and WITH arguments / KNOBS but I now think that these are not really what I am looking for because as I understand, this:
> 
> ```
> WITH_MYSQL_VER=55
> ...


All this does is tell the ports system that when a port has MySQL as a dependency it'll use version 5.5. That's all it does. It does not tell a port that depends on DB to use MySQL 5.5.


----------



## Beeblebrox (Dec 7, 2010)

Yeah, makes sense. I would at least like to try to consolidate the versions down to 1, or the latest, though.  So specifically:
DB4 & DB41 --> DB41
sqlite-2.8.1  &  sqlite3-3.7.3 --> sqlite34
mysql-client-5.1.53 --> mysql-client-55
Can you suggest a way to do that ?

Also, if I want the depends actions to pull say Samba35 instead of Samba34, which one of these do I place in etc/make.conf ?

```
USE_SAMBA_VER=35
OVERRIDE_SAMBA_PORT=samba35
SAMBA_PORT=net/samba35
```


----------



## Beeblebrox (Dec 7, 2010)

OK; after I corrected a bunch of other problems (in other threads) I ran this:
`# portupgrade -af`

```
** Port marked as IGNORE: security/cyrus-sasl2: cannot install: MySQL versions
mismatch: mysql51-client is installed and wanted version is mysql55-client
```
and got this problem, which I fixed by make deinstall. This means the below setting in etc/make.conf works?

```
WITH_MYSQL_VER=55
```


----------



## DutchDaemon (Dec 8, 2010)

Beeblebrox, use  tag instead of green color, please.


----------

