From owner-freebsd-ports Wed Jun 7 3:42:43 2000 Delivered-To: freebsd-ports@freebsd.org Received: from maynard.mail.mindspring.net (maynard.mail.mindspring.net [207.69.200.243]) by hub.freebsd.org (Postfix) with ESMTP id 3C4AA37BAB9 for ; Wed, 7 Jun 2000 03:42:40 -0700 (PDT) (envelope-from asami@cs.berkeley.edu) Received: from silvia.hip.berkeley.edu (sji-ca41-94.ix.netcom.com [209.111.208.94]) by maynard.mail.mindspring.net (8.9.3/8.8.5) with ESMTP id GAA18041; Wed, 7 Jun 2000 06:42:37 -0400 (EDT) Received: (from asami@localhost) by silvia.hip.berkeley.edu (8.9.3/8.6.9) id DAA18712; Wed, 7 Jun 2000 03:42:34 -0700 (PDT) To: "Akinori -Aki- MUSHA" Cc: ports@FreeBSD.ORG Subject: Re: USE_LINUX? References: <200006070819.BAA14744@silvia.hip.berkeley.edu> <86u2f5zy3g.wl@localhost.local.idaemons.org> From: asami@FreeBSD.ORG (Satoshi - Ports Wraith - Asami) Date: 07 Jun 2000 03:42:30 -0700 In-Reply-To: "Akinori -Aki- MUSHA"'s message of "Wed, 07 Jun 2000 17:36:51 +0900" Message-ID: Lines: 108 X-Mailer: Gnus v5.7/Emacs 20.6 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org * From: "Akinori -Aki- MUSHA" * I'd second this idea. Thanks. I need a comment from a Linux expert as to what are the correct DEPEND values though. * Also, I'd suggest that we have a variable called "LINUXBASE" which * value is "/compat/linux" to stop portlint from carping at each and * every Linux port for using absolute pathnames. That's a good point. Speaking of which, I forgot to add PREFIX=${LINUXBASE} to my previous patch. * Likewise, we'd better have some variable which holds "/nonexistent", * IMHO. Bwahaha. ${NONEXISTENT}? ;) Satoshi P.S. Sorry for the PLIST_SUB in one of the hunks below, it's too late to edit patch lines.... ------- Index: bsd.port.mk =================================================================== RCS file: /usr/cvs/ports/Mk/bsd.port.mk,v retrieving revision 1.338 diff -u -r1.338 bsd.port.mk --- bsd.port.mk 2000/05/06 10:45:35 1.338 +++ bsd.port.mk 2000/06/07 10:38:51 @@ -202,8 +203,10 @@ # # X11BASE - Where X11 ports install things (default: /usr/X11R6). # LOCALBASE - Where non-X11 ports install things (default: /usr/local). +# LINUXBASE - Where Linux ports install things (default: /compat/linux). # PREFIX - Where *this* port installs its files (default: ${X11BASE} -# if USE_X_PREFIX is set, otherwise ${LOCALBASE}). +# if USE_X_PREFIX is set, ${LINUXBASE} if USE_LINUX +# is set, otherwise ${LOCALBASE}). # MASTERDIR - Where the port finds patches, package files, etc. Define # this is you have two or more ports that share most of the # files (default: ${.CURDIR}). @@ -398,8 +401,8 @@ # NO_MTREE - If set, will not invoke mtree from bsd.port.mk from # the "install" target. # 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.) +# if USE_X_PREFIX is set, /etc/mtree/BSD.linux.dist if +# USE_LINUX is set, /etc/mtree/BSD.local.dist otherwise.) # 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 @@ -535,6 +548,7 @@ .endif LOCALBASE?= ${DESTDIR}/usr/local X11BASE?= ${DESTDIR}/usr/X11R6 +LINUXBASE?= ${DESTDIR}/compat/linux DISTDIR?= ${PORTSDIR}/distfiles _DISTDIR?= ${DISTDIR}/${DIST_SUBDIR} .if defined(USE_BZIP2) @@ -595,10 +609,14 @@ .endif .if defined(USE_X_PREFIX) PREFIX?= ${X11BASE} +.elif defined(USE_LINUX) +PREFIX?= ${LINUXBASE} .else PREFIX?= ${LOCALBASE} .endif +PLIST_SUB+= PREFIX=%D LOCALBASE=${LOCALBASE} X11BASE=${X11BASE} + .if defined(USE_OPENSSL) .if ${OSVERSION} >= 400014 .if !exists(/usr/lib/libcrypto.so) @@ -734,6 +758,11 @@ MAKE_ENV+= CC=${CC} CXX=${CXX} .endif +.if defined(USE_LINUX) +BUILD_DEPENDS= /compat/linux/sbin/ldconfig:${PORTSDIR}/emulators/linux_base +RUN_DEPENDS= /compat/linux/usr/i486-linux-libc5/lib/libc.so.5:${PORTSDIR}/emulators/linux_base +.endif + .if defined(REQUIRES_MOTIF) LIB_DEPENDS+= Xpm.4:${PORTSDIR}/graphics/xpm .if defined(PARALLEL_PACKAGE_BUILD) @@ -801,6 +830,9 @@ # do something. DO_NADA?= /usr/bin/true +# Use this as the first operand to always build dependency. +NONEXISTENT?= /nonexistent + # Miscellaneous overridable commands: GMAKE?= gmake AUTOMAKE?= automake @@ -884,6 +916,8 @@ .if !defined(MTREE_FILE) .if defined(USE_X_PREFIX) MTREE_FILE= /etc/mtree/BSD.x11.dist +.elif defined(USE_LINUX) +MTREE_FILE= /etc/mtree/BSD.linux.dist .else MTREE_FILE= /etc/mtree/BSD.local.dist .endif To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message