# Qt minimum requirement



## tkjacobsen (Jul 20, 2009)

Hi all

I'm porting Avogadro (science/avogadro) and am currently just using:


```
USE_QT_VER= 4
```

in Makefile. But the true dependency is qt>= 4.4. Is there anyway to do this with easily or should I add something like


```
LIB_DEPENDS+=    QtCore.4.[4-5]:${PORTSDIR}/devel/qt4
```

Best regards
Troels Kofoed Jacobsen


----------



## tkjacobsen (Jul 20, 2009)

hmm, cannot find the edit button 

Seems you cannot have more than one number in LIB_DEPENDS (like QtCore.4.4). I could use BUILD_DEPENDS+= qt4-corelib=4.5.0, but it seems to be the wrong solution to me.


----------



## avilla@ (Jul 21, 2009)

you should have a look at /usr/ports/Mk/bsd.qt.mk for a reference of the available macros and at /usr/ports/audio/amarok-kde4/Makefile or /usr/ports/multimedia/kdenlive/Makefile for some examples
i maintain multimedia/kdenlive, so i can give help if you need it

EDIT:
i forgot this which is the best resource: http://www.freebsd.org/doc/en/books/porters-handbook/using-kde.html#QT4-COMPONENTS

also, the edit button will appear after your tenth post


----------



## tkjacobsen (Jul 22, 2009)

thanks for the pointers. Though I still cannot find a way to specify that e.g. qt 4.3 is not good enough as 4.4 is the minimum requirement. 

Can I just assume that people with qt4 installed has it updated to the latest version?

Best regards
Troels


----------



## tkjacobsen (Jul 22, 2009)

Also, is there an easy way to use qmake, like USE_CMAKE= yes? Or do I have to make my own like the following:


```
do-configure:
        cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${QMAKE} \
                "PREFIX=${PREFIX}" "LOCALBASE=${LOCALBASE}" \
                "WWWBROWSER=${WITH_BROWSER}"  main.pro
```

(I'm trying to update graphics/ipe to the qt4 version)


----------



## avilla@ (Jul 22, 2009)

`$ grep -ru3 QMAKE /usr/ports`
some ports do as you suggest, some just put qmake_build in QT_COMPONENTS and let it do everything, at least as far as i understand... you should investigate further those found ports, and start trying the simplest solution

regarding the qt version, i know that audio/amarok-kde4 and editors/koffice-kde4 in area 51, which depend on qt 4.5, don't specify the version (i'm using koffice-kde4 with qt 4.4 with some patches and it doesn't complain). so, you should assume that people has it updated: if they try to build it will fail, and then they'll upgrade

anyway, i suggest you write to freebsd-kde@ for both the problems: maybe they should add dependency versioning for qt and kde components


----------

