From owner-freebsd-ports Fri Dec 5 04:48:11 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id EAA22010 for ports-outgoing; Fri, 5 Dec 1997 04:48:11 -0800 (PST) (envelope-from owner-freebsd-ports) Received: from silvia.HIP.Berkeley.EDU (ala-ca34-49.ix.netcom.com [207.93.143.177]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id EAA21951 for ; Fri, 5 Dec 1997 04:47:59 -0800 (PST) (envelope-from asami@vader.cs.berkeley.edu) Received: (from asami@localhost) by silvia.HIP.Berkeley.EDU (8.8.8/8.6.9) id EAA07091; Fri, 5 Dec 1997 04:47:55 -0800 (PST) Date: Fri, 5 Dec 1997 04:47:55 -0800 (PST) Message-Id: <199712051247.EAA07091@silvia.HIP.Berkeley.EDU> To: ports@freebsd.org CC: tlambert@primenet.com Subject: "Latest" links for ports From: asami@cs.berkeley.edu (Satoshi Asami) Sender: owner-freebsd-ports@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Before I venture into the multi-CD land, here's a couple of tiny changes I plan to make to bsd.port.mk soon. (1) Support for multiple md5 lines of the same file Submitted by: hoek (2) Be very picky about old tcl/tk installations Annoyed by: several bogus commits by pst :> (3) Create a "packages/Latest" directory that contains version-less symlinks so you can "pkg_add emacs.tgz" and be happy Suggested by: Terry Yes that's Mr. Lambert. I wanted to show that I don't reject a good idea just because it has a, um, somewhat controversial origin. :) Satoshi ------- Index: bsd.port.mk =================================================================== RCS file: /usr/cvs/src/share/mk/bsd.port.mk,v retrieving revision 1.227.2.29 diff -u -r1.227.2.29 bsd.port.mk --- bsd.port.mk 1997/11/20 05:34:32 1.227.2.29 +++ bsd.port.mk 1997/12/05 12:35:31 @@ -521,6 +521,7 @@ GZIP?= -9 GZIP_CMD?= /usr/bin/gzip -nf ${GZIP} LDCONFIG?= /sbin/ldconfig +LN?= /bin/ln MKDIR?= /bin/mkdir -p MV?= /bin/mv RM?= /bin/rm @@ -655,11 +656,12 @@ # shouldn't match "[a-z]*"), see the target "delete-package-links" below. PKGREPOSITORYSUBDIR?= All PKGREPOSITORY?= ${PACKAGES}/${PKGREPOSITORYSUBDIR} -.if exists(${PACKAGES}) PKGFILE?= ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX} -.else -PKGFILE?= ${PKGNAME}${PKG_SUFX} -.endif + +# The "latest version" link -- ${PKGNAME} minus everthing after the last '-' +PKGLATESTREPOSITORY?= ${PACKAGES}/Latest +PKGBASE!= ${ECHO} ${PKGNAME} | ${SED} -e 's/-[^-]*$$//' +PKGLATESTFILE?= ${PKGLATESTREPOSITORY}/${PKGBASE}${PKG_SUFX} CONFIGURE_SCRIPT?= configure @@ -749,6 +751,12 @@ IGNORE= "is restricted: ${RESTRICTED}" .elif ((defined(USE_IMAKE) || defined(USE_X11)) && !exists(${X11BASE})) IGNORE= "uses X11, but ${X11BASE} not found" +.elif exists(/usr/include/tcl.h) +IGNORE= ": You have an old tcl installation on your machine. Remove everything that matches '/usr/*/*tcl*' first" +.elif exists(${LOCALBASE}/include/tcl.h) || exists(${LOCALBASE}/lib/tclConfig.sh) +IGNORE= ": You have an old tcl installation on your machine. Remove everything that matches '${PREFIX}/*/*tcl*' first" +.elif exists(${LOCALBASE}/include/tk.h) || exists(${LOCALBASE}/lib/tkConfig.sh) +IGNORE= ": You have an old tk installation on your machine. Remove everything that matches '${PREFIX}/*/*tk*' first" .elif defined(BROKEN) IGNORE= "is marked as broken: ${BROKEN}" .endif @@ -1079,13 +1087,20 @@ exit 1; \ fi; \ fi; \ - ln -s ../${PKGREPOSITORYSUBDIR}/${PKGNAME}${PKG_SUFX} ${PACKAGES}/$$cat; \ - done; + ${LN} -s ../${PKGREPOSITORYSUBDIR}/${PKGNAME}${PKG_SUFX} ${PACKAGES}/$$cat; \ + done + @if [ ! -d ${PKGLATESTREPOSITORY} ]; then \ + if ! ${MKDIR} ${PKGLATESTREPOSITORY}; then \ + ${ECHO_MSG} ">> Can't create directory ${PKGLATESTREPOSITORY}."; \ + exit 1; \ + fi; \ + fi + @${LN} -s ../${PKGREPOSITORYSUBDIR}/${PKGNAME}${PKG_SUFX} ${PKGLATESTFILE} .endif .if !target(delete-package-links) delete-package-links: - @${RM} -f ${PACKAGES}/[a-z]*/${PKGNAME}${PKG_SUFX}; + @${RM} -f ${PACKAGES}/[a-z]*/${PKGNAME}${PKG_SUFX} ${PKGLATESTFILE} .endif .if !target(delete-package) @@ -1383,7 +1398,7 @@ ${ECHO_MSG} ">> Checksum for $$file is set to IGNORE in md5 file even though"; \ ${ECHO_MSG} " the file is not in the "'$$'"{IGNOREFILES} list."; \ OK="false"; \ - elif [ "$$CKSUM" = "$$CKSUM2" ]; then \ + elif expr "$$CKSUM2" : ".*$$CKSUM" > /dev/null; then \ ${ECHO_MSG} ">> Checksum OK for $$file."; \ else \ ${ECHO_MSG} ">> Checksum mismatch for $$file."; \