From owner-freebsd-ports@FreeBSD.ORG Tue Feb 7 13:51:29 2006 Return-Path: X-Original-To: freebsd-ports@freebsd.org 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 C4FD516A423 for ; Tue, 7 Feb 2006 13:51:29 +0000 (GMT) (envelope-from laszlof@vonostingroup.com) Received: from ritamari.vonostingroup.com (ritamari.vonostingroup.com [216.144.193.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id 49BB943D4C for ; Tue, 7 Feb 2006 13:51:28 +0000 (GMT) (envelope-from laszlof@vonostingroup.com) Received: from adsl-68-72-248-38.dsl.sfldmi.ameritech.net ([68.72.248.38] helo=[192.168.1.33]) by ritamari.vonostingroup.com with esmtpa (Exim 4.60 (FreeBSD)) (envelope-from ) id 1F6TG0-000BSI-LS for freebsd-ports@freebsd.org; Tue, 07 Feb 2006 08:51:48 -0500 Message-ID: <43E8A5DD.5000509@vonostingroup.com> Date: Tue, 07 Feb 2006 08:51:25 -0500 From: Frank Laszlo User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: freebsd-ports@freebsd.org References: <20060207003529.GA32317@hades.panopticon> In-Reply-To: <20060207003529.GA32317@hades.panopticon> X-Enigmail-Version: 0.93.2.0 OpenPGP: url=http://www.franksworld.org/~laszlof/keys/0x0B3FCA4B.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ritamari.vonostingroup.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [26 6] X-AntiAbuse: Sender Address Domain - vonostingroup.com X-Source: X-Source-Args: X-Source-Dir: Subject: Re: USE_DOS2UNIX may be more powerful? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Feb 2006 13:51:29 -0000 Dmitry Marakasov wrote: > Hi! > > I've just updated games/xmoto port I maintain, and I used newly introduced > USE_DOS2UNIX variable instead of construction like that: > > @${FIND} ${WRKSRC}/src -name "*.cpp" -o -name "*.h" | \ > ${XARGS} ${REINPLACE_CMD} -e "s|$$(${PRINTF} '\r')||g" > > I like the idea, but I think USE_DOS2UNIX should be a bit more powerful. > > Let us have a port having many subdirectories with *.cpp and *.h files, > which all need to be dos2unix'ed. Also, there are binary files. Thus, we > can't use USE_DOS2UNIX=yes as it will corrupt binaries, and we should > specify many paths to files we want to process. For xmoto, to process all > source and header files, I'll need to do this: > > USE_DOS2UNIX= src/*.cpp src/*.h src/image/*.cpp src/image/*.h \ > src/tinyxml/*.cpp src/tinyxml/*.h > > these are only 3 dirs, I've seen much more. > > So what do you think of idea of making USE_DOS2UNIX more like interface to > find utility? > > For example, to write this: > > USE_DOS2UNIX= src/ libsrc/ *.cpp *.h docs/ *.html *.txt README > > to do that: > > find ${WRKSRC}/src/ ${WRKSRC}/libsrc/ -name *.cpp -or -name *.h -type f -print0 | xargs ... > find ${WRKSRC}/docs/ -name *.html -or -name *.txt -or -name README -type f -print0 | xargs ... > > Syntax may be other (maybe multiline more like OPTIONS), that's point to > discuss. But that surely will be a feature. > > If the idea gets accepted, I'll make patches. > > Sounds like a pretty reasonable idea. But I think USE_* is generally just on/off switches, so maybe it needs to be a different name? __________________________________________________ Frank Laszlo System Administrator The VonOstin Group Email: laszlof@tvog.net WWW: http://www.vonostingroup.com Mobile: 248-863-7584