Applying a patch to a port

2010-09-03 Thread bsd
Hello, 

I have a patch for clamav that was submited by a developer of clamav. 
I don't know how to apply It to the source code of the port. 

What I would like to do: 

1. Get the source code 
2. cd to the source directory 
3. Apply the patch 
4. Recompile 
5. Test 

If this is ok, then as an option: 

6. validate changes  updates 
7. submit patch to the FBSD port


Thanks for your support. 



Gregober --- PGP ID -- 0x1BA3C2FD
bsd @at@ todoo.biz




___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Applying a patch to a port

2010-09-03 Thread Vincent Hoffman
 On 03/09/2010 08:53, bsd wrote:
 Hello, 

 I have a patch for clamav that was submited by a developer of clamav. 
 I don't know how to apply It to the source code of the port. 

 What I would like to do: 

 1. Get the source code 
 2. cd to the source directory 
 3. Apply the patch 
 4. Recompile 
 5. Test 

 If this is ok, then as an option: 

 6. validate changes  updates 
 7. submit patch to the FBSD port

Not too hard, the infrastructure for patching ports is there already.

1) cd /usr/ports/catagory/portname  (obviously make this the port
directory you want
2) make patch (this will fetch the source if you need it  and extract it
and apply any patches already needed/supplied )
3) cd work (this is where the tarball is extracted.) and possibly into
the clamav-$version directory
4) apply  your patchfile :)
5)  cd back into the port directory
6) make (or make install if you want to install it.

All current patches are in the files directory of the port so you can
use them as a template for naming etc so the port can automatically use
you patch once your happy its working. The porters handbook is well
worth a look though if your planing on doing much with a port.
(http://www.freebsd.org/doc/en/books/porters-handbook/)


Vince
 Thanks for your support. 


 
 Gregober --- PGP ID -- 0x1BA3C2FD
 bsd @at@ todoo.biz
 



 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Applying a patch to a port

2010-09-03 Thread Leonidas Tsampros
bsd b...@todoo.biz writes:

 Hello, 

 I have a patch for clamav that was submited by a developer of clamav. 
 I don't know how to apply It to the source code of the port. 

 What I would like to do: 

 1. Get the source code 
 2. cd to the source directory 
 3. Apply the patch 
 4. Recompile 
 5. Test 

Hi,

as a starting point you could follow this procedure:

a) cd /usr/ports/security/clamav
b) make extract
c) cd work/clamav-whatever-version
d) patch -p0  the.patch.file.provided.by.the.clamav.developer.diff
e) cd ../..
f) make install (as usual)

Hope this helps.

Best Regards
Leonidas Tsampros
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org