You are ok if docked in any EU port but....
I was on the Moorish Delights cruise last year + stopped at Gibraltar .
You have to put all your bags through scanner in customs hall before you board ship if you have more than allowance (200) they will take them.
1 guy with suitcase full was arrested + it took a senior ships officer to go to police + ask them to release him.They did after hefty fine + confiscated ciggies.
Johnny C