We consider a Cahn-Hilliard-Darcy system with mass sources, equipped with an impermeability condition for the (volume) averaged velocity as well as homogeneous Neumann boundary conditions for the phase field and the chemical potential. The source term in the convective Cahn-Hilliard equation contains a control R that can be thought, for instance, as a drug or a nutrient in applications to solid tumor growth evolution. We present some results obtained in collaboration with M. Abatangelo, M. Grasselli, and H. Wu on a distributed optimal control problem in the two dimensional setting. These results have been achieved In the physically relevant case, that is, assuming unmatched viscosities for the binary fluid mixtures and considering a singular potential. In particular, we show that a second-order sufficient condition for the strict local optimality can also be proven.