I noticed how hard dealing with dmenu's patches was, so I gave it a try making them easy to manage. For example, this simple lines will take care of the border patch for you:
==========================================================
# path/to/dmenu
./handle patch border # Apply patch, quietly by default
./handle depatch border -d # Remove patch, showing compiler output (debug)
==========================================================
Currently 31/32 official patches are available. You can find out more on the repo (https://github.com/jaimecgomezz/dmenu). Of course, your contributions or own patches are welcomed!
Hope you can find it useful!