diff options
author | asami <asami@FreeBSD.org> | 1999-03-08 07:23:10 +0000 |
---|---|---|
committer | asami <asami@FreeBSD.org> | 1999-03-08 07:23:10 +0000 |
commit | 755e63021c52f5292b5284c5d10c05274df15811 (patch) | |
tree | 86c1a7d867f772ef434127fc4ca6595fa62f909c | |
parent | b923e74ea9faf4af38e168df0847f809dd6d7e26 (diff) | |
download | FreeBSD-ports-755e63021c52f5292b5284c5d10c05274df15811.zip FreeBSD-ports-755e63021c52f5292b5284c5d10c05274df15811.tar.gz |
(1) Change FETCH_CMD to add the -A flag, so it won't be confused by the
"not_found.html" stuff.
(2) Add "MACHINE_ARCH?=i386" so those with a 2.x system have a
fighting chance of getting ports-current to work.
(3) Add new variable CONFIGURE_TARGET, defaulting to
${MACHINE_ARCH}--freebsd${OSREL}, which is tucked to the end of
CONFIGURE_ARGS if GNU_CONFIGURE is defined.
Reviewed by: various
(4) Change MASTER_SITE_GNOME to match reality.
Submitted by: Jeremy Lea <reg@shale.csir.co.za> and nectar
(5) Change MASTER_SITE_SUBDIR handling so we won't be generating
double slashes.
Submitted by: The lord of distfiles himself
(6) Add new variable FETCH_ENV which is the environment passed to
FETCH, so people can define HTTP_PROXY or whatever the want
without screwing up the case when FETCH_CMD is not fetch.
PR: 2949
Submitted by: same
-rw-r--r-- | Mk/bsd.port.mk | 56 |
1 files changed, 38 insertions, 18 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index db85b86..9dbd6b9 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -1,7 +1,7 @@ #-*- mode: Fundamental; tab-width: 4; -*- # ex:ts=4 # -# $Id: bsd.port.mk,v 1.304 1999/02/03 11:06:19 asami Exp $ +# $Id: bsd.port.mk,v 1.305 1999/02/14 06:49:55 asami Exp $ # $NetBSD: $ # # bsd.port.mk - 940820 Jordan K. Hubbard. @@ -305,12 +305,13 @@ OpenBSD_MAINTAINER= imp@OpenBSD.ORG # # For fetch: # -# FETCH_CMD - Full path to ftp/http fetch command if not in $PATH -# (default: /usr/bin/fetch). +# FETCH_CMD - Full path to ftp/http fetch command if not in $PATH +# (default: "/usr/bin/fetch -A"). # FETCH_BEFORE_ARGS - # Arguments to ${FETCH_CMD} before filename (default: none). # FETCH_AFTER_ARGS - # Arguments to ${FETCH_CMD} following filename (default: none). +# FETCH_ENV - Environment to pass to ${FETCH_CMD} (default: none). # # For extract: # @@ -330,7 +331,11 @@ OpenBSD_MAINTAINER= imp@OpenBSD.ORG # GNU_CONFIGURE - Set if you are using GNU configure (optional). Implies # HAS_CONFIGURE. # CONFIGURE_SCRIPT - Name of configure script (defaults: configure). -# CONFIGURE_ARGS - Pass these args to configure if ${HAS_CONFIGURE} is set. +# CONFIGURE_TARGET - The name of target to call when GNU_CONFIGURE is +# defined (default: ${MACHINE_ARCH}--freebsd). +# CONFIGURE_ARGS - Pass these args to configure if ${HAS_CONFIGURE} is set +# (default: "--prefix=${PREFIX} ${CONFIGURE_TARGET}" if +# GNU_CONFIGURE is set, empty otherwise). # CONFIGURE_ENV - Pass these env (shell-like) to configure if # ${HAS_CONFIGURE} is set. # @@ -403,6 +408,9 @@ OpenBSD_MAINTAINER= imp@OpenBSD.ORG ARCH!= /usr/bin/uname -m .endif +# Kludge for pre-3.0 systems +MACHINE_ARCH?= i386 + # Get the operating system type .if !defined(OPSYS) OPSYS!= /usr/bin/uname -s @@ -645,7 +653,7 @@ MAKEFILE?= Makefile MAKE_ENV+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} MOTIFLIB="${MOTIFLIB}" CFLAGS="${CFLAGS}" LIBDIR="${LIBDIR}" .if exists(/usr/bin/fetch) -FETCH_CMD?= /usr/bin/fetch +FETCH_CMD?= /usr/bin/fetch -A #FETCH_BEFORE_ARGS+= $${CKSIZE:+-S $$CKSIZE} .else FETCH_CMD?= /usr/bin/ftp @@ -852,10 +860,10 @@ MASTER_SITE_COMP_SOURCES+= \ ftp://rtfm.mit.edu/pub/usenet/comp.sources.%SUBDIR%/ MASTER_SITE_GNOME+= \ - ftp://ftp.jimpick.com/pub/mirrors/gnome/sources/%SUBDIR%/ \ - ftp://ftp.geo.net/pub/gnome/sources/%SUBDIR%/ \ - ftp://gnomeftp.wgn.net/pub/gnome/sources/%SUBDIR%/ \ - ftp://ftp.gnome.org/pub/GNOME/sources/%SUBDIR%/ + ftp://ftp.jimpick.com/pub/mirrors/gnome/%SUBDIR%/ \ + ftp://ftp.geo.net/pub/gnome/%SUBDIR%/ \ + ftp://gnomeftp.wgn.net/pub/gnome/%SUBDIR%/ \ + ftp://ftp.gnome.org/pub/GNOME/%SUBDIR%/ MASTER_SITE_AFTERSTEP+= \ ftp://ftp.afterstep.org/%SUBDIR%/ \ @@ -877,27 +885,38 @@ MASTER_SITE_WINDOWMAKER+= \ ftp://ftp.cybertrails.com/pub/windowmaker/%SUBDIR%/ \ ftp://ftp.ameth.org/pub/mirrors/ftp.windowmaker.org/%SUBDIR%/ +MASTER_SITE_PORTS_JP+= \ + ftp://ports.jp.freebsd.org/pub/FreeBSD-jp/ports-jp/LOCAL_PORTS/%SUBDIR%/ \ + ftp://ftp4.jp.freebsd.org/pub/FreeBSD-jp/ports-jp/LOCAL_PORTS/%SUBDIR%/ \ + ftp://ftp.ics.es.osaka-u.ac.jp/pub/mirrors/FreeBSD-jp/ports-jp/LOCAL_PORTS/%SUBDIR%/ \ + ftp://ftp.t-cnet.or.jp/pub/FreeBSD-jp/ports-jp/LOCAL_PORTS/%SUBDIR%/ + # Empty declaration to avoid "variable MASTER_SITES recursive" error MASTER_SITES?= PATCH_SITES?= -# Default -MASTER_SITE_SUBDIR?= . -PATCH_SITE_SUBDIR?= . - # Substitute subdirectory names +.if defined(MASTER_SITE_SUBDIR) .for dir in ${MASTER_SITE_SUBDIR} MASTER_SITES_TMP+= ${MASTER_SITES:S^%SUBDIR%^${dir}^} .endfor +.else +MASTER_SITES_TMP= ${MASTER_SITES:S^%SUBDIR%/^^} +.endif MASTER_SITES:= ${MASTER_SITES_TMP} +.if defined(PATCH_SITE_SUBDIR) .for dir in ${PATCH_SITE_SUBDIR} PATCH_SITES_TMP+= ${PATCH_SITES:S^%SUBDIR%^${dir}^} .endfor +.else +PATCH_SITES_TMP= ${PATCH_SITES:S^%SUBDIR%/^^} +.endif PATCH_SITES:= ${PATCH_SITES_TMP} # The primary backup site. MASTER_SITE_BACKUP?= \ ftp://ftp.freebsd.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/ +MASTER_SITE_BACKUP:= ${MASTER_SITE_BACKUP:S^\${DIST_SUBDIR}/^^} # Where to put distfiles that don't have any other master site MASTER_SITE_LOCAL?= \ @@ -994,9 +1013,10 @@ PKGBASE!= ${ECHO} ${PKGNAME} | ${SED} -e 's/-[^-]*$$//' PKGLATESTFILE?= ${PKGLATESTREPOSITORY}/${PKGBASE}${PKG_SUFX} CONFIGURE_SCRIPT?= configure +CONFIGURE_TARGET?= ${MACHINE_ARCH}--freebsd${OSREL} .if defined(GNU_CONFIGURE) -CONFIGURE_ARGS+= --prefix=${PREFIX} +CONFIGURE_ARGS+= --prefix=${PREFIX} ${CONFIGURE_TARGET} HAS_CONFIGURE= yes .endif @@ -1335,7 +1355,7 @@ do-fetch: ${ECHO_MSG} ">> Attempting to fetch from $${site}."; \ DIR=${DIST_SUBDIR}; \ CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ - if ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${file} ${FETCH_AFTER_ARGS}; then \ + if ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${file} ${FETCH_AFTER_ARGS}; then \ continue 2; \ fi \ done; \ @@ -1359,7 +1379,7 @@ do-fetch: ${ECHO_MSG} ">> Attempting to fetch from $${site}."; \ DIR=${DIST_SUBDIR}; \ CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ - if ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${file} ${FETCH_AFTER_ARGS}; then \ + if ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${file} ${FETCH_AFTER_ARGS}; then \ continue 2; \ fi \ done; \ @@ -1799,7 +1819,7 @@ fetch-list: for site in ${MASTER_SITES}; do \ DIR=${DIST_SUBDIR}; \ CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ - ${ECHO} -n ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${file} "${FETCH_AFTER_ARGS}" '||' ; \ + ${ECHO} -n ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${file} "${FETCH_AFTER_ARGS}" '||' ; \ break; \ done; \ ${ECHO} "echo $${file} not fetched" ; \ @@ -1812,7 +1832,7 @@ fetch-list: for site in ${PATCH_SITES}; do \ DIR=${DIST_SUBDIR}; \ CKSIZE=`${GREP} "^SIZE ($${DIR:+$$DIR/}$$file)" ${MD5_FILE} | ${AWK} '{print $$4}'`; \ - ${ECHO} -n ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${file} "${FETCH_AFTER_ARGS}" '||' ; \ + ${ECHO} -n ${SETENV} ${FETCH_ENV} ${FETCH_CMD} ${FETCH_BEFORE_ARGS} $${site}$${file} "${FETCH_AFTER_ARGS}" '||' ; \ break; \ done; \ ${ECHO} "echo $${file} not fetched" ; \ |