bsd.apache.mk

This is an old revision of the document!


(committed, see PR ports/156533)

apache13 is already deprecated upstream and apache20 will be deprecated with the release of apache24.

This means apache22 will be the default version as soon apache24 is in the ports tree.

Therefore Mk/bsd.apache.mk was rewritten to support this transition with a new logic and some new parameters.

Parameter APACHE_PORT:

The parameter APACHE_PORT is not for usage inside the ports Makefile, it is a user controlled parameter to select the default apache port.

The following example will show how to use this parameter in /etc/make.conf to make apache22 the default apache port.

APACHE_PORT= www/apache22

To get a list of “possible” valid values execute the command: $> egrep 'apache[12]' ports/www/Makefile | awk '{print “www/” $3}'

Parameters for usage inside a ports Makefile:

parameter description
USE_APACHE Set apache and apxs as build and run dependency
USE_APACHE_BUILD Set apache and apxs as build dependency
USE_APACHE_RUN Set apache and apxs as run dependency

The following example is representative of all three possible parameters to use.

Examples:

USE_APACHE= 22 specify exact version
USE_APACHE= 13+ specify [min] version, no [max] version
USE_APACHE= 13-22 specify [min]-[max] range
USE_APACHE= -22 specify [max] version, no [min] version

Note:

  • In the past Values could be specified with and without “.” between major and minor version numbers. This has changed, only values without “.” are accepted.
  • If “+” is specified and no apache is installed, then ${DEFAULT_APACHE_VERSION} will be used.
  • Valid version numbers are specified in the variable APACHE_SUPPORTED_VERSION below
  • The following values for USE_APACHE are reserved and only valid in apache-server ports!
    • USE_APACHE= common13, common20, and common22

Internal Variables to control which apache version will be chosen.

  • DEFAULT_APACHE_VERSION= 22
  • APACHE_SUPPORTED_VERSION= 22 13 20 # preferred version first

As soon apache24 hits the tree this will be changed to

  • DEFAULT_APACHE_VERSION= 22
  • APACHE_SUPPORTED_VERSION= 22 24 # preferred version first

Note: apache13 and apache20 is already removed in this example.

Note for maintainers and porters

At the moment there are many ports with USE_APACHE= ab+ defined.

Those ports should be checked if they are really working together with apache24, else they should use the new form “[min]-[max]” or “-[max].”

Many ports don't use apache or apxs during build time, those ports should be changed to use USE_APACHE_RUN instead.

Future Improvements:

  • New keywords @apadd and @apdel for usage in pkg-plist will be added as feature if the rewritten bsd.apache.mk went into ports/Mk. This is already implemented but not on high priority.
  • bsd.apache.mk.1320613985.txt.gz
  • Last modified: 2011/11/06 21:13
  • by OlliHauer