2018-01-15 10:35:45 +01:00
|
|
|
# $NetBSD: bsd.prefs.mk,v 1.396 2018/01/15 09:35:45 jperkin Exp $
|
2007-08-13 11:03:41 +02:00
|
|
|
#
|
|
|
|
# This file includes the mk.conf file, which contains the user settings.
|
|
|
|
#
|
|
|
|
# Packages should include this file before any of the .if directives, as
|
|
|
|
# well as before modifying variables like CFLAGS, LDFLAGS, and so on.
|
|
|
|
# Otherwise the behavior may be unexpected.
|
|
|
|
#
|
|
|
|
# When mk.conf is included by this file, the following variables are
|
|
|
|
# defined:
|
|
|
|
#
|
|
|
|
# ACCEPTABLE_LICENSES
|
|
|
|
# This variable is set to the list of Open Source licenses. See
|
|
|
|
# mk/license.mk for details.
|
|
|
|
#
|
|
|
|
# MACHINE_PLATFORM
|
|
|
|
# The platform for which the packages are built. It has the form
|
|
|
|
# ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH}.
|
|
|
|
#
|
|
|
|
# NATIVE_MACHINE_PLATFORM
|
|
|
|
# The platform on which the packages are built. This is usually
|
|
|
|
# the same as ${MACHINE_PLATFORM}, but can be different when
|
|
|
|
# cross-building packages.
|
|
|
|
#
|
|
|
|
# PKGPATH
|
|
|
|
# The path of the package, relative to the pkgsrc top-level
|
|
|
|
# directory. Typical values look like editors/emacs or
|
|
|
|
# misc/openoffice-bin.
|
|
|
|
#
|
2016-01-12 20:55:41 +01:00
|
|
|
# Keywords: mk.conf user platform
|
1998-06-03 13:15:29 +02:00
|
|
|
#
|
2005-07-28 15:07:17 +02:00
|
|
|
|
2005-05-14 03:51:52 +02:00
|
|
|
.if !defined(BSD_PKG_MK)
|
1999-05-24 00:10:01 +02:00
|
|
|
|
Implement some parts of proposals posted to tech-pkg:
- Define OS_VERSION in bsd.prefs.mk (...if not already defined). Previously
was only set in a conditional block in bsd.pkg.mk.
- Define new values, MACHINE_PLATFORM and MACHINE_GNU_PLATFORM, which
default to ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH} and
${LOWER_OPSYS}-${LOWER_VENDOR}-${LOWER_ARCH} respectively.
(Probably should nuke LOWER_ARCH and rename LOWER_VENDOR to something
like MACHINE_GNU_VENDOR.)
- Use ${MACHINE_GNU_PLATFORM} as the argument to `--host' in GNU_CONFIGURE
packages.
- Allow for ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM, lists of patterns
in csh(1) glob style which are matched against MACHINE_PLATFORM above
and take the place of {ONLY,NOT}_FOR_{ARCHS,OPSYS}. (For now, until
all pkgs are converted, provide backwards compatibility.) *Both* may
be defined, in which case NOT_FOR_PLATFORM takes precedence.
- Also do some significant aesthetic cleanup, based on the idea
`define platform-specific overrides first, then define a generic case
with the ?= operator'. Lots more of this to do yet.
1999-05-24 20:42:00 +02:00
|
|
|
# Let mk.conf know that this is pkgsrc.
|
2003-01-15 11:06:48 +01:00
|
|
|
BSD_PKG_MK=1
|
Implement some parts of proposals posted to tech-pkg:
- Define OS_VERSION in bsd.prefs.mk (...if not already defined). Previously
was only set in a conditional block in bsd.pkg.mk.
- Define new values, MACHINE_PLATFORM and MACHINE_GNU_PLATFORM, which
default to ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH} and
${LOWER_OPSYS}-${LOWER_VENDOR}-${LOWER_ARCH} respectively.
(Probably should nuke LOWER_ARCH and rename LOWER_VENDOR to something
like MACHINE_GNU_VENDOR.)
- Use ${MACHINE_GNU_PLATFORM} as the argument to `--host' in GNU_CONFIGURE
packages.
- Allow for ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM, lists of patterns
in csh(1) glob style which are matched against MACHINE_PLATFORM above
and take the place of {ONLY,NOT}_FOR_{ARCHS,OPSYS}. (For now, until
all pkgs are converted, provide backwards compatibility.) *Both* may
be defined, in which case NOT_FOR_PLATFORM takes precedence.
- Also do some significant aesthetic cleanup, based on the idea
`define platform-specific overrides first, then define a generic case
with the ?= operator'. Lots more of this to do yet.
1999-05-24 20:42:00 +02:00
|
|
|
__PREFIX_SET__:=${PREFIX}
|
1998-11-27 00:39:15 +01:00
|
|
|
|
2005-12-28 02:00:46 +01:00
|
|
|
# Set PATH if not already set
|
|
|
|
.if !defined(PATH)
|
|
|
|
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
|
|
|
.endif
|
|
|
|
|
2004-02-06 05:37:02 +01:00
|
|
|
# Expand MAKE to a full path.
|
|
|
|
.if !defined(_MAKE)
|
|
|
|
_MAKE:= ${MAKE}
|
2007-08-13 09:42:10 +02:00
|
|
|
# allow for MAKE=./make and similar.
|
|
|
|
. if empty(_MAKE:M/*) && !empty(_MAKE:M*/*) && defined(PWD) && exists(${PWD}/${MAKE})
|
|
|
|
_MAKE:= ${PWD}/${MAKE}
|
|
|
|
. endif
|
2004-02-06 05:37:02 +01:00
|
|
|
. for _dir_ in ${PATH:C/\:/ /g}
|
|
|
|
. if empty(_MAKE:M/*)
|
|
|
|
. if exists(${_dir_}/${MAKE})
|
|
|
|
_MAKE:= ${_dir_}/${MAKE}
|
|
|
|
. endif
|
|
|
|
. endif
|
|
|
|
. endfor
|
|
|
|
. if !empty(_MAKE:M/*)
|
2004-02-06 20:04:24 +01:00
|
|
|
MAKEFLAGS+= _MAKE=${_MAKE:Q}
|
2004-02-06 05:37:02 +01:00
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
MAKE:= ${_MAKE}
|
|
|
|
|
1999-06-23 19:06:20 +02:00
|
|
|
.if exists(/usr/bin/uname)
|
|
|
|
UNAME=/usr/bin/uname
|
|
|
|
.elif exists(/bin/uname)
|
|
|
|
UNAME=/bin/uname
|
|
|
|
.else
|
|
|
|
UNAME=echo Unknown
|
|
|
|
.endif
|
|
|
|
|
2005-05-14 03:51:52 +02:00
|
|
|
.if !defined(OPSYS)
|
2013-02-10 13:25:17 +01:00
|
|
|
OPSYS:= ${:!${UNAME} -s!:S/-//g:S/\///g:C/^CYGWIN_.*$/Cygwin/}
|
2005-12-05 23:07:07 +01:00
|
|
|
MAKEFLAGS+= OPSYS=${OPSYS:Q}
|
2005-11-01 17:18:33 +01:00
|
|
|
.endif
|
2005-11-01 17:30:05 +01:00
|
|
|
|
2012-07-02 17:49:41 +02:00
|
|
|
# OS_VARIANT is used to differentiate operating systems which have a common
|
|
|
|
# basis but offer contrasting environments, for example Linux distributions
|
|
|
|
# or illumos forks.
|
|
|
|
OS_VARIANT?= # empty
|
|
|
|
|
2005-11-01 17:30:05 +01:00
|
|
|
# The _CMD indirection allows code below to modify these values
|
|
|
|
# without executing the commands at all. Later, recursed make
|
|
|
|
# invocations will skip these blocks entirely thanks to MAKEFLAGS.
|
2005-05-14 03:51:52 +02:00
|
|
|
.if !defined(OS_VERSION)
|
2005-11-01 17:30:05 +01:00
|
|
|
_OS_VERSION_CMD= ${UNAME} -r
|
|
|
|
OS_VERSION= ${_OS_VERSION_CMD:sh}
|
2005-12-05 23:07:07 +01:00
|
|
|
MAKEFLAGS+= OS_VERSION=${OS_VERSION:Q}
|
1998-06-03 13:15:29 +02:00
|
|
|
.endif
|
|
|
|
|
2005-11-01 17:11:16 +01:00
|
|
|
# Preload these for architectures not in all variations of bsd.own.mk,
|
|
|
|
# which do not match their GNU names exactly.
|
2014-11-19 00:36:07 +01:00
|
|
|
GNU_ARCH.aarch64eb?= aarch64_be
|
|
|
|
GNU_ARCH.coldfire?= m5407
|
2002-03-18 06:46:42 +01:00
|
|
|
GNU_ARCH.arm26?= arm
|
Implement some parts of proposals posted to tech-pkg:
- Define OS_VERSION in bsd.prefs.mk (...if not already defined). Previously
was only set in a conditional block in bsd.pkg.mk.
- Define new values, MACHINE_PLATFORM and MACHINE_GNU_PLATFORM, which
default to ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH} and
${LOWER_OPSYS}-${LOWER_VENDOR}-${LOWER_ARCH} respectively.
(Probably should nuke LOWER_ARCH and rename LOWER_VENDOR to something
like MACHINE_GNU_VENDOR.)
- Use ${MACHINE_GNU_PLATFORM} as the argument to `--host' in GNU_CONFIGURE
packages.
- Allow for ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM, lists of patterns
in csh(1) glob style which are matched against MACHINE_PLATFORM above
and take the place of {ONLY,NOT}_FOR_{ARCHS,OPSYS}. (For now, until
all pkgs are converted, provide backwards compatibility.) *Both* may
be defined, in which case NOT_FOR_PLATFORM takes precedence.
- Also do some significant aesthetic cleanup, based on the idea
`define platform-specific overrides first, then define a generic case
with the ?= operator'. Lots more of this to do yet.
1999-05-24 20:42:00 +02:00
|
|
|
GNU_ARCH.arm32?= arm
|
2015-10-17 03:50:46 +02:00
|
|
|
GNU_ARCH.amd64?= x86_64
|
2014-11-19 00:36:07 +01:00
|
|
|
GNU_ARCH.earm?= arm
|
|
|
|
GNU_ARCH.earmhf?= arm
|
|
|
|
GNU_ARCH.earmeb?= armeb
|
|
|
|
GNU_ARCH.earmhfeb?= armeb
|
|
|
|
GNU_ARCH.earmv4?= armv4
|
|
|
|
GNU_ARCH.earmv4eb?= armv4eb
|
|
|
|
GNU_ARCH.earmv5?= arm
|
|
|
|
GNU_ARCH.earmv5eb?= armeb
|
|
|
|
GNU_ARCH.earmv6?= armv6
|
|
|
|
GNU_ARCH.earmv6hf?= armv6
|
|
|
|
GNU_ARCH.earmv6eb?= armv6eb
|
|
|
|
GNU_ARCH.earmv6hfeb?= armv6eb
|
|
|
|
GNU_ARCH.earmv7?= armv7
|
|
|
|
GNU_ARCH.earmv7hf?= armv7
|
|
|
|
GNU_ARCH.earmv7eb?= armv7eb
|
|
|
|
GNU_ARCH.earmv7hfeb?= armv7eb
|
|
|
|
GNU_ARCH.i386?= i486
|
|
|
|
GNU_ARCH.i586?= i486
|
|
|
|
GNU_ARCH.i686?= i486
|
2002-03-18 06:46:42 +01:00
|
|
|
GNU_ARCH.m68000?= m68010
|
Implement some parts of proposals posted to tech-pkg:
- Define OS_VERSION in bsd.prefs.mk (...if not already defined). Previously
was only set in a conditional block in bsd.pkg.mk.
- Define new values, MACHINE_PLATFORM and MACHINE_GNU_PLATFORM, which
default to ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH} and
${LOWER_OPSYS}-${LOWER_VENDOR}-${LOWER_ARCH} respectively.
(Probably should nuke LOWER_ARCH and rename LOWER_VENDOR to something
like MACHINE_GNU_VENDOR.)
- Use ${MACHINE_GNU_PLATFORM} as the argument to `--host' in GNU_CONFIGURE
packages.
- Allow for ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM, lists of patterns
in csh(1) glob style which are matched against MACHINE_PLATFORM above
and take the place of {ONLY,NOT}_FOR_{ARCHS,OPSYS}. (For now, until
all pkgs are converted, provide backwards compatibility.) *Both* may
be defined, in which case NOT_FOR_PLATFORM takes precedence.
- Also do some significant aesthetic cleanup, based on the idea
`define platform-specific overrides first, then define a generic case
with the ?= operator'. Lots more of this to do yet.
1999-05-24 20:42:00 +02:00
|
|
|
GNU_ARCH.mips?= mipsel
|
2002-03-18 06:46:42 +01:00
|
|
|
GNU_ARCH.sh3eb?= sh
|
|
|
|
GNU_ARCH.sh3el?= shle
|
2014-11-19 00:36:07 +01:00
|
|
|
GNU_ARCH.mips64eb?= mips64
|
2007-08-01 18:14:17 +02:00
|
|
|
NATIVE_MACHINE_GNU_ARCH?= ${GNU_ARCH.${NATIVE_MACHINE_ARCH}:U${NATIVE_MACHINE_ARCH}}
|
|
|
|
MACHINE_GNU_ARCH?= ${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}}
|
1998-08-19 18:23:40 +02:00
|
|
|
|
2010-04-30 05:29:55 +02:00
|
|
|
## If changes are made to how OS_VERSION is set below please keep
|
|
|
|
## "pkgsrc/pkgtools/osabi/INSTALL" in-sync.
|
1999-07-08 09:58:42 +02:00
|
|
|
.if ${OPSYS} == "NetBSD"
|
|
|
|
LOWER_OPSYS?= netbsd
|
2001-08-24 11:00:44 +02:00
|
|
|
|
2005-11-01 17:18:33 +01:00
|
|
|
.elif ${OPSYS} == "AIX"
|
|
|
|
. if exists(/usr/bin/oslevel)
|
|
|
|
_OS_VERSION!= /usr/bin/oslevel
|
|
|
|
. else
|
|
|
|
_OS_VERSION!= echo `${UNAME} -v`.`${UNAME} -r`
|
|
|
|
. endif
|
2011-01-31 09:18:44 +01:00
|
|
|
OS_VERSION= ${_OS_VERSION:C/([0-9]*\.[0-9]*).*/\1/}
|
2005-11-01 17:18:33 +01:00
|
|
|
LOWER_OPSYS_VERSUFFIX= ${_OS_VERSION}
|
|
|
|
LOWER_OPSYS?= aix
|
|
|
|
LOWER_VENDOR?= ibm
|
|
|
|
|
2003-12-11 23:35:50 +01:00
|
|
|
.elif ${OPSYS} == "BSDOS"
|
|
|
|
LOWER_OPSYS?= bsdi
|
|
|
|
|
2015-06-04 17:48:45 +02:00
|
|
|
.elif ${OPSYS} == "Bitrig"
|
|
|
|
LOWER_OPSYS?= bitrig
|
|
|
|
LOWER_VENDOR?= unknown
|
|
|
|
|
2013-02-10 13:25:17 +01:00
|
|
|
.elif ${OPSYS} == "Cygwin"
|
|
|
|
LOWER_OPSYS?= cygwin
|
|
|
|
LOWER_VENDOR?= pc
|
|
|
|
_OS_VERSION!= ${UNAME} -r
|
|
|
|
OS_VERSION= ${_OS_VERSION:C/\(.*\)//}
|
2013-02-15 10:19:17 +01:00
|
|
|
OS_VARIANT!= ${UNAME} -s
|
2013-02-10 13:25:17 +01:00
|
|
|
|
2005-11-01 17:18:33 +01:00
|
|
|
.elif ${OPSYS} == "Darwin"
|
|
|
|
LOWER_OPSYS?= darwin
|
2007-07-30 16:07:07 +02:00
|
|
|
LOWER_OPSYS_VERSUFFIX= ${LOWER_OS_VERSION:C/([0-9]*).*/\1/}
|
2005-11-01 17:18:33 +01:00
|
|
|
LOWER_VENDOR?= apple
|
2002-11-17 16:11:40 +01:00
|
|
|
|
2004-10-31 23:05:02 +01:00
|
|
|
.elif ${OPSYS} == "DragonFly"
|
2006-01-12 15:57:19 +01:00
|
|
|
OS_VERSION:= ${OS_VERSION:C/-.*$//}
|
2004-10-31 23:05:02 +01:00
|
|
|
LOWER_OPSYS?= dragonfly
|
|
|
|
LOWER_VENDOR?= pc
|
|
|
|
|
2005-11-01 17:18:33 +01:00
|
|
|
.elif ${OPSYS} == "FreeBSD"
|
2007-07-17 11:20:18 +02:00
|
|
|
OS_VERSION:= ${OS_VERSION:C/-.*$//}
|
2005-11-01 17:18:33 +01:00
|
|
|
LOWER_OPSYS?= freebsd
|
2007-07-30 16:07:07 +02:00
|
|
|
LOWER_OPSYS_VERSUFFIX= ${LOWER_OS_VERSION:C/([0-9]*).*/\1/}
|
2016-01-24 17:14:44 +01:00
|
|
|
. if ${MACHINE_ARCH} == "i386"
|
2005-11-01 17:18:33 +01:00
|
|
|
LOWER_VENDOR?= pc
|
2002-10-12 19:17:22 +02:00
|
|
|
. endif
|
2005-11-01 17:30:05 +01:00
|
|
|
LOWER_VENDOR?= unknown
|
2005-11-01 17:18:33 +01:00
|
|
|
|
2010-02-06 12:40:22 +01:00
|
|
|
.elif ${OPSYS} == "Haiku"
|
|
|
|
LOWER_OPSYS?= haiku
|
|
|
|
. if ${MACHINE_ARCH} == "i386"
|
|
|
|
LOWER_VENDOR?= pc
|
|
|
|
. endif
|
|
|
|
|
2005-11-01 17:18:33 +01:00
|
|
|
.elif ${OPSYS} == "Interix"
|
2007-10-16 13:51:21 +02:00
|
|
|
LOWER_OPSYS?= interix
|
2005-11-01 17:18:33 +01:00
|
|
|
LOWER_VENDOR?= pc
|
2009-12-13 09:19:45 +01:00
|
|
|
. if exists(/usr/lib/libc.so.5.2) || exists(/usr/lib/x86/libc.so.5.2)
|
|
|
|
LOWER_OPSYS_VERSUFFIX= ${LOWER_OS_VERSION:C/([0-9]*).*/\1/}
|
|
|
|
. else
|
|
|
|
LOWER_OPSYS_VERSUFFIX?= 3
|
|
|
|
. if exists(/usr/lib/libc.so.3.5)
|
2005-11-01 17:30:05 +01:00
|
|
|
OS_VERSION= 3.5
|
2009-12-13 09:19:45 +01:00
|
|
|
. elif exists(/usr/lib/libc.so.3.1)
|
2005-11-01 17:30:05 +01:00
|
|
|
OS_VERSION= 3.1
|
2009-12-13 09:19:45 +01:00
|
|
|
. else
|
2005-11-01 17:30:05 +01:00
|
|
|
OS_VERSION= 3.0
|
2009-12-13 09:19:45 +01:00
|
|
|
. endif
|
2005-11-01 17:30:05 +01:00
|
|
|
. endif
|
2005-11-01 17:18:33 +01:00
|
|
|
|
2011-01-23 20:07:24 +01:00
|
|
|
.elif ${OPSYS} == "MirBSD"
|
|
|
|
LOWER_OPSYS?= mirbsd
|
|
|
|
LOWER_OS_VERSION= ${OS_VERSION}
|
|
|
|
LOWER_OPSYS_VERSUFFIX= ${OS_VERSION}
|
|
|
|
LOWER_VENDOR?= unknown
|
|
|
|
|
2005-11-01 17:18:33 +01:00
|
|
|
.elif !empty(OPSYS:MIRIX*)
|
2007-10-16 13:51:21 +02:00
|
|
|
LOWER_OPSYS?= irix
|
|
|
|
LOWER_OPSYS_VERSUFFIX?= ${OS_VERSION}
|
2005-11-01 17:18:33 +01:00
|
|
|
LOWER_VENDOR?= sgi
|
2001-08-24 11:00:44 +02:00
|
|
|
|
1999-07-08 09:58:42 +02:00
|
|
|
.elif ${OPSYS} == "Linux"
|
2007-10-13 21:38:53 +02:00
|
|
|
OS_VERSION:= ${OS_VERSION:C/-.*$//}
|
1999-07-08 09:58:42 +02:00
|
|
|
LOWER_OPSYS?= linux
|
2017-11-03 19:07:40 +01:00
|
|
|
. if exists(/etc/lsb-release)
|
|
|
|
CHROMEOS_RELEASE_NAME!= awk -F = '$$1 == "CHROMEOS_RELEASE_NAME" { print $$2 }' /etc/lsb-release
|
|
|
|
. endif
|
2003-01-25 23:39:56 +01:00
|
|
|
. if exists(/etc/debian_version)
|
|
|
|
LOWER_VENDOR?= debian
|
|
|
|
. elif exists(/etc/mandrake-release)
|
|
|
|
LOWER_VENDOR?= mandrake
|
2014-03-07 15:52:12 +01:00
|
|
|
. elif exists(/etc/redhat-version) || exists(/etc/redhat-release)
|
2003-01-25 23:39:56 +01:00
|
|
|
LOWER_VENDOR?= redhat
|
|
|
|
. elif exists(/etc/slackware-version)
|
|
|
|
LOWER_VENDOR?= slackware
|
2010-01-16 03:16:35 +01:00
|
|
|
. elif exists(/etc/ssdlinux_version)
|
|
|
|
LOWER_VENDOR?= ssd
|
2017-11-03 19:07:40 +01:00
|
|
|
. elif !empty(CHROMEOS_RELEASE_NAME)
|
|
|
|
LOWER_VENDOR?= chromeos
|
2016-04-17 10:13:09 +02:00
|
|
|
. elif ${MACHINE_ARCH} == "i386"
|
2003-01-25 23:39:56 +01:00
|
|
|
LOWER_VENDOR?= pc
|
2000-06-03 09:16:51 +02:00
|
|
|
. endif
|
2005-11-01 17:30:05 +01:00
|
|
|
LOWER_VENDOR?= unknown
|
2017-11-03 19:07:40 +01:00
|
|
|
OS_VARIANT= ${LOWER_VENDOR}
|
2016-03-17 17:02:23 +01:00
|
|
|
. if !defined(HOST_MACHINE_ARCH)
|
|
|
|
HOST_MACHINE_ARCH!= ${UNAME} -m
|
|
|
|
MAKEFLAGS+= HOST_MACHINE_ARCH=${HOST_MACHINE_ARCH:Q}
|
|
|
|
. endif
|
1999-08-12 16:16:25 +02:00
|
|
|
|
2015-11-07 14:35:44 +01:00
|
|
|
.elif ${OPSYS} == "OpenBSD"
|
|
|
|
LOWER_OPSYS?= openbsd
|
|
|
|
|
2004-11-20 05:37:08 +01:00
|
|
|
.elif ${OPSYS} == "OSF1"
|
2005-11-01 17:30:05 +01:00
|
|
|
OS_VERSION:= ${OS_VERSION:C/^V//}
|
2007-10-16 13:34:16 +02:00
|
|
|
LOWER_OPSYS?= osf1
|
|
|
|
LOWER_OPSYS_VERSUFFIX?= ${OS_VERSION}
|
2004-11-20 05:37:08 +01:00
|
|
|
LOWER_VENDOR?= dec
|
|
|
|
|
2007-04-14 16:17:49 +02:00
|
|
|
.elif ${OPSYS} == "HPUX"
|
|
|
|
OS_VERSION:= ${OS_VERSION:C/^B.//}
|
2007-10-16 13:34:16 +02:00
|
|
|
LOWER_OPSYS?= hpux
|
|
|
|
LOWER_OPSYS_VERSUFFIX?= ${OS_VERSION}
|
|
|
|
LOWER_VENDOR?= hp
|
2007-04-14 16:17:49 +02:00
|
|
|
|
2005-11-01 17:18:33 +01:00
|
|
|
.elif ${OPSYS} == "SunOS"
|
|
|
|
LOWER_VENDOR?= sun
|
|
|
|
LOWER_OPSYS?= solaris
|
2011-10-26 18:01:14 +02:00
|
|
|
LOWER_OPSYS_VERSUFFIX= 2.${OS_VERSION:C/5.//}
|
2012-07-02 17:49:41 +02:00
|
|
|
_UNAME_V!= ${UNAME} -v
|
|
|
|
. if !empty(_UNAME_V:Mjoyent_*)
|
|
|
|
OS_VARIANT= SmartOS
|
2015-07-25 17:11:09 +02:00
|
|
|
LOWER_VARIANT_VERSION= ${_UNAME_V:C/joyent_//}
|
2014-02-22 10:40:52 +01:00
|
|
|
. elif !empty(_UNAME_V:Momnios-*)
|
2013-07-19 16:29:16 +02:00
|
|
|
OS_VARIANT= OmniOS
|
2016-03-11 05:58:51 +01:00
|
|
|
LOWER_VARIANT_VERSION!= /usr/bin/awk '{ print $$3; exit 0; }' /etc/release
|
|
|
|
. else
|
2016-03-11 06:42:35 +01:00
|
|
|
OS_VARIANT= Solaris
|
2016-03-11 05:58:51 +01:00
|
|
|
LOWER_VARIANT_VERSION= ${_UNAME_V}
|
2012-07-02 17:49:41 +02:00
|
|
|
. endif
|
2005-02-17 08:11:59 +01:00
|
|
|
|
2014-03-14 23:05:18 +01:00
|
|
|
.elif ${OPSYS} == "SCO_SV"
|
|
|
|
SCO_RELEASE!= ${UNAME} -r
|
|
|
|
SCO_VERSION!= ${UNAME} -v
|
|
|
|
LOWER_VENDOR?= pc
|
2015-02-16 11:43:36 +01:00
|
|
|
LOWER_OPSYS?= sco
|
|
|
|
LOWER_OPSYS_VERSUFFIX= ${SCO_RELEASE}v${SCO_VERSION}
|
2014-03-14 23:05:18 +01:00
|
|
|
_UNAME_V!= ${UNAME} -v
|
|
|
|
. if !empty(_UNAME_V:M5.0*)
|
|
|
|
OS_VARIANT= SCOOSR5
|
|
|
|
. elif !empty(_UNAME_V:M6.0*)
|
|
|
|
OS_VARIANT= SCOOSR6
|
|
|
|
. endif
|
|
|
|
|
2013-03-01 01:07:46 +01:00
|
|
|
.elif ${OPSYS} == "Minix"
|
|
|
|
LOWER_VENDOR?= pc
|
|
|
|
LOWER_OPSYS:= ${OPSYS:tl}
|
|
|
|
LDFLAGS+= -lcompat_minix -lminlib
|
|
|
|
|
1999-07-08 09:58:42 +02:00
|
|
|
.elif !defined(LOWER_OPSYS)
|
2008-01-29 14:04:05 +01:00
|
|
|
LOWER_OPSYS:= ${OPSYS:tl}
|
Implement some parts of proposals posted to tech-pkg:
- Define OS_VERSION in bsd.prefs.mk (...if not already defined). Previously
was only set in a conditional block in bsd.pkg.mk.
- Define new values, MACHINE_PLATFORM and MACHINE_GNU_PLATFORM, which
default to ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH} and
${LOWER_OPSYS}-${LOWER_VENDOR}-${LOWER_ARCH} respectively.
(Probably should nuke LOWER_ARCH and rename LOWER_VENDOR to something
like MACHINE_GNU_VENDOR.)
- Use ${MACHINE_GNU_PLATFORM} as the argument to `--host' in GNU_CONFIGURE
packages.
- Allow for ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM, lists of patterns
in csh(1) glob style which are matched against MACHINE_PLATFORM above
and take the place of {ONLY,NOT}_FOR_{ARCHS,OPSYS}. (For now, until
all pkgs are converted, provide backwards compatibility.) *Both* may
be defined, in which case NOT_FOR_PLATFORM takes precedence.
- Also do some significant aesthetic cleanup, based on the idea
`define platform-specific overrides first, then define a generic case
with the ?= operator'. Lots more of this to do yet.
1999-05-24 20:42:00 +02:00
|
|
|
.endif
|
2001-08-24 11:00:44 +02:00
|
|
|
|
2005-11-01 17:30:05 +01:00
|
|
|
# Now commit the [LOWER_]OS_VERSION values computed above, eliding the :sh
|
|
|
|
OS_VERSION:= ${OS_VERSION}
|
2008-01-29 14:04:05 +01:00
|
|
|
LOWER_OS_VERSION:= ${OS_VERSION:tl}
|
2005-11-01 17:30:05 +01:00
|
|
|
|
2005-12-05 23:07:07 +01:00
|
|
|
MAKEFLAGS+= LOWER_OPSYS=${LOWER_OPSYS:Q}
|
Implement some parts of proposals posted to tech-pkg:
- Define OS_VERSION in bsd.prefs.mk (...if not already defined). Previously
was only set in a conditional block in bsd.pkg.mk.
- Define new values, MACHINE_PLATFORM and MACHINE_GNU_PLATFORM, which
default to ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH} and
${LOWER_OPSYS}-${LOWER_VENDOR}-${LOWER_ARCH} respectively.
(Probably should nuke LOWER_ARCH and rename LOWER_VENDOR to something
like MACHINE_GNU_VENDOR.)
- Use ${MACHINE_GNU_PLATFORM} as the argument to `--host' in GNU_CONFIGURE
packages.
- Allow for ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM, lists of patterns
in csh(1) glob style which are matched against MACHINE_PLATFORM above
and take the place of {ONLY,NOT}_FOR_{ARCHS,OPSYS}. (For now, until
all pkgs are converted, provide backwards compatibility.) *Both* may
be defined, in which case NOT_FOR_PLATFORM takes precedence.
- Also do some significant aesthetic cleanup, based on the idea
`define platform-specific overrides first, then define a generic case
with the ?= operator'. Lots more of this to do yet.
1999-05-24 20:42:00 +02:00
|
|
|
|
2007-08-01 18:14:17 +02:00
|
|
|
LOWER_VENDOR?= # empty ("arch--opsys")
|
|
|
|
|
2016-01-24 17:14:44 +01:00
|
|
|
NATIVE_MACHINE_ARCH:= ${MACHINE_ARCH}
|
2007-08-01 18:14:17 +02:00
|
|
|
NATIVE_MACHINE_PLATFORM?= ${OPSYS}-${OS_VERSION}-${NATIVE_MACHINE_ARCH}
|
|
|
|
MACHINE_PLATFORM?= ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH}
|
2015-02-14 06:01:32 +01:00
|
|
|
NATIVE_MACHINE_GNU_PLATFORM?= ${NATIVE_MACHINE_GNU_ARCH}-${LOWER_VENDOR}-${LOWER_OPSYS:C/[0-9]//g}${NATIVE_APPEND_ELF}${LOWER_OPSYS_VERSUFFIX}${NATIVE_APPEND_ABI}
|
|
|
|
MACHINE_GNU_PLATFORM?= ${MACHINE_GNU_ARCH}-${LOWER_VENDOR}-${LOWER_OPSYS:C/[0-9]//g}${APPEND_ELF}${LOWER_OPSYS_VERSUFFIX}${APPEND_ABI}
|
Implement some parts of proposals posted to tech-pkg:
- Define OS_VERSION in bsd.prefs.mk (...if not already defined). Previously
was only set in a conditional block in bsd.pkg.mk.
- Define new values, MACHINE_PLATFORM and MACHINE_GNU_PLATFORM, which
default to ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH} and
${LOWER_OPSYS}-${LOWER_VENDOR}-${LOWER_ARCH} respectively.
(Probably should nuke LOWER_ARCH and rename LOWER_VENDOR to something
like MACHINE_GNU_VENDOR.)
- Use ${MACHINE_GNU_PLATFORM} as the argument to `--host' in GNU_CONFIGURE
packages.
- Allow for ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM, lists of patterns
in csh(1) glob style which are matched against MACHINE_PLATFORM above
and take the place of {ONLY,NOT}_FOR_{ARCHS,OPSYS}. (For now, until
all pkgs are converted, provide backwards compatibility.) *Both* may
be defined, in which case NOT_FOR_PLATFORM takes precedence.
- Also do some significant aesthetic cleanup, based on the idea
`define platform-specific overrides first, then define a generic case
with the ?= operator'. Lots more of this to do yet.
1999-05-24 20:42:00 +02:00
|
|
|
|
2004-02-14 04:26:09 +01:00
|
|
|
# Needed to prevent an "install:" target from being created in bsd.own.mk.
|
2001-09-21 17:28:35 +02:00
|
|
|
NEED_OWN_INSTALL_TARGET=no
|
|
|
|
|
2001-11-28 20:58:13 +01:00
|
|
|
# This prevents default use of the cross-tool harness in the "src" tree,
|
|
|
|
# in the odd possible case of someone extracting "pkgsrc" underneath "src".
|
|
|
|
USETOOLS= no
|
|
|
|
MAKE_ENV+= USETOOLS=no
|
|
|
|
|
2002-05-31 00:15:40 +02:00
|
|
|
# Set this before <bsd.own.mk> does, since it doesn't know about Darwin
|
|
|
|
.if ${OPSYS} == "Darwin"
|
|
|
|
OBJECT_FMT?= Mach-O
|
|
|
|
.endif
|
|
|
|
|
2007-10-17 12:37:43 +02:00
|
|
|
ACCEPTABLE_LICENSES?= ${DEFAULT_ACCEPTABLE_LICENSES}
|
2007-08-13 11:03:41 +02:00
|
|
|
|
2007-08-01 14:21:56 +02:00
|
|
|
# Provide PKGPATH early on so that mk.conf can use it.
|
|
|
|
PKGPATH?= ${.CURDIR:C|.*/([^/]*/[^/]*)$|\1|}
|
|
|
|
|
2005-11-10 10:09:26 +01:00
|
|
|
# Load the settings from MAKECONF, which is /etc/mk.conf by default.
|
2002-06-21 23:06:48 +02:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
2003-09-17 07:14:40 +02:00
|
|
|
.if ${OPSYS} == "OpenBSD"
|
|
|
|
. if defined(ELF_TOOLCHAIN) && ${ELF_TOOLCHAIN} == "yes"
|
|
|
|
OBJECT_FMT?= ELF
|
|
|
|
. else
|
|
|
|
OBJECT_FMT?= a.out
|
|
|
|
. endif
|
2014-04-07 19:25:16 +02:00
|
|
|
.elif ${OPSYS} == "FreeBSD"
|
|
|
|
OBJECT_FMT?= ELF
|
2005-02-19 02:28:14 +01:00
|
|
|
.elif ${OPSYS} == "DragonFly"
|
|
|
|
OBJECT_FMT= ELF
|
2011-01-23 20:07:24 +01:00
|
|
|
.elif ${OPSYS} == "MirBSD"
|
|
|
|
OBJECT_FMT= ELF
|
|
|
|
MKPROFILE= no
|
2015-09-08 14:07:55 +02:00
|
|
|
.elif ${OPSYS} == "Linux"
|
|
|
|
OBJECT_FMT= ELF
|
2005-02-19 02:28:14 +01:00
|
|
|
.elif ${OPSYS} == "AIX"
|
|
|
|
OBJECT_FMT= XCOFF
|
2007-04-11 21:09:24 +02:00
|
|
|
.elif ${OPSYS} == "OSF1"
|
|
|
|
OBJECT_FMT= ECOFF
|
2007-04-14 16:17:49 +02:00
|
|
|
.elif ${OPSYS} == "HPUX"
|
2015-04-27 12:33:49 +02:00
|
|
|
. if ${MACHINE_ARCH} == "ia64"
|
2007-04-14 16:17:49 +02:00
|
|
|
OBJECT_FMT= ELF
|
2015-04-27 12:33:49 +02:00
|
|
|
. elif ${MACHINE_ARCH} == "hppa64"
|
|
|
|
# it is ELF but for most purposes behaves like SOM (.sl suffix, ...)
|
|
|
|
OBJECT_FMT= SOM
|
|
|
|
. else # hppa
|
2007-04-14 16:17:49 +02:00
|
|
|
OBJECT_FMT= SOM
|
|
|
|
. endif
|
2013-02-10 13:25:17 +01:00
|
|
|
.elif ${OPSYS} == "Cygwin"
|
|
|
|
OBJECT_FMT= PE
|
2004-10-31 23:05:02 +01:00
|
|
|
.endif
|
|
|
|
|
2004-09-27 14:00:56 +02:00
|
|
|
# Calculate depth
|
2004-10-06 22:59:40 +02:00
|
|
|
.if exists(${.CURDIR}/mk/bsd.pkg.mk)
|
2004-10-07 04:01:37 +02:00
|
|
|
_PKGSRC_TOPDIR= ${.CURDIR}
|
2004-09-27 14:00:56 +02:00
|
|
|
.elif exists(${.CURDIR}/../mk/bsd.pkg.mk)
|
2004-10-07 04:01:37 +02:00
|
|
|
_PKGSRC_TOPDIR= ${.CURDIR}/..
|
2004-10-06 22:59:40 +02:00
|
|
|
.elif exists(${.CURDIR}/../../mk/bsd.pkg.mk)
|
2004-10-07 04:01:37 +02:00
|
|
|
_PKGSRC_TOPDIR= ${.CURDIR}/../..
|
2004-09-27 14:00:56 +02:00
|
|
|
.endif
|
|
|
|
|
2001-09-18 23:30:05 +02:00
|
|
|
# include the defaults file
|
2007-08-13 11:03:41 +02:00
|
|
|
.include "${_PKGSRC_TOPDIR}/mk/defaults/mk.conf"
|
2001-09-18 23:30:05 +02:00
|
|
|
|
Implement some parts of proposals posted to tech-pkg:
- Define OS_VERSION in bsd.prefs.mk (...if not already defined). Previously
was only set in a conditional block in bsd.pkg.mk.
- Define new values, MACHINE_PLATFORM and MACHINE_GNU_PLATFORM, which
default to ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH} and
${LOWER_OPSYS}-${LOWER_VENDOR}-${LOWER_ARCH} respectively.
(Probably should nuke LOWER_ARCH and rename LOWER_VENDOR to something
like MACHINE_GNU_VENDOR.)
- Use ${MACHINE_GNU_PLATFORM} as the argument to `--host' in GNU_CONFIGURE
packages.
- Allow for ONLY_FOR_PLATFORM and NOT_FOR_PLATFORM, lists of patterns
in csh(1) glob style which are matched against MACHINE_PLATFORM above
and take the place of {ONLY,NOT}_FOR_{ARCHS,OPSYS}. (For now, until
all pkgs are converted, provide backwards compatibility.) *Both* may
be defined, in which case NOT_FOR_PLATFORM takes precedence.
- Also do some significant aesthetic cleanup, based on the idea
`define platform-specific overrides first, then define a generic case
with the ?= operator'. Lots more of this to do yet.
1999-05-24 20:42:00 +02:00
|
|
|
SHAREOWN?= ${DOCOWN}
|
|
|
|
SHAREGRP?= ${DOCGRP}
|
|
|
|
SHAREMODE?= ${DOCMODE}
|
1998-06-03 13:15:29 +02:00
|
|
|
|
1998-08-19 18:23:40 +02:00
|
|
|
.if defined(PREFIX) && (${PREFIX} != ${__PREFIX_SET__})
|
1998-08-11 21:30:48 +02:00
|
|
|
.BEGIN:
|
2006-08-26 21:07:00 +02:00
|
|
|
@${ECHO_MSG} "You CANNOT set PREFIX manually or in mk.conf. Set LOCALBASE or X11BASE"
|
|
|
|
@${ECHO_MSG} "depending on your needs. See the pkg system documentation for more info."
|
1998-08-11 21:30:48 +02:00
|
|
|
@${FALSE}
|
|
|
|
.endif
|
1999-05-24 00:10:01 +02:00
|
|
|
|
2001-06-14 18:04:06 +02:00
|
|
|
# Load the OS-specific definitions for program variables. Default to loading
|
|
|
|
# the NetBSD ones if an OS-specific file doesn't exist.
|
2004-10-07 04:01:37 +02:00
|
|
|
.if exists(${_PKGSRC_TOPDIR}/mk/platform/${OPSYS}.mk)
|
|
|
|
. include "${_PKGSRC_TOPDIR}/mk/platform/${OPSYS}.mk"
|
2005-01-27 05:16:47 +01:00
|
|
|
.else
|
2004-10-07 04:01:37 +02:00
|
|
|
. include "${_PKGSRC_TOPDIR}/mk/platform/NetBSD.mk"
|
2005-01-27 05:16:47 +01:00
|
|
|
PKG_FAIL_REASON+= "missing mk/platform/${OPSYS}.mk"
|
2001-06-14 18:04:06 +02:00
|
|
|
.endif
|
|
|
|
|
2017-06-01 00:55:01 +02:00
|
|
|
# Set default SHLIB_TYPE to the ${OPSYS}-specific shared library type.
|
|
|
|
SHLIB_TYPE?= ${_OPSYS_SHLIB_TYPE}
|
|
|
|
|
2004-04-26 19:29:33 +02:00
|
|
|
PKGDIRMODE?= 755
|
2004-01-21 19:13:27 +01:00
|
|
|
|
2008-06-12 03:09:01 +02:00
|
|
|
# A meta-package is a package that does not have any files and whose
|
|
|
|
# only purpose is to depend on other packages, giving that collection
|
|
|
|
# a simple name.
|
|
|
|
#
|
2008-06-16 17:10:48 +02:00
|
|
|
# This variable must be set before including bsd.prefs.mk directly or
|
|
|
|
# indirectly.
|
|
|
|
#
|
2008-06-12 03:09:01 +02:00
|
|
|
# Keywords: meta meta-package META_PACKAGE
|
|
|
|
#
|
|
|
|
.if defined(META_PACKAGE)
|
|
|
|
PKG_DESTDIR_SUPPORT= user-destdir
|
|
|
|
NO_CONFIGURE= yes
|
|
|
|
NO_BUILD= yes
|
|
|
|
DISTFILES= # none
|
|
|
|
PLIST_SRC= # none
|
2009-04-09 01:02:03 +02:00
|
|
|
CHECK_PERMS= no
|
2009-04-09 01:03:14 +02:00
|
|
|
USE_LANGUAGES= # empty
|
2015-04-19 03:37:55 +02:00
|
|
|
WRKSRC= ${WRKDIR}
|
|
|
|
|
2008-06-12 03:09:01 +02:00
|
|
|
do-patch:
|
|
|
|
@${DO_NADA}
|
|
|
|
do-install:
|
|
|
|
@${DO_NADA}
|
|
|
|
.endif
|
|
|
|
|
2016-04-10 17:08:39 +02:00
|
|
|
# PKG_DESTDIR_SUPPORT can only be one of "destdir", or "user-destdir".
|
2012-08-14 19:16:07 +02:00
|
|
|
PKG_DESTDIR_SUPPORT?= user-destdir
|
2006-10-09 14:25:44 +02:00
|
|
|
|
2016-04-10 17:08:39 +02:00
|
|
|
.if ${PKG_DESTDIR_SUPPORT} == "user-destdir"
|
2006-10-09 14:25:44 +02:00
|
|
|
_USE_DESTDIR= user-destdir
|
|
|
|
.elif ${PKG_DESTDIR_SUPPORT} == "destdir"
|
|
|
|
_USE_DESTDIR= destdir
|
|
|
|
.else
|
2016-04-10 17:08:39 +02:00
|
|
|
PKG_FAIL_REASON+= "PKG_DESTDIR_SUPPORT must be \`\`destdir'' or \`\`user-destdir''."
|
2006-10-09 14:25:44 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
# When using staged installation, everything gets installed into
|
|
|
|
# ${DESTDIR}${PREFIX} instead of ${PREFIX} directly.
|
|
|
|
#
|
|
|
|
DESTDIR= ${WRKDIR}/.destdir
|
2016-04-10 17:58:02 +02:00
|
|
|
.if ${_USE_DESTDIR} == "destdir"
|
2006-10-09 14:25:44 +02:00
|
|
|
_MAKE_PACKAGE_AS_ROOT= yes
|
|
|
|
_MAKE_CLEAN_AS_ROOT= yes
|
|
|
|
_MAKE_INSTALL_AS_ROOT= yes
|
2016-04-10 17:58:02 +02:00
|
|
|
.else
|
2006-10-09 14:25:44 +02:00
|
|
|
_MAKE_PACKAGE_AS_ROOT= no
|
|
|
|
_MAKE_CLEAN_AS_ROOT= no
|
|
|
|
_MAKE_INSTALL_AS_ROOT= no
|
|
|
|
. endif
|
|
|
|
|
2014-12-07 00:28:18 +01:00
|
|
|
# controls whether binary packages are preserved in pkgsrc/packages/All
|
|
|
|
# default is no (to preserve settings since 2013/05/23, prior to that it
|
|
|
|
# was yes)
|
|
|
|
_KEEP_BIN_PKGS?= no
|
2014-12-07 07:22:52 +01:00
|
|
|
.if !empty(PKGSRC_KEEP_BIN_PKGS:U:M[Yy][Ee][Ss])
|
2014-12-07 00:28:18 +01:00
|
|
|
_KEEP_BIN_PKGS= yes
|
|
|
|
.endif
|
|
|
|
|
2006-10-09 13:44:06 +02:00
|
|
|
_MAKE_CLEAN_AS_ROOT?= no
|
|
|
|
# Whether to run the clean target as root.
|
2006-10-09 13:59:08 +02:00
|
|
|
_MAKE_INSTALL_AS_ROOT?= yes
|
|
|
|
# Whether to run the install target as root.
|
2006-10-09 13:44:06 +02:00
|
|
|
_MAKE_PACKAGE_AS_ROOT?= yes
|
|
|
|
# Whether to run the package target as root.
|
|
|
|
|
2007-08-02 20:19:31 +02:00
|
|
|
# When cross-compilation support is requested, the following options
|
|
|
|
# must be specified as well or guessable:
|
|
|
|
# - MACHINE_ARCH is set to TARGET_ARCH if set.
|
|
|
|
# - CROSS_DESTDIR is guessed from MAKEOBJDIR and MACHINE_ARCH.
|
|
|
|
# - PKG_DBDIR is expanded and prefixed with CROSS_DESTDIR
|
|
|
|
# - DESTDIR support is required
|
|
|
|
#
|
|
|
|
# _CROSS_DESTDIR is set for internal use to avoid conditionalising
|
|
|
|
# the use.
|
|
|
|
|
|
|
|
.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
|
|
|
|
. if defined(TARGET_ARCH)
|
|
|
|
MACHINE_ARCH= ${TARGET_ARCH}
|
|
|
|
. endif
|
|
|
|
CROSS_DESTDIR?= ${MAKEOBJDIR}/destdir.${MACHINE_ARCH}
|
|
|
|
. if !exists(${CROSS_DESTDIR}/usr/include/stddef.h)
|
|
|
|
PKG_FAIL_REASON+= "The cross-compiling root ${CROSS_DESTDIR:Q} is incomplete"
|
|
|
|
. else
|
|
|
|
_CROSS_DESTDIR= ${CROSS_DESTDIR}
|
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2007-08-15 15:25:47 +02:00
|
|
|
# Depends on MACHINE_ARCH override above
|
|
|
|
.if ${OPSYS} == "NetBSD"
|
2015-02-14 06:01:32 +01:00
|
|
|
# XXX NATIVE_OBJECT_FMT is a cop-out -- but seriously, who is going to
|
|
|
|
# do cross-builds on a NetBSD host that still uses a.out?
|
|
|
|
NATIVE_OBJECT_FMT?= ${OBJECT_FMT}
|
|
|
|
. if ${NATIVE_OBJECT_FMT} == "ELF" && \
|
2015-02-24 14:26:34 +01:00
|
|
|
(!empty(NATIVE_MACHINE_ARCH:Mearm*) || \
|
2015-02-14 06:01:32 +01:00
|
|
|
${NATIVE_MACHINE_GNU_ARCH} == "arm" || \
|
|
|
|
${NATIVE_MACHINE_ARCH} == "i386" || \
|
|
|
|
${NATIVE_MACHINE_ARCH} == "m68k" || \
|
|
|
|
${NATIVE_MACHINE_ARCH} == "m68000" || \
|
|
|
|
${NATIVE_MACHINE_GNU_ARCH} == "sh" || \
|
|
|
|
${NATIVE_MACHINE_GNU_ARCH} == "shle" || \
|
|
|
|
${NATIVE_MACHINE_ARCH} == "sparc" || \
|
|
|
|
${NATIVE_MACHINE_ARCH} == "vax")
|
|
|
|
NATIVE_APPEND_ELF= elf
|
|
|
|
. endif
|
2007-08-15 15:25:47 +02:00
|
|
|
. if ${OBJECT_FMT} == "ELF" && \
|
2015-02-14 06:01:32 +01:00
|
|
|
(!empty(MACHINE_ARCH:Mearm*) || \
|
|
|
|
${MACHINE_GNU_ARCH} == "arm" || \
|
2007-08-15 15:25:47 +02:00
|
|
|
${MACHINE_ARCH} == "i386" || \
|
|
|
|
${MACHINE_ARCH} == "m68k" || \
|
|
|
|
${MACHINE_ARCH} == "m68000" || \
|
|
|
|
${MACHINE_GNU_ARCH} == "sh" || \
|
|
|
|
${MACHINE_GNU_ARCH} == "shle" || \
|
|
|
|
${MACHINE_ARCH} == "sparc" || \
|
|
|
|
${MACHINE_ARCH} == "vax")
|
|
|
|
APPEND_ELF= elf
|
|
|
|
. endif
|
2015-02-14 06:01:32 +01:00
|
|
|
. if !empty(NATIVE_MACHINE_ARCH:Mearm*)
|
|
|
|
NATIVE_APPEND_ABI= -${NATIVE_MACHINE_ARCH:C/eb//:C/v[4-7]//:S/earm/eabi/}
|
|
|
|
. endif
|
|
|
|
. if !empty(MACHINE_ARCH:Mearm*)
|
|
|
|
APPEND_ABI= -${MACHINE_ARCH:C/eb//:C/v[4-7]//:S/earm/eabi/}
|
|
|
|
. endif
|
2007-08-15 15:25:47 +02:00
|
|
|
.endif
|
|
|
|
|
2002-12-18 07:18:14 +01:00
|
|
|
# if the system is IPv6-ready, compile with IPv6 support turned on.
|
2007-09-08 00:12:10 +02:00
|
|
|
.if empty(_OPSYS_HAS_INET6:M[nN][oO])
|
|
|
|
IPV6_READY= YES
|
2003-12-27 14:28:46 +01:00
|
|
|
.else
|
2007-09-08 00:12:10 +02:00
|
|
|
IPV6_READY= NO
|
2003-12-27 14:28:46 +01:00
|
|
|
.endif
|
2002-12-18 07:18:14 +01:00
|
|
|
|
2006-10-06 16:51:36 +02:00
|
|
|
LOCALBASE?= /usr/pkg
|
2011-09-10 18:30:02 +02:00
|
|
|
X11_TYPE?= modular
|
2006-08-26 20:55:43 +02:00
|
|
|
.if !empty(X11_TYPE:Mnative)
|
2005-12-29 22:18:11 +01:00
|
|
|
. if ${OPSYS} == "SunOS"
|
2002-10-21 23:46:00 +02:00
|
|
|
# On Solaris, we default to using OpenWindows for X11.
|
2006-10-06 16:51:36 +02:00
|
|
|
X11BASE?= /usr/openwin
|
2013-02-23 03:59:56 +01:00
|
|
|
. elif ${OPSYS} == "Cygwin" || ${OPSYS} == "IRIX" || ${OPSYS} == "OSF1" || ${OPSYS} == "HPUX"
|
2006-10-06 16:51:36 +02:00
|
|
|
X11BASE?= /usr
|
2015-03-14 18:37:19 +01:00
|
|
|
. elif !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-*)
|
|
|
|
X11BASE?= /usr/X11R6
|
2009-09-13 15:28:46 +02:00
|
|
|
. elif !empty(MACHINE_PLATFORM:MDarwin-9.*-*) || \
|
2013-01-23 18:02:23 +01:00
|
|
|
!empty(MACHINE_PLATFORM:MDarwin-10.*-*) || \
|
|
|
|
!empty(MACHINE_PLATFORM:MDarwin-11.*-*)
|
2008-09-16 13:40:10 +02:00
|
|
|
X11BASE?= /usr/X11
|
2013-01-23 18:02:23 +01:00
|
|
|
. elif !empty(MACHINE_PLATFORM:MDarwin-??.*-*)
|
|
|
|
X11BASE?= /opt/X11
|
2011-11-28 01:00:49 +01:00
|
|
|
. elif ${OPSYS} == "NetBSD" && ${X11FLAVOUR:U} == "Xorg"
|
|
|
|
X11BASE?= /usr/X11R7
|
2008-10-05 23:36:32 +02:00
|
|
|
. elif exists(/usr/X11R7/lib/libX11.so)
|
|
|
|
X11BASE?= /usr/X11R7
|
2014-02-20 22:27:43 +01:00
|
|
|
. elif exists(/usr/lib/libX11.so) || exists(/usr/lib64/libX11.so)
|
|
|
|
X11BASE?= /usr
|
2005-12-29 22:18:11 +01:00
|
|
|
. else
|
2006-10-06 16:51:36 +02:00
|
|
|
X11BASE?= /usr/X11R6
|
2005-12-29 22:18:11 +01:00
|
|
|
. endif
|
2002-10-21 23:46:00 +02:00
|
|
|
.endif
|
2004-07-30 09:38:01 +02:00
|
|
|
CROSSBASE?= ${LOCALBASE}/cross
|
2001-03-13 10:53:37 +01:00
|
|
|
|
2008-01-16 04:16:39 +01:00
|
|
|
.if defined(FIX_SYSTEM_HEADERS) && ${FIX_SYSTEM_HEADERS} == "yes" && \
|
2008-06-22 18:25:32 +02:00
|
|
|
!defined(BOOTSTRAP_PKG) && \
|
2008-05-24 05:40:35 +02:00
|
|
|
exists(../../pkgtools/compat_headers/buildlink3.mk)
|
|
|
|
. include "../../pkgtools/compat_headers/buildlink3.mk"
|
2008-01-16 04:16:39 +01:00
|
|
|
.endif
|
|
|
|
|
2007-08-17 22:27:30 +02:00
|
|
|
.if ${X11_TYPE} == "modular"
|
2006-12-27 15:29:45 +01:00
|
|
|
X11BASE= ${LOCALBASE}
|
2005-11-09 02:06:48 +01:00
|
|
|
.endif
|
2002-09-15 13:58:22 +02:00
|
|
|
|
2006-09-22 23:53:56 +02:00
|
|
|
# Default directory for font encodings
|
2012-12-15 22:21:27 +01:00
|
|
|
.if ${X11_TYPE} == "modular"
|
2012-12-09 21:21:18 +01:00
|
|
|
X11_ENCODINGSDIR?= ${X11BASE}/share/fonts/X11/encodings
|
2012-12-15 22:21:27 +01:00
|
|
|
.else
|
|
|
|
X11_ENCODINGSDIR?= ${X11BASE}/lib/X11/fonts/encodings
|
|
|
|
.endif
|
2006-09-22 23:53:56 +02:00
|
|
|
|
2013-09-12 13:01:47 +02:00
|
|
|
CATMAN_SECTION_SUFFIX?= no
|
|
|
|
|
2012-03-19 13:34:12 +01:00
|
|
|
IMAKE_MAN_SOURCE_PATH= man/man
|
|
|
|
IMAKE_MAN_SUFFIX= 1
|
|
|
|
IMAKE_LIBMAN_SUFFIX= 3
|
|
|
|
IMAKE_KERNMAN_SUFFIX= 4
|
|
|
|
IMAKE_FILEMAN_SUFFIX= 5
|
|
|
|
IMAKE_GAMEMAN_SUFFIX= 6
|
|
|
|
IMAKE_MISCMAN_SUFFIX= 7
|
|
|
|
IMAKE_MAN_DIR= ${IMAKE_MAN_SOURCE_PATH}1
|
|
|
|
IMAKE_LIBMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}3
|
|
|
|
IMAKE_KERNMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}4
|
|
|
|
IMAKE_FILEMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}5
|
|
|
|
IMAKE_GAMEMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}6
|
|
|
|
IMAKE_MISCMAN_DIR= ${IMAKE_MAN_SOURCE_PATH}7
|
|
|
|
IMAKE_MANNEWSUFFIX= ${IMAKE_MAN_SUFFIX}
|
|
|
|
IMAKE_MANINSTALL?= maninstall
|
|
|
|
|
2004-08-27 08:29:06 +02:00
|
|
|
# LINK_RPATH_FLAG publicly exports the linker flag used to set the
|
|
|
|
# run-time library search path.
|
2003-03-14 20:37:30 +01:00
|
|
|
#
|
2004-08-27 08:29:06 +02:00
|
|
|
.if defined(_OPSYS_LINKER_RPATH_FLAG)
|
|
|
|
LINKER_RPATH_FLAG= ${_OPSYS_LINKER_RPATH_FLAG}
|
|
|
|
.else
|
|
|
|
LINKER_RPATH_FLAG?= ${_LINKER_RPATH_FLAG}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# COMPILER_RPATH_FLAG publicly exports the compiler flag used to pass
|
|
|
|
# run-time library search path directives to the linker.
|
|
|
|
#
|
|
|
|
.if defined(_OPSYS_COMPILER_RPATH_FLAG)
|
|
|
|
COMPILER_RPATH_FLAG= ${_OPSYS_COMPILER_RPATH_FLAG}
|
|
|
|
.else
|
|
|
|
COMPILER_RPATH_FLAG?= ${_COMPILER_RPATH_FLAG}
|
|
|
|
.endif
|
2002-09-15 13:58:22 +02:00
|
|
|
|
2013-04-28 15:21:47 +02:00
|
|
|
COMPILER_INCLUDE_DIRS?= ${_OPSYS_INCLUDE_DIRS:U/usr/include}
|
|
|
|
COMPILER_LIB_DIRS?= ${_OPSYS_LIB_DIRS:U/usr/lib${LIBABISUFFIX} /lib${LIBABISUFFIX}}
|
|
|
|
SYSTEM_DEFAULT_RPATH?= ${_OPSYS_SYSTEM_RPATH:U/usr/lib}
|
|
|
|
|
2006-07-11 00:17:58 +02:00
|
|
|
USE_TOOLS?= # empty
|
|
|
|
|
|
|
|
# Provide default values for TOOLs used by the top-level make.
|
|
|
|
USE_TOOLS+= [ awk dirname echo grep pwd sed test true
|
|
|
|
|
|
|
|
# These tools are used by the top-level make only in certain packages and
|
|
|
|
# should eventually be moved into those particular package Makefiles.
|
|
|
|
#
|
|
|
|
USE_TOOLS+= date tr
|
|
|
|
|
|
|
|
# These are tools used directly by bsd.prefs.mk and files included by
|
|
|
|
# bsd.prefs.mk.
|
|
|
|
#
|
|
|
|
USE_TOOLS+= awk:pkgsrc cut:pkgsrc echo:pkgsrc pwd:pkgsrc \
|
|
|
|
sed:pkgsrc tr:pkgsrc uname:pkgsrc
|
|
|
|
|
|
|
|
.include "${_PKGSRC_TOPDIR}/mk/tools/defaults.mk"
|
|
|
|
|
2013-12-20 00:50:29 +01:00
|
|
|
.if ${FETCH_USING} == "auto"
|
|
|
|
. if defined(TOOLS_PLATFORM.fetch)
|
|
|
|
FETCH_USING= fetch
|
|
|
|
. elif defined(TOOLS_PLATFORM.curl)
|
|
|
|
FETCH_USING= curl
|
2014-02-14 08:43:46 +01:00
|
|
|
. elif defined(TOOLS_PLATFORM.wget)
|
|
|
|
FETCH_USING= wget
|
2013-12-20 00:50:29 +01:00
|
|
|
. else
|
|
|
|
FETCH_USING= ftp
|
|
|
|
. endif
|
|
|
|
.endif
|
|
|
|
|
2004-10-07 15:42:26 +02:00
|
|
|
.if !defined(_PKGSRCDIR)
|
|
|
|
_PKGSRCDIR!= cd ${_PKGSRC_TOPDIR} && ${PWD_CMD}
|
|
|
|
MAKEFLAGS+= _PKGSRCDIR=${_PKGSRCDIR:Q}
|
2004-10-07 04:01:37 +02:00
|
|
|
.endif
|
2004-10-07 15:42:26 +02:00
|
|
|
PKGSRCDIR= ${_PKGSRCDIR}
|
2002-10-19 22:33:59 +02:00
|
|
|
|
2006-06-06 17:28:51 +02:00
|
|
|
DISTDIR?= ${PKGSRCDIR}/distfiles
|
2004-10-07 04:01:37 +02:00
|
|
|
PACKAGES?= ${PKGSRCDIR}/packages
|
|
|
|
TEMPLATES?= ${PKGSRCDIR}/templates
|
2002-10-19 22:33:59 +02:00
|
|
|
|
2006-06-06 17:28:51 +02:00
|
|
|
PATCHDIR?= ${.CURDIR}/patches
|
2002-10-19 22:33:59 +02:00
|
|
|
FILESDIR?= ${.CURDIR}/files
|
|
|
|
PKGDIR?= ${.CURDIR}
|
|
|
|
|
2003-08-21 18:16:46 +02:00
|
|
|
_PKGSRC_DEPS?= # empty
|
2010-05-19 11:12:15 +02:00
|
|
|
_BUILTIN_PKGS?= # empty
|
2003-08-21 18:16:46 +02:00
|
|
|
|
2002-10-19 22:33:59 +02:00
|
|
|
# If WRKOBJDIR is set, use that tree to build
|
2002-11-01 07:19:47 +01:00
|
|
|
.if defined(WRKOBJDIR)
|
2002-10-19 22:33:59 +02:00
|
|
|
BUILD_DIR?= ${WRKOBJDIR}/${PKGPATH}
|
|
|
|
.else
|
2003-01-15 21:55:38 +01:00
|
|
|
BUILD_DIR!= cd ${.CURDIR} && ${PWD_CMD}
|
|
|
|
.endif
|
2002-10-19 22:33:59 +02:00
|
|
|
|
|
|
|
# If OBJHOSTNAME is set, use first component of hostname in directory name.
|
|
|
|
# If OBJMACHINE is set, use ${MACHINE_ARCH} in the working directory name.
|
|
|
|
#
|
|
|
|
.if defined(OBJHOSTNAME)
|
|
|
|
. if !defined(_HOSTNAME)
|
2002-12-10 13:50:48 +01:00
|
|
|
_HOSTNAME!= ${UNAME} -n
|
2005-12-05 23:07:07 +01:00
|
|
|
MAKEFLAGS+= _HOSTNAME=${_HOSTNAME:Q}
|
2002-10-19 22:33:59 +02:00
|
|
|
. endif
|
|
|
|
WRKDIR_BASENAME?= work.${_HOSTNAME:C|\..*||}
|
2005-12-05 23:07:07 +01:00
|
|
|
MAKEFLAGS+= OBJHOSTNAME=${OBJHOSTNAME:Q}
|
2002-10-19 22:33:59 +02:00
|
|
|
.elif defined(OBJMACHINE)
|
|
|
|
WRKDIR_BASENAME?= work.${MACHINE_ARCH}
|
2005-12-05 23:07:07 +01:00
|
|
|
MAKEFLAGS+= OBJMACHINE=${OBJMACHINE:Q}
|
2002-10-19 22:33:59 +02:00
|
|
|
.else
|
|
|
|
WRKDIR_BASENAME?= work
|
2002-12-10 13:50:48 +01:00
|
|
|
.endif
|
2002-10-19 22:33:59 +02:00
|
|
|
|
|
|
|
WRKDIR?= ${BUILD_DIR}/${WRKDIR_BASENAME}
|
|
|
|
|
2003-08-16 10:39:17 +02:00
|
|
|
# There are many uses for a common log file, so define one that may be
|
2004-07-07 00:49:16 +02:00
|
|
|
# picked up and used by tools.mk, bsd.buildlink3.mk, etc.
|
2003-08-16 10:39:17 +02:00
|
|
|
#
|
|
|
|
WRKLOG?= ${WRKDIR}/.work.log
|
|
|
|
|
bsd.options.mk provides boilerplate code for standard naming conventions
for handling per-package build options.
Before including this file, the following variables should be defined:
PKG_OPTIONS_VAR
This is a list of the name of the make(1) variables that
contain the options the user wishes to select. This
variable should be set in a package Makefile. E.g.,
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
or
PKG_OPTIONS_VAR= FOO_OPTIONS BAR_OPTIONS
PKG_SUPPORTED_OPTIONS
This is a list of build options supported by the package.
This variable should be set in a package Makefile. E.g.,
PKG_SUPPORTED_OPTIONS= kerberos ldap ssl
Optionally, the following variables may also be defined:
PKG_DEFAULT_OPTIONS
This is a list the options that should be built into
every package, if that option is supported. This
variable should be set in /etc/mk.conf.
${PKG_OPTIONS_VAR} (the variables named in PKG_OPTIONS_VAR)
These variables list the selected build options and
override any default options given in PKG_DEFAULT_OPTIONS.
If any of the options begin with a '-', then that option
is always removed from the selected build options, e.g.
PKG_DEFAULT_OPTIONS= kerberos ldap sasl
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= ${PKG_DEFAULT_OPTIONS} -sasl
# implies PKG_OPTIONS == "kerberos ldap"
or
PKG_OPTIONS_VAR= WIBBLE_OPTIONS
WIBBLE_OPTIONS= kerberos -ldap ldap
# implies PKG_OPTIONS == "kerberos"
This variable should be set in /etc/mk.conf.
PKG_FAIL_UNSUPPORTED_OPTIONS
If this is set to "yes", then the presence of unsupported
options in PKG_OPTIONS.<pkg> (see below) causes the build
to fail. Set this to "no" to silently ignore unsupported
options. Default: "yes".
After including this file, the following variables are defined:
PKG_OPTIONS
This is the list of the selected build options, properly
filtered to remove unsupported and duplicate options.
Example usage:
-------------8<-------------8<-------------8<-------------8<-------------
# Global and legacy options
.if defined(USE_OPENLDAP) || defined(USE_SASL2)
. if !defined(PKG_OPTIONS.wibble)
. if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[yY][eE][sS])
PKG_OPTIONS.wibble+= ldap
. endif
. if defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
PKG_OPTIONS.wibble+= sasl
. endif
. endif
.endif
PKG_OPTIONS_VAR= PKG_OPTIONS.wibble
PKG_SUPPORTED_OPTIONS= ldap sasl
.include "../../mk/bsd.options.mk"
# Package-specific option-handling
###
### LDAP support
###
.if !empty(PKG_OPTIONS:Mldap)
. include "../../databases/openldap/buildlink3.mk"
CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap}
.endif
###
### SASL authentication
###
.if !empty(PKG_OPTIONS:Msasl)
. include "../../security/cyrus-sasl2/buildlink3.mk"
CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
.endif
-------------8<-------------8<-------------8<-------------8<-------------
2004-07-30 22:59:08 +02:00
|
|
|
PKG_DEFAULT_OPTIONS?= # empty
|
|
|
|
PKG_OPTIONS?= # empty
|
|
|
|
|
2005-01-27 05:05:08 +01:00
|
|
|
# we want this *before* compiler.mk, so that compiler.mk paths override them
|
2006-12-20 02:04:46 +01:00
|
|
|
.if ${X11_TYPE} != "modular" && defined(USE_X11)
|
|
|
|
PREPEND_PATH+= ${X11BASE}/bin
|
|
|
|
.endif
|
|
|
|
PREPEND_PATH+= ${LOCALBASE}/bin
|
2005-01-27 05:05:08 +01:00
|
|
|
|
2017-06-01 04:15:10 +02:00
|
|
|
.if ${_USE_NEW_PKGINSTALL:Uno} == "no"
|
2014-05-06 16:48:06 +02:00
|
|
|
# Support alternative init systems.
|
|
|
|
#
|
|
|
|
INIT_SYSTEM?= rc.d
|
|
|
|
_BUILD_DEFS+= INIT_SYSTEM
|
2017-06-01 04:15:10 +02:00
|
|
|
.endif
|
2014-05-06 16:48:06 +02:00
|
|
|
|
2016-03-12 00:03:31 +01:00
|
|
|
_PKGSRC_MKPIE= no
|
2018-01-15 10:35:45 +01:00
|
|
|
.if ${PKGSRC_MKPIE:tl} == "yes" && \
|
|
|
|
${MKPIE_SUPPORTED:Uyes:tl} == "yes" && \
|
|
|
|
${_OPSYS_SUPPORTS_MKPIE:Uno} == "yes"
|
2016-03-12 00:03:31 +01:00
|
|
|
_PKGSRC_MKPIE= yes
|
|
|
|
.endif
|
|
|
|
|
2017-11-12 14:34:14 +01:00
|
|
|
_PKGSRC_MKREPRO= no
|
2018-01-15 10:35:45 +01:00
|
|
|
.if ${PKGSRC_MKREPRO:tl} == "yes" && \
|
|
|
|
${MKREPRO_SUPPORTED:Uyes:tl} == "yes" && \
|
|
|
|
${_OPSYS_SUPPORTS_MKREPRO:Uno} == "yes"
|
2017-11-12 14:34:14 +01:00
|
|
|
_PKGSRC_MKREPRO= yes
|
|
|
|
.endif
|
|
|
|
|
2016-03-12 00:03:31 +01:00
|
|
|
_PKGSRC_USE_FORTIFY= no
|
2018-01-15 10:35:45 +01:00
|
|
|
.if ${PKGSRC_USE_FORTIFY:tl} != "no" && \
|
|
|
|
${FORTIFY_SUPPORTED:Uyes:tl} == "yes" && \
|
|
|
|
${_OPSYS_SUPPORTS_FORTIFY:Uno} == "yes"
|
2016-03-12 00:03:31 +01:00
|
|
|
_PKGSRC_USE_FORTIFY= yes
|
|
|
|
.endif
|
|
|
|
|
|
|
|
_PKGSRC_USE_RELRO= no
|
2018-01-15 10:35:45 +01:00
|
|
|
.if ${PKGSRC_USE_RELRO:tl} != "no" && \
|
|
|
|
${RELRO_SUPPORTED:Uyes:tl} == "yes" && \
|
|
|
|
${_OPSYS_SUPPORTS_RELRO:Uno} == "yes"
|
2016-03-12 00:03:31 +01:00
|
|
|
_PKGSRC_USE_RELRO= yes
|
|
|
|
.endif
|
|
|
|
|
|
|
|
_PKGSRC_USE_SSP= no
|
2018-01-15 10:35:45 +01:00
|
|
|
.if ${PKGSRC_USE_SSP:tl} != "no" && \
|
|
|
|
${SSP_SUPPORTED:Uyes:tl} == "yes" && \
|
|
|
|
${_OPSYS_SUPPORTS_SSP:Uno} == "yes"
|
2016-03-12 00:03:31 +01:00
|
|
|
_PKGSRC_USE_SSP= yes
|
2016-03-12 00:54:08 +01:00
|
|
|
.endif
|
|
|
|
|
2017-07-09 16:30:07 +02:00
|
|
|
_PKGSRC_USE_STACK_CHECK=no
|
2018-01-15 10:35:45 +01:00
|
|
|
.if ${PKGSRC_USE_STACK_CHECK:tl} != "no" && \
|
|
|
|
${STACK_CHECK_SUPPORTED:Uyes:tl} == "yes" && \
|
|
|
|
${_OPSYS_SUPPORTS_STACK_CHECK:Uno} == "yes"
|
2017-07-09 16:30:07 +02:00
|
|
|
_PKGSRC_USE_STACK_CHECK=yes
|
|
|
|
.endif
|
|
|
|
|
2016-10-27 12:31:05 +02:00
|
|
|
# Enable cwrappers if not building the wrappers themselves, and if the user has
|
|
|
|
# explicitly requested them, or if they haven't but the compiler/platform is
|
|
|
|
# known to support them.
|
|
|
|
.if empty(PKGPATH:Mpkgtools/cwrappers) && \
|
|
|
|
(${USE_CWRAPPERS:tl} == "yes" || \
|
|
|
|
(${USE_CWRAPPERS:tl} == "auto" && \
|
|
|
|
${_OPSYS_SUPPORTS_CWRAPPERS:Uno} == "yes"))
|
2016-03-12 00:54:08 +01:00
|
|
|
_USE_CWRAPPERS= yes
|
|
|
|
.else
|
|
|
|
_USE_CWRAPPERS= no
|
2016-03-12 00:03:31 +01:00
|
|
|
.endif
|
|
|
|
|
2004-09-27 14:05:53 +02:00
|
|
|
# Wrapper framework definitions
|
2008-01-04 02:46:24 +01:00
|
|
|
.include "wrapper/wrapper-defs.mk"
|
2004-09-27 14:05:53 +02:00
|
|
|
|
2007-07-29 07:18:36 +02:00
|
|
|
# Binary emulator framework definitions
|
|
|
|
.if defined(EMUL_PLATFORMS) && !empty(EMUL_PLATFORMS)
|
2008-01-04 02:46:24 +01:00
|
|
|
. include "emulator/emulator-vars.mk"
|
2007-07-29 07:18:36 +02:00
|
|
|
.endif
|
|
|
|
|
2007-09-07 23:55:44 +02:00
|
|
|
# System features framework
|
2008-01-04 02:46:24 +01:00
|
|
|
.include "features/features-vars.mk"
|
2007-09-07 23:55:44 +02:00
|
|
|
|
2017-06-01 04:15:10 +02:00
|
|
|
.if ${_USE_NEW_PKGINSTALL:Uno} != "no"
|
|
|
|
# Init services framework
|
|
|
|
.include "init/bsd.init-vars.mk"
|
|
|
|
.endif
|
|
|
|
|
2011-10-15 02:23:07 +02:00
|
|
|
# Package system format definitions
|
|
|
|
.include "pkgformat/bsd.pkgformat-vars.mk"
|
2006-06-06 17:28:51 +02:00
|
|
|
|
2005-06-01 19:05:19 +02:00
|
|
|
# Make variable definitions cache
|
2008-01-04 02:46:24 +01:00
|
|
|
.include "bsd.makevars.mk"
|
2005-06-01 19:05:19 +02:00
|
|
|
|
2006-07-27 23:46:45 +02:00
|
|
|
# If MAKECONF is defined, then pass it down to all recursive make
|
|
|
|
# processes invoked by pkgsrc.
|
|
|
|
#
|
|
|
|
PKGSRC_MAKE_ENV+= ${MAKECONF:DMAKECONF=${MAKECONF:Q}}
|
2011-09-08 22:17:15 +02:00
|
|
|
RECURSIVE_MAKE= ${PKGSRC_SETENV} ${PKGSRC_MAKE_ENV} ${MAKE}
|
2006-07-27 23:46:45 +02:00
|
|
|
|
2007-10-05 23:03:39 +02:00
|
|
|
_VARGROUPS+= dirs
|
|
|
|
_USER_VARS.dirs= DISTDIR LOCALBASE PACKAGES PKG_SYSCONFDIR WRKOBJDIR
|
|
|
|
_PKG_VARS.dirs= WRKSRC PATCHDIR FILESDIR PKGDIR
|
|
|
|
_SYS_VARS.dirs= WRKDIR DESTDIR PKG_SYSCONFBASEDIR
|
|
|
|
|
2010-01-06 19:21:44 +01:00
|
|
|
# List of 64bit operating systems with sizeof(int) != sizeof(void *).
|
2015-01-01 07:06:06 +01:00
|
|
|
# This can be used with BROKEN_ON_PLATFORM for software that is not
|
2015-11-07 21:00:19 +01:00
|
|
|
# 64bit clean.
|
2010-01-06 19:21:44 +01:00
|
|
|
#
|
2015-01-01 07:06:06 +01:00
|
|
|
# Keywords: BROKEN_ON_PLATFORM 64bit
|
2010-01-06 19:21:44 +01:00
|
|
|
#
|
2015-01-01 10:00:28 +01:00
|
|
|
LP64PLATFORMS= *-*-aarch64 *-*-aarch64eb *-*-alpha *-*-ia64 \
|
|
|
|
*-*-mips64eb *-*-mips64el *-*-powerpc64 *-*-riscv64 \
|
2015-11-07 21:00:19 +01:00
|
|
|
*-*-sparc64 *-*-x86_64
|
2010-01-06 19:21:44 +01:00
|
|
|
|
2015-01-01 09:57:23 +01:00
|
|
|
# Lists of big-endian and little-endian platforms, to be used with
|
|
|
|
# BROKEN_ON_PLATFORM.
|
|
|
|
#
|
|
|
|
# Keywords: BROKEN_ON_PLATFORM little-endian big-endian endian
|
|
|
|
#
|
|
|
|
_BIGENDIANCPUS= coldfire hppa m68000 m68k mips64eb mipseb or1k \
|
|
|
|
powerpc powerpc64 sh3eb sparc sparc64
|
2017-02-01 10:55:07 +01:00
|
|
|
_LITTLEENDIANCPUS= alpha i386 ia64 mips64el mipsel powerpc64le riscv32 \
|
|
|
|
riscv64 sh3el vax x86_64
|
2015-01-01 09:57:23 +01:00
|
|
|
|
|
|
|
# piles of ARM variants
|
|
|
|
_ARMCPUS+= arm earm earmhf earmv4 earmv5 earmv6 earmv6hf
|
|
|
|
_ARMCPUS+= earmv7 earmv7hf aarch64
|
|
|
|
_BIGENDIANCPUS+= ${_ARMCPUS:S/$/eb/}
|
|
|
|
_LITTLEENDIANCPUS+= ${_ARMCPUS}
|
|
|
|
|
|
|
|
BIGENDIANPLATFORMS= ${_BIGENDIANCPUS:S/^/*-*-/}
|
|
|
|
LITTLEENDIANPLATFORMS= ${_LITTLEENDIANCPUS:S/^/*-*-/}
|
|
|
|
|
|
|
|
|
2003-01-15 11:06:48 +01:00
|
|
|
.endif # BSD_PKG_MK
|