Solved how to apply non oficial patch to port

hi, well,the question is,how to extract the port src without running make?
I am building some patchs file to audacious and when I finish posting the patchs here

for now I have the modified files,
any good tutorial for create .patch files?
 
If you have used svn/svnlite to fetch the source, then you can use svn/svnlite diff in the directory.

If its standalone use diff -ruN OriginalDir UpdatedDir to create a patch of a whole directory or use diff -u OriginalFile UpdatedFile to create a patch from a single file.
 
If you have used svn/svnlite to fetch the source, then you can use svn/svnlite diff in the directory.

If its standalone use diff -ruN OriginalDir UpdatedDir to create a patch of a whole directory or use diff -u OriginalFile UpdatedFile to create a patch from a single file.

I used the ports, run make,then control+c , copy the files and then
run make again
(very abrupt,but works)
 
You can build the port step by step.

1. Grab the Makefile, pkg-descr, and -if it exists- pkg-plist.
2. Run make makesum to create a distfile. This should download the source files to /usr/ports/distfiles, as a .tar.gz archive.
3. make fetch. This also downloads the source files to /usr/ports/distfiles.
4. make extract extracts the source files from /usr/ports/distfiles to ./work/.
5. make patch applies patches in PATCHDIR, usually located in ./work/files .
6. make config handles possible configuration options of a port.
7. make build compiles the code, and creates a binary.
8. make stage will copy the binary to the STAGEDIR, e.g ./work/stage/usr/local/bin.
8. make install finally installs the binary (the files in pkg-plist).

All those steps are documented in ./work, e.g.

Code:
nioh@nioh:~/usr/ports/www/abc/ % ll work/
total 16
-rw-r--r--  1 nioh  nioh    0 31 Okt. 11:54 .build_done.abc._usr_local
-rw-r--r--  1 nioh  nioh    0 31 Okt. 11:45 .configure_done.abc._usr_local
-rw-r--r--  1 nioh  nioh    0 31 Okt. 11:38 .extract_done.abc._usr_local
-rw-r--r--  1 nioh  nioh    0 31 Okt. 11:51 .license_done.abc._usr_local
-rw-r--r--  1 nioh  nioh  219 31 Okt. 11:51 .license-catalog.mk
-rw-r--r--  1 nioh  nioh   81 31 Okt. 11:51 .license-report
-rw-r--r--  1 nioh  nioh    0 31 Okt. 11:51 .patch_done.abc._usr_local
-rw-r--r--  1 nioh  nioh  151 31 Okt. 12:00 .PLIST.mktmp
-rw-r--r--  1 nioh  nioh    0 31 Okt. 12:00 .stage_done.abc._usr_local
-rw-r--r--  1 nioh  nioh   97 31 Okt. 11:42 BSD2CLAUSE
drwxr-xr-x  4 nioh  nioh  512 31 Okt. 11:43 abc-1.39/

E.g. if you wanted to rebuild the port, you could delete .build.done and .stage_done, then just type make.

The simplest way to modify the source code is to run make extract instead of make install clean. Then edit the source files in ./work/abc-1.39. Then continue the build with e.g. make install clean or just make build.

Creating patch files requires to modify the Makefile, so it's a bit more complicated.

I hope I explained it correctly.
 
Also quite useful: make makepatch. This will automatically create the patch files in files/.

Creating patch files requires to modify the Makefile, so it's a bit more complicated.
That depends on the patch. Not all patches are done in the Makefile. Patches from the files/ directory (patch-*) are also applied.
 
Back
Top