Deductions & credits

Yes you get stepped up basis.

 

But the mineral produce income and in the interceding years depletion was claim.  To my understanding you must recapture that depletion.  From the 4797 instructions:

 

“Disposition of Depreciable Property Not Used in

Trade or Business

Generally, gain from the sale or exchange of depreciable

property not used in a trade or business but held for

investment or for use in a not-for-profit activity is capital

gain. Generally, the gain is reported on Form 8949 and

Schedule D. However, part of the gain on the sale or

exchange of the depreciable property may have to be

recaptured as ordinary income on Form 4797. Use Part III

of Form 4797 to figure the amount of ordinary income

recapture. The recapture amount is included on line 31

(and line 13) of Form 4797. See the instructions for Part III.

If the total gain for the depreciable property is more than

the recapture amount, the excess is reported on Form

8949. On Form 8949, enter “From Form 4797” in column

(a) of Part I (if the transaction is short term) or Part II (if the

transaction is long term), and skip columns (b) and (c). In

column (d), enter the excess of the total gain over the

recapture amount. Leave columns (e) through (g) blank

and complete column (h). If you invested this gain into a

QOF and intend to elect the temporary deferral of the

gain, see the Instructions for Form 8949; Form 8997, Initial

and Annual Statement of Qualified Opportunity Fund

(QOF) Investments, and its instructions; and the

instructions for the applicable Schedule D.”