I have been doing a lot of messing around with freeBSD ports lately.
As root :
cd /usr/ports/databases/postgresql7
make patch
find work -regex ".*\.orig" -delete
mv work orig
make patch
find work -regex ".*\.orig" -delete
{modify files under work/ to do what you want}
diff -ruN orig work |\
grep -v "^diff" |\
grep -v "^Binary files" |\
sed "s;orig/radiusd-cistron[^/]*/\([^[:space:]]*\);\1.orig;" |\
sed "s;work/radiusd-cistron[^/]*/;;" >files/patch-z-new
make clean
make
{test and fix files under work/ as nessary. You may have to make
install, and make deinstall}
find work -regex ".*\.orig" -delete
find work -regex ".*\.o" -delete
diff -ruN orig work |\
grep -v "^diff" |\
grep -v "^Binary files" |\
sed "s;orig/radiusd-cistron[^/]*/\([^[:space:]]*\);\1.orig;" |\
sed "s;work/radiusd-cistron[^/]*/;;" >files/patch-z-new
make clean
make
... and so on.
This is basicaly how I do it, the diff ... code makes a freeBSD patch
and puts it in with freeBSD's port patches as hopefully the last patch
to be applied.
I have used this method to fix broken ports supplying my patch to
freeBSD with success.
I have also used this type of method to build my own custom ports.
This method makes upgrading easier, all I do is ; backup my patch,
upgrade the port then "re-port" my patch as required.
Good luck.
Ian Harding wrote:
>I use NetBSD Packages and did the same thing before cleaning the source tree. You should be able to do the equivalent
of"make extract" to get the source back then go into the work directory and compile/install from there. In NetBSD this
willnot clobber anything or require deinstalling.
>
>The only bit that didn't work that great was the tests. They don't like being run as root, but you can't create the
directoriesunless you are root. Changing the permissions on the source tree can fix that.
>
>Ian Harding
>Programmer/Analyst II
>Tacoma-Pierce County Health Department
>iharding@tpchd.org
>Phone: (253) 798-3549
>Pager: (253) 754-0002
>
>
>
>
>>>>"culley harrelson" <culley@ml1.net> 06/02/03 07:50AM >>>
>>>>
>>>>
>I have postgresql7.3.2 installed via the FreeBSD ports system and I would
>like to mess around with contrib/tsearch. I have used portupgrade to
>clean all the distributions so I do not have the source. Are the contrib
>files in the sources left by the freebsd port?!? Could I just re-install
>the port and go into the sources? I don't want to mess with the system
>if this isn't going to work :)
>
>culley
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
>http://archives.postgresql.org
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
>subscribe-nomail command to majordomo@postgresql.org so that your
>message can get through to the mailing list cleanly
>
>
>
>