Please check out the
LQ FAQ: Security references, we've got a section on chrooting. I think it would be easiest to install giftd and whatever it needs in a temporary dir, say /var/tmp/giftd, then check it's dependencies before you chroot it. If you've read some howto's, tried it yourself and fail then tell us which tutorial you used and at which step you failed and we'll try to help.