1. cloned the original sources:
git clone git://git.savannah.gnu.org/screen.git ./screen.git
cd ./screen.git/src
./autogen.sh
2. applied all Apple's patches:
    for x in Makefile.in config.h.in configure process.c pty.c screen.c window.c; do
       curl "http://www.opensource.apple.com/source/screen/screen-16/patches/${x}.diff?txt" | patch -p0
    done
3. fetched the launchd header file:
     wget --no-check-certificate --output-file=vproc_priv.h http://www.opensource.apple.com/source/launchd/launchd-328/launchd/src/vproc_priv.h?txt
4. applied the loginName patch
     wget --no-check-certificate https://github.com/pclouds/pclouds-overlay/blob/master/app-misc/screen/files/4.0.3-extend-d_termname-ng.patch
     patch -i 4.0.3-extend-d_termname-ng.patch
5. fixed the rejections (*.rej)
6. configure, make and install:
./configure --prefix=/opt/local
make
sudo make install

(note the /opt/local which is used by macports… if you do not use macports use /usr/local instead)