Each purchase lot is handled separately. In your example, you will have a long-term gain on the shares you purchased on April 1, 2014, and a short-term gain on the shares you purchased on June 1, 2014. The sale will be reported as two separate transactions.
If you don't sell all the shares you own, the assumption is that you sold the oldest shares first ("first in, first out," or FIFO). You can modify that assumption by telling the broker which shares to sell at the time you place the order. The broker has to send you an acknowledgement. Some brokers might not accept instructions to sell specific shares.