Page 1 of 1

zyGrib-7.0.0 build on Mageia-4 (dual Qt4 Qt5 environ)

Posted: 21 Jan 2015 18:06
by obspsr
Building zyGrib-7.0.0 from sources, on Mageia-4 distribution in a dual
Qt4 and Qt5 environement is not so easy for all ;)

We have to modify zyGrib-7.0.0/Makefile as in the underneath diff copy:

1) First, specify full path of 'qmake' because qt4 and qt5 are present.

2) I like installing zyGrib in /usr/local/

3) Mageia-4 offers qwt-6.0.1 packages (runtime and devel), so we must
suppress SRC qwt references.

========================================
diff Makefile.dist Makefile

1c1
< QMAKE=/usr/bin/qmake-qt4
---
> QMAKE=/usr/lib64/qt4/bin/qmake
3c3
< INSTALLDIR=$(HOME)/zyGrib
---
> INSTALLDIR=/usr/local/zyGrib
9,10c9
< SRC= src/*.h src/*.cpp src/*/*.h src/*/*.cpp \
< src/qwt*/src/*.cpp src/qwt*/src/*.h
---
> SRC= src/*.h src/*.cpp src/*/*.h src/*/*.cpp
38c37
< cd src/qwt-6.0.1/src; $(QMAKE); make -j5
---
> ##cd src/qwt-6.0.1/src; $(QMAKE); make -j5

4) Consequently, we must adjust zyGrib-7.0.0/src/zyGrib.pro for
Mageia-4 qwt INCLUDEPATH and LIBS references.

===============================
diff zyGrib.pro.dist zyGrib.pro

8c8
< INCLUDEPATH += . util map GUI curvedrawer qwt-6.0.1/src
---
> INCLUDEPATH += . util map GUI curvedrawer qwt
15c15
< LIBS += -LC:/libs/lib/ -lbz2 -lz -lproj -lnova -Lqwt-6.0.1/lib/ -lqwt
---
> LIBS += -LC:/libs/lib/ -lbz2 -lz -lproj -lnova -lqwt
30c30
< LIBS += -lbz2 -lz -lproj -lnova -Lqwt-6.0.1/lib/ -lqwt
---
> LIBS += -lbz2 -lz -lproj -lnova -lqwt

5) We create the good new Makefile (here, in src):

$ /usr/lib64/qt4/bin/qmake -o Makefile zyGrib.pro

6) Last now, as Root, you can launch compilation and install:

# cd ../
# make; make install

=================
Serge Montagnac
<obs-psr@orange.fr>
=================