mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-24 00:45:52 +00:00
(1) There is no default "orphans" for CATEGORIES, it simply fails if
you have a Makefile without one. (2) Fix case when user had DISTDIR defined elsewhere and DIST_SUBDIR is also defined. (Submitted by: max) (3) Add several popular master sites as variables. For instance, MASTER_SITE_XCONTRIB is defined to be a list of X11R6 contrib sites, which you can set MASTER_SITES to in your Makefile if you just want ftp.x.org or any of the mirror sites. There is also a new variable, MASTER_SITE_SUBDIR, to specify which subdirectory of the master site your tarball is located. One nice thing this enables the user to do is to define the nearest mirror site in /etc/make.conf. This is especially useful for continents without a full FreeBSD master site. Eventually, we will probably split this into a separate file (bsd.port.sites.mk?), and add some more sites from all corners of the world. Right now, XCONTRIB, GNU, PERL_CPAN, TEX_CTAN, and SUNSITE are supported. (4) COMPRESS_MAN command alias is replaced by MAN[1-9LN] variables. You just say "MAN1=foo.1 bar.1" and the make rules will automatically compress it for you if necessary. (Idea by: obrien) (5) New "distclean" target to delete distfile too. (Submitted by: obrien) (6) Chained dependency cleaning, can be turned off by NOCLEANDEPENDS. Reviewed by: the ports list
This commit is contained in:
parent
2b1fce2079
commit
e6a02faa0f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=4436
129
Mk/bsd.port.mk
129
Mk/bsd.port.mk
@ -6,7 +6,7 @@
|
||||
# bsd.port.mk - 940820 Jordan K. Hubbard.
|
||||
# This file is in the public domain.
|
||||
#
|
||||
# $Id: bsd.port.mk,v 1.227 1996/11/01 07:22:35 asami Exp $
|
||||
# $Id: bsd.port.mk,v 1.228 1996/11/03 07:51:59 obrien Exp $
|
||||
#
|
||||
# Please view me with 4 column tabs!
|
||||
|
||||
@ -47,8 +47,7 @@
|
||||
# XMKMF - Set to path of `xmkmf' if not in $PATH (default: xmkmf -a ).
|
||||
# MAINTAINER - The e-mail address of the contact person for this port
|
||||
# (default: ports@FreeBSD.ORG).
|
||||
# CATEGORIES - A list of descriptive categories into which this port falls
|
||||
# (default: orphans).
|
||||
# CATEGORIES - A list of descriptive categories into which this port falls.
|
||||
#
|
||||
# Variables that typically apply to an individual port. Non-Boolean
|
||||
# variables without defaults are *mandatory*.
|
||||
@ -190,18 +189,23 @@
|
||||
# PATCH_DEBUG - If set, print out more information about the patches as
|
||||
# it attempts to apply them.
|
||||
#
|
||||
# Variables that serve as convenient "aliases" for your *-install targets:
|
||||
#
|
||||
# Variables that serve as convenient "aliases" for your *-install targets.
|
||||
# Use these like: "${INSTALL_PROGRAM} ${WRKSRC}/prog ${PREFIX}/bin".
|
||||
#
|
||||
# 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).
|
||||
#
|
||||
# And another for compressing manpages -- it is conditionalized on the
|
||||
# variable NOMANCOMPRESS so you can just list the manpage filenames
|
||||
# after this.
|
||||
# COMPRESS_MAN - A command to compress manpages (if necessary).
|
||||
# If your port doesn't automatically compress manpages, set the following.
|
||||
# Depending on the setting of NOMANCOMPRESS, the make rules will compress
|
||||
# the manpages for you.
|
||||
#
|
||||
# MAN<sect> - A list of manpages, categorized by section. For
|
||||
# example, if your port has "man/man1/foo.1" and
|
||||
# "man/mann/bar.n", set "MAN1=foo.1" and "MANN=bar.n".
|
||||
# The available sections chars are "123456789LN".
|
||||
# MANPREFIX - The directory prefix for ${MAN<sect>} (default: ${PREFIX}).
|
||||
#
|
||||
# Default targets and their behaviors:
|
||||
#
|
||||
@ -370,11 +374,6 @@ INSTALL_DATA= \
|
||||
${INSTALL} ${COPY} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE}
|
||||
INSTALL_MAN= \
|
||||
${INSTALL} ${COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE}
|
||||
.if defined(NOMANCOMPRESS)
|
||||
COMPRESS_MAN= @${DO_NADA}
|
||||
.else
|
||||
COMPRESS_MAN= gzip -9nf
|
||||
.endif
|
||||
|
||||
# The user can override the NO_PACKAGE by specifying this from
|
||||
# the make command line
|
||||
@ -417,11 +416,15 @@ CP?= /bin/cp
|
||||
SETENV?= /usr/bin/env
|
||||
RM?= /bin/rm
|
||||
MKDIR?= /bin/mkdir -p
|
||||
GZCAT?= /usr/bin/gzcat
|
||||
BASENAME?= /usr/bin/basename
|
||||
SED?= /usr/bin/sed
|
||||
GREP?= /usr/bin/grep
|
||||
RMDIR?= /bin/rmdir
|
||||
AWK?= /usr/bin/awk
|
||||
BASENAME?= /usr/bin/basename
|
||||
FALSE?= /usr/bin/false
|
||||
GREP?= /usr/bin/grep
|
||||
GZCAT?= /usr/bin/gzcat
|
||||
GZIP?= -9
|
||||
GZIP_CMD?= /usr/bin/gzip -nf ${GZIP}
|
||||
SED?= /usr/bin/sed
|
||||
|
||||
# Used to print all the '===>' style prompts - override this to turn them off.
|
||||
ECHO_MSG?= ${ECHO}
|
||||
@ -434,6 +437,30 @@ INSTALL_TARGET?= install
|
||||
MASTER_SITE_OVERRIDE= ftp://ftp.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/
|
||||
.endif
|
||||
|
||||
# Popular master sites
|
||||
MASTER_SITE_XCONTRIB?= \
|
||||
ftp://ftp.x.org/contrib/${MASTER_SITE_SUBDIR}/ \
|
||||
ftp://crl.dec.com/pub/X11/contrib/${MASTER_SITE_SUBDIR}/
|
||||
|
||||
MASTER_SITE_GNU?= \
|
||||
ftp://prep.ai.mit.edu/pub/gnu/${MASTER_SITE_SUBDIR}/ \
|
||||
ftp://wuarchive.wustl.edu/systems/gnu/${MASTER_SITE_SUBDIR}/
|
||||
|
||||
MASTER_SITE_PERL_CPAN?= \
|
||||
ftp://ftp.digital.com/pub/plan/perl/CPAN/modules/by-module/${MASTER_SITE_SUBDIR}/ \
|
||||
ftp://ftp.cdrom.com/pub/perl/CPAN/modules/by-module/${MASTER_SITE_SUBDIR}/
|
||||
|
||||
MASTER_SITE_TEX_CTAN?= \
|
||||
ftp://ftp.cdrom.com/pub/tex/ctan/${MASTER_SITE_SUBDIR}/ \
|
||||
ftp://wuarchive.wustl.edu/packages/TeX/${MASTER_SITE_SUBDIR}/ \
|
||||
ftp://ftp.funet.fi/pub/TeX/CTAN/${MASTER_SITE_SUBDIR}/ \
|
||||
ftp.tex.ac.uk/public/ctan/tex-archive/${MASTER_SITE_SUBDIR}/
|
||||
|
||||
MASTER_SITE_SUNSITE?= \
|
||||
ftp://sunsite.unc.edu/pub/Linux/${MASTER_SITE_SUBDIR}/ \
|
||||
ftp://ftp.infomagic.com/pub/mirrors/linux/sunsite/${MASTER_SITE_SUBDIR}/ \
|
||||
ftp://ftp://ftp.funet.fi/pub/mirrors/sunsite.unc.edu/pub/Linux/${MASTER_SITE_SUBDIR}/
|
||||
|
||||
# Empty declaration to avoid "variable MASTER_SITES recursive" error
|
||||
MASTER_SITES?=
|
||||
PATCH_SITES?=
|
||||
@ -467,7 +494,12 @@ EXTRACT_ONLY?= ${DISTFILES}
|
||||
|
||||
# Documentation
|
||||
MAINTAINER?= ports@FreeBSD.ORG
|
||||
CATEGORIES?= orphans
|
||||
|
||||
.if !defined(CATEGORIES)
|
||||
.BEGIN:
|
||||
@${ECHO_MSG} "CATEGORIES is mandatory."
|
||||
@${FALSE}
|
||||
.endif
|
||||
|
||||
# Note this has to start with a capital letter (or more accurately, it
|
||||
# shouldn't match "[a-z]*"), see the target "delete-package-links" below.
|
||||
@ -486,6 +518,22 @@ CONFIGURE_ARGS+= --prefix=${PREFIX}
|
||||
HAS_CONFIGURE= yes
|
||||
.endif
|
||||
|
||||
MANPREFIX?= ${PREFIX}
|
||||
|
||||
.for sect in 1 2 3 4 5 6 7 8 9
|
||||
.if defined(MAN${sect})
|
||||
_MANPAGES+= ${MAN${sect}:S.^.man/${MANLANG}/man${sect}/.}
|
||||
.endif
|
||||
.endfor
|
||||
|
||||
.if defined(MANL)
|
||||
_MANPAGES+= ${MANL:S.^.man/${MANLANG}/manl/.}
|
||||
.endif
|
||||
|
||||
.if defined(MANN)
|
||||
_MANPAGES+= ${MANN:S.^.man/${MANLANG}/mann/.}
|
||||
.endif
|
||||
|
||||
.MAIN: all
|
||||
|
||||
################################################################
|
||||
@ -889,7 +937,12 @@ _PORT_USE: .USE
|
||||
X11BASE=${X11BASE} \
|
||||
/bin/sh ${SCRIPTDIR}/${.TARGET:S/^real-/post-/}; \
|
||||
fi
|
||||
.if make(real-install) && !defined(NO_PKG_REGISTER)
|
||||
.if make(real-install) && defined(_MANPAGES) && !defined(NOMANCOMPRESS)
|
||||
.for manpage in ${_MANPAGES}
|
||||
${GZIP_CMD} ${MANPREFIX}/${manpage}
|
||||
.endfor
|
||||
.endif
|
||||
.if make(real-install) && !defined(NO_PKG_REGISTER)
|
||||
@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} fake-pkg
|
||||
.endif
|
||||
.if !make(real-fetch) \
|
||||
@ -1015,6 +1068,9 @@ pre-clean:
|
||||
|
||||
.if !target(clean)
|
||||
clean: pre-clean
|
||||
.if !defined(NOCLEANDEPENDS)
|
||||
@${MAKE} clean-depends
|
||||
.endif
|
||||
@${ECHO_MSG} "===> Cleaning for ${PKGNAME}"
|
||||
.if !defined(NO_WRKDIR)
|
||||
@${RM} -rf ${WRKDIR}
|
||||
@ -1023,6 +1079,21 @@ clean: pre-clean
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if !target(pre-distclean)
|
||||
pre-distclean:
|
||||
@${DO_NADA}
|
||||
.endif
|
||||
|
||||
.if !target(distclean)
|
||||
distclean: pre-distclean clean
|
||||
@${ECHO_MSG} "===> Dist cleaning for ${PKGNAME}"
|
||||
@(cd ${DISTDIR}; \
|
||||
${RM} -f ${DISTFILES} ${PATCHFILES})
|
||||
.if defined(DIST_SUBDIR)
|
||||
@${RMDIR} ${DISTDIR}
|
||||
.endif
|
||||
.endif
|
||||
|
||||
# Prints out a list of files to fetch (useful to do a batch fetch)
|
||||
|
||||
.if !target(fetch-list)
|
||||
@ -1254,11 +1325,25 @@ misc-depends:
|
||||
|
||||
.endif
|
||||
|
||||
.if !target(clean-depends)
|
||||
clean-depends:
|
||||
@for i in ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS}; do \
|
||||
dir=`${ECHO} $$i | ${SED} -e 's/.*://'`; \
|
||||
(cd $$dir; ${MAKE} clean); \
|
||||
done
|
||||
@for dir in ${DEPENDS}; do \
|
||||
(cd $$dir; ${MAKE} clean); \
|
||||
done
|
||||
.endif
|
||||
|
||||
.if !target(depends-list)
|
||||
depends-list:
|
||||
@for i in ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS} ${DEPENDS}; do \
|
||||
@for i in ${FETCH_DEPENDS} ${BUILD_DEPENDS} ${LIB_DEPENDS}; do \
|
||||
dir=`${ECHO} $$i | ${SED} -e 's/.*://'`; \
|
||||
(cd $$dir ; ${MAKE} package-name depends-list); \
|
||||
(cd $$dir; ${MAKE} package-name depends-list); \
|
||||
done
|
||||
@for dir in ${DEPENDS}; do \
|
||||
(cd $$dir; ${MAKE} package-name depends-list); \
|
||||
done
|
||||
.endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user