Hidden patch source using Macports

Almost the same way that I use vim and know enough C, I configured the installed vim to remove a function that annoys me. When I switched to using a Mac with macports, I achieved this by removing any previous vim port, extracting the source code, manually editing the source code, and then proceed with installing Macports using my newly configured source.

sh> sudo port uninstall vim sh> sudo port fetch vim sh> sudo /usr/bin/vim /opt/local/wherever/port/put/the/source/file.c sh> sudo port install vim 

Now, when I try to do this, the port install command re-extracts the code from the server, completely ignoring my original changes, builds vim with the "official" source and the annoying "function".

I searched for checksums for the source, ways to edit checksums and command line switches to ignore them, but no luck.

I tried port patch instead of port install before editing the code, but that didn't matter.

I even found myself reading the source of port , but my tcl is too rusty to go far.

Any ideas on how to achieve this? Thanks.

[1] Macports 2.0.3. I do not know for which version this worked.

+4
source share
1 answer

I would advise creating a local port file for vim and adding your changes as a patch, which is used during the build process.

  • Create a local port file repository: howto
  • Copy the portfile vim directory (a directory named "vim" containing the "Portfile" file and the "files" directory) into the local port file repository.
  • Create a patch with vim source code changes and add it to the "files" directory.
  • Edit the local vim port to include the patchfiles yourpatch.diff line patchfiles yourpatch.diff
  • Run portindex again in the local port file repository.
  • Install vim with port install -s vim

Hope this helps.

+3
source

Source: https://habr.com/ru/post/1413585/


All Articles