From owner-freebsd-ports Tue Feb 4 16:19:49 2003 Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9A38737B401; Tue, 4 Feb 2003 16:19:46 -0800 (PST) Received: from mailout06.sul.t-online.com (mailout06.sul.t-online.com [194.25.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F12543F79; Tue, 4 Feb 2003 16:19:40 -0800 (PST) (envelope-from corecode@corecode.ath.cx) Received: from fwd07.sul.t-online.de by mailout06.sul.t-online.com with smtp id 18gDHv-0006Qx-00; Wed, 05 Feb 2003 01:19:39 +0100 Received: from pride.uni.stoert.net (320050403952-0001@[80.128.127.76]) by fmrl07.sul.t-online.com with esmtp id 18gDHj-1WSZd2C; Wed, 5 Feb 2003 01:19:27 +0100 Received: from terrorfish.uni.stoert.net (terrorfish.uni.stoert.net [10.150.180.178]) by pride.uni.stoert.net (Postfix) with ESMTP id B318712F8F1; Wed, 5 Feb 2003 01:19:25 +0100 (CET) Received: from terrorfish.uni.stoert.net (localhost [127.0.0.1]) by terrorfish.uni.stoert.net (8.12.6/8.12.6) with ESMTP id h150JPqo005700; Wed, 5 Feb 2003 01:19:25 +0100 (CET) (envelope-from corecode@terrorfish.uni.stoert.net) Received: (from corecode@localhost) by terrorfish.uni.stoert.net (8.12.6/8.12.6/Submit) id h150JPWY005699; Wed, 5 Feb 2003 01:19:25 +0100 (CET) Date: Wed, 5 Feb 2003 01:19:21 +0100 From: "Simon 'corecode' Schubert" To: ports@freebsd.org Cc: portmgr@freebsd.org Subject: USE_GETOPT patch available Message-Id: <20030205011921.24c642cb.corecode@corecode.ath.cx> X-Mailer: Sylpheed version 0.8.9claws (GTK+ 1.2.10; i386-portbld-freebsd5.0) Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha1"; boundary="=.5gmITUfS/qOJr'" X-Sender: 320050403952-0001@t-dialin.net Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --=.5gmITUfS/qOJr' Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit hi people, find a patch for bsd.ports.mk which enables conditionalization of libgnugetopt requirement: or get it at comments (as usual) welcome cheers simon Index: Mk/bsd.port.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.437 diff -u -r1.437 bsd.port.mk --- Mk/bsd.port.mk 5 Dec 2002 22:43:22 -0000 1.437 +++ Mk/bsd.port.mk 5 Feb 2003 00:15:11 -0000 @@ -259,6 +259,9 @@ # USE_XLIB - Says that the port uses X libraries. # USE_MOTIF - Says that the port uses the Motif toolkit. Implies USE_XPM. # +# USE_GETOPT - Says that the port uses getopt*(3). Set to "long_only" if +# getopt_long_only(3) is required +# # Dependency checking. Use these if your port requires another port # not in the list above. # @@ -1250,6 +1253,46 @@ REINPLACE_CMD?= ${LOCALBASE}/bin/sed_inplace ${REINPLACE_ARGS} .else REINPLACE_CMD?= ${SED} ${REINPLACE_ARGS} +.endif +.endif + +.if defined(USE_GETOPT) +.if !empty(USE_GETOPT:Mlong_only) || !exists(/usr/include/getopt.h) +LIB_DEPENDS+= gnugetopt.1:${PORTSDIR}/devel/libgnugetopt +CFLAGS+= -I${LOCALBASE}/include +. if !empty(CONFIGURE_ENV:MCFLAGS=*) +. undef __c +. for _p in ${CONFIGURE_ENV} +__p:= ${_p} +. if !empty(__p:MCFLAGS=*) +. if !empty(__p:C/[^"]*//g) && empty(__p:C/[^"]*//g:C/"//1) +__p:= ${__p:C/=.*//}="-I${LOCALBASE}/include "${__p:C/[^=]*=//} +. else +__p:= ${__p}" -I${LOCALBASE}/include" +. endif +. endif +__c:= ${__c} ${__p} +. endfor +CONFIGURE_ENV:= ${__c} +. endif +.for __env in CONFIGURE MAKE +. if empty(${__env}_ENV:MLDFLAGS=*) +${__env}_ENV+= LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib -lgnugetopt" +. else +.undef __c +. for __p in ${${__env}_ENV} +. if !empty(__p:MLDFLAGS=*) +. if !empty(__p:C/[^"]*//g) && empty(__p:C/[^"]*//g:C/"//1) +__p:= ${__p:C/=.*//}=" -L${LOCALBASE}/lib -lgnugetopt "${__p:C/[^=]*=//} +. else +__p:= ${__p}" -L${LOCALBASE}/lib -lgnugetopt" +. endif +. endif +__c:= ${__c} ${__p} +. endfor +${__env}_ENV:= ${__c} +. endif +.endfor .endif .endif -- /"\ http://corecode.ath.cx/#donate \ / \ ASCII Ribbon Campaign / \ Against HTML Mail and News --=.5gmITUfS/qOJr' Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+QFiNr5S+dk6z85oRAsqgAKC4JJ5fGlw0WpJiJBOYXoGo7UV7gACg6G6D AUO1VH7Hq2+ak9V6qI4jNTA= =lCwg -----END PGP SIGNATURE----- --=.5gmITUfS/qOJr'-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message