From owner-freebsd-ports Wed Oct 11 10:55: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 0DA7C37B66C for ; Wed, 11 Oct 2000 10:55:28 -0700 (PDT) Received: from imura.af.airnet.ne.jp (tok280.airnet.ne.jp [210.159.89.24]) by mail.af.airnet.ne.jp (8.8.8/3.6W/06/13/98-AF.AIRNET.NE.JP) with ESMTP id CAA14564 for ; Thu, 12 Oct 2000 02:55:24 +0900 Posted-Date: Thu, 12 Oct 2000 02:55:17 +0900 (JST) To: ports@freebsd.org Subject: How about new variable LINUX_CROSS_BUILD to bsd.port.mk? From: "R. Imura" 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: <20001012025514V.imura@cs.titech.ac.jp> Date: Thu, 12 Oct 2000 02:55:14 +0900 X-Dispatcher: imput version 990401(IM113) Lines: 99 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I'm a maintainer of www/linux-lesstif-ns, but I can't say this port's Makefile is good. So, I thought. 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) ==================== end of patch By this line, "+GMAKE= ${LINUXBASE}/usr/bin/make" all build tools(cc, ld, as...) will be work in the Linuxulator. By this line "+CONFIGURE_ENV+= MAKE=${GMAKE} ${LINUXBASE}/bin/bash" configure will be done by ${LINUXBASE}/bin/bash, so all command called from configure file will be work in the Linuxulator, too. I put this line "+USE_GMAKE= yes" after what usual USE_GMAKE do, so you can forget FreeBSD's world. (sorry for strange English) If *_WRKSRC patch is also applied, linux-lesstif-ns's Makefile will be tiny clean. Index: Makefile =================================================================== RCS file: /home/ncvs/ports/www/linux-lesstif-ns/Makefile,v retrieving revision 1.3 diff -u -r1.3 Makefile --- Makefile 2000/10/02 15:44:13 1.3 +++ Makefile 2000/10/11 17:25:44 @@ -21,26 +21,19 @@ MAINTAINER= imura@FreeBSD.org -BUILD_DEPENDS= ${LINUXBASE}/usr/bin/cc:${PORTSDIR}/devel/linux_devtools - -USE_LINUX_PREFIX= yes +LINUX_CROSS_BUILD= yes +BUILD_WRKSRC= ${WRKSRC}/lib/Xm PREFIX= ${LINUXBASE}${X11BASE} HAS_CONFIGURE= yes CONFIGURE_ARGS= --host=${MACHINE_ARCH}--linux-gnu --enable-shared --enable-production \ --disable-build-20 --disable-debug --no-recursion \ --without-motif --disable-build-Xlt --disable-build-Xbae -GMAKE= ${LINUXBASE}/usr/bin/make - -do-build: - cd ${WRKSRC}/lib/Xm && ${GMAKE} do-install: - ${INSTALL_SCRIPT} ${WRKSRC}/lib/Xm/.libs/libXm.so.1.0.2 \ + ${INSTALL_SCRIPT} ${BUILD_WRKSRC}/.libs/libXm.so.1.0.2 \ ${PREFIX}/lib/libXm-ns.so.1.0.2 ${LN} -sf libXm-ns.so.1.0.2 ${PREFIX}/lib/libXm.so.1 ${LN} -sf libXm.so.1 ${PREFIX}/lib/libXm.so ${LINUXBASE}/sbin/ldconfig .include - -CONFIGURE_ENV+= ${LINUXBASE}/bin/bash ==================== end of patch Any thought? - R. Imura To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message