When you donate shares, you offset your tax by the amount you donated pre-tax. The charity pays the capital gains tax, once they sell the shares. You receive a write-off equal to the market value of your shares when you donated it.
So, in this case, it seems like a pretty significant tax-dodge -- on the order of $30MM.