LAKE FOREST, Ill. (AP) -- Generic drugmaker Akorn Inc. said Tuesday it turned a profit in the second quarter, and said it agreed to buy a minority stake in eye drug maker Aciex Therapeutics.Akorn said it earned $17.9 million, or 17 cents per share. In the second quarter of 2010, the company reported a loss of $9.4 million, or 10 cents per share.The latest quarter includes a gain of $13.4 million related to the sale of some assets of its Akorn-Strides joint venture to Pfizer Inc.Revenue rose 59 percent to $32.1 million from $20.2 million, helped by the $26 million purchase of Advanced Vision Research during the quarter. AVR's products include TheraTears, which are used to treat dry eyes, and for eyelid cleansing and eye nutrition. Excluding AVR, sales rose 41 percent.Analysts expected a profit of 9 cents per share and $26.7 million in revenue, according to FactSet.Shares of Akorn rose 77 cents, or 10.7 percent, to $8 in midday trading.Akorn did not say how much it is paying for its unspecified stake in Aciex, which is a Westborough, Mass.-based developer of ophthalmic drugs. It said some of Aciex's products are in human testing. The deal includes a worldwide licensing agreement for one over-the-counter eye product.Akorn said it now expects $124 million to $126 million in revenue in 2011, up from its previous estimate of $106 million to $110 million. Analysts are projecting $114.3 million, on average.