From owner-freebsd-questions@FreeBSD.ORG Fri Mar 19 16:58:09 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 333671065673 for ; Fri, 19 Mar 2010 16:58:09 +0000 (UTC) (envelope-from aimass@yabarana.com) Received: from mail-qy0-f190.google.com (mail-qy0-f190.google.com [209.85.221.190]) by mx1.freebsd.org (Postfix) with ESMTP id E91708FC19 for ; Fri, 19 Mar 2010 16:58:08 +0000 (UTC) Received: by qyk28 with SMTP id 28so2090415qyk.14 for ; Fri, 19 Mar 2010 09:58:08 -0700 (PDT) MIME-Version: 1.0 Sender: aimass@yabarana.com Received: by 10.229.88.193 with SMTP id b1mr4575302qcm.27.1269017887976; Fri, 19 Mar 2010 09:58:07 -0700 (PDT) In-Reply-To: <286906751003190944q4ad81a6eu5422af0409e30046@mail.gmail.com> References: <286906751003190944q4ad81a6eu5422af0409e30046@mail.gmail.com> Date: Fri, 19 Mar 2010 12:58:07 -0400 X-Google-Sender-Auth: a10097a1414f9a08 Message-ID: From: Alejandro Imass To: Alberto Mijares Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-questions@freebsd.org Subject: Re: Elegant way to hack port source X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2010 16:58:09 -0000 On Fri, Mar 19, 2010 at 12:44 PM, Alberto Mijares wrote: > On Fri, Mar 19, 2010 at 12:05 PM, Alejandro Imass wrote: >> Hi, >> >> I need to modify a file from a port before building. Specifically, the >> sane-backends pnm.c driver has a bug and the folks at the original >> project has not fixed for a while. I need to modify pnm.c in the work >> directory before compiling. What is an elegant way of doing this? If I >> make and then modify, the main make file does not see the change made >> in the file and will not recompile. And since there is no actual >> makefile in the work subdirectory I can't compile there either! > > > > You could make a copy of graphics/sane-backends to > graphics/sane-backends-devel, fix the source in the new port's > directory and install it as a regular port. > > Check this out too > > http://www.freebsd.org/doc/en/books/porters-handbook/ > > Best regards > Thanks Alberto. I have checked the porter's handbook before writing this, in fact I discovered the CONFIGURE_ARGS variable which proved very useful for passing the --enable-pnm-backend switch to the configure script. (http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/building.html#USING-CONFIGURE). Nevertheless, the problem is that pnm.c has a bug since last year and it has not been fixed, and only developers use that driver, so I guess we've all gotten used to fiddling with the source, instead of forcing the maintainer to fix it. BTW today I got tired of this BS so I formnally filed the bug: https://alioth.debian.org/tracker/index.php?func=detail&aid=312401&group_id=30186&atid=410366 Anyway, back to the port, this is the problem I have: whe I type make CONFIGURE_ARGS=--enable-pnm-backend it effectively makes all the backends in the correct way, including the infamous pnm backend. I later go to the work directory, go into the sane-backendsxxxx sub-directory and modify backends/pnm.c. I latter go back to the root of the port (/usr/ports/graphics/sane-backends/) and type make again and nothing happens. In a normal make scenario, make would detct the .c had changed and re-compile and link just that file(s). In the ports make scenario, make doesn't do that. Is there a special switch to the port's make process, to actually go and re-make the source? Thanks, Alejandro Imass > > Alberto Mijares >