I am not aware which problems you might have. Still I am a Mac user since years and had compiled gmic and all other app of the package, not without problems, however any system makes problems!
Since you don’t have the need for the compiling and building environment why do write such a nonsense. Better write " I’d like to try gmic (cli) on Mac, how can I do that!
The answer for that question is:
Unpack it, and add the folder gmic-cli to your path.
This should work !
Concerning your problems, I think your system it corrupt.
First step to overcome, create another user account (with admin rights) and use that instead.
Second step delete /opt/local, reinstall XQuartz and reinstall MacPorts.
It’s true, MacPorts installs a lot of incomprehensible ports, still even about 400 will not last to long since most of the ports are already in compiled form. Of course you should not try your special way from source, follow the instructions of the quick way! From source is starting from Adam & Eve to find the source of some personal specialities!