From owner-freebsd-ports@FreeBSD.ORG Sat May 24 16:50:03 2008 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B05C51065674; Sat, 24 May 2008 16:50:03 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from services.ipt.ru (services.ipt.ru [194.62.233.110]) by mx1.freebsd.org (Postfix) with ESMTP id 7D5968FC1C; Sat, 24 May 2008 16:50:03 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from [85.173.16.45] (helo=localhost.my.domain) by services.ipt.ru with esmtpa (Exim 4.54 (FreeBSD)) id 1JzwwU-000EO3-61; Sat, 24 May 2008 20:50:02 +0400 To: "Ganael LAPLANCHE" References: <20080524073145.M76509@martymac.com> <07923414@ipt.ru> <20080524150909.M12444@martymac.com> <20080524160433.M17651@martymac.com> From: Boris Samorodov Date: Sat, 24 May 2008 20:49:29 +0400 In-Reply-To: <20080524160433.M17651@martymac.com> (Ganael LAPLANCHE's message of "Sat\, 24 May 2008 18\:05\:42 +0200 \(CEST\)") Message-ID: <15111974@ipt.ru> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: ports@freebsd.org, emulation@FreeBSD.org Subject: Re: USE_LINUX_RPM and PORTDOCS 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: Sat, 24 May 2008 16:50:03 -0000 On Sat, 24 May 2008 18:05:42 +0200 (CEST) Ganael LAPLANCHE wrote: > On Sat, 24 May 2008 17:27:04 +0200 (CEST), Ganael LAPLANCHE wrote > > On Sat, 24 May 2008 13:04:57 +0400, Boris Samorodov wrote > > > > > I'd suggest another option. What about fixing bsd.linux-rpm.mk? Ex., > > > one may introduce, say, a pre-install target (or even do it at the > > > very beginning of a do-install stage) and conditionally delete > > > unneeded files from WRKDIR (so they won't get installed at do-install > > > stage). > > > > Thanks for your answer :) > > > > Of course, fixing bsd.linux-rpm.mk would be the best option ! > > > > Your idea is good, but PORTDOCS would not be useable for that purpose. > > It cannot be used to identify files to delete because it is relative > > to the destination target (DOCSDIR), not to WRKDIR or WRKSRC. > Wait... DOCSDIR_REL (relative to PREFIX) is derived from DOCSDIR and *may* be > also always relative to WRKDIR for linux RPMs, since RPM installation is just a > copy of a tree structure which is relative to PREFIX. So maybe I was wrong here. > Anyway, if I add that to my archivers/linux-par2cmdline port's Makefile : > .if defined(NOPORTDOCS) > post-extract: > .for x in ${PORTDOCS} > @${RM} ${WRKDIR}/${DOCSDIR_REL}/${x} > .endfor > @${RMDIR} ${WRKDIR}/${DOCSDIR_REL}/ > .endif > It works :) So I think I'll stick to that solution at the moment. Great, but I'd say that it should be done a little bit later (may be at pre-install stage). "Extract" stage according to bsd.ports.mk "Unpacks ${DISTFILES} into ${WRKDIR}". > Note that two > other linux ports are subject to the same problem as mine : > /usr/ports/graphics/linux-png and /usr/ports/graphics/linux-png10. Yes, that's why I said that fixing bsd.linux-rpm.mk is a better idea. If you can suggest a patch and send-pr it, that would be great! -- WBR, bsam