Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Edit sources of a port before installing

Tags:

macports

I have a problem with a certain port. It compiles and installs fine (port install webkit-gtk), and the actual problem occurs later (a certain symbol is not compiled into the library, but the details don't matter here).

In order to debug and fix this, I'd like to make some changes to the webkit-gtk sources before installing. With apt-get, I could do something like apt-get source packagename.

I found that I can call

sudo port fetch webkit-gtk
sudo port extract webkit-gtk
sudo port patch webkit-gtk
sudo port configure webkit-gtk

to do the individual steps of the installation. However, after I make changes to the sources I can't continue because I get error messages. I think there is a problem with permissions, as I can only edit the files as root (chowning to myself breaks the build process, and I can't su macports for some reason).

What I'd like to do is to make a few changes before the configure step, and then install the port with the changes as usual. How can I do that?

like image 573
jdm Avatar asked Oct 22 '22 20:10

jdm


1 Answers

you're almost there... sudo port uninstall webkit-gtk sudo port clean webkit-gtk sudo port fetch webkit-gtk sudo port extract webkit-gtk sudo port patch webkit-gtk

before the configure step, make your changes: sudo su - cd $(port work webkit-gtk) cd $(ls -1) #usually a work directory in here ...change stuff... exit sudo port configure webkit-gtk sudo port build webkit-gtk sudo port destroot webkit-gtk sudo port activate webkit-gtk

IDK what errors you are getting in the process, but they are probably related to the changes you made, not to the procedure. You were generally on the right track.

like image 98
Kirk Roybal Avatar answered Jan 02 '23 20:01

Kirk Roybal