From owner-freebsd-ports Mon Jan 8 6:22:55 2001 Delivered-To: freebsd-ports@freebsd.org Received: from m08.alpha-net.ne.jp (m08.alpha-net.ne.jp [210.229.64.38]) by hub.freebsd.org (Postfix) with ESMTP id 3BC0237B402 for ; Mon, 8 Jan 2001 06:22:27 -0800 (PST) Received: from kyoto-tc012-p146.alpha-net.ne.jp (kyoto-tc012-p146.alpha-net.ne.jp [210.237.118.180]) by m08.alpha-net.ne.jp (8.9.3/3.7W) with ESMTP id XAA21009 for ; Mon, 8 Jan 2001 23:22:05 +0900 (JST) Received: from souffle.bogus-local.net (localhost [127.0.0.1]) by kyoto-tc012-p146.alpha-net.ne.jp (Postfix) with ESMTP id BDDEA5F36; Mon, 8 Jan 2001 23:22:11 +0900 (JST) Date: Mon, 08 Jan 2001 23:22:11 +0900 Message-ID: <86r92et97w.wl@cheerful.com> From: FUJISHIMA Satsuki To: Will Andrews Cc: ports@FreeBSD.org Subject: multiple mtree files In-Reply-To: <20010104123312.G86630@argon.firepipe.net> References: <200101041709.f04H9XU61344@freefall.freebsd.org> <20010104123312.G86630@argon.firepipe.net> User-Agent: Wanderlust/2.4.0 (Rio) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/20.7 (i386--freebsd) MULE/4.1 (AOI) MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: multipart/mixed; boundary="Multipart_Mon_Jan__8_23:22:11_2001-1" Content-Transfer-Encoding: 7bit Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org --Multipart_Mon_Jan__8_23:22:11_2001-1 Content-Type: text/plain; charset=US-ASCII At Thu, 4 Jan 2001 12:33:12 -0500, Will Andrews wrote: > Please, people, bento is not always right. These empty directories > should be deleted by mtree, NOT pkg-plist. Efforts should go into > letting us use multiple mtree files, NOT using wrong 'fixes' like this. I'm under impression what you suggest here is the right way to go. share/locale is too common thing to be handled by each port nowadays and should be coverred by mtree as x11/kdelibs11 does. So I made a patch to handle multiple mtree files. You need to add your port: MTREE_ADD= /some/where/locale.dist and that file will be merged with BSD.local.dist and/or BSD.x11.dist depends on its flavor. bento would just shut up. :-) There are > 230 ports which install share/locale stuff. Some of them try unsuccessful @dirrm and others do 'rmdir || true' hack. I think these directory used to be removed just to stop warning. I think this is also useful for KDE, GNOME and their children. -- FUJISHIMA Satsuki --Multipart_Mon_Jan__8_23:22:11_2001-1 Content-Type: text/plain; charset=US-ASCII Index: bsd.port.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.360 diff -u -r1.360 bsd.port.mk --- bsd.port.mk 2000/11/16 13:06:25 1.360 +++ bsd.port.mk 2001/01/08 05:50:07 @@ -420,6 +420,9 @@ # MTREE_FILE - The name of the mtree file (default: /etc/mtree/BSD.x11.dist # if USE_X_PREFIX is set, /etc/mtree/BSD.local.dist # otherwise.) +# MTREE_ADD - Optional mtree file used in addition to ${MTREE_FILE}. +# TMPMTREE - Temporary mtree file passed to ${MTREE_CMD} +# (default: ${WRKDIR}/.mtree). # PLIST - Name of the `packing list' file (default: ${PKGDIR}/PLIST). # Change this to ${WRKDIR}/PLIST or something if you # need to write to it. (It is not a good idea for a port @@ -1011,7 +1014,8 @@ .endif .endif MTREE_CMD?= /usr/sbin/mtree -MTREE_ARGS?= -U ${MTREE_FOLLOWS_SYMLINKS} -f ${MTREE_FILE} -d -e -p +TMPMTREE?= ${WRKDIR}/.mtree +MTREE_ARGS?= -U ${MTREE_FOLLOWS_SYMLINKS} -f ${TMPMTREE} -d -e -p # A few aliases for *-install targets INSTALL_PROGRAM= \ @@ -1064,7 +1068,7 @@ PKG_ARGS+= -D ${PKGMESSAGE} .endif .if !defined(NO_MTREE) -PKG_ARGS+= -m ${MTREE_FILE} +PKG_ARGS+= -m ${TMPMTREE} .endif .endif .if defined(PKG_NOCOMPRESS) @@ -1828,7 +1832,7 @@ # Package .if !target(do-package) -do-package: ${TMPPLIST} +do-package: ${TMPPLIST} ${TMPMTREE} @${ECHO_MSG} "===> Building package for ${PKGNAME}" @if [ -d ${PACKAGES} ]; then \ if [ ! -d ${PKGREPOSITORY} ]; then \ @@ -1953,6 +1957,7 @@ fi; \ fi .if !defined(NO_MTREE) + @cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} generate-mtree @if [ `id -u` = 0 ]; then \ if [ ! -f ${MTREE_FILE} ]; then \ ${ECHO} "Error: mtree file \"${MTREE_FILE}\" is missing."; \ @@ -2418,7 +2423,7 @@ package-noinstall: @${MKDIR} ${WRKDIR} @cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} PACKAGE_NOINSTALL=yes real-package - @${RM} -f ${TMPPLIST} + @${RM} -f ${TMPPLIST} ${TMPMTREE} -@${RMDIR} ${WRKDIR} .endif @@ -2882,6 +2887,14 @@ ${TMPPLIST}: @cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} generate-plist + +.if !target(generate-mtree) +generate-mtree: + @${CAT} ${MTREE_FILE} ${MTREE_ADD} > ${TMPMTREE} +.endif + +${TMPMTREE}: + @cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} generate-mtree # Compress (or uncompress) and symlink manpages. .if !target(compress-man) --Multipart_Mon_Jan__8_23:22:11_2001-1 Content-Type: text/plain; charset=US-ASCII # $FreeBSD$ # libintl message catalogue hierarchy # Add language subdirectory which your port installs if it is not # listed here, # /set type=dir uname=root gname=wheel mode=0755 . share locale af LC_MESSAGES .. .. az LC_MESSAGES .. .. bg LC_MESSAGES .. .. bg_BG.cp1251 LC_MESSAGES .. .. br LC_MESSAGES .. .. ca LC_MESSAGES .. .. cs LC_MESSAGES .. .. cy LC_MESSAGES .. .. cz LC_MESSAGES .. .. da LC_MESSAGES .. .. de LC_MESSAGES .. .. de_AT LC_MESSAGES .. .. de_DE LC_MESSAGES .. .. dk LC_MESSAGES .. .. el LC_MESSAGES .. .. el_GR LC_MESSAGES .. .. en LC_MESSAGES .. .. en@IPA LC_MESSAGES .. .. en_AU LC_MESSAGES .. .. en_GB LC_MESSAGES .. .. en_SE LC_MESSAGES .. .. en_UK LC_MESSAGES .. .. en_US LC_MESSAGES .. .. eo LC_MESSAGES .. .. es LC_MESSAGES .. .. es_DO LC_MESSAGES .. .. es_ES LC_MESSAGES .. .. es_GT LC_MESSAGES .. .. es_HN LC_MESSAGES .. .. es_MX LC_MESSAGES .. .. es_PA LC_MESSAGES .. .. es_PE LC_MESSAGES .. .. es_SV LC_MESSAGES .. .. et LC_MESSAGES .. .. eu LC_MESSAGES .. .. fa LC_MESSAGES .. .. fi LC_MESSAGES .. .. fr LC_MESSAGES .. .. ga LC_MESSAGES .. .. gd LC_MESSAGES .. .. gl LC_MESSAGES .. .. gv LC_MESSAGES .. .. he LC_MESSAGES .. .. hr LC_MESSAGES .. .. hs LC_MESSAGES .. .. hu LC_MESSAGES .. .. ia LC_MESSAGES .. .. id LC_MESSAGES .. .. is LC_MESSAGES .. .. it LC_MESSAGES .. .. iw LC_MESSAGES .. .. ja LC_MESSAGES .. .. ja_JP.EUC LC_MESSAGES .. .. ja_JP.SJIS LC_MESSAGES .. .. ko LC_MESSAGES .. .. kw LC_MESSAGES .. .. lt LC_MESSAGES .. .. lv LC_MESSAGES .. .. mk LC_MESSAGES .. .. nl LC_MESSAGES .. .. nn LC_MESSAGES .. .. no LC_MESSAGES .. .. no@nynorsk LC_MESSAGES .. .. no_NY LC_MESSAGES .. .. pl LC_MESSAGES .. .. pt LC_MESSAGES .. .. pt_BR LC_MESSAGES .. .. pt_PT LC_MESSAGES .. .. ro LC_MESSAGES .. .. ru LC_MESSAGES .. .. ru_RU LC_MESSAGES .. .. rudos LC_MESSAGES .. .. rukoi8 LC_MESSAGES .. .. ruwin LC_MESSAGES .. .. se LC_MESSAGES .. .. sk LC_MESSAGES .. .. sl LC_MESSAGES .. .. sp LC_MESSAGES .. .. sr LC_MESSAGES .. .. sr_YU LC_MESSAGES .. .. sv LC_MESSAGES .. .. ta LC_MESSAGES .. .. th LC_MESSAGES .. .. tr LC_MESSAGES .. .. uk LC_MESSAGES .. .. wa LC_MESSAGES .. .. zh LC_MESSAGES .. .. zh_CN LC_MESSAGES .. .. zh_CN.EUC LC_MESSAGES .. .. zh_CN.GB2312 LC_MESSAGES .. .. zh_CN.GBK LC_MESSAGES .. .. zh_TW LC_MESSAGES .. .. zh_TW.Big5 LC_MESSAGES .. .. .. .. .. --Multipart_Mon_Jan__8_23:22:11_2001-1-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message