version 1.51, 1998/11/19 22:15:31 |
version 1.52, 1998/11/25 01:08:35 |
|
|
# MASTER_SITE_OVERRIDE. |
# MASTER_SITE_OVERRIDE. |
# PACKAGES - A top level directory where all packages go (rather than |
# PACKAGES - A top level directory where all packages go (rather than |
# going locally to each port). (default: ${PORTSDIR}/packages). |
# going locally to each port). (default: ${PORTSDIR}/packages). |
# GMAKE - Set to path of GNU make if not in $PATH (default: gmake). |
# GMAKE - Set to path of GNU make if not in $PORTPATH (default: gmake). |
# XMKMF - Set to path of `xmkmf' if not in $PATH (default: xmkmf -a ). |
# XMKMF - Set to path of `xmkmf' if not in $PORTPATH |
|
# (default: xmkmf -a ). |
# MAINTAINER - The e-mail address of the contact person for this port |
# MAINTAINER - The e-mail address of the contact person for this port |
# Defaults: ports@OpenBSD.ORG (OpenBSD) |
# Defaults: ports@OpenBSD.ORG (OpenBSD) |
# ports@FreeBSD.ORG (FreeBSD) |
# ports@FreeBSD.ORG (FreeBSD) |
|
|
# BROKEN - Port is broken. Set this string to the reason why. |
# BROKEN - Port is broken. Set this string to the reason why. |
# RESTRICTED - Port is restricted. Set this string to the reason why. |
# RESTRICTED - Port is restricted. Set this string to the reason why. |
# USE_GMAKE - Says that the port uses gmake. |
# USE_GMAKE - Says that the port uses gmake. |
|
# |
|
# XXX: cygnus products do NOT use autoconf for making its main |
|
# configure from configure.in |
|
# USE_AUTOCONF - Says that the port uses autoconf (implies GNU_CONFIGURE). |
|
# AUTOCONF_DIR - Where to apply autoconf (default: ${WRKSRC}). |
# USE_PERL5 - Says that the port uses perl5 for building and running. |
# USE_PERL5 - Says that the port uses perl5 for building and running. |
# USE_IMAKE - Says that the port uses imake. |
# USE_IMAKE - Says that the port uses imake. |
# USE_X11 - Says that the port uses X11 (i.e., installs in ${X11BASE}). |
# USE_X11 - Says that the port uses X11 (i.e., installs in ${X11BASE}). |
|
|
# name of a file if it starts with a slash (/), an |
# name of a file if it starts with a slash (/), an |
# executable otherwise. make will test for the |
# executable otherwise. make will test for the |
# existence (if it is a full pathname) or search for |
# existence (if it is a full pathname) or search for |
# it in your $PATH (if it is an executable) and go |
# it in $PORTPATH (if it is an executable) and go |
# into "dir" to do a "make all install" if it's not |
# into "dir" to do a "make all install" if it's not |
# found. |
# found. |
# BUILD_DEPENDS - A list of "path:dir" pairs of other ports this |
# BUILD_DEPENDS - A list of "path:dir" pairs of other ports this |
|
|
# Arguments to ${EXTRACT_CMD} following filename |
# Arguments to ${EXTRACT_CMD} following filename |
# (default: none). |
# (default: none). |
# |
# |
# FETCH_CMD - Full path to ftp/http fetch command if not in $PATH |
# FETCH_CMD - Full path to ftp/http fetch command if not in $PORTPATH |
# (default: /usr/bin/ftp). |
# (default: /usr/bin/ftp). |
# FETCH_BEFORE_ARGS - |
# FETCH_BEFORE_ARGS - |
# Arguments to ${FETCH_CMD} before filename (default: none). |
# Arguments to ${FETCH_CMD} before filename (default: none). |
|
|
# use in INDEX files and the like. |
# use in INDEX files and the like. |
# checkpatch - Do a "patch -C" instead of a "patch". Note that it may |
# checkpatch - Do a "patch -C" instead of a "patch". Note that it may |
# give incorrect results if multiple patches deal with |
# give incorrect results if multiple patches deal with |
# the same file. NOT AVAILABLE WITH OPENBSD! |
# the same file. |
# checksum - Use files/md5 to ensure that your distfiles are valid. |
# checksum - Use files/md5 to ensure that your distfiles are valid. |
# makesum - Generate files/md5 (only do this for your own ports!). |
# makesum - Generate files/md5 (only do this for your own ports!). |
# addsum - update files/md5 in a non-destructive way (own ports only!) |
# addsum - update files/md5 in a non-destructive way (own ports only!) |
|
|
.else |
.else |
MAKE_PROGRAM= ${MAKE} |
MAKE_PROGRAM= ${MAKE} |
.endif |
.endif |
|
.if defined(USE_AUTOCONF) |
|
GNU_CONFIGURE= yes |
|
BUILD_DEPENDS+= ${AUTOCONF}:${PORTSDIR}/devel/autoconf |
|
AUTOCONF_DIR?=${WRKSRC} |
|
# missing ?= not an oversight |
|
AUTOCONF_ENV=PATH=${PORTPATH} |
|
.endif |
.if defined(USE_EGCC) |
.if defined(USE_EGCC) |
BUILD_DEPENDS+= ${EGCC}:${PORTSDIR}/devel/egcs-stable |
BUILD_DEPENDS+= ${EGCC}:${PORTSDIR}/devel/egcs-stable |
CC=${EGCC} |
CC=${EGCC} |
|
|
|
|
# Miscellaneous overridable commands: |
# Miscellaneous overridable commands: |
GMAKE?= gmake |
GMAKE?= gmake |
|
AUTOCONF?= autoconf |
EGCC?= egcc |
EGCC?= egcc |
EGXX?= eg++ |
EGXX?= eg++ |
XMKMF?= xmkmf -a |
XMKMF?= xmkmf -a |
|
|
|
# be paranoid about which md5 we trust |
.if exists(/sbin/md5) |
.if exists(/sbin/md5) |
MD5?= /sbin/md5 |
MD5?= /sbin/md5 |
.elif exists(/bin/md5) |
.elif exists(/bin/md5) |
|
|
.endif |
.endif |
MD5_FILE?= ${FILESDIR}/md5 |
MD5_FILE?= ${FILESDIR}/md5 |
|
|
|
PORTPATH?= /usr/bin:/bin:/usr/sbin:/sbin:${LOCALBASE}/bin:${X11BASE}/bin |
|
|
MAKE_FLAGS?= -f |
MAKE_FLAGS?= -f |
MAKEFILE?= Makefile |
MAKEFILE?= Makefile |
MAKE_ENV+= PATH=${PATH}:${LOCALBASE}/bin:${X11BASE}/bin PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} MOTIFLIB="${MOTIFLIB}" CFLAGS="${CFLAGS}" |
MAKE_ENV+= PATH=${PORTPATH} PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} MOTIFLIB="${MOTIFLIB}" CFLAGS="${CFLAGS}" |
|
|
.if exists(/usr/bin/fetch) |
.if exists(/usr/bin/fetch) |
FETCH_CMD?= /usr/bin/fetch |
FETCH_CMD?= /usr/bin/fetch |
|
|
PATCH_DIST_ARGS+= --batch |
PATCH_DIST_ARGS+= --batch |
.endif |
.endif |
|
|
# OpenBSD patch does not support the -C option/checkpatch target |
|
# |
|
.if (${OPSYS} != "OpenBSD") |
|
.if defined(PATCH_CHECK_ONLY) |
.if defined(PATCH_CHECK_ONLY) |
PATCH_ARGS+= -C |
PATCH_ARGS+= -C |
PATCH_DIST_ARGS+= -C |
PATCH_DIST_ARGS+= -C |
.endif |
.endif |
.endif |
|
|
|
.if exists(/bin/tar) |
.if exists(/bin/tar) |
EXTRACT_CMD?= /bin/tar |
EXTRACT_CMD?= /bin/tar |
|
|
.endif |
.endif |
|
|
PKG_CMD?= /usr/sbin/pkg_create |
PKG_CMD?= /usr/sbin/pkg_create |
|
PKG_DELETE?= /usr/sbin/pkg_delete |
.if !defined(PKG_ARGS) |
.if !defined(PKG_ARGS) |
PKG_ARGS= -v -c ${COMMENT} -d ${DESCR} -f ${PLIST} -p ${PREFIX} -P "`${MAKE} package-depends|sort -u`" |
PKG_ARGS= -v -c ${COMMENT} -d ${DESCR} -f ${PLIST} -p ${PREFIX} -P "`${MAKE} package-depends|sort -u`" |
.if exists(${PKGDIR}/INSTALL) |
.if exists(${PKGDIR}/INSTALL) |
|
|
CP?= /bin/cp |
CP?= /bin/cp |
DIRNAME?= /usr/bin/dirname |
DIRNAME?= /usr/bin/dirname |
ECHO?= /bin/echo |
ECHO?= /bin/echo |
|
EXPR?= /bin/expr |
FALSE?= /usr/bin/false |
FALSE?= /usr/bin/false |
FILE?= /usr/bin/file |
FILE?= /usr/bin/file |
GREP?= /usr/bin/grep |
GREP?= /usr/bin/grep |
|
|
RM?= /bin/rm |
RM?= /bin/rm |
RMDIR?= /bin/rmdir |
RMDIR?= /bin/rmdir |
SED?= /usr/bin/sed |
SED?= /usr/bin/sed |
|
|
|
# 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 |
SETENV?= /usr/bin/env |
SETENV?= /usr/bin/env |
SH?= /bin/sh |
SH?= /bin/sh |
TR?= /usr/bin/tr |
TR?= /usr/bin/tr |
|
|
PATCH_SITES:= ${MASTER_SITE_OVERRIDE} ${PATCH_SITES} |
PATCH_SITES:= ${MASTER_SITE_OVERRIDE} ${PATCH_SITES} |
.endif |
.endif |
|
|
# The following is a FreeBSD construct that dopes not work in OpenBSD. |
# The following is a FreeBSD construct that does not work in OpenBSD. |
# Since OpenBSD does not put packages in /cdrom/ports/packages it |
# Since OpenBSD does not put packages in /cdrom/ports/packages it |
# is safe to leave (but I may remove it in the future). |
# is safe to leave (but I may remove it in the future). |
# |
# |
|
|
.endif |
.endif |
|
|
CONFIGURE_SCRIPT?= configure |
CONFIGURE_SCRIPT?= configure |
CONFIGURE_ENV+= PATH=${PATH}:${LOCALBASE}/bin:${X11BASE}/bin |
CONFIGURE_ENV+= PATH=${PORTPATH} |
|
|
.if defined(GNU_CONFIGURE) |
.if defined(GNU_CONFIGURE) |
CONFIGURE_ARGS+= --prefix=${PREFIX} |
CONFIGURE_ARGS+= --prefix=${PREFIX} |
|
|
|
|
# Passed to most of script invocations |
# Passed to most of script invocations |
SCRIPTS_ENV+= CURDIR=${.CURDIR} DISTDIR=${DISTDIR} \ |
SCRIPTS_ENV+= CURDIR=${.CURDIR} DISTDIR=${DISTDIR} \ |
PATH=${PATH}:${LOCALBASE}/bin:${X11BASE}/bin \ |
PATH=${PORTPATH} \ |
WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} \ |
WRKDIR=${WRKDIR} WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} \ |
SCRIPTDIR=${SCRIPTDIR} FILESDIR=${FILESDIR} \ |
SCRIPTDIR=${SCRIPTDIR} FILESDIR=${FILESDIR} \ |
PORTSDIR=${PORTSDIR} DEPENDS="${DEPENDS}" \ |
PORTSDIR=${PORTSDIR} DEPENDS="${DEPENDS}" \ |
|
|
done) |
done) |
.endif |
.endif |
@if [ -d ${PATCHDIR} ]; then \ |
@if [ -d ${PATCHDIR} ]; then \ |
for i in ${PATCHDIR}/${PATCH_LIST}; do \ |
(cd ${PATCHDIR}; \ |
|
for i in ${PATCH_LIST}; do \ |
case $$i in \ |
case $$i in \ |
*.orig|*.rej|*~) \ |
*.orig|*.rej|*~) \ |
${ECHO_MSG} "===> Ignoring patchfile $$i" ; \ |
${ECHO_MSG} "===> Ignoring patchfile $$i" ; \ |
|
|
fi; \ |
fi; \ |
;; \ |
;; \ |
esac; \ |
esac; \ |
done; \ |
done) \ |
fi |
fi |
.endif |
.endif |
|
|
|
|
|
|
.if !target(do-configure) |
.if !target(do-configure) |
do-configure: |
do-configure: |
|
.if defined(USE_AUTOCONF) |
|
@cd ${AUTOCONF_DIR} && ${SETENV} ${AUTOCONF_ENV} ${AUTOCONF} |
|
.endif |
@if [ -f ${SCRIPTDIR}/configure ]; then \ |
@if [ -f ${SCRIPTDIR}/configure ]; then \ |
cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \ |
cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \ |
${SCRIPTDIR}/configure; \ |
${SCRIPTDIR}/configure; \ |
|
|
.for manpage in ${_MANPAGES} ${_CATPAGES} |
.for manpage in ${_MANPAGES} ${_CATPAGES} |
@if [ -L ${manpage} ]; then \ |
@if [ -L ${manpage} ]; then \ |
set - `${FILE} ${manpage}`; \ |
set - `${FILE} ${manpage}`; \ |
shift `expr $$# - 1`; \ |
shift `${EXPR} $$# - 1`; \ |
${LN} -sf $${1}.gz ${manpage}.gz; \ |
${LN} -sf $${1}.gz ${manpage}.gz; \ |
${RM} ${manpage}; \ |
${RM} ${manpage}; \ |
else \ |
else \ |
|
|
# Checkpatch |
# Checkpatch |
# |
# |
# Special target to verify patches |
# Special target to verify patches |
# OpenBSD patch does not support the -C option; thus this target disabled |
|
# |
|
.if (${OPSYS} != "OpenBSD") |
|
.if !target(checkpatch) |
.if !target(checkpatch) |
checkpatch: |
checkpatch: |
@cd ${.CURDIR} && ${MAKE} PATCH_CHECK_ONLY=yes ${.MAKEFLAGS} patch |
@cd ${.CURDIR} && ${MAKE} PATCH_CHECK_ONLY=yes ${.MAKEFLAGS} patch |
.endif |
.endif |
.endif |
|
|
|
# Reinstall |
# Reinstall |
# |
# |
|
|
.if !target(deinstall) |
.if !target(deinstall) |
uninstall deinstall: |
uninstall deinstall: |
@${ECHO_MSG} "===> Deinstalling for ${PKGNAME}" |
@${ECHO_MSG} "===> Deinstalling for ${PKGNAME}" |
@pkg_delete -f ${PKGNAME} |
@${PKG_DELETE} -f ${PKGNAME} |
@${RM} -f ${INSTALL_COOKIE} ${PACKAGE_COOKIE} |
@${RM} -f ${INSTALL_COOKIE} ${PACKAGE_COOKIE} |
.endif |
.endif |
|
|
|
|
_DEPENDS_USE: .USE |
_DEPENDS_USE: .USE |
.if defined(DEPENDS_TMP) |
.if defined(DEPENDS_TMP) |
.if !defined(NO_DEPENDS) |
.if !defined(NO_DEPENDS) |
@for i in ${DEPENDS_TMP}; do \ |
@PATH=${PORTPATH}; \ |
|
for i in ${DEPENDS_TMP}; do \ |
prog=`${ECHO} $$i | ${SED} -e 's/:.*//'`; \ |
prog=`${ECHO} $$i | ${SED} -e 's/:.*//'`; \ |
dir=`${ECHO} $$i | ${SED} -e 's/[^:]*://'`; \ |
dir=`${ECHO} $$i | ${SED} -e 's/[^:]*://'`; \ |
if expr "$$dir" : '.*:' > /dev/null; then \ |
if ${EXPR} "$$dir" : '.*:' > /dev/null; then \ |
target=`${ECHO} $$dir | ${SED} -e 's/.*://'`; \ |
target=`${ECHO} $$dir | ${SED} -e 's/.*://'`; \ |
dir=`${ECHO} $$dir | ${SED} -e 's/:.*//'`; \ |
dir=`${ECHO} $$dir | ${SED} -e 's/:.*//'`; \ |
else \ |
else \ |
target=${DEPENDS_TARGET}; \ |
target=${DEPENDS_TARGET}; \ |
fi; \ |
fi; \ |
found=not; \ |
found=not; \ |
if expr "$$prog" : \\/ >/dev/null; then \ |
if ${EXPR} "$$prog" : \\/ >/dev/null; then \ |
if [ -e "$$prog" ]; then \ |
if [ -e "$$prog" ]; then \ |
${ECHO_MSG} "===> ${PKGNAME} depends on file: $$prog - found"; \ |
${ECHO_MSG} "===> ${PKGNAME} depends on file: $$prog - found"; \ |
found=""; \ |
found=""; \ |
|
|
@for i in ${LIB_DEPENDS}; do \ |
@for i in ${LIB_DEPENDS}; do \ |
lib=`${ECHO} $$i | ${SED} -e 's/:.*//' -e 's|\([^\\]\)\.|\1\\\\.|g'`; \ |
lib=`${ECHO} $$i | ${SED} -e 's/:.*//' -e 's|\([^\\]\)\.|\1\\\\.|g'`; \ |
dir=`${ECHO} $$i | ${SED} -e 's/[^:]*://'`; \ |
dir=`${ECHO} $$i | ${SED} -e 's/[^:]*://'`; \ |
if expr "$$dir" : '.*:' > /dev/null; then \ |
if ${EXPR} "$$dir" : '.*:' > /dev/null; then \ |
target=`${ECHO} $$dir | ${SED} -e 's/.*://'`; \ |
target=`${ECHO} $$dir | ${SED} -e 's/.*://'`; \ |
dir=`${ECHO} $$dir | ${SED} -e 's/:.*//'`; \ |
dir=`${ECHO} $$dir | ${SED} -e 's/:.*//'`; \ |
else \ |
else \ |
|
|
@for i in ${LIB_DEPENDS}; do \ |
@for i in ${LIB_DEPENDS}; do \ |
lib=`${ECHO} $$i | ${SED} -e 's/:.*//' -e 's|\([^\\]\)\.|\1\\\\.|g'`; \ |
lib=`${ECHO} $$i | ${SED} -e 's/:.*//' -e 's|\([^\\]\)\.|\1\\\\.|g'`; \ |
dir=`${ECHO} $$i | ${SED} -e 's/[^:]*://'`; \ |
dir=`${ECHO} $$i | ${SED} -e 's/[^:]*://'`; \ |
if expr "$$dir" : '.*:' > /dev/null; then \ |
if ${EXPR} "$$dir" : '.*:' > /dev/null; then \ |
target=`${ECHO} $$dir | ${SED} -e 's/.*://'`; \ |
target=`${ECHO} $$dir | ${SED} -e 's/.*://'`; \ |
dir=`${ECHO} $$dir | ${SED} -e 's/:.*//'`; \ |
dir=`${ECHO} $$dir | ${SED} -e 's/:.*//'`; \ |
else \ |
else \ |
|
|
.if defined(DEPENDS) |
.if defined(DEPENDS) |
.if !defined(NO_DEPENDS) |
.if !defined(NO_DEPENDS) |
@for dir in ${DEPENDS}; do \ |
@for dir in ${DEPENDS}; do \ |
if expr "$$dir" : '.*:' > /dev/null; then \ |
if ${EXPR} "$$dir" : '.*:' > /dev/null; then \ |
target=`${ECHO} $$dir | ${SED} -e 's/.*://'`; \ |
target=`${ECHO} $$dir | ${SED} -e 's/.*://'`; \ |
dir=`${ECHO} $$dir | ${SED} -e 's/:.*//'`; \ |
dir=`${ECHO} $$dir | ${SED} -e 's/:.*//'`; \ |
else \ |
else \ |