Known shape-invariant potentials for the constant-mass Schrödinger equation are taken as effective potentials in a position-dependent effective mass (PDEM) one. The corresponding shape-invariance condition turns out to be deformed. Its solvability imposes the form of both the deformed superpotential and the PDEM. A lot of new exactly solvable potentials associated with a PDEM background are generated in this way. A novel and important condition restricting the existence of bound states whenever the PDEM vanishes at an end point of the interval is identified. In some cases, the bound-state spectrum results from a smooth deformation of that of the conventional shape-invariant potential used in the construction. In others, one observes a generation or suppression of bound states, depending on the mass-parameter values. The corresponding wavefunctions are given in terms of some deformed classical orthogonal polynomials. © 2005 IOP Publishing Ltd.