The apmd package appears to depend on XFree86 but doesn't install xapm. Also, when built with -X in the current USE: bash% USE="-X" sudo emerge apmd ... the build fails when trying to build xapm.c (naturally).
Created attachment 1989 [details, diff] apmd-3.0.2-r2.patch Fixes some typos in the ebuild.
Well I didn't notice you posted a patch here but I fixed it already. However your patch didn't address all the issues with the ebuild and Makefile. Should be good to go now. My fix uses the X USE var. It'll be -r3.