version 1.8, 1996/12/22 17:46:02 |
version 1.9, 1996/12/25 20:10:09 |
|
|
# -*- mode: Fundamental; tab-width: 4; -*- |
#-*- mode: Fundamental; tab-width: 4; -*- |
|
# ex:ts=4 |
# $OpenBSD$ |
# $OpenBSD$ |
|
# $NetBSD: $ |
# |
# |
# bsd.port.mk - 940820 Jordan K. Hubbard. |
# bsd.port.mk - 940820 Jordan K. Hubbard. |
# This file is in the public domain. |
# This file is in the public domain. |
# |
# |
# FreeBSD Id: bsd.port.mk,v 1.226 1996/09/24 06:48:22 asami Exp $ |
# FreeBSD Id: bsd.port.mk,v 1.241 1996/12/25 02:27:44 imp Exp |
# |
# |
# Please view me with 4 column tabs! |
# Please view me with 4 column tabs! |
|
|
|
|
# |
# |
# MAINTAINER= asami@FreeBSD.ORG |
# MAINTAINER= asami@FreeBSD.ORG |
# |
# |
|
# OPENBSD_MAINTAINER= imp@OpenBSD.ORG |
|
# |
|
|
# Supported Variables and their behaviors: |
# Supported Variables and their behaviors: |
# |
# |
# Variables that typically apply to all ports: |
# Variables that typically apply to all ports: |
# |
# |
# PORTSDIR - The root of the ports tree (default: /usr/ports). |
# OPSYS - Portability clause. This is the operating system the |
|
# makefile is being used on. Automatically set to |
|
# "FreeBSD," "NetBSD," or "OpenBSD" as appropriate. |
|
# PORTSDIR - The root of the ports tree. Defaults: |
|
# OpenBSD/FreeBSD: /usr/ports |
|
# NetBSD: /usr/opt |
# DISTDIR - Where to get gzip'd, tarballed copies of original sources |
# DISTDIR - Where to get gzip'd, tarballed copies of original sources |
# (default: ${PORTSDIR}/distfiles/${DIST_SUBDIR}). |
# (default: ${PORTSDIR}/distfiles). |
# PREFIX - Where to install things in general (default: /usr/local). |
# PREFIX - Where to install things in general (default: /usr/local). |
# MASTER_SITES - Primary location(s) for distribution files if not found |
# MASTER_SITES - Primary location(s) for distribution files if not found |
# locally (default: |
# locally. |
# ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/) |
|
# PATCH_SITES - Primary location(s) for distribution patch files |
# PATCH_SITES - Primary location(s) for distribution patch files |
# (see PATCHFILES below) if not found locally (default: |
# (see PATCHFILES below) if not found locally. |
# ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/) |
|
# |
# |
|
# MASTER_SITE_BACKUP - Backup location(s) for distribution files and patch |
|
# files if not found locally and ${MASTER_SITES}/${PATCH_SITES} |
|
# (default: |
|
# ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/) |
# MASTER_SITE_OVERRIDE - If set, override the MASTER_SITES setting with this |
# MASTER_SITE_OVERRIDE - If set, override the MASTER_SITES setting with this |
# value. |
# value. |
# MASTER_SITE_FREEBSD - If set, only use the FreeBSD master repository for |
# MASTER_SITE_FREEBSD - If set, only use ${MASTER_SITE_BACKUP} for |
# MASTER_SITES. |
# MASTER_SITES. |
# PACKAGES - A top level directory where all packages go (rather than |
# PACKAGES - A top level directory where all packages go (rather than |
# going locally to each port). (default: ${PORTSDIR}/packages). |
# going locally to each port). (default: ${PORTSDIR}/packages). |
|
|
# XMKMF - Set to path of `xmkmf' if not in $PATH (default: xmkmf -a ). |
# XMKMF - Set to path of `xmkmf' if not in $PATH (default: xmkmf -a ). |
# MAINTAINER - The e-mail address of the contact person for this port |
# MAINTAINER - The e-mail address of the contact person for this port |
# (default: ports@FreeBSD.ORG). |
# (default: ports@FreeBSD.ORG). |
# CATEGORIES - A list of descriptive categories into which this port falls |
# CATEGORIES - A list of descriptive categories into which this port falls. |
# (default: orphans). |
|
# |
# |
# Variables that typically apply to an individual port. Non-Boolean |
# Variables that typically apply to an individual port. Non-Boolean |
# variables without defaults are *mandatory*. |
# variables without defaults are *mandatory*. |
|
|
# PATCH_SITES (see above). They will automatically be |
# PATCH_SITES (see above). They will automatically be |
# uncompressed before patching if the names end with |
# uncompressed before patching if the names end with |
# ".gz" or ".Z". |
# ".gz" or ".Z". |
# DIST_SUBDIR - Suffix to ${DISTDIR} (see above). If set, all ${DISTFILES} |
# DIST_SUBDIR - Suffix to ${DISTDIR}. If set, all ${DISTFILES} |
# and ${PATCHFILES} will be put in this subdirectory of |
# and ${PATCHFILES} will be put in this subdirectory of |
# ${DISTDIR}. Also they will be fetched in this subdirectory |
# ${DISTDIR}. Also they will be fetched in this subdirectory |
# from FreeBSD mirror sites. |
# from FreeBSD mirror sites. |
|
# ALLFILES - All of ${DISTFILES} and ${PATCHFILES}. |
|
# IGNOREFILES - If some of the ${ALLFILES} are not checksum-able, set |
|
# this variable to their names. |
# PKGNAME - Name of the package file to create if the DISTNAME |
# PKGNAME - Name of the package file to create if the DISTNAME |
# isn't really relevant for the port/package |
# isn't really relevant for the port/package |
# (default: ${DISTNAME}). |
# (default: ${DISTNAME}). |
|
|
# |
# |
# NO_BUILD - Use a dummy (do-nothing) build target. |
# NO_BUILD - Use a dummy (do-nothing) build target. |
# NO_CONFIGURE - Use a dummy (do-nothing) configure target. |
# NO_CONFIGURE - Use a dummy (do-nothing) configure target. |
# NO_CDROM - Use dummy (do-nothing) targets if FOR_CDROM is set. |
# NO_CDROM - Port may not go on CDROM. Set this string to reason. |
# NO_DESCRIBE - Use a dummy (do-nothing) describe target. |
# NO_DESCRIBE - Use a dummy (do-nothing) describe target. |
# NO_EXTRACT - Use a dummy (do-nothing) extract target. |
# NO_EXTRACT - Use a dummy (do-nothing) extract target. |
# NO_INSTALL - Use a dummy (do-nothing) install target. |
# NO_INSTALL - Use a dummy (do-nothing) install target. |
|
|
# NO_WRKDIR - There's no work directory at all; port does this someplace |
# NO_WRKDIR - There's no work directory at all; port does this someplace |
# else. |
# else. |
# NO_DEPENDS - Don't verify build of dependencies. |
# NO_DEPENDS - Don't verify build of dependencies. |
# BROKEN - Port is broken. |
# BROKEN - Port is broken. Set this string to the reason why. |
# RESTRICTED - Port is restricted. Set this string to the reason why. |
# RESTRICTED - Port is restricted. Set this string to the reason why. |
# USE_GMAKE - Says that the port uses gmake. |
# USE_GMAKE - Says that the port uses gmake. |
# USE_IMAKE - Says that the port uses imake. |
# USE_IMAKE - Says that the port uses imake. |
|
|
# PATCH_DEBUG - If set, print out more information about the patches as |
# PATCH_DEBUG - If set, print out more information about the patches as |
# it attempts to apply them. |
# it attempts to apply them. |
# |
# |
# Variables that serve as convenient "aliases" for your *-install targets: |
# Variables that serve as convenient "aliases" for your *-install targets. |
# |
|
# Use these like: "${INSTALL_PROGRAM} ${WRKSRC}/prog ${PREFIX}/bin". |
# Use these like: "${INSTALL_PROGRAM} ${WRKSRC}/prog ${PREFIX}/bin". |
|
# |
# INSTALL_PROGRAM - A command to install binary executables. |
# INSTALL_PROGRAM - A command to install binary executables. |
# INSTALL_SCRIPT - A command to install executable scripts. |
# INSTALL_SCRIPT - A command to install executable scripts. |
# INSTALL_DATA - A command to install sharable data. |
# INSTALL_DATA - A command to install sharable data. |
# INSTALL_MAN - A command to install manpages (doesn't compress). |
# INSTALL_MAN - A command to install manpages (doesn't compress). |
# |
# |
|
# If your port doesn't automatically compress manpages, set the following. |
|
# Depending on the setting of NOMANCOMPRESS, the make rules will compress |
|
# the manpages for you. |
|
# |
|
# MAN<sect> - A list of manpages, categorized by section. For |
|
# example, if your port has "man/man1/foo.1" and |
|
# "man/mann/bar.n", set "MAN1=foo.1" and "MANN=bar.n". |
|
# The available sections chars are "123456789LN". |
|
# MANPREFIX - The directory prefix for ${MAN<sect>} (default: ${PREFIX}). |
|
# |
# Default targets and their behaviors: |
# Default targets and their behaviors: |
# |
# |
# fetch - Retrieves ${DISTFILES} (and ${PATCHFILES} if defined) |
# fetch - Retrieves ${DISTFILES} (and ${PATCHFILES} if defined) |
|
|
# NEVER override the "regular" targets unless you want to open |
# NEVER override the "regular" targets unless you want to open |
# a major can of worms. |
# a major can of worms. |
|
|
|
# Get the operating system type |
|
OPSYS!= uname -s |
|
|
.if exists(${.CURDIR}/../Makefile.inc) |
.if exists(${.CURDIR}/../Makefile.inc) |
.include "${.CURDIR}/../Makefile.inc" |
.include "${.CURDIR}/../Makefile.inc" |
.endif |
.endif |
|
|
.include <bsd.own.mk> |
.if (${OPSYS} == "OpenBSD") |
|
NOMANCOMPRESS?=yes |
|
.endif |
|
|
# These need to be absolute since we don't know how deep in the ports |
# These need to be absolute since we don't know how deep in the ports |
# tree we are and thus can't go relative. They can, of course, be overridden |
# tree we are and thus can't go relative. They can, of course, be overridden |
# by individual Makefiles. |
# by individual Makefiles or local system make configuration. |
|
.if (${OPSYS} == "NetBSD") |
|
PORTSDIR?= ${DESTDIR}/usr/opt |
|
.else |
PORTSDIR?= ${DESTDIR}/usr/ports |
PORTSDIR?= ${DESTDIR}/usr/ports |
|
.endif |
LOCALBASE?= /usr/local |
LOCALBASE?= /usr/local |
X11BASE?= /usr/X11R6 |
X11BASE?= /usr/X11R6 |
DISTDIR?= ${PORTSDIR}/distfiles/${DIST_SUBDIR} |
DISTDIR?= ${PORTSDIR}/distfiles |
|
_DISTDIR?= ${DISTDIR}/${DIST_SUBDIR} |
PACKAGES?= ${PORTSDIR}/packages |
PACKAGES?= ${PORTSDIR}/packages |
TEMPLATES?= ${PORTSDIR}/templates |
TEMPLATES?= ${PORTSDIR}/templates |
.if !defined(NO_WRKDIR) |
.if !defined(NO_WRKDIR) |
|
|
# Miscellaneous overridable commands: |
# Miscellaneous overridable commands: |
GMAKE?= gmake |
GMAKE?= gmake |
XMKMF?= xmkmf -a |
XMKMF?= xmkmf -a |
|
.if exists(/usr/bin/md5) |
|
MD5?= /usr/bin/md5 |
|
.elif exists(/bin/md5) |
MD5?= /bin/md5 |
MD5?= /bin/md5 |
|
.elif exists(/usr/local/bin/md5) |
|
MD5?= /usr/local/bin/md5 |
|
.else |
|
MD5?= /sbin/md5 |
|
.endif |
MD5_FILE?= ${FILESDIR}/md5 |
MD5_FILE?= ${FILESDIR}/md5 |
|
|
MAKE_FLAGS?= -f |
MAKE_FLAGS?= -f |
MAKEFILE?= Makefile |
MAKEFILE?= Makefile |
MAKE_ENV+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} MOTIFLIB="${MOTIFLIB}" CFLAGS="${CFLAGS}" |
MAKE_ENV+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} MOTIFLIB="${MOTIFLIB}" CFLAGS="${CFLAGS}" |
|
|
|
.if (${OPSYS} == "OpenBSD") |
FETCH_CMD?= /usr/bin/ftp |
FETCH_CMD?= /usr/bin/ftp |
|
.else |
|
FETCH_CMD?= /usr/bin/fetch |
|
.endif |
|
|
TOUCH?= /usr/bin/touch |
TOUCH?= /usr/bin/touch |
TOUCH_FLAGS?= -f |
TOUCH_FLAGS?= -f |
|
|
PATCH_DIST_ARGS+= -C |
PATCH_DIST_ARGS+= -C |
.endif |
.endif |
|
|
|
.if exists(/bin/tar) |
EXTRACT_CMD?= /bin/tar |
EXTRACT_CMD?= /bin/tar |
|
.else |
|
EXTRACT_CMD?= /usr/bin/tar |
|
.endif |
EXTRACT_SUFX?= .tar.gz |
EXTRACT_SUFX?= .tar.gz |
# Backwards compatability. |
# Backwards compatability. |
.if defined(EXTRACT_ARGS) |
.if defined(EXTRACT_ARGS) |
|
|
|
|
PKG_CMD?= /usr/sbin/pkg_create |
PKG_CMD?= /usr/sbin/pkg_create |
.if !defined(PKG_ARGS) |
.if !defined(PKG_ARGS) |
PKG_ARGS= -v -c ${PKGDIR}/COMMENT -d ${PKGDIR}/DESCR -f ${PKGDIR}/PLIST -p ${PREFIX} -P "`${MAKE} package-depends|sort|uniq`" |
PKG_ARGS= -v -c ${PKGDIR}/COMMENT -d ${PKGDIR}/DESCR -f ${PKGDIR}/PLIST -p ${PREFIX} -P "`${MAKE} package-depends|sort -u`" |
.if exists(${PKGDIR}/INSTALL) |
.if exists(${PKGDIR}/INSTALL) |
PKG_ARGS+= -i ${PKGDIR}/INSTALL |
PKG_ARGS+= -i ${PKGDIR}/INSTALL |
.endif |
.endif |
|
|
.if exists(${PKGDIR}/REQ) |
.if exists(${PKGDIR}/REQ) |
PKG_ARGS+= -r ${PKGDIR}/REQ |
PKG_ARGS+= -r ${PKGDIR}/REQ |
.endif |
.endif |
|
.if exists(${PKGDIR}/MESSAGE) |
|
PKG_ARGS+= -D ${PKGDIR}/MESSAGE |
|
.endif |
.if !defined(NO_MTREE) && defined(MTREE_LOCAL) |
.if !defined(NO_MTREE) && defined(MTREE_LOCAL) |
PKG_ARGS+= -m ${MTREE_LOCAL} |
PKG_ARGS+= -m ${MTREE_LOCAL} |
.endif |
.endif |
|
|
.endif |
.endif |
|
|
ECHO?= /bin/echo |
ECHO?= /bin/echo |
CAT+= /bin/cat |
CAT?= /bin/cat |
CP?= /bin/cp |
CP?= /bin/cp |
SETENV?= /usr/bin/env |
SETENV?= /usr/bin/env |
RM?= /bin/rm |
RM?= /bin/rm |
MKDIR?= /bin/mkdir |
MKDIR?= /bin/mkdir -p |
GZCAT?= /usr/bin/gzcat |
RMDIR?= /bin/rmdir |
|
AWK?= /usr/bin/awk |
BASENAME?= /usr/bin/basename |
BASENAME?= /usr/bin/basename |
SED?= /usr/bin/sed |
FALSE?= /usr/bin/false |
CAT?= /bin/cat |
|
GREP?= /usr/bin/grep |
GREP?= /usr/bin/grep |
AWK?= /usr/bin/awk |
GZCAT?= /usr/bin/gzcat |
|
GZIP?= -9 |
|
GZIP_CMD?= /usr/bin/gzip -nf ${GZIP} |
|
GUNZIP_CMD?= /usr/bin/gunzip -f |
|
SED?= /usr/bin/sed |
|
|
# Used to print all the '===>' style prompts - override this to turn them off. |
# Used to print all the '===>' style prompts - override this to turn them off. |
ECHO_MSG?= ${ECHO} |
ECHO_MSG?= ${ECHO} |
|
|
ALL_TARGET?= all |
ALL_TARGET?= all |
INSTALL_TARGET?= install |
INSTALL_TARGET?= install |
|
|
# If the user has this set, go to the FreeBSD respository for everything. |
# Popular master sites |
|
MASTER_SITE_XCONTRIB?= \ |
|
ftp://ftp.x.org/contrib/${MASTER_SITE_SUBDIR}/ \ |
|
ftp://crl.dec.com/pub/X11/contrib/${MASTER_SITE_SUBDIR}/ |
|
|
|
MASTER_SITE_GNU?= \ |
|
ftp://prep.ai.mit.edu/pub/gnu/${MASTER_SITE_SUBDIR}/ \ |
|
ftp://wuarchive.wustl.edu/systems/gnu/${MASTER_SITE_SUBDIR}/ |
|
|
|
MASTER_SITE_PERL_CPAN?= \ |
|
ftp://ftp.digital.com/pub/plan/perl/CPAN/modules/by-module/${MASTER_SITE_SUBDIR}/ \ |
|
ftp://ftp.cdrom.com/pub/perl/CPAN/modules/by-module/${MASTER_SITE_SUBDIR}/ |
|
|
|
MASTER_SITE_TEX_CTAN?= \ |
|
ftp://ftp.cdrom.com/pub/tex/ctan/${MASTER_SITE_SUBDIR}/ \ |
|
ftp://wuarchive.wustl.edu/packages/TeX/${MASTER_SITE_SUBDIR}/ \ |
|
ftp://ftp.funet.fi/pub/TeX/CTAN/${MASTER_SITE_SUBDIR}/ \ |
|
ftp.tex.ac.uk/public/ctan/tex-archive/${MASTER_SITE_SUBDIR}/ |
|
|
|
MASTER_SITE_SUNSITE?= \ |
|
ftp://sunsite.unc.edu/pub/Linux/${MASTER_SITE_SUBDIR}/ \ |
|
ftp://ftp.infomagic.com/pub/mirrors/linux/sunsite/${MASTER_SITE_SUBDIR}/ \ |
|
ftp://ftp.funet.fi/pub/mirrors/sunsite.unc.edu/pub/Linux/${MASTER_SITE_SUBDIR}/ |
|
|
|
# The primary backup site. |
|
MASTER_SITE_BACKUP?= \ |
|
ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/ |
|
|
|
# If the user has this set, go to the FreeBSD repository for everything. |
.if defined(MASTER_SITE_FREEBSD) |
.if defined(MASTER_SITE_FREEBSD) |
MASTER_SITE_OVERRIDE= ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/ |
MASTER_SITE_OVERRIDE= ${MASTER_SITE_BACKUP} |
.endif |
.endif |
|
|
# Empty declaration to avoid "variable MASTER_SITES recursive" error |
# Empty declaration to avoid "variable MASTER_SITES recursive" error |
|
|
# I guess we're in the master distribution business! :) As we gain mirror |
# I guess we're in the master distribution business! :) As we gain mirror |
# sites for distfiles, add them to this list. |
# sites for distfiles, add them to this list. |
.if !defined(MASTER_SITE_OVERRIDE) |
.if !defined(MASTER_SITE_OVERRIDE) |
MASTER_SITES+= ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/ |
MASTER_SITES+= ${MASTER_SITE_BACKUP} |
PATCH_SITES+= ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/ |
PATCH_SITES+= ${MASTER_SITE_BACKUP} |
.else |
.else |
MASTER_SITES:= ${MASTER_SITE_OVERRIDE} ${MASTER_SITES} |
MASTER_SITES:= ${MASTER_SITE_OVERRIDE} ${MASTER_SITES} |
PATCH_SITES:= ${MASTER_SITE_OVERRIDE} ${PATCH_SITES} |
PATCH_SITES:= ${MASTER_SITE_OVERRIDE} ${PATCH_SITES} |
|
|
DISTFILES?= ${DISTNAME}${EXTRACT_SUFX} |
DISTFILES?= ${DISTNAME}${EXTRACT_SUFX} |
PKGNAME?= ${DISTNAME} |
PKGNAME?= ${DISTNAME} |
|
|
|
ALLFILES?= ${DISTFILES} ${PATCHFILES} |
|
|
|
.if defined(IGNOREFILES) |
|
CKSUMFILES!= \ |
|
for file in ${ALLFILES}; do \ |
|
ignore=0; \ |
|
for tmp in ${IGNOREFILES}; do \ |
|
if [ "$$file" = "$$tmp" ]; then \ |
|
ignore=1; \ |
|
fi; \ |
|
done; \ |
|
if [ "$$ignore" = 0 ]; then \ |
|
echo "$$file"; \ |
|
fi; \ |
|
done |
|
.else |
|
CKSUMFILES= ${ALLFILES} |
|
.endif |
|
|
|
# List of all files, with ${DIST_SUBDIR} in front. Used for checksum. |
|
.if defined(DIST_SUBDIR) |
|
_CKSUMFILES?= ${CKSUMFILES:S/^/${DIST_SUBDIR}\//} |
|
_IGNOREFILES?= ${IGNOREFILES:S/^/${DIST_SUBDIR}\//} |
|
.else |
|
_CKSUMFILES?= ${CKSUMFILES} |
|
_IGNOREFILES?= ${IGNOREFILES} |
|
.endif |
|
|
# This is what is actually going to be extracted, and is overridable |
# This is what is actually going to be extracted, and is overridable |
# by user. |
# by user. |
EXTRACT_ONLY?= ${DISTFILES} |
EXTRACT_ONLY?= ${DISTFILES} |
|
|
# Documentation |
# Documentation |
MAINTAINER?= ports@FreeBSD.ORG |
MAINTAINER?= ports@FreeBSD.ORG |
CATEGORIES?= orphans |
|
|
|
|
.if !defined(CATEGORIES) |
|
.BEGIN: |
|
@${ECHO_MSG} "CATEGORIES is mandatory." |
|
@${FALSE} |
|
.endif |
|
|
# Note this has to start with a capital letter (or more accurately, it |
# Note this has to start with a capital letter (or more accurately, it |
# shouldn't match "[a-z]*"), see the target "delete-package-links" below. |
# shouldn't match "[a-z]*"), see the target "delete-package-links" below. |
PKGREPOSITORYSUBDIR?= All |
PKGREPOSITORYSUBDIR?= All |
|
|
HAS_CONFIGURE= yes |
HAS_CONFIGURE= yes |
.endif |
.endif |
|
|
|
MANPREFIX?= ${PREFIX} |
|
|
|
.for sect in 1 2 3 4 5 6 7 8 9 |
|
MAN${sect}PREFIX?= ${MANPREFIX} |
|
.endfor |
|
MANLPREFIX?= ${MANPREFIX} |
|
MANNPREFIX?= ${MANPREFIX} |
|
|
|
MANLANG?= "" # english only by default |
|
|
|
.for lang in ${MANLANG} |
|
|
|
.for sect in 1 2 3 4 5 6 7 8 9 |
|
.if defined(MAN${sect}) |
|
_MANPAGES+= ${MAN${sect}:S%^%${MAN${sect}PREFIX}/man/${lang}/man${sect}/%} |
|
.endif |
|
.endfor |
|
|
|
.if defined(MANL) |
|
_MANPAGES+= ${MANL:S%^%${MANLPREFIX}/man/${lang}/manl/%} |
|
.endif |
|
|
|
.if defined(MANN) |
|
_MANPAGES+= ${MANN:S%^%${MANNPREFIX}/man/${lang}/mann/%} |
|
.endif |
|
|
|
.endfor |
|
|
|
.if defined(_MANPAGES) && defined(MANCOMPRESSED) |
|
_MANPAGES:= ${_MANPAGES:S/$/.gz/} |
|
.endif |
|
|
.MAIN: all |
.MAIN: all |
|
|
################################################################ |
################################################################ |
|
|
# Don't build a port if it's broken. |
# Don't build a port if it's broken. |
################################################################ |
################################################################ |
|
|
.if (defined(IS_INTERACTIVE) && defined(BATCH)) || \ |
.if (defined(IS_INTERACTIVE) && defined(BATCH)) |
(!defined(IS_INTERACTIVE) && defined(INTERACTIVE)) || \ |
IGNORE= "is an interactive port" |
(defined(REQUIRES_MOTIF) && !defined(HAVE_MOTIF)) || \ |
.elif (!defined(IS_INTERACTIVE) && defined(INTERACTIVE)) |
(defined(NO_CDROM) && defined(FOR_CDROM)) || \ |
IGNORE= "is not an interactive port" |
(defined(RESTRICTED) && defined(NO_RESTRICTED)) || \ |
.elif (defined(REQUIRES_MOTIF) && !defined(HAVE_MOTIF)) |
defined(BROKEN) |
IGNORE= "requires Motif" |
IGNORE= yes |
.elif (defined(NO_CDROM) && defined(FOR_CDROM)) |
|
IGNORE= "may not be placed on a CDROM: ${NO_CDROM}" |
|
.elif (defined(RESTRICTED) && defined(NO_RESTRICTED)) |
|
IGNORE= "is restricted: ${RESTRICTED}" |
|
.elif defined(BROKEN) |
|
IGNORE= "is marked as broken: ${BROKEN}" |
.endif |
.endif |
|
|
.if defined(IGNORE) |
.if defined(IGNORE) |
|
.if defined(IGNORE_SILENT) |
|
IGNORECMD= ${DO_NADA} |
|
.else |
|
IGNORECMD= ${ECHO_MSG} "===> ${PKGNAME} ${IGNORE}." |
|
.endif |
|
fetch: |
|
@${IGNORECMD} |
|
checksum: |
|
@${IGNORECMD} |
|
extract: |
|
@${IGNORECMD} |
|
patch: |
|
@${IGNORECMD} |
|
configure: |
|
@${IGNORECMD} |
all: |
all: |
@${DO_NADA} |
@${IGNORECMD} |
build: |
build: |
@${DO_NADA} |
@${IGNORECMD} |
install: |
install: |
@${DO_NADA} |
@${IGNORECMD} |
fetch: |
|
@${DO_NADA} |
|
configure: |
|
@${DO_NADA} |
|
package: |
package: |
@${DO_NADA} |
@${IGNORECMD} |
.endif |
.endif |
|
|
.if defined(ALL_HOOK) |
.if defined(ALL_HOOK) |
|
|
# override from an individual Makefile. |
# override from an individual Makefile. |
################################################################ |
################################################################ |
|
|
|
# Disable checksum |
|
.if defined(NO_CHECKSUM) && !target(checksum) |
|
checksum: fetch |
|
@${DO_NADA} |
|
.endif |
|
|
# Disable extract |
# Disable extract |
.if defined(NO_EXTRACT) && !target(extract) |
.if defined(NO_EXTRACT) && !target(extract) |
extract: checksum |
extract: checksum |
|
|
@${DO_NADA} |
@${DO_NADA} |
.endif |
.endif |
|
|
|
# Disable patch |
|
.if defined(NO_PATCH) && !target(patch) |
|
patch: extract |
|
@${TOUCH} ${TOUCH_FLAGS} ${PATCH_COOKIE} |
|
.endif |
|
|
# Disable configure |
# Disable configure |
.if defined(NO_CONFIGURE) && !target(configure) |
.if defined(NO_CONFIGURE) && !target(configure) |
configure: patch |
configure: patch |
@${TOUCH} ${TOUCH_FLAGS} ${CONFIGURE_COOKIE} |
@${TOUCH} ${TOUCH_FLAGS} ${CONFIGURE_COOKIE} |
.endif |
.endif |
|
|
# Disable describe |
|
.if defined(NO_DESCRIBE) && !target(describe) |
|
describe: |
|
@${DO_NADA} |
|
.endif |
|
|
|
# Disable build |
# Disable build |
.if defined(NO_BUILD) && !target(build) |
.if defined(NO_BUILD) && !target(build) |
build: configure |
build: configure |
@${TOUCH} ${TOUCH_FLAGS} ${BUILD_COOKIE} |
@${TOUCH} ${TOUCH_FLAGS} ${BUILD_COOKIE} |
.endif |
.endif |
|
|
|
# Disable install |
|
.if defined(NO_INSTALL) && !target(install) |
|
install: build |
|
@${TOUCH} ${TOUCH_FLAGS} ${INSTALL_COOKIE} |
|
.endif |
|
|
# Disable package |
# Disable package |
.if defined(NO_PACKAGE) && !target(package) |
.if defined(NO_PACKAGE) && !target(package) |
package: |
package: |
|
.if defined(IGNORE_SILENT) |
@${DO_NADA} |
@${DO_NADA} |
|
.else |
|
@${ECHO_MSG} "===> ${PKGNAME} may not be packaged: ${NO_PACKAGE}." |
.endif |
.endif |
|
|
# Disable install |
|
.if defined(NO_INSTALL) && !target(install) |
|
install: build |
|
@${TOUCH} ${TOUCH_FLAGS} ${INSTALL_COOKIE} |
|
.endif |
.endif |
|
|
# Disable patch |
# Disable describe |
.if defined(NO_PATCH) && !target(patch) |
.if defined(NO_DESCRIBE) && !target(describe) |
patch: extract |
describe: |
@${TOUCH} ${TOUCH_FLAGS} ${PATCH_COOKIE} |
@${DO_NADA} |
.endif |
.endif |
|
|
################################################################ |
################################################################ |
|
|
|
|
.if !target(do-fetch) |
.if !target(do-fetch) |
do-fetch: |
do-fetch: |
@if [ ! -d ${DISTDIR} ]; then ${MKDIR} -p ${DISTDIR}; fi |
@${MKDIR} ${_DISTDIR} |
@(cd ${DISTDIR}; \ |
@(cd ${_DISTDIR}; \ |
for file in ${DISTFILES}; do \ |
for file in ${DISTFILES}; do \ |
if [ ! -f $$file -a ! -f `${BASENAME} $$file` ]; then \ |
if [ ! -f $$file -a ! -f `${BASENAME} $$file` ]; then \ |
if [ -h $$file -o -h `${BASENAME} $$file` ]; then \ |
if [ -h $$file -o -h `${BASENAME} $$file` ]; then \ |
${ECHO_MSG} ">> ${DISTDIR}/$$file is a broken symlink."; \ |
${ECHO_MSG} ">> ${_DISTDIR}/$$file is a broken symlink."; \ |
${ECHO_MSG} ">> Perhaps a filesystem (most likely a CD) isn't mounted?"; \ |
${ECHO_MSG} ">> Perhaps a filesystem (most likely a CD) isn't mounted?"; \ |
${ECHO_MSG} ">> Please correct this problem and try again."; \ |
${ECHO_MSG} ">> Please correct this problem and try again."; \ |
exit 1; \ |
exit 1; \ |
|
|
fi \ |
fi \ |
done; \ |
done; \ |
${ECHO_MSG} ">> Couldn't fetch it - please try to retrieve this";\ |
${ECHO_MSG} ">> Couldn't fetch it - please try to retrieve this";\ |
${ECHO_MSG} ">> port manually into ${DISTDIR} and try again."; \ |
${ECHO_MSG} ">> port manually into ${_DISTDIR} and try again."; \ |
exit 1; \ |
exit 1; \ |
fi \ |
fi \ |
done) |
done) |
.if defined(PATCHFILES) |
.if defined(PATCHFILES) |
@if [ ! -d ${DISTDIR} ]; then ${MKDIR} -p ${DISTDIR}; fi |
@(cd ${_DISTDIR}; \ |
@(cd ${DISTDIR}; \ |
|
for file in ${PATCHFILES}; do \ |
for file in ${PATCHFILES}; do \ |
if [ ! -f $$file -a ! -f `${BASENAME} $$file` ]; then \ |
if [ ! -f $$file -a ! -f `${BASENAME} $$file` ]; then \ |
if [ -h $$file -o -h `${BASENAME} $$file` ]; then \ |
if [ -h $$file -o -h `${BASENAME} $$file` ]; then \ |
${ECHO_MSG} ">> ${DISTDIR}/$$file is a broken symlink."; \ |
${ECHO_MSG} ">> ${_DISTDIR}/$$file is a broken symlink."; \ |
${ECHO_MSG} ">> Perhaps a filesystem (most likely a CD) isn't mounted?"; \ |
${ECHO_MSG} ">> Perhaps a filesystem (most likely a CD) isn't mounted?"; \ |
${ECHO_MSG} ">> Please correct this problem and try again."; \ |
${ECHO_MSG} ">> Please correct this problem and try again."; \ |
exit 1; \ |
exit 1; \ |
|
|
fi \ |
fi \ |
done; \ |
done; \ |
${ECHO_MSG} ">> Couldn't fetch it - please try to retrieve this";\ |
${ECHO_MSG} ">> Couldn't fetch it - please try to retrieve this";\ |
${ECHO_MSG} ">> port manually into ${DISTDIR} and try again."; \ |
${ECHO_MSG} ">> port manually into ${_DISTDIR} and try again."; \ |
exit 1; \ |
exit 1; \ |
fi \ |
fi \ |
done) |
done) |
|
|
do-extract: |
do-extract: |
.if !defined(NO_WRKDIR) |
.if !defined(NO_WRKDIR) |
@${RM} -rf ${WRKDIR} |
@${RM} -rf ${WRKDIR} |
@${MKDIR} -p ${WRKDIR} |
@${MKDIR} ${WRKDIR} |
.endif |
.endif |
@for file in ${EXTRACT_ONLY}; do \ |
@for file in ${EXTRACT_ONLY}; do \ |
if !(cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\ |
if !(cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\ |
then \ |
then \ |
exit 1; \ |
exit 1; \ |
fi \ |
fi \ |
|
|
do-patch: |
do-patch: |
.if defined(PATCHFILES) |
.if defined(PATCHFILES) |
@${ECHO_MSG} "===> Applying distribution patches for ${PKGNAME}" |
@${ECHO_MSG} "===> Applying distribution patches for ${PKGNAME}" |
@(cd ${DISTDIR}; \ |
@(cd ${_DISTDIR}; \ |
for i in ${PATCHFILES}; do \ |
for i in ${PATCHFILES}; do \ |
if [ ${PATCH_DEBUG_TMP} = yes ]; then \ |
if [ ${PATCH_DEBUG_TMP} = yes ]; then \ |
${ECHO_MSG} "===> Applying distribution patch $$i" ; \ |
${ECHO_MSG} "===> Applying distribution patch $$i" ; \ |
|
|
${ECHO_MSG} "===> Perhaps you forgot the -P flag to cvs co or update?"; \ |
${ECHO_MSG} "===> Perhaps you forgot the -P flag to cvs co or update?"; \ |
fi; \ |
fi; \ |
else \ |
else \ |
${ECHO_MSG} "===> Applying FreeBSD patches for ${PKGNAME}" ; \ |
${ECHO_MSG} "===> Applying ${OPSYS} patches for ${PKGNAME}" ; \ |
for i in ${PATCHDIR}/patch-*; do \ |
for i in ${PATCHDIR}/patch-*; do \ |
case $$i in \ |
case $$i in \ |
*.orig|*~) \ |
*.orig|*~) \ |
|
|
;; \ |
;; \ |
*) \ |
*) \ |
if [ ${PATCH_DEBUG_TMP} = yes ]; then \ |
if [ ${PATCH_DEBUG_TMP} = yes ]; then \ |
${ECHO_MSG} "===> Applying FreeBSD patch $$i" ; \ |
${ECHO_MSG} "===> Applying ${OPSYS} patch $$i" ; \ |
fi; \ |
fi; \ |
${PATCH} ${PATCH_ARGS} < $$i; \ |
${PATCH} ${PATCH_ARGS} < $$i; \ |
;; \ |
;; \ |
|
|
.if !target(do-install) |
.if !target(do-install) |
do-install: |
do-install: |
@if [ `/bin/sh -c umask` != 0022 ]; then \ |
@if [ `/bin/sh -c umask` != 0022 ]; then \ |
${ECHO_MSG} "===> Warning: your umask is \"`/bin/sh -c umask`"\".; \ |
${ECHO_MSG} "===> Warning: your umask is \"`/bin/sh -c umask`"\".; \ |
${ECHO_MSG} " If this is not desired, set it to an appropriate value"; \ |
${ECHO_MSG} " If this is not desired, set it to an appropriate value"; \ |
${ECHO_MSG} " and install this port again by \`\`make reinstall''."; \ |
${ECHO_MSG} " and install this port again by \`\`make reinstall''."; \ |
fi |
fi |
.if defined(USE_GMAKE) |
.if defined(USE_GMAKE) |
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${INSTALL_TARGET}) |
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${INSTALL_TARGET}) |
|
|
${ECHO_MSG} "===> Building package for ${PKGNAME}"; \ |
${ECHO_MSG} "===> Building package for ${PKGNAME}"; \ |
if [ -d ${PACKAGES} ]; then \ |
if [ -d ${PACKAGES} ]; then \ |
if [ ! -d ${PKGREPOSITORY} ]; then \ |
if [ ! -d ${PKGREPOSITORY} ]; then \ |
if ! ${MKDIR} -p ${PKGREPOSITORY}; then \ |
if ! ${MKDIR} ${PKGREPOSITORY}; then \ |
${ECHO_MSG} ">> Can't create directory ${PKGREPOSITORY}."; \ |
${ECHO_MSG} ">> Can't create directory ${PKGREPOSITORY}."; \ |
exit 1; \ |
exit 1; \ |
fi; \ |
fi; \ |
|
|
@${MAKE} ${.MAKEFLAGS} delete-package-links |
@${MAKE} ${.MAKEFLAGS} delete-package-links |
@for cat in ${CATEGORIES}; do \ |
@for cat in ${CATEGORIES}; do \ |
if [ ! -d ${PACKAGES}/$$cat ]; then \ |
if [ ! -d ${PACKAGES}/$$cat ]; then \ |
if ! ${MKDIR} -p ${PACKAGES}/$$cat; then \ |
if ! ${MKDIR} ${PACKAGES}/$$cat; then \ |
${ECHO_MSG} ">> Can't create directory ${PACKAGES}/$$cat."; \ |
${ECHO_MSG} ">> Can't create directory ${PACKAGES}/$$cat."; \ |
exit 1; \ |
exit 1; \ |
fi; \ |
fi; \ |
|
|
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} build-depends lib-depends misc-depends |
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} build-depends lib-depends misc-depends |
.endif |
.endif |
.if make(real-install) |
.if make(real-install) |
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} run-depends |
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} run-depends lib-depends |
.endif |
.endif |
.if make(real-install) |
.if make(real-install) |
.if !defined(NO_MTREE) |
.if !defined(NO_MTREE) |
|
|
X11BASE=${X11BASE} \ |
X11BASE=${X11BASE} \ |
/bin/sh ${SCRIPTDIR}/${.TARGET:S/^real-/post-/}; \ |
/bin/sh ${SCRIPTDIR}/${.TARGET:S/^real-/post-/}; \ |
fi |
fi |
.if make(real-install) && !defined(NO_PKG_REGISTER) |
.if make(real-install) && defined(_MANPAGES) |
|
.if defined(MANCOMPRESSED) && defined(NOMANCOMPRESS) |
|
@${ECHO_MSG} "===> Uncompressing manual pages for ${PKGNAME}" |
|
.for manpage in ${_MANPAGES} |
|
@${GUNZIP_CMD} ${manpage} |
|
.endfor |
|
.elif !defined(MANCOMPRESSED) && !defined(NOMANCOMPRESS) |
|
@${ECHO_MSG} "===> Compressing manual pages for ${PKGNAME}" |
|
.for manpage in ${_MANPAGES} |
|
@${GZIP_CMD} ${manpage} |
|
.endfor |
|
.endif |
|
.endif |
|
.if make(real-install) && !defined(NO_PKG_REGISTER) |
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} fake-pkg |
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} fake-pkg |
.endif |
.endif |
.if !make(real-fetch) \ |
.if !make(real-fetch) \ |
|
|
|
|
.if !target(clean) |
.if !target(clean) |
clean: pre-clean |
clean: pre-clean |
|
.if !defined(NOCLEANDEPENDS) |
|
@${MAKE} clean-depends |
|
.endif |
@${ECHO_MSG} "===> Cleaning for ${PKGNAME}" |
@${ECHO_MSG} "===> Cleaning for ${PKGNAME}" |
.if !defined(NO_WRKDIR) |
.if !defined(NO_WRKDIR) |
@${RM} -rf ${WRKDIR} |
@if [ -d ${WRKDIR} ]; then \ |
|
if [ -w ${WRKDIR} ]; then \ |
|
${RM} -rf ${WRKDIR}; \ |
|
else \ |
|
${ECHO_MSG} "===> ${WRKDIR} not writable, skipping"; \ |
|
fi; \ |
|
fi |
.else |
.else |
@${RM} -f ${WRKDIR}/.*_done |
@${RM} -f ${WRKDIR}/.*_done |
.endif |
.endif |
.endif |
.endif |
|
|
|
.if !target(pre-distclean) |
|
pre-distclean: |
|
@${DO_NADA} |
|
.endif |
|
|
|
.if !target(distclean) |
|
distclean: pre-distclean clean |
|
@${ECHO_MSG} "===> Dist cleaning for ${PKGNAME}" |
|
@(cd ${_DISTDIR}; \ |
|
${RM} -f ${DISTFILES} ${PATCHFILES}) |
|
.if defined(DIST_SUBDIR) |
|
@${RMDIR} ${_DISTDIR} |
|
.endif |
|
.endif |
|
|
# Prints out a list of files to fetch (useful to do a batch fetch) |
# Prints out a list of files to fetch (useful to do a batch fetch) |
|
|
.if !target(fetch-list) |
.if !target(fetch-list) |
fetch-list: |
fetch-list: |
@if [ ! -d ${DISTDIR} ]; then ${MKDIR} -p ${DISTDIR}; fi |
@${MKDIR} ${_DISTDIR} |
@(cd ${DISTDIR}; \ |
@(cd ${_DISTDIR}; \ |
for file in ${DISTFILES}; do \ |
for file in ${DISTFILES}; do \ |
if [ ! -f $$file -a ! -f `${BASENAME} $$file` ]; then \ |
if [ ! -f $$file -a ! -f `${BASENAME} $$file` ]; then \ |
for site in ${MASTER_SITES}; do \ |
for site in ${MASTER_SITES}; do \ |
|
|
fi \ |
fi \ |
done) |
done) |
.if defined(PATCHFILES) |
.if defined(PATCHFILES) |
@(cd ${DISTDIR}; \ |
@(cd ${_DISTDIR}; \ |
for file in ${PATCHFILES}; do \ |
for file in ${PATCHFILES}; do \ |
if [ ! -f $$file -a ! -f `${BASENAME} $$file` ]; then \ |
if [ ! -f $$file -a ! -f `${BASENAME} $$file` ]; then \ |
for site in ${PATCH_SITES}; do \ |
for site in ${PATCH_SITES}; do \ |
|
|
|
|
.if !target(makesum) |
.if !target(makesum) |
makesum: fetch |
makesum: fetch |
@if [ ! -d ${FILESDIR} ]; then ${MKDIR} -p ${FILESDIR}; fi |
@${MKDIR} ${FILESDIR} |
@if [ -f ${MD5_FILE} ]; then ${RM} -f ${MD5_FILE}; fi |
@if [ -f ${MD5_FILE} ]; then ${RM} -f ${MD5_FILE}; fi |
@(cd ${DISTDIR}; \ |
@(cd ${DISTDIR}; \ |
for file in ${DISTFILES} ${PATCHFILES}; do \ |
for file in ${_CKSUMFILES}; do \ |
${MD5} $$file >> ${MD5_FILE}; \ |
${MD5} $$file >> ${MD5_FILE}; \ |
done) |
done) |
|
@for file in ${_IGNOREFILES}; do \ |
|
${ECHO} "MD5 ($$file) = IGNORE" >> ${MD5_FILE}; \ |
|
done |
.endif |
.endif |
|
|
.if !target(checksum) |
.if !target(checksum) |
|
|
@if [ ! -f ${MD5_FILE} ]; then \ |
@if [ ! -f ${MD5_FILE} ]; then \ |
${ECHO_MSG} ">> No MD5 checksum file."; \ |
${ECHO_MSG} ">> No MD5 checksum file."; \ |
else \ |
else \ |
(cd ${DISTDIR}; OK=""; \ |
(cd ${DISTDIR}; OK="true"; \ |
for file in ${DISTFILES} ${PATCHFILES}; do \ |
for file in ${_CKSUMFILES}; do \ |
CKSUM=`${MD5} < $$file`; \ |
CKSUM=`${MD5} < $$file`; \ |
CKSUM2=`${GREP} "($$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ |
CKSUM2=`${GREP} "($$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ |
if [ "$$CKSUM2" = "" ]; then \ |
if [ "$$CKSUM2" = "" ]; then \ |
${ECHO_MSG} ">> No checksum recorded for $$file"; \ |
${ECHO_MSG} ">> No checksum recorded for $$file."; \ |
OK="false"; \ |
OK="false"; \ |
|
elif [ "$$CKSUM2" = "IGNORE" ]; then \ |
|
${ECHO_MSG} ">> Checksum for $$file is set to IGNORE in md5 file even though"; \ |
|
${ECHO_MSG} " the file is not in the "'$$'"{IGNOREFILES} list."; \ |
|
OK="false"; \ |
elif [ "$$CKSUM" != "$$CKSUM2" ]; then \ |
elif [ "$$CKSUM" != "$$CKSUM2" ]; then \ |
${ECHO_MSG} ">> Checksum mismatch for $$file"; \ |
${ECHO_MSG} ">> Checksum mismatch for $$file."; \ |
exit 1; \ |
exit 1; \ |
fi; \ |
fi; \ |
done; \ |
done; \ |
if [ "$$OK" = "" ]; then \ |
for file in ${_IGNOREFILES}; do \ |
|
CKSUM2=`${GREP} "($$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ |
|
if [ "$$CKSUM2" = "" ]; then \ |
|
${ECHO_MSG} ">> No checksum recorded for $$file, file is in "'$$'"{IGNOREFILES} list."; \ |
|
OK="false"; \ |
|
elif [ "$$CKSUM2" != "IGNORE" ]; then \ |
|
${ECHO_MSG} ">> Checksum for $$file is not set to IGNORE in md5 file even though"; \ |
|
${ECHO_MSG} " the file is in the "'$$'"{IGNOREFILES} list."; \ |
|
OK="false"; \ |
|
fi; \ |
|
done; \ |
|
if [ "$$OK" = "true" ]; then \ |
${ECHO_MSG} "Checksums OK."; \ |
${ECHO_MSG} "Checksums OK."; \ |
else \ |
else \ |
${ECHO_MSG} "Checksums OK for files that have them."; \ |
${ECHO_MSG} "There may be some inconsistencies, make sure the Makefile and md5 file"; \ |
|
${ECHO_MSG} "(\"${MD5_FILE}\") are up to date."; \ |
fi) ; \ |
fi) ; \ |
fi |
fi |
.endif |
.endif |
|
|
notfound=1; \ |
notfound=1; \ |
fi; \ |
fi; \ |
else \ |
else \ |
if which -s "$$prog"; then \ |
if which "$$prog" > /dev/null 2>&1 ; then \ |
${ECHO_MSG} "===> ${PKGNAME} depends on executable: $$prog - found"; \ |
${ECHO_MSG} "===> ${PKGNAME} depends on executable: $$prog - found"; \ |
notfound=0; \ |
notfound=0; \ |
else \ |
else \ |
|
|
|
|
.endif |
.endif |
|
|
|
.if !target(clean-depends) |
|
clean-depends: |
|
.if defined(FETCH_DEPENDS) || defined(BUILD_DEPENDS) || defined(LIB_DEPENDS) \ |
|
|| defined(RUN_DEPENDS) |
|
@for i in ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS} ${RUN_DEPENDS}; do \ |
|
dir=`${ECHO} $$i | ${SED} -e 's/.*://'`; \ |
|
if [ -d $$dir ] ; then (cd $$dir; ${MAKE} clean); fi \ |
|
done |
|
.endif |
|
.if defined(DEPENDS) |
|
@for dir in ${DEPENDS}; do \ |
|
if [ -d $$dir ] ; then (cd $$dir; ${MAKE} clean); fi \ |
|
done |
|
.endif |
|
.endif |
|
|
.if !target(depends-list) |
.if !target(depends-list) |
depends-list: |
depends-list: |
@for i in ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS} ${DEPENDS}; do \ |
@for i in ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS}; do \ |
dir=`${ECHO} $$i | ${SED} -e 's/.*://'`; \ |
dir=`${ECHO} $$i | ${SED} -e 's/.*://'`; \ |
(cd $$dir ; ${MAKE} package-name depends-list); \ |
(cd $$dir; ${MAKE} package-name depends-list); \ |
done |
done |
|
@for dir in ${DEPENDS}; do \ |
|
(cd $$dir; ${MAKE} package-name depends-list); \ |
|
done |
.endif |
.endif |
|
|
################################################################ |
################################################################ |
|
|
${ECHO} -n "|/dev/null"; \ |
${ECHO} -n "|/dev/null"; \ |
fi |
fi |
@${ECHO} -n "|${MAINTAINER}|${CATEGORIES}|" |
@${ECHO} -n "|${MAINTAINER}|${CATEGORIES}|" |
@cd ${.CURDIR} && ${ECHO} -n `make depends-list|sort|uniq` |
@cd ${.CURDIR} && ${ECHO} -n `make depends-list|sort -u` |
@${ECHO} -n "|" |
@${ECHO} -n "|" |
@cd ${.CURDIR} && ${ECHO} -n `make package-depends|sort|uniq` |
@cd ${.CURDIR} && ${ECHO} -n `make package-depends|sort -u` |
@${ECHO} "" |
@${ECHO} "" |
.endif |
.endif |
|
|
|
|
.if defined(FETCH_DEPENDS) || defined(BUILD_DEPENDS) || \ |
.if defined(FETCH_DEPENDS) || defined(BUILD_DEPENDS) || \ |
defined(LIB_DEPENDS) || defined(DEPENDS) |
defined(LIB_DEPENDS) || defined(DEPENDS) |
@${ECHO} -n 'This port requires package(s) "' |
@${ECHO} -n 'This port requires package(s) "' |
@${ECHO} -n `make depends-list | sort | uniq` |
@${ECHO} -n `make depends-list | sort -u` |
@${ECHO} '" to build.' |
@${ECHO} '" to build.' |
.endif |
.endif |
.endif |
.endif |
|
|
print-package-depends: |
print-package-depends: |
.if defined(RUN_DEPENDS) || defined(LIB_DEPENDS) || defined(DEPENDS) |
.if defined(RUN_DEPENDS) || defined(LIB_DEPENDS) || defined(DEPENDS) |
@${ECHO} -n 'This port requires package(s) "' |
@${ECHO} -n 'This port requires package(s) "' |
@${ECHO} -n `make package-depends | sort | uniq` |
@${ECHO} -n `make package-depends | sort -u` |
@${ECHO} '" to run.' |
@${ECHO} '" to run.' |
.endif |
.endif |
.endif |
.endif |
|
|
.if !target(fake-pkg) |
.if !target(fake-pkg) |
fake-pkg: |
fake-pkg: |
@if [ ! -f ${PKGDIR}/PLIST -o ! -f ${PKGDIR}/COMMENT -o ! -f ${PKGDIR}/DESCR ]; then ${ECHO} "** Missing package files for ${PKGNAME} - installation not recorded."; exit 1; fi |
@if [ ! -f ${PKGDIR}/PLIST -o ! -f ${PKGDIR}/COMMENT -o ! -f ${PKGDIR}/DESCR ]; then ${ECHO} "** Missing package files for ${PKGNAME} - installation not recorded."; exit 1; fi |
@if [ ! -d ${PKG_DBDIR} ]; then ${RM} -f ${PKG_DBDIR}; ${MKDIR} -p ${PKG_DBDIR}; fi |
@if [ ! -d ${PKG_DBDIR} ]; then ${RM} -f ${PKG_DBDIR}; ${MKDIR} ${PKG_DBDIR}; fi |
.if defined(FORCE_PKG_REGISTER) |
.if defined(FORCE_PKG_REGISTER) |
@${RM} -rf ${PKG_DBDIR}/${PKGNAME} |
@${RM} -rf ${PKG_DBDIR}/${PKGNAME} |
.endif |
.endif |
@if [ ! -d ${PKG_DBDIR}/${PKGNAME} ]; then \ |
@if [ ! -d ${PKG_DBDIR}/${PKGNAME} ]; then \ |
${ECHO_MSG} "===> Registering installation for ${PKGNAME}"; \ |
${ECHO_MSG} "===> Registering installation for ${PKGNAME}"; \ |
${MKDIR} -p ${PKG_DBDIR}/${PKGNAME}; \ |
${MKDIR} ${PKG_DBDIR}/${PKGNAME}; \ |
${PKG_CMD} ${PKG_ARGS} -O ${PKGFILE} > ${PKG_DBDIR}/${PKGNAME}/+CONTENTS; \ |
${PKG_CMD} ${PKG_ARGS} -O ${PKGFILE} > ${PKG_DBDIR}/${PKGNAME}/+CONTENTS; \ |
${CP} ${PKGDIR}/DESCR ${PKG_DBDIR}/${PKGNAME}/+DESC; \ |
${CP} ${PKGDIR}/DESCR ${PKG_DBDIR}/${PKGNAME}/+DESC; \ |
${CP} ${PKGDIR}/COMMENT ${PKG_DBDIR}/${PKGNAME}/+COMMENT; \ |
${CP} ${PKGDIR}/COMMENT ${PKG_DBDIR}/${PKGNAME}/+COMMENT; \ |
|
|
${CP} ${PKGDIR}/REQ ${PKG_DBDIR}/${PKGNAME}/+REQ; \ |
${CP} ${PKGDIR}/REQ ${PKG_DBDIR}/${PKGNAME}/+REQ; \ |
fi; \ |
fi; \ |
else \ |
else \ |
${ECHO_MSG} "===> ${PKGNAME} is already installed - perhaps an older version?"; \ |
${ECHO_MSG} "===> ${PKGNAME} is already installed - perhaps an older version?"; \ |
${ECHO_MSG} " If so, you may wish to \`\`pkg_delete ${PKGNAME}'' and install"; \ |
${ECHO_MSG} " If so, you may wish to \`\`pkg_delete ${PKGNAME}'' and install"; \ |
${ECHO_MSG} " this port again by \`\`make reinstall'' to upgrade it properly."; \ |
${ECHO_MSG} " this port again by \`\`make reinstall'' to upgrade it properly."; \ |
fi |
fi |
.endif |
.endif |
|
|