Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Apr 2000 00:22:16 -0300
From:      lioux@uol.com.br
To:        freebsd-ports@freebsd.org
Subject:   bsd.port.mk CONFIGURE_WRKDIR proposal
Message-ID:  <20000427002216.A97999@Fedaykin.here>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000427002216.A97999>