Is it legal to make portraits of people for indirectly commercial purposes?
The problem lies with interpretation. If your take on a photo of a certain person (famous or not, we all have the same rights) is deviating sufficiently from the original - which is, in itself, an artistic take on it - there shouldn't be a problem (although you might want to credit the original author).
If you copy these photos directly (i.e. without reinterpretation), you're copying an artistic interpretation, and that is only legal if you have the permission of the original author, or if this copy falls under fair use.
If you only use these portraits to show to potential customers, it will probably be considered fair use: crediting is still legally required, but you won't get in trouble as long as you don't offer them for sale.

Artsy has a nice article about artwork copyright here. An excerpt:


  Then there is Section 107 of the Copyright Act of 1976. Known
  as fair use, the provision provides a legal defense to copyright
  infringement.
  Put simply, that means that I admit I’ve taken work from
  other people, but I can argue that my use of that work still deserves
  protection. In the case of an artist’s image being taken without
  permission, its acceptance under fair use is contingent on four
  factors. All four inform a judge who makes the final determination of
  the fair use argument’s validity. This means that there is always a
  degree of uncertainty to what constitutes fair use.
  But the most
  important question is, are you using the image for commercial purposes
  (if so, you’ll likely be in trouble) or non-profit and educational
  purposes (if so, you’re more likely to be in the clear)?
  It also
  depends on the nature of how you’re using the copyrighted work. The
  “less original” or less creative your use, the weaker your fair use
  claim.
  Another important factor is the total amount of the copyrighted
  image being reproduced. The more you reproduce, the less likely you
  are to be protected by fair use. Judges will look at the extent to
  which that reproduction impacts the market and undermines the economic
  value of the author’s original.
  Lastly, if the image is being
  transformed or parodied, it can also be protected under fair use.


Also note that, naturally, different laws apply in different countries.