Set localstatedir (i.e. BASELOCALSTATEDIR) to /var by default if

CONFIGURE_STYLE is gnu.
Works the same way as SYSCONFDIR, one can append a subdirectory to
change the default localstatedir by using the following construct in the
port Makefile:
LOCALSTATEDIR=	${BASELOCALSTATEDIR}/foobar

Note that this variable in not substituted in PLIST.

bulk tested by landry (on a previous diff)
ok jasper@ sthen@
This commit is contained in:
ajacoutot 2012-04-28 10:50:35 +00:00
parent 107ee17c37
commit 9eeb9a1c1b
2 changed files with 9 additions and 2 deletions

View File

@ -1,6 +1,6 @@
#-*- mode: Makefile; tab-width: 4; -*-
# ex:ts=4 sw=4 filetype=make:
# $OpenBSD: bsd.port.mk,v 1.1164 2012/04/22 10:39:48 espie Exp $
# $OpenBSD: bsd.port.mk,v 1.1165 2012/04/28 10:50:35 ajacoutot Exp $
# $FreeBSD: bsd.port.mk,v 1.264 1996/12/25 02:27:44 imp Exp $
# $NetBSD: bsd.port.mk,v 1.62 1998/04/09 12:47:02 hubertf Exp $
#
@ -327,6 +327,11 @@ BASESYSCONFDIR ?= /etc
# where configuration files should actually go
SYSCONFDIR ?= ${BASESYSCONFDIR}
# User choice, consider read-only from a given port
BASELOCALSTATEDIR ?= /var
# Defaut localstatedir for gnu ports
LOCALSTATEDIR ?= ${BASELOCALSTATEDIR}
RCDIR ?= /etc/rc.d
USE_GMAKE ?= No
.if ${USE_GMAKE:L} == "yes"

View File

@ -1,6 +1,6 @@
#-*- mode: Fundamental; tab-width: 4; -*-
# ex:ts=4 sw=4 filetype=make:
# $OpenBSD: gnu.port.mk,v 1.48 2011/12/12 10:33:33 jasper Exp $
# $OpenBSD: gnu.port.mk,v 1.49 2012/04/28 10:50:35 ajacoutot Exp $
# Based on bsd.port.mk, originally by Jordan K. Hubbard.
# This file is in the public domain.
@ -85,10 +85,12 @@ CONFIGURE_ARGS += --prefix='${PREFIX}'
CONFIGURE_ARGS += --sysconfdir='$${${DESTDIRNAME}}${SYSCONFDIR}'
CONFIGURE_ARGS += --mandir='$${${DESTDIRNAME}}${PREFIX}/man'
CONFIGURE_ARGS += --infodir='$${${DESTDIRNAME}}${PREFIX}/info'
CONFIGURE_ARGS += --localstatedir='$${${DESTDIRNAME}}${LOCALSTATEDIR}'
. else
CONFIGURE_ARGS += --sysconfdir='${SYSCONFDIR}'
CONFIGURE_ARGS += --mandir='${PREFIX}/man'
CONFIGURE_ARGS += --infodir='${PREFIX}/info'
CONFIGURE_ARGS += --localstatedir='${LOCALSTATEDIR}'
. endif
. endif