[Midnightbsd-cvs] mports: mports/Mk: Broke the common commands into bsd.commands.mk.

ctriv at midnightbsd.org ctriv at midnightbsd.org
Wed Nov 14 13:49:04 EST 2007


Log Message:
-----------
Broke the common commands into bsd.commands.mk.

Documentation fixes.  The docs in the begining of bsd.mport.mk now reflect
reality.

Added SKIP_FAKE_CHECK.  A list of files that aren't checked to see if they
contain the fake destdir.  Perl now adds the packlist to this automatically.

Replaced TARGETDIR with PREFIX in many places.  This is a continuation of
work to restrict the use of DESTDIR to install-package.

USE_XORG now works properly with pre/post.port.mk.

Modified Files:
--------------
    mports/Mk:
        bsd.mport.mk (r1.73 -> r1.74)
        bsd.perl.mk (r1.6 -> r1.7)
        bsd.xorg.mk (r1.2 -> r1.3)

Added Files:
-----------
    mports/Mk:
        bsd.commands.mk (r1.1)

-------------- next part --------------
Index: bsd.mport.mk
===================================================================
RCS file: /home/cvs/mports/Mk/bsd.mport.mk,v
retrieving revision 1.73
retrieving revision 1.74
diff -L Mk/bsd.mport.mk -L Mk/bsd.mport.mk -u -r1.73 -r1.74
--- Mk/bsd.mport.mk
+++ Mk/bsd.mport.mk
@@ -39,16 +39,18 @@
 # you are running on.  These are provided in case you need to take
 # different actions for different values.
 #
-# ARCH			- The architecture of the target machine, such as would be
-#				  returned by "uname -p".  (Note: Ports should test against
-#				  ARCH, and not the host machine's architecture which is
-#				  MACHINE_ARCH, to enable ports to be cross-built.)
-# OPSYS			- Portability clause.  This is the operating system the
-#				  makefile is being used on.  Automatically set to
-#				  "FreeBSD," "NetBSD," or "OpenBSD" as appropriate.
-# OSREL			- The release version (numeric) of the operating system.
-# OSVERSION		- The value of __FreeBSD_version.
-# PORTOBJFORMAT	- The object format ("aout" or "elf").
+# ARCH			 - The architecture of the target machine, such as would be
+#				   returned by "uname -p".  (Note: Ports should test against
+#				   ARCH, and not the host machine's architecture which is
+#				   MACHINE_ARCH, to enable ports to be cross-built.)
+# OPSYS			 - Portability clause.  This is the operating system the
+#				   makefile is being used on.  Automatically set to
+#				   "MidnightBSD", "FreeBSD," "NetBSD," or "OpenBSD" as
+#				  appropriate.
+# OSREL			 - The release version (numeric) of the operating system.
+# OSVERSION		 - The value of __MidnightBSD_version.
+# FREEBSDVERSION - 
+# PORTOBJFORMAT	 - The object format ("aout" or "elf").
 #
 # This is the beginning of the list of all variables that need to be
 # defined in a port, listed in order that they should be included
@@ -462,7 +464,7 @@
 #				  If this is set to a list of files, these files will be
 #				  automatically added to ${SUB_FILES}, some %%VAR%%'s will
 #				  automatically be expanded, they will be installed in
-#				  ${TARGETDIR}/etc/rc.d and added to the packing list.
+#				  ${PREFIX}/etc/rc.d and added to the packing list.
 # USE_RCORDER	- List of rc.d startup scripts to be called early in the boot
 #				  process. This acts exactly like USE_RC_SUBR except that
 #				  scripts are installed in /etc/rc.d.
@@ -482,35 +484,20 @@
 # Various directory definitions and variables to control them.
 # You rarely need to redefine any of these except WRKSRC and NO_WRKSUBDIR.
 #
-# TARGETDIR		- The fully qualified path, where everything is installed.
-#				  See the other variables below.
-#				  Default: ${DESTDIR}${PREFIX}
-#
-# DESTDIR		- The path to the environment we are installing to.  Define
-#				  this if you want to install packages into a jail
-#				  or into an another FreeBSD environment mounted
-#				  elsewhere than /.  ${PREFIX} is relative to
-#				  ${DESTDIR}.  E.g. setting DESTDIR=/bla PREFIX=/opt will
-#				  result packages installed under /bla/opt and registered
-#				  under /bla/var/db/pkg.
-#				  Default: not set (means /)
+# DESTDIR		- The path to the environment we are installing to.  This is 
+#				  only used during the final package install, at which point
+#				  pkg_add is run chroot'ed into the DESTDIR.
 #
 # X11BASE		- Where X11 ports install things.
 #				  Default: ${LOCALBASE}
-# X11BASE_REL		- Same as X11BASE, but relative to DESTDIR
-#				  Default: ${LOCALBASE_REL}
 # LOCALBASE		- Where non-X11 ports install things.
-#				  Default: ${DESTDIR}/usr/local
-# LOCALBASE_REL		- Same as LOCALBASE, but relative to DESTDIR
 #				  Default: /usr/local
 # LINUXBASE		- Where Linux ports install things.
-#				  Default: ${DESTDIR}/compat/linux
-# LINUXBASE_REL		- Same as LINUXBASE, but relative to DESTDIR
 #				  Default: /compat/linux
 # PREFIX		- Where *this* port installs its files.
-#				  Default: ${X11BASE_REL} if USE_X_PREFIX is set,
-#				  ${LINUXBASE_REL} if  USE_LINUX_PREFIX is set,
-#				  otherwise ${LOCALBASE_REL}
+#				  Default: ${X11BASE} if USE_X_PREFIX is set,
+#				  ${LINUXBASE} if  USE_LINUX_PREFIX is set,
+#				  otherwise ${LOCALBASE}
 #
 # IGNORE_PATH_CHECKS	- There are some sanity checks against PREFIX and DESTDIR.
 #				  You can diasble these checks with defining
@@ -557,11 +544,10 @@
 #
 #
 # MPORT_MAINTAINER_MODE - 	If set, the mports system will perform checks to see if several
-#							steps are successfully completed.  Use must install perl with
-#							this variable unset before setting it.
+#							steps are successfully completed.  
 #
 # The following are used by the fake system.  The fake system installs a dist's files into
-# a temporary directory before 
+# a temporary directory before final installatioin.
 #
 # FAKE_OPTS			- Set options for fake.  Available options:
 #						libs 		-- fake targets need access to the port's shared libs.
@@ -582,6 +568,11 @@
 #					  suitable for use with env.  This variable should be considered read-
 #                     only. It is documented because often it is useful for calling make
 #                     in {pre,post}-install.
+# SKIP_FAKE_CHECK	- If MPORT_MAINTAINER_MODE is set, then each file in the plist will
+#					  checked to see if it contains ${FAKE_DESTDIR}.  Sometimes this 
+#					  produces false positives (a file contains the fake destdir, but 
+#					  its precense is harmless).  This variable is a list of files that 
+#					  will not be checked.
 #
 # Variables that serve as convenient "aliases" for your *-install targets.
 # Use these like: "${INSTALL_PROGRAM} ${WRKSRC}/prog ${PREFIX}/bin".
@@ -618,7 +609,7 @@
 #				  installs its own manpage links so they will show up
 #				  correctly in ${PLIST}.)
 # MANPREFIX		- The directory prefix for ${MAN<sect>} and ${MLINKS}.
-#				  Default: ${TARGETDIR}
+#				  Default: ${PREFIX}
 # MAN<sect>PREFIX
 #				- If manual pages of some sections install in different
 #				  locations than others, use these.
@@ -685,16 +676,18 @@
 # configure		- Runs either GNU configure, one or more local configure
 #				  scripts or nothing, depending on what's available.
 # build			- Actually compile the sources.
-# install		- Install the results of a build.
+# fake			- Install the results of the build into a temporary directory.
+# refake		- Delete the temporary directory and run make fake again.
+# package		- Create a package from the contents of the temporary directory.
+# install		- Install the package.
 # reinstall		- Install the results of a build, ignoring "already installed"
 #				  flag.
 # deinstall		- Remove the installation.
 # deinstall-all	- Remove all installations with the same PKGORIGIN.
-# package		- Create a package from an _installed_ port.
-# package-recursive
-#				- Create a package for a port and _all_ of its dependancies.
 # describe		- Try to generate a one-line description for each port for
 #				  use in INDEX files and the like.
+# describe-yaml - Generate a description for the port in the YAML markup language.
+#
 # checkpatch	- Do a "patch -C" instead of a "patch".  Note that it may
 #				  give incorrect results if multiple patches deal with
 #				  the same file.
@@ -723,6 +716,11 @@
 # (which are available for every stage except checksum) or
 # override the do-* targets to do pretty much anything you want.
 #
+# Many of the do-* targets are wrappers around run-* targets.
+# run-* targets cannot be overridden, they are the default action for the given
+# do-* target.  This way, you can override do-foo, twiddle some variables
+# and then call 'make run-foo'.
+#
 # NEVER override the "regular" targets unless you want to open
 # a major can of worms.
 #
@@ -733,7 +731,8 @@
 # variable and is not to be set in a port's Makefile.  See above for NO_PACKAGE.
 #
 # NO_BUILD		- Use a dummy (do-nothing) build target.
-# NO_INSTALL	- Use a dummy (do-nothing) install target.
+# NO_INSTALL	- Use a dummy (do-nothing) fake target.  This may sound confusing, 
+#				  but typically this will do what you want.
 #
 # Here are some variables used in various stages.
 #
@@ -854,11 +853,7 @@
 # MAKE_ARGS		- Any extra arguments to sub-make in build and install stages.
 #				  Default: none
 #
-# NO_STACK_PROTECTOR	- If set, Propolice stack protection will be disabled.  Only set
-# 			  this if there is no way for the port to work with propolice.
-#
-#
-# For install:
+# For install (really for fake):
 #
 # INSTALL_TARGET
 #				- Default target for sub-make in install stage.
@@ -926,14 +921,14 @@
 # 				  Note: that should only be used on 64-bit architectures.
 #
 # DOCSDIR		- Name of the directory to install the packages docs in.
-#				  Default: ${TARGETDIR}/share/doc/${PORTNAME}
+#				  Default: ${PREFIX}/share/doc/${PORTNAME}
 # EXAMPLESDIR	- Name of the directory to install the packages examples in.
-#				  Default: ${TARGETDIR}/share/examples/${PORTNAME}
+#				  Default: ${PREFIX}/share/examples/${PORTNAME}
 # DATADIR		- Name of the directory to install the packages shared data in.
-#				  Default: ${TARGETDIR}/share/${PORTNAME}
+#				  Default: ${PREFIX}/share/${PORTNAME}
 #
 # DESKTOPDIR	- Name of the directory to install ${DESKTOP_ENTRIES} in.
-#				  Default: ${TARGETDIR}/share/applications
+#				  Default: ${PREFIX}/share/applications
 # DESKTOP_ENTRIES
 #				- List of desktop entry files to generate and install in
 #				  ${DESKTOPDIR}. The format is
@@ -1005,11 +1000,6 @@
 #				  Default: ${DESTDIR}/var/db/pkg
 # PORT_DBDIR	- Where port configuration options are recorded.
 #				  Default: ${DESTDIR}/var/db/ports
-# NO_PKG_REGISTER
-#				- Don't register a port installation as a package.
-# FORCE_PKG_REGISTER
-#				- If set, it will overwrite any existing package
-#				  registration information in ${PKG_DBDIR}/${PKGNAME}.
 # NO_DEPENDS	- Don't verify build of dependencies.
 # CHECKSUM_ALGORITHMS
 #				- Different checksum algorithms to check for verifying the
@@ -1034,6 +1024,29 @@
 # Most port authors should not need to understand anything after this point.
 #
 
+# These need to be absolute since we don't know how deep in the ports
+# tree we are and thus can't go relative.  They can, of course, be overridden
+# by individual Makefiles or local system make configuration.
+PORTSDIR?=		/usr/mports
+LOCALBASE?=		/usr/local
+X11BASE?=		${LOCALBASE}
+LINUXBASE?=		/compat/linux
+LOCALBASE_REL:=		${LOCALBASE}
+X11BASE_REL:=		${X11BASE}
+LINUXBASE_REL:=		${LINUXBASE}
+LOCALBASE:=		${DESTDIR}${LOCALBASE_REL}
+X11BASE:=		${DESTDIR}${X11BASE_REL}
+LINUXBASE:=		${DESTDIR}${LINUXBASE_REL}
+DISTDIR?=		${PORTSDIR}/Distfiles
+_DISTDIR?=		${DISTDIR}/${DIST_SUBDIR}
+INDEXDIR?=		${PORTSDIR}
+# XXX Can we just call it 'INDEX' ?
+INDEXFILE?=		INDEX-${OSVERSION:C/([0-9]).*/\1/}
+
+TARGETDIR:=		${DESTDIR}${PREFIX}
+
+.include "${PORTSDIR}/Mk/bsd.commands.mk"
+
 # Look for ${WRKSRC}/.../*.orig files, and (re-)create
 # ${FILEDIR}/patch-* files from them.
 
@@ -1054,8 +1067,6 @@
 .endif
 
 
-
-
 # Start of pre-makefile section.
 .if !defined(AFTERPORTMK)
 
@@ -1067,85 +1078,7 @@
 
 _PREMKINCLUDED=	yes
 
-.if defined(MAKE_VERSION)
-.if ${MAKE_VERSION} >= 5200408030 || ${MAKE_VERSION} >= 4200408030 && ${MAKE_VERSION} < 5000000000
 NOPRECIOUSSOFTMAKEVARS= yes
-.endif
-.endif
-
-_MAKE_CMD=	/usr/bin/make
-
-AWK?=		/usr/bin/awk
-BASENAME?=	/usr/bin/basename
-BRANDELF?=	/usr/bin/brandelf
-BZCAT?=		/usr/bin/bzcat
-BZIP2_CMD?=	/usr/bin/bzip2
-CAT?=		/bin/cat
-CHGRP?=		/usr/bin/chgrp
-CHMOD?=		/bin/chmod
-CHOWN?=		/usr/sbin/chown
-CHROOT?=	/usr/sbin/chroot
-COMM?=		/usr/bin/comm
-CP?=		/bin/cp
-GCPIO?=		${LOCALBASE}/bin/gcpio
-CPIO?=		/usr/bin/cpio
-CUT?=		/usr/bin/cut
-DC?=		/usr/bin/dc
-DIALOG?=	/usr/bin/dialog
-DIFF?=		/usr/bin/diff
-DIRNAME?=	/usr/bin/dirname
-EGREP?=		/usr/bin/egrep
-EXPR?=		/bin/expr
-FALSE?=		false				# Shell builtin
-FILE?=		/usr/bin/file
-FIND?=		/usr/bin/find
-FMT?=		/usr/bin/fmt
-GREP?=		/usr/bin/grep
-GUNZIP_CMD?=	/usr/bin/gunzip -f
-GZCAT?=		/usr/bin/gzcat
-GZIP?=		-9
-GZIP_CMD?=	/usr/bin/gzip -nf ${GZIP}
-HEAD?=		/usr/bin/head
-ID?=		/usr/bin/id
-IDENT?=		/usr/bin/ident
-LDCONFIG?=	/sbin/ldconfig
-LN?=		/bin/ln
-LS?=		/bin/ls
-MKDIR?=		/bin/mkdir -p
-MKTEMP?=	/usr/bin/mktemp
-MV?=		/bin/mv
-OBJCOPY?=	/usr/bin/objcopy
-OBJDUMP?=	/usr/bin/objdump
-PASTE?=		/usr/bin/paste
-PAX?=		/bin/pax
-PRINTF?=	/usr/bin/printf
-REALPATH?=	/bin/realpath
-RM?=		/bin/rm
-RMDIR?=		/bin/rmdir
-SED?=		/usr/bin/sed
-SETENV?=	/usr/bin/env
-SH?=		/bin/sh
-SORT?=		/usr/bin/sort
-STRIP_CMD?=	/usr/bin/strip
-SU_CMD?=	/usr/bin/su root -c
-SYSCTL?=	/sbin/sysctl
-TAIL?=		/usr/bin/tail
-TEST?=		test				# Shell builtin
-TR?=		LANG=C /usr/bin/tr
-TRUE?=		true				# Shell builtin
-UNAME?=		/usr/bin/uname
-UNZIP_CMD?=	${LOCALBASE}/bin/unzip
-WHICH?=		/usr/bin/which
-XARGS?=		/usr/bin/xargs
-YACC?=		/usr/bin/yacc
-
-# ECHO is defined in /usr/share/mk/sys.mk, which can either be "echo",
-# or "true" if the make flag -s is given.  Use ECHO_CMD where you mean
-# the echo command.
-ECHO_CMD?=	echo				# Shell builtin
-
-# Used to print all the '===>' style prompts - override this to turn them off.
-ECHO_MSG?=		${ECHO_CMD}
 
 # Get the default maintainer
 MAINTAINER?=	ports at MidnightBSD.org
@@ -1155,9 +1088,6 @@
 ARCH!=	${UNAME} -p
 .endif
 
-# Kludge for pre-3.0 systems
-MACHINE_ARCH?=	i386
-
 # Get the operating system type
 .if !defined(OPSYS)
 OPSYS!=	${UNAME} -s
@@ -1332,26 +1262,6 @@
 PKGNAME?=		${PKGSUBNAME}-${PKGVERSION}
 DISTNAME?=		${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION:C/:(.)/\1/g}${DISTVERSIONSUFFIX}
 
-# These need to be absolute since we don't know how deep in the ports
-# tree we are and thus can't go relative.  They can, of course, be overridden
-# by individual Makefiles or local system make configuration.
-PORTSDIR?=		/usr/mports
-LOCALBASE?=		/usr/local
-X11BASE?=		${LOCALBASE}
-LINUXBASE?=		/compat/linux
-LOCALBASE_REL:=		${LOCALBASE}
-X11BASE_REL:=		${X11BASE}
-LINUXBASE_REL:=		${LINUXBASE}
-LOCALBASE:=		${DESTDIR}${LOCALBASE_REL}
-X11BASE:=		${DESTDIR}${X11BASE_REL}
-LINUXBASE:=		${DESTDIR}${LINUXBASE_REL}
-DISTDIR?=		${PORTSDIR}/Distfiles
-_DISTDIR?=		${DISTDIR}/${DIST_SUBDIR}
-INDEXDIR?=		${PORTSDIR}
-# XXX Can we just call it 'INDEX' ?
-INDEXFILE?=		INDEX-${OSVERSION:C/([0-9]).*/\1/}
-
-TARGETDIR:=		${DESTDIR}${PREFIX}
 
 .if defined(USE_LINUX_RPM)
 .include "${PORTSDIR}/Mk/bsd.linux-rpm.mk"
@@ -1543,9 +1453,11 @@
 FAKE_MAKEARGS?=		${MAKE_ARGS} ${DESTDIRNAME}=${FAKE_DESTDIR}
 
 FAKE_SETUP=		TRUE_PREFIX=${TRUE_PREFIX} PREFIX=${FAKE_DESTDIR}${TRUE_PREFIX} \
+				MANPREFIX=${FAKE_DESTDIR}${MANPREFIX:S/^${FAKE_DESTDIR}//} \
 				LINUXBASE=${FAKE_DESTDIR}${LINUXBASE:S/^${FAKE_DESTDIR}//} \
 				HOME=/${PORTNAME}_installs_to_home \
 				KMODDIR=${FAKE_DESTDIR}${KMODDIR:S/^${FAKE_DESTDIR}//}
+		
 
 .if defined(FAKE_OPTS)
 .if ${FAKE_OPTS:Mtrueprefix}x != "x" 
@@ -1906,12 +1818,16 @@
 BUILD_DEPENDS+=	bison:${PORTSDIR}/devel/bison
 .endif
 
-
-
 .if defined(USE_LOCAL_MK)
 .include "${PORTSDIR}/Mk/bsd.local.mk"
 .endif
 
+.if defined(USE_XORG) || defined(XORG_CAT)
+. if ${X_WINDOW_SYSTEM} == "xorg"
+.include "${PORTSDIR}/Mk/bsd.xorg.mk"
+. endif
+.endif
+
 .if defined(USE_MYSQL) || defined(WANT_MYSQL_VER) || \
 	defined(USE_PGSQL) || defined(WANT_PGSQL_VER) || \
 	defined(USE_BDB) || defined(USE_SQLITE)
@@ -2239,9 +2155,9 @@
 PKG_ADD?=		/usr/sbin/pkg_add
 PKG_DELETE?=	/usr/sbin/pkg_delete
 PKG_INFO?=		/usr/sbin/pkg_info
-PKG_VERSION?=		/usr/sbin/pkg_version
+PKG_VERSION?=	/usr/sbin/pkg_version
 .else
-PKG_CMD?=		/usr/sbin/mport
+PKG_CMD?=		${CHROOT} ${DESTDIR} /usr/sbin/pkg_create
 PKG_ADD?=		${CHROOT} ${DESTDIR} /usr/sbin/pkg_add
 PKG_DELETE?=	${CHROOT} ${DESTDIR} /usr/sbin/pkg_delete
 PKG_INFO?=		${CHROOT} ${DESTDIR} /usr/sbin/pkg_info
@@ -2270,7 +2186,7 @@
 .endif
 
 # where pkg_add records its dirty deeds.
-PKG_DBDIR?=		${DESTDIR}/var/db/pkg
+PKG_DBDIR?=		/var/db/pkg
 
 MOTIFLIB?=	-L${X11BASE}/lib -lXm -lXp
 
@@ -2804,9 +2720,9 @@
 .endif
 
 .if ${PREFIX} == /usr
-MANPREFIX?=	${DESTDIR}/usr/share
+MANPREFIX?=	/usr/share
 .else
-MANPREFIX?=	${TARGETDIR}
+MANPREFIX?=	${PREFIX}
 .endif
 
 .for sect in 1 2 3 4 5 6 7 8 9
@@ -2889,9 +2805,9 @@
 .if defined(_MANPAGES)
 
 .if defined(NOMANCOMPRESS)
-__MANPAGES:=	${_MANPAGES:S%^${TARGETDIR}/%%}
+__MANPAGES=	${_MANPAGES:S%^${PREFIX}/%%}
 .else
-__MANPAGES:=	${_MANPAGES:S%^${TARGETDIR}/%%:S%$%.gz%}
+__MANPAGES=	${_MANPAGES:S%^${PREFIX}/%%:S%$%.gz%}
 .endif
 
 .for m in ${_MANPAGES}
@@ -2906,16 +2822,16 @@
 INFO_PATH?=	info
 .endif
 
-DOCSDIR?=	${TARGETDIR}/share/doc/${PORTNAME}
-EXAMPLESDIR?=	${TARGETDIR}/share/examples/${PORTNAME}
-DATADIR?=	${TARGETDIR}/share/${PORTNAME}
-
-PLIST_SUB+=	DOCSDIR="${DOCSDIR:S,^${TARGETDIR}/,,}" \
-		EXAMPLESDIR="${EXAMPLESDIR:S,^${TARGETDIR}/,,}" \
-		DATADIR="${DATADIR:S,^${TARGETDIR}/,,}"
+DOCSDIR?=	${PREFIX}/share/doc/${PORTNAME}
+EXAMPLESDIR?=	${PREFIX}/share/examples/${PORTNAME}
+DATADIR?=	${PREFIX}/share/${PORTNAME}
+
+PLIST_SUB+=	DOCSDIR="${DOCSDIR:S,^${PREFIX}/,,}" \
+		EXAMPLESDIR="${EXAMPLESDIR:S,^${PREFIX}/,,}" \
+		DATADIR="${DATADIR:S,^${PREFIX}/,,}"
 
-DESKTOPDIR?=		${TARGETDIR}/share/applications
-_DESKTOPDIR_REL=	${DESKTOPDIR:S,^${TARGETDIR}/,,}/
+DESKTOPDIR?=		${PREFIX}/share/applications
+_DESKTOPDIR_REL=	${DESKTOPDIR:S,^${PREFIX}/,,}/
 
 .if ${_DESKTOPDIR_REL} == ${DESKTOPDIR}/
 # DESKTOPDIR is not beneath PREFIX
@@ -3096,22 +3012,17 @@
 .endif
 
 .if !defined(DEPENDS_TARGET)
-.if make(reinstall)
+.	if make(reinstall)
 DEPENDS_TARGET=	reinstall
-.else
+.	else
 DEPENDS_TARGET=	cached-install
-.endif
-.if defined(DEPENDS_CLEAN)
+.	endif
+.	if defined(DEPENDS_CLEAN)
 DEPENDS_TARGET+=	clean
 DEPENDS_ARGS+=	NOCLEANDEPENDS=yes
+.	endif
 .endif
-.else
-DEPENDS_ARGS+=	FORCE_PKG_REGISTER=yes
-.endif
-.if defined(DEPENDS)
-# pretty much guarantees overwrite of existing installation
-.MAKEFLAGS:	FORCE_PKG_REGISTER=yes
-.endif
+
 
 ################################################################
 #
@@ -3669,10 +3580,10 @@
 .	endif
 .endif
 
+
 #
 # Package
 #
-
 .if !target(do-package)
 do-package: ${TMPPLIST}
 	@if ! ${MKDIR} -p ${PKGREPOSITORY}; then \
@@ -5416,15 +5327,15 @@
 			@if ${ECHO_CMD} "${x}"| ${AWK} '$$1 ~ /(\*|\||\[|\]|\?|\{|\}|\$$)/ { exit 1};'; then \
 				if [ ! -e ${FAKE_DESTDIR}${DOCSDIR}/${x} ]; then \
 					${ECHO_CMD} ${DOCSDIR}/${x} | \
-					${SED} -e 's,^${TARGETDIR}/,,' >> ${TMPPLIST}; \
+					${SED} -e 's,^${PREFIX}/,,' >> ${TMPPLIST}; \
 				fi; \
 			fi
 .		endfor
 		@${FIND} -P ${FAKE_DESTDIR}${PORTDOCS:S/^/${DOCSDIR}\//} ! -type d 2>/dev/null | \
-			${SED} -ne 's,^${FAKE_DESTDIR}${TARGETDIR}/,,p' >> ${TMPPLIST}
+			${SED} -ne 's,^${FAKE_DESTDIR}${PREFIX}/,,p' >> ${TMPPLIST}
 		@${FIND} -P -d ${FAKE_DESTDIR}${PORTDOCS:S/^/${DOCSDIR}\//} -type d 2>/dev/null | \
-			${SED} -ne 's,^${FAKE_DESTDIR}${TARGETDIR}/, at dirrm ,p' >> ${TMPPLIST}
-		@${ECHO_CMD} "@dirrm ${DOCSDIR:S,^${TARGETDIR}/,,}" >> ${TMPPLIST}
+			${SED} -ne 's,^${FAKE_DESTDIR}${PREFIX}/, at dirrm ,p' >> ${TMPPLIST}
+		@${ECHO_CMD} "@dirrm ${DOCSDIR:S,^${PREFIX}/,,}" >> ${TMPPLIST}
 .	else
 		@${DO_NADA}
 .	endif
@@ -5486,7 +5397,7 @@
 			@${ECHO_MSG} "===> Installing rc.d startup script(s)"
 			@${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST}
 			@for i in ${USE_RC_SUBR}; do \
-				${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${FAKE_DESTDIR}${TARGETDIR}/etc/rc.d/$${i%.sh}.sh; \
+				${INSTALL_SCRIPT} ${WRKDIR}/$${i} ${FAKE_DESTDIR}${PREFIX}/etc/rc.d/$${i%.sh}.sh; \
 				${ECHO_CMD} "etc/rc.d/$${i%.sh}.sh" >> ${TMPPLIST}; \
 			done
 .		endif
@@ -5626,9 +5537,14 @@
 _CHKFAKE=chkfake
 .endif
 
+_CHKFAKE_ARGS=	${TMPPLIST} ${FAKE_DESTDIR} ${PREFIX}
+.if defined(SKIP_FAKE_CHECK)
+_CHKFAKE_ARGS+=	-s "${SKIP_FAKE_CHECK}"
+.endif
+
 .if !target(check-fake)
 check-fake: 
-	@${PORTSDIR}/Tools/scripts/${_CHKFAKE} ${TMPPLIST} ${FAKE_DESTDIR} ${PREFIX}
+	@${PORTSDIR}/Tools/scripts/${_CHKFAKE} ${_CHKFAKE_ARGS}
 .endif
 	
 
Index: bsd.xorg.mk
===================================================================
RCS file: /home/cvs/mports/Mk/bsd.xorg.mk,v
retrieving revision 1.2
retrieving revision 1.3
diff -L Mk/bsd.xorg.mk -L Mk/bsd.xorg.mk -u -r1.2 -r1.3
--- Mk/bsd.xorg.mk
+++ Mk/bsd.xorg.mk
@@ -3,7 +3,7 @@
 #
 # bsd.xorg.mk - Support for USE_XORG variable. (XXX - this comment sucks)
 #
-# Created by: Florent Thoumie <flz at FreeBSD.org>
+# Created by: Florent Thoumie <xxx>
 #
 # Complete list of dependencies for xorg ports can be found at :
 # http://people.freebsd.org/~flz/local/xorg/xorg-dep-list
@@ -13,11 +13,14 @@
 #
 # !!! Here be dragons !!! (yeah, here as well...)
 #
-# $FreeBSD: ports/Mk/bsd.xorg.mk,v 1.3 2007/09/13 19:44:45 flz Exp $
+# $FreeBSD: ports/Mk/bsd.xorg.mk,v 1.4 2007/10/03 22:24:59 pav Exp $
 # $MidnightBSD$
 #
 
-XORG_Include_MAINTAINER=		ports at MidnightBSD.org
+.if !defined(_POSTMKINCLUDED) && !defined(Xorg_Pre_Include)
+
+Xorg_Include_MAINTAINER=	ports at MidnightBSD.org
+Xorg_Pre_Include=		bsd.xorg.mk
 
 # Some notes:
 #
@@ -142,11 +145,12 @@
 
 .endif
 
-# Might not be useful, need to check this later.
-.if defined(USE_XORG)
-USE_GNOME+=	pkgconfig
 .endif
 
+.if defined(_POSTMKINCLUDED) && !defined(Xorg_Post_Include)
+
+Xorg_Post_Include=		bsd.xorg.mk
+
 # Register all xorg .pc files here.
 # foo_LIB_PC_DEPENDS means it should go to BUILD_DEPENDS *and* RUN_DEPENDS.
 
@@ -260,3 +264,5 @@
 			fi; \
 		done
 .endif
+
+.endif
Index: bsd.perl.mk
===================================================================
RCS file: /home/cvs/mports/Mk/bsd.perl.mk,v
retrieving revision 1.6
retrieving revision 1.7
diff -L Mk/bsd.perl.mk -L Mk/bsd.perl.mk -u -r1.6 -r1.7
--- Mk/bsd.perl.mk
+++ Mk/bsd.perl.mk
@@ -133,11 +133,17 @@
 .endif # defined(PERL_CONFIGURE) || defined(PERL_MODBUILD)
 
 
+
+
 .endif      # !defined(_POSTMKINCLUDED) && !defined(Perl_Pre_Include)
 .if defined(_POSTMKINCLUDED) && !defined(Perl_Post_Include)
 
 Perl_Post_Include=	bsd.perl.mk
 
+# There is a bug in perl's MakeMaker which causes the packlist to contain
+# the DESTDIR.  This bug is harmless, so we'll ignore it.  See rt.cpan.org
+# bug 3003 for details.
+SKIP_FAKE_CHECK+=	${SITE_PERL:S%^${PREFIX}/%%}/${PERL_ARCH}/auto/${PORTNAME:S%-%/%g}/.packlist
 
 PLIST_SUB+=		PERL_VERSION=${PERL_VERSION} \
 				PERL_VER=${PERL_VER} \
--- /dev/null
+++ Mk/bsd.commands.mk
@@ -0,0 +1,90 @@
+#-*- mode: Fundamental; tab-width: 4; -*-
+# ex:ts=4
+#
+# bsd.commands.mk - Common commands used within the ports infrastructure
+#
+# $FreeBSD: ports/Mk/bsd.commands.mk,v 1.1 2007/08/04 11:37:23 gabor Exp $
+# $MidnightBSD: mports/Mk/bsd.commands.mk,v 1.1 2007/11/14 18:49:04 ctriv Exp $
+#
+
+COMMANDS_Include_MAINTAINER=		ctriv at MidnightBSD.org
+
+.if !defined(_COMMANDSMKINCLUDED)
+
+_COMMANDSMKINCLUDED=     yes
+
+_MAKE_CMD=	/usr/bin/make
+
+AWK?=		/usr/bin/awk
+BASENAME?=	/usr/bin/basename
+BRANDELF?=	/usr/bin/brandelf
+BZCAT?=		/usr/bin/bzcat
+BZIP2_CMD?=	/usr/bin/bzip2
+CAT?=		/bin/cat
+CHGRP?=		/usr/bin/chgrp
+CHMOD?=		/bin/chmod
+CHOWN?=		/usr/sbin/chown
+CHROOT?=	/usr/sbin/chroot
+COMM?=		/usr/bin/comm
+CP?=		/bin/cp
+GCPIO?=		${LOCALBASE}/bin/gcpio
+CPIO?=		/usr/bin/cpio
+CUT?=		/usr/bin/cut
+DC?=		/usr/bin/dc
+DIALOG?=	/usr/bin/dialog
+DIFF?=		/usr/bin/diff
+DIRNAME?=	/usr/bin/dirname
+EGREP?=		/usr/bin/egrep
+EXPR?=		/bin/expr
+FALSE?=		false				# Shell builtin
+FILE?=		/usr/bin/file
+FIND?=		/usr/bin/find
+FMT?=		/usr/bin/fmt
+GREP?=		/usr/bin/grep
+GUNZIP_CMD?=	/usr/bin/gunzip -f
+GZCAT?=		/usr/bin/gzcat
+GZIP?=		-9
+GZIP_CMD?=	/usr/bin/gzip -nf ${GZIP}
+HEAD?=		/usr/bin/head
+ID?=		/usr/bin/id
+IDENT?=		/usr/bin/ident
+LDCONFIG?=	/sbin/ldconfig
+LN?=		/bin/ln
+LS?=		/bin/ls
+MKDIR?=		/bin/mkdir -p
+MKTEMP?=	/usr/bin/mktemp
+MV?=		/bin/mv
+OBJCOPY?=	/usr/bin/objcopy
+OBJDUMP?=	/usr/bin/objdump
+PASTE?=		/usr/bin/paste
+PAX?=		/bin/pax
+PRINTF?=	/usr/bin/printf
+REALPATH?=	/bin/realpath
+RM?=		/bin/rm
+RMDIR?=		/bin/rmdir
+SED?=		/usr/bin/sed
+SETENV?=	/usr/bin/env
+SH?=		/bin/sh
+SORT?=		/usr/bin/sort
+STRIP_CMD?=	/usr/bin/strip
+SU_CMD?=	/usr/bin/su root -c
+SYSCTL?=	/sbin/sysctl
+TAIL?=		/usr/bin/tail
+TEST?=		test				# Shell builtin
+TR?=		LANG=C /usr/bin/tr
+TRUE?=		true				# Shell builtin
+UNAME?=		/usr/bin/uname
+UNZIP_CMD?=	${LOCALBASE}/bin/unzip
+WHICH?=		/usr/bin/which
+XARGS?=		/usr/bin/xargs
+YACC?=		/usr/bin/yacc
+
+# ECHO is defined in /usr/share/mk/sys.mk, which can either be "echo",
+# or "true" if the make flag -s is given.  Use ECHO_CMD where you mean
+# the echo command.
+ECHO_CMD?=	echo				# Shell builtin
+
+# Used to print all the '===>' style prompts - override this to turn them off.
+ECHO_MSG?=		${ECHO_CMD}
+
+.endif


More information about the Midnightbsd-cvs mailing list