Class, privilege, wealth, abuse, recovery, drugs, drugs and more drugs. Showtime’s foray into scripted Saturday night series with the debut of “Patrick Melrose” has it all, including Benedict Cumberbatch as the title character.

Not that it was an easy road getting there.

The five-part miniseries is based on the semi-autobiographical novels from Edward St. Aubyn, and finally comes to television after spending half a decade in development. Not only was the task of translating St. Aubyn’s notoriously beautiful prose to the small screen a massive undertaking, but finding the right vehicle in which to tell the best-selling saga with a cult-like following was important in order to nail the numerous themes and overall tone from the books.

“Although now hopefully it feels like it was meant to be, when we started off on the journey it was actually very difficult,” co-showrunner Michael Jackson tells Variety. “We cycled through a number of broadcasters in the UK. It’s taken five years to get five films made.”

When the series debuts May 12 with “Bad News,” viewers meet Patrick Melrose in 1982, during one of the most pivotal moments of his life. Having just shot up heroin he answers the phone to learn that his abusive father has died, and he must travel to New York to collect the remains. An hour of debauchery, drugs and delirium follows in an episode inspired by the 1996 film “Trainspotting,” according to Jackson and his co-showrunner and wife Rachael Horovitz. The installment marks the first of five distinct hour-long episodes (each written by David Nicholls) that capture a different state of mind in this Patrick Melrose’s life. That approach led the producers to consider hiring different directors for each episode, but in the end the common flashbacks threaded the story together enough that director Edward Berger was the right choice.

“The second episode takes more time with its characters and it has quite a different visual sense and a different kind of pace,” Jackson says, noting the first episode is the only one with voiceovers. “We always had Gosford Park as a reference for episode three, which is a large country house with a lot of steady cam shots.”

“We had mash-up ideas for [four and five], but The Ice Storm comes to mind for four. There aren’t really very big analogues for five because they’re all so different,” Horovitz adds. “Overall this is a memory piece. It’s really about the little boy in the body of Benedict Cumberbatch and that represents the notion that we all have our child selves inside of us. The character of Patrick Melrose really is hilarious and entertaining but it’s also a very emotional and universal journey that he goes on, which is from being a child to becoming a parent. The way we tell our story is that episode one begins with the death of his father [Hugo Weaving] and episode five is the death of his mother [Jennifer Jason Leigh].”

Those instrumental relationships are told mostly through flashbacks to Patrick’s childhood. Through them viewers learn of the abuse he suffered at the hands of his father, and the complacency from his mother that was ultimately just as damaging.

“Patrick doesn’t know the answer himself as to why he is how he is or how his parents related to each other and to him, so the journey to peace is Patrick’s own journey,” Jackson says of the flashbacks’ pacing. “That’s why in a sense he can’t answer the question without living the life he lives and asking the questions he asks. The way we pass out the information is very much based around our understanding of Patrick’s character.”

In between, the series explores class in a way the producers feel isn’t often shown on television. While Patrick comes from wealth and privilege, others important in his life, including his wife Mary (Anna Madeley) and his best friend Johnny (Prasanna Puwanarajah), have different experiences.

“British television has a very strong tradition of representing working class lines with some exactitude, but when it comes to the other classes, British television tends to become nostalgic as in ‘Downton Abbey’ or ‘Upstairs, Downstairs,'” Jackson explains. “We followed lines of 50 years or so, from childhood to adulthood. It’s a great device. We really tried to engage with the decades without being perverse about it because one of the great things about St. Abyn’s writing is that he’s very funny [and] we’ve tried to incorporate that as well.”

Finding that humor in dark circumstances and translating it for audiences was another challenge for the creative team, so as a general rule they looked for the humor that came out of “too much honesty” and for moments that help viewers get to the core of Patrick’s character. A key piece of that was staying central to the original narrative, so producers say having St. Aubyn involved was instrumental.

“It was remarkable to have the person not only who wrote the book but who fundamentally lived through the story, always a phone call away if not in the room,” Horovitz says, noting he was on-set for the France shoots. “That said, he wasn’t precious about keeping things exactly as they were. There were some shifts we had to make for dramatic purposes — nothing that had to do with anything substantial in terms of meaning or content — but in order to make what was two-dimensional, three-dimensional for actors to perform.”

Cumberbatch was also instrumental in that process. As a fan of the novels to begin with, the actor had previously said in an AMA on Reddit that Patrick Melrose was a literary character he’d most like to play. He came on board the project as the lead and an executive producer while the scripts were still being written, which allowed him a voice in the development process.

“Knowing Benedict was going to be able to go all-out for this role probably impacted the scripts. He was very much into pushing as far as he could go,” Horovitz says.

At one point during filming a particularly violent scene in “Bad News,” Horovitz reveals, Cumberbatch hurt his hand. But he didn’t let that deter him. “There’s a lot of physical stuff in the books, but the filming of say, episode one was just like he was a superhero. It felt like he was an Avenger, just in a different costume. He was really in character from the minute he woke up until he left set every day.”

In the end, the producers reveal it was a perfect storm of things that finally allowed “Patrick Melrose” to make it on air in the format it did. Anything longer would have been too ambitious an undertaking, while the television landscape even five years ago might not have been as welcoming.

“It’s been a long time in the making, but ultimately thanks to our collaborators we were able to realize our initial vision,” Jackson says. “It’s the amazing thing about television now in this niche world we live in; you can actually make these things that would have been considered to be very literary and make them on the scale for television. It’s kind of a privilege to be able to do that.”

“Patrick Melrose” debuts Saturday, May 12 at 9 p.m. on Showtime.