What Portugal did was decriminalize the possession of small amounts of drugs. They did not legalize them. There is a huge difference. Decriminalization essentially means that possession of small amounts of drugs is no longer an offense that warrants an arrest and jail time. In a decriminalized system an officer can still stop someone for drugs, but they can only write them a ticket- similar to speeding, jaywalking or illegal parking.
This makes a huge difference for a number of reasons. First, it's easier to implement politically because the substances are still illegal. Second, it's less costly because people caught with small amounts are not caught up in the justice system for years, and only pay a small fine. Third, it decreases the adversarial nature of the "war on drugs" because being caught with drugs is no longer a life-changing event.
Marijuana possession is already decriminalized in many states in the U.S. (California, Colorado, New York and Oregon off the top of my head). It is clearly not an impossibility to implement politically, and in fact the trend in the U.S. is already on its way. An important hurdle is that we do not have any states that have yet decriminalized "harder" drugs like heroin and cocaine, but it is simply a matter of time. Pressure on lawmakers in the form of education, money and votes will in fact work. It just takes time.