In that case it probably deserves a warning if build.sh is given -x, and the comment expanded a bit. It makes sense now that you've explained, but not something I'd expect random build.sh users to understand.
I still am not clear on if having built packages like this as part of build.sh, if using the system with normal native X and doing pkgsrc builds later is going to be problematic. If that's true, maybe asking for packages and passing -x should just be an error.