This question is inspired in part by Open Source License restrictions and recent sanctions against Russia and in particular by this answer
Can a software license impose restrictions on the place where the software is to be used, so that a court would enforce those restrictions. Fopr example, could the license include text such as:
This software is licensed for use only in the state of Texas?
Similarly, can a license impose limitations on the purpose of use, such as:
- This software is licensed for non-commercial use only;
- This software is licensed for non-law-enforcement use only;
- This license does not authorize use by any government or governmental agency;
- This software is licensed for use only by individuals or corms with gross revenues of $5,000,000 or less.
Assume that the would-be user has acquired a copy of the software lawfully, and only subsequently decides to use it in a way that the license purports to forbid. Assume further that the dev who created the software still holds the copyright, and sues the would-be user to enforce such a condition. Would courts enforce such a license restriction?
I understand thsat such a restriction would make the software not "open source" as the OSI uses that term, nor 'free" as the FSF uses that term. Indeed the software might be clearly proprietary. I am only interested (for this question) in whether such terms can be enforced in any software license.
I would strongly prefer answers that cite case law, statute law, or other authoritative sources (in that order). I am most interested in answers for US, UK, or EU law (in that order), but I am interested in answers for any jurisdiction for which reliable sources are available.