--- patches/apply.pl.orig	Thu Jan  4 05:16:03 2007
+++ patches/apply.pl	Sun Jan 14 06:55:07 2007
@@ -722,7 +722,7 @@
     my $ver_line;
     my $is_old = 1;
 
-    open ($Patch, "patch --version|") || die "Can't run patch: $!";
+    open ($Patch, "gpatch --version|") || die "Can't run patch: $!";
     $ver_line = <$Patch>;
     $ver_line =~ m/\s+(\d+)\.(\d+)\.(\d+)/ || die "Can't get patch version\n";
     if ($1 >= 2 && $2 >= 5 && $3 >= 9) {
@@ -1006,7 +1006,7 @@
     $applied_patches = $dest_dir.'/applied_patches';
 
     $opts = join ' ', @arguments;
-    $base_cmd = "patch -l -p0 $opts -d $dest_dir";
+    $base_cmd = "gpatch -l -p0 $opts -d $dest_dir";
     if (is_old_patch_version()) {
 	$base_cmd = 'sed \'s/^\(@.*\)\r$/\1/\' | ' . $base_cmd;
     }

--- patches/src680/apply.orig	Thu May 10 00:43:32 2007
+++ patches/src680/apply	Tue May 15 05:33:14 2007
@@ -97,6 +97,8 @@
 NovellWin32ISO: Win32, NovellOnly, NovellOnlyWin32, Lockdown, CalcSolver, cairocanvas
 # Mac OS X
 MacOSX : MacOSXCommon, SystemJavaBits, CalcSolver, MacOSXOnly
+# FreeBSD
+FreeBSD : LinuxCommon, NotDebian, Lockdown, CalcSolver
 # -------- [ Tag [ >= <tag> etc. ], ] patch sets --------
 
 
@@ -842,7 +844,7 @@
 autodoc-add-missing-stdio-h.diff, rengelha
 
 # do not pack any potential .orig files with ppds
-psprint_config-no-orig.diff, jholesov
+# psprint_config-no-orig.diff, jholesov
 
 # changes the SDK gid module name to gid_Module_Root_SDK, so the generated list
 # of files does not conflict with the main package, i#64802


--- patches/vba/sc-source-ui-vba-vbaaxis-cxx.diff~	Thu Jun 14 01:52:48 2007
+++ patches/vba/sc-source-ui-vba-vbaaxis-cxx.diff	Sat Jun 23 13:45:05 2007
@@ -1,6 +1,6 @@
 --- /dev/null	
 +++ sc/source/ui/vba//vbaaxis.cxx
-@@ -0,0 +1,678 @@
+@@ -0,0 +1,682 @@
 +/*************************************************************************
 + *
 + *  OpenOffice.org - a multi-platform office productivity suite
@@ -42,6 +42,10 @@
 +#include <org/openoffice/excel/XlScaleType.hpp>
 +#include "vbaaxistitle.hxx"
 +#include "vbachart.hxx"
++#if defined (FREEBSD)
++#undef MIN
++#undef MAX
++#endif
 +using namespace ::com::sun::star;
 +using namespace ::org::openoffice;
 +using namespace ::org::openoffice::excel::XlAxisCrosses;
