DWM Compile and recompile DWM with synth

-Snake-

Active Member

Reaction score: 27
Messages: 130

Hi, im going to reinstall freebsd in my main system, and this time I want use dwm, dwm uses a config.h for configuration, then I need edit distfiles and build my "edited" version.

My issue is, how can I make this with synth? I want use only synth for ports, I found threads like: https://forums.freebsd.org/threads/7816/

I saw this diagram in synth git project: synth diagram

Then, I understand that if I use "make fetch" to get the sources, then edit them and put it back where it was, synth should build the distfile that I have edited, right?

Thanks you.
 

aragats

Daemon

Reaction score: 701
Messages: 1,618

IMHO x11-wm/dwm is so small and simple that there is no need to install it via ports.
E.g. I have a local source with my modifications for 10 years or so, and I don't want to touch it anymore.
 

ANOKNUSA

Aspiring Daemon

Reaction score: 374
Messages: 675

I agree with aragats. All the source installs is the dwm binary, and the man page. You can just delete those two files if you change your mind.
 

chrbr

Aspiring Daemon

Reaction score: 362
Messages: 882

Dear -Snake-,
I do the steps as below using ports-mgmt/poudriere. I am sure that it works with ports-mgmt/synth, too.
Code:
cd /usr/port/x11-wm/dwm/
make extract
cp work/dwm-6.1/config.mk work/dwm-6.1/config.mk.orig
cp work/dwm-6.1/config.def.h  work/dwm-6.1/config.def.h.orig
make patch
make
The you have the working directory /usr/ports/x11-wm/dwm/work/dwm-6.1 populated and you can modify config.h to match your needs. When everything is file do
Code:
cd /usr/port/x11-wm/dwm/
cp work/dwm-6.1/config.h  work/dwm-6.1/config.def.h
make makepatch
make clean
The output
Code:
# make makepatch
Generated patch-config.def.h
Generated patch-config.mk
The previous patches have been placed here:
/usr/ports/x11-wm/dwm/work/.makepatch-tmp/archived-patches
shows why files/config.mk should not be forgotten. The next time x11-wm/dwm is handled by the tools your changes on the configuration are applied, too.
Code:
# svnlite status
?       files/patch-config.def.h
finds the unversioned patch which does not hurt. Baiscally the procedure is described in https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/.
 
OP
-Snake-

-Snake-

Active Member

Reaction score: 27
Messages: 130

I agree with aragats. All the source installs is the dwm binary, and the man page. You can just delete those two files if you change your mind.

Yes, it is true, I will compile directly from the sources, thank you.
 
Top