From owner-freebsd-ports@FreeBSD.ORG Tue Feb 7 00:35:26 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 51E0E16A420 for ; Tue, 7 Feb 2006 00:35:26 +0000 (GMT) (envelope-from amdmi3@mail.ru) Received: from mx6.mail.ru (mx6.mail.ru [194.67.23.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD24243D45 for ; Tue, 7 Feb 2006 00:35:25 +0000 (GMT) (envelope-from amdmi3@mail.ru) Received: from [213.148.29.33] (port=38915 helo=nexii.panopticon) by mx6.mail.ru with esmtp id 1F6GpI-000AAA-00 for freebsd-ports@freebsd.org; Tue, 07 Feb 2006 03:35:24 +0300 Received: from hades.panopticon (hades.panopticon [192.168.0.2]) by nexii.panopticon (Postfix) with ESMTP id 829E71142B for ; Tue, 7 Feb 2006 03:39:01 +0300 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id E5E443C8; Tue, 7 Feb 2006 03:35:29 +0300 (MSK) Date: Tue, 7 Feb 2006 03:35:29 +0300 From: Dmitry Marakasov To: freebsd-ports@freebsd.org Message-ID: <20060207003529.GA32317@hades.panopticon> Mail-Followup-To: freebsd-ports@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: 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 00:35:26 -0000 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. -- Best regards, Dmitry mailto:amdmi3@mail.ru