You are not logged in.

#1 2020-07-11 17:51:33

davidstein
Member
Registered: 2020-06-22
Posts: 31

[SOLVED] How to patch dmenu?

I am trying to add a patch from suckless to dmenu. I've never used the patch command before but I think thats what I need to use. I'm not sure which file to patch though. Do I patch the file at /usr/bin/dmenu?

Last edited by davidstein (2020-07-13 03:05:01)

Offline

#2 2020-07-11 18:09:12

loqs
Member
Registered: 2014-03-06
Posts: 19,059

Re: [SOLVED] How to patch dmenu?

Does the patch not contain the path it should be applied to?

Offline

#3 2020-07-11 18:11:54

davidstein
Member
Registered: 2020-06-22
Posts: 31

Re: [SOLVED] How to patch dmenu?

Now that you say that I guess it should patch these three files,

config.def.h |  2 ++
 dmenu.1      |  3 +++
 dmenu.c      | 39 ++++++++++++++++++++++++++++++++-------

I'm not sure where to find the uncompiled dmenu code though. I know the binaries are in usr/bin. And also, do I apply the patch once to each of those three files?

Offline

#4 2020-07-11 18:17:41

loqs
Member
Registered: 2014-03-06
Posts: 19,059

Re: [SOLVED] How to patch dmenu?

See Patching_packages.  patch will apply the patch to all the files listed in the patch / diff file.

Offline

#5 2020-07-11 21:32:50

tucuxi
Member
From: Switzerland
Registered: 2020-03-08
Posts: 291

Re: [SOLVED] How to patch dmenu?

Apply the patch to the source files, then rebuild and install the executable.

$ git clone https://git.suckless.org/dmenu
$ cd dmenu

Download the patch into this directory.

$ git apply _name-of-patch-file_
$ make && sudo make install

Offline

#6 2020-07-11 21:38:13

loqs
Member
Registered: 2014-03-06
Posts: 19,059

Re: [SOLVED] How to patch dmenu?

tucuxi the files installed would then not be tracked by pacman.

Offline

#7 2020-07-12 11:23:38

ondoho
Member
Registered: 2013-04-30
Posts: 692
Website

Re: [SOLVED] How to patch dmenu?

Take a PKGBUILD of a patched dmenu from the AUR as an example to create your own PKGBUILD.

Offline

#8 2020-07-13 03:04:32

davidstein
Member
Registered: 2020-06-22
Posts: 31

Re: [SOLVED] How to patch dmenu?

I read the Patching_packages wiki (should have done that to begin with) and that did the trick. Thanks!

Offline

Board footer

Powered by FluxBB