  The functions of the gluon fragmentation into $^3P_J$ quarkonium are
calculated to order $\alpha_s^2$. With the recent progress in analysing
quarkonium systems in QCD we show explicitly how the socalled divergence in the
limit of the zero-binding energy, which is related to $P$-wave quarkonia, is
treated correctly in the case of fragmentation functions. The obtained
fragmentation functions satisfy explicitly at the order of $\alpha_s^2$ the
Altarelli-Parisi equation and when $z\rightarrow 0$ they behave as $z^{-1}$ as
expected. Some comments on the previous results are made.
