summaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorSatoshi Asami <asami@FreeBSD.org>1999-11-11 02:36:15 +0000
committerSatoshi Asami <asami@FreeBSD.org>1999-11-11 02:36:15 +0000
commitcd372a0c66586cbbb66949f578f55a818adc7a3c (patch)
treefb849149822683804b4fd86d2f4eef84ebe7506f /Mk
parentAdd a patch that allows xmms to play the next song in the playlist. (diff)
(1) Fix the distfile deletion for cases where distfiles are specified
with directory names. Submitted by: jdp (2) Preserve +REQUIRED_BY file when FORCE_PKG_REGISTER is defined. Reviewed by: steve (3) Add new variable EXTRA_PATCHES, which can be set to some files outside of ${PATCHDIR} (which usually means ${WRKDIR}). These will be applied after distribution patches but before the normal ${PATCHDIR} patches. Useful when you have dynamic patches. (4) Move USE_QT2 earlier, the USE_NEWGCC dependency wasn't working because it came after the USE_NEWGCC check. Move USE_QT alongside new location of USE_QT2. Submitted by: imura (5) Substitute ftp.cdrom.com for ftp.funet.fi in MASTER_SITE_SUNSITE, which no longer seems to be a full mirror anymore. Submitted by: Ade Lovett <ade@lovett.com> PR: 14221 (6) Fix typo in MASTER_SITE_FREEBSD case -- it used ${MASTER_SITES} (instead of ${PATCH_SITES}) to fetch distribution patches. That obviously would fail if the user attempted to build a port before the distribution patches showed up at ftp.FreeBSD.org. (7) Remove tcl75, tk41 and tk81 from the list of valid categories. (tcl81 is still used.) Submitted by: jseger (8) Make delete-package-list a little more verbose by making it check the existence of a package file and print out what it's doing. Silence bogus warnings from delete-distfiles-list by redirecting stderr from rmdir to /dev/null. (9) Remove OpenBSD_MAINTAINER=imp, he hasn't been doing any work with this file on the OpenBSD repository for a long time. Submitted by: imp
Notes
Notes: svn path=/head/; revision=23016
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk79
1 files changed, 58 insertions, 21 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 3410adffa168..91f5836a4fff 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -10,15 +10,14 @@
# Please view me with 4 column tabs!
# There are two different types of "maintainers" in the whole ports
-# framework concept. Maintainers of the bsd.port*.mk files
-# are listed below in the ${OPSYS}_MAINTAINER entries (this file
-# is used by multiple *BSD flavors). You should consult them
+# framework concept. The maintainer of the bsd.port*.mk files
+# is listed below in the ${OPSYS}_MAINTAINER entries (this file
+# is used by multiple *BSD flavors). You should consult him
# if you have any questions/suggestions regarding this file.
#
# DO NOT COMMIT CHANGES TO THIS FILE BY YOURSELF!
FreeBSD_MAINTAINER= asami@FreeBSD.org
-OpenBSD_MAINTAINER= imp@OpenBSD.ORG
# For each port, the MAINTAINER variable is what you should consult for
# contact information on the person(s) to contact if you have questions/
@@ -147,6 +146,7 @@ OpenBSD_MAINTAINER= imp@OpenBSD.ORG
# USE_XLIB - Says that the port uses X libraries.
# USE_QT - Says that the port uses version 1 of the qt toolkit.
# USE_QT2 - Says that the port uses version 2 of the qt toolkit.
+# Implies USE_NEWGCC.
#
# Dependency checking. Use these if your port requires another port
# not in the list above.
@@ -341,6 +341,19 @@ OpenBSD_MAINTAINER= imp@OpenBSD.ORG
# to 0:0. Set this variable if you want to turn off this
# feature.
#
+# For patch:
+#
+# EXTRA_PATCHES - Define this variable if you have patches not in
+# ${PATCHDIR}. This usually happens when you need to
+# do some pre-processing before some distribution
+# patches can be applied. In that case, fetch them as
+# extra distfiles, put the processed results in
+# ${WRKDIR}, then point EXTRA_PATCHES to them.
+#
+# The patches specified by this variable will be
+# applied after the normal distribution patches but
+# before those in ${PATCHDIR}.
+#
# For configure:
#
# HAS_CONFIGURE - Says that the port has its own configure script. The
@@ -584,6 +597,15 @@ MANCOMPRESSED?= yes
MANCOMPRESSED?= no
.endif
+.if defined(USE_QT)
+LIB_DEPENDS+= qt.2:${PORTSDIR}/x11-toolkits/qt142
+.endif
+
+.if defined(USE_QT2)
+LIB_DEPENDS+= qt2.2:${PORTSDIR}/x11-toolkits/qt20
+USE_NEWGCC= yes
+.endif
+
.if defined(USE_BZIP2)
BUILD_DEPENDS+= bzip2:${PORTSDIR}/archivers/bzip2
.endif
@@ -658,15 +680,6 @@ RUN_DEPENDS+= perl${PERL_VERSION}:${PORTSDIR}/lang/perl5
LIB_DEPENDS+= X11.6:${PORTSDIR}/x11/XFree86
.endif
-.if defined(USE_QT)
-LIB_DEPENDS+= qt.2:${PORTSDIR}/x11-toolkits/qt142
-.endif
-
-.if defined(USE_QT2)
-LIB_DEPENDS+= qt2.2:${PORTSDIR}/x11-toolkits/qt20
-USE_NEWGCC= yes
-.endif
-
.if exists(${PORTSDIR}/../Makefile.inc)
.include "${PORTSDIR}/../Makefile.inc"
.endif
@@ -910,7 +923,7 @@ MASTER_SITE_TEX_CTAN+= \
MASTER_SITE_SUNSITE+= \
ftp://metalab.unc.edu/pub/Linux/%SUBDIR%/ \
ftp://ftp.infomagic.com/pub/mirrors/linux/sunsite/%SUBDIR%/ \
- ftp://ftp.funet.fi/pub/mirrors/sunsite.unc.edu/pub/Linux/%SUBDIR%/
+ ftp://ftp.cdrom.com/pub/linux/sunsite/%SUBDIR%/
MASTER_SITE_KDE+= \
ftp://ftp.us.kde.org/pub/kde/%SUBDIR%/ \
@@ -1000,7 +1013,7 @@ PATCH_SITES:= ${MASTER_SITE_OVERRIDE} ${PATCH_SITES}
.endif
.else
MASTER_SITES:= ${MASTER_SITE_BACKUP} ${MASTER_SITES}
-PATCH_SITES:= ${MASTER_SITE_BACKUP} ${MASTER_SITES}
+PATCH_SITES:= ${MASTER_SITE_BACKUP} ${PATCH_SITES}
.endif
# Search CDROM first if mounted, symlink instead of copy if
@@ -1072,8 +1085,8 @@ VALID_CATEGORIES+= afterstep archivers astro audio benchmarks biology \
mail math mbone misc net news \
offix palm perl5 plan9 print python russian \
security shells sysutils \
- tcl75 tcl76 tcl80 tcl81 tcl82 textproc \
- tk41 tk42 tk80 tk81 tk82 tkstep80 \
+ tcl76 tcl80 tcl81 tcl82 textproc \
+ tk42 tk80 tk82 tkstep80 \
vietnamese windowmaker www \
x11 x11-clocks x11-fm x11-fonts x11-servers x11-toolkits x11-wm
check-categories:
@@ -1560,6 +1573,12 @@ do-patch:
esac; \
done)
.endif
+.if defined(EXTRA_PATCHES)
+ @for i in ${EXTRA_PATCHES}; do \
+ ${ECHO_MSG} "===> Applying extra patch $$i"; \
+ ${PATCH} ${PATCH_ARGS} < $$i; \
+ done
+.endif
@if [ -d ${PATCHDIR} ]; then \
if [ "`echo ${PATCHDIR}/patch-*`" = "${PATCHDIR}/patch-*" ]; then \
${ECHO_MSG} "===> Ignoring empty patch directory"; \
@@ -1718,7 +1737,7 @@ delete-package-links-list:
.if !target(delete-package-list)
delete-package-list:
@${MAKE} ${__softMAKEFLAGS} delete-package-links-list
- @${ECHO} ${RM} -f ${PKGFILE}
+ @${ECHO} "[ -f ${PKGFILE} ] && (${ECHO} deleting ${PKGFILE}; ${RM} -f ${PKGFILE})"
.endif
################################################################
@@ -2011,7 +2030,13 @@ delete-distfiles:
@${ECHO_MSG} "===> Deleting distfiles for ${PKGNAME}"
@(if [ "X${DISTFILES}${PATCHFILES}" != "X" -a -d ${_DISTDIR} ]; then \
cd ${_DISTDIR}; \
- ${RM} -f ${DISTFILES} ${PATCHFILES}; \
+ for file in ${DISTFILES} ${PATCHFILES}; do \
+ ${RM} -f $${file}; \
+ dir=$${file%/*}; \
+ if [ "$${dir}" != "$${file}" ]; then \
+ ${RMDIR} -p $${dir} >/dev/null 2>&1 || :; \
+ fi; \
+ done; \
fi)
.if defined(DIST_SUBDIR)
-@${RMDIR} ${_DISTDIR}
@@ -2023,11 +2048,15 @@ delete-distfiles-list:
@${ECHO} "# ${PKGNAME}"
@if [ "X${DISTFILES}${PATCHFILES}" != "X" ]; then \
for file in ${DISTFILES} ${PATCHFILES}; do \
- ${ECHO} ${RM} -f ${_DISTDIR}/$$file; \
+ ${ECHO} "[ -f ${_DISTDIR}/$$file ] && (${ECHO} deleting ${_DISTDIR}/$$file; ${RM} -f ${_DISTDIR}/$$file)"; \
+ dir=$${file%/*}; \
+ if [ "$${dir}" != "$${file}" ]; then \
+ ${ECHO} "(cd ${_DISTDIR} && ${RMDIR} -p $${dir} 2>/dev/null)"; \
+ fi; \
done; \
fi
.if defined(DIST_SUBDIR)
- @${ECHO} ${RMDIR} ${_DISTDIR}
+ @${ECHO} "${RMDIR} ${_DISTDIR} 2>/dev/null"
.endif
.endif
@@ -2593,7 +2622,11 @@ compress-man:
.if !target(fake-pkg)
fake-pkg:
@if [ ! -d ${PKG_DBDIR} ]; then ${RM} -f ${PKG_DBDIR}; ${MKDIR} ${PKG_DBDIR}; fi
+ @${RM} -f /tmp/${PKGNAME}-required-by
.if defined(FORCE_PKG_REGISTER)
+ @if [ -e ${PKG_DBDIR}/${PKGNAME}/+REQUIRED_BY ]; then \
+ ${CP} ${PKG_DBDIR}/${PKGNAME}/+REQUIRED_BY /tmp/${PKGNAME}-required-by; \
+ fi
@${RM} -rf ${PKG_DBDIR}/${PKGNAME}
.endif
@if [ ! -d ${PKG_DBDIR}/${PKGNAME} ]; then \
@@ -2623,6 +2656,10 @@ fake-pkg:
fi; \
done; \
fi
+ @if [ -e /tmp/${PKGNAME}-required-by ]; then \
+ ${CAT} /tmp/${PKGNAME}-required-by >> ${PKG_DBDIR}/${PKGNAME}/+REQUIRED_BY; \
+ ${RM} -f /tmp/${PKGNAME}-required-by; \
+ fi
.endif
# Depend is generally meaningless for arbitrary ports, but if someone wants