From QCD lattice calculations to the equation of state of quark matter