Use macports to install:
sudo port install python27
sudo port install py27-pip
sudo port install py27-gobject
sudo port install gettext
sudo port install py-pygtk +x11
(NOTE) we don't need mp-gcc for this:
sudo port select --set gcc none
select out newly install python and pip as default:
sudo port select --set pip pip27
sudo port select --set python2 python27
using pip to install:
pip install pyopengl numpy
install fltk from source (need to install from source because of some SDK error in OSX 11 big sur):
sudo port -v -s install fltk
compile p4vasp with default gcc(clang):
cd ~/install
git clone https://github.com/orest-d/p4vasp.git
cd p4vasp
patch -p0 -i MacOS.patch
modify all g++-7
to clang++
:
vi odpdom/Makefile.MacOS
vi src/Makefile.MacOS
modify src/Makefile.MacOS - line 68:
$(LD) $(LDFLAGS) -o _cp4vasp.so cp4vasp_wrap.o -lp4vasp $(LIBS) -L/opt/local/lib `python-config --ldflags`
and copy modified makefiles.macos to makefiles:
cp odpdom/Makefile.MacOS odpdom/Makefile
cp src/Makefile.MacOS src/Makefile
(NOTE) we do not need to patch the main Makefile because we have linked python2 to python-mp-27.
compile p4vasp:
make local
make
make install
Optionally, change install directory:
vi install/Configuration.mk