From owner-freebsd-ports Sun Oct 29 1:35:32 2000 Delivered-To: freebsd-ports@freebsd.org Received: from mail.af.airnet.ne.jp (mail.af.airnet.ne.jp [210.159.66.49]) by hub.freebsd.org (Postfix) with ESMTP id BBD2937B479 for ; Sun, 29 Oct 2000 01:35:28 -0700 (PDT) Received: from imura.af.airnet.ne.jp (tok194.airnet.ne.jp [210.159.88.194]) by mail.af.airnet.ne.jp (8.8.8/3.6W/06/13/98-AF.AIRNET.NE.JP) with ESMTP id RAA28404 for ; Sun, 29 Oct 2000 17:35:26 +0900 Posted-Date: Sun, 29 Oct 2000 17:36:39 +0900 (JST) To: ports@freebsd.org Subject: Re: How about new variable LINUX_CROSS_BUILD to bsd.port.mk? From: "R. Imura" In-Reply-To: <20001012025514V.imura@cs.titech.ac.jp> References: <20001012025514V.imura@cs.titech.ac.jp> X-Mailer: Mew version 1.94b20 on Emacs 19.34 / Mule 2.3 =?iso-2022-jp?B?KBskQkt2RSYyVhsoQik=?= X-Prom-Mew: Prom-Mew 1.93.4 (procmail reader for Mew) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20001029173637L.imura@cs.titech.ac.jp> Date: Sun, 29 Oct 2000 17:36:37 +0900 X-Dispatcher: imput version 990401(IM113) Lines: 79 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org It's so funny that a man who retired a few hours ago speaks something, :) I'll show one of the effective way of using this option. > How about this small patch? > > Index: bsd.port.mk > =================================================================== > RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v > retrieving revision 1.355 > diff -u -r1.355 bsd.port.mk > --- bsd.port.mk 2000/10/08 11:43:54 1.355 > +++ bsd.port.mk 2000/10/11 17:18:49 > @@ -621,6 +621,10 @@ > .else > PREFIX?= ${LOCALBASE} > .endif > +.if defined(LINUX_CROSS_BUILD) > +USE_LINUX= yes > +PREFIX?= ${LOCALBASE} > +.endif > > .if defined(USE_OPENSSL) > .if ${OSVERSION} >= 400014 > @@ -773,6 +777,13 @@ > > .if defined(USE_LINUX) > RUN_DEPENDS+= ${LINUXBASE}/etc/redhat-release:${PORTSDIR}/emulators/linux_base > +.endif > + > +.if defined(LINUX_CROSS_BUILD) > +USE_GMAKE= yes > +GMAKE= ${LINUXBASE}/usr/bin/make > +BUILD_DEPENDS+= ${LINUXBASE}/usr/bin/cc:${PORTSDIR}/devel/linux_devtools > +CONFIGURE_ENV+= MAKE=${GMAKE} ${LINUXBASE}/bin/bash > .endif > > .if defined(REQUIRES_MOTIF) audio/gogo will work as multi threads mode very easily, it's a bit faster than native one. (devel/linuxthreads doesn't work with my environment) Index: Makefile =================================================================== RCS file: /home/ncvs/ports/audio/gogo/Makefile,v retrieving revision 1.22 diff -u -r1.22 Makefile --- Makefile 2000/07/20 10:41:37 1.22 +++ Makefile 2000/10/29 08:23:56 @@ -17,7 +17,6 @@ # More than version 0.98 BUILD_DEPENDS= nasm-0.98:${PORTSDIR}/devel/nasm -USE_GMAKE= yes ALL_TARGET= gogo RESTRICTED= Condition is not clear @@ -31,13 +30,14 @@ .if !defined(WITH_THREADS) @${ECHO_MSG} "set WITH_THREADS to compile with linuxthreads." @${ECHO_MSG} "It would increase performance in SMP environment." +USE_GMAKE= yes .else -MAKE_ENV+= "USE_MT=yes" -LIB_DEPENDS= lthread.2:${PORTSDIR}/devel/linuxthreads +MAKE_ENV= "USE_MT=yes" +LINUX_CROSS_BUILD= yes .endif do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/gogo ${PREFIX}/bin + ${INSTALL_SCRIPT} ${WRKSRC}/gogo ${PREFIX}/bin ${INSTALL_SCRIPT} ${WRKSRC}/contrib/cdda2mp3.bsd \ ${PREFIX}/bin/cdda2mp3.gogo .if !defined(NOPORTDOCS) - R. Imura To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message