1996-12-25 15:10:09 -05:00
#-*- mode: Fundamental; tab-width: 4; -*-
# ex:ts=4
1999-08-10 15:50:37 -04:00
FULL_REVISION = $$ OpenBSD: bsd.port.mk,v 1.106 1999/08/10 19:50:37 espie Exp $$
1999-05-10 17:35:25 -04:00
# $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 $
1996-06-03 18:47:10 -04:00
#
# bsd.port.mk - 940820 Jordan K. Hubbard.
# This file is in the public domain.
#
# Please view me with 4 column tabs!
1997-09-09 11:11:28 -04:00
# There are two different types of "maintainers" in the whole ports
# framework concept. Maintainers of the bsd.port*.mk files
1998-07-06 18:06:51 -04:00
# are listed below in the ${OPSYS}_MAINTAINER entries (this file
1997-09-09 11:11:28 -04:00
# is used by multiple *BSD flavors). You should consult them directly
# if you have any questions/suggestions regarding this file since only
# they are allowed to modify the master copies in the CVS repository!
# For each port, the MAINTAINER variable is what you should consult for
# contact information on the person(s) to contact if you have questions/
# suggestions about that specific port. By default (if no MAINTAINER
1999-01-08 18:45:48 -05:00
# is listed), a port is maintained by the subscribers of the ports@openbsd.org
# mailing list, and any correspondence should be directed there.
1996-12-25 15:10:09 -05:00
#
1999-05-10 17:35:25 -04:00
OpenBSD_MAINTAINER = ports-admin@openbsd.org
1996-06-03 18:47:10 -04:00
1998-12-17 13:25:06 -05:00
# NEED_VERSION: we need at least this version of bsd.port.mk for this
# port to build
. i f d e f i n e d ( N E E D _ V E R S I O N )
1999-02-20 19:50:28 -05:00
_VERSION_REVISION = ${ FULL_REVISION : M [0-9]*.* }
1998-12-17 13:25:06 -05:00
1999-02-20 19:50:28 -05:00
_VERSION = ${ _VERSION_REVISION : C / \. .*// }
_REVISION = ${ _VERSION_REVISION : C /.* \. // }
1998-12-17 13:25:06 -05:00
1999-02-20 19:50:28 -05:00
_VERSION_NEEDED = ${ NEED_VERSION : C / \. .*// }
_REVISION_NEEDED = ${ NEED_VERSION : C /.* \. // }
1998-12-17 13:25:06 -05:00
.BEGIN :
1999-02-20 19:50:28 -05:00
@if [ ${ _VERSION_NEEDED } -gt ${ _VERSION } -o \
${ _VERSION_NEEDED } -eq ${ _VERSION } -a \
${ _REVISION_NEEDED } -gt ${ _REVISION } ] ; \
1998-12-17 13:25:06 -05:00
then \
${ ECHO } " Need version ${ NEED_VERSION } of bsd.port.mk " ; \
${ FALSE } ; \
fi ;
. e n d i f
1996-06-03 18:47:10 -04:00
# Supported Variables and their behaviors:
#
# Variables that typically apply to all ports:
#
1998-09-07 18:33:19 -04:00
# ONLY_FOR_ARCHS - If a port only makes sense to certain architectures, this
1997-01-11 06:58:11 -05:00
# is a list containing the names for them. It is checked
1998-09-07 18:33:19 -04:00
# against the predefined ${MACHINE_ARCH} value
1999-01-08 18:45:48 -05:00
# ARCH - The architecture (default: "uname -m").
# OPSYS - The operating system (default: "uname -s").
# OPSYS_VER - The current version of the operating system
# (default: "uname -r").
# PORTSDIR - The root of the ports tree. Defaults: /usr/ports
# DISTDIR - Where to get gzip'd, tarballed copies of original sources.
1996-12-25 15:10:09 -05:00
# (default: ${PORTSDIR}/distfiles).
1996-06-03 18:47:10 -04:00
# PREFIX - Where to install things in general (default: /usr/local).
# MASTER_SITES - Primary location(s) for distribution files if not found
1996-12-25 15:10:09 -05:00
# locally.
1998-09-07 18:33:19 -04:00
# MASTER_SITE_SUBDIR - Directory that "%SUBDIR%" in MASTER_SITES is
# replaced by.
1996-06-03 18:47:10 -04:00
# PATCH_SITES - Primary location(s) for distribution patch files
1996-12-25 15:10:09 -05:00
# (see PATCHFILES below) if not found locally.
1998-09-07 18:33:19 -04:00
# PATCH_SITE_SUBDIR - Directory that "%SUBDIR%" in PATCH_SITES is
# replaced by.
1996-06-03 18:47:10 -04:00
#
1996-12-25 15:10:09 -05:00
# MASTER_SITE_BACKUP - Backup location(s) for distribution files and patch
# files if not found locally and ${MASTER_SITES}/${PATCH_SITES}
# (default:
1998-04-04 23:20:38 -05:00
# ftp://ftp.openbsd.org/pub/OpenBSD/distfiles/${DIST_SUBDIR}/
1998-07-07 23:27:17 -04:00
# ftp://ftp.openbsd.org/pub/OpenBSD/licensed/${DIST_SUBDIR}/
1996-12-25 15:10:09 -05:00
# ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/)
1996-06-03 18:47:10 -04:00
# MASTER_SITE_OVERRIDE - If set, override the MASTER_SITES setting with this
# value.
1998-04-04 23:20:38 -05:00
# MASTER_SITE_OPENBSD - If set, only use ftp.openbsd.org as the
# MASTER_SITE_OVERRIDE.
1996-06-03 18:47:10 -04:00
# PACKAGES - A top level directory where all packages go (rather than
# going locally to each port). (default: ${PORTSDIR}/packages).
1998-11-24 20:08:35 -05:00
# GMAKE - Set to path of GNU make if not in $PORTPATH (default: gmake).
# XMKMF - Set to path of `xmkmf' if not in $PORTPATH
# (default: xmkmf -a ).
1996-06-03 18:47:10 -04:00
# MAINTAINER - The e-mail address of the contact person for this port
1999-01-08 18:45:48 -05:00
# Defaults: ports@OpenBSD.ORG
1996-12-25 15:10:09 -05:00
# CATEGORIES - A list of descriptive categories into which this port falls.
1997-09-21 06:58:41 -04:00
# WRKOBJDIR - A top level directory where, if defined, the separate working
# directories will get created, and symbolically linked to from
# ${WRKDIR} (see below). This is useful for building ports on
# several architectures, then ${PORTSDIR} can be NFS-mounted
1999-02-17 18:45:15 -05:00
# while ${WRKOBJDIR} is local to every arch
1999-03-03 13:18:46 -05:00
# PREFERRED_CIPHERS
# - a list of the form cipher.sig of programs to use to check
# recorded checksums, in order of decreasing trust.
# (default to using sha1, then rmd160, then md5).
1996-06-03 18:47:10 -04:00
#
# Variables that typically apply to an individual port. Non-Boolean
# variables without defaults are *mandatory*.
#
# WRKDIR - A temporary working directory that gets *clobbered* on clean
# (default: ${.CURDIR}/work).
# WRKSRC - A subdirectory of ${WRKDIR} where the distribution actually
# unpacks to. (Default: ${WRKDIR}/${DISTNAME} unless
# NO_WRKSUBDIR is set, in which case simply ${WRKDIR}).
1999-02-03 12:53:13 -05:00
# WRKBUILD - The directory where the port is actually built, useful for
# ports that need a separate directory (default: ${WRKSRC}).
# This is intended for GNU configure.
1999-02-28 18:23:47 -05:00
# SEPARATE_BUILD
# - define if the port can build in directory separate from
# WRKSRC. This redefines WRKBUILD to be arch-dependent,
# along with the configure, build and install cookies
1996-06-03 18:47:10 -04:00
# DISTNAME - Name of port or distribution.
# DISTFILES - Name(s) of archive file(s) containing distribution
# (default: ${DISTNAME}${EXTRACT_SUFX}).
1999-04-20 14:04:27 -04:00
# SUPDISTFILES - Names of supplementary archive files that don't get
# used all the time (default: empty).
1996-06-03 18:47:10 -04:00
# PATCHFILES - Name(s) of additional files that contain distribution
# patches (default: none). make will look for them at
# PATCH_SITES (see above). They will automatically be
# uncompressed before patching if the names end with
# ".gz" or ".Z".
1999-04-20 14:04:27 -04:00
# SUPPATCHFILES - Names of supplementary patch files that don't get
# used all the time (default: empty).
1996-12-25 15:10:09 -05:00
# DIST_SUBDIR - Suffix to ${DISTDIR}. If set, all ${DISTFILES}
1996-06-03 18:47:10 -04:00
# and ${PATCHFILES} will be put in this subdirectory of
# ${DISTDIR}. Also they will be fetched in this subdirectory
# from FreeBSD mirror sites.
1996-12-25 15:10:09 -05:00
# ALLFILES - All of ${DISTFILES} and ${PATCHFILES}.
1999-01-08 18:45:48 -05:00
# MIRROR_DISTFILE - Whether the distfile is redistributable without restrictions.
# Defaults to "yes", set this to "no" if restrictions exist.
1996-12-25 15:10:09 -05:00
# IGNOREFILES - If some of the ${ALLFILES} are not checksum-able, set
# this variable to their names.
1996-06-03 18:47:10 -04:00
# PKGNAME - Name of the package file to create if the DISTNAME
# isn't really relevant for the port/package
# (default: ${DISTNAME}).
# EXTRACT_ONLY - If defined, a subset of ${DISTFILES} you want to
# actually extract.
# PATCHDIR - A directory containing any additional patches you made
1998-11-18 23:20:09 -05:00
# to port this software to OpenBSD (default:
1996-06-03 18:47:10 -04:00
# ${.CURDIR}/patches)
1998-11-18 23:20:09 -05:00
# PATCH_LIST - list of patches to apply, can include wildcards (default:
# patch-*)
1996-06-03 18:47:10 -04:00
# SCRIPTDIR - A directory containing any auxiliary scripts
# (default: ${.CURDIR}/scripts)
# FILESDIR - A directory containing any miscellaneous additional files.
# (default: ${.CURDIR}/files)
# PKGDIR - A direction containing any package creation files.
# (default: ${.CURDIR}/pkg)
# PKG_DBDIR - Where package installation is recorded (default: /var/db/pkg)
# FORCE_PKG_REGISTER - If set, it will overwrite any existing package
# registration information in ${PKG_DBDIR}/${PKGNAME}.
# NO_MTREE - If set, will not invoke mtree from bsd.port.mk from
1997-09-09 11:11:28 -04:00
# the "install" target.
# MTREE_FILE - The name of the mtree file (default: /etc/mtree/BSD.x11.dist
# if USE_IMAKE or USE_X11 is set, /etc/mtree/BSD.local.dist
# otherwise.)
1998-03-26 22:30:43 -05:00
# COMES_WITH - The first version that a port was made part of the
# standard OpenBSD distribution. If the current OpenBSD
# version is >= this version then a notice will be
# displayed instead the port being generated.
1996-06-03 18:47:10 -04:00
#
# NO_BUILD - Use a dummy (do-nothing) build target.
1996-08-23 07:37:41 -04:00
# NO_CONFIGURE - Use a dummy (do-nothing) configure target.
1996-12-25 15:10:09 -05:00
# NO_CDROM - Port may not go on CDROM. Set this string to reason.
1996-08-23 07:37:41 -04:00
# NO_DESCRIBE - Use a dummy (do-nothing) describe target.
# NO_EXTRACT - Use a dummy (do-nothing) extract target.
# NO_INSTALL - Use a dummy (do-nothing) install target.
# NO_PACKAGE - Use a dummy (do-nothing) package target.
# NO_PKG_REGISTER - Don't register a port install as a package.
1996-06-03 18:47:10 -04:00
# NO_WRKSUBDIR - Assume port unpacks directly into ${WRKDIR}.
# NO_WRKDIR - There's no work directory at all; port does this someplace
# else.
# NO_DEPENDS - Don't verify build of dependencies.
1998-09-07 18:33:19 -04:00
# NOCLEANDEPENDS - Don't nuke dependent dirs on make clean (Default: yes)
1996-12-25 15:10:09 -05:00
# BROKEN - Port is broken. Set this string to the reason why.
1996-06-03 18:47:10 -04:00
# RESTRICTED - Port is restricted. Set this string to the reason why.
1999-05-14 00:38:36 -04:00
# USE_BZIP2 - Port distfiles use bzip2 instead of gzip for compression.
# USE_ZIP - Port distfiles use zip instead of tar for packaging.
# USE_GMAKE - Port uses gmake.
# USE_LIBTOOL - Port uses libtool.
1998-11-24 20:08:35 -05:00
#
# XXX: cygnus products do NOT use autoconf for making its main
# configure from configure.in
1999-05-14 00:38:36 -04:00
# USE_AUTOCONF - Port uses autoconf (implies GNU_CONFIGURE).
1998-11-24 20:08:35 -05:00
# AUTOCONF_DIR - Where to apply autoconf (default: ${WRKSRC}).
1999-05-14 00:38:36 -04:00
# USE_PERL5 - Port uses perl5 for building and running.
# USE_IMAKE - Port uses imake.
# USE_X11 - Port uses X11 and installs in ${X11BASE}
# USE_EGCC - Port needs the egcs C compiler
# USE_EGXX - Port needs the egcs C++ compiler
1996-06-03 18:47:10 -04:00
# NO_INSTALL_MANPAGES - For imake ports that don't like the install.man
# target.
# HAS_CONFIGURE - Says that the port has its own configure script.
# GNU_CONFIGURE - Set if you are using GNU configure (optional).
# CONFIGURE_SCRIPT - Name of configure script, defaults to 'configure'.
# CONFIGURE_ARGS - Pass these args to configure if ${HAS_CONFIGURE} is set.
1999-03-01 14:44:18 -05:00
# CONFIGURE_SHARED - An argument to GNU configure that expands to
# --enable-shared for those architectures that support
# shared libraries and --disable-shared for architectures
# that do not support shared libraries.
1999-05-04 14:12:24 -04:00
# LIBTOOL_FLAGS - Pass these flags in ${CONFIGURE} and ${MAKE} environment so
# to be used as args by libtool.
1997-09-09 11:11:28 -04:00
# CONFIGURE_ENV - Pass these env (shell-like) to configure if
1996-06-03 18:47:10 -04:00
# ${HAS_CONFIGURE} is set.
1997-09-09 11:11:28 -04:00
# SCRIPTS_ENV - Additional environment vars passed to scripts in
# ${SCRIPTDIR} executed by bsd.port.mk.
# MAKE_ENV - Additional environment vars passed to sub-make in build
# stage.
1996-06-03 18:47:10 -04:00
# IS_INTERACTIVE - Set this if your port needs to interact with the user
# during a build. User can then decide to skip this port by
# setting ${BATCH}, or compiling only the interactive ports
# by setting ${INTERACTIVE}.
1996-10-22 10:01:19 -04:00
# FETCH_DEPENDS - A list of "path:dir" pairs of other ports this
# package depends in the "fetch" stage. "path" is the
# name of a file if it starts with a slash (/), an
# executable otherwise. make will test for the
# existence (if it is a full pathname) or search for
1998-11-24 20:08:35 -05:00
# it in $PORTPATH (if it is an executable) and go
1996-10-22 10:01:19 -04:00
# into "dir" to do a "make all install" if it's not
# found.
# BUILD_DEPENDS - A list of "path:dir" pairs of other ports this
# package depends to build (between the "extract" and
# "build" stages, inclusive). The test done to
# determine the existence of the dependency is the
# same as FETCH_DEPENDS.
# RUN_DEPENDS - A list of "path:dir" pairs of other ports this
# package depends to run. The test done to determine
# the existence of the dependency is the same as
# FETCH_DEPENDS. This will be checked during the
# "install" stage and the name of the dependency will
# be put into the package as well.
1996-06-03 18:47:10 -04:00
# LIB_DEPENDS - A list of "lib:dir" pairs of other ports this package
# depends on. "lib" is the name of a shared library.
# make will use "ldconfig -r" to search for the
1998-09-07 18:33:19 -04:00
# library. Note that lib can be any regular expression.
# In older versions of this file, you need two backslashes
# in front of dots (.) to supress its special meaning (e.g.,
# use "foo\\.2\\.:${PORTSDIR}/utils/foo" to match "libfoo.2.*").
# No special backslashes are needed to escape regular
# expression metacharacters in OpenBSD, and the old backslash
# escapes are recognised for backwards compatibility.
1996-06-03 18:47:10 -04:00
# DEPENDS - A list of other ports this package depends on being
# made first. Use this for things that don't fall into
# the above two categories.
1999-05-14 00:38:36 -04:00
#
# EXTRACT_CMD - Command for extracting archives (default: "gzip",
# "bzip2" if USE_BZIP2, "unzip" if USE_ZIP).
# EXTRACT_SUFX - Suffix for archive files (default: ".tar.gz",
# ".tar.bz2" if USE_BZIP2, ".zip" if USE_ZIP).
# EXTRACT_BEFORE_ARGS
# - Arguments to ${EXTRACT_CMD} before filename
# (default: "-dc" for gzip or bzip2, "-q" for unzip)
# EXTRACT_AFTER_ARGS
# - Arguments to ${EXTRACT_CMD} following filename
# (default: "| ${TAR} -xf -", or "-d ${WKRDIR}" if USE_ZIP).
1996-06-03 18:47:10 -04:00
#
1998-11-24 20:08:35 -05:00
# FETCH_CMD - Full path to ftp/http fetch command if not in $PORTPATH
1998-09-07 18:33:19 -04:00
# (default: /usr/bin/ftp).
1996-08-23 07:37:41 -04:00
# FETCH_BEFORE_ARGS -
# Arguments to ${FETCH_CMD} before filename (default: none).
# FETCH_AFTER_ARGS -
# Arguments to ${FETCH_CMD} following filename (default: none).
1998-09-07 18:33:19 -04:00
# NO_IGNORE - Set this to YES (most probably in a "make fetch" in
# ${PORTSDIR}) if you want to fetch all distfiles,
# even for packages not built due to limitation by
# absent X or Motif or ONLY_FOR_ARCHS...
1998-12-16 14:59:48 -05:00
# NO_WARNINGS - Set this to YES to disable warnings regarding variables
# to define to control the build. Automatically set
# from the "mirror-distfiles" target.
1998-09-07 18:33:19 -04:00
# ALL_TARGET - The target to pass to make in the package when building.
# (default: "all")
# INSTALL_TARGET- The target to pass to make in the package when installing.
# (default: "install")
1996-06-03 18:47:10 -04:00
#
# Motif support:
#
1998-12-18 07:00:46 -05:00
# USE_MOTIF - Set this in your port if it requires Motif or Lesstif.
# It will be built using Lesstif port unless Motif libraries
# found or HAVE_MOTIF is defined. See also REQUIRES_MOTIF.
1998-11-17 02:14:16 -05:00
#
1998-12-18 07:00:46 -05:00
# REQUIRES_MOTIF- Set this in your port if it requires Motif. It will be
1996-06-03 18:47:10 -04:00
# built only if HAVE_MOTIF is set.
1999-01-08 18:45:48 -05:00
# HAVE_MOTIF - If set, means system has Motif. Typically set in /etc/mk.conf.
1996-06-03 18:47:10 -04:00
# MOTIF_STATIC - If set, link libXm statically; otherwise, link it
1999-01-08 18:45:48 -05:00
# dynamically. Typically set in /etc/mk.conf.
1996-08-23 07:37:41 -04:00
# MOTIFLIB - Set automatically to appropriate value depending on
# ${MOTIF_STATIC}. Substitute references to -lXm with
# patches to make your port conform to our standards.
1997-09-09 11:11:28 -04:00
# MOTIF_ONLY - If set, build Motif ports only. (Not much use except for
# building packages.)
1996-06-03 18:47:10 -04:00
#
# Variables to change if you want a special behavior:
#
# ECHO_MSG - Used to print all the '===>' style prompts - override this
# to turn them off (default: /bin/echo).
1997-09-09 11:11:28 -04:00
# DEPENDS_TARGET - The target to execute when a port is calling a
# dependency (default: "install").
1996-08-23 07:37:41 -04:00
# PATCH_DEBUG - If set, print out more information about the patches as
# it attempts to apply them.
#
1996-12-25 15:10:09 -05:00
# Variables that serve as convenient "aliases" for your *-install targets.
1996-08-23 07:37:41 -04:00
# Use these like: "${INSTALL_PROGRAM} ${WRKSRC}/prog ${PREFIX}/bin".
1996-12-25 15:10:09 -05:00
#
1998-09-07 18:33:19 -04:00
# INSTALL_PROGRAM - A command to install binary executables.
# INSTALL_SCRIPT - A command to install executable scripts.
# INSTALL_DATA - A command to install sharable data.
# INSTALL_MAN - A command to install manpages (doesn't compress).
# INSTALL_PROGRAM_DIR - Create a directory for storing programs
# INSTALL_SCRIPT_DIR - Create a directory for storing scripts (alias for
# (INSTALL_PROGRAM_DIR)
# INSTALL_DATA_DIR - Create a directory for storing arbitrary data
# INSTALL_MAN_DIR - Create a directory for storing man pages
1996-06-03 18:47:10 -04:00
#
1998-09-07 18:33:19 -04:00
# It is assumed that the port installs manpages uncompressed. If this is
# not the case, set MANCOMPRESSED in the port and define MAN<sect> and
# CAT<sect> for the compressed pages. The pages will then be automagically
# uncompressed.
1996-12-25 15:10:09 -05:00
#
1998-09-07 18:33:19 -04:00
# MANCOMPRESSED - Indicates that the port installs manpages in a compressed
# form (default: port installs manpages uncompressed).
1996-12-25 15:10:09 -05:00
# 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".
1998-09-07 18:33:19 -04:00
# CAT<sect> - The same as MAN<sect>, only for formatted manpages.
# MANPREFIX -The directory prefix for ${MAN<sect>} (default: ${PREFIX}).
# CATPREFIX - The directory prefix for ${CAT<sect>} (default: ${PREFIX}).
1996-12-25 15:10:09 -05:00
#
1999-03-01 14:44:18 -05:00
# Other variables:
#
# NO_SHARED_LIBS - defined as "yes" for those machine architectures that do
# not support shared libraries. WARNING: This value is
# NOT defined until AFTER ".include bsd.port.mk". Thus
# you can NOT use something like ".if defined(NO_SHARED_LIBS)"
# before this file is included.
#
1996-06-03 18:47:10 -04:00
# Default targets and their behaviors:
#
# fetch - Retrieves ${DISTFILES} (and ${PATCHFILES} if defined)
# into ${DISTDIR} as necessary.
# fetch-list - Show list of files that would be retrieved by fetch
# extract - Unpacks ${DISTFILES} into ${WRKDIR}.
# patch - Apply any provided patches to the source.
# configure - Runs either GNU configure, one or more local configure
# scripts or nothing, depending on what's available.
# build - Actually compile the sources.
# install - Install the results of a build.
# reinstall - Install the results of a build, ignoring "already installed"
# flag.
1998-09-07 18:33:19 -04:00
# deinstall - Remove the installation. Alias: uninstall
1998-07-06 18:06:51 -04:00
# plist - create a file suitable for use as a packing list. This
# is for port maintainers.
1996-06-03 18:47:10 -04:00
# package - Create a package from an _installed_ port.
# describe - Try to generate a one-line description for each port for
# use in INDEX files and the like.
# checkpatch - Do a "patch -C" instead of a "patch". Note that it may
# give incorrect results if multiple patches deal with
1998-11-24 20:08:35 -05:00
# the same file.
1999-03-03 13:18:46 -05:00
# checksum - Use ${CHECKSUM_FILE} to ensure that your distfiles are valid.
# makesum - Generate ${CHECKSUM_FILE} (only do this for your own ports!).
# addsum - update ${CHECKSUM_FILE} in a non-destructive way
# (your own ports only!)
1998-09-07 18:33:19 -04:00
# readme - Create a README.html file describing the category or package
# mirror-distfiles - Mirror the distfile(s) if they are freely redistributable
# Setting MIRROR_DISTFILE to "no" in the package Makefile
# will override the default "yes", and the distfile will
# not be fetched.
1999-04-02 01:55:56 -05:00
# list-distfiles- list the distribution and patch files used by a port.
# Typical use is (from the top level of the ports tree)
# make ECHO_MSG=: list-distfiles | tee some-file
# obj - pre-build ${WRKDIR} -> ${WRKOBJDIR}/${PORTSUBDIR} links
1999-04-20 14:22:56 -04:00
# print-depends - print all dependencies for the given package
1996-06-03 18:47:10 -04:00
#
# Default sequence for "all" is: fetch checksum extract patch configure build
#
# Please read the comments in the targets section below, you
# should be able to use the pre-* or post-* targets/scripts
# (which are available for every stage except checksum) or
# override the do-* targets to do pretty much anything you want.
#
# NEVER override the "regular" targets unless you want to open
# a major can of worms.
1998-09-07 18:33:19 -04:00
# Get the architecture
ARCH != uname -m
1998-07-06 18:06:51 -04:00
# Get the operating system type and version
1998-04-04 23:20:38 -05:00
OPSYS != uname -s
1998-07-06 18:06:51 -04:00
OPSYS_VER != uname -r
1998-04-04 23:20:38 -05:00
1996-06-03 18:47:10 -04:00
. i f e x i s t s ( $ { . C U R D I R } / . . / M a k e f i l e . i n c )
. i n c l u d e "${.CURDIR}/../Makefile.inc"
. e n d i f
1999-02-17 18:45:15 -05:00
# Define SUPPORT_SHARES for those machines that support shared libraries.
#
. i f (${MACHINE_ARCH} = = "alpha" ) || ( ${ MACHINE_ARCH } = = "powerpc" ) || \
( ${ MACHINE_ARCH } = = "vax" ) || ( ${ MACHINE_ARCH } = = "hppa" )
NO_SHARED_LIBS = yes
. e n d i f
1998-09-07 18:33:19 -04:00
NOCLEANDEPENDS = yes
1997-01-11 06:58:11 -05:00
NOMANCOMPRESS ?= yes
1997-09-21 06:58:41 -04:00
DEF_UMASK ?= 022
1996-08-23 07:37:41 -04:00
1997-09-09 11:11:28 -04:00
. i f e x i s t s ( $ { . C U R D I R } / M a k e f i l e . $ { A R C H } - $ { O P S Y S } )
. i n c l u d e "${.CURDIR}/Makefile.${ARCH}-${OPSYS}"
. e l i f e x i s t s ( $ { . C U R D I R } / M a k e f i l e . $ { O P S Y S } )
. i n c l u d e "${.CURDIR}/Makefile.${OPSYS}"
. e l i f e x i s t s ( $ { . C U R D I R } / M a k e f i l e . $ { A R C H } )
. i n c l u d e "${.CURDIR}/Makefile.${ARCH}"
. e n d i f
1996-06-03 18:47:10 -04:00
# 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
1996-12-25 15:10:09 -05:00
# by individual Makefiles or local system make configuration.
1997-09-09 11:11:28 -04:00
PORTSDIR ?= /usr/ports
LOCALBASE ?= ${ DESTDIR } /usr/local
X11BASE ?= ${ DESTDIR } /usr/X11R6
1996-12-25 15:10:09 -05:00
DISTDIR ?= ${ PORTSDIR } /distfiles
_DISTDIR ?= ${ DISTDIR } /${ DIST_SUBDIR }
1996-06-03 18:47:10 -04:00
PACKAGES ?= ${ PORTSDIR } /packages
1999-07-28 08:40:56 -04:00
TEMPLATES ?= ${ PORTSDIR } /infrastructure/templates
1997-09-21 06:58:41 -04:00
1997-09-09 11:11:28 -04:00
. i f e x i s t s ( $ { . C U R D I R } / p a t c h e s . $ { A R C H } - $ { O P S Y S } )
PATCHDIR ?= ${ .CURDIR } /patches.${ ARCH } -${ OPSYS }
. e l i f e x i s t s ( $ { . C U R D I R } / p a t c h e s . $ { O P S Y S } )
PATCHDIR ?= ${ .CURDIR } /patches.${ OPSYS }
. e l i f e x i s t s ( $ { . C U R D I R } / p a t c h e s . $ { A R C H } )
PATCHDIR ?= ${ .CURDIR } /patches.${ ARCH }
. e l s e
1996-06-03 18:47:10 -04:00
PATCHDIR ?= ${ .CURDIR } /patches
1997-09-09 11:11:28 -04:00
. e n d i f
1998-11-18 23:20:09 -05:00
PATCH_LIST ?= patch-*
1997-09-09 11:11:28 -04:00
. i f e x i s t s ( $ { . C U R D I R } / s c r i p t s . $ { A R C H } - $ { O P S Y S } )
SCRIPTDIR ?= ${ .CURDIR } /scripts.${ ARCH } -${ OPSYS }
. e l i f e x i s t s ( $ { . C U R D I R } / s c r i p t s . $ { O P S Y S } )
SCRIPTDIR ?= ${ .CURDIR } /scripts.${ OPSYS }
. e l i f e x i s t s ( $ { . C U R D I R } / s c r i p t s . $ { A R C H } )
SCRIPTDIR ?= ${ .CURDIR } /scripts.${ ARCH }
. e l s e
1996-06-03 18:47:10 -04:00
SCRIPTDIR ?= ${ .CURDIR } /scripts
1997-09-09 11:11:28 -04:00
. e n d i f
. i f e x i s t s ( $ { . C U R D I R } / f i l e s . $ { A R C H } - $ { O P S Y S } )
FILESDIR ?= ${ .CURDIR } /files.${ ARCH } -${ OPSYS }
. e l i f e x i s t s ( $ { . C U R D I R } / f i l e s . $ { O P S Y S } )
FILESDIR ?= ${ .CURDIR } /files.${ OPSYS }
. e l i f e x i s t s ( $ { . C U R D I R } / f i l e s . $ { A R C H } )
FILESDIR ?= ${ .CURDIR } /files.${ ARCH }
. e l s e
1996-06-03 18:47:10 -04:00
FILESDIR ?= ${ .CURDIR } /files
1997-09-09 11:11:28 -04:00
. e n d i f
. i f e x i s t s ( $ { . C U R D I R } / p k g . $ { A R C H } - $ { O P S Y S } )
PKGDIR ?= ${ .CURDIR } /pkg.${ ARCH } -${ OPSYS }
. e l i f e x i s t s ( $ { . C U R D I R } / p k g . $ { O P S Y S } )
PKGDIR ?= ${ .CURDIR } /pkg.${ OPSYS }
. e l i f e x i s t s ( $ { . C U R D I R } / p k g . $ { A R C H } )
PKGDIR ?= ${ .CURDIR } /pkg.${ ARCH }
. e l s e
1996-06-03 18:47:10 -04:00
PKGDIR ?= ${ .CURDIR } /pkg
1997-09-09 11:11:28 -04:00
. e n d i f
1996-06-03 18:47:10 -04:00
. i f d e f i n e d ( U S E _ I M A K E ) | | d e f i n e d ( U S E _ X 1 1 )
PREFIX ?= ${ X11BASE }
. e l s e
PREFIX ?= ${ LOCALBASE }
. e n d i f
1999-03-16 18:35:37 -05:00
# where configuration files should go
SYSCONFDIR ?= /etc
1996-06-03 18:47:10 -04:00
# The following 4 lines should go away as soon as the ports are all updated
. i f d e f i n e d ( E X E C _ D E P E N D S )
BUILD_DEPENDS += ${ EXEC_DEPENDS }
RUN_DEPENDS += ${ EXEC_DEPENDS }
. e n d i f
. i f d e f i n e d ( U S E _ G M A K E )
1998-09-07 18:33:19 -04:00
BUILD_DEPENDS += ${ GMAKE } :${ PORTSDIR } /devel/gmake
MAKE_PROGRAM = ${ GMAKE }
. e l s e
MAKE_PROGRAM = ${ MAKE }
1997-09-09 11:11:28 -04:00
. e n d i f
1998-11-24 20:08:35 -05:00
. i f d e f i n e d ( U S E _ A U T O C O N F )
GNU_CONFIGURE = yes
BUILD_DEPENDS += ${ AUTOCONF } :${ PORTSDIR } /devel/autoconf
AUTOCONF_DIR ?= ${ WRKSRC }
# missing ?= not an oversight
AUTOCONF_ENV = PATH = ${ PORTPATH }
. e n d i f
1999-05-04 14:12:24 -04:00
. i f d e f i n e d ( U S E _ L I B T O O L )
LIBTOOL ?= ${ LOCALBASE } /bin/libtool
BUILD_DEPENDS += ${ LIBTOOL } :${ PORTSDIR } /devel/libtool
CONFIGURE_ENV += LIBTOOL = " ${ LIBTOOL } ${ LIBTOOL_FLAGS } "
MAKE_ENV += LIBTOOL = " ${ LIBTOOL } ${ LIBTOOL_FLAGS } "
. e n d i f
1998-11-05 05:36:14 -05:00
. i f d e f i n e d ( U S E _ E G C C )
1999-06-04 11:32:05 -04:00
_CC_VERSION != /usr/bin/cc -dumpversion
. i f ${_CC_VERSION} = = "2.8.0" || ${ _CC_VERSION } = = "2.8.1"
1999-04-10 03:48:53 -04:00
BUILD_DEPENDS += ${ EGCC } :${ PORTSDIR } /lang/egcs-stable
1998-11-05 05:36:14 -05:00
CC = ${ EGCC }
. e n d i f
1999-06-04 11:32:05 -04:00
. e n d i f
1998-11-05 05:36:14 -05:00
. i f d e f i n e d ( U S E _ E G X X )
1999-06-04 11:32:05 -04:00
_CXX_VERSION != /usr/bin/cc -dumpversion
. i f ${_CXX_VERSION} = = "2.8.0" || ${ _CXX_VERSION } = = "2.8.1"
1999-04-10 03:48:53 -04:00
BUILD_DEPENDS += ${ EGXX } :${ PORTSDIR } /lang/egcs-stable
1998-11-05 05:36:14 -05:00
CXX = ${ EGXX }
. e n d i f
1999-06-04 11:32:05 -04:00
. e n d i f
1998-11-17 02:14:16 -05:00
. i f d e f i n e d ( U S E _ M O T I F ) & & ! d e f i n e d ( H A V E _ M O T I F ) & & ! d e f i n e d ( R E Q U I R E S _ M O T I F )
LIB_DEPENDS += Xm.:${ PORTSDIR } /x11/lesstif
. e n d i f
1998-09-07 18:33:19 -04:00
1996-06-03 18:47:10 -04:00
. i f e x i s t s ( $ { P O R T S D I R } / . . / M a k e f i l e . i n c )
. i n c l u d e "${PORTSDIR}/../Makefile.inc"
. e n d i f
EXTRACT_COOKIE ?= ${ WRKDIR } /.extract_done
1999-02-28 18:23:47 -05:00
PATCH_COOKIE ?= ${ WRKDIR } /.patch_done
. i f d e f i n e d ( S E P A R A T E _ B U I L D )
CONFIGURE_COOKIE ?= ${ WRKBUILD } /.configure_done
INSTALL_PRE_COOKIE ?= ${ WRKBUILD } /.install_started
INSTALL_COOKIE ?= ${ WRKBUILD } /.install_done
BUILD_COOKIE ?= ${ WRKBUILD } /.build_done
PACKAGE_COOKIE ?= ${ WRKBUILD } /.package_done
. e l s e
1996-06-03 18:47:10 -04:00
CONFIGURE_COOKIE ?= ${ WRKDIR } /.configure_done
1998-07-06 18:06:51 -04:00
INSTALL_PRE_COOKIE ?= ${ WRKDIR } /.install_started
1996-06-03 18:47:10 -04:00
INSTALL_COOKIE ?= ${ WRKDIR } /.install_done
BUILD_COOKIE ?= ${ WRKDIR } /.build_done
PACKAGE_COOKIE ?= ${ WRKDIR } /.package_done
1999-02-28 18:23:47 -05:00
. e n d i f
1996-06-03 18:47:10 -04:00
# Miscellaneous overridable commands:
GMAKE ?= gmake
1998-11-24 20:08:35 -05:00
AUTOCONF ?= autoconf
1998-11-05 05:36:14 -05:00
EGCC ?= egcc
EGXX ?= eg++
1996-06-03 18:47:10 -04:00
XMKMF ?= xmkmf -a
1998-11-24 20:08:35 -05:00
1999-03-03 13:18:46 -05:00
# be paranoid about which ciphers we trust
1997-09-09 11:11:28 -04:00
. i f e x i s t s ( / s b i n / m d 5 )
MD5 ?= /sbin/md5
1996-12-25 15:10:09 -05:00
. e l i f e x i s t s ( / b i n / m d 5 )
1996-06-11 06:38:02 -04:00
MD5 ?= /bin/md5
1997-09-09 11:11:28 -04:00
. e l i f e x i s t s ( / u s r / b i n / m d 5 )
MD5 ?= /usr/bin/md5
1996-12-25 15:10:09 -05:00
. e l s e
1997-09-09 11:11:28 -04:00
MD5 ?= md5
1996-12-25 15:10:09 -05:00
. e n d i f
1999-03-03 13:18:46 -05:00
. i f e x i s t s ( / s b i n / s h a 1 )
SHA1 ?= /sbin/sha1
. e l i f e x i s t s ( / b i n / s h a 1 )
SHA1 ?= /bin/sha1
. e l i f e x i s t s ( / u s r / b i n / s h a 1 )
SHA1 ?= /usr/bin/sha1
. e l s e
SHA1 ?= sha1
. e n d i f
. i f e x i s t s ( / s b i n / r m d 1 6 0 )
RMD160 ?= /sbin/rmd160
. e l i f e x i s t s ( / b i n / r m d 1 6 0 )
RMD160 ?= /bin/rmd160
. e l i f e x i s t s ( / u s r / b i n / r m d 1 6 0 )
RMD160 ?= /usr/bin/rmd160
. e l s e
RMD160 ?= rmd160
. e n d i f
# Compatibility game
1996-06-03 18:47:10 -04:00
MD5_FILE ?= ${ FILESDIR } /md5
1999-03-03 13:18:46 -05:00
CHECKSUM_FILE ?= ${ MD5_FILE }
# Don't touch !!! Used for generating checksums.
CIPHERS = ${ SHA1 } .SHA1 ${ RMD160 } .RMD160 ${ MD5 } .MD5
# This is the one you can override
PREFERRED_CIPHERS ?= ${ CIPHERS }
1996-06-03 18:47:10 -04:00
1998-11-24 20:08:35 -05:00
PORTPATH ?= /usr/bin:/bin:/usr/sbin:/sbin:${ LOCALBASE } /bin:${ X11BASE } /bin
1999-03-10 18:22:19 -05:00
# Add any COPTS to CFLAGS. Note: programs that use imake do not
# use CFLAGS! Also, many (most?) ports hard code CFLAGS, ignoring
# what we pass in.
CFLAGS += ${ COPTS }
1996-06-03 18:47:10 -04:00
MAKE_FLAGS ?= -f
MAKEFILE ?= Makefile
1998-11-24 20:08:35 -05:00
MAKE_ENV += PATH = ${ PORTPATH } PREFIX = ${ PREFIX } LOCALBASE = ${ LOCALBASE } X11BASE = ${ X11BASE } MOTIFLIB = " ${ MOTIFLIB } " CFLAGS = " ${ CFLAGS } "
1996-06-03 18:47:10 -04:00
1997-09-09 11:11:28 -04:00
. i f e x i s t s ( / u s r / b i n / f e t c h )
1996-12-25 15:10:09 -05:00
FETCH_CMD ?= /usr/bin/fetch
1997-09-09 11:11:28 -04:00
. e l s e
FETCH_CMD ?= /usr/bin/ftp
1996-12-25 15:10:09 -05:00
. e n d i f
1996-06-03 18:47:10 -04:00
1998-09-07 18:33:19 -04:00
# By default, distfiles have no restrictions placed on them
MIRROR_DISTFILE ?= yes
1996-06-03 18:47:10 -04:00
TOUCH ?= /usr/bin/touch
TOUCH_FLAGS ?= -f
PATCH ?= /usr/bin/patch
PATCH_STRIP ?= -p0
PATCH_DIST_STRIP ?= -p0
. i f d e f i n e d ( P A T C H _ D E B U G )
1996-08-23 07:37:41 -04:00
PATCH_DEBUG_TMP = yes
1996-06-03 18:47:10 -04:00
PATCH_ARGS ?= -d ${ WRKSRC } -E ${ PATCH_STRIP }
PATCH_DIST_ARGS ?= -d ${ WRKSRC } -E ${ PATCH_DIST_STRIP }
. e l s e
1996-08-23 07:37:41 -04:00
PATCH_DEBUG_TMP = no
1996-06-10 07:23:16 -04:00
PATCH_ARGS ?= -d ${ WRKSRC } --forward --quiet -E ${ PATCH_STRIP }
PATCH_DIST_ARGS ?= -d ${ WRKSRC } --forward --quiet -E ${ PATCH_DIST_STRIP }
1996-06-03 18:47:10 -04:00
. e n d i f
. i f d e f i n e d ( B A T C H )
PATCH_ARGS += --batch
PATCH_DIST_ARGS += --batch
. e n d i f
. i f d e f i n e d ( P A T C H _ C H E C K _ O N L Y )
PATCH_ARGS += -C
PATCH_DIST_ARGS += -C
. e n d i f
1996-12-25 15:10:09 -05:00
. i f e x i s t s ( / b i n / t a r )
1999-05-14 00:38:36 -04:00
TAR ?= /bin/tar
1996-12-25 15:10:09 -05:00
. e l s e
1999-05-14 00:38:36 -04:00
TAR ?= /usr/bin/tar
1996-12-25 15:10:09 -05:00
. e n d i f
1999-05-14 00:38:36 -04:00
UNZIP ?= unzip
BZIP2 ?= bzip2
. i f d e f i n e d ( U S E _ Z I P )
BUILD_DEPENDS += ${ UNZIP } :${ PORTSDIR } /archivers/unzip
EXTRACT_CMD ?= ${ UNZIP }
EXTRACT_SUFX ?= .zip
EXTRACT_BEFORE_ARGS ?= -q
EXTRACT_AFTER_ARGS ?= -d ${ WRKDIR }
. e l s e
# common tar case
# Backwards compatibility.
1996-06-03 18:47:10 -04:00
. i f d e f i n e d ( E X T R A C T _ A R G S )
1999-05-14 00:38:36 -04:00
EXTRACT_AFTER_ARGS ?= | ${ TAR } ${ EXTRACT_ARGS } -
1996-06-03 18:47:10 -04:00
. e l s e
1999-05-14 00:38:36 -04:00
EXTRACT_AFTER_ARGS ?= | ${ TAR } -xf -
. e n d i f
EXTRACT_BEFORE_ARGS ?= -dc
. i f d e f i n e d ( U S E _ B Z I P 2 )
BUILD_DEPENDS += ${ BZIP2 } :${ PORTSDIR } /archivers/bzip2
EXTRACT_CMD ?= ${ BZIP2 }
EXTRACT_SUFX ?= .tar.bz2
. e l s e
EXTRACT_CMD ?= ${ GZIP_CMD }
EXTRACT_SUFX ?= .tar.gz
. e n d i f
1996-06-03 18:47:10 -04:00
. e n d i f
# Figure out where the local mtree file is
1997-09-09 11:11:28 -04:00
. i f ! d e f i n e d ( M T R E E _ F I L E )
. i f d e f i n e d ( U S E _ I M A K E ) | | d e f i n e d ( U S E _ X 1 1 )
MTREE_FILE = /etc/mtree/BSD.x11.dist
. e l s e
MTREE_FILE = /etc/mtree/BSD.local.dist
1996-06-03 18:47:10 -04:00
. e n d i f
. e n d i f
1997-09-09 11:11:28 -04:00
MTREE_CMD ?= /usr/sbin/mtree
1998-08-24 00:46:14 -04:00
MTREE_ARGS ?= -U -f ${ MTREE_FILE } -d -e -q -p
1996-06-03 18:47:10 -04:00
1997-01-11 06:58:11 -05:00
. i n c l u d e < b s d . o w n . m k >
MAKE_ENV += EXTRA_SYS_MK_INCLUDES = "<bsd.own.mk>"
1998-09-07 18:33:19 -04:00
. i f ! d e f i n e d ( N O _ W R K D I R )
. i f d e f i n e d ( O B J M A C H I N E )
WRKDIR ?= ${ .CURDIR } /work.${ MACHINE_ARCH }
. e l s e
WRKDIR ?= ${ .CURDIR } /work
. e n d i f
. e l s e
WRKDIR ?= ${ .CURDIR }
. e n d i f
. i f d e f i n e d ( N O _ W R K S U B D I R )
WRKSRC ?= ${ WRKDIR }
. e l s e
WRKSRC ?= ${ WRKDIR } /${ DISTNAME }
. e n d i f
1999-02-28 18:23:47 -05:00
. i f d e f i n e d ( S E P A R A T E _ B U I L D )
WRKBUILD ?= ${ WRKDIR } /build-${ ARCH }
. e l s e
1999-02-03 12:53:13 -05:00
WRKBUILD ?= ${ WRKSRC }
1999-02-28 18:23:47 -05:00
. e n d i f
1999-02-03 12:53:13 -05:00
1998-09-07 18:33:19 -04:00
. i f d e f i n e d ( W R K O B J D I R )
__canonical_PORTSDIR != cd ${ PORTSDIR } ; pwd -P
__canonical_CURDIR != cd ${ .CURDIR } ; pwd -P
PORTSUBDIR = ${ __canonical_CURDIR : S , ${ __canonical_PORTSDIR } /,, }
1997-01-11 06:58:11 -05:00
. e n d i f
1996-08-23 07:37:41 -04:00
# A few aliases for *-install targets
INSTALL_PROGRAM = \
1997-04-27 17:38:33 -04:00
${ INSTALL } ${ INSTALL_COPY } ${ INSTALL_STRIP } -o ${ BINOWN } -g ${ BINGRP } -m ${ BINMODE }
1996-08-23 07:37:41 -04:00
INSTALL_SCRIPT = \
1997-04-27 17:38:33 -04:00
${ INSTALL } ${ INSTALL_COPY } -o ${ BINOWN } -g ${ BINGRP } -m ${ BINMODE }
1996-08-23 07:37:41 -04:00
INSTALL_DATA = \
1997-04-27 17:38:33 -04:00
${ INSTALL } ${ INSTALL_COPY } -o ${ SHAREOWN } -g ${ SHAREGRP } -m ${ SHAREMODE }
1996-08-23 07:37:41 -04:00
INSTALL_MAN = \
1997-04-27 17:38:33 -04:00
${ INSTALL } ${ INSTALL_COPY } -o ${ MANOWN } -g ${ MANGRP } -m ${ MANMODE }
1998-09-07 18:33:19 -04:00
INSTALL_PROGRAM_DIR = \
${ INSTALL } -d -o ${ BINOWN } -g ${ BINGRP } -m ${ BINMODE }
INSTALL_SCRIPT_DIR = \
${ INSTALL_PROGRAM_DIR }
INSTALL_DATA_DIR = \
${ INSTALL } -d -o ${ SHAREOWN } -g ${ SHAREGRP } -m ${ BINMODE }
INSTALL_MAN_DIR = \
${ INSTALL } -d -o ${ MANOWN } -g ${ MANGRP } -m ${ BINMODE }
1996-08-23 07:37:41 -04:00
1997-09-09 11:11:28 -04:00
INSTALL_MACROS = BSD_INSTALL_PROGRAM = " ${ INSTALL_PROGRAM } " \
BSD_INSTALL_SCRIPT = " ${ INSTALL_SCRIPT } " \
BSD_INSTALL_DATA = " ${ INSTALL_DATA } " \
1998-09-07 18:33:19 -04:00
BSD_INSTALL_MAN = " ${ INSTALL_MAN } " \
BSD_INSTALL_PROGRAM_DIR = " ${ INSTALL_PROGRAM_DIR } " \
BSD_INSTALL_SCRIPT_DIR = " ${ INSTALL_SCRIPT_DIR } " \
BSD_INSTALL_DATA_DIR = " ${ INSTALL_DATA_DIR } " \
BSD_INSTALL_MAN_DIR = " ${ INSTALL_MAN_DIR } "
1997-09-09 11:11:28 -04:00
MAKE_ENV += ${ INSTALL_MACROS }
SCRIPTS_ENV += ${ INSTALL_MACROS }
1996-06-03 18:47:10 -04:00
# The user can override the NO_PACKAGE by specifying this from
# the make command line
. i f d e f i n e d ( F O R C E _ P A C K A G E )
. u n d e f N O _ P A C K A G E
. e n d i f
1998-06-29 18:21:16 -04:00
# Support architecture dependent packing lists
#
1997-09-09 11:11:28 -04:00
COMMENT ?= ${ PKGDIR } /COMMENT
DESCR ?= ${ PKGDIR } /DESCR
1998-06-29 18:21:16 -04:00
. i f e x i s t s ( $ { P K G D I R } / P L I S T . $ { A R C H } )
PLIST ?= ${ PKGDIR } /PLIST.${ ARCH }
. e l s e
1999-02-17 18:45:15 -05:00
. i f d e f i n e d ( N O _ S H A R E D _ L I B S ) & & e x i s t s ( $ { P K G D I R } / P L I S T . n o s h a r e d )
PLIST ?= ${ PKGDIR } /PLIST.noshared
. e l s e
1997-09-09 11:11:28 -04:00
PLIST ?= ${ PKGDIR } /PLIST
1998-06-29 18:21:16 -04:00
. e n d i f
1999-02-17 18:52:56 -05:00
. e n d i f
1997-09-09 11:11:28 -04:00
1996-06-03 18:47:10 -04:00
PKG_CMD ?= /usr/sbin/pkg_create
1998-11-24 20:08:35 -05:00
PKG_DELETE ?= /usr/sbin/pkg_delete
1999-04-20 14:22:56 -04:00
SORT_DEPENDS ?= tsort| tail +2| tail -r
1996-06-03 18:47:10 -04:00
. i f ! d e f i n e d ( P K G _ A R G S )
1999-04-20 14:22:56 -04:00
PKG_ARGS = -v -c ${ COMMENT } -d ${ DESCR } -f ${ PLIST } -p ${ PREFIX } -P " ` ${ MAKE } package-depends| ${ SORT_DEPENDS } ` "
1996-06-03 18:47:10 -04:00
. i f e x i s t s ( $ { P K G D I R } / I N S T A L L )
PKG_ARGS += -i ${ PKGDIR } /INSTALL
. e n d i f
. i f e x i s t s ( $ { P K G D I R } / D E I N S T A L L )
PKG_ARGS += -k ${ PKGDIR } /DEINSTALL
. e n d i f
. i f e x i s t s ( $ { P K G D I R } / R E Q )
PKG_ARGS += -r ${ PKGDIR } /REQ
. e n d i f
1996-12-25 15:10:09 -05:00
. i f e x i s t s ( $ { P K G D I R } / M E S S A G E )
PKG_ARGS += -D ${ PKGDIR } /MESSAGE
. e n d i f
1997-09-09 11:11:28 -04:00
. i f ! d e f i n e d ( N O _ M T R E E )
PKG_ARGS += -m ${ MTREE_FILE }
1996-06-03 18:47:10 -04:00
. e n d i f
. e n d i f
PKG_SUFX ?= .tgz
# where pkg_add records its dirty deeds.
PKG_DBDIR ?= /var/db/pkg
# shared/dynamic motif libs
1998-11-17 02:14:16 -05:00
. i f d e f i n e d ( U S E _ M O T I F ) | | d e f i n e d ( H A V E _ M O T I F )
1996-06-03 18:47:10 -04:00
. i f d e f i n e d ( M O T I F _ S T A T I C )
MOTIFLIB ?= ${ X11BASE } /lib/libXm.a
. e l s e
MOTIFLIB ?= -L${ X11BASE } /lib -lXm
. e n d i f
. e n d i f
1996-12-25 15:10:09 -05:00
AWK ?= /usr/bin/awk
1996-06-03 18:47:10 -04:00
BASENAME ?= /usr/bin/basename
1997-09-09 11:11:28 -04:00
CAT ?= /bin/cat
CP ?= /bin/cp
1998-07-06 18:06:51 -04:00
DIRNAME ?= /usr/bin/dirname
1997-09-09 11:11:28 -04:00
ECHO ?= /bin/echo
1998-11-24 20:08:35 -05:00
EXPR ?= /bin/expr
1996-12-25 15:10:09 -05:00
FALSE ?= /usr/bin/false
1998-09-07 18:33:19 -04:00
FILE ?= /usr/bin/file
1996-06-03 18:47:10 -04:00
GREP ?= /usr/bin/grep
1997-09-09 11:11:28 -04:00
GUNZIP_CMD ?= /usr/bin/gunzip -f
1996-12-25 15:10:09 -05:00
GZCAT ?= /usr/bin/gzcat
GZIP ?= -9
GZIP_CMD ?= /usr/bin/gzip -nf ${ GZIP }
1998-02-10 03:33:16 -05:00
LDCONFIG ?= [ ! -x /sbin/ldconfig ] || /sbin/ldconfig
1997-09-21 06:58:41 -04:00
LN ?= /bin/ln
1998-11-18 23:20:09 -05:00
M4 ?= /usr/bin/m4
1997-09-09 11:11:28 -04:00
MKDIR ?= /bin/mkdir -p
MV ?= /bin/mv
1997-12-04 03:26:23 -05:00
READLINK ?= /usr/bin/readlink
1997-09-09 11:11:28 -04:00
RM ?= /bin/rm
RMDIR ?= /bin/rmdir
1996-12-25 15:10:09 -05:00
SED ?= /usr/bin/sed
1999-04-20 14:09:37 -04:00
FIND ?= /usr/bin/find
1998-11-24 20:08:35 -05:00
# XXX ${SETENV} is needed in front of var=value lists whenever the next
# command is expanded from a variable, as this could be a shell construct
1998-09-07 18:33:19 -04:00
SETENV ?= /usr/bin/env
1997-09-09 11:11:28 -04:00
SH ?= /bin/sh
TR ?= /usr/bin/tr
1998-09-07 18:33:19 -04:00
TRUE ?= /usr/bin/true
1996-06-03 18:47:10 -04:00
# Used to print all the '===>' style prompts - override this to turn them off.
ECHO_MSG ?= ${ ECHO }
1998-09-07 18:33:19 -04:00
# How to do nothing. Override if you, for some strange reason, would rather
# do something.
DO_NADA ?= ${ TRUE }
1996-06-03 18:47:10 -04:00
ALL_TARGET ?= all
INSTALL_TARGET ?= install
1998-09-07 18:33:19 -04:00
. i f d e f i n e d ( U S E _ I M A K E ) & & ! d e f i n e d ( N O _ I N S T A L L _ M A N P A G E S )
INSTALL_TARGET += install.man
. e n d i f
1996-12-25 15:10:09 -05:00
# Popular master sites
1997-09-09 11:11:28 -04:00
MASTER_SITE_XCONTRIB += \
ftp://crl.dec.com/pub/X11/contrib/%SUBDIR%/ \
1999-02-03 12:53:13 -05:00
ftp://ftp.eu.net/X11/contrib/%SUBDIR%/ \
1998-09-07 18:33:19 -04:00
ftp://ftp.uni-paderborn.de/pub/X11/contrib/%SUBDIR%/ \
ftp://ftp.x.org/contrib/%SUBDIR%/
1997-09-09 11:11:28 -04:00
MASTER_SITE_GNU += \
ftp://prep.ai.mit.edu/pub/gnu/%SUBDIR%/ \
1999-05-23 18:45:15 -04:00
ftp://wuarchive.wustl.edu/systems/gnu/%SUBDIR%/ \
ftp://ftp.kddlabs.co.jp/pub/gnu/%SUBDIR%/ \
ftp://ftp.digex.net/pub/gnu/%SUBDIR%/ \
ftp://ftp.cs.ubc.ca/mirror2/gnu/%SUBDIR%/ \
ftp://ftp.cdrom.com/pub/gnu/%SUBDIR%/ \
ftp://ftp.duke.edu/pub/gnu/%SUBDIR%/ \
ftp://ftp.gamma.ru/pub/gnu/%SUBDIR%/ \
ftp://tron.um.u-tokyo.ac.jp/pub/GNU/prep/%SUBDIR%/
1997-09-09 11:11:28 -04:00
MASTER_SITE_PERL_CPAN += \
ftp://ftp.digital.com/pub/plan/perl/CPAN/modules/by-module/%SUBDIR%/ \
ftp://ftp.cdrom.com/pub/perl/CPAN/modules/by-module/%SUBDIR%/
1999-03-14 10:19:05 -05:00
MASTER_SITE_TEX_CTAN += \
ftp://ftp.cdrom.com/pub/tex/ctan/%SUBDIR%/ \
ftp://wuarchive.wustl.edu/packages/TeX/%SUBDIR%/ \
ftp://ftp.funet.fi/pub/TeX/CTAN/%SUBDIR%/ \
ftp://ftp.tex.ac.uk/public/ctan/tex-archive/%SUBDIR%/ \
ftp://ftp.dante.de/tex-archive/%SUBDIR%/
1997-09-09 11:11:28 -04:00
MASTER_SITE_SUNSITE += \
1999-02-27 13:28:13 -05:00
ftp://metalab.unc.edu/pub/Linux/%SUBDIR%/ \
1997-09-09 11:11:28 -04:00
ftp://ftp.infomagic.com/pub/mirrors/linux/sunsite/%SUBDIR%/ \
1999-02-27 13:28:13 -05:00
ftp://ftp.funet.fi/pub/mirrors/sunsite.unc.edu/pub/Linux/%SUBDIR%/ \
ftp://ftp.lip6.fr/pub/linux/sunsite/%SUBDIR%
1996-12-25 15:10:09 -05:00
1999-03-14 10:19:05 -05:00
MASTER_SITE_KDE += \
ftp://ftp.us.kde.org/pub/kde/%SUBDIR%/ \
ftp://ftp.kde.org/pub/kde/%SUBDIR%/ \
ftp://ftp.tuniv.szczecin.pl/pub/kde/%SUBDIR%/ \
ftp://ftp.fu-berlin.de/pub/unix/X11/gui/kde/%SUBDIR%/ \
ftp://ftp.dataplus.se/pub/linux/kde/%SUBDIR%/
MASTER_SITE_GNOME += \
1999-06-12 23:50:51 -04:00
ftp://ftp.cybertrails.com/pub/gnome/%SUBDIR%/ \
1999-03-14 10:19:05 -05:00
ftp://ftp.geo.net/pub/gnome/%SUBDIR%/ \
1999-06-12 23:50:51 -04:00
ftp://ftp.net.lut.ac.uk/gnome/%SUBDIR%/ \
ftp://ftp.snoopy.net/pub/mirrors/GNOME/%SUBDIR%/ \
1999-03-14 10:19:05 -05:00
ftp://gnomeftp.wgn.net/pub/gnome/%SUBDIR%/ \
1999-06-12 23:50:51 -04:00
ftp://server.ph.ucla.edu/pub/mirror/ftp.gnome.org/%SUBDIR% \
ftp://sod.inter-mezzo.org/mirror/ftp.gnome.org/%SUBDIR% \
1999-03-14 10:19:05 -05:00
ftp://ftp.gnome.org/pub/GNOME/%SUBDIR%/
1999-05-23 18:45:15 -04:00
MASTER_SITE_AFTERSTEP += \
ftp://ftp.afterstep.org/%SUBDIR%/ \
ftp://ftp.digex.net/pub/os/wm/AfterStep/%SUBDIR%/ \
ftp://ftp.alpha1.net/pub/mirrors/ftp.afterstep.org/%SUBDIR%/ \
ftp://ftp.math.uni-bonn.de/pub/mirror/ftp.afterstep.org/%SUBDIR%/ \
ftp://ftp.bse.bg/pub/Unix/X11/wm/afterstep/%SUBDIR%/ \
ftp://ftp.dti.ad.jp/pub/X/AfterStep/%SUBDIR%/ \
ftp://ftp.lbi.ro/mirrors/ftp.afterstep.org/pub/%SUBDIR%/ \
ftp://casper.yz.yamagata-u.ac.jp/pub/X11/apps/afterstep/%SUBDIR%/
MASTER_SITE_WINDOWMAKER += \
ftp://ftp.windowmaker.org/pub/%SUBDIR%/ \
ftp://ftp.goldweb.com.au/pub/WindowMaker/%SUBDIR%/ \
ftp://ftp.io.com/pub/mirror/windowmaker/%SUBDIR%/ \
ftp://ftp.ensm-ales.fr/pub/mirrors/ftp.windowmaker.org/%SUBDIR%/ \
ftp://ftp.freenews.de/pub/windowmaker/%SUBDIR%/ \
http://jgo.local.net/cool_downloads/wm/%SUBDIR%/ \
ftp://ftp.cybertrails.com/pub/windowmaker/%SUBDIR%/ \
ftp://ftp.ameth.org/pub/mirrors/ftp.windowmaker.org/%SUBDIR%/
MASTER_SITE_TCLTK += \
ftp://ftp.scriptics.com/pub/tcl/%SUBDIR%/ \
ftp://mirror.neosoft.com/pub/tcl/mirror/ftp.scriptics.com/%SUBDIR%/ \
ftp://sunsite.utk.edu/pub/tcl/%SUBDIR%/ \
ftp://ftp.funet.fi/pub/languages/tcl/tcl/%SUBDIR%/ \
ftp://ftp.cs.tu-berlin.de/pub/tcl/distrib/%SUBDIR%/ \
ftp://ftp.srcc.msu.su/mirror/ftp.scriptics.com/pub/tcl/%SUBDIR%/ \
ftp://ftp.lip6.fr/pub/tcl/distrib/%SUBDIR%/
1997-09-09 11:11:28 -04:00
# Empty declaration to avoid "variable MASTER_SITES recursive" error
MASTER_SITES ?=
PATCH_SITES ?=
1996-12-25 15:10:09 -05:00
1997-09-09 11:11:28 -04:00
# Substitute subdirectory names
1998-12-19 11:52:22 -05:00
_MASTER_SITES := ${ MASTER_SITES : S /%SUBDIR%/ ${ MASTER_SITE_SUBDIR } / }
1997-09-09 11:11:28 -04:00
PATCH_SITES := ${ PATCH_SITES : S /%SUBDIR%/ ${ PATCH_SITE_SUBDIR } / }
1998-12-19 11:52:22 -05:00
MASTER_SITES := ${ _MASTER_SITES }
1996-12-25 15:10:09 -05:00
1998-04-04 23:20:38 -05:00
# Two backup master sites, First one at ftp.openbsd.org
#
_MASTER_SITE_OPENBSD ?= \
1998-07-07 23:27:17 -04:00
ftp://ftp.openbsd.org/pub/OpenBSD/distfiles/${ DIST_SUBDIR } / \
ftp://ftp.openbsd.org/pub/OpenBSD/licensed/${ DIST_SUBDIR } /
1998-04-04 23:20:38 -05:00
# set the backup master sites.
#
MASTER_SITE_BACKUP ?= \
1999-01-08 18:45:48 -05:00
${ _MASTER_SITE_OPENBSD } \
ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/${ DIST_SUBDIR } /
1998-04-04 23:20:38 -05:00
# If the user has this set, go to the OpenBSD repository for everything.
#
. i f d e f i n e d ( M A S T E R _ S I T E _ O P E N B S D )
MASTER_SITE_OVERRIDE = ${ _MASTER_SITE_OPENBSD }
. e n d i f
1997-09-09 11:11:28 -04:00
# Where to put distfiles that don't have any other master site
1998-04-04 23:20:38 -05:00
# ;;; This is referenced in a few Makefiles -- I'd like to get rid of it
#
1997-09-09 11:11:28 -04:00
MASTER_SITE_LOCAL ?= \
1998-09-07 18:33:19 -04:00
ftp://ftp.netbsd.org/pub/NetBSD/packages/distfiles/LOCAL_PORTS/ \
1997-09-09 11:11:28 -04:00
ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/LOCAL_PORTS/
1996-06-03 18:47:10 -04:00
# I guess we're in the master distribution business! :) As we gain mirror
# sites for distfiles, add them to this list.
. i f ! d e f i n e d ( M A S T E R _ S I T E _ O V E R R I D E )
1996-12-25 15:10:09 -05:00
MASTER_SITES += ${ MASTER_SITE_BACKUP }
PATCH_SITES += ${ MASTER_SITE_BACKUP }
1996-06-03 18:47:10 -04:00
. e l s e
MASTER_SITES := ${ MASTER_SITE_OVERRIDE } ${ MASTER_SITES }
PATCH_SITES := ${ MASTER_SITE_OVERRIDE } ${ PATCH_SITES }
. e n d i f
1998-04-06 17:46:00 -04:00
# OpenBSD code to handle ports distfiles on a CDROM. The distfiles
# are located in /cdrom/distfiles/${DIST_SUBDIR}/ (assuming that the
# CDROM is mounted on /cdrom).
#
. i f e x i s t s ( / c d r o m / d i s t f i l e s )
CDROM_SITE := /cdrom/distfiles/${ DIST_SUBDIR }
. i f d e f i n e d ( F E T C H _ S Y M L I N K _ D I S T F I L E S )
CDROM_COPY := ${ LN }
CDROM_OPT = -s
. e l s e
CDROM_COPY := ${ CP }
CDROM_OPT = -f
. e n d i f
. e n d i f
1996-06-03 18:47:10 -04:00
# Derived names so that they're easily overridable.
DISTFILES ?= ${ DISTNAME } ${ EXTRACT_SUFX }
PKGNAME ?= ${ DISTNAME }
1999-04-20 14:04:27 -04:00
. i f m a k e ( m a k e s u m ) | | m a k e ( a d d s u m ) | | d e f i n e d ( _ _ F E T C H _ A L L )
. i f d e f i n e d ( S U P D I S T F I L E S )
DISTFILES += ${ SUPDISTFILES }
. e n d i f
. i f d e f i n e d ( S U P P A T C H F I L E S )
PATCHFILES += ${ SUPPATCHFILES }
1999-04-20 14:22:56 -04:00
. e n d i f
1999-04-20 14:04:27 -04:00
. e n d i f
1996-12-25 15:10:09 -05:00
ALLFILES ?= ${ DISTFILES } ${ PATCHFILES }
. i f d e f i n e d ( I G N O R E F I L E S )
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 " ; \
1998-09-07 18:33:19 -04:00
else \
echo "" ; \
1996-12-25 15:10:09 -05:00
fi ; \
done
. e l s e
CKSUMFILES = ${ ALLFILES }
. e n d i f
# List of all files, with ${DIST_SUBDIR} in front. Used for checksum.
. i f d e f i n e d ( D I S T _ S U B D I R )
_CKSUMFILES ?= ${ CKSUMFILES : S /^/ ${ DIST_SUBDIR } \/ / }
_IGNOREFILES ?= ${ IGNOREFILES : S /^/ ${ DIST_SUBDIR } \/ / }
. e l s e
_CKSUMFILES ?= ${ CKSUMFILES }
_IGNOREFILES ?= ${ IGNOREFILES }
. e n d i f
1996-06-03 18:47:10 -04:00
# This is what is actually going to be extracted, and is overridable
# by user.
EXTRACT_ONLY ?= ${ DISTFILES }
# Documentation
1998-09-07 18:33:19 -04:00
MAINTAINER ?= ports@OpenBSD.ORG
1996-12-25 15:10:09 -05:00
. i f ! d e f i n e d ( C A T E G O R I E S )
.BEGIN :
@${ ECHO_MSG } "CATEGORIES is mandatory."
@${ FALSE }
. e n d i f
1996-06-03 18:47:10 -04:00
PKGREPOSITORYSUBDIR ?= All
PKGREPOSITORY ?= ${ PACKAGES } /${ PKGREPOSITORYSUBDIR }
. i f e x i s t s ( $ { P A C K A G E S } )
PKGFILE ?= ${ PKGREPOSITORY } /${ PKGNAME } ${ PKG_SUFX }
. e l s e
PKGFILE ?= ${ PKGNAME } ${ PKG_SUFX }
. e n d i f
1999-03-02 23:16:03 -05:00
CONFIGURE_SCRIPT ?= configure
. i f d e f i n e d ( S E P A R A T E _ B U I L D )
_CONFIGURE_SCRIPT = ${ WRKSRC } /${ CONFIGURE_SCRIPT }
. e l s e
_CONFIGURE_SCRIPT = ./${ CONFIGURE_SCRIPT }
. e n d i f
CONFIGURE_ENV += PATH = ${ PORTPATH }
1996-06-03 18:47:10 -04:00
. i f d e f i n e d ( G N U _ C O N F I G U R E )
CONFIGURE_ARGS += --prefix= ${ PREFIX }
1999-03-16 18:35:37 -05:00
CONFIGURE_ARGS += --sysconfdir= ${ SYSCONFDIR }
1996-06-03 18:47:10 -04:00
HAS_CONFIGURE = yes
. e n d i f
1999-03-01 14:44:18 -05:00
. i f d e f i n e d ( N O _ S H A R E D _ L I B S )
CONFIGURE_SHARED ?= --disable-shared
. e l s e
CONFIGURE_SHARED ?= --enable-shared
. e n d i f
1997-09-09 11:11:28 -04:00
# Passed to most of script invocations
1998-09-07 18:33:19 -04:00
SCRIPTS_ENV += CURDIR = ${ .CURDIR } DISTDIR = ${ DISTDIR } \
1998-11-24 20:08:35 -05:00
PATH = ${ PORTPATH } \
1999-02-03 12:53:13 -05:00
WRKDIR = ${ WRKDIR } WRKSRC = ${ WRKSRC } WRKBUILD = ${ WRKBUILD } \
PATCHDIR = ${ PATCHDIR } SCRIPTDIR = ${ SCRIPTDIR } FILESDIR = ${ FILESDIR } \
1997-09-09 11:11:28 -04:00
PORTSDIR = ${ PORTSDIR } DEPENDS = " ${ DEPENDS } " \
PREFIX = ${ PREFIX } LOCALBASE = ${ LOCALBASE } X11BASE = ${ X11BASE }
. i f d e f i n e d ( B A T C H )
SCRIPTS_ENV += BATCH = yes
. e n d i f
1996-12-25 15:10:09 -05:00
MANPREFIX ?= ${ PREFIX }
1998-09-07 18:33:19 -04:00
CATPREFIX ?= ${ PREFIX }
1996-12-25 15:10:09 -05:00
. f o r s e c t i n 1 2 3 4 5 6 7 8 9
MAN${sect}PREFIX ?= ${ MANPREFIX }
1998-09-07 18:33:19 -04:00
CAT${sect}PREFIX ?= ${ CATPREFIX }
1996-12-25 15:10:09 -05:00
. e n d f o r
MANLPREFIX ?= ${ MANPREFIX }
MANNPREFIX ?= ${ MANPREFIX }
1998-09-07 18:33:19 -04:00
CATLPREFIX ?= ${ CATPREFIX }
CATNPREFIX ?= ${ CATPREFIX }
1996-12-25 15:10:09 -05:00
MANLANG ?= "" # english only by default
. f o r l a n g i n $ { M A N L A N G }
. f o r s e c t i n 1 2 3 4 5 6 7 8 9
. i f d e f i n e d ( M A N $ { s e c t } )
_MANPAGES += ${ MAN ${ sect } : S %^% ${ MAN ${ sect } PREFIX } /man/ ${ lang } /man ${ sect } /% }
. e n d i f
1998-09-07 18:33:19 -04:00
. i f d e f i n e d ( C A T $ { s e c t } )
_CATPAGES += ${ CAT ${ sect } : S %^% ${ CAT ${ sect } PREFIX } /man/ ${ lang } /cat ${ sect } /% }
. e n d i f
1996-12-25 15:10:09 -05:00
. e n d f o r
. i f d e f i n e d ( M A N L )
_MANPAGES += ${ MANL : S %^% ${ MANLPREFIX } /man/ ${ lang } /manl/% }
. e n d i f
. i f d e f i n e d ( M A N N )
_MANPAGES += ${ MANN : S %^% ${ MANNPREFIX } /man/ ${ lang } /mann/% }
. e n d i f
1998-09-07 18:33:19 -04:00
. i f d e f i n e d ( C A T L )
_CATPAGES += ${ CATL : S %^% ${ CATLPREFIX } /man/ ${ lang } /catl/% }
. e n d i f
1996-12-25 15:10:09 -05:00
1998-09-07 18:33:19 -04:00
. i f d e f i n e d ( C A T N )
_CATPAGES += ${ CATN : S %^% ${ CATNPREFIX } /man/ ${ lang } /catn/% }
1996-12-25 15:10:09 -05:00
. e n d i f
1998-09-07 18:33:19 -04:00
. e n d f o r
1996-06-03 18:47:10 -04:00
.MAIN : all
################################################################
# Many ways to disable a port.
#
# If we're in BATCH mode and the port is interactive, or we're
# in interactive mode and the port is non-interactive, skip all
# the important targets. The reason we have two modes is that
# one might want to leave a build in BATCH mode running
# overnight, then come back in the morning and do _only_ the
# interactive ones that required your intervention.
#
# Don't attempt to build ports that require Motif if you don't
# have Motif.
#
# Ignore ports that can't be resold if building for a CDROM.
#
# Don't build a port if it's restricted and we don't want to get
# into that.
#
# Don't build a port if it's broken.
1998-04-04 23:20:38 -05:00
#
# Don't build a port if it comes with the base system.
1996-06-03 18:47:10 -04:00
################################################################
1997-09-09 11:11:28 -04:00
. i f ! d e f i n e d ( N O _ I G N O R E )
1996-12-25 15:10:09 -05:00
. i f ( d e f i n e d ( I S _ I N T E R A C T I V E ) & & d e f i n e d ( B A T C H ) )
IGNORE = "is an interactive port"
. e l i f ( ! d e f i n e d ( I S _ I N T E R A C T I V E ) & & d e f i n e d ( I N T E R A C T I V E ) )
IGNORE = "is not an interactive port"
. e l i f ( d e f i n e d ( R E Q U I R E S _ M O T I F ) & & ! d e f i n e d ( H A V E _ M O T I F ) )
IGNORE = "requires Motif"
1997-09-09 11:11:28 -04:00
. e l i f ( d e f i n e d ( M O T I F _ O N L Y ) & & ! d e f i n e d ( R E Q U I R E S _ M O T I F ) )
IGNORE = "does not require Motif"
1996-12-25 15:10:09 -05:00
. e l i f ( d e f i n e d ( N O _ C D R O M ) & & d e f i n e d ( F O R _ C D R O M ) )
IGNORE = " may not be placed on a CDROM: ${ NO_CDROM } "
. e l i f ( d e f i n e d ( R E S T R I C T E D ) & & d e f i n e d ( N O _ R E S T R I C T E D ) )
IGNORE = " is restricted: ${ RESTRICTED } "
1997-09-09 11:11:28 -04:00
. e l i f ( ( d e f i n e d ( U S E _ I M A K E ) | | d e f i n e d ( U S E _ X 1 1 ) ) & & ! e x i s t s ( $ { X 1 1 B A S E } ) )
IGNORE = " uses X11, but ${ X11BASE } not found "
1996-12-25 15:10:09 -05:00
. e l i f d e f i n e d ( B R O K E N )
IGNORE = " is marked as broken: ${ BROKEN } "
1998-04-28 15:19:29 -04:00
. e l i f d e f i n e d ( O N L Y _ F O R _ A R C H S )
. f o r _ _ A R C H i n $ { O N L Y _ F O R _ A R C H S }
1998-11-17 01:39:25 -05:00
. i f (${MACHINE_ARCH} = = " ${ __ARCH } " ) || ( ${ ARCH } = = " ${ __ARCH } " )
1998-04-28 15:19:29 -04:00
__ARCH_OK = 1
. e n d i f
. e n d f o r
. i f ! d e f i n e d ( _ _ A R C H _ O K )
1998-11-17 01:39:25 -05:00
. i f ${MACHINE_ARCH} = = " ${ ARCH } "
1998-09-07 18:33:19 -04:00
IGNORE = " is only for ${ ONLY_FOR_ARCHS } , not ${ MACHINE_ARCH } "
1998-11-17 01:39:25 -05:00
. e l s e
IGNORE = " is only for ${ ONLY_FOR_ARCHS } , not ${ MACHINE_ARCH } \( ${ ARCH } \) "
. e n d i f
1998-07-17 00:10:20 -04:00
. e n d i f
1998-04-04 23:20:38 -05:00
. e l i f d e f i n e d ( C O M E S _ W I T H )
1998-07-06 18:06:51 -04:00
. i f ( $ { O P S Y S _ V E R } > = $ { C O M E S _ W I T H } )
1998-08-08 02:14:58 -04:00
IGNORE = " -- ${ PKGNAME : C /-[0-9].*//g } comes with ${ OPSYS } as of release ${ COMES_WITH } "
1998-04-04 23:20:38 -05:00
. e n d i f
1996-06-03 18:47:10 -04:00
. e n d i f
. i f d e f i n e d ( I G N O R E )
1996-12-25 15:10:09 -05:00
. i f d e f i n e d ( I G N O R E _ S I L E N T )
IGNORECMD = ${ DO_NADA }
. e l s e
IGNORECMD = ${ ECHO_MSG } " ===> ${ PKGNAME } ${ IGNORE } . "
. e n d i f
fetch :
@${ IGNORECMD }
checksum :
@${ IGNORECMD }
extract :
@${ IGNORECMD }
patch :
@${ IGNORECMD }
configure :
@${ IGNORECMD }
1996-06-03 18:47:10 -04:00
all :
1996-12-25 15:10:09 -05:00
@${ IGNORECMD }
1996-06-03 18:47:10 -04:00
build :
1996-12-25 15:10:09 -05:00
@${ IGNORECMD }
1996-06-03 18:47:10 -04:00
install :
1996-12-25 15:10:09 -05:00
@${ IGNORECMD }
1998-09-07 18:33:19 -04:00
uninstall deinstall :
@${ IGNORECMD }
1996-06-03 18:47:10 -04:00
package :
1996-12-25 15:10:09 -05:00
@${ IGNORECMD }
1998-09-07 18:33:19 -04:00
. e n d i f # IGNORE
. e n d i f # !NO_IGNORE
1996-06-03 18:47:10 -04:00
. i f d e f i n e d ( A L L _ H O O K )
all :
1996-08-23 07:37:41 -04:00
@cd ${ .CURDIR } && ${ SETENV } CURDIR = ${ .CURDIR } DISTNAME = ${ DISTNAME } \
1999-02-03 12:53:13 -05:00
DISTDIR = ${ DISTDIR } WRKDIR = ${ WRKDIR } WRKSRC = ${ WRKSRC } WRKBUILD = ${ WRKBUILD } \
1996-06-03 18:47:10 -04:00
PATCHDIR = ${ PATCHDIR } SCRIPTDIR = ${ SCRIPTDIR } \
FILESDIR = ${ FILESDIR } PORTSDIR = ${ PORTSDIR } PREFIX = ${ PREFIX } \
DEPENDS = " ${ DEPENDS } " BUILD_DEPENDS = " ${ BUILD_DEPENDS } " \
RUN_DEPENDS = " ${ RUN_DEPENDS } " X11BASE = ${ X11BASE } \
${ ALL_HOOK }
. e n d i f
. i f ! t a r g e t ( a l l )
all : build
. e n d i f
1997-09-09 11:11:28 -04:00
. i f ! d e f i n e d ( D E P E N D S _ T A R G E T )
. i f m a k e ( r e i n s t a l l )
DEPENDS_TARGET = reinstall
. e l s e
DEPENDS_TARGET = install
1996-06-03 18:47:10 -04:00
. e n d i f
. e n d i f
################################################################
# The following are used to create easy dummy targets for
# disabling some bit of default target behavior you don't want.
# They still check to see if the target exists, and if so don't
# do anything, since you might want to set this globally for a
# group of ports in a Makefile.inc, but still be able to
# override from an individual Makefile.
################################################################
1996-12-25 15:10:09 -05:00
# Disable checksum
1999-03-05 11:32:49 -05:00
. i f d e f i n e d ( N O _ C H E C K S U M )
1999-04-20 14:04:27 -04:00
. f o r _ T A R G E T i n m a k e s u m a d d s u m
1999-03-05 11:32:49 -05:00
. i f ! t a r g e t ( $ { _ T A R G E T } )
1999-04-20 14:04:27 -04:00
${_TARGET} : fetch -all
1996-12-25 15:10:09 -05:00
@${ DO_NADA }
. e n d i f
1999-03-05 11:32:49 -05:00
. e n d f o r
1999-04-20 14:04:27 -04:00
. i f ! t a r g e t ( c h e c k s u m )
checksum : fetch
@${ DO_NADA }
. e n d i f
1999-03-05 11:32:49 -05:00
. e n d i f
1996-12-25 15:10:09 -05:00
1996-06-03 18:47:10 -04:00
# Disable extract
. i f d e f i n e d ( N O _ E X T R A C T ) & & ! t a r g e t ( e x t r a c t )
1999-02-17 08:00:42 -05:00
extract :
1996-06-03 18:47:10 -04:00
@${ TOUCH } ${ TOUCH_FLAGS } ${ EXTRACT_COOKIE }
1999-04-20 14:04:27 -04:00
checksum : fetch
@${ DO_NADA }
makesum addsum : fetch -all
1998-11-18 23:20:09 -05:00
@${ DO_NADA }
1996-06-03 18:47:10 -04:00
. e n d i f
1996-12-25 15:10:09 -05:00
# Disable patch
. i f d e f i n e d ( N O _ P A T C H ) & & ! t a r g e t ( p a t c h )
patch : extract
@${ TOUCH } ${ TOUCH_FLAGS } ${ PATCH_COOKIE }
. e n d i f
1996-06-03 18:47:10 -04:00
# Disable configure
. i f d e f i n e d ( N O _ C O N F I G U R E ) & & ! t a r g e t ( c o n f i g u r e )
configure : patch
@${ TOUCH } ${ TOUCH_FLAGS } ${ CONFIGURE_COOKIE }
. e n d i f
# Disable build
. i f d e f i n e d ( N O _ B U I L D ) & & ! t a r g e t ( b u i l d )
build : configure
@${ TOUCH } ${ TOUCH_FLAGS } ${ BUILD_COOKIE }
. e n d i f
1996-12-25 15:10:09 -05:00
# Disable install
. i f d e f i n e d ( N O _ I N S T A L L ) & & ! t a r g e t ( i n s t a l l )
install : build
@${ TOUCH } ${ TOUCH_FLAGS } ${ INSTALL_COOKIE }
. e n d i f
1996-06-03 18:47:10 -04:00
# Disable package
. i f d e f i n e d ( N O _ P A C K A G E ) & & ! t a r g e t ( p a c k a g e )
package :
1996-12-25 15:10:09 -05:00
. i f d e f i n e d ( I G N O R E _ S I L E N T )
1996-06-03 18:47:10 -04:00
@${ DO_NADA }
1996-12-25 15:10:09 -05:00
. e l s e
@${ ECHO_MSG } " ===> ${ PKGNAME } may not be packaged: ${ NO_PACKAGE } . "
1996-06-03 18:47:10 -04:00
. e n d i f
. e n d i f
1996-12-25 15:10:09 -05:00
# Disable describe
. i f d e f i n e d ( N O _ D E S C R I B E ) & & ! t a r g e t ( d e s c r i b e )
describe :
@${ DO_NADA }
1996-06-03 18:47:10 -04:00
. e n d i f
################################################################
# More standard targets start here.
#
# These are the body of the build/install framework. If you are
# not happy with the default actions, and you can't solve it by
# adding pre-* or post-* targets/scripts, override these.
################################################################
# Fetch
. i f ! t a r g e t ( d o - f e t c h )
do-fetch :
1996-12-25 15:10:09 -05:00
@${ MKDIR } ${ _DISTDIR }
@( cd ${ _DISTDIR } ; \
1996-06-03 18:47:10 -04:00
for file in ${ DISTFILES } ; do \
if [ ! -f $$ file -a ! -f ` ${ BASENAME } $$ file` ] ; then \
1999-06-24 13:31:16 -04:00
if [ -L $$ file -o -L ` ${ BASENAME } $$ file` ] ; then \
1996-12-25 15:10:09 -05:00
${ ECHO_MSG } " >> ${ _DISTDIR } / $$ file is a broken symlink. " ; \
1996-06-03 18:47:10 -04:00
${ ECHO_MSG } ">> Perhaps a filesystem (most likely a CD) isn't mounted?" ; \
${ ECHO_MSG } ">> Please correct this problem and try again." ; \
exit 1; \
fi ; \
1998-04-06 17:46:00 -04:00
if [ ! -z ${ CDROM_COPY } ] ; then \
if ${ CDROM_COPY } ${ CDROM_OPT } ${ CDROM_SITE } /$$ file .; then \
continue ; \
fi ; \
fi ; \
1996-06-03 18:47:10 -04:00
${ ECHO_MSG } " >> $$ file doesn't seem to exist on this system. " ; \
1998-10-05 01:13:34 -04:00
if [ ! -w ${ _DISTDIR } /. ] ; then \
${ ECHO_MSG } " >> Can't download to ${ _DISTDIR } (permission denied?). " ; \
exit 1; \
fi ; \
1996-06-03 18:47:10 -04:00
for site in ${ MASTER_SITES } ; do \
${ ECHO_MSG } " >> Attempting to fetch from $$ {site}. " ; \
1996-08-23 07:37:41 -04:00
if ${ FETCH_CMD } ${ FETCH_BEFORE_ARGS } $$ { site} $$ { file} ${ FETCH_AFTER_ARGS } ; then \
1996-06-03 18:47:10 -04:00
continue 2; \
fi \
done ; \
1996-08-23 07:37:41 -04:00
${ ECHO_MSG } ">> Couldn't fetch it - please try to retrieve this" ; \
1996-12-25 15:10:09 -05:00
${ ECHO_MSG } " >> port manually into ${ _DISTDIR } and try again. " ; \
1996-06-03 18:47:10 -04:00
exit 1; \
fi \
done )
. i f d e f i n e d ( P A T C H F I L E S )
1996-12-25 15:10:09 -05:00
@( cd ${ _DISTDIR } ; \
1996-06-03 18:47:10 -04:00
for file in ${ PATCHFILES } ; do \
if [ ! -f $$ file -a ! -f ` ${ BASENAME } $$ file` ] ; then \
1999-06-24 13:31:16 -04:00
if [ -L $$ file -o -L ` ${ BASENAME } $$ file` ] ; then \
1996-12-25 15:10:09 -05:00
${ ECHO_MSG } " >> ${ _DISTDIR } / $$ file is a broken symlink. " ; \
1996-06-03 18:47:10 -04:00
${ ECHO_MSG } ">> Perhaps a filesystem (most likely a CD) isn't mounted?" ; \
${ ECHO_MSG } ">> Please correct this problem and try again." ; \
exit 1; \
fi ; \
${ ECHO_MSG } " >> $$ file doesn't seem to exist on this system. " ; \
for site in ${ PATCH_SITES } ; do \
${ ECHO_MSG } " >> Attempting to fetch from $$ {site}. " ; \
1996-08-23 07:37:41 -04:00
if ${ FETCH_CMD } ${ FETCH_BEFORE_ARGS } $$ { site} $$ { file} ${ FETCH_AFTER_ARGS } ; then \
1996-06-03 18:47:10 -04:00
continue 2; \
fi \
done ; \
1996-08-23 07:37:41 -04:00
${ ECHO_MSG } ">> Couldn't fetch it - please try to retrieve this" ; \
1996-12-25 15:10:09 -05:00
${ ECHO_MSG } " >> port manually into ${ _DISTDIR } and try again. " ; \
1996-06-03 18:47:10 -04:00
exit 1; \
fi \
done )
. e n d i f
. e n d i f
1998-09-07 18:33:19 -04:00
# This is for the use of sites which store distfiles which others may
# fetch - only fetch the distfile if it is allowed to be
# re-distributed freely
mirror-distfiles :
. i f (${MIRROR_DISTFILE} = = "yes" )
1999-04-20 14:04:27 -04:00
@make fetch-all __ARCH_OK = yes NO_IGNORE = yes NO_WARNINGS = yes
1998-09-07 18:33:19 -04:00
. e n d i f
1999-04-02 01:55:56 -05:00
# list the distribution and patch files used by a port. Typical
# use is make ECHO_MSG=: list-distfiles | tee some-file
#
list-distfiles :
1999-04-06 15:14:41 -04:00
@echo " ${ PKGNAME } "
@for file in ${ DISTFILES } ${ PATCHFILES } ; do \
if [ " $$ file " != " ${ EXTRACT_SUFX } " ] ; then \
if [ -z " ${ DIST_SUBDIR } " ] ; then \
printf " \t $$ file\n " ; \
else \
printf " \t ${ DIST_SUBDIR } / $$ file\n " ; \
fi \
fi \
done
@echo ""
1999-03-30 02:12:05 -05:00
1999-04-02 01:55:56 -05:00
# Obj
#
1999-03-30 02:12:05 -05:00
. i f ! t a r g e t ( o b j )
obj :
. i f ! d e f i n e d ( N O _ W R K D I R )
. i f d e f i n e d ( W R K O B J D I R )
@${ RM } -rf ${ WRKOBJDIR } /${ PORTSUBDIR }
@${ MKDIR } -p ${ WRKOBJDIR } /${ PORTSUBDIR }
@if [ ! -L ${ WRKDIR } ] || \
[ X` ${ READLINK } ${ WRKDIR } ` != X${ WRKOBJDIR } /${ PORTSUBDIR } ] ; then \
echo " ${ WRKDIR } -> ${ WRKOBJDIR } / ${ PORTSUBDIR } " ; \
${ RM } -f ${ WRKDIR } ; \
${ LN } -sf ${ WRKOBJDIR } /${ PORTSUBDIR } ${ WRKDIR } ; \
fi
. e l s e
@${ ECHO_MSG } ">>"
@${ ECHO_MSG } ">> Please set the WRKOBJDIR variable before using 'make obj'"
@${ ECHO_MSG } ">>"
@exit 1;
. e n d i f
. e n d i f
. e n d i f
1996-06-03 18:47:10 -04:00
# Extract
. i f ! t a r g e t ( d o - e x t r a c t )
do-extract :
1996-08-23 07:37:41 -04:00
. i f ! d e f i n e d ( N O _ W R K D I R )
1997-09-21 06:58:41 -04:00
. i f d e f i n e d ( W R K O B J D I R )
@${ RM } -rf ${ WRKOBJDIR } /${ PORTSUBDIR }
1998-09-07 18:33:19 -04:00
@${ MKDIR } -p ${ WRKOBJDIR } /${ PORTSUBDIR }
1997-12-04 03:26:23 -05:00
@if [ ! -L ${ WRKDIR } ] || \
[ X` ${ READLINK } ${ WRKDIR } ` != X${ WRKOBJDIR } /${ PORTSUBDIR } ] ; then \
echo " ${ WRKDIR } -> ${ WRKOBJDIR } / ${ PORTSUBDIR } " ; \
${ RM } -f ${ WRKDIR } ; \
${ LN } -sf ${ WRKOBJDIR } /${ PORTSUBDIR } ${ WRKDIR } ; \
fi
1997-09-21 06:58:41 -04:00
. e l s e
1996-06-03 18:47:10 -04:00
@${ RM } -rf ${ WRKDIR }
1996-12-25 15:10:09 -05:00
@${ MKDIR } ${ WRKDIR }
1997-09-21 06:58:41 -04:00
. e n d i f
1996-08-23 07:37:41 -04:00
. e n d i f
1999-05-14 00:38:36 -04:00
@PATH= ${ PORTPATH } ; \
for file in ${ EXTRACT_ONLY } ; do \
1997-01-11 06:58:11 -05:00
if ! ( cd ${ WRKDIR } && ${ EXTRACT_CMD } ${ EXTRACT_BEFORE_ARGS } ${ _DISTDIR } /$$ file ${ EXTRACT_AFTER_ARGS } ) ; \
1996-06-03 18:47:10 -04:00
then \
exit 1; \
fi \
done
. e n d i f
# Patch
. i f ! t a r g e t ( d o - p a t c h )
do-patch :
. i f d e f i n e d ( P A T C H F I L E S )
@${ ECHO_MSG } " ===> Applying distribution patches for ${ PKGNAME } "
1999-07-28 08:56:15 -04:00
@cd ${ _DISTDIR } ; \
1996-06-03 18:47:10 -04:00
for i in ${ PATCHFILES } ; do \
1999-07-28 08:56:15 -04:00
case ${ PATCH_DEBUG_TMP } in \
yes) ${ ECHO_MSG } " ===> Applying distribution patch $$ i " ; ; \
esac ; \
1996-06-03 18:47:10 -04:00
case $$ i in \
*.Z| *.gz) \
${ GZCAT } $$ i | ${ PATCH } ${ PATCH_DIST_ARGS } ; \
; ; \
*) \
${ PATCH } ${ PATCH_DIST_ARGS } < $$ i; \
; ; \
esac ; \
1999-07-28 08:56:15 -04:00
done
1996-06-03 18:47:10 -04:00
. e n d i f
1999-08-10 15:50:37 -04:00
@if cd ${ PATCHDIR } 2>/dev/null; then \
1999-07-28 08:56:15 -04:00
error = 0; \
1998-11-24 20:08:35 -05:00
for i in ${ PATCH_LIST } ; do \
1998-11-18 23:20:09 -05:00
case $$ i in \
*.orig| *.rej| *~) \
${ ECHO_MSG } " ===> Ignoring patchfile $$ i " ; \
; ; \
*) \
if [ -e $$ i ] ; then \
1999-07-29 11:41:47 -04:00
case ${ PATCH_DEBUG_TMP } in \
yes) ${ ECHO_MSG } " ===> Applying ${ OPSYS } patch $$ i " ; ; \
esac ; \
1999-07-27 18:12:26 -04:00
${ PATCH } ${ PATCH_ARGS } < $$ i || \
{ echo " ***> $$ i did not apply cleanly " ; \
error = 1; } \
1998-11-18 23:20:09 -05:00
else \
${ ECHO_MSG } " ===> Can't find patch matching $$ i " ; \
if [ -d ${ PATCHDIR } /CVS -a " $$ i " = \
" ${ PATCHDIR } /patch-* " ] ; then \
${ ECHO_MSG } "===> Perhaps you forgot the -P flag to cvs co or update?" ; \
fi ; \
fi ; \
; ; \
esac ; \
1999-07-27 18:12:26 -04:00
done ; \
1999-07-28 08:56:15 -04:00
case $$ error in 1) exit 1; ; esac ; \
1996-06-03 18:47:10 -04:00
fi
. e n d i f
# Configure
. i f ! t a r g e t ( d o - c o n f i g u r e )
1999-02-03 12:53:13 -05:00
do-configure : ${WRKBUILD }
1996-10-22 10:01:19 -04:00
@if [ -f ${ SCRIPTDIR } /configure ] ; then \
1997-09-09 11:11:28 -04:00
cd ${ .CURDIR } && ${ SETENV } ${ SCRIPTS_ENV } ${ SH } \
${ SCRIPTDIR } /configure; \
1996-06-03 18:47:10 -04:00
fi
. i f d e f i n e d ( H A S _ C O N F I G U R E )
1999-07-28 08:56:15 -04:00
@cd ${ WRKBUILD } && CC = " ${ CC } " ac_cv_path_CC = " ${ CC } " CFLAGS = " ${ CFLAGS } " \
1998-11-05 05:36:14 -05:00
CXX = " ${ CXX } " ac_cv_path_CXX = " ${ CXX } " CXXFLAGS = " ${ CXXFLAGS } " \
1999-01-23 21:04:20 -05:00
INSTALL = " /usr/bin/install -c -o ${ BINOWN } -g ${ BINGRP } " \
INSTALL_PROGRAM = " ${ INSTALL_PROGRAM } " INSTALL_MAN = " ${ INSTALL_MAN } " \
INSTALL_SCRIPT = " ${ INSTALL_SCRIPT } " INSTALL_DATA = " ${ INSTALL_DATA } " \
1999-07-28 08:56:15 -04:00
${ CONFIGURE_ENV } ${ _CONFIGURE_SCRIPT } ${ CONFIGURE_ARGS }
1996-06-03 18:47:10 -04:00
. e n d i f
. i f d e f i n e d ( U S E _ I M A K E )
1999-07-28 08:56:15 -04:00
@cd ${ WRKSRC } && ${ SETENV } ${ MAKE_ENV } ${ XMKMF }
1996-06-03 18:47:10 -04:00
. e n d i f
. e n d i f
1999-02-03 12:53:13 -05:00
${WRKBUILD} :
${ MKDIR } ${ WRKBUILD }
1996-06-03 18:47:10 -04:00
# Build
. i f ! t a r g e t ( d o - b u i l d )
do-build :
1999-02-03 12:53:13 -05:00
@( cd ${ WRKBUILD } ; ${ SETENV } ${ MAKE_ENV } ${ MAKE_PROGRAM } ${ MAKE_FLAGS } ${ MAKEFILE } ${ ALL_TARGET } )
1996-06-03 18:47:10 -04:00
. e n d i f
# Install
. i f ! t a r g e t ( d o - i n s t a l l )
do-install :
1999-02-03 12:53:13 -05:00
@( cd ${ WRKBUILD } && ${ SETENV } ${ MAKE_ENV } ${ MAKE_PROGRAM } ${ MAKE_FLAGS } ${ MAKEFILE } ${ INSTALL_TARGET } )
1996-06-03 18:47:10 -04:00
. e n d i f
# Package
. i f ! t a r g e t ( d o - p a c k a g e )
do-package :
1997-09-09 11:11:28 -04:00
@if [ -e ${ PLIST } ] ; then \
1996-06-03 18:47:10 -04:00
${ ECHO_MSG } " ===> Building package for ${ PKGNAME } " ; \
if [ -d ${ PACKAGES } ] ; then \
if [ ! -d ${ PKGREPOSITORY } ] ; then \
1996-12-25 15:10:09 -05:00
if ! ${ MKDIR } ${ PKGREPOSITORY } ; then \
1996-06-03 18:47:10 -04:00
${ ECHO_MSG } " >> Can't create directory ${ PKGREPOSITORY } . " ; \
exit 1; \
fi ; \
fi ; \
fi ; \
if ${ PKG_CMD } ${ PKG_ARGS } ${ PKGFILE } ; then \
if [ -d ${ PACKAGES } ] ; then \
${ MAKE } ${ .MAKEFLAGS } package-links; \
fi ; \
else \
${ MAKE } ${ .MAKEFLAGS } delete-package; \
exit 1; \
fi ; \
fi
. e n d i f
# Some support rules for do-package
. i f ! t a r g e t ( p a c k a g e - l i n k s )
package-links :
@${ MAKE } ${ .MAKEFLAGS } delete-package-links
@for cat in ${ CATEGORIES } ; do \
if [ ! -d ${ PACKAGES } /$$ cat ] ; then \
1996-12-25 15:10:09 -05:00
if ! ${ MKDIR } ${ PACKAGES } /$$ cat; then \
1996-06-03 18:47:10 -04:00
${ ECHO_MSG } " >> Can't create directory ${ PACKAGES } / $$ cat. " ; \
exit 1; \
fi ; \
fi ; \
ln -s ../${ PKGREPOSITORYSUBDIR } /${ PKGNAME } ${ PKG_SUFX } ${ PACKAGES } /$$ cat; \
done ;
. e n d i f
. i f ! t a r g e t ( d e l e t e - p a c k a g e - l i n k s )
delete-package-links :
1999-04-20 14:09:37 -04:00
@${ FIND } ${ PACKAGES } -type l -name ${ PKGNAME } ${ PKG_SUFX } | xargs ${ RM } -f
1996-06-03 18:47:10 -04:00
. e n d i f
. i f ! t a r g e t ( d e l e t e - p a c k a g e )
delete-package :
@${ MAKE } ${ .MAKEFLAGS } delete-package-links
@${ RM } -f ${ PKGFILE }
. e n d i f
################################################################
# This is the "generic" port target, actually a macro used from the
# six main targets. See below for more.
################################################################
_PORT_USE : .USE
. i f m a k e ( r e a l - f e t c h )
1996-08-23 07:37:41 -04:00
@cd ${ .CURDIR } && ${ MAKE } ${ .MAKEFLAGS } fetch-depends
1996-06-03 18:47:10 -04:00
. e n d i f
. i f m a k e ( r e a l - e x t r a c t )
1996-08-23 07:37:41 -04:00
@cd ${ .CURDIR } && ${ MAKE } ${ .MAKEFLAGS } build-depends lib-depends misc-depends
1996-06-03 18:47:10 -04:00
. e n d i f
. i f m a k e ( r e a l - i n s t a l l )
1997-09-09 11:11:28 -04:00
. i f ! d e f i n e d ( N O _ P K G _ R E G I S T E R ) & & ! d e f i n e d ( F O R C E _ P K G _ R E G I S T E R )
1998-07-29 11:32:54 -04:00
@if [ -d ${ PKG_DBDIR } /${ PKGNAME } -o " X $$ (ls -d ${ PKG_DBDIR } / ${ PKGNAME : C /-[0-9].*//g } -* 2> /dev/null) " != "X" ] ; then \
1997-09-09 11:11:28 -04:00
${ ECHO_MSG } " ===> ${ PKGNAME } is already installed - perhaps an older version? " ; \
1998-09-07 18:33:19 -04:00
${ ECHO_MSG } " If so, you may wish to \`\`make deinstall'' and install" ; \
1997-09-09 11:11:28 -04:00
${ ECHO_MSG } " this port again by \`\`make reinstall'' to upgrade it properly." ; \
${ ECHO_MSG } " If you really wish to overwrite the old port of ${ PKGNAME } " ; \
${ ECHO_MSG } " without deleting it first, set the variable \"FORCE_PKG_REGISTER\"" ; \
${ ECHO_MSG } " in your environment or the \"make install\" command line." ; \
exit 1; \
fi
. e n d i f
1997-09-21 06:58:41 -04:00
@if [ ` ${ SH } -c umask ` != ${ DEF_UMASK } ] ; then \
1997-09-09 11:11:28 -04:00
${ ECHO_MSG } " ===> Warning: your umask is \"` ${ SH } -c umask` " \" .; \
${ ECHO_MSG } " If this is not desired, set it to an appropriate value" ; \
${ ECHO_MSG } " and install this port again by \`\`make reinstall''." ; \
fi
1996-12-25 15:10:09 -05:00
@cd ${ .CURDIR } && ${ MAKE } ${ .MAKEFLAGS } run-depends lib-depends
1996-06-03 18:47:10 -04:00
. e n d i f
. i f m a k e ( r e a l - i n s t a l l )
. i f ! d e f i n e d ( N O _ M T R E E )
@if [ ` id -u` = 0 ] ; then \
1997-09-09 11:11:28 -04:00
if [ ! -f ${ MTREE_FILE } ] ; then \
${ ECHO_MSG } " Error: mtree file \" ${ MTREE_FILE } \" is missing. " ; \
${ ECHO_MSG } "Copy it from a suitable location (e.g., /usr/src/etc/mtree) and try again." ; \
exit 1; \
else \
1998-09-07 18:33:19 -04:00
if [ ! -d ${ PREFIX } ] ; then \
mkdir -p ${ PREFIX } ; \
fi ; \
1997-09-09 11:11:28 -04:00
${ MTREE_CMD } ${ MTREE_ARGS } ${ PREFIX } /; \
fi ; \
1996-06-03 18:47:10 -04:00
else \
${ ECHO_MSG } "Warning: not superuser, can't run mtree." ; \
${ ECHO_MSG } "Become root and try again to ensure correct permissions." ; \
fi
. e n d i f
1999-06-24 14:39:48 -04:00
@touch ${ INSTALL_PRE_COOKIE }
1996-06-03 18:47:10 -04:00
. e n d i f
1996-08-23 07:37:41 -04:00
@cd ${ .CURDIR } && ${ MAKE } ${ .MAKEFLAGS } ${ .TARGET : S /^real-/pre-/ }
1996-06-03 18:47:10 -04:00
@if [ -f ${ SCRIPTDIR } /${ .TARGET : S /^real-/pre-/ } ] ; then \
1997-09-09 11:11:28 -04:00
cd ${ .CURDIR } && ${ SETENV } ${ SCRIPTS_ENV } ${ SH } \
${ SCRIPTDIR } /${ .TARGET : S /^real-/pre-/ } ; \
1996-06-03 18:47:10 -04:00
fi
1996-08-23 07:37:41 -04:00
@cd ${ .CURDIR } && ${ MAKE } ${ .MAKEFLAGS } ${ .TARGET : S /^real-/do-/ }
@cd ${ .CURDIR } && ${ MAKE } ${ .MAKEFLAGS } ${ .TARGET : S /^real-/post-/ }
1996-06-03 18:47:10 -04:00
@if [ -f ${ SCRIPTDIR } /${ .TARGET : S /^real-/post-/ } ] ; then \
1997-09-09 11:11:28 -04:00
cd ${ .CURDIR } && ${ SETENV } ${ SCRIPTS_ENV } ${ SH } \
${ SCRIPTDIR } /${ .TARGET : S /^real-/post-/ } ; \
1996-06-03 18:47:10 -04:00
fi
1998-09-07 18:33:19 -04:00
. i f m a k e ( r e a l - i n s t a l l ) & & ( d e f i n e d ( _ M A N P A G E S ) | | d e f i n e d ( _ C A T P A G E S ) )
1996-12-25 15:10:09 -05:00
. i f d e f i n e d ( M A N C O M P R E S S E D ) & & d e f i n e d ( N O M A N C O M P R E S S )
@${ ECHO_MSG } " ===> Uncompressing manual pages for ${ PKGNAME } "
1998-09-07 18:33:19 -04:00
. f o r m a n p a g e i n $ { _ M A N P A G E S } $ { _ C A T P A G E S }
@${ GUNZIP_CMD } ${ manpage } .gz
1996-12-25 15:10:09 -05:00
. e n d f o r
. e l i f ! d e f i n e d ( M A N C O M P R E S S E D ) & & ! d e f i n e d ( N O M A N C O M P R E S S )
@${ ECHO_MSG } " ===> Compressing manual pages for ${ PKGNAME } "
1998-09-07 18:33:19 -04:00
. f o r m a n p a g e i n $ { _ M A N P A G E S } $ { _ C A T P A G E S }
@if [ -L ${ manpage } ] ; then \
set - ` ${ FILE } ${ manpage } ` ; \
1998-11-24 20:08:35 -05:00
shift ` ${ EXPR } $$ # - 1`; \
1998-09-07 18:33:19 -04:00
${ LN } -sf $$ { 1} .gz ${ manpage } .gz; \
${ RM } ${ manpage } ; \
else \
${ GZIP_CMD } ${ manpage } ; \
fi
1996-12-25 15:10:09 -05:00
. e n d f o r
. e n d i f
. e n d i f
1999-02-18 14:22:45 -05:00
. i f m a k e ( r e a l - i n s t a l l ) & & e x i s t s ( $ { P K G D I R } / M E S S A G E )
@${ CAT } ${ PKGDIR } /MESSAGE
. e n d i f
1996-12-25 15:10:09 -05:00
. i f m a k e ( r e a l - i n s t a l l ) & & ! d e f i n e d ( N O _ P K G _ R E G I S T E R )
1996-08-23 07:37:41 -04:00
@cd ${ .CURDIR } && ${ MAKE } ${ .MAKEFLAGS } fake-pkg
1996-06-03 18:47:10 -04:00
. e n d i f
1999-02-28 18:23:47 -05:00
. i f m a k e ( r e a l - e x t r a c t )
@${ TOUCH } ${ TOUCH_FLAGS } ${ EXTRACT_COOKIE }
. e n d i f
. i f m a k e ( r e a l - p a t c h ) & & ! d e f i n e d ( P A T C H _ C H E C K _ O N L Y )
1999-06-02 11:44:50 -04:00
. i f d e f i n e d ( U S E _ A U T O C O N F )
@cd ${ AUTOCONF_DIR } && ${ SETENV } ${ AUTOCONF_ENV } ${ AUTOCONF }
. e n d i f
1999-02-28 18:23:47 -05:00
@${ TOUCH } ${ TOUCH_FLAGS } ${ PATCH_COOKIE }
. e n d i f
. i f m a k e ( r e a l - c o n f i g u r e )
@${ TOUCH } ${ TOUCH_FLAGS } ${ CONFIGURE_COOKIE }
. e n d i f
. i f m a k e ( r e a l - i n s t a l l )
@${ TOUCH } ${ TOUCH_FLAGS } ${ INSTALL_COOKIE }
. e n d i f
. i f m a k e ( r e a l - b u i l d )
@${ TOUCH } ${ TOUCH_FLAGS } ${ BUILD_COOKIE }
. e n d i f
. i f m a k e ( r e a l - p a c k a g e ) & & ! d e f i n e d ( P A C K A G E _ N O I N S T A L L )
@${ TOUCH } ${ TOUCH_FLAGS } ${ PACKAGE_COOKIE }
1996-06-03 18:47:10 -04:00
. e n d i f
################################################################
# Skeleton targets start here
#
# You shouldn't have to change these. Either add the pre-* or
# post-* targets/scripts or redefine the do-* targets. These
# targets don't do anything other than checking for cookies and
# call the necessary targets/scripts.
################################################################
. i f ! t a r g e t ( f e t c h )
fetch :
1996-08-23 07:37:41 -04:00
@cd ${ .CURDIR } && ${ MAKE } ${ .MAKEFLAGS } real-fetch
1996-06-03 18:47:10 -04:00
. e n d i f
1999-04-20 14:04:27 -04:00
. i f ! t a r g e t ( f e t c h - a l l )
fetch-all :
@cd ${ .CURDIR } && ${ MAKE } ${ .MAKEFLAGS } __FETCH_ALL = yes real-fetch
. e n d i f
1996-06-03 18:47:10 -04:00
. i f ! t a r g e t ( e x t r a c t )
1999-02-17 08:00:42 -05:00
extract : ${EXTRACT_COOKIE }
1996-06-03 18:47:10 -04:00
. e n d i f
. i f ! t a r g e t ( p a t c h )
patch : extract ${PATCH_COOKIE }
. e n d i f
. i f ! t a r g e t ( c o n f i g u r e )
configure : patch ${CONFIGURE_COOKIE }
. e n d i f
. i f ! t a r g e t ( b u i l d )
build : configure ${BUILD_COOKIE }
. e n d i f
. i f ! t a r g e t ( i n s t a l l )
install : build ${INSTALL_COOKIE }
. e n d i f
. i f ! t a r g e t ( p a c k a g e )
package : install ${PACKAGE_COOKIE }
. e n d i f
1999-02-17 08:00:42 -05:00
${EXTRACT_COOKIE} :
@cd ${ .CURDIR } && ${ MAKE } ${ .MAKEFLAGS } checksum real-extract
1996-06-03 18:47:10 -04:00
${PATCH_COOKIE} :
1996-08-23 07:37:41 -04:00
@cd ${ .CURDIR } && ${ MAKE } ${ .MAKEFLAGS } real-patch
1996-06-03 18:47:10 -04:00
${CONFIGURE_COOKIE} :
1996-08-23 07:37:41 -04:00
@cd ${ .CURDIR } && ${ MAKE } ${ .MAKEFLAGS } real-configure
1996-06-03 18:47:10 -04:00
${BUILD_COOKIE} :
1996-08-23 07:37:41 -04:00
@cd ${ .CURDIR } && ${ MAKE } ${ .MAKEFLAGS } real-build
1996-06-03 18:47:10 -04:00
${INSTALL_COOKIE} :
1996-08-23 07:37:41 -04:00
@cd ${ .CURDIR } && ${ MAKE } ${ .MAKEFLAGS } real-install
1996-06-03 18:47:10 -04:00
${PACKAGE_COOKIE} :
1996-08-23 07:37:41 -04:00
@cd ${ .CURDIR } && ${ MAKE } ${ .MAKEFLAGS } real-package
1996-06-03 18:47:10 -04:00
# And call the macros
real-fetch : _PORT_USE
real-extract : _PORT_USE
@${ ECHO_MSG } " ===> Extracting for ${ PKGNAME } "
real-patch : _PORT_USE
@${ ECHO_MSG } " ===> Patching for ${ PKGNAME } "
real-configure : _PORT_USE
@${ ECHO_MSG } " ===> Configuring for ${ PKGNAME } "
real-build : _PORT_USE
@${ ECHO_MSG } " ===> Building for ${ PKGNAME } "
real-install : _PORT_USE
@${ ECHO_MSG } " ===> Installing for ${ PKGNAME } "
real-package : _PORT_USE
# Empty pre-* and post-* targets, note we can't use .if !target()
# in the _PORT_USE macro
. f o r n a m e i n f e t c h e x t r a c t p a t c h c o n f i g u r e b u i l d i n s t a l l p a c k a g e
. i f ! t a r g e t ( p r e - $ { n a m e } )
pre-${name} :
@${ DO_NADA }
. e n d i f
. i f ! t a r g e t ( p o s t - $ { n a m e } )
post-${name} :
@${ DO_NADA }
. e n d i f
. e n d f o r
# Checkpatch
#
# Special target to verify patches
1998-11-24 20:08:35 -05:00
1996-06-03 18:47:10 -04:00
. i f ! t a r g e t ( c h e c k p a t c h )
checkpatch :
1996-08-23 07:37:41 -04:00
@cd ${ .CURDIR } && ${ MAKE } PATCH_CHECK_ONLY = yes ${ .MAKEFLAGS } patch
1996-06-03 18:47:10 -04:00
. e n d i f
# Reinstall
#
# Special target to re-run install
. i f ! t a r g e t ( r e i n s t a l l )
1997-09-09 11:11:28 -04:00
reinstall :
1998-07-06 18:06:51 -04:00
@${ RM } -f ${ INSTALL_PRE_COOKIE } ${ INSTALL_COOKIE } ${ PACKAGE_COOKIE }
1997-09-09 11:11:28 -04:00
@DEPENDS_TARGET= ${ DEPENDS_TARGET } ${ MAKE } install
1996-06-03 18:47:10 -04:00
. e n d i f
1998-09-07 18:33:19 -04:00
# Deinstall
#
# Special target to remove installation
. i f ! t a r g e t ( d e i n s t a l l )
uninstall deinstall :
@${ ECHO_MSG } " ===> Deinstalling for ${ PKGNAME } "
1998-11-24 20:08:35 -05:00
@${ PKG_DELETE } -f ${ PKGNAME }
1998-09-07 18:33:19 -04:00
@${ RM } -f ${ INSTALL_COOKIE } ${ PACKAGE_COOKIE }
. e n d i f
1996-06-03 18:47:10 -04:00
################################################################
# Some more targets supplied for users' convenience
################################################################
# Cleaning up
. i f ! t a r g e t ( p r e - c l e a n )
pre-clean :
@${ DO_NADA }
. e n d i f
. i f ! t a r g e t ( c l e a n )
clean : pre -clean
1996-12-25 15:10:09 -05:00
. i f ! d e f i n e d ( N O C L E A N D E P E N D S )
@${ MAKE } clean-depends
. e n d i f
1996-06-03 18:47:10 -04:00
@${ ECHO_MSG } " ===> Cleaning for ${ PKGNAME } "
1996-08-23 07:37:41 -04:00
. i f ! d e f i n e d ( N O _ W R K D I R )
1998-09-07 18:33:19 -04:00
. i f d e f i n e d ( W R K O B J D I R )
@${ RM } -rf ${ WRKOBJDIR } /${ PORTSUBDIR }
@${ RM } -f ${ WRKDIR }
. e l s e
1996-12-25 15:10:09 -05:00
@if [ -d ${ WRKDIR } ] ; then \
if [ -w ${ WRKDIR } ] ; then \
${ RM } -rf ${ WRKDIR } ; \
else \
${ ECHO_MSG } " ===> ${ WRKDIR } not writable, skipping " ; \
fi ; \
fi
1998-09-07 18:33:19 -04:00
. e n d i f
1996-08-23 07:37:41 -04:00
. e l s e
1999-04-10 03:48:53 -04:00
@${ RM } -f ${ WRKDIR } /.*_started ${ WRKDIR } /.*_done
1996-06-03 18:47:10 -04:00
. e n d i f
. e n d i f
1996-12-25 15:10:09 -05:00
. i f ! t a r g e t ( p r e - d i s t c l e a n )
pre-distclean :
@${ DO_NADA }
. e n d i f
. i f ! t a r g e t ( d i s t c l e a n )
distclean : pre -distclean clean
@${ ECHO_MSG } " ===> Dist cleaning for ${ PKGNAME } "
1999-08-10 15:50:37 -04:00
@if cd ${ _DISTDIR } 2>/dev/null; then \
1997-09-09 11:11:28 -04:00
${ RM } -f ${ DISTFILES } ${ PATCHFILES } ; \
1999-07-28 09:02:15 -04:00
fi
1996-12-25 15:10:09 -05:00
. i f d e f i n e d ( D I S T _ S U B D I R )
1997-09-09 11:11:28 -04:00
-@${ RMDIR } ${ _DISTDIR }
1996-12-25 15:10:09 -05:00
. e n d i f
. e n d i f
1996-06-03 18:47:10 -04:00
# Prints out a list of files to fetch (useful to do a batch fetch)
1998-09-07 18:33:19 -04:00
# are we called from bsd.port.subdir.mk (i.e. do we scan all dirs anyways)? XXX
. i f d e f ( D I R P R F X )
RECURSIVE_FETCH_LIST ?= NO
. e l s e
RECURSIVE_FETCH_LIST ?= YES
. e n d i f
1996-06-03 18:47:10 -04:00
. i f ! t a r g e t ( f e t c h - l i s t )
fetch-list :
1998-09-07 18:33:19 -04:00
@${ MAKE } fetch-list-recursive RECURSIVE_FETCH_LIST = ${ RECURSIVE_FETCH_LIST } | sort -u
. e n d i f # !target(fetch-list)
. i f ! t a r g e t ( f e t c h - l i s t - r e c u r s i v e )
fetch-list-recursive :
@${ MAKE } fetch-list-one-pkg
. i f ${RECURSIVE_FETCH_LIST} != "NO"
@for dir in ` ${ ECHO } ${ FETCH_DEPENDS } ${ BUILD_DEPENDS } ${ LIB_DEPENDS } ${ RUN_DEPENDS } | ${ TR } '\040' '\012' | ${ SED } -e 's/^[^:]*://' -e 's/:.*//' | sort -u` ` ${ ECHO } ${ DEPENDS } | ${ TR } '\040' '\012' | ${ SED } -e 's/:.*//' | sort -u` ; do \
( cd $$ dir; ${ MAKE } fetch-list-recursive; ) ; \
done
. e n d i f # ${RECURSIVE_FETCH_LIST} != "NO"
. e n d i f # !target(fetch-list-recursive)
. i f ! t a r g e t ( f e t c h - l i s t - o n e - p k g )
fetch-list-one-pkg :
1996-12-25 15:10:09 -05:00
@${ MKDIR } ${ _DISTDIR }
1998-09-07 18:33:19 -04:00
@[ -z " ${ _DISTDIR } " ] || ${ ECHO } " ${ MKDIR } ${ _DISTDIR } "
1996-12-25 15:10:09 -05:00
@( cd ${ _DISTDIR } ; \
1996-06-03 18:47:10 -04:00
for file in ${ DISTFILES } ; do \
if [ ! -f $$ file -a ! -f ` ${ BASENAME } $$ file` ] ; then \
1998-09-07 18:33:19 -04:00
${ ECHO } -n " cd ${ _DISTDIR } && [ -f $$ file -o -f ` ${ BASENAME } $$ file` ] || " ; \
for site in ${ MASTER_SITES } ; do \
${ ECHO } -n ${ FETCH_CMD } ${ FETCH_BEFORE_ARGS } $$ { site} $$ { file} " ${ FETCH_AFTER_ARGS } " '|| ' ; \
1996-06-03 18:47:10 -04:00
done ; \
${ ECHO } " echo $$ {file} not fetched " ; \
fi \
done )
. i f d e f i n e d ( P A T C H F I L E S )
1996-12-25 15:10:09 -05:00
@( cd ${ _DISTDIR } ; \
1996-06-03 18:47:10 -04:00
for file in ${ PATCHFILES } ; do \
if [ ! -f $$ file -a ! -f ` ${ BASENAME } $$ file` ] ; then \
1998-09-07 18:33:19 -04:00
${ ECHO } -n " cd ${ _DISTDIR } && [ -f $$ file -o -f ` ${ BASENAME } $$ file` ] || " ; \
1996-06-03 18:47:10 -04:00
for site in ${ PATCH_SITES } ; do \
1998-09-07 18:33:19 -04:00
${ ECHO } -n ${ FETCH_CMD } ${ FETCH_BEFORE_ARGS } $$ { site} $$ { file} " ${ FETCH_AFTER_ARGS } " '|| ' ; \
1996-06-03 18:47:10 -04:00
done ; \
${ ECHO } " echo $$ {file} not fetched " ; \
fi \
1998-09-07 18:33:19 -04:00
done )
. e n d i f # defined(PATCHFILES)
. e n d i f # !target(fetch-list-one-pkg)
1996-06-03 18:47:10 -04:00
# Checksumming utilities
. i f ! t a r g e t ( m a k e s u m )
1999-04-20 14:04:27 -04:00
makesum : fetch -all
1996-12-25 15:10:09 -05:00
@${ MKDIR } ${ FILESDIR }
1999-03-03 13:18:46 -05:00
@if [ -f ${ CHECKSUM_FILE } ] ; then ${ RM } -f ${ CHECKSUM_FILE } ; fi
1996-06-03 18:47:10 -04:00
@( cd ${ DISTDIR } ; \
1996-12-25 15:10:09 -05:00
for file in ${ _CKSUMFILES } ; do \
1999-03-03 13:18:46 -05:00
for cipher in ${ CIPHERS : R } ; do \
$$ cipher $$ file >> ${ CHECKSUM_FILE } ; \
done ; \
1996-06-03 18:47:10 -04:00
done )
1996-12-25 15:10:09 -05:00
@for file in ${ _IGNOREFILES } ; do \
1999-03-03 13:18:46 -05:00
${ ECHO } " MD5 ( $$ file) = IGNORE " >> ${ CHECKSUM_FILE } ; \
1996-12-25 15:10:09 -05:00
done
1999-04-20 14:04:27 -04:00
@sort -u -o ${ CHECKSUM_FILE } ${ CHECKSUM_FILE }
1996-06-03 18:47:10 -04:00
. e n d i f
1998-11-18 23:20:09 -05:00
. i f ! t a r g e t ( a d d s u m )
1999-04-20 14:04:27 -04:00
addsum : fetch -all
1998-11-18 23:20:09 -05:00
@${ MKDIR } ${ FILESDIR }
1999-03-03 13:18:46 -05:00
@touch ${ CHECKSUM_FILE }
1998-11-18 23:20:09 -05:00
@( cd ${ DISTDIR } ; \
for file in ${ _CKSUMFILES } ; do \
1999-03-03 13:18:46 -05:00
for cipher in ${ CIPHERS : R } ; do \
$$ cipher $$ file >> ${ CHECKSUM_FILE } ; \
done ; \
1998-11-18 23:20:09 -05:00
done )
@for file in ${ _IGNOREFILES } ; do \
1999-03-03 13:18:46 -05:00
${ ECHO } " MD5 ( $$ file) = IGNORE " >> ${ CHECKSUM_FILE } ; \
1998-11-18 23:20:09 -05:00
done
1999-04-20 14:04:27 -04:00
@sort -u -o ${ CHECKSUM_FILE } ${ CHECKSUM_FILE }
1999-03-03 13:18:46 -05:00
@if [ ` ${ SED } -e 's/\=.*$$//' ${ CHECKSUM_FILE } | uniq -d | wc -l` -ne 0 ] ; then \
${ ECHO } " Inconsistent checksum in ${ CHECKSUM_FILE } " ; \
1999-03-05 11:32:49 -05:00
${ FALSE } ; \
1998-11-18 23:20:09 -05:00
else \
1999-03-03 13:18:46 -05:00
${ ECHO } " ${ CHECKSUM_FILE } updated okay, don't forget to remove cruft " ; \
1998-11-18 23:20:09 -05:00
fi
. e n d i f
1996-06-03 18:47:10 -04:00
. i f ! t a r g e t ( c h e c k s u m )
checksum : fetch
1999-03-03 13:18:46 -05:00
@if [ ! -f ${ CHECKSUM_FILE } ] ; then \
${ ECHO_MSG } ">> No checksum file." ; \
1996-06-03 18:47:10 -04:00
else \
1996-12-25 15:10:09 -05:00
( cd ${ DISTDIR } ; OK = "true" ; \
for file in ${ _CKSUMFILES } ; do \
1999-03-03 13:18:46 -05:00
for cipher_sig in ${ PREFERRED_CIPHERS } ; do \
sig = ` ${ EXPR } $$ cipher_sig : '.*\.\(.*\)' ` ; \
CKSUM2 = ` ${ GREP } " ^ $$ sig ( $$ file) " ${ CHECKSUM_FILE } | ${ AWK } '{print $$4}' ` ; \
if [ " $$ CKSUM2 " = "" ] ; then \
${ ECHO_MSG } " >> No $$ sig checksum recorded for $$ file. " ; \
else \
cipher = ` ${ EXPR } $$ cipher_sig : '\(.*\)\.' ` ; \
break; \
fi ; \
done ; \
1996-06-03 18:47:10 -04:00
if [ " $$ CKSUM2 " = "" ] ; then \
1996-12-25 15:10:09 -05:00
${ ECHO_MSG } " >> No checksum recorded for $$ file. " ; \
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." ; \
1996-06-03 18:47:10 -04:00
OK = "false" ; \
1997-09-09 11:11:28 -04:00
else \
1999-03-03 13:18:46 -05:00
CKSUM = ` $$ cipher < $$ file` ; \
if [ " $$ CKSUM " = " $$ CKSUM2 " ] ; then \
${ ECHO_MSG } " >> Checksum OK for $$ file. ( $$ sig) " ; \
else \
${ ECHO_MSG } " >> Checksum mismatch for $$ file. ( $$ sig) " ; \
OK = "false" ; \
fi ; \
1996-06-03 18:47:10 -04:00
fi ; \
done ; \
1996-12-25 15:10:09 -05:00
for file in ${ _IGNOREFILES } ; do \
1999-03-03 13:18:46 -05:00
CKSUM2 = ` ${ GREP } " ( $$ file) " ${ CHECKSUM_FILE } | ${ AWK } '{print $$4}' ` ; \
1996-12-25 15:10:09 -05:00
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 ; \
1997-09-09 11:11:28 -04:00
if [ " $$ OK " != "true" ] ; then \
1999-03-03 13:18:46 -05:00
${ ECHO_MSG } " Make sure the Makefile and checksum file ( ${ CHECKSUM_FILE } ) " ; \
1997-09-09 11:11:28 -04:00
${ ECHO_MSG } "are up to date. If you want to override this check, type" ; \
${ ECHO_MSG } "\"make NO_CHECKSUM=yes [other args]\"." ; \
exit 1; \
1996-06-03 18:47:10 -04:00
fi ) ; \
fi
. e n d i f
1998-07-06 18:06:51 -04:00
# packing list utilities. This generates a packing list from a recently
# installed port. Not perfect, but pretty close. The generated file
# will have to have some tweaks done by hand.
1998-07-08 23:12:18 -04:00
# Note: add @comment PACKAGE(arch=${ARCH}, opsys=${OPSYS}, vers=${OPSYS_VER})
# when port is installed or package created.
1998-07-06 18:06:51 -04:00
#
. i f ! t a r g e t ( p l i s t )
plist : install
@${ MKDIR } ${ PKGDIR }
@( dirs = "" ; \
ld = "" ; \
1999-04-20 14:09:37 -04:00
for f in ` ${ FIND } ${ PREFIX } -newer ${ INSTALL_PRE_COOKIE } -print 2> /dev/null` ; do \
1998-07-06 18:06:51 -04:00
ff = ` ${ ECHO } $$ f | ${ SED } -e 's|^${PREFIX}/||' ` ; \
1999-06-24 13:31:16 -04:00
if [ -d $$ f -a ! -L $$ f ] ; then dirs = " $$ ff $$ dirs " ; \
1998-07-06 18:06:51 -04:00
else \
${ ECHO } $$ ff; \
1998-09-08 01:51:06 -04:00
if ${ ECHO } $$ f | ${ GREP } -E -q -e '[^/]+\.so\.[0-9]+\.[0-9]+$$' ; then \
1998-07-06 18:06:51 -04:00
ld = " $$ LDCONFIG ` ${ DIRNAME } $$ f` " ; \
fi ; \
fi ; \
done ; \
for f in $$ dirs; do \
if ${ GREP } -q -e ` ${ BASENAME } $$ f` ${ MTREE_FILE } ; then \
:; \
else \
${ ECHO } " @dirrm $$ f " ; \
fi ; \
done ; \
for f in $$ ld; do ${ ECHO } " @exec ${ LDCONFIG } -m $$ f " ; done ; \
) > ${ PLIST } -auto
. e n d i f
1996-06-03 18:47:10 -04:00
################################################################
# The special package-building targets
# You probably won't need to touch these
################################################################
1998-09-07 18:33:19 -04:00
1999-04-20 14:22:56 -04:00
# The README.html target needs full information (this is passed via
# depends-list and package-depends)
. i f n d e f F U L L _ P A C K A G E _ N A M E
FULL_PACKAGE_NAME = NO
. e n d i f
1998-09-07 18:33:19 -04:00
1999-07-27 20:25:38 -04:00
# Make variables to pass along on recursive depends computations
_DEPEND_THRU = FULL_PACKAGE_NAME = ${ FULL_PACKAGE_NAME }
1998-09-07 18:33:19 -04:00
1996-06-03 18:47:10 -04:00
# Nobody should want to override this unless PKGNAME is simply bogus.
. i f ! t a r g e t ( p a c k a g e - n a m e )
package-name :
1999-04-20 14:22:56 -04:00
. i f (${FULL_PACKAGE_NAME} = = "YES" )
@${ ECHO } ` ${ MAKE } package-path` /${ PKGNAME }
1998-09-07 18:33:19 -04:00
. e l s e
@${ ECHO } '${PKGNAME}'
1999-04-20 14:22:56 -04:00
. e n d i f
. e n d i f
1998-09-07 18:33:19 -04:00
. i f ! t a r g e t ( p a c k a g e - p a t h )
package-path :
@pwd | sed s@` cd ${ PORTSDIR } ; pwd ` /@@g
1996-06-03 18:47:10 -04:00
. e n d i f
1999-04-20 14:22:56 -04:00
# Build (recursively) a list of package dependencies suitable for tsort
1996-06-03 18:47:10 -04:00
. i f ! t a r g e t ( p a c k a g e - d e p e n d s )
package-depends :
1999-07-27 20:25:38 -04:00
@pname= x; \
for dir in ` ${ ECHO } ${ LIB_DEPENDS } ${ RUN_DEPENDS } | ${ TR } '\040' '\012' | ${ SED } -e 's/^[^:]*://' -e 's/:.*//' | sort -u` ` ${ ECHO } ${ DEPENDS } | ${ TR } '\040' '\012' | ${ SED } -e 's/:.*//' | sort -u` ; do \
case $$ pname in \
x) \
pname = ` ${ MAKE } ECHO = '${ECHO} -n' package-name ${ _DEPEND_THRU } ` ; ; \
esac ; \
if cd $$ dir 2>/dev/null; then \
${ ECHO } -n " $$ pname " ; \
1999-07-28 08:40:56 -04:00
${ MAKE } package-name package-depends ${ _DEPEND_THRU } || \
${ ECHO_MSG } " Error: problem in \" $$ dir\" " >& 2; \
1997-09-09 11:11:28 -04:00
else \
${ ECHO_MSG } " Warning: \" $$ dir\" non-existent -- @pkgdep registration incomplete " >& 2; \
fi ; \
1996-06-03 18:47:10 -04:00
done
. e n d i f
# Build a package but don't check the package cookie
. i f ! t a r g e t ( r e p a c k a g e )
repackage : pre -repackage package
pre-repackage :
@${ RM } -f ${ PACKAGE_COOKIE }
. e n d i f
# Build a package but don't check the cookie for installation, also don't
# install package cookie
. i f ! t a r g e t ( p a c k a g e - n o i n s t a l l )
package-noinstall :
1996-08-23 07:37:41 -04:00
@cd ${ .CURDIR } && ${ MAKE } ${ .MAKEFLAGS } PACKAGE_NOINSTALL = yes real-package
1996-06-03 18:47:10 -04:00
. e n d i f
################################################################
# Dependency checking
################################################################
. i f ! t a r g e t ( d e p e n d s )
depends : lib -depends misc -depends
1996-08-23 07:37:41 -04:00
@cd ${ .CURDIR } && ${ MAKE } ${ .MAKEFLAGS } fetch-depends
@cd ${ .CURDIR } && ${ MAKE } ${ .MAKEFLAGS } build-depends
@cd ${ .CURDIR } && ${ MAKE } ${ .MAKEFLAGS } run-depends
1996-06-03 18:47:10 -04:00
. i f m a k e ( f e t c h - d e p e n d s )
DEPENDS_TMP += ${ FETCH_DEPENDS }
. e n d i f
. i f m a k e ( b u i l d - d e p e n d s )
DEPENDS_TMP += ${ BUILD_DEPENDS }
. e n d i f
. i f m a k e ( r u n - d e p e n d s )
DEPENDS_TMP += ${ RUN_DEPENDS }
. e n d i f
_DEPENDS_USE : .USE
. i f d e f i n e d ( D E P E N D S _ T M P )
1997-09-09 11:11:28 -04:00
. i f ! d e f i n e d ( N O _ D E P E N D S )
1998-11-24 20:08:35 -05:00
@PATH= ${ PORTPATH } ; \
for i in ${ DEPENDS_TMP } ; do \
1996-06-03 18:47:10 -04:00
prog = ` ${ ECHO } $$ i | ${ SED } -e 's/:.*//' ` ; \
1997-09-09 11:11:28 -04:00
dir = ` ${ ECHO } $$ i | ${ SED } -e 's/[^:]*://' ` ; \
1998-11-24 20:08:35 -05:00
if ${ EXPR } " $$ dir " : '.*:' > /dev/null; then \
1997-09-09 11:11:28 -04:00
target = ` ${ ECHO } $$ dir | ${ SED } -e 's/.*://' ` ; \
dir = ` ${ ECHO } $$ dir | ${ SED } -e 's/:.*//' ` ; \
1996-06-03 18:47:10 -04:00
else \
1997-09-09 11:11:28 -04:00
target = ${ DEPENDS_TARGET } ; \
1996-06-03 18:47:10 -04:00
fi ; \
1998-09-07 18:33:19 -04:00
found = not; \
1998-11-24 20:08:35 -05:00
if ${ EXPR } " $$ prog " : \\ / >/dev/null; then \
1996-06-03 18:47:10 -04:00
if [ -e " $$ prog " ] ; then \
${ ECHO_MSG } " ===> ${ PKGNAME } depends on file: $$ prog - found " ; \
1998-09-07 18:33:19 -04:00
found = "" ; \
1996-06-03 18:47:10 -04:00
else \
${ ECHO_MSG } " ===> ${ PKGNAME } depends on file: $$ prog - not found " ; \
fi ; \
else \
1998-09-07 18:33:19 -04:00
for d in ` echo $$ PATH | tr ':' ' ' ` ; do \
if [ -x $$ d/$$ prog ] ; then \
found = " $$ d/ $$ prog " ; \
break; \
fi \
done ; \
${ ECHO_MSG } " ===> ${ PKGNAME } depends on executable: $$ prog - $$ found found " ; \
1996-06-03 18:47:10 -04:00
fi ; \
1998-09-07 18:33:19 -04:00
if [ X" $$ found " = Xnot ] ; then \
1997-09-09 11:11:28 -04:00
${ ECHO_MSG } " ===> Verifying $$ target for $$ prog in $$ dir " ; \
1996-06-03 18:47:10 -04:00
if [ ! -d " $$ dir " ] ; then \
${ ECHO_MSG } " >> No directory for $$ prog. Skipping.. " ; \
else \
1997-09-09 11:11:28 -04:00
( cd $$ dir; ${ MAKE } ${ .MAKEFLAGS } $$ target) ; \
1996-06-03 18:47:10 -04:00
${ ECHO_MSG } " ===> Returning to build of ${ PKGNAME } " ; \
fi ; \
fi ; \
done
. e n d i f
. e l s e
@${ DO_NADA }
. e n d i f
fetch-depends : _DEPENDS_USE
build-depends : _DEPENDS_USE
run-depends : _DEPENDS_USE
lib-depends :
. i f d e f i n e d ( L I B _ D E P E N D S )
1997-09-09 11:11:28 -04:00
. i f ! d e f i n e d ( N O _ D E P E N D S )
1999-02-17 19:01:47 -05:00
. i f d e f i n e d ( N O _ S H A R E D _ L I B S )
1997-12-02 16:58:12 -05:00
@for i in ${ LIB_DEPENDS } ; do \
1999-04-06 15:14:41 -04:00
lib = ` ${ ECHO } $$ i | ${ SED } -e 's/:.*//' -e 's|\([^\\]\)[\\\.].*|\1|' ` ; \
1997-12-02 16:58:12 -05:00
dir = ` ${ ECHO } $$ i | ${ SED } -e 's/[^:]*://' ` ; \
1998-11-24 20:08:35 -05:00
if ${ EXPR } " $$ dir " : '.*:' > /dev/null; then \
1997-12-02 16:58:12 -05:00
target = ` ${ ECHO } $$ dir | ${ SED } -e 's/.*://' ` ; \
dir = ` ${ ECHO } $$ dir | ${ SED } -e 's/:.*//' ` ; \
else \
target = ${ DEPENDS_TARGET } ; \
fi ; \
1997-12-02 18:36:46 -05:00
tmp = ` mktemp /tmp/bpmXXXXXXXXXX` ; \
1998-08-21 02:57:19 -04:00
if ${ LD } -r -o $$ tmp -L${ LOCALBASE } /lib -L${ X11BASE } /lib -l$$ lib; then \
1997-12-02 16:58:12 -05:00
${ ECHO_MSG } " ===> ${ PKGNAME } depends on library: $$ lib - found " ; \
else \
${ ECHO_MSG } " ===> ${ PKGNAME } depends on library: $$ lib - not found " ; \
${ ECHO_MSG } " ===> Verifying $$ target for $$ lib in $$ dir " ; \
if [ ! -d " $$ dir " ] ; then \
${ ECHO_MSG } " >> No directory for $$ lib. Skipping.. " ; \
else \
( cd $$ dir; ${ MAKE } ${ .MAKEFLAGS } $$ target) ; \
${ ECHO_MSG } " ===> Returning to build of ${ PKGNAME } " ; \
fi ; \
fi ; \
1997-12-02 18:36:46 -05:00
${ RM } -f $$ tmp; \
1997-12-02 16:58:12 -05:00
done
. e l s e
1996-06-03 18:47:10 -04:00
@for i in ${ LIB_DEPENDS } ; do \
1998-09-07 18:33:19 -04:00
lib = ` ${ ECHO } $$ i | ${ SED } -e 's/:.*//' -e 's|\([^\\]\)\.|\1\\\\.|g' ` ; \
1997-09-09 11:11:28 -04:00
dir = ` ${ ECHO } $$ i | ${ SED } -e 's/[^:]*://' ` ; \
1998-11-24 20:08:35 -05:00
if ${ EXPR } " $$ dir " : '.*:' > /dev/null; then \
1997-09-09 11:11:28 -04:00
target = ` ${ ECHO } $$ dir | ${ SED } -e 's/.*://' ` ; \
dir = ` ${ ECHO } $$ dir | ${ SED } -e 's/:.*//' ` ; \
else \
target = ${ DEPENDS_TARGET } ; \
fi ; \
1998-09-07 18:33:19 -04:00
libname = ` ${ ECHO } $$ lib | ${ SED } -e 's|\\\\||g' ` ; \
reallib = ` ${ LDCONFIG } -r | ${ GREP } -e " -l $$ lib " | awk '{ print $$3 }' ` ; \
if [ " X $$ reallib " = X"" ] ; then \
${ ECHO_MSG } " ===> ${ PKGNAME } depends on shared library: $$ libname - not found " ; \
${ ECHO_MSG } " ===> Verifying $$ target for $$ libname in $$ dir " ; \
1996-06-03 18:47:10 -04:00
if [ ! -d " $$ dir " ] ; then \
1998-09-07 18:33:19 -04:00
${ ECHO_MSG } " >> No directory for $$ libname. Skipping.. " ; \
1996-06-03 18:47:10 -04:00
else \
1997-09-09 11:11:28 -04:00
( cd $$ dir; ${ MAKE } ${ .MAKEFLAGS } $$ target) ; \
1996-06-03 18:47:10 -04:00
${ ECHO_MSG } " ===> Returning to build of ${ PKGNAME } " ; \
fi ; \
1998-09-07 18:33:19 -04:00
else \
${ ECHO_MSG } " ===> ${ PKGNAME } depends on shared library: $$ libname - $$ reallib found " ; \
1996-06-03 18:47:10 -04:00
fi ; \
done
. e n d i f
1997-12-02 16:58:12 -05:00
. e n d i f
1996-06-03 18:47:10 -04:00
. e l s e
@${ DO_NADA }
. e n d i f
misc-depends :
. i f d e f i n e d ( D E P E N D S )
. i f ! d e f i n e d ( N O _ D E P E N D S )
1997-09-09 11:11:28 -04:00
@for dir in ${ DEPENDS } ; do \
1998-11-24 20:08:35 -05:00
if ${ EXPR } " $$ dir " : '.*:' > /dev/null; then \
1997-09-09 11:11:28 -04:00
target = ` ${ ECHO } $$ dir | ${ SED } -e 's/.*://' ` ; \
dir = ` ${ ECHO } $$ dir | ${ SED } -e 's/:.*//' ` ; \
else \
target = ${ DEPENDS_TARGET } ; \
fi ; \
${ ECHO_MSG } " ===> ${ PKGNAME } depends on: $$ dir " ; \
${ ECHO_MSG } " ===> Verifying $$ target for $$ dir " ; \
if [ ! -d $$ dir ] ; then \
${ ECHO_MSG } " >> No directory for $$ dir. Skipping.. " ; \
1996-06-03 18:47:10 -04:00
else \
1997-09-09 11:11:28 -04:00
( cd $$ dir; ${ MAKE } ${ .MAKEFLAGS } $$ target) ; \
1996-06-03 18:47:10 -04:00
fi \
done
@${ ECHO_MSG } " ===> Returning to build of ${ PKGNAME } "
. e n d i f
. e l s e
@${ DO_NADA }
. e n d i f
. e n d i f
1996-12-25 15:10:09 -05:00
. i f ! t a r g e t ( c l e a n - d e p e n d s )
clean-depends :
. i f d e f i n e d ( F E T C H _ D E P E N D S ) | | d e f i n e d ( B U I L D _ D E P E N D S ) | | d e f i n e d ( L I B _ D E P E N D S ) \
1999-07-28 09:02:15 -04:00
|| defined( RUN_DEPENDS) || defined( DEPENDS)
@for dir in \
` ${ ECHO } ${ FETCH_DEPENDS } ${ BUILD_DEPENDS } ${ LIB_DEPENDS } ${ RUN_DEPENDS } | ${ TR } '\040' '\012' | ${ SED } -e 's/^[^:]*://' -e 's/:.*//' | sort -u` \
` ${ ECHO } ${ DEPENDS } | ${ TR } '\040' '\012' | ${ SED } -e 's/:.*//' | sort -u` ; do \
1999-08-10 15:50:37 -04:00
if cd $$ dir 2>/dev/null ; then \
1999-07-28 09:02:15 -04:00
${ MAKE } NOCLEANDEPENDS = yes clean clean-depends; \
1997-09-09 11:11:28 -04:00
fi \
1996-12-25 15:10:09 -05:00
done
. e n d i f
. e n d i f
1996-06-03 18:47:10 -04:00
. i f ! t a r g e t ( d e p e n d s - l i s t )
depends-list :
1999-07-27 20:25:38 -04:00
@pname= x; \
for dir in ` ${ ECHO } ${ FETCH_DEPENDS } ${ BUILD_DEPENDS } ${ LIB_DEPENDS } | ${ TR } '\040' '\012' | ${ SED } -e 's/^[^:]*://' -e 's/:.*//' | sort -u` ` ${ ECHO } ${ DEPENDS } | ${ TR } '\040' '\012' | ${ SED } -e 's/:.*//' | sort -u` ; do \
case $$ pname in \
x) \
pname = ` ${ MAKE } ECHO = '${ECHO} -n' package-name ${ _DEPEND_THRU } ` ; ; \
esac ; \
if cd $$ dir 2>/dev/null; then \
${ ECHO } -n " $$ pname " ; \
1999-07-28 08:40:56 -04:00
${ MAKE } package-name depends-list ${ _DEPEND_THRU } || \
${ ECHO_MSG } " Error: problem in \" $$ dir\" " >& 2; \
1999-04-20 14:22:56 -04:00
else \
${ ECHO_MSG } " Warning: \" $$ dir\" non-existent " >& 2; \
fi ; \
1999-07-27 20:25:38 -04:00
done
1996-06-03 18:47:10 -04:00
. e n d i f
################################################################
# Everything after here are internal targets and really
# shouldn't be touched by anybody but the release engineers.
################################################################
# This target generates an index entry suitable for aggregation into
# a large index. Format is:
#
# distribution-name|port-path|installation-prefix|comment| \
1998-09-07 18:33:19 -04:00
# description-file|maintainer|categories|build deps|run deps|for arch
1996-06-03 18:47:10 -04:00
#
. i f ! t a r g e t ( d e s c r i b e )
describe :
1997-09-09 11:11:28 -04:00
@${ ECHO } -n " ${ PKGNAME } | ${ .CURDIR } | " ; \
${ ECHO } -n " ${ PREFIX } | " ; \
if [ -f ${ COMMENT } ] ; then \
${ ECHO } -n " ` ${ CAT } ${ COMMENT } ` " ; \
1996-06-03 18:47:10 -04:00
else \
${ ECHO } -n "** No Description" ; \
1997-09-09 11:11:28 -04:00
fi ; \
if [ -f ${ DESCR } ] ; then \
${ ECHO } -n " | ${ DESCR } " ; \
1996-06-03 18:47:10 -04:00
else \
${ ECHO } -n "|/dev/null" ; \
1997-09-09 11:11:28 -04:00
fi ; \
${ ECHO } -n " | ${ MAINTAINER } | ${ CATEGORIES } | " ; \
case " A ${ FETCH_DEPENDS } B ${ BUILD_DEPENDS } C ${ LIB_DEPENDS } D ${ DEPENDS } E " in \
ABCDE) ; ; \
1999-04-20 14:22:56 -04:00
*) cd ${ .CURDIR } && ${ ECHO } -n ` make depends-list| ${ SORT_DEPENDS } ` ; ; \
1997-09-09 11:11:28 -04:00
esac ; \
${ ECHO } -n "|" ; \
case " A ${ RUN_DEPENDS } B ${ LIB_DEPENDS } C ${ DEPENDS } D " in \
ABCD) ; ; \
1999-04-20 14:22:56 -04:00
*) cd ${ .CURDIR } && ${ ECHO } -n ` make package-depends| ${ SORT_DEPENDS } ` ; ; \
1997-09-09 11:11:28 -04:00
esac ; \
1998-09-07 18:33:19 -04:00
${ ECHO } -n "|" ; \
if [ " ${ ONLY_FOR_ARCHS } " = "" ] ; then \
${ ECHO } -n "any" ; \
else \
${ ECHO } -n " ${ ONLY_FOR_ARCHS } " ; \
fi ; \
1997-09-09 11:11:28 -04:00
${ ECHO } ""
1996-06-03 18:47:10 -04:00
. e n d i f
1999-04-20 14:22:56 -04:00
README_NAME ?= ${ TEMPLATES } /README.port
1996-06-03 18:47:10 -04:00
. i f ! t a r g e t ( r e a d m e s )
readmes : readme
. e n d i f
. i f ! t a r g e t ( r e a d m e )
readme :
@rm -f README.html
1999-04-20 14:22:56 -04:00
@cd ${ .CURDIR } && make README_NAME = ${ README_NAME } README.html
1996-06-03 18:47:10 -04:00
. e n d i f
1999-04-20 14:22:56 -04:00
HTMLIFY = ${ SED } -e 's/&/\&/g' -e 's/>/\>/g' -e 's/</\</g'
. i f m a k e ( R E A D M E . h t m l ) | | m a k e ( r e a d m e ) | | m a k e ( r e a d m e s )
PKGDEPTH != ${ MAKE } package-path| ${ SED } -e 's|[^./][^/]*|..|g'
. e n d i f
1998-09-07 18:33:19 -04:00
1996-06-03 18:47:10 -04:00
README.html :
@${ ECHO_MSG } " ===> Creating README.html for ${ PKGNAME } "
1999-04-20 14:22:56 -04:00
@${ ECHO } ${ PKGNAME } | ${ HTMLIFY } > $@ .tmp3
@${ MAKE } depends-list FULL_PACKAGE_NAME = YES | ${ SORT_DEPENDS } >$@ .tmp1
@${ MAKE } package-depends FULL_PACKAGE_NAME = YES | ${ SORT_DEPENDS } >$@ .tmp2
. f o r I i n 1 2
@if [ -s $@ .tmp$I ] ; then \
( ${ CAT } $@ .tmp$I | while read n; do \
j = ` dirname $$ n| ${ HTMLIFY } ` ; k = ` basename $$ n| ${ HTMLIFY } ` ; \
echo " <A HREF=\" ${ PKGDEPTH } / $$ j/README.html\"> $$ k</A> " ; \
done ; ) >$@ .tmp$Ia ; \
else \
echo "(none)" > $@ .tmp$Ia ; \
fi
. e n d f o r
1998-09-07 18:33:19 -04:00
@${ CAT } ${ README_NAME } | \
${ SED } -e 's|%%PORT%%|' " ` ${ MAKE } package-path | ${ HTMLIFY } ` " '|g' \
-e '/%%PKG%%/r$@.tmp3' \
-e '/%%PKG%%/d' \
1996-06-03 18:47:10 -04:00
-e '/%%COMMENT%%/r${PKGDIR}/COMMENT' \
-e '/%%COMMENT%%/d' \
1999-07-28 08:40:56 -04:00
-e '/%%DESCR%%/r${PKGDIR}/DESCR' \
-e '/%%DESCR%%/d' \
1999-04-20 14:22:56 -04:00
-e '/%%BUILD_DEPENDS%%/r$@.tmp1a' \
1998-09-07 18:33:19 -04:00
-e '/%%BUILD_DEPENDS%%/d' \
1999-04-20 14:22:56 -04:00
-e '/%%RUN_DEPENDS%%/r$@.tmp2a' \
1998-09-07 18:33:19 -04:00
-e '/%%RUN_DEPENDS%%/d' \
1996-06-03 18:47:10 -04:00
>> $@
1999-04-20 14:22:56 -04:00
@rm -f $@ .tmp*
1996-06-03 18:47:10 -04:00
. i f ! t a r g e t ( p r i n t - d e p e n d s - l i s t )
print-depends-list :
. i f d e f i n e d ( F E T C H _ D E P E N D S ) | | d e f i n e d ( B U I L D _ D E P E N D S ) | | \
defined( LIB_DEPENDS) || defined( DEPENDS)
@${ ECHO } -n 'This port requires package(s) "'
1999-07-27 20:25:38 -04:00
@${ ECHO } -n ` make ${ _DEPEND_THRU } depends-list | ${ SORT_DEPENDS } `
1996-06-03 18:47:10 -04:00
@${ ECHO } '" to build.'
. e n d i f
. e n d i f
. i f ! t a r g e t ( p r i n t - p a c k a g e - d e p e n d s )
print-package-depends :
. i f d e f i n e d ( R U N _ D E P E N D S ) | | d e f i n e d ( L I B _ D E P E N D S ) | | d e f i n e d ( D E P E N D S )
@${ ECHO } -n 'This port requires package(s) "'
1999-07-27 20:25:38 -04:00
@${ ECHO } -n ` make ${ _DEPEND_THRU } package-depends | ${ SORT_DEPENDS } `
1996-06-03 18:47:10 -04:00
@${ ECHO } '" to run.'
. e n d i f
. e n d i f
1999-04-20 14:22:56 -04:00
. i f ! t a r g e t ( p r i n t - d e p e n d s )
print-depends :
@${ MAKE } FULL_PACKAGE_NAME = YES print-depends-list print-package-depends
. e n d i f
1996-06-03 18:47:10 -04:00
# Fake installation of package so that user can pkg_delete it later.
# Also, make sure that an installed port is recognized correctly in
# accordance to the @pkgdep directive in the packing lists
. i f ! t a r g e t ( f a k e - p k g )
fake-pkg :
1997-09-09 11:11:28 -04:00
@if [ ! -f ${ PLIST } -o ! -f ${ COMMENT } -o ! -f ${ DESCR } ] ; then ${ ECHO } " ** Missing package files for ${ PKGNAME } - installation not recorded. " ; exit 1; fi
1999-02-20 19:01:30 -05:00
@if [ ` /bin/ls -l ${ COMMENT } | ${ AWK } '{print $$5}' ` -gt 60 ] ; then \
${ ECHO } " ** ${ COMMENT } too large - installation not recorded. " ; \
exit 1; \
fi
1996-12-25 15:10:09 -05:00
@if [ ! -d ${ PKG_DBDIR } ] ; then ${ RM } -f ${ PKG_DBDIR } ; ${ MKDIR } ${ PKG_DBDIR } ; fi
1996-06-03 18:47:10 -04:00
. i f d e f i n e d ( F O R C E _ P K G _ R E G I S T E R )
@${ RM } -rf ${ PKG_DBDIR } /${ PKGNAME }
. e n d i f
@if [ ! -d ${ PKG_DBDIR } /${ PKGNAME } ] ; then \
${ ECHO_MSG } " ===> Registering installation for ${ PKGNAME } " ; \
1996-12-25 15:10:09 -05:00
${ MKDIR } ${ PKG_DBDIR } /${ PKGNAME } ; \
1996-06-03 18:47:10 -04:00
${ PKG_CMD } ${ PKG_ARGS } -O ${ PKGFILE } > ${ PKG_DBDIR } /${ PKGNAME } /+CONTENTS; \
1997-09-09 11:11:28 -04:00
${ CP } ${ DESCR } ${ PKG_DBDIR } /${ PKGNAME } /+DESC; \
${ CP } ${ COMMENT } ${ PKG_DBDIR } /${ PKGNAME } /+COMMENT; \
1996-06-03 18:47:10 -04:00
if [ -f ${ PKGDIR } /INSTALL ] ; then \
${ CP } ${ PKGDIR } /INSTALL ${ PKG_DBDIR } /${ PKGNAME } /+INSTALL; \
fi ; \
if [ -f ${ PKGDIR } /DEINSTALL ] ; then \
${ CP } ${ PKGDIR } /DEINSTALL ${ PKG_DBDIR } /${ PKGNAME } /+DEINSTALL; \
fi ; \
if [ -f ${ PKGDIR } /REQ ] ; then \
${ CP } ${ PKGDIR } /REQ ${ PKG_DBDIR } /${ PKGNAME } /+REQ; \
fi ; \
1998-09-07 18:33:19 -04:00
if [ -f ${ PKGDIR } /MESSAGE ] ; then \
${ CP } ${ PKGDIR } /MESSAGE ${ PKG_DBDIR } /${ PKGNAME } /+DISPLAY; \
fi ; \
1999-04-20 14:22:56 -04:00
for dep in ` make package-depends ECHO_MSG = ${ TRUE } | ${ SORT_DEPENDS } ` ; do \
1997-09-09 11:11:28 -04:00
if [ -d ${ PKG_DBDIR } /$$ dep ] ; then \
if ! ${ GREP } ^${ PKGNAME } $$ ${ PKG_DBDIR } /$$ dep/+REQUIRED_BY \
>/dev/null 2>& 1; then \
${ ECHO } ${ PKGNAME } >> ${ PKG_DBDIR } /$$ dep/+REQUIRED_BY; \
fi ; \
fi ; \
done ; \
1996-06-03 18:47:10 -04:00
fi
. e n d i f
# Depend is generally meaningless for arbitrary ports, but if someone wants
# one they can override this. This is just to catch people who've gotten into
# the habit of typing `make depend all install' as a matter of course.
#
. i f ! t a r g e t ( d e p e n d )
depend :
. e n d i f
# Same goes for tags
. i f ! t a r g e t ( t a g s )
tags :
. e n d i f
1997-01-11 06:58:11 -05:00
1999-02-24 07:34:46 -05:00
.PHONY : \
addsum all build build-depends checkpatch \
checksum clean clean-depends configure deinstall \
delete-package delete-package-links depend depends depends-list \
describe distclean do -build do -configure do -extract \
1999-04-02 01:55:56 -05:00
do -fetch do -install do -package do -patch extract list-distfiles \
1999-02-24 07:34:46 -05:00
fake-pkg fetch fetch-depends fetch-list fetch-list-one-pkg \
fetch-list-recursive install lib-depends makesum mirror-distfiles \
misc-depends package package-depends package-links package-name \
package-noinstall package-path patch plist post-build \
post-configure post-extract post-fetch post-install post-package \
post-patch pre-build pre-clean pre-configure pre-distclean \
pre-extract pre-fetch pre-install pre-package pre-patch \
pre-repackage print-depends-list print-package-depends readme \
readmes real-extract real-fetch real-install reinstall \
1999-04-20 14:22:56 -04:00
repackage run-depends tags uninstall fetch-all print-depends