From owner-freebsd-ports Wed Apr 26 20:23:52 2000 Delivered-To: freebsd-ports@freebsd.org Received: from heidegger.uol.com.br (heidegger.uol.com.br [200.230.198.88]) by hub.freebsd.org (Postfix) with ESMTP id 9FA1C37B856 for ; Wed, 26 Apr 2000 20:23:44 -0700 (PDT) (envelope-from lioux-alias-ppp-freebsd-ports=freebsd.org@uol.com.br) Received: from bsa-1-as01-7-a47.gd.uol.com.br (bsa-1-as01-7-a47.gd.uol.com.br [200.197.118.47]) by heidegger.uol.com.br (8.9.1/8.9.1) with ESMTP id AAA13484 for ; Thu, 27 Apr 2000 00:23:39 -0300 (BRT) Received: (qmail 7407 invoked by uid 1001); 27 Apr 2000 03:22:17 -0000 From: lioux@uol.com.br Date: Thu, 27 Apr 2000 00:22:16 -0300 To: freebsd-ports@freebsd.org Subject: bsd.port.mk CONFIGURE_WRKDIR proposal Message-ID: <20000427002216.A97999@Fedaykin.here> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hi guys, Although, changing .mks might be something trivial for some of you, it is major for me because I've never tried changing something this big on the FBSD picture; i.e., I am speechless by the solenity of the moment. :-) Enough crap. I am submitting CONFIGURE_WRKDIR. This new VAR replaces WRKSRC as the directory the configure target changes (cd) to before running. For several PORTS (hugs, and soon to be ACE, just to name a few), this is necessary and has been acomplished with the use of configure SCRIPTDIR scripts and do-configure targets. This will make several PORTS look cleaner and easier to read. I am submitting the Mk unified diff and an example port (hugs) to illustrate the new use (to be sincere, it is a patch, Regards, Mario Ferreira -- --- bsd.port.mk.ORIG Thu Apr 27 00:04:53 2000 +++ bsd.port.mk Thu Apr 27 00:04:43 2000 @@ -1202,6 +1202,7 @@ .endif PKGLATESTFILE?= ${PKGLATESTREPOSITORY}/${PKGBASE}${PKG_SUFX} +CONFIGURE_WRKDIR?= ${WRKSRC} CONFIGURE_SCRIPT?= configure CONFIGURE_TARGET?= ${MACHINE_ARCH}--freebsd${OSREL} CONFIGURE_LOG?= config.log @@ -1709,7 +1710,7 @@ ${SCRIPTDIR}/configure; \ fi .if defined(HAS_CONFIGURE) - @(cd ${WRKSRC} && \ + @(cd ${CONFIGURE_WRKDIR} && \ if ! ${SETENV} CC="${CC}" CXX="${CXX}" \ CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \ INSTALL="/usr/bin/install -c -o ${BINOWN} -g ${BINGRP}" \ -- hugs instructions: 1) apply the patch; 2) rmdir the scripts directory; diff -ruN /usr/ports/lang/hugs/Makefile ./Makefile --- /usr/ports/lang/hugs/Makefile Wed Apr 12 13:46:50 2000 +++ ./Makefile Thu Apr 27 00:19:42 2000 @@ -24,6 +24,10 @@ MAN1= hugs.1 +HAS_CONFIGURE= yes +CONFIGURE_WRKDIR= ${WRKSRC}/unix +CONFIGURE_ARS= --with-readline + post-install: strip ${PREFIX}/bin/hugs strip ${PREFIX}/bin/runhugs diff -ruN /usr/ports/lang/hugs/scripts/configure ./scripts/configure --- /usr/ports/lang/hugs/scripts/configure Sun Nov 21 11:45:06 1999 +++ ./scripts/configure Wed Dec 31 21:00:00 1969 @@ -1,3 +0,0 @@ -#!/bin/sh -cd ${WRKSRC}/unix -./configure --with-readline To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message